gnuplot-4.6.4/0000755000471100001440000000000012223340020010115 5ustar gnuplot-4.6.4/m4/0000755000471100001440000000000012223340010010434 5ustar gnuplot-4.6.4/m4/pkg.m40000644000471100001440000001673610561426300011506 0ustar # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [AC_MSG_RESULT([no]) $4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # PKG_CHECK_MODULES_NOFAIL(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # This is the same as PKG_CHECK_MODULES, but it will not stop with an # error or a failure if it does not find the packages, but it will still # output the same detailed warning about the problem. To check if # an error occured, look at $pkg_failed, which will be 'yes' or 'untried' # in that case. # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES_NOFAIL might not happen, you should be sure to # include an explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES_NOFAIL], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_WARN(dnl [ Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_WARN(dnl [ The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [AC_MSG_RESULT([no]) $4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES_NOFAIL gnuplot-4.6.4/m4/msdos.m40000644000471100001440000000174010516414302012036 0ustar ## ------------------------------- ## ## Check for MS-DOS/djgpp. ## ## From Lars Hecking and ## ## Hans-Bernhard Broeker ## ## ------------------------------- ## # serial 1 AC_DEFUN([GP_MSDOS], [AC_MSG_CHECKING(for MS-DOS/djgpp/libGRX) AC_EGREP_CPP(yes, [#if __DJGPP__ && __DJGPP__ == 2 yes #endif ],AC_MSG_RESULT(yes) LIBS="-lpc $LIBS" AC_DEFINE(MSDOS, 1, [ Define if this is an MSDOS system. ]) AC_DEFINE(DOS32, 1, [ Define if this system uses a 32-bit DOS extender (djgpp/emx). ]) with_linux_vga=no AC_CHECK_LIB(grx20,GrLine, LIBS="-lgrx20 $LIBS" CFLAGS="$CFLAGS -fno-inline-functions" AC_DEFINE(DJSVGA, 1, [ Define if you want to use libgrx20 with MSDOS/djgpp. ]) AC_CHECK_LIB(grx20,GrCustomLine, AC_DEFINE(GRX21, 1, [ Define if you want to use a newer version of libgrx under MSDOS/djgpp. ])dnl )dnl ) is_msdos=yes, AC_MSG_RESULT(no) is_msdos=no )dnl ]) gnuplot-4.6.4/m4/alpha.m40000644000471100001440000000071510567363141012011 0ustar ## ------------------------------- ## ## Check for Alpha AXP. ## ## By Hans-Bernhard Broeker ## ## (edited copy of msdos.m4) ## ## ------------------------------- ## # serial 1 AC_DEFUN([GP_ALPHA], [AC_MSG_CHECKING(for Alpha/AXP CPU) AC_EGREP_CPP(yes, [#ifdef __alpha yes #endif ],AC_MSG_RESULT(yes) if test "$GCC" = "yes" ; then CFLAGS="-mieee $CFLAGS" else CFLAGS="-ieee $CFLAGS" fi, AC_MSG_RESULT(no) )dnl ]) gnuplot-4.6.4/m4/Makefile.in0000644000471100001440000002740112223337636012531 0ustar # Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = m4 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alpha.m4 \ $(top_srcdir)/m4/apple.m4 $(top_srcdir)/m4/beos.m4 \ $(top_srcdir)/m4/msdos.m4 $(top_srcdir)/m4/next.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROEPS_CFLAGS = @CAIROEPS_CFLAGS@ CAIROEPS_LIBS = @CAIROEPS_LIBS@ CAIROPANGO_CFLAGS = @CAIROPANGO_CFLAGS@ CAIROPANGO_LIBS = @CAIROPANGO_LIBS@ CAIROPDF_CFLAGS = @CAIROPDF_CFLAGS@ CAIROPDF_LIBS = @CAIROPDF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIST_CONTACT = @DIST_CONTACT@ DVIPS = @DVIPS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ GDLIB_CONFIG = @GDLIB_CONFIG@ GIHDIR = @GIHDIR@ GREP = @GREP@ GTK28_CFLAGS = @GTK28_CFLAGS@ GTK28_LIBS = @GTK28_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEXPAND = @KPSEXPAND@ LASERGNU = @LASERGNU@ LATEX = @LATEX@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARIES_FOR_X = @LIBRARIES_FOR_X@ LIBS = @LIBS@ LINUXSUID = @LINUXSUID@ LISPDIR = @LISPDIR@ LN_S = @LN_S@ LRELEASE = @LRELEASE@ LTLIBOBJS = @LTLIBOBJS@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGO_1_10_2_CFLAGS = @PANGO_1_10_2_CFLAGS@ PANGO_1_10_2_LIBS = @PANGO_1_10_2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PDFLIB_CONFIG = @PDFLIB_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ PLAINTEX = @PLAINTEX@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RCC = @RCC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMLIBS = @TERMLIBS@ TERMXLIBS = @TERMXLIBS@ TEXDIR = @TEXDIR@ TEXHASH = @TEXHASH@ TROFF = @TROFF@ TUTORIAL = @TUTORIAL@ UIC = @UIC@ VERSION = @VERSION@ VERSION_MAJOR = @VERSION_MAJOR@ WX_CONFIG = @WX_CONFIG@ WX_LIBS = @WX_LIBS@ X11_APPDEFAULTS_DIR = @X11_APPDEFAULTS_DIR@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_OBJC = @ac_ct_OBJC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign EXTRA_DIST = README Makefile.am.in alpha.m4 apple.m4 beos.m4 msdos.m4 \ next.m4 pkg.m4 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign m4/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am Makefile.am: Makefile.am.in rm -f $@ $@t sed -n '1,/^##m4-files-begin/p' Makefile.am.in > $@t echo EXTRA_DIST = README Makefile.am.in *.m4 | fmt | \ (tr '\012' @; echo ) \ |sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012 ' \ >> $@t sed -n '/^##m4-files-end/,$$p' Makefile.am.in >> $@t chmod og-w $@t mv $@t $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnuplot-4.6.4/m4/README0000644000471100001440000000053306675705267011356 0ustar These files are used by a program called aclocal (part of the GNU automake package). aclocal uses these files to create aclocal.m4 which is in turn used by autoconf to create the configure script at the the top level in this distribution. The Makefile.am file in this directory is automatically generated from the template file, Makefile.am.in. gnuplot-4.6.4/m4/apple.m40000644000471100001440000000121111627455227012022 0ustar ## ------------------------------- ## ## Check for Apple Mac OS X ## ## From Leigh Smith ## ## ------------------------------- ## # serial 1 AC_DEFUN([GP_APPLE], [AC_MSG_CHECKING(for Apple MacOS X) AC_EGREP_CPP(yes, [#if defined(__APPLE__) && defined(__MACH__) yes #endif ], [ AC_MSG_RESULT(yes) AC_CHECK_LIB(aquaterm, aqtInit, [ LIBS="-laquaterm $LIBS -framework Foundation" CFLAGS="$CFLAGS -ObjC" AC_DEFINE(HAVE_LIBAQUATERM,1, [Define to 1 if you're using the aquaterm library on Mac OS X]) ],[], -lobjc) is_apple=yes ], AC_MSG_RESULT(no) is_apple=no) ]) gnuplot-4.6.4/m4/Makefile.am.in0000644000471100001440000000070311752300767013122 0ustar ## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign ##m4-files-begin ##m4-files-end Makefile.am: Makefile.am.in rm -f $@ $@t sed -n '1,/^##m4-files-begin/p' Makefile.am.in > $@t echo EXTRA_DIST = README Makefile.am.in *.m4 | fmt | \ (tr '\012' @; echo ) \ |sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012 ' \ >> $@t sed -n '/^##m4-files-end/,$$p' Makefile.am.in >> $@t chmod og-w $@t mv $@t $@ gnuplot-4.6.4/m4/beos.m40000644000471100001440000000062107777015425011660 0ustar ## ------------------------------- ## ## Check for BeOS. ## ## From Lars Hecking ## ## From Xavier Pianet ## ## ------------------------------- ## # serial 1 AC_DEFUN([GP_BEOS], [AC_MSG_CHECKING(for BeOS) AC_EGREP_CPP(yes, [#if __BEOS__ yes #endif ], AC_MSG_RESULT(yes) build_src_beos_subdir=yes, build_src_beos_subdir=no AC_MSG_RESULT(no)) ]) gnuplot-4.6.4/m4/next.m40000644000471100001440000000061210516414302011664 0ustar ## ------------------------------- ## ## Check for NeXT. ## ## From Lars Hecking ## ## ------------------------------- ## # serial 1 AC_DEFUN([GP_NEXT], [AC_MSG_CHECKING(for NeXT) AC_EGREP_CPP(yes, [#if __NeXT__ yes #endif ], AC_MSG_RESULT(yes) LIBS="$LIBS -lsys_s -lNeXT_s" CFLAGS="$CFLAGS -ObjC" is_next=yes, AC_MSG_RESULT(no) is_next=no) ]) gnuplot-4.6.4/m4/Makefile.am0000644000471100001440000000103312223337633012506 0ustar ## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign ##m4-files-begin EXTRA_DIST = README Makefile.am.in alpha.m4 apple.m4 beos.m4 msdos.m4 \ next.m4 pkg.m4 ##m4-files-end Makefile.am: Makefile.am.in rm -f $@ $@t sed -n '1,/^##m4-files-begin/p' Makefile.am.in > $@t echo EXTRA_DIST = README Makefile.am.in *.m4 | fmt | \ (tr '\012' @; echo ) \ |sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012 ' \ >> $@t sed -n '/^##m4-files-end/,$$p' Makefile.am.in >> $@t chmod og-w $@t mv $@t $@ gnuplot-4.6.4/configure.vms0000755000471100001440000004762611626256045012672 0ustar $ ! CONFIGURE.VMS -- configure command file for VMS $ ! $ ! Writen by John.Hasstedt@sunysb.edu. This command file creates config.h $ ! and either a make file or a command file. These files are based on the $ ! makefile.vms and buildvms.com files distributed with previous versions $ ! of gnuplot. $ ! $ ! Options are specified on the command line. I just set symbols on the $ ! command line to 1. This is rather crude, but it works. $ ! $ ! The options are: $ ! $ ! DECC, GNUC, VAXC -- The compiler. I have only tested this with DECC. $ ! MMS, MMK, MAK, COM -- The build procedure. If you specify MMS or MMK, $ ! you get DESCRIP.MMS in the [.SRC] directory; if you specify MAK, $ ! you get MAKEFILE. in the [.SRC] directory; if you specify COM, you $ ! get BUILD.COM in the [.SRC] directory. $ ! DECC$CRTL -- Use the DECC$CRTL backport library. See $ ! SYS$LIBRARY:DECC$CRTL.README for information on it. $ ! READLINE -- Use the included readline function. $ ! USE_MOUSE -- Include the mouse code $ ! $ ! For example, $ ! @CONFIGURE.VMS GNUC MAK $ ! will create [.SRC]MAKEFILE. with commands for building with GNUC. $ ! $ ! makefile.vms had the comments: $ ! ------------------------------------------------------------------------- $ ! use with the MAKE that was posted by Tony Ivanov (tony@gvgpvd.GVG.TEK.COM) $ ! in comp.os.vms on 5 December 1988 $ ! $ ! Modified 23 June 1999 to work with MMK; it should also work with MMS. $ ! John.Hasstedt@sunysb.edu. $ ! ------------------------------------------------------------------------- $ ! $ ! buildvms.com had the comment: $ ! ------------------------------------------------------------------------- $ ! lph: modified for compatibility with VMS 4.x (which lacks 'if ... endif'), $ ! but made the default DECC $ ! ------------------------------------------------------------------------- $ ! $ ! I have tried to maintain compatibility with V4.x--I have not used $ ! 'if ... endif' or 'gosub'; however, I do not have a V4.x system to test $ ! it on. $ ! $ ! The comments below are from buildvms.com about defining CFLAGS on $ ! different platforms. If you have problems compiling, these comments $ ! may help. If you need to change CFLAGS, you can change it below, or $ ! you can change it in the make file this file generates. Most of the $ ! defines are not necessary because I now use config.h. $ ! $ !----------------------------------------------------------------- $ ! A generic starting point $ ! $ !$ CFLAGS = "/NOWARN/NOOP/DEFINE=(''x11'NO_GIH,PIPES,''rtl')''pfix'" $ ! $ ! ---------------------------------------------------------------- $ ! $ ! For VMS 4.7 and VAX C v2.4 $ ! ("Compiler abort - virtual memory limits exceeded" if attempt $ ! to include all applicable terminals, but otherwise builds OK. $ ! Runtime problem: an exit handler error, also w/ gcc build; $ ! a VAXCRTL atexit bug?) $ ! $ ! Note: VAX uses D_FLOAT, maximum exponent ca 10e +/- 38; $ ! will cause problems with some of the demos $ ! $ !$ CFLAGS = "/NOOP/DEFINE=(HAVE_GETCWD, HAVE_SLEEP, "- $ ! +"SHORT_TERMLIST, NO_GIH,PIPES, ''rtl')" $ !$ ! $ ! $ !----------------------------------------------------------------- $ ! $ ! This will build with gcc v1.42 on VMS 4.7 $ ! (no virtual memory limit problem) $ ! $ ! gcc v1.42 string.h can prefix str routines w/ gnu_ (ifdef GCC_STRINGS) $ ! but the routines in GCCLIB are not prefixed w/ gcc_ :-( $ ! link with GCCLIB, then ignore the link warnings about multiple $ ! definitions of STR... in C$STRINGS $ ! $ ! GCC v1.42 has a locale.h, but neither gcc nor VMS v4.7 VAXCRTL has $ ! the setlocale function $ ! $ ! $ ! Note: _assert.c defines assert_gcc, if ndef NDEBUG, but $ ! cgm.trm undefines NDEBUG, so we always compile/link _assert.c $ ! $ !$ CFLAGS = "/NOOP/DEFINE=(''x11', HAVE_GETCWD,"- $ ! +" HAVE_SLEEP, NO_GIH, PIPES, ''rtl')" $ ! $ !----------------------------------------------------------------- $ VAXC = 0 $ GNUC = 0 $ DECC = 0 $ MMS = 0 $ MMK = 0 $ MAK = 0 $ COM = 0 $ DECC$CRTL = 0 $ READLINE = 0 $ USE_MOUSE = 0 $ ! $ IF (P1 .NES. "") THEN 'P1' = 1 $ IF (P2 .NES. "") THEN 'P2' = 1 $ IF (P3 .NES. "") THEN 'P3' = 1 $ IF (P4 .NES. "") THEN 'P4' = 1 $ IF (P5 .NES. "") THEN 'P5' = 1 $ IF (P6 .NES. "") THEN 'P6' = 1 $ IF (P7 .NES. "") THEN 'P7' = 1 $ IF (P8 .NES. "") THEN 'P8' = 1 $ ! $ ! Get compiler. I first check if the compiler was specified on the command $ ! line. If it wasn't, I check for what compiler is on the system. If $ ! there are several options, I use DECC, then GNUC, then VAXC. $ ! $ COMPILER = "" $ IF (VAXC) THEN COMPILER = "VAXC" $ IF (GNUC) THEN COMPILER = "GNUC" $ IF (DECC) THEN COMPILER = "DECC" $ IF (COMPILER .NES. "") THEN GOTO HAVECOMPILER $ VAXC = 1 $ GNUC = F$TRNLNM("GNU_CC") .NES. "" $ DECC = F$SEARCH("SYS$SYSTEM:DECC$COMPILER.EXE") .NES. "" $ IF (VAXC) THEN COMPILER = "VAXC" $ IF (GNUC) THEN COMPILER = "GNUC" $ IF (DECC) THEN COMPILER = "DECC" $HAVECOMPILER: $ ! $ ! Get the make tool. I first check if the tool was specified on the command $ ! line. If it wasn't, I check for what tool is on the system. If there are $ ! several options, I use MMS, then MMK, then MAKE, then the command file. $ ! $ MAKETOOL = "" $ IF (COM) THEN MAKETOOL = "COM" $ IF (MAK) THEN MAKETOOL = "MAKE" $ IF (MMK) THEN MAKETOOL = "MMK" $ IF (MMS) THEN MAKETOOL = "MMS" $ IF (MAKETOOL .NES. "") THEN GOTO HAVEMAKETOOL $ COM = 1 $ MAK = F$TYPE(MAKE) .NES. "" $ MMK = F$TYPE(MMK) .NES. "" $ MMS = F$SEARCH("SYS$SYSTEM:MMS.EXE") .NES. "" $ IF (COM) THEN MAKETOOL = "COM" $ IF (MAK) THEN MAKETOOL = "MAKE" $ IF (MMK) THEN MAKETOOL = "MMK" $ IF (MMS) THEN MAKETOOL = "MMS" $HAVEMAKETOOL: $ ! $ ! Check if the system has DECWindows. $ ! $ DECW = F$TRNLNM("DECW$INCLUDE") .NES. "" $ ! $ ! Get the architecture. $ ! $ ALPHA = F$GETSYI("HW_MODEL") .GE. 1024 $ ! $ ! Define symbols for things that vary with compiler: RTL (run time library), $ ! DPML (Digital Portable Math Library), and __CRTL_VER (DECC RTL version). $ ! $ DECC = 0 $ GNUC = 0 $ VAXC = 0 $ GOTO 'COMPILER' $ ! $DECC: $ DECC = 1 $ RTL = "DECCRTL" $ DPML = F$SEARCH("SYS$LIBRARY:DPML$SHR.EXE") .NES. "" $ IF (DECC$CRTL) THEN DEFINE/NOLOG DECC$CRTLMAP SYS$LIBRARY:DECC$CRTL.EXE $ EXTRALIB = "" $ IF (DECC$CRTL) THEN EXTRALIB = ",SYS$LIBRARY:DECC$CRTL.OLB/LIBRARY" $ CC/OBJECT=DEFINE_CRTL_VER.OBJ SYS$INPUT #include #include #include #include #ifndef __CRTL_VER # define __CRTL_VER __VMS_VER #endif main () { static $DESCRIPTOR(crtl,"__CRTL_VER"); struct dsc$descriptor_s val = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0}; static int tab = {1}; char str[10]; val.dsc$w_length = sprintf (str, "%d", __CRTL_VER); val.dsc$a_pointer = str; exit (lib$set_symbol (&crtl, &val, &tab)); } $ LINK/EXECUTABLE=DEFINE_CRTL_VER.EXE DEFINE_CRTL_VER.OBJ'EXTRALIB' $ RUN DEFINE_CRTL_VER.EXE $ DELETE/NOCONFIRM/NOLOG DEFINE_CRTL_VER.OBJ;*,DEFINE_CRTL_VER.EXE;* $ IF (DECC$CRTL) THEN DEASSIGN DECC$CRTLMAP $ __CRTL_VER = F$INTEGER(__CRTL_VER) $ GOTO COMPILERDONE $ ! $GNUC: $ GNUC = 1 $ IF (ALPHA) THEN RTL = "DECCRTL" $ IF (.NOT. ALPHA) THEN RTL = "VAXCRTL" $ IF (ALPHA) THEN DPML = F$SEARCH("SYS$LIBRARY:DPML$SHR.EXE") .NES. "" $ IF (.NOT. ALPHA) THEN DPML = 0 $ __CRTL_VER = 0 $ GOTO COMPILERDONE $ ! $VAXC: $ VAXC = 1 $ RTL = "VAXCRTL" $ DPML = 0 $ __CRTL_VER = 0 $ GOTO COMPILERDONE $ ! $COMPILERDONE: $ ! $ WRITE SYS$OUTPUT "Compiler: ", COMPILER $ WRITE SYS$OUTPUT "Make Tool: ", MAKETOOL $ WRITE SYS$OUTPUT "Run time library: ", RTL $ IF (__CRTL_VER .NE. 0) THEN WRITE SYS$OUTPUT "CRTL version: ", __CRTL_VER $ WRITE SYS$OUTPUT "Use DECC$CRTL: ", DECC$CRTL $ WRITE SYS$OUTPUT "Use readline: ", READLINE $ WRITE SYS$OUTPUT "Use mouse: ", USE_MOUSE $ ! $ ! Read in config.hin and write config.h. Define DCL symbols for all the $ ! symbols in config.hin, then write config.h, replacing the #undef with $ ! #define where necessary. Defining a symbol as 0 means to leave it #undef; $ ! defining it as 1 means to define it; defining it as a string means it $ ! should be defined as a string. $ ! $ const = 0 $ HAVE_STRINGIZE = DECC $ inline = 0 $ RETSIGTYPE = "void" $ size_t = 0 $ STAT_MACROS_BROKEN = 0 $ STDC_HEADERS = DECC $ X_DISPLAY_MISSING = 0 $ time_t = 0 $ HAVE_ATEXIT = DECC $ HAVE_BCOPY = DECC $ HAVE_BZERO = DECC $ HAVE_DOPRNT = 0 $ HAVE_ERF = DPML $ HAVE_ERFC = DPML $ HAVE_GAMMA = 0 $ HAVE_GETCWD = 1 $ HAVE_INDEX = DECC $ HAVE_LGAMMA = DECC .AND. ALPHA $ HAVE_MEMCPY = DECC $ HAVE_MEMMOVE = DECC $ HAVE_MEMSET = DECC $ HAVE_ON_EXIT = 0 $ HAVE_PCLOSE = __CRTL_VER .GE. 70000000 $ HAVE_POLL = 0 $ HAVE_POPEN = __CRTL_VER .GE. 70000000 $ HAVE_RINDEX = DECC $ HAVE_SELECT = 0 $ HAVE_SETVBUF = DECC $ HAVE_SLEEP = 1 $ HAVE_SNPRINTF = 0 $ HAVE_STPCPY = 0 $ HAVE_STRCASECMP = __CRTL_VER .GE. 70000000 $ HAVE_STRCHR = DECC $ HAVE_STRCSPN = DECC $ HAVE_STRDUP = __CRTL_VER .GE. 70000000 $ HAVE_STRERROR = DECC $ HAVE_STRICMP = 0 $ HAVE_STRNCASECMP = __CRTL_VER .GE. 70000000 $ HAVE_STRNICMP = 0 $ HAVE_STRRCHR = DECC $ HAVE_STRSTR = DECC $ HAVE_SYSINFO = 0 $ HAVE_TCGETATTR = 0 $ HAVE_VFPRINTF = 0 $ HAVE_ERRNO_H = DECC $ HAVE_FLOAT_H = DECC $ HAVE_LIBC_H = 0 $ HAVE_LIMITS_H = DECC $ HAVE_LOCALE_H = DECC $ HAVE_MALLOC_H = 0 $ HAVE_MATH_H = DECC $ HAVE_POLL_H = 0 $ HAVE_SGTTY_H = 0 $ HAVE_STDLIB_H = DECC $ HAVE_STRING_H = DECC $ HAVE_SYS_BSDTYPES_H = 0 $ HAVE_SYS_IOCTL_H = DECC $ HAVE_SYS_PARAM_H = 0 $ HAVE_SYS_SELECT_H = 0 $ HAVE_SYS_SOCKET_H = DECC $ HAVE_SYS_STAT_H = DECC $ HAVE_SYS_SYSTEMINFO_H = 0 $ HAVE_SYS_TIME_H = DECC $ HAVE_SYS_TIMEB_H = DECC $ HAVE_SYS_TYPES_H = DECC $ HAVE_SYS_UTSNAME_H = __CRTL_VER .GE. 70000000 $ HAVE_TERMIOS_H = 0 $ HAVE_TIME_H = DECC $ HAVE_UNISTD_H = DECC $ HAVE_VALUES_H = 0 $ HAVE_LIBM = DECC $ PACKAGE = 0 $ VERSION = 0 $ PROTOTYPES = DECC $ X11 = DECW $ GNUPLOT_X11 = 0 $ MSDOS = 0 $ DOS32 = 0 $ DJSVGA = 0 $ GRX21 = 0 $ EXTERN_ERRNO = 0 $ PIPES = __CRTL_VER .LT. 70000000 $ SELECT_TYPE_ARG1 = 0 $ SELECT_TYPE_ARG234 = 0 $ SELECT_TYPE_ARG5 = 0 $ LINUXVGA = 0 $ HAVE_LIBREADLINE = 0 $ GNUPLOT_HISTORY = 0 $ ! READLINE = 0 ! READLINE is defined above $ HAVE_LIBGD = 0 $ HAVE_LIBPNG = 0 $ CGI = 0 $ SUN = 0 $ NOCWDRC = 0 $ THIN_PLATE_SPLINES_GRID = 0 $ COLUMN_HELP = 0 $ ! USE_MOUSE = 0 ! USE_MOUSE is defined above $ ! $ OPEN/READ IN CONFIG.HIN $ OPEN/WRITE OUT CONFIG.H $CONFIGLOOP: $ READ/END=CONFIGDONE IN REC $ IF (F$ELEMENT(0," ",REC) .NES. "#undef") THEN GOTO WRITELINE $ SYM = F$ELEMENT(1," ",REC) $ IF (F$TYPE('SYM') .EQS. "") THEN GOTO NOSYMBOL $ VAL = 'SYM' $ IF (F$TYPE(VAL) .EQS. "STRING" .OR. VAL .NE. 0) THEN - REC = "#define " + SYM + " " + F$STRING(VAL) $ GOTO WRITELINE $NOSYMBOL: $ WRITE SYS$OUTPUT "No DCL symbol for ", REC $WRITELINE: $ WRITE OUT REC $ GOTO CONFIGLOOP $CONFIGDONE: $ CLOSE IN $ CLOSE OUT $ ! $ ! Get a list of files from [.src]makefile.all. Skip lines until I find $ ! COREOBJS =, then read and extract the file names until I find a line $ ! that does not end in \. $ ! $ OPEN/READ IN [.SRC]MAKEFILE.ALL $FILELOOP1: $ READ/END=DONE IN REC $ IF (F$EXTRACT(0,8,REC) .NES. "COREOBJS") THEN GOTO FILELOOP1 $ REC = REC - "COREOBJS" - "=" $ REC = REC - ".$(O)" - ".$(O)" - ".$(O)" - ".$(O)" - ".$(O)" - ".$(O)" $ COREOBJS = F$EDIT (REC-"\", "TRIM,COMPRESS") $ IF (F$ELEMENT(1,"\",REC) .EQS. "\") THEN GOTO FILELOOPDONE $FILELOOP2: $ READ/END=DONE IN REC $ REC = REC - ".$(O)" - ".$(O)" - ".$(O)" - ".$(O)" - ".$(O)" - ".$(O)" $ COREOBJS = COREOBJS + " " + F$EDIT (REC-"\", "TRIM,COMPRESS") $ IF (F$ELEMENT(1,"\",REC) .NES. "\") THEN GOTO FILELOOP2 $FILELOOPDONE: $ CLOSE IN $ IF (.NOT. READLINE) THEN COREOBJS = COREOBJS - "readline " - " readline" $ ! $ ! List of terminal files; all are in [.term] and have an extension of .trm. $ ! $ CORETERM = "aed cgi dumb dxf dxy eepic epson fig hp26 hp2648 hpgl hpljii " - + "imagen kyo latex pbm pc post qms regis sun t410x tek " - + "unixpc v384 x11" $ OTHERTERM = "[-.term]impcodes.h [-.term]object.h gplt_x11.c" $ ! $ ! Define CFLAGS. $ ! $ CFLAGS = "/DEFINE=(NO_GIH,HAVE_CONFIG_H,''RTL')/INCLUDE=[-]" $ IF (DECC) THEN CFLAGS = CFLAGS + "/PREFIX=ALL" $ ! $ ! Write the make file. $ ! $ GOTO 'MAKETOOL' $MMS: $MMK: $ OPEN/WRITE MAKE [.SRC]DESCRIP.MMS $ GOTO WRITEMAKE $MAK: $ OPEN/WRITE MAKE [.SRC]MAKEFILE. $ GOTO WRITEMAKE $COM: $ OPEN/WRITE MAKE [.SRC]BUILD.COM $ GOTO WRITECOM $MAKEFILEDONE: $ CLOSE MAKE $ ! $ ! Write the option files $ ! $ OPEN/WRITE OPT [.SRC]GNUPLOT.OPT $ N = 0 $OPTLOOP: $ FILE = F$ELEMENT (N, " ", COREOBJS) $ IF (FILE .EQS. " ") THEN GOTO OPTDONE $ WRITE OPT FILE, ".obj" $ N = N + 1 $ GOTO OPTLOOP $OPTDONE: $ WRITE OPT "version.obj" $ CLOSE OPT $ IF (RTL .EQS. "DECCRTL") THEN GOTO NOVAXCOPT $ OPEN/WRITE OPT [.SRC]VAXC.OPT $ WRITE OPT "sys$library:vaxcrtl.exe/share" $ CLOSE OPT $NOVAXCOPT: $ IF (.NOT. DECW) THEN GOTO NODECW $ OPEN/WRITE OPT [.SRC]X11.OPT $ WRITE OPT "sys$library:decw$xlibshr.exe/share" $ CLOSE OPT $NODECW: $ EXIT $ ! $WRITEMAKE: $ WRITE MAKE "O = obj" $ WRITE MAKE "X = exe" $ IF (VAXC) THEN WRITE MAKE "CC = CC" $ IF (VAXC) THEN WRITE MAKE "EXTRALIB =" $ IF (GNUC) THEN WRITE MAKE "CC = GCC/NOCASE" $ IF (GNUC) THEN WRITE MAKE "CRTL_SHARE =" $ IF (GNUC) THEN WRITE MAKE "EXTRALIB = ,GNU_CC:[000000]GCCLIB/LIB" $ IF (DECC) THEN WRITE MAKE "CC = CC" $ IF (DECC .AND. .NOT. DECC$CRTL) THEN WRITE MAKE "EXTRALIB =" $ IF (DECC .AND. DECC$CRTL) THEN - WRITE MAKE "EXTRALIB = ,SYS$LIBRARY:DECC$CRTL.OLB/LIBRARY" $ IF (RTL .EQS. "VAXCRTL") THEN - WRITE MAKE "CRTL_SHARE = ,SYS$DISK:[]VAXC.OPT/OPT" $ IF (RTL .NES. "VAXCRTL") THEN WRITE MAKE "CRTL_SHARE =" $ WRITE MAKE "CFLAGS = ", CFLAGS $ WRITE MAKE "TERMFLAGS = /INCLUDE=([-],[-.TERM])" $ WRITE MAKE "" $ WRITE MAKE "OBJS = \" $ N = 0 $WRITEMAKE_L1: $ FILE = F$ELEMENT (N, " ", COREOBJS) $ IF (FILE .EQS. " ") THEN GOTO WRITEMAKE_D1 $ WRITE MAKE " ", FILE, ".$(O) \" $ N = N + 1 $ GOTO WRITEMAKE_L1 $WRITEMAKE_D1: $ WRITE MAKE " version.$(O) vms.$(O)" $ WRITE MAKE "" $ WRITE MAKE "TERM = \" $ N = 0 $WRITEMAKE_L2: $ FILE = F$ELEMENT (N, " ", CORETERM) $ IF (FILE .EQS. " ") THEN GOTO WRITEMAKE_D2 $ WRITE MAKE " [-.term]", FILE, ".trm \" $ N = N + 1 $ GOTO WRITEMAKE_L2 $WRITEMAKE_D2: $ WRITE MAKE " ", OTHERTERM $ WRITE MAKE "" $ ALL = "" $ IF (DECC$CRTL) THEN ALL = ALL + " logicals" $ ALL = ALL + " gnuplot.$(X)" $ IF (DECW) THEN ALL = ALL + " gnuplot_x11.$(X)" $ ALL = ALL + " gnuplot.hlp gnuplot.hlb \" $ WRITE MAKE "all : ", ALL $ WRITE MAKE " [-.demo]binary1. [-.demo]binary2. [-.demo]binary3." $ WRITE MAKE " @ ! a no-op to suppress a MMS warning" $ WRITE MAKE "" $ IF (DECC$CRTL) THEN WRITE MAKE "logicals :" $ IF (DECC$CRTL) THEN - WRITE MAKE " @ define/nolog decc$crtlmap sys$library:decc$crtl.exe" $ WRITE MAKE "" $ COPY SYS$INPUT: MAKE $ DECK gnuplot.$(X) : $(OBJS) link /executable=gnuplot.$(X) \ vms.$(O),gnuplot.opt/option$(EXTRALIB)$(CRTL_SHARE) gnuplot_x11.$(X) : gplt_x11.$(O) stdfn.$(O) link /executable=gnuplot_x11.$(X) \ gplt_x11.$(O),stdfn.$(O),x11.opt/option$(EXTRALIB)$(CRTL_SHARE) gplt_x11.$(O) : gplt_x11.c $(CC) $(CFLAGS) $(X11FLAGS) $< [-.demo]binary1. [-.demo]binary2. [-.demo]binary3. : bf_test.$(X) set default [-.demo] run [-.src]bf_test.$(X) set default [-.src] bf_test.$(X) : bf_test.$(O) binary.$(O) alloc.$(O) link /executable=bf_test.$(X) bf_test.$(O),binary.$(O),alloc.$(O) gnuplot.hlb : gnuplot.hlp library/create/help gnuplot.hlb gnuplot.hlp .IFDEF OLD_HLP gnuplot.hlp : doc2hlp.$(X) [-.docs]gnuplot.doc define/user sys$input [-.docs]gnuplot.doc define/user sys$output []gnuplot.hlp run doc2hlp.$(X) doc2hlp.$(X) : [-.docs]doc2hlp.c [-.docs]termdoc.c $(CC) /include=([-.docs],[],[-.term]) \ [-.docs]doc2hlp.c,[-.docs]termdoc.c link /executable=doc2hlp.$(X) doc2hlp.$(O),termdoc.$(O)$(CRTL_SHARE) .ELSE gnuplot.hlp : [-.docs]gnuplot.rnh RUNOFF $< /OUTPUT=$@ [-.docs]gnuplot.rnh : [-.docs]doc2rnh.$(X) [-.docs]gnuplot.doc MCR $< [-.docs]gnuplot.doc $@ [-.docs]doc2rnh.$(X) : [-.docs]doc2rnh.$(O) [-.docs]termdoc.$(O) link /executable=$@ $+ $(CRTL_SHARE) [-.docs]doc2rnh.$(O) [-.docs]termdoc.$(O) : [-.docs]termdoc.c ![-.docs]allterm.h $(CC) /object=$@ $(CFLAGS) /include=([],[-],[-.term]) $*.c .ENDIF term.$(O) : term.h term.c $(TERM) $(CC) $(CFLAGS) $(TERMFLAGS) term.c /object=term.$(O) $(OBJS) : plot.h command.$(O) help.$(O) misc.$(O) : help.h command.$(O) graphics.$(O) graph3d.$(O) misc.$(O) plot.$(O) set.$(O) show.$(O) term.O interpol.$(O) : setshow.h command.$(O) fit.$(O) matrix.$(O) : fit.h fit.$(O) matrix.$(O) : matrix.h bitmap.$(O) term.$(O) : bitmap.h clean : purge/log delete/log *.$(O);* delete/log *.$(X);* delete/log gnuplot.hlp;*,gnuplot.hlb;* delete/log [-.docs]*.$(O);*,*.$(X);*,gnuplot.rnh;* delete/log [-.demo]binary1.;*,binary2.;*,binary3.;* $EOD $ GOTO MAKEFILEDONE $ ! $WRITECOM: $ WRITE MAKE - "$ ! Command file to compile/link gnuplot, gnuplot_x11, and make gnuplot.hlb" $ WRITE MAKE "$ !" $ WRITE MAKE "$ on error then goto finish" $ WRITE MAKE "$ O = ""obj""" $ WRITE MAKE "$ X = ""exe""" $ IF (VAXC) THEN WRITE MAKE "$ CC = ""CC""" $ IF (VAXC) THEN WRITE MAKE "$ EXTRALIB = """ $ IF (GNUC) THEN WRITE MAKE "$ CC = ""GCC/NOCASE""" $ IF (GNUC) THEN WRITE MAKE "$ CRTL_SHARE = """ $ IF (GNUC) THEN WRITE MAKE "$ EXTRALIB = "",GNU_CC:[000000]GCCLIB/LIB""" $ IF (DECC) THEN WRITE MAKE "$ CC = ""CC""" $ IF (DECC .AND. .NOT. DECC$CRTL) THEN WRITE MAKE "$ EXTRALIB = """"" $ IF (DECC .AND. DECC$CRTL) THEN - WRITE MAKE "$ EXTRALIB = "",SYS$LIBRARY:DECC$CRTL.OLB/LIBRARY""" $ IF (RTL .EQS. "VAXCRTL") THEN - WRITE MAKE "$ CRTL_SHARE = "",SYS$DISK:[]VAXC.OPT/OPT""" $ IF (RTL .NES. "VAXCRTL") THEN WRITE MAKE "$ CRTL_SHARE = """"" $ WRITE MAKE "$ CFLAGS = ""''CFLAGS'""" $ WRITE MAKE "$ TERMFLAGS = ""/INCLUDE=([-],[-.TERM])""" $ IF (VAXC .AND. DECW) THEN WRITE MAKE "$ define/nolog x11 decw$include" $ IF (VAXC .AND. DECW) THEN WRITE MAKE "$ define/nolog sys sys$library" $ WRITE MAKE "$ set verify" $ IF (DECC$CRTL) THEN - WRITE MAKE "$ define/nolog decc$crtlmap sys$library:decc$crtl.exe" $ N = 0 $WRITECOM_L1: $ FILE = F$ELEMENT (N, " ", COREOBJS) $ IF (FILE .EQS. " ") THEN GOTO WRITECOM_D1 $ IF (FILE .EQS. "term") THEN WRITE MAKE "$ cc 'CFLAGS' 'TERMFLAGS' ", FILE, ".c" $ IF (FILE .NES. "term") THEN WRITE MAKE "$ cc 'CFLAGS' ", FILE, ".c" $ N = N + 1 $ GOTO WRITECOM_L1 $WRITECOM_D1: $ WRITE MAKE "$ cc 'CFLAGS' version.c" $ WRITE MAKE "$ cc 'CFLAGS' vms.c" $ IF (GNUC) THEN WRITE MAKE "$ cc 'CFLAGS' GNU_CC_INCLUDE:[000000]_assert.c" $ WRITE MAKE "$ !" $ WRITE MAKE "$ link /executable=gnuplot.exe -" $ N = 0 $WRITECOM_L2: $ FILE = F$ELEMENT (N, " ", COREOBJS) $ IF (FILE .EQS. " ") THEN GOTO WRITECOM_D2 $ WRITE MAKE " ", FILE, ".obj, -" $ N = N + 1 $ GOTO WRITECOM_L2 $WRITECOM_D2: $ WRITE MAKE " version.obj,vms.obj'EXTRALIB' 'CTRL_SHARE'" $ WRITE MAKE "$ cc 'CFLAGS' bf_test.c" $ WRITE MAKE "$ link /executable=bf_test.exe -" $ WRITE MAKE " bf_test.obj,binary.obj,alloc.obj'EXTRALIB' 'CTRL_SHARE'" $ WRITE MAKE "$ cd [-.demo]" $ WRITE MAKE "$ run [-.src]bf_test.exe" $ WRITE MAKE "$ cd [-.src]" $ IF (DECW) THEN WRITE MAKE "$ cc 'CFLAGS' gplt_x11.c" $ IF (DECW) THEN WRITE MAKE "$ cc 'CFLAGS' stdfn.c" $ IF (DECW) THEN WRITE MAKE "$ link /executable=gnuplot_x11.exe -" $ IF (DECW) THEN WRITE MAKE " gplt_x11.obj,stdfn.obj -" $ IF (DECW) THEN WRITE MAKE " 'EXTRALIB' 'CTRL_SHARE',x11.opt/option" $ COPY SYS$INPUT: MAKE $ DECK $ set def [-.docs] $ if f$locate("ALL_TERM_DOC",CFLAGS).ne.f$length(CFLAGS) then - copy /concatenate [-.term]*.trm []allterm.h $ cc 'CFLAGS' /OBJ=doc2rnh.obj/include=([],[-],[-.term],[-.src]) doc2rnh.c $ cc 'CFLAGS' /OBJ=termdoc.obj/include=([],[-],[-.term],[-.src]) termdoc.c $ SET DEF [-.src] ! CTRL_SHARE is defined as being in [] $ link [-.docs]doc2rnh.obj,termdoc.obj /exe=[-.docs]doc2rnh 'extralib''CTRL_SHARE' $ doc2rnh := $sys$disk:[-.docs]doc2rnh $ doc2rnh [-.docs]gnuplot.doc [-.docs]gnuplot.rnh $ RUNOFF [-.docs]gnuplot.rnh $ library/create/help sys$disk:[]gnuplot.hlb gnuplot.hlp $! $FINISH: $EOD $ WRITE MAKE "$ set noverify" $ IF (VAXC .AND. DECW) THEN WRITE MAKE "$ deassign x11" $ IF (VAXC .AND. DECW) THEN WRITE MAKE "$ deassign sys" $ WRITE MAKE "$ exit" $ GOTO MAKEFILEDONE gnuplot-4.6.4/README.1ST0000644000471100001440000000316511723732553011434 0ustar To install from sources: ======================== Installation instructions are found in the file INSTALL in this directory after going through this file. In a very small nutshell: - Under Unix, use configure and make If your source is from the CVS repository rather from a release package, the order of commands is ./prepare; ./configure; make - Other platforms, copy the relevant makefile from config/ to src, cd to src and make. See config/README for what each of those files is for. Note: some of those files haven't been updated in ages, so they may no longer be usable. IMPORTANT NOTE ON PDF SUPPORT =========================================== Direct PDF support in gnuplot is provided by an external library. Two options are currently possible. It is possible to have both PDF terminal drivers in the same gnuplot executable. The newer "pdfcairo" terminal uses the pango and cairo libraries. This driver will be built if the configure script detects suitable versions of cairo and pango on your machine. The older "pdf" terminal uses a library provided by PDFlib GmbH, Germany ( http://www.pdflib.de/ ). This library is available under two strictly separate licencing models. Depending on the environment you use gnuplot in, you may have to purchase a commercial licence for PDFlib even though gnuplot itself is free software. There's a special version of PDFlib, called ``PDFlib Lite'', which is freely redistrutable, but programs linked to that are strictly for non-commercial usage only. *You* are liable for whatever violations of this licence occur in a gnuplot binary built by you. gnuplot-4.6.4/share/0000755000471100001440000000000012223340020011217 5ustar gnuplot-4.6.4/share/LaTeX/0000755000471100001440000000000012223340020012174 5ustar gnuplot-4.6.4/share/LaTeX/t-gnuplot-lua-tikz.tex0000644000471100001440000000062712223337706016433 0ustar %% %% ConTeXt wrapper for gnuplot-tikz style file %% \usemodule[tikz] \usetikzlibrary[arrows,patterns,plotmarks,backgrounds] \edef\tikzatcode{\the\catcode`\@} \edef\tikzbarcode{\the\catcode`\|} \edef\tikzexclaimcode{\the\catcode`\!} \catcode`\@=11 \catcode`\|=12 \catcode`\!=12 \input gnuplot-lua-tikz-common.tex \catcode`\@=\tikzatcode \catcode`\|=\tikzbarcode \catcode`\!=\tikzexclaimcode \endinput gnuplot-4.6.4/share/LaTeX/gnuplot-lua-tikz-common.tex0000644000471100001440000003271012223337706017456 0ustar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Common style file for TeX, LaTeX and ConTeXt %% %% It is associated with the 'gnuplot.lua' script, and usually generated %% automatically. So take care whenever you make any changes! %% % check for the correct TikZ version \def\gpchecktikzversion#1.#2\relax{% \ifnum#1<2% \PackageError{gnuplot-lua-tikz}{PGF/TikZ version >= 2.0 is required, but version \pgfversion\space was found}{}% \fi} \expandafter\gpchecktikzversion\pgfversion\relax % FIXME: is there a more elegant way to determine the output format? \def\pgfsysdriver@a{pgfsys-dvi.def} % ps \def\pgfsysdriver@b{pgfsys-dvipdfm.def} % pdf \def\pgfsysdriver@c{pgfsys-dvipdfmx.def} % pdf \def\pgfsysdriver@d{pgfsys-dvips.def} % ps \def\pgfsysdriver@e{pgfsys-pdftex.def} % pdf \def\pgfsysdriver@f{pgfsys-tex4ht.def} % html \def\pgfsysdriver@g{pgfsys-textures.def} % ps \def\pgfsysdriver@h{pgfsys-vtex.def} % ps \def\pgfsysdriver@i{pgfsys-xetex.def} % pdf \newif\ifgppdfout\gppdfoutfalse \newif\ifgppsout\gppsoutfalse \ifx\pgfsysdriver\pgfsysdriver@a \gppsouttrue \else\ifx\pgfsysdriver\pgfsysdriver@b \gppdfouttrue \else\ifx\pgfsysdriver\pgfsysdriver@c \gppdfouttrue \else\ifx\pgfsysdriver\pgfsysdriver@d \gppsouttrue \else\ifx\pgfsysdriver\pgfsysdriver@e \gppdfouttrue \else\ifx\pgfsysdriver\pgfsysdriver@f % tex4ht \else\ifx\pgfsysdriver\pgfsysdriver@g \gppsouttrue \else\ifx\pgfsysdriver\pgfsysdriver@h \gppsouttrue \else\ifx\pgfsysdriver\pgfsysdriver@i \gppdfouttrue \fi\fi\fi\fi\fi\fi\fi\fi\fi % uncomment the following lines to make font values "appendable" % and if you are really sure about that ;-) % \pgfkeyslet{/tikz/font/.@cmd}{\undefined} % \tikzset{font/.initial={}} % \def\tikz@textfont{\pgfkeysvalueof{/tikz/font}} % % image related stuff % \def\gp@rawimage@pdf#1#2#3#4#5#6{% \def\gp@tempa{cmyk}% \def\gp@tempb{#1}% \ifx\gp@tempa\gp@tempb% \def\gp@temp{/CMYK}% \else% \def\gp@temp{/RGB}% \fi% \pgf@sys@bp{#4}\pgfsysprotocol@literalbuffered{0 0}\pgf@sys@bp{#5}% \pgfsysprotocol@literalbuffered{0 0 cm}% \pgfsysprotocol@literalbuffered{BI /W #2 /H #3 /CS \gp@temp}% \pgfsysprotocol@literalbuffered{/BPC 8 /F /AHx ID}% \pgfsysprotocol@literal{#6 > EI}% } \def\gp@rawimage@ps#1#2#3#4#5#6{% \def\gp@tempa{cmyk}% \def\gp@tempb{#1}% \ifx\gp@tempa\gp@tempb% \def\gp@temp{4}% \else% \def\gp@temp{3}% \fi% \pgfsysprotocol@literalbuffered{0 0 translate}% \pgf@sys@bp{#4}\pgf@sys@bp{#5}\pgfsysprotocol@literalbuffered{scale}% \pgfsysprotocol@literalbuffered{#2 #3 8 [#2 0 0 -#3 0 #3]}% \pgfsysprotocol@literalbuffered{currentfile /ASCIIHexDecode filter}% \pgfsysprotocol@literalbuffered{false \gp@temp\space colorimage}% \pgfsysprotocol@literal{#6 >}% } \def\gp@rawimage@html#1#2#3#4#5#6{% % FIXME: print a warning message here } \ifgppdfout \def\gp@rawimage{\gp@rawimage@pdf} \else \ifgppsout \def\gp@rawimage{\gp@rawimage@ps} \else \def\gp@rawimage{\gp@rawimage@html} \fi \fi \def\gploadimage#1#2#3#4#5{% \pgftext[left,bottom,x=#1cm,y=#2cm] {\pgfimage[interpolate=false,width=#3cm,height=#4cm]{#5}};% } \def\gp@set@size#1{% \def\gp@image@size{#1}% } \def\gp@rawimage@#1#2#3#4#5#6#7#8{ \tikz@scan@one@point\gp@set@size(#6,#7)\relax% \tikz@scan@one@point\pgftransformshift(#2,#3)\relax% \pgftext {% \pgfsys@beginpurepicture% \gp@image@size% fill \pgf@x and \pgf@y \gp@rawimage{#1}{#4}{#5}{\pgf@x}{\pgf@y}{#8}% \pgfsys@endpurepicture% }% } %% \gprawimage{color model}{xcoord}{ycoord}{# of xpixel}{# of ypixel}{xsize}{ysize}{rgb/cmyk hex data RRGGBB/CCMMYYKK ...}{file name} %% color model is 'cmyk' or 'rgb' (default) \def\gprawimage#1#2#3#4#5#6#7#8#9{% \ifx &% \gp@rawimage@{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8} \else \ifgppsout \gp@rawimage@{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8} \else \gploadimage{#2}{#3}{#6}{#7}{#9} \fi \fi } % % gnuplottex comapatibility % (see http://www.ctan.org/tex-archive/help/Catalogue/entries/gnuplottex.html) % \def\gnuplottexextension@lua{\string tex} \def\gnuplottexextension@tikz{\string tex} % % gnuplot variables getter and setter % \def\gpsetvar#1#2{% \expandafter\xdef\csname gp@var@#1\endcsname{#2} } \def\gpgetvar#1{% \csname gp@var@#1\endcsname % } % % some wrapper code % % short for a filled path \def\gpfill#1{\path[line width=0.1\gpbaselw,draw,fill,#1]} % short for changing the line width \def\gpsetlinewidth#1{\pgfsetlinewidth{#1\gpbaselw}} % short for changing the line type \def\gpsetlinetype#1{\tikzset{gp path/.style={#1,#1 add}}} % short for changing the point size \def\gpsetpointsize#1{\tikzset{gp point/.style={mark size=#1\gpbasems}}} % wrapper for color settings \def\gpcolor#1{\tikzset{global #1}} \tikzset{rgb color/.code={\pgfutil@definecolor{.}{rgb}{#1}\tikzset{color=.}}} \tikzset{global rgb color/.code={\pgfutil@definecolor{.}{rgb}{#1}\pgfutil@color{.}}} \tikzset{global color/.code={\pgfutil@color{#1}}} % prevent plot mark distortions due to changes in the PGF transformation matrix % use `\gpscalepointstrue' and `\gpscalepointsfalse' for enabling and disabling % point scaling % \newif\ifgpscalepoints \tikzset{gp shift only/.style={% \ifgpscalepoints\else shift only\fi% }} \def\gppoint#1#2{% \path[solid] plot[only marks,gp point,mark options={gp shift only},#1] coordinates {#2};% } % % char size calculation, that might be used with gnuplottex % % Example code (needs gnuplottex.sty): % % % calculate the char size when the "gnuplot" style is used % \tikzset{gnuplot/.append style={execute at begin picture=\gpcalccharsize}} % % \tikzset{gnuplot/.append style={font=\ttfamily\footnotesize}} % % \begin{tikzpicture}[gnuplot] % \begin{gnuplot}[terminal=lua,% % terminaloptions={tikz solid nopic charsize \the\gphcharsize,\the\gpvcharsize}] % test % \end{gnuplot} % \end{tikzpicture} % %%% % The `\gpcalccharsize' command fills the lengths \gpvcharsize and \gphcharsize with % the values of the current default font used within nodes and is meant to be called % within a tikzpicture environment. % \newdimen\gpvcharsize \newdimen\gphcharsize \def\gpcalccharsize{% \pgfinterruptboundingbox% \pgfsys@begininvisible% \node at (0,0) {% \global\gphcharsize=1.05\fontcharwd\font`0% \global\gpvcharsize=1.05\fontcharht\font`0% \global\advance\gpvcharsize by 1.05\fontchardp\font`g% };% \pgfsys@endinvisible% \endpgfinterruptboundingbox% } % % define a rectangular node in tikz e.g. for the plot area % % #1 node name % #2 coordinate of "south west" % #3 coordinate of "north east" % \def\gpdefrectangularnode#1#2#3{% \expandafter\gdef\csname pgf@sh@ns@#1\endcsname{rectangle} \expandafter\gdef\csname pgf@sh@np@#1\endcsname{% \def\southwest{#2}% \def\northeast{#3}% } \pgfgettransform\pgf@temp% % once it is defined, no more transformations will be applied, I hope \expandafter\xdef\csname pgf@sh@nt@#1\endcsname{\pgf@temp}% \expandafter\xdef\csname pgf@sh@pi@#1\endcsname{\pgfpictureid}% } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% You may want to adapt the following to fit your needs (in your %% individual style file and/or within your document). %% % % style for every plot % \tikzset{gnuplot/.style={% >=stealth',% line cap=round,% line join=round,% }} \tikzset{gp node left/.style={anchor=mid west,yshift=-.12ex}} \tikzset{gp node center/.style={anchor=mid,yshift=-.12ex}} \tikzset{gp node right/.style={anchor=mid east,yshift=-.12ex}} % basic plot mark size (points) \newdimen\gpbasems \gpbasems=.4pt % basic linewidth \newdimen\gpbaselw \gpbaselw=.4pt % this is the default color for pattern backgrounds \colorlet{gpbgfillcolor}{white} % set background color and fill color \def\gpsetbgcolor#1{% \pgfutil@definecolor{gpbgfillcolor}{rgb}{#1}% \tikzset{tight background,background rectangle/.style={fill=gpbgfillcolor},show background rectangle}% } % this should reverse the normal text node presets, for the % later referencing as described below \tikzset{gp refnode/.style={coordinate,yshift=.12ex}} % to add an empty label with the referenceable name "my node" % to the plot, just add the following line to your gnuplot % file: % % set label "" at 1,1 font ",gp refnode,name=my node" % % enlargement of the bounding box in standalone mode (only used by LaTeX/ConTeXt) \def\gpbboxborder{0mm} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% The following TikZ-styles are derived from the 'pgf.styles.*' tables %% in the Lua script. %% To change the number of used styles you should change them there and %% regenerate this style file. %% % arrow styles settings \tikzset{gp arrow 1/.style={>=latex}} \tikzset{gp arrow 2/.style={>=angle 90}} \tikzset{gp arrow 3/.style={>=angle 60}} \tikzset{gp arrow 4/.style={>=angle 45}} \tikzset{gp arrow 5/.style={>=o}} \tikzset{gp arrow 6/.style={>=*}} \tikzset{gp arrow 7/.style={>=diamond}} \tikzset{gp arrow 8/.style={>=open diamond}} \tikzset{gp arrow 9/.style={>={]}}} \tikzset{gp arrow 10/.style={>={[}}} \tikzset{gp arrow 11/.style={>=)}} \tikzset{gp arrow 12/.style={>=(}} % plotmark settings \tikzset{gp mark 0/.style={mark size=.5\pgflinewidth,mark=*}} \tikzset{gp mark 1/.style={mark=+}} \tikzset{gp mark 2/.style={mark=x}} \tikzset{gp mark 3/.style={mark=star}} \tikzset{gp mark 4/.style={mark=square}} \tikzset{gp mark 5/.style={mark=square*}} \tikzset{gp mark 6/.style={mark=o}} \tikzset{gp mark 7/.style={mark=*}} \tikzset{gp mark 8/.style={mark=triangle}} \tikzset{gp mark 9/.style={mark=triangle*}} \tikzset{gp mark 10/.style={mark=triangle,every mark/.append style={rotate=180}}} \tikzset{gp mark 11/.style={mark=triangle*,every mark/.append style={rotate=180}}} \tikzset{gp mark 12/.style={mark=diamond}} \tikzset{gp mark 13/.style={mark=diamond*}} \tikzset{gp mark 14/.style={mark=otimes}} \tikzset{gp mark 15/.style={mark=oplus}} % pattern settings \tikzset{gp pattern 0/.style={white}} \tikzset{gp pattern 1/.style={pattern=north east lines}} \tikzset{gp pattern 2/.style={pattern=north west lines}} \tikzset{gp pattern 3/.style={pattern=crosshatch}} \tikzset{gp pattern 4/.style={pattern=grid}} \tikzset{gp pattern 5/.style={pattern=vertical lines}} \tikzset{gp pattern 6/.style={pattern=horizontal lines}} \tikzset{gp pattern 7/.style={pattern=dots}} \tikzset{gp pattern 8/.style={pattern=crosshatch dots}} \tikzset{gp pattern 9/.style={pattern=fivepointed stars}} \tikzset{gp pattern 10/.style={pattern=sixpointed stars}} \tikzset{gp pattern 11/.style={pattern=bricks}} % if the 'tikzplot' option is used the corresponding lines will be smoothed by default \tikzset{gp plot axes/.style=} \tikzset{gp plot border/.style=} \tikzset{gp plot 0/.style=smooth} \tikzset{gp plot 1/.style=smooth} \tikzset{gp plot 2/.style=smooth} \tikzset{gp plot 3/.style=smooth} \tikzset{gp plot 4/.style=smooth} \tikzset{gp plot 5/.style=smooth} \tikzset{gp plot 6/.style=smooth} \tikzset{gp plot 7/.style=smooth} % linestyle settings \tikzset{gp lt axes/.style=dotted} \tikzset{gp lt border/.style=solid} % linestyle "addon" settings for overwriting a default linestyle within the % TeX document via eg. \tikzset{gp lt plot 1 add/.style={fill=black,draw=none}} etc. \tikzset{gp lt axes add/.style={}} \tikzset{gp lt border add/.style={}} \tikzset{gp lt plot 0 add/.style={}} \tikzset{gp lt plot 1 add/.style={}} \tikzset{gp lt plot 2 add/.style={}} \tikzset{gp lt plot 3 add/.style={}} \tikzset{gp lt plot 4 add/.style={}} \tikzset{gp lt plot 5 add/.style={}} \tikzset{gp lt plot 6 add/.style={}} \tikzset{gp lt plot 7 add/.style={}} % linestyle color settings \colorlet{gp lt color axes}{black!30} \colorlet{gp lt color border}{black} % command for switching to dashed lines \def\gpdashedlines{% \tikzset{gp lt plot 0/.style={solid}} \tikzset{gp lt plot 1/.style={dashed}} \tikzset{gp lt plot 2/.style={dash pattern=on 1.5pt off 2.25pt}} \tikzset{gp lt plot 3/.style={dash pattern=on \pgflinewidth off 1.125}} \tikzset{gp lt plot 4/.style={dash pattern=on 4.5pt off 1.5pt on \pgflinewidth off 1.5pt}} \tikzset{gp lt plot 5/.style={dash pattern=on 2.25pt off 2.25pt on \pgflinewidth off 2.25pt}} \tikzset{gp lt plot 6/.style={dash pattern=on 1.5pt off 1.5pt on 1.5pt off 4.5pt}} \tikzset{gp lt plot 7/.style={dash pattern=on \pgflinewidth off 1.5pt on 4.5pt off 1.5pt on \pgflinewidth off 1.5pt}} } % command for switching to colored lines \def\gpcoloredlines{% \colorlet{gp lt color 0}{red}% \colorlet{gp lt color 1}{green}% \colorlet{gp lt color 2}{blue}% \colorlet{gp lt color 3}{magenta}% \colorlet{gp lt color 4}{cyan}% \colorlet{gp lt color 5}{yellow}% \colorlet{gp lt color 6}{orange}% \colorlet{gp lt color 7}{purple}% } % command for switching to solid lines \def\gpsolidlines{% \tikzset{gp lt plot 0/.style=solid}% \tikzset{gp lt plot 1/.style=solid}% \tikzset{gp lt plot 2/.style=solid}% \tikzset{gp lt plot 3/.style=solid}% \tikzset{gp lt plot 4/.style=solid}% \tikzset{gp lt plot 5/.style=solid}% \tikzset{gp lt plot 6/.style=solid}% \tikzset{gp lt plot 7/.style=solid}% } % command for switching to monochrome (black) lines \def\gpmonochromelines{% \colorlet{gp lt color 0}{black}% \colorlet{gp lt color 1}{black}% \colorlet{gp lt color 2}{black}% \colorlet{gp lt color 3}{black}% \colorlet{gp lt color 4}{black}% \colorlet{gp lt color 5}{black}% \colorlet{gp lt color 6}{black}% \colorlet{gp lt color 7}{black}% } % % some initialisations % % by default all lines will be colored and dashed \gpcoloredlines \gpdashedlines \gpsetpointsize{4} \gpsetlinetype{gp lt solid} \gpscalepointsfalse \endinput gnuplot-4.6.4/share/LaTeX/gnuplot-lua-tikz.tex0000644000471100001440000000037212223337706016167 0ustar %% %% plain TeX wrapper for gnuplot-tikz style file %% \input tikz.tex \usetikzlibrary{arrows,patterns,plotmarks,backgrounds} \edef\tikzatcode{\the\catcode`\@} \catcode`\@=11 \input gnuplot-lua-tikz-common.tex \catcode`\@=\tikzatcode \endinput gnuplot-4.6.4/share/LaTeX/Makefile.in0000644000471100001440000003425612223337636014276 0ustar # Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = share/LaTeX DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alpha.m4 \ $(top_srcdir)/m4/apple.m4 $(top_srcdir)/m4/beos.m4 \ $(top_srcdir)/m4/msdos.m4 $(top_srcdir)/m4/next.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(texdir)" DATA = $(tex_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROEPS_CFLAGS = @CAIROEPS_CFLAGS@ CAIROEPS_LIBS = @CAIROEPS_LIBS@ CAIROPANGO_CFLAGS = @CAIROPANGO_CFLAGS@ CAIROPANGO_LIBS = @CAIROPANGO_LIBS@ CAIROPDF_CFLAGS = @CAIROPDF_CFLAGS@ CAIROPDF_LIBS = @CAIROPDF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIST_CONTACT = @DIST_CONTACT@ DVIPS = @DVIPS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ GDLIB_CONFIG = @GDLIB_CONFIG@ GIHDIR = @GIHDIR@ GREP = @GREP@ GTK28_CFLAGS = @GTK28_CFLAGS@ GTK28_LIBS = @GTK28_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEXPAND = @KPSEXPAND@ LASERGNU = @LASERGNU@ LATEX = @LATEX@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARIES_FOR_X = @LIBRARIES_FOR_X@ LIBS = @LIBS@ LINUXSUID = @LINUXSUID@ LISPDIR = @LISPDIR@ LN_S = @LN_S@ LRELEASE = @LRELEASE@ LTLIBOBJS = @LTLIBOBJS@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGO_1_10_2_CFLAGS = @PANGO_1_10_2_CFLAGS@ PANGO_1_10_2_LIBS = @PANGO_1_10_2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PDFLIB_CONFIG = @PDFLIB_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ PLAINTEX = @PLAINTEX@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RCC = @RCC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMLIBS = @TERMLIBS@ TERMXLIBS = @TERMXLIBS@ TEXDIR = @TEXDIR@ TEXHASH = @TEXHASH@ TROFF = @TROFF@ TUTORIAL = @TUTORIAL@ UIC = @UIC@ VERSION = @VERSION@ VERSION_MAJOR = @VERSION_MAJOR@ WX_CONFIG = @WX_CONFIG@ WX_LIBS = @WX_LIBS@ X11_APPDEFAULTS_DIR = @X11_APPDEFAULTS_DIR@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_OBJC = @ac_ct_OBJC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign EXTRA_DIST = README ${tex_DATA} @BUILD_LUA_FALSE@build_lua = @BUILD_LUA_TRUE@build_lua = BUILD_LUA @BUILD_LUA_FALSE@lua_files = @BUILD_LUA_TRUE@lua_files = gnuplot-lua-tikz.sty gnuplot-lua-tikz-common.tex gnuplot-lua-tikz.tex t-gnuplot-lua-tikz.tex tex_DATA = gnuplot.cfg ${lua_files} texdir = @TEXDIR@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/LaTeX/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/LaTeX/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-texDATA: $(tex_DATA) @$(NORMAL_INSTALL) @list='$(tex_DATA)'; test -n "$(texdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(texdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(texdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(texdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(texdir)" || exit $$?; \ done uninstall-texDATA: @$(NORMAL_UNINSTALL) @list='$(tex_DATA)'; test -n "$(texdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(texdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(texdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-texDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-texDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-data-am install-strip uninstall-am .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-hook install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ install-texDATA installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-hook uninstall-texDATA ${lua_files}: test -z "$(build_lua)" || lua $(top_srcdir)/term/lua/gnuplot-tikz.lua style install-data-hook: test -n "$(DESTDIR)" || $(TEXHASH) uninstall-hook: test -n "$(DESTDIR)" || $(TEXHASH) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnuplot-4.6.4/share/LaTeX/README0000644000471100001440000000145711212127220013065 0ustar This directory contains files that are useful in conjunction with various TeX-based terminal types. The file 'gnuplot.cfg' is loaded by epslatex plots in 'standalone' mode if in the LaTeX search path. Feel free to edit 'gnuplot.cfg' and put it somewhere into the LaTeX search path (normally, '$TEXMFLOCAL/tex/latex/gnuplot', '$TEXMFHOME/tex/latex/gnuplot', or the current working directory). If your LaTeX distribution contains the programme 'kpsexpand', the Makefile installes 'gnuplot.cfg' into '$TEXMFLOCAL/tex/latex/gnuplot' and updates LaTeX's file database. Harald Harders 2005 The file 'gnuplot-lua-tikz.sty' is needed to process the *.tex files output by the lua/tikz terminal driver. It can be regenerated by running the gnupuplot-tikz.lua script: lua gnuplot-tikz.lua style Peter Hedwig 2009 gnuplot-4.6.4/share/LaTeX/gnuplot.cfg0000644000471100001440000000025510202373515014361 0ustar %% A configuration file for the epslatex terminal by Harald Harders. %% This file is part of Gnuplot. %% \usepackage[T1]{fontenc} \endinput %% %% End of file `gnuplot.cfg'. gnuplot-4.6.4/share/LaTeX/gnuplot-lua-tikz.sty0000644000471100001440000000045312223337706016206 0ustar %% %% LaTeX wrapper for gnuplot-tikz style file %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{gnuplot-lua-tikz}% [2012/02/07 (rev. 100) GNUPLOT Lua terminal style] \RequirePackage{tikz} \usetikzlibrary{arrows,patterns,plotmarks,backgrounds} \input gnuplot-lua-tikz-common.tex \endinput gnuplot-4.6.4/share/LaTeX/Makefile.am0000644000471100001440000000111411752300767014251 0ustar ## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign EXTRA_DIST = README ${tex_DATA} if BUILD_LUA build_lua = BUILD_LUA lua_files = gnuplot-lua-tikz.sty gnuplot-lua-tikz-common.tex gnuplot-lua-tikz.tex t-gnuplot-lua-tikz.tex else build_lua = lua_files = endif tex_DATA = gnuplot.cfg ${lua_files} texdir = @TEXDIR@ ${lua_files}: test -z "$(build_lua)" || lua $(top_srcdir)/term/lua/gnuplot-tikz.lua style install-data-hook: test -n "$(DESTDIR)" || $(TEXHASH) uninstall-hook: test -n "$(DESTDIR)" || $(TEXHASH) gnuplot-4.6.4/share/colors_podo.gp0000644000471100001440000000067311676667025014133 0ustar # Palette of colors selected to be easily distinguishable by # color-blind individuals with either protanopia or deuteranopia # Bang Wong [2011] Nature Methods 8, 441. set linetype 1 lc rgb "black" set linetype 2 lc rgb "#e69f00" set linetype 3 lc rgb "#56b4e9" set linetype 4 lc rgb "#009e73" set linetype 5 lc rgb "#f0e442" set linetype 6 lc rgb "#0072b2" set linetype 7 lc rgb "#d55e00" set linetype 8 lc rgb "#cc79a7" set linetype cycle 8 gnuplot-4.6.4/share/colors_mono.gp0000644000471100001440000000057411676667025014142 0ustar # # Provide a consistent set of four distinguishable # black line types. # NB: This does not work with "set term post mono" # set termoption dashed unset for [i=1:4] linetype i set linetype 4 lt 1 lw 2.5 lc rgb "black" set linetype 3 lt 3 lw 1 lc rgb "black" set linetype 2 lt 2 lw 1 lc rgb "black" set linetype 1 lt -1 lw 1 lc rgb "black" set linetype cycle 4 # set palette gray gnuplot-4.6.4/share/Gnuplot.app-defaults0000644000471100001440000000511710552340345015177 0ustar ! X resources for gnuplot x11 terminal driver ! More information available in the gnuplot documentation ! From inside gnuplot, try 'help set term x11' ! User interface settings gnuplot*exportselection: on gnuplot*fastrotate: on gnuplot*feedback: on ! gnuplot*ctrlq: off gnuplot*persist: off ! gnuplot*raise: on gnuplot*dashed: off ! Default font and font encoding ! gnuplot*font: verdana,11,bold ! gnuplot*encoding: iso8859-15 ! Default line colors ! gnuplot*background: white gnuplot*textColor: black gnuplot*borderColor: black gnuplot*axisColor: black gnuplot*line1Color: red gnuplot*line2Color: green gnuplot*line3Color: blue gnuplot*line4Color: magenta gnuplot*line5Color: cyan gnuplot*line6Color: sienna gnuplot*line7Color: orange gnuplot*line8Color: coral ! Default line widths gnuplot*axisWidth: 0 gnuplot*borderWidth: 2 gnuplot*line1Width: 1 gnuplot*line2Width: 1 gnuplot*line3Width: 1 gnuplot*line4Width: 1 gnuplot*line5Width: 1 gnuplot*line6Width: 1 gnuplot*line7Width: 1 gnuplot*line8Width: 1 ! Default point size gnuplot*pointsize: 1 ! Default dash patterns for monochrome Displays ! 0 means a solid line. ! A two-digit number `jk` means a dashed line with a repeated pattern of ! `j` pixels on followed by `k` pixels off. For example, '16' is a dotted ! line with one pixel on followed by six pixels off. ! More elaborate on/off patterns can be specified with a four-digit value. ! The default values shown below are for monochrome displays ! or monochrome rendering on color or grayscale displays. For color displays, ! the default for each is 0 (solid line) except for `axisDashes` gnuplot*borderDashes: 0 gnuplot*axisDashes: 16 gnuplot*line1Dashes: 0 gnuplot*line2Dashes: 42 gnuplot*line3Dashes: 13 gnuplot*line4Dashes: 44 gnuplot*line5Dashes: 15 gnuplot*line6Dashes: 4441 gnuplot*line7Dashes: 42 gnuplot*line8Dashes: 13 ! Colormap usage and preferred visual Display class ! gnuplot*maxcolors: ! gnuplot*mincolors: ! gnuplot*visual: gnuplot*mono: off gnuplot*gray: off gnuplot*reverseVideo: off ! Grayscale setting (only checked if program is invoked as gnuplot -gray) gnuplot*textGray: black gnuplot*borderGray: gray50 gnuplot*axisGray: gray50 gnuplot*line1Gray: gray100 gnuplot*line2Gray: gray60 gnuplot*line3Gray: gray80 gnuplot*line4Gray: gray40 gnuplot*line5Gray: gray90 gnuplot*line6Gray: gray50 gnuplot*line7Gray: gray70 gnuplot*line8Gray: gray30 gnuplot-4.6.4/share/colors_default.gp0000644000471100001440000000073411676667025014614 0ustar # Ethan A Merritt - my preference for gnuplot colors # 2 3 4 5 6 8 are borrowed from the colors_podo set # set linetype 1 lc rgb "dark-violet" lw 1 set linetype 2 lc rgb "#009e73" lw 1 set linetype 3 lc rgb "#56b4e9" lw 1 set linetype 4 lc rgb "#e69f00" lw 1 set linetype 5 lc rgb "#f0e442" lw 1 set linetype 6 lc rgb "#0072b2" lw 1 set linetype 7 lc rgb "#e51e10" lw 1 set linetype 8 lc rgb "black" lw 1 set linetype 9 lc rgb "gray50" lw 1 set linetype cycle 9 gnuplot-4.6.4/share/Makefile.in0000644000471100001440000005254612223337636013323 0ustar # Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = share DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alpha.m4 \ $(top_srcdir)/m4/apple.m4 $(top_srcdir)/m4/beos.m4 \ $(top_srcdir)/m4/msdos.m4 $(top_srcdir)/m4/next.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(sharedir)" DATA = $(appdefault_DATA) $(share_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = LaTeX DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROEPS_CFLAGS = @CAIROEPS_CFLAGS@ CAIROEPS_LIBS = @CAIROEPS_LIBS@ CAIROPANGO_CFLAGS = @CAIROPANGO_CFLAGS@ CAIROPANGO_LIBS = @CAIROPANGO_LIBS@ CAIROPDF_CFLAGS = @CAIROPDF_CFLAGS@ CAIROPDF_LIBS = @CAIROPDF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIST_CONTACT = @DIST_CONTACT@ DVIPS = @DVIPS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ GDLIB_CONFIG = @GDLIB_CONFIG@ GIHDIR = @GIHDIR@ GREP = @GREP@ GTK28_CFLAGS = @GTK28_CFLAGS@ GTK28_LIBS = @GTK28_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEXPAND = @KPSEXPAND@ LASERGNU = @LASERGNU@ LATEX = @LATEX@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARIES_FOR_X = @LIBRARIES_FOR_X@ LIBS = @LIBS@ LINUXSUID = @LINUXSUID@ LISPDIR = @LISPDIR@ LN_S = @LN_S@ LRELEASE = @LRELEASE@ LTLIBOBJS = @LTLIBOBJS@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGO_1_10_2_CFLAGS = @PANGO_1_10_2_CFLAGS@ PANGO_1_10_2_LIBS = @PANGO_1_10_2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PDFLIB_CONFIG = @PDFLIB_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ PLAINTEX = @PLAINTEX@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RCC = @RCC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMLIBS = @TERMLIBS@ TERMXLIBS = @TERMXLIBS@ TEXDIR = @TEXDIR@ TEXHASH = @TEXHASH@ TROFF = @TROFF@ TUTORIAL = @TUTORIAL@ UIC = @UIC@ VERSION = @VERSION@ VERSION_MAJOR = @VERSION_MAJOR@ WX_CONFIG = @WX_CONFIG@ WX_LIBS = @WX_LIBS@ X11_APPDEFAULTS_DIR = @X11_APPDEFAULTS_DIR@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_OBJC = @ac_ct_OBJC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign EXTRA_DIST = Gnuplot.app-defaults gnuplotrc \ colors_podo.gp colors_default.gp colors_mono.gp @HAVE_LATEX_TRUE@SUBDIRS = LaTeX appdefaultdir = $(pkgdatadir)/$(VERSION_MAJOR)/app-defaults APPDEFAULTFILES = Gnuplot sharedir = $(pkgdatadir)/$(VERSION_MAJOR) share_DATA = colors_default.gp colors_podo.gp colors_mono.gp gnuplotrc @BUILD_GNUPLOT_X11_FALSE@appdefault_DATA = @BUILD_GNUPLOT_X11_TRUE@appdefault_DATA = $(APPDEFAULTFILES) CLEANFILES = $(APPDEFAULTFILES) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-appdefaultDATA: $(appdefault_DATA) @$(NORMAL_INSTALL) @list='$(appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appdefaultdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appdefaultdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdefaultdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appdefaultdir)" || exit $$?; \ done uninstall-appdefaultDATA: @$(NORMAL_UNINSTALL) @list='$(appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appdefaultdir)'; $(am__uninstall_files_from_dir) install-shareDATA: $(share_DATA) @$(NORMAL_INSTALL) @list='$(share_DATA)'; test -n "$(sharedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sharedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sharedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \ done uninstall-shareDATA: @$(NORMAL_UNINSTALL) @list='$(share_DATA)'; test -n "$(sharedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sharedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(sharedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-appdefaultDATA install-shareDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-appdefaultDATA uninstall-shareDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic cscopelist-am ctags ctags-am \ distclean distclean-generic distclean-tags distdir dvi dvi-am \ html html-am info info-am install install-am \ install-appdefaultDATA install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-shareDATA install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-appdefaultDATA uninstall-shareDATA Gnuplot: $(srcdir)/Gnuplot.app-defaults cp -p $(srcdir)/Gnuplot.app-defaults $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnuplot-4.6.4/share/gnuplotrc0000644000471100001440000000225611676667025013220 0ustar ### ### Gnuplot version 4.6 intialization file ### This file is loaded by gnuplot at the start of each run. ### It is provided as a template, with all commands commented out. ### Uncomment and customize lines for local use. ### Any commands placed here will affect all users. ### To customize gnuplot's initial state for an individual user, ### place commands in a private file ~/.gnuplot instead. ### ### Language initialization ### # set locale # set encoding locale ### ### Default line colors and repeat cycle ### # set linetype 1 lc rgb "dark-violet" lw 1 # set linetype 2 lc rgb "#009e73" lw 1 # set linetype 3 lc rgb "#56b4e9" lw 1 # set linetype 4 lc rgb "#e69f00" lw 1 # set linetype 5 lc rgb "#f0e442" lw 1 # set linetype 6 lc rgb "#0072b2" lw 1 # set linetype 7 lc rgb "#e51e10" lw 1 # set linetype 8 lc rgb "black" lw 1 # set linetype cycle 8 ### ### Initialize the default loadpath for shared gnuplot scripts and data. ### Please confirm that this path is correct before uncommented the line below. ### # set loadpath /usr/local/share/gnuplot/4.6/ ### ### Some commonly used functions that are not built in ### # sinc(x) = sin(x)/x ### ### Other preferences ### # set clip two gnuplot-4.6.4/share/Makefile.am0000644000471100001440000000133311752300767013277 0ustar ## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign EXTRA_DIST = Gnuplot.app-defaults gnuplotrc \ colors_podo.gp colors_default.gp colors_mono.gp if HAVE_LATEX SUBDIRS = LaTeX endif appdefaultdir = $(pkgdatadir)/$(VERSION_MAJOR)/app-defaults APPDEFAULTFILES = Gnuplot sharedir = $(pkgdatadir)/$(VERSION_MAJOR) share_DATA = colors_default.gp colors_podo.gp colors_mono.gp gnuplotrc if BUILD_GNUPLOT_X11 appdefault_DATA = $(APPDEFAULTFILES) else appdefault_DATA = endif Gnuplot: $(srcdir)/Gnuplot.app-defaults cp -p $(srcdir)/Gnuplot.app-defaults $@ CLEANFILES = $(APPDEFAULTFILES) gnuplot-4.6.4/config.hin0000644000471100001440000003540112223337633012105 0ustar /* config.hin. Generated from configure.in by autoheader. */ /* Define to allow use of deprecated syntax and terminal behaviour. */ #undef BACKWARDS_COMPATIBLE /* Define if you want to use the CGI terminal under SCO. */ #undef CGI /* Define if you want online help and subtopic tables sorted by column. */ #undef COLUMN_HELP /* Define to treat spacebar like any other keystroke. */ #undef DISABLE_SPACE_RAISES_CONSOLE /* Contact address for modified and binary distributed gnuplot versions */ #undef DIST_CONTACT /* Define if you want to use libgrx20 with MSDOS/djgpp. */ #undef DJSVGA /* Define if this system uses a 32-bit DOS extender (djgpp/emx). */ #undef DOS32 /* Define to allow placement of rectangles and other objects */ #undef EAM_OBJECTS /* Define if color information should be passed for each vertex. */ #undef EXTENDED_COLOR_SPECS /* Define if you want to supply pre-existing X11 windows. */ #undef EXTERNAL_X11_WINDOW /* Define if declares errno. */ #undef EXTERN_ERRNO /* Define if libgd supports animated gifs. */ #undef GIF_ANIMATION /* Define if you want to use a gnuplot history file. */ #undef GNUPLOT_HISTORY /* Define to allow command line macros. */ #undef GP_MACROS /* Define if you want to use a newer version of libgrx under MSDOS/djgpp. */ #undef GRX21 /* Define to 1 if you have the <3dkit.h> header file. */ #undef HAVE_3DKIT_H /* Define to 1 if you have the `atexit' function. */ #undef HAVE_ATEXIT /* Define to 1 if you have the `bcopy' function. */ #undef HAVE_BCOPY /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* libcairo support for eps (cairo >= 1.6) */ #undef HAVE_CAIROEPS /* Define if you want the cairo-based terminals. */ #undef HAVE_CAIROPDF /* Define to 1 if you have the declaration of `signgam', and to 0 if you don't. */ #undef HAVE_DECL_SIGNGAM /* Define to 1 if you have the header file. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the `doprnt' function. */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_EDITLINE_READLINE_H /* Define to 1 if you have the `erf' function. */ #undef HAVE_ERF /* Define to 1 if you have the `erfc' function. */ #undef HAVE_ERFC /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the `fdopen' function. */ #undef HAVE_FDOPEN /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `gamma' function. */ #undef HAVE_GAMMA /* Define if libgd supports gif. */ #undef HAVE_GD_GIF /* Define to 1 if you have the header file. */ #undef HAVE_GD_H /* Define if libgd supports jpeg. */ #undef HAVE_GD_JPEG /* Define if libgd supports png. */ #undef HAVE_GD_PNG /* Define if libgd supports TrueType fonts through libfreetype. */ #undef HAVE_GD_TTF /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the header file. */ #undef HAVE_GGI_WMH_H /* Define to 1 if you have the header file. */ #undef HAVE_GGI_XMI_H /* Define to use gtk/gdk tweaks */ #undef HAVE_GTK /* Define to use gtk+ functions to handle cairo */ #undef HAVE_GTK28 /* define if you have libiconv and iconv.h */ #undef HAVE_ICONV /* Define to 1 if you have the `index' function. */ #undef HAVE_INDEX /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if you want to use kpsexpand (TeX). */ #undef HAVE_KPSEXPAND /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H /* Define to 1 if you have the `lgamma' function. */ #undef HAVE_LGAMMA /* Define to 1 if you're using the aquaterm library on Mac OS X */ #undef HAVE_LIBAQUATERM /* Define to 1 if you have the header file. */ #undef HAVE_LIBC_H /* Define if you are using the BSD editline library. */ #undef HAVE_LIBEDITLINE /* Define if you have gd library. */ #undef HAVE_LIBGD /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `pdf' library (-lpdf). */ #undef HAVE_LIBPDF /* Define if your pdf library is too old to use PDF_begin_document. */ #undef HAVE_LIBPDF_OPEN_FILE /* Define if you are using the GNU readline library. */ #undef HAVE_LIBREADLINE /* Define if you have zlib. */ #undef HAVE_LIBZ /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define if you want the lua/TikZ terminal. */ #undef HAVE_LUA /* Define to 1 if you have the header file. */ #undef HAVE_LUA_H /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define if your pdf library doesn't support dash patterns. */ #undef HAVE_NODASH_LIBPDF /* Define if your pdf library is too old to support patterns. */ #undef HAVE_OLD_LIBPDF /* Define to 1 if you have the `on_exit' function. */ #undef HAVE_ON_EXIT /* Define to 1 if you have the `pclose' function. */ #undef HAVE_PCLOSE /* Define to 1 if you have the header file. */ #undef HAVE_PDFLIB_H /* Define to 1 if you have the `poll' function. */ #undef HAVE_POLL /* Define to 1 if you have the header file. */ #undef HAVE_POLL_H /* Define to 1 if you have the `popen' function. */ #undef HAVE_POPEN /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_HISTORY_H /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_READLINE_H /* Define if your libreadline has rl_reset_after_signal */ #undef HAVE_READLINE_RESET /* Define to 1 if you have the `rindex' function. */ #undef HAVE_RINDEX /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `setvbuf' function. */ #undef HAVE_SETVBUF /* Define to 1 if you have the header file. */ #undef HAVE_SGTTY_H /* Define if we have sigsetjmp(). */ #undef HAVE_SIGSETJMP /* Define to 1 if you have the `sleep' function. */ #undef HAVE_SLEEP /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `stpcpy' function. */ #undef HAVE_STPCPY /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strcspn' function. */ #undef HAVE_STRCSPN /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the `stricmp' function. */ #undef HAVE_STRICMP /* Define to 1 if cpp supports the ANSI # stringizing operator. */ #undef HAVE_STRINGIZE /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strndup' function. */ #undef HAVE_STRNDUP /* Define to 1 if you have the `strnicmp' function. */ #undef HAVE_STRNICMP /* Define to 1 if you have the `strnlen' function. */ #undef HAVE_STRNLEN /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define if math.h declares struct exception for matherr(). */ #undef HAVE_STRUCT_EXCEPTION_IN_MATH_H /* Define to 1 if you have the `sysinfo' function. */ #undef HAVE_SYSINFO /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BSDTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSTEMINFO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIMEB_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UTSNAME_H /* Define to 1 if you have the `tcgetattr' function. */ #undef HAVE_TCGETATTR /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H /* Define if time_t is declared in time.h. */ #undef HAVE_TIME_T_IN_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `usleep' function. */ #undef HAVE_USLEEP /* Define to 1 if you have the header file. */ #undef HAVE_VALUES_H /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if you have the `vfprintf' function. */ #undef HAVE_VFPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_VGAGL_H /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define to 1 if you have the `wcwidth' function. */ #undef HAVE_WCWIDTH /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to enable gridbox optimization in hidden3d code. */ #undef HIDDEN3D_GRIDBOX /* Define to enable quadtree optimization in hidden3d code. */ #undef HIDDEN3D_QUADTREE /* Define to enable handling point size in hidden3d code. */ #undef HIDDEN3D_VAR_PTSIZE /* Define if this is a Linux system with SuperVGA library. */ #undef LINUXVGA /* Define to 1 if malloc(0)==0 */ #undef MALLOC_ZERO_RETURNS_ZERO /* Define if your libreadline has no rl_ding */ #undef MISSING_RL_DING /* Define if your libreadline has no rl_force_update_display */ #undef MISSING_RL_FORCED_UPDATE_DISPLAY /* Define if your libreadline has no rl_complete_with_tilde_expansion */ #undef MISSING_RL_TILDE_EXPANSION /* Define if this is an MSDOS system. */ #undef MSDOS /* Define to disable terminals that depend on code in bitmap.c */ #undef NO_BITMAP_SUPPORT /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define if you do have the popen and pclose functions. */ #undef PIPES /* Unix-type of Interprocess Communication is required for mouse support. */ #undef PIPE_IPC /* Automake 1.12 dropped support for building without prototypes */ #undef PROTOTYPES /* Define if you want the Qt terminal. */ #undef QTTERM /* Define if you want to use the included readline function. */ #undef READLINE /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* Define to 1 if the `S_IS*' macros in do not work properly. */ #undef STAT_MACROS_BROKEN /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if you want to use the sunview terminal (sun). */ #undef SUN /* Define to use thin plate spines. */ #undef THIN_PLATE_SPLINES_GRID /* Define if the 3dkit libray is present. */ #undef THREEDKIT /* Define if you want to read .gnuplot from current directory (SECURITY RISK!). */ #undef USE_CWDRC /* Define if you want to use the experimental ggi driver. */ #undef USE_GGI_DRIVER /* Define if you want to have mouse support in interactive terminals. */ #undef USE_MOUSE /* Define to add support for generating a statistical summary of data */ #undef USE_STATS /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Define to enable multi-byte font support for x11 */ #undef USE_X11_MULTIBYTE /* Version number of package */ #undef VERSION /* Define if the vgagl libray is present. */ #undef VGAGL /* Define to allow zooming or refresh of volatile data. */ #undef VOLATILE_REFRESH /* Define if you want the wxwidgets terminal. */ #undef WXWIDGETS /* Define if you are using the X11 window system. */ #undef X11 /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* libgd versions < 1.8.4 need gdImageStringTTF rather than gdImageStringFT */ #undef gdImageStringFT /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define as `fork' if `vfork' does not work. */ #undef vfork gnuplot-4.6.4/ChangeLog0000644000471100001440000067165712224361422011727 0ustar 2013-10-06 Tag Release_4_6_4 2013-10-02 Ethan A Merritt * src/plot2d.c (polar_range_fiddling): In a polar mode plot, if x, y, and r axes are all auto-scaled then prefer a symmetric plot centered at the origin with radius rmax over an asymmetric plot produced by treating the data ranges on x and y independently. 2013-10-01 Christoph Bersch * src/plot2d.c (store_label): Plots with labels should accept variable color both for the label text and for the associated point symbol. Bug #1281 2013-09-30 Josh Ovi * src/graphics.c (plot_bars): y errorbar whiskers were incorrectly drawn at the end of a clipped error bar. If the error bar is clipped then it should have no whisker. Bug #1289 2013-09-26 Ethan A Merritt * src/axis.h: Fix order of axis format initializers. Fortunately these were overwritten correctly on program entry by reset_command. 2013-09-23 Ethan A Merritt * docs/Makefile.in: It is not an error if a file to be uninstalled is already gone. 2013-09-20 Ethan A Merritt * src/graphics.c (place_grid): Must initialize tic_direction when drawing r-axis tics. Otherwise we get whatever the last set of x or y tics used, or if they have not been used then nothing at all. Bug #1286 * src/qtterminal/QtGnuplotScene.cpp(QtGnuplotScene::processEvent): Revert one line of patch from 2013-05-23. typo? thinko? Anyhow it can cause gnuplot_qt to freeze or terminate. Bugfix * src/graphics.c(do_key_layout): If the terminal doesn't support set_color() we can't produce an opaque key box. 2013-09-17 Ethan A Merritt * term/emf.trm (EMF_point): filled circles (pointtype 7) were incorrectly being drawn with a black border. 2013-09-15 Ethan A Merritt * missing: Current autoconf complains that our "missing" script is too old. Replace it with a version timestamped 2012-06-26.16. Unfortunately I don't see how to modify this one to package or install on machines without makeinfo. So... * docs/Makefile.in: install-info is no longer a default target. You can still do "make install-info" as always if you really want it and you do have makeinfo installed. 2013-09-11 Christoph Bersch * src/set.c src/unset.c: Sanity check "set style increment foo" command, reset to default on "reset" command. Bug #1282 2013-09-10 Ethan A Merritt * pm3d.c (set_plot_with_palette): "tc variable" was incorrectly causing the color bar to be drawn by default. * graphics.c (check_for_variable_color): "lc variable" should index the line _type_ (not _style_) colors unless "set style increment user". Bug #1281 * plot2d.c (store_label): Same fix for "with labels tc variable". Bug #1281 2013-09-09 Ethan A Merritt * term/cairo.trm (cairopng_write_cropped_image): Must free cropped image and the structure that holds it, otherwise there is a memory leak. Bug #1278 2013-09-06 Ethan A Merritt * scanner.c (scanner): The syntactic entity $# (number of arguments in a call statment) has been mishandled as introducing a comment since sometime in version 4.5. Trap it as a special case in the scanner. Bugfix 2013-09-05 Ethan A Merritt * configure.in docs/titlepag.tex PATCHLEVEL src/version.c: Bump patchlevel to 4.6.4 2013-08-28 Hans-Bernhard Broeker * config/mingw/.cvsignore: Ignore *.d, *.par and *.log, like the trunk version does. 2013-08-24 Ethan A Merritt * src/gplt_x11.c term/x11.trm: Use more precision when writing out the axis dimensions and scale at the end of a plot. This prevents rounding errors in the mouse coordinates reported in -persist mode. Bug #1276 2013-08-23 Petr Mikulik * src/term.c (test_term): "test" was not respecting "set origin". 2013-08-21 Ethan A Merritt * src/fit.c (regress): Do not destroy the contents of chisq in the course of doing parameter scaling. This is a bug just waiting to hit. Bug #1275 2013-08-13 Ethan A Merritt * src/eval.c (update_gpval_variables): Missing GPVAL_* entry for R_AXIS.max. 2013-08-08 Ethan A Merritt * src/axis.c: Add comment noting that axis_position_zeroaxis() must be called for each axis before plotting in order to set axis->term_zero. * src/graphics.c: It is incorrect to skip the initial calls to axis_draw_2d_zeroaxis even if we know the zero axes will be drawn again later (e.g. grid is off or front). Bug #1267 * src/datafile.c: Fix segfault from trying to store strlen of a NULL column header string. 2013-08-06 Ethan A Merritt * src/eval.c (pop_or_convert_from_string): Context-dependent conversion of a string containing a number to an actual number is documented as evaluating to either an integer or a complex variable as appropriate. However up to now it has always produced a complex in practice. Now we really do evaluate to an integer if the string contains only digits and whitespace. Bug #1269 * src/datafile.c: Generalize the substitution of columnheaders into a string during evaluation of 'using' or 'title' in a plot command. This allows inclusion of more than one columnheader into a single resulting string. Bug #1271 2013-07-22 Ethan A Merritt * src/command.h src/command.c (string_expand_macros do_line) src/misc.c (load_file): Under some conditions, e.g. inside a multi-line clause in curly brackets, the input command line can be extended after it has already been checked for the presence of macros. This caused any macros in the new part of the input line to be unrecognized. Now we recheck for macros whenever the input line is extended. Bug #1264 2013-07-06 Bastian Maerkisch * src/win/wtext.c: Accept Ctrl-C to copy to clipboard. Fix index out of range error if text selection extends beyond the end of line. 2013-07-05 Dima Kogan * configure.in: Test for incomplete installation of wxWidgets development environment. 2013-07-03 Mojca Miklavec * src/command.c src/plot.c src/variable.c: Remove obsolete instances of #ifdef (_Macintosh) 2013-07-03 Ethan A Merritt * src/graph3d.c: Better fix for Bug #1252, inverted parallel axis labels 2013-07-02 Ulrich Müller * docs/doc2texi.el: Provide a substitute for the lisp routine replace-regexp-in-string, which is missing in xemacs prior to version 25.1.something. * docs/Makefile.in: Modify build commands for gnuplot.texi so that xemacs and newer emacs (25.1) are happy. * docs/doc2texi.el: Map terminal HELP sections to level 3 (subsection) and level 4 (subsubsection) rather than levels 4 and 5. Bug #1226 2013-07-02 Ethan A Merritt * src/datafile.c (plot_ticlabel_using): Explicit error message if required parentheses are missing from using spec. Bug #1256 * src/time.c (gstrptime): Pass through fractional seconds read with time format "%s" 2013-06-28 Ethan A Merritt * src/misc.c (load_file): Expand macros up to 3 levels deep when stepping through a "load" operation. This matches the depth allowed at the top level command line. Bug #1246 * src/graph3d.c (draw3d_graphbox): "set [xy]label rotate parallel" is affected by the direction of the complementary axis. Bug #1252 2013-06-27 Hans-Bernhard Broeker * src/graphics.c (do_ellipse): Repair atrocious pointer casts spotted by J. Bollinger. 2013-06-24 Bastian Maerkisch * src/util.c|h (existfile): New (missing) routine. 2013-06-22 Mojca Miklavec * term/context.trm: Explicitly disable color in standalone ConTeXt documents when monochrome option is chosen. 2013-06-18 Shigeharu Takeno * src/datafile.c (plot_option_every): Treat negative numbers as indicating "default value". 2013-06-16 Ethan A Merritt * src/datafile.c (df_tokenise): Get rid of erroneous test against axis_array[foo].timefmt (always evaluates as TRUE). 2013-06-07 Thomas Mattison phas.ubc.ca> * src/fit.c (regress): Fit did not converge if maximum lambda was exceeded. Add new message for this case. Patchset #230. 2013-06-07 Bastian Maerkisch More backports from version 4.7 * src/fit.c (fit_command): Always initialize variables which might be set by user variables. This is necessary since user variables may be `undefine`d. * src/fit.c (backup_file): Remove code path for Win32s. Backup files will not get overwritten. Add error message for that case. * src/fit.c (fit_command): Log file contained the wrong variable name for axis restrictions. Reported by Victor Slabinski on gnuplot-bugs. * src/fit.c|h src/win/wgraph.c src/win/wtext.c: Ctrl-Break interrupts fitting runs in wgnuplot. * src/win/winmain.c|h (WinRaiseConsole) src/fit.c src/win/wgraph.c src/wxterminal/wxt_gui.cpp: Consolidate code to raise console in new routine. * src/win/wprinter.c (PrintDlgProc): Verify that printer info is actually available. Bug 1152. * src/win/wgraph.c (SaveAsEMF, CopyClip): Turn off antialiasing during export to EMF or clipboard in order not to mix GDI and GDI+ calls. See also change on 2012-07-25. * src/win/wgraph.c: Recreate fonts after resizing the graph window. This bug causes the plot just to be scaled to the new size, without adjusting spacing/borders etc. Bugfix. * config/makefile.nt: Superseded by msvc/Makefile. Removed. 2013-06-07 Bastian Maerkisch More backports from version 4.7 * term/win.trm (WIN_options): Validate argument to title option. * term/win.trm (WIN_filled_polygon): Filled polygon are always closed. Ignore the last corner if it's the same as the first one. * src/win/wgraph.c: Recreate fonts after resizing the graph window. 2013-06-03 Ethan A Merritt * src/wxterminal/wxt_gui.cpp (wxt_sigint_handler): The wxt terminal deadlocks if connection to the X-server is lost (Bug #991). Ctrl-C doesn't break the deadlock because this interrupt handler simply flags the signal and waits for the parent process to handle it. Parent and child are thus waiting on each other -> deadlock. Now we add a test for Ctrl-C arriving when the Ctrl-C flag is already set, and exit if it happens. Thus hitting Ctrl-C twice breaks the deadlock. Not great but better than hanging. Bug #991. 2013-05-24 Ethan A Merritt * src/wxterminal/gp_cairo.c term/cairo.trm term/context.trm term/wxt.trm: Calls to strncat were risking buffer overflow by not accounting for the terminating '\0'. (backported from 4.7 patch 2012-11-29) 2013-05-23 Ethan A Merritt * src/plot2d.c (get_data): Treating timedata columns as strings allows functions column(N) and column("HEADER") to work on time data. Bug #1161 * src/qtterminal/QtGnuplotScene.cpp: Enhanced text elements were not being added to the current display group, so they were ignored by the plot toggling operation. Now they are handled like any other text. * src/graphics.c: Fix two errors in the linetypes used by plot style columnstacked histograms. The key sample ignored "newhist lt N" and also was off by one in the fillstyle used. "set style increment user" caused an off-by-one error in the choice of initial line style. 2013-05-20 Shigeharu Takeno * term/emf.trm: It doesn't work to call EMF_setfont() before we enter graphics state. Bugfix. 2013-05-10 Ethan A Merritt * src/datafile.c: Valgrind found a case where df_column[foo].position had never been initialized. Boom. 2013-05-07 Ethan A Merritt * term/canvas.trm term/svg.trm: The 4.6 canvas and svg terminals both require additional information about axis layout in order to correctly provide mouse coordinates for inverted axes (axis_min > axis_max). This patch changes the output files produced by gnuplot 4.6 so that the same javascript mousing code works for both 4.6 and 4.7 output. Bug #1230 2013-04-28 Ethan A Merritt * src/datafile.c (df_tokenise check_missing): Treat empty fields in a csv file as "missing" rather than "bad". This allows generating stacked histogram plots from a csv spreadsheet of sparse data. 2013-04-22 Ethan A Merritt * src/wxterminal/wxt_gui.cpp (wxt_init): Exit cleanly if initialization fails. * src/wxterminal/gp_cairo.c (gp_cairo_set_font): Allow backslash ('\\') to be treated as an escape character in font names. This can be necessary if the font name contains a hyphen since otherwise it would be converted to a space. * src/qtterminal/QtGnuplotScene.cpp (processEvent): Add pixmaps to current plot group so that image plots can be toggled. 2013-04-14 Hans-Bernhard Broeker * docs/Makefile.in (gnuplot.info): Fix out-of-tree build (would break make distcheck, too). 2013-04-12 Tag Release_4_6_3 2013-04-12 Ethan A Merritt * src/stats.c: Fix incorrect memory allocation for large matrices. 2013-04-11 Ethan A Merritt * Bump patchlevel to 3 so that we don't have a version mismatch between the linux and windows packages being distributed. 2013-04-10 Ethan A Merritt * term/pslatex.trm (EPSLATEX_set_color): Revert a portion of the patch from 2013-01-08 (Tracker #1199). Repairs overzealous removal of redundant color commands. Bug #1185. 2013-04-08 Ethan A Merritt * src/graphics.c (plot_image_or_update_axes) src/plot2d.c (refresh_bounds): When refreshing images plots we must recheck range limits on both x and y. 2013-04-07 Bastian Maerkisch Backports from 4.7 relevant for the Windows platform: * src/win/wgraph.c src/win/winmain.c|h (WinMessageLoop) src/win/wtext.c: Move Windows message handling from TextMessage() to new WinMessageLoop() and make it accessible in Windows console mode. * src/win/wtext.h (getchar): Make sure that getchar is defined. * src/win/wcommon.h src/win/wtext.c (TextShow) src/win/winmain.h src/win/winmain.c (WinWindowOpened, WinPersistTextClose) src/win/wgraph.c (WndGraphProc) src/wxterminal/wx_term.h src/wxterminal/wxt_gui.h src/wxterminal/wxt_gui.cpp (~wxtFrame, wxtFrame::onClose, wxt_window_opened, wxt_atexit) src/plot.c (main) Revise handling of persist mode on Windows: Exit wgnuplot only after the last plot window (wxt or win) has been closed. The text window is only shown if "-" is given on the command line. No zombie wgnuplot process when closing a persistent wxt terminal window. Console gnuplot behaviour stays unchanged. Bug #3538762 * src/plot.c (gnu_main) src/win/winmain.c (main): The Windows version used to handle the persist command line option in winmain.c. Moving it to plot.c ensures that the same options are supported on all platforms. See Bug #3538762 * src/plot.c (main): Restore a code snippet for the Windows platform which got removed by accident on Feb 3rd. Fixes -persist mode on Windows. * src/win/wgraph.c (WndGraphProc), src/wxterminal/wxt_gui.cpp (wxtPanel::RaiseConsoleWindow), src/wxterminal/wxt_gui.h: Implement space-raises-console for console mode gnuplot. * config/mingw/Makefile: Extend use of VPATH which makes some explicit rules superfluous. Automatically create dependency .d files during build. Include current date in filenames of zip-file and installer for non-release builds. Remove long-unused WINDOWS variable. * win/gnuplot.iss win/README-Windows.txt win/README-Windows-ja.txt: Release 4.6.2 2013-03-29 Ethan A Merritt * src/qtterminal/QtGnuplotScene.cpp (processEvent): Fix off-by-one iteration over visibility of plots after a zoom or other replot. 2013-03-22 Ethan A Merritt * src/term.c (term_apply_lp_properties): A patch of 2013-01-08 switched to always applying linetype color even if the use_palette flag was not set. This broke the TERM_MONOCHROME setting on terminals that have it, as seen in the "test" command. Handle monochrome terminals as a special case. Bug #1225 2013-03-21 Mojca Miklavec * docs/Makefile.in: Remove nested @ symbols from Makefile 2013-03-21 Ethan A Merritt * src/plot2d.c src/misc.c (lp_parse): The "fillcolor|fc" keyword in a plot command was not correctly parsed. 2013-03-17 Ethan A Merritt * configure.in: modify for use with current automake (1.12/1.13) 2013-03-14 Tag Release_4_6_2 2013-03-14 Ethan A Merritt * src/datafile.c src/datafile.h src/plot2d.c src/plot3d.c: Issue a warning if a requested column header is not found in the data file being plotted. Document that an exact match is required. 2013-03-10 Hans-Bernhard Broeker * term/lua.trm (LUA_Init): Better way of ignoring a return value. * src/graphics.c (do_plot): Type-correct enum usage. * src/color.c (cbtick_callback): Type-correct enum usage. * term/x11.trm (X11_options): Fix compiler warning about excess argument to fprintf(). * src/plot3d.c (eval_3dplots): Type-correct enum usage. * src/plot2d.c (eval_plots): Type-correct enum usage. 2013-03-09 Dima Kogan * src/plot3d.c (refresh_3dbounds): Partial axis ranges, e.g. [*:MAX] or [MIN:*] were not being handled correctly when refreshing volatile data. * src/plot2d.c (refresh_bounds) src/plot3d.c (refresh_3dbounds): Extend degenerate range when refreshing. 2013-03-03 Ethan A Merritt * src/plot2d.c: Allow a 2 columns only variant of "with yerrorbars". x is taken from column 0, y from column 1, yerror from column 2. 2013-03-01 Ethan A Merritt * src/plot2d.c (refresh_bounds): Partial axis ranges, e.g. [*:MAX] or [MIN:*] were not being handled correctly when refreshing volatile data. 2013-02-24 Ethan A Merritt * term/aquaterm.trm: Revert patch of 24-Apr-2012 because it breaks rgbimage with aquaterm 1.1. Reversion confirmed to fix the problem by Alexander Hansen of Fink. Bug #1188 2013-02-21 Ethan A Merritt * src/plot.c: The old test for whether a session was interactive assumed that everything on the command line was either an input file name or an x11 option parsed by X11_args. This broke because (1) X11 is no longer the only interactive terminal. (2) There are options that occupy space on the command line but are not file names. Some indicate non-interactive; some don't. Replace this test with one that only enters a non-interactive session if there are command line arguments that do not begin with '-' (filename) or _do_ begin with '-e' (inline command). (Back-ported file plot.c from version 4.7) Bug #1212 2013-02-19 Ethan A Merritt * src/graphics.c (boundary): Rotated x-axis tic labels are set automatically to right justify, but this happens too late for the code that reserves space for them. Test for this as a special case. Bugs 1204, 1209 * src/wxterminal/wxt_gui.cpp (wxt_update_key_box): Fix array overrun caused by many 'notitle' plot appearing before any titled plots. Bug 1211 2013-02-18 Christoph Bersch * src/graphics.c: Draw the zero axis lines in the same front/back layer as the axis and grid lines. 2013-02-17 W. Trevor King * configure.in src/datafile.c (df_open) docs/gnuplot.doc: New special file syntax "<&N" plots data read from an arbitrary file descriptor. This allows setting up multiple input pipes to gnuplot when it is invoked from a shell. 2013-02-17 Craig DeForest * src/datafile.c (df_readbinary): Add special case code to read in a uniform binary matrix in one large chunk rather than reading one matrix element at a time. When piping a 2000x2000 RGB matrix under linux this speeds the input stage from about 9 seconds to about 2 seconds. 2013-02-17 Ethan A Merritt * src/plot.c: -d or --default-settings Skip reading gnuplotrc and ~/.gnuplot on entry. * src/plot.c: Don't assume that X11_args() is there to help parse command line options. Bug #3601907 2013-02-10 Ethan A Merritt * src/command.c (invalid_command): When an invalid command is detected, advance the input parsing pointer (c_token) to the end of the command. Otherwise we're left in the middle of an invalid command after the error message is printed. * src/command.c (read_line): Reset the token count to zero when starting to read a new line of input. Otherwise if the read is interrupted by a mouse event requesting a replot then the internal state is not valid. Test case: cat | ./gnuplot plot and zoom Bug #3602388 * src/term.c (term_apply_lp_properties): Always apply linetype color, even if the flag use_palette is not set. Many terminals cope with this on their own, but not all of them (e.g. cairolatex). Bug #3599916 2013-02-08 Ethan A Merritt * util.c (gprintf): Initialize output buffer so that an empty format does not leave an unitialized string. Test case: set format "%B %b"; plot x 2013-01-24 Ethan A Merritt * src/set.c (set_timefmt): Accept the new format as a string variable. Bug #3602057 2013-01-21 Ethan A Merritt * src/hidden3d.c: Up until now hidden3d handled any pm3d surfaces as a collection of points, which did essentially nothing at all. Now we treat them as invisible lines (LT_NODRAW) so that they can occluded other objects. This trick was already used in hidden2.dem but now it's built in. 2013-01-18 Ethan A Merritt * term/x11.trm: Right- or Center- justified enhanced text was losing track of the font size. This bug was evident in "key.dem". 2013-01-15 Ethan A Merritt * src/plot2d.c src/plot3d.c: Downgrade detection of a trailing comma in a plot command to a warning rather than an error. This allows more convenient re-ordering of multi-line plot elements when replotting. (Backport from 4.7) 2013-01-08 Ethan A Merritt * term/pslatex.trm (EPSLATEX_layer): Reset current text color at the start of each layer's block of TeX output. Bug #3599916 2013-01-06 Ethan A Merritt * src/plot.c (main): Unbuffered stdin is needed for readline even if X11 is not configured, as suggested in the comment added in 2004. 2013-01-05 Ethan A Merritt * src/graphics.c (do_polygon): Skip degenerate polygons (fewer than 2 vertices). 2013-01-04 Ethan A Merritt * src/command.c (replotrequest): #ifdef VOLATILE_REFRESH is needed with ./configure --disable-volatile-data 2012-12-27 Daniel J Sebald * configure.in: Repair shell syntax used to control the definition of CC and CXX for cross-building. 2012-12-27 Shigeharu Takeno * term/emf.trm: Adjust vertical centering of characters to match current font size. 2012-12-19 Olaf Booij * src/graph3d.c: In 3D plots with 'set view equal xyz' the point about which zoom operates should be in the middle of the screen, not at z=0. 2012-12-18 Ethan A Merritt * src/term.c (enhanced_recursion): Depending on the terminal type and the current encoding, improper enhanced text syntax could cause anything from garbage text to a segfault: set termopt enhanced; set label "~"; plot [0:1][0:1] '+' using 1:1:("~^") with labels Bugfix * src/gplt_x11.c: Change the fallback font string used when the current encoding is UTF-8 (iso10646-1) or when all else fails (iso8859-1). This is admitted biased towards English as a default, but the previous string (*-*) does not work for common recent x11 implementations. 2012-12-16 Ethan A Merritt * term/post.trm (set_font): quick fix to redefine vshift every time the current font size changes. A better fix would query the font internally. The failure to do this led to poor vertical centering of text using any font other than the default, and bad key box layout for small key fonts. * term/svg.trm (set_font): Similar fix for svg. * src/wxterminal/gp_cairo.c (gp_cairo_draw_text): and for wxt. 2012-12-14 Ethan A Merritt * src/datafile.c: If a data column requested by name is not found, treat it as undefined (DF_UNDEFINED) rather than terminating data input with int_error(). This makes the treatment of named columns more like that of numbered columns. Bug #3595672 2012-12-02 Ethan A Merritt * term/svg.trm: Background color 0x0 was incorrectly interpreted as "none" rather than "black". Bugfix. 2012-11-20 Ethan A Merritt * src/datafile.c: Truncate requested column number to maximum sane value. This prevents a segfault on "plot $foo using 1 title column(999)" 2012-11-15 Ethan A Merritt * src/tabulate.c: Fix the hexadecimal format used to output RGB color * term/canvas.trm term/js/canvasmath.js: Backport updates from 4.7 * src/gplt_x11.c: Depending on the order of linetype changes, the code could fail to reset the current linewidth. Bug #3348942 2012-11-12 Ethan A Merritt * src/datafile.c (plot_option_using): The check for a format spec given after the list of columns (e.g. plot FOO using 1:2 "%lf; %lf") was lost in a code reorganization, so it was missing in 4.6.0 and 4.6.1. Restore it. Bug #3586441 * src/plot2d.c (check_or_add_boxplot_factor): Fix memory leak. 2012-11-10 Ethan A Merritt * src/misc.c (parse_color_name): If the expression term in `linecolor rgb ` is not interpretable as a color name or hexadecimal string "#AARRGGBB" then treat it as an integer representing AARRGGBB. 2012-11-08 Ethan A Merritt * src/axis.c (gen_tics): Axis tic labels provided by the user as string constants were arbitrarily truncated to MAX_ID_LEN before printing. No truncation is necessary. Bug #3585182 2012-11-05 Ethan A Merritt * src/util.c (gprintf): Ever since the gprintf routine was added (sometime before version 3.7) the count parameter that should limit how many characters are written on output has been silently ignored. Obviously this can lead to buffer overflows, the simplest case being a format consisting of a string constant with length > MAX_ID_LEN. Revise gprintf() to use snprintf() and safe_strncpy() throughout. Bug #3577439 2012-11-01 Ethan A Merritt * src/qtterminal/qt_term.cpp src/qtterminal/QtGnuplotScene.cpp src/qtterminal/QtGnuplotWidget.cpp: Fix mouse tracking and resize events for persistent qt windows. 2012-10-31 Ethan A Merritt * src/parse.c (parse_reset_after_error) src/parse.h src/util.c: Error exit from inside try_to_get_string() left the internal flag for string parsing in an incorrect state. Provide a reset routine. Example of original bug: stats file" print 1+2 ^ ';' expected 2012-10-30 Ethan A Merritt * src/command.c: Fix a coding error, (sizeof((char *)buf) rather than (strlen((char *)buf)), that can cause a buffer overrun on 64-bit machines. Found by valgrind. 2012-10-28 Ethan A Merritt * src/graph3d.c: Save axis scaling for 3D 'set view map' plots so that outboard drivers can continue mousing in -persist mode. 2012-10-26 Ethan A Merritt * src/mouse.c src/mouse.h src/mousecmn.h: Allow the "bind" command to attach a user command to mouse button 1, at least for 2D plots. 2012-10-22 Ethan A Merritt * term/xlib.trm: Reset X11_ipc when xlib terminal exits; otherwise a subsequent "set term x11" fails to send output to gnuplot_x11. 2012-10-19 Ethan A Merritt * src/command.c (do_string_and_free): The "exit" command was not working inside a bracketed clause. Bug #3576439 2012-10-15 Ethan A Merritt * term/gd.trm (set_font): The libgd terminals were failing to notice a change in font size sent by set_term(",newsize") Bugfix (old bug!) * term/canvas.trm (set_font); Minimal set_font routine for canvas terminal. All it does at this point is change or restore the font size. * src/term.c (term_start_multiplot): The calculation of vertical space required for a plot title depends on term->v_char, which in turn depends on the font used for the title. Bugfix. 2012-10-14 Ruediger Haertel * src/term.c (term_start_multiplot) docs/gnuplot.doc: Add enhanced/noenhanced option to "set multiplot title". 2012-10-14 Ethan A Merritt * src/qtterminal/qt_term.cpp (qt_set_font): term->set_font("") must restore the default terminal font and size. Bugfix. * src/qtterminal/qt_term.cpp: Improved font metrics. 2012-10-13 Ethan A Merritt * src/graph3d.c: Suppress drawing of a degenerate keybox when "set key box" but no plot titles. Bugfix. * src/graph3d.c src/show.c: "set zlabel rotate parallel" should have the same effect as "set zlabel rotate". Bugfix. 2012-10-10 Ethan A Merritt * src/qtterminal/QtGnuplotWidget.cpp (exportToSvg): Restrict svg output size to scaled viewport. This gets rid of the oversize border around a plot exported from the qt terminal to svg. Empirical fix, results not guaranteed! Bug #3573897 2012-10-09 Ethan A Merritt * src/term.c src/unset.c src/term_api.h: Consistent with the documented generic meaning of "unset", the command "unset terminal" now restores the default terminal present at program entry. I.e., it is equivalent to "set terminal GNUTERM". 2012-09-30 Tag Release_4_6_1 2012-09-26 Ethan A Merritt * src/graphics.c: Fix bug preventing explicit assignment of color sequence in stacked histograms. * src/datafile.c src/util.c (streq) src/util.h: New utility function streq(char *a, char *b) returns TRUE if a and b are identical save for leading and trailing whitespace. Use this for matching requested string labels in a using spec to the actual column header text in a data file. Bug #3571243 * src/axis.c src/axis.h src/mouse.c src/plot2d.c src/util.c: Allow zooming of plots that originally had an explicit range in the plot command. 2012-09-22 Ethan A Merritt * lisp/configure.in docs/Makefile.in: Backport emacs+info build configuration from 4.7 2012-09-20 Ethan A Merritt * src/graph3d.c: valgrind found a code path in which the key placement was never initialized. 2012-09-18 Ethan A Merritt * lisp/gnuplot.el: elisp is now getting serious about a syntax change announced 10+ years ago. s/(` (/`(/ * lisp/configure.in lisp/Makefile.am: The autoconfigure scripting for the lisp directory is failing when $(EMACS) is redefined by the user. But the failure is only relevant to testing/patching info-look.el for very old versions of emacs. Deal with it by simply assuming that everyone has an emacs version newer than 20.3 and therefore no patching is needed. * src/graphics.c: Incorrect default layout of rotated xtic labels. Bug #3568817 2012-09-13 Ethan A Merritt * term/PostScript/prologue.ps term/post.trm: Handle transparent fill patterns in PS_fillbox() in the same way as is already done in PS_filled_polygon(). Bug #3567035 * src/eval.c (fill_gpval_axis): Do not swap axis min/max values when storing them for later mousing calculations by the canvas, svg, and other terminals. Fixes bug in the mouse readout from reversed axes. 2012-09-11 Ethan A Merritt * src/graphics.c: Index histogram stacks using the point's index rather than its x coordinate. Fixes rowstacked histogram array overflow. Bug #3566662 2012-09-07 Mojca Miklavec * configure.in src/Makefile.am src/qtterminal/QtGnuplotWidget.cpp src/qtterminal/QtGnuplotWidget.h src/qtterminal/qt_term.cpp src/qtterminal/qt_term_mac.m src/qtterminal/QtGnuplotScene.cpp: Backport recent OSX-related Qt modifications from 4.7 to 4.6.1. 2012-09-07 Thomas Orgis * src/qtterminal/QtGnuplotApplication.cpp src/wxterminal/wxt_gui.cpp: The wxt and qt terminals handle -persist by continuing execution of a forked thread after the main thread has exited. However, anyone waiting on the main thread won't see it as finished unless the stdout and stderr streams inherited by the continuing process are closed. Bug #3309277 2012-09-06 Ethan A Merritt * Bump version to 4.6.1 in preparation for release 2012-09-05 Ethan A Merritt * src/tabulate.c: Output a column for variable color if it is used in the plot command. * src/datafile.c src/datafile.h src/plot2d.c src/tabulate.c: Blank lines separating datasets in an input file were stored as an UNDEFINED point but not otherwise marked. This patch introduces a recognizable (struct coordinate)blank_data_line that is stored when a blank line is encounted. This means that when writing the data back out via "set table" the separation between data sets can be maintained. Bug #3553151 2012-09-04 Shigeharu Takeno * term/emf.trm: Revise the object-handling code so that the current brush or pen is deselected before being deleted and recreated. Defer application of new dash+color line properties until needed for a new line segment. 2012-09-04 Ethan A Merritt * term/emf.trm: Seek to the beginning of the output file after plotting. If a user mistakenly tries to place two plots in the same file, the second will cleanly overwrite the first rather than corrupting it. 2012-08-31 Ethan A Merritt * term/emf.trm: Fix dashed line support (broken for a looong time). * term/emf.trm (EMF_set_font): (thanks to Shige Takeno) The intended optimization to prevent redundant requests for the same font was not implemented correctly. This change fixes it so that a new font request is ignored if it would reapply the current font. * src/unset.c: "unset object N" succeeds even if there is no object N 2012-08-27 Ethan A Merritt * src/contour.c: Invoke CheckZero() when automatically choosing contour levels. The need for this check can be seen in contour.dem plots 19-21. 2012-08-24 Ethan A Merritt * src/graphics.c (do_key_layout): The height of opaque fill for the key box must be adjusted to allow for superscripts/subscripts in the title. Bug #3556892 2012-08-23 Thomas Gaillard * src/interpol.c: Mean and sigma of kernel density function were incorrectly calculated. Bug #3519563 2012-08-22 Ethan A Merritt * src/graph3d.c: Clip over-wide key box to left edge of plot. Bug #3560531 2012-08-11 Ethan A Merritt * docs/Makefile.in: Remove dependency on emacs for "make install" in the docs subdirectory. If no emacs is available, skip installation of the site-lisp files. Bug #3528377 2012-08-07 Mojca Miklavec * term/aquaterm.trm: Revised test for transparency support to match the implementation in AquaTerm version 1.1.1 2012-08-03 Ethan A Merritt * term/pslatex.trm (EPSLATEX_set_color): Some cairolatex set_color requests were being incorrectly ignored. Bug #3553940 2012-08-02 Ethan A Merritt * term/canvas.trm term/svg.trm: Since we now support time to millisecond precision, the bounds of a time/date axis need to be written out using %.3f rather than %g. Bug #3548932 * src/misc.c (load_file): The multiline bracketed clause handling adds trailing newlines to the input. It is essential to check and extend the input buffer if needed before doing this. Bug #3549386 * term/gd.trm: Restore the deprecated syntax "set term png xRRGGBB" for setting the PNG background color in 4.6.1, since the manual still lists it. But it will definitely go away in 4.7. Bug #3551340 2012-07-25 Bastian Maerkisch * src/win/wgraph.c (drawgraph): Check if the printer driver can actually do transparency (AlphaBlend). Fixes printing of transparent filled polygons and boxes. See bug #3503318 2012-07-24 Bastian Maerkisch * src/standard.c (f_asin, f_asinh): The patch of March 2011 got the overall sign wrong in the (x == 0.0) case. Bug #3542862 2012-07-18 Ethan A Merritt * src/standard.c (f_acos): acos(x) was returning the complex conjugate of the correct result for complex input x with imag(x) > 0. Bug #3542862 * src/parse.c (set_up_columnheader_parsing): Take the column header from the second using spec (normally the Y coordinate) to satisfy set key autotitle columnhead; plot 'data' using "X":"Y" Bug #3542065 * src/datafile.c (plot_option_using): Track the appropriate column header when the column is specified via a non-string variable; e.g. plot for [i=1:N] 'data' using 1:(column(i)) Bug #3542065 2012-07-18 Bastian Maerkisch * term/win.trm (WIN_options): Specifying only the font size (ie. ",8") would overwrite the font name with a bogus string. Bug fix. 2012-07-17 Ethan A Merritt * src/hidden3d.c (draw_edge): Fix broken tracking of top/bottom color distinction in hidden3d plots when the line colors are not specified in palette or RGB mode. Bugfix 2012-07-06 Ethan A Merritt * src/qtterminal/QtGnuplotScene.cpp (wheelEvent) src/wxterminal/wxt_gui.cpp (OnMouseWheel): Pass current mouse position in the structure for mouse wheel events. 2012-07-04 Ethan A Merritt * src/pm3d.c (z2cb): After "set log cb", z2cb(x) was returning 0 for x<=0 rather than -inf. This causes it to be mistaken for the logged value of x=1. Now we return CB_AXIS.min instead. Bug #3540048 2012-07-03 Ethan A Merritt * src/graph3d.c (draw_3d_graphbox): Rather than treating the position of the z-axis label as a fixed 3D [x,y,z], always draw it at a fixed distance to the left of the z axis. This is a CHANGE in behavior. Bug #2879916 * src/qtterminal/QtGnuplotScene.cpp: Set Z value of zoom box to a large value so that it is not occluded by plot elements. * src/datafile.c (df_readascii): If the first line in a data file contains column headers (strings to be used as titles), then that line should be ignored when applying the "plot ... every N:M(:N1:M1)" filter. Bug #3438848 2012-06-29 Ethan A Merritt * src/plot2d.c (eval_plots): Zero is often a special point in a function domain. Make sure we don't miss it due to round-off error. Bug #3519079 2012-06-24 Ethan A Merritt * src/datafile.c: plot ... using "a":"b" was not setting the parse_1st_row_as_headers flag. Bug #3536514 2012-06-13 Bastian Maerkisch * config/mingw/Makefile config/msvc/Makefile: Include templates for initialization files in distribution. * src/win/wgraph.c (drawgraph): Do not try to detect color capabilities of printers. When drawing to a printer, scale line widths to match the widths on screen and fix placement of super- and subscripts. Bug #3503318 2012-06-12 Ethan A Merritt * src/datafile.c (df_readascii): Bugfix for label plots using column 0 to generate text. E.g. plot foo using 1:2:(sprintf("%d",$0)) with labels 2012-06-07 Ethan A Merritt * src/tabulate.c: Allow tabulation (set table) of pixel values for IMAGE RGBIMAGE RGBA_IMAGE. 2012-06-01 Ethan A Merritt * src/plot2d.c (box_range_fiddling): Autoscaling + auto-boxwidth + log scale on x = fail. Bug #3529285 2012-05-30 Ethan A Merritt * term/pslatex.trm: More helpful error message if output filename is not acceptable. Bug #3529832 * src/interpol.c (cp_implode): This routine was not preserving the z value (used as a weight by smooth acsplines) of input data points. Bug #3529621 2012-05-20 Bastian Maerkisch * src/win/wcommon.h src/win/wgnuplib.h src/win/wgraph.c: Remove limit on number of plots which can be toggled on/off via key entries. Maximum number of toolbar buttons still restricted to MAXPLOTSHIDE. Bug #3516417 2012-05-17 Shigeharu Takeno * docs/faq-ja.tex docs/gnuplot-ja.doc man/gnuplot-ja.1: Sync with English FAQ rev. 1.48 and documentation rev. 1.701.2.14. 2012-05-13 Ethan A Merritt * src/term.c (do_arc) src/graphics.c (do_ellipse): Clip the filled interior of circles and ellipses. Bug #3522515 * docs/gnuplot.doc src/graphics.c (do_rectangle): Establish a clipping behavior for rectangles - clip to fit in the graph unless one or both corners are given in screen coordinates. 2012-05-11 Ethan A Merritt * src/wxterminal/wxt_gui.cpp (wxt_cairo_refresh): Execution of the command list must be protected by command_list_mutex or it will blow up if the command list is cleared/replaced during execution. Bug #3371205 * src/graphics.c: allow log-scaled y axis when plotting with fillsteps Bug #3324785 2012-05-10 Ethan A Merritt * src/misc.c (lf_push lf_pop) src/misc.h: The lf_push/lf_pop mechanism for restoring context after a "call" statement was saving the individual call args $0 $1 etc, but failing to save the number of active args. Bug #3525155 2012-05-08 Ethan A Merritt * CodeStyle config/Makefile.am.in configure.in demo/Makefile.am.in lisp/Makefile.am m4/Makefile.am.in Makefile.am man/Makefile.am share/LaTeX/Makefile.am share/Makefile.am src/Makefile.am src/qtterminal/Makefile.am src/version.c src/wxterminal/Makefile.am term/Makefile.am.in tutorial/Makefile.am.in: Automake 1.12 removes support for the AM_C_PROTOTYPES macro and for conversion of ANSI C code to K&R C code. Gnuplot's CodeStyle file has warned since version 3.7 that gnuplot would drop support for ansi2knr "very soon". Now 12+ years later the other shoe has dropped. 2012-05-07 Ethan A Merritt * term/cairo.trm term/pslatex.trm: Fix 'set term cairolatex pdf mono' Bug-Debian: http://bugs.debian.org/668339 2012-05-06 Anton Gladky * src/command.c: Fix segfault in initial check of history when using --with-readline=bsd Bug-Debian: http://bugs.debian.org/665832 * src/plot.c: EAM - avoid calling buggy libedit emulation of using_history(). Bug-Debian: http://bugs.debian.org/598547 2012-05-05 Ethan A Merritt * src/term.c term/estimate.trm: Rename utf8_strlen to utf8_strwidth to avoid name collision. * src/internal.c (f_strlen f_range) src/util.c (strlen_utf8 gp_strlen) (utf8_strchrn gp_strchrn) src/util.h: Fix gnuplot's user-visible string handling routines strlen() and substr() so that they handle multibyte UTF-8 characters correctly. I.e. strlen() returns the number of characters, not the number of bytes. Other multi-byte encodings are not handled, however. Bug #3480075 2012-05-04 Ethan A Merritt * src/set.c(set_command) src/command.c(do_command): Test for empty iteration loop in "set for ..." and "do for ..." commands. 2012-04-27 Ethan A Merritt * term/svg.trm: Prevent illegal characters from being generated as subplot ids if there are more than 30 subplots in a multiplot. 2012-04-26 Jon Oddie * docs/doc2texi.c: Two bug fixes Cleaner code to determine which term files to read in d2t-get-terminals. Fix code for uniquifying duplicate node names. * configure.in docs/Makefile.in docs/doc2texi.c: Create an Emacs Lisp file of documentation strings extracted from the syntax descriptions in gnuplot.doc. Gnuplot-mode can then optionally display these strings as automatic one-line documentation while editing, 2012-04-24 Mojca Miklavec * term/aquaterm.trm: Clip images to bounding box. Reset line type at the start of each plot. 2012-04-20 Michael Reeves * src/graphics.c: Improved calculation of the margin space needed to hold rotated x and x2 tic labels. backported fix for Bug #3482491 2012-04-20 Ethan A Merritt * term/canvas.trm: backport recent changes (UTF-8 character set, precision of point coordinates). 2012-04-18 Ethan A Merritt * term/svg.trm: The svg code refers to CANVAS_OVERSAMPLE when it should refer to SVG_SCALE. Fortunately they both equal 10. 2012-04-17 Ethan A Merritt * src/misc.c (load_file): If the input file did not end in a newline, the test for balanced {} occurred too early, causing a false error if the final partial line did in fact contain the required }. Bug #3518476 2012-04-10 Ethan A Merritt * src/datafile.c (df_readbinary): Check for NaN in binary input. 2012-04-08 Ethan A Merritt Backport various minor additions from 4.7 * src/term.c src/svg.trm: Backport fix for toggling multiplots. * src/breaders.c src/datafile.c src/datafile.h src/plot2d.c src/plot3d.c src/stats.c: Try to report the name of the datafile in which an error was found. Handles plot, splot, and stats but not fit. * src/wxterminal/wxt_gui.cpp: Support horizontal mouse scroll (needs wxt 2.9.0). * src/gplt_x11.c: (Colin Macdonald) Set WM_CLASS to "Gnuplot" for the benefit of various window managers. 2012-04-08 Ethan A Merritt * src/misc.c (iso_alloc iso_extend): Initialize each 3D coordinate structure on allocation. Fixes problems found by valgrind and easily seen by running imageNaN.dem. 2012-04-03 Ethan A Merritt * src/axis.c (copy_or_invent_formatstring): Expansion to many decimal places of precision is not necessary if the axis range spans 0, because in that case exponential notation can be used instead. Bug #3514604 2012-04-01 Hannes Nagel * term/lua.term: Do not create external png images if they are not going to be used in the tex document. 2012-03-31 Ethan A Merritt * src/pm3d.c term/post.trm term/pslatex.trm src/term_api.h src/color.c: The core code should not write terminal-specific output. Instead define TERM_LAYER_BEGIN_PM3D_MAP and TERM_LAYER_END_PM3D_MAP and use the term->layer() mechanism. This prevents garbage from being written out to the cairolatex terminals in pm3d mode. Bug #3513291 2012-03-29 Ethan A Merritt * src/wxterminal/gp_cairo.c (gp_cairo_draw_polygon): Always stroke previous path before starting a new polygon. Also, dots are slow. Only draw them if specifically requested. Bug #3512955 2012-03-26 Ethan A Merritt * src/term.c (enhanced_recursion): Revised handling of backslash character in enhanced text processing. Bug #3496517 2012-03-16 Ethan A Merritt * term/post.trm term/svg.trm: Do not allow execution of popen() commands during initialization. 2012-03-08 RELEASE 4.6.0 2012-03-04 Ethan A Merritt * src/wxterminal/wxt_gui.cpp: Backport CVS fixes for toggling plots on/off in multiplots and to limit the toggle effect to the contents of the current plot. 2012-03-03 Petr Mikulik * docs/doc2ipf.c (process_line): Don't use assert() because it calls int_error(). 2012-03-02 Petr Mikulik * config/makefile.os2: version.o is required for gnuplot_x11.exe. 2012-03-02 Ethan A Merritt * PATCHLEVEL configure.in README.1ST INSTALL FAQ: Update for 4.6.0 * docs/gnuplot.doc: Point to www.gnuplot.info as the URL for all demos. * src/show.c src/plot.c config/mingw/Makefile: Enable code that was marked RELEASE_VERSION; disable alternative code by marking it DEVELOPMENT_VERSION. 2011-02-29 Bastian Maerkisch * win/gnuplot.iss: Prepare for 4.6 release. * config/mingw/Makefile: New target 'zip' for zip file distribution. 2012-02-25 Ethan A Merritt * configure.in tutorial/tutorial.tex: Update latex tutorial for version 4.6 but do not install it by default. 2012-02-25 Peter Juhasz * src/command.c src/misc.c src/plot.c src/plot.h: Unterminated blocks (i.e. missing }) in batch mode caused the program to erroneously wait for further input or - when commands were streamed through a pipe - crash. Fix: display appropriate error message instead. Bug #3491904 2012-02-22 Ethan A Merritt * src/stats.c: Remove order-dependence of keywords. Bug #3491215 2012-02-21 contributed anonymously * src/term.c (do_arc): Arcs smaller than 3 degrees were being reduced to a single line. Bug #3490227. 2012-02-21 David Leverton * src/graphics.c (edge_intersect): Fix a bug that failed to draw a pure horizontal or vertical line from out of range that crossed the entire range of a plot to terminate on the boundary. Bug #3488666 2012-02-14 Ethan A Merritt * src/plot2d.c src/graphics.c: The histogram code was not designed to mix well with other plot styles, and in particular with function plots. Fixes segfault on "plot 1, newhistogram illegal-syntax, foo". Fixes Bug #3486639 (key entry spacing of histograms + something else) 2012-02-09 Ethan A Merritt * term/wxt.trm src/term_api.h src/term.c src/qtterminal/qt_term.cpp src/wxterminal/wxt_gui.cpp: Switching the terminal from qt to wxt or vice versa causes the program to lock up or segfault. Introduce a flag terminal_interlock to prevent such a switch. 2012-02-08 Jérôme Lodewyck * src/qtterminal/QtGnuplotItems.h src/qtterminal/QtGnuplotItems.cpp: Fixed the const-ness of QtGnuplotKeybox members. 2012-02-06 Thanate Dhirasakdanon * term/lua.trm: Compatibility wrapper functions to support both lua 5.2 and earlier versions. * term/lua/gnuplot-tikz.lua: "tightboundingbox" option didn't match docs. 2012-02-06 Ethan A Merritt * src/plot2d.c: Remove error test that could not be reached in the DATA case and is incorrect in the FUNC case. 2012-01-30 Ethan A Merritt * src/term.c term/linux.trm: Provide a 5x9 raster font for linux.trm and svga.trm so that they are not dependent on --with-bitmap-terminals. Bug #3481336 2012-01-29 Ethan A Merritt * term/cairo.trm: Make the font scale handling more like pdf and eps. Bugs #3478745 #3480006 2012-01-26 Ethan A Merritt * src/graphics.c: If there is no key title, there is no need to draw a line between the title and the key samples. Bug #3478984 2012-01-25 Shigeharu Takeno * docs/gnuplot-ja.doc docs/term-ja.diff: Sync with English documentation. 2012-01-22 Tag Release_4_6_rc1 2012-01-17 Jérôme Lodewyck * configure.in src/Makefile.am src/qtterminal/Makefile.am src/qtterminal/QtGnuplotApplication.cpp src/qtterminal/QtGnuplotApplication.h src/qtterminal/QtGnuplotEvent.cpp src/qtterminal/QtGnuplotEvent.h src/qtterminal/gnuplot_qt.cpp src/qtterminal/qt_term.cpp term/qt.trm: The Qt terminal application is executed in a separate executable called gnuplot_qt, started by exec. This makes the Qt terminal compatible with OS X. 2012-01-17 Ethan A Merritt * src/eval.c (update_plot_bounds): Store the canvas size used by the previous plot in user accessible variables GPVAL_TERM_XSIZE, GPVAL_TERM_YSIZE. 2012-01-15 Mojca Miklavec * src/mouse.c (event_buttonpress): Treat mouse buttons 6/7 as left/right scroll events (e.g. from fingers on a touchpad). * src/qtterminal/QtGnuplotScene.cpp (mouseReleaseEvent): Pass horizontal scroll events through to gnuplot core as mouse events 6/7. 2011-01-15 Bastian Maerkisch * config/config.mgw: Sync with configure. 2011-01-14 Bastian Maerkisch Installer for Windows. Japanese translation by Shigeharu Takeno. * win/gnuplot.iss win/modpath.iss: Installer script to be compiled by Inno Setup. New files. * win/Copyright-ja.txt: Japanese translation of Copyright, includes original text. Encoding is Shift-JIS. * win/README-Windows.txt win/README-Windows-ja.txt: New files, displayed by installer before installation. Based on Tatsuro Matsuoka's README.Windows.gpteam and README. * config/mingw/Makefile: New make target 'installer'. * Makefile.am (EXTRA_DIST): Include win/ 2011-01-14 Bastian Maerkisch * tutorial/linepoin.plt: Avoid deprecated syntax. * config/mingw/Makefile config/msvc/Makefile src/plot.c: GNUPLOT_SHARE_DIR is relative to gnuplot directory on Windows. Extend build support for documentation, include in installer. 2012-01-11 Ethan A Merritt * src/util3d.h src/util3d.c (edge3d_intersect two_edge3d_intersect) src/graph3d.c (plot3d_lines_pm3d): The utility routines in util3d assumed that a 3D curve is always traversed in ascending order of the constituent points. But plot3d_lines_pm3d scans in both directions, leading to incorrect clipping and possible array over-run when the utility routines were called. Furthermore, the arrays holding the scan direction info were never initialized. Bug #3471163 2012-01-08 Ethan A Merritt * src/plot.c: Allow shell commands from ~/.gnuplot but not from shared initialization files. * configure.in: Report status of aquaterm configuration correctly (Lutz Maibaum). 2012-01-07 Jérôme Lodewyck * src/qtterminal/QtGnuplotScene.cpp: Normalize the zoom rectangle to avoid redrawing artifacts 2012-01-07 Ethan A Merritt * src/misc.c (lf_pop): If the current input stream from "load file" is really a pipe, close it with pclose() rather than fclose(). Bug #3470351 2012-01-07 Jérôme Lodewyck * src/qtterminal/QtGnuplotScene.cpp: Normalize the zoom rectangle to avoid redrawing artifacts 2012-01-05 Ethan A Merritt * configure.in src/Makefile.am: Tweak autodetection of Qt utilities to handle differences in the Qt 4.6 and 4.7 pkg-config files. * src/set.c: Call gp_expand_tilde() in 'set loadpath' and 'set fontpath'. 2012-01-04 Ethan A Merritt * src/hidden3d.c: Fix an uninitialized colorspec found by valgrind. The trigger was hidden3d handling of '... with labels tc palette'. 2012-01-02 Ethan A Merritt * configure.in term/qt.trm In src/qtterminal: QtGnuplotEvent.cpp QtGnuplotEvent.h QtGnuplotItems.cpp QtGnuplotItems.h QtGnuplotScene.cpp QtGnuplotScene.h QtGnuplotSettings.ui QtGnuplotWidget.cpp QtGnuplotWidget.h qt_term.cpp qt_term.h README.Qt: Update qt terminal to support pointsize, dashed lines, round linejoins, term->layer(), LT_BACKGROUND, mouse toggling, faster rendering. 2012-01-01 Ethan A Merritt * src/qtterminal/QtGnuplotApplication.cpp (processEvent): * src/wxterminal/wxt_gui.cpp (wxt_atexit): In "persist" mode, if all qt plot windows were already closed when the main program exited then the daughter process would become a zombie. Even worse for wxt; if _any_ plot windows had been closed then the persisting daughter process would become a zombie. Bugfix. 2011-12-29 Ethan A Merritt * src/plot.c src/plot.h src/qtterminal/qt_term.cpp: Provide a function cancel_history() that can be called by terminal helper processes after forking so that the history file isn't trashed on exit. Bug #2950711 * docs/gnuplot.doc: Minor updates to match 4.6 configuration. 2011-12-28 Ethan A Merritt * docs/gnuplot.doc share/Makefile.am share/colors_default.gp share/colors_mono.gp share/colors_podo.gp share/gnuplotrc src/Makefile.am: Provide template initialization files, including examples of customizing the linetype color sequence. These are installed in $GNUPLOT_SHARE_DIR (usually /usr/local/share/gnuplot/4.6). * src/command.c src/datafile.c src/help.c src/history.c src/misc.c src/plot.c src/plot.h src/term.c src/variable.c: Do not allow execution of system(), shell, or popen() commands in the initialization files. * src/plot.c src/show.c: More compact splash page. * src/graphics.c src/graphics.h src/graph3d.c: Strangely, the final parameter of place_objects(,,,clip_area) was (1) never used and (2) shadowed a global parameter that _was_ used. Bug #3426247 * configure.in: Default to --enable-stats --without-bitmap-terminals * configure.in PATCHLEVEL: Report as version 4.6.rc1 2011-12-25 Ethan A Merritt * src/qtterminal/QtGnuplotEvent.cpp src/qtterminal/QtGnuplotScene.cpp: If two button release events occur in quick succession then the program messes up the event handling and winds up in a non-recoverable state. Apply an empirical fix to ignore events in a 300 msec window. Also rather than ending up a zombie, exit explicitly on a sync error. Bugfix 2011-12-21 Ethan A Merritt * src/plot2d.c: The default sequence of histogram colors was one off from the default sequence of line colors. Bugfix. 2011-12-11 Bastian Maerkisch * config/config.nt config/config.mgw: Sync with config.h created by autoconf. * src/msvc/Makefile: More complete install target. Add new variables to hold paths to external libraries. * src/mingw/Makefile: Include index in gnuplot.pdf. Support building of the Japanese help file wgnuplot-ja.chm. * src/eval.c (update_gpval_variables): New variable GPVAL_ENCODING. * term/gd.trm (gd_iconv): Silence const mismatch compiler warning in call to iconv by casting second argument to (void *). * src/syscfg.h: All tested platforms (XP, Vista, 7) support '/' as directory separator. * src/win/winmain.c: Automatic language detection can be overridden by new setting "Language=XX" in wgnuplot.ini. Suggestion by Shigeharu Takeno. * src/win/wpause.c: Remove local definition of TBOOLEAN. * docs/plotstyles.gnu: Prefer pngcairo over png terminal. Use font "Times New Roman" on Windows. * demo/random.dem: Use loops to create random number data sets. 2011-12-08 Ethan A Merritt * docs/gnuplot.doc docs/Makefile.in term/context.trm docs/doc2rnh.c: Miscellaneous documentation updates, remove dead URLs. * configure.in docs/gnuplot.doc src/plot.c src/show.c config/config.cyg config/config.dj2 config/config.mgw config/config.nt config/config.os2 config/config.oww config/makefile.unx: Despite what it says in the documentation, and despite what the configure script prints out, auto-configuration never defined the NOCWDRC flag to disable reading an initialization file .gnuplot from the current directory. This is a security risk. Furthermore, having to define something special to get the secure state is bad design. Fix the configuration script and default to not initializing from the current directory. Put a warning in various config files. 2011-11-29 Shigeharu Takeno * docs/Makefile.in: Remove duplicate entry for qt in CORETERMS. 2011-11-28 Ethan A Merritt * src/scanner.c (legal_identifier) src/scanner.h src/stats.c: Make sure that the variable name produced by the "stats ... prefix" command is a legal identifier. Bug #3441395 * src/set.c (set_palette): Add missing check for conflicting options. 2011-11-26 Ethan A Merritt * term/cairo.trm: Revert the change of 2011-08-25 that tried to skip empty vectors. The concept was sound but the implementation was not correct, leading to mysteriously missing lines. Bugfix. 2011-11-24 Ethan A Merritt * src/term_api.h src/misc.c src/hidden3d.c: New flag LT_SINGLECOLOR passed through to hidden3d to indicate that the user gave an explicit surface color in the splot command. Bugfix. 2011-11-22 Ethan A Merritt * Branchpoint for 4.6 cvs tag -b branch-4-6-stable 2011-11-22 Ethan A Merritt * src/contour.c (contour): Format contour labels using gprintf rather than sprintf so that LC_NUMERIC and "set decimal" are honored. Bugfix. * term/js/gnuplot_svg.js: Try to correct for coordinate offset due to scrollbars. The fix is unfortunately browser specific. 2011-11-22 Peter * term/svg.trm: "standalone" option includes gnuplot_svg.js mousing support directly in the output *.svg file rather than linking to it as an external resource. 2011-11-18 Daniel Leidert * demo/html/webify.pl demo/html/webify_svg.pl demo/html/webify_canvas.pl Use perl5 native routine ctime() rather than perl4 external module. * src/datafile.c term/epson.trm term/post.trm: Typos. * configure.in: Check for lua5.1.pc if lua.pc is not found. * man/gnuplot.1: Add some needed character escapes. 2011-11-18 Bastian Maerkisch * src/win/wgdiplus.cpp src/win/wgdiplus.h src/win/wgnuplib.h src/win/wgraph.c src/win/wresourc.h: Antialiasing of fill patterns. * src/win/wgraph.c (CopyPrint): Use Print Setup dialog since the Page Setup dialog does not offer a possibility to change printer. Do not use antialiasing on printers. 2011-11-15 Bastian Maerkisch * src/win/wgnuplib.h src/win/wgraph.c term/win.trm: Store current text encoding in list of drawing ops. 2011-11-15 Ethan A Merritt * src/axis.h src/axis.c (parse_range, parse_named_range) src/axis.c (save_writeback_all_axes check_axis_reversed) src/fit.c src/plot2d.c src/plot3d.c src/stats.c src/unset.c: Replace axis-related macros with equivalent subroutines. 2011-11-14 Ethan A Merritt * config/Makefile.am.in demo/Makefile.am.in m4/Makefile.am.in tutorial/Makefile.am.in term/Makefile.am.in: Make sure that the generated files Makefile.am and gnuplot-tikz.help do not end up non-writable by the owner, which caused build cleanup problems while packaging. Bug #3419881 2011-11-14 Peter Juhasz * src/plot2d.c (store2d_point): Fix for 4-column mode of BOXPLOT style which did not handle log scale correctly. 2011-11-14 Bastian Maerkisch * src/win/wgnuplib.h src/win/wgraph.c src/win/winmain.c src/win/wtext.c: Localisation support for menu and help files. Files are loaded according to current language settings from files named "wgnuplot-LL.mnu" and "wgnuplot-LL.chm", where LL is the abbreviation of the current language. Fall back to "wgnuplot.mnu" and "wgnuplot.chm" if localised files don't exist. Defaults may be overwritten by new entries "MenuFile" and "HelpFile" in wgnuplot.ini. Choose appropriate default fonts in Japanese environments. src/show.c (show_version) src/win/winmain.h: List correct names of menu and help files on Windows. src/win.trm (WIN_set_color): Immediately translate palette color values to RGB instead of passing them on. This makes it possible to use more than one palettes in multiplots and in different graph windows. Test e.g. with pm3dcolors.dem * src/win/wgraph.c src/win/wresourc.h src/win/wgnuplib.h: Add a separate switch to toggle antialiasing of polygons. * src/win/wgraph.c (Draw_XOR_Text): Implement a 10 year old FIXME: Use proper raster operation instead of double inversion. 2011-11-12 Shigeharu Takeno * src/win/README.win-ja src/win/wgnuplot-ja.mnu: Update and sync with wgnuplot.mnu 2011-11-12 Bastian Maerkisch * src/set.c (set_degreesign): Windows implementation using a Windows API call since iconv() does not understand locales as returned by setlocale(). * src/command.c (help_command): HTML help window need to occlude the text window. * term/win.trm (WIN_filled_polygon): Use boxfill for filled polygons which are actually rectangles. * src/win/wgnuplib.h src/win/wgraph.c: Add support in windows terminal for toggling individual plots on/off by clicking on the corresponding key sample in addition to toggling via toolbar buttons. 2011-11-11 Ethan A Merritt * src/set.c (set_degreesign): More attempts to work around oddities in Solaris locale handling. 2011-11-10 Shigeharu Takeno * docs/gnuplot-ja.doc docs/term-ja.diff: Sync to docs version 1.699. * docs/gnuplot.doc term/be.trm term/cairo.trm term/context.trm term/win.trm: Fix typos. 2011-11-09 Ethan A Merritt * src/axis.c src/command.c src/eval.c src/gadgets.c src/graphics.c src/internal.c src/tables.c src/unset.c src/util.c src/util.h term/post.trm: Fix or remove some FIXMEs. 2011-11-09 Bastian Maerkisch * doc/gnuplot.doc: New terminal driver epscairo. * term/gd.trm: Don't use gd font pointer variables for builtin fonts. 2011-11-08 Ethan A Merritt * configure.in src/set.c: Use nl_langinfo(CODESET) to find the encoding. This hopefully works around non-standard encoding names used by Solaris. * src/wxterminal/wxt_gui.cpp: Toggle for "plot ... with circles" 2011-11-08 Bastian Maerkisch * doc/gnuplot.doc [New features]: Document new cairolatex and revised windows terminal. 2010-11-08 Tatsuro Matsuoka * src/set.c (set_degreesign): Move include of iconv.h to top level. 2011-11-07 Bastian Maerkisch * term/fig.trm: Update help on font option. * term/context.trm: Avoid use of round() because MSVC is still not C99-compliant. New terminal driver cairolatex, which uses the cairo EPS or PDF backend for graphics output and LaTeX text created by functions shared with the epslatex and pslatex terminals. * term/cairo.term term/post.h term/post.trm term/pslatex.trm: New terminal driver cairolatex. Patch #3413095 2011-11-06 Mojca Miklavec Add a context terminal, which creates output suitable for ConTeXt. * configure.in docs/doc2texi.el docs/gnuplot.doc docs/Makefile.in src/makefile.all src/makefile.awc src/term.h term/context.trm: New terminal driver context. Patches #1654807 and #1503836. Feature Request #2815867. 2011-11-05 Ethan A Merritt * src/wxterminal/wxt_gui.cpp src/wxterminal/wxt_gui.h src/wxterminal/wxt_term.h term/wxt.trm: Add support in wxt terminal for toggling individual plots on/off by clicking on the corresponding key sample. 2011-11-04 Ethan A Merritt term/wxt.trm src/wxterminal/wxt_term.h src/wxterminal/wxt_gui.cpp: Add a term->layer() entry point for the wxt terminal. * src/mouse.c src/term_api.h: TERM_LAYER_BEFORE_ZOOM 2011-11-02 Ethan A Merritt * src/util.c src/util.h src/set.c (set_encoding set_degreesign): Provide an internal char sequence degree_sign[] appropriate for the current encoding. Use iconv(), if available, to translate it into the environment's locale after `set encoding locale`. * src/show.c (show_decimalsign): Show the degree sign also, mostly so that people can report problems with the encoding code above. 2011-11-01 Bastian Maerkisch * src/win/wmenu.c src/win/wtext.c: Use proper dropdown menu for Options toolbar item. 2011-10-30 Bastian Maerkisch * INSTALL: Update Windows section. * config/makefile.mgw: Superseded by config/mingw/Makefile. Removed. 2011-10-30 Shigeharu Takeno * config/config.nt config/makefile.nt: Windows console apps support pipes. 2011-10-30 Bastian Maerkisch * config/config.cyg config/config.mgw config/config.nt config/config.oww: Enable stats command. 2011-10-28 Ethan A Merritt * src/color.c (make_palette): Fix segfault caused by initializing a terminal with an "infinite" color palette (colors == 0) when previous terminal had merely a large color palette (e.g. WIN_PAL_COLORS 4096). Bug #3429772 2011-10-24 Ethan A Merritt * src/axis.c src/axis.h src/datafile.c src/fit.c src/mouse.c src/plot2d.c src/plot3d.c src/save.c src/set.c src/setshow.h src/show.c src/stats.c src/tabulate.c src/unset.c term/canvas.trm term/svg.trm: Change the axis structure field from TBOOLEAN axis.is_timedata to an enum {DT_NORMAL, DT_TIMEDATE} field axis.datatype. This is preparation for adding code to implement a new mode DT_DMS (degrees, minutes, seconds) that tracks x and/or y as geographic coordinates. There is no change to the behavior of the current code. 2011-10-22 Ethan A Merritt * term/svg.trm: Friendlier error message, add a tag at the top of the output svg document. 2011-10-17 Christoph Bersch <cbersch@users.sourceforge.net> * docs/doc2texi.el: Handle presence of three nodes with the same key. 2011-10-14 Ethan A Merritt <merritt@u.washington.edu> * src/specfun.c (humlik): Re-order code to avoid accessing an unitialized variable. * term/emf.trm (EMF_put_text): Re-order code to avoid accessing an unitialized variable. * src/command.c (else_command): An else clause might either be processed by if_command() or else_command(). The latter was not correctly updating c_token. * src/misc.c (lf_load): Tie maximum depth of load commands to STACK_DEPTH. 2011-10-13 Ethan A Merritt <merritt@u.washington.edu> * docs/gnuplot.doc docs/titlepag.tex: Revise the sections that describe function plots to mention `set samples`. Allow the table of builtin functions to split across pagebreaks in the TeX documentation. * src/wxterminal/gp_cairo.c: Decrease linewidth used by pdfcairo terminal for pattern fill. This works around what seems to be a pdf bug in libcairo versions through at least 1.10. * src/fit.c (error_ex): Exit via int_error() so that it can walk through the list of XXX_reset_after_error() routines. 2011-10-10 Ethan A Merritt <merritt@u.washington.edu> * src/hidden3d.c: Bump default QUADTREE_GRANULARITY from 10 to 30. At 10, 24% of the CPU time for all.dem is spent in hidden line removal. At 30 this decreases to 12%, for roughly a 10% speed increase overall. 2011-10-10 Peter Juhasz <juhaszp@users.sourceforge.net> * src/datafile.c src/datafile.h src/gadgets.h src/graphics.c src/graphics.h src/plot2d.c src/save.c src/set.c src/show.c demo/boxplot.dem docs/gnuplot.doc: Add new mode for the "with boxplot" plot style. If there is a 4th column in the using spec, the values in it it will be interpreted as the discrete levels of a factor variable. As many boxplots will be drawn as there are different values in the factor column, each boxplot representing part of the dataset. These boxplots are optionally labeled and sorted. New options "separation", "label", and "sorted"/"unsorted" to "set style boxplot" govern the behavior of this new mode. The demo "boxplot.dem" is extended to showcase the new capability. 2011-10-09 Shigeharu Takeno <shige@iee.niit.ac.jp> * src/internal.c (f_sprintf): More complete MSVC++ snprintf() patch. 2011-10-09 Adam Strzelecki <ono@users.sourceforge.net> * src/wxterminal/wxt_gui.h src/wxterminal/wxt_gui.cpp: Work around a number of issues compiling and running wxt with wx 2.9 using 64-bit Cocoa on OSX Lion. All changes are #ifdef __WXOSX_COCOA__. These may not be necessary once Cocoa reaches a stable release. (1) use wxToolbar AddStretchableSpace rather than AddSeparator (2) wx Cocoa does not support logical operators such as wxDC inverse (3) wx Cocoa toolbar icons are blurry unless they are 24x24 (4) wx Cocoa does not define _Bool even though it says it does 2011-10-07 Ethan A Merritt <merritt@u.washington.edu> * src/color.h src/command.c src/getcolor.c src/gplt_x11.c src/save.c src/set.c src/show.c src/tables.c src/tables.h term/post.trm term/x11.trm demo/pm3d.dem docs/gnuplot.doc: New palette option "cubehelix". The is a family of palettes with the general property of combining N cycles of a color-wheel with a monotonic increase in overall intensity. This feature was suggested by Ingo Thies. See: D A Green (2011) "A colour scheme for the display of astronomical intensity images" http://arxiv.org/abs/1108.5083 2011-10-06 Shigeharu Takeno <shige@iee.niit.ac.jp> * src/internal.c (f_sprintf): Always null-terminal a string written by the non-ANSI compliant MSVC++ routine _snprintf(). 2011-10-03 Bastian Maerkisch <bmaerkisch@web.de> * term/win.trm (WIN_options): When searching the list of graph windows the correct test is for window Id. 2011-10-03 Rich Seymour <richseymour@users.sourceforge.net> * term/svg.trm: Look for strings " Bold" and/or " Italic" in font name and set the corresponding properties if found. Patchset #3058920. 2011-10-03 Bastian Maerkisch <bmaerkisch@web.de> * term/post.trm (PS_options): Properly contain new variable in a block. Bug #3417716 * src/Makefile.maint: New target makefile.awc. * src/makefile.all src/makefile.awc: Regenerated to include stats.c. 2011-10-02 Ethan A Merritt <merritt@u.washington.edu> * configure.in src/Makefile.am src/command.c src/command.h src/show.c src/stats.c src/stats.h src/tables.c docs/gnuplot.doc: New command to generate a statistical summary of the data in a file. stats "datafile" [using col1[:col2]] [nooutput] [name "PREFIX"] Data is read from the input file under the control of the same options used for 'plot' commands (e.g. xrange, yrange, using, index, every). The min/max/mean/stddev/quartiles of data from one or two data columns are printed to the terminal and stored in named variables. These variables can be used to modify subsequent plot commands. This code was developed primarily by Philipp Janert and Zoltán Vörös. * demo/html/Makefile demo/html/Makefile.svg demo/html/Makefile.canvas demo/stats.dem demo/all.dem: New demo to exercise stats code. 2011-10-01 Bastian Maerkisch <bmaerkisch@web.de> * term/cairo.trm: Depending on the version, Cairo defaults to cropping eps files to the minimal bounding box. This patch adds support for the {no}crop option to the epscairo terminal. Cropping is prevented by putting two points in background color in opposite corners, or by directly setting the bounding box for Cairo newer than 1.11.0. * config/mingw/Makefile: Include epscairo terminal. 2011-10-01 Christoph Bersch <cbersch@users.sourceforge.net> * term/post.trm term/pslatex.trm: New options `background` and `nobackground` for terminals postscript, epslatex, pstex and pslatex. Patch #3415158 2011-09-29 Ethan A Merritt <merritt@u.washington.edu> * src/color.c src/graph3d.c src/graphics.c: User-specified axis tick labels should override auto-generated tick labels in 3D plots just as they already do in 2D plots. * src/plot2d.c: In `plot with labels`, skip labels for which the x,y coordinates are UNDEFINED. Bug #3415454 * term/js/gnuplot_mouse.css: Opera is picky about missing units. 2011-09-27 Ethan A Merritt <merritt@u.washington.edu> * term/emf.trm term/fig.trm term/metapost.trm term/tgif.trm: Prefer the new syntax set term ... font "<name>,<size>" in the documentation. This does not change the terminal input, only the docs and the options string echoed back by "show term". * term/canvas.trm: Implement set term canvas ... font "<name>,<size>". Currently the name is ignored. 2011-09-23 Ethan A Merritt <merritt@u.washington.edu> * docs/gnuplot.doc src/plot2d.c: Defer interpretation of newhistogram linetype until the histogram itself is drawn. 2011-09-21 Bastian Maerkisch <bmaerkisch@web.de> * demo/borders.dem: Use loop instead of `reread`. * demo/image2.dem: Explicitely `reverse` axes. * src/win/wgraph.c (drawhraph) [W_filled_polygon_draw]: Transparent pattern fill actually fills with white background since 2011-05-15. Fixed. * src/win/wgnuplib.h src/win/wgraph.c (WndGraphProc) term/win.trm (WIN_options, WIN_update_options): Update term options on changes via graph window/menu. Track font face and size as read from ini-file. * src/stdfn.c|h (gp_basename) term/pslatex.trm (PSTEX_common_init): Move code from pslatex.trm to new function gp_basename which takes two different directory separators into account and does not change its argument. 2011-09-16 Peter Hedwig <peter@affenbande.org> * term/lua/gnuplot-tikz.lua: Modify the commands used for rgb color selection so that they are compatible with context as well as tikz. Bug #3401068 2011-09-16 Oliver Jennrich * term/lua/gnuplot-tikz.lua: Update syntax used for setting line join properties. Bug #3410554 2011-09-12 Bastian Maerkisch <bmaerkisch@web.de> * config/mingw/Makefile: Fix building gnuplot.ps and gnuplot.pdf. Include figures in gnuplot.pdf. Define new targets 'console', 'windows' and 'pipes' to build different versions of gnuplot. Use separate file extensions for each version. Let 'make all' build all versions. Match 'install' target to Tatsuro Matsuoka's packages. 2011-09-09 Ethan A Merritt <merritt@u.washington.edu> * docs/doc2tex.c docs/titlepag.tex: Tweak format of TeX documentation (no section numbers in table of contents, text width appropriate for paper size). 2011-09-09 Bastian Maerkisch <bmaerkisch@web.de> src/win/wgnuplib.h src/win/wgraph.c src/win/wresourc.h term/win.trm: Add a toolbar to the graph window. Currently, it offers icons for Copy, Print, Save and Options. Additionaly, plot elements can be temporarily hidden, ie. without a `replot`. This is much like what can be done using canvas and svg terminals and is implemented using term->layer. 2011-09-08 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (plot_image_or_update_axes): "with image" from a function may not make sense, but at least it should not segfault. Bug #3406642 2011-09-07 Ethan A Merritt <merritt@u.washington.edu> * src/parse.c (parse_sum_expression): Simplify construction of summation action table. * src/command.c (undefine_command) src/eval.c (del_udv_by_name): Break out the guts of undefine_command into a utility routine that can be called internally. * src/hidden3d.c (build_networks): Valgrind found a test against an uninitialized field. 2011-09-06 Ethan A Merritt <merritt@u.washington.edu> * configure.in: cairo_ps_surface_set_eps is only supported by cairo version 1.6.0 or later. 2011-09-05 Ethan A Merritt <merritt@u.washington.edu> * src/term.c term/canvas.trm: Allow canvas and svg terminals to provide mousing even if gnuplot itself is built without USE_MOUSE. * src/gplt_x11.c src/Makefile.am: gnuplot_x11 --version 2011-09-04 Bastian Maerkisch <bmaerkisch@web.de> * src/readline.c (fn_completion, tab_completion, isdoublewidth) src/win/screenbuf.h (sb_calc_length) src/win/wcommon.h (open_printer, close_printer) src/win/wgraph.c (UnicodeText) src/win/winmain.c (ShutDown, CheckMemory) src/win/wmenu.c: Add missing prototypes, make local functions static. * src/alloc.c src/alloc.h src/ansicheck.h src/command.c src/command.h src/plot.c src/scanner.c src/stdfn.c src/syscfg.h src/term.c: Remove conditional code for Atari Pure C and Borland C compilers. * src/axis.c src/command.c src/datafile.c src/getcolor.c src/misc.c src/pm3d.c src/variable.c: Remove unused variables and prototypes. 2011-09-03 Ethan A Merritt <merritt@u.washington.edu> * term/svg.trm term/canvas.trm term/js/gnuplot_mouse.js term/js/gnuplot_svg.js: Add support for time coordinates to the mousing code used by svg and canvas terminals. In this initial implementation, only the primary X axis is checked, and there is no provision for a user-supplied format. 2011-09-02 Ethan A Merritt <merritt@u.washington.edu> * configure.in term/cairo.trm: Check for the presence of cairo-ps.h before trying to build the epscairo terminal. 2011-09-02 Bastian Maerkisch <bmaerkisch@web.de> * docs/makefile.ami docs/old/README.ami docs/old/README.win src/gnuplot.prj src/linkopt.ztc: Removed. * config/makefile.unx docs/Makefile.in src/Makefile.am: Remove references to obsolete files. 2011-09-01 Ethan A Merritt <merritt@u.washington.edu> * configure.in: Yet another rewrite of the installation path rules for TeX files. Bug #3401370 * configure.in: Remove some obsolete status messages. 2011-09-01 Shigeharu Takeno <shige@iee.niit.ac.jp> * term/emf.trm (EMF_put_text): Use iconv to handle Shift_JIS encoding. 2011-08-31 Ethan A Merritt <merritt@u.washington.edu> * m4/apple.m4: Revert change of 2011-07-23 (aquaterm LIBS) * configure.in: Rewrite the installation path rules for TeX files. Bug #3401370 2011-08-29 Bastian Maerkisch <bmaerkisch@web.de> * src/winmain.c (_WIN32_IE): MinGW64 headers require IE >= 501. Bug #3398189 2011-08-29 Ethan A Merritt <merritt@u.washington.edu> * src/gplt_x11.c src/stdfn.h src/getcolor.c: Make "assert" statements trigger int_error() rather than abort(), so that debugging is easier. 2011-08-28 Shigeharu Takeno <shige@iee.niit.ac.jp> * docs/gnuplot-ja.doc docs/term-ja.diff: sync to docs version 1.688 2011-08-28 Peter Juhasz <juhaszp@users.sourceforge.net> * src/plot2d.c (get_data): Revert yesterday's change to this file because it broke stringvar.dem. 2011-08-27 Ethan A Merritt <merritt@u.washington.edu> * PORTING src/makefile.all src/makefile.awc src/term.h configure.vms config/config.cyg config/config.dj2 config/config.mgw config/config.nt config/config.os2 config/config.oww config/makefile.unx configure.in: Remove obsolete mgr terminal driver. The mgr window system offered a terminal sort of like xterm+graphics in the era of Sun3 (i.e. early-mid 1990s). Source for the mgr server has apparently disappeared from the net. Gnuplot's mgr.trm supported only text and vector commands, so even if an operational installation of mgr could be found, features added to gnuplot since about version 3.7 would be irrelevant. Let it go. 2011-08-27 Peter Juhasz <juhaszp@users.sourceforge.net> * src/datafile.c (expect_string) src/eval.c src/eval.h docs/gnuplot.doc: Add patch #3397007 to complete the support for named columns with the "labels" style. The following now works: plot 'data' using "A":"B":"labels" with labels Update the documentation. * src/datafile.c (f_timecolumn) src/plot2d.c: Track the current using spec to ensure that the timecolumn function gets the right timeformat. (fixes part of bug #3163386) * demo/timedat.dem: Remove the relative date demo because it was misleading and incorrect. * src/set.c (set_tics): For some options set_tics() didn't act on all axes. * src/graphics.c (boundary): Fix (?) boundary calculation for "set xtics rotate". 2011-08-25 René Haber <renehaber@users.sourceforge.net> * term/cairo.trm: New terminal epscairo using the shared cairo/pango code to produce and export an eps surface. * term/term.c: Allow "set term eps" as short for "set term epscairo". 2011-08-24 Bastian Maerkisch <bmaerkisch@web.de> * src/command.c src/command.h src/win/winmain.c: "raise/lower <id>" command for windows terminal. * src/command.c (rlgets): Restore code for builtin readline which was deleted by accident. 2011-08-23 Peter Juhasz <juhaszp@users.sourceforge.net> * src/datafile.c (f_stringcolumn) docs/gnuplot.doc: Implement 'stringcolumn("string")' in using specs to allow named columns for the "labels" style too. The more natural plot 'data' using "A":"B":"labels" with labels still doesn't work: document this fact. 2011-08-23 Bastian Maerkisch <bmaerkisch@web.de> * src/command.c (rlgets): Removing duplicate entries trashes command line history when using editline. Just suppress adding the same command to history repeatedly. * src/history.c (history_find_all): editline's version of history_set_pos() does not work, so traverse history list manually. History indices are reversed compared to GNU readline. Fixes history ?. Patch #3186010 * term/emf.trm (EMF_put_text): Use iconv (if available) to convert UTF-8 encoding to UTF-16 and store using wide characters. Bug #3021779 * config/config.mgw config/mingw/Makefile: add support for libiconv 2011-08-22 Ethan A Merritt <merritt@u.washington.edu> * src/graph3d.c: Honor 'set key maxrows N' in 3D plot key. Bug #3396501 2011-08-19 Ethan A Merritt <merritt@u.washington.edu> * src/commands.c src/misc.c docs/gnuplot.doc: The old-style if/else syntax cannot be mixed with the new syntax using { and } to enclose blocks of commands, possibly spanning several lines. Add stronger warnings to the documentation and issue an error message if an old-style if statement is encountered inside a bracketed clause. Bug #3393631 2011-08-15 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wgraph.c (WndGraphProc): Restore text window on space key: also show terminal window if it is currently minimized. * src/command.c (pause_command) src/win/wgnuplib.h (GW) src/win/wgraph.c src/win/winmain.h src/win/winmain.c term/win.trm: Support multiple graph windows. All state variables of graph windows were contained in a single struct already. Replace all references to this struct (graphwin) by pointers and dynamically allocate new instances when required. Do not pass on mouse and key events from inactive windows. Note: Since a single number passed to `set term win` is now interpreted as window identifier, the old and fontsize options are no longer supported and the `font` keyword is now required. This is consistent with other terminals (e.g. x11 and wxt). * src/win/wgnuplib.h src/win/wgraph.c: Make GraphChangeFont static. 2011-08-15 Reinier Heeres <rheeres@users.sourceforge.net> * src/win/pgnuplot.c: Detect termination of wgnuplot. Slightly enhanced version of SF patch #2373741. 2011-08-09 Ethan A Merritt <merritt@u.washington.edu> * PORTING config/config.cyg config/config.dj2 config/config.mgw config/config.nt config/config.os2 config/config.oww config/makefile.unx configure.in configure.vms docs/Makefile.in docs/doc2texi.el docs/gpcard.tex src/Makefile.am src/makefile.all src/makefile.awc src/rgipgnu src/term.h term/rgip.trm Remove code specific to the rgip terminal (Redwood Graphics Interface Protocol). The company (uniplex) supporting this protocol no longer exists. The terminal itself no longer compiles cleanly, and valgrind shows many buffer overflows and alloc/free errors. 19 files changed, 13 insertions(+), 841 deletions(-) 2011-08-02 Ethan A Merritt <merritt@u.washington.edu> * docs/plotstyles.gnu docs/gnuplot.doc term/be.trm term/canvas.trm term/cgm.trm term/ai.trm term/aquaterm.trm term/cgi.trm: Documentation updates * src/wxterminal/wxt_gui.cpp (OnCreateWindow): It is not acceptable to have every new plot window occlude the center of the screen. 2011-08-01 Micha Wiedenmann <mw-u2@gmx.de> * src/eval.h src/eval.c (get_udv_by_name free_at) src/show.c (disp_at) src/internal.h src/internal.c (f_sum) src/parse.c (parse_sum_expression) docs/gnuplot.doc demo/bivariat.dem: New expression type for summation: sum [<var> = <beg> : <end>] <something> 2011-07-30 Stefan Reiser <stefanreiser@users.sourceforge.net> * src/win/wgraph.c (WriteGraphIni): Fix spelling of "Antialiasing" field. Bug #3382732 2011-07-27 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (plot_impulses): Skip UNDEFINED points. Bug #3382469 2011-07-28 Bastian Maerkisch <bmaerkisch@web.de> *src/win/wgraph.c (GraphEnhancedOpen, GraphEnhancedFlush): Fix sign error in placement of rotated enhanced text with sub-/superscripts. 2011-07-27 Ethan A Merritt <merritt@u.washington.edu> * term/svg.trm: Handle multiple overprint characters, albeit not the way people probably expect. Bug #3371782 2011-07-25 Ethan A Merritt <merritt@u.washington.edu> * term/svg.trm: Remove size limit on svg plot dimensions. 2011-07-24 Ethan A Merritt <merritt@u.washington.edu> * src/wxterminal/wxt_gui.cpp: Fix MSWin breakage from yesterday's patch due to conditional code block damage. Bug #3376861 * src/datafile.c (df_readbinary): Allow "using ... xticlabels()" for binary files as well as ascii files. Only string-valued functions are valid in this case, as no string can be read from the binary datafield itself. * src/graph3d.h src/hidden3d.c src/misc.c src/misc.h src/plot3d.c: Re-work assignment of color and line type to top/bottom hidden3d surfaces. Keep the user-requested linetype in a new field of the splot structure, since otherwise linetype definitions would overwrite it. 2011-07-23 Adam Strzelecki <ono@users.sourceforge.net> * src/wxterminal/wxt_gui.cpp src/wxterminal/wxt_gui.h m4/apple.m4: OSX support for wxt terminal. For OSX, switch to using single-threaded hybrid GUI & console event loop at wxt_waitforinput(). Add -framework ApplicationServices to the apple-specific configuration flags. 2011-07-23 Mojca Miklavec <mojca.miklavec.lists@gmail.com> * m4/apple.m4: Replace -laquaterm with -Wl,-framework -Wl,AquaTerm which is supposed to make the Macports version of aquaterm install properly. 2011-07-22 Peter Juhasz <juhaszp@users.sourceforge.net> * src/parse.c src/parse.h plot2d.c plot3d.c set.c unset.c command.c: Revise iteration-over-plot mechanism to handle edge cases of nested iteration correctly. 2011-07-20 Peter Hedwig <peter@affenbande.org> * term/lua/gnuplot-tikz.lua: Point types 10 and 11 were upside down. Bug #3368877 * fill paths now have a pensize > 0 to have slight overlap of tiles to avoid rendering artifacts * path building was broken and showed interrupted lines on certain plots e.g. plot '+' u 1:($1**2):($1**2) with lines palette lw 3 title '$x^2$' * a new terminal option (tightboundingbox|notightboundingbox) is added 2011-07-20 Ethan A Merritt <merritt@u.washington.edu> * src/datafile.c: Allow binary data for plot style fillsteps Bug #3371199 * term/gd.trm: Prevent infinite loop on unrecognized terminal option 2011-07-14 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (plot_boxes): Correct positioning of bars in clustered histograms when some values are missing. Bug #3360882 * src/datafile.c (df_open plot_option_using df_readascii f_column) src/datafile.h src/parse.c (create_call_column_at extend_at) src/parse.h src/eval.c src/eval.h src/plot2d.c src/plot3d.c docs/gnuplot.doc: Implement column selection based on matching a leading substring of the column header. plot 'foo' using (column("A")):(column("B")) plot 'foo' using "A":"B" plot for [value in "Weight Height"] 'foo' using "Age":value 2011-07-12 Peter Juhasz <juhaszp@users.sourceforge.net> * src/command.c src/term.c: Fix crash of 'test' after an unsuccessful 'set term' Bug #3347683 * src/parse.c src/parse.h docs/gnuplot.doc: Add nested iteration in plot and other commands: constructs like 'plot for [i=1:5] for [j=1:5] foo' are now valid * src/axis.c src/axis.h src/color.c src/graph3d.c src/graphics.c src/save.c src/set.c src/show.c src/unset.c docs/gnuplot.doc: Allow explicit justification for tic labels, e.g. set xtics right 2011-07-11 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (plot_steps): Don't pass negative heights to t->fillbox Bug #3358185 2011-07-03 Ethan A Merritt <merritt@u.washington.edu> * src/term.c (term_apply_lp_properties): Handle the case where LT_COLORFROMCOLUMN is passed through as a linetype along with a color. Bug #3350570 2011-06-30 Ethan A Merritt <merritt@u.washington.edu> * src/hidden3d.c (draw_edge): Do not apply the default top/bottom colors to line segments belonging to the plot border. Bug #3344103 2011-06-28 Ethan A Merritt <merritt@u.washington.edu> * term/svg.trm: Pattern-fill definitions must initialize both fill and stroke style; otherwise the most recent setting may bleed through. Bug #3334216 2011-06-28 Shigeharu Takeno <shige@iee.niit.ac.jp> * docs/gnuplot-ja.doc docs/term-ja.diff: sync to docs version 1.677 2011-06-21 Ethan A Merritt <merritt@u.washington.edu> * src/graphics (plot_histeps): Fix range-checking of log-scaled y. Bug #3323828 2011-06-20 Ethan A Merritt <merritt@u.washington.edu> * src/getcolor.c term/x11.trm src/gplt_x11.c: Remove a set of routines in getcolor.c used only by the x11 terminal to pass a color gradient description through the pipe to gnuplot_x11. They packed four doubles (value; RGB color) into 8 bytes, losing precision and failing to round. Now we instead use 12 ascii characters "0.1234RRGGBB". Bug #3322975 2011-06-19 Ethan A Merritt <merritt@u.washington.edu> * src/command.c src/command.h src/misc.c src/misc.h src/parse.h src/scanner.c src/scanner.h src/tables.c src/util.c docs/gnuplot.doc: Extend the line input processing to include blocks of commands enclosed by curly braces, possibly spanning multiple lines. This syntax is used by new commands: if (<cond>) { ... } else { ... } do for [...] { ... } while (<cond>) { ... } 2011-06-18 Ethan A Merritt <merritt@u.washington.edu> * src/datafile.c src/gplt_x11.c src/plot2d.c src/set.c src/util.c: Remove dead code sections. Most of these have been commented out for many years. * src/command.c (do_line): Macro expansion must be done before calling scanner() to identify specific tokens. * src/command.c src/command.h: Export string_expand_macros(). * src/command.c (read_line): Prepare for block-structure work by adding a parameter to allow extending, rather than replacing, the input line. 2011-06-17 Ethan A Merritt <merritt@u.washington.edu> * src/getcolor.c (quantize_gray)): Remove a possible discontinuity at the boundary of defined palettes with a small number of segments. Bug #3317746 2011-06-17 Peter Juhasz <juhaszp@users.sourceforge.net> * src/time.c (gstrptime): The correction for the difference in epochs (2000 - 1970) was incorrect when reading times in %s format. Bug #3163386 2011-06-16 Ethan A Merritt <merritt@u.washington.edu> * src/pm3d.c (z2cb): If cb is log-scale, then limit result to positive values. Bug #3316616 2011-06-14 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (plot_histeps): Allow data points with y=0 even if log scaling is active. Bug #3316112 2011-05-31 Ethan A Merritt <merritt@u.washington.edu> * term/emf.trm: Reset line and text colors at the start of each plot. * config/config.cyg config/config.dj2 config/config.mgw config/config.nt config/config.os2 config/config.oww config/makefile.dj2 config/makefile.emx config/makefile.unx config/makefile.vms docs/doc2texi.el docs/Makefile.in docs/term-ja.diff src/makefile.all src/makefile.awc src/show.c src/term.c src/term.h configure.in configure.vms INSTALL PORTING NEWS term/gnugraph.trm term/unixplot.trm: Remove obsolete terminal drivers gnugraph and unixplot. The underlying gnu plotutils library is itself more than 10 years out of date (last release July 2000) and the terminal drivers haven't been upgraded for longer than that. In any event, current gnuplot has better native terminal drivers for the devices supported by unixplot/gnugraph. 2011-05-27 Ethan A Merritt <merritt@u.washington.edu> * src/datafile.c (df_open df_determine_matrix_info): Add a keyword '[s]plot ... nonuniform matrix' This provides an ascii input option parallel to 'binary matrix'. nonuniform matrix: ascii; y coords in row 1, x coords in column 1 binary matrix: binary; y coords in row 1, x coords in column 1 matrix: ascii; uniform grid of x/y coords binary general: binary; uniform grid of x/y coords * docs/gnuplot.doc: Reorganize the description of data file contents. More reorganization is still wanting. 2011-05-25 Bastian Maerkisch <bmaerkisch@web.de> * docs/windows/doc2html.c: Encoding of gnuplot.doc is UTF-8. 2011-05-24 Christoph Bersch <usenet@bersch.net> * term/cairo.trm: PDF documents normally behave as if they had a transparent background. Modify the pdfcairo terminal to do this by default, but also to accept the keywords {no}transparent. 2011-05-24 Harald Koenig <h_koenig@users.sourceforge.net> * src/Makefile.maint: Use dd rather than head to update last-modified date since not all platforms support "head -c". 2011-05-24 Ethan A Merritt <merritt@u.washington.edu> * docs/titlepag.tex, docs/gnuplot.doc: Add Peter Juhasz, Bastian Maerkisch, and Shige Takeno to the list of contributors. UTF-8. 2011-05-22 Ethan A Merritt <merritt@u.washington.edu> * parse.c (check_iteration next_iteration empty_iteration) parse.h plot2d.c plot3d.c set.c unset.c: Rather than using a single set of global iteration bookkeeping variables, require that each iteration user pass in a structure for bookkeeping. This allows nested iteration, so long as two different iteration structures are used. * command.c (do_line): Strip trailing comments from input lines as they are read, since there is no point in storing what we are going to ignore later. Minor cleanup of #ifdef nesting. 2011-05-16 Ethan A Merritt <merritt@u.washington.edu> * src/specfun.c (humlik): Initialization would fail whenever y = -1. 2011-05-15 Bastian Maerkisch <bmaerkisch@web.de> * src/wxterminal/gp_cairo.c (gp_cairo_draw_fillbox): Width of filled box was off by one unit. * src/win/wgraph.c (GetMousePosViewport): Window size is zero for minized windows on Vista. Fixes crash when closing plot window in minimized state e.g. via taskbar. * src/win/wgraph.c (drawgraph): [W_boxfill] Fix inversion of transparency. [W_filled_polygon_draw]: Fix transparency in case of aliased solid white polygons. 2011-05-14 Ethan A Merritt <merritt@u.washington.edu> * src/axis.h src/axis.c src/gadgets.c src/gadgets.h src/graphics.c src/hidden3d.c src/internal.c term/README: Fix incomplete and incorrect initializers found by gcc. 2011-05-14 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wgraph.c (drawgraph) [W_image]: Clip images as requested. * src/win/wgraph.c (WndGraphProc) [WM_KEYDOWN]: Handle VK_CONTROL key events again. Fixes ctrl-mousedrag rotation of splots. * src/mouse.c (event_keypress): MinGW's toupper() masks out high bits required for special keys. Only call for 8bit characters. Fixes accelerated rotation with keys (e.g. shift-left) for wxt and windows terminals. * src/win/wgdiplus.c|h src/win/wgraph.c: Extend support for antialiasing of line segments and point symbols. Omit border of non-antialiased solid filled polygons. 2011-05-13 Ethan A Merritt <merritt@u.washington.edu> * src/graph3d.c (draw_3d_graphbox): Avoid use of round() because MSVC is still not C99-compliant. 2011-05-13 Allin Cottrell <cottrell@wfu.edu> * src/wxterminal/gp_cairo.c (gp_cairo_convert): Make the WIN32 font work-around (2009-11-06) conditional on cairo < 2.10. Needs more testing. 2011-05-13 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wgraph.c (WndGraphProc): Cycle through mouse-modes by clicking on status bar. Suggestion by plotter@piments.com * src/plot.c (main): Print messages concerning codepages only in interactive sessions. * src/win/wgnuplot.rc: Give the MSVC compiler a chance to create the manifest itself. * src/win/wgraph.c (drawgraph): Fix image regression. * term/win.trm: Help text for antialiasing. 2011-05-12 Ethan A Merritt <merritt@u.washington.edu> * docs/gnuplot.doc src/set.c src/mouse.c: Update documentation for the mouse format modes, which has been incorrect since approximately forever (predates CVS repository). 2011-05-10 Ethan A Merritt <merritt@u.washington.edu> * src/datafile.c (expand_df_column): Provide a shared routine for dynamic allocation of space to hold input data lines. This replaces three separate instances, only one of which did proper initialization. * src/graphics.c (finish_filled_curve): Consolidate duplicated code. * src/graph3d.c (draw_3d_graphbox) src/set.c (parse_label_options) src/gadgets.h src/show.c src/save.c docs/plotstyles.gnu docs/gnuplot.doc: The X-axis and Y-axis labels in 3D plots can be aligned parallel to the respective axis using the command `set [xy]label rotate parallel`. 2011-05-10 Bastian Maerkisch <bmaerkisch@web.de> * term/gd.trm (PNG_options): Init font pointers before using them. 2011-05-09 Ethan A Merritt <merritt@u.washington.edu> * term/eepic.trm: New terminal option {size XX,YY} Bug #3170746 * src/graphics.c (boundary): Add a sanity check to make sure that the plot size is not so small that the boundary limits go negative. Implemented as int_warn(), but maybe it should be int_error(). Bug #3154401 * src/term_api.h src/term.c src/util.c src/util.h: Remove dead code. 2011-05-07 Bastian Maerkisch <bmaerkisch@web.de> * src/command.c (help_command) src/win/wgraph.c (WndGraphProc) src/win/winmain.c (WinExit, WinMain) src/wxtterminal/wxt_gui.cpp (wxtPanel::RaiseConsoleWindow, wxt_atexit): For console gnuplot on Windows, remove dependency on struct textwin, which represents the non-existant text window. Fixes e.g. overwriting of text window settings in wgnuplot.ini. Console gnuplot no longer depends on wtext.c and screenbuf.c. * src/standard.c (fn_asin, fn_asinh): Fix calculation for complex arguments. Make sure that asin(sin(z))==z. Bug #2879772. * config/README: Update to current status. * config/config.mgw config/config.oww: Sync with config.h created by autoconf tools. 2011-05-06 Shigeharu Takeno <shige@iee.niit.ac.jp> * src/graph3d.c: Make "notitle" suppress contour line key entries in addition to the surface key entry. This makes it possible to draw any combination of surface, contours, and key entries. 2011-05-06 Benjamin Lindner <lindnerb@users.sourceforge.net> * docs/plotstyles.gnu docs/gnuplot.doc: Add an illustration of the 'newhistogram' command. 2011-05-06 Ethan A Merritt <merritt@u.washington.edu> * INSTALL: Update the description of readline options and mention the ./prepare script. 2011-05-06 Shigeharu Takeno <shige@iee.niit.ac.jp> * config/makefile.nt: Add missing support for GDI+. Bug #3298244 2011-05-06 Bastian Maerkisch <bmaerkisch@web.de> * config/msvc/Makefile: New file for Microsoft Visual C++. Builds out of tree. Intended to eventually replace config/makefile.nt. config/Makefile.am.in (Makefile.am): Add new Makefile. 2011-05-05 Ethan A Merritt <merritt@u.washington.edu> * src/datafile.h src/datafile.c src/plot2d.c src/plot3d.c: Change prototype of df_set_key_title_columnhead() to match that of df_set_key_title(). 2011-05-05 Bastian Maerkisch <bmaerkisch@web.de> * term/win.trm (WIN_set_font) src/win/wgraph.c (drawgraph): Defer determination of default font name and size. Fixes bug addressed by change of 2010-02-22, but without the need for do_string_replot() * src/win/wgraph.c (drawgraph): New variable fill_color to track color of fills. Use cached color brush for transparent solid fills instead of creating a new one. * src/win/wgraph.c (drawgraph) src/win/wgdiplus.c|h: Add support for antialiased solid filled (transparent) polygons. * src/win/wpause.c (WndPauseProc): Use default dialog font instead of fixed width font for pause dialog. * src/readline.c (readline): Tab is a printable character in some locales, ie. isprint(TAB)>0. * src/win/wgraph.c (MakeFonts): Reduce size of tics and point symbols by 20%. 2011-05-04 Bastian Maerkisch <bmaerkisch@web.de> * config/mingw/Makefile: Build support for lua tikz related TeX files. Use Makefile.maint to update version.c. Update install target to match directory layout of distribution and include share/lua/, share/LaTeX/, contrib/, demo/, README, NEWS, Copyright and ChangeLog. 2011-05-02 Ethan A Merritt <merritt@u.washington.edu> * src/variable.c (locale_handler): If built-in readline character input is to recognize UTF-8 characters via wcwidth(), it is necessary to initialize the CTYPE locale on entry. "set encoding utf" is not sufficient. 2011-05-02 Bastian Maerkisch <bmaerkisch@web.de> * src/readline.c (tab_completion, fn_completion, readline) NEWS: Cycling variant of filename tab-completion for builtin readline. * src/stdfn.c|h (strnlen, strndup) configure.in config/config.nt config/config.mgw config/config.oww: Support functions used by tab-completion code. * src/stdfn.c|h (opendir, closedir, rewinddir): Add Kevlin Henney's POSIX directory browsing functions and types for Win32. * src/readline.c (mbwidth, isdoublewidth) configure.in: Determine on screen width of utf8 encoded characters with wcwidth() if provided by the system. * src/readline.c (delete_previous_word): Overprint with exact number of spaces, add NUL at eol. 2011-04-30 Ethan A Merritt <merritt@u.washington.edu> * src/readline.c (clear_eoline): More efficient clear line algorithm. 2011-04-29 Ethan A Merritt <merritt@u.washington.edu> * src/mouse.c (apply_zoom): Prevent double-free of custom font for tic labels. Bug #3294915 2011-04-28 Bastian Maerkisch <bmaerkisch@web.de> Support for (optional) antialiasing in windows terminal via GDI+. * config/config.mgw, config/config.nt: Compilers have support for GDI+: define HAVE_GDIPLUS. Note: OpenWatcom might not support GDI+ * config/mingw/Makefile: Include new files wgdiplus.h|cpp in build, add library gdiplus. * src/win/wgdiplus.cpp src/win/wgdiplus.h: New files. C interface to Windows GDI+ library. Currently supports polylines and circles. * src/win/wgnuplib.h src/win/wgraph.c src/win/winmain.c src/win/wresourc.h: Implement antialiasing for lines and and most point shapes. Add option to LPGW, wgnuplot.ini and popup menu to toggle antialiasing on and off. Default to oversampling off now that we have proper antialiasing. Wrap all GDI+ code in #ifdef HAVE_GDIPLUS. * src/win/wgraph.c (drawgraph) [W_fillstyle, FS_PATTERN]: Fix cycling of pattern styles. * src/wxterminal/gp_cairo.c|h (gp_cairo_default_font) src/wxterminal/wxt_gui.c: New function to determine default font. Default is "Sans" on all systems but Windows where this alias might not work work in all cases. 2011-04-27 <wtf3@users.sourceforge.net> * src/graphics.c: The autotitle option for column-stacked histograms should honor "set key maxrows N". Bug #3281635 2011-04-27 Bastian Maerkisch <bmaerkisch@web.de> * src/command.c (help_command) src/win/winmain.h src/win/winmain.c (WinExit, ShutDown, WinCloseHelp, WinMain): Work-around for apparently well known html help bug, which causes spurious crashes on exit. Keep track of help window handle and try to close the window as soon as possible. New function WinCloseHelp. Extensive update to color, linetype and fillstyle handling in windows terminal. Fixes several bugs and implements new options. * term/win.trm (WIN_id, WIN_opts, WIN_options): Add options "solid", "dashed", "background", "fontscale" and "linewidth". Call new function GraphInitStruct to initialize graphwin. Inlcude font in term_options. * term/win.trm (WIN_point, WIN_filled_polygon): Handle dashed lines in drawgraph, not here. (WIN_filled_polygon): Use generalized W_fillstyle call, shared with WIN_boxfill. (WIN_boxfill): Pass second corner as parameter, not width and height. Fixes spurious rounding errors during translation to graph coordinates. (help text): Document new options. * src/win/wgnuplib.h (GW): Reorder entries according to function. * src/win/wgraph.c (pattern_bitmaps): Fix double cross-hatch. (GraphInitStruct): New function. (MakePens, DestroyPens): Account for linewidth and sampling and create an additional "null" pen which is used for filled polygons and boxes. (MakeFonts, GraphEnhancedOpen) Account for fontscale. (draw_new_pens, draw_new_brush) New functions to (re)create brushes and pens. Always create a "solid" partner for the possibly "dashed" pen. Called by drawgraph. * src/win/wgraph.c (drawgraph): Reorder variables according to function. [W_line_type]: Save last LOGPEN instead of pen index. Make use of draw_new_pens. Select background brush for line-type <= LT_NODRAW (fix by Shigeharu Takeno, Bug 3192205). [W_fillstyle]: Unify code for filled boxes and polygons. Use draw_new_brush. [W_boxfill]: Fillstyle is now set by previous call to W_fillstyle. Change interface from relative (width, height) to absolute position to avoid off by one rounding errors. Deselect brush use for transparent fill before deleting it. [W_line_width] Scale by linewidth option. [W_setcolor] Use save LPOGEN to create pens with new color. Use draw_new_brush and draw_new_pens to recreate brushes and pens. [W_filled_polygon_draw] Fillstyle is now set by previous call to W_fillstyle. Use "null" pen to avoid drawing a border around filled area. [W_image] Avoid static variables. [W_plus,...] Use solid pen. Fixes point symbols drawn with dashed lines. Adresses Bug 1952364. 2011-04-26 Ethan A Merritt <merritt@u.washington.edu> * src/readline.c: Revise the built-in readline code to handle UTF-8 encoded character input. The revised code is only active if the user has explicitly done "set encoding utf8" or "set encoding locale", but probably it should be the default in a UTF-8 locale. * src/readline.c (clear_line): More efficient clear line algorithm. 2011-04-25 Ethan A Merritt <merritt@u.washington.edu> * src/plot.c (main) src/misc.c (load_file): Initializing c_token to an illegal value is not a good idea. Bug #3292512 2011-04-23 Shigeharu Takeno <shige@iee.niit.ac.jp> * docs/gnuplot-ja.doc docs/term-ja.diff: sync to docs version 1.664. * docs/Makefile.in (wxhelp/doc2html.o): Add missing space. 2011-04-22 Ethan A Merritt <merritt@u.washington.edu> * src/readline.c docs/gnuplot.doc: Built-in readline did not recognize the character sequence produced by the DEL key on many keyboards. Trap this sequence for interpretation as "forward delete", which is what the same key does under windows and gnu libreadline. This does not affect keyboards or xmodmap configurations where the DEL key produces another sequence entirely. 2011-04-22 Bastian Maerkisch <bmaerkisch@web.de> * src/readline.c: The behavior of ^W was not consistent with the documentation. Change it to match gnu libreadline (delete previous partial or full word). 2011-04-20 Ethan A Merritt <merritt@u.washington.edu> * src/gplt_x11.c: Most of the messages passed via the title bar of the X Display window are controlled by #ifdef TITLE_BAR_DRAWING_MSG. Do the same for the "allocating colors..." message. 2011-04-19 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> * config/Makefile.am.in (Makefile.am): Additional files to become part of the distributed tarball. Reindented. 2011-04-19 Ethan A Merritt <merritt@u.washington.edu> * src/datafile.c (f_columnhead df_set_key_title) src/datafile.h src/eval.c src/plot2d.c (eval_plots) docs/gnuplot.doc: New function columnhead(N) that returns a string containing column N from the first line of a data set. 'plot ... title columnhead(i)' was previously implemented as a keyword; making it a function instead allows, for example, 'plot for [i=3:6] ... title "Results of ".columnhead(i)' 2011-04-19 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> * docs/Makefile.in (wxhelp/doc2html, gnuplot.htb): Ooops. Yesterday's directory name change to windows was wrong. Undoing it. 2011-04-18 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> * term/Makefile.am.in: Use $< where applicable. ($(srcdir)/lua/gnuplot-tikz.help): Make workable outside the source tree. Use $< and $@ where applicable. * docs/Makefile.in (CLEANFILES): Fix broken directory name; indent. (gnuplot.htb): Fix broken directory name. Make workable in out-of-source builds. (windows/wgnuplot.html, windows/doc2html.o, windows/doc2html): Fix wrong directory name. * Makefile.maint (amfiles): Missing semicolon. 2011-04-18 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wgraph.c (drawgraph): Fractional solid fill based on SF Patch 2905570 by Shigeharu Takeno. Remove halftone brushes. Eliminate static variable to keep track of pm3d brushes. 2011-04-17 Bastian Maerkisch <bmaerkisch@web.de> * config/mingw/Makefile: Use $^ and $< where applicable. Patch by Benjamin Lindner, SF Patch 2468650. Set TARGET only if it's not already defined. GNUPLOT_LUA_DIR was included twice in TERMOPTIONS. GNUPLOT_PS_DIR is required by show.c. [wgnuplot.chm] Avoid changing directory via shell which seem not to work reliably on all systems. 2011-04-17 Ethan A Merritt <merritt@u.washington.edu> * config/Makefile.am.in: Fix package-build breakage. 2011-04-17 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> Building the three different types of executable for Windows was quite cumbersome (change make variable, make clean, build, all that thrice). Compiling to three different object file name extensions helps with that. * config/watcom/Makefile (VARIANT): New macro to choose among targets. (TARGETS_PLAIN, EXTRA_CPPFLAGS_PLAIN, TARGETS_PIPES) (EXTRA_CPPFLAGS_PIPES, TARGETS_CONSOLE, EXTRA_CPPFLAGS_CONSOLE): New macros for settings particular to one variant. (DEFAULT_TARGETS): Changed definition to use new per-variant macros. (ALL_TARGETS): New macro listing all things that can be built. (all): New target building all variants without the need to make clean in between. (WIN_EXTRA_INPUTS): Removed $(WINOBJS) (OBJS): Add $(WINOBJS) here instead. (CONSOLE_OBJS, PIPE_OBJS): Copies of $(OBJS) with different object filename extension. Use $(O) in favour of fixed .obj, to allow renaming trick. (.EXTENSIONS): Add .cobj and .pobj to list of recognized file name extensions. (.c.cobj): New implicit rule to compile sources for the console build. (.c.pobj): New implicit rule for pipe-enabled build. (wgnuplot.exe): $(WINOBJS) is contained in $(OBJS) now. (wgnuplot_pipes.exe): Use $(PIPE_OBJS) instead of $(OBJS) (gnuplot.exe): USE $(CONSOLE_OBJS) instead of $(OBJS) (term.cobj): New explicit rule to compile term.c for the console build. (term.pobj): New explicit rule to compile term.c for the pipe build. (.c): Added windows source subdirectory to VPATH search list. (w*.obj): Removed unnecessary explicit rules for Windows-specific files. (clean): Remove object files with new names. * config/watcom/.cvsignore: Add new file name extensions to ignore. 2011-04-17 Bastian Maerkisch <bmaerkisch@web.de> * config/makefile.cyg config/makefile.mgw config/makefile.unx cygwin/Makefile mingw/Makefile: Remove dependencies on wgnuplot.def and wgnuplib.def. * src/wgnuplib.def: Removed 2011-04-16 Bastian Maerkisch <bmaerkisch@web.de> * config/config.amg config/makefile.msc config/term.pc.h config/makefile.win config/makefile.ztc src/win/wgnuplot.def src/win/wgnupl32.def: Remove build files for no longer supported platforms DOS16, WIN16, Amiga and compilers. * src/ansicheck.h src/command.c src/eval.h src/stdfn.h src/syscfg.h src/term.c src/term.h src/makefile.all src/makefile.awc docs/Makefile.in term/fg.trm : Remove suport for the Zortech compiler and the no longer available Flash Graphics library. 2011-04-15 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (plot_steps) src/gp_types.h src/graph3d.c src/tables.c docs/gnuplot.doc docs/plotstyles.gnu: New plot style "with fillsteps" is identical to "with steps" except that the area between the stepped line and the baseline at y=0 is filled using the currently active fill style. * src/graphics.c (plot_fsteps, histeps_vertical) (histeps_horizontal): Simplify the code to use clip_line() rather than lots of in-line tests. * term/dumb.trm docs/gnuplot.doc: Updates 2011-04-15 Bastian Maerkisch <bmaerkisch@web.de> * src/readline.c (msdos_getch, readline), src/win/winmain.c (ConsoleGetch): Don't quit on DEL on an empty line. Map DEL key to del character 127 instead of ^D, but keep old behaviour of deleting current character on platforms Windows, MSDOS and OS/2. SF Bug #3285571 2011-04-13 Peter Hedwig <peter@affenbande.org> * term/lua/gnuplot-tikz.lua: Fix "charsize" option. 2011-04-13 Ethan A Merritt <merritt@u.washington.edu> * term/canvas.trm term/gd.trm term/svg.trm term/x11.trm src/misc.c: Stricter checks that the red component of RGB colors stays in range. 2011-04-13 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wgraph.c (WndGraphProc), src/win/wtext.c (WndTextProc): Enable access to popup menu via status bar and keyboard. 2011-04-12 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wtext.c (WndParentProc) [WM_SIZE]: Ignore requests to set window size to 0,0. Fixes crash on Vista if Windows-D is pressed. 2011-04-11 Ethan A Merritt <merritt@u.washington.edu> * term/js/gnuplot_common.js: Fix the clipping of filled rectangles when zoomed. 2011-04-11 Petr Mikulik <mikulik@physics.muni.cz> * src/config/mingw/Makefile: Fixed relative directories in RCFLAGS. 2011-04-10 Bastian Maerkisch <bmaerkisch@web.de> * src/term/win.trm, src/win/wgraph.c, src/win/wgnuplib.h: Renew text handling: Process enhanced text in drawgraph(), new functions GraphEnhancedOpen(), GraphEnhancedFlush(), revised GraphGetTextLength(). This most notably fixes behaviour when resizing the graph window. Collect static variables used for the internal state of enhanced text processing into a struct. Move code out of main loop of drawgraph: New functions draw_put_text(), draw_text_justify(), draw_enhanced_text(). Fix baseline alignment of normal and enhanced text. Text position was moving in wrong direction for rotated enhanced text (fix replaces change dated 2011-02-11). Remove unused function GraphGetFontScaling(). Fix text positioning of enhanced text with oversampling. * term/win.trm (WIN_graphics): Update character and window size. * src/win/wgraph.c (WndGraphProc): Remove another Win16 relict. * term/win.trm, src/win/wgnuplib.h, src/win/wgraph.c: Remove LPGW.resized, rename commands no longer exclusively used for pm3d. * src/win/wgraph.c (UnicodeText): Add codepage 1250. * term/win.trm (WIN_Init), src/win/wgraph.c (GraphInit): Move loading of icon. * term/win.trm (WIN_scale): Removed. * term/win.trm (WIN_options), src/win/winmain.c (WinMain): Eliminate need for static variable WIN_gtitle. * term/win.trm (WIN_set_pointsize), src/win/wgraph.c (drawgraph) [W_pointsize]: Don't pass size as string. * src/win/wgraph.c (drawgraph) [W_line_type]: Only init LOGBRUSH lb if it is used. * term/win.trm, src/win/wgraph.c: Various small code cleanups. 2011-04-09 Ethan A Merritt <merritt@u.washington.edu> * term/svg.trm term/js/gnuplot_svg.js: Draw all grid lines with attribute class="gridline". Add an icon to toggle on/off lines with this attribute. Move both this icon and the mouse coordinate tracking box to the end of the output *.svg file so that they cannot be occluded by plot elements. * term/svg.trm (SVG_PathClose): Firefox 3.x fails to render purely vertical lines. This is particularly noticeable because all vertical grid lines are missing. Work around this by adding 0.01 to the final x coordinate. 2011-04-08 Ethan A Merritt <merritt@u.washington.edu> * term/svg.trm: Adjust enhanced text placement, removing some kludges that appear not to be necessary with the current generation of browsers. * term/svg.trm term/js/gnuplot_svg.js: Implement mouse tracking framework. 2011-04-07 Ethan A Merritt <merritt@u.washington.edu> * src/term.h term/svg.trm demo/html/webify_svg.pl demo/html/Makefile.svg demo/html/Makefile.svg: Add bitmap image handling to the svg terminal using the same mechanism of external png files used by the canvas and tikz terminals. * term/svg.trm(SVG_init): Konqueror (KDE 4.5) crashes if the xlink to gnuplot_svg.js fails to load. Work around this by adding a test for the presence of gnuplot_svg before initializing. 2011-04-06 Bastian Maerkisch <bmaerkisch@web.de> * term/win.trm, src/win/wgnuplib.h, src/win/wgraph.c: Use UINTs instead of DWORDs in struct GWOP. * src/win/wgraph.c, src/win/wgnuplib.h: Move static flag for unsupported encodings to struct LPGW. This ensures that errors are reported only once. 2011-04-06 Ethan A Merritt <merritt@u.washington.edu> * src/graph3d.c src/graphics.c src/term_api.h: Add layering flags for BEGIN/END KEYSAMPLE. * term/js/gnuplot_svg.js term/svg.trm: Elementary mousing support for the svg terminal based on Patches #2477391 #2478169 (yeah, those are from 2 years ago). Toggle plot on/off in response to mouse click on the corresponding key entry. * demo/html/Makefile.svg demo/html/index.svg demo/html/webify_svg.pl: Revise the svg demo set to use mousing. * src/graphics.c (do_plot) src/term_api.h (TERM_LAYER_RESET_PLOTNO) term/svg.trm term/canvas.trm: The "set key opaque" option was causing mismatched begin/end plot pairs in output from the svg and canvas terminals (begin/begin/end). Revise this so that the plot and the key sample numbering is out of sync. 2011-04-05 Ethan A Merritt <merritt@u.washington.edu> * src/color.c (ifilled_quadrangle): See note in the code. For some reason this fixes rendering of pm3d surfaces in the svg terminal. 2011-04-04 Ethan A Merritt <merritt@u.washington.edu> * term/canvas.trm demo/html/mousebox.template term/js/gnuplot_mouse.js: Incorporate the plot name (from 'set term canvas name "foo") into the flag used by the toggleVisibility() routine so that plots in other canvas elements on the same page are not affected. 2011-04-03 Ethan A Merritt <merritt@u.washington.edu> * src/term.c src/term.h term/Makefile.am.in term/lua.trm term/write_png_image.c: Move the routine write_png_image() out of lua.trm so that it can be shared by other terminal drivers. It requires support from either libgd or cairo, and provides bitmapped image support to the lua terminals and (in prospect) to the HTML5 canvas terminal. * src/save.c: Echo most recent range of autoscaled axes on "show" but not "save". This simplifies the output of gpsavediff in most cases. * gnuplot-cvs/term/js/gnuplot_mouse.js term/js/gnuplot_common.js gnuplot-cvs/term/canvas.trm (CANVAS_image): Implement support for image handling in the canvas terminal using the HTML5 canvas primitive drawImage(). Image data is written to a png file in parallel to generation of the main plot. The png image can then be loaded from the javascript handler for the plot it belongs to. * demo/html/Makefile demo/html/Makefile.canvas demo/html/index.canvas demo/html/mousebox.template: Update the demo collection to show the new image handling. 2011-04-01 Ethan A Merritt <merritt@u.washington.edu> * term/canvas.trm demo/html/webify_canvas.pl: Add HTML5-conformant doctype and meta-information to output html. * src/graph3d.c: Wrap pm3d surfaces and hidden3d ensembles in BEFORE_PLOT/AFTER_PLOT flags via term->layer(). This allows them to be toggled on/off like other plots in HTML canvas output. * src/term.c(null_layer) src/graphics.c src/graph3d.c: Provide a null_layer() routine for all terminals that do not provide term->layer(). This allows us to remove explicit checks for support by the current terminal. 2011-03-30 Ethan A Merritt <merritt@u.washington.edu> * demo/html/index.canvas demo/html/Makefile.canvas demo/html/mousebox.template demo/html/webify_canvas.pl: Separate make targets for 2D and 3D plots. Add buttons for toggling individual plots. Default to mousing enabled for all demo plots. * term/canvas.trm: Wrap each component plot in a test for (gnuplot.hide_plot_N). Add plot-toggling buttons to the standalone mousebox. Report gnuplot version in each plot generated. * term/gnuplot_common.js term/gnuplot_mouse.css term/js/canvas_help.html term/gnuplot_mouse.js (popup_help(URL) toggle_plot(N)): Add version number to shared javascript code modules. Add support for linking help button to plot-specific URL. Add support for toggling individual component plots on/off. 2011-03-30 Bastian Maerkisch <bmaerkisch@web.de> * term/gd.trm: Don't try to reuse names of gd font pointers for local variables. Fixes build with MinGW and DLL version of libgd. * config/mingw/Makefile: Optionally, use pre-built DLL version of libgd. Use environment variable PROGRAMFILES to access help compilers. 2011-03-29 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wgnuplib.rc, src/win/wgnuplot.rc, src/win/wresourc.h: Use standard dialog font. Remove obsolete DS_3DLOOK. * src/win/winmain.c (WinMain): Sync About Dialog box with output of "show version". * src/win/wmenu.c (SendMacro), src/win/wgnuplot.mnu: Add About dialog to Help menu. * src/win/wmenu.c (SendMacro), src/win/wgnuplot.mnu: Add Options menu to toolbar. 2011-03-28 Ethan A Merritt <merritt@u.washington.edu> * src/plot2d.c (get_data): Fix array bounds underflow if every point in a data file is invalid. Bug #3254653 2011-03-28 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wtext.c: Always update complete lines of text instead of drawing single characters, since character boxes might overlap when using ClearType. * docs/README: Document recent changes to Windows help. * src/win/wgnuplib.h, src/win/wcommonh.h, src/win/wtext.c: Continue to make more stuff module-local. * src/win/wgnuplib.h, src/win/wmenu.c: Move definition of SHELL_DIR_DIALOG. * config/config.nt: Sync with config.h created by autoconf. 2011-03-26 Shigeharu Takeno <shige@iee.niit.ac.jp> * term/gd.trm (PNG_put_text ENHGD_FLUSH gd_iconv): Invoke the SJIS/UTF8 conversion for both enhanced and non-enhanced text. EAM - and collapse the shared code into a subroutine. 2011-03-26 Bastian Maerkisch <bmaerkisch@web.de> * config/mingw/Makefile: Add missing paths to wxt/cairo/pango files. Update build instructions. WX_LOCATION is no longer required since gnuplot has its own manifest file now and the one supplied by wxWidgets is no longer included. htmlhelp.lib is included in LDLIBS not TERMFLAGS. Replace '=' by ':=' for shell commands. Filter out drive specifications "c:" in results from pkg-config which would confuse make. 2011-03-25 Ethan A Merritt <merritt@u.washington.edu> * src/pm3d.c docs/gnuplot.doc: Allow pm3d plots to use the fourth column of data as "rgb variable" rather than "palette z". 2011-03-25 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> * src/win/wtext.c: Make more stuff module-local. Resolve several signedness conflicts introduced by functions in new screenbuf.c module. 2011-03-25 Bastian Maerkisch <bmaerkisch@web.de> * src/plot.c (main), src/win/winmain.c (WinMain, WinExit), src/win/wcommon.h: The code which changes the codepages for console gnuplot is only compiled in if CONSOLE_SWITCH_CP is defined. Otherwise gnuplot will only display a warning if codepages differ. Handle the case when codepages already match. 2011-03-24 Ethan A Merritt <merritt@u.washington.edu> * src/Makefile.maint: Fill in the "last modified" date from the most recent entry in the ChangeLog rather than the using the current date, and only then if the VERSION or PATCHLEVEL has been changed. Caution: tested only under linux with gnu make. 2011-03-22 Bastian Maerkisch <bmaerkisch@web.de> * src/graphics.c (do_plot, plot_points): Test wether the terminal actually supports set_color. Fixes crashes with terminal dumb. 2011-03-21 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wgraph.c (WIN_image): Fix regression: rotation of images with reversed axis was not working since rev. 1.92. 2011-03-20 Ethan A Merritt <merritt@u.washington.edu> * src/util.c (equals): Test here for token index in range, rather than trusting all callers to get it right. * src/command.c src/parse.c: Token index range test is now redundant. * docs/gnuplot.doc: Document that ^D from an empty line acts as EOF. 2011-03-20 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wgnuplib.c|h, src/win/wgraph.c, src/win/winmain.c, src/win/wmenu.c, src/win/wpause.c, src/win/wtext.c: FAR pointers are no longer required. * src/win/winmain.c (WinExit): Explicitly close help window on exit. Fixes hangs of gnuplot when it is closed via the Windows taskbar and help window and graph window open. * src/win/wmenu.c (LoadMacros), src/win/wgnuplot.mnu ([Button]): Add icons to the text-window toolbar. * docs/windows/doc2html.c (process_line): Don't include '=' items in index. This avoids duplicate entries which caused wgnuplot to stall when an e.g. 'set term png; help "png"' was issued. 2011-03-18 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wtext.c (TextCopyClip): Fix copying of last line of a marked region in case the marking exceeds the length of that line. * src/win/wgnuplib.rc, src/win/resourc.h: Remove dialog resource which was only used on Win16. * term/gd.trm (PNG_init): On Windows, set GDFONTPATH to %windir%\Fonts if not set previously. * src/plot.c (main), src/win/winmain.c (WinMain, WinExt): Always use the ANSI codepage (instead of OEM) to ensure sure that the console of gnuplot.exe and the graph window use the same codepage. Warn users that raster fonts won't display all characters correctly and restore the codepage on exit. 2011-03-17 Ethan A Merritt <merritt@u.washington.edu> * axis.c(gen_tics): Make sure the axis tic label format string is long enough to hold enhanced text markup. Fixes buffer overflow. 2011-03-16 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wgraph.c (UnicodeText): new function to convert a string to UTF-16 * src/win/wgraph.c (drawgraph, GraphGetTextLength) NEWS: support "set encoding" for all currently defined encodings * src/win/wtext.c (ReadTextIni): select default font according to the Windows version. Avoid font "Terminal" since it might not contain all glyphs of the current character set. * src/win/wgnuplib.h, src/win/wgraph.c, term/win.trm: use child window for status bar, allow right button mouse click on status bar to activate the `graph-menu` popup. Change name of GW.statuslineheight for consistency with TW. 2011-03-15 Ethan A Merritt <merritt@u.washington.edu> * axis.c(copy_or_invent_formatstring): If the default tic format has insufficient precision to distinguish the two extremes of the axis range, increase the precision. 2011-03-14 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c: Auto-placement of the left margin of the plot was failing to allow room for "set key outside left". * term/post.trm: Add a %%Page statement in *.eps files, as current versions of standard tools seem to expect it. Bug #3046700 2011-03-13 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wgnuplot.rc, src/win/wgnuplot.exe.manifest: add new manifest for wgnuplot to enable visual styles * src/win/wmenu.c, src/win/wtext.c: remove unused variables to make compiler happy, avoid C++ style comments * src/win/wtext.c (TextInit), src/win/wmenu.c, src/win/wgnuplib.h, src/win/wresourc.h: add a statusbar to the text window, reduce size of text area accordingly * src/win/wtext.c (WndParentProc): [WM_GETMINMAXINFO] use active font to calculate minimum window size; take menu, toolbar and statusbar into account 2011-03-13 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> * config/cygwin/Makefile (LDLIBS): Add newly needed library. 2011-03-13 Bastian Maerkisch <bmaerkisch@web.de> * config/config.nt, src/alloc.c, src/alloc.h, src/command.c, src/eval.c, src/fit.c, src/gpexecute.c, src/plot.c, src/syscfg.h, src/win/wcommon.h, src/win/wgnuplib.c, src/win/wgnuplib.h, src/win/wgnuplot.mnu, src/win/wgnuplot.rc, src/win/wgraph.c, src/win/winmain.c, src/win/wmenu.c, src/win/wpause.c, src/win/wprinter.c, src/win/wtext.c, term/win.trm: Remove Win16 support. * src/win/winmain.c (WinMain): init common controls * config/mingw/Makefile, config/magefile.mgw, config/makefile.nt, conig/watcom/Makefile: add library comctl32 * src/win/wmwenu.c (LoadMacros, CloseMacros, MenuBottonProc): use common controls toolbar, remove MenuBottonProc * src/win/wgnuplib.h (MW): add handle for toolbar, remove pointer to MenuBottonProc * src/win/wresourc.h: add ID for toolbar * src/win/wtext.c (WndParentProc): [WM_SIZE] forward msg to toolbar, [WM_PAINT] remove completely * src/win/wingraph.c (UpdateStatusLine, DisplaySatusLine): use common controls * src/win/winmenu.c (IShellFolder_BindToObject), (IShellFolder_GetDisplayNameOf): protect definition by #ifdef, (SendMacro) use newer variant of directory dialog 2011-03-11 Bastian Maerkisch <bmaerkisch@web.de> * src/makefile.nt: implement suggestions by Shigeharu Takeno: Do not use "+=" to be compatible with Visual C++ 2005; add/update links wo libgd and wxWidgets; add a scheme to easily select options [GDLIB, PDFLIB, WXT]; use linker option files for compilation of wgnuplot.exe and gnuplot.exe 2011-03-11 Ethan A Merritt <merritt@u.washington.edu> * configure.in: Check for iconv library and iconv.h, since gd uses iconv to convert between UTF-8 and SJIS encodings if it is available. * term/svg.trm: Demarcate plot elements using the svg <title> and <g id=foo> elements rather than <a xlink:foo> Bug #3205257 * src/misc.c src/wxterminal/gp_cairo.c src/wxterminal/gp_cairo.h src/wxterminal/wxt_gui.cpp src/wxterminal/wxt_term.h term/cairo.trm term/canvas.trm term/cgm.trm term/emf.trm term/gd.trm term/svg.trm term/wxt.trm term/x11.trm: Add option to specify a background color in "set term". NB: Not yet implemented for terminals: win post qt pm 2011-03-11 Shigeharu Takeno <shige@iee.niit.ac.jp> * term/gd.trm: libgd can be customized for Japanese use such that it prefers SJIS encoding rather than UTF-8 encoding. Add code to check which encoding the local libgd prefers, and convert strings to that encoding if necessary. 2011-03-10 Bastian Maerkisch <bmaerkisch@web.de> * src/command.c (test_palette): tmpfile() always fails on a modern Windows. Open a file in the user's temp directory instead. * src/win/winmain.c (WinExit): add missing void parameter * src/win/wgraph.c (drawgraph): add missing init 2011-03-09 Bastian Maerkisch <bmaerkisch@web.de> * config/makefile.nt: add chm help (update of SF patch 3191892 by Shigeharu Takeno), (HCWPATH, HHWPATH) use PROGRAMFILES variable instead of hard coded path 2011-03-08 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> * config/cygwin/Makefile (WINOBJS): Add new object file screenbuf. (screenbuf.$(O)): Rule for new object file. 2011-03-08 Bastian Maerkisch <bmaerkisch@web.de> * config/makefile.nt: fix copy/paste errors 2011-03-07 Bastian Maerkisch <bmaerkisch@web.de> revised implementation of Windows text window, SF patch 1973569, Feature Request 992352 * src/win/screenbuf.c|h: new files, implement dynamic buffer to hold screen contents * src/win/wtext.c: use data structures and methods from screenbuf.c|h; optionally wrap long lines which don't fit on screen [TextWrap]; add menu item to toggle this setting; save/load size of text buffer to/from wgnuplot.ini [TextLines]; avoid erasing the window area to avoid flicker during window resize; coloured output is not yet implemented. * src/win/wgnuplib.h: change definition of struct TW accordingly * src/win/wresourc.h: new menu item "Wrap long lines" * term/win.trm: update help texts on `text-menu` and `wgnuplot.ini` * config/makefile.nt, config/makefile.mgw, config/mingw/Makefile: include screenbuf.c|h in build process 2011-03-07 Bastian Maerkisch <bmaerkisch@web.de> * docs/Makefile.in: add new target 'htb' to create help file compatible with wxWidgets help viewer * docs/windows/doc2html.c (main): change command line options, (convert, header, footer) optionally split html files manually [SPLIT_FILES] (Note: this will produce ~500 files!), optionally create index file manually [CREATE_INDEX], always use hard-coded links as none of the open source viewers seem to support k-links * config/makefile.mgw, config/watcom/Makefile, config/mingw/Makefile: change command line accordingly 2011-03-06 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> * config/watcom/.cvsignore: Set up list of files to be ignored. * config/watcom/Makefile (clean): Remove GIF help files. * config/watcom/Makefile (wgnuplot_pipes.exe, gnuplot.exe): Add missing library msimg32. 2011-03-05 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> * config/makefile.nt (OPTIONS, LDFLAGS, TERMFLAGS): Grouped for easier disabling of optional terminals (gd, pdf, wx). (gnuplot.exe): Change name of console gnuplot to the common one. Drop wgnuplot_pipes.exe in the process. (pgnuplot.exe): Re-use this name for the original program that had it. (HCWPATH): New. Help compiler need not be on PATH. ($(HELPFILE)): USE $(HCWPATH). (CC): Remove /c option. Put that into calls that only compile, instead. Allows to use $(CC) instead of verbatim "cl" in more places. (LDFLAGS): Remove /subsystem option. Put it into calls instead, because it's different for different builds. (CBASEFLAGS): Adapted to current version of MSVC. (O): Missing macro needed for makefile.all. (linkopt1.msw, gnuplot.exe): Add recently needed library msimg32. 2011-03-03 Peter Hedwig <peter@affenbande.org> * term/lua.trm: If the cairo terminal is not available to make a bitmap image, use libgd instead. 2011-02-28 Ethan A Merritt <merritt@u.washington.edu> * docs/gnuplot.doc docs/plotstyles.gnu: Add a polar-mode example to the set of plotting style figures (even though it is not really a "plot style"). 2011-02-28 Bastian Maerkisch <bmaerkisch@web.de> * docs/xref.c (refs): Only emit start and stop strings if we write any items at all. Request by Mojca Miklavec * docs/windows/doc2html.c: Include list of subtopics. Optionally use hard links instead of index lookup (HTML_HARDLINKS). Feature Request #874572 * term/win.trm src/win/wgraph.c src/win/wgnuplib.h src/win/wresourc.h: Add double buffering to the windows terminal to avoid flicker on redraw. Add a poor man's version of antialiasing: draw on a bitmap twice the size of the window on screen, then scale down using halftone mode. Both settings are optional and can be changed via the `graph-menu` and `wgnuplot.ini`. 2011-02-26 Ethan A Merritt <merritt@u.washington.edu> * term/Makefile.am.in: Don't try to install TeX files for lua if we didn't build lua support. 2011-02-26 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> * config/mingw/Makefile, config/cygwin/Makefile: New files. Work like config/makefile.cyg and config/makefile.mgw, respectively, but without spilling files into the source tree. * config/makefile.oww: Dropped. Superseded by config/watcom/Makefile. 2011-02-26 Bastian Maerkisch <bmaerkisch@web.de> * src/win/wgraph.c (drawgraph): handle the case of transparent fill with color from linetype: save color to variable last_color on all changes and create solid brushes when required 2011-02-25 Bastian Maerkisch <bmaerkisch@web.de> * term/win.trm (WIN_image, WIN_filled_polygon) src/win/wgraph.c (drawgraph: W_boxfill, W_pm3d_setcolor, W_pm3d_filled_polygon) (W_image): support transparency and alpha channel for boxes, images and polygons. Use memory bitmaps to draw and then use AlphaBlend() and TransparentBlt() to copy to the screen. Fix clipping of images. * config/makefile.mgw(LDLIBS): additional GDI library file * docs/gnuplot.doc: update `set style fill transparent` * term/win.trm: update and reformat windows help text 2011-02-24 Shigeharu Takeno <shige@iee.niit.ac.jp> * docs/gnuplot-ja.doc: sync to docs version 1.651 2011-02-24 Peter Hedwig <peter@affenbande.org> * term/lua/gnuplot-tikz.lua term/lua.trm: Make full bitmap support conditional on HAVE_CAIROPDF. Necessary in order to build lua without the cairo terminals. 2011-02-24 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> * share/LaTeX/Makefile.am (${lua_files}): Missing $(top_srcdir) broke out-of-source-tree build. 2011-02-23 Ethan A Merritt <merritt@u.washington.edu> * term/lua/gnuplot-tikz.lua term/lua/gnuplot-tikz.help: Fix redundant definitions that broke TeX-based documentation. * term/Makefile.am.in: Regenerate term/lua/gnuplot-tikz.help 2011-02-23 Shigeharu Takeno <shige@iee.niit.ac.jp> * docs/gnuplot.doc: correct typos; revive some "html" anchors 2011-02-23 Bastian Maerkisch <bmaerkisch@web.de> * docs/gnuplot.doc: add link from `rand` to `random` and use proper table format in random section * term/lua/gnuplot-tikz.help term/lua/gnuplot-tikz.lua: balance backquotes in gnuplot help. * src/win/wgraph.c: reorder entries of the graph popup menu * src/win/winmain.c(IsWindowsXPorLater) src/win/wcommon.h: add a function to detect if gnuplot is running on Win XP or later. * src/win/wtext.c(TextMakeFont) src/win/wgraph.c(Makefonts): select ClearType or Proof quality depending on OS version to improve rendering quality 2011-02-21 Peter Hedwig <peter@affenbande.org> * term/lua/gnuplot-tikz.help term/lua/gnuplot-tikz.lua term/lua/NEWS term/lua/README term/lua/TODO term/lua.trm: Re-work the lua terminal to support ConTeXt and plain TeX in addition to TikZ. Requires TikZ >= 2.0 * share/LaTeX/Makefile.am: Regenerate the lua terminal *.tex and *.sty files from the Makefile rather than keeping them in cvs. 2011-02-21 Bastian Maerkisch <bmaerkisch@web.de> Windows HTML help, SF patch set #3186000. * docs/gnuplot.doc: changes for windows html help: update titlepage, comment out old html anchor definitions and links, and add html replacements for tables * docs/plotstyles.gnu: new variable winhelp used to switch between PDF output for "make pdffigures" and PNG output for windows html help * docs/windows/doc2html.c: New help file format converter derived from docs/doc2rtf.c and docs/doc2html.c (Attic) * docs/windows/wgnuplot.hhp: New file. HTML help project file. * docs/windows/wgnuplot.hhk: New file. HTML help stub index file. * docs/windows/wgnuplot.stp: New file. HTML help negative list for search index generation. Caution: maximum size 512 bytes. * src/command.c (help_command): issue error message if helpfile could not be opened, fix table of contents command ("help") * src/win/winmain.c (WinExit) [WITH_HTML_HELP]: no need to close help window * config/makefile.mgw: Optionally modify settings to build and use HTML help [HTML_HELP]. SF patch set #3186010. * history.c (write_history_list history_find history_find_all): use ANSI C definitions * command.c (history_command): mention editline in message for missing history support * readline.c(getc_wrapper): generalize code used for editline 2011-02-20 Ethan A Merritt <merritt@u.washington.edu> * configure.in: Revised configuration tests for lua support. Variable arrowstyle for vector plots. * src/gadgets.c src/gadgets.h src/set.c src/term_api.h: Add tag field to arrow_style_type * src/misc.c (arrow_parse) src/misc.h (arrow_use_properties): Parse "arrowstyle variable", export a routine to apply it. * src/plot2d.c (get_data): Allow 5 column "with vectors" style. * src/graphics.c (plot_vectors) src/graph3d.c (plot3d_vectors): Check for arrowstyle variable, apply to each vector if needed * demo/arrowstyle.dem: Modify last plot to show arrowstyle from column 2011-02-20 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> * config/config.oww [WITH_HTML_HELP]: Change helpfile name. * src/command.c [WITH_HTML_HELP]: Include <htmlhelp.h>. (help_command) [WITH_HTML_HELP]: Use HTML help instead of classic WinHelp32 helpfile system. * config/watcom/Makefile (HELP_EXT, HHC_DIR, HHC, WD, HHP_PROJ) (HHP_CONTENT, HHP_INPUT, HHP_OUTPUT): New variables. (HELPFILE, CPPFLAGS, LDLIBS) [HELP_EXT==chm]: Optionally modify settings to build and use HTML help. (wgnuplot.chm, $(HHP_OUTPUT), $(HHP_INPUT) $(HHP_CONTENT)) (doc2html.exe) [HELP_EXT==chm]: New targets. (clean, realclean): Delete files generated for HTML help. * term/win.trm (WIN_enhanced_flush): Replace C99-ism by simpler cast. 2011-02-20 Bastian Maerkisch <bmaerkisch@web.de> * src/win/text.c(DragFunc): Support drag and drop of directories onto the windows terminal emulator. * plot.c(main): init rl_library_name before first call to editline, otherwise .editrc does not work 2011-02-17 Ethan A Merritt <merritt@u.washington.edu> * src/internal.c (f_calln): Limit recursion depth for multi-variable functions in the same manner as for single-variable functions. Bug #3184671 * docs/gnuplot.texi: This file is generated from gnuplot.doc. The copy in cvs is perennially out of date, so remove it. "make gnuplot.texi" to regenerate it when needed. 2011-02-12 Ethan A Merritt <merritt@u.washington.edu> * term/cairo.trm: Add missing TERM_ALPHA_CHANNEL flag for pdfcairo 2011-02-11 Benjamin Lindner <lindnerb@users.sourceforge.net> * term/win.trm(WIN_enhanced_flush) src/win/wgraph.c(GraphGetTextLength): Adjust position of enhanced text to account for terminal aspect ratio. 2011-02-10 Benjamin Lindner <lindnerb@users.sourceforge.net> * term/win.trm (WIN_set_font) src/win/wgraph.c (GraphChangeFont): Do not initialize to an empty font name. Bugfix 2011-02-10 Ethan A Merritt <merritt@u.washington.edu> * term/lua.trm (LUA_set_color): Initialize rgb_color for the case TC_LT. term/lua/gnuplot-tikz.lua: Work around failure to handle LT_NODRAW and LT_BACKGROUND. This prevents a freeze, but is not a complete fix. * src/save.c (save_linetype): save/show variable linecolor correctly. * src/misc.h src/misc.c (parse_colorname): Split out color name interpretation into a separate routine. * src/graphics.c (filter_boxplot) src/graphics.h src/plot2d.c (boxplot_range_fiddling): Sort and filter points contributing to a boxplot at the point we pick the auto-range limits rather than waiting till when we draw it. Bug #3155750 2011-01-26 Ethan A Merritt <merritt@u.washington.edu> * term/emf.trm (EMF_filled_polygon): Explicitly set a zero-width same-color border for filled polygons, otherwise it inherits a border line style. Bug #3165902 2011-01-25 Ethan A Merritt <merritt@u.washington.edu> * src/set.c (set_encoding): Check result of "set encoding locale" to see if we have just loaded an sjis (codepage 932) locale. 2011-01-25 Shigeharu Takeno <shige@iee.niit.ac.jp> * src/term.c src/term_api.h term/post.trm term/svg.trm NEWS docs/gnuplot.doc: "set encoding sjis" allows characters in Shift-JIS Japanese encoding to survive enhanced text processing by the postscript and svg terminals. 2011-01-23 Ethan A Merritt <merritt@u.washington.edu> * src/graph3d.c (xtick_callback ytick_callback ztick_callbacke): Revert change made 2011-01-20 because it breaks hidden3d. * src/util3d.c (map3d_xy_double): Instead revise the map3d_xy() code path to share the coordinate transformation used by map3d_xyz(). Bug #3157712 2011-01-22 Shigeharu Takeno <shige@iee.niit.ac.jp> * src/win/wgraph.c: Fix typo in previous definition of _WIN32_WINNT. 2011-01-21 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (plot_boxplot): Handle some corner cases (all points have the same value, fewer than 4 valid points). Bug #3162872 2011-01-20 Ethan A Merritt <merritt@u.washington.edu> * src/graph3d.c (xtick_callback ytick_callback ztick_callbacke): Gnuplot uses two different pathways to convert 3D coordinates in user space into 2D coordinates in the terminal coordinate space. One of these goes via map3d_xyz() and TERMCOORD(); the other uses map3d_xy(). Unfortunately it seems the two paths can differ by +/- one pixel in the final terminal coordinates. This discrepancy is particularly noticeable in the grid and axis tic placement of 3D plots after "set view map" (Bug #3157712). This patch switches the tick_callback() routines to use the map3d_xy() pathway, which fixes the problem case described by the bug report. It would be to make both pathways share the same underlying code so that the discrepancy doesn't occur in other conditions. Bug #3157712 2011-01-19 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (place_raxis): If the polar axis maximum is autoscaled, draw the raxis all the way to that maximum value. Bug #3153406 * term/post.trm: Replace a use-once character array by a literal string. 2011-01-18 Mojca Miklavec <mojca.miklavec.lists@gmail.com> * src/wxterminal/gp_cairo.c: Cast size_t arguments to (int). 2011-01-17 Shigeharu Takeno <shige@iee.niit.ac.jp> * src/win/wgraph.c: Pass mouse wheel events through to the core mousing code so that interactive pan/zoom works from the windows terminal. 2011-01-16 Ethan A Merritt <merritt@u.washington.edu> * src/set.c (set_logscale set_autoscale) src/unset.c (unset_autoscale) src/axis.h docs/gnuplot.doc: Remove macro INIT_AXIS_ARRAY. "set logscale" should not affect pseudo-axes. Bug #3159062 2011-01-14 Ethan A Merritt <merritt@u.washington.edu> * src/plot2d.c (eval_plots): Minimum value of polar axis always auto-scales to 0 (already documented but implementation lacked). 2011-01-10 David Kuehling <dvdkhlng@gmx.de> * term/linux.trm: Makes linux.trm work with all SVGAlib video modes, not only 16 and 256-color modes. * src/term.c (init_terminal): Correct the auto-selection of terminal type vgagl or linux. Only select vgagl if lib3dkit is present. 2011-01-08 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> * src/internal.c (f_time): Don't use a local variable of the same name as a function you're trying to call. 2011-01-07 Peter Juhasz <juhaszp@users.sourceforge.net> * src/unset.c (reset_command): "reset" didn't restore default for "set raxis" 2011-01-03 Peter Juhasz <juhaszp@users.sourceforge.net> * src/internal.c (f_time) src/stdfn.h docs/gnuplot.doc: Fix breakage caused by the previous update 2011-01-02 Peter Juhasz <juhaszp@users.sourceforge.net> * src/internal.c (f_time) docs/gnuplot.doc: Modified time() so that type of result depends on type of argument 2011-01-01 Peter Juhasz <juhaszp@users.sourceforge.net> * src/eval.c src/internal.c src/internal.h: New time() function to get the current system time * docs/gnuplot.doc demo/timedat.dem: Documentation and demo for time() 2010-12-29 Daniel Sebald <daniel.sebald@ieee.org> * src/specfun.c (ranf): Place more restrictions on seed values used by rand(seed). * docs/gnuplot.doc (rand): Updated documentation of rand() function with details about algorithm and allowable seeds. 2010-12-29 Ethan A Merritt <merritt@u.washington.edu> * src/specfun.c: Make all the numerical routines f_whatever() retrieve their argument via pop_or_convert_from_string(). * src/specfun.c (ranf): Disallow fractional seed values since truncation to an integer produces an invalid seed value of zero. 2010-12-17 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c: Use t->set_color() rather than t->linetype() to set the fill color for pointinterval < 0 and for opaque key. Needed for windows terminal [any others?]. 2010-12-17 Shigeharu Takeno <shige@iee.niit.ac.jp> * term/win.trm: (WIN_point WIN_filled_polygon): Always draw point symbols using a solid line, even if the current line type is dashed. Unfortunately this fix is limited to monochrome mode. Bug #1952364 * src/win/wgraph.c (drawgraph): Selecting linetype 16 caused corruption of the color and pen assignments in mono mode. 2010-12-14 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> * config/watcom/Makefile, config/watcom/config.h: New version of Makefiles for OpenWatcom that builds outside the src tree. * config/config.oww (pclose, popen): New defines need to compile pipe-enabled version on OpenWatcom. * docs/Makefile.in (pdffigures): Make indirect target depending on pdffigures.tex, to avoid unconditional rebuild. (pdffigures.tex): New, renamed copy of previous target pdffigures. (figures): Set loadpath for demos; allow this to work from out-of-source builds. * docs/gnuplot.texi: Regenerated. * docs/gnuplot.doc: Clean up blank-only lines. * src/win/wtext.c, src/win/wprinter.c, src/win/wpause.c, src/win/wmenu.c, src/win/winmain.c, src/win/wgraph.c {HAVE_CONFIG_H}: Add "config.h" include. * src/syscfg.h {MSVC}: Add missing include (was hidden in MSDOS section, which the Win32 build doesn't touch). * src/makefile.awc (COREOBJS): Add missing entry for tabulate.c * term/PostScript/prologues.h (): Regenerated. prologue_cp1251_ps was missing completely, among other lapses. 2010-12-13 Tatsuro Matsuoka <tmacchant3@yahoo.co.jp> * term/emf.trm: Create special point types 70-74 to be filled polygons, just as they are for the postscript terminal. 2010-12-12 Ethan A Merritt <merritt@u.washington.edu> * src/graph3d.c: Honor "set key tc <foo>" in 3D plots. Bugfix. 2010-12-06 Shigeharu Takeno <shige@iee.niit.ac.jp> * docs/term-ja.diff docs/gnuplot-ja.doc: Sync Japanese documentation to gnuplot.doc rev 1.641 2010-12-06 Ethan A Merritt <merritt@u.washington.edu> * src/fit.x (fit_command): Do not use axis_array[SECOND_Z_AXIS] as temporary storage, because leaving junk in it can cause an erroneous free() operation later on. Bug #3130115 2010-12-04 Ethan A Merritt <merritt@u.washington.edu> * src/gadgets.c src/save.c src/set.c src/show.c src/tables.c src/tables.h src/unset.c docs/gnuplot.doc: 'set pointintervalbox'. 2010-12-03 Ethan A Merritt <merritt@u.washington.edu> * src/axis.c (gen_tics): Casting to a float may have been clever, but we can't afford the loss of precision (fails for time coordinates). * src/pm3d.c (pm3d_depth_queue_flush): Restore deleted code needed for extended color support. (There are still some svga users after all!) * term/emf.trm: Use the EMR_ELLIPSE primitive to draw point types 6 and 7. Make point types 4 and 5 slightly larger (looks better on MSWin). Switch to using linecap=flat and linejoin=miter by default, but add option "rounded/butt" to toggle this. 2010-11-29 Ethan A Merritt <merritt@u.washington.edu> * src/set.c (set_decimalsign): Possible fix for problem with numeric locales on Windows. Bug #3120819. 2010-11-28 Ethan A Merritt <merritt@u.washington.edu> * src/gadgets.c src/gadgets.h src/graphics.c demo/dashcolor.dem: Fix breakage to the pointinterval property that was caused by opaque key support. Add a demo plot illustrating pointinterval. 2010-11-26 Ethan A Merritt <merritt@u.washington.edu> * term/canvas.trm demo/html/webify_canvas.pl term/js/gnuplot_common.js term/js/gnuplot_dashedlines.js: Add support for dashed lines and rounded/butt line properties. 2010-11-24 Ethan A Merritt <merritt@u.washington.edu> * term/canvas.trm term/js/gnuplot_common.js term/js/gnuplot_mouse.js: Revamp the javascript support for the HTML5 canvas terminal. Move all global variables into a single object "gnuplot" declared in gnuplot_common.js. This revision also adds polar mode mousing support. * demo/html/Makefile.canvas demo/html/index.canvas demo/html/mouseable.dem demo/html/mousebox.template demo/html/webify_canvas.pl: Revamp the demos and build scripts to use the new javascript syntax. See tracker item #3058147 2010-11-23 Ethan A Merritt <merritt@u.washington.edu> * term/js/gnuplot_common.js: Rotated text should be zoom-able also. * term/js/gnuplot_mouse.js: Konqueror (webkit?) implementation of ctx does not like negative values of width or height. * src/eval.c (fill_gpval_axis) term/canvas.trm: Export polar axis limits and logscale status for external mousing. 2010-11-20 Casey Carter <ctcarter@users.sourceforge.net> * demo/html/index.canvas demo/html/index.save demo/html/index.svg term/canvas.trm: syntax error in link record of standalone mode. 2010-11-18 Ethan A Merritt <merritt@u.washington.edu> * src/axis.c src/axis.h src/command.c src/eval.c src/graphics.c src/misc.c src/mouse.c src/plot2d.c src/save.c src/set.c src/setshow.h src/show.c src/tables.c src/tables.h src/unset.c demo/polar.dem demo/poldat.dem docs/gnuplot.doc: Improved support for polar coordinate mode. The polar axis gets syntax and properties equivalent to the x/y/z axes. - set/unset raxis (always drawn through the origin) - set rrange controls the extent of the axes and of the plot itself; the xrange and yrange are set to match, but can be changed afterward - set rtics (drawn to right of origin; optionally mirrored to the left) - set log r (does not affect scaling on x or y) - polar coordinate readout from mousing - filledcurves bounded by constant r - polar.dem (turn off rtics so the demo output remains as before) poldat.dem (add a plot showing raxis, rtics, and log scaling on r) * src/set.c (set_grid): Clean up the option parsing for set grid. * src/save.c: save output for "set view" could not be read in. 2010-11-16 Ethan A Merritt <merritt@u.washington.edu> * src/gadgets.c (clip_line): When draw_clip_line() was made into a wrapper for clip_line() in May 2000, they differed in a single test. The version of the test from clip_line() was kept. But this broke the case clip_line(x, ymin, x, ymax+eps), which clipped to ymin,ymin rather than to ymin,ymax. I do not know if there were any callers of clip_line() at the time that needed the variant test, but if so they no longer exist. There is now only one other caller of clip_line(). Restore the test to the version that is correct for draw_clip_line(). * src/graphics.c (place_grid xtick2d_callback plot_impulses) src/term.c (do_arrow): Simplify these routines to use draw_clip_line(). 2010-11-13 Ethan A Merritt <merritt@u.washington.edu> * configure.in INSTALL src/Makefile.am src/term.c src/term.h: The copyright notice in bitmap.c is more restrictive than the gnuplot license. The new configuration option --without-bitmap-terminals omits this code from the gnuplot executable and also disables all terminals that depend on it. These are: epson.trm hp500c.trm hpljii.trm hppj.trm pbm.trm This affects HP deskjet-era printers, but not HPGL or PCL5 printers. * src/set.c: Replace unnecessary memcpy() calls with direct assignment. * docs/Makefile.in: Add gnuplot.pdf to the distributed package. Install it in the same directory as gnuplot.gih. 2010-11-12 Ethan A Merritt <merritt@u.washington.edu> * docs/gnuplot.doc command.c (help_command) util.h: "help" was collapsing all text to lower case, which broke "help 3D". Remove a vestigial call to lower_case(). Also make sure it is indexed. 2010-11-07 Ethan A Merritt <merritt@u.washington.edu> * src/axis.c src/axis.h src/set.c src/unset.c: Re-arrange the order of axes in the axis_table[] array so that all the parametric axes are at the end. This makes it easy to iterate over only those axes that make sense for the "set/unset logscale" commands. Previously, commands like "set logscale tuv" were silently accepted, leading to strange internal state. * src/plot2d.c: Issue an error message if the user tries to plot in polar mode with a style that is not supported. Bug #3072150 * src/axis.h (AXIS_INIT2D) src/set.c (set_logscale): Keep AXIS.log_base in sync with AXIS.base. Otherwise calls to AXIS_DO_LOG or AXIS_UNDO_LOG prior to the first plot command cause divide-by-zero or other math errors. 2010-11-07 Peter Juhasz <juhaszp@users.sourceforge.net> * src/datafile.c (df_readascii): The "labels" style did not work with pseudocolumns (e.g. "using 1:2:0"). Now it correctly handles pseudocolumns 0, -1, -2. * term/cairo.trm: Documentation fix: the section on the default size for the pngcairo terminal was incorrect. 2010-11-06 Peter Juhasz <juhaszp@users.sourceforge.net> * src/plot3d.c src/plot3d.h src/set.c src/show.c src/save.c docs/gnuplot.doc demo/kdensity2d.dem: New option "kdensity2d" for "set dgrid3d" to create two-dimensional kernel density plots. 2010-11-03 Shigeharu Takeno <shige@iee.niit.ac.jp> * docs/gnuplot.doc: typos * docs/term-ja.diff docs/gnuplot-ja.doc: Sync Japanese documentation to gnuplot.doc rev 1.633 2010-11-02 Michael Murphy <murphy-md@users.sourceforge.net> * share/LaTeX/gnuplot-lua-tikz.sty: Change the tikz default linetype 0 axis style from dashed to dotted, and the color from black to 35% black. Tracker item #3098162 2010-10-31 Petr Mikulik <mikulik@physics.muni.cz> * demo/pm3dcolors.dem: Added first page with multiple palettes. Show color ranges in [0:1]. 2010-10-28 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (plot_boxes): Prevent out-of-range boxes from creating degenerate invisible boxes in the output file. Can reduce file size for vector format output. Bug #3096750 * src/axis.c: The custom routine dbl_raise() was failing to handle NaN correctly, causing an infinite loop from e.g. set yrange [*:NaN] Replace it with a call to the C library routine pow(). 2010-10-26 Ethan A Merritt <merritt@u.washington.edu> * src/misc.c (parse_fillstyle): Allow "border" as a keyword without necessarily having an immediately following linetype or color. * src/plot2d.c (eval_plots): fillcolor was not taking into account user-defined linetypes. * src/plot3d.c src/misc.c: Simplify calls to load_linetype() * lisp/gnuplot.el: Emacs 24 does not have make-local-hook contributed patch #3095458 * ChangeLog.2: Split off ChangeLog at the point 4.5 was tagged. * docs/gnuplot.texi: regenerate from gnuplot.doc v 1.633 2010-10-23 Ethan A Merritt <merritt@u.washington.edu> * configure.in: The AC_CHECK_LIB macro apparently always appends to LIBS (despite what the documentation says). We want to accummulate readline-associated libraries in TERMLIBS rather than LIBS, so save and restore LIBS around the checks. 2010-10-21 Ethan A Merritt <merritt@u.washington.edu> * src/plot2d.c (boxplot_range_fiddling): trap and report an error if the x coordinate of a boxplot is undefined. Bug #3092435 * src/plot2d.c (get_data): Up until now this routine has returned the number of lines from which data were read, including lines containing undefined points. Change this to return the number of well-defined data points. That way a file of junk is recognized as empty if read with either 'using 1:2' or 'using ($1):($2)'. Bug #3092435 2010-10-20 Graham Reed <greed@users.sourceforge.net> * configure.in src/alloc.c: Test at configuration time whether the local implementation of malloc(0) returns 0 rather than a pointer. If so, work around it in gp_malloc(). Replaces alpha-specific fix of 2010-10-04. 2010-10-18 Ethan A Merritt <merritt@u.washington.edu> * src/plot2d.c (box_range_fiddling) src/graphics.c (plot_boxes): Catch a couple of corner cases of "plot ... with boxes". Bug #3075938 2010-10-14 Ethan A Merritt <merritt@u.washington.edu> * src/axis.c (gen_tics): A smart (or maybe that's dumb) compiler may optimize out our tests for step size less that the machine precision. Try to forestall this by marking the steps as (float)(volatile double). Bug #3085168 2010-10-12 Ethan A Merritt <merritt@u.washington.edu> * src/pm3d.c: Reduce the size of the pm3d surface quadrangle structure by removing a redundant copy of the vertex coordinates. Add a pointer to track the current plot's line color. Bug #2997853 2010-10-11 James R. Van Zandt <jrvz@comcast.net> * src/specfun.c src/specfun.h src/eval.c docs/gnuplot.doc: Adding support for the exponential integral E_n(x) as gnuplot function expint(n,x). 2010-10-10 Tatsuro Matsuoka <tmacchant3@yahoo.co.jp> * src/stdfn.c (not_a_number): Bit-pattern definition of NaN for MINGW 2010-10-09 Ethan A Merritt <merritt@u.washington.edu> * term/lua.trm (LUA_options): Null-terminate the "set term lua ..." command string at the first semicolon before passing it to lua. * src/fit.c src/fit.h src/set.c docs/gnuplot.doc: New option "set fit quiet" prevents fit information sent to the log file from being echoed also to stderr. Bug #2355210 2010-10-07 Ethan A Merritt <merritt@u.washington.edu> * src/gplt_x11.c: Protect against the case that the x11 colormap is not partitioned identically to the palette. 2010-10-06 Marco Cammarata <marcocamma@users.sourceforge.net> * docs/psdoc/ps_symbols.gpi: "set angle radian" 2010-10-06 Ethan A Merritt <merritt@u.washington.edu> * src/color.c src/pm3d.c src/pm3d.h set.c show.c docs/gnuplot.doc: Simplify the syntax for "set pm3d hidden3d". A linestyle is no longer required. If no linestyle is given, the line properties are taken from the plot command line. Bug #2997853 2010-10-05 Ethan A Merritt <merritt@u.washington.edu> * src/getcolor.c (quantize_gray) src/getcolor.h src/gplt_x11.c: Continuation of defined palette revamp (2010-10-01). Break out the new code into a separate subroutine that can be shared with gnuplot_x11. * src/color.c (draw_inside_color_smooth_box_bitmap): Assign colors to component colorbox rectangles by rounding the pixel coordinate up rather than down. This empirically gives better results in gd.trm, and doesn't seem to hurt other terminals. * term/post.trm term/pslatex.trm term/svg.trm term/PostScript/cp1251.ps src/term_api.h src/term.c docs/gnuplot.doc: Add support for codepage 1251, an alternative 8-bit Cyrillic encoding. 2010-10-04 Matthew Biggar <biggarm@users.sourceforge.net> * src/Makefile.am src/alloc.c: Architecture (Alpha) specific work- around to insure that gp_malloc() does not fail on error if 0 bytes are successfully allocated. 2010-10-02 Ethan A Merritt <merritt@u.washington.edu> * src/stdfn.c (not_a_number): Although DJGPP version 2.04 is reported to support atod("NaN"), this version is not universal. Switch to using an explicit bit pattern for NaN. 2010-10-01 Ethan A Merritt <merritt@u.washington.edu> * src/plot2d.c (cp_free): Prevent use-after-free error if a plot structure containing dynamically allocated data is reused for a later plot. * src/color.c (make_palette) src/getcolor.c (rgb1maxcolors_from_gray) docs/gnuplot.doc: Revamp the interaction of `set palette maxcolors` and defined palettes. Up until now, `set palette maxcolors N` meant both "allocate N colors" and "divide the color range into N equal parts". This meant that a user-defined palette that used unequal divisions of the total range interacted badly with a limited number of palette colors. Now we guarantee that in the case of defined palette ranges, a gray value is never mapped to a color outside its proper range even if the ranges are very unevenly spaced. If more color ranges are defined than the value of maxcolors, this may (or may not) result in increasing the effective value of maxcolors. Outboard terminals that enforce maxcolors (e.g. x11) do not yet benefit from this change. * configure.in src/datafile.c src/eval.c src/plot.c src/show.c term/lua.trm: Remove conditional flag HAVE_ISNAN. Apparently we have been getting along OK with an unprotected call to isnan() since Oct 2009. That would seem to be good evidence that we can remove the #ifdef protection elsewhere as well. 2010-09-30 Peter Juhasz <juhaszp@users.sourceforge.net> * src/plot2d.c (store_label eval_plots): Fix bug introduced by my patch of 2010-09-08 (references to uninitialized variables were found by valgrind). 2010-09-29 Ethan A Merritt <merritt@u.washington.edu> * src/color.c (draw_inside_color_smooth_box_bitmap): The color box is constructed from 128 segments. If any of these straddles a boundary within a defined palette, split it into 2 segments so that discrete color transitions are described with pixel accuracy. This does not fix imprecision in the palette itself, which can result if too few colors are allocated (set palette maxcolors). 2010-09-28 Petr Mikulik <mikulik@physics.muni.cz> * docs/titlepage.ipf docs/titlepage.tex: Years updated. 2010-09-28 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (plot_image_or_update_axes): Add support for log-scale transformation of 2D image data. * src/hidden3d.c: Disentangle variable color from the direction of arrows. Bug #3074212 2010-09-28 Volker Dobler <vdobler@users.sourceforge.net> * src/axis.c (load_one_range load_range) src/axis.h src/parse.c src/parse.h src/save.c src/set.c src/unset.c src/util.c demo/all.dem demo/autoscale.dem docs/gnuplot.doc: Introduce a mechanism for constraining the axis limits chosen during autoscaling. For example: set yrange [* : 100<*<200] constrains autoscaling on y such that the upper range limit must fall between 100 and 200. 2010-09-27 Peter Juhasz <juhaszp@users.sourceforge.net> * src/datafile.c (f_stringcolumn): The stringcolumn function didn't recognize columns 0, -1, and -2. Now it treats them the same as the column function does. 2010-09-27 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (apply_head_properties): Simplify the arrowhead code. * src/graph3d.c src/hidden3d.c src/util3d.c src/util3d.h: Provide a 3D wrapper apply_3dhead_properties() that dummies up an x-axis scale so that the 2D routine apply_head_properties() can be shared by 3D code. Bug #3074212 * src/term.c (do_arrow): To do proper foreshortening of 3D arrowheads would require a new approach. As an approximation, assume that any short arrow with a big arrowhead is the result of foreshortening. This affects 2D arrows also, but the visual effect is not bad. 2010-09-26 Ethan A Merritt <merritt@u.washington.edu> * src/command.c (replotrequest): Once we have started to replot, the previous data no longer exists. Therefore we must set refresh_ok = 0. 2010-09-23 Ethan A Merritt <merritt@u.washington.edu> * src/axis.c (axis_checked_extend_empty_range): When extending from an empty range, don't invert the axis direction by accident. Bug #3074365 2010-09-20 Ethan A Merritt <merritt@u.washington.edu> * src/plot2d.c (store2d_point): Allow the use of "with circles" in polar coordinate mode. * src/plot2d.c (get_data): The combination of smoothing and variable color cannot work in general. Disable variable color for all smoothed curves. Later we may add back support for the case of lc palette z. Bug #3063366 * src/graphics.c (fill_between): Fix filled curve clipping error. Bug #2963485 2010-09-19 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (edge_intersect): If for some reason we fail to find find the intersection points of a vector both of whose ends are out of range, issue a warning, pick an edge, and continue. I can't see any good reason to treat this as a fatal error. Bug #2824879 * docs/gnuplot.doc: Clarify the section on linetypes and linestyles. 2010-09-18 Ethan A Merritt <merritt@u.washington.edu> * src/eval.c src/internal.c src/internal.h docs/gnuplot.doc: New function value("X") returns the value of a variable named X. A = "foo" value("A") returns "foo" value(A) returns NaN, because there is no variable named foo value(2) returns 2 (numeric expressions have a natural value) Among other things, this allows you to read variable names from a data file and use the current value of those variables in a plot. * src/util.c (gprintf): Handle formats x/X/o/O for values that overflow (int) by switching to llx/llX/llo/llO and (long long). NB: This does _not_ extend the representation of negative numbers to 64 bits unless the representation overflows 32 bits. 2010-09-16 Ethan A Merritt <merritt@u.washington.edu> * tutorial/eg2.plt tutorial/eg6.plt tutorial/test_tikz.plt tutorial/Makefile.am.in tutorial/header.tex tutorial/tutorial.tex: Update the LaTeX tutorial a bit. More could be done. 2010-09-15 Ingo Thies <ingo.thies@gmx.de> * src/graph3d.c src/graph3d.h src/mouse.c src/set.c src/unset.c: Switch the middle button left/right mouse zoom behaviour in 3D plots so that the zoom response is logarithmic. 2010-09-15 Shigeharu Takeno <shige@iee.niit.ac.jp> * term/gd.trm: As of libgd 2.0.36 you can now specify a TrueType font using either Fontconfig syntax or using the font file name directly. But switching from one form to the other was only possible as an option of "set terminal". This patch enables us to specify these two forms of the font name in "set title", "set xlabel", and so on. 2010-09-15 Ethan A Merritt <merritt@u.washington.edu> * src/term_api.h src/term.c (strlen_tex): Add a special-case routine to estimate the true number of output characters in a LaTeX string containing markup. This is not a real LaTeX parser, but even a poor estimate is better than just calling strlen(). Bug #1603348 and others * term/latex.trm term/lua.trm term/pslatex.trm: Set flag TERM_IS_LATEX so that strings passed to these terminals are sent to strlen_tex() rather than the normal enhanced text string length estimation. 2010-09-10 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (boundary): When calculating the horizontal space required for x axis tick labels, we must ignore ticks that are outside the current axis range. * src/mouse.c (apply_zoom): Tick labels generated by 'using xticlabels(N)' may have changed while the plot was zoomed, so we must preserve them when un-zooming. 2010-09-08 Ethan A Merritt <merritt@u.washington.edu> * src/datafile.c (df_close): Free matrix data that was stored in memory during input. Otherwise we leak memory after every plot of matrix data. * src/color.h src/gadgets.c src/gadgets.h src/misc.c src/term.c src/term_api.h: Repair some lp_style_type definitions and initializers that were incorrect or incomplete. 2010-09-08 Peter Juhasz <juhaszp@users.sourceforge.net> * src/plot2d.c (store_label eval_plots): Extend variable color support for LABELPOINTS style by allowing "with labels tc X lc Y" where X, Y is one of "lc variable", "lc palette z", or "lc rgb variable". * src/misc.c (lp_parse): Revert the patch of 2010-07-08 because it accidentally disabled the coloring option "lc N". * src/graph3d.c (key_sample_line_pm3d key_sample_point_pm3d): More correct fix to bug #3026477: the functions above failed to call the simpler key sample routines in case of plots with coloring option "lc N" and "lc rgb 'color'". 2010-09-06 Shigeharu Takeno <shige@iee.niit.ac.jp> * docs/term-ja.diff docs/gnuplot-ja.doc: Sync Japanese documentation to gnuplot.doc rev 1.623 2010-09-04 Peter Juhasz <juhaszp@users.sourceforge.net> * src/set.c (set_logscale): Removed arbitrary limitation for log base (was >= 1.1, now > 1.0) 2010-09-03 Ethan A Merritt <merritt@u.washington.edu> * src/readline.c (readline): Fix Windows breakage (failure to recognize ^M as newline) caused by error in OSK code removal. 2010-08-31 Petr Mikulik <mikulik@physics.muni.cz> * src/os2/gnupmdrv.rc: Removed menu item Commands to clipboard. * src/gpexecute.c (gp_execute): Removed bSend2gp and call to TextToClipboard. * src/mouse.c (alert): Use DosBeep under OS/2. * os2/gclient.c: Removed unused #define GNUPMDRV. 2010-08-30 Ethan A Merritt <merritt@u.washington.edu> * src/show.c (conv_text): Until now, the "show" and "save" commands have replaced all non-ascii characters with a byte-by-byte octal escape sequence. This makes any labels, variables, titles, etc not human-readable if they contain UTF8 encoded characters. Now we simply pass them through as-is if the current encoding is UTF-8. I think this is the correct thing to do for other 8-bit encodings as well, but I can't test those easily. 2010-08-25 Ethan A Merritt <merritt@u.washington.edu> * src/plot2d.c (eval_plots): Allow "fc <colorspec>" as an in-line option to the plot command for plot styles that use a fill. 2010-08-14 Ethan A Merritt <merritt@u.washington.edu> * src/gplt_x11.c: The gnuplot_x11 side of Shige's fix. 2010-08-14 Shigeharu Takeno <shige@iee.niit.ac.jp> * term/x11.trm: The last font used inside an enhanced text string was not being cleared on exit. 2010-08-13 Ethan A Merritt <merritt@u.washington.edu> * src/ansichek.h src/gplt_x11.c src/plot.c src/readline.c src/show.c src/stdfn.h src/syscfg.h term/x11.trm: Remove conditional code for another obsolete platform (OSK/OS9, used for example on TRS-80). 2010-08-12 Ethan A Merritt <merritt@u.washington.edu> * src/command.c: OSX history command could segfault if there was no previous history file. * docs/gnuplot.doc: Reorganize documentation for binary files. 2010-08-09 Ethan A Merritt <merritt@u.washington.edu> * configure.in src/plot.c: More work to enable autoconfigue on OSX. 2010-08-08 Olivier Mehani <shtrom@users.sourceforge.net> * src/util.c docs/gnuplot.doc: Add ISO-IEC-80000 prefixes (ki Mi Gi etc) as gprintf format specifiers %b and %B, which are respectively the mantissa and exponent. Also fix an out-of-range formatting bug. 2010-08-07 Ethan A Merritt <merritt@u.washington.edu> * src/plot2d.c: Do not create a data record for a blank line at the end of the input stream. Bugfix. * src/plot2d.c (eval_plots): Update GPVAL_DATA values after plot in tabulate mode just as for normal plotting mode. Bug #3041233 * docs/gnuplot.doc src/gadgets.h src/graphics.c src/save.c src/set.c src/show.c src/tables.c src/tables.h: New option "set key opaque". If requested, the code makes two passes over each 2D plot command. The actual graph is drawn during the first pass, and the key box with plot samples is drawn during the second pass. 2010-08-05 Ethan A Merritt <merritt@u.washington.edu> * configure.in src/command.c src/history.c src/mouse.c src/plot.c src/show.c: Finally a work-around for the broken libreadline on OSX, which is really a wrapper for some version of libeditline. Test for each potentially missing function in configure and deal with it if it's missing. There may still be an issue with autoconfiguring support for the history functions. Bug #1839048 and others 2010-07-30 Ethan A Merritt <merritt@u.washington.edu> * src/command.c src/command.h src/eval.c src/fit.c src/gp_types.h src/plot.c src/readline.c src/stdfn.c src/syscfg.h src/term.h: Remove vestigial tests for DOS16 or DOS386 2010-07-29 Allin Cottrell <cottrell@wfu.edu> * src/term.c src/term_api.h term/emf.trm term/svg.trm docs/gnuplot.doc: Add support for codepage 950, which is Microsoft's version of Chinese Big5 encoding. Only the emf terminal (and maybe svg) do anything useful with it. "set encoding cp950" 2010-07-28 Ethan A Merritt <merritt@u.washington.edu> * term/estimate.trm: Always estimate escaped characters as requiring one character width. Bug #3036010 2010-07-27 Tim Mooney <enchanter@users.sourceforge.net> * configure.in: If lua.pc is not present but liblua.so is found anyhow, then set HAVE_LUA and LUA_LIBS explicitly. Bug #3035608 2010-07-26 Shigeharu Takeno <shige@iee.niit.ac.jp> * term/win.trm src/win/wgraph.c: Yet another windows terminal font fix. Bug #2972307 2010-07-25 Ethan A Merritt <merritt@u.washington.edu> * term/canvas.trm: "set term canvas fontscale <fs>" * src/graphics.c (do_plot do_key_layout): Separate out the code that allocates space for the graph legend, and collect the key sample code into a single place. 2010-07-15 Shigeharu Takeno <shige@iee.niit.ac.jp> * docs/gnuplot.doc: typos * docs/term-ja.diff docs/gnuplot-ja.doc: Sync Japanese documentation to gnuplot.doc rev 1.617 2010-07-14 Ethan A Merritt <merritt@u.washington.edu> * src/hidden3d.c: Remove magic number -3 and the test (foo>=-2) in favor of LT_NODRAW and test (foo!=LT_NODRAW). * src/hidden3d.c: #define PT_ARROWHEAD and PT_BACKARROW * src/hidden3d.c (make_edge draw_edge build_networks) src/util3d.c (draw3d_line_unconditional): Handle arrow heads and other arrow style parameters in hidden3d mode. For surfaces, edge.style indicates whether this edge is seen from the top or the bottom. Coopt this flag for VECTOR plots to indicate whether the vector points up (positive z) or down (negative z). Separate flag is needed because the end points are sorted on z. 2010-07-11 Peter Juhasz <juhaszp@users.sourceforge.net> Ethan A Merritt <merritt@u.washington.edu> * src/util3d.c (draw3d_point_unconditional): Remove incomplete local color handling; the shared code in term_apply_lp_properties now does a more complete job. * src/graph3d.c (do_3dplot): Simplify the key sample code for contour plots with style "points". Set a default color sequence for contours belonging to a surface drawn with "lc variable". 2010-07-10 Ethan A Merritt <merritt@u.washington.edu> * src/graph3d.c (do_3dplot): Fix bug introduced by patch of 23-Mar-2010. If the linetype of a 3D surface used "lc ..." then all contours of the surface were stuck with that same coloring rather than incrementing through successive line types. 2010-07-09 Ethan A Merritt <merritt@u.washington.edu> * src/term.c (term_apply_lp_properties): Yet another bandaid fix for problems with "lc var". If the higher level code has failed to resolve LC_COLORFROMCOLUMN (or LT_DEFAULT) into an actual color, use LT_BLACK. Bug #3026477 2010-07-08 Ingo Thies <ingo.thies@gmx.de> * src/gadgets.h src/mouse.c src/set.c: Allow continuous rotation of 3D plots when mousing; i.e., do not limit rotation angle to 0<rotx<180 2010-07-08 Ethan A Merritt <merritt@u.washington.edu> * src/misc.c (lp_parse): The coloring option "lc N" should not set a use_palette flag. I think the option "lc variable" shouldn't either. Bug #3026477 2010-07-07 Peter Juhasz <juhaszp@users.sourceforge.net> * src/datafile.c src/gadgets.c src/gadgets.h src/gp_types.h src/graph3d.c src/graphics.c src/graphics.h src/plot2d.c src/save.c src/set.c src/show.c src/tables.c src/tables.h src/unset.c: * docs/gnuplot.doc docs/plotstyles.gnu demo/all.dem demo/ellipses.dat demo/ellipses_style.dem demo/orbital_elements.dat demo/orbits.dem New plot style "with ellipses". Demos and documentation to match. 2010-07-07 Ethan A Merritt <merritt@u.washington.edu> * term/PostScript/prologue.ps: Add a default definition /g {setgray} def so that a missing palette initialization will result in normal grayscale rather than an invalid PostScript file. Bug #3026477 2010-07-06 Ethan A Merritt <merritt@u.washington.edu> * src/graph3d.c (boundary3d): Prevent infinite loop or divide-by-zero if the requested plot is so small that x or y dimension goes to zero. Bug #3026145 2010-07-05 Akira Kakuto * term/win.trm: More fixes to font initialization. Bug #2972307 #2993504 2010-07-02 Shigeharu Takeno <shige@iee.niit.ac.jp> * term/win.trm: Explicitly initialize font. Bug #2972307 2010-07-01 Ethan A Merritt <merritt@u.washington.edu> * src/datafile.c (df_readbinary): Regardless of the current timefmt setting, if we are reading time data from a binary file it will come in as a floating point value rather than as a string. So we can treat it like any other binary value. Thanks to Thomas Sefzick for pointing this out. * src/datafile.c (df_readbinary): In binary mode, string-valued functions were silently ignored. Fix this, thus allowing binary files to be plotted "with labels". For example: plot 'foo' binary format='%double' using 0:1:("A") with labels 2010-07-01 Ethan A Merritt <merritt@u.washington.edu> * docs/gnuplot.doc src/axis.h src/command.c src/datafile.c src/gp_time.h src/internal.c src/time.c: Track time coordinates to sub-second precision. Time data read using the %S format specifier in "set timefmt" is now treated as a floating point number rather than an integer. This affects data read from an input file ("set xdata time"), the axis range and tic locations given for an axis using time coordinates ("set xrange", "set xtics"), and time conversions performed via calls to strptime(). Time data output formats ("set format" strftime()) now accept a precision modifier to the %S format. For example, "%H:%M:%.3S" will print hour, minute, seconds to a precision of milliseconds. gnuplot> print strftime("%Y %D %H:%M:%.3S", 12345.6789) 2000 01/01/00 03:25:45.679 The maximum precision allowed for output is 6 digits (microseconds). 6 digit accuracy is possible for absolute dates through the year 2550. 2010-06-30 Ethan A Merritt <merritt@u.washington.edu> * src/plot2d.c (get_data): Add back the rather useless code that handles four columns of data for styles LINESPOINTS and POINTSTYLE, even though the variable color handling no longer needs it. It is still called (foolishly) if the plot command is issued with no using spec at all. 2010-06-29 Peter Juhasz * docs/gnuplot.doc: Document variable color for plot styles that were not previously supported. * src/plot2d.c: The final piece of "with labels tc variable" 2010-06-29 Ethan A Merritt <merritt@u.washington.edu> * src/set.c (parse_label_options) src/plot2d.c (store_label) src/pm3d.c (set_plot_with_palette): Finish variable color support for text color in LABELPOINTS. 2010-06-28 Peter Juhasz * src/graphics.c demo/varcolor.dem: Finish variable color support for plot style CANDLESTICKS. Expand the demo. 2010-06-28 Ethan A Merritt <merritt@u.washington.edu> * src/color.h: New flag TC_VARIABLE (only used for textcolor) * src/misc.c (parse_colorspec) src/set.c (set_key) src/graphics.c (do_key_sample): Accept "set key tc variable" 2010-06-27 Peter Juhasz * src/graphics.c src/plot2d.c: Remove dead code supporting the old way of handling variable color. Make "lc palette z" work. Since the new variable color mechanism frees up space in struct coordinate, use this to clean up the data storage for "with circles". * demo/varcolor.dem: General demo and debugging tool for the expanded support of variable color across almost all plot styles. * src/graphics.c src/plot2d.c: Implement variable color for *ERRORBARS, *ERRORLINES, FINANCEBARS, CANDLESTICKS 2010-06-27 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.h src/graphics.c plot2d.c: Maintain a dynamically- allocated array of per-datapoint color values in the header of each 2D plot. The array is allocated only if the plot uses variable color. * src/plot2d.c: Store variable color data in the plot->varcolor[] array for plot styles VECTOR CIRCLES BOXES LINES DOTS IMPULSES POINTSTYLE LINESPOINTS XYERRORLINES XYERRORBARS BOXXYERROR LABELPOINTS BOXERROR * src/graphics.c (check_for_variable_color): Convert this routine to check and load variable color using the new mechanism. Add variable color support for BOXXYERROR, BOXERROR 2010-06-26 Peter Juhasz * src/plot2d.c: In plots style "with circles", let a negative value for the radius indicate that the default radius should be used. 2010-06-24 Ethan A Merritt <merritt@u.washington.edu> * src/gadgets.c src/gadgets.h src/graphics.c src/plot2d.c src/save.c src/set.c src/show.c src/tables.c src/tables.h src/unset.c docs/gnuplot.doc: New style element "set style circle radius <R>" specifies a default radius for function plots or 2-column data plots drawn "with circles". 2010-06-16 Ethan A Merritt <merritt@u.washington.edu> * src/plot2d.c (eval_plots): Function plots should not be affected by the current setting of "boxwidth" unless they really do contain boxes. Bugfix 2010-06-15 Ethan A Merritt <merritt@u.washington.edu> * src/datafile.c: Do not allow xticlabels(foo) in association with style BOXPLOT, since there are no x coordinates. * src/gadgets.h: Add in missing fields of object initializers. 2010-06-11 Peter Juhasz * src/graphics.c (boundary): More correct fix for distorted vertical size of subplots in a multiplot. 2010-06-10 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (boundary): Fix a type that can distort the vertical size of subplots in a multiplot. 2010-06-02 Ethan A Merritt <merritt@u.washington.edu> * src/misc.c (need_fill_border): The fillstyle border color was not taking account of linetype redefinitions. 2010-05-30 Ethan A Merritt <merritt@u.washington.edu> * docs/gnuplot.doc: Document recently added %s time format (seconds since start of 2000). 2010-05-24 Ethan A Merritt <merritt@u.washington.edu> * src/graph3d.c (do_3dplot): Remove a restriction that limited depth- sorting of pm3d surfaces to those which were adjacent in the splot command. If there was a reason for the original restriction, that reason is now not remembered. Bug #3004793 2010-05-23 Ethan A Merritt <merritt@u.washington.edu> * term/emf.trm: Revise the enhanced text mode, especially text rotation. 2010-05-22 Ethan A Merritt <merritt@u.washington.edu> * term/canvas.trm (CANVAS_graphics ENHCANVAS_FLUSH): Fix a bug in applying the baseline of rotated enhanced text. Provide a dummy gnuplot_init() routine if a standalone html file with no mouse support is created. 2010-05-20 Ethan A Merritt <merritt@u.washington.edu> * term/estimate.trm (ENHest_writec strlen_utf8) src/term.c (estimate_strlen): Teach estimate_strlen() to handle UTF-8 encoded strings. The estimate is imperfect, but then again the estimate is already imperfect for any proportional font. To truly do this more accurately would require customized implementations for each terminal type. Any unicode code point below 0x3000 is treated as requiring one character width; code points above 0x3000 are treated as requiring two character widths. 2010-05-16 Ethan A Merritt <merritt@u.washington.edu> * src/hidden3d.c (draw_edge): Add support for coloring lines in hidden3d mode using 'lc variable' or 'lc rgb variable'. 2010-05-13 Ethan A Merritt <merritt@u.washington.edu> * term/cairo.trm (cairotrm_options): The "noenhanced" option was broken by the patch of 2009-07-03. Fix it. * term/cairo.trm (cairotrm_put_text): Enhanced text was applying the fontscale twice. Fix it. 2010-05-11 Ethan A Merritt <merritt@u.washington.edu> * src/eval.c (magnitude): Optimize for the predominant case (no imaginary component). 2010-05-10 Ethan A Merritt <merritt@u.washington.edu> * term/post.trm (PS_set_font): set ... font ",size" was not working for non-enhanced text. Now it is. * src/plot2d.c (parametric_fixup) src/plot3d.c (parametric_3dfixup): Delete vestigial code for auto-generation of a parametric plot title. 2010-05-09 Hans-Bernhard Broeker <broeker@physik.rwth-achen.de> * src/eval.c (magnitude): Yesterday's change breaks if the complex argument is {0,0}. 2010-05-08 Hans-Bernhard Broeker <broeker@physik.rwth-achen.de> * src/eval.c (magnitude): Make implementation robust to overflows and underflows. 2010-05-06 David Marx <itsdmarx@users.sourceforge.net> * src/syscfg.h: Tweaked version of _bool support for Sun/Solaris 2010-05-06 Ethan A Merritt <merritt@u.washington.edu * term/cairo.trm (cairotrm_graphics): Handle the special case of streaming pdfcairo output to stdout. (Requires cairo version >= 1.2) Bug #578311 2010-05-05 Ethan A Merritt <merritt@u.washington.edu * term/post.trm src/term.c: Move a global declaration out of post.trm so that gnuplot can be built without including the postscript terminal. 2010-05-02 Thomas Sefzick <thse@users.sourceforge.net> * src/gadgets.h src/graphics.c src/save.c src/set.c set/show.c src/tables.c src/tables.h docs/gnuplot.doc: New options "set key maxcolumns N maxrows M" to manually adjust the automatic layout of items in the figure legend. Implemented for 2D plots only. 2010-05-02 Ethan A Merritt <merritt@u.washington.edu * configure.in src/save.c src/set.c src/show.c src/unset.c src/fit.c src/fit.h docs/gnuplot.doc config/config.os2 config/config.wc config/config.nt config/config.dj2 config/config.oww config/config.cyg config/config.amg config/config.mgw: Remove conditional flag GP_FIT_ERRVARS, default to "set fit errorvar". Tracker item #2985752 * src/misc.c (lp_parse): "lc variable" was being lost in some cases. Bugfix 2010-04-24 Ethan A Merritt <merritt@u.washington.edu * config.mgw config.cyg config.os2: Enable HIDDEN_QUADTREE by default. Tracker item #2990173 2010-04-20 John Naylon <jpbn@users.sourceforge.net> * src/gp_types.h src/interpol.c src/plot2d.c src/tables.c docs/gnuplot.doc: New option "smooth cnormal", equivalent to "smooth cummulative" with automatic normalization to the range [0:1]. 2010-04-12 Ethan A Merritt <merritt@u.washington.edu * term/post.trm: Correct a typo that leads to serious problems with font size and placement (introduced by the fontscale code). 2010-04-04 Ethan A Merritt <merritt@u.washington.edu * term/cairo.trm: The cairo terminals were forgetting fontscale after the initial application. Bugfix * src/wxterminal/gp_cairo.c term/cairo.trm: Use-after-free error caused a segfault on certain enhanced text strings. Bug #2947223 2010-03-28 Ethan A Merritt <merritt@u.washington.edu * docs/gnuplot.doc: State explicitly that the timefmt %y interprets a 2 digit year number as being in the range 1969-2068. 2010-03-24 Ethan A Merritt <merritt@u.washington.edu * term/tgif.trm (text_angle): Handle text rotation -270 same as +90. Bugfix 2010-03-23 Guy Mann <guydmann@gmail.com> * term/js/gnuplot_mouse.js (mouse_update): Repaint current canvas before each incremental update of the zoom box. 2010-03-22 Ethan A Merritt <merritt@u.washington.edu * src/misc.c (lp_parse): Re-write the lp_parse() routine to prevent the loading of a user-defined linetype from undoing other linestyle properties given earlier in the same command. * src/util3d.h src/util3d.c (draw3d_line_unconditional) src/hidden3d (draw_edge draw_line_hidden): The code was passing in top and bottom colors for the hidden3d routines as integer linetypes. But loading a whole linetype lost any line properties given explicitly in the splot command. Change this so that the top and bottom colors are passed as t_colorspec structures instead. 2010-03-21 Tommaso Vinci <ilbibi@users.sourceforge.net> * Provide Humlicek's approximation to the Voigt/Faddeeva function voigt(x,y) = \frac{y}{\pi} \int{\frac{e^{t^2}}{(x-t)^2+y^2}}dt 2010-03-20 Ethan A Merritt <merritt@u.washington.edu * NEWS src/hidden3d.c src/plot3d.c src/graph3d.c docs/gnuplot.doc: Add support for 'with impulses' in hidden3d code. Previously the manual said 3D impulses were drawn "from the xy plane" but the code did not follow this, drawing instead from zmin. Now the 3D code always draws impulses from z=0 just as the 2D code always draws from y=0. 2010-03-18 Ethan A Merritt <merritt@u.washington.edu * docs/gnuplot.doc: Add index entries and update description of mouse scrolling and hotkeys. 2010-03-17 Ethan A Merritt <merritt@u.washington.edu * plot.c (main): Initialize c_token to a legal value at the start of interactive input. * docs/gnuplot.doc src/set.c src/term_api.h src/wxterminal/wxt_gui.cpp src/wxterminal/wxt_term.h term/cairo.trm term/emf.trm term/gd.trm term/pdf.trm term/post.h term/post.trm term/wxt.trm: New terminal option "fontscale <scale>". This scale factor is applied to the nominal font size before use, so that you can scale the font size up or down in parallel with scaling the output page up or down. This is mostly relevant for hardcopy output or embedded figures. 2010-03-14 Ethan A Merritt <merritt@u.washington.edu * INSTALL config/README config/makefile.amg config/makefile.ami config/makefile.dj2 config/makefile.unx config/term_pc.h configure.in docs/Makefile.in docs/README docs/gnuplot.doc src/Makefile.am src/Makefile.maint src/amiga.c src/command.c src/command.h src/graph3d.c src/graphics.c src/graphics.h src/makefile.all src/makefile.awc src/plot.c src/scanner.c src/stdfn.c src/stdfn.h src/syscfg.h src/term.c src/term.h src/variable.c term/amiga.trm: Remove code specific to amiga platforms. 30 files changed, 43 insertions(+), 1941 deletions(-) * config/makefile.dj2 config/makefile.unx config/term_pc.h configure.in docs/doc2texi.el src/eval.c src/eval.h src/makefile.all src/makefile.awc src/plot.c src/syscfg.h src/term.c src/term.h term/apollo.trm term/gpr.trm: Remove code specific to support of Apollo workstations. The final gnuplot version in the apollo archives was gnuplot 2.0 (1996). 15 files changed, 16 insertions(+), 1211 deletions(-) * src/pm3d.c src/tables.c src/term.c term/gd.trm term/pm.trm term/post.trm: Remove bits of dead code. 2010-03-13 Ethan A Merritt <merritt@u.washington.edu * config/makefile.286 config/makefile.msc config/makefile.msw config/makefile.tc config/makefile.wc config/makefile.unx src/Makefile.am src/alloc.c src/alloc.h src/eval.c src/gnuplot.def src/graph3d.c src/help.c src/hidden3d.h src/misc.c src/plot.c src/plot2d.c src/set.c src/show.c src/syscfg.h src/term.c src/term_api.h src/unset.c src/util3d.c term/cgm.trm: We have not supported 16-bit DOS or WIN since version 4.0. Remove the old cruft that was wrapped in conditional flags DOS16 WIN16 DOSX286 LITE 23 files changed, 11 insertions(+), 324 deletions(-) 2010-03-13 Ethan A Merritt <merritt@u.washington.edu> * src/util.c (getusername): Fix segfault if neither USER or USERNAME are present in the environment. 2010-03-09 Ethan A Merritt <merritt@u.washington.edu> * src/gplt_x11.c (preset): Fix compilation error if XAPPLRESDIR is not externally defined. 2010-03-08 Ethan A Merritt <merritt@u.washington.edu> * docs/README docs/Makefile.in docs/pdffigures.tex docs/titlepag.tex: Split out dependence on the packages graphicx and picins into a separate file (pdffigures.tex) that is only needed by target "make pdffigures". 2010-03-07 Ethan A Merritt <merritt@u.washington.edu> * share/Makefile.am: Give up on figuring out a universally agreed on place where x11 app-defaults files should be installed. Place ours in ${PREFIX}/share/gnuplot/4.5/app-defaults 2010-03-06 Tatsuro Matsuoka <tmacchant3@yahoo.co.jp> * INSTALL config/makefile.mgw config/makefile.cyg: Consolidate the instructions for building using mgw and cygwin into their respective makefiles. 2010-03-06 Ethan A Merritt <merritt@u.washington.edu> * src/plot2d.c (get_data): Both curves in 'with filledcurves' must use the same y axis properties. Bug #2941257 * src/util.c configure.in config/config.cyg config/config.dj2 config/config.mgw config/config.ntconfig/config.os2 config/config.oww: Remove the test for pwd.h, the configuration flag HAVE_PWD_H, and the conditional code that copies GECOS information from the password file into the header of PostScript and PDF output files. This addresses reported issues of privacy and reported problems with building a static executable. 2010-03-05 Ethan A Merritt <merritt@u.washington.edu> * src/internal.c (eval_reset_after_error f_call) src/internal.h src/util.c (int_error) eval.h (STACK_DEPTH): Add a recursion depth limit for calls to a user-defined function. Bump the maximum depth from 100 to 250. Bug #2954383 2010-03-05 Christoph Junghans (ottxor) * src/Makefile.am: Fix broken target "make clean" 2010-03-04 Thomas Sefzick <thse@users.sourceforge.net> * src/svg.trm: Make sure to reset ENHsvg_string_state after each use. 2010-03-03 Ethan A Merritt <merritt@u.washington.edu> * term/pdf.trm: Remove requirement that the 'size' option must be the last option given. 2010-02-27 Ethan A Merritt <merritt@u.washington.edu> * graph3d.c (check_for_variable_color) plot3d.c (get_3ddata) plot3d.c (plot3d_impulses plot3d_lines plot3d_points): The presence of variable color was being tracked by a shared variable, rgb_from_column, but it was not being updated in some circumstances. Get rid of the variable and test the plot header directly when needed. * term/emf.trm: Tweak empirical corrections for character widths. Additional thin character -, really thin chars i,.:;|! 2010-02-24 Peter Juhasz * src/save.c: The 'save' command was not correctly handling plot styles circles, image, or rgbimage. Bug #2958235 2010-02-24 Alexander Taschner <tachna@users.sourceforge.net> * src/command.c src/win/wgraph.c term/win.trm: Move declarations to conform with ANSI C. 2010-02-24 Ethan A Merritt <merritt@u.washington.edu> * term/cgm.trm (find_nearest_color): When looking for RGB colors, check both the user-loaded colors and the default set of colors. Otherwise RGB fails if the user has loaded no colors. * term/gd.trm: Documentation for the mechanism for setting line colors in the 'set term' command is out of date, and anyhow the mechanism is needed only for the terminal background. Line colors can now be handled in terminal-independent commands. Revise the docs accordingly. 2010-02-23 Ethan A Merritt <merritt@u.washington.edu> * src/specfun.c (ibeta) docs/gnuplot.doc: The approximation used for the function ibeta(a,b,x) was taken from Abramowitz & Stegun. However we failed to document that it is only usable on the domain x < (a-1)/(a+b-2). Add this warning to the docs and make sure that the function itself returns a consistant error value (-1) if the domain or range is invalid. Bug #2957184 2010-02-22 Don Taber <dtaber@topaflyers.com> * src/win/wgraph.c (SelFont): After a font change, call do_string_replot("") so that it is immediately visible. 2010-02-18 Ethan A Merritt <merritt@u.washington.edu> * term/svg.trm: Use dynamic allocation for all font names. This prevents buffer overflow problems for very long font names. * term/post.trm: Truncate over-long font names rather than allowing buffer overflow. 2010-02-17 Christoph Junghans (ottxor) * configure.in plot.c: New configuration option to add local packager to list of contacts for bug reporting. Bug #2951583 2010-02-17 Ethan A Merritt <merritt@u.washington.edu> * src/term.c (do_arc): Avoid calling trunc() because some compilers are still back in the dark ages (pre C99). * configure.in: Change default installation directory for x11 resources to /etc/X11/app-defaults. Bug #1953742 2010-02-17 Benjamin Lindner <lindnerb@users.sourceforge.net> * src/plot.c (interrupt_setup): Ctrl+C crashes windows console build. SF Patch #2848002 2010-02-16 Peter Juhasz * src/graphics.c src/plot2d.c src/term.c docs/gnuplot.doc demo/circles.dem demo/energy_circles.dat: Extend plot style "with circles" to allow optional start and end values for each arc. 2010-02-15 Benjamin Lindner <lindnerb@users.sourceforge.net> * src/win/wgnuplib.h src/win/wgraph.c term/win.trm: Add the option "close" to the windows terminal driver. Update documentation accordingly. 2010-02-15 Benjamin Lindner <lindnerb@users.sourceforge.net> * term/win.trm: Fix for windows terminal ignoring explicit fontname and size for labels. 2010-02-15 Benjamin Lindner <lindnerb@users.sourceforge.net> * src/win/wmenu.c (SendMacro): Bugfix in call to _getcwd. 2010-02-15 Benjamin Lindner <lindnerb@users.sourceforge.net> * term/win.trm: Add the options "size" and "position" to the windows terminal driver. Update documentation accordingly. 2010-02-15 Benjamin Lindner <lindnerb@users.sourceforge.net> * src/win/wgraph.c src/win/wresourc.h: Add the possibility to save the current graph window as EMF file. Add a Ctrl+S shortcut for the graph window and add an entry to the window's system menu. * term/win.trm: Update documentation accordingly. 2010-02-15 Benjamin Lindner <lindnerb@users.sourceforge.net> * src/win/wgraph.c: Update code to copy to clipboard as enhanced metafile, add Ctrl+C shortcut for graph window. * term/win.trm: Update documentation accordingly. 2010-02-15 Ethan A Merritt <merritt@u.washington.edu> * docs/gnuplot.doc src/gadgets.h src/graphics.c src/save.c src/set.c src/show.c: New style option (candlesticks or financebars) for 'with boxplots'. Apply the current setting of 'set bars' to boxplots drawn in candlestick style. 2010-02-12 Ethan A Merritt <merritt@u.washington.edu> * src/set.c (set_obj): Sanity check start and end angles of arc. 2010-02-11 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (plot_boxes): Amazingly old bug that fails to apply absolute boxwidth in the case where previous point was undefined. 2010-02-10 Shigeharu Takeno <shige@iee.niit.ac.jp> * docs/gnuplot-ja.doc docs/term-ja.diff: Sync Japanese documentation to gnuplot.doc rev 1.598 2010-02-07 Ethan A Merritt <merritt@u.washington.edu> * docs/gnuplot.doc: Clarify the documentation for xticlabels(). * docs/Makefile.in: Use htlatex to generate html docs 2010-02-07 Christoph Junghans (ottxor) * configure.in share/Makefile.am src/Makefile.am src/gplt_x11.c src/variable.c: Configurable X11 application resource path. Bug #2931287 #219323 2010-02-07 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (boxplot_range_fiddling) src/plot2d.c (plot_boxplot): Make boxplot handling ignore any undefined points in the data set. 2010-02-06 Ethan A Merritt <merritt@u.washington.edu> * NEWS docs/gnuplot.doc src/save.c src/set.c src/show.c src/tables.c src/tables.h src/term_api.h src/unset.c src/variable.c term/post.trm: Revise the search order for PostScript prologue files 1) directory given by 'set psdir' [new command] 2) directory given by environmental variable GNUPLOT_PS_DIR 3) built-in header if present, otherwise default system directory 4) loadpath [pretty useless, but that's what it did before] 2010-02-05 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (plot_boxplot): Fix off-by-one error in calculating quartile boundaries. 2010-02-03 Christoph Junghans (ottxor) * share/LaTeX/Makefile.am: Fix a logic error in testing the need to call texhash. 2010-02-03 Tatsuro Matsuoka <tmacchant3@yahoo.co.jp> * src/command.c (pause_command): Loop of waitforinput() for "pause -1" in console mode of Windows. 2010-02-02 Christoph Junghans (ottxor) * configure.in share/LaTeX/Makefile.am: kpsexpand was used in share/LaTeX/Makefile.am even if it was not installed. Add --texdir=DIR option to configure Bug #2934829 2010-02-02 Ethan A Merritt <merritt@u.washington.edu> * src/term.c (test_term): Iniitialize linetype structure before loading dynamic linetypes. Bug: points all showed as dots if user linetypes were not defined * src/syscfg.h: Attempt to fix build problem under Sun Studio (no definition for _Bool). Bug #2915835 2010-02-01 Ethan A Merritt <merritt@u.washington.edu> * term/canvas.trm: Fix typo in javascript output. Bug #2943778 2010-02-01 Petr Mikulik <mikulik@physics.muni.cz> * src/command.c (pause_command): Use the default message for Windows pause dialog. 2010-01-31 Tatsuro Matsuoka <tmacchant3@yahoo.co.jp> * src/command.c (pause_command): Fixes for pause on Windows with wxt. * src/wxterminal/wxt_gui.cpp (wxt_waitforinput): Fix for Windows. 2010-01-29 Ethan A Merritt <merritt@u.washington.edu> * src/scanner.c (scanner): There was no scanner rule covering a token starting with '.'. This caused ambiguity in the interpretation of '.E1'. Is it a strange representation of 0, or concatenation of a string variable E1? Resolve this with a new rule that a number with an initial '.' must continue with a digit. Bugfix 2010-01-28 Petr Mikulik <mikulik@physics.muni.cz> * src/command.c (pause_command): Fix "pause mouse" for gnuplot.exe on Windows. 2010-01-25 Ethan A Merritt <merritt@u.washington.edu> * INSTALL: Add section explaining the libreadline problem on OSX. 2010-01-25 Petr Mikulik <mikulik@physics.muni.cz> * src/win/wgraph.c (drawgraph pattern_bitmaps): Synchronize fill patterns of the Windows terminal with other terminals. 2010-01-16 Ethan A Merritt <merritt@u.washington.edu> * src/variable.c (loadpath_handler): Have "show loadpath" also list the environmental variable GNUPLOT_PS_DIR. Bug #2933345 2010-01-15 Christoph Junghans <ottxor@users.sourceforge.net> * configure.in src/Makefile.am demo/Makefile.am.in: "make check" needs help if we did ./configure --program-suffix=FOO In this case make a temporary symlink so that 'make check' can find gnuplot_x11. Bug #2926141 2010-01-12 Alexander Täschner <taschna@users.sourceforge.net> * src/win/winmain.c (MyVFPrintF): Microsoft Visual C does not use va_copy() and va_end(). 2010-01-12 <ottxor@users.sourceforge.net> * configure.in share/Makefile.am: Do not install LaTeX support files if there is no latex on the system. Add configuration option --without-latex Bug #2928310 2010-01-12 Ethan A Merritt <merritt@u.washington.edu> * term/pdf.trm: Always start a new path with a moveto. Bug #2930705 * src/plot2d.c (eval_plots): In generating points for a function plot, only x and y were guaranteed to be initialized. Now to be safe we initialize all fields. Bug #2930705 * src/plot2d.c (store2d_point): steps, fsteps, and histeps were incorrectly auto-scaling to yhigh (which is really variable color). Bug #2929314 2010-01-10 Ethan A Merritt <merritt@u.washington.edu> * docs/gnuplot.doc docs/plotstyles.gnu demo/boxplot.dem src/datafile.c src/gadgets.c src/gadgets.h src/gp_types.h src/graph3d.c src/graphics.c src/plot2d.c src/save.c src/set.c src/show.c src/tables.c src/tables.h src/unset.c: New plot style "with boxplot" and corresponding "set style boxplot". 2010-01-10 Shigeharu Takeno <shige@iee.niit.ac.jp> * docs/gnuplot-ja.doc docs/term-ja.diff: Sync Japanese documentation to gnuplot.doc rev 1.595 2010-01-10 <ottxor@users.sourceforge.net> * share/Makefile.am: Do not install x11 appdefaults file if no X11 support is selected. Bug #2928271 2010-01-06 Alexander Täschner <taschna@users.sourceforge.net> * config/config.nt src/datafile.c src/eval.c src/plot.c src/stdfn.c src/stdfn.h: Define a generic function not_a_number() in which we can hide platform-specific implementations. Add a support for initializing NaN and GPVAL_NaN on Windows. Bug #2925544 2010-01-03 Ethan A Merritt <merritt@u.washington.edu> * src/datafile.c (df_readascii): Further revision to maintain the old behaviour of the string variables demo. The demo uses a very unusual method to read time strings from the input file, but let's not break it unless necessary. 2010-01-02 Ethan A Merritt <merritt@u.washington.edu> * src/datafile.c (df_readascii): Time format "%s" should be able to handle any numeric input. Convert input of the form 'using ($1)' or 'using (f($1))' to a string so that it can be passed to gstrptime(). Bug #2899511 2010-01-01 Ethan A Merritt <merritt@u.washington.edu> * term/PostScript/prologue.ps term/PostScript/prologues.h: Update version in PostScript headers. Define a user-configurable flag SuppressPDFMark. * term/post.trm: Re-arrange stuff in the prolog so that users can either set SuppressPDFMark to true in an individual file or make a permanent change by setting it in the shared prolog file. 2009-12-31 Ethan A Merritt <merritt@u.washington.edu> * src/command.c src/gadgets.c src/gadgets.h src/graph3d.c src/graphics.c src/misc.c src/plot2d.c src/plot3d.c src/set.c src/show.c src/tables.c src/tables.h src/term_api.h src/term.c src/unset.c src/util3d.c demo/tango_colors.gp docs/gnuplot.doc: Allow the user to redefine the properties of basic linetypes. The redefinitions are persistent; i.e. they are not affected by "reset". The command options are identical to those for "set style line". New command: set linetype N {various line properties} set linetype cycle M The new line colors and widths can be set to cycle after going through M linetypes. E.g. for M=8, the color of linetypes 9, 17, 25 ... are the same as that of linetype 1. 2009-12-30 Peter Kalinin <pkalinin@users.sourceforge.net> * term/metapost.trm (MP_options): The metapost terminal sets the line thickness for plots via drawoptions, then uses 'draw GPtext ...' to place the text. The draw inherits options from drawoptions, which results in altered thicknesses of lines. Replace 'draw GPtext' with 'addto currentpicture also GPtext'. 2009-12-30 Shigeharu Takeno <shige@iee.niit.ac.jp> * src/win/wgnuplib.h src/win/wgraph.c term/win.trm: Monochrome option of win terminal seems to have no effect. set term win mono plot x draws a red line. I think the timing of calling ReadGraphini() is not correct. This should be done only once on first entry before setting the terminal options. 2009-12-30 Thomas Sefzick <thse@users.sourceforge.net> * src/graph3d.c: Fix incorrect color assignment of contour lines when 'set style increment user' is set. 2009-12-28 Ethan A Merritt <merritt@u.washington.edu> * src/plot.c (get_data) src/graphics.c (plot_c_bars) src/tabulate.c (print_table) docs/gnuplot.doc: Allow an optional 6th column in CANDLESTICKS style that specifies the width of each individual candle. 2009-12-24 Thomas Sefzick <thse@users.sourceforge.net> * src/tabulate.c src/time.c: Support the "%s" format specifier to strftime as per the unix man page. If the output format string is exactly "%s" then 'output_number()' in 'src/tabulate.c' returns the number of seconds since the beginning of the epoch as a number. All other cases ("%s" in combination with any other character) are treated in 'time.c'. 2009-12-24 Ethan A Merritt <merritt@u.washington.edu> * src/tabulate: Fix buffer overflow. * configure.in: The cross-compilation patch causes a recursive definition of CC in docs/Makefile. I have attempted to fix this by revising the definition of CC_FOR_BUILD, but I don't know if this will break cross-compilation again. 2009-12-24 Robert Schwebel <r.schwebel@pengutronix.de> * configure.in docs/Makefile.in: When cross compiling gnuplot, build the documentation generation tools in docs/ with CC_FOR_BUILD (host compiler), not with the cross compiler. 2009-12-22 Ethan A Merritt <merritt@u.washington.edu> * src/win/wgraph.c (drawgraph: W_line_type): Change initial line template for LT_BACKGROUND to 0 (lt -1) rather than 1 (lt 0). Possible fix for bug #1952287 2009-12-19 Juergen Wieferink <wieferink@freenet.de> * src/command.c, src/command.h, src/misc.c, src/misc.h (lf_push, lf_pop): Save if-state. * src/command.c, src/command.h, src/misc.c, src/misc.h (lf_push, lf_pop, load_file, do_string): Refactor duplicate code from load_file() and do_string() into lf_push() * misc.h, misc.c: Add field cmdline to LFS to allow correct deallocation. Check for infinite recursion. * src/misc.c (prepare_call, expand_call_args, load_file): Refactor code related to the call command out of load_file(). * src/command.c (history_command): Use do_string() now that it can detect recursions. * command.c, command.h, plot.c: Remove eval_depth and reset_eval_depth(). The new recursion detection in lf_push() should supercede this. 2009-12-18 Ethan A Merritt <merritt@u.washington.edu> * src/tables.h src/tables.c src/show.c src/save.c src/graph3d.h: Move all the DGRID3D_* options into a shared table. * src/set.c: Replace the set_dgrid3d() routine with a version that uses a shared option table and handles input values contained in variables. * docs/gnuplot.doc: bring dgrid3d syntax into line with the code 2009-12-12 Ethan A Merritt <merritt@u.washington.edu> * docs/plotstyles.gnu demo/bldg.png demo/barchart_art.dem Makefile.am.in New demo showing a) input of png image using binary filetype=png b) rescaling rectangular images to act as plot elements 2009-12-11 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c (boundary): Tweak auto-placement of plot borders so that it is closer to what was used prior to version 4.2.4. This makes the right margin slightly wider than in 4.2.6, and the left margin slightly narrower. 2009-12-08 Ethan A Merritt <merritt@u.washington.edu> * term/emf.trm (ENHemf_put_text): Left/right/center justification of enhanced text was not taking into account the text angle. Now it does. Bugfix. * src/breaders.c (gd_filetype_function): Make load of jpeg or gif image conditional on support by the installed libgd. * src/unset.c (reset_command): Reset options to plot style filledcurve. Bug #2911203 2009-12-05 Ethan A Merritt <merritt@u.washington.edu> * src/command.c (undefine_command): 'undefine A* B' should not affect BFOO. Bugfix. * src/internal.c (f_mult): Check for integer overflow when performing internal integer multiplication. Bug #2908270 2009-12-04 Tatsuro Matsuoka <tmacchant3@yahoo.co.jp> * config/makefile.mgw config/makefile.cyg: Create installation directories $(DESTDIR)/$(GNUPLOT_PS_DIR) $(DESTDIR)/$(GNUPLOT_LUA_DIR) 2009-12-04 Ethan A Merritt <merritt@u.washington.edu> * src/datafile.c (df_open): The variables that track matrix and binary data input (df_matrix, df_num_bin_records) must be re-inititialized for every file. 2009-12-03 Ethan A Merritt <merritt@u.washington.edu> * src/set.c (set_margin): Limit range of set ?margin at screen <foo> to 0 < foo < 1. * src/datafile.c (f_stringcolumn) src/plot2d.c (eval_plots): Enforce restrictions on which plot types can accept matrix data. 2009-12-01 Ethan A Merritt <merritt@u.washington.edu> * config/makefile.cyg config/makefile.dj2 config/makefile.mgw config/makefile.os2 src/Makefile.am term/lua.trm term/Makefile.am.in: Install the script gnuplot-tikz.lua under $pkgdatadir rather than under $pkglibexecdir. Fixes build problems under cygwin and mingw. Thanks to Tatsuro Matsuoka. * docs/gnuplot.doc: Provide an example of using 'set palette defined' to approximate default MATLAB coloring. Thanks to Mike <mws115@usa.com> 2009-11-26 Ethan A Merritt <merritt@u.washington.edu> * src/datafile.c: Remove unused global df_binary. 2009-11-16 Juergen Wieferink <wieferink@freenet.de> * src/command.c (do_string_and_free) src/misc.c (load_file): Fix memory issues of patch 2009-10-30 (SF Patch #2898455 and Bug #2895620). 2009-11-16 Petr Mikulik <mikulik@physics.muni.cz> * docs/gnuplot.doc: Fix support web page URL. * src/show.c (show_version): Less info help lines. 2009-11-14 Philipp K. Janert <janert@ieee.org> * src/command.c (undefine_command): Added support for wildcards in variable names. * docs/gnuplot.doc: Associated documentation. 2009-11-12 Thomas Sefzick <thse@users.sourceforge.net> * term/canvas.trm: Fix initialization failure on non-unix platforms. 2009-11-11 Petr Mikulik <mikulik@physics.muni.cz> * docs/gnuplot.doc: Updated introduction. 2009-11-06 Allin Cottrell <cottrell@wfu.edu> * src/wxterminal/gp_cairo.c (gp_cairo_convert): Work around a font problem in the win32 backend for pango/cairo character rendering. Conditional on WIN32 and libpango > 1.21, request rendering by freetype rather than win32. Fix suggested by cairo developer Behdad Esfahbod. 2009-11-04 Petr Mikulik <mikulik@physics.muni.cz> * src/term.c (enhanced_recursion): Replace in-line warnings sent to stderr by instead calling int_warn(). 2009-11-02 Ethan A Merritt <merritt@u.washington.edu> * src/breader.c: Give df_libgd_get_pixel() a valid return value even if it's only a dummy function because there is no png support. 2009-11-01 Petr Mikulik <mikulik@physics.muni.cz> * config/makefile.dj2 config/makefile.cyg config/makefile.mgw config/makefile.nt config/makefile.os2: Added GNUPLOT_JS_DIR. * term/canvas.trm (CANVAS_graphics): Fix // vs \ and / for jsdir and Windows. 2009-10-31 Petr Mikulik <mikulik@physics.muni.cz> * src/show.c (show_version): Fit width of welcome messages into 80 characters. 2009-10-31 Ethan A Merritt <merritt@u.washington.edu> * src/plot.h src/util.h: Tell gcc that routines bail_to_command_line(), int_error(), graph_error(), and os_error() do not return. #ifdef __GNUC__ ... __attribute__((noreturn)); This avoids spurious warnings about uninitialized variables from call sites like: int foo; if (END_OF_COMMAND || !(foo = try_to_get_string())) int_error(c_token,"missing string"); baz = foo; 2009-10-30 Juergen Wieferink <wieferink@freenet.de> * src/command.c, src/command.h (do_string, do_string_and_free): Use to different functions depending on whether the command string has to be freed. Don't reset screen_ok. * src/command.c, src/command.h (do_string_replot), src/fit.c (fit_interrupt): Use do_string() instead of do_line(). * src/command.c, src/misc.c, src/mouse.c, src/plot.c src/term.c: Adjust calls to do_string(). * src/plot2d.c src/graph3d.c src/gplt_x11.c term/lua.trm term/latex.trm src/wxterminal/gp_cairo_helpers.c: Silence gcc -Wall warnings. * src/misc.c: Remove latin1 char. * term/x11.trm: Silence valgrind warning. * demo/vector.dem, demo/fit.dem: Add closing quotes. 2009-10-30 Petr Mikulik <mikulik@physics.muni.cz> * src/win/winmain.c (MyFPrintF MyVFPrintF MyPrintF): Workaround for vsnprintf(NULL,0,...) returning zero (MingW 3.4). * docs/gnuplot.doc: Document "linetype <n>" option of linecolor and textcolor. 2009-10-28 Ethan A Merritt <merritt@u.washington.edu> * term/luz.trm term/lua/gnuplot-tikz.lua: Remove conditional tests for gnuplot version 4.3. We're past that now. 2009-10-27 Ethan A Merritt <merritt@u.washington.edu> * src/save.c (save_fillstyle): Repair missing brackets in if/else. 2009-10-26 Ethan A Merritt <merritt@u.washington.edu> * src/graphics.c src/axis.c src/term.c: Replace in-line warnings sent to stderr by instead calling int_warn(); 2009-10-24 David Marx <itsdmarx@users.sourceforge.net> * src/wxterminal/wxt_gui.cpp: The pieces of a concatenated string literal must be wrapped in wxT() to satisfy the Sun Studio CC compiler. Bug #2883574 2009-10-24 Ethan A Merritt <merritt@u.washington.edu> * src/color.c (make_palette): Remove useless warning message. * src/internal.c (f_power): Check for integer overflow from i**j and return a real value (well, actually a complex value) if it is needed. Bug #2881789 2009-10-23 Ethan A Merritt <merritt@u.washington.edu> * src/plot2d.c (get_data): The mechanism for flagging "lc variable" was not being triggered for plot types VECTOR, CIRCLES, BOXES. Bug fix 2009-10-22 David Marx <itsdmarx@users.sourceforge.net> * src/wxterminal/wxt_gui.cpp: _T() macro has been deprecated in favor of wxT(). Bug #2883574 2009-10-18 Ethan A Merritt <merritt@u.washington.edu> * VERSION FAQ.pdf src/version.c config/makefile.mgw configure.in docs/doc2texi.el docs/titlepag.tex Bump version of CVS development tree to 4.5 ���������������������������������������������������������������������������������gnuplot-4.6.4/Makefile.maint������������������������������������������������������������������������0000644�0004711�0000144�00000005764�11553107671�012722� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*-Makefile-*- # This Makefile fragment is shared between fileutils, sh-utils, textutils. maintainer-check: if head ChangeLog| grep 'Version $(VERSION)' > /dev/null; then \ :; \ else \ echo "$(VERSION) not in ChangeLog; not tagging" 1>&2; \ exit 1; \ fi $(MAKE) distcheck $(MAKE) my-distcheck # Tag before making distribution. Also, don't make a distribution if # checks fail. Also, make sure the NEWS file is up-to-date. # FIXME: use dist-hook/my-dist like distcheck-hook/my-distcheck. cvs-dist: maintainer-check pkg=`echo "$(PACKAGE)" | tr a-z A-Z`; \ ver=`echo "$(VERSION)" | sed 's/\./_/g'`; \ tag="$$pkg-$$ver"; \ echo tag=$$tag; \ if cvs -n log -h README| grep -e $$tag: > /dev/null; then \ echo "VERSION not new; not tagging" 1>&2; \ exit 1; \ fi; \ cvs update po; \ cvs tag -c $$tag $(MAKE) dist t=./=test my-distcheck: -rm -rf $(t) mkdir $(t) GZIP=$(GZIP) $(TAR) -C $(t) -zxf $(distdir).tar.gz cd $(t)/$(distdir) \ && ./configure --with-gd=no --with-png=no --with-lisp-files --with-tutorial \ && $(MAKE) CFLAGS='-Wformat -Werror' \ && $(MAKE) dvi \ && $(MAKE) check \ && $(MAKE) distclean cd $(t) && mv $(distdir) $(distdir).old \ && $(TAR) -zxf ../$(distdir).tar.gz diff -ur $(t)/$(distdir).old $(t)/$(distdir) -rm -rf $(t) @echo "========================"; \ echo "$(distdir).tar.gz is ready for distribution"; \ echo "========================" THIS_VERSION_REGEXP = $(subst .,\.,$(VERSION)) # FIXME: this works only for Gnits-style test releases. PREV_VERSION := $(shell echo $(VERSION)|tr a-z Xa-y) PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g') v = Version url-host-prefix = ftp://ftp.ucc.ie/ url = $(url-host-prefix)/pub/gnuplot/$(distdir).tar.gz md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//') rel-check: tarz=/tmp/rel-check-tarz-$$$$; \ md5_tmp=/tmp/rel-check-md5-$$$$; \ set -e; \ trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \ wget -q --output-document=$$tarz $(url); \ echo "$(md5) -" > $$md5_tmp; \ md5sum -c $$md5_tmp < $$tarz announcement: NEWS ChangeLog $(distdir).tar.gz @( \ echo Subject: $(distdir) released; \ echo; \ echo FIXME: put comments here; \ echo; \ echo " $(url)"; \ echo; \ echo "$(md5) $(distdir).tar.gz"; \ echo; \ echo NEWS:; \ sed -n "/$(THIS_VERSION_REGEXP)/,/$(PREV_VERSION_REGEXP)/p" NEWS \ | grep -v '^\['; \ echo; \ echo ChangeLog entries:; \ sed -n "1,/$v $(PREV_VERSION_REGEXP)/p" \ ChangeLog; \ ) alpha: $(MAKE) cvs-dist $(MAKE) -s announcement > /tmp/announcement ln $(distdir).tar.gz ../release chmod a-w $(distdir).tar.gz @echo ===================================== @echo 'ncftp -u $(url-host-prefix)/fs/share/ftp/gnu/fetish/' @echo '# put $(distdir).tar.gz' @echo '# send the /tmp/announcement e-mail' @echo 'pot-mail $(distdir).tar.gz | bash' @echo ===================================== amfiles: for subdir in config demo m4 term tutorial ; do \ make -C $$subdir -f Makefile.am.in Makefile.am ; \ done ������������gnuplot-4.6.4/tutorial/�����������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�011760� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/tutorial.tex�����������������������������������������������������������������0000644�0004711�0000144�00000046112�11722776214�014376� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������% % $Id: tutorial.tex,v 1.11.2.1 2012/02/26 01:06:26 sfeam Exp $ % % Tutorial for gnuplot plotting program, for LaTeX users % David Kotz % Duke University Computer Science Department % % Slightly updated by the gnuplot team in 2004, for gnuplot 4.0. % Updated for gnuplot 4.2 to include epslatex example by Ethan A Merritt % Updated for gnuplot 4.4 to replace 'set size' with 'set term latex size' % Updated for gnuplot 4.6 to mention the newer TeX-based terminals % % NOTE: If LaTeX runs out of memory processing plots, % add ``with lines 4'' to each curve in eg*.plt and rerun make. % % some header info \input{header} \begin{document} \begin{titlepage} \begin{center} {\Large \bf \LaTeX\ and the Gnuplot Plotting Program} \vskip2cm {\bf David Kotz} \\[0.4cm] Principal author of this tutorial for gnuplot 3.0, July 3, 1991 \\[1.0cm] {\bf current gnuplot team} \\[0.4cm] Updates of this tutorial for gnuplot 4.0, March 2004 \\ Update of this tutorial for gnuplot 4.2, August 2006 \\ Update of this tutorial for gnuplot 4.4, September 2010 \\ Update of this tutorial for gnuplot 4.6, February 2012 \vskip2cm % All plots in this document were made with the current version of gnuplot. \end{center} \vfil \vfil \tableofcontents \vfil \end{titlepage} \pagestyle{myheadings} \markright{Gnuplot \LaTeX\ Tutorial Version 4.6} \currentspace % defined in header.tex \section{Introduction and History} Gnuplot was originally developed by Colin Kelley and Thomas Williams in 1986 to plot functions and data files on a variety of terminals. In 1988 and 1989 I created an alternate version, known as Gnu\TeX, that supported a new ``terminal type'' called {\tt latex}, so gnuplot would output \LaTeX\ code. The plot could then be included in a \LaTeX\ document. I added a number of embellishments, supported only by the {\tt latex} terminal, allowing the user to produce publication-quality plots. In late 1989 and early 1990 Gnu\TeX\ and a number of other gnuplot variants were merged together into a new release of gnuplot, 2.0. This includes, among many other improvements, a \LaTeX\ driver derived from the one in Gnu\TeX. Anyone interested in using gnuplot with \LaTeX\ should read the next section, a tutorial, and the primary gnuplot manual. The reader should note that the \LaTeX\ picture environments output by gnuplot can be quite large and complicated, and can easily exceed the memory capacity of \TeX. If an enlarged version of \TeX\ is available, it is wise to use it. Otherwise, keep your plots simple and add \verb+\clearpage+ to your document where necessary. There is also an EEPIC driver ({\tt eepic}), intended for use with the EEPIC macro package for \LaTeX. EEPIC allows for much more efficient line-drawing, runs through \LaTeX\ faster, and uses less memory. See Section~\ref{s:eepic} for more information. Other gnuplot terminal types have been added that take advantage of newer \TeX\ and \LaTeX\ packages and variants, including {\tt emtex}, {\tt metafont}, {\tt epslatex}, {\tt tikz}, and {\tt context}. \section{Using gnuplot for \LaTeX: a Tutorial} Gnuplot is by nature an interactive program. Users making plots for \LaTeX\ will generally not use gnuplot interactively. Whenever hard copy is desired from gnuplot, the program need not be run on a graphics terminal. In this case the output is directed to a file or pipe, then sent to the appropriate output device. We now ignore the interactive nature of gnuplot and provide the input to gnuplot from a file, \ie, \begin{verbatim} gnuplot plotcommands.gp \end{verbatim} In this example, all of the commands to gnuplot are contained in the file {\tt plotcommands.gp}. Multiple filenames may be supplied to gnuplot this way, read in the order they are given. The output (one or more plots) may be piped to another program or redirected to a file. Usually, however, we direct the output explicitly with an instruction to gnuplot (the {\tt set output "outfile.tex"} command). Gnuplot continues to print error messages to the terminal (stderr). After printing, the output file has to be closed by {\tt set output}, \ie{} without the file name specification. \paragraph{Example 1:} Here is a first example, producing a plot for this document. The gnuplot input file is given below, and the output appears as Figure~\ref{eg1}. The input file defines the output to be in \LaTeX, gives a file name for the output, and plots $y=\sin(x)$ for $x$ on $[-\pi,\pi]$. To produce the figure, I simply \verb+\input{eg1}+ in a {\tt center} environment in a {\tt figure} environment. In following examples, I will enclose the figure in a box to make it look a little better. \singlespace \begin{verbatim} set terminal latex set output "eg1.tex" plot [-3.14:3.14] sin(x) \end{verbatim} \currentspace \begin{figure}[htbp] \begin{center} \input{eg1} \end{center} \caption{A first example: $y=\sin(x)$.} \label{eg1} \end{figure} Note that gnuplot has drawn in the axes, labeled the tic marks for us, scaled the $y$ axis automatically, and added a key in the upper-right-hand corner (this may be moved with the {\tt set key} command, and removed with {\tt unset key}% \footnote{In gnuplot version 4.0, the syntax {\tt set noXXX} changed to {\tt unset XXX}.}). This is the default line style for the \LaTeX\ driver. Because of the limited picture capabilities of \LaTeX, many dots are required to approximate drawing a solid line. This may overload the memory of many \TeX\ implementations. There are other line types available that draw dotted lines and use much less memory. The EEPIC driver draws solid lines with much less memory usage. \paragraph{Example 2:} Now we will embellish the plot a little with some labels. This input file produces Figure~\ref{eg2}. \singlespace \begin{verbatim} set terminal latex size 7cm, 5cm set output "eg2.tex" set format xy "$%g$" set title 'This is a plot of $y=\sin(x)$' set xlabel 'This is the $x$ axis' set ylabel 'This is\\the\\$y$ axis' plot [0:6.28] [0:1] sin(x) \end{verbatim} \currentspace \begin{figure}[htbp] \begin{center} \input{eg2} \end{center} \caption{A fancier example.} \label{eg2} \end{figure} We have specified the plot to be 7 cm wide and 5 cm tall with the {\tt set term latex size ...} command. This is the size of the area used by the plot, {\em including} space for the labels. In the first example, this size was the default 5 inches by 3 inches. We have requested that the format used by the $x$- and $y$-axis tic mark labels be in \LaTeX\ math mode. This makes the labels look a little better. The default is \verb+set format xy "%g"+. The \verb+%g+ represents the general-purpose floating point formatting specification for the {\tt printf} function in C. Any valid floating-point formatting specification, or \LaTeX\ command, is allowed in the format. A title for the plot and labels for the axes were set up in the next three commands. Note that they are processed by \LaTeX\ and so may have math mode and other symbols in them. The ylabel may have multiple lines, delineated with \verb+\\+. The ylabel can be moved around with optional offset parameters (see {\tt set ylabel} in the gnuplot manual). Typically, the ylabel needs to be moved to the left to avoid interfering with the left-hand side of the plot. Once these labels are set up, they will be used for all subsequent plot commands until they are changed. These labels are also supported by the other terminal types, but (of course) any \LaTeX\ code in the string will not be interpreted. We have also defined the range of both $x$ (now $[0,2\pi]$) and $y$ (here $[0,1]$). So far we have plotted one curve, $y=\sin(x)$, on one plot. In gnuplot, each {\tt plot} command generates a new plot. If the output is to a screen, the screen is cleared. If to a printer, a new page is produced. In the {\tt latex} case, a new picture is started. It is not likely that \LaTeX\ users will want this to happen, so generally each plot has its own input file and is kept in a separate output ({\tt .tex}) file for inclusion at different places in the document. \paragraph{Example 3:} To place more than one curve on a plot, use one {\tt plot} statement and separate the description of each curve by a comma. In our next example, we will plot both a function and a data file on the same plot. This plot is shown in Figure~\ref{eg3}. \singlespace \begin{verbatim} set terminal latex set output "eg3.tex" set format xy "$%g$" set title "This is another plot" set xlabel "$x$ axis" set ylabel "$y$ axis" set key at 15,-10 plot x with lines, "eg3.dat" with linespoints \end{verbatim} \currentspace \boxfigure{htbp}{\fullboxwidth}{ \begin{center} \input{eg3} \end{center} \caption{An example with two curves on the same plot.} \label{eg3} } Here you will see that the $x$ range was not specified. The $x$ range is determined automatically, unless specified by the user. In this case, it is defined by the range of the data file \verb+"eg3.dat"+. The function is plotted over the same range. If no data files or $x$ range are supplied, the default range of $[-10:10]$ is used. We have also moved the key to a different position. The function $y=x$ is plotted ``with lines'', which is the default plot style for functions, and is shown here to illustrate the plot style option. The data file {\tt eg3.dat} is plotted with style {\tt linespoints}, a style like {\tt lines} that also plots a symbol at each data point. There is a style called {\tt points} that only plots the symbols at data points, and another called {\tt dots} that plots a tiny dot for each data point. The {\tt points} and {\tt linespoints} styles produce a different point symbol for each curve on the plot (for up to twelve symbols, after which they are re-used; see Figure~\ref{testcomp} for a complete list). The {\tt lines} and {\tt linespoints} styles use a different line style for each curve on the plot (in this example the dots have different spacing). The style {\tt impulses} draws a perpendicular from each point to the $x$-axis. Finally, the {\tt errorbars} style can draw error bars at each data point (see the gnuplot manual). \paragraph{Example 4:} In the above plots of $\sin(x)$, it would make more sense to label the axis in units of $\pi$. The position and labels of the tic labels may be specified by the user, with the {\tt set xtics} and {\tt set ytics} commands. This is demonstrated by the following example, shown in Figure~\ref{eg4}. \singlespace \begin{verbatim} set terminal latex set output "eg4.tex" set format y "$%g$" set format x "$%.2f$" set title 'This is $\sin(x)$' set xlabel "This is the $x$ axis" set ylabel "$\\sin(x)$" unset key set xtics -pi, pi/4 plot [-pi:pi] [-1:1] sin(x) \end{verbatim} \currentspace \boxfigure{htbp}{\fullboxwidth}{ \begin{center} \input{eg4} \end{center} \caption{An example of the {\tt set xtics} command.} \label{eg4} } Since {\tt pi} is a predefined variable in gnuplot, we can use it anywhere we may use an expression. The {\tt set xtics} command here specifies that the tics on the $x$ axis start at $-\pi$ and increment by $\pi/4$. Since no end point is given, the tics continue to the right edge. We have also turned off the key, and changed the format to restrict the $x$-axis tic labels to 2 decimal places. Note that the y axis label was delimited by double quotes, so the backslash had to be escaped. Within single quotes, as in the title, gnuplot passes the backslashes through with no changes. (The exception: a backslash at the end of a line---even within single quotes---is used by gnuplot for line continuation.) With a little more work, the plot can look even better. Another form of this command allows us to specify the label and position of each tic individually. Replacing the above {\tt set xtics} command with the following gives us Figure~\ref{eg5}. We also make use of the line continuation character, the backslash (\verb+\+), to spread out this command for readability. \singlespace \begin{verbatim} set xtics ('$-\pi$' -pi,\ '$-\frac{\pi}{2}$' -pi/2,\ "0" 0,\ '$\frac{\pi}{2}$' pi/2,\ '$\pi$' pi) \end{verbatim} \currentspace \boxfigure{htbp}{\fullboxwidth}{ \begin{center} \input{eg5} \end{center} \caption{A fancy example of the {\tt set xtics} command.} \label{eg5} } \paragraph{Going further:} You should now be able to make a variety of plots for your \LaTeX\ document. We will present a final example without explanation that showcases some of the capabilities of gnuplot. You may find documentation for the various commands in the gnuplot manual, though hopefully this example is somewhat self-explanatory. This is shown in Figure~\ref{eg6}. \singlespace \begin{verbatim} set terminal latex size 5.0, 3.0 set output "eg6.tex" set format y "$%g$" set format x '$%5.1f\mu$' set title "This is a title" set xlabel "This is the $x$ axis" set ylabel 'This is\\a longer\\version\\ of\\the $y$\\ axis' offset -1 set label "Data" at -5,-5 right set arrow from -5,-5 to -3.3,-6.7 set key top left set xtic -10,5,10 plot [-10:10] [-10:10] "eg3.dat" title "Data File" with linespoints lt 1 pt 7,\ 3*exp(-x*x)+1 title '$3e^{-x^{2}}+1$' with lines lt 4 \end{verbatim} \currentspace \begin{figure} \begin{center} \input{eg6} \end{center} \caption{An example of many features.} \label{eg6} \end{figure} \paragraph{Line and point types:} For reference, we show all of the line and point types available in Figure~\ref{testcomp}. \subsection{Summary --- Use with \LaTeX} In summary, to use the most basic \LaTeX\ mode of gnuplot, the first command to gnuplot should be \begin{syntax} set terminal latex \end{syntax} and the output of gnuplot should be directed to a file, for example, \begin{verbatim} set output "plot.tex" \end{verbatim} This may be anything you like but it should have a {\tt .tex} extension, of course. The default plot size is 5 inches by 3 inches. You can change this be specifying a size in either cm or inches when you select the terminal \begin{syntax} set terminal latex size 7cm, 5cm \end{syntax} Then you do the (s)plot, and finally issue commands to close the file and switch the terminal back to the default by \begin{verbatim} set output set terminal pop \end{verbatim} Finally, the file will contain all of the plots you have specified (you probably only want one plot per file). This file can then be used in a \LaTeX\ document, \eg, \singlespace \begin{verbatim} \begin {figure} \begin{center} \input{plot} \end{center} \end {figure} \end{verbatim} \currentspace This puts the plot into a figure. You will also want to read about the following commands: {\tt set title, set xlabel, set ylabel, set key, set label, set xtics, set ytics}, and {\tt set clip}. These are all described in the regular gnuplot manual. \section{Use with EEPIC} \label{s:eepic} EEPIC is a macro package extending the picture environment of \LaTeX. If you have the EPIC or EEPIC macros, and your {\tt dvi} translator supports the {\em tpic\/} \verb+\special+s, then you can save \LaTeX\ memory. With EEPIC pictures, the {\tt plot.tex} file will be smaller, \LaTeX\ will run much faster (and need much less memory), and the {\tt dvi} file will be smaller. The quality of the output is about the same. If you change the source, you can generate some more interesting line styles. To use EEPIC, set gnuplot's terminal type to {\tt eepic} instead of {\tt latex}, and use gnuplot as before. The line styles will change. Include the file {\tt plot.tex} in your document as before, along with the document style options {\tt [epic,eepic]}. \section{Other \TeX-based terminal types in gnuplot} In addition to the \texttt{latex} terminal, the following \LaTeX-friendly terminals are available. The gnuplot documentation contains more information about the options and usage for each of these. \begin{itemize} \item \texttt{emtex}: Like the \texttt{latex} terminal, but supports emtex specials: any line slopes contrary to a very limited set of \LaTeX{} slopes. \item \texttt{epslatex}: Combined \LaTeX{} and postscript parts for text and lines, respectively, with the postscript part included by \verb+\includegraphics{...}+ command. \item \texttt{pstex} and \texttt{pslatex}: Combined \TeX{} / \LaTeX{} and postscript parts for text and lines, respectively, included by \verb+\special{psfile=...}+ command. \item \texttt{mf} and \texttt{mp}: Produces metafont and metapost outputs. \item \texttt{pslatex and epslatex}: New versions of these terminals were introduced in gnuplot 4.4. See the example below. \item \texttt{tikz}: Much improved graphics compaired to earlier \LaTeX terminals. Use of the terminal requires a lua interpreter that is called by gnuplot. The resulting .tex file can be processed using pdflatex. \item \texttt{context}: Produces output for the {Con{\TeX}t} environment. \end{itemize} The {\tt tikz} and {\tt context} terminals support newer gnuplot features such as transparency and embedded images. The {\em standalone} terminal option allows you to create a *.tex document that can be processed by itself without being embedded in a wrapping document. \section{Example of using the epslatex terminal driver} \label{epslatex} The epslatex terminal driver allows you to mix the best features of \TeX\ and PostScript. Text elements are typeset by \TeX\, while the graphic elements are created and positioned in parallel by gnuplot's PostScript driver. The plot can use either color or grayscale. The driver produces two different files, one for the eps part of the figure and one for the \LaTeX{} part. The name of the \LaTeX{} file is taken from the `set output` command. The name of the eps file is derived by replacing the file extension (normally ``.tex'') with ``.eps'' instead. With the epslatex terminal you cannot use ``\verb+\\+'' in a plain string to denote newline. You can either put each line in a separate label and specify vertical spacing manually, or put the entire label in a \verb+\parbox+. For example, the labels in Figure~\ref{epslatex_test} were generated with the following commands: \begin{verbatim} x=.10; y=.15; dy=.05 set label "left torus:" at screen x,y; y=y-dy set label '$x=\cos u+\frac{1}{2}\cos u \cos v$' at screen x,y; y=y-dy set label '$y=\sin u+\frac{1}{2}\sin u \cos v$' at screen x,y; y=y-dy set label "$z=\\frac{1}{2}\\sin v$" at screen x,y x=.65; y=.08 set label '\parbox{2.5in}{right torus:\\$x=1+\cos u+\fr\ ac{1}{2}\cos u \cos v$\\$y=\frac{1}{2}\sin v$\\\ $z=\sin u + \frac{1}{2}\sin u \cos v$}' at screen x,y left \end{verbatim} \boxfigure{htbp}{\fullboxwidth}{ \begin{center} \input{eg7} \end{center} \caption{Interlocking tori demo, drawn using the epslatex driver.} \label{epslatex_test} } \begin{figure}[htbp] \begin{center} \input{test} \end{center} \caption{Line and point types for the basic latex terminal. Note lack of text rotation.} \label{testcomp} \end{figure} \section{Contact for help} For general gnuplot questions, you can post to the gnuplot newsgroup \url{comp.graphics.apps.gnuplot}. Additional sources of information are listed on the gnuplot homepage \url{http://www.gnuplot.info}. \end{document} ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/eg5.plt����������������������������������������������������������������������0000644�0004711�0000144�00000000513�10451104665�013176� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������set terminal latex set output "eg5.tex" set format y "$%g$" set format x '$%4.1f\pi$' unset clip points set title 'This is $\sin(x)$' set xlabel "This is the $x$ axis" set ylabel '$\sin(x)$' unset key set xtics ('$-\pi$' -pi,\ '$-\frac{\pi}{2}$' -pi/2,\ "0" 0,\ '$\frac{\pi}{2}$' pi/2,\ '$\pi$' pi) plot [-pi:pi] [-1:1] sin(x) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/eg2.plt����������������������������������������������������������������������0000644�0004711�0000144�00000000326�11444555365�013207� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������set terminal latex size 7cm, 5cm set output "eg2.tex" set format xy "$%g$" set title 'This is a plot of $y=\sin(x)$' set xlabel 'This is the $x$ axis' set ylabel 'This is\\the\\$y$ axis' plot [0:6.28] [0:1] sin(x) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/makefile.dst�����������������������������������������������������������������0000644�0004711�0000144�00000001062�10451104666�014267� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile for gnuplot LaTeX tutorial # To make the manual from scratch, we run latex two times all: tutorial.dvi done done: latex tutorial echo > done # To touch it up after changes: remake: tutorial.dvi # Always runs latex, e.g., to get labels right force: latex tutorial tutorial.dvi: eg1.tex eg2.tex eg3.tex eg4.tex eg5.tex eg6.tex eg7.tex test.tex \ tutorial.tex header.tex latex tutorial rm -f done .SUFFIXES: .tex .plt .plt.tex: gnuplot $< clean: rm -f *~ *.log eg?.tex test.tex spotless: rm -f *~ *.log *.aux *.dvi eg?.tex test.tex done ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/eg1.plt����������������������������������������������������������������������0000644�0004711�0000144�00000000101�06677170223�013173� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������set terminal latex set output "eg1.tex" plot [-3.14:3.14] sin(x) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/linepoin.plt�����������������������������������������������������������������0000644�0004711�0000144�00000001045�11705316753�014342� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Plots all line types and point types set term latex set out "linepoin.tex" set clip points set dummy t,y unset key set parametric set samples 14 # for trange 0:13, we get 14 points: 0, 1, ..., 13 set style function lines set xtics 1,1,12 set ytics 1,1,6 set title "Up to 6 line types and 12 point types" set trange [0 : 13] set xlabel "Points" set xrange [0 : 13] set ylabel "Lines" set yrange [0 : 7] plot t,1, t,2, t,3, t,4, t,5, t,6, 1,t w p, 2,t w p, 3,t w p, 4,t w p,5,t w p, 6,t w p, 7,t w p, 8,t w p, 9,t w p, 10,t w p, 11,t w p, 12,t w p �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/eg3.dat����������������������������������������������������������������������0000644�0004711�0000144�00000001415�06677170224�013160� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������-20.000000 -9.125028 -19.000000 -9.109280 -18.000000 -9.091787 -17.000000 -9.072243 -16.000000 -9.050265 -15.000000 -9.025369 -14.000000 -8.996933 -13.000000 -8.964147 -12.000000 -8.925931 -11.000000 -8.880819 -10.000000 -8.826766 -9.000000 -8.760835 -8.000000 -8.678648 -7.000000 -8.573396 -6.000000 -8.433886 -5.000000 -8.240405 -4.000000 -7.954906 -3.000000 -7.494275 -2.000000 -6.642892 -1.000000 -4.712389 0.000000 0.000000 1.000000 4.712389 2.000000 6.642892 3.000000 7.494275 4.000000 7.954906 5.000000 8.240405 6.000000 8.433886 7.000000 8.573396 8.000000 8.678648 9.000000 8.760835 10.000000 8.826766 11.000000 8.880819 12.000000 8.925931 13.000000 8.964147 14.000000 8.996933 15.000000 9.025369 16.000000 9.050265 17.000000 9.072243 18.000000 9.091787 19.000000 9.109280 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/test.plt���������������������������������������������������������������������0000644�0004711�0000144�00000000047�10451104666�013500� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������set term latex set out "test.tex" test �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/Makefile.in������������������������������������������������������������������0000644�0004711�0000144�00000032413�12223337636�014053� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = tutorial DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alpha.m4 \ $(top_srcdir)/m4/apple.m4 $(top_srcdir)/m4/beos.m4 \ $(top_srcdir)/m4/msdos.m4 $(top_srcdir)/m4/next.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROEPS_CFLAGS = @CAIROEPS_CFLAGS@ CAIROEPS_LIBS = @CAIROEPS_LIBS@ CAIROPANGO_CFLAGS = @CAIROPANGO_CFLAGS@ CAIROPANGO_LIBS = @CAIROPANGO_LIBS@ CAIROPDF_CFLAGS = @CAIROPDF_CFLAGS@ CAIROPDF_LIBS = @CAIROPDF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIST_CONTACT = @DIST_CONTACT@ DVIPS = dvips ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ GDLIB_CONFIG = @GDLIB_CONFIG@ GIHDIR = @GIHDIR@ GREP = @GREP@ GTK28_CFLAGS = @GTK28_CFLAGS@ GTK28_LIBS = @GTK28_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEXPAND = @KPSEXPAND@ LASERGNU = @LASERGNU@ LATEX = @LATEX@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARIES_FOR_X = @LIBRARIES_FOR_X@ LIBS = @LIBS@ LINUXSUID = @LINUXSUID@ LISPDIR = @LISPDIR@ LN_S = @LN_S@ LRELEASE = @LRELEASE@ LTLIBOBJS = @LTLIBOBJS@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGO_1_10_2_CFLAGS = @PANGO_1_10_2_CFLAGS@ PANGO_1_10_2_LIBS = @PANGO_1_10_2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PDFLIB_CONFIG = @PDFLIB_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ PLAINTEX = @PLAINTEX@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RCC = @RCC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMLIBS = @TERMLIBS@ TERMXLIBS = @TERMXLIBS@ TEXDIR = @TEXDIR@ TEXHASH = @TEXHASH@ TROFF = @TROFF@ TUTORIAL = @TUTORIAL@ UIC = @UIC@ VERSION = @VERSION@ VERSION_MAJOR = @VERSION_MAJOR@ WX_CONFIG = @WX_CONFIG@ WX_LIBS = @WX_LIBS@ X11_APPDEFAULTS_DIR = @X11_APPDEFAULTS_DIR@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_OBJC = @ac_ct_OBJC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign PLT_FILES = eg1.plt eg2.plt eg3.plt eg4.plt eg5.plt eg6.plt eg7.plt \ linepoin.plt test.plt test_tikz.plt EXTRA_DIST = Makefile.am.in $(PLT_FILES) \ header.tex makefile.dst tutorial.tex eg3.dat CLEANFILES = tutorial.aux tutorial.dvi tutorial.log tutorial.pdf tutorial.ps \ tutorial.toc eg1.tex eg2.tex eg3.tex eg4.tex eg5.tex eg6.tex eg7.tex \ eg7.eps eg7.pdf test.tex SUFFIXES = .dvi .plt .pdf .tex .ps RUN_GNUPLOT = if test -x $(top_builddir)/src/gnuplot ; then \ GNUPLOT_PS_DIR=$(top_srcdir)/term/PostScript \ GNUPLOT_LIB=$(srcdir) \ GNUTERM=latex \ $(top_builddir)/src/gnuplot $< ; \ else \ gnuplot $< ; \ fi all: all-am .SUFFIXES: .SUFFIXES: .dvi .plt .pdf .tex .ps .eps $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tutorial/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tutorial/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf-am: ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am # default target all: @TUTORIAL@ tutorial: tutorial.dvi notutorial: # To touch it up after changes: remake: tutorial.dvi ps: tutorial.ps tutorial.ps: tutorial.dvi pdf: tutorial.pdf tutorial.dvi: eg1.tex eg2.tex eg3.tex eg4.tex eg5.tex eg6.tex eg7.tex eg7.eps test.tex \ tutorial.tex header.tex @echo Building LaTeX tutorial TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(LATEX) tutorial TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(LATEX) tutorial tutorial.pdf: eg1.tex eg2.tex eg3.tex eg4.tex eg5.tex eg6.tex eg7.tex eg7.pdf test.tex \ tutorial.tex header.tex @echo "Building LaTeX tutorial (PDF version)" TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(PDFLATEX) tutorial TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(PDFLATEX) tutorial eg7.eps: eg7.plt $(RUN_GNUPLOT) .dvi.ps: $(DVIPS) -o $@ $< .plt.tex: $(RUN_GNUPLOT) .eps.pdf: epstopdf $< distclean-local: @if test "$(top_srcdir)" != "$(top_builddir)" ; then \ rm -f eg3.dat; \ fi Makefile.am: Makefile.am.in rm -f $@ $@t sed -n '1,/^##plt-files-begin/p' Makefile.am.in > $@t echo PLT_FILES = *.plt | fmt | (tr '\012' @; echo ) \ |sed 's/@$$/%/;s/@/ \\@/g;' | tr @% '\012 ' >> $@t sed -n '/^##plt-files-end/,$$p' $< >> $@t chmod og-w $@t mv $@t $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/Makefile.am.in���������������������������������������������������������������0000644�0004711�0000144�00000003562�11752300770�014445� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign ##plt-files-begin ##plt-files-end EXTRA_DIST = Makefile.am.in $(PLT_FILES) \ header.tex makefile.dst tutorial.tex eg3.dat CLEANFILES = tutorial.aux tutorial.dvi tutorial.log tutorial.pdf tutorial.ps \ tutorial.toc eg1.tex eg2.tex eg3.tex eg4.tex eg5.tex eg6.tex eg7.tex \ eg7.eps eg7.pdf test.tex DVIPS = dvips LATEX = @LATEX@ SUFFIXES = .dvi .plt .pdf .tex .ps # default target all: @TUTORIAL@ tutorial: tutorial.dvi notutorial: # To touch it up after changes: remake: tutorial.dvi ps: tutorial.ps tutorial.ps: tutorial.dvi pdf: tutorial.pdf tutorial.dvi: eg1.tex eg2.tex eg3.tex eg4.tex eg5.tex eg6.tex eg7.tex eg7.eps test.tex \ tutorial.tex header.tex @echo Building LaTeX tutorial TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(LATEX) tutorial TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(LATEX) tutorial tutorial.pdf: eg1.tex eg2.tex eg3.tex eg4.tex eg5.tex eg6.tex eg7.tex eg7.pdf test.tex \ tutorial.tex header.tex @echo "Building LaTeX tutorial (PDF version)" TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(PDFLATEX) tutorial TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(PDFLATEX) tutorial RUN_GNUPLOT = if test -x $(top_builddir)/src/gnuplot ; then \ GNUPLOT_PS_DIR=$(top_srcdir)/term/PostScript \ GNUPLOT_LIB=$(srcdir) \ GNUTERM=latex \ $(top_builddir)/src/gnuplot $< ; \ else \ gnuplot $< ; \ fi eg7.eps: eg7.plt $(RUN_GNUPLOT) .dvi.ps: $(DVIPS) -o $@ $< .plt.tex: $(RUN_GNUPLOT) .eps.pdf: epstopdf $< distclean-local: @if test "$(top_srcdir)" != "$(top_builddir)" ; then \ rm -f eg3.dat; \ fi Makefile.am: Makefile.am.in rm -f $@ $@t sed -n '1,/^##plt-files-begin/p' Makefile.am.in > $@t echo PLT_FILES = *.plt | fmt | (tr '\012' @; echo ) \ |sed 's/@$$/%/;s/@/ \\@/g;' | tr @% '\012 ' >> $@t sed -n '/^##plt-files-end/,$$p' $< >> $@t chmod og-w $@t mv $@t $@ ����������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/eg6.plt����������������������������������������������������������������������0000644�0004711�0000144�00000000731�11444555365�013213� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������set terminal latex size 5.0,3.0 set output "eg6.tex" set format y "$%g$" set format x '$%5.1f\mu$' set title "This is a title" set xlabel "This is the $x$ axis" set ylabel 'This is\\a longer\\version\\ of\\the $y$\\ axis' offset -1 set label "Data" at -5,-5 right set arrow from -5,-5 to -3.3,-6.7 set key top left set xtic -10,5,10 plot [-10:10] [-10:10] "eg3.dat" title "Data File" with linespoints lt 1 pt 7,\ 3*exp(-x*x)+1 title '$3e^{-x^{2}}+1$' with lines lt 4 ���������������������������������������gnuplot-4.6.4/tutorial/eg7.plt����������������������������������������������������������������������0000644�0004711�0000144�00000002237�10527700623�013205� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������set term epslatex color solid set output 'eg7.tex' unset border set dummy u,v unset key unset encoding set parametric set view 60, 30, 1.2, 1.3 set isosamples 50, 20 set hidden3d offset 1 trianglepattern 3 undefined 1 altdiagonal bentover set noxtics set noytics set noztics set title "Interlocking Tori - PM3D surface with depth sorting" set urange [ -3.14159 : 3.14159 ] noreverse nowriteback set vrange [ -3.14159 : 3.14159 ] noreverse nowriteback set pm3d depthorder x=.10; y=.15; dy=.05 set label "left torus:" at screen x,y; y=y-dy set label '$x=\cos u+\frac{1}{2}\cos u \cos v$' at screen x,y; y=y-dy set label '$y=\sin u+\frac{1}{2}\sin u \cos v$' at screen x,y; y=y-dy set label "$z=\\frac{1}{2}\\sin v$" at screen x,y x=.65; y=.08 set label '\parbox{2.5in}{right torus:\\$x=1+\cos u+\fr\ ac{1}{2}\cos u \cos v$\\$y=\frac{1}{2}\sin v$\\\ $z=\sin u + \frac{1}{2}\sin u \cos v$}' at screen x,y left set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with pm3d, \ 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with pm3d �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/header.tex�������������������������������������������������������������������0000644�0004711�0000144�00000004664�11445465167�013775� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������% % Header file for tutorial.tex % % Spacing \newcommand{\singlespace} {\addtolength{\baselineskip}{-.333\baselineskip}} \newcommand{\doublespace} {\addtolength{\baselineskip}{.5\baselineskip}} % Spacing for the whole document \newcommand{\currentspace}{} % use this for single space % \newcommand{\currentspace}{\doubleespace} % use this for double space % Common abbreviations % (Remember to put '\ ' after if an interword space is % desired rather than end-of-sentence space. Same for '.etc)' ). \newcommand{\eg}{{\em e.g.}} % e.g. \newcommand{\ie}{{\em i.e.}} % i.e. \newcommand{\etc}{{\em etc.}} % etc. \newcommand{\vs}{{\em vs.}} % vs. \newcommand{\usec}{{$\mu$}sec} % microseconds % \boxfigure{pos}{wid}{text}: A figure with a box around it % % pos the usual figure placement arg: eg. htbp % wid the width of the figure, in some units: eg. 5in % text the contents of the figure, including picture/caption/label/etc % \newlength{\boxwidth} \newcommand{\boxfigure}[3]{ \begin{figure}[#1] \setlength{\boxwidth}{#2} \addtolength{\boxwidth}{.1in} \centering \framebox[\boxwidth]{ \begin{minipage}{#2} #3 \end{minipage} } \end{figure} } % use \fullboxwidth for arg 2 of boxfigure to get box of size \textwidth % To show a syntax for a gnutex command \newenvironment{syntax}{\begin{quote}\tt}{\end{quote}} \ifx\LaTeXe\undefined % old LaTeX version % add `,a4' to `toc_entry' to load settings for A4-paper % see below if you add 11pt or 12pt \documentstyle[titlepage,a4]{article} \else % LaTeX2e version % add `[a4paper]' before `{article}' to load settings for A4-paper % see below if you add 11pt or 12pt \documentclass[titlepage,a4paper]{article} % DSL 24 May 1995 \usepackage{latexsym} \usepackage{amssymb} % If you are concerned about % LaTeX Warning: \oval, \circle, or \line size unavailable on input line % warnings, uncomment one of the following lines. You'll need to create % tutorial.ps then. %\usepackage{eepic} %\usepackage{pspicture} \fi % Other packages \usepackage{url} \usepackage{subfigure} % Only needed for epslatex driver \usepackage{graphicx} \usepackage{color} % Only needed for the tikz driver % \usepackage{gnuplot-lua-tikz} % Margins \sloppy \setlength{\textwidth}{6.5in} \setlength{\textheight}{9in} \setlength{\topmargin}{-0.5in} \setlength{\oddsidemargin}{0pt} \setlength{\evensidemargin}{0pt} % see above \newlength{\fullboxwidth} \setlength{\fullboxwidth}{\textwidth} \addtolength{\fullboxwidth}{-0.1in} ����������������������������������������������������������������������������gnuplot-4.6.4/tutorial/eg4.plt����������������������������������������������������������������������0000644�0004711�0000144�00000000344�10527700623�013177� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������set terminal latex set output "eg4.tex" set format y "$%g$" set format x "$%.2f$" set title 'This is $\sin(x)$' set xlabel "This is the $x$ axis" set ylabel "$\\sin(x)$" unset key set xtics -pi, pi/4 plot [-pi:pi] [-1:1] sin(x) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/test_tikz.plt����������������������������������������������������������������0000644�0004711�0000144�00000000053�11444753144�014542� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������set term tikz set out "test_tikz.tex" test �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/eg3.plt����������������������������������������������������������������������0000644�0004711�0000144�00000000312�10272360273�013171� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������set terminal latex set output "eg3.tex" set format xy "$%g$" set title "This is another plot" set xlabel "$x$ axis" set ylabel "$y$ axis" set key at 15,-10 plot x with lines, "eg3.dat" with linespoints ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/tutorial/Makefile.am������������������������������������������������������������������0000644�0004711�0000144�00000003735�12223337633�014044� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign ##plt-files-begin PLT_FILES = eg1.plt eg2.plt eg3.plt eg4.plt eg5.plt eg6.plt eg7.plt \ linepoin.plt test.plt test_tikz.plt ##plt-files-end EXTRA_DIST = Makefile.am.in $(PLT_FILES) \ header.tex makefile.dst tutorial.tex eg3.dat CLEANFILES = tutorial.aux tutorial.dvi tutorial.log tutorial.pdf tutorial.ps \ tutorial.toc eg1.tex eg2.tex eg3.tex eg4.tex eg5.tex eg6.tex eg7.tex \ eg7.eps eg7.pdf test.tex DVIPS = dvips LATEX = @LATEX@ SUFFIXES = .dvi .plt .pdf .tex .ps # default target all: @TUTORIAL@ tutorial: tutorial.dvi notutorial: # To touch it up after changes: remake: tutorial.dvi ps: tutorial.ps tutorial.ps: tutorial.dvi pdf: tutorial.pdf tutorial.dvi: eg1.tex eg2.tex eg3.tex eg4.tex eg5.tex eg6.tex eg7.tex eg7.eps test.tex \ tutorial.tex header.tex @echo Building LaTeX tutorial TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(LATEX) tutorial TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(LATEX) tutorial tutorial.pdf: eg1.tex eg2.tex eg3.tex eg4.tex eg5.tex eg6.tex eg7.tex eg7.pdf test.tex \ tutorial.tex header.tex @echo "Building LaTeX tutorial (PDF version)" TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(PDFLATEX) tutorial TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(PDFLATEX) tutorial RUN_GNUPLOT = if test -x $(top_builddir)/src/gnuplot ; then \ GNUPLOT_PS_DIR=$(top_srcdir)/term/PostScript \ GNUPLOT_LIB=$(srcdir) \ GNUTERM=latex \ $(top_builddir)/src/gnuplot $< ; \ else \ gnuplot $< ; \ fi eg7.eps: eg7.plt $(RUN_GNUPLOT) .dvi.ps: $(DVIPS) -o $@ $< .plt.tex: $(RUN_GNUPLOT) .eps.pdf: epstopdf $< distclean-local: @if test "$(top_srcdir)" != "$(top_builddir)" ; then \ rm -f eg3.dat; \ fi Makefile.am: Makefile.am.in rm -f $@ $@t sed -n '1,/^##plt-files-begin/p' Makefile.am.in > $@t echo PLT_FILES = *.plt | fmt | (tr '\012' @; echo ) \ |sed 's/@$$/%/;s/@/ \\@/g;' | tr @% '\012 ' >> $@t sed -n '/^##plt-files-end/,$$p' $< >> $@t chmod og-w $@t mv $@t $@ �����������������������������������gnuplot-4.6.4/win/����������������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�010712� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/win/modpath.iss�����������������������������������������������������������������������0000644�0004711�0000144�00000015107�11704234721�013107� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // Inno Setup Ver: 5.4.2 // Script Version: 1.4.1 // Author: Jared Breland <jbreland@legroom.net> // Homepage: http://www.legroom.net/software // License: GNU Lesser General Public License (LGPL), version 3 // http://www.gnu.org/licenses/lgpl.html // // Script Function: // Allow modification of environmental path directly from Inno Setup installers // // Instructions: // Copy modpath.iss to the same directory as your setup script // // Add this statement to your [Setup] section // ChangesEnvironment=true // // Add this statement to your [Tasks] section // You can change the Description or Flags // You can change the Name, but it must match the ModPathName setting below // Name: modifypath; Description: &Add application directory to your environmental path; Flags: unchecked // // Add the following to the end of your [Code] section // ModPathName defines the name of the task defined above // ModPathType defines whether the 'user' or 'system' path will be modified; // this will default to user if anything other than system is set // setArrayLength must specify the total number of dirs to be added // Result[0] contains first directory, Result[1] contains second, etc. // const // ModPathName = 'modifypath'; // ModPathType = 'user'; // // function ModPathDir(): TArrayOfString; // begin // setArrayLength(Result, 1); // Result[0] := ExpandConstant('{app}'); // end; // #include "modpath.iss" // ---------------------------------------------------------------------------- procedure ModPath(); var oldpath: String; newpath: String; updatepath: Boolean; pathArr: TArrayOfString; aExecFile: String; aExecArr: TArrayOfString; i, d: Integer; pathdir: TArrayOfString; regroot: Integer; regpath: String; begin // Get constants from main script and adjust behavior accordingly // ModPathType MUST be 'system' or 'user'; force 'user' if invalid if ModPathType = 'system' then begin regroot := HKEY_LOCAL_MACHINE; regpath := 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment'; end else begin regroot := HKEY_CURRENT_USER; regpath := 'Environment'; end; // Get array of new directories and act on each individually pathdir := ModPathDir(); for d := 0 to GetArrayLength(pathdir)-1 do begin updatepath := true; // Modify WinNT path if UsingWinNT() = true then begin // Get current path, split into an array RegQueryStringValue(regroot, regpath, 'Path', oldpath); oldpath := oldpath + ';'; i := 0; while (Pos(';', oldpath) > 0) do begin SetArrayLength(pathArr, i+1); pathArr[i] := Copy(oldpath, 0, Pos(';', oldpath)-1); oldpath := Copy(oldpath, Pos(';', oldpath)+1, Length(oldpath)); i := i + 1; // Check if current directory matches app dir if pathdir[d] = pathArr[i-1] then begin // if uninstalling, remove dir from path if IsUninstaller() = true then begin continue; // if installing, flag that dir already exists in path end else begin updatepath := false; end; end; // Add current directory to new path if i = 1 then begin newpath := pathArr[i-1]; end else begin newpath := newpath + ';' + pathArr[i-1]; end; end; // Append app dir to path if not already included if (IsUninstaller() = false) AND (updatepath = true) then newpath := newpath + ';' + pathdir[d]; // Write new path RegWriteStringValue(regroot, regpath, 'Path', newpath); // Modify Win9x path end else begin // Convert to shortened dirname pathdir[d] := GetShortName(pathdir[d]); // If autoexec.bat exists, check if app dir already exists in path aExecFile := 'C:\AUTOEXEC.BAT'; if FileExists(aExecFile) then begin LoadStringsFromFile(aExecFile, aExecArr); for i := 0 to GetArrayLength(aExecArr)-1 do begin if IsUninstaller() = false then begin // If app dir already exists while installing, skip add if (Pos(pathdir[d], aExecArr[i]) > 0) then updatepath := false; break; end else begin // If app dir exists and = what we originally set, then delete at uninstall if aExecArr[i] = 'SET PATH=%PATH%;' + pathdir[d] then aExecArr[i] := ''; end; end; end; // If app dir not found, or autoexec.bat didn't exist, then (create and) append to current path if (IsUninstaller() = false) AND (updatepath = true) then begin SaveStringToFile(aExecFile, #13#10 + 'SET PATH=%PATH%;' + pathdir[d], True); // If uninstalling, write the full autoexec out end else begin SaveStringsToFile(aExecFile, aExecArr, False); end; end; end; end; // Split a string into an array using passed delimeter procedure Explode(var Dest: TArrayOfString; Text: String; Separator: String); var i: Integer; begin i := 0; repeat SetArrayLength(Dest, i+1); if Pos(Separator,Text) > 0 then begin Dest[i] := Copy(Text, 1, Pos(Separator, Text)-1); Text := Copy(Text, Pos(Separator,Text) + Length(Separator), Length(Text)); i := i + 1; end else begin Dest[i] := Text; Text := ''; end; until Length(Text)=0; end; procedure CurStepChanged(CurStep: TSetupStep); var taskname: String; begin taskname := ModPathName; if CurStep = ssPostInstall then if IsTaskSelected(taskname) then ModPath(); end; procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); var aSelectedTasks: TArrayOfString; i: Integer; taskname: String; regpath: String; regstring: String; appid: String; begin // only run during actual uninstall if CurUninstallStep = usUninstall then begin // get list of selected tasks saved in registry at install time appid := '{#emit SetupSetting("AppId")}'; if appid = '' then appid := '{#emit SetupSetting("AppName")}'; regpath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\'+appid+'_is1'); RegQueryStringValue(HKLM, regpath, 'Inno Setup: Selected Tasks', regstring); if regstring = '' then RegQueryStringValue(HKCU, regpath, 'Inno Setup: Selected Tasks', regstring); // check each task; if matches modpath taskname, trigger patch removal if regstring <> '' then begin taskname := ModPathName; Explode(aSelectedTasks, regstring, ','); if GetArrayLength(aSelectedTasks) > 0 then begin for i := 0 to GetArrayLength(aSelectedTasks)-1 do begin if comparetext(aSelectedTasks[i], taskname) = 0 then ModPath(); end; end; end; end; end; function NeedRestart(): Boolean; var taskname: String; begin taskname := ModPathName; if IsTaskSelected(taskname) and not UsingWinNT() then begin Result := True; end else begin Result := False; end; end; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/win/README-Windows-ja.txt�������������������������������������������������������������0000644�0004711�0000144�00000021602�12134305472�014446� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# $Id: README-Windows-ja.txt,v 1.1.2.5 2013/04/12 16:33:14 markisch Exp $ # README.Windows (installer t) ̖ gnuplot o[W 4.6 pb`x 3 -- Windows poCizt ======================================================================= gnuplot ́AR}h͕̑Θb@\̃Ot[eBeBŁALinux, OSX, Windows, VMS, ̑̃vbgz[œ삵܂B̃\tg EFAɂ͒쌠܂At[ɔzzĂ܂ (Ȃ킿A ɑΉxKv͂܂)B́AȊw҂ww֐f[^ ǂo邽߂̃OtvOłB gnuplot ́AȐ (2 )AыȖ (3 ) ̃Ot̗ł ܂BȖʂ́A3 WԏY`̎w肵֐ɍԖڂ̌` `悵A܂ x-y ʏ̓Ƃĕ`悵ł܂B2 ` ł́AܐOtA_OtA_OtAAqXgOA3 f[ ^̓ˉeȂǁA̕`X^CT|[gĂ܂BOtɂ́A Cӂ̃xÃxA^CgAAOt̖}Ȃǂ̃x Âs܂B ͂߂ -------- gnuplot ̐VK[ÚAgnuplot N `help` ƃ^Cv邱Ƃŕ\ ʓIȐǂނƂn߁A `plot` R}hɊւ (`help plot` Ɠ͂Ă) ǂłBgnuplot ̃} jA (ICwvɍ`ŏĂ܂) ́APDF t@C ƂĂuĂ܂ (: gnuplot ɂ͓{ PDF }jA͕t Ă܂Bq̓{}jATCgQƂĂ)B 'demo' fBNgɂ́ÃeXgpATvp̃XNvgu Ă܂B`test` `load "all.dem"` s邩A܂̓C^[l bg̈ȉ̃fQƂĂB http://www.gnuplot.info/screenshots/index.html#demos CZX ---------- gp (쌠) ɂ‚ẮACopyright t@CQƂĂB gnuplot Ɋ܂܂ "GNU" ́AFree Software Foundation Ƃ͊֌WuȂvA ܂܈vɂ܂ (ɂ͒b܂Bڍׂ gnuplot FAQ Q)BāAgnuplot GPL (GNU Public License) copyleft ŃJ o[Ă͂炸AO̒쌠ĂāAׂ͂Ẵ\[X R[hɂył܂BA֘AhCoƃT|[g[eBe B̂‚ɂ‚Ă͓dCZXɂȂĂ܂B gnuplot oCizz ---------------------- * wgnuplot.exe: ftHg gnuplot st@CB * gnuplot.exe: eLXg (R\[) [hł gnuplot st@CŁA ̃vbgz[̂̂ƋʂȊSȃpCv@\܂B wgnuplot.exe ƔrƁÃvO͕W͂̃R}h tAo̓bZ[WWo͂ɂo܂B pgnuplot.exe ̂ŁAႦ Octave (www.octave.org) ̂悤ɁAgnuplot O tGWƂĎgp悤ȑ̃AvP[Vł͂gp 邱Ƃ𐄏܂B * pgnuplot.exe: ̃vO͕W͂R}h󂯕tA 쒆 (邢͐VKɋN) wgnuplot.exe ̃eLXgEBhEɃp Cvēn܂BR}hCIvV͂ wgnuplot ɓn܂B ہA `pgnuplot' `wgnuplot' قڊSɒu邱 Ӗ܂AɃ_CNgꂽW͂R}h󂯕t Ƃbg܂B(`wgnuplot` Windows GUI AvP [Vł邽߁Aꎩ̂W͉͂ǂݍނƂł B) * ^CCut@C gnuplot KvƂ郉^CCut@C (freetype6.dll ) ̃pbP[WɊ܂܂Ă܂Be^CCũCZX t@C 'license' fBNgɒuĂ܂B CXg[ ------------ gnuplot ̓CXg[‚̌`ɂȂĂāA͊{Iɂ́AȂ IIvVɉāAȉ̂悤ɓ삵܂: * Ⴆ C:\Program Files\gnuplot ̂ȂIfBNg ̃pbP[W (܂͂̈ꕔ) WJ܂B * fXNgbvƁuNCbNNv̏ꏊ (Windows XP, Vista ̏ꍇ) wgnuplot ̃V[gJbgACR쐬܂BɁAX^[gAbv j[ɂ̃vOwvAtAgnuplot ̃C^[lb gTCgAfXNvgւ̃Nlj܂B (: uNCbNNv́uX^[gvENbNāuvpeBvA u^XNo[vƐiŁuNCbNN\vɃ`FbN邱Ƃ \܂B) * *.gp *.gpl, *.plt ̊gq̃t@C wgnuplot J悤֘At ܂BWindows 7 Vista Ŋ֘AtύXɂ́A[Rg[ pl]A[vO]A[̃vO]A[֘Atݒ肷]AƐi łBĈꗗ̒t@Č`IA[vO ύX] NbNĂB * gnuplot st@Cւ̃pX PATH ‹ϐɒlj܂Bɂ R}hC `gnuplot' `wgnuplot' Ɠ͂ gnuplot N ł悤ɂȂ܂B * Windows ̃GNXv[[ "t@Cw肵Ďs" ̃_CAO EBhẼV[gJbg gnuplot lj܂BŁAP Windows L[ `wgnuplot' IĎs邱Ƃ wgnuplot Nł悤ɂȂ܂B * ftHg̏o͌` (terminal) wxt/windows IƁACX g[͂ɉ GNUTERM ‹ϐXV܂B‹ϐ̕ύX@ ɂ‚Ẵ͉ZNVQƂĂBAłȂ gnuplot.ini t@C set term windows set term wxt lj邱Ƃ”\łB`help startup` QƂĂB * fXNvgCXg[ꍇ́A܂ރfBNg GNUPLOT_LIB pXɊ܂܂܂BȉQƁB JX^}CY: gnuplot ̓[ŨAvP[Vf[^fBNg %APPDATA% ‚ ΁ANɂɂ gnuplot.ini ܂s܂Bwgnuplot windows o͌`́AAvP[Vf[^fBNg wgnuplot.ini ݒǂݍ݁Ãt@Cɐݒۑ܂B`help wgnuplot.ini` QƂĂB tHg -------- OtBJeLXgEBhE (wgnuplot.exe): ΘbEBhẼtHǵAEBhE㕔́uIvVṽACR A܂̓EBhEŏ㕔ENbNďo郁j[ "Choose Font..." IĕύXł܂B "Terminal" (gnuplot 4.4 ł̃f tHg) ̂悤ȃtHgł͂ȂA"Consolas" ̂悤ȐV Truetype tHggp邱Ƃ܂ (: {gp ꍇ́AuMS SVbNvuMS vȂǂ̓{̃tHgw肷 Ƃł傤)B̕ύXێ邽߂ɁAj[ɂ "Update wgnuplot.ini" sĂB R\[EBhE (gnuplot.exe): g\Ȃ΁A"Consolas" "Lucida Console" Ȃ ̔񃉃X^CY`̃R\[tHgɕύXKv܂B ̓R\[EBhÉuvpeBvōs܂B nΉ -------- gnuplot version 4.6 ł́Aj[ƃwvt@C̒nΉT|[g ĂāAftHgł gnuplot wgnuplot-XX.mnu wgnuplot-XX.chm ǂݍƂ܂BŁAXX 2 ̌R[hłB݂̂Ƃ Ap (ftHg) Ɠ{ (ja) T|[gĂ܂A̒n t@CWĂ܂B Iɓ̌g悤ɂɂ́Awgnuplot.ini t@C Language=XX ĂB̃t@ĆAȂ %APPDATA% fBNgɒu Ă܂BႦΉp̃j[œ{̃wvAƂ ݒ肪΁Awgnuplot.ini Ɉȉ̍slj΂ł܂: HelpFile=wgnuplot-ja.chm MenuFile=wgnuplot.mnu ݂ gnuplot 猾‹̐ݒύX@͂ȂƂɒӂĂ B ‹ϐ -------- T|[g‹ϐ̈ꗗɂ́Agnuplot 'help environment' ƂĂB ‹ϐݒ/ύXɂ́AWindows NT/2000/XP/Vista ł [Rg[ pl]A[VXe]A([ڍאݒ])A[‹ϐ] ŁAWIndows 7 ł̓fX NgbṽRs[^ACRENbN [vpeB] IA [VXe]A[VXȅڍאݒ]A[ڍאݒ]A[‹ϐ] ōs܂B * GNUTERM `ĂƁA̒l̖Ȍo͌` (terminal) gp ܂B́Agnuplot NɔFꂽȂo͌`D ܂At@C gnuplot.init ŏ㏑ł (`help startup` Q )AĂ񂻂̖̌Iȏo͌`̎wŕύXł܂B * ‹ϐ GNUPLOT_LIB ́Af[^R}hXNvg̒ljfBN g`̂Ɏg܂B̕ϐ̒ĺAP̃fBNgłA ؂蕶 ';' ŋ؂ꂽ̃fBNgXgł\܂B GNUPLOT_LIB ̓éA`loadpath` ϐɒlj܂A`save` `save set` R}hŕۑ܂Bڍׂ 'help loadpath' QƂ B * ‹ϐ GNUFITLOG ́Afit ̌ʂۑt@C̖Oێ BftHg fit.log łBO "/", "\" ŏIĂ΁A ̓fBNgłƔFÃfBNg "fit.log" Ƃ t@C܂B mĂoO ---------------- VoȌɂ‚ẮAoOǐՃVXe http://sourceforge.net/tracker/?atid=102055&group_id=2055&func=browse QƂĂB ̂ƂAWindows łɓL̃oO 2,3 ܂B * oCif[^̃pCvn@\Ȃ (Bug #2981027) * ` (܂͖[v) Ãvbgz[̂悤ɂ Ctrl-C fȂ -------------------------------------------------------------------------------- The gnuplot team, September 2012 ������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/win/README-Windows.txt����������������������������������������������������������������0000644�0004711�0000144�00000020221�12134305472�014052� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is gnuplot version 4.6 patchlevel 3 -- binary distribution for Windows =========================================================================== gnuplot is a command-line driven interactive function plotting utility for linux, OSX, Windows, VMS, and many other platforms. The software is copyrighted but freely distributed (i.e., you don't have to pay for it). It was originally intended as graphical program to allow scientists and students to visualize mathematical functions and data. gnuplot handles both curves (2 dimensions) and surfaces (3 dimensions). Surfaces can be plotted as a mesh fitting the specified function, floating in the 3-d coordinate space, or as a contour plot on the x-y plane. For 2-d plots, there are also many plot styles including lines, points, boxes, heat maps, stacked histograms, and contoured projections of 3D data. Graphs may be labeled with arbitrary labels and arrows, axis labels, a title, date and time, and a key. Getting started --------------- The new gnuplot user should begin by reading the general information available by typing `help` after running gnuplot. Then read about the `plot` command (type `help plot`). The manual for gnuplot (which is a nicely formatted version of the on-line help information) is available as a PDF document. You can find loads of test and sample scripts in the 'demo' directory. Try executing `test` and `load "all.dem"` or have a look at the online version of the demos at http://www.gnuplot.info/screenshots/index.html#demos License ------- See the Copyright file for copyright conditions. The "GNU" in gnuplot is NOT related to the Free Software Foundation, the naming is just a coincidence (and a long story; see the gnuplot FAQ for details). Thus gnuplot is not covered by the GPL (GNU Public License) copyleft, but rather by its own copyright statement, included in all source code files. However, some of the associated drivers and support utilities are dual-licensed. gnuplot binaries ---------------- * wgnuplot.exe: The default gnuplot executable. * gnuplot.exe: Text (console) mode version of the gnuplot executable with full pipe functionality as it is common on other platforms. In contrast to wgnuplot.exe, this program can also accept commands on stdin (standard input) and print messages on stdout (standard output). It replaces pgnuplot.exe and is recommended to be used with 3rd party applications using gnuplot as graph engine, like e.g. Octave (www.octave.org). * pgnuplot.exe: This program will accept commands on stdin (standard input), and pipe them to an active (or newly created) wgnuplot.exe text window. Command line options are passed on to wgnuplot. Effectively, this means `pgnuplot' is an almost complete substitute for `wgnuplot', on the command line, with the added benefit that it does accept commands from redirected stdin. (Being a Windows GUI application, `wgnuplot' itself cannot read stdin at all.) * runtime library files Runtime library files (e.g. freetype6.dll) that are required for gnuplot are included in the package. Licenses of these runtime libraries can be found in 'license' directory. Installation ------------ gnuplot comes with its own installer, which will basically do the following, provided you check the corresponding options: * Extract this package (or parts thereof) in a directory of your coice, e.g. C:\Program Files\gnuplot etc. * Create shortcut icons to wgnuplot on your dektop and (on Windows XP and Vista) within the Quick-Lauch area. Additionally, a menu is added to the startup menu with links to the programs, help and documentation, gnuplot's internet site and the demo scripts. * The extensions *.gp, *.gpl, *.plt will be associated to be opened with wgnuplot. To change file associations in Windows 7 or Vista, go to "Control Panel", "Control Panel Home", "Default Programs", "Set Associations". Select a file type in the list and click "Change Program". * The path to the gnuplot binaries is added to the PATH environment variable. That way you can start gnuplot by typing `gnuplot' or `wgnuplot' on a command line. * gnuplot is added to the shortcuts of the Windows explorer "Run" Dialog. To start wgnuplot simply press Windows-R and execute `wgnuplot'. * You may select your default terminal of preference (wxt/windows) and the installer will update the GNUTERM environment variable accordingly. See below on how to change environment variables. Alternatively, you can later add set term windows or set term wxt to your gnuplot.ini, see `help startup`. * If you install the demo scripts, the directory containing the demos is included in the GNUPLOT_LIB search path, see below. Customisation: On startup, gnuplot executes the gnuplot.ini script from the user's application data directory %APPDATA% if found, see `help startup`. wgnuplot and the windows terminal load and save settings from/to wgnuplot.ini located in the appdata directory, see `help wgnuplot.ini`. Fonts ----- graphical text window (wgnuplot.exe): You can change the font of the terminal window by selecting "Options..." - "Choose Font..." via the toolbar or the context (right-click) menu. We strongly encourage you to use a modern Truetype font like e.g. "Consolas" instead of the old "Terminal" font, which was the default until gnuplot version 4.4. Make sure to "Update wgnuplot.ini" to make this change permanent. console window (gnuplot.exe): If extended characters do not display correctly you might have to change the console font to a non-raster type like e.g. "Consolas" or "Lucida Console". You can do this using the "Properties" dialog of the console window. Localisation ------------ As of version 4.6 gnuplot supports localised versions of the menu and help files. By default, gnuplot tries to load wgnuplot-XX.mnu and wgnuplot-XX.chm, where XX is a two character language code. Currently, only English (default) and Japanese (ja) are supported, but you are invited to contribute. You can enforce a certain language by adding Language=XX to your wgnuplot.ini. This file is located in your %APPDATA% directory. If you would like to have mixed settings, e.g, English menus but Japanese help texts, you could add the following statements to your wgnuplot.ini: HelpFile=wgnuplot-ja.chm MenuFile=wgnuplot.mnu Please note that currently there's no way to change the language setting from within gnuplot. Environmental variables ----------------------- For a complete list of environment variables supported, type `help environment` in gnuplot. To set/change environment variables go to "Control panel", "System", ("Advanced"), "Environmental variables" on Windows NT/2000/XP/Vista, or Right click on the Computer icon on your Desktop and choose Properties option, "System", "Advanced system settings", "Advanced", "Environmental variables" on Windows 7. * If GNUTERM is defined, it is used as the name of the terminal type to be used. This overrides any terminal type sensed by gnuplot on start-up, but is itself overridden by the gnuplot.ini start-up file (see `help startup`) and, of course, by later explicit changes. * Variable GNUPLOT_LIB may be used to define additional search directories for data and command files. The variable may contain a single directory name, or a list of directories separated by a path separator ';'. The contents of GNUPLOT_LIB are appended to the `loadpath` variable, but not saved with the `save` and `save set` commands. See 'help loadpath' for more details. * Variable GNUFITLOG holds the name of a file that saves fit results. The default it is fit.log. If the name ends with a "/" or "\", it is treated as a directory name, and "fit.log" will be created as a file in that directory. Known bugs ---------- Please see and use http://sourceforge.net/tracker/?atid=102055&group_id=2055&func=browse for an up-to-date bug tracking system. Currently, there are a few bugs specific to the Windows version: * Binary data through a pipe is not working (Bug #2981027) * Plots (or inifinite loops) cannot be interrupted by pressing Ctrl-C, as it is the case on other platforms. -------------------------------------------------------------------------------- The gnuplot team, September 2012 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/win/gnuplot.iss�����������������������������������������������������������������������0000644�0004711�0000144�00000033423�12134305472�013144� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������; ; $Id: gnuplot.iss,v 1.2.2.9 2013/04/12 16:33:14 markisch Exp $ ; ; GNUPLOT - gnuplot.iss ; ;[ ; Copyright 2011,2012 Bastian Märkisch ; ; Permission to use, copy, and distribute this software and its ; documentation for any purpose with or without fee is hereby granted, ; provided that the above copyright notice appear in all copies and ; that both that copyright notice and this permission notice appear ; in supporting documentation. ; ; Permission to modify the software is granted, but not the right to ; distribute the complete modified source code. Modifications are to ; be distributed as patches to the released version. Permission to ; distribute binaries produced by compiling modified sources is granted, ; provided you ; 1. distribute the corresponding source modifications from the ; released version in the form of a patch file along with the binaries, ; 2. add special version identification to distinguish your version ; in addition to the base release version number, ; 3. provide your name and address as the primary contact for the ; support of your modified version, and ; 4. retain our contact information in regard to use of the base ; software. ; Permission to distribute the released version of the source code along ; with corresponding source modifications in the form of a patch file is ; granted with same provisions 2 through 4 for binary distributions. ; ; This software is provided "as is" without express or implied warranty ; to the extent permitted by applicable law. ;] ; 11/2011 Initial version by Bastian Märkisch, ; Japanese translation by Shigeharu TAKENO ; #define MyAppName "gnuplot" #define MyAppVersionShort "4.6" #define MyAppVersion "4.6.3" #define MyAppNumVersion "4.6.3" #define MyAppPublisher "gnuplot development team" #define MyAppURL "http://www.gnuplot.info/" #define MyAppExeName "wgnuplot.exe" #define MyInstallerName "gp463-win32-setup" [Setup] ; NOTE: The value of AppId uniquely identifies this application. ; Do not use the same AppId value in installers for other applications. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) AppID={{AB419AC3-9BC1-4EC5-A75B-4D8870DD651F} AppName={#MyAppName} AppVersion={#MyAppVersion} AppVerName={#MyAppName} {#MyAppVersion} AppComments=gnuplot, a famous scientific plotting package. AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} ;AppReadme= DefaultDirName={pf}\{#MyAppName} DefaultGroupName={#MyAppName} AllowNoIcons=true LicenseFile=Copyright ;InfoBeforeFile: README-testing.txt InfoBeforeFile=README-Windows.txt InfoAfterFile=NEWS OutputBaseFilename={#MyInstallerName} SetupIconFile=bin\grpicon.ico Compression=lzma2/Max SolidCompression=true MinVersion=,5.0.2195 Uninstallable=true ChangesEnvironment=true PrivilegesRequired=admin UseSetupLdr=true WindowStartMaximized=true VersionInfoVersion={#MyappNumVersion} VersionInfoCompany={#MyAppPublisher} VersionInfoDescription=Famous scientific plotting package. VersionInfoProductName=gnuplot WindowResizable=false WindowVisible=false OutputDir=. UninstallLogMode=append AlwaysShowDirOnReadyPage=true ChangesAssociations=true [Languages] Name: "en"; MessagesFile: "compiler:Default.isl" ;Name: ja; MessagesFile: compiler:Languages\Japanese.isl; InfoBeforeFile: README-testing-ja.txt; LicenseFile: Copyright-ja.txt; Name: ja; MessagesFile: compiler:Languages\Japanese.isl; InfoBeforeFile: README-Windows-ja.txt; LicenseFile: Copyright-ja.txt; Name: de; MessagesFile: compiler:Languages\German.isl; [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1 Name: defaulttermwin; Description: windows; GroupDescription: {cm:defaultterm}; Flags: unchecked exclusive; Name: defaulttermwxt; Description: "wxt"; GroupDescription: {cm:defaultterm}; Flags: unchecked exclusive; Name: defaulttermpreserve; Description: {cm:termpreserve}; GroupDescription: {cm:defaultterm}; Flags: exclusive; Name: associate; Description: "{cm:setassociations}"; GroupDescription: "{cm:other}"; Name: associate\plt; Description: {cm:AssocFileExtension,{#MyAppName},.plt}; GroupDescription: "{cm:other}"; Name: associate\gp; Description: {cm:AssocFileExtension,{#MyAppName},.gp}; GroupDescription: "{cm:other}"; Name: associate\gpl; Description: {cm:AssocFileExtension,{#MyAppName},.gpl}; GroupDescription: "{cm:other}"; Name: associate\dem; Description: {cm:AssocFileExtension,{#MyAppName},.dem}; GroupDescription: "{cm:other}"; Flags: unchecked dontinheritcheck; Name: modifypath; Description: {cm:path}; GroupDescription: "{cm:other}"; Flags: unchecked [Files] ; NOTE: Don't use "Flags: ignoreversion" on any shared system files ; core files Source: "bin\wgnuplot.exe"; DestDir: "{app}\bin\"; Flags: ignoreversion; Components: core Source: bin\wgnuplot_pipes.exe; DestDir: {app}\bin\; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Source: "bin\gnuplot.exe"; DestDir: "{app}\bin\"; Flags: ignoreversion; Components: core ; core support files Source: "bin\*.dll"; DestDir: "{app}\bin\"; Flags: skipifsourcedoesntexist ignoreversion; Components: core Source: "bin\wgnuplot.mnu"; DestDir: {app}\bin\; Components: core Source: "bin\wgnuplot.chm"; DestDir: {app}\bin\; Components: core Source: bin\pgnuplot.exe; DestDir: {app}\bin\; Flags: skipifsourcedoesntexist; Components: core; Source: "share\*"; DestDir: {app}\share\; Flags: recursesubdirs; Components: core Source: "etc\*"; DestDir: {app}\etc\; Flags: skipifsourcedoesntexist recursesubdirs; Components: core ; demo files / contrib Source: "contrib\*"; DestDir: {app}\contrib\; Flags: recursesubdirs; Components: demo Source: "demo\*"; DestDir: {app}\demo\; Flags: recursesubdirs; Components: demo ; documentation Source: "NEWS"; DestDir: {app}; Components: core Source: "README"; DestDir: {app}\docs\; Components: core Source: "README-Windows.txt"; DestDir: {app}; Components: core Source: "README-testing.txt"; DestDir: {app}; Flags: skipifsourcedoesntexist; Components: core Source: "BUGS"; DestDir: {app}\docs\; Components: core Source: "ChangeLog"; DestDir: {app}\docs\; Components: core Source: "docs\*"; DestDir: {app}\docs\; Flags: recursesubdirs; Components: docs ; licenses Source: "Copyright"; DestDir: {app}\license\; Components: core Source: license\*; DestDir: {app}\license\; Flags: recursesubdirs skipifsourcedoesntexist; Components: license; ; Japanese support Source: "README-Windows-ja.txt"; DestDir: {app}; Components: ja Source: "README-testing-ja.txt"; DestDir: {app}; Flags: skipifsourcedoesntexist; Components: ja Source: "Copyright-ja.txt"; DestDir: {app}; Components: ja Source: "bin\wgnuplot-ja.chm"; DestDir: {app}\bin; Components: ja Source: "bin\wgnuplot-ja.mnu"; DestDir: {app}\bin; Components: ja [Dirs] [Icons] Name: "{group}\{#MyAppName} {#MyAppVersionShort}"; Filename: "{app}\bin\{#MyAppExeName}"; WorkingDir: {userdocs}; Components: core; Name: "{group}\{#MyAppName} {#MyAppVersionShort} - console version"; Filename: "{app}\bin\gnuplot.exe"; WorkingDir: {userdocs}; Components: core; Name: "{group}\{#MyAppName} Help"; Filename: {app}\bin\wgnuplot.chm; Components: core; Name: "{group}\{#MyAppName} Help (Japanese)"; Filename: {app}\bin\wgnuplot-ja.chm; Components: ja; Flags: CreateOnlyIfFileExists; Name: "{group}\{#MyAppName} Documentation"; Filename: {app}\docs\gnuplot.pdf; Components: docs; Flags: CreateOnlyIfFileExists; Name: "{group}\{#MyAppName} FAQ"; Filename: {app}\docs\FAQ.pdf; Components: docs; Flags: CreateOnlyIfFileExists; Name: "{group}\{#MyAppName} Quick Reference"; Filename: {app}\docs\gpcard.pdf; Components: docs; Flags: CreateOnlyIfFileExists; Name: "{group}\{#MyAppName} LaTeX Tutorial"; Filename: {app}\docs\tutorial.pdf; Components: docs; Flags: CreateOnlyIfFileExists; Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" Name: "{commondesktop}\{#MyAppName} {#MyAppVersionShort}"; Filename: "{app}\bin\{#MyAppExeName}"; Tasks: desktopicon; WorkingDir: {userdocs}; Components: core; Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName} {#MyAppVersionShort}"; Filename: "{app}\bin\{#MyAppExeName}"; Tasks: quicklaunchicon; WorkingDir: {userdocs}; Components: core; Name: "{group}\{#MyAppName} Demo Directory"; Filename: {app}\demo; Flags: FolderShortcut; Components: demo; [Components] Name: "core"; Description: "{cm:core}"; Types: full compact custom; Flags: fixed Name: "docs"; Description: "{cm:docs}"; Types: full Name: "demo"; Description: "{cm:demo}"; Types: full Name: "license"; Description: "{cm:license}"; Types: full Name: "ja"; Description: "{cm:japanese}"; [Run] ; view README Filename: {win}\notepad.exe; Description: {cm:view,README-Windows.txt}; Flags: nowait postinstall skipifsilent Unchecked RunAsOriginalUser ShellExec SkipIfDoesntExist; Parameters: {app}\README-Windows.txt; Languages: en de; Filename: {win}\notepad.exe; Description: "{cm:view,README-Windows-ja.txt}"; Flags: nowait postinstall skipifsilent Unchecked RunAsOriginalUser ShellExec SkipIfDoesntExist; Parameters: {app}\README-Windows-ja.txt; Languages: ja; ; launch gnuplot Filename: "{app}\bin\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, "&", "&&")}}"; Flags: nowait postinstall skipifsilent Unchecked RunAsOriginalUser; WorkingDir: {userdocs}; [Registry] ; set some environment variables ; set default terminal Root: HKLM; SubKey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; ValueName: GNUTERM; ValueData: windows; Flags: NoError UninsDeleteValue; Tasks: defaulttermwin; Root: HKLM; SubKey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; ValueName: GNUTERM; ValueData: wxt; Flags: NoError UninsDeleteValue; Tasks: defaulttermwxt; ; include demo directory in gnuplot's search path Root: HKLM; SubKey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; ValueName: GNUPLOT_LIB; ValueData: {app}\demo; Flags: CreateValueIfDoesntExist NoError UninsDeleteValue; Components: demo; ; easy start in explorer's run dialog Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\wgnuplot.exe"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\wgnuplot.exe"; Flags: uninsdeletekey Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\gnuplot.exe"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\gnuplot.exe"; Flags: uninsdeletekey ; file associations Root: HKCR; SubKey: .plt; ValueType: string; ValueData: gnuplot; Flags: uninsdeletevalue; Tasks: associate\plt; Root: HKCR; SubKey: .gp; ValueType: string; ValueData: gnuplot; Flags: uninsdeletevalue; Tasks: associate\gp; Root: HKCR; SubKey: .gpl; ValueType: string; ValueData: gnuplot; Flags: uninsdeletevalue; Tasks: associate\gpl; Root: HKCR; SubKey: .dem; ValueType: string; ValueData: gnuplot; Flags: uninsdeletevalue; Tasks: associate\dem; Root: HKCR; SubKey: gnuplot; ValueType: string; ValueData: {cm:filetype}; Flags: uninsdeletekey; Tasks: associate; Root: HKCR; SubKey: gnuplot\DefaultIcon; ValueType: string; ValueData: {app}\bin\{#MyAppExeName},0; Tasks: associate; Root: HKCR; SubKey: gnuplot\shell\open\command; ValueType: string; ValueData: """{app}\bin\{#MyAppExeName}"" -p ""%1"""; Tasks: associate; [Code] (* Modification of the PATH environment variable requires Jared Breland's <jbreland@legroom.net> modpath.iss package available at http://www.legroom.net/software/modpath *) const ModPathName = 'modifypath'; ModPathType = 'system'; function ModPathDir(): TArrayOfString; begin setArrayLength(Result, 1) Result[0] := ExpandConstant('{app}\bin'); end; #include "modpath.iss" [CustomMessages] ; -------------------------------------------------- ; English, default ; -------------------------------------------------- ; Components core=gnuplot Core Components docs=gnuplot Documentation demo=gnuplot Demos license=Third Party License Information japanese=Japanese Language Support ; tasks defaultterm=Select gnuplot's default terminal: termpreserve=Don't change my GNUTERM environment variable other=Other tasks: setassociations=Set file associations: path=Add application directory to your PATH environment variable ; actions view=View %1 ; registry filetype=gnuplot command script ; -------------------------------------------------- ; Japanese ; -------------------------------------------------- ; components ja.core=gnuplot の必要最小限のコンポーネント ; In English, "minimum of gnuplot components" ja.docs=gnuplot 付属文書 ja.demo=gnuplot サンプルデモスクリプト ; In English, "gnuplot sample demo scripts" ja.license=使用する外部ライブラリ等のライセンス群 ja.japanese=日本語対応" ; In English, "Japanese language support" ; tasks ja.defaultterm=gnuplot のデフォルト出力形式 (terminal) の選択: ja.termpreserve=GNUTERM 環境変数を変更しない ja.other=Other tasks: ja.setassociations=ファイルの関連づけを行う: ja.path=実行ファイルのディレクトリを PATH 環境変数に追加する ; actions ja.view=%1 を表示する ; registry ja.filetype=gnuplot コマンドスクリプト ; -------------------------------------------------- ; German ; -------------------------------------------------- ; components de.core=gnuplot Kernkomponenten de.docs=gnuplot Dokumentation de.demo=gnuplot Demos de.license=Lizenz-Dateien benutzter Bibliotheken de.japanese=Japanische Sprachunterstützung ; tasks de.defaultterm=Standard-Terminal für gnuplot: de.termpreserve=Umgebungsvariable GNUTERM nicht ändern de.other=Weitere Aufgaben: de.setassociations=Verknüpfungen herstellen de.path=Anwendungsverzeichnis dem Suchpfad PATH hinzufügen ; actions de.view=%1 anzeigen ; registry de.filetype=gnuplot Skript ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/win/Copyright-ja.txt������������������������������������������������������������������0000644�0004711�0000144�00000005263�11704234721�014036� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� Copyright (C) 1986 - 1993, 1998, 2004, 2007 Thomas Williams, Colin Kelley Permission to use, copy, and distribute this software and its documentation for any purpose with or without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Permission to modify the software is granted, but not the right to distribute the complete modified source code. Modifications are to be distributed as patches to the released version. Permission to distribute binaries produced by compiling modified sources is granted, provided you 1. distribute the corresponding source modifications from the released version in the form of a patch file along with the binaries, 2. add special version identification to distinguish your version in addition to the base release version number, 3. provide your name and address as the primary contact for the support of your modified version, and 4. retain our contact information in regard to use of the base software. Permission to distribute the released version of the source code along with corresponding source modifications in the form of a patch file is granted with same provisions 2 through 4 for binary distributions. This software is provided "as is" without express or implied warranty to the extent permitted by applicable law. (ȉ܂Ȗ; ͐Ȃm܂̂ŏڂ͏Ľ𓖂ĂB҂͐ӔC܂B) Copyright (C) 1986 - 1993, 1998, 2004, 2007 Thomas Williams, Colin Kelley ̃\tgEFAƂ̕t̎gpAAzz̋‚́AL̒쌠 (copyright) \ASĂ̕ɏĂ邱ƁAђ쌠\Ƃ̗̋̎xɏĂ邱ƂƂŁA̕ɂۏ؂܂B ̃\tgEFȀCF߂Ă܂BAC܂ޑS\[XR[h̔zž͔F߂܂BC̓[Xłɑ΂pb`̌`ŔzzȂ΂Ȃ܂BCꂽ\[XRpCčꂽoCi̔zźAȉ̏̌ŔF߂܂: 1. [Xł̃\[X̏CApb`̌`ŃoCiƋɔz z邱 2. x[XƂȂ郊[XłƋʂ邽߂ɁÃo[Wԍɓ ȃo[Wwqt邱 3. ̏Cł̃T|[gpɁAȂ̖OƃANZX”\ȃAhX 񋟂邱 4. x[XƂȂ\tgEFA̎gpɊւẮAX̘Aێ 邱 [Xł̃\[XR[hApb`̌`ł̃\[X̏Cƈꏏɔzz邱Ƃ́AoCizzɊւ 2 4 ܂ł̏̌ŋ܂B ̃\tgEFA "邪܂" 񋟂AKp”\Ȗ@ŋ߂͈͂̕ۏ؂\邢͈ÎĂ͂܂B ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/depcomp�������������������������������������������������������������������������������0000755�0004711�0000144�00000037100�10307602606�011507� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to <bug-automake@gnu.org>. EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/configure�����������������������������������������������������������������������������0000755�0004711�0000144�00001611437�12223337637�012065� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for gnuplot 4.6.4. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 </dev/null exec 6>&1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gnuplot' PACKAGE_TARNAME='gnuplot' PACKAGE_VERSION='4.6.4' PACKAGE_STRING='gnuplot 4.6.4' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="src/graphics.c" # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif #ifdef STDC_HEADERS # include <stdlib.h> # include <stddef.h> #else # ifdef HAVE_STDLIB_H # include <stdlib.h> # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include <memory.h> # endif # include <string.h> #endif #ifdef HAVE_STRINGS_H # include <strings.h> #endif #ifdef HAVE_INTTYPES_H # include <inttypes.h> #endif #ifdef HAVE_STDINT_H # include <stdint.h> #endif #ifdef HAVE_UNISTD_H # include <unistd.h> #endif" enable_option_checking=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS X11_APPDEFAULTS_DIR TUTORIAL TERMXLIBS TERMLIBS LINUXSUID LASERGNU TEXDIR GIHDIR VERSION_MAJOR LISPDIR subdirs DIST_CONTACT HAVE_LRELEASE_FALSE HAVE_LRELEASE_TRUE BUILD_ON_APPLE_FALSE BUILD_ON_APPLE_TRUE BUILD_QT_FALSE BUILD_QT_TRUE LRELEASE UIC MOC RCC QT_LIBS QT_CFLAGS BUILD_GPCAIRO_FALSE BUILD_GPCAIRO_TRUE CAIROEPS_LIBS CAIROEPS_CFLAGS CAIROPDF_LIBS CAIROPDF_CFLAGS BUILD_BITMAP_FALSE BUILD_BITMAP_TRUE BUILD_WXWIDGETS_FALSE BUILD_WXWIDGETS_TRUE WX_LIBS GTK28_LIBS GTK28_CFLAGS GTK_LIBS GTK_CFLAGS PANGO_1_10_2_LIBS PANGO_1_10_2_CFLAGS CAIROPANGO_LIBS CAIROPANGO_CFLAGS WX_CONFIG CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX BUILD_LUA_FALSE BUILD_LUA_TRUE LUA_LIBS LUA_CFLAGS PKG_CONFIG PDFLIB_CONFIG GDLIB_CONFIG BUILD_SRC_BEOS_SUBDIR_FALSE BUILD_SRC_BEOS_SUBDIR_TRUE BUILD_GNUPLOT_X11_FALSE BUILD_GNUPLOT_X11_TRUE X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF LIBRARIES_FOR_X TEXHASH KPSEXPAND TROFF DVIPS HAVE_LATEX_FALSE HAVE_LATEX_TRUE PDFLATEX LATEX PLAINTEX lispdir EMACSLOADPATH EMACS CC_FOR_BUILD LN_S am__fastdepOBJC_FALSE am__fastdepOBJC_TRUE OBJCDEPMODE ac_ct_OBJC OBJCFLAGS OBJC EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_dependency_tracking with_lispdir with_latex with_texdir with_kpsexpand with_x with_x_app_defaultdir with_lasergnu with_gihdir with_linux_vga with_ggi with_xmi with_readline enable_history_file with_gd with_pdf with_lua with_cwdrc with_lisp_files with_row_help with_tutorial enable_mouse enable_x11_mbfonts enable_x11_external enable_thin_splines enable_volatile_data enable_raise_console enable_objects enable_macros enable_h3d_quadtree enable_h3d_gridbox enable_wxwidgets with_wx_config with_bitmap_terminals with_cairo enable_backwards_compatibility enable_stats enable_qt ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP OBJC OBJCFLAGS EMACS EMACSLOADPATH XMKMF PKG_CONFIG LUA_CFLAGS LUA_LIBS CXX CXXFLAGS CCC CXXCPP CAIROPANGO_CFLAGS CAIROPANGO_LIBS PANGO_1_10_2_CFLAGS PANGO_1_10_2_LIBS GTK_CFLAGS GTK_LIBS GTK28_CFLAGS GTK28_LIBS CAIROPDF_CFLAGS CAIROPDF_LIBS CAIROEPS_CFLAGS CAIROEPS_LIBS QT_CFLAGS QT_LIBS DIST_CONTACT' ac_subdirs_all='lisp' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures gnuplot 4.6.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/gnuplot] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of gnuplot 4.6.4:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-history-file do not use history file --disable-mouse disable mouse for interactive terminals --disable-x11-mbfonts disable multi-byte font support for x11 --disable-x11-external disable drawing to windows belonging to external apps --enable-thin-splines enable thin plate splines --disable-volatile-data disable zooming of volatile data --disable-raise-console spacebar in plot window does not raise console --disable-objects disable rectangles and other objects --disable-macros disable command line macros --disable-h3d-quadtree disable quadtree optimization in hidden3d code --enable-h3d-gridbox enable gridbox optimization in hidden3d code --disable-wxwidgets wxWidgets terminal (default enabled) --enable-backwards-compatibility enable deprecated syntax --enable-stats Include command to generate statistical summary of data --enable-qt Qt terminal (default disabled) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-lispdir override the default lisp directory --without-latex disable latex support, (default enable) --with-texdir=DIR where to install latex style files (default by kpsexpand in subdir PACKAGE) --with-kpsexpand search for kpsexpand at run-time (default disabled) --with-x use the X Window System --with-x-app-defaultdir=DIR location of X11 application defaults (default /etc/X11/app-defaults/) --with-lasergnu install lasergnu printer script --with-gihdir=DIR location of .gih help text file (default PREFIX/share/PACKAGE/VERSION) --with-linux-vga use the Linux SVGA console driver (requires /usr/lib/libvga) --with-ggi=DIR enable the ggi driver (EXPERIMENTAL) --with-xmi=DIR ggi's xmi support for pm3d (EXPERIMENTAL) --with-readline=builtin use the built-in readline --with-readline=gnu use the GNU readline library (default if present) --with-readline=bsd use the NetBSD editline library (NB: does not handle UTF-8!) --with-readline=DIR specify the location of GNU readline --without-readline do not use any readline function --with-gd=DIR where to find Tom Boutell's gd library --with-pdf=DIR enable pdf terminal (requires PDFLib) --without-lua disable lua/TikZ terminal (default enabled) --with-cwdrc check current directory for .gnuplot file, normally disabled for security reasons --without-lisp-files do not build emacs lisp files --with-row-help format help and subtopic tables by row (default) --without-row-help format help and subtopic tables by column --with-tutorial process the LaTeX tutorial when building --with-wx-config=PATH Use the given path to wx-config, the wxWidgets configuration program (default search in $PATH) --with-bitmap-terminals dot-matrix printers and pbm --without-cairo cairo-based terminals (default enabled) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor OBJC Objective C compiler command OBJCFLAGS Objective C compiler flags EMACS the Emacs editor command EMACSLOADPATH the Emacs library search path XMKMF Path to xmkmf, Makefile generator for X Window System PKG_CONFIG path to pkg-config utility LUA_CFLAGS C compiler flags for LUA, overriding pkg-config LUA_LIBS linker flags for LUA, overriding pkg-config CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor CAIROPANGO_CFLAGS C compiler flags for CAIROPANGO, overriding pkg-config CAIROPANGO_LIBS linker flags for CAIROPANGO, overriding pkg-config PANGO_1_10_2_CFLAGS C compiler flags for PANGO_1_10_2, overriding pkg-config PANGO_1_10_2_LIBS linker flags for PANGO_1_10_2, overriding pkg-config GTK_CFLAGS C compiler flags for GTK, overriding pkg-config GTK_LIBS linker flags for GTK, overriding pkg-config GTK28_CFLAGS C compiler flags for GTK28, overriding pkg-config GTK28_LIBS linker flags for GTK28, overriding pkg-config CAIROPDF_CFLAGS C compiler flags for CAIROPDF, overriding pkg-config CAIROPDF_LIBS linker flags for CAIROPDF, overriding pkg-config CAIROEPS_CFLAGS C compiler flags for CAIROEPS, overriding pkg-config CAIROEPS_LIBS linker flags for CAIROEPS, overriding pkg-config QT_CFLAGS C compiler flags for QT, overriding pkg-config QT_LIBS linker flags for QT, overriding pkg-config DIST_CONTACT Contact address for modified and binary distributed gnuplot versions Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF gnuplot configure 4.6.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_objc_try_compile LINENO # ----------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_objc_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_objc_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_objc_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case <limits.h> declares $2. For example, HP-UX 11i <limits.h> declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since <limits.h> exists even on freestanding compilers. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by gnuplot $as_me 4.6.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h:config.hin" am__api_version='1.13' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='gnuplot' VERSION='4.6.4' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE VERSION_MAJOR="`cat $srcdir/VERSION`" PATCHLEVEL="`cat $srcdir/PATCHLEVEL`" $as_echo "#define PROTOTYPES 1" >>confdefs.h DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdio.h> int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <float.h> int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <string.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ctype.h> #include <stdlib.h> #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=m ac_cpp='$OBJCPP $CPPFLAGS' ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_objc_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in gcc objcc objc cc CC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJC"; then ac_cv_prog_OBJC="$OBJC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJC=$ac_cv_prog_OBJC if test -n "$OBJC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5 $as_echo "$OBJC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$OBJC" && break done fi if test -z "$OBJC"; then ac_ct_OBJC=$OBJC for ac_prog in gcc objcc objc cc CC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJC"; then ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC if test -n "$ac_ct_OBJC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5 $as_echo "$ac_ct_OBJC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_OBJC" && break done if test "x$ac_ct_OBJC" = x; then OBJC="gcc" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJC=$ac_ct_OBJC fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; } if ${ac_cv_objc_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_objc_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_objc_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5 $as_echo "$ac_cv_objc_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GOBJC=yes else GOBJC= fi ac_test_OBJCFLAGS=${OBJCFLAGS+set} ac_save_OBJCFLAGS=$OBJCFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5 $as_echo_n "checking whether $OBJC accepts -g... " >&6; } if ${ac_cv_prog_objc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_objc_werror_flag=$ac_objc_werror_flag ac_objc_werror_flag=yes ac_cv_prog_objc_g=no OBJCFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_objc_try_compile "$LINENO"; then : ac_cv_prog_objc_g=yes else OBJCFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_objc_try_compile "$LINENO"; then : else ac_objc_werror_flag=$ac_save_objc_werror_flag OBJCFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_objc_try_compile "$LINENO"; then : ac_cv_prog_objc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_objc_werror_flag=$ac_save_objc_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5 $as_echo "$ac_cv_prog_objc_g" >&6; } if test "$ac_test_OBJCFLAGS" = set; then OBJCFLAGS=$ac_save_OBJCFLAGS elif test $ac_cv_prog_objc_g = yes; then if test "$GOBJC" = yes; then OBJCFLAGS="-g -O2" else OBJCFLAGS="-g" fi else if test "$GOBJC" = yes; then OBJCFLAGS="-O2" else OBJCFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$OBJC" am_compiler_list='gcc3 gcc' { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_OBJC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_OBJC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_OBJC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_OBJC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_OBJC_dependencies_compiler_type" >&5 $as_echo "$am_cv_OBJC_dependencies_compiler_type" >&6; } OBJCDEPMODE=depmode=$am_cv_OBJC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_OBJC_dependencies_compiler_type" = gcc3; then am__fastdepOBJC_TRUE= am__fastdepOBJC_FALSE='#' else am__fastdepOBJC_TRUE='#' am__fastdepOBJC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5 $as_echo_n "checking for preprocessor stringizing operator... " >&6; } if ${ac_cv_c_stringize+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define x(y) #y char *s = x(teststring); _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "#teststring" >/dev/null 2>&1; then : ac_cv_c_stringize=no else ac_cv_c_stringize=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stringize" >&5 $as_echo "$ac_cv_c_stringize" >&6; } if test $ac_cv_c_stringize = yes; then $as_echo "#define HAVE_STRINGIZE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi if test "${build}" != "${host}" then CC=${CC-${host_alias-gcc}} CFLAGS=${CFLAGS-"-g -O2"} CXX=${CXX-${host_alias-c++}} CXXFLAGS=${CXXFLAGS-"-g -O2"} CC_FOR_BUILD=${CC_FOR_BUILD-gcc} else # The cross-compilation patch originally had CC_FOR_BUILD = "\$(CC)" # but that causes a recursive definition in docs/Makefile. EAM Dec 2009. CC_FOR_BUILD="${CC}" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # We must set the default linker to the linker used by gcc for the correct # operation of libtool. If LD is not defined and we are using gcc, try to # set the LD default to the ld used by gcc. if test -z "$LD" then if test "$GCC" = yes then case $build in *-*-mingw*) gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;; *) gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;; esac case $gcc_prog_ld in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) LD="$gcc_prog_ld" ;; esac fi fi CXX=${CXX-"c++"} CFLAGS=${CFLAGS-"-g -O2"} CXXFLAGS=${CXXFLAGS-"-g -O2"} fi # If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test x"$EMACS" = xt && EMACS= for ac_prog in emacs xemacs do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_EMACS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$EMACS"; then ac_cv_prog_EMACS="$EMACS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_EMACS="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi EMACS=$ac_cv_prog_EMACS if test -n "$EMACS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EMACS" >&5 $as_echo "$EMACS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$EMACS" && break done test -n "$EMACS" || EMACS="no" # If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test x"$EMACS" = xt && EMACS= for ac_prog in emacs xemacs do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_EMACS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$EMACS"; then ac_cv_prog_EMACS="$EMACS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_EMACS="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi EMACS=$ac_cv_prog_EMACS if test -n "$EMACS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EMACS" >&5 $as_echo "$EMACS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$EMACS" && break done test -n "$EMACS" || EMACS="no" # Check whether --with-lispdir was given. if test "${with_lispdir+set}" = set; then : withval=$with_lispdir; lispdir="$withval" { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5 $as_echo_n "checking where .elc files should go... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lispdir" >&5 $as_echo "$lispdir" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5 $as_echo_n "checking where .elc files should go... " >&6; } if ${am_cv_lispdir+:} false; then : $as_echo_n "(cached) " >&6 else if test $EMACS != "no"; then if test x${lispdir+set} != xset; then # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly # Some emacsen will start up in interactive mode, requiring C-x C-c to exit, # which is non-obvious for non-emacs users. # Redirecting /dev/null should help a bit; pity we can't detect "broken" # emacsen earlier and avoid running this altogether. { { $as_echo "$as_me:${as_lineno-$LINENO}: \$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) \"\\n\")) (setq load-path (cdr load-path)))' </dev/null >conftest.out"; } >&5 ($EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } am_cv_lispdir=`sed -n \ -e 's,/$,,' \ -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ -e '/.*\/share\/x*emacs\/site-lisp$/{s,.*/share/\(x*emacs/site-lisp\),${datarootdir}/\1,;p;q;}' \ conftest.out` rm conftest.out fi fi test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_lispdir" >&5 $as_echo "$am_cv_lispdir" >&6; } lispdir="$am_cv_lispdir" fi # Check whether --with-latex was given. if test "${with_latex+set}" = set; then : withval=$with_latex; else with_latex="yes" fi if test "$with_latex" = yes; then for ac_prog in tex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PLAINTEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PLAINTEX"; then ac_cv_prog_PLAINTEX="$PLAINTEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PLAINTEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PLAINTEX=$ac_cv_prog_PLAINTEX if test -n "$PLAINTEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLAINTEX" >&5 $as_echo "$PLAINTEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PLAINTEX" && break done test -n "$PLAINTEX" || PLAINTEX="no" for ac_prog in latex latex2e do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LATEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LATEX"; then ac_cv_prog_LATEX="$LATEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LATEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LATEX=$ac_cv_prog_LATEX if test -n "$LATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LATEX" >&5 $as_echo "$LATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LATEX" && break done test -n "$LATEX" || LATEX="no" for ac_prog in pdflatex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PDFLATEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PDFLATEX"; then ac_cv_prog_PDFLATEX="$PDFLATEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PDFLATEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PDFLATEX=$ac_cv_prog_PDFLATEX if test -n "$PDFLATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5 $as_echo "$PDFLATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PDFLATEX" && break done test -n "$PDFLATEX" || PDFLATEX="no" test "$PLAINTEX" = "no" -o "$LATEX" = no -o "$PDFLATEX" = "no" && with_latex="no" else PLAINTEX="no" LATEX="no" PDFLATEX="no" fi if test "$with_latex" != no; then HAVE_LATEX_TRUE= HAVE_LATEX_FALSE='#' else HAVE_LATEX_TRUE='#' HAVE_LATEX_FALSE= fi for ac_prog in dvips do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DVIPS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DVIPS"; then ac_cv_prog_DVIPS="$DVIPS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DVIPS="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DVIPS=$ac_cv_prog_DVIPS if test -n "$DVIPS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DVIPS" >&5 $as_echo "$DVIPS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DVIPS" && break done test -n "$DVIPS" || DVIPS="no" for ac_prog in troff do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_TROFF+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$TROFF"; then ac_cv_prog_TROFF="$TROFF" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_TROFF="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi TROFF=$ac_cv_prog_TROFF if test -n "$TROFF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TROFF" >&5 $as_echo "$TROFF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$TROFF" && break done test -n "$TROFF" || TROFF="no" # Check whether --with-texdir was given. if test "${with_texdir+set}" = set; then : withval=$with_texdir; TEXDIR="$withval" else TEXDIR="no" fi for ac_prog in kpsexpand do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_KPSEXPAND+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$KPSEXPAND"; then ac_cv_prog_KPSEXPAND="$KPSEXPAND" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_KPSEXPAND="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi KPSEXPAND=$ac_cv_prog_KPSEXPAND if test -n "$KPSEXPAND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KPSEXPAND" >&5 $as_echo "$KPSEXPAND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$KPSEXPAND" && break done test -n "$KPSEXPAND" || KPSEXPAND="no" for ac_prog in texhash do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_TEXHASH+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$TEXHASH"; then ac_cv_prog_TEXHASH="$TEXHASH" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_TEXHASH="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi TEXHASH=$ac_cv_prog_TEXHASH if test -n "$TEXHASH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEXHASH" >&5 $as_echo "$TEXHASH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$TEXHASH" && break done test -n "$TEXHASH" || TEXHASH="true" # Check whether --with-kpsexpand was given. if test "${with_kpsexpand+set}" = set; then : withval=$with_kpsexpand; if test "$withval" = yes; then test "$KPSEXPAND" != "no" || as_fn_error $? " You tell me to use kpsexpand, but there is no kpsexpand" "$LINENO" 5 $as_echo "#define HAVE_KPSEXPAND 1" >>confdefs.h fi fi if test "$with_latex" = yes; then test "$KPSEXPAND" = "no" -a "$TEXDIR" = "no" && as_fn_error $? " texdir is not given and there is no kpsexpand, please tell where to install" "$LINENO" 5 if test "$TEXDIR" = "no"; then if test "x$prefix" != "xNONE"; then TEXDIR=${prefix}/share/texmf else TEXDIR=`$KPSEXPAND '$TEXMFLOCAL'` if test "x$TEXDIR" = "x" -o "$TEXDIR" = "\$TEXMFLOCAL"; then TEXDIR=${ac_default_prefix}/share/texmf fi fi TEXDIR=${TEXDIR}/tex/latex/gnuplot fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <X11/Xlib.h> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <X11/Xlib.h> int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if ${ac_cv_lib_bsd_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = xyes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" if test "x$ac_cv_func_remove" = xyes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } if ${ac_cv_lib_posix_remove+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); int main () { return remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = xyes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } if ${ac_cv_lib_ipc_shmat+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); int main () { return shmat (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi if test "$ac_cv_func_gethostbyname" = no; then if test "$ac_cv_lib_nsl_gethostbyname" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if ${ac_cv_lib_bsd_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi if test "$no_x" != yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" LIBRARIES_FOR_X="$X_LIBS -lX11 $X_EXTRA_LIBS" $as_echo "#define X11 1" >>confdefs.h fi if test "$no_x" != yes; then BUILD_GNUPLOT_X11_TRUE= BUILD_GNUPLOT_X11_FALSE='#' else BUILD_GNUPLOT_X11_TRUE='#' BUILD_GNUPLOT_X11_FALSE= fi # Check whether --with-x-app-defaultdir was given. if test "${with_x_app_defaultdir+set}" = set; then : withval=$with_x_app_defaultdir; X11_APPDEFAULTS_DIR="$withval" else X11_APPDEFAULTS_DIR="/etc/X11/app-defaults/" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MS-DOS/djgpp/libGRX" >&5 $as_echo_n "checking for MS-DOS/djgpp/libGRX... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if __DJGPP__ && __DJGPP__ == 2 yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LIBS="-lpc $LIBS" $as_echo "#define MSDOS 1" >>confdefs.h $as_echo "#define DOS32 1" >>confdefs.h with_linux_vga=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GrLine in -lgrx20" >&5 $as_echo_n "checking for GrLine in -lgrx20... " >&6; } if ${ac_cv_lib_grx20_GrLine+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgrx20 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char GrLine (); int main () { return GrLine (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_grx20_GrLine=yes else ac_cv_lib_grx20_GrLine=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_grx20_GrLine" >&5 $as_echo "$ac_cv_lib_grx20_GrLine" >&6; } if test "x$ac_cv_lib_grx20_GrLine" = xyes; then : LIBS="-lgrx20 $LIBS" CFLAGS="$CFLAGS -fno-inline-functions" $as_echo "#define DJSVGA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GrCustomLine in -lgrx20" >&5 $as_echo_n "checking for GrCustomLine in -lgrx20... " >&6; } if ${ac_cv_lib_grx20_GrCustomLine+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgrx20 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char GrCustomLine (); int main () { return GrCustomLine (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_grx20_GrCustomLine=yes else ac_cv_lib_grx20_GrCustomLine=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_grx20_GrCustomLine" >&5 $as_echo "$ac_cv_lib_grx20_GrCustomLine" >&6; } if test "x$ac_cv_lib_grx20_GrCustomLine" = xyes; then : $as_echo "#define GRX21 1" >>confdefs.h fi fi is_msdos=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } is_msdos=no fi rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NeXT" >&5 $as_echo_n "checking for NeXT... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if __NeXT__ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LIBS="$LIBS -lsys_s -lNeXT_s" CFLAGS="$CFLAGS -ObjC" is_next=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } is_next=no fi rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Apple MacOS X" >&5 $as_echo_n "checking for Apple MacOS X... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(__APPLE__) && defined(__MACH__) yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for aqtInit in -laquaterm" >&5 $as_echo_n "checking for aqtInit in -laquaterm... " >&6; } if ${ac_cv_lib_aquaterm_aqtInit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-laquaterm -lobjc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aqtInit (); int main () { return aqtInit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_aquaterm_aqtInit=yes else ac_cv_lib_aquaterm_aqtInit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aquaterm_aqtInit" >&5 $as_echo "$ac_cv_lib_aquaterm_aqtInit" >&6; } if test "x$ac_cv_lib_aquaterm_aqtInit" = xyes; then : LIBS="-laquaterm $LIBS -framework Foundation" CFLAGS="$CFLAGS -ObjC" $as_echo "#define HAVE_LIBAQUATERM 1" >>confdefs.h fi is_apple=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } is_apple=no fi rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BeOS" >&5 $as_echo_n "checking for BeOS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if __BEOS__ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } build_src_beos_subdir=yes else build_src_beos_subdir=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Alpha/AXP CPU" >&5 $as_echo_n "checking for Alpha/AXP CPU... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __alpha yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } if test "$GCC" = "yes" ; then CFLAGS="-mieee $CFLAGS" else CFLAGS="-ieee $CFLAGS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* if test x$build_beos_subdir = xyes; then BUILD_SRC_BEOS_SUBDIR_TRUE= BUILD_SRC_BEOS_SUBDIR_FALSE='#' else BUILD_SRC_BEOS_SUBDIR_TRUE='#' BUILD_SRC_BEOS_SUBDIR_FALSE= fi ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin" if test "x$ac_cv_func_sin" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 $as_echo_n "checking for sin in -lm... " >&6; } if ${ac_cv_lib_m_sin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sin (); int main () { return sin (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sin=yes else ac_cv_lib_m_sin=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <float.h> int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <string.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ctype.h> #include <stdlib.h> #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in dirent.h errno.h float.h langinfo.h limits.h locale.h math.h \ stdlib.h string.h time.h sys/time.h sys/types.h \ sys/bsdtypes.h sys/ioctl.h sys/param.h sys/select.h sys/socket.h \ sys/stat.h sys/systeminfo.h sys/timeb.h sys/utsname.h \ libc.h malloc.h poll.h sgtty.h termios.h values.h dirent.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdbool.h> #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi if test "$ac_cv_header_math_h" = yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception in math.h" >&5 $as_echo_n "checking for struct exception in math.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <math.h> int main () { struct exception *x; x->type; x->name; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_STRUCT_EXCEPTION_IN_MATH_H 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test "$ac_cv_header_sys_stat_h" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } if ${ac_cv_header_stat_broken+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> #include <sys/stat.h> #if defined S_ISBLK && defined S_IFDIR extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif #if defined S_ISBLK && defined S_IFCHR extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; #endif #if defined S_ISLNK && defined S_IFREG extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; #endif #if defined S_ISSOCK && defined S_IFREG extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stat_broken=no else ac_cv_header_stat_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 $as_echo "$ac_cv_header_stat_broken" >&6; } if test $ac_cv_header_stat_broken = yes; then $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unistd.h" >&5 $as_echo_n "checking for unistd.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <unistd.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "execv" >/dev/null 2>&1; then : $as_echo "#define HAVE_UNISTD_H 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking if errno variable is declared" >&5 $as_echo_n "checking if errno variable is declared... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdio.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif int main () { errno=0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else $as_echo "#define EXTERN_ERRNO 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for time_t in time.h" >&5 $as_echo_n "checking for time_t in time.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <time.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "time_t" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_TIME_T_IN_TIME_H 1" >>confdefs.h fi rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> #include <signal.h> int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in atexit memcpy memmove memset \ on_exit bcopy bzero \ setvbuf strerror strchr strrchr strstr \ index rindex \ erf erfc gamma lgamma \ getcwd poll pclose popen fdopen select sleep stpcpy \ strcspn strdup strndup strnlen strcasecmp stricmp strncasecmp strnicmp \ sysinfo tcgetattr vfprintf doprnt usleep do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in snprintf do : ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" if test "x$ac_cv_func_snprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SNPRINTF 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: Could not find a working version of snprintf. If a user provides gnuplot with an improper format statement then a buffer overflow and/or segfault can result. Please consider providing snprintf via an external library. " >&5 $as_echo " WARNING: Could not find a working version of snprintf. If a user provides gnuplot with an improper format statement then a buffer overflow and/or segfault can result. Please consider providing snprintf via an external library. " >&6; } fi done ac_fn_c_check_decl "$LINENO" "signgam" "ac_cv_have_decl_signgam" "#if HAVE_MATH_H #include <math.h> #endif " if test "x$ac_cv_have_decl_signgam" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SIGNGAM $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 $as_echo_n "checking for sigsetjmp... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <setjmp.h> int main () { jmp_buf env; sigsetjmp(env, 1); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_func_pclose" = yes -a "$ac_cv_func_popen" = yes ; then $as_echo "#define PIPES 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if malloc(0) returns 0" >&5 $as_echo_n "checking if malloc(0) returns 0... " >&6; } if test "$cross_compiling" = yes; then : malloc_zero_returns_zero=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif int main () { if(malloc(0)==0) return 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : malloc_zero_returns_zero=no else malloc_zero_returns_zero=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $malloc_zero_returns_zero" >&5 $as_echo "$malloc_zero_returns_zero" >&6; } if test x$malloc_zero_returns_zero = xyes; then : $as_echo "#define MALLOC_ZERO_RETURNS_ZERO 1" >>confdefs.h fi for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include <sys/select.h> #endif #ifdef HAVE_SYS_SOCKET_H # include <sys/socket.h> #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done done # Provide a safe default value. : "${ac_cv_func_select_args=int,int *,struct timeval *}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$ac_cv_func_select_args" >&6; } ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG1 $1 _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* LASERGNU=lasergnu-noinstall # Check whether --with-lasergnu was given. if test "${with_lasergnu+set}" = set; then : withval=$with_lasergnu; test "$withval" = yes && LASERGNU=lasergnu-install fi eval gp_datadir=$datadir if test "$gp_datadir" = NONE/share; then datadir="/usr/local/share" fi pkgdatadir="$datadir/$PACKAGE" # Check whether --with-gihdir was given. if test "${with_gihdir+set}" = set; then : withval=$with_gihdir; GIHDIR="$withval" else GIHDIR="$pkgdatadir/$VERSION_MAJOR" fi # Check whether --with-linux-vga was given. if test "${with_linux_vga+set}" = set; then : withval=$with_linux_vga; else test -z "$with_linux_vga" && with_linux_vga=no fi if test "$with_linux_vga" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linux vga library" >&5 $as_echo_n "checking for linux vga library... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vga_init in -lvga" >&5 $as_echo_n "checking for vga_init in -lvga... " >&6; } if ${ac_cv_lib_vga_vga_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lvga $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char vga_init (); int main () { return vga_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_vga_vga_init=yes else ac_cv_lib_vga_vga_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vga_vga_init" >&5 $as_echo "$ac_cv_lib_vga_vga_init" >&6; } if test "x$ac_cv_lib_vga_vga_init" = xyes; then : $as_echo "#define LINUXVGA 1" >>confdefs.h LINUXSUID='chown root $(bindir)/gnuplot; chmod u+s $(bindir)/gnuplot' TERMLIBS="-lvga $TERMLIBS" else with_linux_vga=no fi fi GGI_SUPPORT=no # Check whether --with-ggi was given. if test "${with_ggi+set}" = set; then : withval=$with_ggi; if test "$withval" != no; then if test -d $withval/include; then CPPFLAGS="$CPPFLAGS -I$withval/include" fi if test -d $withval/lib; then LDFLAGS="$LDFLAGS -L$withval/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ggiInit in -lggi" >&5 $as_echo_n "checking for ggiInit in -lggi... " >&6; } if ${ac_cv_lib_ggi_ggiInit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lggi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ggiInit (); int main () { return ggiInit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ggi_ggiInit=yes else ac_cv_lib_ggi_ggiInit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ggi_ggiInit" >&5 $as_echo "$ac_cv_lib_ggi_ggiInit" >&6; } if test "x$ac_cv_lib_ggi_ggiInit" = xyes; then : TERMLIBS="-lggi $TERMLIBS" $as_echo "#define USE_GGI_DRIVER 1" >>confdefs.h GGI_SUPPORT=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ggiWmhInit in -lggiwmh" >&5 $as_echo_n "checking for ggiWmhInit in -lggiwmh... " >&6; } if ${ac_cv_lib_ggiwmh_ggiWmhInit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lggiwmh $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ggiWmhInit (); int main () { return ggiWmhInit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ggiwmh_ggiWmhInit=yes else ac_cv_lib_ggiwmh_ggiWmhInit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ggiwmh_ggiWmhInit" >&5 $as_echo "$ac_cv_lib_ggiwmh_ggiWmhInit" >&6; } if test "x$ac_cv_lib_ggiwmh_ggiWmhInit" = xyes; then : TERMLIBS="-lggiwmh $TERMLIBS" for ac_header in ggi/wmh.h do : ac_fn_c_check_header_mongrel "$LINENO" "ggi/wmh.h" "ac_cv_header_ggi_wmh_h" "$ac_includes_default" if test "x$ac_cv_header_ggi_wmh_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GGI_WMH_H 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: found ggiwmh library but not ggi/wmh.h please add path to ggi/wmh.h to CPPFLAGS in Makefile" >&5 $as_echo "$as_me: WARNING: found ggiwmh library but not ggi/wmh.h please add path to ggi/wmh.h to CPPFLAGS in Makefile" >&2;} fi done fi fi fi fi # Check whether --with-xmi was given. if test "${with_xmi+set}" = set; then : withval=$with_xmi; if test "$withval" != no -a "$GGI_SUPPORT" = yes; then if test -d $withval/include; then CPPFLAGS="$CPPFLAGS -I$withval/include" fi if test -d $withval/lib; then LDFLAGS="$LDFLAGS -L$withval/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmiInit in -lxmi" >&5 $as_echo_n "checking for xmiInit in -lxmi... " >&6; } if ${ac_cv_lib_xmi_xmiInit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lxmi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char xmiInit (); int main () { return xmiInit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_xmi_xmiInit=yes else ac_cv_lib_xmi_xmiInit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xmi_xmiInit" >&5 $as_echo "$ac_cv_lib_xmi_xmiInit" >&6; } if test "x$ac_cv_lib_xmi_xmiInit" = xyes; then : TERMLIBS="-lxmi $TERMLIBS" for ac_header in ggi/xmi.h do : ac_fn_c_check_header_mongrel "$LINENO" "ggi/xmi.h" "ac_cv_header_ggi_xmi_h" "$ac_includes_default" if test "x$ac_cv_header_ggi_xmi_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GGI_XMI_H 1 _ACEOF fi done fi fi fi # Check whether --with-readline was given. if test "${with_readline+set}" = set; then : withval=$with_readline; else test -z "$with_readline" && with_readline=gnu fi # Check whether --enable-history-file was given. if test "${enable_history_file+set}" = set; then : enableval=$enable_history_file; else test -z "$enable_history_file" && enable_history_file=yes fi if test "$with_readline" != no; then _libs="$LIBS" if test "$with_readline" != builtin; then if test "$with_readline" = bsd; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -ledit" >&5 $as_echo_n "checking for readline in -ledit... " >&6; } if ${ac_cv_lib_edit_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ledit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_edit_readline=yes else ac_cv_lib_edit_readline=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_readline" >&5 $as_echo "$ac_cv_lib_edit_readline" >&6; } if test "x$ac_cv_lib_edit_readline" = xyes; then : TERMLIBS="-ledit $TERMLIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find BSD editline library " >&5 $as_echo "$as_me: WARNING: Could not find BSD editline library " >&2;} with_readline=builtin fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lcurses" >&5 $as_echo_n "checking for tputs in -lcurses... " >&6; } if ${ac_cv_lib_curses_tputs+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tputs (); int main () { return tputs (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curses_tputs=yes else ac_cv_lib_curses_tputs=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tputs" >&5 $as_echo "$ac_cv_lib_curses_tputs" >&6; } if test "x$ac_cv_lib_curses_tputs" = xyes; then : TERMLIBS="-lcurses $TERMLIBS" fi if test "$ac_cv_lib_edit_readline" = yes; then $as_echo "#define HAVE_LIBEDITLINE 1" >>confdefs.h for ac_header in editline/readline.h do : ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default" if test "x$ac_cv_header_editline_readline_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_EDITLINE_READLINE_H 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: found BSD editline library but not readline.h please add path to readline.h to CPPFLAGS in Makefile" >&5 $as_echo "$as_me: WARNING: found BSD editline library but not readline.h please add path to readline.h to CPPFLAGS in Makefile" >&2;} fi done if test "$enable_history_file" = yes; then $as_echo "#define GNUPLOT_HISTORY 1" >>confdefs.h fi fi else # !bsd gp_tcap="" for termlib in ncurses curses termcap terminfo termlib; do as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tputs" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -l${termlib}" >&5 $as_echo_n "checking for tputs in -l${termlib}... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l${termlib} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tputs (); int main () { return tputs (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : gp_tcap="$gp_tcap -l$termlib" fi case "$gp_tcap" in *-l${termlib}*) break ;; esac done if test "$with_readline" = gnu; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove_history in -lreadline" >&5 $as_echo_n "checking for remove_history in -lreadline... " >&6; } if ${ac_cv_lib_readline_remove_history+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline ${gp_tcap} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove_history (); int main () { return remove_history (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_remove_history=yes else ac_cv_lib_readline_remove_history=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_remove_history" >&5 $as_echo "$ac_cv_lib_readline_remove_history" >&6; } if test "x$ac_cv_lib_readline_remove_history" = xyes; then : TERMLIBS="-lreadline $gp_tcap $TERMLIBS" fi else if test -d $with_readline/include; then CPPFLAGS="$CPPFLAGS -I$with_readline/include" fi if test -d $with_readline/lib; then LDFLAGS="$LDFLAGS -L$with_readline/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove_history in -lreadline" >&5 $as_echo_n "checking for remove_history in -lreadline... " >&6; } if ${ac_cv_lib_readline_remove_history+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline ${gp_tcap} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove_history (); int main () { return remove_history (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_remove_history=yes else ac_cv_lib_readline_remove_history=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_remove_history" >&5 $as_echo "$ac_cv_lib_readline_remove_history" >&6; } if test "x$ac_cv_lib_readline_remove_history" = xyes; then : TERMLIBS="-lreadline $gp_tcap $TERMLIBS" fi fi if test "$ac_cv_lib_readline_remove_history" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove_history in -lhistory" >&5 $as_echo_n "checking for remove_history in -lhistory... " >&6; } if ${ac_cv_lib_history_remove_history+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhistory ${gp_tcap} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove_history (); int main () { return remove_history (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_history_remove_history=yes else ac_cv_lib_history_remove_history=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_history_remove_history" >&5 $as_echo "$ac_cv_lib_history_remove_history" >&6; } if test "x$ac_cv_lib_history_remove_history" = xyes; then : TERMLIBS="-lreadline -lhistory $gp_tcap $TERMLIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU readline not found - falling back to builtin readline" >&5 $as_echo "$as_me: WARNING: GNU readline not found - falling back to builtin readline" >&2;} with_readline=builtin fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rl_ding" >&5 $as_echo_n "checking for library containing rl_ding... " >&6; } if ${ac_cv_search_rl_ding+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char rl_ding (); int main () { return rl_ding (); ; return 0; } _ACEOF for ac_lib in '' readline; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib ${TERMLIBS} $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_rl_ding=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_rl_ding+:} false; then : break fi done if ${ac_cv_search_rl_ding+:} false; then : else ac_cv_search_rl_ding=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rl_ding" >&5 $as_echo "$ac_cv_search_rl_ding" >&6; } ac_res=$ac_cv_search_rl_ding if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else $as_echo "#define MISSING_RL_DING 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rl_forced_update_display" >&5 $as_echo_n "checking for library containing rl_forced_update_display... " >&6; } if ${ac_cv_search_rl_forced_update_display+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char rl_forced_update_display (); int main () { return rl_forced_update_display (); ; return 0; } _ACEOF for ac_lib in '' readline; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib ${TERMLIBS} $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_rl_forced_update_display=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_rl_forced_update_display+:} false; then : break fi done if ${ac_cv_search_rl_forced_update_display+:} false; then : else ac_cv_search_rl_forced_update_display=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rl_forced_update_display" >&5 $as_echo "$ac_cv_search_rl_forced_update_display" >&6; } ac_res=$ac_cv_search_rl_forced_update_display if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else $as_echo "#define MISSING_RL_FORCED_UPDATE_DISPLAY 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rl_reset_after_signal" >&5 $as_echo_n "checking for library containing rl_reset_after_signal... " >&6; } if ${ac_cv_search_rl_reset_after_signal+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char rl_reset_after_signal (); int main () { return rl_reset_after_signal (); ; return 0; } _ACEOF for ac_lib in '' readline; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib ${TERMLIBS} $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_rl_reset_after_signal=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_rl_reset_after_signal+:} false; then : break fi done if ${ac_cv_search_rl_reset_after_signal+:} false; then : else ac_cv_search_rl_reset_after_signal=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rl_reset_after_signal" >&5 $as_echo "$ac_cv_search_rl_reset_after_signal" >&6; } ac_res=$ac_cv_search_rl_reset_after_signal if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_READLINE_RESET 1" >>confdefs.h fi # Warning: rl_complete_with_tilde_expansion is an int, not a function. # I.e., it is not callable. AC_CHECK_LIB seems to work anyhow, but... { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rl_complete_with_tilde_expansion" >&5 $as_echo_n "checking for library containing rl_complete_with_tilde_expansion... " >&6; } if ${ac_cv_search_rl_complete_with_tilde_expansion+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char rl_complete_with_tilde_expansion (); int main () { return rl_complete_with_tilde_expansion (); ; return 0; } _ACEOF for ac_lib in '' readline; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib ${TERMLIBS} $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_rl_complete_with_tilde_expansion=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_rl_complete_with_tilde_expansion+:} false; then : break fi done if ${ac_cv_search_rl_complete_with_tilde_expansion+:} false; then : else ac_cv_search_rl_complete_with_tilde_expansion=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rl_complete_with_tilde_expansion" >&5 $as_echo "$ac_cv_search_rl_complete_with_tilde_expansion" >&6; } ac_res=$ac_cv_search_rl_complete_with_tilde_expansion if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else $as_echo "#define MISSING_RL_TILDE_EXPANSION 1" >>confdefs.h fi if test "$ac_cv_lib_readline_remove_history" != no || test "$ac_cv_lib_history_remove_history" != no; then if test "$with_readline" = bsd; then $as_echo "#define HAVE_LIBEDITLINE 1" >>confdefs.h else $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h fi for ac_header in readline/readline.h do : ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" if test "x$ac_cv_header_readline_readline_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_READLINE_READLINE_H 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: found GNU readline library but not readline.h please add path to readline.h to CPPFLAGS in Makefile" >&5 $as_echo "$as_me: WARNING: found GNU readline library but not readline.h please add path to readline.h to CPPFLAGS in Makefile" >&2;} fi done for ac_header in readline/history.h do : ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" if test "x$ac_cv_header_readline_history_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_READLINE_HISTORY_H 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: found GNU readline library but not history.h please add path to history.h to CPPFLAGS in Makefile" >&5 $as_echo "$as_me: WARNING: found GNU readline library but not history.h please add path to history.h to CPPFLAGS in Makefile" >&2;} fi done if test "$enable_history_file" = yes; then $as_echo "#define GNUPLOT_HISTORY 1" >>confdefs.h fi fi # ! ac_cv_lib_readline_readline = no fi # ! with_readline = bsd fi # ! with_readline != builtin if test "$with_readline" = builtin; then for ac_func in wcwidth do : ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth" if test "x$ac_cv_func_wcwidth" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WCWIDTH 1 _ACEOF fi done for ac_header in wchar.h do : ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" if test "x$ac_cv_header_wchar_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WCHAR_H 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please add path to wchar.h to CPPFLAGS in Makefile" >&5 $as_echo "$as_me: WARNING: please add path to wchar.h to CPPFLAGS in Makefile" >&2;} fi done $as_echo "#define READLINE 1" >>confdefs.h if test "$enable_history_file" = yes; then $as_echo "#define GNUPLOT_HISTORY 1" >>confdefs.h fi fi LIBS="$_libs" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5 $as_echo_n "checking for deflate in -lz... " >&6; } if ${ac_cv_lib_z_deflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char deflate (); int main () { return deflate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_deflate=yes else ac_cv_lib_z_deflate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5 $as_echo "$ac_cv_lib_z_deflate" >&6; } if test "x$ac_cv_lib_z_deflate" = xyes; then : TERMLIBS="$TERMLIBS -lz" $as_echo "#define HAVE_LIBZ 1" >>confdefs.h ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: found z library but not zlib.h please add path to zlib.h to CPPFLAGS in Makefile" >&5 $as_echo "$as_me: WARNING: found z library but not zlib.h please add path to zlib.h to CPPFLAGS in Makefile" >&2;} fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib is required - see http://www.gzip.org/zlib/" >&5 $as_echo "$as_me: WARNING: zlib is required - see http://www.gzip.org/zlib/" >&2;} fi # Check whether --with-gd was given. if test "${with_gd+set}" = set; then : withval=$with_gd; else with_gd=yes fi if test "$with_gd" != no; then # Extract the first word of "gdlib-config", so it can be a program name with args. set dummy gdlib-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GDLIB_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $GDLIB_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GDLIB_CONFIG="$GDLIB_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GDLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GDLIB_CONFIG=$ac_cv_path_GDLIB_CONFIG if test -n "$GDLIB_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDLIB_CONFIG" >&5 $as_echo "$GDLIB_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$GDLIB_CONFIG"; then libgd_CPPFLAGS=`gdlib-config --cflags` libgd_LDFLAGS=`gdlib-config --ldflags` libgd_LIBS=`gdlib-config --libs` elif test -d "$with_gd"; then libgd_CPPFLAGS="-I$with_gd/include" libgd_LDFLAGS="-L$with_gd/lib" fi _cppflags="$CPPFLAGS" _ldflags="$LDFLAGS" CPPFLAGS="$CPPFLAGS $libgd_CPPFLAGS" LDFLAGS="$LDFLAGS $libgd_LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageCreateTrueColor in -lgd" >&5 $as_echo_n "checking for gdImageCreateTrueColor in -lgd... " >&6; } if ${ac_cv_lib_gd_gdImageCreateTrueColor+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gdImageCreateTrueColor (); int main () { return gdImageCreateTrueColor (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gd_gdImageCreateTrueColor=yes else ac_cv_lib_gd_gdImageCreateTrueColor=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageCreateTrueColor" >&5 $as_echo "$ac_cv_lib_gd_gdImageCreateTrueColor" >&6; } if test "x$ac_cv_lib_gd_gdImageCreateTrueColor" = xyes; then : $as_echo "#define HAVE_LIBGD 1" >>confdefs.h for ac_header in gd.h do : ac_fn_c_check_header_mongrel "$LINENO" "gd.h" "ac_cv_header_gd_h" "$ac_includes_default" if test "x$ac_cv_header_gd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GD_H 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please add path to gd.h to CPPFLAGS in Makefile" >&5 $as_echo "$as_me: WARNING: please add path to gd.h to CPPFLAGS in Makefile" >&2;} fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageGif in -lgd" >&5 $as_echo_n "checking for gdImageGif in -lgd... " >&6; } if ${ac_cv_lib_gd_gdImageGif+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gdImageGif (); int main () { return gdImageGif (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gd_gdImageGif=yes else ac_cv_lib_gd_gdImageGif=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageGif" >&5 $as_echo "$ac_cv_lib_gd_gdImageGif" >&6; } if test "x$ac_cv_lib_gd_gdImageGif" = xyes; then : $as_echo "#define HAVE_GD_GIF 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageGifAnimBegin in -lgd" >&5 $as_echo_n "checking for gdImageGifAnimBegin in -lgd... " >&6; } if ${ac_cv_lib_gd_gdImageGifAnimBegin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gdImageGifAnimBegin (); int main () { return gdImageGifAnimBegin (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gd_gdImageGifAnimBegin=yes else ac_cv_lib_gd_gdImageGifAnimBegin=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageGifAnimBegin" >&5 $as_echo "$ac_cv_lib_gd_gdImageGifAnimBegin" >&6; } if test "x$ac_cv_lib_gd_gdImageGifAnimBegin" = xyes; then : $as_echo "#define GIF_ANIMATION 1" >>confdefs.h fi _libs="$LIBS" LIBS="$LIBS -ljpeg" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageJpeg in -lgd" >&5 $as_echo_n "checking for gdImageJpeg in -lgd... " >&6; } if ${ac_cv_lib_gd_gdImageJpeg+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gdImageJpeg (); int main () { return gdImageJpeg (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gd_gdImageJpeg=yes else ac_cv_lib_gd_gdImageJpeg=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageJpeg" >&5 $as_echo "$ac_cv_lib_gd_gdImageJpeg" >&6; } if test "x$ac_cv_lib_gd_gdImageJpeg" = xyes; then : $as_echo "#define HAVE_GD_JPEG 1" >>confdefs.h libgd_LIBS="$libgd_LIBS -ljpeg" fi LIBS="$_libs $libgd_LIBS -lfreetype" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageStringFT in -lgd" >&5 $as_echo_n "checking for gdImageStringFT in -lgd... " >&6; } if ${ac_cv_lib_gd_gdImageStringFT+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gdImageStringFT (); int main () { return gdImageStringFT (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gd_gdImageStringFT=yes else ac_cv_lib_gd_gdImageStringFT=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageStringFT" >&5 $as_echo "$ac_cv_lib_gd_gdImageStringFT" >&6; } if test "x$ac_cv_lib_gd_gdImageStringFT" = xyes; then : have_ttf=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageStringTTF in -lgd" >&5 $as_echo_n "checking for gdImageStringTTF in -lgd... " >&6; } if ${ac_cv_lib_gd_gdImageStringTTF+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gdImageStringTTF (); int main () { return gdImageStringTTF (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gd_gdImageStringTTF=yes else ac_cv_lib_gd_gdImageStringTTF=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageStringTTF" >&5 $as_echo "$ac_cv_lib_gd_gdImageStringTTF" >&6; } if test "x$ac_cv_lib_gd_gdImageStringTTF" = xyes; then : $as_echo "#define gdImageStringFT gdImageStringTTF" >>confdefs.h have_ttf=yes fi fi if test "$have_ttf" = yes; then $as_echo "#define HAVE_GD_TTF 1" >>confdefs.h libgd_LIBS="$libgd_LIBS -lfreetype" fi LIBS="$_libs $libgd_LIBS -lpng" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImagePng in -lgd" >&5 $as_echo_n "checking for gdImagePng in -lgd... " >&6; } if ${ac_cv_lib_gd_gdImagePng+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gdImagePng (); int main () { return gdImagePng (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gd_gdImagePng=yes else ac_cv_lib_gd_gdImagePng=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImagePng" >&5 $as_echo "$ac_cv_lib_gd_gdImagePng" >&6; } if test "x$ac_cv_lib_gd_gdImagePng" = xyes; then : $as_echo "#define HAVE_GD_PNG 1" >>confdefs.h libgd_LIBS="$libgd_LIBS -lpng" fi LIBS="$_libs" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libgd not found or too old, version >= 2.0 is required" >&5 $as_echo "$as_me: WARNING: libgd not found or too old, version >= 2.0 is required" >&2;} with_gd=no fi if test "$with_gd" = no; then CPPFLAGS="$_cppflags" LDFLAGS="$_ldflags" else TERMLIBS="$TERMLIBS -lgd $libgd_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing iconv_open" >&5 $as_echo_n "checking for library containing iconv_open... " >&6; } if ${ac_cv_search_iconv_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char iconv_open (); int main () { return iconv_open (); ; return 0; } _ACEOF for ac_lib in '' iconv; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_iconv_open=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_iconv_open+:} false; then : break fi done if ${ac_cv_search_iconv_open+:} false; then : else ac_cv_search_iconv_open=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_iconv_open" >&5 $as_echo "$ac_cv_search_iconv_open" >&6; } ac_res=$ac_cv_search_iconv_open if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" if test "x$ac_cv_header_iconv_h" = xyes; then : $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi fi # Check whether --with-pdf was given. if test "${with_pdf+set}" = set; then : withval=$with_pdf; else with_pdf=yes fi if test "$with_pdf" != no; then # Extract the first word of "pdflib-config", so it can be a program name with args. set dummy pdflib-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PDFLIB_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PDFLIB_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PDFLIB_CONFIG="$PDFLIB_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PDFLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PDFLIB_CONFIG=$ac_cv_path_PDFLIB_CONFIG if test -n "$PDFLIB_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFLIB_CONFIG" >&5 $as_echo "$PDFLIB_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$PDFLIB_CONFIG"; then libpdf_CPPFLAGS=`pdflib-config --cflags` # D'oh - libraries don't belong here libpdf_LDFLAGS=`pdflib-config --ldflags |sed 's/ -l[^ ][^ ]*//g'` elif test -d "$with_pdf"; then libpdf_CPPFLAGS="-I$with_pdf/include" libpdf_LDFLAGS="-L$with_pdf/lib" fi _cppflags="$CPPFLAGS" _ldflags="$LDFLAGS" _libs="$LIBS" CPPFLAGS="$CPPFLAGS $libpdf_CPPFLAGS" LDFLAGS="$LDFLAGS $libpdf_LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDF_get_majorversion in -lpdf" >&5 $as_echo_n "checking for PDF_get_majorversion in -lpdf... " >&6; } if ${ac_cv_lib_pdf_PDF_get_majorversion+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpdf $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char PDF_get_majorversion (); int main () { return PDF_get_majorversion (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pdf_PDF_get_majorversion=yes else ac_cv_lib_pdf_PDF_get_majorversion=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pdf_PDF_get_majorversion" >&5 $as_echo "$ac_cv_lib_pdf_PDF_get_majorversion" >&6; } if test "x$ac_cv_lib_pdf_PDF_get_majorversion" = xyes; then : $as_echo "#define HAVE_LIBPDF 1" >>confdefs.h for ac_header in pdflib.h do : ac_fn_c_check_header_mongrel "$LINENO" "pdflib.h" "ac_cv_header_pdflib_h" "$ac_includes_default" if test "x$ac_cv_header_pdflib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PDFLIB_H 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please add path to pdflib.h to CPPFLAGS in Makefile" >&5 $as_echo "$as_me: WARNING: please add path to pdflib.h to CPPFLAGS in Makefile" >&2;} fi done else with_pdf=no fi if test "$with_pdf" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDF_begin_pattern in -lpdf" >&5 $as_echo_n "checking for PDF_begin_pattern in -lpdf... " >&6; } if ${ac_cv_lib_pdf_PDF_begin_pattern+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpdf $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char PDF_begin_pattern (); int main () { return PDF_begin_pattern (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pdf_PDF_begin_pattern=yes else ac_cv_lib_pdf_PDF_begin_pattern=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pdf_PDF_begin_pattern" >&5 $as_echo "$ac_cv_lib_pdf_PDF_begin_pattern" >&6; } if test "x$ac_cv_lib_pdf_PDF_begin_pattern" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPDF 1 _ACEOF LIBS="-lpdf $LIBS" else $as_echo "#define HAVE_OLD_LIBPDF 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your version of libpdf is too old!" >&5 $as_echo "$as_me: WARNING: your version of libpdf is too old!" >&2;} fi fi if test "$with_pdf" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDF_setdashpattern in -lpdf" >&5 $as_echo_n "checking for PDF_setdashpattern in -lpdf... " >&6; } if ${ac_cv_lib_pdf_PDF_setdashpattern+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpdf $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char PDF_setdashpattern (); int main () { return PDF_setdashpattern (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pdf_PDF_setdashpattern=yes else ac_cv_lib_pdf_PDF_setdashpattern=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pdf_PDF_setdashpattern" >&5 $as_echo "$ac_cv_lib_pdf_PDF_setdashpattern" >&6; } if test "x$ac_cv_lib_pdf_PDF_setdashpattern" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPDF 1 _ACEOF LIBS="-lpdf $LIBS" else $as_echo "#define HAVE_NODASH_LIBPDF 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your version of libpdf is too old!" >&5 $as_echo "$as_me: WARNING: your version of libpdf is too old!" >&2;} fi fi if test "$with_pdf" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDF_begin_document in -lpdf" >&5 $as_echo_n "checking for PDF_begin_document in -lpdf... " >&6; } if ${ac_cv_lib_pdf_PDF_begin_document+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpdf $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char PDF_begin_document (); int main () { return PDF_begin_document (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pdf_PDF_begin_document=yes else ac_cv_lib_pdf_PDF_begin_document=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pdf_PDF_begin_document" >&5 $as_echo "$ac_cv_lib_pdf_PDF_begin_document" >&6; } if test "x$ac_cv_lib_pdf_PDF_begin_document" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPDF 1 _ACEOF LIBS="-lpdf $LIBS" else $as_echo "#define HAVE_LIBPDF_OPEN_FILE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your version of libpdf is rather old." >&5 $as_echo "$as_me: WARNING: your version of libpdf is rather old." >&2;} fi fi LIBS="$_libs" if test "$with_pdf" = no; then CPPFLAGS="$_cppflags" LDFLAGS="$_ldflags" else TERMLIBS="$TERMLIBS -lpdf" fi fi # Check whether --with-lua was given. if test "${with_lua+set}" = set; then : withval=$with_lua; else test -z "${with_lua}" && with_lua=yes fi if test "${with_lua}" = yes ; then if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5 $as_echo_n "checking for LUA... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$LUA_CFLAGS"; then pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$LUA_LIBS"; then pkg_cv_LUA_LIBS="$LUA_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua"` else LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5 $as_echo_n "checking for LUA... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$LUA_CFLAGS"; then pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua5.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua5.1" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$LUA_LIBS"; then pkg_cv_LUA_LIBS="$LUA_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua5.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua5.1" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua5.1"` else LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua5.1"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } LUAFOUND=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } LUAFOUND=no else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS LUA_LIBS=$pkg_cv_LUA_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LUAFOUND=yes fi elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5 $as_echo_n "checking for LUA... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$LUA_CFLAGS"; then pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua5.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua5.1" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$LUA_LIBS"; then pkg_cv_LUA_LIBS="$LUA_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua5.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua5.1" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua5.1"` else LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua5.1"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } LUAFOUND=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } LUAFOUND=no else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS LUA_LIBS=$pkg_cv_LUA_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LUAFOUND=yes fi else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS LUA_LIBS=$pkg_cv_LUA_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LUAFOUND=yes fi if test $pkg_failed != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find support for lua using pkg-config." >&5 $as_echo "$as_me: WARNING: Could not find support for lua using pkg-config." >&2;} with_lua=no fi if test "$with_lua" != no; then TERMLIBS="$TERMLIBS $LUA_LIBS" CPPFLAGS="$CPPFLAGS $LUA_CFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing luaL_openlibs" >&5 $as_echo_n "checking for library containing luaL_openlibs... " >&6; } if ${ac_cv_search_luaL_openlibs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char luaL_openlibs (); int main () { return luaL_openlibs (); ; return 0; } _ACEOF for ac_lib in '' lua lua5.1; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_luaL_openlibs=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_luaL_openlibs+:} false; then : break fi done if ${ac_cv_search_luaL_openlibs+:} false; then : else ac_cv_search_luaL_openlibs=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_luaL_openlibs" >&5 $as_echo "$ac_cv_search_luaL_openlibs" >&6; } ac_res=$ac_cv_search_luaL_openlibs if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" with_lua=yes else with_lua=no fi fi if test "$with_lua" = yes; then $as_echo "#define HAVE_LUA 1" >>confdefs.h for ac_header in lua.h do : ac_fn_c_check_header_mongrel "$LINENO" "lua.h" "ac_cv_header_lua_h" "$ac_includes_default" if test "x$ac_cv_header_lua_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LUA_H 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please add path to lua.h to CPPFLAGS in Makefile" >&5 $as_echo "$as_me: WARNING: please add path to lua.h to CPPFLAGS in Makefile" >&2;} fi done fi fi if test "${with_lua}" = yes; then BUILD_LUA_TRUE= BUILD_LUA_FALSE='#' else BUILD_LUA_TRUE='#' BUILD_LUA_FALSE= fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef SCO yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for v_opnwk in -lccgi" >&5 $as_echo_n "checking for v_opnwk in -lccgi... " >&6; } if ${ac_cv_lib_ccgi_v_opnwk+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lccgi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char v_opnwk (); int main () { return v_opnwk (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ccgi_v_opnwk=yes else ac_cv_lib_ccgi_v_opnwk=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ccgi_v_opnwk" >&5 $as_echo "$ac_cv_lib_ccgi_v_opnwk" >&6; } if test "x$ac_cv_lib_ccgi_v_opnwk" = xyes; then : $as_echo "#define CGI 1" >>confdefs.h TERMLIBS="-lccgi $TERMLIBS" fi fi rm -f conftest* cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef sun yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for window_create in -lsuntool" >&5 $as_echo_n "checking for window_create in -lsuntool... " >&6; } if ${ac_cv_lib_suntool_window_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsuntool -lsunwindow -lpixrect $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char window_create (); int main () { return window_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_suntool_window_create=yes else ac_cv_lib_suntool_window_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_suntool_window_create" >&5 $as_echo "$ac_cv_lib_suntool_window_create" >&6; } if test "x$ac_cv_lib_suntool_window_create" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "suntool/sunview.h" "ac_cv_header_suntool_sunview_h" "$ac_includes_default" if test "x$ac_cv_header_suntool_sunview_h" = xyes; then : $as_echo "#define SUN 1" >>confdefs.h TERMLIBS="-lsuntool -lsunwindow -lpixrect $TERMLIBS" fi fi fi rm -f conftest* # Check whether --with-cwdrc was given. if test "${with_cwdrc+set}" = set; then : withval=$with_cwdrc; fi if test "$with_cwdrc" = yes; then $as_echo "#define USE_CWDRC 1" >>confdefs.h fi # Check whether --with-lisp-files was given. if test "${with_lisp_files+set}" = set; then : withval=$with_lisp_files; fi # Check whether --with-row-help was given. if test "${with_row_help+set}" = set; then : withval=$with_row_help; if test "$with_row_help" = no; then $as_echo "#define COLUMN_HELP 1" >>confdefs.h fi fi TUTORIAL=notutorial # Check whether --with-tutorial was given. if test "${with_tutorial+set}" = set; then : withval=$with_tutorial; fi if test "$with_latex" != no -a "$with_tutorial" = yes ; then TUTORIAL=tutorial fi # Check whether --enable-mouse was given. if test "${enable_mouse+set}" = set; then : enableval=$enable_mouse; else test -z "$enable_mouse" && enable_mouse=yes fi if test "$enable_mouse" = yes; then $as_echo "#define USE_MOUSE 1" >>confdefs.h $as_echo "#define PIPE_IPC 1" >>confdefs.h fi # Check whether --enable-x11-mbfonts was given. if test "${enable_x11_mbfonts+set}" = set; then : enableval=$enable_x11_mbfonts; else test -z "$enable_x11_mbfonts" && enable_x11_mbfonts=yes fi if test "$enable_x11_mbfonts" = yes; then _ldflags="$LDFLAGS" LDFLAGS="$LDFLAGS $LIBRARIES_FOR_X" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multi-byte support in x11" >&5 $as_echo_n "checking for multi-byte support in x11... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmbDrawString in -lX11" >&5 $as_echo_n "checking for XmbDrawString in -lX11... " >&6; } if ${ac_cv_lib_X11_XmbDrawString+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XmbDrawString (); int main () { return XmbDrawString (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_X11_XmbDrawString=yes else ac_cv_lib_X11_XmbDrawString=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XmbDrawString" >&5 $as_echo "$ac_cv_lib_X11_XmbDrawString" >&6; } if test "x$ac_cv_lib_X11_XmbDrawString" = xyes; then : $as_echo "#define USE_X11_MULTIBYTE 1" >>confdefs.h else enable_x11_mbfonts=no fi LDFLAGS="$_ldflags" fi # Check whether --enable-x11_external was given. if test "${enable_x11_external+set}" = set; then : enableval=$enable_x11_external; else test -z "$enable_x11_external" && enable_x11_external=yes fi if test "$enable_x11_external" = yes; then $as_echo "#define EXTERNAL_X11_WINDOW 1" >>confdefs.h fi if test "$with_linux_vga" = yes; then _LIBS="$LIBS" LIBS="$TERMLIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the vgagl library" >&5 $as_echo_n "checking for the vgagl library... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_hline in -lvgagl" >&5 $as_echo_n "checking for gl_hline in -lvgagl... " >&6; } if ${ac_cv_lib_vgagl_gl_hline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lvgagl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gl_hline (); int main () { return gl_hline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_vgagl_gl_hline=yes else ac_cv_lib_vgagl_gl_hline=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vgagl_gl_hline" >&5 $as_echo "$ac_cv_lib_vgagl_gl_hline" >&6; } if test "x$ac_cv_lib_vgagl_gl_hline" = xyes; then : LIBS="-lvgagl $LIBS" for ac_header in vgagl.h do : ac_fn_c_check_header_mongrel "$LINENO" "vgagl.h" "ac_cv_header_vgagl_h" "$ac_includes_default" if test "x$ac_cv_header_vgagl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VGAGL_H 1 _ACEOF $as_echo "#define VGAGL 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_striangle in -l3dkit" >&5 $as_echo_n "checking for gl_striangle in -l3dkit... " >&6; } if ${ac_cv_lib_3dkit_gl_striangle+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l3dkit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gl_striangle (); int main () { return gl_striangle (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_3dkit_gl_striangle=yes else ac_cv_lib_3dkit_gl_striangle=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_3dkit_gl_striangle" >&5 $as_echo "$ac_cv_lib_3dkit_gl_striangle" >&6; } if test "x$ac_cv_lib_3dkit_gl_striangle" = xyes; then : for ac_header in 3dkit.h do : ac_fn_c_check_header_mongrel "$LINENO" "3dkit.h" "ac_cv_header_3dkit_h" "$ac_includes_default" if test "x$ac_cv_header_3dkit_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_3DKIT_H 1 _ACEOF $as_echo "#define THREEDKIT 1" >>confdefs.h $as_echo "#define EXTENDED_COLOR_SPECS 1" >>confdefs.h VGAGLLIB="-l3dkit -lvgagl" with_vgagl=yes else with_vgagl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to find 3dkit.h" >&5 $as_echo "unable to find 3dkit.h" >&6; } fi done else with_vgagl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to find lib3dkit" >&5 $as_echo "unable to find lib3dkit" >&6; } fi else with_vgagl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to find vgagl.h" >&5 $as_echo "unable to find vgagl.h" >&6; } fi done else with_vgagl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to find libvgagl" >&5 $as_echo "unable to find libvgagl" >&6; } fi LIBS="$_LIBS" else with_vgagl=no fi TERMLIBS="$VGAGLLIB $TERMLIBS" # Check whether --enable-thin-splines was given. if test "${enable_thin_splines+set}" = set; then : enableval=$enable_thin_splines; if test "$enableval" = yes; then $as_echo "#define THIN_PLATE_SPLINES_GRID 1" >>confdefs.h fi fi # Check whether --enable-volatile-data was given. if test "${enable_volatile_data+set}" = set; then : enableval=$enable_volatile_data; else test -z "$enable_volatile_data" && enable_volatile_data=yes fi if test "$enable_volatile_data" = yes; then $as_echo "#define VOLATILE_REFRESH 1" >>confdefs.h fi # Check whether --enable-raise-console was given. if test "${enable_raise_console+set}" = set; then : enableval=$enable_raise_console; else test -z "$enable_raise_console" && enable_raise_console=yes fi if test "$enable_raise_console" != yes; then $as_echo "#define DISABLE_SPACE_RAISES_CONSOLE 1" >>confdefs.h fi # Check whether --enable-objects was given. if test "${enable_objects+set}" = set; then : enableval=$enable_objects; else test -z "$enable_objects" && enable_objects=yes fi if test "$enable_objects" = yes; then $as_echo "#define EAM_OBJECTS 1" >>confdefs.h fi # Check whether --enable-macros was given. if test "${enable_macros+set}" = set; then : enableval=$enable_macros; else test -z "$enable_macros" && enable_macros=yes fi if test "$enable_macros" = yes; then $as_echo "#define GP_MACROS 1" >>confdefs.h fi # Check whether --enable-h3d-quadtree was given. if test "${enable_h3d_quadtree+set}" = set; then : enableval=$enable_h3d_quadtree; else test -z "${enable_h3d_quadtree}" && enable_h3d_quadtree=yes fi if test "$enable_h3d_quadtree" = yes; then $as_echo "#define HIDDEN3D_QUADTREE 1" >>confdefs.h fi # Check whether --enable-h3d-gridbox was given. if test "${enable_h3d_gridbox+set}" = set; then : enableval=$enable_h3d_gridbox; if test "$enable_h3d_quadtree" = yes; then as_fn_error $? "Only one of the hidden3d options quadtree and gridbox may be enabled." "$LINENO" 5 fi if test "$enableval" = yes; then $as_echo "#define HIDDEN3D_GRIDBOX 1" >>confdefs.h fi fi $as_echo "#define HIDDEN3D_VAR_PTSIZE 1" >>confdefs.h if test ! -f src/graphics.c ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compiling outside source directory - copying needed files" >&5 $as_echo "Compiling outside source directory - copying needed files" >&6; } mkdir tutorial >/dev/null 2>&1 cp ${srcdir}/tutorial/eg3.dat tutorial fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test "x${cxxerror}" != "xyes"; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <iostream> int main () { const char hw[] = "Hello, World\n"; std::cout << hw; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cxxerror=no ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu else cxxerror=yes CXX=$CC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # Check whether --enable-wxwidgets was given. if test "${enable_wxwidgets+set}" = set; then : enableval=$enable_wxwidgets; else test -z "${enable_wxwidgets}" && enable_wxwidgets=yes fi if test "${enable_wxwidgets}" = yes ; then enable_wxwidgets_ok=yes if test "x${cxxerror}" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No C++ compiler found. The wxWidgets terminal will not be compiled." >&5 $as_echo "$as_me: WARNING: No C++ compiler found. The wxWidgets terminal will not be compiled." >&2;} enable_wxwidgets_ok=no fi WXWIDGETS_PATH="${PATH}" # Check whether --with-wx-config was given. if test "${with_wx_config+set}" = set; then : withval=$with_wx_config; if test "${with_wx_config}" != "no" ; then WXWIDGETS_PATH="${with_wx_config}:${PATH}" fi fi # Extract the first word of "wx-config", so it can be a program name with args. set dummy wx-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_WX_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $WX_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_WX_CONFIG="$WX_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in ${WXWIDGETS_PATH} do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_WX_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_WX_CONFIG" && ac_cv_path_WX_CONFIG="no" ;; esac fi WX_CONFIG=$ac_cv_path_WX_CONFIG if test -n "$WX_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WX_CONFIG" >&5 $as_echo "$WX_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "${WX_CONFIG}" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: wxWidgets can't be found. You can try --with-wx-config-path to give the right path to wx-config. The wxWidgets terminal will not be compiled." >&5 $as_echo "$as_me: WARNING: wxWidgets can't be found. You can try --with-wx-config-path to give the right path to wx-config. The wxWidgets terminal will not be compiled." >&2;} enable_wxwidgets_ok=no else if expr 2.5.3 \> `${WX_CONFIG} --version` >/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your development package for wxWidgets is too old, you need at least version 2.5.3. The wxWidgets terminal will not be compiled." >&5 $as_echo "$as_me: WARNING: Your development package for wxWidgets is too old, you need at least version 2.5.3. The wxWidgets terminal will not be compiled." >&2;} enable_wxwidgets_ok=no fi if expr `${WX_CONFIG} --basename` : '.*base' >/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You only have the 'base' flavor of wxWidgets. A full wxWidgets library is required. On Debian/Ubuntu, please make sure that you have a 'libwx...-dev' package other than just 'libwxbase...-dev' installed. The wxWidgets terminal will not be compiled." >&5 $as_echo "$as_me: WARNING: You only have the 'base' flavor of wxWidgets. A full wxWidgets library is required. On Debian/Ubuntu, please make sure that you have a 'libwx...-dev' package other than just 'libwxbase...-dev' installed. The wxWidgets terminal will not be compiled." >&2;} enable_wxwidgets_ok=no fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIROPANGO" >&5 $as_echo_n "checking for CAIROPANGO... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$CAIROPANGO_CFLAGS"; then pkg_cv_CAIROPANGO_CFLAGS="$CAIROPANGO_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 0.9.0 pango >= 1.10 pangocairo >= 1.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "cairo >= 0.9.0 pango >= 1.10 pangocairo >= 1.10") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CAIROPANGO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 0.9.0 pango >= 1.10 pangocairo >= 1.10" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$CAIROPANGO_LIBS"; then pkg_cv_CAIROPANGO_LIBS="$CAIROPANGO_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 0.9.0 pango >= 1.10 pangocairo >= 1.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "cairo >= 0.9.0 pango >= 1.10 pangocairo >= 1.10") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CAIROPANGO_LIBS=`$PKG_CONFIG --libs "cairo >= 0.9.0 pango >= 1.10 pangocairo >= 1.10" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CAIROPANGO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= 0.9.0 pango >= 1.10 pangocairo >= 1.10"` else CAIROPANGO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 0.9.0 pango >= 1.10 pangocairo >= 1.10"` fi # Put the nasty error message in config.log where it belongs echo "$CAIROPANGO_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Package requirements (cairo >= 0.9.0 pango >= 1.10 pangocairo >= 1.10) were not met: $CAIROPANGO_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables CAIROPANGO_CFLAGS and CAIROPANGO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 $as_echo "$as_me: WARNING: Package requirements (cairo >= 0.9.0 pango >= 1.10 pangocairo >= 1.10) were not met: $CAIROPANGO_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables CAIROPANGO_CFLAGS and CAIROPANGO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables CAIROPANGO_CFLAGS and CAIROPANGO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>." >&5 $as_echo "$as_me: WARNING: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables CAIROPANGO_CFLAGS and CAIROPANGO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>." >&2;} else CAIROPANGO_CFLAGS=$pkg_cv_CAIROPANGO_CFLAGS CAIROPANGO_LIBS=$pkg_cv_CAIROPANGO_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi if test $pkg_failed != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The wxWidgets terminal will not be compiled." >&5 $as_echo "$as_me: WARNING: The wxWidgets terminal will not be compiled." >&2;} enable_wxwidgets_ok=no fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANGO_1_10_2" >&5 $as_echo_n "checking for PANGO_1_10_2... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$PANGO_1_10_2_CFLAGS"; then pkg_cv_PANGO_1_10_2_CFLAGS="$PANGO_1_10_2_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pango = 1.10.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "pango = 1.10.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PANGO_1_10_2_CFLAGS=`$PKG_CONFIG --cflags "pango = 1.10.2" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$PANGO_1_10_2_LIBS"; then pkg_cv_PANGO_1_10_2_LIBS="$PANGO_1_10_2_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pango = 1.10.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "pango = 1.10.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PANGO_1_10_2_LIBS=`$PKG_CONFIG --libs "pango = 1.10.2" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PANGO_1_10_2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pango = 1.10.2"` else PANGO_1_10_2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pango = 1.10.2"` fi # Put the nasty error message in config.log where it belongs echo "$PANGO_1_10_2_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_PANGO_1_10_2=0 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_PANGO_1_10_2=0 else PANGO_1_10_2_CFLAGS=$pkg_cv_PANGO_1_10_2_CFLAGS PANGO_1_10_2_LIBS=$pkg_cv_PANGO_1_10_2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Pango 1.10.2 has been found. This version has a bug which gives unexpected results in the wxWidgets terminal. If you want to use this terminal, please install a different version of Pango." >&5 $as_echo "$as_me: WARNING: Pango 1.10.2 has been found. This version has a bug which gives unexpected results in the wxWidgets terminal. If you want to use this terminal, please install a different version of Pango." >&2;} enable_wxwidgets_ok=no fi fi if test "${enable_wxwidgets_ok}" = yes ; then WX_CXXFLAGS="`$WX_CONFIG --cxxflags | sed 's/-fno-exceptions//'` $CAIROPANGO_CFLAGS" WX_LIBS="`$WX_CONFIG --libs` $CAIROPANGO_LIBS" ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include <sys/wait.h> #ifdef HAVE_VFORK_H # include <vfork.h> #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include <vfork.h>, but some compilers (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5 $as_echo_n "checking for GTK... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GTK_CFLAGS"; then pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GTK_LIBS"; then pkg_cv_GTK_LIBS="$GTK_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0"` else GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_gtk=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_gtk=no else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_gtk=yes fi if test "${have_gtk}" = yes ; then $as_echo "#define HAVE_GTK 1" >>confdefs.h WX_CXXFLAGS="$WX_CXXFLAGS $GTK_CFLAGS" WX_LIBS="$WX_LIBS $GTK_LIBS" fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK28" >&5 $as_echo_n "checking for GTK28... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GTK28_CFLAGS"; then pkg_cv_GTK28_CFLAGS="$GTK28_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.8.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.8.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK28_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.8.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GTK28_LIBS"; then pkg_cv_GTK28_LIBS="$GTK28_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.8.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.8.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK28_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.8.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK28_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.8.0"` else GTK28_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.8.0"` fi # Put the nasty error message in config.log where it belongs echo "$GTK28_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_gtk28=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_gtk28=no else GTK28_CFLAGS=$pkg_cv_GTK28_CFLAGS GTK28_LIBS=$pkg_cv_GTK28_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_gtk28=yes fi if test "${have_gtk28}" = yes ; then $as_echo "#define HAVE_GTK28 1" >>confdefs.h fi CPPFLAGS="$CPPFLAGS $CAIROPANGO_CFLAGS" CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS" $as_echo "#define WXWIDGETS 1" >>confdefs.h fi if test "${enable_wxwidgets_ok}" = yes; then BUILD_WXWIDGETS_TRUE= BUILD_WXWIDGETS_FALSE='#' else BUILD_WXWIDGETS_TRUE='#' BUILD_WXWIDGETS_FALSE= fi # Check whether --with-bitmap_terminals was given. if test "${with_bitmap_terminals+set}" = set; then : withval=$with_bitmap_terminals; fi if test "x${with_bitmap_terminals}" = "xyes"; then : else $as_echo "#define NO_BITMAP_SUPPORT 1" >>confdefs.h fi if test "${with_bitmap_terminals}" = yes; then BUILD_BITMAP_TRUE= BUILD_BITMAP_FALSE='#' else BUILD_BITMAP_TRUE='#' BUILD_BITMAP_FALSE= fi # Check whether --with-cairo was given. if test "${with_cairo+set}" = set; then : withval=$with_cairo; else test -z "${with_cairo}" && with_cairo=yes fi if test "${with_cairo}" = yes ; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIROPDF" >&5 $as_echo_n "checking for CAIROPDF... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$CAIROPDF_CFLAGS"; then pkg_cv_CAIROPDF_CFLAGS="$CAIROPDF_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" cairo >= 1.2 cairo-pdf >= 1.2 pango >= 1.10 pangocairo >= 1.10 glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors " cairo >= 1.2 cairo-pdf >= 1.2 pango >= 1.10 pangocairo >= 1.10 glib-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CAIROPDF_CFLAGS=`$PKG_CONFIG --cflags " cairo >= 1.2 cairo-pdf >= 1.2 pango >= 1.10 pangocairo >= 1.10 glib-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$CAIROPDF_LIBS"; then pkg_cv_CAIROPDF_LIBS="$CAIROPDF_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" cairo >= 1.2 cairo-pdf >= 1.2 pango >= 1.10 pangocairo >= 1.10 glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors " cairo >= 1.2 cairo-pdf >= 1.2 pango >= 1.10 pangocairo >= 1.10 glib-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CAIROPDF_LIBS=`$PKG_CONFIG --libs " cairo >= 1.2 cairo-pdf >= 1.2 pango >= 1.10 pangocairo >= 1.10 glib-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CAIROPDF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " cairo >= 1.2 cairo-pdf >= 1.2 pango >= 1.10 pangocairo >= 1.10 glib-2.0"` else CAIROPDF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " cairo >= 1.2 cairo-pdf >= 1.2 pango >= 1.10 pangocairo >= 1.10 glib-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$CAIROPDF_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Package requirements ( cairo >= 1.2 cairo-pdf >= 1.2 pango >= 1.10 pangocairo >= 1.10 glib-2.0) were not met: $CAIROPDF_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables CAIROPDF_CFLAGS and CAIROPDF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 $as_echo "$as_me: WARNING: Package requirements ( cairo >= 1.2 cairo-pdf >= 1.2 pango >= 1.10 pangocairo >= 1.10 glib-2.0) were not met: $CAIROPDF_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables CAIROPDF_CFLAGS and CAIROPDF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables CAIROPDF_CFLAGS and CAIROPDF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>." >&5 $as_echo "$as_me: WARNING: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables CAIROPDF_CFLAGS and CAIROPDF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>." >&2;} else CAIROPDF_CFLAGS=$pkg_cv_CAIROPDF_CFLAGS CAIROPDF_LIBS=$pkg_cv_CAIROPDF_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi if test $pkg_failed != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The cairo terminals will not be compiled." >&5 $as_echo "$as_me: WARNING: The cairo terminals will not be compiled." >&2;} with_cairo=no else $as_echo "#define HAVE_CAIROPDF 1" >>confdefs.h CPPFLAGS="$CPPFLAGS $CAIROPDF_CFLAGS" LIBS="$LIBS $CAIROPDF_LIBS" with_cairo=yes pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIROEPS" >&5 $as_echo_n "checking for CAIROEPS... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$CAIROEPS_CFLAGS"; then pkg_cv_CAIROEPS_CFLAGS="$CAIROEPS_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.6.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "cairo >= 1.6.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CAIROEPS_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.6.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$CAIROEPS_LIBS"; then pkg_cv_CAIROEPS_LIBS="$CAIROEPS_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.6.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "cairo >= 1.6.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CAIROEPS_LIBS=`$PKG_CONFIG --libs "cairo >= 1.6.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CAIROEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= 1.6.0"` else CAIROEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 1.6.0"` fi # Put the nasty error message in config.log where it belongs echo "$CAIROEPS_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of cairo is too old to support epscairo output" >&5 $as_echo "$as_me: WARNING: Your version of cairo is too old to support epscairo output" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of cairo is too old to support epscairo output" >&5 $as_echo "$as_me: WARNING: Your version of cairo is too old to support epscairo output" >&2;} else CAIROEPS_CFLAGS=$pkg_cv_CAIROEPS_CFLAGS CAIROEPS_LIBS=$pkg_cv_CAIROEPS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_CAIROEPS 1" >>confdefs.h fi fi fi build_gpcairo=no if test "${enable_wxwidgets_ok}" = yes; then build_gpcairo=yes fi if test "${with_cairo}" = yes; then build_gpcairo=yes fi if test "${build_gpcairo}" = yes; then BUILD_GPCAIRO_TRUE= BUILD_GPCAIRO_FALSE='#' else BUILD_GPCAIRO_TRUE='#' BUILD_GPCAIRO_FALSE= fi # Check whether --enable-backwards-compatibility was given. if test "${enable_backwards_compatibility+set}" = set; then : enableval=$enable_backwards_compatibility; if test "$enableval" = yes; then $as_echo "#define BACKWARDS_COMPATIBLE 1" >>confdefs.h fi fi # Check whether --enable-stats was given. if test "${enable_stats+set}" = set; then : enableval=$enable_stats; if test "$enableval" != no; then $as_echo "#define USE_STATS 1" >>confdefs.h fi else $as_echo "#define USE_STATS 1" >>confdefs.h fi # Check whether --enable-qt was given. if test "${enable_qt+set}" = set; then : enableval=$enable_qt; if test "$enableval" = yes; then enable_qt=yes; fi fi if test "${enable_qt}" = yes ; then enable_qt_ok=yes if test "x${cxxerror}" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No C++ compiler found. The Qt terminal will not be compiled." >&5 $as_echo "$as_me: WARNING: No C++ compiler found. The Qt terminal will not be compiled." >&2;} enable_qt_ok=no fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for QT" >&5 $as_echo_n "checking for QT... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$QT_CFLAGS"; then pkg_cv_QT_CFLAGS="$QT_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtCore >= 4.5 QtGui >= 4.5 QtNetwork >= 4.5 QtSvg >= 4.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "QtCore >= 4.5 QtGui >= 4.5 QtNetwork >= 4.5 QtSvg >= 4.5") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_QT_CFLAGS=`$PKG_CONFIG --cflags "QtCore >= 4.5 QtGui >= 4.5 QtNetwork >= 4.5 QtSvg >= 4.5" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$QT_LIBS"; then pkg_cv_QT_LIBS="$QT_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtCore >= 4.5 QtGui >= 4.5 QtNetwork >= 4.5 QtSvg >= 4.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "QtCore >= 4.5 QtGui >= 4.5 QtNetwork >= 4.5 QtSvg >= 4.5") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_QT_LIBS=`$PKG_CONFIG --libs "QtCore >= 4.5 QtGui >= 4.5 QtNetwork >= 4.5 QtSvg >= 4.5" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then QT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "QtCore >= 4.5 QtGui >= 4.5 QtNetwork >= 4.5 QtSvg >= 4.5"` else QT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "QtCore >= 4.5 QtGui >= 4.5 QtNetwork >= 4.5 QtSvg >= 4.5"` fi # Put the nasty error message in config.log where it belongs echo "$QT_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Package requirements (QtCore >= 4.5 QtGui >= 4.5 QtNetwork >= 4.5 QtSvg >= 4.5) were not met: $QT_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables QT_CFLAGS and QT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 $as_echo "$as_me: WARNING: Package requirements (QtCore >= 4.5 QtGui >= 4.5 QtNetwork >= 4.5 QtSvg >= 4.5) were not met: $QT_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables QT_CFLAGS and QT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables QT_CFLAGS and QT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>." >&5 $as_echo "$as_me: WARNING: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables QT_CFLAGS and QT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>." >&2;} else QT_CFLAGS=$pkg_cv_QT_CFLAGS QT_LIBS=$pkg_cv_QT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi if test $pkg_failed != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The Qt terminal will not be compiled." >&5 $as_echo "$as_me: WARNING: The Qt terminal will not be compiled." >&2;} enable_qt_ok=no fi fi if test "${enable_qt_ok}" = yes ; then for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include <sys/wait.h> #ifdef HAVE_VFORK_H # include <vfork.h> #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include <vfork.h>, but some compilers (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi CPPFLAGS="$CPPFLAGS $QT_CFLAGS" CXXFLAGS="$CXXFLAGS $QT_CXXFLAGS" if test "$is_apple" = yes; then LIBS="$LIBS -framework Cocoa" fi QT4LOC=`$PKG_CONFIG --variable=exec_prefix QtCore` MOC=`$PKG_CONFIG --variable=moc_location QtCore` if test x"$MOC" = x; then MOC=moc fi UIC=`$PKG_CONFIG --variable=uic_location QtCore` if test x"$UIC" = x; then UIC=uic fi RCC=`$PKG_CONFIG --variable=rcc_location QtCore` if test x"$RCC" = x ; then if test x"$QT4LOC" != x ; then RCC=$QT4LOC/bin/rcc else RCC=rcc fi fi LRELEASE=`$PKG_CONFIG --variable=lrelease_location QtCore` if test x"$LRELEASE" = x ; then if test x"$QT4LOC" != x ; then LRELEASE=$QT4LOC/bin/lrelease else LRELEASE=lrelease fi fi $as_echo "#define QTTERM 1" >>confdefs.h fi if test "${enable_qt_ok}" = yes; then BUILD_QT_TRUE= BUILD_QT_FALSE='#' else BUILD_QT_TRUE='#' BUILD_QT_FALSE= fi if test "${is_apple}" = yes; then BUILD_ON_APPLE_TRUE= BUILD_ON_APPLE_FALSE='#' else BUILD_ON_APPLE_TRUE='#' BUILD_ON_APPLE_FALSE= fi if test "${LRELEASE}" != no; then HAVE_LRELEASE_TRUE= HAVE_LRELEASE_FALSE='#' else HAVE_LRELEASE_TRUE='#' HAVE_LRELEASE_FALSE= fi if test -n "${DIST_CONTACT}"; then cat >>confdefs.h <<_ACEOF #define DIST_CONTACT "$DIST_CONTACT" _ACEOF fi if test "$with_lisp_files" != no; then subdirs="$subdirs lisp" LISPDIR=lisp else LISPDIR= fi ac_config_files="$ac_config_files Makefile config/Makefile demo/Makefile docs/Makefile m4/Makefile man/Makefile share/Makefile share/LaTeX/Makefile src/Makefile src/beos/Makefile src/wxterminal/Makefile src/qtterminal/Makefile term/Makefile tutorial/Makefile" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepOBJC_TRUE}" && test -z "${am__fastdepOBJC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepOBJC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LATEX_TRUE}" && test -z "${HAVE_LATEX_FALSE}"; then as_fn_error $? "conditional \"HAVE_LATEX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_GNUPLOT_X11_TRUE}" && test -z "${BUILD_GNUPLOT_X11_FALSE}"; then as_fn_error $? "conditional \"BUILD_GNUPLOT_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_SRC_BEOS_SUBDIR_TRUE}" && test -z "${BUILD_SRC_BEOS_SUBDIR_FALSE}"; then as_fn_error $? "conditional \"BUILD_SRC_BEOS_SUBDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LUA_TRUE}" && test -z "${BUILD_LUA_FALSE}"; then as_fn_error $? "conditional \"BUILD_LUA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_WXWIDGETS_TRUE}" && test -z "${BUILD_WXWIDGETS_FALSE}"; then as_fn_error $? "conditional \"BUILD_WXWIDGETS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_BITMAP_TRUE}" && test -z "${BUILD_BITMAP_FALSE}"; then as_fn_error $? "conditional \"BUILD_BITMAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_GPCAIRO_TRUE}" && test -z "${BUILD_GPCAIRO_FALSE}"; then as_fn_error $? "conditional \"BUILD_GPCAIRO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_QT_TRUE}" && test -z "${BUILD_QT_FALSE}"; then as_fn_error $? "conditional \"BUILD_QT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ON_APPLE_TRUE}" && test -z "${BUILD_ON_APPLE_FALSE}"; then as_fn_error $? "conditional \"BUILD_ON_APPLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LRELEASE_TRUE}" && test -z "${HAVE_LRELEASE_FALSE}"; then as_fn_error $? "conditional \"HAVE_LRELEASE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by gnuplot $as_me 4.6.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="`echo $ac_config_files`" config_headers="`echo $ac_config_headers`" config_commands="`echo $ac_config_commands`" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ gnuplot config.status 4.6.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.hin" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;; "demo/Makefile") CONFIG_FILES="$CONFIG_FILES demo/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "share/Makefile") CONFIG_FILES="$CONFIG_FILES share/Makefile" ;; "share/LaTeX/Makefile") CONFIG_FILES="$CONFIG_FILES share/LaTeX/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/beos/Makefile") CONFIG_FILES="$CONFIG_FILES src/beos/Makefile" ;; "src/wxterminal/Makefile") CONFIG_FILES="$CONFIG_FILES src/wxterminal/Makefile" ;; "src/qtterminal/Makefile") CONFIG_FILES="$CONFIG_FILES src/qtterminal/Makefile" ;; "term/Makefile") CONFIG_FILES="$CONFIG_FILES term/Makefile" ;; "tutorial/Makefile") CONFIG_FILES="$CONFIG_FILES tutorial/Makefile" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' <conf$$subs.awk | sed ' /^[^""]/{ N s/\n// } ' >>$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' <confdefs.h | sed ' s/'"$ac_delim"'/"\\\ "/g' >>$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "default":C) test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file, --srcdir, and --disable-option-checking arguments # so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" shift for ac_arg do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | --c=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; --disable-option-checking) ;; *) case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_sub_configure_args " '$ac_arg'" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" # Pass --silent if test "$silent" = yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi # Always prepend --disable-option-checking to silence warnings, since # different subdirs can have different --enable and --with options. ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 $as_echo "$ac_msg" >&6 as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" # Check for guested configure; otherwise get Cygnus style configure. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure elif test -f "$ac_srcdir/configure.in"; then # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative name. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 fi cd "$ac_popdir" done fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** Configuration summary for $PACKAGE $VERSION:" >&5 $as_echo "** Configuration summary for $PACKAGE $VERSION:" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: gnuplot will be compiled with the following terminals:" >&5 $as_echo "gnuplot will be compiled with the following terminals:" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: Standalone terminals: yes (always builtin)" >&5 $as_echo " Standalone terminals: yes (always builtin)" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: canvas, cgm, context, corel, dumb, dxf, eepic, emf, emtex," >&5 $as_echo " canvas, cgm, context, corel, dumb, dxf, eepic, emf, emtex," >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: epslatex, fig, gpic, hp2623a, hp2648, hpgl, imagen," >&5 $as_echo " epslatex, fig, gpic, hp2623a, hp2648, hpgl, imagen," >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: latex, metafont, metapost, mif, pcl5, postscript, pslatex," >&5 $as_echo " latex, metafont, metapost, mif, pcl5, postscript, pslatex," >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: pstex, pstricks, qms, regis, svg," >&5 $as_echo " pstex, pstricks, qms, regis, svg," >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: tek40xx, tek410x, texdraw, tgif, tkcanvas, tpic, vttek" >&5 $as_echo " tek40xx, tek410x, texdraw, tgif, tkcanvas, tpic, vttek" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } if test "$with_bitmap_terminals" == yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: dot-matrix terminals: yes ( --without-bitmap-terminals to disable)" >&5 $as_echo " dot-matrix terminals: yes ( --without-bitmap-terminals to disable)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: dot-matrix terminals: no" >&5 $as_echo " dot-matrix terminals: no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: NB: copyright may restrict commercial use" >&5 $as_echo " NB: copyright may restrict commercial use" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: epson, nec, okidata, tandy, and seiko dp414 printers" >&5 $as_echo " epson, nec, okidata, tandy, and seiko dp414 printers" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: hp500c, hpdj, hpljii, hppj, pbm, starc" >&5 $as_echo " hp500c, hpdj, hpljii, hppj, pbm, starc" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } if test "$no_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: X Window System terminal: yes" >&5 $as_echo " X Window System terminal: yes" >&6; } if test "$enable_x11_mbfonts" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (with multi-byte fonts)" >&5 $as_echo " (with multi-byte fonts)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (without multi-byte fonts, requires support in libX11)" >&5 $as_echo " (without multi-byte fonts, requires support in libX11)" >&6; } fi if test "$enable_x11_external" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (enable plotting to windows opened by external apps) " >&5 $as_echo " (enable plotting to windows opened by external apps) " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disable plotting to windows opened by external apps) " >&5 $as_echo " (disable plotting to windows opened by external apps) " >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: (with application defaults, in $X11_APPDEFAULTS_DIR)" >&5 $as_echo " (with application defaults, in $X11_APPDEFAULTS_DIR)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: X Window System terminal: no (requires X libraries)" >&5 $as_echo " X Window System terminal: no (requires X libraries)" >&6; } fi if test "$ac_cv_lib_gd_gdImageJpeg" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: jpeg terminal: yes" >&5 $as_echo " jpeg terminal: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: jpeg terminal: no (requires libgd with jpeg support)" >&5 $as_echo " jpeg terminal: no (requires libgd with jpeg support)" >&6; } fi if test "$ac_cv_lib_gd_gdImageGif" = yes; then if test "$ac_cv_lib_gd_gdImageGifAnimBegin" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: gif terminal: yes (with animated gif)" >&5 $as_echo " gif terminal: yes (with animated gif)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: gif terminal: yes (without animated gif, requires libgd support)" >&5 $as_echo " gif terminal: yes (without animated gif, requires libgd support)" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: gif terminal: no (requires libgd with gif support)" >&5 $as_echo " gif terminal: no (requires libgd with gif support)" >&6; } fi if test "$ac_cv_lib_gd_gdImagePng" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: png terminal: yes" >&5 $as_echo " png terminal: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: png terminal: no (requires libgd with png support)" >&5 $as_echo " png terminal: no (requires libgd with png support)" >&6; } fi if test "$have_ttf" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (jpeg, gif and png terminals can use TTF fonts)" >&5 $as_echo " (jpeg, gif and png terminals can use TTF fonts)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (jpeg, gif and png terminals cannot use TTF fonts, requires libgd support)" >&5 $as_echo " (jpeg, gif and png terminals cannot use TTF fonts, requires libgd support)" >&6; } fi if test "$ac_cv_header_pdflib_h" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: pdf terminal: yes" >&5 $as_echo " pdf terminal: yes" >&6; } if test "$ac_cv_lib_pdf_PDF_begin_pattern" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (pattern fills not supported, libpdf too old)" >&5 $as_echo " (pattern fills not supported, libpdf too old)" >&6; } fi if test "$ac_cv_lib_pdf_PDF_setdashpattern" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (dash patterns not supported, libpdf too old)" >&5 $as_echo " (dash patterns not supported, libpdf too old)" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: pdf terminal: no (requires libpdf)" >&5 $as_echo " pdf terminal: no (requires libpdf)" >&6; } fi if test "$with_linux_vga" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux terminal (vga console): yes" >&5 $as_echo " linux terminal (vga console): yes" >&6; } if test "$with_vgagl" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: vgagl terminal ((s)vga console): yes" >&5 $as_echo " vgagl terminal ((s)vga console): yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: vgagl terminal ((s)vga console): no (requires vgagl)" >&5 $as_echo " vgagl terminal ((s)vga console): no (requires vgagl)" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: SECURITY NOTICE: SVGAlib requires that gnuplot is installed suid root!" >&5 $as_echo " SECURITY NOTICE: SVGAlib requires that gnuplot is installed suid root!" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux terminal (vga console): no (use --with-linux-vga to enable," >&5 $as_echo " linux terminal (vga console): no (use --with-linux-vga to enable," >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: requires SVGAlib)" >&5 $as_echo " requires SVGAlib)" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: vgagl terminal ((s)vga console): no (use --with-linux-vga to enable," >&5 $as_echo " vgagl terminal ((s)vga console): no (use --with-linux-vga to enable," >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: requires SVGAlib with vgagl)" >&5 $as_echo " requires SVGAlib with vgagl)" >&6; } fi if test "$GGI_SUPPORT" = yes; then if test "$ac_cv_header_ggi_xmi_h" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ggi terminal: yes (EXPERIMENTAL) (with pm3d support)" >&5 $as_echo " ggi terminal: yes (EXPERIMENTAL) (with pm3d support)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ggi terminal: yes (EXPERIMENTAL) (without pm3d support, requires libxmi)" >&5 $as_echo " ggi terminal: yes (EXPERIMENTAL) (without pm3d support, requires libxmi)" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ggi terminal: no (use --with-ggi to enable, requires libggi)" >&5 $as_echo " ggi terminal: no (use --with-ggi to enable, requires libggi)" >&6; } fi if test "$is_msdos" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: svga terminal (MSDOS/djgpp): yes" >&5 $as_echo " svga terminal (MSDOS/djgpp): yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: svga terminal (MSDOS/djgpp): no" >&5 $as_echo " svga terminal (MSDOS/djgpp): no" >&6; } fi if test "$build_src_beos_subdir" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: be terminal (BeOS): yes" >&5 $as_echo " be terminal (BeOS): yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: be terminal (BeOS): no" >&5 $as_echo " be terminal (BeOS): no" >&6; } fi if test "$is_next" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: next terminal: yes" >&5 $as_echo " next terminal: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: next terminal: no" >&5 $as_echo " next terminal: no" >&6; } fi if test "$ac_cv_lib_aquaterm_aqtInit" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: aqua terminal: yes" >&5 $as_echo " aqua terminal: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: aqua terminal: no" >&5 $as_echo " aqua terminal: no" >&6; } fi if test "$enable_wxwidgets_ok" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: wxt terminal: yes " >&5 $as_echo " wxt terminal: yes " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: wxt terminal: no (requires C++, wxWidgets>2.6, cairo>0.9, pango>1.10)" >&5 $as_echo " wxt terminal: no (requires C++, wxWidgets>2.6, cairo>0.9, pango>1.10)" >&6; } fi if test "$with_cairo" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: cairo-based pdf and png terminals: yes " >&5 $as_echo " cairo-based pdf and png terminals: yes " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: cairo-based terminals: no (requires cairo>1.2, pango>1.10)" >&5 $as_echo " cairo-based terminals: no (requires cairo>1.2, pango>1.10)" >&6; } fi if test "$with_lua" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: lua/TikZ terminal: yes " >&5 $as_echo " lua/TikZ terminal: yes " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: lua/TikZ terminal: no " >&5 $as_echo " lua/TikZ terminal: no " >&6; } fi if test "$enable_qt_ok" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Qt terminal: yes " >&5 $as_echo " Qt terminal: yes " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Qt terminal: no (requires C++, Qt >= 4.5)" >&5 $as_echo " Qt terminal: no (requires C++, Qt >= 4.5)" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: Additional terminals are availaible in platform-specific makefiles:" >&5 $as_echo " Additional terminals are availaible in platform-specific makefiles:" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: cgi (makefile.unx), pm (makefile.os2)," >&5 $as_echo " cgi (makefile.unx), pm (makefile.os2)," >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: sun (makefile.unx), unixpc (makefile.unx), windows (various Windows" >&5 $as_echo " sun (makefile.unx), unixpc (makefile.unx), windows (various Windows" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: makefiles)" >&5 $as_echo " makefiles)" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: gnuplot will be compiled with the following features:" >&5 $as_echo "gnuplot will be compiled with the following features:" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } if test "$enable_mouse" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Mouse support in interactive terminals: yes" >&5 $as_echo " Mouse support in interactive terminals: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Mouse support in interactive terminals: no" >&5 $as_echo " Mouse support in interactive terminals: no" >&6; } fi if test "$enable_volatile_data" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Zooming or refresh of volatile data: yes " >&5 $as_echo " Zooming or refresh of volatile data: yes " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Zooming or refresh of volatile data: no" >&5 $as_echo " Zooming or refresh of volatile data: no" >&6; } fi if test "$enable_raise_console" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Typing <space> in plot window raises console" >&5 $as_echo " Typing <space> in plot window raises console" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Treat <space> in plot window like any other key: yes" >&5 $as_echo " Treat <space> in plot window like any other key: yes" >&6; } fi if test "$enable_macros" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Command line macros: yes " >&5 $as_echo " Command line macros: yes " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Command line macros: no " >&5 $as_echo " Command line macros: no " >&6; } fi if test "$enable_objects" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Placement of rectangles and other objects: yes " >&5 $as_echo " Placement of rectangles and other objects: yes " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Placement of rectangles and other objects: no" >&5 $as_echo " Placement of rectangles and other objects: no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: gnuplot will be compiled with the following options:" >&5 $as_echo "gnuplot will be compiled with the following options:" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } if test "$with_readline" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: No readline support (use --with-readline=gnu or --with-readline=builtin)" >&5 $as_echo " No readline support (use --with-readline=gnu or --with-readline=builtin)" >&6; } fi if test "$with_readline" = bsd; then if test -n "$gp_tcap"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Readline library: BSD editline with $gp_tcap" >&5 $as_echo " Readline library: BSD editline with $gp_tcap" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Readline library: BSD editline library" >&5 $as_echo " Readline library: BSD editline library" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: editline cannot handle multi-byte characters!" >&5 $as_echo " WARNING: editline cannot handle multi-byte characters!" >&6; } else if test "$with_readline" != builtin; then if test -n "$gp_tcap"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Readline library: GNU readline library with $gp_tcap" >&5 $as_echo " Readline library: GNU readline library with $gp_tcap" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Readline library: GNU readline library" >&5 $as_echo " Readline library: GNU readline library" >&6; } fi if test "$ac_cv_lib_readline_rl_forced_update_display" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: missing some features (OSX version?)" >&5 $as_echo " missing some features (OSX version?)" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Readline library: builtin minimal (use --with-readline=gnu for GNU readline)" >&5 $as_echo " Readline library: builtin minimal (use --with-readline=gnu for GNU readline)" >&6; } fi fi if test "$enable_history_file" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Command-line history file: yes" >&5 $as_echo " Command-line history file: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Command-line history file: no" >&5 $as_echo " Command-line history file: no" >&6; } fi if test "$with_cwdrc" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Check current directory for .gnuplot file: yes (warning: security risk)" >&5 $as_echo " Check current directory for .gnuplot file: yes (warning: security risk)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Check current directory for .gnuplot file: no (use --with-cwdrc to enable)" >&5 $as_echo " Check current directory for .gnuplot file: no (use --with-cwdrc to enable)" >&6; } fi if test "$with_row_help" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Sort help/subtopic tables by column: yes" >&5 $as_echo " Sort help/subtopic tables by column: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Sort help/subtopic tables by column: no (use --without-row-help to enable)" >&5 $as_echo " Sort help/subtopic tables by column: no (use --without-row-help to enable)" >&6; } fi if test "$with_kpsexpand" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Use TeX kpsexpand to search for fonts: yes" >&5 $as_echo " Use TeX kpsexpand to search for fonts: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Use TeX kpsexpand to search for fonts: no (use --with-kpsexpand to enable)" >&5 $as_echo " Use TeX kpsexpand to search for fonts: no (use --with-kpsexpand to enable)" >&6; } fi if test "$enable_thin_splines" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Thin plate splines: yes" >&5 $as_echo " Thin plate splines: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Thin plate splines: no (use --enable-thin-splines to enable)" >&5 $as_echo " Thin plate splines: no (use --enable-thin-splines to enable)" >&6; } fi if test "$enable_h3d_gridbox" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Hidden3d optimization: gridbox" >&5 $as_echo " Hidden3d optimization: gridbox" >&6; } else if test "$enable_h3d_quadtree" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Hidden3d optimization: none" >&5 $as_echo " Hidden3d optimization: none" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Hidden3d optimization: quadtree" >&5 $as_echo " Hidden3d optimization: quadtree" >&6; } fi fi if test "$enable_backwards_compatibility" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Deprecated syntax and terminal options: yes" >&5 $as_echo " Deprecated syntax and terminal options: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Deprecated syntax and terminal options: no (use --enable-backwards-compatibility)" >&5 $as_echo " Deprecated syntax and terminal options: no (use --enable-backwards-compatibility)" >&6; } fi if test "$enable_stats" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Generate statistical summary of data: yes" >&5 $as_echo " Generate statistical summary of data: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Generate statistical summary of data: no (use --enable-stats to enable)" >&5 $as_echo " Generate statistical summary of data: no (use --enable-stats to enable)" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: gnuplot will install the following additional materials:" >&5 $as_echo "gnuplot will install the following additional materials:" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } if test "$with_lasergnu" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: lasergnu printer script: yes (Deprecated)" >&5 $as_echo " lasergnu printer script: yes (Deprecated)" >&6; } fi if test "$with_lisp_files" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: gnuplot-mode for X/Emacs: yes" >&5 $as_echo " gnuplot-mode for X/Emacs: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: gnuplot-mode for X/Emacs: no" >&5 $as_echo " gnuplot-mode for X/Emacs: no" >&6; } fi if test "$TUTORIAL" = tutorial; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: LaTeX tutorial: yes" >&5 $as_echo " LaTeX tutorial: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: LaTeX tutorial: no" >&5 $as_echo " LaTeX tutorial: no" >&6; } fi if test "$with_latex" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: cfg file for epslatex terminal: yes" >&5 $as_echo " cfg file for epslatex terminal: yes" >&6; } if test "$with_lua" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: TeX *.sty for lua/tikz terminal: yes" >&5 $as_echo " TeX *.sty for lua/tikz terminal: yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: TeX *.sty for lua/tikz terminal: no" >&5 $as_echo " TeX *.sty for lua/tikz terminal: no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: TeX files will be installed in $TEXDIR" >&5 $as_echo " TeX files will be installed in $TEXDIR" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: (use --with-texdir=DIR to change)" >&5 $as_echo " (use --with-texdir=DIR to change)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: cfg file for epslatex terminal: no" >&5 $as_echo " cfg file for epslatex terminal: no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: TeX *.sty for lua/tikz terminal: no" >&5 $as_echo " TeX *.sty for lua/tikz terminal: no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: Help file: yes (always), in $GIHDIR/gnuplot.gih" >&5 $as_echo " Help file: yes (always), in $GIHDIR/gnuplot.gih" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: PostScript prologue files: yes (always)" >&5 $as_echo " PostScript prologue files: yes (always)" >&6; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/aclocal.m4����������������������������������������������������������������������������0000644�0004711�0000144�00000116512�12223337632�012002� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# generated automatically by aclocal 1.13.1 -*- Autoconf -*- # Copyright (C) 1996-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.13.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.13.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PATH_LISPDIR # --------------- AC_DEFUN([AM_PATH_LISPDIR], [AC_PREREQ([2.60])dnl # If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test x"$EMACS" = xt && EMACS= AC_CHECK_PROGS([EMACS], [emacs xemacs], [no]) AC_ARG_VAR([EMACS], [the Emacs editor command]) AC_ARG_VAR([EMACSLOADPATH], [the Emacs library search path]) AC_ARG_WITH([lispdir], [AS_HELP_STRING([--with-lispdir], [override the default lisp directory])], [ lispdir="$withval" AC_MSG_CHECKING([where .elc files should go]) AC_MSG_RESULT([$lispdir])], [ AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [ if test $EMACS != "no"; then if test x${lispdir+set} != xset; then # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly # Some emacsen will start up in interactive mode, requiring C-x C-c to exit, # which is non-obvious for non-emacs users. # Redirecting /dev/null should help a bit; pity we can't detect "broken" # emacsen earlier and avoid running this altogether. AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out]) am_cv_lispdir=`sed -n \ -e 's,/$,,' \ -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ -e '/.*\/share\/x*emacs\/site-lisp$/{s,.*/share/\(x*emacs/site-lisp\),${datarootdir}/\1,;p;q;}' \ conftest.out` rm conftest.out fi fi test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' ]) lispdir="$am_cv_lispdir" ]) AC_SUBST([lispdir]) ])# AM_PATH_LISPDIR # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of '-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar <conftest.tar]) grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/alpha.m4]) m4_include([m4/apple.m4]) m4_include([m4/beos.m4]) m4_include([m4/msdos.m4]) m4_include([m4/next.m4]) m4_include([m4/pkg.m4]) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/mkinstalldirs�������������������������������������������������������������������������0000755�0004711�0000144�00000006622�10307602606�012745� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2005-06-29.22 # Original author: Noah Friedman <friedman@prep.ai.mit.edu> # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to <bug-automake@gnu.org>." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: ��������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/man/����������������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�010670� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/man/gnuplot.1�������������������������������������������������������������������������0000644�0004711�0000144�00000012011�12223111262�012441� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" dummy line .TH GNUPLOT 1 " 2 October 2013" .UC 4 .SH NAME gnuplot \- an interactive plotting program .SH SYNOPSIS .B gnuplot [X11 options] [options] [file ...] .br .SH DESCRIPTION .B Gnuplot is a command-driven interactive plotting program. .PP If file names are given on the command line, gnuplot loads each file with the .B load command, in the order specified, and exits after the last file is processed. If no files are given, \fBgnuplot\fP prompts for interactive commands. .PP Here are some of its features: .PP Plots any number of functions, built up of C operators, C math library functions, and some things C doesn't have like **, sgn(), etc. .PP User-defined constants and functions. .PP All computations performed in the complex domain. Just the real part is plotted by default, but functions like imag() and abs() and arg() are available to override this. .PP Many presentation styles for plotting user data from files, including surface-fitting, error bars, boxplots, histograms, heat maps, and simple manipulation of image data. There is an on-line demo collection at .br .I http://gnuplot.info/demo .PP Nonlinear least-squares fitting. .PP 2D and 3D plots with mouse-controlled zoom and rotation. .PP Shell escapes and command line substitution. .PP Load and save capability. .PP Support for a huge variety of output devices and file formats. .SH OPTIONS .PP \fB\-p, \-\-persist\fP lets plot windows survive after main gnuplot program exits. .PP \fB\-d, \-\-default\fP settings. Do not read from gnuplotrc or ~/.gnuplot on entry. .PP \fB\-e "command list"\fP executes the requested commands before loading the next input file. .PP \fB\-h, \-\-help\fP print summary of usage .PP \fB\-V\fP show current version .SH X11 OPTIONS .B Gnuplot provides the \fIx11\fP terminal type for use with X servers. This terminal type is set automatically at startup if the \fBGNUTERM\fR environment variable is set to x11, or if the \fB\-display\fR command line option is used. For terminal type x11, \fIgnuplot\fP accepts the standard X Toolkit options and resources such as geometry, font, and background. See the X(1) man page for a description of common options. For additional X options specific to gnuplot, type \fIhelp x11\fP on the gnuplot command line. .SH ENVIRONMENT A number of shell environment variables are understood by gnuplot. None of these are required. .TP .B GNUTERM The name of the terminal type to be used by default. This can be overridden by the gnuplotrc or .gnuplot start-up files and, of course, by later explicit "set terminal" commands. .TP .B GNUHELP The pathname of the HELP file (gnuplot.gih). .TP .B HOME The name of a directory to search for a .gnuplot file. .TP .B PAGER An output filter for help messages. .TP .B SHELL The program used for the "shell" command. .TP .B FIT_SCRIPT Specifies a gnuplot command to be executed when a fit is interrupted---see "help fit". .TP .B FIT_LOG The name of the logfile maintained by fit. .TP .B GNUPLOT_LIB Additional search directories for data and command files. The variable may contain a single directory name, or a list of directories separated by ':'. The contents of GNUPLOT_LIB are appended to the "loadpath" variable, but not saved with the "save" and "save set" commands. .TP .B GDFONTPATH Several gnuplot terminal drivers access TrueType fonts via the gd library. This variable gives the font search path for these drivers. .TP .B GNUPLOT_DEFAULT_GDFONT The default font for the terminal drivers that access TrueType fonts via the gd library. .TP .B GNUPLOT_FONTPATH The font search path used by the postscript terminal. The format is the same as for GNUPLOT_LIB. The contents of GNUPLOT_FONTPATH are appended to the "fontpath" variable, but not saved with the "save" and "save set" commands. .TP .B GNUPLOT_PS_DIR Used by the postscript driver to locate external prologue files. Depending on the build process, gnuplot contains either a builtin copy of those files or simply a default hardcoded path. Use this variable to test the postscript terminal with custom prologue files. See "help postscript prologue". .SH FILES .TP .I gnuplotrc When gnuplot is run, it first looks for a system-wide initialization file named gnuplotrc. The standard location of this file expected by the program is reported by the "show loadpath" command. .TP .I .gnuplot After loading the system-wide initialization file, if any, Gnuplot looks for a private initialization file in the HOME directory. It may contain any legal gnuplot commands, but typically they are limited to setting the preferred terminal and line types and defining frequently-used functions or variables. .TP .I fit.log The default name of the logfile output by the "fit" command. .SH AUTHORS Original authors: Thomas Williams and Colin Kelley. Starting with gnuplot version 3.8, the project source is cooperatively maintained on SourceForge by a large number of contributors. .SH BUGS Please report bugs using the project bug tracker on SourceForge. .SH SEE ALSO See the printed manual or the on-line help for details on specific commands. Project web site at http://gnuplot.info �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/man/Makefile.in�����������������������������������������������������������������������0000644�0004711�0000144�00000035536�12223337636�012774� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = man DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alpha.m4 \ $(top_srcdir)/m4/apple.m4 $(top_srcdir)/m4/beos.m4 \ $(top_srcdir)/m4/msdos.m4 $(top_srcdir)/m4/next.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROEPS_CFLAGS = @CAIROEPS_CFLAGS@ CAIROEPS_LIBS = @CAIROEPS_LIBS@ CAIROPANGO_CFLAGS = @CAIROPANGO_CFLAGS@ CAIROPANGO_LIBS = @CAIROPANGO_LIBS@ CAIROPDF_CFLAGS = @CAIROPDF_CFLAGS@ CAIROPDF_LIBS = @CAIROPDF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIST_CONTACT = @DIST_CONTACT@ DVIPS = @DVIPS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ GDLIB_CONFIG = @GDLIB_CONFIG@ GIHDIR = @GIHDIR@ GREP = @GREP@ GTK28_CFLAGS = @GTK28_CFLAGS@ GTK28_LIBS = @GTK28_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEXPAND = @KPSEXPAND@ LASERGNU = @LASERGNU@ LATEX = @LATEX@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARIES_FOR_X = @LIBRARIES_FOR_X@ LIBS = @LIBS@ LINUXSUID = @LINUXSUID@ LISPDIR = @LISPDIR@ LN_S = @LN_S@ LRELEASE = @LRELEASE@ LTLIBOBJS = @LTLIBOBJS@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGO_1_10_2_CFLAGS = @PANGO_1_10_2_CFLAGS@ PANGO_1_10_2_LIBS = @PANGO_1_10_2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PDFLIB_CONFIG = @PDFLIB_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ PLAINTEX = @PLAINTEX@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RCC = @RCC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMLIBS = @TERMLIBS@ TERMXLIBS = @TERMXLIBS@ TEXDIR = @TEXDIR@ TEXHASH = @TEXHASH@ TROFF = @TROFF@ TUTORIAL = @TUTORIAL@ UIC = @UIC@ VERSION = @VERSION@ VERSION_MAJOR = @VERSION_MAJOR@ WX_CONFIG = @WX_CONFIG@ WX_LIBS = @WX_LIBS@ X11_APPDEFAULTS_DIR = @X11_APPDEFAULTS_DIR@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_OBJC = @ac_ct_OBJC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign man_MANS = gnuplot.1 EXTRA_DIST = $(man_MANS) lasergnu.1 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-data-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-hook install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-local uninstall-man uninstall-man1 # Only install the man page if enabled by configure --with-lasergnu install-data-hook: @LASERGNU@ uninstall-local: @$(NORMAL_UNINSTALL) rm -f $(DESTDIR)$(man1dir)/lasergnu.1 lasergnu-install: $(INSTALL_DATA) $(srcdir)/lasergnu.1 $(DESTDIR)$(man1dir) lasergnu-noinstall: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/man/lasergnu.1������������������������������������������������������������������������0000644�0004711�0000144�00000003072�06677233701�012623� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.TH LASERGNU l .SH NAME lasergnu \- send gnuplot output to a printer .SH SYNOPSIS .B lasergnu [ flags ] plot-command... .SH DESCRIPTION .I lasergnu runs .IR gnuplot (1) in an environment to produce typeset output on an IMAGEN or Postscript printer. .PP The .B gnuplot commands .B plot-command are performed and the output sent to the printer. If the .B -f option specifies a file for input, the plot command is optional. The command-line plot commands are executed prior to any in the file(s). .PP For example, to plot the function .I sin(x) from -1 to +1, and to use printer im1, use the command .br .nf lasergnu -Pim1 'plot [-1:1] sin(x) with lines' .fi To execute the gnuplot command file .I myplot, on the postscript printer lw0, use the command .br .nf lasergnu -Plw0 -p -f myplot .fi The following switches are recognized: .TP .BI \-p Use the postscript language to make the plot, instead of Impress. This is for use on Postscript printers only. This uses a double-size plot in landscape mode as the default. .TP .BI \-P\0 printer The output of this program is intended for .I printer. \ If the file is being spooled, this determines the printer it is spooled to (default: $LASER). Be sure to use the -p flag if the printer is a postscript printer. .TP .BI \-f\0 file Take gnuplot commands from the named file. Multiple files may be supplied with separate -f options. .TP .BI \-t\0 title Specify the title of the plot. .TP .BI \-b Do not print a banner page. .TP .BI \-J Do not print a banner page. .TP .B \-help Prints a list of options. .SH SEE ALSO gnuplot(l), lpr(1) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/man/Makefile.am�����������������������������������������������������������������������0000644�0004711�0000144�00000000665�11752300767�012757� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign man_MANS = gnuplot.1 EXTRA_DIST = $(man_MANS) lasergnu.1 # Only install the man page if enabled by configure --with-lasergnu install-data-hook: @LASERGNU@ uninstall-local: @$(NORMAL_UNINSTALL) rm -f $(DESTDIR)$(man1dir)/lasergnu.1 lasergnu-install: $(INSTALL_DATA) $(srcdir)/lasergnu.1 $(DESTDIR)$(man1dir) lasergnu-noinstall: ���������������������������������������������������������������������������gnuplot-4.6.4/GNUmakefile���������������������������������������������������������������������������0000644�0004711�0000144�00000002364�07120475565�012223� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Having a separate GNUmakefile lets me `include' the dynamically # generated rules created via Makefile.maint as well as Makefile.maint itself. # This makefile is used only if you run GNU Make. # It is necessary if you want to build targets usually of interest # only to the maintainer. # Systems where /bin/sh is not the default shell need this. The $(shell) # command below won't work with e.g. stock DOS/Windows shells. SHELL = /bin/sh have-Makefile := $(shell test -f Makefile && echo yes) # If the user runs GNU make but has not yet run ./configure, # give them a diagnostic. ifeq ($(have-Makefile),yes) include Makefile include $(srcdir)/Makefile.maint else all: @echo There seems to be no Makefile in this directory. @echo "You must run ./configure before running \`make'." @exit 1 endif pre-dist: @cd docs && make gnuplot.texi @cd config && rm -f Makefile.am && make -f Makefile.am.in Makefile.am @cd demo && rm -f Makefile.am && make -f Makefile.am.in Makefile.am @cd m4 && rm -f Makefile.am && make -f Makefile.am.in Makefile.am @cd src && rm -f makefile.all && make -f Makefile.maint makefile.all @cd term && rm -f Makefile.am && make -f Makefile.am.in Makefile.am @cd tutorial && rm -f Makefile.am && make -f Makefile.am.in Makefile.am ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/CodeStyle�����������������������������������������������������������������������������0000644�0004711�0000144�00000023422�11752300767�011762� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������$Id: CodeStyle,v 1.9.8.1 2012/05/08 20:28:19 sfeam Exp $ The following things have be observed when writing new code for gnuplot: (this file is currently under construction) Some of the following is just personal bug-bears, so dont take any offense if something I moan about is something you think is good style... These rules were originally written up by David Denholm, and I keep updating them as I go along. -Lars MISSING FUNCTIONS, AND FUNCTIONS TO BE AVOIDED ---------------------------------------------- The following functions may not be used, since they are not present on all systems (though the substitute functions might be defined to exactly these functions) function use instead bcopy memcpy bzero memset index strchr rindex strrchr strncasecmp strnicmp The number of macros for conditional compilation is getting a little extreme! I (personally) think it's better to make the conditionally-compiled code 'feature-based' rather than 'compiler-based'. I think this is particularly true for the many DOS compilers. The sort of thing I am thinking of is, for example, whether to disable hidden3d stuff, or whether to store data points as float rather than double to save space. Rather than having a long list of compilers or OS's which use one or the other, add macros such as SMALLMEMORY or NOHIDDENSTUFF and define these in the makefiles. Perhaps a sensible guideline for choice of such macros is to arrange things so that the smallest number of ports are affected. For example, if we only compiled the hidden stuff if HIDDENSTUFF was defined, most makefiles would have to be updated. But if instead it is being disabled for a few machines, only those makefiles have to explicitly define NOHIDDENSTUFF. Perhaps a good guideline would be that gnuplot should build cleanly with most available features if no macros are defined on an ANSI C compiler on a 'typical' (POSIX, say) unix machine. For example, I myself have broken this rule by requiring the macro HAVE_LOCALE in order to support setlocale() - this feature is available with ANSI compilers, and so setlocale() calls should be enabled by default, and disabled only if NO_LOCALE is defined at compile time. Does this sound reasonable? For example, there was some code in fit.c that would prefer to use tempnam() if it is available, but falls back to ANSI fn tmpnam() if necessary. The way it was done, tempnam() was the default, and there was a list of those systems that had to use tmpnam(). But the trouble was that a new one had to be added to the list every few weeks as new machines were discovered. The current scheme is that tmpnam() is used unless feature HAVE_TEMPNAM is enabled. On a related note... if one particular machine does doesn't provide a standard-ish function, but the same functionality can be acheived, it would be preferable to implement the standardish function in a os-specific source file, so that the core code can simply invoke the function without any conditionals, and the OS-specific files provide the missing functions. For example, in fit.c (at the time of writing) where a temporary file is needed, there is some inline code for DOS, OS2, AMIGA, etc to create temporary files, otherwise tempnam() is used. I think I'd rather have tempnam() implemented as a function in dos.c for example, then the fit code would not need to have any conditional code other than HAVE_TEMPNAM Also, think generic where possible... I once noticed that popen() had been implemented for atari or similar using temporary files and system() call. It seems to me that this could easily be done as a generic solution, so that DOS ports, for example, could also benefit. FUNCTION PROTOTYPES ------------------- Function prototypes are mandatory, even for local functions that are declared before use. This is necessary for a clean compile on some machines. gcc -Wstrict-prototypes is recommended. However, to make the code compilable on pre-ANSI style compilers, prototypes have to be enclosed in a special macro, e.g. int strcmp __PROTO((char *s, char *t)); /* note the double ()'s */ Probably from gnuplot release 3.7.1 on, I will require that all function declarations and definitions are in ANSI style. I see absolutely no point at all in ignoring the benefits of ANSI compilers, almost ten years after this language became an ISO standard. int strcmp(char *s, char *t) { ... } On platforms which use the included configure script, the ansi2knr tool in the src subdirectory is invoked transparently if the compiler doesn't support prototypes (Ultrix, SunOS 4.x). Other platforms may require explicit rules or additional makefiles for non-ANSI/ANSI compilation. The man page for ansi2knr is included. Note that for ansi2knr to work, the function return type must be on a separate line, or, to quote from the ansi2knr manual, "ansi2knr recognizes functions by seeing a non-keyword identifier at the left margin, followed by a left parenthesis, with a right parenthesis as the last character on the line." While compilers do not require that explicit declarations be given for integer arguments, we do ! While ANSI compilers can use prototypes for implicit typecasts, k&r compilers do not have this information. Avoid relying on implicit conversions of function parameters. gcc -Wconversion helps with this. There are many signed/unsigned warnings, but look out for other ones which may be more serious, in particular integer to float and vice versa. Placing casts is necessary in this case for correct code on non-ansi compilers. [we will definitely give up k&r support in the near future, but since existing code seems to work with k&r, we're sticking with it for the time being. ] April 2012: Many years later, version 1.12 of the automake toolchain itself has abandoned support for non-ansification using ansi2knr. So the above section is of only historical interest. INTEGER SIZE ------------ Large integer constant expression have to be explicitly cast to long, even if the result is assigned to a long variable. long t=60*60*24; results in a overflow on 16 bit compilers, even though the result fits into the long variable. Correct: long t=60l*60l*24l; Similarly, though not particularly important, ANSI and k&r compilers treat integer constants > MAX_INT differently. If you mean an unsigned integer constant, say so. Please avoid duplicating large sections of code - make the effort to make a function or macro out of the common code. min(a,b), max(a,b), MIN(a,b), MAX(a,b) are all predefined by some compilers. I am now using GPMIN() and GPMAX() [wot a pain !] Avoid putting directories into #includes - eg #include "term/file.h" is to be avoided. Instead, #include "file.h" and use -Iterm on the compile line. coordval is typedef-ed to either double or float - it is almost always double, but please take care not to mix coordval's with doubles. An important rule unknown to many, it seems: *never* pass a 'char' to any of the <ctype.h> functions, as-is. Don't cast it to (int), either --- that would happen automatically, anyway. You *must* cast to (unsigned char), instead. Otherwise, there'll quite likely be crashes with 8-bit characters on systems where 'char' is signed. LAYOUT AND INDENTATION ---------------------- The code layout is getting into a bit of a mess, due to mixed conventions. IMHO the only useful style is one tab stop per indent. This way, anyone can set their editor to display with their preferred spacing. More importantly, one has to delete only one tab to outdent once more : this makes it so much easier to ensure alignment even if the opening brace is off the top of the screen. Much of the code seems to assume tab=8, and uses 4 spaces, then one tab, then tab+4, then 2tab, ... On an entirely personal note, this breaks my folding editor :-( I think vi does this by default. If using vi, please try putting set ts=4 into your ~/.exrc file. Unfortunately, gnu indent does not seem to recognise this as a layout style. If it did, I'd have run all sources through it long ago. [GNU indent -kr -cp0 -l132 -lps -br -psl is what I use. Very little manual editing is necessary after running this, mostly for long (> 80 cols) lines. Anyway, I don't care which indentation style _you_ use, I'm running all code through indent and be done with it. -Lars] Please use lots of vertical whitespace between unrelated blocks of code in functions. And it should not be need to be said, but I'll say it anyway... please put in lots of comments describing blocks of code. Many people maintain and contribute to this code. The functions in plot?d.c and graph*.c are sometimes very long. This isn't really a problem, since there's a lot of semi-independent things to be done in sequence. However, I do object to the practise of having all variables declared at the top of such functions. Please keep the scope of temporary variables as local as possible, particularly in these long functions. The main reason is for ease of maintenance : many people make modifications to small parts of code without fully understanding in exacting detail the surrounding code. In case you were wondering, lines of the form /*{{{ comment */ and /*}}}*/ are markers left by my folding editor when I am forced to fold up particularly long functions when trying to understand the logic. I tend to leave these markers in when I finally figure it out, though perhaps I should not. Source code is intended to be read and maintained by humans. As such, readability is prefered over elegance. Please separate all operators from operands with a space, ie. instead of x+=3, use x += 3. The former is not only less readable, it may also break older compilers! This rule should also be followed for simple assignments, ie. in for (;;) loops. Unary operators should be writen as usual, ie i++. No C++ style comments (//). No trailing comments on #ifdef/#ifndef lines. No #error and #warning directives. [more to come] ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/���������������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�011041� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/surface2.dem���������������������������������������������������������������������0000644�0004711�0000144�00000003730�07002420255�013255� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: surface2.dem,v 1.4 1999/10/17 19:17:01 lhecking Exp $ # set parametric set isosamples 50,10 set hidden set key below set title "Parametric Sphere" set urange [-pi/2:pi/2] set vrange [0:2*pi] set ztics nomirror -1.0,0.25,1.0 set view 45,50 splot cos(u)*cos(v),cos(u)*sin(v),sin(u) pause -1 "Hit return to continue (1)" set view ,,,0.7 set title "Parametric Sphere, crunched z axis" replot pause -1 "Hit return to continue (2)" set view ,,,1.4 set title "Parametric Sphere, enlarged z axis" replot pause -1 "Hit return to continue (3)" set view ,,,1.0 set title "Parametric Torus" set urange [0:2*pi] set vrange [0:2*pi] set zrange [-1:1] # imitate old 'set view' hack splot (1-0.2*cos(v))*cos(u),(1-0.2*cos(v))*sin(u),0.2*sin(v) pause -1 "Hit return to continue (4)" set title "Parametric Hexagon" set urange [-1.3:1.3] set vrange [0:2*pi] set autoscale z set ticslevel 0. # reserve more space z direction. set view ,,0.7,1.4 # crunch xyz, and re-extend z back to full size set ztics autofreq splot cos(v)**3*cos(u)**3,sin(v)**3*cos(u)**3,sin(u)**3 pause -1 "Hit return to continue (5)" set view ,,1.,1. set title "Parametric Helix" set isosamples 100,20 set urange [0:10*pi] set vrange [0:2*pi] set autoscale z splot (1-0.1*cos(v))*cos(u),(1-0.1*cos(v))*sin(u),0.1*(sin(v)+u/1.7-10) pause -1 "Hit return to continue (6)" set title "Parametric Shell (clipped to limited z range)" set isosamples 40,20 set view 50,30,1.0 set urange [0:2*pi] set vrange [0:2*pi] set zrange [-3:1.5] splot cos(u)*u*(1+cos(v)/2),sin(v)*u/2,sin(u)*u*(1+cos(v)/2) pause -1 "Hit return to continue (7)" set autoscale z set title "Parametric Shell (automatic z range)" replot pause -1 "Hit return to continue (8)" set title "Interlocking Tori" set urange [-pi:pi] set vrange [-pi:pi] set isosamples 50,20 splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with lines, \ 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with lines pause -1 "Hit return to continue (9)" reset ����������������������������������������gnuplot-4.6.4/demo/demo.edf�������������������������������������������������������������������������0000644�0004711�0000144�00000042000�10115371145�012453� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ HeaderID = EH:000001:000000:000000 ; Image = 1 ; ByteOrder = LowByteFirst ; DataType = FloatValue ; Dim_1 = 64 ; Dim_2 = 64 ; Size = 16384 ; PSize_1 = 10 ; PSize_2 = 10 ; Title = Demo Edf File ; motor_pos = 1.1 2.2 3.3 80 -5 100 ; motor_mne = y x z pmo pmy xc ; } ��@�� A��pA��A��A��A�� B�� B��4B��HB��0A��@A��PA��`A��pA��A��A��A��A��A��A��A��A��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��@A��PA��`A��pA��A��A��A��A��A��A��A��A��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��PA��`A��pA��A��A��A��A��A��A��A��A��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��`A��pA��A��A��A��A��A��A��A��A��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��pA��A��A��A��A��A��A��A��A��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A��A��A��A��A��A��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A��A��A��A��A��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A��A��A��A��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A��A��A��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A��A��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��A���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB���B��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB�� B��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB�� B��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��$B��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��(B��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��,B��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��0B��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��4B��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��8B��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��<B��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��@B��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��DB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��LB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��PB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��TB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��XB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��\B��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��`B��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��dB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��hB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��lB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��pB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��tB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��xB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��|B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��@�� A��pA��A��A��A�� B�� B��4B��HB��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��B��Bgnuplot-4.6.4/demo/optimize.dat���������������������������������������������������������������������0000644�0004711�0000144�00000001220�10757671767�013431� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # unconstrained optimization path with trust region size # read by circles.dem # -1.2000 1.0000 1.0000 -1.1753 1.3807 1.0000 -0.9764 0.9219 1.0000 -0.7045 0.4225 1.0000 -0.5965 0.3442 0.5000 -0.4271 0.1603 0.5000 -0.1645 -0.0419 0.5000 -0.0858 0.0012 0.2500 0.1625 -0.0276 0.2500 0.2335 0.0495 0.2500 0.4553 0.1648 0.2500 0.5126 0.2595 0.2500 0.6847 0.4409 0.2500 0.7327 0.5345 0.2500 0.8726 0.7417 0.2500 0.8984 0.8064 0.2500 0.9881 0.9682 0.2500 0.9926 0.9853 0.2500 1.0000 0.9999 0.2500 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/utf8.dem�������������������������������������������������������������������������0000644�0004711�0000144�00000006400�11151702441�012426� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Ethan A Merritt - April 2006 # # Test/Demonstration of UTF-8 support by gnuplot terminals. # # First we dump all 7-bit characters by octal code value, then display a # selection of 8-bit unicode (UTF-8) characters from various code points. # # This will only produce reasonable output if the current gnuplot # terminal supports multi-byte ("wide") characters and the current # font contains the corresponding UTF-8 encoded characters maps. # # Some possible terminal + font selections are: # # set term x11 font "mbfont:sazanami mincho,vera,20" # set term png font "/usr/share/fonts/ttf/arialuni.ttf" 13 # set term wxt # # set encoding utf8 # set label 100 at screen 0.5, 0.95 center set label 100 "Dump all 7-bit characters and a selection of UTF-8 unicode characters\nCharacters that are missing from your current font will not appear in the output below\nOnly a portion of the characters on a unicode page are dumped" # set border 0 unset xtics unset ytics # set label 101 "page 0 (Latin1)" at screen 0.05, 0.80 set label 102 "0020-0040:" at screen 0.05, 0.75 set label 103 "0041-0060:" at screen 0.05, 0.70 set label 104 "0061-007E:" at screen 0.05, 0.65 set label 105 "" at screen 0.05, 0.60 set label 106 "page 1:" at screen 0.05, 0.50 set label 107 "page 3:" at screen 0.05, 0.45 set label 108 "page 4:" at screen 0.05, 0.40 set label 109 "pages 33,34:" at screen 0.05, 0.35 set label 110 "pages 37,38:" at screen 0.05, 0.30 set label 111 "Japanese:" at screen 0.05, 0.25 set label 112 "Hebrew:" at screen 0.05, 0.20 # set label 1 at screen 0.2, 0.80 set label 2 at screen 0.2, 0.75 set label 3 at screen 0.2, 0.70 set label 4 at screen 0.2, 0.65 set label 5 at screen 0.2, 0.60 set label 6 at screen 0.2, 0.50 set label 7 at screen 0.2, 0.45 set label 8 at screen 0.2, 0.40 set label 9 at screen 0.2, 0.35 set label 10 at screen 0.2, 0.30 set label 11 at screen 0.2, 0.25 set label 12 at screen 0.2, 0.20 # #set label 1 "\001\002\003\004\005\006\007\010\011 \013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040" set label 2 "\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100" set label 3 "\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140" set label 4 "\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177" set label 5 "¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿" . "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑñòóôõö÷øùúûüýþÿ" set label 6 "ĀāĂ㥹ĆćĈĉĊċČ茜ŜŝŞşŠšŴŵŶŷŸŹźŻżŽž" set label 7 "αβγδεζηθικλμνξοπρςστυφχψωϑϖ" set label 8 "абвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџ" set label 9 "ℎℏℋℓℛÅ∀∂∃∇∈∋√∞∧∨∩∪∫⊂⊃⊆⊇⊥⊗⊙" set label 10 "◎▲△▼▽☉☿♀♁♂♃♄♅♆♇♈♉♊♋♌♍♎♏♐♑" set label 11 "日本語フォント かな 漢字" set label 12 "אבגדהוזחטיךכלםמןנסעףפץצקרשת" # set xrange [-1:1] set yrange [-1:1] plot -10 notitle pause -1 "Hit return to continue" reset ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/arrowstyle.dat�������������������������������������������������������������������0000644�0004711�0000144�00000001065�07554753056�014004� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������-1000 37 -41 -959 11 -49 -918 -16 -48 -877 -42 -39 -836 -60 -24 -795 -69 -5 -755 -66 14 -714 -52 32 -673 -30 44 -632 -2 49 -591 24 46 -551 48 35 -510 64 18 -469 69 0 -428 63 -20 -387 46 -37 -346 22 -47 -306 -5 -49 -265 -32 -44 -224 -54 -31 -183 -67 -13 -142 -68 7 -102 -59 26 -61 -39 40 -20 -14 48 20 14 48 61 39 40 102 59 26 142 68 7 183 67 -13 224 54 -31 265 32 -44 306 5 -49 346 -22 -47 387 -46 -37 428 -63 -20 469 -69 -0 510 -64 18 551 -48 35 591 -24 46 632 2 49 673 30 44 714 52 32 755 66 14 795 69 -5 836 60 -24 877 42 -39 918 16 -48 959 -11 -49 1000 -37 -41 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/histograms2.dem������������������������������������������������������������������0000644�0004711�0000144�00000003736�11156365340�014023� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Example of using histogram modes # reset set title "US immigration from Europe by decade" set datafile missing "-" set xtics nomirror rotate by -45 set key noenhanced # # 'newhistogram' keyword to plot # set title "Default Histogram Colouring" set key under set key invert autotitle columnhead set style data histogram set style histogram clustered gap 1 title offset 2,0.25 set style fill solid noborder set boxwidth 0.95 unset xtics set xtics rotate by -45 set xlabel "Immigration from different regions" offset 0,-3 set ytics set grid y set auto y set bmargin 10 # plot \ newhistogram "Northern Europe", \ 'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ newhistogram "Southern Europe", \ '' u 9:xtic(1), '' u 17 , '' u 22 , \ newhistogram "British Isles", \ '' u 10:xtic(1) , '' u 21 # pause -1 "Same plot using explicit histogram start colors" set title "Explicit start color in 'newhistogram' command" plot \ newhistogram "Northern Europe" lt 4, \ 'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ newhistogram "Southern Europe" lt 4, \ '' u 9:xtic(1), '' u 17, '' u 22, \ newhistogram "British Isles" lt 4, \ '' u 10:xtic(1), '' u 21 # # pause -1 "Same plot using explicit histogram start pattern" set title "Explicit start pattern in 'newhistogram' command" set style fill pattern 1 border -1 plot \ newhistogram "Northern Europe" fs pattern 1, \ 'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ newhistogram "Southern Europe" fs pattern 1, \ '' u 9:xtic(1), '' u 17, '' u 22, \ newhistogram "British Isles" fs pattern 1, \ '' u 10:xtic(1), '' u 21 # # pause -1 "Same plot with both explicit color and pattern" set title "Explicit start pattern and linetype" set style fill pattern 1 border -1 plot \ newhistogram "Northern Europe" lt 2 fs pattern 1, \ 'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ newhistogram "Southern Europe" lt 2 fs pattern 1, \ '' u 9:xtic(1), '' u 17, '' u 22, \ newhistogram "British Isles" lt 2 fs pattern 1, \ '' u 10:xtic(1), '' u 21 # # pause -1 ����������������������������������gnuplot-4.6.4/demo/gnu-valley�����������������������������������������������������������������������0000644�0004711�0000144�00000000124�11015602533�013054� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0 0 10 0 1 10 0 2 10 1 0 10 1 1 5 1 2 10 2 0 10 2 1 1 2 2 10 3 0 10 3 1 0 3 2 10 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/histograms.dem�������������������������������������������������������������������0000644�0004711�0000144�00000007014�11157351200�013721� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Example of using histogram modes # reset set title "US immigration from Europe by decade" set datafile missing "-" set xtics nomirror rotate by -45 set key noenhanced # # First plot using linespoints set style data linespoints plot 'immigration.dat' using 2:xtic(1) title columnheader(2), \ for [i=3:22] '' using i title columnheader(i) # pause -1 "<cr> to plot the same data as a histogram" # set title "US immigration from Northern Europe\nPlot selected data columns as histogram of clustered boxes" set auto x set yrange [0:300000] set style data histogram set style histogram cluster gap 1 set style fill solid border -1 set boxwidth 0.9 set xtic rotate by -45 scale 0 #set bmargin 10 plot 'immigration.dat' using 6:xtic(1) ti col, '' u 12 ti col, '' u 13 ti col, '' u 14 ti col # pause -1 "<cr> to change the gap between clusters" # set title "US immigration from Northern Europe\n(same plot with larger gap between clusters)" set style histogram gap 5 replot # pause -1 "<cr> to plot the same dataset as stacked histogram" # # # Stacked histograms # set title "US immigration from Europe by decade\nPlot as stacked histogram" set key invert reverse Left outside set key autotitle columnheader set yrange [0:7e6] set auto x unset xtics set xtics nomirror rotate by -45 scale 0 set style data histogram set style histogram rowstacked set style fill solid border -1 set boxwidth 0.75 # plot 'immigration.dat' using 2:xtic(1), for [i=3:22] '' using i # pause -1 "<cr> to rescale each stack to % of total" # # Stacked histograms by percent # set title "US immigration from Europe by decade\nFraction of total plotted as stacked histogram" set key invert reverse Left outside set yrange [0:100] set ylabel "% of total" unset ytics set grid y set border 3 set style data histograms set style histogram rowstacked set style fill solid border -1 set boxwidth 0.75 # plot 'immigration.dat' using (100.*$2/$24):xtic(1) t column(2), \ for [i=3:23] '' using (100.*column(i)/column(24)) title column(i) # pause -1 "Now try histograms stacked by columns" # # Columnstacks # xtic labels should be picked up from column heads ('title column') # key titles should be picked up from row heads ('key(1)') # set title "Immigration from Northern Europe\n(columstacked histogram)" set style histogram columnstacked set key noinvert box set yrange [0:*] set ylabel "Immigration by decade" set xlabel "Country of Origin" set tics scale 0.0 set ytics unset xtics set xtics norotate nomirror plot 'immigration.dat' using 6 ti col, '' using 12 ti col, \ '' using 13 ti col, '' using 14:key(1) ti col # pause -1 "Next we do several sets of parallel histograms" # # 'newhistogram' keyword to plot # set title "Immigration from different regions\n(give each histogram a separate title)" set key under nobox set style histogram clustered gap 1 title offset 2,0.25 set style fill solid noborder set boxwidth 0.95 unset xtics set xtics nomirror rotate by -45 scale 0 set xlabel "(note: histogram titles have specified offset relative to X-axis label)" offset 0,-2 set ytics set grid y set auto y plot \ newhistogram "Northern Europe", \ 'immigration.dat' using 6:xtic(1) t col, '' u 13 t col, '' u 14 t col, \ newhistogram "Southern Europe", \ '' u 9:xtic(1) t col, '' u 17 t col, '' u 22 t col, \ newhistogram "British Isles", \ '' u 10:xtic(1) t col, '' u 21 t col # pause -1 "Same plot using rowstacked histogram" # set style histogram rows set boxwidth 0.8 set yrange [0:900000] set xlabel "(Same plot using rowstacked rather than clustered histogram)" replot # pause -1 "<cr> to finish histogram demo" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/world.dem������������������������������������������������������������������������0000644�0004711�0000144�00000003624�11706050702�012676� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: world.dem,v 1.9.6.1 2012/01/19 07:03:17 sfeam Exp $ # # set title "Gnuplot Correspondences" unset key unset border unset yzeroaxis unset xtics unset ytics # # plot world map and correspondent locations as a + plot 'world.dat' with lines lt 3 , 'world.cor' with points lt 1 pt 2 set title "" set key on set border set yzeroaxis set xtics set ytics pause -1 "Hit return to continue" # # plot a '3D version using spherical coordinate system' of the world. reset unset key set border set yzeroaxis set xtics set ytics set angles degrees set title "3D version using spherical coordinate system" set ticslevel 0 set view 70,40,0.8,1.2 set mapping spherical set parametric set samples 32 set isosamples 9 set urange [-90:90] set vrange [0:360] splot cos(u)*cos(v),cos(u)*sin(v),sin(u) with lines lc rgb "cyan" ,\ 'world.dat' with lines lc rgb "blue" , 'world.cor' with points lt 1 pt 2 pause -1 "Hit return to continue" # HBB 20000715: new demo: # same plot, but with hidden3d active, plus axes through the # poles: set title "3D solid version with hidden line removal" set hidden3d offset 0 set arrow from 0,0,-1.2 to 0,0,1.2 lc rgb "cyan" lw 2 set arrow from -1.2, 0, 0 to 1.2, 0, 0 nohead lc rgb "cyan" lw 1 set arrow from 0, -1.2, 0 to 0, 1.2, 0 nohead lc rgb "cyan" lw 1 splot cos(u)*cos(v),-cos(u)*sin(v),sin(u) with lines lc rgb "cyan" ,\ 'world.dat' u 1:2:(1.001) with lines lc rgb "blue" , 'world.cor' with points lt 1 pt 2 pause -1 "Hit return to continue" unset arrow # # plot a '3D version using cylindrical coordinate system' of the world. set title "3D version using cylindrical coordinate system" set ticslevel 0.0 set view 70,40,0.8,1.2 set mapping cylindrical set parametric set samples 32 set isosamples 13 set urange [-180:180] set vrange [-90:90] splot cos(u),sin(u),v with lines lc rgb "cyan" ,\ 'world.dat' with lines lc rgb "blue" lw 2, 'world.cor' with points lt 1 pt 2 pause -1 "Hit return to continue" reset ������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/1.dat����������������������������������������������������������������������������0000644�0004711�0000144�00000001515�06515203630�011711� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: 1.dat,v 1.1.1.1 1998/04/15 19:16:40 lhecking Exp $ # # -20.000000 -3.041676 -19.000000 -3.036427 -18.000000 -3.030596 -17.000000 -3.024081 -16.000000 -3.016755 -15.000000 -3.008456 -14.000000 -2.998978 -13.000000 -2.988049 -12.000000 -2.975310 -11.000000 -2.960273 -10.000000 -2.942255 -9.000000 -2.920278 -8.000000 -2.892883 -7.000000 -2.857799 -6.000000 -2.811295 -5.000000 -2.746802 -4.000000 -2.651635 -3.000000 -2.498092 -2.000000 -2.214297 -1.000000 -1.570796 0.000000 0.000000 1.000000 1.570796 2.000000 2.214297 3.000000 2.498092 4.000000 2.651635 5.000000 2.746802 6.000000 2.811295 7.000000 2.857799 8.000000 2.892883 9.000000 2.920278 10.000000 2.942255 11.000000 2.960273 12.000000 2.975310 13.000000 2.988049 14.000000 2.998978 15.000000 3.008456 16.000000 3.016755 17.000000 3.024081 18.000000 3.030596 19.000000 3.036427 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/energy_circles.dat���������������������������������������������������������������0000644�0004711�0000144�00000006302�11336705124�014547� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#Latitude Longitude Continent Source Color_index Angle_start_at Angle Value Continent_total 55.0 85.0 "ASIA (EXCL. MIDDLE EAST)" Coal 0 215.410 144.590 947639 2362223 55.0 85.0 "ASIA (EXCL. MIDDLE EAST)" Oil 1 154.375 61.034 400017 2362223 55.0 85.0 "ASIA (EXCL. MIDDLE EAST)" Gas 2 112.828 41.544 272284 2362223 55.0 85.0 "ASIA (EXCL. MIDDLE EAST)" Nuclear 3 94.921 17.906 117365 2362223 55.0 85.0 "ASIA (EXCL. MIDDLE EAST)" Hydroelectric 4 88.182 6.739 44165 2362223 55.0 85.0 "ASIA (EXCL. MIDDLE EAST)" Renewable 5 0.000 88.182 577942 2362223 17.0 -90.0 "C. AMERICA & CARIBBEAN" Coal 0 353.272 6.728 4868 260434 17.0 -90.0 "C. AMERICA & CARIBBEAN" Oil 1 105.476 247.795 179261 260434 17.0 -90.0 "C. AMERICA & CARIBBEAN" Gas 2 49.774 55.703 40297 260434 17.0 -90.0 "C. AMERICA & CARIBBEAN" Nuclear 3 46.170 3.604 2607 260434 17.0 -90.0 "C. AMERICA & CARIBBEAN" Hydroelectric 4 40.363 5.803 4199 260434 17.0 -90.0 "C. AMERICA & CARIBBEAN" Renewable 5 0.000 40.363 29201 260434 25.0 38.0 "MIDDLE EAST & N. AFRICA" Coal 0 356.659 3.341 14229 1532806 25.0 38.0 "MIDDLE EAST & N. AFRICA" Oil 1 65.383 291.272 1240170 1532806 25.0 38.0 "MIDDLE EAST & N. AFRICA" Gas 2 4.176 61.211 260613 1532806 25.0 38.0 "MIDDLE EAST & N. AFRICA" Nuclear 3 4.176 0.000 0 1532806 25.0 38.0 "MIDDLE EAST & N. AFRICA" Hydroelectric 4 2.848 1.328 5653 1532806 25.0 38.0 "MIDDLE EAST & N. AFRICA" Renewable 5 0.000 2.848 12124 1532806 50.0 -95.0 "NORTH AMERICA" Coal 0 254.200 105.800 600275 2053057 50.0 -95.0 "NORTH AMERICA" Oil 1 167.857 86.342 489867 2053057 50.0 -95.0 "NORTH AMERICA" Gas 2 64.714 103.144 585206 2053057 50.0 -95.0 "NORTH AMERICA" Nuclear 3 25.888 38.826 220291 2053057 50.0 -95.0 "NORTH AMERICA" Hydroelectric 4 16.207 9.680 54923 2053057 50.0 -95.0 "NORTH AMERICA" Renewable 5 0.000 16.207 91945 2053057 -10.0 -55.0 "SOUTH AMERICA" Coal 0 341.204 18.796 29025 555962 -10.0 -55.0 "SOUTH AMERICA" Oil 1 117.616 223.589 345297 555962 -10.0 -55.0 "SOUTH AMERICA" Gas 2 70.412 47.203 72900 555962 -10.0 -55.0 "SOUTH AMERICA" Nuclear 3 68.540 1.868 2888 555962 -10.0 -55.0 "SOUTH AMERICA" Hydroelectric 4 40.504 28.037 43298 555962 -10.0 -55.0 "SOUTH AMERICA" Renewable 5 0.000 40.504 62553 555962 -5.0 25.0 "SUB-SAHARAN AFRICA" Coal 0 271.883 88.117 129456 528895 -5.0 25.0 "SUB-SAHARAN AFRICA" Oil 1 144.518 127.364 187118 528895 -5.0 25.0 "SUB-SAHARAN AFRICA" Gas 2 138.254 6.264 9203 528895 -5.0 25.0 "SUB-SAHARAN AFRICA" Nuclear 3 135.979 2.275 3345 528895 -5.0 25.0 "SUB-SAHARAN AFRICA" Hydroelectric 4 133.049 2.927 4302 528895 -5.0 25.0 "SUB-SAHARAN AFRICA" Renewable 5 0.000 133.049 195472 528895 50.0 25.0 EUROPE Coal 0 296.352 63.648 391517 2228407 50.0 25.0 EUROPE Oil 1 190.894 105.458 648678 2228407 50.0 25.0 EUROPE Gas 2 70.358 120.532 741413 2228407 50.0 25.0 EUROPE Nuclear 3 21.013 49.349 303542 2228407 50.0 25.0 EUROPE Hydroelectric 4 11.009 10.001 61526 2228407 50.0 25.0 EUROPE Renewable 5 0.000 11.009 67725 2228407 -24.0 133.0 OCEANIA Coal 0 99.130 260.870 155000 227112 -24.0 133.0 OCEANIA Oil 1 56.214 42.916 25500 227112 -24.0 133.0 OCEANIA Gas 2 10.771 45.443 27000 227112 -24.0 133.0 OCEANIA Nuclear 3 10.771 0.000 0 227112 -24.0 133.0 OCEANIA Hydroelectric 4 8.417 2.358 1400 227112 -24.0 133.0 OCEANIA Renewable 5 0.000 8.417 5000 227112 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/surface1.dem���������������������������������������������������������������������0000644�0004711�0000144�00000014555�10122467630�013270� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: surface1.dem,v 1.11 2004/09/17 05:01:12 sfeam Exp $ # set samples 21 set isosample 11 set xlabel "X axis" offset -3,-2 set ylabel "Y axis" offset 3,-2 set zlabel "Z axis" offset -5 set title "3D gnuplot demo" set label 1 "This is the surface boundary" at -10,-5,150 center set arrow 1 from -10,-5,120 to -10,0,0 nohead set arrow 2 from -10,-5,120 to 10,0,0 nohead set arrow 3 from -10,-5,120 to 0,10,0 nohead set arrow 4 from -10,-5,120 to 0,-10,0 nohead set xrange [-10:10] set yrange [-10:10] splot x*y pause -1 "Hit return to continue (1)" unset arrow unset label set grid splot x**2+y**2, x**2-y**2 pause -1 "Hit return to continue (2)" rep x*y pause -1 "Hit return to continue (3)" rep (x**3+y**3)/10 pause -1 "Hit return to continue (4)" set ticslevel 0.0 set title "3D gnuplot demo ( ticslevel = 0.0 )" rep pause -1 "Hit return to continue (5)" set ticslevel 2.0 set title "3D gnuplot demo ( ticslevel = 2.0 )" rep pause -1 "Hit return to continue (6)" set ticslevel 0.5 set title "3D gnuplot demo ( ticslevel = 0.5 )" rep pause -1 "Hit return to continue (7)" set title "3D gnuplot demo" unset grid splot x*y with points pause -1 "Hit return to continue (8)" unset xtics unset ytics set xrange [-1:1] set yrange [-1:1] set title "Surfaces with no grid or tics" splot x*y with lines, x**2*y**3 with dots, x**3*y*2 with points pause -1 "Hit return to continue (9)" set xtics ("low" -3, "mid" 0, "high" 3) set ytics -2,0.5,2 set xrange [-3:3] set yrange [-3:3] set log z set title "Surfaces with z log scale" splot x**2*y**2 + 2, x**2*y**4 + 2, x**4*y**2 + 2 pause -1 "Hit return to continue (10)" unset log z set xtics autofreq set ytics autofreq set xrange [-1:1] set yrange [-1:1] set samples 51 set isosample 21 set dummy u,v set title "3D gnuplot demo" splot u*v / (u**2 + v**2 + 0.1) pause -1 "Hit return to continue (11)" splot [x=-3:3] [y=-3:3] sin(x) * cos(y) pause -1 "Hit return to continue (12)" set zrange [-1.0:1.0] replot pause -1 "Hit return to continue (13)" set title "Sinc function" set zrange [-1:1] set label 1 "This is equal to 1" at 0,3.2,1 left set arrow 1 from 0,3,1 to 0,0,1 sinc(u,v) = sin(sqrt(u**2+v**2)) / sqrt(u**2+v**2) splot [-5:5.01] [-5:5.01] sinc(u,v) pause -1 "Hit return to continue (14)" set view 70,20,1 set zrange [-0.5:1.0] set ztics -1,0.25,1 set label 1 "This is equal to 1" at -5,-2,1.5 centre set arrow 1 from -5,-2.1,1.4 to 0,0,1 splot [-12:12.01] [-12:12.01] sinc(u,v) pause -1 "Hit return to continue (15)" set title "\"fence plot\" using separate parametric surfaces" # A method suggested by Hans-Bernhard Broeker # <broeker@physik.rwth-aachen.de>: display a separate parametric # surface for each fence. set zrange [-1:1] unset label unset arrow set xrange [-5:5]; set yrange [-5:5] set arrow from 5,-5,-1.2 to 5,5,-1.2 lt -1 set label 1 "increasing v" at 6,0,-1 set arrow from 5,6,-1 to 5,5,-1 lt -1 set label 2 "u=0" at 5,6.5,-1 set arrow from 5,6,sinc(5,5) to 5,5,sinc(5,5) lt -1 set label 3 "u=1" at 5,6.5,sinc(5,5) set parametric set hidden3d set isosamples 2,33 xx=-5; dx=(4.99-(-4.99))/9 x0=xx; xx=xx+dx x1=xx; xx=xx+dx x2=xx; xx=xx+dx x3=xx; xx=xx+dx x4=xx; xx=xx+dx x5=xx; xx=xx+dx x6=xx; xx=xx+dx x7=xx; xx=xx+dx x8=xx; xx=xx+dx x9=xx; xx=xx+dx splot [u=0:1][v=-4.99:4.99] \ x0, v, (u<0.5) ? -1 : sinc(x0,v) notitle, \ x1, v, (u<0.5) ? -1 : sinc(x1,v) notitle, \ x2, v, (u<0.5) ? -1 : sinc(x2,v) notitle, \ x3, v, (u<0.5) ? -1 : sinc(x3,v) notitle, \ x4, v, (u<0.5) ? -1 : sinc(x4,v) notitle, \ x5, v, (u<0.5) ? -1 : sinc(x5,v) notitle, \ x6, v, (u<0.5) ? -1 : sinc(x6,v) notitle, \ x7, v, (u<0.5) ? -1 : sinc(x7,v) notitle, \ x8, v, (u<0.5) ? -1 : sinc(x8,v) notitle, \ x9, v, (u<0.5) ? -1 : sinc(x9,v) notitle pause -1 "Hit return to continue (16)" set title "\"fence plot\" using single parametric surface with undefined points" # Another method suggested by Hans-Bernhard Broeker # <broeker@physik.rwth-aachen.de>: Use parametric variable u to control # x, y, and z. u=3*fencenumber+remainder, where the remainder selects # one of three types of points: # remainder=0: x=xmin+fencenumber*dx, y=v, z=zbase # remainder=1: x=xmin+fencenumber*dx, y=v, z=f(x,y) # remainder=2: x=xmin+fencenumber*dx, y=v, z=1/0 (undefined) set parametric unset label unset arrow xmin=-4.99; xmax=5; n=10; dx=(xmax-xmin)/(n-1.) set isosamples 3*n,33 zbase=-1 set arrow from 5,-5,-1.2 to 5,5,-1.2 lt -1 set label 1 "increasing v" at 6,0,-1 set arrow from -5,-5,-1.2 to 5,-5,-1.2 lt -1 set label 2 "increasing u" at 0,-5,-1.5 set arrow from 5,6,-1 to 5,5,-1 lt -1 set label 3 "floor(u)%3=0" at 5,6.5,-1 set arrow from 5,6,sinc(5,5) to 5,5,sinc(5,5) lt -1 set label 4 "floor(u)%3=1" at 5,6.5,sinc(5,5) splot [u=.5:3*n-.5][v=-4.99:4.99] \ xmin+floor(u/3)*dx, v, ((floor(u)%3)==0) ? zbase : \ (((floor(u)%3)==1) ? sinc(xmin+u/3.*dx,v) : 1/0) notitle pause -1 "Hit return to continue (17)" unset hidden3d; unset parametric; set isosamples 20,20 set xrange [-1:1]; set yrange [-1:1] set ztics autofreq unset arrow unset label set log set auto set title "This has logarithmic scale" splot [x=1:15] [y=1:15] x**2+y**2 pause -1 "Hit return to continue (18)" unset log set xrange [0:15] set yrange [0:15] set auto #set zrange [-0.6:0.7] set ticslevel 0 set style data lines set title "Data grid plotting" set parametric splot "glass.dat" pause -1 "Hit return to continue (19)" splot "glass.dat" using 3:2:1 pause -1 "Hit return to continue (20)" set zrange [-1.2:1.2] set ticslevel 0.5 unset parametric set xlabel "line index within group" set ylabel "group index" splot "glass.dat" using 1, "glass.dat" using 2, "glass.dat" using 3 pause -1 "Hit return to continue (21)" set title "splot of part of a data file" set xlabel "X axis" offset -3,-2 set ylabel "Y axis" offset 3,-2 set hidden3d splot 'glass.dat' every 2::0::12 with lines pause -1 "Hit return to continue (22)" set title "splot with \"set pm3d\" (implemented with some terminals)" set pm3d set hidden3d splot 'glass.dat' every 2::0::12 with lines pause -1 "Hit return to continue (23)" unset hidden3d unset pm3d set param set title "Test of spherical coordinates" set mapping spherical splot "glass.dat" pause -1 "Hit return to continue (24)" # mandelbrot demo set title "Mandelbrot function" unset parametric set mapping cartesian set view 60,30,1,1 set auto set isosamples 60 set hidden3d compl(a,b)=a*{1,0}+b*{0,1} mand(z,a,n) = n<=0 || abs(z)>100 ? 1:mand(z*z+a,a,n-1)+1 splot [-2:1][-1.5:1.5] mand({0,0},compl(x,y),30) pause -1 "Hit return to continue (25)" reset ���������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/molecule.dem���������������������������������������������������������������������0000644�0004711�0000144�00000000743�10344746270�013364� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������set title "GM1 pentasaccharide ball-and-stick representation" set hidden3d set border 0 unset xtics unset ytics unset ztics splot 'GM1_sugar.pdb' using 6:7:8 with points lt 3 pt 7 ps 3 notitle, \ 'GM1_bonds.r3d' using 1:2:3:($5-$1):($6-$2):($7-$3) with vectors nohead lw 3 lt 1 \ title "GM1 pentasaccharide" pause -1 "Hit return to continue" set title "Hidden3d mode with a mixture of surfaces, points, and lines" replot 18 notitle pause -1 "Hit return to continue" �����������������������������gnuplot-4.6.4/demo/using.dat������������������������������������������������������������������������0000644�0004711�0000144�00000013004�06515203633�012675� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: using.dat,v 1.1.1.1 1998/04/15 19:16:43 lhecking Exp $ # # 891101 00 1.00 14 8.6 94.0 891101 01 1.04 10 17.5 94.4 891101 02 1.08 9 9.7 97.1 891101 03 1.13 9 10.1 94.3 891101 04 1.17 9 5.7 98.3 891101 05 1.21 8 8.1 99.7 891101 06 1.25 7 3.2 99.6 891101 07 1.29 6 2.5 99.8 891101 08 1.33 20 2.3 99.4 891101 09 1.38 30 3.5 96.1 891101 10 1.42 37 7.7 96.4 891101 11 1.46 36 9.8 97.4 891101 12 1.50 30 8.8 97.4 891101 13 1.54 32 9.1 96.5 891101 14 1.58 37 6.3 97.0 891101 15 1.63 35 6.1 97.3 891101 16 1.67 41 8.6 97.2 891101 17 1.71 28 7.6 97.3 891101 18 1.75 16 4.3 97.6 891101 19 1.79 21 4.2 97.5 891101 20 1.83 20 5.6 96.9 891101 21 1.88 24 6.6 96.2 891101 22 1.92 19 5.8 97.1 891101 23 1.96 16 7.4 97.1 891102 00 2.00 13 7.4 96.4 891102 01 2.04 8 6.6 95.6 891102 02 2.08 6 7.4 94.1 891102 03 2.13 6 6.4 95.9 891102 04 2.17 7 6.4 95.5 891102 05 2.21 6 6.7 95.5 891102 06 2.25 6 6.3 94.6 891102 07 2.29 7 6.5 93.1 891102 08 2.33 15 6.5 92.8 891102 09 2.38 22 7.2 93.2 891102 10 2.42 31 9.1 93.9 891102 11 2.46 37 11.0 95.6 891102 12 2.50 40 9.8 98.7 891102 13 2.54 45 9.5 97.3 891102 14 2.58 46 11.4 98.5 891102 15 2.63 46 11.9 99.1 891102 16 2.67 43 13.0 98.8 891102 17 2.71 28 14.5 99.1 891102 18 2.75 25 13.4 99.1 891102 19 2.79 24 9.9 99.7 891102 20 2.83 25 8.1 99.5 891102 21 2.88 24 10.3 99.4 891102 22 2.92 24 12.0 98.7 891102 23 2.96 23 18.2 98.7 891103 00 3.00 20 16.8 99.0 891103 01 3.04 16 14.8 99.2 891103 02 3.08 17 15.5 98.0 891103 03 3.13 17 14.4 99.4 891103 04 3.17 16 14.4 99.4 891103 05 3.21 14 11.3 99.4 891103 06 3.25 13 8.0 99.7 891103 07 3.29 13 6.1 99.9 891103 08 3.33 18 6.4 99.8 891103 09 3.38 31 6.5 98.9 891103 10 3.42 39 7.5 99.0 891103 11 3.46 37 9.1 98.8 891103 12 3.50 33 9.0 99.2 891103 13 3.54 40 10.4 98.7 891103 14 3.58 45 12.9 98.3 891103 15 3.63 45 13.8 98.5 891103 16 3.67 37 16.1 98.9 891103 17 3.71 29 16.0 99.3 57 891103 18 3.75 21 17.4 97.9 55 891103 19 3.79 14 14.6 97.7 891103 20 3.83 11 14.3 97.8 57 891103 21 3.88 15 14.7 96.2 59 891103 22 3.92 10 12.8 95.1 57 891103 23 3.96 8 10.2 97.6 891104 00 4.00 6 7.3 98.6 891104 01 4.04 4 4.7 99.8 891104 02 4.08 3 3.4 98.0 891104 03 4.13 4 2.9 99.6 891104 04 4.17 4 2.1 99.8 891104 05 4.21 4 11.7 99.9 891104 06 4.25 4 4.5 99.9 891104 07 4.29 4 1.6 88.4 891104 08 4.33 4 1.3 65.2 891104 09 4.38 7 1.4 71.4 891104 10 4.42 9 1.3 70.7 891104 11 4.46 14 8.1 99.5 891104 12 4.50 12 4.2 75.3 891104 13 4.54 18 10.9 95.3 891104 14 4.58 16 7.1 87.6 891104 15 4.63 18 3.3 98.9 891104 16 4.67 15 3.4 99.6 891104 17 4.71 8 2.4 99.9 891104 18 4.75 8 2.2 99.8 891104 19 4.79 11 2.2 99.7 891104 20 4.83 14 2.3 99.7 891104 21 4.88 13 2.5 99.7 891104 22 4.92 10 3.1 99.8 891104 23 4.96 12 4.5 99.7 891105 00 5.00 9 4.8 99.7 891105 01 5.04 8 4.9 99.8 891105 02 5.08 5 5.7 97.5 891105 03 5.13 5 5.2 97.6 891105 04 5.17 4 3.3 85.9 891105 05 5.21 5 1.2 71.4 891105 06 5.25 5 1.1 61.8 891105 07 5.29 5 1.0 71.8 891105 08 5.33 5 1.0 55.7 891105 09 5.38 6 1.0 62.2 891105 10 5.42 7 1.1 61.9 891105 11 5.46 9 1.4 65.6 891105 12 5.50 14 2.8 99.6 891105 13 5.54 16 2.1 94.0 891105 14 5.58 16 2.2 85.1 891105 15 5.63 17 2.5 99.7 891105 16 5.67 19 2.2 90.8 891105 17 5.71 16 1.5 61.3 891105 18 5.75 12 1.6 71.8 891105 19 5.79 16 2.8 98.3 891105 20 5.83 17 3.3 88.8 891105 21 5.88 18 1.3 56.5 891105 22 5.92 20 0.9 38.8 891105 23 5.96 12 1.1 50.8 891106 00 6.00 10 2.2 68.4 891106 01 6.04 8 1.2 54.4 891106 02 6.08 8 1.6 58.4 891106 03 6.13 7 1.1 52.2 891106 04 6.17 6 1.1 56.4 891106 05 6.21 6 1.2 55.7 891106 06 6.25 6 1.0 46.2 891106 07 6.29 7 0.5 7.2 891106 08 6.33 17 0.7 13.8 891106 09 6.38 31 1.1 41.5 891106 10 6.42 37 1.5 52.7 891106 11 6.46 36 3.1 83.7 891106 12 6.50 29 2.0 70.0 891106 13 6.54 28 1.6 71.4 891106 14 6.58 38 3.1 99.1 891106 15 6.63 39 5.6 98.2 891106 16 6.67 43 5.7 98.7 59 891106 17 6.71 27 5.7 99.4 891106 18 6.75 15 4.3 99.8 891106 19 6.79 17 4.1 99.7 891106 20 6.83 20 2.9 99.3 891106 21 6.88 16 3.1 96.3 891106 22 6.92 16 2.8 86.1 891106 23 6.96 16 3.3 96.5 891107 00 7.00 12 3.2 98.2 891107 01 7.04 12 1.6 77.7 891107 02 7.08 10 3.0 98.7 891107 03 7.13 8 1.7 71.1 891107 04 7.17 8 2.8 81.4 891107 05 7.21 8 5.4 92.4 891107 06 7.25 9 5.3 87.7 891107 07 7.29 11 5.6 94.0 891107 08 7.33 15 2.0 74.0 891107 09 7.38 25 2.7 84.3 891107 10 7.42 32 3.0 92.9 891107 11 7.46 41 5.5 97.4 891107 12 7.50 39 6.5 97.5 891107 13 7.54 31 4.4 95.9 891107 14 7.58 35 7.3 98.6 891107 15 7.63 37 8.3 96.3 891107 16 7.67 34 9.2 97.6 891107 17 7.71 20 7.5 99.3 891107 18 7.75 14 7.1 99.5 891107 19 7.79 15 7.1 99.7 891107 20 7.83 16 4.9 99.7 891107 21 7.88 18 4.3 99.7 891107 22 7.92 15 3.1 99.7 891107 23 7.96 11 3.3 99.6 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/barchart_art.dem�����������������������������������������������������������������0000644�0004711�0000144�00000001637�11311104217�014176� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Demo of using rescaled images to construct a bar chart # if (!strstrt(GPVAL_COMPILE_OPTIONS,"+GD_PNG")) \ print ">>> Skipping demo <<<\n" ; \ print "This copy of gnuplot was built without support for loading png images" ;\ exit ; reset set title "Building Code Height Limits" unset key set xrange [ -10 : 160 ] set yrange [ 0 : 200 ] set y2range[ 0 : 200 ] set y2tics set grid y set xtics ("NE" 12.0, "S" 42.0, "Downtown" 72.0, "Suburbs" 127.0) scale 0.0 plot 'bldg.png' binary filetype=png origin=(60,0) dx=0.5 dy=1.5 with rgbimage, \ 'bldg.png' binary filetype=png origin=(0,0) dx=0.5 dy=1 with rgbimage, \ 'bldg.png' binary filetype=png origin=(30,0) dx=0.5 dy=0.7 with rgbimage, \ 'bldg.png' binary filetype=png origin=(100,0) dx=0.5 dy=0.35 with rgbimage, \ 'bldg.png' binary filetype=png origin=(125,0) dx=0.5 dy=0.35 with rgbimage pause -1 "Hit return to continue" reset �������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/image.dem������������������������������������������������������������������������0000644�0004711�0000144�00000027125�11120111174�012622� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# demo for plotting images using pixels and binary 2d data # # This demo can be used for terminals supporting image display. # Currently supported are: X11, Aqua, postscript, png, pdf, svg, # (e)pslatex, pstex, emf, wxt. # Prepared by Dan Sebald # History: # - Nov 2006 EAM: split into two files # - 9.23. 2003 ds: redone in response to discussion list feedback # - 5. 3. 2003 ds: 1st version if ((GPVAL_VERSION == 4.3 || GPVAL_VERSION == 4.2) \ && (!strstrt(GPVAL_COMPILE_OPTIONS,"+IMAGE"))) \ print ">>> Skipping demo <<<\n" ; \ print "This copy of gnuplot was built without support for plotting images" ; \ exit ; print "" print "The plotting styles \`image\` and \`rgbimage\` are intended for plotting" print "images described in a data file either in the convential ASCII format or" print "in a binary format described by the qualifiers \`binary\` and \`using\`." print "All pixels have an (x,y) or (x,y,z) coordinate. These values can be" print "included in the data file or implicitly determined with the sampling" print "\'array\' key word and sampling periods \'dx\' and \'dy\'. The key words" print "\'rotate\' and, for 3d plots, \'perpendicular\' control orientation." print "\nThe data for this image was stored as RGB triples, one byte per channel," print "without (x,y) coordinate information. This yields a most compact file." print "The plotting command is displayed on the graph." print "" reset set title "Larry Ewing's GIMP penguin on vacation basking in\nthe balmy waters off the coast of Murmansk" set xrange [-10:137] set yrange [-10:157] set label "\"I flew here... by plane. Why? For the halibut.\"" at 64,135 center plot 'blutux.rgb' binary array=(128,128) flipy format='%uchar' with rgbimage pause -1 "Hit return to continue" reset print "" print "Images are typically stored in a file with the first datum being the" print "top, left pixel. Without the ability to translate coordinates, the" print "the result would be an upside down image." print "" print "The key word \'array\' means an implied sample array is applied" print "to generate the locations of file data using the sampling periods" print "dx, dy and dz. The x-dimension is always the contiguous points in" print "a binary file. The y-dimension is the line number which is incremented" print "upon the x-dimension reaching the line length. The z-dimension is" print "the plane number which is incremented upon the y-dimension reaching" print "the number of lines per plane." print "" print "To alter the location of the binary data when displayed via the \'plot\'" print "command, use the key word \'rotate\' along with changing the sign of dx, dy" print "and dz." print "" set title "Translations of position variables via 'using'" set xrange [-10:275] set yrange [-10:300] unset key set label "\"Time for a dip...\"" at 132,285 center plot 'blutux.rgb' binary array=(128,128) flipy center=( 64,201 ) format='%uchar' with rgbimage, \ 'blutux.rgb' binary array=(128,128) flipy rotation=-90d center=(201,201) format='%uchar' with rgbimage, \ 'blutux.rgb' binary array=(128,128) flip=y rotate=3.1415 center=(201,64) format='%uchar' with rgbimage, \ 'blutux.rgb' binary array=(128,128) flip=y rot=0.5pi center=(64,64) format='%uchar' using 1:2:3 with rgbimage pause -1 "Hit return to continue" reset print "" print "There is the ability to plot both color images and palette based" print "images. This is controlled by the styles \`image\`, which derives" print "color information from the current palette, and \`rgbimage\`," print "which requires three components representing the red, blue and" print "green primary color scheme." print "" print "By the way, if you have a mouse active, click the right button" print "inside the image to isolate a portion of the image and see what" print "happens." print "" unset key set xrange [-10:137] set yrange [-10:157] set label 1 "\"I am the penguin, GOO GOO GOO JOOB.\"" at 63,140 center set title "Palette mode 'image' used to produce psychedelic bird" unset colorbox plot 'blutux.rgb' binary array=(128,128) flipy format='%uchar%uchar%uchar' using ($1+$2+$3) with image pause -1 "Hit return to continue" reset print "" print "Naturally, as with 3d color surfaces, the palette may be changed." print "This is an example of gray scale." print "" print "Also, notice in the plot command the key word \'flipy\'. This" print "means to change the direction of the sample along the y dimension" print "and is useful for the situation where images or other data are" print "stored in some direction other than that of the Cartesion system." print "Alone, \'flipD\' means do flipping in the D (x y or z) direction" print "for all records. Individual records can be controlled using the" print "syntax \'flipD=#,...,#\', where # is \'0\' or \'1\'." print "" unset key set xrange [-10:137] set yrange [-10:157] set tics out set label 1 "\"This picture was taken by my friend Ansel Adams.\"" at 63,140 center set title "The palette can be changed from color to gray scale" set palette gray unset colorbox plot 'blutux.rgb' binary array=(128,128) flipy format='%uchar%uchar%uchar' using ($1+$2+$3)/3 with image pause -1 "Hit return to continue" unset label 1 print "" print "Also, similar to 3d color surface plots, a color box showing the" print "palette mapping scheme can be added to the plot. The default" print "location is the right edge of the plot. The location can be set" print "manually using \`set colorbox\` and \`set margin\`." print "" print "As a prelude to the next graph, resize the plot window to judge" print "the refresh speed of the image drawing routine. Notice that when" print "the window is smaller, the image refresh is faster. There is more" print "decimation in the data of the original image and less data to plot." print "Furthermore, the window continues to refresh at a reasonable rate" print "even when the input image size becomes large (e.g., 1024 x 1024)" print "because the number of pixels on the screen remains about the same" print "while much of the hi resolution data is decimated." print "" unset key set pm3d map set xrange [10:117] set yrange [10:117] set tics out set colorbox set cbrange [0:255] set title "As with 3d color surfaces, a color box may be added to the plot" splot 'blutux.rgb' binary array=(128,128) flipy format='%uchar%uchar%uchar' using ($1+$2+$3)/3 with image pause -1 "Hit return to continue" print "" print "The \'rotation\' key word works not only with angles of integer" print "multiples of 90 degrees but also arbitrary rotations. When" print "constructing an image, Gnuplot verifies that pixel locations" print "form a valid grid. Pixel widths are based upon the grid" print "spacing. If the image orientation is aligned with the view" print "axes, Gnuplot uses an efficient image driver routine. Otherwise," print "individual pixels are drawn using polygon shapes." print "" print "Resize this window and compare the plot's refresh rate to that of" print "the previous and next plot. Notice how in this example if the" print "window is small the image refresh does not speed up. Unlike the" print "image routine where image data is decimated, all color rectangles" print "must be redrawn no matter the size of the output image." print "" print "Also notice how the center of the image matches the tuple specified" print "with the key word \'center\' in the plot command. Before doing the" print "rotation, the image's natural center is subtracted, and after doing" print "the rotation, the specified center is added." print "" set key set xrange [-10:138] set yrange [-10:138] set tics out set title "Polygons used to draw pixels for rotated images\nNotice the slower refresh rate than for the next plot" unset colorbox plot 'blutux.rgb' binary array=(128,128) dx=0.70711 dy=0.70711 flipy rotation=45d center=(63.5,63.5) format='%uchar' using ($1+$2+$3)/3 with image pause -1 "Hit return to continue" reset print "" print "The image of this plot is rotated 90 degrees and can utilize the" print "efficient image functions of terminal drivers. The plot refresh" print "is faster than the previous plot." print "" print "Furthermore, the image location in this case is specified via the" print "\'origin\' key word. As such, the rotation is done about the origin" print "as opposed to the center of the image. Notice the difference in" print "axis ranges." print "" unset key set xrange [-138:10] set yrange [-10:138] set tics out set title "Terminal image routine used to draw plot rotated about origin\nNotice the faster refresh rate than for the previous plot" unset colorbox plot 'blutux.rgb' binary array=(128,128) dx=1 flip=y rotation=0.5pi origin=(0,0) format='%uchar' using ($1+$2+$3)/3 with image pause -1 "Hit return to continue" reset print "" print "Algebraic manipulation of the input variables can select various" print "components of the image. Here are three examples where two" print "channels--or analogous to the ASCII file, data \"columns\"--are ignored" print "This is done by using \`*\` in the format to indicate that a variable" print "of a certain size should be discarded. For example, to select the" print "green channel, \`%*uchar%uchar%*uchar\` is one alternative." print "" set size 1.0, 1.0 set origin 0.0, 0.0 set multiplot set size 0.5,0.48 set origin 0.0,0.47 unset key set xrange [-0.5:127.5] set yrange [-0.5:127.5] set tics out set label 1 "Selection of the input channels via \`using\`" at 140,160 center set title '"I do impersonations..."' offset 0,-0.5 plot 'blutux.rgb' binary array=(128,128) flip=y format='%uchar' using 1:2:3 with rgbimage unset label 1 set size 0.5,0.48 set origin 0.5,0.47 set title '"A cardinal."' plot 'blutux.rgb' binary array=(128,128) flip=y format='%uchar%*uchar%*uchar' using 1:(0):(0) with rgbimage set size 0.5,0.48 set origin 0.0,0.0 set title '"A parrot."' plot 'blutux.rgb' binary array=(128,128) flipy format='%*uchar%uchar%*uchar' using (0):1:(0) with rgbimage set size 0.5,0.48 set origin 0.5,0.0 set title '"A bluebird."' plot 'blutux.rgb' binary array=(128,128) flipy format='%*uchar%*uchar%uchar' using (0):(0):1 with rgbimage unset multiplot pause -1 "Hit return to continue" reset print "" print "The range of valid pixel values can be set via \`cbrange\`. If the" print "\`cbrange\` is in autoscale mode, gnuplot will set the color scale" print "range of RGB images to [0:255] (8 bits of color info per channel)." print "This is the case in the upper left image. However, the image can be" print "saturated by choosing a smaller range, as done in the upper right image." print "Expanding the colorbox range will darken the image as in the bottom examples." print "" set size 1.0, 1.0 set origin 0.0, 0.0 set multiplot set size 0.5,0.48 set origin 0.0,0.47 unset key set xrange [-0.5:127.5] set yrange [-0.5:127.5] set tics out set label 1 "Luminance adjustment via \`cbrange\`" at 140,160 center set title 'Lake Mendota, "or Wonk-sheck-ho-mik-la!"' offset 0,-0.5 set cbrange [*:*] plot 'blutux.rgb' binary array=(128,128) flipy format='%uchar' using 1:2:3 with rgbimage unset label 1 set size 0.5,0.48 set origin 0.5,0.47 set title '"Lucky I brought sunscreen."' set cbrange [0:200] plot 'blutux.rgb' binary array=(128,128) flip=y format='%uchar' using 1:2:3 with rgbimage set size 0.5,0.48 set origin 0.0,0.0 set title 'Sunset on the Terrace' set cbrange [0:400] plot 'blutux.rgb' binary array=(128,128) flip=y format='%uchar' using (1.5*$1):2:3 with rgbimage set size 0.5,0.48 set origin 0.5,0.0 set title 'Sultry evening' set cbrange [0:400] plot 'blutux.rgb' binary array=(128,128) flipy format='%uchar' using 1:2:3 with rgbimage, '-' w points pt 7 ps 6 lt -2, '-' w points pt 7 ps 0.65 lt -2 110 100 e 10 95 38 120 82 102 26 82 93 108 41 99 123 84 e unset multiplot pause -1 "Hit return to continue" reset �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/layout.dem�����������������������������������������������������������������������0000644�0004711�0000144�00000005247�12037056004�013066� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Gnuplot version 4.1 demo of multiplot # auto-layout capability # # set multiplot layout 3, 1 title "Multiplot layout 3, 1" font ",14" set tmargin 2 set title "Plot 1" unset key plot sin(x)/x # set title "Plot 2" unset key plot 'silver.dat' using 1:2 ti 'silver.dat' # set style histogram columns set style fill solid set key autotitle column set boxwidth 0.8 set format y " " set tics scale 0 set title "Plot 3" plot 'immigration.dat' using 2 with histograms, \ '' using 7 with histograms , \ '' using 8 with histograms , \ '' using 11 with histograms # unset multiplot # # # pause -1 "<cr> to continue" reset set multiplot layout 1,3 title "Multiplot layout 1, 3" font ",14" set xtics rotate set bmargin 5 # set title "Plot 1" unset key plot sin(x)/x # set title "Plot 2" unset key plot 'silver.dat' using 1:2 ti 'silver.dat' # set title "Plot 3" set style histogram columns set style fill solid set key autotitle column set boxwidth 0.8 set format y " " set tics scale 0 plot 'immigration.dat' using 2 with histograms , \ '' using 7 with histograms , \ '' using 8 with histograms , \ '' using 11 with histograms # unset multiplot # # # # pause -1 "<cr> to continue" reset set multiplot layout 1,3 title "Same plot with a multi-line title\nshowing adjustment of plot area\n to accommodate it" font ",14" set xtics rotate set bmargin 5 # set title "Plot 1" unset key plot sin(x)/x # set title "Plot 2" unset key plot 'silver.dat' using 1:2 ti 'silver.dat' # set title "Plot 3" set style histogram columns set style fill solid set key autotitle column set boxwidth 0.8 set format y " " set tics scale 0 plot 'immigration.dat' using 2 with histograms , \ '' using 7 with histograms , \ '' using 8 with histograms , \ '' using 11 with histograms # unset multiplot pause -1 "<cr> to continue" # # Stacked Plot Demo # # Set top and bottom margins to 0 so that there is no space between plots. # Fix left and right margins to make sure that the alignment is perfect. # Turn off xtics for all plots except the bottom one. # In order to leave room for axis and tic labels underneath, we ask for # a 4-plot layout but only use the top 3 slots. # set tmargin 0 set bmargin 0 set lmargin 3 set rmargin 3 unset xtics unset ytics set multiplot layout 4,1 title "Auto-layout of stacked plots\n" set key autotitle column nobox samplen 1 noenhanced unset title set style data boxes set yrange [0 : 800000] plot 'immigration.dat' using 3 lt 1 plot 'immigration.dat' using 8 lt 3 set xtics nomirror set tics scale 0 font ",8" set xlabel "Immigration to U.S. by Decade" plot 'immigration.dat' using 21:xtic(1) lt 4 unset multiplot pause -1 "<cr> to continue" reset ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/approximate.dem������������������������������������������������������������������0000644�0004711�0000144�00000002213�11150400752�014066� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Show use of pseudodata mechanism '+' to use plot styles with more than # one relevant value per x coordinate. In this example we use the style # "filledcurves" to show the difference between two analytic functions. # This corresponds to the specification of multiple columns in the # 'using' option for input from data files. # # approx_1(x) = x - x**3/6 approx_2(x) = x - x**3/6 + x**5/120 approx_3(x) = x - x**3/6 + x**5/120 - x**7/5040 label1 = "x - {x^3}/3!" label2 = "x - {x^3}/3! + {x^5}/5!" label3 = "x - {x^3}/3! + {x^5}/5! - {x^7}/7!" # set termoption enhanced set encoding utf8 # set title "Polynomial approximation of sin(x)" set key Left center top reverse set xrange [ -3.2 : 3.2 ] set xtics ("-π" -pi, "-π/2" -pi/2, 0, "π/2" pi/2, "π" pi) set format y "%.1f" set samples 500 set style fill solid 0.4 noborder plot '+' using 1:(sin($1)):(approx_1($1)) with filledcurve title label1 lt 3, \ '+' using 1:(sin($1)):(approx_2($1)) with filledcurve title label2 lt 2, \ '+' using 1:(sin($1)):(approx_3($1)) with filledcurve title label3 lt 1, \ sin(x) with lines lw 1 lc rgb "black" pause -1 "Hit return to continue" reset �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/world2.dem�����������������������������������������������������������������������0000644�0004711�0000144�00000001700�10275353677�012772� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Plot of location on globe, # this time with labels color-coded by explicit 4th input column # Requires EAM_DATASTRINGS # set dummy u,v set angles degrees set parametric set view 60, 136, 1.22, 1.26 set samples 64,64 set isosamples 13,13 set mapping spherical unset xtics unset ytics unset ztics set border 0 set title "Labels colored by GeV plotted in spherical coordinate system" set urange [ -90.0000 : 90.0000 ] noreverse nowriteback set vrange [ 0.00000 : 360.000 ] noreverse nowriteback set cblabel "GeV" set cbrange [0:8] set colorb vert user size 0.02, 0.75 unset hidden splot cos(u)*cos(v),cos(u)*sin(v),sin(u) notitle with lines lt 5, \ 'world.dat' notitle with lines lt 2, \ 'srl.dat' using 3:2:(1):1:4 with labels notitle point pt 6 lw .1 left offset 1,0 font "Helvetica,7" tc pal pause -1 "Same plot with hidden line removal" set title "Labels with hidden line removal" set hidden nooffset replot pause -1 "Hit return to continue" ����������������������������������������������������������������gnuplot-4.6.4/demo/candlesticks.dem�����������������������������������������������������������������0000644�0004711�0000144�00000002536�11020157705�014217� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: candlesticks.dem,v 1.5 2008/05/31 05:19:01 sfeam Exp $ # reset # set xrange [0:11] set yrange [0:10] # set title "candlesticks with open boxes (default)" plot 'candlesticks.dat' using 1:3:2:6:5 with candlesticks # pause -1 "Hit return to continue" # set title "candlesticks with specified boxwidth" set boxwidth 0.2 replot # pause -1 "Hit return to continue" # set title "candlesticks with style fill solid" set style fill solid set boxwidth 0.2 replot # pause -1 "Hit return to continue" # set title "candlesticks showing both states of open/close" set style fill empty set boxwidth 0.2 plot 'candlesticks.dat' using 1:(int($0)%3?$3:$5):2:6:(int($0)%3?$5:$3) with candlesticks title "open < close", \ NaN with boxes lt 1 fs solid 1 title "close < open" # pause -1 "Hit return to continue" # set title "box-and-whisker plot adding median value as bar" set style fill empty plot 'candlesticks.dat' using 1:3:2:6:5 with candlesticks lt 3 lw 2 title 'Quartiles', \ '' using 1:4:4:4:4 with candlesticks lt -1 lw 2 notitle # pause -1 "Hit return to continue" # set title "box-and-whisker with median bar and whiskerbars" plot 'candlesticks.dat' using 1:3:2:6:5 with candlesticks lt 3 lw 2 title 'Quartiles' whiskerbars, \ '' using 1:4:4:4:4 with candlesticks lt -1 lw 2 notitle pause -1 "Hit return to continue" # reset ������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/fontfile_latex.dem���������������������������������������������������������������0000644�0004711�0000144�00000004473�07747400072�014566� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: fontfile_latex.dem,v 1.3 2003/10/28 05:35:54 sfeam Exp $ # # This file demonstrates new features in gnuplot 3.8i # -1- loading fontfiles for postscript output print "\n This file demonstrates how to use postscript type 1 font" print " files with gnuplot." print "\n Please note that this demo runs only on postscript terminal," print " because fontfile inclusion is only supported by this terminal." print "\n In addition, this demo needs two font files which are not" print " included in the gnuplot distribution." print " On unix systems with a teTeX installation at least \"cmmi10.pfb\" should be" print " found automatically." print " If not, they can be downloaded from the net:" print " ftp://ftp.dante.de/tex-archive/fonts/ps-type1/cm-super/pfb/sfrm1000.pfb" print " ftp://ftp.dante.de/tex-archive/fonts/cm/ps-type1/bluesky/pfb/cmmi10.pfb" print " Please put the files \"sfrm1000.pfb\" and \"cmmi10.pfb\"" print " somewhere they are found, e.g. into the working directory." pause -1 "Hit return to continue" # xmin=-270. xmax=270. ymin=-1.1 ymax=1.1 # reset set terminal push set terminal postscript enhanced linewidth 2 'SFRM1000' 22 \ fontfile 'sfrm1000.pfb' fontfile 'cmmi10.pfb' set output 'fontfile_latex.ps' unset autoscale set xr [xmin:xmax] set yr [ymin:ymax] # set encoding iso_8859_1 set format y '%.1f' set label 'Times-Roman: {/Times-Roman abcdefghABCDEFGH }' at graph 0.05,0.6 left set label 'SFRM1000: {/SFRM1000 abcdefghABCDEFGH }' at graph 0.05,0.5 left set label 'CMMI10: {/CMMI10 abcdefghABCDEFGH} {/CMMI10 \013\014\015\016\042}' at graph 0.05,0.4 left set xlabel '{/CMMI10 \013} / ' set ylabel '{/CMMI10 y}' plot sin(pi/180.*x) title '{/CMMI10 y} = sin {/CMMI10 \013}' print "\n Now have a look at the file fontfile_latex.ps" print "\n If you have installed TeX, you can generate a table with the" print " encoding of CMMI10 by typing \"tex testfont\"" print " answering \"cmmi10\"," print " and then typing \"\\table\\bye\"." print " Or have a look at the file \"ps_fontfile_doc.ps\" in the directory" print " docs/psdoc of the Gnuplot source distribution print " If the text \"SFRM1000\" looks like Helvetica you may have an old version" print " of the cm-super fonts. Then you will have to use lowercase font names or" print " download a new version." set output set terminal pop reset �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/lena.rgb�������������������������������������������������������������������������0000644�0004711�0000144�00000140000�10757622471�012476� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������~{z݆t݇r܄j݂k܁sބnstyvuwnUa?XAZHYJ[LVNYLXMXNZJTPVVZWX]Z_]b]d`cahfc`a^e`b^hfe`gcececgef_heeahdidhdghjlfcd_d`gcgcdad`hbh_e`fdkjc_daebc`edbadbadacaaba^`ZaV[LVQTfaumقq݊p܈p|hjn܂s߄rށig~ihہe܄iۄm݆qۂk܌mК՟ΙЎtKYOYY]]_]^[[`f\`Z^[[]^``_`Z\acaa__^^V[Y^݇zۅpvts߀lރlހgހi݀m݂lquyvoreS^<U=VCTKYHSIUHTJTJRJTNUVYX[^Y]X]Zb]c_dacab`e_b]ebfahcdaf`e_d^dcd`gcfbfcedijfed_c^eafab]d^f`d_c`dagec_b_cba`bb``cabaa`aa_`[_Z`SZLWNTc_slـp܈s܇p~j~j~jہm݂mހheހgށh܁f݁f܃k܅nۂjۅj̘՝Ҙߢ|QVMZW]Y\[]]]^`]`[^]\^]_^_^[\^```_^_^X\`_eeHU߃lށnpjkiހjހf߂imtqnjm_TX:O:QASDRFQHRIRFOGPKTOWSYY\\Z]Z_[_]a\a]b_c^b_b]d^b_gae_e]ead`ebdad_dabbb`c`ebb^`\d`d``\b^d`d_b]b^c_b_b_a^`]a^_]__a``]`]_^]`X]S[NUITU[jhyo܃r߇s݃m݀k߃jރj߃jki߁h߁iހg݂hہk܁lفhiߔsÏћԚȋzhLTQXWZ[]\_\^Z^Y\\\^[]\]]^\^^`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~։|҉|ъ~ч|хyӉ|ANALBMCN@K<GELdX|hqrqrlpaLP/C/F7H>LCMCNCMHOCLELLRMSPSKRpmhWDP@LEQITOZNTSXRYV_Zc`d]b\_P\aj؈Յ|؄΀}ԑԏڛܞڤ۬ןڦ٧צӛԟܩܲ٫޵޹߹ݾݽ޿ڵ͙ۺù¸¸·ຯvb|c{czcn^^dȸٹҴνȵŸ´ķ̾ǦQB\A`AbCa?^;_@e@c>N7x.Vwy}чՌ~ӊ{ӈ{҆{чyӇz҅yυyDPDOCMBLAN@MIMdWyelsqrmpbOQ/B.F7I=LCODODNCKBKBIFMKPMRCOцw}bWLVBQGTEPCPJSU\R\[a^bW]W`S[ckׄ}ւ|{x|y}zтݙڞڡ֛יۣإ٢ҙ՞۬٩۪٬ܬگܴݼڰϝٳعܾܾܿܿܿ׽ټ»ʽݔ}bx^vgؓôᾧױھʸŶ´´ĶɼÉ_oQB\C]@`Aa<\<^;e=^>dD\q҂z|́}֌Ӌ}ԉ|Ԉ{цy҈|Іzхx҄xDOAL@KCNBM@IKLfY}jnstwmr_NN0D/F;M=LBNBMCMCLALDNGMJNGM?O䡃xiZQUHTGVFSFUJSJSV]V\S[ZcS_ou{uxqws|zrs҃׍א؟֗Փؘآ۠щۢ؞؟ܦעڣإبܱءڦ֨װ׬կطڻٸٴض׺ҳѵ׺ۭwd܊߳ìݶشƻɺĶõŷŶȻr>[TF`H`A_>\8[>b>eCpL@_x{{{yӉ֋~ԋՉ}Ԉ{Ӊ{ІzІ{фzтzCNCNCNAKCJ?HKKfYhmquwpuaNP0C/D:J;J?LDOAL@J@LBMDNHNFM;Kur`UVEQJSFSKVLWPYU[T\\bR[foyu|wolwuil{{ֆ׍ՌԈח٢יӍӒڠכڢڟٞ؝֣ۯܮץ֤٬زԩ׵ٶٷٱد֬ײ԰ЮϮӭ׷ܪĭܷ۵ƶƶͶǺķ۾ƺԾYBWD`AaCaBY;a=cAj L4[iy|x{ЃԌ֋Ԋ҈҈~҈|х{цzυzІ}DRAO@N@L@KAKLMeY~foruroq`NO/B-C6G>L>KAL@MAL?LBKCJHNBMAOəsyaa\VRMRGTISLSLSX][`T`aiywtqopwrgkyx{yπ}р|Ӄٗךؖӌדۛٚܜٜٝ؝חٜؤإګةإ׫ֵԱس׬פҟԬҫЦ΢ȘԱܹڰ޷޽ɸȷ޼ݾĸŶຫٯķʾ̨L;[<\?a@Y>\=c>cBgITo|yy||ԉՍ~ԋԊ~Ӊ҈҈~҈}ч}ц|Ӈ{?MBPAN@MBM?HJNfV~dksuvoq_RS1F/F9H>J?KBM@JBMAK?JENGNCMJRɗsހgna^XQQGQGTKWQZT[JWdlootsqpqo`dvu}yӂ}oqvwӆՑ֒ρܘ۠ؔٓݝۡۚ֔؛Փ؛ڢםأڬץڰױ֣צ֨ӟӟԥ˕ʛܷ۳׫ݻĵƴòݾܿ޿ĸĸӖԙ๫ྮϸgqS=Y<_>^CZA`:bB^Dx,Us}}{y|҈ԍ֍֊Ռԉӈ}ӊ|҈zщ|ш{Ԉz@KAO?M@M?J?JJPh[hosvwnr`PS2F.F;L?MCOBNALAL@JBLCKDLAMJRĒoiuak][YJP<MGOSYKV_hqmjjoson[ets|wyvwx~~~tx҄|yݗܘ؏ٔؕ֐ژ֎ْԒוЌҒםנע٬բԢ՞ԙ֨ҞˍΗ׭޵دܹó΅۸ٹۼ߿ƺƶ֢΋՞ɂ|۪­c#DXB_E_?^>Z:_;]Ay0\Zr|{w{ςҊ֋։~׊Ԋщ~ъ~҈~Ӊ{Ӌ|Їyԇ}BM>K>K>J>K?LKRi]fovtvluaPR1F.G9K?MANAL?JAL@JAICKBK=KSWoezck_c]GNARJTFQaipnehllgiYdpospwupquuwuԂ}|wxڍԇ؇ܖ؏׏؍Ջە֋ӋΌӑؘؚٟ֔֔֝Ֆ՜є͗̑ҟݯרڱ޿ų࿭ݺڶٸ۹޾´·ĹȻ๩ʋלyͅݫQ 9V;^A]@Y9c?^>i PEfyzyz}ӈӌэыӈ~ъ~ыъ~҇|Їzӊ}Ј{щ}AO?L=I>L<L>KMRhYhnturoucST2H0H9K?MAM@M@MAK?JBK@IBL9Gebqkfn\i\UVIQCQ]donhmjk_hYdpptqsrpoilos}}rsyx؉ւՄԅԆ~φ׏ڑσ̓֒֎ْ֏ؒؔՒԍҍҕώɈϑܫ۪ۧṦ⾩ỡ۳۶۷ݺݼ···Źʼɸ͔ϔ˅ϋ̆忪VhS?ZB`=[B[AbA^Ds,XgyҀvyρӉԌӉц~Ӈ}шЉ~Љ}ЈzъzЇ{Ї}шz?LAO@N?L@KDKORhZhortqmweUW1E+C8I>O?N>M<JAM@LAJAJ?K6Gof|sjv]ua_X?KV]kj`hil`i\fmsllrqmpbmgm|~prptوԂsq|ƒup`wdp֊ٍ׊ՋՋُԋՊӌҋҌɀȅإݪע޴㾨໦ٳװشܹܺ޽ö÷ĸĸǻ̽۱̍ǃznkT`ΏǶV<T>]C^C]Ef%IcDbJAc|~zz|{Ӈ}֊~Ո~҈}ч|҆zч|҈{҈{чzЉ{ψ|χ|ЅzBOAO?MBOAMFNMRj[dprsqqxeQP/B)C7J?O@N?L?JAK@L>I@I>F5Elfēofa~bl^NX\__gdg^fXdilpokjjm_ffmuvjnrw}myQqfYrLiMjSs˂̆`~iq́~t~sMse|˃ݩ۝٧΅伨ṥڷطڷٺܾõķøĸƸ˽ƶϓkgAM=SpzôK 7W9]>[;^@gB_En&Sdt~{wxЄҋ~ԉӊ}҇}҇}чч}φ{Ї{ЇzΆ{І}΄z͆yBNBPCQBOCOEKQQl[fqstulxdRP/C+C4F=L?NANAMAN?M?L?G=G2BdcǗxjrXx`t[NVX^Y`[bVbglnjjjdj\ecijngomntwt}b{q]sRq?_3]y8jÈ͉l`Yz?qMxMr>go+Vc"Rl.Y\K˓ٞӎܪḧὪݸ߻ۺٹٹܽ´Ƹ÷ŹƷߴ~tKS7HAQ]k߭«_ <U<\>^<W;_;cA[DCdyy}{}ӊҍԋӋ~Ԋ}ц{ччІ}І}΅z΅|ͅ|΅z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YbZ^Vc[f]f\d]kbjcibkeohrjrhqgshshwkvjuitgxj|n}q߀u{ߎ}ݐߠ᪙ఝ䷨澱ôȸʻ̶ls8JFPLXQ^\b]a^\\XTSRSUS\W\UKS@QFZ@X:R;R7L3JHZcphu[kE\s+Hc<c9j"Az*B9HW;]<_Bt7VϫݾڼƗXYyft~|GZh%JW@Y>ZD`!Ko,Wm'Pr,Tk)Uk+\Wm/Vc Pv4dp9er2a|Erx@rKvi1XTCk)Sm0XYGn3`l-]Ptw)N+@4?;CGIMMRRUSXRZS^Y\X]V^V_XbY_W`Wf^f^aYd\hdjfkdpfqhqhpishshwkwkxjxjylzo߃sryߎޏޕߧ㯝䵤亪ĵǽͷ͓FdESCNNXS^_]h^aW\V]Uh\hZWSBL<O4K{3P>Y@W:Q>RWdkthtObr-Hc=^7b;u+G?REPgnuplot-4.6.4/demo/multiplt.dem���������������������������������������������������������������������0000644�0004711�0000144�00000006555�10451104662�013430� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# GNUPLOT v3.6 beta multiplot script file # # Second Order System Characteristics # # D**2 + 2*zeta*wn*D + (wn**2)y = (wn**2)*x # # x input variable # y output variable # w frequency ratio (w/wn) # wn natural frequency # wd damped natural frequency # zeta damping ratio # mag(w) amplitude response # phi(w) phase response # wdwn damped natural frequency ratio # wnt normalized time # # Plots: # Frequency domain magnitude response # phase response # # Time domain unit step response # unit impulse response # # # Created by: W. D. Kirby email: wdkirby@ix.netcom.com # Date: 1/18/96 # Released to the public domain with no warranty of any kind # reset set style function lines set size 1.0, 1.0 set origin 0.0, 0.0 set multiplot set size 0.5,0.5 set origin 0.0,0.5 set grid unset key set angles radians set samples 250 # Plot Magnitude Response set title "Second Order System Transfer Function - Magnitude" mag(w) = -10*log10( (1-w**2)**2 + 4*(zeta*w)**2) set dummy w set logscale x set xlabel "Frequency (w/wn)" set ylabel "Magnitude (dB)" offset 1,0 set label 1 "Damping =.1,.2,.3,.4,.5,.707,1.0,2.0" at .14,17 set xrange [.1:10] set yrange [-40:20] plot \ zeta=.1,mag(w), \ zeta=.2,mag(w), \ zeta=.3,mag(w), \ zeta=.4,mag(w), \ zeta=.5,mag(w), \ zeta=.707,mag(w), \ zeta=1.0,mag(w), \ zeta=2.0,mag(w),-6 # Plot Phase Response set size 0.5,0.5 set origin 0.0,0.0 set title "Second Order System Transfer Function - Phase" set label 1 "" set ylabel "Phase (deg)" offset 1,0 set ytics -180, 30, 0 set yrange [-180:0] tmp(w) = (-180/pi)*atan( 2*zeta*w/(1-w**2) ) # Fix for atan function wrap problem tmp1(w)= w<1?tmp(w):(tmp(w)-180) phi(w)=zeta==1?(-2*(180/pi)*atan(w)):tmp1(w) plot \ zeta=.1,phi(w), \ zeta=.2,phi(w), \ zeta=.3,phi(w), \ zeta=.4,phi(w), \ zeta=.5,phi(w), \ zeta=.707,phi(w), \ zeta=1,phi(w), \ zeta=2.0,phi(w), \ -90 # Plot Step Response set size 0.5,0.5 set origin 0.5,0.5 set dummy wnt unset logscale x set title "Second Order System - Unit Step Response" set ylabel "Amplitude y(wnt)" offset 1,0 set xlabel "Normalized Time (wnt)" set xrange [0:20] set xtics 0,5,20 set yrange [0:2.0] set ytics 0, .5, 2.0 set mytics 5 set mxtics 10 wdwn(zeta)=sqrt(1-zeta**2) shift(zeta) = atan(wdwn(zeta)/zeta) alpha(zeta)=zeta>1?sqrt(zeta**2-1.0):0 tau1(zeta)=1/(zeta-alpha(zeta)) tau2(zeta)=1/(zeta+alpha(zeta)) c1(zeta)=(zeta + alpha(zeta))/(2*alpha(zeta)) c2(zeta)=c1(zeta)-1 y1(wnt)=zeta==1?1 - exp(-wnt)*(wnt + 1):0 y2(wnt)=zeta<1?(1 - (exp(-zeta*wnt)/wdwn(zeta))*sin(wdwn(zeta)*wnt + shift(zeta))):y1(wnt) y(wnt)=zeta>1?1-c1(zeta)*exp(-wnt/tau1(zeta))+c2(zeta)*exp(-wnt/tau2(zeta)):y2(wnt) plot \ zeta=.1,y(wnt), \ zeta=.2,y(wnt), \ zeta=.3,y(wnt), \ zeta=.4,y(wnt), \ zeta=.5,y(wnt), \ zeta=.707,y(wnt), \ zeta=1,y(wnt), \ zeta=2,y(wnt) # # Plot Impulse Response set origin .5,0. set title "Second Order System - Unit Impulse Response" y(wnt)=exp(-zeta*wnt) * sin(wdwn(zeta)*wnt) / wdwn(zeta) set yrange [-1. :1.] set ytics -1,.5,1. plot \ zeta=.1,y(wnt), \ zeta=.2,y(wnt), \ zeta=.3,y(wnt), \ zeta=.4,y(wnt), \ zeta=.5,y(wnt), \ zeta=.707,y(wnt), \ zeta=1,y(wnt), \ zeta=2,y(wnt) unset multiplot pause -1 "Hit return to continue" # # Clean up: reset parameter defaults # reset ���������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/table.dat������������������������������������������������������������������������0000644�0004711�0000144�00000001216�10071446526�012643� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Month ppt(1992-2000) ppt(2000-2001) runoff(1992-2000) runoff(2000-2001) ##### ########### ########### ############ ############ mai 61 42.2 15.8 5.7 jun 57.7 69.2 10.4 1.2 jul 61.7 68.4 3.2 5.7 aug 74.9 68.4 3 1.6 sep 103.1 26.1 6.6 1.1 okt 66.1 144.7 21.3 93.6 nov 47.3 166.5 17.7 145.9 des 48.8 52.9 17.3 51.6 jan 55.7 43.4 8.3 0.9 feb 36.1 22.9 1.8 0 mar 39.1 37.5 10.8 5.4 apr 41 42.1 56.1 61.7 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/autoscale.dem��������������������������������������������������������������������0000644�0004711�0000144�00000004077�11450421176�013535� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: autoscale.dem,v 1.1 2010/09/28 17:14:38 sfeam Exp $ # Demo of constraint autoscaling: Autoscaling with limits. # set multiplot layout 2, 2 title "Autoscaling with constraints (y-axis always unaffected)" unset key # set title offset 0,-0.4 # set xlabel offset 0,0.4 set ytics 5 set title "unconstrained" set ylabel "[*:*]" set yrange [*:*] set xlabel "[*:*]" set xrange [*:*] plot "3.dat" set title "minimum range guaranteed" set ylabel "[*<-5:5<*]" set yrange [*<-5:5<*] set xlabel "[*<-40:30<*]" set xrange [*<-40:30<*] plot "3.dat" set title "clip to maximum range" set ylabel "[-20<*:*<20]" set yrange [-20<*:*<20] set xlabel "[-30<*:*<10]" set xrange [-30<*:*<10] plot "3.dat" set title "mixed" set xlabel "[-30<*<10:10<*<15]" set xrange [-30<*<10:10<*<15] set ylabel "[*:0<*<10]" set yrange [*:0<*<10] plot "3.dat" unset multiplot pause -1 "Hit return to continue" set multiplot layout 2, 2 title "Autoscaling with constraints (x-axis always unaffected)" unset key set ytics 5 set title "unconstrained" set ylabel "[*:*]" set yrange [*:*] set xlabel "[*:*]" offset 0, 0.4 set xrange [*:*] plot "3.dat" set title "minimum range guaranteed" set ylabel "[*<-15:20<*]" set yrange [*<-15:20<*] set xlabel "[*<-10:10<*]" set xrange [*<-10:10<*] plot "3.dat" set ytics 2 set title "clip to maximum range" set ylabel "[-8<*:*<5]" set yrange [-8<*:*<5] set xlabel "[-40<*:*<30]" set xrange [-40<*:*<30] plot "3.dat" set title "mixed" set xlabel "[-30<*<10:-10<*<45]" set xrange [-30<*<10:-10<*<45] set ylabel "[-8<*<-6:7<*<9]" set yrange [-8<*<-6:7<*<9] plot "3.dat" unset multiplot pause -1 "Hit return to continue" unset xlabel unset ylabel set multiplot layout 2, 2 title "Autoscaling with constraints" set ytics 50 set autoscale xy set title "autoscale xy" plot "silver.dat" set yrange [15<*<25:*] set title "set yrange [15<*<25:*]" plot "silver.dat" set autoscale ymin set title "set autoscale ymin" plot "silver.dat" set ytics 20 set yrange [15<*<25:135<*<225] set title "set yrange [15<*<25:135<*<225]" plot "silver.dat" unset multiplot pause -1 "Hit return to continue" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/starmap.dem����������������������������������������������������������������������0000644�0004711�0000144�00000001117�10451104662�013212� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������reset set pm3d set datafile separator '\t' set border 0 unset xtics unset ytics unset ztics set cbrange [0:100] set view 42,100, 1.3 set colorbox horiz user origin .1,.1 size .8,.04 # # set palette color rgbformula -33,-13,-10 # set title "Gliese star catalog - 7 parsec neighborhood centered on Earth" set cblabel "Luminosity" offset 0,1 # splot 'nearmap.csv' using 5:6:7:11 with points pt 6 ps 2 pal notitle, \ '' using 5:6:7:11 with points pt 7 ps 1 pal notitle, \ '' using 5:6:7:2 with labels font "Helvetica,9" left \ point pt 0 offset 1,0 notitle # pause -1 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/electron.dem���������������������������������������������������������������������0000644�0004711�0000144�00000004043�11317254253�013363� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: electron.dem,v 1.10 2010/01/01 02:06:35 sfeam Exp $ # # Electronics demo # # Bipolar Transistor (NPN) Mutual Characteristic Ie(Vbe)=Ies*exp(Vbe/kT_q) Ic(Vbe)=alpha*Ie(Vbe)+Ico alpha = 0.99 Ies = 4e-14 Ico = 1e-09 kT_q = 0.025 set dummy Vbe set grid set offsets unset log unset polar set samples 160 set title "Mutual Characteristic of a Transistor" set xlabel "Vbe (base emmitter voltage)" set xrange [0 : 0.75] set ylabel "Ic (collector current)" set yrange [0 : 0.005] set key box set key at .2,.0045 set format y "%.4f" plot Ic(Vbe) set format "%g" pause -1 "Hit return to continue" # Junction Field Effect Transistor (JFET) Mutual Characteristic # drain current above pinch off Ida(Vd)=Ido*(1-Vg/Vp)**2 # drain current below pinch off Idb(Vd)=Ido*(2*Vd*(Vg-Vp)-Vd*Vd)/(Vp*Vp) # drain current Id(Vd)= (Vd>Vg-Vp) ? Ida(Vd) : Idb(Vd) # drain current at zero gate voltage Ido = 2.5 # pinch off voltage Vp = -1.25 # gate voltage Vg = 0 set dummy Vd unset grid unset key #set offsets 0, 1, 0, 0 set title "JFET Mutual Characteristic" set xlabel "Drain voltage Vd (V)" set xrange [0 : 4] set ylabel "Drain current Id (mA)" set yrange [0 : 5] set rmargin 12 set label 1 "-0.5 Vp" at 4.1,0.625 set label 2 "-0.25 Vp" at 4.1,1.4 set label 3 "0" at 4.1,2.5 set label 4 "Vg = 0.5 Vp" at 4.1,3.9 plot Vg=0.5*Vp,Id(Vd),Vg=0.25*Vp,Id(Vd),Vg=0,Id(Vd),Vg=-0.25*Vp,Id(Vd) pause -1 "Hit return to continue" unset label unset rmargin # show off double axes # amplitude frequency response A(jw) = ({0,1}*jw/({0,1}*jw+p1)) * (1/(1+{0,1}*jw/p2)) p1 = 10 p2 = 10000 set dummy jw set grid x y2 set logscale xy set log x2 unset log y2 set key default set key bottom center box set title "Amplitude and Phase Frequency Response" set xlabel "jw (radians)" set xrange [1.1 : 90000.0] set ylabel "magnitude of A(jw)" set y2label "Phase of A(jw) (degrees)" set ytics nomirror tc lt 1 set y2tics nomirror tc lt 3 set xtics mirror set tics out set autoscale y set autoscale y2 plot abs(A(jw)) lt 1, 180/pi*arg(A(jw)) axes x1y2 lt 3 pause -1 "Hit return to continue" # undo what we've done reset ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/fillcrvs.dem���������������������������������������������������������������������0000644�0004711�0000144�00000004337�10623657651�013412� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: fillcrvs.dem,v 1.6 2007/05/19 20:35:53 sfeam Exp $ # ### Demo for 'with filledcurves' reset set title set key outside set title "plot with filledcurve [options]" plot [-10:10] [-5:3] \ 1.5+sin(x)/x with filledcurve x2, \ sin(x)/x with filledcurve, \ 1+sin(x)/x with lines, \ -1+sin(x)/x with filledcurve y1=-2, \ -2.5+sin(x)/x with filledcurve xy=-5,-4., \ -4.3+sin(x)/x with filledcurve x1, \ (x>3.5 ? x/3-3 : 1/0) with filledcurve y2 pause -1 'Press Return to continue' set key on set title "Intersection of two parabolas" plot x*x with filledcurves, 50-x*x with filledcurves, x*x with line lt 1 pause -1 'Press Return to continue' set grid front set title "Filled sinus and cosinus curves" plot 2+sin(x)**2 with filledcurve x1, cos(x)**2 with filledcurve x1 pause -1 'Press Return to continue' set title "The red bat: abs(x) with filledcurve xy=2,5" plot abs(x) with filledcurve xy=2,5 pause -1 'Press Return to continue' set title "Some sqrt stripes on filled graph background" plot [0:10] [-8:6] \ -8 with filledcurve x2 lt 15, \ sqrt(x) with filledcurves y1=-0.5, \ sqrt(10-x)-4.5 with filledcurves y1=-5.5 pause -1 'Press Return to continue' reset set title "Let's smile with parametric filled curves" set size square set key off unset border unset xtics unset ytics set grid set arrow 1 from -0.1,0.26 to 0.18,-0.17 front size 0.1,40 lt 5 lw 4 set label 1 "gnuplot" at 0,1.2 center front set label 2 "gnuplot" at 0.02,-0.6 center front set parametric set xrange [-1:1] set yrange [-1:1.6] plot [t=-pi:pi] \ sin(t),cos(t) with filledcurve xy=0,0 lt 15, \ sin(t)/8-0.5,cos(t)/8+0.4 with filledcurve lt 3, \ sin(t)/8+0.5,cos(t)/8+0.4 with filledcurve lt 3, \ t/5,abs(t/5)-0.8 with filledcurve xy=0.1,-0.5 lt 1, \ t/3,1.52-abs(t/pi) with filledcurve xy=0,1.8 lt -1 pause -1 'Press Return to continue' reset set title "world.dat plotted with filledcurves" set format x "" set format y "" set grid layerdefault linewidth 0.5 set object 1 rect from graph 0, 0 to graph 1, 1 behind fc rgb "#afffff" fillstyle solid 1.00 border -1 set xrange [ -180.000 : 180.000 ] set yrange [ -70.0000 : 80.0000 ] set lmargin 1 plot 'world.dat' with filledcurve notitle fs solid 1.0 lc rgb 'dark-goldenrod' pause -1 'Press Return to continue' reset �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/ellipses.dat���������������������������������������������������������������������0000644�0004711�0000144�00000000133�11415255032�013362� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0 0 5 4 0 1 0xbcde43 5 5 6 10 30 2 0x785678 0 10 10 6 60 3 0x235698 10 0 3 7 84 4 0x12fdad �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/hidden.dem�����������������������������������������������������������������������0000644�0004711�0000144�00000002035�07747400072�013006� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: hidden.dem,v 1.7 2003/10/28 05:35:54 sfeam Exp $ # # set samples 20 set isosamples 20 set hidden3d set title "Hidden line removal of explicit surfaces" set xrange [-3:3] set yrange [-2:2] splot 1 / (x*x + y*y + 1) pause -1 "Hit return to continue (1)" set xrange [-1:1] set yrange [-1:1] splot x*y / (x**2 + y**2 + 0.1) pause -1 "Hit return to continue (2)" set view 70,45 unset contour set xrange [-3:3] set yrange [-3:3] splot sin(x*x + y*y) / (x*x + y*y) pause -1 "Hit return to continue (3)" set view 60,30 set xrange [-3:3] set yrange [-3:3] set zrange [-1:1] set ztics -1,0.5,1 set grid z set border 4095 splot sin(x) * cos(y) pause -1 "Hit return to continue (4)" unset grid set ztics autofreq set border 31 set view 75,230 set contour replot pause -1 "Hit return to continue (5)" set view 80,30,1,1 set style data lines # autoranging loses the verticals set xrange [0:15] set yrange [0:15] splot "glass.dat" using 1 pause -1 "Hit return to continue (6)" set view 50 set grid replot pause -1 "Hit return to continue (7)" reset ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/asciimat.dat���������������������������������������������������������������������0000644�0004711�0000144�00000001606�10115371145�013342� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10 2 3 4 5 6 7 8 9 10 11 3 4 5 6 7 8 9 10 11 12 4 5 6 7 8 9 10 11 12 13 5 6 7 8 9 10 11 12 13 14 6 7 8 9 10 11 12 13 14 15 7 8 9 10 11 12 13 14 15 16 8 9 10 11 12 13 14 15 16 17 9 10 11 12 13 14 15 16 17 18 ��������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/rectangle.dem��������������������������������������������������������������������0000644�0004711�0000144�00000003476�10566246172�013533� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# demo for the use of "set object rectangle" # # Ethan A Merritt - 2006 if ((GPVAL_VERSION == 4.3 || GPVAL_VERSION == 4.2) \ && (!strstrt(GPVAL_COMPILE_OPTIONS,"+OBJECTS"))) \ print ">>> Skipping demo <<<\n" ; \ print "This copy of gnuplot was built without support for placing rectangles\n" ; \ exit ; set style line 1 bgnd set style line 2 lt rgb "cyan" set object 1 rect from 0,0 to 1,4 fc lt 2 set object 2 rect from -1,1 to 0,5 fc rgb "gold" set object 5 rect from 0, -3 to 2, -2 fc ls 2 fs pattern 1 bo -1 set style fill pattern 2 bo 1 # # Illustrate putting a different color under the key box # set key nobox set object 7 rect from graph 0.65,graph 0.85 to graph 0.99, graph 0.99 fc ls 1 # # Illustrate using character widths to put a box around a label # LABEL = "Label in a box" set obj 10 rect at -3,-4 size char strlen(LABEL), char 1 set obj 10 fillstyle empty border -1 front set label 10 at -3,-4 LABEL front center set obj 9 rect from -4, -4 to -4, -3 fc lt -1 set obj 20 rect from graph 0, graph 0 to graph 1, graph 1 fs solid 0.15 fc rgb "#FFD700" behind plot [-5:5] x, -3+sin(x*5)/x lt 3 lw 3 pause -1 "Hit return to continue" reset # # Requires data file "using.dat" from this directory, # so change current working directory to this directory before running. # set xrange [1:8] set title "Convex November 1-7 1989" set key below set label "(Weekend)" at 5,25 center set style rect fc lt -1 fs solid 0.15 noborder set obj rect from 1, graph 0 to 2, graph 1 set obj rect from 3, graph 0 to 4, graph 1 set obj rect from 5, graph 0 to 6, graph 1 set obj rect from 7, graph 0 to 8, graph 1 plot 'using.dat' using 3:4 title "Logged in" with impulses,\ 'using.dat' using 3:5 t "Load average" with points,\ 'using.dat' using 3:6 t "%CPU used" with lines pause -1 "Hit return to continue" reset ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/fillstyle.dem��������������������������������������������������������������������0000644�0004711�0000144�00000003145�07744002175�013564� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: fillstyle.dem,v 1.3 2003/10/17 15:02:21 mikulik Exp $ # # E A Merritt <merritt@u.washington.edu> 24-Sep-2002 # # Demo for revised fillstyle code selected by # ./configure --enable-filledboxes --enable-relative-boxwidth # reset set samples 25 unset xtics unset ytics set yrange [0:120] set title "A demonstration of boxes with default properties" plot [-10:10] 100/(1.0+x*x) title 'distribution' with boxes pause -1 "Now draw the boxes with solid fill" set title "A demonstration of boxes with style fill solid 1.0" set style fill solid 1.0 replot pause -1 "Now draw the boxes with a black border" set title "A demonstration of boxes with style fill solid border -1" set style fill solid border -1 replot pause -1 "Now make the boxes a little less wide" set title "Filled boxes of reduced width" set boxwidth 0.5 replot pause -1 "And now let's try a different fill density" set title "Filled boxes at 50% fill density" set style fill solid 0.25 border replot pause -1 "Now draw the boxes with no border" set title "A demonstration of boxes with style fill solid 0.25 noborder" set style fill solid 0.25 noborder replot pause -1 "Or maybe a pattern fill, instead?" set title "A demonstration of boxes in mono with style fill pattern" set samples 11 set boxwidth 0.5 set style fill pattern border plot [-2.5:4.5] 100/(1.0+x*x) title 'pattern 0' with boxes lt -1, \ 80/(1.0+x*x) title 'pattern 1' with boxes lt -1, \ 40/(1.0+x*x) title 'pattern 2' with boxes lt -1, \ 20/(1.0+x*x) title 'pattern 3' with boxes lt -1 pause -1 "Finished this demo" reset ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/prob2.dem������������������������������������������������������������������������0000644�0004711�0000144�00000024213�11210415641�012565� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: prob2.dem,v 1.10 2009/05/31 05:54:41 sfeam Exp $ # # Demo Statistical Approximations version 1.1 # # Copyright (c) 1991, Jos van der Woude, jvdwoude@hut.nl # History: # -- --- 1991 Jos van der Woude: 1st version # 06 Jun 2006 Dan Sebald: Added plot methods for better visual effect. print "" print "" print "" print "" print "" print "" print " Statistical Approximations, version 1.1" print "" print " Copyright (c) 1991, 1992, Jos van de Woude, jvdwoude@hut.nl" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print " NOTE: contains 10 plots and consequently takes some time to run" print " Press Ctrl-C to exit right now" print "" pause -1 " Press Return to start demo ..." load "stat.inc" rnd(x) = floor(x+0.5) r_xmin = -1 r_sigma = 4.0 # Binomial PDF using normal approximation n = 25; p = 0.15 mu = n * p sigma = sqrt(n * p * (1.0 - p)) xmin = floor(mu - r_sigma * sigma) xmin = xmin < r_xmin ? r_xmin : xmin xmax = ceil(mu + r_sigma * sigma) ymax = 1.1 * binom(floor((n+1)*p), n, p) #mode of binomial PDF used set key box unset zeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] set xlabel "k, x ->" set ylabel "probability density ->" set ytics 0, ymax / 10.0, ymax set format x "%2.0f" set format y "%3.2f" set sample 200 set title "binomial PDF using normal approximation" set arrow from mu, 0 to mu, normal(mu, mu, sigma) nohead set arrow from mu, normal(mu + sigma, mu, sigma) \ to mu + sigma, normal(mu + sigma, mu, sigma) nohead set label "mu" at mu + 0.5, ymax / 10 set label "sigma" at mu + 0.5 + sigma, normal(mu + sigma, mu, sigma) plot binom(rnd(x), n, p) with histeps, normal(x, mu, sigma) pause -1 "Hit return to continue" unset arrow unset label # Binomial PDF using poisson approximation n = 50; p = 0.1 mu = n * p sigma = sqrt(mu) xmin = floor(mu - r_sigma * sigma) xmin = xmin < r_xmin ? r_xmin : xmin xmax = ceil(mu + r_sigma * sigma) ymax = 1.1 * binom(floor((n+1)*p), n, p) #mode of binomial PDF used set key box unset zeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] set xlabel "k ->" set ylabel "probability density ->" set ytics 0, ymax / 10.0, ymax set format x "%2.0f" set format y "%3.2f" set sample (xmax - xmin + 3) set title "binomial PDF using poisson approximation" set arrow from mu, 0 to mu, normal(mu, mu, sigma) nohead set arrow from mu, normal(mu + sigma, mu, sigma) \ to mu + sigma, normal(mu + sigma, mu, sigma) nohead set label "mu" at mu + 0.5, ymax / 10 set label "sigma" at mu + 0.5 + sigma, normal(mu + sigma, mu, sigma) plot binom(x, n, p) with histeps, poisson(x, mu) with histeps pause -1 "Hit return to continue" unset arrow unset label # Geometric PDF using gamma approximation p = 0.3 mu = (1.0 - p) / p sigma = sqrt(mu / p) lambda = p rho = 1.0 - p xmin = floor(mu - r_sigma * sigma) xmin = xmin < r_xmin ? r_xmin : xmin xmax = ceil(mu + r_sigma * sigma) ymax = 1.1 * p set key box unset zeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] set xlabel "k, x ->" set ylabel "probability density ->" set ytics 0, ymax / 10.0, ymax set format x "%2.0f" set format y "%3.2f" set sample 200 set title "geometric PDF using gamma approximation" set arrow from mu, 0 to mu, gmm(mu, rho, lambda) nohead set arrow from mu, gmm(mu + sigma, rho, lambda) \ to mu + sigma, gmm(mu + sigma, rho, lambda) nohead set label "mu" at mu + 0.5, ymax / 10 set label "sigma" at mu + 0.5 + sigma, gmm(mu + sigma, rho, lambda) plot geometric(rnd(x),p) with histeps, gmm(x, rho, lambda) pause -1 "Hit return to continue" unset arrow unset label # Geometric PDF using normal approximation p = 0.3 mu = (1.0 - p) / p sigma = sqrt(mu / p) xmin = floor(mu - r_sigma * sigma) xmin = xmin < r_xmin ? r_xmin : xmin xmax = ceil(mu + r_sigma * sigma) ymax = 1.1 * p set key box unset zeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] set xlabel "k, x ->" set ylabel "probability density ->" set ytics 0, ymax / 10.0, ymax set format x "%2.0f" set format y "%3.2f" set sample 200 set title "geometric PDF using normal approximation" set arrow from mu, 0 to mu, normal(mu, mu, sigma) nohead set arrow from mu, normal(mu + sigma, mu, sigma) \ to mu + sigma, normal(mu + sigma, mu, sigma) nohead set label "mu" at mu + 0.5, ymax / 10 set label "sigma" at mu + 0.5 + sigma, normal(mu + sigma, mu, sigma) plot geometric(rnd(x),p) with histeps, normal(x, mu, sigma) pause -1 "Hit return to continue" unset arrow unset label # Hypergeometric PDF using binomial approximation nn = 75; mm = 25; n = 10 p = real(mm) / nn mu = n * p sigma = sqrt(real(nn - n) / (nn - 1.0) * n * p * (1.0 - p)) xmin = floor(mu - r_sigma * sigma) xmin = xmin < r_xmin ? r_xmin : xmin xmax = ceil(mu + r_sigma * sigma) ymax = 1.1 * hypgeo(floor(mu), nn, mm, n) #mode of binom PDF used set key box unset zeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] set xlabel "k ->" set ylabel "probability density ->" set ytics 0, ymax / 10.0, ymax set format x "%2.0f" set format y "%3.2f" set sample (xmax - xmin + 3) set title "hypergeometric PDF using binomial approximation" set arrow from mu, 0 to mu, binom(floor(mu), n, p) nohead set arrow from mu, binom(floor(mu + sigma), n, p) \ to mu + sigma, binom(floor(mu + sigma), n, p) nohead set label "mu" at mu + 0.5, ymax / 10 set label "sigma" at mu + 0.5 + sigma, binom(floor(mu + sigma), n, p) plot hypgeo(x, nn, mm, n) with histeps, binom(x, n, p) with histeps pause -1 "Hit return to continue" unset arrow unset label # Hypergeometric PDF using normal approximation nn = 75; mm = 25; n = 10 p = real(mm) / nn mu = n * p sigma = sqrt(real(nn - n) / (nn - 1.0) * n * p * (1.0 - p)) xmin = floor(mu - r_sigma * sigma) xmin = xmin < r_xmin ? r_xmin : xmin xmax = ceil(mu + r_sigma * sigma) ymax = 1.1 * hypgeo(floor(mu), nn, mm, n) #mode of binom PDF used set key box unset zeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] set xlabel "k, x ->" set ylabel "probability density ->" set ytics 0, ymax / 10.0, ymax set format x "%2.0f" set format y "%3.2f" set sample 200 set title "hypergeometric PDF using normal approximation" set arrow from mu, 0 to mu, normal(mu, mu, sigma) nohead set arrow from mu, normal(mu + sigma, mu, sigma) \ to mu + sigma, normal(mu + sigma, mu, sigma) nohead set label "mu" at mu + 0.5, ymax / 10 set label "sigma" at mu + 0.5 + sigma, normal(mu + sigma, mu, sigma) plot hypgeo(rnd(x), nn, mm, n) with histeps, normal(x, mu, sigma) pause -1 "Hit return to continue" unset arrow unset label # Negative binomial PDF using gamma approximation r = 8; p = 0.6 mu = r * (1.0 - p) / p sigma = sqrt(mu / p) lambda = p rho = r * (1.0 - p) xmin = floor(mu - r_sigma * sigma) xmin = xmin < r_xmin ? r_xmin : xmin xmax = ceil(mu + r_sigma * sigma) ymax = 1.1 * gmm((rho - 1) / lambda, rho, lambda) #mode of gamma PDF used set key box unset zeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] set xlabel "k, x ->" set ylabel "probability density ->" set ytics 0, ymax / 10.0, ymax set format x "%2.0f" set format y "%3.2f" set sample 200 set title "negative binomial PDF using gamma approximation" set arrow from mu, 0 to mu, gmm(mu, rho, lambda) nohead set arrow from mu, gmm(mu + sigma, rho, lambda) \ to mu + sigma, gmm(mu + sigma, rho, lambda) nohead set label "mu" at mu + 0.5, ymax / 10 set label "sigma" at mu + 0.5 + sigma, gmm(mu + sigma, rho, lambda) plot negbin(rnd(x), r, p) with histeps, gmm(x, rho, lambda) pause -1 "Hit return to continue" unset arrow unset label # Negative binomial PDF using normal approximation r = 8; p = 0.4 mu = r * (1.0 - p) / p sigma = sqrt(mu / p) xmin = floor(mu - r_sigma * sigma) xmin = xmin < r_xmin ? r_xmin : xmin xmax = ceil(mu + r_sigma * sigma) ymax = 1.1 * negbin(floor((r-1)*(1-p)/p), r, p) #mode of gamma PDF used set key box unset zeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] set xlabel "k, x ->" set ylabel "probability density ->" set ytics 0, ymax / 10.0, ymax set format x "%2.0f" set format y "%3.2f" set sample 200 set title "negative binomial PDF using normal approximation" set arrow from mu, 0 to mu, normal(mu, mu, sigma) nohead set arrow from mu, normal(mu + sigma, mu, sigma) \ to mu + sigma, normal(mu + sigma, mu, sigma) nohead set label "mu" at mu + 0.5, ymax / 10 set label "sigma" at mu + 0.5 + sigma, normal(mu + sigma, mu, sigma) plot negbin(rnd(x), r, p) with histeps, normal(x, mu, sigma) pause -1 "Hit return to continue" unset arrow unset label # Normal PDF using logistic approximation mu = 1.0; sigma = 1.5 a = mu lambda = pi / (sqrt(3.0) * sigma) xmin = mu - r_sigma * sigma xmax = mu + r_sigma * sigma ymax = 1.1 * logistic(mu, a, lambda) #mode of logistic PDF used set key box unset zeroaxis set xrange [xmin: xmax] set yrange [0 : ymax] set xlabel "x ->" set ylabel "probability density ->" set ytics 0, ymax / 10.0, ymax set format x "%.1f" set format y "%.2f" set sample 200 set title "normal PDF using logistic approximation" set arrow from mu,0 to mu, normal(mu, mu, sigma) nohead set arrow from mu, normal(mu + sigma, mu, sigma) \ to mu + sigma, normal(mu + sigma, mu, sigma) nohead set label "mu" at mu + 0.5, ymax / 10 set label "sigma" at mu + 0.5 + sigma, normal(mu + sigma, mu, sigma) plot logistic(x, a, lambda), normal(x, mu, sigma) pause -1 "Hit return to continue" unset arrow unset label # Poisson PDF using normal approximation mu = 5.0 sigma = sqrt(mu) xmin = floor(mu - r_sigma * sigma) xmin = xmin < r_xmin ? r_xmin : xmin xmax = ceil(mu + r_sigma * sigma) ymax = 1.1 * poisson(mu, mu) #mode of poisson PDF used set key box unset zeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] set xlabel "k, x ->" set ylabel "probability density ->" set ytics 0, ymax / 10.0, ymax set format x "%2.0f" set format y "%3.2f" set sample 200 set title "poisson PDF using normal approximation" set arrow from mu, 0 to mu, normal(mu, mu, sigma) nohead set arrow from mu, normal(mu + sigma, mu, sigma) \ to mu + sigma, normal(mu + sigma, mu, sigma) nohead set label "mu" at mu + 0.5, ymax / 10 set label "sigma" at mu + 0.5 + sigma, normal(mu + sigma, mu, sigma) plot poisson(rnd(x), mu) with histeps, normal(x, mu, sigma) pause -1 "Hit return to continue" reset �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/dashcolor.dem��������������������������������������������������������������������0000644�0004711�0000144�00000004131�11474635633�013535� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Demonstrate explicit choice of both dot/dash pattern (linetype) and color (linecolor). # set termoption dash reset set xrange [-0.5:3.5] set yrange [-1:1.4] set bmargin 7 unset ytics unset xtics # set title "Independent colors and dot/dash styles" unset colorbox # # define line styles using explicit rgbcolor names # set style line 1 lt 2 lc rgb "red" lw 3 set style line 2 lt 2 lc rgb "orange" lw 2 set style line 3 lt 2 lc rgb "yellow" lw 3 set style line 4 lt 2 lc rgb "green" lw 2 # set label 1 'set style line 1 lt 2 lc rgb "red" lw 3' at -0.4, -0.25 tc rgb "red" set label 2 'set style line 2 lt 2 lc rgb "orange" lw 2' at -0.4, -0.35 tc rgb "orange" set label 3 'set style line 3 lt 2 lc rgb "yellow" lw 3' at -0.4, -0.45 tc rgb "yellow" set label 4 'set style line 4 lt 2 lc rgb "green" lw 2' at -0.4, -0.55 tc rgb "green" set label 5 'plot ... lt 1 lc 3 ' at -0.4, -0.65 tc lt 3 set label 6 'plot ... lt 3 lc 3 ' at -0.4, -0.75 tc lt 3 set label 7 'plot ... lt 5 lc 3 ' at -0.4, -0.85 tc lt 3 # set xlabel "You will only see dashed lines if your current terminal setting permits it" # show style line # # draw some plots # plot cos(x) ls 1 title 'ls 1', \ cos(x-.2) ls 2 title 'ls 2',\ cos(x-.4) ls 3 title 'ls 3',\ cos(x-.6) ls 4 title 'ls 4', \ cos(x-.8) lt 1 lc 3 title 'lt 1 lc 3', \ cos(x-1.) lt 3 lc 3 title 'lt 3 lc 3', \ cos(x-1.2) lt 5 lc 3 title 'lt 5 lc 3' # pause -1 "Hit return to continue" unset for [i=1:8] label i set title "The pointinterval property is another way to create interrupted lines" set xlabel "This technique works best for equally spaced data points" set bmargin 6 set offset .05, .05 set xrange [-0.5:3.3] set style func linespoints plot cos(x) lt -1 pi -4 pt 6 title 'pi -4', \ cos(x-.8) lt -1 pi -3 pt 7 ps 0.2 title 'pi -3 pt 7 ps 0.2', \ cos(x-.2) lt -1 pi -6 pt 7 title 'pi -6',\ cos(x-.4) lt -1 pi -3 pt 4 title 'pi -3',\ cos(x-.6) lt -1 pi -5 pt 5 title 'pi -5', \ cos(x-1.) with line lt -1 notitle, \ cos(x+.2) with line lt -1 lw 2 title 'lw 2' # pause -1 "Hit return to continue" reset ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/big_peak.dat���������������������������������������������������������������������0000644�0004711�0000144�00000000512�06515203631�013307� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: big_peak.dat,v 1.1.1.1 1998/04/15 19:16:41 lhecking Exp $ # 26.500000 0.753252 0.012953 27.000000 0.877710 0.019712 27.500000 0.996531 0.021018 27.500000 0.940807 0.014499 28.000000 1.015178 0.021216 28.000000 0.984822 0.014840 28.500000 0.960538 0.020631 28.500000 0.930182 0.014416 29.000000 0.750650 0.018215 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/charset.dem����������������������������������������������������������������������0000644�0004711�0000144�00000003630�07772417240�013211� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Dump all (8-bit) characters by octal code value # set title "Complete dump of characters for this font and encoding" # set border 0 unset xtics unset ytics # set label 11 "001-040:" at graph 0.02, 0.9 set label 12 "041-100:" at graph 0.02, 0.8 set label 13 "101-140:" at graph 0.02, 0.7 set label 14 "141-200:" at graph 0.02, 0.6 set label 15 "201-240:" at graph 0.02, 0.5 set label 16 "241-300:" at graph 0.02, 0.4 set label 17 "301-340:" at graph 0.02, 0.3 set label 18 "341-376:" at graph 0.02, 0.2 # set label 1 at graph 0.2, 0.9 set label 2 at graph 0.2, 0.8 set label 3 at graph 0.2, 0.7 set label 4 at graph 0.2, 0.6 set label 5 at graph 0.2, 0.5 set label 6 at graph 0.2, 0.4 set label 7 at graph 0.2, 0.3 set label 8 at graph 0.2, 0.2 # set label 1 "\001\002\003\004\005\006\007\010\011 \013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040" set label 2 "\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100" set label 3 "\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140" set label 4 "\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200" set label 5 "\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240" set label 6 "\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300" set label 7 "\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340" set label 8 "\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376" # set xrange [-1:1] set yrange [-1:1] plot -10 notitle reset ��������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/silver.dat�����������������������������������������������������������������������0000644�0004711�0000144�00000003471�06515203632�013062� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: silver.dat,v 1.1.1.1 1998/04/15 19:16:42 lhecking Exp $ # 10.000000 280.000000 16.733201 20.000000 191.000000 13.820275 30.000000 152.000000 12.328828 40.000000 150.000000 12.247449 50.000000 104.000000 10.198039 60.000000 77.000000 8.774964 70.000000 69.000000 8.306624 80.000000 60.000000 7.745967 90.000000 60.000000 7.745967 100.000000 51.000000 7.141428 110.000000 41.000000 6.403124 120.000000 34.000000 5.830952 130.000000 35.000000 5.916080 140.000000 34.000000 5.830952 150.000000 24.000000 4.898979 160.000000 24.000000 4.898979 170.000000 19.000000 4.358899 180.000000 21.000000 4.582576 190.000000 20.000000 4.472136 200.000000 18.000000 4.242641 210.000000 21.000000 4.582576 220.000000 15.000000 3.872983 230.000000 19.000000 4.358899 240.000000 12.000000 3.464102 250.000000 20.000000 4.472136 260.000000 20.000000 4.472136 270.000000 18.000000 4.242641 280.000000 18.000000 4.242641 290.000000 20.000000 4.472136 300.000000 12.000000 3.464102 310.000000 26.000000 5.099020 320.000000 17.000000 4.123106 330.000000 8.000000 2.828427 340.000000 6.000000 2.449490 350.000000 8.000000 2.828427 360.000000 10.000000 3.162278 370.000000 20.000000 4.472136 380.000000 14.000000 3.741657 390.000000 8.000000 2.828427 400.000000 10.000000 3.162278 410.000000 9.000000 3.000000 420.000000 8.000000 2.828427 430.000000 10.000000 3.162278 440.000000 13.000000 3.605551 450.000000 9.000000 3.000000 460.000000 5.000000 2.236068 470.000000 7.000000 2.645751 480.000000 11.000000 3.316625 500.000000 7.000000 2.645751 510.000000 9.000000 3.000000 520.000000 12.000000 3.464102 530.000000 4.000000 2.000000 540.000000 7.000000 2.645751 550.000000 10.000000 3.162278 560.000000 9.000000 3.000000 580.000000 8.000000 2.828427 590.000000 9.000000 3.000000 600.000000 5.000000 2.236068 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/html/����������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�012005� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/html/canvas_utf8.dem�������������������������������������������������������������0000644�0004711�0000144�00000005466�12051247736�014753� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Ethan A Merritt - April 2009 # # Test/Demonstration of UTF-8 support by gnuplot canvas terminal. # # First we dump all 7-bit characters by octal code value, then display a # selection of 8-bit unicode (UTF-8) characters from various code points. # set term canvas size 700,500 fsize 15 jsdir "." set output 'canvas_utf8.html' # set encoding utf8 set termoption enhanced # set label 100 at screen 0.5, 0.95 center set label 100 "Dump ascii characters and supported UTF-8 unicode characters" # set border 0 unset xtics unset ytics # set label 101 "{/=10 page 0 (Latin1)}" at screen 0.05, 0.85 set label 102 "{/=10 0020-003F:}" at screen 0.05, 0.80 set label 103 "{/=10 0040-005F:}" at screen 0.05, 0.75 set label 104 "{/=10 0060-007E:}" at screen 0.05, 0.70 set label 105 "{/=10 00A0-00BF:}" at screen 0.05, 0.65 set label 106 "{/=10 00C0-00DF:}" at screen 0.05, 0.60 set label 107 "{/=10 00E0-00FF:}" at screen 0.05, 0.55 #set label 108 "{/=10 page 1:}" at screen 0.05, 0.50 set label 109 "{/=10 Greek:}" at screen 0.05, 0.45 set label 110 "{/=10 page 33:}" at screen 0.05, 0.35 set label 111 "{/=10 page 34:}" at screen 0.05, 0.30 set label 112 "{/=10 other:}" at screen 0.05, 0.25 set label 113 "" at screen 0.05, 0.20 # set label 1 at screen 0.2, 0.85 noenhance set label 2 at screen 0.2, 0.80 noenhance set label 3 at screen 0.2, 0.75 noenhance set label 4 at screen 0.2, 0.70 noenhance set label 5 at screen 0.2, 0.65 noenhance set label 6 at screen 0.2, 0.60 noenhance set label 7 at screen 0.2, 0.55 noenhance set label 8 at screen 0.2, 0.50 noenhance set label 9 at screen 0.2, 0.45 noenhance set label 10 at screen 0.2, 0.40 noenhance set label 11 at screen 0.2, 0.35 noenhance set label 12 at screen 0.2, 0.30 noenhance set label 13 at screen 0.2, 0.25 noenhance # set label 2 "\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077" set label 3 "\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137" set label 4 "\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176" set label 5 " ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿" set label 6 "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß" set label 7 "àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" #set label 8 "ČčŠšŽž" set label 9 "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ" set label 10 "αβγδεζηθικλμνξοπρςστυφχψωϑϕϖ" set label 11 "ℏℯℵ←↑→↓" set label 12 "∂∆∇∈∉∑∘∙√∞∧∨∩∪∫≠≃≈≤≥⊂⊃⊆⊇⊕⊗⊙" set label 13 "ƒ ′ ″ ☉ Å" set label 14 "" # set xrange [-1:1] set yrange [-1:1] plot -10 notitle # ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/demo/html/index.canvas����������������������������������������������������������������0000644�0004711�0000144�00000016773�11642235126�014345� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE HTML> <html> <head> <meta charset="UTF-8"> <title>Gnuplot demo scripts run through the HTML canvas terminal

Gnuplot demo scripts run through the HTML canvas terminal
See also the demo output for the PNG and SVG terminals.

Your browser may not support the HTML 5 canvas element

The canvas driver for gnuplot was contributed by Bruce Lueckenhoff, and extended by Ethan Merritt (sfeam). To view the results you need a browser that supports the HTML 5 'canvas' element.

Basic 2D plot styles

Math functions

Animation

  • not supported

3D plots and surfaces

Coordinate and
axis transforms

Binary and Image data

Colors

Sample Applications

Text options

Page Layout

Styles

Example of mouse tracking, zoom/unzoom

# unzoom rezoom help x   y  

Note:
  • Zoom using right (Firefox, Konqueror) or center (Opera, Safari) mouse button
  • Mark point using left mouse button
  • ➀ toggles first plot on/off   # toggles grid on/off

This page created by Ethan Merritt
April 2011
gnuplot-4.6.4/demo/html/Makefile0000644000471100001440000000655711766416234013510 0ustar all: html distclean: clean clean: rm -f *.png *.gnu *.html *.dat epslatex* fit.log soundfit.par *.tmp *.js *.?.svg *.??.svg jsdir GNUPLOT_LIB = .. # # Auto-generation of the html demo set using the png terminal. # # Several of the demos need manual intervention: # fontfile vector epslatex # html: airfoil.html approximate.html arrowstyle.html barchart_art.html binary.html bivariat.html boxplot.html candlesticks.html circles.html cities.html contours.html controls.html datastrings.html dgrid3d.html discrete.html electron.html ellipse.html enhanced_utf8.html epslatex.html fillbetween.html fillcrvs.html fillstyle.html finance.html fit.html hidden.html hidden2.html histograms.html histograms2.html image.html image2.html index.html iterate.html key.html layout.html margins.html mgr.html multiaxis.html multimsh.html multiplt.html param.html pm3dcolors.html pm3d.html pm3dgamma.html pointsize.html polar.html poldat.html prob2.html prob.html rainbow.html random.html rectangle.html rgbalpha.html rgb_variable.html running_avg.html scatter.html simple.html singulr.html smooth.html spline.html steps.html stringvar.html surface1.html surface2.html transparent.html transparent_solids.html textcolor.html textrotate.html tics.html timedat.html using.html vector.html world.html world2.html dashcolor.html animate2.html heatmaps.html stats.html index.html: index.save cp index.save index.html circles.html: $(GNUPLOT_LIB)/hidden2.dem ./webify.pl export DEMOTERM="pngcairo truecolor font 'arial,8' size 500,300"; ./webify.pl circles cities.html: $(GNUPLOT_LIB)/cities.dem ./webify.pl export DEMOTERM="png font 'Times,8' fontscale 2.5 size 500,500"; ./webify.pl cities ellipse.html: random.html hidden2.html: $(GNUPLOT_LIB)/hidden2.dem ./webify.pl export DEMOTERM="png truecolor font 'arial,8' size 450,320"; ./webify.pl hidden2 image.html: $(GNUPLOT_LIB)/image.dem ./webify.pl export DEMOTERM="png truecolor font 'arial,8' size 450,320"; ./webify.pl image image2.html: $(GNUPLOT_LIB)/image2.dem ./webify.pl export DEMOTERM="png truecolor font 'arial,8' size 450,320"; ./webify.pl image2 rgbalpha.html: $(GNUPLOT_LIB)/rgbalpha.dem ./webify.pl export DEMOTERM="png truecolor font 'arial,8' size 450,300"; ./webify.pl rgbalpha finance.html: $(GNUPLOT_LIB)/finance.dem ./webify.pl export DEMOTERM="png enhanced transparent font 'arial,8' size 660,320"; ./webify.pl finance multiplt.html: $(GNUPLOT_LIB)/multiplt.dem ./webify.pl export DEMOTERM="png enhanced transparent font 'arial,8' size 610,480"; ./webify.pl multiplt transparent.html: $(GNUPLOT_LIB)/transparent.dem ./webify.pl export DEMOTERM="png enhanced transparent truecolor font 'arial,8' size 512,280"; ./webify.pl transparent transparent_solids.html: $(GNUPLOT_LIB)/transparent_solids.dem ./webify.pl export DEMOTERM="png enhanced truecolor font 'arial,9' size 512,384"; ./webify.pl transparent_solids # The png terminal does not support dashed lines, so let's use pngcairo dashcolor.html: $(GNUPLOT_LIB)/dashcolor.dem ./webify.pl export DEMOTERM="pngcairo dash"; ./webify.pl dashcolor animate2.html: $(GNUPLOT_LIB)/animate2.dem ./webify.pl export DEMOTERM="gif animate transparent noopt delay 10 size 200,200 background rgb 'black'"; ./webify.pl animate2 mv animate2.html temp.html cat temp.html | sed -e 's/1.png/1.gif/g' > animate2.html mv animate2.1.png animate2.1.gif rm temp.html %.html: $(GNUPLOT_LIB)/%.dem ./webify.pl ./webify.pl $* gnuplot-4.6.4/demo/html/webify.pl0000755000471100001440000000741412040335507013653 0ustar #!/usr/bin/perl -w # # Convert a single gnuplot demo script to a web page # Usage: # webify xxx # # Reads xxx.dem and creates xxx.html along with associated # png images output to xxx..png # # If gpsavediff is present also create a set of scripts # xxx..gnu corresponding to the minimal set of commands # needed to generate that png image. # # If gnuplot_demo.css is present, link to it as a stylesheet. # # Ethan A Merritt # December 2003 # # EAM Jan 2004 # use gpsavediff if available # link to gnuplot_demo.css if available # # EAM Aug 2005 # If DEMOTERM is present as an environmental variable, then use # set term DEMOTERM # rather than the default terminal settings # E.g. (for image demo) # setenv DEMOTERM "png truecolor enhanced font 'arial,8' transparent size 450,320" # ./webify.pl image # # EAM Apr 2009 # new layout for generated web pages # use Env qw(DEMOTERM GNUPLOT_LIB); use Time::localtime; use HTML::Entities; # Use the in-tree copy of gnuplot if there is one my $gnuplot = ( -x "../../src/gnuplot" ) ? "../../src/gnuplot" : "gnuplot" ; if ((!defined $ENV{GNUPLOT_LIB}) || $GNUPLOT_LIB eq "") { $GNUPLOT_LIB = ".."; } my $date = ctime(); my $plot = 1; # input and output files open(IN, "<$GNUPLOT_LIB/$ARGV[0].dem") or die "can't open $GNUPLOT_LIB/$ARGV[0].dem"; open(OUT, ">$ARGV[0].html") or die "can't open $ARGV[0].html"; binmode IN, ":encoding(UTF-8)"; binmode OUT,":encoding(UTF-8)"; # open pipe to gnuplot and set terminal type open(GNUPLOT, "|$gnuplot") or die "can't find gnuplot"; binmode GNUPLOT,":encoding(UTF-8)"; if ((defined $ENV{DEMOTERM}) && $DEMOTERM ne "") { print GNUPLOT "set term $DEMOTERM\n"; } else { print GNUPLOT "set term png enhanced font 'arial,8' transparent size 450,320\n"; } print GNUPLOT "set output \"$ARGV[0].$plot.png\"\n"; # find out if gpsavediff is available in current path my $savescripts = T; {local $^W=0; $savescripts = open(FOO, "|gpsavediff") } close FOO if ($savescripts); # Boiler plate header print OUT "\n\ngnuplot demo script: $ARGV[0].dem \n"; print OUT "\n"; print OUT "\n" if (-e "gnuplot_demo.css"); print OUT "\n"; print OUT "\n"; print OUT "\"Back\n"; print OUT "

gnuplot demo script: $ARGV[0].dem

\n"; print OUT "autogenerated by webify.pl on $date"; # try to find gnuplot version $version = `$gnuplot --version`; print OUT "\n
gnuplot version $version"; print OUT "
\n"; # Start processing print OUT "
"; print OUT "\"\"\n"; print OUT ""; print OUT "
\n";

	while () {
		if (/^ *pause -1/) {
			if ($savescripts) {
			    print OUT "

Click here ", "for minimal script to generate this plot

\n"; print GNUPLOT "save \"| gpsavediff > $ARGV[0].$plot.gnu\"\n"; } print OUT "
\n
\n
\n"; $plot++; print OUT "
"; print OUT "\"\"\n"; print OUT "\n"; print OUT "
\n";
			print GNUPLOT "set output \"$ARGV[0].$plot.png\"\n";
		} elsif (/^pause/) {
			print GNUPLOT "set output \"$ARGV[0].$plot.png\"\n";
		} elsif (/^ *reset/) {
			print GNUPLOT;
		} else {
			print OUT HTML::Entities::encode($_);
			print GNUPLOT;
		}
	}

# Amazingly enough, that's it.
# Unlink leftover empty plot before leaving.
	close GNUPLOT;
	unlink("$ARGV[0].$plot.png");
	print OUT "
\n"; print OUT "\n\n"; gnuplot-4.6.4/demo/html/index.svg0000644000471100001440000001374211642235126013662 0ustar Gnuplot Version 4.5 SVG terminal demos

Gnuplot Version 4.5 SVG terminal demos
See also the demo output for the PNG and canvas terminals.

Here are samples of SVG output from demos included with the gnuplot distribution. They were generated using the April 2011 CVS version of gnuplot. Note that individual plots can be toggled on/off by clicking on the corresponding key entry. Clicking in the plot area should turn on mouse-coordinate tracking. The mousing code is new. You may see some browser-dependent glitches.

Basic 2D plot styles

Math functions

Animation

  • not supported

3D plots and surfaces

Coordinate and
axis transforms

Binary and Image data

Colors

Sample Applications

Text options

Page Layout

Styles

These plots were generated using
set term svg enhanced mouse size 600,400
Click on the plot to enable mouse tracking. Click on the figure legend to toggle plot elements on/off. Valid SVG 1.1

This page created by Ethan Merritt
April 2011
gnuplot-4.6.4/demo/html/webify_canvas.pl0000755000471100001440000001632712040335507015211 0ustar #!/usr/bin/perl -w # # Convert a single gnuplot demo script to a web page # Usage: # webify xxx # # Reads xxx.dem and creates xxx.html along with associated # images output to xxx..html # # If gpsavediff is present also create a set of scripts # xxx..gnu corresponding to the minimal set of commands # needed to generate that png image. # # If gnuplot_demo.css is present, link to it as a stylesheet. # # Ethan A Merritt # December 2003 # # EAM Jan 2004 # use gpsavediff if available # link to gnuplot_demo.css if available # # EAM Aug 2005 # If DEMOTERM is present as an environmental variable, then use # set term DEMOTERM # rather than the default terminal settings # E.g. (for image demo) # setenv DEMOTERM "png truecolor enhanced font 'arial,8' transparent size 420,320" # ./webify.pl image # # EAM Jan 2009 # set term canvas # # EAM May 2009 # generalized mousing support in the demos # each plot has its own mousebox # FIXME: mousing should depend on some recognizable line in the demo script, # or the mouseable demos should have a separate make target # use Env qw(DEMOTERM GNUPLOT_LIB); use Time::localtime; use HTML::Entities; # Use the in-tree copy of gnuplot if there is one my $gnuplot = ( -x "../../src/gnuplot" ) ? "../../src/gnuplot" : "gnuplot" ; if ((!defined $ENV{GNUPLOT_LIB}) || $GNUPLOT_LIB eq "") { $GNUPLOT_LIB = ".."; } my $date = ctime(); my $plot = 1; my $mousing = 0; my $grid = 0; my $name = "foo"; # options my $iar = 0; if ($ARGV[$iar] eq "--mouse") { $mousing = 1; $iar++; } if ($ARGV[$iar] eq "--grid") { $grid = 1; $iar++; } $name = $ARGV[$iar]; print STDERR $name, "\n"; # input and output files open(IN, "<$GNUPLOT_LIB/$name.dem") or die "can't open $GNUPLOT_LIB/$name.dem"; open(OUT, ">$name.html") or die "can't open $ARGV[0].html"; binmode IN, ":encoding(UTF-8)"; binmode OUT,":encoding(UTF-8)"; # open pipe to gnuplot and set terminal type open(GNUPLOT, "|$gnuplot") or die "can't find gnuplot"; binmode GNUPLOT,":encoding(UTF-8)"; if ((defined $ENV{DEMOTERM}) && $DEMOTERM ne "") { print GNUPLOT "set term $DEMOTERM\n"; } else { print GNUPLOT "set term canvas name \"$name"."_$plot\" jsdir \".\"\n"; } print GNUPLOT "set output \"$name.$plot.js\"\n"; if ($grid) { print GNUPLOT "set grid x y mx my\n"; } # find out if gpsavediff is available in current path my $savescripts = T; {local $^W=0; $savescripts = open(FOO, "|gpsavediff") } close FOO if ($savescripts); # Boiler plate header print OUT "\n"; print OUT "\n\ngnuplot demo script: $name.dem \n"; print OUT "\n"; print OUT "\n" if (-e "gnuplot_demo.css"); print OUT "\n" if ($mousing && -e "gnuplot_mouse.css"); print OUT "\n"; print OUT "\n"; print OUT "\n"; print OUT "\n"; print OUT "\n" if ($mousing); print OUT "\n"; print OUT "\n"; print OUT "\n"; print OUT "\"Back\n"; print OUT "

gnuplot demo script: $name.dem

\n"; print OUT "autogenerated by webify.pl on $date"; # try to find gnuplot version $version = `$gnuplot --version`; print OUT "\n
gnuplot version $version"; print OUT "
\n"; # Start processing print OUT "
"; print OUT "\n"; print OUT "\n"; print OUT "

Your browser does not support the HTML 5 canvas element

\n"; print OUT "
\n"; print OUT "\n"; print OUT "
\n"; # Copy mouse box into output stream if ($mousing && -e "mousebox.template") { my $spanid = $name."_".$plot; open(MOUSEBOX, ") { s/ACTIVE_PLOT_NAME/$spanid/; print OUT; } close MOUSEBOX; } print OUT "
\n";

	while () {
		if (/^ *pause -1/) {
			if ($savescripts) {
			    print OUT "
Click here ", "for minimal script to generate this plot\n"; print GNUPLOT "save \"| gpsavediff > $name.$plot.gnu\"\n"; } print OUT "
\n
\n
\n"; $plot++; print OUT "
"; print OUT "\n"; print OUT "\n"; print OUT "
Your browser does not support the HTML 5 canvas element
\n"; print OUT "
\n"; print OUT "\n"; print OUT "
\n"; # Copy mouse box into output stream if ($mousing && -e "mousebox.template") { my $spanid = $name."_".$plot; open(MOUSEBOX, ") { s/ACTIVE_PLOT_NAME/$spanid/; print OUT; } close MOUSEBOX; } print OUT "
\n";
	    		print GNUPLOT "set term canvas name \"$name"."_$plot\" jsdir \".\"\n";
			print GNUPLOT "set output \"$name.$plot.js\"\n";
		} elsif (/^pause/) {
	    		print GNUPLOT "set term canvas name \"$name"."_$plot\" jsdir \".\"\n";
			print GNUPLOT "set output \"$name.$plot.js\"\n";
		} elsif (/^ *reset/) {
			print GNUPLOT;
		} else {
			print OUT HTML::Entities::encode($_);
			print GNUPLOT;
		}
	}

# Amazingly enough, that's it.
# Unlink leftover empty plot before leaving.
	close GNUPLOT;
	unlink("$name.$plot.js");
	print OUT "
\n"; print OUT "\n\n"; gnuplot-4.6.4/demo/html/mousebox.template0000644000471100001440000000341611546435336015435 0ustar
          # unzoom rezoom zoom text ?
     
gnuplot-4.6.4/demo/html/mouseable.dem0000644000471100001440000000073711473363156014504 0ustar set terminal canvas size 500,350 fsize 10 lw 1 name "gnuplot_canvas" jsdir "." set output 'mouseable.js' set key box set logscale y 10 set samples 300, 300 set title "Ag 108 decay data" set xlabel "Time (sec)" set ylabel "Rate" set grid x y mx my S = 1 plot "silver.dat" t "rate" w errorb, \ "" u 1:2:($2/($3*1.e1)) sm acs t "acspline Y/(Z*1.e1)", \ "" u 1:2:($2/($3*1.e3)) sm acs t " Y/(Z*1.e3)", \ "" u 1:2:($2/($3*1.e5)) sm acs t " Y/(Z*1.e5)" gnuplot-4.6.4/demo/html/index.save0000644000471100001440000001324311642235126014015 0ustar Demo scripts for gnuplot CVS version

Demo scripts for gnuplot CVS version

Gnuplot is distributed with a large set of scripts that demonstrate various features. Collected below are the results of running many of these scripts through the CVS version of gnuplot. Interactive demo scripts are not included on this page.

Basic 2D plot styles

Math functions and
curve fitting

Animation

3D plots and surfaces

Coordinate and
axis transforms

Binary and Image data

Colors

Sample Applications

Text options

Page Layout

Styles

Most of these plots were generated using
set terminal png transparent font "arial" 8


This page created by Ethan Merritt
April 2011
gnuplot-4.6.4/demo/html/Makefile.canvas0000644000471100001440000000344611642177421014747 0ustar all: html distclean: clean clean: rm -f *.gnu *.html *.dat *.tmp *.js *.par *.png jsdir GNUPLOT_LIB = .. # # Auto-generation of html demo set. # html_3d: binary.html bivariat.html contours.html datastrings.html discrete.html hidden.html hidden2.html margins.html multimsh.html pm3dcolors.html pm3d.html pointsize.html random.html rgb_variable.html scatter.html singulr.html surface1.html surface2.html transparent_solids.html textcolor.html vector.html world.html world2.html html_2d: airfoil.html approximate.html arrowstyle.html barchart_art.html boxplot.html candlesticks.html canvas_utf8.html circles.html cities.html controls.html electron.html enhanced_utf8.html fillbetween.html fillcrvs.html fillstyle.html finance.html histograms.html histograms2.html index.html iterate.html key.html layout.html mgr.html multiaxis.html multiplt.html param.html polar.html poldat.html prob2.html prob.html rainbow.html ellipse.html rectangle.html rgbalpha.html running_avg.html simple.html smooth.html spline.html steps.html transparent.html textrotate.html timedat.html using.html world.html dashcolor.html heatmaps.html stats.html html: html_2d html_3d index.html: index.canvas mouseable.js cp index.canvas index.html mouseable.js: ../../src/gnuplot mouseable.dem ellipse.html: random.html canvas_utf8.html: canvas_utf8.dem gnuplot canvas_utf8.dem # # Examples of mousing code # mgr.html: jsdir ./webify_canvas.pl --mouse --grid mgr cities.html: jsdir ./webify_canvas.pl --mouse cities cat cities.html | sed -e 's/grid_lines/zoom_text/' > xxx mv xxx cities.html jsdir: cp ../../term/js/*.png . cp ../../term/js/*.js . cp ../../term/js/*.css . cp ../../term/js/canvas_help.html . cp canvasmath.js canvastext.js touch jsdir %.html: $(GNUPLOT_LIB)/%.dem ./webify_canvas.pl jsdir ./webify_canvas.pl --mouse $* gnuplot-4.6.4/demo/html/gnuplot_demo.css0000644000471100001440000000351211642235126015232 0ustar H1, H2, H3, H4, H5, H6, P, UL, OL, DIR, MENU, DIV, DT, DD, ADDRESS, BLOCKQUOTE, PRE, HR, FORM, DL, LISTING { margin-left: 2%; display: block ; } BODY { background-color:white; margin-left: 3%; margin-right: 3%; background-image: url(grid.jpeg); } P { margin-top: 0%; margin-bottom: 0%; margin-left: 0%; } H1 { text-align: center; } H3 { color:#009900; margin-left: 0%; } H4 { color:#009900; margin-left: 0%; margin-top: 1em; margin-bottom: 0; } H5 { color:#006600; margin-left: 3%; font-size:larger; } IMG { border-style: none; } DT { color:#006600; font-weight: bold; margin-left: 4%; margin-right: 4%; margin-top: 3px; } DD { margin-left: 8%; margin-right: 8%; margin-top: 3px; } TABLE { border: 0; } TD { vertical-align: top; } TD.TD0 { font-weight: bold; font-size: 67%; color:#006600; padding-top: 0; padding-left: 3em; vertical-align: top; } TD.TD1 { font-weight: bold; font-size: 67%; padding-top: 0; } TD.LIMG { padding-right: 40pt; vertical-align: top; } LISTING, PRE { margin-left: 2% ; line-height: 1.00 ; font-size: smaller ; } UL { margin-left: 0.1em ; padding-left: 0.1em ; margin-top: 0; padding-top: 0; } LI { font-size: smaller ; text-indent: 1em ; list-style-type: none; } table { border: 0; vertical-align: text-top; } .icon-image { float:right; margin: 0 0 0 0; } div.box { border: none; border-width: thin; margin-top: 5px; margin-bottom: 5px; background: #AADDFF; text-align: center; } div.color1 { border: none; background: #AADDFF; padding: 0.5em; } div.footer { border: solid; border-width: thin; margin-top: 20px; margin-left: 0%; margin-right: 0%; padding: 10px; } .float-right { float: right; } gnuplot-4.6.4/demo/html/Makefile.svg0000644000471100001440000000326011642177421014265 0ustar all: html distclean: clean clean: rm -f *.png *.gnu *.html *.js *.dat epslatex* fit.log soundfit.par *.?.svg *.??.svg jsdir GNUPLOT_LIB = .. # # Auto-generation of the svg demo set. # html: airfoil.html approximate.html arrowstyle.html barchart_art.html binary.html bivariat.html boxplot.html candlesticks.html circles.html cities.html contours.html controls.html datastrings.html discrete.html electron.html enhanced_utf8.html fillbetween.html fillcrvs.html fillstyle.html finance.html hidden.html hidden2.html histograms.html histograms2.html index.html iterate.html key.html layout.html margins.html mgr.html multiaxis.html multimsh.html multiplt.html param.html pm3dcolors.html pm3d.html pointsize.html polar.html poldat.html prob2.html prob.html rainbow.html random.html rectangle.html rgbalpha.html rgb_variable.html running_avg.html scatter.html simple.html singulr.html smooth.html spline.html steps.html stringvar.html surface1.html surface2.html transparent.html transparent_solids.html tics.html timedat.html using.html vector.html world.html world2.html dashcolor.html heatmaps.html ellipse.html stats.html index.html: index.svg cp index.svg index.html dashcolor.html: $(GNUPLOT_LIB)/dashcolor.dem ./webify_svg.pl export DEMOTERM="svg dashed enhanced font 'arial,11' size 600,400 dynamic"; ./webify_svg.pl dashcolor showcase_plot.svg: export DEMOTERM="svg dashed enhanced font 'arial,11' mouse size 500,350 dynamic jsdir '.'"; ./webify_svg.pl --mouse transparent mv transparent.2.svg showcase_plot.svg rm transparent.html jsdir: cp ../../term/js/gnuplot_svg.js . cp ../../term/js/grid.png . touch jsdir %.html: $(GNUPLOT_LIB)/%.dem ./webify_svg.pl jsdir ./webify_svg.pl --mouse $* gnuplot-4.6.4/demo/html/webify_svg.pl0000755000471100001440000001252012040335507014524 0ustar #!/usr/bin/perl -w # # Convert a single gnuplot demo script to a web page # Usage: # webify xxx # # Reads xxx.dem and creates xxx.html along with associated # png images output to xxx..png # # If gpsavediff is present also create a set of scripts # xxx..gnu corresponding to the minimal set of commands # needed to generate that png image. # # If gnuplot_demo.css is present, link to it as a stylesheet. # # Ethan A Merritt # December 2003 # # EAM Jan 2004 # use gpsavediff if available # link to gnuplot_demo.css if available # # EAM Aug 2005 # If DEMOTERM is present as an environmental variable, then use # set term DEMOTERM # rather than the default terminal settings # E.g. (for image demo) # setenv DEMOTERM "png truecolor enhanced font arial 8 transparent size 420,320" # ./webify.pl image # # EAM Apr 2011 # Mouseable demos # use Env qw(DEMOTERM GNUPLOT_LIB); use Time::localtime; use HTML::Entities; # Use the in-tree copy of gnuplot if there is one my $gnuplot = ( -x "../../src/gnuplot" ) ? "../../src/gnuplot" : "gnuplot" ; if ((!defined $ENV{GNUPLOT_LIB}) || $GNUPLOT_LIB eq "") { $GNUPLOT_LIB = ".."; } my $date = ctime(); my $plot = 1; my $mousing = 0; my $name = "foo"; # options my $iar = 0; if ($ARGV[$iar] eq "--mouse") { $mousing = 1; $iar++; } $name = $ARGV[$iar]; print STDERR $name, "\n"; # input and output files open(IN, "<$GNUPLOT_LIB/$name.dem") or die "can't open $GNUPLOT_LIB/$name.dem"; open(OUT, ">$name.html") or die "can't open $name.html"; binmode IN, ":encoding(UTF-8)"; binmode OUT,":encoding(UTF-8)"; # open pipe to gnuplot and set terminal type open(GNUPLOT, "|$gnuplot") or die "can't find gnuplot"; binmode GNUPLOT,":encoding(UTF-8)"; if ((defined $ENV{DEMOTERM}) && $DEMOTERM ne "") { print GNUPLOT "set term $DEMOTERM\n"; } else { if ($mousing) { print GNUPLOT "set term svg enhanced font 'arial,10' mouse name \"$name"."_$plot\" jsdir '.' size 600,400 dynamic\n"; } else { print GNUPLOT "set term svg enhanced font 'arial,10' name \"$name"."_$plot\" jsdir '.' size 600,400 dynamic\n"; } } print GNUPLOT "set output \"$name.$plot.svg\"\n"; # find out if gpsavediff is available in current path my $savescripts = T; {local $^W=0; $savescripts = open(FOO, "|gpsavediff") } close FOO if ($savescripts); # Boiler plate header print OUT "\n"; print OUT "\n\ngnuplot demo script: $name.dem \n"; print OUT "\n"; print OUT "\n" if (-e "gnuplot_demo.css"); print OUT "\n"; print OUT "\n"; print OUT "\"Back\n"; print OUT "

gnuplot demo script: $name.dem

\n"; print OUT "autogenerated by webify.pl on $date"; # try to find gnuplot version $version = `$gnuplot --version`; print OUT "\n
gnuplot version $version"; print OUT "
\n"; # Start processing print OUT "
\n"; print OUT "\n"; print OUT "\n"; print OUT "
\n";

	while () {
		if (/^ *pause -1/) {
			if ($savescripts) {
			    print OUT "
Click here ", "for minimal script to generate this plot\n"; print GNUPLOT "save \"| gpsavediff > $name.$plot.gnu\"\n"; } print OUT "
\n
\n
\n"; $plot++; print OUT "
\n"; print OUT "\n"; print OUT "\n"; print OUT "
\n";
			if ((defined $ENV{DEMOTERM}) && $DEMOTERM ne "") {
			    print GNUPLOT "set term $DEMOTERM\n";
			} else {
			    if ($mousing) {
				print GNUPLOT "set term svg enhanced font 'arial,10' mouse name \"$name"."_$plot\" jsdir '.' size 600,400 dynamic\n";
			    } else {
				print GNUPLOT "set term svg enhanced font 'arial,10' name \"$name"."_$plot\" jsdir '.' size 600,400 dynamic\n";
			    }
			}
			print GNUPLOT "set output \"$name.$plot.svg\"\n";
		} elsif (/^pause/) {
			if ((defined $ENV{DEMOTERM}) && $DEMOTERM ne "") {
			    print GNUPLOT "set term $DEMOTERM\n";
			} else {
			    if ($mousing) {
				print GNUPLOT "set term svg enhanced font 'arial,10' mouse name \"$name"."_$plot\" jsdir '.' size 600,400 dynamic\n";
			    } else {
				print GNUPLOT "set term svg enhanced font 'arial,10' name \"$name"."_$plot\" jsdir '.' size 600,400 dynamic\n";
			    }
			}
			print GNUPLOT "set output \"$name.$plot.svg\"\n";
		} else {
			print OUT HTML::Entities::encode($_);
			print GNUPLOT;
		}
	}

# Amazingly enough, that's it.
# Replace leftover empty file with a legal svg empty plot before leaving.
	close GNUPLOT;
	unlink("$name.$plot.svg");
	open(EMPTY, ">$name.$plot.svg") or die "can't open empty plot";
	print EMPTY <



MT
;
	print OUT "
\n"; print OUT "\n\n"; gnuplot-4.6.4/demo/triangle.dat0000644000471100001440000000072607426331406013366 0ustar # pm3d demo - datafile with different nb of points in scans and options # set pm3d flush [begin | center | end] 0 0 1 1 0 2 0 1 1 1 1 2 2 1 3 3 1 4 0 2 1 1 2 2 2 2 3 3 2 4 4 2 5 5 2 6 0 3 1 1 3 2 2 3 3 3 3 4 4 3 5 5 3 6 6 3 7 7 3 8 0 4 1 1 4 2 2 4 3 3 4 4 4 4 5 5 4 6 6 4 7 7 4 8 8 4 9 9 4 10 0 5 1 1 5 2 2 5 3 3 5 4 4 5 5 5 5 6 6 5 7 7 5 8 8 5 9 9 5 10 10 5 11 11 5 12 0 6 1 1 6 2 2 6 3 3 6 4 4 6 5 5 6 6 6 6 7 7 6 8 8 6 9 9 6 10 10 6 11 11 6 12 12 6 13 13 6 14 gnuplot-4.6.4/demo/pm3d.dem0000644000471100001440000002655311643712114012422 0ustar # # $Id: pm3d.dem,v 1.21 2011/10/08 00:07:40 sfeam Exp $ # # demo for pm3d splotting # # This demo can be directly used if your default terminal supports pm3d, # like OS/2 Presentation Manager, X11, Linux VGA, Windows. # Otherwise you can use the output to postscript, for example: # set term push; set term postscript color enhanced # set out 'pm3d_demo.ps' # load 'pm3d.dem' # set out; set term pop # Prepared by Petr Mikulik # History: # - 12. 3. 2003 pm: added demo for corners2color # - 9. 3. 2002 pm: added demo for ftriangles # - 31. 1. 2002 pm: removed pm3d/demo and stand-alone pm3d.dem in demo/ # - 29. 1. 2002 joze: added demo for the 4th column # - 18. 3. 2001 pm: updated for cb-axis # - 18.11. 2000 pm: updated for 'set colorbox' # - 03. 3. 2000 joze: updated to show new pm3d features # - 15. 6. 1999 pm: update for `set pm3d`+`set palette` # - 29. 4. 1999 pm: the 1st version, directory pm3d/demo # print "WARNING: This demo works only on terminals supporting pm3d, i.e. on " # print "-------- OS/2 Presentation Manager, X11, Linux VGA, Windows. Please use" # print " output to a postscript file otherwise." set xlabel "x" set ylabel "y" set key top set border 4095 set xrange [-15:15] set yrange [-15:15] set zrange [-0.25:1] set samples 25 set isosamples 20 set title "pm3d demo. Radial sinc function. Default options." set pm3d; set palette #show pm3d #show palette splot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2) pause -1 "Hit return to continue" set title "pm3d at s (surface) / ticslevel 0" set ticslevel 0 set pm3d at s set cblabel "colour gradient" replot pause -1 "Hit return to continue" set title "pm3d at b (bottom)" set pm3d at b replot pause -1 "Hit return to continue" set title "unset surface; set pm3d at st (surface and top)" unset surface set pm3d at st replot pause -1 "Hit return to continue" unset cblabel set title "set pm3d at bstbst (funny combination, only for screen or postscript)" set view 50,50 set pm3d at bstbst replot pause -1 "Hit return to continue" set title "gray map" set pm3d map set palette gray set samples 100; set isosamples 100 replot pause -1 "Hit return to continue" set title "gray map, negative" set pm3d map set palette gray negative replot pause -1 "Hit return to continue" set title "colour map, using default rgbformulae 7,5,15 ... traditional pm3d (black-blue-red-yellow)" set palette color positive set pm3d map set samples 50; set isosamples 50 replot pause -1 "Hit return to continue" set title "colour, rgbformulae 3,11,6 ... green-red-violet" set palette rgbformulae 3,11,6 replot pause -1 "Hit return to continue" set title "colour, rgbformulae 23,28,3 ... ocean (green-blue-white); OK are also all other permutations" set palette rgbformulae 23,28,3 replot pause -1 "Hit return to continue" set title "colour, rgbformulae 30,31,32 ... color printable on gray (black-blue-violet-yellow-white)" set palette rgbformulae 30,31,32 replot pause -1 "Hit return to continue" set title "cubehelix color scheme with monotonic intensity\nD A Green (2011) http://arxiv.org/abs/1108.5083" offset 0,1 set palette cubehelix replot pause -1 "Hit return to continue" test palette pause -1 "Hit return to continue" set title "rgbformulae 31,-11,32: negative formula number=inverted color" set palette rgbformulae 31,-11,32 replot pause -1 "Hit return to continue" set yrange [*:*] noreverse reset set title "set pm3d scansforward: wrong, because back overwrites front" set pm3d set palette set view 130,10 set samples 50; set isosamples 50 set border 4095 unset surface set pm3d at s scansforward splot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2) pause -1 "Hit return to continue" set title "set pm3d scansbackward: correctly looking surface" set xlabel set border 4095 set pm3d scansbackward replot pause -1 "Hit return to continue" set title "set hidden3d" set samples 30; set isosamples 30 set hidden3d set pm3d set surface set view 50,220 set xrange [-2:2] set yrange [-2:2] splot log(x*x*y*y) pause -1 "Hit return to continue" unset hidden3d # draw the surface using pm3d's hidden3d with line type 100 unset hidden unset surface set title "set pm3d hidden3d : pm3d's much faster hidden3d variant" set samples 30; set isosamples 30 set pm3d set style line 100 lt 5 lw 0.5 set pm3d hidden3d 100 set view 50,220 set xrange [-2:2] set yrange [-2:2] splot log(x*x*y*y) pause -1 "Hit return to continue" set pm3d nohidden3d set title "bad: surface and top are too close together" set xrange [-1:1] set yrange [-1:1] unset hidd set zrange [-15:4] set ticslevel 0 set pm3d at st splot log(x*x*y*y) pause -1 "Hit return to continue" set title "solution: use independent 'set zrange' and 'set cbrange'" unset surf set cbrange [-15:4] set zrange [-15:60] splot log(x*x*y*y) pause -1 "Press Enter; I will continue by 'set autoscale cb' and much more..." set autoscale cb set title "color box is on by default at a certain position" set samples 20; set isosamples 20 set autoscale set key on set pm3d set pm3d at s set view 60,30 splot y pause -1 "Hit return to continue" set title "color box is on again, now with horizontal gradient" set size 0.6,0.6; set origin 0.2,0.25 set colorbox horizontal set colorbox user origin 0.1,0.15 size 0.8,0.1 set mcbtics 2 set grid cb set cblabel "see cblabel, grid cb, mcbtics, ..." replot pause -1 "Hit return to continue" unset cblabel; unset mcbtics; set grid nocb; set colorbox default set title "color box is switched off" unset colorbox replot pause -1 "Hit return to continue" set title 'using now "set grid back; unset colorbox"' unset colorbox set pm3d set border 895 set grid back replot pause -1 "Hit return to continue" set size 1,1; set origin 0,0 set grid layerdefault set xlabel "X LABEL" set ylabel "Y LABEL" set sample 11; set isosamples 11 set pm3d map set palette set colorbox set lmargin 0 set pm3d flush begin set title "Datafile with different nb of points in scans; pm3d flush begin" set pm3d flush begin noftriangles scansforward splot 'triangle.dat' #show pm3d pause -1 "Hit return to continue" set title "Datafile with different nb of points in scans; pm3d flush center" set pm3d flush center scansforward replot pause -1 "Hit return to continue" set title "Datafile with different nb of points in scans; pm3d flush end" set pm3d flush end scansforward replot pause -1 "Hit return to continue" set grid front set pm3d flush begin set title "Data with different nb of points in scans; pm3d ftriangles flush begin" set pm3d flush begin ftriangles scansforward splot 'triangle.dat' #show pm3d pause -1 "Hit return to continue" set title "Data with different nb of points in scans; pm3d ftriangles flush center" set pm3d flush center ftriangles scansforward replot pause -1 "Hit return to continue" set title "Data with different nb of points in scans; pm3d ftriangles flush end" set pm3d flush end ftriangles scansforward replot pause -1 "Hit return to continue" set title "Using interpolation with datafile; pm3d map interpolate 2,1" set pm3d flush begin noftriangles scansforward interpolate 2,1 replot pause -1 "Hit return to continue" set title "Using interpolation with datafile; pm3d map ftriangles interpolate 10,1" set pm3d flush begin ftriangles scansforward interpolate 10,1 replot pause -1 "Hit return to continue" set title "Using interpolation with datafile; pm3d at s ftriangles interpolate 10,1" set pm3d flush begin ftriangles scansforward at s interpolate 10,1 set view 20,20 replot pause -1 "Hit return to continue" reset set title "only for enhanced terminals: 'set format cb ...'" set xlabel "X" set ylabel "Y" set sample 31; set isosamples 31 set xrange [-185:185] set yrange [-185:185] set format cb "%.01t*10^{%T}" unset surface set border 4095 set ticslevel 0 set pm3d at s; set palette gray set cblabel "the colour gradient" splot abs(x)**3+abs(y)**3 pause -1 "Hit return to continue" unset cblabel set pal color set xrange [*:*]; set yrange [*:*] set title "function 'x+y' using all colors available, 'set pal maxcolors 0'" set pal maxcolors 0 splot x+y pause -1 "Hit return to continue" set xrange [*:*]; set yrange [*:*] set title "function 'x+y' using only 5 colors, 'set pal maxcolors 5'" set pal maxcolors 5 splot x+y pause -1 "Hit return to continue" set pal maxcolors 0 unset pm3d set surface set format z set palette set title "color lines: 'splot sin(y)/(y) with lines palette'" set ticslevel 0 set border 4095 set xrange [-10:10]; set yrange [-10:10] set hidden3d set isosamples 40,40; set samples 40,40 splot sin(y)/(y) w lines palette pause -1 "Hit return to continue" reset set title "Demo for clipping of 2 rectangles comes now. The xrange is [0:2]..." set pm3d; set palette set pm3d map set xrange [0:2] splot 'clip14in.dat' pause -1 "Hit return to continue" set xrange [0:1.5] set yrange [*:*] set title "...and now xrange is [0:1.5] and 'set pm3d clip1in'" set pm3d clip1in replot pause -1 "Hit return to continue" set title "...now xrange is [0:1.5] and 'set pm3d clip4in'" set pm3d clip4in replot pause -1 "Hit return to continue" reset sinc(u,v) = sin(sqrt(u**2+v**2)) /sqrt(u**2+v**2) set sam 40 set iso 40 set title "pm3d explicit mode --- coloring according to the 4th parameter of 'using'" set ticslevel 0 set pm3d at s explicit # 'binary2' binary u 1:2:(column(3)+column(-1)/20.0):3 w pm3d, splot \ 'binary2' binary u 1:2:3:($2+($1+$2)/10) w pm3d, \ 1+sinc(x*4, y*4) w l pause -1 "Hit return to continue" set title "coloring according to the 3rd 'using' parameter (left) and to the z-value (bottom)" set border 895 splot \ 'binary2' binary u 2:(12 - column(3) * 10):1 notitle w lines, \ 'binary2' binary u (-12 + column(3) * 10):2:1:(-12 + column(3) * 10) notitle w pm3d, \ 'binary2' binary u 1:2:(column(3) * 10 - 12) notitle w pm3d pause -1 "Hit return to continue" reset print "Plot by pm3d algorithm draws quadrangles filled with color calculated from" print "the z- or color-value of the surrounding 4 corners. The following demo shows" print "different color spots for a plot with very small number of quadrangles (here" print "rectangular pixels). Note that the default option is 'mean'." set pm3d map set iso 4 set samples 4 set xrange [0:3] set yrange [0:3] set cbrange [0:9] f(x,y)=2*x+y set key off unset xtics unset ytics set tics scale 2 set colorbox horizontal user origin 0.1,0.025 size .8,0.02 # Needed by terminals limited on colors: #set palette maxcolors 26 # Note: no more space in the following multiplot to show demo for #set pm3d corners2color median #set pm3d corners2color geomean set multiplot # Let us do multiplot grid 3x3: dx = 1.0/3; dy = 1.0/3; set size dx,dy set origin 0*dx,0*dy set title "set pm3d corners2color c1" set pm3d corners2color c1 splot f(x,y) set origin 2*dx,0*dy set title "set pm3d corners2color c2" set pm3d corners2color c2 replot set origin 0*dx,2*dy set title "set pm3d corners2color c3" set pm3d corners2color c3 replot set origin 2*dx,2*dy set title "set pm3d corners2color c4" set pm3d corners2color c4 replot set origin 0*dx,1*dy set title "set pm3d corners2color mean" set pm3d corners2color mean replot set origin 2*dx,1*dy set title "set pm3d corners2color geomean" set pm3d corners2color geomean replot set origin 1*dx,0*dy set title "set pm3d corners2color median" set pm3d corners2color median replot set origin 1*dx,1*dy set title "Original grid points" unset pm3d set border 0 unset xtics unset ytics unset colorbox #splot x*2+y with points ps 3 pt 5 palette splot f(x,y) with linesp ps 3 pt 5 palette unset multiplot pause -1 "Hit return to continue" reset print "End of pm3d demo." gnuplot-4.6.4/demo/start.par0000644000471100001440000000040506515203633012720 0ustar # # Start parameters for the fit of lcdemo.dat using density(x) # ml = -0.0005 mh = -0.0005 dens_Tc = 1.02 Tc = 45.0 g = 1.0 b = 0.01002 gnuplot-4.6.4/demo/imageNaN.dem0000644000471100001440000000261612142227561013232 0ustar # # Explore the effect of image data pixels that are # missing/NaN/Inf/garbage/... # set title "Treatment of missing/undefined/NaN/Inf data" unset key set tic scale 0 set border 3 front set cbrange [-2:7] set cblabel "Score" set cbtics 0,1,5 set xrange [-0.5:5.5] set yrange [-0.5:5.5] set datafile missing "?" set ytics ("-Inf" 5, "Inf" 4, "NaN" 3, "Junk" 2, "?" 1, "0" 0) unset xtics set xlabel "First column contains various odd values" offset 0,1 set view map plot '-' matrix with image 0 5 4 3 1 0 ? 2 2 0 0 1 Junk 1 2 3 4 5 NaN 0 0 3 1 0 Inf 3 2 0 2 3 -Inf 0 1 2 4 3 e e pause -1 "Hit return to continue" # # set title "Same thing in failsafe mode (2D)" plot '-' matrix with image failsafe 0 5 4 3 1 0 ? 2 2 0 0 1 Junk 1 2 3 4 5 NaN 0 0 3 1 0 Inf 3 2 0 2 3 -Inf 0 1 2 4 3 e e pause -1 "Hit return to continue" # # As shown here, expression evaluation loses information about Inf/NaN. # This will be fixed in gnuplot version 5. # set title "Same thing passing data value through 'using 1:2:($3)'" plot '-' matrix using 1:2:($3) with image failsafe 0 5 4 3 1 0 ? 2 2 0 0 1 Junk 1 2 3 4 5 NaN 0 0 3 1 0 Inf 3 2 0 2 3 -Inf 0 1 2 4 3 e e pause -1 "Hit return to continue" set title "Same thing in failsafe mode (3D)" splot '-' matrix with image failsafe 0 5 4 3 1 0 ? 2 2 0 0 1 Junk 1 2 3 4 5 NaN 0 0 3 1 0 Inf 3 2 0 2 3 -Inf 0 1 2 4 3 e e pause -1 "Hit return to continue" gnuplot-4.6.4/demo/scatter2.dat0000644000471100001440000000346506515203632013310 0ustar 25. 1.0 .99443 25. 10.0 .9406 25. 20.0 .8749 25. 30.0 .8030 25. 40.0 .7195 25. 50.0 .6190 25. 60.0 .4844 25. 70.0 .3409 25. 80.0 .3170 25. 90.0 .3273 25. 100.0 .3451 25. 110.0 .3656 25. 120.0 .3872 25. 130.0 .4096 25. 140.0 .4321 25. 150.0 .4549 25. 160.0 .4777 25. 170.0 .5005 25. 180.0 .5223 25. 190.0 .5460 25. 200.0 .5687 25. 250.0 .6798 25. 300.0 .7889 25. 350.0 .8962 25. 400.0 1.0015 25. 450.0 1.1046 25. 500.0 1.2063 25. 600.0 1.4058 25. 700.0 1.6008 25. 800.0 1.7920 50. 1.0 .99571 50. 10.0 .9546 50. 20.0 .9066 50. 30.0 .8552 50. 40.0 .8013 50. 50.0 .7436 50. 60.0 .6818 50. 70.0 .6171 50. 80.0 .5541 50. 90.0 .5017 50. 100.0 .4706 50. 110.0 .4605 50. 120.0 .4622 50. 130.0 .4711 50. 140.0 .4841 50. 150.0 .4996 50. 160.0 .5166 50. 170.0 .5346 50. 180.0 .5533 50. 190.0 .5724 50. 200.0 .5906 50. 250.0 .6898 50. 300.0 .7888 50. 350.0 .8880 50. 400.0 .9851 50. 450.0 1.0813 50. 500.0 1.1758 50. 600.0 1.3615 50. 700.0 1.5430 50. 800.0 1.7208 75. 1.0 .99661 75. 10.0 .9647 75. 20.0 .9283 75. 30.0 .8904 75. 40.0 .8518 75. 50.0 .8124 75. 60.0 .7723 75. 70.0 .7323 75. 80.0 .6934 75. 90.0 .6572 75. 100.0 .6255 75. 110.0 .6012 75. 120.0 .5847 75. 130.0 .5756 75. 140.0 .5731 75. 150.0 .5770 75. 160.0 .5839 75. 170.0 .5937 75. 180.0 .6055 75. 190.0 .6188 75. 200.0 .6333 75. 250.0 .7149 75. 300.0 .8027 75. 350.0 .8916 75. 400.0 .9802 75. 450.0 1.0684 75. 500.0 1.1560 75. 600.0 1.3293 75. 700.0 1.4995 100. 1.0 .99727 100. 10.0 .9720 100. 20.0 .9438 100. 30.0 .9153 100. 40.0 .8866 100. 50.0 .8579 100. 60.0 .8295 100. 70.0 .8017 100. 80.0 .7749 100. 90.0 .7497 100. 100.0 .7268 100. 110.0 .7074 100. 120.0 .6913 100. 130.0 .6793 100. 140.0 .6712 100. 150.0 .6668 100. 160.0 .6657 100. 170.0 .6679 100. 180.0 .6728 100. 190.0 .6801 100. 200.0 .6889 100. 250.0 .7494 100. 300.0 .8233 100. 350.0 .9027 100. 400.0 .9839 100. 450.0 1.0653 gnuplot-4.6.4/demo/scatter.dem0000644000471100001440000000255707747400072013231 0ustar # # $Id: scatter.dem,v 1.7 2003/10/28 05:35:54 sfeam Exp $ # # Simple demo of scatter data conversion to grid data. # set title "Simple demo of scatter data conversion to grid data" unset hidden3d set ticslevel 0.5 set view 60,30 set autoscale set parametric set style data points set xlabel "data style point - no dgrid" set key box splot "hemisphr.dat" pause -1 "Hit return to continue (1)" set dgrid3d 10,10,1 set xlabel " data style lines, dgrid3d 10,10,1" set style data lines splot "hemisphr.dat" pause -1 "Hit return to continue (2)" set dgrid3d ,,4 set xlabel " data style lines, dgrid3d ,,4 " set style data lines splot "hemisphr.dat" pause -1 "Hit return to continue (3)" set dgrid3d ,,16 set xlabel " data style lines, dgrid3d ,,16" set style data lines splot "hemisphr.dat" pause -1 "Hit return to continue (4)" set contour set xlabel "data style lines, dgrid3d ,,16, contour" splot "hemisphr.dat" pause -1 "Hit return to continue (5)" unset dgrid3d set style data points set xlabel "data style points, nodgrid3d" splot "scatter2.dat" pause -1 "Hit return to continue (6)" set key nobox set dgrid3d ,,1 set xlabel "data style lines, dgrid3d ,,1" set style data lines splot "scatter2.dat" pause -1 "Hit return to continue (7)" set dgrid3d ,,4 set xlabel "data style lines, dgrid3d ,,4" set style data lines splot "scatter2.dat" pause -1 "Hit return to continue (8)" reset gnuplot-4.6.4/demo/soundvel.dat0000644000471100001440000000717406515203632013421 0ustar # # sound velocity of a fibersymmetric (hexagonal) sample as a function # of sound propagation direction # # transverse sound velocity -10.3984 901.543694 -7.9189 870.020424 -5.4692 853.260158 -3.0045 839.23203 -.53495 834.750014 1.93463 840.410742 4.4141 851.117376 6.88863 863.944964 9.3582 880.872578 11.80798 911.959288 14.28746 950.48207 16.76198 985.130382 19.23156 1017.133868 21.68134 1046.347008 24.16081 1079.445532 -67.08385 1277.516442 -62.13925 1359.931694 -59.67809 1375.789736 -57.19268 1404.580868 -54.73696 1415.251122 -52.25847 1419.318406 -49.81513 1415.531248 -47.33664 1399.891486 -44.87053 1383.527762 -42.38858 1361.550604 -39.92593 1334.389296 -37.45339 1297.594564 -35.08426 1261.600192 -32.60975 1234.10055 -27.67555 1123.552644 -25.19112 1076.742498 -22.72649 1022.579954 -20.27671 1012.579092 -17.80219 991.333172 -15.33261 962.007254 -12.87293 929.789126 -10.39841 901.543694 # longitudinal sound velocity -133.71985 2698.424654 -128.79065 2609.981236 -123.85056 2513.054002 -118.90388 2454.88602 -113.9974 2379.808614 -109.04686 2346.520914 -104.10671 2335.50505 -99.16558 2325.387772 -99.2388 2330.841134 -89.31301 2323.146764 -84.3308 2326.442792 -79.42778 2324.561946 -74.48318 2330.200846 -69.53511 2341.886102 -64.62269 2358.420812 -54.74389 2547.760522 -49.81661 2664.427544 -54.74339 2544.79919 -49.8176 2663.990984 -44.87399 2771.99229 -39.92742 2903.862514 -35.08922 3017.277164 -30.13522 3177.443752 -25.20102 3243.044168 -20.27671 3309.503152 -15.34251 3430.23382 -10.39346 3491.563224 -5.47905 3527.797704 -.53495 3521.722244 4.424 3534.156928 9.3582 3502.026112 14.28746 3417.220694 19.23156 3326.430766 24.16577 3333.437554 29.08512 3154.669872 34.01933 2985.273678 58.6854 2537.464982 63.54537 2398.56978 68.48947 2360.465368 73.38903 2342.3263 78.34303 2338.204446 78.35293 2346.833782 83.28218 2353.800552 88.20649 2341.154864 93.15554 2347.070252 98.09469 2346.444516 103.019 2340.88929 107.94825 2370.928256 112.89236 2390.467954 117.84141 2423.224506 122.75087 2518.838422 127.69002 2626.152146 132.61927 2744.772774 137.54358 2872.190086 142.48768 3009.13532 147.43178 3129.091094 162.14531 3419.24706 167.05972 3540.199646 171.99887 3560.295958 176.94793 3557.676598 181.85244 3580.741518 186.78664 3539.606652 191.72579 3500.814658 196.63525 3452.109114 201.5843 3398.699636 206.51851 3289.159456 19.22166 3371.840282 24.17566 3323.469434 29.09997 3210.200304 34.02922 3116.194384 38.97828 2930.456294 43.89763 2813.53825 48.84174 2648.162046 53.78584 2577.766746 58.6854 2454.547686 63.54537 2416.326858 68.49442 2381.845894 73.40883 2355.983352 78.34303 2355.40491 80.8225 2347.830594 83.29703 2346.975664 85.75176 2353.211196 88.21639 2346.262616 90.68102 2353.909692 93.16544 2352.414474 95.62017 2353.942434 98.08974 2350.424488 100.56922 2357.947872 103.019 2367.624952 105.48856 2357.66047 107.93836 2374.264302 110.42773 2385.658518 112.89236 2390.98455 115.36688 2408.214118 117.83646 2443.0989 120.27634 2480.111912 122.75087 2537.221236 125.22539 2588.742592 127.68507 2612.185864 130.16949 2676.734898 132.62422 2752.696338 135.0839 2801.907564 137.54853 2889.768902 140.02306 2935.636806 142.48768 3018.062972 144.96221 3124.80553 147.42684 3171.179116 149.87662 3225.392592 157.26555 3344.591662 159.73513 3395.323572 162.15026 3421.142458 167.06467 3522.286134 gnuplot-4.6.4/demo/dgrid3d.dem0000644000471100001440000000330011015602533013054 0ustar set view 60,75 unset key set hidden3d # Raw data set title "The Valley of the Gnu" splot "gnu-valley" u 1:2:3 w linesp pause -1 "Hit return to continue" # QNorm set title "dgrid3d 30,30 qnorm 1" set dgrid3d 30,30 qnorm 1 splot "gnu-valley" u 1:2:3 w l pause -1 "Hit return to continue" set title "dgrid3d 30,30 qnorm 2" set dgrid3d 30,30 qnorm 2 splot "gnu-valley" u 1:2:3 w l pause -1 "Hit return to continue" set title "dgrid3d 30,30 qnorm 3" set dgrid3d 30,30 qnorm 3 splot "gnu-valley" u 1:2:3 w l pause -1 "Hit return to continue" set title "dgrid3d 30,30 qnorm 4" set dgrid3d 30,30 qnorm 4 splot "gnu-valley" u 1:2:3 w l pause -1 "Hit return to continue" set title "dgrid3d 30,30 qnorm 5" set dgrid3d 30,30 qnorm 5 splot "gnu-valley" u 1:2:3 w l pause -1 "Hit return to continue" # Gauss set title "dgrid3d 30,30 gauss 1" set dgrid3d 30,30 gauss 1 splot "gnu-valley" u 1:2:3 w l pause -1 "Hit return to continue" set title "dgrid3d 30,30 gauss .75" set dgrid3d 30,30 gauss .75 splot "gnu-valley" u 1:2:3 w l pause -1 "Hit return to continue" set title "dgrid3d 30,30 gauss .5" set dgrid3d 30,30 gauss .5 splot "gnu-valley" u 1:2:3 w l pause -1 "Hit return to continue" set title "dgrid3d 30,30 gauss .35" set dgrid3d 30,30 gauss .35 splot "gnu-valley" u 1:2:3 w l pause -1 "Hit return to continue" set title "dgrid3d 30,30 gauss .25" set dgrid3d 30,30 gauss .25 splot "gnu-valley" u 1:2:3 w l pause -1 "Hit return to continue" set title "dgrid3d 30,30 gauss .5,.35" set dgrid3d 30,30 gauss 0.5,0.35 splot "gnu-valley" u 1:2:3 w l pause -1 "Hit return to continue" set title "dgrid3d 30,30 gauss .35,.5" set dgrid3d 30,30 gauss 0.35,0.5 splot "gnu-valley" u 1:2:3 w l pause -1 "Hit return to continue" resetgnuplot-4.6.4/demo/stat.inc0000644000471100001440000001763210443700531012531 0ustar # # $Id: stat.inc,v 1.3 2006/06/14 03:24:09 sfeam Exp $ # # Library of Statistical Functions version 3.0 # # Copyright (c) 1991, 1992 Jos van der Woude, jvdwoude@hut.nl # History: # -- --- 1992 Jos van der Woude: 1st version # 06 Jun 2006 Dan Sebald: Defined PDF/CDF for whole real line or integer # set and range checked all other parameters. # # Shortcut for testing if a variable is an integer # isint(x)=(int(x)==x) # Define useful constants fourinvsqrtpi=4.0/sqrt(pi) invpi=1.0/pi invsqrt2pi=1.0/sqrt(2.0*pi) log2=log(2.0) sqrt2=sqrt(2.0) sqrt2invpi=sqrt(2.0/pi) twopi=2.0*pi # #define 1.0/Beta function # Binv(p,q)=exp(lgamma(p+q)-lgamma(p)-lgamma(q)) # NOTE: # # The stat functions are defined appropriately for the whole real line or # set of integers (the first input variable). There are restrictions on # some of the parameters, and an undefined value will result if the input # value falls outside the parameter's range. # # The discrete PDFs (and some parameters) must have integer (natural number) # inputs, otherwise an undefined result is produced. This means the user # must appropriately supply a discrete input set, perhaps by some form of # scaling before and after calling the stat desired function. To plot the # output of such a discrete data set passed through a stat function, the # user can make use of plotting features such as "with steps", and so on. # #define Probability Density Functions (PDFs) # # Arcsin PDF arcsin(x,r)=r<=0?1/0:abs(x)>r?0.0:invpi/sqrt(r*r-x*x) # Beta PDF beta(x,p,q)=p<=0||q<=0?1/0:x<0||x>1?0.0:Binv(p,q)*x**(p-1.0)*(1.0-x)**(q-1.0) # Binomial PDF binom(x,n,p)=p<0.0||p>1.0||n<0||!isint(n)?1/0:\ !isint(x)?1/0:x<0||x>n?0.0:exp(lgamma(n+1)-lgamma(n-x+1)-lgamma(x+1)\ +x*log(p)+(n-x)*log(1.0-p)) # Cauchy PDF # a location parameter, b > 0 scale parameter cauchy(x,a,b)=b<=0?1/0:b/(pi*(b*b+(x-a)**2)) # Chi-square PDF chisq(x,k)=k<=0||!isint(k)?1/0:\ x<=0?0.0:exp((0.5*k-1.0)*log(x)-0.5*x-lgamma(0.5*k)-k*0.5*log2) # Erlang PDF erlang(x,n,lambda)=n<=0||!isint(n)||lambda<=0?1/0:\ x<0?0.0:x==0?(n==1?real(lambda):0.0):exp(n*log(lambda)+(n-1.0)*log(x)-lgamma(n)-lambda*x) # Extreme (Gumbel extreme value) PDF extreme(x,mu,alpha)=alpha<=0?1/0:alpha*(exp(-alpha*(x-mu)-exp(-alpha*(x-mu)))) # F PDF f(x,d1,d2)=d1<=0||!isint(d1)||d2<=0||!isint(d2)?1/0:\ Binv(0.5*d1,0.5*d2)*(real(d1)/d2)**(0.5*d1)*x**(0.5*d1-1.0)/(1.0+(real(d1)/d2)*x)**(0.5*(d1+d2)) # Gamma PDF # rho > 0 shape parameter, lambda > 0 inverse scale parameter gmm(x,rho,lambda)=rho<=0||lambda<=0?1/0:\ x<0?0.0:x==0?(rho>1?0.0:rho==1?real(lambda):1/0):\ exp(rho*log(lambda)+(rho-1.0)*log(x)-lgamma(rho)-lambda*x) # Geometric PDF # p probability of success, x number of failures before first success geometric(x,p)=p<=0||p>1?1/0:\ !isint(x)?1/0:x<0||p==1?(x==0?1.0:0.0):exp(log(p)+x*log(1.0-p)) # Half normal PDF halfnormal(x,sigma)=sigma<=0?1/0:x<0?0.0:sqrt2invpi/sigma*exp(-0.5*(x/sigma)**2) # Hypergeometric PDF # N objects, C of one class (N-C of another), d drawn without # replacement, x drawn of class C. hypgeo(x,N,C,d)=N<0||!isint(N)||C<0||C>N||!isint(C)||d<0||d>N||!isint(d)?1/0:\ !isint(x)?1/0:x>d||x>C||x<0||x1?1/0:\ !isint(x)?1/0:x<0?0.0:p==1?(x==0?1.0:0.0):exp(lgamma(r+x)-lgamma(r)-lgamma(x+1)+\ r*log(p)+x*log(1.0-p)) # Negative exponential PDF nexp(x,lambda)=lambda<=0?1/0:x<0?0.0:lambda*exp(-lambda*x) # Normal PDF normal(x,mu,sigma)=sigma<=0?1/0:invsqrt2pi/sigma*exp(-0.5*((x-mu)/sigma)**2) # Pareto PDF pareto(x,a,b)=a<=0||b<0||!isint(b)?1/0:x=a?0.0:f==0?1.0/a:2.0/a*sin(f*pi*x/a)**2/(1-sin(twopi*f)) # t (Student's t) PDF t(x,nu)=nu<0||!isint(nu)?1/0:\ Binv(0.5*nu,0.5)/sqrt(nu)*(1+real(x*x)/nu)**(-0.5*(nu+1.0)) # Triangular PDF triangular(x,m,g)=g<=0?1/0:x=m+g?0.0:1.0/g-abs(x-m)/real(g*g) # Uniform PDF uniform(x,a,b)=x<(a=(a>b?a:b)?0.0:1.0/abs(b-a) # Weibull PDF weibull(x,a,lambda)=a<=0||lambda<=0?1/0:\ x<0?0.0:x==0?(a>1?0.0:a==1?real(lambda):1/0):\ exp(log(a)+a*log(lambda)+(a-1)*log(x)-(lambda*x)**a) # #define Cumulative Distribution Functions (CDFs) # # Arcsin CDF carcsin(x,r)=r<=0?1/0:x<-r?0.0:x>r?1.0:0.5+invpi*asin(x/r) # incomplete Beta CDF cbeta(x,p,q)=ibeta(p,q,x) # Binomial CDF cbinom(x,n,p)=p<0.0||p>1.0||n<0||!isint(n)?1/0:\ !isint(x)?1/0:x<0?0.0:x>=n?1.0:ibeta(n-x,x+1.0,1.0-p) # Cauchy CDF # a location parameter, b > 0 scale parameter ccauchy(x,a,b)=b<=0?1/0:0.5+invpi*atan((x-a)/b) # Chi-square CDF cchisq(x,k)=k<=0||!isint(k)?1/0:x<0?0.0:igamma(0.5*k,0.5*x) # Erlang CDF cerlang(x,n,lambda)=n<=0||!isint(n)||lambda<=0?1/0:x<0?0.0:igamma(n,lambda*x) # Extreme (Gumbel extreme value) CDF cextreme(x,mu,alpha)=alpha<=0?1/0:exp(-exp(-alpha*(x-mu))) # F CDF cf(x,d1,d2)=d1<=0||!isint(d1)||d2<=0||!isint(d2)?1/0:1.0-ibeta(0.5*d2,0.5*d1,d2/(d2+d1*x)) # incomplete Gamma CDF # rho > 0 shape parameter, lambda > 0 inverse scale parameter cgmm(x,rho,lambda)=rho<=0||lambda<=0?1/0:x<0?0.0:igamma(rho,x*lambda) # Geometric CDF # p probability of success, x number of failures before first success cgeometric(x,p)=p<=0||p>1?1/0:\ !isint(x)?1/0:x<0||p==0?0.0:p==1?1.0:1.0-exp((x+1)*log(1.0-p)) # Half normal CDF chalfnormal(x,sigma)=sigma<=0?1/0:x<0?0.0:erf(x/sigma/sqrt2) # Hypergeometric CDF # N objects, C of one class (N-C of another), d drawn without # replacement, x drawn of class C. chypgeo(x,N,C,d)=N<0||!isint(N)||C<0||C>N||!isint(C)||d<0||d>N||!isint(d)?1/0:\ !isint(x)?1/0:x<0||xd||x>C?1.0:hypgeo(x,N,C,d)+chypgeo(x-1,N,C,d) # Laplace CDF claplace(x,mu,b)=b<=0?1/0:(x1?1/0:\ !isint(x)?1/0:x<0?0.0:ibeta(r,x+1,p) # Negative exponential CDF cnexp(x,lambda)=lambda<=0?1/0:x<0?0.0:1-exp(-lambda*x) # Normal CDF cnormal(x,mu,sigma)=sigma<=0?1/0:0.5+0.5*erf((x-mu)/sigma/sqrt2) # Pareto CDF cpareto(x,a,b)=a<=0||b<0||!isint(b)?1/0:xa?1.0:f==0?real(x)/a:(real(x)/a-sin(f*twopi*x/a)/(f*twopi))/(1.0-sin(twopi*f)/(twopi*f)) # t (Student's t) CDF ct(x,nu)=nu<0||!isint(nu)?1/0:0.5+0.5*sgn(x)*(1-ibeta(0.5*nu,0.5,nu/(nu+x*x))) # Triangular PDF ctriangular(x,m,g)=g<=0?1/0:\ x=m+g?1.0:0.5+real(x-m)/g-(x-m)*abs(x-m)/(2.0*g*g) # Uniform CDF cuniform(x,a,b)=x<(a=(a>b?a:b)?1.0:real(x-a)/(b-a) # Weibull CDF cweibull(x,a,lambda)=a<=0||lambda<=0?1/0:x<0?0.0:1.0-exp(-(lambda*x)**a) gnuplot-4.6.4/demo/polar.dem0000644000471100001440000000243711471403727012675 0ustar # # $Id: polar.dem,v 1.8 2010/11/19 05:15:03 sfeam Exp $ # # Show some of the new polar capabilities. # unset border set clip set polar set xtics axis nomirror set ytics axis nomirror unset rtics set samples 160 set zeroaxis set trange [0:2*pi] set title "Three circles (with aspect ratio distortion)" plot .5,1,1.5 pause -1 "Hit return to continue" set title "" set key box plot cos(2*t) pause -1 "Hit return to continue" plot 2*sqrt(cos(t)),-2*sqrt(cos(t)) pause -1 "Hit return to continue" plot sin(4*t),cos(4*t) set offset 0,0,0,0 pause -1 "Hit return to continue" set xrange [-5:5] set yrange [-5:5] plot t/cos(3*t) pause -1 "Hit return to continue" set autoscale plot 1-sin(t) pause -1 "Hit return to continue" set trange [0:12*pi] plot 2*t pause -1 "Hit return to continue" butterfly(x)=exp(cos(x))-2*cos(4*x)+sin(x/12)**5 set samples 800 set title "Butterfly" unset key plot butterfly(t) pause -1 "Hit return to continue" reset set polar set grid polar unset xtics unset ytics set border 0 set style fill solid 0.5 set rrange [0.1 : 4] set size square set key title "bounding radius 2.5" set key outside top right samplen 0.7 plot 3.+sin(t)*cos(5*t) with filledcurve above r=2.5 notitle,\ 3.+sin(t)*cos(5*t) with line pause -1 "Hit return to continue" # undo what we've done above reset gnuplot-4.6.4/demo/spline.dem0000644000471100001440000000514710126177522013050 0ustar # # $Id: spline.dem,v 1.6 2004/09/28 06:06:10 sfeam Exp $ # # Some curve plotting using common cubic polynomial basis function for cagd. # # Gershon Elber, Aug. 1992 # set xrang [0:1] set grid set key box set yrange[-0.2:1.4] m0(x) = 1 m1(x) = x m2(x) = x**2 m3(x) = x**3 set title "The cubic Monomial basis functions" plot m0(x), m1(x), m2(x), m3(x) pause -1 "Press return to continue" h00(x) = x**2 * ( 2 * x - 3) + 1 h01(x) = -x**2 * (2 * x - 3) h10(x) = x * (x - 1)**2 h11(x) = x**2 * (x - 1) set title "The cubic Hermite basis functions" plot h00(x), h01(x), h10(x), h11(x) pause -1 "Press return to continue" bez0(x) = (1 - x)**3 bez1(x) = 3 * (1 - x)**2 * x bez2(x) = 3 * (1 - x) * x**2 bez3(x) = x**3 set title "The cubic Bezier basis functions" plot bez0(x), bez1(x), bez2(x), bez3(x) pause -1 "Press return to continue" bsp0(x) = ( 1 - 3 * x + 3 * x**2 - x**3 ) / 6; bsp1(x) = ( 4 - 6 * x**2 + 3 * x**3 ) / 6; bsp2(x) = ( 1 + 3 * x + 3 * x**2 - 3 * x**3 ) / 6 bsp3(x) = x**3 / 6 set title "The cubic uniform Bspline basis functions" plot bsp0(x), bsp1(x), bsp2(x), bsp3(x) pause -1 "Press return to continue" y0 = 1 y1 = 0.2 y2 = 0.8 y3 = 0 x0 = 0 x1 = 0.33 x2 = 0.66 x3 = 1 xv0 = -0.3 yv0 = 0.5 xv1 = -0.4 yv1 = 0.2 set arrow from x0,y0 to x1,y1 nohead set arrow from x1,y1 to x2,y2 nohead set arrow from x2,y2 to x3,y3 nohead cub_bezier_x(t) = bez0(t) * x0 + bez1(t) * x1 + bez2(t) * x2 + bez3(t) * x3 cub_bezier_y(t) = bez0(t) * y0 + bez1(t) * y1 + bez2(t) * y2 + bez3(t) * y3 cub_bsplin_x(t) = bsp0(t) * x0 + bsp1(t) * x1 + bsp2(t) * x2 + bsp3(t) * x3 cub_bsplin_y(t) = bsp0(t) * y0 + bsp1(t) * y1 + bsp2(t) * y2 + bsp3(t) * y3 set parametric set trange [0:1] set title "The cubic Bezier/Bspline basis functions in use" plot cub_bezier_x(t), cub_bezier_y(t) with lines lt 2,\ cub_bsplin_x(t), cub_bsplin_y(t) with lines lt 3 pause -1 "Press return to continue" unset arrow # # Note the arrows here, scaled by 1/3 so they will fit into plotting area # set arrow from x1,y1 to x1+xv0/3,y1+yv0/3 set arrow from x2,y2 to x2+xv1/3,y2+yv1/3 set arrow from x1,y1 to x1+xv0,y1+yv0 set arrow from x2,y2 to x2+xv1,y2+yv1 cub_hermit_x1(t) = h00(t) * x1 + h01(t) * x2 + h10(t) * xv0 + h11(t) * xv1 cub_hermit_y1(t) = h00(t) * y1 + h01(t) * y2 + h10(t) * yv0 + h11(t) * yv1 cub_hermit_x2(t) = h00(t) * x1 + h01(t) * x2 + h10(t) * xv0*3 + h11(t) * xv1*3 cub_hermit_y2(t) = h00(t) * y1 + h01(t) * y2 + h10(t) * yv0*3 + h11(t) * yv1*3 set title "The cubic Hermite basis functions in use" plot cub_hermit_x1(t), cub_hermit_y1(t) with lines lt 2,\ cub_hermit_x2(t), cub_hermit_y2(t) with lines lt 3 pause -1 "Press return to continue" reset gnuplot-4.6.4/demo/transparent_solids.dem0000644000471100001440000000312011706050702015454 0ustar set title "Interlocking Tori - PM3D surface with depth sorting and transparency" unset border unset key set object 1 rect from screen 0, 0, 0 to screen 1, 1, 0 behind set object 1 rect fc rgb "gray" fillstyle solid 1.0 border -1 set view 64, 345, 1.24375, 0.995902 set isosamples 50, 20 unset xtics unset ytics unset ztics set parametric set dummy u,v set urange [ -pi : pi ] set vrange [ -pi : pi ] set pm3d depthorder hidden3d 2 set palette rgbformulae 8, 9, 7 set style line 2 linetype 2 linecolor rgb "#a0a0f0" linewidth 0.5 set style fill transparent solid 0.30 border splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with pm3d, \ 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with pm3d pause -1 "Hit return to continue" unset title set label 1 "Kuen's Surface" at screen 0.57, 0.9 set label 1 font "frscript,20" set style line 3 linetype -1 linewidth 0.5 set pm3d depthorder hidden3d 3 set style fill transparent solid 0.65 border set palette set hidden3d set ticslevel 0 unset xtics ; unset ytics ; unset ztics unset border ; unset colorbox ; unset key set lmargin at screen 0.1 set bmargin at screen 0.1 set rmargin at screen 0.9 set tmargin at screen 0.9 set parametric set dummy u,v set urange [-4.5:4.5] set vrange [0.05:pi-0.05] set isosamples 51,51 set view 122, 357, 1.35, 1.08 a = 1.0 x(u,v) = 2.*a*(cos(u)+u*sin(u))*sin(v) / (1+u**2.*(sin(v))**2) y(u,v) = 2.*a*(sin(u)-u*cos(u))*sin(v) / (1+u**2.*(sin(v))**2) z(u,v) = a*log(tan(v/2.))+2.*cos(v)/(1+u**2.*(sin(v))**2) splot x(u,v), y(u,v), z(u,v) with pm3d pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/circles.dem0000644000471100001440000000735411336705124013203 0ustar # # demo for the use of "set object circle" and "plot ... with circles" # # Ethan A Merritt, Ralf Juengling - 2007,2008 if ((GPVAL_VERSION == 4.3 || GPVAL_VERSION == 4.2) \ && (!strstrt(GPVAL_COMPILE_OPTIONS,"+OBJECTS"))) \ print ">>> Skipping demo <<<\n" ; \ print "This copy of gnuplot was built without support for circles\n" ; \ exit ; set size ratio -1 set style fill solid 1.0 border -1 set obj 10 circle arc [ 0 : 20] fc rgb "red" set obj 11 circle arc [ 20 : 50] fc rgb "orange" set obj 12 circle arc [ 50 : 90] fc rgb "yellow" set obj 13 circle arc [ 90 : 120] fc rgb "forest-green" set obj 14 circle arc [120 : 190] fc rgb "dark-turquoise" set obj 15 circle arc [190 : 360] fc rgb "dark-magenta" set obj 10 circle at screen .18,.32 size screen .10 front set obj 11 circle at screen .18,.32 size screen .10 front set obj 12 circle at screen .18,.32 size screen .10 front set obj 13 circle at screen .1767,.342 size screen .10 front set obj 14 circle at screen .18,.32 size screen .10 front set obj 15 circle at screen .18,.32 size screen .10 front set obj 20 rect from graph 0,0 to graph 1,1 behind fc rgb "cyan" fs solid 0.2 # plot world map and correspondent locations as a circle set title "" set xlabel "Note that overlapping transparent circles produce a darker area" unset key unset xtics unset ytics set border set yrange [-70:*] plot 'world.dat' with filledcurves lc rgb "light-green" , \ 'world.cor' using 1:2:(7.*rand(0)) with circles lt 3 \ fs transparent solid 0.5 noborder pause -1 "Hit return to continue" # by Peter Juhasz - 2010 reset set style fill solid 1.0 border -1 set size ratio -1 # Plot pie charts on top of the map of the world. # The pie segments are read from a data file. # Each segment has to be specified with a start and end angle. set title "Sources of energy production, plotted for each continent" unset key unset xtics unset ytics set border set yrange [-70:*] set palette model HSV func gray*0.75, 0.5, 0.99 unset colorbox r = 0.01 types = 6 keyx = -137. keyy = -15. keyr = 25. set obj 20 rect from graph 0,0 to graph 1,1 behind fc rgb "cyan" fs solid 0.2 set angle degree plot 'world.dat' with filledcurves lc rgb "light-green" notit, \ 'energy_circles.dat' using 2:1:(sqrt($9)*r):6:($6+$7):5 \ with circles lc pal fs solid 1.0 border rgb "gray",\ for [i=0:types-1] '' using (keyx):(keyy):(keyr-5):(-(i+1)*360./types):(-(i)*360./types):5 \ every ::i::i with circles lc pal fs solid 1.0 border rgb "gray",\ for [i=0:types-1] '' using \ (keyx+keyr*cos(-(i+0.5)*360./types)):(keyy+keyr*sin(-(i+0.5)*360./types)):4 \ every ::i::i with labels pause -1 "Hit return to continue" # by Ralf Juengling - 2008 reset set title "Trace of unconstrained optimization with trust-region method" unset key set size ratio -1 set xrange [-2.5:1.5] set yrange [-1:2.5] plot 'optimize.dat' with circles lc rgb "blue" fs transparent solid 0.15 noborder,\ 'optimize.dat' u 1:2 with linespoints lw 2 lc rgb "black" pause -1 "Hit return to continue" reset set size ratio -1 set title "Lena's key points" unset xtics unset ytics unset key unset border set yrange [] reverse plot 'lena.rgb' binary array=(128,128) dx=4 dy=4 format='%uchar' with rgbimage, \ 'lena-keypoints.bin' binary format='%double' with circles lc rgb "yellow" pause -1 "Hit return to continue" reset set size ratio -1 set title "Delaunay triangulation of Hemisphere points, some empty circles in red" unset key plot 'empty-circles.dat' with circles lw 2 lc rgb "red", \ 'delaunay-edges.dat' with lines lc rgb "forest-green", \ 'hemisphr.dat' u (100*$1):(100*$2) with points pt 7 lc rgb "black" pause -1 "Hit return to continue" gnuplot-4.6.4/demo/cities.dat0000644000471100001440000000746411744033671013050 0ustar Paris France 2110420 48.86° 2.34° Marseille France 820729 43.31° 5.37° Lyon France 443859 45.76° 4.83° Toulouse France 411768 43.62° 1.45° Nice France 331958 43.70° 7.27° Nantes France 282251 47.23° -1.57° Strasbourg France 272599 48.58° 7.76° Montpellier France 230663 43.61° 3.87° Bordeaux France 216978 44.84° -0.58° Rennes France 212616 48.11° -1.68° Le Havre France 189329 49.50° 0.12° Reims France 184594 49.25° 4.03° Lille France 180547 50.64° 3.07° "Saint-Étienne" France 170734 45.43° 4.39° Toulon France 161160 43.13° 5.92° Grenoble France 155621 45.19° 5.72° Angers France 153340 47.48° -0.54° Brest France 151526 48.39° -4.50° Le Mans France 148654 48.00° 0.20° Dijon France 147153 47.33° 5.03° Aix-en-Provence France 138060 43.53° 5.44° Clermont-Ferrand France 137274 45.78° 3.08° "Nîmes" France 136424 43.84° 4.35° Amiens France 135768 49.90° 2.30° Tours France 133538 47.38° 0.69° Limoges France 132299 45.83° 1.25° Metz France 125010 49.12° 6.18° Villeurbanne France 121852 45.77° 4.88° "Besançon" France 118152 47.24° 6.02° Caen France 116259 49.19° -0.36° "Orléans" France 112327 47.90° 1.90° Mulhouse France 111307 47.76° 7.34° Perpignan France 110149 42.70° 2.89° Boulogne-Billancourt France 108079 48.83° 2.24° Rouen France 105310 49.44° 1.08° Nancy France 103196 48.69° 6.17° Avignon France 86865 43.96° 4.81° Nanterre France 85753 48.90° 2.20° Poitiers France 85406 46.58° 0.34° Versailles France 82101 48.81° 2.14° "Créteil" France 80168 48.79° 2.45° Pau France 79449 43.30° -0.39° La Rochelle France 78854 46.17° -1.18° Bourges France 70100 47.08° 2.39° Colmar France 65695 48.08° 7.36° Valence France 65016 44.94° 4.89° Quimper France 64038 47.99° -4.11° Troyes France 60353 48.30° 4.08° "Chambéry" France 56022 45.58° 5.91° Niort France 55868 46.32° -0.47° "Charleville-Mézières" France 55343 49.75° 4.73° Beauvais France 54116 49.43° 2.09° Vannes France 52436 47.66° -2.76° Montauban France 51839 44.02° 1.35° Laval France 51504 48.07° -0.78° "Évreux" France 50882 49.03° 1.14° La Roche-sur-Yon France 50608 46.67° -1.44° Belfort France 50109 47.65° 6.85° Annecy France 49903 45.91° 6.12° Blois France 49207 47.59° 1.32° "Châteauroux" France 48724 46.81° 1.70° Ajaccio France 47914 41.93° 8.73° "Évry" France 46928 48.64° 2.44° "Châlons-en-Champagne" France 46678 48.97° 4.36° Albi France 46540 43.93° 2.15° Tarbes France 46048 43.24° 0.08° Carcassonne France 44311 43.22° 2.34° Saint-Brieuc France 44081 48.52° -2.77° "Angoulême" France 42995 45.66° 0.15° Bobigny France 42506 48.91° 2.44° Bourg-en-Bresse France 41174 46.21° 5.21° Bastia France 41160 42.71° 9.46° Arras France 40529 50.29° 2.78° Nevers France 39648 47.00° 3.15° Chartres France 39114 48.46° 1.48° Auxerre France 37581 47.81° 3.56° Gap France 36131 44.57° 6.08° Melun France 35044 48.54° 2.65° "Épinal" France 35040 48.18° 6.44° "Mâcon" France 33624 46.31° 4.81° Mont-de-Marsan France 30684 43.90° -0.51° Agen France 30554 44.20° 0.62° "Périgueux" France 29980 45.18° 0.71° Aurillac France 29402 44.92° 2.43° "Alençon" France 28628 48.44° 0.09° Pontoise France 26610 49.05° 2.09° Laon France 25925 49.58° 3.63° Chaumont France 25086 48.11° 5.14° Rodez France 23407 44.36° 2.57° Auch France 21962 43.65° 0.58° Moulins France 21241 46.57° 3.33° Le Puy-en-Velay France 20783 45.05° 3.88° Cahors France 20645 44.46° 1.44° "Saint-Lô" France 19703 49.13° -1.11° Lons-le-Saunier France 18169 46.68° 5.53° Vesoul France 17128 47.63° 6.15° Bar-le-Duc France 16755 48.78° 5.17° Digne-les-Bains France 15941 44.10° 6.23° Tulle France 15206 45.26° 1.76° "Guéret" France 13858 46.17° 1.87° Mende France 11915 44.52° 3.48° Privas France 9165 44.73° 4.58° Foix France 9135 42.97° 1.60° gnuplot-4.6.4/demo/macros.dem0000644000471100001440000000170710566246172013046 0ustar # # Experimental option GP_MACROS # if ((GPVAL_VERSION == 4.3 || GPVAL_VERSION == 4.2) \ && (!strstrt(GPVAL_COMPILE_OPTIONS,"+MACROS"))) \ print ">>> Skipping demo <<<\n" ; \ print "This copy of gnuplot was built without support for macro substitution\n" ; \ exit ; set macros title = "Test of command line macro substitution" style1 = "points" style2 = "lines lw 2" plot1 = "'1.dat' using 1:2 with @style1" plot2 = "'1.dat' using 1:($2+1) with @style2" plot3 = '@plot2' plot4 = '@plot3' plot5 = '@plot4' plot6 = '@plot5' # set title title plot @plot1 title 'plot1', \ @plot2 title 'plot2' show var # pause -1 " to test recursion depth" # plot @plot1 title 'plot1', @plot3 lt 3 title 'Recursion depth 3' pause 1 plot @plot1 title 'plot1', @plot4 lt 4 title 'Recursion depth 4' pause 1 plot @plot1 title 'plot1', @plot5 lt 5 title 'Recursion depth 5' pause 1 plot @plot1 title 'plot1', @plot6 lt 6 title 'Recursion depth 6' pause 1 # pause -1 gnuplot-4.6.4/demo/rgb_variable.dem0000644000471100001440000000515110534466313014172 0ustar # # Demo of reading color information from the data file itself # # rgb(r,g,b) = int(r)*65536 + int(g)*256 + int(b) # set border 0 unset xtics; unset ytics; unset ztics set rmargin 5; set lmargin 5; set bmargin 2 set angle degrees xrgb(r,g,b) = (g-b)/255. * cos(30.) yrgb(r,g,b) = r/255. - (g+b)/255. * sin(30.) set arrow 1 from 0,0 to 0,1 nohead lw 3 lc rgb "red" back set arrow 2 from 0,0 to cos(-30), sin(-30) nohead lw 3 lc rgb "green" back set arrow 3 from 0,0 to cos(210), sin(210) nohead lw 3 lc rgb "blue" back set title "RGB color information read from data file" plot 'rgb_variable.dat' using (xrgb($1,$2,$3)):(yrgb($1,$2,$3)):(rgb($1,$2,$3)) \ with points pt 7 ps 4 lc rgb variable notitle pause -1 "Hit return to continue" # set title "Both RGB color information\n and point size controlled by input" plot 'rgb_variable.dat' using (xrgb($1,$2,$3)):(yrgb($1,$2,$3)):(1.+2.*rand(0)):(rgb($1,$2,$3)) \ with points pt 7 ps var lc rgb variable notitle pause -1 "Hit return to continue" # set border -1 front linetype -1 linewidth 1.000 set ticslevel 0 set xtics border set ytics border set ztics border # unset arrow 1 unset arrow 2 unset arrow 3 # set xlabel "Red" tc rgb "red" set xrange [0:255] set ylabel "Green" tc rgb "green" set yrange [0:255] set zlabel "Blue" tc rgb "blue" set zrange [0:255] # splot 'rgb_variable.dat' using 1:2:3:(rgb($1,$2,$3)) with points pt 7 ps 4 lc rgb variable, \ '' using 1:2:3:(sprintf("0x%x",rgb($1,$2,$3))) with labels left offset 1 notitle pause -1 "Hit return to continue" # # # Unfortunately, not all platforms allow us to read hexadecimal constants # from a data file. Warn the user if that is the case. # if (0 == int('0x01')) \ set label 99 at screen .05, screen .15 "If you see only black dots,\nthis means your platform does not \nsupport reading hexadecimal constants\nfrom a data file. Get a newer libc." splot 'rgb_variable.dat' using 1:2:3:(5*rand(0)):4 with points pt 7 ps variable lc rgb variable \ title "variable pointsize and rgb color read as hexidecimal" pause -1 "Hit return to continue" set label 99 "" # set border 0 set xtics axis nomirror set ytics axis nomirror set ztics axis nomirror set xzeroaxis lt -1 lc rgb "red" lw 2 set yzeroaxis lt -1 lc rgb "green" lw 2 set zzeroaxis lt -1 lc rgb "blue" lw 2 set xyplane at 0.0 splot 'rgb_variable.dat' using 1:2:3:(5*rand(0)):(rgb($1,$2,$3)) with points pt 7 ps variable lc rgb variable \ title "variable pointsize and rgb color computed from coords" pause -1 "Hit return to continue" set title "Demo of hidden3d with points only (no surface)" set hidden3d replot pause -1 "Hit return to continue" # reset gnuplot-4.6.4/demo/srl.dat0000644000471100001440000000203110125400464012337 0ustar # Data file for world2.dem # Note: The N/S and E/W latitude and longitude flags are ignored, # so S and W require a minus sign instead # #Site Latitude Longitude GeV #--------------------------------------------------- Paris 48:50N 2:20E 2.75 Grenoble 45:21N 5:19E 6 Ithaca 42:26N -76:30W 5.5 Argonne 41:50N -87:41W 7 Stanford 37:25N -122:09W 3 "Baton Rouge" 30:26N -91:07W 1.3 Hamburg 53:34N 10:02E 4.5 Barcelona 41:18N 2:05E 2.5 Upton 40:52N -72:53W 2.8 Yerevan 40:11N 44:30E 3.2 Campinas -23:00S -47:08W 1.35 Trieste 45:39N 13:48E 2.4 Grenoble 45:11N 5:43E 6 Lund 55:06N 9:48E 1.5 "Nishi Harima" 35N 135E 8 Tsukuba 36:04N 140:08E 2.5 Allaan 31:57N 35:57E 2.5 Novosibirsk 55:02N 82:56E 0.8 Pohang 36:01N 129:09E 2 Villigen 47:32N 8:13E 2.4 Daresbury 53:20N -2:40W 2 Melbourne -37:42S 145E 3 Saskatoon 52:07N -106:38W 2.9 Shanghai 31:06N 121:22E 3.5 Moscow 55:45N 37:36E 2.5 # gnuplot-4.6.4/demo/labelplot.pdb0000644000471100001440000000566510071446526013543 0ustar ATOM 2 CA Gly A 2 15.650 4.729 -25.837 1.00100.53 C ATOM 6 CA Gly A 3 19.008 6.213 -26.458 1.00 97.90 C ATOM 10 CA Arg A 4 19.415 8.236 -23.277 1.00 88.77 C ATOM 21 CA Glu A 5 18.790 7.506 -19.627 1.00 63.87 C ATOM 30 CA Gly A 6 16.256 9.024 -17.278 1.00 45.64 C ATOM 34 CA Val A 7 16.714 5.511 -15.945 1.00 39.94 C ATOM 41 CA Leu A 8 20.247 6.236 -14.817 1.00 36.86 C ATOM 49 CA Lys A 9 19.079 9.370 -13.209 1.00 29.25 C ATOM 58 CA Lys A 10 16.415 7.489 -11.262 1.00 24.12 C ATOM 67 CA Leu A 11 18.939 4.806 -10.235 1.00 22.47 C ATOM 75 CA Arg A 12 21.338 7.510 -9.023 1.00 22.83 C ATOM 86 CA Ala A 13 18.650 9.041 -6.747 1.00 25.77 C ATOM 91 CA Val A 14 17.926 5.440 -5.567 1.00 21.59 C ATOM 98 CA Glu A 15 21.519 4.709 -4.741 1.00 12.47 C ATOM 107 CA Asn A 16 21.923 8.103 -2.969 1.00 19.28 C ATOM 115 CA Glu A 17 18.738 7.381 -0.911 1.00 17.58 C ATOM 124 CA Leu A 18 20.141 3.970 0.025 1.00 17.14 C ATOM 132 CA His A 19 23.404 5.538 1.185 1.00 20.10 C ATOM 142 CA Tyr A 20 21.340 7.966 3.385 1.00 15.07 C ATOM 154 CA Asn A 21 19.556 4.954 5.039 1.00 14.35 C ATOM 162 CA Lys A 22 22.883 3.311 5.413 1.00 19.97 C ATOM 171 CA Ser A 23 24.367 6.240 7.511 1.00 24.61 C ATOM 177 CA Leu A 24 21.211 6.393 9.572 1.00 15.71 C ATOM 185 CA Leu A 25 21.318 2.629 10.239 1.00 22.57 C ATOM 193 CA Glu A 26 24.936 3.013 11.365 1.00 22.56 C ATOM 202 CA Glu A 27 23.865 5.921 13.590 1.00 26.90 C ATOM 211 CA Val A 28 21.168 3.526 15.092 1.00 17.85 C ATOM 218 CA Lys A 29 23.639 0.750 15.593 1.00 27.01 C ATOM 227 CA Asp A 30 26.212 3.212 17.131 1.00 37.89 C ATOM 235 CA Glu A 31 23.505 4.530 19.408 1.00 33.37 C ATOM 244 CA Leu A 32 22.580 1.043 20.447 1.00 34.71 C ATOM 252 CA Gln A 33 26.070 -0.210 21.091 1.00 51.93 C ATOM 261 CA Lys A 34 26.216 2.835 23.225 1.00 67.83 C ATOM 270 CA Met A 35 23.323 2.341 25.600 1.00 80.81 C ATOM 278 CA Arg A 36 24.734 -1.205 26.107 1.00 84.23 C ATOM 289 CA Gln A 37 26.891 -3.324 28.634 1.00 91.87 C ATOM 298 CA Leu A 38 29.958 -1.118 28.262 1.00 93.98 C gnuplot-4.6.4/demo/rgbalpha.dem0000644000471100001440000000211512017176741013331 0ustar set border linecolor rgb "gold" set key title "Plot style rgbalpha" textcolor rgb "gold" set key bottom left at screen .75, screen .75 set key Left width -7 sample 1 set object 1 rect from screen 0, 0 to screen 1, 1 behind \ fc rgb "gray10" fillstyle solid 1.00 noborder set samples 128, 128 set size ratio 0.95 set bmargin at screen .1 set tmargin at screen .9 set lmargin at screen .1 set xrange [ 0. : 128. ] set yrange [ 0. : 128. ] # Alpha = linear gradient on x plot 100.*(.4+sin(x/5.)/(x/5.)) lw 5 title 'solid line', \ 'lena.rgb' binary array=(128,128) format="%uchar" flipy using 1:2:3:(2.*column(0)) \ with rgbalpha title "Lena with linear\nalpha gradient" pause -1 "Hit return to continue" # Alpha = circular mask focus(x,y) = ((column(0)-x)**2 + (column(-1)-(127-y))**2) > 400 ? 0 : 255 plot 100.*(.4+sin(x/5.)/(x/5.)) lw 5 title 'solid line', \ 'lena.rgb' binary array=(128,128) format="%uchar" flipy using 1:2:3:(focus(70,50)) \ with rgbalpha title "Lena with circular mask" pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/immigration.dat0000644000471100001440000000267210072147614014077 0ustar # IMMIGRATION BY REGION AND SELECTED COUNTRY OF LAST RESIDENCE # Region Austria Hungary Belgium Czechoslovakia Denmark France Germany Greece Ireland Italy Netherlands Norway Sweden Poland Portugal Romania Soviet_Union Spain Switzerland United_Kingdom Yugoslavia Other_Europe TOTAL 1891-1900 234081 181288 18167 - 50231 30770 505152 15979 388416 651893 26758 95015 226266 96720 27508 12750 505290 8731 31179 271538 - 282 3378014 1901-1910 668209 808511 41635 - 65285 73379 341498 167519 339065 2045877 48262 190505 249534 - 69149 53008 1597306 27935 34922 525950 - 39945 7387494 1911-1920 453649 442693 33746 3426 41983 61897 143945 184201 146181 1109524 43718 66395 95074 4813 89732 13311 921201 68611 23091 341408 1888 31400 4321887 1921-1930 32868 30680 15846 102194 32430 49610 412202 51084 211234 455315 26948 68531 97249 227734 29994 67646 61742 28958 29676 339570 49064 42619 2463194 1931-1940 3563 7861 4817 14393 2559 12623 144058 9119 10973 68028 7150 4740 3960 17026 3329 3871 1370 3258 5512 31572 5835 11949 377566 1941-1950 24860 3469 12189 8347 5393 38809 226578 8973 19789 57661 14860 10100 10665 7571 7423 1076 571 2898 10547 139306 1576 8486 621147 1951-1960 67106 36637 18575 918 10984 51121 477765 47608 43362 185491 52277 22935 21697 9985 19588 1039 671 7894 17675 202824 8225 16350 1325727 1961-1970 20621 5401 9192 3273 9201 45237 190796 85969 32966 214111 30606 15484 17116 53539 76065 3531 2465 44659 18453 213822 20381 11604 1124492 gnuplot-4.6.4/demo/stringvar.dem0000644000471100001440000000747410603116666013604 0ustar # # Miscellaneous neat things you can do using the string variables code # set print "stringvar.tmp" print "" print "Exercise substring handling" print "" beg = 2 end = 4 print "beg = ",beg," end = ",end foo = "ABCDEF" print "foo = ",foo print "foo[3:5] = ",foo[3:5] print "foo[1:1] = ",foo[1:1] print "foo[5:3] = ",foo[5:3] print "foo[beg:end] = ",foo[beg:end] print "foo[end:beg] = ",foo[end:beg] print "foo[5:] = ",foo[5:] print "foo[5:*] = ",foo[5:*] print "foo[:] = ",foo[:] print "foo[*:*] = ",foo[*:*] print "foo.foo[2:2] = ",foo.foo[2:2] print "(foo.foo)[2:2]= ",(foo.foo)[2:2] print "" unset print set label 1 system("cat stringvar.tmp") at graph 0.1, graph 0.9 unset xtics unset ytics set yrange [0:1] plot 0 pause -1 "Hit return to continue" set print "stringvar.tmp" print "Exercise string handling functions" print "" print "foo = ",foo print "strlen(foo) = ",strlen(foo) print "substr(foo,3,4) = ",substr(foo,3,4) print "" haystack = "`date`" needle = ":" S = strstrt(haystack,needle) print "haystack = \`date\`" print "haystack = ",haystack print "needle = ",needle print "S = strstrt(haystack,needle) = ",S print "haystack[S-2:S+2] = ",haystack[S-2:S+2] print "It is now " . haystack[S-2:S+2] # print "" print "words(haystack) = ",words(haystack) print "word(haystack,5) = ",word(haystack,5) # print "" # foo = sprintf("%40d %40d %40d %40d %40d %40d",1,2,3,4,5,6) if (strlen(foo) == 245) print "sprintf output of long strings works OK" if (strlen(foo) != 245) print "sprintf output of long strings BROKEN" print "" unset print set label 1 system("cat stringvar.tmp") at graph 0.1, graph 0.9 unset xtics unset ytics set yrange [0:1] plot 0 pause -1 "Hit return to continue" reset # set xrange [300:400] set title "String-valued expression in using spec" plot 'silver.dat' using 1:2 with linespoints notitle, \ '' using 1:2:(sprintf("[%.0f,%.0f]",$1,$2)) with labels # pause -1 "Hit return to continue" # set xrange [0:1] set yrange [0:1] set title "Constant string expressions as plot symbols" set xrange [250:500] set auto y set style data lines plot 'silver.dat' u 1:2:($3+$1/50.) w filledcurves above title 'Above', \ '' u 1:2:($3+$1/50.) w filledcurves below title 'Below', \ '' u 1:2 lt -1 lw 0.5 notitle, \ '' u 1:($3+$1/50.) lt 3 lw 0.5 notitle, \ '' using 1:2:( ($2>($3+$1/50.)) ? "Up" : "Dn" ) with labels \ title 'plot using 1:2:( ($3>$2) ? "Up" : "Dn" ) with labels' # pause -1 "Hit return to continue" # plot 'silver.dat' \ u 1:2 lt -1 lw 0.5 notitle, \ '' u 1:($3+$1/50.) lt 3 lw 0.5 notitle, \ '' using 1:2:( ($2>($3+$1/50.)) ? "J" : "D" ) with labels font "WingDings,28"\ title 'Same thing using character glyphs from WingDings font' # pause -1 "Hit return to continue" # reset set title "String-valued functions to generate datafile names" set key title 'file(i) = sprintf("%1d.dat",i); N=2; M=3' set key left width 25 Left reverse N = 2 M = 3 file(i) = sprintf("%1d.dat",i) plot 5*sin(x)/x, file(N), file(M) # pause -1 "Hit return to continue" # reset fmt = '%Y-%m-%d %H:%M:%S' time_str = '2005-05-09 19:44:12' seconds = strptime(fmt, time_str) time_str2 = strftime(fmt, seconds+10.) print '' print 'time_str = "', time_str, '"' print '-> seconds = ', seconds print ' seconds + 10. = ', seconds+10. print '-> time_str2 = "', time_str2, '"' # print "" # set xdata time set key inside left #set format x '%Y-%m-%d' fmt = "%d/%m/%y\t%H%M" print "read_time(fmt, c) =" \ . " strptime(fmt, stringcolumn(c).' '.stringcolumn(c+1))" read_time(fmt, c) = strptime(fmt, stringcolumn(c).' '.stringcolumn(c+1)) plot 'timedat.dat' using (read_time(fmt,1)):3 with histeps, \ 'timedat.dat' using (read_time(fmt,1)):($3-0.01):2 with labels title '' # print "" pause -1 "Hit return to continue" # reset gnuplot-4.6.4/demo/textrotate.dem0000644000471100001440000000174407744002175013763 0ustar # # $Id: textrotate.dem,v 1.2 2003/10/17 15:02:21 mikulik Exp $ # # Demonstrate rotation of label text # reset # set title "Rotation of label text" # set xrange [-5:5] set yrange [-5:5] set xlabel "xlabel" set ylabel "ylabel" # set label 1 "Default" at -4,4 # set label 2 "rotate left" at 0,0 rotate left set label 3 "rotate right" at 0.5,0 rotate right set label 4 "rotate center" at 1.0,0 rotate center # set label 12 "rotate by -90 left" at 2.0,0 rotate by -90 left set label 13 "rotate by -90 right" at 2.5,0 rotate by -90 right set label 14 "rotate by -90 center" at 3.0,0 rotate by -90 center # set label 21 " rotate by 45" at -3.0,0.0 rotate by 45 point ps 2 set label 22 " rotate by 90" at -3.0,0.0 rotate by 90 point ps 2 set label 23 " rotate by -30" at -3.0,0.0 rotate by -30 point ps 2 set label 24 " rotate by -60" at -3.0,0.0 rotate by -60 point ps 2 set label 25 " rotate by -90" at -3.0,0.0 rotate by -90 point ps 2 # plot 0 # pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/colorscheme.dem0000644000471100001440000000121210562212740014042 0ustar # # Demo of color usage for principle plot elements # # Set canvas to a parchment color set obj 1 rectangle from screen 0,0 to screen 1,1 behind fc rgb "#e7dfcf" # Set plot area to light gray set obj 2 rectangle from graph 0,0 to graph 1,1 behind fc rgb "#dfdfdf" # border and tics in blue set border linetype 3 linewidth 3 # key box and title in magenta, set key box lt 4 title "Key Box" # Apply the plot linetype color to the corresponding key entry title set key textcolor rgb variable set key left set title "Set new colors for principle plot elements" plot sin(x)/x lw 2, sin(x/2)/(x/2) lw 2 lt 4 pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/ellipses_style.dem0000644000471100001440000000346211415255032014607 0ustar # Demo to illustrate the ellipses style set title "Demonstration of the 'ellipses' plotting style\nTwo-column form: x y (default size)" plot 'ellipses.dat' u 1:2 with ellipses pause -1 'Hit to continue' set title "Three-column form: x y major_diameter (minor diameter is the same)" plot 'ellipses.dat' u 1:2:3 with ellipses pause -1 'Hit to continue' set title "Four-column form: x y major_diameter minor_diameter" plot 'ellipses.dat' u 1:2:3:4 with ellipses pause -1 'Hit to continue' set title "Five-column form: x y major_diameter minor_diameter angle" plot 'ellipses.dat' u 1:2:3:4:5 with ellipses pause -1 'Hit to continue' set title "Six-column form: 6th column variable color (lc variable)" plot 'ellipses.dat' u 1:2:3:4:5:6 with ellipses lc var pause -1 'Hit to continue' set title "Six-column form: 6th column variable color (lc palette)" plot 'ellipses.dat' u 1:2:3:4:5:6 with ellipses lc pal pause -1 'Hit to continue' set title "Six-column form: 6th column variable color (lc rgb variable)" plot 'ellipses.dat' u 1:2:3:4:5:7 with ellipses lc rgb var pause -1 'Hit to continue' set title "Scaling of axes: units xy" set yr [-15:30] set xr [-5:15] plot 'ellipses.dat' u 1:2:3:4:5 with ellipses units xy pause -1 'Hit to continue' set title "Scaling of axes: units xx" plot 'ellipses.dat' u 1:2:3:4:5 with ellipses units xx pause -1 'Hit to continue' set title "Scaling of axes: units yy" plot 'ellipses.dat' u 1:2:3:4:5 with ellipses units yy pause -1 'Hit to continue' set title "Now see all three together" plot 'ellipses.dat' u 1:2:3:4:5 with ellipses units xy title "units xy",\ '' u 1:2:3:4:5 with ellipses units xx title "units xx",\ '' u 1:2:3:4:5 with ellipses units yy title "units yy" pause -1 'Hit to continue' gnuplot-4.6.4/demo/moli3.dat0000644000471100001440000002243406515203632012601 0ustar -5.754699609675704E-004 1.432432432400000E-003 4.402831237555805E-004 -5.660451830068009E-004 1.729729729700000E-003 4.838921164438004E-004 -5.566204050460315E-004 1.351351351300000E-003 4.276234611947096E-004 -5.471956270852622E-004 1.621621621600000E-003 4.685012443785777E-004 -5.377708491244929E-004 1.405405405400000E-003 4.361038448353860E-004 -5.283460711637234E-004 1.567567567600000E-003 4.606142836853834E-004 -5.189212932029541E-004 1.270270270300000E-003 4.145795422749656E-004 -5.094965152421847E-004 1.513513513500000E-003 4.525907758216662E-004 -5.000717372814153E-004 1.729729729700000E-003 4.838921164438004E-004 -4.906469593206459E-004 1.702702702700000E-003 4.800903489285062E-004 -4.812221813598766E-004 1.594594594600000E-003 4.645743949560727E-004 -4.717974033991072E-004 1.756756756800000E-003 4.876644492003285E-004 -4.623726254383378E-004 1.351351351300000E-003 4.276234611947096E-004 -4.529478474775684E-004 2.081081081100000E-003 5.308600848350686E-004 -4.435230695167990E-004 2.054054054000000E-003 5.273945638263779E-004 -4.340982915560296E-004 2.054054054000000E-003 5.273945638263779E-004 -4.246735135952603E-004 2.081081081100000E-003 5.308600848350686E-004 -4.152487356344909E-004 2.027027027000000E-003 5.239063081042037E-004 -4.058239576737215E-004 2.729729729700000E-003 6.081852885003642E-004 -3.963991797129521E-004 2.702702702700000E-003 6.051588248751016E-004 -3.869744017521828E-004 2.567567567600000E-003 5.897961135133321E-004 -3.775496237914134E-004 2.837837837800000E-003 6.201450529310199E-004 -3.681248458306440E-004 2.540540540500000E-003 5.866758033256763E-004 -3.587000678698746E-004 2.837837837800000E-003 6.201450529310199E-004 -3.492752899091052E-004 3.486486486500000E-003 6.875968801047629E-004 -3.398505119483358E-004 3.594594594600000E-003 6.982135219857317E-004 -3.304257339875665E-004 4.594594594600000E-003 7.897745910109953E-004 -3.210009560267971E-004 4.864864864900000E-003 8.127806604701474E-004 -3.115761780660277E-004 4.405405405400000E-003 7.732707824546964E-004 -3.021514001052583E-004 5.783783783800000E-003 8.866301171759729E-004 -2.927266221444890E-004 6.081081081100000E-003 9.092661600206905E-004 -2.833018441837196E-004 7.216216216200000E-003 9.910607198159050E-004 -2.738770662229502E-004 7.567567567600000E-003 1.015077925812421E-003 -2.644522882621808E-004 1.075675675700000E-002 1.212127043388920E-003 -2.550275103014114E-004 1.367567567600000E-002 1.368699312584621E-003 -2.456027323406421E-004 1.967567567600000E-002 1.646569237934371E-003 -2.361779543798727E-004 2.478378378400000E-002 1.852610274014860E-003 -2.267531764191033E-004 3.235135135100000E-002 2.124438281409549E-003 -2.173283984583339E-004 3.856756756800000E-002 2.326551352123830E-003 -2.079036204975645E-004 4.562162162100000E-002 2.538965366537517E-003 -1.984788425367951E-004 5.121621621600000E-002 2.697328934522329E-003 -1.890540645760258E-004 6.691891891900000E-002 3.106163459358682E-003 -1.796292866152564E-004 7.905405405400000E-002 3.395219164927090E-003 -1.702045086544870E-004 9.951351351300000E-002 3.845257747743492E-003 -1.607797306937176E-004 1.101621621600000E-001 4.065309139067361E-003 -1.513549527329483E-004 1.329189189200000E-001 4.511042875871860E-003 -1.419301747721789E-004 1.432432432400000E-001 4.704251526960189E-003 -1.325053968114095E-004 1.695135135100000E-001 5.175936326999137E-003 -1.230806188506401E-004 1.811891891900000E-001 5.377866444590768E-003 -1.136558408898707E-004 2.075945945900000E-001 5.820398777702834E-003 -1.042310629291014E-004 2.201621621600000E-001 6.025099974576694E-003 -9.480628496833199E-005 2.426216216200000E-001 6.382904457257328E-003 -8.538150700756260E-005 2.555135135100000E-001 6.584181176863235E-003 -7.595672904679322E-005 2.735945945900000E-001 6.862044025897848E-003 -6.653195108602384E-005 2.859459459500000E-001 7.049161632682367E-003 -5.710717312525447E-005 3.054054054000000E-001 7.339985520343793E-003 -4.768239516448508E-005 3.106486486500000E-001 7.417576200959222E-003 -3.825761720274608E-005 3.240810810800000E-001 7.614971279905216E-003 -2.883283924197670E-005 3.354054054100000E-001 7.779930794073547E-003 -1.940806128120732E-005 3.460540540500000E-001 7.933911669216162E-003 -9.983283320437937E-006 3.472702702700000E-001 7.951431206234909E-003 -5.585053596685579E-007 3.475135135100000E-001 7.954933498813758E-003 8.866272600906896E-006 3.415135135100000E-001 7.868385196295988E-003 1.829105056187020E-005 3.407567567600000E-001 7.857445462379578E-003 2.771582852263958E-005 3.368918918900000E-001 7.801490144484556E-003 3.714060648292414E-005 3.233513513500000E-001 7.604296862939552E-003 4.656538444369353E-005 3.125945945900000E-001 7.446293973522654E-003 5.599016240397809E-005 2.990540540500000E-001 7.245570700050091E-003 6.541494036474746E-005 2.876486486500000E-001 7.074797234418188E-003 7.483971832551685E-005 2.726756756800000E-001 6.848038778104644E-003 8.426449628628623E-005 2.615945945900000E-001 6.678184800595614E-003 9.368927424705560E-005 2.411891891900000E-001 6.360365174924778E-003 1.031140522078250E-004 2.253243243200000E-001 6.108206436561994E-003 1.125388301685944E-004 2.027297297300000E-001 5.740198144315215E-003 1.219636081293637E-004 1.886216216200000E-001 5.504294855819880E-003 1.313883860901331E-004 1.611351351300000E-001 5.028293823030311E-003 1.408131640509025E-004 1.507027027000000E-001 4.840901291180949E-003 1.502379420116719E-004 1.263783783800000E-001 4.385939957531962E-003 1.596627199724413E-004 1.179189189200000E-001 4.220666502369564E-003 1.690874979332106E-004 1.025945945900000E-001 3.909797904314141E-003 1.785122758939800E-004 9.435135135100001E-002 3.735395504454285E-003 1.879370538547494E-004 8.599999999999999E-002 3.552616089740218E-003 1.973618318155188E-004 8.200000000000000E-002 3.462618911998508E-003 2.067866097762882E-004 7.270270270300000E-002 3.246378141604363E-003 2.162113877370575E-004 6.651351351300000E-002 3.096151948939985E-003 2.256361656978269E-004 5.827027027000000E-002 2.886728595152793E-003 2.350609436585963E-004 5.616216216200000E-002 2.831205230436820E-003 2.444857216193657E-004 4.718918918900000E-002 2.584151509168899E-003 2.539104995801351E-004 4.256756756700000E-002 2.448926002203082E-003 2.633352775409044E-004 3.748648648600000E-002 2.292517887432502E-003 2.727600555016738E-004 3.627027027000000E-002 2.253699744248148E-003 2.821848334624432E-004 3.178378378400000E-002 2.105141476135115E-003 2.916096114232126E-004 2.864864864900000E-002 1.995582747592381E-003 3.010343893839820E-004 2.764864864900000E-002 1.959491675020620E-003 3.104591673447514E-004 2.510810810800000E-002 1.864987689284889E-003 3.198839453055207E-004 2.410810810800000E-002 1.826579619403399E-003 3.293087232662901E-004 1.989189189200000E-002 1.655767122573402E-003 3.387335012270594E-004 2.070270270300000E-002 1.689846650735264E-003 3.481582791878288E-004 1.937837837800000E-002 1.633843914216333E-003 3.575830571485983E-004 1.748648648600000E-002 1.550599870652726E-003 3.670078351093676E-004 1.770270270300000E-002 1.560322575189953E-003 3.764326130701370E-004 1.705405405400000E-002 1.530981614700488E-003 3.858573910309064E-004 1.591891891900000E-002 1.478326797912300E-003 3.952821689916757E-004 1.613513513500000E-002 1.488490879182249E-003 4.047069469524451E-004 1.524324324300000E-002 1.446131825864810E-003 4.141317249132145E-004 1.478378378400000E-002 1.423848232829384E-003 4.235565028739839E-004 1.464864864900000E-002 1.417231387211540E-003 4.329812808347532E-004 1.327027027000000E-002 1.347990012345651E-003 4.424060587955227E-004 1.383783783800000E-002 1.376900337618482E-003 4.518308367562920E-004 1.418918918900000E-002 1.394512521570310E-003 4.612556147170614E-004 1.310810810800000E-002 1.339621296131909E-003 4.706803926778308E-004 1.421621621600000E-002 1.395858595578850E-003 4.801051706386002E-004 1.256756756800000E-002 1.311359482460867E-003 4.895299485993696E-004 1.132432432400000E-002 1.244043355755475E-003 4.989547265601389E-004 1.170270270300000E-002 1.264892686055673E-003 5.083795045209083E-004 1.167567567600000E-002 1.263414350645789E-003 5.178042824816777E-004 1.189189189200000E-002 1.275195214772964E-003 5.272290604424471E-004 1.105405405400000E-002 1.228944073509733E-003 5.366538384032164E-004 1.189189189200000E-002 1.275195214772964E-003 5.460786163639859E-004 1.113513513500000E-002 1.233492425368931E-003 5.555033943247552E-004 1.078378378400000E-002 1.213665086750585E-003 5.649281722855246E-004 1.081081081100000E-002 1.215201264688907E-003 5.743529502462940E-004 1.027027027000000E-002 1.184114946108333E-003 5.837777282070634E-004 1.083783783800000E-002 1.216735584269402E-003 5.932025061678327E-004 9.864864864800000E-003 1.160276086879277E-003 gnuplot-4.6.4/demo/fitmulti.dem0000644000471100001440000001227112161357333013410 0ustar # fitmulti.dem # # Use up to 5D fitting to determine coefficients in linear combinations # of arbitrarily chosen, but linearly independent basis functions. # The fit should reproduce these coefficients with high precision. # Hanno Hoffstadt August 2007 # # Increase to 6 dimensions to test revised fit code. # Replace a recursive call statement with a while { ... } loop. # Use "set dummy x, y, x2, x3" to specify dummy parameter names used # by the fit functions. # Ethan A Merritt June 2013 # # the basis functions f1(x) = sin(x) f2(x) = exp(-x) f3(x) = sqrt(x) f4(x) = cos(x) f5(x) = x*x f6(x) = sin(x+3.)/(x+3.) # the coefficients for linear combinations k1= 2.5 k2= -1.8 k3= 70.0 k4= -3.2 k5= 0.4 k6= -0.25 # generate data table containing functions f1(x) to f6(x), # and linear combinations k1*f1(x) to k1*f1(x)+...+k6*f6(x) # in increments of dx, up to a value xmax # set print "fitmulti.dat" # x=0 dx=0.5 xmax=10 while (x <= xmax) { lc1 = k1 * f1(x) lc2 = lc1 + k2 * f2(x) lc3 = lc2 + k3 * f3(x) lc4 = lc3 + k4 * f4(x) lc5 = lc4 + k5 * f5(x) lc6 = lc5 + k6 * f6(x) # columns 1-5,11 contain the "tabulated basis functions" # columns 6-10,12 contain linear combinations with given coefficients # and increasing number of components print f1(x), f2(x), f3(x), f4(x), f5(x), lc1, lc2, lc3, lc4, lc5, f6(x), lc6 x = x + dx } # End of while loop unset print # fitting models m1(f1) = c1*f1 m2(f1,f2) = c1*f1 + c2*f2 m3(f1,f2,f3) = c1*f1 + c2*f2 + c3*f3 m4(f1,f2,f3,f4) = c1*f1 + c2*f2 + c3*f3 + c4*f4 m5(f1,f2,f3,f4,f5) = c1*f1 + c2*f2 + c3*f3 + c4*f4 + c5*f5 m6(f1,f2,f3,f4,f5,f6) = c1*f1 + c2*f2 + c3*f3 + c4*f4 + c5*f5 + c6*f6 # 1D fit: # basis function in column 1, # combination with one component in column 6 # # since column 6 contains k1 * f1(x), i.e. k1 times column 1, # the fit is expected to find c1 == k1. # # for all fits, the assumed error is 1, and is given last in the using spec. c1=1 fit m1(x) "fitmulti.dat" u 1:6:(1) via c1 print "---------------------------------------------------------" print "1D fit: expected ", k1, " c1 = ", c1 print "---------------------------------------------------------" pause -1 "Hit return to try for a 2D fit" # 2D fit: # basis functions in columns 1 and 2, # combination with two components in column 7 # # do not forget to reset the c values so that the fit needs to search anew. # Check the functioning of preset axis range limit on y c1=1 c2=1 set yrange [0:.99] fit m2(x,y) "fitmulti.dat" u 1:2:7:(1) via c1,c2 print "---------------------------------------------------------" print "2D fit: expected ", k1, " c1 = ", c1 print "2D fit: expected ", k2, " c2 = ", c2 print "---------------------------------------------------------" set yrange [*:*] pause -1 "Hit return to try for a 3D fit" # 3D fit: # basis functions in columns 1, 2, 3, # combination with three components in column 8 print "3D fit will fail without patch..." c1=1 c2=1 c3=1 fit [] [] [x2=*:*] m3(x,y,x2) "fitmulti.dat" u 1:2:3:8:(1) via c1,c2,c3 print "---------------------------------------------------------" print "3D fit: expected ", k1, " c1 = ", c1 print "3D fit: expected ", k2, " c2 = ", c2 print "3D fit: expected ", k3, " c3 = ", c3 print "---------------------------------------------------------" pause -1 "Hit return to try for a 4D fit" # 4D fit: # basis functions in columns 1, 2, 3, 4, # combination with four components in column 9 c1=1 c2=1 c3=1 c4=1 fit [][][x2=*:*][x3=*:*] m4(x,y,x2,x3) "fitmulti.dat" u 1:2:3:4:9:(1) via c1,c2,c3,c4 print "---------------------------------------------------------" print "4D fit: expected ", k1, " c1 = ", c1 print "4D fit: expected ", k2, " c2 = ", c2 print "4D fit: expected ", k3, " c3 = ", c3 print "4D fit: expected ", k4, " c4 = ", c4 print "---------------------------------------------------------" pause -1 "Hit return to try for a 5D fit" # 5D fit: # basis functions in columns 1, 2, 3, 4, 5, # combination with five components in column 10 c1=1 c2=1 c3=1 c4=1 c5=1 fit [][][x2=*:*][x3=*:*][x4=*:*] \ m5(x,y,x2,x3,x4) "fitmulti.dat" u 1:2:3:4:5:10:(1) via c1,c2,c3,c4,c5 print "---------------------------------------------------------" print "5D fit: expected ", k1, " c1 = ", c1 print "5D fit: expected ", k2, " c2 = ", c2 print "5D fit: expected ", k3, " c3 = ", c3 print "5D fit: expected ", k4, " c4 = ", c4 print "5D fit: expected ", k5, " c5 = ", c5 print "---------------------------------------------------------" pause -1 "Hit return to try for a 6D fit" # 6D fit: # basis functions in columns 1, 2, 3, 4, 5, 11 # combination with five components in column 12 # test inline range spec print "6D not possible in version 4.6" c1=1 c2=1 c3=1 c4=1 c5=1 c6=1 fit [][][][][][-0.2:*] m6(x,y,x2,x3,x4,x5) "fitmulti.dat" u 1:2:3:4:5:11:12:(1) via c1,c2,c3,c4,c5,c6 print "---------------------------------------------------------" print "6D fit: expected ", k1, " c1 = ", c1 print "6D fit: expected ", k2, " c2 = ", c2 print "6D fit: expected ", k3, " c3 = ", c3 print "6D fit: expected ", k4, " c4 = ", c4 print "6D fit: expected ", k5, " c5 = ", c5 print "6D fit: expected ", k6, " c6 = ", c6 print "---------------------------------------------------------" pause -1 "Hit return to end multidimension fit demo" reset gnuplot-4.6.4/demo/animate.dem0000644000471100001440000000202310360046336013160 0ustar # # $Id: animate.dem,v 1.7 2006/01/07 23:21:02 sfeam Exp $ # # Demo animation, tumbling around 'glass.dat'. # # History: # - 1. 1. 2006 Dan Sebald: Defined variables for more generic rotate # - ?. ?. ? Hans-Bernhard Broeker: Changed from rotating whale to # rotating glass # - ?. ?. ? ?: Initial tumbling whale demo set parametric set hidden3d unset key set style data line xrot=60 xrot_delta = 17 zrot=0 zrot_delta = 10 xview(xrot)=(50.+30.*sin((xrot%180)/180.*pi)) zview(zrot)=(60.+45.*sin(zrot/180.*pi)) set view xview(xrot),zview(zrot) splot "glass.dat" limit_iterations=40 # limits number of iterations if nonzero if (!limit_iterations) print "The following animation will never stop on its own. You have" if (!limit_iterations) print "to stop it manually by interrupting gnuplot (e.g., press ^C)" print "On some screen terminal drivers for PC screens, you'll have" print "to hit a key to get to the next frame" pause -1 "Press a key to start the rotation..." iteration_count=0 load "gnuplot.rot" reset gnuplot-4.6.4/demo/random.dem0000644000471100001440000001224311676710605013037 0ustar # # $Id: random.dem,v 1.13.4.1 2011/12/11 11:37:43 markisch Exp $ # # random.dem # # Lattice test for random numbers; # If you can see any patterns in this plot, the random number generator # is not very good. # # Copyright (c) 1991, Jos van der Woude, jvdwoude@hut.nl # History: # - 6. 6. 2006 ds: added univariate and multivariate normal example # - 10. 5. 2006 ds: added univariate and multivariate normal example # - ?. ? 1991 jvdw: 1st version unset key set xrange [0: 1] set yrange [0: 1] set zrange [0: 1] set title "Lattice test for random numbers" set xlabel "rand(n) ->" set ylabel "rand(n + 1) ->" set zlabel "rand(n + 2) ->" set format x "%3.2f" set format y "%3.2f" set format z "%3.2f" set tics set sample 1000 set style function dots set parametric plot rand(0), rand(0) pause -1 "Hit return to continue" print "3D plot ahead, one moment please ..." set sample 50 splot rand(0), rand(0), rand(0) pause -1 "Hit return to continue" print "" print "Multivariate normal distribution" print "" print "The surface plot shows a two variable multivariate probability" print "density function. On the x-y plane are some samples of the random" print "vector and a contour plot illustrating the correlation, which in" print "this case is zero, i.e. a circle. (Easier to view in map mode.)" print "" nsamp = 50 # Generate N random data points. set print "random.tmp" do for [i=1:nsamp] { print sprintf("%8.5g %8.5g", invnorm(rand(0)), invnorm(rand(0))) } unset print # unset xlabel unset ylabel unset zlabel set parametric tstring(n) = sprintf("%d random samples from a 2D Gaussian PDF with\nunit variance, zero mean and no dependence", n) set title tstring(nsamp) unset key set hidden3d set contour set view 68, 28, 1, 1 set cntrparam levels discrete 0.1 unset clabel set xrange [-3:3] set yrange [-3:3] set zrange [-0.2:0.2] set ztics 0,0.05 set urange [-3:3] set vrange [-3:3] set ticslevel 0 set isosamples 30 splot u,v,( 1/(2*pi) * exp(-0.5 * (u**2 + v**2)) ) with line lc rgb "black", \ "random.tmp" using 1:2:(-0.2) with points pointtype 7 lc rgb "black" pause -1 "Hit return to continue" unset contour unset parametric load "stat.inc" print "" print "Simple Monte Carlo simulation" print "" print "The first curve is a histogram where the binned frequency of occurence" print "of a pseudo random variable distributed according to the normal" print "(Gaussian) law is scaled such that the histogram converges to the" print "normal probability density function with increasing number of samples" print "used in the Monte Carlo simulation. The second curve is the normal" print "probability density function with unit variance and zero mean." print "" nsamp = 5000 binwidth = 20 xlow = -3.0 xhigh = 3.0 scale = (binwidth/(xhigh-xlow)) # Generate N random data points. set print "random.tmp" do for [i=1:nsamp] { print sprintf("%8.5g %8.5g", invnorm(rand(0)), (1.0*scale/nsamp)) } unset print # set samples 200 tstring(n) = sprintf("Histogram of %d random samples from a univariate\nGaussian PDF with unit variance and zero mean", n) set title tstring(nsamp) set key set grid set xrange [-3:3] set yrange [0:0.45] bin(x) = (1.0/scale)*floor(x*scale) plot "random.tmp" using (bin($1)):2 smooth frequency with steps \ title "scaled bin frequency", \ normal(x,0,1) with lines title "Gaussian p.d.f." pause -1 "Hit return to continue" print "" print "Another Monte Carlo simulation" print "" print "This is similar to the previous simulation but uses multivariate" print "zero mean, unit variance normal data by computing the distance " print "each point is from the origin. That distribution is known to fit" print "the Maxwell probability law, as shown." print "" reset nsamp = 3000 # Generate N random data points. set print "random.tmp" do for [i=1:nsamp] { print sprintf("%8.5g %8.5g %8.5g", invnorm(rand(0)), invnorm(rand(0)), invnorm(rand(0))) } unset print # oneplot = 1 # if (oneplot) set multiplot layout 1,2 # unset key rlow = -4.0 rhigh = 4.0 set parametric set xrange [rlow:rhigh]; set yrange [rlow:rhigh]; set zrange [rlow:rhigh] set xtics axis nomirror; set ytics axis nomirror; set ztics axis nomirror; set border 0 set xyplane at 0 set xzeroaxis lt -1 set yzeroaxis lt -1 set zzeroaxis lt -1 set view 68, 28, 1.4, 0.9 tstring(n) = sprintf("Gaussian 3D cloud of %d random samples\n", n) set title tstring(nsamp) offset graph 0.15, graph -0.33 splot "random.tmp" every :::::0 with dots if (!oneplot) pause -1 "Hit return to continue" unset parametric unset xzeroaxis; unset yzeroaxis; set border set grid set samples 200 set size 0.47,0.72 set origin 0.44,0.18 tstring(n) = sprintf("Histogram of distance from origin of\n%d multivariate unit variance samples", n) set title tstring(nsamp) offset graph 0, graph 0.15 set key bmargin right vertical xlow = 0.0 xhigh = 4.5 binwidth = 20 scale = (binwidth/(xhigh-xlow)) set xrange [0:xhigh] set yrange [0:0.65] bin(x) = (1.0/scale)*floor(x*scale) plot "random.tmp" using (bin(sqrt($1**2+$2**2+$3**2))):(1.0*scale/nsamp) every :::::0 smooth frequency with steps \ title "scaled bin frequency", \ maxwell(x, 1/sqrt(2)) with lines title "Maxwell p.d.f." # if (oneplot) unset multiplot # pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/whale.dat0000644000471100001440000027057606515203633012673 0ustar #(C) Copyright 1992 Alex Woo # Hans-Bernhard Broeker 1996: changed ordering, to make # outside/inside correctly detectable by hidden3d # Converted from PANAIR Network File #whale.net #NETWORK = DORSAL 10 4 NEW 4.32022 0.00000 0.36768 4.38578 0.00000 0.39855 4.45157 0.00000 0.43078 4.51276 0.00000 0.47023 4.57293 0.00000 0.51716 4.63204 0.00000 0.56553 4.69551 0.00000 0.60832 4.78457 0.00000 0.61867 4.86637 0.00000 0.59655 4.95352 0.00000 0.59879 4.32022 0.00000 0.36768 4.38618 0.00548 0.39731 4.45239 0.01043 0.42827 4.51439 0.01442 0.46603 4.57541 0.01661 0.51094 4.63550 0.01634 0.55759 4.69929 0.01389 0.59942 4.78699 0.00986 0.61163 4.86783 0.00512 0.59387 4.95352 0.00000 0.59879 4.32022 0.00000 0.36768 4.38785 0.01321 0.39207 4.45587 0.02515 0.41767 4.52124 0.03479 0.44835 4.58581 0.04007 0.48474 4.65004 0.03940 0.52419 4.71522 0.03349 0.56199 4.79720 0.02378 0.58200 4.87394 0.01235 0.58257 4.95352 0.00000 0.59879 4.32022 0.00000 0.36768 4.39136 0.02147 0.38377 4.46261 0.04298 0.39989 4.53378 0.06447 0.41599 4.60459 0.06493 0.44012 4.67604 0.06540 0.46447 4.74649 0.06587 0.48847 4.81657 0.04357 0.52581 4.88446 0.02197 0.56199 4.95352 0.00000 0.59879 4.32022 0.00000 0.36768 4.39136 -0.02147 0.38377 4.46261 -0.04298 0.39989 4.53378 -0.06447 0.41599 4.60459 -0.06493 0.44012 4.67604 -0.06540 0.46447 4.74649 -0.06587 0.48847 4.81657 -0.04357 0.52581 4.88446 -0.02197 0.56199 4.95352 0.00000 0.59879 4.32022 0.00000 0.36768 4.38785 -0.01321 0.39207 4.45587 -0.02515 0.41767 4.52124 -0.03479 0.44835 4.58581 -0.04007 0.48474 4.65004 -0.03940 0.52419 4.71522 -0.03349 0.56199 4.79720 -0.02378 0.58200 4.87394 -0.01235 0.58257 4.95352 0.00000 0.59879 4.32022 0.00000 0.36768 4.38618 -0.00548 0.39731 4.45239 -0.01043 0.42827 4.51439 -0.01442 0.46603 4.57541 -0.01661 0.51094 4.63550 -0.01634 0.55759 4.69929 -0.01389 0.59942 4.78699 -0.00986 0.61163 4.86783 -0.00512 0.59387 4.95352 0.00000 0.59879 4.32022 0.00000 0.36768 4.38578 0.00000 0.39855 4.45157 0.00000 0.43078 4.51276 0.00000 0.47023 4.57293 0.00000 0.51716 4.63204 0.00000 0.56553 4.69551 0.00000 0.60832 4.78457 0.00000 0.61867 4.86637 0.00000 0.59655 4.95352 0.00000 0.59879 #NETWORK = BODY-TOP-1 40 8 NEW 0.00000 0.00000 0.00000 0.06328 0.00000 0.06906 0.24609 0.00000 0.15852 0.49474 0.00000 0.24315 0.73666 0.00000 0.31296 0.97679 0.00000 0.35708 1.21755 0.00000 0.39318 1.44630 0.00000 0.35902 1.69182 0.00000 0.43159 1.94016 0.00000 0.43015 2.17715 0.00000 0.41867 2.39180 0.00000 0.40496 2.59034 0.00000 0.39461 2.80635 0.00000 0.38659 3.03005 0.00000 0.37933 3.24866 0.00000 0.37187 3.46182 0.00000 0.36354 3.67193 0.00000 0.35368 3.88524 0.00000 0.34465 4.10325 0.00000 0.34470 4.32022 0.00000 0.36768 4.53378 0.06447 0.41599 4.74649 0.06587 0.48847 4.95352 0.00000 0.59879 5.18109 0.00000 0.67195 5.40724 0.00000 0.73775 5.64533 0.00000 0.81438 5.91230 0.00000 0.87165 6.17511 0.00000 0.85053 6.18099 0.00000 0.84930 6.19137 0.00000 0.84708 6.24827 0.00000 0.83367 6.32143 0.00000 0.81387 6.39459 0.00000 0.79176 6.46774 0.00000 0.76775 6.54090 0.00000 0.74217 6.61406 0.00000 0.71524 6.68722 0.00000 0.68716 6.76038 0.00000 0.65811 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06307 0.01063 0.06452 0.24546 0.02728 0.14894 0.49360 0.04617 0.23080 0.73557 0.06575 0.30109 0.97598 0.07743 0.34814 1.21690 0.08641 0.38618 1.44899 0.09365 0.39105 1.69133 0.09943 0.42614 1.93952 0.10366 0.42438 2.17643 0.10632 0.41227 2.39126 0.10769 0.39811 2.59021 0.10735 0.38736 2.80646 0.10571 0.37829 3.03036 0.10333 0.36979 3.24929 0.10007 0.36164 3.46285 0.09565 0.35359 3.67322 0.08959 0.34545 3.88639 0.08173 0.33929 4.10416 0.07295 0.34134 4.32212 0.06512 0.36195 4.53925 0.09015 0.40188 4.75403 0.08576 0.47075 4.96890 0.05555 0.56317 5.19649 0.05097 0.63561 5.42205 0.04615 0.70327 5.65846 0.04320 0.77923 5.91823 0.04155 0.84450 6.17511 0.03492 0.83397 6.18099 0.03503 0.83269 6.19137 0.03541 0.83044 6.24827 0.03219 0.81897 6.32143 0.02831 0.80134 6.39459 0.02463 0.78186 6.46774 0.02044 0.75899 6.54090 0.01644 0.73463 6.61406 0.01239 0.70920 6.68722 0.00815 0.68286 6.76038 0.00447 0.65800 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06285 0.02147 0.05980 0.24483 0.05394 0.13920 0.49240 0.09053 0.21779 0.73412 0.12941 0.28512 0.97455 0.15405 0.33236 1.21546 0.17277 0.37069 1.44951 0.18761 0.39731 1.68984 0.19916 0.40959 1.93752 0.20725 0.40630 2.17421 0.21208 0.39250 2.38960 0.21444 0.37687 2.58979 0.21337 0.36484 2.80679 0.20931 0.35385 3.03122 0.20368 0.34330 3.25101 0.19648 0.33386 3.46570 0.18728 0.32577 3.67730 0.17529 0.31942 3.89123 0.16023 0.31677 4.10928 0.14340 0.32250 4.32799 0.12766 0.34420 4.54370 0.11662 0.39041 4.75980 0.10939 0.45720 4.98295 0.10175 0.53060 5.21017 0.09243 0.60329 5.43516 0.08319 0.67277 5.66985 0.07732 0.74872 5.92362 0.07658 0.81985 6.17511 0.06946 0.81665 6.18099 0.07026 0.81531 6.19137 0.07039 0.81294 6.24827 0.06406 0.80357 6.32143 0.05637 0.78825 6.39459 0.04890 0.77110 6.46774 0.04075 0.74992 6.54090 0.03291 0.72714 6.61406 0.02488 0.70335 6.68722 0.01652 0.67901 6.76038 0.00894 0.65789 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06262 0.03285 0.05495 0.24418 0.08119 0.12921 0.49104 0.13493 0.20291 0.73192 0.19048 0.26091 0.97212 0.22881 0.30559 1.21297 0.25860 0.34388 1.44724 0.28198 0.37027 1.68728 0.29942 0.38120 1.93411 0.31067 0.37540 2.17040 0.31655 0.35868 2.38674 0.31890 0.34044 2.58908 0.31630 0.32652 2.80733 0.30862 0.31331 3.03261 0.29844 0.30050 3.25374 0.28621 0.28970 3.47023 0.27153 0.28168 3.68387 0.25346 0.27749 3.89932 0.23172 0.27908 4.11815 0.20784 0.28991 4.33751 0.18509 0.31543 4.55464 0.16774 0.36219 4.77247 0.15496 0.42743 4.99650 0.14166 0.49921 5.22303 0.12759 0.57294 5.44741 0.11403 0.64425 5.68029 0.10541 0.72076 5.92941 0.10583 0.79338 6.17511 0.10310 0.79764 6.18099 0.10340 0.79627 6.19137 0.10454 0.79386 6.24827 0.09529 0.78694 6.32143 0.08398 0.77425 6.39459 0.07266 0.75927 6.46774 0.06088 0.74046 6.54090 0.04940 0.71971 6.61406 0.03749 0.69778 6.68722 0.02514 0.67575 6.76038 0.01342 0.65778 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06237 0.04176 0.04951 0.24342 0.10685 0.11742 0.48938 0.18105 0.18491 0.72947 0.25360 0.23406 0.96917 0.30481 0.27310 1.20960 0.34523 0.30770 1.44393 0.37660 0.33082 1.68342 0.39907 0.33832 1.92899 0.41231 0.32907 2.16484 0.41802 0.30924 2.38264 0.41917 0.28813 2.58807 0.41386 0.27199 2.80808 0.40112 0.25678 3.03450 0.38499 0.24228 3.25739 0.36660 0.23081 3.47619 0.34570 0.22361 3.69252 0.32139 0.22235 3.91006 0.29351 0.22900 4.13007 0.26372 0.24603 4.35013 0.23540 0.27727 4.56803 0.21302 0.32763 4.78639 0.19554 0.39470 5.01023 0.17682 0.46741 5.23577 0.15802 0.54285 5.45949 0.14007 0.61616 5.69029 0.12919 0.69395 5.93518 0.13113 0.76698 6.17511 0.13454 0.77516 6.18099 0.13555 0.77358 6.19137 0.13614 0.77079 6.24827 0.12476 0.76734 6.32143 0.11045 0.75819 6.39459 0.09574 0.74614 6.46774 0.08077 0.73050 6.54090 0.06592 0.71236 6.61406 0.05026 0.69259 6.68722 0.03401 0.67322 6.76038 0.01789 0.65768 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06223 0.06184 0.04647 0.24264 0.14253 0.10546 0.48724 0.22879 0.16163 0.72640 0.31767 0.20040 0.96539 0.38306 0.23145 1.20509 0.43260 0.25918 1.43935 0.46995 0.27638 1.67805 0.49546 0.27875 1.92196 0.50912 0.26551 2.15737 0.51351 0.24276 2.37721 0.51233 0.21900 2.58675 0.50300 0.20092 2.80903 0.48386 0.18473 3.03684 0.46070 0.16992 3.26182 0.43538 0.15917 3.48332 0.40787 0.15414 3.70275 0.37745 0.15710 3.92273 0.34415 0.16996 4.14418 0.30968 0.19414 4.36520 0.27727 0.23173 4.58427 0.25110 0.28574 4.80293 0.23014 0.35582 5.02433 0.20874 0.43475 5.24865 0.18509 0.51245 5.47126 0.16341 0.58876 5.70033 0.14929 0.66707 5.94129 0.15216 0.73904 6.17511 0.16302 0.74910 6.18099 0.16460 0.74769 6.19137 0.16570 0.74519 6.24827 0.15243 0.74523 6.32143 0.13555 0.74003 6.39459 0.11799 0.73166 6.46774 0.10037 0.71997 6.54090 0.08249 0.70511 6.61406 0.06325 0.68796 6.68722 0.04303 0.67139 6.76038 0.02236 0.65757 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06169 0.07473 0.03493 0.24146 0.17219 0.08731 0.48436 0.28240 0.13030 0.71976 0.40442 0.12744 0.95718 0.48293 0.14089 1.19716 0.52959 0.17397 1.43282 0.56105 0.19874 1.67133 0.58176 0.20409 1.91344 0.59328 0.18835 2.14809 0.59726 0.16030 2.37035 0.59485 0.13150 2.58512 0.58024 0.11285 2.81018 0.55343 0.09852 3.03958 0.52289 0.08569 3.26687 0.49066 0.07750 3.49134 0.45684 0.07611 3.71416 0.42086 0.08433 3.93689 0.38301 0.10400 4.16006 0.34501 0.13572 4.38211 0.30996 0.18062 4.60173 0.28184 0.24069 4.82009 0.25889 0.31549 5.04025 0.23378 0.39786 5.26310 0.20482 0.47833 5.48430 0.18026 0.55840 5.71054 0.16641 0.63972 5.94752 0.17055 0.71050 6.17511 0.18993 0.72135 6.18099 0.19106 0.71975 6.19137 0.19276 0.71694 6.24827 0.17801 0.72084 6.32143 0.15910 0.71997 6.39459 0.13957 0.71617 6.46774 0.11970 0.70896 6.54090 0.09911 0.69796 6.61406 0.07645 0.68398 6.68722 0.05216 0.67008 6.76038 0.02683 0.65746 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06122 0.09261 0.02470 0.23984 0.21019 0.06234 0.48129 0.33575 0.09689 0.71772 0.45629 0.10508 0.95408 0.53834 0.10666 1.19143 0.59429 0.11238 1.42559 0.63328 0.11273 1.66221 0.65702 0.10286 1.90174 0.66696 0.08251 2.13640 0.66668 0.05639 2.36240 0.65922 0.03023 2.58325 0.63968 0.01182 2.81149 0.60674 -0.00042 3.04266 0.56980 -0.00936 3.27245 0.53141 -0.01267 3.50000 0.49203 -0.00825 3.72630 0.45145 0.00686 3.95187 0.41023 0.03418 4.17693 0.36992 0.07369 4.40026 0.33325 0.12576 4.62072 0.30372 0.19167 4.83895 0.27894 0.27116 5.05762 0.25037 0.35760 5.27843 0.21690 0.44214 5.49788 0.19144 0.52680 5.72117 0.18044 0.61124 5.95400 0.18717 0.68085 6.17511 0.21507 0.69199 6.18099 0.21673 0.69048 6.19137 0.21890 0.68781 6.24827 0.20273 0.69550 6.32143 0.18189 0.69901 6.39459 0.16060 0.69995 6.46774 0.13881 0.69758 6.54090 0.11575 0.69088 6.61406 0.08982 0.68058 6.68722 0.06133 0.66915 6.76038 0.03130 0.65735 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06122 -0.09261 0.02470 0.23984 -0.21019 0.06234 0.48129 -0.33575 0.09689 0.71772 -0.45629 0.10508 0.95408 -0.53834 0.10666 1.19143 -0.59429 0.11238 1.42559 -0.63328 0.11273 1.66221 -0.65702 0.10286 1.90174 -0.66696 0.08251 2.13640 -0.66668 0.05639 2.36240 -0.65922 0.03023 2.58325 -0.63968 0.01182 2.81149 -0.60674 -0.00042 3.04266 -0.56980 -0.00936 3.27245 -0.53141 -0.01267 3.50000 -0.49203 -0.00825 3.72630 -0.45145 0.00686 3.95187 -0.41023 0.03418 4.17693 -0.36992 0.07369 4.40026 -0.33325 0.12576 4.62072 -0.30372 0.19167 4.83895 -0.27894 0.27116 5.05762 -0.25037 0.35760 5.27843 -0.21690 0.44214 5.49788 -0.19144 0.52680 5.72117 -0.18044 0.61124 5.95400 -0.18717 0.68085 6.17511 -0.21507 0.69199 6.18099 -0.21673 0.69048 6.19137 -0.21890 0.68781 6.24827 -0.20273 0.69550 6.32143 -0.18189 0.69901 6.39459 -0.16060 0.69995 6.46774 -0.13881 0.69758 6.54090 -0.11575 0.69088 6.61406 -0.08982 0.68058 6.68722 -0.06133 0.66915 6.76038 -0.03130 0.65735 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06169 -0.07473 0.03493 0.24146 -0.17219 0.08731 0.48436 -0.28240 0.13030 0.71976 -0.40442 0.12744 0.95718 -0.48293 0.14089 1.19716 -0.52959 0.17397 1.43282 -0.56105 0.19874 1.67133 -0.58176 0.20409 1.91344 -0.59328 0.18835 2.14809 -0.59726 0.16030 2.37035 -0.59485 0.13150 2.58512 -0.58024 0.11285 2.81018 -0.55343 0.09852 3.03958 -0.52289 0.08569 3.26687 -0.49066 0.07750 3.49134 -0.45684 0.07611 3.71416 -0.42086 0.08433 3.93689 -0.38301 0.10400 4.16006 -0.34501 0.13572 4.38211 -0.30996 0.18062 4.60173 -0.28184 0.24069 4.82009 -0.25889 0.31549 5.04025 -0.23378 0.39786 5.26310 -0.20482 0.47833 5.48430 -0.18026 0.55840 5.71054 -0.16641 0.63972 5.94752 -0.17055 0.71050 6.17511 -0.18993 0.72135 6.18099 -0.19106 0.71975 6.19137 -0.19276 0.71694 6.24827 -0.17801 0.72084 6.32143 -0.15910 0.71997 6.39459 -0.13957 0.71617 6.46774 -0.11970 0.70896 6.54090 -0.09911 0.69796 6.61406 -0.07645 0.68398 6.68722 -0.05216 0.67008 6.76038 -0.02683 0.65746 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06223 -0.06184 0.04647 0.24264 -0.14253 0.10546 0.48724 -0.22879 0.16163 0.72640 -0.31767 0.20040 0.96539 -0.38306 0.23145 1.20509 -0.43260 0.25918 1.43935 -0.46995 0.27638 1.67805 -0.49546 0.27875 1.92196 -0.50912 0.26551 2.15737 -0.51351 0.24276 2.37721 -0.51233 0.21900 2.58675 -0.50300 0.20092 2.80903 -0.48386 0.18473 3.03684 -0.46070 0.16992 3.26182 -0.43538 0.15917 3.48332 -0.40787 0.15414 3.70275 -0.37745 0.15710 3.92273 -0.34415 0.16996 4.14418 -0.30968 0.19414 4.36520 -0.27727 0.23173 4.58427 -0.25110 0.28574 4.80293 -0.23014 0.35582 5.02433 -0.20874 0.43475 5.24865 -0.18509 0.51245 5.47126 -0.16341 0.58876 5.70033 -0.14929 0.66707 5.94129 -0.15216 0.73904 6.17511 -0.16302 0.74910 6.18099 -0.16460 0.74769 6.19137 -0.16570 0.74519 6.24827 -0.15243 0.74523 6.32143 -0.13555 0.74003 6.39459 -0.11799 0.73166 6.46774 -0.10037 0.71997 6.54090 -0.08249 0.70511 6.61406 -0.06325 0.68796 6.68722 -0.04303 0.67139 6.76038 -0.02236 0.65757 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06237 -0.04176 0.04951 0.24342 -0.10685 0.11742 0.48938 -0.18105 0.18491 0.72947 -0.25360 0.23406 0.96917 -0.30481 0.27310 1.20960 -0.34523 0.30770 1.44393 -0.37660 0.33082 1.68342 -0.39907 0.33832 1.92899 -0.41231 0.32907 2.16484 -0.41802 0.30924 2.38264 -0.41917 0.28813 2.58807 -0.41386 0.27199 2.80808 -0.40112 0.25678 3.03450 -0.38499 0.24228 3.25739 -0.36660 0.23081 3.47619 -0.34570 0.22361 3.69252 -0.32139 0.22235 3.91006 -0.29351 0.22900 4.13007 -0.26372 0.24603 4.35013 -0.23540 0.27727 4.56803 -0.21302 0.32763 4.78639 -0.19554 0.39470 5.01023 -0.17682 0.46741 5.23577 -0.15802 0.54285 5.45949 -0.14007 0.61616 5.69029 -0.12919 0.69395 5.93518 -0.13113 0.76698 6.17511 -0.13454 0.77516 6.18099 -0.13555 0.77358 6.19137 -0.13614 0.77079 6.24827 -0.12476 0.76734 6.32143 -0.11045 0.75819 6.39459 -0.09574 0.74614 6.46774 -0.08077 0.73050 6.54090 -0.06592 0.71236 6.61406 -0.05026 0.69259 6.68722 -0.03401 0.67322 6.76038 -0.01789 0.65768 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06262 -0.03285 0.05495 0.24418 -0.08119 0.12921 0.49104 -0.13493 0.20291 0.73192 -0.19048 0.26091 0.97212 -0.22881 0.30559 1.21297 -0.25860 0.34388 1.44724 -0.28198 0.37027 1.68728 -0.29942 0.38120 1.93411 -0.31067 0.37540 2.17040 -0.31655 0.35868 2.38674 -0.31890 0.34044 2.58908 -0.31630 0.32652 2.80733 -0.30862 0.31331 3.03261 -0.29844 0.30050 3.25374 -0.28621 0.28970 3.47023 -0.27153 0.28168 3.68387 -0.25346 0.27749 3.89932 -0.23172 0.27908 4.11815 -0.20784 0.28991 4.33751 -0.18509 0.31543 4.55464 -0.16774 0.36219 4.77247 -0.15496 0.42743 4.99650 -0.14166 0.49921 5.22303 -0.12759 0.57294 5.44741 -0.11403 0.64425 5.68029 -0.10541 0.72076 5.92941 -0.10583 0.79338 6.17511 -0.10310 0.79764 6.18099 -0.10340 0.79627 6.19137 -0.10454 0.79386 6.24827 -0.09529 0.78694 6.32143 -0.08398 0.77425 6.39459 -0.07266 0.75927 6.46774 -0.06088 0.74046 6.54090 -0.04940 0.71971 6.61406 -0.03749 0.69778 6.68722 -0.02514 0.67575 6.76038 -0.01342 0.65778 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06285 -0.02147 0.05980 0.24483 -0.05394 0.13920 0.49240 -0.09053 0.21779 0.73412 -0.12941 0.28512 0.97455 -0.15405 0.33236 1.21546 -0.17277 0.37069 1.44951 -0.18761 0.39731 1.68984 -0.19916 0.40959 1.93752 -0.20725 0.40630 2.17421 -0.21208 0.39250 2.38960 -0.21444 0.37687 2.58979 -0.21337 0.36484 2.80679 -0.20931 0.35385 3.03122 -0.20368 0.34330 3.25101 -0.19648 0.33386 3.46570 -0.18728 0.32577 3.67730 -0.17529 0.31942 3.89123 -0.16023 0.31677 4.10928 -0.14340 0.32250 4.32799 -0.12766 0.34420 4.54370 -0.11662 0.39041 4.75980 -0.10939 0.45720 4.98295 -0.10175 0.53060 5.21017 -0.09243 0.60329 5.43516 -0.08319 0.67277 5.66985 -0.07732 0.74872 5.92362 -0.07658 0.81985 6.17511 -0.06946 0.81665 6.18099 -0.07026 0.81531 6.19137 -0.07039 0.81294 6.24827 -0.06406 0.80357 6.32143 -0.05637 0.78825 6.39459 -0.04890 0.77110 6.46774 -0.04075 0.74992 6.54090 -0.03291 0.72714 6.61406 -0.02488 0.70335 6.68722 -0.01652 0.67901 6.76038 -0.00894 0.65789 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06307 -0.01063 0.06452 0.24546 -0.02728 0.14894 0.49360 -0.04617 0.23080 0.73557 -0.06575 0.30109 0.97598 -0.07743 0.34814 1.21690 -0.08641 0.38618 1.44899 -0.09365 0.39105 1.69133 -0.09943 0.42614 1.93952 -0.10366 0.42438 2.17643 -0.10632 0.41227 2.39126 -0.10769 0.39811 2.59021 -0.10735 0.38736 2.80646 -0.10571 0.37829 3.03036 -0.10333 0.36979 3.24929 -0.10007 0.36164 3.46285 -0.09565 0.35359 3.67322 -0.08959 0.34545 3.88639 -0.08173 0.33929 4.10416 -0.07295 0.34134 4.32212 -0.06512 0.36195 4.53925 -0.09015 0.40188 4.75403 -0.08576 0.47075 4.96890 -0.05555 0.56317 5.19649 -0.05097 0.63561 5.42205 -0.04615 0.70327 5.65846 -0.04320 0.77923 5.91823 -0.04155 0.84450 6.17511 -0.03492 0.83397 6.18099 -0.03503 0.83269 6.19137 -0.03541 0.83044 6.24827 -0.03219 0.81897 6.32143 -0.02831 0.80134 6.39459 -0.02463 0.78186 6.46774 -0.02044 0.75899 6.54090 -0.01644 0.73463 6.61406 -0.01239 0.70920 6.68722 -0.00815 0.68286 6.76038 -0.00447 0.65800 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06328 0.00000 0.06906 0.24609 0.00000 0.15852 0.49474 0.00000 0.24315 0.73666 0.00000 0.31296 0.97679 0.00000 0.35708 1.21755 0.00000 0.39318 1.44630 0.00000 0.35902 1.69182 0.00000 0.43159 1.94016 0.00000 0.43015 2.17715 0.00000 0.41867 2.39180 0.00000 0.40496 2.59034 0.00000 0.39461 2.80635 0.00000 0.38659 3.03005 0.00000 0.37933 3.24866 0.00000 0.37187 3.46182 0.00000 0.36354 3.67193 0.00000 0.35368 3.88524 0.00000 0.34465 4.10325 0.00000 0.34470 4.32022 0.00000 0.36768 4.53378 -0.06447 0.41599 4.74649 -0.06587 0.48847 4.95352 0.00000 0.59879 5.18109 0.00000 0.67195 5.40724 0.00000 0.73775 5.64533 0.00000 0.81438 5.91230 0.00000 0.87165 6.17511 0.00000 0.85053 6.18099 0.00000 0.84930 6.19137 0.00000 0.84708 6.24827 0.00000 0.83367 6.32143 0.00000 0.81387 6.39459 0.00000 0.79176 6.46774 0.00000 0.76775 6.54090 0.00000 0.74217 6.61406 0.00000 0.71524 6.68722 0.00000 0.68716 6.76038 0.00000 0.65811 6.83354 0.00000 0.64531 #NETWORK = BODY-TOP-2 49 2 NEW 0.00000 0.00000 0.00000 0.06122 0.09261 0.02470 0.23984 0.21019 0.06234 0.48129 0.33575 0.09689 0.71772 0.45629 0.10508 0.95408 0.53834 0.10666 1.19143 0.59429 0.11238 1.42559 0.63328 0.11273 1.66221 0.65702 0.10286 1.90174 0.66696 0.08251 2.13640 0.66668 0.05639 2.14733 0.66632 0.05513 2.15900 0.66594 0.05378 2.18161 0.66519 0.05116 2.22680 0.66370 0.04593 2.29460 0.66146 0.03808 2.36240 0.65922 0.03023 2.47283 0.64945 0.02103 2.58325 0.63968 0.01182 2.65933 0.62870 0.00774 2.73541 0.61772 0.00366 2.78678 0.61031 0.00090 2.81149 0.60674 -0.00042 3.04266 0.56980 -0.00936 3.27245 0.53141 -0.01267 3.50000 0.49203 -0.00825 3.72630 0.45145 0.00686 3.95187 0.41023 0.03418 4.17693 0.36992 0.07369 4.40026 0.33325 0.12576 4.62072 0.30372 0.19167 4.83895 0.27894 0.27116 5.05762 0.25037 0.35760 5.27843 0.21690 0.44214 5.49788 0.19144 0.52680 5.72117 0.18044 0.61124 5.95400 0.18717 0.68085 6.17511 0.21507 0.69199 6.18099 0.21673 0.69048 6.19137 0.21890 0.68781 6.24827 0.20273 0.69550 6.32143 0.18189 0.69901 6.39459 0.16060 0.69995 6.46774 0.13881 0.69758 6.54090 0.11575 0.69088 6.61406 0.08982 0.68058 6.68722 0.06133 0.66915 6.76038 0.03130 0.65735 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06064 0.11052 0.01240 0.23769 0.25006 0.02934 0.47608 0.39606 0.04015 0.71095 0.52366 0.03070 0.94609 0.60357 0.01864 1.18214 0.65376 0.01255 1.41643 0.68667 0.00385 1.65189 0.70546 -0.01171 1.88885 0.71255 -0.03416 2.12005 0.71745 -0.08906 2.24615 0.71820 -0.13168 2.24387 0.71497 -0.10853 2.24763 0.71048 -0.08568 2.27537 0.69807 -0.04680 2.31275 0.68550 -0.01921 2.37698 0.67457 -0.00777 2.46527 0.67321 -0.03080 2.55370 0.67196 -0.06271 2.62820 0.66760 -0.08700 2.69273 0.66480 -0.11317 2.74057 0.66409 -0.13415 2.81293 0.64025 -0.10832 3.04596 0.59864 -0.11108 3.27833 0.55601 -0.10779 3.50904 0.51298 -0.09635 3.73894 0.46960 -0.07374 3.96749 0.42655 -0.03862 4.19459 0.38504 0.00870 4.41920 0.34715 0.06852 4.63998 0.31560 0.14200 4.85734 0.28791 0.22794 5.07585 0.25589 0.31536 5.29412 0.21964 0.40511 5.51177 0.19560 0.49447 5.73231 0.19184 0.58140 5.96092 0.20269 0.64922 6.17511 0.23981 0.66228 6.18099 0.24744 0.65336 6.19137 0.24422 0.65798 6.24827 0.22672 0.66947 6.32143 0.20416 0.67735 6.39459 0.18123 0.68322 6.46774 0.15776 0.68593 6.54090 0.13242 0.68386 6.61406 0.10330 0.67768 6.68722 0.07052 0.66848 6.76038 0.03577 0.65725 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06064 -0.11052 0.01240 0.23769 -0.25006 0.02934 0.47608 -0.39606 0.04015 0.71095 -0.52366 0.03070 0.94609 -0.60357 0.01864 1.18214 -0.65376 0.01255 1.41643 -0.68667 0.00385 1.65189 -0.70546 -0.01171 1.88885 -0.71255 -0.03416 2.12005 -0.71745 -0.08906 2.24615 -0.71820 -0.13168 2.24387 -0.71497 -0.10853 2.24763 -0.71048 -0.08568 2.27537 -0.69807 -0.04680 2.31275 -0.68550 -0.01921 2.37698 -0.67457 -0.00777 2.46527 -0.67321 -0.03080 2.55370 -0.67196 -0.06271 2.62820 -0.66760 -0.08700 2.69273 -0.66480 -0.11317 2.74057 -0.66409 -0.13415 2.81293 -0.64025 -0.10832 3.04596 -0.59864 -0.11108 3.27833 -0.55601 -0.10779 3.50904 -0.51298 -0.09635 3.73894 -0.46960 -0.07374 3.96749 -0.42655 -0.03862 4.19459 -0.38504 0.00870 4.41920 -0.34715 0.06852 4.63998 -0.31560 0.14200 4.85734 -0.28791 0.22794 5.07585 -0.25589 0.31536 5.29412 -0.21964 0.40511 5.51177 -0.19560 0.49447 5.73231 -0.19184 0.58140 5.96092 -0.20269 0.64922 6.17511 -0.23981 0.66228 6.18099 -0.24744 0.65336 6.19137 -0.24422 0.65798 6.24827 -0.22672 0.66947 6.32143 -0.20416 0.67735 6.39459 -0.18123 0.68322 6.46774 -0.15776 0.68593 6.54090 -0.13242 0.68386 6.61406 -0.10330 0.67768 6.68722 -0.07052 0.66848 6.76038 -0.03577 0.65725 6.83354 0.00000 0.64531 0.00000 0.00000 0.00000 0.06122 -0.09261 0.02470 0.23984 -0.21019 0.06234 0.48129 -0.33575 0.09689 0.71772 -0.45629 0.10508 0.95408 -0.53834 0.10666 1.19143 -0.59429 0.11238 1.42559 -0.63328 0.11273 1.66221 -0.65702 0.10286 1.90174 -0.66696 0.08251 2.13640 -0.66668 0.05639 2.14733 -0.66632 0.05513 2.15900 -0.66594 0.05378 2.18161 -0.66519 0.05116 2.22680 -0.66370 0.04593 2.29460 -0.66146 0.03808 2.36240 -0.65922 0.03023 2.47283 -0.64945 0.02103 2.58325 -0.63968 0.01182 2.65933 -0.62870 0.00774 2.73541 -0.61772 0.00366 2.78678 -0.61031 0.00090 2.81149 -0.60674 -0.00042 3.04266 -0.56980 -0.00936 3.27245 -0.53141 -0.01267 3.50000 -0.49203 -0.00825 3.72630 -0.45145 0.00686 3.95187 -0.41023 0.03418 4.17693 -0.36992 0.07369 4.40026 -0.33325 0.12576 4.62072 -0.30372 0.19167 4.83895 -0.27894 0.27116 5.05762 -0.25037 0.35760 5.27843 -0.21690 0.44214 5.49788 -0.19144 0.52680 5.72117 -0.18044 0.61124 5.95400 -0.18717 0.68085 6.17511 -0.21507 0.69199 6.18099 -0.21673 0.69048 6.19137 -0.21890 0.68781 6.24827 -0.20273 0.69550 6.32143 -0.18189 0.69901 6.39459 -0.16060 0.69995 6.46774 -0.13881 0.69758 6.54090 -0.11575 0.69088 6.61406 -0.08982 0.68058 6.68722 -0.06133 0.66915 6.76038 -0.03130 0.65735 6.83354 0.00000 0.64531 #NETWORK = BODY-BOT-1 51 2 NEW 0.00000 0.00000 0.00000 0.06064 0.11052 0.01240 0.23769 0.25006 0.02934 0.47608 0.39606 0.04015 0.71095 0.52366 0.03070 0.94609 0.60357 0.01864 1.18214 0.65376 0.01255 1.41643 0.68667 0.00385 1.65189 0.70546 -0.01171 1.88885 0.71255 -0.03416 2.12005 0.71745 -0.08906 2.24615 0.71820 -0.13168 2.25215 0.72039 -0.15308 2.26291 0.72131 -0.17195 2.30310 0.71949 -0.20042 2.36037 0.71527 -0.21534 2.43162 0.70907 -0.21628 2.50850 0.70087 -0.20655 2.58262 0.69079 -0.19056 2.64672 0.67976 -0.17199 2.69790 0.67122 -0.15393 2.74057 0.66409 -0.13415 2.81293 0.64025 -0.10832 3.04596 0.59864 -0.11108 3.27833 0.55601 -0.10779 3.50904 0.51298 -0.09635 3.73894 0.46960 -0.07374 3.96749 0.42655 -0.03862 4.19459 0.38504 0.00870 4.41920 0.34715 0.06852 4.63998 0.31560 0.14200 4.85734 0.28791 0.22794 5.07585 0.25589 0.31536 5.29412 0.21964 0.40511 5.51177 0.19560 0.49447 5.73231 0.19184 0.58140 5.96092 0.20269 0.64922 6.17511 0.23981 0.66228 6.18099 0.24744 0.65336 6.19137 0.24422 0.65798 6.24827 0.22672 0.66947 6.32143 0.20416 0.67735 6.39459 0.18123 0.68322 6.46774 0.15776 0.68593 6.54090 0.13242 0.68386 6.61406 0.10330 0.67768 6.68722 0.07052 0.66848 6.76038 0.03577 0.65725 6.83354 0.00000 0.64531 6.92735 0.00000 0.62961 6.96990 0.04994 0.62961 0.00000 0.00000 0.00000 0.05984 0.13128 -0.00482 0.23454 0.28927 -0.01909 0.46882 0.43932 -0.03885 0.70275 0.54510 -0.05933 0.93733 0.61194 -0.07793 1.17209 0.66474 -0.09551 1.40645 0.70290 -0.11481 1.64060 0.72428 -0.13714 1.87474 0.73106 -0.16178 2.10910 0.72775 -0.18639 2.12788 0.72654 -0.19317 2.14740 0.72529 -0.20022 2.18570 0.72283 -0.21406 2.26230 0.71791 -0.24172 2.33890 0.71298 -0.26939 2.41857 0.70484 -0.27163 2.49824 0.69669 -0.27388 2.57791 0.68854 -0.27612 2.65670 0.67636 -0.25449 2.73550 0.66418 -0.23286 2.78568 0.65642 -0.21908 2.81429 0.65199 -0.21123 3.04912 0.60868 -0.20846 3.28407 0.56432 -0.20061 3.51813 0.51978 -0.18488 3.75211 0.47532 -0.15776 3.98438 0.43174 -0.11729 4.21392 0.38998 -0.06240 4.43865 0.35165 0.00972 4.66031 0.31899 0.08953 4.87897 0.28750 0.17708 5.09373 0.25124 0.27394 5.30922 0.21557 0.36944 5.52539 0.19570 0.46278 5.74414 0.19669 0.54971 5.97064 0.22698 0.60474 6.17511 0.26004 0.62973 6.18099 0.26000 0.64191 6.19137 0.26000 0.64915 6.24827 0.26000 0.66170 6.32143 0.26000 0.66657 6.39459 0.26000 0.66891 6.46774 0.26000 0.66993 6.54090 0.26000 0.66924 6.61406 0.26000 0.66597 6.68722 0.26000 0.66015 6.76038 0.26000 0.65264 6.83354 0.26000 0.64425 6.90669 0.26000 0.63594 6.98798 0.26000 0.62961 0.00000 0.00000 0.00000 0.05984 -0.13128 -0.00482 0.23454 -0.28927 -0.01909 0.46882 -0.43932 -0.03885 0.70275 -0.54510 -0.05933 0.93733 -0.61194 -0.07793 1.17209 -0.66474 -0.09551 1.40645 -0.70290 -0.11481 1.64060 -0.72428 -0.13714 1.87474 -0.73106 -0.16178 2.10910 -0.72775 -0.18639 2.12788 -0.72654 -0.19317 2.14740 -0.72529 -0.20022 2.18570 -0.72283 -0.21406 2.26230 -0.71791 -0.24172 2.33890 -0.71298 -0.26939 2.41857 -0.70484 -0.27163 2.49824 -0.69669 -0.27388 2.57791 -0.68854 -0.27612 2.65670 -0.67636 -0.25449 2.73550 -0.66418 -0.23286 2.78568 -0.65642 -0.21908 2.81429 -0.65199 -0.21123 3.04912 -0.60868 -0.20846 3.28407 -0.56432 -0.20061 3.51813 -0.51978 -0.18488 3.75211 -0.47532 -0.15776 3.98438 -0.43174 -0.11729 4.21392 -0.38998 -0.06240 4.43865 -0.35165 0.00972 4.66031 -0.31899 0.08953 4.87897 -0.28750 0.17708 5.09373 -0.25124 0.27394 5.30922 -0.21557 0.36944 5.52539 -0.19570 0.46278 5.74414 -0.19669 0.54971 5.97064 -0.22698 0.60474 6.17511 -0.26004 0.62973 6.18099 -0.26000 0.64191 6.19137 -0.26000 0.64915 6.24827 -0.26000 0.66170 6.32143 -0.26000 0.66657 6.39459 -0.26000 0.66891 6.46774 -0.26000 0.66993 6.54090 -0.26000 0.66924 6.61406 -0.26000 0.66597 6.68722 -0.26000 0.66015 6.76038 -0.26000 0.65264 6.83354 -0.26000 0.64425 6.90669 -0.26000 0.63594 6.98798 -0.26000 0.62961 0.00000 0.00000 0.00000 0.06064 -0.11052 0.01240 0.23769 -0.25006 0.02934 0.47608 -0.39606 0.04015 0.71095 -0.52366 0.03070 0.94609 -0.60357 0.01864 1.18214 -0.65376 0.01255 1.41643 -0.68667 0.00385 1.65189 -0.70546 -0.01171 1.88885 -0.71255 -0.03416 2.12005 -0.71745 -0.08906 2.24615 -0.71820 -0.13168 2.25215 -0.72039 -0.15308 2.26291 -0.72131 -0.17195 2.30310 -0.71949 -0.20042 2.36037 -0.71527 -0.21534 2.43162 -0.70907 -0.21628 2.50850 -0.70087 -0.20655 2.58262 -0.69079 -0.19056 2.64672 -0.67976 -0.17199 2.69790 -0.67122 -0.15393 2.74057 -0.66409 -0.13415 2.81293 -0.64025 -0.10832 3.04596 -0.59864 -0.11108 3.27833 -0.55601 -0.10779 3.50904 -0.51298 -0.09635 3.73894 -0.46960 -0.07374 3.96749 -0.42655 -0.03862 4.19459 -0.38504 0.00870 4.41920 -0.34715 0.06852 4.63998 -0.31560 0.14200 4.85734 -0.28791 0.22794 5.07585 -0.25589 0.31536 5.29412 -0.21964 0.40511 5.51177 -0.19560 0.49447 5.73231 -0.19184 0.58140 5.96092 -0.20269 0.64922 6.17511 -0.23981 0.66228 6.18099 -0.24744 0.65336 6.19137 -0.24422 0.65798 6.24827 -0.22672 0.66947 6.32143 -0.20416 0.67735 6.39459 -0.18123 0.68322 6.46774 -0.15776 0.68593 6.54090 -0.13242 0.68386 6.61406 -0.10330 0.67768 6.68722 -0.07052 0.66848 6.76038 -0.03577 0.65725 6.83354 0.00000 0.64531 6.92735 0.00000 0.62961 6.96990 -0.04994 0.62961 #NETWORK = BODY-BOT-2 42 2 NEW 0.00000 0.00000 0.00000 0.05984 0.13128 -0.00482 0.23454 0.28927 -0.01909 0.46882 0.43932 -0.03885 0.70275 0.54510 -0.05933 0.93733 0.61194 -0.07793 1.17209 0.66474 -0.09551 1.40645 0.70290 -0.11481 1.64060 0.72428 -0.13714 1.87474 0.73106 -0.16178 2.10910 0.72775 -0.18639 2.33890 0.71298 -0.26939 2.57791 0.68854 -0.27612 2.81429 0.65199 -0.21123 3.04912 0.60868 -0.20846 3.28407 0.56432 -0.20061 3.51813 0.51978 -0.18488 3.75211 0.47532 -0.15776 3.98438 0.43174 -0.11729 4.21392 0.38998 -0.06240 4.43865 0.35165 0.00972 4.66031 0.31899 0.08953 4.87897 0.28750 0.17708 5.09373 0.25124 0.27394 5.30922 0.21557 0.36944 5.52539 0.19570 0.46278 5.74414 0.19669 0.54971 5.97064 0.22698 0.60474 6.17511 0.26004 0.62973 6.18099 0.26000 0.61731 6.19137 0.26000 0.61007 6.24827 0.26000 0.59752 6.32143 0.26000 0.59266 6.39459 0.26000 0.59031 6.46774 0.26000 0.58930 6.54090 0.26000 0.58998 6.61406 0.26000 0.59326 6.68722 0.26000 0.59908 6.76038 0.26000 0.60659 6.83354 0.26000 0.61497 6.90669 0.26000 0.62328 6.98798 0.26000 0.62961 0.00000 0.00000 0.00000 0.05918 0.12167 -0.01906 0.23201 0.28255 -0.05808 0.46255 0.43089 -0.10707 0.69414 0.51969 -0.15381 0.92732 0.57765 -0.18834 1.16111 0.63573 -0.21353 1.39621 0.68174 -0.23662 1.62950 0.70779 -0.26033 1.86113 0.71617 -0.28494 2.09525 0.71311 -0.30955 2.33401 0.70213 -0.33169 2.57671 0.67892 -0.34046 2.81593 0.64095 -0.33422 3.05282 0.59896 -0.32240 3.29045 0.55567 -0.30378 3.52752 0.51225 -0.27631 3.76451 0.46917 -0.23682 3.99887 0.42714 -0.18483 4.23003 0.38633 -0.12164 4.45769 0.34693 -0.04783 4.68071 0.30936 0.03689 4.89780 0.27337 0.13283 5.11030 0.23709 0.23555 5.32325 0.20399 0.33632 5.53855 0.18905 0.43216 5.75613 0.19438 0.51760 5.97671 0.21655 0.57700 6.17511 0.23920 0.59790 6.18099 0.24745 0.60590 6.19137 0.24422 0.60120 6.24827 0.22671 0.58967 6.32143 0.20408 0.58179 6.39459 0.18119 0.57597 6.46774 0.15776 0.57331 6.54090 0.13244 0.57536 6.61406 0.10329 0.58155 6.68722 0.07054 0.59077 6.76038 0.03578 0.60198 6.83354 0.00000 0.61392 6.92735 0.00000 0.62961 6.96990 0.04994 0.62961 0.00000 0.00000 0.00000 0.05918 -0.12167 -0.01906 0.23201 -0.28255 -0.05808 0.46255 -0.43089 -0.10707 0.69414 -0.51969 -0.15381 0.92732 -0.57765 -0.18834 1.16111 -0.63573 -0.21353 1.39621 -0.68174 -0.23662 1.62950 -0.70779 -0.26033 1.86113 -0.71617 -0.28494 2.09525 -0.71311 -0.30955 2.33401 -0.70213 -0.33169 2.57671 -0.67892 -0.34046 2.81593 -0.64095 -0.33422 3.05282 -0.59896 -0.32240 3.29045 -0.55567 -0.30378 3.52752 -0.51225 -0.27631 3.76451 -0.46917 -0.23682 3.99887 -0.42714 -0.18483 4.23003 -0.38633 -0.12164 4.45769 -0.34693 -0.04783 4.68071 -0.30936 0.03689 4.89780 -0.27337 0.13283 5.11030 -0.23709 0.23555 5.32325 -0.20399 0.33632 5.53855 -0.18905 0.43216 5.75613 -0.19438 0.51760 5.97671 -0.21655 0.57700 6.17511 -0.23920 0.59790 6.18099 -0.24745 0.60590 6.19137 -0.24422 0.60120 6.24827 -0.22671 0.58967 6.32143 -0.20408 0.58179 6.39459 -0.18119 0.57597 6.46774 -0.15776 0.57331 6.54090 -0.13244 0.57536 6.61406 -0.10329 0.58155 6.68722 -0.07054 0.59077 6.76038 -0.03578 0.60198 6.83354 0.00000 0.61392 6.92735 0.00000 0.62961 6.96990 -0.04994 0.62961 0.00000 0.00000 0.00000 0.05984 -0.13128 -0.00482 0.23454 -0.28927 -0.01909 0.46882 -0.43932 -0.03885 0.70275 -0.54510 -0.05933 0.93733 -0.61194 -0.07793 1.17209 -0.66474 -0.09551 1.40645 -0.70290 -0.11481 1.64060 -0.72428 -0.13714 1.87474 -0.73106 -0.16178 2.10910 -0.72775 -0.18639 2.33890 -0.71298 -0.26939 2.57791 -0.68854 -0.27612 2.81429 -0.65199 -0.21123 3.04912 -0.60868 -0.20846 3.28407 -0.56432 -0.20061 3.51813 -0.51978 -0.18488 3.75211 -0.47532 -0.15776 3.98438 -0.43174 -0.11729 4.21392 -0.38998 -0.06240 4.43865 -0.35165 0.00972 4.66031 -0.31899 0.08953 4.87897 -0.28750 0.17708 5.09373 -0.25124 0.27394 5.30922 -0.21557 0.36944 5.52539 -0.19570 0.46278 5.74414 -0.19669 0.54971 5.97064 -0.22698 0.60474 6.17511 -0.26004 0.62973 6.18099 -0.26000 0.61731 6.19137 -0.26000 0.61007 6.24827 -0.26000 0.59752 6.32143 -0.26000 0.59266 6.39459 -0.26000 0.59031 6.46774 -0.26000 0.58930 6.54090 -0.26000 0.58998 6.61406 -0.26000 0.59326 6.68722 -0.26000 0.59908 6.76038 -0.26000 0.60659 6.83354 -0.26000 0.61497 6.90669 -0.26000 0.62328 6.98798 -0.26000 0.62961 #NETWORK = BODY-BOT-3 40 9 NEW 0.00000 0.00000 0.00000 0.05918 0.12167 -0.01906 0.23201 0.28255 -0.05808 0.46255 0.43089 -0.10707 0.69414 0.51969 -0.15381 0.92732 0.57765 -0.18834 1.16111 0.63573 -0.21353 1.39621 0.68174 -0.23662 1.62950 0.70779 -0.26033 1.86113 0.71617 -0.28494 2.09525 0.71311 -0.30955 2.33401 0.70213 -0.33169 2.57671 0.67892 -0.34046 2.81593 0.64095 -0.33422 3.05282 0.59896 -0.32240 3.29045 0.55567 -0.30378 3.52752 0.51225 -0.27631 3.76451 0.46917 -0.23682 3.99887 0.42714 -0.18483 4.23003 0.38633 -0.12164 4.45769 0.34693 -0.04783 4.68071 0.30936 0.03689 4.89780 0.27337 0.13283 5.11030 0.23709 0.23555 5.32325 0.20399 0.33632 5.53855 0.18905 0.43216 5.75613 0.19438 0.51760 5.97671 0.21655 0.57700 6.17511 0.23920 0.59790 6.18099 0.24745 0.60590 6.19137 0.24422 0.60120 6.24827 0.22671 0.58967 6.32143 0.20408 0.58179 6.39459 0.18119 0.57597 6.46774 0.15776 0.57331 6.54090 0.13244 0.57536 6.61406 0.10329 0.58155 6.68722 0.07054 0.59077 6.76038 0.03578 0.60198 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05850 0.10685 -0.03370 0.22937 0.25332 -0.09871 0.45652 0.38710 -0.17258 0.68698 0.46627 -0.23243 0.91936 0.52145 -0.27611 1.15190 0.58103 -0.31252 1.38707 0.62979 -0.34532 1.61920 0.65805 -0.37477 1.84825 0.66860 -0.40150 2.08212 0.66814 -0.42634 2.32491 0.66020 -0.44777 2.57461 0.64120 -0.45408 2.81736 0.60780 -0.44240 3.05612 0.57009 -0.42426 3.29633 0.53066 -0.39882 3.53653 0.49067 -0.36413 3.77708 0.45057 -0.31701 4.01442 0.41100 -0.25731 4.24765 0.37185 -0.18644 4.47655 0.33273 -0.10484 4.69968 0.29337 -0.01203 4.91532 0.25494 0.09163 5.12534 0.21910 0.20072 5.33620 0.19003 0.30575 5.55092 0.17768 0.40337 5.76779 0.18571 0.48639 5.98418 0.20103 0.54282 6.17511 0.21204 0.57076 6.18099 0.21391 0.57205 6.19137 0.21636 0.57432 6.24827 0.20003 0.56742 6.32143 0.17940 0.56416 6.39459 0.15837 0.56320 6.46774 0.13729 0.56456 6.54090 0.11507 0.56900 6.61406 0.09002 0.57566 6.68722 0.06239 0.58486 6.76038 0.03216 0.59817 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05796 0.08840 -0.04520 0.22733 0.21477 -0.13012 0.45187 0.33130 -0.22322 0.68126 0.40215 -0.29524 0.91282 0.45337 -0.34815 1.14424 0.50929 -0.39490 1.37938 0.55580 -0.43676 1.61044 0.58369 -0.47202 1.83717 0.59597 -0.50180 2.07064 0.59884 -0.52838 2.31682 0.59528 -0.55088 2.57271 0.58177 -0.55656 2.81868 0.55475 -0.54144 3.05919 0.52342 -0.51892 3.30187 0.48992 -0.48839 3.54514 0.45517 -0.44790 3.78918 0.41942 -0.39416 4.02945 0.38327 -0.32729 4.26464 0.34666 -0.24894 4.49460 0.30908 -0.15938 4.71754 0.27020 -0.05812 4.93153 0.23212 0.05355 5.13913 0.19842 0.16876 5.34825 0.17332 0.27730 5.56275 0.16395 0.37582 5.77881 0.17167 0.45686 5.99113 0.18308 0.51104 6.17511 0.18482 0.54369 6.18099 0.18607 0.54525 6.19137 0.18798 0.54800 6.24827 0.17299 0.54564 6.32143 0.15462 0.54668 6.39459 0.13560 0.55034 6.46774 0.11702 0.55534 6.54090 0.09794 0.56204 6.61406 0.07688 0.56950 6.68722 0.05412 0.57913 6.76038 0.02808 0.59487 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05731 0.07154 -0.05922 0.22562 0.17489 -0.15646 0.44858 0.27117 -0.25901 0.67697 0.33375 -0.34235 0.90759 0.38021 -0.40584 1.13810 0.42872 -0.46088 1.37327 0.46909 -0.50943 1.60346 0.49423 -0.54949 1.82822 0.50705 -0.58276 2.06119 0.51266 -0.61240 2.31001 0.51319 -0.63766 2.57107 0.50500 -0.64444 2.81983 0.48496 -0.62806 3.06193 0.46099 -0.60348 3.30692 0.43452 -0.56999 3.55310 0.40610 -0.52546 3.80048 0.37562 -0.46625 4.04351 0.34369 -0.39284 4.28050 0.31058 -0.30727 4.51135 0.27609 -0.21000 4.73409 0.24029 -0.10081 4.94666 0.20561 0.01798 5.15222 0.17590 0.13842 5.35988 0.15481 0.24983 5.57426 0.14754 0.34904 5.78950 0.15455 0.42822 5.99742 0.16111 0.48223 6.17511 0.15659 0.51767 6.18099 0.15757 0.51940 6.19137 0.15891 0.52245 6.24827 0.14546 0.52446 6.32143 0.12969 0.52940 6.39459 0.11288 0.53739 6.46774 0.09701 0.54560 6.54090 0.08108 0.55446 6.61406 0.06387 0.56309 6.68722 0.04566 0.57366 6.76038 0.02367 0.59201 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05719 0.04818 -0.06177 0.22484 0.12990 -0.16843 0.44638 0.21135 -0.28294 0.67368 0.26595 -0.37849 0.90354 0.30481 -0.45056 1.13342 0.34377 -0.51117 1.36865 0.37634 -0.56431 1.59817 0.39745 -0.60826 1.82134 0.40949 -0.64500 2.05379 0.41638 -0.67818 2.30457 0.41952 -0.70696 2.56975 0.41549 -0.71590 2.82079 0.40200 -0.70017 3.06428 0.38524 -0.67566 3.31133 0.36592 -0.64125 3.56017 0.34410 -0.59437 3.81062 0.31931 -0.53091 4.05615 0.29227 -0.45172 4.29470 0.26372 -0.35951 4.52624 0.23410 -0.25502 4.74869 0.20419 -0.13851 4.96037 0.17584 -0.01424 5.16539 0.15173 0.10792 5.37190 0.13486 0.22145 5.58575 0.12831 0.32229 5.79983 0.13359 0.40056 6.00317 0.13602 0.45594 6.17511 0.12753 0.49258 6.18099 0.12793 0.49453 6.19137 0.12894 0.49796 6.24827 0.11736 0.50406 6.32143 0.10456 0.51242 6.39459 0.09023 0.52434 6.46774 0.07726 0.53532 6.54090 0.06451 0.54626 6.61406 0.05098 0.55644 6.68722 0.03700 0.56854 6.76038 0.01906 0.58948 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05699 0.03667 -0.06610 0.22428 0.09506 -0.17709 0.44510 0.15322 -0.29684 0.67141 0.19685 -0.40336 0.90049 0.22896 -0.48415 1.12996 0.25806 -0.54834 1.36532 0.28191 -0.60396 1.59436 0.29792 -0.65056 1.81634 0.30794 -0.69029 2.04832 0.31466 -0.72690 2.30048 0.31881 -0.75921 2.56874 0.31742 -0.77055 2.82154 0.30922 -0.75665 3.06616 0.29865 -0.73372 3.31496 0.28576 -0.69993 3.56610 0.27025 -0.65206 3.81913 0.25143 -0.58521 4.06667 0.23001 -0.50074 4.30640 0.20717 -0.40256 4.53868 0.18391 -0.29262 4.76193 0.16162 -0.17266 4.97429 0.14146 -0.04696 5.17906 0.12432 0.07624 5.38465 0.11166 0.19135 5.59782 0.10594 0.29420 5.80964 0.10811 0.37429 6.00843 0.10780 0.43190 6.17511 0.09724 0.46901 6.18099 0.09701 0.47113 6.19137 0.09789 0.47487 6.24827 0.08863 0.48456 6.32143 0.07911 0.49593 6.39459 0.06762 0.51119 6.46774 0.05775 0.52461 6.54090 0.04818 0.53759 6.61406 0.03817 0.54962 6.68722 0.02806 0.56392 6.76038 0.01436 0.58713 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05682 0.02342 -0.06971 0.22388 0.06128 -0.18315 0.44434 0.09965 -0.30516 0.66993 0.13008 -0.41968 0.89842 0.15245 -0.50694 1.12764 0.17170 -0.57334 1.36309 0.18739 -0.63053 1.59179 0.19822 -0.67907 1.81293 0.20538 -0.72111 2.04455 0.21057 -0.76040 2.29764 0.21413 -0.79543 2.56803 0.21398 -0.80874 2.82207 0.20966 -0.79707 3.06754 0.20385 -0.77639 3.31768 0.19626 -0.74400 3.57060 0.18642 -0.69589 3.82557 0.17361 -0.62628 4.07448 0.15850 -0.53714 4.31497 0.14246 -0.43409 4.54808 0.12682 -0.32102 4.77323 0.11327 -0.20180 4.98818 0.10207 -0.07962 5.19417 0.09225 0.04122 5.39899 0.08377 0.15751 5.61091 0.07885 0.26374 5.81972 0.07865 0.34728 6.01360 0.07678 0.40821 6.17511 0.06572 0.44711 6.18099 0.06528 0.44927 6.19137 0.06591 0.45309 6.24827 0.05941 0.46580 6.32143 0.05321 0.48015 6.39459 0.04506 0.49797 6.46774 0.03839 0.51361 6.54090 0.03201 0.52862 6.61406 0.02541 0.54271 6.68722 0.01887 0.55980 6.76038 0.00961 0.58489 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05666 0.01133 -0.07309 0.22354 0.03007 -0.18837 0.44386 0.04921 -0.31036 0.66916 0.06453 -0.42809 0.89738 0.07578 -0.51845 1.12639 0.08548 -0.58670 1.36181 0.09345 -0.64568 1.59028 0.09901 -0.69590 1.81090 0.10275 -0.73950 2.04231 0.10551 -0.78032 2.29597 0.10745 -0.81669 2.56761 0.10759 -0.83109 2.82240 0.10586 -0.82137 3.06840 0.10345 -0.80280 3.31940 0.10002 -0.77180 3.57344 0.09523 -0.72359 3.82952 0.08857 -0.65145 4.07899 0.08054 -0.55817 4.31976 0.07221 -0.45171 4.55394 0.06473 -0.33874 4.78257 0.05944 -0.22590 5.00271 0.05598 -0.11377 5.21187 0.05257 0.00023 5.41601 0.04828 0.11732 5.62577 0.04484 0.22915 5.83058 0.04358 0.31820 6.01895 0.04161 0.38376 6.17511 0.03317 0.42678 6.18099 0.03285 0.42881 6.19137 0.03322 0.43240 6.24827 0.02984 0.44760 6.32143 0.02684 0.46519 6.39459 0.02252 0.48471 6.46774 0.01916 0.50240 6.54090 0.01597 0.51945 6.61406 0.01269 0.53573 6.68722 0.00949 0.55613 6.76038 0.00482 0.58274 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05650 0.00000 -0.07646 0.22306 0.00000 -0.19580 0.44300 0.00000 -0.31974 0.66892 0.00000 -0.43078 0.89723 0.00000 -0.52011 1.12589 0.00000 -0.59209 1.36142 0.00000 -0.65031 1.58968 0.00000 -0.70251 1.81009 0.00000 -0.74687 2.04147 0.00000 -0.78774 2.29542 0.00000 -0.82368 2.56749 0.00000 -0.83806 2.82251 0.00000 -0.82964 3.06872 0.00000 -0.81249 3.32005 0.00000 -0.78231 3.57447 0.00000 -0.73359 3.83066 0.00000 -0.65873 4.07975 0.00000 -0.56170 4.32027 0.00000 -0.45357 4.55598 0.00000 -0.34491 4.79025 0.00000 -0.24572 5.01903 0.00000 -0.15212 5.23394 0.00000 -0.05092 5.43735 0.00000 0.06694 5.64353 0.00000 0.18782 5.84296 0.00000 0.28504 6.02481 0.00000 0.35695 6.17511 0.00000 0.40747 6.18099 0.00000 0.40932 6.19137 0.00000 0.41256 6.24827 0.00000 0.42984 6.32143 0.00000 0.45107 6.39459 0.00000 0.47142 6.46774 0.00000 0.49106 6.54090 0.00000 0.51013 6.61406 0.00000 0.52870 6.68722 -0.00002 0.55283 6.76038 0.00000 0.58064 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05650 0.00000 -0.07646 0.22306 0.00000 -0.19580 0.44300 0.00000 -0.31974 0.66892 0.00000 -0.43078 0.89723 0.00000 -0.52011 1.12589 0.00000 -0.59209 1.36142 0.00000 -0.65031 1.58968 0.00000 -0.70251 1.81009 0.00000 -0.74687 2.04147 0.00000 -0.78774 2.29542 0.00000 -0.82368 2.56749 0.00000 -0.83806 2.82251 0.00000 -0.82964 3.06872 0.00000 -0.81249 3.32005 0.00000 -0.78231 3.57447 0.00000 -0.73359 3.83066 0.00000 -0.65873 4.07975 0.00000 -0.56170 4.32027 0.00000 -0.45357 4.55598 0.00000 -0.34491 4.79025 0.00000 -0.24572 5.01903 0.00000 -0.15212 5.23394 0.00000 -0.05092 5.43735 0.00000 0.06694 5.64353 0.00000 0.18782 5.84296 0.00000 0.28504 6.02481 0.00000 0.35695 6.17511 0.00000 0.40747 6.18099 0.00000 0.40932 6.19137 0.00000 0.41256 6.24827 0.00000 0.42984 6.32143 0.00000 0.45107 6.39459 0.00000 0.47142 6.46774 0.00000 0.49106 6.54090 0.00000 0.51013 6.61406 0.00000 0.52870 6.68722 0.00002 0.55283 6.76038 0.00000 0.58064 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05666 -0.01133 -0.07309 0.22354 -0.03007 -0.18837 0.44386 -0.04921 -0.31036 0.66916 -0.06453 -0.42809 0.89738 -0.07578 -0.51845 1.12639 -0.08548 -0.58670 1.36181 -0.09345 -0.64568 1.59028 -0.09901 -0.69590 1.81090 -0.10275 -0.73950 2.04231 -0.10551 -0.78032 2.29597 -0.10745 -0.81669 2.56761 -0.10759 -0.83109 2.82240 -0.10586 -0.82137 3.06840 -0.10345 -0.80280 3.31940 -0.10002 -0.77180 3.57344 -0.09523 -0.72359 3.82952 -0.08857 -0.65145 4.07899 -0.08054 -0.55817 4.31976 -0.07221 -0.45171 4.55394 -0.06473 -0.33874 4.78257 -0.05944 -0.22590 5.00271 -0.05598 -0.11377 5.21187 -0.05257 0.00023 5.41601 -0.04828 0.11732 5.62577 -0.04484 0.22915 5.83058 -0.04358 0.31820 6.01895 -0.04161 0.38376 6.17511 -0.03317 0.42678 6.18099 -0.03285 0.42881 6.19137 -0.03322 0.43240 6.24827 -0.02984 0.44760 6.32143 -0.02684 0.46519 6.39459 -0.02252 0.48471 6.46774 -0.01916 0.50240 6.54090 -0.01597 0.51945 6.61406 -0.01269 0.53573 6.68722 -0.00949 0.55613 6.76038 -0.00482 0.58274 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05682 -0.02342 -0.06971 0.22388 -0.06128 -0.18315 0.44434 -0.09965 -0.30516 0.66993 -0.13008 -0.41968 0.89842 -0.15245 -0.50694 1.12764 -0.17170 -0.57334 1.36309 -0.18739 -0.63053 1.59179 -0.19822 -0.67907 1.81293 -0.20538 -0.72111 2.04455 -0.21057 -0.76040 2.29764 -0.21413 -0.79543 2.56803 -0.21398 -0.80874 2.82207 -0.20966 -0.79707 3.06754 -0.20385 -0.77639 3.31768 -0.19626 -0.74400 3.57060 -0.18642 -0.69589 3.82557 -0.17361 -0.62628 4.07448 -0.15850 -0.53714 4.31497 -0.14246 -0.43409 4.54808 -0.12682 -0.32102 4.77323 -0.11327 -0.20180 4.98818 -0.10207 -0.07962 5.19417 -0.09225 0.04122 5.39899 -0.08377 0.15751 5.61091 -0.07885 0.26374 5.81972 -0.07865 0.34728 6.01360 -0.07678 0.40821 6.17511 -0.06572 0.44711 6.18099 -0.06528 0.44927 6.19137 -0.06591 0.45309 6.24827 -0.05941 0.46580 6.32143 -0.05321 0.48015 6.39459 -0.04506 0.49797 6.46774 -0.03839 0.51361 6.54090 -0.03201 0.52862 6.61406 -0.02541 0.54271 6.68722 -0.01887 0.55980 6.76038 -0.00961 0.58489 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05699 -0.03667 -0.06610 0.22428 -0.09506 -0.17709 0.44510 -0.15322 -0.29684 0.67141 -0.19685 -0.40336 0.90049 -0.22896 -0.48415 1.12996 -0.25806 -0.54834 1.36532 -0.28191 -0.60396 1.59436 -0.29792 -0.65056 1.81634 -0.30794 -0.69029 2.04832 -0.31466 -0.72690 2.30048 -0.31881 -0.75921 2.56874 -0.31742 -0.77055 2.82154 -0.30922 -0.75665 3.06616 -0.29865 -0.73372 3.31496 -0.28576 -0.69993 3.56610 -0.27025 -0.65206 3.81913 -0.25143 -0.58521 4.06667 -0.23001 -0.50074 4.30640 -0.20717 -0.40256 4.53868 -0.18391 -0.29262 4.76193 -0.16162 -0.17266 4.97429 -0.14146 -0.04696 5.17906 -0.12432 0.07624 5.38465 -0.11166 0.19135 5.59782 -0.10594 0.29420 5.80964 -0.10811 0.37429 6.00843 -0.10780 0.43190 6.17511 -0.09724 0.46901 6.18099 -0.09701 0.47113 6.19137 -0.09789 0.47487 6.24827 -0.08863 0.48456 6.32143 -0.07911 0.49593 6.39459 -0.06762 0.51119 6.46774 -0.05775 0.52461 6.54090 -0.04818 0.53759 6.61406 -0.03817 0.54962 6.68722 -0.02806 0.56392 6.76038 -0.01436 0.58713 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05719 -0.04818 -0.06177 0.22484 -0.12990 -0.16843 0.44638 -0.21135 -0.28294 0.67368 -0.26595 -0.37849 0.90354 -0.30481 -0.45056 1.13342 -0.34377 -0.51117 1.36865 -0.37634 -0.56431 1.59817 -0.39745 -0.60826 1.82134 -0.40949 -0.64500 2.05379 -0.41638 -0.67818 2.30457 -0.41952 -0.70696 2.56975 -0.41549 -0.71590 2.82079 -0.40200 -0.70017 3.06428 -0.38524 -0.67566 3.31133 -0.36592 -0.64125 3.56017 -0.34410 -0.59437 3.81062 -0.31931 -0.53091 4.05615 -0.29227 -0.45172 4.29470 -0.26372 -0.35951 4.52624 -0.23410 -0.25502 4.74869 -0.20419 -0.13851 4.96037 -0.17584 -0.01424 5.16539 -0.15173 0.10792 5.37190 -0.13486 0.22145 5.58575 -0.12831 0.32229 5.79983 -0.13359 0.40056 6.00317 -0.13602 0.45594 6.17511 -0.12753 0.49258 6.18099 -0.12793 0.49453 6.19137 -0.12894 0.49796 6.24827 -0.11736 0.50406 6.32143 -0.10456 0.51242 6.39459 -0.09023 0.52434 6.46774 -0.07726 0.53532 6.54090 -0.06451 0.54626 6.61406 -0.05098 0.55644 6.68722 -0.03700 0.56854 6.76038 -0.01906 0.58948 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05731 -0.07154 -0.05922 0.22562 -0.17489 -0.15646 0.44858 -0.27117 -0.25901 0.67697 -0.33375 -0.34235 0.90759 -0.38021 -0.40584 1.13810 -0.42872 -0.46088 1.37327 -0.46909 -0.50943 1.60346 -0.49423 -0.54949 1.82822 -0.50705 -0.58276 2.06119 -0.51266 -0.61240 2.31001 -0.51319 -0.63766 2.57107 -0.50500 -0.64444 2.81983 -0.48496 -0.62806 3.06193 -0.46099 -0.60348 3.30692 -0.43452 -0.56999 3.55310 -0.40610 -0.52546 3.80048 -0.37562 -0.46625 4.04351 -0.34369 -0.39284 4.28050 -0.31058 -0.30727 4.51135 -0.27609 -0.21000 4.73409 -0.24029 -0.10081 4.94666 -0.20561 0.01798 5.15222 -0.17590 0.13842 5.35988 -0.15481 0.24983 5.57426 -0.14754 0.34904 5.78950 -0.15455 0.42822 5.99742 -0.16111 0.48223 6.17511 -0.15659 0.51767 6.18099 -0.15757 0.51940 6.19137 -0.15891 0.52245 6.24827 -0.14546 0.52446 6.32143 -0.12969 0.52940 6.39459 -0.11288 0.53739 6.46774 -0.09701 0.54560 6.54090 -0.08108 0.55446 6.61406 -0.06387 0.56309 6.68722 -0.04566 0.57366 6.76038 -0.02367 0.59201 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05796 -0.08840 -0.04520 0.22733 -0.21477 -0.13012 0.45187 -0.33130 -0.22322 0.68126 -0.40215 -0.29524 0.91282 -0.45337 -0.34815 1.14424 -0.50929 -0.39490 1.37938 -0.55580 -0.43676 1.61044 -0.58369 -0.47202 1.83717 -0.59597 -0.50180 2.07064 -0.59884 -0.52838 2.31682 -0.59528 -0.55088 2.57271 -0.58177 -0.55656 2.81868 -0.55475 -0.54144 3.05919 -0.52342 -0.51892 3.30187 -0.48992 -0.48839 3.54514 -0.45517 -0.44790 3.78918 -0.41942 -0.39416 4.02945 -0.38327 -0.32729 4.26464 -0.34666 -0.24894 4.49460 -0.30908 -0.15938 4.71754 -0.27020 -0.05812 4.93153 -0.23212 0.05355 5.13913 -0.19842 0.16876 5.34825 -0.17332 0.27730 5.56275 -0.16395 0.37582 5.77881 -0.17167 0.45686 5.99113 -0.18308 0.51104 6.17511 -0.18482 0.54369 6.18099 -0.18607 0.54525 6.19137 -0.18798 0.54800 6.24827 -0.17299 0.54564 6.32143 -0.15462 0.54668 6.39459 -0.13560 0.55034 6.46774 -0.11702 0.55534 6.54090 -0.09794 0.56204 6.61406 -0.07688 0.56950 6.68722 -0.05412 0.57913 6.76038 -0.02808 0.59487 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05850 -0.10685 -0.03370 0.22937 -0.25332 -0.09871 0.45652 -0.38710 -0.17258 0.68698 -0.46627 -0.23243 0.91936 -0.52145 -0.27611 1.15190 -0.58103 -0.31252 1.38707 -0.62979 -0.34532 1.61920 -0.65805 -0.37477 1.84825 -0.66860 -0.40150 2.08212 -0.66814 -0.42634 2.32491 -0.66020 -0.44777 2.57461 -0.64120 -0.45408 2.81736 -0.60780 -0.44240 3.05612 -0.57009 -0.42426 3.29633 -0.53066 -0.39882 3.53653 -0.49067 -0.36413 3.77708 -0.45057 -0.31701 4.01442 -0.41100 -0.25731 4.24765 -0.37185 -0.18644 4.47655 -0.33273 -0.10484 4.69968 -0.29337 -0.01203 4.91532 -0.25494 0.09163 5.12534 -0.21910 0.20072 5.33620 -0.19003 0.30575 5.55092 -0.17768 0.40337 5.76779 -0.18571 0.48639 5.98418 -0.20103 0.54282 6.17511 -0.21204 0.57076 6.18099 -0.21391 0.57205 6.19137 -0.21636 0.57432 6.24827 -0.20003 0.56742 6.32143 -0.17940 0.56416 6.39459 -0.15837 0.56320 6.46774 -0.13729 0.56456 6.54090 -0.11507 0.56900 6.61406 -0.09002 0.57566 6.68722 -0.06239 0.58486 6.76038 -0.03216 0.59817 6.83354 0.00000 0.61392 0.00000 0.00000 0.00000 0.05918 -0.12167 -0.01906 0.23201 -0.28255 -0.05808 0.46255 -0.43089 -0.10707 0.69414 -0.51969 -0.15381 0.92732 -0.57765 -0.18834 1.16111 -0.63573 -0.21353 1.39621 -0.68174 -0.23662 1.62950 -0.70779 -0.26033 1.86113 -0.71617 -0.28494 2.09525 -0.71311 -0.30955 2.33401 -0.70213 -0.33169 2.57671 -0.67892 -0.34046 2.81593 -0.64095 -0.33422 3.05282 -0.59896 -0.32240 3.29045 -0.55567 -0.30378 3.52752 -0.51225 -0.27631 3.76451 -0.46917 -0.23682 3.99887 -0.42714 -0.18483 4.23003 -0.38633 -0.12164 4.45769 -0.34693 -0.04783 4.68071 -0.30936 0.03689 4.89780 -0.27337 0.13283 5.11030 -0.23709 0.23555 5.32325 -0.20399 0.33632 5.53855 -0.18905 0.43216 5.75613 -0.19438 0.51760 5.97671 -0.21655 0.57700 6.17511 -0.23920 0.59790 6.18099 -0.24745 0.60590 6.19137 -0.24422 0.60120 6.24827 -0.22671 0.58967 6.32143 -0.20408 0.58179 6.39459 -0.18119 0.57597 6.46774 -0.15776 0.57331 6.54090 -0.13244 0.57536 6.61406 -0.10329 0.58155 6.68722 -0.07054 0.59077 6.76038 -0.03578 0.60198 6.83354 0.00000 0.61392 #NETWORK = TAIL-HOR-TOP 14 6 NEW 6.17511 0.26004 0.62973 6.18099 0.26000 0.64191 6.19137 0.26000 0.64915 6.24827 0.26000 0.66170 6.32143 0.26000 0.66657 6.39459 0.26000 0.66891 6.46774 0.26000 0.66993 6.54090 0.26000 0.66924 6.61406 0.26000 0.66597 6.68722 0.26000 0.66015 6.76038 0.26000 0.65264 6.83354 0.26000 0.64425 6.90669 0.26000 0.63594 6.98798 0.26000 0.62961 6.38421 0.41000 0.62961 6.38885 0.41000 0.63805 6.39675 0.41000 0.64272 6.44061 0.41000 0.65063 6.49700 0.41000 0.65333 6.55340 0.41000 0.65454 6.60980 0.41000 0.65505 6.66619 0.41000 0.65460 6.72259 0.41000 0.65261 6.77899 0.41000 0.64903 6.83538 0.41000 0.64435 6.89178 0.41000 0.63905 6.94817 0.41000 0.63373 7.01084 0.41000 0.62961 6.56300 0.56000 0.62961 6.56655 0.56000 0.63612 6.57261 0.56000 0.63972 6.60626 0.56000 0.64583 6.64953 0.56000 0.64794 6.69279 0.56000 0.64888 6.73605 0.56000 0.64928 6.77932 0.56000 0.64893 6.82258 0.56000 0.64739 6.86585 0.56000 0.64462 6.90911 0.56000 0.64100 6.95238 0.56000 0.63690 6.99564 0.56000 0.63279 7.04371 0.56000 0.62961 6.73079 0.71000 0.62961 6.73340 0.71000 0.63485 6.73795 0.71000 0.63788 6.76301 0.71000 0.64311 6.79523 0.71000 0.64507 6.82745 0.71000 0.64600 6.85967 0.71000 0.64640 6.89189 0.71000 0.64611 6.92411 0.71000 0.64476 6.95633 0.71000 0.64236 6.98855 0.71000 0.63924 7.02077 0.71000 0.63574 7.05299 0.71000 0.63227 7.08879 0.71000 0.62961 6.90092 0.86000 0.62961 6.90271 0.86000 0.63340 6.90587 0.86000 0.63564 6.92317 0.86000 0.63953 6.94542 0.86000 0.64106 6.96766 0.86000 0.64180 6.98990 0.86000 0.64212 7.01215 0.86000 0.64191 7.03440 0.86000 0.64089 7.05664 0.86000 0.63908 7.07889 0.86000 0.63675 7.10113 0.86000 0.63415 7.12338 0.86000 0.63157 7.14809 0.86000 0.62961 7.01919 0.96248 0.62961 7.03301 0.97333 0.63213 7.04227 0.97952 0.63349 7.06921 0.99353 0.63551 7.09119 1.00123 0.63608 7.10864 1.00528 0.63630 7.12385 1.00742 0.63637 7.13775 1.00834 0.63622 7.15080 1.00834 0.63568 7.16385 1.00834 0.63471 7.17690 1.00834 0.63347 7.18995 1.00834 0.63207 7.20300 1.00834 0.63068 7.21310 0.99936 0.62961 7.01919 -0.96248 0.62961 7.03301 -0.97333 0.63213 7.04227 -0.97952 0.63349 7.06921 -0.99353 0.63551 7.09119 -1.00123 0.63608 7.10864 -1.00528 0.63630 7.12385 -1.00742 0.63637 7.13775 -1.00834 0.63622 7.15080 -1.00834 0.63568 7.16385 -1.00834 0.63471 7.17690 -1.00834 0.63347 7.18995 -1.00834 0.63207 7.20300 -1.00834 0.63068 7.21310 -0.99936 0.62961 6.90092 -0.86000 0.62961 6.90271 -0.86000 0.63340 6.90587 -0.86000 0.63564 6.92317 -0.86000 0.63953 6.94542 -0.86000 0.64106 6.96766 -0.86000 0.64180 6.98990 -0.86000 0.64212 7.01215 -0.86000 0.64191 7.03440 -0.86000 0.64089 7.05664 -0.86000 0.63908 7.07889 -0.86000 0.63675 7.10113 -0.86000 0.63415 7.12338 -0.86000 0.63157 7.14809 -0.86000 0.62961 6.73079 -0.71000 0.62961 6.73340 -0.71000 0.63485 6.73795 -0.71000 0.63788 6.76301 -0.71000 0.64311 6.79523 -0.71000 0.64507 6.82745 -0.71000 0.64600 6.85967 -0.71000 0.64640 6.89189 -0.71000 0.64611 6.92411 -0.71000 0.64476 6.95633 -0.71000 0.64236 6.98855 -0.71000 0.63924 7.02077 -0.71000 0.63574 7.05299 -0.71000 0.63227 7.08879 -0.71000 0.62961 6.56300 -0.56000 0.62961 6.56655 -0.56000 0.63612 6.57261 -0.56000 0.63972 6.60626 -0.56000 0.64583 6.64953 -0.56000 0.64794 6.69279 -0.56000 0.64888 6.73605 -0.56000 0.64928 6.77932 -0.56000 0.64893 6.82258 -0.56000 0.64739 6.86585 -0.56000 0.64462 6.90911 -0.56000 0.64100 6.95238 -0.56000 0.63690 6.99564 -0.56000 0.63279 7.04371 -0.56000 0.62961 6.38421 -0.41000 0.62961 6.38885 -0.41000 0.63805 6.39675 -0.41000 0.64272 6.44061 -0.41000 0.65063 6.49700 -0.41000 0.65333 6.55340 -0.41000 0.65454 6.60980 -0.41000 0.65505 6.66619 -0.41000 0.65460 6.72259 -0.41000 0.65261 6.77899 -0.41000 0.64903 6.83538 -0.41000 0.64435 6.89178 -0.41000 0.63905 6.94817 -0.41000 0.63373 7.01084 -0.41000 0.62961 6.17511 -0.26004 0.62973 6.18099 -0.26000 0.64191 6.19137 -0.26000 0.64915 6.24827 -0.26000 0.66170 6.32143 -0.26000 0.66657 6.39459 -0.26000 0.66891 6.46774 -0.26000 0.66993 6.54090 -0.26000 0.66924 6.61406 -0.26000 0.66597 6.68722 -0.26000 0.66015 6.76038 -0.26000 0.65264 6.83354 -0.26000 0.64425 6.90669 -0.26000 0.63594 6.98798 -0.26000 0.62961 #NETWORK = TAIL-HOR-BOT 14 6 NEW 7.01919 0.96248 0.62961 7.03301 0.97333 0.62709 7.04227 0.97952 0.62574 7.06921 0.99353 0.62372 7.09119 1.00123 0.62315 7.10864 1.00528 0.62293 7.12385 1.00742 0.62285 7.13775 1.00834 0.62301 7.15080 1.00834 0.62355 7.16385 1.00834 0.62451 7.17690 1.00834 0.62576 7.18995 1.00834 0.62716 7.20300 1.00834 0.62855 7.21310 0.99936 0.62961 6.90092 0.86000 0.62961 6.90271 0.86000 0.62582 6.90587 0.86000 0.62358 6.92317 0.86000 0.61969 6.94542 0.86000 0.61816 6.96766 0.86000 0.61743 6.98990 0.86000 0.61710 7.01215 0.86000 0.61732 7.03440 0.86000 0.61834 7.05664 0.86000 0.62015 7.07889 0.86000 0.62248 7.10113 0.86000 0.62508 7.12338 0.86000 0.62765 7.14809 0.86000 0.62961 6.73079 0.71000 0.62961 6.73340 0.71000 0.62437 6.73795 0.71000 0.62134 6.76301 0.71000 0.61612 6.79523 0.71000 0.61415 6.82745 0.71000 0.61322 6.85967 0.71000 0.61282 6.89189 0.71000 0.61311 6.92411 0.71000 0.61446 6.95633 0.71000 0.61687 6.98855 0.71000 0.61999 7.02077 0.71000 0.62348 7.05299 0.71000 0.62696 7.08879 0.71000 0.62961 6.56300 0.56000 0.62961 6.56655 0.56000 0.62311 6.57261 0.56000 0.61951 6.60626 0.56000 0.61339 6.64953 0.56000 0.61129 6.69279 0.56000 0.61034 6.73605 0.56000 0.60995 6.77932 0.56000 0.61030 6.82258 0.56000 0.61183 6.86585 0.56000 0.61460 6.90911 0.56000 0.61823 6.95238 0.56000 0.62232 6.99564 0.56000 0.62644 7.04371 0.56000 0.62961 6.38421 0.41000 0.62961 6.38885 0.41000 0.62117 6.39675 0.41000 0.61651 6.44061 0.41000 0.60860 6.49700 0.41000 0.60590 6.55340 0.41000 0.60468 6.60980 0.41000 0.60418 6.66619 0.41000 0.60463 6.72259 0.41000 0.60661 6.77899 0.41000 0.61019 6.83538 0.41000 0.61488 6.89178 0.41000 0.62018 6.94817 0.41000 0.62550 7.01084 0.41000 0.62961 6.17511 0.26004 0.62973 6.18099 0.26000 0.61731 6.19137 0.26000 0.61007 6.24827 0.26000 0.59752 6.32143 0.26000 0.59266 6.39459 0.26000 0.59031 6.46774 0.26000 0.58930 6.54090 0.26000 0.58998 6.61406 0.26000 0.59326 6.68722 0.26000 0.59908 6.76038 0.26000 0.60659 6.83354 0.26000 0.61497 6.90669 0.26000 0.62328 6.98798 0.26000 0.62961 6.17511 -0.26004 0.62973 6.18099 -0.26000 0.61731 6.19137 -0.26000 0.61007 6.24827 -0.26000 0.59752 6.32143 -0.26000 0.59266 6.39459 -0.26000 0.59031 6.46774 -0.26000 0.58930 6.54090 -0.26000 0.58998 6.61406 -0.26000 0.59326 6.68722 -0.26000 0.59908 6.76038 -0.26000 0.60659 6.83354 -0.26000 0.61497 6.90669 -0.26000 0.62328 6.98798 -0.26000 0.62961 6.38421 -0.41000 0.62961 6.38885 -0.41000 0.62117 6.39675 -0.41000 0.61651 6.44061 -0.41000 0.60860 6.49700 -0.41000 0.60590 6.55340 -0.41000 0.60468 6.60980 -0.41000 0.60418 6.66619 -0.41000 0.60463 6.72259 -0.41000 0.60661 6.77899 -0.41000 0.61019 6.83538 -0.41000 0.61488 6.89178 -0.41000 0.62018 6.94817 -0.41000 0.62550 7.01084 -0.41000 0.62961 6.56300 -0.56000 0.62961 6.56655 -0.56000 0.62311 6.57261 -0.56000 0.61951 6.60626 -0.56000 0.61339 6.64953 -0.56000 0.61129 6.69279 -0.56000 0.61034 6.73605 -0.56000 0.60995 6.77932 -0.56000 0.61030 6.82258 -0.56000 0.61183 6.86585 -0.56000 0.61460 6.90911 -0.56000 0.61823 6.95238 -0.56000 0.62232 6.99564 -0.56000 0.62644 7.04371 -0.56000 0.62961 6.73079 -0.71000 0.62961 6.73340 -0.71000 0.62437 6.73795 -0.71000 0.62134 6.76301 -0.71000 0.61612 6.79523 -0.71000 0.61415 6.82745 -0.71000 0.61322 6.85967 -0.71000 0.61282 6.89189 -0.71000 0.61311 6.92411 -0.71000 0.61446 6.95633 -0.71000 0.61687 6.98855 -0.71000 0.61999 7.02077 -0.71000 0.62348 7.05299 -0.71000 0.62696 7.08879 -0.71000 0.62961 6.90092 -0.86000 0.62961 6.90271 -0.86000 0.62582 6.90587 -0.86000 0.62358 6.92317 -0.86000 0.61969 6.94542 -0.86000 0.61816 6.96766 -0.86000 0.61743 6.98990 -0.86000 0.61710 7.01215 -0.86000 0.61732 7.03440 -0.86000 0.61834 7.05664 -0.86000 0.62015 7.07889 -0.86000 0.62248 7.10113 -0.86000 0.62508 7.12338 -0.86000 0.62765 7.14809 -0.86000 0.62961 7.01919 -0.96248 0.62961 7.03301 -0.97333 0.62709 7.04227 -0.97952 0.62574 7.06921 -0.99353 0.62372 7.09119 -1.00123 0.62315 7.10864 -1.00528 0.62293 7.12385 -1.00742 0.62285 7.13775 -1.00834 0.62301 7.15080 -1.00834 0.62355 7.16385 -1.00834 0.62451 7.17690 -1.00834 0.62576 7.18995 -1.00834 0.62716 7.20300 -1.00834 0.62855 7.21310 -0.99936 0.62961 #NETWORK = FIN-TOP 11 9 NEW 2.24615 0.71820 -0.13168 2.24387 0.71497 -0.10853 2.24763 0.71048 -0.08568 2.27537 0.69807 -0.04680 2.31275 0.68550 -0.01921 2.37698 0.67457 -0.00777 2.46527 0.67321 -0.03080 2.55370 0.67196 -0.06271 2.62820 0.66760 -0.08700 2.69273 0.66480 -0.11317 2.74057 0.66409 -0.13415 2.28218 0.74450 -0.13927 2.28533 0.74432 -0.12346 2.29482 0.74378 -0.10921 2.33165 0.74169 -0.08727 2.38888 0.73843 -0.07666 2.46068 0.73435 -0.07792 2.53984 0.72985 -0.08834 2.61836 0.72539 -0.10362 2.68903 0.72137 -0.11972 2.74488 0.71819 -0.13384 2.77891 0.71626 -0.14845 2.30791 0.77078 -0.14718 2.31114 0.77078 -0.13419 2.32086 0.77078 -0.12266 2.35857 0.77078 -0.10556 2.41692 0.77078 -0.09846 2.48970 0.77078 -0.10147 2.56932 0.77078 -0.11197 2.64772 0.77078 -0.12615 2.71760 0.77078 -0.14069 2.77231 0.77078 -0.15317 2.81899 0.77078 -0.16558 2.40989 0.92121 -0.19241 2.41294 0.92121 -0.18419 2.42169 0.92121 -0.17693 2.45510 0.92121 -0.16615 2.50650 0.92121 -0.16169 2.57029 0.92121 -0.16400 2.63982 0.92121 -0.17184 2.70865 0.92121 -0.18283 2.76832 0.92121 -0.19470 2.81508 0.92121 -0.20513 2.84978 0.92121 -0.21607 2.49810 1.06814 -0.23659 2.50090 1.06814 -0.22916 2.50878 1.06814 -0.22266 2.53867 1.06814 -0.21318 2.58451 1.06814 -0.20954 2.64127 1.06814 -0.21225 2.70308 1.06814 -0.22024 2.76389 1.06814 -0.23139 2.81740 1.06814 -0.24336 2.85947 1.06814 -0.25397 2.89601 1.06814 -0.26465 2.58593 1.19765 -0.27553 2.58804 1.19765 -0.26806 2.59508 1.19765 -0.26157 2.62329 1.19765 -0.25222 2.66752 1.19765 -0.24888 2.72354 1.19765 -0.25203 2.78557 1.19765 -0.26050 2.84499 1.19765 -0.27190 2.90032 1.19765 -0.28340 2.94488 1.19765 -0.29332 2.98342 1.19765 -0.30305 2.71387 1.31328 -0.31030 2.71617 1.31328 -0.30360 2.72379 1.31328 -0.29784 2.75400 1.31328 -0.28986 2.80014 1.31328 -0.28751 2.85587 1.31328 -0.29055 2.91487 1.31328 -0.29727 2.97499 1.31328 -0.30547 3.02754 1.31328 -0.31354 3.06386 1.31328 -0.32018 3.09374 1.31328 -0.32660 2.82952 1.37861 -0.32995 2.83407 1.37861 -0.32537 2.84273 1.37861 -0.32141 2.86992 1.37861 -0.31579 2.90864 1.37861 -0.31380 2.95397 1.37861 -0.31526 3.00267 1.37861 -0.31911 3.05884 1.37861 -0.32403 3.10634 1.37861 -0.32905 3.13322 1.37861 -0.33326 3.15559 1.37861 -0.33743 3.03700 1.43000 -0.34540 3.03803 1.43000 -0.34314 3.04109 1.43000 -0.34108 3.05295 1.43000 -0.33771 3.07142 1.43000 -0.33576 3.09470 1.43000 -0.33545 3.12050 1.43000 -0.33656 3.14630 1.43000 -0.33857 3.16958 1.43000 -0.34091 3.18805 1.43000 -0.34308 3.20400 1.43000 -0.34540 3.03700 -1.43000 -0.34540 3.03803 -1.43000 -0.34314 3.04109 -1.43000 -0.34108 3.05295 -1.43000 -0.33771 3.07142 -1.43000 -0.33576 3.09470 -1.43000 -0.33545 3.12050 -1.43000 -0.33656 3.14630 -1.43000 -0.33857 3.16958 -1.43000 -0.34091 3.18805 -1.43000 -0.34308 3.20400 -1.43000 -0.34540 2.82952 -1.37861 -0.32995 2.83407 -1.37861 -0.32537 2.84273 -1.37861 -0.32141 2.86992 -1.37861 -0.31579 2.90864 -1.37861 -0.31380 2.95397 -1.37861 -0.31526 3.00267 -1.37861 -0.31911 3.05884 -1.37861 -0.32403 3.10634 -1.37861 -0.32905 3.13322 -1.37861 -0.33326 3.15559 -1.37861 -0.33743 2.71387 -1.31328 -0.31030 2.71617 -1.31328 -0.30360 2.72379 -1.31328 -0.29784 2.75400 -1.31328 -0.28986 2.80014 -1.31328 -0.28751 2.85587 -1.31328 -0.29055 2.91487 -1.31328 -0.29727 2.97499 -1.31328 -0.30547 3.02754 -1.31328 -0.31354 3.06386 -1.31328 -0.32018 3.09374 -1.31328 -0.32660 2.58593 -1.19765 -0.27553 2.58804 -1.19765 -0.26806 2.59508 -1.19765 -0.26157 2.62329 -1.19765 -0.25222 2.66752 -1.19765 -0.24888 2.72354 -1.19765 -0.25203 2.78557 -1.19765 -0.26050 2.84499 -1.19765 -0.27190 2.90032 -1.19765 -0.28340 2.94488 -1.19765 -0.29332 2.98342 -1.19765 -0.30305 2.49810 -1.06814 -0.23659 2.50090 -1.06814 -0.22916 2.50878 -1.06814 -0.22266 2.53867 -1.06814 -0.21318 2.58451 -1.06814 -0.20954 2.64127 -1.06814 -0.21225 2.70308 -1.06814 -0.22024 2.76389 -1.06814 -0.23139 2.81740 -1.06814 -0.24336 2.85947 -1.06814 -0.25397 2.89601 -1.06814 -0.26465 2.40989 -0.92121 -0.19241 2.41294 -0.92121 -0.18419 2.42169 -0.92121 -0.17693 2.45510 -0.92121 -0.16615 2.50650 -0.92121 -0.16169 2.57029 -0.92121 -0.16400 2.63982 -0.92121 -0.17184 2.70865 -0.92121 -0.18283 2.76832 -0.92121 -0.19470 2.81508 -0.92121 -0.20513 2.84978 -0.92121 -0.21607 2.30791 -0.77078 -0.14718 2.31114 -0.77078 -0.13419 2.32086 -0.77078 -0.12266 2.35857 -0.77078 -0.10556 2.41692 -0.77078 -0.09846 2.48970 -0.77078 -0.10147 2.56932 -0.77078 -0.11197 2.64772 -0.77078 -0.12615 2.71760 -0.77078 -0.14069 2.77231 -0.77078 -0.15317 2.81899 -0.77078 -0.16558 2.28218 -0.74450 -0.13927 2.28533 -0.74432 -0.12346 2.29482 -0.74378 -0.10921 2.33165 -0.74169 -0.08727 2.38888 -0.73843 -0.07666 2.46068 -0.73435 -0.07792 2.53984 -0.72985 -0.08834 2.61836 -0.72539 -0.10362 2.68903 -0.72137 -0.11972 2.74488 -0.71819 -0.13384 2.77891 -0.71626 -0.14845 2.24615 -0.71820 -0.13168 2.24387 -0.71497 -0.10853 2.24763 -0.71048 -0.08568 2.27537 -0.69807 -0.04680 2.31275 -0.68550 -0.01921 2.37698 -0.67457 -0.00777 2.46527 -0.67321 -0.03080 2.55370 -0.67196 -0.06271 2.62820 -0.66760 -0.08700 2.69273 -0.66480 -0.11317 2.74057 -0.66409 -0.13415 #NETWORK = FIN-BOT 11 9 NEW 3.03700 1.43000 -0.34540 3.03803 1.43000 -0.34766 3.04109 1.43000 -0.34972 3.05295 1.43000 -0.35309 3.07142 1.43000 -0.35504 3.09470 1.43000 -0.35535 3.12050 1.43000 -0.35424 3.14630 1.43000 -0.35223 3.16958 1.43000 -0.34989 3.18805 1.43000 -0.34772 3.20400 1.43000 -0.34540 2.82952 1.37861 -0.32995 2.83407 1.37861 -0.33469 2.84273 1.37861 -0.33913 2.86992 1.37861 -0.34648 2.90864 1.37861 -0.35082 2.95397 1.37861 -0.35186 3.00267 1.37861 -0.35030 3.05884 1.37861 -0.34727 3.10634 1.37861 -0.34404 3.13322 1.37861 -0.34084 3.15559 1.37861 -0.33743 2.71387 1.31328 -0.31030 2.71617 1.31328 -0.31732 2.72379 1.31328 -0.32401 2.75400 1.31328 -0.33544 2.80014 1.31328 -0.34270 2.85587 1.31328 -0.34508 2.91487 1.31328 -0.34349 2.97499 1.31328 -0.33964 3.02754 1.31328 -0.33539 3.06386 1.31328 -0.33117 3.09374 1.31328 -0.32660 2.58593 1.19765 -0.27553 2.58804 1.19765 -0.28337 2.59508 1.19765 -0.29093 2.62329 1.19765 -0.30446 2.66752 1.19765 -0.31439 2.72354 1.19765 -0.31959 2.78557 1.19765 -0.32030 2.84499 1.19765 -0.31774 2.90032 1.19765 -0.31274 2.94488 1.19765 -0.30833 2.98342 1.19765 -0.30305 2.49810 1.06814 -0.23659 2.50090 1.06814 -0.24433 2.50878 1.06814 -0.25176 2.53867 1.06814 -0.26488 2.58451 1.06814 -0.27428 2.64127 1.06814 -0.27904 2.70308 1.06814 -0.27960 2.76389 1.06814 -0.27731 2.81740 1.06814 -0.27361 2.85947 1.06814 -0.26962 2.89601 1.06814 -0.26465 2.40989 0.92121 -0.19241 2.41294 0.92121 -0.20089 2.42169 0.92121 -0.20890 2.45510 0.92121 -0.22265 2.50650 0.92121 -0.23183 2.57029 0.92121 -0.23561 2.63982 0.92121 -0.23474 2.70865 0.92121 -0.23094 2.76832 0.92121 -0.22618 2.81508 0.92121 -0.22131 2.84978 0.92121 -0.21607 2.30791 0.77078 -0.14718 2.31114 0.77078 -0.16038 2.32086 0.77078 -0.17256 2.35857 0.77078 -0.19217 2.41692 0.77078 -0.20320 2.48970 0.77078 -0.20517 2.56932 0.77078 -0.20028 2.64772 0.77078 -0.19178 2.71760 0.77078 -0.18246 2.77231 0.77078 -0.17425 2.81899 0.77078 -0.16558 2.28218 0.74450 -0.13927 2.28533 0.74432 -0.15521 2.29482 0.74378 -0.16979 2.33165 0.74169 -0.19302 2.38888 0.73843 -0.20562 2.46068 0.73435 -0.20684 2.53984 0.72985 -0.19917 2.61836 0.72539 -0.18665 2.68903 0.72137 -0.17295 2.74488 0.71819 -0.16081 2.77891 0.71626 -0.14845 2.24615 0.71820 -0.13168 2.25215 0.72039 -0.15308 2.26291 0.72131 -0.17195 2.30310 0.71949 -0.20042 2.36037 0.71527 -0.21534 2.43162 0.70907 -0.21628 2.50850 0.70087 -0.20655 2.58262 0.69079 -0.19056 2.64672 0.67976 -0.17199 2.69790 0.67122 -0.15393 2.74057 0.66409 -0.13415 2.24615 -0.71820 -0.13168 2.25215 -0.72039 -0.15308 2.26291 -0.72131 -0.17195 2.30310 -0.71949 -0.20042 2.36037 -0.71527 -0.21534 2.43162 -0.70907 -0.21628 2.50850 -0.70087 -0.20655 2.58262 -0.69079 -0.19056 2.64672 -0.67976 -0.17199 2.69790 -0.67122 -0.15393 2.74057 -0.66409 -0.13415 2.28218 -0.74450 -0.13927 2.28533 -0.74432 -0.15521 2.29482 -0.74378 -0.16979 2.33165 -0.74169 -0.19302 2.38888 -0.73843 -0.20562 2.46068 -0.73435 -0.20684 2.53984 -0.72985 -0.19917 2.61836 -0.72539 -0.18665 2.68903 -0.72137 -0.17295 2.74488 -0.71819 -0.16081 2.77891 -0.71626 -0.14845 2.30791 -0.77078 -0.14718 2.31114 -0.77078 -0.16038 2.32086 -0.77078 -0.17256 2.35857 -0.77078 -0.19217 2.41692 -0.77078 -0.20320 2.48970 -0.77078 -0.20517 2.56932 -0.77078 -0.20028 2.64772 -0.77078 -0.19178 2.71760 -0.77078 -0.18246 2.77231 -0.77078 -0.17425 2.81899 -0.77078 -0.16558 2.40989 -0.92121 -0.19241 2.41294 -0.92121 -0.20089 2.42169 -0.92121 -0.20890 2.45510 -0.92121 -0.22265 2.50650 -0.92121 -0.23183 2.57029 -0.92121 -0.23561 2.63982 -0.92121 -0.23474 2.70865 -0.92121 -0.23094 2.76832 -0.92121 -0.22618 2.81508 -0.92121 -0.22131 2.84978 -0.92121 -0.21607 2.49810 -1.06814 -0.23659 2.50090 -1.06814 -0.24433 2.50878 -1.06814 -0.25176 2.53867 -1.06814 -0.26488 2.58451 -1.06814 -0.27428 2.64127 -1.06814 -0.27904 2.70308 -1.06814 -0.27960 2.76389 -1.06814 -0.27731 2.81740 -1.06814 -0.27361 2.85947 -1.06814 -0.26962 2.89601 -1.06814 -0.26465 2.58593 -1.19765 -0.27553 2.58804 -1.19765 -0.28337 2.59508 -1.19765 -0.29093 2.62329 -1.19765 -0.30446 2.66752 -1.19765 -0.31439 2.72354 -1.19765 -0.31959 2.78557 -1.19765 -0.32030 2.84499 -1.19765 -0.31774 2.90032 -1.19765 -0.31274 2.94488 -1.19765 -0.30833 2.98342 -1.19765 -0.30305 2.71387 -1.31328 -0.31030 2.71617 -1.31328 -0.31732 2.72379 -1.31328 -0.32401 2.75400 -1.31328 -0.33544 2.80014 -1.31328 -0.34270 2.85587 -1.31328 -0.34508 2.91487 -1.31328 -0.34349 2.97499 -1.31328 -0.33964 3.02754 -1.31328 -0.33539 3.06386 -1.31328 -0.33117 3.09374 -1.31328 -0.32660 2.82952 -1.37861 -0.32995 2.83407 -1.37861 -0.33469 2.84273 -1.37861 -0.33913 2.86992 -1.37861 -0.34648 2.90864 -1.37861 -0.35082 2.95397 -1.37861 -0.35186 3.00267 -1.37861 -0.35030 3.05884 -1.37861 -0.34727 3.10634 -1.37861 -0.34404 3.13322 -1.37861 -0.34084 3.15559 -1.37861 -0.33743 3.03700 -1.43000 -0.34540 3.03803 -1.43000 -0.34766 3.04109 -1.43000 -0.34972 3.05295 -1.43000 -0.35309 3.07142 -1.43000 -0.35504 3.09470 -1.43000 -0.35535 3.12050 -1.43000 -0.35424 3.14630 -1.43000 -0.35223 3.16958 -1.43000 -0.34989 3.18805 -1.43000 -0.34772 3.20400 -1.43000 -0.34540 #NETWORK = TAIL-TIP 14 2 NEW 7.01919 0.96248 0.62961 7.03301 0.97333 0.63213 7.04227 0.97952 0.63349 7.06921 0.99353 0.63551 7.09119 1.00123 0.63608 7.10864 1.00528 0.63630 7.12385 1.00742 0.63637 7.13775 1.00834 0.63622 7.15080 1.00834 0.63568 7.16385 1.00834 0.63471 7.17690 1.00834 0.63347 7.18995 1.00834 0.63207 7.20300 1.00834 0.63068 7.21310 0.99936 0.62961 7.01919 0.96248 0.62961 7.03301 0.97333 0.62709 7.04227 0.97952 0.62574 7.06921 0.99353 0.62372 7.09119 1.00123 0.62315 7.10864 1.00528 0.62293 7.12385 1.00742 0.62285 7.13775 1.00834 0.62301 7.15080 1.00834 0.62355 7.16385 1.00834 0.62451 7.17690 1.00834 0.62576 7.18995 1.00834 0.62716 7.20300 1.00834 0.62855 7.21310 0.99936 0.62961 7.01919 -0.96248 0.62961 7.03301 -0.97333 0.62709 7.04227 -0.97952 0.62574 7.06921 -0.99353 0.62372 7.09119 -1.00123 0.62315 7.10864 -1.00528 0.62293 7.12385 -1.00742 0.62285 7.13775 -1.00834 0.62301 7.15080 -1.00834 0.62355 7.16385 -1.00834 0.62451 7.17690 -1.00834 0.62576 7.18995 -1.00834 0.62716 7.20300 -1.00834 0.62855 7.21310 -0.99936 0.62961 7.01919 -0.96248 0.62961 7.03301 -0.97333 0.63213 7.04227 -0.97952 0.63349 7.06921 -0.99353 0.63551 7.09119 -1.00123 0.63608 7.10864 -1.00528 0.63630 7.12385 -1.00742 0.63637 7.13775 -1.00834 0.63622 7.15080 -1.00834 0.63568 7.16385 -1.00834 0.63471 7.17690 -1.00834 0.63347 7.18995 -1.00834 0.63207 7.20300 -1.00834 0.63068 7.21310 -0.99936 0.62961 #NETWORK = FIN-TIP 11 2 NEW 3.03700 1.43000 -0.34540 3.03803 1.43000 -0.34314 3.04109 1.43000 -0.34108 3.05295 1.43000 -0.33771 3.07142 1.43000 -0.33576 3.09470 1.43000 -0.33545 3.12050 1.43000 -0.33656 3.14630 1.43000 -0.33857 3.16958 1.43000 -0.34091 3.18805 1.43000 -0.34308 3.20400 1.43000 -0.34540 3.03700 1.43000 -0.34540 3.03803 1.43000 -0.34766 3.04109 1.43000 -0.34972 3.05295 1.43000 -0.35309 3.07142 1.43000 -0.35504 3.09470 1.43000 -0.35535 3.12050 1.43000 -0.35424 3.14630 1.43000 -0.35223 3.16958 1.43000 -0.34989 3.18805 1.43000 -0.34772 3.20400 1.43000 -0.34540 3.03700 -1.43000 -0.34540 3.03803 -1.43000 -0.34766 3.04109 -1.43000 -0.34972 3.05295 -1.43000 -0.35309 3.07142 -1.43000 -0.35504 3.09470 -1.43000 -0.35535 3.12050 -1.43000 -0.35424 3.14630 -1.43000 -0.35223 3.16958 -1.43000 -0.34989 3.18805 -1.43000 -0.34772 3.20400 -1.43000 -0.34540 3.03700 -1.43000 -0.34540 3.03803 -1.43000 -0.34314 3.04109 -1.43000 -0.34108 3.05295 -1.43000 -0.33771 3.07142 -1.43000 -0.33576 3.09470 -1.43000 -0.33545 3.12050 -1.43000 -0.33656 3.14630 -1.43000 -0.33857 3.16958 -1.43000 -0.34091 3.18805 -1.43000 -0.34308 3.20400 -1.43000 -0.34540 gnuplot-4.6.4/demo/key.dem0000644000471100001440000001075511537570651012356 0ustar # Illustration of key positioning commands and concept. # # Dan Sebald, 7 nov 2004 # set key default set key box set key samplen .2 set multiplot layout 3,3 set key ins vert set key left top set title "Key (ins vert left top)" plot x,-x set key center top set title "Key (ins vert center top)" replot set key right set title "Key (ins vert right top)" replot set key center left set title "Key (ins vert center left)" replot set key cent set title "Key (inside vertical center)" replot set key right set title "Key (ins vert cent right)" replot set key bottom left set title "Key (ins vert bot left)" replot set key bot center set title "Key (ins vert bot center)" replot set key right set title "Key (ins vert bot right)" replot unset multiplot pause -1 "Hit return to continue" set multiplot layout 3,3 set key horiz set key left top set title "Key (ins horiz left top)" replot set key center top set title "Key (ins horiz center top)" replot set key right set title "Key (ins horiz right top)" replot set key center left set title "Key (ins horiz center left)" replot set key cent set title "Key (inside horizontal center)" replot set key right set title "Key (ins horiz cent right)" replot set key bottom left set title "Key (ins horiz bot left)" replot set key bot center set title "Key (ins horiz bot center)" replot set key right set title "Key (ins horiz bot right)" replot unset multiplot pause -1 "Hit return to continue" set multiplot layout 3,3 set key out vert set key left top set title "Key (out vert left top)" replot set key center top set title "Key (out vert center top)" replot set key right set title "Key (out vert right top)" replot set key center left set title "Key (out vert center left)" replot set key cent set title "Key (outside vertical center)" replot set key right set title "Key (out vert cent right)" replot set key bottom left set title "Key (out vert bot left)" replot set key bot center set title "Key (out vert bot center)" replot set key right set title "Key (out vert bot right)" replot unset multiplot pause -1 "Hit return to continue" set multiplot layout 3,3 set key horiz set key left top set title "Key (out horiz left top)" replot set key center top set title "Key (out horiz center top)" replot set key right set title "Key (out horiz right top)" replot set key center left set title "Key (out horiz center left)" replot set key cent set title "Key (outside horizontal center)" replot set key right set title "Key (out horiz cent right)" replot set key bottom left set title "Key (out horiz bot left)" replot set key bot center set title "Key (out horiz bot center)" replot set key right set title "Key (out horiz bot right)" replot unset multiplot pause -1 "Hit return to continue" set multiplot layout 3,3 set key vert set arrow 1 from -3,0 to 3,0 nohead lt -1 set arrow 2 from 0,-3 to 0,3 nohead lt -1 set key at 0,0 left top set title "Key ( vert left top)" replot set key at 0,0 center top set title "Key ( vert center top)" replot set key at 0,0 right set title "Key ( vert right top)" replot set key at 0,0 center left set title "Key ( vert center left)" replot set key at 0,0 cent set title "Key ( vertical center)" replot set key at 0,0 right set title "Key ( vert cent right)" replot set key at 0,0 bottom left set title "Key ( vert bot left)" replot set key at 0,0 bot center set title "Key ( vert bot center)" replot set key at 0,0 right set title "Key ( vert bot right)" replot unset multiplot pause -1 "Hit return to continue" set multiplot layout 3,3 set key horiz set arrow 1 from -3,0 to 3,0 nohead lt -1 set arrow 2 from 0,-3 to 0,3 nohead lt -1 set key at 0,0 left top set title "Key ( horiz left top)" set xrange [-5:15] replot set key at 0,0 center top set title "Key ( horiz center top)" set xrange [-10:10] replot set key at 0,0 right set title "Key ( horiz right top)" set xrange [-15:5] replot set key at 0,0 center left set title "Key ( horiz center left)" set xrange [-5:15] replot set key at 0,0 cent set title "Key ( horizontal center)" set xrange [-10:10] replot set key at 0,0 right set title "Key ( horiz cent right)" set xrange [-15:5] replot set key at 0,0 bottom left set title "Key ( horiz bot left)" set xrange [-5:15] replot set key at 0,0 bot center set title "Key ( horiz bot center)" set xrange [-10:10] replot set key at 0,0 right set title "Key ( horiz bot right)" set xrange [-15:5] replot unset multiplot pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/textcolor.dem0000644000471100001440000000430607744002175013600 0ustar # # $Id: textcolor.dem,v 1.2 2003/10/17 15:02:21 mikulik Exp $ # # Textcolor in 2D # reset # set title "Textcolor options in 2D plot (notice this title in color)" tc lt 1 set xrange [-2:2] set yrange [-2:2] # set label 11 "label with textcolor lt 1" at -1.5, 1.8 front nopoint tc lt 1 set label 10 "label with tc default" at -1.5, 1.6 front nopoint tc def set label 12 "label with tc lt 2" at -1.5, 1.4 front nopoint tc lt 2 set label 13 "label with tc lt 3" at -1.5, 1.2 front nopoint tc lt 3 # set xlabel 'color of xlabel should be lt 4' tc lt 4 set ylabel 'color of ylabel should still be black' # plot sin(x) # pause -1 "Hit return to continue" # # Textcolor in 3D (req. pm3d) # set title "Textcolor options in splot (notice this title in color)" tc lt 1 set samples 20; set isosamples 20 set autoscale set key box set pm3d at s set colorbox horiz user origin .1,.12 size .8,.015 set view 58, 64, 0.83 set xrange [-10:10] set yrange [-10:10] set zrange [-10:10] # # Test labels # set label 1 "textcolor palette z" at 12,-10,-10 nopoint tc pal z set label 3 "tc pal z" at 12, -6, -6 nopoint tc pal z set label 4 "tc pal z" at 12, -3, -3 nopoint tc pal z set label 5 "tc pal z" at 12, -0, 0 nopoint tc pal z set label 6 "tc pal z" at 12, 3, 3 nopoint tc pal z set label 7 "tc pal z" at 12, 6, 6 nopoint tc pal z set label 8 "tc pal z" at 12, 9, 9 nopoint tc pal z # set xlabel 'xlabel should be lt 4' tc lt 4 set cblabel 'color cblabel' textcolor lt 3 # set label 10 "textcolor lt 1" at -10,-8,24 front nopoint tc lt 1 set label 11 "tc lt 2" at -10,-8,21 front nopoint tc lt 2 set label 12 "tc lt 3" at -10,-8,18 front nopoint tc lt 3 set label 13 "textcolor default" at -10,-8,15 front nopoint tc def set label 14 "textcolor cb 5" at -10,-8,12 front nopoint tc pal cb 5 set label 15 "tc cb 0" at -10,-8,9 front nopoint tc pal cb 0 set label 16 "tc cb -5" at -10,-8,6 front nopoint tc pal cb -5 set label 17 "textcolor frac .75" at -10,-8,3 nopoint tc pal frac .75 set label 18 "tc frac .25" at -10,-8,0 nopoint tc pal frac .25 # set ylabel 'ylabel should still be black' #set zlabel 'zlabel should have yet another color' tc lt 2 # splot y # pause -1 "Hit return to continue" # reset gnuplot-4.6.4/demo/multipalette.dem0000644000471100001440000000062710633565012014263 0ustar # # Test case of multiplot containing more than one palette # (for debugging) # set pm3d map set multiplot layout 2,1 \ title "Test ability to display multiple palettes within a single multiplot" set title '10 gray levels' set palette gray set palette maxcolors 10 splot x*x set title '2 colors' set palette color set palette maxcolors 2 splot x unset multiplot pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/animate2.dem0000644000471100001440000000260211717043775013260 0ustar # # $Id: animate2.dem,v 1.1.6.1 2012/02/15 03:38:50 sfeam Exp $ # # demo for creating GIF animation and illustrating saving images to # file one pixel to one pixel # # A combination of what was animate.dem and world2.dem with the # addition of saving the rotated image to an animated GIF. # Requires GIF_ANIMATION # # History: # - 1. 3. 2006 Dan Sebald: 1st version # 07 Jan 2006 Ethan Merritt: Revise to assume terminal type is set by caller # # Caller must set terminal type. # Example of intended use: # set term gif animate transparent opt delay 10 size 200,200 background rgb 'black' unset title unset key unset xtics unset ytics unset ztics set border 0 set hidden3d nooffset set parametric set angles degrees set samples 64,64 set isosamples 13,13 set mapping spherical set dummy u,v set urange [ -90.0000 : 90.0000 ] noreverse nowriteback set vrange [ 0.00000 : 360.000 ] noreverse nowriteback set style data line # Defines for gnuplot.rot script limit_iterations=72 xrot=60 xrot_delta = 0 zrot=136 zrot_delta = 355 xview(xrot)=xrot zview(zrot)=zrot set view xview(xrot), zview(zrot), 2, 1 set size square splot cos(u)*cos(v),cos(u)*sin(v),sin(u) notitle with lines lt 5, \ 'world.dat' notitle with lines lt 2 lw 3 iteration_count=0 xrot =(xrot+xrot_delta)%360 zrot =(zrot+zrot_delta)%360 load "gnuplot.rot" pause -1 "Hit return to continue" reset print "End of animate2 demo..." gnuplot-4.6.4/demo/tics.dem0000644000471100001440000000170610274705563012523 0ustar # # $Id: tics.dem,v 1.1 2005/08/05 15:53:23 mikulik Exp $ # # demo for tics settings set xlabel "x" set ylabel "y" set mxtics set title "Default tics settings" set xrange [-15:15] set yrange [-0.25:1] plot sin(sqrt(x**2))/sqrt(x**2) notitle pause -1 "Hit return to continue" set title "Different modification of tics settings" set tics scale 3,2 rotate by 45 set xtics out offset 0,-1.0 replot pause -1 "Hit return to continue" set xtics textcolor rgb "red" norotate set ytics rotate by 90 offset 2,0 replot pause -1 "Hit return to continue" set title "Modification of tics settings (pm3d map with colorbar)" set pm3d map set border 4095 set samples 25 set isosamples 20 set palette color positive set samples 50; set isosamples 50 set tics norotate nooffset set cbtics in scale 4 set xrange [-15:15] set yrange [-15:15] set zrange [-0.25:1] splot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2) notitle pause -1 "Hit return to continue" reset print "End of tics demo." gnuplot-4.6.4/demo/pm3dcolors.dem0000644000471100001440000001271211463337772013651 0ustar # # $Id: pm3dcolors.dem,v 1.4 2010/10/31 19:14:02 mikulik Exp $ # # Test of color modes for pm3d palettes. # # Multiplot with some of the recommended rgbformulae palettes # set pm3d map set multiplot layout 3,3 \ title "Palettes according to 'help palette rgbformulae'" g(x)=x set xrange [0:1]; set xtics 0.2 scale 1.5 nomirror; set mxtics 2 # set palette maxcolors 128 unset colorbox; unset key; set tics out; unset ytics set palette rgb 7,5,15; set title "traditional pm3d\n(black-blue-red-yellow)"; splot g(x) set palette rgb 3,11,6; set title "green-red-violet"; splot g(x) set palette rgb 23,28,3; set title "ocean (green-blue-white)\ntry also other permutations"; splot g(x) set palette rgb 21,22,23; set title "hot (black-red-yellow-white)"; splot g(x) set palette rgb 30,31,32; set title "color printable on gray\n(black-blue-violet-yellow-white)"; splot g(x) set palette rgb 33,13,10; set title "rainbow (blue-green-yellow-red)"; splot g(x) set palette rgb 34,35,36; set title "AFM hot (black-red-yellow-white)"; splot g(x) set palette model HSV set palette rgb 3,2,2; set title "HSV model\n(red-yellow-green-cyan-blue-magenta-red)"; splot g(x) set pal gray; set title "gray palette"; splot g(x) unset multiplot reset pause -1 "Hit return to continue" # # Gradient Palettes # set pm3d map set palette color f(x)=(x+10)/20 set cbrange [f(-10):f(10)] # [0:1] set xrange [-10:10] set yrange [*:*] set xtics 2 set cbtics 0.1 set format cb "%3.1f" unset ztics unset ytics set samples 101 set isosamples 2 unset key set palette model RGB set palette defined set title "set palette defined" splot f(x) pause -1 "Hit return to continue" set palette defined (0 0 0 0, 1 0 0 1, 3 0 1 0, 4 1 0 0, 6 1 1 1) set title 'set palette defined (0 0 0 0, 1 0 0 1, 3 0 1 0, 4 1 0 0, 6 1 1 1)' splot f(x) pause -1 "Hit return to continue" set palette defined ( 0 "green", 1 "blue", 2 "red", 3 "orange" ) set title 'set palette defined ( 0 "green", 1 "blue", 2 "red", 3 "orange" )' splot f(x) pause -1 "Hit return to continue" set palette defined ( 20 "#101010", 30 "#ff0000", 40 "#00ff00", 50 "#e0e0e0" ) set title 'set palette defined ( 20 "#101010", 30 "#ff0000", 40 "#00ff00", 50 "#e0e0e0" )' splot f(x) pause -1 "Hit return to continue" set palette defined ( 0 0 0 0, 1 1 1 1 ) set title 'set palette defined ( 0 0 0 0, 1 1 1 1 )' splot f(x) pause -1 "Hit return to continue" set palette model HSV defined ( 0 0 1 1, 1 1 1 1 ) set title 'set palette model HSV defined ( 0 0 1 1, 1 1 1 1 )' splot f(x) pause -1 "Hit return to continue" set palette model RGB set palette model RGB defined (0 "green", 1 "dark-green", 1 "yellow", 2 "dark-yellow", 2 "red", 3 "dark-red" ) set title "set palette model RGB defined\n(0 'green', 1 'dark-green', 1 'yellow', 2 'dark-yellow', 2 'red', 3 'dark-red' )" splot f(x) pause -1 "Hit return to continue" set palette model RGB set title 'set palette file "-" (file with 3 columns)' set palette file "-" 0 0 0 0 0 1 0 1 0 1 0 0 1 1 1 e splot f(x) pause -1 "Hit return to continue" set title 'set palette file "-" (file with 4 columns)' set palette file "-" 10 0 0 0 20 0 0 1 40 0 1 0 60 1 0 0 70 1 1 1 e splot f(x) pause -1 "Hit return to continue" set title 'set palette file "-" using 1:2:($1+$2)/2' set palette file "-" using ($0):1:2:(($1+$2)/2) 0 0 0 1 1 0 1 1 e splot f(x) pause -1 "Hit return to continue" # # Color Models # set palette color set pm3d map set xrange [-10:10] unset ztics unset ytics set samples 101 set isosamples 2 set xtics 2 set palette rgbformulae 7,5,15 set palette model RGB rgbformulae 7,5,15 set title "set palette model RGB rgbformulae 7,5,15" splot f(x) pause -1 "Hit return to continue" set palette model HSV rgbformulae 7,5,15 set title "set palette model HSV rgbformulae 7,5,15" splot f(x) pause -1 "Hit return to continue" set palette model XYZ rgbformulae 7,5,15 set title "set palette model XYZ rgbformulae 7,5,15" splot f(x) pause -1 "Hit return to continue" set palette model CMY rgbformulae 7,5,15 set title "set palette model CMY rgbformulae 7,5,15" splot f(x) pause -1 "Hit return to continue" set palette model YIQ rgbformulae 7,5,15 set title "set palette model YIQ rgbformulae 7,5,15" splot f(x) pause -1 "Hit return to continue" set palette model HSV rgbformulae 3,2,2 set title "set palette model HSV rrgbformulae 3,2,2" splot f(x) pause -1 "Hit return to continue" # # User Defined Functions # set palette color set pm3d map set cbrange [f(-10):f(10)] set xrange [-10:10] set yrange [0:1] unset ztics unset ytics set samples 101 set isosamples 2 set xtics 2 set palette model RGB set palette functions gray, gray, gray set title "set palette functions gray, gray, gray" splot f(x) pause -1 "Hit return to continue" set palette functions sqrt(gray), gray**3, sin(gray*2*pi) set title 'set palette functions sqrt(gray), gray**3, sin(gray*2*pi) <--> 7,5,15' splot f(x) pause -1 "Hit return to continue" set palette rgbformulae 7,5,15 set title 'set palette rgbformulae 7,5,15' splot f(x) pause -1 "Hit return to continue" set palette model XYZ functions gray**0.35, gray**0.5, gray**0.8 set title 'set palette model XYZ functions model XYZ gray**0.35, gray**0.5, gray**0.8' splot f(x) pause -1 "Hit return to continue" theta(x) = x<0 ? 0 : 1 r(x) = 4*x*(1-theta(x-0.25)) g(x) = 0.5*theta(x-0.25)*(1-theta(x-0.5)) b(x) = x set palette model RGB functions r(gray),g(gray),b(gray) set title "set palette model RGB functions\n4*x*(1-theta(x-0.25)), 0.5*theta(x-0.25)*(1-theta(x-0.5)), x" splot f(x) pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/hidden2.dem0000644000471100001440000000340112077276753013077 0ustar # # PM3D surfaces are not fully included in the calculation of hidden line removal. # Older versions of gnuplot allowed you to approximate the correct occlusion # by drawing the surface twice, once "with pm3d" to produce the surface you # want to show, and once "with lines lt -2" to include the same surface in # hidden3d calculations but drawn with invisible lines. # Current gnuplot does the approximation for you so the extra copy of the # surface is no longer necessary. # set isosamples 25,25 set xyplane at 0 unset key set palette rgbformulae 31,-11,32 set style fill solid 0.5 set cbrange [-1:1] set title "Mixing pm3d surfaces with hidden-line plots" f(x,y) = sin(-sqrt((x+5)**2+(y-7)**2)*0.5) set hidden3d front splot f(x,y) with pm3d, x*x-y*y with lines lc rgb "black" pause -1 "Hit return to continue" reset # # Another example of pm3d hidden surface removal, # this time using pm3d depth-ordering # set multiplot title "Interlocking Tori" set title "PM3D surface\nno depth sorting" set parametric set urange [-pi:pi] set vrange [-pi:pi] set isosamples 50,20 set origin -0.02,0.0 set size 0.55, 0.9 unset key unset xtics unset ytics unset ztics set border 0 set view 60, 30, 1.5, 0.9 unset colorbox set pm3d scansbackward splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with pm3d, \ 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with pm3d set title "PM3D surface\ndepth sorting" set origin 0.40,0.0 set size 0.55, 0.9 set colorbox vertical user origin 0.9, 0.15 size 0.02, 0.50 set format cb "%.1f" set pm3d depthorder splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with pm3d, \ 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with pm3d unset multiplot pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/boxplot.dem0000644000471100001440000000316211644660320013237 0ustar # # Boxplot demo # reset print "*** Boxplot demo ***" set style fill solid 0.25 border -1 set style boxplot outliers pointtype 7 set style data boxplot set boxwidth 0.5 set pointsize 0.5 unset key set border 2 set xtics ("A" 1, "B" 2) scale 0.0 set xtics nomirror set ytics nomirror set yrange [0:100] plot 'silver.dat' using (1):2, '' using (2):(5*$3) pause -1 'Hit to continue: Compare sub-datasets' # Comparing sub-datasets set xtics auto set yrange [*:*] set title "Distribution of energy usage of the continents, grouped by type of energy source\n" set ylabel "Billion Tons of Oil Equivalent" plot 'energy_circles.dat' using (1):($8/1.e6):(0):4 pause -1 'Hit to continue: Sort factors alphabetically' # Sort factors alphabetically set style boxplot sorted replot pause -1 'Hit to continue: The same, with iteration and manual filtering' # The same as above, with manual filtering # Note that you have to specify the factors and you have to set the xtics as well. # However, you have greater control over the appearance of the plot # e.g. the order of the boxplots, their colors, the tic labels # The previous form is intended for interactive usage while the latter form is better suited # to creating publication-ready graphs. factors = "Coal Gas Hydroelectric Nuclear Oil Renewable" n_f = words(factors) set xtic ("" 1) set for [i=1:n_f] xtics add (word(factors,i) i) t(x) = x/1.e6 filter(col, factor_col, level) = (strcol(factor_col) eq word(factors, level)) ? t(column(col)) : 1/0 plot for [i=1:n_f] 'energy_circles.dat' using (i):(filter(8, 4, i)) pause -1 'Hit to continue: boxplot demo finished' gnuplot-4.6.4/demo/candlesticks.dat0000644000471100001440000000031307533752461014227 0ustar 1 1.5 2 2.4 4 6. 2 1.5 3 3.5 4 5.5 3 4.5 5 5.5 6 6.5 4 3.7 4.5 5.0 5.5 6.1 5 3.1 3.5 4.2 5 6.1 6 1 4 5.0 6 9 7 4 4 4.8 6 6.1 8 4 5 5.1 6 6.1 9 1.5 2 2.4 3 3.5 10 2.7 3 3.5 4 4.3 gnuplot-4.6.4/demo/ellipse.dem0000644000471100001440000000216211052612564013204 0ustar # # Ethan A Merritt - Feb 2007 # This demo requires support for 'set object ellipse' # Also it uses the file 'random.tmp' created by random.dem # if ((GPVAL_VERSION == 4.3 || GPVAL_VERSION == 4.2) \ && (!strstrt(GPVAL_COMPILE_OPTIONS,"+OBJECTS"))) \ print ">>> Skipping demo <<<\n" ; \ print "This copy of gnuplot was built without support for placing ellipses\n" ; \ exit ; unset key set xrange [-8:8] set yrange [-8:8] set size ratio 1.0 set zeroaxis set border 0 set xtics axis set ytics axis set tics scale 0.5 set format xy "" set title 'Example of `set object ellipse`' set object 1 ellipse center 1.5,1.0 size 2.,4. angle 20. front fillstyle empty border -1 set obj 2 ellipse center 1.5, 1 size 6, 12 angle 20 front fs empty bo 3 A = pi/9. plot 'random.tmp' using (1.5 + $1*cos(A)-2.*$2*sin(A)):(1.0 + $1*sin(A)+2.*$2*cos(A)) with dots pause -1 "Hit return to continue" set title 'Example of range-limited axes and tics' set tics out scale 0.5 set xtics 1.0 border rangelimited nomirror set ytics 1.0 border rangelimited nomirror set format xy "%.0f" set border 3 replot pause -1 "Hit return to continue" gnuplot-4.6.4/demo/mouselab_1.dem0000644000471100001440000000134710454527542013610 0ustar # # $Id: mouselab_1.dem,v 1.1 2006/07/10 19:49:54 sfeam Exp $ # # Demonstrate screen interaction using mouse variables # # MOUSE_X MOUSE_Y MOUSE_KEY MOUSE_CHAR # # On entry, LID is the identifier for the previous label # LID = LID + 1 set label 2 sprintf(">>> READY FOR LABEL %d <<<",LID-100) set label 2 at graph .02, graph .65 tc lt (LID-100) replot # # Get mouse position and first character of label # pause mouse key LABEL = MOUSE_CHAR LABEL_X = MOUSE_X LABEL_Y = MOUSE_Y set label LID LABEL at LABEL_X, LABEL_Y replot # # Call routine that catches keystrokes one by one and # updates the label # load "mouselab_2.dem" # # Print out final label details # show label LID # # Loop until we see an # if (MOUSE_KEY != 27) reread gnuplot-4.6.4/demo/orbits.dem0000644000471100001440000000426711415255032013055 0ustar # Ellipse demo - 2D Solar System viewer reset if ((GPVAL_VERSION == 4.3 || GPVAL_VERSION == 4.2) \ && (!strstrt(GPVAL_COMPILE_OPTIONS,"+OBJECTS"))) \ print ">>> Skipping demo <<<\n" ; \ print "This copy of gnuplot was built without support for placing ellipses\n" ; \ exit ; set zeroaxis set xtics axis set ytics axis set size ratio 1 set xrange [-40:40] set yrange [-40:40] unset border set key right out set title "Orbits of selected Solar System objects" set angles degrees set datafile separator "\t" if (strstrt(GNUTERM,"wxt")) \ set label 1 "Use Ctrl+mousewheel to zoom!" at graph 0.5,0.05 center fn = 'orbital_elements.dat' # functions to calculate the parameters of the ellipses from orbital elements # the actual 3D orbits are projected onto the ecliptic plane f1(w,W,i) = cos(w)*cos(W)-sin(w)*sin(W)*cos(i) f2(w,W,i) = cos(w)*sin(W)+sin(w)*cos(W)*cos(i) angle(w,W,i) = atan2(f2(w,W,i), f1(w,W,i)) # center coordinates cx(a,e,i,w,W) = -a*e*f1(w,W,i) cy(a,e,i,w,W) = -a*e*f2(w,W,i) # axes fa(a,e,i,w,W) = 2*a*sqrt(1-sin(w)**2*sin(i)**2) fb(a,e,i,w,W) = 2*a*sqrt(1-e**2)*sqrt(1-cos(w)**2*sin(i)**2) afromq(q,e) = q/(1-e) # the ellipse style needs five columns: # center x, center y, major axis, minor axis, orientation plot fn using (cx($2,$3,$4,$5,$6)):\ (cy($2,$3,$4,$5,$6)):\ (fa($2,$3,$4,$5,$6)):\ (fb($2,$3,$4,$5,$6)):\ (angle($5,$6,$4)) index 0 with ellipses lw 3 title "Planets",\ fn using (cx($2,$3,$4,$5,$6)):\ (cy($2,$3,$4,$5,$6)):\ (fa($2,$3,$4,$5,$6)):\ (fb($2,$3,$4,$5,$6)):\ (angle($5,$6,$4)) index 1 every ::0::20 with ellipses lw 1 title "Minor planets",\ fn using (cx($2,$3,$4,$5,$6)):\ (cy($2,$3,$4,$5,$6)):\ (fa($2,$3,$4,$5,$6)):\ (fb($2,$3,$4,$5,$6)):\ (angle($5,$6,$4)) index 2 every ::0::10 with ellipses lw 1 title "Comets",\ fn using (cx($2,$3,$4,$5,$6)):\ (cy($2,$3,$4,$5,$6)):\ (fa($2,$3,$4,$5,$6)):\ (fb($2,$3,$4,$5,$6)):\ (angle($5,$6,$4)) index 3 every ::0::10 with ellipses lw 1 title "Distant objects" pause -1 gnuplot-4.6.4/demo/using.dem0000644000471100001440000000140507747400072012700 0ustar # # $Id: using.dem,v 1.6 2003/10/28 05:35:54 sfeam Exp $ # # Requires data file "using.dat" from this directory, # so change current working directory to this directory before running. # set title "Convex November 1-7 1989 Circadian" set key left box set xrange[-1:24] plot 'using.dat' using 2:4 title "Logged in" with impulses,\ 'using.dat' using 2:4 title "Logged in" with points pause -1 "Hit return to continue" set xrange [1:8] #set xdtic set title "Convex November 1-7 1989" set key below set label "(Weekend)" at 5,25 center plot 'using.dat' using 3:4 title "Logged in" with impulses,\ 'using.dat' using 3:5 t "Load average" with points,\ 'using.dat' using 3:6 t "%CPU used" with lines unset label pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/gpdemos.tcl0000644000471100001440000001062410725072575013234 0ustar #!/bin/sh # the next line restarts using wish \ exec wish "$0" "$@" # gpdemos.tcl -- # # Demostration of gnuplot demos under Tcl/Tk. Adapted from orignal # demo by D.M.Burns and image demo from Tcl/Tk. To run under unix: # # unix> wish gpdemos.tcl # # or if gpdemos.tcl is changed to executable: # # unix> gpdemos.tcl # # Starting directory for demos is taken from environmental variable # GNUPLOT_LIB. # # 9 Sep 2004 - Original demo, Donald M. Burns # 12 Sep 2004 - Enhanced to search directory for *.dem files. # TAILOR THIS PATH IF NECESSARY set gnuplot gnuplot if {[info exists env(GNUPLOT_LIB)]} { set gp_library $env(GNUPLOT_LIB) } else { # the environment var isn't set, default to current directory set gp_library . } set demopath $gp_library eval destroy [winfo child .] wm protocol . WM_DELETE_WINDOW safe_exit # Open up a pipe to gnuplot set gpfd [open "|$gnuplot" w+] fconfigure $gpfd -buffering none -blocking 0 # A procedure to give commands to gnuplot proc gnuplot {a} { global gpfd fileevent $gpfd writable [puts $gpfd $a] } # A procedure to clean-up on exit - this is broken for windows! proc safe_exit {} { global gpfd set pids [pid $gpfd] foreach pid $pids { exec kill $pid } close $gpfd exit } # loadDir -- # This procedure reloads the directory listbox from the contents # of the directory named in the demo's entry. proc loadDir {} { global dirName .sel.f.list delete 0 end foreach i [lsort [glob -nocomplain [file join $dirName *.dem]]] { .sel.f.list insert end [file tail $i] } foreach i [lsort [glob -nocomplain [file join $dirName *.gp]]] { .sel.f.list insert end [file tail $i] } } # loadImage -- # Given the name of the toplevel window of the demo and the mouse # position, extracts the directory entry under the mouse and loads # that file into a photo image for display. # # Arguments: # x, y- Mouse position within the listbox. proc loadDemo {x y} { global dirName global gpfd # Send an ctrl-C to gnuplot in case a different demo is running. exec kill -INT [pid $gpfd] set file [file join $dirName [.sel.f.list get @$x,$y]] puts stderr "Loading demo $file" # Some demos may have set terminal and failed to set it back. gnuplot "\nset term x11; reset; load \"$file\"" } set font {Helvetica 11} wm title . "Tcl/Tk Gnuplot Demonstration" wm iconname . "Tcl/Tk GP" frame .sel frame .sep -relief ridge -bd 1 -width 2 frame .plt pack .sel -side left -fill y -padx 10 -pady 10 -expand no pack .sep -side left -fill y -expand no pack .plt -side right -fill both -expand yes -padx 10 -pady 10 label .sel.msg -font $font -wraplength 150 -justify left -text "This is an example of using gnuplot to draw into an X window opened by an external application. It allows you to run the demo listed demo scripts individually." pack .sel.msg -side top ## Create selection side of window frame .sel.buttons pack .sel.buttons -side bottom -fill both -expand no button .sel.buttons.quit -text Quit -command "safe_exit" pack .sel.buttons.quit -side left -expand 1 -fill both # label .sel.dirLabel -text "Directory:" set dirName [file join $gp_library] entry .sel.dirName -textvariable dirName bind .sel.dirName "loadDir" frame .sel.spacer1 -height 3m label .sel.fileLabel -text "File:" frame .sel.f frame .sel.spacer2 -height 2m pack .sel.dirLabel -side top -anchor w pack .sel.dirName -side top -fill x pack .sel.spacer1 .sel.fileLabel -side top -anchor w pack .sel.f -fill both -expand 1 pack .sel.spacer2 -side top # listbox .sel.f.list -yscrollcommand ".sel.f.scroll set" scrollbar .sel.f.scroll -command ".sel.f.list yview" pack .sel.f.list -side left -fill both -expand 1 pack .sel.f.scroll -side right -fill y -expand 0 bind .sel.f.list "loadDemo %x %y" ## Run load directory routine to fill list box loadDir ## Create the plot side of window frame .plt.g -bg "" -width 640 -height 450 frame .plt.spacer2 -height 2m frame .plt.buttons button .plt.buttons.bnext -text Next -command {gnuplot ""} button .plt.buttons.bstop -text Reset -command {exec kill -INT [pid $gpfd]; gnuplot "\nreset; clear"} # pack .plt.buttons.bnext .plt.buttons.bstop -side left -expand 1 pack .plt.buttons -side bottom -fill both -expand no pack .plt.spacer2 -side bottom pack .plt.g -side top -expand true -fill both # Tell gnuplot to use our frame .plt.g for display gnuplot "set term x11 window '[winfo id .plt.g]'" gnuplot "clear" gnuplot-4.6.4/demo/bldg.png0000644000471100001440000000740211311102043012460 0ustar PNG  IHDR2~gAMA asRGB cHRMz&u0`:pQ<PLTE %!!#!"!-!!$("(,&*,)0&&.4+26/38/2224918<4===:A6>E9DDDJCCLLLRLLHQCOQOTTTYZW\\\^b\ae^md]zgVtf\xi\dddjebfjcjofgghhghkkktkdkrgnrl|va~xdpvlzworzmsssv{ry~u{{{mElLoKgSjTnUmZnQpRp\~Z~QoABza~c|jzt}w}zxKORTBEAKC~|~ pHYs   vpAg2g IDATXÅX s=/n$Tb:;!=;c-lRI [UXZZ)8vy{Nq̕N{wf{~znK:NósF?dqo lZ$ ]wavy.x./ABM2-~ жF'EȓO"8o2!mF?v=gi&g,tڐrctBƤifYj8Oy9YÚ9HiO8Q;`3 ty&i< `}syjB~tK{ BSqCÌr )4 =!4i $`ytX],M!^yӍX"hk^ПK/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ݧqH&Gwں (t*b"VFz4{Q(OWߡb8zz+EѫW*I eSJ ?IIy'X4ZLҿDXY\YbH;u!3'K聽~%]Kˀ #i}4oc-vz-YX<B0aM@!xG"A9膏WAA~jſ-Ѩn(ddm4)Ys/ĴB"4ƏOt M,,1HPzfQvap o_21N硅Y0 (ld޿~Ӡ7Fk]C/,_,P"PX4vLn0tCOHjN{v@}=9%~K`,tFȱg$0] r@CKBhi jȜ5E{aYNeK!B|So"=:>ݟ& 1ѣǏa;R ASzQ4E0Y{&+/5~IENDB`gnuplot-4.6.4/demo/fontfile.dem0000644000471100001440000000327207747400072013365 0ustar # # $Id: fontfile.dem,v 1.4 2003/10/28 05:35:54 sfeam Exp $ # # This file demonstrates new features in gnuplot 3.8i # -1- loading fontfiles for postscript output print "\n This file demonstrates how to use postscript type 1 font" print " files with gnuplot." print "\n Please note that this demo runs only on postscript terminal," print " because fontfile inclusion is only supported by this terminal." print "\n In addition, this demo needs two font files which are not" print " included in the gnuplot distribution." print " On systems with ghostscript they should be found automatically." print " If not, they can be downloaded from the net:" print " http://sourceforge.net/projects/gs-fonts/" print " Please put the files \"p052003l.pfb\" and \"p052023l.pfb\"" print " somewhere they are found, e.g. into the working directory." pause -1 "Hit return to continue" # xmin=-270. xmax=270. ymin=-1.1 ymax=1.1 # reset set terminal push set terminal postscript enhanced linewidth 2 'Times-Roman' 22 \ fontfile 'p052003l.pfb' fontfile 'p052023l.pfb' set output 'fontfile.ps' unset autoscale set xr [xmin:xmax] set yr [ymin:ymax] # set encoding iso_8859_1 set format y '%.1f' set label 'Times-Roman: {/Times-Roman abcdefghABCDEFGH }' at graph 0.05,0.6 left set label 'URWPalladioL-Roma: {/URWPalladioL-Roma abcdefghABCDEFGH }' at graph 0.05,0.5 left set label 'URWPalladioL-Ital: {/URWPalladioL-Ital abcdefghABCDEFGH }' at graph 0.05,0.4 left set xlabel '{/URWPalladioL-Ital x} / ' set ylabel '{/URWPalladioL-Ital y}' plot sin(pi/180.*x) title '{/URWPalladioL-Ital y} = sin {/URWPalladioL-Ital x}' print "\n Now have a look at the file fontfile.ps" set output set terminal pop reset gnuplot-4.6.4/demo/rainbow.dem0000644000471100001440000000560510566246172013224 0ustar # # Demonstrate use of pm3d palette colors for 2D plots # terminal-independent color choices # reset # set title "Terminal-independent RGB colors in 2D" set xlabel "Implemented using built-in rgb color names\n(only works for terminals that can do full rgb color)" # set xrange [-0.5:3.5] set yrange [-1:1.4] set bmargin 7 unset ytics unset xtics # # define line styles using explicit rgbcolor names # set style line 1 lt rgb "red" lw 3 set style line 2 lt rgb "orange" lw 2 set style line 3 lt rgb "yellow" lw 3 set style line 4 lt rgb "green" lw 2 set style line 5 lt rgb "cyan" lw 3 set style line 6 lt rgb "blue" lw 2 set style line 7 lt rgb "violet" lw 3 # set label 1 'set style line 1 lt rgb "red" lw 3' at -0.4, -0.25 tc rgb "red" set label 2 'set style line 2 lt rgb "orange" lw 2' at -0.4, -0.35 tc rgb "orange" set label 3 'set style line 3 lt rgb "yellow" lw 3' at -0.4, -0.45 tc rgb "yellow" set label 4 'set style line 4 lt rgb "green" lw 2' at -0.4, -0.55 tc rgb "green" set label 5 'set style line 5 lt rgb "cyan" lw 3' at -0.4, -0.65 tc rgb "cyan" set label 6 'set style line 6 lt rgb "blue" lw 2' at -0.4, -0.75 tc rgb "blue" set label 7 'set style line 7 lt rgb "violet" lw 3' at -0.4, -0.85 tc rgb "violet" # print '' print '# These are the input commands' print '' print ' set style line 1 lt rgb "red" lw 3' print ' set style line 2 lt rgb "orange" lw 2' print ' set style line 3 lt rgb "yellow" lw 3' print ' set style line 4 lt rgb "green" lw 2' print ' set style line 5 lt rgb "cyan" lw 3' print ' set style line 6 lt rgb "blue" lw 2' print ' set style line 7 lt rgb "violet" lw 3' print '' print '# And this is the result' # show style line # # draw some plots # plot cos(x) ls 1 title 'red', \ cos(x-.2) ls 2 title 'orange',\ cos(x-.4) ls 3 title 'yellow',\ cos(x-.6) ls 4 title 'green', \ cos(x-.8) ls 5 title 'cyan', \ cos(x-1.) ls 6 title 'blue', \ cos(x-1.2) ls 7 title 'violet' # pause -1 "Hit return to continue" if ((GPVAL_VERSION == 4.3 || GPVAL_VERSION == 4.2) \ && (!strstrt(GPVAL_COMPILE_OPTIONS,"+MACROS"))) \ print ">>> Skipping demo <<<\n" ; \ print "This copy of gnuplot was built without support for macro substitution\n" ; \ exit ; set title "Terminal-independent palette colors in 2D\nImplemented using command line macros referring to a fixed HSV palette" set colorbox horizontal user origin .1,.08 size .8,.05 set xlabel 'HSV color wheel' # unset label 1 unset label 2 unset label 3 unset label 4 unset label 5 unset label 6 unset label 7 # # Load terminal-independent colorwheel (HSV full saturation) # load 'colorwheel.dem' # # define line styles using macros and a fixed palette # set style line 1 @red lw 3 set style line 2 @orange lw 2 set style line 3 @yellow lw 3 set style line 4 @green lw 2 set style line 5 @cyan lw 3 set style line 6 @blue lw 2 set style line 7 @violet lw 3 replot pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/discrete.dem0000644000471100001440000000110607747400072013353 0ustar # # $Id: discrete.dem,v 1.4 2003/10/28 05:35:54 sfeam Exp $ # # set contour set title "Demo of specifying discrete contour levels - default contours" splot x*y pause -1 "Hit return to continue" #set discrete levels set cntrparam levels discrete 0, 15, 75 set title "3 discrete contours at 0 15 & 75" replot pause -1 "Hit return to continue" #set incremental levels set cntrp level incr -20, 5, 9 set title "9 incremental contours starting at -20, stepping by 5" replot pause -1 "Hit return to continue" #restore defaults set title "" unset contour set cntrparam levels auto 5 gnuplot-4.6.4/demo/3.dat0000644000471100001440000000151506515203630011713 0ustar # # $Id: 3.dat,v 1.1.1.1 1998/04/15 19:16:40 lhecking Exp $ # # -20.000000 -9.125028 -19.000000 -9.109280 -18.000000 -9.091787 -17.000000 -9.072243 -16.000000 -9.050265 -15.000000 -9.025369 -14.000000 -8.996933 -13.000000 -8.964147 -12.000000 -8.925931 -11.000000 -8.880819 -10.000000 -8.826766 -9.000000 -8.760835 -8.000000 -8.678648 -7.000000 -8.573396 -6.000000 -8.433886 -5.000000 -8.240405 -4.000000 -7.954906 -3.000000 -7.494275 -2.000000 -6.642892 -1.000000 -4.712389 0.000000 0.000000 1.000000 4.712389 2.000000 6.642892 3.000000 7.494275 4.000000 7.954906 5.000000 8.240405 6.000000 8.433886 7.000000 8.573396 8.000000 8.678648 9.000000 8.760835 10.000000 8.826766 11.000000 8.880819 12.000000 8.925931 13.000000 8.964147 14.000000 8.996933 15.000000 9.025369 16.000000 9.050265 17.000000 9.072243 18.000000 9.091787 19.000000 9.109280 gnuplot-4.6.4/demo/kdensity2d.dem0000644000471100001440000000107711465350451013635 0ustar # Run 'random.dem' to generate 'random.tmp' reset set title "How to plot a kernel density estimate for this 2D dataset?" plot 'random.tmp' using 1:2 pause -1 "Press Return to continue - the plot may take some time to appear" set view map set palette defined (0 'white', 1 'red') set dgrid3d 50,50 gauss kdensity set title "set dgrid3d 50,50 gauss kdensity" splot 'random.tmp' using 1:2:(1) with pm3d pause -1 "Press Return to continue - the plot may take some time to appear" set dgrid3d 50,50 gauss kdensity 0.1 set title "set dgrid3d 50,50 gauss kdensity 0.1" replot gnuplot-4.6.4/demo/Makefile.in0000644000471100001440000003764012223337636013143 0ustar # Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = demo DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alpha.m4 \ $(top_srcdir)/m4/apple.m4 $(top_srcdir)/m4/beos.m4 \ $(top_srcdir)/m4/msdos.m4 $(top_srcdir)/m4/next.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) transform = @program_transform_name@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROEPS_CFLAGS = @CAIROEPS_CFLAGS@ CAIROEPS_LIBS = @CAIROEPS_LIBS@ CAIROPANGO_CFLAGS = @CAIROPANGO_CFLAGS@ CAIROPANGO_LIBS = @CAIROPANGO_LIBS@ CAIROPDF_CFLAGS = @CAIROPDF_CFLAGS@ CAIROPDF_LIBS = @CAIROPDF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIST_CONTACT = @DIST_CONTACT@ DVIPS = @DVIPS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ GDLIB_CONFIG = @GDLIB_CONFIG@ GIHDIR = @GIHDIR@ GREP = @GREP@ GTK28_CFLAGS = @GTK28_CFLAGS@ GTK28_LIBS = @GTK28_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEXPAND = @KPSEXPAND@ LASERGNU = @LASERGNU@ LATEX = @LATEX@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARIES_FOR_X = @LIBRARIES_FOR_X@ LIBS = @LIBS@ LINUXSUID = @LINUXSUID@ LISPDIR = @LISPDIR@ LN_S = @LN_S@ LRELEASE = @LRELEASE@ LTLIBOBJS = @LTLIBOBJS@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGO_1_10_2_CFLAGS = @PANGO_1_10_2_CFLAGS@ PANGO_1_10_2_LIBS = @PANGO_1_10_2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PDFLIB_CONFIG = @PDFLIB_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ PLAINTEX = @PLAINTEX@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RCC = @RCC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMLIBS = @TERMLIBS@ TERMXLIBS = @TERMXLIBS@ TEXDIR = @TEXDIR@ TEXHASH = @TEXHASH@ TROFF = @TROFF@ TUTORIAL = @TUTORIAL@ UIC = @UIC@ VERSION = @VERSION@ VERSION_MAJOR = @VERSION_MAJOR@ WX_CONFIG = @WX_CONFIG@ WX_LIBS = @WX_LIBS@ X11_APPDEFAULTS_DIR = @X11_APPDEFAULTS_DIR@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_OBJC = @ac_ct_OBJC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign CLEANFILES = binary1 binary2 binary3 defaults.ini equipo2.tmp field2xy.tmp \ fit.log soundfit.par temp.set fontfile.ps fontfile_latex.ps epslatex-inc.eps \ epslatex-inc.pdf epslatex.aux epslatex.dvi epslatex.log epslatex.pdf \ epslatex.ps epslatex.tex random.tmp stringvar.tmp BINARY_FILES = binary1 binary2 binary3 DEMO = all.dem GNUPLOT = gnuplot GNUPLOT_X11 = `echo gnuplot_x11 | sed '$(transform)'`$(EXEEXT) EXTRA_DIST = Makefile.am.in lena-keypoints.bin scatter2.bin sine.bin \ using.bin gnuplot.cfg world.cor 1.dat 2.dat 3.dat arrowstyle.dat \ asciimat.dat battery.dat big_peak.dat candlesticks.dat cities.dat \ clip14in.dat ctg-y2.dat delaunay-edges.dat ellipses.dat empty-circles.dat \ energy_circles.dat finance.dat fit3.dat glass.dat hemisphr.dat \ histerror.dat histopt.dat immigration.dat klein.dat lcdemo.dat moli3.dat \ optimize.dat orbital_elements.dat rgb_variable.dat scatter2.dat silver.dat \ soundvel.dat srl.dat steps.dat table.dat timedat.dat triangle.dat \ using.dat whale.dat world.dat airfoil.dem all.dem animate2.dem \ animate.dem approximate.dem arrowstyle.dem autoscale.dem barchart_art.dem \ binary.dem bivariat.dem borders.dem boxplot.dem candlesticks.dem \ charset.dem circles.dem cities.dem colorscheme.dem colorwheel.dem \ contours.dem controls.dem dashcolor.dem datastrings.dem dgrid3d.dem \ discrete.dem electron.dem ellipse.dem ellipses_style.dem enhancedtext.dem \ enhanced_utf8.dem epslatex.dem fillbetween.dem fillcrvs.dem fillstyle.dem \ finance.dem fit.dem fitmulti.dem fontfile.dem fontfile_latex.dem \ heatmaps.dem hidden2.dem hidden.dem histograms2.dem histograms.dem \ image2.dem image.dem imageNaN.dem iterate.dem kdensity2d.dem key.dem \ layout.dem macros.dem margins.dem mgr.dem molecule.dem mouselab_1.dem \ mouselab_2.dem mouselabels.dem mousevariables.dem multiaxis.dem \ multimsh.dem multipalette.dem multiplt.dem orbits.dem param.dem \ pm3dcolors.dem pm3d.dem pm3dgamma.dem pointsize.dem polar.dem poldat.dem \ prob2.dem prob.dem rainbow.dem random.dem rectangle.dem rgbalpha.dem \ rgb_variable.dem running_avg.dem scatter.dem simple.dem singulr.dem \ smooth.dem spline.dem starmap.dem stats.dem steps.dem stringvar.dem \ surface1.dem surface2.dem textcolor.dem textrotate.dem tics.dem \ timedat.dem transparent.dem transparent_solids.dem using.dem utf8.dem \ varcolor.dem vector.dem world2.dem world.dem demo.edf density.fnc hexa.fnc \ line.fnc reflect.fnc stat.inc nearmap.csv GM1_sugar.pdb labelplot.pdb \ bldg.png GM1_bonds.r3d blutux.rgb lena.rgb sound.par sound2.par start.par \ gnuplot.rot gnu-valley random-points gpdemos.tcl html all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign demo/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign demo/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ cscopelist-am ctags-am distclean distclean-generic distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am all: $(BINARY_FILES) $(BINARY_FILES): ../src/bf_test @echo Creating binary data files @../src/bf_test check-prepare: @if test ! -e "$(top_builddir)/src/$(GNUPLOT_X11)"; then\ $(LN_S) gnuplot_x11 $(top_builddir)/src/$(GNUPLOT_X11); \ fi check-local: check-noninteractive check-interactive: check-prepare $(BINARY_FILES) @if test -z "$(GNUTERM)" ; then \ ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \ GNUPLOT_DRIVER_DIR=$$bdir/../src \ GNUPLOT_LIB=$(srcdir) $(GNUPLOT) $(DEMO) ); \ else \ ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \ GNUPLOT_DRIVER_DIR=$$bdir/../src \ GNUTERM=$(GNUTERM) \ GNUPLOT_LIB=$(srcdir) $(GNUPLOT) $(DEMO) ); \ fi check-noninteractive: check-prepare $(BINARY_FILES) @if test -z "$(GNUTERM)" ; then \ ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \ GNUPLOT_DRIVER_DIR=$$bdir/../src \ GNUPLOT_LIB=$(srcdir) $(GNUPLOT) $(DEMO) $@t echo EXTRA_DIST = Makefile.am.in *.bin *.cfg *.cor *.dat *.dem *.edf \ *.fnc *.inc nearmap.csv *.pdb *.png *.r3d *.rgb sound.par sound2.par \ start.par *.rot gnu-valley random-points gpdemos.tcl html | fmt | \ (tr '\012' @; echo) | sed 's/@$$/%/;s/@/ \\@/g' | tr @% '\012 ' \ >> $@t sed -n '/^##m4-files-end/,$$p' $< >> $@t chmod og-w $@t mv $@t $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnuplot-4.6.4/demo/density.fnc0000644000471100001440000000125606515203631013231 0ustar # # This is a rough approach to fit a model function to the density # data of a liquid crystal. The function consists of a linear # branch for the high temperature region and of a curved branch with # linear asymptote for the low temperatuer branch # # free parameters: # m1, m2 slopes of the linear function in the low and high T region # Tc transition temperature # dens_Tc density at the transition temperature # g factor to scale tanh function ml = -0.0001 mh = -0.0001 dens_Tc = 1.020 Tc = 45 g = 1 b = 0.1 high(x) = mh*(x-Tc) + dens_Tc lowlin(x) = ml*(x-Tc) + dens_Tc curve(x) = b*tanh(g*(Tc-x)) density(x) = x < Tc ? curve(x)+lowlin(x) : high(x) gnuplot-4.6.4/demo/gnuplot.rot0000644000471100001440000000241610360046336013277 0ustar # A generic rotation routine for the gnuplot view. In the commands # that load this file, the following should be defined: # # iteration_count: set iteration_count=0 # # limit_iterations: if set to a nonzero value, it'll stop after that # many iterations; if zero value, continues indefinitely # # xrot: the initial x rotation of the view # # xrot_delta: the amount to increment the x rotation for each new plot # # xview: function for generating x view value; for example # xview(xrot)=(50.+30.*sin((xrot%180)/180.*pi)) # # zrot: the initial z rotation of the view # # zrot_delta: the amount to increment the z rotation for each new plot # # zview: function for generating z view value; for example # zview(zrot)=(60.+45.*sin(zrot/180.*pi)) # # History: # - 1. 1. 2006 Dan Sebald: Made more generic so other demos could use # - ?. ?. ? Hans-Bernhard Broeker: Used to just turn round and round # by somewhat large steps. Now, it tumbles back and forth # smoothly. # - ?. ?. ? ?: Initial recursive script iteration_count=iteration_count+1 if ((!limit_iterations) || (iteration_count<=limit_iterations)) \ set view xview(xrot),zview(zrot); \ replot; \ zrot=(zrot+zrot_delta)%360; \ xrot=(xrot+xrot_delta)%360; \ reread gnuplot-4.6.4/demo/finance.dat0000644000471100001440000004463110266240416013163 0ustar 2/27/2003 77.9 78.59 76.75 77.28 9927900 0 -4208566 0 0 0 2/28/2003 78.15 78.47 77 77.95 6556100 0 -2290796 0 0 0 3/3/2003 78.6 79 77.12 77.33 6618300 0 -7430539 0 0 0 3/4/2003 77.6 77.75 76.53 76.7 5672200 0 -11521962 0 0 0 3/5/2003 76.7 77.73 76.25 77.73 6659100 0 -4862862 0 0 0 3/6/2003 77 77.78 76.7 77.07 5877000 0 -6713029 0 0 0 3/7/2003 76.15 77.99 75.71 77.9 8129200 0 774392 0 0 0 3/10/2003 77.01 77.45 75.5 75.7 6642600 0 -4505623 0 0 0 3/11/2003 76.15 76.33 75.2 75.35 8121000 0 -10470605 0 0 0 3/12/2003 75.25 75.63 73.17 75.18 12768200 0 -2373698 0 0 0 3/13/2003 76 78.68 75.31 78.45 10450600 0 6650410 0 0 0 3/14/2003 78.45 79.48 78.11 79 10117700 0 9678335 0 0 0 3/17/2003 78 82.67 77.84 82.46 15195600 0 23552579 0 0 0 3/18/2003 82.21 83.5 81.49 82.47 10795500 0 23284034 0 0 0 3/19/2003 81.85 82.5 81.08 82 10474100 0 26382007 0 0 0 3/20/2003 81.1 82.49 80.64 82.2 9048600 0 32593749 0 0 0 3/21/2003 83.4 84.9 82.77 84.9 12597800 0 45191549 0 0 0 3/24/2003 82.5 83.35 82.24 82.25 9347600 0 36012374 0 0 0 3/25/2003 82 84 81.74 83.45 8777100 0 40517434 0 0 0 3/26/2003 83 83.25 81.18 81.55 10531600 0 33750754 79.35 85.18 73.51 3/27/2003 80.75 82.33 80.51 81.45 7265800 0 33990286 79.55 85.38 73.73 3/28/2003 81 81.99 80.5 80.85 6649300 0 30464818 79.7 85.5 73.9 3/31/2003 79.26 79.61 78.31 78.43 10306100 0 22061383 79.75 85.49 74.02 4/1/2003 78.5 79.56 78.12 78.73 7866900 0 20859495 79.86 85.44 74.27 4/2/2003 80.45 81.97 79.9 81.46 9700900 0 25780242 80.04 85.58 74.51 4/3/2003 82.32 83.48 81.72 81.91 9627200 0 18231642 80.28 85.7 74.87 4/4/2003 82.35 82.55 80.04 80.79 8986000 0 14615761 80.43 85.73 75.12 4/7/2003 82.6 82.9 80.25 80.47 8884800 0 7206173 80.67 85.51 75.83 4/8/2003 80.62 80.7 78.47 80.07 8057800 0 10711136 80.9 85.1 76.7 4/9/2003 79.95 80.74 78.63 78.71 8550400 0 2809107 81.08 84.53 77.63 4/10/2003 79.1 79.25 78.13 79.01 6882600 0 6742021 81.11 84.48 77.73 4/11/2003 80.1 81.3 78.45 78.75 7574600 0 762074 81.1 84.5 77.69 4/14/2003 78.5 80.07 78.16 80.07 9056400 0 9818474 80.98 84.35 77.6 4/15/2003 80.07 82.85 79.71 82.79 13620900 0 22918830 80.99 84.4 77.58 4/16/2003 83 84.4 82.74 82.88 10791700 0 13947417 81.04 84.52 77.56 4/17/2003 82.88 84.4 81.89 84.26 8803400 0 21768764 81.14 84.86 77.41 4/21/2003 84.26 84.51 83.1 83.36 6705100 0 17536467 81.06 84.53 77.6 4/22/2003 83.1 86.06 82.6 85.63 9543500 0 24707883 81.23 85.2 77.26 4/23/2003 85.63 85.97 84.97 85.75 7085000 0 28675483 81.35 85.69 77.01 4/24/2003 84.65 85.7 84.63 85.2 5943300 0 29064297 81.53 86.18 76.87 4/25/2003 85.21 85.28 83.86 83.88 6791200 0 22464399 81.65 86.42 76.88 4/28/2003 84.05 85.5 83.62 85.12 6363700 0 26255539 81.86 86.84 76.88 4/29/2003 85.34 86.49 84.97 85.66 8732400 0 25451239 82.23 87.21 77.24 4/30/2003 85.48 85.67 84.68 84.9 8445000 0 20759572 82.53 87.37 77.69 5/1/2003 85.3 86.23 84.47 85.89 7486300 0 25353438 82.76 87.78 77.73 5/2/2003 84.95 87.57 84.45 87.57 8382100 0 33735538 83.04 88.46 77.61 5/5/2003 87.2 88 86.52 86.52 7634400 0 26101138 83.32 88.85 77.8 5/6/2003 86.1 88.34 86 87.51 7459600 0 28268885 83.68 89.32 78.03 5/7/2003 86.95 87.81 86.5 86.68 6755600 0 23369786 84.01 89.54 78.47 5/8/2003 86.37 86.78 85.75 86.05 7188200 8628960 20368887 84.37 89.41 79.34 5/9/2003 86.9 87.7 86.4 87.55 6223000 8554862 25155810 84.8 89.37 80.23 5/12/2003 87.55 89.26 87.1 89 8446100 8592662 31568590 85.31 89.32 81.31 5/13/2003 88.78 90.1 88.56 89.98 8669100 8633678 38886661 85.81 89.54 82.08 5/14/2003 90 90.4 88.3 88.7 7752500 8675284 34087495 86.1 89.76 82.44 5/15/2003 89.5 89.96 89 89.9 7104000 8684182 40303495 86.46 90.16 82.75 5/16/2003 89.67 89.89 88.95 88.99 6832600 8703294 34052392 86.69 90.41 82.98 5/19/2003 88.05 88.47 86.41 86.45 7298100 8686672 27037714 86.85 90.24 83.46 5/20/2003 86.58 87.24 84.89 85.77 7332600 8700472 25196763 86.85 90.23 83.47 5/21/2003 85.77 86.18 85.08 86.18 6742400 8672900 31939163 86.88 90.23 83.52 5/22/2003 86.25 86.8 85.8 86.08 6277400 8543084 29177107 86.92 90.21 83.63 5/23/2003 85.75 85.95 85.1 85.26 5188500 8437842 25941925 86.99 90.07 83.9 5/27/2003 84.9 87.9 84.51 87.69 7163500 8378758 32217912 87.12 90.09 84.14 5/28/2003 87.6 88.7 87.4 87.57 6542300 8205692 27386675 87.21 90.12 84.31 5/29/2003 87.57 88.59 87.2 87.36 6898900 8127760 22076011 87.34 90.04 84.63 5/30/2003 87.45 88.68 87.45 88.04 6212500 8042528 21823470 87.44 90.08 84.81 6/2/2003 89 89.08 87.25 87.33 7767100 8016898 14735461 87.43 90.07 84.8 6/3/2003 84 85.24 83.24 83.82 21110100 8187144 5869219 87.3 90.35 84.24 6/4/2003 84 84.96 83.83 84.25 10734000 8214872 3114475 87.13 90.46 83.81 6/5/2003 84 84.25 81.75 81.9 15273700 8344804 -10326381 86.89 90.93 82.86 6/6/2003 82.25 83.23 79.84 80.05 15164500 8437462 -23612093 86.59 91.61 81.58 6/9/2003 80 82 79.81 82 9758000 8487306 -13854093 86.32 91.69 80.94 6/10/2003 82.8 82.92 81.21 81.71 8896300 8532246 -17547878 85.95 91.53 80.37 6/11/2003 82.75 84.15 82.29 83.97 9812000 8522364 -9634975 85.65 90.97 80.33 6/12/2003 84.8 84.98 83.55 83.95 7072300 8506472 -12750744 85.41 90.59 80.24 6/13/2003 84.15 84.29 82.51 82.75 5724500 8426944 -16931558 85.06 89.92 80.19 6/16/2003 83.1 84.55 82.55 84.5 6492500 8364250 -10763683 84.83 89.35 80.31 6/17/2003 84.95 84.95 83.8 84.3 5873700 8302004 -11529818 84.72 89.19 80.26 6/18/2003 84.15 84.99 83.22 84.7 5942500 8243158 -7534578 84.67 89.11 80.23 6/19/2003 84.95 85.29 84.5 84.55 7277100 8227544 -13890526 84.59 88.97 80.21 6/20/2003 85 85.24 84.69 84.92 12868800 8313912 -15996330 84.53 88.86 80.2 6/23/2003 84.79 84.79 82.97 83.18 6311600 8302492 -20851407 84.43 88.79 80.07 6/24/2003 82.95 84.18 82.85 83.63 5063200 8252264 -19975816 84.22 88.33 80.12 6/25/2003 83.55 84.16 82.09 82.49 5548000 8182096 -23379661 83.97 87.83 80.11 6/26/2003 83.7 84.38 82.82 84.35 6374400 8037166 -17250430 83.82 87.37 80.27 6/27/2003 84.15 84.65 83.22 83.42 4532900 7911990 -20515386 83.59 86.56 80.62 6/30/2003 83.9 84.2 82.5 82.5 10100200 7937926 -30615586 83.35 85.8 80.89 7/1/2003 82.55 83.66 81.4 83.59 5785800 7919540 -25188199 83.34 85.78 80.89 7/2/2003 83.95 84.89 83.75 84.74 6061400 7849898 -20721904 83.36 85.85 80.87 7/3/2003 84.25 84.69 83.48 83.95 3009500 7768388 -21393445 83.46 85.88 81.05 7/7/2003 84.8 86.45 84.74 86.09 7508600 7799694 -17046361 83.76 85.89 81.64 7/8/2003 86.09 86.75 85.19 86.25 5873900 7781348 -14937782 83.98 86.2 81.75 7/9/2003 86.1 86.35 84.85 85.47 6726700 7788608 -16103743 84.17 86.22 82.11 7/10/2003 85 85.22 83.47 84.03 7509300 7764146 -18807091 84.17 86.22 82.11 7/11/2003 84.2 85.28 83.7 84.89 4534700 7685940 -16511040 84.22 86.29 82.14 7/14/2003 86 86.58 85.42 85.42 6455400 7665322 -22966440 84.35 86.37 82.33 7/15/2003 86.15 87 85.82 86.44 7910900 7655898 -22564191 84.45 86.66 82.23 7/16/2003 87 87.03 85.85 86.74 8851900 7680248 -18063225 84.57 87 82.14 7/17/2003 83.8 83.94 82.5 83.33 13366800 7798392 -16021075 84.5 86.99 82.01 7/18/2003 83.85 84.02 83.21 83.72 8567500 7834630 -13799871 84.46 86.97 81.94 7/21/2003 83.2 83.43 82.21 82.5 7036200 7831590 -17490993 84.34 86.98 81.69 7/22/2003 82.5 83.26 81.52 81.85 8744300 7882016 -22918489 84.27 87.09 81.45 7/23/2003 82 82.77 81.73 82.3 5326700 7819628 -22406306 84.2 87.14 81.27 7/24/2003 82.95 82.99 81.51 81.51 5858600 7763418 -28264906 84.15 87.23 81.08 7/25/2003 81.85 83.74 81.57 83.55 6207600 7732520 -23144352 84.11 87.2 81.03 7/28/2003 83.67 83.7 82.04 82.54 6423500 7718910 -25698273 84.07 87.22 80.92 7/29/2003 82.55 82.88 81.6 81.8 7280800 7727874 -30703823 84.04 87.27 80.8 7/30/2003 82.45 82.45 80.58 80.96 6654400 7715000 -34653761 83.9 87.4 80.41 7/31/2003 81.8 82.54 81.1 81.25 8051400 7729376 -41027786 83.73 87.39 80.07 8/1/2003 81.15 81.27 80.05 81.27 6475500 7724038 -34552286 83.6 87.4 79.79 8/4/2003 80.75 81.36 80.06 81.13 5889700 7716284 -30746634 83.35 87.12 79.58 8/5/2003 81.13 81.33 79.8 79.85 7025400 7753022 -37312858 83.03 86.85 79.21 8/6/2003 79.7 80.68 78.73 79.75 7472900 7759210 -36967954 82.74 86.64 78.84 8/7/2003 79.85 80.82 79.38 80.69 5299500 7734354 -32625309 82.57 86.52 78.62 8/8/2003 81.05 81.27 80.35 80.88 4615600 7688688 -31922935 82.37 86.24 78.51 8/11/2003 80.87 81.5 80.28 81.02 4262200 7649682 -31014597 82.15 85.8 78.51 8/12/2003 81.45 81.54 80.65 81.51 4634200 7587024 -26692815 81.91 84.98 78.84 8/13/2003 81.65 82.19 80.58 81.2 5138400 7267590 -27873690 81.63 83.76 79.5 8/14/2003 81 81.75 80.69 81.56 4563400 7144178 -24946225 81.54 83.53 79.56 8/15/2003 81.8 81.98 81.2 81.79 3623600 6911176 -23087969 81.45 83.17 79.72 8/18/2003 82.05 83.68 81.9 83.52 6847900 6744844 -17471152 81.5 83.39 79.6 8/19/2003 83.75 83.81 82.56 83.19 6319300 6676070 -17420598 81.56 83.6 79.53 8/20/2003 82.8 83.31 82 83.05 4828700 6594718 -14508634 81.6 83.71 79.49 8/21/2003 83.39 83.85 82.85 82.85 5185200 6502182 -19693834 81.67 83.85 79.49 8/22/2003 83.5 84.72 82.96 82.97 7434900 6509434 -27044246 81.64 83.73 79.55 8/25/2003 82.85 83.03 81.75 81.96 5151500 6497974 -30505410 81.61 83.67 79.55 8/26/2003 81.65 82.54 81.27 82.5 5569700 6479518 -25286557 81.65 83.74 79.55 8/27/2003 82 82.53 81.9 82 3789200 6437828 -27872837 81.7 83.77 79.62 8/28/2003 82 82.34 81.27 81.9 5516300 6429304 -26893307 81.73 83.79 79.66 8/29/2003 81.95 82.11 81.56 82.01 4223600 6368234 -24205561 81.77 83.82 79.71 9/2/2003 82.4 85.96 82.3 85.76 12425600 6359370 -13137950 82 84.67 79.33 9/3/2003 86.24 87.3 86 86.33 10835700 6449852 -18472449 82.32 85.41 79.23 9/4/2003 86.33 88.29 85.69 87.91 9891400 6546416 -11472381 82.73 86.44 79.02 9/5/2003 87.65 88.26 86.75 86.95 7896800 6593392 -17277314 83.04 87.06 79.03 9/8/2003 88.45 89.66 88.35 89.1 9218200 6650268 -15940323 83.45 88.13 78.78 9/9/2003 89.2 89.97 88.93 89.42 8188400 6723378 -16412731 83.87 89.08 78.67 9/10/2003 88.99 89 87.61 87.84 7322600 6667826 -21312024 84.19 89.55 78.83 9/11/2003 86.5 88.42 86.4 87.92 9755600 6747222 -16385929 84.53 89.94 79.12 9/12/2003 87.6 89.01 87.2 88.7 7209200 6770178 -11646179 84.88 90.4 79.36 9/15/2003 89.75 89.96 88.39 88.49 7303400 6856056 -18019209 85.22 90.76 79.68 9/16/2003 88.75 90.41 88.49 90.29 7897300 6863830 -11109072 85.56 91.46 79.66 9/17/2003 90.4 91.94 90.2 90.63 9087100 6928094 -15704847 85.93 92.12 79.74 9/18/2003 90.63 92.43 90.46 92 8338800 6960336 -11006335 86.38 92.95 79.8 9/19/2003 92.45 93.47 91.8 93.28 9416900 6998488 -3732203 86.9 93.91 79.89 9/22/2003 92 92.24 90.9 91.39 7302900 7053852 -5694176 87.32 94.35 80.29 9/23/2003 91.5 92.09 90.56 91.34 7936900 7083482 -5538550 87.79 94.57 81.01 9/24/2003 91.08 91.82 89.33 89.4 7576100 7076786 -12688685 88.13 94.49 81.77 9/25/2003 89.4 90.97 89.2 89.41 6586300 7031474 -17712134 88.5 94.22 82.78 9/26/2003 89.41 90.14 89 89.05 5096600 6866070 -22361664 88.86 93.71 84.01 9/29/2003 89.25 90.18 89.07 89.45 5723300 6809186 -24166308 89.23 92.93 85.54 9/30/2003 89.2 89.25 87.9 88.33 7060200 6809666 -26728899 89.36 92.73 85.99 10/1/2003 88.75 90.6 88.7 90.35 7926800 6793316 -20888099 89.56 92.65 86.47 10/2/2003 89.55 90.45 89.22 90.08 7429600 6835374 -17928340 89.67 92.67 86.67 10/3/2003 91 91.95 90.57 90.64 7479400 6867790 -24648960 89.86 92.61 87.1 10/6/2003 90.74 91.76 90.51 91.18 3845600 6820550 -24372077 89.96 92.75 87.17 10/7/2003 90.5 91.7 90.4 91.7 5369800 6799476 -19002277 90.07 92.95 87.2 10/8/2003 92 92.87 91.95 92.66 6418900 6782238 -15513744 90.31 93.21 87.42 10/9/2003 93.3 93.6 92.2 92.45 7593000 6801010 -20394958 90.54 93.36 87.72 10/10/2003 92.4 93.18 92.36 92.67 4499100 6729964 -21492300 90.74 93.57 87.91 10/13/2003 93.1 93.54 92.58 93.2 4639200 6693238 -20139200 90.98 93.8 88.15 10/14/2003 92.65 92.95 92.32 92.72 4703500 6669514 -18870001 91.1 94 88.19 10/15/2003 93.9 94.54 92.74 92.74 11669300 6762392 -30539301 91.2 94.18 88.22 10/16/2003 89.25 89.7 88.66 89.28 16989500 6952724 -27272090 91.07 94.14 88 10/17/2003 89.28 89.68 88.81 89.23 9506900 7036872 -27599914 90.86 93.86 87.87 10/20/2003 89.35 89.4 88.86 89 6977300 7084106 -30959355 90.74 93.83 87.65 10/21/2003 89.25 89.34 88.7 88.93 5287100 7104604 -32446352 90.62 93.8 87.45 10/22/2003 88.25 89.01 87.9 88.46 5599800 7123916 -32395903 90.58 93.85 87.31 10/23/2003 87.6 88.4 87.53 88.15 6048800 7142124 -29823425 90.51 93.92 87.11 10/24/2003 88 88.64 87.72 88.42 5471800 7160292 -26968573 90.48 93.95 87.01 10/27/2003 88.8 89.1 88.17 88.52 5093900 7189698 -28228354 90.44 93.98 86.89 10/28/2003 89.05 89.9 88.52 89.9 6959700 7191934 -21268654 90.51 93.94 87.09 10/29/2003 89.6 89.94 89.15 89.34 5183100 7169210 -23958618 90.46 93.93 87 10/30/2003 90 90.17 89.06 89.12 6535500 7203346 -29787577 90.42 93.92 86.91 10/31/2003 89.2 90.71 89.2 89.48 4849100 7196624 -32838335 90.36 93.89 86.83 11/3/2003 89.9 90.84 89.48 89.68 5825641 7164438.82 -36950553 90.28 93.8 86.76 11/4/2003 89.68 89.8 88.86 89.14 5145601 7164320.84 -39030689 90.15 93.65 86.66 11/5/2003 88.52 88.88 88 88.49 6296500 7178856.84 -38315178 89.95 93.31 86.58 11/6/2003 88.33 89.59 87.72 89.34 5668900 7216450.84 -34162026 89.79 92.96 86.62 11/7/2003 89.4 89.6 88.26 88.26 5570100 7217526.84 -39732126 89.57 92.51 86.63 11/10/2003 89.55 90.47 89.55 89.95 8346500 7299984.84 -40820800 89.41 91.84 86.97 11/11/2003 90 90.03 88.89 89.36 4841200 7148296.84 -41670134 89.24 91.15 87.33 11/12/2003 89.45 91.16 89.31 90.69 5906200 7049706.84 -38764922 89.14 90.39 87.89 11/13/2003 90.4 91.48 90.16 91.09 5277900 6957436.84 -36605781 89.23 90.74 87.72 11/14/2003 91.02 91.42 89.81 90.25 4510500 6889710.84 -38650914 89.28 90.86 87.7 11/17/2003 89.9 90.05 89.03 89.8 4748900 6800324.84 -36229907 89.32 90.91 87.73 11/18/2003 89.92 90.18 88.9 88.95 5284500 6742246.84 -41101555 89.32 90.91 87.73 11/19/2003 88.32 89.83 88.32 89.4 4156900 6678932.84 -39312161 89.37 90.9 87.83 11/20/2003 89.3 89.79 88.38 88.39 5112300 6586066.84 -44351946 89.38 90.88 87.88 11/21/2003 88.4 88.85 88.23 88.63 5935300 6560588.84 -42628794 89.39 90.87 87.91 11/24/2003 89.03 89.74 88.95 89.66 4722400 6508968.84 -38862830 89.45 90.87 88.02 11/25/2003 89.66 89.85 89.27 89.43 4306100 6437144.84 -40793151 89.42 90.83 88.01 11/26/2003 89.79 90.09 89.11 89.91 4146800 6338338.84 -38169665 89.45 90.88 88.03 11/28/2003 89.9 90.68 89.62 90.54 2193200 6215426.84 -36555801 89.52 91.01 88.03 12/1/2003 90.9 91.36 90.48 91.01 5234400 6131776.84 -35485128 89.6 91.23 87.97 12/2/2003 90.57 91.48 90.52 90.75 5092900 6087576.84 -38137680 89.65 91.35 87.95 12/3/2003 91.15 91.44 90.3 90.3 6170600 6052250.84 -44308280 89.71 91.42 88 12/4/2003 90.05 91.44 90.03 91.42 5360700 6007942.84 -39099657 89.86 91.62 88.09 12/5/2003 91.3 91.3 90.5 90.64 5878400 5993784.84 -42920617 89.92 91.7 88.14 12/8/2003 90.52 91.47 90.52 91.2 5342000 5998692.84 -40615122 90.07 91.76 88.38 12/9/2003 91.15 92.16 90.61 90.63 6971500 6023656.84 -47406712 90.1 91.81 88.4 12/10/2003 90.69 92.74 90.66 91.73 7140400 6025260.84 -47200739 90.22 92.03 88.41 12/11/2003 91.96 92.97 91.92 92.4 6412100 5994966.84 -47750348 90.31 92.34 88.27 12/12/2003 92.7 93.16 92.24 92.71 5080000 5947974.84 -47639913 90.39 92.66 88.12 12/15/2003 93.43 93.97 92.08 92.11 5964500 5917676.84 -53415064 90.48 92.87 88.09 12/16/2003 92.11 94.12 91.88 93.98 7455800 5989880.84 -46891239 90.69 93.5 87.88 12/17/2003 93.85 93.87 92.85 93.4 6056500 6003614.84 -46416219 90.91 93.84 87.99 12/18/2003 93 93.38 92.5 92.73 6873500 6012706.84 -49696753 91.08 94.02 88.14 12/19/2003 93.23 93.25 92.67 93.14 7090700 6002660.84 -45295629 91.32 94.12 88.52 12/22/2003 92.83 93.5 92.78 93.39 4332300 5999324.84 -42287087 91.55 94.2 88.9 12/23/2003 93.07 93.44 92.34 92.79 3677200 5980084.84 -42955669 91.71 94.26 89.16 12/24/2003 92.8 92.8 92.18 92.27 1760500 5921224.84 -44205056 91.85 94.19 89.52 12/26/2003 92.37 93 92.3 92.9 1408500 5716008.84 -43198985 92 94.2 89.8 12/29/2003 93.1 93.73 93.03 93.52 4034200 5456902.84 -41585305 92.15 94.34 89.97 12/30/2003 93.27 93.5 92.36 92.63 4002800 5346820.84 -43692042 92.23 94.36 90.1 12/31/2003 92.66 92.85 92.16 92.68 4726900 5301812.84 -41294339 92.33 94.35 90.3 1/2/2004 92.86 93.05 91.2 91.55 5331100 5302692.84 -44608266 92.39 94.23 90.55 1/5/2004 92 93.09 92 93.05 5276500 5296226.84 -39719032 92.47 94.28 90.67 1/6/2004 92.2 93.19 92.14 93.06 4380000 5262850.84 -36423603 92.59 94.2 90.98 1/7/2004 93.14 93.38 92.47 92.78 4927600 5251966.84 -37993937 92.67 94.15 91.19 1/8/2004 93.21 93.21 92.03 93.04 6251800 5275124.84 -33543504 92.79 93.94 91.64 1/9/2004 91.75 92.35 91 91.21 7932000 5294570.84 -39007770 92.77 94.03 91.5 1/12/2004 91.21 92.14 91.21 91.55 5130400 5293516.84 -40386910 92.72 94.09 91.36 1/13/2004 91.45 91.51 89.01 89.7 8843000 5339666.84 -44348574 92.57 94.47 90.68 1/14/2004 89.9 90.46 89.75 90.31 5537000 5353424.84 -41151151 92.48 94.62 90.35 1/15/2004 95 95.65 93.55 94.02 19780100 5632514.02 -52077302 92.49 94.62 90.35 1/16/2004 95 95.35 94.71 95.32 9303000 5715662 -43646458 92.58 95.03 90.14 1/20/2004 96 97.44 95.73 97.1 9285300 5775438 -38053558 92.8 95.94 89.66 1/21/2004 97.23 98.04 96.64 97.7 6952800 5801116 -34477832 93.03 96.83 89.23 1/22/2004 97.84 98.16 97.32 97.51 4371600 5777146 -36871804 93.23 97.51 88.96 1/23/2004 97.82 98.21 97.1 97.9 5283800 5715892 -34539316 93.49 98.21 88.77 1/26/2004 97.9 99.85 97.56 99.85 6190100 5742870 -28349216 93.87 99.3 88.44 1/27/2004 99.4 99.67 98.7 98.8 5345500 5731656 -32592551 94.16 99.98 88.35 1/28/2004 99.15 99.42 97.28 97.38 6552200 5757142 -38532396 94.36 100.33 88.38 1/29/2004 98.1 98.6 96.55 98.01 6642500 5799782 -35713383 94.63 100.75 88.5 1/30/2004 98.02 99.33 97.84 99.23 6137600 5827556 -30399622 94.95 101.32 88.59 2/2/2004 99.15 99.94 98.5 99.39 6200000 5845866 -28935733 95.35 101.79 88.9 2/3/2004 99 100 98.95 100 5604600 5874820 -23331133 95.69 102.35 89.04 2/4/2004 99.38 100.43 99.3 100.19 8391300 5940400 -18504279 96.05 102.87 89.23 2/5/2004 100 100.09 98.26 98.86 5974900 5941192 -20561212 96.35 103.1 89.6 2/6/2004 98.85 99.24 98.25 98.94 5400900 5954762 -18433585 96.65 103.31 89.99 2/9/2004 99.4 99.44 98.6 98.95 3742300 5943486 -19057302 97.04 103.27 90.8 2/10/2004 98.45 99.97 98.41 99.61 4057500 5941700 -16872494 97.44 103.23 91.65 2/11/2004 99.2 100.31 98.8 99.96 5505700 6007950 -13919105 97.95 102.62 93.28 2/12/2004 100.06 100.3 99.3 99.3 3611700 5975496 -17530805 98.4 101.51 95.29 2/13/2004 99.1 100.09 99.08 99.71 3562500 5944888 -16648998 98.69 101.1 96.27 2/17/2004 99.99 100 99.32 99.37 3930700 5900090 -20001654 98.89 100.76 97.02 2/18/2004 99.31 99.77 98.15 98.42 4830000 5889476 -23221654 98.95 100.65 97.25 2/19/2004 98.42 99.23 97.52 97.8 5448100 5880870 -26885581 98.96 100.64 97.27 2/20/2004 98 98.6 97.19 97.31 5689200 5887814 -31606407 98.95 100.67 97.23 2/23/2004 97.4 97.51 95.46 95.96 6629600 5880976 -35002055 98.85 100.97 96.73 2/24/2004 95.2 97.46 95.2 96.79 7012100 5878410 -32147572 98.7 100.95 96.45 2/25/2004 96.5 97.09 96.23 96.54 3362500 5817418 -33085944 98.59 101.02 96.15 2/26/2004 96.27 97.26 96.25 96.79 3967500 5795168 -32810969 98.56 101.06 96.05 2/27/2004 96.8 97.38 96.1 96.64 3829800 5752474 -33409375 98.49 101.12 95.85 gnuplot-4.6.4/demo/battery.dat0000644000471100001440000000135406515203631013225 0ustar # # $Id: battery.dat,v 1.1.1.1 1998/04/15 19:16:41 lhecking Exp $ # 50.000000 0.036990 2.500000 0.007039 47.000000 0.036990 2.500000 0.007039 44.000000 0.038360 2.500000 0.007053 41.000000 0.042160 2.500000 0.007050 38.000000 0.043200 2.500000 0.007018 35.000000 0.046900 2.500000 0.007021 32.000000 0.048840 2.500000 0.006963 29.000000 0.052000 2.500000 0.006929 26.000000 0.055470 2.500000 0.006947 23.000000 0.060000 2.500000 0.006882 20.000000 0.064660 2.500000 0.006879 17.000000 0.069600 2.500000 0.006936 14.000000 0.079800 2.500000 0.007080 11.000000 0.086920 2.500000 0.007232 8.000000 0.085500 2.500000 0.007262 5.000000 0.101260 2.500000 0.008415 2.000000 0.091000 2.500000 0.011203 0.000000 0.081480 2.500000 0.011828 gnuplot-4.6.4/demo/mgr.dem0000644000471100001440000000557111550170255012342 0ustar # # $Id: mgr.dem,v 1.10 2011/04/09 23:50:05 sfeam Exp $ # print "Watch some cubic splines" set samples 50 set xlabel "Angle (deg)" set ylabel "Amplitude" set key box set title "Bragg reflection -- Peak only" plot "big_peak.dat" title "Rate" with errorbars, \ "" smooth csplines t "Rate" pause -1 "You would draw smaller bars? (-> return)" set bars small replot set bars large # pause -1 "An approx-spline demo (-> return)" set samples 300 set xlabel "Time (sec)" set ylabel "Rate" set title "Ag 108 decay data" plot "silver.dat" t "experimental" w errorb, \ "" smooth csplines t "cubic smooth" # error is column 3; weight larger errors less # start with rel error = 1/($3/$2) pause -1 "Now apply a smoothing spline, weighted by 1/rel error (-> return)" S=1 plot "silver.dat" t "experimental" w errorb,\ "" u 1:2:(S*$2/$3) smooth acsplines t "acspline Y/Z" pause -1 "Make it smoother by changing the smoothing weights (-> return)" plot "silver.dat" t "rate" w errorb,\ "" u 1:2:($2/($3*1.e1)) sm acs t "acspline Y/(Z*1.e1)",\ "" u 1:2:($2/($3*1.e3)) sm acs t " Y/(Z*1.e3)",\ "" u 1:2:($2/($3*1.e5)) sm acs t " Y/(Z*1.e5)" pause -1 "Accentuate the relative changes with a log-scale (-> return)" set logscale y set grid x y mx my replot pause -1 "Now approximate the data with a bezier curve between the endpoints (-> return)" unset logscale y plot "silver.dat" t "experimental" w errorb,\ "" smooth sbezier t "bezier" pause -1 "You would rather use log-scales ? (-> return)" set logscale y plot "silver.dat" t "rate" w errorb, \ "" smooth sbezier t "bezier" # pause -1 "Errorbar demo (-> return)" set samples 100 unset logscale unset grid set xlabel "Resistance [Ohm]" set ylabel "Power [W]" set title "UM1-Cell Power" n(x)=1.53**2*x/(5.67+x)**2 plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines pause -1 "Would you like boxes? (-> return)" plot [0:50] "battery.dat" t "Power" with boxxy, n(x) t "Theory" w lines pause -1 "Only X-Bars? (-> return)" plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines pause -1 "Only Y-Bars? (-> return)" plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines pause -1 "Logscaled? (-> return)" set logscale y plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines pause -1 "X as well? (-> return)" set logscale xy plot [1:50] "battery.dat" t "Power" w xyerr, n(x) t "Theory" w lines pause -1 "If you like bars without tics (-> return)" unset logscale set bars small plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines pause -1 "X-Bars only (-> return)" plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines pause -1 "Y-Bars only (-> return)" plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines reset gnuplot-4.6.4/demo/GM1_sugar.pdb0000644000471100001440000001071410344746270013343 0ustar ATOM 3447 C1 GAL 4104 24.274 47.792 19.835 1.000 14.59 ATOM 3448 C2 GAL 4104 24.176 49.165 20.487 1.000 12.19 ATOM 3449 O2 GAL 4104 25.483 49.510 20.991 1.000 11.73 ATOM 3450 C3 GAL 4104 23.209 49.050 21.658 1.000 11.12 ATOM 3451 O3 GAL 4104 23.057 50.366 22.204 1.000 12.25 ATOM 3452 C4 GAL 4104 21.835 48.584 21.103 1.000 11.73 ATOM 3453 O4 GAL 4104 21.274 49.559 20.255 1.000 11.60 ATOM 3454 C5 GAL 4104 22.026 47.272 20.344 1.000 13.15 ATOM 3455 O5 GAL 4104 22.979 47.477 19.256 1.000 13.60 ATOM 3456 C6 GAL 4104 20.741 46.846 19.619 1.000 13.60 ATOM 3457 O6 GAL 4104 20.894 45.566 18.998 1.000 15.59 ATOM 3458 C1 NGA 4105 27.252 45.209 17.378 1.000 21.21 ATOM 3459 C2 NGA 4105 26.959 46.528 18.117 1.000 20.14 ATOM 3460 N2 NGA 4105 27.603 46.464 19.414 1.000 20.48 ATOM 3461 C7 NGA 4105 28.513 47.279 19.926 1.000 18.87 ATOM 3462 O7 NGA 4105 28.869 48.331 19.310 1.000 19.49 ATOM 3463 C8 NGA 4105 29.119 46.778 21.241 1.000 19.37 ATOM 3464 C3 NGA 4105 25.446 46.643 18.176 1.000 19.96 ATOM 3465 O3 NGA 4105 25.162 47.930 18.736 1.000 17.50 ATOM 3466 C4 NGA 4105 24.811 46.603 16.773 1.000 20.35 ATOM 3467 O4 NGA 4105 25.151 47.806 16.078 1.000 23.85 ATOM 3468 C5 NGA 4105 25.258 45.344 16.062 1.000 20.15 ATOM 3469 O5 NGA 4105 26.703 45.283 16.050 1.000 20.49 ATOM 3470 C6 NGA 4105 24.710 45.153 14.665 1.000 25.80 ATOM 3471 O6 NGA 4105 23.316 45.441 14.605 1.000 32.95 ATOM 3472 C1 GAL 4106 31.960 44.335 17.404 1.000 24.29 ATOM 3473 C2 GAL 4106 31.068 44.349 18.640 1.000 23.83 ATOM 3474 O2 GAL 4106 31.815 43.966 19.778 1.000 25.25 ATOM 3475 C3 GAL 4106 29.897 43.356 18.485 1.000 21.88 ATOM 3476 O3 GAL 4106 29.018 43.614 19.573 1.000 21.99 ATOM 3477 C4 GAL 4106 29.148 43.705 17.180 1.000 20.86 ATOM 3478 O4 GAL 4106 28.678 45.048 17.287 1.000 19.55 ATOM 3479 C5 GAL 4106 30.131 43.605 16.018 1.000 21.56 ATOM 3480 O5 GAL 4106 31.144 44.613 16.262 1.000 23.16 ATOM 3481 C6 GAL 4106 29.483 43.969 14.687 1.000 22.99 ATOM 3482 O6 GAL 4106 30.418 43.995 13.615 1.000 23.41 ATOM 3483 C1 GLC 4107 36.728 46.364 18.623 1.000 22.47 ATOM 3484 O1 GLC 4107 37.836 46.079 19.510 1.000 20.73 ATOM 3485 C2 GLC 4107 36.470 45.042 17.892 1.000 23.72 ATOM 3486 O2 GLC 4107 37.471 44.870 16.894 1.000 31.01 ATOM 3487 C3 GLC 4107 35.142 45.024 17.152 1.000 25.13 ATOM 3488 O3 GLC 4107 34.908 43.746 16.584 1.000 29.28 ATOM 3489 C4 GLC 4107 34.033 45.358 18.168 1.000 25.07 ATOM 3490 O4 GLC 4107 32.835 45.478 17.402 1.000 25.51 ATOM 3491 C5 GLC 4107 34.347 46.706 18.792 1.000 24.20 ATOM 3492 O5 GLC 4107 35.606 46.635 19.468 1.000 23.30 ATOM 3493 C6 GLC 4107 33.257 47.174 19.783 1.000 24.18 ATOM 3494 O6 GLC 4107 33.105 46.266 20.831 1.000 29.24 ATOM 3495 C1 SIA 4108 27.548 43.223 21.397 1.000 23.35 ATOM 3496 O1A SIA 4108 26.518 43.898 21.026 1.000 20.89 ATOM 3497 O1B SIA 4108 27.939 43.048 22.572 1.000 20.60 ATOM 3498 C2 SIA 4108 28.382 42.554 20.297 1.000 21.87 ATOM 3499 C3 SIA 4108 29.322 41.569 20.940 1.000 22.84 ATOM 3500 C4 SIA 4108 28.588 40.419 21.610 1.000 23.68 ATOM 3501 O4 SIA 4108 29.534 39.379 21.912 1.000 25.40 ATOM 3502 C5 SIA 4108 27.530 39.793 20.690 1.000 23.28 ATOM 3503 N5 SIA 4108 26.764 38.830 21.480 1.000 21.15 ATOM 3504 C10 SIA 4108 26.232 37.716 20.977 1.000 21.55 ATOM 3505 O10 SIA 4108 26.344 37.428 19.748 1.000 25.29 ATOM 3506 C11 SIA 4108 25.476 36.832 22.002 1.000 20.24 ATOM 3507 C6 SIA 4108 26.643 40.877 20.076 1.000 21.42 ATOM 3508 O6 SIA 4108 27.475 41.878 19.440 1.000 23.05 ATOM 3509 C7 SIA 4108 25.704 40.334 18.987 1.000 22.18 ATOM 3510 O7 SIA 4108 26.383 39.550 17.967 1.000 21.18 ATOM 3511 C8 SIA 4108 25.207 41.572 18.210 1.000 21.23 ATOM 3512 O8 SIA 4108 24.686 42.525 19.109 1.000 19.44 ATOM 3513 C9 SIA 4108 24.045 41.079 17.325 1.000 23.07 ATOM 3514 O9 SIA 4108 23.711 42.067 16.394 1.000 23.31 gnuplot-4.6.4/demo/poldat.dem0000644000471100001440000004035111471336776013051 0ustar # # $Id: poldat.dem,v 1.9 2010/11/18 23:59:58 sfeam Exp $ # # set size square set time set clip set xtics axis nomirror set ytics axis nomirror unset grid unset polar set title "Primitive Smith Chart" unset key set xlabel "Impedance or Admittance Coordinates" set para set rrange [-0 : 10] set trange [-pi : pi] set xrange [-1:1] set yrange [-1:1] tv(t,r) = sin(t)/(1+r) tu(t,r) = (cos(t) +r)/(1+r) cu(t,x) = 1 + cos(t)/x cv(t,x) = (1+ sin(t))/x plot cu(t,.1),cv(t,.1),cu(t,.1),-cv(t,.1),\ cu(t,1),cv(t,1),cu(t,1),-cv(t,1),\ cu(t,10),cv(t,10),cu(t,10),-cv(t,10),\ tu(t,.1),tv(t,.1),\ tu(t,.5),tv(t,.5),\ tu(t,1),tv(t,1),\ tu(t,5),tv(t,5),\ tu(t,10),tv(t,10),\ cu(t,.5),cv(t,.5),cu(t,.5),-cv(t,.5),\ tu(t,0),tv(t,0) #cu(t,5),cv(t,5),cu(t,5),-cv(t,5) pause -1 "Hit return to continue" set angles degrees set polar set grid polar 15. unset border unset param set title "Antenna Pattern" set xlabel "Azimuth" set ylabel "dBSM" set style data line set rrange [-200:60] set trange [-pi:pi] set xrange [-220:220] set yrange [-220:220] unset xtics plot "-" using 1:5,"-" # Input data ncmain.d4 generated by genpat2.f:Tx antenna pattern # x,y,z of center point B in coord 3 # -5.12 0 -1.5 # euler matrix # 0 -1 0 # 0.7071 0 0.7071 # -0.7071 0 0.7071 # theta(deg) phi(deg) E-theta(dB) phase E-phi(dB) phase 0 0 -200 0 18.992 0 2 0 -200 0 18.898 0 4 0 -200 0 18.619 0 6 0 -200 0 18.152 0 8 0 -200 0 17.497 0 10 0 -200 0 16.651 0 12 0 -200 0 15.614 0 14 0 -200 0 14.382 0 16 0 -200 0 12.952 0 18 0 -200 0 11.32 0 20 0 -200 0 9.483 0 22 0 -200 0 7.434 0 24 0 -200 0 5.169 0 26 0 -200 0 2.68 0 28 0 -200 0 -0.039 0 30 0 -200 0 -2.998 0 32 0 -200 0 -6.204 0 34 0 -200 0 -9.67 0 36 0 -200 0 -13.407 0 38 0 -200 0 -17.429 0 40 0 -200 0 -21.751 0 42 0 -200 0 -26.391 0 44 0 -200 0 -31.368 0 46 0 -200 0 -36.705 0 48 0 -200 0 -42.429 0 50 0 -200 0 -48.569 0 52 0 -200 0 -55.16 0 54 0 -200 0 -62.243 0 56 0 -200 0 -69.867 0 58 0 -200 0 -78.087 0 60 0 -200 0 -86.971 0 62 0 -200 0 -96.602 0 64 0 -200 0 -107.08 0 66 0 -200 0 -118.53 0 68 0 -200 0 -131.11 0 70 0 -200 0 -145.022 0 72 0 -200 0 -160.534 0 74 0 -200 0 -177.982 0 76 0 -200 0 -195.848 0 78 0 -200 0 -199.967 0 80 0 -200 0 -200 0 82 0 -200 0 -200 0 84 0 -200 0 -200 0 86 0 -200 0 -200 0 88 0 -200 0 -200 0 90 0 -200 0 -200 0 92 0 -200 0 -200 0 94 0 -200 0 -200 0 96 0 -200 0 -200 0 98 0 -200 0 -200 0 100 0 -200 0 -200 0 102 0 -200 0 -200 0 104 0 -200 0 -200 0 106 0 -200 0 -200 0 108 0 -200 0 -200 0 110 0 -200 0 -200 0 112 0 -200 0 -200 0 114 0 -200 0 -200 0 116 0 -200 0 -200 0 118 0 -200 0 -200 0 120 0 -200 0 -200 0 122 0 -200 0 -200 0 124 0 -200 0 -200 0 126 0 -200 0 -200 0 128 0 -200 0 -200 0 130 0 -200 0 -200 0 132 0 -200 0 -200 0 134 0 -200 0 -200 0 136 0 -200 0 -200 0 138 0 -200 0 -200 0 140 0 -200 0 -200 0 142 0 -200 0 -200 0 144 0 -200 0 -200 0 146 0 -200 0 -200 0 148 0 -200 0 -200 0 150 0 -200 0 -200 0 152 0 -200 0 -200 0 154 0 -200 0 -200 0 156 0 -200 0 -200 0 158 0 -200 0 -200 0 160 0 -200 0 -200 0 162 0 -200 0 -200 0 164 0 -200 0 -200 0 166 0 -200 0 -200 0 168 0 -200 0 -200 0 170 0 -200 0 -200 0 172 0 -200 0 -200 0 174 0 -200 0 -200 0 176 0 -200 0 -200 0 178 0 -200 0 -200 0 180 0 -200 0 -200 0 e 0 9.0007 -35.926 -71.297 9.0783 2 8.1667 0.13355 -32.735 8.9007 4 6.0696 4.0782 -28.04 8.3501 6 3.3053 4.8742 -26.062 7.3795 8 0.131 4.2554 -25.105 5.9101 10 -3.4589 2.6769 -24.794 3.8084 12 -7.6407 0.15917 -25.211 0.82257 14 -12.849 -3.6543 -26.702 -3.6253 16 -20.405 -10.185 -30.112 -11.564 18 -41.802 -37.181 -39.114 -24.83 20 -25.979 -11.868 -38.677 -10.86 22 -22.06 -7.1064 -29.743 -7.4312 24 -21.258 -5.2193 -26.432 -6.2183 26 -22.103 -4.8803 -25.429 -5.9416 28 -24.356 -5.858 -26.299 -6.0712 30 -28.216 -8.3757 -29.576 -6.4985 32 -33.989 -13.34 -38.93 -7.5039 34 -37.632 -21.69 -37.458 -9.6424 36 -35.691 -16.286 -29.566 -13.578 38 -35.22 -12.594 -27.052 -15.787 40 -36.549 -12.197 -27.142 -11.075 42 -38.418 -14.735 -29.897 -7.6375 44 -39.287 -23.397 -38.646 -6.0943 46 -39.287 -23.397 -38.646 -6.0943 48 -38.418 -14.735 -29.897 -7.6375 50 -36.549 -12.197 -27.142 -11.075 52 -35.22 -12.594 -27.052 -15.787 54 -35.691 -16.286 -29.566 -13.578 56 -37.632 -21.69 -37.458 -9.6424 58 -33.989 -13.34 -38.93 -7.5039 60 -28.216 -8.3757 -29.576 -6.4985 62 -24.356 -5.858 -26.299 -6.0712 64 -22.103 -4.8803 -25.429 -5.9416 66 -21.258 -5.2193 -26.432 -6.2183 68 -22.06 -7.1064 -29.743 -7.4312 70 -25.979 -11.868 -38.677 -10.86 72 -41.802 -37.18 -39.114 -24.83 74 -20.405 -10.185 -30.112 -11.564 76 -12.849 -3.6543 -26.702 -3.6253 78 -7.6407 0.15917 -25.211 0.82257 80 -3.4589 2.6769 -24.794 3.8084 82 0.131 4.2554 -25.105 5.9101 84 3.3053 4.8742 -26.062 7.3795 86 6.0696 4.0782 -28.04 8.3501 88 8.1667 0.13355 -32.735 8.9007 90 9.0007 -35.926 -71.297 9.0783 92 8.1667 0.13355 -32.735 8.9007 94 6.0696 4.0782 -28.04 8.3501 96 3.3053 4.8742 -26.062 7.3795 98 0.131 4.2554 -25.105 5.9101 100 -3.4589 2.6769 -24.794 3.8084 102 -7.6407 0.15917 -25.211 0.82257 104 -12.849 -3.6543 -26.702 -3.6253 106 -20.405 -10.185 -30.112 -11.564 108 -41.802 -37.181 -39.114 -24.83 110 -25.979 -11.868 -38.677 -10.86 112 -22.06 -7.1064 -29.743 -7.4312 114 -21.258 -5.2193 -26.432 -6.2183 116 -22.103 -4.8803 -25.429 -5.9416 118 -24.356 -5.858 -26.299 -6.0712 120 -28.216 -8.3757 -29.576 -6.4985 122 -33.989 -13.34 -38.93 -7.5039 124 -37.632 -21.69 -37.458 -9.6424 126 -35.691 -16.286 -29.566 -13.578 128 -35.22 -12.594 -27.052 -15.787 130 -36.549 -12.197 -27.142 -11.075 132 -38.418 -14.735 -29.897 -7.6375 134 -39.287 -23.397 -38.646 -6.0943 136 -39.287 -23.397 -38.646 -6.0943 138 -38.418 -14.735 -29.897 -7.6375 140 -36.549 -12.197 -27.142 -11.075 142 -35.22 -12.594 -27.052 -15.787 144 -35.691 -16.286 -29.566 -13.578 146 -37.632 -21.69 -37.458 -9.6424 148 -33.989 -13.34 -38.93 -7.5039 150 -28.216 -8.3757 -29.576 -6.4985 152 -24.356 -5.858 -26.299 -6.0712 154 -22.103 -4.8803 -25.429 -5.9416 156 -21.258 -5.2193 -26.432 -6.2183 158 -22.06 -7.1064 -29.743 -7.4312 160 -25.979 -11.868 -38.677 -10.86 162 -41.802 -37.181 -39.114 -24.83 164 -20.405 -10.185 -30.112 -11.564 166 -12.849 -3.6543 -26.702 -3.6253 168 -7.6407 0.15917 -25.211 0.82257 170 -3.4589 2.6769 -24.794 3.8084 172 0.131 4.2554 -25.105 5.9101 174 3.3053 4.8742 -26.062 7.3795 176 6.0696 4.0782 -28.04 8.3501 178 8.1667 0.13355 -32.735 8.9007 180 9.0007 -35.926 -71.297 9.0783 182 8.1667 0.13355 -32.735 8.9007 184 6.0696 4.0782 -28.04 8.3501 186 3.3053 4.8742 -26.062 7.3795 188 0.131 4.2554 -25.105 5.9101 190 -3.4589 2.6769 -24.794 3.8084 192 -7.6407 0.15917 -25.211 0.82257 194 -12.849 -3.6543 -26.702 -3.6253 196 -20.405 -10.185 -30.112 -11.564 198 -41.802 -37.181 -39.114 -24.83 200 -25.979 -11.868 -38.677 -10.86 202 -22.06 -7.1064 -29.743 -7.4312 204 -21.258 -5.2193 -26.432 -6.2183 206 -22.103 -4.8803 -25.429 -5.9416 208 -24.356 -5.858 -26.299 -6.0712 210 -28.216 -8.3757 -29.576 -6.4985 212 -33.989 -13.34 -38.93 -7.5039 214 -37.632 -21.69 -37.458 -9.6424 216 -35.691 -16.286 -29.566 -13.578 218 -35.22 -12.594 -27.052 -15.787 220 -36.549 -12.197 -27.142 -11.075 222 -38.418 -14.735 -29.897 -7.6375 224 -39.287 -23.397 -38.646 -6.0943 226 -39.287 -23.397 -38.646 -6.0943 228 -38.418 -14.735 -29.897 -7.6375 230 -36.549 -12.197 -27.142 -11.075 232 -35.22 -12.594 -27.052 -15.787 234 -35.691 -16.286 -29.566 -13.578 236 -37.632 -21.69 -37.458 -9.6424 238 -33.989 -13.34 -38.93 -7.5039 240 -28.216 -8.3757 -29.576 -6.4985 242 -24.356 -5.858 -26.299 -6.0712 244 -22.103 -4.8803 -25.429 -5.9416 246 -21.258 -5.2193 -26.432 -6.2183 248 -22.06 -7.1064 -29.743 -7.4312 250 -25.979 -11.868 -38.677 -10.86 252 -41.802 -37.18 -39.114 -24.83 254 -20.405 -10.185 -30.112 -11.564 256 -12.849 -3.6543 -26.702 -3.6253 258 -7.6407 0.15917 -25.211 0.82257 260 -3.4589 2.6769 -24.794 3.8084 262 0.131 4.2554 -25.105 5.9101 264 3.3053 4.8742 -26.062 7.3795 266 6.0696 4.0782 -28.04 8.3501 268 8.1667 0.13355 -32.735 8.9007 270 9.0007 -35.926 -71.297 9.0783 272 8.1667 0.13355 -32.735 8.9007 274 6.0696 4.0782 -28.04 8.3501 276 3.3053 4.8742 -26.062 7.3795 278 0.13099 4.2554 -25.105 5.9101 280 -3.4589 2.6769 -24.794 3.8084 282 -7.6407 0.15917 -25.211 0.82257 284 -12.849 -3.6543 -26.702 -3.6253 286 -20.405 -10.185 -30.112 -11.564 288 -41.802 -37.181 -39.114 -24.83 290 -25.979 -11.868 -38.677 -10.86 292 -22.06 -7.1064 -29.743 -7.4312 294 -21.258 -5.2193 -26.432 -6.2183 296 -22.103 -4.8803 -25.429 -5.9416 298 -24.356 -5.858 -26.299 -6.0712 300 -28.216 -8.3757 -29.576 -6.4985 302 -33.989 -13.34 -38.93 -7.5039 304 -37.632 -21.69 -37.458 -9.6424 306 -35.691 -16.286 -29.566 -13.578 308 -35.22 -12.594 -27.052 -15.787 310 -36.549 -12.197 -27.142 -11.075 312 -38.418 -14.735 -29.897 -7.6375 314 -39.287 -23.397 -38.646 -6.0943 316 -39.287 -23.397 -38.646 -6.0943 318 -38.418 -14.735 -29.897 -7.6375 320 -36.549 -12.197 -27.142 -11.075 322 -35.22 -12.594 -27.052 -15.787 324 -35.691 -16.286 -29.566 -13.578 326 -37.632 -21.69 -37.458 -9.6424 328 -33.989 -13.34 -38.93 -7.5039 330 -28.216 -8.3757 -29.576 -6.4985 332 -24.356 -5.858 -26.299 -6.0712 334 -22.103 -4.8803 -25.429 -5.9416 336 -21.258 -5.2193 -26.432 -6.2183 338 -22.06 -7.1064 -29.743 -7.4312 340 -25.979 -11.868 -38.677 -10.86 342 -41.802 -37.181 -39.114 -24.83 344 -20.405 -10.185 -30.112 -11.564 346 -12.849 -3.6543 -26.702 -3.6253 348 -7.6407 0.15917 -25.211 0.82257 350 -3.4589 2.6769 -24.794 3.8084 352 0.131 4.2554 -25.105 5.9101 354 3.3053 4.8742 -26.062 7.3795 356 6.0696 4.0782 -28.04 8.3501 358 8.1667 0.13355 -32.735 8.9007 360 9.0007 -35.926 -71.297 9.0783 2 8.1667 0.13355 -32.735 8.9007 4 6.0696 4.0782 -28.04 8.3501 6 3.3053 4.8742 -26.062 7.3795 8 0.131 4.2554 -25.105 5.9101 10 -3.4589 2.6769 -24.794 3.8084 12 -7.6407 0.15917 -25.211 0.82257 14 -12.849 -3.6543 -26.702 -3.6253 16 -20.405 -10.185 -30.112 -11.564 18 -41.802 -37.181 -39.114 -24.83 20 -25.979 -11.868 -38.677 -10.86 22 -22.06 -7.1064 -29.743 -7.4312 24 -21.258 -5.2193 -26.432 -6.2183 26 -22.103 -4.8803 -25.429 -5.9416 28 -24.356 -5.858 -26.299 -6.0712 30 -28.216 -8.3757 -29.576 -6.4985 32 -33.989 -13.34 -38.93 -7.5039 34 -37.632 -21.69 -37.458 -9.6424 36 -35.691 -16.286 -29.566 -13.578 38 -35.22 -12.594 -27.052 -15.787 40 -36.549 -12.197 -27.142 -11.075 42 -38.418 -14.735 -29.897 -7.6375 44 -39.287 -23.397 -38.646 -6.0943 46 -39.287 -23.397 -38.646 -6.0943 48 -38.418 -14.735 -29.897 -7.6375 50 -36.549 -12.197 -27.142 -11.075 52 -35.22 -12.594 -27.052 -15.787 54 -35.691 -16.286 -29.566 -13.578 56 -37.632 -21.69 -37.458 -9.6424 58 -33.989 -13.34 -38.93 -7.5039 60 -28.216 -8.3757 -29.576 -6.4985 62 -24.356 -5.858 -26.299 -6.0712 64 -22.103 -4.8803 -25.429 -5.9416 66 -21.258 -5.2193 -26.432 -6.2183 68 -22.06 -7.1064 -29.743 -7.4312 70 -25.979 -11.868 -38.677 -10.86 72 -41.802 -37.18 -39.114 -24.83 74 -20.405 -10.185 -30.112 -11.564 76 -12.849 -3.6543 -26.702 -3.6253 78 -7.6407 0.15917 -25.211 0.82257 80 -3.4589 2.6769 -24.794 3.8084 82 0.131 4.2554 -25.105 5.9101 84 3.3053 4.8742 -26.062 7.3795 86 6.0696 4.0782 -28.04 8.3501 88 8.1667 0.13355 -32.735 8.9007 90 9.0007 -35.926 -71.297 9.0783 92 8.1667 0.13355 -32.735 8.9007 94 6.0696 4.0782 -28.04 8.3501 96 3.3053 4.8742 -26.062 7.3795 98 0.131 4.2554 -25.105 5.9101 100 -3.4589 2.6769 -24.794 3.8084 102 -7.6407 0.15917 -25.211 0.82257 104 -12.849 -3.6543 -26.702 -3.6253 106 -20.405 -10.185 -30.112 -11.564 108 -41.802 -37.181 -39.114 -24.83 110 -25.979 -11.868 -38.677 -10.86 112 -22.06 -7.1064 -29.743 -7.4312 114 -21.258 -5.2193 -26.432 -6.2183 116 -22.103 -4.8803 -25.429 -5.9416 118 -24.356 -5.858 -26.299 -6.0712 120 -28.216 -8.3757 -29.576 -6.4985 122 -33.989 -13.34 -38.93 -7.5039 124 -37.632 -21.69 -37.458 -9.6424 126 -35.691 -16.286 -29.566 -13.578 128 -35.22 -12.594 -27.052 -15.787 130 -36.549 -12.197 -27.142 -11.075 132 -38.418 -14.735 -29.897 -7.6375 134 -39.287 -23.397 -38.646 -6.0943 136 -39.287 -23.397 -38.646 -6.0943 138 -38.418 -14.735 -29.897 -7.6375 140 -36.549 -12.197 -27.142 -11.075 142 -35.22 -12.594 -27.052 -15.787 144 -35.691 -16.286 -29.566 -13.578 146 -37.632 -21.69 -37.458 -9.6424 148 -33.989 -13.34 -38.93 -7.5039 150 -28.216 -8.3757 -29.576 -6.4985 152 -24.356 -5.858 -26.299 -6.0712 154 -22.103 -4.8803 -25.429 -5.9416 156 -21.258 -5.2193 -26.432 -6.2183 158 -22.06 -7.1064 -29.743 -7.4312 160 -25.979 -11.868 -38.677 -10.86 162 -41.802 -37.181 -39.114 -24.83 164 -20.405 -10.185 -30.112 -11.564 166 -12.849 -3.6543 -26.702 -3.6253 168 -7.6407 0.15917 -25.211 0.82257 170 -3.4589 2.6769 -24.794 3.8084 172 0.131 4.2554 -25.105 5.9101 174 3.3053 4.8742 -26.062 7.3795 176 6.0696 4.0782 -28.04 8.3501 178 8.1667 0.13355 -32.735 8.9007 180 9.0007 -35.926 -71.297 9.0783 182 8.1667 0.13355 -32.735 8.9007 184 6.0696 4.0782 -28.04 8.3501 186 3.3053 4.8742 -26.062 7.3795 188 0.131 4.2554 -25.105 5.9101 190 -3.4589 2.6769 -24.794 3.8084 192 -7.6407 0.15917 -25.211 0.82257 194 -12.849 -3.6543 -26.702 -3.6253 196 -20.405 -10.185 -30.112 -11.564 198 -41.802 -37.181 -39.114 -24.83 200 -25.979 -11.868 -38.677 -10.86 202 -22.06 -7.1064 -29.743 -7.4312 204 -21.258 -5.2193 -26.432 -6.2183 206 -22.103 -4.8803 -25.429 -5.9416 208 -24.356 -5.858 -26.299 -6.0712 210 -28.216 -8.3757 -29.576 -6.4985 212 -33.989 -13.34 -38.93 -7.5039 214 -37.632 -21.69 -37.458 -9.6424 216 -35.691 -16.286 -29.566 -13.578 218 -35.22 -12.594 -27.052 -15.787 220 -36.549 -12.197 -27.142 -11.075 222 -38.418 -14.735 -29.897 -7.6375 224 -39.287 -23.397 -38.646 -6.0943 226 -39.287 -23.397 -38.646 -6.0943 228 -38.418 -14.735 -29.897 -7.6375 230 -36.549 -12.197 -27.142 -11.075 232 -35.22 -12.594 -27.052 -15.787 234 -35.691 -16.286 -29.566 -13.578 236 -37.632 -21.69 -37.458 -9.6424 238 -33.989 -13.34 -38.93 -7.5039 240 -28.216 -8.3757 -29.576 -6.4985 242 -24.356 -5.858 -26.299 -6.0712 244 -22.103 -4.8803 -25.429 -5.9416 246 -21.258 -5.2193 -26.432 -6.2183 248 -22.06 -7.1064 -29.743 -7.4312 250 -25.979 -11.868 -38.677 -10.86 252 -41.802 -37.18 -39.114 -24.83 254 -20.405 -10.185 -30.112 -11.564 256 -12.849 -3.6543 -26.702 -3.6253 258 -7.6407 0.15917 -25.211 0.82257 260 -3.4589 2.6769 -24.794 3.8084 262 0.131 4.2554 -25.105 5.9101 264 3.3053 4.8742 -26.062 7.3795 266 6.0696 4.0782 -28.04 8.3501 268 8.1667 0.13355 -32.735 8.9007 270 9.0007 -35.926 -71.297 9.0783 272 8.1667 0.13355 -32.735 8.9007 274 6.0696 4.0782 -28.04 8.3501 276 3.3053 4.8742 -26.062 7.3795 278 0.13099 4.2554 -25.105 5.9101 280 -3.4589 2.6769 -24.794 3.8084 282 -7.6407 0.15917 -25.211 0.82257 284 -12.849 -3.6543 -26.702 -3.6253 286 -20.405 -10.185 -30.112 -11.564 288 -41.802 -37.181 -39.114 -24.83 290 -25.979 -11.868 -38.677 -10.86 292 -22.06 -7.1064 -29.743 -7.4312 294 -21.258 -5.2193 -26.432 -6.2183 296 -22.103 -4.8803 -25.429 -5.9416 298 -24.356 -5.858 -26.299 -6.0712 300 -28.216 -8.3757 -29.576 -6.4985 302 -33.989 -13.34 -38.93 -7.5039 304 -37.632 -21.69 -37.458 -9.6424 306 -35.691 -16.286 -29.566 -13.578 308 -35.22 -12.594 -27.052 -15.787 310 -36.549 -12.197 -27.142 -11.075 312 -38.418 -14.735 -29.897 -7.6375 314 -39.287 -23.397 -38.646 -6.0943 316 -39.287 -23.397 -38.646 -6.0943 318 -38.418 -14.735 -29.897 -7.6375 320 -36.549 -12.197 -27.142 -11.075 322 -35.22 -12.594 -27.052 -15.787 324 -35.691 -16.286 -29.566 -13.578 326 -37.632 -21.69 -37.458 -9.6424 328 -33.989 -13.34 -38.93 -7.5039 330 -28.216 -8.3757 -29.576 -6.4985 332 -24.356 -5.858 -26.299 -6.0712 334 -22.103 -4.8803 -25.429 -5.9416 336 -21.258 -5.2193 -26.432 -6.2183 338 -22.06 -7.1064 -29.743 -7.4312 340 -25.979 -11.868 -38.677 -10.86 342 -41.802 -37.181 -39.114 -24.83 344 -20.405 -10.185 -30.112 -11.564 346 -12.849 -3.6543 -26.702 -3.6253 348 -7.6407 0.15917 -25.211 0.82257 350 -3.4589 2.6769 -24.794 3.8084 352 0.131 4.2554 -25.105 5.9101 354 3.3053 4.8742 -26.062 7.3795 356 6.0696 4.0782 -28.04 8.3501 358 8.1667 0.13355 -32.735 8.9007 360 9.0007 -35.926 -71.297 9.0783 e pause -1 "Hit return to continue" reset set polar set grid polar set border 0 set logscale r 10 set view equal xy set size square set noxtics set noytics set rrange [.5:19] set rtics axis scale 0.5,0 nomirror rotate by -270 offset 0, 0.7 set rtics (2,5,10,15) set key opaque box samplen 0.75 set title "log scale polar axis" # set style data impulse plot 'silver.dat' using ($1/100.):3:0 lc var lw 2 title 'silver.dat' pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/hexa.fnc0000644000471100001440000000204006515203631012467 0ustar # # Use this function to fit sound velocity data as function of # sound propagation direction, indicated by its angle against the # z-axis of an hexagonal symmetry coordinate system # # Adjustable parameters: # # c33, c11, c13, c44 elastic moduli - materials constants # phi0 angle offset # # HBB 970522: factored out common factor 1e9 from c?? into the # function, to improve the fit convergence. Fit parameters were # just too grossly different before. rho = 1000.0 # density in kg/m3 phi(x) = (x - phi0)/360.0*2.0*pi main(x) = c11*sin(phi(x))**2 + c33*cos(phi(x))**2 + c44 mixed(x) = sqrt( ((c11-c44)*sin(phi(x))**2 \ +(c44-c33)*cos(phi(x))**2)**2 \ +(2.0*(c13+c44)*sin(phi(x))*cos(phi(x)))**2 ) vlong(x) = sqrt(1.0/2.0/rho*1e9*(main(x) + mixed(x))) vtrans(x) = sqrt(1.0/2.0/rho*1e9*(main(x) - mixed(x))) # When we read the file in, we set y=index, and we use # y in this (pseudo) 3d fit to choose an x function f(x,y) = y==1 ? vlong(x) : vtrans(x) gnuplot-4.6.4/demo/GM1_bonds.r3d0000644000471100001440000002437010344746270013255 0ustar 24.274 47.792 19.835 0.200 24.176 49.165 20.487 0.200 0.625 0.625 0.625 24.274 47.792 19.835 0.200 23.626 47.634 19.545 0.200 0.625 0.625 0.625 23.626 47.634 19.545 0.200 22.979 47.477 19.256 0.200 0.750 0.050 0.050 24.274 47.792 19.835 0.200 24.718 47.861 19.285 0.200 0.625 0.625 0.625 24.718 47.861 19.285 0.200 25.162 47.930 18.736 0.200 0.750 0.050 0.050 24.176 49.165 20.487 0.200 24.830 49.338 20.739 0.200 0.625 0.625 0.625 24.830 49.338 20.739 0.200 25.483 49.510 20.991 0.200 0.750 0.050 0.050 24.176 49.165 20.487 0.200 23.209 49.050 21.658 0.200 0.625 0.625 0.625 23.209 49.050 21.658 0.200 23.133 49.708 21.931 0.200 0.625 0.625 0.625 23.133 49.708 21.931 0.200 23.057 50.366 22.204 0.200 0.750 0.050 0.050 23.209 49.050 21.658 0.200 21.835 48.584 21.103 0.200 0.625 0.625 0.625 21.835 48.584 21.103 0.200 21.555 49.071 20.679 0.200 0.625 0.625 0.625 21.555 49.071 20.679 0.200 21.274 49.559 20.255 0.200 0.750 0.050 0.050 21.835 48.584 21.103 0.200 22.026 47.272 20.344 0.200 0.625 0.625 0.625 22.026 47.272 20.344 0.200 22.502 47.375 19.800 0.200 0.625 0.625 0.625 22.502 47.375 19.800 0.200 22.979 47.477 19.256 0.200 0.750 0.050 0.050 22.026 47.272 20.344 0.200 20.741 46.846 19.619 0.200 0.625 0.625 0.625 20.741 46.846 19.619 0.200 20.817 46.206 19.308 0.200 0.625 0.625 0.625 20.817 46.206 19.308 0.200 20.894 45.566 18.998 0.200 0.750 0.050 0.050 27.252 45.209 17.378 0.200 26.959 46.528 18.117 0.200 0.625 0.625 0.625 27.252 45.209 17.378 0.200 26.978 45.246 16.714 0.200 0.625 0.625 0.625 26.978 45.246 16.714 0.200 26.703 45.283 16.050 0.200 0.750 0.050 0.050 27.252 45.209 17.378 0.200 27.965 45.129 17.333 0.200 0.625 0.625 0.625 27.965 45.129 17.333 0.200 28.678 45.048 17.287 0.200 0.750 0.050 0.050 26.959 46.528 18.117 0.200 27.281 46.496 18.765 0.200 0.625 0.625 0.625 27.281 46.496 18.765 0.200 27.603 46.464 19.414 0.200 0.125 0.125 1.000 26.959 46.528 18.117 0.200 25.446 46.643 18.176 0.200 0.625 0.625 0.625 27.603 46.464 19.414 0.200 28.058 46.871 19.670 0.200 0.125 0.125 1.000 28.058 46.871 19.670 0.200 28.513 47.279 19.926 0.200 0.625 0.625 0.625 28.513 47.279 19.926 0.200 28.691 47.805 19.618 0.200 0.625 0.625 0.625 28.691 47.805 19.618 0.200 28.869 48.331 19.310 0.200 0.750 0.050 0.050 28.513 47.279 19.926 0.200 29.119 46.778 21.241 0.200 0.625 0.625 0.625 25.446 46.643 18.176 0.200 25.304 47.286 18.456 0.200 0.625 0.625 0.625 25.304 47.286 18.456 0.200 25.162 47.930 18.736 0.200 0.750 0.050 0.050 25.446 46.643 18.176 0.200 24.811 46.603 16.773 0.200 0.625 0.625 0.625 24.811 46.603 16.773 0.200 24.981 47.204 16.425 0.200 0.625 0.625 0.625 24.981 47.204 16.425 0.200 25.151 47.806 16.078 0.200 0.750 0.050 0.050 24.811 46.603 16.773 0.200 25.258 45.344 16.062 0.200 0.625 0.625 0.625 25.258 45.344 16.062 0.200 25.980 45.313 16.056 0.200 0.625 0.625 0.625 25.980 45.313 16.056 0.200 26.703 45.283 16.050 0.200 0.750 0.050 0.050 25.258 45.344 16.062 0.200 24.710 45.153 14.665 0.200 0.625 0.625 0.625 24.710 45.153 14.665 0.200 24.013 45.297 14.635 0.200 0.625 0.625 0.625 24.013 45.297 14.635 0.200 23.316 45.441 14.605 0.200 0.750 0.050 0.050 31.960 44.335 17.404 0.200 31.068 44.349 18.640 0.200 0.625 0.625 0.625 31.960 44.335 17.404 0.200 31.552 44.474 16.833 0.200 0.625 0.625 0.625 31.552 44.474 16.833 0.200 31.144 44.613 16.262 0.200 0.750 0.050 0.050 31.960 44.335 17.404 0.200 32.397 44.907 17.403 0.200 0.625 0.625 0.625 32.397 44.907 17.403 0.200 32.835 45.478 17.402 0.200 0.750 0.050 0.050 31.068 44.349 18.640 0.200 31.442 44.158 19.209 0.200 0.625 0.625 0.625 31.442 44.158 19.209 0.200 31.815 43.966 19.778 0.200 0.750 0.050 0.050 31.068 44.349 18.640 0.200 29.897 43.356 18.485 0.200 0.625 0.625 0.625 29.897 43.356 18.485 0.200 29.458 43.485 19.029 0.200 0.625 0.625 0.625 29.458 43.485 19.029 0.200 29.018 43.614 19.573 0.200 0.750 0.050 0.050 29.897 43.356 18.485 0.200 29.148 43.705 17.180 0.200 0.625 0.625 0.625 29.018 43.614 19.573 0.200 28.700 43.084 19.935 0.200 0.750 0.050 0.050 28.700 43.084 19.935 0.200 28.382 42.554 20.297 0.200 0.625 0.625 0.625 29.148 43.705 17.180 0.200 28.913 44.377 17.234 0.200 0.625 0.625 0.625 28.913 44.377 17.234 0.200 28.678 45.048 17.287 0.200 0.750 0.050 0.050 29.148 43.705 17.180 0.200 30.131 43.605 16.018 0.200 0.625 0.625 0.625 30.131 43.605 16.018 0.200 30.638 44.109 16.140 0.200 0.625 0.625 0.625 30.638 44.109 16.140 0.200 31.144 44.613 16.262 0.200 0.750 0.050 0.050 30.131 43.605 16.018 0.200 29.483 43.969 14.687 0.200 0.625 0.625 0.625 29.483 43.969 14.687 0.200 29.951 43.982 14.151 0.200 0.625 0.625 0.625 29.951 43.982 14.151 0.200 30.418 43.995 13.615 0.200 0.750 0.050 0.050 36.728 46.364 18.623 0.200 37.282 46.221 19.066 0.200 0.625 0.625 0.625 37.282 46.221 19.066 0.200 37.836 46.079 19.510 0.200 0.750 0.050 0.050 36.728 46.364 18.623 0.200 36.470 45.042 17.892 0.200 0.625 0.625 0.625 36.728 46.364 18.623 0.200 36.167 46.499 19.045 0.200 0.625 0.625 0.625 36.167 46.499 19.045 0.200 35.606 46.635 19.468 0.200 0.750 0.050 0.050 36.470 45.042 17.892 0.200 36.971 44.956 17.393 0.200 0.625 0.625 0.625 36.971 44.956 17.393 0.200 37.471 44.870 16.894 0.200 0.750 0.050 0.050 36.470 45.042 17.892 0.200 35.142 45.024 17.152 0.200 0.625 0.625 0.625 35.142 45.024 17.152 0.200 35.025 44.385 16.868 0.200 0.625 0.625 0.625 35.025 44.385 16.868 0.200 34.908 43.746 16.584 0.200 0.750 0.050 0.050 35.142 45.024 17.152 0.200 34.033 45.358 18.168 0.200 0.625 0.625 0.625 34.033 45.358 18.168 0.200 33.434 45.418 17.785 0.200 0.625 0.625 0.625 33.434 45.418 17.785 0.200 32.835 45.478 17.402 0.200 0.750 0.050 0.050 34.033 45.358 18.168 0.200 34.347 46.706 18.792 0.200 0.625 0.625 0.625 34.347 46.706 18.792 0.200 34.977 46.671 19.130 0.200 0.625 0.625 0.625 34.977 46.671 19.130 0.200 35.606 46.635 19.468 0.200 0.750 0.050 0.050 34.347 46.706 18.792 0.200 33.257 47.174 19.783 0.200 0.625 0.625 0.625 33.257 47.174 19.783 0.200 33.181 46.720 20.307 0.200 0.625 0.625 0.625 33.181 46.720 20.307 0.200 33.105 46.266 20.831 0.200 0.750 0.050 0.050 27.548 43.223 21.397 0.200 27.033 43.561 21.211 0.200 0.625 0.625 0.625 27.033 43.561 21.211 0.200 26.518 43.898 21.026 0.200 0.750 0.050 0.050 27.548 43.223 21.397 0.200 27.743 43.135 21.985 0.200 0.625 0.625 0.625 27.743 43.135 21.985 0.200 27.939 43.048 22.572 0.200 0.750 0.050 0.050 27.548 43.223 21.397 0.200 28.382 42.554 20.297 0.200 0.625 0.625 0.625 28.382 42.554 20.297 0.200 29.322 41.569 20.940 0.200 0.625 0.625 0.625 28.382 42.554 20.297 0.200 27.929 42.216 19.868 0.200 0.625 0.625 0.625 27.929 42.216 19.868 0.200 27.475 41.878 19.440 0.200 0.750 0.050 0.050 29.322 41.569 20.940 0.200 28.588 40.419 21.610 0.200 0.625 0.625 0.625 28.588 40.419 21.610 0.200 29.061 39.899 21.761 0.200 0.625 0.625 0.625 29.061 39.899 21.761 0.200 29.534 39.379 21.912 0.200 0.750 0.050 0.050 28.588 40.419 21.610 0.200 27.530 39.793 20.690 0.200 0.625 0.625 0.625 27.530 39.793 20.690 0.200 27.147 39.312 21.085 0.200 0.625 0.625 0.625 27.147 39.312 21.085 0.200 26.764 38.830 21.480 0.200 0.125 0.125 1.000 27.530 39.793 20.690 0.200 26.643 40.877 20.076 0.200 0.625 0.625 0.625 26.764 38.830 21.480 0.200 26.498 38.273 21.229 0.200 0.125 0.125 1.000 26.498 38.273 21.229 0.200 26.232 37.716 20.977 0.200 0.625 0.625 0.625 26.232 37.716 20.977 0.200 26.288 37.572 20.362 0.200 0.625 0.625 0.625 26.288 37.572 20.362 0.200 26.344 37.428 19.748 0.200 0.750 0.050 0.050 26.232 37.716 20.977 0.200 25.476 36.832 22.002 0.200 0.625 0.625 0.625 26.643 40.877 20.076 0.200 27.059 41.377 19.758 0.200 0.625 0.625 0.625 27.059 41.377 19.758 0.200 27.475 41.878 19.440 0.200 0.750 0.050 0.050 26.643 40.877 20.076 0.200 25.704 40.334 18.987 0.200 0.625 0.625 0.625 25.704 40.334 18.987 0.200 26.043 39.942 18.477 0.200 0.625 0.625 0.625 26.043 39.942 18.477 0.200 26.383 39.550 17.967 0.200 0.750 0.050 0.050 25.704 40.334 18.987 0.200 25.207 41.572 18.210 0.200 0.625 0.625 0.625 25.207 41.572 18.210 0.200 24.947 42.049 18.660 0.200 0.625 0.625 0.625 24.947 42.049 18.660 0.200 24.686 42.525 19.109 0.200 0.750 0.050 0.050 25.207 41.572 18.210 0.200 24.045 41.079 17.325 0.200 0.625 0.625 0.625 24.045 41.079 17.325 0.200 23.878 41.573 16.860 0.200 0.625 0.625 0.625 23.878 41.573 16.860 0.200 23.711 42.067 16.394 0.200 0.750 0.050 0.050 gnuplot-4.6.4/demo/borders.dem0000644000471100001440000000061311702642446013212 0ustar # # $Id: borders.dem,v 1.10.2.1 2012/01/09 05:06:39 sfeam Exp $ # unset grid set xrange [0:10] set yrange [0:10] set format "" # set multiplot layout 4, 4 title "Demonstration of different border settings" do for [bb = 0:15] { set border bb show border set label 1 sprintf("Border = %.0f",bb) at 5,5 center plot 1/0 notitle } unset multiplot pause -1 "Hit return to continue" gnuplot-4.6.4/demo/simple.dem0000644000471100001440000000245611623547465013061 0ustar # # $Id: simple.dem,v 1.5 2011/08/19 21:01:41 sfeam Exp $ # # Requires data files "[123].dat" from this directory, # so change current working directory to this directory before running. # gnuplot> set term # gnuplot> load 'simple.dem' # set key left box set samples 50 plot [-10:10] sin(x),atan(x),cos(atan(x)) pause -1 "Hit return to continue" set key right nobox set samples 100 plot [-pi/2:pi] cos(x),-(sin(x) > sin(x+1) ? sin(x) : sin(x+1)) pause -1 "Hit return to continue" set key left box set samples 200 plot [-3:5] asin(x),acos(x) pause -1 "Hit return to continue" plot [-30:20] besj0(x)*0.12e1 with impulses, (x**besj0(x))-2.5 with points pause -1 "Hit return to continue" set samples 400 plot [-10:10] real(sin(x)**besj0(x)) pause -1 "Hit return to continue" set key bmargin center horizontal plot [-5*pi:5*pi] [-5:5] real(tan(x)/atan(x)), 1/x pause -1 "Hit return to continue" set key left box set autoscale set samples 800 plot [-30:20] sin(x*20)*atan(x) pause -1 "Hit return to continue" plot [-19:19] '1.dat'with impulses ,'2.dat' ,'3.dat' with lines pause -1 "Hit return to continue" # # Deprecated syntax - better to show an example with using (f(column(1)) #f(x) = x/100 #plot [-19:19] '1.dat'with impulses ,'2.dat' thru f(x) ,'3.dat' with lines #pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/image2.dem0000644000471100001440000005427611636412574012737 0ustar # demo for plotting images using pixels and binary 2d data # # This demo can be used for terminals supporting image display. # Currently supported are: X11, Aqua, postscript, png, pdf, svg, # (e)pslatex, pstex, emf, wxt. # Prepared by Dan Sebald # History: # - Nov 2006 EAM: split into two files # - 9.23. 2003 ds: redone in response to discussion list feedback # - 5. 3. 2003 ds: 1st version if ((GPVAL_VERSION == 4.3 || GPVAL_VERSION == 4.2) \ && (!strstrt(GPVAL_COMPILE_OPTIONS,"+IMAGE"))) \ print ">>> Skipping demo <<<\n" ; \ print "This copy of gnuplot was built without support for plotting images" ; \ exit ; # Repeat of the 'using.dem' demo, but with binary 2d data. 'using.bin' is # in the format int32, int8, int16/100, int8, int16/100, int16/100. # print "" print "Not only can the 2d binary data mode be used for image data." print "Here is an example that repeats the \`using.dem\` demo with the" print "same data, but stored in binary format of differing sizes. It" print "uses different format specifiers within the \'format\' string." print "There are machine dependent and machine independent specifiers," print "display by the command \'show datafile binary datasizes\':" print "" show datafile binary datasizes print "" set title "Convex November 1-7 1989 Circadian" set key left box set xrange[-1:24] plot 'using.bin' binary format='%*int32%int8%*int16%int8%*int16%*int16' using 1:2 title "Logged in" with impulses,\ 'using.bin' binary format='%*int32%int8%*int16%int8%*int16%*int16' using 1:2 title "Logged in" with points pause -1 "Hit return to continue" reset print "" print "Again, a different format specification for \`using\` can be" print "used to select different \"columns\" within the file." print "" set xrange [1:8] set title "Convex November 1-7 1989" set key below set label "(Weekend)" at 5,25 center plot 'using.bin' binary format='%*int32%*int8%int16%int8%*int16%*int16' using ($1/100):2 title "Logged in" with impulses,\ 'using.bin' binary format='%*int32%*int8%int16%*int8%int16%*int16' using ($1/100):($2/100) t "Load average" with points,\ 'using.bin' binary format='%*int32%*int8%int16%*int8%*int16%int16' using ($1/100):($2/100) t "%CPU used" with lines unset label pause -1 "Hit return to continue" reset print "" print "Here is another example, one repeating the \`scatter.dem\`" print "demo. With binary data we cannot have blank lines to" print "indicate a break in data, as is done with ASCII files." print "Instead, we can specify the record lenths in the command." print "In this case, the data file contains the (x,y,z) coordinate" print "information, hence implicit derivation of that information" print "is not desired. Instead, the record lengths can be specified" print "using the keyword \'record\', which behaves the same as" print "\'array\' but does not generate coordinates. The command is" print "displayed on the graph." print "" set title "2d binary data example where record length is part of command" splot 'scatter2.bin' binary endian=little record=30:30:29:26 using 1:2:3 pause -1 "Hit return to continue" reset print "" print "For binary data, the byte endian format of the file and of the" print "compiler often require attention. Therefore, the key word" print "\'endian\' is provided for setting or interchanging byte" print "order. The allowable types are \'little\', \'big\', and" print "depending upon how your version of Gnuplot was compiled," print "\'middle\' (or \'pdp\') for those still living in the medieval" print "age of computers. These types refer to the file's endian." print "Gnuplot arranges bytes according to this endian and what it" print "determines to be the compiler's endian." print "" print "There are also the special types \'default\' and \'swap\' (or" print "\'swab\') for those who don't know the file type but realize" print "their data looks incorrect and want to change the byte read" print "order." print "" print "Here is an example showing the \`scatter.dem\` data plotted" print "with correct and incorrect byte order. The file is known" print "to be little endian, so the upper left plot is correct" print "appearance and the upper right plot is incorrect appearance." print "The lower two plots are default and swapped bytes. If the" print "plots within the columns match, your compiler uses little" print "endian. If diagonal plots match then your compiler uses" print "big endian. If neither of the bottom plots matches the" print "upper plots, Tux says you're living in the past." print "" set size 1.0, 1.0 set origin 0.0, 0.0 set multiplot set size 0.5,0.48 set origin 0.0,0.47 unset key set label 1 "If plots in columns match, your compiler is little endian" at 100,1200,3.0 center set title 'Little endian' offset 0,-0.5 splot 'scatter2.bin' binary record=30:30:29:26 endian=little using 1:2:3 unset label 1 set size 0.5,0.48 set origin 0.5,0.47 set title 'Big endian' splot 'scatter2.bin' binary record=30:30:29:26 endian=big using 1:2:3 set size 0.5,0.48 set origin 0.0,0.0 set title 'Default' splot 'scatter2.bin' binary record=30:30:29:26 endian=default using 1:2:3 set size 0.5,0.48 set origin 0.5,0.0 set title 'Swapped' splot 'scatter2.bin' binary record=30:30:29:26 endian=swap using 1:2:3 unset multiplot pause -1 "Hit return to continue" reset print "" print "This close up of a 2x2 image illustrates how pixels surround the" print "sampling grid points. This behavior is slightly different than" print "that for pm3d where the four grid points would be used to create" print "a single polygon element using an average, or similar mathematical" print "combination, of the four values at those points." print "" set title "Close up of pixels having grid points (0,0), (0,2), (2,0) and (2,2)" set xrange [-1.5:3.5] set yrange [-1.5:3.5] set cbrange [0:1] unset key plot '-' with rgbimage, '-' with points pt 7 ps 2 lt -1 0 0 0.0 0.0 0.5 0 2 0.0 0.5 0.0 2 0 0.0 0.5 0.0 2 2 0.0 0.0 0.5 e 0 0 0 2 2 0 2 2 e pause -1 "Hit return to continue" reset print "" print "Lower dimensional data may be extended to higher dimensional plots" print "via a number of simple, logical rules. The first step Gnuplot does" print "is sets the components for higher than the natural dimension of the" print "input data to zero. For example, a two dimensional image can be" print "displayed in the three dimensional plot as shown. Without" print "translation, the image lies in the x/y-plane." print "" set title "Simple extension of a two dimensional image into three dimensions" set xrange [-10:137] set yrange [-10:157] set cbrange [0:255] splot 'blutux.rgb' binary array=(128,128) flip=y format='%uchar%uchar%uchar' using ($1+$2+$3)/3 with image pause -1 "Hit return to continue" reset print "" print "The key words \'rotate\' and \'center\' still apply in \'splot\' with" print "rules similar to their use in \'plot\'. However, the center must be" print "specified as a three element tuple." print "" unset colorbox set title "Orientation operations from \'plot\' also apply to to \'splot\'" splot 'blutux.rgb' binary array=(128,128) flipy rotate=90d center = (63.5,63.5,50) format='%uchar%uchar%uchar' using ($1+$2+$3) with image pause -1 "Hit return to continue" reset print "" print "To have full degrees of freedom in orienting the image, an additional" print "key word, \'perpendicular\', can translate the x/y-plane of the 2d" print "data so that it lies orthogonal to a vector given as a three element" print "tuple. The default vector is, of course, (0,0,1). The vector need" print "not be of unit length, as this example illustrates. Viewing this" print "plot with the mouse active can help visualize the image's orientation" print "by panning the axes." print "" set title "The key word \'perpendicular\' applies only to \'splot\'" set cbrange [0:255] set style line 1 lt -1 lw 1 set style line 2 lt -1 lw 1 set style arrow 1 nohead ls 1 set style arrow 2 head filled size screen 0.025,30,45 ls 2 set arrow from -10,0,0 to 10,0,0 as 1 set arrow from 0,-10,0 to 0,10,0 as 1 set arrow from 0,0,-10 to 0,0,10 as 1 set arrow from 0,0,0 to 30,30,30 as 2 splot 'blutux.rgb' binary array=(128,128) flipy rot=1.0pi center = (63.5,63.5,50) perp=(1,1,1) format='%uchar%uchar%uchar' using ($1+$2+$3)/3 with image pause -1 "Hit return to continue" reset print "" print "These concepts of extending lower dimensional data also apply" print "to temporal-like signals. For example, a uniformly sampled" print "sinusoid, sin(1.75*pi*x), in a binary file having no data for" print "the independent variable can be displayed along any direction" print "for both \'plot\'..." print "" set size 1.0, 1.0 set origin 0.0, 0.0 set multiplot set size 0.5,0.48 set origin 0.0,0.47 unset key set xrange [0:2] set yrange [-1:1] set label 1 "Temporal data having one generated coordinate" at 2.25,1.5 center set title 'Along the x-axis' offset 0,-0.5 plot 'sine.bin' binary endian=little array=201 dx=0.01 origin=(0,0) format='%f' using 1 with lines unset label 1 set size 0.5,0.48 set origin 0.5,0.47 set xrange [-1:1] set yrange [0:2] set title 'Along the y-axis' plot 'sine.bin' binary endian=little array=201 dx=0.01 origin=(0,0) rotate=0.5pi format='%f' with lines set size 0.5,0.48 set origin 0.25,0.0 set xrange [-2.2:0.7] set yrange [-2.2:0.7] set title 'Along a 225 degree projection' plot 'sine.bin' binary endian=little array=201 dx=0.01 rotate=225d origin=(0,0) format='%f' using 1 with lines unset multiplot pause -1 "Hit return to continue" reset print "" print "...and \'splot\'. Here is the \'scatter.dem\' example again," print "but this simulates the case of the redundant x coordinates not" print "being in the binary file. The first \"column\" of the binary" print "file is ignored and reconstructed by orienting the various" print "data records." print "" set title "2d binary data example where x coordinate is ignored then generated" set xrange [20:100] set yrange [0:800] set zrange [0.2:1.8] splot 'scatter2.bin' binary endian=little record=30:30:29:26 origin=(25,0,0):(50,0,0):(75,0,0):(100,0,0) format='%f%f' using (0):2:3 pause -1 "Hit return to continue" reset print "" print "Some binary data files have headers, which may be skipped via" print "the \'skip\' key word. Here is the \'scatter.dem\' example" print "again, but this time the first and third traces are skipped." print "The first trace is 30 samples of three floats so takes up 360" print "bytes of space. Similarly, the third trace takes up 348 bytes." print "" set title "The key word \'skip\' used to ignore some data" set xrange [20:100] set yrange [0:800] set zrange [0.2:1.8] splot 'scatter2.bin' binary endian=little record=30:26 skip=360:348 origin=(50,0,0):(100,0,0) format='%f%f' using (0):2:3 pause -1 "Hit return to continue" reset print "" print "Generating uniformly spaced coordinates is valid for polar" print "plots as well. This is useful for data acquired by machines" print "sampling in a circular fashion. Here the sinusoidal data" print "of the previous 2D plot put on a polar plot. Note the" print "pseudonyms \'dt\' meaning sample period along the angular," print "or theta, direction. In Gnuplot, cylindrical coordinate" print "notation is (t,r,z). [Different from common math convention" print "(r,t,z).]" print "" set size ratio 1 set title "Uniform sampling in the polar coordinate system" set polar set grid polar set xrange [-1.3:1.3] set yrange [-1.3:1.3] # The sinusoid has period T=8/7. Also, dx=0.01. So solving 8/7 dt = 2/3 pi dx, we get dt = 0.018326. plot 'sine.bin' binary endian=little array=201 dt=0.018326 origin=(0,0) format='%f' using 1 with lines pause -1 "Hit return to continue" reset print "" print "Binary data stored in matrix format (i.e., gnuplot binary)" print "may also be translated with similar syntax. However, the" print "binary keywords \`format\`, \`array\` and \`record\` do not apply" print "because gnuplot binary has the requirements of float data" print "and grid information as part of the file. Here is an" print "example of a single matrix binary file input four times," print "each translated to a different location with different" print "orientation." print "" set style data lines set hidden3d set ticslevel 0 set key box set title "Matrix binary data (gnuplot binary) translated" set vi 70,10 set xrange [-3:15] set yrange [-3:15] set zrange [-0.2:1.2] splot "binary3" binary center=(1.5,1.5,0), \ "binary3" binary center=(10.5,1.5,0) rotate=0.5pi u 1:2:3, \ "binary3" binary center=(10.5,10.5,0) rotate=1.0pi u 1:2:3, \ "binary3" binary center=(1.5,10.5,0) rotate=1.5pi u 1:2:3 pause -1 "Hit return to continue" reset print "" print "As with ASCII data, decimation in various directions can" print "be achieved via the \`every\` keyword. (Note that no down-" print "sampling filter is applied such that you risk aliasing data" print "with the \`every\` keyword." print "" print "Here is a series of plots with increasing decimation." print "" set style data lines set hidden3d set ticslevel 0 set key box set title "Non-decimated matrix data file" set view 70,45 set xrange [-3:3] set yrange [-3:3] splot "binary2" binary pause -1 "Hit return to continue" set title "Decimate by two in first dimension" splot "binary2" binary every 2 pause -1 "Hit return to continue" set title "Decimate by three in second dimension" splot "binary2" binary every :3 pause -1 "Hit return to continue" set title "Decimate by four in both dimensions" splot "binary2" binary every 4:4 pause -1 "Hit return to continue" reset print "" print "Decimation works on general binary data files as well. Here is the" print "image file with increasing decimation." print "" set title "Decimation works on general binary data files as well.\nLet Tux have his fun..." set xrange [28:98] set yrange [55:125] set label 1 "\"Can I do that?\"" at 64,116 center plot 'blutux.rgb' binary array=(128,128) flipy format='%uchar' every 1:1:43:15:83:65 with rgbimage pause -1 "Hit return to continue" set title "... Sure, go ahead." set xrange [-10:130] set yrange [-8:157] set label 1 "\"Picasso's \'Penguin on Beach\'\"" at 64,139 center plot 'blutux.rgb' binary array=(128,128) flipy format='%uchar' every 8:8 with rgbimage pause -1 "Hit return to continue" reset print "" print "Gnuplot understands a few common binary formats. Internally" print "a function is linked with various extensions. When the" print "extension is specified at the command line or recognized via" print "a special file type called \'auto\', Gnuplot will call the" print "function that sets up the necessary binary information. The" print "known extensions are displayed using the \'show filetype\'" print "command. E.g.," print "" show datafile binary filetypes print "Here's an example where an EDF file is recognized when Gnuplot" print "is in \'auto\' mode. Details are pulled from the header of" print "file itself and not specified at the command line. The command" print "line can still be used to over-ride in-file attributes." print "" set title "Automatically recognizing file type and extracting file information" plot 'demo.edf' binary filetype=auto with image pause -1 "Hit return to continue" reset print "" print "The \'flip\', \'rotate\' and \'perpendicular\' qualifiers" print "should provide adequate freedom to orient data as desired." print "However, there is an additional key words \'scan\' which may" print "offer a more direct and intuitive manner of orienting data" print "depending upon the user's application and perspective." print "" print "\'scan\' is a 2 or 3 letter string representing how Gnuplot" print "should derive (x,y), (x,y,z), (t,r) or (t,r,z) from the" print "the datafile's scan order. The first letter pertains to the" print "fastest rate or point-by-point increment. The second letter" print "pertains to the medium rate or line-by-line increment. If" print "there is a third letter, it pertains to the slowest rate or" print "plane-by-plane increment. The default or inherent scan order" print "is \'scan=xyz\'." print "" print "The pseudonym \'transpose\' is equivalent to \'scan=yx\' when" print "generating 2D coordinates and \'scan=yxz\' when generating" print "3D coordinates." print "" print "There is a subtle difference between the behavior of \'scan\'" print "when dimension info is taken from the file itself as opposed" print "to entered at the command line. When information is gathered" print "from the file, internal scanning is unaltered so that issuing" print "the \'scan\' command may cause the number of samples along" print "the various dimensions to change. However, when the qualifier" print "\'array\' is entered at the command line, the array dimensions" print "adjust so that \'array=XxYxZ\' is always the number of samples" print "along the Cartesian x, y and z directions, respectively." print "" set size 1.0, 1.0 set origin 0.0, 0.0 set multiplot set size 0.5,0.5 set origin 0.0,0.5 unset key set xrange [-5:635] set yrange [-5:635] set tics out set title 'Details read from file' offset 0,-0.5 plot 'demo.edf' binary filetype=auto with image set size 0.5,0.5 set origin 0.5,0.5 set title 'Transpose of file-read axes parameters' plot 'demo.edf' binary filetype=auto transpose with image set size 0.5,0.5 set origin 0.0,0.0 set title 'Details specified at command line' set label 1 "array=(32,64) dx=10 dy=5 scan=xy" at 315,500 center plot 'demo.edf' binary array=(32,64) dx=10 dy=5 scan=xy skip=1024 format="%*float%float" using 1 with image set size 0.5,0.5 set origin 0.5,0.0 set title 'Transpose of command line axes parameters' set label 1 "array=(64,32) dx=5 dy=10 scan=yx" at 315,500 center plot 'demo.edf' binary array=(64,32) dx=5 dy=10 scan=yx skip=1024 format="%*float%float" using 1 with image unset label 1 unset multiplot pause -1 "Hit return to continue" reset print "" print "It is possible to enter binary data at the command line. Of" print "course, the limitation to this approach is that keyboards will" print "allow entering only a limited subset of the possible character" print "values necessary to represent general binary data. For this" print "reason, the primary application for binary data at the command" print "line is using Gnuplot through a pipe. For example, if a pipe" print "is established with a C program, the function \'fputs()\' can" print "send ASCII strings containing the Gnuplot commands while the" print "function \'fwrite()\' can send binary data." print "" print "Furthermore, there can be no special ending character such as" print "in the case of ASCII data entry where \'e\' represents the end" print "of data for the special file \'-\'. It is important to note" print "that when \'binary\' is specified, Gnuplot will continue" print "reading until reaching the number of elements specified via" print "the \'array\' or \'record\' command." print "" print "Here is an example of binary data at the command line where" print "keyboard input has been side stepped by copying 48 bytes from" print "a pre-existing binary file into this demo file." print "" set title "Binary data specified at the command line, intended for use through pipe" set xrange [-1.5:3.5] set yrange [-1.5:3.5] set cbrange [0:1] plot '-' binary endian=little array=(2,2) dx=2 format="%float" using 1:2:3 with rgbimage,\ '-' binary endian=little record=4 format="%char" using 1:2 with points pt 7 ps 2 lt -1 ???? pause -1 "Hit return to continue" reset print "" print "ASCII data files have a matrix variant. Unlike matrix binary," print "ASCII binary may have multiple matrices per file, separted" print "by a blank line. The keyword \`index\` can select the desired" print "matrix to plot." print "" set style data lines set hidden3d set ticslevel 0 set key box set view 70,45 set multiplot set size 0.5,0.5 set origin 0.0,0.5 unset key set tics out set title "'asciimat.dat' matrix index 0" splot 'asciimat.dat' matrix index 0 set size 0.5,0.5 set origin 0.5,0.5 set title "'asciimat.dat' matrix index 1" splot 'asciimat.dat' matrix index 1 set size 0.5,0.5 set origin 0.0,0.0 set title "'asciimat.dat' matrix index 2" splot 'asciimat.dat' matrix index 2 set size 0.5,0.5 set origin 0.5,0.0 set title "'asciimat.dat' matrix index 2 using 1:(2*$2):($3*$3)" splot 'asciimat.dat' matrix index 2 using 1:(2*$2):($3*$3) unset multiplot pause -1 "Hit return to continue" reset print "" print "Images maintain orientation with respect to axis direction." print "All plots show the same exact plot, but with various states" print "of reversed axes. The upper left plot has reversed x axis," print "the upper right plot has conventional axes, the lower left" print "plot has both reversed x and y axes, and the lower right" print "plot has reversed y axis." print "" set size 1.0, 1.0 set origin 0.0, 0.0 set multiplot set size 0.5,0.48 unset key set origin 0.0,0.47 set xrange [-0.5:127.5] noreverse set x2range [-0.5:127.5] noreverse set yrange [-0.5:127.5] noreverse set y2range [-0.5:127.5] noreverse set xtics out mirror unset ytics set xrange [] reverse set x2range [] reverse set y2tics out mirror set title '"Eccentric coordinate systems"' offset 0,-0.5 set label 1 "Images reverse according to axis orientation" at -30,162 center plot 'blutux.rgb' binary array=(128,128) flip=y format='%uchar' using 1:2:3 with rgbimage unset label 1 set origin 0.5,0.47 set xrange [] noreverse set x2range [] noreverse unset y2tics set ytics out mirror set title '"Cartesian plane!"' replot set origin 0.0,0.04 unset xtics set xrange [] reverse set x2range [] reverse set x2tics out mirror unset ytics set yrange [] reverse set y2range [] reverse set y2tics out mirror unset title set title ' ' offset 0,-0.5 set label 1 '"Nato, ergo sum."' at 64,140 center rotate by 180 replot set origin 0.5,0.04 set xrange [] noreverse set x2range [] noreverse unset y2tics set ytics out mirror set title ' ' offset 0,-0.5 set label 1 '"Physics is phun."' at 64,140 center rotate by 180 replot unset multiplot pause -1 "Hit return to continue" reset print "" print "Tux says \"bye-bye\"." print "" set xrange [-0.5:137.5] set yrange [-0.5:137.5] unset border unset xtics unset ytics unset ztics unset key unset colorbox set tmargin 0 set bmargin 0 set rmargin 0 set lmargin 0 set view 60, 45, 1, 1 set label 1 "Tux in a reflective mood" at 140,0,40 center splot 'blutux.rgb' binary array=(128,128) flip=y rot=90d origin=(0,0,0) perp = (1,0,0) format='%uchar' with rgbimage, \ 'blutux.rgb' binary array=(128,128) flipy rot=90d origin=(+137,+137,0) perp=(0,1,0) format='%uchar' with rgbimage pause -1 "Hit return to continue" reset print "" print "End of image demo..." gnuplot-4.6.4/demo/rgb_variable.dat0000644000471100001440000000421410302377462014173 0ustar 0 0 0 0x000000 255 0 0 0xff0000 255 255 0 0xffff00 255 255 255 0xffffff 0 255 255 0x00ffff 255 0 255 0xff00ff 0 255 0 0x00ff00 0 0 255 0x0000ff 56 34 136 0x382288 210 19 250 0xd213fa 144 131 60 0x90833c 168 58 172 0xa83aac 62 228 194 0x3ee4c2 226 198 176 0xe2c6b0 199 26 61 0xc71a3d 195 67 71 0xc34347 176 72 149 0xb04895 1 236 174 0x1ecae 239 105 220 0xef69dc 117 32 153 0x752099 56 129 84 0x388154 199 150 233 0xc796e9 152 219 89 0x98db59 134 93 151 0x865d97 19 124 131 0x137c83 242 126 61 0xf27e3d 127 236 178 0x7fecb2 108 232 116 0x6ce874 61 197 61 0x3dc53d 126 184 65 0x7eb841 154 147 192 0x9a93c0 214 70 48 0xd64630 190 191 110 0xbebf6e 86 154 187 0x569abb 167 246 146 0xa7f692 208 229 46 0xd0e52e 31 222 37 0x1fde25 1 145 248 0x191f8 26 38 174 0x1a26ae 187 140 16 0xbb8c10 250 227 2 0xfae302 172 97 104 0xac6168 217 94 113 0xd95e71 125 54 250 0x7d36fa 192 134 174 0xc086ae 22 56 102 0x163866 151 84 21 0x975415 94 81 77 0x5e514d 8 227 30 0x8e31e 230 239 244 0xe6eff4 16 154 93 0x109a5d 137 80 70 0x895046 159 128 122 0x9f807a 200 250 199 0xc8fac7 15 41 113 0xf2971 210 128 24 0xd28018 126 242 73 0x7ef249 150 139 223 0x968bdf 74 119 237 0x4a77ed 179 74 252 0xb34afc 234 9 140 0xea098c 119 56 99 0x773863 239 124 104 0xef7c68 249 85 88 0xf95558 211 234 72 0xd3ea48 146 223 190 0x92dfbe 135 203 65 0x87cb41 174 46 237 0xae2eed 89 109 52 0x596d34 30 180 49 0x1eb431 217 127 61 0xd97f3d 128 180 165 0x80b4a5 250 175 216 0xfaafd8 234 153 219 0xea99db 122 135 163 0x7a87a3 66 171 180 0x42abb4 142 131 94 0x8e835e 54 81 213 0x3651d5 14 168 249 0xea8f9 148 155 169 0x949ba9 94 197 205 0x5ec5cd 133 74 178 0x854ab2 253 226 172 0xfde2ac 74 54 131 0x4a3683 131 198 59 0x83c63b 103 183 35 0x67b723 144 157 175 0x909daf 26 143 165 0x1a8fa5 67 213 44 0x43d52c 105 251 26 0x69fb1a 44 224 121 0x2ce079 95 190 168 0x5fbea8 154 93 246 0x9a5df6 0 108 32 0x6c20 91 205 67 0x5bcd43 47 205 112 0x2fcd70 228 173 117 0xe4ad75 54 53 144 0x363590 146 243 190 0x92f3be 42 196 100 0x2ac464 49 129 49 0x318131 195 70 53 0xc34635 29 67 226 0x1d43e2 133 201 242 0x85c9f2 41 157 150 0x299d96 gnuplot-4.6.4/demo/lcdemo.dat0000644000471100001440000000402506515203631013014 0ustar # # This file contains density values (2) against temperature (1) of a # common liquid crytsal (MBBA). At about 45.6 degr. there occurs a # phase transition indicated by the anomaly. # # Columns (3) and (4) contain weights for a straight line fit # preferredly in the low temperature range and in the high temperature # range, respectively. Of course not a very senseful approach but # a good demo to see the effect of weights in a fit. # # Column # 1 2 3 4 5 39.471 1.03307 1.0 0.98765 0.010 40.091 1.03246 1.0 0.98765 0.010 40.602 1.03197 1.0 0.98765 0.010 41.058 1.03153 1.0 0.98765 0.010 41.438 1.03117 1.0 0.98765 0.010 41.880 1.03074 1.0 0.98765 0.010 42.437 1.03021 1.0 0.98765 0.010 42.836 1.02982 1.0 0.98765 0.010 43.209 1.02946 1.0 0.98765 0.010 43.599 1.02907 1.0 0.98765 0.010 43.997 1.02867 1.0 0.98765 0.010 44.313 1.02833 1.0 0.98765 0.010 44.908 1.02765 1.0 0.98765 0.010 45.169 1.02735 1.0 0.98765 0.010 45.594 1.02683 1.0 0.98765 0.010 45.743 1.02661 999.0 0.98765 0.010 45.796 1.02650 999.0 0.98765 0.010 45.816 1.02644 999.0 0.98765 0.010 45.841 1.02634 999.0 0.98765 0.010 45.876 1.02623 999.0 0.98765 0.010 45.908 1.02611 999.0 0.98765 0.010 45.959 1.02592 999.0 0.98765 0.010 46.008 1.02561 999.0 0.12345 0.001 46.040 1.02526 999.0 0.12345 0.001 46.060 1.02506 999.0 0.12345 0.001 46.096 1.02500 999.0 0.12345 0.001 46.126 1.02496 999.0 0.12345 0.001 46.149 1.02494 999.0 0.12345 0.001 46.372 1.02474 999.0 0.12345 0.001 46.625 1.02452 999.0 0.12345 0.001 46.945 1.02425 999.0 0.12345 0.001 47.326 1.02393 999.0 0.12345 0.001 47.708 1.02361 999.0 0.12345 0.001 48.095 1.02329 999.0 0.12345 0.001 48.540 1.02293 999.0 0.12345 0.001 48.927 1.02262 999.0 0.12345 0.001 49.314 1.02231 999.0 0.12345 0.001 gnuplot-4.6.4/demo/iterate.dem0000644000471100001440000000033510516321504013177 0ustar set title "Iteration within plot command" set xrange [0:3] set label 1 "plot for [n=2:10] sin(x*n)/n" at graph .95, graph .92 right plot for [n=2:10] sin(x*n)/n notitle lw (13-n)/2 pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/singulr.dem0000644000471100001440000000777407747400072013255 0ustar # $Id: singulr.dem,v 1.6 2003/10/28 05:35:54 sfeam Exp $ # # Demo that plots some surfaces with singularities. # Author: Carsten Steger # # (x,y,x^2-y^2,2xy) is the graph of w=z^2 in 4-space. # Therefore (x^2-y^2,2xy,x,y) is the graph of w=sqrt(z) in 4-space. # Coordinates 1, 2, and 3 give the real part of either function, # whereas coordinates 1, 2, and 4 give the imaginary part. # The same holds for the cube function w=z^3. The graphs are given by # (x,y,x^3-3xy^2,3x^2y-y^3) and (x^3-3xy^2,3x^2y-y^3,x,y). # And so on... set parametric set hidden3d set isosamples 21 set autoscale set view 60,30 set urange [-3:3] set vrange [-3:3] set title "Real part of complex square root function" splot u**2-v**2,2*u*v,u pause -1 "Hit return to continue (1)" set view 60,210 set title "Real part of complex square root function (different view)" replot pause -1 "Hit return to continue (2)" set view 60,120 set urange [-3:3] set vrange [-3:3] set title "Imaginary part of complex square root function" splot u**2-v**2,2*u*v,v pause -1 "Hit return to continue (3)" set view 60,300 set title "Imaginary part of complex square root function (different view)" replot pause -1 "Hit return to continue (4)" set view 60,30 set urange [-3:3] set vrange [-3:3] set title "Real part of complex cube root function" splot u**3-3*u*v**2,3*u**2*v-v**3,u pause -1 "Hit return to continue (5)" set view 60,210 set title "Real part of complex cube root function (different view)" replot pause -1 "Hit return to continue (6)" set view 60,30 set urange [-3:3] set vrange [-3:3] set title "Imaginary part of complex cube root function" splot u**3-3*u*v**2,3*u**2*v-v**3,v pause -1 "Hit return to continue (7)" set view 60,210 set title "Imaginary part of complex cube root function (different view)" replot pause -1 "Hit return to continue (8)" set view 60,30 set isosamples 31 set urange [-1:1] set vrange [-1:1] set title "Real part of complex 4th root function" splot u**4-6*u**2*v**2+v**4,4*u**3*v-4*u*v**3,u pause -1 "Hit return to continue (9)" set view 60,210 set title "Real part of complex 4th root function (different view)" replot pause -1 "Hit return to continue (10)" set view 60,120 set urange [-1:1] set vrange [-1:1] set title "Imaginary part of complex 4th root function" splot u**4-6*u**2*v**2+v**4,4*u**3*v-4*u*v**3,v pause -1 "Hit return to continue (11)" set view 60,300 set title "Imaginary part of complex 4th root function (different view)" replot pause -1 "Hit return to continue (12)" set isosamples 21 set view 60,20 set urange [-3:3] set vrange [-3:3] set title "Enneper's surface" splot u-u**3/3+u*v**2,v-v**3/3+v*u**2,u**2-v**2 pause -1 "Hit return to continue (13)" set view 60,110 set title "Enneper's surface (different view)" replot pause -1 "Hit return to continue (14)" set isosamples 31,11 set view 60,30 set title "Moebius strip" set urange [0:2*pi] set vrange [-0.25:0.25] splot (2-v*sin(u/2))*sin(u),(2-v*sin(u/2))*cos(u),v*cos(u/2) pause -1 "Hit return to continue (15)" set view 60,210 set title "Moebius strip (view from opposite side)" replot pause -1 "Hit return to continue (16)" unset key set xrange [-10:10] set yrange [-10:10] set zrange [-3:3] set urange [0:2*pi] set vrange [0:2*pi] set isosamples 39,60 set view 60,120 set title "Klein bottle" splot (2*sin(u)*cos(v/2)-sin(2*u)*sin(v/2)+8)*cos(v), \ (2*sin(u)*cos(v/2)-sin(2*u)*sin(v/2)+8)*sin(v), \ 2*sin(u)*sin(v/2)+sin(2*u)*cos(v/2) pause -1 "Hit return to continue (17)" set urange [0:2*pi] set vrange [0:4*pi/3] set isosamples 39,40 set view 60,20 set title "Klein bottle with look at the 'inside'" replot pause -1 "Hit return to continue (18)" set style data lines set xrange [-12:12] set yrange [-12:12] set zrange [*:*] unset hidden3d set ticslevel 0. set view 50,15 #HBB: ,1,1.7 set title "Klein bottle, glassblowers' version (look-through)" splot "klein.dat" pause -1 "Hit return to continue (19)" set hidden3d set view 70,305 set title "Klein bottle, glassblowers' version (solid)" splot "klein.dat" pause -1 "Hit return to continue (20)" reset gnuplot-4.6.4/demo/vector.dem0000644000471100001440000000460311272745002013051 0ustar # # $Id: vector.dem,v 1.12 2009/10/31 05:24:18 sfeam Exp $ # # This file demonstrates # -1- saving contour lines as a gnuplottable file # -2- plotting a vector field on the same graph # -3- manipulating columns using the '$1,$2' syntax. # the example is taken here from Physics is the display of equipotential # lines and electrostatic field for a dipole (+q,-q) print "\n This file demonstrates" print " -1- saving contour lines as a gnuplottable file" print " -2- plotting a vector field on the same graph" print " -3- manipulating columns using the '$1,$2' syntax." print " the example is taken here from Physics is the display of equipotential" print " lines and electrostatic field for a dipole (+q,-q)" # r(x,y)=sqrt(x*x+y*y) v1(x,y)= q1/(r((x-x0),y)) v2(x,y)= q2/(r((x+x0),y)) # vtot(x,y)=v1(x,y)+v2(x,y) # e1x(x,y)= q1*(x-x0)/r(x-x0,y)**3 e1y(x,y)= q1*(y)/r(x-x0,y)**3 e2x(x,y)= q2*(x+x0)/r(x+x0,y)**3 e2y(x,y)= q2*(y)/r(x+x0,y)**3 etotx(x,y)=e1x(x,y)+e2x(x,y) etoty(x,y)=e1y(x,y)+e2y(x,y) enorm(x,y)=sqrt(etotx(x,y)*etotx(x,y)+etoty(x,y)*etoty(x,y)) dx1(x,y)=coef*etotx(x,y)/enorm(x,y) dy1(x,y)=coef*etoty(x,y)/enorm(x,y) dx2(x,y)=coef*etotx(x,y) dy2(x,y)=coef*etoty(x,y) # coef=.7 x0=1. q1=1 q2=-1 xmin=-10. xmax=10. ymin=-10. ymax=10. # reset unset autoscale set xr [xmin:xmax] set yr [ymin:ymax] set isosam 31,31 #set view 0, 0, 1, 1 set view map unset surface set contour base set cntrparam order 4 set cntrparam linear set cntrparam levels discrete -3,-2 ,-1 ,-0.5 ,-0.2 ,-0.1 ,-0.05 ,-0.02 ,0 ,0.02 ,0.05 ,0.1 ,0.2 ,0.5 ,1 ,2 ,3 set cntrparam points 5 # set label "-q" at -1,0 center set label "+q" at 1,0 center splot vtot(x,y) w l print "Now create a file with equipotential lines" pause -1 "Hit return to continue" set table "equipo2.tmp" replot unset table reset pause 0 plot "equipo2.tmp" w l print "Now create a x/y datafile for plotting with vectors " print "and display vectors parallel to the electrostatic field" pause -1 "Hit return to continue" set isosam 31,31 set table "field2xy.tmp" splot vtot(x,y) w l unset table pause 0 unset autoscale set xr [xmin:xmax] set yr [ymin:ymax] set isosam 31,31 set key under Left reverse plot "field2xy.tmp" u 1:2:(coef*dx1($1,$2)):(coef*dy1($1,$2)) w vec, \ "equipo2.tmp" w l pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/empty-circles.dat0000644000471100001440000000021110757671767014350 0ustar 15.8826 -15.9154 25.8660 13.9696 -34.7109 28.2968 49.8538 -4.7555 18.8980 -8.5100 -40.5400 21.2788 gnuplot-4.6.4/demo/world.dat0000644000471100001440000004072610437752110012707 0ustar # # $Id: world.dat,v 1.2 2006/06/02 06:01:44 sfeam Exp $ # # -92.32 48.24 -88.13 48.92 -83.11 46.27 -81.66 44.76 -82.09 42.29 -77.10 44.00 -69.95 46.92 -65.92 45.32 -66.37 44.25 -61.22 45.43 -64.94 47.34 -64.12 48.52 -70.68 47.02 -67.24 49.33 -59.82 50.48 -56.14 52.46 -59.07 53.58 -58.26 54.21 -60.69 55.33 -61.97 57.41 -64.35 59.49 -67.29 58.15 -69.89 59.91 -71.31 61.45 -78.22 61.97 -77.28 59.53 -77.09 55.88 -79.06 51.68 -82.23 52.70 -86.75 55.72 -92.17 56.86 -95.61 58.82 -92.66 62.02 -90.65 63.24 -95.96 64.12 -89.88 63.98 -89.30 65.22 -86.86 66.12 -84.54 66.88 -82.30 67.76 -83.10 69.68 -86.05 67.98 -88.18 68.20 -91.00 68.82 -91.72 69.69 -93.15 71.09 -96.58 71.05 -93.35 69.52 -94.23 68.25 -95.96 66.73 -98.83 68.27 -102.45 67.69 -108.34 68.43 -105.83 68.05 -108.15 66.60 -111.15 67.63 -114.10 68.23 -120.92 69.44 -124.32 69.26 -128.76 70.50 -131.86 69.19 -131.15 69.79 -135.81 69.13 -140.19 69.37 -141.20 69.58 -141.21 69.56 -142.49 69.83 -148.09 70.26 -154.37 70.96 -159.53 70.38 -166.64 68.25 -161.56 66.55 -162.99 65.97 -168.23 65.49 -161.12 64.49 -165.29 62.57 -164.58 60.06 -162.06 58.36 -157.85 58.12 -162.34 55.06 -156.52 57.11 -153.53 59.32 -149.18 60.81 -149.90 59.50 -146.54 60.36 -139.98 59.73 -137.12 58.28 -136.01 59.12 -133.84 57.12 -131.46 55.98 -132.08 57.20 -140.37 60.25 -141.21 60.16 -133.38 58.93 -130.88 54.83 -128.86 53.90 -126.58 52.12 -127.08 50.80 -124.42 49.66 -122.56 48.91 -122.44 48.92 -124.42 47.18 -124.52 42.48 -123.09 38.45 -121.73 36.62 -117.60 33.34 -117.28 32.64 -117.29 32.48 -114.75 27.80 -112.53 24.80 -110.55 24.07 -114.23 29.59 -112.58 29.99 -109.57 25.94 -105.61 21.94 -102.09 17.87 -95.75 15.94 -92.21 14.97 -92.22 14.71 -86.74 12.06 -83.03 8.65 -79.93 8.74 -77.00 7.82 -81.99 8.97 -83.92 12.70 -86.33 15.80 -88.40 15.92 -88.45 17.42 -87.01 21.33 -91.65 18.72 -96.96 20.37 -97.65 25.67 -97.62 25.82 -95.62 28.84 -90.77 29.03 -87.33 30.22 -82.69 28.15 -80.16 26.66 -80.74 32.31 -76.89 35.43 -76.47 38.21 -75.66 37.67 -71.31 41.76 -69.44 44.17 -67.69 47.03 -73.18 45.14 -79.26 43.28 -82.84 42.59 -83.49 45.32 -86.36 43.65 -87.75 43.42 -86.01 45.96 -87.00 46.59 -91.39 46.79 -90.05 47.96 -152.62 58.41 -152.60 58.40 -153.30 57.80 -152.40 57.48 -153.32 57.79 -166.96 53.96 -167.01 53.95 -168.36 53.50 -168.19 53.36 -170.73 52.68 -170.60 52.55 -174.47 51.94 -174.47 51.92 -176.58 51.71 -176.64 51.73 -177.55 51.76 -177.41 51.63 -178.27 51.75 177.35 51.80 177.33 51.76 172.44 53.00 172.55 53.03 -123.40 48.33 -128.00 50.84 -123.50 48.34 -132.49 52.88 -132.44 52.91 -132.64 53.02 -131.97 53.71 -132.63 53.02 -55.36 51.56 -54.66 49.52 -53.65 47.48 -52.98 46.31 -56.12 46.84 -58.47 47.57 -57.61 50.38 -55.39 51.53 -61.37 49.01 -61.80 49.29 -61.38 49.03 -63.01 46.71 -64.42 46.61 -63.04 46.68 -60.14 46.48 -60.14 46.50 -71.97 41.11 -71.97 41.15 -80.79 27.03 -81.01 26.99 -113.01 42.09 -113.10 42.01 -155.74 20.02 -155.73 19.98 -156.51 20.78 -156.51 20.78 -157.12 21.21 -157.08 20.95 -157.87 21.42 -159.53 22.07 -117.44 66.46 -119.59 65.24 -123.95 65.03 -123.69 66.44 -119.21 66.22 -117.44 66.44 -120.71 64.03 -114.91 62.30 -109.07 62.72 -112.62 61.19 -118.68 61.19 -117.01 61.17 -115.97 62.56 -119.46 64.00 -120.59 63.94 -112.31 58.46 -108.90 59.44 -104.14 58.90 -102.56 56.72 -101.82 58.73 -104.65 58.91 -111.00 58.51 -112.35 58.62 -98.74 50.09 -99.75 52.24 -99.62 51.47 -98.82 50.39 -97.02 50.21 -97.50 54.02 -98.69 52.93 -97.19 51.09 -96.98 50.20 -95.34 49.04 -92.32 50.34 -94.14 49.47 -95.36 48.82 -80.39 56.16 -79.22 55.94 -80.34 56.08 -103.56 58.60 -103.60 58.58 -101.82 58.03 -102.33 58.10 -101.77 58.06 -101.88 55.79 -97.92 57.15 -101.22 55.85 -101.88 55.74 -77.61 6.80 -78.70 0.97 -80.75 -4.47 -76.19 -14.57 -70.44 -18.75 -70.68 -26.15 -71.44 -32.03 -73.38 -37.27 -73.06 -42.11 -73.17 -46.09 -73.52 -48.05 -73.67 -51.56 -71.06 -53.88 -69.14 -50.77 -67.51 -46.59 -63.49 -42.80 -62.14 -40.16 -57.12 -36.71 -53.17 -34.15 -51.26 -32.02 -48.16 -25.48 -40.73 -22.32 -38.88 -15.24 -34.60 -7.81 -41.95 -3.42 -48.02 -1.84 -48.44 -1.57 -50.81 0.00 -54.47 5.39 -60.59 8.32 -64.19 9.88 -70.78 10.64 -70.97 11.89 -76.26 8.76 -77.61 6.80 -69.14 -52.79 -66.16 -55.08 -70.01 -54.88 -70.55 -53.85 -69.31 -52.81 -59.29 -51.58 -59.35 -51.54 -58.65 -51.55 -58.55 -51.56 -84.39 21.44 -73.90 19.73 -79.27 21.18 -83.74 21.80 -84.32 21.42 -66.96 17.95 -67.05 17.89 -77.88 17.22 -78.06 16.98 -74.47 18.08 -69.88 18.99 -71.10 17.76 -74.45 17.86 -85.28 73.74 -85.79 70.96 -85.13 71.94 -84.74 72.96 -80.61 73.10 -78.45 72.20 -75.44 72.55 -73.89 71.98 -72.56 71.04 -71.49 70.57 -69.78 70.29 -68.12 69.71 -65.91 69.19 -66.92 68.39 -64.08 67.68 -62.50 66.68 -63.07 65.33 -66.11 66.08 -67.48 65.41 -64.05 63.15 -66.58 63.26 -69.04 62.33 -72.22 63.77 -76.88 64.17 -73.25 65.54 -70.09 66.64 -72.05 67.44 -76.32 68.36 -78.34 70.17 -82.12 69.71 -87.64 70.12 -89.68 71.43 -85.28 73.74 -80.90 76.10 -84.21 76.28 -88.94 76.38 -85.47 77.40 -85.43 77.93 -87.01 78.54 -83.17 78.94 -84.87 79.93 -81.33 79.82 -76.27 80.92 -82.88 80.62 -82.58 81.16 -86.51 81.05 -89.36 81.21 -90.45 81.38 -89.28 81.86 -87.21 82.30 -80.51 82.05 -80.16 82.55 -77.83 82.86 -75.51 83.05 -71.18 82.90 -65.10 82.78 -63.34 81.80 -68.26 81.26 -69.46 80.34 -71.05 79.82 -74.40 79.46 -75.42 79.03 -75.48 78.92 -76.01 78.20 -80.66 77.28 -78.07 76.98 -80.90 76.13 -92.86 74.13 -92.50 72.70 -94.89 73.16 -92.96 74.14 -94.80 76.95 -89.68 76.04 -88.52 75.40 -82.36 75.67 -79.39 74.65 -86.15 74.22 -91.70 74.94 -95.60 76.91 -94.87 76.96 -99.96 73.74 -97.89 72.90 -98.28 71.13 -102.04 72.92 -101.34 73.14 -99.69 73.59 -107.58 73.25 -104.59 71.02 -101.71 69.56 -104.07 68.62 -106.61 69.12 -114.09 69.05 -113.89 70.12 -115.88 70.32 -116.10 71.32 -117.45 72.48 -113.53 72.44 -109.84 72.24 -106.62 71.71 -107.43 73.04 -120.96 74.29 -118.37 72.53 -123.06 71.18 -123.40 73.77 -120.93 74.27 -108.83 76.74 -106.25 75.54 -107.08 74.78 -112.99 74.16 -112.28 74.99 -116.04 75.33 -115.27 76.20 -110.95 75.56 -109.77 76.31 -108.82 76.70 -115.70 77.46 -118.10 76.30 -121.13 76.37 -116.04 77.28 -110.01 77.86 -112.36 77.68 -109.96 77.86 -109.60 78.48 -112.20 78.01 -109.60 78.48 -97.87 76.61 -99.21 75.31 -100.86 75.60 -99.40 76.26 -97.79 76.60 -94.72 75.53 -94.66 75.52 -104.10 79.01 -99.19 77.54 -103.22 78.08 -104.30 78.95 -93.74 77.52 -93.74 77.52 -96.88 78.50 -96.91 77.77 -96.94 78.48 -84.69 65.84 -81.58 63.87 -85.00 62.96 -84.63 65.71 -81.84 62.75 -82.01 62.63 -79.88 62.12 -79.88 62.12 -43.53 59.89 -45.29 60.67 -47.91 60.83 -49.90 62.41 -50.71 64.42 -51.39 64.94 -52.96 66.09 -53.62 67.19 -53.51 67.51 -51.84 68.65 -52.19 70.00 -51.85 71.03 -55.41 71.41 -54.63 72.97 -56.98 74.70 -61.95 76.09 -66.38 75.83 -71.13 77.00 -66.81 77.60 -70.78 77.78 -64.96 79.70 -63.38 81.16 -56.89 82.17 -48.18 82.15 -42.08 82.74 -38.02 83.54 -23.96 82.94 -25.97 81.97 -25.99 80.64 -13.57 80.97 -16.60 80.16 -19.82 78.82 -18.80 77.54 -21.98 76.46 -20.69 75.12 -21.78 74.40 -24.10 73.69 -26.54 73.08 -24.63 72.69 -21.84 71.69 -24.62 71.24 -27.16 70.89 -27.21 70.00 -24.10 69.35 -28.35 68.43 -32.48 68.56 -35.26 66.26 -37.90 65.90 -40.04 65.00 -40.49 64.04 -42.01 63.14 -42.88 61.15 -43.09 60.07 -43.56 59.90 -16.26 66.41 -15.32 64.29 -20.14 63.47 -21.76 64.21 -21.33 64.97 -23.04 65.62 -21.76 66.26 -18.77 66.12 -16.23 66.35 0.56 51.47 -1.71 54.94 -3.41 57.52 -5.42 58.14 -5.77 55.59 -3.48 54.82 -4.68 52.88 -2.68 51.58 -3.80 50.08 1.26 51.14 0.65 51.41 -7.17 54.91 -9.97 53.47 -8.52 51.76 -5.69 54.79 -7.34 55.25 -1.33 60.66 -1.17 60.38 -6.18 58.44 -6.09 58.36 -6.47 57.58 -6.33 57.54 -7.30 57.54 -7.46 57.05 -6.54 56.94 -6.00 55.94 -5.09 55.55 -4.44 54.38 -4.30 54.19 -8.08 71.02 -8.21 70.86 16.92 79.52 22.26 78.46 16.86 76.41 16.00 77.39 16.03 77.92 16.81 79.50 14.71 79.40 16.05 79.12 14.02 77.80 13.56 78.46 12.63 79.26 14.68 79.40 22.01 78.24 21.86 78.23 21.54 77.75 23.88 77.26 21.53 77.67 22.79 77.79 23.50 79.97 28.24 79.54 20.85 78.94 19.00 79.34 21.05 79.88 23.41 79.96 46.98 80.23 43.13 79.97 47.18 80.22 50.43 80.19 50.55 79.88 47.77 79.86 50.45 80.14 61.79 80.18 61.79 80.18 65.08 80.69 64.27 80.59 65.13 80.68 -5.13 35.66 4.06 36.63 10.40 37.12 11.36 33.61 20.10 30.10 23.49 32.17 31.65 30.80 35.76 23.74 39.75 14.82 42.93 11.34 51.52 11.45 49.82 6.99 43.13 -0.62 39.15 -7.58 40.37 -13.20 37.74 -18.17 35.33 -22.71 32.84 -28.15 26.50 -34.39 19.55 -35.51 17.50 -30.88 12.24 -18.75 13.89 -12.81 12.05 -5.55 9.67 0.14 7.19 3.79 1.74 5.39 -4.77 4.59 -12.00 6.75 -15.54 10.98 -16.33 15.50 -16.10 22.29 -12.90 27.12 -9.52 31.09 -5.41 35.58 33.71 0.00 33.48 -3.42 33.34 -0.20 33.71 0.00 49.30 -12.50 49.28 -18.79 43.95 -25.50 44.37 -20.08 46.34 -16.31 47.91 -14.08 49.30 -12.50 178.88 69.10 181.20 68.42 183.52 67.78 188.87 66.38 186.54 64.74 182.87 65.63 180.13 65.14 179.48 64.88 178.20 64.29 177.46 62.62 170.42 60.17 164.48 59.89 162.92 57.34 161.82 54.88 156.42 51.09 156.40 57.76 163.79 61.73 159.90 60.73 156.81 61.68 153.83 59.10 148.57 59.46 140.77 58.39 137.10 54.07 140.72 52.43 138.77 47.30 129.92 42.04 128.33 38.46 126.15 35.18 125.12 39.08 121.62 40.15 117.58 38.21 121.77 36.90 120.73 32.65 121.28 30.25 118.83 24.93 112.69 21.81 108.53 21.73 107.55 16.34 107.32 10.45 104.39 10.37 100.01 13.52 100.26 8.30 103.22 1.56 98.21 9.17 97.66 15.36 94.21 17.79 90.05 21.74 90.06 21.03 82.06 15.95 80.05 11.72 76.41 8.60 72.79 17.43 72.02 20.00 68.98 21.99 64.62 24.41 57.83 24.77 53.11 26.20 49.67 29.41 50.96 25.15 54.33 23.44 59.03 22.57 57.87 18.86 52.95 15.74 47.26 12.96 42.75 14.68 39.93 19.61 36.92 25.78 33.30 28.46 32.60 30.63 32.18 30.58 36.08 35.03 32.53 36.17 27.77 36.94 26.51 39.18 31.54 40.82 38.53 40.48 40.35 43.17 39.88 46.45 35.18 44.99 33.50 44.96 30.24 45.14 28.70 41.48 26.55 39.84 23.62 39.67 23.80 37.34 21.90 36.92 18.79 42.02 14.52 44.31 14.58 42.25 18.32 39.57 16.05 39.35 11.52 42.36 6.87 43.08 2.80 41.09 -1.11 37.14 -6.24 36.70 -8.67 39.57 -6.51 43.13 -0.84 45.55 -3.93 48.40 0.48 49.09 4.20 51.29 6.44 52.92 8.42 55.94 11.72 55.49 11.73 53.66 16.78 54.14 21.40 56.32 24.67 57.20 28.94 59.18 24.16 59.52 22.07 62.66 23.76 65.35 18.70 62.54 19.11 59.67 18.40 58.54 15.34 55.73 11.74 58.08 8.37 57.68 5.80 59.20 7.38 60.86 7.51 61.86 9.62 62.99 13.37 65.46 15.46 67.12 18.54 68.62 22.32 69.64 24.77 70.17 25.93 69.79 28.56 70.46 29.75 69.76 33.83 69.11 41.90 66.85 35.14 66.25 33.30 66.07 35.46 64.15 37.68 64.03 41.71 64.09 44.80 65.58 44.87 68.16 45.92 66.83 51.79 67.85 53.70 67.89 59.68 68.09 65.07 69.08 68.56 69.19 68.38 70.97 73.03 71.62 73.80 68.29 69.42 66.45 73.43 66.36 77.51 68.36 80.74 66.74 75.27 68.67 75.11 71.80 78.62 70.56 78.43 71.90 82.72 71.23 84.25 70.03 81.40 72.76 86.50 74.01 87.68 74.78 90.25 75.23 89.68 75.57 95.12 75.95 99.69 76.09 104.10 77.52 106.34 76.40 112.99 75.60 107.88 73.72 110.43 73.71 113.34 73.37 123.10 73.28 128.94 73.02 126.10 72.24 130.53 70.86 135.49 71.51 139.60 72.23 146.04 72.39 146.92 72.21 150.77 71.28 159.92 70.14 167.68 69.63 170.20 69.99 178.88 69.10 68.33 76.71 66.03 75.62 59.10 74.11 54.92 73.03 56.67 74.10 58.56 75.09 63.86 75.87 68.19 76.70 53.04 72.57 58.29 70.39 55.03 70.78 53.44 72.26 53.63 72.61 52.22 46.50 51.73 44.73 52.56 41.80 53.43 40.40 54.22 37.86 49.04 38.45 48.17 42.76 49.33 45.64 52.22 46.50 62.32 46.32 60.32 43.06 59.57 45.58 61.94 46.33 79.55 46.12 74.30 44.44 78.62 45.79 79.66 46.07 76.81 41.96 76.73 41.86 35.15 35.15 34.61 34.84 35.18 35.17 23.84 35.33 24.30 34.91 24.09 35.39 15.54 37.89 13.47 37.89 15.54 37.89 9.56 40.95 8.46 39.99 9.12 40.69 9.72 42.60 9.54 42.35 80.60 8.95 79.73 5.96 80.10 8.30 11.04 57.44 10.67 57.25 -77.92 24.67 -77.98 24.22 -77.61 23.62 -77.18 23.64 -75.55 24.13 -75.41 24.31 -91.40 -0.17 -91.52 -0.26 -60.25 46.68 -60.71 46.33 -63.89 49.47 -63.45 49.43 142.53 -10.60 145.62 -16.34 149.79 -22.09 153.21 -26.82 150.52 -35.19 145.60 -38.53 140.13 -37.69 137.34 -34.77 135.76 -34.56 131.50 -31.34 121.72 -33.65 115.62 -33.25 114.09 -26.01 114.88 -21.27 122.34 -18.13 125.32 -14.53 128.39 -14.90 132.35 -11.42 136.16 -12.43 138.07 -16.45 142.25 -10.78 144.72 -40.68 148.32 -42.14 145.57 -42.77 146.47 -41.19 172.86 -34.23 176.10 -37.52 177.06 -39.49 174.77 -38.03 172.83 -34.27 172.36 -40.53 172.92 -43.81 168.41 -46.13 170.26 -43.21 173.69 -40.94 150.74 -10.18 143.04 -8.26 138.48 -6.97 131.95 -2.94 130.91 -1.35 134.38 -2.64 141.24 -2.62 148.19 -8.15 150.75 -10.27 117.24 7.01 117.90 0.76 113.89 -3.50 109.44 -0.82 113.13 3.38 117.24 7.01 95.31 5.75 102.32 1.40 106.03 -2.98 101.46 -2.81 95.20 5.73 140.91 41.53 140.79 35.75 136.82 34.56 133.56 34.72 132.49 35.41 136.73 37.20 139.82 40.00 140.68 41.43 133.71 34.30 131.41 31.58 129.38 33.10 133.90 34.37 141.89 45.50 144.12 42.92 140.30 41.64 141.53 45.30 141.89 45.53 142.57 54.36 143.64 49.19 141.99 45.88 141.92 50.85 142.60 54.34 121.92 25.48 120.53 24.70 121.70 25.51 110.81 20.07 109.20 19.66 110.81 20.07 106.51 -6.16 114.15 -7.72 108.71 -7.89 106.51 -6.16 164.27 -20.01 164.16 -20.27 178.61 -17.04 178.61 -17.04 179.45 -16.43 179.35 -16.43 -172.55 -13.39 -172.61 -13.78 122.26 18.67 123.05 13.86 120.73 13.80 120.43 16.43 121.72 18.40 125.34 9.79 125.56 6.28 122.38 7.00 125.10 9.38 119.64 11.35 118.81 10.16 119.59 10.86 119.64 11.35 -179.87 65.14 -177.13 65.63 -173.46 64.74 -171.13 66.38 -176.48 67.78 -178.80 68.42 101.96 79.08 101.31 77.86 101.22 79.04 94.29 79.29 95.31 78.68 100.02 79.43 97.26 79.62 95.44 79.65 95.46 80.62 92.39 79.66 95.07 80.54 138.54 76.05 144.93 75.45 140.30 74.99 137.27 75.44 138.29 75.98 146.08 75.29 147.75 74.73 145.85 75.06 141.44 73.88 141.48 73.84 0.01 -71.68 6.57 -70.57 15.04 -70.44 25.10 -70.75 33.37 -69.10 38.46 -69.77 42.85 -68.16 46.59 -67.23 49.35 -66.96 52.90 -65.97 58.46 -67.20 63.60 -67.58 70.63 -68.41 69.24 -70.36 76.20 -69.44 88.08 -66.64 94.98 -66.52 101.53 -66.09 111.31 -65.91 118.64 -66.87 126.24 -66.24 133.09 -66.18 139.85 -66.72 146.86 -67.96 153.65 -68.82 159.94 -69.57 164.10 -70.67 170.19 -71.94 165.68 -74.64 163.82 -77.60 162.10 -78.95 166.72 -82.84 175.58 -83.86 -178.56 -84.37 -147.96 -85.40 -152.96 -81.12 -153.95 -79.50 -151.24 -77.48 -146.74 -76.44 -137.68 -75.16 -131.63 -74.63 -123.05 -74.41 -114.76 -73.97 -111.91 -75.41 -105.05 -74.77 -100.90 -74.21 -101.04 -73.18 -100.28 -73.06 -93.06 -73.33 -85.40 -73.18 -79.82 -73.04 -78.21 -72.52 -71.90 -73.41 -67.51 -71.10 -67.57 -68.92 -66.65 -66.83 -64.30 -65.28 -59.14 -63.74 -59.58 -64.37 -62.50 -65.94 -62.48 -66.66 -65.64 -68.02 -63.85 -69.07 -61.69 -70.87 -60.89 -72.71 -61.07 -74.30 -63.33 -75.88 -76.05 -77.06 -83.04 -77.12 -74.30 -80.83 -56.40 -82.14 -42.46 -81.65 -31.60 -80.17 -34.01 -79.20 -32.48 -77.28 -26.28 -76.18 -17.18 -73.45 -11.20 -72.01 -8.67 -71.98 -5.45 -71.45 -0.82 -71.74 0.07 -71.68 164.65 -77.89 170.95 -77.37 179.67 -78.25 -178.74 -78.24 -165.76 -78.47 -158.42 -77.73 -58.98 -64.63 -60.99 -68.62 -61.02 -71.70 -62.01 -74.94 -52.00 -77.07 -42.23 -77.80 -36.22 -78.03 -35.03 -77.81 -26.13 -75.54 -19.35 -73.04 -12.16 -71.86 -6.15 -70.65 -0.57 -69.14 4.93 -70.25 10.91 -69.99 16.52 -69.87 25.41 -70.22 32.13 -69.29 33.62 -69.58 70.56 -68.53 73.91 -69.51 81.42 -67.87 84.67 -66.41 89.07 -66.73 -135.79 -74.67 -124.34 -73.22 -116.65 -74.08 -109.93 -74.64 -105.36 -74.56 -105.83 -74.77 -69.30 -70.06 -71.33 -72.68 -71.42 -71.85 -75.10 -71.46 -71.79 -70.55 -70.34 -69.26 -69.34 -70.13 -49.20 -77.83 -44.59 -78.79 -44.14 -80.13 -59.04 -79.95 -49.28 -77.84 -48.24 -77.81 -58.13 -80.12 -63.25 -80.20 -58.32 -80.12 -163.64 -78.74 -161.20 -79.93 -163.62 -78.74 66.82 66.82 66.82 66.82 gnuplot-4.6.4/demo/Makefile.am.in0000644000471100001440000000476611752300767013543 0ustar ## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign CLEANFILES = binary1 binary2 binary3 defaults.ini equipo2.tmp field2xy.tmp \ fit.log soundfit.par temp.set fontfile.ps fontfile_latex.ps epslatex-inc.eps \ epslatex-inc.pdf epslatex.aux epslatex.dvi epslatex.log epslatex.pdf \ epslatex.ps epslatex.tex random.tmp stringvar.tmp BINARY_FILES = binary1 binary2 binary3 DEMO = all.dem GNUPLOT = gnuplot all: $(BINARY_FILES) $(BINARY_FILES): ../src/bf_test @echo Creating binary data files @../src/bf_test transform = @program_transform_name@ GNUPLOT_X11 = `echo gnuplot_x11 | sed '$(transform)'`$(EXEEXT) check-prepare: @if test ! -e "$(top_builddir)/src/$(GNUPLOT_X11)"; then\ $(LN_S) gnuplot_x11 $(top_builddir)/src/$(GNUPLOT_X11); \ fi check-local: check-noninteractive check-interactive: check-prepare $(BINARY_FILES) @if test -z "$(GNUTERM)" ; then \ ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \ GNUPLOT_DRIVER_DIR=$$bdir/../src \ GNUPLOT_LIB=$(srcdir) $(GNUPLOT) $(DEMO) ); \ else \ ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \ GNUPLOT_DRIVER_DIR=$$bdir/../src \ GNUTERM=$(GNUTERM) \ GNUPLOT_LIB=$(srcdir) $(GNUPLOT) $(DEMO) ); \ fi check-noninteractive: check-prepare $(BINARY_FILES) @if test -z "$(GNUTERM)" ; then \ ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \ GNUPLOT_DRIVER_DIR=$$bdir/../src \ GNUPLOT_LIB=$(srcdir) $(GNUPLOT) $(DEMO) $@t echo EXTRA_DIST = Makefile.am.in *.bin *.cfg *.cor *.dat *.dem *.edf \ *.fnc *.inc nearmap.csv *.pdb *.png *.r3d *.rgb sound.par sound2.par \ start.par *.rot gnu-valley random-points gpdemos.tcl html | fmt | \ (tr '\012' @; echo) | sed 's/@$$/%/;s/@/ \\@/g' | tr @% '\012 ' \ >> $@t sed -n '/^##m4-files-end/,$$p' $< >> $@t chmod og-w $@t mv $@t $@ gnuplot-4.6.4/demo/pointsize.dem0000644000471100001440000000336710377267021013606 0ustar # # Read individual point sizes from extra column of input file # Ethan A Merritt - October 2004 # unset key unset border unset yzeroaxis unset xtics unset ytics unset ztics # # plot a 2D map with locations marked by variable sized points # set title "plot with variable size points" plot 'world.dat' with lines lt 3, \ 'world.cor' using 1:2:(5.*rand(0)) with points lt 1 pt 6 ps variable pause -1 "Hit return to continue" # set title "splot with variable size points\nit is possible to specify size and color separately" set view map unset hidden3d splot 'world.dat' using 1:2:(0) with lines lt 3, \ 'world.cor' using 1:2:(0.5-rand(0)):(5.*rand(0)) with points pt 5 ps var lt palette pause -1 "Hit return to continue" # # plot a '3D version using spherical coordinate system' of the world. set angles degrees set title "3D version using spherical coordinate system" set ticslevel 0 set view 70,40,0.8,1.2 set mapping spherical set parametric set samples 32 set isosamples 9 set urange [-90:90] set vrange [0:360] splot cos(u)*cos(v),cos(u)*sin(v),sin(u) with lines lt 5,\ 'world.dat' with lines lt 3, \ 'world.cor' using 1:2:(1):(5.*rand(0)) with points lt 1 pt 6 ps variable pause -1 "Hit return to continue" # # hidden3d still not working fully # pointsize is now handled, but axes are never obscured # set title "3D solid version through hiddenlining" set hidden3d set arrow from 0,0,-1.2 to 0,0,1.2 lt 5 lw 2 set arrow from -1.2, 0, 0 to 1.2, 0, 0 nohead lt 5 lw 1 set arrow from 0, -1.2, 0 to 0, 1.2, 0 nohead lt 5 lw 1 splot cos(u)*cos(v),-cos(u)*sin(v),sin(u) with lines lt 5,\ 'world.dat' u 1:2:(1.001) with lines lt 3, \ 'world.cor' using 1:2:(1):(5.*rand(0)) with points lt 1 pt 6 ps var pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/gnuplot.cfg0000644000471100001440000000026310202373513013223 0ustar % LaTeX configuration file for usage with gnuplot-generated LaTeX files % (epslatex terminal with standalone option). % Here, used by epslatex.dem. \usepackage{exscale} \endinput gnuplot-4.6.4/demo/histerror.dat0000644000471100001440000000016311247535647013606 0ustar # histogram errorbars dummy set A err A set B err B 0 1 0.3 7 0.5 1 3 0.6 4 0.72 2 4 0.35 2 0.18 3 3.5 0.5 3 0.42 gnuplot-4.6.4/demo/multiaxis.dem0000644000471100001440000000136510632622545013575 0ustar # # $Id: multiaxis.dem,v 1.1 2007/06/09 22:10:45 sfeam Exp $ # # Use the 3rd plot of the electronics demo to show off # the use of multiple x and y axes in the same plot. # A(jw) = ({0,1}*jw/({0,1}*jw+p1)) * (1/(1+{0,1}*jw/p2)) p1 = 10 p2 = 10000 set dummy jw set grid x y2 set key center top title " " set logscale xy set log x2 unset log y2 set title "Transistor Amplitude and Phase Frequency Response" set xlabel "jw (radians)" set xrange [1.1 : 90000.0] set x2range [1.1 : 90000.0] set ylabel "magnitude of A(jw)" set y2label "Phase of A(jw) (degrees)" set ytics nomirror set y2tics set tics out set autoscale y set autoscale y2 plot abs(A(jw)) axes x1y1, 180./pi*arg(A(jw)) axes x2y2 pause -1 "Hit return to continue" # undo what we've done reset gnuplot-4.6.4/demo/stats.dem0000644000471100001440000000264511642177421012716 0ustar # # Exercise the "stats" command. # Skip this demo cleanly if the stats option was not configured. # if (!strstrt(GPVAL_COMPILE_OPTIONS,"+STATS")) { print "No support for stats command" } else { set title "Use of stats command to find min/max/mean before plotting\nOne data column" set style data line set offset 0,0,.5,.5 set autoscale fix set key left Left stats 'orbital_elements.dat' index 1 using 2 prefix "A" set arrow 1 from A_index_min, graph 0.1 to A_index_min, A_min fill set arrow 2 from A_index_max, graph 0.9 to A_index_max, A_max fill set label 1 at A_index_min, graph 0.1 "min" center offset 0,-1 set label 2 at A_index_max, graph 0.9 "max" center offset 0,1 plot 'orbital_elements.dat' index 1 using 0:2 title " Data" lw 2, \ A_mean title " Mean" pause -1 "Hit return to continue" set title "Use of stats command to find min/max/mean before plotting\nTwo data columns" f(x) = log(1+x) stats 'orbital_elements.dat' index 1 using (f($0)):2 prefix "B" set arrow 1 from B_pos_min_y, graph 0.1 to B_pos_min_y, B_min_y fill set arrow 2 from B_pos_max_y, graph 0.9 to B_pos_max_y, B_max_y fill set label 1 at B_pos_min_y, graph 0.1 "min" center offset 0,-1 set label 2 at B_pos_max_y, graph 0.9 "max" center offset 0,1 plot 'orbital_elements.dat' index 1 using (f($0)):2 title " Data" lw 2, \ B_mean_y title " Mean", \ B_slope * x + B_intercept title "Linear fit" pause -1 "Hit return to continue" } gnuplot-4.6.4/demo/enhancedtext.dem0000644000471100001440000000315510111311522014205 0ustar # # Test page for enhanced text mode # print " ----------------------------------------------------" print " This test page for enhanced text mode will only work" print " if enhanced text is selected and supported for the" print " current terminal type. E.g. 'set term post enh'" print " ----------------------------------------------------" # set termoption enhanced # set title "Test page for enhanced text mode" set xrange [-1:1] set yrange [-0.5:1.1] set format xy "%.1f" set arrow from 0.5, -0.5 to 0.5, 0.0 nohead # set label 1 at -0.65, 1.0 set label 1 "These examples require no extra fonts:" tc lt 3 set label 2 at -0.55, 0.9 set label 2 "10^{-2} A_{j,k} e^x" set label 3 at -0.55, 0.8 set label 3 'x@^2_k x@_0^{-3/2}y' set label 5 at -0.55, 0.7 set label 5 "Space-holders:" tc lt 3 set label 6 at -0.45, 0.6 set label 6 "<&{{/=20 B}ig}> <&{x@_0^{-3/2}y}> holds space for" set label 7 at -0.45, 0.5 set label 7 "<{/=20 B}ig> " set label 8 at -0.9, -0.2 set label 8 "Overprint\n(v should be centred over d)" tc lt 3 set label 9 at -0.85, -0.4 set label 9 " ~{abcdefg}{0.8v}" set label 10 at -.40, 0.35 set label 10 "Requires Symbol font:" tc lt 3 set label 11 at -.30, 0.2 set label 11 "{/Symbol=18 \362@_{/=9.6 0}^{/=12 ^\245}} {e^{-{/Symbol m}^2/2} d}{/Symbol m=(p/2)^{1/2}}" set label 21 at 0.5, -.1 set label 21 "Left ^{centered} text" left set label 22 at 0.5, -.2 set label 22 "Right ^{centered} text" right set label 23 at 0.5, -.3 set label 23 "Center^{centered} text" center # set key title " " plot sin(x)**2 lt 2 lw 2 title "sin^2(x)" # pause -1 "Hit to continue" reset gnuplot-4.6.4/demo/margins.dem0000644000471100001440000000273311022671212013203 0ustar # # Demonstrate use of 'set {btlr}margin at screen ' # to pin plot borders to a specific place on the canvas. # This allows positioning multiple plots on the page so that their # corners line up perfectly. # # Aug 2006 - Ethan A Merritt # set multiplot title "Demo of placing multiple plots (2D and 3D)\nwith explicit alignment of plot borders" # # First plot (large) # set lmargin at screen 0.20 set rmargin at screen 0.85 set bmargin at screen 0.25 set tmargin at screen 0.90 set pm3d set palette rgbformulae 7, 5, 15 set view map set samples 50, 50 set isosamples 50, 50 unset surface set xrange [ -15.00 : 15.00 ] set yrange [ -15.00 : 15.00 ] set zrange [ -0.250 : 1.000 ] unset xtics unset ytics set key above splot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2) unset pm3d unset key # # second plot (tall and narrow; at left of main plot) # set lmargin at screen 0.10 set rmargin at screen 0.20 set ytics set parametric set dummy u,v set view map f(h) = sin(sqrt(h**2))/sqrt(h**2) set urange [ -15.00 : 15.00 ] set vrange [ -15.00 : 15.00 ] set xrange [*:*] set surface splot f(u), u, 0 with lines lc rgb "green" unset parametric # # third plot (short and wide; at bottom of main plot) # set lmargin at screen 0.20 set rmargin at screen 0.85 set bmargin at screen 0.10 set tmargin at screen 0.25 set xrange [ -15.00 : 15.00 ] set yrange [ * : * ] set xtics unset ytics y = 0 plot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2) unset multiplot pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/orbital_elements.dat0000644000471100001440000001406311415255032015101 0ustar # Keplerian elements of the major planets, with respect to the mean ecliptic # and equinox of J2000, valid for the time-interval 1800 AD - 2050 AD. # # Source of the data: # the JPL Solar System Dynamics web site (http://ssd.jpl.nasa.gov/). # #Name a e I arg.peri. long.node. L # AU rad deg deg deg deg #----------------------------------------------------------------------------------------------------------- Mercury 0.387099 0.205636 7.004979 29.127030 48.330766 252.250324 Venus 0.723336 0.006777 3.394676 54.922625 76.679843 181.979100 Earth 1.000003 0.016711 -0.000015 102.937682 0.000000 100.464572 Mars 1.523710 0.093394 1.849691 -73.503169 49.559539 -4.553432 Jupiter 5.202887 0.048386 1.304397 -85.745429 100.473909 34.396441 Saturn 9.536676 0.053862 2.485992 -21.063546 113.662424 49.954244 Uranus 19.189165 0.047257 0.772638 96.937351 74.016925 313.238105 Neptune 30.069923 0.008590 1.770043 -86.819463 131.784226 -55.120030 Pluto 39.482117 0.248827 17.140012 113.764979 110.303937 238.929038 # Minor planets # Num Name a e i w Node M H G Ref #----------------------- ---------- ---------- --------- --------- --------- ----------- ----- ---- ---------- (1)Ceres 2.765723 0.079222 10.586260 72.692690 80.393850 70.434003 3.34 0.12 JPL 26 (2)Pallas 2.772749 0.230970 34.840360 310.206480 173.128430 53.395422 4.13 0.11 JPL 21 (3)Juno 2.670001 0.254966 12.982060 248.085780 169.911550 346.928514 5.33 0.32 JPL 84 (4)Vesta 2.361937 0.088729 7.134420 149.836810 103.914860 253.504213 3.2 0.32 JPL 27 (5)Astraea 2.577742 0.190816 5.371410 358.020670 141.658210 191.872699 6.85 0.15 JPL 63 (6)Hebe 2.424609 0.202491 14.754050 239.470520 138.739670 279.469253 5.71 0.24 JPL 62 (7)Iris 2.386586 0.230907 5.523060 145.142440 259.686790 311.173173 5.51 0.15 JPL 87 (8)Flora 2.200870 0.156833 5.889120 285.376540 110.957960 248.797560 6.49 0.28 JPL 71 (9)Metis 2.386609 0.122221 5.574320 6.307150 68.953670 87.922816 6.28 0.17 JPL 69 (10)Hygiea 3.139718 0.116943 3.841120 313.113230 283.449840 268.905247 5.43 0.15 JPL 70 (11)Parthenope 2.452598 0.099457 4.626350 194.877550 125.610430 127.329954 6.55 0.15 JPL 44 (12)Victoria 2.334373 0.220250 8.362670 69.764760 235.509390 273.301228 7.24 0.22 JPL 63 (13)Egeria 2.575576 0.085816 16.544070 80.570960 43.275830 97.331753 6.74 0.15 JPL 40 (14)Irene 2.585174 0.167305 9.106630 96.346280 86.451920 80.842954 6.3 0.15 JPL 36 (15)Eunomia 2.642430 0.188094 11.738670 97.823630 293.256810 224.311984 5.28 0.23 JPL 58 (16)Psyche 2.923139 0.138410 3.099100 226.941780 150.295100 339.653956 5.9 0.2 JPL 64 (17)Thetis 2.469391 0.134761 5.589040 135.671220 125.600550 161.046143 7.76 0.15 JPL 50 (18)Melpomene 2.295377 0.218197 10.129060 227.780870 150.514610 23.952478 6.51 0.25 JPL 57 (19)Fortuna 2.442093 0.157609 1.572570 182.047410 211.253100 39.234788 7.13 0.1 JPL 68 (20)Massalia 2.408898 0.141753 0.707680 256.657620 206.196940 301.490039 6.5 0.25 JPL 57 # Comets #Num Name Epoch a e i w Node Tp Ref #-------------------------------------- ------- ----------- ---------- --------- --------- --------- -------------- ------------ 1P/Halley 17.834145 0.967143 162.26269 111.33249 58.42008 19860205.89532 JPL J863/77 2P/Encke 2.215371 0.848596 11.86038 186.41178 334.72243 19970523.56424 JPL J974/1 3D/Biela 3.534658 0.751299 13.21640 221.65880 250.66900 18321126.61520 IAUCAT03 4P/Faye 3.837520 0.568156 9.04889 204.98443 199.33960 19990506.12157 JPL 49 5D/Brorsen 3.101128 0.809796 29.38210 14.94680 102.96760 18790331.03410 IAUCAT03 6P/d'Arrest 3.493759 0.612805 19.49760 178.11310 138.94500 20020203.59160 SAO/2002 7P/Pons-Winnecke 3.438287 0.634078 22.28470 172.29280 93.44990 20020515.72020 SAO/2002 8P/Tuttle 5.671754 0.824089 54.69250 206.70340 270.54850 19940625.30500 SAO/1994 9P/Tempel 1 3.122079 0.517490 10.53028 178.86490 68.93432 20050705.34847 JPL K051/22 10P/Tempel 2 3.105058 0.522818 11.97670 195.02320 118.21140 19990908.42140 SAO/1999 11P/Tempel-Swift-LINEAR 3.437396 0.539165 13.46043 163.63395 240.71050 20011230.75628 JPL K0116/15 12P/Pons-Brooks 17.121222 0.954812 74.17689 199.02847 255.89114 19540522.88085 JPL 15 13P/Olbers 16.906778 0.930297 44.60989 64.64121 86.10313 19560619.13533 JPL 10 14P/Wolf 4.069540 0.407149 27.52270 162.36330 204.12090 20001121.07210 SAO/2000 15P/Finlay 3.574800 0.710400 3.67352 323.54272 42.03330 19950505.05391 JPL J956/4 16P/Brooks 2 3.613090 0.492080 5.54789 198.06619 176.92135 20010719.74388 JPL K014/8 17P/Holmes 3.682938 0.412021 19.18780 23.34790 328.01000 20000511.82050 SAO/2000 18D/Perrine-Mrkos 3.559542 0.642581 17.75898 166.05042 240.87555 19681101.54213 JPL J682/18 19P/Borrelly 3.611363 0.623908 30.32461 353.37539 75.42487 20010914.73115 JPL K013/75 20D/Westphal 15.642153 0.919831 40.89006 57.08095 348.00645 19131126.79026 JPL 19 # Distant small bodies # ID a e i w W M (49036) Pelion - 1998 QM107 20.076 0.138 9.3 155.0 127 67.5 (48639) - 1995 TL8 52.752 0.241 0.2 84.7 260.5 36.1 (44594) - 1999 OX3 32.484 0.457 2.6 143.8 259.2 332.7 (42355) Typhon - 2002 CR46 37.612 0.534 2.4 158.9 352 5.7 (42301) - 2001 UR163 51.861 0.286 0.8 344.3 301.7 69.7 (38084) - 1999 HB12 55.590 0.415 13.2 66.8 166.5 352.0 (33128) - 1998 BU48 33.158 0.384 14.3 281.9 132.8 61.0 (32532) Thereus - 2001 PT13 10.651 0.198 20.3 87.2 205.2 112.3 (31824) Elatus - 1999 UG5 11.763 0.384 5.2 281.5 87.1 102.4 (29981) - 1999 TD10 98.152 0.875 6.0 172.7 184.6 3.8 (26375) - 1999 DE9 55.108 0.415 7.6 159.1 323 21.1 (26181) - 1996 GQ21 93.019 0.588 13.4 356.6 194.2 8.1 (15874) - 1996 TL66 83.943 0.583 24.0 184.4 217.7 4.1 (12929) - 1999 TZ1 5.215 0.040 43.5 128.8 200.2 327.2 (10370) Hylonome - 1995 DW2 25.064 0.246 4.1 6.5 178.3 41.9 (10199) Chariklo - 1997 CU26 15.778 0.171 23.4 242.2 300.5 34.4 (8405) Asbolus - 1995 GO 18.108 0.621 17.6 290.6 6 34.7 (7066) Nessus - 1993 HA2 24.643 0.518 15.6 170.8 31.4 52.7 (5145) Pholus - 1992 AD 20.318 0.572 24.7 354.8 119.4 72.0 (2060) Chiron - 1977 UB 13.704 0.379 6.9 339.9 209.3 98.7 gnuplot-4.6.4/demo/running_avg.dem0000644000471100001440000000251710665456154014102 0ustar # # This script demonstrates the use of assignment operators and # sequential expression evaluation to track data points as they # are read in. # # We use the '=' and ',' operators to track the running total # and previous 5 values of a stream of input data points. # # Ethan A Merritt - August 2007 # # Define a function to calculate average over previous 5 points # set title \ "Demonstrate use of assignment and serial evaluation operators\n" \ . "to accumulate statistics as successive data lines are read in\n" set key invert box center right reverse Left set xtics nomirror set ytics nomirror set border 3 samples(x) = $0 > 4 ? 5 : ($0+1) avg5(x) = (shift5(x), (back1+back2+back3+back4+back5)/samples($0)) shift5(x) = (back5 = back4, back4 = back3, back3 = back2, back2 = back1, back1 = x) # # Initialize a running sum # init(x) = (back1 = back2 = back3 = back4 = back5 = sum = 0) # # Plot data, running average and cumulative average # datafile = 'silver.dat' set xrange [0:57] set style data linespoints plot sum = init(0), \ datafile using 0:2 title 'data' lw 2 lc rgb 'forest-green', \ '' using 0:(avg5($2)) title "running mean over previous 5 points" pt 7 ps 0.5 lw 1 lc rgb "blue", \ '' using 0:(sum = sum + $2, sum/($0+1)) title "cumulative mean" pt 1 lw 1 lc rgb "dark-red" pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/finance.dem0000644000471100001440000003203511210415641013145 0ustar # 10 May 2005 # # Though gnuplot is primarily a scientific plotting program, it can do a great # job of plotting finance charts as well. The primary challenge is the irregular # nature of financial time series. Stocks don't trade every day, so when you set # the x-axis to time gaps appear for non-trading days. Investors and traders # generally prefer that these gaps be omitted. Another challenge is that finance # charts are best presented in semi-log form (log y-axis, linear x-axis), # but gnuplot wants to span decades in its log scaling, something that stocks # rarely do. These and other challenges are met in finance.dem, a short # demonstration script that proves that gnuplot can really shine in this area. # # gnuplot plays a central role in our work. Almost all the graphs in "Bollinger # on Bollinger Bands" were plotted by gnuplot, many gnuplot visuals have # appeared on CNBC, our in-house analytics use gnuplot for visual display and # The Capital Growth Letter relies heavily on gnuplot for its charts. # # Finally, gnuplot is yet another successful demonstration of a powerful idea, # open source programming. Thanks to all who made gnuplot possible from the # earliest days to the present and to all those who will contribute in the # future. (Special thanks to Hans-Bernhard Broeker whose patience helped me to # climb the grade and to Ethan Merritt whose recent contributions have been # invaluable to our work.) # # John Bollinger # www.BollingerBands.com # a demonstration of gnuplot finance plot styles # by John Bollinger, CFA, CMT # www.BollingerBands.com # BBands@BollingerBands.com # data and indicators in finance.dat # data file layout: # date, open, high, low, close, volume, # 50-day moving average volume, Intraday Intensity, # 20-day moving average close, # upper Bollinger Band, lower Bollinger Band # last update: 8 May 2005 pause -1 "Click OK to start the Finance Demo" reset # set label 1 "Demo of plotting financial data" at screen 0.5, screen 0.95 center set title "Demo of plotting financial data" set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set lmargin 9 set rmargin 2 plot 'finance.dat' using 0:5 notitle with lines pause -1 "Turn on the grid" reset set title "Turn on grid" set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set lmargin 9 set rmargin 2 set grid plot 'finance.dat' using 0:5 notitle with lines pause -1 "Semi-log scaling" reset set title "Semi-log scaling" set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set lmargin 9 set rmargin 2 set grid set logscale y plot 'finance.dat' using 0:5 notitle with lines pause -1 "Finance bars" reset set title "Finance bars" set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set lmargin 9 set rmargin 2 set grid set logscale y plot 'finance.dat' using 0:2:3:4:5 notitle with financebars lt 8 pause -1 "Bollinger Bands" reset set title "Bollinger Bands" set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set lmargin 9 set rmargin 2 set grid set logscale y plot 'finance.dat' using 0:2:3:4:5 notitle with financebars lt 8, \ 'finance.dat' using 0:9 notitle with lines lt 3, \ 'finance.dat' using 0:10 notitle with lines lt 1, \ 'finance.dat' using 0:11 notitle with lines lt 2 pause -1 "Overlay an indicator on a seperate scale" reset set title "Overlay an indicator on a separate scale" set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set lmargin 9 set rmargin 2 set grid set logscale y plot 'finance.dat' using 0:2:3:4:5 notitle with financebars lt 8, \ 'finance.dat' using 0:9 notitle with lines lt 3, \ 'finance.dat' using 0:10 notitle with lines lt 1, \ 'finance.dat' using 0:11 notitle with lines lt 2, \ 'finance.dat' using 0:8 axes x1y2 notitle with lines lt 4 pause -1 "Add some boiler plate" reset set title "Add some boiler plate" set label "Courtesy of Bollinger Capital" at graph 0.01, 0.07 set label " www.BollingerBands.com" at graph 0.01, 0.03 set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set lmargin 9 set rmargin 2 set grid set logscale y plot 'finance.dat' using 0:2:3:4:5 notitle with financebars lt 8, \ 'finance.dat' using 0:9 notitle with lines lt 3, \ 'finance.dat' using 0:10 notitle with lines lt 1, \ 'finance.dat' using 0:11 notitle with lines lt 2, \ 'finance.dat' using 0:8 axes x1y2 notitle with lines lt 4 pause -1 "Add volume in a seperate clip" reset set label "Courtesy of Bollinger Capital" at graph 0.01, 0.07 set label " www.BollingerBands.com" at graph 0.01, 0.03 set logscale y set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set grid set lmargin 9 set rmargin 2 set format x "" set xtics (66, 87, 109, 130, 151, 174, 193, 215, 235) set multiplot set size 1, 0.7 set origin 0, 0.3 set bmargin 0 set title "Add volume in a separate clip" plot 'finance.dat' using 0:2:3:4:5 notitle with financebars lt 8, \ 'finance.dat' using 0:9 notitle with lines lt 3, \ 'finance.dat' using 0:10 notitle with lines lt 1, \ 'finance.dat' using 0:11 notitle with lines lt 2, \ 'finance.dat' using 0:8 axes x1y2 notitle with lines lt 4 unset label 1 unset label 2 unset title set bmargin set format x set size 1.0, 0.3 set origin 0.0, 0.0 set tmargin 0 unset logscale y set autoscale y set format y "%1.0f" set ytics 500 plot 'finance.dat' using 0:($6/10000) notitle with impulses lt 3 unset multiplot pause -1 "Add average volume" reset set label "Courtesy of Bollinger Capital" at graph 0.01, 0.07 set label " www.BollingerBands.com" at graph 0.01, 0.03 set logscale y set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set grid set lmargin 9 set rmargin 2 set format x "" set xtics (66, 87, 109, 130, 151, 174, 193, 215, 235) set multiplot set title "Add average volume" set size 1, 0.7 set origin 0, 0.3 set bmargin 0 plot 'finance.dat' using 0:2:3:4:5 notitle with financebars lt 8, \ 'finance.dat' using 0:9 notitle with lines lt 3, \ 'finance.dat' using 0:10 notitle with lines lt 1, \ 'finance.dat' using 0:11 notitle with lines lt 2, \ 'finance.dat' using 0:8 axes x1y2 notitle with lines lt 4 unset label 1 unset label 2 unset title set bmargin set format x set size 1.0, 0.3 set origin 0.0, 0.0 set tmargin 0 unset logscale y set autoscale y set format y "%1.0f" set ytics 500 plot 'finance.dat' using 0:($6/10000) notitle with impulses lt 3, \ 'finance.dat' using 0:($7/10000) notitle with lines lt 1 unset multiplot pause -1 "Add date labels to the x axis" reset set label "Courtesy of Bollinger Capital" at graph 0.01, 0.07 set label " www.BollingerBands.com" at graph 0.01, 0.03 set logscale y set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set grid set lmargin 9 set rmargin 2 set format x "" set xtics (66, 87, 109, 130, 151, 174, 193, 215, 235) set multiplot set title "Add date labels to the x axis" set size 1, 0.7 set origin 0, 0.3 set bmargin 0 plot 'finance.dat' using 0:2:3:4:5 notitle with financebars lt 8, \ 'finance.dat' using 0:9 notitle with lines lt 3, \ 'finance.dat' using 0:10 notitle with lines lt 1, \ 'finance.dat' using 0:11 notitle with lines lt 2, \ 'finance.dat' using 0:8 axes x1y2 notitle with lines lt 4 unset label 1 unset label 2 unset title set bmargin set format x set size 1.0, 0.3 set origin 0.0, 0.0 set tmargin 0 unset logscale y set autoscale y set format y "%1.0f" set ytics 500 set xtics ("6/03" 66, "7/03" 87, "8/03" 109, "9/03" 130, "10/03" 151, "11/03" 174, "12/03" 193, "1/04" 215, "2/04" 235) plot 'finance.dat' using 0:($6/10000) notitle with impulses lt 3, \ 'finance.dat' using 0:($7/10000) notitle with lines lt 1 unset multiplot pause -1 "Add labels for each clip" reset set label "Courtesy of Bollinger Capital" at graph 0.01, 0.07 set label " www.BollingerBands.com" at graph 0.01, 0.03 set logscale y set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set grid set lmargin 9 set rmargin 2 set format x "" set xtics (66, 87, 109, 130, 151, 174, 193, 215, 235) set multiplot set title "Add labels for each clip" set size 1, 0.7 set origin 0, 0.3 set bmargin 0 set ylabel "price" offset 1 plot 'finance.dat' using 0:2:3:4:5 notitle with financebars lt 8, \ 'finance.dat' using 0:9 notitle with lines lt 3, \ 'finance.dat' using 0:10 notitle with lines lt 1, \ 'finance.dat' using 0:11 notitle with lines lt 2, \ 'finance.dat' using 0:8 axes x1y2 notitle with lines lt 4 unset label 1 unset label 2 unset title set bmargin set format x set size 1.0, 0.3 set origin 0.0, 0.0 set tmargin 0 unset logscale y set autoscale y set format y "%1.0f" set ytics 500 set xtics ("6/03" 66, "7/03" 87, "8/03" 109, "9/03" 130, "10/03" 151, "11/03" 174, "12/03" 193, "1/04" 215, "2/04" 235) set ylabel "volume (0000)" offset 1 plot 'finance.dat' using 0:($6/10000) notitle with impulses lt 3, \ 'finance.dat' using 0:($7/10000) notitle with lines lt 1 unset multiplot pause -1 "Add a title" reset set label 1 "Acme Widgets" at graph 0.5, graph 0.9 center front set label 2 "Courtesy of Bollinger Capital" at graph 0.01, 0.07 set label 3 " www.BollingerBands.com" at graph 0.01, 0.03 set logscale y set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set grid set lmargin 9 set rmargin 2 set format x "" set xtics (66, 87, 109, 130, 151, 174, 193, 215, 235) set multiplot set title "Add a title" set size 1, 0.7 set origin 0, 0.3 set bmargin 0 set ylabel "price" offset 1 plot 'finance.dat' using 0:2:3:4:5 notitle with financebars lt 8, \ 'finance.dat' using 0:9 notitle with lines lt 3, \ 'finance.dat' using 0:10 notitle with lines lt 1, \ 'finance.dat' using 0:11 notitle with lines lt 2, \ 'finance.dat' using 0:8 axes x1y2 notitle with lines lt 4 unset label 1 unset label 2 unset label 3 unset title set bmargin set format x set size 1.0, 0.3 set origin 0.0, 0.0 set tmargin 0 unset logscale y set autoscale y set format y "%1.0f" set ytics 500 set xtics ("6/03" 66, "7/03" 87, "8/03" 109, "9/03" 130, "10/03" 151, "11/03" 174, "12/03" 193, "1/04" 215, "2/04" 235) set ylabel "volume (0000)" offset 1 plot 'finance.dat' using 0:($6/10000) notitle with impulses lt 3, \ 'finance.dat' using 0:($7/10000) notitle with lines lt 1 unset multiplot pause -1 " Change to Candlesticks" reset set label 1 "Acme Widgets" at graph 0.5, graph 0.9 center front set label 2 "Courtesy of Bollinger Capital" at graph 0.01, 0.07 set label 3 " www.BollingerBands.com" at graph 0.01, 0.03 set logscale y set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set grid set lmargin 9 set rmargin 2 set format x "" set xtics (66, 87, 109, 130, 151, 174, 193, 215, 235) set multiplot set title "Change to candlesticks" set size 1, 0.7 set origin 0, 0.3 set bmargin 0 set ylabel "price" offset 1 plot 'finance.dat' using 0:2:3:4:5 notitle with candlesticks lt 8, \ 'finance.dat' using 0:9 notitle with lines lt 3, \ 'finance.dat' using 0:10 notitle with lines lt 1, \ 'finance.dat' using 0:11 notitle with lines lt 2, \ 'finance.dat' using 0:8 axes x1y2 notitle with lines lt 4 unset label 1 unset label 2 unset label 3 unset title set bmargin set format x set size 1.0, 0.3 set origin 0.0, 0.0 set tmargin 0 unset logscale y set autoscale y set format y "%1.0f" set ytics 500 set xtics ("6/03" 66, "7/03" 87, "8/03" 109, "9/03" 130, "10/03" 151, "11/03" 174, "12/03" 193, "1/04" 215, "2/04" 235) set ylabel "volume (0000)" offset 1 plot 'finance.dat' using 0:($6/10000) notitle with impulses lt 3, \ 'finance.dat' using 0:($7/10000) notitle with lines lt 1 unset multiplot pause -1 "Change to Bollinger Boxes" reset set label 1 "Acme Widgets" at graph 0.5, graph 0.9 center front set label 2 "Courtesy of Bollinger Capital" at graph 0.01, 0.07 set label 3 " www.BollingerBands.com" at graph 0.01, 0.03 set logscale y set yrange [75:105] set ytics (105, 100, 95, 90, 85, 80) set xrange [50:253] set grid set lmargin 9 set rmargin 2 set format x "" set xtics (66, 87, 109, 130, 151, 174, 193, 215, 235) set multiplot set title "Change to Bollinger Boxes" set size 1, 0.7 set origin 0, 0.3 set bmargin 0 set ylabel "price" offset 1 plot 'finance.dat' using 0:3:3:($2>$5?$2:$5):($2>$5?$2:$5) notitle with candlesticks lt 3, \ 'finance.dat' using 0:($2<$5?$5:1/0):($2<$5?$5:1/0):($2<$5?$2:1/0):($2<$5?$2:1/0) notitle with candlesticks lt 2, \ 'finance.dat' using 0:($2>$5?$2:1/0):($2>$5?$2:1/0):($2>$5?$5:1/0):($2>$5?$5:1/0) notitle with candlesticks lt 1, \ 'finance.dat' using 0:($2<$5?$2:$5):($2<$5?$2:$5):4:4 notitle with candlesticks lt 3, \ 'finance.dat' using 0:9 notitle with lines lt 3, \ 'finance.dat' using 0:10 notitle with lines lt 1, \ 'finance.dat' using 0:11 notitle with lines lt 2, \ 'finance.dat' using 0:8 axes x1y2 notitle with lines lt 4 unset label 1 unset label 2 unset label 3 unset title set bmargin set format x set size 1.0, 0.3 set origin 0.0, 0.0 set tmargin 0 unset logscale y set autoscale y set format y "%1.0f" set ytics 500 set xtics ("6/03" 66, "7/03" 87, "8/03" 109, "9/03" 130, "10/03" 151, "11/03" 174, "12/03" 193, "1/04" 215, "2/04" 235) set ylabel "volume (0000)" offset 1 plot 'finance.dat' using 0:($6/10000) notitle with impulses lt 3, \ 'finance.dat' using 0:($7/10000) notitle with lines lt 1 unset multiplot pause -1 "all done!" reset gnuplot-4.6.4/demo/smooth.dem0000644000471100001440000000233711021160421013046 0ustar bin(x, s) = s*int(x/s) set zeroaxis # Uniform set title "Uniform Distribution" set key top right set boxwidth 0.05 plot [-0.1:1.1][-0.4:1.5] "random-points" u 1:(0.25*rand(0)-.35) t '', \ "" u (bin($1,0.05)):(20/300.) s f t 'smooth frequency' w boxes, \ "" u 1:(1/300.) s cumul t 'smooth cumulative' pause -1 "Hit enter to continue" # Normal set title "Normal Distribution" set key top left set boxwidth 0.05 plot "random-points" u 2:(0.25*rand(0)-.35) t '', \ "" u (bin($2,0.05)):(20/300.) s f t 'smooth frequency' w boxes, \ "" u 2:(1/300.) s cumul t 'smooth cumulative' pause -1 "Hit enter to continue" # Lognormal set title "Lognormal Distribution" set key top right set boxwidth 0.1 plot [0:] "random-points" u 3:(0.25*rand(0)-.35) t '', \ "" u (bin($3,0.1)):(10/300.) s f t 'smooth frequency' w boxes, \ "" u 3:(1/300.) s cumul t 'smooth cumulative' pause -1 "Hit enter to continue" # Mixed set title "Mixed Distribution (Lognormal with shifted Gaussian)" set key top right set boxwidth 0.1 plot "random-points" u 4:(0.25*rand(0)-.35) t '', \ "" u (bin($4,0.1)):(10/300.) s f t 'smooth frequency' w boxes, \ "" u 4:(1/300.) s cumul t 'smooth cumulative' pause -1 "Hit enter to continue" reset gnuplot-4.6.4/demo/using.bin0000644000471100001440000000374010115371145012676 0ustar ݘ d\$ݘ h $ݘ l %ݘ p $ݘ u :f&ݘ y*&ݘ }@&ݘ &ݘ &ݘ ^%ݘ %%ݘ $ &ݘ p &ݘ %ݘ %v%ݘ #b&ݘ )\%ݘ &ݘ  &ݘ &ݘ 0%ݘ %ݘ D%ݘ %ޘ %ޘ X%ޘ $ޘ v%ޘ N%ޘ N%ޘ v$ޘ ^$ޘ @$ޘ h$ޘ $ޘ %LX%ޘ (&ޘ -&ޘ .tz&ޘ .&ޘ  +&ޘ &ޘ <&ޘ &ޘ *&ޘ  &ޘ $&ޘ (&ߘ ,&ߘ 0&ߘ 4H&ߘ 9&ߘ =&ߘ Aj&ߘ E &ߘ I b'ߘ M&ߘ R&ߘ V'&ߘ Z%&ߘ ^!&ߘ b(&ߘ f- f&ߘ k-dz&ߘ o%J&ߘ s@&ߘ w>&ߘ {*&ߘ  4&ߘ %ߘ  &%ߘ  & & & TH& "& & ' ' " x    *&  j B:% 8" J& T& ' &  & &  &  6&  &  & & :&  & J!  x  n$ d  d dL n. "  && *$ .>! 3& 7x# ; ?  Cf& GJ" L PZ' T n X  \x@ ` end in mx qd  u2 yFd ~n6 % $6 X  &6& '0\& +:& :& & & "& 6% ! J%  @\&  Z  ,&   $  B"  0$    ,J$ )& & '& v% #& %>% " & & &  & & & 6&  J&gnuplot-4.6.4/demo/steps.dem0000644000471100001440000000233407744002175012712 0ustar # # $Id: steps.dem,v 1.5 2003/10/17 15:02:21 mikulik Exp $ # # This file will serve as the datafile used in demonstrating the # "plot with steps" option. Here is a gnuplot input file # which uses "plot with steps", inverse error function, normal # distribution function, and the inverse normal distribution # function. set title "Compare steps, fsteps and histeps" plot [0:12][0:13] "steps.dat" notitle with points, \ "steps.dat" title 'steps' with steps, \ 'steps.dat' title 'fsteps' with fsteps, \ 'steps.dat' title 'histeps' with histeps pause -1 "Hit return for demonstration of automatic histogram creation" set title "Histogram built from unsorted data by 'smooth frequency'" set ylabel 'counts per bin' set xlabel 'bins' plot 'hemisphr.dat' u (floor($1*20)):(1) smooth frequency with histeps unset xlabel unset ylabel pause -1 "Hit return for normal distribution function." set title "Normal Distribution Function" plot [-3:3][0:1] norm(x) pause -1 "Hit return for inverse error function." set title "Inverse Error Function" plot [-1:1] inverf(x) pause -1 "Hit return for inverse normal distribution function." set title "Inverse Normal Distribution Function" plot [0:1] invnorm(x) pause -1 "Press return to continue" reset gnuplot-4.6.4/demo/2.dat0000644000471100001440000000151506515203630011712 0ustar # # $Id: 2.dat,v 1.1.1.1 1998/04/15 19:16:40 lhecking Exp $ # # -20.000000 -6.083352 -19.000000 -6.072853 -18.000000 -6.061191 -17.000000 -6.048162 -16.000000 -6.033510 -15.000000 -6.016913 -14.000000 -5.997955 -13.000000 -5.976098 -12.000000 -5.950620 -11.000000 -5.920546 -10.000000 -5.884511 -9.000000 -5.840556 -8.000000 -5.785765 -7.000000 -5.715597 -6.000000 -5.622591 -5.000000 -5.493603 -4.000000 -5.303271 -3.000000 -4.996183 -2.000000 -4.428595 -1.000000 -3.141593 0.000000 0.000000 1.000000 3.141593 2.000000 4.428595 3.000000 4.996183 4.000000 5.303271 5.000000 5.493603 6.000000 5.622591 7.000000 5.715597 8.000000 5.785765 9.000000 5.840556 10.000000 5.884511 11.000000 5.920546 12.000000 5.950620 13.000000 5.976098 14.000000 5.997955 15.000000 6.016913 16.000000 6.033510 17.000000 6.048162 18.000000 6.061191 19.000000 6.072853 gnuplot-4.6.4/demo/heatmaps.dem0000644000471100001440000000407111021572230013341 0ustar # # Two ways of generating a 2D heat map from ascii data # set title "Heat Map generated from a file containing Z values only" unset key set tic scale 0 # Color runs from white to green set palette rgbformula -7,2,-7 set cbrange [0:5] set cblabel "Score" unset cbtics set xrange [-0.5:4.5] set yrange [-0.5:4.5] set view map splot '-' matrix with image 5 4 3 1 0 2 2 0 0 1 0 0 0 1 0 0 0 0 2 3 0 1 2 4 3 e e pause -1 "Hit return to continue" set title "Heat Map generated by 'plot' from a stream of XYZ values"\ ."\nNB: Rows must be separated by blank lines!" plot '-' using 2:1:3 with image 0 0 5 0 1 4 0 2 3 0 3 1 0 4 0 1 0 2 1 1 2 1 2 0 1 3 0 1 4 1 2 0 0 2 1 0 2 2 0 2 3 1 2 4 0 3 0 0 3 1 0 3 2 0 3 3 2 3 4 3 4 0 0 4 1 1 4 2 2 4 3 4 4 4 3 e pause -1 "Hit return to continue" reset # # Demonstrate use of 4th data column to color a 3D surface. # Also demonstrate use of the pseudodata special file '++'. # This plot is nice for exploring the effect of the 'l' and 'L' hotkeys. # set view 49, 28, 1, 1.48 set xrange [ 5 : 35 ] noreverse nowriteback set yrange [ 5 : 35 ] noreverse nowriteback # set zrange [ 1.0 : 3.0 ] noreverse nowriteback set ticslevel 0 set format cb "%4.1f" set colorbox user size .03, .6 noborder set cbtics scale 0 set samples 25, 25 set isosamples 50, 50 set title "4D data (3D Heat Map)"\ ."\nIndependent value color-mapped onto 3D surface" offset 0,1 set xlabel "x" offset 3, 0, 0 set ylabel "y" offset -5, 0, 0 set zlabel "z" offset 2, 0, 0 set pm3d implicit at s Z(x,y) = 100. * (sinc(x,y) + 1.5) sinc(x,y) = sin(sqrt((x-20.)**2+(y-20.)**2))/sqrt((x-20.)**2+(y-20.)**2) color(x,y) = 10. * (1.1 + sin((x-20.)/5.)*cos((y-20.)/10.)) splot '++' using 1:2:(Z($1,$2)):(color($1,$2)) with pm3d title "4 data columns x/y/z/color" pause -1 "Hit return to continue" set title "4D data (3D Heat Map)"\ ."\nZ is contoured. Independent value is color-mapped" offset 0,1 set view map set contour base splot '++' using 1:2:(Z($1,$2)):(color($1,$2)) with pm3d title "4 data columns x/y/z/color" pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/timedat.dat0000644000471100001440000000115006515203633013176 0ustar 01/06/93 0000 0.20 0.175 3.07 2.62 0 25 0.24 7.5 70.8 16.9 0.328 9.94 23.74 6.74 8.34 5.96 4.69 0 0.164 0.021 0 0 8.62 22.8 17/08/93 0900 0.20 0.175 3.07 2.62 0 25 0.24 7.5 70.8 16.9 0.328 9.94 23.74 6.74 8.34 5.96 4.69 0 0.164 0.021 0 0 8.62 22.8 04/10/93 1300 0.28 0.18 6.05 4.92 0 0 106 0.24 7.2 53.7 20.8 0.12 6.45 27.55 6.37 8.94 7.46 0.499 0 0 0 0.035 0 0.772 6.39 11/10/93 1300 0.53 0.38 11.0 8.86 0 0 535 0.24 6.8 29.9 25 0.152 7.90 29.16 7.00 6.50 5.56 1.86 0 0.015 0 0.041 0 3.11 10.5 28/10/93 1000 0.17 0.05 6.65 5.55 52 0.22 7.3 41.5 18.7 0 5.57 24.81 6.93 9.33 6.70 2.31 0 0.019 0 0.033 0 3.86 12.3 gnuplot-4.6.4/demo/line.fnc0000644000471100001440000000005106515203631012471 0ustar # # a straight line # l(x) = y0 + m*x gnuplot-4.6.4/demo/fillbetween.dem0000644000471100001440000000163510073363642014055 0ustar # # Demonstrate filling the area between two curves # and also the application of fillstyle to filled curves. # Ethan Merritt # June 2004 # set title "Fill area between two curves" set style data lines set xrange [10:*] set yrange [0:175] plot 'silver.dat' u 1:2:3 w filledcu, \ '' u 1:2 lt -1 notitle, '' u 1:3 lt -1 notitle pause -1 "Hit return to continue" set style fill pattern 2 set title "Fill area between two curves (pattern fill)" replot pause -1 "Hit return to continue" set title "Fill area between two curves (above/below)" set style fill solid 1.0 noborder set xrange [250:500] set auto y plot 'silver.dat' u 1:2:($3+$1/50.) w filledcurves above title 'Above', \ '' u 1:2:($3+$1/50.) w filledcurves below title 'Below', \ '' u 1:2 lt -1 lw 2 title 'curve 1', \ '' u 1:($3+$1/50.) lt 3 lw 2 title 'curve 2' pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/blutux.rgb0000644000471100001440000014000010115371145013065 0ustar   444444\\\|||PPP$$$dddllkPPP444PPPDDD,,, $$$ $$$  PPP$$$ 444 \\\|||\\\tttĜ  |||̾ VVTԤPPP444 <<<<<<  ttt$$$tttPPP tttttt DDDllk dddddd~ r |||쬬)~ ћ ׬ jÚ ^J$$$ \ 1 “  \ ћ *,J ڣ l r ~ ϔߥ ,J 1w  y؜ *J  w |[  yϔڣ J jϔڣ ؜\C `>  _Ύ؜ڣ ؜Ύ ddd |[ |[ (( ~b yϔ؜؜ϔ~/,,,\\\ `_fjffx ɎϔΎϔ ||||||JJL<<RZafjfaRtIlE[:\j\j\j\j\j\j\j\k\k\k\k\k\k\k\k\k\k\k\k\k\k\k\kI0tIZmryx yx maS6]k]k]k]k]k]k]k]k]k]k]k]k]k]k]k]k]k]k]k]k]k]k]k]l]l]l]l]l]l]l]l]l]l]l]l]l]l]l]l]lZhZhZhZhZhZhZhZhZhZhZhZhZhZiZiZiZiZiZiZi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644000471100001440000007166011210415641012513 0ustar # # $Id: prob.dem,v 1.10 2009/05/31 05:54:41 sfeam Exp $ # # Demo Statistical Functions version 2.3 # # Copyright (c) 1991, 1992 Jos van der Woude, jvdwoude@hut.nl # History: # -- --- 1992 Jos van der Woude: 1st version # 06 Jun 2006 Dan Sebald: Added some variety and plotting techniques for # better visual effect. More tutorial in nature. print " Statistical Library Demo, version 2.3" print "\n Copyright (c) 1991, 1992, Jos van de Woude, jvdwoude@hut.nl" print "\n\n\n\n\n\n\n" print "NOTE: contains 54 plots and consequently takes a lot of time to run" print " Press Ctrl-C to exit right now" pause -1 " Press Return to start demo ..." load "stat.inc" eps = 1.0e-10 # Supposed to be float resolution (nice if were defined internally) ## Gamma function xmin = -5.5 xmax = 5 ymin = -10 ymax = 10 unset key set xzeroaxis gsampfunc(t,n) = t<0?0.5*1/(-t+1.0)**n:1.0-0.5*1/(t+1.0)**n set parametric set trange [-1:1] set sample 200 set xrange [xmin : xmax] set yrange [ymin : ymax] set xlabel "x" set ylabel "gamma(x)" set arrow 1 from 0,ymin to 0,ymax nohead lt 0 set arrow 2 from -1,ymin to -1,ymax nohead lt 0 set arrow 3 from -2,ymin to -2,ymax nohead lt 0 set arrow 4 from -3,ymin to -3,ymax nohead lt 0 set arrow 5 from -4,ymin to -4,ymax nohead lt 0 set arrow 6 from -5,ymin to -5,ymax nohead lt 0 set title "gamma function, very useful function for probability" plot gsampfunc(5*t,5)-6, gamma(gsampfunc(5*t,5)-6) lt 1, \ gsampfunc(5*t,5)-5, gamma(gsampfunc(5*t,5)-5) lt 1, \ gsampfunc(5*t,4)-4, gamma(gsampfunc(5*t,4)-4) lt 1, \ gsampfunc(5*t,3)-3, gamma(gsampfunc(5*t,3)-3) lt 1, \ gsampfunc(5*t,2)-2, gamma(gsampfunc(5*t,2)-2) lt 1, \ gsampfunc(5*t,1)-1, gamma(gsampfunc(5*t,1)-1) lt 1, \ 5*gsampfunc(5*t,2), gamma(5*gsampfunc(5*t,2)) lt 1 pause -1 "Hit return to continue" ymin = ymin/2 ymax = ymax/2 set yrange [ymin:ymax] set ylabel "lgamma(x)" set arrow 1 from 0,ymin to 0,ymax nohead lt 0 set arrow 2 from -1,ymin to -1,ymax nohead lt 0 set arrow 3 from -2,ymin to -2,ymax nohead lt 0 set arrow 4 from -3,ymin to -3,ymax nohead lt 0 set arrow 5 from -4,ymin to -4,ymax nohead lt 0 set arrow 6 from -5,ymin to -5,ymax nohead lt 0 set title "log gamma function, similarly very useful function" plot gsampfunc(5*t,5)-6, lgamma(gsampfunc(5*t,5)-6) lt 1, \ gsampfunc(5*t,5)-5, lgamma(gsampfunc(5*t,5)-5) lt 1, \ gsampfunc(5*t,4)-4, lgamma(gsampfunc(5*t,4)-4) lt 1, \ gsampfunc(5*t,3)-3, lgamma(gsampfunc(5*t,3)-3) lt 1, \ gsampfunc(5*t,3)-2, lgamma(gsampfunc(5*t,3)-2) lt 1, \ gsampfunc(5*t,3)-1, lgamma(gsampfunc(5*t,3)-1) lt 1, \ 5*gsampfunc(5*t,3), lgamma(5*gsampfunc(5*t,3)) lt 1 pause -1 "Hit return to continue" reset # Arcsinus PDF and CDF r = 2.0 mu = 0.0 sigma = r / sqrt2 xmin = -(r+1) xmax = r+1 unset key set zeroaxis set xrange [xmin : xmax] set yrange [-0.2 : 1.2] set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.1f" set sample 50*xmax+1 set title "arcsin PDF with r = 2.0" plot arcsin(x, r) pause -1 "Hit return to continue" set title "arcsin CDF with r = 2.0" set yrange [-0.2 : 1.2] plot carcsin(x, r) pause -1 "Hit return to continue" # Beta PDF and CDF p = 5.0; q = 3.0 mu = p / (p + q) sigma = sqrt(p**q) / ((p + q ) * sqrt(p + q + 1.0)) xmin = 0.0 xmax = 1.0 #Mode of beta PDF used ymax = (p < 1.0 || q < 1.0) ? 2.0 : 1.4 * beta((p - 1.0)/(p + q - 2.0), p, q) set key right box set zeroaxis set xrange [xmin : xmax] set yrange [0 : ymax] set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.1f" set sample 200 set title "beta PDF" plot beta(x, 0.5, 0.7) title "p = 0.5, q = 0.7", \ beta(x, 5.0, 3.0) title "p = 5.0, q = 3.0", \ beta(x, 0.5, 2.5) title "p = 0.5, q = 2.5" pause -1 "Hit return to continue" set yrange [0:1.1] set title "incomplete beta CDF" set key left box plot cbeta(x, 0.5, 0.7) title "p = 0.5, q = 0.7", \ cbeta(x, 5.0, 3.0) title "p = 5.0, q = 3.0", \ cbeta(x, 0.5, 2.5) title "p = 0.5, q = 2.5" pause -1 "Hit return to continue" # Binomial PDF and CDF n = 25; p = 0.15 mu = n * p sigma = sqrt(n * p * (1.0 - p)) xmin = int(mu - 4.0 * sigma) xmin = xmin < -2 ? -2 : xmin xmax = int(mu + 4.0 * sigma) xmax = xmax < n+2 ? n+2 : xmax ymax = 1.1 * binom(int((n+1)*p), n, p) #Mode of binomial PDF used unset key unset zeroaxis set xrange [xmin : xmax] set yrange [0 : ymax] set xlabel "k ->" set ylabel "probability density ->" set ytics 0, ymax / 10, ymax set format x "%2.0f" set format y "%3.2f" set sample (xmax - xmin) + 1 set title "binomial PDF with n = 25, p = 0.15" plot binom(x, n, p) with impulses pause -1 "Hit return to continue" set ytics autofreq set xzeroaxis set title "binomial CDF with n = 25, p = 0.15" set yrange [-0.1 : 1.1] set ytics 0, 0.1, 1.0 plot cbinom(x, n, p) with steps pause -1 "Hit return to continue" # Cauchy PDF and CDF a = 0.0; b = 2.0 #cauchy PDF has no moments xmin = a - 5.0 * b xmax = a + 5.0 * b ymax = 1.1 * cauchy(a, a, b) #Mode of cauchy PDF used set key left box set zeroaxis set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.2f" set sample 100 set title "cauchy PDF" a=0 b=2 plot [xmin:xmax] [0:ymax] cauchy(x, 0, 2) title "a = 0, b = 2", \ cauchy(x, 0, 4) title "a = 0, b = 4" pause -1 "Hit return to continue" set title "cauchy CDF" plot [xmin:xmax] [0:1.0] ccauchy(x, 0, 2) title "a = 0, b = 2", \ ccauchy(x, 0, 4) title "a = 0, b = 4" pause -1 "Hit return to continue" # Chi-square PDF and CDF k = 4.0 mu = k sigma = sqrt(2.0 * k) xmin = mu - 4.0 * sigma xmin = xmin < 0 ? 0 : xmin xmax = int(mu + 4.0 * sigma) k = 2.0 ymax = (k > 2.0 ? 1.1*chisq(k - 2.0, k) : 0.5) #Mode of chi PDF used set key right box set zeroaxis set xrange [xmin+eps : xmax] #Discontinuity at zero for k < 2 set yrange [0:ymax] set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.2f" set sample 100 set title "chi-square PDF" set key right box set samples 15*20+1 keystr(k) = sprintf("k = %d", k) plot k = 1, x==0?1/0:chisq(x, k) title keystr(k), \ k = 2, x==0?1/0:chisq(x, k) title keystr(k), \ k = 3, chisq(x, k) title keystr(k), \ k = 4, chisq(x, k) title keystr(k), \ k = 5, chisq(x, k) title keystr(k), \ k = 6, chisq(x, k) title keystr(k), \ k = 7, chisq(x, k) title keystr(k), \ k = 8, chisq(x, k) title keystr(k) pause -1 "Hit return to continue" set yrange [0:1.1] set key bottom right box set title "chi-square CDF" plot k = 1, cchisq(x, k) title keystr(k), \ k = 2, cchisq(x, k) title keystr(k), \ k = 3, cchisq(x, k) title keystr(k), \ k = 4, cchisq(x, k) title keystr(k), \ k = 5, cchisq(x, k) title keystr(k), \ k = 6, cchisq(x, k) title keystr(k), \ k = 7, cchisq(x, k) title keystr(k), \ k = 8, cchisq(x, k) title keystr(k) pause -1 "Hit return to continue" # Erlang PDF and CDF lambda = 1.0; n = 2.0 mu = n / lambda sigma = sqrt(n) / lambda xmax = int(mu + 5.0 * sigma) n = 1.0 ymax = n < 2.0 ? 1.0 : 1.1 * erlang((n - 1.0) / lambda, n, lambda) #Mode of erlang PDF used set zeroaxis set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.1f" set sample 100 set title "erlang PDF" set key top right box l1 = 1.0; l2 = 0.5 set arrow 1 from 2,0.8 to 0.33,erlang(0.33,1,l1) set arrow 2 from 2,0.8 to 0.33,erlang(0.33,1,l2) set label 1 "n = 1, exponential r.v." at 2.1,0.8 left keystr(n,lambda) = sprintf("lambda = %0.1f, n = %d", lambda, n) plot [0:xmax] [0:ymax] n = 1, lambda = l1, erlang(x, n, lambda) title keystr(n,lambda), \ n = 1, lambda = l2, erlang(x, n, lambda) title keystr(n,lambda), \ n = 2, lambda = l1, erlang(x, n, lambda) title keystr(n,lambda), \ n = 2, lambda = l2, erlang(x, n, lambda) title keystr(n,lambda) pause -1 "Hit return to continue" unset label 1 unset arrow 1; unset arrow 2 set title "erlang CDF" set key bottom right box plot [0:xmax] [0:1.1] n = 1, lambda = l1, cerlang(x, n, lambda) title keystr(n,lambda), \ n = 1, lambda = l2, cerlang(x, n, lambda) title keystr(n,lambda), \ n = 2, lambda = l1, cerlang(x, n, lambda) title keystr(n,lambda), \ n = 2, lambda = l2, cerlang(x, n, lambda) title keystr(n,lambda) pause -1 "Hit return to continue" # Thanks to mrb2j@kelvin.seas.Virginia.EDU for telling us about this. # Extreme (Gumbel extreme value) PDF and CDF alpha = 1.0; u = 0.0 mu = u + (0.577215665/alpha) # Euler's constant sigma = pi/(sqrt(6.0)*alpha) xmin = mu - 6.0 * sigma xmax = mu + 6.0 * sigma ymax = 1.1 * extreme(u, u, alpha) #Mode of extreme PDF used ymax = int(10*ymax)/10.0 set zeroaxis set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.2f" set sample 100 set title "extreme PDF" set key top left box plot [xmin:xmax] [0:ymax] extreme(x, 1.0, 0.5) title "alpha = 0.5, u = 1.0", \ extreme(x, 0.0, 1.0) title "alpha = 1.0, u = 0.0" pause -1 "Hit return to continue" set title "extreme CDF" plot [xmin:xmax] [0:1.1] cextreme(x, 1.0, 0.5) title "alpha = 0.5, u = 1.0", \ cextreme(x, 0.0, 1.0) title "alpha = 1.0, u = 0.0" pause -1 "Hit return to continue" # F PDF and CDF df1 = 5.0; df2 = 9.0 mu = df2 < 2.0 ? 1.0 : df2 / (df2 - 2.0) sigma = df2 < 4.0 ? 1.0 : mu * sqrt(2.0 * (df1 + df2 - 2.0) / (df1 * (df2 - 4.0))) xmin = mu - 3.0 * sigma xmin = xmin < 0 ? 0 : xmin xmax = int(mu + 3.0 * sigma) #Mode of F PDF used ymax = df1 < 3.0 ? 1.0 : 1.1 * f((df1 / 2.0 - 1.0) / (df1 / 2.0 + df1 / df2), df1, df2) set zeroaxis set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.2f" set sample 100 set title "F PDF" set key right box plot [xmin:xmax] [0:ymax] f(x, 5.0, 9.0) title "df1 = 5, df2 = 9", \ f(x, 7.0, 6.0) title "df1 = 7, df2 = 6" pause -1 "Hit return to continue" set title "F CDF" set key left box plot [xmin:xmax] [0:1.1] cf(x, 5.0, 9.0) title "df1 = 5, df2 = 9", \ cf(x, 7.0, 6.0) title "df1 = 7, df2 = 6" pause -1 "Hit return to continue" # Gamma PDF and incomplete gamma CDF rho = 1.0; lambda = 1.3 mu = rho / lambda sigma = sqrt(rho) / lambda xmin = mu - 4.0 * sigma xmin = xmin < 0 ? 0 : xmin xmax = mu + 4.0 * sigma ymax = rho < 1.0 ? 2.0 : 1.1 * gmm((rho - 1.0) / lambda, rho, lambda) #Mode of gamma pdf used set zeroaxis set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.1f" set sample 100 set title "gamma PDF" set key right r1 = 0.5; r2 = 1.0; r3 = 1.0; r4 = 1.3; r5 = 2.0; r6 = 4.0; r7 = 6.0 l1 = 1.0; l2 = 1.0; l3 = 1.3; l4 = 1.3; l5 = 2.0; l6 = 2.0; l7 = 2.0 set arrow 1 from 1,1.3 to 0.15,gmm(0.15,r1,l1) set label 1 "rho < 1, tends to infinity" at 1.1,1.3 left set arrow 2 from 1.15,1.1 to 0.35,gmm(0.35,r3,l3) set label 2 "rho = 1, finite, nonzero limit" at 1.25,1.1 left set arrow 3 from 1.5,0.9 to 1.0,gmm(1.0,r5,l5) set label 3 "rho > 1, tends to zero" at 1.6,0.9 left keystr(rho,lambda) = sprintf("rho = %0.1f, lambda = %0.1f", rho, lambda) plot [0:5] [0:1.5] rho = r1, lambda = l1, gmm(x, rho, lambda) title keystr(rho,lambda), \ rho = r2, lambda = l2, gmm(x, rho, lambda) title keystr(rho,lambda), \ rho = r3, lambda = l3, gmm(x, rho, lambda) title keystr(rho,lambda), \ rho = r4, lambda = l4, gmm(x, rho, lambda) title keystr(rho,lambda), \ rho = r5, lambda = l5, gmm(x, rho, lambda) title keystr(rho,lambda), \ rho = r6, lambda = l6, gmm(x, rho, lambda) title keystr(rho,lambda), \ rho = r7, lambda = l7, gmm(x, rho, lambda) title keystr(rho,lambda) pause -1 "Hit return to continue" unset label 1; unset label 2; unset label 3 unset arrow 1; unset arrow 2; unset arrow 3 set title "incomplete gamma CDF" set key right bottom plot [0:5] [0:1.1] rho = r1, lambda = l1, cgmm(x, rho, lambda) title keystr(rho,lambda), \ rho = r2, lambda = l2, cgmm(x, rho, lambda) title keystr(rho,lambda), \ rho = r3, lambda = l3, cgmm(x, rho, lambda) title keystr(rho,lambda), \ rho = r4, lambda = l4, cgmm(x, rho, lambda) title keystr(rho,lambda), \ rho = r5, lambda = l5, cgmm(x, rho, lambda) title keystr(rho,lambda), \ rho = r6, lambda = l6, cgmm(x, rho, lambda) title keystr(rho,lambda), \ rho = r7, lambda = l7, cgmm(x, rho, lambda) title keystr(rho,lambda) pause -1 "Hit return to continue" # Geometric PDF and CDF p = 0.4 mu = (1.0 - p) / p sigma = sqrt(mu / p) xmin = int(mu - 4.0 * sigma) xmin = xmin < -1 ? -1 : xmin xmin = -1 xmax = int(mu + 4.0 * sigma) ymax = 1.1 * geometric(0, p) #mode of geometric PDF used unset key unset zeroaxis set xrange [xmin : xmax] set yrange [0 : ymax] set xlabel "k ->" set ylabel "probability density ->" set ytics 0, ymax / 10, ymax set format x "%2.0f" set format y "%3.2f" set sample (xmax - xmin) + 1 set title "geometric PDF with p = 0.4" plot geometric(x, p) with impulses pause -1 "Hit return to continue" set title "geometric CDF with p = 0.4" set yrange [0 : 1.1] set ytics 0, 0.1, 1.0 plot cgeometric(x, p) with steps pause -1 "Hit return to continue" # Half normal PDF and CDF mu = sqrt2invpi sigma = 1.0 s = sigma*sqrt(1.0 - 2.0/pi) xmin = -0.2 xmax = mu + 4.0 * s ymax = 1.1 * halfnormal(0, sigma) #Mode of half normal PDF used unset key set zeroaxis set xrange [xmin: xmax] set yrange [-0.1: ymax] set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.1f" set sample 100 set parametric set trange [xmin:xmax] set title "half normal PDF, sigma = 1.0" set arrow 1 from 0.5,0.13 to 0.0,0.4 set label 1 "Discontinuity achieved by plotting\ntwice with limited parametric ranges" at 0.2,0.1 left plot t<0?t:-eps, halfnormal(t<0?t:-eps, sigma) ls 1, t<0?0.0:t, halfnormal(t<0?0.0:t, sigma) ls 1 pause -1 "Hit return to continue" set title "half normal CDF, sigma = 1.0" set yrange [-0.1:1.1] set arrow 1 from 0.45,0.1 to 0.05,0.01 set label 1 "Cusp achieved by plotting twice\nwith limited parametric ranges" at 0.5,0.1 left plot t<0?t:-eps, chalfnormal(t<0?t:-eps, sigma) ls 1, t<0?0.0:t, chalfnormal(t<0?0.0:t, sigma) ls 1 pause -1 "Hit return to continue" unset label 1 unset arrow 1 unset parametric # Hypergeometric PDF and CPF N = 75; C = 25; d = 10 p = real(C) / N mu = d * p sigma = sqrt(real(N - d) / (N - 1.0) * d * p * (1.0 - p)) xmin = int(mu - 4.0 * sigma) xmin = xmin < -1 ? -1 : xmin xmax = int(mu + 4.0 * sigma) xmax = xmax < d+1 ? d+1 : xmax ymax = 1.1 * hypgeo(int(mu),N,C,d) # approximate mode of hypergeometric PDF used unset key unset zeroaxis set xrange [xmin : xmax] set yrange [0 : ymax] set xlabel "k ->" set ylabel "probability density ->" set ytics 0, ymax / 10, ymax set format x "%2.0f" set format y "%3.2f" set sample (xmax - xmin) + 1 set title "hypergeometric PDF with N = 75, C = 25, d = 10" plot hypgeo(x,N,C,d) with impulses pause -1 "Hit return to continue" set yrange [0 : 1.1] set ytics 0, 1.0 / 10.0, 1.1 set title "hypergeometric CDF with N = 75, C = 25, d = 10" plot chypgeo(x,N,C,d) with steps pause -1 "Hit return to continue" # Laplace PDF mu = 0.0; b = 1.0 sigma = sqrt(2.0) * b xmin = mu - 4.0 * sigma xmax = mu + 4.0 * sigma ymax = 1.1 * laplace(mu, mu, b) #Mode of laplace PDF used unset key set zeroaxis set xrange [xmin: xmax] set yrange [0: ymax] set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.2f" set sample 100+1 set title "laplace (or double exponential) PDF with mu = 0, b = 1" set arrow 1 from -0.95,0.5 to -0.1,0.5 set label 1 "Cusp achieved by selecting point\nas part of function samples" at -1.0,0.5 right plot laplace(x, mu, b) pause -1 "Hit return to continue" unset label 1 unset arrow 1 set title "laplace (or double exponential) CDF with mu = 0, b = 1" set yrange [0: 1.1] plot claplace(x, mu, b) pause -1 "Hit return to continue" # Logistic PDF and CDF a = 0.0; lambda = 2.0 mu = a sigma = pi / (sqrt(3.0) * lambda) xmin = mu - 4.0 * sigma xmax = mu + 4.0 * sigma ymax = 1.1 * logistic(mu, a, lambda) #Mode of logistic PDF used unset key set zeroaxis set xrange [xmin: xmax] set yrange [0: ymax] unset key set zeroaxis set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.1f" set sample 100 set title "logistic PDF with a = 0, lambda = 2" plot logistic(x, a, lambda) pause -1 "Hit return to continue" set title "logistic CDF with a = 0, lambda = 2" set yrange [0: 1.1] plot clogistic(x, a, lambda) pause -1 "Hit return to continue" # Lognormal PDF and CDF mu = 1.0; sigma = 0.5 m = exp(mu + 0.5 * sigma**2) s = sqrt(exp(2.0 * mu + sigma**2) * (2.0 * exp(sigma) - 1.0)) xmin = m - 4.0 * s xmin = xmin < 0 ? 0 : xmin xmax = m + 4.0 * s ymax = 1.1 * lognormal(exp(mu - sigma**2), mu, sigma) #Mode of lognormal PDF used unset key set zeroaxis set xrange [xmin: xmax] set yrange [0: ymax] set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.2f" set format y "%.2f" set sample 100 set title "lognormal PDF with mu = 1.0, sigma = 0.5" plot lognormal(x, mu, sigma) pause -1 "Hit return to continue" set title "lognormal CDF with mu = 1.0, sigma = 0.5" set yrange [0: 1.1] plot clognormal(x, mu, sigma) pause -1 "Hit return to continue" # Maxwell PDF a = 0.5 mu = 2.0 / sqrt(pi) / a sigma = sqrt(3.0 - 8.0/pi) / a xmin = int(mu - 3.0 * sigma) xmin = xmin < 0 ? 0 : xmin xmax = int(mu + 3.0 * sigma) a = 1.5 ymax = 1.1 * maxwell(1.0 / a, a) + 0.5 #Mode of maxwell PDF used ymax = int(ymax + 0.5) set zeroaxis set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.1f" set sample 100 set title "maxwell PDF" set key right top box plot [xmin:xmax] [0:ymax] maxwell(x, 1.5) title "a = 1.5", \ maxwell(x, 1.0) title "a = 1.0", \ maxwell(x, 0.5) title "a = 0.5" pause -1 "Hit return to continue" set title "maxwell CDF" set key right bottom box plot [xmin:xmax] [0:1.1] cmaxwell(x, 1.5) title "a = 1.5", \ cmaxwell(x, 1.0) title "a = 1.0", \ cmaxwell(x, 0.5) title "a = 0.5" pause -1 "Hit return to continue" # Negative binomial PDF and CDF r = 8; p = 0.4 mu = r * (1.0 - p) / p sigma = sqrt(mu / p) xmin = int(mu - 4.0 * sigma) xmin = xmin < 0 ? 0 : xmin xmax = int(mu + 4.0 * sigma) ymax = 1.1 * negbin(int(mu - (1.0-p)/p), r, p) #mode of gamma PDF used unset key unset zeroaxis set xrange [xmin-1 : xmax] set yrange [0 : ymax] set xlabel "k ->" set ylabel "probability density ->" set ytics 0, ymax / 10, ymax set format x "%2.0f" set format y "%3.2f" set sample (xmax - xmin+1) + 1 set title "negative binomial (or pascal or polya) PDF with r = 8, p = 0.4" plot negbin(x, r, p) with impulses pause -1 "Hit return to continue" set yrange [0 : 1.1] set ytics 0, 0.1, 1.0 set title "negative binomial (or pascal or polya) CDF with r = 8, p = 0.4" plot cnegbin(x, r, p) with steps pause -1 "Hit return to continue" # Negative exponential PDF and CDF lambda = 2.0 mu = 1.0 / lambda sigma = 1.0 / lambda xmax = mu + 4.0 * sigma ymax = lambda #No mode unset key set zeroaxis set xrange [0: xmax] set yrange [0: ymax] set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.2f" set format y "%.1f" set sample 100 set title "negative exponential (or exponential) PDF with lambda = 2.0" plot nexp(x, lambda) pause -1 "Hit return to continue" set title "negative exponential (or exponential) CDF with lambda = 2.0" set yrange [0: 1.1] plot cnexp(x, lambda) pause -1 "Hit return to continue" # Normal PDF and CDF mu = 0.0; sigma = 1.0 xmin = mu - 4.0 * sigma xmax = mu + 4.0 * sigma mu = 2.0; sigma = 0.5 ymax = 1.1 * normal(mu, mu, sigma) #Mode of normal PDF used set zeroaxis set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.1f" set sample 100 set title "normal (also called gauss or bell-curved) PDF" set key left top box plot [xmin:xmax] [0:ymax] normal(x, 0, 1.0) title "mu = 0, sigma = 1.0", \ normal(x, 2, 0.5) title "mu = 2, sigma = 0.5", \ normal(x, 1, 2.0) title "mu = 1, sigma = 2.0" pause -1 "Hit return to continue" set title "normal (also called gauss or bell-curved) CDF" set key left top box plot [xmin:xmax] [0:1.1] mu = 0, sigma = 1.0, cnormal(x, mu, sigma) title "mu = 0, sigma = 1.0", \ mu = 2, sigma = 0.5, cnormal(x, mu, sigma) title "mu = 2, sigma = 0.5", \ mu = 1, sigma = 2.0, cnormal(x, mu, sigma) title "mu = 1, sigma = 2.0" pause -1 "Hit return to continue" # Pareto PDF and CDF a = 1.0; b = 3.0 mu = a * b / (b - 1.0) sigma = a * sqrt(b) / (sqrt(b - 2.0) * (b - 1.0)) xmin = mu - 4.0 * sigma xmin = xmin < 0 ? 0 : xmin xmax = int(mu + 4.0 * sigma) ymax = 1.1 * pareto(a, a, b) #mode of pareto PDF used ymin = -0.1 * pareto(a, a, b) unset key set zeroaxis set xrange [xmin: xmax] set yrange [ymin: ymax] set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.1f" set sample 200+1 set title "pareto PDF with a = 1, b = 3" # Discontinuity at a set parametric set trange [0:1-eps] x1(t) = -1 + 2*t x2(t) = 1 + 3*t set arrow 1 from 1.75,0.8 to 1.0,0.8 set arrow 2 from 1.0,0.0 to 1.0,3.0 nohead lt 0 set label 1 "Discontinuity achieved by plotting twice\nwith affine mapped parametric ranges" at 1.8,0.8 left plot x1(t), pareto(x1(t), a, b) ls 1, x2(t), pareto(x2(t), a, b) ls 1 pause -1 "Hit return to continue" unset arrow 2 set title "pareto CDF with a = 1, b = 3" unset parametric set yrange [-0.1: 1.1] set arrow 1 from 1.45,0.1 to 1.05,0.01 set label 1 "Cusp achieved by selecting point\nas part of function samples" at 1.5,0.1 left plot cpareto(x, a, b) pause -1 "Hit return to continue" unset label 1 unset arrow 1 # Poisson PDF and CDF mu = 4.0 sigma = sqrt(mu) xmin = int(mu - 4.0 * sigma) xmin = xmin < -1 ? -1 : xmin xmax = int(mu + 4.0 * sigma) ymax = 1.1 * poisson(mu, mu) #mode of poisson PDF used unset key set zeroaxis set xrange [xmin : xmax] set yrange [0 : ymax] set xlabel "k ->" set ylabel "probability density ->" set ytics 0, ymax / 10, ymax set format x "%2.0f" set format y "%3.2f" set sample (xmax - xmin) + 1 set title "poisson PDF with mu = 4.0" plot poisson(x, mu) with impulses pause -1 "Hit return to continue" set yrange [-0.1 : 1.1] set ytics -0.1, 0.1, 1.1 set title "poisson CDF with mu = 4.0" plot cpoisson(x, mu) with steps pause -1 "Hit return to continue" # Rayleigh PDF and CDF lambda = 2.0 mu = 0.5 * sqrt(pi / lambda) sigma = sqrt((1.0 - pi / 4.0) / lambda) xmax = mu + 4.0 * sigma ymax = 1.1 * rayleigh(1.0 / sqrt(2.0 * lambda), lambda) #Mode of rayleigh PDF used unset key set zeroaxis set xrange [0: xmax] set yrange [0: ymax] set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.2f" set format y "%.1f" set sample 100 set title "rayleigh PDF with lambda = 2.0" plot rayleigh(x, lambda) pause -1 "Hit return to continue" set title "rayleigh CDF with lambda = 2.0" set yrange [0: 1.1] plot crayleigh(x, lambda) pause -1 "Hit return to continue" # Sine PDF and CDF a = 3.2; f = 2.6 mu = a / 2.0 sigma = sqrt(a * a / 3.0 * (1.0 - 3.0 / (2.0 * n * n * pi * pi)) - mu * mu) xmin = 0.0 xmax = a - eps a = 2; f = 1.0 ymax = 1.1 * 2.0 / a #Mode of sine PDF used set zeroaxis set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.2f" set format y "%.1f" set sample 250 set title "sine PDF" set key bottom outside keystr(a, f) = sprintf("a = %0.1f, f = %0.1f", a, f) a1 = 2.0; a2 = 3.25; a3 = 2.75 f1 = 1.0; f2 = 3.0; f3 = 2.6; f4 = 0.0 plot [xmin:xmax] [0:ymax] a = a1, f = f1, sine(x, f, a) title keystr(a, f), \ a = a1, f = f2, sine(x, f, a) title keystr(a, f), \ a = a2, f = f3, sine(x, f, a) title keystr(a, f), \ a = a3, f = f4, sine(x, f, a) title keystr(a, f) with steps pause -1 "Hit return to continue" set title "sine CDF" set key top left plot [xmin:xmax] [0:1.1] a = a1, f = f1, csine(x, f, a) title keystr(a, f), \ a = a1, f = f2, csine(x, f, a) title keystr(a, f), \ a = a2, f = f3, csine(x, f, a) title keystr(a, f), \ a = a3, f = f4, csine(x, f, a) title keystr(a, f) with steps pause -1 "Hit return to continue" # t PDF and CDF nu = 20 mu = 0 sigma = nu > 2 ? sqrt(nu / (nu - 2.0)) : 1.0 xmin = mu - 4.0 * sigma xmax = mu + 4.0 * sigma ymax = 1.1 * t(mu, nu) #Mode of t PDF used set key inside center left title "degrees of freedom" set zeroaxis set xrange [xmin: xmax] set yrange [0: ymax] set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.2f" set sample 100 set title "t PDF (and Gaussian limit)" ks(nu) = sprintf("nu = %d", nu) plot t(x, 1) ti ks(1), t(x, 2) ti ks(2), t(x, 4) ti ks(4), t(x, 10) ti ks(10), \ t(x, 20) ti ks(20), normal(x, 0, 1) ti "normal" pause -1 "Hit return to continue" set title "t CDF (and Gaussian limit)" set yrange [0: 1.1] plot ct(x, 1) ti ks(1), ct(x, 2) ti ks(2), ct(x, 4) ti ks(4), ct(x, 10) ti ks(10), \ ct(x, 20) ti ks(20), cnormal(x, 0, 1) ti "normal" pause -1 "Hit return to continue" # Thanks to efrank@upenn5.hep.upenn.edu for telling us about this # triangular PDF and CDF m = 3.0 g = 2.0 mu = m sigma = g/sqrt(6.0) xmin = m - 1.1*g xmax = m + 1.1*g ymax = 1.1 * triangular(m, m, g) #Mode of triangular PDF used ymin = -ymax/11.0; unset key set zeroaxis set xrange [xmin: xmax] set yrange [ymin: ymax] set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.1f" set format y "%.2f" set sample 50*1.1*g+1 set title "triangular PDF with m = 3.0, g = 2.0" plot triangular(x, m, g) pause -1 "Hit return to continue" set title "triangular CDF with m = 3.0, g = 2.0" set yrange [-0.1: 1.1] plot ctriangular(x, m, g) pause -1 "Hit return to continue" # Uniform PDF and CDF a = -2.0; b= 2.0 mu = (a + b) / 2.0 sigma = (b - a) / sqrt(12.0) xmin = a - 0.1*(b - a) xmax = b + 0.1*(b - a) ymax = 1.1 * uniform(mu, a, b) #No mode ymin = -0.1 * uniform(mu, a, b) unset key set zeroaxis set xrange [xmin: xmax] set yrange [ymin: ymax] set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%.2f" set format y "%.2f" set sample 120+1 set title "uniform PDF with a = -2.0, b = 2.0" plot uniform(x, a, b) with steps pause -1 "Hit return to continue" set title "uniform CDF with a = -2.0, b = 2.0" set yrange [-0.1 : 1.1] plot cuniform(x, a, b) pause -1 "Hit return to continue" # Weibull PDF and CDF lambda = 1.0/5; a = 1.0 mu = 1.0 / lambda * gamma(1.0 / a) / a sigma = sqrt(lambda**(-2.0) * (2.0 * gamma(2.0 / a) / a - (gamma(1.0 / a) / a)**2)) xmin = mu - 4.0 * sigma xmin = xmin < 0 ? 0 : xmin #Mode of weibull PDF used ymax = 1.8 * (a >= 1.0 ? weibull(((a - 1.0) / a)**(1.0 / a) / lambda, a, lambda) : 2.0) lambda = 1.0/15; a = 10.0 mu = 1.0 / lambda * gamma(1.0 / a) / a sigma = sqrt(lambda**(-2.0) * (2.0 * gamma(2.0 / a) / a - (gamma(1.0 / a) / a)**2)) xmax = int(mu + 4.0 * sigma) set key on title "" inside top right set zeroaxis set grid set xrange [xmin : xmax] set xlabel "x ->" set ylabel "probability density ->" set xtics autofreq set ytics autofreq set format x "%g" set format y "%g" set sample 100 set title "weibull PDF" ks(a,lambda) = sprintf("lambda = 1/%g, a = %0.1f", 1.0/lambda, a) a1 = 0.5; a2 = 1.0; a3 = 2.0; a4 = 10.0 lambda1 = 1.0/5; lambda2 = 1.0/15 set arrow 1 from 3.8,0.27 to 0.5,weibull(0.5,a1,lambda1) set label 1 "a < 1, rate descreasing over time" at 4,0.27 left set arrow 2 from 8,0.19 to 6.4,weibull(6.4,a3,lambda1) set arrow 3 from 10.5,0.19 to 13,weibull(13,a4,lambda2) set label 2 "a > 1, rate increasing over time" at 9,0.2 center plot [] [0:ymax] lambda = lambda1, a = a1, weibull(x, a, lambda) ti ks(a, lambda), \ lambda = lambda1, a = a2, weibull(x, a, lambda) ti ks(a, lambda), \ lambda = lambda1, a = a3, weibull(x, a, lambda) ti ks(a, lambda), \ lambda = lambda2, a = a4, weibull(x, a, lambda) ti ks(a, lambda) pause -1 "Hit return to continue" unset label 1; unset label 2 unset arrow 1; unset arrow 2; unset arrow 3 set key at 9,0.4 center set title "weibull CDF" plot [] [0:1.1] lambda = lambda1, a = a1, cweibull(x, a, lambda) ti ks(a, lambda), \ lambda = lambda1, a = a2, cweibull(x, a, lambda) ti ks(a, lambda), \ lambda = lambda1, a = a3, cweibull(x, a, lambda) ti ks(a, lambda), \ lambda = lambda2, a = a4, cweibull(x, a, lambda) ti ks(a, lambda) pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/cities.dem0000644000471100001440000000112411210271436013017 0ustar # # Demonstrates how to derive variable font size from a data file column. # # If you are viewing this via the HTML canvas terminal, be sure to toggle # the font scaling icon so that the fonts change size as you zoom in. # Scale(size) = 0.25*sqrt(sqrt(column(size))) CityName(String,Size) = sprintf("{/=%d %s}", Scale(Size), stringcolumn(String)) set termoption enhanced set encoding utf8 unset xtics unset ytics unset key set border 0 set size square set datafile separator "\t" plot 'cities.dat' using 5:4:($3 < 5000 ? "-" : CityName(1,3)) with labels pause -1 "hit return to continue" reset gnuplot-4.6.4/demo/klein.dat0000644000471100001440000004722506515203631012664 0ustar 1 0 0 0.924 -0.383 0 0.707 -0.707 0 0.383 -0.924 0 0 -1 0 -0.383 -0.924 0 -0.707 -0.707 0 -0.924 -0.383 0 -1 0 0 -0.924 0.383 0 -0.707 0.707 0 -0.383 0.924 0 0 1 0 0.383 0.924 0 0.707 0.707 0 0.924 0.383 0 1 0 0 1.076 0 0.673 0.994 -0.412 0.673 0.761 -0.761 0.673 0.412 -0.994 0.673 0 -1.076 0.673 -0.412 -0.994 0.673 -0.761 -0.761 0.673 -0.994 -0.412 0.673 -1.076 0 0.673 -0.994 0.412 0.673 -0.761 0.761 0.673 -0.412 0.994 0.673 0 1.076 0.673 0.412 0.994 0.673 0.761 0.761 0.673 0.994 0.412 0.673 1.076 0 0.673 1.304 0 1.315 1.205 -0.499 1.315 0.922 -0.922 1.315 0.499 -1.205 1.315 0 -1.304 1.315 -0.499 -1.205 1.315 -0.922 -0.922 1.315 -1.205 -0.499 1.315 -1.304 0 1.315 -1.205 0.499 1.315 -0.922 0.922 1.315 -0.499 1.205 1.315 0 1.304 1.315 0.499 1.205 1.315 0.922 0.922 1.315 1.205 0.499 1.315 1.304 0 1.315 1.757 0 2.206 1.623 -0.672 2.206 1.242 -1.242 2.206 0.672 -1.623 2.206 0 -1.757 2.206 -0.672 -1.623 2.206 -1.242 -1.242 2.206 -1.623 -0.672 2.206 -1.757 0 2.206 -1.623 0.672 2.206 -1.242 1.242 2.206 -0.672 1.623 2.206 0 1.757 2.206 0.672 1.623 2.206 1.242 1.242 2.206 1.623 0.672 2.206 1.757 0 2.206 2.21 0 3.097 2.042 -0.846 3.097 1.563 -1.563 3.097 0.846 -2.042 3.097 0 -2.21 3.097 -0.846 -2.042 3.097 -1.563 -1.563 3.097 -2.042 -0.846 3.097 -2.21 0 3.097 -2.042 0.846 3.097 -1.563 1.563 3.097 -0.846 2.042 3.097 0 2.21 3.097 0.846 2.042 3.097 1.563 1.563 3.097 2.042 0.846 3.097 2.21 0 3.097 2.663 0 3.988 2.46 -1.019 3.988 1.883 -1.883 3.988 1.019 -2.46 3.988 0 -2.663 3.988 -1.019 -2.46 3.988 -1.883 -1.883 3.988 -2.46 -1.019 3.988 -2.663 0 3.988 -2.46 1.019 3.988 -1.883 1.883 3.988 -1.019 2.46 3.988 0 2.663 3.988 1.019 2.46 3.988 1.883 1.883 3.988 2.46 1.019 3.988 2.663 0 3.988 3.116 0 4.879 2.879 -1.192 4.879 2.203 -2.203 4.879 1.192 -2.879 4.879 0 -3.116 4.879 -1.192 -2.879 4.879 -2.203 -2.203 4.879 -2.879 -1.192 4.879 -3.116 0 4.879 -2.879 1.192 4.879 -2.203 2.203 4.879 -1.192 2.879 4.879 0 3.116 4.879 1.192 2.879 4.879 2.203 2.203 4.879 2.879 1.192 4.879 3.116 0 4.879 3.569 0 5.77 3.297 -1.366 5.77 2.524 -2.524 5.77 1.366 -3.297 5.77 0 -3.569 5.77 -1.366 -3.297 5.77 -2.524 -2.524 5.77 -3.297 -1.366 5.77 -3.569 0 5.77 -3.297 1.366 5.77 -2.524 2.524 5.77 -1.366 3.297 5.77 0 3.569 5.77 1.366 3.297 5.77 2.524 2.524 5.77 3.297 1.366 5.77 3.569 0 5.77 4.022 0 6.661 3.716 -1.539 6.661 2.844 -2.844 6.661 1.539 -3.716 6.661 0 -4.022 6.661 -1.539 -3.716 6.661 -2.844 -2.844 6.661 -3.716 -1.539 6.661 -4.022 0 6.661 -3.716 1.539 6.661 -2.844 2.844 6.661 -1.539 3.716 6.661 0 4.022 6.661 1.539 3.716 6.661 2.844 2.844 6.661 3.716 1.539 6.661 4.022 0 6.661 4.475 0 7.552 4.134 -1.713 7.552 3.164 -3.164 7.552 1.713 -4.134 7.552 0 -4.475 7.552 -1.713 -4.134 7.552 -3.164 -3.164 7.552 -4.134 -1.713 7.552 -4.475 0 7.552 -4.134 1.713 7.552 -3.164 3.164 7.552 -1.713 4.134 7.552 0 4.475 7.552 1.713 4.134 7.552 3.164 3.164 7.552 4.134 1.713 7.552 4.475 0 7.552 4.928 0 8.443 4.553 -1.886 8.443 3.485 -3.485 8.443 1.886 -4.553 8.443 0 -4.928 8.443 -1.886 -4.553 8.443 -3.485 -3.485 8.443 -4.553 -1.886 8.443 -4.928 0 8.443 -4.553 1.886 8.443 -3.485 3.485 8.443 -1.886 4.553 8.443 0 4.928 8.443 1.886 4.553 8.443 3.485 3.485 8.443 4.553 1.886 8.443 4.928 0 8.443 5.381 0 9.334 4.971 -2.059 9.334 3.805 -3.805 9.334 2.059 -4.971 9.334 0 -5.381 9.334 -2.059 -4.971 9.334 -3.805 -3.805 9.334 -4.971 -2.059 9.334 -5.381 0 9.334 -4.971 2.059 9.334 -3.805 3.805 9.334 -2.059 4.971 9.334 0 5.381 9.334 2.059 4.971 9.334 3.805 3.805 9.334 4.971 2.059 9.334 5.381 0 9.334 5.834 0 10.225 5.39 -2.233 10.225 4.125 -4.125 10.225 2.233 -5.39 10.225 0 -5.834 10.225 -2.233 -5.39 10.225 -4.125 -4.125 10.225 -5.39 -2.233 10.225 -5.834 0 10.225 -5.39 2.233 10.225 -4.125 4.125 10.225 -2.233 5.39 10.225 0 5.834 10.225 2.233 5.39 10.225 4.125 4.125 10.225 5.39 2.233 10.225 5.834 0 10.225 6.287 0 11.116 5.808 -2.406 11.116 4.446 -4.446 11.116 2.406 -5.808 11.116 0 -6.287 11.116 -2.406 -5.808 11.116 -4.446 -4.446 11.116 -5.808 -2.406 11.116 -6.287 0 11.116 -5.808 2.406 11.116 -4.446 4.446 11.116 -2.406 5.808 11.116 0 6.287 11.116 2.406 5.808 11.116 4.446 4.446 11.116 5.808 2.406 11.116 6.287 0 11.116 6.74 0 12.007 6.227 -2.579 12.007 4.766 -4.766 12.007 2.579 -6.227 12.007 0 -6.74 12.007 -2.579 -6.227 12.007 -4.766 -4.766 12.007 -6.227 -2.579 12.007 -6.74 0 12.007 -6.227 2.579 12.007 -4.766 4.766 12.007 -2.579 6.227 12.007 0 6.74 12.007 2.579 6.227 12.007 4.766 4.766 12.007 6.227 2.579 12.007 6.74 0 12.007 7.193 0 12.898 6.645 -2.753 12.898 5.086 -5.086 12.898 2.753 -6.645 12.898 0 -7.193 12.898 -2.753 -6.645 12.898 -5.086 -5.086 12.898 -6.645 -2.753 12.898 -7.193 0 12.898 -6.645 2.753 12.898 -5.086 5.086 12.898 -2.753 6.645 12.898 0 7.193 12.898 2.753 6.645 12.898 5.086 5.086 12.898 6.645 2.753 12.898 7.193 0 12.898 7.648 0 13.97 7.066 -2.927 13.97 5.408 -5.408 13.97 2.927 -7.066 13.97 0 -7.648 13.97 -2.927 -7.066 13.97 -5.408 -5.408 13.97 -7.066 -2.927 13.97 -7.648 0 13.97 -7.066 2.927 13.97 -5.408 5.408 13.97 -2.927 7.066 13.97 0 7.648 13.97 2.927 7.066 13.97 5.408 5.408 13.97 7.066 2.927 13.97 7.648 0 13.97 7.946 0 14.887 7.341 -3.041 14.887 5.619 -5.619 14.887 3.041 -7.341 14.887 0 -7.946 14.887 -3.041 -7.341 14.887 -5.619 -5.619 14.887 -7.341 -3.041 14.887 -7.946 0 14.887 -7.341 3.041 14.887 -5.619 5.619 14.887 -3.041 7.341 14.887 0 7.946 14.887 3.041 7.341 14.887 5.619 5.619 14.887 7.341 3.041 14.887 7.946 0 14.887 7.982 0 15.851 7.375 -3.055 15.851 5.644 -5.644 15.851 3.055 -7.375 15.851 0 -7.982 15.851 -3.055 -7.375 15.851 -5.644 -5.644 15.851 -7.375 -3.055 15.851 -7.982 0 15.851 -7.375 3.055 15.851 -5.644 5.644 15.851 -3.055 7.375 15.851 0 7.982 15.851 3.055 7.375 15.851 5.644 5.644 15.851 7.375 3.055 15.851 7.982 0 15.851 7.754 0 16.788 7.164 -2.967 16.788 5.483 -5.483 16.788 2.967 -7.164 16.788 0 -7.754 16.788 -2.967 -7.164 16.788 -5.483 -5.483 16.788 -7.164 -2.967 16.788 -7.754 0 16.788 -7.164 2.967 16.788 -5.483 5.483 16.788 -2.967 7.164 16.788 0 7.754 16.788 2.967 7.164 16.788 5.483 5.483 16.788 7.164 2.967 16.788 7.754 0 16.788 7.279 0 17.628 6.725 -2.786 17.628 5.147 -5.147 17.628 2.786 -6.725 17.628 0 -7.279 17.628 -2.786 -6.725 17.628 -5.147 -5.147 17.628 -6.725 -2.786 17.628 -7.279 0 17.628 -6.725 2.786 17.628 -5.147 5.147 17.628 -2.786 6.725 17.628 0 7.279 17.628 2.786 6.725 17.628 5.147 5.147 17.628 6.725 2.786 17.628 7.279 0 17.628 6.593 0 18.305 6.091 -2.523 18.305 4.662 -4.662 18.305 2.523 -6.091 18.305 0 -6.593 18.305 -2.523 -6.091 18.305 -4.662 -4.662 18.305 -6.091 -2.523 18.305 -6.593 0 18.305 -6.091 2.523 18.305 -4.662 4.662 18.305 -2.523 6.091 18.305 0 6.593 18.305 2.523 6.091 18.305 4.662 4.662 18.305 6.091 2.523 18.305 6.593 0 18.305 5.747 0 18.77 5.31 -2.199 18.77 4.064 -4.064 18.77 2.199 -5.31 18.77 0 -5.747 18.77 -2.199 -5.31 18.77 -4.064 -4.064 18.77 -5.31 -2.199 18.77 -5.747 0 18.77 -5.31 2.199 18.77 -4.064 4.064 18.77 -2.199 5.31 18.77 0 5.747 18.77 2.199 5.31 18.77 4.064 4.064 18.77 5.31 2.199 18.77 5.747 0 18.77 4.807 0 18.986 4.442 -1.84 18.986 3.399 -3.399 18.986 1.84 -4.442 18.986 0 -4.807 18.986 -1.84 -4.442 18.986 -3.399 -3.399 18.986 -4.442 -1.84 18.986 -4.807 0 18.986 -4.442 1.84 18.986 -3.399 3.399 18.986 -1.84 4.442 18.986 0 4.807 18.986 1.84 4.442 18.986 3.399 3.399 18.986 4.442 1.84 18.986 4.807 0 18.986 3.844 0 18.938 3.552 -1.471 18.938 2.718 -2.718 18.938 1.471 -3.552 18.938 0 -3.844 18.938 -1.471 -3.552 18.938 -2.718 -2.718 18.938 -3.552 -1.471 18.938 -3.844 0 18.938 -3.552 1.471 18.938 -2.718 2.718 18.938 -1.471 3.552 18.938 0 3.844 18.938 1.471 3.552 18.938 2.718 2.718 18.938 3.552 1.471 18.938 3.844 0 18.938 2.931 0 18.628 2.708 -1.122 18.628 2.072 -2.072 18.628 1.122 -2.708 18.628 0 -2.931 18.628 -1.122 -2.708 18.628 -2.072 -2.072 18.628 -2.708 -1.122 18.628 -2.931 0 18.628 -2.708 1.122 18.628 -2.072 2.072 18.628 -1.122 2.708 18.628 0 2.931 18.628 1.122 2.708 18.628 2.072 2.072 18.628 2.708 1.122 18.628 2.931 0 18.628 2.136 0 18.081 1.974 -0.818 18.081 1.511 -1.511 18.081 0.818 -1.974 18.081 0 -2.136 18.081 -0.818 -1.974 18.081 -1.511 -1.511 18.081 -1.974 -0.818 18.081 -2.136 0 18.081 -1.974 0.818 18.081 -1.511 1.511 18.081 -0.818 1.974 18.081 0 2.136 18.081 0.818 1.974 18.081 1.511 1.511 18.081 1.974 0.818 18.081 2.136 0 18.081 1.522 0 17.338 1.406 -0.582 17.338 1.076 -1.076 17.338 0.582 -1.406 17.338 0 -1.522 17.338 -0.582 -1.406 17.338 -1.076 -1.076 17.338 -1.406 -0.582 17.338 -1.522 0 17.338 -1.406 0.582 17.338 -1.076 1.076 17.338 -0.582 1.406 17.338 0 1.522 17.338 0.582 1.406 17.338 1.076 1.076 17.338 1.406 0.582 17.338 1.522 0 17.338 1.133 0 16.455 1.047 -0.434 16.455 0.801 -0.801 16.455 0.434 -1.047 16.455 0 -1.133 16.455 -0.434 -1.047 16.455 -0.801 -0.801 16.455 -1.047 -0.434 16.455 -1.133 0 16.455 -1.047 0.434 16.455 -0.801 0.801 16.455 -0.434 1.047 16.455 0 1.133 16.455 0.434 1.047 16.455 0.801 0.801 16.455 1.047 0.434 16.455 1.133 0 16.455 1 0 15.5 0.924 -0.383 15.5 0.707 -0.707 15.5 0.383 -0.924 15.5 0 -1 15.5 -0.383 -0.924 15.5 -0.707 -0.707 15.5 -0.924 -0.383 15.5 -1 0 15.5 -0.924 0.383 15.5 -0.707 0.707 15.5 -0.383 0.924 15.5 0 1 15.5 0.383 0.924 15.5 0.707 0.707 15.5 0.924 0.383 15.5 1 0 15.5 0.911 0 14.515 0.836 -0.383 14.528 0.623 -0.707 14.567 0.304 -0.924 14.625 -0.073 -1 14.694 -0.449 -0.924 14.762 -0.768 -0.707 14.821 -0.982 -0.383 14.859 -1.057 0 14.873 -0.982 0.383 14.859 -0.768 0.707 14.821 -0.449 0.924 14.762 -0.073 1 14.694 0.304 0.924 14.625 0.623 0.707 14.567 0.836 0.383 14.528 0.911 0 14.515 0.647 0 13.561 0.576 -0.383 13.588 0.373 -0.707 13.665 0.069 -0.924 13.779 -0.289 -1 13.914 -0.647 -0.924 14.049 -0.951 -0.707 14.163 -1.153 -0.383 14.239 -1.225 0 14.266 -1.153 0.383 14.239 -0.951 0.707 14.163 -0.647 0.924 14.049 -0.289 1 13.914 0.069 0.924 13.779 0.373 0.707 13.665 0.576 0.383 13.588 0.647 0 13.561 0.205 0 12.653 0.14 -0.383 12.693 -0.043 -0.707 12.808 -0.318 -0.924 12.98 -0.643 -1 13.182 -0.968 -0.924 13.384 -1.243 -0.707 13.556 -1.426 -0.383 13.671 -1.491 0 13.711 -1.426 0.383 13.671 -1.243 0.707 13.556 -0.968 0.924 13.384 -0.643 1 13.182 -0.318 0.924 12.98 -0.043 0.707 12.808 0.14 0.383 12.693 0.205 0 12.653 -0.324 0 11.805 -0.389 -0.383 11.845 -0.572 -0.707 11.96 -0.847 -0.924 12.132 -1.172 -1 12.334 -1.497 -0.924 12.536 -1.772 -0.707 12.708 -1.955 -0.383 12.823 -2.02 0 12.863 -1.955 0.383 12.823 -1.772 0.707 12.708 -1.497 0.924 12.536 -1.172 1 12.334 -0.847 0.924 12.132 -0.572 0.707 11.96 -0.389 0.383 11.845 -0.324 0 11.805 -0.853 0 10.957 -0.918 -0.383 10.997 -1.101 -0.707 11.112 -1.376 -0.924 11.284 -1.701 -1 11.486 -2.026 -0.924 11.688 -2.301 -0.707 11.86 -2.484 -0.383 11.975 -2.549 0 12.015 -2.484 0.383 11.975 -2.301 0.707 11.86 -2.026 0.924 11.688 -1.701 1 11.486 -1.376 0.924 11.284 -1.101 0.707 11.112 -0.918 0.383 10.997 -0.853 0 10.957 -1.382 0 10.109 -1.447 -0.383 10.149 -1.63 -0.707 10.264 -1.905 -0.924 10.436 -2.23 -1 10.638 -2.555 -0.924 10.84 -2.83 -0.707 11.012 -3.013 -0.383 11.127 -3.078 0 11.167 -3.013 0.383 11.127 -2.83 0.707 11.012 -2.555 0.924 10.84 -2.23 1 10.638 -1.905 0.924 10.436 -1.63 0.707 10.264 -1.447 0.383 10.149 -1.382 0 10.109 -1.911 0 9.261 -1.976 -0.383 9.301 -2.159 -0.707 9.416 -2.434 -0.924 9.588 -2.759 -1 9.79 -3.084 -0.924 9.992 -3.359 -0.707 10.164 -3.542 -0.383 10.279 -3.607 0 10.319 -3.542 0.383 10.279 -3.359 0.707 10.164 -3.084 0.924 9.992 -2.759 1 9.79 -2.434 0.924 9.588 -2.159 0.707 9.416 -1.976 0.383 9.301 -1.911 0 9.261 -2.44 0 8.413 -2.505 -0.383 8.453 -2.688 -0.707 8.568 -2.963 -0.924 8.74 -3.288 -1 8.942 -3.613 -0.924 9.144 -3.888 -0.707 9.316 -4.071 -0.383 9.431 -4.136 0 9.471 -4.071 0.383 9.431 -3.888 0.707 9.316 -3.613 0.924 9.144 -3.288 1 8.942 -2.963 0.924 8.74 -2.688 0.707 8.568 -2.505 0.383 8.453 -2.44 0 8.413 -2.969 0 7.565 -3.034 -0.383 7.605 -3.217 -0.707 7.72 -3.492 -0.924 7.892 -3.817 -1 8.094 -4.142 -0.924 8.296 -4.417 -0.707 8.468 -4.6 -0.383 8.583 -4.665 0 8.623 -4.6 0.383 8.583 -4.417 0.707 8.468 -4.142 0.924 8.296 -3.817 1 8.094 -3.492 0.924 7.892 -3.217 0.707 7.72 -3.034 0.383 7.605 -2.969 0 7.565 -3.498 0 6.717 -3.563 -0.383 6.757 -3.746 -0.707 6.872 -4.021 -0.924 7.044 -4.346 -1 7.246 -4.671 -0.924 7.448 -4.946 -0.707 7.62 -5.129 -0.383 7.735 -5.194 0 7.775 -5.129 0.383 7.735 -4.946 0.707 7.62 -4.671 0.924 7.448 -4.346 1 7.246 -4.021 0.924 7.044 -3.746 0.707 6.872 -3.563 0.383 6.757 -3.498 0 6.717 -4.027 0 5.869 -4.092 -0.383 5.909 -4.275 -0.707 6.024 -4.55 -0.924 6.196 -4.875 -1 6.398 -5.2 -0.924 6.6 -5.475 -0.707 6.772 -5.658 -0.383 6.887 -5.723 0 6.927 -5.658 0.383 6.887 -5.475 0.707 6.772 -5.2 0.924 6.6 -4.875 1 6.398 -4.55 0.924 6.196 -4.275 0.707 6.024 -4.092 0.383 5.909 -4.027 0 5.869 -4.556 0 5.021 -4.621 -0.383 5.061 -4.804 -0.707 5.176 -5.079 -0.924 5.348 -5.404 -1 5.55 -5.729 -0.924 5.752 -6.004 -0.707 5.924 -6.187 -0.383 6.039 -6.252 0 6.079 -6.187 0.383 6.039 -6.004 0.707 5.924 -5.729 0.924 5.752 -5.404 1 5.55 -5.079 0.924 5.348 -4.804 0.707 5.176 -4.621 0.383 5.061 -4.556 0 5.021 -5.085 0 4.173 -5.15 -0.383 4.213 -5.333 -0.707 4.328 -5.608 -0.924 4.5 -5.933 -1 4.702 -6.258 -0.924 4.904 -6.533 -0.707 5.076 -6.716 -0.383 5.191 -6.781 0 5.231 -6.716 0.383 5.191 -6.533 0.707 5.076 -6.258 0.924 4.904 -5.933 1 4.702 -5.608 0.924 4.5 -5.333 0.707 4.328 -5.15 0.383 4.213 -5.085 0 4.173 -5.614 0 3.325 -5.679 -0.383 3.365 -5.862 -0.707 3.48 -6.137 -0.924 3.652 -6.462 -1 3.854 -6.787 -0.924 4.056 -7.062 -0.707 4.228 -7.245 -0.383 4.343 -7.31 0 4.383 -7.245 0.383 4.343 -7.062 0.707 4.228 -6.787 0.924 4.056 -6.462 1 3.854 -6.137 0.924 3.652 -5.862 0.707 3.48 -5.679 0.383 3.365 -5.614 0 3.325 -6.143 0 2.477 -6.208 -0.383 2.517 -6.391 -0.707 2.632 -6.666 -0.924 2.804 -6.991 -1 3.006 -7.316 -0.924 3.208 -7.591 -0.707 3.38 -7.774 -0.383 3.495 -7.839 0 3.535 -7.774 0.383 3.495 -7.591 0.707 3.38 -7.316 0.924 3.208 -6.991 1 3.006 -6.666 0.924 2.804 -6.391 0.707 2.632 -6.208 0.383 2.517 -6.143 0 2.477 -6.573 0 1.543 -6.638 -0.383 1.582 -6.824 -0.707 1.694 -7.102 -0.924 1.861 -7.43 -1 2.058 -7.758 -0.924 2.255 -8.036 -0.707 2.422 -8.222 -0.383 2.533 -8.288 0 2.572 -8.222 0.383 2.533 -8.036 0.707 2.422 -7.758 0.924 2.255 -7.43 1 2.058 -7.102 0.924 1.861 -6.824 0.707 1.694 -6.638 0.383 1.582 -6.573 0 1.543 -6.822 0 1.019 -6.893 -0.383 1.045 -7.097 -0.707 1.119 -7.402 -0.924 1.229 -7.762 -1 1.359 -8.122 -0.924 1.489 -8.427 -0.707 1.599 -8.631 -0.383 1.672 -8.703 0 1.698 -8.631 0.383 1.672 -8.427 0.707 1.599 -8.122 0.924 1.489 -7.762 1 1.359 -7.402 0.924 1.229 -7.097 0.707 1.119 -6.893 0.383 1.045 -6.822 0 1.019 -6.965 0 0.457 -7.04 -0.383 0.468 -7.255 -0.707 0.501 -7.575 -0.924 0.551 -7.953 -1 0.609 -8.332 -0.924 0.667 -8.652 -0.707 0.716 -8.867 -0.383 0.749 -8.942 0 0.761 -8.867 0.383 0.749 -8.652 0.707 0.716 -8.332 0.924 0.667 -7.953 1 0.609 -7.575 0.924 0.551 -7.255 0.707 0.501 -7.04 0.383 0.468 -6.965 0 0.457 -6.997 0 -0.123 -7.074 -0.383 -0.126 -7.29 -0.707 -0.135 -7.614 -0.924 -0.148 -7.997 -1 -0.164 -8.379 -0.924 -0.18 -8.703 -0.707 -0.193 -8.92 -0.383 -0.202 -8.996 0 -0.205 -8.92 0.383 -0.202 -8.703 0.707 -0.193 -8.379 0.924 -0.18 -7.997 1 -0.164 -7.614 0.924 -0.148 -7.29 0.707 -0.135 -7.074 0.383 -0.126 -6.997 0 -0.123 -6.918 0 -0.698 -6.992 -0.383 -0.716 -7.203 -0.707 -0.766 -7.518 -0.924 -0.842 -7.89 -1 -0.931 -8.262 -0.924 -1.02 -8.578 -0.707 -1.095 -8.789 -0.383 -1.145 -8.863 0 -1.163 -8.789 0.383 -1.145 -8.578 0.707 -1.095 -8.262 0.924 -1.02 -7.89 1 -0.931 -7.518 0.924 -0.842 -7.203 0.707 -0.766 -6.992 0.383 -0.716 -6.918 0 -0.698 -6.729 0 -1.247 -6.798 -0.383 -1.278 -6.995 -0.707 -1.368 -7.29 -0.924 -1.503 -7.638 -1 -1.662 -7.986 -0.924 -1.821 -8.281 -0.707 -1.956 -8.479 -0.383 -2.046 -8.548 0 -2.078 -8.479 0.383 -2.046 -8.281 0.707 -1.956 -7.986 0.924 -1.821 -7.638 1 -1.662 -7.29 0.924 -1.503 -6.995 0.707 -1.368 -6.798 0.383 -1.278 -6.729 0 -1.247 -6.438 0 -1.749 -6.499 -0.383 -1.793 -6.675 -0.707 -1.92 -6.939 -0.924 -2.109 -7.25 -1 -2.332 -7.561 -0.924 -2.555 -7.825 -0.707 -2.744 -8.001 -0.383 -2.87 -8.063 0 -2.915 -8.001 0.383 -2.87 -7.825 0.707 -2.744 -7.561 0.924 -2.555 -7.25 1 -2.332 -6.939 0.924 -2.109 -6.675 0.707 -1.92 -6.499 0.383 -1.793 -6.438 0 -1.749 -6.055 0 -2.186 -6.107 -0.383 -2.241 -6.256 -0.707 -2.399 -6.478 -0.924 -2.635 -6.74 -1 -2.914 -7.002 -0.924 -3.193 -7.225 -0.707 -3.429 -7.373 -0.383 -3.587 -7.425 0 -3.643 -7.373 0.383 -3.587 -7.225 0.707 -3.429 -7.002 0.924 -3.193 -6.74 1 -2.914 -6.478 0.924 -2.635 -6.256 0.707 -2.399 -6.107 0.383 -2.241 -6.055 0 -2.186 -5.596 0 -2.54 -5.636 -0.383 -2.605 -5.752 -0.707 -2.788 -5.924 -0.924 -3.063 -6.128 -1 -3.387 -6.331 -0.924 -3.711 -6.504 -0.707 -3.986 -6.619 -0.383 -4.17 -6.66 0 -4.234 -6.619 0.383 -4.17 -6.504 0.707 -3.986 -6.331 0.924 -3.711 -6.128 1 -3.387 -5.924 0.924 -3.063 -5.752 0.707 -2.788 -5.636 0.383 -2.605 -5.596 0 -2.54 -5.077 0 -2.8 -5.104 -0.383 -2.871 -5.182 -0.707 -3.074 -5.298 -0.924 -3.376 -5.436 -1 -3.734 -5.573 -0.924 -4.091 -5.689 -0.707 -4.394 -5.767 -0.383 -4.596 -5.794 0 -4.667 -5.767 0.383 -4.596 -5.689 0.707 -4.394 -5.573 0.924 -4.091 -5.436 1 -3.734 -5.298 0.924 -3.376 -5.182 0.707 -3.074 -5.104 0.383 -2.871 -5.077 0 -2.8 -4.517 0 -2.955 -4.53 -0.383 -3.03 -4.568 -0.707 -3.244 -4.624 -0.924 -3.563 -4.69 -1 -3.94 -4.756 -0.924 -4.317 -4.812 -0.707 -4.637 -4.849 -0.383 -4.85 -4.862 0 -4.925 -4.849 0.383 -4.85 -4.812 0.707 -4.637 -4.756 0.924 -4.317 -4.69 1 -3.94 -4.624 0.924 -3.563 -4.568 0.707 -3.244 -4.53 0.383 -3.03 -4.517 0 -2.955 -3.938 0 -2.999 -3.937 -0.383 -3.075 -3.932 -0.707 -3.292 -3.926 -0.924 -3.617 -3.918 -1 -3.999 -3.91 -0.924 -4.382 -3.903 -0.707 -4.706 -3.899 -0.383 -4.923 -3.897 0 -4.999 -3.899 0.383 -4.923 -3.903 0.707 -4.706 -3.91 0.924 -4.382 -3.918 1 -3.999 -3.926 0.924 -3.617 -3.932 0.707 -3.292 -3.937 0.383 -3.075 -3.938 0 -2.999 -3.362 0 -2.931 -3.346 -0.383 -3.006 -3.3 -0.707 -3.218 -3.231 -0.924 -3.535 -3.149 -1 -3.909 -3.068 -0.924 -4.282 -2.999 -0.707 -4.599 -2.953 -0.383 -4.811 -2.937 0 -4.886 -2.953 0.383 -4.811 -2.999 0.707 -4.599 -3.068 0.924 -4.282 -3.149 1 -3.909 -3.231 0.924 -3.535 -3.3 0.707 -3.218 -3.346 0.383 -3.006 -3.362 0 -2.931 -2.809 0 -2.754 -2.779 -0.383 -2.824 -2.693 -0.707 -3.023 -2.564 -0.924 -3.32 -2.413 -1 -3.672 -2.261 -0.924 -4.023 -2.132 -0.707 -4.321 -2.046 -0.383 -4.52 -2.016 0 -4.589 -2.046 0.383 -4.52 -2.132 0.707 -4.321 -2.261 0.924 -4.023 -2.413 1 -3.672 -2.564 0.924 -3.32 -2.693 0.707 -3.023 -2.779 0.383 -2.824 -2.809 0 -2.754 -2.301 0 -2.473 -2.258 -0.383 -2.536 -2.136 -0.707 -2.714 -1.952 -0.924 -2.982 -1.735 -1 -3.297 -1.519 -0.924 -3.613 -1.335 -0.707 -3.88 -1.212 -0.383 -4.059 -1.169 0 -4.121 -1.212 0.383 -4.059 -1.335 0.707 -3.88 -1.519 0.924 -3.613 -1.735 1 -3.297 -1.952 0.924 -2.982 -2.136 0.707 -2.714 -2.258 0.383 -2.536 -2.301 0 -2.473 -1.857 0 -2.099 -1.803 -0.383 -2.153 -1.648 -0.707 -2.304 -1.416 -0.924 -2.531 -1.143 -1 -2.799 -0.869 -0.924 -3.067 -0.638 -0.707 -3.294 -0.483 -0.383 -3.446 -0.428 0 -3.499 -0.483 0.383 -3.446 -0.638 0.707 -3.294 -0.869 0.924 -3.067 -1.143 1 -2.799 -1.416 0.924 -2.531 -1.648 0.707 -2.304 -1.803 0.383 -2.153 -1.857 0 -2.099 -1.493 0 -1.647 -1.429 -0.383 -1.689 -1.248 -0.707 -1.808 -0.977 -0.924 -1.986 -0.657 -1 -2.197 -0.337 -0.924 -2.407 -0.066 -0.707 -2.585 0.115 -0.383 -2.704 0.179 0 -2.746 0.115 0.383 -2.704 -0.066 0.707 -2.585 -0.337 0.924 -2.407 -0.657 1 -2.197 -0.977 0.924 -1.986 -1.248 0.707 -1.808 -1.429 0.383 -1.689 -1.493 0 -1.647 -1.223 0 -1.134 -1.152 -0.383 -1.163 -0.951 -0.707 -1.245 -0.651 -0.924 -1.367 -0.297 -1 -1.512 0.058 -0.924 -1.656 0.358 -0.707 -1.779 0.559 -0.383 -1.861 0.629 0 -1.89 0.559 0.383 -1.861 0.358 0.707 -1.779 0.058 0.924 -1.656 -0.297 1 -1.512 -0.651 0.924 -1.367 -0.951 0.707 -1.245 -1.152 0.383 -1.163 -1.223 0 -1.134 -1.056 0 -0.578 -0.981 -0.383 -0.592 -0.769 -0.707 -0.634 -0.45 -0.924 -0.697 -0.075 -1 -0.77 0.301 -0.924 -0.844 0.619 -0.707 -0.906 0.832 -0.383 -0.948 0.906 0 -0.963 0.832 0.383 -0.948 0.619 0.707 -0.906 0.301 0.924 -0.844 -0.075 1 -0.77 -0.45 0.924 -0.697 -0.769 0.707 -0.634 -0.981 0.383 -0.592 -1.056 0 -0.578 -1 0 0 -0.924 -0.383 0 -0.707 -0.707 0 -0.383 -0.924 0 0 -1 0 0.383 -0.924 0 0.707 -0.707 0 0.924 -0.383 0 1 0 0 0.924 0.383 0 0.707 0.707 0 0.383 0.924 0 0 1 0 -0.383 0.924 0 -0.707 0.707 0 -0.924 0.383 0 -1 0 0 gnuplot-4.6.4/demo/timedat.dem0000644000471100001440000000107011626227452013200 0ustar # # $Id: timedat.dem,v 1.9 2011/08/27 17:53:46 juhaszp Exp $ # set title "Fsteps plot\nwith date and time as x-values" set style data fsteps set xlabel "Date\nTime" set timefmt "%d/%m/%y\t%H%M" set yrange [ 0 : ] set xdata time set xrange [ "1/6/93":"1/11/93" ] set ylabel "Concentration\nmg/l" set format x "%d/%m\n%H:%M" set grid set key left plot 'timedat.dat' using 1:3 t '', \ 'timedat.dat' using 1:3 t 'Total P' with points, \ 'timedat.dat' using 1:4 t '', \ 'timedat.dat' using 1:4 t 'PO4' with points pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/param.dem0000644000471100001440000000164607744002175012661 0ustar # # $Id: param.dem,v 1.5 2003/10/17 15:02:21 mikulik Exp $ # # Show some of the new parametric capabilities. # set parametric set dummy t set autoscale set samples 160 set title "" set key box set key below plot t,sin(t)/t title "t,sin(t)/t or sin(x)/x" pause -1 "Hit return to continue" plot sin(t)/t,t pause -1 "Hit return to continue" plot sin(t),cos(t) pause -1 "Hit return to continue" set xrange [-3:3] set yrange [-3:3] set title "Parametric Conic Sections" plot -t,t,cos(t),cos(2*t),2*cos(t),sin(t),-cosh(t),sinh(t) set title "" pause -1 "Hit return to continue" set xrange [-5:5] set yrange [-5:5] plot tan(t),t,t,tan(t) pause -1 "Hit return to continue" set trange [0.00001:3] plot t,log(t),-t,log(t),sin(t),t**2,-sin(t),t**2 pause -1 "Hit return to continue" set autoscale x set yrange [-1.5:1.5] set trange [0.0001:10*pi] plot sin(t)/t,cos(t)/t pause -1 "Hit return to continue" # undo what we've done above reset gnuplot-4.6.4/demo/steps.dat0000644000471100001440000000006306515203633012707 0ustar 1 2 3 5 5 6.1 6.5 7.4 10.0 11.0 gnuplot-4.6.4/demo/enhanced_utf8.dem0000644000471100001440000000314111150360723014254 0ustar # # Test page for enhanced text mode in UTF-8 encoding # E A Merritt - November 2007 # # Suggested PostScript font test # set term post color fontfile /usr/local/fonts/'l_10646.ttf' font "LucidaSansUnicode,12" # set output 'enhanced_utf8.ps' # set termoption enhanced set encoding utf8 # set title "Demo of enhanced text mode using a single UTF-8 encoded font\nThere is another demo that shows how to use a separate Symbol font" set xrange [-1:1] set yrange [-0.5:1.1] set format xy "%.1f" set arrow from 0.5, -0.5 to 0.5, 0.0 nohead # set label 1 at -0.65, 0.95 set label 1 "Superscripts and subscripts:" tc lt 3 set label 3 at -0.55, 0.85 set label 3 'A_{j,k} 10^{-2} x@^2_k x@_0^{-3/2}y' set label 5 at -0.55, 0.7 set label 5 "Space-holders:" tc lt 3 set label 6 at -0.45, 0.6 set label 6 "<&{{/=20 B}ig}> <&{x@_0^{-3/2}y}> holds space for" set label 7 at -0.45, 0.5 set label 7 "<{{/=20 B}ig}> <{x@_0^{-3/2}y}>" set label 8 at -0.9, -0.2 set label 8 "Overprint\n(v should be centred over d)" tc lt 3 set label 9 at -0.85, -0.4 set label 9 " ~{abcdefg}{0.8v}" set label 10 at -.40, 0.35 set label 10 "UTF-8 encoding does not require Symbol font:" tc lt 3 set label 11 at -.30, 0.2 set label 11 "{/*1.5 ∫@_{/=9.6 0}^{/=12 ∞}} {e^{-{μ}^2/2} d}{μ=(π/2)^{1/2}}" set label 21 at 0.5, -.1 set label 21 "Left ^{centered} ƒ(αβγδεζ)" left set label 22 at 0.5, -.2 set label 22 "Right ^{centered} ƒ(αβγδεζ)" right set label 23 at 0.5, -.3 set label 23 "Center^{centered} ƒ(αβγδεζ)" center # set key title " " plot sin(x)**2 lt 2 lw 2 title "sin^2(x)" # pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/delaunay-edges.dat0000644000471100001440000010172210757671767014470 0ustar 67.6558 73.6342 38.2874 89.2396 66.3301 72.8159 68.5076 72.3350 76.9607 63.3896 67.6558 73.6342 67.6558 73.6342 68.5076 72.3350 67.6558 73.6342 65.9021 74.2999 66.3301 72.8159 67.6558 73.6342 65.9021 74.2999 66.3301 72.8159 66.3301 72.8159 58.8167 70.8096 68.1090 69.5442 66.3301 72.8159 70.8415 59.7082 68.1090 69.5442 68.5076 72.3350 68.1090 69.5442 76.9607 63.3896 68.5076 72.3350 68.1090 69.5442 76.9607 63.3896 62.1210 61.5790 60.6825 62.9365 61.2938 56.4586 62.1210 61.5790 68.1090 69.5442 62.1210 61.5790 66.6548 60.1906 68.1090 69.5442 62.1210 61.5790 66.6548 60.1906 58.8167 70.8096 65.9021 74.2999 38.2874 89.2396 57.3002 72.7986 65.9021 74.2999 38.2874 89.2396 57.3002 72.7986 65.9021 74.2999 58.8167 70.8096 57.3002 72.7986 54.2856 71.3704 55.3844 71.1779 55.3844 71.1779 57.3002 72.7986 48.6897 71.9655 50.1835 61.2707 57.3002 72.7986 48.6897 71.9655 54.2856 71.3704 57.3002 72.7986 48.6897 71.9655 54.2856 71.3704 58.8167 70.8096 55.3844 71.1779 55.3844 71.1779 57.9425 68.5534 58.8167 70.8096 57.9425 68.5534 68.1090 69.5442 58.8167 70.8096 60.6825 62.9365 68.1090 69.5442 68.1090 69.5442 57.9425 68.5534 60.6825 62.9365 57.9425 68.5534 50.1835 61.2707 60.6825 62.9365 57.9425 68.5534 54.2856 71.3704 50.1835 61.2707 57.9425 68.5534 54.2856 71.3704 50.1835 61.2707 70.8415 59.7082 66.6548 60.1906 96.4888 24.6811 76.9607 63.3896 61.2938 56.4586 60.6825 62.9365 60.6825 62.9365 54.0892 54.2901 68.6633 57.8928 73.0240 56.7015 70.8415 59.7082 68.6633 57.8928 73.0240 56.7015 76.9607 63.3896 70.8415 59.7082 73.0240 56.7015 76.9607 63.3896 70.8415 59.7082 65.8314 49.6308 68.6633 57.8928 68.6633 57.8928 66.6548 60.1906 61.2938 56.4586 68.6633 57.8928 66.6548 60.1906 61.2938 56.4586 96.4888 24.6811 73.0240 56.7015 73.7523 30.0789 96.4888 24.6811 73.6650 2.0192 73.7523 30.0789 59.2487 22.4923 73.7523 30.0789 73.7523 30.0789 60.3351 24.7584 73.0240 56.7015 65.8314 49.6308 73.7523 30.0789 73.0240 56.7015 73.7523 30.0789 65.8314 49.6308 59.3555 42.1221 73.7523 30.0789 65.8314 49.6308 61.2938 56.4586 59.2487 22.4923 60.3351 24.7584 65.8314 49.6308 58.6683 46.4120 59.3555 42.1221 65.8314 49.6308 54.0892 54.2901 50.1835 61.2707 50.1835 61.2707 45.1841 58.4772 58.5611 46.3666 54.0892 54.2901 61.2938 56.4586 54.0892 54.2901 58.6683 46.4120 61.2938 56.4586 54.0892 54.2901 58.6683 46.4120 54.0892 54.2901 45.1841 58.4772 47.8855 49.3185 54.0892 54.2901 45.1841 58.4772 47.8855 49.3185 58.6683 46.4120 58.5611 46.3666 59.3555 42.1221 58.6683 46.4120 47.8855 49.3185 39.9696 46.6770 31.4462 32.0252 60.3351 24.7584 60.3351 24.7584 59.3555 42.1221 55.2130 42.7566 60.3351 24.7584 59.3555 42.1221 58.5611 46.3666 55.2130 42.7566 59.3555 42.1221 47.8855 49.3185 55.2130 42.7566 58.5611 46.3666 47.8855 49.3185 55.2130 42.7566 58.5611 46.3666 38.8299 15.8032 59.2487 22.4923 59.2487 22.4923 31.4462 32.0252 48.6897 71.9655 38.2874 89.2396 43.8727 69.8150 48.6897 71.9655 38.2874 89.2396 21.4063 95.3829 30.6393 87.4114 32.9262 74.5222 32.9262 74.5222 38.2874 89.2396 26.1925 84.7441 30.6393 87.4114 38.2874 89.2396 28.5538 89.3811 30.6393 87.4114 38.2874 89.2396 28.5538 89.3811 30.6393 87.4114 38.2874 89.2396 35.6317 71.7007 43.8727 69.8150 38.2874 89.2396 29.4122 67.0369 27.9697 69.3758 41.1266 67.2267 50.1835 61.2707 50.1835 61.2707 43.8727 69.8150 35.6317 71.7007 41.1266 67.2267 43.8727 69.8150 35.6317 71.7007 41.1266 67.2267 43.8727 69.8150 35.6317 71.7007 29.4122 67.0369 35.5187 62.5974 35.6317 71.7007 27.9697 69.3758 35.6317 71.7007 35.6317 71.7007 32.9262 74.5222 26.1925 84.7441 28.5538 89.3811 16.0743 90.5419 24.1305 87.3806 24.1305 87.3806 28.5538 89.3811 21.4063 95.3829 24.1305 87.3806 28.5538 89.3811 21.4063 95.3829 14.1310 77.6791 16.0743 90.5419 21.4063 95.3829 12.6868 93.8774 16.0743 90.5419 21.4063 95.3829 12.6868 93.8774 16.0743 90.5419 24.1305 87.3806 14.1310 77.6791 26.1925 84.7441 24.1305 87.3806 23.8979 64.7361 27.9697 69.3758 14.1310 77.6791 27.9697 69.3758 26.1925 84.7441 14.1310 77.6791 32.9262 74.5222 26.1925 84.7441 27.9697 69.3758 32.9262 74.5222 26.1925 84.7441 27.9697 69.3758 14.1310 77.6791 -1.8365 65.6245 23.8979 64.7361 14.1310 77.6791 14.1310 77.6791 12.6868 93.8774 23.8979 64.7361 -1.8365 65.6245 41.1266 67.2267 35.5187 62.5974 45.1841 58.4772 41.1266 67.2267 35.5187 62.5974 29.4122 67.0369 35.5187 62.5974 30.5420 59.4325 39.9696 46.6770 30.5420 59.4325 29.4122 67.0369 23.8979 64.7361 30.5420 59.4325 29.4122 67.0369 24.0731 52.2574 30.5420 59.4325 23.8979 64.7361 21.6045 57.5576 30.5420 59.4325 23.8979 64.7361 39.9696 46.6770 24.0731 52.2574 35.5187 62.5974 39.9696 46.6770 45.1841 58.4772 35.5187 62.5974 39.9696 46.6770 45.1841 58.4772 39.9696 46.6770 31.4462 32.0252 55.2130 42.7566 39.9696 46.6770 31.4462 32.0252 55.2130 42.7566 38.8299 15.8032 31.4462 32.0252 26.1892 21.1723 38.8299 15.8032 31.4462 32.0252 26.1892 21.1723 31.4462 32.0252 24.0731 52.2574 10.7372 15.5924 26.1892 21.1723 26.1892 21.1723 3.2428 27.1616 21.6045 57.5576 -1.8365 65.6245 -1.8365 65.6245 -4.7170 57.8270 24.0731 52.2574 22.6818 55.2577 20.6564 49.7907 24.0731 52.2574 20.6564 49.7907 22.6818 55.2577 30.5420 59.4325 21.6045 57.5576 22.6818 55.2577 30.5420 59.4325 21.6045 57.5576 22.6818 55.2577 21.6045 57.5576 -4.7170 57.8270 20.6564 49.7907 21.6045 57.5576 -4.7170 57.8270 20.6564 49.7907 20.6564 49.7907 -10.5718 48.9948 31.4462 32.0252 20.6564 49.7907 3.2428 27.1616 31.4462 32.0252 20.6564 49.7907 3.2428 27.1616 3.2428 27.1616 -4.6413 21.2599 10.7372 15.5924 3.2428 27.1616 -4.6413 21.2599 10.7372 15.5924 59.2487 22.4923 68.2514 -9.0759 73.6650 2.0192 59.2487 22.4923 96.4888 24.6811 73.6650 2.0192 63.2050 -34.0980 81.0010 -38.6643 96.4888 24.6811 85.1855 -7.8785 96.4970 -22.9158 96.4888 24.6811 96.4970 -22.9158 85.1855 -7.8785 87.9867 -15.3159 96.4970 -22.9158 87.9867 -15.3159 85.1855 -7.8785 83.2393 -8.0222 87.9867 -15.3159 85.1855 -7.8785 73.6650 2.0192 83.2393 -8.0222 85.1855 -7.8785 91.2208 -30.2322 87.9867 -15.3159 82.6057 -35.6650 94.0858 -32.4848 91.2208 -30.2322 82.6057 -35.6650 96.4970 -22.9158 91.2208 -30.2322 94.0858 -32.4848 96.4970 -22.9158 91.2208 -30.2322 94.0858 -32.4848 82.6057 -35.6650 81.0010 -38.6643 86.9944 -44.0150 82.6057 -35.6650 82.6057 -35.6650 87.9867 -15.3159 82.6057 -35.6650 64.1845 -23.2436 63.2050 -34.0980 82.6057 -35.6650 38.8299 15.8032 32.8900 3.5730 68.2514 -9.0759 38.8299 15.8032 68.6614 -8.9142 79.4300 -9.1894 83.2393 -8.0222 73.6650 2.0192 79.4300 -9.1894 83.2393 -8.0222 73.6650 2.0192 79.4300 -9.1894 64.1845 -23.2436 68.6614 -8.9142 73.6650 2.0192 68.2514 -9.0759 68.6614 -8.9142 73.6650 2.0192 68.2514 -9.0759 68.6614 -8.9142 64.1845 -23.2436 68.2514 -9.0759 69.6711 -47.1073 63.2050 -34.0980 87.9867 -15.3159 79.4300 -9.1894 64.1845 -23.2436 87.9867 -15.3159 79.4300 -9.1894 64.1845 -23.2436 63.2050 -34.0980 64.1845 -23.2436 49.7595 -35.3890 63.2050 -34.0980 51.7803 -37.2629 49.7595 -35.3890 63.2050 -34.0980 51.7803 -37.2629 51.9810 -39.6648 63.2050 -34.0980 51.7803 -37.2629 51.9810 -39.6648 69.6711 -47.1073 51.9810 -39.6648 51.4538 -81.7664 66.4685 -74.1902 94.0858 -32.4848 86.9944 -44.0150 73.0081 -67.7485 94.0858 -32.4848 86.9944 -44.0150 81.0010 -38.6643 73.0081 -67.7485 86.9944 -44.0150 86.9944 -44.0150 80.9815 -40.3364 84.6712 -47.4373 86.9944 -44.0150 84.6712 -47.4373 80.9815 -40.3364 69.6711 -47.1073 84.6712 -47.4373 81.0010 -38.6643 69.6711 -47.1073 80.9815 -40.3364 81.0010 -38.6643 69.6711 -47.1073 80.9815 -40.3364 68.7151 -63.6061 69.6711 -47.1073 64.3521 -71.0952 73.0081 -67.7485 84.6712 -47.4373 68.7151 -63.6061 73.0081 -67.7485 84.6712 -47.4373 68.7151 -63.6061 73.0081 -67.7485 63.0038 -75.7773 66.4685 -74.1902 73.0081 -67.7485 65.8176 -72.6097 66.4685 -74.1902 73.0081 -67.7485 65.8176 -72.6097 66.4685 -74.1902 65.8176 -72.6097 64.3521 -71.0952 63.0038 -75.7773 65.8176 -72.6097 60.1183 -58.6111 69.6711 -47.1073 51.7661 -65.1774 64.3521 -71.0952 52.9336 -62.1840 64.3521 -71.0952 68.7151 -63.6061 60.1183 -58.6111 64.3521 -71.0952 68.7151 -63.6061 60.1183 -58.6111 64.3521 -71.0952 60.1183 -58.6111 59.3833 -58.3880 52.9336 -62.1840 60.1183 -58.6111 59.3833 -58.3880 52.9336 -62.1840 51.1738 -53.4049 59.3833 -58.3880 69.6711 -47.1073 51.1738 -53.4049 59.3833 -58.3880 69.6711 -47.1073 64.3521 -71.0952 53.7112 -74.9640 63.0038 -75.7773 64.3521 -71.0952 51.4538 -81.7664 63.0038 -75.7773 51.4538 -81.7664 54.2618 -77.8095 63.0038 -75.7773 53.7112 -74.9640 54.2618 -77.8095 63.0038 -75.7773 53.7112 -74.9640 54.2618 -77.8095 8.2968 8.8643 -4.6413 21.2599 51.4538 -81.7664 53.7112 -74.9640 49.7595 -35.3890 64.1845 -23.2436 64.1845 -23.2436 41.1338 -21.5215 51.7661 -65.1774 52.9336 -62.1840 68.2514 -9.0759 32.8900 3.5730 41.1338 -21.5215 68.2514 -9.0759 51.9810 -39.6648 49.7595 -35.3890 45.5903 -59.4463 49.7595 -35.3890 41.5254 -28.2774 45.5903 -59.4463 51.1738 -53.4049 51.9810 -39.6648 51.9810 -39.6648 45.5903 -59.4463 49.7595 -35.3890 41.1338 -21.5215 41.5254 -28.2774 49.7595 -35.3890 41.1338 -21.5215 41.5254 -28.2774 52.9336 -62.1840 51.1738 -53.4049 47.1778 -60.8160 52.9336 -62.1840 39.9406 -76.6162 47.1778 -60.8160 53.7112 -74.9640 51.7661 -65.1774 47.1778 -60.8160 50.2269 -67.2584 51.7661 -65.1774 47.1778 -60.8160 50.2269 -67.2584 51.7661 -65.1774 39.9406 -76.6162 45.5903 -59.4463 51.1738 -53.4049 45.5903 -59.4463 47.1778 -60.8160 51.1738 -53.4049 45.5903 -59.4463 47.1778 -60.8160 45.5903 -59.4463 22.7478 -64.1231 30.2450 -70.1212 45.5903 -59.4463 10.7372 15.5924 8.2968 8.8643 17.2975 14.1665 10.7372 15.5924 41.1338 -21.5215 32.8900 3.5730 -9.7612 -19.2980 41.1338 -21.5215 17.2975 14.1665 8.2968 8.8643 32.8900 3.5730 26.1892 21.1723 17.2975 14.1665 32.8900 3.5730 26.1892 21.1723 17.2975 14.1665 32.8900 3.5730 8.2968 8.8643 -9.7612 -19.2980 32.8900 3.5730 41.5254 -28.2774 -9.7612 -19.2980 22.7478 -64.1231 41.5254 -28.2774 41.5254 -28.2774 0.7187 -59.7134 30.2450 -70.1212 22.7478 -64.1231 23.1465 -73.7745 30.2450 -70.1212 23.1465 -73.7745 22.7478 -64.1231 15.5904 -68.1863 23.1465 -73.7745 0.7187 -59.7134 15.5904 -68.1863 22.7478 -64.1231 0.7187 -59.7134 15.5904 -68.1863 22.7478 -64.1231 23.1465 -73.7745 20.6515 -79.1156 23.7904 -75.5351 23.1465 -73.7745 23.7904 -75.5351 20.6515 -79.1156 20.0343 -96.8269 51.4538 -81.7664 39.9406 -76.6162 30.2450 -70.1212 27.2020 -87.1201 51.4538 -81.7664 34.2285 -79.1855 51.4538 -81.7664 39.9406 -76.6162 34.2285 -79.1855 51.4538 -81.7664 39.9406 -76.6162 53.7112 -74.9640 50.2269 -67.2584 39.9406 -76.6162 53.7112 -74.9640 50.2269 -67.2584 39.9406 -76.6162 34.2285 -79.1855 30.2450 -70.1212 23.7904 -75.5351 34.2285 -79.1855 30.2450 -70.1212 23.7904 -75.5351 23.7904 -75.5351 23.7607 -84.6347 27.3514 -84.8211 23.7904 -75.5351 20.0343 -96.8269 27.2020 -87.1201 34.2285 -79.1855 27.3514 -84.8211 27.2020 -87.1201 34.2285 -79.1855 25.3152 -87.5528 27.2020 -87.1201 27.2020 -87.1201 27.3514 -84.8211 27.3514 -84.8211 23.7607 -84.6347 25.3152 -87.5528 27.3514 -84.8211 23.7607 -84.6347 25.3152 -87.5528 -0.5218 -77.3747 0.7187 -59.7134 20.0343 -96.8269 25.3152 -87.5528 20.6515 -79.1156 15.5904 -68.1863 11.7736 -78.6009 22.2153 -84.1996 20.6515 -79.1156 11.7736 -78.6009 23.7607 -84.6347 20.6515 -79.1156 22.2153 -84.1996 23.7607 -84.6347 20.6515 -79.1156 22.2153 -84.1996 -0.5218 -77.3747 -4.4254 -93.8949 -0.5218 -77.3747 11.7736 -78.6009 15.5904 -68.1863 -0.5218 -77.3747 11.7736 -78.6009 15.5904 -68.1863 11.7736 -78.6009 -4.4254 -93.8949 14.4714 -94.1617 11.7736 -78.6009 25.3152 -87.5528 22.2153 -84.1996 14.4714 -94.1617 25.3152 -87.5528 22.2153 -84.1996 14.4714 -94.1617 -34.3740 -92.9656 20.0343 -96.8269 14.4714 -94.1617 -4.4254 -93.8949 20.0343 -96.8269 14.4714 -94.1617 -4.4254 -93.8949 20.0343 -96.8269 -13.6385 -72.6159 0.7187 -59.7134 -5.1261 21.6594 3.2428 27.1616 -9.6403 87.6852 12.6868 93.8774 14.1310 77.6791 -9.6403 87.6852 -9.3733 75.2980 14.1310 77.6791 12.6868 93.8774 -55.0699 81.3122 -9.6403 87.6852 -21.4461 85.6536 -9.3733 75.2980 -9.6403 87.6852 -9.3733 75.2980 -21.4461 85.6536 12.6868 93.8774 -34.7821 84.1382 -21.4461 85.6536 12.6868 93.8774 -34.7821 84.1382 -36.6696 77.1805 -21.4461 85.6536 -34.7821 84.1382 -25.2937 82.3486 -21.4461 85.6536 -34.7821 84.1382 -25.2937 82.3486 -9.3733 75.2980 -25.2937 82.3486 -9.3733 75.2980 -12.1829 70.1839 -1.8365 65.6245 -9.3733 75.2980 -13.9469 65.5629 -1.8365 65.6245 -12.1829 70.1839 -13.9469 65.5629 -1.8365 65.6245 -12.1829 70.1839 -12.1829 70.1839 -25.2937 82.3486 -23.2865 61.7965 -12.1829 70.1839 -25.2937 82.3486 -36.6696 77.1805 -23.2865 61.7965 -25.2937 82.3486 -36.6696 77.1805 -23.2865 61.7965 -36.6696 77.1805 -42.1979 74.5663 -40.7930 72.1095 -36.6696 77.1805 -42.1979 74.5663 -34.7821 84.1382 -42.1979 74.5663 -51.3634 78.1053 -51.3634 78.1053 -34.7821 84.1382 -51.6675 78.4493 -51.3634 78.1053 -55.0699 81.3122 -61.1694 79.0628 -51.6675 78.4493 -34.7821 84.1382 -55.0699 81.3122 -51.6675 78.4493 -34.7821 84.1382 -55.0699 81.3122 -40.7930 72.1095 -42.1979 74.5663 -42.1979 74.5663 -44.4469 69.4911 -40.7930 72.1095 -44.4469 69.4911 -44.4469 69.4911 -40.9129 62.5441 -51.3634 78.1053 -57.5935 67.9368 -44.4469 69.4911 -51.3634 78.1053 -57.5935 67.9368 -44.4469 69.4911 -57.5935 67.9368 -60.8405 63.7947 -40.9129 62.5441 -57.5935 67.9368 -57.5935 67.9368 -51.6675 78.4493 -51.6675 78.4493 -61.1694 79.0628 -40.7930 72.1095 -40.9129 62.5441 -23.2865 61.7965 -40.7930 72.1095 -41.7407 6.8704 -21.0639 4.5720 -10.5718 48.9948 -4.7170 57.8270 -4.7170 57.8270 -13.9469 65.5629 -23.2865 61.7965 -40.9129 62.5441 -29.6696 40.5710 -23.2865 61.7965 -23.2865 61.7965 -38.1917 51.2306 -13.9469 65.5629 -23.2865 61.7965 -10.5718 48.9948 -13.9469 65.5629 -23.2865 61.7965 -10.5718 48.9948 -29.6696 40.5710 -38.1917 51.2306 -40.8953 47.3917 -38.1917 51.2306 -10.2652 22.5742 3.2428 27.1616 3.2428 27.1616 -10.5718 48.9948 -21.0639 4.5720 -4.6413 21.2599 -10.2652 22.5742 -4.6413 21.2599 -5.1261 21.6594 -10.2652 22.5742 -4.6413 21.2599 -5.1261 21.6594 -10.5718 48.9948 -29.6696 40.5710 -10.2652 22.5742 -10.5718 48.9948 -29.6696 40.5710 -40.8953 47.3917 -10.2652 22.5742 -29.6696 40.5710 -21.0639 4.5720 -10.2652 22.5742 -29.6696 40.5710 -21.0639 4.5720 -41.7407 6.8704 -29.6696 40.5710 -29.6696 40.5710 -55.2680 32.5656 -40.9129 62.5441 -60.8405 63.7947 -44.9889 49.2534 -38.1917 51.2306 -40.9129 62.5441 -44.9889 49.2534 -38.1917 51.2306 -40.9129 62.5441 -44.9889 49.2534 -60.8405 63.7947 -55.4902 47.7345 -44.9889 49.2534 -55.4902 47.7345 -60.5855 46.6076 -55.2680 32.5656 -55.4902 47.7345 -55.4902 47.7345 -60.8405 63.7947 -55.2680 32.5656 -60.5855 46.6076 -40.8953 47.3917 -44.9889 49.2534 -55.2680 32.5656 -40.8953 47.3917 -44.9889 49.2534 -55.2680 32.5656 -55.2680 32.5656 -59.5482 23.3864 -41.7407 6.8704 -55.2680 32.5656 -59.5482 23.3864 -41.7407 6.8704 -59.5482 23.3864 -64.2008 23.7217 -61.7285 11.9734 -59.5482 23.3864 -68.3857 45.0334 -63.6201 37.2391 -61.7364 47.0918 -55.4902 47.7345 -55.4902 47.7345 -64.8119 56.0986 -64.8119 56.0986 -60.8405 63.7947 -67.2889 58.8006 -64.8119 56.0986 -61.1694 79.0628 -67.0904 69.6398 -57.5935 67.9368 -61.1694 79.0628 -67.0904 69.6398 -57.5935 67.9368 -67.2889 58.8006 -60.8405 63.7947 -67.0904 69.6398 -68.9813 68.8923 -60.8405 63.7947 -67.0904 69.6398 -68.9813 68.8923 -60.8405 63.7947 -61.7364 47.0918 -64.8119 56.0986 -65.7744 53.4413 -67.2889 58.8006 -63.6201 37.2391 -60.5855 46.6076 -61.7364 47.0918 -63.6201 37.2391 -60.5855 46.6076 -61.7364 47.0918 -68.3857 45.0334 -61.7364 47.0918 -61.7364 47.0918 -65.3601 50.7497 -68.3857 45.0334 -65.3601 50.7497 -65.3601 50.7497 -64.8119 56.0986 -65.7744 53.4413 -65.3601 50.7497 -64.8119 56.0986 -65.7744 53.4413 -65.7744 53.4413 -70.6903 58.8917 -68.3857 45.0334 -65.7744 53.4413 -61.1694 79.0628 -77.1241 62.5579 -74.9203 64.7075 -77.1241 62.5579 -70.6903 58.8917 -74.9203 64.7075 -61.1694 79.0628 -74.9203 64.7075 -68.9813 68.8923 -61.1694 79.0628 -74.9203 64.7075 -68.9813 68.8923 -77.1241 62.5579 -86.3974 48.3194 -77.1241 62.5579 -76.9256 59.2413 -70.6903 58.8917 -77.1241 62.5579 -70.6903 58.8917 -76.9256 59.2413 -68.3857 45.0334 -70.6903 58.8917 -76.9256 59.2413 -86.3974 48.3194 -68.3857 45.0334 -76.9256 59.2413 -67.2889 58.8006 -68.9813 68.8923 -70.6903 58.8917 -67.2889 58.8006 -68.9813 68.8923 -70.6903 58.8917 -68.3857 45.0334 -86.3974 48.3194 -88.2283 44.3548 -68.3857 45.0334 -86.3974 48.3194 -88.2283 44.3548 -74.1481 32.7178 -88.2283 44.3548 -74.5494 -2.2420 -71.3914 -1.9685 -55.2680 32.5656 -63.6201 37.2391 -64.2008 23.7217 -55.2680 32.5656 -63.6201 37.2391 -70.5121 32.0760 -64.2008 23.7217 -63.6201 37.2391 -61.7285 11.9734 -64.2008 23.7217 -64.2008 23.7217 -70.5121 32.0760 -68.5665 17.5779 -64.2008 23.7217 -68.5665 17.5779 -70.5121 32.0760 -74.1481 32.7178 -68.5665 17.5779 -68.3857 45.0334 -74.1481 32.7178 -70.5121 32.0760 -68.3857 45.0334 -74.1481 32.7178 -70.5121 32.0760 -61.7285 11.9734 -68.5665 17.5779 -49.3894 -13.7710 -62.2197 6.8071 -41.7407 6.8704 -61.7285 11.9734 -62.2197 6.8071 -41.7407 6.8704 -61.7285 11.9734 -65.8203 8.9686 -62.2197 6.8071 -61.7285 11.9734 -62.2197 6.8071 -65.8203 8.9686 -71.3914 -1.9685 -62.2197 6.8071 -65.8203 8.9686 -71.3914 -1.9685 -68.5665 17.5779 -80.6679 19.1888 -65.8203 8.9686 -68.5665 17.5779 -80.6679 19.1888 -74.1481 32.7178 -88.2283 44.3548 -97.9983 19.6939 -89.7349 34.5346 -88.2283 44.3548 -80.6679 19.1888 -86.2087 27.5232 -91.2978 23.2968 -86.2087 27.5232 -86.2087 27.5232 -74.1481 32.7178 -89.7349 34.5346 -86.2087 27.5232 -74.1481 32.7178 -89.7349 34.5346 -80.6679 19.1888 -91.2978 23.2968 -89.7349 34.5346 -97.9983 19.6939 -91.2978 23.2968 -89.7349 34.5346 -97.9983 19.6939 -91.2978 23.2968 -65.8203 8.9686 -80.6679 19.1888 -74.5494 -2.2420 -65.8203 8.9686 -74.5494 -2.2420 -76.1795 -3.7050 -73.3658 -6.5519 -74.5494 -2.2420 -80.6679 19.1888 -97.9983 19.6939 -80.6679 19.1888 -78.1823 -3.8665 -74.5494 -2.2420 -80.6679 19.1888 -78.1823 -3.8665 -74.5494 -2.2420 -21.0639 4.5720 -37.0169 -14.4937 8.2968 8.8643 -21.0639 4.5720 -9.7612 -19.2980 8.2968 8.8643 -49.3894 -13.7710 -71.3914 -1.9685 -21.0639 4.5720 -23.3463 -16.0645 -9.7612 -19.2980 -21.0639 4.5720 -37.0169 -14.4937 -41.7407 6.8704 -41.7407 6.8704 -49.3894 -13.7710 -9.7612 -19.2980 -23.3463 -16.0645 -23.3463 -16.0645 -37.0169 -14.4937 -27.4921 -18.2391 -23.3463 -16.0645 -40.9966 -41.4935 -28.5567 -18.5395 -27.4921 -18.2391 -37.0169 -14.4937 -28.5567 -18.5395 -27.4921 -18.2391 -37.0169 -14.4937 -28.5567 -18.5395 -9.7612 -19.2980 -27.4921 -18.2391 -20.0352 -58.4274 0.7187 -59.7134 -9.7612 -19.2980 -20.0352 -58.4274 0.7187 -59.7134 -9.7612 -19.2980 -27.4921 -18.2391 -40.9966 -41.4935 -20.0352 -58.4274 -27.4921 -18.2391 -20.0352 -58.4274 -40.9966 -41.4935 -44.2990 -54.3366 -20.0352 -58.4274 -40.9966 -41.4935 -44.2990 -54.3366 -40.9966 -41.4935 -37.0169 -14.4937 -44.7484 -54.5276 -44.2990 -54.3366 -49.3894 -13.7710 -52.4090 -26.6174 -37.0169 -14.4937 -49.3894 -13.7710 -52.4090 -26.6174 -37.0169 -14.4937 -40.9966 -41.4935 -52.4090 -26.6174 -46.4391 -44.6944 -40.9966 -41.4935 -50.8168 -51.2279 -46.4391 -44.6944 -46.4391 -44.6944 -52.4090 -26.6174 -48.6930 -52.7387 -50.8168 -51.2279 -50.1036 -55.8527 -44.7484 -54.5276 -48.6930 -52.7387 -50.1036 -55.8527 -44.7484 -54.5276 -48.6930 -52.7387 -44.2990 -54.3366 -46.4391 -44.6944 -48.6930 -52.7387 -44.2990 -54.3366 -46.4391 -44.6944 -48.6930 -52.7387 -58.5302 -56.8462 -51.4737 -62.2752 -51.4737 -62.2752 -50.1036 -55.8527 -50.1036 -55.8527 -50.8168 -51.2279 -58.5302 -56.8462 -50.1036 -55.8527 -31.6651 -64.7984 -44.2990 -54.3366 -44.2990 -54.3366 -35.6817 -67.5864 -17.7481 -88.7762 -0.5218 -77.3747 -20.0352 -58.4274 -31.6651 -64.7984 -13.6385 -72.6159 -20.0352 -58.4274 -38.8945 -81.3833 -23.5470 -81.1948 -13.6385 -72.6159 -31.6651 -64.7984 -23.5470 -81.1948 -13.6385 -72.6159 -23.5470 -81.1948 -31.6651 -64.7984 -35.6817 -67.5864 -23.5470 -81.1948 -31.6651 -64.7984 -35.6817 -67.5864 -44.7484 -54.5276 -51.4737 -62.2752 -35.6817 -67.5864 -44.7484 -54.5276 -17.7481 -88.7762 -19.8825 -82.5277 -19.8825 -82.5277 -23.5470 -81.1948 -4.4254 -93.8949 -17.7481 -88.7762 -34.3740 -92.9656 -4.4254 -93.8949 -17.7481 -88.7762 -23.5470 -81.1948 -34.3740 -92.9656 -17.7481 -88.7762 -0.5218 -77.3747 -13.6385 -72.6159 -19.8825 -82.5277 -0.5218 -77.3747 -13.6385 -72.6159 -19.8825 -82.5277 -51.9856 -85.1058 -34.3740 -92.9656 -34.3740 -92.9656 -23.5470 -81.1948 -36.9727 -90.0054 -34.3740 -92.9656 -23.5470 -81.1948 -36.9727 -90.0054 -38.8945 -81.3833 -35.6817 -67.5864 -58.3626 -60.8199 -54.4219 -68.2418 -51.4737 -62.2752 -58.3626 -60.8199 -51.4737 -62.2752 -54.4219 -68.2418 -46.1820 -75.5197 -35.6817 -67.5864 -51.4737 -62.2752 -46.1820 -75.5197 -35.6817 -67.5864 -51.4737 -62.2752 -46.1820 -75.5197 -54.4219 -68.2418 -54.9403 -74.0878 -46.1820 -75.5197 -54.9403 -74.0878 -54.4219 -68.2418 -61.9693 -70.6342 -54.9403 -74.0878 -38.8945 -81.3833 -46.1820 -75.5197 -46.1820 -75.5197 -51.9856 -85.1058 -36.9727 -90.0054 -38.8945 -81.3833 -51.9856 -85.1058 -36.9727 -90.0054 -38.8945 -81.3833 -51.9856 -85.1058 -58.8147 -80.3628 -51.9856 -85.1058 -51.9856 -85.1058 -54.9403 -74.0878 -57.5359 -79.4269 -51.9856 -85.1058 -54.9403 -74.0878 -57.5359 -79.4269 -58.5302 -56.8462 -50.8168 -51.2279 -50.8168 -51.2279 -69.1893 -36.9253 -65.7963 -19.9035 -71.3914 -1.9685 -71.3914 -1.9685 -73.3658 -6.5519 -58.5302 -56.8462 -69.1893 -36.9253 -67.2754 -33.2136 -52.4090 -26.6174 -65.7963 -19.9035 -73.3658 -6.5519 -70.2754 -25.2940 -65.7963 -19.9035 -65.7963 -19.9035 -71.0703 -20.5920 -49.3894 -13.7710 -65.7963 -19.9035 -63.6961 -23.7343 -49.3894 -13.7710 -65.7963 -19.9035 -63.6961 -23.7343 -70.2754 -25.2940 -71.0703 -20.5920 -71.0703 -20.5920 -73.3658 -6.5519 -73.0777 -22.6034 -71.0703 -20.5920 -63.6961 -23.7343 -70.2754 -25.2940 -46.4391 -44.6944 -67.2754 -33.2136 -69.1893 -36.9253 -46.4391 -44.6944 -69.1893 -36.9253 -67.2754 -33.2136 -67.2754 -33.2136 -67.4807 -29.5222 -52.4090 -26.6174 -63.6961 -23.7343 -67.4807 -29.5222 -52.4090 -26.6174 -63.6961 -23.7343 -67.4807 -29.5222 -89.6947 -32.0221 -70.2754 -25.2940 -70.2754 -25.2940 -73.0777 -22.6034 -67.4807 -29.5222 -70.2754 -25.2940 -69.1893 -36.9253 -67.4807 -29.5222 -70.2754 -25.2940 -69.1893 -36.9253 -73.3895 -43.0285 -69.1893 -36.9253 -69.1893 -36.9253 -89.6947 -32.0221 -97.9983 19.6939 -87.6795 -21.6424 -78.1823 -3.8665 -97.9983 19.6939 -73.0777 -22.6034 -73.3658 -6.5519 -87.6795 -21.6424 -73.3658 -6.5519 -78.1823 -3.8665 -87.6795 -21.6424 -73.3658 -6.5519 -76.1795 -3.7050 -78.1823 -3.8665 -73.3658 -6.5519 -76.1795 -3.7050 -78.1823 -3.8665 -73.0777 -22.6034 -87.6795 -21.6424 -89.6947 -32.0221 -73.0777 -22.6034 -87.6795 -21.6424 -91.4848 -36.5948 -89.6947 -32.0221 -87.6795 -21.6424 -73.3895 -43.0285 -89.6947 -32.0221 -91.3833 -38.9451 -84.2820 -53.7921 -91.3833 -38.9451 -82.9282 -50.9933 -73.3895 -43.0285 -91.3833 -38.9451 -82.9282 -50.9933 -73.3895 -43.0285 -97.9983 19.6939 -91.3833 -38.9451 -91.4848 -36.5948 -97.9983 19.6939 -91.3833 -38.9451 -89.6947 -32.0221 -91.4848 -36.5948 -91.3833 -38.9451 -89.6947 -32.0221 -91.4848 -36.5948 -58.5302 -56.8462 -73.3895 -43.0285 -68.2428 -72.8175 -66.7380 -74.0968 -58.8147 -80.3628 -57.5359 -79.4269 -57.5359 -79.4269 -61.9693 -70.6342 -65.2722 -57.5238 -73.3895 -43.0285 -61.4121 -66.4634 -58.3626 -60.8199 -58.5302 -56.8462 -65.2722 -57.5238 -58.3626 -60.8199 -58.5302 -56.8462 -65.2722 -57.5238 -58.3626 -60.8199 -65.2722 -57.5238 -68.1421 -57.2227 -61.4121 -66.4634 -65.2722 -57.5238 -64.4716 -66.7477 -61.4121 -66.4634 -65.2722 -57.5238 -64.4716 -66.7477 -61.9693 -70.6342 -64.4716 -66.7477 -66.7380 -74.0968 -58.8147 -80.3628 -58.8147 -80.3628 -61.9693 -70.6342 -54.4219 -68.2418 -61.4121 -66.4634 -61.9693 -70.6342 -54.4219 -68.2418 -61.4121 -66.4634 -61.9693 -70.6342 -61.9693 -70.6342 -63.5200 -70.8299 -66.7380 -74.0968 -61.9693 -70.6342 -63.5200 -70.8299 -66.7380 -74.0968 -68.2428 -72.8175 -63.5200 -70.8299 -63.5200 -70.8299 -64.4716 -66.7477 -68.2428 -72.8175 -64.4716 -66.7477 -72.2029 -69.1806 -68.2428 -72.8175 -73.3895 -43.0285 -81.6376 -54.3964 -68.1421 -57.2227 -73.3895 -43.0285 -84.2820 -53.7921 -72.2029 -69.1806 -68.1421 -57.2227 -81.6376 -54.3964 -75.9950 -64.0982 -68.1421 -57.2227 -75.9950 -64.0982 -81.6376 -54.3964 -84.2820 -53.7921 -75.9950 -64.0982 -84.2820 -53.7921 -81.6376 -54.3964 -82.9282 -50.9933 -84.2820 -53.7921 -81.6376 -54.3964 -82.9282 -50.9933 -72.2029 -69.1806 -64.4716 -66.7477 -75.9950 -64.0982 -72.2029 -69.1806 -73.9743 -66.1408 -75.9950 -64.0982 -72.2029 -69.1806 -73.9743 -66.1408 -73.9743 -66.1408 -64.4716 -66.7477 -68.1421 -57.2227 -73.9743 -66.1408 -64.4716 -66.7477 -68.1421 -57.2227 gnuplot-4.6.4/demo/transparent.dem0000644000471100001440000000233011305270570014103 0ustar # # Example of transparent fill areas # Ethan A Merritt - Aug 2006 # NB: # Not all terminal types support transparency # Assumes UTF-8 support for plot titles # set style fill solid 1.0 noborder set style function filledcurves y1=0 set clip two Gauss(x,mu,sigma) = 1./(sigma*sqrt(2*pi)) * exp( -(x-mu)**2 / (2*sigma**2) ) d1(x) = Gauss(x, 0.5, 0.5) d2(x) = Gauss(x, 2., 1.) d3(x) = Gauss(x, -1., 2.) set xrange [-5:5] set yrange [0:1] unset colorbox set key title "Gaussian Distribution" set key top left Left reverse samplen 1 #set obj 1 rect from graph 0,0 to graph 1,1 #set obj 1 rect back fs solid 0.25 fc lt 4 set title "Solid filled curves" plot d1(x) fs solid 1.0 lc rgb "forest-green" title "μ = 0.5 σ = 0.5", \ d2(x) lc rgb "gold" title "μ = 2.0 σ = 1.0", \ d3(x) lc rgb "red" title "μ = -1.0 σ = 2.0" pause -1 "Hit return to continue" set style fill transparent solid 0.5 noborder set title "Transparent filled curves" replot pause -1 "Hit return to continue" set style fill pattern 4 bo set title "Pattern-filled curves" replot pause -1 "Hit return to continue" set style fill transparent pattern 4 bo set title "Transparent pattern-filled curves" replot pause -1 "Hit return to continue" gnuplot-4.6.4/demo/pm3dgamma.dem0000644000471100001440000000151407744002175013421 0ustar # # $Id: pm3dgamma.dem,v 1.2 2003/10/17 15:02:21 mikulik Exp $ # # Test of gamma correction for gray palettes set pm3d; set palette set palette gray set pm3d map set cbrange [-10:10] set xrange [-10:10] set yrange [*:*] unset ztics unset ytics set samples 101 set isosamples 2 set xtics 2 set palette gamma 0.75 set title "gamma = 0.75" splot x pause -1 "Hit return to continue" set palette gamma 1.0 set title "gamma = 1.0" splot x pause -1 "Hit return to continue" set palette gamma 1.25 set title "gamma = 1.25" splot x pause -1 "Hit return to continue" set palette gamma 1.5 set title "gamma = 1.5" splot x pause -1 "Hit return to continue" set palette gamma 1.75 set title "gamma = 1.75" splot x pause -1 "Hit return to continue" set palette gamma 2.0 set title "gamma = 2.0" splot x pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/world.cor0000644000471100001440000000663406515203633012725 0ustar # # $Id: world.cor,v 1.1.1.1 1998/04/15 19:16:43 lhecking Exp $ # # Gnuplot world correspondences. Feel free to check for and update # your site; especially if it represents a new location or you # know more precise coordinates for a site. A (?) indicates # the site may not be correct. Currently coordinates are generally # rounded to the nearest latitude and longitude. It's fine, however, # to give as many decimal places with each as you like. # USA # Carnegie Mellon University # Univ. of Calif. at Irvine # University of Maryland -110 35 # Northern Arizona University, Flagstaff, Arizona -111 32 # Univ. of Arizona, Tucson, Arizona -110 43 # University of Utah, Salt Lake City, Utah -118 34 # California Institute of Technology (CALTECH), L.A., Calif. -118 34 # Claremont, California -118 34 # Univ. of Calif. at Los Angeles (UCLA), California -120 34.5 # Univ. of Calif. at Santa Barbara, California -122 37.5 # Stanford, California -122 38 # Berkeley, California -122 38 # Richmond, California -122 47.5 # University of Washington, Washington -71 42.5 # MIT, Cambridge, Massachusetts -74.5 40.5 # New Brunswick, New Jersey -75 41 # Bethlehem, Pennsylvania -76 42 # Cornell College, Ithica, New York -78.5 38 # Univ of Virginia, Charlottesville, Virginia -79 36 # N.C. State University, Chapel Hill, North Carolina -80 35 # Duke University, Durham, North Carolina -81 28 # Melbourne, Florida -83 40 # Ohio State, Columbus, Ohio -83 42 # Detroit, Michigan -84 34 # Alpharetta, Georgia -84 34 # Atlanta, Georgia -84 42 # Univ. of Michigan, Ann Arbor, Michigan -86 39 # UCS Indiana (?) -88 40 # University of Illinois, Urbana-Champaign, Illinois -88 42 # Arlington Heights, Illinois -88 42 # Northwestern University, Evanston, Illinois -92 30 # Lafayette, Louisiana -93 45 # Eagan, Minnesota -95 30 # Houston, Texas -95 39 # Kansas State University -96 31 # Texas A&M, College Station, Texas -98 30 # Univ of Texas, Austin, Texas # Canada -123 49 # BC Hydro, Vancover, British Columbia (?) -63 45 # Dartmouth, Nova Scotia, Canada -75 45 # Ecole Polytechnique de Montreal, Canada # United Kingdom -8 54.5 # Bangor, United Kingdom -80.5 43.5 # Waterloo, Ontario, Canada 0 52 # Cambridge, U. K. # Italy 14 46 # Trieste, Italy # Australia 138.5666 -35.01666 # Flinders University, Adelaide, South Australia 138.6333 -34.8 # South Australian Institute, Adelaide, South AUS 145.1333 -37.9167 # Monash University, Melbourne, Victoria 144.9833 -37.8167 # Melbourne University, Melbourne, Victoria # Namibia 17 -23 # Windhoek, Namibia # Sweden 18 60 # Stockholm, Sweden # France 2 49 # Valbonne, CEDEX, France (?) # Finland 24 60 # Espoo, Finland 24 62 # Wassau, Finland (?) # Belgium 4.5 51 # Brussels, Belgium # The Netherlands 4.5 52 # Delft, The Netherlands # Germany 7 51 # University of Cologne, Federal Republic of Germany 7 51.5 # Fraunhofer Institut, Duisburg, Germany 8 48 # Freiburg im Br. (Federal Republic of Germany) 8 52 # Univesity of Dortmund, Federal Republic of Germany 11.5 48 # Technische Universitaet Muenchen, Munich, Germany gnuplot-4.6.4/demo/sound2.par0000644000471100001440000000027406515203632013000 0ustar # # Start parameters for the sound velocity fit # # HBB 970522: factored out 1e9 from c??, see hexa.fnc for details c33 = 9 c11 = 6 c44 = 1 # FIXED c13 = 4 # FIXED phi0 = 0.0001 gnuplot-4.6.4/demo/nearmap.csv0000644000471100001440000002203610071446526013225 0ustar # Stars farther than 0.00pc and closer than 7.00pc # Lum between 0.0 and 100.0 #Gliese StarName Spec DistPC X Y Z Xg Yg Zg Lum 1 DM-37 15492 M4V 4.44 3.52 0.04 -2.71 1.04 -0.30 -4.31 0.01 15A DM+43 44 M1Ve 3.55 2.56 0.17 2.45 -1.51 3.01 -1.12 0.01 15B M6Ve 3.55 2.56 0.17 2.45 -1.51 3.01 -1.12 0.00 19 BET HYI G1IV 6.29 1.35 0.14 -6.14 2.76 -3.97 -4.02 2.75 33 DM+04 123 K2V 6.94 6.78 1.37 0.61 -1.95 3.18 -5.86 0.22 34A ETA CAS G0V 5.88 3.09 0.63 4.96 -3.16 4.94 -0.52 1.32 34B M0V 5.88 3.09 0.63 4.96 -3.16 4.94 -0.52 0.03 35 VAN MAANEN 2 G wD 4.18 4.08 0.84 0.38 -1.19 1.91 -3.53 0.00 54.1 L 725-32 M5de 6.90 6.28 1.99 -2.05 -1.17 0.67 -6.76 0.00 65A L 726-8 M5de 2.72 2.36 1.06 -0.85 -0.67 0.05 -2.64 0.00 65B UV CET M5de 2.72 2.36 1.06 -0.85 -0.67 0.05 -2.64 0.00 66A P ERI K2V 6.54 3.29 1.50 -5.45 1.11 -3.11 -5.64 0.20 66B DM-56 328 K5Ve 6.54 3.29 1.50 -5.45 1.11 -3.11 -5.64 0.17 71 TAU CET G8Vp 3.61 3.13 1.49 -1.01 -1.02 0.12 -3.46 0.47 83.1 L 1159-16 M8de 4.69 3.99 2.24 1.04 -2.73 1.73 -3.40 0.00 139 82 ERI G5V 6.21 2.94 3.44 -4.26 -1.14 -3.27 -5.16 0.70 144 EPS ERI K2Ve 3.31 1.98 2.59 -0.55 -2.13 -0.60 -2.46 0.32 166A OMI(2) ERI K1Ve 4.88 2.18 4.32 -0.66 -3.60 -1.36 -3.00 0.37 166B DM-07 781 A wD 4.88 2.17 4.32 -0.66 -3.60 -1.36 -3.00 0.00 166C M4de 4.88 2.17 4.32 -0.66 -3.60 -1.36 -3.00 0.00 169.1A AC+58 25001 M4d 5.21 1.06 2.47 4.46 -4.38 2.73 0.66 0.00 169.1B AC+58 25002 C wD 5.21 1.06 2.47 4.46 -4.38 2.73 0.66 0.00 191 DM-45 1841 M0V 3.91 0.60 2.70 -2.76 -1.06 -2.97 -2.30 0.00 205 DM-03 1123 M1Ve 5.88 0.79 5.82 -0.38 -4.95 -2.51 -1.96 0.02 213 AC+12 1800-2 M5d 5.95 0.53 5.79 1.29 -5.71 -1.39 -0.95 0.00 223.2 LP 658-2 K wDe 6.02 0.19 6.01 -0.44 -5.04 -2.93 -1.50 0.00 229 DM-21 1377 M1Ve 5.75 -0.20 5.33 -2.14 -3.61 -4.09 -1.82 0.02 234A ROSS 614 M7de 3.97 -0.46 3.94 -0.19 -3.31 -2.14 -0.43 0.00 234B 3.97 -0.46 3.94 -0.19 -3.31 -2.14 -0.43 91.20 244A ALF CMA A1V 2.65 -0.47 2.50 -0.76 -1.78 -1.92 -0.41 24.66 244B A wD 2.65 -0.47 2.50 -0.76 -1.78 -1.92 -0.41 0.00 251 AC+33 25644 M4d 5.95 -1.11 4.85 3.27 -5.74 -0.29 1.56 0.00 268 AC+38 23616 M5de 5.92 -1.33 4.43 3.69 -5.56 0.10 2.02 0.00 273 DM+05 1668 M5d 3.70 -1.33 3.44 0.35 -3.08 -1.95 0.67 0.00 280A ALF CMI F5IV+ 3.51 -1.43 3.19 0.33 -2.84 -1.90 0.79 8.02 280B F wD 3.51 -1.43 3.19 0.33 -2.84 -1.90 0.79 0.00 285 YZ CMI M4de 6.06 -2.61 5.46 0.39 -4.78 -3.45 1.41 0.00 293 L 97-12 C wD 5.78 -1.04 1.94 -5.35 0.97 -5.37 -1.92 0.00 299 ROSS 619 M5d 6.62 -3.49 5.53 1.04 -5.09 -3.44 2.47 0.00 300 L 674-15 M 5.85 -2.94 4.59 -2.13 -2.77 -5.10 0.70 0.00 338A DM+53 1320 M0Ve 6.02 -2.69 2.44 4.80 -4.27 1.15 4.08 0.03 338B DM+53 1321 M0Ve 6.02 -2.69 2.44 4.80 -4.27 1.15 4.08 0.03 380 DM+50 1725 K7Ve 4.50 -2.57 1.36 3.44 -2.68 0.68 3.56 0.04 388 DM+20 2465 M4Ve 4.90 -4.14 2.00 1.69 -2.28 -1.69 4.00 0.00 406 WOLF 359 M8de 2.35 -2.23 0.66 0.30 -0.57 -1.17 1.95 0.00 408 AC+23 468-46 M3d 6.62 -5.87 1.64 2.60 -2.30 -1.70 5.98 0.00 411 DM+36 2147 M2Ve 2.52 -1.96 0.52 1.49 -1.04 -0.09 2.29 0.01 412A DM+44 2051 M2Ve 5.38 -3.76 0.96 3.72 -2.38 0.49 4.80 0.01 412B WX UMA M8de 5.38 -3.76 0.95 3.72 -2.38 0.49 4.80 0.00 440 L 145-141 C wD 4.85 -2.08 0.15 -4.38 2.12 -4.36 -0.24 0.00 445 AC+79 3888 M4sd 5.10 -0.97 0.07 5.01 -2.41 3.22 3.14 0.00 447 ROSS 128 M5d 3.32 -3.31 0.22 0.06 0.00 -1.68 2.86 0.00 473A WOLF 424 M5de 4.33 -4.23 -0.57 0.70 0.45 -1.31 4.10 0.00 473B 4.33 -4.23 -0.57 0.70 0.45 -1.31 4.10 0.00 477.1 DM+46 1797 K4V 6.10 -4.19 -0.62 4.39 -1.30 1.48 5.77 0.05 526 DM+15 2620 M4Ve 4.98 -4.32 -2.09 1.30 1.49 -0.22 4.74 0.01 551 PROXIMA CEN M5de 1.31 -0.49 -0.36 -1.17 0.91 -0.94 -0.04 0.00 555 DM-11 3759 M4d 6.25 -4.82 -3.75 -1.33 4.24 -1.68 4.27 0.00 559A ALF CEN G2V 1.35 -0.51 -0.42 -1.17 0.96 -0.94 -0.02 1.66 559B K0V 1.35 -0.51 -0.42 -1.17 0.96 -0.94 -0.02 0.48 566A XI BOO G8Ve 6.76 -4.72 -4.29 2.23 2.98 1.27 5.93 0.56 566B K4Ve 6.76 -4.72 -4.29 2.23 2.98 1.27 5.93 0.08 570A DM-20 4125 K5Ve 5.56 -3.75 -3.57 -2.01 4.34 -1.73 3.00 0.14 570B DM-20 4123 M2V 5.56 -3.75 -3.57 -2.01 4.34 -1.73 3.00 0.02 581 DM-07 4003 M5d 6.54 -4.23 -4.91 -0.86 4.98 -0.51 4.20 0.00 588 DM-40 9712 M4 5.92 -2.73 -3.53 -3.89 5.14 -2.65 1.24 0.00 628 DM-12 4523 M5d 4.02 -1.54 -3.61 -0.87 3.67 0.22 1.61 0.00 643 WOLF 629 M4sd 6.21 -1.78 -5.88 -0.89 5.68 1.11 2.24 0.00 644A DM-08 4352 M4de 6.21 -1.78 -5.88 -0.89 5.69 1.11 2.24 0.00 644B M4d 6.21 -1.78 -5.88 -0.89 5.69 1.11 2.24 0.00 644C VB 8 6.21 -1.77 -5.88 -0.90 5.69 1.11 2.23 0.00 661A DM+45 2505 M3d 6.45 -0.96 -4.40 4.62 1.67 4.95 3.79 0.00 661B M3 6.45 -0.96 -4.40 4.62 1.67 4.95 3.79 0.00 663A DM-26 12026 K1Ve 5.43 -1.01 -4.76 -2.43 5.39 -0.16 0.65 0.26 663B K1Ve 5.43 -1.01 -4.76 -2.43 5.39 -0.16 0.65 0.25 664 DM-26 12036 K5Ve 5.43 -0.99 -4.76 -2.42 5.39 -0.15 0.64 0.08 674 DM-46 11540 M4 4.63 -0.48 -3.13 -3.38 4.40 -1.34 -0.55 0.00 682 DM-44 11909 M5 4.69 -0.39 -3.34 -3.28 4.52 -1.13 -0.54 0.00 687 DM+68 946 M3V 4.69 -0.18 -1.72 4.36 -0.60 3.94 2.49 0.00 693 L 205-128 M 5.88 -0.24 -3.17 -4.95 5.18 -2.38 -1.47 0.00 699 BARNARD'S ST M5V 1.81 -0.04 -1.81 0.14 1.51 0.90 0.44 0.00 702A DM+02 3482 K0Ve 5.13 0.07 -5.12 0.22 4.36 2.51 1.01 0.49 702B K5Ve 5.13 0.07 -5.12 0.22 4.36 2.51 1.01 0.10 725A DM+59 1915 M4d 3.55 0.33 -1.77 3.06 0.04 3.23 1.45 0.00 725B M5d 3.55 0.33 -1.77 3.06 0.04 3.23 1.45 0.00 729 AC-24 2833-1 M4de 2.90 0.54 -2.60 -1.17 2.80 0.56 -0.52 0.00 752A DM+04 4048 M3Ve 5.78 1.84 -5.46 0.51 4.39 3.75 -0.33 0.01 752B VB 10 M5de 5.78 1.84 -5.46 0.51 4.39 3.74 -0.33 0.00 754 L 347-14 M7 5.71 1.32 -3.77 -4.08 5.18 -0.69 -2.31 0.00 764 SIG DRA K0V 5.68 0.78 -1.82 5.32 -1.04 5.17 2.12 0.39 768 ALF AQL A7IV 5.05 2.27 -4.44 0.77 3.36 3.69 -0.78 11.59 780 DEL PAV G8V 5.71 1.18 -1.97 -5.23 4.17 -2.43 -3.06 1.14 783A DM-36 13940 K3V 5.65 2.41 -3.87 -3.34 4.83 0.44 -2.90 0.22 783B M5d 5.65 2.41 -3.87 -3.34 4.83 0.44 -2.90 0.00 784 DM-45 13677 M0V 6.10 2.31 -3.61 -4.34 5.09 -0.46 -3.32 0.02 820A 61 CYG K5Ve 3.38 1.91 -1.83 2.10 0.45 3.33 -0.34 0.08 820B K7Ve 3.38 1.91 -1.83 2.10 0.45 3.33 -0.34 0.04 825 DM-39 14192 M0Ve 3.85 2.24 -1.98 -2.42 2.75 0.19 -2.69 0.03 829 AC+17 534-10 M4de 6.54 4.90 -3.86 1.96 2.09 5.61 -2.62 0.00 832 DM-49 13515 M1V 4.67 2.42 -1.86 -3.54 3.17 -0.60 -3.38 0.01 845 EPS IND K5Ve 3.44 1.62 -0.94 -2.88 2.10 -0.92 -2.55 0.14 860A DM+56 2783 M3d 3.95 1.95 -0.85 3.33 -1.00 3.82 -0.00 0.00 860B DO CEP M4de 3.95 1.95 -0.85 3.33 -1.00 3.82 -0.00 0.00 866 L 789-6 M7de 3.28 2.95 -1.13 -0.88 1.22 1.31 -2.75 0.00 873 DM+43 4305 M4de 5.13 3.49 -1.19 3.57 -0.92 4.91 -1.16 0.00 876 DM-15 6290 M5d 4.78 4.42 -1.38 -1.20 1.49 1.91 -4.13 0.00 880 DM+15 4733 M2de 6.85 6.30 -1.86 1.92 0.27 5.38 -4.24 0.01 881 ALF PSA A3V 6.71 5.59 -1.63 -3.34 2.66 1.00 -6.08 14.06 887 DM-36 15693 M2Ve 3.58 2.80 -0.72 -2.11 1.46 0.13 -3.27 0.01 892 DM+56 2966 K3V 6.80 3.63 -0.79 5.70 -2.31 6.39 -0.38 0.25 896A DM+19 5116 M4de 6.45 6.02 -0.81 2.17 -0.75 4.95 -4.07 0.00 896B M6de 6.45 6.02 -0.81 2.17 -0.75 4.95 -4.07 0.00 905 ROSS 248 M6de 3.14 2.26 -0.20 2.18 -1.03 2.83 -0.92 0.00 908 DM+01 4774 M2Ve 5.71 5.70 -0.33 0.21 -0.19 3.12 -4.78 0.01 gnuplot-4.6.4/demo/mouselab_2.dem0000644000471100001440000000214310454527542013604 0ustar # # $Id: mouselab_2.dem,v 1.1 2006/07/10 19:49:54 sfeam Exp $ # # Wait for keystroke in plot window # pause mouse key # # Add new printable character to label # if (31 < MOUSE_KEY && MOUSE_KEY < 127) \ LABEL = LABEL.MOUSE_CHAR # # Add newline to label if input character was # if (MOUSE_KEY == 13) \ LABEL = LABEL."\n" # # Delete previous character from label on or # if (MOUSE_KEY == 8 || MOUSE_KEY == 127) \ LABEL = LABEL[1:strlen(LABEL)-1] # # Allow arrow keys to tweak label position # The GP_Up GP_Right GP_Down GP_Left (1008-1011) are defined in mousecmn.h # if (MOUSE_KEY == 1009) LABEL_Y = LABEL_Y + (GPVAL_Y_MAX-GPVAL_Y_MIN)/100. if (MOUSE_KEY == 1010) LABEL_X = LABEL_X + (GPVAL_X_MAX-GPVAL_X_MIN)/100. if (MOUSE_KEY == 1011) LABEL_Y = LABEL_Y - (GPVAL_Y_MAX-GPVAL_Y_MIN)/100. if (MOUSE_KEY == 1008) LABEL_X = LABEL_X - (GPVAL_X_MAX-GPVAL_X_MIN)/100. # # Update label # set label LID LABEL at LABEL_X, LABEL_Y replot # # DEBUG feedback # print "<",MOUSE_KEY,">" # # Return to caller on or , otherwise loop # if (MOUSE_KEY != 27 && MOUSE_CHAR ne " ") reread gnuplot-4.6.4/demo/clip14in.dat0000644000471100001440000000011607426331406013175 0ustar # demo for set pm3d [clip1in | clip4in] 0 1 1 1 1 2 2 1 3 0 2 1 1 2 2 2 2 3 gnuplot-4.6.4/demo/glass.dat0000644000471100001440000002063206515203631012664 0ustar # # $Id: glass.dat,v 1.1.1.1 1998/04/15 19:16:41 lhecking Exp $ # # 16x16 grid Glass shape. Created Using DRAWFN3D, Gershon Elber 1990. # 0.568000 0.000000 -0.911000 0.518894 0.231026 -0.911000 0.380066 0.422106 -0.911000 0.175522 0.540200 -0.911000 -0.059372 0.564888 -0.911000 -0.284000 0.491902 -0.911000 -0.459522 0.333862 -0.911000 -0.555588 0.118094 -0.911000 -0.555588 -0.118094 -0.911000 -0.459522 -0.333862 -0.911000 -0.284000 -0.491902 -0.911000 -0.059372 -0.564888 -0.911000 0.175522 -0.540200 -0.911000 0.380066 -0.422106 -0.911000 0.518894 -0.231027 -0.911000 0.568000 -0.000000 -0.911000 0.341741 0.000000 -0.905215 0.312196 0.138999 -0.905215 0.228669 0.253963 -0.905215 0.105604 0.325015 -0.905215 -0.035722 0.339869 -0.905215 -0.170870 0.295956 -0.905215 -0.276474 0.200870 -0.905215 -0.334273 0.071052 -0.905215 -0.334273 -0.071052 -0.905215 -0.276474 -0.200870 -0.905215 -0.170871 -0.295956 -0.905215 -0.035722 -0.339869 -0.905215 0.105604 -0.325015 -0.905215 0.228669 -0.253963 -0.905215 0.312196 -0.138999 -0.905215 0.341741 -0.000000 -0.905215 0.212153 0.000000 -0.863178 0.193812 0.086290 -0.863178 0.141958 0.157661 -0.863178 0.065559 0.201770 -0.863178 -0.022176 0.210991 -0.863178 -0.106077 0.183730 -0.863178 -0.171636 0.124701 -0.863178 -0.207517 0.044109 -0.863178 -0.207517 -0.044109 -0.863178 -0.171636 -0.124701 -0.863178 -0.106077 -0.183730 -0.863178 -0.022176 -0.210991 -0.863178 0.065559 -0.201770 -0.863178 0.141958 -0.157661 -0.863178 0.193812 -0.086291 -0.863178 0.212153 -0.000000 -0.863178 0.138097 0.000000 -0.764660 0.126157 0.056169 -0.764660 0.092405 0.102626 -0.764660 0.042674 0.131338 -0.764660 -0.014435 0.137340 -0.764660 -0.069048 0.119595 -0.764660 -0.111722 0.081171 -0.764660 -0.135079 0.028712 -0.764660 -0.135079 -0.028712 -0.764660 -0.111722 -0.081171 -0.764660 -0.069048 -0.119595 -0.764660 -0.014435 -0.137340 -0.764660 0.042674 -0.131338 -0.764660 0.092405 -0.102626 -0.764660 0.126157 -0.056169 -0.764660 0.138097 -0.000000 -0.764660 0.098588 0.000000 -0.618872 0.090065 0.040099 -0.618872 0.065968 0.073265 -0.618872 0.030465 0.093763 -0.618872 -0.010305 0.098048 -0.618872 -0.049294 0.085380 -0.618872 -0.079760 0.057949 -0.618872 -0.096434 0.020498 -0.618872 -0.096434 -0.020498 -0.618872 -0.079760 -0.057949 -0.618872 -0.049294 -0.085380 -0.618872 -0.010305 -0.098048 -0.618872 0.030465 -0.093763 -0.618872 0.065968 -0.073265 -0.618872 0.090065 -0.040099 -0.618872 0.098588 -0.000000 -0.618872 0.084164 0.000000 -0.452254 0.076887 0.034232 -0.452254 0.056317 0.062546 -0.452254 0.026008 0.080044 -0.452254 -0.008798 0.083703 -0.452254 -0.042082 0.072888 -0.452254 -0.068090 0.049470 -0.452254 -0.082325 0.017499 -0.452254 -0.082325 -0.017499 -0.452254 -0.068090 -0.049470 -0.452254 -0.042082 -0.072888 -0.452254 -0.008798 -0.083703 -0.452254 0.026008 -0.080045 -0.452254 0.056317 -0.062546 -0.452254 0.076887 -0.034233 -0.452254 0.084164 -0.000000 -0.452254 0.092386 0.000000 -0.291706 0.084399 0.037577 -0.291706 0.061819 0.068656 -0.291706 0.028549 0.087865 -0.291706 -0.009657 0.091880 -0.291706 -0.046193 0.080009 -0.291706 -0.074742 0.054303 -0.291706 -0.090368 0.019208 -0.291706 -0.090368 -0.019208 -0.291706 -0.074742 -0.054303 -0.291706 -0.046193 -0.080009 -0.291706 -0.009657 -0.091880 -0.291706 0.028549 -0.087865 -0.291706 0.061819 -0.068656 -0.291706 0.084399 -0.037577 -0.291706 0.092386 -0.000000 -0.291706 0.124988 0.000000 -0.153861 0.114183 0.050837 -0.153861 0.083634 0.092885 -0.153861 0.038624 0.118871 -0.153861 -0.013065 0.124304 -0.153861 -0.062494 0.108243 -0.153861 -0.101118 0.073466 -0.153861 -0.122257 0.025987 -0.153861 -0.122257 -0.025987 -0.153861 -0.101118 -0.073466 -0.153861 -0.062494 -0.108243 -0.153861 -0.013065 -0.124304 -0.153861 0.038624 -0.118871 -0.153861 0.083634 -0.092885 -0.153861 0.114183 -0.050837 -0.153861 0.124988 -0.000000 -0.153861 0.185015 0.000000 -0.041791 0.169020 0.075253 -0.041791 0.123799 0.137493 -0.041791 0.057173 0.175960 -0.041791 -0.019339 0.184002 -0.041791 -0.092508 0.160228 -0.041791 -0.149681 0.108749 -0.041791 -0.180972 0.038467 -0.041791 -0.180972 -0.038467 -0.041791 -0.149681 -0.108749 -0.041791 -0.092508 -0.160228 -0.041791 -0.019339 -0.184002 -0.041791 0.057173 -0.175960 -0.041791 0.123799 -0.137493 -0.041791 0.169020 -0.075253 -0.041791 0.185015 -0.000000 -0.041791 0.273264 0.000000 0.053395 0.249639 0.111146 0.053395 0.182849 0.203075 0.053395 0.084443 0.259889 0.053395 -0.028564 0.271767 0.053395 -0.136632 0.236653 0.053395 -0.221075 0.160620 0.053395 -0.267292 0.056815 0.053395 -0.267292 -0.056815 0.053395 -0.221075 -0.160620 0.053395 -0.136632 -0.236653 0.053395 -0.028564 -0.271767 0.053395 0.084443 -0.259889 0.053395 0.182849 -0.203075 0.053395 0.249639 -0.111146 0.053395 0.273264 -0.000000 0.053395 0.384384 0.000000 0.149114 0.351152 0.156343 0.149114 0.257203 0.285653 0.149114 0.118781 0.365570 0.149114 -0.040179 0.382278 0.149114 -0.192192 0.332886 0.149114 -0.310973 0.225935 0.149114 -0.375984 0.079918 0.149114 -0.375984 -0.079918 0.149114 -0.310973 -0.225935 0.149114 -0.192192 -0.332886 0.149114 -0.040179 -0.382278 0.149114 0.118781 -0.365571 0.149114 0.257203 -0.285653 0.149114 0.351152 -0.156343 0.149114 0.384384 -0.000000 0.149114 0.504089 0.000000 0.267473 0.460508 0.205031 0.267473 0.337301 0.374611 0.267473 0.155772 0.479417 0.267473 -0.052692 0.501327 0.267473 -0.252044 0.436554 0.267473 -0.407816 0.296296 0.267473 -0.493073 0.104806 0.267473 -0.493073 -0.104806 0.267473 -0.407816 -0.296296 0.267473 -0.252044 -0.436554 0.267473 -0.052692 -0.501327 0.267473 0.155772 -0.479417 0.267473 0.337301 -0.374611 0.267473 0.460508 -0.205031 0.267473 0.504089 -0.000000 0.267473 0.609609 0.000000 0.430046 0.556906 0.247950 0.430046 0.407908 0.453028 0.430046 0.188380 0.579773 0.430046 -0.063721 0.606270 0.430046 -0.304805 0.527937 0.430046 -0.493184 0.358319 0.430046 -0.596288 0.126745 0.430046 -0.596288 -0.126745 0.430046 -0.493184 -0.358319 0.430046 -0.304805 -0.527937 0.430046 -0.063722 -0.606270 0.430046 0.188380 -0.579773 0.430046 0.407908 -0.453028 0.430046 0.556906 -0.247951 0.430046 0.609609 -0.000000 0.430046 0.675154 0.000000 0.647779 0.616784 0.274610 0.647779 0.451766 0.501737 0.647779 0.208634 0.642110 0.647779 -0.070573 0.671455 0.647779 -0.337577 0.584700 0.647779 -0.546211 0.396846 0.647779 -0.660400 0.140372 0.647779 -0.660400 -0.140372 0.647779 -0.546211 -0.396845 0.647779 -0.337577 -0.584700 0.647779 -0.070573 -0.671455 0.647779 0.208634 -0.642110 0.647779 0.451766 -0.501737 0.647779 0.616784 -0.274610 0.647779 0.675154 -0.000000 0.647779 0.681825 0.000000 0.900691 0.622878 0.277323 0.900691 0.456230 0.506695 0.900691 0.210696 0.648454 0.900691 -0.071270 0.678090 0.900691 -0.340913 0.590478 0.900691 -0.551608 0.400767 0.900691 -0.666926 0.141760 0.900691 -0.666926 -0.141759 0.900691 -0.551608 -0.400767 0.900691 -0.340913 -0.590478 0.900691 -0.071270 -0.678090 0.900691 0.210695 -0.648454 0.900691 0.456230 -0.506695 0.900691 0.622878 -0.277324 0.900691 0.681825 -0.000000 0.900691 0.626000 0.000000 1.101000 0.571879 0.254617 1.101000 0.418876 0.465209 1.101000 0.193445 0.595361 1.101000 -0.065435 0.622571 1.101000 -0.313000 0.542132 1.101000 -0.506445 0.367954 1.101000 -0.612320 0.130153 1.101000 -0.612320 -0.130153 1.101000 -0.506445 -0.367953 1.101000 -0.313000 -0.542132 1.101000 -0.065435 -0.622571 1.101000 0.193444 -0.595361 1.101000 0.418876 -0.465209 1.101000 0.571879 -0.254617 1.101000 0.626000 -0.000000 1.101000 gnuplot-4.6.4/demo/datastrings.dem0000644000471100001440000000700211226745254014076 0ustar # # Demonstrate features of datastrings patch # Ethan A Merritt # 08-Mar-2003 # reset # # Illustrate reading plot labels from column head in datafile # set title "Auto-labeling plots from text fields in datafile" set label 1 "Generate plot labels from first row in each column" set label 1 at graph 0.02, 0.85 tc lt 3 set label 2 "Generate x-axis labels from first column in each row" set label 2 at graph 0.02, 0.80 tc lt 3 set style data linespoints set ylabel "mm" set yrange [0:200] # set key autotitle columnhead plot 'ctg-y2.dat' using 2:xticlabel(1) index 2, \ '' using 2 index 3 # pause -1 " to plot again using x2ticlabels" # # Illustrate reading xtic axis labels from the datafile # reset set title "Read tic labels from a datafile column\nAn approximation of Hans Olav Eggestad's categoric plot patch\nusing 'using ($0):2:xticlabels(1)' and 'set style fill solid border -1'" set boxwidth 0.3 set style fill solid 1.000000 border -1 set bmargin 3 set pointsize 2 set yrange [0:180] set xrange [-0.5:11.5] set ylabel "mm" set tics scale 0.0 set grid y set xtics # set key autotitle columnhead plot 'ctg-y2.dat' using ($0-0.2):2 index 0 with boxes title "precipitation 1992-2000", \ '' using ($0+0.2):2 index 1 with boxes title " 2000-2001", \ '' using ($0):2 index 2 with linespoints lw 3 title "runoff 1992-2000", \ '' using ($0):2:xticlabels(1) index 3 with linespoints lw 3 title " 2000-2001" # pause -1 " to plot again using x2ticlabels" # set title "Same plot using x2ticlabels also" set x2tics plot 'ctg-y2.dat' using ($0-0.2):2 index 0 with boxes title "precipitation 1992-2000", \ '' using ($0+0.2):2 index 1 with boxes title " 2000-2001", \ '' using ($0):2 index 2 with linespoints lw 3 title "runoff 1992-2000", \ '' using ($0):2:x2ticlabels(1) index 3 with linespoints lw 3 title " 2000-2001" # pause -1 " to plot same data from table format" set title "Plot from table format (titles taken from column headers)" unset x2tics plot 'table.dat' using ($0-0.2):2 title column(2) with boxes, \ '' using ($0+0.2):3 title column(3) with boxes, \ '' using ($0):4 title column(4) with linespoints, \ '' using ($0):5:xtic(1) title column(5) with linespoints # pause -1 " to show double use of y values" # set title "Plot actual y-value as a label" plot 'table.dat' using 0:2:xtic(1) title columnhead with boxes, \ '' using 0:2:2 with labels center offset 0,1 notitle # pause -1 " continue" # # Now show the plot with labels options # reset set title "Read labels from a datafile column\nHere the 'plot with labels' command generates a\nC-alpha trace of retro-GCN4 peptide" set size square unset xtics unset ytics set border 3 set xlabel "X--->" set ylabel "Z--->" set key bottom right # plot 'labelplot.pdb' using 7:9 with lines notitle, \ '' using 7:9:4 with labels tc lt 3 font "Helvetica,10" notitle # '' using 7:9 with points notitle ps 5 lt -1 # pause -1 " to try a 3D version using splot" # reset set title "3D version generated by splot\n(sorry, the axis scales are distorted)" set zrange [-15:15] set view 70,210, 1.0,1.7 set ticslevel 0.0 splot 'labelplot.pdb' using 7:8:9 with lines notitle, \ '' using 7:8:9:4 with labels left offset 1,0 point \ ps 2 pt 1 tc lt 3 font "Helvetica,10" notitle # pause -1 " to view star map" # reset load "starmap.dem" # pause -1 " to end demo" gnuplot-4.6.4/demo/hemisphr.dat0000644000471100001440000001547706515203631013405 0ustar 0.687151 -0.636061 0.351070 0.641845 -0.232436 0.730759 0.273514 -0.848211 0.453572 -0.550699 0.813122 0.188582 -0.347821 0.841382 0.413639 -0.829282 -0.509933 0.228604 0.399696 0.466770 0.788903 0.736650 0.020192 0.675973 -0.274921 -0.182391 0.944008 0.222153 -0.841996 0.491621 -0.461820 -0.755197 0.465189 0.294122 0.670369 0.681247 0.261892 0.211723 0.941587 -0.554902 0.477345 0.681341 -0.316651 -0.647984 0.692711 0.940858 -0.324848 0.096228 0.455903 -0.594463 0.662394 0.144714 -0.941617 0.304000 -0.417407 0.068704 0.906119 0.227478 -0.641231 0.732855 -0.636961 -0.237343 0.733450 0.302450 -0.701212 0.645620 0.355187 0.625974 0.694261 0.126868 0.938774 0.320325 -0.198825 -0.825277 0.528571 -0.605855 0.466076 0.644758 -0.979983 0.196939 0.029143 0.730081 -0.677485 0.089423 -0.733658 -0.065519 0.676353 0.593833 -0.583880 0.553576 0.630038 -0.757773 0.169798 0.214063 0.953829 0.210682 -0.210639 0.045720 0.976494 0.502269 -0.672584 0.543467 -0.713914 -0.019685 0.699956 -0.102652 0.225742 0.968764 -0.575935 0.679368 0.454707 -0.552680 0.325656 0.767133 -0.105718 0.489948 0.865318 -0.642008 0.237217 0.729077 0.912208 -0.302322 0.276546 0.685076 0.723350 0.086233 -0.730777 -0.226034 0.644107 -0.733895 -0.430285 0.525597 0.643521 -0.710952 0.283598 0.206564 0.497907 0.842271 -0.388945 -0.813833 0.431738 0.514538 -0.817664 0.258216 0.658314 0.496308 0.565952 0.588167 0.708096 0.390716 0.552130 0.427566 0.715779 -0.705121 0.320760 0.632390 -0.689813 0.688923 0.222582 0.553844 0.711779 0.432004 -0.046413 0.212599 0.976037 0.399406 -0.766162 0.503458 -0.233463 -0.160645 0.959004 0.529336 -0.621840 0.577163 0.606825 0.629365 0.485451 0.501835 0.612707 0.610534 -0.683857 0.450334 0.574055 -0.882283 0.443548 0.157614 0.586683 0.464120 0.663623 -0.595482 0.233864 0.768576 0.237607 -0.846347 0.476696 -0.409129 0.625441 0.664407 0.664685 -0.741902 0.088182 -0.588147 -0.803628 0.090915 -0.682428 -0.728175 0.063668 0.540892 0.542901 0.642413 0.117736 -0.786009 0.606900 0.846712 -0.474373 0.240934 -0.739743 -0.661408 0.123773 -0.674807 -0.295222 0.676373 0.612938 0.564586 0.552766 -0.200352 -0.584274 0.786437 -0.583626 -0.608199 0.538028 -0.842820 -0.537921 0.017206 -0.914848 -0.365948 0.170690 -0.722029 -0.691806 0.008805 -0.749203 0.647075 0.141379 0.542856 0.713704 0.442644 0.708415 0.597082 0.376353 -0.514737 -0.622752 0.589258 0.517661 -0.651774 0.554273 0.964970 -0.229158 0.127752 -0.896947 -0.320221 0.304868 -0.806679 0.191888 0.558970 -0.449889 0.492534 0.744990 -0.121829 0.701839 0.701840 -0.136385 -0.726159 0.673864 0.141310 0.776791 0.613700 0.730240 0.567015 0.381108 -0.096403 0.876852 0.470997 -0.407930 0.721095 0.560014 -0.617285 0.119734 0.777575 -0.516675 0.784493 0.342954 -0.409966 -0.414935 0.812254 0.172975 0.141665 0.974685 -0.421979 0.745663 0.515674 -0.657963 -0.199035 0.726271 0.579425 0.685534 0.440805 -0.214461 0.856536 0.469418 0.809815 -0.403364 0.426025 -0.706903 0.588917 0.391745 0.585611 0.463666 0.664886 0.438727 0.698150 0.565779 -0.464391 -0.446944 0.764580 -0.657744 0.534413 0.530825 0.537112 -0.749640 0.386718 0.007187 -0.597134 0.802109 -0.356817 -0.675864 0.644895 0.682514 -0.090759 0.725216 -0.759950 -0.640982 0.107787 0.314462 0.320252 0.893618 0.794300 -0.091894 0.600535 0.231465 -0.737745 0.634159 -0.493894 -0.137710 0.858548 -0.636201 0.372391 0.675703 0.851855 -0.078785 0.517819 -0.252937 0.823486 0.507832 -0.501036 -0.558527 0.661068 -0.667380 -0.740968 0.074628 0.826057 -0.356650 0.436383 0.676558 0.736342 0.008355 0.356317 0.717007 0.599115 -0.702754 -0.252940 0.664950 0.241305 0.873806 0.422179 -0.444469 0.694911 0.565284 0.285538 0.893811 0.345789 -0.816376 -0.543964 0.193993 0.411338 -0.215215 0.885711 -0.685665 0.175779 0.706375 -0.370169 -0.144937 0.917588 0.415254 -0.282774 0.864640 0.342285 -0.791855 0.505773 -0.442990 -0.543366 0.713101 0.737523 0.300789 0.604637 -0.648119 0.560986 0.515012 0.832393 -0.080222 0.548349 -0.745494 -0.022420 0.666135 -0.343740 -0.929656 0.132602 0.632050 -0.340980 0.695878 -0.670904 0.696398 0.254790 -0.691893 -0.369253 0.620433 -0.644716 -0.667477 0.372578 0.511738 -0.534049 0.672990 0.542618 -0.778095 0.316437 -0.369727 -0.900054 0.230662 -0.681421 -0.572227 0.456313 0.200343 -0.968269 0.149389 -0.897349 0.345346 0.274776 -0.524090 -0.266174 0.809000 -0.863974 0.483194 0.141680 -0.549403 -0.740878 0.386336 0.206515 -0.791156 0.575694 -0.617364 0.470918 0.630157 0.964888 0.246811 0.089862 0.681090 0.695442 0.229080 -0.635200 -0.708299 0.307949 0.388299 0.158032 0.907882 0.573002 0.727986 0.376438 0.601183 -0.586111 0.543188 -0.235470 -0.811948 0.534130 0.155904 -0.681863 0.714672 -0.672889 0.588006 0.448852 0.306393 0.874114 0.376892 0.032428 0.271616 0.961859 0.107372 0.155924 0.981916 0.592487 0.224923 0.773543 -0.585302 -0.568462 0.578163 0.663301 0.728159 0.172675 -0.513634 0.781053 0.355157 0.810010 -0.386643 0.440898 -0.139469 0.655629 0.742091 0.621210 0.615790 0.484666 -0.051261 0.216594 0.974915 0.658176 -0.726097 0.198966 0.603351 0.247584 0.758070 0.686614 -0.089142 0.721537 0.226818 0.552577 0.802005 -0.741481 0.327178 0.585799 -0.366696 0.771805 0.519472 0.238979 0.647361 0.723749 -0.672754 -0.332136 0.661126 0.696711 -0.471073 0.541004 0.160743 0.905419 0.392909 -0.912978 0.232968 0.334959 -0.285567 -0.185395 0.940255 -0.619693 -0.706342 0.342142 0.382874 0.892396 0.238822 -0.381917 0.512306 0.769209 -0.652722 -0.575238 0.493006 0.240731 0.522574 0.817902 -0.047170 0.578270 0.814481 -0.769256 0.592413 0.239359 0.517803 -0.372629 0.770083 0.879867 -0.153159 0.449862 -0.408953 0.473917 0.779846 -0.611694 0.790628 0.027172 0.082968 0.088643 0.992602 0.329262 0.745222 0.579854 -0.093733 0.752980 0.651334 -0.876795 -0.216424 0.429408 0.659021 0.742999 0.116803 0.471778 -0.608160 0.638410 -0.771241 0.625579 0.117638 0.666548 0.601906 0.439799 -0.177481 -0.887762 0.424711 -0.544219 -0.682418 0.487987 -0.232865 0.617965 0.750929 -0.761795 -0.037050 0.646758 0.261925 0.847441 0.461778 -0.447484 -0.545276 0.708824 -0.005218 -0.773747 0.633474 0.216045 0.575576 0.788693 -0.018365 0.656245 0.754325 0.305420 0.594325 0.743973 -0.508168 -0.512279 0.692341 0.478855 0.493185 0.726269 0.451841 0.584772 0.673707 0.253152 -0.875528 0.411540 -0.653601 0.507497 0.561474 0.486897 0.719655 0.495003 0.497595 -0.353890 0.791935 -0.044254 -0.938949 0.341197 -0.781823 -0.038665 0.622300 -0.486930 -0.527387 0.696249 0.869944 -0.440150 0.222408 0.279697 0.693758 0.663679 0.593555 0.421221 0.685759 0.519810 -0.396648 0.756616 -0.862087 0.275232 0.425503 0.237904 -0.755351 0.610612 -0.614121 -0.664634 0.425579 0.328900 0.035730 0.943689 0.769607 0.633896 0.076682 -0.575359 -0.794269 0.195191 -0.608405 0.637947 0.472087 -0.658203 0.089686 0.747479 -0.913833 -0.389451 0.115050 0.272020 -0.871201 0.408673 -0.519856 -0.851058 0.073831 0.411266 0.672267 0.615563 0.686633 0.578928 0.439747 -0.097612 -0.192980 0.976335 -0.710703 -0.205920 0.672680 -0.622197 0.068071 0.779896 -0.296696 0.405710 0.864506 gnuplot-4.6.4/demo/arrowstyle.dem0000644000471100001440000000645211530320367013766 0ustar # # $Id: arrowstyle.dem,v 1.3 2011/02/20 23:17:11 sfeam Exp $ # # set xrange [-1000:1000] set yrange [-178:86] set tics scale 0 set style line 1 lt 1 lw 2 set style line 2 lt 3 lw 2 set style arrow 1 head filled size screen 0.025,30,45 ls 1 set style arrow 2 head nofilled size screen 0.03,15 ls 2 set style arrow 3 head filled size screen 0.03,15,45 ls 1 set style arrow 4 head filled size screen 0.03,15 ls 2 set style arrow 5 heads filled size screen 0.03,15,135 ls 1 set style arrow 6 head empty size screen 0.03,15,135 ls 2 set style arrow 7 nohead ls 1 set style arrow 8 heads size screen 0.008,90 ls 2 print ' We have defined the following arrowstyles:' show style arrow set arrow from -500,-100 to 500,-100 as 1 set arrow from -500,-110 to 500,-110 as 2 set arrow from -500,-120 to 500,-120 as 3 set arrow from -500,-130 to 500,-130 as 4 set arrow from -500,-140 to 500,-140 as 5 set arrow from -500,-150 to 500,-150 as 6 set arrow from -500,-160 to 500,-160 as 7 set arrow from -500,-170 to 500,-170 as 8 set label 'arrowstyle 1:' at -520,-100 right set label 'arrowstyle 2:' at -520,-110 right set label 'arrowstyle 3:' at -520,-120 right set label 'arrowstyle 4:' at -520,-130 right set label 'arrowstyle 5:' at -520,-140 right set label 'arrowstyle 6:' at -520,-150 right set label 'arrowstyle 7:' at -520,-160 right set label 'arrowstyle 8:' at -520,-170 right set title 'Top: plot with vectors arrowstyle 1, Bottom: explicit arrows' plot \ 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 1 pause -1 "Hit return to continue" set title 'Top: plot with vectors arrowstyle 2, Bottom: explicit arrows' plot \ 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 2 pause -1 "Hit return to continue" set title 'Top: plot with vectors arrowstyle 3, Bottom: explicit arrows' plot \ 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 3 pause -1 "Hit return to continue" set title 'Top: plot with vectors arrowstyle 4, Bottom: explicit arrows' plot \ 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 4 pause -1 "Hit return to continue" set title 'Top: plot with vectors arrowstyle 5, Bottom: explicit arrows' plot \ 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 5 pause -1 "Hit return to continue" set title 'Top: plot with vectors arrowstyle 6, Bottom: explicit arrows' plot \ 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 6 pause -1 "Hit return to continue" set title 'Top: plot with vectors arrowstyle 7, Bottom: explicit arrows' plot \ 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 7 pause -1 "Hit return to continue" set title 'Top: plot with vectors arrowstyle 8, Bottom: explicit arrows' plot \ 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 8 pause -1 "Hit return to continue" #reset # # Show plot with data style vectors # set title "Plot 'file' with vectors " set key box opaque set xrange [*:*] set yrange [*:10] set for [i=1:8] style arrow i lc i plot '1.dat' using 1:2:(+1):(+1) with vectors lt 4 filled title 'filled', \ '2.dat' using 1:2:(+1):(+1) with vectors lt 1 heads title 'double-headed', \ '2.dat' using ($1):(2-$2/3):(+1):(+2.5):(int($0)%8 + 1) with vectors as var ti 'arrowstyle variable' # pause -1 "Hi return to continue" # reset gnuplot-4.6.4/demo/controls.dem0000644000471100001440000000127607002420252013406 0ustar # # $Id: controls.dem,v 1.3 1999/10/17 19:16:58 lhecking Exp $ # # warning: this demo is SLOW on PCs without math coprocessors! # # From _Automatic_Control_Systems_, fourth ed., figure 6-14 # transient response of a second-order system to a unit step input function # damp(t) = exp(-s*wn*t)/sqrt(1.0-s*s) per(t) = sin(wn*sqrt(1.0-s**2)*t - atan(-sqrt(1.0-s**2)/s)) c(t) = 1-damp(t)*per(t) # # wn is natural undamped frequency # s is damping factor # wn = 1.0 set xrange [0:13] set samples 50 set dummy t set key box # # plot c(t) for several different damping factors s # plot s=.1,c(t),s=.3,c(t),s=.5,c(t),s=.7,c(t),s=.9,c(t),s=1.0,c(t),s=1.5,c(t),s=2.0,c(t) pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/varcolor.dem0000644000471100001440000000614211412423030013364 0ustar # # Demo/test of variable color in many different plot styles # set boxwidth 0.2 abs set bars front by3(x) = (((int(x)%3)+1)/6.) by4(x) = (((int(x)%4)+1)/7.) rgbfudge(x) = x*51*32768 + (11-x)*51*128 + int(abs(5.5-x)*510/9.) set yrange [-4:10] set xrange [0:11] unset key #below set title "variable color points, circles, candlesticks, boxes, and boxxyerror" plot 'candlesticks.dat' using 1:(1):1 with points pt 11 lc variable, \ '' using 1:2:(.1):1 with circles lc variable, \ '' using 1:3:2:6:5:1 with candlesticks lc variable, \ '' using ($1+.3):3:2:6:5:1 with financebars lc variable, \ '' using 1:(8):(by3($0)):(by4($0)):1 with boxxy lc var fs solid, \ '' using 1:(-$2/2):1 with boxes lc var pause -1 'Hit to continue' set title "variable color boxerror, xyerrorbars, impulses, vectors, and labels" plot 'candlesticks.dat' \ using 1:5:2:6:(.2):1 with boxerror lc var fs solid 0.5 border -1 , \ '' using 1:(1):1 with points pt 11 lc variable, \ '' using 1:(8):(by3($0)):(by4($0)):1 with xyerrorbars lc var, \ '' using ($1+.5):($2/2):1 with impulses lc var lw 3,\ '' using 1:(-3):(0.5):(1):1 with vectors lc var,\ '' using 1:(-1):1:1 with labels tc variable pause -1 'Hit to continue' set title "variable color using 'lc palette z'" plot 'candlesticks.dat' using 1:(1):1 with points pt 11 lc pal z, \ '' using 1:2:(.1):1 with circles lc pal z, \ '' using 1:3:2:6:5:1 with candlesticks lc pal z, \ '' using ($1+.3):3:2:6:5:1 with financebars lc pal z, \ '' using 1:(8):(by3($0)):(by4($0)):1 with boxxy lc pal z fs solid, \ '' using 1:(-$2/2):1 with boxes lc pal z pause -1 'Hit to continue' plot 'candlesticks.dat' \ using 1:5:2:6:(.2):1 with boxerror lc pal z fs solid 0.5, \ '' using 1:(1):1 with points pt 11 lc pal z, \ '' using 1:(8):(by3($0)):(by4($0)):1 with xyerrorbars lc pal z, \ '' using ($1+.5):($2/2):1 with impulses lc pal z lw 3,\ '' using 1:(-3):(0.5):(1):1 with vectors lc pal z,\ '' using 1:(-1):1:1 with labels tc pal z pause -1 'Hit to continue' set title "variable color using 'lc rgb variable'" plot 'candlesticks.dat' using 1:(1):(rgbfudge($1)) with points pt 11 lc rgb var, \ '' using 1:2:(.1):(rgbfudge($1)) with circles lc rgb var, \ '' using 1:3:2:6:5:(rgbfudge($1)) with candlesticks lc rgb var, \ '' using ($1+.3):3:2:6:5:(rgbfudge($1)) with financebars lc rgb var, \ '' using 1:(8):(by3($0)):(by4($0)):(rgbfudge($1)) with boxxy lc rgb var fs solid, \ '' using 1:(-$2/2):(rgbfudge($1)) with boxes lc rgb var pause -1 'Hit to continue' plot 'candlesticks.dat' \ using 1:5:2:6:(.2):(rgbfudge($1)) with boxerror lc rgb var fs solid 0.5 noborder, \ '' using 1:(1):(rgbfudge($1)) with points pt 11 lc rgb var, \ '' using 1:(8):(by3($0)):(by4($0)):(rgbfudge($1)) with xyerrorbars lc rgb var, \ '' using ($1+.5):($2/2):(rgbfudge($1)) with impulses lc rgb var lw 3,\ '' using 1:(-3):(0.5):(1):(rgbfudge($1)) with vectors lc rgb var,\ '' using 1:(-1):1:(rgbfudge($1)) with labels tc rgb var point pause -1 'Hit to continue' reset gnuplot-4.6.4/demo/reflect.fnc0000644000471100001440000000212506517371350013200 0ustar # # Model function for Reflectivity evaluation # mu = 1.130469005513490E-001 # (cm-1) @ 17.479 keV t0 = 0.18 # cm tb = 11.417823202820120 * 0.01745329251994 # thetaB (radians) A = mu * t0 / cos(tb) P = (1 + (cos(2.*tb))**2) / 2 Fhkl = sqrt(3.536346308456155**2 + (4.58815426260982e-4)**2) * 0.968 r0 = 2.81794092e-13 # classical electron radius lambda = 7.09338062818239e-9 # Mo K in cm V = 1.62253546981499e-23 P = (1. + (cos(2.*tb))**2) / 2. # # combine constants to avoid exponential overflow on systems with # D floating point format where exponential limits are ca. 10**(+/-38) # r0liV = r0 * lambda / V r0liV = 2.81794092*7.09338062818239/1.62253546981499e-1 # W(x) = 1./(sqrt(2.*pi)*eta) * exp( -1. * x**2 / (2.*eta**2) ) Y(tc) = tc/sin(tb) * Fhkl * r0liV f(tc)= (tanh(Y(tc)) + abs(cos(2.*tb)) * tanh(abs(Y(tc)*cos(2.*tb)))) / (Y(tc)*(1.+(cos(2.*tb))**2)) Q(tc) = (r0*Fhkl/V)**2 * (lambda**3/sin(2.*tb)) * P * f(tc) a(x) = W(x) * Q(tc) / mu # R(x) = sinh(A*a(x)) * exp(-1.*A*(1.+a(x))) gnuplot-4.6.4/demo/contours.dem0000644000471100001440000001104510447543320013423 0ustar # # $Id: contours.dem,v 1.13 2006/06/25 17:24:32 sfeam Exp $ # set samples 20 set isosamples 21 set xlabel "X axis" set ylabel "Y axis" set zlabel "Z axis" offset 1, 0 set view 60, 30, 0.85, 1.1 set title "3D gnuplot demo - contour plot" set contour splot x*y pause -1 "Hit return to continue (1)" set cntrparam levels 20 set title "3D gnuplot demo - contour plot (more contours)" replot pause -1 "Hit return to continue (2)" set cntrparam levels incr -100,10,100 set title "3D gnuplot demo - contour plot (every 10, starting at -100)" replot pause -1 "Hit return to continue (3)" set cntrparam levels disc -75,-50,0 set title "3D gnuplot demo - contour plot (at -75, -50, 0)" replot pause -1 "Hit return to continue (4)" set cntrparam levels auto 10 set title "3D gnuplot demo - contour plot on base grid" set contour base splot x**2-y**2 pause -1 "Hit return to continue (5)" set title "3D gnuplot demo - contour plot on surface" set contour surface replot pause -1 "Hit return to continue (6)" set title "3D gnuplot demo - contour plot on both" set contour both replot pause -1 "Hit return to continue (7)" set contour base set title "3D gnuplot demo - 2 surfaces" splot x**2*y**3, x**3*y**2 pause -1 "Hit return to continue (8)" set title "3D gnuplot demo - some more interesting contours" splot x*y / (x**2 + y**2 + 0.1) pause -1 "Hit return to continue (9)" splot [x=-3:3] [y=-3:3] sin(x) * cos(y) pause -1 "Hit return to continue (10)" set zrange [-1.0:1.0] replot pause -1 "Hit return to continue (11)" set samples 6 set isosamples 6 set cntrparam levels 5 set title "3D gnuplot demo - low resolution (6x6)" replot pause -1 "Hit return to continue (12)" set cntrparam bspline set title "3D gnuplot demo - low resolution (6x6) using bspline approx." replot pause -1 "Hit return to continue (13)" set cntrparam order 8 set title "3D gnuplot demo - low resolution (6x6) raise bspline order." replot pause -1 "Hit return to continue (14)" set cntrparam linear set auto set title "3D gnuplot demo - low resolution (6x6) using linear contours." splot x*y pause -1 "Hit return to continue (15)" set cntrparam order 4 set cntrparam bspline set title "3D gnuplot demo - low resolution (6x6) using bspline approx." replot pause -1 "Hit return to continue (16)" set samples 25 set isosamples 26 set title "3D gnuplot demo - contour of Sinc function" splot [-5:5.01] [-5:5.01] sin(sqrt(x**2+y**2)) / sqrt(x**2+y**2) pause -1 "Hit return to continue (17)" splot [-12:12.01] [-12:12.01] sin(sqrt(x**2+y**2)) / sqrt(x**2+y**2) pause -1 "Hit return to continue (18)" set cntrparam levels 10 set auto set zrange [-1.0:1.0] set style data lines set title "3D gnuplot demo - contour of data grid plotting" set parametric splot "glass.dat" pause -1 "Hit return to continue (19)" set xrange [0:15] set yrange [0:15] set zrange [-1.2:1.2] unset parametric splot "glass.dat" using 1 pause -1 "Hit return to continue (20)" set view map unset surface set title "3D gnuplot demo - 2D contour projection of last plot" replot pause -1 "Hit return to continue (21)" #From: shen@athena.cs.uga.edu (Mingzuo Shen) #Subject: Rosenbrock's function: some answers and thanks #Date: Wed, 23 Jun 1993 20:50:36 GMT # # Last night I asked for help with a contour plot for the function: # # (1-x)**2 + 100 * (y - x**2)**2 # #which should have a minimum at (x=1,y=1). This is the 2D case of a more #general function named after Rosenbrock (the book I am reading does not #give a reference to any paper/book by this person): # # for even integer n, # # f(x) = \sum_{j=1,3,5,\ldots,n} [(1 - x_j)^2 + 100(x_{j+1} - x_j^2)^2] # #where x is a vector (x1, x2, ..., x_n). This function also have a minimum #at (1,1,...,1), which lies at the base of a "banana-shaped valley". #Here are the new commands I have tried. # set auto set surface unset contour set cntrparam levels 5 set cntrparam linear set samples 100 set logscale z set hidden3d set isosamples 20 set view 70,335,1,1 set xlabel "x" set ylabel "y" set title "Rosenbrock Function" splot [0.9:1.1] [0.9:1.1] (1-x)**2 + 100*(y - x**2)**2 pause -1 "Hit Return to Continue (22)" set logscale z set hidden3d set isosamples 60 set ticslevel 0. set view 20,340 #HBB: ,1,2 set xlabel "x" set ylabel "y" splot [-1.5:1.5] [-0.5:1.5] (1-x)**2 + 100*(y - x**2)**2 pause -1 "Hit Return to Continue (23)" set contour unset surface unset ztics unset zlabel set border 15 replot pause -1 "Hit Return to Continue (24)" # set title "All contours drawn in a single color" unset clabel splot [-1.5:1.5] [-0.5:1.5] (1-x)**2 + 100*(y - x**2)**2 with lines lc rgb "#007700" pause -1 "Hit Return to Continue (25)" # # Clean up: # reset gnuplot-4.6.4/demo/fit3.dat0000644000471100001440000004323311152317603012420 0ustar #octave:5> for t=[-3:2:3];for y=[0:.5:5];for x=[0:.5:5];fprintf("%f %f %f %f\n",x,y,t,.1*randn+t/(1+.5*x**2+.5*y**2));end;end;fprintf("\n\n");end 0.000000 0.000000 -3.000000 -2.963403 0.500000 0.000000 -3.000000 -2.658039 1.000000 0.000000 -3.000000 -1.993093 1.500000 0.000000 -3.000000 -1.435584 2.000000 0.000000 -3.000000 -1.016739 2.500000 0.000000 -3.000000 -0.788885 3.000000 0.000000 -3.000000 -0.571931 3.500000 0.000000 -3.000000 -0.353282 4.000000 0.000000 -3.000000 -0.454969 4.500000 0.000000 -3.000000 -0.023723 5.000000 0.000000 -3.000000 -0.376835 0.000000 0.500000 -3.000000 -2.640670 0.500000 0.500000 -3.000000 -2.538482 1.000000 0.500000 -3.000000 -1.879216 1.500000 0.500000 -3.000000 -1.282207 2.000000 0.500000 -3.000000 -0.855734 2.500000 0.500000 -3.000000 -0.722371 3.000000 0.500000 -3.000000 -0.329597 3.500000 0.500000 -3.000000 -0.436604 4.000000 0.500000 -3.000000 -0.210288 4.500000 0.500000 -3.000000 -0.196320 5.000000 0.500000 -3.000000 -0.227366 0.000000 1.000000 -3.000000 -2.132368 0.500000 1.000000 -3.000000 -1.964300 1.000000 1.000000 -3.000000 -1.407699 1.500000 1.000000 -3.000000 -1.168644 2.000000 1.000000 -3.000000 -0.847112 2.500000 1.000000 -3.000000 -0.574199 3.000000 1.000000 -3.000000 -0.601445 3.500000 1.000000 -3.000000 -0.392356 4.000000 1.000000 -3.000000 -0.108008 4.500000 1.000000 -3.000000 -0.271737 5.000000 1.000000 -3.000000 -0.198787 0.000000 1.500000 -3.000000 -1.462874 0.500000 1.500000 -3.000000 -1.192205 1.000000 1.500000 -3.000000 -1.046071 1.500000 1.500000 -3.000000 -0.906396 2.000000 1.500000 -3.000000 -0.794711 2.500000 1.500000 -3.000000 -0.459100 3.000000 1.500000 -3.000000 -0.560685 3.500000 1.500000 -3.000000 -0.328734 4.000000 1.500000 -3.000000 -0.290815 4.500000 1.500000 -3.000000 -0.172648 5.000000 1.500000 -3.000000 -0.172045 0.000000 2.000000 -3.000000 -0.766566 0.500000 2.000000 -3.000000 -1.104121 1.000000 2.000000 -3.000000 -0.788480 1.500000 2.000000 -3.000000 -0.709613 2.000000 2.000000 -3.000000 -0.706113 2.500000 2.000000 -3.000000 -0.352374 3.000000 2.000000 -3.000000 -0.402763 3.500000 2.000000 -3.000000 -0.253275 4.000000 2.000000 -3.000000 -0.332600 4.500000 2.000000 -3.000000 -0.141266 5.000000 2.000000 -3.000000 -0.301696 0.000000 2.500000 -3.000000 -0.777781 0.500000 2.500000 -3.000000 -0.697497 1.000000 2.500000 -3.000000 -0.565768 1.500000 2.500000 -3.000000 -0.489629 2.000000 2.500000 -3.000000 -0.512974 2.500000 2.500000 -3.000000 -0.498344 3.000000 2.500000 -3.000000 -0.275761 3.500000 2.500000 -3.000000 -0.325343 4.000000 2.500000 -3.000000 -0.241341 4.500000 2.500000 -3.000000 -0.078854 5.000000 2.500000 -3.000000 -0.201397 0.000000 3.000000 -3.000000 -0.596014 0.500000 3.000000 -3.000000 -0.639909 1.000000 3.000000 -3.000000 -0.613713 1.500000 3.000000 -3.000000 -0.518731 2.000000 3.000000 -3.000000 -0.489097 2.500000 3.000000 -3.000000 -0.253037 3.000000 3.000000 -3.000000 -0.226156 3.500000 3.000000 -3.000000 -0.135826 4.000000 3.000000 -3.000000 -0.332709 4.500000 3.000000 -3.000000 -0.013375 5.000000 3.000000 -3.000000 -0.267664 0.000000 3.500000 -3.000000 -0.523671 0.500000 3.500000 -3.000000 -0.421015 1.000000 3.500000 -3.000000 -0.336430 1.500000 3.500000 -3.000000 -0.464790 2.000000 3.500000 -3.000000 -0.458591 2.500000 3.500000 -3.000000 -0.268108 3.000000 3.500000 -3.000000 -0.504520 3.500000 3.500000 -3.000000 -0.269456 4.000000 3.500000 -3.000000 -0.309849 4.500000 3.500000 -3.000000 -0.121330 5.000000 3.500000 -3.000000 -0.320282 0.000000 4.000000 -3.000000 -0.245375 0.500000 4.000000 -3.000000 -0.292379 1.000000 4.000000 -3.000000 -0.506549 1.500000 4.000000 -3.000000 -0.286789 2.000000 4.000000 -3.000000 -0.257107 2.500000 4.000000 -3.000000 -0.392142 3.000000 4.000000 -3.000000 -0.268286 3.500000 4.000000 -3.000000 0.007992 4.000000 4.000000 -3.000000 -0.122936 4.500000 4.000000 -3.000000 -0.135572 5.000000 4.000000 -3.000000 -0.108377 0.000000 4.500000 -3.000000 -0.289729 0.500000 4.500000 -3.000000 -0.327870 1.000000 4.500000 -3.000000 -0.361286 1.500000 4.500000 -3.000000 -0.150156 2.000000 4.500000 -3.000000 -0.380008 2.500000 4.500000 -3.000000 -0.241290 3.000000 4.500000 -3.000000 -0.080010 3.500000 4.500000 -3.000000 -0.112164 4.000000 4.500000 -3.000000 -0.030676 4.500000 4.500000 -3.000000 -0.135249 5.000000 4.500000 -3.000000 -0.144911 0.000000 5.000000 -3.000000 -0.192009 0.500000 5.000000 -3.000000 -0.221361 1.000000 5.000000 -3.000000 -0.266895 1.500000 5.000000 -3.000000 -0.313512 2.000000 5.000000 -3.000000 -0.219877 2.500000 5.000000 -3.000000 -0.201780 3.000000 5.000000 -3.000000 -0.213994 3.500000 5.000000 -3.000000 -0.171021 4.000000 5.000000 -3.000000 -0.196320 4.500000 5.000000 -3.000000 0.015243 5.000000 5.000000 -3.000000 -0.217683 0.000000 0.000000 -1.000000 -1.067370 0.500000 0.000000 -1.000000 -0.749496 1.000000 0.000000 -1.000000 -0.819741 1.500000 0.000000 -1.000000 -0.584170 2.000000 0.000000 -1.000000 -0.472105 2.500000 0.000000 -1.000000 -0.162984 3.000000 0.000000 -1.000000 -0.248580 3.500000 0.000000 -1.000000 -0.122621 4.000000 0.000000 -1.000000 -0.115337 4.500000 0.000000 -1.000000 -0.138785 5.000000 0.000000 -1.000000 0.048822 0.000000 0.500000 -1.000000 -1.099291 0.500000 0.500000 -1.000000 -0.798771 1.000000 0.500000 -1.000000 -0.506175 1.500000 0.500000 -1.000000 -0.621815 2.000000 0.500000 -1.000000 -0.524976 2.500000 0.500000 -1.000000 -0.271257 3.000000 0.500000 -1.000000 -0.173510 3.500000 0.500000 -1.000000 -0.083145 4.000000 0.500000 -1.000000 -0.315505 4.500000 0.500000 -1.000000 -0.239191 5.000000 0.500000 -1.000000 -0.078891 0.000000 1.000000 -1.000000 -0.715798 0.500000 1.000000 -1.000000 -0.682812 1.000000 1.000000 -1.000000 -0.604237 1.500000 1.000000 -1.000000 -0.300216 2.000000 1.000000 -1.000000 -0.373282 2.500000 1.000000 -1.000000 -0.143868 3.000000 1.000000 -1.000000 -0.199995 3.500000 1.000000 -1.000000 -0.149382 4.000000 1.000000 -1.000000 0.020681 4.500000 1.000000 -1.000000 -0.104991 5.000000 1.000000 -1.000000 -0.171766 0.000000 1.500000 -1.000000 -0.214302 0.500000 1.500000 -1.000000 -0.532222 1.000000 1.500000 -1.000000 -0.370131 1.500000 1.500000 -1.000000 -0.173796 2.000000 1.500000 -1.000000 -0.330020 2.500000 1.500000 -1.000000 -0.305654 3.000000 1.500000 -1.000000 -0.209727 3.500000 1.500000 -1.000000 -0.022221 4.000000 1.500000 -1.000000 -0.094702 4.500000 1.500000 -1.000000 -0.109702 5.000000 1.500000 -1.000000 -0.111042 0.000000 2.000000 -1.000000 -0.485936 0.500000 2.000000 -1.000000 -0.225944 1.000000 2.000000 -1.000000 -0.332854 1.500000 2.000000 -1.000000 -0.265856 2.000000 2.000000 -1.000000 -0.334166 2.500000 2.000000 -1.000000 -0.173504 3.000000 2.000000 -1.000000 -0.155378 3.500000 2.000000 -1.000000 0.057350 4.000000 2.000000 -1.000000 0.000378 4.500000 2.000000 -1.000000 0.054816 5.000000 2.000000 -1.000000 0.105858 0.000000 2.500000 -1.000000 -0.264055 0.500000 2.500000 -1.000000 -0.209804 1.000000 2.500000 -1.000000 -0.167353 1.500000 2.500000 -1.000000 -0.157889 2.000000 2.500000 -1.000000 -0.116631 2.500000 2.500000 -1.000000 -0.052256 3.000000 2.500000 -1.000000 -0.168591 3.500000 2.500000 -1.000000 0.013296 4.000000 2.500000 -1.000000 0.122724 4.500000 2.500000 -1.000000 -0.003948 5.000000 2.500000 -1.000000 -0.002838 0.000000 3.000000 -1.000000 -0.207576 0.500000 3.000000 -1.000000 -0.177918 1.000000 3.000000 -1.000000 -0.177557 1.500000 3.000000 -1.000000 -0.166470 2.000000 3.000000 -1.000000 -0.087439 2.500000 3.000000 -1.000000 0.029210 3.000000 3.000000 -1.000000 -0.116513 3.500000 3.000000 -1.000000 -0.169192 4.000000 3.000000 -1.000000 -0.188181 4.500000 3.000000 -1.000000 -0.157530 5.000000 3.000000 -1.000000 0.018556 0.000000 3.500000 -1.000000 -0.125634 0.500000 3.500000 -1.000000 0.079369 1.000000 3.500000 -1.000000 -0.087933 1.500000 3.500000 -1.000000 -0.227129 2.000000 3.500000 -1.000000 -0.221165 2.500000 3.500000 -1.000000 -0.117078 3.000000 3.500000 -1.000000 -0.083710 3.500000 3.500000 -1.000000 0.013496 4.000000 3.500000 -1.000000 -0.033081 4.500000 3.500000 -1.000000 -0.090779 5.000000 3.500000 -1.000000 -0.288321 0.000000 4.000000 -1.000000 -0.246329 0.500000 4.000000 -1.000000 -0.264797 1.000000 4.000000 -1.000000 -0.152391 1.500000 4.000000 -1.000000 -0.156615 2.000000 4.000000 -1.000000 -0.029623 2.500000 4.000000 -1.000000 0.038971 3.000000 4.000000 -1.000000 0.018963 3.500000 4.000000 -1.000000 0.060000 4.000000 4.000000 -1.000000 -0.019425 4.500000 4.000000 -1.000000 0.149352 5.000000 4.000000 -1.000000 0.025133 0.000000 4.500000 -1.000000 -0.040762 0.500000 4.500000 -1.000000 -0.162657 1.000000 4.500000 -1.000000 -0.129102 1.500000 4.500000 -1.000000 -0.121937 2.000000 4.500000 -1.000000 -0.049602 2.500000 4.500000 -1.000000 -0.259255 3.000000 4.500000 -1.000000 0.158842 3.500000 4.500000 -1.000000 -0.103517 4.000000 4.500000 -1.000000 0.023978 4.500000 4.500000 -1.000000 -0.081154 5.000000 4.500000 -1.000000 0.038485 0.000000 5.000000 -1.000000 -0.045858 0.500000 5.000000 -1.000000 -0.053994 1.000000 5.000000 -1.000000 -0.125065 1.500000 5.000000 -1.000000 -0.099908 2.000000 5.000000 -1.000000 -0.250529 2.500000 5.000000 -1.000000 -0.134088 3.000000 5.000000 -1.000000 -0.131353 3.500000 5.000000 -1.000000 -0.067244 4.000000 5.000000 -1.000000 -0.071566 4.500000 5.000000 -1.000000 -0.065582 5.000000 5.000000 -1.000000 -0.073736 0.000000 0.000000 1.000000 1.047151 0.500000 0.000000 1.000000 0.830367 1.000000 0.000000 1.000000 0.590074 1.500000 0.000000 1.000000 0.449657 2.000000 0.000000 1.000000 0.379792 2.500000 0.000000 1.000000 0.238689 3.000000 0.000000 1.000000 0.017878 3.500000 0.000000 1.000000 0.059948 4.000000 0.000000 1.000000 0.057355 4.500000 0.000000 1.000000 0.109025 5.000000 0.000000 1.000000 0.095583 0.000000 0.500000 1.000000 0.977878 0.500000 0.500000 1.000000 0.885268 1.000000 0.500000 1.000000 0.719680 1.500000 0.500000 1.000000 0.322639 2.000000 0.500000 1.000000 0.442742 2.500000 0.500000 1.000000 0.063426 3.000000 0.500000 1.000000 0.059496 3.500000 0.500000 1.000000 0.048065 4.000000 0.500000 1.000000 0.097021 4.500000 0.500000 1.000000 0.223119 5.000000 0.500000 1.000000 0.217722 0.000000 1.000000 1.000000 0.606010 0.500000 1.000000 1.000000 0.397196 1.000000 1.000000 1.000000 0.517744 1.500000 1.000000 1.000000 0.457713 2.000000 1.000000 1.000000 0.105496 2.500000 1.000000 1.000000 0.271974 3.000000 1.000000 1.000000 0.080799 3.500000 1.000000 1.000000 0.014377 4.000000 1.000000 1.000000 0.219662 4.500000 1.000000 1.000000 -0.013387 5.000000 1.000000 1.000000 0.204086 0.000000 1.500000 1.000000 0.694667 0.500000 1.500000 1.000000 0.440855 1.000000 1.500000 1.000000 0.360226 1.500000 1.500000 1.000000 0.284131 2.000000 1.500000 1.000000 0.181315 2.500000 1.500000 1.000000 0.213915 3.000000 1.500000 1.000000 0.124375 3.500000 1.500000 1.000000 0.129012 4.000000 1.500000 1.000000 0.155691 4.500000 1.500000 1.000000 -0.013144 5.000000 1.500000 1.000000 0.124763 0.000000 2.000000 1.000000 0.365704 0.500000 2.000000 1.000000 0.373927 1.000000 2.000000 1.000000 0.237624 1.500000 2.000000 1.000000 0.203531 2.000000 2.000000 1.000000 0.295303 2.500000 2.000000 1.000000 0.268359 3.000000 2.000000 1.000000 0.143564 3.500000 2.000000 1.000000 0.245438 4.000000 2.000000 1.000000 0.168926 4.500000 2.000000 1.000000 0.184593 5.000000 2.000000 1.000000 -0.063435 0.000000 2.500000 1.000000 0.277962 0.500000 2.500000 1.000000 0.269137 1.000000 2.500000 1.000000 0.317408 1.500000 2.500000 1.000000 0.265081 2.000000 2.500000 1.000000 0.084888 2.500000 2.500000 1.000000 0.131465 3.000000 2.500000 1.000000 0.073895 3.500000 2.500000 1.000000 0.228949 4.000000 2.500000 1.000000 0.204947 4.500000 2.500000 1.000000 0.075769 5.000000 2.500000 1.000000 0.278828 0.000000 3.000000 1.000000 0.335135 0.500000 3.000000 1.000000 0.183862 1.000000 3.000000 1.000000 0.187378 1.500000 3.000000 1.000000 0.248647 2.000000 3.000000 1.000000 0.020156 2.500000 3.000000 1.000000 0.015550 3.000000 3.000000 1.000000 0.005472 3.500000 3.000000 1.000000 -0.000882 4.000000 3.000000 1.000000 0.146453 4.500000 3.000000 1.000000 0.114310 5.000000 3.000000 1.000000 0.062041 0.000000 3.500000 1.000000 0.054840 0.500000 3.500000 1.000000 0.063957 1.000000 3.500000 1.000000 0.202664 1.500000 3.500000 1.000000 0.289747 2.000000 3.500000 1.000000 -0.034804 2.500000 3.500000 1.000000 0.137650 3.000000 3.500000 1.000000 -0.095280 3.500000 3.500000 1.000000 0.076312 4.000000 3.500000 1.000000 -0.006766 4.500000 3.500000 1.000000 0.097481 5.000000 3.500000 1.000000 -0.082213 0.000000 4.000000 1.000000 0.128725 0.500000 4.000000 1.000000 0.231907 1.000000 4.000000 1.000000 0.154913 1.500000 4.000000 1.000000 0.166762 2.000000 4.000000 1.000000 0.031021 2.500000 4.000000 1.000000 0.038170 3.000000 4.000000 1.000000 0.036363 3.500000 4.000000 1.000000 0.063824 4.000000 4.000000 1.000000 0.279562 4.500000 4.000000 1.000000 -0.075225 5.000000 4.000000 1.000000 0.077430 0.000000 4.500000 1.000000 0.179915 0.500000 4.500000 1.000000 0.264331 1.000000 4.500000 1.000000 0.145059 1.500000 4.500000 1.000000 0.182968 2.000000 4.500000 1.000000 0.095421 2.500000 4.500000 1.000000 0.039772 3.000000 4.500000 1.000000 0.164938 3.500000 4.500000 1.000000 0.165124 4.000000 4.500000 1.000000 0.199531 4.500000 4.500000 1.000000 0.243540 5.000000 4.500000 1.000000 -0.018757 0.000000 5.000000 1.000000 0.135246 0.500000 5.000000 1.000000 0.074572 1.000000 5.000000 1.000000 0.180002 1.500000 5.000000 1.000000 0.051887 2.000000 5.000000 1.000000 0.019511 2.500000 5.000000 1.000000 0.023298 3.000000 5.000000 1.000000 0.055022 3.500000 5.000000 1.000000 -0.015528 4.000000 5.000000 1.000000 0.091981 4.500000 5.000000 1.000000 0.062222 5.000000 5.000000 1.000000 0.103998 0.000000 0.000000 3.000000 3.022067 0.500000 0.000000 3.000000 2.733479 1.000000 0.000000 3.000000 2.092962 1.500000 0.000000 3.000000 1.328717 2.000000 0.000000 3.000000 1.047199 2.500000 0.000000 3.000000 0.674899 3.000000 0.000000 3.000000 0.497082 3.500000 0.000000 3.000000 0.484921 4.000000 0.000000 3.000000 0.339341 4.500000 0.000000 3.000000 0.170920 5.000000 0.000000 3.000000 0.053448 0.000000 0.500000 3.000000 2.705243 0.500000 0.500000 3.000000 2.453057 1.000000 0.500000 3.000000 1.827057 1.500000 0.500000 3.000000 1.410648 2.000000 0.500000 3.000000 1.047478 2.500000 0.500000 3.000000 0.949232 3.000000 0.500000 3.000000 0.682308 3.500000 0.500000 3.000000 0.544459 4.000000 0.500000 3.000000 0.198828 4.500000 0.500000 3.000000 0.192285 5.000000 0.500000 3.000000 0.308760 0.000000 1.000000 3.000000 2.045079 0.500000 1.000000 3.000000 1.887498 1.000000 1.000000 3.000000 1.757683 1.500000 1.000000 3.000000 1.087951 2.000000 1.000000 3.000000 0.919913 2.500000 1.000000 3.000000 0.637950 3.000000 1.000000 3.000000 0.472177 3.500000 1.000000 3.000000 0.353864 4.000000 1.000000 3.000000 0.286138 4.500000 1.000000 3.000000 0.296768 5.000000 1.000000 3.000000 0.243093 0.000000 1.500000 3.000000 1.179182 0.500000 1.500000 3.000000 1.568926 1.000000 1.500000 3.000000 1.163861 1.500000 1.500000 3.000000 0.880139 2.000000 1.500000 3.000000 0.614766 2.500000 1.500000 3.000000 0.688599 3.000000 1.500000 3.000000 0.577438 3.500000 1.500000 3.000000 0.345874 4.000000 1.500000 3.000000 0.271637 4.500000 1.500000 3.000000 0.340271 5.000000 1.500000 3.000000 0.127383 0.000000 2.000000 3.000000 0.894981 0.500000 2.000000 3.000000 1.183889 1.000000 2.000000 3.000000 0.994819 1.500000 2.000000 3.000000 0.741891 2.000000 2.000000 3.000000 0.657798 2.500000 2.000000 3.000000 0.462197 3.000000 2.000000 3.000000 0.331314 3.500000 2.000000 3.000000 0.281552 4.000000 2.000000 3.000000 0.284906 4.500000 2.000000 3.000000 0.226259 5.000000 2.000000 3.000000 0.228800 0.000000 2.500000 3.000000 0.629414 0.500000 2.500000 3.000000 0.691745 1.000000 2.500000 3.000000 0.649924 1.500000 2.500000 3.000000 0.442096 2.000000 2.500000 3.000000 0.436253 2.500000 2.500000 3.000000 0.395837 3.000000 2.500000 3.000000 0.444537 3.500000 2.500000 3.000000 0.197811 4.000000 2.500000 3.000000 0.134816 4.500000 2.500000 3.000000 0.266954 5.000000 2.500000 3.000000 0.137010 0.000000 3.000000 3.000000 0.306620 0.500000 3.000000 3.000000 0.485265 1.000000 3.000000 3.000000 0.364971 1.500000 3.000000 3.000000 0.499379 2.000000 3.000000 3.000000 0.373021 2.500000 3.000000 3.000000 0.323554 3.000000 3.000000 3.000000 0.071738 3.500000 3.000000 3.000000 0.241292 4.000000 3.000000 3.000000 0.159616 4.500000 3.000000 3.000000 -0.054341 5.000000 3.000000 3.000000 0.051433 0.000000 3.500000 3.000000 0.447704 0.500000 3.500000 3.000000 0.521967 1.000000 3.500000 3.000000 0.414539 1.500000 3.500000 3.000000 0.156456 2.000000 3.500000 3.000000 0.450032 2.500000 3.500000 3.000000 0.214217 3.000000 3.500000 3.000000 0.179898 3.500000 3.500000 3.000000 0.184994 4.000000 3.500000 3.000000 0.248520 4.500000 3.500000 3.000000 0.228502 5.000000 3.500000 3.000000 0.061564 0.000000 4.000000 3.000000 0.385414 0.500000 4.000000 3.000000 0.379159 1.000000 4.000000 3.000000 0.482000 1.500000 4.000000 3.000000 0.257835 2.000000 4.000000 3.000000 0.193386 2.500000 4.000000 3.000000 0.338770 3.000000 4.000000 3.000000 0.119260 3.500000 4.000000 3.000000 0.083376 4.000000 4.000000 3.000000 0.261253 4.500000 4.000000 3.000000 0.221197 5.000000 4.000000 3.000000 0.013695 0.000000 4.500000 3.000000 0.395515 0.500000 4.500000 3.000000 0.080487 1.000000 4.500000 3.000000 0.155176 1.500000 4.500000 3.000000 0.216743 2.000000 4.500000 3.000000 0.074830 2.500000 4.500000 3.000000 0.246874 3.000000 4.500000 3.000000 0.227323 3.500000 4.500000 3.000000 0.145997 4.000000 4.500000 3.000000 0.101388 4.500000 4.500000 3.000000 0.238301 5.000000 4.500000 3.000000 0.185037 0.000000 5.000000 3.000000 0.182409 0.500000 5.000000 3.000000 0.152647 1.000000 5.000000 3.000000 0.085660 1.500000 5.000000 3.000000 0.322965 2.000000 5.000000 3.000000 0.174490 2.500000 5.000000 3.000000 0.231969 3.000000 5.000000 3.000000 0.152795 3.500000 5.000000 3.000000 0.039521 4.000000 5.000000 3.000000 0.117405 4.500000 5.000000 3.000000 0.030183 5.000000 5.000000 3.000000 0.203749 # # #octave:6> diary off gnuplot-4.6.4/demo/bivariat.dem0000644000471100001440000000776611615433057013372 0ustar # # $Id: bivariat.dem,v 1.9 2011/08/01 05:14:23 sfeam Exp $ # # This demo is very slow and requires unusually large stack size. # Do not attempt to run this demo under MSDOS. # # the function integral_f(x) approximates the integral of f(x) from 0 to x. # integral2_f(x,y) approximates the integral from x to y. # define f(x) to be any single variable function # # the integral is calculated using Simpson's rule as # ( f(x-delta) + 4*f(x-delta/2) + f(x) )*delta/6 # repeated x/delta times (from x down to 0) # delta = 0.2 # delta can be set to 0.025 for non-MSDOS machines # # integral_f(x) takes one variable, the upper limit. 0 is the lower limit. # calculate the integral of function f(t) from 0 to x # choose a step size no larger than delta such that an integral number of # steps will cover the range of integration. integral_f(x) = (x>0)?int1a(x,x/ceil(x/delta)):-int1b(x,-x/ceil(-x/delta)) int1a(x,d) = (x<=d*.1) ? 0 : (int1a(x-d,d)+(f(x-d)+4*f(x-d*.5)+f(x))*d/6.) int1b(x,d) = (x>=-d*.1) ? 0 : (int1b(x+d,d)+(f(x+d)+4*f(x+d*.5)+f(x))*d/6.) # # integral2_f(x,y) takes two variables; x is the lower limit, and y the upper. # calculate the integral of function f(t) from x to y integral2_f(x,y) = (xy-d*.5) ? 0 : (int2(x+d,y,d) + (f(x)+4*f(x+d*.5)+f(x+d))*d/6.) set autoscale set title "approximate the integral of functions" set samples 50 set key bottom right f(x) = exp(-x**2) plot [-5:5] f(x) title "f(x)=exp(-x**2)", \ 2/sqrt(pi)*integral_f(x) title "erf(x)=2/sqrt(pi)*integral_f(x)", \ erf(x) with points pause -1 "Hit return to continue" f(x)=cos(x) plot [-5:5] f(x) title "f(x)=cos(x)", integral_f(x) pause -1 "Hit return to continue" set title "approximate the integral of functions (upper and lower limits)" f(x)=(x-2)**2-20 plot [-10:10] f(x) title "f(x)=(x-2)**2-20", integral2_f(-5,x) pause -1 "Hit return to continue" f(x)=sin(x-1)-.75*sin(2*x-1)+(x**2)/8-5 plot [-10:10] f(x) title "f(x)=sin(x-1)-0.75*sin(2*x-1)+(x**2)/8-5", integral2_f(x,1) pause -1 "Hit return to continue" # # This definition computes the ackermann. Do not attempt to compute its # values for non integral values. In addition, do not attempt to compute # its beyond m = 3, unless you want to wait really long time. ack(m,n) = (m == 0) ? n + 1 : (n == 0) ? ack(m-1,1) : ack(m-1,ack(m,n-1)) set xrange [0:3] set yrange [0:3] set isosamples 4 set samples 4 set title "Plot of the ackermann function" splot ack(x, y) pause -1 "Hit return to continue" set xrange [-5:5] set yrange [-10:10] set isosamples 10 set samples 100 set key top right at 4,-3 set title "Min(x,y) and Max(x,y)" # min(x,y) = (x < y) ? x : y max(x,y) = (x > y) ? x : y plot sin(x), x**2, x**3, max(sin(x), min(x**2, x**3))+0.5 pause -1 "Hit return to continue" # # gcd(x,y) finds the greatest common divisor of x and y, # using Euclid's algorithm # as this is defined only for integers, first round to the nearest integer gcd(x,y) = gcd1(rnd(max(x,y)),rnd(min(x,y))) gcd1(x,y) = (y == 0) ? x : gcd1(y, x - x/y * y) rnd(x) = int(x+0.5) set samples 59 set xrange [1:59] set auto set key default set title "Greatest Common Divisor (for integers only)" plot gcd(x, 60) with impulses pause -1 "Hit return to continue" # # This definition computes the sum of the first 10, 100, 1000 fourier # coefficients of a (particular) square wave. set title "Finite summation of 10, 100, 1000 fourier coefficients" set samples 500 set xrange [-10:10] set yrange [-0.4:1.2] set key bottom right fourier(k, x) = sin(3./2*k)/k * 2./3*cos(k*x) sum10(x) = 1./2 + sum [k=1:10] fourier(k, x) sum100(x) = 1./2 + sum [k=1:100] fourier(k, x) sum1000(x) = 1./2 + sum [k=1:1000] fourier(k, x) plot \ sum10(x) title "1./2 + sum [k=1:10] sin(3./2*k)/k * 2./3*cos(k*x)", \ sum100(x) title "1./2 + sum [k=1:100] sin(3./2*k)/k * 2./3*cos(k*x)", \ sum1000(x) title "1./2 + sum [k=1:1000] sin(3./2*k)/k * 2./3*cos(k*x)" pause -1 "Hit return to continue" reset gnuplot-4.6.4/demo/sine.bin0000644000471100001440000000144410115371145012506 0ustar qa=b= (>`_>>>إ>x6>>` >w?E?z?N'?W'2?;?[@E?M?yU?]]?d?#j?Cyo?t?w?{?1r}? ???5?}?-w{?sx?ڮt?O-p?j?e?^^?_W?O?F?wX=?3?K)?|?3?Fx?k>z>>>׎>s8g>/0>r=Q=<@Žн[0 W^E zZ־ヒ O:B&N0:C"L1TY\-cQinnqxsswYz'}&~yX\;}{5}* + ,?ᾚǾoYM o7[W⤐ =ܻ==>yO>\8>z7>2>>>P?9?$?$?{>/?;9?B?yK?S?Q[?w>b?|h?n?vr?b>V>A6>t>av>?>P>*=h<趰jHG~/c ϾqqyŒ Q8.#- 7&ZAGJRFZKagyFm2rwcvy|:t~gnuplot-4.6.4/demo/sound.par0000644000471100001440000000024206515203632012711 0ustar # # Start parameters for the sound velocity fit # # HBB 970522: factored out 1e9 from c??, see hexa.fnc for details c33 = 9 c11 = 6 c44 = 1 c13 = 4 phi0 = 20.0 gnuplot-4.6.4/demo/lena-keypoints.bin0000644000471100001440000000531010757622471014523 0ustar f@0{@@e@s@@`Pq@*p@@F/[@p@@.c@w@@V@q@@a@`/n@@ f@Cm|@@@{b@>u@@@Q@y@@cYb@>Nt@@@m@ rm@@t@pp@@@u@?h@@@Ar@zf@@d@~@@ W@`cy@@d@y@@ r@@Rmd@x{@@@a@q@@`d@x@@`@Dx@@p@h@@R@Px@@b@`|@@@h@s@@o@`0e@@4y@\@@ `@`v@@Ts@q@@o@ j@@@j@o@@\N@`9>@@W@u@@Ur@*t@@ f@k@@@e@0q@@`{@ R@@T{`@T|@@\s@Fx@@byx@\@@p@@f@@@By@f@@Y@P{@@ 'd@D@@c@@)p@@ V@s@@@8z@m}@@c@P@@*fi@h@@X@@t@@Ug@m@@@^@r@@`d@u@@ w@j@@ `@z@@ۛu@Wb@@P@z@@$s@u@@o@q@@]@@@@ZTs@`RW@@tr@R@@3p@@u@@@b@h@@ l@j@@`O@Ȃv@@w@@|@@i@|@@u@o@@`m@Tf@@Z:y@Qc@@@`@@u@@@^@x@@t@ `@@ Dt@ս[@@`@@@g@t@@[@v@@5,\@$l@@@\z@~@@w@_@@"Z@@@`@P~@@p@n@@ J`@fc@@3P@ P#t@@pm@Hb@@ b@-y@@w@ ڳ@@]V@`x>w@@?h{@m|@@a@`l@@r`@Y@@ e@pv@@>Xr@qo@@j@p@@@t@d@@i@@#+a@@j@@\@@L@y@@i@@6;d@@@]@`t@@ox@N@q@@wz@@'dV@@{@ Qz@@c@m@@]j@ Cf@@8r@Ef`@@Qb@e@@@v@@T@@@}@Yy@@w@t@@ N[@%~@@gnuplot-4.6.4/demo/all.dem0000644000471100001440000001451611642177421012330 0ustar # # $Id: all.dem,v 1.44 2011/10/03 00:17:21 sfeam Exp $ # # Executes ALL demos in this directory, in functionality order. # print "******************** file simple.dem ********************" load "simple.dem" reset print "******************** file controls.dem ********************" load "controls.dem" reset print "******************** file electron.dem ********************" load "electron.dem" reset print "******************** file using.dem ********************" load "using.dem" reset print "******************** file fillstyle.dem ********************" load "fillstyle.dem" reset print "******************** file fillcvrs.dem ********************" load "fillcrvs.dem" load "fillbetween.dem" reset print "******************** file candlesticks.dem ********************" load "candlesticks.dem" reset print "******************** file autoscale.dem ********************" load "autoscale.dem" reset print "******************** file mgr.dem ********************" load "mgr.dem" reset print "******************** file fit.dem ********************" load "fit.dem" reset print "******************** file param.dem ********************" load "param.dem" reset print "******************** file polar.dem ********************" load "polar.dem" reset print "******************** file poldat.dem ********************" load "poldat.dem" reset print "******************** file multiplt.dem ********************" load "multiplt.dem" load "layout.dem" reset print "******************** file surface1.dem ********************" load "surface1.dem" reset print "******************** file discrete.dem ********************" load "discrete.dem" reset print "******************** file hidden.dem ********************" load "hidden.dem" reset print "******************** file dgrid3d.dem ********************" load "dgrid3d.dem" reset print "******************** file world.dem ********************" load "world.dem" load "world2.dem" reset print "******************** file prob.dem ********************" load "prob.dem" reset print "******************** file prob2.dem ********************" load "prob2.dem" reset print "******************** file random.dem ********************" load "random.dem" reset print "******************** file smooth.dem ********************" load "smooth.dem" reset print "******************** file spline.dem ********************" load "spline.dem" reset print "******************** file binary.dem ********************" load "binary.dem" reset print "******************** file steps.dem ********************" load "steps.dem" reset print "******************** file scatter.dem ********************" load "scatter.dem" reset print "******************** file singulr.dem ********************" load "singulr.dem" reset print "******************** file airfoil.dem ********************" load "airfoil.dem" reset print "******************** file surface2.dem ********************" load "surface2.dem" reset print "******************** file contours.dem ********************" load "contours.dem" reset print "******************** file multimsh.dem ********************" load "multimsh.dem" reset print "******************** file bivariat.dem ********************" load "bivariat.dem" reset print "******************** file timedat.dem ********************" load "timedat.dem" reset print "******************** file animate.dem ********************" load "animate.dem" reset print "********************** file rainbow.dem *********************" load "rainbow.dem" reset print "********************** file rgb_variable.dem *********************" load "rgb_variable.dem" reset print "********************** file pm3d.dem *********************" load "pm3d.dem" reset print "********************** file pm3dcolors.dem *********************" load "pm3dcolors.dem" reset print "********************** file heatmaps.dem *********************" load "heatmaps.dem" reset print "********************** file pm3dgamma.dem *********************" load "pm3dgamma.dem" reset print "********************** file hidden2.dem ***********************" load "hidden2.dem" reset print "********************** file textcolor.dem *********************" load "textcolor.dem" reset print "********************** file textrotate.dem *********************" load "textrotate.dem" reset print "********************** file enhanced_utf8.dem *********************" load "enhanced_utf8.dem" reset print "********************** file arrowstyle.dem *********************" load "arrowstyle.dem" reset print "********************** file vector.dem *********************" load "vector.dem" reset print "********************** file tics.dem *********************" load "tics.dem" reset print "********************** file datastrings.dem *********************" load "datastrings.dem" reset print "********************** file stats.dem *********************" load "stats.dem" reset print "********************** file iterate.dem *********************" load "iterate.dem" reset print "********************** file histograms.dem *********************" load "histograms.dem" load "histograms2.dem" reset print "********************** Image formats *********************" load "image.dem" load "image2.dem" load "rgbalpha.dem" reset print "********************** file stringvar.dem *********************" load "stringvar.dem" reset print "********************** file running_avg.dem *********************" load "running_avg.dem" reset print "********************** file pointsize.dem *********************" load "pointsize.dem" reset print "********************** file circles.dem *********************" load "circles.dem" reset print "********************** file ellipses_style.dem *********************" load "ellipses_style.dem" reset print "********************** file key.dem *********************" load "key.dem" reset print "********************** file borders.dem *********************" load "borders.dem" reset print "********************** file margins.dem *********************" load "margins.dem" reset print "********************** file rectangle.dem *********************" load "rectangle.dem" reset print "********************** file approximate.dem *********************" load "approximate.dem" reset print "********************** file transparent.dem *********************" load "transparent.dem" reset print "********************** file transparent_solids.dem *********************" load "transparent_solids.dem" pause 5 reset gnuplot-4.6.4/demo/binary.dem0000644000471100001440000000106007747400072013034 0ustar # # $Id: binary.dem,v 1.5 2003/10/28 05:35:54 sfeam Exp $ # set style data lines set hidden3d set title "Hidden line removal of explicit binary surfaces" set ticslevel 0 set key box set xrange [-3:3] set yrange [-2:2] splot "binary1" binary pause -1 "Hit return to continue (1)" set view 70,45 set xrange [-3:3] set yrange [-3:3] splot "binary2" binary pause -1 "Hit return to continue (2)" set title "Notice that sampling rate can change" set vi 70,10 set xrange [-3:6] set yrange [-3:6] splot "binary3" binary pause -1 "Hit return to continue (3)" reset gnuplot-4.6.4/demo/ctg-y2.dat0000644000471100001440000000110710071446526012660 0ustar MONTH "precipitation 1992-2000" mai 61 jun 57.7 jul 61.7 aug 74.9 sep 103.1 okt 66.1 nov 47.3 des 48.8 jan 55.7 feb 36.1 mar 39.1 apr 41 MONTH "precipitation 2001-2002" mai 42.2 jun 69.2 jul 68.4 aug 68.4 sep 26.1 okt 144.7 nov 166.5 des 52.9 jan 43.4 feb 22.9 mar 37.5 apr 42.1 MONTH "runoff 1992-2000" mai 15.8 jun 10.4 jul 3.2 aug 3 sep 6.6 okt 21.3 nov 17.7 des 17.3 jan 8.3 feb 1.8 mar 10.8 apr 56.1 MONTH "runoff 2001-2002" mai 5.7 jun 1.2 jul 5.7 aug 1.6 sep 1.1 okt 93.6 nov 145.9 des 51.6 jan 0.9 feb 0 mar 5.4 apr 61.7 gnuplot-4.6.4/demo/mouselabels.dem0000644000471100001440000000152710454540503014064 0ustar # # $Id: mouselabels.dem,v 1.2 2006/07/10 21:06:11 sfeam Exp $ # # Demonstrate screen interaction using mouse variables # # MOUSE_X MOUSE_Y MOUSE_KEY MOUSE_CHAR # set termoption enhanced set title "Demo interactive placement of labels using mouse feedback" set label 1 at graph 0.02, graph 0.9 set label 1 "Position mouse at desired start of label and start typing\nEnhanced text syntax may be used\nArrow keys will reposition label as you go\n or allows editing\n to terminate this label\n to terminate demo" set border 0 unset xtics unset ytics set key box plot sin(13*besj0(x))/x # # Initialize label identifier # LID = 100 # # Loop over interactive placement of new labels # load "mouselab_1.dem" show label # # All done with demo # unset label 1 set label 2 "DONE" replot pause -1 "Hit to continue" reset gnuplot-4.6.4/demo/epslatex.dem0000644000471100001440000000372710275621036013404 0ustar # # $Id: epslatex.dem,v 1.2 2005/08/08 09:13:02 mikulik Exp $ # # This file demonstrates new features in gnuplot 4.1 print "\n This file demonstrates how to use the epslatex terminal." print " It will generate two files: epslatex-inc.eps and epslatex.tex." print " \nIf the file gnuplot.cfg is found by LaTeX it will be loaded" print " and can be used for further settings, e.g., here it provides" print " the package exscale.sty which enlargens the integral sign.\n" pause -1 "Hit return to continue" # xmin=-270. xmax=270. ymin=-1.1 ymax=1.2 # reset set terminal push set terminal epslatex standalone linewidth 2 rounded \ dashlen 4 color '' 12 set output 'epslatex.tex' unset autoscale set xr [xmin:xmax] set yr [ymin:ymax] # set encoding iso_8859_1 set format x '$%g$' set format y '$%.1f$' set xtics 90 set xlabel '$x$ / ' set ylabel '$y$' set arrow from -120,0.8 to -60,0.8 lt 1 lw 2 nohead set arrow from -120,0.7 to -60,0.7 lt 2 lw 2 nohead set arrow from -120,0.6 to -60,0.6 lt 3 lw 2 nohead set arrow from -120,0.5 to -60,0.5 lt 4 lw 2 nohead set arrow from -120,0.4 to -60,0.4 lt 5 lw 2 nohead set arrow from -120,0.3 to -60,0.3 lt 6 lw 2 nohead set arrow from -120,0.2 to -60,0.2 lt 7 lw 2 nohead set arrow from -120,0.1 to -60,0.1 lt 8 lw 2 nohead set label '$\displaystyle\tan\alpha = \frac{\sin\alpha}{\cos\alpha}$' \ at 90,0 centre textcolor lt 3 set label '$\displaystyle\int x\mathrm{d}x = \frac12 x^2 + C_1$' \ at 90,-0.5 centre textcolor lt 4 plot sin(pi/180.*x) title '$y = \sin x$' w l lt 1 lw 4 set output # set terminal epslatex standalone oldstyle linewidth 2 rounded \ dashlen 1 color '' 12 set output 'epslatex-oldstyle.tex' set tics scale 2 replot set output # print "\n Now, either run" print " latex epslatex" print " dvips epslatex" print " and have a look at epslatex.ps; or run" print " epstopdf epslatex-inc.eps" print " pdflatex epslatex" print " and have a look at epslatex.pdf." print " Do the same with epslatex-oldstyle.tex." # set terminal pop reset gnuplot-4.6.4/demo/histopt.dat0000644000471100001440000000004010707513150013232 0ustar ClassA ClassB 1 7 3 4 4 2 3.5 3 gnuplot-4.6.4/demo/airfoil.dem0000644000471100001440000001133610451104661013173 0ustar # # $Id: airfoil.dem,v 1.10 2006/06/30 02:17:21 sfeam Exp $ # # This demo shows how to use bezier splines to define NACA four # series airfoils and complex variables to define Joukowski # Airfoils. It will be expanded after overplotting in implemented # to plot Coefficient of Pressure as well. # Alex Woo, Dec. 1992 # # The definitions below follows: "Bezier presentation of airfoils", # by Wolfgang Boehm, Computer Aided Geometric Design 4 (1987) pp 17-22. # # Gershon Elber, Nov. 1992 # # m = percent camber # p = percent chord with maximum camber print "NACA four series airfoils by bezier splines" print "Will add pressure distribution later with Overplotting" mm = 0.6 # NACA6xxx thick = 0.09 # nine percent NACAxx09 pp = 0.4 # NACAx4xx # Combined this implies NACA6409 airfoil # # Airfoil thickness function. # set xlabel "NACA6409 -- 9% thick, 40% max camber, 6% camber" x0 = 0.0 y0 = 0.0 x1 = 0.0 y1 = 0.18556 x2 = 0.03571 y2 = 0.34863 x3 = 0.10714 y3 = 0.48919 x4 = 0.21429 y4 = 0.58214 x5 = 0.35714 y5 = 0.55724 x6 = 0.53571 y6 = 0.44992 x7 = 0.75000 y7 = 0.30281 x8 = 1.00000 y8 = 0.01050 # # Directly defining the order 8 Bezier basis function for a faster evaluation. # bez_d4_i0(x) = (1 - x)**4 bez_d4_i1(x) = 4 * (1 - x)**3 * x bez_d4_i2(x) = 6 * (1 - x)**2 * x**2 bez_d4_i3(x) = 4 * (1 - x)**1 * x**3 bez_d4_i4(x) = x**4 bez_d8_i0(x) = (1 - x)**8 bez_d8_i1(x) = 8 * (1 - x)**7 * x bez_d8_i2(x) = 28 * (1 - x)**6 * x**2 bez_d8_i3(x) = 56 * (1 - x)**5 * x**3 bez_d8_i4(x) = 70 * (1 - x)**4 * x**4 bez_d8_i5(x) = 56 * (1 - x)**3 * x**5 bez_d8_i6(x) = 28 * (1 - x)**2 * x**6 bez_d8_i7(x) = 8 * (1 - x) * x**7 bez_d8_i8(x) = x**8 m0 = 0.0 m1 = 0.1 m2 = 0.1 m3 = 0.1 m4 = 0.0 mean_y(t) = m0 * mm * bez_d4_i0(t) + \ m1 * mm * bez_d4_i1(t) + \ m2 * mm * bez_d4_i2(t) + \ m3 * mm * bez_d4_i3(t) + \ m4 * mm * bez_d4_i4(t) p0 = 0.0 p1 = pp / 2 p2 = pp p3 = (pp + 1) / 2 p4 = 1.0 mean_x(t) = p0 * bez_d4_i0(t) + \ p1 * bez_d4_i1(t) + \ p2 * bez_d4_i2(t) + \ p3 * bez_d4_i3(t) + \ p4 * bez_d4_i4(t) z_x(x) = x0 * bez_d8_i0(x) + x1 * bez_d8_i1(x) + x2 * bez_d8_i2(x) + \ x3 * bez_d8_i3(x) + x4 * bez_d8_i4(x) + x5 * bez_d8_i5(x) + \ x6 * bez_d8_i6(x) + x7 * bez_d8_i7(x) + x8 * bez_d8_i8(x) z_y(x, tk) = \ y0 * tk * bez_d8_i0(x) + y1 * tk * bez_d8_i1(x) + y2 * tk * bez_d8_i2(x) + \ y3 * tk * bez_d8_i3(x) + y4 * tk * bez_d8_i4(x) + y5 * tk * bez_d8_i5(x) + \ y6 * tk * bez_d8_i6(x) + y7 * tk * bez_d8_i7(x) + y8 * tk * bez_d8_i8(x) # # Given t value between zero and one, the airfoild curve is defined as # # c(t) = mean(t1(t)) +/- z(t2(t)) n(t1(t)), # # where n is the unit normal to the mean line. See the above paper for more. # # Unfortunately, the parametrization of c(t) is not the same for mean(t1) # and z(t2). The mean line (and its normal) can assume linear function t1 = t, # -1 # but the thickness z_y is, in fact, a function of z_x (t). Since it is # not obvious how to compute this inverse function analytically, we instead # replace t in c(t) equation above by z_x(t) to get: # # c(z_x(t)) = mean(z_x(t)) +/- z(t) n(z_x(t)), # # and compute and display this instead. Note we also ignore n(t) and assumes # n(t) is constant in the y direction, # airfoil_y1(t, thick) = mean_y(z_x(t)) + z_y(t, thick) airfoil_y2(t, thick) = mean_y(z_x(t)) - z_y(t, thick) airfoil_y(t) = mean_y(z_x(t)) airfoil_x(t) = mean_x(z_x(t)) unset grid unset zeroaxis set parametric set xrange [-0.1:1.1] set yrange [-0.1:.7] set trange [ 0.0:1.0] set title "NACA6409 Airfoil" plot airfoil_x(t), airfoil_y(t) title "mean line" w l lt 2, \ airfoil_x(t), airfoil_y1(t, thick) title "upper surface" w l lt 1, \ airfoil_x(t), airfoil_y2(t, thick) title "lower surface" w l lt 1 pause -1 "Press Return" mm = 0.0 pp = .5 thick = .12 set title "NACA0012 Airfoil" set xlabel "12% thick, no camber -- classical test case" plot airfoil_x(t), airfoil_y(t) title "mean line" w l lt 2, \ airfoil_x(t), airfoil_y1(t, thick) title "upper surface" w l lt 1, \ airfoil_x(t), airfoil_y2(t, thick) title "lower surface" w l lt 1 pause -1 "Press Return" set title "" set xlab "" set key box set parametric set samples 100 set isosamples 10 set style data lines set style function lines print "Joukowski Airfoil using Complex Variables" set title "Joukowski Airfoil using Complex Variables" offset 0,0 set time set yrange [-.2 : 1.8] set trange [0: 2*pi] set xrange [-.6:.6] zeta(t) = -eps + (a+eps)*exp(t*{0,1}) eta(t) = zeta(t) + a*a/zeta(t) eps = 0.06 a =.250 set xlabel "eps = 0.06 real" plot real(eta(t)),imag(eta(t)) pause -1 "Press Return" eps = 0.06*{1,-1} set xlabel "eps = 0.06 + i0.06" plot real(eta(t)),imag(eta(t)) pause -1 "Press Return" reset gnuplot-4.6.4/demo/Makefile.am0000644000471100001440000001117212223337633013117 0ustar ## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign CLEANFILES = binary1 binary2 binary3 defaults.ini equipo2.tmp field2xy.tmp \ fit.log soundfit.par temp.set fontfile.ps fontfile_latex.ps epslatex-inc.eps \ epslatex-inc.pdf epslatex.aux epslatex.dvi epslatex.log epslatex.pdf \ epslatex.ps epslatex.tex random.tmp stringvar.tmp BINARY_FILES = binary1 binary2 binary3 DEMO = all.dem GNUPLOT = gnuplot all: $(BINARY_FILES) $(BINARY_FILES): ../src/bf_test @echo Creating binary data files @../src/bf_test transform = @program_transform_name@ GNUPLOT_X11 = `echo gnuplot_x11 | sed '$(transform)'`$(EXEEXT) check-prepare: @if test ! -e "$(top_builddir)/src/$(GNUPLOT_X11)"; then\ $(LN_S) gnuplot_x11 $(top_builddir)/src/$(GNUPLOT_X11); \ fi check-local: check-noninteractive check-interactive: check-prepare $(BINARY_FILES) @if test -z "$(GNUTERM)" ; then \ ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \ GNUPLOT_DRIVER_DIR=$$bdir/../src \ GNUPLOT_LIB=$(srcdir) $(GNUPLOT) $(DEMO) ); \ else \ ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \ GNUPLOT_DRIVER_DIR=$$bdir/../src \ GNUTERM=$(GNUTERM) \ GNUPLOT_LIB=$(srcdir) $(GNUPLOT) $(DEMO) ); \ fi check-noninteractive: check-prepare $(BINARY_FILES) @if test -z "$(GNUTERM)" ; then \ ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \ GNUPLOT_DRIVER_DIR=$$bdir/../src \ GNUPLOT_LIB=$(srcdir) $(GNUPLOT) $(DEMO) $@t echo EXTRA_DIST = Makefile.am.in *.bin *.cfg *.cor *.dat *.dem *.edf \ *.fnc *.inc nearmap.csv *.pdb *.png *.r3d *.rgb sound.par sound2.par \ start.par *.rot gnu-valley random-points gpdemos.tcl html | fmt | \ (tr '\012' @; echo) | sed 's/@$$/%/;s/@/ \\@/g' | tr @% '\012 ' \ >> $@t sed -n '/^##m4-files-end/,$$p' $< >> $@t chmod og-w $@t mv $@t $@ gnuplot-4.6.4/demo/random-points0000644000471100001440000005152111015602533013572 0ustar # Uniform Normal Lognormal Lognormal + shifted Normal 0.140008179890316 -0.228863039219842 1.00988918467709 1.20633841071206 0.765070278677612 1.48460698331364 0.412507464794264 0.187684396274087 0.0348403723730853 0.96947595380609 0.422231145688374 5.09994286207362 0.542818937515658 -0.297189490749675 0.238392696801206 4.06097090523893 0.344985281268018 -0.0433238328127192 0.695756027166731 0.904667322085864 0.237236083562052 -0.146273895929355 2.78173028962115 0.392802044047618 0.378316931499606 -0.407173020200831 0.123483766679408 1.40801491840608 0.394287975744567 0.828412073789389 6.60775150923432 1.59832188288928 0.252755982095496 -0.202444026083803 0.524923925681043 0.300243001102096 0.477762637478218 0.53994484641566 0.954310781782614 0.356004250084364 0.359141234088226 -0.034254658441721 1.50989013897903 4.46203819756586 0.444153732505193 0.348497739927142 0.850271396397986 5.54350984312847 0.188459851787932 -1.69962734855789 0.534458171515147 1.25027550847189 0.112425681462597 1.0787518612271 4.96202774746017 0.212195382162988 0.621757720061301 -0.80943428326856 2.58855909455805 1.43944169125726 0.993521197442572 1.07802284026194 0.32889384896546 2.36484070547496 0.208842790569941 1.13566248919941 0.785563020791827 0.754127387330165 0.110639080127851 2.4073321710741 0.436319429376356 0.591192334677945 0.513503782752818 -0.647720250346095 0.326320532250713 2.21431837950063 0.857842142189193 -0.215770235377274 0.28693612323627 1.77765627674176 0.516590824308908 -0.811145670281481 0.107013549930156 3.53284892616325 0.843170656203062 -0.497535285103909 1.38919882783066 3.67746278814233 0.830976863686477 -0.368614081736881 2.3603547245436 5.81901357283772 0.628927685999709 0.35787428066775 0.0564595390585437 0.42685765333513 0.701219763422236 -0.214795393171051 0.392660911459336 1.94809850952643 0.456853928897802 1.87654127861874 0.640414861373734 0.524621421757922 0.469353819217102 0.33622790646206 1.2952579489459 0.256208884457669 0.185800015364309 0.660180236134196 3.19903647716554 1.69187325180591 0.827748531642661 1.04389877410381 0.903069885623224 3.4008400633356 0.0612519761577332 0.559244598318915 1.20735120074164 1.37263492511239 0.308453076155163 -1.4648274703028 1.31914743652116 0.192464502021185 0.907599207547462 -2.13595873290202 0.815639185323106 0.224188281349013 0.223535039928033 -0.414434943933152 3.80453750640286 1.73570852474344 0.770844694004301 -1.6686548047704 1.59213038735751 2.92775237262762 0.501781913755211 -1.21866959170283 3.58269147027429 1.64975917740456 0.786697656321014 -0.68423532604964 0.26445978493065 0.597807597483478 0.219361434991342 0.841149167650838 0.692449146838141 1.29020364864876 0.0740585626545259 -0.390481080672317 4.28045706881604 1.51182047091625 0.0417429257874138 -0.262563540128657 0.263446656893183 0.302649086833874 0.324506180632406 -0.116123724986401 0.558655727424891 0.796586738734828 0.867081331415993 1.43198037106143 0.646473936264752 0.246251729765775 0.875802459867303 0.067187550957152 1.03392671698931 1.71810810536562 0.602449594628166 0.833224065582898 0.514437416084404 1.32814339616319 0.888969042134643 0.201769950307273 1.19492215186165 1.88817549819341 0.126950111608375 -0.290283173681029 0.849688855029023 0.795766752537435 0.117824104155902 1.64420829419602 0.0610981219104082 0.454479090811048 0.328966173325723 0.472856764882061 1.55187881620743 2.47713403649297 0.462415838290633 0.497084980699499 0.386267347083061 1.48147799946144 0.679284868174798 -0.110687321207219 0.576261004197335 8.1960892763972 0.237783178785616 0.474705522124976 0.71988217800292 2.73114577434871 0.174639528079126 0.269882382285599 0.0489908790070993 1.03485697817804 0.58455698736354 0.307732975384378 0.472094621120496 0.907206337056673 0.570659016494647 0.308250256474424 0.625306100093609 0.761927029004858 0.0542394838344102 0.800503346723475 0.18599252012219 1.02664725733198 0.205587998719411 -1.56303767483504 2.72652413070022 4.99139375686187 0.586718841861515 0.852559950149091 1.12847377121232 0.434450414992278 0.560428477188768 0.116593653452427 0.943224173957654 0.921301848772828 0.00278714962159643 1.72393161259303 2.413997713767 0.809961509129064 0.702329087861801 -0.380136214153833 1.85296021821544 0.383657597807469 0.0879320709380443 1.77614021561628 0.346782440665036 10.5191384487062 0.384502337166434 -0.527562423892654 1.51327609104992 3.23322827882187 0.691173507249797 1.11983300641668 0.977394435214763 0.473821041649802 0.413861808450079 -1.34806895515081 0.723540319557816 4.37309369278521 0.650553843144829 -1.05630462863082 6.67949815639997 1.25661418715459 0.365940177862027 -1.05599302844122 0.253290714438298 1.6436032022692 0.765856199477696 -0.499983796543462 3.10281731275434 1.63528039618566 0.938819942902632 -0.360877738553778 0.503953423997374 1.43126932970245 0.683962826680783 1.27798566077047 2.7935251850997 5.19855388109457 0.708659479504477 -0.653869759480436 0.558348811962858 1.58110586677714 0.0131116980288617 -1.54359023072283 3.44501159376716 0.328063655233677 0.511293581901097 -1.38880002617813 0.701175511124343 0.293823802097528 0.764006654704253 -0.282292944084684 3.85730606054264 0.491127334078796 0.156751104781331 -0.0303716754789326 0.978893526943463 1.2530101140724 0.327608098204568 0.252378247205124 4.65685361744249 0.636683470680499 0.975822410986249 0.387150947206416 1.25842745496711 0.300497795134513 0.702433295411445 -0.678449116241846 1.56045645735466 0.543545143456016 0.469485271678422 -0.787027536496233 0.401516252312148 0.583186823514095 0.823860107934153 -1.42708001787896 1.15943896132014 0.589195336546926 0.62822544593325 -1.45207832456496 4.410928178473 0.763760949802721 0.432211927947595 0.526269298888218 0.865978656424984 1.0227716254688 0.592777139221345 -0.862774369645092 1.56890206325529 0.502907308429449 0.812574776852902 1.59438009162124 1.57125830851795 0.4924168350476 0.778264360107701 0.825606415140399 1.02128167797315 0.819501002662492 0.112495939974745 1.87609074611445 0.966099908380392 2.17104109990028 0.888705563982936 0.658666328301639 5.27448877692914 5.4455469294781 0.770849670992336 1.47136743116684 1.53461686468414 0.424514461632749 0.940554197387354 1.24433699683134 1.66633449420785 0.775186042905981 0.914010184673064 0.372975754588308 0.198986582647219 0.765019864553361 0.596135451305431 -0.951318931189551 2.07126336931141 1.59273068140952 0.190411152404243 -0.169684012398884 2.73922478117862 0.647028483075635 0.96132991635848 -1.42183001404529 0.114731713626269 0.342301933102775 0.615271800336476 0.259621987374058 0.508866915563779 2.72394871860544 0.664879515075478 1.40734696415612 1.2270520538551 3.4724292228451 0.961275567164842 0.311349990786335 0.924037005540759 3.2058805035743 0.374511826705889 -0.667766441075251 0.589923700809031 0.394625238421816 0.514140236518309 0.859872776868053 3.32558255738138 0.405534569479596 0.0820164908521817 -0.337113887293526 1.30066023343414 3.43099430012147 0.153590525060517 -2.10038003411575 1.88505602501862 4.16282693633237 0.978158468447379 0.311146434346918 1.14802881023549 0.418895357668248 0.110437137255052 0.42747582606037 0.424819135043324 0.997639951121089 0.610794794241692 0.109163196854072 4.09452081019112 5.81185941460628 0.118956563114798 -0.447094791891437 1.30551507728602 4.11574550084608 0.0996970117437868 1.87905506182845 0.322358513714741 5.63243730081961 0.0392396041822463 0.338444955833991 0.595240328047017 0.880314907379467 0.818463190258188 -0.00603526915713019 0.31482193703693 0.636537969783093 0.345404489133219 0.899121756865147 0.960269456305663 4.98848476652728 0.746673525994294 0.16324071464205 1.44472011958605 0.886467312836975 0.241622046817967 -1.58726988861767 0.141684409554944 2.95496744662306 0.0875884939194759 -0.510662513854034 0.967457422121485 0.238071362551718 0.177799449354854 -0.140077089146618 1.01150057806725 0.784125815902255 0.949911505329645 -1.34806135778659 2.63960625463636 3.62266981254419 0.302523314354234 -0.123817743814031 1.17231907100429 1.80266470584794 0.500638647728732 -0.360686601277809 2.06086063871032 5.04444504543936 0.6788300060204 0.150298388948146 0.58977209710273 1.03394942665469 0.519120696524745 0.876926133423148 3.54364007437373 0.637594940207821 0.815121870620809 1.40429154258814 0.245693358743926 0.360720727146796 0.0138785835260896 -0.566333456434181 0.731083037412732 0.541162640304164 0.148329656854282 1.44072797504149 4.56934957161248 0.808334488004579 0.498865539861643 1.58110580158627 0.162773452895628 6.91765751887 0.131842004231443 0.761125179259945 0.243360139220533 3.69465789977572 0.278450117292004 0.819528103216382 0.69020804540297 0.42853629000705 0.908186301214544 0.254648288821577 2.18658802389255 0.630381572311415 0.270968107056007 1.59297522639278 0.163989073746829 0.246714714822949 0.689164822725118 0.0672673420952701 1.05771077446129 6.21643449582628 0.197512423521167 -0.955648861125937 1.09081658039079 4.88849673835023 0.599364329569958 -1.09981712883231 0.526562823856275 8.99252782183816 0.729251196135931 0.709632081417145 3.03251850258324 2.01904766147743 0.739530355604403 -1.23490718006784 0.699897235062084 3.82050837236907 0.0554109610197748 0.701693099320774 0.797468290654193 1.08913772344063 0.796427867233925 0.972745783682982 0.0748384533329941 2.49980356362006 0.175535478126498 0.941911725525998 0.548544332992993 0.573849045014507 0.150885980960591 0.559006634929141 1.12255489985995 0.945192596095898 0.736221391511531 0.484013835379798 2.37027149828219 4.31436604503673 0.960159473406875 -1.37639503245395 0.885555899929828 0.891374415025757 0.53550889553421 0.392331208543812 1.25094697632538 2.45707191327158 0.654650123159057 0.58428664010609 0.64633555519624 0.538780927740338 0.778894720695006 -0.4238561612697 0.124677472434059 0.359936708668343 0.975868477462242 -0.107662765947683 1.85972735272833 3.57764979813245 0.168706390233731 2.05825808987361 0.374198264600088 0.136226035148827 0.241213866743808 -0.682038483649088 2.98442191196083 1.85869977653999 0.478739694083517 -0.842185942731161 3.29548479765435 1.54401034314006 0.10436640673836 1.73050426101956 2.64620835747477 6.61426161173219 0.00828838846856403 0.714412749261041 0.707472886465293 3.14379379583432 0.330495629968182 -0.0828634315077435 0.613666149546652 4.16954709958009 0.0910567057970073 -0.487541134847534 2.90041061488812 1.48639847658083 0.0428787570654854 0.405427525473001 1.33664710232663 0.520213063276198 0.257518266276015 -1.36997437755054 2.01016043855431 4.89523296757772 0.171185019216839 0.0567065930946166 1.96878893828942 0.902801548407284 0.372985252972574 1.15544595790948 0.197120367585823 0.542892108243755 0.351982508748078 0.38899725991042 0.147733617066995 0.12032107876116 0.438427572262634 0.28762961555915 1.98143264252534 0.927079245239183 0.138086903252353 -0.148779101501479 0.132261926606821 1.23701713382734 0.339278478100277 0.307896138542658 1.49421739565106 0.710269841791873 0.264581145480926 1.44157220278285 0.964999978081316 1.40970525933942 0.422633948700449 0.0853031565061312 3.08514428274163 0.524911561402632 0.891908060671848 0.289124997188632 1.22089605490831 3.09928453339766 0.707717813158415 -0.259958818110613 2.1972763716305 0.212699728030268 0.892143112529146 0.0837818857991536 3.36022802474397 0.794779956912271 0.00268886761206842 -0.0631391020990659 0.408244790167215 3.48215037527592 0.260702442452175 0.474914017100747 0.909184445952514 0.651801124737884 0.327133637297135 0.833666675166679 2.07398261494927 0.802728996199936 0.0326420235329177 -0.977280756667891 2.2123978658978 0.546336060164567 0.299155164243741 1.19407977758174 0.36877402359029 3.10423126802091 0.529320056546575 1.87960907785599 0.988995660482934 1.25485242444618 0.429609019084259 1.04421077048892 1.73476170709738 1.8762328264219 0.603850956227319 -0.0370513590570507 0.559381432989045 1.0325035869104 0.731796448679035 -1.39177157141156 0.10673770419863 4.57188965822918 0.541679719948571 0.600861065570614 4.82309078082585 0.446812576521627 0.245637313406529 -1.41731542752249 0.709260430572101 0.678330349940482 0.994440660126254 1.27711504704547 0.23895230439056 1.17143093668224 0.949104670748998 0.718719732149707 0.402521059382798 2.5446684180389 0.701151116563867 0.474317177193401 2.48153557422217 2.2594043623393 0.325360284492199 -0.496765053343827 3.02113075600981 4.71297022632145 0.522597735477988 0.127753657314002 1.77135213547251 0.57909302404242 0.356901019968366 -0.435217994174631 0.325117903413448 2.40841025895567 0.0370604349999395 -0.898256071035537 0.592660987689453 3.39352695628297 0.406120348498332 0.507495668149377 0.284244069354927 4.67850863125592 0.212404457411905 0.866025024179707 6.59026900613365 0.363585042027633 0.480230199089072 0.603092438651521 0.707320022150972 0.584191236481966 0.33857109247639 0.280712431406826 1.20745790786084 2.4136846366723 0.58720729356288 -0.498884072759743 0.135191946741779 3.81801934216585 0.254395754832606 1.39021514202687 0.940585768883936 3.33329576176525 0.665853670610842 -0.223205016005916 1.13604638034322 3.79235146073299 0.210694567723683 1.51326023959668 0.0993767717146338 1.72681957274672 0.871066558193722 0.11969446851777 0.780619859838174 5.52389615300543 0.112307772760354 0.99816931255242 4.72583186294806 2.33085211583902 0.176221455903176 0.289819740621416 0.345185839043349 0.655944966689882 0.881872354521952 1.33289687932146 0.502137237417829 0.872634294129532 0.360268669492955 -1.86226170012309 0.447053632569478 2.32017978810663 0.422704861932394 -0.269308513547683 0.610634928356305 2.23248919469257 0.0408124548704637 1.90046982989378 0.602007599188728 0.839797182890917 0.501326044841071 1.16895232036895 0.424088550309605 2.12419425464131 0.556394734556578 0.408840355526964 0.460242893548891 0.560771031699555 0.627084215312339 0.778489436281038 9.11249240662225 0.72857730913327 0.870928416042084 -0.164775153885396 1.68805818137161 0.750633344375519 0.394606550941969 0.671112790128952 2.38460265480191 1.47869366325634 0.0552290108494768 0.769280759435085 2.11932105267204 0.616180139940143 0.991869349176481 1.32212048310798 1.3375586648665 0.295053703246651 0.62334506445766 -1.56319152486196 0.741784494584501 3.34374658528967 0.987225626555355 -0.386854667333448 2.07121535303133 0.478865034850531 0.272747668988794 -0.412078069531164 0.0860822863048721 3.44903781335714 0.182553360013774 1.38403255098119 0.845190482245541 2.17676700328343 0.579570593435085 0.801789271567956 0.320127628764381 3.72320308364663 0.795243693793059 1.10247072049853 1.04175408795363 0.858466253111385 0.920529997090367 0.0577705546347383 0.269316145492069 2.84118931270267 0.378174003746729 1.1575105756386 0.956515284702216 0.1878290654775 0.395078900075381 -0.999842885213092 0.518285917155639 2.35578767502615 0.6744840472616 -0.200325600734576 7.87901830293721 5.7679036124627 0.373823465208986 -0.323023535546491 0.548638249190676 0.354578423392328 0.956418693203288 0.194786557811957 2.12399353077581 0.948893281755269 0.755809378923754 -1.36554206630978 0.14374300463996 0.410311488633421 0.705586866463946 1.48226766797728 0.329271391914552 0.854415516923365 0.407966723049605 -2.29480539179669 0.570668105260238 0.876491902251853 0.64715906512389 -0.233842134467635 4.2330499626611 4.84186500137225 0.432974922378952 0.431046867192501 2.5454417561955 9.38291592936801 0.375558227730193 -0.470688509224409 1.80553400031432 1.04088234233421 0.272963705566672 1.76168465078818 1.84350219798131 0.431829121254295 0.71695002491621 1.59126865531511 0.229845965629858 1.27682558456345 0.664256292610329 -2.32313973880843 0.681791805547599 0.350715853702284 0.301651673224006 1.16597535652941 0.571589754197507 1.18344620573249 0.378244640375858 -0.162742087345421 2.04652589754765 1.15978783840518 0.160059399253246 -0.989767458966146 1.28498211641912 1.03471950908941 0.45020318835381 0.228903241440284 0.861606032593046 0.463435760245222 0.671001290453183 0.0645063019606587 1.26731554525424 3.18436471593603 0.884476807518177 -0.629027387817969 1.29163019230753 0.526086722656439 0.774898596045739 0.289721131350052 0.900303786579078 1.61899822793997 0.937582420974274 -2.19803992564774 0.0800324746679558 0.444201366578157 0.650301943661489 -0.360365932894032 0.186098792235288 1.26883962378155 0.874792102425047 0.389272992991875 0.750106853049869 0.274286187703351 0.553470013218444 1.48966175684108 0.374978448811069 0.539634705174488 0.173347184310905 2.40164595459668 0.481508579482621 2.3721238135327 0.786790813727872 1.61215981640638 1.58233105672978 2.30516643256142 0.421864423369279 -0.141566655178894 1.55714659034552 1.85579769654379 0.629586700589801 0.419173144698773 1.3479434732096 1.36567950858164 0.0548853486148895 -0.559403171564621 0.45140007648268 5.38521041106391 0.17792367149308 -1.71845684418577 3.03182923513649 0.539012353464284 0.3883999399906 0.526310563151318 1.66060390559305 1.68726426039271 0.937733834473126 -1.16966510499883 0.802205296556455 0.395745372899228 0.133534053503719 -0.423176617436312 0.808488970573294 2.11105553916479 0.858118335222853 -0.750695794054832 1.20180361256239 3.91189701506546 0.946061335697404 -0.400255880411936 0.509326364002115 2.68503999864261 0.511647048168815 0.23562913579562 0.47426902119476 1.16772933729736 0.693241162190912 1.83466035254807 0.636969402989523 5.38311758174183 0.825975338559553 0.409054004403662 0.495850884381227 0.425109485376499 0.673364018199938 -0.183264326198395 0.879372696433487 3.43120809328737 0.0594512499186007 -2.58506671902739 0.289957325907156 1.83535218524538 0.650316849945547 -0.317101378144747 0.420518629700761 3.64808698722627 0.0755093118261041 -0.0210413807151905 0.333452766716447 1.56768496306209 0.486817130995661 -1.91116131860704 0.814148292175807 0.324496541537666 0.789781981674707 -1.60551103465748 0.320337218080088 0.485969942559245 0.728452565576168 0.412075398887692 1.01874942723134 4.3378242159729 0.832407531214245 0.509163716839818 0.185868188378854 0.802794368356422 0.279441120919071 -0.0186876863929556 4.1710324844706 4.99738585540578 0.602123190267231 -0.0445206307342806 8.51660748675431 1.34672546092724 0.629356162853201 -1.19867279207051 0.88563953559731 3.09282710391806 0.682483700574895 -0.279577565525485 1.71943793106473 4.00639861213524 0.191186954384153 0.221971720103026 0.187275419804716 3.47693745121285 0.95498322563878 -0.328807894835742 1.21250094032226 0.488010806529634 0.913703293849146 -1.54980626317347 8.25355044926241 1.02089171357025 0.32223804406367 0.281292526859706 0.495670708832313 0.808100785648208 0.907936633645843 -1.75221385423407 0.456242847386339 1.46201690005034 0.722117719883102 1.60847803684669 0.756696955551043 1.5058784321979 0.41901053377236 0.615057946967476 5.48284320636976 1.39620706031456 0.699066614462371 -1.06275419138687 2.71786528227238 0.74980922206423 0.192141155866905 2.62217903865129 1.04440926448093 3.51852560711819 0.71592005894203 0.335732407209987 2.10674116638641 0.877462654611137 0.764351567239446 -0.69665733665621 1.08558132280943 0.339904582438268 0.769370020551818 1.01813856910054 0.947796716738934 3.41183332048474 0.0097020817104154 0.390605579136619 1.6668192421836 1.25846618309012 0.502503156062573 0.509493163942934 1.81085431954739 0.419405110135851 0.726269576108509 0.151721372234835 0.221131939658531 0.854265013429962 0.715648041027637 -1.19735393032687 1.60594193500491 4.88290488275983 0.19287969190384 0.146739049186802 0.349155473960547 1.77007839602944 0.304657313924223 0.392719100277647 0.770326584575392 0.731111889601778 0.515662291008651 -0.250047207895823 2.30166950467229 1.15033195240012 0.528309947301795 -1.9081271714695 0.974264586580664 0.680444146600084 0.0961574931505075 -0.0642629137319914 2.32871940624825 0.713537546109904 0.674417392967957 0.549326929661955 1.22770620323195 0.665997038546976 0.657585974733721 -0.745718643215061 0.367219479994972 1.41883624001278 0.162196861946365 1.04113458515896 4.24974879479345 3.36173861550212 0.350492859628002 -0.502434605735741 1.69376788673938 5.8362686070518 0.585027989804456 1.10729137724103 1.93420484053639 0.285798353190535 0.390163463151033 0.828738532715934 1.98739429611408 0.507953862606648 0.577071843226956 -0.377336801040392 2.70208608390548 10.2978435682182 0.285418860269991 1.27270975822932 1.45162487101206 5.82961944394208 0.584187263928315 -0.010032839373232 7.46774528744949 3.33212527640864 0.246162816846669 0.832363466588958 0.121802498483688 3.76142057182386 0.0874745847821886 -0.80322286456408 1.38449930501816 0.351627289560282 0.805324045686305 -0.456759040382529 0.336944347866645 4.54772104363299 0.0633540700120367 -0.527739843617001 0.578225751953407 3.59218360767598 0.67025517996945 -0.596352211438902 1.56122233121694 5.51020757831164 0.855042350328807 0.42724254694624 3.5534553346888 0.722708574001867 0.0126600689609097 -1.14534021357404 1.18605112221878 1.49454353050986 0.205749849085108 0.237218983202961 0.448224598072114 1.88766975137371 0.0819381563760076 -0.565103206416349 1.06471247421956 0.328333657028951 0.61352762680028 2.04359612014786 3.46096831252627 0.544334682104223 0.503422063677979 -0.534732055854748 2.94165219417537 2.37243523328074 0.828469358114477 0.165672358433934 0.791395030046488 3.04114180213124 0.744427146053085 0.851625625471296 0.301152998341522 0.920359379889021 0.279412191710452 1.14612238449288 1.44937188904175 3.91809638175544 gnuplot-4.6.4/demo/multimsh.dem0000644000471100001440000000207507747400072013421 0ustar # # $Id: multimsh.dem,v 1.5 2003/10/28 05:35:54 sfeam Exp $ # set parametric set hidden3d unset key set xrange [0:8] set yrange [-4:4] set zrange [-2:2] set style data line set title "Demo of multiple mesh per file capability - Digitized Blue Whale" splot "whale.dat" pause -1 "Press Return" set title "Demo of multiple mesh per file capability - Digitized Blue Whale" set xlabel "Mesh or Network 0" splot "whale.dat" index 0 pause -1 "Press Return" set autoscale z set xlabel "Mesh or Network 6" set autoscale z splot "whale.dat" index 6 using 3:2:1 pause -1 "Press Return" set zrange [-2:2] set xlabel "Mesh or Network 12" splot "whale.dat" index 12 with points pause -1 "Press Return" set xlabel "Mesh or Network 13" splot "whale.dat" i 13 pause -1 "Press Return - A Loop over Indices could be done with reread" # #file "loop" # maxmsh = 16 # ind = (ind + 1)%maxmsh # splot "whale.dat" i ind # reread "loop" set xlabel "Mesh or Network 4" splot "whale.dat" i 4 pause -1 "Press Return" set xlabel "Mesh or Network 5" splot "whale.dat" i 5 pause -1 "Press Return" reset gnuplot-4.6.4/demo/mousevariables.dem0000644000471100001440000000345110454527542014600 0ustar # # $Id: mousevariables.dem,v 1.8 2006/07/10 19:49:54 sfeam Exp $ # # Demonstrate use of user variables # MOUSE_BUTTON MOUSE_X MOUSE_Y MOUSE_X2 MOUSE_Y2 # and built-in function exists("") # reset set title "Scripted zoom using exported MOUSE variables" set samples 200 set label 3 at graph 0.1, graph 0.9 tc lt 3 set label 3 "Click on one corner of desired zoom region" plot sin(13*besj0(x))/x # pause mouse "Click on one corner of desired zoom region" # if (exists("MOUSE_BUTTON")) \ print "Mouse button ", MOUSE_BUTTON, " at ", MOUSE_X, " ", MOUSE_Y ;\ set label 1 sprintf(" Mouse button %d\n clicked here!", MOUSE_BUTTON) ;\ set label 1 at MOUSE_X, MOUSE_Y ;\ set label 1 point pt 6 ps 6 ;\ replot ;\ else \ print "No mouse click?" ;\ exit ; # BOT_X = MOUSE_X BOT_Y = MOUSE_Y set label 3 "Click on diagonal corner of desired zoom region" replot # pause mouse "Click on diagonal corner of desired zoom region" # if (exists("MOUSE_BUTTON")) \ print "Mouse button ", MOUSE_BUTTON, " at ", MOUSE_X, " ", MOUSE_Y ;\ set label 2 sprintf(" Mouse button %d\n clicked here!", MOUSE_BUTTON) ;\ set label 2 at MOUSE_X, MOUSE_Y ;\ set label 2 point pt 6 ps 6 ;\ replot ;\ else \ print "No mouse click?" ;\ exit ; # # TOP_X = MOUSE_X TOP_Y = MOUSE_Y # set label 3 "Plot will zoom in 3 seconds" replot pause 3 # set xrange [ BOT_X : TOP_X ] set yrange [ BOT_Y : TOP_Y ] set grid # unset label 1 unset label 2 unset label 3 set label 4 sprintf("zoom x range %.3f to %.3f",BOT_X,TOP_X) set label 5 sprintf("zoom y range %.3f to %.3f",TOP_X,TOP_Y) set label 4 at graph 0.1, graph 0.95 tc lt 3 set label 5 at graph 0.1, graph 0.90 tc lt 3 replot # print "Zoomed to xrange ",BOT_X," ",TOP_X print "Zoomed to yrange ",BOT_Y," ",TOP_Y # pause -1 "Type to continue" reset gnuplot-4.6.4/demo/scatter2.bin0000644000471100001440000000254410115371145013301 0ustar A?~?A A)p?AAr_?AAhM?A B'18?AHBv?ApBG>ABr>ABM>ABޓ>AB>AB/>AB?>AC>A C6<>AC>A C>A*C ?A4Ct?A>C ?AHCS?AzC_.?ACZI?AC]me?AC'1?ACc?AC h?ADA?A/D?AHDB`?HB?~?HB A`t?HBAh?HBAcZ?HB B!M?HBHB\>?HBpBr.?HBBD?HBB ?HBBio?HBB|>HBB>HBBz>HBC4>HB C>HBC>HB C??HB*C?HB4C ?HB>CΈ?HBHC1?HBzC0?HBCI?HBCSc?HBC/|?HBC h?HBC?HBDE?HB/D?HBHD-C?B?!?B Av?BAm?BAAc?B BZ?BHBrO?BpBtE?BBx;?BB1?BBB>(?BB ?BB>?BB?BCZ?B C?BCF?B Cxz?B*C?B4C ?B>Ci?BHC"?BzC7?BC}M?BC?d?BCcz?BCU?BC?BD&?B/D?B?M?B Ax?BAq?BAQj?B B8b?BHBV[?BpBZT?BB6C .?BHC[0?BzC??BCR?BCYg?BC{?BC[?gnuplot-4.6.4/demo/fit.dem0000644000471100001440000003167411272745002012341 0ustar # # $Id: fit.dem,v 1.8 2009/10/31 05:24:18 sfeam Exp $ # print "Some examples how data fitting using nonlinear least squares fit" print "can be done." print "" pause -1 "first plotting the pure data set (-> return)" reset set title 'data for first fit demo' set xlabel "Temperature T [deg Cels.]" set ylabel "Density [g/cm3]" set key below plot 'lcdemo.dat' print "now fitting a straight line to the data :-)" print "only as a demo without physical meaning" load 'line.fnc' y0 = 0.0 m = 0.0 print "fit function and initial parameters are as follows:" print GPFUN_l show variables y0 show variables m #show variables pause -1 "add fit function with all parameters set to zero (-> return)" set title 'all fit params set to 0' plot [*:*][-.1:1.2] 'lcdemo.dat', l(x) print "fit command will be: fit l(x) 'lcdemo.dat' via y0, m" pause -1 "now start fitting... (-> return)" fit l(x) 'lcdemo.dat' via y0, m pause -1 "now look at the result (-> return)" set title 'unweighted fit' plot 'lcdemo.dat', l(x) print "" print "now fit with weights from column 3 which favor low temperatures" print "command will be: fit l(x) 'lcdemo.dat' using 1:2:3 via y0, m" pause -1 " (-> return)" fit l(x) 'lcdemo.dat' using 1:2:3 via y0, m pause -1 "now look at the result (-> return)" set title 'fit weighted towards low temperatures' plot 'lcdemo.dat', l(x) print "" print "now fit with weights from column 4 instead" print "command will be: fit l(x) 'lcdemo.dat' using 1:2:4 via y0, m" pause -1 "now prefer the high temperature data (-> return)" fit l(x) 'lcdemo.dat' using 1:2:4 via y0, m pause -1 "now look at the result (-> return)" set title 'bias to high-temperates' plot 'lcdemo.dat', l(x) pause -1 "(-> return)" set title 'data with experimental errors' plot 'lcdemo.dat' using 1:2:5 with errorbars print "" print "now use these real single-measurement errors from column 5 to reach " print "such a result (look at the file lcdemo.dat and compare the columns to " print "see the difference)" print "command will be: fit l(x) 'lcdemo.dat' using 1:2:5 via y0, m" pause -1 "(-> return)" fit l(x) 'lcdemo.dat' using 1:2:5 via y0, m pause -1 "now look at the result (-> return)" set title 'fit weighted by experimental errors' plot 'lcdemo.dat' using 1:2:5 with errorbars, l(x) pause -1 "(-> return)" load 'density.fnc' set title 'initial parameters for realistic model function' plot 'lcdemo.dat', density(x) print "" print "It's time now to try a more realistic model function:" print GPFUN_density print GPFUN_curve print GPFUN_lowlin print GPFUN_high #show functions print "density(x) is a function which shall fit the whole temperature" print "range using a ?: expression. It contains 6 model parameters which" print "will all be varied. Now take the start parameters out of the" print "file 'start.par' and plot the function." print "command will be: fit density(x) 'lcdemo.dat' via 'start.par'" load 'start.par' pause -1 "(-> return)" fit density(x) 'lcdemo.dat' via 'start.par' pause -1 "now look at the result (-> return)" set title 'fitted to realistic model function' plot 'lcdemo.dat', density(x) print "" print "looks already rather nice? We will do now the following: set" print "the epsilon limit higher so that we need more iteration steps" print "to convergence. During fitting please hit ctrl-C. You will be asked" print "Stop, Continue, Execute: Try everything. You may define a script" print "using the FIT_SCRIPT environment variable. An example would be" print "'FIT_SCRIPT=plot nonsense.dat'. Normally you don't need to set" print "FIT_SCRIPT since it defaults to 'replot'. Please note that FIT_SCRIPT" print "cannot be set from inside gnuplot." print "" print "command will be: fit density(x) 'lcdemo.dat' via 'start.par'" pause -1 "(-> return)" FIT_LIMIT = 1e-10 fit density(x) 'lcdemo.dat' via 'start.par' pause -1 "now look at the result (-> return)" set title 'fit with more iterations' plot 'lcdemo.dat', density(x) pause -1 "(-> return)" FIT_LIMIT = 1e-5 print "\nNow a brief demonstration of 3d fitting." print "hemisphr.dat contains random points on a hemisphere of" print "radius 1, but we let fit figure this out for us." print "It takes many iterations, so we limit FIT_MAXITER to 50." #HBB: made this a lot harder: also fit the center of the sphere #h(x,y) = sqrt(r*r - (x-x0)**2 - (y-y0)**2) + z0 #HBB 970522: distort the function, so it won't fit exactly: h(x,y) = sqrt(r*r - (abs(x-x0))**2.2 - (abs(y-y0))**1.8) + z0 x0 = 0.1 y0 = 0.2 z0 = 0.3 r=0.5 FIT_MAXITER=50 set title 'the scattered points, and the initial parameter' splot 'hemisphr.dat' using 1:2:3, h(x,y) print "fit function will be: " . GPFUN_h print "we *must* provide 4 columns for a 3d fit. We fake errors=1" print "command will be: fit h(x,y) 'hemisphr.dat' using 1:2:3:(1) via r, x0,y0,z0" pause -1 "(-> return)" # we *must* provide 4 columns for a 3d fit. We fake errors=1 fit h(x,y) 'hemisphr.dat' using 1:2:3:(1) via r, x0, y0, z0 set title 'the scattered points, fitted curve' splot 'hemisphr.dat' using 1:2:3, h(x,y) print "\n\nNotice, however, that this would converge much faster when" print "fitted in a more appropriate co-ordinate system:" print "fit r 'hemisphr.dat' using 0:($1*$1+$2*$2+$3*$3) via r" print "where we are fitting f(x)=r to the radii calculated as the data" print "is read from the file. No x value is required in this case." pause -1 "(This is left as an excercise for the user). (-> return)" FIT_MAXITER=0 # no limit : we cannot delete the variable once set print "\n\nNow an example how to fit multi-branch functions\n" print "The model consists of two branches, the first describing longitudinal" print "sound velocity as function of propagation direction (upper data, from " print "dataset 1), the second describing transverse sound velocity (lower " print "data, from dataset 0).\n" print "The model uses these data in order to fit elastic stiffnesses" print "which occur differently in both branches." load 'hexa.fnc' load 'sound.par' set title 'sound data, and model with initial parameters' plot 'soundvel.dat', vlong(x), vtrans(x) print "" print "fit function will be: " . GPFUN_f print GPFUN_vlong print GPFUN_vtrans print "y will be the index of the dataset" print "command will be: fit f(x,y) 'soundvel.dat' using 1:-2:2:(1) via 'sound.par'" pause -1 "(-> return)" # Must provide an error estimate for a 3d fit. Use constant 1 fit f(x,y) 'soundvel.dat' using 1:-2:2:(1) via 'sound.par' #create soundfit.par, reading from sound.par and updating values update 'sound.par' 'soundfit.par' print "" pause -1 "(-> return)" set title 'pseudo-3d multi-branch fit to velocity data' plot 'soundvel.dat', vlong(x), vtrans(x) print "Look at the file 'hexa.fnc' to see how the branches are realized" print "using the data index as a pseudo-3d fit" print "" print "Next we only use every fifth data point for fitting by using the" print "'every' keyword. Look at the fitting-speed increase and at" print "fitting result." print "command will be: fit f(x,y) 'soundvel.dat' every 5 using 1:-2:2:(1) via 'sound.par'" pause -1 "(-> return)" load 'sound.par' fit f(x,y) 'soundvel.dat' every 5 using 1:-2:2:(1) via 'sound.par' set title 'fitted only every 5th data point' plot 'soundvel.dat', vlong(x), vtrans(x) print "When you compare the results (see 'fit.log') you remark that" print "the uncertainties in the fitted constants have become larger," print "the quality of the plot is only slightly affected." print "" print "By marking some parameters as '# FIXED' in the parameter file" print "you fit only the others (c44 and c13 fixed here)." print "" pause -1 "(-> return)" load 'sound2.par' set title 'initial parameters' plot 'soundvel.dat', vlong(x), vtrans(x) fit f(x,y) 'soundvel.dat' using 1:-2:2:(1) via 'sound2.par' set title 'fit with c44 and c13 fixed' plot 'soundvel.dat', vlong(x), vtrans(x) print "This has the same effect as specifying only the real free" print "parameters by the 'via' syntax." print "" print "fit f(x) 'soundvel.dat' via c33, c11, phi0" print "" pause -1 "(-> return)" load 'sound.par' set title 'initial parameters' plot 'soundvel.dat', vlong(x), vtrans(x) fit f(x,y) 'soundvel.dat' using 1:-2:2:(1) via c33, c11, phi0 set title 'fit via c33,c11,phi0' plot 'soundvel.dat', vlong(x), vtrans(x) print "Here comes an example of a very complex function..." print "" pause -1 "first plotting the pure data set (-> return)" set xlabel "Delta [degrees]" set ylabel "Reflectivity" set title 'raw data' #HBB 970522: here and below, use the error column present in moli3.dat: plot 'moli3.dat' w e print "now fitting the model function to the data" load 'reflect.fnc' #HBB 970522: Changed initial values to something sensible, i.e. # something an experienced user of fit would actually use. # FIT_LIMIT is also raised, to ensure a better fit. eta = 1.2e-4 tc = 1.8e-3 FIT_LIMIT=1e-10 #show variables #show functions pause -1 "first a plot with all parameters set to initial values (-> return)" set title 'initial parameters' plot 'moli3.dat' w e, R(x) print "fit function is: " . GPFUN_R print GPFUN_a print GPFUN_W print "command will be: fit R(x) 'moli3.dat' u 1:2:3 via eta, tc" pause -1 "now start fitting... (-> return)" fit R(x) 'moli3.dat' u 1:2:3 via eta, tc pause -1 "Hit return to continue" set title 'fitted parameters' replot #HBB 970522: added comment on result of last fit. print "Looking at the plot of the resulting fit curve, you can see" print "that this function doesn't really fit this set of data points." print "This would normally be a reason to check for measurement problems" print "not yet accounted for, and maybe even re-think the theoretic" print "prediction in use." print "" pause -1 "Hit return to continue" reset set xlabel 'x' set ylabel 'y' set zlabel 'z' set ticslevel .2 set zrange [-3:3] splot 'fit3.dat' index 0 using 1:2:4 print '' print 'Next we show a fit with three independent variables. The file' print 'fit3.dat has four columns, with values of the three independent' print 'variable x, y, and t, and the resulting value z. The data' print 'lines are in four sections, with t being constant within each' print 'section. The sections are separated by two blank lines, so we' print 'can select sections with "index" modifiers. Here are the data in' print 'the first section, where t = -3.' print '' print 'We will fit the function a0/(1 + a1*x**2 + a2*y**2) to these' print 'data. Since at this point we have two independent variables,' print 'our "using" spec has four entries, representing x:y:z:s (where' print 's is the estimated error in the z value).' print "Command will be: " print " fit a0/(1+a1*x**2+a2*y**2) 'fit3.dat' index 0 using 1:2:4:(1) via a0,a1,a2" pause -1 "(-> return)" a0=1; a1=.1; a2=.1 fit a0/(1+a1*x**2+a2*y**2) 'fit3.dat' index 0 using 1:2:4:(1) via a0,a1,a2 pause -1 "(-> return)" splot a0/(1+a1*x**2+a2*y**2), 'fit3.dat' in 0 u 1:2:4 pause -1 "(-> return)" splot a0/(1+a1*x**2+a2*y**2), 'fit3.dat' in 3 u 1:2:4 print "" print "Here is the last set of data where t = 3." print "We fit the same function to this set." print "Command will be: " print " fit a0/(1+a1*x**2+a2*y**2) 'fit3.dat' in 3 u 1:2:4:(1) via a0,a1,a2" pause -1 "(-> return)" fit a0/(1+a1*x**2+a2*y**2) 'fit3.dat' in 3 u 1:2:4:(1) via a0,a1,a2 pause -1 "(-> return)" splot a0/(1+a1*x**2+a2*y**2), 'fit3.dat' in 3 u 1:2:4 pause -1 "(-> return)" splot a0/(1+a1*x**2+a2*y**2), 'fit3.dat' u 1:2:4 print "" print "We also have data for several intermediate values of t. We" print "will fit the function f(x,y,t)=a0*t/(1+a1*x**2+a2*y**2) to all" print "the data. Since there are now three independent variables, we" print "need a using spec with five entries, representing x:y:t:z:s." print "Command will be: " print " fit f(x,y,t) 'fit3.dat' u 1:2:3:4:(1) via a0,a1,a2" pause -1 "(-> return)" f(x,y,t)=a0*t/(1+a1*x**2+a2*y**2) fit f(x,y,t) 'fit3.dat' u 1:2:3:4:(1) via a0,a1,a2 print "We plot the data in each section with the corresponding" print "function values." pause -1 "(-> return)" splot f(x,y,-3), 'fit3.dat' in 0 u 1:2:4 pause -1 "(-> return)" splot f(x,y,-1), 'fit3.dat' in 1 u 1:2:4 pause -1 "(-> return)" splot f(x,y,1), 'fit3.dat' in 2 u 1:2:4 pause -1 "(-> return)" splot f(x,y,3), 'fit3.dat' in 3 u 1:2:4 pause -1 "(-> return)" splot f(x,y,3), 'fit3.dat' in 3 u 1:2:4, \ f(x,y,1), 'fit3.dat' in 2 u 1:2:4, \ f(x,y,-1), 'fit3.dat' in 1 u 1:2:4, \ f(x,y,-3), 'fit3.dat' in 0 u 1:2:4 print 'Here are all the data together.' print '' print 'You can use ranges to rename variables and/or limit the data' print 'included in the fit. The first range corresponds to the first' print '"using" entry, etc. For example, we could have gotten the same' print 'fit like this:' print ' fit [lon=*:*][lat=*:*][time=*:*] \' print ' a0*time/(1 + a1*lon**2 + a2*lat**2) \' print ' "fit3.dat" u 1:2:3:4:(1) via a0,a1,a2' print '' print "You can have a look at all previous fit results by looking into" print "the file 'fit.log' or whatever you defined the env-variable 'FIT_LOGFILE'." print "Remember that this file will always be appended, so remove it" print "from time to time!" print "" pause -1 "Done with fitting demo (-> return)" reset gnuplot-4.6.4/demo/colorwheel.dem0000644000471100001440000000070510153431506013707 0ustar # # Set palette to HSV color wheel and define common colors as macros # This allows commands like # plot sin(x) with lines @orange # set palette mode HSV set palette defined ( 0 0 1 1, 1 1 1 1 ) set cbrange [0:1] red = "lt pal frac 0" orange = "lt pal frac 0.10" yellow = "lt pal frac 0.16" green = "lt pal frac 0.33" cyan = "lt pal frac 0.5" blue = "lt pal frac 0.66" violet = "lt pal frac 0.79" magenta = "lt pal frac 0.83" black = "lt -1" set macros gnuplot-4.6.4/configure.in0000755000471100001440000014504512212153502012447 0ustar dnl Process this file with autoconf to produce a configure script. dnl configure.in for gnuplot on Unix. dnl dnl $Id: configure.in,v 1.297.2.24 2013/09/05 19:10:58 sfeam Exp $ dnl dnl this is actually major.minor ... dnl note that for a non-beta release, we need to dnl remove the letter from VERSION AC_INIT(gnuplot, 4.6.4) AC_CONFIG_SRCDIR(src/graphics.c) AC_PREREQ(2.60) AC_CONFIG_HEADERS(config.h:config.hin) AM_INIT_AUTOMAKE(1.7.9) AM_MAINTAINER_MODE VERSION_MAJOR="`cat $srcdir/VERSION`" PATCHLEVEL="`cat $srcdir/PATCHLEVEL`" dnl configure.in body dnl Compiler characteristics dnl Check for the const and inline keywords and ANSI style stringification dnl automake 1.12 dropped support for AM_C_PROTOTYPES and ansi2knr dnl But our code still tests for #ifdef PROTOTYPES, so define it here AC_DEFINE(PROTOTYPES,1,[Automake 1.12 dropped support for building without prototypes]) AC_GNU_SOURCE AC_PROG_CC AC_PROG_CPP AC_PROG_OBJC AC_C_CONST AC_C_INLINE AC_C_STRINGIZE AC_PROG_LN_S if test "${build}" != "${host}" then CC=${CC-${host_alias-gcc}} CFLAGS=${CFLAGS-"-g -O2"} CXX=${CXX-${host_alias-c++}} CXXFLAGS=${CXXFLAGS-"-g -O2"} CC_FOR_BUILD=${CC_FOR_BUILD-gcc} else # The cross-compilation patch originally had CC_FOR_BUILD = "\$(CC)" # but that causes a recursive definition in docs/Makefile. EAM Dec 2009. CC_FOR_BUILD="${CC}" AC_PROG_CC # We must set the default linker to the linker used by gcc for the correct # operation of libtool. If LD is not defined and we are using gcc, try to # set the LD default to the ld used by gcc. if test -z "$LD" then if test "$GCC" = yes then case $build in *-*-mingw*) gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;; *) gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;; esac case $gcc_prog_ld in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] LD="$gcc_prog_ld" ;; esac fi fi CXX=${CXX-"c++"} CFLAGS=${CFLAGS-"-g -O2"} CXXFLAGS=${CXXFLAGS-"-g -O2"} fi AC_SUBST(CC_FOR_BUILD) dnl Various programs dnl X/Emacs for building lisp packages and creating .texi version of docs # If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test x"$EMACS" = xt && EMACS= AC_CHECK_PROGS(EMACS, emacs xemacs, no) AM_PATH_LISPDIR dnl Allow manual specification of tex AC_ARG_WITH(latex,[ --without-latex disable latex support, (default enable)],[],[with_latex="yes"]) if test "$with_latex" = yes; then AC_CHECK_PROGS(PLAINTEX, tex, no) AC_CHECK_PROGS(LATEX, latex latex2e, no) AC_CHECK_PROGS(PDFLATEX, pdflatex, no) test "$PLAINTEX" = "no" -o "$LATEX" = no -o "$PDFLATEX" = "no" && with_latex="no" else PLAINTEX="no" LATEX="no" PDFLATEX="no" fi AM_CONDITIONAL(HAVE_LATEX, test "$with_latex" != no) AC_CHECK_PROGS(DVIPS, dvips, no) AC_CHECK_PROGS(TROFF, troff, no) AC_ARG_WITH(texdir,dnl [--with-texdir=DIR where to install latex style files (default by kpsexpand in subdir PACKAGE)], TEXDIR="$withval", TEXDIR="no") dnl Allow manual specification of kpsexpand AC_CHECK_PROGS(KPSEXPAND, kpsexpand, no) AC_CHECK_PROGS(TEXHASH, texhash, true) AC_ARG_WITH(kpsexpand,dnl [--with-kpsexpand search for kpsexpand at run-time (default disabled)], [if test "$withval" = yes; then test "$KPSEXPAND" != "no" || AC_MSG_ERROR(dnl [You tell me to use kpsexpand, but there is no kpsexpand]) AC_DEFINE(HAVE_KPSEXPAND,1,[ Define if you want to use kpsexpand (TeX). ]) fi]) dnl we only care about texdir if latex is enabled if test "$with_latex" = yes; then test "$KPSEXPAND" = "no" -a "$TEXDIR" = "no" && AC_MSG_ERROR(dnl [texdir is not given and there is no kpsexpand, please tell where to install]) dnl texdir has priority if test "$TEXDIR" = "no"; then if test "x$prefix" != "xNONE"; then TEXDIR=${prefix}/share/texmf else TEXDIR=`$KPSEXPAND '$TEXMFLOCAL'` if test "x$TEXDIR" = "x" -o "$TEXDIR" = "\$TEXMFLOCAL"; then TEXDIR=${ac_default_prefix}/share/texmf fi fi TEXDIR=${TEXDIR}/tex/latex/gnuplot fi fi dnl X Window System files. AC_SUBST(LIBRARIES_FOR_X) AC_PATH_XTRA dnl Needed for LynxOS until AC_PATH_XTRA is fixed if test "$ac_cv_func_gethostbyname" = no; then if test "$ac_cv_lib_nsl_gethostbyname" = no; then AC_CHECK_LIB(bsd, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd") fi fi if test "$no_x" != yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" LIBRARIES_FOR_X="$X_LIBS -lX11 $X_EXTRA_LIBS" AC_DEFINE(X11,1,[ Define if you are using the X11 window system. ]) fi AM_CONDITIONAL(BUILD_GNUPLOT_X11, test "$no_x" != yes) dnl change location of X11 defaults AC_ARG_WITH(x-app-defaultdir,dnl [ --with-x-app-defaultdir=DIR location of X11 application defaults (default /etc/X11/app-defaults/)], X11_APPDEFAULTS_DIR="$withval", X11_APPDEFAULTS_DIR="/etc/X11/app-defaults/") dnl Operating systems. dnl FIXME AC_DEFINE(ISC22) dnl FIXME AC_DEFINE(KSR) dnl Check for MSDOS and djgpp, NeXT, Apple MacOsX (NeXT like), BeOS GP_MSDOS GP_NEXT GP_APPLE GP_BEOS GP_ALPHA AM_CONDITIONAL(BUILD_SRC_BEOS_SUBDIR, test x$build_beos_subdir = xyes) dnl Apparently, -lNeXT_s is needed on NeXT dnl _instead_ of -lm ... AC_CHECK_FUNC(sin,,[AC_CHECK_LIB(m,sin)]) dnl Header files. ANSI first dnl We prefer that the absense of a macro is the norm, so in syscfg.h dnl configure's HAVE_XXXX defines are translated into NO_XXXX for ANSI dnl headers and functions AC_HEADER_STDC dnl Header files dnl ANSI/ISO C, POSIX, others AC_CHECK_HEADERS(dirent.h errno.h float.h langinfo.h limits.h locale.h math.h \ stdlib.h string.h time.h sys/time.h sys/types.h \ sys/bsdtypes.h sys/ioctl.h sys/param.h sys/select.h sys/socket.h \ sys/stat.h sys/systeminfo.h sys/timeb.h sys/utsname.h \ libc.h malloc.h poll.h sgtty.h termios.h values.h dirent.h ) AC_HEADER_STDBOOL if test "$ac_cv_header_math_h" = yes ; then AC_MSG_CHECKING([for struct exception in math.h]) AC_TRY_LINK([#include ], [struct exception *x; x->type; x->name;], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_STRUCT_EXCEPTION_IN_MATH_H,1, [ Define if math.h declares struct exception for matherr(). ])], AC_MSG_RESULT(no)) fi if test "$ac_cv_header_sys_stat_h" = yes; then AC_HEADER_STAT fi dnl check if unistd actually declares anything. On NeXT 3.2 unistd is dnl conditionalized for _POSIX_SOURCE AC_MSG_CHECKING(for unistd.h) AC_EGREP_HEADER(execv, unistd.h, [AC_DEFINE(HAVE_UNISTD_H) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) dnl check if errno.h header declares errno AC_MSG_CHECKING(if errno variable is declared) AC_TRY_COMPILE( [#include #ifdef HAVE_ERRNO_H #include #endif], errno=0,AC_MSG_RESULT(yes), [AC_DEFINE(EXTERN_ERRNO,1,[ Define if declares errno. ]) AC_MSG_RESULT(no)]) dnl Types. AC_TYPE_SIZE_T AC_MSG_CHECKING(for time_t in time.h) AC_EGREP_HEADER(time_t,time.h, [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_TIME_T_IN_TIME_H,1, [ Define if time_t is declared in time.h. ])]) AC_TYPE_SIGNAL dnl Functions. Standard first, then others dnl ANSI/ISO and their predecessors dnl sunos 4 has on_exit() in place of atexit() dnl gamma is called lgamma linux dnl we prefer lgamma over gamma, see specfun.c dnl math lib is already available, see operating systems part AC_CHECK_FUNCS(atexit memcpy memmove memset \ on_exit bcopy bzero \ setvbuf strerror strchr strrchr strstr \ index rindex \ erf erfc gamma lgamma \ getcwd poll pclose popen fdopen select sleep stpcpy \ strcspn strdup strndup strnlen strcasecmp stricmp strncasecmp strnicmp \ sysinfo tcgetattr vfprintf doprnt usleep ) AC_CHECK_FUNCS(snprintf, , [ AC_MSG_RESULT([ WARNING: Could not find a working version of snprintf. If a user provides gnuplot with an improper format statement then a buffer overflow and/or segfault can result. Please consider providing snprintf via an external library. ]) ]) dnl HBB 20030624: see if signgam is declared by math.h AC_CHECK_DECLS([signgam],,, [#if HAVE_MATH_H #include #endif ]) dnl check, if we have sigsetjmp and siglongjmp. dnl a trivial AC_CHECK_FUNCS(sigsetjmp) won't do dnl because sigsetjmp() might be a macro declared dnl in . (joze) AC_MSG_CHECKING(for sigsetjmp) AC_TRY_LINK([#include ], [jmp_buf env; sigsetjmp(env, 1);], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_SIGSETJMP,1, [ Define if we have sigsetjmp(). ])], AC_MSG_RESULT(no)) if test "$ac_cv_func_pclose" = yes -a "$ac_cv_func_popen" = yes ; then AC_DEFINE(PIPES,1,[ Define if you do have the popen and pclose functions. ]) fi AC_MSG_CHECKING(if malloc(0) returns 0) AC_RUN_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_STDLIB_H #include #endif ]], [[if(malloc(0)==0) return 1;]])], [malloc_zero_returns_zero=no], [malloc_zero_returns_zero=yes], [malloc_zero_returns_zero=yes]) AC_MSG_RESULT([$malloc_zero_returns_zero]) AS_IF([test x$malloc_zero_returns_zero = xyes], [AC_DEFINE([MALLOC_ZERO_RETURNS_ZERO],[1],[Define to 1 if malloc(0)==0])]) dnl Argument types of select() AC_FUNC_SELECT_ARGTYPES dnl On SVR3. dnl FIXME AC_DEFINE(CRIPPLED_SELECT) dnl Deprecated dnl Install the lasergnu printer script LASERGNU=lasergnu-noinstall AC_ARG_WITH(lasergnu,dnl [ --with-lasergnu install lasergnu printer script], test "$withval" = yes && LASERGNU=lasergnu-install) dnl .gih help file location eval gp_datadir=$datadir if test "$gp_datadir" = NONE/share; then datadir="/usr/local/share" fi pkgdatadir="$datadir/$PACKAGE" AC_ARG_WITH(gihdir,dnl [ --with-gihdir=DIR location of .gih help text file (default PREFIX/share/PACKAGE/VERSION)], GIHDIR="$withval", GIHDIR="$pkgdatadir/$VERSION_MAJOR") dnl The Linux console driver AC_ARG_WITH(linux-vga,dnl [ --with-linux-vga use the Linux SVGA console driver (requires /usr/lib/libvga)],, test -z "$with_linux_vga" && with_linux_vga=no) dnl check for installed linux vgalib if test "$with_linux_vga" = yes; then AC_MSG_CHECKING(for linux vga library) AC_CHECK_LIB(vga, vga_init, [AC_DEFINE(LINUXVGA,1, [ Define if this is a Linux system with SuperVGA library. ]) LINUXSUID='chown root $(bindir)/gnuplot; chmod u+s $(bindir)/gnuplot' TERMLIBS="-lvga $TERMLIBS"], with_linux_vga=no) fi dnl TODO: simplify, get rid of GGI_SUPPORT dnl new ggi driver GGI_SUPPORT=no AC_ARG_WITH(ggi,dnl [ --with-ggi[=DIR] enable the ggi driver (EXPERIMENTAL)], [if test "$withval" != no; then if test -d $withval/include; then CPPFLAGS="$CPPFLAGS -I$withval/include" fi if test -d $withval/lib; then LDFLAGS="$LDFLAGS -L$withval/lib" fi AC_CHECK_LIB(ggi,ggiInit, [TERMLIBS="-lggi $TERMLIBS" AC_DEFINE(USE_GGI_DRIVER,1, [ Define if you want to use the experimental ggi driver. ]) GGI_SUPPORT=yes dnl check if libggiwmh and ggi/wmh.h are found AC_CHECK_LIB(ggiwmh,ggiWmhInit, [TERMLIBS="-lggiwmh $TERMLIBS" AC_CHECK_HEADERS(ggi/wmh.h,, AC_MSG_WARN([found ggiwmh library but not ggi/wmh.h please add path to ggi/wmh.h to CPPFLAGS in Makefile])) ])]) fi]) AC_ARG_WITH(xmi,dnl [ --with-xmi[=DIR] ggi's xmi support for pm3d (EXPERIMENTAL)], [if test "$withval" != no -a "$GGI_SUPPORT" = yes; then if test -d $withval/include; then CPPFLAGS="$CPPFLAGS -I$withval/include" fi if test -d $withval/lib; then LDFLAGS="$LDFLAGS -L$withval/lib" fi AC_CHECK_LIB(xmi,xmiInit, [TERMLIBS="-lxmi $TERMLIBS" AC_CHECK_HEADERS(ggi/xmi.h)]) fi]) dnl Use builtin readline or GNU readline or NetBSD editline AC_ARG_WITH(readline,dnl [ --with-readline=builtin use the built-in readline --with-readline=gnu use the GNU readline library (default if present) --with-readline=bsd use the NetBSD editline library (NB: does not handle UTF-8!) --with-readline=DIR specify the location of GNU readline --without-readline do not use any readline function], , test -z "$with_readline" && with_readline=gnu) dnl Gnuplot history AC_ARG_ENABLE(history-file,dnl [ --disable-history-file do not use history file],, test -z "$enable_history_file" && enable_history_file=yes) dnl GNU readline and the required terminal library if test "$with_readline" != no; then _libs="$LIBS" if test "$with_readline" != builtin; then if test "$with_readline" = bsd; then AC_CHECK_LIB(edit, readline, [TERMLIBS="-ledit $TERMLIBS"], [AC_MSG_WARN([Could not find BSD editline library ]) with_readline=builtin],) AC_CHECK_LIB(curses, tputs, [TERMLIBS="-lcurses $TERMLIBS"],,) if test "$ac_cv_lib_edit_readline" = yes; then AC_DEFINE(HAVE_LIBEDITLINE,1, [ Define if you are using the BSD editline library. ]) AC_CHECK_HEADERS(editline/readline.h,, AC_MSG_WARN([found BSD editline library but not readline.h please add path to readline.h to CPPFLAGS in Makefile])) if test "$enable_history_file" = yes; then AC_DEFINE(GNUPLOT_HISTORY,1, [ Define if you want to use a gnuplot history file. ]) fi fi else # !bsd dnl check for terminal library dnl this is a very cool solution from octave's configure.in gp_tcap="" for termlib in ncurses curses termcap terminfo termlib; do AC_CHECK_LIB(${termlib}, tputs, [gp_tcap="$gp_tcap -l$termlib"]) case "$gp_tcap" in *-l${termlib}*) break ;; esac done if test "$with_readline" = gnu; then AC_CHECK_LIB(readline, remove_history, [TERMLIBS="-lreadline $gp_tcap $TERMLIBS"],, [${gp_tcap}]) else if test -d $with_readline/include; then CPPFLAGS="$CPPFLAGS -I$with_readline/include" fi if test -d $with_readline/lib; then LDFLAGS="$LDFLAGS -L$with_readline/lib" fi AC_CHECK_LIB(readline, remove_history, [TERMLIBS="-lreadline $gp_tcap $TERMLIBS"],,[${gp_tcap}]) fi if test "$ac_cv_lib_readline_remove_history" = no; then dnl OSX keeps history functions in a separate library AC_CHECK_LIB(history, remove_history, TERMLIBS="-lreadline -lhistory $gp_tcap $TERMLIBS", [ AC_MSG_WARN([GNU readline not found - falling back to builtin readline]) with_readline=builtin ] ,[${gp_tcap}]) fi dnl Work around some functions missing from the OSX readline library. dnl Would it be better to simply switch to with_readline=bsd in this case? AC_SEARCH_LIBS(rl_ding, readline, , AC_DEFINE(MISSING_RL_DING,1,[ Define if your libreadline has no rl_ding]), [${TERMLIBS}]) AC_SEARCH_LIBS(rl_forced_update_display, readline, , AC_DEFINE(MISSING_RL_FORCED_UPDATE_DISPLAY,1,[ Define if your libreadline has no rl_force_update_display]), [${TERMLIBS}]) AC_SEARCH_LIBS(rl_reset_after_signal, readline, AC_DEFINE(HAVE_READLINE_RESET,1,[ Define if your libreadline has rl_reset_after_signal]), , [${TERMLIBS}]) # Warning: rl_complete_with_tilde_expansion is an int, not a function. # I.e., it is not callable. AC_CHECK_LIB seems to work anyhow, but... AC_SEARCH_LIBS(rl_complete_with_tilde_expansion, readline, , AC_DEFINE(MISSING_RL_TILDE_EXPANSION,1,[ Define if your libreadline has no rl_complete_with_tilde_expansion]), [${TERMLIBS}]) if [test "$ac_cv_lib_readline_remove_history" != no || test "$ac_cv_lib_history_remove_history" != no]; then if test "$with_readline" = bsd; then AC_DEFINE(HAVE_LIBEDITLINE,1, [ Define if you are using the BSD editline library. ]) else AC_DEFINE(HAVE_LIBREADLINE,1, [ Define if you are using the GNU readline library. ]) fi AC_CHECK_HEADERS(readline/readline.h,, AC_MSG_WARN([found GNU readline library but not readline.h please add path to readline.h to CPPFLAGS in Makefile])) AC_CHECK_HEADERS(readline/history.h,, AC_MSG_WARN([found GNU readline library but not history.h please add path to history.h to CPPFLAGS in Makefile])) if test "$enable_history_file" = yes; then AC_DEFINE(GNUPLOT_HISTORY,1, [ Define if you want to use a gnuplot history file. ]) fi fi # ! ac_cv_lib_readline_readline = no fi # ! with_readline = bsd fi # ! with_readline != builtin if test "$with_readline" = builtin; then AC_CHECK_FUNCS(wcwidth) AC_CHECK_HEADERS(wchar.h,, AC_MSG_WARN([please add path to wchar.h to CPPFLAGS in Makefile])) AC_DEFINE(READLINE,1, [ Define if you want to use the included readline function. ]) if test "$enable_history_file" = yes; then AC_DEFINE(GNUPLOT_HISTORY,1, [ Define if you want to use a gnuplot history file. ]) fi fi LIBS="$_libs" fi dnl end readline dnl check presence of z library dnl TODO: path to zlib includes; -lz -lm specified multiple times dnl we don't do anything about missing png/gd includes either AC_CHECK_LIB(z,deflate, [TERMLIBS="$TERMLIBS -lz" AC_DEFINE(HAVE_LIBZ,1,[ Define if you have zlib. ]) AC_CHECK_HEADER(zlib.h,, [AC_MSG_WARN([found z library but not zlib.h please add path to zlib.h to CPPFLAGS in Makefile])])], AC_MSG_WARN([zlib is required - see http://www.gzip.org/zlib/])) dnl check presence of gd library dnl we don't check for libfreetype and libjpeg locations - if gd requires dnl them, the gdlib-config scipt contains all the required information AC_ARG_WITH(gd,dnl [ --with-gd[=DIR] where to find Tom Boutell's gd library],, with_gd=yes) if test "$with_gd" != no; then AC_PATH_PROG([GDLIB_CONFIG], [gdlib-config]) if test -n "$GDLIB_CONFIG"; then libgd_CPPFLAGS=`gdlib-config --cflags` libgd_LDFLAGS=`gdlib-config --ldflags` libgd_LIBS=`gdlib-config --libs` elif test -d "$with_gd"; then libgd_CPPFLAGS="-I$with_gd/include" libgd_LDFLAGS="-L$with_gd/lib" fi _cppflags="$CPPFLAGS" _ldflags="$LDFLAGS" CPPFLAGS="$CPPFLAGS $libgd_CPPFLAGS" LDFLAGS="$LDFLAGS $libgd_LDFLAGS" AC_CHECK_LIB(gd,gdImageCreateTrueColor, [dnl found gd library AC_DEFINE(HAVE_LIBGD,1,[ Define if you have gd library. ]) AC_CHECK_HEADERS(gd.h,, AC_MSG_WARN([please add path to gd.h to CPPFLAGS in Makefile])) dnl gif support in libgd AC_CHECK_LIB(gd,gdImageGif, [AC_DEFINE(HAVE_GD_GIF,1,[ Define if libgd supports gif. ])]) AC_CHECK_LIB(gd,gdImageGifAnimBegin, [AC_DEFINE(GIF_ANIMATION,1,[ Define if libgd supports animated gifs. ])]) _libs="$LIBS" LIBS="$LIBS -ljpeg" dnl jpeg support in libgd AC_CHECK_LIB(gd,gdImageJpeg, [AC_DEFINE(HAVE_GD_JPEG,1,[ Define if libgd supports jpeg. ]) libgd_LIBS="$libgd_LIBS -ljpeg"]) LIBS="$_libs $libgd_LIBS -lfreetype" dnl freetype support in libgd AC_CHECK_LIB(gd,gdImageStringFT, [have_ttf=yes], [AC_CHECK_LIB(gd,gdImageStringTTF, [AC_DEFINE(gdImageStringFT,gdImageStringTTF, [ libgd versions < 1.8.4 need gdImageStringTTF rather than gdImageStringFT ]) have_ttf=yes])]) if test "$have_ttf" = yes; then AC_DEFINE(HAVE_GD_TTF,1, [ Define if libgd supports TrueType fonts through libfreetype. ]) libgd_LIBS="$libgd_LIBS -lfreetype" fi LIBS="$_libs $libgd_LIBS -lpng" dnl png support in libgd AC_CHECK_LIB(gd,gdImagePng, [AC_DEFINE(HAVE_GD_PNG,1,[ Define if libgd supports png. ]) libgd_LIBS="$libgd_LIBS -lpng"]) LIBS="$_libs" ],[dnl gd library not found AC_MSG_WARN([libgd not found or too old, version >= 2.0 is required]) with_gd=no ]) dnl piece it all together if test "$with_gd" = no; then CPPFLAGS="$_cppflags" LDFLAGS="$_ldflags" else TERMLIBS="$TERMLIBS -lgd $libgd_LIBS" fi fi dnl end gd dnl The iconv library can be used to switch character encodings. dnl So far this is only used by gd.trm and emf.trm. AC_SEARCH_LIBS([iconv_open], [iconv], [AC_CHECK_HEADER([iconv.h], [AC_DEFINE([HAVE_ICONV], 1, [define if you have libiconv and iconv.h])] )] ) dnl The Portable Document Format (PDF) terminal AC_ARG_WITH(pdf,dnl [ --with-pdf[=DIR] enable pdf terminal (requires PDFLib)],, with_pdf=yes) if test "$with_pdf" != no; then AC_PATH_PROG([PDFLIB_CONFIG], [pdflib-config]) if test -n "$PDFLIB_CONFIG"; then libpdf_CPPFLAGS=`pdflib-config --cflags` # D'oh - libraries don't belong here libpdf_LDFLAGS=`pdflib-config --ldflags |sed 's/ -l[[^ ]][[^ ]]*//g'` elif test -d "$with_pdf"; then libpdf_CPPFLAGS="-I$with_pdf/include" libpdf_LDFLAGS="-L$with_pdf/lib" fi _cppflags="$CPPFLAGS" _ldflags="$LDFLAGS" _libs="$LIBS" CPPFLAGS="$CPPFLAGS $libpdf_CPPFLAGS" LDFLAGS="$LDFLAGS $libpdf_LDFLAGS" AC_CHECK_LIB(pdf,PDF_get_majorversion, [AC_DEFINE(HAVE_LIBPDF,1,[ Define if you have the pdf library. ]) AC_CHECK_HEADERS(pdflib.h,, AC_MSG_WARN([please add path to pdflib.h to CPPFLAGS in Makefile])) ], with_pdf=no) if test "$with_pdf" != no; then AC_CHECK_LIB(pdf,PDF_begin_pattern, , [AC_DEFINE(HAVE_OLD_LIBPDF,1,[ Define if your pdf library is too old to support patterns. ]) AC_MSG_WARN([your version of libpdf is too old!]) ]) fi if test "$with_pdf" != no; then AC_CHECK_LIB(pdf,PDF_setdashpattern, , [AC_DEFINE(HAVE_NODASH_LIBPDF,1,[ Define if your pdf library doesn't support dash patterns. ]) AC_MSG_WARN([your version of libpdf is too old!]) ]) fi if test "$with_pdf" != no; then AC_CHECK_LIB(pdf,PDF_begin_document, , [AC_DEFINE(HAVE_LIBPDF_OPEN_FILE,1,[ Define if your pdf library is too old to use PDF_begin_document. ]) AC_MSG_WARN([your version of libpdf is rather old.]) ]) fi LIBS="$_libs" if test "$with_pdf" = no; then CPPFLAGS="$_cppflags" LDFLAGS="$_ldflags" else TERMLIBS="$TERMLIBS -lpdf" fi fi dnl end pdf dnl check presence of lua/TikZ support AC_ARG_WITH(lua,dnl [ --without-lua disable lua/TikZ terminal (default enabled)],, [test -z "${with_lua}" && with_lua=yes]) if test "${with_lua}" = yes ; then PKG_CHECK_MODULES(LUA, [lua], LUAFOUND=yes, [PKG_CHECK_MODULES(LUA, [lua5.1], LUAFOUND=yes, [LUAFOUND=no])]) if test $pkg_failed != no; then AC_MSG_WARN([Could not find support for lua using pkg-config.]) with_lua=no fi if test "$with_lua" != no; then TERMLIBS="$TERMLIBS $LUA_LIBS" CPPFLAGS="$CPPFLAGS $LUA_CFLAGS" else dnl if pkg-config didn't work, we migh still find it manually AC_SEARCH_LIBS(luaL_openlibs, lua lua5.1, with_lua=yes, with_lua=no) fi if test "$with_lua" = yes; then AC_DEFINE(HAVE_LUA,1, [ Define if you want the lua/TikZ terminal. ]) AC_CHECK_HEADERS(lua.h,, AC_MSG_WARN([please add path to lua.h to CPPFLAGS in Makefile])) fi fi AM_CONDITIONAL(BUILD_LUA, test "${with_lua}" = yes) dnl end lua dnl How do we detect the Ultrix X libraries? dnl Or is it really a server (run-time) problem? dnl FIXME AC_DEFINE(ULTRIX_KLUDGE) dnl Removed enable options for these dnl Just autodetect dnl SCO cgi AC_EGREP_CPP(yes, [#ifdef SCO yes #endif ],AC_CHECK_LIB(ccgi, v_opnwk, [AC_DEFINE(CGI,1,[ Define if you want to use the CGI terminal under SCO. ]) TERMLIBS="-lccgi $TERMLIBS"])) dnl Sun sunview AC_EGREP_CPP(yes, [#ifdef sun yes #endif ],[AC_CHECK_LIB(suntool, window_create, [AC_CHECK_HEADER(suntool/sunview.h, [AC_DEFINE(SUN,1, [ Define if you want to use the sunview terminal (sun). ]) TERMLIBS="-lsuntool -lsunwindow -lpixrect $TERMLIBS"])],, [-lsunwindow -lpixrect])]) dnl Process rest of with and enable options dnl Use .gnuplot file in current directory AC_ARG_WITH(cwdrc,dnl [ --with-cwdrc check current directory for .gnuplot file, normally disabled for security reasons],,) if test "$with_cwdrc" = yes; then AC_DEFINE(USE_CWDRC,1, [ Define if you want to read .gnuplot from current directory (SECURITY RISK!).]) fi dnl Whether we want to build the lisp files dnl Does nothing here, is passed on to the lisp subdir AC_ARG_WITH(lisp-files,dnl [ --without-lisp-files do not build emacs lisp files]) dnl Sort help/subtopic tables by row or column AC_ARG_WITH(row-help,dnl [ --with-row-help format help and subtopic tables by row (default) --without-row-help format help and subtopic tables by column], [if test "$with_row_help" = no; then AC_DEFINE(COLUMN_HELP,1, [ Define if you want online help and subtopic tables sorted by column. ]) fi]) dnl Whether we want to create the LaTeX tutorial TUTORIAL=notutorial AC_ARG_WITH(tutorial,dnl [ --with-tutorial process the LaTeX tutorial when building]) dnl only if latex/2e is found if test "$with_latex" != no -a "$with_tutorial" = yes ; then TUTORIAL=tutorial fi dnl use mouse for interactive terminals AC_ARG_ENABLE(mouse,dnl [ --disable-mouse disable mouse for interactive terminals],, test -z "$enable_mouse" && enable_mouse=yes) if test "$enable_mouse" = yes; then AC_DEFINE(USE_MOUSE,1, [ Define if you want to have mouse support in interactive terminals. ]) AC_DEFINE(PIPE_IPC,1, [ Unix-type of Interprocess Communication is required for mouse support. ]) fi dnl enable multi-byte font support in x11 terminal AC_ARG_ENABLE(x11-mbfonts,dnl [ --disable-x11-mbfonts disable multi-byte font support for x11 ],, test -z "$enable_x11_mbfonts" && enable_x11_mbfonts=yes) if test "$enable_x11_mbfonts" = yes; then _ldflags="$LDFLAGS" LDFLAGS="$LDFLAGS $LIBRARIES_FOR_X" AC_MSG_CHECKING([for multi-byte support in x11]) AC_CHECK_LIB(X11, XmbDrawString, AC_DEFINE(USE_X11_MULTIBYTE,1,[ Define to enable multi-byte font support for x11 ]), enable_x11_mbfonts=no ) LDFLAGS="$_ldflags" fi dnl x11_external AC_ARG_ENABLE(x11_external,dnl [ --disable-x11-external disable drawing to windows belonging to external apps],, test -z "$enable_x11_external" && enable_x11_external=yes) if test "$enable_x11_external" = yes; then AC_DEFINE(EXTERNAL_X11_WINDOW,1,[ Define if you want to supply pre-existing X11 windows. ]) fi dnl check for installed linux vgagl lib if dnl both linux_vga is defined. if test "$with_linux_vga" = yes; then _LIBS="$LIBS" dnl make sure LIBS contains -lvga LIBS="$TERMLIBS $LIBS" AC_MSG_CHECKING(for the vgagl library) AC_CHECK_LIB(vgagl, gl_hline, [LIBS="-lvgagl $LIBS" AC_CHECK_HEADERS(vgagl.h, [AC_DEFINE(VGAGL,1,[ Define if the vgagl libray is present. ]) dnl yup, we've the libvgagl. dnl check now, if lib3dkit is found. AC_CHECK_LIB(3dkit, gl_striangle, [AC_CHECK_HEADERS(3dkit.h, [dnl success! If we're here, all checks for dnl the vgagl terminal driver succeeded. AC_DEFINE(THREEDKIT,1,[ Define if the 3dkit libray is present. ]) AC_DEFINE(EXTENDED_COLOR_SPECS,1, [ Define if color information should be passed for each vertex. ]) VGAGLLIB="-l3dkit -lvgagl" with_vgagl=yes ],dnl <-- 3dkit.h found [with_vgagl=no AC_MSG_RESULT([unable to find 3dkit.h]) ]dnl <-- 3dkit.h not found ) ],dnl <-- 3dkit is present [ with_vgagl=no AC_MSG_RESULT([unable to find lib3dkit]) ]dnl <-- 3dkit is not present ) ],dnl <-- vgagl.h is present [ with_vgagl=no AC_MSG_RESULT([unable to find vgagl.h]) ]dnl <-- vgagl.h is not present ) ],dnl <-- libvgagl was found [with_vgagl=no AC_MSG_RESULT([unable to find libvgagl]) ]dnl <-- libvgagl was not found ) dnl restore LIBS LIBS="$_LIBS" else with_vgagl=no fi TERMLIBS="$VGAGLLIB $TERMLIBS" dnl thin plate splines patch AC_ARG_ENABLE(thin-splines,dnl [ --enable-thin-splines enable thin plate splines], [if test "$enableval" = yes; then AC_DEFINE(THIN_PLATE_SPLINES_GRID,1, [ Define to use thin plate spines. ]) fi]) dnl zooming of volatile data AC_ARG_ENABLE(volatile-data,dnl [ --disable-volatile-data disable zooming of volatile data],, test -z "$enable_volatile_data" && enable_volatile_data=yes) if test "$enable_volatile_data" = yes; then AC_DEFINE(VOLATILE_REFRESH,1, [ Define to allow zooming or refresh of volatile data. ]) fi dnl disable the "space raises console" behaviour AC_ARG_ENABLE(raise-console,dnl [ --disable-raise-console spacebar in plot window does not raise console],, test -z "$enable_raise_console" && enable_raise_console=yes) if test "$enable_raise_console" != yes; then AC_DEFINE(DISABLE_SPACE_RAISES_CONSOLE,1, [ Define to treat spacebar like any other keystroke. ]) fi dnl rectangles and other objects AC_ARG_ENABLE(objects,dnl [ --disable-objects disable rectangles and other objects ],, test -z "$enable_objects" && enable_objects=yes) if test "$enable_objects" = yes; then AC_DEFINE(EAM_OBJECTS,1, [ Define to allow placement of rectangles and other objects ]) fi dnl command line macros AC_ARG_ENABLE(macros,dnl [ --disable-macros disable command line macros],, test -z "$enable_macros" && enable_macros=yes) if test "$enable_macros" = yes; then AC_DEFINE(GP_MACROS,1, [ Define to allow command line macros. ]) fi dnl hidden3d compile-time options... dnl NOTE: have to check that they're not both turned on --- the code dnl doesn't allow that choice. AC_ARG_ENABLE(h3d-quadtree,dnl [ --disable-h3d-quadtree disable quadtree optimization in hidden3d code],, [test -z "${enable_h3d_quadtree}" && enable_h3d_quadtree=yes]) if test "$enable_h3d_quadtree" = yes; then AC_DEFINE(HIDDEN3D_QUADTREE,1, [ Define to enable quadtree optimization in hidden3d code.]) fi AC_ARG_ENABLE(h3d-gridbox,dnl [ --enable-h3d-gridbox enable gridbox optimization in hidden3d code], [if test "$enable_h3d_quadtree" = yes; then AC_MSG_ERROR(dnl [Only one of the hidden3d options quadtree and gridbox may be enabled.]) fi if test "$enableval" = yes; then AC_DEFINE(HIDDEN3D_GRIDBOX,1, [ Define to enable gridbox optimization in hidden3d code.]) fi]) AC_DEFINE(HIDDEN3D_VAR_PTSIZE,1, [ Define to enable handling point size in hidden3d code.]) dnl if test ! -f src/graphics.c ; then AC_MSG_RESULT([Compiling outside source directory - copying needed files]) mkdir tutorial >/dev/null 2>&1 cp ${srcdir}/tutorial/eg3.dat tutorial fi dnl explicit call to PKG_PROG_PKG_CONFIG because the first call to dnl PKG_CHECK_MODULES may not happen PKG_PROG_PKG_CONFIG dnl wxWidgets terminal dnl wxWidgets terminal needs C++ dnl These tests cannot be called conditionally. dnl These tests are non-fatal on autoconf 2.58 and 2.59, dnl but it may change in future versions, so we redefine AC_MSG_ERROR. dnl Even if there is no C++ compiler on the system, dnl autoconf will set CXX as g++ : this must be reverted. m4_pushdef([AC_MSG_ERROR],[cxxerror=yes]) AC_PROG_CXX m4_popdef([AC_MSG_ERROR]) if test "x${cxxerror}" != "xyes"; then AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[const char hw[] = "Hello, World\n"; std::cout << hw;]])], [cxxerror=no AC_PROG_CXXCPP], [cxxerror=yes CXX=$CC]) AC_LANG_POP([C++]) fi AC_ARG_ENABLE(wxwidgets,dnl [ --disable-wxwidgets wxWidgets terminal (default enabled)],, [test -z "${enable_wxwidgets}" && enable_wxwidgets=yes]) if test "${enable_wxwidgets}" = yes ; then dnl variable used to determine if all checks pass enable_wxwidgets_ok=yes dnl Check for the C++ compiler if test "x${cxxerror}" = "xyes"; then AC_MSG_WARN([No C++ compiler found. The wxWidgets terminal will not be compiled.]) enable_wxwidgets_ok=no fi dnl The user can specify another path for wx-config WXWIDGETS_PATH="${PATH}" AC_ARG_WITH(wx-config,dnl [--with-wx-config=PATH Use the given path to wx-config, the wxWidgets configuration program (default search in $PATH)], [ if test "${with_wx_config}" != "no" ; then WXWIDGETS_PATH="${with_wx_config}:${PATH}" fi ]) dnl Look for wx-config in the path AC_PATH_PROG(WX_CONFIG, wx-config, no, ${WXWIDGETS_PATH}) if test "${WX_CONFIG}" = "no"; then AC_MSG_WARN([wxWidgets can't be found. You can try --with-wx-config-path to give the right path to wx-config. The wxWidgets terminal will not be compiled.]) enable_wxwidgets_ok=no else dnl Ckeck for wxWidgets version if expr 2.5.3 \> `${WX_CONFIG} --version` >/dev/null; then AC_MSG_WARN([Your development package for wxWidgets is too old, you need at least version 2.5.3. The wxWidgets terminal will not be compiled.]) enable_wxwidgets_ok=no fi dnl Make sure we're using more than the 'base' wxWidgets. Those if expr `${WX_CONFIG} --basename` : '.*base' >/dev/null; then AC_MSG_WARN([You only have the 'base' flavor of wxWidgets. A full wxWidgets library is required. On Debian/Ubuntu, please make sure that you have a 'libwx...-dev' package other than just 'libwxbase...-dev' installed. The wxWidgets terminal will not be compiled.]) enable_wxwidgets_ok=no fi fi dnl Check for Cairo PKG_CHECK_MODULES_NOFAIL(CAIROPANGO, [cairo >= 0.9.0 pango >= 1.10 pangocairo >= 1.10]) if test $pkg_failed != no; then AC_MSG_WARN([The wxWidgets terminal will not be compiled.]) enable_wxwidgets_ok=no fi dnl Check for buggy Pango 1.10.2 PKG_CHECK_MODULES(PANGO_1_10_2, [pango = 1.10.2], [AC_MSG_WARN(dnl [Pango 1.10.2 has been found. This version has a bug which gives unexpected results in the wxWidgets terminal. If you want to use this terminal, please install a different version of Pango.]) enable_wxwidgets_ok=no], [HAVE_PANGO_1_10_2=0]) fi if test "${enable_wxwidgets_ok}" = yes ; then WX_CXXFLAGS="`$WX_CONFIG --cxxflags | sed 's/-fno-exceptions//'` $CAIROPANGO_CFLAGS" WX_LIBS="`$WX_CONFIG --libs` $CAIROPANGO_LIBS" dnl Check for fork(), used for the 'persist' effect AC_FUNC_FORK dnl Check for gtk (raise/lower tweaks) PKG_CHECK_MODULES(GTK, [gtk+-2.0], have_gtk=yes, have_gtk=no) if test "${have_gtk}" = yes ; then AC_DEFINE(HAVE_GTK, 1, [Define to use gtk/gdk tweaks]) WX_CXXFLAGS="$WX_CXXFLAGS $GTK_CFLAGS" WX_LIBS="$WX_LIBS $GTK_LIBS" fi dnl Check for gtk>2.8 for direct rendering to screen PKG_CHECK_MODULES(GTK28, [gtk+-2.0 >= 2.8.0], have_gtk28=yes, have_gtk28=no) if test "${have_gtk28}" = yes ; then AC_DEFINE(HAVE_GTK28, 1, [Define to use gtk+ functions to handle cairo]) fi CPPFLAGS="$CPPFLAGS $CAIROPANGO_CFLAGS" CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS" AC_SUBST(WX_LIBS) AC_DEFINE(WXWIDGETS,1, [ Define if you want the wxwidgets terminal. ]) fi AM_CONDITIONAL(BUILD_WXWIDGETS, test "${enable_wxwidgets_ok}" = yes) dnl End wxWidgets terminal dnl Allow to disable terminals requiring bitmap support. dnl NB: The copyright notice in bitmap.c is more restrictive dnl than the overall gnuplot copyright. AC_ARG_WITH(bitmap_terminals,dnl [ --with-bitmap-terminals dot-matrix printers and pbm]) AS_IF([test "x${with_bitmap_terminals}" = "xyes"],, AC_DEFINE(NO_BITMAP_SUPPORT,1, [ Define to disable terminals that depend on code in bitmap.c ])) AM_CONDITIONAL(BUILD_BITMAP, test "${with_bitmap_terminals}" = yes) AC_ARG_WITH(cairo,dnl [ --without-cairo cairo-based terminals (default enabled)],, [test -z "${with_cairo}" && with_cairo=yes]) if test "${with_cairo}" = yes ; then dnl cairo terminals PKG_CHECK_MODULES_NOFAIL(CAIROPDF,dnl [cairo >= 1.2 cairo-pdf >= 1.2 pango >= 1.10 pangocairo >= 1.10 glib-2.0]) if test $pkg_failed != no; then AC_MSG_WARN([The cairo terminals will not be compiled.]) with_cairo=no else AC_DEFINE(HAVE_CAIROPDF,1, [ Define if you want the cairo-based terminals. ]) CPPFLAGS="$CPPFLAGS $CAIROPDF_CFLAGS" LIBS="$LIBS $CAIROPDF_LIBS" with_cairo=yes PKG_CHECK_MODULES(CAIROEPS, [cairo >= 1.6.0], AC_DEFINE([HAVE_CAIROEPS], 1, [libcairo support for eps (cairo >= 1.6)]), AC_MSG_WARN([Your version of cairo is too old to support epscairo output])) fi fi build_gpcairo=no if test "${enable_wxwidgets_ok}" = yes; then build_gpcairo=yes fi if test "${with_cairo}" = yes; then build_gpcairo=yes fi AM_CONDITIONAL(BUILD_GPCAIRO, test "${build_gpcairo}" = yes) dnl Enable parsing of deprecated syntax AC_ARG_ENABLE(backwards-compatibility,dnl [ --enable-backwards-compatibility enable deprecated syntax ], [if test "$enableval" = yes; then AC_DEFINE(BACKWARDS_COMPATIBLE,1, [ Define to allow use of deprecated syntax and terminal behaviour. ]) fi]) dnl Enable subsystem to generate statistical summary of file contents AC_ARG_ENABLE(stats,dnl [ --enable-stats Include command to generate statistical summary of data], [if test "$enableval" != no; then AC_DEFINE(USE_STATS,1, [ Define to add support for generating a statistical summary of data]) fi], AC_DEFINE(USE_STATS,1, [ Define to add support for generating a statistical summary of data]) ) dnl Qt terminal AC_ARG_ENABLE(qt,dnl [ --enable-qt Qt terminal (default disabled)], [if test "$enableval" = yes; then enable_qt=yes; fi]) if test "${enable_qt}" = yes ; then dnl variable used to determine if all checks pass enable_qt_ok=yes dnl Check for the C++ compiler if test "x${cxxerror}" = "xyes"; then AC_MSG_WARN([No C++ compiler found. The Qt terminal will not be compiled.]) enable_qt_ok=no fi dnl Check for Qt libraries PKG_CHECK_MODULES_NOFAIL(QT, [QtCore >= 4.5 QtGui >= 4.5 QtNetwork >= 4.5 QtSvg >= 4.5]) if test $pkg_failed != no; then AC_MSG_WARN([The Qt terminal will not be compiled.]) enable_qt_ok=no fi fi if test "${enable_qt_ok}" = yes ; then dnl Check for fork() AC_FUNC_FORK CPPFLAGS="$CPPFLAGS $QT_CFLAGS" CXXFLAGS="$CXXFLAGS $QT_CXXFLAGS" dnl Compile Objective C Cocoa headers on Mac to hide the gnuplot icon from the dock if test "$is_apple" = yes; then LIBS="$LIBS -framework Cocoa" fi QT4LOC=`$PKG_CONFIG --variable=exec_prefix QtCore` MOC=`$PKG_CONFIG --variable=moc_location QtCore` if test x"$MOC" = x; then MOC=moc fi UIC=`$PKG_CONFIG --variable=uic_location QtCore` if test x"$UIC" = x; then UIC=uic fi RCC=`$PKG_CONFIG --variable=rcc_location QtCore` if test x"$RCC" = x ; then if test x"$QT4LOC" != x ; then RCC=$QT4LOC/bin/rcc else RCC=rcc fi fi LRELEASE=`$PKG_CONFIG --variable=lrelease_location QtCore` if test x"$LRELEASE" = x ; then if test x"$QT4LOC" != x ; then LRELEASE=$QT4LOC/bin/lrelease else LRELEASE=lrelease fi fi AC_SUBST(RCC) AC_SUBST(MOC) AC_SUBST(UIC) AC_SUBST(QT_LIBS) AC_SUBST(LRELEASE) AC_DEFINE(QTTERM,1, [ Define if you want the Qt terminal. ]) fi AM_CONDITIONAL(BUILD_QT, test "${enable_qt_ok}" = yes) AM_CONDITIONAL(BUILD_ON_APPLE, test "${is_apple}" = yes) dnl translation tools AM_CONDITIONAL(HAVE_LRELEASE, test "${LRELEASE}" != no) AC_ARG_VAR(DIST_CONTACT,[Contact address for modified and binary distributed gnuplot versions]) if test -n "${DIST_CONTACT}"; then AC_DEFINE_UNQUOTED([DIST_CONTACT],["$DIST_CONTACT"],[Contact address for modified and binary distributed gnuplot versions]) fi dnl build lisp files if test "$with_lisp_files" != no; then AC_CONFIG_SUBDIRS(lisp) LISPDIR=lisp else LISPDIR= fi AC_SUBST(LISPDIR) dnl Substitute variables AC_SUBST(PACKAGE) AC_SUBST(VERSION_MAJOR) AC_SUBST(VERSION) AC_SUBST(GIHDIR) AC_SUBST(TEXDIR) AC_SUBST(LASERGNU) AC_SUBST(LINUXSUID) AC_SUBST(TERMLIBS) AC_SUBST(TERMXLIBS) AC_SUBST(TUTORIAL) AC_SUBST(X11_APPDEFAULTS_DIR) dnl Write Makefiles and configuration header AC_OUTPUT([Makefile config/Makefile demo/Makefile docs/Makefile m4/Makefile man/Makefile share/Makefile share/LaTeX/Makefile src/Makefile src/beos/Makefile src/wxterminal/Makefile src/qtterminal/Makefile term/Makefile tutorial/Makefile], [test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h]) dnl Report configuration dnl Rationale: dnl - if something is disabled by default, show arguments to use to enable. dnl - if something has particular dependencies, show them all when they are dnl missing (the detailed output will give more details anyway). dnl The goal is to give sensible and easily accessible information to users dnl and packagers. AC_MSG_RESULT([]) AC_MSG_RESULT([** Configuration summary for $PACKAGE $VERSION:]) AC_MSG_RESULT([]) AC_MSG_RESULT([gnuplot will be compiled with the following terminals:]) AC_MSG_RESULT([]) AC_MSG_RESULT([ Standalone terminals: yes (always builtin)]) AC_MSG_RESULT([ canvas, cgm, context, corel, dumb, dxf, eepic, emf, emtex,]) AC_MSG_RESULT([ epslatex, fig, gpic, hp2623a, hp2648, hpgl, imagen,]) AC_MSG_RESULT([ latex, metafont, metapost, mif, pcl5, postscript, pslatex,]) AC_MSG_RESULT([ pstex, pstricks, qms, regis, svg,]) AC_MSG_RESULT([ tek40xx, tek410x, texdraw, tgif, tkcanvas, tpic, vttek]) AC_MSG_RESULT([]) if test "$with_bitmap_terminals" == yes; then AC_MSG_RESULT([ dot-matrix terminals: yes ( --without-bitmap-terminals to disable)]) else AC_MSG_RESULT([ dot-matrix terminals: no]) fi AC_MSG_RESULT([ NB: copyright may restrict commercial use]) AC_MSG_RESULT([ epson, nec, okidata, tandy, and seiko dp414 printers]) AC_MSG_RESULT([ hp500c, hpdj, hpljii, hppj, pbm, starc]) AC_MSG_RESULT([]) if test "$no_x" != yes; then AC_MSG_RESULT([ X Window System terminal: yes]) if test "$enable_x11_mbfonts" = yes; then AC_MSG_RESULT([ (with multi-byte fonts)]) else AC_MSG_RESULT([ (without multi-byte fonts, requires support in libX11)]) fi if test "$enable_x11_external" = yes; then AC_MSG_RESULT([ (enable plotting to windows opened by external apps) ]) else AC_MSG_RESULT([ (disable plotting to windows opened by external apps) ]) fi AC_MSG_RESULT([ (with application defaults, in $X11_APPDEFAULTS_DIR)]) else AC_MSG_RESULT([ X Window System terminal: no (requires X libraries)]) fi if test "$ac_cv_lib_gd_gdImageJpeg" = yes; then AC_MSG_RESULT([ jpeg terminal: yes]) else AC_MSG_RESULT([ jpeg terminal: no (requires libgd with jpeg support)]) fi if test "$ac_cv_lib_gd_gdImageGif" = yes; then if test "$ac_cv_lib_gd_gdImageGifAnimBegin" = yes; then AC_MSG_RESULT([ gif terminal: yes (with animated gif)]) else AC_MSG_RESULT([ gif terminal: yes (without animated gif, requires libgd support)]) fi else AC_MSG_RESULT([ gif terminal: no (requires libgd with gif support)]) fi if test "$ac_cv_lib_gd_gdImagePng" = yes; then AC_MSG_RESULT([ png terminal: yes]) else AC_MSG_RESULT([ png terminal: no (requires libgd with png support)]) fi if test "$have_ttf" = yes; then AC_MSG_RESULT([ (jpeg, gif and png terminals can use TTF fonts)]) else AC_MSG_RESULT([ (jpeg, gif and png terminals cannot use TTF fonts, requires libgd support)]) fi if test "$ac_cv_header_pdflib_h" = yes; then AC_MSG_RESULT([ pdf terminal: yes]) if test "$ac_cv_lib_pdf_PDF_begin_pattern" != yes; then AC_MSG_RESULT([ (pattern fills not supported, libpdf too old)]) fi if test "$ac_cv_lib_pdf_PDF_setdashpattern" != yes; then AC_MSG_RESULT([ (dash patterns not supported, libpdf too old)]) fi else AC_MSG_RESULT([ pdf terminal: no (requires libpdf)]) fi if test "$with_linux_vga" = yes; then AC_MSG_RESULT([ linux terminal (vga console): yes]) if test "$with_vgagl" = yes; then AC_MSG_RESULT([ vgagl terminal ((s)vga console): yes]) else AC_MSG_RESULT([ vgagl terminal ((s)vga console): no (requires vgagl)]) fi AC_MSG_RESULT([ SECURITY NOTICE: SVGAlib requires that gnuplot is installed suid root!]) else AC_MSG_RESULT([ linux terminal (vga console): no (use --with-linux-vga to enable,]) AC_MSG_RESULT([ requires SVGAlib)]) AC_MSG_RESULT([ vgagl terminal ((s)vga console): no (use --with-linux-vga to enable,]) AC_MSG_RESULT([ requires SVGAlib with vgagl)]) fi if test "$GGI_SUPPORT" = yes; then if test "$ac_cv_header_ggi_xmi_h" = yes; then AC_MSG_RESULT([ ggi terminal: yes (EXPERIMENTAL) (with pm3d support)]) else AC_MSG_RESULT([ ggi terminal: yes (EXPERIMENTAL) (without pm3d support, requires libxmi)]) fi else AC_MSG_RESULT([ ggi terminal: no (use --with-ggi to enable, requires libggi)]) fi if test "$is_msdos" = yes; then AC_MSG_RESULT([ svga terminal (MSDOS/djgpp): yes]) else AC_MSG_RESULT([ svga terminal (MSDOS/djgpp): no]) fi if test "$build_src_beos_subdir" = yes; then AC_MSG_RESULT([ be terminal (BeOS): yes]) else AC_MSG_RESULT([ be terminal (BeOS): no]) fi if test "$is_next" = yes; then AC_MSG_RESULT([ next terminal: yes]) else AC_MSG_RESULT([ next terminal: no]) fi if test "$ac_cv_lib_aquaterm_aqtInit" = yes; then AC_MSG_RESULT([ aqua terminal: yes]) else AC_MSG_RESULT([ aqua terminal: no]) fi if test "$enable_wxwidgets_ok" = yes; then AC_MSG_RESULT([ wxt terminal: yes ]) else AC_MSG_RESULT([ wxt terminal: no (requires C++, wxWidgets>2.6, cairo>0.9, pango>1.10)]) fi if test "$with_cairo" = yes; then AC_MSG_RESULT([ cairo-based pdf and png terminals: yes ]) else AC_MSG_RESULT([ cairo-based terminals: no (requires cairo>1.2, pango>1.10)]) fi if test "$with_lua" = yes; then AC_MSG_RESULT([ lua/TikZ terminal: yes ]) else AC_MSG_RESULT([ lua/TikZ terminal: no ]) fi if test "$enable_qt_ok" = yes; then AC_MSG_RESULT([ Qt terminal: yes ]) else AC_MSG_RESULT([ Qt terminal: no (requires C++, Qt >= 4.5)]) fi AC_MSG_RESULT([]) AC_MSG_RESULT([ Additional terminals are availaible in platform-specific makefiles:]) AC_MSG_RESULT([ cgi (makefile.unx), pm (makefile.os2),]) AC_MSG_RESULT([ sun (makefile.unx), unixpc (makefile.unx), windows (various Windows]) AC_MSG_RESULT([ makefiles)]) AC_MSG_RESULT([]) AC_MSG_RESULT([gnuplot will be compiled with the following features:]) AC_MSG_RESULT([]) if test "$enable_mouse" = yes; then AC_MSG_RESULT([ Mouse support in interactive terminals: yes]) else AC_MSG_RESULT([ Mouse support in interactive terminals: no]) fi if test "$enable_volatile_data" = yes; then AC_MSG_RESULT([ Zooming or refresh of volatile data: yes ]) else AC_MSG_RESULT([ Zooming or refresh of volatile data: no]) fi if test "$enable_raise_console" = yes; then AC_MSG_RESULT([ Typing in plot window raises console]) else AC_MSG_RESULT([ Treat in plot window like any other key: yes]) fi if test "$enable_macros" = yes; then AC_MSG_RESULT([ Command line macros: yes ]) else AC_MSG_RESULT([ Command line macros: no ]) fi if test "$enable_objects" = yes; then AC_MSG_RESULT([ Placement of rectangles and other objects: yes ]) else AC_MSG_RESULT([ Placement of rectangles and other objects: no]) fi AC_MSG_RESULT([]) AC_MSG_RESULT([gnuplot will be compiled with the following options:]) AC_MSG_RESULT([]) if test "$with_readline" = no; then AC_MSG_RESULT([ No readline support (use --with-readline=gnu or --with-readline=builtin)]) fi if test "$with_readline" = bsd; then if test -n "$gp_tcap"; then AC_MSG_RESULT([ Readline library: BSD editline with $gp_tcap]) else AC_MSG_RESULT([ Readline library: BSD editline library]) fi AC_MSG_RESULT( [ WARNING: editline cannot handle multi-byte characters!]) else if test "$with_readline" != builtin; then if test -n "$gp_tcap"; then AC_MSG_RESULT([ Readline library: GNU readline library with $gp_tcap]) else AC_MSG_RESULT([ Readline library: GNU readline library]) fi if test "$ac_cv_lib_readline_rl_forced_update_display" = no; then AC_MSG_RESULT([ missing some features (OSX version?)]) fi else AC_MSG_RESULT([ Readline library: builtin minimal (use --with-readline=gnu for GNU readline)]) fi fi if test "$enable_history_file" = yes; then AC_MSG_RESULT([ Command-line history file: yes]) else AC_MSG_RESULT([ Command-line history file: no]) fi if test "$with_cwdrc" = yes; then AC_MSG_RESULT([ Check current directory for .gnuplot file: yes (warning: security risk)]) else AC_MSG_RESULT([ Check current directory for .gnuplot file: no (use --with-cwdrc to enable)]) fi if test "$with_row_help" = no; then AC_MSG_RESULT([ Sort help/subtopic tables by column: yes]) else AC_MSG_RESULT([ Sort help/subtopic tables by column: no (use --without-row-help to enable)]) fi if test "$with_kpsexpand" = yes; then AC_MSG_RESULT([ Use TeX kpsexpand to search for fonts: yes]) else AC_MSG_RESULT([ Use TeX kpsexpand to search for fonts: no (use --with-kpsexpand to enable)]) fi if test "$enable_thin_splines" = yes; then AC_MSG_RESULT([ Thin plate splines: yes]) else AC_MSG_RESULT([ Thin plate splines: no (use --enable-thin-splines to enable)]) fi if test "$enable_h3d_gridbox" = yes; then AC_MSG_RESULT([ Hidden3d optimization: gridbox]) else if test "$enable_h3d_quadtree" = no; then AC_MSG_RESULT([ Hidden3d optimization: none]) else AC_MSG_RESULT([ Hidden3d optimization: quadtree]) fi fi if test "$enable_backwards_compatibility" = yes; then AC_MSG_RESULT([ Deprecated syntax and terminal options: yes]) else AC_MSG_RESULT([ Deprecated syntax and terminal options: no (use --enable-backwards-compatibility)]) fi if test "$enable_stats" != no; then AC_MSG_RESULT([ Generate statistical summary of data: yes]) else AC_MSG_RESULT([ Generate statistical summary of data: no (use --enable-stats to enable)]) fi AC_MSG_RESULT([]) AC_MSG_RESULT([gnuplot will install the following additional materials:]) AC_MSG_RESULT([]) if test "$with_lasergnu" = yes; then AC_MSG_RESULT([ lasergnu printer script: yes (Deprecated)]) fi if test "$with_lisp_files" != no; then AC_MSG_RESULT([ gnuplot-mode for X/Emacs: yes]) else AC_MSG_RESULT([ gnuplot-mode for X/Emacs: no]) fi if test "$TUTORIAL" = tutorial; then AC_MSG_RESULT([ LaTeX tutorial: yes]) else AC_MSG_RESULT([ LaTeX tutorial: no]) fi if test "$with_latex" != no; then AC_MSG_RESULT([ cfg file for epslatex terminal: yes]) if test "$with_lua" != no; then AC_MSG_RESULT([ TeX *.sty for lua/tikz terminal: yes]) else AC_MSG_RESULT([ TeX *.sty for lua/tikz terminal: no]) fi AC_MSG_RESULT([ TeX files will be installed in $TEXDIR]) AC_MSG_RESULT([ (use --with-texdir=DIR to change)]) else AC_MSG_RESULT([ cfg file for epslatex terminal: no]) AC_MSG_RESULT([ TeX *.sty for lua/tikz terminal: no]) fi AC_MSG_RESULT([ Help file: yes (always), in $GIHDIR/gnuplot.gih]) AC_MSG_RESULT([ PostScript prologue files: yes (always)]) dnl end config report dnl end configure.in gnuplot-4.6.4/Makefile.in0000644000471100001440000006222012223337636012207 0ustar # Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.hin mkinstalldirs \ $(top_srcdir)/docs/Makefile.in \ $(top_srcdir)/src/beos/Makefile.in ChangeLog INSTALL NEWS \ README depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alpha.m4 \ $(top_srcdir)/m4/apple.m4 $(top_srcdir)/m4/beos.m4 \ $(top_srcdir)/m4/msdos.m4 $(top_srcdir)/m4/next.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = docs/Makefile src/beos/Makefile CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.hin # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROEPS_CFLAGS = @CAIROEPS_CFLAGS@ CAIROEPS_LIBS = @CAIROEPS_LIBS@ CAIROPANGO_CFLAGS = @CAIROPANGO_CFLAGS@ CAIROPANGO_LIBS = @CAIROPANGO_LIBS@ CAIROPDF_CFLAGS = @CAIROPDF_CFLAGS@ CAIROPDF_LIBS = @CAIROPDF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIST_CONTACT = @DIST_CONTACT@ DVIPS = @DVIPS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ GDLIB_CONFIG = @GDLIB_CONFIG@ GIHDIR = @GIHDIR@ GREP = @GREP@ GTK28_CFLAGS = @GTK28_CFLAGS@ GTK28_LIBS = @GTK28_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEXPAND = @KPSEXPAND@ LASERGNU = @LASERGNU@ LATEX = @LATEX@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARIES_FOR_X = @LIBRARIES_FOR_X@ LIBS = @LIBS@ LINUXSUID = @LINUXSUID@ LISPDIR = @LISPDIR@ LN_S = @LN_S@ LRELEASE = @LRELEASE@ LTLIBOBJS = @LTLIBOBJS@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGO_1_10_2_CFLAGS = @PANGO_1_10_2_CFLAGS@ PANGO_1_10_2_LIBS = @PANGO_1_10_2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PDFLIB_CONFIG = @PDFLIB_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ PLAINTEX = @PLAINTEX@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RCC = @RCC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMLIBS = @TERMLIBS@ TERMXLIBS = @TERMXLIBS@ TEXDIR = @TEXDIR@ TEXHASH = @TEXHASH@ TROFF = @TROFF@ TUTORIAL = @TUTORIAL@ UIC = @UIC@ VERSION = @VERSION@ VERSION_MAJOR = @VERSION_MAJOR@ WX_CONFIG = @WX_CONFIG@ WX_LIBS = @WX_LIBS@ X11_APPDEFAULTS_DIR = @X11_APPDEFAULTS_DIR@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_OBJC = @ac_ct_OBJC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign SUBDIRS = config m4 term src docs $(LISPDIR) man demo tutorial share EXTRA_DIST = BUGS CodeStyle Copyright FAQ.pdf GNUmakefile INSTALL INSTALL.gnu \ Makefile.maint PATCHLEVEL PGPKEYS PORTING README README.1ST \ VERSION configure.vms pm3d win DISTCLEANFILES = stamp-h LISP_DISTCLEANFILES = gpelcard.dvi gpelcard.pdf gpelcard.ps ACLOCAL_AMFLAGS = -I m4 all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.hin $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.hin: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 docs/Makefile: $(top_builddir)/config.status $(top_srcdir)/docs/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ src/beos/Makefile: $(top_builddir)/config.status $(top_srcdir)/src/beos/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am dist-hook: @for dir in `find $(distdir) -type d -name CVS -print`; do \ rm -rf $$dir; done @find $(distdir) -type d -name .deps -print | xargs rm -rf @find $(distdir) -type f -name .cvsignore -print | xargs rm -f @(cd $(distdir)/lisp && rm -f $(LISP_DISTCLEANFILES)) gnuplot: cd src; make binonly # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnuplot-4.6.4/pm3d/0000755000471100001440000000000012223340020010760 5ustar gnuplot-4.6.4/pm3d/contrib/0000755000471100001440000000000012223340020012420 5ustar gnuplot-4.6.4/pm3d/contrib/pm3dCompress.awk0000644000471100001440000000700607440375766015544 0ustar # pm3dCompress.awk - (c) Petr Mikulik; 1996/1997/1999/2002 # # This awk script tries to compress a postscript file created by pm3d or # gnuplot with pm3d splotting mode (limits: compresses only the first pm3d # splot map there if in multiplot mode). # # # Installation: # Copy this file into a directory listed in your AWKPATH # Running: # awk -f pm3dCompress.awk _original_.ps >reduced.ps # # Hint: make a script file/abbreviation/alias, e.g. under VMS # pm3dcompress:=="$disk:[dir]gawk.exe -f disk:[dir]pm3dCompress.awk" # # Note: use GNU awk whenever possible (HP awk does not have /dev/stderr, for # instance). # # # Strategy: this program browses the given .ps file and makes a list of all # frequently used chains of postscript commands. If this list is not too large, # then it replaces these chains by abbreviated commands. # This may reduce the size of the postscript file about 50 %, which is not # so bad if you want to store these files for a later use (and with the same # functionality, of course). # # # (c) Petr Mikulik, mikulik@physics.muni.cz, http://www.sci.muni.cz/~mikulik/ # # Distribution policy: this file must be distributed together with the # whole stuff of pm3d or gnuplot program. # # This is version: 2. 3. 2002 # 2. 3. 2002 - updated because of stroke in /g definition # 15. 1. 1999 - new staff in pm3d and gnuplot/pm3d # 9. 7. 1997 - update # 16. 3. 1997 - first (?) version # BEGIN { err = "/dev/stderr" if (ARGC!=2) { print "pm3dCompress.awk --- (c) Petr Mikulik, Brno. Version 2. 3. 2002" >err print "Compression of pm3d .ps files. See the header of this file for more info." >err print "Usage: awk -f pm3dCompress.awk inp_file.ps >out_file.ps" >err exit(1) } getline print "Please wait, it may take a while (input file "ARGV[1]" is read twice)." >err while ($1!="%pm3d_map_begin") if (getline<=0) { print "No pm3d piece found in the input file, exiting." >err exit(7) } PrintMapping=$0 nList=0 while ($1!="%pm3d_map_end") { if (getline<=0) { print "Corrupted pm3d block---end not found, exiting." >err exit(8) } i=index($0,"N"); if (i>0) { S=substr($0,i,length($0)) # M including # is this string defined? for (i=0; i300) { print "Defining more than 300 strings makes no sense, I think. Exiting, sorry." >err exit(2) } } } # for all NR } print "List of frequent strings contains "nList" elements." >err # now read the same file again the 3d part: getline 0) { S=substr($0,i,length($0)) # M including # find the definition in the list for (m=0; m0) { print; flag = (getline "/dev/stderr" print "\nWhere 2*dx, 2*dy defines the point size (enlargement) in x, y" >"/dev/stderr" print "Gnuplot usage: set pm3d map; splot '"/dev/stderr" exit } dx = ARGV[2] dy = ARGV[3] ARGC = 2 } # skip blank lines NF==0 { next } # main { x=$1; y=$2 print x-dx "\t" y-dy "\t" $3 print x-dx "\t" y+dy "\t" $3 printf "\n" # blank line (new scan) print x+dx "\t" y-dy "\t" $3 print x+dx "\t" y+dy "\t" $3 printf "\n\n" # two blank lines (new surface) } gnuplot-4.6.4/pm3d/contrib/pm3dConvertToImage.awk0000644000471100001440000001522407512373374016631 0ustar # pm3dConvertToImage.awk # Written by Petr Mikulik, mikulik@physics.muni.cz # Code of pm3dImage contributed by Dick Crawford # Version: 8. 7. 2002 # # This awk script tries to compress maps in a postscript file created by pm3d # or gnuplot with pm3d splotting mode. If the input data formed a rectangular # equidistant map (matrix), then its postscript representation is converted # into an image operator with 256 levels (of gray or colour). This conversion # makes the image 20 times smaller. # # Usage: # gnuplot>set out "|awk -f pm3dConvertToImage.awk >image.ps" # or # your_shell>awk -f pm3dConvertToImage.awk image.ps # # Distribution policy: this script belongs to the distribution of pm3d and # gnuplot programs. # # Notes: # - no use of run length encoding etc --- you are welcome to contribute # an awk implementation # # History of changes: # - 8. 7. 2002 Petr Mikulik: Don't fail on empty map. Treat properly both # cases of scans_in_x. # - 4. 7. 2002 Petr Mikulik: Fix for compressing several images in one file. # - 3. 10. 2001 Petr Mikulik: Replaced "stroke" by "Stroke" in the "/g" # definition - fixes conversion of colour images. # - 16. 5. 2000 Petr Mikulik and Dick Crawford: The first version. # # License: public domain. BEGIN { err = "/dev/stderr" if (ARGC!=1) { print "pm3dConvertToImage.awk --- (c) Petr Mikulik, Brno. Version 8. 7. 2002" >err print "Compression of matrix-like pm3d .ps files into 256 levels image. See also" >err print "header of this script for more info." >err print "Usage:\n\t[stdout | ] awk -f pm3dConvertToImage.awk [out_file.ps" >err print "Example for gnuplot:" >err print "\tset out \"|awk -f pm3dConvertToImage.awk >smaller.ps\"" >err print "Hint: the region to be converted is between %pm3d_map_begin and %pm3d_map_end" >err print "keywords. Rename them to avoid converting specified region." >err error = -1 exit(1) } # Setup of main variables. inside_pm3d_map = 0 pm3d_images = 0 # The following global variables will be used: error=0 pm3dline=0 scans=0; scan_pts=0; scans_in_x=0 x1=0; y1 = 0; cell_x=0; cell_y=0 x2=0; y2 = 0; x2last=0; y2last=0 } ######################################## # Add definition of pm3dImage to the dictionary $1=="/BoxFill" && $NF=="def" { print print "/Stroke {stroke} def" print "/pm3dImage {/I exch def gsave % saves the input array" print " /ps 1 string def" # print " Color not {/g {setgray} def} if % avoid stroke in the usual def of /g" print " /Stroke {} def % avoid stroke in the usual def" print " I 0 get I 1 get translate I 2 get rotate % translate & rotate" print " /XCell I 3 get I 5 get div def % pixel width" print " /YCell I 4 get I 6 get div def % pixel height" print " 0 1 I 6 get 1 sub { % loop over rows" print " /Y exch YCell mul def % save y-coordinate" print " 0 1 I 5 get 1 sub { % loop over columns" print " XCell mul Y moveto XCell 0 rlineto 0 YCell rlineto" print " XCell neg 0 rlineto closepath % outline pixel" print " currentfile ps readhexstring pop % read hex value" print " 0 get cvi 255 div g % convert to [0,1]" print " fill } for } for grestore % fill pixel & close loops" print " } def" next } ######################################## # Start pm3d map region. !inside_pm3d_map && $1 == "%pm3d_map_begin" { inside_pm3d_map = 1 pm3d_images++ # initialize variables for the image description pm3dline = 0 scans = 1 row[scans] = "" x2 = -29999.123; y2 = -29999.123 next } ######################################## # Outside pm3d map region. !inside_pm3d_map { if ($1 == "%%Creator:") print $0 ", compressed by pm3dConvertToImage.awk" else if ($1 == "/g" && $2 == "{stroke") { # Replace "/g {stroke ...}" by "/g {Stroke ...}" (stroke cannot be used # in the pm3dImage region. $2 = "{Stroke" print } else print next } ######################################## # End of pm3d map region: write all. $1 == "%pm3d_map_end" { inside_pm3d_map = 0 if (pm3dline==0) { # empty map pm3d_images--; next; } if (scans_in_x) { grid_y = scan_pts; grid_x = scans; } else { grid_x = scan_pts; grid_y = scans; } print "Info on pm3d image region number " pm3d_images ": grid " grid_x " x " grid_y >err print "\tpoints: " pm3dline " scans: " scans " start point: " x1","y1 " end point: " x2","y2 >err # write image header print "%pm3d_image_begin" if (x1 > x2) { x1+=cell_x; x2+=cell_x; } # align offset of the image corner by the cell dimension if (y1 > y2) { y1+=cell_y; y2+=cell_y; } #ORIGINAL: scalex = (grid_x <= 1) ? cell_x : (x2-x1)*(grid_x/(grid_x-1)) scaley = (grid_y <= 1) ? cell_y : (y2-y1)*(grid_y/(grid_y-1)) if (scans_in_x) print "[ " x1 " " y1 " 90 " scaley " -" scalex " " grid_y " " grid_x " ] pm3dImage" else print "[ " x1 " " y1 " 0 " scalex " " scaley " " grid_x " " grid_y " ] pm3dImage" if (scan_pts*scans != pm3dline) { print "ERROR: pm3d image is not grid, exiting." >err error=1 exit(8) } # write the substituted image stuff for (i=1; i<=scans; i++) print row[i]; # write the tail of the image environment print "%pm3d_image_end" next } ######################################## # Read in the pm3d map/image data. { if (NF!=12 || toupper($2)!="G" || $5!="N") { print "ERROR: Wrong (non-pm3d map) data on line " NR ", exiting." >err error=1 exit(8) } pm3dline++; if (pm3dline==1) { # first point of the map x1=$3; y1=$4; cell_x=$8; x2=x1; y2=y1; cell_y=$9; } else { x2last=x2; y2last=y2; # remember previous point x2=$3; y2=$4; # remember the current point } if (pm3dline==2) { # determine whether data are scans in x or in y if (y1==y2) { # y=const, scan in x scans_in_x = 0; if (x1==x2) { print "ERROR: First two points are identical?! Exiting." >err error=1 exit(5) } } else { # x=const, scan in y if (x1!=x2) { print "ERROR: Map is obviously not rectangular, exiting." >err error=1 exit(5) } scans_in_x = 1; } } if ( pm3dline>2 && ((!scans_in_x && y2!=y2last) || (scans_in_x && x2!=x2last)) ) { if (scans==1) scan_pts = pm3dline-1 scans++ row[scans] = "" } # now remember the intensity row[scans] = row[scans] sprintf( "%02X", $1*255 ); next } # reading map/image data ######################################## # The end. END { if (error == 0 && inside_pm3d_map) { print "ERROR: Corrupted pm3d block: \"%pm3d_map_end\" not found." >err error=1 } if (error==0) { if (pm3d_images==0) print "No pm3d image found in the input file." >err else print "There were " pm3d_images " pm3d image(s) found in the input file." >err } else if (error>0) { print "An ERROR has been reported. This file is INCORRECT." print "An ERROR has been reported. Output file is INCORRECT." >err } } # eof pm3dConvertToImage.awk gnuplot-4.6.4/pm3d/README0000644000471100001440000000034610037240351011652 0ustar Subdirectories: contrib/scripts - contributions using pm3d (colour points, compress pm3d postscript file, ...); see README therein Note: other useful gnuplot scripts can be found on gnuplot.sourceforge.net. gnuplot-4.6.4/README0000644000471100001440000001563211210554151011013 0ustar The Gnuplot Plotting Utility **************************** Gnuplot is a command-line driven interactive function plotting utility for linux, OSX, MSWin, VMS, and many other platforms. The software is copyrighted but freely distributed (i.e., you don't have to pay for it). It was originally intended as graphical program to allow scientists and students to visualize mathematical functions and data. Gnuplot supports many different types of terminals, plotters, and printers (including many color devices, and pseudo-devices like LaTeX) and is easily extensible to include new devices. The "GNU" in gnuplot is NOT related to the Free Software Foundation, the naming is just a coincidence (and a long story; see the gnuplot FAQ for details). Thus gnuplot is not covered by the GPL (GNU Public License) copyleft, but rather by its own copyright statement, included in all source code files. However, some of the associated drivers and support utilities are dual-licensed. Gnuplot handles both curves (2 dimensions) and surfaces (3 dimensions). Surfaces can be plotted as a mesh fitting the specified function, floating in the 3-d coordinate space, or as a contour plot on the x-y plane. For 2-d plots, there are also many plot styles including lines, points, boxes, heat maps, stacked histograms, and contoured projections of 3D data. Graphs may be labeled with arbitrary labels and arrows, axis labels, a title, date and time, and a key. The interface includes command-line editing and history on most platforms. The new gnuplot user should begin by reading the general information available by typing `help` after running gnuplot. Then read about the `plot` command (type `help plot`). The manual for gnuplot (which is a nicely formatted version of the on-line help information) is available as a PDF document, created via LaTeX. Look at the docs/Makefile for other options for formatting the documentation. The gnuplot source code and executables may be copied and/or modified freely as long as the copyright messages are left intact. Copyright and Porting ===================== See the Copyright file for copyright conditions. See the ChangeLog and docs/old/History.old file for changes to gnuplot. Build instructions are in the INSTALL file. Some additional informations needed to port gnuplot to new platforms not covered by GNU autoconf can be found in the PORTING file. The code for gnuplot was written with portability in mind, and has been run on an amazing variety of operating systems and hardware over the years. However, the current code has not been tested on all those older platforms and some of the conditional code to support quirks of obsolete compilers and OS features has been removed. You can expect that gnuplot will compile more or less out of the box on any system which has the GNU C compiler gcc or other ANSI-compliant C compiler. Some specific [optional] drivers are written in C++ or lua. Help and Bug Reports ******************** Your primary place to go searching for help with gnuplot should be the project's webpage. At the time of this writing, that's http://gnuplot.sourceforge.net It has links to a lot of material, including the project's development page, also at SourceForge: http://sourceforge.net/projects/gnuplot/ Note that since gnuplot has nothing to do with the GNU project, please don't ask them for help or information about gnuplot; also, please don't ask us about GNU stuff. Please note that all bug reports should include the machine you are using, the operating system and it's version, plotting devices, and the version of gnuplot that you are running. If you could add such information to any messages on the Usenet newsgroup or the other mailing lists and trackers, that'd be nice, too. Usenet ====== Additional help can be obtained from the USENET newsgroup comp.graphics.apps.gnuplot. This newsgroup is the first place to ask for routine help. It used to be gatewayed bi-directionally to the info-gnuplot mailing list, but that had to be stopped when we moved the mailing lists off Dartmouth. Mailing Lists ============= As of gnuplot-4.0, the gnuplot mailing lists have moved away from their old home at Dartmouth College (thanks, guys!) to the project's general new development site provided by SourceForge.net. To subscribe to these new mailing lists, use the Web Interface provided by SourceForge.net: http://sourceforge.net/mail/?group_id=2055 The main lists you may be interested in are "gnuplot-info" and "gnuplot-bugs". "gnuplot-info" is for general discussion and questions about how to use the program. But as noted above, using the Usenet newsgroup for this kind of communication is almost certainly better both for you and for us. "gnuplot-bugs" is NOT an appropriate place to ask questions on how to solve a gnuplot problem or even to report a bug that you haven't investigated personally. It is far more likely you'll get the help you need for this kind of problem from comp.graphics.apps.gnuplot or the gnuplot-info mailing list. Using "gnuplot-bugs" is also slightly disfavoured, because it makes it hard for us to keep track what bugs are currently under investigation, and hard for you to check if maybe the bug you've found has already been reported by somebody else before. We would thus like to ask to you please use the "Bug Tracker" system that is part of gnuplot's development web site at SourceForge.net instead of this mailing list. If you found a fix already, pleast post it in "diff -c" or "diff -u" format done against the most current official version of gnuplot or the latest alpha or beta release of the next version. All major modifications should include documentation and, if new features were added, a demo file. Finally, it is much easier to integrate smaller stepwise modifications rather than one gigantic diff file which represented months of changes. There are separate tracking systems for Feature Requests and proposed patches that implement new features, also hosted at SourceForge. Discussions about plans for new features or other significant changes should be announced and discussed on the developers' mailing list, gnuplot-beta, which is also hosted by SourceForge.net. Where to get updates to gnuplot =============================== Congratulations on getting this version of gnuplot! Unfortunately, it may not be the most recent version ("you never know where this version has been!"). You can be sure that it IS the most recent version by checking one of the official distribution sites, guaranteed to be kept up to date (of course, if you got this file from one of those sites, you don't need to check!). To hear automatically about future releases (and other gnuplot news), read the newsgroup; see above. ---- -Thomas Williams- -Alex Woo- -David Denholm- -Lars Hecking- -Ethan Merritt- gnuplot-4.6.4/INSTALL0000644000471100001440000006537411723732447011213 0ustar Table of contents: ================== * Installation from sources - For the impatient provides a quick overview of configuration and compilation instructions. - Lists those options to the configure shell script which are unique to gnuplot. - Compiling by config/makefile.* for specific platforms. * More details about ./configure --with-PACKAGE[=OPTION] * Platform compiler problems * Environment variables - The environment variables used by running gnuplot. * How to test gnuplot * Installing WPS object for gnuplot on OS/2 - How to install WPS icon for drag&drop. * Compiling Gnuplot with the wxWidgets terminal - Notes about the requirements of the `wxt` terminal. If you are installing a binary package, you may still want to check out some sections of this document, particularly the one discussing environment variables. Installation from sources ========================= For the impatient ----------------- Configuration options are in the Makefile and in src/term.h, which selects the set of terminal drivers to be compiled in. The recommended way to configure both of these is the GNU-style "./configure" script described below and described further in INSTALL.gnu. This script is provided as part of the distributed source package, but if you are using sources downloaded directly from a CVS repository you may need to regenerate it using the preliminary script "./prepare". A complete overview of configure options is below in the Basic Installation section. On platforms which do not support GNU autoconf/configure, ie. most non-Unix platforms, look for a makefile that looks suitable in the "config" directory. Check "config/README" to see which of them to use for which platform. File location defaults ---------------------- PREFIX /usr/local gnuplot PREFIX/bin gnuplot_x11 PREFIX/libexec/gnuplot/$VERSION gnuplot.1 PREFIX/man/man1 gnuplot.gih PREFIX/share/gnuplot/$VERSION Gnuplot PREFIX/share/gnuplot/$VERSION/app-defaults (please copy to system app-defaults location) The only files where the runtime location is defined at compile time are gnuplot.gih and show.c. This is important if gnuplot is not installed by running 'make install'. The default path for the help library, gnuplot.gih, can be controlled in several different ways: o use configure's --with-gihdir option to specify the full path to the directory where gnuplot.gih is to be installed, e.g. ./configure --with-gihdir=/opt/docs o use configure's --datadir= option to specify a version and package independent data dir prefix, e.g. ./configure --datadir='/opt/docs' gnuplot will look for the online help file, gnuplot.gih, in /opt/docs/gnuplot/$VERSION. o with configure's --prefix= option, eg. ./configure --prefix=/gnuplot gnuplot will look for the online help file, gnuplot.gih, in /gnuplot/share/gnuplot/$VERSION. Attention: This option affects the location of *all* installed files! o at make time, eg. make HELPFILE='/gnuplot/docs/gnuplot.gih' gnuplot will look for the online help file /gnuplot/docs/gnupot.gih. o at execution time by specifying the helpfile with the environment variable GNUHELP (see "Environment Variables" below). The default location of the main executable can be controlled in different ways: o with configure's --prefix= option, eg. ./configure --prefix=/gnuplot gnuplot will be installed as /gnuplot/bin/gnuplot. Attention: This affects the location of *all* installed files! o with configure's --bindir= option, eg. ./configure --bindir='/gnuplot/bin' gnuplot will be installed as /gnuplot/bin/gnuplot. o at make time, eg. make bindir='/gnuplot/bin' gnuplot will be installed as /gnuplot/bin/gnuplot. The default location of the additional executable, like gnuplot_x11, can be controlled in different ways: o with configure's --prefix= option, eg. ./configure --prefix=/gnuplot gnuplot_x11 will be installed as /gnuplot/libexec/gnuplot/4.0/gnuplot_x11. Attention: This affects the location of *all* installed files! o with configure's --libexecdir= option, eg. ./configure --libexecdir='/gnuplot/lib' gnuplot_x11 will be installed as /gnuplot/lib/gnuplot/4.0/gnuplot_x11 o at make time, eg. make X11_DRIVER_DIR='/gnuplot/lib/4.0' gnuplot_x11 will be installed as /gnuplot/lib/4.0/gnuplot_x11 If you don't install the program at the place chosen by ./configure, e.g. by overriding the "prefix" at "make install" time, files written by the `save' command cannot be used as scripts on Un*x platforms, so this should be avoided. There is no way to specify the location of the executables during runtime. Other platforms are not affected by this. The gnuplot demo files are not installed by default, mainly because there is no universally agreed place where such files should go. If desired, they should be copied manually to a location of choice. Unix, configure --------------- On Unix, use $ ./configure $ make [ Optionally run demos--see "How to test gnuplot" below. ] $ make install If gcc is installed, it is used by default. A different compiler can be used by passing its name to configure: $ ./configure CC=c89 Any environment settings for CFLAGS are included into the Makefile, so please make sure that these are really needed. There are several options available for configure that you may want to change. A complete list of options is available through $ ./configure --help Some options relevant to gnuplot are listed below: --prefix=PREFIX Install architecture-independent files in PREFIX [/usr/local] --exec-prefix=EPREFIX Install architecture-specific file in EPREFIX [PREFIX] --bindir=DIR user executables in DIR [EPREFIX/bin] The gnuplot binary is installed this directory --libexecdir=DIR program executables in DIR [EPREFIX/libexec] gnuplot_x11 goes into $libexecdir/gnuplot/. --datadir=DIR Read-only architecture-independent data in DIR [PREFIX/share]. The gnuplot help file is installed in this directory. --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --mandir=DIR Man documentation in DIR [PREFIX/man] --disable-history-file do not use history file --disable-mouse disable mouse for interactive terminals --disable-x11-mbfonts disable multi-byte font support for x11 --disable-binary-x11-polygon disable binary_x11_polygon --disable-x11-external disable drawing to windows belonging to external apps --disable-volatile-data disable zooming of volatile data --disable-raise-console spacebar in plot window does not raise console --disable-macros disable command line macros --enable-h3d-gridbox enable gridbox optimization in hidden3d code --disable-wxwidgets wxWidgets terminal (default enabled) --enable-backwards-compatibility enable deprecated syntax --disable-bitmap-terminals the code in bitmap.c has a copyright notice that is more restrictive that the gnuplot license. This option disables inclusion of this code and any terminals that depend on it (mostly HP deskjet era dot matrix printers). --with-readline={gnu|bsd|builtin} Override the automatic choice of terminal input modes. See below for more detail. Options marked with (*) are enabled by default, ie. these features or packages are used if configure detects them even if the corresponding option is not specified. Please note that the `--with-PACKAGE' options can have additional arguments: o `--with-PACKAGE' is equivalent to `--with-PACKAGE=yes' o `--with-PACKAGE=no' disables checking for PACKAGE. It has the same effect as `--without-PACKAGE'. o `--with-PACKAGE=DIR' checks for PACKAGE in DIR Linux ----- Ubuntu: ./configure fails to find lua support because Ubuntu packages it as "lua5.1" rather than "lua". You can fix this by adding a symlink prior to running ./configure ln -s /usr/lib/pkgconfig/lua5.1.pc /usr/lib/pkgconfig/lua.pc Mac OSX ------- Readline issues: As I understand the situation, Apple ships OSX with a "fake" libreadline shared library. The file /usr/lib/libreadline.dylib is really a symlink to a compatibility layer over the BSD libedit library. But the compatibility isn't complete, and in particular it is missing many of the routines used for readline support by gnuplot. As of version 4.4, the ./configure script should be able to cope with this. But you will still be left without some of the functionality of the "real" libreadline. For one thing, libedit doesn't handle UTF input. You have several options: 1) Delete the fake libreadline libraries from OSX and install the real gnu libreadline as a system library. 2) Install the real gnu libreadline into your personal account and tell gnuplot to use it: ./configure --with-readline=/my/private/readline/installdir This may require some playing around with additional -L and -I definitions in CFLAGS, and is probably harder than replacing the system copy of the library. 3) Use gnuplot's built-in readline routines. These have been enhanced in version 4.6 to support UTF-8 input and tab-completion of file names. ./configure --with-readline=builtin wxt terminal: Cairo & pango need to be installed first on Mac, I recommend using MacPorts building universal (i386 libraries): sudo port install cairo +no_x11 +quartz +universal sudo port install pango +no_x11 +quartz +universal Next gnuplot may be compiled with shipped with Mac OS X 10.6 SL wxWidgets using: ./configure CPPFLAGS='-arch i386' LDFLAGS='-arch i386' NOTE: 10.6 SL by default generates x86_64 code, but wxWidgets stable is using Carbon API on Mac which is 32-bit only, that makes compiling gnuplot, cairo and pango to i386 necessary. VMS --- John Hasstedt has written configure.vms, a command file that creates the necessary make and option files to build gnuplot. See the file for instructions on using it. If you have problems with it, the old build files are still included; instructions for using them follow. On VMS, you can use MMS, MMK, or another make utility, or you can use BUILDVMS.COM. The supplied files work with Alpha/VMS V6.2 and DECC V5.7; you may get warnings or more serious errors depending on the versions of the C compiler, the C run-time libraries, and VMS on your system. To compile using MMK: MMK/DESCRIPTION=MAKEFILE.VMS To compile using MMS on VAX: MMS/DESCRIPTION=MAKEFILE.VMS To compile using MMS on Alpha: MMS/DESCRIPTION=MAKEFILE.VMS/MACRO=__ALPHA__=1 Alternatively, you can use MAKE_VMS.COM. This command file will run MMK or MMS to build gnuplot. If you don't have either one installed, it will use the command file. The first parameter on the command line is the compiler you want to use (default DECC). It may sometimes be useful to add `/IGNORE=WARNING' to the `MMS' call. To compile using GNUC or VAXC: add /MACRO=GNUC or /MACRO=VAXC to the above command To compile with another make utility: check the documentation of your utility to specify the description file and any necessary macros (__ALPHA__, GNUC, or VAXC) Or if you don't have a suitable make: @BUILDVMS To tell gnuplot where to find the help library: $ define gnuplot$help disk:[directory]gnuplot.hlb Alternatively, put the help in the main system help library. MS-Windows ---------- In order to build the help file you require the "Microsoft HTML Help 1.4 SDK", which is freely downloadable here: http://go.microsoft.com/fwlink/?LinkId=154968 General install instructions: Build the program using one of the ways shown below this note. Some of the Makefiles include an "install" target (e.g. config/mingw/Makefile). Alternatively, put wgnuplot.exe, wgnuplot.chm and wgnuplot.mnu all in a single directory somewhere. You may want to add that directory to your PATH. There's no installer for gnuplot, so if you want a desktop link, program manager group or an association of *.plt or *.gpl files to wgnuplot, you'll have to do all that yourself. We currently support and test building with the following compilers and Makefiles: MinGW/MSYS: config/mingw/Makefile Microsoft Visual C++: config/msvc/Makefile OpenWatcom: config/watcom/Makefile Cygwin: config/cygwin/Makefile Further building instructions are given in correspondig Makefiles. Note that Makefiles contain a configuration section which you have to adopt to your actual setup! [NOTE: gnuplot can no longer be built for 16-bit Windows versions.] MSDOS ----- Using DJGPP (32-bit DOS port of GNU CC) Basically the same as Unix+configure. Andris Pavenis has contributed a shell script which makes the whole process even easier: just run djconfig.sh, and then make. Only if you don't have a complete Unix toolset installed with your DJGPP, it is recommended to use makefile.dj2 instead: copy makefile.dj2 makefile make [NOTE: the 16-bit DOS versions of gnuplot no longer work. gnuplot has outgrown this platform.] OS/2 ---- To compile under OS/2 (2.x and above) you need the development suite EMX 0.9 (including gcc). You should also have GNU Make and IBM's IPFC (Information Presentation Facility Compiler, available from the Developer's Toolkit; nowadays it's accessible through an IBM website for free!). At the beginning of makefile.os2 you will find a configuration section where you have to adjust all settings which control the build process. Most important is probably to select the terminal devices which should be supported. You can create a version offering PM graphics as well as X11 support (to use with XFree86). Support for these two terminals is provided by additional executables. Be sure to enable only those devices for which you have the necessary software already installed. Also ensure that the libraries and the sources are all compiled (not) using the '-Zmt' flags. Executing make -f makefile.os2 should create a default build while make -f makefile.os2 help will show you all pre-defined targets. See other sections of the manuals for more information about installing/using gnuplot on OS/2. Ultrix, SunOS, other systems with a SysV-like sprintf() function ---------------------------------------------------------------- The mousing code requires a patch in order to compile properly on these. You can download this patch from the contributed scripts section of the gnuplot project pages on SourceForge: http://gnuplot.sourceforge.net/scripts/ Or you can avoid the problem via ./configure --disable-mouse More details about ./configure --with-PACKAGE[=OPTION] ====================================================== Every `--with-PACKAGE' option sets a `with_package' variable in configure. Depending on how `--with-PACKAGE' was invoked, there are only three different possible values for the `with_package' variable: Option $with_package ---------------------------------------- (not specified) yes or no; default set in configure --with-package yes --with-package=yes yes --with-package=no no --with-package=DIR DIR --without-package no In gnuplot, the following --with-PACKAGE options are available. The --with-PACKAGE=DIR form is always required if a package is installed in a non-default location that is not searched by the preprocessor or linker. --with-readline Use whatever readline support is detected automatically, either an external library or gnuplot's built-in version. This is the default. --with-readline=builtin Use gnuplot's own builtin readline routines even if a GNU or BSD readline library is detected. --without-readline (same as --with-readline=no) Do not use any readline processing. --with-readline=gnu Use the GNU readline library instead of gnuplot's builtin readline. --with-readline[=DIR] Use the GNU readline library instead of gnuplot's builtin readline. This form is required if GNU readline is not installed in a default location. --with-gd[=DIR] Dto. for Thomas Boutell's gd library. configure determines whether the found library supports gif, png, jpeg, and freetype. This option is on by default, i.e. configure will check if the library exists, and use it if found, if you don't specify any option regarding this package. --with-pdf[=DIR] Dto. for the pdf library. This option is on by default. Platform compiler problems ========================== This section addresses trouble shooting and testing issues. Userland questions are answered in the FAQ. Platform and compiler notes --------------------------- Generally, if you think that configure has made a mistake in detecting platform features, you should consider that a bug either in GNU autoconf or in gnuplot's use of it, which you should report. As a workaround you can override such faulty tests in a site-wide collection of preset configure test results, or manually override them after running configure. Example: configure was for some reason unable to detect the memset() function, but you are sure it is ok to use on your platform. To fix that, you'll have to edit the generated config.h and change the line /* #undef HAVE_MEMSET */ to #define HAVE_MEMSET 1 Note that changing such defines from outside config.h, eg. via 'make DEFS=-DHAVE_MEMSET' is wrong, because config.h will usually override such changes. Also note that this change will be lost whenever you re-run configure. - gcc -ansi If you wish to compile with gcc -ansi (CC='gcc -ansi -pedantic' ./configure), additional platform specific defines may be necessary to include non-ANSI function prototypes. E.g. on Solaris, -D__EXTENSIONS__ is needed. Otherwise, non-declared functions not returning int will be assumed to return int, with possibly dangerous consequences. Especially scpecfun.c is vulnerable here. - HP-UX 9.x It is recommended to use gcc, although the native compiler cc may work with warnings. - HP-UX 10.x and above GCC has known problems on this platform if configured to use HP's assembler. The telltale symptom are tic labels all ending up at position 0.0. So either make sure you use a GCC configured to use GNU as, or use HP's ANSI cc (the unbundled one). - Alpha CPUs The Alpha family of CPUs exhibits somewhat unusual behaviour in the case of floating point exceptions. In default mode, it doesn't comply to IEEE floating point standards very well, leading to crashes of the whole program because of a floating point exception in certain cases. In order to avoid these, you may want to turn on IEEE compatibility mode in your compiler flags. For DEC cc, the relevant option is `-ieee', for GCC, it's `-mieee'. The configure script tries to automatically detect this situation and apply the flag, but you may want to double-check it. - SunOS / Solaris There are known issues with regard to compiler support for Booleans. You may have to tweak gnuplot's definition of TBOOLEAN. Environment variables ===================== See 'help environment'. If the environment variable GNUTERM is found, it is used as the terminal type. Otherwise, in some cases the variable TERM will be used, or the hardware may be detected automatically. If all else fails, a compile-time default will be used. The PC version looks for the environment variable GNUPLOT to contain the name of the directory from which to load the initialization file GNUPLOT.INI and also to be used as the home directory in ~ substitution. See the help on 'start_up' for more information. HOME is examined as a directory where a .gnuplot startup file might be found. See help on "start-up". The Atari/MTOS version uses GNUPLOTPATH. If defined, the environment variable GNUHELP is used for the name of the .gih help file, otherwise HELPFILE (defined in makefile or command.c) is used. The VMS version looks for the logical name GNUPLOT$HELP to locate the help library. The usual system-wide environment variable is used to locate a command line shell to be used for executing commands and starting sub-shells. On the DOS family of platforms (including all versions of Windows and OS/2) the variable looked at is COMSPEC. Other platforms will consult SHELL. If gnuplot is configured to use its own, private history file, the size of this file can be set via GNUPLOT_HISTORY_SIZE. The default is 666 (lines). If gnuplot is configured for the X11 window system, it looks for the X11 driver program in GNUPLOT_DRIVER_DIR. The default position used for the driver is fixed by the build process, so you should only have to set this if you moved gnuplot_x11 away from its original location. GDFONTPATH is the directory where png terminal searches TrueType and Adobe Type 1 fonts. You should set it to directory where files like arial.ttf and Symbol.pfa exist. GNUPLOT_DEFAULT_GDFONT is the default font to be used by the png and jpeg terminal types. This must either be a full path to the font file or the face name of a font found in the GDFONTPATH search path. GNUPLOT_FONTPATH is used by the postscript driver as search path for postscript (Adobe Type 1 and Type 2) fonts. It is also used by the svg driver to look for svg or Adobe cef fonts. GNUPLOT_PS_DIR is used by the postscript driver to use external prologue files. Depending on the build process, gnuplot contains either a builtin copy of those files or simply a default hardcoded path. Use this variable to test the postscript terminal with custom prologue files. GNUPLOT_LIB may be used to define additional search directories for data and command files. The variable may contain a single directory name, or a list of directories separated by a platform-specific path separator, eg. ':' on Unix, or ';' on DOS/Windows/OS/2/Amiga platforms. The contents of GNUPLOT_LIB are appended to the `loadpath` variable, but not saved with the `save` and `save set` commands. GNUFITLOG holds the name of a file that saves fit results. The default is fit.log. If the name ends with a "/" or "\", it is treated as a directory name, and "fit.log" will be created as a file in that directory. The CGI drivers need the CGIPATH environment variable to set the path to the CGI agents, and the CGIDISP and/or CGIPRNT environment variables to the CGI agents, and the CGIDISP and/or CGIPRNT environment variables to set the output devices. If creating dynamically linked executables, it may be necessary to add flags to the LIBS variable in Makefile to make sure gnuplot finds all required libraries at runtime. Systems like SunOS and Solaris use -R to specify the runtime library search path, whereas OSF/Dec Unix, Irix and Linux use -rpath. If this is not possible, the LD_LIBRARY_PATH environment variable should be set. Generally it's recommended to install shared libraries only in places that are already searched by the linker without such options. LD_LIBRARY_PATH is the second-best choice. How to test gnuplot =================== No comprehensive test suite for gnuplot's features has been written to date. However, the supplied demo files provide a good method of testing commonly used features. All command line examples below assume Unix Bourne shell syntax. Individual demo files can be run interactively by eg. $ cd gnuplot/demo $ gnuplot simple.dem or $ GNUPLOT_DRIVER_DIR=../src ../src/gnuplot simple.dem and gnuplot prompts the user to "Hit return to continue" to cycle through all the plots (the GNUPLOT_DRIVER_DIR= part is only required if you are using the X11 or BeOS plotting device and the gnuplot_x11/gnuplot_be binary has not been installed yet, or if you want to test the external binaries you just compiled at the same time). To run the demos in a specified file without interaction, one can use $ gnuplot simple.dem set term dumb gnuplot> load 'all.dem' To test the capabilities of the terminal you are using, there is the 'test' command: gnuplot> test `test` creates a display of line and point styles and other useful things appropriate for the terminal you are using. Installing WPS object for gnuplot on OS/2 ========================================= GNUPLOT can be run from the command line of an OS/2 session, or can be set up as a program object in the WPS. GNUPLOT starts up as a command line session which accepts the usual GNUPLOT input. The Presentation Manager (PM) window for graphics display is only opened when the first 'plot' or 'splot' command is entered. If GNUPLOT is set up as a program object, it can be configured for 'drag and drop' in the usual way, by specifying '%*' as the program parameter. The PM window has facilities for printing the plot, for changing the fonts used in the plot, and so on. These of course are handled through the usual PM interface. In addition, you can 'drop' a font onto the window to change the font. The usual GNUPLOT commands can also be used to produce output on supported devices. Settings and the positions and sizes of the windows can be saved in the file gnushell.ini. This file is saved in the program's working directory; several different directories can be set up (as program objects) with different options, if you wish. PM terminal is fully mouse-capable. Type 'm' to switch the mouse on/off (see 'help mouse' for more details), or 'h' for the full list of current hotkeys (see also 'help bind'). Compiling Gnuplot with the wxWidgets terminal ============================================== The `wxt` terminal provides an interactive windowed output. The code is cross-platform and can be compiled as soon as the following requirements are met: First, this terminal is based on the wxWidgets library. This library can be found on http://www.wxwidgets.org. It comes in different flavours corresponding to the underlying API : Microsoft Windows ("wxMSW"), GTK+ ("wxGTK"), X11 ("wxX11"), MacOS ("wxMAC"), etc. Then, the terminal needs the Cairo library (no specific backend is required) which can be found on http://www.cairographics.org, and the Pango library, which can be found on http://www.pango.org and need to be compiled with its Cairo backend. On Unix, use the usual `./configure; make; make install' build process to compile this terminal. On Windows, please use the MinGW/MSYS makefile, namely config/makefile.mgw. MinGW and MSYS can be found on http://www.mingw.org. gnuplot-4.6.4/term/0000755000471100001440000000000012223340010011063 5ustar gnuplot-4.6.4/term/next.trm0000644000471100001440000013111510460036603012602 0ustar /* Hello, Emacs, this is -*- objc -*- * $Id: next.trm,v 1.27 2006/07/21 02:35:47 sfeam Exp $ * */ /* GNUPLOT - next.trm */ /*[ * Copyright 1991 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c via ../term.h. * * This terminal driver supports: * next * * AUTHORS * Robert Lutwak from Russell Lang's post.trm * 'old' option invokes Nick Strobel's original, single viewport terminal * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * * This terminal attempts to connect, via the NeXTstep Distributed * Objects system, to the "gnuplotServer." If there is no such * service registered with the OS, the terminal attempts to fire * up GnuTerm.app. If the user has not set the environment variable * GNUTERMPATH, the terminal uses the users ApplicationPaths Workspace * dwrite to search for GnuTerm.app (Note: this is usually something * like ~/Apps, ~/LocalApps, ~/NextApps, etc.). * In order to use this filter, you MUST have GnuTerm.app installed * on your system. * * Once connected to the server, this filter is basically Russell Lang's * Postscript filter, except that the resultant postscript code * is sent, via the D.O. system, to GnuTerm.app, which manages * the windows which produce the postscript output on the screen. * * * Defaults are * 'set term next new dashed auto "Helvetica" 14' * * To change font to Times-Roman and font size to 20pts use * 'set term next "Times-Roman" 20'. * * to choose window by title * 'set term next title "Window title" * * Monitor Options: * monochrome, color * * To invoke Nick Strobel's old terminal * 'set term next old' */ #include "driver.h" #ifdef TERM_REGISTER register_term(next) #endif #ifdef TERM_PROTO /* whether or not to compile support for the old (self-contained) NeXT terminal */ /* #define NEXT_OLDTERMINAL 1 */ #import #import /* setProtocolForProxy */ #import /* setProtocolForProxy */ #import #import #import #ifdef NEXT_OLDTERMINAL static void window_create __PROTO((void)); @interface EpsViewer:Application { id theNewWin; } -windowCreate:(NXCoord) width Height:(NXCoord) height; -(NXRect *) nextRectForWidth:(NXCoord) width Height:(NXCoord) height; @end #endif /* NEXT_OLDTERMINAL */ TERM_PUBLIC void NEXT_options __PROTO((void)); TERM_PUBLIC void NEXT_common_init __PROTO((int uses_fonts, unsigned int xoff, unsigned int yoff, unsigned int xsize, unsigned int ysize, char **dict)); TERM_PUBLIC void NEXT_init __PROTO((void)); TERM_PUBLIC void NEXT_graphics __PROTO((void)); TERM_PUBLIC void NEXT_text __PROTO((void)); TERM_PUBLIC void NEXT_reset __PROTO((void)); TERM_PUBLIC void NEXT_linetype __PROTO((int linetype)); TERM_PUBLIC void NEXT_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void NEXT_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void NEXT_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int NEXT_text_angle __PROTO((int ang)); TERM_PUBLIC int NEXT_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void NEXT_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC int NEXT_set_font __PROTO((const char *font)); TERM_PUBLIC char *NEXT_RememberFont __PROTO((char *fname)); TERM_PUBLIC void NEXT_set_pointsize __PROTO((double size)); #define NEXT_POINT_TYPES 8 /* div */ #define NEXT_XOFF 1 /* page offset in pts */ #define NEXT_YOFF 1 #define NEXT_XMAX 6400 #define NEXT_YMAX 4800 #define NEXT_XLAST (NEXT_XMAX - 1) #define NEXT_YLAST (NEXT_YMAX - 1) #define NEXT_VTIC (NEXT_YMAX/80) #define NEXT_HTIC (NEXT_YMAX/80) #define NEXT_SC (10) /* scale is 1pt = 10 units */ #define NEXT_LW (0.5*NEXT_SC) /* linewidth = 0.5 pts */ #define NEXT_VCHAR (14*NEXT_SC) /* default is 14 point characters */ #define NEXT_HCHAR (14*NEXT_SC*6/10) #define GOT_NEXT_PROTO #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY @interface GnuTermDriver:Object < NXSenderIsInvalid > { id server; } -senderIsInvalid:(id) sender; -plot:(char *) PSstr; -init; @end #define DEFAULTNEXTSIZE 10000 static id gnuTermAccess; /* local object manages the D.O. connection */ static char *NEXTBuffer, *NEXTBufAt, *NEXTBufEnd; static int NEXTsize; static char NEXTTmpBuf[1000]; static void NEXTPrintf(char *,...); static TBOOLEAN NEXT_oldterminal = FALSE; /*static TBOOLEAN NEXT_colordetect();*/ static char NEXT_title[MAX_LINE_LEN + 1]; /* name of font */ static char NEXT_font[MAX_LINE_LEN + 1] = "Helvetica"; /* name of font */ static int NEXT_fontsize = 14; /* size of font in pts */ static int NEXT_default_font[MAX_ID_LEN+1] = {'\0'}; static TBOOLEAN NEXT_color = FALSE; static TBOOLEAN NEXT_solid = FALSE; /* use dashed lines */ static int NEXT_path_count = 0; /* count of lines in path */ static int NEXT_ang = 0; /* text angle */ static enum JUSTIFY NEXT_justify = LEFT; /* text is flush left */ static TBOOLEAN NEXT_duplex_state = FALSE; static TBOOLEAN NEXT_duplex_option = FALSE; static char GPFAR *GPFAR NEXT_header[] = { "/M {moveto} bind def\n", "/L {lineto} bind def\n", "/R {rmoveto} bind def\n", "/V {rlineto} bind def\n", "/vpt2 vpt 2 mul def\n", "/hpt2 hpt 2 mul def\n", /* flush left show */ "/Lshow { currentpoint stroke M\n", " 0 vshift R show } def\n", /* flush right show */ "/Rshow { currentpoint stroke M\n", " dup stringwidth pop neg vshift R show } def\n", /* centred show */ "/Cshow { currentpoint stroke M\n", " dup stringwidth pop -2 div vshift R show } def\n", /* Dash or Color Line */ "/DL { Color {setrgbcolor Solid {pop []} if 0 setdash }\n", " {pop pop pop Solid {pop []} if 0 setdash} ifelse } def\n", /* Border Lines */ "/BL { stroke gnulinewidth 2 mul setlinewidth } def\n", /* Axes Lines */ "/AL { stroke gnulinewidth 2 div setlinewidth } def\n", /* Plot Lines */ "/PL { stroke gnulinewidth setlinewidth } def\n", /* Line Types */ "/LTb { BL [] 0 0 0 DL } def\n", /* border */ "/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def\n", /* axes */ "/LT0 { PL [] 0 1 0 DL } def\n", "/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def\n", "/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def\n", "/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def\n", "/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def\n", "/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def\n", "/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def\n", "/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def\n", "/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def\n", /* Point (Round) */ /* Matt Heffron make it round */ "/Pnt { stroke [] 0 setdash\n", " gsave 1 setlinecap M 0 0 V stroke grestore } def\n", /* Diamond */ "/Dia { stroke [] 0 setdash 2 copy vpt add M\n", " hpt neg vpt neg V hpt vpt neg V\n", " hpt vpt V hpt neg vpt V closepath stroke\n", " Pnt } def\n", /* Plus */ "/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V\n", " currentpoint stroke M\n", " hpt neg vpt neg R hpt2 0 V stroke\n", " } def\n", /* Box */ "/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M\n", " 0 vpt2 neg V hpt2 0 V 0 vpt2 V\n", " hpt2 neg 0 V closepath stroke\n", " Pnt } def\n", /* Cross (X) */ "/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M\n", " hpt2 vpt2 neg V currentpoint stroke M\n", " hpt2 neg 0 R hpt2 vpt2 V stroke } def\n", /* Triangle Up*/ "/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M\n", " hpt neg vpt -1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt 1.62 mul V closepath stroke\n", " Pnt } def\n", /* Star */ "/Star { 2 copy Pls Crs } def\n", /* div added filed box */ /* Filled Box */ "/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M\n", " 0 vpt2 neg V hpt2 0 V 0 vpt2 V\n", " hpt2 neg 0 V closepath fill } def\n", /* div added filled triangle */ /* Triangle Up, Filled */ "/TriUF { stroke [] 0 setdash vpt 1.12 mul add M\n", " hpt neg vpt -1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt 1.62 mul V closepath fill } def\n", /* Matt Heffron: added a few more types */ /* Triangle Down */ "/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M\n", " hpt neg vpt 1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt -1.62 mul V closepath stroke\n", " Pnt } def\n", /* Triangle Down, Filled*/ "/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M\n", " hpt neg vpt 1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt -1.62 mul V closepath fill} def\n", /* Diamond, Filled */ "/DiaF { stroke [] 0 setdash vpt add M\n", " hpt neg vpt neg V hpt vpt neg V\n", " hpt vpt V hpt neg vpt V closepath fill } def\n", /* Pentagon */ "/Pent { stroke [] 0 setdash 2 copy gsave\n", " translate 0 hpt M 4 {72 rotate 0 hpt L} repeat\n", " closepath stroke grestore Pnt } def\n", /* Pentagon, Filled */ "/PentF { stroke [] 0 setdash gsave\n", " translate 0 hpt M 4 {72 rotate 0 hpt L} repeat\n", " closepath fill grestore } def\n", /* Circle */ "/Circle { stroke [] 0 setdash 2 copy\n", " hpt 0 360 arc stroke Pnt } def\n", /* Circle,Filled */ "/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def\n", /* 16 differently filled circles */ "/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def\n", "/C1 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 0 90 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C2 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 90 180 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C3 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 0 180 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C4 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 180 270 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C5 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 0 90 arc\n", " 2 copy moveto\n", " 2 copy vpt 180 270 arc closepath fill\n", " vpt 0 360 arc } bind def\n", "/C6 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 90 270 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C7 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 0 270 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C8 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 270 360 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C9 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 270 450 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill\n", " 2 copy moveto\n", " 2 copy vpt 90 180 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C11 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 0 90 arc closepath fill\n", " 2 copy moveto\n", " 2 copy vpt 180 360 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C12 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 180 360 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C13 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 0 90 arc closepath fill\n", " 2 copy moveto\n", " 2 copy vpt 180 360 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C14 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 90 360 arc closepath fill\n", " vpt 0 360 arc } bind def\n", "/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", /* Auxiliary definitions for rectangles */ "/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto\n", " neg 0 rlineto closepath } bind def\n", "/Square { dup Rec } bind def\n", "/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def\n", /* 16 differently filled squares */ "/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def\n", "/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def\n", "/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def\n", "/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def\n", "/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def\n", "/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill\n", " exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def\n", "/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def\n", "/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill\n", " 2 copy vpt Square fill\n", " Bsquare } bind def\n", "/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def\n", "/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def\n", "/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill\n", " Bsquare } bind def\n", "/S11 { 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill\n", " Bsquare } bind def\n", "/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def\n", "/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill\n", " 2 copy vpt Square fill Bsquare } bind def\n", "/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill\n", " 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def\n", "/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def\n", /* 16 different diamonds (actually just rotated squares) */ "/D0 { gsave translate 45 rotate 0 0 Box stroke grestore } bind def\n", "/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def\n", "/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def\n", "/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def\n", "/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def\n", "/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def\n", "/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def\n", "/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def\n", "/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def\n", "/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def\n", "/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def\n", "/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def\n", "/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def\n", "/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def\n", "/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def\n", "/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def\n", NULL }; static char GPFAR *GPFAR ENHNEXT_header[] = { /* For MFshow and MFwidth the tos is an array with the string and font info: */ /* [ ] */ "/MFshow {{dup dup 0 get findfont exch 1 get scalefont setfont\n", " [ currentpoint ] exch dup 2 get 0 exch rmoveto dup 4 get show dup\n", " 3 get {2 get neg 0 exch rmoveto pop} {pop aload pop moveto}ifelse} forall} bind def\n", "/MFwidth {0 exch {dup 3 get{dup dup 0 get findfont exch 1 get scalefont setfont\n", " 4 get stringwidth pop add}\n", " {pop} ifelse} forall} bind def\n", /* flush left show */ "/MLshow { currentpoint stroke M\n", " 0 exch R MFshow } bind def\n", /* flush right show */ "/MRshow { currentpoint stroke M\n", " exch dup MFwidth neg 3 -1 roll R MFshow } def\n", /* centred show */ "/MCshow { currentpoint stroke M\n", " exch dup MFwidth -2 div 3 -1 roll R MFshow } def\n", NULL }; /* added to post by Matt Heffron */ /* moved to post.trm by drd */ struct NEXT_FontName { char *name; struct NEXT_FontName *next; } *NEXT_DocFonts = NULL; enum NEXT_id { NEXT_DEFAULT, NEXT_MONOCHROME, NEXT_COLOR, NEXT_SOLID, NEXT_DASHED, NEXT_SIMPLEX, NEXT_DUPLEX, NEXT_DEFAULTPLEX, NEXT_OLD, NEXT_NEW, NEXT_TITLE, NEXT_OTHER }; static struct gen_table NEXT_opts[] = { { "d$efault", NEXT_DEFAULT }, { "mono$chrome", NEXT_MONOCHROME }, { "col$or", NEXT_COLOR }, { "col$our", NEXT_COLOR }, { "so$lid", NEXT_SOLID }, { "da$shed", NEXT_DASHED }, { "si$mplex", NEXT_SIMPLEX }, { "du$plex", NEXT_DUPLEX }, { "defaultp$lex", NEXT_DEFAULTPLEX }, { "old", NEXT_OLD }, { "new", NEXT_NEW }, { "ti$tle", NEXT_TITLE }, { NULL, NEXT_OTHER } }; TERM_PUBLIC void NEXT_options() { char buf[40]; struct value a; while (!END_OF_COMMAND) { switch(lookup_table(&NEXT_opts[0],c_token)) { case NEXT_DEFAULT: NEXT_oldterminal = FALSE; /*NEXT_color=NEXT_colordetect(); */ NEXT_color = FALSE; NEXT_solid = FALSE; NEXT_duplex_option = FALSE; strcpy(NEXT_font, "Helvetica"); NEXT_fontsize = 14; term->v_char = (unsigned int) (NEXT_fontsize * NEXT_SC); term->h_char = (unsigned int) (NEXT_fontsize * NEXT_SC * 6 / 10); term->put_text = NEXT_put_text; c_token++; break; case NEXT_MONOCHROME: NEXT_color = FALSE; c_token++; break; case NEXT_COLOR: NEXT_color = TRUE; c_token++; break; case NEXT_SOLID: NEXT_solid = TRUE; c_token++; break; case NEXT_DASHED: NEXT_solid = FALSE; c_token++; break; case NEXT_SIMPLEX: NEXT_duplex_state = FALSE; NEXT_duplex_option = TRUE; c_token++; break; case NEXT_DUPLEX: NEXT_duplex_state = TRUE; NEXT_duplex_option = TRUE; c_token++; break; case NEXT_DEFAULTPLEX: NEXT_duplex_option = FALSE; c_token++; break; case NEXT_OLD: NEXT_oldterminal = TRUE; c_token++; break; case NEXT_NEW: NEXT_oldterminal = FALSE; c_token++; break; case NEXT_TITLE: c_token++; if (!isstring(c_token)) { fprintf(stderr, "usage: set term next title \"newtitle\"\n"); } quote_str(NEXT_title, c_token, MAX_LINE_LEN + 1); break; case NEXT_OTHER: default: if (isstring(c_token)) { quote_str(NEXT_font, c_token, MAX_LINE_LEN + 1); /* We must have font size specified */ NEXT_fontsize = (int) real(const_express(&a)); term->v_char = (unsigned int) (NEXT_fontsize * NEXT_SC); term->h_char = (unsigned int) (NEXT_fontsize * NEXT_SC * 6 / 10); sprintf(NEXT_default_font, "%s,%d", NEXT_font, NEXT_fontsize); } break; } } sprintf(term_options, "%s %s %s %s \"%s\" %d title \"%s\"", NEXT_oldterminal ? "old" : "new", NEXT_color ? "color" : "monochrome", NEXT_solid ? "solid" : "dashed", NEXT_duplex_option ? (NEXT_duplex_state ? "duplex" : "simplex") : "defaultplex", NEXT_font, NEXT_fontsize, NEXT_title); } TERM_PUBLIC char * NEXT_RememberFont(char *fname) { struct NEXT_FontName *fnp; for (fnp = NEXT_DocFonts; fnp && strcmp(fnp->name, fname); fnp = fnp->next); if (fnp) return fnp->name; /* we must have found it in the list */ if (encoding == S_ENC_ISO8859_1) { NEXTPrintf("/%s reencodeISO def\n", fname); } fnp = (struct NEXT_FontName *) gp_alloc(sizeof(struct NEXT_FontName), "PostScript Font record"); fnp->name = gp_alloc(1 + strlen(fname), "PostScript Font name"); strcpy(fnp->name, fname); fnp->next = NEXT_DocFonts; NEXT_DocFonts = fnp; return fnp->name; } int NEXT_pen_x, NEXT_pen_y; int NEXT_taken; int NEXT_linetype_last; TBOOLEAN NEXT_relative_ok; /* store settings passed to common_init() for use in NEXT_graphics() * are reserved for storing the term options */ static int NEXT_common_uses_fonts; static unsigned int NEXT_common_xoff, NEXT_common_yoff; TERM_PUBLIC void NEXT_common_init( int uses_fonts, /* 0 for NEXT(la)tex */ unsigned int xoff, unsigned int yoff, /* offset - 50 for /post, 0 for NEXT(la)tex */ unsigned int width, unsigned int height, /* for bounding box */ char **dict) /* extra entries for the dictionary */ { static char GPFAR NEXTi1[] = "%%%%Creator: gnuplot\n\ %%%%DocumentFonts: %s\n"; static char GPFAR NEXTi2[] = "%%%%EndComments\n\ /gnudict 120 dict def\ngnudict begin\n\ /Color %s def\n\ /Solid %s def\n\ /gnulinewidth %.3f def\n\ /vshift %d def\n\ /dl {%d mul} def\n\ /hpt %.1f def\n\ /vpt %.1f def\n"; static char GPFAR *NEXT_iso_8859_1_encoding[] = { "/reencodeISO {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "/Encoding ISOLatin1Encoding def\n", "currentdict end definefont\n", "} def\n", "/ISOLatin1Encoding [\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n", "/parenleft/parenright/asterisk/plus/comma/minus/period/slash\n", "/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n", "/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N\n", "/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n", "/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n", "/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve\n", "/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut\n", "/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar\n", "/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot\n", "/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior\n", "/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine\n", "/guillemotright/onequarter/onehalf/threequarters/questiondown\n", "/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla\n", "/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex\n", "/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis\n", "/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute\n", "/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis\n", "/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave\n", "/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex\n", "/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis\n", "/yacute/thorn/ydieresis\n", "] def\n", NULL}; struct termentry *t = term; int i; NEXT_common_uses_fonts = uses_fonts; NEXT_common_xoff = xoff; NEXT_common_yoff = yoff; NEXTPrintf("%%!NEXT-Adobe-2.0\n"); NEXTPrintf(NEXTi1, uses_fonts ? "(atend)" : ""); NEXTPrintf("%%%%BoundingBox: %d %d %d %d\n", xoff, yoff, (int) (xsize * width / NEXT_SC + 0.5 + xoff), (int) (ysize * height / NEXT_SC + 0.5 + yoff)); NEXTPrintf(NEXTi2, NEXT_color ? "true" : "false", NEXT_solid ? "true" : "false", NEXT_LW, /* line width */ (int) (t->v_char) / (-3), /* shift for vertical centring */ NEXT_SC, /* dash length */ NEXT_HTIC / 2.0, /* half point width */ NEXT_VTIC / 2.0); /* half point height */ if (uses_fonts && (encoding == S_ENC_ISO8859_1)) { for (i = 0; NEXT_iso_8859_1_encoding[i] != NULL; i++) { NEXTPrintf("%s", NEXT_iso_8859_1_encoding[i]); } } for (i = 0; NEXT_header[i] != NULL; i++) NEXTPrintf("%s", NEXT_header[i]); if (NEXT_duplex_option) NEXTPrintf("statusdict begin %s setduplexmode end\n", NEXT_duplex_state ? "true" : "false"); NEXT_RememberFont(NEXT_font); if (dict) while (*dict) NEXTPrintf("%s", *(dict++)); NEXTPrintf("end\n%%%%EndProlog\n"); } /* the init fn for the NeXT Terminal driver */ TERM_PUBLIC void NEXT_init() { /* Initialize output string */ NEXTsize = DEFAULTNEXTSIZE; if ((NEXTBuffer = malloc(NEXTsize)) == NULL) { printf("Malloc error in next filter init\n"); exit(1); } NEXTBufEnd = NEXTBuffer + NEXTsize; NEXTBufAt = NEXTBuffer; term->xmax = NEXT_XMAX; term->ymax = NEXT_YMAX; #ifdef NEXT_OLDTERMINAL if (NEXT_oldterminal) window_create(); else gnuTermAccess =[[GnuTermDriver alloc] init]; #else gnuTermAccess =[[GnuTermDriver alloc] init]; #endif } TERM_PUBLIC void NEXT_graphics() { static char GPFAR NEXTg1[] = "0 setgray\nnewpath\n"; struct termentry *t = term; *NEXTBuffer = 0; NEXTBufAt = NEXTBuffer; NEXT_common_init(1, NEXT_XOFF, NEXT_YOFF, term->xmax, term->ymax, ENHNEXT_header); NEXTPrintf("gnudict begin\ngsave\n"); NEXTPrintf("%d %d translate\n", NEXT_common_xoff, NEXT_common_yoff); NEXTPrintf("%.3f %.3f scale\n", 1.0 / NEXT_SC, 1.0 / NEXT_SC); NEXTPrintf(NEXTg1); if (NEXT_common_uses_fonts) NEXTPrintf("(%s) findfont %d scalefont setfont\n", NEXT_font, (t->v_char)); NEXT_path_count = 0; NEXT_relative_ok = FALSE; NEXT_pen_x = NEXT_pen_y = -4000; NEXT_taken = 0; NEXT_linetype_last = LT_UNDEFINED; #ifdef NEXT_OLDTERMINAL if (NEXT_oldterminal) { /* Fill window with white */ NEXTPrintf("1 setgray\n"); NEXTPrintf("0 0 %d %d rectfill\n", NEXT_XMAX, NEXT_YMAX); NEXTPrintf("0 setgray\n"); } #endif } TERM_PUBLIC void NEXT_text() { static DPSContext d; NEXT_path_count = 0; NEXTPrintf("stroke\ngrestore\nend\n"); /* Terminate string */ *NEXTBufAt = 0; if (NEXT_oldterminal) { d = DPSGetCurrentContext(); DPSPrintf(d, NEXTBuffer); DPSFlushContext(d); } else { /* Here's the call that dumps the string to the server */ [gnuTermAccess plot:NEXTBuffer]; } } TERM_PUBLIC void NEXT_reset() { NEXTPrintf("%%%%Trailer\n"); if (!NEXT_common_uses_fonts) { NEXTPrintf("%%%%DocumentFonts: "); while (NEXT_DocFonts) { struct NEXT_FontName *fnp; fnp = NEXT_DocFonts->next; NEXTPrintf("%s%s", NEXT_DocFonts->name, fnp ? ", " : "\n"); free(NEXT_DocFonts->name); free(NEXT_DocFonts); NEXT_DocFonts = fnp; } } } TERM_PUBLIC void NEXT_linetype(int linetype) { linetype = (linetype % 9) + 2; if (linetype < 0) linetype = 0; NEXT_relative_ok = FALSE; if (NEXT_linetype_last == linetype) return; NEXT_linetype_last = linetype; NEXTPrintf("LT%c\n", "ba012345678"[linetype]); NEXT_path_count = 0; } TERM_PUBLIC void NEXT_move(unsigned int x, unsigned int y) { int dx, dy; char abso[20], rel[20]; dx = x - NEXT_pen_x; dy = y - NEXT_pen_y; /* can't cancel all null moves--need a move after stroke'ing */ if (dx == 0 && dy == 0 && NEXT_relative_ok) return; sprintf(abso, "%d %d M\n", x, y); sprintf(rel, "%d %d R\n", dx, dy); if (strlen(rel) < strlen(abso) && NEXT_relative_ok) { NEXTPrintf("%s", rel); NEXT_taken++; } else NEXTPrintf("%s", abso); NEXT_relative_ok = TRUE; NEXT_path_count += 1; NEXT_pen_x = x; NEXT_pen_y = y; } TERM_PUBLIC void NEXT_vector(unsigned int x, unsigned int y) { int dx, dy; char abso[20], rel[20]; dx = x - NEXT_pen_x; dy = y - NEXT_pen_y; if (dx == 0 && dy == 0) return; sprintf(abso, "%d %d L\n", x, y); sprintf(rel, "%d %d V\n", dx, dy); if (strlen(rel) < strlen(abso) && NEXT_relative_ok) { NEXTPrintf("%s", rel); NEXT_taken++; } else NEXTPrintf("%s", abso); NEXT_relative_ok = TRUE; NEXT_path_count += 1; NEXT_pen_x = x; NEXT_pen_y = y; if (NEXT_path_count >= 400) { NEXTPrintf("currentpoint stroke M\n"); NEXT_path_count = 0; } } TERM_PUBLIC int NEXT_text_angle(int ang) { NEXT_ang = ang; return TRUE; } TERM_PUBLIC int NEXT_justify_text(enum JUSTIFY mode) { NEXT_justify = mode; return TRUE; } TERM_PUBLIC int NEXT_set_font(const char *font) { char name[32]; int size, sep; if (!font || !(*font)) font = NEXT_default_font; sep = strcspn(font, ","); strncpy(name, font, sep); name[sep] = NUL; size = NEXT_fontsize; if (font[set] == ',') sscanf(&(font[sep + 1]), "%d", &size); NEXTPrintf("/%s findfont %d scalefont setfont\n", name, size * NEXT_SC); NEXT_RememberFont(name); term->v_char = (unsigned int) (size * NEXT_SC); term->h_char = (unsigned int) (size * NEXT_SC * 6 / 10); return TRUE; } /* postscript point routines */ TERM_PUBLIC void NEXT_set_pointsize(double size) { NEXTPrintf("/vpt %.1f def /hpt %.1f def /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def\n", pointsize * NEXT_VTIC * 0.5, pointsize * NEXT_HTIC * 0.5); } TERM_PUBLIC void NEXT_point(unsigned int x, unsigned int y, int number) { static char *pointFNS[] = {"Pnt", "Pls", "Crs", "Star", "Box", "BoxF", "Circle", "CircleF", "TriU", "TriUF", "TriD", "TriDF", "Dia", "DiaF", "Pent", "PentF", "C0", "C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8", "C9", "C10", "C11", "C12", "C13", "C14", "C15", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "S10", "S11", "S12", "S13", "S14", "S15", "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D15" }; if (number < 0) number = -1; /* negative types are all 'dot' */ else number %= sizeof(pointFNS) / sizeof(pointFNS[0]) - 1; NEXTPrintf("%d %d %s\n", x, y, pointFNS[number + 1]); NEXT_relative_ok = 0; NEXT_path_count = 0; NEXT_linetype_last = LT_UNDEFINED; /* force next linetype change */ } /* All lifted from the enhanced postscript driver */ static TBOOLEAN NEXT_opened_string; /* try to cut out empty ()'s */ /* used in determining height of processed text */ static float NEXT_max_height, NEXT_min_height; /* process a bit of string, and return the last character used. * p is start of string * brace is TRUE to keep processing to }, FALSE for do one character * fontname & fontsize are obvious * base is the current baseline * widthflag is TRUE if the width of this should count, * FALSE for zero width boxes */ static char * NEXT_recurse( char *p, TBOOLEAN brace, char *fontname, double fontsize, double base, TBOOLEAN widthflag) { /* close a postscript string if it has been opened */ #define NEXT_FLUSH \ { if (NEXT_opened_string) \ { NEXTPrintf("%s", ")]\n"); \ NEXT_opened_string = FALSE; \ } \ } #define NEXT_OPEN \ { if (!NEXT_opened_string) \ { NEXTPrintf( "[(%s) %.1f %.1f %s (", \ fontname, fontsize, base, \ widthflag ? "true" : "false"); \ NEXT_opened_string = TRUE; \ } \ } /* Start each recursion with a clean string */ NEXT_FLUSH; if (base + fontsize > NEXT_max_height) { NEXT_max_height = base + fontsize; } if (base < NEXT_min_height) { NEXT_min_height = base; } for (; *p; ++p) { float shift; float f = 0; /* used for getting new font size */ char *localfontname, ch; switch (*p) { case '}': if (brace) return (p); fprintf(stderr, "next driver - spurious }\n"); break; case '_': case '^': shift = (*p == '^') ? 0.5 : -0.3; NEXT_FLUSH; p = NEXT_recurse(p + 1, FALSE, fontname, fontsize * 0.8, base + shift * fontsize, widthflag); break; case '{': /*{{{ recurse (possibly with a new font) */ if (*++p == '/') { /* then parse a fontname, optional fontsize */ while (*++p == ' '); localfontname = p; while ((ch = *p) > ' ' && ch != '=') ++p; if (ch == '=') { *p++ = '\0'; /*{{{ get optional font size */ f = (float) strtod(p, &p); if (f) f *= NEXT_SC; /* remember the scaling */ else f = fontsize; /*}}} */ } else { *p++ = '\0'; f = fontsize; } while (*p == ' ') ++p; if (*localfontname) localfontname = NEXT_RememberFont(localfontname); else localfontname = fontname; } else { localfontname = fontname; f = fontsize; } /*}}} */ p = NEXT_recurse(p, TRUE, localfontname, f, base, widthflag); NEXT_FLUSH break; case '@': /*{{{ phantom box - prints next 'char', then restores currentpoint */ NEXT_FLUSH p = NEXT_recurse(++p, FALSE, fontname, fontsize, base, FALSE); break; /*}}} */ case '(': case ')': /* special cases */ NEXT_OPEN NEXTPrintf("\\"); NEXTPrintf("%c", *p); break; /*}}} */ case '\\': /*{{{ is it an escape */ /* special cases */ if (p[1] == '\\' || p[1] == '(' || p[1] == ')') { NEXT_OPEN NEXTPrintf("%c", '\\'); } else if ((ch = p[1]) >= '0' && ch <= '7') { /* up to 3 octal digits */ NEXT_OPEN NEXTPrintf("%c", '\\'); NEXTPrintf("%c", ch); ++p; if ((ch = p[1]) >= '0' && ch <= '7') { NEXTPrintf("%c", ch); ++p; if ((ch = p[1]) >= '0' && ch <= '7') { NEXTPrintf("%c", ch); ++p; } } break; } ++p; /* just go and print it (fall into the 'default' case) */ /*}}} */ default: NEXT_OPEN NEXTPrintf("%c", *p); } /* like TeX, we only do one character in a recursion, unless it's * in braces */ if (!brace) { NEXT_FLUSH return (p); /* the ++p in the outer copy will increment us */ } } NEXT_FLUSH return p; } TERM_PUBLIC void NEXT_put_text(unsigned int x, unsigned int y, const char *str) { /* flush any pending graphics (all the XShow routines do this...) */ if (!strlen(str)) return; if (NEXT_path_count) { NEXTPrintf(" stroke\n"); NEXT_path_count = 0; NEXT_relative_ok = FALSE; } NEXT_move(x, y); if (NEXT_ang != 0) NEXTPrintf("currentpoint gsave translate %d rotate 0 0 moveto\n", NEXT_ang); NEXTPrintf("[ "); /* set up the globals */ NEXT_opened_string = FALSE; NEXT_max_height = -1000; NEXT_min_height = 1000; while (*(str = NEXT_recurse(str, TRUE, NEXT_font, (double) term->v_char, 0.0, TRUE))); NEXT_max_height += NEXT_min_height; NEXTPrintf("] %.1f ", -NEXT_max_height / 3); switch (NEXT_justify) { case LEFT: NEXTPrintf("MLshow\n"); break; case CENTRE: NEXTPrintf("MCshow\n"); break; case RIGHT: NEXTPrintf("MRshow\n"); break; } if (NEXT_ang != 0) NEXTPrintf("grestore\n"); NEXT_path_count = 0; NEXT_relative_ok = FALSE; } /* static TBOOLEAN NEXT_colordetect() { NXScreen * mainscreen; mainscreen = [Application mainScreen]; if (mainscreen->depth == NX_TwoBitGrayDepth) return(FALSE); return(TRUE); } */ /* This just packs all the postscript into one (possibly huge) string * which will be passed (as a fake pointer) via D.O. to the server */ void NEXTPrintf(char *fmt,...) { va_list ap; char *pb; int NEXToff; /* Process formatting instructions */ va_start(ap, fmt); vsprintf(NEXTTmpBuf, fmt, ap); va_end(ap); /* Add to buffer */ for (pb = NEXTTmpBuf; (*pb != 0); ++pb, ++NEXTBufAt) { /* reallocate if necessary */ if (NEXTBufAt >= NEXTBufEnd) { NEXToff = NEXTBufAt - NEXTBuffer; NEXTsize *= 2; NEXTBuffer = realloc(NEXTBuffer, NEXTsize); NEXTBufEnd = NEXTBuffer + NEXTsize; NEXTBufAt = NEXTBuffer + NEXToff; } *NEXTBufAt = *pb; } return; } /* This next section implements the GnuTermDriver object which manages the D.O. connection and interface to OBjC */ @protocol GnuTermServerMethods /*- (oneway) executePScode:(in char *)PStext termTitle:(in char *)title;*/ - executePScode:(in char *) PStext termTitle:(in char *) title; @end @implementation GnuTermDriver - init { NXConnection *myConnection; char serverpath[100], *envstring; int GnuTermPathSet = 0; /* Ask OS for connection to server */ server =[NXConnection connectToName:"gnuplotServer"]; /* Server is running ready to go */ if (server) /*printf("Connected to server\n") */ ; /* Server isn't running, we must fire it up */ else { /*printf("Launching GnuTerm\n"); */ *serverpath = 0; /* Check for path set in environment */ if ((envstring = getenv("GNUTERMPATH")) != (char *) NULL) { sprintf(serverpath, "%s/GnuTerm.app/GnuTerm", envstring); GnuTermPathSet = 1; } /* Not in environment */ else strcpy(serverpath, "GnuTerm"); /* Try to launch application */ if ([[Application workspace] launchApplication:serverpath] == NO) { printf("Failed to launch %s.\n", serverpath); /* Offer a little advice */ if (GnuTermPathSet) { printf("You must have setenv GNUTERMPATH to something wrong\n"); printf("I recommend you exit gnuplot and fix this.\n"); } else { printf("It must be located in ~/Apps or /LocalApps\n"); printf("I recommend that you either\n"); printf("- move GnuTerm.app to one of these locations\n"); printf("- set GNUTERMPATH with host%% setenv GNUTERMPATH /directory/containing_GnuTerm.app\n"); printf("- start GnuTerm ahead of the first plot command\n"); #ifdef NEXT_OLDTERMINAL printf("- use the old driver version (set term next old)\n"); #endif } } /* I wish the gnuplot terminal interface would let me return an error here. */ /* Application is launching */ else { /* Wait for it to register Server methods with OS */ do { server =[NXConnection connectToName:"gnuplotServer"]; } while (!server); /* This could result in a hang, but I've never seen it fail */ } } /* By limiting ourselves to known protocol * we speed up the messaging */ [server setProtocolForProxy:@protocol(GnuTermServerMethods)]; myConnection =[server connectionForProxy]; /* If the server dies we want to know about it */ [myConnection registerForInvalidationNotification:self]; /* In fact, we'll worry about it */ [NXPort worryAboutPortInvalidation]; return self; } -plot:(char *) PSstr; { /* If server has become invalid, re-initialize */ if (!server) [self init]; /* This is where we send the huge postscript string to the server Note: The D.O. system doesn't actually give this pointer to the server. The pointer is dereferenced on the client side and the resulting data is sent to the server. On the server side, space for the data is automatically allocated, and a pointer to the local data is received. For details check out: /NextLibrary/Documentation/NextDev/GeneralRef/06_DistributedObjects/IntroDistObjects.rtf */ /*printf("Calling server..."); */ [server executePScode: PSstr termTitle:NEXT_title]; /*printf("returned\n"); */ *NEXT_title = 0; return self; } /* This gets called by OS if server goes down */ -senderIsInvalid:(id) sender { server = 0; } @end #ifdef NEXT_OLDTERMINAL static void window_create() { float width, height; width = (xsize * (NEXT_XMAX) / NEXT_SC + 0.5 + NEXT_XOFF); height = (ysize * (NEXT_YMAX) / NEXT_SC + 0.5 + NEXT_YOFF); NXApp =[EpsViewer new]; [NXApp windowCreate: width Height:height]; } @implementation EpsViewer - windowCreate:(NXCoord) width Height:(NXCoord) height { /* create the new window, in a good place */ theNewWin =[Window newContent: [self nextRectForWidth: width Height:height] style: NX_TITLEDSTYLE backing: NX_RETAINED buttonMask: (NX_CLOSEBUTTONMASK | NX_MINIATURIZEBUTTONMASK) defer: NO]; /* we need to receive windowDidBecomeMain: and windowDidResignMain: */ [theNewWin setDelegate:self]; /* * create a new View, make it the contentView of our new window, * and destroy the window's old contentView */ [[theNewWin setContentView:[[View alloc] init]] free]; /* display the window, and bring it forth */ [theNewWin display]; [theNewWin makeKeyAndOrderFront:self]; /* [theNewWin orderBack:self]; */ /* show the frame */ return self; } /***************************************************************************/ /* nextRectForWidth:Height: - return the next good content rectangle */ /* from Carl F. Sutter's wonderful ViewGif2 'Controller' method... */ /***************************************************************************/ /* nextTopLeft - return the next good top left window position */ /***************************************************************************/ -(NXRect *) nextRectForWidth:(NXCoord) width Height:(NXCoord) height { #define OFFSET 10.0 #define MAX_STEPS 20 #define INITIAL_X 356.0 #define INITIAL_Y 241.0 NXPoint nxpTopLeft; NXRect nxrTemp; /* used to find window height */ NXRect nxrWinHeight; /* bounds of enclosing window */ NXSize nxsScreen; /* size of screen */ static NXRect nxrResult; /* the Answer! */ static int nCurStep = 0; /* find a good top-left coord */ nxpTopLeft.x = INITIAL_X + nCurStep * OFFSET; nxpTopLeft.y = INITIAL_Y + nCurStep * OFFSET; if (++nCurStep > MAX_STEPS) nCurStep = 0; /* find window height using nxrTemp */ nxrTemp.size.width = width; nxrTemp.size.height = height; nxrTemp.origin.x = nxrTemp.origin.y = 0; [Window getFrameRect: &nxrWinHeight forContentRect:&nxrTemp style:NX_TITLEDSTYLE]; [NXApp getScreenSize:&nxsScreen]; /* find the lower-left coord */ nxrResult.origin.x = nxpTopLeft.x; nxrResult.origin.y = nxsScreen.height - nxrWinHeight.size.height - nxpTopLeft.y; nxrResult.size.width = width; nxrResult.size.height = height; return (&nxrResult); } @end #endif /* NEXT_OLDTERMINAL */ #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(next_driver) "next", "Interface to GnuTerm.app under NeXTstep", NEXT_XMAX, NEXT_YMAX, NEXT_VCHAR, NEXT_HCHAR, NEXT_VTIC, NEXT_HTIC, NEXT_options, NEXT_init, NEXT_reset, NEXT_text, null_scale, NEXT_graphics, NEXT_move, NEXT_vector, NEXT_linetype, NEXT_put_text, NEXT_text_angle, NEXT_justify_text, NEXT_point, do_arrow, NEXT_set_font, NEXT_set_pointsize TERM_TABLE_END(next_driver) #undef LAST_TERM #define LAST_TERM next_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #define TERM_HELP_NEXT #ifdef TERM_HELP START_HELP(next) "1 next", "?commands set terminal next", "?set terminal next", "?set term next", "?terminal next", "?term next", "?next", "?NeXT", " Several options may be set in the next driver.", "", " Syntax:", " set terminal next {} { } {} {}", " {\"\"} {} title {\"\"}", "", " where is `default`, which sets all options to their defaults;", " is either `new` or `old`, where `old` invokes the old single window;", " is either `color` or `monochrome`;", " is either `solid` or `dashed`;", " \"\" is the name of a valid PostScript font;", " is the size of the font in PostScript points; and", " is the title for the GnuTerm window.", " Defaults are `new`, `monochrome`, `dashed`, \"Helvetica\", 14pt.", "", " Examples:", " set term next default", " set term next 22", " set term next color \"Times-Roman\" 14", " set term next color \"Helvetica\" 12 title \"MyPlot\"", " set term next old", "", " Pointsizes may be changed with `set linestyle`." END_HELP(next) #endif /* TERM_HELP */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/tpic.trm�������������������������������������������������������������������������0000644�0004711�0000144�00000064576�10460036604�012604� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: tpic.trm,v 1.21 2006/07/21 02:35:48 sfeam Exp $ */ /* GNUPLOT - tpic.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * The tpic \specials (version 2.2) for LaTeX. * * AUTHORS * Oh-Yeah? 3 Sep. 1992 (closely following eepic.trm by David Kotz) * A. Woo 5 Oct. 1992 (removed ansi prototypes for braindead compilers) * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * This file contains the tpic terminal driver for use with LaTeX. * This is an alternative to the latex and eepic drivers. You need * a printer driver that supports the tpic \specials version 2.2. * * Comparison with the eepic driver (eepic.trm): * Merits * - More point and line types * - Options to change point size, linewidth, dot & dash intervals * - Dotted and dashed lines for high-sample-rate curves (but may * depend on tpic (da & dt) implementation of your dvi driver :-) * - Overlapped points made fancier by tpic shading facility * - Optional comments for trimming figure margins * - No need for epic and eepic macros * Drawback * - You cannot use eepicemu macro for non-tpic-support dvi drivers * * LATEX must also be defined. */ /* These parameters can be modified as you like, through options. Say "set terminal tpic <pointsize> <linewidth> <interval>". <pointsize> and <linewidth> are integers in milli-inches; <interval> is a float in inches. If non-positive value is specified, the default (below) is chosen. */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(tpic) #endif #ifdef TERM_PROTO TERM_PUBLIC void TPIC_options __PROTO((void)); /* get size options */ TERM_PUBLIC void TPIC_init __PROTO((void)); TERM_PUBLIC void TPIC_reset __PROTO((void)); TERM_PUBLIC void TPIC_text __PROTO((void)); TERM_PUBLIC void TPIC_graphics __PROTO((void)); TERM_PUBLIC void TPIC_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void TPIC_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void TPIC_linetype __PROTO((int linetype)); TERM_PUBLIC void TPIC_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); /* ref point and text */ TERM_PUBLIC int TPIC_text_angle __PROTO((int ang)); TERM_PUBLIC int TPIC_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void TPIC_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void TPIC_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); /* tpic \specials unit in inches (1 milli-inch) */ #define TPIC_UNIT 0.001 /* 5 inches wide by 3 inches high (default) */ #define TPIC_XMAX (unsigned int) (5 / TPIC_UNIT) #define TPIC_YMAX (unsigned int) (3 / TPIC_UNIT) #define TPIC_PTS_PER_UNIT (72.27 * TPIC_UNIT) #define TPIC_HTIC (unsigned int) ( 5.0 / TPIC_PTS_PER_UNIT) /* 5pt */ #define TPIC_VTIC (unsigned int) ( 5.0 / TPIC_PTS_PER_UNIT) /* 5pt */ #define TPIC_HCHAR (unsigned int) ( 5.3 / TPIC_PTS_PER_UNIT) /* 5.3pt */ #define TPIC_VCHAR (unsigned int) (11.0 / TPIC_PTS_PER_UNIT) /* 11pt */ #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static int tpic_pointsize = 40; /* min point radius (in milli-inches) */ static int tpic_linewidth = 6; /* min line thickness (in milli-inches) */ static double tpic_interval = 0.1; /* min dot & dash intervals (in inches) */ /* ARROWS: same code as for LATEX */ /* figure out the best arrow. in latex.trm */ static void best_latex_arrow __PROTO((int sx, int sy, int ex, int ey, int who, int head)); /* all prototypes ... */ static void tpic_startline __PROTO((void)); static void tpic_endline __PROTO((void)); static void tpic_pushpath __PROTO((unsigned int x, unsigned int y)); static void tpic_scanpath __PROTO((void)); static void tpic_diamond __PROTO((int size)); static void tpic_plus __PROTO((int size)); static void tpic_box __PROTO((int size)); static void tpic_times __PROTO((int size)); static void tpic_triangle __PROTO((int size)); static void tpic_star __PROTO((int size)); static void tpic_hexagon __PROTO((int size)); static void tpic_circle __PROTO((int size)); static void tpic_doublecircle __PROTO((int size)); static void tpic_vercircle __PROTO((int size)); /* circle with | */ static void tpic_horcircle __PROTO((int size)); /* circle with - */ static void tpic_pluscircle __PROTO((int size)); /* circle with + */ static void tpic_timescircle __PROTO((int size)); /* circle with times */ static void tpic_starcircle __PROTO((int size)); /* circle with star */ static void tpic_dotcircle __PROTO((int size)); /* circle with dot (black circle) */ static void tpic_diamondcircle __PROTO((int size)); /* circle with black diamond */ static void tpic_boxcircle __PROTO((int size)); /* circle with black box */ static void tpic_trianglecircle __PROTO((int size)); /* circle with black triangle */ static void tpic_hexagoncircle __PROTO((int size)); /* circle with black hexagon */ static void tpic_plustimescircle __PROTO((int size)); /* no more idea ... with plus & times */ static void tpic_abspath __PROTO((unsigned int x, unsigned int y)); /* absolute coord */ static void tpic_path __PROTO((int x, int y)); static void tpic_flush __PROTO((void)); static void tpic_arc __PROTO((int radius)); /* actually, draw a full circle */ static void tpic_shade __PROTO((double grayscale)); static void tpic_pen __PROTO((int thickness)); static void tpic_dottedflush __PROTO((double interval)); static void tpic_dashedflush __PROTO((double interval)); typedef enum { tpic_none, tpic_white, tpic_gray, tpic_black } tpic_shadestyle; typedef enum { tpic_nosize, tpic_small, tpic_medium, tpic_large } tpic_size; typedef void (*tpic_function) __PROTO((int size)); typedef struct { tpic_shadestyle shadestyle; tpic_size size; tpic_function function; } tpic_point_info; /* POINTS */ static /*GPFAR */ tpic_point_info GPFAR tpic_point[] = { {tpic_white, tpic_medium, tpic_diamond}, {tpic_none, tpic_medium, tpic_plus}, {tpic_white, tpic_medium, tpic_box}, {tpic_none, tpic_medium, tpic_times}, {tpic_white, tpic_medium, tpic_triangle}, {tpic_none, tpic_medium, tpic_star}, {tpic_white, tpic_small, tpic_circle}, {tpic_white, tpic_medium, tpic_circle}, {tpic_white, tpic_large, tpic_circle}, {tpic_black, tpic_small, tpic_circle}, {tpic_black, tpic_medium, tpic_circle}, {tpic_black, tpic_large, tpic_circle}, {tpic_black, tpic_medium, tpic_diamond}, {tpic_black, tpic_medium, tpic_box}, {tpic_black, tpic_medium, tpic_triangle}, {tpic_white, tpic_medium, tpic_hexagon}, {tpic_black, tpic_medium, tpic_hexagon}, {tpic_white, tpic_medium, tpic_doublecircle}, {tpic_white, tpic_medium, tpic_vercircle}, {tpic_white, tpic_medium, tpic_horcircle}, {tpic_white, tpic_medium, tpic_pluscircle}, {tpic_white, tpic_medium, tpic_timescircle}, {tpic_white, tpic_medium, tpic_starcircle}, {tpic_black, tpic_medium, tpic_doublecircle}, {tpic_white, tpic_medium, tpic_dotcircle}, {tpic_white, tpic_medium, tpic_diamondcircle}, {tpic_white, tpic_medium, tpic_boxcircle}, {tpic_white, tpic_medium, tpic_trianglecircle}, {tpic_white, tpic_medium, tpic_hexagoncircle}, {tpic_white, tpic_medium, tpic_plustimescircle} }; typedef enum { tpic_solid, tpic_dotted, tpic_dashed, tpic_dashed_sdot, tpic_dashed_ddot } tpic_linestyle; typedef struct { tpic_size thickness, interval; tpic_linestyle linestyle; } tpic_line_info; /* LINES */ static /*GPFAR */ tpic_line_info GPFAR tpic_line[] = { {tpic_medium, tpic_nosize, tpic_solid}, /* -2 border */ {tpic_small, tpic_small, tpic_dashed}, /* -1 axes */ {tpic_small, tpic_nosize, tpic_solid}, {tpic_medium, tpic_nosize, tpic_solid}, {tpic_large, tpic_nosize, tpic_solid}, {tpic_small, tpic_small, tpic_dotted}, {tpic_medium, tpic_small, tpic_dotted}, {tpic_large, tpic_small, tpic_dotted}, {tpic_small, tpic_small, tpic_dashed}, {tpic_medium, tpic_small, tpic_dashed}, {tpic_large, tpic_small, tpic_dashed}, {tpic_small, tpic_small, tpic_dashed_sdot}, /* dash with single dots */ {tpic_medium, tpic_small, tpic_dashed_sdot}, {tpic_large, tpic_small, tpic_dashed_sdot}, {tpic_small, tpic_small, tpic_dashed_ddot}, /* dash with double dots */ {tpic_medium, tpic_small, tpic_dashed_ddot}, {tpic_large, tpic_small, tpic_dashed_ddot}, {tpic_small, tpic_medium, tpic_dotted}, {tpic_medium, tpic_medium, tpic_dotted}, {tpic_large, tpic_medium, tpic_dotted}, {tpic_small, tpic_medium, tpic_dashed}, {tpic_medium, tpic_medium, tpic_dashed}, {tpic_large, tpic_medium, tpic_dashed}, {tpic_small, tpic_medium, tpic_dashed_sdot}, {tpic_medium, tpic_medium, tpic_dashed_sdot}, {tpic_large, tpic_medium, tpic_dashed_sdot}, {tpic_small, tpic_medium, tpic_dashed_ddot}, {tpic_medium, tpic_medium, tpic_dashed_ddot}, {tpic_large, tpic_medium, tpic_dashed_ddot}, {tpic_small, tpic_large, tpic_dotted}, {tpic_medium, tpic_large, tpic_dotted}, {tpic_large, tpic_large, tpic_dotted}, {tpic_small, tpic_large, tpic_dashed}, {tpic_medium, tpic_large, tpic_dashed}, {tpic_large, tpic_large, tpic_dashed}, {tpic_small, tpic_large, tpic_dashed_sdot}, {tpic_medium, tpic_large, tpic_dashed_sdot}, {tpic_large, tpic_large, tpic_dashed_sdot}, {tpic_small, tpic_large, tpic_dashed_ddot}, {tpic_medium, tpic_large, tpic_dashed_ddot}, {tpic_large, tpic_large, tpic_dashed_ddot} }; TERM_PUBLIC void TPIC_options() { /* get size options */ struct value a; int ptsize, linewidth; double interval; if (!END_OF_COMMAND) { ptsize = (int) real(const_express(&a)); if (ptsize > 0) tpic_pointsize = ptsize; } if (!END_OF_COMMAND) { linewidth = (int) real(const_express(&a)); if (linewidth > 0) tpic_linewidth = linewidth; } if (!END_OF_COMMAND) { interval = (double) real(const_express(&a)); if (interval > 0) tpic_interval = interval; } sprintf(term_options, "%d %d %f", tpic_pointsize, tpic_linewidth, tpic_interval); } static unsigned int tpic_posx; /* current position */ static unsigned int tpic_posy; static int tpic_point_types; static int tpic_numlines; TERM_PUBLIC void TPIC_init() { static char GPFAR tpic1[] = "\ %% GNUPLOT: LaTeX picture using tpic \\specials\n\ %% with %d point types and %d line types\n\ %% Options: pointsize = %d, linewidth = %d, interval = %f\n\ %% To change above options, say:\n\ %% set terminal tpic pointsize_value linewidth_value interval_value\n\ %% (pointsize and linewidth - integers in milli-inches.\n\ %% interval - a float in inches. If zero is specified, \n\ %% the default value is chosen.)\n\ \\setlength{\\unitlength}{%fin}%%\n"; tpic_point_types = sizeof(tpic_point) / sizeof(tpic_point[0]); tpic_numlines = sizeof(tpic_line) / sizeof(tpic_line[0]); tpic_posx = tpic_posy = 0; TPIC_linetype(-1); fprintf(gpoutfile, tpic1, tpic_point_types, tpic_numlines - 2, tpic_pointsize, tpic_linewidth, tpic_interval, TPIC_UNIT); } TERM_PUBLIC void TPIC_reset() { tpic_endline(); tpic_posx = tpic_posy = 0; } TERM_PUBLIC void TPIC_text() { tpic_endline(); fputs("\\end{picture}\n", gpoutfile); } TERM_PUBLIC void TPIC_graphics() { register struct termentry *t = term; int left, right, top, bottom; /* margins */ static char GPFAR begin[] = "%s\\begin{picture}(%d,%d)(%d,%d)%% %s\n"; fprintf(gpoutfile, begin, "", t->xmax, t->ymax, 0, 0, ""); /* the following is dependent on boundary() function in graphics.c */ left = TPIC_HCHAR * 12; right = TPIC_HCHAR * 2 + TPIC_HTIC; bottom = TPIC_VCHAR * 7 / 2 + 1; top = TPIC_VCHAR * 5 / 2 - 1; fprintf(gpoutfile, begin, "%% ", t->xmax - left, t->ymax, left, 0, "trim left margin"); fprintf(gpoutfile, begin, "%% ", t->xmax - right, t->ymax, 0, 0, "trim right margin"); fprintf(gpoutfile, begin, "%% ", t->xmax - left - right, t->ymax, left, 0, "trim left & right margins"); fprintf(gpoutfile, begin, "%% ", t->xmax, t->ymax - top, 0, 0, "trim top margin"); fprintf(gpoutfile, begin, "%% ", t->xmax, t->ymax - bottom, 0, bottom, "trim bottom margin"); fprintf(gpoutfile, begin, "%% ", t->xmax, t->ymax - top - bottom, 0, bottom, "trim top & bottom margins"); fputs("\\footnotesize%\n", gpoutfile); } TERM_PUBLIC void TPIC_move(unsigned int x, unsigned int y) { tpic_endline(); tpic_posx = x; tpic_posy = y; } #define TPIC_LINEMAX 100 /* max value for linecount */ static TBOOLEAN tpic_inline = FALSE; /* are we in the middle of a line */ static int tpic_linecount = 0; /* number of points in line so far */ TERM_PUBLIC void TPIC_vector(unsigned int ux, unsigned int uy) { if (!tpic_inline) { tpic_startline(); } else if (tpic_linecount >= TPIC_LINEMAX) { /* Even though we are in middle of a path, we may start a new path command once in a while; if they are too long, latex will choke. */ tpic_endline(); tpic_startline(); } tpic_pushpath(ux, uy); tpic_posx = ux; tpic_posy = uy; } static int tpic_linetype; /* current line type */ static void tpic_startline() { /* private */ int thickness = 1; tpic_inline = TRUE; switch (tpic_line[tpic_linetype + 2].thickness) { case tpic_small: thickness = tpic_linewidth; break; case tpic_medium: thickness = (int) (tpic_linewidth * 3); break; case tpic_large: thickness = (int) (tpic_linewidth * 5); break; default: break; } tpic_pen(thickness); tpic_linecount = 0; tpic_pushpath(tpic_posx, tpic_posy); return; } static void tpic_endline() { /* private */ double interval = 1; if (tpic_inline) { tpic_scanpath(); /* draw actually */ switch (tpic_line[tpic_linetype + 2].interval) { case tpic_small: interval = tpic_interval; break; case tpic_medium: interval = tpic_interval * 2; break; case tpic_large: interval = tpic_interval * 3; break; case tpic_nosize: break; } switch (tpic_line[tpic_linetype + 2].linestyle) { case tpic_solid: tpic_flush(); break; case tpic_dotted: tpic_dottedflush(interval); break; case tpic_dashed: tpic_dashedflush(interval); break; case tpic_dashed_sdot: /* dashed with single dots in between */ tpic_dashedflush(interval); tpic_scanpath(); /* draw again */ tpic_dottedflush(interval / 2); break; case tpic_dashed_ddot: /* dashed with double dots in between */ tpic_dashedflush(interval); tpic_scanpath(); /* draw again */ tpic_dottedflush(interval / 3); break; } tpic_inline = FALSE; } return; } /* private: stack functions */ static unsigned int pathpoint[TPIC_LINEMAX][2]; /* point stack */ static void tpic_pushpath(unsigned int x, unsigned int y) { if (tpic_linecount < TPIC_LINEMAX) { pathpoint[tpic_linecount][0] = x; pathpoint[tpic_linecount][1] = y; tpic_linecount++; } return; } static void tpic_scanpath() { int i; for (i = 0; i < tpic_linecount; i++) tpic_abspath(pathpoint[i][0], pathpoint[i][1]); return; } TERM_PUBLIC void TPIC_linetype(int linetype) { tpic_endline(); if (linetype < -2) linetype = LT_BLACK; if (linetype >= tpic_numlines - 2) linetype %= (tpic_numlines - 2); tpic_linetype = linetype; } static int tpic_angle = 0; /* 0 = horizontal, 1 = vertical */ static enum JUSTIFY tpic_justify = LEFT; TERM_PUBLIC void TPIC_put_text(unsigned int x, unsigned int y, const char *str) { char *justify = NULL; tpic_endline(); fprintf(gpoutfile, "\\put(%d,%d)", x, y); if ((str[0] == '{') || (str[0] == '[')) { fprintf(gpoutfile, "{\\makebox(0,0)%s}\n", str); } else switch (tpic_angle) { case 0: /* horizontal */ switch (tpic_justify) { case LEFT: justify = "[l]"; break; case CENTRE: justify = ""; break; case RIGHT: justify = "[r]"; break; } fprintf(gpoutfile, "{\\makebox(0,0)%s{%s}}\n", justify, str); break; case 1: /* vertical */ /* we can't really write text vertically, but will put the ylabel centred at the left of the plot, and then we'll make a \shortstack */ switch (tpic_justify) { case LEFT: justify = "[lb]"; break; case CENTRE: justify = "[l]"; break; case RIGHT: justify = "[lt]"; break; } fprintf(gpoutfile, "{\\makebox(0,0)%s{\\shortstack{%s}}}\n", justify, str); break; } } TERM_PUBLIC int TPIC_text_angle(int ang) { tpic_angle = (ang ? 1 : 0); return (TRUE); } TERM_PUBLIC int TPIC_justify_text(enum JUSTIFY mode) { tpic_justify = mode; return (TRUE); } TERM_PUBLIC void TPIC_point(unsigned int x, unsigned int y, int number) { int size = 0; TPIC_move(x, y); /* Print the character defined by 'number'; number < 0 means to use a dot, otherwise one of the defined points. */ fprintf(gpoutfile, "\\put(%d,%d){", x, y); /* start putting */ if (number < 0) { fputs("\\rule{.1pt}{.1pt}", gpoutfile); /* tiny dot */ } else { number %= tpic_point_types; switch (tpic_point[number].shadestyle) { case tpic_white: tpic_pen(tpic_linewidth); /* set it thin */ tpic_shade(0.0); break; case tpic_gray: tpic_pen(tpic_linewidth); tpic_shade(0.5); break; case tpic_black: tpic_pen(tpic_linewidth); tpic_shade(1.0); break; case tpic_none: tpic_pen(tpic_linewidth * 3); /* set it thick */ break; } switch (tpic_point[number].size) { case tpic_small: size = tpic_pointsize; break; case tpic_medium: size = (int) (tpic_pointsize * 1.4142); break; case tpic_large: size = (int) (tpic_pointsize * 2.0); break; default: break; } (tpic_point[number].function) (size); } fputs("}%%\n", gpoutfile); /* end putting */ } TERM_PUBLIC void TPIC_arrow( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { best_latex_arrow(sx, sy, ex, ey, 1, head); /* call latex routine */ tpic_posx = ex; tpic_posy = ey; } /* private: draw points with tpic commands */ static void tpic_diamond(int size) { size = (int) (size * 1.4142); /* spread by sqrt(2) */ tpic_path(0, size); tpic_path(-size, 0); tpic_path(0, -size); tpic_path(size, 0); tpic_path(0, size); tpic_flush(); return; } static void tpic_plus(int size) { tpic_path(0, size); tpic_path(0, -size); tpic_flush(); tpic_path(size, 0); tpic_path(-size, 0); tpic_flush(); return; } static void tpic_box(int size) { tpic_path(size, size); tpic_path(-size, size); tpic_path(-size, -size); tpic_path(size, -size); tpic_path(size, size); tpic_flush(); return; } static void tpic_times(int size) { size = (int) (size / 1.4142); /* reduce by sqrt(2) */ tpic_path(size, size); tpic_path(-size, -size); tpic_flush(); tpic_path(size, -size); tpic_path(-size, size); tpic_flush(); return; } static void tpic_triangle(int size) { int x; size = (int) (size / 1.6119); /* reduce by sqrt(3 * sqrt(3) / 2) */ x = (int) (size * 1.7321); tpic_path(0, -size * 2); tpic_path(-x, size); tpic_path(x, size); tpic_path(0, -size * 2); tpic_flush(); return; } static void tpic_star(int size) { int x; size = (int) (size / 2); /* reduce by 2 */ x = (int) (size * 1.7321); tpic_path(0, size * 2); tpic_path(0, -size * 2); tpic_flush(); tpic_path(x, size); tpic_path(-x, -size); tpic_flush(); tpic_path(x, -size); tpic_path(-x, size); tpic_flush(); return; } static void tpic_hexagon(int size) { int x; size = (int) (size / 2); /* reduce by 2 */ x = (int) (size * 1.7321); tpic_path(0, size * 2); tpic_path(-x, size); tpic_path(-x, -size); tpic_path(0, -size * 2); tpic_path(x, -size); tpic_path(x, size); tpic_path(0, size * 2); tpic_flush(); return; } static void tpic_circle(int size) { tpic_arc(size); return; } static void tpic_doublecircle(int size) { tpic_arc(size); tpic_shade(0.0); tpic_arc(size / 2); return; } static void tpic_vercircle(int size) /* circle with | */ { tpic_arc(size); tpic_path(0, size); tpic_path(0, -size); tpic_flush(); return; } static void tpic_horcircle(int size) /* circle with - */ { tpic_arc(size); tpic_path(size, 0); tpic_path(-size, 0); tpic_flush(); return; } static void tpic_pluscircle(int size) /* circle with + */ { tpic_arc(size); tpic_plus(size); return; } static void tpic_timescircle(int size) /* circle with times */ { tpic_arc(size); tpic_times(size); return; } static void tpic_starcircle(int size) /* circle with star */ { tpic_arc(size); tpic_star(size); return; } static void tpic_dotcircle(int size) /* circle with dot (black circle) */ { tpic_arc(size); tpic_shade(1.0); tpic_arc(size / 2); return; } static void tpic_diamondcircle(int size) /* not enough? circle with black diamond */ { tpic_arc(size); tpic_shade(1.0); tpic_diamond((int) (size / 1.5)); return; } static void tpic_boxcircle(int size) /* need more? circle with black box */ { tpic_arc(size); tpic_shade(1.0); tpic_box((int) (size / 1.5)); return; } static void tpic_trianglecircle(int size) /* circle with black triangle */ { tpic_arc(size); tpic_shade(1.0); tpic_triangle((int) (size / 1.5)); return; } static void tpic_hexagoncircle(int size) /* how about circle with black hexagon? */ { tpic_arc(size); tpic_shade(1.0); tpic_hexagon((int) (size / 1.2)); return; } static void tpic_plustimescircle(int size) /* no more idea ... with plus & times */ { tpic_arc(size); tpic_plus(size); tpic_times(size); return; } /* private: draw lines */ static void tpic_abspath(unsigned int x, unsigned int y) { tpic_path(x, -y); fputs("%\n", gpoutfile); return; } /* private: tpic primitive functions */ static void tpic_path(int x, int y) { fprintf(gpoutfile, "\\special{pa %d %d}", x, y); return; } static void tpic_flush() { fputs("\\special{fp}%\n", gpoutfile); return; } static void tpic_arc(int radius) { /* actually, draw a full circle */ fprintf(gpoutfile, "\\special{ar 0 0 %d %d 0 7}", radius, radius); return; } static void tpic_shade(double grayscale) { fprintf(gpoutfile, "\\special{sh %f}", grayscale); return; } static void tpic_pen(int thickness) { fprintf(gpoutfile, "\\special{pn %d}", thickness); return; } static void tpic_dottedflush(double interval) { fprintf(gpoutfile, "\\special{dt %f}%%\n", interval); return; } static void tpic_dashedflush(double interval) { fprintf(gpoutfile, "\\special{da %f}%%\n", interval); return; } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(tpic_driver) "tpic", "TPIC -- LaTeX picture environment with tpic \\specials", TPIC_XMAX, TPIC_YMAX, TPIC_VCHAR, TPIC_HCHAR, TPIC_VTIC, TPIC_HTIC, TPIC_options, TPIC_init, TPIC_reset, TPIC_text, null_scale, TPIC_graphics, TPIC_move, TPIC_vector, TPIC_linetype, TPIC_put_text, TPIC_text_angle, TPIC_justify_text, TPIC_point, TPIC_arrow, set_font_null TERM_TABLE_END(tpic_driver) #undef LAST_TERM #define LAST_TERM tpic_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(tpic) "1 tpic", "?commands set terminal tpic", "?set terminal tpic", "?set term tpic", "?terminal tpic", "?term tpic", "?tpic", " The `tpic` terminal driver supports the LaTeX picture environment with tpic", " \\specials. It is an alternative to the `latex` and `eepic` terminal drivers.", " Options are the point size, line width, and dot-dash interval.", "", " Syntax:", " set terminal tpic <pointsize> <linewidth> <interval>", "", " where `pointsize` and `linewidth` are integers in milli-inches and `interval`", " is a float in inches. If a non-positive value is specified, the default is", " chosen: pointsize = 40, linewidth = 6, interval = 0.1.", "", " All drivers for LaTeX offer a special way of controlling text positioning:", " If any text string begins with '{', you also need to include a '}' at the", " end of the text, and the whole text will be centered both horizontally", " and vertically by LaTeX. --- If the text string begins with '[', you need", " to continue it with: a position specification (up to two out of t,b,l,r),", " ']{', the text itself, and finally, '}'. The text itself may be anything", " LaTeX can typeset as an LR-box. \\rule{}{}'s may help for best positioning.", "", " Examples:", " About label positioning:", " Use gnuplot defaults (mostly sensible, but sometimes not really best):", " set title '\\LaTeX\\ -- $ \\gamma $'", " Force centering both horizontally and vertically:", " set label '{\\LaTeX\\ -- $ \\gamma $}' at 0,0", " Specify own positioning (top here):", " set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'", " The other label -- account for long ticlabels:", " set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}}'" END_HELP(tpic) #endif /* TERM_TABLE */ ����������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/pstricks.trm���������������������������������������������������������������������0000644�0004711�0000144�00000045773�10527640712�013512� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hey Emacs this is -*- C -*- * * $Id: pstricks.trm,v 1.33 2006/11/18 17:24:26 sfeam Exp $ */ /* GNUPLOT - pstricks.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * The PSTricks macros for LaTeX. * * AUTHORS * David Kotz * * Raymond Toy toy@soho.crd.ge.com * Modified the eepic.trm file to use PSTricks macros instead. * * 20 Mar 93: * Utilized many suggestions from Gisli Ottarsson * (gisli@liapunov.eecs.umich.edu) to create a new version. * Should also work with TeX as well as LaTeX. * * If you have PSTricks version 0.91, #define OLD_PST to * get the right dots. * * Added a really ugly hack (enabled by default) to print * "nice" numbers for axis labels. This should really be at * a higher level in the code, but I'm lazy right now. * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * This file contains the PSTricks terminal driver, intended for use with the * pstricks.sty macro package for LaTeX. This is an alternative to the * eepic and latex driver. You need pstricks.sty, and, of course, a printer * that understands PostScript. Ghostscript understands Postscript too. * * PSTricks is available via anonymous ftp from the /pub directory * at Princeton.EDU. This driver definitely does not come close to * using the full capability of the PSTricks package. */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) * * adapted to support pm3d by Tim Piessens and Petr Mikulik (Jan. 2003) */ #include "driver.h" #ifdef TERM_REGISTER register_term(pstricks) #endif #ifdef TERM_PROTO TERM_PUBLIC void PSTRICKS_options __PROTO((void)); TERM_PUBLIC void PSTRICKS_init __PROTO((void)); TERM_PUBLIC void PSTRICKS_graphics __PROTO((void)); TERM_PUBLIC void PSTRICKS_text __PROTO((void)); TERM_PUBLIC void PSTRICKS_linetype __PROTO((int linetype)); TERM_PUBLIC void PSTRICKS_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void PSTRICKS_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void PSTRICKS_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void PSTRICKS_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); TERM_PUBLIC void PSTRICKS_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC int PSTRICKS_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC int PSTRICKS_text_angle __PROTO((int ang)); TERM_PUBLIC void PSTRICKS_reset __PROTO((void)); TERM_PUBLIC int PSTRICKS_make_palette __PROTO((t_sm_palette *)); TERM_PUBLIC void PSTRICKS_set_color __PROTO((t_colorspec *)); TERM_PUBLIC void PSTRICKS_filled_polygon __PROTO((int, gpiPoint *)); #define PSTRICKS_XMAX 10000.0 #define PSTRICKS_YMAX 10000.0 #define PSTRICKS_HTIC 150 #define PSTRICKS_VTIC 200 #define PSTRICKS_HCHAR 160 #define PSTRICKS_VCHAR 420 #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static void PSTRICKS_endline __PROTO((void)); static char *PSTRICKS_hack_text __PROTO((const char *s)); static float PSTRICKS_posx; static float PSTRICKS_posy; static enum JUSTIFY PSTRICKS_justify = LEFT; static int PSTRICKS_angle = 0; /* if 1 below, then the file size is shorter thanks to a macro for polygon */ #define PSTRICKS_SHORTER_FILE 1 #ifdef PSTRICKS_SHORTER_FILE static int PSTRICKS_color = 0; #else static char PSTRICKS_color_str[16] = ""; #endif static int PSTRICKS_palette_set = FALSE; static int PSTRICKS_palette_size = 128; #define PSTRICKS_TINY_DOT 0.00025 /* A tiny dot */ /* POINTS */ #define PSTRICKS_POINT_TYPES 12 /* we supply more point types */ static const char *PSTRICKS_points[] = { "\\PST@Diamond", "\\PST@Plus", "\\PST@Square", "\\PST@Cross", "\\PST@Circle", "\\PST@Triangle", "\\PST@Pentagon", "\\PST@Filldiamond", "\\PST@Fillsquare", "\\PST@Filltriangle", "\\PST@Fillcircle", "\\PST@Fillpentagon" }; /* LINES */ #define PSTRICKS_NUMLINES 6 /* number of linetypes below */ static const char *PSTRICKS_lines[] = { "\\PST@Border", "\\PST@Axes", "\\PST@Solid", "\\PST@Dashed", "\\PST@Dotted", "\\PST@LongDash" }; /* current line type */ static int PSTRICKS_type; /* are we in the middle of a line */ static TBOOLEAN PSTRICKS_inline = FALSE; /* terminate any line in progress */ static void PSTRICKS_endline __PROTO((void)); /* number of points in line so far */ static int PSTRICKS_linecount = 0; /* max value for linecount */ #define PSTRICKS_LINEMAX 100 /* * Handle options */ static int PST_hack_text = TRUE; /* Hack text on */ static int PST_unit_plot = FALSE; /* Unit-sized plot off */ TERM_PUBLIC void PSTRICKS_options() { if (!END_OF_COMMAND) { if (almost_equals(c_token, "no$hacktext")) { PST_hack_text = FALSE; c_token++; } else if (almost_equals(c_token, "u$nit")) { PST_unit_plot = TRUE; c_token++; } } } TERM_PUBLIC void PSTRICKS_init() { PSTRICKS_posx = PSTRICKS_posy = 0; PSTRICKS_linetype(-1); fseek(gpoutfile,0,SEEK_SET); fputs("% GNUPLOT: LaTeX picture using PSTRICKS macros\n", gpoutfile); PSTRICKS_palette_set = FALSE; /* PM3D palette set? */ } TERM_PUBLIC void PSTRICKS_graphics() { fputs("\ % Define new PST objects, if not already defined\n\ \\ifx\\PSTloaded\\undefined\n\ \\def\\PSTloaded{t}\n\ \\psset{arrowsize=.01 3.2 1.4 .3}\n\ \\psset{dotsize=.01}\n\ \\catcode`@=11\n\n", gpoutfile); /* Define line type objects */ fputs("\ \\newpsobject{PST@Border}{psline}{linewidth=.0015,linestyle=solid}\n\ \\newpsobject{PST@Axes}{psline}{linewidth=.0015,linestyle=dotted,dotsep=.004}\n\ \\newpsobject{PST@Solid}{psline}{linewidth=.0015,linestyle=solid}\n\ \\newpsobject{PST@Dashed}{psline}{linewidth=.0015,linestyle=dashed,dash=.01 .01}\n\ \\newpsobject{PST@Dotted}{psline}{linewidth=.0025,linestyle=dotted,dotsep=.008}\n\ \\newpsobject{PST@LongDash}{psline}{linewidth=.0015,linestyle=dashed,dash=.02 .01}\n", gpoutfile); /* Define point objects */ #ifdef OLD_PST /* PSTricks version 0.91 had x and diamond dot types */ fputs("\ \\newpsobject(PST@Diamond}{psdots}{linewidth=.001,linestyle=solid,dotstyle=diamond}\n\ \\newpsobject(PST@Filldiamond}{psdots}{linewidth=.001,linestyle=solid,dotstyle=diamond*}\n\ \\newpsobject{PST@Cross}{psdots}{linewidth=.001,linestyle=solid,dotstyle=x}\n", gpoutfile); #else /* Newer versions use rotated plus and square to get the x and diamond dots */ fputs("\ \\newpsobject{PST@Diamond}{psdots}{linewidth=.001,linestyle=solid,dotstyle=square,dotangle=45}\n\ \\newpsobject{PST@Filldiamond}{psdots}{linewidth=.001,linestyle=solid,dotstyle=square*,dotangle=45}\n\ \\newpsobject{PST@Cross}{psdots}{linewidth=.001,linestyle=solid,dotstyle=+,dotangle=45}\n", gpoutfile); #endif fputs("\ \\newpsobject{PST@Plus}{psdots}{linewidth=.001,linestyle=solid,dotstyle=+}\n\ \\newpsobject{PST@Square}{psdots}{linewidth=.001,linestyle=solid,dotstyle=square}\n\ \\newpsobject{PST@Circle}{psdots}{linewidth=.001,linestyle=solid,dotstyle=o}\n\ \\newpsobject{PST@Triangle}{psdots}{linewidth=.001,linestyle=solid,dotstyle=triangle}\n\ \\newpsobject{PST@Pentagon}{psdots}{linewidth=.001,linestyle=solid,dotstyle=pentagon}\n\ \\newpsobject{PST@Fillsquare}{psdots}{linewidth=.001,linestyle=solid,dotstyle=square*}\n\ \\newpsobject{PST@Fillcircle}{psdots}{linewidth=.001,linestyle=solid,dotstyle=*}\n\ \\newpsobject{PST@Filltriangle}{psdots}{linewidth=.001,linestyle=solid,dotstyle=triangle*}\n\ \\newpsobject{PST@Fillpentagon}{psdots}{linewidth=.001,linestyle=solid,dotstyle=pentagon*}\n", gpoutfile); /* Define arrow object */ fputs("\ \\newpsobject{PST@Arrow}{psline}{linewidth=.001,linestyle=solid}\n\ \\catcode`@=12\n\n\ \\fi\n", gpoutfile); /* Set the scaled plot size, if it's not a unit plot */ if (!PST_unit_plot) { fputs("\\psset{unit=5.0in,xunit=5.0in,yunit=3.0in}\n", gpoutfile); } /* HBB 20001027: fix bounding box bug by letting the currently * active 'size' and 'offset' setting influence the area used by * the picture environment */ fprintf(gpoutfile, "\ \\pspicture(%f,%f)(%f,%f)\n\ \\ifx\\nofigs\\undefined\n\ \\catcode`@=11\n\n", xoffset, yoffset, (xoffset + xsize), (yoffset + ysize) ); } TERM_PUBLIC void PSTRICKS_text() { PSTRICKS_endline(); fputs("\ \\catcode`@=12\n\ \\fi\n\ \\endpspicture\n", gpoutfile); } TERM_PUBLIC void PSTRICKS_linetype(int linetype) { PSTRICKS_endline(); if (linetype >= PSTRICKS_NUMLINES - 2) linetype %= (PSTRICKS_NUMLINES - 2); if (linetype < -2) linetype = LT_BLACK; PSTRICKS_type = linetype; } TERM_PUBLIC void PSTRICKS_move(unsigned int x, unsigned int y) { PSTRICKS_endline(); PSTRICKS_posx = x / PSTRICKS_XMAX; PSTRICKS_posy = y / PSTRICKS_YMAX; } TERM_PUBLIC void PSTRICKS_point(unsigned int x, unsigned int y, int number) { PSTRICKS_move(x, y); /* Print the character defined by 'number'; number < 0 means to use a dot, otherwise one of the defined points. */ if (number < 0) { fprintf(gpoutfile, "\\qdisk(%.4f,%.4f){%.4f}\n", x / PSTRICKS_XMAX, y / PSTRICKS_YMAX, PSTRICKS_TINY_DOT); } else { fprintf(gpoutfile, "%s(%.4f,%.4f)\n", PSTRICKS_points[number % PSTRICKS_POINT_TYPES], x / PSTRICKS_XMAX, y / PSTRICKS_YMAX); } } TERM_PUBLIC void PSTRICKS_vector(unsigned ux, unsigned uy) { if (!PSTRICKS_inline) { PSTRICKS_inline = TRUE; /* Start a new line. This depends on line type */ fprintf(gpoutfile, "%s(%.4f,%.4f)\n", PSTRICKS_lines[PSTRICKS_type + 2], PSTRICKS_posx, PSTRICKS_posy); PSTRICKS_linecount = 1; } else { /* * Even though we are in middle of a path, * we may want to start a new path command. * If they are too long then latex will choke. */ if (PSTRICKS_linecount++ >= PSTRICKS_LINEMAX) { /* fprintf(gpoutfile, "\n"); */ fprintf(gpoutfile, "%s(%.4f,%.4f)\n", PSTRICKS_lines[PSTRICKS_type + 2], PSTRICKS_posx, PSTRICKS_posy); PSTRICKS_linecount = 1; } } PSTRICKS_posx = ux / PSTRICKS_XMAX; PSTRICKS_posy = uy / PSTRICKS_YMAX; fprintf(gpoutfile, "(%.4f,%.4f)\n", PSTRICKS_posx, PSTRICKS_posy); } static void PSTRICKS_endline() { if (PSTRICKS_inline) { putc('\n', gpoutfile); PSTRICKS_inline = FALSE; } } TERM_PUBLIC void PSTRICKS_arrow( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { fprintf(gpoutfile, "\\PST@Arrow%s(%.4f,%.4f)(%.4f,%.4f)\n", head ? "{->}" : "", sx / PSTRICKS_XMAX, sy / PSTRICKS_YMAX, ex / PSTRICKS_XMAX, ey / PSTRICKS_YMAX); PSTRICKS_posx = ex / PSTRICKS_XMAX; PSTRICKS_posy = ey / PSTRICKS_YMAX; } /* * A really ugly hack!!! * * This function takes an input string and hacks it up. If the * input string starts with a number, it converts the number into a * TeX style number including exponential notation. Thus, if * the input is the string "3.14159e3 is a number", then * the output is "$3.14159\cdot 10^{3}$ is a number", so that TeX * will produce something nice. * * This is basically meant for producing axis labels that look nice. * * What a hack! */ static char * PSTRICKS_hack_text(const char *s) { double value; char *ends; static char hack[BUFSIZ]; /* * Does the string start with a number? */ value = strtod(s, &ends); if (s == ends) { /* * This doesn't start a number, so just copy the string over */ strcpy(hack, s); } else { char *ptr; /* * We have a number! Check to see if the number * is in scientific notation */ safe_strncpy(hack, s, ends - s + 1); /* hack[ends - s] = '\0'; */ ptr = strchr(hack, 'e'); if (ptr == NULL) { ptr = strchr(hack, 'E'); } if (ptr != NULL) { /* * Exponential notation! Let's get the mantissa and exponent separately */ double man_val; int expo_val; *ptr = NUL; man_val = atof(hack); expo_val = atoi(ptr + 1); if (man_val == 0) { sprintf(hack, "0"); } else if (man_val == 1) { sprintf(hack, "$10^{%d}$", expo_val); } else if (man_val == (int) man_val) { if (expo_val == 1) { sprintf(hack, "$%d$", (int) man_val); } else { sprintf(hack, "$%d \\times 10^{%d}$", (int) man_val, expo_val); } } else { if (expo_val == 1) { sprintf(hack, "$%f$", man_val); } else { sprintf(hack, "$%f \\times 10^{%d}$", man_val, expo_val); } } } /* * Copy anything that's left of the string */ strcat(hack, ends); } return hack; } TERM_PUBLIC void PSTRICKS_put_text(unsigned int x, unsigned int y, const char str[]) { PSTRICKS_endline(); /* Skip this if the string is empty */ if (strlen(str) > 0) { fputs("\\rput", gpoutfile); /* Set justification */ switch (PSTRICKS_justify) { case LEFT: fputs("[l]", gpoutfile); break; case CENTRE: break; case RIGHT: fputs("[r]", gpoutfile); break; } /* Set text angle */ switch (PSTRICKS_angle) { case 0: break; case 1: fputs("{L}", gpoutfile); break; } /* Set reference position and text */ fprintf(gpoutfile, "(%.4f,%.4f)", x / PSTRICKS_XMAX, y / PSTRICKS_YMAX); if (PST_hack_text) { char *hack; /* Hack leading numbers to something nice for TeX */ hack = PSTRICKS_hack_text(str); fprintf(gpoutfile, "{%s}\n", hack); } else { fprintf(gpoutfile, "{%s}\n", str); } } } TERM_PUBLIC int PSTRICKS_justify_text(enum JUSTIFY mode) { PSTRICKS_justify = mode; return (TRUE); } TERM_PUBLIC int PSTRICKS_text_angle(int ang) { PSTRICKS_angle = (ang ? 1 : 0); return (TRUE); } TERM_PUBLIC void PSTRICKS_reset() { PSTRICKS_endline(); PSTRICKS_posx = PSTRICKS_posy = 0; } TERM_PUBLIC int PSTRICKS_make_palette (t_sm_palette *palette) { /* Query to determine palette size */ if (palette==NULL) { return PSTRICKS_palette_size; } if (PSTRICKS_palette_set == FALSE) { int i; /* Create new palette */ PSTRICKS_palette_set = TRUE; if (sm_palette.colorMode == SMPAL_COLOR_MODE_GRAY) { /* Grey palette */ for (i=0; i < sm_palette.colors; i++) { double g = i * 1.0 / (sm_palette.colors - 1); g = 1e-3 * (int)(g * 1000); /* round to 3 digits to use %g below */ fprintf(gpoutfile, "\\newgray{PST@COLOR%d}{%g}\n", i, g); } } else if (sm_palette.colorMode == SMPAL_COLOR_MODE_RGB) { /* Color palette */ double r, g, b; for (i=0; i < sm_palette.colors; i++) { /* round to 3 digits to avoid sth like 1e-7 in %g below */ r = 1e-3 * (int)(palette->color[i].r * 1000); g = 1e-3 * (int)(palette->color[i].g * 1000); b = 1e-3 * (int)(palette->color[i].b * 1000); fprintf(gpoutfile, "\\newrgbcolor{PST@COLOR%d}{%g %g %g}\n", i, r, g, b); } } } /* use the following macro to shorten the file size */ fprintf(gpoutfile, "\\def\\polypmIIId#1{\\pspolygon[linestyle=none,fillstyle=solid,fillcolor=PST@COLOR#1]}\n\n"); return 0; } TERM_PUBLIC void PSTRICKS_set_color (t_colorspec *colorspec) { int new_color; double gray = colorspec->value; if (colorspec->type != TC_FRAC) return; new_color = (gray <=0) ? 0 : (int)(gray*sm_palette.colors); if (new_color >= PSTRICKS_palette_size) new_color = PSTRICKS_palette_size - 1; if (PSTRICKS_palette_set == FALSE) { fprintf(stderr, "pstricks: Palette used before set!\n"); } #ifdef PSTRICKS_SHORTER_FILE PSTRICKS_color = new_color; #else sprintf(PSTRICKS_color_str, "PST@COLOR%d", new_color); #endif } TERM_PUBLIC void PSTRICKS_filled_polygon (int points, gpiPoint *corners) { int i; #ifdef PSTRICKS_SHORTER_FILE /* using a macro for an abbreviation */ fprintf(gpoutfile, "\\polypmIIId{%d}", PSTRICKS_color); #else fprintf(gpoutfile, "\\pspolygon[linestyle=none,fillstyle=solid,fillcolor=%s]", PSTRICKS_color_str); #endif for (i=0; i < points; i++) { if (i % 8 == 7) /* up to 8 corners per line */ fprintf(gpoutfile, "\n"); fprintf(gpoutfile,"(%.4g,%.4g)", corners[i].x/PSTRICKS_XMAX, corners[i].y/PSTRICKS_YMAX); } fprintf(gpoutfile, "\n"); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(pstricks_driver) "pstricks", "LaTeX picture environment with PSTricks macros", PSTRICKS_XMAX, PSTRICKS_YMAX, PSTRICKS_VCHAR, PSTRICKS_HCHAR, PSTRICKS_VTIC, PSTRICKS_HTIC, PSTRICKS_options, PSTRICKS_init, PSTRICKS_reset, PSTRICKS_text, null_scale, PSTRICKS_graphics, PSTRICKS_move, PSTRICKS_vector, PSTRICKS_linetype, PSTRICKS_put_text, PSTRICKS_text_angle, PSTRICKS_justify_text, PSTRICKS_point, PSTRICKS_arrow, set_font_null, 0, TERM_BINARY /*flags*/, 0 /*suspend*/, 0 /*resume*/, 0 , 0 #ifdef USE_MOUSE , 0, 0, 0, 0, 0 #endif , PSTRICKS_make_palette, 0, PSTRICKS_set_color, PSTRICKS_filled_polygon TERM_TABLE_END(pstricks_driver) #undef LAST_TERM #define LAST_TERM pstricks_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(pstricks) "1 pstricks", "?commands set terminal pstricks", "?set terminal pstricks", "?set term pstricks", "?terminal pstricks", "?term pstricks", "?pstricks", " The `pstricks` driver is intended for use with the \"pstricks.sty\" macro", " package for LaTeX. It is an alternative to the `eepic` and `latex` drivers.", " You need \"pstricks.sty\", and, of course, a printer that understands", " PostScript, or a converter such as Ghostscript.", "", " PSTricks is available via anonymous ftp from the /pub directory at", " Princeton.edu. This driver definitely does not come close to using the full", " capability of the PSTricks package.", "", " Syntax:", " set terminal pstricks {hacktext | nohacktext} {unit | nounit}", "", " The first option invokes an ugly hack that gives nicer numbers; the second", " has to do with plot scaling. The defaults are `hacktext` and `nounit`." END_HELP(pstricks) #endif /* TERM_HELP */ �����gnuplot-4.6.4/term/pslatex.trm����������������������������������������������������������������������0000644�0004711�0000144�00000105656�12131377432�013324� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: pslatex.trm,v 1.80.2.6 2013/04/11 00:08:58 sfeam Exp $ */ /* GNUPLOT - pslatex.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This file supplies the terminal drivers: * pslatex -- LaTeX with embedded postscript * pstex -- plain TeX with embedded postscript * epslatex -- LaTeX using \includegraphics, postscript part in an * external file * * AUTHORS * George Phillips * Russell Lang * David Kotz * * Petr Mikulik, May 2000: terminal entries for PM3D functionality * * Dan Sebald, 5 March 2003: terminal entry for image functionality * * Theo Hopman * 23 May 2003: * - added epslatex support. Replaces epslatex.trm; pointtype * and linetypes for epslatex terminal are now identical to * those of pslatex terminal. * - added arbitrary text rotations to all [e]ps[la]tex * terminals. * 27 May 2004: * - epslatex patch updated for gnuplot 4.0 * * Harald Harders (h.harders@tu-bs.de), 2005-02-08: * - Merged functionality of postscript, pslatex, pstex, and * epslatex terminals. Therefore deleted epslatex.trm. * - Added a standalone mode to the epslatex mode for standalone use without * an additional LaTeX document. * - Fixed text rotation of ps(la)tex terminals. * * Send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). */ #include "driver.h" #ifdef TERM_REGISTER register_term(pslatex) register_term(pstex) register_term(epslatex) #endif #ifdef TERM_PROTO /* Common functions for epslatex and ps(la)tex */ /* All these routines begin with PSLATEX_ */ TERM_PUBLIC void PSLATEX_reset __PROTO((void)); /* Functions for ps(la)tex */ /* All these routines begin with PSTEX_ */ TERM_PUBLIC void PSTEX_reopen_output __PROTO((void)); TERM_PUBLIC void PSTEX_common_init __PROTO((void)); TERM_PUBLIC void PSTEX_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void PSTEX_text __PROTO((void)); /* Functions for epslatex */ /* All these routines begin with EPSLATEX_ */ TERM_PUBLIC void EPSLATEX_reopen_output __PROTO((char *)); TERM_PUBLIC void EPSLATEX_common_init __PROTO((void)); TERM_PUBLIC void EPSLATEX_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void EPSLATEX_linetype __PROTO((int linetype)); TERM_PUBLIC void EPSLATEX_layer __PROTO((t_termlayer syncpoint)); /* additional LaTeX header information for epslatex terminal */ TERM_PUBLIC char *epslatex_header = NULL; #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include "post.h" struct pstex_text_command { int x, y, angle, justify; char *label; struct pstex_text_command *next; }; static struct pstex_text_command *pstex_labels = NULL; static int epslatex_text_layer = 0; /* Support for optimization of set_color */ static t_colorspec tex_previous_colorspec = {-1, 0, 0.0}; /* Initialize to invalid type */ static char tex_current_color[64]; static TBOOLEAN tex_color_synced = FALSE; /* support for cairolatex */ #ifdef HAVE_CAIROPDF #define ISCAIROTERMINAL ((strcmp(term->name, "cairolatex") == 0)) TERM_PUBLIC void cairotrm_set_color __PROTO ((t_colorspec *colorspec)); #else #define ISCAIROTERMINAL (FALSE) #endif /* Common functions for epslatex and ps(la)tex */ TERM_PUBLIC void PSLATEX_reset() { switch (ps_params->terminal) { case PSTERM_EPSLATEX: if (!ISCAIROTERMINAL) PS_reset(); if (gpoutfile) { fprintf(gpoutfile, "\ \\gplbacktext\n\ \\put(0,0){\\includegraphics{%s}}%%\n\ \\gplfronttext\n\ \\end{picture}%%\n\ \\endgroup\n", pslatex_auxname); if (ps_params->epslatex_standalone) fputs("\\end{document}\n", gpoutfile); } break; case PSTERM_PSLATEX: fputs("\ \\end{picture}%\n\ \\endgroup\n\ \\endinput\n", gpoutfile); break; case PSTERM_PSTEX: fputs("\ \\endGNUPLOTpicture\n\ \\endgroup\n\ \\endinput\n", gpoutfile); break; default:; /* do nothing, just avoid a compiler warning */ } if (pslatex_auxname) { free(pslatex_auxname); pslatex_auxname = NULL; } if (gppsfile && (gppsfile != gpoutfile)) { fclose(gppsfile); gppsfile = NULL; } } /* Functions for ps(la)tex */ TERM_PUBLIC void PSTEX_reopen_output() { if (outstr) { char *dotIndex; /* if there's no extension, append ".ps" */ if ((dotIndex = strrchr(outstr, '.')) == NULL) dotIndex = strchr(outstr, NUL); /* try to open the auxiliary file for the postscript parts. */ if (ps_params->useauxfile) { /* length of outstr plus ('.' or '\0') plus "eps" plus '\0' */ pslatex_auxname = gp_realloc(pslatex_auxname,dotIndex - outstr + 5, "pslatex aux filename"); if (pslatex_auxname) { /* include period or '\0' */ strncpy(pslatex_auxname, outstr, (dotIndex - outstr) + 1); /* period or '\0' is overwritten with period, and "ps" appended */ strcpy(pslatex_auxname + (dotIndex - outstr), ".ps"); gppsfile = fopen(pslatex_auxname, "w"); if (gppsfile == (FILE *) NULL) { fprintf(stderr, "Cannot open aux file %s for output. Switching off auxfile option.\n", pslatex_auxname); free(pslatex_auxname); pslatex_auxname = NULL; ps_params->useauxfile = FALSE; gppsfile = gpoutfile; } } else { fprintf(stderr, "Cannot make PostScript file name from %s\n", outstr); fprintf(stderr, "Turning off auxfile option\n"); ps_params->useauxfile = FALSE; gppsfile = gpoutfile; } } else gppsfile = gpoutfile; } else { if (ps_params->useauxfile) { fprintf(stderr, "Cannot use aux file on stdout. Switching off auxfile option.\n"); ps_params->useauxfile = FALSE; } gppsfile = gpoutfile; } } TERM_PUBLIC void PSTEX_common_init() { switch (ps_params->terminal) { case PSTERM_PSLATEX: fprintf(gpoutfile,"\ %% GNUPLOT: LaTeX picture with Postscript\n\ \\begingroup%%\n\ \\makeatletter%%\n\ \\newcommand{\\GNUPLOTspecial}{%%\n\ \\@sanitize\\catcode`\\%%=14\\relax\\special}%%\n\ \\setlength{\\unitlength}{%.4fbp}%%\n", 1.0 / (2*PS_SC)); fprintf(gpoutfile, "\\begin{picture}(%d,%d)(0,0)%%\n", (int) (xsize * term->xmax), (int) (ysize * term->ymax)); break; case PSTERM_PSTEX: /* write plain TeX header */ fprintf(gpoutfile, "\ %% GNUPLOT: plain TeX with Postscript\n\ \\begingroup\n\ \\catcode`\\@=11\\relax\n\ \\def\\GNUPLOTspecial{%%\n\ \\def\\do##1{\\catcode`##1=12\\relax}\\dospecials\n\ \\catcode`\\{=1\\catcode`\\}=2\\catcode\\%%=14\\relax\\special}%%\n\ %%\n\ \\expandafter\\ifx\\csname GNUPLOTpicture\\endcsname\\relax\n\ \\csname newdimen\\endcsname\\GNUPLOTunit\n\ \\gdef\\GNUPLOTpicture(#1,#2){\\vbox to#2\\GNUPLOTunit\\bgroup\n\ \\def\\put(##1,##2)##3{\\unskip\\raise##2\\GNUPLOTunit\n\ \\hbox to0pt{\\kern##1\\GNUPLOTunit ##3\\hss}\\ignorespaces}%%\n\ \\def\\ljust##1{\\vbox to0pt{\\vss\\hbox to0pt{##1\\hss}\\vss}}%%\n\ \\def\\cjust##1{\\vbox to0pt{\\vss\\hbox to0pt{\\hss ##1\\hss}\\vss}}%%\n\ \\def\\rjust##1{\\vbox to0pt{\\vss\\hbox to0pt{\\hss ##1}\\vss}}%%\n\ \\def\\stack##1{\\let\\\\=\\cr\\tabskip=0pt\\halign{\\hfil ####\\hfil\\cr ##1\\crcr}}%%\n\ \\def\\lstack##1{\\hbox to0pt{\\vbox to0pt{\\vss\\stack{##1}}\\hss}}%%\n\ \\def\\cstack##1{\\hbox to0pt{\\hss\\vbox to0pt{\\vss\\stack{##1}}\\hss}}%%\n\ \\def\\rstack##1{\\hbox to0pt{\\vbox to0pt{\\stack{##1}\\vss}\\hss}}%%\n\ \\vss\\hbox to#1\\GNUPLOTunit\\bgroup\\ignorespaces}%%\n\ \\gdef\\endGNUPLOTpicture{\\hss\\egroup\\egroup}%%\n\ \\fi\n\ \\GNUPLOTunit=%.4fbp\n", 1.0 / (2*PS_SC)); fprintf(gpoutfile, "\\GNUPLOTpicture(%d,%d)\n", (int) (xsize * term->xmax), (int) (ysize * term->ymax)); break; default:; /* do nothing, just avoid a compiler warning */ } if (gppsfile != gpoutfile) { /* these are taken from the post.trm file computation * of the bounding box, but without the X_OFF and Y_OFF */ int urx = (int) (xsize * term->xmax / (2*PS_SC) + 0.5); int ury = (int) (ysize * term->ymax / (2*PS_SC) + 0.5); /* pslatex_auxname is only != NULL with the `auxfile' option. * If pslatex_auxname is not a simple file name, but a path, * we need to strip the path off the auxiliary file name, * because tex file and ps aux file end up in the same directory! */ char *psfile_basename = gp_basename(pslatex_auxname); /* generate special which xdvi and dvips can handle */ fprintf(gpoutfile, " \\special{psfile=%s llx=0 lly=0 urx=%d ury=%d rwi=%d}\n", psfile_basename, urx, ury, 10 * urx); } else fputs(" {\\GNUPLOTspecial{\"\n", gpoutfile); /* HH: really necessary? ps_ang = 0; ps_justify = 0; */ pstex_labels = (struct pstex_text_command *) NULL; } TERM_PUBLIC void PSTEX_put_text(unsigned int x, unsigned int y, const char *str) { struct pstex_text_command *tc; /* ignore empty strings */ if (str[0] == NUL) return; /* Save the text for later printing after the core graphics */ tc = (struct pstex_text_command *) gp_alloc(sizeof(struct pstex_text_command), term->name); tc->x = x; tc->y = y; tc->label = (char *) gp_alloc(strlen(str) + 1, term->name); strcpy(tc->label, str); tc->justify = ps_justify; tc->angle = ps_ang; tc->next = pstex_labels; pstex_labels = tc; } TERM_PUBLIC void PSTEX_text() { struct pstex_text_command *tc; PS_text(); if (gppsfile == gpoutfile) fputs(" }}%\n", gpoutfile); if (ps_params->fontsize) { if (ps_params->terminal == PSTERM_PSLATEX) fprintf(gpoutfile, "\\fontsize{%g}{\\baselineskip}\\selectfont\n", ps_params->fontsize); /* Should have an else clause here to handle pstex equivalent */ } for (tc = pstex_labels; tc != (struct pstex_text_command *) NULL; tc = tc->next) { fprintf(gpoutfile, " \\put(%d,%d){", tc->x, tc->y); if ((ps_params->rotate) && (tc->angle != 0)) fprintf(gpoutfile, "\ %%\n \\special{ps: gsave currentpoint currentpoint translate\n\ %d rotate neg exch neg exch translate}%%\n ", 360 - tc->angle); if ((ps_params->terminal == PSTERM_PSLATEX) && ((tc->label[0] == '{') || (tc->label[0] == '['))) { fprintf(gpoutfile, "\\makebox(0,0)%s", tc->label); } else switch (tc->justify) { case LEFT: fprintf(gpoutfile, (ps_params->terminal == PSTERM_PSLATEX ? "\\makebox(0,0)[l]{\\strut{}%s}" : "\\ljust{\\strut{}%s}"), tc->label); break; case CENTRE: fprintf(gpoutfile, (ps_params->terminal == PSTERM_PSLATEX ? "\\makebox(0,0){\\strut{}%s}" : "\\cjust{\\strut{}%s}"), tc->label); break; case RIGHT: fprintf(gpoutfile, (ps_params->terminal == PSTERM_PSLATEX ? "\\makebox(0,0)[r]{\\strut{}%s}" : "\\rjust{\\strut{}%s}"), tc->label); break; } if ((ps_params->rotate) && (tc->angle != 0)) fputs("%\n \\special{ps: currentpoint grestore moveto}%\n ", gpoutfile); fputs("}%\n", gpoutfile); } while (pstex_labels) { tc = pstex_labels->next; free(pstex_labels->label); free(pstex_labels); pstex_labels = tc; } } /* Functions for epslatex */ /* the common init function for the epslatex driver */ TERM_PUBLIC void EPSLATEX_common_init() { char *fontfamily = NULL; char *fontseries = NULL; char *fontshape = NULL; if (!gpoutfile) { char *temp = gp_alloc(strlen(outstr) + 1, "temp file string"); if (temp) { strcpy(temp, outstr); term_set_output(temp); /* will free outstr */ if (temp != outstr) { if (temp) free(temp); temp = outstr; } } else os_error(c_token, "Cannot reopen output files"); } if (!outstr) os_error(c_token, "epslatex terminal cannot write to standard output"); if (gpoutfile) { char *inputenc = NULL; fprintf(gpoutfile, "%% GNUPLOT: LaTeX picture with Postscript\n"); switch(encoding) { case S_ENC_DEFAULT: break; case S_ENC_ISO8859_1: inputenc = "latin1"; break; case S_ENC_ISO8859_2: inputenc = "latin2"; break; case S_ENC_ISO8859_9: /* ISO8859-9 is Latin5 */ inputenc = "latin5"; break; case S_ENC_ISO8859_15: /* ISO8859-15 is Latin9 */ inputenc = "latin9"; break; case S_ENC_CP437: inputenc = "cp437de"; break; case S_ENC_CP850: inputenc = "cp850"; break; case S_ENC_CP852: inputenc = "cp852"; break; case S_ENC_CP1250: inputenc = "cp1250"; break; case S_ENC_CP1251: inputenc = "cp1251"; break; case S_ENC_KOI8_R: inputenc = "koi8-r"; break; case S_ENC_KOI8_U: inputenc = "koi8-u"; break; case S_ENC_INVALID: int_error(NO_CARET, "invalid input encoding used"); break; default: /* do nothing */ break; } /* Clear previous state */ tex_previous_colorspec.type = -1; /* Clear any leftover text-layering state */ EPSLATEX_layer(TERM_LAYER_RESET); /* Analyse LaTeX font name 'family,series,shape' */ if ((strlen(ps_params->font) > 0) && (strcmp(ps_params->font,"default") != 0)) { char *comma = NULL; fontfamily = gp_alloc(strlen(ps_params->font)+1, "EPSLATEX_common_init"); fontseries = gp_alloc(strlen(ps_params->font)+1, "EPSLATEX_common_init"); fontshape = gp_alloc(strlen(ps_params->font)+1, "EPSLATEX_common_init"); strcpy(fontfamily,ps_params->font); *fontseries = '\0'; *fontshape = '\0'; if ((comma = strchr(fontfamily, ',')) != NULL) { *comma = '\0'; strcpy(fontseries,comma+1); if ((comma = strchr(fontseries, ',')) != NULL) { *comma = '\0'; strcpy(fontshape,comma+1); } } } if (ps_params->epslatex_standalone) { fprintf(gpoutfile, "\ \\documentclass{minimal}\n\ %% Set font size\n\ \\makeatletter\n\ \\def\\@ptsize{%d}\n\ \\InputIfFileExists{size%d.clo}{}{%%\n\ \\GenericError{(gnuplot) \\space\\space\\space\\@spaces}{%%\n\ Gnuplot Error: File `size%d.clo' not found! Could not set font size%%\n\ }{See the gnuplot documentation for explanation.%%\n\ }{For using a font size a file `size<fontsize>.clo' has to exist.\n\ Falling back ^^Jto default fontsize 10pt.}%%\n\ \\def\\@ptsize{0}\n\ \\input{size10.clo}%%\n\ }%%\n\ \\makeatother\n", (int)(ps_params->fontsize-10), (int)(ps_params->fontsize), (int)(ps_params->fontsize)); if (fontfamily && strlen(fontfamily) > 0) fprintf(gpoutfile, "\\renewcommand*\\rmdefault{%s}%%\n", fontfamily); if (fontseries && strlen(fontseries) > 0) fprintf(gpoutfile, "\\renewcommand*\\mddefault{%s}%%\n", fontseries); if (fontshape && strlen(fontshape) > 0) fprintf(gpoutfile, "\\renewcommand*\\updefault{%s}%%\n", fontshape); fputs("\ % Load packages\n\ \\usepackage{graphicx}\n\ \\usepackage{color}\n", gpoutfile); if (inputenc) fprintf(gpoutfile, "\\usepackage[%s]{inputenc}\n", inputenc); fprintf(gpoutfile, "\ \\makeatletter\n\ %% Select an appropriate default driver (from TeXLive graphics.cfg)\n\ \\begingroup\n\ \\chardef\\x=0 %%\n\ %% check pdfTeX\n\ \\@ifundefined{pdfoutput}{}{%%\n\ \\ifcase\\pdfoutput\n\ \\else\n\ \\chardef\\x=1 %%\n\ \\fi\n\ }%%\n\ %% check VTeX\n\ \\@ifundefined{OpMode}{}{%%\n\ \\chardef\\x=2 %%\n\ }%%\n\ \\expandafter\\endgroup\n\ \\ifcase\\x\n\ %% default case\n\ \\PassOptionsToPackage{dvips}{geometry}\n\ \\or\n\ %% pdfTeX is running in pdf mode\n\ \\PassOptionsToPackage{pdftex}{geometry}\n\ \\else\n\ %% VTeX is running\n\ \\PassOptionsToPackage{vtex}{geometry}\n\ \\fi\n\ \\makeatother\n\ %% Set papersize\n\ \\usepackage[papersize={%.2fbp,%.2fbp},text={%.2fbp,%.2fbp}]{geometry}\n\ %% No page numbers and no paragraph indentation\n\ \\pagestyle{empty}\n\ \\setlength{\\parindent}{0bp}%%\n\ %% Load configuration file\n\ \\InputIfFileExists{gnuplot.cfg}{%%\n\ \\typeout{Using configuration file gnuplot.cfg}%%\n\ }{%%\n\ \\typeout{No configuration file gnuplot.cfg found.}%%\n\ }%%\n\ %s\n\ \\begin{document}\n", term->xmax * xsize / (2.0*PS_SC), term->ymax * ysize / (2.0*PS_SC), term->xmax * xsize / (2.0*PS_SC), term->ymax * ysize / (2.0*PS_SC), epslatex_header ? epslatex_header : "%" ); } fputs("\\begingroup\n", gpoutfile); if (inputenc) fprintf(gpoutfile, "\ %% Encoding inside the plot. In the header of your document, this encoding\n\ %% should to defined, e.g., by using\n\ %% \\usepackage[%s,<other encodings>]{inputenc}\n\ \\inputencoding{%s}%%\n", inputenc, inputenc); if (!ps_params->epslatex_standalone) { if (fontfamily && strlen(fontfamily) > 0) fprintf(gpoutfile, " \\fontfamily{%s}%%\n", fontfamily); if (fontseries && strlen(fontseries) > 0) fprintf(gpoutfile, " \\fontseries{%s}%%\n", fontseries); if (fontshape && strlen(fontshape) > 0) fprintf(gpoutfile, " \\fontshape{%s}%%\n", fontshape); if (fontfamily || fontseries || fontshape) fputs(" \\selectfont\n", gpoutfile); if (epslatex_header) fprintf(gpoutfile, "%s\n", epslatex_header ); } fprintf(gpoutfile, "\ \\makeatletter\n\ \\providecommand\\color[2][]{%%\n\ \\GenericError{(gnuplot) \\space\\space\\space\\@spaces}{%%\n\ Package color not loaded in conjunction with\n\ terminal option `colourtext'%%\n\ }{See the gnuplot documentation for explanation.%%\n\ }{Either use 'blacktext' in gnuplot or load the package\n\ color.sty in LaTeX.}%%\n\ \\renewcommand\\color[2][]{}%%\n\ }%%\n\ \\providecommand\\includegraphics[2][]{%%\n\ \\GenericError{(gnuplot) \\space\\space\\space\\@spaces}{%%\n\ Package graphicx or graphics not loaded%%\n\ }{See the gnuplot documentation for explanation.%%\n\ }{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}%%\n\ \\renewcommand\\includegraphics[2][]{}%%\n\ }%%\n\ \\providecommand\\rotatebox[2]{#2}%%\n\ \\@ifundefined{ifGPcolor}{%%\n\ \\newif\\ifGPcolor\n\ \\GPcolor%s\n\ }{}%%\n\ \\@ifundefined{ifGPblacktext}{%%\n\ \\newif\\ifGPblacktext\n\ \\GPblacktext%s\n\ }{}%%\n\ %% define a \\g@addto@macro without @ in the name:\n\ \\let\\gplgaddtomacro\\g@addto@macro\n\ %% define empty templates for all commands taking text:\n\ \\gdef\\gplbacktext{}%%\n\ \\gdef\\gplfronttext{}%%\n\ \\makeatother\n", (ps_params->color?"true":"false"), (ps_params->blacktext?"true":"false") ); /* use \expandafter\def\csname LT0\endcsname{...} * instead of \def\LT0{...} because digits may not be part of * \... sequences */ fputs("\ \\ifGPblacktext\n\ % no textcolor at all\n\ \\def\\colorrgb#1{}%\n\ \\def\\colorgray#1{}%\n\ \\else\n\ % gray or color?\n\ \\ifGPcolor\n\ \\def\\colorrgb#1{\\color[rgb]{#1}}%\n\ \\def\\colorgray#1{\\color[gray]{#1}}%\n\ \\expandafter\\def\\csname LTw\\endcsname{\\color{white}}%\n\ \\expandafter\\def\\csname LTb\\endcsname{\\color{black}}%\n\ \\expandafter\\def\\csname LTa\\endcsname{\\color{black}}%\n", gpoutfile); if (ps_params->oldstyle) { fputs("\ \\expandafter\\def\\csname LT0\\endcsname{\\color[rgb]{1,0,0}}%\n\ \\expandafter\\def\\csname LT1\\endcsname{\\color[rgb]{0,0,1}}%\n\ \\expandafter\\def\\csname LT2\\endcsname{\\color[rgb]{0,1,1}}%\n\ \\expandafter\\def\\csname LT3\\endcsname{\\color[rgb]{1,0,1}}%\n", gpoutfile); } else { fputs("\ \\expandafter\\def\\csname LT0\\endcsname{\\color[rgb]{1,0,0}}%\n\ \\expandafter\\def\\csname LT1\\endcsname{\\color[rgb]{0,1,0}}%\n\ \\expandafter\\def\\csname LT2\\endcsname{\\color[rgb]{0,0,1}}%\n\ \\expandafter\\def\\csname LT3\\endcsname{\\color[rgb]{1,0,1}}%\n\ \\expandafter\\def\\csname LT4\\endcsname{\\color[rgb]{0,1,1}}%\n\ \\expandafter\\def\\csname LT5\\endcsname{\\color[rgb]{1,1,0}}%\n\ \\expandafter\\def\\csname LT6\\endcsname{\\color[rgb]{0,0,0}}%\n\ \\expandafter\\def\\csname LT7\\endcsname{\\color[rgb]{1,0.3,0}}%\n\ \\expandafter\\def\\csname LT8\\endcsname{\\color[rgb]{0.5,0.5,0.5}}%\n", gpoutfile); } fputs("\ \\else\n\ % gray\n\ \\def\\colorrgb#1{\\color{black}}%\n\ \\def\\colorgray#1{\\color[gray]{#1}}%\n\ \\expandafter\\def\\csname LTw\\endcsname{\\color{white}}%\n\ \\expandafter\\def\\csname LTb\\endcsname{\\color{black}}%\n\ \\expandafter\\def\\csname LTa\\endcsname{\\color{black}}%\n\ \\expandafter\\def\\csname LT0\\endcsname{\\color{black}}%\n\ \\expandafter\\def\\csname LT1\\endcsname{\\color{black}}%\n\ \\expandafter\\def\\csname LT2\\endcsname{\\color{black}}%\n\ \\expandafter\\def\\csname LT3\\endcsname{\\color{black}}%\n\ \\expandafter\\def\\csname LT4\\endcsname{\\color{black}}%\n\ \\expandafter\\def\\csname LT5\\endcsname{\\color{black}}%\n\ \\expandafter\\def\\csname LT6\\endcsname{\\color{black}}%\n\ \\expandafter\\def\\csname LT7\\endcsname{\\color{black}}%\n\ \\expandafter\\def\\csname LT8\\endcsname{\\color{black}}%\n\ \\fi\n\ \\fi\n", gpoutfile); fprintf(gpoutfile,"\ \\setlength{\\unitlength}{%.4fbp}%%\n\ \\begin{picture}(%.2f,%.2f)%%\n", 1.0 / (2*PS_SC), term->xmax * xsize, term->ymax * ysize); } if (ps_params->background.r >= 0) { fprintf(gpoutfile, "\\definecolor{gpBackground}{rgb}{%.3f, %.3f, %.3f}%%\n", ps_params->background.r, ps_params->background.g, ps_params->background.b); fprintf(gpoutfile, "\\put(0,0){\\colorbox{gpBackground}{\\makebox(%.2f,%.2f)[]{}}}%%\n", term->xmax * xsize, term->ymax * ysize); } if (fontfamily) free(fontfamily); if (fontseries) free(fontseries); if (fontshape) free(fontshape); } TERM_PUBLIC void EPSLATEX_put_text(unsigned int x, unsigned int y, const char *str) { if (gpoutfile) { if (!tex_color_synced) { fputs(tex_current_color, gpoutfile); tex_color_synced = TRUE; } fprintf(gpoutfile, " \\put(%d,%d){", x, y); if (ps_ang) fprintf(gpoutfile,"\\rotatebox{%d}{", ps_ang); if (((str[0] == '{') || (str[0] == '['))) { fprintf(gpoutfile, "\\makebox(0,0)%s", str); } else switch (ps_justify) { case LEFT: fprintf(gpoutfile, "\\makebox(0,0)[l]{\\strut{}%s}", str); break; case CENTRE: fprintf(gpoutfile, "\\makebox(0,0){\\strut{}%s}", str); break; case RIGHT: fprintf(gpoutfile, "\\makebox(0,0)[r]{\\strut{}%s}", str); break; } if (ps_ang) { fputs("}", gpoutfile); } fputs("}%\n", gpoutfile); } } /* assigns dest to outstr, so it must be allocated or NULL * and it must not be outstr itself ! */ void EPSLATEX_reopen_output(char * ext) { char *psoutstr = NULL; if (outstr) { unsigned int outstrlen = strlen(outstr); if (strrchr(outstr, '.') != &outstr[outstrlen-4] ) { int_error(NO_CARET, "epslatex output file name must be of the form filename.xxx"); } /* copy filename to postsript output */ psoutstr = gp_alloc(outstrlen+5, "epslatex eps filename"); strcpy( psoutstr, outstr); if ((!strncmp( &outstr[outstrlen-4], ".eps", 4 )) || (!strncmp( &outstr[outstrlen-4], ".EPS", 4 ))) { if (ps_params->epslatex_standalone) int_error(NO_CARET, "For epslatex standalone mode, you have to %s", "give the tex filename as output"); /* rename primary output (tex) */ strncpy( &outstr[outstrlen-4], ".tex", 4); /* redirect FILE stream */ gppsfile = gpoutfile; gpoutfile = fopen(outstr,"w"); int_warn(NO_CARET, "Resetting primary output file to %s,\n\ PostScript output to %s", outstr, psoutstr); if (!gpoutfile) int_error(NO_CARET, "--- reopen failed"); } else { char suffix[PATH_MAX]; if (ps_params->epslatex_standalone) sprintf(suffix, "-inc.%s", ext); else sprintf(suffix, ".%s", ext); strncpy(&psoutstr[outstrlen - 4], suffix, strlen(suffix) + 1); /* BM: Need binary output for PDF files. Does this have negative side effects for EPS? */ gppsfile = fopen(psoutstr, "wb"); } if (!gppsfile) int_error(NO_CARET, "open of postscipt output file %s failed", psoutstr); /* set the name for the \includegraphics command */ pslatex_auxname = gp_alloc(strlen(psoutstr)-3, "epslatex TeX filename"); strncpy( pslatex_auxname, psoutstr, strlen(psoutstr)-4 ); pslatex_auxname[strlen(psoutstr)-4] = '\0'; free(psoutstr); } } TERM_PUBLIC void EPSLATEX_set_color(t_colorspec *colorspec) { double gray; #ifdef HAVE_CAIROPDF /* Fancy footwork to deal with mono/grayscale plots */ if (ISCAIROTERMINAL) { cairotrm_set_color(colorspec); } else #endif { /* Filter out duplicate requests */ if (!memcmp(&tex_previous_colorspec, colorspec, sizeof(t_colorspec))) return; else memcpy(&tex_previous_colorspec, colorspec, sizeof(t_colorspec)); if (colorspec->type == TC_LT && !ps_params->color) PS_linetype(colorspec->lt); else PS_set_color(colorspec); } /* Many [most? all?] of the set_color commands only affect the *.eps */ /* output stream. So rather than printing them all to the *.tex stream, */ /* we update the current color and set a flag to say it has changed. */ /* Only when some TeX object is output do we sync the current color by */ /* writing it out. */ tex_color_synced = FALSE; if (colorspec->type == TC_RGB) { double r = (double)((colorspec->lt >> 16 ) & 255) / 255.; double g = (double)((colorspec->lt >> 8 ) & 255) / 255.; double b = (double)(colorspec->lt & 255) / 255.; sprintf(tex_current_color, " \\colorrgb{%3.2f,%3.2f,%3.2f}%%\n",r,g,b); } if (colorspec->type == TC_LT) { int linetype = colorspec->lt; if (ps_params->oldstyle) linetype = (linetype % 4) + 3; else linetype = (linetype % 9) + 3; sprintf(tex_current_color, " \\csname LT%c\\endcsname%%\n", "wba012345678"[linetype]); } if (colorspec->type != TC_FRAC) return; /* map [0;1] to gray/colors */ gray = colorspec->value; if (ps_params->blacktext) { if (gray <= 0) sprintf(tex_current_color, " \\color{black}%%\n"); else if (gray >= 1) sprintf(tex_current_color, " \\color{white}%%\n"); else sprintf(tex_current_color, " \\colorgray{%s}%%\n",save_space(gray)); } else { rgb_color color; rgb1_from_gray( colorspec->value, &color ); sprintf(tex_current_color, " \\colorrgb{%3.2f,%3.2f,%3.2f}%%\n",color.r,color.g,color.b); } } TERM_PUBLIC void EPSLATEX_linetype(int linetype) { t_colorspec tempcol = {TC_LT, 0, 0.0}; tempcol.lt = linetype; PS_linetype(linetype); /* This leads to redundant *.eps output */ EPSLATEX_set_color(&tempcol); } /* * The TERM_LAYER mechanism is used here to signal a difference between * "front" text and "back" text. */ TERM_PUBLIC void EPSLATEX_layer(t_termlayer syncpoint) { switch (syncpoint) { case TERM_LAYER_RESET: /* Start of plot; reset flag */ epslatex_text_layer = 0; break; case TERM_LAYER_BACKTEXT: /* Start of "back" text layer */ if (epslatex_text_layer == 1) break; if (epslatex_text_layer == 2) fputs(" }%\n", gpoutfile); epslatex_text_layer = 1; fputs(" \\gplgaddtomacro\\gplbacktext{%\n", gpoutfile); tex_color_synced = FALSE; break; case TERM_LAYER_FRONTTEXT:/* Start of "front" text layer */ if (epslatex_text_layer == 2) break; if (epslatex_text_layer == 1) fputs(" }%\n", gpoutfile); epslatex_text_layer = 2; fputs(" \\gplgaddtomacro\\gplfronttext{%\n", gpoutfile); tex_color_synced = FALSE; break; case TERM_LAYER_END_TEXT: /* Close off front or back macro before leaving */ if (epslatex_text_layer == 1 || epslatex_text_layer == 2) fputs(" }%\n", gpoutfile); epslatex_text_layer = 0; break; case TERM_LAYER_BEGIN_PM3D_MAP: if (gppsfile && (gppsfile != gpoutfile)) fprintf(gppsfile, "%%pm3d_map_begin\n"); break; case TERM_LAYER_END_PM3D_MAP: if (gppsfile && (gppsfile != gpoutfile)) fprintf(gppsfile, "%%pm3d_map_end\n"); break; default: break; } } #endif /* TERM_BODY */ #ifdef TERM_TABLE #ifndef GOT_POST_PROTO #define TERM_PROTO_ONLY #include "post.trm" #undef TERM_PROTO_ONLY #endif /* GOT_POST_PROTO */ TERM_TABLE_START(epslatex_driver) "epslatex", "LaTeX picture environment using graphicx package", PS_XMAX, PS_YMAX, EPSLATEX_VCHAR, EPSLATEX_HCHAR, PS_VTIC, PS_HTIC, PS_options, PS_init, PSLATEX_reset, PS_text, null_scale, PS_graphics, PS_move, PS_vector, EPSLATEX_linetype, EPSLATEX_put_text, PS_text_angle, PS_justify_text, PS_point, do_arrow, PS_set_font, PS_pointsize, TERM_BINARY|TERM_IS_POSTSCRIPT|TERM_CAN_CLIP|TERM_IS_LATEX /*flags */, 0 /*suspend */, 0 /*resume */, PS_fillbox, PS_linewidth, #ifdef USE_MOUSE 0, 0, 0, 0, 0, /* no mouse support for postscript */ #endif PS_make_palette, PS_previous_palette, EPSLATEX_set_color, PS_filled_polygon, PS_image, 0, 0, 0, /* Enhanced text mode not used */ EPSLATEX_layer, /* Used to signal front/back text */ PS_path TERM_TABLE_END(epslatex_driver) #undef LAST_TERM #define LAST_TERM epslatex_driver TERM_TABLE_START(pslatex_driver) "pslatex", "LaTeX picture environment with PostScript \\specials", PS_XMAX, PS_YMAX, PSTEX_VCHAR, PSTEX_HCHAR, PS_VTIC, PS_HTIC, PS_options, PS_init, PSLATEX_reset, PSTEX_text, null_scale, PS_graphics, PS_move, PS_vector, PS_linetype, PSTEX_put_text, PS_text_angle, PS_justify_text, PS_point, PS_arrow, set_font_null, PS_pointsize, TERM_CAN_CLIP|TERM_IS_LATEX /*flags */ , 0 /*suspend */ , 0 /*resume */ , PS_fillbox, PS_linewidth #ifdef USE_MOUSE , 0, 0, 0, 0, 0 /* no mouse support for postscript */ #endif , PS_make_palette, PS_previous_palette, /* write grestore */ PS_set_color, PS_filled_polygon , PS_image , 0, 0, 0 /* No enhanced text mode because this is LaTeX */ , 0 /* layer */ , PS_path TERM_TABLE_END(pslatex_driver) #undef LAST_TERM #define LAST_TERM pslatex_driver TERM_TABLE_START(pstex_driver) "pstex", "plain TeX with PostScript \\specials", PS_XMAX, PS_YMAX, PSTEX_VCHAR, PSTEX_HCHAR, PS_VTIC, PS_HTIC, PS_options, PS_init, PSLATEX_reset, PSTEX_text, null_scale, PS_graphics, PS_move, PS_vector, PS_linetype, PSTEX_put_text, PS_text_angle, PS_justify_text, PS_point, PS_arrow, set_font_null, PS_pointsize, TERM_CAN_CLIP|TERM_IS_LATEX /*flags */ , 0 /*suspend */ , 0 /*resume */ , PS_fillbox, PS_linewidth #ifdef USE_MOUSE , 0, 0, 0, 0, 0 /* no mouse support for postscript */ #endif , PS_make_palette, PS_previous_palette, /* write grestore */ PS_set_color, PS_filled_polygon , PS_image , 0, 0, 0 /* No enhanced text mode because this is LaTeX */ , 0 /* layer */ , PS_path TERM_TABLE_END(pstex_driver) #undef LAST_TERM #define LAST_TERM pstex_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ ����������������������������������������������������������������������������������gnuplot-4.6.4/term/excl.trm�������������������������������������������������������������������������0000644�0004711�0000144�00000021432�10460036602�012556� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: excl.trm,v 1.16 2006/07/21 02:35:46 sfeam Exp $ * */ /* GNUPLOT - excl.trm */ /* Copyright 1992, 1998, 2004 by P. Klosowski at NIST. All Rights Reserved * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * This file is included by ../term.c. * * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /*** NAME quic PURPOSE QUIC driver for GNUPLOT NOTES HISTORY przemek - Aug 16, 1992: Created. lars - Nov 30, 1998: Updated to new gnuplot copyright by permission from Przemek ***/ /* c ***************************************** c ***************************************** c ****** ***** c ****** EXCL command definitions ***** c ****** ***** c ***************************************** c ***************************************** */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(excl) #endif #ifdef TERM_PROTO TERM_PUBLIC void EXCL_init __PROTO((void)); TERM_PUBLIC void EXCL_graphics __PROTO((void)); TERM_PUBLIC void EXCL_text __PROTO((void)); TERM_PUBLIC void EXCL_linetype __PROTO((int linetype)); TERM_PUBLIC void EXCL_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void EXCL_vector __PROTO((unsigned int x2, unsigned int y2)); TERM_PUBLIC void EXCL_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC void EXCL_reset __PROTO((void)); #define EXCL_XMAX 9000 #define EXCL_YMAX 6500 #define EXCL_XLAST (EXCL_XMAX - 1) #define EXCL_YLAST (EXCL_YMAX - 1) #define EXCL_VCHAR 120 #define EXCL_HCHAR 70 #define EXCL_VTIC 70 #define EXCL_HTIC 70 #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY /* Define ansi command headers, NUL character */ #define ESC "\033" #define GS "\035" #define CSI "\033[" #define DCS "\033P" #define ST "\033\\" /* page numbers are given per "Talaris EXCL programmer's reference manual" M292 rev.2 NOTE: EXCL coordinate system places (0,0) at upper left corner of the page c EXCL commands for initialization c TALAMS: set ANSI (p. 162) c TALMOD: set emulation *** EXCL (p. 164) c TALPGO: set page orient *** landscape (p. 81) c TALFCTL: set paper format *** 8.5x11 (p. 85) c TALTBM: set top/bot margins ** in land mode to full pg (p. 73) c TALLRM: set left/right margins (p. 75) c PUM: set units ** units of measure set by TALPRM (p. 67) c TALASF: Absorb cr/ff/lf/vt ** ON (p. 182) c TALPOP: pop controller params (p. 168) c TALPSH: push controller params (p. 167) c TALPRM: set units of measure ** to 1/1000 inch (p. 64) c TALGLT: set line type ** solid (p. 211) c TALORG: set page absolute origin ** (0,0) UL corner (p. 78) c TALPCW: set page clip window *** for landsc/full page (p. 84) c TALGLP: line: **pen7x7mil*draw*smear*glyph112*font5279* (p. 208) c TALGLPE: ending for TALGLP command, forcing DRAW mode c TALGBB: bounding box; used only by qdrive (p. 207) c TALFPO: Force page out ** clear bitmap (p. 95) c TALGDW: graphical draw to hor,vert ** abs coords (p. 212) c TALGMV: graphical move to hor,vert ** abs coords (p. 213) */ #define TALAMS "\033[0*s" #define TALMOD "\033[1;0r" #define TALPGO "\033[1;0p" #define TALFCTL "\033[0;3x" #define TALTBM "\033[0;8500 v" #define TALLRM "\033[0;11000v" #define PUM "\033[11h" #define TALASF "\033[1 z" #define TALPOP "\033[*]" #define TALPSH "\033[*[" #define TALPRM "\033[3y" #define TALGLT "\033[%s*t" #define TALORG "\033[0;0o" #define TALCCNT "\033[1;0u" #define TALPCW "\033[0;8500;11000;0*c" #define TALGLP_init "\033[7;7;8;1;112;5279*w" #define TALGLP "\033[%d;%d;8*w" #define TALFPO "\033[0*F" #define TALGDW "\033[0;%d;%d*d" #define TALGMV "\033[0;%d;%d*m" /* TALPYL: polyline (p. 222) ** 5;0} list of 16-bit signed integers, encoded, mostly relative ** 5,1} list of ASCII absolute coords (if w/o +- signs)(e.g. 315:1222;) */ #define TALPYL "\033P5;1}" TERM_PUBLIC void EXCL_init() { fprintf(gpoutfile, "%s%s%s%s%s%s", TALPSH, TALAMS, TALMOD, TALCCNT, TALFCTL, TALASF); /* ^save state ^setEXCL ^PaperSize8.5x11 */ /* ^setANSI ^copyCount1 ^absorbCtlChar */ fprintf(gpoutfile, "%s%s%s%s%s%s", PUM, TALPRM, TALPGO, TALPCW, TALORG, TALGLP_init); fprintf(gpoutfile, TALGLT, ""); /* ^setUnits ^landscape ^OriginZero ^SolidLine */ /* ^Units1/1000" ^pageClip ^SetLine */ } TERM_PUBLIC void EXCL_graphics() { } TERM_PUBLIC void EXCL_text() { fputs(TALFPO, gpoutfile); /* ^pageout */ } TERM_PUBLIC void EXCL_linetype(int linetype) { /* excl line widths in mils: 4 is mimimum, but too thin; then 7,10,14,17,20,24,27... exclpen=MOD(NPEN,8)*7 CSI exclpen; exclpen; TALGLPE */ static char *type[2 + 9] = { "", "40;40", "", "42;42", "14;21", /* .... ---- -- -- -- . . . */ "", "49;30", "14;21", "", "49;30", "14;21" /* same pattern, but thicker.. and thicker */ }; static int width[2+9] = { 14, 7, 7, 7, 7, 10, 10, 10, 17, 17, 17 }; if (linetype >= 9) linetype %= 9; if (linetype < -2) linetype = LT_BLACK; fprintf(gpoutfile, TALGLP, width[linetype + 2], width[linetype + 2]); /* ^width in dots */ fprintf(gpoutfile, TALGLT, type[linetype + 2]); /* ^line type */ } TERM_PUBLIC void EXCL_move(unsigned int x, unsigned int y) { fprintf(gpoutfile, TALGMV, 1000 + x, EXCL_YLAST + 1000 - y); /* ^pen up vector */ } TERM_PUBLIC void EXCL_vector(unsigned int x2, unsigned int y2) { fprintf(gpoutfile, TALGDW, 1000 + x2, EXCL_YLAST + 1000 - y2); /* ^pen down vector */ } TERM_PUBLIC void EXCL_put_text(unsigned int x, unsigned int y, const char str[]) { char ch; EXCL_move(x, y - EXCL_VCHAR / 3); ch = *str++; while (ch != NUL) { putc(ch, gpoutfile); ch = *str++; } } TERM_PUBLIC void EXCL_reset() { fprintf(gpoutfile, "%s%s", TALFPO, TALPOP); /* ^pageout ^pop */ } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(excl_driver) "excl", "Talaris EXCL Laser printer (also Talaris 1590 and others)", EXCL_XMAX, EXCL_YMAX, EXCL_VCHAR, EXCL_HCHAR, EXCL_VTIC, EXCL_HTIC, options_null, EXCL_init, EXCL_reset, EXCL_text, null_scale, EXCL_graphics, EXCL_move, EXCL_vector, EXCL_linetype, EXCL_put_text, null_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(excl_driver) #undef LAST_TERM #define LAST_TERM excl_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(excl) "1 excl", "?commands set terminal excl", "?set terminal excl", "?set term excl", "?terminal excl", "?term excl", "?excl", " The `excl` terminal driver supports Talaris printers such as the EXCL Laser", " printer and the 1590. It has no options." END_HELP(excl) #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/context.trm����������������������������������������������������������������������0000644�0004711�0000144�00000222247�12162200516�013314� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: context.trm,v 1.3.2.4 2013/06/22 17:25:58 sfeam Exp $ */ /* GNUPLOT - context.trm */ /*[ * Copyright (c) 2006-2011, Mojca Miklavec * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. ]*/ /* * AUTHORS: * Mojca Miklavec * <mojca.miklavec.lists at gmail.com> * - author of this file * - improvements to m-gnuplot.tex * - mp-gnuplot.mp - metapost macros to support gnuplot-specifics * inside ConTeXt * * Hans Hagen (author of ConTeXt) * <pragma at wxs.nl> * - a lot of functionality added to ConTeXt to enable better support * of Gnuplot module, many bugs fixed * - author of the module m-gnuplot.tex to support inclusion of Gnuplot * graphics into ConTeXt * - constant support on the most tricky issues * Taco Hoekwater (developer of MetaPost, pdfTeX & LuaTeX) * <taco at elvenkind.com> * - some code of this file, many tricks, lots of bug fixes, * suggestions and testing * - Hans's right hand in ConTeXt development: * constant support on even more tricky issues * * For questions, suggestions, comments, improvements please contact: * - Mojca Miklavec <mojca.miklavec.lists at gmail.com> or * - <gnuplot-context at googlegroups.com> * - http://wiki.contextgarden.net/Gnuplot * * With special thanks to: * - Peter Münster (ctx) for the initiative * - Renaud Aubin (ctx) for maintaining the first source code repository * - Aditya Mahajan (ctx) for some tricky parts in m-gnuplot.tex * - Timothée Lecomte & Ethan A Merritt (gnuplot) for many suggestion about improving this terminal * - Bastian Märkisch (gnuplot) for code improvements * */ /* * GNUPLOT -- context.trm * * This driver creates a ConTeXt document with embded metapost (metafun) * commands and is consequently used for creation of PDF documents. * * It is in a way similar to pslatex, but specialized for ConTeXt, * where it can also be used in the following way: * * \usemodule[gnuplot] * * \starttext * \title{Drawing nice graphs with \sc gnuplot} * \startGNUPLOTscript{sin} * plot sin(x) t '$\sin(x)$' * \stopGNUPLOTscript * \useGNUPLOTgraphic[sin] * \stoptext * * For more information see http://wiki.contextgarden.net/Gnuplot * * Mostly based on: * - default settings copied from LaTeX terminal (because I liked it) * - path construction & drawing routines from MetaPost terminal * - advanced functionality with reference to PostScript terminal * * Future plans: * - most important * - different syntax for font switching * - improve support for (transparent) binary images * - add missing functionality: * - improved support for palettes * - smooth shading in color bars * - gouraud shading (if it will be implemented in gnuplot) * - other color spaces * - derive a better metapost terminal out of this one (to replace the old one) */ #include "driver.h" #include "pm3d.h" #ifdef TERM_REGISTER register_term(context) #endif #ifdef TERM_PROTO TERM_PUBLIC void CONTEXT_options __PROTO((void)); TERM_PUBLIC void CONTEXT_init __PROTO((void)); TERM_PUBLIC void CONTEXT_reset __PROTO((void)); TERM_PUBLIC void CONTEXT_text __PROTO((void)); TERM_PUBLIC void CONTEXT_graphics __PROTO((void)); TERM_PUBLIC void CONTEXT_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void CONTEXT_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void CONTEXT_linetype __PROTO((int lt)); TERM_PUBLIC void CONTEXT_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int CONTEXT_text_angle __PROTO((int ang)); TERM_PUBLIC int CONTEXT_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void CONTEXT_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void CONTEXT_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); TERM_PUBLIC int CONTEXT_set_font __PROTO((const char *font)); /* "font,size" */ TERM_PUBLIC void CONTEXT_pointsize __PROTO((double pointsize)); TERM_PUBLIC void CONTEXT_fillbox __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); /* clear part of multiplot */ TERM_PUBLIC void CONTEXT_fill __PROTO((int style)); TERM_PUBLIC void CONTEXT_linewidth __PROTO((double linewidth)); TERM_PUBLIC int CONTEXT_make_palette __PROTO((t_sm_palette *palette)); /* TERM_PUBLIC void CONTEXT_previous_palette __PROTO((void)); do we need it? */ TERM_PUBLIC void CONTEXT_set_color __PROTO((t_colorspec *colorspec)); TERM_PUBLIC void CONTEXT_filled_polygon __PROTO((int points, gpiPoint *corners)); TERM_PUBLIC void CONTEXT_image __PROTO((unsigned, unsigned, coordval *, gpiPoint *, t_imagecolor)); /* Metapost < 1.750 can only deal with numbers between 2^{-16} and 2^12=4069 */ /* scale is 1cm = 1000 units */ #define CONTEXT_DPCM 1000 #define CONTEXT_DPI (2.54 * CONTEXT_DPCM) /* default plot size will be 5in x 3in */ #define CONTEXT_XSIZE_VALUE 5 #define CONTEXT_YSIZE_VALUE 3 #define CONTEXT_SIZE_UNIT INCHES #define CONTEXT_XMAX (CONTEXT_XSIZE_VALUE * CONTEXT_DPI) #define CONTEXT_YMAX (CONTEXT_YSIZE_VALUE * CONTEXT_DPI) /* default fontsize: 12pt */ #define CONTEXT_FONTSIZE 12.0 /* default height of char: 12pt by default */ #define CONTEXT_VCHAR (CONTEXT_DPI * CONTEXT_FONTSIZE / 72.27) /* in ConTeXt 12pt LM font is the default; * at that size digits are 5.8749847pt wide * in LaTeX, which assumes 11pt, the ratio is 5.3/11, which is similar */ #define CONTEXT_LM_H_TO_V_RATIO 0.4895 #define CONTEXT_HCHAR (CONTEXT_LM_H_TO_V_RATIO * CONTEXT_VCHAR) /* default tic size: 3.5bp (chosen to suit the size of plot approximately) * - in LaTeX it is 5bp * - in TikZ it is 0.18cm (approximately 5.1bp) * - in PostScript it is 3.15pt * - MetaPost uses 5pt or 5bp */ #define CONTEXT_HTIC (3.5 * CONTEXT_DPI / 72) #define CONTEXT_VTIC CONTEXT_HTIC #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY /* * started counting when the code was included into CVS * * major number should change only in case of a complete rewrite or major incompatibility * minor number should change for every new functionality * patch number & date should change in every commit */ static const char CONTEXT_term_version[] = "1.0"; static const char CONTEXT_term_patch[] = "0"; static const char CONTEXT_term_date[] = "2011-11-05"; static void CONTEXT_params_reset __PROTO((void)); static void CONTEXT_adjust_dimensions __PROTO((void)); static void CONTEXT_fontstring_parse __PROTO((char *from_string, char *to_string, int to_size, double *fontsize)); static void CONTEXT_startpath __PROTO((void)); static void CONTEXT_endpath __PROTO((void)); static void CONTEXT_write_palette __PROTO((t_sm_palette *palette)); static void CONTEXT_write_palette_gradient __PROTO((gradient_struct *gradient, int cnt)); /* Each number is divided by 100 (1/100th of a point is drawn) */ static int CONTEXT_posx; static int CONTEXT_posy; /* remembers where we started the path: * if we finish it in the same point, the path is closed with --cycle * * After I implemented this, the functionality has been added to gnuplot core * and PostScript terminal uses it, but to be on the safe side, * I prefer not to add last-minute patches which could potentially break something. * (the code written here proved to be rather safe & working so far) * In the next version the core functionality should be integrated & tested. */ static int CONTEXT_path_start_x; static int CONTEXT_path_start_y; /* fontname, fontsize */ static char CONTEXT_font[MAX_ID_LEN+1] = ""; static double CONTEXT_fontsize = CONTEXT_FONTSIZE; /* fontname,fontsize to be put next to font labels if needed */ static char CONTEXT_font_explicit[2*MAX_ID_LEN+1] = ""; /* this is only set to >0 if asked for explicitely (for example with set_font(",15")) */ static double CONTEXT_fontsize_explicit = 0.0; /* the last pointsize used (it will only be changed if it becomes different) */ static double CONTEXT_old_pointsize = 1.0; /* the last linewidth used (it will only be changed if it becomes different) */ static double CONTEXT_old_linewidth = 1.0; /* the last linetype used (it will only be changed if it becomes different) */ static int CONTEXT_old_linetype = -3; /* was the color changed explicitly? */ static TBOOLEAN CONTEXT_color_changed = FALSE; /* the number of path nodes before a newline (doesn't really matter, * could be set to 1000; check if any editors have problems with that) */ #define CONTEXT_LINEMAX 4 /* if we're inside a path (unfinished line) then path_count > 0 * (PDF has PDF_pathIsOpen) */ static unsigned int CONTEXT_path_count = 0; /* this true/false switch is used to help distinguish dots from paths */ static unsigned int CONTEXT_path_is_dot = 0; /* angle of text rotation */ static int CONTEXT_ang = 0; /* left/middle/right text justification */ static enum JUSTIFY CONTEXT_justify = LEFT; enum LINEJOIN { LINEJOIN_MITER, LINEJOIN_ROUND, LINEJOIN_BEVEL }; enum LINECAP { LINECAP_BUTT, LINECAP_ROUND, LINECAP_SQUARE }; /* whether points are drawn with metapost or typeset with TeX (easy configurable) */ enum CONTEXT_POINTS { CONTEXT_POINTS_WITH_METAPOST, CONTEXT_POINTS_WITH_TEX }; /* whether images are inline or written out as PNGs and included (in MKII only external work) */ enum CONTEXT_IMAGES { CONTEXT_IMAGES_INLINE, CONTEXT_IMAGES_EXTERNAL }; /* counts the number of graphics */ static int CONTEXT_counter = 0; /* counts the number of external PNG images */ static int CONTEXT_image_counter = 0; /* length of basename for storing image name (including path, excluding extension) */ static int CONTEXT_image_filename_length = 0; /* if name is a path, remember at which index basename starts */ static int CONTEXT_image_filename_start = 0; static char *CONTEXT_image_filename = NULL; /* whether images will be external or not */ enum CONTEXT_IMAGES CONTEXT_images = CONTEXT_IMAGES_INLINE; /* Pallete has to be stored for the usage in later plots */ static t_sm_palette *CONTEXT_old_palette; /*********************/ /* global parameters */ /*********************/ typedef struct CONTEXT_params_t { double xsize; /* 5in */ double ysize; /* 3in */ size_units unit; /* INCHES */ TBOOLEAN standalone; /* false */ TBOOLEAN timestamp; /* true */ char *header; /* "" */ TBOOLEAN color; /* true */ TBOOLEAN dashed; /* true */ enum LINEJOIN linejoin; /* MITER */ enum LINECAP linecap; /* BUTT */ double scale_dashlength; /* 1.0 */ double scale_linewidth; /* 1.0 */ double scale_text; /* 1.0 */ enum CONTEXT_POINTS points; /* CONTEXT_POINTS_WITH_METAPOST */ enum CONTEXT_IMAGES images; /* CONTEXT_IMAGES_INLINE */ char font[MAX_ID_LEN+1]; /* "" */ double fontsize; /* 12pt */ } CONTEXT_params_t; #define CONTEXT_PARAMS_DEFAULT { \ CONTEXT_XSIZE_VALUE,\ CONTEXT_YSIZE_VALUE,\ INCHES,\ FALSE,\ TRUE,\ NULL,\ TRUE,\ TRUE,\ LINEJOIN_MITER,\ LINECAP_BUTT,\ 1.0,\ 1.0,\ 1.0,\ CONTEXT_POINTS_WITH_METAPOST,\ CONTEXT_IMAGES_INLINE,\ "",\ CONTEXT_FONTSIZE\ } static CONTEXT_params_t CONTEXT_params = CONTEXT_PARAMS_DEFAULT; enum CONTEXT_id { CONTEXT_OPT_DEFAULT, CONTEXT_OPT_SIZE, CONTEXT_OPT_SIZE_DEFAULT, CONTEXT_OPT_INPUT, CONTEXT_OPT_STANDALONE, CONTEXT_OPT_TIMESTAMP, CONTEXT_OPT_NOTIMESTAMP, CONTEXT_OPT_HEADER, CONTEXT_OPT_NOHEADER, CONTEXT_OPT_COLOR, CONTEXT_OPT_MONOCHROME, CONTEXT_OPT_DASHED, CONTEXT_OPT_SOLID, CONTEXT_OPT_LINEJOIN_MITERED, CONTEXT_OPT_LINEJOIN_ROUNDED, CONTEXT_OPT_LINEJOIN_BEVELED, CONTEXT_OPT_LINECAP_BUTT, CONTEXT_OPT_LINECAP_ROUNDED, CONTEXT_OPT_LINECAP_SQUARED, CONTEXT_OPT_SCALE_DASHLENGTH, CONTEXT_OPT_SCALE_LINEWIDTH, CONTEXT_OPT_SCALE_TEXT, CONTEXT_OPT_POINTS_WITH_METAPOST, CONTEXT_OPT_POINTS_WITH_TEX, CONTEXT_OPT_IMAGES_INLINE, CONTEXT_OPT_IMAGES_EXTERNAL, CONTEXT_OPT_DEFAULTFONT, CONTEXT_OPT_FONT, CONTEXT_OPT_OTHER }; static struct gen_table CONTEXT_opts[] = { { "d$efault", CONTEXT_OPT_DEFAULT }, { "size", CONTEXT_OPT_SIZE }, { "defaultsize", CONTEXT_OPT_SIZE_DEFAULT }, { "inp$ut", CONTEXT_OPT_INPUT }, { "stand$alone", CONTEXT_OPT_STANDALONE }, { "time$stamp", CONTEXT_OPT_TIMESTAMP }, { "notime$stamp", CONTEXT_OPT_NOTIMESTAMP }, { "header", CONTEXT_OPT_HEADER }, { "noheader", CONTEXT_OPT_NOHEADER }, { "col$or", CONTEXT_OPT_COLOR }, { "col$our", CONTEXT_OPT_COLOR }, { "mono$chrome", CONTEXT_OPT_MONOCHROME }, { "da$shed", CONTEXT_OPT_DASHED }, { "so$lid", CONTEXT_OPT_SOLID }, { "miter$ed", CONTEXT_OPT_LINEJOIN_MITERED }, { "rounded", CONTEXT_OPT_LINEJOIN_ROUNDED }, { "bevel$ed", CONTEXT_OPT_LINEJOIN_BEVELED }, { "butt", CONTEXT_OPT_LINECAP_BUTT }, { "round", CONTEXT_OPT_LINECAP_ROUNDED }, { "square$d", CONTEXT_OPT_LINECAP_SQUARED }, { "dashl$ength", CONTEXT_OPT_SCALE_DASHLENGTH }, { "dl", CONTEXT_OPT_SCALE_DASHLENGTH }, { "linew$idth", CONTEXT_OPT_SCALE_LINEWIDTH }, { "lw", CONTEXT_OPT_SCALE_LINEWIDTH }, { "fontscale", CONTEXT_OPT_SCALE_TEXT }, { "textscale", CONTEXT_OPT_SCALE_TEXT }, /* backward compatibility */ { "mp$points", CONTEXT_OPT_POINTS_WITH_METAPOST}, { "tex$points", CONTEXT_OPT_POINTS_WITH_TEX}, { "pointswithmp", CONTEXT_OPT_POINTS_WITH_METAPOST}, /* (removable) backward compatibility */ { "pointswithmetapost", CONTEXT_OPT_POINTS_WITH_METAPOST}, /* (removable) backward compatibility */ { "pointswithtex", CONTEXT_OPT_POINTS_WITH_TEX}, /* (removable) backward compatibility */ { "inline$images", CONTEXT_OPT_IMAGES_INLINE}, { "external$images", CONTEXT_OPT_IMAGES_EXTERNAL}, { "font", CONTEXT_OPT_FONT }, { "defaultfont", CONTEXT_OPT_DEFAULTFONT }, { NULL, CONTEXT_OPT_OTHER } }; /* ********************** * CONTEXT_params_reset * * ********************** * * Resets all parameters of the terminal to their default value. */ static void CONTEXT_params_reset() { static const CONTEXT_params_t CONTEXT_params_default = CONTEXT_PARAMS_DEFAULT; /* free the memory with header first */ if (CONTEXT_params.header) { free(CONTEXT_params.header); CONTEXT_params.header = NULL; } memcpy(&CONTEXT_params, &CONTEXT_params_default, sizeof(CONTEXT_params_t)); } /* ***************** * CONTEXT_options * * ***************** * * Parses "set term context [options]". */ TERM_PUBLIC void CONTEXT_options() { struct value a; char *tmp_string; char tmp_term_options[MAX_LINE_LEN+1] = ""; while (!END_OF_COMMAND) { switch (lookup_table(&CONTEXT_opts[0], c_token)) { case CONTEXT_OPT_DEFAULT: c_token++; /* there should be a better way to do it, but I don't know how */ CONTEXT_params_reset(); break; case CONTEXT_OPT_SIZE: { float xmax_t, ymax_t; size_units unit; c_token++; /* size <xsize> {cm|in}, <ysize> {cm|in} */ unit = parse_term_size(&xmax_t, &ymax_t, CM); CONTEXT_params.xsize = (double)xmax_t / gp_resolution; CONTEXT_params.ysize = (double)ymax_t / gp_resolution; CONTEXT_params.unit = unit; if (unit == CM) { CONTEXT_params.xsize *= 2.54; CONTEXT_params.ysize *= 2.54; } break; } case CONTEXT_OPT_SIZE_DEFAULT: c_token++; CONTEXT_params.xsize = CONTEXT_XSIZE_VALUE; CONTEXT_params.ysize = CONTEXT_YSIZE_VALUE; CONTEXT_params.unit = CONTEXT_SIZE_UNIT; break; case CONTEXT_OPT_INPUT: c_token++; CONTEXT_params.standalone = FALSE; break; case CONTEXT_OPT_STANDALONE: c_token++; CONTEXT_params.standalone = TRUE; break; case CONTEXT_OPT_TIMESTAMP: c_token++; CONTEXT_params.timestamp = TRUE; break; case CONTEXT_OPT_NOTIMESTAMP: c_token++; CONTEXT_params.timestamp = FALSE; break; case CONTEXT_OPT_HEADER: c_token++; /* parse the string */ tmp_string = try_to_get_string(); if (!tmp_string) { int_error(c_token,"String containing header information expected"); /* only touch the options if the string is OK */ } else { /* remove the old header if any */ if (CONTEXT_params.header) { free(CONTEXT_params.header); CONTEXT_params.header = NULL; } /* and set the new one if nonempty; * empty header will be treated as 'noheader' */ if (strlen(tmp_string) > 0) { CONTEXT_params.header = tmp_string; } else { free(tmp_string); } } break; case CONTEXT_OPT_NOHEADER: c_token++; /* delete the header if it exists */ if (CONTEXT_params.header) { free(CONTEXT_params.header); CONTEXT_params.header = NULL; } break; case CONTEXT_OPT_COLOR: c_token++; CONTEXT_params.color = TRUE; /* just mimick other terminals; no idea what it does; at the moment monochrome is not fully implemented either */ term->flags &= ~TERM_MONOCHROME; break; case CONTEXT_OPT_MONOCHROME: c_token++; CONTEXT_params.color = FALSE; term->flags |= TERM_MONOCHROME; break; case CONTEXT_OPT_DASHED: c_token++; CONTEXT_params.dashed = TRUE; break; case CONTEXT_OPT_SOLID: c_token++; CONTEXT_params.dashed = FALSE; break; case CONTEXT_OPT_LINEJOIN_MITERED: c_token++; CONTEXT_params.linejoin = LINEJOIN_MITER; break; case CONTEXT_OPT_LINEJOIN_ROUNDED: c_token++; CONTEXT_params.linejoin = LINEJOIN_ROUND; break; case CONTEXT_OPT_LINEJOIN_BEVELED: c_token++; CONTEXT_params.linejoin = LINEJOIN_BEVEL; break; case CONTEXT_OPT_LINECAP_BUTT: c_token++; CONTEXT_params.linecap = LINECAP_BUTT; break; case CONTEXT_OPT_LINECAP_ROUNDED: c_token++; CONTEXT_params.linecap = LINECAP_ROUND; break; case CONTEXT_OPT_LINECAP_SQUARED: c_token++; CONTEXT_params.linecap = LINECAP_SQUARE; break; case CONTEXT_OPT_SCALE_DASHLENGTH: c_token++; CONTEXT_params.scale_dashlength = real(const_express(&a)); break; case CONTEXT_OPT_SCALE_LINEWIDTH: c_token++; CONTEXT_params.scale_linewidth = real(const_express(&a)); break; case CONTEXT_OPT_SCALE_TEXT: c_token++; CONTEXT_params.scale_text = real(const_express(&a)); break; case CONTEXT_OPT_DEFAULTFONT: c_token++; /* CONTEXT_params.font should be an empty string */ CONTEXT_params.font[0] = 0; /* default fontsize is 12pt */ CONTEXT_params.fontsize = CONTEXT_FONTSIZE; break; case CONTEXT_OPT_POINTS_WITH_METAPOST: c_token++; CONTEXT_params.points = CONTEXT_POINTS_WITH_METAPOST; break; case CONTEXT_OPT_POINTS_WITH_TEX: c_token++; CONTEXT_params.points = CONTEXT_POINTS_WITH_TEX; break; case CONTEXT_OPT_IMAGES_INLINE: c_token++; CONTEXT_params.images = CONTEXT_IMAGES_INLINE; break; case CONTEXT_OPT_IMAGES_EXTERNAL: #ifdef WRITE_PNG_IMAGE c_token++; CONTEXT_params.images = CONTEXT_IMAGES_EXTERNAL; #else int_warn(c_token, "Gnuplot was built without support for PNG images. You cannot use this option unless you rebuild gnuplot."); #endif break; /* * The preferred way to set the font is to set it in a document itself, * labels in gnuplot in graphs will then inherit that font. * * However, it is important to tell gnuplot which size is going to be used, * so that it can estimate size of text labels. * * Whenever you specify * set term context font "fontname,14" * * there are two possibilities: * - if STANDALONE mode is on, then the whole string will be used as * \setupbodyfont[fontname,14pt] * somewhere on top of the document (you still have to make sure that you * included the proper typescript, so that "fontname" will be recognised * - in the other case (INPUT mode) only the font size will be used * internally to estimate sizes of labels, but the font name * won't be written anywhere */ case CONTEXT_OPT_FONT: { double tmp_fontsize; char tmp_font[MAX_ID_LEN+1] = ""; c_token++; if ((tmp_string = try_to_get_string()) && (tmp_string != NULL)) { CONTEXT_fontstring_parse(tmp_string, tmp_font, MAX_ID_LEN+1, &tmp_fontsize); /* copies font name to parameters */ strncpy(CONTEXT_params.font, tmp_font, sizeof(CONTEXT_params.font)); tmp_font[MAX_ID_LEN] = NUL; free(tmp_string); /* save font size: * * - if size > 0, copy * - if size < 0, fix the size to default value (12pt) * - if size = 0, ignore */ if (tmp_fontsize > 0) CONTEXT_params.fontsize = tmp_fontsize; else if (tmp_fontsize < 0) CONTEXT_params.fontsize = CONTEXT_FONTSIZE; } break; } case CONTEXT_OPT_OTHER: default: /* error */ int_error(c_token, "extraneous argument in set terminal %s",term->name); break; } } /* current font size in pt (to be used in CONTEXT_adjust_dimensions) */ CONTEXT_fontsize = CONTEXT_params.fontsize; /* sets term->xmax, ymax, vchar, hchar */ CONTEXT_adjust_dimensions(); snprintf(term_options, sizeof(term_options), "size %g%s,%g%s %s %s %s", CONTEXT_params.xsize, (CONTEXT_params.unit == INCHES) ? "in" : "cm", CONTEXT_params.ysize, (CONTEXT_params.unit == INCHES) ? "in" : "cm", CONTEXT_params.standalone ? "standalone" : "input", CONTEXT_params.timestamp ? "timestamp" : "notimestamp", CONTEXT_params.header == NULL ? "noheader \\\n " : "\\\n header "); if (CONTEXT_params.header != NULL) { strncat(term_options,"\"", sizeof(term_options)-strlen(term_options)-1); strncat(term_options,CONTEXT_params.header, sizeof(term_options)-strlen(term_options)-1); strncat(term_options,"\" \\\n ", sizeof(term_options)-strlen(term_options)-1); } strncat(term_options, CONTEXT_params.color ? "color " : "monochrome ", sizeof(term_options)-strlen(term_options)-1); switch (CONTEXT_params.linejoin) { case LINEJOIN_MITER: strncat(term_options, "mitered ", sizeof(term_options)-strlen(term_options)-1); break; case LINEJOIN_ROUND: strncat(term_options, "rounded ", sizeof(term_options)-strlen(term_options)-1); break; case LINEJOIN_BEVEL: strncat(term_options, "beveled ", sizeof(term_options)-strlen(term_options)-1); break; } switch (CONTEXT_params.linecap) { case LINECAP_BUTT : strncat(term_options, "butt", sizeof(term_options)-strlen(term_options)-1); break; case LINECAP_ROUND : strncat(term_options, "round", sizeof(term_options)-strlen(term_options)-1); break; case LINECAP_SQUARE: strncat(term_options, "squared", sizeof(term_options)-strlen(term_options)-1); break; } snprintf(tmp_term_options, sizeof(tmp_term_options), " %s dashlength %g linewidth %g fontscale %g \\\n ", CONTEXT_params.dashed ? "dashed" : "solid", CONTEXT_params.scale_dashlength, CONTEXT_params.scale_linewidth, CONTEXT_params.scale_text ); strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1); switch (CONTEXT_params.points) { case CONTEXT_POINTS_WITH_TEX : strncat(term_options, "texpoints ", sizeof(term_options)-strlen(term_options)-1); break; case CONTEXT_POINTS_WITH_METAPOST : strncat(term_options, "mppoints ", sizeof(term_options)-strlen(term_options)-1); break; } #ifdef WRITE_PNG_IMAGE switch (CONTEXT_params.images) { case CONTEXT_IMAGES_INLINE : strncat(term_options, "inlineimages ", sizeof(term_options)-strlen(term_options)-1); break; case CONTEXT_IMAGES_EXTERNAL : strncat(term_options, "externalimages ", sizeof(term_options)-strlen(term_options)-1); break; } #endif snprintf(tmp_term_options, sizeof(tmp_term_options), "font \"%s,%g\"", CONTEXT_params.font, CONTEXT_params.fontsize); strncat(term_options, tmp_term_options, sizeof(term_options) - strlen(term_options)-1); } /* ************** * CONTEXT_init * * ************** * * Starts a new file. * * XXX: "set term context" multiple times will only include those graphics * that were create before issuing a new "set term context options" * this should be fixed in the core by reopening the file * (removing previously written content). * - PDF & binary terminals start a new file * - PS & TeX-based terminals continue */ TERM_PUBLIC void CONTEXT_init() { time_t now; char timebuffer[100]; int i; time(&now); CONTEXT_posx = CONTEXT_posy = 0; CONTEXT_path_count = 0; CONTEXT_path_is_dot = 0; CONTEXT_counter = 0; /* setup bitmap images */ CONTEXT_image_counter = 0; /* the default is to use inline images */ CONTEXT_images = CONTEXT_IMAGES_INLINE; /* only if external images are both requested and supported, we switch to them (double paranoia) */ /* delete the stored filename first */ if (CONTEXT_image_filename) { free(CONTEXT_image_filename); CONTEXT_image_filename = NULL; CONTEXT_image_filename_length = 0; CONTEXT_image_filename_start = 0; }; #ifdef WRITE_PNG_IMAGE if (CONTEXT_params.images == CONTEXT_IMAGES_EXTERNAL) { CONTEXT_images = CONTEXT_IMAGES_EXTERNAL; /* but only if 'set output' was set because we use that string as base for image names */ if (outstr) { CONTEXT_image_filename_length = strlen(outstr); CONTEXT_image_filename_start = strlen(outstr) - strlen(gp_basename(outstr)); /* we will cut off the last .tex ending if present */ /* find the last dot if present */ for (i = CONTEXT_image_filename_length - 1; i >= 0 && outstr[i] != '.'; i--); if (outstr[i] == '.') CONTEXT_image_filename_length = i; /* it would also be very nice to do some sanity checks on filenames */ /* <name>.xx.png; must be at least 7 characters long */ CONTEXT_image_filename = (char *)gp_alloc(CONTEXT_image_filename_length + 10, "ConTeXt image filename"); strncpy(CONTEXT_image_filename, outstr, CONTEXT_image_filename_length); CONTEXT_image_filename[CONTEXT_image_filename_length] = 0; } else { CONTEXT_image_filename_length = strlen("gp_image"); CONTEXT_image_filename_start = 0; /* <name>.xx.png; must be at least 7 characters long */ CONTEXT_image_filename = (char *)gp_alloc(CONTEXT_image_filename_length + 10, "ConTeXt image filename"); strncpy(CONTEXT_image_filename, "gp_image", CONTEXT_image_filename_length); CONTEXT_image_filename[CONTEXT_image_filename_length] = 0; } } #endif fprintf(gpoutfile, "%% Written by ConTeXt terminal for GNUPLOT"); if (CONTEXT_params.timestamp) { if (strftime(timebuffer, 100, "%Y-%m-%d %H:%M %Z", localtime(&now)) != 0) fprintf(gpoutfile, " on: %s", timebuffer); } fprintf(gpoutfile, "\n"); fprintf(gpoutfile, "%% GNUPLOT version: %s.%s, terminal version: %s.%s (%s)\n", gnuplot_version, gnuplot_patchlevel, CONTEXT_term_version, CONTEXT_term_patch, CONTEXT_term_date); fprintf(gpoutfile, "%% See also http://wiki.contextgarden.net/Gnuplot\n%%\n"); /* place the header first if this is a standalone graphic */ if (CONTEXT_params.standalone) { /* If encoding is explicitely set to UTF-8 by gnuplot, use that setting. * \enableregime only makes a difference for pdfTeX; in LuaTeX and XeTeX UTF-8 is already default, * so this line will be ignored. * * There is no extra support for other encodings on purpose: * - ConTeXt doesn't support all encodings supported by Gnuplot. * - In LuaTeX and XeTeX one should not use any other encoding anyway. * - pdfTeX users are free to use "header '\enableregime[...]'" */ switch (encoding) { case S_ENC_UTF8: fputs("\\enableregime\n [utf-8]\n", gpoutfile); break; default: /* do nothing */ break; } /* load the gnuplot module */ fputs("\\usemodule\n [gnuplot]\n", gpoutfile); /* enable or disable color (the only place where "color" is indeed used so far) */ fprintf(gpoutfile, "\\setupcolors\n [state=%s]\n", CONTEXT_params.color ? "start" : "stop"); /* additional user-provided header information (if available) */ if (CONTEXT_params.header) fprintf(gpoutfile, "%s\n", CONTEXT_params.header); /* for some reason setting \bodyfontenvironment is needed, * otherwise \switchtobodyfont[name] doesn't work OK */ if (!(CONTEXT_params.fontsize == CONTEXT_FONTSIZE)) fprintf(gpoutfile, "\\definebodyfontenvironment\n [%gpt]\n", CONTEXT_params.fontsize); /* set the proper font: \setupbodyfont[{fontname,}fontsize sizeunit] */ fprintf(gpoutfile, "\\setupbodyfont\n [%s%s%gpt]\n", CONTEXT_params.font, /* write a comma only if the last string was non-empty */ ((strlen(CONTEXT_params.font)>0) ? "," : ""), CONTEXT_params.fontsize); /*---------* * options * *---------*/ fprintf(gpoutfile, "\\setupGNUPLOTterminal\n [context]\n ["); /* color (gp_use_color): yes/no (true/false) * default: yes * - doesn't do anything useful yet; * and besides that, it's already set in \setupcolors[state=start] */ /* fprintf(gpoutfile, " color=%s, %% *yes* | no\n", CONTEXT_params.color ? "yes" : "no"); */ /* linejoin: mitered/rounded/beveled * default: mitered */ fprintf(gpoutfile, "linejoin="); switch (CONTEXT_params.linejoin) { case LINEJOIN_MITER: fprintf(gpoutfile, "mitered"); break; case LINEJOIN_ROUND: fprintf(gpoutfile, "rounded"); break; case LINEJOIN_BEVEL: fprintf(gpoutfile, "beveled"); break; } fprintf(gpoutfile, ", %% *mitered* | rounded | beveled\n"); /* linecap: butt/rounded/squared * default: butt */ fprintf(gpoutfile, " linecap="); switch (CONTEXT_params.linecap) { case LINECAP_BUTT : fprintf(gpoutfile, "butt"); break; case LINECAP_ROUND : fprintf(gpoutfile, "rounded"); break; case LINECAP_SQUARE: fprintf(gpoutfile, "squared"); break; } fprintf(gpoutfile, ", %% *butt* | rounded | squared\n"); /* dashed (gp_use_dashed): yes/no (true/false) * default: yes */ fprintf(gpoutfile, " dashed=%s, %% *yes* | no\n", CONTEXT_params.dashed ? "yes" : "no"); /* dashlength (gp_scale_dashlength): 1.0 */ fprintf(gpoutfile, " dashlength=%g, %% scaling factor for dash lengths\n", CONTEXT_params.scale_dashlength); /* linewidth (gp_scale_linewidth): 1.0 */ fprintf(gpoutfile, " linewidth=%g, %% scaling factor for line widths (1.0 means 0.5bp)\n", CONTEXT_params.scale_linewidth); /* fontscale (gp_scale_text): 1.0 */ /* written out just for reference - it's commented out since it needs to be part of graphic and affects estimation of label sizes */ fprintf(gpoutfile, " %%fontscale=%g, %% scaling factor for text labels\n", CONTEXT_params.scale_text); /* points (gp_points_with): metapost/tex (gp_points_with_metapost/gp_points_with_tex) * default: metapost */ fprintf(gpoutfile, " points=%s, %% *metapost* | tex (Should points be drawn with MetaPost or TeX?)\n", CONTEXT_params.points == CONTEXT_POINTS_WITH_METAPOST ? "metapost" : "tex"); /* images * default: inline */ fprintf(gpoutfile, " images=%s] %% *inline* | external (inline only works in MKIV, external requires png support in gnuplot)\n", CONTEXT_images == CONTEXT_IMAGES_INLINE ? "inline" : "external"); /*----------------* * end of options * *----------------*/ fputs("\n\\starttext\n\n", gpoutfile); } else { /* Sorry, nothing! In non-standalone graphic, parameters make no sense. * Setup everything in the file which includes such a graphic instead. */ } } /* *************** * CONTEXT_reset * * *************** * * finish writing the file */ TERM_PUBLIC void CONTEXT_reset() { /* we only have to end the document if this is a stand-alone graphic */ if (CONTEXT_params.standalone) { fputs("\\stoptext\n", gpoutfile); } else { /* This means that any subsequent plots to the same file will be ignored. * I don't like that - gnuplot should delete the old contents instead, * just as it does in case of PNG or PDF - * but it will be at least consistent with standalone graphics that way */ fputs("\\endinput\n", gpoutfile); } /* deallocate image name if present */ if (CONTEXT_image_filename) { free(CONTEXT_image_filename); CONTEXT_image_filename = NULL; CONTEXT_image_filename_length = 0; CONTEXT_image_filename_start = 0; }; } /* ************** * CONTEXT_text * * ************** * * Ends the current graphic. */ TERM_PUBLIC void CONTEXT_text() { /* close and draw the current path first */ if (CONTEXT_path_count > 0) CONTEXT_endpath(); fprintf(gpoutfile, "setbounds currentpicture to unitsquare xyscaled (w,h);\n"); /* standalone graphic is a whole-page graphic */ if (CONTEXT_params.standalone) { fputs("\\stopGNUPLOTpage\n", gpoutfile); /* otherwise we define a MPgraphic to be included later */ } else { fputs("\\stopGNUPLOTgraphic\n", gpoutfile); } } /* ****************** * CONTEXT_graphics * * ****************** * * Starts a new graphic. */ TERM_PUBLIC void CONTEXT_graphics() { /* standalone graphic is a whole-page graphic */ if (CONTEXT_params.standalone) { fprintf(gpoutfile, "\\startGNUPLOTpage %% Graphic Nr. %d\n", ++CONTEXT_counter); /* otherwise we define a MPgraphic to be included later */ } else { /* the first parameter holds the graphic number */ fprintf(gpoutfile, "\\startGNUPLOTgraphic[%d]\n", ++CONTEXT_counter); } fprintf(gpoutfile, "string gnuplotversion; gnuplotversion := \"%s\";\n", gnuplot_version); fprintf(gpoutfile, "string termversion; termversion := \"%s\";\n", CONTEXT_term_version); /* * MetaPost can only handle numbers up to 4096. Too high resolution * would thus result in number overflow, that's why we scale down all the * integers from gnuplot by 1000 and multiply those numbers later by * appropriate scaling factor 'a' to get the proper dimensions. */ fprintf(gpoutfile, "%% scaling factor, width and height of the figure\na := 1cm; w := %.3fa; h := %.3fa; %% (%g%s, %g%s)\n", CONTEXT_params.xsize * ((CONTEXT_params.unit == INCHES) ? 2.54 : 1), /* cm */ CONTEXT_params.ysize * ((CONTEXT_params.unit == INCHES) ? 2.54 : 1), /* cm */ CONTEXT_params.xsize, (CONTEXT_params.unit == INCHES) ? "in" : "cm", CONTEXT_params.ysize, (CONTEXT_params.unit == INCHES) ? "in" : "cm"); /* TODO: the following if-else could be slightly nicer */ if (CONTEXT_images == CONTEXT_IMAGES_INLINE) { fprintf(gpoutfile, "%% temporary variable for storing the path and images\nsave p, img, ima; path p; string img, ima;\n"); } else { fprintf(gpoutfile, "%% temporary variable for storing the path\nsave p; path p;\n"); } fprintf(gpoutfile, "%% -------------------------\n"); fprintf(gpoutfile, "%% Different initialisations\n"); fprintf(gpoutfile, "%% -------------------------\n"); fprintf(gpoutfile, "%% for additional user-defined settings\ngp_setup_before;\n"); /* needed (depends on terminal settings & needs to be passed) */ fprintf(gpoutfile, "%% text scaling factor for the whole figure\n"); fprintf(gpoutfile, "gp_scale_text := %g;\n", CONTEXT_params.scale_text); fprintf(gpoutfile, "%% pointsize scaling factor\n"); fprintf(gpoutfile, "gp_set_pointsize(%g);\n", CONTEXT_old_pointsize); /* needed (provided by terminal) */ fprintf(gpoutfile, "%% linewidth scaling factor for individual lines\n"); fprintf(gpoutfile, "gp_set_linewidth(%g);\n", CONTEXT_old_linewidth); fprintf(gpoutfile, "%% for additional user-defined settings\ngp_setup_after;\n"); fprintf(gpoutfile, "%% -------------------------\n"); /* since palette is initialized only once, subsequent plots wouldn't see it * unless we write it on the top of relevant plots explicitely */ if (is_plot_with_palette()) { CONTEXT_write_palette(CONTEXT_old_palette); } /* needed, otherwise the first linetype(-2) would be ignored */ CONTEXT_old_linetype = -3; /* different initializations - not really needed, but they cannot hurt */ CONTEXT_posx = CONTEXT_posy = 0; CONTEXT_path_count = 0; CONTEXT_path_is_dot = 0; } /* --------------- * CONTEXT_endpath * --------------- * * Closes and strokes (draws) the current path. * * It the path ends where it started, it ends it with --cycle (we get cyclic path), * otherwise just with a semicolon. */ static void CONTEXT_endpath() { /* if we have a dot, draw only the dot */ if (CONTEXT_path_is_dot) { fprintf(gpoutfile, "gp_dot(%.3fa,%.3fa);\n", 0.001*CONTEXT_posx, 0.001*CONTEXT_posy); CONTEXT_path_is_dot = 0; /* cyclic path, so let's end it with "--cycle" */ } else if ((CONTEXT_posx == CONTEXT_path_start_x) && (CONTEXT_posy == CONTEXT_path_start_y)) { fputs("--cycle;\ngp_draw(p);\n", gpoutfile); /* regular non-cyclic path */ } else { fprintf(gpoutfile, "--(%.3fa,%.3fa);\ngp_draw(p);\n", 0.001*CONTEXT_posx, 0.001*CONTEXT_posy); } /* we're not inside path any more */ CONTEXT_path_count = 0; } /* ************** * CONTEXT_move * * ************** * * Remembers the new location for a path. * * If it doesn't differ from the current location, this is simply ignored. * If we're still in the middle of path construction and location differs, * it strokes the old path. * */ TERM_PUBLIC void CONTEXT_move(unsigned int x, unsigned int y) { /* we seem to be there already */ if ((x == CONTEXT_posx) && (y == CONTEXT_posy)) return; /* close and draw the current path before the move */ if (CONTEXT_path_count > 0) CONTEXT_endpath(); CONTEXT_posx = x; CONTEXT_posy = y; } /* ----------------- * CONTEXT_startpath * ----------------- * * Starts ([but not yet] drawing) a new path. */ static void CONTEXT_startpath() { CONTEXT_path_start_x = CONTEXT_posx; CONTEXT_path_start_y = CONTEXT_posy; CONTEXT_path_count = 2; fprintf(gpoutfile, "p := (%.3fa,%.3fa)", 0.001*CONTEXT_posx, 0.001*CONTEXT_posy); } /* **************** * CONTEXT_vector * * **************** * * Prolongs the current path for an additional line (from the last point to (x,y)) * unless it has a zero-length. * * Points have to be treated as a special case, since gnuplot sometimes tries * to draw them as moveto(a,b)--lineto(a,b) - without the proper linecap, * that wouldn't draw anything in MetaPost or PS. * (I hope that I got that part right, but I'm not completely sure.) */ TERM_PUBLIC void CONTEXT_vector(unsigned int x, unsigned int y) { /* this is zero-length line (or a dot) * * stupid background, has to handle * - move(0,0), vector(0,0), whatever: draw a dot * - move(0,0), vector(0,0), vector (1,1): draw a line */ if ((x == CONTEXT_posx) && (y==CONTEXT_posy)) { /* as long as this is still a dot candidate, mark it so * however - further vector() commands may set this back to 0 */ if (CONTEXT_path_count == 0) CONTEXT_path_is_dot = 1; /* if some path was already drawn up to this place, ignore (it's not a dot) */ return; } /* start the path if none is started yet */ if (CONTEXT_path_count == 0) { /* the path is not a dot */ CONTEXT_path_is_dot = 0; CONTEXT_startpath(); } else { /* or prevent too long lines if you're in the middle of a path */ if ((CONTEXT_path_count % CONTEXT_LINEMAX) == 2) { fputs("\n ", gpoutfile); CONTEXT_path_count = 2; } /* and output the previous point */ fprintf(gpoutfile, "--(%.3fa,%.3fa)", 0.001*CONTEXT_posx, 0.001*CONTEXT_posy); } CONTEXT_posx = x; CONTEXT_posy = y; CONTEXT_path_count++; } /* ****************** * CONTEXT_linetype * * ****************** * * - If only color has been changed (recently), but not the linetype, * it resets only the color. * - If linetype was changed, it sets the new linetype */ TERM_PUBLIC void CONTEXT_linetype(int lt) { /* reset the color in case it has been changed in CONTEXT_set_color() */ if (CONTEXT_old_linetype != lt || CONTEXT_color_changed) { /* close and draw the current path first */ if (CONTEXT_path_count > 0) CONTEXT_endpath(); fprintf(gpoutfile, "gp_set_linetype(%d);\n", lt); CONTEXT_old_linetype = lt; CONTEXT_color_changed = FALSE; } } /* ****************** * CONTEXT_put_text * * ****************** * * Places text labels. */ TERM_PUBLIC void CONTEXT_put_text(unsigned int x, unsigned int y, const char str[]) { const char *s; /* pointer to string */ int alignment = 0; char alignments[3][10] = {"center", "left", "right"}; /* ignore empty strings */ if (!str || !strlen(str)) return; /* close and draw the current path first */ if (CONTEXT_path_count > 0) CONTEXT_endpath(); /* see the values of "alignments" above */ switch (CONTEXT_justify) { case CENTRE: alignment = 0; break; case LEFT: alignment = 1; break; case RIGHT: alignment = 2; break; } /* remove whitespaces at the beginning of string * (usually problem in positive numbers) * They interfere with positioning: whitespace at the beginning takes * some place although it's invisible, so left-aligned and centered labels * are posioned wrong otherwise. * Example: * -1 0 1 2: centered labels on x axis * if we had a space in front, positive numbers would be "centered" in a weird way*/ for (s = str; s[0] == ' '; s++); /* label position */ fprintf(gpoutfile, "gp_put_text((%.3fa, %.3fa), ", 0.001*x, 0.001*y); /* angle of rotation - optional and needed only if it's different from 0 */ if (CONTEXT_ang != 0) fprintf(gpoutfile, "angle(%d), ", CONTEXT_ang); /* alignment - "center" is optional, but we'll add it anyway */ fprintf(gpoutfile, "align(%s), \\sometxt[gp]", alignments[alignment]); /* fontface/fontsize - optional second argument */ if (CONTEXT_font_explicit[0] != 0) fprintf(gpoutfile, "[%s]", CONTEXT_font_explicit); /* finally the text label itself */ fprintf(gpoutfile, "{%s});\n", s); } /* ******************** * CONTEXT_text_angle * * ******************** * * Saves text angle to be used for text labels. */ TERM_PUBLIC int CONTEXT_text_angle(int ang) { CONTEXT_ang = ang; return TRUE; } /* ********************** * CONTEXT_justify_text * * ********************** * * Saves horizontal text justification (left/middle/right) to be used for text labels. */ TERM_PUBLIC int CONTEXT_justify_text(enum JUSTIFY mode) { CONTEXT_justify = mode; return TRUE; } /* *************** * CONTEXT_point * * *************** * * There are two/three possible ways of drawing points in ConTeXt: * - let gnuplot draw the points with standard move/vector commands * (points_default): not enabled * - use the points predefined in mp-gnuplot.mp (drawn with metapost) * which can easily be redefined * (points_with_metapost) * - use symbols from a symbol set predefined in m-gnuplot.tex (drawn with TeX) * (points_with_tex) * * At first this routine took care of that, but now it's up to the high-level * user interface to switch between the last two options. */ TERM_PUBLIC void CONTEXT_point (unsigned int x, unsigned int y, int number) { /* finish the current line first before the move */ if (CONTEXT_path_count > 0) CONTEXT_endpath(); fprintf(gpoutfile, "gp_point(%.3fa,%.3fa,%d);\n", 0.001*x, 0.001*y, number); } /* *************** * CONTEXT_arrow * * *************** * ConTeXt could draw nice arrows on its own and in such a way that user could * simply redefine arrow heads in the template file. * * This function is left here just in case that anyoune would find it useful * to define his own arrow-drawing commands. * * Currently it just calls the default gnuplot function for drawing arrows. */ TERM_PUBLIC void CONTEXT_arrow (unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { do_arrow(sx, sy, ex, ey, head); } /* ------------------------ * CONTEXT_fontstring_parse * ------------------------ * * Parses from_string, which is divided by commas (,) * and copies the whole content to to_string except for the part * which starts with a numeric value. * * That value is interpreted separately and saved to fontsize. * * to_size is the size of to_string which may not be exceeded while copying the string */ static void CONTEXT_fontstring_parse(char *from_string, char *to_string, int to_size, double *fontsize) { double tmp_fontsize = 0.; char * comma; size_t n; comma = strrchr(from_string, ','); if (comma) { sscanf(comma + 1, "%lf", &tmp_fontsize); n = comma - from_string; } else { n = strlen(from_string); } *fontsize = tmp_fontsize; if (n >= to_size) n = to_size - 1; memcpy(to_string, from_string, n); to_string[n] = NUL; } /* ------------------------- * CONTEXT_adjust_dimensions * ------------------------- * * - sets the v_char and h_char based on current font size (approximation only) * using CONTEXT_fontsize in points (from CONTEXT_params.fontsize) and CONTEXT_params.scale_text * - sets xmax and ymax based on CONTEXT_params.xsize and CONTEXT_params.ysize */ static void CONTEXT_adjust_dimensions() { /* sets vertical dimension of characters based on current fontsize in pt */ term->v_char = (unsigned int)((double)CONTEXT_DPI * CONTEXT_fontsize / 72.27 * CONTEXT_params.scale_text + 0.5); /* based on proportions of LM digits at 12pt */ term->h_char = (unsigned int)(CONTEXT_LM_H_TO_V_RATIO * term->v_char + 0.5); /* we might want to fix CONTEXT_DPI in case that the figure becomes too big */ if (CONTEXT_params.unit == INCHES) { term->xmax = (unsigned int)((double)CONTEXT_DPI * CONTEXT_params.xsize + 0.5); term->ymax = (unsigned int)((double)CONTEXT_DPI * CONTEXT_params.ysize + 0.5); } else { term->xmax = (unsigned int)((double)CONTEXT_DPCM * CONTEXT_params.xsize + 0.5); term->ymax = (unsigned int)((double)CONTEXT_DPCM * CONTEXT_params.ysize + 0.5); } } /* ***************** * CONTEXT_set_font* * ***************** * * Official description: * - empty string restores the terminal's default font * - fonts are selected as strings "name,size", * where size should be a floating point number interpreted as "pt" (point) * * It's the user's own responsibility to make sure that the proper typescripts * are included in the header, else the selected font won't work out-of-the-box * * The ConTeXt terminal should support things such as * "iwona,ss,12" (iwona sans serif) or * ",10" (10 points) or * "tt" (typewriter) * * The routine saves font name to CONTEXT_font * and fontsize to CONTEXT_fontsize. * * The two are joined in CONTEXT_font_explicit for the usage in * \sometxt[gp][fontname,fontsize]{label} */ TERM_PUBLIC int CONTEXT_set_font(const char *font) { char tmp_fontstring[MAX_ID_LEN+1] = ""; /* saves font name & family to CONTEXT_font */ CONTEXT_fontstring_parse((char *)font, CONTEXT_font, sizeof(CONTEXT_font), &CONTEXT_fontsize_explicit); strncpy(CONTEXT_font_explicit, CONTEXT_font, sizeof(CONTEXT_font_explicit)); /* valid fontsize has been provided */ if (CONTEXT_fontsize_explicit > 0.) { /* XXX: if valid */ CONTEXT_fontsize = CONTEXT_fontsize_explicit; snprintf(tmp_fontstring, sizeof(tmp_fontstring), ",%gpt", CONTEXT_fontsize_explicit); strncat(CONTEXT_font_explicit, tmp_fontstring, sizeof(CONTEXT_font_explicit) - strlen(CONTEXT_font_explicit)-1); tmp_fontstring[MAX_ID_LEN] = NUL; /* no fontsize has been provided: switch back to default terminal fontsize */ } else if (CONTEXT_fontsize_explicit == 0) { CONTEXT_fontsize = CONTEXT_params.fontsize; } /* tell to gnuplot how big the fonts in labels are */ CONTEXT_adjust_dimensions(); return TRUE; } /* ******************* * CONTEXT_pointsize * * ******************* * * Sets the (relative) point size for subsequent points * * The base point size is defined "somewhere else": * - depends on the font[size] used when "texpoints" option is on */ TERM_PUBLIC void CONTEXT_pointsize(double pointsize) { /* * my first thought was not to allow negative sizes of points, * but I see no reason why one shouldn't be able to play with * inverted point shapes, so finally I commented this out again * * if (pointsize < 0) * pointsize = 1; */ if (CONTEXT_old_pointsize != pointsize) { /* close and draw the current path first */ if (CONTEXT_path_count > 0) CONTEXT_endpath(); fprintf(gpoutfile, "gp_set_pointsize(%.3f);\n", pointsize); CONTEXT_old_pointsize = pointsize; } } /* ***************** * CONTEXT_fillbox * * ***************** * * Creates the path for the rectangle and calls the CONTEXT_fill(style) * routine (shared with CONTEXT_filled_polygon) to actually fill that shape */ TERM_PUBLIC void CONTEXT_fillbox(int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height) { /* close and draw the current path first */ if (CONTEXT_path_count > 0) CONTEXT_endpath(); /* create a new path */ fprintf(gpoutfile, "p := unitsquare xyscaled (%.3fa,%.3fa) shifted (%.3fa,%.3fa);\n", 0.001*width, 0.001*height, 0.001*x1, 0.001*y1); /* fprintf(gpoutfile, "p := gp_rect ((%.3fa,%.3fa),(%.3fa,%.3fa));\n", 0.001*x1, 0.001*y1, 0.001*width, 0.001*height); */ /* fills the box according to the "style" * the code went out of this routine because of undocumented behaviour * that also the filled_polygon should paint with patterns ... */ CONTEXT_fill(style); } /* ************** * CONTEXT_fill * * ************** * * Filling routine, yet another undocumented feature of Gnuplot. * The code was mostly cloned from the PostScript terminal, * so that you know whom to accuse if it doesn't do what you would expect * it to do. (In case of cloning errors please inform the author of this terminal.) * * The lowest 4 bits of "style" seem to represent the style of filling * (whether it is solid or pattern-based or whatever that might appear * in that place in the future). * * The rest of the bits of "style" represent either the density * (ranging from 0 to 100) or the number of the pattern that the polygon * should be filled with. * * Used by CONTEXT_fillbox(...) and CONTEXT_filled_polygon(...) */ TERM_PUBLIC void CONTEXT_fill(int style) { int density; int pattern; /* used in FS_[TRANSPARENT_]SOLID --> fill with intensity according to filldensity it extracts a percentage out of "style" */ density = (style >> 4); if (density < 0) density = 0; if (density > 100) density = 100; fputs("gp_fill(p", gpoutfile); /* do some strange trickery */ switch (style & 0xf) { case FS_DEFAULT: break; case FS_TRANSPARENT_SOLID: /* just a flag to tell the terminal that density() should be used to interpret transparency */ fprintf(gpoutfile, ",transparent"); case FS_SOLID: /* fill the box with density "density": if no parameter density is specified, it implies 100% density by default */ if (density < 100) fprintf(gpoutfile, ",density(%.2f)", 0.01*density); break; case FS_TRANSPARENT_PATTERN: /* just a flag that should be interpreted in metapost, non-transparent patterns have to fill with background color before drawing the pattern */ fprintf(gpoutfile, ",transparent"); case FS_PATTERN: pattern = (style >> 4); fprintf(gpoutfile, ",pattern(%d)", pattern); break; default: /* style == 0 (FS_EMPTY) or unknown --> fill with background color */ fprintf(gpoutfile, ",density(0)"); } /* TODO: FS_DEFAULT is missing; what should that one do? */ /* gp_fill(p,...); */ fputs(");\n", gpoutfile); } /* ******************* * CONTEXT_linewidth * * ******************* * * scale line width (similar to pointsize) * remembers the values locally (no serious need for that actually) and writes them into file */ TERM_PUBLIC void CONTEXT_linewidth(double linewidth) { if (linewidth < 0) linewidth = 1.0; if (CONTEXT_old_linewidth != linewidth) { /* close and draw the current path first */ if (CONTEXT_path_count > 0) CONTEXT_endpath(); fprintf(gpoutfile, "gp_set_linewidth(%.3f);\n", linewidth); CONTEXT_old_linewidth = linewidth; } } /* ------------------------------ * CONTEXT_write_palette_gradient * ------------------------------ * * Writes the colors and positions for a gradient pallete. */ static void CONTEXT_write_palette_gradient(gradient_struct *gradient, int cnt) { int i; /* i-th color */ fprintf(gpoutfile, "colors("); for (i = 0; i < cnt; i++) { if (i > 0) fprintf(gpoutfile, ","); fprintf(gpoutfile, "(%.3g,%.3g,%.3g)", gradient[i].col.r, gradient[i].col.g, gradient[i].col.b); } /* position of the i-th color */ fprintf(gpoutfile, ");positions("); for (i = 0; i < cnt; i++) { if (i > 0) fprintf(gpoutfile, ","); fprintf(gpoutfile, "%.4g", gradient[i].pos); } fprintf(gpoutfile, ")"); } /* --------------------- * CONTEXT_write_palette * --------------------- * */ static void CONTEXT_write_palette(t_sm_palette *palette) { if (palette == NULL) return; /* TODO // Color models: RGB, HSV, CMY, YIQ, XYZ // // RGB: Red, Green, Blue // HSV: Hue, Saturation, Value // CMY // // two models that gnuplot uses, but which probably won't be supported by this terminal: // YIQ: U.S. Commercial Television Briadcasting (almost RGB) // XYZ: three primary colors of the color model defined by the 'Commission Internationale de l'Eclairage' (CIE) // http://www.cs.rit.edu/~ncs/color/glossary.htm // http://cs.fit.edu/wds/classes/cse5255/cse5255/davis/index.html */ fprintf(gpoutfile, "gp_make_palette("); switch (sm_palette.colorMode) { /* grayscale only */ case SMPAL_COLOR_MODE_GRAY: fprintf(gpoutfile, "color_mode(gray)"); break; /* one of several fixed transformations */ case SMPAL_COLOR_MODE_RGB: fprintf(gpoutfile, "color_mode(rgb);formulae(%d,%d,%d)", sm_palette.formulaR, sm_palette.formulaG, sm_palette.formulaB); break; /* user defined transforms */ case SMPAL_COLOR_MODE_FUNCTIONS: fprintf(gpoutfile, "color_mode(functions)"); break; /* interpolated table: explicitely defined or read from file */ case SMPAL_COLOR_MODE_GRADIENT: fprintf(gpoutfile, "color_mode(gradient);"); CONTEXT_write_palette_gradient(palette->gradient, palette->gradient_num); break; case SMPAL_COLOR_MODE_NONE: break; default: break; } fprintf(gpoutfile, ");\n"); } /* ********************* * CONTEXT_make_palette* * ********************* * * 1. if palette==NULL, then return nice/suitable * maximal number of colours supported by this terminal. * Returns 0 if it can make colours without palette (like * postscript). * 2. if palette!=NULL, then allocate its own palette * return value is undefined * 3. available: some negative values of max_colors for whatever * can be useful */ TERM_PUBLIC int CONTEXT_make_palette(t_sm_palette *palette) { if (palette == NULL) return 0; /* ConTeXt can do continuous colors */ /* save the palette */ CONTEXT_old_palette = palette; return 0; } /* * most probably this one is not needed * * TERM_PUBLIC void * CONTEXT_previous_palette(){} * */ /* ******************* * CONTEXT_set_color * * ******************* * * typedef struct t_colorspec { * int type; // TC_ DEFAULT, LT, LINESTYLE, RGB, CB, FRAC, Z * int lt; // used for TC_LT, TC_LINESTYLE and TC_RGB * double value; // used for TC_CB and TC_FRAC * } t_colorspec; */ TERM_PUBLIC void CONTEXT_set_color(t_colorspec *colorspec) { double gray, r, g, b; /* ConTeXt doesn't offer full support for palettes yet (I don't know how to trick metapost to accept the full palette specification) so we convert the colors from palettes to RGB instead. If terminal starts supporting palettes, this behaviour will change. */ rgb_color rgb1; /* If (colorspec->type == TC_FRAC): Set current color according to colorspec->value, where 0 <= value <= 1. If using a palette, first map value to an integer i in the interval [0...num_colors-1], then set to the ith color in the palette. If (colorspec->type == TC_RGB): Set current color to the rgb triple given in colorspec->lt. */ /* close and draw the current path first */ if (CONTEXT_path_count > 0) CONTEXT_endpath(); switch (colorspec->type) { /* TC_DEFAULT, TC_CB, TC_Z: probably unused; what about linestyle? */ /* color equal as that of linetype in colorspec->lt */ case TC_LT: fprintf(gpoutfile, "gp_set_color(lt(%d));\n", colorspec->lt); CONTEXT_color_changed = TRUE; break; /* rgb color */ case TC_RGB: r = (double)((colorspec->lt >> 16 ) & 255) / 255.; g = (double)((colorspec->lt >> 8 ) & 255) / 255.; b = (double)(colorspec->lt & 255) / 255.; fprintf(gpoutfile, "gp_set_color(rgb(%3.2f,%3.2f,%3.2f));\n", r, g, b); CONTEXT_color_changed = TRUE; break; /* map [0:1] to gray colors or to the corresponding color from the palette */ case TC_FRAC: gray = colorspec->value; /* limit negative and >1 values to [0:1] first */ if (gray < 0) gray = 0; if (gray > 1) gray = 1; /* TODO: if ConTeXt start supporting palettes, we'll uncomment the following: */ fprintf(gpoutfile, "%%gp_set_color(frac(%.4f));\n", gray); /* but now it doesn't, so let's use the fallback instead: */ rgb1maxcolors_from_gray(gray, &rgb1); fprintf(gpoutfile, "gp_set_color(rgb(%3.2f,%3.2f,%3.2f));\n", rgb1.r, rgb1.g, rgb1.b); CONTEXT_color_changed = TRUE; break; default: int_warn(NO_CARET,"context.trm set_color unknown colorspec->type %i", colorspec->type); break; } } /* ************************ * CONTEXT_filled_polygon * * ************************ * * Draws a polygon with the fill color set by set_color, and no border. */ TERM_PUBLIC void CONTEXT_filled_polygon(int points, gpiPoint *corners) { int i; /* nothing to be filled if less than 3 points */ if (points < 3) return; /* close and draw the current path first */ if (CONTEXT_path_count > 0) CONTEXT_endpath(); /* if the first point equals the last one, skip the last point; --cycle does that already * this condition is probably always true in gnuplot, so the if condition may not be needed */ if ((corners[0].x == corners[points-1].x) && (corners[0].y == corners[points-1].y)) points--; /* create new path with corners */ fputs("p := ", gpoutfile); fprintf(gpoutfile, "(%.3fa,%.3fa)", 0.001*corners[0].x, 0.001*corners[0].y); for (i = 1; i < points; i++) { if (i % CONTEXT_LINEMAX == 0) fputs("\n ", gpoutfile); fprintf(gpoutfile, "--(%.3fa,%.3fa)", 0.001*corners[i].x, 0.001*corners[i].y); } /* and fill it */ fprintf(gpoutfile, "--cycle;\n"); /* fill the polygon * undocumented gnuplot behaviour, copied from PostScript terminal * see comments for CONTEXT_fill for details */ CONTEXT_fill(corners->style); } /* *************** * CONTEXT_image * * *************** * Plot a pixel-based image on the display device. 'M' is the number of pixels along the y-dimension of the image and 'N' is the number of pixels along the x-dimension of the image. The coordval pointer 'image' is the pixel values normalized to the range [0:1]. These values should be scaled appropriately for the output device. The 'image' data starts in the upper left corner and scans along rows finishing in the lower right corner. If 'color_mode' is IC_PALETTE, the terminal is to use palette lookup to generate color information. In this scenario the size of 'image' is M*N. If 'color_mode' is IC_RGB, successive bytes of the data structure are interpreted as RGB components of a single pixel. In this scenario the size of 'image' is 3*M*N. The data appears in RGB triples, i.e., image[0] = R(1,1), image[1] = G(1,1), image[2] = B(1,1), image[3] = R(1,2), image[4] = G(1,2), ..., image[3*M*N-1] = B(M,N). The mode IC_RGBA is similar except that four values red, green, blue, alpha per pixel are passed to the terminal in the image structure. The 'image' is actually an "input" image in the sense that it must also be properly resampled for the output device. Many output media, e.g., PostScript, do this work via various driver functions. To determine the appropriate rescaling, the 'corner' information should be used. There are four entries in the gpiPoint data array. 'corner[0]' is the upper left corner (in terms of plot location) of the outer edge of the image. Similarly, 'corner[1]' is the lower right corner of the outer edge of the image. (Outer edge means the outer extent of the corner pixels, not the middle of the corner pixels.) 'corner[2]' is the upper left corner of the visible part of the image, and 'corner[3]' is the lower right corner of the visible part of the image. The information is provided in this way because often it is necessary to clip a portion of the outer pixels of the image. */ /* TODO: this code needs some improvements * * There are two different modes: * * 1. creating PNG image and including it * - it only works if gnuplot has been compiled with cairo or gdlib libraries * - there are some bugs in MKII/MKIV handling: a different syntax is required * and can only be fixed in ConTeXt core; I could abstract the code a bit * 2. printing out a string with colors * - MKIV: works, but transparency is not yet implemented * - MKII: requires MetaPost > 0.750 and is not implemented at all * two possible approaches: drawing rectangles & creating proper image * it might require one additional level of abstraction like gp_image(...) */ TERM_PUBLIC void CONTEXT_image(unsigned M, unsigned N, coordval *image, gpiPoint *corner, t_imagecolor color_mode) { int i, k, line_length, components_per_color; rgb_color color; TBOOLEAN is_clipped = FALSE; if ((corner[2].x > corner[0].x) || (corner[0].y > corner[2].y) || (corner[1].x > corner[3].x) || (corner[3].y > corner[1].y)) is_clipped = TRUE; if (CONTEXT_images == CONTEXT_IMAGES_EXTERNAL) { #ifdef WRITE_PNG_IMAGE /* we reserved 10 extra bytes, so we can afford images up to 9999 */ snprintf(CONTEXT_image_filename + CONTEXT_image_filename_length, 9, "_%02d.png", ++CONTEXT_image_counter); write_png_image (M, N, image, color_mode, CONTEXT_image_filename); if (is_clipped) fprintf(gpoutfile, "draw image(\n "); fprintf(gpoutfile, "externalfigure \"%s\" xyscaled (%.3fa,%.3fa) shifted (%.3fa,%.3fa);\n", CONTEXT_image_filename + CONTEXT_image_filename_start, 0.001*(corner[1].x-corner[0].x), 0.001*(corner[0].y-corner[1].y), 0.001*corner[0].x, 0.001*corner[1].y); if (is_clipped) { fprintf(gpoutfile, " clip currentpicture to unitsquare xyscaled (%.3fa,%.3fa) shifted (%.3fa,%.3fa););\n", 0.001*(corner[3].x-corner[2].x), 0.001*(corner[2].y-corner[3].y), 0.001*corner[2].x, 0.001*corner[3].y); } #endif } else { /* Palette colors have to be converted into RGB first */ if (color_mode == IC_PALETTE) { /* write the image data */ fprintf(gpoutfile, "img := \"%%\n"); line_length = 0; for (i = 0; i < M * N; i++) { if (line_length++ >= 16) { line_length = 1; fprintf(gpoutfile, "%%\n"); } rgb1maxcolors_from_gray(image[i], &color); fprintf(gpoutfile, "%02x%02x%02x", (unsigned char)(255*color.r), (unsigned char)(255*color.g), (unsigned char)(255*color.b)); } fprintf(gpoutfile, "\";\n"); /* IC_RGB or IC_RGBA */ } else { if (color_mode == IC_RGBA) { components_per_color = 4; } else { /* IC_RGB */ components_per_color = 3; } /* write the image data */ fprintf(gpoutfile, "img := \"%%\n"); line_length = 0; for (i = 0; i < M * N; i++) { if (line_length++ >= 16) { line_length = 1; fprintf(gpoutfile, "%%\n"); } for (k = 0; k < 3; k++) { fprintf(gpoutfile, "%02x", (unsigned char)(image[i*components_per_color+k]*255)); } } fprintf(gpoutfile, "\";\n"); /* transparency mask */ if (color_mode == IC_RGBA) { fprintf(gpoutfile, "ima := \"%%\n"); line_length = 0; for (i = 0; i < M * N; i++) { if (line_length++ >= 3*16) { line_length = 1; fprintf(gpoutfile, "%%\n"); }; fprintf(gpoutfile, "%02x", (unsigned char)(image[i*components_per_color+3]*255)); } fprintf(gpoutfile, "\";\n"); } } /* TODO: transparency handling is not yet supported in ConTeXt */ if (is_clipped) fprintf(gpoutfile, "draw image(\n "); fprintf(gpoutfile, "draw bitmapimage (%u,%u,img) xyscaled (%.3fa,%.3fa) shifted (%.3fa,%.3fa);\n", N, M, 0.001*(corner[1].x-corner[0].x), 0.001*(corner[0].y-corner[1].y), 0.001*corner[0].x, 0.001*corner[1].y); if (is_clipped) { fprintf(gpoutfile, " clip currentpicture to unitsquare xyscaled (%.3fa,%.3fa) shifted (%.3fa,%.3fa););\n", 0.001*(corner[3].x-corner[2].x), 0.001*(corner[2].y-corner[3].y), 0.001*corner[2].x, 0.001*corner[3].y); } /* (alternative implementation) * fprintf(gpoutfile, "gp_image_rgb"); if (color_mode == IC_RGB) fprintf(gpoutfile, "_alpha"); fprintf(gpoutfile, "((%u,%u),(%.3fa,%.3fa),(%.3fa,%.3fa));\n", N, M, 0.001*corner[0].x, 0.001*corner[1].y, 0.001*corner[1].x, 0.001*corner[0].y); */ } } /* * TODO: Implement this function for smooth shading * * you need to fix draw_color_smooth_box(MODE_SPLOT) in graph3d.c -> color.c * static void CONTEXT_draw_inside_color_smooth_box() { } */ #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(context_driver) "context", "ConTeXt with MetaFun (for PDF documents)", CONTEXT_XMAX, CONTEXT_YMAX, CONTEXT_VCHAR, CONTEXT_HCHAR, CONTEXT_VTIC, CONTEXT_HTIC, CONTEXT_options, CONTEXT_init, CONTEXT_reset, CONTEXT_text, null_scale, CONTEXT_graphics, CONTEXT_move, CONTEXT_vector, CONTEXT_linetype, CONTEXT_put_text, CONTEXT_text_angle, CONTEXT_justify_text, CONTEXT_point, CONTEXT_arrow, CONTEXT_set_font, CONTEXT_pointsize, /* also add TERM_CAN_CLIP once you understand what it does */ TERM_CAN_DASH | TERM_ALPHA_CHANNEL | TERM_LINEWIDTH | TERM_FONTSCALE | TERM_IS_LATEX /* flags */, 0 /* suspend */, 0 /* resume*/, CONTEXT_fillbox, CONTEXT_linewidth #ifdef USE_MOUSE , 0, 0, 0, 0, 0 /* no mouse support */ #endif /* USE_MOUSE */ , CONTEXT_make_palette, 0, /* XXX: CONTEXT_previous_palette: not sure if we need it at all (PS does "grestore") */ CONTEXT_set_color, CONTEXT_filled_polygon, CONTEXT_image, 0, 0, 0, /* No enhanced text mode because this is TeX */ 0, /* layer (used to signal front/back text, used in canvas, PS, epslatex, ...); XXX: figure out what this has to do */ 0 /* path (Path control for end-joins of closed polygons on PostScript-like devices); TODO: implement it (CONTEXT_path) */ TERM_TABLE_END(context_driver) #undef LAST_TERM #define LAST_TERM context_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(context) "1 context", "?commands set terminal context", "?set terminal context", "?terminal context", "?set term context", "?term context", "?context", " ConTeXt is a macro package for TeX, highly integrated with Metapost", " (for drawing figures) and intended for creation of high-quality PDF documents.", " The terminal outputs Metafun source, which can be edited manually,", " but you should be able to configure most things from outside.", "", " For an average user of ConTeXt + gnuplot module it's recommended to refer to", " `Using ConTeXt` rather than reading this page", " or to read the manual of the gnuplot module for ConTeXt.", "", " The `context` terminal supports the following options:", "", " Syntax:", " set term context {default}", " {defaultsize | size <scale> | size <xsize>{in|cm}, <ysize>{in|cm}}", " {input | standalone}", " {timestamp | notimestamp}", " {noheader | header \"<header>\"}", " {color | colour | monochrome}", " {rounded | mitered | beveled} {round | butt | squared}", " {dashed | solid} {dashlength | dl <dl>}", " {linewidth | lw <lw>}", " {fontscale <fontscale>}", " {mppoints | texpoints}", " {inlineimages | externalimages}", " {defaultfont | font \"{<fontname>}{,<fontsize>}\"}", "", " In non-standalone (`input`) graphic only parameters `size` to select graphic", " size, `fontscale` to scale all the labels for a factor <fontscale>", " and font size, make sense, the rest is silently", " ignored and should be configured in the .tex file which inputs the graphic.", " It's highly recommended to set the proper fontsize if document font differs from", " 12pt, so that gnuplot will know how much space to reserve for labels.", "", " `default` resets all the options to their default values.", "", " `defaultsize` sets the plot size to 5in,3in.", " `size` <scale> sets the plot size to <scale> times <default value>.", " If two arguments are given (separated with ','), the first one sets", " the horizontal size and the second one the vertical size.", " Size may be given without units (in which case it means relative to the default", " value), with inches ('in') or centimeters ('cm').", "", " `input` (default) creates a graphic that can be included into another ConTeXt", " document.", " `standalone` adds some lines, so that the document might be compiled as-is.", " You might also want to add `header` in that case.", "", " Use `header` for any additional settings/definitions/macros", " that you might want to include in a standalone graphic. `noheader` is the default.", "", " `notimestamp` prevents printing creation time in comments", " (if version control is used, one may prefer not to commit new version when only date changes).", "", " `color` to make color plots is the default, but `monochrome` doesn't do anything special yet.", " If you have any good ideas how the behaviour should differ to suit the monochrome printers better,", " your suggestions are welcome.", "", " `rounded` (default), `mitered` and `beveled` control the shape of line joins.", " `round` (default), `butt` and `squared` control the shape of line caps.", " See PostScript or PDF Reference Manual for explanation. For wild-behaving functions", " and thick lines", " it is better to use `rounded` and `round` to prevent sharp corners in line joins.", " (Some general support for this should be added to Gnuplot, so that the same options", " could be set for each line (style) separately).", "", " `dashed` (default) uses different dash patterns for different line types,", " `solid` draws all plots with solid lines.", "", " `dashlength` or `dl` scales the length of the dashed-line segments by <dl>.", " `linewidth` or `lw` scales all linewidths by <lw>.", " (lw 1 stands for 0.5bp, which is the default line width when drawing with Metapost.)", " `fontscale` scales text labels for factor <fontscale> relative to default document font.", "", " `mppoints` uses predefined point shapes, drawn in Metapost.", " `texpoints` uses easily configurable set of symbols, defined with ConTeXt", " in the following way:", " \\defineconversion[my own points][+,{\\ss x},\\mathematics{\\circ}]", " \\setupGNUPLOTterminal[context][points=tex,pointset=my own points]", "", " `inlineimages` writes binary images to a string and only works in ConTeXt MKIV.", " `externalimages` writes PNG files to disk and also works with ConTeXt MKII.", " Gnuplot needs to have support for PNG images built in for this to work.", "", " With `font` you can set font name and size in standalone graphics.", " In non-standalone (`input`) mode only the font size is important", " to reserve enough space for text labels.", " The command", " set term context font \"myfont,ss,10\"", " will result in", " \\setupbodyfont[myfont,ss,10pt]", " If you additionaly set `fontscale` to 0.8 for example,", " then the resulting font will be 8pt big and", " set label ... font \"myfont,12\"", " will come out as 9.6pt.", "", " It is your own responsibility to provide proper typescripts (and header),", " otherwise switching the font will have no effect.", " For a standard font in ConTeXt MKII (pdfTeX) you could use:", " set terminal context standalone header '\\usetypescript[iwona][ec]' \\", " font \"iwona,ss,11\"", " Please take a look into ConTeXt documentation, wiki or mailing list (archives)", " for any up-to-date information about font usage.", "", " Examples:", " set terminal context size 10cm, 5cm # 10cm, 5cm", " set terminal context size 4in, 3in # 4in, 3in", " For standalone (whole-page) plots with labels in UTF-8 encoding:", " set terminal context standalone header '\\enableregime[utf-8]'", "", /* TODO: LaTeX formatting */ "2 Requirements", " You need gnuplot module for ConTeXt", "^ <a href=\"http://ctan.org/pkg/context-gnuplot\">", " http://ctan.org/pkg/context-gnuplot", "^ </a>", " and a recent version of ConTeXt.", " If you want to call gnuplot on-the-fly, you also need write18 enabled.", " In most TeX distributions this can be set with shell_escape=t in texmf.cnf.", "", " See", "^ <a href=\"http://wiki.contextgarden.net/Gnuplot\">", " http://wiki.contextgarden.net/Gnuplot", "^ </a>", " for details about this terminal and for more exhaustive help & examples.", "", "2 Calling gnuplot from ConTeXt", " The easiest way to make plots in ConTeXt documents is", " \\usemodule[gnuplot]", " \\starttext", " \\title{How to draw nice plots with {\\sc gnuplot}?}", " \\startGNUPLOTscript[sin]", " set format y \"%.1f\"", " plot sin(x) t '$\\sin(x)$'", " \\stopGNUPLOTscript", " \\useGNUPLOTgraphic[sin]", " \\stoptext", " This will run gnuplot automatically and include the resulting figure in the document." END_HELP(context) #endif /* TERM_HELP */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/epson.trm������������������������������������������������������������������������0000644�0004711�0000144�00000075246�11661627561�013001� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: epson.trm,v 1.26 2011/11/19 04:24:17 sfeam Exp $ * */ /* GNUPLOT - epson.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * epson_lx800, nec_cp6, starc, * epson_60dpi, tandy_60dpi * epson_180dpi * dpu414 * * AUTHORS * Russell Lang * William Wilson * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * adapted to the new terminal layout by Stefan Bodewig (1995) */ #include "driver.h" #ifdef TERM_REGISTER #ifdef EPS180 register_term(epson_180dpi) #endif /* EPS180 */ #ifdef EPS60 register_term(epson_60dpi) #endif /* EPS60 */ #ifdef EPSONP register_term(epson_lx800) #endif /* EPSONP */ #ifdef NEC register_term(nec_cp6) #endif /* NEC */ #ifdef OKIDATA register_term(okidata) #endif /* OKIDATA */ #ifdef STARC register_term(starc) #endif /* STARC */ #ifdef TANDY60 register_term(tandy_60dpi) #endif /* TANDY60 */ #ifdef DPU414 register_term(dpu414) #endif /* DPU414 */ #endif /* TERM_REGISTER */ #ifdef TERM_PROTO TERM_PUBLIC void EPSON_reset __PROTO((void)); #if defined(EPS180) || defined(EPS60) || defined(EPSONP) || defined(TANDY60) || defined(OKIDATA) TERM_PUBLIC void EPSON_init __PROTO((void)); #if defined(EPS60) || defined(EPSONP) || defined(TANDY60) || defined(OKIDATA) #define EPSONVCHAR FNT5X9_VCHAR #define EPSONHCHAR FNT5X9_HCHAR #define EPSONVTIC 6 #define EPSONHTIC 6 #ifdef EPSONP #define EPSONXMAX 512 #define EPSONYMAX 384 TERM_PUBLIC void EPSON_graphics __PROTO((void)); TERM_PUBLIC void EPSON_text __PROTO((void)); #endif /* EPSONP */ #endif /* four drivers */ #endif /* all five */ #ifdef EPS180 TERM_PUBLIC void EPS180_graphics __PROTO((void)); TERM_PUBLIC void EPS180_text __PROTO((void)); #define EPSON180VCHAR FNT13X25_VCHAR #define EPSON180HCHAR FNT13X25_HCHAR #define EPSON180VTIC 18 #define EPSON180HTIC 18 /* make the total dimensions 8 inches by 6 inches */ #define EPS180XMAX 1260 #define EPS180YMAX 1080 #endif /* EPS180 */ #if defined(EPS60) || defined(TANDY60) || defined(OKIDATA) /* make the total dimensions 8 inches by 5 inches */ #define EPS60XMAX 480 #define EPS60YMAX 360 TERM_PUBLIC void EPS60_graphics __PROTO((void)); #ifdef TANDY60 TERM_PUBLIC void TANDY60_text __PROTO((void)); #endif /* TANDY60 */ #ifdef OKIDATA TERM_PUBLIC void OKIDATA_text __PROTO((void)); #endif /* OKIDATA */ #ifdef EPS60 TERM_PUBLIC void EPS60_text __PROTO((void)); #endif /* EPS60 */ #endif /* all three */ #ifdef NEC TERM_PUBLIC void NEC_options __PROTO((void)); TERM_PUBLIC void NEC_init __PROTO((void)); TERM_PUBLIC void NEC_graphics __PROTO((void)); TERM_PUBLIC void NEC_text __PROTO((void)); TERM_PUBLIC void NEC_linetype __PROTO((int linetype)); #define NECXMAX 400 #define NECYMAX 320 #define NECVCHAR FNT5X9_VCHAR #define NECHCHAR FNT5X9_HCHAR #define NECVTIC 6 #define NECHTIC 6 #endif /* NEC */ #ifdef STARC TERM_PUBLIC void STARC_init __PROTO((void)); TERM_PUBLIC void STARC_graphics __PROTO((void)); TERM_PUBLIC void STARC_text __PROTO((void)); TERM_PUBLIC void STARC_linetype __PROTO((int linetype)); #define STARCXMAX 512 #define STARCYMAX 384 #define STARCVCHAR FNT5X9_VCHAR #define STARCHCHAR FNT5X9_HCHAR #define STARCVTIC 6 #define STARCHTIC 6 #endif /* STARC */ #ifdef DPU414 TERM_PUBLIC void DPU414_options __PROTO((void)); TERM_PUBLIC void DPU414_init __PROTO((void)); TERM_PUBLIC void DPU414_graphics __PROTO((void)); TERM_PUBLIC void DPU414_text __PROTO((void)); TERM_PUBLIC void DPU414_setfont __PROTO((void)); #define DPU414XMAX (640) #define DPU414YMAX (480) #define DPU414VCHAR FNT5X9_VCHAR #define DPU414HCHAR FNT5X9_HCHAR #define DPU414VTIC FNT5X9_HBITS #define DPU414HTIC FNT5X9_HBITS #endif /* DPU414 */ #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY TERM_PUBLIC void EPSON_reset() { #ifdef VMS fflush_binary(); #endif } #ifdef EPSONP /* The following epson lx800 driver uses generic bit mapped graphics routines to build up a bit map in memory. */ /* by Russell Lang, rjl@monu1.cc.monash.edu.au */ /* On PC, print using 'copy file /b lpt1:', do NOT use 'print' */ /* EPSON_init changes gpoutfile to binary mode on PC's */ static void epson_dump __PROTO((void)); #define EPSONXLAST (EPSONXMAX - 1) #define EPSONYLAST (EPSONYMAX - 1) TERM_PUBLIC void EPSON_init() { } TERM_PUBLIC void EPSON_graphics() { b_charsize(FNT5X9); b_makebitmap((unsigned int) (EPSONXMAX * xsize), (unsigned int) (EPSONYMAX * ysize), 1); } TERM_PUBLIC void EPSON_text() { epson_dump(); b_freebitmap(); } /* output file must be binary mode for epson_dump */ static void epson_dump() { register unsigned int x; int j; for (j = (b_ysize / 8) - 1; j >= 0; j--) { /* select plotter graphics mode (square pixels) */ fputs("\033J\030", gpoutfile); /* line feed 8/72" = 8 dots */ fputs("\r\033*\005", gpoutfile); (void) fputc((char) (b_xsize % 256), gpoutfile); (void) fputc((char) (b_xsize / 256), gpoutfile); for (x = 0; x < b_xsize; x++) { (void) fputc((char) (*((*b_p)[j] + x)), gpoutfile); } } #ifdef PC fputs("Print using: COPY /B\n", stderr); #endif } #endif /* EPSONP */ /* The following NEC CP6 Pinwriter driver uses generic bit mapped graphics routines to build up a bit map in memory. */ /* by Russell Lang, rjl@monu1.cc.monash.edu.au */ /* On PC, print using 'copy file /b lpt1:', do NOT use 'print' */ /* NEC_init changes gpoutfile to binary mode for PC's */ /* Add a Monochrome NEC printer (for faster speed and line types) jdc */ #ifdef NEC static void nec_dump __PROTO((void)); static void nec_draft_dump __PROTO((void)); #define NECXLAST (NECXMAX - 1) #define NECYLAST (NECYMAX - 1) /* plane 0=black, 1=cyan(blue), 2=magenta(red), 3=yellow */ static unsigned int neccolor[] = { 1, 8, 4, 2, 10, 12, 6, 14 }; static unsigned int necpcolor[] = { 0, 2, 1, 4 }; static int NECmode; enum NEC_id { NEC_MONOCHROME, NEC_COLOR, NEC_DRAFT, NEC_OTHER }; static struct gen_table NEC_opts[] = { { "m$onochrome", NEC_MONOCHROME }, { "c$olor", NEC_COLOR }, { "c$olour", NEC_COLOR }, { "d$raft", NEC_DRAFT }, { NULL, NEC_OTHER } }; TERM_PUBLIC void NEC_options() { /* default */ if (END_OF_COMMAND) { strcpy(term_options, "monochrome"); NECmode = 'm'; } while (!END_OF_COMMAND) { switch(lookup_table(&NEC_opts[0],c_token)) { case NEC_MONOCHROME: c_token++; strcpy(term_options, "monochrome"); NECmode = 'm'; break; case NEC_COLOR: c_token++; strcpy(term_options, "color"); NECmode = 'c'; break; case NEC_DRAFT: c_token++; strcpy(term_options, "draft"); NECmode = 'd'; break; case NEC_OTHER: default: /* FIXME - not the most sensible thing to do */ /* error, but since the terminal is already set, default to mono */ strcpy(term_options, "monochrome"); NECmode = 'm'; int_error(c_token, "modes: color, monochrome, draft"); break; } } } TERM_PUBLIC void NEC_init() { } TERM_PUBLIC void NEC_graphics() { b_charsize(FNT5X9); b_makebitmap((unsigned int) (NECXMAX * xsize), (unsigned int) (NECYMAX * ysize), (NECmode == 'c' ? 4 : 1)); } TERM_PUBLIC void NEC_text() { if (NECmode == 'd') { nec_draft_dump(); } else { nec_dump(); } b_freebitmap(); } TERM_PUBLIC void NEC_linetype(int linetype) { if (NECmode == 'c') { if (linetype >= 6) linetype %= 6; b_setvalue(neccolor[linetype + 2]); } else { b_setlinetype(linetype); } } /* output file must be binary mode for nec_dump */ static void nec_dump() { unsigned int x; unsigned int plane, offset; int j; unsigned int column8; unsigned long column24; char column3, column2, column1; fputs("\033P\033l\005", gpoutfile); /* 10cpi, left margin 5 char */ for (j = (b_ysize / 8) - 1; j >= 0; j--) { fputs("\033J\030", gpoutfile); /* 24/180" line feed */ for (plane = 0; plane < b_planes; plane++) { offset = plane * b_psize; if (b_planes > 1) { /* select colour for plane */ fputs("\033r", gpoutfile); (void) fputc((char) necpcolor[plane], gpoutfile); } /* select plotter graphics mode (square pixels) */ fputs("\r\033*\047", gpoutfile); (void) fputc((char) ((b_xsize * 3) % 256), gpoutfile); (void) fputc((char) ((b_xsize * 3) / 256), gpoutfile); for (x = 0; x < b_xsize; x++) { column8 = (unsigned int) (*((*b_p)[j + offset] + x)); column24 = 0; if (column8 & 0x01) column24 |= (long) 0x000007; if (column8 & 0x02) column24 |= (long) 0x000038; if (column8 & 0x04) column24 |= (long) 0x0001c0; if (column8 & 0x08) column24 |= (long) 0x000e00; if (column8 & 0x10) column24 |= (long) 0x007000; if (column8 & 0x20) column24 |= (long) 0x038000; if (column8 & 0x40) column24 |= (long) 0x1c0000; if (column8 & 0x80) column24 |= (long) 0xe00000; column1 = (char) (column24 & (long) 0xff); column2 = (char) ((column24 >> 8) & (long) 0xff); column3 = (char) ((column24 >> 16) & (long) 0xff); (void) fputc(column3, gpoutfile); (void) fputc(column2, gpoutfile); (void) fputc(column1, gpoutfile); (void) fputc(column3, gpoutfile); (void) fputc(column2, gpoutfile); (void) fputc(column1, gpoutfile); (void) fputc(column3, gpoutfile); (void) fputc(column2, gpoutfile); (void) fputc(column1, gpoutfile); } } } fputs("\r\033l", gpoutfile); (void) fputc('\0', gpoutfile); /* set left margin to 0 */ if (b_planes > 1) { fprintf(gpoutfile, "\033r"); (void) fputc('\0', gpoutfile); /* set color to black */ } #ifdef PC fputs("Print using: COPY /B\n", stderr); #endif #ifdef VMS fflush_binary(); #endif } /* output file must be binary mode for nec_dump */ static void nec_draft_dump() { unsigned int x; unsigned int plane, offset; int j; fputs("\033P\033l\005\r", gpoutfile); /* 10cpi, left margin 5 char */ for (j = (b_ysize / 8) - 1; j >= 0; j--) { fputs("\033J\030", gpoutfile); /* 24/180" line feed */ for (plane = 0; plane < b_planes; plane++) { offset = plane * b_psize; if (b_planes > 1) { /* select colour for plane */ fputs("\033r", gpoutfile); (void) fputc((char) necpcolor[plane], gpoutfile); } /* select plotter graphics mode (square pixels) */ fputs("\r\033*", gpoutfile); (void) fputc('\0', gpoutfile); (void) fputc((char) (b_xsize % 256), gpoutfile); (void) fputc((char) (b_xsize / 256), gpoutfile); for (x = 0; x < b_xsize; x++) { (void) fputc((char) (*((*b_p)[j + offset] + x)), gpoutfile); } } } fputs("\r\033l", gpoutfile); (void) fputc('\0', gpoutfile); /* set left margin to 0 */ if (b_planes > 1) { fputs("\033r", gpoutfile); (void) fputc('\0', gpoutfile); /* set color to black */ } #ifdef PC fputs("Print using: COPY /B\n", gpoutfile); #endif } #endif /* NEC */ #ifdef STARC /* The following Star color driver uses generic bit mapped graphics routines to build up a bit map in memory. */ /* Star Color changes made by William Wilson, wew@naucse.cse.nau.edu */ /* On PC, print using 'copy file /b lpt1:', do NOT use 'print' */ /* STARC_init changes gpoutfile to binary mode on PC's */ static void STARC_dump __PROTO((void)); #define STARCXLAST (STARCXMAX - 1) #define STARCYLAST (STARCYMAX - 1) /* plane 0=black, 1=cyan(blue), 2=magenta(red), 3=yellow */ static unsigned int STARCcolor[] = { 1, 8, 4, 2, 10, 12, 6, 14 }; static unsigned int STARCpcolor[] = { 0, 2, 1, 4 }; TERM_PUBLIC void STARC_init() { } TERM_PUBLIC void STARC_graphics() { b_charsize(FNT5X9); b_makebitmap((unsigned int) (STARCXMAX * xsize), (unsigned int) (STARCYMAX * ysize), 4); } TERM_PUBLIC void STARC_text() { STARC_dump(); b_freebitmap(); } TERM_PUBLIC void STARC_linetype(int linetype) { if (linetype >= 6) linetype %= 6; b_setvalue(STARCcolor[linetype + 2]); } /* output file must be binary mode for STARC_dump */ static void STARC_dump() { unsigned int x; unsigned int plane, offset; int j; for (j = (b_ysize / 8) - 1; j >= 0; j--) { fputs("\033J\030", gpoutfile); /* line feed 8/72" = 8 dots */ for (plane = 0; plane < b_planes; plane++) { offset = plane * b_psize; if (b_planes > 1) { /* select colour for plane */ fputs("\033r", gpoutfile); (void) fputc((char) STARCpcolor[plane], gpoutfile); } /* select plotter graphics mode (square pixels) */ fputs("\r\033*\005", gpoutfile); (void) fputc((char) (b_xsize % 256), gpoutfile); (void) fputc((char) (b_xsize / 256), gpoutfile); for (x = 0; x < b_xsize; x++) { (void) fputc((char) (*((*b_p)[j + offset] + x)), gpoutfile); } } } if (b_planes > 1) { fputs("\033r", gpoutfile); (void) fputc('\0', gpoutfile); /* set color to black */ } #ifdef PC fputs("Print using: COPY /B\n", stderr); #endif } #endif /* STARC */ #ifdef EPS180 static void eps180_dump __PROTO((void)); #define EPS180XLAST (EPS180XMAX - 1) #define EPS180YLAST (EPS180YMAX - 1) TERM_PUBLIC void EPS180_graphics() { b_charsize(FNT13X25); b_makebitmap((unsigned int) (EPS180XMAX * xsize), (unsigned int) (EPS180YMAX * ysize), 1); } TERM_PUBLIC void EPS180_text() { eps180_dump(); b_freebitmap(); } /* output file must be binary mode for eps180_dump */ static void eps180_dump() { register unsigned int x; int j; /* reset, set line spacing to 24/180", and move left margin */ fputs("\033@\033+\060\033l\005", gpoutfile); for (j = (b_ysize / 8) - 1; j >= 0;) { /* select printer graphics mode '39' */ fputs("\r\n\033*'", gpoutfile); (void) fputc((char) (b_xsize % 256), gpoutfile); (void) fputc((char) (b_xsize / 256), gpoutfile); for (x = 0; x < b_xsize; x++) { (void) fputc((char) (*((*b_p)[j] + x)), gpoutfile); (void) fputc((char) (*((*b_p)[j - 1] + x)), gpoutfile); (void) fputc((char) (*((*b_p)[j - 2] + x)), gpoutfile); } j -= 3; } fputs("\r\n\033@\r\n", gpoutfile); /* reset printer */ #ifdef PC fputs("Print using: COPY /B\n", stderr); #endif } #endif /* EPS180 */ #ifdef EPS60 static void eps60_dump __PROTO((void)); #define EPS60XLAST (EPS60XMAX - 1) #define EPS60YLAST (EPS60YMAX - 1) TERM_PUBLIC void EPS60_graphics() { b_charsize(FNT5X9); b_makebitmap((unsigned int) (EPS60XMAX * xsize), (unsigned int) (EPS60YMAX * ysize), 1); } TERM_PUBLIC void EPS60_text() { eps60_dump(); b_freebitmap(); } /* output file must be binary mode for eps60_dump */ static void eps60_dump() { register unsigned int x; int j; fprintf(gpoutfile, "\033%c\030", '3'); /* set line spacing 24/216" = 8 dots */ for (j = (b_ysize / 8) - 1; j >= 0; j--) { /* select printer graphics mode 'K' */ fputs("\r\n\033K", gpoutfile); (void) fputc((char) (b_xsize % 256), gpoutfile); (void) fputc((char) (b_xsize / 256), gpoutfile); for (x = 0; x < b_xsize; x++) { (void) fputc((char) (*((*b_p)[j] + x)), gpoutfile); } } fprintf(gpoutfile, "\033%c\044\r\n", '3'); /* set line spacing 36/216" = 1/6" */ #ifdef PC fputs("Print using: COPY /B\n", stderr); #endif } #endif /* EPS60 */ #ifdef TANDY60 /* The only difference between TANDY60 and EPS60 is the inclusion of codes to swap the Tandy printer into IBM mode and back into Tandy mode. For a Tandy already in IBM mode, use EPS60. */ TERM_PUBLIC void TANDY60_text() { #ifdef PC fputs("Inserting Tandy/IBM mode conversion codes\n", stderr); #endif /* Switch to IBM mode, and leave 3 inches above the plot so as to get rough vertical centring on the page. Perform the centring by setting 1" line feeds and issuing 3 of them. */ fprintf(gpoutfile, "\033!\033%c%c\n\n\n", '3', 216); eps60_dump(); b_freebitmap(); /* A form feed must be sent before switching back to Tandy mode, or else the form setting will be messed up. */ fputs("\f\033!", gpoutfile); } #endif /* TANDY60 */ #ifdef OKIDATA static void okidata_dump __PROTO((void)); TERM_PUBLIC void OKIDATA_text() { okidata_dump(); b_freebitmap(); } static int OKIDATAbitrev_tbl[] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff }; /* output file must be binary mode for okidata_dump */ static void okidata_dump() { register unsigned int x; int j; char cur_char; int prev_char; prev_char = 0; /* set line spacing 16/144" = 8 dots, turn on single density * graphics mode: */ fprintf(gpoutfile, "\033%c%c\020\033*eP:\003", '%', '9'); for (j = (b_ysize / 8) - 1; j >= 0; j--) { fputs("\003\016", gpoutfile); /* (void) fputc((char)(b_xsize%256),gpoutfile); */ /* (void) fputc((char)(b_xsize/256),gpoutfile); */ for (x = 0; x < b_xsize; x++) { if ((cur_char = (char) (OKIDATAbitrev_tbl[(int) (*((*b_p)[j] + x))])) == '\003') { fputs("\003\003", gpoutfile); } else { (void) fputc((char) cur_char, gpoutfile); } } } fprintf(gpoutfile, "\003\002\033%c%c\030\r\n", '%', '9'); /* Turned off graphics mode: set line spacing 24/144" = 1/6" */ #ifdef PC fputs("Print using: COPY /B\n", stderr); #endif } #endif /* OKIDATA */ #ifdef DPU414 static void DPU414_dump __PROTO((void)); static int DPU414_font = 2; /* medium font */ static int DPU414_quality = 1; /* normal */ enum DPU414_id { DPU414_SMALL, DPU414_MEDIUM, DPU414_LARGE, DPU414_NORMAL, DPU414_DRAFT, DPU414_OTHER }; static struct gen_table DPU414_opts[] = { { "s$mall", DPU414_SMALL }, { "m$edium", DPU414_MEDIUM }, { "l$arge", DPU414_LARGE }, { "n$ormal", DPU414_NORMAL }, { "d$raft", DPU414_DRAFT }, { NULL, DPU414_OTHER } }; TERM_PUBLIC void DPU414_options() { DPU414_font = 2; DPU414_quality = 1; term_options[0] = NUL; while (!END_OF_COMMAND) { switch(lookup_table(&DPU414_opts[0],c_token)) { case DPU414_SMALL: DPU414_font = 1; c_token++; break; case DPU414_MEDIUM: DPU414_font = 2; c_token++; break; case DPU414_LARGE: DPU414_font = 3; c_token++; break; case DPU414_NORMAL: DPU414_quality = 1; c_token++; break; case DPU414_DRAFT: DPU414_quality = 2; c_token++; break; case DPU414_OTHER: default: /* reset to default, since term is already set */ DPU414_font = 2; DPU414_quality = 1; int_error(c_token, "expecting: {small, medium, large} {normal, draft}"); break; } } term->v_tic = (term->xmax < term->ymax) ? term->xmax/100 : term->ymax/100; if (term->v_tic < 1) term->v_tic = 1; term->h_tic = term->v_tic; /* setup options string */ switch (DPU414_font) { case 1: strcat(term_options, "small"); break; case 2: strcat(term_options, "medium"); break; case 3: strcat(term_options, "large"); break; } switch (DPU414_quality) { case 1: strcat(term_options, " normal"); term->xmax = DPU414XMAX; term->ymax = DPU414YMAX; break; case 2: strcat(term_options, " draft"); term->xmax = DPU414XMAX / 2; term->ymax = DPU414YMAX / 2; break; } } TERM_PUBLIC void DPU414_init() { DPU414_setfont(); } TERM_PUBLIC void DPU414_setfont() { switch (DPU414_font) { case 1: b_charsize(FNT5X9); term->v_char = FNT5X9_VCHAR; term->h_char = FNT5X9_HCHAR; break; case 2: b_charsize(FNT9X17); term->v_char = FNT9X17_VCHAR; term->h_char = FNT9X17_HCHAR; break; case 3: b_charsize(FNT13X25); term->v_char = FNT13X25_VCHAR; term->h_char = FNT13X25_HCHAR; break; } } TERM_PUBLIC void DPU414_graphics() { switch (DPU414_quality) { case 1: b_makebitmap((unsigned int) (DPU414XMAX * xsize), (unsigned int) (DPU414YMAX * ysize), 1); break; case 2: term->xmax = DPU414XMAX / 2; term->ymax = DPU414YMAX / 2; b_makebitmap((unsigned int) (DPU414XMAX / 2 * xsize), (unsigned int) (DPU414YMAX / 2 * ysize), 1); break; } } TERM_PUBLIC void DPU414_text() { DPU414_dump(); b_freebitmap(); } static void DPU414_dump() { register unsigned int x; int j; fputs("\r", gpoutfile); /* carriage return */ fprintf(gpoutfile, "\033%c", 'U'); /* unidirectional printing */ (void) fputc((char) 0, gpoutfile); switch (DPU414_quality) { case 1: for (j = (b_ysize / 8) - 1; j >= 0; j-=2) { /* select 120-dpi, emulated 16-pin printer graphics mode */ /* in reality it's 640/(89.6mm/25.4mm) = 181 dpi = appr. 180 dpi */ fputs("\033^\001", gpoutfile); (void) fputc((char) (b_xsize % 256), gpoutfile); (void) fputc((char) (b_xsize / 256), gpoutfile); for (x = 0; x < b_xsize; x++) { (void) fputc((char) (*((*b_p)[j] + x)), gpoutfile); (void) fputc((char) (*((*b_p)[j-1] + x)), gpoutfile); } fprintf(gpoutfile, "\033%c\x10\r", 'J'); /* advance 16 halfdots, carriage return */ } break; case 2: for (j = (b_ysize / 8) - 1; j >= 0; j--) { /* select 60-dpi, 8-pin printer graphics mode */ /* in reality it's 320/(89.6mm/25.4mm) = 91 dpi = appr. 90 dpi */ fputs("\033K", gpoutfile); (void) fputc((char) (b_xsize % 256), gpoutfile); (void) fputc((char) (b_xsize / 256), gpoutfile); for (x = 0; x < b_xsize; x++) { (void) fputc((char) (*((*b_p)[j] + x)), gpoutfile); } fprintf(gpoutfile, "\033%c\x10\r", 'J'); /* advance 16 halfdots, carriage return */ } break; } fputs("\r\n\033@\r\n", gpoutfile); /* reset printer */ #ifdef PC fputs("Print using: COPY /B\n", stderr); #endif } #endif /* DPU414 */ #endif /* TERM_BODY */ #ifdef TERM_TABLE #ifdef EPS180 TERM_TABLE_START(epson180_driver) "epson_180dpi", "Epson LQ-style 180-dot per inch (24 pin) printers", EPS180XMAX, EPS180YMAX, EPSON180VCHAR, EPSON180HCHAR, EPSON180VTIC, EPSON180HTIC, options_null, EPSON_init, EPSON_reset, EPS180_text, null_scale, EPS180_graphics, b_move, b_vector, b_setlinetype, b_put_text, b_text_angle, null_justify_text, do_point, do_arrow, set_font_null, 0, TERM_BINARY, 0, 0, b_boxfill TERM_TABLE_END(epson180_driver) #undef LAST_TERM #define LAST_TERM epson180_driver #endif /* EPS180 */ #ifdef EPS60 TERM_TABLE_START(epson60_driver) "epson_60dpi", "Epson-style 60-dot per inch printers", EPS60XMAX, EPS60YMAX, EPSONVCHAR, EPSONHCHAR, EPSONVTIC, EPSONHTIC, options_null, EPSON_init, EPSON_reset, EPS60_text, null_scale, EPS60_graphics, b_move, b_vector, b_setlinetype, b_put_text, b_text_angle, null_justify_text, do_point, do_arrow, set_font_null, 0, TERM_BINARY, 0, 0, b_boxfill TERM_TABLE_END(epson60_driver) #undef LAST_TERM #define LAST_TERM epson60_driver #endif /* EPS60 */ #ifdef EPSONP TERM_TABLE_START(epsonlx_driver) "epson_lx800", "Epson LX-800, Star NL-10, NX-1000, PROPRINTER ...", EPSONXMAX, EPSONYMAX, EPSONVCHAR, EPSONHCHAR, EPSONVTIC, EPSONHTIC, options_null, EPSON_init, EPSON_reset, EPSON_text, null_scale, EPSON_graphics, b_move, b_vector, b_setlinetype, b_put_text, b_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null, 0, TERM_BINARY, 0, 0, b_boxfill TERM_TABLE_END(epsonlx_driver) #undef LAST_TERM #define LAST_TERM epsonlx_driver #endif /* EPSONP */ #ifdef NEC TERM_TABLE_START(nec_driver) "nec_cp6", "NEC printer CP6, Epson LQ-800 [monochrome color draft]", NECXMAX, NECYMAX, NECVCHAR, NECHCHAR, NECVTIC, NECHTIC, NEC_options, NEC_init, EPSON_reset, NEC_text, null_scale, NEC_graphics, b_move, b_vector, NEC_linetype, b_put_text, b_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null, 0, TERM_BINARY, 0, 0, b_boxfill TERM_TABLE_END(nec_driver) #undef LAST_TERM #define LAST_TERM nec_driver #endif /* NEC */ #ifdef OKIDATA TERM_TABLE_START(okidata_driver) "okidata", "OKIDATA 320/321 Standard", EPS60XMAX, EPS60YMAX, EPSONVCHAR, EPSONHCHAR, EPSONVTIC, EPSONHTIC, options_null, EPSON_init, EPSON_reset, OKIDATA_text, null_scale, EPS60_graphics, b_move, b_vector, b_setlinetype, b_put_text, b_text_angle, null_justify_text, do_point, do_arrow, set_font_null, 0, TERM_BINARY, 0, 0, b_boxfill TERM_TABLE_END(okidata_driver) #undef LAST_TERM #define LAST_TERM okidata_driver #endif /* OKIDATA */ #ifdef STARC TERM_TABLE_START(starc_driver) "starc", "Star Color Printer", STARCXMAX, STARCYMAX, STARCVCHAR, STARCHCHAR, STARCVTIC, STARCHTIC, options_null, STARC_init, EPSON_reset, STARC_text, null_scale, STARC_graphics, b_move, b_vector, STARC_linetype, b_put_text, b_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null, 0, TERM_BINARY, 0, 0, b_boxfill TERM_TABLE_END(starc_driver) #undef LAST_TERM #define LAST_TERM starc_driver #endif /* STARC */ #ifdef TANDY60 TERM_TABLE_START(tandy60_driver) "tandy_60dpi", "Tandy DMP-130 series 60-dot per inch graphics", EPS60XMAX, EPS60YMAX, EPSONVCHAR, EPSONHCHAR, EPSONVTIC, EPSONHTIC, options_null, EPSON_init, EPSON_reset, TANDY60_text, null_scale, EPS60_graphics, b_move, b_vector, b_setlinetype, b_put_text, b_text_angle, null_justify_text, do_point, do_arrow, set_font_null, 0, TERM_BINARY, 0, 0, b_boxfill TERM_TABLE_END(tandy60_driver) #undef LAST_TERM #define LAST_TERM tandy60_driver #endif /* TANDY60 */ #ifdef DPU414 TERM_TABLE_START(dpu414_driver) "dpu414", "Seiko DPU-414 thermal printer [small medium large]", DPU414XMAX, DPU414YMAX, DPU414VCHAR, DPU414HCHAR, DPU414VTIC, DPU414HTIC, DPU414_options, DPU414_init, EPSON_reset, DPU414_text, null_scale, DPU414_graphics, b_move, b_vector, b_setlinetype, b_put_text, b_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null, 0, TERM_BINARY, 0, 0, b_boxfill TERM_TABLE_END(dpu414_driver) #undef LAST_TERM #define LAST_TERM dpu414_driver #endif /* DPU414 */ #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(epson_180dpi) "1 epson_180dpi", "?commands set terminal epson_180dpi", "?set terminal epson_180dpi", "?set term epson_180dpi", "?terminal epson_180dpi", "?term epson_180dpi", "?epson_180dpi", "?commands set terminal epson_60dpi", "?set terminal epson_60dpi", "?set term epson_60dpi", "?terminal epson_60dpi", "?term epson_60dpi", "?epson_60dpi", "?commands set terminal epson_lx800", "?set terminal epson_lx800", "?set term epson_lx800", "?terminal epson_lx800", "?term epson_lx800", "?epson_lx800", "?commands set terminal nec_cp6", "?set terminal nec_cp6", "?set term nec_cp6", "?terminal nec_cp6", "?term nec_cp6", "?nec_cp6", "?commands set terminal okidata", "?set terminal okidata", "?set term okidata", "?terminal okidata", "?term okidata", "?okidata", "?commands set terminal starc", "?set terminal starc", "?set term starc", "?terminal starc", "?term starc", "?starc", "?commands set terminal tandy_60dpi", "?set terminal tandy_60dpi", "?set term tandy_60dpi", "?terminal tandy_60dpi", "?term tandy_60dpi", "?tandy_60dpi", "?commands set terminal dpu414", "?set terminal dpu414", "?set term dpu414", "?terminal dpu414", "?term dpu414", "?dpu414", " This driver supports a family of Epson printers and derivatives.", "", " `epson_180dpi` and `epson_60dpi` are drivers for Epson LQ-style 24-pin", " printers with resolutions of 180 and 60 dots per inch, respectively.", "", " `epson_lx800` is a generic 9-pin driver appropriate for printers like the", " Epson LX-800, the Star NL-10 and NX-1000, the PROPRINTER, and so forth.", "", " `nec_cp6` is generic 24-pin driver that can be used for printers like the", " NEC CP6 and the Epson LQ-800.", "", " The `okidata` driver supports the 9-pin OKIDATA 320/321 Standard printers.", "", " The `starc` driver is for the Star Color Printer.", "", " The `tandy_60dpi` driver is for the Tandy DMP-130 series of 9-pin, 60-dpi", " printers.", "", " The `dpu414` driver is for the Seiko DPU-414 thermal printer.", "", " `nec_cp6` has the options:", "", " Syntax:", " set terminal nec_cp6 {monochrome | colour | draft}", "", " which defaults to monochrome.", "", " `dpu414` has the options:", "", " Syntax:", " set terminal dpu414 {small | medium | large} {normal | draft}", "", " which defaults to medium (=font size) and normal.", " Preferred combinations are `medium normal` and `small draft`.", #ifdef MSDOS "", " With each of these drivers, a binary copy is required on a PC to print.", " Do not use `print`---use instead `copy file /b lpt1:`.", #endif "" END_HELP(epson_180dpi) #endif /* TERM_HELP */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/hp2648.trm�����������������������������������������������������������������������0000644�0004711�0000144�00000011672�10460036603�012564� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: hp2648.trm,v 1.13 2006/07/21 02:35:47 sfeam Exp $ * */ /* GNUPLOT - hp2648.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * HP2648 and HP2647 * * AUTHORS * Russell Lang * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(hp2648) #endif #ifdef TERM_PROTO TERM_PUBLIC void HP2648init __PROTO((void)); TERM_PUBLIC void HP2648graphics __PROTO((void)); TERM_PUBLIC void HP2648text __PROTO((void)); TERM_PUBLIC void HP2648linetype __PROTO((int linetype)); TERM_PUBLIC void HP2648move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void HP2648vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void HP2648put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int HP2648_text_angle __PROTO((int ang)); TERM_PUBLIC void HP2648reset __PROTO((void)); #define HP2648XMAX 720 #define HP2648YMAX 360 #define HP2648VCHAR 12 #define HP2648HCHAR 7 #define HP2648VTIC 8 #define HP2648HTIC 8 #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #define HP2648XLAST (HP2648XMAX - 1) #define HP2648YLAST (HP2648YMAX - 1) TERM_PUBLIC void HP2648init() { fprintf(gpoutfile, "\033*m1m1n136,1cZ"); /* 1 2 3 4 1. mode 2. textsize=1 3. textangle=1 4. define line type 2 to be * * * * etc. */ } TERM_PUBLIC void HP2648graphics() { fprintf(gpoutfile, "\033*dacZ"); /* 1 23 1. mode 2. clear grahics screen 3. graphics video on */ } TERM_PUBLIC void HP2648text() { } TERM_PUBLIC void HP2648linetype(int linetype) { static int hpline[] = { 1, 7, 1, 4, 5, 6, 8, 9, 10, 7, 2 }; fprintf(gpoutfile, "\033*m%dbZ", hpline[(linetype + 2) % 11]); } TERM_PUBLIC void HP2648move(unsigned int x, unsigned int y) { fprintf(gpoutfile, "\033*paf%d,%dZ", x, y); /* 1 23 4 1 plot mode 2 "pen up" 3 goto absolute x,y 4 end command */ } TERM_PUBLIC void HP2648vector(unsigned int x, unsigned int y) { fprintf(gpoutfile, "\033*pbf%d,%dZ", x, y); /* 1 1 "pen down" */ } TERM_PUBLIC void HP2648put_text(unsigned int x, unsigned int y, const char *str) { HP2648move(x, y - HP2648VCHAR / 2 + 1); fprintf(gpoutfile, "\033*l%s\n", str); } TERM_PUBLIC int HP2648_text_angle(int ang) { int hp_ang = (ang ? 1 : 0); fprintf(gpoutfile, "\033*m%dnZ\n", hp_ang+1); return TRUE; } TERM_PUBLIC void HP2648reset() { } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(hp2648_driver) "hp2648", "HP2648 and HP2647", HP2648XMAX, HP2648YMAX, HP2648VCHAR, HP2648HCHAR, HP2648VTIC, HP2648HTIC, options_null, HP2648init, HP2648reset, HP2648text, null_scale, HP2648graphics, HP2648move, HP2648vector, HP2648linetype, HP2648put_text, HP2648_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(hp2648_driver) #undef LAST_TERM #define LAST_TERM hp2648_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(hp2648) "1 hp2648", "?commands set terminal hp2648", "?set terminal hp2648", "?set term hp2648", "?terminal hp2648", "?term hp2648", "?hp2648", " The `hp2648` terminal driver supports the Hewlett Packard HP2647 and HP2648.", " It has no options." END_HELP(hp2648) #endif ����������������������������������������������������������������������gnuplot-4.6.4/term/vgagl.trm������������������������������������������������������������������������0000644�0004711�0000144�00000133305�10460036604�012730� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: vgagl.trm,v 1.20 2006/07/21 02:35:48 sfeam Exp $ */ #if defined(USE_MOUSE) /* GNUPLOT - vgagl.trm */ /*[ * Copyright 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports SVGA in the following modes: * * G1024x768x256, * G800x600x256, * G640x480x256, * G320x200x256, * G1280x1024x256, * G1152x864x256, * G1360x768x256, * G1600x1200x256, * * * AUTHOR * Johannes Zellner <johannes@zellner.org> * the code is based on the `linux' driver. * The first version dated January 2000. */ /* * Compile with -l3kit -lvgagl -lvga */ #define VGAGL_DEBUGGING #ifdef TERM_REGISTER register_term(vgagl) #endif #ifdef TERM_PROTO #define VGAGL_VCHAR FNT5X9_VCHAR #define VGAGL_HCHAR FNT5X9_HCHAR #define VGAGL_VTIC 5 #define VGAGL_HTIC 5 #define VGAGL_XMAX 0 /* These two entries are just place holders. */ #define VGAGL_YMAX 0 /* The actual values will be filled in init. */ TERM_PUBLIC void VGAGL_options __PROTO((void)); TERM_PUBLIC int VGAGL_get_mode __PROTO((void)); TERM_PUBLIC void VGAGL_init __PROTO((void)); TERM_PUBLIC void VGAGL_reset __PROTO((void)); TERM_PUBLIC void VGAGL_text __PROTO((void)); TERM_PUBLIC void VGAGL_graphics __PROTO((void)); TERM_PUBLIC void VGAGL_linetype __PROTO((int linetype)); TERM_PUBLIC void VGAGL_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void VGAGL_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC int VGAGL_text_angle __PROTO((int ang)); TERM_PUBLIC void VGAGL_put_text_with_color __PROTO((unsigned int x, unsigned int y, const char* str, int color)); TERM_PUBLIC void VGAGL_put_text __PROTO((unsigned int x, unsigned int y, const char* str)); TERM_PUBLIC void VGAGL_suspend __PROTO((void)); TERM_PUBLIC void VGAGL_resume __PROTO((void)); void VGAGL_eventually_process_graphics_events __PROTO((void)); TERM_PUBLIC void VGAGL_draw_cursor __PROTO((int x, int y)); TERM_PUBLIC void VGAGL_set_ruler __PROTO((int, int)); TERM_PUBLIC void VGAGL_set_cursor __PROTO((int, int, int)); TERM_PUBLIC void VGAGL_put_tmptext __PROTO((int, const char str[])); TERM_PUBLIC void VGAGL_set_clipboard __PROTO((const char[])); TERM_PUBLIC void VGAGL_init_keytable __PROTO((void)); TERM_PUBLIC void VGAGL_xor_pixel __PROTO((int x, int y)); TERM_PUBLIC void VGAGL_xor_pixel_wrapper __PROTO((int x, int y, int color)); TERM_PUBLIC void VGAGL_hline_xor __PROTO((int x1, int x2, int y)); TERM_PUBLIC void VGAGL_vline_xor __PROTO((int y1, int y2, int x)); #if 0 TERM_PUBLIC void VGAGL_line_xor __PROTO((unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2)); #endif TERM_PUBLIC void VGAGL_zoombox __PROTO((int x, int y)); TERM_PUBLIC void VGAGL_update_zoombox __PROTO((int x, int y)); TERM_PUBLIC void VGAGL_update_cursor __PROTO((int x, int y)); TERM_PUBLIC void VGAGL_signal_handler __PROTO((int signum)); TERM_PUBLIC void VGAGL_setpalettecolor __PROTO((int index, double red, double green, double blue)); TERM_PUBLIC void VGAGL_set_black_and_white __PROTO((void)); TERM_PUBLIC void VGAGL_set_line_colors __PROTO((void)); TERM_PUBLIC void VGAGL_putc __PROTO((unsigned int x, unsigned int y, int c, int ang, int color)); void (*VGAGL_old_handler) __PROTO((int)); #ifdef VGAGL_DEBUGGING TERM_PUBLIC void VGAGL_write_dump_file __PROTO((void)); #endif TERM_PUBLIC int VGAGL_make_palette __PROTO((t_sm_palette*)); TERM_PUBLIC void VGAGL_set_color __PROTO((t_colorspec *)); TERM_PUBLIC void VGAGL_filled_polygon __PROTO((int, gpiPoint*)); static const int VGAGL_8bit_colors = 240; static const int pm3d_color_offset = 16; /* 0xff - VGAGL_8bit_colors + 1 */ static int VGAGL_pm3d_colors; static int VGAGL_pm3d_colors_; /* VGAGL_pm3d_colors - 1 */ static t_sm_palette VGAGL_save_pal = { -1, -1, -1, -1, -1, -1, -1, -1, (rgb_color*) 0, -1, -1 }; static double VGAGL_gray = 0; #ifdef VGAGL_ENABLE_TRUECOLOR #define VGAGL_tri_colors 4096 static TBOOLEAN VGAGL_truecolor = FALSE; static unsigned short VGAGL_line_cmap[0xf]; static unsigned short VGAGL_cmap[VGAGL_tri_colors]; #endif #ifdef VGAGL_DEBUGGING static char* VGAGL_dump_file = (char*) 0; static unsigned char VGAGL_palette[0x100][3]; #endif #endif /* TERM_PROTO */ #ifdef TERM_BODY #include <signal.h> #define _STRING_H_ /* according to the vga_waitevent() man page */ #include <sys/time.h> #include <sys/types.h> #include <unistd.h> #include <vga.h> #include <vgagl.h> #include <3dkit.h> #include <vgamouse.h> #include <vgakeyboard.h> #define VGA_FPRINTF(x) fprintf x #define Y(y) (vgagl_lasty - y) static TBOOLEAN VGAGL_processing_graphics_events = FALSE; static TBOOLEAN VGAGL_interpolate = TRUE; static GraphicsContext backscreen; static GraphicsContext physicalscreen; static int current_color = 7; #ifdef SCANCODE_RIGHTWIN # define KEYTABLE_SIZE (SCANCODE_RIGHTWIN + 1) #else # define KEYTABLE_SIZE (128) /* should be sufficient (joze) */ #endif static int VGAGL_Keytable[KEYTABLE_SIZE]; static int VGAGL_modifier_mask = 0; static int VGAGL_last_cursorx = -1; static int VGAGL_last_cursory = -1; static int VGAGL_cursorx; static int VGAGL_cursory; static int VGAGL_ruler_x = -1; static int VGAGL_ruler_y = -1; typedef struct VGAGL_zoom_t { int startx; int starty; int currentx; int currenty; char xstr[2][0xff]; char ystr[2][0xff]; char current_xstr[2][0xff]; char current_ystr[2][0xff]; } VGAGL_zoom_t; static VGAGL_zoom_t VGAGL_zoom = { -1, -1, -1, -1, { "", "" }, { "", "" }, { "", "" }, { "", "" } }; static TBOOLEAN VGAGL_cursor_drawn = FALSE; static unsigned char VGAGL_bg_red = 0x0; static unsigned char VGAGL_bg_green = 0x0; static unsigned char VGAGL_bg_blue = 0x0; static unsigned char VGAGL_xor_red = 0xff; static unsigned char VGAGL_xor_green = 0xff; static unsigned char VGAGL_xor_blue = 0xff; static TBOOLEAN VGAGL_need_update = TRUE; static char VGAGL_savedstr[0xff] = ""; static int vgagl_vmode = -1; /* default mode */ static TBOOLEAN VGAGL_graphics_on = FALSE; static vga_modeinfo *modeinfo; static int VGAGL_startx, VGAGL_starty, vgagl_lasty, vgagl_lastx; static int VGAGL_angle = 0; void VGAGL_init_keytable() { int i; for (i = 0; i < KEYTABLE_SIZE; i++) { VGAGL_Keytable[i] = -1; } VGAGL_Keytable[SCANCODE_1] = '1'; VGAGL_Keytable[SCANCODE_2] = '2'; VGAGL_Keytable[SCANCODE_3] = '3'; VGAGL_Keytable[SCANCODE_4] = '4'; VGAGL_Keytable[SCANCODE_5] = '5'; VGAGL_Keytable[SCANCODE_6] = '6'; VGAGL_Keytable[SCANCODE_7] = '7'; VGAGL_Keytable[SCANCODE_8] = '8'; VGAGL_Keytable[SCANCODE_9] = '9'; VGAGL_Keytable[SCANCODE_0] = '0'; VGAGL_Keytable[SCANCODE_A] = 'a'; VGAGL_Keytable[SCANCODE_B] = 'b'; VGAGL_Keytable[SCANCODE_C] = 'c'; VGAGL_Keytable[SCANCODE_D] = 'd'; VGAGL_Keytable[SCANCODE_E] = 'e'; VGAGL_Keytable[SCANCODE_F] = 'f'; VGAGL_Keytable[SCANCODE_G] = 'g'; VGAGL_Keytable[SCANCODE_H] = 'h'; VGAGL_Keytable[SCANCODE_I] = 'i'; VGAGL_Keytable[SCANCODE_J] = 'j'; VGAGL_Keytable[SCANCODE_K] = 'k'; VGAGL_Keytable[SCANCODE_L] = 'l'; VGAGL_Keytable[SCANCODE_M] = 'm'; VGAGL_Keytable[SCANCODE_N] = 'n'; VGAGL_Keytable[SCANCODE_O] = 'o'; VGAGL_Keytable[SCANCODE_P] = 'p'; VGAGL_Keytable[SCANCODE_Q] = 'q'; VGAGL_Keytable[SCANCODE_R] = 'r'; VGAGL_Keytable[SCANCODE_S] = 's'; VGAGL_Keytable[SCANCODE_T] = 't'; VGAGL_Keytable[SCANCODE_U] = 'u'; VGAGL_Keytable[SCANCODE_V] = 'v'; VGAGL_Keytable[SCANCODE_W] = 'w'; VGAGL_Keytable[SCANCODE_X] = 'x'; VGAGL_Keytable[SCANCODE_Y] = 'y'; VGAGL_Keytable[SCANCODE_Z] = 'z'; VGAGL_Keytable[SCANCODE_BRACKET_LEFT] = '['; VGAGL_Keytable[SCANCODE_BRACKET_RIGHT] = ']'; VGAGL_Keytable[SCANCODE_MINUS] = '-'; VGAGL_Keytable[SCANCODE_EQUAL] = '='; VGAGL_Keytable[SCANCODE_SEMICOLON] = ';'; VGAGL_Keytable[SCANCODE_APOSTROPHE] = '\''; VGAGL_Keytable[SCANCODE_GRAVE] = '^'; VGAGL_Keytable[SCANCODE_BACKSLASH] = '\\'; VGAGL_Keytable[SCANCODE_COMMA] = ','; VGAGL_Keytable[SCANCODE_PERIOD] = '.'; VGAGL_Keytable[SCANCODE_SLASH] = '/'; VGAGL_Keytable[SCANCODE_SPACE] = ' '; VGAGL_Keytable[SCANCODE_BACKSPACE] = GP_BackSpace; VGAGL_Keytable[SCANCODE_TAB] = GP_Tab; VGAGL_Keytable[SCANCODE_ENTER] = GP_Return; VGAGL_Keytable[SCANCODE_ESCAPE] = GP_Escape; /* VGAGL_Keytable[SCANCODE_LEFTCONTROL] */ /* VGAGL_Keytable[SCANCODE_RIGHTCONTROL] */ /* VGAGL_Keytable[SCANCODE_CONTROL] */ /* VGAGL_Keytable[SCANCODE_LEFTSHIFT] */ /* VGAGL_Keytable[SCANCODE_RIGHTSHIFT] */ /* VGAGL_Keytable[SCANCODE_LEFTALT] */ /* VGAGL_Keytable[SCANCODE_RIGHTALT] */ /* VGAGL_Keytable[SCANCODE_CAPSLOCK] */ VGAGL_Keytable[SCANCODE_NUMLOCK] = GP_Scroll_Lock; /* VGAGL_Keytable[SCANCODE_SCROLLLOCK] = GP_Numlock; */ VGAGL_Keytable[SCANCODE_KEYPADMULTIPLY] = GP_KP_Multiply; VGAGL_Keytable[SCANCODE_F1] = GP_F1; VGAGL_Keytable[SCANCODE_F2] = GP_F2; VGAGL_Keytable[SCANCODE_F3] = GP_F3; VGAGL_Keytable[SCANCODE_F4] = GP_F4; VGAGL_Keytable[SCANCODE_F5] = GP_F5; VGAGL_Keytable[SCANCODE_F6] = GP_F6; VGAGL_Keytable[SCANCODE_F7] = GP_F7; VGAGL_Keytable[SCANCODE_F8] = GP_F8; VGAGL_Keytable[SCANCODE_F9] = GP_F9; VGAGL_Keytable[SCANCODE_F10] = GP_F10; VGAGL_Keytable[SCANCODE_F11] = GP_F11; VGAGL_Keytable[SCANCODE_F12] = GP_F12; VGAGL_Keytable[SCANCODE_KEYPAD0] = GP_KP_0; VGAGL_Keytable[SCANCODE_KEYPAD1] = GP_KP_1; VGAGL_Keytable[SCANCODE_KEYPAD2] = GP_KP_2; VGAGL_Keytable[SCANCODE_KEYPAD3] = GP_KP_3; VGAGL_Keytable[SCANCODE_KEYPAD4] = GP_KP_4; VGAGL_Keytable[SCANCODE_KEYPAD5] = GP_KP_5; VGAGL_Keytable[SCANCODE_KEYPAD6] = GP_KP_6; VGAGL_Keytable[SCANCODE_KEYPAD7] = GP_KP_7; VGAGL_Keytable[SCANCODE_KEYPAD8] = GP_KP_8; VGAGL_Keytable[SCANCODE_KEYPAD9] = GP_KP_9; /* KEYPAD */ VGAGL_Keytable[SCANCODE_KEYPADMINUS] = GP_KP_Subtract; VGAGL_Keytable[SCANCODE_KEYPADPLUS] = GP_KP_Add; VGAGL_Keytable[SCANCODE_KEYPADPERIOD] = GP_KP_Delete; VGAGL_Keytable[SCANCODE_KEYPADENTER] = GP_KP_Enter; VGAGL_Keytable[SCANCODE_KEYPADDIVIDE] = GP_KP_Divide; VGAGL_Keytable[SCANCODE_CURSORUPLEFT] = GP_KP_Home; VGAGL_Keytable[SCANCODE_CURSORUP] = GP_KP_Up; VGAGL_Keytable[SCANCODE_CURSORUPRIGHT] = GP_KP_Page_Up; VGAGL_Keytable[SCANCODE_CURSORLEFT] = GP_KP_Left; VGAGL_Keytable[SCANCODE_CURSORRIGHT] = GP_KP_Right; VGAGL_Keytable[SCANCODE_CURSORDOWNLEFT] = GP_KP_End; VGAGL_Keytable[SCANCODE_CURSORDOWN] = GP_KP_Down; VGAGL_Keytable[SCANCODE_CURSORDOWNRIGHT] = GP_KP_Page_Down; VGAGL_Keytable[SCANCODE_LESS] = GP_KP_Begin; #if 0 VGAGL_Keytable[SCANCODE_PRINTSCREEN] = GP_Begin; VGAGL_Keytable[SCANCODE_BREAK] = GP_Begin; VGAGL_Keytable[SCANCODE_BREAK_ALTERNATIVE] = GP_Begin; #endif /* 3 * 2 block (usually above arrow keys) */ VGAGL_Keytable[SCANCODE_INSERT] = GP_Insert; VGAGL_Keytable[SCANCODE_HOME] = GP_Home; VGAGL_Keytable[SCANCODE_PAGEUP] = GP_PageUp; VGAGL_Keytable[SCANCODE_REMOVE] = GP_Delete; VGAGL_Keytable[SCANCODE_END] = GP_End; VGAGL_Keytable[SCANCODE_PAGEDOWN] = GP_PageDown; /* arrow keys */ VGAGL_Keytable[SCANCODE_CURSORBLOCKUP] = GP_Up; VGAGL_Keytable[SCANCODE_CURSORBLOCKLEFT] = GP_Left; VGAGL_Keytable[SCANCODE_CURSORBLOCKRIGHT] = GP_Right; VGAGL_Keytable[SCANCODE_CURSORBLOCKDOWN] = GP_Down; /* VGAGL_Keytable[SCANCODE_RIGHTWIN] */ /* VGAGL_Keytable[SCANCODE_LEFTWIN] */ } enum { VGAGL_INVALID = -1, VGAGL_BACKGROUND = 1, VGAGL_UNIFORM, VGAGL_INTERPOLATE, VGAGL_DUMP }; static struct gen_table VGAGL_opts[] = { { "ba$ckground", VGAGL_BACKGROUND }, { "bg", VGAGL_BACKGROUND }, { "un$iform", VGAGL_UNIFORM }, { "in$terpolate", VGAGL_INTERPOLATE }, #ifdef VGAGL_DEBUGGING { "dump", VGAGL_DUMP }, #endif { NULL, VGAGL_INVALID } }; /* parse driver optinos. This is done when the * user types `set term vgagl [options ...]'. */ TERM_PUBLIC void VGAGL_options() { if (!LINUX_graphics_allowed) { int_error(NO_CARET, "vgagl terminal driver not available"); return; } #ifdef VGAGL_DEBUGGING #if 0 if (VGAGL_dump_file) free(VGAGL_dump_file); VGAGL_dump_file = (char*) 0; #endif #endif if (END_OF_COMMAND) { /* defaults */ vgagl_vmode = -1; /* get default mode */ VGAGL_bg_red = 0; VGAGL_bg_green = 0; VGAGL_bg_blue = 0; VGAGL_interpolate = TRUE; } while (!END_OF_COMMAND) { switch (lookup_table(VGAGL_opts, c_token)) { case VGAGL_BACKGROUND: { struct value a; int i, c[3]; ++c_token; for (i = 0; i < 3; i++) { if (END_OF_COMMAND) { break; } c[i] = (int)real(const_express(&a)); if (c[i] < 0 || c[i] > 255) { fprintf(stderr, "color ranges from 0 to 255\n"); return; } } if (!i) { fprintf(stderr, "background requires arguments\n"); } else if (i < 3) { c[1] = c[0]; c[2] = c[0]; } VGAGL_bg_red = c[0]; VGAGL_bg_green = c[1]; VGAGL_bg_blue = c[2]; } break; case VGAGL_UNIFORM: VGAGL_interpolate = FALSE; ++c_token; break; case VGAGL_INTERPOLATE: VGAGL_interpolate = TRUE; ++c_token; break; #ifdef VGAGL_DEBUGGING case VGAGL_DUMP: /* since this is not documented it won't hurt too much to leave it in. */ ++c_token; if (isstring(c_token)) { if (VGAGL_dump_file) free(VGAGL_dump_file); /* get text */ VGAGL_dump_file = gp_alloc(token_len(c_token), "vgagl->dump_file"); quote_str(VGAGL_dump_file, c_token, token_len(c_token)); ++c_token; } else { int_error(NO_CARET, "expecting string value"); return; } break; #endif default: { /* VGA MODE */ char x[0x40]; int imode; copy_str(x, c_token, 0x3f); imode = vga_getmodenumber(x); if (-1 != imode) { if (vga_hasmode(imode)) { vgagl_vmode = imode; } else { fprintf(stderr, "mode %s not available\n", vga_getmodename(imode)); } } c_token++; } if (VGAGL_graphics_on) { VGAGL_processing_graphics_events = FALSE; VGAGL_reset(); } break; } } if (VGAGL_graphics_on) { VGAGL_set_black_and_white(); } VGAGL_get_mode(); /* check availability of mode */ sprintf(term_options, "%s bg %d %d %d %s", vga_getmodename(vgagl_vmode), VGAGL_bg_red, VGAGL_bg_green, VGAGL_bg_blue, TRUE == VGAGL_interpolate ? "interpolate" : "uniform"); } void VGAGL_setpalettecolor(int index, double red, double green, double blue) { #ifdef VGAGL_DEBUGGING assert(index >= 0 && index < 0x100); assert(red >= 0 && red <= 1); assert(green >= 0 && green <= 1); assert(blue >= 0 && blue <= 1); VGAGL_palette[index][0] = (unsigned char) floor(red * 255.999); VGAGL_palette[index][1] = (unsigned char) floor(green * 255.999); VGAGL_palette[index][2] = (unsigned char) floor(blue * 255.999); #endif gl_setpalettecolor(index, red * 63.999, green * 63.999, blue * 63.999); } /* set the background color (default is black) and choose * the primary foreground and xor colors appropriately */ TERM_PUBLIC void VGAGL_set_black_and_white() { /* background */ #ifdef VGAGL_ENABLE_TRUECOLOR switch (VGAGL_truecolor) { case TRUE: VGAGL_line_cmap[0] = gl_rgbcolor(VGAGL_bg_red, VGAGL_bg_green, VGAGL_bg_blue); break; default: #endif VGAGL_setpalettecolor(0, (double) VGAGL_bg_red / (double) 0xff, (double) VGAGL_bg_green / (double) 0xff, (double) VGAGL_bg_blue / (double) 0xff); #ifdef VGAGL_ENABLE_TRUECOLOR } #endif if (VGAGL_bg_red + VGAGL_bg_green + VGAGL_bg_blue > 0x180) { /* light background */ #ifdef VGAGL_ENABLE_TRUECOLOR switch (VGAGL_truecolor) { case TRUE: VGAGL_line_cmap[1] = gl_rgbcolor(0x00, 0x00, 0x00); break; default: #endif VGAGL_setpalettecolor(1, 0, 0, 0); /* black */ #ifdef VGAGL_ENABLE_TRUECOLOR } #endif VGAGL_xor_red = 0xa0; VGAGL_xor_green = 0xa0; VGAGL_xor_blue = 0xa0; /* TODO need to allocate a colormap entry for the xor color ? */ #if 0 VGAGL_xor_red = ~VGAGL_bg_red; VGAGL_xor_green = ~VGAGL_bg_green; VGAGL_xor_blue = ~VGAGL_bg_blue; fprintf(stderr, "(VGAGL_set_black_and_white) VGAGL_xor_red = %d\n", VGAGL_xor_red); fprintf(stderr, "(VGAGL_set_black_and_white) VGAGL_xor_green = %d\n", VGAGL_xor_green); fprintf(stderr, "(VGAGL_set_black_and_white) VGAGL_xor_blue = %d\n", VGAGL_xor_blue); #endif } else { /* dark background */ #ifdef VGAGL_ENABLE_TRUECOLOR switch (VGAGL_truecolor) { case TRUE: VGAGL_line_cmap[1] = gl_rgbcolor(0xff, 0xff, 0xff); break; default: #endif VGAGL_setpalettecolor(1, 1, 1, 1); /* white */ #ifdef VGAGL_ENABLE_TRUECOLOR } #endif VGAGL_xor_red = 0xff; VGAGL_xor_green = 0xff; VGAGL_xor_blue = 0xff; /* TODO need to allocate a colormap entry for the xor color ? */ } } /* set up line colors */ TERM_PUBLIC void VGAGL_set_line_colors() { gl_setrgbpalette(); VGAGL_set_black_and_white(); #ifdef VGAGL_ENABLE_TRUECOLOR switch (VGAGL_truecolor) { case TRUE: VGAGL_line_cmap[2] = gl_rgbcolor(0x80, 0x80, 0x80); /* gray */ VGAGL_line_cmap[3] = gl_rgbcolor(0x00, 0xff, 0x00); /* green */ VGAGL_line_cmap[4] = gl_rgbcolor(0x00, 0xff, 0xff); /* cyan */ VGAGL_line_cmap[5] = gl_rgbcolor(0xff, 0x00, 0x00); /* red */ VGAGL_line_cmap[6] = gl_rgbcolor(0xff, 0x00, 0xff); /* magenta */ VGAGL_line_cmap[7] = gl_rgbcolor(0x00, 0x00, 0xff); /* blue */ VGAGL_line_cmap[8] = gl_rgbcolor(0xff, 0xff, 0x00); /* yellow */ VGAGL_line_cmap[9] = gl_rgbcolor(0xff, 0x80, 0x80); /* light red */ VGAGL_line_cmap[10] = gl_rgbcolor(0xff, 0xff, 0xff); /* white */ VGAGL_line_cmap[11] = gl_rgbcolor(0xff, 0x80, 0xff); /* light magenta */ VGAGL_line_cmap[12] = gl_rgbcolor(0x80, 0xff, 0x80); /* light green */ VGAGL_line_cmap[13] = gl_rgbcolor(0x80, 0xff, 0xff); /* light cyan */ VGAGL_line_cmap[14] = gl_rgbcolor(0x80, 0x80, 0xff); /* light blue */ break; default: #endif VGAGL_setpalettecolor(2, 0.5, 0.5, 0.5); /* gray */ VGAGL_setpalettecolor(3, 0.0, 1.0, 0.0); /* green */ VGAGL_setpalettecolor(4, 0.0, 1.0, 1.0); /* cyan */ VGAGL_setpalettecolor(5, 1.0, 0.0, 0.0); /* red */ VGAGL_setpalettecolor(6, 1.0, 0.0, 1.0); /* magenta */ VGAGL_setpalettecolor(7, 0.0, 0.0, 1.0); /* blue */ VGAGL_setpalettecolor(8, 1.0, 1.0, 0.0); /* yellow */ VGAGL_setpalettecolor(9, 1.0, 0.5, 0.5); /* light red */ VGAGL_setpalettecolor(10, 1.0, 1.0, 1.0); /* white */ VGAGL_setpalettecolor(11, 1.0, 0.5, 1.0); /* light magenta */ VGAGL_setpalettecolor(12, 0.5, 1.0, 0.5); /* light green */ VGAGL_setpalettecolor(13, 0.5, 1.0, 1.0); /* light cyan */ VGAGL_setpalettecolor(14, 0.5, 0.5, 1.0); /* light blue */ #ifdef VGAGL_ENABLE_TRUECOLOR } #endif } TERM_PUBLIC int VGAGL_get_mode() { int *iptr; static int default_modes[] = { 0, /* to be filled with the user defined mode */ 0, /* to be filled with the default mode */ G1024x768x256, /* hopefully available on all modern graphics boards */ G800x600x256, G640x480x256, G320x200x256, G1280x1024x256, #ifdef G1152x864x256 G1152x864x256, #endif #ifdef G1360x768x256 G1360x768x256, #endif #ifdef G1600x1200x256 G1600x1200x256, #endif TEXT }; if (VGAGL_graphics_on) { return 1; /* success ??? */ } /* the user supplied mode will be checked first */ default_modes[0] = vgagl_vmode; /* get the default mode from SVGALIB_DEFAULT_MODE, if available */ default_modes[1] = vga_getdefaultmode(); for (iptr = default_modes; TEXT != *iptr; iptr++) { if (-1 != *iptr && vga_hasmode(*iptr)) { vgagl_vmode = *iptr; break; } } if (TEXT == *iptr) { vgagl_vmode = TEXT; int_error(NO_CARET, "vgagl terminal driver not available"); return 0; } modeinfo = vga_getmodeinfo(vgagl_vmode); #ifdef VGAGL_ENABLE_TRUECOLOR VGAGL_truecolor = FALSE; #endif VGAGL_pm3d_colors = VGAGL_8bit_colors; VGAGL_pm3d_colors_ = VGAGL_pm3d_colors - 1; if (modeinfo->colors != 256) { int_error(NO_CARET, "Error: need a 256 color mode but got %d colors\n", modeinfo->colors); return 0; #ifdef VGAGL_ENABLE_TRUECOLOR } else if (modeinfo->colors > 256) { VGAGL_truecolor = TRUE; VGAGL_pm3d_colors = VGAGL_tri_colors; VGAGL_pm3d_colors_ = VGAGL_pm3d_colors - 1; #endif } return 1; /* success */ } TERM_PUBLIC void VGAGL_init() { static TBOOLEAN keytable_initialized = FALSE; if (!VGAGL_graphics_on) { /* initialize keyboard tranlation table, only done once */ if (!keytable_initialized) { VGAGL_init_keytable(); keytable_initialized = TRUE; } if (!VGAGL_get_mode()) { return; } } term->xmax = modeinfo->width; term->ymax = modeinfo->height; vgagl_lasty = modeinfo->height - 1; vgagl_lastx = modeinfo->width - 1; #if 0 gl_setfont(8, 8, gl_font8x8); gl_setwritemode(WRITEMODE_MASKED + FONT_COMPRESSED); fprintf(stderr, "(VGAGL_init) width, height = %d, %d\n", term->xmax, term->ymax); #endif } TERM_PUBLIC void VGAGL_reset() { if (VGAGL_graphics_on && !VGAGL_processing_graphics_events) { keyboard_close(); /* switch back to cooked mode */ vga_setmousesupport(0); /* turn off mouse */ vga_setmode(TEXT); /* switch to text mode */ VGAGL_save_pal.colorFormulae = -1; /* force later reallocation of palette */ VGAGL_graphics_on = FALSE; } } /* copy virtual screen to physical screen and process input events until the user leaves the graphics mode */ TERM_PUBLIC void VGAGL_text() { if (!VGAGL_cursor_drawn) { VGAGL_draw_cursor(VGAGL_cursorx, VGAGL_cursory); /* actually draws the first time the cursor */ VGAGL_cursor_drawn = TRUE; if (VGAGL_ruler_x >= 0) { VGAGL_set_ruler(VGAGL_ruler_x, VGAGL_ruler_y); } } gl_copyscreen(&physicalscreen); /* this is dirty but should work. The purpose is to force * gnuplot to call VGAGL_graphics() before redrawing. */ term_graphics = FALSE; if (!VGAGL_graphics_on || VGAGL_processing_graphics_events) { return; } /* go to the input event loop */ VGAGL_eventually_process_graphics_events(); /* switch to TEXT mode */ VGAGL_reset(); } TERM_PUBLIC void VGAGL_graphics() { if (!VGAGL_graphics_on) { vga_setmousesupport(1); if (gl_setcontextvgavirtual(vgagl_vmode)) { fprintf(stderr, "(VGAGL_graphics) unable to set virtual context\n"); } gl_getcontext(&backscreen); vga_setmode(vgagl_vmode); gl_setcontextvga(vgagl_vmode); /* Physical screen context. */ gl_getcontext(&physicalscreen); gl_setcontext(&backscreen); gl_clearscreen(0); /* clear backscreen; we'll draw there */ gl_enableclipping(); VGAGL_set_line_colors(); /* center the cursor on startup */ VGAGL_cursorx = WIDTH / 2; VGAGL_cursory = HEIGHT / 2; VGAGL_graphics_on = TRUE; } else { /* graphics is already on; clear previous plot */ gl_clearscreen(0); } supply_extended_color_specs = 1; VGAGL_cursor_drawn = FALSE; VGAGL_savedstr[0] = '\0'; #if 0 { int avail = vga_ext_set(VGA_EXT_AVAILABLE, VGA_AVAIL_ACCEL); fprintf(stderr, "ACCELFLAG_FILLBOX %s\n", (avail & ACCELFLAG_FILLBOX) ? "yes" : "no"); fprintf(stderr, "ACCELFLAG_SCREENCOPY %s\n", (avail & ACCELFLAG_SCREENCOPY) ? "yes" : "no"); fprintf(stderr, "ACCELFLAG_PUTIMAGE %s\n", (avail & ACCELFLAG_PUTIMAGE) ? "yes" : "no"); fprintf(stderr, "ACCELFLAG_DRAWLINE %s\n", (avail & ACCELFLAG_DRAWLINE) ? "yes" : "no"); fprintf(stderr, "ACCELFLAG_SETFGCOLOR %s\n", (avail & ACCELFLAG_SETFGCOLOR) ? "yes" : "no"); fprintf(stderr, "ACCELFLAG_SETBGCOLOR %s\n", (avail & ACCELFLAG_SETBGCOLOR) ? "yes" : "no"); fprintf(stderr, "ACCELFLAG_SETTRANSPARENCY %s\n", (avail & ACCELFLAG_SETTRANSPARENCY) ? "yes" : "no"); fprintf(stderr, "ACCELFLAG_SETRASTEROP %s\n", (avail & ACCELFLAG_SETRASTEROP) ? "yes" : "no"); fprintf(stderr, "ACCELFLAG_PUTBITMAP %s\n", (avail & ACCELFLAG_PUTBITMAP) ? "yes" : "no"); fprintf(stderr, "ACCELFLAG_SCREENCOPYBITMAP %s\n", (avail & ACCELFLAG_SCREENCOPYBITMAP) ? "yes" : "no"); fprintf(stderr, "ACCELFLAG_DRAWHLINELIST %s\n", (avail & ACCELFLAG_DRAWHLINELIST) ? "yes" : "no"); fprintf(stderr, "ACCELFLAG_SETMODE %s\n", (avail & ACCELFLAG_SETMODE) ? "yes" : "no"); fprintf(stderr, "ACCELFLAG_SYNC %s\n", (avail & ACCELFLAG_SYNC) ? "yes" : "no"); } #endif } TERM_PUBLIC void VGAGL_suspend() { #if 1 VGA_FPRINTF((stderr, "(VGAGL_suspend) \n")); keyboard_close(); /* switch back to cooked mode */ vga_setmousesupport(0); /* turn off mouse */ vga_flip(); #endif } TERM_PUBLIC void VGAGL_resume() { #if 1 VGA_FPRINTF((stderr, "(VGAGL_resume) \n")); vga_flip(); keyboard_init(); /* put keyboard to raw mode */ vga_setmousesupport(1); /* turn mouse on */ #endif } TERM_PUBLIC void VGAGL_linetype(int linetype) { if (linetype < -3) linetype = LT_NODRAW; #ifdef VGAGL_ENABLE_TRUECOLOR switch (VGAGL_truecolor) { case TRUE: current_color = VGAGL_line_cmap[(linetype + 3) % 13]; break; default: #endif current_color = (linetype + 3) % 13; #ifdef VGAGL_ENABLE_TRUECOLOR } #endif } TERM_PUBLIC void VGAGL_move(unsigned int x, unsigned int y) { VGAGL_startx = x; VGAGL_starty = Y(y); } TERM_PUBLIC void VGAGL_vector(unsigned int x, unsigned int y) { /* fprintf(stderr, "(VGAGL_vector) x, y = %d %d\n", x, y); */ int sy = Y(y); gl_line(VGAGL_startx, VGAGL_starty, x, sy, current_color); VGAGL_startx = x; VGAGL_starty = sy; } TERM_PUBLIC int VGAGL_text_angle(int ang) { VGAGL_angle = (ang ? 1 : 0); return TRUE; } /* driver's coordinate system */ void VGAGL_xor_pixel_wrapper(int x, int y, int color) { /* discard color */ VGAGL_xor_pixel(x, y); } /* driver's coordinate system */ static void VGAGL_putc(unsigned int x, unsigned int y, int c, int ang, int color) { int i, j, k; void (*pixelfun)(int, int, int); i = (int) (c) - 32; switch (color) { case -1: pixelfun = VGAGL_xor_pixel_wrapper; break; default: pixelfun = gl_setpixel; } switch (ang) { case 0: /* horizontal */ for (x++, j = 0; j < FNT5X9_VBITS; j++, y--) { for (k = 0; k < FNT5X9_HBITS; k++) { if ((((unsigned int) (fnt5x9[i][j])) >> k & 1)) { pixelfun(x + k, y, current_color); } } } break; case 1: /* vertical */ for (y--, j = 0; j < FNT5X9_VBITS; j++, x--) { for (k = 0; k < FNT5X9_HBITS; k++) { if ((((unsigned int) (fnt5x9[i][j])) >> k & 1)) { pixelfun(x, y - k, current_color); } } } break; default: fprintf(stderr, "(VGAGL_putc) angle %d not implemented\n", VGAGL_angle); } } /* driver's coordinate system */ TERM_PUBLIC void VGAGL_put_text_with_color( unsigned int x, unsigned int y, const char *str, int color) { const char* ptr; switch (VGAGL_angle) { case 0: y += VGAGL_VCHAR / 2; break; case 1: x += VGAGL_VCHAR / 2; break; } for (ptr = str; *ptr; ptr++) { VGAGL_putc(x, y, *ptr, VGAGL_angle, color); switch (VGAGL_angle) { case 0: x += VGAGL_HCHAR; break; case 1: y -= VGAGL_HCHAR; break; default: fprintf(stderr, "(VGAGL_put_text) angle %d not implemented\n", VGAGL_angle); } } VGAGL_need_update = TRUE; } /* gnuplot's coordinate system */ TERM_PUBLIC void VGAGL_put_text(unsigned int x, unsigned int y, const char *str) { VGAGL_put_text_with_color(x, Y(y), str, current_color); } void VGAGL_xor_pixel(int x, int y) { int r, g, b; gl_getpixelrgb(x, y, &r, &g, &b); r ^= VGAGL_xor_red; g ^= VGAGL_xor_green; b ^= VGAGL_xor_blue; #if 0 fprintf(stderr, " xor: %3d %3d %3d\n", r, g, b); #endif gl_setpixelrgb(x, y, r, g, b); } void VGAGL_hline_xor(int x1, int x2, int y) { int i; if (x1 > x2) { int tmp = x1; x1 = x2; x2 = tmp; } for (i = x1; i <= x2; i++) { VGAGL_xor_pixel(i, y); } } void VGAGL_vline_xor(int y1, int y2, int x) { if (y1 > y2) { /* swap */ int tmp = y1; y1 = y2; y2 = tmp; } if (-1 == vga_accel(ACCEL_SETRASTEROP, ROP_XOR)) { /* vga_accel(ACCEL_SETRASTEROP, ROP_XOR) is not available */ int i; for (i = y1; i <= y2; i++) { VGAGL_xor_pixel(x, i); } } else { fprintf(stderr, "(VGAGL_vline_xor) accelerated xor was never tested\n"); gl_line(x, y1, x, y2, 1); vga_accel(ACCEL_SETRASTEROP, ROP_COPY); /* switching back */ } } #if 0 void VGAGL_line_xor(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2) { if (x1 == x2) { VGAGL_vline_xor(y1, y2, x1); } else if (y1 == y2) { VGAGL_hline_xor(x1, x2, y1); } else { fprintf(stderr, "(VGAGL_line_xor) vertical lines not implemented\n"); } } #endif TERM_PUBLIC void VGAGL_draw_cursor(int x, int y) { static const int cursorsize = 5; VGAGL_hline_xor(x - cursorsize, x + cursorsize, y); VGAGL_vline_xor(y - cursorsize, y + cursorsize, x); VGAGL_last_cursorx = x; VGAGL_last_cursory = y; } void VGAGL_zoombox(int x, int y) { VGAGL_hline_xor(VGAGL_zoom.startx, x, VGAGL_zoom.starty); VGAGL_hline_xor(VGAGL_zoom.startx, x, y); VGAGL_vline_xor(VGAGL_zoom.starty, y, VGAGL_zoom.startx); VGAGL_vline_xor(VGAGL_zoom.starty, y, x); if (*VGAGL_zoom.current_xstr && *VGAGL_zoom.current_ystr) { int ty; /* first corner (static) */ ty = VGAGL_zoom.starty - VGAGL_VCHAR / 2; VGAGL_put_text_with_color(VGAGL_zoom.startx, ty, VGAGL_zoom.current_xstr[0], -1); VGAGL_put_text_with_color(VGAGL_zoom.startx, ty + VGAGL_VCHAR, VGAGL_zoom.current_ystr[0], -1); /* second corner (at the curser) */ ty = y - VGAGL_VCHAR / 2; VGAGL_put_text_with_color(x, ty, VGAGL_zoom.current_xstr[1], -1); VGAGL_put_text_with_color(x, ty + VGAGL_VCHAR, VGAGL_zoom.current_ystr[1], -1); } VGAGL_zoom.currentx = x; VGAGL_zoom.currenty = y; } void VGAGL_update_zoombox(int x, int y) { if (VGAGL_zoom.startx >= 0) { VGAGL_zoombox(VGAGL_zoom.currentx, VGAGL_zoom.currenty); /* erase old box */ strcpy(VGAGL_zoom.current_xstr[0], VGAGL_zoom.xstr[0]); strcpy(VGAGL_zoom.current_ystr[0], VGAGL_zoom.ystr[0]); strcpy(VGAGL_zoom.current_xstr[1], VGAGL_zoom.xstr[1]); strcpy(VGAGL_zoom.current_ystr[1], VGAGL_zoom.ystr[1]); VGAGL_zoombox(x, y); /* draw new box */ VGAGL_need_update = TRUE; } } void VGAGL_update_cursor(int x, int y) { VGAGL_draw_cursor(VGAGL_last_cursorx, VGAGL_last_cursory); /* erase old cursor */ VGAGL_draw_cursor(x, y); /* draw new cursor */ VGAGL_need_update = TRUE; } void VGAGL_signal_handler(int signum) { struct gp_event_t ge = {-1, -1, -1, -1, -1, ""}; ge.type = GE_modifier; ge.par1 = 0; /* release all modifiers */ do_event(&ge); VGAGL_processing_graphics_events = FALSE; signal(SIGINT, VGAGL_old_handler); /* reset signal handler */ VGAGL_reset(); } void VGAGL_eventually_process_graphics_events() { /* VGA_FPRINTF((stderr, "(VGAGL_eventually_process_graphics_events) \n")); */ if (VGAGL_graphics_on && !VGAGL_processing_graphics_events) { int lastbutton = 0; struct gp_event_t ge = {-1, -1, -1, -1, -1, ""}; TBOOLEAN loop = TRUE; int yinv; VGAGL_processing_graphics_events = TRUE; /* set up a signal hander, so that SIGINT * can restore a clean terminal state */ VGAGL_old_handler = signal(SIGINT, VGAGL_signal_handler); keyboard_init(); /* put keyboard to raw mode */ /* put the mouse pointer to the center */ mouse_setposition(VGAGL_cursorx, VGAGL_cursory); while (VGAGL_graphics_on && loop) { int button; int motion; int ret; event_plotdone(); if (VGAGL_need_update) { gl_copyscreen(&physicalscreen); VGAGL_need_update = FALSE; } ret = vga_waitevent(VGA_MOUSEEVENT | VGA_KEYEVENT, (fd_set*) 0, (fd_set*) 0, (fd_set*) 0, (struct timeval*) 0); VGAGL_cursorx = mouse_getx(); VGAGL_cursory = mouse_gety(); yinv = term->ymax - VGAGL_cursory; button = mouse_getbutton(); motion = (-1 != ge.mx && (VGAGL_cursorx != ge.mx || yinv != ge.my)); ge.mx = VGAGL_cursorx; ge.my = yinv; if (ret < 0) { /* error */ loop = FALSE; } if ((ret & VGA_MOUSEEVENT)) { if (button != lastbutton) { /* button changed (either pressed or released */ int button_changed; if (button) { /* button press event */ ge.type = GE_buttonpress; button_changed = button; } else { /* button release event */ button_changed = lastbutton; ge.type = GE_buttonrelease; } if (button_changed & MOUSE_LEFTBUTTON) ge.par1 = 1; else if (button_changed & MOUSE_MIDDLEBUTTON) ge.par1 = 2; else if (button_changed & MOUSE_RIGHTBUTTON) ge.par1 = 3; do_event(&ge); lastbutton = button; } if (motion) { /* fprintf(stderr, "(motion) VGAGL_cursorx, VGAGL_cursory = %d %d\n", VGAGL_cursorx, VGAGL_cursory); */ ge.type = GE_motion; do_event(&ge); VGAGL_update_cursor(VGAGL_cursorx, VGAGL_cursory); VGAGL_update_zoombox(VGAGL_cursorx, VGAGL_cursory); } } if (ret & VGA_KEYEVENT) { /* int c = vga_getch(); */ char* state = keyboard_getstate(); int mask = 0; int i; /* keyboard_translatekeys() */ if (state[SCANCODE_LEFTCONTROL] || state[SCANCODE_RIGHTCONTROL]) { mask |= Mod_Ctrl; } if (state[SCANCODE_LEFTALT] || state[SCANCODE_RIGHTALT]) { mask |= Mod_Alt; } if (state[SCANCODE_LEFTSHIFT] || state[SCANCODE_RIGHTSHIFT]) { mask |= Mod_Shift; } if (mask) { ge.type = GE_modifier; ge.par1 = mask; do_event(&ge); } else if (VGAGL_modifier_mask) { /* modifiers were released */ ge.type = GE_modifier; ge.par1 = 0; do_event(&ge); } VGAGL_modifier_mask = mask; for (i = 0; i < KEYTABLE_SIZE; i++) { if (state[i] && -1 != VGAGL_Keytable[i]) { if (' ' == VGAGL_Keytable[i] || 'q' == VGAGL_Keytable[i]) { loop = FALSE; break; } #ifdef VGAGL_DEBUGGING if (GP_KP_Delete == VGAGL_Keytable[i] && VGAGL_dump_file) { VGAGL_draw_cursor(VGAGL_last_cursorx, VGAGL_last_cursory); /* erase cursor */ VGAGL_write_dump_file(); VGAGL_draw_cursor(VGAGL_last_cursorx, VGAGL_last_cursory); /* draw cursor */ break; } #endif ge.type = GE_keypress; ge.par1 = VGAGL_Keytable[i]; ge.par2 = 0; do_event(&ge); } } } /* VGA_KEYEVENT */ } /* while(1) */ VGAGL_processing_graphics_events = FALSE; signal(SIGINT, VGAGL_old_handler); } /* VGAGL_graphics_on */ } TERM_PUBLIC void VGAGL_put_tmptext(int i, const char str[]) { int y = 0; int x; char* second; switch (i) { case 0: /* erase old text */ for (i = 0, y = 0, x = VGAGL_HCHAR; VGAGL_savedstr[i]; i++) { VGAGL_putc(x, Y(y), VGAGL_savedstr[i], 0, -1); x += VGAGL_HCHAR; } strcpy(VGAGL_savedstr, str); for (i = 0, y = 0, x = VGAGL_HCHAR; str[i]; i++) { VGAGL_putc(x, Y(y), str[i], 0, -1); x += VGAGL_HCHAR; } VGAGL_need_update = TRUE; break; case 1: case 2: --i; second = (char*) strchr(str, '\r'); if (second == NULL) { VGAGL_zoom.xstr[i][0] = '\0'; VGAGL_zoom.ystr[i][0] = '\0'; break; } *second = '\0'; /* XXX this assumes that str is writable XXX */ second++; /* if (VGAGL_zoombox_on) DrawBox(plot); */ strcpy(VGAGL_zoom.xstr[i], str); strcpy(VGAGL_zoom.ystr[i], second); /* if (plot->zoombox_on) DrawBox(plot); */ VGAGL_need_update = TRUE; break; } return; } TERM_PUBLIC void VGAGL_set_ruler(int x, int y) { if (x < 0) { /* erase last ruler */ VGAGL_hline_xor(0, vgagl_lastx, Y(VGAGL_ruler_y)); VGAGL_vline_xor(0, vgagl_lasty, VGAGL_ruler_x); VGAGL_ruler_x = -1; } else { VGAGL_ruler_x = x; VGAGL_ruler_y = y; VGAGL_hline_xor(0, vgagl_lastx, Y(VGAGL_ruler_y)); VGAGL_vline_xor(0, vgagl_lasty, VGAGL_ruler_x); } VGAGL_need_update = TRUE; return; } TERM_PUBLIC void VGAGL_set_cursor(int c, int x, int y) { /* VGA_FPRINTF((stderr, "(VGAGL_set_cursor) \n")); */ switch (c) { case -2: /* warp pointer */ /* TODO */ break; case -1: /* starting zoombox */ VGAGL_zoom.startx = x; VGAGL_zoom.starty = Y(y); VGAGL_zoom.currentx = VGAGL_zoom.startx; VGAGL_zoom.currenty = VGAGL_zoom.starty; VGAGL_zoombox(VGAGL_zoom.currentx, VGAGL_zoom.currenty); break; case 0: /* standard cross-hair cursor */ if (VGAGL_zoom.startx >= 0) { VGAGL_zoombox(VGAGL_zoom.currentx, VGAGL_zoom.currenty); VGAGL_zoom.startx = -1; /* turn zoom box off */ } break; case 1: /* cursor during rotation */ /* TODO */ break; case 2: /* cursor during scaling */ /* TODO */ break; case 3: /* cursor during zooming */ /* TODO */ break; default: fprintf(stderr, "(VGAGL_set_cursor) %s:%d protocol error\n", __FILE__, __LINE__); break; } return; } TERM_PUBLIC void VGAGL_set_clipboard(const char s[]) { (void) s; /* avoid -Wunused */ return; /* does nothing. */ } TERM_PUBLIC int VGAGL_make_palette(t_sm_palette *palette) { /* only reallocate colors, if the color spec has changed */ if (palette && (VGAGL_save_pal.colorFormulae < 0 || palette->colorFormulae != VGAGL_save_pal.colorFormulae || palette->colorMode != VGAGL_save_pal.colorMode || palette->formulaR != VGAGL_save_pal.formulaR || palette->formulaG != VGAGL_save_pal.formulaG || palette->formulaB != VGAGL_save_pal.formulaB || palette->positive != VGAGL_save_pal.positive)) { int i, j; #ifdef VGAGL_ENABLE_TRUECOLOR switch (VGAGL_truecolor) { case TRUE: for (i = 0; i <= VGAGL_tri_colors; i++) { VGAGL_cmap[i] = gl_rgbcolor ((int)floor(palette->color[i].r * 255.999), (int)floor(palette->color[i].g * 255.999), (int)floor(palette->color[i].b * 255.999)); gl_trisetcolorlookup(i, VGAGL_cmap[i]); } break; default: #endif for (j = 0, i = pm3d_color_offset; i <= 0xff; i++, j++) { VGAGL_setpalettecolor(i, palette->color[j].r, palette->color[j].g, palette->color[j].b); } #ifdef VGAGL_ENABLE_TRUECOLOR } #endif VGAGL_save_pal = *palette; return 0; } else { return VGAGL_pm3d_colors; } } /* set color for subsequent VGAGL_filled_polygon() calls. */ TERM_PUBLIC void VGAGL_set_color(t_colorspec *colorspec) { int color; double gray = colorspec->value; if (colorspec->type != TC_FRAC) return; /* Note that the gray value is supplied for each vertex. * This is only for routines which don't draw interpolated * triangles. These routines should supply a negative * valued as corners[0].spec.gray, if they really want * this color to be taken. */ color = (gray <= 0) ? 0 : (int)(gray * VGAGL_pm3d_colors); if (color >= VGAGL_pm3d_colors) color = VGAGL_pm3d_colors_; current_color = pm3d_color_offset + color; VGAGL_gray = gray; } TERM_PUBLIC void VGAGL_filled_polygon(int points, gpiPoint *corners) { int i; int y[4]; if (4 != points) { fprintf(stderr, "(VGAGL_filled_polygon) can only plot with 4 points\n"); return; } if (!VGAGL_interpolate || corners[0].spec.gray < 0) { /* draw a solid colored triangle */ int color; double gray = 0; #if 0 fprintf(stderr, "(VGAGL_filled_polygon) gray = %f\n", corners[0].spec.gray); #endif if (corners[0].spec.gray < 0) { for (i = 0; i < 4; i++) { y[i] = Y(corners[i].y); } gray = VGAGL_gray; } else { for (i = 0; i < 4; i++) { y[i] = Y(corners[i].y); gray += corners[0].spec.gray; } gray *= 0.25; } #ifdef VGAGL_ENABLE_TRUECOLOR switch (VGAGL_truecolor) { case TRUE: /* TODO: this does not work */ color = VGAGL_line_cmap[(int)(gray * VGAGL_pm3d_colors_)]; break; default: #endif color = pm3d_color_offset + (int)(gray * VGAGL_pm3d_colors_); #ifdef VGAGL_ENABLE_TRUECOLOR } #endif gl_striangle(corners[0].x, y[0], corners[1].x, y[1], corners[2].x, y[2], color, -1); gl_striangle(corners[2].x, y[2], corners[3].x, y[3], corners[0].x, y[0], color, -1); } else { /* draw color interpolated triangle */ int color[4]; #ifdef VGAGL_ENABLE_TRUECOLOR switch (VGAGL_truecolor) { case TRUE: for (i = 0; i < 4; i++) { y[i] = Y(corners[i].y); color[i] = (int)(corners[i].spec.gray * VGAGL_pm3d_colors_); } break; default: #endif for (i = 0; i < 4; i++) { y[i] = Y(corners[i].y); color[i] = pm3d_color_offset + (int)(corners[i].spec.gray * VGAGL_pm3d_colors_); } #ifdef VGAGL_ENABLE_TRUECOLOR } #endif gl_triangle (corners[0].x, y[0], color[0], corners[1].x, y[1], color[1], corners[2].x, y[2], color[2], -1); gl_triangle (corners[2].x, y[2], color[2], corners[3].x, y[3], color[3], corners[0].x, y[0], color[0], -1); } } #ifdef VGAGL_DEBUGGING void VGAGL_write_dump_file() { FILE* fp; unsigned char* buf; unsigned char* bufptr; int x, y, index; char thisfile[0xff]; static int thisfileno = 0; if (!VGAGL_dump_file) { return; } sprintf(thisfile, "%s%05d.ppm", VGAGL_dump_file, thisfileno++); fp = fopen(thisfile, "w"); if (!fp) { free(VGAGL_dump_file); VGAGL_dump_file = 0; } fprintf(fp, "P6\n"); fprintf(fp, "%d %d\n", modeinfo->width, modeinfo->height); fprintf(fp, "255\n"); buf = gp_alloc(modeinfo->width * modeinfo->height * 3, "vgagl->buf"); bufptr = buf; for (y = 0; y < modeinfo->height; y++) { for (x = 0; x < modeinfo->width; x++) { index = gl_getpixel(x, y); while (index < 0) { /* this is a kludge, as gl_getpixel() seems to * return pixels > 128 as the negative complement */ index += 256; } *bufptr++ = VGAGL_palette[index][0]; *bufptr++ = VGAGL_palette[index][1]; *bufptr++ = VGAGL_palette[index][2]; } } fwrite(buf, 3, modeinfo->width * modeinfo->height, fp); fclose(fp); } #endif #undef Y #endif #ifdef TERM_TABLE TERM_TABLE_START(vgagl_driver) "vgagl", "vgagl driver with mouse support and smooth colors", VGAGL_XMAX, VGAGL_YMAX, VGAGL_VCHAR, VGAGL_HCHAR, VGAGL_VTIC, VGAGL_HTIC, VGAGL_options, VGAGL_init, VGAGL_reset, VGAGL_text, null_scale, VGAGL_graphics, VGAGL_move, VGAGL_vector, VGAGL_linetype, VGAGL_put_text, VGAGL_text_angle, null_justify_text, do_point, do_arrow, set_font_null, 0, /* pointsize */ TERM_CAN_MULTIPLOT, VGAGL_suspend, VGAGL_resume , 0, 0 /* fillbox, linewidth */ # ifdef USE_MOUSE , 0 /* VGAGL_waitforinput */, VGAGL_put_tmptext, VGAGL_set_ruler, VGAGL_set_cursor, VGAGL_set_clipboard # endif , VGAGL_make_palette, 0 /* VGAGL_previous_palette */, VGAGL_set_color, VGAGL_filled_polygon TERM_TABLE_END(vgagl_driver) #undef LAST_TERM #define LAST_TERM vgagl_driver #endif #ifdef TERM_HELP START_HELP(vgagl) "1 vgagl", "?commands set terminal vgagl", "?set terminal vgagl", "?set term vgagl", "?terminal vgagl", "?term vgagl", "?vgagl", " The `vgagl` driver is a fast linux console driver with full mouse and pm3d", " support. It looks at the environment variable SVGALIB_DEFAULT_MODE for the", " default mode; if not set, it uses a 256 color mode with the highest", " available resolution.", "", " Syntax:", " set terminal vgagl \\", " background [red] [[green] [blue]] \\", " [uniform | interpolate] \\", #if 0 " [dump \"file\"] \\", #endif " [mode]", "", " The color mode can also be given with the mode option. Both Symbolic", " names as G1024x768x256 and integers are allowed. The `background` option", " takes either one or three integers in the range [0, 255]. If only one", " integers is supplied, it is taken as gray value for the background.", " If three integers are present, the background gets the corresponding", " color.", " The (mutually exclusive) options `interpolate` and `uniform` control", " if color interpolation is done while drawing triangles (on by default).", #if 0 "", " A `screen dump file` can be specified with the `dump \"file\"` option.", " If this option is present, (i.e the dump file name is not empty) pressing", " the key KP_Delete will write the file. This action cannot and cannot be", " rebound. The file is written in raw ppm (P6) format. Note that this option", " is reset each time the `set term` command is issued.", #endif "", " To get high resolution modes, you will probably have to modify the", " configuration file of libvga, usually /etc/vga/libvga.conf. Using", " the VESA fb is a good choice, but this needs to be compiled in the", " kernel.", "", " The vgagl driver uses the first *available* vga mode from the following list:", " - the driver which was supplied when setting vgagl, e.g. `set term vgagl", " G1024x768x256` would first check, if the G1024x768x256 mode is available.", " - the environment variable SVGALIB_DEFAULT_MODE", " - G1024x768x256", " - G800x600x256", " - G640x480x256", " - G320x200x256", " - G1280x1024x256", " - G1152x864x256", " - G1360x768x256", " - G1600x1200x256", "" END_HELP(vgagl) #endif #endif /* defined(USE_MOUSE) */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/linux.trm������������������������������������������������������������������������0000644�0004711�0000144�00000041324�11711570362�012772� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: linux.trm,v 1.30.2.1 2012/01/30 19:34:25 sfeam Exp $ * */ /* GNUPLOT - linux.trm */ /*[ * Copyright 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * SVGA up to 1024x768x256 for PC's running the Linux Operating System * (also VGA 640x480x16, and SVGA 800x600x256) * * AUTHOR * Scott Heavner (sdh@po.cwru.edu) * based on original linux.trm by Tommy Frandsen (frandsen@diku.dk) * patched by David J. Liu (liu@molecule.phri.nyu.edu) * to increase perfomance and safety based on the features of SVGALib/GL. * send your comments or suggestions to (pixar!info-gnuplot@sun.com). */ /* * Compile with Linux SVGAlib 0.95 currently maintained by * Harm Hanemaayer (hhanemaa@cs.ruu.nl). * supports Trident, Tseng, Cirrus, Oak and generic vga. */ #include "driver.h" /* * January 2012 (Gnuplot version 4.6) * This font used to be imported from bitmap.c, which is no longer built * by default. */ #ifndef FNT5X9 #define FNT5X9 0 #define FNT5X9_VCHAR 11 /* vertical spacing between characters */ #define FNT5X9_VBITS 9 /* actual number of rows of bits per char */ #define FNT5X9_HCHAR 7 /* horizontal spacing between characters */ #define FNT5X9_HBITS 5 /* actual number of bits per row per char */ #ifndef TERM_HELP /* 5x9 font, bottom row first, left pixel in lsb */ const unsigned int fnt5x9[96][FNT5X9_VBITS] = { /* */ {000000,000000,000000,000000,000000,000000,000000,000000,000000}, /*!*/ {000000,000000,0x0004,000000,0x0004,0x0004,0x0004,0x0004,0x0004}, /*"*/ {000000,000000,000000,000000,000000,000000,0x000a,0x000a,0x000a}, /*#*/ {000000,000000,0x000a,0x000a,0x001f,0x000a,0x001f,0x000a,0x000a}, /*$*/ {000000,000000,0x0004,0x000f,0x0014,0x000e,0x0005,0x001e,0x0004}, /*%*/ {000000,000000,0x0018,0x0019,0x0002,0x0004,0x0008,0x0013,0x0003}, /*&*/ {000000,000000,0x0016,0x0009,0x0015,0x0002,0x0005,0x0005,0x0002}, /*'*/ {000000,000000,000000,000000,000000,0x0002,0x0004,0x0006,0x0006}, /*(*/ {000000,000000,0x0008,0x0004,0x0002,0x0002,0x0002,0x0004,0x0008}, /*)*/ {000000,000000,0x0002,0x0004,0x0008,0x0008,0x0008,0x0004,0x0002}, /***/ {000000,000000,0x0004,0x0015,0x000e,0x001f,0x000e,0x0015,0x0004}, /*+*/ {000000,000000,000000,0x0004,0x0004,0x001f,0x0004,0x0004,000000}, /*,*/ {000000,0x0002,0x0004,0x0006,0x0006,000000,000000,000000,000000}, /*-*/ {000000,000000,000000,000000,000000,0x001f,000000,000000,000000}, /*.*/ {000000,000000,0x0006,0x0006,000000,000000,000000,000000,000000}, /*-/-*/{000000,000000,000000,0x0001,0x0002,0x0004,0x0008,0x0010,000000}, /*0*/ {000000,000000,0x000e,0x0011,0x0013,0x0015,0x0019,0x0011,0x000e}, /*1*/ {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0006,0x0004}, /*2*/ {000000,000000,0x001f,0x0001,0x0001,0x000e,0x0010,0x0011,0x000e}, /*3*/ {000000,000000,0x000e,0x0011,0x0010,0x000c,0x0010,0x0011,0x000e}, /*4*/ {000000,000000,0x0008,0x0008,0x001f,0x0009,0x000a,0x000c,0x0008}, /*5*/ {000000,000000,0x000e,0x0011,0x0010,0x0010,0x000f,0x0001,0x001f}, /*6*/ {000000,000000,0x000e,0x0011,0x0011,0x000f,0x0001,0x0002,0x000c}, /*7*/ {000000,000000,0x0001,0x0001,0x0002,0x0004,0x0008,0x0010,0x001f}, /*8*/ {000000,000000,0x000e,0x0011,0x0011,0x000e,0x0011,0x0011,0x000e}, /*9*/ {000000,000000,0x0006,0x0008,0x0010,0x001e,0x0011,0x0011,0x000e}, /*:*/ {000000,000000,000000,0x0006,0x0006,000000,0x0006,0x0006,000000}, /*;*/ {000000,0x0001,0x0002,0x0006,0x0006,000000,0x0006,0x0006,000000}, /*<*/ {000000,000000,0x0008,0x0004,0x0002,0x0001,0x0002,0x0004,0x0008}, /*=*/ {000000,000000,000000,000000,0x001f,000000,0x001f,000000,000000}, /*>*/ {000000,000000,0x0002,0x0004,0x0008,0x0010,0x0008,0x0004,0x0002}, /*?*/ {000000,000000,0x0004,000000,0x0004,0x0008,0x0010,0x0011,0x000e}, /*@*/ {000000,000000,0x000e,0x0015,0x0015,0x0016,0x0010,0x0011,0x000e}, /*A*/ {000000,000000,0x0011,0x0011,0x001f,0x0011,0x0011,0x000a,0x0004}, /*B*/ {000000,000000,0x000f,0x0012,0x0012,0x000e,0x0012,0x0012,0x000f}, /*C*/ {000000,000000,0x000e,0x0011,0x0001,0x0001,0x0001,0x0011,0x000e}, /*D*/ {000000,000000,0x000f,0x0012,0x0012,0x0012,0x0012,0x0012,0x000f}, /*E*/ {000000,000000,0x001f,0x0001,0x0001,0x0007,0x0001,0x0001,0x001f}, /*F*/ {000000,000000,0x0001,0x0001,0x0001,0x0007,0x0001,0x0001,0x001f}, /*G*/ {000000,000000,0x001e,0x0011,0x0011,0x0019,0x0001,0x0001,0x001e}, /*H*/ {000000,000000,0x0011,0x0011,0x0011,0x001f,0x0011,0x0011,0x0011}, /*I*/ {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0004,0x000e}, /*J*/ {000000,000000,0x000e,0x0011,0x0010,0x0010,0x0010,0x0010,0x0010}, /*K*/ {000000,000000,0x0011,0x0009,0x0005,0x0003,0x0005,0x0009,0x0011}, /*L*/ {000000,000000,0x001f,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001}, /*M*/ {000000,000000,0x0011,0x0011,0x0011,0x0015,0x0015,0x001b,0x0011}, /*N*/ {000000,000000,0x0011,0x0011,0x0011,0x0019,0x0015,0x0013,0x0011}, /*O*/ {000000,000000,0x000e,0x0011,0x0011,0x0011,0x0011,0x0011,0x000e}, /*P*/ {000000,000000,0x0001,0x0001,0x0001,0x000f,0x0011,0x0011,0x000f}, /*Q*/ {000000,0x0018,0x000e,0x0015,0x0011,0x0011,0x0011,0x0011,0x000e}, /*R*/ {000000,000000,0x0011,0x0009,0x0005,0x000f,0x0011,0x0011,0x000f}, /*S*/ {000000,000000,0x000e,0x0011,0x0010,0x000e,0x0001,0x0011,0x000e}, /*T*/ {000000,000000,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x001f}, /*U*/ {000000,000000,0x000e,0x0011,0x0011,0x0011,0x0011,0x0011,0x0011}, /*V*/ {000000,000000,0x0004,0x0004,0x000a,0x000a,0x0011,0x0011,0x0011}, /*W*/ {000000,000000,0x0011,0x001b,0x0015,0x0011,0x0011,0x0011,0x0011}, /*X*/ {000000,000000,0x0011,0x0011,0x000a,0x0004,0x000a,0x0011,0x0011}, /*Y*/ {000000,000000,0x0004,0x0004,0x0004,0x0004,0x000a,0x0011,0x0011}, /*Z*/ {000000,000000,0x001f,0x0001,0x0002,0x0004,0x0008,0x0010,0x001f}, /*[*/ {000000,000000,0x000e,0x0002,0x0002,0x0002,0x0002,0x0002,0x000e}, /*\ */ {000000,000000,000000,0x0010,0x0008,0x0004,0x0002,0x0001,000000}, /*]*/ {000000,000000,0x000e,0x0008,0x0008,0x0008,0x0008,0x0008,0x000e}, /*^*/ {000000,000000,000000,000000,000000,000000,0x0011,0x000a,0x0004}, /*_*/ {000000,000000,0x001f,000000,000000,000000,000000,000000,000000}, /*`*/ {000000,000000,000000,000000,000000,0x0008,0x0004,0x000c,0x000c}, /*a*/ {000000,000000,0x001e,0x0011,0x001e,0x0010,0x000e,000000,000000}, /*b*/ {000000,000000,0x000d,0x0013,0x0011,0x0013,0x000d,0x0001,0x0001}, /*c*/ {000000,000000,0x000e,0x0011,0x0001,0x0011,0x000e,000000,000000}, /*d*/ {000000,000000,0x0016,0x0019,0x0011,0x0019,0x0016,0x0010,0x0010}, /*e*/ {000000,000000,0x000e,0x0001,0x001f,0x0011,0x000e,000000,000000}, /*f*/ {000000,000000,0x0004,0x0004,0x0004,0x000e,0x0004,0x0014,0x0008}, /*g*/ {0x000e,0x0011,0x0016,0x0019,0x0011,0x0019,0x0016,000000,000000}, /*h*/ {000000,000000,0x0011,0x0011,0x0011,0x0013,0x000d,0x0001,0x0001}, /*i*/ {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0006,000000,0x0004}, /*j*/ {0x0006,0x0009,0x0008,0x0008,0x0008,0x0008,0x000c,000000,0x0008}, /*k*/ {000000,000000,0x0009,0x0005,0x0003,0x0005,0x0009,0x0001,0x0001}, /*l*/ {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0004,0x0006}, /*m*/ {000000,000000,0x0015,0x0015,0x0015,0x0015,0x000b,000000,000000}, /*n*/ {000000,000000,0x0011,0x0011,0x0011,0x0013,0x000d,000000,000000}, /*o*/ {000000,000000,0x000e,0x0011,0x0011,0x0011,0x000e,000000,000000}, /*p*/ {0x0001,0x0001,0x000d,0x0013,0x0011,0x0013,0x000d,000000,000000}, /*q*/ {0x0010,0x0010,0x0016,0x0019,0x0011,0x0019,0x0016,000000,000000}, /*r*/ {000000,000000,0x0001,0x0001,0x0001,0x0013,0x000d,000000,000000}, /*s*/ {000000,000000,0x000f,0x0010,0x000e,0x0001,0x001e,000000,000000}, /*t*/ {000000,000000,0x0008,0x0014,0x0004,0x0004,0x001f,0x0004,0x0004}, /*u*/ {000000,000000,0x0016,0x0019,0x0011,0x0011,0x0011,000000,000000}, /*v*/ {000000,000000,0x0004,0x000a,0x0011,0x0011,0x0011,000000,000000}, /*w*/ {000000,000000,0x000a,0x0015,0x0015,0x0011,0x0011,000000,000000}, /*x*/ {000000,000000,0x0011,0x000a,0x0004,0x000a,0x0011,000000,000000}, /*y*/ {0x000e,0x0010,0x001e,0x0011,0x0011,0x0011,0x0011,000000,000000}, /*z*/ {000000,000000,0x001f,0x0002,0x0004,0x0008,0x001f,000000,000000}, /*{*/ {000000,000000,0x0008,0x0004,0x0004,0x0002,0x0004,0x0004,0x0008}, /*|*/ {000000,000000,0x0004,0x0004,0x0004,000000,0x0004,0x0004,0x0004}, /*}*/ {000000,000000,0x0002,0x0004,0x0004,0x0008,0x0004,0x0004,0x0002}, /*~*/ {000000,000000,000000,000000,000000,000000,0x0008,0x0015,0x0002}, /*DEL*/{000000,000000,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f}, }; #endif /* TERM_HELP */ #endif /* local copy of 5x9 font */ #ifdef TERM_REGISTER register_term(linux) #endif #ifdef TERM_PROTO #define LINUX_VCHAR FNT5X9_VCHAR #define LINUX_HCHAR FNT5X9_HCHAR #define LINUX_VTIC 5 #define LINUX_HTIC 5 #define LINUX_XMAX 0 /* These two entries are just place holders. */ #define LINUX_YMAX 0 /* The actual values will be filled in init. */ TERM_PUBLIC void LINUX_options __PROTO((void)); TERM_PUBLIC void LINUX_init __PROTO((void)); TERM_PUBLIC void LINUX_reset __PROTO((void)); TERM_PUBLIC void LINUX_text __PROTO((void)); TERM_PUBLIC void LINUX_graphics __PROTO((void)); TERM_PUBLIC void LINUX_linetype __PROTO((int linetype)); TERM_PUBLIC void LINUX_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void LINUX_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC int LINUX_text_angle __PROTO((int ang)); TERM_PUBLIC void LINUX_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void LINUX_suspend __PROTO((void)); TERM_PUBLIC void LINUX_resume __PROTO((void)); /* also used in vgagl.trm, so export it: */ TERM_PUBLIC int LINUX_graphics_allowed; #endif #ifdef TERM_BODY #define _STRING_H_ #include <vga.h> static int linux_vmode = G1024x768x256; /* default mode */ static int vgacolor[] = { 7, 8, 2, 3, 4, 5, 9, 14, 12, 15, 13, 10, 11, 1, 6 }; static int graphics_on = FALSE; static vga_modeinfo *modeinfo; static int linux_startx, linux_starty, linux_lasty; static int linux_angle; TERM_PUBLIC int LINUX_graphics_allowed = FALSE; /* also used in vgagl.trm */ extern void drop_privilege __PROTO((void)); extern void take_privilege __PROTO((void)); typedef int (*linux_line_func_ptr) __PROTO((int x1, int y1, int x2, int y2)); static void LINUX_putc __PROTO((unsigned int x, unsigned int y, int c, int ang, linux_line_func_ptr line_func)); /* this function is called at the very beginning of main() to initialize * the vgalib and to revoke suid privileges. * /dev/console and /dev/tty\d and /dev/vc/\d are considered graphic terminals, all other * don't support the linux terminal */ void LINUX_setup() { char line[256]; FILE *pipe; LINUX_graphics_allowed = FALSE; if (geteuid() != 0) return; /* if we aren't root, we cannot init graphics */ if ((pipe = popen("/usr/bin/tty", "r")) != NULL) { line[0] = 0; fgets(line, 256, pipe); pclose(pipe); line[strlen(line) - 1] = '\0'; if ( strcmp(line, "/dev/console") == 0 || ( ( strncmp(line, "/dev/tty", 8) == 0 || strncmp(line, "/dev/vc/", 8) == 0 ) && isdigit((unsigned char) line[8])) ) { LINUX_graphics_allowed = TRUE; } else { /* check for socket name as set for example by `screen' */ char* sty = getenv("STY"); if (sty) { int n1, n2; if (3 == sscanf(sty, "%d.tty%d.%s", &n1, &n2, line)) { /* we could check here, if host is the * same as gethostname() returns. */ LINUX_graphics_allowed = TRUE; } } } } if (LINUX_graphics_allowed) { take_privilege(); vga_init(); drop_privilege(); } else { /* err - shouldn't we give up root uid whatever happens ? * or perhaps vga_init() does it ? */ setuid(getuid()); } } TERM_PUBLIC void LINUX_options() { if (!LINUX_graphics_allowed) { int_error(NO_CARET, "Linux terminal driver not available"); } fprintf(stderr, "%s\n", vga_getmodename(linux_vmode)); } TERM_PUBLIC void LINUX_init() { /* vga_init () has been moved to immediately after main () for security */ if (vga_getdefaultmode() != -1) linux_vmode = vga_getdefaultmode(); /* get the default mode from GSVGAMODE, if available */ if (!vga_hasmode(linux_vmode)) linux_vmode = G640x480x16; /* test default mode first */ if (!vga_hasmode(linux_vmode)) { fputs("Error, unable to initiate graphics.\n", stderr); return; } /* this mode is the bottom line */ modeinfo = vga_getmodeinfo(linux_vmode); term->xmax = modeinfo->width; term->ymax = modeinfo->height; linux_lasty = modeinfo->height - 1; } TERM_PUBLIC void LINUX_reset() { if (graphics_on) { vga_setmode(TEXT); graphics_on = FALSE; } } TERM_PUBLIC void LINUX_text() { if (graphics_on) { vga_getch(); vga_setmode(TEXT); graphics_on = FALSE; } } TERM_PUBLIC void LINUX_graphics() { if (!graphics_on) { vga_setmode(linux_vmode); graphics_on = TRUE; } } TERM_PUBLIC void LINUX_suspend() { vga_flip(); } TERM_PUBLIC void LINUX_resume() { vga_flip(); } TERM_PUBLIC void LINUX_linetype(int linetype) { if (linetype < -2) linetype = LT_BLACK; if (linetype >= 13) linetype %= 13; vga_setegacolor(vgacolor[linetype + 2]); } TERM_PUBLIC void LINUX_move(unsigned int x, unsigned int y) { linux_startx = x; linux_starty = y; } TERM_PUBLIC void LINUX_vector(unsigned int x, unsigned int y) { vga_drawline(linux_startx, linux_lasty - linux_starty, x, linux_lasty - y); linux_startx = x; linux_starty = y; } TERM_PUBLIC int LINUX_text_angle(int ang) { linux_angle = (ang ? 1 : 0); return TRUE; } static void LINUX_putc( unsigned int x, unsigned int y, int c, int ang, linux_line_func_ptr line_func) { int i, j, k; unsigned int pixelon; i = (int) (c) - 32; for (j = 0; j < FNT5X9_VBITS; j++) { for (k = 0; k < FNT5X9_HBITS; k++) { pixelon = (((unsigned int) (fnt5x9[i][j])) >> k & 1); if (pixelon) { switch (ang) { case 0: (*line_func) (x + k + 1, y - j, x + k + 1, y - j); break; case 1: (*line_func) (x - j, y - k - 1, x - j, y - k - 1); break; } } } } } TERM_PUBLIC void LINUX_put_text(unsigned int x, unsigned int y, const char *str) { int i; switch (linux_angle) { case 0: y -= LINUX_VCHAR / 2; break; case 1: x += LINUX_VCHAR / 2; break; } for (i = 0; str[i]; i++) { LINUX_putc(x, linux_lasty - y, str[i], linux_angle, vga_drawline); switch (linux_angle) { case 0: x += LINUX_HCHAR; break; case 1: y += LINUX_HCHAR; break; } } } #endif #ifdef TERM_TABLE TERM_TABLE_START(linux_driver) "linux", "Linux PC with (s)vgalib", LINUX_XMAX, LINUX_YMAX, LINUX_VCHAR, LINUX_HCHAR, LINUX_VTIC, LINUX_HTIC, LINUX_options, LINUX_init, LINUX_reset, LINUX_text, null_scale, LINUX_graphics, LINUX_move, LINUX_vector, LINUX_linetype, LINUX_put_text, LINUX_text_angle, null_justify_text, do_point, do_arrow, set_font_null, 0, /* pointsize */ TERM_CAN_MULTIPLOT, LINUX_suspend, LINUX_resume TERM_TABLE_END(linux_driver) #undef LAST_TERM #define LAST_TERM linux_driver #endif #ifdef TERM_HELP START_HELP(linux) "1 linux", "?commands set terminal linux", "?set terminal linux", "?set term linux", "?terminal linux", "?term linux", "?linux", " The `linux` driver has no additional options to specify. It looks at the", " environment variable GSVGAMODE for the default mode; if not set, it uses", " 1024x768x256 as default mode or, if that is not possible, 640x480x16", " (standard VGA)." END_HELP(linux) #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/js/������������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�011500� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/js/gnuplot_mouse.js��������������������������������������������������������������0000644�0004711�0000144�00000041305�11630556345�014765� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: gnuplot_mouse.js,v 1.16 2011/09/04 02:05:25 sfeam Exp $ */ gnuplot.mouse_version = "03 September 2011"; // Mousing code for use with gnuplot's 'canvas' terminal driver. // The functions defined here assume that the javascript plot produced by // gnuplot initializes the plot boundary and scaling parameters. gnuplot.mousex = 0; gnuplot.mousey = 0; gnuplot.plotx = 0; gnuplot.ploty = 0; gnuplot.scaled_x = 0; gnuplot.scaled_y = 0; // These will be initialized by the gnuplot canvas-drawing function gnuplot.plot_xmin = 0; gnuplot.plot_xmax = 0; gnuplot.plot_ybot = 0; gnuplot.plot_ytop = 0; gnuplot.plot_width = 0 gnuplot.plot_height = 0 gnuplot.plot_term_ymax = 0; gnuplot.plot_axis_xmin = 0; gnuplot.plot_axis_xmax = 0; gnuplot.plot_axis_width = 0; gnuplot.plot_axis_height = 0; gnuplot.plot_axis_ymin = 0; gnuplot.plot_axis_ymax = 0; gnuplot.plot_axis_x2min = "none"; gnuplot.plot_axis_y2min = "none"; gnuplot.plot_logaxis_x = 0; gnuplot.plot_logaxis_y = 0; gnuplot.grid_lines = true; gnuplot.zoom_text = false; // These are the equivalent parameters while zooming gnuplot.zoom_axis_xmin = 0; gnuplot.zoom_axis_xmax = 0; gnuplot.zoom_axis_ymin = 0; gnuplot.zoom_axis_ymax = 0; gnuplot.zoom_axis_x2min = 0; gnuplot.zoom_axis_x2max = 0; gnuplot.zoom_axis_y2min = 0; gnuplot.zoom_axis_y2max = 0; gnuplot.zoom_axis_width = 0; gnuplot.zoom_axis_height = 0; gnuplot.zoom_temp_xmin = 0; gnuplot.zoom_temp_ymin = 0; gnuplot.zoom_temp_x2min = 0; gnuplot.zoom_temp_y2min = 0; gnuplot.zoom_in_progress = false; gnuplot.full_canvas_image = null; gnuplot.axisdate = new Date(); gnuplot.init = function () { if (document.getElementById("gnuplot_canvas")) document.getElementById("gnuplot_canvas").onmousemove = gnuplot.mouse_update; if (document.getElementById("gnuplot_canvas")) document.getElementById("gnuplot_canvas").onmouseup = gnuplot.zoom_in; if (document.getElementById("gnuplot_canvas")) document.getElementById("gnuplot_canvas").onmousedown = gnuplot.saveclick; if (document.getElementById("gnuplot_canvas")) document.getElementById("gnuplot_canvas").onkeydown = gnuplot.do_hotkey; if (document.getElementById("gnuplot_grid_icon")) document.getElementById("gnuplot_grid_icon").onmouseup = gnuplot.toggle_grid; if (document.getElementById("gnuplot_textzoom_icon")) document.getElementById("gnuplot_textzoom_icon").onmouseup = gnuplot.toggle_zoom_text; if (document.getElementById("gnuplot_rezoom_icon")) document.getElementById("gnuplot_rezoom_icon").onmouseup = gnuplot.rezoom; if (document.getElementById("gnuplot_unzoom_icon")) document.getElementById("gnuplot_unzoom_icon").onmouseup = gnuplot.unzoom; gnuplot.mouse_update(); } gnuplot.getMouseCoordsWithinTarget = function(event) { var coords = { x: 0, y: 0}; if(!event) // then we're in a non-DOM (probably IE) browser { event = window.event; if (event) { coords.x = event.offsetX; coords.y = event.offsetY; } } else // we assume DOM modeled javascript { var Element = event.target ; var CalculatedTotalOffsetLeft = 0; var CalculatedTotalOffsetTop = 0 ; while (Element.offsetParent) { CalculatedTotalOffsetLeft += Element.offsetLeft ; CalculatedTotalOffsetTop += Element.offsetTop ; Element = Element.offsetParent ; } coords.x = event.pageX - CalculatedTotalOffsetLeft ; coords.y = event.pageY - CalculatedTotalOffsetTop ; } gnuplot.mousex = coords.x; gnuplot.mousey = coords.y; } gnuplot.mouse_update = function(e) { gnuplot.getMouseCoordsWithinTarget(e); gnuplot.plotx = gnuplot.mousex - gnuplot.plot_xmin; gnuplot.ploty = -(gnuplot.mousey - gnuplot.plot_ybot); // Limit tracking to the interior of the plot if (gnuplot.plotx < 0 || gnuplot.ploty < 0) return; if (gnuplot.mousex > gnuplot.plot_xmax || gnuplot.mousey < gnuplot.plot_ytop) return; var axis_xmin = (gnuplot.zoomed) ? gnuplot.zoom_axis_xmin : gnuplot.plot_axis_xmin; var axis_xmax = (gnuplot.zoomed) ? gnuplot.zoom_axis_xmax : gnuplot.plot_axis_xmax; var axis_ymin = (gnuplot.zoomed) ? gnuplot.zoom_axis_ymin : gnuplot.plot_axis_ymin; var axis_ymax = (gnuplot.zoomed) ? gnuplot.zoom_axis_ymax : gnuplot.plot_axis_ymax; if (gnuplot.plot_logaxis_x != 0) { x = Math.log(axis_xmax) - Math.log(axis_xmin); x = x * (gnuplot.plotx / (gnuplot.plot_xmax-gnuplot.plot_xmin)) + Math.log(axis_xmin); x = Math.exp(x); } else { x = axis_xmin + (gnuplot.plotx / (gnuplot.plot_xmax-gnuplot.plot_xmin)) * (axis_xmax - axis_xmin); } if (gnuplot.plot_logaxis_y != 0) { y = Math.log(axis_ymax) - Math.log(axis_ymin); y = y * (-gnuplot.ploty / (gnuplot.plot_ytop-gnuplot.plot_ybot)) + Math.log(axis_ymin); y = Math.exp(y); } else { y = axis_ymin - (gnuplot.ploty / (gnuplot.plot_ytop-gnuplot.plot_ybot)) * (axis_ymax - axis_ymin); } if (gnuplot.plot_axis_x2min != "none") { gnuplot.axis_x2min = (gnuplot.zoomed) ? gnuplot.zoom_axis_x2min : gnuplot.plot_axis_x2min; gnuplot.axis_x2max = (gnuplot.zoomed) ? gnuplot.zoom_axis_x2max : gnuplot.plot_axis_x2max; x2 = gnuplot.axis_x2min + (gnuplot.plotx / (gnuplot.plot_xmax-gnuplot.plot_xmin)) * (gnuplot.axis_x2max - gnuplot.axis_x2min); if (document.getElementById(gnuplot.active_plot_name + "_x2")) document.getElementById(gnuplot.active_plot_name + "_x2").innerHTML = x2.toPrecision(4); } if (gnuplot.plot_axis_y2min != "none") { gnuplot.axis_y2min = (gnuplot.zoomed) ? gnuplot.zoom_axis_y2min : gnuplot.plot_axis_y2min; gnuplot.axis_y2max = (gnuplot.zoomed) ? gnuplot.zoom_axis_y2max : gnuplot.plot_axis_y2max; y2 = gnuplot.axis_y2min - (gnuplot.ploty / (gnuplot.plot_ytop-gnuplot.plot_ybot)) * (gnuplot.axis_y2max - gnuplot.axis_y2min); if (document.getElementById(gnuplot.active_plot_name + "_y2")) document.getElementById(gnuplot.active_plot_name + "_y2").innerHTML = y2.toPrecision(4); } if (gnuplot.polar_mode) { polar = gnuplot.convert_to_polar(x,y); label_x = "ang= " + polar.ang.toPrecision(4); label_y = "R= " + polar.r.toPrecision(4); } else if (typeof(gnuplot.plot_timeaxis_x) == "string" && gnuplot.plot_timeaxis_x != "") { label_x = gnuplot.timefmt(x); label_y = y.toPrecision(4); } else { label_x = x.toPrecision(4); label_y = y.toPrecision(4); } if (document.getElementById(gnuplot.active_plot_name + "_x")) document.getElementById(gnuplot.active_plot_name + "_x").innerHTML = label_x; if (document.getElementById(gnuplot.active_plot_name + "_y")) document.getElementById(gnuplot.active_plot_name + "_y").innerHTML = label_y; // Echo the zoom box interactively if (gnuplot.zoom_in_progress) { // Clear previous box before drawing a new one if (gnuplot.full_canvas_image == null) { gnuplot.full_canvas_image = ctx.getImageData(0,0,canvas.width,canvas.height); } else { ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.putImageData(gnuplot.full_canvas_image,0,0); } ctx.strokeStyle="rgba(128,128,128,0.60)"; var x0 = gnuplot.plot_xmin + gnuplot.zoom_temp_plotx; var y0 = gnuplot.plot_ybot - gnuplot.zoom_temp_ploty; var w = gnuplot.plotx - gnuplot.zoom_temp_plotx; var h = -(gnuplot.ploty - gnuplot.zoom_temp_ploty); if (w<0) {x0 = x0 + w; w = -w;} if (h<0) {y0 = y0 + h; h = -h;} ctx.strokeRect(x0,y0,w,h); } } gnuplot.timefmt = function (x) { gnuplot.axisdate.setTime(1000. * (x + 946684800)); if (gnuplot.plot_timeaxis_x == "DateTime") { return gnuplot.axisdate.toUTCString(); } if (gnuplot.plot_timeaxis_x == "Date") { year = gnuplot.axisdate.getUTCFullYear(); month = gnuplot.axisdate.getUTCMonth(); date = gnuplot.axisdate.getUTCDate(); return (" " + date).slice (-2) + "/" + ("0" + (month+1)).slice (-2) + "/" + year; } if (gnuplot.plot_timeaxis_x == "Time") { hour = gnuplot.axisdate.getUTCHours(); minute = gnuplot.axisdate.getUTCMinutes(); second = gnuplot.axisdate.getUTCSeconds(); return ("0" + hour).slice (-2) + ":" + ("0" + minute).slice (-2) + ":" + ("0" + second).slice (-2); } } gnuplot.convert_to_polar = function (x,y) { polar = new Object; var phi, r; phi = Math.atan2(y,x); if (gnuplot.plot_logaxis_r) r = Math.exp( (x/Math.cos(phi) + Math.log(gnuplot.plot_axis_rmin)/Math.LN10) * Math.LN10); else r = x/Math.cos(phi) + gnuplot.plot_axis_rmin; polar.ang = phi * 180./Math.PI; polar.r = r; return polar; } gnuplot.saveclick = function (event) { gnuplot.mouse_update(event); // Limit tracking to the interior of the plot if (gnuplot.plotx < 0 || gnuplot.ploty < 0) return; if (gnuplot.mousex > gnuplot.plot_xmax || gnuplot.mousey < gnuplot.plot_ytop) return; if (event.which == null) /* IE case */ button= (event.button < 2) ? "LEFT" : ((event.button == 4) ? "MIDDLE" : "RIGHT"); else /* All others */ button= (event.which < 2) ? "LEFT" : ((event.which == 2) ? "MIDDLE" : "RIGHT"); if (button == "LEFT") { ctx.strokeStyle="black"; ctx.strokeRect(gnuplot.mousex, gnuplot.mousey, 1, 1); if (typeof(gnuplot.plot_timeaxis_x) == "string" && gnuplot.plot_timeaxis_x != "") click = " " + gnuplot.timefmt(x) + ", " + y.toPrecision(4); else click = " " + x.toPrecision(4) + ", " + y.toPrecision(4); ctx.drawText("sans", 9, gnuplot.mousex, gnuplot.mousey, click); } // Save starting corner of zoom box else { gnuplot.zoom_temp_xmin = x; gnuplot.zoom_temp_ymin = y; if (gnuplot.plot_axis_x2min != "none") gnuplot.zoom_temp_x2min = x2; if (gnuplot.plot_axis_y2min != "none") gnuplot.zoom_temp_y2min = y2; // Only used to echo the zoom box interactively gnuplot.zoom_temp_plotx = gnuplot.plotx; gnuplot.zoom_temp_ploty = gnuplot.ploty; gnuplot.zoom_in_progress = true; gnuplot.full_canvas_image = null; } return false; // Nobody else should respond to this event } gnuplot.zoom_in = function (event) { if (!gnuplot.zoom_in_progress) return false; gnuplot.mouse_update(event); if (event.which == null) /* IE case */ button= (event.button < 2) ? "LEFT" : ((event.button == 4) ? "MIDDLE" : "RIGHT"); else /* All others */ button= (event.which < 2) ? "LEFT" : ((event.which == 2) ? "MIDDLE" : "RIGHT"); // Save ending corner of zoom box if (button != "LEFT") { if (x > gnuplot.zoom_temp_xmin) { gnuplot.zoom_axis_xmin = gnuplot.zoom_temp_xmin; gnuplot.zoom_axis_xmax = x; if (gnuplot.plot_axis_x2min != "none") { gnuplot.zoom_axis_x2min = gnuplot.zoom_temp_x2min; gnuplot.zoom_axis_x2max = x2; } } else { gnuplot.zoom_axis_xmin = x; gnuplot.zoom_axis_xmax = gnuplot.zoom_temp_xmin; if (gnuplot.plot_axis_x2min != "none") { gnuplot.zoom_axis_x2min = x2; gnuplot.zoom_axis_x2max = gnuplot.zoom_temp_x2min; } } if (y > gnuplot.zoom_temp_ymin) { gnuplot.zoom_axis_ymin = gnuplot.zoom_temp_ymin; gnuplot.zoom_axis_ymax = y; if (gnuplot.plot_axis_y2min != "none") { gnuplot.zoom_axis_y2min = gnuplot.zoom_temp_y2min; gnuplot.zoom_axis_y2max = y2; } } else { gnuplot.zoom_axis_ymin = y; gnuplot.zoom_axis_ymax = gnuplot.zoom_temp_ymin; if (gnuplot.plot_axis_y2min != "none") { gnuplot.zoom_axis_y2min = y2; gnuplot.zoom_axis_y2max = gnuplot.zoom_temp_y2min; } } gnuplot.zoom_axis_width = gnuplot.zoom_axis_xmax - gnuplot.zoom_axis_xmin; gnuplot.zoom_axis_height = gnuplot.zoom_axis_ymax - gnuplot.zoom_axis_ymin; gnuplot.zoom_in_progress = false; gnuplot.rezoom(event); } return false; // Nobody else should respond to this event } gnuplot.toggle_grid = function (e) { if (!gnuplot.grid_lines) gnuplot.grid_lines = true; else gnuplot.grid_lines = false; ctx.clearRect(0,0,gnuplot.plot_term_xmax,gnuplot.plot_term_ymax); gnuplot_canvas(); } gnuplot.toggle_zoom_text = function (e) { if (!gnuplot.zoom_text) gnuplot.zoom_text = true; else gnuplot.zoom_text = false; ctx.clearRect(0,0,gnuplot.plot_term_xmax,gnuplot.plot_term_ymax); gnuplot_canvas(); } gnuplot.rezoom = function (e) { if (gnuplot.zoom_axis_width > 0) gnuplot.zoomed = true; ctx.clearRect(0,0,gnuplot.plot_term_xmax,gnuplot.plot_term_ymax); gnuplot_canvas(); } gnuplot.unzoom = function (e) { gnuplot.zoomed = false; ctx.clearRect(0,0,gnuplot.plot_term_xmax,gnuplot.plot_term_ymax); gnuplot_canvas(); } gnuplot.zoomXY = function(x,y) { zoom = new Object; var xreal, yreal; zoom.x = x; zoom.y = y; zoom.clip = false; if (gnuplot.plot_logaxis_x != 0) { xreal = Math.log(gnuplot.plot_axis_xmax) - Math.log(gnuplot.plot_axis_xmin); xreal = Math.log(gnuplot.plot_axis_xmin) + (x - gnuplot.plot_xmin) * xreal/gnuplot.plot_width; zoom.x = Math.log(gnuplot.zoom_axis_xmax) - Math.log(gnuplot.zoom_axis_xmin); zoom.x = gnuplot.plot_xmin + (xreal - Math.log(gnuplot.zoom_axis_xmin)) * gnuplot.plot_width/zoom.x; } else { xreal = gnuplot.plot_axis_xmin + (x - gnuplot.plot_xmin) * (gnuplot.plot_axis_width/gnuplot.plot_width); zoom.x = gnuplot.plot_xmin + (xreal - gnuplot.zoom_axis_xmin) * (gnuplot.plot_width/gnuplot.zoom_axis_width); } if (gnuplot.plot_logaxis_y != 0) { yreal = Math.log(gnuplot.plot_axis_ymax) - Math.log(gnuplot.plot_axis_ymin); yreal = Math.log(gnuplot.plot_axis_ymin) + (gnuplot.plot_ybot - y) * yreal/gnuplot.plot_height; zoom.y = Math.log(gnuplot.zoom_axis_ymax) - Math.log(gnuplot.zoom_axis_ymin); zoom.y = gnuplot.plot_ybot - (yreal - Math.log(gnuplot.zoom_axis_ymin)) * gnuplot.plot_height/zoom.y; } else { yreal = gnuplot.plot_axis_ymin + (gnuplot.plot_ybot - y) * (gnuplot.plot_axis_height/gnuplot.plot_height); zoom.y = gnuplot.plot_ybot - (yreal - gnuplot.zoom_axis_ymin) * (gnuplot.plot_height/gnuplot.zoom_axis_height); } // Report unclipped coords also zoom.xraw = zoom.x; zoom.yraw = zoom.y; // Limit the zoomed plot to the original plot area if (x > gnuplot.plot_xmax) { zoom.x = x; if (gnuplot.plot_axis_y2min == "none") { zoom.y = y; return zoom; } if (gnuplot.plot_ybot <= y && y <= gnuplot.plot_ybot + 15) zoom.clip = true; } else if (x < gnuplot.plot_xmin) zoom.x = x; else if (zoom.x < gnuplot.plot_xmin) { zoom.x = gnuplot.plot_xmin; zoom.clip = true; } else if (zoom.x > gnuplot.plot_xmax) { zoom.x = gnuplot.plot_xmax; zoom.clip = true; } if (y < gnuplot.plot_ytop) { zoom.y = y; if (gnuplot.plot_axis_x2min == "none") { zoom.x = x; zoom.clip = false; return zoom; } } else if (y > gnuplot.plot_ybot) zoom.y = y; else if (zoom.y > gnuplot.plot_ybot) { zoom.y = gnuplot.plot_ybot; zoom.clip = true; } else if (zoom.y < gnuplot.plot_ytop) { zoom.y = gnuplot.plot_ytop; zoom.clip = true; } return zoom; } gnuplot.zoomW = function (w) { return (w*gnuplot.plot_axis_width/gnuplot.zoom_axis_width); } gnuplot.zoomH = function (h) { return (h*gnuplot.plot_axis_height/gnuplot.zoom_axis_height); } gnuplot.popup_help = function(URL) { if (typeof(URL) != "string") { if (typeof(gnuplot.help_URL) == "string") URL = gnuplot.help_URL; else return; } // FIXME: Placeholder for useful action if (URL != "") window.open (URL,"gnuplot help"); } gnuplot.toggle_plot = function(plotid) { if (typeof(gnuplot["hide_"+plotid]) == "unknown") gnuplot["hide_"+plotid] = false; gnuplot["hide_"+plotid] = !gnuplot["hide_"+plotid]; ctx.clearRect(0,0,gnuplot.plot_term_xmax,gnuplot.plot_term_ymax); gnuplot_canvas(); } gnuplot.do_hotkey = function(event) { keychar = String.fromCharCode(event.charCode ? event.charCode : event.keyCode); switch (keychar) { case 'e': ctx.clearRect(0,0,gnuplot.plot_term_xmax,gnuplot.plot_term_ymax); gnuplot_canvas(); break; case 'g': gnuplot.toggle_grid(); break; case 'n': gnuplot.rezoom(); break; case 'r': ctx.lineWidth = 0.5; ctx.strokeStyle="rgba(128,128,128,0.50)"; ctx.moveTo(gnuplot.plot_xmin, gnuplot.mousey); ctx.lineTo(gnuplot.plot_xmax, gnuplot.mousey); ctx.moveTo(gnuplot.mousex, gnuplot.plot_ybot); ctx.lineTo(gnuplot.mousex, gnuplot.plot_ytop); ctx.stroke(); break; case 'p': case 'u': gnuplot.unzoom(); break; case '': zoom_in_progress = false; break; // Arrow keys case '%': // ctx.drawText("sans", 10, gnuplot.mousex, gnuplot.mousey, "<"); break; case '\'': // ctx.drawText("sans", 10, gnuplot.mousex, gnuplot.mousey, ">"); break; case '&': // ctx.drawText("sans", 10, gnuplot.mousex, gnuplot.mousey, "^"); break; case '(': // ctx.drawText("sans", 10, gnuplot.mousex, gnuplot.mousey, "v"); break; default: ctx.drawText("sans", 10, gnuplot.mousex, gnuplot.mousey, keychar); return true; // Let someone else handle it break; } return false; // Nobody else should respond to this keypress } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/js/canvas_help.html��������������������������������������������������������������0000644�0004711�0000144�00000002674�11544775361�014713� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<html> <head><title>Gnuplot canvas terminal

Mouse interaction with gnuplot canvas

Mouse movement
Track mouse coordinates
Left-click
Mark current coordinates on plot
# Toggle grid lines (if present)
unzoom Unzoom (restores original plot)
rezoom Rezoom
1 Display/Hide plot #1
Zooming
Firefox - Click and drag with right mouse button
Opera - Mouse buttons are problematic. To zoom you must set the middle-button mode to "Gestures". Click and release the middle button once to select one corner of the zoom box; then click a second time in the same place and drag to define the other corner.
Safari - Untested
IE - Untested
gnuplot-4.6.4/term/js/help.png0000644000471100001440000000111411156007350013145 0ustar PNG  IHDRasBIT|dtEXtSoftwarewww.inkscape.org<IDAT8QMkQ= I3%кۅ?V @D E)]4Zm3㦁I:^9sHbWy >S(Lx Ibt l[:t}oh7(.0GK`C;\'VZ/c>P"R=)E~sFQ:jF) DuҿjE{ Hp:+0FIIDjJ˕"'EaYHY[yR-? cs`+ׯ<oBݬTւ۷|X R 3?Y|>?8 .:?8X%;GίJّRv_hm㑄uK :6@)QR 8h&[*,!ckkM4 R@&&TE+*dMB>tIENDB`gnuplot-4.6.4/term/js/canvastext.js0000644000471100001440000003525211150321775014243 0ustar /* * $Id: canvastext.js,v 1.3 2009/02/22 19:14:05 sfeam Exp $ */ // The canvastext.js code was released to the public domain by Jim Studt, 2007. // He may keep some sort of up to date copy at http://www.federated.com/~jim/canvastext/ // Feb 2009 Ethan A Merritt (EAM) Modify code to work in non-ascii environments. // var CanvasTextFunctions = { }; CanvasTextFunctions.letters = { ' ': { width: 16, points: [] }, '!': { width: 10, points: [[5,21],[5,7],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]] }, '"': { width: 16, points: [[4,21],[4,14],[-1,-1],[12,21],[12,14]] }, '#': { width: 21, points: [[11,25],[4,-7],[-1,-1],[17,25],[10,-7],[-1,-1],[4,12],[18,12],[-1,-1],[3,6],[17,6]] }, '$': { width: 20, points: [[8,25],[8,-4],[-1,-1],[12,25],[12,-4],[-1,-1],[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]] }, '%': { width: 24, points: [[21,21],[3,0],[-1,-1],[8,21],[10,19],[10,17],[9,15],[7,14],[5,14],[3,16],[3,18],[4,20],[6,21],[8,21],[10,20],[13,19],[16,19],[19,20],[21,21],[-1,-1],[17,7],[15,6],[14,4],[14,2],[16,0],[18,0],[20,1],[21,3],[21,5],[19,7],[17,7]] }, '&': { width: 26, points: [[23,12],[23,13],[22,14],[21,14],[20,13],[19,11],[17,6],[15,3],[13,1],[11,0],[7,0],[5,1],[4,2],[3,4],[3,6],[4,8],[5,9],[12,13],[13,14],[14,16],[14,18],[13,20],[11,21],[9,20],[8,18],[8,16],[9,13],[11,10],[16,3],[18,1],[20,0],[22,0],[23,1],[23,2]] }, '\'': { width: 10, points: [[5,19],[4,20],[5,21],[6,20],[6,18],[5,16],[4,15]] }, '(': { width: 14, points: [[11,25],[9,23],[7,20],[5,16],[4,11],[4,7],[5,2],[7,-2],[9,-5],[11,-7]] }, ')': { width: 14, points: [[3,25],[5,23],[7,20],[9,16],[10,11],[10,7],[9,2],[7,-2],[5,-5],[3,-7]] }, '*': { width: 16, points: [[8,21],[8,9],[-1,-1],[3,18],[13,12],[-1,-1],[13,18],[3,12]] }, '+': { width: 26, points: [[13,18],[13,0],[-1,-1],[4,9],[22,9]] }, ',': { width: 10, points: [[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]] }, '-': { width: 26, points: [[4,9],[22,9]] }, '.': { width: 10, points: [[5,2],[4,1],[5,0],[6,1],[5,2]] }, '/': { width: 22, points: [[20,25],[2,-7]] }, '0': { width: 20, points: [[9,21],[6,20],[4,17],[3,12],[3,9],[4,4],[6,1],[9,0],[11,0],[14,1],[16,4],[17,9],[17,12],[16,17],[14,20],[11,21],[9,21]] }, '1': { width: 20, points: [[6,17],[8,18],[11,21],[11,0]] }, '2': { width: 20, points: [[4,16],[4,17],[5,19],[6,20],[8,21],[12,21],[14,20],[15,19],[16,17],[16,15],[15,13],[13,10],[3,0],[17,0]] }, '3': { width: 20, points: [[5,21],[16,21],[10,13],[13,13],[15,12],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]] }, '4': { width: 20, points: [[13,21],[3,7],[18,7],[-1,-1],[13,21],[13,0]] }, '5': { width: 20, points: [[15,21],[5,21],[4,12],[5,13],[8,14],[11,14],[14,13],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]] }, '6': { width: 20, points: [[16,18],[15,20],[12,21],[10,21],[7,20],[5,17],[4,12],[4,7],[5,3],[7,1],[10,0],[11,0],[14,1],[16,3],[17,6],[17,7],[16,10],[14,12],[11,13],[10,13],[7,12],[5,10],[4,7]] }, '7': { width: 20, points: [[17,21],[7,0],[-1,-1],[3,21],[17,21]] }, '8': { width: 20, points: [[8,21],[5,20],[4,18],[4,16],[5,14],[7,13],[11,12],[14,11],[16,9],[17,7],[17,4],[16,2],[15,1],[12,0],[8,0],[5,1],[4,2],[3,4],[3,7],[4,9],[6,11],[9,12],[13,13],[15,14],[16,16],[16,18],[15,20],[12,21],[8,21]] }, '9': { width: 20, points: [[16,14],[15,11],[13,9],[10,8],[9,8],[6,9],[4,11],[3,14],[3,15],[4,18],[6,20],[9,21],[10,21],[13,20],[15,18],[16,14],[16,9],[15,4],[13,1],[10,0],[8,0],[5,1],[4,3]] }, ':': { width: 10, points: [[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]] }, ';': { width: 10, points: [[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]] }, '<': { width: 24, points: [[20,18],[4,9],[20,0]] }, '=': { width: 26, points: [[4,12],[22,12],[-1,-1],[4,6],[22,6]] }, '>': { width: 24, points: [[4,18],[20,9],[4,0]] }, '?': { width: 18, points: [[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]] }, '@': { width: 27, points: [[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]] }, 'A': { width: 18, points: [[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]] }, 'B': { width: 21, points: [[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]] }, 'C': { width: 21, points: [[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]] }, 'D': { width: 21, points: [[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]] }, 'E': { width: 19, points: [[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]] }, 'F': { width: 18, points: [[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]] }, 'G': { width: 21, points: [[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]] }, 'H': { width: 22, points: [[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]] }, 'I': { width: 8, points: [[4,21],[4,0]] }, 'J': { width: 16, points: [[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]] }, 'K': { width: 21, points: [[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]] }, 'L': { width: 17, points: [[4,21],[4,0],[-1,-1],[4,0],[16,0]] }, 'M': { width: 24, points: [[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]] }, 'N': { width: 22, points: [[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]] }, 'O': { width: 22, points: [[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]] }, 'P': { width: 21, points: [[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]] }, 'Q': { width: 22, points: [[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]] }, 'R': { width: 21, points: [[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]] }, 'S': { width: 20, points: [[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]] }, 'T': { width: 16, points: [[8,21],[8,0],[-1,-1],[1,21],[15,21]] }, 'U': { width: 22, points: [[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]] }, 'V': { width: 18, points: [[1,21],[9,0],[-1,-1],[17,21],[9,0]] }, 'W': { width: 24, points: [[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]] }, 'X': { width: 20, points: [[3,21],[17,0],[-1,-1],[17,21],[3,0]] }, 'Y': { width: 18, points: [[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]] }, 'Z': { width: 20, points: [[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]] }, '[': { width: 14, points: [[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]] }, '\\': { width: 14, points: [[0,21],[14,-3]] }, ']': { width: 14, points: [[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]] }, '^': { width: 16, points: [[5,15],[8,19],[11,15],[-1,-1],[2,12],[8,18],[14,12]] }, '_': { width: 16, points: [[0,-2],[16,-2]] }, '`': { width: 10, points: [[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]] }, 'a': { width: 19, points: [[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]] }, 'b': { width: 19, points: [[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]] }, 'c': { width: 18, points: [[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]] }, 'd': { width: 19, points: [[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]] }, 'e': { width: 18, points: [[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]] }, 'f': { width: 12, points: [[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]] }, 'g': { width: 19, points: [[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]] }, 'h': { width: 19, points: [[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]] }, 'i': { width: 8, points: [[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]] }, 'j': { width: 10, points: [[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]] }, 'k': { width: 17, points: [[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]] }, 'l': { width: 8, points: [[4,21],[4,0]] }, 'm': { width: 30, points: [[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]] }, 'n': { width: 19, points: [[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]] }, 'o': { width: 19, points: [[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]] }, 'p': { width: 19, points: [[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]] }, 'q': { width: 19, points: [[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]] }, 'r': { width: 13, points: [[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]] }, 's': { width: 17, points: [[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]] }, 't': { width: 12, points: [[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]] }, 'u': { width: 19, points: [[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]] }, 'v': { width: 16, points: [[2,14],[8,0],[-1,-1],[14,14],[8,0]] }, 'w': { width: 22, points: [[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]] }, 'x': { width: 17, points: [[3,14],[14,0],[-1,-1],[14,14],[3,0]] }, 'y': { width: 16, points: [[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]] }, 'z': { width: 17, points: [[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]] }, '{': { width: 14, points: [[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]] }, '|': { width: 8, points: [[4,25],[4,-7]] }, '}': { width: 14, points: [[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]] }, '~': { width: 24, points: [[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]] }, // Miscellaneous glyphs (EAM) 129: { width: 18, points: [[2,-2],[2,21],[16,21],[16,-2],[2,-2]] }, 176: { width: 8, points: [[3,22],[1,20],[1,18],[3,16],[5,16],[7,18],[7,20],[5,22],[3,22]]}, 197: { width: 18, points: [[9,18],[1,0],[-1,-1],[9,18],[17,0],[-1,-1],[4,7],[14,7],[-1,-1], [8,22],[6,20],[6,18],[8,16],[10,16],[12,18],[12,20],[10,22],[8,22]]}, 215: { width: 26, points: [[6,17],[20,3],[-1,-1],[6,3],[20,17]] } }; CanvasTextFunctions.letter = function (ch) { glyph = CanvasTextFunctions.letters[ch]; // EAM - Draw an empty box for undefined glyphs if (glyph == undefined) glyph = CanvasTextFunctions.letters[129]; return glyph; } CanvasTextFunctions.ascent = function( font, size) { return size; } CanvasTextFunctions.descent = function( font, size) { return 7.0*size/25.0; } CanvasTextFunctions.measure = function( font, size, str) { var total = 0; var len = str.length; for ( i = 0; i < len; i++) { var index = str.charAt(i); // EAM deal with non-ascii characaters if (index > '~') index = str.charCodeAt(i); var c = CanvasTextFunctions.letter(index); if (c) total += c.width * size / 25.0; } return total; } CanvasTextFunctions.draw = function(ctx,font,size,x,y,str) { var total = 0; var len = str.length; var mag = size / 25.0; ctx.save(); ctx.lineCap = "round"; ctx.lineWidth = 2.0 * mag; for ( i = 0; i < len; i++) { var index = str.charAt(i); // EAM deal with non-ascii characaters if (index > '~') index = str.charCodeAt(i); var c = CanvasTextFunctions.letter(index); if ( !c) continue; ctx.beginPath(); var penUp = 1; var needStroke = 0; for ( j = 0; j < c.points.length; j++) { var a = c.points[j]; if ( a[0] == -1 && a[1] == -1) { penUp = 1; continue; } if ( penUp) { ctx.moveTo( x + a[0]*mag, y - a[1]*mag); penUp = false; } else { ctx.lineTo( x + a[0]*mag, y - a[1]*mag); } } ctx.stroke(); x += c.width*mag; } ctx.restore(); return total; } CanvasTextFunctions.enable = function( ctx) { ctx.drawText = function(font,size,x,y,text) { return CanvasTextFunctions.draw( ctx, font,size,x,y,text); }; ctx.measureText = function(font,size,text) { return CanvasTextFunctions.measure( font,size,text); }; ctx.fontAscent = function(font,size) { return CanvasTextFunctions.ascent(font,size); } ctx.fontDescent = function(font,size) { return CanvasTextFunctions.descent(font,size); } ctx.drawTextRight = function(font,size,x,y,text) { var w = CanvasTextFunctions.measure(font,size,text); return CanvasTextFunctions.draw( ctx, font,size,x-w,y,text); }; ctx.drawTextCenter = function(font,size,x,y,text) { var w = CanvasTextFunctions.measure(font,size,text); return CanvasTextFunctions.draw( ctx, font,size,x-w/2,y,text); }; } gnuplot-4.6.4/term/js/previouszoom.png0000644000471100001440000000143011156007350014777 0ustar PNG  IHDRasBIT|dtEXtSoftwarewww.inkscape.org<IDAT8MlTu7oMէS`4Q Ie4010⪚6|t!.t $PL$a8qcX$]M2AmB[,mPq1)=$@.Lݖd\[vRax<$%1 t<8 ta7lej|ߋb}an|YH%Rヶ%0 `Q[/n\XI~ž/ qrTeBr"˿R&II%?{oڄ Ok8ryF- \t.05F֦aE"OfnS-A . %\[Ki#`Ys IXX@IENDB`gnuplot-4.6.4/term/js/textzoom.png0000644000471100001440000000105411164561561014121 0ustar PNG  IHDRasRGBbKGD pHYs  tIME!ytEXtCommentCreated with GIMPWIDAT8˥MMq9Ν;&J,wKbcaP6) 6KQ,,FjXHVVg1 L,|Dͨь{mtN}<`A8afp@(.`a0xvJElWq?{ҙ@"><^da` j$+aPڙ؏tg0l_v?8^L^u]8! ~ 1/pNoUUs w82Q/^A]w [[$GUt}~tkFOu1HkXm vIn ~&̼inc2IENDB`gnuplot-4.6.4/term/js/nextzoom.png0000644000471100001440000000137611156007350014112 0ustar PNG  IHDRasBIT|dtEXtSoftwarewww.inkscape.org<IDAT8[Lq?s9s'v]"ri(0"ˋu )la!^t665e\,3;;cKwEDJ eƽBe4=WDP"R#-yArښ7Ԉ=\܋v>~OYD>RR#:'rlWNm" _~xݟ /R*L?3}EߴM!nA$[JMas~Yů8g#tCTyD-5p}޷bMqy0 7n!pxJO&DvgSiǂ"_e ]ᅧTsEDvB'oЪu= *+"W*Q%ݿxIcI˸Fs滧|ra>`{w)l/X q#i؎n?PJL9|!W%Ԣ\IENDB`gnuplot-4.6.4/term/js/canvasmath.js0000644000471100001440000010304712051250313014174 0ustar /* * $Id: canvasmath.js,v 1.6.4.1 2012/11/15 20:30:03 sfeam Exp $ */ // The canvastext.js code was released to the public domain by Jim Studt, 2007. // He may keep some sort of up to date copy at http://www.federated.com/~jim/canvastext/ // Mar 2009 Ethan A Merritt (EAM) Modify code to work in non-ascii environments. // Add Latin-1, Hershey simplex Greek, and math symbols with unicode indexing. // Apr 2012 Ethan A Merritt Composite widths, tab, newline // Nov 2012 Ethan A Merritt Additional UTF8 mathematical operators // var CanvasTextFunctions = { }; CanvasTextFunctions.letters = { ' ': { width: 16, points: [] }, '!': { width: 10, points: [[5,21],[5,7],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]] }, '"': { width: 16, points: [[4,21],[4,14],[-1,-1],[12,21],[12,14]] }, '#': { width: 21, points: [[11,25],[4,-7],[-1,-1],[17,25],[10,-7],[-1,-1],[4,12],[18,12],[-1,-1],[3,6],[17,6]] }, '$': { width: 20, points: [[8,25],[8,-4],[-1,-1],[12,25],[12,-4],[-1,-1],[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]] }, '%': { width: 24, points: [[21,21],[3,0],[-1,-1],[8,21],[10,19],[10,17],[9,15],[7,14],[5,14],[3,16],[3,18],[4,20],[6,21],[8,21],[10,20],[13,19],[16,19],[19,20],[21,21],[-1,-1],[17,7],[15,6],[14,4],[14,2],[16,0],[18,0],[20,1],[21,3],[21,5],[19,7],[17,7]] }, '&': { width: 26, points: [[23,12],[23,13],[22,14],[21,14],[20,13],[19,11],[17,6],[15,3],[13,1],[11,0],[7,0],[5,1],[4,2],[3,4],[3,6],[4,8],[5,9],[12,13],[13,14],[14,16],[14,18],[13,20],[11,21],[9,20],[8,18],[8,16],[9,13],[11,10],[16,3],[18,1],[20,0],[22,0],[23,1],[23,2]] }, '\'': { width: 10, points: [[5,19],[4,20],[5,21],[6,20],[6,18],[5,16],[4,15]] }, '(': { width: 14, points: [[11,25],[9,23],[7,20],[5,16],[4,11],[4,7],[5,2],[7,-2],[9,-5],[11,-7]] }, ')': { width: 14, points: [[3,25],[5,23],[7,20],[9,16],[10,11],[10,7],[9,2],[7,-2],[5,-5],[3,-7]] }, '*': { width: 16, points: [[8,21],[8,9],[-1,-1],[3,18],[13,12],[-1,-1],[13,18],[3,12]] }, '+': { width: 20, points: [[10,15],[10,3],[-1,-1],[4,9],[16,9]] }, ',': { width: 10, points: [[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]] }, '-': { width: 20, points: [[4,9],[16,9]] }, '.': { width: 10, points: [[5,2],[4,1],[5,0],[6,1],[5,2]] }, '/': { width: 20, points: [[19,25],[1,-7]] }, '0': { width: 20, points: [[9,21],[6,20],[4,17],[3,12],[3,9],[4,4],[6,1],[9,0],[11,0],[14,1],[16,4],[17,9],[17,12],[16,17],[14,20],[11,21],[9,21]] }, '1': { width: 20, points: [[6,17],[8,18],[11,21],[11,0]] }, '2': { width: 20, points: [[4,16],[4,17],[5,19],[6,20],[8,21],[12,21],[14,20],[15,19],[16,17],[16,15],[15,13],[13,10],[3,0],[17,0]] }, '3': { width: 20, points: [[5,21],[16,21],[10,13],[13,13],[15,12],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]] }, '4': { width: 20, points: [[13,21],[3,7],[18,7],[-1,-1],[13,21],[13,0]] }, '5': { width: 20, points: [[15,21],[5,21],[4,12],[5,13],[8,14],[11,14],[14,13],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]] }, '6': { width: 20, points: [[16,18],[15,20],[12,21],[10,21],[7,20],[5,17],[4,12],[4,7],[5,3],[7,1],[10,0],[11,0],[14,1],[16,3],[17,6],[17,7],[16,10],[14,12],[11,13],[10,13],[7,12],[5,10],[4,7]] }, '7': { width: 20, points: [[17,21],[7,0],[-1,-1],[3,21],[17,21]] }, '8': { width: 20, points: [[8,21],[5,20],[4,18],[4,16],[5,14],[7,13],[11,12],[14,11],[16,9],[17,7],[17,4],[16,2],[15,1],[12,0],[8,0],[5,1],[4,2],[3,4],[3,7],[4,9],[6,11],[9,12],[13,13],[15,14],[16,16],[16,18],[15,20],[12,21],[8,21]] }, '9': { width: 20, points: [[16,14],[15,11],[13,9],[10,8],[9,8],[6,9],[4,11],[3,14],[3,15],[4,18],[6,20],[9,21],[10,21],[13,20],[15,18],[16,14],[16,9],[15,4],[13,1],[10,0],[8,0],[5,1],[4,3]] }, ':': { width: 10, points: [[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]] }, ';': { width: 10, points: [[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]] }, '<': { width: 24, points: [[20,18],[4,9],[20,0]] }, '=': { width: 24, points: [[3,12],[20,12],[-1,-1],[3,6],[20,6]] }, '>': { width: 24, points: [[4,18],[20,9],[4,0]] }, '?': { width: 18, points: [[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]] }, '@': { width: 27, points: [[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]] }, 'A': { width: 18, points: [[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]] }, 'B': { width: 21, points: [[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]] }, 'C': { width: 21, points: [[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]] }, 'D': { width: 21, points: [[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]] }, 'E': { width: 19, points: [[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]] }, 'F': { width: 18, points: [[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]] }, 'G': { width: 21, points: [[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]] }, 'H': { width: 22, points: [[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]] }, 'I': { width: 8, points: [[4,21],[4,0]] }, 'J': { width: 16, points: [[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]] }, 'K': { width: 21, points: [[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]] }, 'L': { width: 17, points: [[4,21],[4,0],[-1,-1],[4,0],[16,0]] }, 'M': { width: 24, points: [[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]] }, 'N': { width: 22, points: [[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]] }, 'O': { width: 22, points: [[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]] }, 'P': { width: 21, points: [[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]] }, 'Q': { width: 22, points: [[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]] }, 'R': { width: 21, points: [[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]] }, 'S': { width: 20, points: [[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]] }, 'T': { width: 16, points: [[8,21],[8,0],[-1,-1],[1,21],[15,21]] }, 'U': { width: 22, points: [[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]] }, 'V': { width: 18, points: [[1,21],[9,0],[-1,-1],[17,21],[9,0]] }, 'W': { width: 24, points: [[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]] }, 'X': { width: 20, points: [[3,21],[17,0],[-1,-1],[17,21],[3,0]] }, 'Y': { width: 18, points: [[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]] }, 'Z': { width: 20, points: [[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]] }, '[': { width: 14, points: [[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]] }, '\\': { width: 14, points: [[0,21],[14,-3]] }, ']': { width: 14, points: [[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]] }, '^': { width: 16, points: [[5,15],[8,19],[11,15],[-1,-1],[2,12],[8,18],[14,12]] }, '_': { width: 16, points: [[0,-2],[16,-2]] }, '`': { width: 10, points: [[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]] }, 'a': { width: 19, points: [[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]] }, 'b': { width: 19, points: [[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]] }, 'c': { width: 18, points: [[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]] }, 'd': { width: 19, points: [[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]] }, 'e': { width: 18, points: [[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]] }, 'f': { width: 12, points: [[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]] }, 'g': { width: 19, points: [[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]] }, 'h': { width: 19, points: [[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]] }, 'i': { width: 8, points: [[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]] }, 'j': { width: 10, points: [[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]] }, 'k': { width: 17, points: [[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]] }, 'l': { width: 8, points: [[4,21],[4,0]] }, 'm': { width: 30, points: [[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]] }, 'n': { width: 19, points: [[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]] }, 'o': { width: 19, points: [[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]] }, 'p': { width: 19, points: [[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]] }, 'q': { width: 19, points: [[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]] }, 'r': { width: 13, points: [[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]] }, 's': { width: 17, points: [[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]] }, 't': { width: 12, points: [[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]] }, 'u': { width: 19, points: [[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]] }, 'v': { width: 16, points: [[2,14],[8,0],[-1,-1],[14,14],[8,0]] }, 'w': { width: 22, points: [[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]] }, 'x': { width: 17, points: [[3,14],[14,0],[-1,-1],[14,14],[3,0]] }, 'y': { width: 16, points: [[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]] }, 'z': { width: 17, points: [[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]] }, '{': { width: 14, points: [[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]] }, '|': { width: 8, points: [[4,25],[4,-7]] }, '}': { width: 14, points: [[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]] }, '~': { width: 24, points: [[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]] }, // latin-1 as diacritical + base character 192: { width: 0, points: [[4,28],[10,24],[-99,'A']] }, 193: { width: 0, points: [[8,24],[14,28],[-99,'A']] }, 194: { width: 0, points: [[5,24],[9,27],[13,24],[-99,'A']] }, 195: { width: 0, points: [[4,24],[5,26],[6,27],[8,27], [10,24],[12,24],[13,25],[14,27],[-99,'A']] }, 196: { width: 0, points: [[6,25],[6,26],[7,26],[7,25],[-1,-1],[12,25],[12,26],[13,26],[13,25],[-99,'A']] }, 197: { width: 0, points: [[8,27],[6,25],[6,23],[8,21],[10,21],[12,23],[12,25],[10,27],[8,27],[-99,'A']]}, 198: { width: 11, points: [[3,0],[14,21],[-1,-1],[7,8],[14,8],[-99,'E']] }, 199: { width: 0, points: [[10,0],[10,-3],[11,-3],[12,-4],[12,-6],[11,-7],[8,-7],[-99,'C']] }, 200: { width: 0, points: [[8,28],[14,24],[-99,'E']] }, 201: { width: 0, points: [[6,24],[12,28],[-99,'E']] }, 202: { width: 0, points: [[5,24],[9,27],[13,24],[-99,'E']] }, 203: { width: 0, points: [[6,25],[6,26],[7,26],[7,25],[-1,-1],[12,25],[12,26],[13,26],[13,25],[-99,'E']] }, 204: { width: 0, points: [[-99,'I']] }, 205: { width: 0, points: [[-99,'I']] }, 206: { width: 0, points: [[-99,'I']] }, 207: { width: 0, points: [[-99,'I']] }, 209: { width: 0, points: [[6,24],[7,26],[8,27],[10,27], [12,24],[14,24],[15,25],[16,27],[-99,'N']] }, 210: { width: 0, points: [[8,28],[14,24],[-99,'O']] }, 211: { width: 0, points: [[6,24],[12,28],[-99,'O']] }, 212: { width: 0, points: [[7,24],[11,27],[15,24],[-99,'O']] }, 213: { width: 0, points: [[6,24],[7,26],[8,27],[10,27], [12,24],[14,24],[15,25],[16,27],[-99,'O']] }, 214: { width: 0, points: [[8,25],[8,26],[9,26],[9,25],[-1,-1],[14,25],[14,26],[15,26],[15,25],[-99,'O']] }, 216: { width: 0, points: [[3,0],[19,21],[-99,'O']] }, 217: { width: 0, points: [[8,28],[14,24],[-99,'U']] }, 218: { width: 0, points: [[6,24],[12,28],[-99,'U']] }, 219: { width: 0, points: [[7,24],[11,27],[15,24],[-99,'U']] }, 220: { width: 0, points: [[8,25],[8,26],[9,26],[9,25],[-1,-1],[14,25],[14,26],[15,26],[15,25],[-99,'U']] }, 224: { width: 0, points: [[8,21],[14,17],[-99,'a']] }, 225: { width: 0, points: [[6,17],[12,21],[-99,'a']] }, 226: { width: 0, points: [[5,17],[9,20],[13,17],[-99,'a']] }, 227: { width: 0, points: [[4,17],[5,19],[6,20],[8,20], [10,17],[12,17],[13,18],[14,20],[-99,'a']] }, 228: { width: 0, points: [[6,18],[6,19],[7,19],[7,18],[-1,-1],[12,18],[12,19],[13,19],[13,18],[-99,'a']] }, 229: { width: 0, points: [[9,21],[7,19],[7,18],[9,16],[10,16],[12,18],[12,19],[10,21],[8,21],[-99,'a']] }, 231: { width: 0, points: [[10,0],[10,-3],[11,-3],[12,-4],[12,-6],[11,-7],[8,-7],[-99,'c']] }, 232: { width: 0, points: [[8,21],[14,17],[-99,'e']] }, 233: { width: 0, points: [[6,17],[12,21],[-99,'e']] }, 234: { width: 0, points: [[5,17],[9,20],[13,17],[-99,'e']] }, 235: { width: 0, points: [[6,18],[6,19],[7,19],[7,18],[-1,-1],[12,18],[12,19],[13,19],[13,18],[-99,'e']] }, 236: { width: 8, points: [[4,14],[4,0],[-1,-1],[1,21],[4,18]] }, 237: { width: 8, points: [[4,14],[4,0],[-1,-1],[7,21],[4,18]] }, 238: { width: 8, points: [[4,14],[4,0],[-1,-1],[1,17],[4,20],[7,17]] }, 239: { width: 10, points: [[5,14],[5,0],[-1,-1],[2,18],[2,19],[3,19],[3,18],[-1,-1],[7,18],[7,19],[8,19],[8,18]] }, 241: { width: 0, points: [[5,17],[6,19],[7,20],[9,20], [11,17],[13,17],[14,18],[15,20],[-99,'n']] }, 242: { width: 0, points: [[8,21],[14,17],[-99,'o']] }, 243: { width: 0, points: [[6,17],[12,21],[-99,'o']] }, 244: { width: 0, points: [[5,17],[9,20],[13,17],[-99,'o']] }, 245: { width: 0, points: [[4,17],[5,19],[6,20],[8,20], [10,17],[12,17],[13,18],[14,20],[-99,'o']] }, 246: { width: 0, points: [[6,18],[6,19],[7,19],[7,18],[-1,-1],[12,18],[12,19],[13,19],[13,18],[-99,'o']] }, 247: { width: 20, points: [[4,9],[16,9],[-1,-1],[10,14],[10,13],[11,13],[11,14],[-1,-1],[10,4],[10,5],[11,5],[11,4]] }, 248: { width: 0, points: [[3,0],[17,14],[-99,'o']] }, 249: { width: 0, points: [[8,21],[14,17],[-99,'u']] }, 250: { width: 0, points: [[6,17],[12,21],[-99,'u']] }, 251: { width: 0, points: [[5,17],[9,20],[13,17],[-99,'u']] }, 252: { width: 0, points: [[6,18],[6,19],[7,19],[7,18],[-1,-1],[12,18],[12,19],[13,19],[13,18],[-99,'u']] }, 253: { width: 0, points: [[12,21],[6,17],[-99,'y']] }, 255: { width: 0, points: [[6,18],[6,19],[7,19],[7,18],[-1,-1],[12,18],[12,19],[13,19],[13,18],[-99,'y']] }, // Hershey simplex greek font 913: { width: 18, points: [[9,22],[1,1],[-1,-1],[9,22],[17,1],[-1,-1],[4,8],[14,8]] }, 914: { width: 21, points: [[4,22],[4,1],[-1,-1],[4,22],[13,22],[16,21],[17,20],[18,18],[18,16],[17,14],[16,13],[13,12],[-1,-1],[4,12],[13,12],[16,11],[17,10],[18,8],[18,5],[17,3],[16,2],[13,1],[4,1]] }, 915: { width: 17, points: [[4,22],[4,1],[-1,-1],[4,22],[16,22]] }, 916: { width: 18, points: [[9,22],[1,1],[-1,-1],[9,22],[17,1],[-1,-1],[1,1],[17,1]] }, 917: { width: 19, points: [[4,22],[4,1],[-1,-1],[4,22],[17,22],[-1,-1],[4,12],[12,12],[-1,-1],[4,1],[17,1]] }, 918: { width: 20, points: [[17,22],[3,1],[-1,-1],[3,22],[17,22],[-1,-1],[3,1],[17,1]] }, 919: { width: 22, points: [[4,22],[4,1],[-1,-1],[18,22],[18,1],[-1,-1],[4,12],[18,12]] }, 920: { width: 22, points: [[9,22],[7,21],[5,19],[4,17],[3,14],[3,9],[4,6],[5,4],[7,2],[9,1],[13,1],[15,2],[17,4],[18,6],[19,9],[19,14],[18,17],[17,19],[15,21],[13,22],[9,22],[-1,-1],[8,12],[14,12]] }, 921: { width: 8, points: [[4,22],[4,1]] }, 922: { width: 21, points: [[4,22],[4,1],[-1,-1],[18,22],[4,8],[-1,-1],[9,13],[18,1]] }, 923: { width: 18, points: [[9,22],[1,1],[-1,-1],[9,22],[17,1]] }, 924: { width: 24, points: [[4,22],[4,1],[-1,-1],[4,22],[12,1],[-1,-1],[20,22],[12,1],[-1,-1],[20,22],[20,1]] }, 925: { width: 22, points: [[4,22],[4,1],[-1,-1],[4,22],[18,1],[-1,-1],[18,22],[18,1]] }, 926: { width: 18, points: [[2,22],[16,22],[-1,-1],[6,12],[12,12],[-1,-1],[2,1],[16,1]] }, 927: { width: 22, points: [[9,22],[7,21],[5,19],[4,17],[3,14],[3,9],[4,6],[5,4],[7,2],[9,1],[13,1],[15,2],[17,4],[18,6],[19,9],[19,14],[18,17],[17,19],[15,21],[13,22],[9,22]] }, 928: { width: 22, points: [[4,22],[4,1],[-1,-1],[18,22],[18,1],[-1,-1],[4,22],[18,22]] }, 929: { width: 21, points: [[4,22],[4,1],[-1,-1],[4,22],[13,22],[16,21],[17,20],[18,18],[18,15],[17,13],[16,12],[13,11],[4,11]] }, 931: { width: 18, points: [[2,22],[9,12],[2,1],[-1,-1],[2,22],[16,22],[-1,-1],[2,1],[16,1]] }, 932: { width: 16, points: [[8,22],[8,1],[-1,-1],[1,22],[15,22]] }, 933: { width: 18, points: [[2,17],[2,19],[3,21],[4,22],[6,22],[7,21],[8,19],[9,15],[9,1],[-1,-1],[16,17],[16,19],[15,21],[14,22],[12,22],[11,21],[10,19],[9,15]] }, 934: { width: 20, points: [[10,22],[10,1],[-1,-1],[8,17],[5,16],[4,15],[3,13],[3,10],[4,8],[5,7],[8,6],[12,6],[15,7],[16,8],[17,10],[17,13],[16,15],[15,16],[12,17],[8,17]] }, 935: { width: 20, points: [[3,22],[17,1],[-1,-1],[3,1],[17,22]] }, 936: { width: 22, points: [[11,22],[11,1],[-1,-1],[2,16],[3,16],[4,15],[5,11],[6,9],[7,8],[10,7],[12,7],[15,8],[16,9],[17,11],[18,15],[19,16],[20,16]] }, 937: { width: 20, points: [[3,1],[7,1],[4,8],[3,12],[3,16],[4,19],[6,21],[9,22],[11,22],[14,21],[16,19],[17,16],[17,12],[16,8],[13,1],[17,1]] }, 945: { width: 21, points: [[9,15],[7,14],[5,12],[4,10],[3,7],[3,4],[4,2],[6,1],[8,1],[10,2],[13,5],[15,8],[17,12],[18,15],[-1,-1],[9,15],[11,15],[12,14],[13,12],[15,4],[16,2],[17,1],[18,1]] }, 946: { width: 19, points: [[12,22],[10,21],[8,19],[6,15],[5,12],[4,8],[3,2],[2,-6],[-1,-1],[12,22],[14,22],[16,20],[16,17],[15,15],[14,14],[12,13],[9,13],[-1,-1],[9,13],[11,12],[13,10],[14,8],[14,5],[13,3],[12,2],[10,1],[8,1],[6,2],[5,3],[4,6]] }, 947: { width: 19, points: [[1,12],[3,14],[5,15],[6,15],[8,14],[9,13],[10,10],[10,6],[9,1],[-1,-1],[17,15],[16,12],[15,10],[9,1],[7,-3],[6,-6]] }, 948: { width: 18, points: [[11,15],[8,15],[6,14],[4,12],[3,9],[3,6],[4,3],[5,2],[7,1],[9,1],[11,2],[13,4],[14,7],[14,10],[13,13],[11,15],[9,17],[8,19],[8,21],[9,22],[11,22],[13,21],[15,19]] }, 949: { width: 16, points: [[13,13],[12,14],[10,15],[7,15],[5,14],[5,12],[6,10],[9,9],[-1,-1],[9,9],[5,8],[3,6],[3,4],[4,2],[6,1],[9,1],[11,2],[13,4]] }, 950: { width: 15, points: [[10,22],[8,21],[7,20],[7,19],[8,18],[11,17],[14,17],[-1,-1],[14,17],[10,15],[7,13],[4,10],[3,7],[3,5],[4,3],[6,1],[9,-1],[10,-3],[10,-5],[9,-6],[7,-6],[6,-4]] }, 951: { width: 20, points: [[1,11],[2,13],[4,15],[6,15],[7,14],[7,12],[6,8],[4,1],[-1,-1],[6,8],[8,12],[10,14],[12,15],[14,15],[16,13],[16,10],[15,5],[12,-6]] }, 952: { width: 17, points: [[10,22],[8,21],[6,18],[5,16],[4,13],[3,8],[3,4],[4,2],[5,1],[7,1],[9,2],[11,5],[12,7],[13,10],[14,15],[14,19],[13,21],[12,22],[10,22],[-1,-1],[4,12],[13,12]] }, 953: { width: 11, points: [[6,15],[4,8],[3,4],[3,2],[4,1],[6,1],[8,3],[9,5]] }, 954: { width: 18, points: [[6,15],[2,1],[-1,-1],[16,14],[15,15],[14,15],[12,14],[8,10],[6,9],[5,9],[-1,-1],[5,9],[7,8],[8,7],[10,2],[11,1],[12,1],[13,2]] }, 955: { width: 16, points: [[1,22],[3,22],[5,21],[6,20],[14,1],[-1,-1],[8,15],[2,1]] }, 956: { width: 21, points: [[7,15],[1,-6],[-1,-1],[6,11],[5,6],[5,3],[7,1],[9,1],[11,2],[13,4],[15,8],[-1,-1],[17,15],[15,8],[14,4],[14,2],[15,1],[17,1],[19,3],[20,5]] }, 957: { width: 18, points: [[3,15],[6,15],[5,9],[4,4],[3,1],[-1,-1],[16,15],[15,12],[14,10],[12,7],[9,4],[6,2],[3,1]] }, 958: { width: 16, points: [[10,22],[8,21],[7,20],[7,19],[8,18],[11,17],[14,17],[-1,-1],[11,17],[8,16],[6,15],[5,13],[5,11],[7,9],[10,8],[12,8],[-1,-1],[10,8],[6,7],[4,6],[3,4],[3,2],[5,0],[9,-2],[10,-3],[10,-5],[8,-6],[6,-6]] }, 959: { width: 17, points: [[8,15],[6,14],[4,12],[3,9],[3,6],[4,3],[5,2],[7,1],[9,1],[11,2],[13,4],[14,7],[14,10],[13,13],[12,14],[10,15],[8,15]] }, 960: { width: 18, points: [[6,15],[2,1],[-1,-1],[16,14],[15,15],[14,15],[12,14],[8,10],[6,9],[5,9],[-1,-1],[5,9],[7,8],[8,7],[10,2],[11,1],[12,1],[13,2]] }, 960: { width: 22, points: [[9,15],[5,1],[-1,-1],[14,15],[15,9],[16,4],[17,1],[-1,-1],[2,12],[4,14],[7,15],[20,15]] }, 961: { width: 18, points: [[4,9],[4,6],[5,3],[6,2],[8,1],[10,1],[12,2],[14,4],[15,7],[15,10],[14,13],[13,14],[11,15],[9,15],[7,14],[5,12],[4,9],[0,-6]] }, 962: { width: 18, points: [[15,13],[14,14],[11,15],[8,15],[5,14],[4,13],[3,11],[3,9],[4,7],[6,5],[10,2],[11,0],[11,-2],[10,-3],[8,-3]] }, 963: { width: 18, points: [[3,15],[6,15],[5,9],[4,4],[3,1],[-1,-1],[16,15],[15,12],[14,10],[12,7],[9,4],[6,2],[3,1]] }, 963: { width: 20, points: [[18,15],[8,15],[6,14],[4,12],[3,9],[3,6],[4,3],[5,2],[7,1],[9,1],[11,2],[13,4],[14,7],[14,10],[13,13],[12,14],[10,15]] }, 964: { width: 20, points: [[11,15],[8,1],[-1,-1],[2,12],[4,14],[7,15],[18,15]] }, 965: { width: 20, points: [[1,11],[2,13],[4,15],[6,15],[7,14],[7,12],[5,6],[5,3],[7,1],[9,1],[12,2],[14,4],[16,8],[17,12],[17,15]] }, 966: { width: 22, points: [[8,14],[6,13],[4,11],[3,8],[3,5],[4,3],[5,2],[7,1],[10,1],[13,2],[16,4],[18,7],[19,10],[19,13],[17,15],[15,15],[13,13],[11,9],[9,4],[6,-6]] }, 967: { width: 18, points: [[2,15],[4,15],[6,13],[12,-4],[14,-6],[16,-6],[-1,-1],[17,15],[16,13],[14,10],[4,-1],[2,-4],[1,-6]] }, 968: { width: 23, points: [[16,22],[8,-6],[-1,-1],[1,11],[2,13],[4,15],[6,15],[7,14],[7,12],[6,7],[6,4],[7,2],[9,1],[11,1],[14,2],[16,4],[18,7],[20,12],[21,15]] }, 969: { width: 23, points: [[8,15],[6,14],[4,11],[3,8],[3,5],[4,2],[5,1],[7,1],[9,2],[11,5],[-1,-1],[12,9],[11,5],[12,2],[13,1],[15,1],[17,2],[19,5],[20,8],[20,11],[19,14],[18,15]] }, 977: { width: 21, points: [[1,11],[2,13],[4,15],[6,15],[7,14],[7,12],[6,7],[6,4],[7,2],[8,1],[10,1],[12,2],[14,5],[15,7],[16,10],[17,15],[17,18],[16,21],[14,22],[12,22],[11,20],[11,18],[12,15],[14,12],[16,10],[19,8]] }, 981: { width: 20, points: [[14,22],[6,-6],[-1,-1],[9,15],[6,14],[4,12],[3,9],[3,6],[4,4],[6,2],[9,1],[11,1],[14,2],[16,4],[17,7],[17,10],[16,12],[14,14],[11,15],[9,15]] }, 982: { width: 23, points: [[9,14],[6,13],[4,11],[3,8],[3,5],[4,2],[5,1],[7,1],[9,2],[11,5],[-1,-1],[12,9],[11,5],[12,2],[13,1],[15,1],[17,2],[19,5],[20,8],[20,11],[19,14],[18,15],[-1,-1],[2,14],[4,15],[20,15]] }, 986: { width: 18, points: [[15,13],[14,14],[11,15],[8,15],[5,14],[4,13],[3,11],[3,9],[4,7],[6,5],[10,2],[11,0],[11,-2],[10,-3],[8,-3]] }, // Hershey math symbols 8501: { width: 20, points: [[3,19],[4,17],[16,5],[17,3],[17,1],[-1,-1],[4,16],[16,4],[-1,-1],[3,19],[3,17],[4,15],[16,3],[17,1],[-1,-1],[8,12],[4,8],[3,6],[3,4],[4,2],[3,1],[-1,-1],[3,6],[5,2],[-1,-1],[4,8],[4,6],[5,4],[5,2],[3,1],[-1,-1],[11,9],[16,14],[-1,-1],[14,19],[14,16],[15,14],[17,14],[17,16],[15,17],[14,19],[-1,-1],[14,19],[15,16],[17,14]] }, 8592: { width: 26, points: [[7,12],[4,10],[7,8],[-1,-1],[10,15],[5,10],[10,5],[-1,-1],[5,10],[22,10]] }, 8593: { width: 16, points: [[6,16],[8,19],[10,16],[-1,-1],[3,13],[8,18],[13,13],[-1,-1],[8,18],[8,1]] }, 8594: { width: 26, points: [[19,12],[22,10],[19,8],[-1,-1],[16,15],[21,10],[16,5],[-1,-1],[4,10],[21,10]] }, 8595: { width: 16, points: [[6,4],[8,1],[10,4],[-1,-1],[3,7],[8,2],[13,7],[-1,-1],[8,19],[8,2]] }, 8706: { width: 19, points: [[15,10],[14,13],[13,14],[11,15],[9,15],[6,14],[4,11],[3,8],[3,5],[4,3],[5,2],[7,1],[9,1],[12,2],[14,4],[15,7],[16,12],[16,17],[15,20],[14,21],[12,22],[9,22],[7,21],[6,20],[6,19],[7,19],[7,20],[-1,-1],[9,15],[7,14],[5,11],[4,8],[4,4],[5,2],[-1,-1],[9,1],[11,2],[13,4],[14,7],[15,12],[15,17],[14,20],[12,22]] }, 8710: { width: 20, points: [[2,1],[10,22],[-1,-1],[17,1],[10,20],[-1,-1],[18,1],[10,22],[-1,-1],[2,1],[18,1],[-1,-1],[3,2],[17,2]] }, 8711: { width: 20, points: [[2,22],[10,1],[-1,-1],[3,22],[10,3],[-1,-1],[18,22],[10,1],[-1,-1],[2,22],[18,22],[-1,-1],[3,21],[17,21]] }, 8712: { width: 24, points: [[20,18],[13,18],[9,17],[7,16],[5,14],[4,11],[4,9],[5,6],[7,4],[9,3],[13,2],[20,2],[-1,-1],[4,10],[16,10]] }, 8713: { width: 24, points: [[20,18],[13,18],[9,17],[7,16],[5,14],[4,11],[4,9],[5,6],[7,4],[9,3],[13,2],[20,2],[-1,-1],[4,10],[16,10],[-1,-1],[18,19],[6,1]] }, 8719: { width: 34, points: [[7,26],[7,-6],[-1,-1],[8,26],[8,-6],[-1,-1],[26,26],[26,-6],[-1,-1],[27,26],[27,-6],[-1,-1],[3,26],[31,26],[-1,-1],[3,-6],[12,-6],[-1,-1],[22,-6],[31,-6]] }, 8721: { width: 31, points: [[5,26],[15,12],[4,-6],[-1,-1],[4,26],[14,12],[-1,-1],[3,26],[14,11],[-1,-1],[3,26],[26,26],[28,19],[25,26],[-1,-1],[5,-5],[26,-5],[-1,-1],[4,-6],[26,-6],[28,1],[25,-6]] }, 8728: { width: 16, points: [[7,13],[5,11],[5,9],[7,7],[9,7],[11,9],[11,11],[9,13],[7,13]] }, 8729: { width: 16, points: [[7,13],[5,11],[5,9],[7,7],[9,7],[11,9],[11,11],[9,13],[7,13],[-1,-1],[7,12],[6,11],[6,9],[7,8],[9,8],[10,9],[10,11],[9,12],[7,12],[-1,-1],[8,11],[7,10],[8,9],[9,10],[8,11]] }, 8730: { width: 22, points: [[3,15],[7,15],[13,3],[-1,-1],[6,15],[13,1],[-1,-1],[22,26],[13,1]] }, 8733: { width: 25, points: [[21,5],[19,5],[17,6],[15,8],[12,12],[11,13],[9,14],[7,14],[5,13],[4,11],[4,9],[5,7],[7,6],[9,6],[11,7],[12,8],[15,12],[17,14],[19,15],[21,15]] }, 8734: { width: 25, points: [[22,9],[21,7],[19,6],[17,6],[15,7],[14,8],[11,12],[10,13],[8,14],[6,14],[4,13],[3,11],[3,9],[4,7],[6,6],[8,6],[10,7],[11,8],[14,12],[15,13],[17,14],[19,14],[21,13],[22,11],[22,9]] }, 8745: { width: 24, points: [[4,2],[4,9],[5,13],[6,15],[8,17],[11,18],[13,18],[16,17],[18,15],[19,13],[20,9],[20,2]] }, 8746: { width: 24, points: [[4,18],[4,11],[5,7],[6,5],[8,3],[11,2],[13,2],[16,3],[18,5],[19,7],[20,11],[20,18]] }, 8747: { width: 24, points: [[21,25],[20,24],[21,23],[22,24],[22,25],[21,26],[19,26],[17,25],[15,23],[14,21],[13,18],[12,14],[10,2],[9,-2],[8,-4],[-1,-1],[16,24],[15,22],[14,18],[12,6],[11,2],[10,-1],[9,-3],[7,-5],[5,-6],[3,-6],[2,-5],[2,-4],[3,-3],[4,-4],[3,-5]] }, 8771: { width: 24, points: [[3,10],[3,11],[4,13],[6,14],[8,14],[10,13],[14,11],[16,10],[18,10],[20,11],[22,13],[22,14],[-1,-1],[3,6],[22,6]] }, 8776: { width: 24, points: [[3,10],[3,11],[4,13],[6,14],[8,14],[10,13],[14,11],[16,10],[18,10],[20,11],[22,13],[22,14],[-1,-1],[3,4],[3,5],[4,7],[6,8],[8,8],[10,7],[14,5],[16,4],[18,4],[20,5],[22,7],[22,8]] }, 8800: { width: 24, points: [[18,19],[6,1],[-1,-1],[3,12],[20,12],[-1,-1],[3,6],[20,6]] }, 8804: { width: 24, points: [[20,4],[4,11],[20,18],[-1,-1],[4,0],[20,0]] }, 8805: { width: 24, points: [[4,4],[20,11],[4,18],[-1,-1],[4,0],[20,0]] }, 8834: { width: 24, points: [[20,18],[13,18],[9,17],[7,16],[5,14],[4,11],[4,9],[5,6],[7,4],[9,3],[13,2],[20,2]] }, 8835: { width: 24, points: [[4,18],[11,18],[15,17],[17,16],[19,14],[20,11],[20,9],[19,6],[17,4],[15,3],[11,2],[4,2]] }, 8838: { width: 24, points: [[20,20],[13,20],[9,19],[7,18],[5,16],[4,13],[4,11],[5,8],[7,6],[9,5],[13,4],[20,4],[-1,-1],[4,0],[20,0]] }, 8839: { width: 24, points: [[4,20],[11,20],[15,19],[17,18],[19,16],[20,13],[20,11],[19,8],[17,6],[15,5],[11,4],[4,4],[-1,-1],[4,0],[20,0]] }, 8853: { width: 20, points: [[9,17],[6,16],[4,14],[3,11],[3,9],[4,6],[6,4],[9,3],[11,3],[14,4],[16,6],[17,9],[17,11],[16,14],[14,16],[11,17],[9,17],[-1,-1],[5,10],[15,10],[-1,-1],[10,5],[10,15]] }, 8855: { width: 20, points: [[9,17],[6,16],[4,14],[3,11],[3,9],[4,6],[6,4],[9,3],[11,3],[14,4],[16,6],[17,9],[17,11],[16,14],[14,16],[11,17],[9,17],[-1,-1],[6,6],[14,14],[-1,-1],[14,6],[6,14]] }, 8857: { width: 20, points: [[9,17],[6,16],[4,14],[3,11],[3,9],[4,6],[6,4],[9,3],[11,3],[14,4],[16,6],[17,9],[17,11],[16,14],[14,16],[11,17],[9,17],[-1,-1],[10,11],[9,10],[10,9],[11,10],[10,11]] }, 9737: { width: 27, points: [[12,22],[9,21],[6,19],[4,16],[3,13],[3,10],[4,7],[6,4],[9,2],[12,1],[15,1],[18,2],[21,4],[23,7],[24,10],[24,13],[23,16],[21,19],[18,21],[15,22],[12,22],[-1,-1],[13,13],[12,12],[12,11],[13,10],[14,10],[15,11],[15,12],[14,13],[13,13],[-1,-1],[13,12],[13,11],[14,11],[14,12],[13,12]] }, // Miscellaneous glyphs (EAM) 176: { width: 14, points: [[6,22],[4,21],[3,19],[3,17],[4,15],[6,14],[8,14],[10,15],[11,17],[11,19],[10,21],[8,22],[6,22]] }, 177: { width: 20, points: [[10,15],[10,5],[-1,-1],[4,10],[16,10],[-1,-1],[4,2],[16,2]] }, 181: { width: 0, points: [[-99,956]] }, 183: { width: 10, points: [[5,11],[4,10],[5,9],[6,10],[5,11]] }, 188: { width: 23, points: [[4,0],[16,20],[-1,-1],[2,18],[4,20],[4,10],[-1,-1],[21,3],[12,3],[17,12],[18,12],[18,-1]] }, 189: { width: 23, points: [[4,0],[16,20],[-1,-1],[2,18],[4,20],[4,10],[-1,-1],[14,8],[16,10],[18,10],[20,8],[20,6],[14,1],[14,0],[21,0]] }, 215: { width: 20, points: [[4,16],[16,4],[-1,-1],[4,4],[16,16]] }, 402: { width: 15, points: [[15,21],[14,20],[15,19],[16,20],[16,21],[15,22],[13,22],[11,21],[10,20],[9,18],[8,15],[5,1],[4,-3],[3,-5],[-1,-1],[13,22],[11,20],[10,18],[9,14],[7,5],[6,1],[5,-2],[4,-4],[3,-5],[1,-6],[-1,-6],[-2,-5],[-2,-4],[-1,-3],[0,-4],[-1,-5],[-1,-1],[4,15],[14,15]] }, 8242: { width: 8, points: [[5,24],[3,16],[-1,-1],[3,16],[6,24]] }, 8243: { width: 11, points: [[4,24],[2,16],[-1,-1],[2,16],[5,24],[-1,-1],[9,24],[7,16],[-1,-1],[7,16],[10,24]] }, 8463: { width: 21, points: [[9,22],[3,1],[-1,-1],[5,7],[7,11],[9,13],[11,14],[13,14],[15,14],[16,12],[16,10],[14,5],[14,2],[15,1],[19,3],[-1,-1],[7,21],[9,22],[-1,-1],[4,15],[14,20]] }, 8491: { width: 0, points: [[-99,197]] }, 8495: { width: 18, points: [[4,6],[8,7],[11,8],[14,10],[15,12],[14,14],[12,15],[9,15],[6,14],[4,11],[3,8],[3,5],[4,3],[5,2],[7,1],[9,1],[12,2],[14,4],[-1,-1],[9,15],[7,14],[5,11],[4,8],[4,4],[5,2]] }, // Used to indicate missing glyph 129: { width: 18, points: [[2,-2],[2,21],[16,21],[16,-2],[2,-2]] } }; CanvasTextFunctions.letter = function (ch) { glyph = CanvasTextFunctions.letters[ch]; // EAM - Draw an empty box for undefined glyphs if (glyph == undefined) glyph = CanvasTextFunctions.letters[129]; return glyph; } CanvasTextFunctions.ascent = function( font, size) { return size; } CanvasTextFunctions.descent = function( font, size) { return 7.0*size/25.0; } CanvasTextFunctions.measure = function( font, size, str) { var total = 0; var len = str.length; for ( i = 0; i < len; i++) { var index = str.charAt(i); // EAM deal with non-ascii characaters if (index > '~') index = str.charCodeAt(i); var c = CanvasTextFunctions.letter(index); if (!c) break; total += c.width * size / 25.0; if (c.width == 0) { for ( j = 0; j < c.points.length; j++) { var a = c.points[j]; if (a[0] == -99) total += CanvasTextFunctions.letter(a[1]).width * size / 25.0; } } } return total; } CanvasTextFunctions.draw = function(ctx,font,size,x,y,str) { var total = 0; var len = str.length; var mag = size / 25.0; var composite = 0; var xorig = x; ctx.save(); ctx.lineCap = "round"; ctx.lineWidth = 2.0 * mag; for (var i = 0; i < len; i++) { var index = str.charAt(i); // EAM tab and newline if (index == ' ') { var tabstop = 48 * mag; x = tabstop * Math.ceil(x/tabstop); continue; } else if (index < ' ') { x = xorig; y += size; continue; } // EAM deal with non-ascii characaters if (index > '~') index = str.charCodeAt(i); // EAM allow composing characters if (composite != 0) { index = composite; composite = 0; } var c = CanvasTextFunctions.letter(index); if ( !c) continue; ctx.beginPath(); var penUp = 1; var needStroke = 0; for (var j = 0; j < c.points.length; j++) { var a = c.points[j]; if ( a[0] == -1 && a[1] == -1) { penUp = 1; continue; } if ( a[0] == -99 ) { composite = a[1]; i--; break; } if ( penUp) { ctx.moveTo( x + a[0]*mag, y - a[1]*mag); penUp = false; } else { ctx.lineTo( x + a[0]*mag, y - a[1]*mag); } } ctx.stroke(); x += c.width*mag; } ctx.restore(); return total; } CanvasTextFunctions.enable = function( ctx) { ctx.drawText = function(font,size,x,y,text) { return CanvasTextFunctions.draw( ctx, font,size,x,y,text); }; ctx.measureText = function(font,size,text) { return CanvasTextFunctions.measure( font,size,text); }; ctx.fontAscent = function(font,size) { return CanvasTextFunctions.ascent(font,size); } ctx.fontDescent = function(font,size) { return CanvasTextFunctions.descent(font,size); } ctx.drawTextRight = function(font,size,x,y,text) { var w = CanvasTextFunctions.measure(font,size,text); return CanvasTextFunctions.draw( ctx, font,size,x-w,y,text); }; ctx.drawTextCenter = function(font,size,x,y,text) { var w = CanvasTextFunctions.measure(font,size,text); return CanvasTextFunctions.draw( ctx, font,size,x-w/2,y,text); }; } gnuplot-4.6.4/term/js/gnuplot_svg.js0000644000471100001440000001362411663021664014434 0ustar /* * $Id: gnuplot_svg.js,v 1.8 2011/11/22 22:35:32 sfeam Exp $ */ // Javascript routines for interaction with SVG documents produced by // gnuplot's SVG terminal driver. var gnuplot_svg = { }; gnuplot_svg.version = "22 November 2011"; gnuplot_svg.SVGDoc = null; gnuplot_svg.SVGRoot = null; gnuplot_svg.Init = function(e) { gnuplot_svg.SVGDoc = e.target.ownerDocument; gnuplot_svg.SVGRoot = gnuplot_svg.SVGDoc.documentElement; gnuplot_svg.axisdate = new Date(); } gnuplot_svg.toggleVisibility = function(evt, targetId) { var newTarget = evt.target; if (targetId) newTarget = gnuplot_svg.SVGDoc.getElementById(targetId); var newValue = newTarget.getAttributeNS(null, 'visibility') if ('hidden' != newValue) newValue = 'hidden'; else newValue = 'visible'; newTarget.setAttributeNS(null, 'visibility', newValue); evt.preventDefault(); evt.stopPropagation(); } // Mouse tracking echos coordinates to a floating text box gnuplot_svg.getText = function() { return(document.getElementById("coord_text")); } gnuplot_svg.updateCoordBox = function(t, evt) { /* * Apply screen CTM transformation to the evt screenX and screenY to get * coordinates in SVG coordinate space. Use scaling parameters stored in * the plot document by gnuplot to convert further into plot coordinates. * Then position the floating text box using the SVG coordinates. */ var m = document.documentElement.getScreenCTM(); var p = document.documentElement.createSVGPoint(); p.x = evt.clientX; p.y = evt.clientY; p = p.matrixTransform(m.inverse()); // Allow for scrollbar position (Firefox, others?) if (typeof evt.pageX != 'undefined') { p.x = evt.pageX; p.y = evt.pageY; } t.setAttribute("x", p.x); t.setAttribute("y", p.y); plotcoord = gnuplot_svg.mouse2plot(p.x,p.y); if (gnuplot_svg.polar_mode) { polar = gnuplot_svg.convert_to_polar(plotcoord.x,plotcoord.y); label_x = "ang= " + polar.ang.toPrecision(4); label_y = "R= " + polar.r.toPrecision(4); } else if (gnuplot_svg.plot_timeaxis_x == "Date") { gnuplot_svg.axisdate.setTime(1000. * (plotcoord.x + 946684800)); year = gnuplot_svg.axisdate.getUTCFullYear(); month = gnuplot_svg.axisdate.getUTCMonth(); date = gnuplot_svg.axisdate.getUTCDate(); label_x = (" " + date).slice (-2) + "/" + ("0" + (month+1)).slice (-2) + "/" + year; label_y = plotcoord.y.toFixed(2); } else if (gnuplot_svg.plot_timeaxis_x == "Time") { gnuplot_svg.axisdate.setTime(1000. * (plotcoord.x + 946684800)); hour = gnuplot_svg.axisdate.getUTCHours(); minute = gnuplot_svg.axisdate.getUTCMinutes(); second = gnuplot_svg.axisdate.getUTCSeconds(); label_x = ("0" + hour).slice (-2) + ":" + ("0" + minute).slice (-2) + ":" + ("0" + second).slice (-2); label_y = plotcoord.y.toFixed(2); } else if (gnuplot_svg.plot_timeaxis_x == "DateTime") { gnuplot_svg.axisdate.setTime(1000. * (plotcoord.x + 946684800)); label_x = gnuplot_svg.axisdate.toUTCString(); label_y = plotcoord.y.toFixed(2); } else { label_x = plotcoord.x.toFixed(2); label_y = plotcoord.y.toFixed(2); } while (null != t.firstChild) { t.removeChild(t.firstChild); } var textNode = document.createTextNode(". "+label_x+" "+label_y); t.appendChild(textNode); } gnuplot_svg.showCoordBox = function(evt) { var t = gnuplot_svg.getText(); if (null != t) { t.setAttribute("visibility", "visible"); gnuplot_svg.updateCoordBox(t, evt); } } gnuplot_svg.moveCoordBox = function(evt) { var t = gnuplot_svg.getText(); if (null != t) gnuplot_svg.updateCoordBox(t, evt); } gnuplot_svg.hideCoordBox = function(evt) { var t = gnuplot_svg.getText(); if (null != t) t.setAttribute("visibility", "hidden"); } gnuplot_svg.toggleCoordBox = function(evt) { var t = gnuplot_svg.getText(); if (null != t) { state = t.getAttribute('visibility'); if ('hidden' != state) state = 'hidden'; else state = 'visible'; t.setAttribute('visibility', state); } } gnuplot_svg.toggleGrid = function() { if (!gnuplot_svg.SVGDoc.getElementsByClassName) // Old browsers return; var grid = gnuplot_svg.SVGDoc.getElementsByClassName('gridline'); for (var i=0; i In order for viewers to use your plot document, they must be able to access the *.css and *.js files via the URL embedded in the document. 4) Creating a web page with multiple mouseable plots In order to embed multiple plots in a single document, you must provide your own html framework. You can use the one created by the canvas driver in standalone mode as a starting point, including the references to gnuplot_mouse.css and gnuplot_mouse.js. However, instead of a single javascript routine named gnuplot_canvas() that always draws the same plot, you must provide a wrapper routine with the same name that connects the mousing code to whichever plot is currently active. Here is an example: - create the individual plots as separate javascript files set term canvas name 'plot1' set output 'plot1.js' plot something set term canvas name 'plot2' set output 'plot2.js' plot something_else - create your html wrapper, including a script block such as the one below. You must use these specific variable names, as they are referenced by the javascript code produced by the canvas terminal. - add one or more mousing output tables. As a model, you can use either the one in a standalone plot or the file .../demo/html/mousebox.template. The table id and text span ids in the "mousebox" table must match the ones by your individual plots in order for mousing readout to work. - each of the individual plots in the document should be explicitly called when the document is loaded. For example, for each plot there could be a block of html similar to the following: Alternatively, the onload attributes could be set in the html element - Ethan A Merritt (sfeam@users.sourceforge.net) May 2009 gnuplot-4.6.4/term/js/gnuplot_dashedlines.js0000644000471100001440000000377111474042444016121 0ustar /* * $Id: gnuplot_dashedlines.js,v 1.2 2010/11/26 23:39:16 sfeam Exp $ */ /* * Ethan Merritt November 2010 * Add a dashed line method to gnuplot's HTML5 canvas toolset. * To start a path use DS(x0,y0) instead of M(x0,y0) * To draw line segments use DL(x,y) instead of L(x,y) * Finish as usual with ctx.stroke(); ctx.closePath(); */ gnuplot.solid = []; gnuplot.dashpattern1 = gnuplot.solid; gnuplot.dashpattern2 = [ 0.5, 1.0 ]; gnuplot.dashpattern3 = [ .12, .25, .37, .50, .62, .75, .87, 1.0 ]; gnuplot.dashpattern4 = [ 0.50, 0.70, 0.80, 1.0 ]; gnuplot.dashpattern5 = [ 0.30, 0.50, 0.60, 0.75, 0.85, 1.0 ]; gnuplot.dashlength = 200.; // length of one complete pattern gnuplot.dashfraction = 0; // how far in the pattern we got last time gnuplot.dash_x = 0; gnuplot.dash_y = 0; gnuplot.dashtype = function(dt) { gnuplot.pattern = dt; } gnuplot.dashstart = function(x,y) { gnuplot.dash_x = x; gnuplot.dash_y = y; gnuplot.dashfraction = 0; gnuplot.M(x,y); } gnuplot.dashstep = function(x,y) { var delx = x - gnuplot.dash_x; var dely = y - gnuplot.dash_y; var stride = Math.sqrt(delx*delx + dely*dely) / gnuplot.dashlength; var this_step; if (gnuplot.pattern.length == 0) {gnuplot.L(x,y); return;} while (stride > 0) { // Find which piece of the pattern we are in for (i=0; gnuplot.pattern[i] <= gnuplot.dashfraction; i++); this_step = gnuplot.pattern[i] - gnuplot.dashfraction; if (stride > this_step) { new_x = gnuplot.dash_x + delx*this_step/stride; new_y = gnuplot.dash_y + dely*this_step/stride; stride = stride - this_step; gnuplot.dashfraction = gnuplot.pattern[i]; delx = x - new_x; dely = y - new_y; } else { new_x = x; new_y = y; gnuplot.dashfraction = gnuplot.dashfraction + stride; stride = 0; } if (i%2==0) gnuplot.L(new_x,new_y); else gnuplot.M(new_x,new_y); gnuplot.dash_x = new_x; gnuplot.dash_y = new_y; if (gnuplot.dashfraction >= 1.0) gnuplot.dashfraction = 0; } } gnuplot-4.6.4/term/js/gnuplot_common.js0000644000471100001440000001306311641511310015106 0ustar /* * $Id: gnuplot_common.js,v 1.9 2011/10/01 04:10:48 sfeam Exp $ */ // Shared routines for gnuplot's HTML5 canvas terminal driver. var gnuplot = { }; gnuplot.common_version = "30 September 2011"; gnuplot.L = function (x,y) { if (gnuplot.zoomed) { zoom = gnuplot.zoomXY(x/10.0,y/10.0); ctx.lineTo(zoom.x,zoom.y); } else ctx.lineTo(x/10.0,y/10.0); } gnuplot.M = function (x,y) { if (gnuplot.zoomed) { zoom = gnuplot.zoomXY(x/10.0,y/10.0); ctx.moveTo(zoom.x,zoom.y); } else ctx.moveTo(x/10.0,y/10.0); } gnuplot.R = function (x,y,w,h) { if (gnuplot.zoomed) { var dx, dy, dw, dh; zoom = gnuplot.zoomXY(x/10.0,y/10.0); if (zoom.x >= gnuplot.plot_xmax) return; if (zoom.y >= gnuplot.plot_ybot) return; dx = zoom.x; dy = zoom.y; zoom = gnuplot.zoomXY((x+w)/10.,(y+h)/10.); if (zoom.xraw <= gnuplot.plot_xmin) return; if (zoom.yraw <= gnuplot.plot_ytop) return; dw = zoom.x - dx; dh = zoom.y -dy; ctx.fillRect(dx, dy, dw, dh); } else ctx.fillRect(x/10.0, y/10.0, w/10.0, h/10.0); } gnuplot.T = function (x,y,fontsize,justify,string) { xx = x/10.0; yy = y/10.0; if (gnuplot.zoomed) { zoom = gnuplot.zoomXY(xx,yy); if (zoom.clip) return; xx = zoom.x; yy = zoom.y; if (gnuplot.plot_xmin < xx && xx < gnuplot.plot_xmax && gnuplot.plot_ybot > yy && yy > gnuplot.plot_ytop) if ((typeof(gnuplot.zoom_text) != "undefined") && (gnuplot.zoom_text == true)) fontsize = Math.sqrt(gnuplot.zoomW(fontsize)*gnuplot.zoomH(fontsize)); } if (justify=="") ctx.drawText("sans", fontsize, xx, yy, string); else if (justify=="Right") ctx.drawTextRight("sans", fontsize, xx, yy, string); else if (justify=="Center") ctx.drawTextCenter("sans", fontsize, xx, yy, string); } gnuplot.TR = function (x,y,angle,fontsize,justify,string) { xx = x/10.0; yy = y/10.0; if (gnuplot.zoomed) { zoom = gnuplot.zoomXY(xx,yy); if (zoom.clip) return; xx = zoom.x; yy = zoom.y; if (gnuplot.plot_xmin < xx && xx < gnuplot.plot_xmax && gnuplot.plot_ybot > yy && yy > gnuplot.plot_ytop) if ((typeof(gnuplot.zoom_text) != "undefined") && (gnuplot.zoom_text == true)) fontsize = Math.sqrt(gnuplot.zoomW(fontsize)*gnuplot.zoomH(fontsize)); } ctx.save(); ctx.translate(xx,yy); ctx.rotate(angle * Math.PI / 180); if (justify=="") ctx.drawText("sans", fontsize, 0, 0, string); else if (justify=="Right") ctx.drawTextRight("sans", fontsize, 0, 0, string); else if (justify=="Center") ctx.drawTextCenter("sans", fontsize, 0, 0, string); ctx.restore(); } gnuplot.bp = function (x,y) // begin polygon { ctx.beginPath(); gnuplot.M(x,y); } gnuplot.cfp = function () // close and fill polygon { ctx.closePath(); ctx.fill(); } gnuplot.cfsp = function () // close and fill polygon with stroke color { ctx.closePath(); ctx.fillStyle = ctx.strokeStyle; ctx.stroke(); ctx.fill(); } gnuplot.Dot = function (x,y) { xx = x; yy = y; if (gnuplot.zoomed) {zoom = gnuplot.zoomXY(xx,yy); xx = zoom.x; yy = zoom.y; if (zoom.clip) return;} ctx.strokeRect(xx,yy,0.5,0.5); } gnuplot.Pt = function (N,x,y,w) { xx = x; yy = y; if (gnuplot.zoomed) {zoom = gnuplot.zoomXY(xx,yy); xx = zoom.x; yy = zoom.y; if (zoom.clip) return;} if (w==0) return; switch (N) { case 0: ctx.beginPath(); ctx.moveTo(xx-w,yy); ctx.lineTo(xx+w,yy); ctx.moveTo(xx,yy-w); ctx.lineTo(xx,yy+w); ctx.stroke(); break; case 1: ww = w * 3/4; ctx.beginPath(); ctx.moveTo(xx-ww,yy-ww); ctx.lineTo(xx+ww,yy+ww); ctx.moveTo(xx+ww,yy-ww); ctx.lineTo(xx-ww,yy+ww); ctx.stroke(); break; case 2: gnuplot.Pt(0,x,y,w); gnuplot.Pt(1,x,y,w); break; case 3: ctx.strokeRect(xx-w/2,yy-w/2,w,w); break; case 4: ctx.save(); ctx.strokeRect(xx-w/2,yy-w/2,w,w); ctx.restore(); ctx.fillRect(xx-w/2,yy-w/2,w,w); break; case 5: ctx.beginPath(); ctx.arc(xx,yy,w/2,0,Math.PI*2,true); ctx.stroke(); break; default: case 6: ctx.beginPath(); ctx.arc(xx,yy,w/2,0,Math.PI*2,true); ctx.fill(); break; case 7: ctx.beginPath(); ctx.moveTo(xx,yy-w); ctx.lineTo(xx-w,yy+w/2); ctx.lineTo(xx+w,yy+w/2); ctx.closePath(); ctx.stroke(); break; case 8: ctx.beginPath(); ctx.moveTo(xx,yy-w); ctx.lineTo(xx-w,yy+w/2); ctx.lineTo(xx+w,yy+w/2); ctx.closePath(); ctx.fill(); break; } } // Zoomable image gnuplot.ZI = function (image, m, n, x1, y1, x2, y2) { if (gnuplot.zoomed) { var sx, sy, sw, sh, dx, dy, dw, dh; zoom = gnuplot.zoomXY(x1/10.0,y1/10.0); if (zoom.x >= gnuplot.plot_xmax) return; if (zoom.y >= gnuplot.plot_ybot) return; x1raw = zoom.xraw; y1raw = zoom.yraw; dx = zoom.x; dy = zoom.y; zoom = gnuplot.zoomXY((x2)/10.,(y2)/10.); if (zoom.xraw <= gnuplot.plot_xmin) return; if (zoom.yraw <= gnuplot.plot_ytop) return; x2raw = zoom.xraw; y2raw = zoom.yraw; dw = zoom.x - dx; dh = zoom.y - dy; // FIXME: This is sometimes flaky. Needs integer truncation? sx = 0; sy = 0; sw = m; sh = n; if (x1raw < dx) sx = m * (dx - x1raw) / (x2raw - x1raw); if (y1raw < dy) sy = n * (dy - y1raw) / (y2raw - y1raw); if (x2raw > zoom.x) sw = m * (1. - ((x2raw - zoom.x) / (x2raw - x1raw))); if (y2raw > zoom.y) sh = n * (1. - ((y2raw - zoom.y) / (y2raw - y1raw))); sw = sw - sx; sh = sh - sy; ctx.drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh); } else ctx.drawImage(image, x1/10.0, y1/10.0, (x2-x1)/10.0, (y2-y1)/10.0); } // These methods are place holders that are loaded by gnuplot_dashedlines.js gnuplot.dashtype = function (dt) {} ; gnuplot.dashstart = function (x,y) {gnuplot.M(x,y);} ; gnuplot.dashstep = function (x,y) {gnuplot.L(x,y);} ; gnuplot.pattern = []; gnuplot-4.6.4/term/js/gnuplot_mouse.css0000644000471100001440000000217411641240151015125 0ustar canvas { border:0; background-color: white; } td.mousebox { vertical-align: top; } td.mbh { height: 16pt; } td.mb0 { text-align: left; font-size: smaller; width: 20px; padding-left: 15px; color:#000; background-color: #EEE} td.mb1 { text-align: left; font-size: smaller; width: 80px; padding-left: 15px; color:#070; background-color: #EEE} td.icon { width: 16px; height: 16px; font-size: 14px; text-align: right; background-color: #EEE} td.blank { height: 16px; font-size: 12pt; text-align: right; background-color: #EEE} .icon-image { float:right; margin: 0 0 0 0; } .noborder { border: 0; vertical-align: text-top; } table.mbleft { border-collapse: collapse; border: 0; margin-left: auto; margin-right: auto; } table.mbright { border-collapse: collapse; border: 0; margin-left: 0; margin-right: auto; } table.mbunder { border-collapse: collapse; border: 0; margin-left: auto; margin-right: auto; } table.plot { border-collapse: collapse; border: 0; margin-left: auto; margin-right: auto; } table.mousebox { border-collapse: collapse; margin-left: 0; margin-right: 10px; border: 0; } div.gnuplot { background-color: white; } gnuplot-4.6.4/term/js/grid.png0000644000471100001440000000026411136512032013143 0ustar PNG  IHDRasBIT|dtEXtSoftwarewww.inkscape.org<FIDAT8c?% 6d~Co1~F@/|$Hiv|4bIENDB`gnuplot-4.6.4/term/pm.trm0000644000471100001440000010144411347263326012253 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: pm.trm,v 1.56 2010/03/14 22:44:38 sfeam Exp $ */ /* GNUPLOT - pm.trm */ /*[ * Copyright 1992, 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * pm.trm --- inboard terminal driver for Presentation Manager * --- after X-11 driver, by R.W.Fearick 31/1/92. * v1.1 11/8/92 -- speed things up * * since March 1998: additions for mouse support implemented by Petr Mikulik * last change: January 2000 * for mouse support, pm.trm has to be compiled with USE_MOUSE, e.g. * gcc ... -DUSE_MOUSE ... * January 1999: terminal entries for PM3D functionality by Petr Mikulik */ #include "driver.h" #ifdef TERM_REGISTER register_term(pm) #endif #ifdef TERM_PROTO TERM_PUBLIC void PM_init __PROTO((void)); TERM_PUBLIC void PM_options __PROTO((void)); TERM_PUBLIC void PM_reset __PROTO((void)); TERM_PUBLIC void PM_text __PROTO((void)); TERM_PUBLIC void PM_graphics __PROTO((void)); TERM_PUBLIC void PM_linetype __PROTO((int lt)); TERM_PUBLIC void PM_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void PM_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC int PM_text_angle __PROTO((int ang)); TERM_PUBLIC void PM_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int PM_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void PM_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void PM_suspend __PROTO((void)); TERM_PUBLIC void PM_resume __PROTO((void)); TERM_PUBLIC void PM_fillbox __PROTO((int style, unsigned int x, unsigned int y, unsigned int w, unsigned int h)); TERM_PUBLIC void PM_linewidth __PROTO((double linewidth)); #ifdef USE_MOUSE TERM_PUBLIC void PM_set_ruler __PROTO((int, int)); TERM_PUBLIC void PM_set_cursor __PROTO((int, int, int)); TERM_PUBLIC void PM_put_tmptext __PROTO((int, const char str[])); TERM_PUBLIC void PM_set_clipboard __PROTO((const char[])); #endif TERM_PUBLIC int PM_make_palette (t_sm_palette *); TERM_PUBLIC void PM_set_color (t_colorspec *); TERM_PUBLIC void PM_filled_polygon (int, gpiPoint *); TERM_PUBLIC void PM_image __PROTO((unsigned int, unsigned int, coordval *, gpiPoint *, t_imagecolor)); #ifndef PM_OLD_ENHANCED_TEXT /* To support "set term pm enhanced" */ TERM_PUBLIC void PM_enhanced_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void PM_enhanced_open __PROTO((char * fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint)); TERM_PUBLIC void PM_enhanced_flush __PROTO((void)); #endif /* define PM world coordinate limits */ #define PM_XMAX 19500 #define PM_YMAX 12500 /* approximations for typical font/screen sizes */ # define PM_VCHAR (550) # define PM_HCHAR (220) # define PM_VTIC (125) # define PM_HTIC (130) #endif #ifdef TERM_BODY #include #include #include #define INCL_DOSPROCESS #define INCL_DOSSEMAPHORES #define INCL_DOSMISC #define INCL_DOSMODULEMGR #include #include "os2/pm_msgs.h" #define PM_nopts 1 /* path for pm program */ static char PM_path[256] = ""; /* track mode to avoid redraw after hitting break */ static int PM_mode = 0; static HEV hev; static int PM_termmode = 0; static int PM_must_reset_opts = FALSE; static int PM_must_abort = 0; static char PM_opts[256] = ""; static int PM_optargs = 0; static int PM_plot_number = 0; static char PM_term_title[128] = ""; static int mouseGnupmdrv = 0; /* PM set to 1 if we are connected to a mouseable gnupmdrv */ static FILE *PM_pipe = NULL; static FILE *PM_savepipe = NULL; #ifndef PM_OLD_ENHANCED_TEXT /* track current state of pm terminal */ /* this is only needed for enhanced text */ static char * PM_font = NULL; static double PM_fontsize = 12.0; static unsigned int PM_x = 0; static unsigned int PM_y = 0; static enum JUSTIFY PM_justification = LEFT; static double PM_angle = 0.; /* unit is radian */ /* state variables for enhanced text processing */ static TBOOLEAN ENHpm_opened_string; static TBOOLEAN ENHpm_show = TRUE; static int ENHpm_overprint = 0; static TBOOLEAN ENHpm_widthflag = TRUE; static TBOOLEAN ENHpm_sizeonly = FALSE; static double ENHpm_base; #endif static void PM_reset_opts(void); static void PM_query(void); static void PM_make_servername(char *); static void PM_abortplot(); static void PM_query_font(void); TERM_PUBLIC void PM_init() { static char buffer[1024]; int pid; int rc; int spawnmode; PPIB pib; PTIB tib; char semname[32]; char pipename[32]; char tempname[32]; term_force_init = TRUE; if (PM_savepipe != NULL && PM_termmode == 0) { PM_pipe = PM_savepipe; } if ((PM_pipe == NULL) && (PM_termmode & 2)) { /* check if term is running */ PM_make_servername(tempname); strcpy(pipename, "\\pipe\\"); strcat(pipename, tempname); /* sprintf( pipename, "\\pipe\\gpServ%d", PM_plot_number ) ; */ DosGetInfoBlocks(&tib, &pib); PM_pipe = fopen(pipename, "r+b"); if (PM_pipe != NULL) { setvbuf(PM_pipe, buffer, _IOFBF, 1024); pid = pib->pib_ulpid; fwrite(&pid, 1, 4, PM_pipe); fflush(PM_pipe); /* set new options */ /* PM_reset_opts() ; */ } } /* else we start up term here */ if (PM_pipe == NULL) { if (PM_termmode & 2) { PM_make_servername(tempname); /* sprintf( tempname, "gpServ%d", PM_plot_number ) ; */ } else { static int gpid = 0; gpid++; sprintf(tempname, "gp%X%d", getpid(), gpid); } strcpy(semname, "\\sem32\\"); strcpy(pipename, "\\pipe\\"); strcat(semname, tempname); strcat(pipename, tempname); strcat(PM_path, "\\gnupmdrv.exe"); rc = access(PM_path, 0); /* find exe file */ if (rc != 0) rc = DosSearchPath(0x0002, /* search GNUPLOT environment */ "GNUPLOT", "gnupmdrv.exe", PM_path, 256); if (rc != 0) rc = DosSearchPath(0x0003, /* then try current directory & path */ "PATH", "gnupmdrv.exe", PM_path, 256); if (rc != 0) { fputs("Cannot find gnupmdrv.exe !\n", stderr); exit(3); } rc = DosCreateEventSem(semname, &hev, 1, 0); if (rc != 0) { fputs("Cannot create semaphore !\n", stderr); exit(3); } spawnmode = P_SESSION | P_DEFAULT; if (PM_optargs != 0) spawnmode |= P_UNRELATED; pid = spawnl(spawnmode, PM_path, PM_path, tempname, PM_opts, NULL); if (pid == -1) { fputs("Cannot spawn gnupmdrv.exe !\n", stderr); exit(3); } DosGetInfoBlocks(&tib, &pib); DosWaitEventSem(hev, 10000); DosCloseEventSem(hev); PM_pipe = fopen(pipename, "r+b"); if (PM_pipe == NULL) { fputs("Cannot open pipe to gnupmdrv.exe !\n", stderr); exit(3); } else if (PM_termmode == 0) PM_savepipe = PM_pipe; setvbuf(PM_pipe, buffer, _IOFBF, 1024); pid = pib->pib_ulpid; fwrite(&pid, 1, 4, PM_pipe); fflush(PM_pipe); } else { if (PM_must_reset_opts) PM_reset_opts(); } #ifdef USE_MOUSE /* PM: notify gnupmdrv that this is mouse-enhanced terminal */ putc( GR_MOUSECAPABLE, PM_pipe ) ; fflush( PM_pipe ) ; /* we catch mouseable gnupmdrv's answer in PM_query by 0xABCD */ #endif PM_query(); } static void PM_make_servername(char *str) { if (PM_term_title[0]) { int hash = 0; char *p = PM_term_title + 1; int match = PM_term_title[0]; while (*p != match) { hash = (hash << 1) + hash + *p++; } hash %= (256 * 256 * 256 - 1); sprintf(str, "gp%x", hash); } else sprintf(str, "gpServ%d", PM_plot_number); } TERM_PUBLIC void PM_options() { int old_termmode = PM_termmode; PM_termmode = 0; term_options[0] = NUL; PM_term_title[0] = NUL; PM_opts[0] = NUL; PM_optargs = 0; while (!END_OF_COMMAND) { if (almost_equals(c_token, "pe$rsist")) { strcat(PM_opts, "-p "); strcat(term_options, "persist "); PM_termmode |= 1; PM_optargs = 1; if (!(old_termmode & 1)) PM_pipe = NULL; } else if (almost_equals(c_token, "s$erver")) { strcat(PM_opts, "-s "); strcat(term_options, "server "); PM_termmode |= 2; PM_optargs = 1; if (!(old_termmode & 2)) PM_pipe = NULL; if (isanumber(c_token + 1)) { struct value t; char *p = PM_opts + strlen(PM_opts); c_token++; PM_plot_number = (int) real(const_express(&t)); sprintf(p, "%d", PM_plot_number); sprintf(term_options + strlen(term_options), "%d", PM_plot_number); } } else if (almost_equals(c_token, "w$idelines")) { strcat(PM_opts, "-w "); strcat(term_options, "widelines "); PM_optargs = 1; } else if (almost_equals(c_token, "e$nhanced")) { strcat(term_options, "enhanced "); #ifdef PM_OLD_ENHANCED_TEXT PM_optargs = 1; strcat(PM_opts, "-e "); term->put_text = PM_put_text; #else term->put_text = PM_enhanced_put_text; #endif term->flags |= TERM_ENHANCED_TEXT; } else if (almost_equals(c_token, "noe$nhanced")) { strcat(term_options, "noenhanced "); term->put_text = PM_put_text; term->flags &= ~TERM_ENHANCED_TEXT; } else if (isstring(c_token)) { copy_str(PM_term_title, c_token, 127); } c_token++; } if (PM_term_title[0]) { strcat(PM_opts, " "); strcat(term_options, " "); strcat(PM_opts, PM_term_title); strcat(term_options, PM_term_title); } PM_must_reset_opts = TRUE; } static void PM_reset_opts() { int len; putc(SET_OPTIONS, PM_pipe); len = strlen(PM_opts) + 1; fwrite(&len, sizeof(int), 1, PM_pipe); fwrite(PM_opts, 1, len, PM_pipe); for (len = sizeof(int) - len % sizeof(int); len > 0; len--) { /* pad rest of int with zeros */ putc(NUL, PM_pipe); } fflush(PM_pipe); PM_must_reset_opts = FALSE; } static void PM_query() { int rc; ULONG cbR; putc(GR_QUERY, PM_pipe); fflush(PM_pipe); rc = DosRead(fileno(PM_pipe), &term->h_char, sizeof(int), &cbR); if (term->h_char == 0xABCD) { /* PM we have got greetings from mouseable gnupmdrv */ mouseGnupmdrv = 1; /* thus set mouseGnupmdrv on and reread h_char */ rc = DosRead( fileno(PM_pipe), &term->h_char, sizeof(int), &cbR ) ; } rc = DosRead(fileno(PM_pipe), &term->v_char, sizeof(int), &cbR); } # ifdef USE_MOUSE /* update menu items in PM terminal */ void PM_update_menu_items() { /* connected to a mouseable gnupmdrv */ if ((PM_pipe != NULL) && (mouseGnupmdrv)) { struct t_gpPMmenu gpPMmenu; PM_set_gpPMmenu(&gpPMmenu); putc(SET_MENU, PM_pipe); fwrite(&gpPMmenu, sizeof(gpPMmenu), 1, PM_pipe); } } #endif TERM_PUBLIC void PM_reset() { putc(GR_RESET, PM_pipe); fflush(PM_pipe); term_force_init = FALSE; if (PM_termmode > 0) { fclose(PM_pipe); PM_pipe = NULL; } } TERM_PUBLIC void PM_suspend() { putc(GR_SUSPEND, PM_pipe); fflush(PM_pipe); } TERM_PUBLIC void PM_resume() { putc(GR_RESUME, PM_pipe); fflush(PM_pipe); } TERM_PUBLIC void PM_text() { fflush(PM_pipe); if (PM_mode != SET_TEXT) { putc(SET_TEXT, PM_pipe); fflush(PM_pipe); #if 0 keep_term_initialised = term_initialised ; term_initialised = FALSE ; /* need to force init */ #endif } PM_mode = SET_TEXT; #ifdef USE_MOUSE { /* FIXME 20040712: 'extern' in a source file is always wrong. */ extern TBOOLEAN allowmotion; allowmotion = TRUE; } #endif } TERM_PUBLIC void PM_graphics() { static int last_encoding = -999; putc(SET_GRAPHICS, PM_pipe); fflush(PM_pipe); #ifdef USE_MOUSE PM_update_menu_items(); #endif if (encoding != last_encoding) { int cp; switch (encoding) { case S_ENC_ISO8859_2: cp = 912; break; case S_ENC_CP437: cp = 437; break; case S_ENC_CP850: cp = 850; break; default: /* S_ENC_DEFAULT, S_ENC_ISO8859_1 */ cp = 0; break; }; putc(SET_SPECIAL, PM_pipe); putc('c', PM_pipe); /* set codepage */ fwrite(&cp, sizeof(int), 1, PM_pipe); fflush(PM_pipe); last_encoding = encoding; } PM_mode = SET_GRAPHICS; } TERM_PUBLIC void PM_move(unsigned int x, unsigned int y) { if (PM_must_abort) PM_abortplot(); putc(GR_MOVE, PM_pipe); fwrite(&x, sizeof(int), 1, PM_pipe); fwrite(&y, sizeof(int), 1, PM_pipe); #ifndef PM_OLD_ENHANCED_TEXT /* save current position, only needed for enhanced text */ PM_x = x; PM_y = y; #endif } TERM_PUBLIC void PM_vector(unsigned int x, unsigned int y) { if (PM_must_abort) PM_abortplot(); putc(GR_DRAW, PM_pipe); fwrite(&x, sizeof(int), 1, PM_pipe); fwrite(&y, sizeof(int), 1, PM_pipe); } TERM_PUBLIC void PM_linetype(int lt) { putc(SET_LINE, PM_pipe); fwrite(<, sizeof(int), 1, PM_pipe); } TERM_PUBLIC int PM_text_angle(int ang) { putc(SET_ANGLE, PM_pipe); fwrite(&ang, sizeof(int), 1, PM_pipe); #ifndef PM_OLD_ENHANCED_TEXT /* store text angle, only needed for enhanced text */ PM_angle = (double)ang * M_PI / 180.; #endif return TRUE; } TERM_PUBLIC void PM_put_text(unsigned int x, unsigned int y, const char *str) { int len; if (PM_must_abort) PM_abortplot(); #ifdef PM_OLD_ENHANCED_TEXT if (ignore_enhanced_text) { putc(SET_SPECIAL, PM_pipe); putc('e', PM_pipe); /* switch the enhanced mode off */ putc('0', PM_pipe); } #endif putc(GR_TEXT, PM_pipe); fwrite(&x, sizeof(int), 1, PM_pipe); fwrite(&y, sizeof(int), 1, PM_pipe); len = strlen(str) + 1; fwrite(&len, sizeof(int), 1, PM_pipe); fwrite(str, 1, len, PM_pipe); for (len = sizeof(int) - len % sizeof(int); len > 0; len--) { /* pad rest of int with zeros */ putc(NUL, PM_pipe); } #ifdef PM_OLD_ENHANCED_TEXT if (ignore_enhanced_text) { putc(SET_SPECIAL, PM_pipe); putc('e', PM_pipe); /* restore the enhanced mode */ putc('2', PM_pipe); } #endif } TERM_PUBLIC int PM_justify_text(enum JUSTIFY mode) { #ifdef PM_OLD_ENHANCED_TEXT if (ignore_enhanced_text) { putc(SET_SPECIAL, PM_pipe); putc('e', PM_pipe); /* switch the enhanced mode off */ putc('0', PM_pipe); } #endif putc(SET_JUSTIFY, PM_pipe); fwrite(&mode, sizeof(int), 1, PM_pipe); #ifndef PM_OLD_ENHANCED_TEXT /* store text justification, only needed for enhanced text */ PM_justification = mode; #else if (ignore_enhanced_text) { putc(SET_SPECIAL, PM_pipe); putc('e', PM_pipe); /* restore the enhanced mode */ putc('2', PM_pipe); } #endif return TRUE; } TERM_PUBLIC int PM_set_font(const char *font) { unsigned int len; putc(SET_FONT, PM_pipe); if (font == NULL) len = 0; else len = strlen(font); if (len==0) { fwrite(&len, sizeof(int), 1, PM_pipe); } else { len += 1; fwrite(&len, sizeof(int), 1, PM_pipe); fwrite(font, 1, len, PM_pipe); for (len = sizeof(int) - len % sizeof(int); len > 0; len--) { /* pad rest of int with zeros */ putc(NUL, PM_pipe); } } return TRUE; } #ifndef PM_OLD_ENHANCED_TEXT /* PM_query_font: get current font name and size from gnupmdrv and save them to PM_font and PM_fontsize */ static void PM_query_font(void) { unsigned int len, fontsize; char *newfont; ULONG cbR, rc; putc(GR_QUERY_FONT, PM_pipe); fflush(PM_pipe); free( PM_font ); rc = DosRead(fileno(PM_pipe), &len, sizeof(int), &cbR); newfont = (char *)malloc( len + 1 ); rc = DosRead(fileno(PM_pipe), newfont, len*sizeof(char), &cbR); newfont[len] = '\0'; PM_font = (char *)malloc( len + 1 ); sscanf( newfont, "%i.%s", &fontsize, PM_font ); PM_fontsize = (double)fontsize; free(newfont); } #endif TERM_PUBLIC void PM_point(unsigned int x, unsigned int y, int number) /* ** tell the driver we are plotting a point so it can decide whether to ** use colour or not */ { int mode; mode = 1; putc(SET_POINTMODE, PM_pipe); fwrite(&mode, sizeof(int), 1, PM_pipe); do_point(x, y, number); mode = 0; putc(SET_POINTMODE, PM_pipe); fwrite(&mode, sizeof(int), 1, PM_pipe); } void PM_abortplot(void) { PM_must_abort = 0; term_reset(); (void) putc('\n', stderr); bail_to_command_line(); } void PM_intc_cleanup(void) { if (PM_pipe == NULL || PM_mode == SET_TEXT) PM_abortplot(); PM_must_abort = 1; } int PM_pause(char *str) /* ** pause - using message box on PM screen */ { int len, rc; ULONG cbR; char buf[256]; char *bp; if (PM_pipe == NULL) return 2; bp = buf; putc(GR_PAUSE, PM_pipe); len = strlen(str) + 1; fwrite(&len, sizeof(int), 1, PM_pipe); fwrite(str, 1, len, PM_pipe); for (rc = sizeof(int) - len % sizeof(int); rc > 0; rc--) { /* pad rest of int with zeros */ putc(NUL, PM_pipe); } fflush(PM_pipe); rc = DosRead(fileno(PM_pipe), &len, sizeof(int), &cbR); return len; } TERM_PUBLIC void PM_fillbox(int style, unsigned int x, unsigned int y, unsigned int w, unsigned int h) { putc(SET_FILLBOX, PM_pipe); fwrite(&style, sizeof(style), 1, PM_pipe); fwrite(&x, sizeof(x), 1, PM_pipe); fwrite(&y, sizeof(y), 1, PM_pipe); fwrite(&w, sizeof(w), 1, PM_pipe); fwrite(&h, sizeof(h), 1, PM_pipe); } TERM_PUBLIC void PM_linewidth(double linewidth) { int lw; lw = linewidth * 100; putc(SET_LINEWIDTH, PM_pipe); fwrite(&lw, sizeof(int), 1, PM_pipe); } TERM_PUBLIC int PM_make_palette(t_sm_palette * palette) { if (palette == NULL) { ULONG rc, cbR; int PM_nColors; /* query maximum number of colours in palette */ putc(GR_MAKE_PALETTE, PM_pipe); putc(0, PM_pipe); fflush(PM_pipe); rc = DosRead(fileno(PM_pipe), &PM_nColors, sizeof(int), &cbR); return PM_nColors; } if (sm_palette.colors > 0) { ULONG *rgbTable; unsigned int i; /* Note: gvpm sources have also limit 256, is it limit of PM palette? I suppose yes, thus let colours passed as unsigned char through the pipe. Gray interval [0;1] will be mapped to interval [0;255] whose r,g,b components are mapped by the array below. */ putc(GR_MAKE_PALETTE, PM_pipe); putc(1, PM_pipe); rgbTable = (ULONG *) malloc(sizeof(ULONG) * sm_palette.colors); for (i = 0; i < sm_palette.colors; i++) { ULONG r, g, b; r = (ULONG) (palette->color[i].r * 255 + 0.5); g = (ULONG) (palette->color[i].g * 255 + 0.5); b = (ULONG) (palette->color[i].b * 255 + 0.5); rgbTable[i] = (r << 16) + (g << 8) + b; /* PM API likes this form */ } fwrite(&sm_palette.colors, sizeof(int), 1, PM_pipe); fwrite(rgbTable, sizeof(ULONG) * sm_palette.colors, 1, PM_pipe); free(rgbTable); } return 0; } TERM_PUBLIC void PM_set_color(t_colorspec *colorspec) { switch (colorspec->type) { case TC_FRAC: if (sm_palette.colors == 0) { rgb255_color rgb255; unsigned int rgb; rgb255maxcolors_from_gray(colorspec->value, &rgb255); rgb = (rgb255.r << 16) + (rgb255.g << 8) + rgb255.b; putc(GR_SET_RGBCOLOR, PM_pipe); fwrite(&rgb, sizeof(int), 1, PM_pipe); } else { unsigned char colorindex; /* map [0;1] to interval [0;sm_palette.colors-1] */ colorindex = ((colorspec->value * (sm_palette.colors - 1.)) + 0.5); putc(GR_SET_COLOR, PM_pipe); fwrite(&colorindex, sizeof(colorindex), 1, PM_pipe); } break; case TC_LT: PM_linetype(colorspec->lt); break; case TC_RGB: putc(GR_SET_RGBCOLOR, PM_pipe); fwrite(&(colorspec->lt), sizeof(int), 1, PM_pipe); /* fflush(PM_pipe); */ /* FIXME: why should that be necessary? */ break; } } TERM_PUBLIC void PM_filled_polygon ( int points, gpiPoint *corners ) { int i; putc(GR_FILLED_POLYGON, PM_pipe); fwrite(&points, sizeof(int), 1, PM_pipe); /* tell him number of corners */ for (i = 0; i < points; i++) { fwrite(&corners[i].x, sizeof(int), 1, PM_pipe); fwrite(&corners[i].y, sizeof(int), 1, PM_pipe); } } #ifdef USE_MOUSE TERM_PUBLIC void PM_put_tmptext(int i, const char str[]) { if (PM_pipe) { putc(PUT_TMPTEXT, PM_pipe); fwrite(&i, sizeof(int), 1, PM_pipe); i = strlen(str) + 1; fwrite(&i, sizeof(int), 1, PM_pipe); fwrite(&str[0], i, 1, PM_pipe); fflush(PM_pipe); } } TERM_PUBLIC void PM_set_ruler(int x, int y) { if (PM_pipe) { putc(SET_RULER, PM_pipe); fwrite(&x, sizeof(int), 1, PM_pipe); fwrite(&y, sizeof(int), 1, PM_pipe); fflush(PM_pipe); } } TERM_PUBLIC void PM_set_cursor(int c, int x, int y) { if (PM_pipe) { putc(SET_CURSOR, PM_pipe); fwrite(&c, sizeof(int), 1, PM_pipe); fwrite(&x, sizeof(int), 1, PM_pipe); fwrite(&y, sizeof(int), 1, PM_pipe); fflush(PM_pipe); } } TERM_PUBLIC void PM_set_clipboard(const char s[]) { if (PM_pipe) { int i = strlen(s); putc(SET_CLIPBOARD, PM_pipe); fwrite(&i, sizeof(int), 1, PM_pipe); fwrite(s, i+1, 1, PM_pipe); fflush(PM_pipe); } } #endif /* USE_MOUSE */ TERM_PUBLIC void PM_image(unsigned int M, unsigned int N, coordval *image, gpiPoint *corner, t_imagecolor color_mode) { PBYTE rgb_image; unsigned int image_size; unsigned int pad_bytes; /* IC_PALETTE and IC_RGB images are converted to a 24bit RGB format suitable for OS/2's presentation manager: - sequence of lines is reversed - each line starts at a 4 byte boundary */ /* fprintf(stderr, "PM_image: %i x %i, mode=%s\n", M, N, color_mode==IC_RGB?"IC_RGB":"IC_PALETTE" ); */ pad_bytes = (4 - (3 * M) % 4) % 4; /* scan lines start on ULONG boundaries */ image_size = (M + pad_bytes ) * N * 3; rgb_image = (PBYTE) gp_alloc(image_size, "PM RGB image"); if (color_mode == IC_PALETTE) { unsigned int x, y; rgb_image += N * (3 * M + pad_bytes); for (y=0; y 0) { fontstring = malloc( strlen(fontname) + 16 ); sprintf( fontstring, "%s,%i", fontname, (int)fontsize ); } else { fontstring = malloc( strlen(PM_font) + 16 ); sprintf( fontstring, "%s,%i", PM_font, (int)fontsize ); } PM_set_font( fontstring ); free( fontstring ); PM_query_font(); /* Scale fractional font height to vertical units of display */ /* FIXME: Font scaling is not done properly (yet) and will lead to non-optimal results for most font and size selections. The old gnupmdrv code used FONTINFO information for super- and subscripts. */ ENHpm_base = pm_scale * base; } } TERM_PUBLIC void PM_enhanced_flush() { static unsigned int ENHpm_xsave, ENHpm_ysave; if (ENHpm_opened_string) { int width, height; unsigned int mode; unsigned int x, y, len; ULONG rc, cbR; *enhanced_cur_text = '\0'; if (PM_must_abort) PM_abortplot(); /* print the string fragment, perhaps invisibly */ /* NB: base expresses offset from current y pos */ x = PM_x - ENHpm_base * sin(PM_angle); y = PM_y + ENHpm_base * cos(PM_angle); mode = ((ENHpm_show && !ENHpm_sizeonly) ? 0x01 : 0x00 ); len = strlen(enhanced_text) + 1; /* send message to gnupmdrv */ putc(GR_ENH_TEXT, PM_pipe); fwrite(&x, sizeof(int), 1, PM_pipe); fwrite(&y, sizeof(int), 1, PM_pipe); /* write 'mode indicator' (currently show switch only) */ fwrite(&mode, sizeof(int), 1, PM_pipe); fwrite(&len, sizeof(int), 1, PM_pipe); fwrite(enhanced_text, 1, len, PM_pipe); for (len = sizeof(int) - len % sizeof(int); len > 0; len--) { /* pad rest of int with zeros */ putc(NUL, PM_pipe); } /* answer from gnupmdrv is length of text */ fflush(PM_pipe); rc = DosRead(fileno(PM_pipe), &width, sizeof(int), &cbR); rc = DosRead(fileno(PM_pipe), &height, sizeof(int), &cbR); /* update drawing position according to len */ if (!ENHpm_widthflag) { width = 0; height = 0; } if (ENHpm_sizeonly) { /* This is the first pass for justified printing. */ /* We just adjust the starting position for second pass. */ if (PM_justification == RIGHT) { PM_x -= width; PM_y -= height; } else if (PM_justification == CENTRE) { PM_x -= width / 2; PM_y -= height / 2; } /* nothing to do for LEFT justified text */ } else if (ENHpm_overprint == 1) { /* Save current position */ ENHpm_xsave = PM_x + width; ENHpm_ysave = PM_y + height; /* First pass of overprint, leave position in center of fragment */ PM_x += width / 2; PM_y += height / 2; } else if (ENHpm_overprint == 2) { /* Restore current position, */ /* this sets the position behind the overprinted text */ PM_x = ENHpm_xsave; PM_y = ENHpm_ysave; } else { /* Normal case is to update position to end of fragment */ PM_x += width; PM_y += height; } ENHpm_opened_string = FALSE; } } TERM_PUBLIC void PM_enhanced_put_text(unsigned int x, unsigned int y, const char *str) { char *original_string = (char *)str; unsigned int pass, num_passes; /* If no enhanced text processing is needed, we can use the plain */ /* vanilla put_text() routine instead of this fancy recursive one. */ if (ignore_enhanced_text || !strpbrk(str, "{}^_@&~")) { PM_put_text(x,y,str); return; } /* Set up global variables needed by enhanced_recursion() */ ENHpm_opened_string = FALSE; enhanced_fontscale = 1.0; strncpy(enhanced_escape_format,"%c",sizeof(enhanced_escape_format)); /* Tell the terminal to move the drawing position */ /* we store the current position to PM_x and PM_y */ PM_x = x; PM_y = y; /* Text justification requires two passes. During the first pass we */ /* don't draw anything, we just measure the space it will take. */ /* Without justification one pass is enough */ if (PM_justification == LEFT) { num_passes = 1; } else { num_passes = 2; ENHpm_sizeonly = TRUE; } for( pass=1; pass <= num_passes; pass++ ) { /* This will restore the default font and update PM_font and PM_fontsize */ PM_set_font(NULL); PM_query_font(); /* Set the recursion going. We say to keep going until a * closing brace, but we don't really expect to find one. * If the return value is not the nul-terminator of the * string, that can only mean that we did find an unmatched * closing brace in the string. We increment past it (else * we get stuck in an infinite loop) and try again. */ while (*(str = enhanced_recursion((char *)str, TRUE, NULL, PM_fontsize, 0.0, TRUE, TRUE, 0))) { (term->enhanced_flush)(); /* I think we can only get here if *str == '}' */ enh_err_check(str); if (!*++str) break; /* end of string */ /* else carry on and process the rest of the string */ } /* In order to do text justification we need to do a second pass that */ /* uses information stored during the first pass. */ /* see PM_enhanced_flush() */ if (pass == 1) { /* do the actual printing in the next pass */ ENHpm_sizeonly = FALSE; str = original_string; } } /* restore default font */ PM_set_font(NULL); } #endif /* PM_OLD_ENHANCED_TEXT */ /* helper function */ void pm_raise_terminal_window() { putc(SET_SPECIAL, PM_pipe); putc('^', PM_pipe); /* raise window */ fflush(PM_pipe); } void pm_lower_terminal_window() { putc(SET_SPECIAL, PM_pipe); putc('_', PM_pipe); /* lower window */ fflush(PM_pipe); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(PM_driver) "pm", "OS/2 Presentation Manager", PM_XMAX, PM_YMAX, PM_VCHAR, PM_HCHAR, PM_VTIC, PM_HTIC, PM_options, PM_init, PM_reset, PM_text, null_scale, PM_graphics, PM_move, PM_vector, PM_linetype, PM_put_text, PM_text_angle, PM_justify_text, PM_point, do_arrow, PM_set_font, 0 /*pointsize */ , TERM_CAN_MULTIPLOT|TERM_NO_OUTPUTFILE, PM_suspend, PM_resume, PM_fillbox, PM_linewidth #ifdef USE_MOUSE , 0 /* PM_waitforinput */, PM_put_tmptext, PM_set_ruler, PM_set_cursor, PM_set_clipboard #endif , PM_make_palette, 0, /* PM_previous_palette */ PM_set_color, PM_filled_polygon , PM_image #ifndef PM_OLD_ENHANCED_TEXT , PM_enhanced_open, PM_enhanced_flush, do_enh_writec #endif TERM_TABLE_END(PM_driver) #undef LAST_TERM #define LAST_TERM PM_driver #endif /* TERM_TABLE */ #ifdef TERM_HELP START_HELP(pm) "1 pm", "?commands set terminal pm", "?set terminal pm", "?set term pm", "?terminal pm", "?term pm", "?pm", " The `pm` terminal driver provides an OS/2 Presentation Manager window in", " which the graph is plotted. The window is opened when the first graph is", " plotted. This window has its own online help as well as facilities for", " printing, copying to the clipboard and some line type and color adjustments.", " The `multiplot` option is supported.", "", " Syntax:", " set terminal pm {server {n}} {persist} {widelines} {enhanced} {\"title\"}", "", " If `persist` is specified, each graph appears in its own window and all", " windows remain open after `gnuplot` exits. If `server` is specified, all", " graphs appear in the same window, which remains open when `gnuplot` exits.", " This option takes an optional numerical argument which specifies an instance", " of the server process. Thus multiple server windows can be in use at the", " same time.", "", " If `widelines` is specified, all plots will be drawn with wide lines. If", " `enhanced` is specified, sub- and superscripts and multiple fonts are enabled", " (see `enhanced text` for details). Font names for the core PostScript fonts", " may be abbreviated to a single letter ", " (T/H/C/S for Times/Helvetica/Courier/Symbol).", "", " If `title` is specified, it will be used as the title of the plot window.", " It will also be used as the name of the server instance, and will override", " the optional numerical argument.", "", " Linewidths may be changed with `set linestyle`." END_HELP(pm) #endif /* TERM_HELP */ gnuplot-4.6.4/term/unixpc.trm0000644000471100001440000003577210460036604013147 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: unixpc.trm,v 1.14 2006/07/21 02:35:48 sfeam Exp $ * */ /* GNUPLOT - unixpc.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * Unix PC's (ATT 3b1) * * AUTHORS * John Campbell * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* >From: John Campbell (...!arizona!naucse!jdc) I originally ported gnuplot to the ATT 3b1 (ATT7300) on 12/4/88, and then added the minimal code needed to bring it up to 2.0 level on 1/28/90. The 3b1, as I view it, is a 720x300 bitmapped, monochrome display (often people don't use the top 12 scan lines and thus the effective size is 720x288). I tried to maximize the size of the graph area, by using these top 12 lines (normally reserved) and set up a signal handler to restore them upon exit, abort, etc. Line styles were "fudged" (they do not know the aspect ratio). The same line style may look different depending upon the slope of the curve. Due to this only 4 line styles were implemented. While more line types are possible, the current styles were chosen as distinguishable. The 3b1 has 4 "special" rows at the bottom that I could not use in graphics mode. It has been suggested that we use these lines for command prompting. Others have requested that we have a graphics window and a command window. My experience with gnuplot only includes relatively dumb graphics devices-- hence gnuplot "looks and feels" normal to me the way I implemented it. I welcome either of these changes from someone else, however. */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(unixpc) #endif #ifdef TERM_PROTO TERM_PUBLIC void uPC_init __PROTO((void)); TERM_PUBLIC void uPC_graphics __PROTO((void)); TERM_PUBLIC void uPC_text __PROTO((void)); TERM_PUBLIC void uPC_linetype __PROTO((int linetype)); TERM_PUBLIC void uPC_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void uPC_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void uPC_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC int uPC_text_angle __PROTO((int ang)); TERM_PUBLIC void uPC_reset __PROTO((void)); #define uPC_XMAX 720 #define uPC_YMAX 300 #define uPC_VCHAR FNT5X9_VCHAR #define uPC_HCHAR FNT5X9_HCHAR #define uPC_VTIC uPC_VCHAR/2 /* Was 8 */ #define uPC_HTIC uPC_HCHAR /* Was 12 */ #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY void uPC_fixwind __PROTO((int signo)); void uPC_putc __PROTO((unsigned int x, unsigned int y, int c, int angle)); void uPC_plot_word __PROTO((unsigned short *a, unsigned short b)); #include /* Started with tam.h--too much trouble. */ #include #include #define uPC_HIGH_BIT (0x8000) typedef unsigned short Scr_type; typedef unsigned char Scr_kluge; #define uPC_XSIZE 45 /* Short ints. */ #define uPC_YSIZE uPC_YMAX Scr_type uPC_display[uPC_YSIZE][uPC_XSIZE]; int uPC_width = 2 * uPC_XSIZE; int uPC_sx = 0, uPC_sy = 0; int uPC_cur_linetype = 0; int uPC_angle = 0; unsigned short uPC_raster_count = 0; static Scr_type lookup[] = { 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000, }; #define uPC_XLAST (uPC_XMAX - 1) #define uPC_YLAST (uPC_YMAX - 1) static struct urdata uPC_ur = { (unsigned short *) uPC_display, 2 * uPC_XSIZE, 0, 0, 0, 0, 0, 0, uPC_XMAX, uPC_YMAX, SRCSRC, DSTOR, 0 }; #define IfErrOut(e1,e2,s1,s2) if (e1 e2) { \ fprintf(stderr, "%s:: %s %s\n", sys_errlist[errno], s1, s2); \ uPC_fixwind(0); \ exit(-1); \ } TERM_PUBLIC void uPC_init() { /* This routine will ioctl to change 0 size */ int i; struct uwdata uw; int uPC_fixwind(); short gw; /* Check that we are on the bitmapped window. */ if (iswind() != 0) { fputs("Sorry--must run from the bitmapped terminal\n", stderr); exit(-1); } for (i = 1; i <= 16; i++) { if (i != SIGINT && i != SIGFPE) /* Two are caught in plot.c */ signal(i, uPC_fixwind); } /* Increase the screen size */ uw.uw_x = 0; uw.uw_y = 0; /* Leave room for top status line. */ uw.uw_width = uPC_XMAX; /* 720 */ uw.uw_height = uPC_YMAX; /* 288 normal--we clobber 12 (top row) */ uw.uw_uflags = 1; /* Creates with no border */ IfErrOut(ioctl(1, WIOCSETD, &uw), <0, "ioctl failed on", "WIOCSETD"); } TERM_PUBLIC void uPC_graphics() { /* This routine will clear the uPC_display buffer and window. */ register Scr_type *j; register int i; j = (Scr_type *) uPC_display; i = uPC_YSIZE * uPC_XSIZE + 1; while (--i) *j++ = 0; /* Position the cursor to the bottom of the screen so when we come back to * text mode we are just below the graph. */ fputs("\033[25;1H", stdout); uPC_ur.ur_dstop = DSTSRC; /* replace (clear screen). */ IfErrOut(ioctl(1, WIOCRASTOP, &uPC_ur), <0, "ioctl failed", "WIOCRASTOP"); uPC_ur.ur_dstop = DSTOR; /* Or in (show text) */ } TERM_PUBLIC void uPC_text() { /* This routine will flush the display. */ IfErrOut(ioctl(1, WIOCRASTOP, &uPC_ur), <0, "ioctl failed", "WIOCRASTOP"); } TERM_PUBLIC void uPC_linetype(int linetype) { /* This routine records the current linetype. */ if (uPC_cur_linetype != linetype) { uPC_raster_count = 0; uPC_cur_linetype = linetype; } } TERM_PUBLIC void uPC_move(unsigned int x, unsigned int y) { /* This routine just records x and y in uPC_sx, uPC_sy */ uPC_sx = x; uPC_sy = y; } /* Was just (*(a)|=(b)) */ #define uPC_PLOT(a,b) (uPC_cur_linetype != 0 ? uPC_plot_word (a,b) :\ (*(a)|=(b))) /* Weak attempt to make line styles. The real problem is the aspect ratio. This routine is called only when a bit is to be turned on in a horizontal word. A better line style routine would know something about the slope of the line around the current point (in order to change weighting). This yields 3 working linetypes plus a usable axis line type. */ void uPC_plot_word(Scr_type *a, Scr_type b) { /* Various line types */ switch (uPC_cur_linetype) { case LT_AXIS: /* Distinguish between horizontal and vertical axis. */ if (uPC_sx > uPC_XMAX / 8 && uPC_sx < 7 * uPC_XMAX / 8) { /* Fuzzy tolerance because we don't know exactly where the y axis is */ if (++uPC_raster_count % 2 == 0) *(a) |= b; } else { /* Due to aspect ratio, take every other y pixel and every third x. */ *(a) |= (b & 0x9999); } break; case 1: case 5: /* Make a | |----| |----| type of line. */ if ((1 << uPC_raster_count) & 0xF0F0) *(a) |= b; if (++uPC_raster_count > 15) uPC_raster_count = 0; break; case 2: case 6: /* Make a |----|----|----|--- | | type of line. */ if ((1 << uPC_raster_count) & 0x0EFFF) *(a) |= b; if (++uPC_raster_count > 19) uPC_raster_count = 0; break; case 3: case 7: /* Make a | - | - | - | - | type of line. */ if ((1 << uPC_raster_count) & 0x4444) *(a) |= b; if (++uPC_raster_count > 15) uPC_raster_count = 0; break; case 4: case 8: default: *(a) |= b; break; } } TERM_PUBLIC void uPC_vector(unsigned int x, unsigned int y) { /* This routine calls line with x,y */ int x1 = uPC_sx, y1 = uPC_sy, x2 = x, y2 = y; register int c, e, dx, dy, width; register Scr_type mask, *a; /* Record new sx, sy for next call to the vector routine. */ uPC_sx = x2; uPC_sy = y2; a = &uPC_display[(uPC_YSIZE - 1) - y1][x1 >> 4]; mask = lookup[x1 & 0x0f]; width = uPC_width; if ((dx = x2 - x1) > 0) { if ((dy = y2 - y1) > 0) { if (dx > dy) { /* dx > 0, dy > 0, dx > dy */ dy <<= 1; e = dy - dx; c = dx + 2; dx <<= 1; while (--c) { uPC_PLOT(a, mask); if (e >= 0) { (Scr_kluge *) a -= width; e -= dx; } if (mask & uPC_HIGH_BIT) { mask = 1; a++; } else mask <<= 1; e += dy; } } else { /* dx > 0, dy > 0, dx <= dy */ dx <<= 1; e = dx - dy; c = dy + 2; dy <<= 1; while (--c) { uPC_PLOT(a, mask); if (e >= 0) { if (mask & uPC_HIGH_BIT) { mask = 1; a++; } else mask <<= 1; e -= dy; } (Scr_kluge *) a -= width; e += dx; } } } else { dy = -dy; if (dx > dy) { /* dx > 0, dy <= 0, dx > dy */ dy <<= 1; e = dy - dx; c = dx + 2; dx <<= 1; while (--c) { uPC_PLOT(a, mask); if (e >= 0) { (Scr_kluge *) a += width; e -= dx; } if (mask & uPC_HIGH_BIT) { mask = 1; a++; } else mask <<= 1; e += dy; } } else { /* dx > 0, dy <= 0, dx <= dy */ dx <<= 1; e = dx - dy; c = dy + 2; dy <<= 1; while (--c) { uPC_PLOT(a, mask); if (e >= 0) { if (mask & uPC_HIGH_BIT) { mask = 1; a++; } else mask <<= 1; e -= dy; } (Scr_kluge *) a += width; e += dx; } } } } else { dx = -dx; if ((dy = y2 - y1) > 0) { if (dx > dy) { /* dx <= 0, dy > 0, dx > dy */ dy <<= 1; e = dy - dx; c = dx + 2; dx <<= 1; while (--c) { uPC_PLOT(a, mask); if (e >= 0) { (Scr_kluge *) a -= width; e -= dx; } if (mask & 1) { mask = uPC_HIGH_BIT; a--; } else mask >>= 1; e += dy; } } else { /* dx <= 0, dy > 0, dx <= dy */ dx <<= 1; e = dx - dy; c = dy + 2; dy <<= 1; while (--c) { uPC_PLOT(a, mask); if (e >= 0) { if (mask & 1) { mask = uPC_HIGH_BIT; a--; } else mask >>= 1; e -= dy; } (Scr_kluge *) a -= width; e += dx; } } } else { dy = -dy; if (dx > dy) { /* dx <= 0, dy <= 0, dx > dy */ dy <<= 1; e = dy - dx; c = dx + 2; dx <<= 1; while (--c) { uPC_PLOT(a, mask); if (e >= 0) { (Scr_kluge *) a += width; e -= dx; } if (mask & 1) { mask = uPC_HIGH_BIT; a--; } else mask >>= 1; e += dy; } } else { /* dx <= 0, dy <= 0, dx <= dy */ dx <<= 1; e = dx - dy; c = dy + 2; dy <<= 1; while (--c) { uPC_PLOT(a, mask); if (e >= 0) { if (mask & 1) { mask = uPC_HIGH_BIT; a--; } else mask >>= 1; e -= dy; } (Scr_kluge *) a += width; e += dx; } } } } } #ifdef uPC_NOT_USED /* Added by Russell Lang, eln272v@monu1.cc.monash.oz This placement to the nearest character cell worked, and I'm leaving it here so the calculations involved won't be lost! (jdc) */ TERM_PUBLIC void uPC_put_text(unsigned int x, unsigned int y, const char str[]) { /* This routine puts the text at the cursor location nearest to (x,y). Obviously the exact postion would look better */ /* Just use the ANSI escape sequence CUP (iswind said that was ok!) */ printf("\033[%d;%dH%s\033[25;1H", (int) (24 - (y - uPC_VCHAR / 2) * 25 / uPC_YMAX), (int) (x * 80 / uPC_XMAX), str); fflush(stdout); } #endif TERM_PUBLIC void uPC_put_text(unsigned int x, unsigned int y, const char str[]) { if (uPC_angle == 1) x += uPC_VCHAR / 2; else y -= uPC_VCHAR / 2; switch (uPC_angle) { case 0: for (; *str; ++str, x += uPC_HCHAR) uPC_putc(x, y, *str, uPC_angle); break; case 1: for (; *str; ++str, y += uPC_HCHAR) uPC_putc(x, y, *str, uPC_angle); break; } } /* Put a character at an x,y location in the bit map (using the fnt5x9 array. This is mostly just copied from the bitmap.c driver. */ void uPC_putc(unsigned int x, unsigned int y, int c, int angle) { int i, j, k; register Scr_type mask, *a; char_row fc; unsigned int pixelon; i = c - ' '; for (j = 0; j < FNT5X9_VBITS; j++) { fc = fnt5x9[i][j]; for (k = 0; k < FNT5X9_HBITS; k++) { pixelon = ((unsigned int) (fc)) >> k & 1; if (pixelon) { switch (angle) { case 0: mask = lookup[x + k + 1 & 0x0f]; a = &uPC_display[(uPC_YSIZE - 1) - (y + j)][(x + k + 1) >> 4]; break; case 1: mask = lookup[x - j & 0x0f]; a = &uPC_display[(uPC_YSIZE - 1) - (y + k + 1)][(x - j) >> 4]; break; } *(a) |= (mask); /* see uPC_PLOT macro */ } } } } TERM_PUBLIC int uPC_text_angle(int ang) { uPC_angle = (ang ? 1 : 0); return TRUE; } TERM_PUBLIC void uPC_reset() { /* Reset window to normal size. */ uPC_fixwind(0); } void uPC_fixwind(int signo) { static struct uwdata wreset = {0, 12, 720, 288, 0x1}; struct utdata ut; /* Reset the window to the right size. */ ioctl(1, WIOCSETD, &wreset); /* 0, not wncur here! */ /* Scroll the screen once. (avoids typing over the same line) */ putc('\n', stderr); if (signo) { if (signo == SIGILL || signo == SIGTRAP || signo == SIGPWR) signal(signo, SIG_DFL); kill(0, signo); /* Redo the signal (as if we never trapped it). */ } } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(unixpc_driver) "unixpc", "AT&T 3b1 or AT&T 7300 Unix PC", uPC_XMAX, uPC_YMAX, uPC_VCHAR, uPC_HCHAR, uPC_VTIC, uPC_HTIC, options_null, uPC_init, uPC_reset, uPC_text, null_scale, uPC_graphics, uPC_move, uPC_vector, uPC_linetype, uPC_put_text, uPC_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(unixpc_driver) #undef LAST_TERM #define LAST_TERM unixpc_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(unixpc) "1 unixpc", "?commands set terminal unixpc", "?set terminal unixpc", "?set term unixpc", "?terminal unixpc", "?term unixpc", "?unixpc", " The `unixpc` terminal driver supports AT&T 3b1 and AT&T 7300 Unix PC. It has", " no options." END_HELP(unixpc) #endif /* TERM_HELP */ gnuplot-4.6.4/term/corel.trm0000644000471100001440000002525510460036601012735 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: corel.trm,v 1.17 2006/07/21 02:35:45 sfeam Exp $ */ /* corel.trm A modified ai.trm for CorelDraw import filters by Chris Parks, parks@physics.purdue.edu Import from CorelDraw with the CorelTrace filter syntax: set terminal default set terminal mode "fontname" fontsize,xsize,ysize,linewidth mode= color or monochrome (default=mono) "fontname"= postscript font name (default="SwitzerlandLight") fontsize = size of font in points (default=22pt) xsize = width of page in inches (default=8.2in) ysize = height of page in inches (default=10in) linewidth = width of lines in points (default=1.2pt) */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(corel) #endif #ifdef TERM_PROTO TERM_PUBLIC void COREL_options __PROTO((void)); TERM_PUBLIC void COREL_init __PROTO((void)); TERM_PUBLIC void COREL_graphics __PROTO((void)); TERM_PUBLIC void COREL_text __PROTO((void)); TERM_PUBLIC void COREL_reset __PROTO((void)); TERM_PUBLIC void COREL_linetype __PROTO((int linetype)); TERM_PUBLIC void COREL_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void COREL_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void COREL_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int COREL_text_angle __PROTO((int ang)); TERM_PUBLIC int COREL_justify_text __PROTO((enum JUSTIFY mode)); #define CORELD_XMAX 5960 /* 8.2 inches wide */ #define CORELD_YMAX 7200 /* 10 inches high */ #define CORELD_VTIC (CORELD_YMAX/80) #define CORELD_HTIC (CORELD_YMAX/80) #define CORELD_VCHAR (22*COREL_SC) /* default is 22 point characters */ #define CORELD_HCHAR (22*COREL_SC*6/10) #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #define DEFAULT_CORELFONT "SwitzerlandLight" /* plots for publication should be sans-serif (don't use TimesRoman) */ static char corel_font[MAX_ID_LEN + 1] = DEFAULT_CORELFONT; /* name of font */ static int corel_fontsize = 22; /* size of font in pts */ static TBOOLEAN corel_color = FALSE; static TBOOLEAN corel_stroke = FALSE; static int corel_path_count = 0; /* count of lines in path */ static int corel_ang = 0; /* text angle */ static enum JUSTIFY corel_justify = LEFT; /* text is flush left */ /* default mode constants */ #define CORELD_XOFF 0 /* page offset in pts */ #define CORELD_YOFF 0 #define COREL_SC (10.0) /* scale is 1pt = 10 units */ #define CORELD_LW (1.2*COREL_SC) /* linewidth = 1.2 pts */ static unsigned int corel_xmax = CORELD_XMAX; static unsigned int corel_ymax = CORELD_YMAX; static float corel_lw = CORELD_LW; enum COREL_id {COREL_DEFAULT, COREL_MONOCHROME, COREL_COLOR, COREL_OTHER }; static struct gen_table COREL_opts[] = { { "def$ault", COREL_DEFAULT}, { "mono$chrome", COREL_MONOCHROME }, { "color$", COREL_COLOR }, { "colour$", COREL_COLOR }, { NULL, COREL_OTHER } }; TERM_PUBLIC void COREL_options() { struct value a; while (!END_OF_COMMAND) { switch(lookup_table(&COREL_opts[0],c_token)) { case COREL_DEFAULT: corel_color = FALSE; strcpy(corel_font, DEFAULT_CORELFONT); corel_fontsize = 22; corel_lw = CORELD_LW; corel_xmax = CORELD_XMAX; corel_ymax = CORELD_YMAX; c_token++; break; case COREL_MONOCHROME: corel_color = FALSE; c_token++; break; case COREL_COLOR: corel_color = TRUE; c_token++; break; case COREL_OTHER: default: /* font name */ if (isstring(c_token)) { quote_str(corel_font, c_token, MAX_ID_LEN); c_token++; } else { /* We have font size specified */ corel_fontsize = (int) real(const_express(&a)); c_token++; term->v_char = (unsigned int) (corel_fontsize * COREL_SC); term->h_char = (unsigned int) (corel_fontsize * COREL_SC * 6 / 10); } break; } } /* FIXME - argh. Stupid syntax alert here */ if (!END_OF_COMMAND) { corel_xmax = (unsigned int) (real(const_express(&a)) * 720); c_token++; if (!END_OF_COMMAND) { corel_ymax = (unsigned int) (real(const_express(&a)) * 720); c_token++; } term->xmax = corel_xmax; term->ymax = corel_ymax; term->v_tic = corel_ymax / 80; term->h_tic = corel_ymax / 80; } if (!END_OF_COMMAND) { corel_lw = real(const_express(&a)) * COREL_SC; c_token++; } sprintf(term_options, "%s \"%s\" %d,%0.1f,%0.1f,%0.1f", corel_color ? "color" : "monochrome", corel_font, corel_fontsize, corel_xmax / 720.0, corel_ymax / 720.0, corel_lw / COREL_SC); } TERM_PUBLIC void COREL_init() { fprintf(gpoutfile, "\ %%!PS-Adobe-2.0 EPSF-1.2\n\ %%%%BoundingBox: %d %d %d %d\n\ %%%%TemplateBox: %d %d %d %d\n\ %%%%EndComments\n\ %%%%EndProlog\n\ %%%%BeginSetup\n%%%%EndSetup\n", CORELD_XOFF, CORELD_YOFF, (int) ((corel_xmax) / COREL_SC + 0.5 + CORELD_XOFF), (int) ((corel_ymax) / COREL_SC + 0.5 + CORELD_YOFF), CORELD_XOFF, CORELD_YOFF, (int) ((corel_xmax) / COREL_SC + 0.5 + CORELD_XOFF), (int) ((corel_ymax) / COREL_SC + 0.5 + CORELD_YOFF)); } TERM_PUBLIC void COREL_graphics() { corel_path_count = 0; corel_stroke = FALSE; } TERM_PUBLIC void COREL_text() { if (corel_stroke) { fputs("S\n", gpoutfile); corel_stroke = FALSE; } corel_path_count = 0; } TERM_PUBLIC void COREL_reset() { fputs("%%Trailer\n", gpoutfile); } TERM_PUBLIC void COREL_linetype(int linetype) { if (corel_stroke) { fputs("S\n", gpoutfile); corel_stroke = FALSE; } switch (linetype) { case LT_BLACK: fprintf(gpoutfile, "%.2f w\n", corel_lw / COREL_SC); if (corel_color) { fputs("0 0 0 1 K\n", gpoutfile); } else { fputs("\ [] 0 d\n\ 0 j\n0 G\n", gpoutfile); } break; case LT_AXIS: fprintf(gpoutfile, "%.2f w\n", corel_lw / COREL_SC); if (corel_color) { fputs("0 0 0 1 K\n", gpoutfile); } else { fputs("\ [1 2] 0 d\n\ 0 j\n0 G\n", gpoutfile); } break; case 0: fprintf(gpoutfile, "%.2f w\n", corel_lw / COREL_SC); if (corel_color) { fputs("1 0 1 0 K\n", gpoutfile); } else { fputs("\ [] 0 d\n\ 2 j\n0 G\n", gpoutfile); } break; case 1: fprintf(gpoutfile, "%.2f w\n", corel_lw / COREL_SC); if (corel_color) { fputs("1 1 0 0 K\n", gpoutfile); } else { fputs("\ [4 2] 0 d\n\ 2 j\n0 G\n", gpoutfile); } break; case 2: fprintf(gpoutfile, "%.2f w\n", corel_lw / COREL_SC); if (corel_color) { fputs("0 1 1 0 K\n", gpoutfile); } else { fputs("\ [2 3] 0 d\n\ 2 j\n0 G\n", gpoutfile); } break; case 3: fprintf(gpoutfile, "%.2f w\n", corel_lw / COREL_SC); if (corel_color) { fputs("0 1 0 0 K\n", gpoutfile); } else { fputs("\ [1 1.5] 0 d\n\ 2 j\n0 G\n", gpoutfile); } break; case 4: fprintf(gpoutfile, "%f w\n", corel_lw / COREL_SC); if (corel_color) { fputs("1 0 0 0 K\n", gpoutfile); } else { fputs("\ [5 2 1 2] 0 d\n\ 2 j\n0 G\n", gpoutfile); } break; case 5: fprintf(gpoutfile, "%.2f w\n", corel_lw / COREL_SC); if (corel_color) { fputs("0 0 1 0 K\n", gpoutfile); } else { fputs("\ [4 3 1 3] 0 d\n\ 2 j\n0 G\n", gpoutfile); } break; case 6: fprintf(gpoutfile, "%.2f w\n", corel_lw / COREL_SC); if (corel_color) { fputs("0 0 0 1 K\n", gpoutfile); } else { fputs("\ [2 2 2 4] 0 d\n\ 2 j\n0 G\n", gpoutfile); } break; case 7: fprintf(gpoutfile, "%.2f w\n", corel_lw / COREL_SC); if (corel_color) { fputs("0 0.7 1 0 K\n", gpoutfile); } else { fputs("\ [2 2 2 2 2 4] 0 d\n\ 2 j\n0 G\n", gpoutfile); } break; case 8: fprintf(gpoutfile, "%.2f w\n", corel_lw / COREL_SC); if (corel_color) { fputs("0.5 0.5 0.5 0 K\n", gpoutfile); } else { fputs("\ [2 2 2 2 2 2 2 4] 0 d\n\ 2 j\n0 G\n", gpoutfile); } break; } corel_path_count = 0; } TERM_PUBLIC void COREL_move(unsigned int x, unsigned int y) { if (corel_stroke) fputs("S\n", gpoutfile); fprintf(gpoutfile, "%0.2f %0.2f m\n", x / COREL_SC, y / COREL_SC); corel_path_count += 1; corel_stroke = TRUE; } TERM_PUBLIC void COREL_vector(unsigned int x, unsigned int y) { fprintf(gpoutfile, "%.2f %.2f l\n", x / COREL_SC, y / COREL_SC); corel_path_count += 1; corel_stroke = TRUE; if (corel_path_count >= 400) { fprintf(gpoutfile, "S\n%.2f %.2f m\n", x / COREL_SC, y / COREL_SC); corel_path_count = 0; } } TERM_PUBLIC void COREL_put_text(unsigned int x, unsigned int y, const char *str) { char ch; if (corel_stroke) { fputs("S\n", gpoutfile); corel_stroke = FALSE; } switch (corel_justify) { case LEFT: fprintf(gpoutfile, "/_%s %d %d 0 0 z\n", corel_font, corel_fontsize, corel_fontsize); break; case CENTRE: fprintf(gpoutfile, "/_%s %d %d 0 1 z\n", corel_font, corel_fontsize, corel_fontsize); break; case RIGHT: fprintf(gpoutfile, "/_%s %d %d 0 2 z\n", corel_font, corel_fontsize, corel_fontsize); break; } if (corel_ang == 0) { fprintf(gpoutfile, "[1 0 0 1 %.2f %.2f]e\n0 g\n", x / COREL_SC, y / COREL_SC - corel_fontsize / 3.0); } else { fprintf(gpoutfile, "[0 1 -1 0 %.2f %.2f]e\n0 g\n", x / COREL_SC - corel_fontsize / 3.0, y / COREL_SC); } putc('(', gpoutfile); ch = *str++; while (ch != NUL) { if ((ch == '(') || (ch == ')') || (ch == '\\')) putc('\\', gpoutfile); putc(ch, gpoutfile); ch = *str++; } fputs(")t\nT\n", gpoutfile); corel_path_count = 0; } TERM_PUBLIC int COREL_text_angle(int ang) { corel_ang = ang; return TRUE; } TERM_PUBLIC int COREL_justify_text(enum JUSTIFY mode) { corel_justify = mode; return TRUE; } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(corel_driver) "corel", "EPS format for CorelDRAW", CORELD_XMAX, CORELD_YMAX, CORELD_VCHAR, CORELD_HCHAR, CORELD_VTIC, CORELD_HTIC, COREL_options, COREL_init, COREL_reset, COREL_text, null_scale, COREL_graphics, COREL_move, COREL_vector, COREL_linetype, COREL_put_text, COREL_text_angle, COREL_justify_text, do_point, do_arrow, set_font_null TERM_TABLE_END(corel_driver) #undef LAST_TERM #define LAST_TERM corel_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(corel) "1 corel", "?commands set terminal corel", "?set terminal corel", "?set term corel", "?terminal corel", "?term corel", "?corel", " The `corel` terminal driver supports CorelDraw.", "", " Syntax:", " set terminal corel { default", " | {monochrome | color", " {\"\" { ", " { { }}}}}", "", " where the fontsize and linewidth are specified in points and the sizes in", " inches. The defaults are monochrome, \"SwitzerlandLight\", 22, 8.2, 10 and 1.2." END_HELP(corel) #endif /* TERM_HELP */ gnuplot-4.6.4/term/canvas.trm0000644000471100001440000014246012151702407013105 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: canvas.trm,v 1.56.2.9 2013/05/30 05:53:14 sfeam Exp $ * */ /* GNUPLOT - canvas.trm */ /* * This file is included by ../term.c. * * This terminal driver supports: * W3C HTML tag * * AUTHOR * Bruce Lueckenhoff, Aug 2008 * Bruce_Lueckenhoff@yahoo.com * * Additions * Ethan A Merritt, Jan 2009 * CANVAS_set_color(), CANVAS_make_palette(), CANVAS_fillbox(), fillstyles, * CANVAS_point(), CANVAS_pointsize() * "name " option to create only a callable javascript file foo.js * "fsize " option to select font size (default remains 10.0) * Ethan A Merritt, Jan 2009 * Prototype mousing code in separate file gnuplot_mouse.js * Ethan A Merritt, Feb 2009 * Enhanced text support. Note: character placement could be done more * precisely by moving the enhanced text code into the javascript routines, * where exact character widths are known, and save/restore can be used. * Ethan A Merritt, Mar 2009 * Oversampling and client-side zoom/unzoom, hotkeys * Ethan A Merritt, May 2009 * Give each plot its own namespace for mousing (allows multiple mouseable * plots in a single HTML document). * Ethan A Merritt, Nov 2010 * Dashed line support, butt/rounded line properties * revised javascript with all methods and variables in container gnuplot() * Ethan A Merritt, Feb/Mar/Apr 2011 * Optional explicit background * Wrap each plot in a test for gnuplot.hide_plot_N * Handle image data by storing it in a parallel PNG file * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ #include "driver.h" #ifdef TERM_REGISTER register_term(canvas_driver) #endif #ifdef TERM_PROTO TERM_PUBLIC void CANVAS_options __PROTO((void)); TERM_PUBLIC void CANVAS_init __PROTO((void)); TERM_PUBLIC void CANVAS_graphics __PROTO((void)); TERM_PUBLIC int CANVAS_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void CANVAS_text __PROTO((void)); TERM_PUBLIC void CANVAS_reset __PROTO((void)); TERM_PUBLIC void CANVAS_linetype __PROTO((int linetype)); TERM_PUBLIC void CANVAS_fillbox __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); TERM_PUBLIC void CANVAS_linewidth __PROTO((double linewidth)); TERM_PUBLIC void CANVAS_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void CANVAS_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void CANVAS_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void CANVAS_pointsize __PROTO((double size)); TERM_PUBLIC void CANVAS_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int CANVAS_text_angle __PROTO((int ang)); TERM_PUBLIC void CANVAS_filled_polygon __PROTO((int, gpiPoint *)); TERM_PUBLIC void CANVAS_set_color __PROTO((t_colorspec *colorspec)); TERM_PUBLIC int CANVAS_make_palette __PROTO((t_sm_palette *palette)); TERM_PUBLIC void CANVAS_layer __PROTO((t_termlayer)); TERM_PUBLIC void CANVAS_path __PROTO((int)); TERM_PUBLIC int CANVAS_set_font __PROTO((const char *)); TERM_PUBLIC void ENHCANVAS_OPEN __PROTO((char *, double, double, TBOOLEAN, TBOOLEAN, int)); TERM_PUBLIC void ENHCANVAS_FLUSH __PROTO((void)); TERM_PUBLIC void ENHCANVAS_put_text __PROTO((unsigned int, unsigned int, const char *)); #define CANVAS_OVERSAMPLE 10. #define CANVAS_XMAX (600 * CANVAS_OVERSAMPLE) #define CANVAS_YMAX (400 * CANVAS_OVERSAMPLE) #define CANVASVTIC (10 * CANVAS_OVERSAMPLE) #define CANVASHTIC (10 * CANVAS_OVERSAMPLE) #define CANVASVCHAR (10 * CANVAS_OVERSAMPLE) #define CANVASHCHAR (8 * CANVAS_OVERSAMPLE) #endif /* TERM_PROTO */ #ifdef TERM_BODY #define CANVAS_AXIS_CONST '\1' #define CANVAS_BORDER_CONST '\2' static int canvas_x = -1; /* current X position */ static int canvas_y = -1; /* current Y position */ static int canvas_xmax = CANVAS_XMAX; static int canvas_ymax = CANVAS_YMAX; static int canvas_line_type = LT_UNDEFINED; static double canvas_linewidth = 1.0; static double canvas_dashlength_factor = 1.0; static double CANVAS_ps = 1; /* pointsize multiplier */ static double CANVAS_default_fsize = 10; static double canvas_font_size = 10; static double canvas_fontscale = 1.0; static char * canvas_font_name = NULL; static char *canvas_justify = ""; static int canvas_text_angle = 0; static int canvas_in_a_path = FALSE; static int already_closed = FALSE; static TBOOLEAN canvas_dashed = FALSE; static TBOOLEAN canvas_rounded = FALSE; static TBOOLEAN CANVAS_mouseable = FALSE; static TBOOLEAN CANVAS_standalone = TRUE; static char CANVAS_background[18] = {'\0'}; static char *CANVAS_name = NULL; static char *CANVAS_scriptdir = NULL; static char *CANVAS_title = NULL; /* * Stuff for tracking images stored in separate files * to be referenced by canvas.drawImage(); */ static int CANVAS_imageno = 0; typedef struct canvas_imagefile { int imageno; /* Used to generate the internal name */ char *filename; /* The parallel file that it maps to */ struct canvas_imagefile *next; } canvas_imagefile; static canvas_imagefile *imagelist = NULL; static struct { int previous_linewidth; char color[18]; /* rgb(rrr,ggg,bbb) */ char previous_color[18]; /* rgb(rrr,ggg,bbb) */ char previous_fill[24]; /* rgba(rrr,ggg,bbb,aaaa) */ int plotno; /* Which plot are we in? */ } canvas_state; enum CANVAS_case { CANVAS_SIZE, CANVAS_FONT, CANVAS_FSIZE, CANVAS_NAME, CANVAS_STANDALONE, CANVAS_TITLE, CANVAS_LINEWIDTH, CANVAS_MOUSING, CANVAS_JSDIR, CANVAS_ENH, CANVAS_NOENH, CANVAS_FONTSCALE, CANVAS_SOLID, CANVAS_DASHED, CANVAS_DASHLENGTH, CANVAS_ROUNDED, CANVAS_BUTT, CANVAS_BACKGROUND, CANVAS_OTHER }; static struct gen_table CANVAS_opts[] = { { "font", CANVAS_FONT }, { "fsize", CANVAS_FSIZE }, { "name", CANVAS_NAME }, { "size", CANVAS_SIZE }, { "standalone", CANVAS_STANDALONE }, { "mous$ing", CANVAS_MOUSING }, { "mouse", CANVAS_MOUSING }, { "js$dir", CANVAS_JSDIR }, { "enh$anced", CANVAS_ENH }, { "noenh$anced", CANVAS_NOENH }, { "lw", CANVAS_LINEWIDTH }, { "linew$idth", CANVAS_LINEWIDTH }, { "title", CANVAS_TITLE }, { "fontscale", CANVAS_FONTSCALE }, { "solid", CANVAS_SOLID }, { "dash$ed", CANVAS_DASHED }, { "dashl$ength", CANVAS_DASHLENGTH }, { "dl", CANVAS_DASHLENGTH }, { "round$ed", CANVAS_ROUNDED }, { "butt", CANVAS_BUTT }, { "backg$round", CANVAS_BACKGROUND }, { NULL, CANVAS_OTHER } }; static void CANVAS_start (void) { if (canvas_in_a_path) return; fprintf(gpoutfile, "ctx.beginPath();\n"); canvas_in_a_path = TRUE; already_closed = FALSE; } static void CANVAS_finish (void) { if (!canvas_in_a_path) return; fprintf(gpoutfile, "ctx.stroke();\n"); if (!already_closed) fprintf(gpoutfile, "ctx.closePath();\n"); canvas_in_a_path = FALSE; already_closed = TRUE; } TERM_PUBLIC void CANVAS_options() { int canvas_background = 0; /* (c_token == 2) only in the case of 'set termoption' */ /* which is after we have already initialized everything. */ if (c_token != 2) { /* Re-initialize a few things */ canvas_font_size = CANVAS_default_fsize = 10; canvas_fontscale = 1.0; CANVAS_standalone = TRUE; CANVAS_mouseable = FALSE; free(CANVAS_name); CANVAS_name = NULL; free(CANVAS_title); CANVAS_title = NULL; free(CANVAS_scriptdir); CANVAS_scriptdir = NULL; canvas_linewidth = 1.0; canvas_dashed = FALSE; canvas_dashlength_factor = 1.0; CANVAS_background[0] = '\0'; } while (!END_OF_COMMAND) { switch(lookup_table(&CANVAS_opts[0],c_token++)) { case CANVAS_SIZE: if (END_OF_COMMAND) { canvas_xmax = CANVAS_XMAX; canvas_ymax = CANVAS_YMAX; } else { canvas_xmax = int_expression() * CANVAS_OVERSAMPLE; if (equals(c_token,",")) { c_token++; canvas_ymax = int_expression() * CANVAS_OVERSAMPLE; } } if (canvas_xmax <= 0) canvas_xmax = CANVAS_XMAX; if (canvas_ymax <= 0) canvas_ymax = CANVAS_YMAX; term->xmax = canvas_xmax; term->ymax = canvas_ymax; break; case CANVAS_TITLE: CANVAS_title = try_to_get_string(); if (!CANVAS_title) int_error(c_token,"expecting an HTML title string"); break; case CANVAS_NAME: CANVAS_name = try_to_get_string(); if (!CANVAS_name) int_error(c_token,"expecting a javascript function name"); if (CANVAS_name[strspn(CANVAS_name, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_1234567890")]) int_error(c_token-1,"illegal javascript function name"); CANVAS_standalone = FALSE; break; case CANVAS_STANDALONE: CANVAS_standalone = TRUE; break; case CANVAS_FONT: /* FIXME: See note at CANVAS_set_font() */ free(canvas_font_name); if (!(canvas_font_name = try_to_get_string())) int_error(c_token,"font: expecting string"); CANVAS_set_font(canvas_font_name); break; case CANVAS_FSIZE: CANVAS_default_fsize = real_expression(); if (CANVAS_default_fsize <= 0) CANVAS_default_fsize = 10; canvas_font_size = CANVAS_default_fsize; break; case CANVAS_MOUSING: CANVAS_mouseable = TRUE; break; case CANVAS_JSDIR: CANVAS_scriptdir = try_to_get_string(); break; case CANVAS_ENH: term->put_text = ENHCANVAS_put_text; term->flags |= TERM_ENHANCED_TEXT; break; case CANVAS_NOENH: term->put_text = CANVAS_put_text; term->flags &= ~TERM_ENHANCED_TEXT; break; case CANVAS_LINEWIDTH: canvas_linewidth = real_expression(); if (canvas_linewidth <= 0) canvas_linewidth = 1.0; break; case CANVAS_FONTSCALE: canvas_fontscale = real_expression(); if (canvas_fontscale <= 0) canvas_fontscale = 1.0; break; case CANVAS_SOLID: canvas_dashed = FALSE; break; case CANVAS_DASHED: canvas_dashed = TRUE; break; case CANVAS_DASHLENGTH: canvas_dashlength_factor = real_expression(); if (canvas_dashlength_factor <= 0.2) canvas_dashlength_factor = 1.0; break; case CANVAS_ROUNDED: canvas_rounded = TRUE; break; case CANVAS_BUTT: canvas_rounded = FALSE; break; case CANVAS_BACKGROUND: canvas_background = parse_color_name(); sprintf(CANVAS_background,"rgb(%03d,%03d,%03d)", (canvas_background >> 16) & 0xff, (canvas_background >> 8) & 0xff, canvas_background & 0xff); break; default: int_warn(c_token-1,"unrecognized terminal option"); break; } } term->v_char = canvas_font_size * canvas_fontscale * CANVAS_OVERSAMPLE; term->h_char = canvas_font_size * canvas_fontscale * 0.8 * CANVAS_OVERSAMPLE; sprintf(term_options, canvas_dashed ? " dashed" : " solid"); if (canvas_dashed && canvas_dashlength_factor != 1.0) sprintf(term_options + strlen(term_options), " dashlength %3.1f", canvas_dashlength_factor); sprintf(term_options + strlen(term_options), canvas_rounded ? " rounded" : " butt"); sprintf(term_options + strlen(term_options), " size %d,%d", (int)(term->xmax/CANVAS_OVERSAMPLE), (int)(term->ymax/CANVAS_OVERSAMPLE)); sprintf(term_options + strlen(term_options), "%s fsize %g lw %g", term->put_text == ENHCANVAS_put_text ? " enhanced" : "", canvas_font_size, canvas_linewidth); sprintf(term_options + strlen(term_options), " fontscale %g", canvas_fontscale); if (*CANVAS_background) sprintf(term_options + strlen(term_options), " background \"#%06x\"", canvas_background); if (CANVAS_name) sprintf(term_options + strlen(term_options), " name \"%s\"", CANVAS_name); else { sprintf(term_options + strlen(term_options), " standalone"); if (CANVAS_mouseable) sprintf(term_options + strlen(term_options), " mousing"); if (CANVAS_title) sprintf(term_options + strlen(term_options), " title \"%s\"", CANVAS_title); } if (CANVAS_scriptdir) sprintf(term_options + strlen(term_options), " jsdir \"%s\"", CANVAS_scriptdir); } TERM_PUBLIC void CANVAS_init() { } TERM_PUBLIC void CANVAS_graphics() { #if !defined(VMS) int len; #endif /* Force initialization at the beginning of each plot */ canvas_line_type = LT_UNDEFINED; canvas_text_angle = 0; canvas_in_a_path = FALSE; canvas_state.previous_linewidth = -1; canvas_state.previous_color[0] = '\0'; canvas_state.previous_fill[0] = '\0'; strcpy(canvas_state.color,"rgb(000,000,000)"); canvas_state.plotno = 0; /* * FIXME: This code could be shared with svg.trm * Figure out where to find javascript support routines * when the page is viewed. */ if (CANVAS_scriptdir == NULL) { char *canvas_default_jsdir = ""; #ifdef GNUPLOT_JS_DIR # if defined(_Windows) /* retrieve path relative to the gnuplot executable, * whose path is in szModuleName (winmain.c) */ /* EAM FIXME: memory leak */ canvas_default_jsdir = gp_alloc(strlen((char*) szPackageDir) + strlen(GNUPLOT_JS_DIR) + 2, "jsdir"); strcpy(canvas_default_jsdir, (char*) szPackageDir); len = strlen(canvas_default_jsdir); if (*canvas_default_jsdir && canvas_default_jsdir[len-1] != '\\' && canvas_default_jsdir[len-1] != '/') strcat(canvas_default_jsdir, "\\"); /* GNUPLOT_JS_DIR is _relative_ path */ strcat(canvas_default_jsdir, GNUPLOT_JS_DIR); # else /* !_Windows */ /* use hardcoded _absolute_ path */ canvas_default_jsdir = GNUPLOT_JS_DIR; # endif #endif /* GNUPLOT_JS_DIR */ CANVAS_scriptdir = gp_strdup(canvas_default_jsdir); } #if !defined(VMS) len = strlen(CANVAS_scriptdir); # if defined(_Windows) if (*CANVAS_scriptdir && CANVAS_scriptdir[len-1] != '\\' && CANVAS_scriptdir[len-1] != '/') { CANVAS_scriptdir = gp_realloc(CANVAS_scriptdir, len+2, "jsdir"); if (CANVAS_scriptdir[len-1] == '\\') /* use backslash if used in jsdir, otherwise slash */ strcat(CANVAS_scriptdir,"\\"); else strcat(CANVAS_scriptdir,"/"); } # else if (*CANVAS_scriptdir && CANVAS_scriptdir[len-1] != '/') { CANVAS_scriptdir = gp_realloc(CANVAS_scriptdir, len+2, "jsdir"); strcat(CANVAS_scriptdir,"/"); } # endif #endif if (CANVAS_standalone) { fprintf(gpoutfile, "\n" "\n" "\n" "%s\n", CANVAS_title ? CANVAS_title : "Gnuplot Canvas Graph" ); if (encoding == S_ENC_UTF8 || encoding == S_ENC_DEFAULT) fprintf(gpoutfile, "\n" ); fprintf(gpoutfile, "\n" "\n" "\n" , CANVAS_scriptdir , (encoding == S_ENC_UTF8) ? "canvasmath" : "canvastext" , CANVAS_scriptdir); if (canvas_dashed) fprintf(gpoutfile, "\n" , CANVAS_scriptdir); if (CANVAS_mouseable) { fprintf(gpoutfile, "\n" , CANVAS_scriptdir); fprintf(gpoutfile, "\n" , CANVAS_scriptdir); } else { fprintf(gpoutfile, "\n"); } fprintf(gpoutfile, "\n" "\n" "\n" "\n\n" "
\n", CANVAS_scriptdir ? CANVAS_scriptdir : "" ); /* The format of the plot box and in particular the mouse tracking box * are determined by the CSS specs in customizable file gnuplot_mouse.css * We could make this even more customizable by providing an external HTML * template, but in that case the user might as well just create a *.js * file and provide his own wrapping HTML document. */ if (CANVAS_mouseable) { int i; fprintf(gpoutfile, "
\n" "\n" " \n" "
\n" " \n" " \n" " \n" "
\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n", CANVAS_scriptdir ? CANVAS_scriptdir : "", CANVAS_scriptdir ? CANVAS_scriptdir : "", CANVAS_scriptdir ? CANVAS_scriptdir : "", CANVAS_scriptdir ? CANVAS_scriptdir : "", CANVAS_scriptdir ? CANVAS_scriptdir : "" ); /* Table row of plot toggle icons goes here */ for (i=1; i<=6*((canvas_state.plotno+5)/6); i++) { if ((i%6) == 1) fprintf(gpoutfile, " \n"); if (i<=canvas_state.plotno) fprintf(gpoutfile, " \n",i,i); else fprintf(gpoutfile, " \n"); if ((i%6) == 0) fprintf(gpoutfile, " \n"); } fprintf(gpoutfile, "
\"#\"\"unzoom\"\"rezoom\"\"zoom\"?\"
%d
\n" "
\n" ); fprintf(gpoutfile, "\n" "\n" "\n" ); if ((axis_array[SECOND_X_AXIS].ticmode & TICS_MASK) != NO_TICS) fprintf(gpoutfile, "\n"); if ((axis_array[SECOND_Y_AXIS].ticmode & TICS_MASK) != NO_TICS) fprintf(gpoutfile, "\n"); fprintf(gpoutfile, "
 
 
x2   
y2   
\n" ); fprintf(gpoutfile, "
\n" ); } /* End if (CANVAS_mouseable) */ fprintf(gpoutfile, "\n" "\n" "
\n" " \n" " Sorry, your browser seems not to support the HTML 5 canvas element\n" " \n" "
\n", (int)(term->xmax/CANVAS_OVERSAMPLE), (int)(term->ymax/CANVAS_OVERSAMPLE) ); if (CANVAS_mouseable) { fprintf(gpoutfile, "
\n" ); } fprintf(gpoutfile, "
\n\n" "\n" "\n" ); } fflush(gpoutfile); } TERM_PUBLIC void CANVAS_reset() { ; } TERM_PUBLIC void CANVAS_linetype(int linetype) { /* NB: These values are manipulated as numbers; */ /* it does not work to give only the color name */ static const char * pen_type[17] = { "rgb(255,255,255)", /* should be background */ "rgb(000,000,000)", /* black */ "rgb(160,160,160)", /* grey */ "rgb(255,000,000)", /* red */ "rgb(000,171,000)", /* green */ "rgb(000,000,225)", /* blue */ "rgb(190,000,190)", /* purple */ "rgb(000,255,255)", /* cyan */ "rgb(021,117,069)", /* pine green*/ "rgb(000,000,148)", /* navy */ "rgb(255,153,000)", /* orange */ "rgb(000,153,161)", /* green blue*/ "rgb(214,214,069)", /* olive*/ "rgb(163,145,255)", /* cornflower*/ "rgb(255,204,000)", /* gold*/ "rgb(214,000,120)", /* mulberry*/ "rgb(171,214,000)", /* green yellow*/ }; if (linetype == canvas_line_type) return; canvas_line_type = linetype; CANVAS_finish(); if (linetype >= 14) linetype %= 14; if (linetype <= LT_NODRAW) /* LT_NODRAW, LT_BACKGROUND, LT_UNDEFINED */ linetype = -3; if (linetype == -3 && *CANVAS_background) strcpy(canvas_state.color,CANVAS_background); else strcpy(canvas_state.color,pen_type[linetype + 3]); if (strcmp(canvas_state.color, canvas_state.previous_color)) { fprintf(gpoutfile, "ctx.strokeStyle = \"%s\";\n", canvas_state.color); strcpy(canvas_state.previous_color, canvas_state.color); } if (canvas_dashed) { if (0 < linetype && linetype < 5) fprintf(gpoutfile, "DT(gnuplot.dashpattern%1d);\n",linetype+1); else if (linetype == -1) /* Axis */ fprintf(gpoutfile, "DT(gnuplot.dashpattern3);\n"); else fprintf(gpoutfile, "DT(gnuplot.solid);\n"); } } TERM_PUBLIC void CANVAS_move(unsigned int arg_x, unsigned int arg_y) { if (canvas_in_a_path && (canvas_x == arg_x) && (canvas_y == arg_y)) { return; } CANVAS_start(); fprintf(gpoutfile, "M(%u,%u);\n", arg_x, canvas_ymax - arg_y); canvas_x = arg_x; canvas_y = arg_y; } TERM_PUBLIC void CANVAS_vector(unsigned int arg_x, unsigned int arg_y) { if ((canvas_x == arg_x) && (canvas_y == arg_y)) return; if (!canvas_in_a_path) { /* Force a new path */ CANVAS_move(canvas_x, canvas_y); } fprintf(gpoutfile, "L(%u,%u);\n", arg_x, canvas_ymax - arg_y ); canvas_x = arg_x; canvas_y = arg_y; } TERM_PUBLIC int CANVAS_justify_text(enum JUSTIFY mode) { switch (mode) { case (CENTRE): canvas_justify = "Center"; break; case (RIGHT): canvas_justify = "Right"; break; default: case (LEFT): canvas_justify = ""; break; } return (TRUE); } TERM_PUBLIC void CANVAS_point(unsigned int x, unsigned int y, int number) { double width = CANVAS_ps * 0.6 * CANVASHTIC; int pt = number % 9; /* Skip size 0 points; the alternative would be to draw a Dot instead */ if (width <= 0 && pt >= 0) return; CANVAS_finish(); switch (pt) { default: fprintf(gpoutfile, "Dot(%d,%d);\n", x, (canvas_ymax-y)); break; case 4: case 6: case 8: if (strcmp(canvas_state.previous_fill, canvas_state.color)) { fprintf(gpoutfile, "ctx.fillStyle = \"%s\";\n", canvas_state.color); strcpy(canvas_state.previous_fill, canvas_state.color); } /* Fall through */ case 0: case 1: case 2: case 3: case 5: case 7: fprintf(gpoutfile, "Pt(%d,%d,%d,%.1f);\n", pt, x, (canvas_ymax-y), width); break; } } TERM_PUBLIC void CANVAS_pointsize(double ptsize) { if (ptsize < 0) CANVAS_ps = 1; else CANVAS_ps = ptsize; } TERM_PUBLIC int CANVAS_text_angle(int ang) { canvas_text_angle = -1 * ang; return TRUE; } TERM_PUBLIC void CANVAS_put_text(unsigned int x, unsigned int y, const char *str) { if (!str || !(*str)) return; CANVAS_finish(); if (0 != canvas_text_angle) { fprintf(gpoutfile, "TR(%d,%d,%d,%.1f,\"%s\",\"", x, (int)(canvas_ymax + 5*CANVAS_OVERSAMPLE - y), canvas_text_angle, canvas_font_size * canvas_fontscale, canvas_justify); } else { fprintf(gpoutfile, "T(%d,%d,%.1f,\"%s\",\"", x, (int)(canvas_ymax + 5*CANVAS_OVERSAMPLE - y), canvas_font_size * canvas_fontscale, canvas_justify); } /* Sanitize string by escaping quote characters */ do { if (*str == '"' || *str == '\\') fputc('\\', gpoutfile); fputc(*str++, gpoutfile); } while (*str); fprintf(gpoutfile, "\");\n"); } TERM_PUBLIC void CANVAS_linewidth(double linewidth) { CANVAS_finish(); if (canvas_state.previous_linewidth != linewidth) { fprintf(gpoutfile, "ctx.lineWidth = %g;\n", linewidth * canvas_linewidth); canvas_state.previous_linewidth = linewidth; } } TERM_PUBLIC void CANVAS_set_color(t_colorspec *colorspec) { rgb255_color rgb255; if (colorspec->type == TC_LT) { CANVAS_linetype(colorspec->lt); return; } else if (colorspec->type == TC_RGB) { rgb255.r = (colorspec->lt >> 16) & 0xff; rgb255.g = (colorspec->lt >> 8) & 0xff; rgb255.b = colorspec->lt & 0xff; } else if (colorspec->type == TC_FRAC) { rgb255maxcolors_from_gray(colorspec->value, &rgb255); } else /* Other color types not yet supported */ return; CANVAS_finish(); sprintf(canvas_state.color,"rgb(%03d,%03d,%03d)", rgb255.r, rgb255.g, rgb255.b); if (strcmp(canvas_state.color, canvas_state.previous_color)) { fprintf(gpoutfile, "ctx.strokeStyle = \"%s\";\n", canvas_state.color); strcpy(canvas_state.previous_color, canvas_state.color); } canvas_line_type = LT_UNDEFINED; } TERM_PUBLIC int CANVAS_make_palette(t_sm_palette *palette) { /* We can do full RGB color */ return 0; } static char * CANVAS_fillstyle(int style) { float density = (float)(style >> 4) / 100.; static char fillcolor[24]; switch (style & 0xf) { case FS_TRANSPARENT_SOLID: sprintf(fillcolor,"rgba(%11.11s,%4.2f)%c", &canvas_state.color[4], density, '\0'); break; case FS_EMPTY: strcpy(fillcolor,"rgba(255,255,255,0.00)"); break; case FS_PATTERN: case FS_TRANSPARENT_PATTERN: /* Patterns are possible, but not yet implemented */ switch ((style >> 4) % 5) { case 0: density = 0.00; break; case 1: density = 1.00; break; case 2: density = 0.25; break; case 3: density = 0.75; break; case 4: density = 0.50; break; } /* fall through */ case FS_SOLID: if (density == 1) { strcpy(fillcolor,canvas_state.color); } else { int r = atoi(&canvas_state.color[4]); int g = atoi(&canvas_state.color[8]); int b = atoi(&canvas_state.color[12]); r = (float)r*density + 255.*(1.-density); g = (float)g*density + 255.*(1.-density); b = (float)b*density + 255.*(1.-density); sprintf(fillcolor,"rgb(%3d,%3d,%3d)%c", r, g, b, '\0'); } break; default: /* Use current color, wherever it came from */ sprintf(fillcolor,"%s%c",canvas_state.color,'\0'); } return fillcolor; } TERM_PUBLIC void CANVAS_filled_polygon(int points, gpiPoint *corners) { int i; CANVAS_finish(); /* FIXME: I do not understand why this is necessary, but without it */ /* a dashed line followed by a filled area fails to fill. */ if (canvas_dashed) { fprintf(gpoutfile, "DT(gnuplot.solid);\n"); canvas_line_type = LT_UNDEFINED; } if (corners->style != FS_OPAQUE && corners->style != FS_DEFAULT) { char *fillcolor = CANVAS_fillstyle(corners->style); if (strcmp(canvas_state.previous_fill, fillcolor)) { fprintf(gpoutfile, "ctx.fillStyle = \"%s\";\n", fillcolor); strcpy(canvas_state.previous_fill, fillcolor); } } fprintf(gpoutfile, "bp(%d, %d);\n" , corners[0].x, canvas_ymax - corners[0].y); for (i = 1; i < points; i++) { fprintf(gpoutfile, "L(%d, %d);\n" , corners[i].x, canvas_ymax - corners[i].y); } if (corners->style != FS_OPAQUE && corners->style != FS_DEFAULT) /* Fill with separate fillStyle color */ fprintf(gpoutfile, "cfp();\n"); else /* Fill with stroke color */ fprintf(gpoutfile, "cfsp();\n"); } TERM_PUBLIC void CANVAS_fillbox(int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height) { char *fillcolor = CANVAS_fillstyle(style); /* FIXME: I do not understand why this is necessary, but without it */ /* a dashed line followed by a filled area fails to fill. */ if (canvas_dashed) { fprintf(gpoutfile, "DT(gnuplot.solid);\n"); canvas_line_type = LT_UNDEFINED; } /* Since filled-rectangle is a primitive operation for the canvas element */ /* it's worth making this a special case rather than using filled_polygon */ if (strcmp(canvas_state.previous_fill, fillcolor)) { fprintf(gpoutfile, "ctx.fillStyle = \"%s\";\n", fillcolor); strcpy(canvas_state.previous_fill, fillcolor); } fprintf(gpoutfile, "R(%d,%d,%d,%d);\n", x1, canvas_ymax - (y1+height), width, height); } TERM_PUBLIC void CANVAS_layer(t_termlayer layer) { char *basename = (CANVAS_name) ? CANVAS_name : "gp"; switch (layer) { case TERM_LAYER_BEFORE_PLOT: canvas_state.plotno++; CANVAS_finish(); fprintf(gpoutfile, "if (typeof(gnuplot.hide_%s_plot_%d) == \"undefined\"" "|| !gnuplot.hide_%s_plot_%d) {\n", basename, canvas_state.plotno, basename, canvas_state.plotno); break; case TERM_LAYER_AFTER_PLOT: CANVAS_finish(); fprintf(gpoutfile,"} // End %s_plot_%d \n", basename, canvas_state.plotno); canvas_line_type = LT_UNDEFINED; canvas_state.previous_linewidth = -1; canvas_state.previous_color[0] = '\0'; canvas_state.previous_fill[0] = '\0'; break; case TERM_LAYER_BEGIN_GRID: fprintf(gpoutfile, "if (gnuplot.grid_lines) {\n" "var saveWidth = ctx.lineWidth;\n" "ctx.lineWidth = ctx.lineWidth * 0.5;\n"); break; case TERM_LAYER_END_GRID: fprintf(gpoutfile, "ctx.lineWidth = saveWidth;\n" "} // grid_lines\n"); break; case TERM_LAYER_RESET: case TERM_LAYER_RESET_PLOTNO: canvas_state.plotno = 0; break; default: break; } } TERM_PUBLIC void CANVAS_path(int p) { switch (p) { case 1: /* Close path */ fprintf(gpoutfile, "ctx.closePath();\n"); already_closed = TRUE; break; case 0: break; } } /* FIXME: The HTML5 canvas element did not originally provide any */ /* support for text output, let alone fonts.There are now text routines */ /* in the HTML5 draft spec, but they are not yet widely supported. */ /* So for now we will accept a font request, but ignore it except for */ /* the size. */ /* Eventually the text calls will look something like */ /* ctx.font = "12pt Times"; */ /* ctx.textAlign = "center"; */ /* ctx.fillText( "Oh goody, text support.", x, y ); */ /* */ TERM_PUBLIC int CANVAS_set_font(const char *newfont) { int sep; if (!newfont || !(*newfont)) canvas_font_size = CANVAS_default_fsize; else { sep = strcspn(newfont,","); if (newfont[sep] == ',') { sscanf(&(newfont[sep+1]), "%lf", &canvas_font_size); if (canvas_font_size <= 0) canvas_font_size = CANVAS_default_fsize; } } term->v_char = canvas_font_size * canvas_fontscale * CANVAS_OVERSAMPLE; term->h_char = canvas_font_size * canvas_fontscale * 0.8 * CANVAS_OVERSAMPLE; return 1; } /* Enhanced text mode support starts here */ static double ENHCANVAS_base = 0.0; static double ENHCANVAS_fontsize = 0; static TBOOLEAN ENHCANVAS_opened_string = FALSE; static TBOOLEAN ENHCANVAS_show = TRUE; static TBOOLEAN ENHCANVAS_sizeonly = FALSE; static TBOOLEAN ENHCANVAS_widthflag = TRUE; static TBOOLEAN ENHCANVAS_overprint = FALSE; TERM_PUBLIC void ENHCANVAS_OPEN( char *fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { static int save_x, save_y; /* overprint = 1 means print the base text (leave position in center) * overprint = 2 means print the overlying text * overprint = 3 means save current position * overprint = 4 means restore saved position */ if (overprint == 3) { save_x = canvas_x; save_y = canvas_y; return; } if (overprint == 4) { canvas_x = save_x; canvas_y = save_y; return; } if (!ENHCANVAS_opened_string) { ENHCANVAS_opened_string = TRUE; enhanced_cur_text = &enhanced_text[0]; ENHCANVAS_fontsize = fontsize; ENHCANVAS_base = base * CANVAS_OVERSAMPLE; ENHCANVAS_show = showflag; ENHCANVAS_widthflag = widthflag; ENHCANVAS_overprint = overprint; } } /* * Since we only have the one font, and the character widths are known, * we can go to the trouble of actually counting character widths. * As it happens, the averages width of ascii characters is 20. */ static int canvas_strwidth(char *s) { int width = 0; char *end = s + strlen(s); while (*s) { if ((*s & 0x80) == 0) { if (strchr("iIl|", *s)) width += 8; else if (strchr("j`',;:!.", *s)) width += 10; else if (strchr("ftr", *s)) width += 12; else if (strchr("()[]{}\\", *s)) width += 14; else if (strchr(" JTv^_\"*ykLsxz", *s)) width += 16; else if (strchr("AceFV?abdEghnopqu", *s)) width += 18; else if (strchr("M~<>%W=&@", *s)) width += 24; else if (strchr("m", *s)) width += 30; else width += 20; s++; continue; } else if (encoding != S_ENC_UTF8) s++; else if ((*s & 0xE0) == 0xC0) s += 2; else if ((*s & 0xF0) == 0xE0) s += 3; else s += 4; width += 18; /* Assumed average width for UTF8 characters */ if (s > end) break; } return (width); } TERM_PUBLIC void ENHCANVAS_FLUSH() { double save_fontsize; int x,y; double w; if (ENHCANVAS_opened_string) { ENHCANVAS_opened_string = FALSE; *enhanced_cur_text = '\0'; save_fontsize = canvas_font_size; x = canvas_x; y = canvas_y; w = canvas_strwidth(enhanced_text) * CANVAS_OVERSAMPLE * ENHCANVAS_fontsize/25.; canvas_font_size = ENHCANVAS_fontsize; x += sin((double)canvas_text_angle * M_PI_2/90.) * ENHCANVAS_base; y += cos((double)canvas_text_angle * M_PI_2/90.) * ENHCANVAS_base; if (ENHCANVAS_show && !ENHCANVAS_sizeonly) CANVAS_put_text(x, y, enhanced_text); if (ENHCANVAS_overprint == 1) { canvas_x += w * cos((double)canvas_text_angle * M_PI_2/90.)/2; canvas_y -= w * sin((double)canvas_text_angle * M_PI_2/90.)/2; } else if (ENHCANVAS_widthflag) { canvas_x += w * cos((double)canvas_text_angle * M_PI_2/90.); canvas_y -= w * sin((double)canvas_text_angle * M_PI_2/90.); } canvas_font_size = save_fontsize; } } TERM_PUBLIC void ENHCANVAS_put_text(unsigned int x, unsigned int y, const char *str) { char *original_string = (char *)str; /* Save starting font properties */ double fontsize = canvas_font_size; char *fontname = ""; if (!strlen(str)) return; if (ignore_enhanced_text || !strpbrk(str, "{}^_@&~")) { CANVAS_put_text(x, y, str); return; } CANVAS_move(x,y); /* Set up global variables needed by enhanced_recursion() */ enhanced_fontscale = 1.0; strncpy(enhanced_escape_format,"%c",sizeof(enhanced_escape_format)); ENHCANVAS_opened_string = FALSE; ENHCANVAS_fontsize = canvas_font_size; if (!strcmp(canvas_justify,"Right") || !strcmp(canvas_justify,"Center")) ENHCANVAS_sizeonly = TRUE; while (*(str = enhanced_recursion((char *)str, TRUE, fontname, fontsize, 0.0, TRUE, TRUE, 0))) { (term->enhanced_flush)(); enh_err_check(str); if (!*++str) break; /* end of string */ } /* We can do text justification by running the entire top level string */ /* through 2 times, with the ENHgd_sizeonly flag set the first time. */ /* After seeing where the final position is, we then offset the start */ /* point accordingly and run it again without the flag set. */ if (!strcmp(canvas_justify,"Right") || !strcmp(canvas_justify,"Center")) { char *justification = canvas_justify; int x_offset = canvas_x - x; int y_offset = (canvas_text_angle == 0) ? 0 : canvas_y - y; canvas_justify = ""; ENHCANVAS_sizeonly = FALSE; if (!strcmp(justification,"Right")) { ENHCANVAS_put_text(x - x_offset, y - y_offset, original_string); } else if (!strcmp(justification,"Center")) { ENHCANVAS_put_text(x - x_offset/2, y - y_offset/2, original_string); } canvas_justify = justification; } /* Make sure we leave with the same font properties as on entry */ canvas_font_size = fontsize; ENHCANVAS_base = 0; return; } #ifdef WRITE_PNG_IMAGE TERM_PUBLIC void CANVAS_image (unsigned m, unsigned n, coordval *image, gpiPoint *corner, t_imagecolor color_mode) { char *image_file; char *base_name = CANVAS_name ? CANVAS_name : "gp"; canvas_imagefile *thisimage = NULL; /* Write the image to a png file */ image_file = gp_alloc(strlen(base_name)+16, "CANVAS_image"); sprintf(image_file, "%s_image_%02d.png", base_name, ++CANVAS_imageno); write_png_image (m, n, image, color_mode, image_file); /* Map it onto the terminals coordinate system. */ fprintf(gpoutfile, "gnuplot.ZI(%s_image_%02d, %d, %d, %d, %d, %d, %d);\n", base_name, CANVAS_imageno, m, n, corner[0].x, canvas_ymax - corner[0].y, corner[1].x, canvas_ymax - corner[1].y); /* Maintain a linked list of imageno|filename pairs */ /* so that we can load them at the end of the plot. */ thisimage = gp_alloc(sizeof(canvas_imagefile), "canvas imagefile"); thisimage->imageno = CANVAS_imageno; thisimage->filename = image_file; thisimage->next = imagelist; imagelist = thisimage; } #endif #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(canvas_driver) "canvas", "HTML Canvas object", CANVAS_XMAX, CANVAS_YMAX, CANVASVCHAR, CANVASHCHAR, CANVASVTIC, CANVASHTIC, CANVAS_options, CANVAS_init, CANVAS_reset, CANVAS_text, null_scale, CANVAS_graphics, CANVAS_move, CANVAS_vector, CANVAS_linetype, CANVAS_put_text, CANVAS_text_angle, CANVAS_justify_text, CANVAS_point, do_arrow, CANVAS_set_font, CANVAS_pointsize, TERM_CAN_MULTIPLOT|TERM_ALPHA_CHANNEL|TERM_LINEWIDTH|TERM_CAN_DASH, NULL, NULL, CANVAS_fillbox, CANVAS_linewidth #ifdef USE_MOUSE , NULL, NULL, NULL, NULL, NULL #endif , CANVAS_make_palette, NULL, CANVAS_set_color , CANVAS_filled_polygon #ifdef WRITE_PNG_IMAGE , CANVAS_image #else , NULL #endif , ENHCANVAS_OPEN, ENHCANVAS_FLUSH, do_enh_writec , CANVAS_layer , CANVAS_path /* path */ TERM_TABLE_END(canvas_driver) #undef LAST_TERM #define LAST_TERM canvas_driver #endif /* TERM_TABLE */ #ifdef TERM_HELP START_HELP(canvas) "1 canvas", "?commands set terminal canvas", "?set terminal canvas", "?set term canvas", "?terminal canvas", "?term canvas", "", " The `canvas` terminal creates a set of javascript commands that draw onto the", " HTML5 canvas element.", " Syntax:", " set terminal canvas {size , } {background }", " {font {}{,}} | {fsize }", " {{no}enhanced} {linewidth }", " {rounded | butt}", " {solid | dashed {dashlength
}}", " {standalone {mousing} | name ''}", " {jsdir 'URL/for/javascripts'}", " {title ''}", "", " where and set the size of the plot area in pixels.", " The default size in standalone mode is 600 by 400 pixels.", " The default font size is 10.", "", " NB: Only one font is available, the ascii portion of Hershey simplex Roman", " provided in the file canvastext.js. You can replace this with the file", " canvasmath.js, which contains also UTF-8 encoded Hershey simplex Greek and", " math symbols. For consistency with other terminals, it is also possible to", " use `font \"name,size\"`. Currently the font `name` is ignored, but browser", " support for named fonts is likely to arrive eventually.", "", " The default `standalone` mode creates an html page containing javascript", " code that renders the plot using the HTML 5 canvas element. The html page", " links to two required javascript files 'canvastext.js' and 'gnuplot_common.js'.", " An additional file 'gnuplot_dashedlines.js' is needed to support dashed lines.", " By default these point to local files, on unix-like systems usually in", " directory /usr/local/share/gnuplot//js. See installation notes for", " other platforms. You can change this by using the `jsdir` option to specify", " either a different local directory or a general URL. The latter is usually", " appropriate if the plot is exported for viewing on remote client machines.", "", " All plots produced by the canvas terminal are mouseable. The additional", " keyword `mousing` causes the `standalone` mode to add a mouse-tracking box", " underneath the plot. It also adds a link to a javascript file", " 'gnuplot_mouse.js' and to a stylesheet for the mouse box 'gnuplot_mouse.css'", " in the same local or URL directory as 'canvastext.js'.", "", " The `name` option creates a file containing only javascript. Both the", " javascript function it contains and the id of the canvas element that it", " draws onto are taken from the following string parameter. The commands", " set term canvas name 'fishplot'", " set output 'fishplot.js'", " will create a file containing a javascript function fishplot() that will", " draw onto a canvas with id=fishplot. An html page that invokes this", " javascript function must also load the canvastext.js function as described", " above. A minimal html file to wrap the fishplot created above might be:", "", " ", " ", " ", " ", " ", " ", " ", " ", "
No support for HTML 5 canvas element
", "
", " ", " ", "", " The individual plots drawn on this canvas will have names fishplot_plot_1,", " fishplot_plot_2, and so on. These can be referenced by external javascript", " routines, for example gnuplot.toggle_visibility(\"fishplot_plot_2\").", "" END_HELP(canvas) #endif /* TERM_HELP */ gnuplot-4.6.4/term/object.h0000644000471100001440000002677506760500430012540 0ustar /* * FIG : Facility for Interactive Generation of figures * Copyright (c) 1985 by Supoj Sutanthavibul * Parts Copyright (c) 1994 by Brian V. Smith * Parts Copyright (c) 1991 by Paul King * * The X Consortium, and any party obtaining a copy of these files from * the X Consortium, directly or indirectly, is granted, free of charge, a * full and unrestricted irrevocable, world-wide, paid up, royalty-free, * nonexclusive right and license to deal in this software and * documentation files (the "Software"), including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons who receive * copies from any such party to do so, with the only requirement being * that this copyright notice remain intact. This license includes without * limitation a license to do the foregoing actions under any patents of * the party supplying this software to the X Consortium. */ /* This file has been modified for use with Gnuplot 3.6 by * Ian MacPhedran. */ /* DEFAULT is used for many things - font, color etc */ #define DEFAULT (-1) #define SOLID_LINE 0 #define DASH_LINE 1 #define DOTTED_LINE 2 #define RUBBER_LINE 3 #define PANEL_LINE 4 #define Color int #define BLACK 0 #define BLUE 1 #define GREEN 2 #define CYAN 3 #define RED 4 #define MAGENTA 5 #define YELLOW 6 #define WHITE 7 /** VERY IMPORTANT: The f_line, f_spline and f_arc objects all must have the components up to and including the arrows in the same order. This is for the get/put_generic_arrows() in e_edit.c. **/ typedef struct f_point { int x, y; } F_point; typedef struct f_pos { int x, y; } F_pos; #define DEF_ARROW_WID (4 * ZOOM_FACTOR) #define DEF_ARROW_HT (8 * ZOOM_FACTOR) typedef struct f_arrow { int type; int style; float thickness; float wid; float ht; } F_arrow; typedef struct f_ellipse { int tagged; int distrib; int type; #define T_ELLIPSE_BY_RAD 1 #define T_ELLIPSE_BY_DIA 2 #define T_CIRCLE_BY_RAD 3 #define T_CIRCLE_BY_DIA 4 int style; int thickness; Color pen_color; Color fill_color; int fill_style; int depth; float style_val; int pen_style; float angle; int direction; #define UNFILLED -1 struct f_pos center; struct f_pos radiuses; struct f_pos start; struct f_pos end; struct f_ellipse *next; } F_ellipse; /* SEE NOTE AT TOP BEFORE CHANGING ANYTHING IN THE f_arc STRUCTURE */ typedef struct f_arc { int tagged; int distrib; int type; /* note: these arc types are the internal values */ /* in the file, they are open=1, wedge=2 */ #define T_OPEN_ARC 0 #define T_PIE_WEDGE_ARC 1 int style; int thickness; Color pen_color; Color fill_color; int fill_style; int depth; int pen_style; struct f_arrow *for_arrow; struct f_arrow *back_arrow; /* THE PRECEDING VARS MUST BE IN THE SAME ORDER IN f_arc, f_line and f_spline */ int cap_style; float style_val; int direction; struct { float x, y; } center; struct f_pos point[3]; struct f_arc *next; } F_arc; #define CLOSED_PATH 0 #define OPEN_PATH 1 #define DEF_BOXRADIUS 7 #define DEF_DASHLENGTH 4 #define DEF_DOTGAP 3 typedef struct f_pic { #ifndef PATH_MAX #define PATH_MAX 128 #endif char file[PATH_MAX]; int subtype; #define T_PIC_EPS 1 #define T_PIC_BITMAP 2 #define T_PIC_PIXMAP 3 #define T_PIC_GIF 4 #define FileInvalid -2 int flipped; unsigned char *bitmap; int numcols; /* number of colors in cmap */ float hw_ratio; int size_x, size_y; /* fig units */ struct f_pos bit_size; /* pixels */ Color color; /* only used for XBM */ int pix_rotation, pix_width, pix_height, pix_flipped; } F_pic; extern char EMPTY_PIC[]; /* SEE NOTE AT TOP BEFORE CHANGING ANYTHING IN THE f_line STRUCTURE */ typedef struct f_line { int tagged; int distrib; int type; #define T_POLYLINE 1 #define T_BOX 2 #define T_POLYGON 3 #define T_ARC_BOX 4 #define T_PIC_BOX 5 int style; int thickness; Color pen_color; Color fill_color; int fill_style; int depth; int pen_style; struct f_arrow *for_arrow; struct f_arrow *back_arrow; /* THE PRECEDING VARS MUST BE IN THE SAME ORDER IN f_arc, f_line and f_spline */ int cap_style; /* line cap style - Butt, Round, Bevel */ #define CAP_BUTT 0 #define CAP_ROUND 1 #define CAP_PROJECT 2 struct f_point *points; /* this must immediately follow cap_style */ int join_style; /* join style - Miter, Round, Bevel */ #define JOIN_MITER 0 #define JOIN_ROUND 1 #define JOIN_BEVEL 2 float style_val; int radius; /* corner radius for T_ARC_BOX */ struct f_pic *pic; struct f_line *next; } F_line; typedef struct f_text { int tagged; int distrib; int type; #define T_LEFT_JUSTIFIED 0 #define T_CENTER_JUSTIFIED 1 #define T_RIGHT_JUSTIFIED 2 int font; /* PIX_FONT fontstruct; */ int size; /* point size */ Color color; int depth; float angle; /* in radians */ int flags; #define RIGID_TEXT 1 #define SPECIAL_TEXT 2 #define PSFONT_TEXT 4 #define HIDDEN_TEXT 8 int ascent; /* Fig units */ int length; /* Fig units */ int descent; /* from XTextExtents(), not in file */ int base_x; int base_y; int pen_style; char *cstring; struct f_text *next; } F_text; #define MAXFONT(T) (psfont_text(T) ? NUM_FONTS : NUM_LATEX_FONTS) #define rigid_text(t) \ (t->flags == DEFAULT \ || (t->flags & RIGID_TEXT)) #define special_text(t) \ ((t->flags != DEFAULT \ && (t->flags & SPECIAL_TEXT))) #define psfont_text(t) \ (t->flags != DEFAULT \ && (t->flags & PSFONT_TEXT)) #define hidden_text(t) \ (t->flags != DEFAULT \ && (t->flags & HIDDEN_TEXT)) #define text_length(t) \ (hidden_text(t) ? hidden_text_length : t->length) #define using_ps (cur_textflags & PSFONT_TEXT) typedef struct f_control { float lx, ly, rx, ry; struct f_control *next; } F_control; /* SEE NOTE AT TOP BEFORE CHANGING ANYTHING IN THE f_spline STRUCTURE */ #define int_spline(s) (s->type & 0x2) #define normal_spline(s) (!(s->type & 0x2)) #define closed_spline(s) (s->type & 0x1) #define open_spline(s) (!(s->type & 0x1)) typedef struct f_spline { int tagged; int distrib; int type; #define T_OPEN_NORMAL 0 #define T_CLOSED_NORMAL 1 #define T_OPEN_INTERP 2 #define T_CLOSED_INTERP 3 int style; int thickness; Color pen_color; Color fill_color; int fill_style; int depth; int pen_style; struct f_arrow *for_arrow; struct f_arrow *back_arrow; /* THE PRECEDING VARS MUST BE IN THE SAME ORDER IN f_arc, f_line and f_spline */ int cap_style; /* * For T_OPEN_NORMAL and T_CLOSED_NORMAL points are control points while * they are knots for T_OPEN_INTERP and T_CLOSED_INTERP whose control * points are stored in controls. */ struct f_point *points; /* this must immediately follow cap_style */ float style_val; struct f_control *controls; struct f_spline *next; } F_spline; typedef struct f_compound { int tagged; int distrib; struct f_pos nwcorner; struct f_pos secorner; struct f_line *lines; struct f_ellipse *ellipses; struct f_spline *splines; struct f_text *texts; struct f_arc *arcs; struct f_compound *compounds; struct f_compound *next; } F_compound; typedef struct f_linkinfo { struct f_line *line; struct f_point *endpt; struct f_point *prevpt; int two_pts; struct f_linkinfo *next; } F_linkinfo; /* separate the "type" and the "style" from the cur_arrowtype */ #define ARROW_TYPE(x) ((x)==0? 0 : ((x)+1)/2) #define ARROW_STYLE(x) ((x)==0? 0 : ((x)+1)%2) #define ARROW_SIZE sizeof(struct f_arrow) #define POINT_SIZE sizeof(struct f_point) #define CONTROL_SIZE sizeof(struct f_control) #define ELLOBJ_SIZE sizeof(struct f_ellipse) #define ARCOBJ_SIZE sizeof(struct f_arc) #define LINOBJ_SIZE sizeof(struct f_line) #define TEXOBJ_SIZE sizeof(struct f_text) #define SPLOBJ_SIZE sizeof(struct f_spline) #define COMOBJ_SIZE sizeof(struct f_compound) #define PIC_SIZE sizeof(struct f_pic) #define LINKINFO_SIZE sizeof(struct f_linkinfo) /********************** object codes **********************/ #define O_COLOR_DEF 0 #define O_ELLIPSE 1 #define O_POLYLINE 2 #define O_SPLINE 3 /* HBB 990329: quick hack: 'O_TEXT' is in use by header * on DOS/Windows platforms. Renamed to OBJ_TEXT */ #define OBJ_TEXT 4 #define O_ARC 5 #define O_COMPOUND 6 #define O_END_COMPOUND -O_COMPOUND #define O_ALL_OBJECT 99 /********************* object masks for update ************************/ #define M_NONE 0x000 #define M_POLYLINE_POLYGON 0x001 #define M_POLYLINE_LINE 0x002 #define M_POLYLINE_BOX 0x004 /* includes ARCBOX */ #define M_SPLINE_O_NORMAL 0x008 #define M_SPLINE_C_NORMAL 0x010 #define M_SPLINE_O_INTERP 0x020 #define M_SPLINE_C_INTERP 0x040 #define M_TEXT_NORMAL 0x080 #define M_TEXT_HIDDEN 0x100 #define M_ARC 0x200 #define M_ELLIPSE 0x400 #define M_COMPOUND 0x800 #define M_TEXT (M_TEXT_HIDDEN | M_TEXT_NORMAL) #define M_SPLINE_O (M_SPLINE_O_NORMAL | M_SPLINE_O_INTERP) #define M_SPLINE_C (M_SPLINE_C_NORMAL | M_SPLINE_C_INTERP) #define M_SPLINE_NORMAL (M_SPLINE_O_NORMAL | M_SPLINE_C_NORMAL) #define M_SPLINE_INTERP (M_SPLINE_O_INTERP | M_SPLINE_C_INTERP) #define M_SPLINE (M_SPLINE_NORMAL | M_SPLINE_INTERP) #define M_POLYLINE (M_POLYLINE_LINE | M_POLYLINE_POLYGON | M_POLYLINE_BOX) #define M_VARPTS_OBJECT (M_POLYLINE_LINE | M_POLYLINE_POLYGON | M_SPLINE) #define M_OPEN_OBJECT (M_POLYLINE_LINE | M_SPLINE_O | M_ARC) #define M_ROTATE_ANGLE (M_VARPTS_OBJECT | M_ARC | M_TEXT | M_COMPOUND | M_ELLIPSE) #define M_ELLTEXTANGLE (M_ELLIPSE | M_TEXT) #define M_OBJECT (M_ELLIPSE | M_POLYLINE | M_SPLINE | M_TEXT | M_ARC) #define M_NO_TEXT (M_ELLIPSE | M_POLYLINE | M_SPLINE | M_COMPOUND | M_ARC) #define M_ALL (M_OBJECT | M_COMPOUND) /************************ Objects **********************/ extern F_compound objects; /************ global working pointers ************/ extern F_line *cur_l, *new_l, *old_l; extern F_arc *cur_a, *new_a, *old_a; extern F_ellipse *cur_e, *new_e, *old_e; extern F_text *cur_t, *new_t, *old_t; extern F_spline *cur_s, *new_s, *old_s; extern F_compound *cur_c, *new_c, *old_c; extern F_point *first_point, *cur_point; extern F_linkinfo *cur_links; /*************** object attribute settings ***********/ /* Lines */ extern int cur_linewidth; extern int cur_linestyle; extern int cur_joinstyle; extern int cur_capstyle; extern float cur_dashlength; extern float cur_dotgap; extern float cur_styleval; extern Color cur_fillcolor, cur_pencolor; extern int cur_fillstyle, cur_penstyle; extern int cur_boxradius; extern int cur_arrowmode; extern int cur_arrowtype; extern int cur_arctype; /* Text */ extern int cur_fontsize; /* font size */ extern int cur_latex_font; extern int cur_ps_font; extern int cur_textjust; extern int cur_textflags; /* Misc */ extern float cur_elltextangle; gnuplot-4.6.4/term/qt.trm0000644000471100001440000001627611706050702012262 0ustar /* GNUPLOT - qt.trm * $Id: qt.trm,v 1.2.2.2 2012/01/19 07:03:27 sfeam Exp $ */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifdef TERM_REGISTER register_term (qt) #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include "qtterminal/qt_term.h" #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START (qt_driver) "qt", "Qt terminal", /* the following values are overriden by qt_graphics */ 1 /* xmax */ , 1 /* ymax */ , 1 /* vchar */ , 1 /* hchar */ , 1 /* vtic */ , 1 /* htic */ , qt_options, qt_init, qt_reset, qt_text_wrapper, null_scale, qt_graphics, qt_move, qt_vector, qt_linetype, qt_put_text, qt_text_angle, qt_justify_text, qt_point, do_arrow, qt_set_font, qt_pointsize, TERM_CAN_MULTIPLOT|TERM_NO_OUTPUTFILE|TERM_ALPHA_CHANNEL|TERM_CAN_DASH, 0 /* suspend */, 0 /* resume */, qt_fillbox, qt_linewidth #ifdef USE_MOUSE , qt_waitforinput, qt_put_tmptext, qt_set_ruler, qt_set_cursor, qt_set_clipboard #endif , qt_make_palette, 0 /* qt_previous_palette */, qt_set_color, qt_filled_polygon , qt_image , qt_enhanced_open, qt_enhanced_flush, qt_enhanced_writec , qt_layer , NULL /* qt_path */ TERM_TABLE_END (qt_driver) #undef LAST_TERM #define LAST_TERM qt_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(qt) "1 qt", "?set terminal qt", "?terminal qt", "?set term qt", "?term qt", "?qt", " The `qt` terminal device generates output in a separate window with the Qt library." "", " Syntax:", " set term qt {}", " {size ,}", " {{no}enhanced}", " {font }", " {title \"title\"}", " {{no}persist}", " {{no}raise}", " {{no}ctrl}", " {close}", " {widget }", "", " Multiple plot windows are supported: `set terminal qt ` directs the", " output to plot window number n.", "", " The default window title is based on the window number. This title can also", " be specified with the keyword \"title\".", "", " Plot windows remain open even when the `gnuplot` driver is changed to a", " different device. A plot window can be closed by pressing the letter 'q'", " while that window has input focus, by choosing `close` from a window", " manager menu, or with `set term qt close`.", "", " The size of the plot area is given in pixels, it defaults to 640x480.", " In addition to that, the actual size of the window also includes the space", " reserved for the toolbar and the status bar.", " When you resize a window, the plot is immediately scaled to fit in the", " new size of the window. The `qt` terminal scales the whole plot, including", " fonts and linewidths, and keeps its global aspect ratio constant.", " If you type `replot`, click the `replot` icon in the terminal toolbar or", " type a new `plot` command, the new plot will completely fit in the window", " and the font size and the linewidths will be reset to their defaults.", "", " The active plot window (the one selected by `set term qt `) is", " interactive. Its behaviour is shared with other terminal types. See `mouse`", " for details. It also has some extra icons, which are supposed to be", " self-explanatory.", "", " This terminal supports an enhanced text mode, which allows font and other", " formatting commands (subscripts, superscripts, etc.) to be embedded in labels", " and other text strings. The enhanced text mode syntax is shared with other", " gnuplot terminal types. See `enhanced` for more details.", "", " is in the format \"FontFace,FontSize\", i.e. the face and the size", " comma-separated in a single string. FontFace is a usual font face name, such", " as \'Arial\'. If you do not provide FontFace, the qt terminal will use", " \'Sans\'. FontSize is the font size, in points. If you do not provide it,", " the qt terminal will use a size of 9 points.", " For example :", " set term qt font \"Arial,12\"", " set term qt font \"Arial\" # to change the font face only", " set term qt font \",12\" # to change the font size only", " set term qt font \"\" # to reset the font name and size", "", " The Qt rendering speed is affected strongly by the rendering mode used.", " In Qt version 4.7 or newer this can be controlled by the environmental", " variable QT_GRAPHICSSYSTEM. The options are \"native\", \"raster\", or", " \"opengl\" in order of increasing rendering speed. For earlier versions", " of Qt the terminal defaults to \"raster\".", "", " To obtain the best output possible, the rendering involves three", " mechanisms : antialiasing, oversampling and hinting.", " Oversampling combined with antialiasing provides subpixel accuracy,", " so that gnuplot can draw a line from non-integer coordinates. This avoids", " wobbling effects on diagonal lines ('plot x' for example).", " Hinting avoids the blur on horizontal and vertical lines caused by", " oversampling. The terminal will snap these lines to integer coordinates so", " that a one-pixel-wide line will actually be drawn on one and only one pixel.", "", " By default, the window is raised to the top of your desktop when a plot is", " drawn. This can be controlled with the keyword \"raise\".", " The keyword \"persist\" will prevent gnuplot from exiting before you", " explicitely close all the plot windows.", " Finally, by default the key raises the gnuplot console window, and", " 'q' closes the plot window. The keyword \"ctrl\" allows you to replace those", " bindings by + and +'q', respectively.", "", " The gnuplot outboard driver, gnuplot_qt, is searched in a default place", " chosen when the program is compiled. You can override that by defining", " the environment variable GNUPLOT_DRIVER_DIR to point to a different", " location." END_HELP(qt) #endif /* TERM_HELP */ gnuplot-4.6.4/term/tgif.trm0000644000471100001440000016327711640454652012604 0ustar /* Hello, Emacs, this is -*-C-*- */ /* $Id: tgif.trm,v 1.50 2011/09/27 23:18:02 sfeam Exp $ */ /* GNUPLOT - tgif.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* */ /* This file is included by ../term.c. */ /* */ /* This terminal driver supports: */ /* TGIF */ /* */ /* AUTHORS: */ /* Werner Geppert and Andreas Kuhlewind */ /* March, 21st 1995 */ /* */ /* send your comments or suggestions to werner@mez.ruhr-uni-bochum.de */ /* */ /* */ /* MODIFIED May, 11st 1997 by NOVK Levente (novakl@tigris.klte.hu): */ /* */ /* - Modified the default linewidth for borders from 3 to 2 */ /* - Modified the default size of markers' bounding box */ /* to allow nicer shapes */ /* - Slightly modified the markers and added several new ones, */ /* now we have 64 different pointtypes, the same as for the */ /* PostScript terminal */ /* - I left the %.1f format for pixel positions, but I think */ /* Tgif does only calculate with integer positions */ /* */ /* Modified 07 July 2000 by Ian MacPhedran */ /* - added PM3D support */ /* */ /* Modified 04 February 2002 by Levente Novk */ /* - break long "polygon()" directives into lines, as it made */ /* Tgif fail polygons had >8 sides */ /* (e.g. when using "filledcurves") */ /* */ /* Modified 29 November 2004 Shigeharu TAKENO */ /* - add linewidth and monochrome options */ /* update option parsing to be order-independent */ /* */ /***************************************************************************/ /*}}} */ /***************************************************************************/ #include "driver.h" #ifdef TERM_REGISTER register_term(tgif) #endif #ifdef TERM_PROTO TERM_PUBLIC void TGIF_options __PROTO((void)); TERM_PUBLIC void TGIF_init __PROTO((void)); TERM_PUBLIC void TGIF_reset __PROTO((void)); TERM_PUBLIC void TGIF_text __PROTO((void)); TERM_PUBLIC void TGIF_graphics __PROTO((void)); TERM_PUBLIC void TGIF_move __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void TGIF_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void TGIF_linetype __PROTO((int linetype)); TERM_PUBLIC void TGIF_put_text __PROTO((unsigned int ux, unsigned int uy, const char *str)); /* ref point and text */ TERM_PUBLIC int TGIF_text_angle __PROTO((int ang)); TERM_PUBLIC int TGIF_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void TGIF_point __PROTO((unsigned int ux, unsigned int uy, int number)); TERM_PUBLIC void TGIF_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); TERM_PUBLIC int TGIF_set_font __PROTO((const char *font)); TERM_PUBLIC void TGIF_set_pointsize __PROTO((double size)); TERM_PUBLIC void TGIF_set_linewidth __PROTO((double size)); TERM_PUBLIC int TGIF_make_palette (t_sm_palette *); TERM_PUBLIC void TGIF_previous_palette (void); TERM_PUBLIC void TGIF_set_color (t_colorspec *); TERM_PUBLIC void TGIF_fillbox(int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height); TERM_PUBLIC void TGIF_FillSolid(char *curcolor,int fillpar); TERM_PUBLIC void TGIF_filled_polygon (int, gpiPoint *); /*}}} */ /* default length for static strings */ #define TGIF_STRLEN_MAX 255 /* standard x/y plot size in portrait mode */ #define TGIF_XMAX 950 #define TGIF_YMAX 634 /* total available plotting area */ #define TGIF_XTOT 950 #define TGIF_YTOT 1400 /* Offset */ #define TGIF_XOFF 50 #define TGIF_YOFF 50 #define TGIF_XSHIFT 1030 /* 80 points skip */ #define TGIF_YSHIFT 714 #define TGIF_VCHAR 18 /* default is 18 pt */ #define TGIF_HCHAR (18*6/10) #define TGIF_VTIC (TGIF_YMAX/80) #define TGIF_HTIC (TGIF_YMAX/80) #define TGIF_MAXPOLY 100 /*}}} */ #define GOT_TGIF_PROTO #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY /* tgif driver by Werner Geppert, werner@mez.ruhr-uni-bochum.de */ /***************************************************************************/ /* Variables: */ static unsigned int uLastTgifX, uLastTgifY; /* last Coordinate */ static unsigned int uActNr; /* current elementnumber */ static unsigned int uActPage; /* current pagenumber */ static unsigned int uActResolution=100; /* resolution in percent */ static unsigned int uActZoom; /* zoom factor */ static unsigned int uActAngle; /* current textangle */ static unsigned int uActThick; /* actual linethickness */ static unsigned int uActPointSize; /* point size */ static unsigned int uActStyle; /* actual linestyle */ static unsigned int uActJust; /* actual textjustification */ static unsigned int uXshift; /* actual shift x */ static unsigned int uYshift; /* actual shift y */ static unsigned int uTgifPlotCount; /* counts number of plots */ static unsigned int uTgifPlotRow=1, uTgifPlotCol=1; /* actual plot row and col */ static unsigned int uTgif_win_horiz=1, /* number of plots in x and */ uTgif_win_verti=1; /* y direction [x,y] */ static double dActThick_factor=1.0; /* linewidth factor */ static double dActThick_default=1.0; /* default linewidth factor */ static TBOOLEAN TgifUseColor = TRUE; static char sActColor[TGIF_STRLEN_MAX]; /* current color */ static unsigned int uDefaultFontSize = 18; /* default font size */ static unsigned int uActFontSize = 18; /* current font size */ static char sDefaultFont[TGIF_STRLEN_MAX] = "Helvetica"; /* default font */ static char sActFont[TGIF_STRLEN_MAX] = "Helvetica"; /* current font */ /* static char sActPointString[TGIF_STRLEN_MAX]; HBB: unused */ static TBOOLEAN TgifSolid = FALSE; static TBOOLEAN TgifPortrait = TRUE; static unsigned int uTgifPlotsPerPage = 1; /* * 10 different pointtypes need 10 different linetypes */ /* NL: Modified first value to 2 from 3 */ static unsigned int uLineThick[] = { 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; static unsigned int uLineStyle[] = { 0, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0 }; static const char *psColors[] = { "black", "black", /* border and x/y-zero-axes */ "red", "green", "blue", "magenta", "cyan", "yellow", "DarkSeaGreen", "HotPink", "black", "coral" }; /* for color density */ static const rgb255_color psColorcomp[] = { {0,0,0}, {0,0,0}, {255,0,0}, {0,255,0}, {0,0,255}, {255,0,255}, {0,255,255}, {255,255,0}, {143,188,143}, {255,105,180}, {0,0,0}, {255,127,80} }; static rgb255_color rgbActColor; static unsigned int uFillPattern[] = { 2, 3, 5, 1, 20, 26, 21, 27, 14, 15 }; #define TGIF_fillpatterns 10 static int iTgifPolyCount; static unsigned int uBuffX[TGIF_MAXPOLY], uBuffY[TGIF_MAXPOLY]; enum eState { NEWPOLY = 100, INPOLY }; static enum eState eTgifState = NEWPOLY; static void TGIF_flush_poly __PROTO((void)); /*}}} */ /***************************************************************************/ static void TGIF_flush_poly() { int i; if (eTgifState == INPOLY) { fprintf(gpoutfile, "poly('%s',%d,[\n\t", sActColor, iTgifPolyCount); for (i = 0; i < iTgifPolyCount - 1; i++) { fprintf(gpoutfile, "%u,%u,", uBuffX[i], uBuffY[i]); if ((i + 1) % 8 == 0) fputs("\n\t", gpoutfile); } fprintf(gpoutfile, "%u,%u],0,%u,1,%u,0,0,%u,0,8,3,0,[\n]).\n", uBuffX[iTgifPolyCount - 1], uBuffY[iTgifPolyCount - 1], uActThick, uActNr, uActStyle); uActNr++; eTgifState = NEWPOLY; iTgifPolyCount = 0; if (gpoutfile != (FILE *) NULL) fflush(gpoutfile); } } /* TGIF_flush_poly */ /*}}} */ /***************************************************************************/ enum TGIF_id { TGIF_MONOCHROME, TGIF_COLOR, TGIF_LINEWIDTH, TGIF_PORTRAIT, TGIF_LANDSCAPE, TGIF_GRAPHS, TGIF_SOLID, TGIF_DASHED, TGIF_FONT, TGIF_OTHER, TGIF_DEFAULT }; static struct gen_table TGIF_opts[] = { {"mo$nochrome", TGIF_MONOCHROME}, {"c$olor", TGIF_COLOR}, {"c$olour", TGIF_COLOR}, {"linew$idth", TGIF_LINEWIDTH}, {"lw", TGIF_LINEWIDTH}, {"p$ortrait", TGIF_PORTRAIT}, {"l$andscape", TGIF_LANDSCAPE}, {"[", TGIF_GRAPHS}, {"s$olid", TGIF_SOLID}, {"d$ashed", TGIF_DASHED}, {"font", TGIF_FONT}, {"default", TGIF_DEFAULT}, {NULL, TGIF_OTHER} }; TERM_PUBLIC void TGIF_options() { struct value a, b; double dscaleH, dscaleV; int option; while (!END_OF_COMMAND) { option = lookup_table(&TGIF_opts[0],c_token); switch(option) { case TGIF_DEFAULT: strcpy(sActFont, "Helvetica"); strcpy(sDefaultFont, "Helvetica"); uActFontSize = 18; uDefaultFontSize = 18; term->v_char = (unsigned int) (uActFontSize); term->h_char = (unsigned int) (uActFontSize * 6 / 10); TgifPortrait = TRUE; TgifUseColor = TRUE; term->flags &= ~TERM_MONOCHROME; TgifSolid = FALSE; uTgifPlotsPerPage = 1; uTgifPlotRow = 1; uTgifPlotCol = 1; uTgif_win_horiz = 1; uTgif_win_verti = 1; uActResolution = 100; dActThick_factor = 1.0; dActThick_default = 1.0; c_token++; break; case TGIF_MONOCHROME: TgifUseColor = FALSE; term->flags |= TERM_MONOCHROME; c_token++; break; case TGIF_COLOR: TgifUseColor = TRUE; term->flags &= ~TERM_MONOCHROME; c_token++; break; case TGIF_LINEWIDTH: c_token++; if (END_OF_COMMAND) { int_error(c_token, "linewidth: width is not specified."); } else { if((dActThick_default = real(const_express(&a)))<=0.0){ int_error(c_token-1,"linewidth: out of range"); dActThick_default = 1.0; } } break; case TGIF_PORTRAIT: TgifPortrait = TRUE; c_token++; break; case TGIF_LANDSCAPE: TgifPortrait = FALSE; /* uActResolution = 140; */ c_token++; break; case TGIF_GRAPHS: c_token++; if (END_OF_COMMAND) { int_error(c_token, "no. windows: [horizontal,vertical] expected"); } else if (!equals(c_token, ",")) { uTgif_win_horiz = (int) real(const_express(&a)); } if (!equals(c_token, ",")) int_error(c_token, "',' expected"); c_token++; if (!equals(c_token, "]")) { uTgif_win_verti = (int) real(const_express(&a)); } if (!equals(c_token, "]")) int_error(c_token, "expecting ']'"); c_token++; uTgifPlotsPerPage = uTgif_win_verti * uTgif_win_horiz; break; case TGIF_SOLID: TgifSolid = TRUE; c_token++; break; case TGIF_DASHED: TgifSolid = FALSE; c_token++; break; case TGIF_FONT: c_token++; /* Fall through */ case TGIF_OTHER: default: { char *s; if ((s = try_to_get_string())) { double fontsize; int sep = strcspn(s,","); if (s[sep] == ',' && (1 == sscanf(&s[sep+1],"%lf",&fontsize))) uActFontSize = (int)(fontsize+0.5); if (sep > 0) { strncpy(sActFont, s, sizeof(sActFont)); sActFont[sep] = NUL; } strcpy(sDefaultFont, sActFont); free(s); } else if (option == TGIF_FONT) { int_error(c_token,"Expecting font name "); } else { /* We have font size specified */ uActFontSize = (unsigned int) real(const_express(&b)); uDefaultFontSize = uActFontSize; term->v_char = (unsigned int) (uActFontSize); term->h_char = (unsigned int) (uActFontSize * 6 / 10); } break; } } } if (TgifPortrait) { dscaleH = (double) 100.0 *(TGIF_XTOT) / (xsize * (TGIF_XMAX + (uTgif_win_horiz - 1) * TGIF_XSHIFT)); dscaleV = (double) 100.0 *(TGIF_YTOT) / (ysize * (TGIF_YMAX + (uTgif_win_verti - 1) * TGIF_YSHIFT)); uActResolution = (int) GPMIN(dscaleH, dscaleV); switch (uTgif_win_verti) { case 1: uActZoom = 0; break; case 2: uActZoom = 1; break; default: uActZoom = 2; break; } } else { dscaleH = (double) 100.0 *(TGIF_YTOT) / (xsize * (TGIF_XMAX + (uTgif_win_horiz - 1) * TGIF_XSHIFT)); dscaleV = (double) 100.0 *(TGIF_XTOT) / (ysize * (TGIF_YMAX + (uTgif_win_verti - 1) * TGIF_YSHIFT)); uActResolution = (unsigned int) GPMIN(dscaleH, dscaleV); switch (uTgif_win_verti) { case 1: uActZoom = 0; break; case 2: uActZoom = 1; break; default: uActZoom = 2; break; } } sprintf(&(term_options[strlen(term_options)]), "%s [%u,%u]", TgifPortrait ? "portrait" : "landscape", uTgif_win_horiz, uTgif_win_verti); strcat(term_options, TgifUseColor ? " color" : " monochrome"); sprintf(&(term_options[strlen(term_options)]), " linewidth %f", dActThick_default); sprintf(&(term_options[strlen(term_options)]), " %s font \"%s,%u\"", TgifSolid ? "solid" : "dashed", sActFont, uActFontSize); } /*}}} */ /***************************************************************************/ TERM_PUBLIC void TGIF_init() { if (multiplot) { /* uActResolution= TgifPortrait ? (unsigned int)100 : (unsigned int)145 ; */ uActResolution = (unsigned int) 100; if (uTgifPlotsPerPage > 1) { fputs("warning: using standard multiplot\n", stderr); uTgifPlotsPerPage = 1; } uActZoom = 1; } fprintf(gpoutfile, "\ %%TGIF 2.15-p7\n\ state(%d,30,%u,0,0,%u,16,1,9,1,1,0,0,0,0,1,0,'%s',0,%u,0,0,1,10,0,0,1,1,0,16,0,0,1,1,1).\n\ %%\n\ %% @(#)Creator: gnuplot %s patchlevel %s\n\ %% %%W%%\n\ %%\n\ page(1,\"\").\n", TgifPortrait ? 0 : 1, uActResolution, uActZoom, sActFont, uActFontSize, gnuplot_version, gnuplot_patchlevel); eTgifState = NEWPOLY; iTgifPolyCount = 0; uTgifPlotCount = 0; uActPage = 1; } /* TGIF_init */ /*}}} */ /***************************************************************************/ TERM_PUBLIC void TGIF_graphics() { TGIF_flush_poly(); if (multiplot) { term->xmax = (TgifPortrait) ? TGIF_XTOT : TGIF_YTOT; term->ymax = (TgifPortrait) ? TGIF_YTOT : TGIF_XTOT; uLastTgifX = (TgifPortrait) ? TGIF_XOFF : TGIF_YOFF; uLastTgifY = (TgifPortrait) ? TGIF_YTOT + TGIF_YOFF : TGIF_XTOT + TGIF_XOFF; uYshift = uLastTgifY; uXshift = uLastTgifX; } else { if (uTgifPlotCount < uTgifPlotsPerPage) uTgifPlotCount++; else { fputs("error: number of plots > plots per page\n", stderr); return; } uXshift = (unsigned int) TGIF_XOFF *100 / uActResolution + (xsize * (uTgifPlotCol - 1) * TGIF_XSHIFT); uYshift = (unsigned int) TGIF_YOFF *100 / uActResolution + (ysize * (TGIF_YMAX + (uTgifPlotRow - 1) * TGIF_YSHIFT)); if (uTgifPlotCount % uTgif_win_horiz == 0) { uTgifPlotCol = 1; uTgifPlotRow++; } else { uTgifPlotCol++; } uLastTgifX = uXshift; uLastTgifY = uYshift; } /* default settings for each plot */ iTgifPolyCount = 0; uActNr = 0; uActAngle = 0; uActThick = 1; uActStyle = 0; uActJust = LEFT; strcpy(sActColor,psColors[0]); /* black */ rgbActColor = psColorcomp[0]; } /* TGIF_graphics */ /*}}} */ /***************************************************************************/ TERM_PUBLIC void TGIF_text() { TGIF_flush_poly(); } /* TGIF_text */ /*}}} */ /***************************************************************************/ TERM_PUBLIC void TGIF_reset() { TGIF_flush_poly(); iTgifPolyCount = 0; uTgifPlotCount = 0; uTgifPlotRow = 1; uTgifPlotCol = 1; if (gpoutfile != (FILE *) NULL) fflush(gpoutfile); } /* TGIF_reset */ /*}}} */ /***************************************************************************/ TERM_PUBLIC void TGIF_linetype(int linetype) { unsigned int ult; TGIF_flush_poly(); if (linetype >= 0) ult = 2 + linetype % 10; else if (linetype < -2) ult = 0; else ult = linetype + 2; if (TgifUseColor == FALSE) { strcpy(sActColor,"black"); rgbActColor = psColorcomp[0]; } else{ strcpy(sActColor, psColors[ult]); rgbActColor = psColorcomp[ult]; } uActThick = dActThick_factor * dActThick_default * uLineThick[ult]+0.5; if (!TgifSolid) uActStyle = uLineStyle[ult]; else { if (ult == 1) /* grid */ uActStyle = uLineStyle[ult]; else uActStyle = uLineStyle[2]; } } /* TGIF_linetype */ /*}}} */ /***************************************************************************/ TERM_PUBLIC void TGIF_move(unsigned int ux, unsigned int uy) { uLastTgifX = ux + uXshift; uLastTgifY = uYshift - uy; if (eTgifState == INPOLY) TGIF_flush_poly(); } /* TGIF_move */ /*}}} */ /***************************************************************************/ TERM_PUBLIC void TGIF_vector(unsigned int ux, unsigned int uy) { ux = ux + uXshift; uy = uYshift - uy; if (eTgifState == NEWPOLY) { uBuffX[0] = uLastTgifX; uBuffY[0] = uLastTgifY; iTgifPolyCount = 1; eTgifState = INPOLY; } uBuffX[iTgifPolyCount] = ux; uBuffY[iTgifPolyCount] = uy; uLastTgifX = ux; uLastTgifY = uy; iTgifPolyCount++; eTgifState = INPOLY; if (iTgifPolyCount == TGIF_MAXPOLY) { TGIF_flush_poly(); } } /* TGIF_vector */ /*}}} */ /***************************************************************************/ TERM_PUBLIC void TGIF_arrow( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { TGIF_flush_poly(); sx = sx + uXshift; ex = ex + uXshift; sy = uYshift - sy; ey = uYshift - ey; if (head) { fprintf(gpoutfile, "\ poly('%s',%d,[\n\ \t%u,%u,%u,%u],1,%u,1,%u,0,0,%u,0,8,3,0,[\n]).\n", sActColor, 2, sx, sy, ex, ey, uActThick, uActNr, uActStyle); } else { fprintf(gpoutfile, "\ poly('%s',%d,[\n\ \t%u,%u,%u,%u],1,%u,1,%u,0,0,%u,0,8,3,0,[\n]).\n", sActColor, 2, sx, sy, ex, ey, uActThick, uActNr, uActStyle); } uActNr++; uLastTgifX = ex; uLastTgifY = ey; } /* TGIF_arrow */ /*}}} */ /***************************************************************************/ TERM_PUBLIC void TGIF_put_text(unsigned int ux, unsigned int uy, const char *str) { unsigned int x, y; struct termentry *t = term; TGIF_flush_poly(); x = ux + uXshift; y = uYshift - uy - t->v_char / 2; if (strlen(str) == 0) return; fprintf(gpoutfile, "\ text('%s',%u,%u,'%s',0,%u,1,%u,%u,1,55,119,%u,0,15,4,0,0,0,0,[\n\t\"%s\"]).\n", sActColor, x, y, sActFont, uActFontSize, (uActAngle ? CENTRE : uActJust), uActAngle, uActNr, str); uActNr += 2; } /* TGIF_put_text */ /*}}} */ /***************************************************************************/ TERM_PUBLIC int TGIF_text_angle(int ang) { switch (ang) { case -270: case 90: uActAngle = 3; break; case 180: case -180: uActAngle = 2; break; case -90: case 270: uActAngle = 1; break; default: uActAngle = 0; break; } return (TRUE); } /* TGIF_text_angle */ /*}}} */ /***************************************************************************/ TERM_PUBLIC int TGIF_justify_text(enum JUSTIFY mode) { uActJust = mode; return (TRUE); } /* TGIF_justify_text */ /*}}} */ /***************************************************************************/ TERM_PUBLIC void TGIF_point(unsigned int ux, unsigned int uy, int number) { double p; /* all pointtypes fit in a (x +/-p)x(y +/-p) box */ double x, y; x = (double) (ux + uXshift); y = (double) (uYshift - uy); p = pointsize * 8.0; /* NL: Increased the bounding box (p value) from 4.0 to 8.0 */ if (p == (double) 0.0) p = 0.1; TGIF_flush_poly(); if (number != -1) number = number % 63; switch (number) { case -1: /* HBB: corrected format string, shuts up gcc -Wall */ fprintf(gpoutfile, "\ poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,1,1,%u,0,0,0,0,8,3,0,[\n]).\n", sActColor, x, y, x + 1, y + 1, uActNr++); break; case 0: /* plus */ /* taking thickness 2 for cross & plus & star */ fprintf(gpoutfile, "\ group([\n\ poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]),\n\ poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n])\n", sActColor, x, y - p - 1, x, y + p + 1, uActNr+1, sActColor, x - p - 1, y, x + p + 1, y, uActNr+2); uActNr += 4; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 1: /* cross */ /* taking thickness 2 for cross & plus & star */ fprintf(gpoutfile, "\ group([\n\ poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]).\n\ poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr+1, sActColor, x - p, y + p, x + p, y - p, uActNr+2); uActNr += 4; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 2: /* star */ /* taking thickness 2 for cross & plus & star */ fputs("group([\n", gpoutfile); fprintf(gpoutfile, "\ poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]),\n", sActColor, x, y - p - 1, x, y + p + 1, uActNr++); fprintf(gpoutfile, "\ poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n])\n", sActColor, x - p - 1, y, x + p + 1, y, uActNr++); fprintf(gpoutfile, "\ poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "\ poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]).\n", sActColor, x - p, y + p, x + p, y - p, uActNr++); uActNr += 4; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 3: /* box */ fprintf(gpoutfile, "\ box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr); uActNr++; break; /*}}} */ case 4: /* filled box */ fprintf(gpoutfile, "\ box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr); uActNr++; break; /*}}} */ case 5: /* circle */ fprintf(gpoutfile, "\ oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr); uActNr++; break; /*}}} */ case 6: /* filled circle */ fprintf(gpoutfile, "\ oval('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr); uActNr++; break; /*}}} */ case 7: /* triangle up */ fprintf(gpoutfile, "\ polygon('%s',4,[\n\ %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y - p, x + p, y + 0.75 * p, x - p, y + 0.75 * p, x, y - p, uActNr); uActNr++; break; /*}}} */ case 8: /* filled triangle up */ fprintf(gpoutfile, "\ polygon('%s',4,[\n\ %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y - p, x + p, y + 0.75 * p, x - p, y + 0.75 * p, x, y - p, uActNr); uActNr++; break; /*}}} */ case 9: /* triangle down */ fprintf(gpoutfile, "\ polygon('%s',4,[\n\ %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x - p, y - 0.75 * p, x + p, y - 0.75 * p, x, y + p, uActNr); uActNr++; break; /*}}} */ case 10: /* filled triangle down */ fprintf(gpoutfile, "\ polygon('%s',4,[\n\ %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x - p, y - 0.75 * p, x + p, y - 0.75 * p, x, y + p, uActNr); uActNr++; break; /*}}} */ case 11: /* diamond */ fprintf(gpoutfile, "\ polygon('%s',5,[\n\ %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n\ ]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); uActNr++; break; /*}}} */ case 12: /* filled diamond */ fprintf(gpoutfile, "\ polygon('%s',5,[\n\ %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n\ ]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); uActNr++; break; /*}}} */ case 13: /* pentagon */ fprintf(gpoutfile, "\ polygon('%s',6,[\n\ %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y - p, x + p, y - p / 4, x + 0.625 * p, y + p, x - 0.625 * p, y + p, x - p, y - p / 4, x, y - p, uActNr); uActNr++; break; /*}}} */ case 14: /* filled pentagon */ fprintf(gpoutfile, "\ polygon('%s',6,[\n\ %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y - p, x + p, y - p / 4, x + 0.625 * p, y + p, x - 0.625 * p, y + p, x - p, y - p / 4, x, y - p, uActNr); uActNr++; break; /*}}} */ case 15: /* circle1 */ fputs("group([\n", gpoutfile); fprintf(gpoutfile, "\ oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n\ ]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "\ arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,4480,2560,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x + p * 0.342, y - p * 0.94, x - p * 0.342, y - p * 0.94, 2 * p, 2 * p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 16: /* circle2 */ fputs("group([\n", gpoutfile); fprintf(gpoutfile, "\ oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "\ arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,0,5760,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x + p, y, x, y - p, 2 * p, 2 * p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 17: /* circle3 */ fputs("group([\n", gpoutfile); fprintf(gpoutfile, "\ oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "\ arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,5760,5760,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x, y - p, x - p, y, 2 * p, 2 * p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 18: /* circle4 */ fputs("group([\n", gpoutfile); fprintf(gpoutfile, "\ oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "\ arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,0,11520,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x + p, y, x - p, y, 2 * p, 2 * p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 19: /* circle5 */ fputs("group([\n", gpoutfile); fprintf(gpoutfile, "\ oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "\ arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,11520,5760,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x - p, y, x, y + p, 2 * p, 2 * p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 20: /* circle6 */ fputs("group([\n", gpoutfile); fprintf(gpoutfile, "\ oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "\ arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,0,5760,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x + p, y, x, y - p, 2 * p, 2 * p, uActNr++); fprintf(gpoutfile, "\ arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,11520,5760,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x - p, y, x, y + p, 2 * p, 2 * p, uActNr++); uActNr += 3; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 21: /* circle7 */ fputs("group([\n", gpoutfile); fprintf(gpoutfile, "\ oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "\ arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,5760,11520,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x, y - p, x, y + p, 2 * p, 2 * p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 22: /* circle8 */ fputs("group([\n", gpoutfile); fprintf(gpoutfile, "\ oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "\ arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,0,17280,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x + p, y, x, y + p, 2 * p, 2 * p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 23: /* circle9 */ fputs("group([\n", gpoutfile); fprintf(gpoutfile, "\ oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "\ arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,17280,5760,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x, y + p, x + p, y, 2 * p, 2 * p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 24: /* circle10 */ fputs("group([\n", gpoutfile); fprintf(gpoutfile, "\ oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "\ arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,17280,11520,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x, y + p, x, y - p, 2 * p, 2 * p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 25: /* circle11 */ fputs("group([\n", gpoutfile); fprintf(gpoutfile, "\ oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "\ arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,5760,5760,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x, y - p, x - p, y, 2 * p, 2 * p, uActNr++); fprintf(gpoutfile, "\ arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,17280,5760,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x, y + p, x + p, y, 2 * p, 2 * p, uActNr++); uActNr += 3; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 26: /* circle12 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,17280,17280,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x, y + p, x - p, y, 2 * p, 2 * p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 27: /* circle13 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,11520,11520,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x - p, y, x + p, y, 2 * p, 2 * p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 28: /* circle14 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,11520,17280,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x - p, y, x, y - p, 2 * p, 2 * p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 29: /* circle15 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,5760,17280,%u,0,0,8,3,0,[\n]).\n", sActColor, x - p, y - p, x, y, x, y - p, x + p, y, 2 * p, 2 * p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 30: /* circle16 */ fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr); uActNr++; break; /*}}} */ case 31: /* box1 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p / 4, y - p, x + p / 4, y, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 32: /* box2 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x, y - p, x + p, y, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 33: /* box3 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x, y, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 34: /* box4 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 35: /* box5 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y, x, y + p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 36: /* box6 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x, y - p, x + p, y, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y, x, y + p, uActNr++); uActNr += 3; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 37: /* box7 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x, y + p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 38: /* box8 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y, x, y + p, uActNr++); uActNr += 3; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 39: /* box9 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x, y, x + p, y + p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 40: /* box10 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x, y - p, x + p, y + p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 41: /* box11 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x, y, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x, y, x + p, y + p, uActNr++); uActNr += 3; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 42: /* box12 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x, y, x + p, y + p, uActNr++); uActNr += 3; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 43: /* box13 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y, x + p, y + p, uActNr++); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 44: /* box14 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x, y - p, x + p, y, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y, x + p, y + p, uActNr++); uActNr += 3; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 45: /* box15 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x, y, uActNr++); fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y, x + p, y + p, uActNr++); uActNr += 3; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 46: /* box16 */ fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", sActColor, x - p, y - p, x + p, y + p, uActNr); uActNr++; break; /*}}} */ case 47: /* diamond1 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - 0.625 * p, y - 0.375 * p, x - 0.375 * p, y - 0.625 * p, x + p / 8, y - p / 8, x - p / 8, y + p / 8, x - 0.625 * p, y - 0.375 * p, uActNr); fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); uActNr += 2; break; /*}}} */ case 48: /* diamond2 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p / 2, y - p / 2, x, y - p, x + p / 2, y - p / 2, x, y, x - p / 2, y - p / 2, uActNr); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 49: /* diamond3 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p, y, x - p / 2, y - p / 2, x, y, x - p / 2, y + p / 2, x - p, y, uActNr); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 50: /* diamond4 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p, y, x, y - p, x + p / 2, y - p / 2, x - p / 2, y + p / 2, x - p, y, uActNr); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 51: /* diamond5 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p / 2, y + p / 2, x, y, x + p / 2, y + p / 2, x, y + p, x - p / 2, y + p / 2, uActNr); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 52: /* diamond6 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p / 2, y - p / 2, x, y - p, x + p / 2, y - p / 2, x, y, x - p / 2, y - p / 2, uActNr); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p / 2, y + p / 2, x, y, x + p / 2, y + p / 2, x, y + p, x - p / 2, y + p / 2, uActNr); uActNr += 3; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 53: /* diamond7 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p, y, x - p / 2, y - p / 2, x + p / 2, y + p / 2, x, y + p, x - p, y, uActNr); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 54: /* diamond8 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',7,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p, y, x, y - p, x + p / 2, y - p / 2, x, y, x + p / 2, y + p / 2, x, y + p, x - p, y, uActNr); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 55: /* diamond9 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y, x + p / 2, y - p / 2, x + p, y, x + p / 2, y + p / 2, x, y, uActNr); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 56: /* diamond10 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p / 2, y - p / 2, x, y - p, x + p, y, x + p / 2, y + p / 2, x - p / 2, y - p / 2, uActNr); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 57: /* diamond11 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p, y, x - p / 2, y - p / 2, x, y, x - p / 2, y + p / 2, x - p, y, uActNr); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y, x + p / 2, y - p / 2, x + p, y, x + p / 2, y + p / 2, x, y, uActNr); uActNr += 3; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 58: /* diamond12 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',7,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p, y, x, y - p, x + p, y, x + p / 2, y + p / 2, x, y, x - p / 2, y + p / 2, x - p, y, uActNr); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 59: /* diamond13 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p / 2, y + p / 2, x + p / 2, y - p / 2, x + p, y, x, y + p, x - p / 2, y + p / 2, uActNr); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 60: /* diamond14 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',7,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p / 2, y - p / 2, x, y - p, x + p, y, x, y + p, x - p / 2, y + p / 2, x, y, x - p / 2, y - p / 2, uActNr); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 61: /* diamond15 */ fprintf(gpoutfile, "group([\n"); fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); fprintf(gpoutfile, "polygon('%s',7,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x - p, y, x - p / 2, y - p / 2, x, y, x + p / 2, y - p / 2, x + p, y, x, y + p, x - p, y, uActNr); uActNr += 2; fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); break; /*}}} */ case 62: /* diamond16 */ fprintf(gpoutfile, "polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); uActNr++; break; /*}}} */ } /* switch */ } /* TGIF_point */ /*}}} */ /***************************************************************************/ TERM_PUBLIC void TGIF_set_pointsize(double size) { uActPointSize = size < 0. ? 1. : size; } TERM_PUBLIC void TGIF_set_linewidth(double size) { dActThick_factor = size < 0. ? 1. : size; } /*}}} */ /***************************************************************************/ TERM_PUBLIC int TGIF_set_font(const char *font) { int sep; if (!font || !(*font)) font = sDefaultFont; sep = strcspn(font, ","); if (sep > 0) { strncpy(sActFont, font, sep); sActFont[sep] = NUL; } sscanf(&(font[sep + 1]), "%d", &uActFontSize); return TRUE; } TERM_PUBLIC int TGIF_make_palette(t_sm_palette *palette) { return 0; /* can do continuous colors */ } TERM_PUBLIC void TGIF_previous_palette(void) { /* do nothing */ } TERM_PUBLIC void TGIF_set_color(t_colorspec *colorspec) { if (colorspec->type == TC_LT) { TGIF_linetype(colorspec->lt); } else if (colorspec->type == TC_FRAC) { rgb255maxcolors_from_gray(colorspec->value, &rgbActColor); sprintf(sActColor, "#%.2x%.2x%.2x", rgbActColor.r, rgbActColor.g, rgbActColor.b); } else if (colorspec->type == TC_RGB) { rgbActColor.r = colorspec->lt >> 16 & 0xff; rgbActColor.g = colorspec->lt >> 8 & 0xff; rgbActColor.b = colorspec->lt & 0xff; sprintf(sActColor, "#%.2x%.2x%.2x", rgbActColor.r, rgbActColor.g, rgbActColor.b); } } TERM_PUBLIC void TGIF_fillbox(int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height) { gpiPoint corner[4]; corner[0].x = x1; corner[0].y = y1; corner[1].x = x1+width; corner[1].y = y1; corner[2].x = x1+width; corner[2].y = y1+height; corner[3].x = x1; corner[3].y = y1+height; corner->style = style; TGIF_filled_polygon(4, corner); } TERM_PUBLIC void TGIF_FillSolid(char *curcolor,int fillpar) { int red, green, blue; double fact = (double)(100 - fillpar) * 0.01; if (fact < 0.0) fact = 0.0; else if (fact > 1.0) fact = 1.0; red = rgbActColor.r + (0xff - rgbActColor.r) * fact; green = rgbActColor.g + (0xff - rgbActColor.g) * fact; blue = rgbActColor.b + (0xff - rgbActColor.b) * fact; sprintf(curcolor,"#%.2x%.2x%.2x", red, green, blue); } TERM_PUBLIC void TGIF_filled_polygon(int points, gpiPoint *corners) { int i,pattern; int fillpar = corners->style >> 4; int style = corners->style & 0xf; char curcolor[TGIF_STRLEN_MAX]; if (eTgifState == INPOLY) TGIF_flush_poly(); /* Clean up current data */ switch (style) { case FS_EMPTY: pattern=uFillPattern[0]; strcpy(curcolor,"white"); break; case FS_TRANSPARENT_PATTERN: case FS_PATTERN: pattern=uFillPattern[fillpar % TGIF_fillpatterns]; strcpy(curcolor,sActColor); break; case FS_TRANSPARENT_SOLID: case FS_SOLID: pattern=1; TGIF_FillSolid(curcolor,fillpar); break; default: pattern=1; strcpy(curcolor,sActColor); } fprintf(gpoutfile, "polygon('%s',%d,[\n\t",curcolor,points+1); /* loop through points, do the first one last as well as first */ fprintf(gpoutfile,"%u,%u,", corners[0].x+uXshift, uYshift-corners[0].y); for (i = 1; i < points; i++) { fprintf(gpoutfile, "%u,%u,", corners[i].x+uXshift, uYshift-corners[i].y); /* LN: Break long lines as Tgif is rather picky about them */ if ((i + 1) % 8 == 0) fputs("\n\t", gpoutfile); } fprintf(gpoutfile, "%u,%u", corners[0].x+uXshift, uYshift-corners[0].y); fprintf(gpoutfile, "],%d,1,0,0,%u,0,0,0,0,[\n]).\n", pattern, uActNr); uActNr++; } /*}}} */ /***************************************************************************/ #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(tgif_driver) "tgif", "TGIF X11 [mode] [x,y] [dashed] [\042font\042 [fontsize]]", TGIF_XMAX, TGIF_YMAX, TGIF_VCHAR, TGIF_HCHAR, TGIF_VTIC, TGIF_HTIC, TGIF_options, TGIF_init, TGIF_reset, TGIF_text, null_scale, TGIF_graphics, TGIF_move, TGIF_vector, TGIF_linetype, TGIF_put_text, TGIF_text_angle, TGIF_justify_text, TGIF_point, TGIF_arrow, TGIF_set_font, TGIF_set_pointsize, TERM_CAN_MULTIPLOT|TERM_CAN_DASH|TERM_LINEWIDTH, 0, 0, TGIF_fillbox, TGIF_set_linewidth #ifdef USE_MOUSE ,0, 0, 0, 0, 0 /* no mouse support for the tgif terminal */ #endif , TGIF_make_palette, TGIF_previous_palette, TGIF_set_color, TGIF_filled_polygon TERM_TABLE_END(tgif_driver) #undef LAST_TERM #define LAST_TERM tgif_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(tgif) "1 tgif", "?commands set terminal tgif", "?set terminal tgif", "?set term tgif", "?terminal tgif", "?term tgif", "?tgif", " Tgif is an X11-based drawing tool---it has nothing to do with GIF.", "", " The `tgif` driver supports different pointsizes (with `set pointsize`),", " different label fonts and font sizes (e.g. `set label \"Hallo\" at x,y font", " \"Helvetica,34\"`) and multiple graphs on the page. The proportions of the", " axes are not changed.", "", " Syntax:", " set terminal tgif {portrait | landscape | default} {<[x,y]>}", " {monochrome | color}", " {{linewidth | lw} }", " {solid | dashed}", " {font \"{,}\"}", "", " where <[x,y]> specifies the number of graphs in the x and y directions on the", " page, `color` enables color, `linewidth` scales all linewidths by ,", " \"\" is the name of a valid PostScript font, and ", " specifies the size of the PostScript font.", " `defaults` sets all options to their defaults: `portrait`, `[1,1]`, `color`,", " `linwidth 1.0`, `dashed`, `\"Helvetica,18\"`.", "", " The `solid` option is usually prefered if lines are colored, as they often", " are in the editor. Hardcopy will be black-and-white, so `dashed` should be", " chosen for that.", "", " Multiplot is implemented in two different ways.", "", " The first multiplot implementation is the standard gnuplot multiplot feature:", "", " set terminal tgif", " set output \"file.obj\"", " set multiplot", " set origin x01,y01", " set size xs,ys", " plot ...", " ...", " set origin x02,y02", " plot ...", " unset multiplot", "", " See `set multiplot` for further information.", "", " The second version is the [x,y] option for the driver itself. The advantage", " of this implementation is that everything is scaled and placed automatically", " without the need for setting origins and sizes; the graphs keep their natural", " x/y proportions of 3/2 (or whatever is fixed by `set size`).", "", " If both multiplot methods are selected, the standard method is chosen and a", " warning message is given.", "", " Examples of single plots (or standard multiplot):", " set terminal tgif # defaults", " set terminal tgif \"Times-Roman,24\"", " set terminal tgif landscape", " set terminal tgif landscape solid", "", " Examples using the built-in multiplot mechanism:", " set terminal tgif portrait [2,4] # portrait; 2 plots in the x-", " # and 4 in the y-direction", " set terminal tgif [1,2] # portrait; 1 plot in the x-", " # and 2 in the y-direction", " set terminal tgif landscape [3,3] # landscape; 3 plots in both", " # directions" END_HELP(tgif) #endif /*{{{}}}*/ gnuplot-4.6.4/term/dxf.trm0000644000471100001440000003077310460036601012413 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: dxf.trm,v 1.16 2006/07/21 02:35:45 sfeam Exp $ * */ /* GNUPLOT - dxf.trm */ /*[ * Copyright 1991 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * AutoCad (Release 10.x) dxf file format (import with AutoCad dxfin command) * * * AUTHOR * Florian Hiss (fhis1231@w204zrz.zrz.tu-berlin.de) * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(dxf) #endif #ifdef TERM_PROTO TERM_PUBLIC void DXF_init __PROTO((void)); TERM_PUBLIC void DXF_graphics __PROTO((void)); TERM_PUBLIC void DXF_text __PROTO((void)); TERM_PUBLIC void DXF_linetype __PROTO((int linetype)); TERM_PUBLIC void DXF_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void DXF_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void DXF_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC int DXF_text_angle __PROTO((int ang)); TERM_PUBLIC int DXF_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void DXF_reset __PROTO((void)); #define DXF_XMAX (120.0 * DXF_UNIT) #define DXF_YMAX (80.0 * DXF_UNIT) #if 0 /* HBB 20030626: old version */ #define DXF_HTIC (0.01 * DXF_XMAX) /* 1.0 percent */ #define DXF_VTIC (0.01 * DXF_YMAX) /* 1.0 percent */ #else /* HBB 20030626: make them have the same length in DXF_UNITs ! */ # define DXF_HTIC (2.0 * DXF_UNIT) # define DXF_VTIC (2.0 * DXF_UNIT) #endif #define DXF_HCHAR (0.014 * DXF_XMAX) /* 1.4 percent */ #define DXF_VCHAR (0.026 * DXF_YMAX) /* 2.6 percent */ #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #define DXF_UNIT 60.0 #define LINEWIDTH 0.0351 /* default line width is 1 pt */ /* 120 (autocad units) wide by 80 (autocad units) high (default) * use the GNUPLOT 'set size' command to change the defaults */ /* actual text height */ #define DXF_TEXTHEIGHT (0.7 * DXF_VCHAR) /* actual text width, only a guess, we don't know the width of * a character of given height of the AutoCad STANDARD text font, * so change it if you like */ #define DXF_TEXTWIDTH (0.7 * DXF_HCHAR) /* number of line types we support. see below */ #define DXF_LINE_TYPES 7 /* number of layers used for the drawing. see below */ #define MAX_LAYER 7 /* line type scaling */ #define LT_SCALE 1 static unsigned int DXF_posx; static unsigned int DXF_posy; /* linetype is mapped to a layer. see below. */ static unsigned int dxf_linetype; static enum JUSTIFY dxf_justify = LEFT; static float dxf_angle = 0.0; /* 0 is horizontal, 90.0 is vertical */ /* text style used in the entire drawing */ static const char *text_style = "STANDARD"; /* text always resides on layer 0 */ #define TEXT_LAYER 0 /* each linetype resides on its own layer. each layer has its own color. * this avoids difficulties that AutoCad has with proper scaling of * the linetypes. * change the colors according to your needs */ static const char *layer_name[] ={ "0", "1", "2", "3", "4", "5", "6" }; /* the colours are white, red, yellow, green, cyan, blue, magenta. * change them according to your needs. * when using a black and white plotting device the colours map to different * line thicknesses. see description of AutoCad print / plot command */ static const char *layer_colour[] = { "7", "1", "2", "3", "4", "5", "6" }; /* support line types AutoCad has to offer by default. */ static const char *layer_lines[] = { "CONTINUOUS", "DASHED", "HIDDEN", "CENTER", "PHANTOM", "DOT", "DASHDOT" }; static TBOOLEAN vector_was_last = FALSE; TERM_PUBLIC void DXF_init() { DXF_posx = DXF_posy = 0; dxf_linetype = 0; dxf_angle = 0.0; vector_was_last = FALSE; } TERM_PUBLIC void DXF_graphics() { register struct termentry *t = term; int i; static char GPFAR dxfi1[] = "\ 999\n\ %% GNUPLOT: dxf file for AutoCad\n\ 0\nSECTION\n 2\nHEADER\n\ 9\n$EXTMIN\n\ 10\n0.000\n 20\n0.000\n\ 9\n$EXTMAX\n\ 10\n%-6.3f\n 20\n%-6.3f\n\ 9\n$LIMMIN\n\ 10\n0.000\n 20\n0.000\n\ 9\n$LIMMAX\n\ 10\n%-6.3f\n 20\n%-6.3f\n\ 9\n$TEXTSTYLE\n 7\n%s\n\ 9\n$TEXTSIZE\n 40\n%-6.3f\n\ 9\n$PLINEWID\n 40\n%-6.4f\n\ 9\n$LTSCALE\n 40\n%-6.3f\n\ 9\n$COORDS\n 70\n 1\n\ 9\n$CELTYPE\n 6\nBYLAYER\n\ 9\n$CLAYER\n 8\n0\n\ 9\n$CECOLOR\n 62\n %s\n\ 9\n$MENU\n 1\nacad\n\ 0\nENDSEC\n\ 0\nSECTION\n 2\nTABLES\n"; static char GPFAR dxfi2[] = "\ 0\nTABLE\n 2\nLTYPE\n 70\n %d\n\ 0\nLTYPE\n 2\nCONTINUOUS\n 70\n 64\n\ 3\nSolid line\n 72\n 65\n 73\n 0\n 40\n0.0\n\ 0\nLTYPE\n 2\nDASHED\n 70\n 64\n\ 3\n__ __ __ __ __ __ __ __ __ __ __ __ __ __ __\n\ 72\n 65\n 73\n 2\n 40\n0.75\n 49\n0.5\n 49\n-0.25\n\ 0\nLTYPE\n 2\nHIDDEN\n 70\n 64\n\ 3\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n\ 72\n 65\n 73\n 2\n 40\n0.375\n 49\n0.25\n 49\n-0.125\n\ 0\nLTYPE\n 2\nCENTER\n 70\n 64\n\ 3\n____ _ ____ _ ____ _ ____ _ ____ _ ____ _ ____\n\ 72\n 65\n 73\n 4\n 40\n2.0\n 49\n1.25\n 49\n-0.25\n\ 49\n0.25\n 49\n-0.25\n\ 0\nLTYPE\n 2\nPHANTOM\n 70\n 64\n\ 3\n_____ _ _ _____ _ _ _____ _ _ _____ _ _ ____\n\ 72\n 65\n 73\n 6\n 40\n2.5\n 49\n1.25\n\ 49\n-0.25\n 49\n0.25\n 49\n-0.25\n 49\n0.25\n 49\n-0.25\n\ 0\nLTYPE\n 2\nDOT\n 70\n 64\n\ 3\n...............................................\n\ 72\n 65\n 73\n 2\n 40\n0.25\n 49\n0.0\n 49\n-0.25\n\ 0\nLTYPE\n 2\nDASHDOT\n 70\n 64\n\ 3\n__ . __ . __ . __ . __ . __ . __ . __ . __ . __\n\ 72\n 65\n 73\n 4\n 40\n1.0\n 49\n0.5\n 49\n-0.25\n\ 49\n0.0\n 49\n-0.25\n\ 0\nENDTAB\n"; fprintf(gpoutfile, dxfi1, t->xmax / DXF_UNIT, t->ymax / DXF_UNIT, t->xmax / DXF_UNIT, t->ymax / DXF_UNIT, text_style, DXF_TEXTHEIGHT / DXF_UNIT, LINEWIDTH, (double) LT_SCALE, layer_colour[0]); /* the linetype table */ fprintf(gpoutfile, dxfi2, DXF_LINE_TYPES); /* the layer table */ fprintf(gpoutfile, " 0\nTABLE\n 2\nLAYER\n 70\n %-d\n", MAX_LAYER); for (i = 1; i <= MAX_LAYER; i++) fprintf(gpoutfile, " 0\nLAYER\n 2\n%s\n 70\n 64\n62\n %s\n 6\n%s\n", layer_name[i - 1], layer_colour[i - 1], layer_lines[i - 1]); /* no blocks for insertion */ /* start the entity section */ fputs(" 0\nENDTAB\n0\nENDSEC\n\ 0\nSECTION\n 2\nBLOCKS\n 0\nENDSEC\n\ 0\nSECTION\n\ 2\nENTITIES\n", gpoutfile); } TERM_PUBLIC void DXF_text() { if (vector_was_last) fputs(" 0\nSEQEND\n", gpoutfile); fputs(" 0\nENDSEC\n 0\nEOF\n", gpoutfile); } TERM_PUBLIC void DXF_linetype(int linetype) { linetype = ABS(linetype); linetype = linetype % DXF_LINE_TYPES; dxf_linetype = linetype; } TERM_PUBLIC void DXF_move(unsigned int x, unsigned int y) { DXF_posx = x; DXF_posy = y; if (vector_was_last) fputs(" 0\nSEQEND\n", gpoutfile); vector_was_last = FALSE; fprintf(gpoutfile, "\ 0\nPOLYLINE\n 8\n%s\n 66\n 1\n\ 6\n%s\n\ 0\nVERTEX\n 8\n%s\n\ 6\n%s\n\ 10\n%-6.3f\n 20\n%-6.3f\n 30\n0.000\n", layer_name[dxf_linetype], layer_lines[dxf_linetype], layer_name[dxf_linetype], layer_lines[dxf_linetype], DXF_posx / DXF_UNIT, DXF_posy / DXF_UNIT); } TERM_PUBLIC void DXF_vector(unsigned int ux, unsigned int uy) { DXF_posx = ux; DXF_posy = uy; vector_was_last = TRUE; fprintf(gpoutfile, "\ 0\nVERTEX\n 8\n%s\n\ 6\n%s\n\ 10\n%-6.3f\n 20\n%-6.3f\n 30\n0.000\n", layer_name[dxf_linetype], layer_lines[dxf_linetype], DXF_posx / DXF_UNIT, DXF_posy / DXF_UNIT); } TERM_PUBLIC void DXF_put_text(unsigned int x, unsigned int y, const char str[]) { int stl; float xleftpos, yleftpos, xrightpos, yrightpos; /* shut up gcc warnings - SB */ xleftpos = yleftpos = xrightpos = yrightpos = 1.0; /* dummy */ /* ignore empty strings */ if (str[0] == NUL) return; stl = 0; while (str[stl] != NUL) ++stl; /* get string length */ if (vector_was_last) fputs(" 0\nSEQEND\n", gpoutfile); vector_was_last = FALSE; fprintf(gpoutfile, " 0\nTEXT\n 8\n%s\n", layer_name[TEXT_LAYER]); if (dxf_angle != 90.0) { switch (dxf_justify) { case LEFT: xleftpos = (float) x; yleftpos = (float) (y - DXF_VCHAR / 4.0); xrightpos = (float) (x + stl * DXF_TEXTWIDTH); yrightpos = yleftpos; break; case RIGHT: xleftpos = (float) (x - stl * DXF_TEXTWIDTH); yleftpos = (float) (y - DXF_VCHAR / 4.0); xrightpos = (float) x; yrightpos = yleftpos; break; case CENTRE: xleftpos = (float) (x - stl * DXF_TEXTWIDTH / 2.0); yleftpos = (float) (y - DXF_VCHAR / 4.0); xrightpos = (float) x; /* center point */ yrightpos = yleftpos; break; } } else { switch (dxf_justify) { case LEFT: xleftpos = (float) (x + DXF_VCHAR / 4.0); yleftpos = (float) y; xrightpos = xleftpos; yrightpos = (float) (y + stl * DXF_TEXTWIDTH); break; case RIGHT: xleftpos = (float) (x + DXF_VCHAR / 4.0); yleftpos = (float) (y - stl * DXF_HCHAR); xrightpos = xleftpos; yrightpos = (float) y; break; case CENTRE: xleftpos = (float) (x + DXF_VCHAR / 4.0); yleftpos = (float) (y - stl * DXF_TEXTWIDTH / 2.0); xrightpos = xleftpos; yrightpos = (float) y; /* center point */ break; } } fprintf(gpoutfile, "\ 10\n%-6.3f\n 20\n%-6.3f\n 30\n0.000\n\ 40\n%-6.3f\n 1\n%s\n 50\n%-6.3f\n\ 7\n%s\n", xleftpos / DXF_UNIT, yleftpos / DXF_UNIT, DXF_TEXTHEIGHT / DXF_UNIT, str, dxf_angle, text_style); if (dxf_justify != LEFT) { fprintf(gpoutfile, " 72\n%d\n\ 11\n%-6.3f\n 21\n%-6.3f\n 31\n0.000\n", dxf_justify, xrightpos / DXF_UNIT, yrightpos / DXF_UNIT); } } TERM_PUBLIC int DXF_text_angle(int ang) { dxf_angle = (ang ? 90.0 : 0.0); return (TRUE); } TERM_PUBLIC int DXF_justify_text(enum JUSTIFY mode) { dxf_justify = mode; return (TRUE); } TERM_PUBLIC void DXF_reset() { DXF_posx = DXF_posy = 0; } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(dxf_driver) "dxf", "dxf-file for AutoCad (default size 120x80)", DXF_XMAX, DXF_YMAX, DXF_VCHAR, DXF_HCHAR, DXF_VTIC, DXF_HTIC, options_null, DXF_init, DXF_reset, DXF_text, null_scale, DXF_graphics, DXF_move, DXF_vector, DXF_linetype, DXF_put_text, DXF_text_angle, DXF_justify_text, do_point, do_arrow, set_font_null TERM_TABLE_END(dxf_driver) #undef LAST_TERM #define LAST_TERM dxf_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(dxf) "1 dxf", "?commands set terminal dxf", "?set terminal dxf", "?set term dxf", "?terminal dxf", "?term dxf", "?dxf", " The `dxf` terminal driver creates pictures that can be imported into AutoCad", " (Release 10.x). It has no options of its own, but some features of its plots", " may be modified by other means. The default size is 120x80 AutoCad units,", " which can be changed by `set size`. `dxf` uses seven colors (white, red,", " yellow, green, cyan, blue and magenta), which can be changed only by", " modifying the source file. If a black-and-white plotting device is used, the", " colors are mapped to differing line thicknesses. See the description of the", " AutoCad print/plot command." END_HELP(dxf) #endif /* TERM_HELP */ gnuplot-4.6.4/term/hppj.trm0000644000471100001440000001730710460036603012573 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: hppj.trm,v 1.15 2006/07/21 02:35:47 sfeam Exp $ * */ /* GNUPLOT - hppj.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * hppj * * AUTHORS * Dan Merget (danm@sr.hp.com) * * This file was based on the hpljii file by: * John Engels * Russell Lang * Maurice Castro * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* The following HP laserjet series II driver uses generic bit mapped graphics * routines from bitmap.c to build up a bit map in memory. */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(hppj) #endif #ifdef TERM_PROTO TERM_PUBLIC void HPPJ_options __PROTO((void)); TERM_PUBLIC void HPPJ_init __PROTO((void)); TERM_PUBLIC void HPPJ_reset __PROTO((void)); TERM_PUBLIC void HPPJ_graphics __PROTO((void)); TERM_PUBLIC void HPPJ_text __PROTO((void)); TERM_PUBLIC void HPPJ_linetype __PROTO((int linetype)); /* We define 3 different font sizes: 5x9, 9x17, and 13x25 */ #define HPPJ_DPI 180 /* dots per inch */ #define HPPJ_PLANES 3 /* color planes */ #define HPPJ_COLORS (1 << HPPJ_PLANES) /* make XMAX and YMAX a multiple of 8 */ #define HPPJ_XMAX (8*(unsigned int)(9.5 * HPPJ_DPI / 8.0 + 0.9)) #define HPPJ_YMAX (8 * HPPJ_DPI) /* default values for term_tbl */ #define HPPJ_9x17_VCHAR FNT9X17_VCHAR #define HPPJ_9x17_HCHAR FNT9X17_HCHAR #define HPPJ_9x17_VTIC (FNT9X17_VCHAR / 2) #define HPPJ_9x17_HTIC (FNT9X17_HCHAR / 2) #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static int hppj_font = FNT9X17; TERM_PUBLIC void HPPJ_options() { char opt[10]; #define HPPJERROR "expecting font size FNT5X9, FNT9X17, or FNT13X25" term_options[0] = NUL; /* default to empty string and 9x17 font */ hppj_font = FNT9X17; /* in case of error or empty options */ if (!END_OF_COMMAND) { if (token[c_token].length > 8) { int_error(c_token, HPPJERROR); } capture(opt, c_token, c_token, /*4 */ 9); /* HBB 980226 */ if (!strcmp(opt, "FNT5X9")) { hppj_font = FNT5X9; strcpy(term_options, "FNT5X9"); } else if (!strcmp(opt, "FNT9X17")) { hppj_font = FNT9X17; strcpy(term_options, "FNT9X17"); } else if (!strcmp(opt, "FNT13X25")) { hppj_font = FNT13X25; strcpy(term_options, "FNT13X25"); } else { int_error(c_token, HPPJERROR); } c_token++; } } TERM_PUBLIC void HPPJ_init() { /* HBB 980226: moved this here, from graphics(): only init() may * change fields of *term ! */ switch (hppj_font) { case FNT5X9: term->v_char = FNT5X9_VCHAR; term->h_char = FNT5X9_HCHAR; term->v_tic = FNT5X9_VCHAR / 2; term->h_tic = FNT5X9_HCHAR / 2; break; case FNT9X17: term->v_char = FNT9X17_VCHAR; term->h_char = FNT9X17_HCHAR; term->v_tic = FNT9X17_VCHAR / 2; term->h_tic = FNT9X17_HCHAR / 2; break; case FNT13X25: term->v_char = FNT13X25_VCHAR; term->h_char = FNT13X25_HCHAR; term->v_tic = FNT13X25_VCHAR / 2; term->h_tic = FNT13X25_HCHAR / 2; break; } } TERM_PUBLIC void HPPJ_reset() { #ifdef VMS fflush_binary(); #endif /* VMS */ } TERM_PUBLIC void HPPJ_graphics() { /* HBB 980226: move a block of code from here to init() */ b_charsize(hppj_font); b_makebitmap(HPPJ_XMAX, HPPJ_YMAX, HPPJ_PLANES); } TERM_PUBLIC void HPPJ_text() { int x, plane, y; /* loop indexes */ int minRow, maxRow; /* loop bounds */ int numBytes; /* Number of run-length coded bytes to output */ int numReps; /* Number of times the current byte is repeated */ fprintf(gpoutfile, "\ \033E\033*t%dR\033*r%dS\ \033*b0X\033*b0Y\033*r%dU\ \033*v%dA\033*v%dB\033*v%dC\033*v%dI\ \033*v%dA\033*v%dB\033*v%dC\033*v%dI\ \033*v%dA\033*v%dB\033*v%dC\033*v%dI\ \033*v%dA\033*v%dB\033*v%dC\033*v%dI\ \033*v%dA\033*v%dB\033*v%dC\033*v%dI\ \033*v%dA\033*v%dB\033*v%dC\033*v%dI\ \033*v%dA\033*v%dB\033*v%dC\033*v%dI\ \033*v%dA\033*v%dB\033*v%dC\033*v%dI\ \033*b1M\033*r1A", HPPJ_DPI, HPPJ_YMAX, HPPJ_PLANES, 90, 88, 85, 0, 53, 8, 14, 1, 3, 26, 22, 2, 4, 4, 29, 3, 53, 5, 25, 4, 2, 22, 64, 5, 89, 83, 13, 6, 4, 4, 6, 7); /* dump bitmap in raster mode using run-length encoding */ for (x = HPPJ_XMAX - 1; x >= 0; --x) { for (plane = 0; plane < HPPJ_PLANES; plane++) { minRow = b_psize * plane; maxRow = b_psize * plane + b_psize - 1; /* Print column header */ numBytes = 0; for (y = maxRow; y >= minRow; --y) { if (y == minRow || *((*b_p)[y] + x) != *((*b_p)[y - 1] + x)) { numBytes += 2; } } fprintf(gpoutfile, "\033*b%d", numBytes); (void) fputc((char) (plane < HPPJ_PLANES - 1 ? 'V' : 'W'), gpoutfile); /* Print remainder of column */ numReps = 0; for (y = maxRow; y >= minRow; --y) { if (y == minRow || *((*b_p)[y] + x) != *((*b_p)[y - 1] + x)) { (void) fputc((char) (numReps), gpoutfile); (void) fputc((char) (*((*b_p)[y] + x)), gpoutfile); numReps = 0; } else { numReps++; } } } } fputs("\033*r1B\033E", gpoutfile); b_freebitmap(); } TERM_PUBLIC void HPPJ_linetype(int linetype) { if (linetype >= 0) { b_setlinetype(0); b_setvalue((linetype % (HPPJ_COLORS - 1)) + 1); } else { b_setlinetype(linetype + 2); b_setvalue(HPPJ_COLORS - 1); } } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(hppj_driver) "hppj", "HP PaintJet and HP3630 [FNT5X9 FNT9X17 FNT13X25]", HPPJ_XMAX, HPPJ_YMAX, HPPJ_9x17_VCHAR, HPPJ_9x17_HCHAR, HPPJ_9x17_VTIC, HPPJ_9x17_HTIC, HPPJ_options, HPPJ_init, HPPJ_reset, HPPJ_text, null_scale, HPPJ_graphics, b_move, b_vector, HPPJ_linetype, b_put_text, b_text_angle, null_justify_text, do_point, do_arrow, set_font_null, 0, TERM_BINARY, 0, 0, b_boxfill TERM_TABLE_END(hppj_driver) #undef LAST_TERM #define LAST_TERM hppj_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(hppj) "1 hppj", "?commands set terminal hppj", "?set terminal hppj", "?set term hppj", "?terminal hppj", "?term hppj", "?hppj", " The `hppj` terminal driver supports the HP PaintJet and HP3630 printers. The", " only option is the choice of font.", "", " Syntax:", " set terminal hppj {FNT5X9 | FNT9X17 | FNT13X25}", "", " with the middle-sized font (FNT9X17) being the default." END_HELP(hppj) #endif gnuplot-4.6.4/term/gpic.trm0000644000471100001440000002214210460036602012544 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: gpic.trm,v 1.18 2006/07/21 02:35:46 sfeam Exp $ */ /* GNUPLOT - gpic.trm */ /*[ * Copyright 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. */ /* * This terminal driver supports: * The GPIC graphics language for groff * * AUTHOR * Sigfrid Lundberg * * send your comments or suggestions to (siglun@volterra.teorekol.lu.se). * */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(gpic) #endif #ifdef TERM_PROTO TERM_PUBLIC void GPIC_options __PROTO((void)); TERM_PUBLIC void GPIC_init __PROTO((void)); TERM_PUBLIC void GPIC_graphics __PROTO((void)); TERM_PUBLIC void GPIC_text __PROTO((void)); TERM_PUBLIC void GPIC_linetype __PROTO((int linetype)); TERM_PUBLIC void GPIC_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void GPIC_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void GPIC_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); TERM_PUBLIC void GPIC_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC int GPIC_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC int GPIC_text_angle __PROTO((int ang)); TERM_PUBLIC void GPIC_reset __PROTO((void)); #define GPIC_DOTS_PER_INCH (300) /* 5 inches wide by 3 inches high (default) */ #define GPIC_XMAX (5*GPIC_DOTS_PER_INCH) #define GPIC_YMAX (3*GPIC_DOTS_PER_INCH) #define GPIC_HTIC (5*GPIC_DOTS_PER_INCH/72) #define GPIC_VTIC (5*GPIC_DOTS_PER_INCH/72) #define GPIC_HCHAR (GPIC_DOTS_PER_INCH*53/10/72) #define GPIC_VCHAR (GPIC_DOTS_PER_INCH*11/72) #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #define GPIC_PTS_PER_INCH (72.27) /* dot size in pt */ #define GPIC_UNIT (GPIC_PTS_PER_INCH/GPIC_DOTS_PER_INCH) #define GPIC_coord(x) ((float)x)/((float)GPIC_DOTS_PER_INCH) static void GPIC_close_line __PROTO((void)); static float GPIC_x, GPIC_y; static unsigned int GPIC_ltype; static enum JUSTIFY GPIC_justify = LEFT; /* for DOTS point style */ static const char *GPIC_lines[] = { "thickness 1.0", /* -2 border */ "", /* -1 axes */ "", /* 0 solid thin */ "dotted", "dashed 0.05", /* 1 solid thick */ "dashed 0.075", /* 2 solid Thick */ }; /* number of linetypes above */ #define GPIC_NUMLINES (sizeof(GPIC_lines)/sizeof(char *)) static int GPIC_linecount = 0; /* number of points in line so far */ TERM_PUBLIC void GPIC_options() { float x, y; struct value a; GPIC_x = 0; GPIC_y = 0; if (!END_OF_COMMAND) { x = real(const_express(&a)); if (!END_OF_COMMAND) { y = real(const_express(&a)); GPIC_x = x; GPIC_y = y; } } sprintf(term_options, "Origin is at (%f,%f)", GPIC_x, GPIC_y); } TERM_PUBLIC void GPIC_init() { GPIC_linetype(-1); fputs(".\\\"GNUPLOT: GROFF picture using the gpic preprocessor\n", gpoutfile); } TERM_PUBLIC void GPIC_graphics() { register struct termentry *t = term; fprintf(gpoutfile, ".PS %f %f\n", GPIC_coord(t->xmax), GPIC_coord(t->ymax)); fprintf(gpoutfile, "x=%f; y=%f\n", GPIC_x, GPIC_y); } TERM_PUBLIC void GPIC_text() { GPIC_close_line(); fputs(".PE\n", gpoutfile); } TERM_PUBLIC void GPIC_linetype(int linetype) { if (linetype < -2) linetype = LT_BLACK; if (linetype >= GPIC_NUMLINES - 2) linetype %= (GPIC_NUMLINES - 2); GPIC_ltype = linetype; } static void GPIC_close_line() { if (GPIC_linecount > 0) { fputs("; reset linewid\n", gpoutfile); GPIC_linecount = 0; } } TERM_PUBLIC void GPIC_move(unsigned int x, unsigned int y) { GPIC_close_line(); fprintf(gpoutfile, "move to (x+%f,y+%f)\n", GPIC_coord(x), GPIC_coord(y)); GPIC_linecount = 1; } TERM_PUBLIC void GPIC_vector(unsigned int ux, unsigned int uy) { if (GPIC_linecount == 1) { fprintf(gpoutfile, "line %s to (x+%f,y+%f)", GPIC_lines[GPIC_ltype + 2], GPIC_coord(ux), GPIC_coord(uy)); } else { fprintf(gpoutfile, "\ \\\n\ then to (x+%f,y+%f)", GPIC_coord(ux), GPIC_coord(uy)); } GPIC_linecount++; } TERM_PUBLIC void GPIC_arrow( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { GPIC_close_line(); if (head) { fprintf(gpoutfile, "arrowhead=7; arrow from x+%f,y+%f to x+%f,y+%f\n", GPIC_coord(sx), GPIC_coord(sy), GPIC_coord(ex), GPIC_coord(ey)); } else { fprintf(gpoutfile, "line from x+%f,y+%f to x+%f,y+%f\n", GPIC_coord(sx), GPIC_coord(sy), GPIC_coord(ex), GPIC_coord(ey)); } } TERM_PUBLIC void GPIC_put_text(unsigned int x, unsigned int y, const char str[]) { GPIC_close_line(); fprintf(gpoutfile, "\"%s\" ", str); switch (GPIC_justify) { case LEFT:{ fputs("ljust ", gpoutfile); break; } case CENTRE:{ fputs(" ", gpoutfile); break; } case RIGHT:{ fputs("rjust ", gpoutfile); break; } } fprintf(gpoutfile, "at x+%f,y+%f\n", GPIC_coord(x), GPIC_coord(y)); } TERM_PUBLIC int GPIC_justify_text(enum JUSTIFY mode) { GPIC_justify = mode; return (TRUE); } TERM_PUBLIC int GPIC_text_angle(int ang) { (void) ang; GPIC_close_line(); return (FALSE); } TERM_PUBLIC void GPIC_reset() { fflush(gpoutfile); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(gpic_driver) "gpic", "GPIC -- Produce graphs in groff using the gpic preprocessor", GPIC_XMAX, GPIC_YMAX, GPIC_VCHAR, GPIC_HCHAR, GPIC_VTIC, GPIC_HTIC, GPIC_options, GPIC_init, GPIC_reset, GPIC_text, null_scale, GPIC_graphics, GPIC_move, GPIC_vector, GPIC_linetype, GPIC_put_text, GPIC_text_angle, GPIC_justify_text, line_and_point, GPIC_arrow, set_font_null TERM_TABLE_END(gpic_driver) #undef LAST_TERM #define LAST_TERM gpic_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(gpic) "1 gpic", "?commands set terminal gpic", "?set terminal gpic", "?set term gpic", "?terminal gpic", "?term gpic", "?gpic", " The `gpic` terminal driver generates GPIC graphs in the Free Software", " Foundations's \"groff\" package. The default size is 5 x 3 inches. The only", " option is the origin, which defaults to (0,0).", "", " Syntax:", " set terminal gpic { }", "", " where `x` and `y` are in inches.", "", " A simple graph can be formatted using", "", " groff -p -mpic -Tps file.pic > file.ps.", "", " The output from pic can be pipe-lined into eqn, so it is possible to put", " complex functions in a graph with the `set label` and `set {x/y}label`", " commands. For instance,", "", " set ylab '@space 0 int from 0 to x alpha ( t ) roman d t@'", "", " will label the y axis with a nice integral if formatted with the command:", "", " gpic filename.pic | geqn -d@@ -Tps | groff -m[macro-package] -Tps", " > filename.ps", "", " Figures made this way can be scaled to fit into a document. The pic language", " is easy to understand, so the graphs can be edited by hand if need be. All", " co-ordinates in the pic-file produced by `gnuplot` are given as x+gnuplotx", " and y+gnuploty. By default x and y are given the value 0. If this line is", " removed with an editor in a number of files, one can put several graphs in", " one figure like this (default size is 5.0x3.0 inches):", "", " .PS 8.0", " x=0;y=3", " copy \"figa.pic\"", " x=5;y=3", " copy \"figb.pic\"", " x=0;y=0", " copy \"figc.pic\"", " x=5;y=0", " copy \"figd.pic\"", " .PE", "", " This will produce an 8-inch-wide figure with four graphs in two rows on top", " of each other.", "", " One can also achieve the same thing by the command", "", " set terminal gpic x y", "", " for example, using", "", " .PS 6.0", " copy \"trig.pic\"", " .PE" END_HELP(gpic) #endif /* TERM_HELP */ gnuplot-4.6.4/term/write_png_image.c0000644000471100001440000000646511546122120014411 0ustar /* * Dump an image block as a png image. * This routine is used by several terminal drivers so it gets a file by itself. */ #ifdef TERM_BODY #ifndef WRITE_PNG_IMAGE #define WRITE_PNG_IMAGE #ifdef HAVE_CAIROPDF #include "cairo-pdf.h" #include "wxterminal/gp_cairo.h" #include "wxterminal/gp_cairo_helpers.h" /* cairo PNG code */ static int write_png_image (unsigned m, unsigned n, coordval *image, t_imagecolor color_mode, const char *filename) { cairo_surface_t *image_surface; cairo_status_t cairo_stat; unsigned int *image255; image255 = gp_cairo_helper_coordval_to_chars(image, m, n, color_mode); image_surface = cairo_image_surface_create_for_data((unsigned char*) image255, CAIRO_FORMAT_ARGB32, m, n, 4*m); if ((cairo_stat = cairo_surface_write_to_png(image_surface, filename)) != CAIRO_STATUS_SUCCESS) { os_error(NO_CARET, "write_png_image cairo: could not write image file '%s': %s.", filename, cairo_status_to_string(cairo_stat)); } cairo_surface_destroy(image_surface); return 0; } #else /* libgd PNG code mainly taken from gd.trm */ #include static int write_png_image (unsigned M, unsigned N, coordval *image, t_imagecolor color_mode, const char *filename) { int m, n, pixel; unsigned int rgb; gdImagePtr im; FILE *out; im = gdImageCreateTrueColor(M, N); if (!im) int_error(NO_CARET, "libgd: failed to create image structure"); /* gdImageColorAllocateAlpha(im, 255, 255, 255, 127); */ gdImageSaveAlpha(im, 1); gdImageAlphaBlending(im, 0); if (color_mode == IC_RGBA) { /* RGB + Alpha channel */ for (n=0; n>1); /* input is [0:255] but gd wants [127:0] */ rgb255_from_rgb1( rgb1, &rgb255 ); pixel = gdImageColorResolveAlpha(im, (int)rgb255.r, (int)rgb255.g, (int)rgb255.b, alpha); gdImageSetPixel( im, m, n, pixel ); } } } else if (color_mode == IC_RGB) { /* TrueColor 24-bit color mode */ for (n=0; nindex = index; the_node->linetype = linetype; the_node->size = size; the_node->next = 0; the_node->x = (int *) gp_alloc(size*sizeof(int), "HP26"); the_node->y = (int *) gp_alloc(size*sizeof(int), "HP26"); the_node->isa_move = (TBOOLEAN *) gp_alloc(size*sizeof(TBOOLEAN), "HP26"); if (the_node->x == NULL || the_node->y == NULL || the_node->isa_move == NULL) return (NULL); } memset(the_node->isa_move, 0, size*sizeof(TBOOLEAN)); return (the_node); } /* destructor method */ static void BN_delete(HP26_Buffer_Node *the_node) { free(the_node->x); free(the_node->y); free(the_node->isa_move); free(the_node); } /* 2 for border and axes + 9 for plots + 1 for dots */ #define HP26_gnu_map_size 12 static HP26_Buffer_Node *HP26_gnu_map[HP26_gnu_map_size]; static HP26_Buffer_Node *HP26_buff; static int HP26_pen_x; static int HP26_pen_y; static int HP26_angle; static int HP26_cursor_x; static int HP26_cursor_y; static TBOOLEAN HP26_in_text; static int HP26_linetype_current; static int HP26_reduction_int; static int HP26_reduction_slope; static int HP26_overflows; static int HP26_nop_move; static int HP26_nop_vect; static int HP26_nop_line; /* linetype stuff */ #define SOLID 1 #define USER 2 #define LINE3 3 #define LINE4 4 #define LINE5 5 #define LINE6 6 #define DOTS 7 #define LINE8 8 #define LINE9 9 #define LINE10 10 #define POINT 11 #define swap(a, b) a ^= b; b ^= a; a ^= b; static char HP26_bin_short_table[32] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', ' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/' }; /* encodes an integer (assumed to be in range) into binary short incremental format (j)*/ #define short_encode(n) (HP26_bin_short_table[n+16]) /* tells whether a given delta_x,delta_y pair can be expressed in binary short incremental format */ #define qualified(dx,dy) ((dx>-17)&&(dy>-17)&&(dx<16)&&(dy<16)) static char HP26_bin_table[32] = { ' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?' }; /* returns the high byte of integer n in binary absolute format (i) */ #define bin_encode_hi(n) (HP26_bin_table[n>>5]) /* returns the low byte of integer n in binary absolute format (i) */ #define bin_encode_lo(n) (HP26_bin_table[n & 31]) /* the guts of the program -- first checks if any work need be done and, failing that, returns immediately -- tries to compress the vector stream -- goes through the buffer, using binary short incremental (2 bytes/point) as much as possible, even if must output two pairs to express one vector (it's no more expensive, and will hopefully damp any excessive switching back and forth between the two formats) if can't use binary short incremental, use binary absolute(4 bytes/point) -- finally, resets the HP26_next pointer to zero */ static int HP26_flush(HP26_Buffer_Node *the_buff) { int i, delta_x, delta_y, half_dx, half_dy; int *buff_x, *buff_y; TBOOLEAN *isa_move; TBOOLEAN bin_short; if (the_buff->next == 0) return (FALSE); /* init pointers for easy access */ buff_x = the_buff->x; buff_y = the_buff->y; isa_move = the_buff->isa_move; if (HP26_in_text) { fputs("\033*dT", gpoutfile); HP26_in_text = FALSE; } if (HP26_linetype_current != the_buff->linetype && (the_buff->next > 1 || !isa_move[0])) { fprintf(gpoutfile, "\033*m%dB", the_buff->linetype); HP26_linetype_current = the_buff->linetype; } /* start escape sequence */ fputs("\033*p", gpoutfile); /* initialize the state: binary short incremental or binary absolute */ delta_x = buff_x[0] - HP26_pen_x; delta_y = buff_y[0] - HP26_pen_y; if (qualified(delta_x, delta_y)) { fputc('j', gpoutfile); bin_short = TRUE; } else { fputc('i', gpoutfile); bin_short = FALSE; } /* now work through the list */ for (i = 0; i < the_buff->next; i++) { if (i > 0) { delta_x = buff_x[i] - buff_x[i - 1]; delta_y = buff_y[i] - buff_y[i - 1]; } if ((delta_x == 0) && (delta_y == 0)) { if (i > 0 && !isa_move[i - 1] && !isa_move[i]) { /* allow null vectors only when drawing dots */ HP26_nop_vect++; continue; } else if (isa_move[i]) { /* a null move */ HP26_nop_move++; continue; } } else if (i > 0 && i + 1 < the_buff->next && isa_move[i] && isa_move[i + 1]) { /* consecutive moves are condensed into one */ HP26_nop_move++; continue; } else if (!qualified(delta_x, delta_y) && i > 0 && i + 2 < the_buff->next && isa_move[i] && !isa_move[i + 1] && isa_move[i + 2] && qualified(buff_x[i + 1] - buff_x[i - 1], buff_y[i + 1] - buff_y[i - 1])) { swap(buff_x[i], buff_x[i + 1]); swap(buff_y[i], buff_y[i + 1]); /* set up new delta_x & delta_y */ delta_x = buff_x[i] - buff_x[i - 1]; delta_y = buff_y[i] - buff_y[i - 1]; } if (qualified(delta_x, delta_y)) { if (!bin_short) { fputc('j', gpoutfile); bin_short = TRUE; } if (isa_move[i]) fputc('a', gpoutfile); fputc(short_encode(delta_x), gpoutfile); fputc(short_encode(delta_y), gpoutfile); } else { half_dx = (delta_x + (delta_x > 0 ? 1 : -1)) / 2; half_dy = (delta_y + (delta_y > 0 ? 1 : -1)) / 2; if (bin_short && qualified(half_dx, half_dy)) { if (isa_move[i]) fputc('a', gpoutfile); fputc(short_encode(half_dx), gpoutfile); fputc(short_encode(half_dy), gpoutfile); if (isa_move[i]) fputc('a', gpoutfile); fputc(short_encode(delta_x - half_dx), gpoutfile); fputc(short_encode(delta_y - half_dy), gpoutfile); } else { if (bin_short) { bin_short = FALSE; fputc('i', gpoutfile); } if (isa_move[i]) fputc('a', gpoutfile); fputc(bin_encode_hi(buff_x[i]), gpoutfile); fputc(bin_encode_lo(buff_x[i]), gpoutfile); fputc(bin_encode_hi(buff_y[i]), gpoutfile); fputc(bin_encode_lo(buff_y[i]), gpoutfile); } } } /* end for.. */ /* the term doesn't seem to mind leaving this out */ /* finish the escape sequence */ fputc('Z', gpoutfile); /* set these for next time */ HP26_pen_x = buff_x[the_buff->next - 1]; HP26_pen_y = buff_y[the_buff->next - 1]; the_buff->next = 0; return (TRUE); } static void HP26_handle_overflow() { HP26_Buffer_Node *bigger, *old; int x, y; x = (HP26_buff->x)[HP26_buff->next - 1]; y = (HP26_buff->y)[HP26_buff->next - 1]; HP26_flush(HP26_buff); bigger = BN_create(HP26_buff->index, HP26_buff->size * 2, HP26_buff->linetype); if (bigger != NULL) { old = HP26_buff; HP26_gnu_map[bigger->index] = bigger; /* special case since DOTS entry is shared 3 ways */ if (bigger->index == 0) { HP26_gnu_map[1] = bigger; HP26_gnu_map[3] = bigger; } HP26_buff = bigger; BN_delete(old); } (HP26_buff->x)[0] = x; (HP26_buff->y)[0] = y; (HP26_buff->isa_move)[0] = TRUE; HP26_buff->next = 1; HP26_overflows++; } /* checks for NOP, overcapacity condition, and then adds vector to the list */ TERM_PUBLIC void HP26_vector(unsigned int x, unsigned int y) { if (HP26_buff->next > 2 && x == (HP26_buff->x)[HP26_buff->next - 1] && y == (HP26_buff->y)[HP26_buff->next - 1] && !(HP26_buff->isa_move)[HP26_buff->next - 1]) { HP26_nop_vect++; return; } if (HP26_buff->next == HP26_buff->size) HP26_handle_overflow(); /* otherwise add to the list */ (HP26_buff->x)[HP26_buff->next] = x; (HP26_buff->y)[HP26_buff->next] = y; (HP26_buff->isa_move)[HP26_buff->next] = FALSE; HP26_buff->next++; } /* checks for NOP, checks for overcapacity, puts self on list */ TERM_PUBLIC void HP26_move(unsigned int x, unsigned int y) { if (HP26_buff->next > 0) { if (((HP26_buff->x)[HP26_buff->next - 1] == x) && ((HP26_buff->y)[HP26_buff->next - 1] == y)) { /* null moves are NOP's */ HP26_nop_move++; return; } else if ((HP26_buff->isa_move)[HP26_buff->next - 1]) { /* consecutive moves are NOP's */ (HP26_buff->x)[HP26_buff->next - 1] = x; (HP26_buff->y)[HP26_buff->next - 1] = y; HP26_nop_move++; return; } } if (HP26_buff->next == HP26_buff->size) HP26_handle_overflow(); (HP26_buff->x)[HP26_buff->next] = x; (HP26_buff->y)[HP26_buff->next] = y; (HP26_buff->isa_move)[HP26_buff->next] = TRUE; HP26_buff->next++; return; } TERM_PUBLIC void HP26_init() { HP26_gnu_map[-2 + 2] = BN_create(0, 2048, DOTS); /* border */ HP26_gnu_map[-1 + 2] = HP26_gnu_map[-2 + 2]; /* axes */ HP26_gnu_map[0 + 2] = BN_create(2, 3072, SOLID); /* plot 0 */ HP26_gnu_map[1 + 2] = HP26_gnu_map[-2 + 2]; /* plot 1 */ HP26_gnu_map[2 + 2] = BN_create(4, 1024, LINE5); /* plot 2 */ HP26_gnu_map[3 + 2] = BN_create(5, 256, LINE6); /* plot 3 */ HP26_gnu_map[4 + 2] = BN_create(6, 256, LINE8); /* plot 4 */ HP26_gnu_map[5 + 2] = BN_create(7, 128, LINE9); /* plot 5 */ HP26_gnu_map[6 + 2] = BN_create(8, 128, LINE10); /* plot 6 */ HP26_gnu_map[7 + 2] = BN_create(9, 64, LINE6); /* plot 7 */ HP26_gnu_map[8 + 2] = BN_create(10, 64, LINE4); /* plot 8 */ HP26_gnu_map[9 + 2] = BN_create(11, 512, POINT); /* point plot */ HP26_buff = HP26_gnu_map[10]; /* set to an unlikely linetype */ HP26_linetype_current = 0; /* set to force a linetype change */ HP26_angle = 1; /* left to right, default */ fputs("\033*mp1m2a2Q", gpoutfile); /* 1 2 3 4 1. make text upright 2. select text size 1 3. make SET the default drawing op 4. left justify text */ fflush(gpoutfile); } TERM_PUBLIC void HP26_graphics() { fputs("\033*daflsC", gpoutfile); /* 12345 1. clear graphics display 2. shut off the alphanumeric display 3. graphics cursor off 4. into graphics text mode 5. enable graphics display */ /* set the pen & cursor positions to force an initial absolute move */ HP26_pen_x = HP26_pen_y = -200; HP26_cursor_x = HP26_cursor_y = 800; HP26_in_text = TRUE; /* initialize statistics */ HP26_reduction_int = 0; HP26_reduction_slope = 0; HP26_nop_move = 0; HP26_nop_vect = 0; HP26_nop_line = 0; HP26_overflows = 0; } TERM_PUBLIC void HP26_text() { int i, j, curr; /* always flush the current line first */ for (i = 0; i < HP26_gnu_map_size; i++) if ((HP26_gnu_map[i])->linetype == HP26_linetype_current) HP26_flush(HP26_gnu_map[i]); /* now flush the rest of the lines */ for (i = 0; i < HP26_gnu_map_size; i++) { HP26_flush(HP26_gnu_map[i]); curr = HP26_gnu_map[i]->linetype; for (j = 0; j < HP26_gnu_map_size; j++) if ((HP26_gnu_map[j])->linetype == curr) HP26_flush(HP26_gnu_map[j]); } fputs("\033*deT", gpoutfile); /* 12 1. turn on the alphanumeric display 2. back to text mode */ fflush(gpoutfile); /* informational: tells how many points compressed, how many NOP's of each type, and how many times a buffer overflowed during this plot */ /* if(HP26_reduction_int + HP26_reduction_slope + HP26_nop_move + HP26_nop_vect + HP26_overflows + HP26_nop_line > 0){ if (HP26_reduction_int>0) printf("%d int-compress",HP26_reduction_int); if (HP26_reduction_slope>0) printf("%d slope-compress",HP26_reduction_slope); if (HP26_nop_move>0) printf(" %d nop_move",HP26_nop_move); if (HP26_nop_vect>0) printf(" %d nop_vect",HP26_nop_vect); if (HP26_nop_line>0) printf(" %d nop_line",HP26_nop_line); if (HP26_overflows>0) printf(" %d buffer overflows",HP26_overflows); printf("\n"); } */ } TERM_PUBLIC void HP26_reset() { int i; for (i = 2; i < HP26_gnu_map_size; i++) BN_delete(HP26_gnu_map[i]); } TERM_PUBLIC int HP26_text_angle(int ang) { HP26_angle = (ang ? 2 : 1); fprintf(gpoutfile, "\033*m%dN", HP26_angle); return (TRUE); } TERM_PUBLIC void HP26_put_text(unsigned int x, unsigned int y, const char *str) { char abs_str[10], rel_str[10]; if (!strlen(str)) return; else { fputs("\033*d", gpoutfile); if (!HP26_in_text) { fputc('s', gpoutfile); HP26_in_text = TRUE; } sprintf(rel_str, "%d,%dP", x - HP26_cursor_x, y - HP26_cursor_y); sprintf(abs_str, "%d,%dO", x, y); if (strlen(rel_str) < strlen(abs_str)) fputs(rel_str, gpoutfile); else fputs(abs_str, gpoutfile); fputs(str, gpoutfile); HP26_pen_x = HP26_cursor_x = x; HP26_pen_y = HP26_cursor_y = y; } /* tmp = &(HP26_all_buffers[HP26_linetype_current]); tmp->x[tmp->next] = x; tmp->y[tmp->next] = y; tmp->isa_move[tmp->next] = TRUE; tmp->next++; HP26_flush(tmp); fprintf(gpoutfile,"\033*l%s\r",str); */ return; } /* checks for NOP, sets HP26_buff to point to the right buffer */ TERM_PUBLIC void HP26_linetype(int linetype) { if (linetype < -2) linetype = LT_BLACK; if (linetype > 8) linetype %= 9; linetype += 2; if (HP26_gnu_map[linetype] == HP26_buff) { HP26_nop_line++; return; /* gnuplot just sent us another NOP */ } HP26_buff = HP26_gnu_map[linetype]; } /* switches to a solid linetype and calls do_point, then switches back */ TERM_PUBLIC void HP26_line_and_point(unsigned int x, unsigned int y, int number) { int line_save, not_solid; /* shut up warnings with dummy initializer -SB */ line_save = 0; not_solid = (HP26_buff->linetype != SOLID); if (not_solid) { line_save = HP26_buff->linetype; HP26_linetype(0); /*switch to a solid line */ } HP26_do_point(x, y, number); if (not_solid) HP26_linetype(line_save); } /* provides 9 point types so they stay in sync with the linetypes puts simpler point types first on the assumption they are more frequently used */ static void HP26_do_point(unsigned int x, unsigned int y, int number) { int htic, vtic; HP26_Buffer_Node *tmp; vtic = HP26_VTIC / 2; htic = HP26_HTIC / 2; if (number < 0) { /* do a dot -- special case */ tmp = HP26_buff; HP26_buff = HP26_gnu_map[11]; /* point plot */ HP26_vector(x, y); HP26_buff = tmp; } switch (number % 9) { case 0: /* do triangle */ HP26_move(x - htic, y - vtic); HP26_vector(x, y + vtic); HP26_vector(x + htic, y - vtic); HP26_vector(x - htic, y - vtic); break; case 1: /* do nambla */ HP26_move(x - htic, y + vtic); HP26_vector(x, y - vtic); HP26_vector(x + htic, y + vtic); HP26_vector(x - htic, y + vtic); break; case 2: /* do left triangle */ HP26_move(x - htic, y); HP26_vector(x + htic, y + vtic); HP26_vector(x + htic, y - vtic); HP26_vector(x - htic, y); break; case 3: /* do right triangle */ HP26_move(x + htic, y); HP26_vector(x - htic, y + vtic); HP26_vector(x - htic, y - vtic); HP26_vector(x + htic, y); break; case 4: /* do box */ HP26_move(x - htic, y - vtic); HP26_vector(x - htic, y + vtic); HP26_vector(x + htic, y + vtic); HP26_vector(x + htic, y - vtic); HP26_vector(x - htic, y - vtic); break; case 5: /* do plus */ HP26_move(x, y + vtic); HP26_vector(x, y - vtic); HP26_move(x - htic, y); HP26_vector(x + htic, y); break; case 6: /* do X */ HP26_move(x + htic, y + vtic); HP26_vector(x - htic, y - vtic); HP26_move(x - htic, y + vtic); HP26_vector(x + htic, y - vtic); break; default: /* do diamond */ HP26_move(x, y - vtic); HP26_vector(x - htic, y); HP26_vector(x, y + vtic); HP26_vector(x + htic, y); HP26_vector(x, y - vtic); break; } } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(hp2623a_driver) "hp2623A", "HP2623A and maybe others", HP26_XMAX, HP26_YMAX, HP26_VCHAR, HP26_HCHAR, HP26_VTIC, HP26_HTIC, options_null, HP26_init, HP26_reset, HP26_text, null_scale, HP26_graphics, HP26_move, HP26_vector, HP26_linetype, HP26_put_text, HP26_text_angle, null_justify_text, HP26_line_and_point, do_arrow, set_font_null TERM_TABLE_END(hp2623a_driver) #undef LAST_TERM #define LAST_TERM hp2623a_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(hp2623a) "1 hp2623a", "?commands set terminal hp2623a", "?set terminal hp2623a", "?set term hp2623a", "?terminal hp2623a", "?term hp2623a", "?hp2623a", " The `hp2623a` terminal driver supports the Hewlett Packard HP2623A. It has", " no options." END_HELP(hp2623a) #endif gnuplot-4.6.4/term/impcodes.h0000644000471100001440000000252506515203641013062 0ustar /* * $Id: impcodes.h,v 1.1.1.1 1998/04/15 19:16:49 lhecking Exp $ */ /* * Copyright (c) 1985 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * * @(#)imPcodes.h 5.1 (Berkeley) 9/21/85 */ #define imP_SP 128 #define imP_SP1 129 #define imP_OLD_MMOVE 130 #define imP_MPLUS 131 #define imP_MMINUS 132 #define imP_MMOVE 133 #define imP_SMOVE 134 #define imP_SET_ABS_H 135 #define imP_SET_REL_H 136 #define imP_SET_ABS_V 137 #define imP_SET_REL_V 138 #define imP_SRULE 192 #define imP_BRULE 193 #define imP_SET_HPOS 195 #define imP_SET_VPOS 196 #define imP_CRLF 197 #define imP_SGLY 198 #define imP_BGLY 199 #define imP_DELG 200 #define imP_DELC 201 #define imP_DELF 202 #define imP_SET_HV_SYSTEM 205 #define imP_SET_ADV_DIRS 206 #define imP_SET_FAMILY 207 #define imP_SET_IL 208 #define imP_SET_BOL 209 #define imP_SET_SP 210 #define imP_PUSH 211 #define imP_POP 212 #define imP_PAGE 213 #define imP_SET_PUSH_MASK 214 #define imP_ENDPAGE 219 #define imP_CREATE_FAMILY_TABLE 221 #define imP_CREATE_MAP 222 #define imP_CREATE_PATH 230 #define imP_SET_TEXTURE 231 #define imP_SET_PEN 232 #define imP_FILL_PATH 233 #define imP_DRAW_PATH 234 #define imP_BITMAP 235 #define imP_SET_MAGN 236 #define imP_SET_DRAW_PATTERN 237 #define imP_EOF 255 gnuplot-4.6.4/term/PostScript/0000755000471100001440000000000012223340020013176 5ustar gnuplot-4.6.4/term/PostScript/8859-15.ps0000644000471100001440000000411310713657504014425 0ustar % % Encoding for ISO-8859-15 (also called Latin9) % /reencodeISO15 { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall currentdict /CharStrings known { CharStrings /Idieresis known { /Encoding ISOLatin15Encoding def } if } if currentdict end definefont } def /ISOLatin15Encoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve /dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut /ogonek/caron/space/exclamdown/cent/sterling/Euro/yen/Scaron /section/scaron/copyright/ordfeminine/guillemotleft/logicalnot /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior /Zcaron/mu/paragraph/periodcentered/zcaron/onesuperior/ordmasculine /guillemotright/OE/oe/Ydieresis/questiondown /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute /Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis /aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave /iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex /otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis /yacute/thorn/ydieresis ] def gnuplot-4.6.4/term/PostScript/8859-9.ps0000644000471100001440000000427610742601542014353 0ustar % % Encoding for ISO_8859_9 (also called Latin5) % Plus code points 80-9F used in Codepage 1254 % /reencodeISO9 { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall currentdict /CharStrings known { CharStrings /Idieresis known { /Encoding ISOLatin5Encoding def } if } if currentdict end definefont } def /ISOLatin5Encoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde /Euro/.notdef/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl /circumflex/perthousand/Scaron/guilsinglleft/OE/.notdef/.notdef/.notdef /.notdef/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash /tilde/trademark/scaron/guilsinglright/oe/.notdef/.notdef/Ydieresis /.notdef/space/exclamdown/cent/sterling/currency/yen/brokenbar /section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior /acute/mu/paragraph/bullet/cedilla/onesuperior/ordmasculine /guillemotright/onequarter/onehalf/threequarters/questiondown /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Gbreve/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Idotaccent /Scedilla/germandbls/agrave/aacute/acircumflex/atilde/adieresis /aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave /iacute/icircumflex/idieresis/gbreve/ntilde/ograve/oacute/ocircumflex /otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis /dotlessi/scedilla/ydieresis ] def gnuplot-4.6.4/term/PostScript/unicode_small.map0000644000471100001440000002125410715653157016545 0ustar =00 U+0000 =01 U+0001 =02 U+0002 =03 U+0003 =04 U+0004 =05 U+0005 =06 U+0006 =07 U+0007 =08 U+0008 =09 U+0009 =0A U+000A =0B U+000B =0C U+000C =0D U+000D =0E U+000E =0F U+000F =10 U+0010 =11 U+0011 =12 U+0012 =13 U+0013 =14 U+0014 =15 U+0015 =16 U+0016 =17 U+0017 =18 U+0018 =19 U+0019 =1A U+001A =1B U+001B =1C U+001C =1D U+001D =1E U+001E =1F U+001F !20 U+0020 space !21 U+0021 exclam !22 U+0022 quotedbl !23 U+0023 numbersign !24 U+0024 dollar !25 U+0025 percent !26 U+0026 ampersand !27 U+0027 quotesingle !28 U+0028 parenleft !29 U+0029 parenright !2A U+002A asterisk !2B U+002B plus !2C U+002C comma !2D U+002D hyphen !2E U+002E period !2F U+002F slash !30 U+0030 zero !31 U+0031 one !32 U+0032 two !33 U+0033 three !34 U+0034 four !35 U+0035 five !36 U+0036 six !37 U+0037 seven !38 U+0038 eight !39 U+0039 nine !3A U+003A colon !3B U+003B semicolon !3C U+003C less !3D U+003D equal !3E U+003E greater !3F U+003F question !40 U+0040 at !41 U+0041 A !42 U+0042 B !43 U+0043 C !44 U+0044 D !45 U+0045 E !46 U+0046 F !47 U+0047 G !48 U+0048 H !49 U+0049 I !4A U+004A J !4B U+004B K !4C U+004C L !4D U+004D M !4E U+004E N !4F U+004F O !50 U+0050 P !51 U+0051 Q !52 U+0052 R !53 U+0053 S !54 U+0054 T !55 U+0055 U !56 U+0056 V !57 U+0057 W !58 U+0058 X !59 U+0059 Y !5A U+005A Z !5B U+005B bracketleft !5C U+005C backslash !5D U+005D bracketright !5E U+005E asciicircum !5F U+005F underscore !60 U+0060 grave !61 U+0061 a !62 U+0062 b !63 U+0063 c !64 U+0064 d !65 U+0065 e !66 U+0066 f !67 U+0067 g !68 U+0068 h !69 U+0069 i !6A U+006A j !6B U+006B k !6C U+006C l !6D U+006D m !6E U+006E n !6F U+006F o !70 U+0070 p !71 U+0071 q !72 U+0072 r !73 U+0073 s !74 U+0074 t !75 U+0075 u !76 U+0076 v !77 U+0077 w !78 U+0078 x !79 U+0079 y !7A U+007A z !7B U+007B braceleft !7C U+007C bar !7D U+007D braceright !7E U+007E asciitilde =A0 U+00A0 !A1 U+00A1 exclamdown !A2 U+00A2 cent !A3 U+00A3 sterling !A4 U+00A4 currency !A5 U+00A5 yen !A6 U+00A6 brokenbar !A7 U+00A7 section !A8 U+00A8 dieresis !A9 U+00A9 copyright !AA U+00AA ordfeminine !AB U+00AB guillemotleft !AC U+00AC logicalnot =AD U+00AD !AE U+00AE registered !AF U+00AF macron !B0 U+00B0 degree !B1 U+00B1 plusminus =B2 U+00B2 =B3 U+00B3 !B4 U+00B4 acute =B5 U+00B5 !B6 U+00B6 paragraph !B7 U+00B7 periodcentered !B8 U+00B8 cedilla =B9 U+00B9 !BA U+00BA ordmasculine !BB U+00BB guillemotright !BC U+00BC onequarter !BD U+00BD onehalf !BE U+00BE threequarters !BF U+00BF questiondown !C0 U+00C0 Agrave !C1 U+00C1 Aacute !C2 U+00C2 Acircumflex !C3 U+00C3 Atilde !C4 U+00C4 Adieresis !C5 U+00C5 Aring !C6 U+00C6 AE !C7 U+00C7 Ccedilla !C8 U+00C8 Egrave !C9 U+00C9 Eacute !CA U+00CA Ecircumflex !CB U+00CB Edieresis !CC U+00CC Igrave !CD U+00CD Iacute !CE U+00CE Icircumflex !CF U+00CF Idieresis !D0 U+00D0 Eth !D1 U+00D1 Ntilde !D2 U+00D2 Ograve !D3 U+00D3 Oacute !D4 U+00D4 Ocircumflex !D5 U+00D5 Otilde !D6 U+00D6 Odieresis !D7 U+00D7 multiply !D8 U+00D8 Oslash !D9 U+00D9 Ugrave !DA U+00DA Uacute !DB U+00DB Ucircumflex !DC U+00DC Udieresis !DD U+00DD Yacute !DE U+00DE Thorn !DF U+00DF germandbls !E0 U+00E0 agrave !E1 U+00E1 aacute !E2 U+00E2 acircumflex !E3 U+00E3 atilde !E4 U+00E4 adieresis !E5 U+00E5 aring !E6 U+00E6 ae !E7 U+00E7 ccedilla !E8 U+00E8 egrave !E9 U+00E9 eacute !EA U+00EA ecircumflex !EB U+00EB edieresis !EC U+00EC igrave !ED U+00ED iacute !EE U+00EE icircumflex !EF U+00EF idieresis !F0 U+00F0 eth !F1 U+00F1 ntilde !F2 U+00F2 ograve !F3 U+00F3 oacute !F4 U+00F4 ocircumflex !F5 U+00F5 otilde !F6 U+00F6 odieresis !F7 U+00F7 divide !F8 U+00F8 oslash !F9 U+00F9 ugrave !FA U+00FA uacute !FB U+00FB ucircumflex !FC U+00FC udieresis !FD U+00FD yacute !FE U+00FE thorn !FF U+00FF ydieresis !19e U+0391 uni0391 !19f U+0392 uni0392 !1a0 U+0393 uni0393 !1a1 U+0394 uni0394 !1a2 U+0395 uni0395 !1a3 U+0396 uni0396 !1a4 U+0397 uni0397 !1a5 U+0398 uni0398 !1a6 U+0399 uni0399 !1a7 U+039A uni039A !1a8 U+039B uni039B !1a9 U+039C uni039C !1aa U+039D uni039D !1ab U+039E uni039E !1ac U+039F uni039F !1ad U+03A0 uni03A0 !1ae U+03A1 uni03A1 !1af U+03A3 uni03A3 !1b0 U+03A4 uni03A4 !1b1 U+03A5 uni03A5 !1b2 U+03A6 uni03A6 !1b3 U+03A7 uni03A7 !1b4 U+03A8 uni03A8 !1b5 U+03A9 uni03A9 !1b6 U+03B1 uni03B1 !1b7 U+03B2 uni03B2 !1b8 U+03B3 uni03B3 !1b9 U+03B4 uni03B4 !1ba U+03B5 uni03B5 !1bb U+03B6 uni03B6 !1bc U+03B7 uni03B7 !1bd U+03B8 uni03B8 !1be U+03B9 uni03B9 !1bf U+03BA uni03BA !1c0 U+03BB uni03BB !1c1 U+03BC uni03BC !1c2 U+03BD uni03BD !1c3 U+03BE uni03BE !1c4 U+03BF uni03BF !1c5 U+03C0 uni03C0 !1c6 U+03C1 uni03C1 !1c7 U+03C2 uni03C2 !1c8 U+03C3 uni03C3 !1c9 U+03C4 uni03C4 !1ca U+03C5 uni03C5 !1cb U+03C6 uni03C6 !1cc U+03C7 uni03C7 !1cd U+03C8 uni03C8 !1ce U+03C9 uni03C9 !1cf U+03D0 uni03D0 !1d0 U+03D1 uni03D1 !1d1 U+03D5 uni03D5 !1d2 U+03D6 uni03D6 !25b U+2016 uni2016 !26d U+2032 uni2032 !26e U+2033 uni2033 !26f U+2034 uni2034 !270 U+2035 uni2035 !271 U+2036 uni2036 !272 U+2037 uni2037 !273 U+2039 uni2039 !274 U+203A uni203A !275 U+203C uni203C !276 U+2044 uni2044 !277 U+20AC uni20AC !278 U+2107 uni2107 !279 U+210B uni210B !27a U+210E uni210E !27b U+210F uni210F !27e U+2113 uni2113 !284 U+211B uni211B !289 U+2126 uni2126 !28a U+2127 uni2127 !28d U+212B uni212B !295 U+2135 uni2135 !296 U+2136 uni2136 !297 U+2137 uni2137 !298 U+2138 uni2138 !299 U+2190 uni2190 !29a U+2191 uni2191 !29b U+2192 uni2192 !29c U+2193 uni2193 !29d U+2194 uni2194 !29e U+2195 uni2195 !2a1 U+21D0 uni21D0 !2a2 U+21D1 uni21D1 !2a3 U+21D2 uni21D2 !2a4 U+21D3 uni21D3 !2a5 U+21D4 uni21D4 !2a6 U+2200 uni2200 !2a7 U+2202 uni2202 !2a8 U+2203 uni2203 !2aa U+2205 uni2205 !2ab U+2206 uni2206 !2ac U+2207 uni2207 !2ad U+2208 uni2208 !2ae U+2209 uni2209 !2af U+220A uni220A !2b0 U+220B uni220B !2b1 U+220C uni220C !2b2 U+220D uni220D !2b4 U+220F uni220F !2b6 U+2211 uni2211 !2b7 U+2212 uni2212 !2b8 U+2213 uni2213 !2ba U+2215 uni2215 !2bb U+2216 uni2216 !2bc U+2217 uni2217 !2bd U+2218 uni2218 !2be U+2219 uni2219 !2bf U+221A uni221A !2c0 U+221B uni221B !2c1 U+221C uni221C !2c2 U+221D uni221D !2c3 U+221E uni221E !2c4 U+221F uni221F !2c8 U+2223 uni2223 !2ca U+2225 uni2225 !2cc U+2227 uni2227 !2cd U+2228 uni2228 !2ce U+2229 uni2229 !2cf U+222A uni222A !2d0 U+222B uni222B !2d1 U+222C uni222C !2d2 U+222D uni222D !2d3 U+222E uni222E !2d9 U+2234 uni2234 !2da U+2235 uni2235 !2db U+2236 uni2236 !2dc U+2237 uni2237 !2e1 U+223C uni223C !2e2 U+223D uni223D !2e3 U+223E uni223E !2e4 U+223F uni223F !2e6 U+2241 uni2241 !2e7 U+2242 uni2242 !2e8 U+2243 uni2243 !2e9 U+2244 uni2244 !2ea U+2245 uni2245 !2eb U+2246 uni2246 !2ec U+2247 uni2247 !2ed U+2248 uni2248 !2ee U+2249 uni2249 !2f4 U+224F uni224F !2f5 U+225F uni225F !2f6 U+2260 uni2260 !2f7 U+2261 uni2261 !2fa U+2264 uni2264 !2fb U+2265 uni2265 !2fc U+2266 uni2266 !2fd U+2267 uni2267 !300 U+226A uni226A !301 U+226B uni226B !302 U+226C uni226C !303 U+226D uni226D !304 U+226E uni226E !305 U+226F uni226F !306 U+2270 uni2270 !307 U+2271 uni2271 !308 U+2272 uni2272 !309 U+2273 uni2273 !30a U+2274 uni2274 !30b U+2275 uni2275 !310 U+227A uni227A !311 U+227B uni227B !312 U+227C uni227C !313 U+227D uni227D !314 U+227E uni227E !315 U+227F uni227F !316 U+2280 uni2280 !317 U+2281 uni2281 !318 U+2282 uni2282 !319 U+2283 uni2283 !31a U+2284 uni2284 !31b U+2285 uni2285 !31c U+2286 uni2286 !31d U+2287 uni2287 !31e U+2288 uni2288 !31f U+2289 uni2289 !389 U+2297 uni2297 !38b U+2299 uni2299 !320 U+22C0 uni22C0 !321 U+22C1 uni22C1 !322 U+22C2 uni22C2 !323 U+22C3 uni22C3 !327 U+2310 uni2310 !328 U+2320 uni2320 !329 U+2321 uni2321 !32a U+2322 uni2322 !32b U+2323 uni2323 !32c U+2329 uni2329 !32d U+232A uni232A !32e U+239B uni239B !32f U+239C uni239C !330 U+239D uni239D !331 U+239E uni239E !332 U+239F uni239F !333 U+23A0 uni23A0 !334 U+23A1 uni23A1 !335 U+23A2 uni2392 !336 U+23A3 uni23A3 !337 U+23A4 uni23A4 !338 U+23A5 uni23A5 !339 U+23A6 uni23A6 !33a U+23A7 uni23A7 !33b U+23A8 uni23A8 !33c U+23A9 uni23A9 !33d U+23AA uni23AA !33e U+23AB uni23AB !33f U+23AC uni23AC !340 U+23AD uni23AD !341 U+23AE uni23AE !342 U+23AF uni23AF !343 U+23B0 uni23B0 !344 U+23B1 uni23B1 !345 U+23B2 uni23B2 !346 U+23B3 uni23B3 !347 U+23B4 uni23B4 !348 U+23B5 uni23B5 !349 U+23B6 uni23B6 !34a U+23B7 uni23B7 !34b U+23B8 uni23B8 !34c U+23B9 uni23B9 !356 U+25A0 uni25A0 !357 U+25A1 uni25A1 !358 U+25AA uni25AA !359 U+25AB uni25AB !35b U+25B2 uni25B2 !35c U+25B3 uni25B3 !35d U+25BC uni25BC !35e U+25BD uni25BD !35a U+25C6 uni25C6 !35f U+25CA uni25CA !360 U+25CB uni25CB !361 U+25CF uni25CF !364 U+25E6 uni25E6 !362 U+25FB uni25FB !363 U+25FC uni25FC !365 U+2609 uni2609 gnuplot-4.6.4/term/PostScript/cp852.ps0000644000471100001440000000407610713657504014436 0ustar % % encoding for code page 852 (MSDOS Central European) /reencodeCP852 { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall currentdict /CharStrings known { CharStrings /Idieresis known { /Encoding CP852Encoding def } if } if currentdict end definefont } def /CP852Encoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/paragraph/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash /zero/one/two/three/four/five/six/seven/eight/nine /colon/semicolon/less/equal/greater/question /at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z /bracketleft/backslash/bracketright/asciicircum/underscore /grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w /x/y/z/braceleft/bar/braceright/asciitilde/.notdef /Ccedilla/udieresis/eacute/acircumflex/adieresis/uring/cacute/ccedilla /lslash/edieresis/Ohungarumlaut/ohungarumlaut/icircumflex/Zacute/Adieresis /Cacute/Eacute/Lacute/lacute/ocircumflex/odieresis/Lcaron/lcaron/Sacute /sacute/Odieresis/Udieresis/Tcaron/tcaron/Lslash/multiply/ccaron /aacute/iacute/oacute/uacute/Aogonek/aogonek/Zcaron/zcaron /Eogonek/eogonek/.notdef/zacute/Ccaron/scedilla/guillemotleft/guillemotright /.notdef/.notdef/.notdef/.notdef/.notdef/Aacute/Acircumflex/Ecaron /Scedilla/.notdef/.notdef/.notdef/.notdef/Zdotaccent/zdotaccent/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/Abreve/abreve /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/currency /eth/Eth/Dcaron/Edieresis/dcaron/Ncaron/Iacute/Icircumflex /ecaron/.notdef/.notdef/.notdef/.notdef/Tcedilla/Uring/.notdef /Oacute/germandbls/Ocircumflex/Nacute/nacute/ncaron/Scaron/scaron /Racute/Uacute/racute/Uhungarumlaut/yacute/Yacute/tcedilla/acute /hyphen/hungarumlaut/ogonek/caron/breve/section/divide/cedilla /degree/dieresis/dotaccent/uhungarumlaut/Rcaron/rcaron/.notdef/.notdef ] def gnuplot-4.6.4/term/PostScript/utf-8.ps0000644000471100001440000000533010715653157014534 0ustar % % Base ISO8859-1 character encoding plus support macros for UTF-8 encoding % via the glyphshow operator % /reencodeISO { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall currentdict /CharStrings known { CharStrings /Idieresis known { /Encoding ISOLatin1Encoding def } if } if currentdict end definefont } def /ISOLatin1Encoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve /dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut /ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar /section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior /acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine /guillemotright/onequarter/onehalf/threequarters/questiondown /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute /Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis /aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave /iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex /otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis /yacute/thorn/ydieresis ] def /Gshow { dup type /stringtype eq { show } { glyphshow } ifelse } def /Gsall { {Gshow} forall } def /Gwidth { dup currentpoint pop exch gsave 6 array currentmatrix nulldevice setmatrix Gsall currentpoint pop grestore sub } def /GLshow {currentpoint stroke M 0 vshift R Blacktext {gsave 0 setgray Gsall grestore} {Gsall} ifelse} def /GRshow {currentpoint stroke M dup Gwidth vshift R Blacktext {gsave 0 setgray Gsall grestore} {Gsall} ifelse} def /GCshow {currentpoint stroke M dup Gwidth 2 div vshift R Blacktext {gsave 0 setgray Gsall grestore} {Gsall} ifelse} def gnuplot-4.6.4/term/PostScript/cp850.ps0000644000471100001440000000443710713657504014435 0ustar % % encoding for code page 850 (obsolete MSDOS Western Europe) % version 1.0: - Mainly letters are mapped. The following positions % (JFi) are left blank (undefined): % -- first 32 positions, % -- frame characters, % -- a few special characters. /reencodeCP850 { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall currentdict /CharStrings known { CharStrings /Idieresis known { /Encoding CP850Encoding def } if } if currentdict end definefont } def /CP850Encoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/.notdef /Ccedilla/udieresis/eacute/acircumflex/adieresis/agrave/aring/ccedilla /ecircumflex/edieresis/egrave/idieresis/icircumflex/igrave/Adieresis/Aring /Eacute/ae/AE/ocircumflex/odieresis/ograve/ucircumflex/ugrave /ydieresis/Odieresis/Udieresis/oslash/sterling/Oslash/multiply/florin /aacute/iacute/oacute/uacute/ntilde/Ntilde/ordfeminine/ordmasculine /questiondown/registered/logicalnot/onehalf/onequarter/exclamdown/guillemotleft/guillemotright /space/space/.notdef/.notdef/.notdef/Aacute/Acircumflex/Agrave /.notdef/.notdef/.notdef/.notdef/.notdef/cent/yen/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/atilde/Atilde /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/currency /eth/Eth/Ecircumflex/Edieresis/Egrave/dotlessi/Iacute/Icircumflex /Idieresis/.notdef/.notdef/.notdef/.notdef/brokenbar/Igrave/.notdef /Oacute/germandbls/Ocircumflex/Ograve/otilde/Otilde/mu/thorn /Thorn/Uacute/Ucircumflex/Ugrave/yacute/Yacute/macron/acute /hyphen/plusminus/equal/threequarters/paragraph/section/divide/.notdef /degree/.notdef/periodcentered/onesuperior/threesuperior/twosuperior/.notdef/.notdef ] def gnuplot-4.6.4/term/PostScript/cp1250.ps0000644000471100001440000000421311200204773014464 0ustar % % Encoding for code page 1250 (Microsoft Windows Central and Eastern European) % /reencodeCP1250 { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall currentdict /CharStrings known { CharStrings /Idieresis known { /Encoding CP1250Encoding def } if } if currentdict end definefont } def /CP1250Encoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash/zero/one /two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater /question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z /bracketleft/backslash/bracketright/asciicircum/underscore/quoteleft /a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar /braceright/tilde/.notdef/.notdef/.notdef/quotesinglbase/.notdef/quotedblbase /ellipsis/dagger/daggerdbl/.notdef/perthousand/Scaron/guilsinglleft/Sacute /Tcaron/Zcaron/Zacute/.notdef/quoteleft/quoteright/quotedblleft /quotedblright/bullet/endash/emdash/.notdef/trademark/scaron /guilsinglright/sacute/tcaron/zcaron/zacute/space/caron/breve/Lslash /currency/Aogonek/brokenbar/section/dieresis/copyright/Scedilla /guillemotleft/logicalnot/hyphen/registered/Zdotaccent /degree/plusminus/ogonek/lslash/acute/mu/paragraph/bullet /cedilla/aogonek/scedilla/guillemotright/Lcaron/hungarumlaut/lcaron /zdotaccent/Racute/Aacute/Acircumflex/Abreve/Adieresis/Lacute/Cacute /Ccedilla/Ccaron/Eacute/Eogonek/Edieresis/Ecaron/Iacute/Icircumflex /Dcaron/Eth/Nacute/Ncaron/Oacute/Ocircumflex/Ohungarumlaut/Odieresis /multiply/Rcaron/Uring/Uacute/Uhungarumlaut/Udieresis/Yacute/Tcedilla /germandbls/racute/aacute/acircumflex/abreve/adieresis/lacute/cacute /ccedilla/ccaron/eacute/eogonek/edieresis/ecaron/iacute/icircumflex /dcaron/dbar/nacute/ncaron/oacute/ocircumflex/ohungarumlaut/odieresis /divide/rcaron/uring/uacute/uhungarumlaut/udieresis/yacute/tcedilla/dotaccent ] def gnuplot-4.6.4/term/PostScript/cp1251.ps0000644000471100001440000000535011453006331014470 0ustar % % encoding for code page cp1251 (8-bit Russian) % version 1.0: - Mainly letters are mapped. The following positions % (JFi) are left blank (undefined): % -- first 32 positions, % -- frame characters, % -- a few special characters. /reencodeCP1251 { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall currentdict /CharStrings known { CharStrings /Idieresis known { /Encoding CP1251Encoding def } if } if currentdict end definefont } def /CP1251Encoding [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /afii10051 /afii10052 /quotesinglbase /afii10100 /quotedblbase /ellipsis /dagger /daggerdbl /Euro /perthousand /afii10058 /guilsinglleft /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /.notdef /trademark /afii10106 /guilsinglright /afii10107 /afii10109 /afii10108 /afii10193 /space /afii10062 /afii10110 /afii10057 /currency /afii10050 /brokenbar /section /afii10023 /copyright /afii10053 /guillemotleft /logicalnot /hyphen /registered /afii10056 /degree /plusminus /afii10055 /afii10103 /afii10098 /mu /paragraph /periodcentered /afii10071 /afii61352 /afii10101 /guillemotright /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097 ] def gnuplot-4.6.4/term/PostScript/prologues.h0000644000471100001440000013516711663102023015411 0ustar /* This script-generated file contains the PostScript prologues * in a form suitable to inclusion in a C source code */ static const char *prologue_8859_1_ps[] = { "%\n", "% Encoding for ISO-8859-1 (also called Latin1)\n", "%\n", "/reencodeISO {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "currentdict /CharStrings known {\n", "\tCharStrings /Idieresis known {\n", "\t\t/Encoding ISOLatin1Encoding def } if\n", "} if\n", "currentdict end definefont\n", "} def\n", "/ISOLatin1Encoding [\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n", "/parenleft/parenright/asterisk/plus/comma/minus/period/slash\n", "/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n", "/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N\n", "/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n", "/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n", "/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve\n", "/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut\n", "/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar\n", "/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot\n", "/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior\n", "/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine\n", "/guillemotright/onequarter/onehalf/threequarters/questiondown\n", "/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla\n", "/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex\n", "/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis\n", "/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute\n", "/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis\n", "/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave\n", "/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex\n", "/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis\n", "/yacute/thorn/ydieresis\n", "] def\n", NULL }; static const char *prologue_8859_15_ps[] = { "%\n", "% Encoding for ISO-8859-15 (also called Latin9)\n", "%\n", "/reencodeISO15 {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "currentdict /CharStrings known {\n", "\tCharStrings /Idieresis known {\n", "\t\t/Encoding ISOLatin15Encoding def } if\n", "} if\n", "currentdict end definefont\n", "} def\n", "/ISOLatin15Encoding [\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n", "/parenleft/parenright/asterisk/plus/comma/minus/period/slash\n", "/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n", "/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N\n", "/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n", "/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n", "/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve\n", "/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut\n", "/ogonek/caron/space/exclamdown/cent/sterling/Euro/yen/Scaron\n", "/section/scaron/copyright/ordfeminine/guillemotleft/logicalnot\n", "/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior\n", "/Zcaron/mu/paragraph/periodcentered/zcaron/onesuperior/ordmasculine\n", "/guillemotright/OE/oe/Ydieresis/questiondown\n", "/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla\n", "/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex\n", "/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis\n", "/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute\n", "/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis\n", "/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave\n", "/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex\n", "/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis\n", "/yacute/thorn/ydieresis\n", "] def\n", NULL }; static const char *prologue_8859_2_ps[] = { "%\n", "% Encoding for ISO-8859-2 (also called Latin2), with\n", "% minor differences to \"true\" ISO-8859-2 (*commaaccent \n", "% instead of *cedilla for sStT -> incorrect in ISO-8859-2,\n", "% the standard will probably be modified in this respect)\n", "% Levente Novak \n", "\n", "/reencodeISO2 {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "currentdict /CharStrings known {\n", "\tCharStrings /Idieresis known {\n", "\t\t/Encoding ISOLatin2Encoding def } if\n", "} if\n", "currentdict end definefont\n", "} def\n", "/ISOLatin2Encoding [\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n", "/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash\n", "/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n", "/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M\n", "/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n", "/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n", "/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/nbspace/Aogonek/breve/Lslash/currency/Lcaron/Sacute/section\n", "/dieresis/Scaron/Scommaaccent/Tcaron/Zacute/hyphen/Zcaron/Zdotaccent\n", "/degree/aogonek/ogonek/lslash/acute/lcaron/sacute/caron/cedilla\n", "/scaron/scommaaccent/tcaron/zacute/hungarumlaut/zcaron/zdotaccent\n", "/Racute/Aacute/Acircumflex/Abreve/Adieresis/Lacute/Cacute/Ccedilla\n", "/Ccaron/Eacute/Eogonek/Edieresis/Ecaron/Iacute/Icircumflex/Dcaron\n", "/Dcroat/Nacute/Ncaron/Oacute/Ocircumflex/Ohungarumlaut/Odieresis\n", "/multiply/Rcaron/Uring/Uacute/Uhungarumlaut/Udieresis/Yacute\n", "/Tcommaaccent/germandbls/racute/aacute/acircumflex/abreve/adieresis\n", "/lacute/cacute/ccedilla/ccaron/eacute/eogonek/edieresis/ecaron\n", "/iacute/icircumflex/dcaron/dcroat/nacute/ncaron/oacute/ocircumflex\n", "/ohungarumlaut/odieresis/divide/rcaron/uring/uacute/uhungarumlaut\n", "/udieresis/yacute/tcommaaccent/dotaccent\n", "] def\n", NULL }; static const char *prologue_8859_9_ps[] = { "%\n", "% Encoding for ISO_8859_9 (also called Latin5)\n", "% Plus code points 80-9F used in Codepage 1254\n", "%\n", "/reencodeISO9 {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "currentdict /CharStrings known {\n", "\tCharStrings /Idieresis known {\n", "\t\t/Encoding ISOLatin5Encoding def } if\n", "} if\n", "currentdict end definefont\n", "} def\n", "/ISOLatin5Encoding [\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n", "/parenleft/parenright/asterisk/plus/comma/minus/period/slash\n", "/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n", "/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N\n", "/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n", "/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n", "/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde\n", "/Euro/.notdef/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl\n", "/circumflex/perthousand/Scaron/guilsinglleft/OE/.notdef/.notdef/.notdef\n", "/.notdef/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash\n", "/tilde/trademark/scaron/guilsinglright/oe/.notdef/.notdef/Ydieresis\n", "/.notdef/space/exclamdown/cent/sterling/currency/yen/brokenbar\n", "/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot\n", "/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior\n", "/acute/mu/paragraph/bullet/cedilla/onesuperior/ordmasculine\n", "/guillemotright/onequarter/onehalf/threequarters/questiondown\n", "/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla\n", "/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex\n", "/Idieresis/Gbreve/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis\n", "/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Idotaccent\n", "/Scedilla/germandbls/agrave/aacute/acircumflex/atilde/adieresis\n", "/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave\n", "/iacute/icircumflex/idieresis/gbreve/ntilde/ograve/oacute/ocircumflex\n", "/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis\n", "/dotlessi/scedilla/ydieresis\n", "] def\n", NULL }; static const char *prologue_cp1250_ps[] = { "%\n", "% Encoding for code page 1250 (Microsoft Windows Central and Eastern European)\n", "%\n", "/reencodeCP1250 {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "currentdict /CharStrings known {\n", "\tCharStrings /Idieresis known {\n", "\t\t/Encoding CP1250Encoding def } if\n", "} if\n", "currentdict end definefont\n", "} def\n", "/CP1250Encoding [\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n", "/parenleft/parenright/asterisk/plus/comma/minus/period/slash/zero/one\n", "/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater\n", "/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z\n", "/bracketleft/backslash/bracketright/asciicircum/underscore/quoteleft\n", "/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar\n", "/braceright/tilde/.notdef/.notdef/.notdef/quotesinglbase/.notdef/quotedblbase\n", "/ellipsis/dagger/daggerdbl/.notdef/perthousand/Scaron/guilsinglleft/Sacute\n", "/Tcaron/Zcaron/Zacute/.notdef/quoteleft/quoteright/quotedblleft\n", "/quotedblright/bullet/endash/emdash/.notdef/trademark/scaron\n", "/guilsinglright/sacute/tcaron/zcaron/zacute/space/caron/breve/Lslash\n", "/currency/Aogonek/brokenbar/section/dieresis/copyright/Scedilla\n", "/guillemotleft/logicalnot/hyphen/registered/Zdotaccent\n", "/degree/plusminus/ogonek/lslash/acute/mu/paragraph/bullet\n", "/cedilla/aogonek/scedilla/guillemotright/Lcaron/hungarumlaut/lcaron\n", "/zdotaccent/Racute/Aacute/Acircumflex/Abreve/Adieresis/Lacute/Cacute\n", "/Ccedilla/Ccaron/Eacute/Eogonek/Edieresis/Ecaron/Iacute/Icircumflex\n", "/Dcaron/Eth/Nacute/Ncaron/Oacute/Ocircumflex/Ohungarumlaut/Odieresis\n", "/multiply/Rcaron/Uring/Uacute/Uhungarumlaut/Udieresis/Yacute/Tcedilla\n", "/germandbls/racute/aacute/acircumflex/abreve/adieresis/lacute/cacute\n", "/ccedilla/ccaron/eacute/eogonek/edieresis/ecaron/iacute/icircumflex\n", "/dcaron/dbar/nacute/ncaron/oacute/ocircumflex/ohungarumlaut/odieresis\n", "/divide/rcaron/uring/uacute/uhungarumlaut/udieresis/yacute/tcedilla/dotaccent\n", "] def\n", NULL }; static const char *prologue_cp1251_ps[] = { "%\n", "% encoding for code page cp1251 (8-bit Russian)\n", "% version 1.0: - Mainly letters are mapped. The following positions\n", "% (JFi) are left blank (undefined):\n", "% -- first 32 positions,\n", "% -- frame characters,\n", "% -- a few special characters.\n", "\n", "/reencodeCP1251 {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "currentdict /CharStrings known {\n", "CharStrings /Idieresis known {\n", "/Encoding CP1251Encoding def } if\n", "} if\n", "currentdict end definefont\n", "} def\n", "/CP1251Encoding [\n", "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n", "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n", "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n", "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n", "/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle\n", "/parenleft /parenright /asterisk /plus /comma /minus /period /slash\n", "/zero /one /two /three /four /five /six /seven\n", "/eight /nine /colon /semicolon /less /equal /greater /question\n", "/at /A /B /C /D /E /F /G\n", "/H /I /J /K /L /M /N /O\n", "/P /Q /R /S /T /U /V /W\n", "/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore\n", "/grave /a /b /c /d /e /f /g\n", "/h /i /j /k /l /m /n /o\n", "/p /q /r /s /t /u /v /w\n", "/x /y /z /braceleft /bar /braceright /asciitilde /.notdef\n", "/afii10051 /afii10052 /quotesinglbase /afii10100 /quotedblbase /ellipsis /dagger /daggerdbl\n", "/Euro /perthousand /afii10058 /guilsinglleft /afii10059 /afii10061 /afii10060 /afii10145\n", "/afii10099 /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash\n", "/.notdef /trademark /afii10106 /guilsinglright /afii10107 /afii10109 /afii10108 /afii10193\n", "/space /afii10062 /afii10110 /afii10057 /currency /afii10050 /brokenbar /section\n", "/afii10023 /copyright /afii10053 /guillemotleft /logicalnot /hyphen /registered /afii10056\n", "/degree /plusminus /afii10055 /afii10103 /afii10098 /mu /paragraph /periodcentered\n", "/afii10071 /afii61352 /afii10101 /guillemotright /afii10105 /afii10054 /afii10102 /afii10104\n", "/afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025\n", "/afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033\n", "/afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041\n", "/afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049\n", "/afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073\n", "/afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081\n", "/afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089\n", "/afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097\n", "] def\n", "\n", NULL }; static const char *prologue_cp437_ps[] = { "%\n", "% encoding for code page 437 (original MSDOS)\n", "% version 1.0:\t- Mainly letters are mapped. The following positions\n", "% (JFi)\t\t are left blank (undefined):\n", "%\t\t-- first 32 positions,\n", "%\t\t-- frame characters,\n", "%\t\t-- greek characters,\n", "%\t\t-- some more special characters.\n", "%\n", "% version 1.1: - added some more special characters\n", "\n", "/reencodeCP437 {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "currentdict /CharStrings known {\n", "\tCharStrings /Idieresis known {\n", "\t\t/Encoding CP437Encoding def } if\n", "} if\n", "currentdict end definefont\n", "} def\n", "/CP437Encoding [\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n", "/parenleft/parenright/asterisk/plus/comma/minus/period/slash\n", "/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n", "/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N\n", "/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n", "/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n", "/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/.notdef\n", "/Ccedilla/udieresis/eacute/acircumflex/adieresis/agrave/aring/ccedilla\n", "/ecircumflex/edieresis/egrave/idieresis/icircumflex/igrave/Adieresis/Aring\n", "/Eacute/ae/AE/ocircumflex/odieresis/ograve/ucircumflex/ugrave\n", "/ydieresis/Odieresis/Udieresis/cent/sterling/yen/.notdef/florin\n", "/aacute/iacute/oacute/uacute/ntilde/Ntilde/ordfeminine/ordmasculine\n", "/questiondown/.notdef/logicalnot/onehalf/onequarter/exclamdown/guillemotleft/guillemotright\n", "/space/space/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/germandbls/.notdef/.notdef/.notdef/.notdef/mu/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/infinity/.notdef/.notdef/.notdef\n", "/.notdef/plusminus/greaterequal/lessequal/.notdef/.notdef/divide/.notdef\n", "/degree/bullet/periodcentered/.notdef/nsuperior/twosuperior/.notdef/.notdef\n", "] def\n", NULL }; static const char *prologue_cp850_ps[] = { "%\n", "% encoding for code page 850 (obsolete MSDOS Western Europe)\n", "% version 1.0: - Mainly letters are mapped. The following positions\n", "% (JFi)\t\t are left blank (undefined):\n", "%\t\t-- first 32 positions,\n", "%\t\t-- frame characters,\n", "%\t\t-- a few special characters.\n", "\n", "/reencodeCP850 {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "currentdict /CharStrings known {\n", "\tCharStrings /Idieresis known {\n", "\t\t/Encoding CP850Encoding def } if\n", "} if\n", "currentdict end definefont\n", "} def\n", "/CP850Encoding [\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n", "/parenleft/parenright/asterisk/plus/comma/minus/period/slash\n", "/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n", "/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N\n", "/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n", "/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n", "/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/.notdef\n", "/Ccedilla/udieresis/eacute/acircumflex/adieresis/agrave/aring/ccedilla\n", "/ecircumflex/edieresis/egrave/idieresis/icircumflex/igrave/Adieresis/Aring\n", "/Eacute/ae/AE/ocircumflex/odieresis/ograve/ucircumflex/ugrave\n", "/ydieresis/Odieresis/Udieresis/oslash/sterling/Oslash/multiply/florin\n", "/aacute/iacute/oacute/uacute/ntilde/Ntilde/ordfeminine/ordmasculine\n", "/questiondown/registered/logicalnot/onehalf/onequarter/exclamdown/guillemotleft/guillemotright\n", "/space/space/.notdef/.notdef/.notdef/Aacute/Acircumflex/Agrave\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/cent/yen/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/atilde/Atilde\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/currency\n", "/eth/Eth/Ecircumflex/Edieresis/Egrave/dotlessi/Iacute/Icircumflex\n", "/Idieresis/.notdef/.notdef/.notdef/.notdef/brokenbar/Igrave/.notdef\n", "/Oacute/germandbls/Ocircumflex/Ograve/otilde/Otilde/mu/thorn\n", "/Thorn/Uacute/Ucircumflex/Ugrave/yacute/Yacute/macron/acute\n", "/hyphen/plusminus/equal/threequarters/paragraph/section/divide/.notdef\n", "/degree/.notdef/periodcentered/onesuperior/threesuperior/twosuperior/.notdef/.notdef\n", "] def\n", NULL }; static const char *prologue_cp852_ps[] = { "%\n", "% encoding for code page 852 (MSDOS Central European)\n", "/reencodeCP852 {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "currentdict /CharStrings known {\n", "\tCharStrings /Idieresis known {\n", "\t\t/Encoding CP852Encoding def } if\n", "} if\n", "currentdict end definefont\n", "} def\n", "/CP852Encoding [\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/paragraph/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle\n", "/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash\n", "/zero/one/two/three/four/five/six/seven/eight/nine\n", "/colon/semicolon/less/equal/greater/question\n", "/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z\n", "/bracketleft/backslash/bracketright/asciicircum/underscore\n", "/grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w\n", "/x/y/z/braceleft/bar/braceright/asciitilde/.notdef\n", "/Ccedilla/udieresis/eacute/acircumflex/adieresis/uring/cacute/ccedilla\n", "/lslash/edieresis/Ohungarumlaut/ohungarumlaut/icircumflex/Zacute/Adieresis\n", "/Cacute/Eacute/Lacute/lacute/ocircumflex/odieresis/Lcaron/lcaron/Sacute\n", "/sacute/Odieresis/Udieresis/Tcaron/tcaron/Lslash/multiply/ccaron\n", "/aacute/iacute/oacute/uacute/Aogonek/aogonek/Zcaron/zcaron\n", "/Eogonek/eogonek/.notdef/zacute/Ccaron/scedilla/guillemotleft/guillemotright\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/Aacute/Acircumflex/Ecaron\n", "/Scedilla/.notdef/.notdef/.notdef/.notdef/Zdotaccent/zdotaccent/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/Abreve/abreve\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/currency\n", "/eth/Eth/Dcaron/Edieresis/dcaron/Ncaron/Iacute/Icircumflex\n", "/ecaron/.notdef/.notdef/.notdef/.notdef/Tcedilla/Uring/.notdef\n", "/Oacute/germandbls/Ocircumflex/Nacute/nacute/ncaron/Scaron/scaron\n", "/Racute/Uacute/racute/Uhungarumlaut/yacute/Yacute/tcedilla/acute\n", "/hyphen/hungarumlaut/ogonek/caron/breve/section/divide/cedilla\n", "/degree/dieresis/dotaccent/uhungarumlaut/Rcaron/rcaron/.notdef/.notdef\n", "] def\n", NULL }; static const char *prologue_koi8r_ps[] = { "%\n", "% encoding for code page koi8r (8-bit Russian)\n", "% version 1.0:\t- Mainly letters are mapped. The following positions\n", "% (JFi)\t\t are left blank (undefined):\n", "%\t\t-- first 32 positions,\n", "%\t\t-- frame characters,\n", "%\t\t-- a few special characters.\n", "\n", "/reencodeKOI8R {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "currentdict /CharStrings known {\n", "\tCharStrings /Idieresis known {\n", "\t\t/Encoding KOI8REncoding def } if\n", "} if\n", "currentdict end definefont\n", "} def\n", "/KOI8REncoding [\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n", "/parenleft/parenright/asterisk/plus/comma/minus/period/slash\n", "/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n", "/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N\n", "/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n", "/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n", "/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/.notdef\n", "/SF100000/SF110000/SF010000/SF030000/SF020000/SF040000/SF080000/SF090000\n", "/SF060000/SF070000/SF050000/SF600000/SF570000/SF610000/SF580000/SF590000\n", "/SF140000/SF150000/SF160000/SS260000/filledbox/bullet/radical/approxequal\n", "/lessequal/greaterequal/space/SS270000/degree/twosuperior/periodcentered/divide\n", "/SF430000/SF240000/SF510000/afii10071/SF520000/SF390000/SF220000/SF210000\n", "/SF250000/SF500000/SF490000/SF380000/SF280000/SF270000/SF260000/SF360000\n", "/SF370000/SF420000/SF190000/afii10023/SF200000/SF230000/SF470000/SF480000\n", "/SF410000/SF450000/SF460000/SF400000/SF540000/SF530000/SF440000/copyright\n", "/afii10096/afii10065/afii10066/afii10088/afii10069/afii10070/afii10086/afii10068\n", "/afii10087/afii10074/afii10075/afii10076/afii10077/afii10078/afii10079/afii10080\n", "/afii10081/afii10097/afii10082/afii10083/afii10084/afii10085/afii10072/afii10067\n", "/afii10094/afii10093/afii10073/afii10090/afii10095/afii10091/afii10089/afii10092\n", "/afii10048/afii10017/afii10018/afii10040/afii10021/afii10022/afii10038/afii10020\n", "/afii10039/afii10026/afii10027/afii10028/afii10029/afii10030/afii10031/afii10032\n", "/afii10033/afii10049/afii10034/afii10035/afii10036/afii10037/afii10024/afii10019\n", "/afii10046/afii10045/afii10025/afii10042/afii10047/afii10043/afii10041/afii10044\n", "] def\n", NULL }; static const char *prologue_koi8u_ps[] = { "%\n", "% encoding for code page koi8r (8-bit Ukrainian)\n", "/reencodeKOI8U {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "currentdict /CharStrings known {\n", "\tCharStrings /Idieresis known {\n", "\t\t/Encoding KOI8UEncoding def } if\n", "} if\n", "currentdict end definefont\n", "} def\n", "/KOI8UEncoding [\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n", "/parenleft/parenright/asterisk/plus/comma/minus/period/slash\n", "/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n", "/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N\n", "/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n", "/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n", "/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/.notdef\n", "/SF100000/SF110000/SF010000/SF030000/SF020000/SF040000/SF080000/SF090000\n", "/SF060000/SF070000/SF050000/SF600000/SF570000/SF610000/SF580000/SF590000\n", "/SF140000/SF150000/SF160000/SS260000/filledbox/bullet/radical/approxequal\n", "/lessequal/greaterequal/space/SS270000/degree/twosuperior/periodcentered/divide\n", "/SF430000/SF240000/SF510000/afii10071/afii10101/SF390000/afii10103/afii10104\n", "/SF250000/SF500000/SF490000/SF380000/SF280000/afii10098/SF260000/SF360000\n", "/SF370000/SF420000/SF190000/afii10023/afii10053/SF230000/afii10055/afii10056\n", "/SF410000/SF450000/SF460000/SF400000/SF540000/afii10050/SF440000/copyright\n", "/afii10096/afii10065/afii10066/afii10088/afii10069/afii10070/afii10086/afii10068\n", "/afii10087/afii10074/afii10075/afii10076/afii10077/afii10078/afii10079/afii10080\n", "/afii10081/afii10097/afii10082/afii10083/afii10084/afii10085/afii10072/afii10067\n", "/afii10094/afii10093/afii10073/afii10090/afii10095/afii10091/afii10089/afii10092\n", "/afii10048/afii10017/afii10018/afii10040/afii10021/afii10022/afii10038/afii10020\n", "/afii10039/afii10026/afii10027/afii10028/afii10029/afii10030/afii10031/afii10032\n", "/afii10033/afii10049/afii10034/afii10035/afii10036/afii10037/afii10024/afii10019\n", "/afii10046/afii10045/afii10025/afii10042/afii10047/afii10043/afii10041/afii10044\n", "] def\n", NULL }; static const char *prologue_prologue_ps[] = { "%\n", "% Gnuplot Prolog Version 4.6 (November 2011)\n", "%\n", "%/SuppressPDFMark true def\n", "%\n", "/M {moveto} bind def\n", "/L {lineto} bind def\n", "/R {rmoveto} bind def\n", "/V {rlineto} bind def\n", "/N {newpath moveto} bind def\n", "/Z {closepath} bind def\n", "/C {setrgbcolor} bind def\n", "/f {rlineto fill} bind def\n", "/g {setgray} bind def\n", "/Gshow {show} def % May be redefined later in the file to support UTF-8\n", "/vpt2 vpt 2 mul def\n", "/hpt2 hpt 2 mul def\n", "/Lshow {currentpoint stroke M 0 vshift R \n", "\tBlacktext {gsave 0 setgray show grestore} {show} ifelse} def\n", "/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R\n", "\tBlacktext {gsave 0 setgray show grestore} {show} ifelse} def\n", "/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R \n", "\tBlacktext {gsave 0 setgray show grestore} {show} ifelse} def\n", "/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def\n", " /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def\n", "/DL {Color {setrgbcolor Solid {pop []} if 0 setdash}\n", " {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def\n", "/BL {stroke userlinewidth 2 mul setlinewidth\n", "\tRounded {1 setlinejoin 1 setlinecap} if} def\n", "/AL {stroke userlinewidth 2 div setlinewidth\n", "\tRounded {1 setlinejoin 1 setlinecap} if} def\n", "/UL {dup gnulinewidth mul /userlinewidth exch def\n", "\tdup 1 lt {pop 1} if 10 mul /udl exch def} def\n", "/PL {stroke userlinewidth setlinewidth\n", "\tRounded {1 setlinejoin 1 setlinecap} if} def\n", "3.8 setmiterlimit\n", "% Default Line colors\n", "/LCw {1 1 1} def\n", "/LCb {0 0 0} def\n", "/LCa {0 0 0} def\n", "/LC0 {1 0 0} def\n", "/LC1 {0 1 0} def\n", "/LC2 {0 0 1} def\n", "/LC3 {1 0 1} def\n", "/LC4 {0 1 1} def\n", "/LC5 {1 1 0} def\n", "/LC6 {0 0 0} def\n", "/LC7 {1 0.3 0} def\n", "/LC8 {0.5 0.5 0.5} def\n", "% Default Line Types\n", "/LTw {PL [] 1 setgray} def\n", "/LTb {BL [] LCb DL} def\n", "/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def\n", "/LT0 {PL [] LC0 DL} def\n", "/LT1 {PL [4 dl1 2 dl2] LC1 DL} def\n", "/LT2 {PL [2 dl1 3 dl2] LC2 DL} def\n", "/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def\n", "/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def\n", "/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def\n", "/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def\n", "/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def\n", "/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def\n", "/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def\n", "/Dia {stroke [] 0 setdash 2 copy vpt add M\n", " hpt neg vpt neg V hpt vpt neg V\n", " hpt vpt V hpt neg vpt V closepath stroke\n", " Pnt} def\n", "/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V\n", " currentpoint stroke M\n", " hpt neg vpt neg R hpt2 0 V stroke\n", " } def\n", "/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M\n", " 0 vpt2 neg V hpt2 0 V 0 vpt2 V\n", " hpt2 neg 0 V closepath stroke\n", " Pnt} def\n", "/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M\n", " hpt2 vpt2 neg V currentpoint stroke M\n", " hpt2 neg 0 R hpt2 vpt2 V stroke} def\n", "/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M\n", " hpt neg vpt -1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt 1.62 mul V closepath stroke\n", " Pnt} def\n", "/Star {2 copy Pls Crs} def\n", "/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M\n", " 0 vpt2 neg V hpt2 0 V 0 vpt2 V\n", " hpt2 neg 0 V closepath fill} def\n", "/TriUF {stroke [] 0 setdash vpt 1.12 mul add M\n", " hpt neg vpt -1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt 1.62 mul V closepath fill} def\n", "/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M\n", " hpt neg vpt 1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt -1.62 mul V closepath stroke\n", " Pnt} def\n", "/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M\n", " hpt neg vpt 1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt -1.62 mul V closepath fill} def\n", "/DiaF {stroke [] 0 setdash vpt add M\n", " hpt neg vpt neg V hpt vpt neg V\n", " hpt vpt V hpt neg vpt V closepath fill} def\n", "/Pent {stroke [] 0 setdash 2 copy gsave\n", " translate 0 hpt M 4 {72 rotate 0 hpt L} repeat\n", " closepath stroke grestore Pnt} def\n", "/PentF {stroke [] 0 setdash gsave\n", " translate 0 hpt M 4 {72 rotate 0 hpt L} repeat\n", " closepath fill grestore} def\n", "/Circle {stroke [] 0 setdash 2 copy\n", " hpt 0 360 arc stroke Pnt} def\n", "/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def\n", "/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def\n", "/C1 {BL [] 0 setdash 2 copy moveto\n", "\t2 copy vpt 0 90 arc closepath fill\n", "\tvpt 0 360 arc closepath} bind def\n", "/C2 {BL [] 0 setdash 2 copy moveto\n", "\t2 copy vpt 90 180 arc closepath fill\n", "\tvpt 0 360 arc closepath} bind def\n", "/C3 {BL [] 0 setdash 2 copy moveto\n", "\t2 copy vpt 0 180 arc closepath fill\n", "\tvpt 0 360 arc closepath} bind def\n", "/C4 {BL [] 0 setdash 2 copy moveto\n", "\t2 copy vpt 180 270 arc closepath fill\n", "\tvpt 0 360 arc closepath} bind def\n", "/C5 {BL [] 0 setdash 2 copy moveto\n", "\t2 copy vpt 0 90 arc\n", "\t2 copy moveto\n", "\t2 copy vpt 180 270 arc closepath fill\n", "\tvpt 0 360 arc} bind def\n", "/C6 {BL [] 0 setdash 2 copy moveto\n", "\t2 copy vpt 90 270 arc closepath fill\n", "\tvpt 0 360 arc closepath} bind def\n", "/C7 {BL [] 0 setdash 2 copy moveto\n", "\t2 copy vpt 0 270 arc closepath fill\n", "\tvpt 0 360 arc closepath} bind def\n", "/C8 {BL [] 0 setdash 2 copy moveto\n", "\t2 copy vpt 270 360 arc closepath fill\n", "\tvpt 0 360 arc closepath} bind def\n", "/C9 {BL [] 0 setdash 2 copy moveto\n", "\t2 copy vpt 270 450 arc closepath fill\n", "\tvpt 0 360 arc closepath} bind def\n", "/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill\n", "\t2 copy moveto\n", "\t2 copy vpt 90 180 arc closepath fill\n", "\tvpt 0 360 arc closepath} bind def\n", "/C11 {BL [] 0 setdash 2 copy moveto\n", "\t2 copy vpt 0 180 arc closepath fill\n", "\t2 copy moveto\n", "\t2 copy vpt 270 360 arc closepath fill\n", "\tvpt 0 360 arc closepath} bind def\n", "/C12 {BL [] 0 setdash 2 copy moveto\n", "\t2 copy vpt 180 360 arc closepath fill\n", "\tvpt 0 360 arc closepath} bind def\n", "/C13 {BL [] 0 setdash 2 copy moveto\n", "\t2 copy vpt 0 90 arc closepath fill\n", "\t2 copy moveto\n", "\t2 copy vpt 180 360 arc closepath fill\n", "\tvpt 0 360 arc closepath} bind def\n", "/C14 {BL [] 0 setdash 2 copy moveto\n", "\t2 copy vpt 90 360 arc closepath fill\n", "\tvpt 0 360 arc} bind def\n", "/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill\n", "\tvpt 0 360 arc closepath} bind def\n", "/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto\n", "\tneg 0 rlineto closepath} bind def\n", "/Square {dup Rec} bind def\n", "/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def\n", "/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def\n", "/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def\n", "/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def\n", "/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def\n", "/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def\n", "/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill\n", "\texch vpt sub exch vpt sub vpt Square fill Bsquare} bind def\n", "/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def\n", "/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill\n", "\t2 copy vpt Square fill Bsquare} bind def\n", "/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def\n", "/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def\n", "/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill\n", "\tBsquare} bind def\n", "/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill\n", "\tBsquare} bind def\n", "/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def\n", "/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill\n", "\t2 copy vpt Square fill Bsquare} bind def\n", "/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill\n", "\t2 copy exch vpt sub exch vpt Square fill Bsquare} bind def\n", "/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def\n", "/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def\n", "/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def\n", "/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def\n", "/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def\n", "/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def\n", "/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def\n", "/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def\n", "/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def\n", "/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def\n", "/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def\n", "/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def\n", "/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def\n", "/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def\n", "/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def\n", "/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def\n", "/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def\n", "/DiaE {stroke [] 0 setdash vpt add M\n", " hpt neg vpt neg V hpt vpt neg V\n", " hpt vpt V hpt neg vpt V closepath stroke} def\n", "/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M\n", " 0 vpt2 neg V hpt2 0 V 0 vpt2 V\n", " hpt2 neg 0 V closepath stroke} def\n", "/TriUE {stroke [] 0 setdash vpt 1.12 mul add M\n", " hpt neg vpt -1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt 1.62 mul V closepath stroke} def\n", "/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M\n", " hpt neg vpt 1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt -1.62 mul V closepath stroke} def\n", "/PentE {stroke [] 0 setdash gsave\n", " translate 0 hpt M 4 {72 rotate 0 hpt L} repeat\n", " closepath stroke grestore} def\n", "/CircE {stroke [] 0 setdash \n", " hpt 0 360 arc stroke} def\n", "/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def\n", "/DiaW {stroke [] 0 setdash vpt add M\n", " hpt neg vpt neg V hpt vpt neg V\n", " hpt vpt V hpt neg vpt V Opaque stroke} def\n", "/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M\n", " 0 vpt2 neg V hpt2 0 V 0 vpt2 V\n", " hpt2 neg 0 V Opaque stroke} def\n", "/TriUW {stroke [] 0 setdash vpt 1.12 mul add M\n", " hpt neg vpt -1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt 1.62 mul V Opaque stroke} def\n", "/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M\n", " hpt neg vpt 1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt -1.62 mul V Opaque stroke} def\n", "/PentW {stroke [] 0 setdash gsave\n", " translate 0 hpt M 4 {72 rotate 0 hpt L} repeat\n", " Opaque stroke grestore} def\n", "/CircW {stroke [] 0 setdash \n", " hpt 0 360 arc Opaque stroke} def\n", "/BoxFill {gsave Rec 1 setgray fill grestore} def\n", "/Density {\n", " /Fillden exch def\n", " currentrgbcolor\n", " /ColB exch def /ColG exch def /ColR exch def\n", " /ColR ColR Fillden mul Fillden sub 1 add def\n", " /ColG ColG Fillden mul Fillden sub 1 add def\n", " /ColB ColB Fillden mul Fillden sub 1 add def\n", " ColR ColG ColB setrgbcolor} def\n", "/BoxColFill {gsave Rec PolyFill} def\n", "/PolyFill {gsave Density fill grestore grestore} def\n", "/h {rlineto rlineto rlineto gsave closepath fill grestore} bind def\n", "%\n", "% PostScript Level 1 Pattern Fill routine for rectangles\n", "% Usage: x y w h s a XX PatternFill\n", "%\tx,y = lower left corner of box to be filled\n", "%\tw,h = width and height of box\n", "%\t a = angle in degrees between lines and x-axis\n", "%\t XX = 0/1 for no/yes cross-hatch\n", "%\n", "/PatternFill {gsave /PFa [ 9 2 roll ] def\n", " PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate\n", " PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec\n", " gsave 1 setgray fill grestore clip\n", " currentlinewidth 0.5 mul setlinewidth\n", " /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def\n", " 0 0 M PFa 5 get rotate PFs -2 div dup translate\n", " 0 1 PFs PFa 4 get div 1 add floor cvi\n", "\t{PFa 4 get mul 0 M 0 PFs V} for\n", " 0 PFa 6 get ne {\n", "\t0 1 PFs PFa 4 get div 1 add floor cvi\n", "\t{PFa 4 get mul 0 2 1 roll M PFs 0 V} for\n", " } if\n", " stroke grestore} def\n", "%\n", "/languagelevel where\n", " {pop languagelevel} {1} ifelse\n", " 2 lt\n", "\t{/InterpretLevel1 true def}\n", "\t{/InterpretLevel1 Level1 def}\n", " ifelse\n", "%\n", "% PostScript level 2 pattern fill definitions\n", "%\n", "/Level2PatternFill {\n", "/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8}\n", "\tbind def\n", "/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def\n", "<< Tile8x8\n", " /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} \n", ">> matrix makepattern\n", "/Pat1 exch def\n", "<< Tile8x8\n", " /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke\n", "\t0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke}\n", ">> matrix makepattern\n", "/Pat2 exch def\n", "<< Tile8x8\n", " /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L\n", "\t8 8 L 8 0 L 0 0 L fill}\n", ">> matrix makepattern\n", "/Pat3 exch def\n", "<< Tile8x8\n", " /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L\n", "\t0 12 M 12 0 L stroke}\n", ">> matrix makepattern\n", "/Pat4 exch def\n", "<< Tile8x8\n", " /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L\n", "\t0 -4 M 12 8 L stroke}\n", ">> matrix makepattern\n", "/Pat5 exch def\n", "<< Tile8x8\n", " /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L\n", "\t0 12 M 8 -4 L 4 12 M 10 0 L stroke}\n", ">> matrix makepattern\n", "/Pat6 exch def\n", "<< Tile8x8\n", " /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L\n", "\t0 -4 M 8 12 L 4 -4 M 10 8 L stroke}\n", ">> matrix makepattern\n", "/Pat7 exch def\n", "<< Tile8x8\n", " /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L\n", "\t12 0 M -4 8 L 12 4 M 0 10 L stroke}\n", ">> matrix makepattern\n", "/Pat8 exch def\n", "<< Tile8x8\n", " /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L\n", "\t-4 0 M 12 8 L -4 4 M 8 10 L stroke}\n", ">> matrix makepattern\n", "/Pat9 exch def\n", "/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def\n", "/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def\n", "/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def\n", "/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def\n", "/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def\n", "/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def\n", "/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def\n", "} def\n", "%\n", "%\n", "%End of PostScript Level 2 code\n", "%\n", "/PatternBgnd {\n", " TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse\n", "} def\n", "%\n", "% Substitute for Level 2 pattern fill codes with\n", "% grayscale if Level 2 support is not selected.\n", "%\n", "/Level1PatternFill {\n", "/Pattern1 {0.250 Density} bind def\n", "/Pattern2 {0.500 Density} bind def\n", "/Pattern3 {0.750 Density} bind def\n", "/Pattern4 {0.125 Density} bind def\n", "/Pattern5 {0.375 Density} bind def\n", "/Pattern6 {0.625 Density} bind def\n", "/Pattern7 {0.875 Density} bind def\n", "} def\n", "%\n", "% Now test for support of Level 2 code\n", "%\n", "Level1 {Level1PatternFill} {Level2PatternFill} ifelse\n", "%\n", "/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont\n", "dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall\n", "currentdict end definefont pop\n", NULL }; static const char *prologue_utf_8_ps[] = { "%\n", "% Base ISO8859-1 character encoding plus support macros for UTF-8 encoding\n", "% via the glyphshow operator\n", "%\n", "/reencodeISO {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "currentdict /CharStrings known {\n", "\tCharStrings /Idieresis known {\n", "\t\t/Encoding ISOLatin1Encoding def } if\n", "} if\n", "currentdict end definefont\n", "} def\n", "/ISOLatin1Encoding [\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n", "/parenleft/parenright/asterisk/plus/comma/minus/period/slash\n", "/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n", "/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N\n", "/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n", "/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n", "/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve\n", "/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut\n", "/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar\n", "/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot\n", "/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior\n", "/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine\n", "/guillemotright/onequarter/onehalf/threequarters/questiondown\n", "/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla\n", "/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex\n", "/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis\n", "/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute\n", "/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis\n", "/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave\n", "/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex\n", "/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis\n", "/yacute/thorn/ydieresis\n", "] def\n", "\n", "/Gshow { dup type /stringtype eq { show } { glyphshow } ifelse } def\n", "\n", "/Gsall { {Gshow} forall } def\n", "/Gwidth {\n", "\tdup currentpoint pop exch\n", "\tgsave 6 array currentmatrix nulldevice setmatrix Gsall currentpoint pop grestore sub\n", "\t} def\n", "/GLshow {currentpoint stroke M 0 vshift R \n", "\tBlacktext {gsave 0 setgray Gsall grestore} {Gsall} ifelse} def\n", "/GRshow {currentpoint stroke M dup Gwidth vshift R\n", "\tBlacktext {gsave 0 setgray Gsall grestore} {Gsall} ifelse} def\n", "/GCshow {currentpoint stroke M dup Gwidth 2 div vshift R \n", "\tBlacktext {gsave 0 setgray Gsall grestore} {Gsall} ifelse} def\n", NULL }; gnuplot-4.6.4/term/PostScript/prologue.ps0000644000471100001440000003331412024401470015410 0ustar % % Gnuplot Prolog Version 4.6 (September 2012) % %/SuppressPDFMark true def % /M {moveto} bind def /L {lineto} bind def /R {rmoveto} bind def /V {rlineto} bind def /N {newpath moveto} bind def /Z {closepath} bind def /C {setrgbcolor} bind def /f {rlineto fill} bind def /g {setgray} bind def /Gshow {show} def % May be redefined later in the file to support UTF-8 /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def /Lshow {currentpoint stroke M 0 vshift R Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /Rshow {currentpoint stroke M dup stringwidth pop neg vshift R Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def /DL {Color {setrgbcolor Solid {pop []} if 0 setdash} {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def /BL {stroke userlinewidth 2 mul setlinewidth Rounded {1 setlinejoin 1 setlinecap} if} def /AL {stroke userlinewidth 2 div setlinewidth Rounded {1 setlinejoin 1 setlinecap} if} def /UL {dup gnulinewidth mul /userlinewidth exch def dup 1 lt {pop 1} if 10 mul /udl exch def} def /PL {stroke userlinewidth setlinewidth Rounded {1 setlinejoin 1 setlinecap} if} def 3.8 setmiterlimit % Default Line colors /LCw {1 1 1} def /LCb {0 0 0} def /LCa {0 0 0} def /LC0 {1 0 0} def /LC1 {0 1 0} def /LC2 {0 0 1} def /LC3 {1 0 1} def /LC4 {0 1 1} def /LC5 {1 1 0} def /LC6 {0 0 0} def /LC7 {1 0.3 0} def /LC8 {0.5 0.5 0.5} def % Default Line Types /LTw {PL [] 1 setgray} def /LTb {BL [] LCb DL} def /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def /LT0 {PL [] LC0 DL} def /LT1 {PL [4 dl1 2 dl2] LC1 DL} def /LT2 {PL [2 dl1 3 dl2] LC2 DL} def /LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def /LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def /LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def /LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def /LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def /LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def /Dia {stroke [] 0 setdash 2 copy vpt add M hpt neg vpt neg V hpt vpt neg V hpt vpt V hpt neg vpt V closepath stroke Pnt} def /Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V currentpoint stroke M hpt neg vpt neg R hpt2 0 V stroke } def /Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M 0 vpt2 neg V hpt2 0 V 0 vpt2 V hpt2 neg 0 V closepath stroke Pnt} def /Crs {stroke [] 0 setdash exch hpt sub exch vpt add M hpt2 vpt2 neg V currentpoint stroke M hpt2 neg 0 R hpt2 vpt2 V stroke} def /TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M hpt neg vpt -1.62 mul V hpt 2 mul 0 V hpt neg vpt 1.62 mul V closepath stroke Pnt} def /Star {2 copy Pls Crs} def /BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M 0 vpt2 neg V hpt2 0 V 0 vpt2 V hpt2 neg 0 V closepath fill} def /TriUF {stroke [] 0 setdash vpt 1.12 mul add M hpt neg vpt -1.62 mul V hpt 2 mul 0 V hpt neg vpt 1.62 mul V closepath fill} def /TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M hpt neg vpt 1.62 mul V hpt 2 mul 0 V hpt neg vpt -1.62 mul V closepath stroke Pnt} def /TriDF {stroke [] 0 setdash vpt 1.12 mul sub M hpt neg vpt 1.62 mul V hpt 2 mul 0 V hpt neg vpt -1.62 mul V closepath fill} def /DiaF {stroke [] 0 setdash vpt add M hpt neg vpt neg V hpt vpt neg V hpt vpt V hpt neg vpt V closepath fill} def /Pent {stroke [] 0 setdash 2 copy gsave translate 0 hpt M 4 {72 rotate 0 hpt L} repeat closepath stroke grestore Pnt} def /PentF {stroke [] 0 setdash gsave translate 0 hpt M 4 {72 rotate 0 hpt L} repeat closepath fill grestore} def /Circle {stroke [] 0 setdash 2 copy hpt 0 360 arc stroke Pnt} def /CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def /C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def /C1 {BL [] 0 setdash 2 copy moveto 2 copy vpt 0 90 arc closepath fill vpt 0 360 arc closepath} bind def /C2 {BL [] 0 setdash 2 copy moveto 2 copy vpt 90 180 arc closepath fill vpt 0 360 arc closepath} bind def /C3 {BL [] 0 setdash 2 copy moveto 2 copy vpt 0 180 arc closepath fill vpt 0 360 arc closepath} bind def /C4 {BL [] 0 setdash 2 copy moveto 2 copy vpt 180 270 arc closepath fill vpt 0 360 arc closepath} bind def /C5 {BL [] 0 setdash 2 copy moveto 2 copy vpt 0 90 arc 2 copy moveto 2 copy vpt 180 270 arc closepath fill vpt 0 360 arc} bind def /C6 {BL [] 0 setdash 2 copy moveto 2 copy vpt 90 270 arc closepath fill vpt 0 360 arc closepath} bind def /C7 {BL [] 0 setdash 2 copy moveto 2 copy vpt 0 270 arc closepath fill vpt 0 360 arc closepath} bind def /C8 {BL [] 0 setdash 2 copy moveto 2 copy vpt 270 360 arc closepath fill vpt 0 360 arc closepath} bind def /C9 {BL [] 0 setdash 2 copy moveto 2 copy vpt 270 450 arc closepath fill vpt 0 360 arc closepath} bind def /C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill 2 copy moveto 2 copy vpt 90 180 arc closepath fill vpt 0 360 arc closepath} bind def /C11 {BL [] 0 setdash 2 copy moveto 2 copy vpt 0 180 arc closepath fill 2 copy moveto 2 copy vpt 270 360 arc closepath fill vpt 0 360 arc closepath} bind def /C12 {BL [] 0 setdash 2 copy moveto 2 copy vpt 180 360 arc closepath fill vpt 0 360 arc closepath} bind def /C13 {BL [] 0 setdash 2 copy moveto 2 copy vpt 0 90 arc closepath fill 2 copy moveto 2 copy vpt 180 360 arc closepath fill vpt 0 360 arc closepath} bind def /C14 {BL [] 0 setdash 2 copy moveto 2 copy vpt 90 360 arc closepath fill vpt 0 360 arc} bind def /C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill vpt 0 360 arc closepath} bind def /Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath} bind def /Square {dup Rec} bind def /Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def /S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def /S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def /S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def /S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def /S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def /S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def /S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def /S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill 2 copy vpt Square fill Bsquare} bind def /S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def /S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def /S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def /S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def /S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def /S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill 2 copy vpt Square fill Bsquare} bind def /S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def /S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def /D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def /D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def /D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def /D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def /D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def /D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def /D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def /D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def /D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def /D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def /D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def /D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def /D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def /D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def /D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def /D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def /DiaE {stroke [] 0 setdash vpt add M hpt neg vpt neg V hpt vpt neg V hpt vpt V hpt neg vpt V closepath stroke} def /BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M 0 vpt2 neg V hpt2 0 V 0 vpt2 V hpt2 neg 0 V closepath stroke} def /TriUE {stroke [] 0 setdash vpt 1.12 mul add M hpt neg vpt -1.62 mul V hpt 2 mul 0 V hpt neg vpt 1.62 mul V closepath stroke} def /TriDE {stroke [] 0 setdash vpt 1.12 mul sub M hpt neg vpt 1.62 mul V hpt 2 mul 0 V hpt neg vpt -1.62 mul V closepath stroke} def /PentE {stroke [] 0 setdash gsave translate 0 hpt M 4 {72 rotate 0 hpt L} repeat closepath stroke grestore} def /CircE {stroke [] 0 setdash hpt 0 360 arc stroke} def /Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def /DiaW {stroke [] 0 setdash vpt add M hpt neg vpt neg V hpt vpt neg V hpt vpt V hpt neg vpt V Opaque stroke} def /BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M 0 vpt2 neg V hpt2 0 V 0 vpt2 V hpt2 neg 0 V Opaque stroke} def /TriUW {stroke [] 0 setdash vpt 1.12 mul add M hpt neg vpt -1.62 mul V hpt 2 mul 0 V hpt neg vpt 1.62 mul V Opaque stroke} def /TriDW {stroke [] 0 setdash vpt 1.12 mul sub M hpt neg vpt 1.62 mul V hpt 2 mul 0 V hpt neg vpt -1.62 mul V Opaque stroke} def /PentW {stroke [] 0 setdash gsave translate 0 hpt M 4 {72 rotate 0 hpt L} repeat Opaque stroke grestore} def /CircW {stroke [] 0 setdash hpt 0 360 arc Opaque stroke} def /BoxFill {gsave Rec 1 setgray fill grestore} def /Density { /Fillden exch def currentrgbcolor /ColB exch def /ColG exch def /ColR exch def /ColR ColR Fillden mul Fillden sub 1 add def /ColG ColG Fillden mul Fillden sub 1 add def /ColB ColB Fillden mul Fillden sub 1 add def ColR ColG ColB setrgbcolor} def /BoxColFill {gsave Rec PolyFill} def /PolyFill {gsave Density fill grestore grestore} def /h {rlineto rlineto rlineto gsave closepath fill grestore} bind def % % PostScript Level 1 Pattern Fill routine for rectangles % Usage: x y w h s a XX PatternFill % x,y = lower left corner of box to be filled % w,h = width and height of box % a = angle in degrees between lines and x-axis % XX = 0/1 for no/yes cross-hatch % /PatternFill {gsave /PFa [ 9 2 roll ] def PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse clip currentlinewidth 0.5 mul setlinewidth /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def 0 0 M PFa 5 get rotate PFs -2 div dup translate 0 1 PFs PFa 4 get div 1 add floor cvi {PFa 4 get mul 0 M 0 PFs V} for 0 PFa 6 get ne { 0 1 PFs PFa 4 get div 1 add floor cvi {PFa 4 get mul 0 2 1 roll M PFs 0 V} for } if stroke grestore} def % /languagelevel where {pop languagelevel} {1} ifelse 2 lt {/InterpretLevel1 true def} {/InterpretLevel1 Level1 def} ifelse % % PostScript level 2 pattern fill definitions % /Level2PatternFill { /Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} bind def /KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def << Tile8x8 /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} >> matrix makepattern /Pat1 exch def << Tile8x8 /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} >> matrix makepattern /Pat2 exch def << Tile8x8 /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L 8 8 L 8 0 L 0 0 L fill} >> matrix makepattern /Pat3 exch def << Tile8x8 /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L 0 12 M 12 0 L stroke} >> matrix makepattern /Pat4 exch def << Tile8x8 /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L 0 -4 M 12 8 L stroke} >> matrix makepattern /Pat5 exch def << Tile8x8 /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L 0 12 M 8 -4 L 4 12 M 10 0 L stroke} >> matrix makepattern /Pat6 exch def << Tile8x8 /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} >> matrix makepattern /Pat7 exch def << Tile8x8 /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L 12 0 M -4 8 L 12 4 M 0 10 L stroke} >> matrix makepattern /Pat8 exch def << Tile8x8 /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L -4 0 M 12 8 L -4 4 M 8 10 L stroke} >> matrix makepattern /Pat9 exch def /Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def /Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def /Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def /Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def /Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def /Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def /Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def } def % % %End of PostScript Level 2 code % /PatternBgnd { TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse } def % % Substitute for Level 2 pattern fill codes with % grayscale if Level 2 support is not selected. % /Level1PatternFill { /Pattern1 {0.250 Density} bind def /Pattern2 {0.500 Density} bind def /Pattern3 {0.750 Density} bind def /Pattern4 {0.125 Density} bind def /Pattern5 {0.375 Density} bind def /Pattern6 {0.625 Density} bind def /Pattern7 {0.875 Density} bind def } def % % Now test for support of Level 2 code % Level1 {Level1PatternFill} {Level2PatternFill} ifelse % /Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall currentdict end definefont pop gnuplot-4.6.4/term/PostScript/README0000644000471100001440000000061210456324741014077 0ustar On platforms where it is possible and easy to implement, the postscript prologues files are installed as separate files and located at run-time. On others (i.e. when the preprocessor variable GNUPLOT_PS_DIR is undefined), they are included at compile-time. To do that, the *.ps files are processed by the script ps_header.sh which creates char arrays suitable to inclusion in the source code. gnuplot-4.6.4/term/PostScript/ps_header.sh0000644000471100001440000000102310464453103015474 0ustar #! /bin/sh echo "/* This script-generated file contains the PostScript prologues" > output echo " * in a form suitable to inclusion in a C source code */" >> output echo "" >> output for i in `ls -1 *.ps | LC_ALL=C sort`; do echo $i > temp name=`sed -e 's/\.ps/_ps/g' -e 's/-/_/g' temp` rm temp echo "static const char *prologue_$name[] = {" >> output sed -e 's/"/\\"/g' -e 's/^/\"/g' -e 's/\t/\\t/g' -e 's/$/\\n\",/g' $i >> output echo "NULL" >> output echo "};" >> output echo "" >> output done cat output rm output gnuplot-4.6.4/term/PostScript/8859-1.ps0000644000471100001440000000414010713657504014340 0ustar % % Encoding for ISO-8859-1 (also called Latin1) % /reencodeISO { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall currentdict /CharStrings known { CharStrings /Idieresis known { /Encoding ISOLatin1Encoding def } if } if currentdict end definefont } def /ISOLatin1Encoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve /dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut /ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar /section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior /acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine /guillemotright/onequarter/onehalf/threequarters/questiondown /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute /Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis /aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave /iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex /otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis /yacute/thorn/ydieresis ] def gnuplot-4.6.4/term/PostScript/cp437.ps0000644000471100001440000000453410713657504014434 0ustar % % encoding for code page 437 (original MSDOS) % version 1.0: - Mainly letters are mapped. The following positions % (JFi) are left blank (undefined): % -- first 32 positions, % -- frame characters, % -- greek characters, % -- some more special characters. % % version 1.1: - added some more special characters /reencodeCP437 { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall currentdict /CharStrings known { CharStrings /Idieresis known { /Encoding CP437Encoding def } if } if currentdict end definefont } def /CP437Encoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/.notdef /Ccedilla/udieresis/eacute/acircumflex/adieresis/agrave/aring/ccedilla /ecircumflex/edieresis/egrave/idieresis/icircumflex/igrave/Adieresis/Aring /Eacute/ae/AE/ocircumflex/odieresis/ograve/ucircumflex/ugrave /ydieresis/Odieresis/Udieresis/cent/sterling/yen/.notdef/florin /aacute/iacute/oacute/uacute/ntilde/Ntilde/ordfeminine/ordmasculine /questiondown/.notdef/logicalnot/onehalf/onequarter/exclamdown/guillemotleft/guillemotright /space/space/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/germandbls/.notdef/.notdef/.notdef/.notdef/mu/.notdef /.notdef/.notdef/.notdef/.notdef/infinity/.notdef/.notdef/.notdef /.notdef/plusminus/greaterequal/lessequal/.notdef/.notdef/divide/.notdef /degree/bullet/periodcentered/.notdef/nsuperior/twosuperior/.notdef/.notdef ] def gnuplot-4.6.4/term/PostScript/koi8u.ps0000644000471100001440000000435110713657504014630 0ustar % % encoding for code page koi8r (8-bit Ukrainian) /reencodeKOI8U { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall currentdict /CharStrings known { CharStrings /Idieresis known { /Encoding KOI8UEncoding def } if } if currentdict end definefont } def /KOI8UEncoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/.notdef /SF100000/SF110000/SF010000/SF030000/SF020000/SF040000/SF080000/SF090000 /SF060000/SF070000/SF050000/SF600000/SF570000/SF610000/SF580000/SF590000 /SF140000/SF150000/SF160000/SS260000/filledbox/bullet/radical/approxequal /lessequal/greaterequal/space/SS270000/degree/twosuperior/periodcentered/divide /SF430000/SF240000/SF510000/afii10071/afii10101/SF390000/afii10103/afii10104 /SF250000/SF500000/SF490000/SF380000/SF280000/afii10098/SF260000/SF360000 /SF370000/SF420000/SF190000/afii10023/afii10053/SF230000/afii10055/afii10056 /SF410000/SF450000/SF460000/SF400000/SF540000/afii10050/SF440000/copyright /afii10096/afii10065/afii10066/afii10088/afii10069/afii10070/afii10086/afii10068 /afii10087/afii10074/afii10075/afii10076/afii10077/afii10078/afii10079/afii10080 /afii10081/afii10097/afii10082/afii10083/afii10084/afii10085/afii10072/afii10067 /afii10094/afii10093/afii10073/afii10090/afii10095/afii10091/afii10089/afii10092 /afii10048/afii10017/afii10018/afii10040/afii10021/afii10022/afii10038/afii10020 /afii10039/afii10026/afii10027/afii10028/afii10029/afii10030/afii10031/afii10032 /afii10033/afii10049/afii10034/afii10035/afii10036/afii10037/afii10024/afii10019 /afii10046/afii10045/afii10025/afii10042/afii10047/afii10043/afii10041/afii10044 ] def gnuplot-4.6.4/term/PostScript/unicode_maps.README0000644000471100001440000000521110715653156016547 0ustar unicode maps README =================== Each unicode_XXX.map file contains a list of unicode code points that might plausibly be used from inside gnuplot. These are only relevant to the PostScript terminal drivers, and only if you want to use UTF-8 encoding. If you have a TTF unicode font containing the relevant characters, you can use the unicode map file to instruct the external program ttf2pt1 to prepare an Adobe Type 1 font. For example: ttf2pt1 -p ft -e -L unicode_big.map arialuni.ttf This will extract character glyphs for these particular code points from arialuni.ttf and create a new file arialuni.ps. You can use this new *.pfa font file from gnuplot by saying set encoding utf8 set term post fontfile 'arialuni.ps' font 'ArialUnicodeMS' Note that gnuplot can run ttf2pt1 for you on the fly if you first define the appropriate command in the environmental variable GNUPLOT_TTFTOPFA. For example: setenv GNUPLOT_TTFTOPFA "ttf2pt1 -e -p ft -L unimap.map %s -" In this case you could say set encoding utf8 set term post fontfile 'arialuni.ttf' font 'ArialUnicodeMS' In either case, the converted glyphs will be embedded in your gnuplot output file. There are several caveats: 1) This can make the file quite large. 2) If a glyph isn't in the starting *.ttf font to begin with, nothing you do here will fix that. 3) If gnuplot runs the conversion for you, it will be triggered each time you plot. Several unicode map files are provided. They differ in how many characters they request, and hence in the size of the resulting font file. unicode_small.map (462 characters) =================================== - the Latin1 character set - the basic Greek alphabet - basic math and physical symbols - 133 less obscure math symbols from Unicode pages 34 and 35 unicode_big.map (863 characters) ================================= - the Latin1 character set - extended Latin character sets needed to support other European languages - the Cyrillic alphabet, with extensions for various slavic languages (may not be complete - please report omissions) - the basic Greek and Hebrew alphabets - basic math symbols - 176 mathematical symbols, some obscure, from Unicode pages 34 and 35 - physical and astronomical symbols The unicode_big map makes a total of about 860 glyphs available to use from gnuplot, but only if they exist in the original TTF font file. The maximum number that ttf2pt1 can process is 1024. This is only a tiny fraction of the total characters indexed by Unicode. But if you need more, probably you would do better to use a different gnuplot terminal that supports direct use of UTF-8 TTF fonts (pdf, png, svg). gnuplot-4.6.4/term/PostScript/koi8r.ps0000644000471100001440000000463510713657504014632 0ustar % % encoding for code page koi8r (8-bit Russian) % version 1.0: - Mainly letters are mapped. The following positions % (JFi) are left blank (undefined): % -- first 32 positions, % -- frame characters, % -- a few special characters. /reencodeKOI8R { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall currentdict /CharStrings known { CharStrings /Idieresis known { /Encoding KOI8REncoding def } if } if currentdict end definefont } def /KOI8REncoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/.notdef /SF100000/SF110000/SF010000/SF030000/SF020000/SF040000/SF080000/SF090000 /SF060000/SF070000/SF050000/SF600000/SF570000/SF610000/SF580000/SF590000 /SF140000/SF150000/SF160000/SS260000/filledbox/bullet/radical/approxequal /lessequal/greaterequal/space/SS270000/degree/twosuperior/periodcentered/divide /SF430000/SF240000/SF510000/afii10071/SF520000/SF390000/SF220000/SF210000 /SF250000/SF500000/SF490000/SF380000/SF280000/SF270000/SF260000/SF360000 /SF370000/SF420000/SF190000/afii10023/SF200000/SF230000/SF470000/SF480000 /SF410000/SF450000/SF460000/SF400000/SF540000/SF530000/SF440000/copyright /afii10096/afii10065/afii10066/afii10088/afii10069/afii10070/afii10086/afii10068 /afii10087/afii10074/afii10075/afii10076/afii10077/afii10078/afii10079/afii10080 /afii10081/afii10097/afii10082/afii10083/afii10084/afii10085/afii10072/afii10067 /afii10094/afii10093/afii10073/afii10090/afii10095/afii10091/afii10089/afii10092 /afii10048/afii10017/afii10018/afii10040/afii10021/afii10022/afii10038/afii10020 /afii10039/afii10026/afii10027/afii10028/afii10029/afii10030/afii10031/afii10032 /afii10033/afii10049/afii10034/afii10035/afii10036/afii10037/afii10024/afii10019 /afii10046/afii10045/afii10025/afii10042/afii10047/afii10043/afii10041/afii10044 ] def gnuplot-4.6.4/term/PostScript/8859-2.ps0000644000471100001440000000445010713657504014345 0ustar % % Encoding for ISO-8859-2 (also called Latin2), with % minor differences to "true" ISO-8859-2 (*commaaccent % instead of *cedilla for sStT -> incorrect in ISO-8859-2, % the standard will probably be modified in this respect) % Levente Novak /reencodeISO2 { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall currentdict /CharStrings known { CharStrings /Idieresis known { /Encoding ISOLatin2Encoding def } if } if currentdict end definefont } def /ISOLatin2Encoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M /N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /nbspace/Aogonek/breve/Lslash/currency/Lcaron/Sacute/section /dieresis/Scaron/Scommaaccent/Tcaron/Zacute/hyphen/Zcaron/Zdotaccent /degree/aogonek/ogonek/lslash/acute/lcaron/sacute/caron/cedilla /scaron/scommaaccent/tcaron/zacute/hungarumlaut/zcaron/zdotaccent /Racute/Aacute/Acircumflex/Abreve/Adieresis/Lacute/Cacute/Ccedilla /Ccaron/Eacute/Eogonek/Edieresis/Ecaron/Iacute/Icircumflex/Dcaron /Dcroat/Nacute/Ncaron/Oacute/Ocircumflex/Ohungarumlaut/Odieresis /multiply/Rcaron/Uring/Uacute/Uhungarumlaut/Udieresis/Yacute /Tcommaaccent/germandbls/racute/aacute/acircumflex/abreve/adieresis /lacute/cacute/ccedilla/ccaron/eacute/eogonek/edieresis/ecaron /iacute/icircumflex/dcaron/dcroat/nacute/ncaron/oacute/ocircumflex /ohungarumlaut/odieresis/divide/rcaron/uring/uacute/uhungarumlaut /udieresis/yacute/tcommaaccent/dotaccent ] def gnuplot-4.6.4/term/PostScript/aglfn.txt0000644000471100001440000011140210716217010015034 0ustar # This document was obtained from http://www.adobe.com/devnet/opentype/archives/aglfn.txt # ################################################################################### # Copyright (c) 2003,2005,2006,2007 Adobe Systems Incorporated # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this documentation file to use, copy, publish, distribute, # sublicense, and/or sell copies of the documentation, and to permit # others to do the same, provided that: # - No modification, editing or other alteration of this document is # allowed; and # - The above copyright notice and this permission notice shall be # included in all copies of the documentation. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this documentation file, to create their own derivative works # from the content of this document to use, copy, publish, distribute, # sublicense, and/or sell the derivative works, and to permit others to do # the same, provided that the derived work is not represented as being a # copy or version of this document. # # Adobe shall not be liable to any party for any loss of revenue or profit # or for indirect, incidental, special, consequential, or other similar # damages, whether based on tort (including without limitation negligence # or strict liability), contract or other legal or equitable grounds even # if Adobe has been advised or had reason to know of the possibility of # such damages. The Adobe materials are provided on an "AS IS" basis. # Adobe specifically disclaims all express, statutory, or implied # warranties relating to the Adobe materials, including but not limited to # those concerning merchantability or fitness for a particular purpose or # non-infringement of any third party rights regarding the Adobe # materials. # ################################################################################### # Name: Adobe Glyph List For New Fonts # Table version: 1.6 # Date: 30 Januaury 2006 # # Description: # # The Adobe Glyph List For New Fonts (AGLFN) is meant to provide a list of # base glyph names which are compatible with the AGL specification at # http://partners.adobe.com/asn/developer/type/unicodegn.html. # and which can be used as described in section 6 of that document. # # This list comprises the set of glyph names from the AGLv2,0 which map # to via the AGL rules to the semanticly correct Unicode value. For # example, Asmall is omitted as the AGL maps this to the Unicode # Private Use Area value F761, rather than to the Unicode value for the # character "A". "ffi" is also omitted, as the AGL maps this to the # Alphabetic Presentation Forms Area value FB03, rather than # decomposing it to the three-value Unicode sequence 0066,0066,0069. # See section 7.1 of the Unicode Standard 4.0 on this issue. # "arrowvertex" is omitted becuase this now has a real Unicode # character value, and the AGL is now incorrect in mapping this to the # Private Use Area value F8E6. # # If you do not find an appropriate name for your glyph in this list, # then please refer to section 6 of the document: # http://partners.adobe.com/asn/developer/typeforum/unicodegn.html. # # The Unicode values and names are given for convenience. # # Format: Semicolon-delimited fields: # # (1) Standard UV or CUS UV. (4 uppercase hexadecimal digits) # # (2) Glyph name. (upper- and lowercase letters, digits) # # (3) Character names: Unicode character names for standard UVs, and # descriptive names for CUS UVs. (uppercase letters, hyphen, space) # # The entries are sorted by glyph name in increasing ASCII order; entries # with the same glyph name are sorted in decreasing priority order. # # Lines starting with "#" are comments; blank lines should be ignored. # # 1.6 [30 January 2006] # - Completed work intended in 1.5 # # 1.5 [23 November 2005] # - removed duplicated block at end of file # - changed mappings: # 2206;Delta;INCREMENT changed to 0394;Delta;GREEK CAPITAL LETTER DELTA # 2126;Omega;OHM SIGN changed to 03A9;Omega;GREEK CAPITAL LETTER OMEGA # 03BC;mu;MICRO SIGN changed to 03BC;mu;GREEK SMALL LETTER MU # - corrected statement above about why ffi is omitted. # 1.4 [24 September 2003] Changed version to 1.4, to avoid confusion # with the AGL 1.3 # fixed spelling errors in the header # fully removed arrowvertex, as it is mapped only to a PUA Unicode value in some fonts. # # 1.1 [17 April 2003] Renamed [Tt]cedilla back to [Tt]commaaccent: # # 1.0 [31 Jan 2003] Original version. Derived from the AGLv1.2 by: # - removing the PUA area codes # - removing duplicate Unicode mappings, and # - renaming tcommaaccent to tcedilla and Tcommaaccent to Tcedilla # 0041;A;LATIN CAPITAL LETTER A 00C6;AE;LATIN CAPITAL LETTER AE 01FC;AEacute;LATIN CAPITAL LETTER AE WITH ACUTE 00C1;Aacute;LATIN CAPITAL LETTER A WITH ACUTE 0102;Abreve;LATIN CAPITAL LETTER A WITH BREVE 00C2;Acircumflex;LATIN CAPITAL LETTER A WITH CIRCUMFLEX 00C4;Adieresis;LATIN CAPITAL LETTER A WITH DIAERESIS 00C0;Agrave;LATIN CAPITAL LETTER A WITH GRAVE 0391;Alpha;GREEK CAPITAL LETTER ALPHA 0386;Alphatonos;GREEK CAPITAL LETTER ALPHA WITH TONOS 0100;Amacron;LATIN CAPITAL LETTER A WITH MACRON 0104;Aogonek;LATIN CAPITAL LETTER A WITH OGONEK 00C5;Aring;LATIN CAPITAL LETTER A WITH RING ABOVE 01FA;Aringacute;LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE 00C3;Atilde;LATIN CAPITAL LETTER A WITH TILDE 0042;B;LATIN CAPITAL LETTER B 0392;Beta;GREEK CAPITAL LETTER BETA 0043;C;LATIN CAPITAL LETTER C 0106;Cacute;LATIN CAPITAL LETTER C WITH ACUTE 010C;Ccaron;LATIN CAPITAL LETTER C WITH CARON 00C7;Ccedilla;LATIN CAPITAL LETTER C WITH CEDILLA 0108;Ccircumflex;LATIN CAPITAL LETTER C WITH CIRCUMFLEX 010A;Cdotaccent;LATIN CAPITAL LETTER C WITH DOT ABOVE 03A7;Chi;GREEK CAPITAL LETTER CHI 0044;D;LATIN CAPITAL LETTER D 010E;Dcaron;LATIN CAPITAL LETTER D WITH CARON 0110;Dcroat;LATIN CAPITAL LETTER D WITH STROKE 0394;Delta;GREEK CAPITAL LETTER DELTA 0045;E;LATIN CAPITAL LETTER E 00C9;Eacute;LATIN CAPITAL LETTER E WITH ACUTE 0114;Ebreve;LATIN CAPITAL LETTER E WITH BREVE 011A;Ecaron;LATIN CAPITAL LETTER E WITH CARON 00CA;Ecircumflex;LATIN CAPITAL LETTER E WITH CIRCUMFLEX 00CB;Edieresis;LATIN CAPITAL LETTER E WITH DIAERESIS 0116;Edotaccent;LATIN CAPITAL LETTER E WITH DOT ABOVE 00C8;Egrave;LATIN CAPITAL LETTER E WITH GRAVE 0112;Emacron;LATIN CAPITAL LETTER E WITH MACRON 014A;Eng;LATIN CAPITAL LETTER ENG 0118;Eogonek;LATIN CAPITAL LETTER E WITH OGONEK 0395;Epsilon;GREEK CAPITAL LETTER EPSILON 0388;Epsilontonos;GREEK CAPITAL LETTER EPSILON WITH TONOS 0397;Eta;GREEK CAPITAL LETTER ETA 0389;Etatonos;GREEK CAPITAL LETTER ETA WITH TONOS 00D0;Eth;LATIN CAPITAL LETTER ETH 20AC;Euro;EURO SIGN 0046;F;LATIN CAPITAL LETTER F 0047;G;LATIN CAPITAL LETTER G 0393;Gamma;GREEK CAPITAL LETTER GAMMA 011E;Gbreve;LATIN CAPITAL LETTER G WITH BREVE 01E6;Gcaron;LATIN CAPITAL LETTER G WITH CARON 011C;Gcircumflex;LATIN CAPITAL LETTER G WITH CIRCUMFLEX 0122;Gcommaaccent;LATIN CAPITAL LETTER G WITH CEDILLA 0120;Gdotaccent;LATIN CAPITAL LETTER G WITH DOT ABOVE 0048;H;LATIN CAPITAL LETTER H 25CF;H18533;BLACK CIRCLE 25AA;H18543;BLACK SMALL SQUARE 25AB;H18551;WHITE SMALL SQUARE 25A1;H22073;WHITE SQUARE 0126;Hbar;LATIN CAPITAL LETTER H WITH STROKE 0124;Hcircumflex;LATIN CAPITAL LETTER H WITH CIRCUMFLEX 0049;I;LATIN CAPITAL LETTER I 0132;IJ;LATIN CAPITAL LIGATURE IJ 00CD;Iacute;LATIN CAPITAL LETTER I WITH ACUTE 012C;Ibreve;LATIN CAPITAL LETTER I WITH BREVE 00CE;Icircumflex;LATIN CAPITAL LETTER I WITH CIRCUMFLEX 00CF;Idieresis;LATIN CAPITAL LETTER I WITH DIAERESIS 0130;Idotaccent;LATIN CAPITAL LETTER I WITH DOT ABOVE 2111;Ifraktur;BLACK-LETTER CAPITAL I 00CC;Igrave;LATIN CAPITAL LETTER I WITH GRAVE 012A;Imacron;LATIN CAPITAL LETTER I WITH MACRON 012E;Iogonek;LATIN CAPITAL LETTER I WITH OGONEK 0399;Iota;GREEK CAPITAL LETTER IOTA 03AA;Iotadieresis;GREEK CAPITAL LETTER IOTA WITH DIALYTIKA 038A;Iotatonos;GREEK CAPITAL LETTER IOTA WITH TONOS 0128;Itilde;LATIN CAPITAL LETTER I WITH TILDE 004A;J;LATIN CAPITAL LETTER J 0134;Jcircumflex;LATIN CAPITAL LETTER J WITH CIRCUMFLEX 004B;K;LATIN CAPITAL LETTER K 039A;Kappa;GREEK CAPITAL LETTER KAPPA 0136;Kcommaaccent;LATIN CAPITAL LETTER K WITH CEDILLA 004C;L;LATIN CAPITAL LETTER L 0139;Lacute;LATIN CAPITAL LETTER L WITH ACUTE 039B;Lambda;GREEK CAPITAL LETTER LAMDA 013D;Lcaron;LATIN CAPITAL LETTER L WITH CARON 013B;Lcommaaccent;LATIN CAPITAL LETTER L WITH CEDILLA 013F;Ldot;LATIN CAPITAL LETTER L WITH MIDDLE DOT 0141;Lslash;LATIN CAPITAL LETTER L WITH STROKE 004D;M;LATIN CAPITAL LETTER M 039C;Mu;GREEK CAPITAL LETTER MU 004E;N;LATIN CAPITAL LETTER N 0143;Nacute;LATIN CAPITAL LETTER N WITH ACUTE 0147;Ncaron;LATIN CAPITAL LETTER N WITH CARON 0145;Ncommaaccent;LATIN CAPITAL LETTER N WITH CEDILLA 00D1;Ntilde;LATIN CAPITAL LETTER N WITH TILDE 039D;Nu;GREEK CAPITAL LETTER NU 004F;O;LATIN CAPITAL LETTER O 0152;OE;LATIN CAPITAL LIGATURE OE 00D3;Oacute;LATIN CAPITAL LETTER O WITH ACUTE 014E;Obreve;LATIN CAPITAL LETTER O WITH BREVE 00D4;Ocircumflex;LATIN CAPITAL LETTER O WITH CIRCUMFLEX 00D6;Odieresis;LATIN CAPITAL LETTER O WITH DIAERESIS 00D2;Ograve;LATIN CAPITAL LETTER O WITH GRAVE 01A0;Ohorn;LATIN CAPITAL LETTER O WITH HORN 0150;Ohungarumlaut;LATIN CAPITAL LETTER O WITH DOUBLE ACUTE 014C;Omacron;LATIN CAPITAL LETTER O WITH MACRON 03A9;Omega;GREEK CAPITAL LETTER OMEGA 038F;Omegatonos;GREEK CAPITAL LETTER OMEGA WITH TONOS 039F;Omicron;GREEK CAPITAL LETTER OMICRON 038C;Omicrontonos;GREEK CAPITAL LETTER OMICRON WITH TONOS 00D8;Oslash;LATIN CAPITAL LETTER O WITH STROKE 01FE;Oslashacute;LATIN CAPITAL LETTER O WITH STROKE AND ACUTE 00D5;Otilde;LATIN CAPITAL LETTER O WITH TILDE 0050;P;LATIN CAPITAL LETTER P 03A6;Phi;GREEK CAPITAL LETTER PHI 03A0;Pi;GREEK CAPITAL LETTER PI 03A8;Psi;GREEK CAPITAL LETTER PSI 0051;Q;LATIN CAPITAL LETTER Q 0052;R;LATIN CAPITAL LETTER R 0154;Racute;LATIN CAPITAL LETTER R WITH ACUTE 0158;Rcaron;LATIN CAPITAL LETTER R WITH CARON 0156;Rcommaaccent;LATIN CAPITAL LETTER R WITH CEDILLA 211C;Rfraktur;BLACK-LETTER CAPITAL R 03A1;Rho;GREEK CAPITAL LETTER RHO 0053;S;LATIN CAPITAL LETTER S 250C;SF010000;BOX DRAWINGS LIGHT DOWN AND RIGHT 2514;SF020000;BOX DRAWINGS LIGHT UP AND RIGHT 2510;SF030000;BOX DRAWINGS LIGHT DOWN AND LEFT 2518;SF040000;BOX DRAWINGS LIGHT UP AND LEFT 253C;SF050000;BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL 252C;SF060000;BOX DRAWINGS LIGHT DOWN AND HORIZONTAL 2534;SF070000;BOX DRAWINGS LIGHT UP AND HORIZONTAL 251C;SF080000;BOX DRAWINGS LIGHT VERTICAL AND RIGHT 2524;SF090000;BOX DRAWINGS LIGHT VERTICAL AND LEFT 2500;SF100000;BOX DRAWINGS LIGHT HORIZONTAL 2502;SF110000;BOX DRAWINGS LIGHT VERTICAL 2561;SF190000;BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE 2562;SF200000;BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE 2556;SF210000;BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE 2555;SF220000;BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE 2563;SF230000;BOX DRAWINGS DOUBLE VERTICAL AND LEFT 2551;SF240000;BOX DRAWINGS DOUBLE VERTICAL 2557;SF250000;BOX DRAWINGS DOUBLE DOWN AND LEFT 255D;SF260000;BOX DRAWINGS DOUBLE UP AND LEFT 255C;SF270000;BOX DRAWINGS UP DOUBLE AND LEFT SINGLE 255B;SF280000;BOX DRAWINGS UP SINGLE AND LEFT DOUBLE 255E;SF360000;BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE 255F;SF370000;BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE 255A;SF380000;BOX DRAWINGS DOUBLE UP AND RIGHT 2554;SF390000;BOX DRAWINGS DOUBLE DOWN AND RIGHT 2569;SF400000;BOX DRAWINGS DOUBLE UP AND HORIZONTAL 2566;SF410000;BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL 2560;SF420000;BOX DRAWINGS DOUBLE VERTICAL AND RIGHT 2550;SF430000;BOX DRAWINGS DOUBLE HORIZONTAL 256C;SF440000;BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL 2567;SF450000;BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE 2568;SF460000;BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE 2564;SF470000;BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE 2565;SF480000;BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE 2559;SF490000;BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE 2558;SF500000;BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE 2552;SF510000;BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE 2553;SF520000;BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE 256B;SF530000;BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE 256A;SF540000;BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE 015A;Sacute;LATIN CAPITAL LETTER S WITH ACUTE 0160;Scaron;LATIN CAPITAL LETTER S WITH CARON 015E;Scedilla;LATIN CAPITAL LETTER S WITH CEDILLA 015C;Scircumflex;LATIN CAPITAL LETTER S WITH CIRCUMFLEX 0218;Scommaaccent;LATIN CAPITAL LETTER S WITH COMMA BELOW 03A3;Sigma;GREEK CAPITAL LETTER SIGMA 0054;T;LATIN CAPITAL LETTER T 03A4;Tau;GREEK CAPITAL LETTER TAU 0166;Tbar;LATIN CAPITAL LETTER T WITH STROKE 0164;Tcaron;LATIN CAPITAL LETTER T WITH CARON 0162;Tcommaaccent;LATIN CAPITAL LETTER T WITH CEDILLA 0398;Theta;GREEK CAPITAL LETTER THETA 00DE;Thorn;LATIN CAPITAL LETTER THORN 0055;U;LATIN CAPITAL LETTER U 00DA;Uacute;LATIN CAPITAL LETTER U WITH ACUTE 016C;Ubreve;LATIN CAPITAL LETTER U WITH BREVE 00DB;Ucircumflex;LATIN CAPITAL LETTER U WITH CIRCUMFLEX 00DC;Udieresis;LATIN CAPITAL LETTER U WITH DIAERESIS 00D9;Ugrave;LATIN CAPITAL LETTER U WITH GRAVE 01AF;Uhorn;LATIN CAPITAL LETTER U WITH HORN 0170;Uhungarumlaut;LATIN CAPITAL LETTER U WITH DOUBLE ACUTE 016A;Umacron;LATIN CAPITAL LETTER U WITH MACRON 0172;Uogonek;LATIN CAPITAL LETTER U WITH OGONEK 03A5;Upsilon;GREEK CAPITAL LETTER UPSILON 03D2;Upsilon1;GREEK UPSILON WITH HOOK SYMBOL 03AB;Upsilondieresis;GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA 038E;Upsilontonos;GREEK CAPITAL LETTER UPSILON WITH TONOS 016E;Uring;LATIN CAPITAL LETTER U WITH RING ABOVE 0168;Utilde;LATIN CAPITAL LETTER U WITH TILDE 0056;V;LATIN CAPITAL LETTER V 0057;W;LATIN CAPITAL LETTER W 1E82;Wacute;LATIN CAPITAL LETTER W WITH ACUTE 0174;Wcircumflex;LATIN CAPITAL LETTER W WITH CIRCUMFLEX 1E84;Wdieresis;LATIN CAPITAL LETTER W WITH DIAERESIS 1E80;Wgrave;LATIN CAPITAL LETTER W WITH GRAVE 0058;X;LATIN CAPITAL LETTER X 039E;Xi;GREEK CAPITAL LETTER XI 0059;Y;LATIN CAPITAL LETTER Y 00DD;Yacute;LATIN CAPITAL LETTER Y WITH ACUTE 0176;Ycircumflex;LATIN CAPITAL LETTER Y WITH CIRCUMFLEX 0178;Ydieresis;LATIN CAPITAL LETTER Y WITH DIAERESIS 1EF2;Ygrave;LATIN CAPITAL LETTER Y WITH GRAVE 005A;Z;LATIN CAPITAL LETTER Z 0179;Zacute;LATIN CAPITAL LETTER Z WITH ACUTE 017D;Zcaron;LATIN CAPITAL LETTER Z WITH CARON 017B;Zdotaccent;LATIN CAPITAL LETTER Z WITH DOT ABOVE 0396;Zeta;GREEK CAPITAL LETTER ZETA 0061;a;LATIN SMALL LETTER A 00E1;aacute;LATIN SMALL LETTER A WITH ACUTE 0103;abreve;LATIN SMALL LETTER A WITH BREVE 00E2;acircumflex;LATIN SMALL LETTER A WITH CIRCUMFLEX 00B4;acute;ACUTE ACCENT 0301;acutecomb;COMBINING ACUTE ACCENT 00E4;adieresis;LATIN SMALL LETTER A WITH DIAERESIS 00E6;ae;LATIN SMALL LETTER AE 01FD;aeacute;LATIN SMALL LETTER AE WITH ACUTE 2015;afii00208;HORIZONTAL BAR 0410;afii10017;CYRILLIC CAPITAL LETTER A 0411;afii10018;CYRILLIC CAPITAL LETTER BE 0412;afii10019;CYRILLIC CAPITAL LETTER VE 0413;afii10020;CYRILLIC CAPITAL LETTER GHE 0414;afii10021;CYRILLIC CAPITAL LETTER DE 0415;afii10022;CYRILLIC CAPITAL LETTER IE 0401;afii10023;CYRILLIC CAPITAL LETTER IO 0416;afii10024;CYRILLIC CAPITAL LETTER ZHE 0417;afii10025;CYRILLIC CAPITAL LETTER ZE 0418;afii10026;CYRILLIC CAPITAL LETTER I 0419;afii10027;CYRILLIC CAPITAL LETTER SHORT I 041A;afii10028;CYRILLIC CAPITAL LETTER KA 041B;afii10029;CYRILLIC CAPITAL LETTER EL 041C;afii10030;CYRILLIC CAPITAL LETTER EM 041D;afii10031;CYRILLIC CAPITAL LETTER EN 041E;afii10032;CYRILLIC CAPITAL LETTER O 041F;afii10033;CYRILLIC CAPITAL LETTER PE 0420;afii10034;CYRILLIC CAPITAL LETTER ER 0421;afii10035;CYRILLIC CAPITAL LETTER ES 0422;afii10036;CYRILLIC CAPITAL LETTER TE 0423;afii10037;CYRILLIC CAPITAL LETTER U 0424;afii10038;CYRILLIC CAPITAL LETTER EF 0425;afii10039;CYRILLIC CAPITAL LETTER HA 0426;afii10040;CYRILLIC CAPITAL LETTER TSE 0427;afii10041;CYRILLIC CAPITAL LETTER CHE 0428;afii10042;CYRILLIC CAPITAL LETTER SHA 0429;afii10043;CYRILLIC CAPITAL LETTER SHCHA 042A;afii10044;CYRILLIC CAPITAL LETTER HARD SIGN 042B;afii10045;CYRILLIC CAPITAL LETTER YERU 042C;afii10046;CYRILLIC CAPITAL LETTER SOFT SIGN 042D;afii10047;CYRILLIC CAPITAL LETTER E 042E;afii10048;CYRILLIC CAPITAL LETTER YU 042F;afii10049;CYRILLIC CAPITAL LETTER YA 0490;afii10050;CYRILLIC CAPITAL LETTER GHE WITH UPTURN 0402;afii10051;CYRILLIC CAPITAL LETTER DJE 0403;afii10052;CYRILLIC CAPITAL LETTER GJE 0404;afii10053;CYRILLIC CAPITAL LETTER UKRAINIAN IE 0405;afii10054;CYRILLIC CAPITAL LETTER DZE 0406;afii10055;CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I 0407;afii10056;CYRILLIC CAPITAL LETTER YI 0408;afii10057;CYRILLIC CAPITAL LETTER JE 0409;afii10058;CYRILLIC CAPITAL LETTER LJE 040A;afii10059;CYRILLIC CAPITAL LETTER NJE 040B;afii10060;CYRILLIC CAPITAL LETTER TSHE 040C;afii10061;CYRILLIC CAPITAL LETTER KJE 040E;afii10062;CYRILLIC CAPITAL LETTER SHORT U 0430;afii10065;CYRILLIC SMALL LETTER A 0431;afii10066;CYRILLIC SMALL LETTER BE 0432;afii10067;CYRILLIC SMALL LETTER VE 0433;afii10068;CYRILLIC SMALL LETTER GHE 0434;afii10069;CYRILLIC SMALL LETTER DE 0435;afii10070;CYRILLIC SMALL LETTER IE 0451;afii10071;CYRILLIC SMALL LETTER IO 0436;afii10072;CYRILLIC SMALL LETTER ZHE 0437;afii10073;CYRILLIC SMALL LETTER ZE 0438;afii10074;CYRILLIC SMALL LETTER I 0439;afii10075;CYRILLIC SMALL LETTER SHORT I 043A;afii10076;CYRILLIC SMALL LETTER KA 043B;afii10077;CYRILLIC SMALL LETTER EL 043C;afii10078;CYRILLIC SMALL LETTER EM 043D;afii10079;CYRILLIC SMALL LETTER EN 043E;afii10080;CYRILLIC SMALL LETTER O 043F;afii10081;CYRILLIC SMALL LETTER PE 0440;afii10082;CYRILLIC SMALL LETTER ER 0441;afii10083;CYRILLIC SMALL LETTER ES 0442;afii10084;CYRILLIC SMALL LETTER TE 0443;afii10085;CYRILLIC SMALL LETTER U 0444;afii10086;CYRILLIC SMALL LETTER EF 0445;afii10087;CYRILLIC SMALL LETTER HA 0446;afii10088;CYRILLIC SMALL LETTER TSE 0447;afii10089;CYRILLIC SMALL LETTER CHE 0448;afii10090;CYRILLIC SMALL LETTER SHA 0449;afii10091;CYRILLIC SMALL LETTER SHCHA 044A;afii10092;CYRILLIC SMALL LETTER HARD SIGN 044B;afii10093;CYRILLIC SMALL LETTER YERU 044C;afii10094;CYRILLIC SMALL LETTER SOFT SIGN 044D;afii10095;CYRILLIC SMALL LETTER E 044E;afii10096;CYRILLIC SMALL LETTER YU 044F;afii10097;CYRILLIC SMALL LETTER YA 0491;afii10098;CYRILLIC SMALL LETTER GHE WITH UPTURN 0452;afii10099;CYRILLIC SMALL LETTER DJE 0453;afii10100;CYRILLIC SMALL LETTER GJE 0454;afii10101;CYRILLIC SMALL LETTER UKRAINIAN IE 0455;afii10102;CYRILLIC SMALL LETTER DZE 0456;afii10103;CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I 0457;afii10104;CYRILLIC SMALL LETTER YI 0458;afii10105;CYRILLIC SMALL LETTER JE 0459;afii10106;CYRILLIC SMALL LETTER LJE 045A;afii10107;CYRILLIC SMALL LETTER NJE 045B;afii10108;CYRILLIC SMALL LETTER TSHE 045C;afii10109;CYRILLIC SMALL LETTER KJE 045E;afii10110;CYRILLIC SMALL LETTER SHORT U 040F;afii10145;CYRILLIC CAPITAL LETTER DZHE 0462;afii10146;CYRILLIC CAPITAL LETTER YAT 0472;afii10147;CYRILLIC CAPITAL LETTER FITA 0474;afii10148;CYRILLIC CAPITAL LETTER IZHITSA 045F;afii10193;CYRILLIC SMALL LETTER DZHE 0463;afii10194;CYRILLIC SMALL LETTER YAT 0473;afii10195;CYRILLIC SMALL LETTER FITA 0475;afii10196;CYRILLIC SMALL LETTER IZHITSA 04D9;afii10846;CYRILLIC SMALL LETTER SCHWA 200E;afii299;LEFT-TO-RIGHT MARK 200F;afii300;RIGHT-TO-LEFT MARK 200D;afii301;ZERO WIDTH JOINER 066A;afii57381;ARABIC PERCENT SIGN 060C;afii57388;ARABIC COMMA 0660;afii57392;ARABIC-INDIC DIGIT ZERO 0661;afii57393;ARABIC-INDIC DIGIT ONE 0662;afii57394;ARABIC-INDIC DIGIT TWO 0663;afii57395;ARABIC-INDIC DIGIT THREE 0664;afii57396;ARABIC-INDIC DIGIT FOUR 0665;afii57397;ARABIC-INDIC DIGIT FIVE 0666;afii57398;ARABIC-INDIC DIGIT SIX 0667;afii57399;ARABIC-INDIC DIGIT SEVEN 0668;afii57400;ARABIC-INDIC DIGIT EIGHT 0669;afii57401;ARABIC-INDIC DIGIT NINE 061B;afii57403;ARABIC SEMICOLON 061F;afii57407;ARABIC QUESTION MARK 0621;afii57409;ARABIC LETTER HAMZA 0622;afii57410;ARABIC LETTER ALEF WITH MADDA ABOVE 0623;afii57411;ARABIC LETTER ALEF WITH HAMZA ABOVE 0624;afii57412;ARABIC LETTER WAW WITH HAMZA ABOVE 0625;afii57413;ARABIC LETTER ALEF WITH HAMZA BELOW 0626;afii57414;ARABIC LETTER YEH WITH HAMZA ABOVE 0627;afii57415;ARABIC LETTER ALEF 0628;afii57416;ARABIC LETTER BEH 0629;afii57417;ARABIC LETTER TEH MARBUTA 062A;afii57418;ARABIC LETTER TEH 062B;afii57419;ARABIC LETTER THEH 062C;afii57420;ARABIC LETTER JEEM 062D;afii57421;ARABIC LETTER HAH 062E;afii57422;ARABIC LETTER KHAH 062F;afii57423;ARABIC LETTER DAL 0630;afii57424;ARABIC LETTER THAL 0631;afii57425;ARABIC LETTER REH 0632;afii57426;ARABIC LETTER ZAIN 0633;afii57427;ARABIC LETTER SEEN 0634;afii57428;ARABIC LETTER SHEEN 0635;afii57429;ARABIC LETTER SAD 0636;afii57430;ARABIC LETTER DAD 0637;afii57431;ARABIC LETTER TAH 0638;afii57432;ARABIC LETTER ZAH 0639;afii57433;ARABIC LETTER AIN 063A;afii57434;ARABIC LETTER GHAIN 0640;afii57440;ARABIC TATWEEL 0641;afii57441;ARABIC LETTER FEH 0642;afii57442;ARABIC LETTER QAF 0643;afii57443;ARABIC LETTER KAF 0644;afii57444;ARABIC LETTER LAM 0645;afii57445;ARABIC LETTER MEEM 0646;afii57446;ARABIC LETTER NOON 0648;afii57448;ARABIC LETTER WAW 0649;afii57449;ARABIC LETTER ALEF MAKSURA 064A;afii57450;ARABIC LETTER YEH 064B;afii57451;ARABIC FATHATAN 064C;afii57452;ARABIC DAMMATAN 064D;afii57453;ARABIC KASRATAN 064E;afii57454;ARABIC FATHA 064F;afii57455;ARABIC DAMMA 0650;afii57456;ARABIC KASRA 0651;afii57457;ARABIC SHADDA 0652;afii57458;ARABIC SUKUN 0647;afii57470;ARABIC LETTER HEH 06A4;afii57505;ARABIC LETTER VEH 067E;afii57506;ARABIC LETTER PEH 0686;afii57507;ARABIC LETTER TCHEH 0698;afii57508;ARABIC LETTER JEH 06AF;afii57509;ARABIC LETTER GAF 0679;afii57511;ARABIC LETTER TTEH 0688;afii57512;ARABIC LETTER DDAL 0691;afii57513;ARABIC LETTER RREH 06BA;afii57514;ARABIC LETTER NOON GHUNNA 06D2;afii57519;ARABIC LETTER YEH BARREE 06D5;afii57534;ARABIC LETTER AE 20AA;afii57636;NEW SHEQEL SIGN 05BE;afii57645;HEBREW PUNCTUATION MAQAF 05C3;afii57658;HEBREW PUNCTUATION SOF PASUQ 05D0;afii57664;HEBREW LETTER ALEF 05D1;afii57665;HEBREW LETTER BET 05D2;afii57666;HEBREW LETTER GIMEL 05D3;afii57667;HEBREW LETTER DALET 05D4;afii57668;HEBREW LETTER HE 05D5;afii57669;HEBREW LETTER VAV 05D6;afii57670;HEBREW LETTER ZAYIN 05D7;afii57671;HEBREW LETTER HET 05D8;afii57672;HEBREW LETTER TET 05D9;afii57673;HEBREW LETTER YOD 05DA;afii57674;HEBREW LETTER FINAL KAF 05DB;afii57675;HEBREW LETTER KAF 05DC;afii57676;HEBREW LETTER LAMED 05DD;afii57677;HEBREW LETTER FINAL MEM 05DE;afii57678;HEBREW LETTER MEM 05DF;afii57679;HEBREW LETTER FINAL NUN 05E0;afii57680;HEBREW LETTER NUN 05E1;afii57681;HEBREW LETTER SAMEKH 05E2;afii57682;HEBREW LETTER AYIN 05E3;afii57683;HEBREW LETTER FINAL PE 05E4;afii57684;HEBREW LETTER PE 05E5;afii57685;HEBREW LETTER FINAL TSADI 05E6;afii57686;HEBREW LETTER TSADI 05E7;afii57687;HEBREW LETTER QOF 05E8;afii57688;HEBREW LETTER RESH 05E9;afii57689;HEBREW LETTER SHIN 05EA;afii57690;HEBREW LETTER TAV 05F0;afii57716;HEBREW LIGATURE YIDDISH DOUBLE VAV 05F1;afii57717;HEBREW LIGATURE YIDDISH VAV YOD 05F2;afii57718;HEBREW LIGATURE YIDDISH DOUBLE YOD 05B4;afii57793;HEBREW POINT HIRIQ 05B5;afii57794;HEBREW POINT TSERE 05B6;afii57795;HEBREW POINT SEGOL 05BB;afii57796;HEBREW POINT QUBUTS 05B8;afii57797;HEBREW POINT QAMATS 05B7;afii57798;HEBREW POINT PATAH 05B0;afii57799;HEBREW POINT SHEVA 05B2;afii57800;HEBREW POINT HATAF PATAH 05B1;afii57801;HEBREW POINT HATAF SEGOL 05B3;afii57802;HEBREW POINT HATAF QAMATS 05C2;afii57803;HEBREW POINT SIN DOT 05C1;afii57804;HEBREW POINT SHIN DOT 05B9;afii57806;HEBREW POINT HOLAM 05BC;afii57807;HEBREW POINT DAGESH OR MAPIQ 05BD;afii57839;HEBREW POINT METEG 05BF;afii57841;HEBREW POINT RAFE 05C0;afii57842;HEBREW PUNCTUATION PASEQ 02BC;afii57929;MODIFIER LETTER APOSTROPHE 2105;afii61248;CARE OF 2113;afii61289;SCRIPT SMALL L 2116;afii61352;NUMERO SIGN 202C;afii61573;POP DIRECTIONAL FORMATTING 202D;afii61574;LEFT-TO-RIGHT OVERRIDE 202E;afii61575;RIGHT-TO-LEFT OVERRIDE 200C;afii61664;ZERO WIDTH NON-JOINER 066D;afii63167;ARABIC FIVE POINTED STAR 02BD;afii64937;MODIFIER LETTER REVERSED COMMA 00E0;agrave;LATIN SMALL LETTER A WITH GRAVE 2135;aleph;ALEF SYMBOL 03B1;alpha;GREEK SMALL LETTER ALPHA 03AC;alphatonos;GREEK SMALL LETTER ALPHA WITH TONOS 0101;amacron;LATIN SMALL LETTER A WITH MACRON 0026;ampersand;AMPERSAND 2220;angle;ANGLE 2329;angleleft;LEFT-POINTING ANGLE BRACKET 232A;angleright;RIGHT-POINTING ANGLE BRACKET 0387;anoteleia;GREEK ANO TELEIA 0105;aogonek;LATIN SMALL LETTER A WITH OGONEK 2248;approxequal;ALMOST EQUAL TO 00E5;aring;LATIN SMALL LETTER A WITH RING ABOVE 01FB;aringacute;LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE 2194;arrowboth;LEFT RIGHT ARROW 21D4;arrowdblboth;LEFT RIGHT DOUBLE ARROW 21D3;arrowdbldown;DOWNWARDS DOUBLE ARROW 21D0;arrowdblleft;LEFTWARDS DOUBLE ARROW 21D2;arrowdblright;RIGHTWARDS DOUBLE ARROW 21D1;arrowdblup;UPWARDS DOUBLE ARROW 2193;arrowdown;DOWNWARDS ARROW 2190;arrowleft;LEFTWARDS ARROW 2192;arrowright;RIGHTWARDS ARROW 2191;arrowup;UPWARDS ARROW 2195;arrowupdn;UP DOWN ARROW 21A8;arrowupdnbse;UP DOWN ARROW WITH BASE 005E;asciicircum;CIRCUMFLEX ACCENT 007E;asciitilde;TILDE 002A;asterisk;ASTERISK 2217;asteriskmath;ASTERISK OPERATOR 0040;at;COMMERCIAL AT 00E3;atilde;LATIN SMALL LETTER A WITH TILDE 0062;b;LATIN SMALL LETTER B 005C;backslash;REVERSE SOLIDUS 007C;bar;VERTICAL LINE 03B2;beta;GREEK SMALL LETTER BETA 2588;block;FULL BLOCK 007B;braceleft;LEFT CURLY BRACKET 007D;braceright;RIGHT CURLY BRACKET 005B;bracketleft;LEFT SQUARE BRACKET 005D;bracketright;RIGHT SQUARE BRACKET 02D8;breve;BREVE 00A6;brokenbar;BROKEN BAR 2022;bullet;BULLET 0063;c;LATIN SMALL LETTER C 0107;cacute;LATIN SMALL LETTER C WITH ACUTE 02C7;caron;CARON 21B5;carriagereturn;DOWNWARDS ARROW WITH CORNER LEFTWARDS 010D;ccaron;LATIN SMALL LETTER C WITH CARON 00E7;ccedilla;LATIN SMALL LETTER C WITH CEDILLA 0109;ccircumflex;LATIN SMALL LETTER C WITH CIRCUMFLEX 010B;cdotaccent;LATIN SMALL LETTER C WITH DOT ABOVE 00B8;cedilla;CEDILLA 00A2;cent;CENT SIGN 03C7;chi;GREEK SMALL LETTER CHI 25CB;circle;WHITE CIRCLE 2297;circlemultiply;CIRCLED TIMES 2295;circleplus;CIRCLED PLUS 02C6;circumflex;MODIFIER LETTER CIRCUMFLEX ACCENT 2663;club;BLACK CLUB SUIT 003A;colon;COLON 20A1;colonmonetary;COLON SIGN 002C;comma;COMMA 2245;congruent;APPROXIMATELY EQUAL TO 00A9;copyright;COPYRIGHT SIGN 00A4;currency;CURRENCY SIGN 0064;d;LATIN SMALL LETTER D 2020;dagger;DAGGER 2021;daggerdbl;DOUBLE DAGGER 010F;dcaron;LATIN SMALL LETTER D WITH CARON 0111;dcroat;LATIN SMALL LETTER D WITH STROKE 00B0;degree;DEGREE SIGN 03B4;delta;GREEK SMALL LETTER DELTA 2666;diamond;BLACK DIAMOND SUIT 00A8;dieresis;DIAERESIS 0385;dieresistonos;GREEK DIALYTIKA TONOS 00F7;divide;DIVISION SIGN 2593;dkshade;DARK SHADE 2584;dnblock;LOWER HALF BLOCK 0024;dollar;DOLLAR SIGN 20AB;dong;DONG SIGN 02D9;dotaccent;DOT ABOVE 0323;dotbelowcomb;COMBINING DOT BELOW 0131;dotlessi;LATIN SMALL LETTER DOTLESS I 22C5;dotmath;DOT OPERATOR 0065;e;LATIN SMALL LETTER E 00E9;eacute;LATIN SMALL LETTER E WITH ACUTE 0115;ebreve;LATIN SMALL LETTER E WITH BREVE 011B;ecaron;LATIN SMALL LETTER E WITH CARON 00EA;ecircumflex;LATIN SMALL LETTER E WITH CIRCUMFLEX 00EB;edieresis;LATIN SMALL LETTER E WITH DIAERESIS 0117;edotaccent;LATIN SMALL LETTER E WITH DOT ABOVE 00E8;egrave;LATIN SMALL LETTER E WITH GRAVE 0038;eight;DIGIT EIGHT 2208;element;ELEMENT OF 2026;ellipsis;HORIZONTAL ELLIPSIS 0113;emacron;LATIN SMALL LETTER E WITH MACRON 2014;emdash;EM DASH 2205;emptyset;EMPTY SET 2013;endash;EN DASH 014B;eng;LATIN SMALL LETTER ENG 0119;eogonek;LATIN SMALL LETTER E WITH OGONEK 03B5;epsilon;GREEK SMALL LETTER EPSILON 03AD;epsilontonos;GREEK SMALL LETTER EPSILON WITH TONOS 003D;equal;EQUALS SIGN 2261;equivalence;IDENTICAL TO 212E;estimated;ESTIMATED SYMBOL 03B7;eta;GREEK SMALL LETTER ETA 03AE;etatonos;GREEK SMALL LETTER ETA WITH TONOS 00F0;eth;LATIN SMALL LETTER ETH 0021;exclam;EXCLAMATION MARK 203C;exclamdbl;DOUBLE EXCLAMATION MARK 00A1;exclamdown;INVERTED EXCLAMATION MARK 2203;existential;THERE EXISTS 0066;f;LATIN SMALL LETTER F 2640;female;FEMALE SIGN 2012;figuredash;FIGURE DASH 25A0;filledbox;BLACK SQUARE 25AC;filledrect;BLACK RECTANGLE 0035;five;DIGIT FIVE 215D;fiveeighths;VULGAR FRACTION FIVE EIGHTHS 0192;florin;LATIN SMALL LETTER F WITH HOOK 0034;four;DIGIT FOUR 2044;fraction;FRACTION SLASH 20A3;franc;FRENCH FRANC SIGN 0067;g;LATIN SMALL LETTER G 03B3;gamma;GREEK SMALL LETTER GAMMA 011F;gbreve;LATIN SMALL LETTER G WITH BREVE 01E7;gcaron;LATIN SMALL LETTER G WITH CARON 011D;gcircumflex;LATIN SMALL LETTER G WITH CIRCUMFLEX 0123;gcommaaccent;LATIN SMALL LETTER G WITH CEDILLA 0121;gdotaccent;LATIN SMALL LETTER G WITH DOT ABOVE 00DF;germandbls;LATIN SMALL LETTER SHARP S 2207;gradient;NABLA 0060;grave;GRAVE ACCENT 0300;gravecomb;COMBINING GRAVE ACCENT 003E;greater;GREATER-THAN SIGN 2265;greaterequal;GREATER-THAN OR EQUAL TO 00AB;guillemotleft;LEFT-POINTING DOUBLE ANGLE QUOTATION MARK 00BB;guillemotright;RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK 2039;guilsinglleft;SINGLE LEFT-POINTING ANGLE QUOTATION MARK 203A;guilsinglright;SINGLE RIGHT-POINTING ANGLE QUOTATION MARK 0068;h;LATIN SMALL LETTER H 0127;hbar;LATIN SMALL LETTER H WITH STROKE 0125;hcircumflex;LATIN SMALL LETTER H WITH CIRCUMFLEX 2665;heart;BLACK HEART SUIT 0309;hookabovecomb;COMBINING HOOK ABOVE 2302;house;HOUSE 02DD;hungarumlaut;DOUBLE ACUTE ACCENT 002D;hyphen;HYPHEN-MINUS 0069;i;LATIN SMALL LETTER I 00ED;iacute;LATIN SMALL LETTER I WITH ACUTE 012D;ibreve;LATIN SMALL LETTER I WITH BREVE 00EE;icircumflex;LATIN SMALL LETTER I WITH CIRCUMFLEX 00EF;idieresis;LATIN SMALL LETTER I WITH DIAERESIS 00EC;igrave;LATIN SMALL LETTER I WITH GRAVE 0133;ij;LATIN SMALL LIGATURE IJ 012B;imacron;LATIN SMALL LETTER I WITH MACRON 221E;infinity;INFINITY 222B;integral;INTEGRAL 2321;integralbt;BOTTOM HALF INTEGRAL 2320;integraltp;TOP HALF INTEGRAL 2229;intersection;INTERSECTION 25D8;invbullet;INVERSE BULLET 25D9;invcircle;INVERSE WHITE CIRCLE 263B;invsmileface;BLACK SMILING FACE 012F;iogonek;LATIN SMALL LETTER I WITH OGONEK 03B9;iota;GREEK SMALL LETTER IOTA 03CA;iotadieresis;GREEK SMALL LETTER IOTA WITH DIALYTIKA 0390;iotadieresistonos;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS 03AF;iotatonos;GREEK SMALL LETTER IOTA WITH TONOS 0129;itilde;LATIN SMALL LETTER I WITH TILDE 006A;j;LATIN SMALL LETTER J 0135;jcircumflex;LATIN SMALL LETTER J WITH CIRCUMFLEX 006B;k;LATIN SMALL LETTER K 03BA;kappa;GREEK SMALL LETTER KAPPA 0137;kcommaaccent;LATIN SMALL LETTER K WITH CEDILLA 0138;kgreenlandic;LATIN SMALL LETTER KRA 006C;l;LATIN SMALL LETTER L 013A;lacute;LATIN SMALL LETTER L WITH ACUTE 03BB;lambda;GREEK SMALL LETTER LAMDA 013E;lcaron;LATIN SMALL LETTER L WITH CARON 013C;lcommaaccent;LATIN SMALL LETTER L WITH CEDILLA 0140;ldot;LATIN SMALL LETTER L WITH MIDDLE DOT 003C;less;LESS-THAN SIGN 2264;lessequal;LESS-THAN OR EQUAL TO 258C;lfblock;LEFT HALF BLOCK 20A4;lira;LIRA SIGN 2227;logicaland;LOGICAL AND 00AC;logicalnot;NOT SIGN 2228;logicalor;LOGICAL OR 017F;longs;LATIN SMALL LETTER LONG S 25CA;lozenge;LOZENGE 0142;lslash;LATIN SMALL LETTER L WITH STROKE 2591;ltshade;LIGHT SHADE 006D;m;LATIN SMALL LETTER M 00AF;macron;MACRON 2642;male;MALE SIGN 2212;minus;MINUS SIGN 2032;minute;PRIME 03BC;mu;GREEK SMALL LETTER MU 00D7;multiply;MULTIPLICATION SIGN 266A;musicalnote;EIGHTH NOTE 266B;musicalnotedbl;BEAMED EIGHTH NOTES 006E;n;LATIN SMALL LETTER N 0144;nacute;LATIN SMALL LETTER N WITH ACUTE 0149;napostrophe;LATIN SMALL LETTER N PRECEDED BY APOSTROPHE 0148;ncaron;LATIN SMALL LETTER N WITH CARON 0146;ncommaaccent;LATIN SMALL LETTER N WITH CEDILLA 0039;nine;DIGIT NINE 2209;notelement;NOT AN ELEMENT OF 2260;notequal;NOT EQUAL TO 2284;notsubset;NOT A SUBSET OF 00F1;ntilde;LATIN SMALL LETTER N WITH TILDE 03BD;nu;GREEK SMALL LETTER NU 0023;numbersign;NUMBER SIGN 006F;o;LATIN SMALL LETTER O 00F3;oacute;LATIN SMALL LETTER O WITH ACUTE 014F;obreve;LATIN SMALL LETTER O WITH BREVE 00F4;ocircumflex;LATIN SMALL LETTER O WITH CIRCUMFLEX 00F6;odieresis;LATIN SMALL LETTER O WITH DIAERESIS 0153;oe;LATIN SMALL LIGATURE OE 02DB;ogonek;OGONEK 00F2;ograve;LATIN SMALL LETTER O WITH GRAVE 01A1;ohorn;LATIN SMALL LETTER O WITH HORN 0151;ohungarumlaut;LATIN SMALL LETTER O WITH DOUBLE ACUTE 014D;omacron;LATIN SMALL LETTER O WITH MACRON 03C9;omega;GREEK SMALL LETTER OMEGA 03D6;omega1;GREEK PI SYMBOL 03CE;omegatonos;GREEK SMALL LETTER OMEGA WITH TONOS 03BF;omicron;GREEK SMALL LETTER OMICRON 03CC;omicrontonos;GREEK SMALL LETTER OMICRON WITH TONOS 0031;one;DIGIT ONE 2024;onedotenleader;ONE DOT LEADER 215B;oneeighth;VULGAR FRACTION ONE EIGHTH 00BD;onehalf;VULGAR FRACTION ONE HALF 00BC;onequarter;VULGAR FRACTION ONE QUARTER 2153;onethird;VULGAR FRACTION ONE THIRD 25E6;openbullet;WHITE BULLET 00AA;ordfeminine;FEMININE ORDINAL INDICATOR 00BA;ordmasculine;MASCULINE ORDINAL INDICATOR 221F;orthogonal;RIGHT ANGLE 00F8;oslash;LATIN SMALL LETTER O WITH STROKE 01FF;oslashacute;LATIN SMALL LETTER O WITH STROKE AND ACUTE 00F5;otilde;LATIN SMALL LETTER O WITH TILDE 0070;p;LATIN SMALL LETTER P 00B6;paragraph;PILCROW SIGN 0028;parenleft;LEFT PARENTHESIS 0029;parenright;RIGHT PARENTHESIS 2202;partialdiff;PARTIAL DIFFERENTIAL 0025;percent;PERCENT SIGN 002E;period;FULL STOP 00B7;periodcentered;MIDDLE DOT 22A5;perpendicular;UP TACK 2030;perthousand;PER MILLE SIGN 20A7;peseta;PESETA SIGN 03C6;phi;GREEK SMALL LETTER PHI 03D5;phi1;GREEK PHI SYMBOL 03C0;pi;GREEK SMALL LETTER PI 002B;plus;PLUS SIGN 00B1;plusminus;PLUS-MINUS SIGN 211E;prescription;PRESCRIPTION TAKE 220F;product;N-ARY PRODUCT 2282;propersubset;SUBSET OF 2283;propersuperset;SUPERSET OF 221D;proportional;PROPORTIONAL TO 03C8;psi;GREEK SMALL LETTER PSI 0071;q;LATIN SMALL LETTER Q 003F;question;QUESTION MARK 00BF;questiondown;INVERTED QUESTION MARK 0022;quotedbl;QUOTATION MARK 201E;quotedblbase;DOUBLE LOW-9 QUOTATION MARK 201C;quotedblleft;LEFT DOUBLE QUOTATION MARK 201D;quotedblright;RIGHT DOUBLE QUOTATION MARK 2018;quoteleft;LEFT SINGLE QUOTATION MARK 201B;quotereversed;SINGLE HIGH-REVERSED-9 QUOTATION MARK 2019;quoteright;RIGHT SINGLE QUOTATION MARK 201A;quotesinglbase;SINGLE LOW-9 QUOTATION MARK 0027;quotesingle;APOSTROPHE 0072;r;LATIN SMALL LETTER R 0155;racute;LATIN SMALL LETTER R WITH ACUTE 221A;radical;SQUARE ROOT 0159;rcaron;LATIN SMALL LETTER R WITH CARON 0157;rcommaaccent;LATIN SMALL LETTER R WITH CEDILLA 2286;reflexsubset;SUBSET OF OR EQUAL TO 2287;reflexsuperset;SUPERSET OF OR EQUAL TO 00AE;registered;REGISTERED SIGN 2310;revlogicalnot;REVERSED NOT SIGN 03C1;rho;GREEK SMALL LETTER RHO 02DA;ring;RING ABOVE 2590;rtblock;RIGHT HALF BLOCK 0073;s;LATIN SMALL LETTER S 015B;sacute;LATIN SMALL LETTER S WITH ACUTE 0161;scaron;LATIN SMALL LETTER S WITH CARON 015F;scedilla;LATIN SMALL LETTER S WITH CEDILLA 015D;scircumflex;LATIN SMALL LETTER S WITH CIRCUMFLEX 0219;scommaaccent;LATIN SMALL LETTER S WITH COMMA BELOW 2033;second;DOUBLE PRIME 00A7;section;SECTION SIGN 003B;semicolon;SEMICOLON 0037;seven;DIGIT SEVEN 215E;seveneighths;VULGAR FRACTION SEVEN EIGHTHS 2592;shade;MEDIUM SHADE 03C3;sigma;GREEK SMALL LETTER SIGMA 03C2;sigma1;GREEK SMALL LETTER FINAL SIGMA 223C;similar;TILDE OPERATOR 0036;six;DIGIT SIX 002F;slash;SOLIDUS 263A;smileface;WHITE SMILING FACE 0020;space;SPACE 2660;spade;BLACK SPADE SUIT 00A3;sterling;POUND SIGN 220B;suchthat;CONTAINS AS MEMBER 2211;summation;N-ARY SUMMATION 263C;sun;WHITE SUN WITH RAYS 0074;t;LATIN SMALL LETTER T 03C4;tau;GREEK SMALL LETTER TAU 0167;tbar;LATIN SMALL LETTER T WITH STROKE 0165;tcaron;LATIN SMALL LETTER T WITH CARON 0163;tcommaaccent;LATIN SMALL LETTER T WITH CEDILLA 2234;therefore;THEREFORE 03B8;theta;GREEK SMALL LETTER THETA 03D1;theta1;GREEK THETA SYMBOL 00FE;thorn;LATIN SMALL LETTER THORN 0033;three;DIGIT THREE 215C;threeeighths;VULGAR FRACTION THREE EIGHTHS 00BE;threequarters;VULGAR FRACTION THREE QUARTERS 02DC;tilde;SMALL TILDE 0303;tildecomb;COMBINING TILDE 0384;tonos;GREEK TONOS 2122;trademark;TRADE MARK SIGN 25BC;triagdn;BLACK DOWN-POINTING TRIANGLE 25C4;triaglf;BLACK LEFT-POINTING POINTER 25BA;triagrt;BLACK RIGHT-POINTING POINTER 25B2;triagup;BLACK UP-POINTING TRIANGLE 0032;two;DIGIT TWO 2025;twodotenleader;TWO DOT LEADER 2154;twothirds;VULGAR FRACTION TWO THIRDS 0075;u;LATIN SMALL LETTER U 00FA;uacute;LATIN SMALL LETTER U WITH ACUTE 016D;ubreve;LATIN SMALL LETTER U WITH BREVE 00FB;ucircumflex;LATIN SMALL LETTER U WITH CIRCUMFLEX 00FC;udieresis;LATIN SMALL LETTER U WITH DIAERESIS 00F9;ugrave;LATIN SMALL LETTER U WITH GRAVE 01B0;uhorn;LATIN SMALL LETTER U WITH HORN 0171;uhungarumlaut;LATIN SMALL LETTER U WITH DOUBLE ACUTE 016B;umacron;LATIN SMALL LETTER U WITH MACRON 005F;underscore;LOW LINE 2017;underscoredbl;DOUBLE LOW LINE 222A;union;UNION 2200;universal;FOR ALL 0173;uogonek;LATIN SMALL LETTER U WITH OGONEK 2580;upblock;UPPER HALF BLOCK 03C5;upsilon;GREEK SMALL LETTER UPSILON 03CB;upsilondieresis;GREEK SMALL LETTER UPSILON WITH DIALYTIKA 03B0;upsilondieresistonos;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS 03CD;upsilontonos;GREEK SMALL LETTER UPSILON WITH TONOS 016F;uring;LATIN SMALL LETTER U WITH RING ABOVE 0169;utilde;LATIN SMALL LETTER U WITH TILDE 0076;v;LATIN SMALL LETTER V 0077;w;LATIN SMALL LETTER W 1E83;wacute;LATIN SMALL LETTER W WITH ACUTE 0175;wcircumflex;LATIN SMALL LETTER W WITH CIRCUMFLEX 1E85;wdieresis;LATIN SMALL LETTER W WITH DIAERESIS 2118;weierstrass;SCRIPT CAPITAL P 1E81;wgrave;LATIN SMALL LETTER W WITH GRAVE 0078;x;LATIN SMALL LETTER X 03BE;xi;GREEK SMALL LETTER XI 0079;y;LATIN SMALL LETTER Y 00FD;yacute;LATIN SMALL LETTER Y WITH ACUTE 0177;ycircumflex;LATIN SMALL LETTER Y WITH CIRCUMFLEX 00FF;ydieresis;LATIN SMALL LETTER Y WITH DIAERESIS 00A5;yen;YEN SIGN 1EF3;ygrave;LATIN SMALL LETTER Y WITH GRAVE 007A;z;LATIN SMALL LETTER Z 017A;zacute;LATIN SMALL LETTER Z WITH ACUTE 017E;zcaron;LATIN SMALL LETTER Z WITH CARON 017C;zdotaccent;LATIN SMALL LETTER Z WITH DOT ABOVE 0030;zero;DIGIT ZERO 03B6;zeta;GREEK SMALL LETTER ZETA gnuplot-4.6.4/term/PostScript/unicode_big.map0000644000471100001440000004226610715653156016203 0ustar =00 U+0000 =01 U+0001 =02 U+0002 =03 U+0003 =04 U+0004 =05 U+0005 =06 U+0006 =07 U+0007 =08 U+0008 =09 U+0009 =0A U+000A =0B U+000B =0C U+000C =0D U+000D =0E U+000E =0F U+000F =10 U+0010 =11 U+0011 =12 U+0012 =13 U+0013 =14 U+0014 =15 U+0015 =16 U+0016 =17 U+0017 =18 U+0018 =19 U+0019 =1A U+001A =1B U+001B =1C U+001C =1D U+001D =1E U+001E =1F U+001F !20 U+0020 space !21 U+0021 exclam !22 U+0022 quotedbl !23 U+0023 numbersign !24 U+0024 dollar !25 U+0025 percent !26 U+0026 ampersand !27 U+0027 quotesingle !28 U+0028 parenleft !29 U+0029 parenright !2A U+002A asterisk !2B U+002B plus !2C U+002C comma !2D U+002D hyphen !2E U+002E period !2F U+002F slash !30 U+0030 zero !31 U+0031 one !32 U+0032 two !33 U+0033 three !34 U+0034 four !35 U+0035 five !36 U+0036 six !37 U+0037 seven !38 U+0038 eight !39 U+0039 nine !3A U+003A colon !3B U+003B semicolon !3C U+003C less !3D U+003D equal !3E U+003E greater !3F U+003F question !40 U+0040 at !41 U+0041 A !42 U+0042 B !43 U+0043 C !44 U+0044 D !45 U+0045 E !46 U+0046 F !47 U+0047 G !48 U+0048 H !49 U+0049 I !4A U+004A J !4B U+004B K !4C U+004C L !4D U+004D M !4E U+004E N !4F U+004F O !50 U+0050 P !51 U+0051 Q !52 U+0052 R !53 U+0053 S !54 U+0054 T !55 U+0055 U !56 U+0056 V !57 U+0057 W !58 U+0058 X !59 U+0059 Y !5A U+005A Z !5B U+005B bracketleft !5C U+005C backslash !5D U+005D bracketright !5E U+005E asciicircum !5F U+005F underscore !60 U+0060 grave !61 U+0061 a !62 U+0062 b !63 U+0063 c !64 U+0064 d !65 U+0065 e !66 U+0066 f !67 U+0067 g !68 U+0068 h !69 U+0069 i !6A U+006A j !6B U+006B k !6C U+006C l !6D U+006D m !6E U+006E n !6F U+006F o !70 U+0070 p !71 U+0071 q !72 U+0072 r !73 U+0073 s !74 U+0074 t !75 U+0075 u !76 U+0076 v !77 U+0077 w !78 U+0078 x !79 U+0079 y !7A U+007A z !7B U+007B braceleft !7C U+007C bar !7D U+007D braceright !7E U+007E asciitilde =A0 U+00A0 !A1 U+00A1 exclamdown !A2 U+00A2 cent !A3 U+00A3 sterling !A4 U+00A4 currency !A5 U+00A5 yen !A6 U+00A6 brokenbar !A7 U+00A7 section !A8 U+00A8 dieresis !A9 U+00A9 copyright !AA U+00AA ordfeminine !AB U+00AB guillemotleft !AC U+00AC logicalnot =AD U+00AD !AE U+00AE registered !AF U+00AF macron !B0 U+00B0 degree !B1 U+00B1 plusminus =B2 U+00B2 =B3 U+00B3 !B4 U+00B4 acute =B5 U+00B5 !B6 U+00B6 paragraph !B7 U+00B7 periodcentered !B8 U+00B8 cedilla =B9 U+00B9 !BA U+00BA ordmasculine !BB U+00BB guillemotright !BC U+00BC onequarter !BD U+00BD onehalf !BE U+00BE threequarters !BF U+00BF questiondown !C0 U+00C0 Agrave !C1 U+00C1 Aacute !C2 U+00C2 Acircumflex !C3 U+00C3 Atilde !C4 U+00C4 Adieresis !C5 U+00C5 Aring !C6 U+00C6 AE !C7 U+00C7 Ccedilla !C8 U+00C8 Egrave !C9 U+00C9 Eacute !CA U+00CA Ecircumflex !CB U+00CB Edieresis !CC U+00CC Igrave !CD U+00CD Iacute !CE U+00CE Icircumflex !CF U+00CF Idieresis !D0 U+00D0 Eth !D1 U+00D1 Ntilde !D2 U+00D2 Ograve !D3 U+00D3 Oacute !D4 U+00D4 Ocircumflex !D5 U+00D5 Otilde !D6 U+00D6 Odieresis !D7 U+00D7 multiply !D8 U+00D8 Oslash !D9 U+00D9 Ugrave !DA U+00DA Uacute !DB U+00DB Ucircumflex !DC U+00DC Udieresis !DD U+00DD Yacute !DE U+00DE Thorn !DF U+00DF germandbls !E0 U+00E0 agrave !E1 U+00E1 aacute !E2 U+00E2 acircumflex !E3 U+00E3 atilde !E4 U+00E4 adieresis !E5 U+00E5 aring !E6 U+00E6 ae !E7 U+00E7 ccedilla !E8 U+00E8 egrave !E9 U+00E9 eacute !EA U+00EA ecircumflex !EB U+00EB edieresis !EC U+00EC igrave !ED U+00ED iacute !EE U+00EE icircumflex !EF U+00EF idieresis !F0 U+00F0 eth !F1 U+00F1 ntilde !F2 U+00F2 ograve !F3 U+00F3 oacute !F4 U+00F4 ocircumflex !F5 U+00F5 otilde !F6 U+00F6 odieresis !F7 U+00F7 divide !F8 U+00F8 oslash !F9 U+00F9 ugrave !FA U+00FA uacute !FB U+00FB ucircumflex !FC U+00FC udieresis !FD U+00FD yacute !FE U+00FE thorn !FF U+00FF ydieresis !100 U+0100 Amacron !101 U+0101 amacron !102 U+0102 Abreve !103 U+0103 abreve !104 U+0104 Aogonek !105 U+0105 aogonek !106 U+0106 Cacute !107 U+0107 cacute !108 U+0108 Ccircumflex !109 U+0109 ccircumflex !10a U+010A Cdotaccent !10b U+010B cdotaccent !10c U+010C Ccaron !10d U+010D ccaron !10e U+010E Dcaron !10f U+010F dcaron !110 U+0110 Dcroat !111 U+0111 dcroat !112 U+0112 Emacron !113 U+0113 emacron !114 U+0114 Ebreve !115 U+0115 ebreve !116 U+0116 Edotaccent !117 U+0117 edotaccent !118 U+0118 Eogonek !119 U+0119 eogonek !11a U+011A Ecaron !11b U+011B ecaron !11c U+011C Gcircumflex !11d U+011D gcircumflex !11e U+011E Gbreve !11f U+011F gbreve !120 U+0120 Gdotaccent !121 U+0121 gdotaccent !122 U+0122 Gcommaaccent !123 U+0123 gcommaaccent !124 U+0124 Hcircumflex !125 U+0125 hcircumflex !126 U+0126 Hbar !127 U+0127 hbar !128 U+0128 Itilde !129 U+0129 itilde !12a U+012A Imacron !12b U+012B imacron !12c U+012C Ibreve !12d U+012D ibreve !12e U+012E Iogonek !12f U+012F iogonek !130 U+0130 Idotaccent !131 U+0131 dotlessi !132 U+0132 IJ !133 U+0133 ij !134 U+0134 Jcircumflex !135 U+0135 jcircumflex !136 U+0136 Kcommaaccent !137 U+0137 kcommaaccent !138 U+0138 kgreenlandic !139 U+0139 Lacute !13a U+013A lacute !13b U+013B Lcommaaccent !13c U+013C lcommaaccent !13d U+013D Lcaron !13e U+013E lcaron !13f U+013F Ldot !140 U+0140 ldot !141 U+0141 Lslash !142 U+0142 lslash !143 U+0143 Nacute !144 U+0144 nacute !145 U+0145 Ncommaaccent !146 U+0146 ncommaaccent !147 U+0147 Ncaron !148 U+0148 ncaron !149 U+0149 napostrophe !14a U+014A Eng !14b U+014B eng !14c U+014C Omacron !14d U+014D omacron !14e U+014E Obreve !14f U+014F obreve !150 U+0150 Ohungarumlaut !151 U+0151 ohungarumlaut !152 U+0152 OE !153 U+0153 oe !154 U+0154 Racute !155 U+0155 racute !156 U+0156 Rcommaaccent !157 U+0157 rcommaaccent !158 U+0158 Rcaron !159 U+0159 rcaron !15a U+015A Sacute !15b U+015B sacute !15c U+015C Scircumflex !15d U+015D scircumflex !15e U+015E Scedilla !15f U+015F scedilla !160 U+0160 Scaron !161 U+0161 scaron !162 U+0162 Tcommaaccent !163 U+0163 tcommaaccent !164 U+0164 Tcaron !165 U+0165 tcaron !166 U+0166 Tbar !167 U+0167 tbar !168 U+0168 Utilde !169 U+0169 utilde !16a U+016A Umacron !16b U+016B umacron !16c U+016C Ubreve !16d U+016D ubreve !16e U+016E Uring !16f U+016F uring !170 U+0170 Uhungarumlaut !171 U+0171 uhungarumlaut !172 U+0172 Uogonek !173 U+0173 uogonek !174 U+0174 Wcircumflex !175 U+0175 wcircumflex !176 U+0176 Ycircumflex !177 U+0177 ycircumflex !178 U+0178 Ydieresis !179 U+0179 Zacute !17a U+017A zacute !17b U+017B Zdotaccent !17c U+017C zdotaccent !17d U+017D Zcaron !17e U+017E zcaron !17f U+017F longs !180 U+0192 florin !181 U+01A0 Ohorn !182 U+01A1 ohorn !183 U+01AF Uhorn !184 U+01B0 uhorn !185 U+01E6 Gcaron !186 U+01E7 gcaron !187 U+01FA Aringacute !188 U+01FB aringacute !189 U+01FC AEacute !18a U+01FD aeacute !18b U+01FE Oslashacute !18c U+01FF oslashacute !18d U+0218 uni0218 !18e U+0219 uni0219 !18f U+02BC uni02BC !190 U+02BD uni02BD !191 U+02C6 uni02C6 !192 U+02C7 uni02C7 !193 U+02D8 uni02D8 !194 U+02D9 uni02D9 !195 U+02DA uni02DA !196 U+02DB uni02DB !197 U+02DC uni02DC !198 U+02DD uni02DD !199 U+0300 uni0300 !19a U+0301 uni0301 !19b U+0303 uni0303 !19c U+0309 uni0309 !19d U+0323 uni0323 !19e U+0391 uni0391 !19f U+0392 uni0392 !1a0 U+0393 uni0393 !1a1 U+0394 uni0394 !1a2 U+0395 uni0395 !1a3 U+0396 uni0396 !1a4 U+0397 uni0397 !1a5 U+0398 uni0398 !1a6 U+0399 uni0399 !1a7 U+039A uni039A !1a8 U+039B uni039B !1a9 U+039C uni039C !1aa U+039D uni039D !1ab U+039E uni039E !1ac U+039F uni039F !1ad U+03A0 uni03A0 !1ae U+03A1 uni03A1 !1af U+03A3 uni03A3 !1b0 U+03A4 uni03A4 !1b1 U+03A5 uni03A5 !1b2 U+03A6 uni03A6 !1b3 U+03A7 uni03A7 !1b4 U+03A8 uni03A8 !1b5 U+03A9 uni03A9 !1b6 U+03B1 uni03B1 !1b7 U+03B2 uni03B2 !1b8 U+03B3 uni03B3 !1b9 U+03B4 uni03B4 !1ba U+03B5 uni03B5 !1bb U+03B6 uni03B6 !1bc U+03B7 uni03B7 !1bd U+03B8 uni03B8 !1be U+03B9 uni03B9 !1bf U+03BA uni03BA !1c0 U+03BB uni03BB !1c1 U+03BC uni03BC !1c2 U+03BD uni03BD !1c3 U+03BE uni03BE !1c4 U+03BF uni03BF !1c5 U+03C0 uni03C0 !1c6 U+03C1 uni03C1 !1c7 U+03C2 uni03C2 !1c8 U+03C3 uni03C3 !1c9 U+03C4 uni03C4 !1ca U+03C5 uni03C5 !1cb U+03C6 uni03C6 !1cc U+03C7 uni03C7 !1cd U+03C8 uni03C8 !1ce U+03C9 uni03C9 !1cf U+03D0 uni03D0 !1d0 U+03D1 uni03D1 !1d1 U+03D5 uni03D5 !1d2 U+03D6 uni03D6 !1d3 U+0401 uni0401 !1d4 U+0402 uni0402 !1d5 U+0403 uni0403 !1d6 U+0404 uni0404 !1d7 U+0405 uni0405 !1d8 U+0406 uni0406 !1d9 U+0407 uni0407 !1da U+0408 uni0408 !1db U+0409 uni0409 !1dc U+040A uni040A !1dd U+040B uni040B !1de U+040C uni040C !1df U+040E uni040E !1e0 U+040F uni040F !1e1 U+0410 uni0410 !1e2 U+0411 uni0411 !1e3 U+0412 uni0412 !1e4 U+0413 uni0413 !1e5 U+0414 uni0414 !1e6 U+0415 uni0415 !1e7 U+0416 uni0416 !1e8 U+0417 uni0417 !1e9 U+0418 uni0418 !1ea U+0419 uni0419 !1eb U+041A uni041A !1ec U+041B uni041B !1ed U+041C uni041C !1ee U+041D uni041D !1ef U+041E uni041E !1f0 U+041F uni041F !1f1 U+0420 uni0420 !1f2 U+0421 uni0421 !1f3 U+0422 uni0422 !1f4 U+0423 uni0423 !1f5 U+0424 uni0424 !1f6 U+0425 uni0425 !1f7 U+0426 uni0426 !1f8 U+0427 uni0427 !1f9 U+0428 uni0428 !1fa U+0429 uni0429 !1fb U+042A uni042A !1fc U+042B uni042B !1fd U+042C uni042C !1fe U+042D uni042D !1ff U+042E uni042E !200 U+042F uni042F !201 U+0430 uni0430 !202 U+0431 uni0431 !203 U+0432 uni0432 !204 U+0433 uni0433 !205 U+0434 uni0434 !206 U+0435 uni0435 !207 U+0436 uni0436 !208 U+0437 uni0437 !209 U+0438 uni0438 !20a U+0439 uni0439 !20b U+043A uni043A !20c U+043B uni043B !20d U+043C uni043C !20e U+043D uni043D !20f U+043E uni043E !210 U+043F uni043F !211 U+0440 uni0440 !212 U+0441 uni0441 !213 U+0442 uni0442 !214 U+0443 uni0443 !215 U+0444 uni0444 !216 U+0445 uni0445 !217 U+0446 uni0446 !218 U+0447 uni0447 !219 U+0448 uni0448 !21a U+0449 uni0449 !21b U+044A uni044A !21c U+044B uni044B !21d U+044C uni044C !21e U+044D uni044D !21f U+044E uni044E !220 U+044F uni044F !221 U+0451 uni0451 !222 U+0452 uni0452 !223 U+0453 uni0453 !224 U+0454 uni0454 !225 U+0455 uni0455 !226 U+0456 uni0456 !227 U+0457 uni0457 !228 U+0458 uni0458 !229 U+0459 uni0459 !22a U+045A uni045A !22b U+045B uni045B !22c U+045C uni045C !22d U+045E uni045E !22e U+045F uni045F !22f U+0490 uni0490 !230 U+0491 uni0491 !231 U+05D0 uni05D0 !232 U+05D1 uni05D1 !233 U+05D2 uni05D2 !234 U+05D3 uni05D3 !235 U+05D4 uni05D4 !236 U+05D5 uni05D5 !237 U+05D6 uni05D6 !238 U+05D7 uni05D7 !239 U+05D8 uni05D8 !23a U+05D9 uni05D9 !23b U+05DA uni05DA !23c U+05DB uni05DB !23d U+05DC uni05DC !23e U+05DD uni05DD !23f U+05DE uni05DE !240 U+05DF uni05DF !241 U+05E0 uni05E0 !242 U+05E1 uni05E1 !243 U+05E2 uni05E2 !244 U+05E3 uni05E3 !245 U+05E4 uni05E4 !246 U+05E5 uni05E5 !247 U+05E6 uni05E6 !248 U+05E7 uni05E7 !249 U+05E8 uni05E8 !24a U+05E9 uni05E9 !24b U+05EA uni05EA !24c U+1E80 uni1E80 Extended latin !24d U+1E81 uni1E81 Extended latin !24e U+1E82 uni1E82 Extended latin !24f U+1E83 uni1E83 Extended latin !250 U+1E84 uni1E84 Extended latin !251 U+1E85 uni1E85 Extended latin !252 U+1EF2 uni1EF2 Extended latin !253 U+1EF3 uni1EF3 Extended latin !254 U+200C uni200C !255 U+200D uni200D !256 U+200E uni200E !257 U+200F uni200F !258 U+2012 uni2012 !259 U+2013 uni2013 !25a U+2014 uni2014 !25b U+2015 uni2015 !25c U+2017 uni2017 !25d U+2018 uni2018 !25e U+2019 uni2019 !25f U+201A uni201A !260 U+201B uni201B !261 U+201C uni201C !262 U+201D uni201D !263 U+201E uni201E !264 U+2020 uni2020 !265 U+2021 uni2021 !266 U+2022 uni2022 !267 U+2024 uni2024 !268 U+2025 uni2025 !269 U+2026 uni2026 !26a U+202C uni202C !26b U+202D uni202D !26c U+202E uni202E !26d U+2032 uni2032 !26e U+2033 uni2033 !26f U+2034 uni2034 !270 U+2035 uni2035 !271 U+2036 uni2036 !272 U+2037 uni2037 !273 U+2039 uni2039 !274 U+203A uni203A !275 U+203C uni203C !276 U+2044 uni2044 !277 U+20AC uni20AC !278 U+2107 uni2107 !279 U+210B uni210B !27a U+210E uni210E !27b U+210F uni210F !27c U+2111 uni2111 !27d U+2112 uni2112 !27e U+2113 uni2113 !27f U+2115 uni2115 !280 U+2116 uni2116 !281 U+2118 uni2118 !282 U+2119 uni2119 !283 U+211A uni211A !284 U+211B uni211B !285 U+211C uni211C !286 U+211D uni211D !287 U+2122 uni2122 !288 U+2124 uni2124 !289 U+2126 uni2126 !28a U+2127 uni2127 !28b U+2128 uni2128 !28c U+2129 uni2129 !28d U+212B uni212B !28e U+212C uni212C !28f U+212E uni212E !290 U+212F uni212F !291 U+2130 uni2130 !292 U+2131 uni2131 !293 U+2133 uni2133 !294 U+2134 uni2134 !295 U+2135 uni2135 !296 U+2136 uni2136 !297 U+2137 uni2137 !298 U+2138 uni2138 !299 U+2190 uni2190 !29a U+2191 uni2191 !29b U+2192 uni2192 !29c U+2193 uni2193 !29d U+2194 uni2194 !29e U+2195 uni2195 !2a1 U+21D0 uni21D0 !2a2 U+21D1 uni21D1 !2a3 U+21D2 uni21D2 !2a4 U+21D3 uni21D3 !2a5 U+21D4 uni21D4 !2a6 U+2200 uni2200 !2a7 U+2202 uni2202 !2a8 U+2203 uni2203 !2a9 U+2204 uni2204 !2aa U+2205 uni2205 !2ab U+2206 uni2206 !2ac U+2207 uni2207 !2ad U+2208 uni2208 !2ae U+2209 uni2209 !2af U+220A uni220A !2b0 U+220B uni220B !2b1 U+220C uni220C !2b2 U+220D uni220D !2b3 U+220E uni220E !2b4 U+220F uni220F !2b5 U+2210 uni2210 !2b6 U+2211 uni2211 !2b7 U+2212 uni2212 !2b8 U+2213 uni2213 !2b9 U+2214 uni2214 !2ba U+2215 uni2215 !2bb U+2216 uni2216 !2bc U+2217 uni2217 !2bd U+2218 uni2218 !2be U+2219 uni2219 !2bf U+221A uni221A !2c0 U+221B uni221B !2c1 U+221C uni221C !2c2 U+221D uni221D !2c3 U+221E uni221E !2c4 U+221F uni221F !2c5 U+2220 uni2220 !2c6 U+2221 uni2221 !2c7 U+2222 uni2222 !2c8 U+2223 uni2223 !2c9 U+2224 uni2224 !2ca U+2225 uni2225 !2cb U+2226 uni2226 !2cc U+2227 uni2227 !2cd U+2228 uni2228 !2ce U+2229 uni2229 !2cf U+222A uni222A !2d0 U+222B uni222B !2d1 U+222C uni222C !2d2 U+222D uni222D !2d3 U+222E uni222E !2d4 U+222F uni222F !2d5 U+2230 uni2230 !2d6 U+2231 uni2231 !2d7 U+2232 uni2232 !2d8 U+2233 uni2233 !2d9 U+2234 uni2234 !2da U+2235 uni2235 !2db U+2236 uni2236 !2dc U+2237 uni2237 !2dd U+2238 uni2238 !2de U+2239 uni2239 !2df U+223A uni223A !2e0 U+223B uni223B !2e1 U+223C uni223C !2e2 U+223D uni223D !2e3 U+223E uni223E !2e4 U+223F uni223F !2e5 U+2240 uni2240 !2e6 U+2241 uni2241 !2e7 U+2242 uni2242 !2e8 U+2243 uni2243 !2e9 U+2244 uni2244 !2ea U+2245 uni2245 !2eb U+2246 uni2246 !2ec U+2247 uni2247 !2ed U+2248 uni2248 !2ee U+2249 uni2249 !2ef U+224A uni224A !2f0 U+224B uni224B !2f1 U+224C uni224C !2f2 U+224D uni224D !2f3 U+224E uni224E !2f4 U+224F uni224F !2f5 U+225F uni225F !2f6 U+2260 uni2260 !2f7 U+2261 uni2261 !2f8 U+2262 uni2262 !2f9 U+2263 uni2263 !2fa U+2264 uni2264 !2fb U+2265 uni2265 !2fc U+2266 uni2266 !2fd U+2267 uni2267 !2fe U+2268 uni2268 !2ff U+2269 uni2269 !300 U+226A uni226A !301 U+226B uni226B !302 U+226C uni226C !303 U+226D uni226D !304 U+226E uni226E !305 U+226F uni226F !306 U+2270 uni2270 !307 U+2271 uni2271 !308 U+2272 uni2272 !309 U+2273 uni2273 !30a U+2274 uni2274 !30b U+2275 uni2275 !30c U+2276 uni2276 !30d U+2277 uni2277 !30e U+2278 uni2278 !30f U+2279 uni2279 !310 U+227A uni227A !311 U+227B uni227B !312 U+227C uni227C !313 U+227D uni227D !314 U+227E uni227E !315 U+227F uni227F !316 U+2280 uni2280 !317 U+2281 uni2281 !318 U+2282 uni2282 !319 U+2283 uni2283 !31a U+2284 uni2284 !31b U+2285 uni2285 !31c U+2286 uni2286 !31d U+2287 uni2287 !31e U+2288 uni2288 !31f U+2289 uni2289 !320 U+22C0 uni22C0 !321 U+22C1 uni22C1 !322 U+22C2 uni22C2 !323 U+22C3 uni22C3 !324 U+22C4 uni22C4 !325 U+22C5 uni22C5 !326 U+2302 uni2302 !327 U+2310 uni2310 !328 U+2320 uni2320 !329 U+2321 uni2321 !32a U+2322 uni2322 !32b U+2323 uni2323 !32c U+2329 uni2329 !32d U+232A uni232A !32e U+239B uni239B !32f U+239C uni239C !330 U+239D uni239D !331 U+239E uni239E !332 U+239F uni239F !333 U+23A0 uni23A0 !334 U+23A1 uni23A1 !335 U+23A2 uni2392 !336 U+23A3 uni23A3 !337 U+23A4 uni23A4 !338 U+23A5 uni23A5 !339 U+23A6 uni23A6 !33a U+23A7 uni23A7 !33b U+23A8 uni23A8 !33c U+23A9 uni23A9 !33d U+23AA uni23AA !33e U+23AB uni23AB !33f U+23AC uni23AC !340 U+23AD uni23AD !341 U+23AE uni23AE !342 U+23AF uni23AF !343 U+23B0 uni23B0 !344 U+23B1 uni23B1 !345 U+23B2 uni23B2 !346 U+23B3 uni23B3 !347 U+23B4 uni23B4 !348 U+23B5 uni23B5 !349 U+23B6 uni23B6 !34a U+23B7 uni23B7 !34b U+23B8 uni23B8 !34c U+23B9 uni23B9 !34d U+23BA uni23BA !34e U+23BB uni23BB !34f U+23BC uni23BC !350 U+23BD uni23BD !351 U+23BE uni23BE !352 U+23BF uni23BF !353 U+23DE uni23DE !354 U+23DF uni23DF !355 U+23E1 uni23E1 !356 U+25A0 uni25A0 !357 U+25A1 uni25A1 !358 U+25AA uni25AA !359 U+25AB uni25AB !35b U+25B2 uni25B2 !35c U+25B3 uni25B3 !35d U+25BC uni25BC !35e U+25BD uni25BD !35a U+25C6 uni25C6 !35f U+25CA uni25CA !360 U+25CB uni25CB !361 U+25CF uni25CF !364 U+25E6 uni25E6 !362 U+25FB uni25FB !363 U+25FC uni25FC !365 U+2609 uni2609 !366 U+2639 uni2639 !367 U+263C uni263C !368 U+263D uni263D !369 U+263E uni263E !36a U+263F uni263F !36b U+2640 uni2640 !36c U+2641 uni2641 !36d U+2642 uni2642 !36e U+2643 uni2643 !36f U+2644 uni2644 !370 U+2645 uni2645 !371 U+2646 uni2646 !372 U+2647 uni2647 !373 U+2648 uni2648 !374 U+2649 uni2649 !375 U+264A uni264A !376 U+264B uni264B !377 U+264C uni264C !378 U+264D uni264D !379 U+264E uni264E !37a U+264F uni264F !37b U+2650 uni2650 !37c U+2651 uni2651 !37d U+2652 uni2652 !37e U+2653 uni2653 !37f U+25C7 uni25C7 !380 U+2297 uni2297 !381 U+2299 uni2299 gnuplot-4.6.4/term/x11.trm0000644000471100001440000024247212206707272012255 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: x11.trm,v 1.193.2.3 2013/08/24 22:46:48 sfeam Exp $ * */ /* GNUPLOT - x11.trm */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * x11.trm --- inboard terminal driver for X11 */ /* Petr Mikulik and Johannes Zellner: added mouse support (October 1999) * Implementation and functionality is based on pm.trm */ /* X11 support for Petr Mikulik's pm3d * by Johannes Zellner * (November 1999 - January 2000) */ /* Dynamic font support, enhanced text mode support, * additional feedback from outboard driver * Ethan A Merritt * 2003 */ /* Daniel Sebald: added X11 support for images. (27 February 2003) */ #include "driver.h" #ifdef TERM_REGISTER register_term(x11) #endif #ifdef TERM_PROTO int X11_args __PROTO((int argc, char *argv[])); TERM_PUBLIC void X11_options __PROTO((void)); TERM_PUBLIC void X11_init __PROTO((void)); TERM_PUBLIC void X11_graphics __PROTO((void)); TERM_PUBLIC void X11_text __PROTO((void)); TERM_PUBLIC int X11_set_font __PROTO((const char * fontname)); TERM_PUBLIC void X11_reset __PROTO((void)); TERM_PUBLIC void X11_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void X11_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void X11_linewidth __PROTO((double lw)); TERM_PUBLIC void X11_pointsize __PROTO((double ps)); TERM_PUBLIC void X11_linetype __PROTO((int lt)); TERM_PUBLIC void X11_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC int X11_text_angle __PROTO((int i)); TERM_PUBLIC int X11_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void X11_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void X11_fillbox __PROTO((int style, unsigned int x, unsigned int y, unsigned int width, unsigned int height)); TERM_PUBLIC void X11_send_endianess __PROTO((void)); # ifdef USE_MOUSE TERM_PUBLIC int X11_waitforinput __PROTO((void)); TERM_PUBLIC void X11_set_ruler __PROTO((int, int)); TERM_PUBLIC void X11_set_cursor __PROTO((int, int, int)); TERM_PUBLIC void X11_put_tmptext __PROTO((int, const char str[])); TERM_PUBLIC void X11_set_clipboard __PROTO((const char[])); # endif TERM_PUBLIC void X11_update_opts __PROTO((void)); TERM_PUBLIC int X11_make_palette __PROTO((t_sm_palette *)); TERM_PUBLIC void X11_set_color __PROTO((t_colorspec *)); TERM_PUBLIC void X11_filled_polygon __PROTO((int, gpiPoint *)); TERM_PUBLIC void X11_image __PROTO((unsigned int, unsigned int, coordval *, gpiPoint *, t_imagecolor)); /* To support "set term x11 enhanced" */ TERM_PUBLIC void ENHX11_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC void ENHX11_OPEN __PROTO((char * fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint)); TERM_PUBLIC void ENHX11_FLUSH __PROTO((void)); # define X11_XMAX 4096 # define X11_YMAX 4096 static int X11_SIZE_X = 640; static int X11_SIZE_Y = 450; static int X11_POSITION_X = 0; static int X11_POSITION_Y = 0; /* approximations for typical font/screen sizes */ # define X11_VCHAR (X11_YMAX/25) # define X11_HCHAR (X11_XMAX/100) # define X11_VTIC (X11_YMAX/100) # define X11_HTIC (X11_XMAX/150) #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include "gplt_x11.h" /* non-zero if '-display' found on command line */ static int X11_Display = 0; /* Fonts can have very long names */ /* EAM FIXME - these should be dynamically allocated */ #define X11_MAX_FONTNAME_LENGTH 255 static char X11_default_font[X11_MAX_FONTNAME_LENGTH+1] = {'\0'}; static int X11_default_fontsize = 12; static char X11_last_font_used[X11_MAX_FONTNAME_LENGTH+1] = {'\01','\0'}; static char X11_next_font_used[X11_MAX_FONTNAME_LENGTH+1] = {'\0'}; static enum JUSTIFY X11_last_justification = LEFT; static void X11_atexit __PROTO((void)); static void X11_set_default_font __PROTO((void)); static void transmit_gradient __PROTO((gradient_struct *gradient, int cnt)); /* Merged the old char X11_opts[] and int X11_optarg[] * into one array of structs. * Loosely based on XrmOptionDescRec, the use of which * would probably be overkill here. */ typedef enum { hasNoArg, hasArg } OptionArg; static struct x11opt { const char *option; /* Name of option */ OptionArg arg; /* Whether option has argument */ } X11_cmdopts[] = { { "-mono", hasNoArg}, { "-gray", hasNoArg}, { "-clear", hasNoArg}, { "-tvtwm", hasNoArg}, { "-pointsize", hasArg}, { "-iconic", hasNoArg}, { "-rv", hasNoArg}, { "-reverse", hasNoArg}, { "+rv", hasNoArg}, { "-synchronous", hasNoArg}, { "-display", hasArg}, { "-geometry", hasArg}, { "-bg", hasArg}, { "-background", hasArg}, { "-bd", hasArg}, { "-bordercolor", hasArg}, { "-bw", hasArg}, { "-borderwidth", hasArg}, { "-fg", hasArg}, { "-foreground", hasArg}, { "-fn", hasArg}, { "-font", hasArg}, { "-name", hasArg}, { "-selectionTimeout", hasArg}, { "-title", hasArg}, { "-xnllanguage", hasArg}, { "-xrm", hasArg}, { "-raise", hasNoArg}, { "-noraise", hasNoArg}, { "-solid", hasNoArg}, { "-dashed", hasNoArg} #ifdef USE_MOUSE , { "-nofeedback", hasNoArg} , { "-noevents", hasNoArg} , { "-ctrlq", hasNoArg} #endif }; #define X11_nopts (sizeof(X11_cmdopts) / sizeof(X11_cmdopts[0])) static FILE *X11_ipc = (FILE *) 0; #ifdef PIPE_IPC #define X11_ipc_back_fd ipc_back_fd #endif /* reserve a minimum 10 driver opts */ static char *optvec[2 * X11_nopts + 1 + 10]; static char x11_userbkg[] = "#RRGGBB"; /* gnuplot_x11 has extension .exe on OS/2 and Windows (and on RSX/VMS, but these construct their own full path GNUPLOT_X11 in their build script). */ # if defined(OS2) || defined(_Windows) # ifndef GNUPLOT_X11 static char X11_default_command[] = "gnuplot_x11.exe"; # else static char X11_default_command[] = GNUPLOT_X11 ".exe"; # endif # else /* thus !OS/2 && !Windows */ # ifndef GNUPLOT_X11 static char X11_default_command[] = "gnuplot_x11"; # else static char X11_default_command[] = GNUPLOT_X11; # endif # endif /* OS/2 || Windows */ static char *X11_command = X11_default_command; static char *X11_command_parsed = NULL; static char *X11_full_command_path = NULL; /* must match the definition in src/gplt_x11.c: */ static int persist = UNSET; static int do_raise = UNSET; static int dashedlines = UNSET; static int ctrlq = UNSET; static int set_size = UNSET; static int set_position = UNSET; /* driver properties managed by x11.trm rather than gnuplot_x11 */ static double X11_linewidth_multiplier = 1.0; #ifdef USE_MOUSE /* Interlock to prevent the mouse channel from being coopted more than * once per plot by the gnuplot_x11<->x11.trm font information query. */ static TBOOLEAN default_font_size_known = FALSE; static TBOOLEAN X11_MOUSE_FEEDBACK = TRUE; #endif #ifdef PIPE_IPC static TBOOLEAN IPC_LOCK = FALSE; #endif static int parse_driver __PROTO((const char *)); static int parse_driver(const char *cmd) { int nr = 0; char *ptr; /* make a copy of cmd, as parsing will modify the string */ X11_command_parsed = gp_realloc(X11_command_parsed, strlen(cmd) + 1, "x11->parse_driver"); strcpy(X11_command_parsed, X11_command); ptr = X11_command_parsed; while (*ptr != '\0' && nr < sizeof(optvec) / sizeof(char)) { /* Strip whitespace. Use nulls, so that * the previous argument is terminated * automatically. */ while (isspace((unsigned char)*ptr)) *ptr++ = '\0'; if (!(*ptr)) /* don't count the terminating NULL */ break; /* Save the argument. */ optvec[nr++] = ptr; /* Skip over the argument. */ while ('\0' != *ptr && !isspace((unsigned char)*ptr)) { ptr++; } } /* HBB 20020214: new code to prepend the environment X11_DRIVER_DIR * to the command name, if it doesn't contain any slashes yet */ if (!strchr(optvec[0],'/')) { char *dir = getenv("GNUPLOT_DRIVER_DIR"); if (!dir) dir = X11_DRIVER_DIR; #ifndef OS2 if (dir[0] != '/' && dir[0] != '.') { /* Can't call int_error because longjump has not been set up yet */ int_warn(NO_CARET, "Illegal X11 driver directory name! Using default"); dir = ""; } #endif X11_full_command_path = gp_realloc(X11_full_command_path, strlen(dir) + strlen(optvec[0]) + 2, "x11 driver pathname"); /* optvec[0] = X11_full_command_path; */ if (*dir) sprintf(X11_full_command_path, "%s/%s", dir, optvec[0]); else sprintf(X11_full_command_path, "%s", optvec[0]); } return nr; } /* X11_args - scan gnuplot command line for standard X Toolkit options * called from plot.c so must not be TERM_PUBLIC (which may be static) */ int X11_args(int argc, char *argv[]) { int nx11 = 0, i, n; char **xargv, **xargv_orig; xargv = xargv_orig = (char **) gp_alloc(argc * sizeof(char *), ""); /* We make a copy of the argument vector because * argv is modified later. */ memcpy(xargv, argv, argc * sizeof(char *)); i = parse_driver(X11_command); if (persist_cl) { optvec[i++] = "-persist"; } while (++argv, ++xargv, --argc > 0) { if (!strcmp(*argv,"--persist") || !strncmp(*argv,"-p",2)) { nx11++; continue; } for (n = 0; n < X11_nopts; n++) { if (strcmp(*argv, X11_cmdopts[n].option) == 0) { optvec[i++] = *xargv; #ifdef USE_MOUSE if (strcmp(*argv, "-nofeedback") == 0) X11_MOUSE_FEEDBACK = FALSE; #endif if (strcmp(*argv, "-display") == 0) X11_Display++; if (X11_cmdopts[n].arg == hasArg) { if (--argc <= 0) { free(xargv_orig); return nx11; } optvec[i++] = *++xargv, ++argv; nx11++; } if (i >= (sizeof(optvec) / sizeof(char))) { fprintf(stderr, "warning: X11 options will be truncated\n"); free(xargv_orig); return nx11; /* optvec is full */ } nx11++; break; } } if (n == X11_nopts) break; } free(xargv_orig); return (nx11); } enum X11_id { X11_RESET, X11_CLOSE, X11_PERSIST, X11_NOPERSIST, X11_RAISE, X11_NORAISE, X11_FONT, X11_TITLE, X11_ENHANCED, X11_NOENHANCED, X11_SOLID, X11_DASHED, X11_LINEWIDTH, X11_CTRLQ, X11_NOCTRLQ, X11_SIZE, X11_POSITION, X11_BACKGROUND, #ifdef EXTERNAL_X11_WINDOW X11_WINDOW, #endif X11_OTHER }; static struct gen_table X11_opts[] = { {"res$et", X11_RESET}, {"cl$ose", X11_CLOSE}, {"per$sist", X11_PERSIST}, {"noper$sist", X11_NOPERSIST}, {"rai$se", X11_RAISE}, {"norai$se", X11_NORAISE}, {"font", X11_FONT}, {"fn$ame", X11_FONT}, {"ti$tle", X11_TITLE}, {"enh$anced", X11_ENHANCED}, {"noenh$anced", X11_NOENHANCED}, {"solid", X11_SOLID}, {"dash$ed", X11_DASHED}, {"linew$idth", X11_LINEWIDTH}, {"lw", X11_LINEWIDTH}, {"ctrl$q", X11_CTRLQ}, {"noctrl$q", X11_NOCTRLQ}, {"si$ze", X11_SIZE}, {"pos$ition", X11_POSITION}, {"backg$round", X11_BACKGROUND}, #ifdef EXTERNAL_X11_WINDOW {"w$indow", X11_WINDOW}, #endif {NULL, X11_OTHER} }; TERM_PUBLIC void X11_options() { #define NOT_PROCESS_IF_DUPLICATION 1 int c_title_token = 0; int new_term_number = 0; int background; TBOOLEAN duplication = FALSE; TBOOLEAN set_reset = FALSE, set_persist = FALSE, set_raise = FALSE, set_font = FALSE; TBOOLEAN set_ctrlq = FALSE; TBOOLEAN set_title = FALSE, set_number = FALSE, set_close = FALSE, set_solid = FALSE; #ifdef EXTERNAL_X11_WINDOW unsigned long existing_X11_window_id = 0; TBOOLEAN set_window = FALSE; #endif do_raise = dashedlines = ctrlq = UNSET; set_size = set_position = UNSET; persist = persist_cl; /* previously set from command line */ strcpy(x11_userbkg,"#RRGGBB"); while (!END_OF_COMMAND) { switch (lookup_table(&X11_opts[0], c_token)) { case X11_RESET: c_token++; if (set_reset) duplication=TRUE; set_reset = TRUE; break; case X11_CLOSE: c_token++; if (set_close) duplication=TRUE; set_close = TRUE; break; case X11_PERSIST: persist = yes; c_token++; if (set_persist) duplication=TRUE; set_persist = TRUE; break; case X11_NOPERSIST: persist = no; c_token++; if (set_persist) duplication=TRUE; set_persist = TRUE; break; case X11_CTRLQ: ctrlq = yes; c_token++; if (set_ctrlq) duplication=TRUE; set_ctrlq = TRUE; break; case X11_NOCTRLQ: ctrlq = no; c_token++; if (set_ctrlq) duplication=TRUE; set_ctrlq = TRUE; break; case X11_SOLID: dashedlines = FALSE; c_token++; if (set_solid) duplication=TRUE; set_solid = TRUE; break; case X11_DASHED: dashedlines = TRUE; c_token++; if (set_solid) duplication=TRUE; set_solid = TRUE; break; case X11_LINEWIDTH: c_token++; X11_linewidth_multiplier = real_expression(); if (X11_linewidth_multiplier <= 0) X11_linewidth_multiplier = 1.0; break; case X11_RAISE: do_raise = yes; c_token++; if (set_raise) duplication=TRUE; set_raise = TRUE; break; case X11_NORAISE: do_raise = no; c_token++; if (set_raise) duplication=TRUE; set_raise = TRUE; break; case X11_FONT: c_token++; if (END_OF_COMMAND) int_error(c_token, "expecting font name"); if (isstringvalue(c_token)) { char *s = try_to_get_string(); strncpy(X11_default_font, s, sizeof(X11_default_font)); free(s); } else { copy_str(X11_default_font, c_token, sizeof(X11_default_font)); c_token++; } if (strchr(X11_default_font,',')) sscanf(strchr(X11_default_font,',')+1, "%d", &X11_default_fontsize); if (set_font) duplication=TRUE; set_font = TRUE; break; case X11_TITLE: c_token++; if (END_OF_COMMAND) int_error(c_token, "expecting title text"); c_title_token = c_token; c_token++; if (set_title) duplication=TRUE; set_title = TRUE; break; case X11_ENHANCED: term->put_text = ENHX11_put_text; term->flags |= TERM_ENHANCED_TEXT; c_token++; break; case X11_NOENHANCED: term->put_text = X11_put_text; term->flags &= ~TERM_ENHANCED_TEXT; c_token++; break; case X11_SIZE: c_token++; if (END_OF_COMMAND) { int_error(c_token, "expecting X[,Y]"); } else { int x_in, y_in; x_in = int_expression(); if (x_in > 0) X11_SIZE_X = x_in; else int_error(c_token, "X size must be > 0"); if (equals(c_token, ",")) { c_token++; y_in = int_expression(); if (y_in > 0) X11_SIZE_Y = y_in; else int_error(c_token, "Y size must be > 0"); } set_size = yes; } break; case X11_POSITION: c_token++; if (END_OF_COMMAND) { int_error(c_token, "expecting X[,Y]"); } else { X11_POSITION_X = int_expression(); if (equals(c_token, ",")) { c_token++; X11_POSITION_Y = int_expression(); } set_position = yes; } break; case X11_BACKGROUND: c_token++; background = parse_color_name(); sprintf(x11_userbkg,"#%06x",background); break; #ifdef EXTERNAL_X11_WINDOW case X11_WINDOW: { char *windowid; c_token++; if (!(windowid = try_to_get_string())) int_error(c_token, "expecting X window ID as string in hex"); sscanf(windowid,"%lx",&existing_X11_window_id); free(windowid); if (!existing_X11_window_id) int_error(c_token, "expecting X window ID as string in hex"); if (set_window) duplication=TRUE; set_window = TRUE; break; } #endif case X11_OTHER: default: if (set_number) duplication=TRUE; /* let gnuplot_x11 check range */ new_term_number = int_expression(); if (new_term_number < 0) int_error(c_token, "plot number must be non-negative"); set_number = TRUE; break; } if (duplication) { int_error(c_token-1, "duplicated or contradicting arguments in X11 term options"); } } /* Call own init routine; this might be xlib rather than x11 */ term->init(); if (set_reset) X11_atexit(); /* tell gnuplot_x11 to shut down */ /* Leave the current window unchanged when closing an old window */ if (X11_ipc) { if (set_close) { if (set_number) { fprintf(X11_ipc, "C%d\n", new_term_number); } else { fputs("C\n", X11_ipc); } fflush(X11_ipc); } else if (set_number) { #ifdef EXTERNAL_X11_WINDOW if (set_window) int_error(NO_CARET,"an existing X11 window cannot be asigned to a plot number"); #endif fprintf(X11_ipc, "N%d\n", new_term_number); fflush(X11_ipc); #ifdef EXTERNAL_X11_WINDOW } else if (set_window) { fprintf(X11_ipc, "%c%lx\n", X11_GR_SET_WINDOW_ID, existing_X11_window_id); fflush(X11_ipc); #endif } } #ifdef EXTERNAL_X11_WINDOW if (set_window) { sprintf(term_options, "XID 0x%lX", existing_X11_window_id); } else #endif if (set_number && new_term_number >= 0) { sprintf(term_options, "%d", new_term_number); } if (UNSET != do_raise) { strcat(term_options, (yes == do_raise ? " raise" : " noraise")); } if (UNSET != persist) { strcat(term_options, (yes == persist ? " persist" : " nopersist")); } if (UNSET != ctrlq) { strcat(term_options, (yes == ctrlq ? " ctrlq" : " noctrlq")); } if (UNSET != dashedlines) { strcat(term_options, (yes == dashedlines ? " dashed" : " solid")); } if (term->put_text == ENHX11_put_text) { strcat(term_options, " enhanced"); } if (X11_linewidth_multiplier != 1.0) { sprintf(term_options + strlen(term_options), " linewidth %.2g", X11_linewidth_multiplier); } if (*X11_default_font) { strcat(term_options, " font \""); strcat(term_options, X11_default_font); strcat(term_options, "\""); } if (set_title) { char *title; int save_token = c_token; c_token = c_title_token; strncat(term_options, " title \"", MAX_LINE_LEN-strlen(term_options)); title = term_options + strlen(term_options); if (isstringvalue(c_title_token)) { char *s = try_to_get_string(); strncat(term_options, s, MAX_LINE_LEN-strlen(term_options)); free(s); } else copy_str(term_options+strlen(term_options), c_title_token, MAX_LINE_LEN-strlen(term_options)); if (X11_ipc) { /* Send up to maximum buffer length minus three characters of * title string to account for required 'n', '\0', '\n'. */ int i; fputc('n', X11_ipc); for (i=0; i < X11_COMMAND_BUFFER_LENGTH-3 && title[i] != '\0'; i++) fputc(title[i], X11_ipc); fputc('\0', X11_ipc); fputc('\n', X11_ipc); fflush(X11_ipc); } strncat(term_options, "\"", MAX_LINE_LEN-strlen(term_options)); c_token = save_token; } if (set_size != UNSET) sprintf(term_options + strlen(term_options), " size %d,%d ", X11_SIZE_X,X11_SIZE_Y); if (set_position != UNSET) sprintf(term_options + strlen(term_options), " position %d,%d ", X11_POSITION_X,X11_POSITION_Y); X11_update_opts(); } void x11_raise_terminal_window(int number) { /* Send the raise character and a number. */ if (X11_ipc) { fprintf(X11_ipc, "^%d\n", number); fflush(X11_ipc); } } void x11_raise_terminal_group(void) { /* Send just the raise character. */ if (X11_ipc) { fprintf(X11_ipc, "^\n"); fflush(X11_ipc); } } void x11_lower_terminal_window(int number) { /* Send the raise character and a number. */ if (X11_ipc) { fprintf(X11_ipc, "v%d\n", number); fflush(X11_ipc); } } void x11_lower_terminal_group(void) { /* Send just the raise character. */ if (X11_ipc) { fprintf(X11_ipc, "v\n"); fflush(X11_ipc); } } TERM_PUBLIC void X11_update_opts() { if (!X11_ipc) return; if (UNSET != do_raise || UNSET != persist || UNSET != dashedlines || UNSET != ctrlq) { fprintf(X11_ipc, "X %d %d %d %d\n", do_raise, persist, dashedlines, ctrlq); fflush(X11_ipc); } /* pass size as a valid X11 geometry string WIDTHxHEIGHT[+XPOS+YPOS] */ if (set_size != UNSET || set_position != UNSET) { if (set_size != UNSET && set_position == UNSET) fprintf(X11_ipc, "s %dx%d\n", X11_SIZE_X, X11_SIZE_Y); else if (set_size == UNSET && set_position != UNSET) fprintf(X11_ipc, "s %+d%+d\n", X11_POSITION_X, X11_POSITION_Y); else if (set_size != UNSET && set_position != UNSET) fprintf(X11_ipc, "s %dx%d%+d%+d\n", X11_SIZE_X, X11_SIZE_Y, X11_POSITION_X, X11_POSITION_Y); fflush(X11_ipc); } } /*----------------------------------------------------------------------------- * Three different versions of the remainder of the X11 terminal driver * are provided to support three different types of IPC with the * gnuplot_x11 outboard terminal driver: * * DEFAULT_X11: popen() pipe for most un*x platforms * * CRIPPLED_SELECT : file IPC for un*x platforms with incomplete or faulty * implementation of BSD select() * * VMS : mailbox/spawn IPC *---------------------------------------------------------------------------*/ #define DEFAULT_X11 #if defined(VMS) || defined(CRIPPLED_SELECT) # undef DEFAULT_X11 #endif #if defined(VMS) && defined(CRIPPLED_SELECT) Error.Incompatible options. #endif /* we do not want to have to duplicate all the code, so we * do most of it with macros. * PRINT0(format), PRINT1(format, p1), PRINT2(format, p1, p2) etc * also FLUSH0(format), etc, which do an additional flush */ #ifdef DEFAULT_X11 /*----------------------------------------------------------------------------- * DEFAULT_X11 popen() pipe IPC *---------------------------------------------------------------------------*/ static void X11_atexit() { if (X11_ipc) { fputs("R\n", X11_ipc); fclose(X11_ipc); /* dont wait(), since they might be -persist */ X11_ipc = NULL; #ifdef PIPE_IPC close(ipc_back_fd); ipc_back_fd = -1; #endif } } #ifdef USE_MOUSE TERM_PUBLIC int X11_waitforinput() { #ifdef PIPE_IPC fd_set fds; static struct gp_event_t ge; static int l = 0; int n; int fd = fileno(stdin); int repeat_count = 0; AGAIN: /* XXX: if the input device it not a tty (e.g. /dev/null) * mouse events are not processed. This is necessary * as on some systems /dev/null is not selectable. * TODO: should we close the ipc_back_fd in this case ? */ if (ipc_back_fd >= 0) do { int ierr; FD_ZERO(&fds); FD_SET(fd, &fds); FD_SET(ipc_back_fd, &fds); ierr = select(ipc_back_fd + 1, SELECT_TYPE_ARG234 &fds, 0, 0, NULL); if (ierr < 0 && errno == EINTR) { FD_ZERO(&fds); continue; } if (FD_ISSET(ipc_back_fd, &fds)) { n = read(ipc_back_fd, (void *) (l + (char *) &ge), sizeof(ge) - l); if (n == 0) { close(ipc_back_fd); ipc_back_fd = -1; /* don't close X11_ipc, otherwise later writes * to it will cause a segfault */ IPC_LOCK = FALSE; break; /* outboard driver has stopped */ } l += n; if (l == sizeof(ge)) { /* note: do_event() may not return (if an * error occurs), so need to reset l first */ l = 0; do_event(&ge); if (ge.type == GE_fontprops) { if (repeat_count > 0) { FPRINTF((stderr, "X11_waitforinput: caught GE_fontprops after %d tries\n", repeat_count)); } return(GE_fontprops); } if (ge.type == GE_buttonrelease && (paused_for_mouse & PAUSE_CLICK)) { int button = ge.par1; if (button == 1 && (paused_for_mouse & PAUSE_BUTTON1)) paused_for_mouse = 0; if (button == 2 && (paused_for_mouse & PAUSE_BUTTON2)) paused_for_mouse = 0; if (button == 3 && (paused_for_mouse & PAUSE_BUTTON3)) paused_for_mouse = 0; if (paused_for_mouse == 0) return '\0'; } if (ge.type == GE_keypress && (paused_for_mouse & PAUSE_KEYSTROKE)) { /* Ignore NULL keycode */ if (ge.par1 > '\0') { paused_for_mouse = 0; return '\0'; } } } } } while (!FD_ISSET(fd, &fds)); /* If ipc_back_fd is not open, we will never see any mouse events! */ else if (paused_for_mouse) { paused_for_mouse = 0; int_error(NO_CARET,"Mousing not active"); } /* IPC_LOCK indicates that we are specifically waiting for a reply on */ /* the mousing channel. If stdin unblocks first, defer reading it, */ /* wait a few microseconds, and try again. */ /* FIXME EAM - Give up after a few seconds. This will drop input chars*/ /* but at least it won't hang forever if the X11 connection goes bad. */ if (IPC_LOCK) { #ifdef HAVE_USLEEP usleep(100); #endif if (repeat_count++ < 10000) goto AGAIN; } /* Same sort of thing if we are specifically waiting for mouse input. */ if (paused_for_mouse) { #ifdef HAVE_USLEEP usleep(10); #endif goto AGAIN; } #endif /* PIPE_IPC */ # if 0 /* HBB 20010620: switching back and forth between X11 and a non-GUI * terminal, while stdin is redirected, causes gnuplot to terminate * right after it re-enters the X11 terminal --- read() returns a '\0' * character once, and then EOF. Switching to 's getc() fixed * that, for me. */ if (read(0, &c, 1) != 1) return EOF; else return c; # else return getc(stdin); # endif /* 0/1 */ } #endif /* USE_MOUSE */ TERM_PUBLIC void X11_init() { static int been_here = 0; if (!X11_ipc) { /* first time through or after a reset */ #if defined(OS2) /* FIXME amai 20020219: nice try... * But popen() does return a non-NULL handle to almost command, * it's just a new session which will stop if the command does * not exist... We should stat() for the argument?! */ /* X11_ipc = popen(X11_full_command_path, "w"); if (X11_ipc==NULL) */ { X11_ipc = popen(X11_command, "w"); } #else /* !(OS/2) */ int fdes[2]; # ifdef PIPE_IPC int fdes_back[2]; #define X11_ALLOW_EVENTS (mouse_setting.on) if (X11_ALLOW_EVENTS) { if (pipe(fdes_back)) perror("pipe() failed:"); } # endif /* PIPE_IPC */ if (pipe(fdes)) perror("pipe() failed:"); if (fork() == 0) { /* child */ # ifdef PIPE_IPC char noevents[] = "-noevents"; if (X11_ALLOW_EVENTS) { dup2(fdes_back[1], 1); /* stdout to pipe */ close(fdes_back[0]); } else { char **ptr; for (ptr = optvec; ptr && *ptr; ptr++) ; /* do nothing: skip over set arguments */ /* tell the driver not to supply any events by * appending "-noevents" to the optvec list. */ *ptr = noevents; *++ptr = (char *) 0; /* terminate */ } # endif /* PIPE_IPC */ /* Add user-specified background to list of command options */ if (strcmp(x11_userbkg,"#RRGGBB")) { char **ptr; for (ptr = optvec; ptr && *ptr; ptr++) ; /* do nothing: skip over set arguments */ *ptr++ = "-bg"; *ptr++ = x11_userbkg; *ptr = (char *) 0; /* terminate */ } /* close the write side of the child's forward fd */ close(fdes[1]); dup2(fdes[0], 0); /* stdin from pipe */ execvp(X11_full_command_path, optvec); /* if we get here, something went wrong */ fprintf(stderr,"Expected X11 driver: %s\n",X11_full_command_path); perror("Exec failed"); fprintf(stderr,"See 'help x11' for more details\n"); exit(EXIT_FAILURE); } /* parent */ # ifdef PIPE_IPC /* X11_ipc_out = fdopen(fdes[0], "r"); */ if (ipc_back_fd > 0) { fprintf(stderr, "(X11_init) warning: unclosed ipc_back_fd.\n"); fprintf(stderr, " this is probably a program error.\n"); close(ipc_back_fd); } if (X11_ALLOW_EVENTS) { ipc_back_fd = fdes_back[0]; close(fdes_back[1]); /* the parent doesn't need this */ } else { /* we do not open a bidirectional communication * for non-tty's by default. If this is desired, * the mouse must be turned on explicitely *before* * starting the x11 driver. * So: if we're here, we close the ipc-back-channel * which will cause a SIGPIPE in the driver. This * is *ugly* but it works. (joze) */ /* close(fdes_back[0]); */ /* mark ipc_back_fd as unusable */ ipc_back_fd = IPC_BACK_UNUSABLE; } # endif /* PIPE_IPC */ /* close the read side of the parent's forward fd */ close(fdes[0]); X11_ipc = fdopen(fdes[1], "w"); #endif /* !OS/2 */ } if (!been_here) { GP_ATEXIT(X11_atexit); been_here++; } X11_send_endianess(); #ifdef USE_MOUSE default_font_size_known = FALSE; #endif X11_update_opts(); } TERM_PUBLIC void X11_reset() { /* Leave the pipe alone, until exit or set term x11 reset */ /* but make sure that all locks are cleared. */ #ifdef PIPE_IPC IPC_LOCK = FALSE; #endif #ifdef USE_MOUSE paused_for_mouse = 0; #endif } #define PRINT0(fmt) fprintf(X11_ipc, fmt) #define PRINT1(fmt,p1) fprintf(X11_ipc, fmt,p1) #define PRINT2(fmt,p1,p2) fprintf(X11_ipc, fmt,p1,p2) #define PRINT3(fmt,p1,p2,p3) fprintf(X11_ipc, fmt,p1,p2,p3) #define PRINT4(fmt,p1,p2,p3,p4) fprintf(X11_ipc, fmt,p1,p2,p3,p4) #define PRINT5(fmt,p1,p2,p3,p4,p5) fprintf(X11_ipc, fmt,p1,p2,p3,p4,p5) #define FFLUSH() fflush(X11_ipc) #define BEFORE_GRAPHICS /* nowt */ #define AFTER_TEXT /* nowt */ #elif defined(CRIPPLED_SELECT) /* PLEASE CAN SOMEONE CHECK THAT THIS STILL WORKS !!! */ /*----------------------------------------------------------------------------- * CRIPPLED_SELECT file IPC *---------------------------------------------------------------------------*/ static char X11_tmp[32], X11_tmp0[32], X11_shutdown[32]; static int X11_pid; TERM_PUBLIC void X11_init() { if (!(X11_pid = fork())) { execvp(X11_full_command_path, optvec); _exit(1); } sprintf(X11_tmp, "/tmp/Gnuplot_%d", X11_pid); sprintf(X11_tmp0, "%s-", X11_tmp); sprintf(X11_shutdown, "echo R >%s", X11_tmp); } TERM_PUBLIC void X11_reset() { system(X11_shutdown); } #define BEFORE_GRAPHICS \ if (!(X11_ipc = fopen(X11_tmp0, "w"))) { \ perror(X11_tmp0); system(X11_shutdown); exit(1); \ } #define AFTER_TEXT \ { fclose(X11_ipc); rename(X11_tmp0, X11_tmp); } #define PRINT0(fmt) fprintf(X11_ipc, fmt) #define PRINT1(fmt,p1) fprintf(X11_ipc, fmt,p1) #define PRINT2(fmt,p1,p2) fprintf(X11_ipc, fmt,p1,p2) #define PRINT3(fmt,p1,p2,p3) fprintf(X11_ipc, fmt,p1,p2,p3) #define PRINT4(fmt,p1,p2,p3,p4) fprintf(X11_ipc, fmt,p1,p2,p3,p4) #define PRINT5(fmt,p1,p2,p3,p4,p5) fprintf(X11_ipc, fmt,p1,p2,p3,p4,p5) #define FFLUSH() fflush(X11_ipc) static void X11_atexit() { /* WHAT SHOULD I DO ? */ } #elif defined(VMS) /*----------------------------------------------------------------------------- * VMS mailbox/spawn IPC - Yehavi Bourvine - YEHAVI@VMS.HUJI.AC.IL *---------------------------------------------------------------------------*/ #include #include #include #ifdef __DECC #include #include #endif #ifdef __GNUC__ #include #else int vaxc$errno; #endif #define SS$_NORMAL 1 /* or include for all SS$_ def's */ #define MBXMXMSG 128 /* DEFMBXMXMSG is set by SYSGEN */ static short X11_channel; struct iosb { unsigned short stat; unsigned short count; unsigned long info; }; TERM_PUBLIC void X11_init() { struct iosb iosb; static char devnam_string[64]; static $DESCRIPTOR(devnam, devnam_string); struct { short int buf_len; short int item; char *buf_addr; unsigned short int *ret_len; int end; } item_list = { devnam.dsc$w_length, DVI$_DEVNAM, devnam.dsc$a_pointer, &devnam.dsc$w_length, 0}; #define CMDLEN 1024 char cmdline[CMDLEN], *cmdp; int optindex; if (!X11_channel) { int one = 1; /* Create a descriptor for the command line that starts GNUPLOT_X11. $DESCRIP doesn't work in this context... */ /* FIXME! * This does not work anymore since X11 option passing has been * changed to use execvp() in the DEFAULT_X11 case */ struct dsc$descriptor_s pgmdsc = { 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0 }; optindex = 0; strcpy(cmdline, optvec[optindex]); cmdp = cmdline + strlen(optvec[optindex]); while (optvec[++optindex] != NULL) { *cmdp++ = ' '; *cmdp++ = '\"'; strcpy(cmdp, optvec[optindex]); cmdp += strlen(optvec[optindex]); *cmdp++ = '\"'; } pgmdsc.dsc$w_length = cmdp - cmdline; pgmdsc.dsc$a_pointer = cmdline; /* Create a mailbox which will be used as a pipe for commands to the * subprocess. What we'll write to it will be read by the subprocess * as its STDIN. Use an unnamed mailbox and refer to it by its device * number */ vaxc$errno = sys$crembx(0, &X11_channel, MBXMXMSG, MBXMXMSG, 0, 0, 0, 0); if ((vaxc$errno & SS$_NORMAL) != SS$_NORMAL) { printf("SYS$CreMbx failed with status=%d\r\n", vaxc$errno); os_error(NO_CARET, "sys$crembx failed"); } vaxc$errno = sys$getdviw(0, X11_channel, 0, &item_list, &iosb, 0, 0, 0); if ((vaxc$errno & SS$_NORMAL) == SS$_NORMAL) vaxc$errno = iosb.stat; if ((vaxc$errno & SS$_NORMAL) != SS$_NORMAL) { printf("SYS$Getdviw failed with status=%d\r\n", vaxc$errno); sys$dassgn(X11_channel); X11_channel = 0; os_error(NO_CARET, "sys$getdviw failed"); } /* Create a subprocess whose input is this mailbox. */ vaxc$errno = lib$spawn(&pgmdsc, &devnam, 0, &one, 0, 0, 0, 0, 0, 0, 0, 0, 0); if ((vaxc$errno & SS$_NORMAL) != SS$_NORMAL) { printf("LIB$SPAWN failed with status=%d\r\n", vaxc$errno); sys$dassgn(X11_channel); X11_channel = 0; os_error(NO_CARET, "lib$spawn failed"); } } { static int been_here = 0; if (!been_here) { GP_ATEXIT(X11_atexit); been_here = 1; } } } /* We use $QIO in order to avoid buffering problems, although it might * work as well with simple Fprintf calls. */ #define GO(x) \ do { \ char buffer[512]; int status; struct iosb iosb;\ sprintf x; \ if (strlen(buffer) >= MBXMXMSG) { \ printf("buffer contents (%d char) catenated to mailbox size (%d bytes)\n", \ strlen(buffer), MBXMXMSG); \ buffer[MBXMXMSG-1] = '\0';\ printf("%s\n", buffer); \ } \ status = sys$qiow(0, X11_channel, IO$_WRITEVBLK, &iosb, 0, 0, buffer, strlen(buffer), 0, 0, 0, 0); \ if ((status & SS$_NORMAL) == SS$_NORMAL) status = iosb.stat; \ if((status & SS$_NORMAL) != SS$_NORMAL) exit(status); \ } while (0) #define PRINT0(fmt) GO((buffer, fmt)) #define PRINT1(fmt,p1) GO((buffer, fmt,p1)) #define PRINT2(fmt,p1,p2) GO((buffer, fmt,p1,p2)) #define PRINT3(fmt,p1,p2,p3) GO((buffer, fmt,p1,p2,p3)) #define PRINT4(fmt,p1,p2,p3,p4) GO((buffer, fmt,p1,p2,p3,p4)) #define PRINT5(fmt,p1,p2,p3,p4,p5) GO((buffer, fmt,p1,p2,p3,p4,p5)) #define FFLUSH() /* nowt */ #define BEFORE_GRAPHICS /* nowt */ #define AFTER_TEXT /* nowt */ static void X11_atexit() { if (X11_channel) { PRINT0("R\n"); sleep(2); /* Wait for subprocess to finish */ sys$dassgn(X11_channel); X11_channel = 0; } } TERM_PUBLIC void X11_reset() { /* do nothing until exit */ } #else /* !VMS */ You lose. #endif /* !VMS */ /* common stuff, using macros defined above */ TERM_PUBLIC void X11_graphics() { #ifdef USE_MOUSE static unsigned long windowid = 0; #endif static enum set_encoding_id last_encoding = S_ENC_DEFAULT; BEFORE_GRAPHICS; /* kludge for crippled select */ #ifndef USE_MOUSE /* for VMS sake, keep as separate prints */ PRINT0("G\n"); #else #ifdef PIPE_IPC /* if we know the outboard driver has stopped, restart it */ if (ipc_back_fd == IPC_BACK_CLOSED) { fclose(X11_ipc); X11_ipc = NULL; X11_init(); } #endif /* send also XID of gnuplot window ( then raises it up) */ if (!windowid) { char *window_env = getenv("WINDOWID"); if (window_env) sscanf(window_env, "%lu", &windowid); } #ifndef OS2 PRINT1("G%lu\n", windowid); #else PRINT2("G%lu %i\n", windowid, getpid()); #endif #endif /* USE_MOUSE */ #ifdef ULTRIX_KLUDGE fflush(X11_ipc); #endif if (encoding != last_encoding) { PRINT1("QE%d\n",encoding); last_encoding = encoding; } #if defined(USE_MOUSE) && defined(PIPE_IPC) /* EAM June 2003 - Flush the set font command through the pipe */ /* to gnuplot_x11, then wait for it to return the resulting */ /* font size information (v_char and h_char). The feedback is */ /* caught by do_event() as an event of type GE_fontprops. */ if (ipc_back_fd >= 0 && X11_MOUSE_FEEDBACK) { if (!default_font_size_known) { IPC_LOCK = TRUE; PRINT1("QG%s\n",X11_default_font); FFLUSH(); X11_waitforinput(); default_font_size_known = TRUE; IPC_LOCK = FALSE; } } #endif /* Force default font at start of plot */ *X11_last_font_used = '\01'; X11_set_default_font(); X11_set_font(""); } TERM_PUBLIC void X11_text() { if (!X11_ipc) return; #ifdef USE_MOUSE /* EAM July 2003: send over a snapshot of the final axis scaling * so that subsequent mouse events can be transformed into plot * coordinates even though the plot is no longer active. */ #ifdef PIPE_IPC if (ipc_back_fd >= 0) #endif { /* Construct a mask showing which axes are active */ int axis_mask = 0; int i; for (i = FIRST_AXES; i < 2*SECOND_AXES; i++) { if (axis_array[i].ticmode != NO_TICS) axis_mask |= (1 << i); } PRINT2("S %2d %d\n", -2, ALMOST2D); PRINT2("S %2d %d\n", -1, axis_mask); PRINT5("S %2d %16.6g %14d %16.6g %16.6g\n", FIRST_X_AXIS, axis_array[FIRST_X_AXIS].min, axis_array[FIRST_X_AXIS].term_lower, axis_array[FIRST_X_AXIS].term_scale, axis_array[FIRST_X_AXIS].log ? axis_array[FIRST_X_AXIS].log_base : 0); PRINT5("S %2d %16.6g %14d %16.6g %16.6g\n", FIRST_Y_AXIS, axis_array[FIRST_Y_AXIS].min, axis_array[FIRST_Y_AXIS].term_lower, axis_array[FIRST_Y_AXIS].term_scale, axis_array[FIRST_Y_AXIS].log ? axis_array[FIRST_Y_AXIS].log_base : 0); PRINT5("S %2d %16.6g %14d %16.6g %16.6g\n", SECOND_X_AXIS, axis_array[SECOND_X_AXIS].min, axis_array[SECOND_X_AXIS].term_lower, axis_array[SECOND_X_AXIS].term_scale, axis_array[SECOND_X_AXIS].log ? axis_array[SECOND_X_AXIS].log_base : 0); PRINT5("S %2d %16.6g %14d %16.6g %16.6g\n", SECOND_Y_AXIS, axis_array[SECOND_Y_AXIS].min, axis_array[SECOND_Y_AXIS].term_lower, axis_array[SECOND_Y_AXIS].term_scale, axis_array[SECOND_Y_AXIS].log ? axis_array[SECOND_Y_AXIS].log_base : 0); } #endif PRINT0("E\n"); FFLUSH(); #ifdef ULTRIX_KLUDGE PRINT0("E\n"); FFLUSH(); #endif AFTER_TEXT; /* kludge for crippled select */ } TERM_PUBLIC void X11_move(unsigned int x, unsigned int y) { PRINT2("M%04d%04d\n", x, y); } TERM_PUBLIC void X11_vector(unsigned int x, unsigned int y) { PRINT2("V%04d%04d\n", x, y); } TERM_PUBLIC void X11_pointsize(double ps) { if (ps < 0) ps = 1; PRINT2("P-2 %d %d\n", /* size of point symbols */ (int) (term->h_tic * ps * 0.5), (int) (term->v_tic * ps * 0.5)); } TERM_PUBLIC void X11_linewidth(double lw) { PRINT1("W%04d\n", (int) (lw * X11_linewidth_multiplier + 0.5)); } TERM_PUBLIC void X11_linetype(int lt) { PRINT1("L%04d\n", lt); } TERM_PUBLIC void X11_put_text(unsigned int x, unsigned int y, const char str[]) { /* Only send the font change request to X11 if it really is a change */ if (strcmp(X11_last_font_used,X11_next_font_used)) { strcpy(X11_last_font_used,X11_next_font_used); PRINT1("QF%s\n", X11_next_font_used); } /* badly outrange labels can overflow into text field */ if (x < 10000 && y < 10000) { PRINT3("T%04d%04d%s\n", x, y, str); } } TERM_PUBLIC int X11_text_angle(int ang) { PRINT1("A%d\n", ang); return TRUE; } TERM_PUBLIC int X11_justify_text(enum JUSTIFY mode) { PRINT1("J%04d\n", mode); X11_last_justification = mode; return (TRUE); } TERM_PUBLIC void X11_point(unsigned int x, unsigned int y, int number) { PRINT3("P%d %d %d\n", number, x, y); } TERM_PUBLIC int X11_set_font(const char *fontname) { PRINT1("QF%s\n", fontname?fontname:""); strncpy(X11_next_font_used,fontname?fontname:"",sizeof(X11_next_font_used)-1); return(TRUE); } static void X11_set_default_font() { PRINT1("QD%s\n",X11_default_font); } TERM_PUBLIC void X11_fillbox(int style, unsigned int x, unsigned int y, unsigned int w, unsigned int h) { if (X11_ipc) { PRINT5("F%04d%04u%04u%04u%04u\n", style, x, y, w, h); } } #ifdef USE_MOUSE TERM_PUBLIC void X11_put_tmptext(int i, const char str[]) { if (X11_ipc) { PRINT2("t%04d%s\n", i, str); FFLUSH(); } } TERM_PUBLIC void X11_set_ruler(int x, int y) { if (X11_ipc) { PRINT2("r%04d%04d\n", x < 9999 ? x : 9999, y < 9999 ? y : 9999); FFLUSH(); } } TERM_PUBLIC void X11_set_cursor(int c, int x, int y) { if (X11_ipc) { PRINT3("u%04d%04d%04d\n", c, x, y); FFLUSH(); } } TERM_PUBLIC void X11_set_clipboard(const char s[]) { if (X11_ipc) { PRINT1("z%s\n", s); FFLUSH(); } } #endif /* USE_MOUSE */ static void transmit_gradient(gradient_struct *gradient, int cnt) { int i = 0; fprintf(X11_ipc, "%d", cnt); for(i=0; icolorMode), (char)(palette->positive), (char)(palette->cmodel), palette->use_maxcolors); switch(palette->colorMode) { case SMPAL_COLOR_MODE_GRAY: fprintf(X11_ipc,"%g\n", palette->gamma); break; case SMPAL_COLOR_MODE_RGB: fprintf(X11_ipc, "%d %d %d\n", palette->formulaR, palette->formulaG, palette->formulaB); break; case SMPAL_COLOR_MODE_GRADIENT: transmit_gradient(palette->gradient, palette->gradient_num); break; case SMPAL_COLOR_MODE_CUBEHELIX: case SMPAL_COLOR_MODE_FUNCTIONS: { int cnt=0; gradient_struct *gradient; gradient = approximate_palette(palette, -1, -1, &cnt); transmit_gradient(gradient, cnt); free(gradient); break; } default: fprintf(stderr, "%s:%d ooops: Unknown colorMode '%c'.\n", __FILE__, __LINE__, (char)(palette->colorMode)); } fflush(X11_ipc); return 0; } #if 0 /* The following are some handy little routines to keep around * in case one wants to do statistics on the binary data being * passed to a terminal function. */ int char_count[256]; void histogram(unsigned char c) { char_count[c] += 1; } void dump_histogram(void) { int i, sum; fprintf(stderr,"\n\n"); for (i=0,sum=0; i<256; i++) { fprintf(stderr," %3.3d:%7.7d ", i, char_count[i]); sum += char_count[i]; } fprintf(stderr,"\n\ntotal: %d\n\n",sum); } #endif TERM_PUBLIC void X11_set_color(t_colorspec *colorspec) { if (colorspec->type == TC_RGB) { fputc(X11_GR_SET_RGBCOLOR, X11_ipc); PRINT1("%6.6x\n", colorspec->lt & 0xffffff); FFLUSH(); return; } if (colorspec->type == TC_LT) { fputc(X11_GR_SET_LINECOLOR, X11_ipc); PRINT1("%4d\n", colorspec->lt); FFLUSH(); return; } if (colorspec->type != TC_FRAC) return; { char *c_ptr; unsigned short byte_remaining; float fgray = colorspec->value; fputc(X11_GR_BINARY_COLOR, X11_ipc); byte_remaining = sizeof(fgray); c_ptr = (char *) &fgray; while (byte_remaining) { char c_tmp = *c_ptr++ - SET_COLOR_TRANSLATION_CHAR; byte_remaining--; if ( (c_tmp == '\n') || (c_tmp == SET_COLOR_CODE_CHAR) || (c_tmp == '\0') ) { fputc(SET_COLOR_CODE_CHAR, X11_ipc); c_tmp += 1; } fputc(c_tmp, X11_ipc); } fputc('\n', X11_ipc); FFLUSH(); } } TERM_PUBLIC void X11_filled_polygon(int points, gpiPoint *corners) { int int_cache[2]; int i_corner; unsigned short i_buffer; unsigned short byte_remaining; unsigned int point_remaining; /* Encode and transfer data to the pipe, one character at a time. */ if (!points) return; fputc(X11_GR_BINARY_POLYGON, X11_ipc); i_buffer = BINARY_MAX_CHAR_PER_TRANSFER; /* First put number of points into the buffer. Initialize the "cache" * to the number of points and the number of bytes to transfer to the * size of an int. This will be the first transfer, so increase the * number of points by one. */ int_cache[0] = points; int_cache[1] = corners->style; byte_remaining = 2*sizeof(int_cache[0]); point_remaining = points + 1; i_corner = 0; while (point_remaining) { unsigned char *uc_ptr = (unsigned char *) int_cache; while (byte_remaining) { int sent_val; unsigned char uc_tmp = *uc_ptr++ - FILLED_POLYGON_TRANSLATION_CHAR; byte_remaining--; if ( (uc_tmp == '\n') || (uc_tmp == FILLED_POLYGON_CODE_CHAR) || (uc_tmp == '\0') ) { uc_tmp += 1; sent_val = fputc(FILLED_POLYGON_CODE_CHAR, X11_ipc); if (sent_val != (int)FILLED_POLYGON_CODE_CHAR) fprintf(stderr, "Bad character mapping %d -> %d\n", (int)FILLED_POLYGON_CODE_CHAR, sent_val); i_buffer--; if (!i_buffer) { fputc('\n', X11_ipc); FFLUSH(); /* End of chunk. */ i_buffer = BINARY_MAX_CHAR_PER_TRANSFER; fputc(X11_GR_BINARY_POLYGON, X11_ipc); /* Will be another chunk. */ } } sent_val = fputc(uc_tmp, X11_ipc); if (sent_val != (int)uc_tmp) fprintf(stderr, "Bad character mapping %d -> %d\n", (int)uc_tmp, sent_val); i_buffer--; if (!i_buffer) { fputc('\n', X11_ipc); FFLUSH(); /* End of chunk. */ i_buffer = BINARY_MAX_CHAR_PER_TRANSFER; if (point_remaining || byte_remaining) fputc(X11_GR_BINARY_POLYGON, X11_ipc); /* Will be another chunk. */ } } byte_remaining = 2*sizeof(int); if (--point_remaining) { int_cache[0] = corners[i_corner].x; int_cache[1] = corners[i_corner].y; i_corner++; } } /* Check if some characters were put in the buffer that need to be flushed. */ if (i_buffer != BINARY_MAX_CHAR_PER_TRANSFER) { fputc('\n', X11_ipc); FFLUSH(); } return; } /* * Ethan A Merritt November 2003 * - Support for enhanced text mode * * PROBLEMS: * - The default font must be scalable * - Without more feedback from the outboard driver (gnuplot_x11) it is * hard to set up proper text rotation. The current approximation is so-so. * - Right- and Center- justified text is problematic for the same reason. * - The default font size is not really known, and font scaling * in general could be improved */ static TBOOLEAN ENHx11_opened_string; static TBOOLEAN ENHx11_sizeonly = FALSE; static TBOOLEAN ENHx11_show = TRUE; static int ENHx11_overprint = 0; static TBOOLEAN ENHx11_widthflag = TRUE; static double ENHx11_base; static double ENHx11_fontsize; static char *ENHx11_font; TERM_PUBLIC void ENHX11_OPEN( char *fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { /* If the overprint code requests a save or request, that's all we do */ if (overprint == 3) { PRINT2("Tp%04d%04d\n", 0, 0); return; } else if (overprint == 4) { PRINT2("Tr%04d%04d\n", 0, 0); return; } if (!ENHx11_opened_string) { ENHx11_opened_string = TRUE; enhanced_cur_text = &enhanced_text[0]; ENHx11_font = fontname; ENHx11_fontsize = fontsize; ENHx11_base = base * 10; /* FIXME - should this be v_char? v_tic? */ ENHx11_show = showflag; ENHx11_overprint = overprint; ENHx11_widthflag = widthflag; } } /* * Write a string fragment and update current position. * We leave the real work up to gnuplot_x11! */ TERM_PUBLIC void ENHX11_FLUSH() { /* Send a command to print this string at current position */ if (ENHx11_opened_string) { char tmpfont[128]; /* FIXME - there must be a better way! */ *enhanced_cur_text = '\0'; sprintf(tmpfont,"%s,%.1f", ENHx11_font, ENHx11_fontsize); PRINT1("QF%s\n", tmpfont); *X11_last_font_used = '\01'; if (!ENHx11_show || ENHx11_sizeonly) PRINT3("Ts%04d%04d%s\n", 0, (int)ENHx11_base, enhanced_text); else if (ENHx11_overprint == 1) PRINT3("Tc%04d%04d%s\n", 0, (int)ENHx11_base, enhanced_text); else if (!ENHx11_widthflag && ENHx11_overprint != 0) PRINT3("To%04d%04d%s\n", 0, (int)ENHx11_base, enhanced_text); else PRINT3("Tu%04d%04d%s\n", 0, (int)ENHx11_base, enhanced_text); ENHx11_opened_string = FALSE; } } TERM_PUBLIC void ENHX11_put_text(unsigned int x, unsigned int y, const char *str) { char *original_string = (char *)str; static char *initial_font = NULL; double firstpass_fontsize = X11_default_fontsize; int pass = 1; if (ignore_enhanced_text) { X11_put_text(x,y,str); return; } if (!strlen(str)) return; /* if there are no magic characters, we should just be able * punt the string to X11_put_text() */ if (!strpbrk(str, "{}^_@&~")) { X11_put_text(x,y,str); return; } /* set up the global variables needed by enhanced_recursion() */ enhanced_fontscale = 1.25; ENHx11_opened_string = FALSE; strncpy(enhanced_escape_format,"%c",sizeof(enhanced_escape_format)); /* Tell gnuplot_x11 to set the current position to (x,y) */ PRINT2("Tl%04d%04d\n", x, y); /* Text justification requires two passes. During the first pass we */ /* don't draw anything, we just measure the space it will take. */ if (X11_last_justification != LEFT) { PRINT1("J%04d\n", LEFT); ENHx11_sizeonly = TRUE; } PASS2: /* Make sure that we start out using the intended font. */ ENHx11_font = "DEFAULT"; if (*X11_next_font_used) { int sep = strcspn(X11_next_font_used,","); free(initial_font); initial_font = gp_strdup(X11_next_font_used); initial_font[sep] = '\0'; sscanf(&(X11_next_font_used[sep+1]),"%lf",&firstpass_fontsize); ENHx11_font = initial_font; FPRINTF((stderr,"setting font to %s,%g\n",ENHx11_font,ENHx11_fontsize)); } /* Set the recursion going. We say to keep going until a * closing brace, but we don't really expect to find one. * If the return value is not the nul-terminator of the * string, that can only mean that we did find an unmatched * closing brace in the string. We increment past it (else * we get stuck in an infinite loop) and try again. */ while (*(str = enhanced_recursion((char *)str, TRUE, ENHx11_font, firstpass_fontsize, 0.0, TRUE, TRUE, 0))) { (term->enhanced_flush)(); /* I think we can only get here if *str == '}' */ enh_err_check(str); if (!*++str) break; /* end of string */ /* else carry on and process the rest of the string */ } X11_set_font(""); /* Restore text justification flag after 2nd pass */ if (pass > 1) { PRINT1("J%04d\n", X11_last_justification); return; } /* In order to do text justification we need to do a second pass that */ /* uses information stored by gnuplot_x11 during the first pass. */ if (X11_last_justification != LEFT) { ENHx11_sizeonly = FALSE; if (X11_last_justification == RIGHT) { PRINT2("Tj%04d%04d\n", x, y); } else if (X11_last_justification == CENTRE) { PRINT2("Tk%04d%04d\n", x, y); } str = original_string; pass = 2; goto PASS2; } } TERM_PUBLIC void X11_send_endianess(void) { /* Place an integer 1 in the pipe and see if the byte order agrees * with program on the other side. Information used for routines * having encoded binary data. */ unsigned short tmp = (unsigned short) ENDIAN_VALUE; fputc(X11_GR_CHECK_ENDIANESS, X11_ipc); fputc(((char *)&tmp)[0], X11_ipc); fputc(((char *)&tmp)[1], X11_ipc); fputc('\n', X11_ipc); fflush(X11_ipc); } TERM_PUBLIC void X11_image(unsigned int M, unsigned int N, coordval *image, gpiPoint *corner, t_imagecolor color_mode) { /* Avoid using floats or formatted I/O. That's too slow for image data. * * To avoid using floats, we assume that the maximum resolution of the * color plane of the x11 device is 16 bits. (Not an unreasonable * assumption.) So we convert coordval to unsigned short and then * send those. The driver then shifts these unsigned short values to * the right to match the size of its palette. * * The driver uses the '\n' character to mean end of command. When the * core routine sees the '\n', it stops copying the remaining characters * that are in the buffer. Therefore, we need to hide the '\n' character * from the data stream. We also need to hide the '\0' because the core * routine also does an 'strcpy'. So the scheme is as follows: * * On the driver side, if the char CODE_WORD is found it * should be ignored and replaced with the char that * follows it, but subtract one from that value. * * This means that there exists the chance of the data stream enlarging * by a factor of two. So the algorithm must make sure to keep the * number of bytes transfered less than the buffer length. * * Also note that the '\0' character is often prevalent in 16 bit image * data where the palette may be 8 bits or less. For this reason, a * translation is first done on the character to make the '\0' occur less * often. In this way, less amount of data is sent and fewer command * lines are used to store an image. */ unsigned short i_buffer; unsigned int coord_remaining; coordval *coord_ptr; /* Use formatted I/O to transfer image information. Hexadecimal uses less characters. * * Note that X11 has different frame of reference (top left origin) than does Gnuplot * (bottom left origin) */ fputc(X11_GR_IMAGE, X11_ipc); fprintf(X11_ipc,"%x %x %x %x %x %x %x %x %x %x %x\n", M, N, corner[0].x, corner[0].y, corner[1].x, corner[1].y, corner[2].x, corner[2].y, corner[3].x, corner[3].y, color_mode); FFLUSH(); /* Encode and transfer data to the pipe, one character at a time. */ coord_remaining = M*N; if (color_mode == IC_RGB) coord_remaining *= 3; else if (color_mode == IC_RGBA) coord_remaining *= 4; if (!coord_remaining) return; fputc(X11_GR_IMAGE, X11_ipc); i_buffer = BINARY_MAX_CHAR_PER_TRANSFER; coord_ptr = image; while (coord_remaining) { unsigned short us_tmp; unsigned short byte_remaining; unsigned char *uc_ptr; /* Convert coordinate value to an unsigned short. * Palette and RGB values are on scale [0:1] at this point, * but alpha values run from [0:255]. Why? I don't know. */ if (color_mode == IC_RGBA && !((coord_remaining+3) % 4)) us_tmp = (*coord_ptr++); else us_tmp = (unsigned short) ((*coord_ptr++)*IMAGE_PALETTE_VALUE_MAX + 0.5); coord_remaining--; byte_remaining = sizeof(us_tmp); uc_ptr = (unsigned char *) &us_tmp; while (byte_remaining) { int sent_val; unsigned char uc_tmp = *uc_ptr++ - IMAGE_TRANSLATION_CHAR; byte_remaining--; if ((uc_tmp == '\n') || (uc_tmp == IMAGE_CODE_CHAR) || (uc_tmp == '\0') ) { uc_tmp += 1; sent_val = fputc(IMAGE_CODE_CHAR, X11_ipc); if (sent_val != (int)IMAGE_CODE_CHAR) fprintf(stderr, "Bad character mapping %d -> %d\n", (int)IMAGE_CODE_CHAR, sent_val); i_buffer--; if (!i_buffer) { fputc('\n', X11_ipc); FFLUSH(); /* End of chunk. */ i_buffer = BINARY_MAX_CHAR_PER_TRANSFER; fputc(X11_GR_IMAGE, X11_ipc); /* Will be another chunk. */ } } sent_val = fputc(uc_tmp, X11_ipc); if (sent_val != (int)uc_tmp) fprintf(stderr, "Bad character mapping %d -> %d\n", (int)uc_tmp, sent_val); i_buffer--; if (!i_buffer) { fputc('\n', X11_ipc); FFLUSH(); /* End of chunk. */ i_buffer = BINARY_MAX_CHAR_PER_TRANSFER; if (coord_remaining || byte_remaining) fputc(X11_GR_IMAGE, X11_ipc); /* Will be another chunk. */ } } } /* Check if some characters were put in the buffer that need to be flushed. */ if (i_buffer != BINARY_MAX_CHAR_PER_TRANSFER) {fputc('\n', X11_ipc); FFLUSH();} return; } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(x11_driver) "x11", "X11 Window System", X11_XMAX, X11_YMAX, X11_VCHAR, X11_HCHAR, X11_VTIC, X11_HTIC, X11_options, X11_init, X11_reset, X11_text, null_scale, X11_graphics, X11_move, X11_vector, X11_linetype, X11_put_text, X11_text_angle, X11_justify_text, X11_point, do_arrow, X11_set_font, X11_pointsize, TERM_CAN_MULTIPLOT|TERM_INIT_ON_REPLOT|TERM_NO_OUTPUTFILE|TERM_CAN_DASH|TERM_ALPHA_CHANNEL|TERM_LINEWIDTH, X11_text /* suspend can use same routine */ , 0 /* resume */ , X11_fillbox, X11_linewidth #ifdef USE_MOUSE , X11_waitforinput, X11_put_tmptext, X11_set_ruler, X11_set_cursor, X11_set_clipboard #endif , X11_make_palette, 0 /* X11_previous_palette */ , X11_set_color, X11_filled_polygon , X11_image , ENHX11_OPEN, ENHX11_FLUSH, do_enh_writec TERM_TABLE_END(x11_driver) #undef LAST_TERM #define LAST_TERM x11_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(x11) "1 x11", "?commands set terminal x11", "?set terminal x11", "?set term x11", "?terminal x11", "?term x11", "?x11", "?X11", "", " Syntax:", " set terminal x11 { | window \"\"}", " {title \"\"}", " {{no}enhanced} {font }", " {linewidth LW} {solid|dashed}", " {{no}persist} {{no}raise} {{no}ctrlq}", " {close}", " {size XX,YY} {position XX,YY}", " set terminal x11 {reset}", "", " Multiple plot windows are supported: `set terminal x11 ` directs the", " output to plot window number n. If n is not 0, the terminal number will be", " appended to the window title (unless a title has been supplied manually)", " and the icon will be labeled `Gnuplot `. The active window may be", " distinguished by a change in cursor (from default to crosshair).", "", " The `x11` terminal can connect to X windows previously created by an outside", " application via the option `window` followed by a string containing the", " X ID for the window in hexadecimal format. Gnuplot uses that external X", " window as a container since X does not allow for multiple clients selecting", " the ButtonPress event. In this way, gnuplot's mouse features work within", " the contained plot window.", "", " set term x11 window \"220001e\"", "", " The x11 terminal supports enhanced text mode (see `enhanced`), subject", " to the available fonts. In order for font size commands embedded in text", " to have any effect, the default x11 font must be scalable. Thus the first", " example below will work as expected, but the second will not.", "", " set term x11 enhanced font \"arial,15\" ", " set title '{/=20 Big} Medium {/=5 Small}' ", "", " set term x11 enhanced font \"terminal-14\" ", " set title '{/=20 Big} Medium {/=5 Small}' ", "", " Plot windows remain open even when the `gnuplot` driver is changed to a", " different device. A plot window can be closed by pressing the letter q", " while that window has input focus, or by choosing `close` from a window", " manager menu. All plot windows can be closed by specifying `reset`, which", " actually terminates the subprocess which maintains the windows (unless", " `-persist` was specified). The `close` command can be used to close", " individual plot windows by number. However, after a `reset`, those plot", " windows left due to persist cannot be closed with the command `close`.", " A `close` without a number closes the current active plot window.", "", " The gnuplot outboard driver, gnuplot_x11, is searched in a default place", " chosen when the program is compiled. You can override that by defining", " the environment variable GNUPLOT_DRIVER_DIR to point to a different", " location.", "", " Plot windows will automatically be closed at the end of the session", " unless the `-persist` option was given.", "", " The options `persist` and `raise` are unset by default, which means that", " the defaults (persist == no and raise == yes) or the command line options", " -persist / -raise or the Xresources are taken. If [no]persist or", " [no]raise are specified, they will override command line options and", " Xresources. Setting one of these options takes place immediately, so", " the behaviour of an already running driver can be modified. If the window", " does not get raised, see discussion in `raise`.", "", " The option `title \"\"` will supply the title name of the window", " for the current plot window or plot window <n> if a number is given.", " Where (or if) this title is shown depends on your X window manager.", "", " The size option can be used to set the size of the plot window. The", " size option will only apply to newly created windows.", "", " The position option can be used to set the position of the plot window. The", " position option will only apply to newly created windows.", "", " The size or aspect ratio of a plot may be changed by resizing the `gnuplot`", " window.", "", " Linewidths and pointsizes may be changed from within `gnuplot` with", " `set linestyle`.", "", " For terminal type `x11`, `gnuplot` accepts (when initialized) the standard", " X Toolkit options and resources such as geometry, font, and name from the", " command line arguments or a configuration file. See the X(1) man page", " (or its equivalent) for a description of such options.", "", "=X resources", " A number of other `gnuplot` options are available for the `x11` terminal.", " These may be specified either as command-line options when `gnuplot` is", " invoked or as resources in the configuration file \".Xdefaults\". They are", " set upon initialization and cannot be altered during a `gnuplot` session.", " (except `persist` and `raise`)", "2 x11_fonts", "?commands set terminal x11 x11_fonts", "?set terminal x11 x11_fonts", "?set term x11 x11_fonts", "?x11 x11_fonts", "?x11_fonts", "=fonts", " Upon initial startup, the default font is taken from the X11 resources", " as set in the system or user .Xdefaults file or on the command line.", "", " Example:", " gnuplot*font: lucidasans-bold-12", " A new default font may be specified to the x11 driver from inside", " gnuplot using", " `set term x11 font \"<fontspec>\"`", " The driver first queries the X-server for a font of the exact name given.", " If this query fails, then it tries to interpret <fontspec> as", " \"<font>,<size>,<slant>,<weight>\" and to construct a full X11 font name", " of the form", " -*-<font>-<weight>-<s>-*-*-<size>-*-*-*-*-*-<encoding>", "", " <font> is the base name of the font (e.g. Times or Symbol)", " <size> is the point size (defaults to 12 if not specified)", " <s> is `i` if <slant>==\"italic\" `o` if <slant>==\"oblique\" `r` otherwise", " <weight> is `medium` or `bold` if explicitly requested, otherwise `*`", " <encoding> is set based on the current character set (see `set encoding`).", " So `set term x11 font \"arial,15,italic\"` will be translated to", " -*-arial-*-i-*-*-15-*-*-*-*-*-iso8859-1 (assuming default encoding).", " The <size>, <slant>, and <weight> specifications are all optional.", " If you do not specify <slant> or <weight> then you will get whatever font ", " variant the font server offers first.", " You may set a default enconding via the corresponding X11 resource. E.g.", " gnuplot*encoding: iso8859-15", " The driver also recognizes some common PostScript font names and", " replaces them with possible X11 or TrueType equivalents.", " This same sequence is used to process font requests from `set label`.", "", " If your gnuplot was built with configuration option --enable-x11-mbfonts,", " you can specify multi-byte fonts by using the prefix \"mbfont:\" on the font", " name. An additional font may be given, separated by a semicolon.", " Since multi-byte font encodings are interpreted according to the locale", " setting, you must make sure that the environmental variable LC_CTYPE is set", " to some appropriate locale value such as ja_JP.eucJP, ko_KR.EUC, or zh_CN.EUC.", "", " Example:", " set term x11 font 'mbfont:kana14;k14'", " # 'kana14' and 'k14' are Japanese X11 font aliases, and ';'", " # is the separator of font names.", " set term x11 font 'mbfont:fixed,16,r,medium'", " # <font>,<size>,<slant>,<weight> form is also usable.", " set title '(mb strings)' font 'mbfont:*-fixed-medium-r-normal--14-*'", "", " The same syntax applies to the default font in Xresources settings,", " for example,", " gnuplot*font: \\", " mbfont:-misc-fixed-medium-r-normal--14-*-*-*-c-*-jisx0208.1983-0", "", " If gnuplot is built with --enable-x11-mbfonts, you can use two special", " PostScript font names 'Ryumin-Light-*' and 'GothicBBB-Medium-*' (standard", " Japanese PS fonts) without the prefix \"mbfont:\".", "", "2 command-line_options", "?commands set terminal x11 command-line-options", "?set terminal x11 command-line-options", "?set term x11 command-line-options", "?x11 command-line-options", "?command-line-options", " In addition to the X Toolkit options, the following options may be specified", " on the command line when starting `gnuplot` or as resources in your", " \".Xdefaults\" file (note that `raise` and `persist` can be overridden", " later by `set term x11 [no]raise [no]persist)`:", "@start table - first is interactive cleartext form", " `-mono` forces monochrome rendering on color displays.", " `-gray` requests grayscale rendering on grayscale or color displays.", " (Grayscale displays receive monochrome rendering by default.)", " `-clear` requests that the window be cleared momentarily before a", " new plot is displayed.", " `-tvtwm` requests that geometry specifications for position of the", " window be made relative to the currently displayed portion", " of the virtual root.", " `-raise` raises plot window after each plot", " `-noraise` does not raise plot window after each plot", #ifdef USE_MOUSE " `-noevents` does not process mouse and key events", " `-ctrlq ` closes window on ctrl-q rather than q", #endif " `-persist` plot windows survive after main gnuplot program exits", "#\\begin{tabular}{|cl|} \\hline", "#`-mono` & forces monochrome rendering on color displays.\\\\", "#`-gray` & requests grayscale rendering on grayscale or color displays.\\\\", "# & (Grayscale displays receive monochrome rendering by default.) \\\\", "#`-clear` & requests that the window be cleared momentarily before a\\\\", "# & new plot is displayed. \\\\", "#`-tvtwm` & requests that geometry specifications for position of the\\\\", "# & window be made relative to the currently displayed portion\\\\", "# & of the virtual root. \\\\", "#`-raise` & raises plot window after each plot. \\\\", "#`-noraise` & does not raise plot window after each plot. \\\\", #ifdef USE_MOUSE "#`-noevents` & does not process mouse and key events. \\\\", #endif "#`-persist` & plot windows survive after main gnuplot program exits. \\\\", "%c l .", "%`-mono`@forces monochrome rendering on color displays.", "%`-gray`@requests grayscale rendering on grayscale or color displays.", "% @(Grayscale displays receive monochrome rendering by default.)", "%`-clear`@requests that the window be cleared momentarily before a", "% @new plot is displayed.", "%`-tvtwm`@requests that geometry specifications for position of the", "% @window be made relative to the currently displayed portion", "% @of the virtual root.", "%`-raise`@raises plot window after each plot", "%`-noraise`@does not raise plot window after each plot", #ifdef USE_MOUSE "%`-novevents`@does not process mouse and key events", "%`-ctrlq`@closes window on ctrl-q rather than q", #endif "%`-persist`@plot windows survive after main gnuplot program exits", "@end table", "=X resources", " The options are shown above in their command-line syntax. When entered as", " resources in \".Xdefaults\", they require a different syntax.", "", " Example:", " gnuplot*gray: on", " gnuplot*ctrlq: on", "", " `gnuplot` also provides a command line option (`-pointsize <v>`) and a", " resource, `gnuplot*pointsize: <v>`, to control the size of points plotted", " with the `points` plotting style. The value `v` is a real number (greater", " than 0 and less than or equal to ten) used as a scaling factor for point", " sizes. For example, `-pointsize 2` uses points twice the default size, and", " `-pointsize 0.5` uses points half the normal size.", "", " The `-noevents` switch disables all mouse and key event processing (except", " for `q` and `<space>` for closing the window). This is useful for programs", " which use the x11 driver independent of the gnuplot main program.", "", " The `-ctrlq` switch changes the hot-key that closes a plot window from `q`", " to `<ctrl>q`. This is useful is you are using the keystroke-capture feature", " `pause mouse keystroke`, since it allows the character `q` to be captured", " just as all other alphanumeric characters. The `-ctrlq` switch similarly", " replaces the <space> hot-key with <ctrl><space> for the same reason.", "", "2 monochrome_options", "?commands set terminal x11 monochrome_options", "?set terminal x11 monochrome_options", "?set term x11 monochrome_options", "?x11 monochrome_options", "?monochrome_options", "=X resources", " For monochrome displays, `gnuplot` does not honor foreground or background", " colors. The default is black-on-white. `-rv` or `gnuplot*reverseVideo: on`", " requests white-on-black.", "", "2 color_resources", "?commands set terminal x11 color_resources", "?set terminal x11 color_resources", "?set term x11 color_resources", "?x11 color_resources", "?color_resources", "=X resources", " The X11 terminal honors the following resources (shown here with their", " default values) or the greyscale resources. The values may be color names", " as listed in the X11 rgb.txt file on your system, hexadecimal RGB color", " specifications (see X11 documentation), or a color name followed by a comma", " and an `intensity` value from 0 to 1. For example, `blue, 0.5` means a half", " intensity blue.", "@start table - first is interactive cleartext form", " gnuplot*background: white", " gnuplot*textColor: black", " gnuplot*borderColor: black", " gnuplot*axisColor: black", " gnuplot*line1Color: red", " gnuplot*line2Color: green", " gnuplot*line3Color: blue", " gnuplot*line4Color: magenta", " gnuplot*line5Color: cyan", " gnuplot*line6Color: sienna", " gnuplot*line7Color: orange", " gnuplot*line8Color: coral", "#\\begin{tabular}{|cl|} \\hline", "#&gnuplot*background: white\\\\", "#&gnuplot*textColor: black\\\\", "#&gnuplot*borderColor: black\\\\", "#&gnuplot*axisColor: black\\\\", "#&gnuplot*line1Color: red\\\\", "#&gnuplot*line2Color: green\\\\", "#&gnuplot*line3Color: blue\\\\", "#&gnuplot*line4Color: magenta\\\\", "#&gnuplot*line5Color: cyan\\\\", "#&gnuplot*line6Color: sienna\\\\", "#&gnuplot*line7Color: orange\\\\", "#&gnuplot*line8Color: coral\\\\", "%c l .", "%@gnuplot*background: white", "%@gnuplot*textColor: black", "%@gnuplot*borderColor: black", "%@gnuplot*axisColor: black", "%@gnuplot*line1Color: red", "%@gnuplot*line2Color: green", "%@gnuplot*line3Color: blue", "%@gnuplot*line4Color: magenta", "%@gnuplot*line5Color: cyan", "%@gnuplot*line6Color: sienna", "%@gnuplot*line7Color: orange", "%@gnuplot*line8Color: coral", "@end table", "", " The command-line syntax for these is simple only for background,", " which maps directly to the usual X11 toolkit option \"-bg\". All", " others can only be set on the command line by use of the generic", " \"-xrm\" resource override option", "", " Examples:", "", " gnuplot -background coral", " to change the background color.", "", " gnuplot -xrm 'gnuplot*line1Color:blue'", " to override the first linetype color.", "", "2 grayscale_resources", "?commands set terminal x11 grayscale_resources", "?set terminal x11 grayscale_resources", "?set term x11 grayscale_resources", "?x11 grayscale_resources", "?grayscale_resources", "=X resources", " When `-gray` is selected, `gnuplot` honors the following resources for", " grayscale or color displays (shown here with their default values). Note", " that the default background is black.", "@start table - first is interactive cleartext form", " gnuplot*background: black", " gnuplot*textGray: white", " gnuplot*borderGray: gray50", " gnuplot*axisGray: gray50", " gnuplot*line1Gray: gray100", " gnuplot*line2Gray: gray60", " gnuplot*line3Gray: gray80", " gnuplot*line4Gray: gray40", " gnuplot*line5Gray: gray90", " gnuplot*line6Gray: gray50", " gnuplot*line7Gray: gray70", " gnuplot*line8Gray: gray30", "#\\begin{tabular}{|cl|} \\hline", "#&gnuplot*background: black\\\\", "#&gnuplot*textGray: white\\\\", "#&gnuplot*borderGray: gray50\\\\", "#&gnuplot*axisGray: gray50\\\\", "#&gnuplot*line1Gray: gray100\\\\", "#&gnuplot*line2Gray: gray60\\\\", "#&gnuplot*line3Gray: gray80\\\\", "#&gnuplot*line4Gray: gray40\\\\", "#&gnuplot*line5Gray: gray90\\\\", "#&gnuplot*line6Gray: gray50\\\\", "#&gnuplot*line7Gray: gray70\\\\", "#&gnuplot*line8Gray: gray30\\\\", "%c l .", "%@gnuplot*background: black", "%@gnuplot*textGray: white", "%@gnuplot*borderGray: gray50", "%@gnuplot*axisGray: gray50", "%@gnuplot*line1Gray: gray100", "%@gnuplot*line2Gray: gray60", "%@gnuplot*line3Gray: gray80", "%@gnuplot*line4Gray: gray40", "%@gnuplot*line5Gray: gray90", "%@gnuplot*line6Gray: gray50", "%@gnuplot*line7Gray: gray70", "%@gnuplot*line8Gray: gray30", "@end table", "", "2 line_resources", "?commands set terminal x11 line_resources", "?set terminal x11 line_resources", "?set term x11 line_resources", "?x11 line_resources", "?line_resources", "=X resources", " `gnuplot` honors the following resources for setting the width (in pixels) of", " plot lines (shown here with their default values.) 0 or 1 means a minimal", " width line of 1 pixel width. A value of 2 or 3 may improve the appearance of", " some plots.", "@start table - first is interactive cleartext form", " gnuplot*borderWidth: 2", " gnuplot*axisWidth: 0", " gnuplot*line1Width: 0", " gnuplot*line2Width: 0", " gnuplot*line3Width: 0", " gnuplot*line4Width: 0", " gnuplot*line5Width: 0", " gnuplot*line6Width: 0", " gnuplot*line7Width: 0", " gnuplot*line8Width: 0", "#\\begin{tabular}{|cl|} \\hline", "#&gnuplot*borderWidth: 2\\\\", "#&gnuplot*axisWidth: 0\\\\", "#&gnuplot*line1Width: 0\\\\", "#&gnuplot*line2Width: 0\\\\", "#&gnuplot*line3Width: 0\\\\", "#&gnuplot*line4Width: 0\\\\", "#&gnuplot*line5Width: 0\\\\", "#&gnuplot*line6Width: 0\\\\", "#&gnuplot*line7Width: 0\\\\", "#&gnuplot*line8Width: 0\\\\", "%c l .", "%@gnuplot*borderWidth: 2", "%@gnuplot*axisWidth: 0", "%@gnuplot*line1Width: 0", "%@gnuplot*line2Width: 0", "%@gnuplot*line3Width: 0", "%@gnuplot*line4Width: 0", "%@gnuplot*line5Width: 0", "%@gnuplot*line6Width: 0", "%@gnuplot*line7Width: 0", "%@gnuplot*line8Width: 0", "@end table", "", " `gnuplot` honors the following resources for setting the dash style used for", " plotting lines. 0 means a solid line. A two-digit number `jk` (`j` and `k`", " are >= 1 and <= 9) means a dashed line with a repeated pattern of `j` pixels", " on followed by `k` pixels off. For example, '16' is a dotted line with one", " pixel on followed by six pixels off. More elaborate on/off patterns can be", " specified with a four-digit value. For example, '4441' is four on, four off,", " four on, one off. The default values shown below are for monochrome displays", " or monochrome rendering on color or grayscale displays.", " Color displays default to dashed:off ", "@start table - first is interactive cleartext form", " gnuplot*dashed: off", " gnuplot*borderDashes: 0", " gnuplot*axisDashes: 16", " gnuplot*line1Dashes: 0", " gnuplot*line2Dashes: 42", " gnuplot*line3Dashes: 13", " gnuplot*line4Dashes: 44", " gnuplot*line5Dashes: 15", " gnuplot*line6Dashes: 4441", " gnuplot*line7Dashes: 42", " gnuplot*line8Dashes: 13", "#\\begin{tabular}{|cl|} \\hline", "#&gnuplot*dashed: off\\\\", "#&gnuplot*borderDashes: 0\\\\", "#&gnuplot*axisDashes: 16\\\\", "#&gnuplot*line1Dashes: 0\\\\", "#&gnuplot*line2Dashes: 42\\\\", "#&gnuplot*line3Dashes: 13\\\\", "#&gnuplot*line4Dashes: 44\\\\", "#&gnuplot*line5Dashes: 15\\\\", "#&gnuplot*line6Dashes: 4441\\\\", "#&gnuplot*line7Dashes: 42\\\\", "#&gnuplot*line8Dashes: 13\\\\", "%c l .", "%@gnuplot*dashed: off", "%@gnuplot*borderDashes: 0", "%@gnuplot*axisDashes: 16", "%@gnuplot*line1Dashes: 0", "%@gnuplot*line2Dashes: 42", "%@gnuplot*line3Dashes: 13", "%@gnuplot*line4Dashes: 44", "%@gnuplot*line5Dashes: 15", "%@gnuplot*line6Dashes: 4441", "%@gnuplot*line7Dashes: 42", "%@gnuplot*line8Dashes: 13", "@end table" , "", "2 x11 pm3d_resources", "?commands set terminal x11 pm3d_resources", "?set terminal x11 pm3d_resources", "?set term x11 pm3d_resources", "?x11 pm3d_resources", "?pm3d_resources", "?x11 pm3d", "=X resources", " Choosing the appropriate visual class and number of colors is a crucial", " point in X11 applications and a bit awkward, since X11 supports six visual", " types in different depths.", "", " By default `gnuplot` uses the default visual of the screen. The number of", " colors which can be allocated depends on the visual class chosen. On a", " visual class with a depth > 12bit, gnuplot starts with a maximal number", " of 0x200 colors. On a visual class with a depth > 8bit (but <= 12 bit)", " the maximal number of colors is 0x100, on <= 8bit displays the maximum", " number of colors is 240 (16 are left for line colors).", "", " Gnuplot first starts to allocate the maximal number of colors as stated", " above. If this fails, the number of colors is reduced by the factor 2", " until gnuplot gets all colors which are requested. If dividing `maxcolors`", " by 2 repeatedly results in a number which is smaller than `mincolors`", " `gnuplot` tries to install a private colormap. In this case the window", " manager is responsible for swapping colormaps when the pointer is moved", " in and out the x11 driver's window.", "", " The default for `mincolors` is maxcolors / (num_colormaps > 1 ? 2 : 8),", " where num_colormaps is the number of colormaps which are currently used", " by gnuplot (usually 1, if only one x11 window is open).", "", " Some systems support multiple (different) visual classes together on one", " screen. On these systems it might be necessary to force gnuplot to use a", " specific visual class, e.g. the default visual might be 8bit PseudoColor", " but the screen would also support 24bit TrueColor which would be the", " preferred choice.", "", " The information about an Xserver's capabilities can be obtained with the", " program `xdpyinfo`. For the visual names below you can choose one of", " StaticGray, GrayScale, StaticColor, PseudoColor, TrueColor, DirectColor.", " If an Xserver supports a requested visual type at different depths,", " `gnuplot` chooses the visual class with the highest depth (deepest).", " If the requested visual class matches the default visual and multiple", " classes of this type are supported, the default visual is preferred.", "", " Example: on an 8bit PseudoColor visual you can force a private color map", " by specifying `gnuplot*maxcolors: 240` and `gnuplot*mincolors: 240`.", "", "@start table - first is interactive cleartext form", " gnuplot*maxcolors: <integer>", " gnuplot*mincolors: <integer>", " gnuplot*visual: <visual name>", "#\\begin{tabular}{|cl|} \\hline", "#&gnuplot*maxcolors: integer\\\\", "#&gnuplot*mincolors: integer\\\\", "#&gnuplot*visual: visual name\\\\", "%c l .", "%@gnuplot*maxcolors: <integer number>", "%@gnuplot*mincolors: <integer number>", "%@gnuplot*visual: <visual name>", "@end table" , "", "2 x11 other_resources", "?commands set terminal x11 other_resources", "?set terminal x11 other_resources", "?set term x11 other_resources", "?x11 other_resources", "=X resources", " By default the contents of the current plot window are exported to the X11", " clipboard in response to X events in the window. Setting the resource", " 'gnuplot*exportselection' to 'off' or 'false' will disable this.", "", " By default text rotation is done using a method that is fast, but can", " corrupt nearby colors depending on the background. If this is a problem,", " you can set the resource 'gnuplot.fastrotate' to 'off'", "", "@start table - other x11 resources", " gnuplot*exportselection: off", " gnuplot*fastrotate: on", " gnuplot*ctrlq: off", "#\\begin{tabular}{|cl|} \\hline", "#&gnuplot*exportselection: off\\\\", "#&gnuplot*fastrotate: on\\\\", "#&gnuplot*ctrlq: off\\\\", "%c l .", "%@gnuplot*exportselection: off", "%@gnuplot*fastrotate: on", "%@gnuplot*ctrlq: off", "@end table" END_HELP(x11) #endif /* TERM_HELP */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/mac.trm��������������������������������������������������������������������������0000644�0004711�0000144�00000016376�11125253643�012403� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: mac.trm,v 1.10 2008/12/26 22:16:03 sfeam Exp $ * */ /* GNUPLOT -- mac.trm */ /* Macintosh graphics terminal */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GOT_DRIVER_H #include "driver.h" #endif #ifdef TERM_REGISTER register_term(mac) #endif /****************************************************************************** * * * struct TERMENTRY { * * char *name; * * char *description; * * unsigned int xmax,ymax,v_char,h_char,v_tic,h_tic; * * * * void (*options) __PROTO((void)); * * void (*init) __PROTO((void)); * * void (*reset) __PROTO((void)); * * void (*text) __PROTO((void)); * * int (*scale) __PROTO((double, double)); * * void (*graphics) __PROTO((void)); * * void (*move) __PROTO((unsigned int, unsigned int)); * * void (*vector) __PROTO((unsigned int, unsigned int)); * * void (*linetype) __PROTO((int)); * * void (*put_text) __PROTO((unsigned int, unsigned int,const char*)); * * -- the following are optional. set term ensures they are not NULL * * int (*text_angle) __PROTO((int)); * * int (*justify_text) __PROTO((enum JUSTIFY)); * * void (*point) __PROTO((unsigned int, unsigned int,int)); * * void (*arrow) __PROTO((unsigned int, unsigned int, unsigned int, unsigned int,int)); * * int (*set_font) __PROTO((const char *font)); * * void (*pointsize) __PROTO((double)); * * int flags; * * void (*suspend) __PROTO((void)); -- called after one plot of multiplot * * void (*resume) __PROTO((void)); -- called before plots of multiplot * * void (*fillbox) __PROTO((int style, unsigned int x1, unsigned int y1, unsigned)) -- clear in multiplot mode * * void (*linewidth) __PROTO((double linewidth)); * * }; * * * ******************************************************************************/ #ifdef TERM_PROTO #define MAC_XMAX 494 #define MAC_YMAX 274 /* * #define MAC_XOFFSET (497-MAC_XMAX) * * #define MAC_XLAST (MAC_XMAX - 1) * #define MAC_YLAST (MAC_YMAX - 1) */ #define MAC_VCHAR 12 /* monaco 9 point plain style */ #define MAC_HCHAR 6 #define MAC_VTIC 3 #define MAC_HTIC 3 void MAC_init __PROTO((void)); void MAC_graphics __PROTO((void)); void MAC_text __PROTO((void)); void MAC_linetype __PROTO((int linetype)); void MAC_move __PROTO((unsigned int x,unsigned int y)); void MAC_vector __PROTO((unsigned int x,unsigned int y)); void MAC_put_text __PROTO((unsigned int x,unsigned int y,const char *str)); int MAC_text_angle __PROTO((int angle)); int MAC_justify_text __PROTO((enum JUSTIFY just)); void MAC_reset __PROTO((void)); void MAC_options __PROTO((void)); void MAC_suspend __PROTO((void)); void MAC_resume __PROTO((void)); int MAC_setfont __PROTO((char *font)); #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(mac_driver) "macintosh", "Macintosh Graphic Window", MAC_XMAX, MAC_YMAX, MAC_VCHAR+1, MAC_HCHAR, MAC_VTIC, MAC_HTIC, MAC_options,MAC_init, MAC_reset, MAC_text, null_scale, MAC_graphics, MAC_move, MAC_vector, MAC_linetype, MAC_put_text, MAC_text_angle, MAC_justify_text, do_point, do_arrow, MAC_setfont, NULL, TERM_CAN_MULTIPLOT+TERM_BINARY, MAC_suspend, MAC_resume TERM_TABLE_END(mac_driver) #undef LAST_TERM #define LAST_TERM mac_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(mac) "1 macintosh", "?set terminal macintosh", "?set term macintosh", "?terminal macintosh", "?term macintosh", "?macintosh", " Syntax:", " set terminal macintosh {singlewin | multiwin} {vertical | novertical}", " {size <width>, <height> | default}", "", " 'singlewin' limits the output to a single window and is useful for animations.", " 'multiwin' allows multiple windows.", " 'vertical' is only valid under the gx option. With this option, rotated text", " will be drawn vertically. novertical turns this option off.", " size <width>, <height> overrides the graph size set in the preferences", " dialog until it is cleared with either 'set term mac size default'", " or 'set term mac default'.", "", " 'set term mac size default' sets the window size settings to those set in", " the preferences dialog.", "", " 'set term mac default' sets all options to their default values.", " Default values: nogx, multiwin, novertical.", "", " If you generate graphs under the multiwin option and then switch to singlewin,", " the next plot command will cause one more window to be created. This new", " window will be reused as long as singlewin is in effect. If you switch back", " to multiwin, generate some graphs, and then switch to singlewin again, the", " orginal 'singlewin' window will be resused if it is still open. Otherwise", " a new 'singlewin' window will be created. The 'singlewin' window is not numbered." END_HELP(mac) #endif /* TERM_HELP */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/xlib.trm�������������������������������������������������������������������������0000644�0004711�0000144�00000005204�12212146540�012560� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: xlib.trm,v 1.23.4.3 2013/09/03 04:25:10 sfeam Exp $ */ /* GNUPLOT - xlib.trm */ /* * xlib.trm - inboard terminal driver for X11 (dumps gnuplot_x11 commands) * * New implementation November 2003 * Xlib_init() sets up the output channels, but otherwise all work is done * by the main x11.trm driver routines. * Ethan A Merritt <merritt@u.washington.edu> */ #include "driver.h" #ifdef TERM_REGISTER register_term(xlib) #endif #ifdef TERM_PROTO TERM_PUBLIC void Xlib_init __PROTO((void)); TERM_PUBLIC void Xlib_text __PROTO((void)); TERM_PUBLIC void Xlib_reset __PROTO((void)); #define GOT_XLIB_PROTO #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static FILE *X11_save_ipc = NULL; TERM_PUBLIC void Xlib_init() { /* x11.trm thinks it is writing to a private pipe, but here we */ /* set it to use the channel opened by 'set output <file>' */ X11_save_ipc = X11_ipc; X11_ipc = gpoutfile; #ifdef PIPE_IPC /* There is, of course, no mouse feedback */ ipc_back_fd = IPC_BACK_UNUSABLE; #endif term_initialised = TRUE; } TERM_PUBLIC void Xlib_text() { PRINT0("E\n"); FFLUSH(); #ifdef PIPE_IPC ipc_back_fd = IPC_BACK_UNUSABLE; #endif } TERM_PUBLIC void Xlib_reset() { X11_ipc = X11_save_ipc; } #endif #ifdef TERM_TABLE TERM_TABLE_START(xlib_driver) "xlib", "X11 Window System (gnulib_x11 dump)", X11_XMAX, X11_YMAX, X11_VCHAR, X11_HCHAR, X11_VTIC, X11_HTIC, X11_options, Xlib_init, Xlib_reset, Xlib_text, null_scale, X11_graphics, X11_move, X11_vector, X11_linetype, X11_put_text, X11_text_angle, X11_justify_text, X11_point, do_arrow, X11_set_font, X11_pointsize, TERM_CAN_MULTIPLOT|TERM_INIT_ON_REPLOT|TERM_CAN_DASH, X11_text /* suspend can use same routine */ , 0 /* resume */ , X11_fillbox, X11_linewidth #ifdef USE_MOUSE , NULL, NULL, NULL, NULL, NULL #endif , X11_make_palette, 0 /* X11_previous_palette */ , X11_set_color, X11_filled_polygon , X11_image , ENHX11_OPEN, ENHX11_FLUSH, do_enh_writec TERM_TABLE_END(xlib_driver) #undef LAST_TERM #define LAST_TERM xlib_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(xlib) "1 xlib", "?commands set terminal xlib", "?set terminal xlib", "?set term xlib", "?terminal xlib", "?term xlib", "?xlib", " The `xlib` terminal driver supports the X11 Windows System. It generates", " gnuplot_x11 commands, but sends them to the output file specified by", " `set output '<filename>'`. `set term x11` is equivalent to", " `set output \"|gnuplot_x11 -noevents\"; set term xlib`.", " `xlib` takes the same set of options as `x11`." END_HELP(xlib) #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/imagen.trm�����������������������������������������������������������������������0000644�0004711�0000144�00000055312�10460036603�013070� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: imagen.trm,v 1.20 2006/07/21 02:35:47 sfeam Exp $ */ /* GNUPLOT - imagen.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * Imagen laser printers * * AUTHORS * Paul E. McKenney, David Kotz * Rewritten/extended by: * Hans Olav Eggestad * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * Original for direct Imagen output (but retaining many of the * LaTeX extensions) by Paul E. McKenney, 1989. * Further modified by David Kotz to fit into gnuplot 2.0. * Information Science and Technology Division, SRI International, * 333 Ravenswood Ave, Menlo Park, CA 94025. * Mail to mckenney@sri.com. */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(imagen) #endif #ifdef TERM_PROTO TERM_PUBLIC void IMAGEN_init __PROTO((void)); TERM_PUBLIC void IMAGEN_graphics __PROTO((void)); TERM_PUBLIC void IMAGEN_options __PROTO((void)); TERM_PUBLIC void IMAGEN_text __PROTO((void)); TERM_PUBLIC void IMAGEN_linetype __PROTO((int lt)); TERM_PUBLIC void IMAGEN_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void IMAGEN_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC int IMAGEN_text_angle __PROTO((int ang)); TERM_PUBLIC int IMAGEN_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void IMAGEN_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC void IMAGEN_reset __PROTO((void)); #define IMAGEN_PTS_PER_INCH (300) #define IMAGEN_XMAX (IMAGEN_PTS_PER_INCH * 11) /* 10.0 inches */ #define IMAGEN_YMAX (IMAGEN_PTS_PER_INCH * 78 / 10) /* 7.5 inches */ #define IMAGEN_HTIC (20) #define IMAGEN_VTIC (20) #define IMAGEN_VCHAR (IMAGEN_FONTSIZE*5) #define IMAGEN_HCHAR (IMAGEN_VCHAR/2) #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static void IM_page __PROTO((void)); static void IMAGEN_draw_path __PROTO((void)); static void IMAGEN_setpos __PROTO((int ux, int uy)); static unsigned char *IMAGEN_cvts __PROTO((unsigned char *str, int *width, int *height)); static void IMAGEN_putwd __PROTO((unsigned int w)); static void IMAGEN_createfamily __PROTO((char *c, int sz)); static void IMAGEN_setfont __PROTO((int sz)); static void IMP_set_draw_pattern __PROTO((int pattern, int sz)); static void IMAGEN_mapsinit __PROTO((void)); static void IMAGEN_createmap __PROTO((int name, unsigned short *map)); /* #ifndef __malloc_h #include <malloc.h> #endif */ #include "impcodes.h" /* default is landscape */ #define IMAGEN_A4_H (IMAGEN_PTS_PER_INCH * 83 / 10) #define IMAGEN_A4_W (IMAGEN_PTS_PER_INCH * 116 / 10) /* width in current orientation */ static int IMAGEN_Xmax = IMAGEN_XMAX; static int IMAGEN_Ymax = IMAGEN_YMAX; #define IMAGEN_FONTSIZE 12 #define IMAGEN_FONT "cour" static unsigned short IMP_gmap[128]; static unsigned char IMP_chmap[256]; static int IMAGEN_page_h = IMAGEN_A4_H; static int IMAGEN_page_w = IMAGEN_A4_W; static int IM_win_horiz = 1; static int IM_win_verti = 1; static int IM_plot_nr = 0; static int IMAGEN_fontsize = IMAGEN_FONTSIZE; static int IMAGEN_familytable[36]; static int IMAGEN_orgX; /* absolute-pixel-ORIgin of graph page. */ static int IMAGEN_orgY; static int IMAGEN_orgx; /* absolute-pixel-ORIgin of current graph. */ static int IMAGEN_orgy; static int IMAGEN_posx; /* current drawing position (lines). */ static int IMAGEN_posy; /* static int IMAGEN_inplot; */ static int IMAGEN_xmax = IMAGEN_XMAX; /* width of graph in pixels. */ static int IMAGEN_ymax = IMAGEN_YMAX; /* height of graph in pixels. */ static int IMAGEN_winx = IMAGEN_XMAX; /* width of window in pixels. */ static int IMAGEN_winy = IMAGEN_YMAX; /* height of window in pixels. */ static int IMAGEN_hchar; /* Height of CHAR in current font. */ static int IMAGEN_wchar; /* Width of CHAR in current font. */ static int IMAGEN_blofs; /* BaseLine OFfSet from bounding box. */ static int IMAGEN_angle = -1; /* 0 for horizontal text, 1 for vertical */ static int IMAGEN_portrait; /* 0 for landscape */ static enum JUSTIFY IMAGEN_justify = LEFT; /* left/center/right */ #define STOREPATH 100 static unsigned int IM_xvector[STOREPATH]; /* draw path vector of x values */ static unsigned int IM_yvector[STOREPATH]; /* draw path vector of y values */ static unsigned int IM_veclen; /* length of allocated path vector */ static unsigned int IM_vecpos = 0; /* current pos in vector */ /* char IMPdrpattern[10][10] = { {0}, {30,10,0}, {0}, {10,30,0}, {2,20,0}, {20,10,0}, {30,20,10,20,0}, {30,20,4,10,10,10,4,20,0}, {40,20,0}, {30,15,4,15,0} }; */ static char IMPdrpattern[10][10] = { /* -2 */ {0}, /* -1 */ {1, 8, 0}, /* 0 */ {0}, /* 1 */ {16, 4, 0}, /* 2 */ {3, 8, 0}, /* 3 */ {8, 8, 0}, /* 4 */ {16, 6, 3, 6, 0}, /* 5 */ {16, 6, 8, 6, 0}, /* 6 */ {16, 4, 1, 4, 8, 4, 1, 4, 0}, /* 7 */ {16, 4, 1, 8, 1, 4, 0} }; enum IMAGEN_id { IMAGEN_PORTRAIT, IMAGEN_LANDSCAPE, IMAGEN_OTHER }; static struct gen_table IMAGEN_opts[] = { { "p$ortrait", IMAGEN_PORTRAIT }, { "l$andscape", IMAGEN_LANDSCAPE }, { NULL, IMAGEN_OTHER } }; TERM_PUBLIC void IMAGEN_options() { struct value a; while (!END_OF_COMMAND) { switch(lookup_table(&IMAGEN_opts[0],c_token)) { case IMAGEN_PORTRAIT: IMAGEN_portrait = TRUE; IMAGEN_page_h = IMAGEN_A4_W; IMAGEN_page_w = IMAGEN_A4_H; IMAGEN_Xmax = IMAGEN_YMAX; IMAGEN_Ymax = IMAGEN_XMAX; c_token++; break; case IMAGEN_LANDSCAPE: IMAGEN_portrait = FALSE; c_token++; break; case IMAGEN_OTHER: default: if (equals(c_token, "[")) { /* windows spesified */ c_token++; /* if (IM_plot_nr>1) */ if (equals(c_token, "]")) { IM_page(); c_token++; break; } if (END_OF_COMMAND) { int_error(c_token, "no. windows: [horizontal,vertical] expected"); } else if (!equals(c_token, ",")) { IM_win_horiz = (int) real(const_express(&a)); } if (!equals(c_token, ",")) int_error(c_token, "',' expected"); c_token++; if (!equals(c_token, "]")) { IM_win_verti = (int) real(const_express(&a)); } if (!equals(c_token, "]")) int_error(c_token, "expecting ']'"); c_token++; } else { /* We have font size specified */ IMAGEN_fontsize = (int) real(const_express(&a)); if (IMAGEN_fontsize < 8) IMAGEN_fontsize = 8; if (IMAGEN_fontsize > 15) IMAGEN_fontsize = 15; } } } sprintf(term_options, "%d %s [%1d,%1d]", IMAGEN_fontsize, (IMAGEN_portrait) ? "portrait" : "landscape", IM_win_horiz, IM_win_verti); } TERM_PUBLIC void IMAGEN_init() { register struct termentry *t = term; /* char font[10]; */ /* font name */ IMAGEN_posx = IMAGEN_posy = 0; IMAGEN_orgX = (IMAGEN_page_w - IMAGEN_Xmax) / 2; IMAGEN_orgY = (IMAGEN_page_h - IMAGEN_Ymax) / 2; IMAGEN_xmax = IMAGEN_winx = (int) (IMAGEN_Xmax / IM_win_horiz); IMAGEN_ymax = IMAGEN_winy = (int) (IMAGEN_Ymax / IM_win_verti); t->xmax = (unsigned int) (IMAGEN_xmax); t->ymax = (unsigned int) (IMAGEN_ymax); fputs("@document(language impress, paper a4)", gpoutfile); if (IMAGEN_portrait) { putc(imP_SET_ABS_V, gpoutfile); IMAGEN_putwd(3520); } putc(imP_SET_HV_SYSTEM, gpoutfile); putc(((IMAGEN_portrait ? 3 : 0) << 5) | (3 << 3) | (IMAGEN_portrait ? 0 : 5), gpoutfile); /* sprintf(font, "cour%02d", IMAGEN_FONTSIZE); */ IMAGEN_mapsinit(); IMAGEN_createmap(1, IMP_gmap); /* IMAGEN_createfamily(font, IMAGEN_FONTSIZE); */ IMAGEN_setfont(IMAGEN_fontsize); IMAGEN_text_angle(0); putc(imP_SET_ABS_H, gpoutfile); IMAGEN_putwd(0); putc(imP_SET_ABS_V, gpoutfile); IMAGEN_putwd(0); IMAGEN_linetype(LT_AXIS); /* if ((IM_xvector = (unsigned int *) malloc(STOREPATH*sizeof(int))) == NULL) { fputs("Imagendriver: Unable to allocate memory for draw path\n", stderr); exit(1); } if ((IM_yvector = (unsigned int *) malloc(STOREPATH*sizeof(int))) == NULL) { fputs("Imagendriver: Unable to allocate memory for draw path\n", stderr); exit(1); } */ IM_veclen = STOREPATH; IM_vecpos = 0; } static void IM_page() { if (IM_vecpos) { /* fprintf(stderr,"graphics, draw path\n"); */ IMAGEN_draw_path(); } putc(imP_ENDPAGE, gpoutfile); } TERM_PUBLIC void IMAGEN_graphics() { int tmpx, tmpy; /* int xoff, yoff; */ if (IM_vecpos) { /* fprintf(stderr,"graphics, draw path\n"); */ IMAGEN_draw_path(); } if (IM_plot_nr >= (IM_win_horiz * IM_win_verti)) { IM_page(); IM_plot_nr = 0; } IM_plot_nr++; tmpx = IMAGEN_orgX + ((IM_plot_nr - 1) % IM_win_horiz) * IMAGEN_winx; tmpy = IMAGEN_orgY + ((IM_win_verti - 1) - (int) ((IM_plot_nr - 1) / IM_win_horiz)) * IMAGEN_winy; IMAGEN_orgx = tmpx + (int) ((IMAGEN_winx - IMAGEN_xmax) / 2); IMAGEN_orgy = tmpy + (int) ((IMAGEN_winy - IMAGEN_ymax) / 2); } TERM_PUBLIC void IMAGEN_text() { } #define DRAW_PATTERNS 6 TERM_PUBLIC void IMAGEN_linetype(int lt) { static int lastlinetype = -10; int pen /*, pattern */ ; if (IM_vecpos) { /* fprintf(stderr,"move, draw path\n"); */ IMAGEN_draw_path(); } if (lt < -2) lt = LT_BLACK; if (lt == LT_BLACK) { pen = 4; } else { pen = (int) (lt / 8) * 2; if (pen <= 0) pen = 1; } lt = (lt % 8) + 2; if (lastlinetype == lt) return; lastlinetype = lt; putc(imP_SET_PEN, gpoutfile); putc(pen, gpoutfile); IMP_set_draw_pattern(lt, pen); } TERM_PUBLIC void IMAGEN_move(unsigned int x, unsigned int y) { if (IM_vecpos) { /* fprintf(stderr,"move, draw path\n"); */ IMAGEN_draw_path(); } IM_xvector[0] = x + IMAGEN_orgx; IM_yvector[0] = y + IMAGEN_orgy; /* fprintf(stderr,"Ny vector: startpos: %1d %1d\n",IM_xvector[0],IM_yvector[0]); */ IM_vecpos = 1; /* IMAGEN_posx = x; IMAGEN_posy = y; */ } TERM_PUBLIC void IMAGEN_vector(unsigned int ux, unsigned int uy) { /* void IMAGEN_draw_path(); */ /* Store path. */ IM_xvector[IM_vecpos] = ux + IMAGEN_orgx; IM_yvector[IM_vecpos] = uy + IMAGEN_orgy; /* fprintf(stderr,"Ny node: nr: %1d; %1d %1d\n",IM_vecpos,IM_xvector[IM_vecpos],IM_yvector[IM_vecpos]); */ IM_vecpos++; if (IM_vecpos >= IM_veclen) { IMAGEN_draw_path(); IM_xvector[0] = ux + IMAGEN_orgx; IM_yvector[0] = uy + IMAGEN_orgy; IM_vecpos = 1; } } static void IMAGEN_draw_path() { /* unsigned int pos; */ register int i; putc(imP_CREATE_PATH, gpoutfile); IMAGEN_putwd(IM_vecpos); for (i = 0; i < IM_vecpos; i++) { /* IMAGEN_putwd(IM_xvector[i] + IMAGEN_orgx); IMAGEN_putwd(IM_yvector[i] + IMAGEN_orgy); */ IMAGEN_putwd(IM_xvector[i]); IMAGEN_putwd(IM_yvector[i]); } IM_vecpos = 0; /* Draw path with black pen. */ putc(imP_DRAW_PATH, gpoutfile); putc(15, gpoutfile); /* Set current position to end of line. */ /* IMAGEN_move(ux, uy); */ } static void IMAGEN_setpos(int ux, int uy) { /* Set x and y position (for text), also set beginning-of-line. */ putc(imP_SET_ABS_H, gpoutfile); IMAGEN_putwd(ux + IMAGEN_orgx); putc(imP_SET_ABS_V, gpoutfile); IMAGEN_putwd(uy + IMAGEN_orgy); putc(imP_SET_BOL, gpoutfile); if (IMAGEN_angle == 1) IMAGEN_putwd(uy + IMAGEN_orgx); /* vertical */ else IMAGEN_putwd(ux + IMAGEN_orgx); /* horizontal */ } TERM_PUBLIC int IMAGEN_text_angle(int ang) { if (IM_vecpos) { /* fprintf(stderr,"text_angle, draw path\n"); */ IMAGEN_draw_path(); } if (IMAGEN_angle != ang) { IMAGEN_angle = ang; /* record for later use */ putc(imP_SET_ADV_DIRS, gpoutfile); putc(ang == 0 ? 0 : 7, gpoutfile); /* 0=>horiz : 7=>vert */ } return (TRUE); } TERM_PUBLIC int IMAGEN_justify_text(enum JUSTIFY mode) { if (IM_vecpos) { /* fprintf(stderr,"justify_text, draw path\n"); */ IMAGEN_draw_path(); } IMAGEN_justify = mode; return (TRUE); } static unsigned char * IMAGEN_cvts(unsigned char *str, int *width, int *height) { unsigned char *cp1; unsigned char *cp2; static unsigned char *buf = NULL; int h; int maxw; int w; /* Free up old buffer, if there is one, get a new one. Since */ /* all transformations shorten the string, get a buffer that is */ /* the same size as the input string. */ if (buf != NULL) (void) free(buf); buf = (unsigned char *) gp_alloc(strlen((char *) str)+2, "converted label string"); /* Do the transformations. */ cp1 = str; cp2 = buf; h = 1; maxw = 0; w = 0; while (strlen((char *) cp1) > 0) { switch (*cp1) { case ' ': /* Space character. */ *cp2++ = imP_SP; w++; break; case '\\': /* Escape sequence. */ if (*++cp1 == '\\') { /* Begin new line. */ h++; if (w > maxw) maxw = w; w = 0; *cp2++ = '\n'; /* *cp2++ = imP_CRLF; */ break; } /* Fall through to just copy next char out. */ default: /* *cp2++ = *cp1; */ *cp2++ = IMP_chmap[*cp1]; w++; break; } cp1++; } *cp2++ = '\n'; *cp2 = '\0'; if (w > maxw) maxw = w; if (height != NULL) *height = IMAGEN_angle ? IMAGEN_wchar * maxw : IMAGEN_hchar * h; if (width != NULL) *width = IMAGEN_angle ? IMAGEN_hchar * h : IMAGEN_wchar * maxw; return (buf); } TERM_PUBLIC void IMAGEN_put_text(unsigned int x, unsigned int y, const char str[]) { unsigned char *cvstr, *p; int height; int width; int sx, sy; if (IM_vecpos) { /* fprintf(stderr,"put_text, draw path\n"); */ IMAGEN_draw_path(); } cvstr = IMAGEN_cvts((unsigned char *) str, &width, &height); if (IMAGEN_angle) { /* vertical */ /* x += IMAGEN_hchar; */ x -= width / 2 - IMAGEN_hchar; /* y -= height/2; */ } else /* horizontal */ y += height / 2 - IMAGEN_hchar; while ((p = (unsigned char *) strchr((char *) cvstr, '\n'))) { *p = '\0'; sx = x; sy = y; if (IMAGEN_angle) sx = x - IMAGEN_blofs; else sy = y + IMAGEN_blofs; width = strlen((char *) cvstr) * IMAGEN_wchar; switch (IMAGEN_justify) { case LEFT: break; case CENTRE: if (IMAGEN_angle) { sy = y - width / 2; } else { sx = x - width / 2; } break; /*x -= width/2; break; */ case RIGHT: if (IMAGEN_angle) { sy = y - width; } else { sx = x - width; } break; /* x -= width; break; */ } IMAGEN_setpos(sx, sy); fputs((char *) cvstr, gpoutfile); cvstr = ++p; if (IMAGEN_angle) { /* vertical */ x += IMAGEN_hchar; } else { y -= IMAGEN_hchar; } } } TERM_PUBLIC void IMAGEN_reset() { if (IM_vecpos) { /* fprintf(stderr,"reset, draw path\n"); */ IMAGEN_draw_path(); } putc(imP_EOF, gpoutfile); } static void IMAGEN_putwd(unsigned int w) { /* fprintf(stderr,"%1u\n",w); */ putc(w >> 8, gpoutfile); putc(w, gpoutfile); } static void IMAGEN_createfamily(char *c, int sz) { putc(imP_CREATE_FAMILY_TABLE, gpoutfile); putc(sz, gpoutfile); putc(1, gpoutfile); putc(1, gpoutfile); /* putc(0, gpoutfile); */ fputs(c, gpoutfile); putc(0, gpoutfile); } static void IMAGEN_setfont(int sz) { char font[20]; if (!IMAGEN_familytable[sz]) { sprintf(font, "%s%02d", IMAGEN_FONT, sz); IMAGEN_createfamily(font, sz); IMAGEN_familytable[sz] = sz; } IMAGEN_hchar = sz * 5; IMAGEN_wchar = IMAGEN_hchar / 2; IMAGEN_blofs = IMAGEN_hchar / 3; term->v_char = IMAGEN_hchar; term->h_char = IMAGEN_wchar; putc(imP_SET_FAMILY, gpoutfile); putc(sz, gpoutfile); putc(imP_SET_SP, gpoutfile); IMAGEN_putwd(IMAGEN_wchar); putc(imP_SET_IL, gpoutfile); IMAGEN_putwd(IMAGEN_hchar); } static void IMP_set_draw_pattern(int pattern, int sz) { int i /*,j */ ; putc(imP_SET_DRAW_PATTERN, gpoutfile); putc(0, gpoutfile); putc(imP_SET_DRAW_PATTERN, gpoutfile); /* if ( strlen(IMPdrpattern[pattern]) == 1 ) { putc(type,gpoutfile); return; } */ putc(strlen(IMPdrpattern[pattern]), gpoutfile); for (i = 0; i < strlen(IMPdrpattern[pattern]); i++) { IMAGEN_putwd(IMPdrpattern[pattern][i] * sz); } } static void IMAGEN_mapsinit() { register int i /*, j */ ; for (i = 32; i < 127; i++) { IMP_gmap[i] = i; } IMP_gmap[1] = 225; IMP_gmap[2] = 233; IMP_gmap[3] = 61736; IMP_gmap[4] = 241; IMP_gmap[5] = 249; IMP_gmap[6] = 61864; IMP_gmap[7] = 162; IMP_gmap[8] = 163; IMP_gmap[9] = 164; IMP_gmap[10] = 165; IMP_gmap[11] = 167; IMP_gmap[12] = 171; IMP_gmap[13] = 182; IMP_gmap[14] = 61346; IMP_gmap[15] = 191; IMP_gmap[16] = 187; IMP_gmap[17] = 188; IMP_gmap[18] = 189; IMP_gmap[19] = 190; IMP_gmap[20] = 210; IMP_gmap[21] = 211; IMP_gmap[22] = 251; IMP_gmap[23] = 61232; IMP_gmap[24] = 212; IMP_gmap[25] = 137; IMP_gmap[26] = 176; IMP_gmap[27] = 161; IMP_gmap[28] = 139; IMP_gmap[29] = 133; IMP_gmap[30] = 140; IMP_gmap[31] = 61249; IMP_gmap[32] = 8738; IMP_gmap[34] = 186; IMP_gmap[36] = 164; IMP_gmap[39] = 185; IMP_gmap[127] = 61286; /* for (i=1;i<127;i++) fprintf(stderr,"%d -> %d\n",i,IMP_gmap[i]); */ for (i = 32; i <= 127; i++) { IMP_chmap[i] = i; } for (i = 128; i <= 255; i++) { IMP_chmap[i] = 128; /* first map all non printable chars to SPACE */ } IMP_chmap[161] = 27; IMP_chmap[162] = 7; IMP_chmap[163] = 8; IMP_chmap[164] = 120; IMP_chmap[165] = 10; IMP_chmap[166] = 124; IMP_chmap[167] = 11; IMP_chmap[168] = 25; IMP_chmap[169] = 21; IMP_chmap[170] = 45; IMP_chmap[171] = 12; IMP_chmap[172] = 83; IMP_chmap[173] = 45; IMP_chmap[174] = 20; IMP_chmap[175] = 126; IMP_chmap[176] = 26; IMP_chmap[177] = 12; IMP_chmap[178] = 1; IMP_chmap[179] = 2; IMP_chmap[180] = 29; IMP_chmap[181] = 52; IMP_chmap[182] = 13; IMP_chmap[183] = 5; IMP_chmap[184] = 28; IMP_chmap[185] = 3; IMP_chmap[186] = 45; IMP_chmap[187] = 16; IMP_chmap[188] = 17; IMP_chmap[189] = 18; IMP_chmap[190] = 19; IMP_chmap[191] = 15; IMP_chmap[192] = 65; IMP_chmap[193] = 65; IMP_chmap[194] = 65; IMP_chmap[195] = 65; IMP_chmap[196] = 65; IMP_chmap[197] = 3; IMP_chmap[198] = 1; IMP_chmap[199] = 67; IMP_chmap[200] = 69; IMP_chmap[201] = 69; IMP_chmap[202] = 69; IMP_chmap[203] = 69; IMP_chmap[204] = 73; IMP_chmap[205] = 73; IMP_chmap[206] = 73; IMP_chmap[207] = 73; IMP_chmap[208] = 68; IMP_chmap[209] = 78; IMP_chmap[210] = 79; IMP_chmap[211] = 79; IMP_chmap[212] = 79; IMP_chmap[213] = 79; IMP_chmap[214] = 79; IMP_chmap[215] = 13; IMP_chmap[216] = 2; IMP_chmap[217] = 85; IMP_chmap[218] = 85; IMP_chmap[219] = 85; IMP_chmap[220] = 85; IMP_chmap[221] = 89; IMP_chmap[222] = 32; IMP_chmap[223] = 22; IMP_chmap[224] = 97; IMP_chmap[225] = 97; IMP_chmap[226] = 97; IMP_chmap[227] = 97; IMP_chmap[228] = 97; IMP_chmap[229] = 6; IMP_chmap[230] = 4; IMP_chmap[231] = 99; IMP_chmap[232] = 101; IMP_chmap[233] = 101; IMP_chmap[234] = 101; IMP_chmap[235] = 101; IMP_chmap[236] = 105; IMP_chmap[237] = 105; IMP_chmap[238] = 105; IMP_chmap[239] = 105; IMP_chmap[240] = 100; IMP_chmap[241] = 110; IMP_chmap[242] = 111; IMP_chmap[243] = 111; IMP_chmap[244] = 111; IMP_chmap[245] = 111; IMP_chmap[246] = 111; IMP_chmap[247] = 10; IMP_chmap[248] = 5; IMP_chmap[249] = 117; IMP_chmap[250] = 117; IMP_chmap[251] = 117; IMP_chmap[252] = 117; IMP_chmap[253] = 121; IMP_chmap[254] = 32; IMP_chmap[255] = 121; } static void IMAGEN_createmap(int name, unsigned short *map) { register int i, j; unsigned char s[4], *p; p = s; *p++ = imP_CREATE_MAP; *p++ = name; j = 0; for (i = 0; i < 127; i++) { if (map[i]) j++; } *p = j; for (i = 0; i < 3; i++) putc(s[i], gpoutfile); s[3] = 1; for (j = 0; j < 127; j++) { if (map[j]) { p = s; *p++ = j; *p++ = map[j] >> 8; *p = map[j] & 255; for (i = 0; i < 4; i++) putc(s[i], gpoutfile); } } } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(imagen_driver) "imagen", "Imagen laser printer", IMAGEN_XMAX, IMAGEN_YMAX, IMAGEN_VCHAR, IMAGEN_HCHAR, IMAGEN_VTIC, IMAGEN_HTIC, IMAGEN_options, IMAGEN_init, IMAGEN_reset, IMAGEN_text, null_scale, IMAGEN_graphics, IMAGEN_move, IMAGEN_vector, IMAGEN_linetype, IMAGEN_put_text, IMAGEN_text_angle, IMAGEN_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(imagen_driver) #undef LAST_TERM #define LAST_TERM imagen_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(imagen) "1 imagen", "?commands set terminal imagen", "?set terminal imagen", "?set term imagen", "?terminal imagen", "?term imagen", "?imagen", " The `imagen` terminal driver supports Imagen laser printers. It is capable", " of placing multiple graphs on a single page.", "", " Syntax:", " set terminal imagen {<fontsize>} {portrait | landscape}", " {[<horiz>,<vert>]}", "", " where `fontsize` defaults to 12 points and the layout defaults to `landscape`.", " `<horiz>` and `<vert>` are the number of graphs in the horizontal and", " vertical directions; these default to unity.", "", " Example:", " set terminal imagen portrait [2,3]", "", " puts six graphs on the page in three rows of two in portrait orientation." END_HELP(imagen) #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/dumb.trm�������������������������������������������������������������������������0000644�0004711�0000144�00000037201�11553113605�012556� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: dumb.trm,v 1.32 2011/04/18 19:56:53 broeker Exp $ * */ /* GNUPLOT - dumb.trm */ /*[ * Copyright 1991 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * DUMB terminals * * AUTHORS * Francois Pinard, 91-04-03 * INTERNET: pinard@iro.umontreal.ca * * Ethan A Merritt Nov 2003 * Added support for enhanced text mode. * Yes, this is frivolous, but it serves as an example for * adding enhanced text to other terminals. You can disable * it by adding a line * #define NO_DUMB_ENHANCED_SUPPORT * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ #include "driver.h" #ifdef TERM_REGISTER register_term(dumb_driver) #endif #ifdef TERM_PROTO TERM_PUBLIC void DUMB_options __PROTO((void)); TERM_PUBLIC void DUMB_init __PROTO((void)); TERM_PUBLIC void DUMB_graphics __PROTO((void)); TERM_PUBLIC void DUMB_text __PROTO((void)); TERM_PUBLIC void DUMB_reset __PROTO((void)); TERM_PUBLIC void DUMB_linetype __PROTO((int linetype)); TERM_PUBLIC void DUMB_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void DUMB_point __PROTO((unsigned int x, unsigned int y, int point)); TERM_PUBLIC void DUMB_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void DUMB_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void DUMB_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); #ifndef NO_DUMB_ENHANCED_SUPPORT /* To support "set term dumb enhanced" (don't ask why!) */ TERM_PUBLIC void ENHdumb_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC void ENHdumb_OPEN __PROTO((char * fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint)); TERM_PUBLIC void ENHdumb_FLUSH __PROTO((void)); #else #define ENHdumb_put_text NULL #endif #define DUMB_XMAX 79 #define DUMB_YMAX 24 #endif /* TERM_PROTO */ #ifdef TERM_BODY #define DUMB_AXIS_CONST '\1' #define DUMB_BORDER_CONST '\2' /* matrix of characters */ static char *dumb_matrix = NULL; /* matrix of priority at each position */ static char *dumb_priority = NULL; /* current character used to draw */ static char dumb_pen; /* current X position */ static int dumb_x; /* current Y position */ static int dumb_y; static int dumb_xmax = DUMB_XMAX; static int dumb_ymax = DUMB_YMAX; static int dumb_feed = 1; #define DUMB_PIXEL(x,y) dumb_matrix[dumb_xmax*(y)+(x)] static void dumb_set_pixel __PROTO((int x, int y, int v, int p)); enum DUMB_id { DUMB_FEED, DUMB_NOFEED, DUMB_ENH, DUMB_NOENH, DUMB_SIZE, DUMB_OTHER }; static struct gen_table DUMB_opts[] = { { "f$eed", DUMB_FEED }, { "nof$eed", DUMB_NOFEED }, { "enh$anced", DUMB_ENH }, { "noe$nhanced", DUMB_NOENH }, { "size", DUMB_SIZE }, { NULL, DUMB_OTHER } }; TERM_PUBLIC void DUMB_options() { int x, y; while (!END_OF_COMMAND) { switch(lookup_table(&DUMB_opts[0],c_token)) { case DUMB_FEED: c_token++; dumb_feed = 1; break; case DUMB_NOFEED: c_token++; dumb_feed = 0; break; #ifndef NO_DUMB_ENHANCED_SUPPORT case DUMB_ENH: c_token++; term->put_text = ENHdumb_put_text; term->flags |= TERM_ENHANCED_TEXT; break; case DUMB_NOENH: c_token++; term->put_text = DUMB_put_text; term->flags &= ~TERM_ENHANCED_TEXT; break; #endif case DUMB_SIZE: c_token++; /* Fall through */ case DUMB_OTHER: default: x = int_expression(); if (!END_OF_COMMAND) { if (equals(c_token,",")) c_token++; y = int_expression(); dumb_xmax = term->xmax = x; dumb_ymax = term->ymax = y; } break; } } sprintf(term_options, "%sfeed %s size %d, %d", dumb_feed ? "" : "no", term->put_text == ENHdumb_put_text ? "enhanced" : "", dumb_xmax, dumb_ymax); } static void dumb_set_pixel(int x, int y, int v, int p) { if ((unsigned int) x <= dumb_xmax && /* ie x>=0 && x<=dumb_xmax */ (unsigned int) y <= dumb_ymax && p > dumb_priority[dumb_xmax * y + x]) { dumb_matrix[dumb_xmax * y + x] = v; dumb_priority[dumb_xmax * y + x] = p; } } TERM_PUBLIC void DUMB_init() { if (dumb_matrix) free(dumb_matrix); dumb_matrix = gp_alloc((dumb_xmax+1) * (dumb_ymax+1) * 2, "dumb terminal"); dumb_priority = dumb_matrix + dumb_xmax * dumb_ymax; } TERM_PUBLIC void DUMB_graphics() { int i; char *pm = dumb_matrix, *pp = dumb_priority; for (i = dumb_xmax * dumb_ymax; i > 0; i--) { *pm++ = ' '; *pp++ = 0; } } TERM_PUBLIC void DUMB_text() { int x, y, l; putc('\f', gpoutfile); for (y = dumb_ymax - 1; y >= 0; y--) { for (l = dumb_xmax; l > 0 && DUMB_PIXEL(l - 1, y) == ' '; l--); for (x = 0; x < l; x++) putc(DUMB_PIXEL(x, y), gpoutfile); if (dumb_feed || y > 0) putc('\n', gpoutfile); } fflush(gpoutfile); } TERM_PUBLIC void DUMB_reset() { if (dumb_matrix) free(dumb_matrix); dumb_matrix = NULL; } TERM_PUBLIC void DUMB_linetype(int linetype) { static char pen_type[7] = { '*', '#', '$', '%', '@', '&', '=' }; if (linetype == LT_BLACK) dumb_pen = DUMB_BORDER_CONST; else if (linetype == LT_AXIS) dumb_pen = DUMB_AXIS_CONST; else if (linetype <= LT_NODRAW) dumb_pen = ' '; else { linetype = linetype % 7; dumb_pen = pen_type[linetype]; } } TERM_PUBLIC void DUMB_move(unsigned int x, unsigned int y) { dumb_x = x; dumb_y = y; } TERM_PUBLIC void DUMB_point(unsigned int x, unsigned int y, int point) { dumb_set_pixel(x, y, point == -1 ? '.' : point % 26 + 'A', 4); } TERM_PUBLIC void DUMB_vector(unsigned int arg_x, unsigned int arg_y) { int x = arg_x; /* we need signed int, since * unsigned-signed=unsigned and */ int y = arg_y; /* abs and cast to double wouldn't work */ char pen, pen1; int priority; int delta; if (ABS(y - dumb_y) > ABS(x - dumb_x)) { switch (dumb_pen) { case DUMB_AXIS_CONST: pen = ':'; pen1 = '+'; priority = 1; break; case DUMB_BORDER_CONST: pen = '|'; pen1 = '+'; priority = 2; break; default: pen = dumb_pen; pen1 = dumb_pen; priority = 3; break; } dumb_set_pixel(dumb_x, dumb_y, pen1, priority); for (delta = 1; delta < ABS(y - dumb_y); delta++) { dumb_set_pixel(dumb_x + (int) ((double) (x - dumb_x) * delta / ABS(y - dumb_y) + 0.5), dumb_y + delta * sign(y - dumb_y), pen, priority); } dumb_set_pixel(x, y, pen1, priority); } else if (ABS(x - dumb_x) > ABS(y - dumb_y)) { switch (dumb_pen) { case DUMB_AXIS_CONST: pen = '.'; pen1 = '+'; priority = 1; break; case DUMB_BORDER_CONST: pen = '-'; pen1 = '+'; priority = 2; break; default: pen = dumb_pen; pen1 = dumb_pen; priority = 3; break; } dumb_set_pixel(dumb_x, dumb_y, pen1, priority); for (delta = 1; delta < ABS(x - dumb_x); delta++) dumb_set_pixel(dumb_x + delta * sign(x - dumb_x), dumb_y + (int) ((double) (y - dumb_y) * delta / ABS(x - dumb_x) + 0.5), pen, priority); dumb_set_pixel(x, y, pen1, priority); } else { switch (dumb_pen) { case DUMB_AXIS_CONST: /* zero length axis */ pen = '+'; priority = 1; break; case DUMB_BORDER_CONST: /* zero length border */ pen = '+'; priority = 2; break; default: pen = dumb_pen; priority = 3; break; } for (delta = 0; delta <= ABS(x - dumb_x); delta++) dumb_set_pixel(dumb_x + delta * sign(x - dumb_x), dumb_y + delta * sign(y - dumb_y), pen, priority); } dumb_x = x; dumb_y = y; } TERM_PUBLIC void DUMB_put_text(unsigned int x, unsigned int y, const char *str) { int length; length = strlen(str); if (x + length > dumb_xmax) x = GPMAX(0, dumb_xmax - length); for (; x < dumb_xmax && *str; x++, str++) dumb_set_pixel(x, y, *str, 5); } TERM_PUBLIC void DUMB_arrow( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) /* ignored */ { char saved_pen; char saved_x; char saved_y; (void) head; /* dummy usage avoid compiler warnings */ saved_pen = dumb_pen; saved_x = dumb_x; saved_y = dumb_y; dumb_pen = '>'; dumb_x = sx; dumb_y = sy; DUMB_vector(ex, ey); dumb_pen = saved_pen; dumb_x = saved_x; dumb_y = saved_y; } #ifndef NO_DUMB_ENHANCED_SUPPORT /* * The code from here on serves as an example of how to * add enhanced text mode support to even a dumb driver. */ static TBOOLEAN ENHdumb_opened_string; static TBOOLEAN ENHdumb_show = TRUE; static int ENHdumb_overprint = 0; static TBOOLEAN ENHdumb_widthflag = TRUE; static unsigned int ENHdumb_xsave, ENHdumb_ysave; #define ENHdumb_fontsize 1 #define ENHdumb_font "" static double ENHdumb_base; TERM_PUBLIC void ENHdumb_OPEN( char *fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { /* There are two special cases: * overprint = 3 means save current position * overprint = 4 means restore saved position */ if (overprint == 3) { ENHdumb_xsave = dumb_x; ENHdumb_ysave = dumb_y; return; } else if (overprint == 4) { DUMB_move(ENHdumb_xsave, ENHdumb_ysave); return; } if (!ENHdumb_opened_string) { ENHdumb_opened_string = TRUE; /* Start new text fragment */ enhanced_cur_text = &enhanced_text[0]; /* Scale fractional font height to vertical units of display */ ENHdumb_base = base * 2; /* Keep track of whether we are supposed to show this string */ ENHdumb_show = showflag; /* 0/1/2 no overprint / 1st pass / 2nd pass */ ENHdumb_overprint = overprint; /* widthflag FALSE means do not update text position after printing */ ENHdumb_widthflag = widthflag; /* Many drivers will need to do something about font selection here */ /* but dumb is dumb */ } } TERM_PUBLIC void ENHdumb_FLUSH() { char *str = enhanced_text; /* The fragment to print */ int x = dumb_x; /* The current position */ int len; if (ENHdumb_opened_string) { *enhanced_cur_text = '\0'; len = strlen(str); /* print the string fragment, perhaps invisibly */ /* NB: base expresses offset from current y pos */ for (; x < dumb_xmax && *str; x++, str++) if (ENHdumb_show) dumb_set_pixel(x, dumb_y+ENHdumb_base, *str, 5); if (!ENHdumb_widthflag) /* don't update position */ ; else if (ENHdumb_overprint == 1) /* First pass of overprint, leave position in center of fragment */ dumb_x += len / 2; else /* Normal case is to update position to end of fragment */ dumb_x += len; ENHdumb_opened_string = FALSE; } } TERM_PUBLIC void ENHdumb_put_text(unsigned int x, unsigned int y, const char *str) { /* If no enhanced text processing is needed, we can use the plain */ /* vanilla put_text() routine instead of this fancy recursive one. */ if (ignore_enhanced_text || !strpbrk(str, "{}^_@&~")) { DUMB_put_text(x,y,str); return; } /* Set up global variables needed by enhanced_recursion() */ enhanced_fontscale = 1.0; ENHdumb_opened_string = FALSE; strncpy(enhanced_escape_format,"%c",sizeof(enhanced_escape_format)); DUMB_move(x,y); /* Set the recursion going. We say to keep going until a * closing brace, but we don't really expect to find one. * If the return value is not the nul-terminator of the * string, that can only mean that we did find an unmatched * closing brace in the string. We increment past it (else * we get stuck in an infinite loop) and try again. */ while (*(str = enhanced_recursion((char *)str, TRUE, ENHdumb_font, ENHdumb_fontsize, 0.0, TRUE, TRUE, 0))) { (term->enhanced_flush)(); /* I think we can only get here if *str == '}' */ enh_err_check(str); if (!*++str) break; /* end of string */ /* else carry on and process the rest of the string */ } } #endif /* NO_DUMB_ENHANCED_SUPPORT */ #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(dumb_driver) "dumb", "ascii art for anything that prints text", DUMB_XMAX, DUMB_YMAX, 1, 1, 1, 1, DUMB_options, DUMB_init, DUMB_reset, DUMB_text, null_scale, DUMB_graphics, DUMB_move, DUMB_vector, DUMB_linetype, DUMB_put_text, null_text_angle, null_justify_text, DUMB_point, DUMB_arrow, set_font_null, 0, /* pointsize */ TERM_CAN_MULTIPLOT, NULL, NULL, NULL, NULL #ifdef USE_MOUSE , NULL, NULL, NULL, NULL, NULL #endif , NULL, NULL, NULL, NULL , NULL /* image */ #ifndef NO_DUMB_ENHANCED_SUPPORT , ENHdumb_OPEN, ENHdumb_FLUSH, do_enh_writec #endif /* NO_DUMB_ENHANCED_SUPPORT */ TERM_TABLE_END(dumb_driver) #undef LAST_TERM #define LAST_TERM dumb_driver #endif /* TERM_TABLE */ #ifdef TERM_HELP START_HELP(dumb) "1 dumb", "?commands set terminal dumb", "?set terminal dumb", "?set term dumb", "?terminal dumb", "?term dumb", "?dumb", " The `dumb` terminal driver plots into a text block using ascii characters.", " It has an optional size specification and a trailing linefeed flag.", "", " Syntax:", " set terminal dumb {size <xchars>,<ychars>} {[no]feed}", #ifndef NO_DUMB_ENHANCED_SUPPORT " {[no]enhanced}", #endif "", " where <xchars> and <ychars> set the size of the text block. The default is", " 79 by 24. The last newline is printed only if `feed` is enabled.", "", " Example:", " set term dumb size 60,15", " plot [-5:6.5] sin(x) with impulse", "", " 1 +-------------------------------------------------+", " 0.8 +|||++ ++||||++ sin(x) +----+ |", " 0.6 +|||||+ ++|||||||+ |", " 0.4 +||||||+ ++|||||||||+ |", " 0.2 +|||||||+ ++|||||||||||+ +|", " 0 ++++++++++++++++++++++++++++++++++++++++++++++++++|", " -0.2 + +|||||||||||+ +|||||||||||+ |", " -0.4 + +|||||||||+ +|||||||||+ |", " -0.6 + +|||||||+ +|||||||+ |", " -0.8 + + ++||||+ + + ++||||+ + |", " -1 +---+--------+--------+-------+--------+--------+-+", " -4 -2 0 2 4 6 " END_HELP(dumb) #endif /* TERM_HELP */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/cgm.trm��������������������������������������������������������������������������0000644�0004711�0000144�00000175725�11616060277�012421� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hey Emacs this is -*- C -*- * $Id: cgm.trm,v 1.97 2011/08/02 20:40:31 sfeam Exp $ */ /* GNUPLOT - cgm.trm */ /*[ * Copyright 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c and ../docs/termdoc.c. * * This terminal driver supports: * Computer Graphics Metafile * * TODO * better control over plot size (never cutting off labels, correct font * sizes) * REFERENCES * * ISO 8632-1:1992 Computer Graphics Metafile (CGM), Part 1, * Functional Specification. * * ISO 8632-1:1992 Computer Graphics Metafile (CGM), Part 3, * Binary Encoding. * * FIPS PUB 128 - Computer Graphics Metafile (CGM). * * MIL-STD-2301A Computer Graphics Metafile (CGM) Implementation * Standard for the National Imagery Transmission Format Standard, 5 * June 1998, http://164.214.2.51/ntb/baseline/docs/2301a/. Only a * subset of CGM version 1, but does include the binary format for * that subset. * * MIL-D-28003A "Digital Representation for Communication of * Illustration Data: CGM Application Profile", 15 November 1991, * http://www-cals.itsi.disa.mil/core/standards/28003aa1.pdf. * * "The computer graphics metafile", Lofton R. Henderson and Anne * M. Mumford, Butterworths, London, 1990, ISBN 0-408-02680-4. * * AUTHOR * Jim Van Zandt <jrvz@comcast.net> * * send your comments or suggestions to the author or * gnuplot-info@lists.sourceforge.net. */ #include "driver.h" #ifdef TERM_REGISTER register_term(cgm) #endif #ifdef TERM_PROTO TERM_PUBLIC void CGM_options __PROTO((void)); TERM_PUBLIC void CGM_init __PROTO((void)); TERM_PUBLIC void CGM_reset __PROTO((void)); TERM_PUBLIC void CGM_text __PROTO((void)); TERM_PUBLIC void CGM_graphics __PROTO((void)); TERM_PUBLIC void CGM_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void CGM_dashed_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void CGM_solid_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void CGM_linetype __PROTO((int linetype)); TERM_PUBLIC void CGM_linecolor __PROTO((int color)); TERM_PUBLIC void CGM_dashtype __PROTO((int dashtype)); TERM_PUBLIC void CGM_linewidth __PROTO((double width)); TERM_PUBLIC void CGM_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int CGM_text_angle __PROTO((int ang)); TERM_PUBLIC int CGM_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC int CGM_set_font __PROTO((const char *font)); TERM_PUBLIC void CGM_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void CGM_fillbox __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); TERM_PUBLIC int CGM_make_palette __PROTO((t_sm_palette *palette)); TERM_PUBLIC void CGM_set_color __PROTO((t_colorspec *)); TERM_PUBLIC void CGM_filled_polygon __PROTO((int points, gpiPoint *corner)); TERM_PUBLIC void CGM_set_pointsize __PROTO((double size)); #define FATAL(msg) { fprintf(stderr, "%s\nFile %s line %d\n", msg, __FILE__, __LINE__); exit(EXIT_FAILURE); } #define CGM_LARGE 32767 #define CGM_SMALL 32767/18*13 /* aspect ratio 1:.7222 */ #define CGM_MARGIN (CGM_LARGE/180) /* convert from plot units to pt */ #define CGM_PT ((term->xmax + CGM_MARGIN)/cgm_plotwidth) #define CGM_LINE_TYPES 9 /* number of line types we support */ #define CGM_COLORS 96 /* must not exceed size of pm3d_color_names_tbl[] */ #define CGM_POINTS 13 /* number of markers we support */ #define CGM_MAX_SEGMENTS 16382 /* maximum # polyline coordinates */ #define CGM_VCHAR (CGM_SMALL/360*12) #define CGM_HCHAR (CGM_SMALL/360*12*5/9) #define CGM_VTIC (CGM_LARGE/80) #define CGM_HTIC (CGM_LARGE/80) #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static int CGM_find_font __PROTO((const char *name, int len, double *relwidth)); static int CGM_find_nearest_color __PROTO((t_colorspec *colorspec)); /* * on NeXTstep, id is an identifier (in ObjC) and causes a parse error * since some asserts below are mistaken as casts. datum is a type * defined in ndbm.h which also causes a parse error (ndbm.h is * included as part of appkit.h, I think). Strangely enough, both * errors only happen with cpp-precomp -smart, not with the regular * cpp. (AL) */ #ifdef NEXT #define id id_ #define datum datum_ #endif #include <ctype.h> /* for isspace() */ #ifndef assert #define assert(x) 0 /* defeat assertions */ #endif /* uncomment the following to enable assertions for this module only, regardless of compiler switches #ifdef NDEBUG #define DEFEAT_ASSERTIONS #endif #undef NDEBUG #include <assert.h> */ #define CGM_ADJ (sizeof(int)/sizeof(short)) static unsigned int cgm_posx; static unsigned int cgm_posy; static unsigned int cgm_linetype = 1; static unsigned int cgm_linetypes = CGM_LINE_TYPES + 3; static unsigned int cgm_dashtype = 0; static unsigned int cgm_color = 0; static unsigned int cgm_background = 0xffffff; static int *cgm_polyline; /* stored polyline coordinates */ static int cgm_coords = 0; /* # polyline coordinates saved */ static int cgm_doing_polygon = 0; /* nonzero if creating polygon, else * creating polyline */ /* static enum JUSTIFY cgm_justify = LEFT; */ /* unused */ static int cgm_step_sizes[8]; /* array of currently used dash lengths in plot units */ static int cgm_step_index = 0; /* index into cgm_step_sizes[] */ static int cgm_step = 0; /* amount of current dash not yet drawn, in plot units */ static int cgm_tic, cgm_tic707, cgm_tic866, cgm_tic500, cgm_tic1241, cgm_tic1077, cgm_tic621; /* marker dimensions */ struct cgm_properties { double angle; /* angle of text baseline (radians counter-clockwise from horizontal) */ int font_index; /* font index */ int char_height; /* character height in picture units */ enum JUSTIFY justify_mode; /* how text is justified */ int edge_visibility; /* nonzero if edge is visible */ int edge_color; int fill_color; int interior_style; int hatch_index; }; static struct cgm_properties cgm_current={-1,-1,-1,(enum JUSTIFY)-1,-1,-1,-1,-1,-1}, /* written to file */ cgm_next={0,-2,-2,LEFT,-2,-2,-2,-1,-1}, /* needed for next text string/marker */ cgm_reset={-1,-1,-1,(enum JUSTIFY)-1,-1,-1,-1,-1,-1}; /* invalid entries */ static int cgm_user_color_count = 0; static int cgm_user_color_max = 0; static int cgm_smooth_colors = 0; static int GPFAR *cgm_user_color_table = (int GPFAR*)0; static int cgm_maximum_color_index = 255; /* Size of color table we will write */ struct fontdata { char *name; /* the name of the font */ double width; /* the width of the font, relative to Times Bold Italic. The width adjustment can only be approximate. Of the standard fonts, only the four versions of "Courier" are monospaced. Also, metrics of the same font from different foundaries are sometimes different. */ }; static struct fontdata cgm_basic_font_data[]={ /* these are WebCGM recommended fonts */ {"Helvetica",1.039}, {"Helvetica Oblique",1.099}, {"Helvetica Bold",1.083}, {"Helvetica Bold Oblique",1.011}, {"Times Roman",.981}, {"Times Bold",.985}, {"Times Italic",.959}, {"Times Bold Italic",1.0}, {"Courier",1.327}, {"Courier Bold",1.327}, {"Courier Oblique",1.218}, {"Courier Bold Oblique",1.341}, {"Symbol",.897}, /* These are basic public domain fonts required by MIL-D-28003A */ {"Hershey/Cartographic_Roman",1.2404}, {"Hershey/Cartographic_Greek",.9094}, {"Hershey/Simplex_Roman",1.2369}, {"Hershey/Simplex_Greek",.9129}, {"Hershey/Simplex_Script",1.4181}, {"Hershey/Complex_Roman",1.1150}, {"Hershey/Complex_Greek",.9059}, {"Hershey/Complex_Script",1.3868}, {"Hershey/Complex_Italic",1.4146}, {"Hershey/Complex_Cyrillic",1.2056}, {"Hershey/Duplex_Roman",1.1707}, {"Hershey/Triplex_Roman",1.3240}, {"Hershey/Triplex_Italic",1.3310}, {"Hershey/Gothic_German",1.2056}, {"Hershey/Gothic_English",1.2021}, {"Hershey/Gothic_Italian",1.2021}, {"Hershey/Symbol_Set_1",.9059}, {"Hershey/Symbol_Set_2",.9059}, {"Hershey/Symbol_Math",.9059}, /* These are available in the Microsoft Office import filter. By default, the script font can apparently be accessed only via the name "15". */ {"ZapfDingbats",1.583}, {"Script",1.139}, {"15",1.139}, /* in the Microsoft Office and Corel Draw import filters, these are pseudonyms for some of the above */ {"Helvetica Italic",1.099}, {"Helvetica Bold Italic",1.011}, {"Courier Italic",1.218}, {"Courier Bold Italic",1.341}, {"Times Oblique",.959}, {"Times Bold Oblique",1.0}, {0,0} }; static struct fontdata *cgm_font_data = cgm_basic_font_data; #define DEFAULT_CGMFONT "Helvetica Bold" static char CGM_default_font[MAX_ID_LEN+1] = {'\0'}; /* variables to record the options */ static char cgm_font[32] = DEFAULT_CGMFONT; static unsigned int cgm_fontsize = 12; static unsigned cgm_linewidth; /* line width in plot units */ static unsigned cgm_linewidth_pt = 1; /* line width in pt */ static TBOOLEAN cgm_monochrome = FALSE; /* colors enabled? */ static int cgm_plotwidth = 432; /* assumed width of plot in pt. */ static TBOOLEAN cgm_portrait = FALSE; /* portrait orientation? */ static TBOOLEAN cgm_rotate = TRUE; /* text rotation enabled? */ static TBOOLEAN cgm_dashed = TRUE; /* dashed linestyles enabled? */ static TBOOLEAN cgm_nofontlist_mode = FALSE; /* omit font list? */ /* prototypes for static functions */ static void CGM_local_reset __PROTO((void)); static void CGM_flush_polyline __PROTO((void)); static void CGM_flush_polygon __PROTO((void)); static void CGM_write_char_record __PROTO((int class, int cgm_id, int length, char *data)); static void CGM_write_code __PROTO((int class, int cgm_id, int length)); static void CGM_write_int __PROTO((int value)); static void CGM_write_int_record __PROTO((int class, int cgm_id, int length, int *data)); static void CGM_write_mixed_record __PROTO((int class, int cgm_id, int numint, int *int_data, int numchar, const char *char_data)); static void CGM_write_byte_record __PROTO((int class, int cgm_id, int length, char *data)); enum CGM_id { /* cgm mode */ CGM_PORTRAIT, CGM_LANDSCAPE, CGM_DEFAULT, /* color */ CGM_MONOCHROME, CGM_COLOR, /* rotation */ CGM_ROTATE, CGM_NOROTATE, CGM_DASHED, CGM_SOLID, CGM_LINEWIDTH, CGM_WIDTH, CGM_NOFONTLIST, CGM_BACKGROUND, CGM_OTHER }; static struct gen_table CGM_opts[] = { { "p$ortrait", CGM_PORTRAIT }, { "la$ndscape", CGM_LANDSCAPE }, { "de$fault", CGM_DEFAULT }, { "nof$ontlist", CGM_NOFONTLIST }, { "win$word6", CGM_NOFONTLIST }, /* deprecated */ { "m$onochrome", CGM_MONOCHROME }, { "c$olor", CGM_COLOR }, { "c$olour", CGM_COLOR }, { "r$otate", CGM_ROTATE }, { "nor$otate", CGM_NOROTATE }, { "da$shed", CGM_DASHED }, { "s$olid", CGM_SOLID }, { "li$newidth", CGM_LINEWIDTH }, { "lw", CGM_LINEWIDTH }, { "wid$th", CGM_WIDTH }, { "backg$round", CGM_BACKGROUND }, { NULL, CGM_OTHER } }; TERM_PUBLIC void CGM_options() { char *string; /* Annoying hack to handle the case of 'set termoption' after */ /* we have already initialized the terminal. */ if (c_token != 2) CGM_local_reset(); while (!END_OF_COMMAND) { switch(lookup_table(&CGM_opts[0],c_token)) { case CGM_PORTRAIT: cgm_portrait = TRUE; c_token++; break; case CGM_LANDSCAPE: cgm_portrait = FALSE; c_token++; break; case CGM_DEFAULT: CGM_local_reset(); c_token++; break; case CGM_NOFONTLIST: cgm_nofontlist_mode = TRUE; c_token++; break; case CGM_MONOCHROME: cgm_monochrome = TRUE; term->flags |= TERM_MONOCHROME; c_token++; break; case CGM_COLOR: cgm_monochrome = FALSE; term->flags &= ~TERM_MONOCHROME; c_token++; break; case CGM_ROTATE: cgm_rotate = TRUE; c_token++; break; case CGM_NOROTATE: cgm_rotate = FALSE; c_token++; break; case CGM_DASHED: cgm_dashed = TRUE; c_token++; break; case CGM_SOLID: cgm_dashed = FALSE; c_token++; break; case CGM_LINEWIDTH: c_token++; if (!END_OF_COMMAND) { cgm_linewidth_pt = int_expression(); if (cgm_linewidth_pt == 0 || cgm_linewidth_pt > 10000) { int_warn(c_token,"linewidth out of range"); cgm_linewidth_pt = 1; } } break; case CGM_WIDTH: c_token++; if (!END_OF_COMMAND) { cgm_plotwidth = int_expression(); if (cgm_plotwidth < 0 || cgm_plotwidth > 10000) { int_warn(c_token,"width out of range"); cgm_plotwidth = 6 * 72; } } break; case CGM_BACKGROUND: c_token++; cgm_background = parse_color_name(); if (cgm_user_color_count == 0) { cgm_user_color_count = 1; cgm_user_color_table = gp_alloc(4 * sizeof(int), "CGM color table"); cgm_user_color_table[0] = 0; } cgm_user_color_table[1] = cgm_background>>16 & 0xff; cgm_user_color_table[2] = cgm_background>>8 & 0xff; cgm_user_color_table[3] = cgm_background & 0xff; break; case CGM_OTHER: default: string = gp_input_line + token[c_token].start_index; if (string[0] == 'x') { /* set color */ unsigned short red, green, blue; if (sscanf(string, "x%2hx%2hx%2hx", &red, &green, &blue ) != 3) int_error(c_token, "invalid color spec, must be xRRGGBB"); if (cgm_user_color_count >= cgm_user_color_max) { cgm_user_color_max = cgm_user_color_max*2 + 4; cgm_user_color_table = gp_realloc(cgm_user_color_table, (cgm_user_color_max*3+1)*sizeof(int), "CGM color table"); /* 1st table entry is the minimum color index value */ cgm_user_color_table[0] = 0; } cgm_user_color_table[1 + 3*cgm_user_color_count] = red; cgm_user_color_table[2 + 3*cgm_user_color_count] = green; cgm_user_color_table[3 + 3*cgm_user_color_count] = blue; cgm_user_color_count++; ++c_token; } else { if (equals(c_token,"font")) c_token++; if (isstringvalue(c_token)) { double relwidth; int font_index; char *s = try_to_get_string(); char *comma = strchr(s,','); if (comma && (1 == sscanf(comma+1,"%d",&cgm_fontsize))) *comma = '\0'; if (*s) font_index = CGM_find_font(s, strlen(s), &relwidth); else font_index = CGM_find_font(cgm_font, strlen(cgm_font), &relwidth); if (font_index == 0) { /* insert the font in the font table */ struct fontdata *new_font_data; int i, n; for (n=0; cgm_font_data[n].name; n++) ; new_font_data = gp_alloc((n + 2)*sizeof(struct fontdata), "CGM font list"); new_font_data->name = s; /* punt, since we don't know the real font width */ new_font_data->width = 1.0; for (i = 0; i <= n; i++) new_font_data[i+1] = cgm_font_data[i]; cgm_font_data = new_font_data; font_index = 1; } else free(s); strncpy(cgm_font, cgm_font_data[font_index-1].name, sizeof(cgm_font)); } else { /* the user is specifying the font size */ cgm_fontsize = int_expression(); } break; } } } if (cgm_portrait) { term->xmax = CGM_SMALL - CGM_MARGIN; term->ymax = CGM_LARGE - CGM_MARGIN; } else { term->xmax = CGM_LARGE - CGM_MARGIN; term->ymax = CGM_SMALL - CGM_MARGIN; } { /* cgm_font, cgm_fontsize, and/or term->v_char may have changed */ double w; CGM_find_font(cgm_font, strlen(cgm_font), &w); term->v_char = (unsigned int) (cgm_fontsize*CGM_PT); term->h_char = (unsigned int) (cgm_fontsize*CGM_PT*.527*w); } sprintf(CGM_default_font, "%s,%d", cgm_font, cgm_fontsize); /* CGM_default_font holds the font and size set at 'set term' */ sprintf(term_options, "%s %s %s %s %s width %d linewidth %d \"%s\" %d", cgm_portrait ? "portrait" : "landscape", cgm_monochrome ? "monochrome" : "color", cgm_rotate ? "rotate" : "norotate", cgm_dashed ? "dashed" : "solid", cgm_nofontlist_mode ? "nofontlist" : "", cgm_plotwidth, cgm_linewidth_pt, cgm_font, cgm_fontsize); if (cgm_user_color_count) { int i, red, green, blue; for (i = 0; i < cgm_user_color_count && (strlen(term_options) + 9 < MAX_LINE_LEN); i++) { red = cgm_user_color_table[1 + 3*i]; green = cgm_user_color_table[2 + 3*i]; blue = cgm_user_color_table[3 + 3*i]; sprintf(term_options + strlen(term_options), " x%02x%02x%02x", red, green, blue); } } if (cgm_user_color_count < CGM_COLORS) { int i, j; /* fill in colors not set by the user with the default colors */ /* 1st table entry is the minimum color index value */ cgm_user_color_table = gp_realloc(cgm_user_color_table, (CGM_COLORS * 3 + 1) * sizeof (int), "CGM color table"); cgm_user_color_table[0] = 0; for (i = cgm_user_color_count, j = cgm_user_color_count * 3; i < CGM_COLORS; i++, j+=3) { cgm_user_color_table[j+1] = (pm3d_color_names_tbl[i].value >> 16) & 0xff; cgm_user_color_table[j+2] = (pm3d_color_names_tbl[i].value >> 8) & 0xff; cgm_user_color_table[j+3] = (pm3d_color_names_tbl[i].value ) & 0xff; } cgm_user_color_count = CGM_COLORS; } } static void CGM_local_reset() { double w; strcpy(cgm_font, DEFAULT_CGMFONT); CGM_find_font(cgm_font, strlen(cgm_font), &w); cgm_fontsize = 12; term->v_char = (unsigned int) (cgm_fontsize * CGM_PT); term->h_char = (unsigned int) (cgm_fontsize * CGM_PT * .527 * w); cgm_linewidth_pt = 1; cgm_monochrome = FALSE; cgm_plotwidth = 6 * 72; cgm_portrait = FALSE; cgm_rotate = TRUE; cgm_dashed = TRUE; cgm_nofontlist_mode = FALSE; cgm_current = cgm_reset; cgm_user_color_count = 0; } TERM_PUBLIC void CGM_init() { cgm_posx = cgm_posy = 0; cgm_linetype = 0; cgm_next.angle = 0; cgm_next.interior_style = 1; cgm_next.hatch_index = 1; cgm_polyline = gp_alloc(CGM_MAX_SEGMENTS*sizeof(int),"cgm polylines"); } TERM_PUBLIC void CGM_graphics() { register struct termentry *t = term; static int version_data[] = { 1 }; static int vdc_type_data[] = { 0 }; static int integer_precision_data[] = { 16 }; static int real_precision_data[] = { 1, 16, 16 }; static int index_precision_data[] = { 16 }; static int color_precision_data[] = { 16 }; static int color_index_precision_data[] = { 16 }; static int scaling_mode_data[] = { 0, 0, 0 }; static int color_value_extent_data[] = { 0, 0, 0, 255, 255, 255 }; static int color_selection_mode_data[] = { 0 }; static int linewidth_specification_mode_data[] = { 0 }; static int edge_width_specification_mode_data[] = { 0 }; static int marker_size_specification_mode_data[] = { 0 }; static int vdc_extent_data[] = { 0, 0, 0, 0 }; static int line_type_data[] = { 1 }; static int interior_style_data[] = { 1 }; /* 0=hollow 1=filled * 2=pattern 3=hatch * 4=empty */ static int hatch_index_data[] = { 1 }; /* 1=horizontal 2=vertical * 3=positive slope * 4=negative slope * 5=horizontal/vertical * crosshatch * 6=positive/negative * slope crosshatch */ static int GPFAR elements_list_data[] = { 0, /* will be set to # elements in this list */ 0, 1, /* Begin Metafile */ 0, 2, /* End Metafile */ 0, 3, /* Begin Picture */ 0, 4, /* Begin Picture Body */ 0, 5, /* End Picture */ 1, 1, /* Metafile Version */ 1, 2, /* Metafile Description */ 1, 3, /* VDC Type */ 1, 4, /* Integer Precision */ 1, 5, /* Real Precision */ 1, 6, /* Index Precision */ 1, 7, /* Color Precision */ 1, 8, /* Color Index Precision */ 1, 9, /* Maximum Color Index */ 1, 10, /* Color Value Extent */ 1, 13, /* Font List */ 2, 1, /* Scaling Mode */ 2, 2, /* Color Selection Mode */ 2, 3, /* Line Width Specification Mode */ 2, 4, /* Marker Size Specification Mode */ 2, 5, /* Edge Width Specification Mode */ 2, 6, /* VDC Extent */ #ifdef NEVER /* disabled due to complaints from CGM import filters */ 3, 1, /* VDC Integer Precision */ 3, 4, /* Transparency */ 3, 6, /* Clip Indicator */ #endif 4, 1, /* Polyline */ 4, 3, /* Polymarker */ 4, 4, /* Text */ 4, 7, /* Polygon */ 4, 11, /* Rectangle */ 4, 12, /* Circle */ 4, 15, /* Circular Arc Center */ 4, 16, /* Circular Arc Center Close */ 4, 17, /* Ellipse */ 4, 18, /* Elliptical Arc */ 4, 19, /* Elliptical Arc Close */ 5, 2, /* Line Type */ 5, 3, /* Line Width */ 5, 4, /* Line Color */ 5, 6, /* Marker Type */ 5, 7, /* Marker Size */ 5, 8, /* Marker Color */ 5, 10, /* Text Font Index */ 5, 14, /* Text Color */ 5, 15, /* Character Height */ 5, 16, /* Character Orientation */ 5, 18, /* Text Alignment */ 5, 22, /* Interior Style */ 5, 23, /* Fill Color */ 5, 24, /* Hatch Index */ 5, 27, /* Edge Type */ 5, 28, /* Edge Width */ 5, 29, /* Edge Color */ 5, 30, /* Edge Visibility */ 5, 34, /* Color Table */ 6, 1, /* Escape */ 7, 2 /* Application Data */ }; /* metafile description (class 1), including filename if available */ if (!outstr) CGM_write_char_record(0, 1, 1, outstr); else CGM_write_char_record(0, 1, strlen(outstr) + 1, outstr); CGM_write_int_record(1, 1, 2, version_data); { char description_data[256]; sprintf(description_data, "\ Gnuplot version %s patchlevel %s,\ Computer Graphics Metafile version 1 per MIL-D-28003A/BASIC-1.%d", gnuplot_version, gnuplot_patchlevel, cgm_monochrome?0:2); CGM_write_char_record(1, 2, strlen(description_data), description_data); } elements_list_data[0] = (sizeof(elements_list_data) / CGM_ADJ - 2) / 4; CGM_write_int_record(1, 11, sizeof(elements_list_data) / CGM_ADJ, elements_list_data); CGM_write_int_record(1, 3, 2, vdc_type_data); CGM_write_int_record(1, 4, 2, integer_precision_data); CGM_write_int_record(1, 5, 6, real_precision_data); CGM_write_int_record(1, 6, 2, index_precision_data); CGM_write_int_record(1, 7, 2, color_precision_data); CGM_write_int_record(1, 8, 2, color_index_precision_data); CGM_write_int_record(1, 9, 2, &cgm_maximum_color_index); CGM_write_int_record(1, 10, sizeof(color_value_extent_data) / CGM_ADJ, color_value_extent_data); if (cgm_nofontlist_mode == FALSE) { char *buf, *s; int i, lgh = 0; for (i = 0; cgm_font_data[i].name; i++) lgh += strlen(cgm_font_data[i].name) + 1; buf = gp_alloc(lgh + 1, "CGM font list"); for (s = buf, i = 0; cgm_font_data[i].name; i++) { int lgh = strlen(cgm_font_data[i].name); *s++ = (char)lgh; strcpy(s, cgm_font_data[i].name); s += lgh; } CGM_write_byte_record(1, 13, lgh, buf); free(buf); } /* picture description (classes 2 and 3) */ CGM_write_char_record(0, 3, 8, "PICTURE1"); CGM_write_int_record(2, 1, 6, scaling_mode_data); CGM_write_int_record(2, 2, 2, color_selection_mode_data); CGM_write_int_record(2, 3, 2, linewidth_specification_mode_data); CGM_write_int_record(2, 4, 2, marker_size_specification_mode_data); CGM_write_int_record(2, 5, 2, edge_width_specification_mode_data); vdc_extent_data[2] = t->xmax + CGM_MARGIN; vdc_extent_data[3] = t->ymax + CGM_MARGIN; CGM_write_int_record(2, 6, 8, vdc_extent_data); /* picture body (classes 4 and 5) */ CGM_write_int_record(0, 4, 0, NULL); #ifdef NEVER /* no need for these, since we accept the defaults */ { static int vdc_integer_precision_data[] = { 16 }; CGM_write_int_record(3, 1, 2, vdc_integer_precision_data); } { static int transparency_data[] = { 1 }; /* text background: 0=auxiliary color 1=transparent */ CGM_write_int_record(3, 4, sizeof(transparency_data) / CGM_ADJ, transparency_data); } { static int clip_indicator_data[] = { 0 }; CGM_write_int_record(3, 6, sizeof(clip_indicator_data) / CGM_ADJ, clip_indicator_data); } #endif if (!cgm_monochrome) CGM_write_int_record(5, 34, (cgm_user_color_count*3+1)* sizeof(cgm_user_color_table[0])/CGM_ADJ, cgm_user_color_table); CGM_write_int_record(5, 2, sizeof(line_type_data) / CGM_ADJ, line_type_data); /* line type 1=SOLID */ cgm_linewidth = cgm_linewidth_pt * CGM_PT; CGM_write_int_record(5, 3, sizeof(cgm_linewidth) / CGM_ADJ, (int *) &cgm_linewidth); /* line width */ CGM_write_int_record(5, 28, sizeof(cgm_linewidth) / CGM_ADJ, (int *) &cgm_linewidth); /* edge width */ CGM_write_int_record(5, 27, sizeof(line_type_data) / CGM_ADJ, line_type_data); /* edge type 1=SOLID */ CGM_linecolor(0); cgm_current = cgm_reset; cgm_next.char_height = t->v_char; CGM_write_int_record(5, 22, 2, interior_style_data); CGM_write_int_record(5, 24, 2, hatch_index_data); { char buf[45]; sprintf(buf, "%.31s,%d", cgm_font, cgm_fontsize); CGM_set_font(buf); } CGM_set_pointsize(pointsize); /* Fill with background color if user has specified one */ if (!cgm_monochrome && cgm_user_color_count > 0) { CGM_linecolor(LT_BACKGROUND); CGM_fillbox(FS_SOLID, 0, 0, t->xmax, t->ymax); } } /* Return the index for the font with the name `name'. The index for the first font is 1. Set relwidth to the width of the font, relative to Times Bold Italic. If the font is not in the table, set *relwidth to 1.0 and return 0. */ static int CGM_find_font(const char *name, int numchar, double *relwidth) { int i; *relwidth = 1.; for (i=0; cgm_font_data[i].name; i++) /* strncasecmp is not standard, but defined by stdfn.c if not available */ if (strlen(cgm_font_data[i].name) == numchar && strncasecmp(name, cgm_font_data[i].name, numchar) == 0) { *relwidth = cgm_font_data[i].width; return i+1; } return 0; } TERM_PUBLIC int CGM_set_font(const char *font) { register struct termentry *t = term; int size, font_index; char *comma = strchr(font, ','); int len; double width; /* Allow null string to indicaute default font */ if (!font || !(*font)) font = CGM_default_font; /* find font in font table, or use 1st font */ if (comma) len = comma - font; else len = strlen(font); font_index = CGM_find_font(font, len, &width); if (font_index == 0) font_index = 1; cgm_next.font_index = font_index; { char *s = cgm_font_data[font_index-1].name; len = strlen(s); if (len > 31) len = 31; strncpy(cgm_font, s, len); cgm_font[len] = NUL; } /* set font size */ size = cgm_fontsize; if (comma) sscanf(comma + 1, "%d", &size); t->v_char = size * CGM_PT; t->h_char = size * CGM_PT * .527 * width; cgm_next.char_height = t->v_char; return TRUE; } TERM_PUBLIC void CGM_text() { CGM_flush_polyline(); CGM_write_int_record(0, 5, 0, NULL); /* end picture */ CGM_write_int_record(0, 2, 0, NULL); /* end metafile */ } TERM_PUBLIC void CGM_linetype(int linetype) { if (linetype < LT_NODRAW) linetype = LT_NODRAW; if (linetype == cgm_linetype) return; cgm_linetype = linetype; CGM_linecolor(linetype); if (cgm_dashed) { CGM_dashtype(linetype); /* DBT 10-8-98 use dashes */ } else { /* dashes for gridlines, solid for everything else */ CGM_dashtype(linetype == -1 ? 2 : 0); } } TERM_PUBLIC void CGM_linecolor(int linecolor) { if (linecolor >= 0) { /* subtract 2 due to linetypes -2 / -1 */ if (cgm_linetypes > 3) linecolor %= (cgm_linetypes - 3); else linecolor = 0; } else if (linecolor == LT_BACKGROUND && !cgm_monochrome) { linecolor = -3; } else if (linecolor <= LT_NODRAW) return; linecolor += 3; if (cgm_monochrome) cgm_color = linecolor = 1; if (linecolor == cgm_color) return; cgm_color = linecolor; cgm_next.fill_color = linecolor; CGM_flush_polyline(); CGM_write_int_record(5, 4, 2, (int *) &cgm_color); /* line color */ CGM_write_int_record(5, 14, 2, (int *) &cgm_color); /* text color */ } TERM_PUBLIC void CGM_fillbox( int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height) { gpiPoint corner[5]; corner[0].x = x1; corner[0].y = y1; corner[1].x = x1+width; corner[1].y = y1; corner[2].x = x1+width; corner[2].y = y1+height; corner[3].x = x1; corner[3].y = y1+height; corner[4].x = x1; corner[4].y = y1; corner->style = style; CGM_filled_polygon(5, corner); } TERM_PUBLIC void CGM_linewidth(double width) { int new_linewidth; if (width <= 0) width = 0.5; new_linewidth = width * cgm_linewidth_pt * CGM_PT; if (new_linewidth == cgm_linewidth) return; CGM_flush_polyline(); cgm_linewidth = new_linewidth; CGM_write_int_record(5, 3, sizeof(cgm_linewidth) / CGM_ADJ, (int *) &cgm_linewidth); CGM_dashtype(cgm_dashtype); /* have dash lengths recalculated */ } TERM_PUBLIC void CGM_dashtype(int dashtype) { int i, j; /* Each group of 8 entries in dot_length[] defines a dash pattern. Entries in each group are alternately length of whitespace and length of line, in units of 2/3 of the linewidth. */ static int dot_length[CGM_LINE_TYPES * 8] = { /* 0 - solid */ 5, 8, 5, 8, 5, 8, 5, 8, /* 1 - dashes */ 5, 3, 5, 3, 5, 3, 5, 3, /* 2 - short dashes */ 4, 1, 4, 1, 4, 1, 4, 1, /* 3 - dotted */ 4, 8, 4, 1, 4, 8, 4, 1, /* 4 - dash-dot */ 4, 9, 4, 1, 4, 1, 0, 0, /* 5 - dash-dot-dot */ 4, 10, 4, 1, 4, 1, 4, 1, /* 6 - dash-dot-dot-dot */ 4, 10, 4, 10, 4, 1, 0, 0, /* 7 - dash-dash-dot */ 4, 10, 4, 10, 4, 1, 4, 1}; /* 8 - dash-dash-dot-dot */ if (dashtype == cgm_dashtype) return; cgm_dashtype = dashtype; CGM_flush_polyline(); if (dashtype >= CGM_LINE_TYPES) dashtype = dashtype % CGM_LINE_TYPES; if (dashtype < 1) { term->vector = CGM_solid_vector; return; } term->vector = CGM_dashed_vector; /* set up dash dimensions */ j = (dashtype - 1) * 8; for (i = 0; i < 8; i++, j++) { if (dot_length[j]) cgm_step_sizes[i] = (dot_length[j] * cgm_linewidth) * 2 / 3; else cgm_step_sizes[i] = 0; } /* first thing drawn will be a line */ cgm_step = cgm_step_sizes[1]; cgm_step_index = 1; } TERM_PUBLIC void CGM_move(unsigned int x, unsigned int y) { if (x >= term->xmax) x = term->xmax; if (y >= term->ymax) y = term->ymax; if (x == cgm_posx && y == cgm_posy) return; CGM_flush_polyline(); cgm_posx = x; cgm_posy = y; } TERM_PUBLIC int CGM_make_palette(t_sm_palette *palette) { if (palette) { int i, k; cgm_smooth_colors = palette->colors; if (CGM_COLORS + cgm_smooth_colors > cgm_user_color_max) { cgm_user_color_max = CGM_COLORS + cgm_smooth_colors; cgm_user_color_table = gp_realloc(cgm_user_color_table, (cgm_user_color_max*3+1)*sizeof(int), "CGM color table"); } k = 1 + (CGM_COLORS)*3; for (i = 0; i < cgm_smooth_colors; i++) { cgm_user_color_table[k++] = palette->color[i].r*255.9; cgm_user_color_table[k++] = palette->color[i].g*255.9; cgm_user_color_table[k++] = palette->color[i].b*255.9; } cgm_user_color_count = CGM_COLORS + cgm_smooth_colors; CGM_write_int_record(5, 34, (cgm_user_color_count*3+1)* sizeof(cgm_user_color_table[0])/CGM_ADJ, cgm_user_color_table); return 0; } else { return (cgm_maximum_color_index - CGM_COLORS); } } TERM_PUBLIC void CGM_set_color(t_colorspec *colorspec) { if (colorspec->type == TC_LT) { CGM_linecolor(colorspec->lt); cgm_linetype = colorspec->lt; return; } else if (colorspec->type == TC_FRAC) { double gray = colorspec->value; /* map [0...1] to interval [0...cgm_smooth_colors-1], then add offset to get past the default colors */ cgm_next.fill_color = (gray <= 0) ? 0 : (int)(gray * cgm_smooth_colors); if (cgm_next.fill_color >= cgm_smooth_colors) cgm_next.fill_color = cgm_smooth_colors - 1; cgm_next.fill_color += CGM_COLORS; } else if (colorspec->type == TC_RGB) { /* To truly support RGB we would have to write a new color table to the */ /* output file every time the RGB matched no previous color. That seems */ /* prohibitive, so instead we just look for the closest match. */ cgm_next.fill_color = CGM_find_nearest_color(colorspec); } else /* Should not happen! */ return; /* EAM - force color immediately so that lines and text can use it */ if (cgm_color != cgm_next.fill_color) { cgm_color = cgm_next.fill_color; cgm_linetype = cgm_color; CGM_flush_polyline(); CGM_write_int_record(5, 4, 2, (int *) &cgm_color); /* line color */ CGM_write_int_record(5, 14, 2, (int *) &cgm_color); /* text color */ } } TERM_PUBLIC void CGM_filled_polygon(int points, gpiPoint *corner) { /* Note: This implementation cannot handle polygons with more than * about 8190 edges. The best fix is to implement continuation * blocks. If the high order bit of the "length" field of a block * is set, then it is followed by another block with more data. * This allows an arbitrary amount of data in a record. However, * we implement a big enough block that problems should be rare. */ /* We will use solid fill for patterns 0 and 3 */ int hatch_index[]={0, 6, 5, 0, 4, 3}; int style = corner->style; int pattern = (style >> 4) % 6; int i; switch( style & 0xf ) { case FS_SOLID: case FS_TRANSPARENT_SOLID: cgm_next.interior_style = 1; break; case FS_PATTERN: case FS_TRANSPARENT_PATTERN: if (pattern == 0) { /* FIXME - for unknown reasons, solid fill messes up the subsequent */ /* color state. Just leave it empty and let the background show */ cgm_next.interior_style = 0; /* empty */ break; } if (pattern == 3) { /* Fill with solid color */ cgm_next.interior_style = 1; break; } /* The rest of the patterns are hatch-filled */ cgm_next.interior_style = 3; /* hatched */ cgm_next.hatch_index = hatch_index[pattern]; break; default: /* style == 0 or unknown --> fill with background color */ cgm_next.fill_color = 0; cgm_next.interior_style = 1; /* solid */ break; } if (cgm_current.interior_style != cgm_next.interior_style){ cgm_current.interior_style = cgm_next.interior_style; CGM_write_int_record(5, 22, 2, &cgm_next.interior_style); } if (cgm_current.fill_color != cgm_next.fill_color){ cgm_current.fill_color = cgm_next.fill_color; CGM_write_int_record(5, 23, 2, &cgm_next.fill_color); /* fill color */ } if (cgm_current.hatch_index != cgm_next.hatch_index && cgm_next.interior_style == 3){ cgm_current.hatch_index = cgm_next.hatch_index; CGM_write_int_record(5, 24, 2, &cgm_next.hatch_index); } cgm_next.edge_visibility = 0; /* We draw the borders elsewhere */ if (cgm_current.edge_visibility != cgm_next.edge_visibility){ cgm_current.edge_visibility = cgm_next.edge_visibility; CGM_write_int_record(5, 30, 2, &cgm_current.edge_visibility); } CGM_move(corner[0].x, corner[0].y); cgm_doing_polygon = 1; for (i = 1; i < points; i++) CGM_solid_vector(corner[i].x, corner[i].y); CGM_flush_polygon(); cgm_doing_polygon = 0; } static void CGM_flush_polyline() { if (cgm_coords == 0) return; CGM_write_int_record(4, 1, cgm_coords * 2, cgm_polyline); cgm_coords = 0; } static void CGM_write_char_record(int class, int cgm_id, int numbytes, char *data) { int i, pad, length; static unsigned char flag = 0xff; static unsigned char paddata = 0; char short_len; pad = 0; length = numbytes + 1; if (numbytes >= 255) length += 2; /* long string */ if (length & 1) pad = 1; /* needs pad */ CGM_write_code(class, cgm_id, length); if (numbytes < 255) { short_len = (char)numbytes; fwrite(&short_len, 1, 1, gpoutfile); /* write true length */ } else { fwrite(&flag, 1, 1, gpoutfile); CGM_write_int(numbytes); } if (data) fwrite(data, 1, numbytes, gpoutfile); /* write string */ else for (i=0; i<numbytes+pad; i++) fputc('\0', gpoutfile); /* write null bytes */ if(pad) fwrite(&paddata, 1, 1, gpoutfile); } static void CGM_write_byte_record(int class, int cgm_id, int numbytes, char *data) { int pad; static unsigned char paddata = 0; pad = numbytes & 1; CGM_write_code(class, cgm_id, numbytes); fwrite(data, 1, numbytes, gpoutfile); /* write string */ if(pad) fwrite(&paddata, 1, 1, gpoutfile); } static void CGM_write_int_record(int class, int cgm_id, int numbytes, int *data) { int i; assert((numbytes & 1) == 0); CGM_write_code(class, cgm_id, numbytes); numbytes >>= 1; for (i = 0; i < numbytes; i++) CGM_write_int(data[i]); } static void CGM_write_mixed_record( int class, int cgm_id, int numint, int *int_data, int numchar, const char *char_data) { int i, pad, length; static unsigned char paddata = 0; static unsigned char flag = 0xff; char short_len; pad = 0; length = numchar + 1; if (numchar >= 255) length += 2; /* long string */ if (length & 1) pad = 1; /* needs pad */ CGM_write_code(class, cgm_id, numint * 2 + length); for (i = 0; i < numint; i++) CGM_write_int(int_data[i]); /* write integers */ if (numchar < 255) { short_len = (char)numchar; fwrite(&short_len, 1, 1, gpoutfile); /* write string length */ } else { fwrite(&flag, 1, 1, gpoutfile); CGM_write_int(numchar); } fwrite(char_data, 1, numchar, gpoutfile); /* write string */ if(pad) fwrite(&paddata, 1, 1, gpoutfile); } /* Write the code word that starts a CGM record. bits in code word are as follows... cccciiiiiiilllll where cccc is a 4-bit class number iiiiiii is a 7-bit ID number lllll is a 5-bit length (# bytes following the code word, or 31 followed by a word with the actual number) */ static void CGM_write_code(int class, int cgm_id, int length) { unsigned int code; assert((0 <= class) &&(class <16)); assert((0 <= cgm_id) && (cgm_id < 128)); assert(0 <= length); if (length < 31) { code = ((class &0x0f) <<12) | ((cgm_id & 0x7f) << 5) | ((length & 0x1f)); CGM_write_int(code); } else { code = ((class &0x0f) <<12) | ((cgm_id & 0x7f) << 5) | 0x1f; CGM_write_int(code); CGM_write_int(length); } } static void CGM_write_int(int value) { union { short s; char c[2]; } u; assert( -32768 <= value ); assert( value <= 32767 ); u.c[0] = (value >> 8) & 255; /* convert to network order */ u.c[1] = value & 255; fwrite(&u.s, 1, 2, gpoutfile); } /* Draw a dashed line to (ux,uy). CGM has linestyles, but they are * not usable -- at least with the Word for Windows 6.0 filter, where * lines of significant width (even 1 pt) always come out solid. * Therefore, we implement dashed lines here instead. */ TERM_PUBLIC void CGM_dashed_vector(unsigned int ux, unsigned int uy) { int xa, ya; int dx, dy, adx, ady; int dist; /* approximate distance in plot units from starting point to specified end point. */ long remain; /* approximate distance in plot units remaining to specified end point. */ if (ux >= term->xmax) ux = term->xmax; if (uy >= term->ymax) uy = term->ymax; dx = (ux - cgm_posx); dy = (uy - cgm_posy); adx = abs(dx); ady = abs(dy * 10); /* using the approximation sqrt(x**2 + y**2) ~ x + (5*x*x)/(12*y) when x > y. Note ordering of calculations to avoid overflow on 16 bit architectures */ if (10 * adx < ady) dist = (ady / 2 + 25 * adx / ady * adx / 6 * 5) / 5; else { if (adx == 0) return; dist = (adx * 10 + (ady / 24) * (ady / adx)) / 10; } remain = dist; xa = cgm_posx; ya = cgm_posy; while (remain > cgm_step) { remain -= cgm_step; if (cgm_step_index & 1) CGM_solid_vector((int) (ux - (remain * dx) / dist), (int) (uy - (remain * dy) / dist)); else { xa = (int) (ux - (remain * dx) / dist); ya = (int) (uy - (remain * dy) / dist); CGM_move(xa, ya); } if (++cgm_step_index >= 8) cgm_step_index = 0; cgm_step = cgm_step_sizes[cgm_step_index]; } if (cgm_step_index & 1) CGM_solid_vector(ux, uy); else CGM_move(ux, uy); cgm_step -= (int) remain; } TERM_PUBLIC void CGM_solid_vector(unsigned int ux, unsigned int uy) { if (ux >= term->xmax) ux = term->xmax; if (uy >= term->ymax) uy = term->ymax; if (ux == cgm_posx && uy == cgm_posy) return; if (cgm_coords > CGM_MAX_SEGMENTS - 2) { if (cgm_doing_polygon) CGM_flush_polygon(); else CGM_flush_polyline(); cgm_polyline[cgm_coords++] = cgm_posx; cgm_polyline[cgm_coords++] = cgm_posy + CGM_MARGIN; } else if (cgm_coords == 0) { cgm_polyline[cgm_coords++] = cgm_posx; cgm_polyline[cgm_coords++] = cgm_posy + CGM_MARGIN; } cgm_polyline[cgm_coords++] = ux; cgm_polyline[cgm_coords++] = uy + CGM_MARGIN; cgm_posx = ux; cgm_posy = uy; } TERM_PUBLIC void CGM_put_text(unsigned int x, unsigned int y, const char str[]) { static int where[3] = { 0, 0, 1 }; /* the final "1" signals that this is the last text in the string */ const char *s = str; /* sanity check - labels are not clipped */ if ((x > 32767) || (y > 32767)) return; while (*s) if (!isspace((unsigned char) *s++)) goto showit; return; showit: CGM_flush_polyline(); /* update the text characteristics if they have changed since the last text string was output */ if (cgm_current.font_index != cgm_next.font_index) { cgm_current.font_index = cgm_next.font_index; CGM_write_int_record(5, 10, 2, &cgm_next.font_index); } if (cgm_current.justify_mode != cgm_next.justify_mode) { static int data[6] = { 1, 3, 0, 0, 0, 0 }; cgm_current.justify_mode = cgm_next.justify_mode; switch (cgm_current.justify_mode) { case LEFT: data[0] = 1; break; case CENTRE: data[0] = 2; break; case RIGHT: data[0] = 3; break; default: assert(0); } CGM_write_int_record(5, 18, 12, data); } if (cgm_current.char_height != cgm_next.char_height) { int h = cgm_next.char_height; cgm_current.char_height = h; h = h*2/3; /* gnuplot measures fonts by the baseline-to-baseline distance, while the CGM file needs the actual height of the upper case characters. */ CGM_write_int_record(5, 15, 2, &h); } /* "angle" is the angle of the text baseline (counter-clockwise in radians from horizontal). This is a bit more general than gnuplot needs right now. */ if (cgm_current.angle != cgm_next.angle) { /* The first two elements of orient are components of a vector "upward" with respect to the text. The next two elements are components of a vector along the baseline of the text. The lengths of both vectors are equal to the baseline-to-baseline distance in plot units. */ static int orient[4]; cgm_current.angle = cgm_next.angle; orient[0] = (int)cgm_next.char_height*cos(cgm_next.angle+M_PI_2); orient[1] = (int)cgm_next.char_height*sin(cgm_next.angle+M_PI_2); orient[2] = (int)cgm_next.char_height*cos(cgm_next.angle); orient[3] = (int)cgm_next.char_height*sin(cgm_next.angle); CGM_write_int_record(5, 16, 8, orient); } where[0] = x; where[1] = y + CGM_MARGIN; CGM_write_mixed_record(4, 4, 3, where, strlen(str), str); cgm_posx = cgm_posy = -2000; } TERM_PUBLIC int CGM_text_angle(int ang) { if (cgm_rotate) { cgm_next.angle = ang * M_PI_2 / 90.; return TRUE; } return ang ? FALSE : TRUE; } TERM_PUBLIC int CGM_justify_text(enum JUSTIFY mode) { cgm_next.justify_mode = mode; return (TRUE); } TERM_PUBLIC void CGM_reset() { cgm_posx = cgm_posy = 0; free(cgm_polyline); } TERM_PUBLIC void CGM_point(unsigned int x, unsigned int y, int number) { int old_dashtype; if (number < 0) { /* draw dot */ CGM_move(x, y); CGM_solid_vector(x + 1, y); return; } number %= CGM_POINTS; CGM_flush_polyline(); old_dashtype = cgm_dashtype; CGM_dashtype(0); if (number >= 3) /* using a polygon */ cgm_next.interior_style = 1; /* solid */ if (number == 4 || number == 6 || number == 8 || number == 10 || number == 12) { /* filled */ cgm_next.edge_visibility = 0; cgm_next.fill_color = cgm_color; } else { /* NOT filled */ cgm_next.edge_visibility = 1; cgm_next.interior_style = 0; /* empty */ cgm_next.edge_color = cgm_color; } if (cgm_current.interior_style != cgm_next.interior_style){ cgm_current.interior_style = cgm_next.interior_style; CGM_write_int_record(5, 22, 2, &cgm_next.interior_style); } if (cgm_current.fill_color != cgm_next.fill_color){ cgm_current.fill_color = cgm_next.fill_color; CGM_write_int_record(5, 23, 2, &cgm_next.fill_color); } if (cgm_current.edge_visibility != cgm_next.edge_visibility){ cgm_current.edge_visibility = cgm_next.edge_visibility; CGM_write_int_record(5, 30, 2, &cgm_current.edge_visibility); } if (cgm_current.edge_visibility && cgm_current.edge_color != cgm_next.edge_color){ cgm_current.edge_color = cgm_next.edge_color; CGM_write_int_record(5, 29, 2, &cgm_current.edge_color); } switch (number) { case 0: /* draw plus */ CGM_move(x - cgm_tic, y); CGM_solid_vector(x + cgm_tic, y); CGM_move(x, y - cgm_tic); CGM_solid_vector(x, y + cgm_tic); break; case 1: /* draw X */ CGM_move(x - cgm_tic707, y - cgm_tic707); CGM_solid_vector(x + cgm_tic707, y + cgm_tic707); CGM_move(x - cgm_tic707, y + cgm_tic707); CGM_solid_vector(x + cgm_tic707, y - cgm_tic707); break; case 2: /* draw star (asterisk) */ CGM_move(x, y - cgm_tic); CGM_solid_vector(x, y + cgm_tic); CGM_move(x + cgm_tic866, y - cgm_tic500); CGM_solid_vector(x - cgm_tic866, y + cgm_tic500); CGM_move(x + cgm_tic866, y + cgm_tic500); CGM_solid_vector(x - cgm_tic866, y - cgm_tic500); break; case 3: /* draw box */ case 4: CGM_move(x - cgm_tic707, y - cgm_tic707); CGM_solid_vector(x + cgm_tic707, y - cgm_tic707); CGM_solid_vector(x + cgm_tic707, y + cgm_tic707); CGM_solid_vector(x - cgm_tic707, y + cgm_tic707); CGM_flush_polygon(); break; case 5: case 6: /* draw circle (actually, dodecagon) (WinWord 6 accepts the CGM "circle" element, but the resulting circle is not correctly centered!) */ CGM_move(x, y - cgm_tic); CGM_solid_vector(x + cgm_tic500, y - cgm_tic866); CGM_solid_vector(x + cgm_tic866, y - cgm_tic500); CGM_solid_vector(x + cgm_tic, y); CGM_solid_vector(x + cgm_tic866, y + cgm_tic500); CGM_solid_vector(x + cgm_tic500, y + cgm_tic866); CGM_solid_vector(x, y + cgm_tic); CGM_solid_vector(x - cgm_tic500, y + cgm_tic866); CGM_solid_vector(x - cgm_tic866, y + cgm_tic500); CGM_solid_vector(x - cgm_tic, y); CGM_solid_vector(x - cgm_tic866, y - cgm_tic500); CGM_solid_vector(x - cgm_tic500, y - cgm_tic866); CGM_flush_polygon(); break; case 7: /* draw triangle (point up) */ case 8: CGM_move(x, y + cgm_tic1241); CGM_solid_vector(x - cgm_tic1077, y - cgm_tic621); CGM_solid_vector(x + cgm_tic1077, y - cgm_tic621); CGM_flush_polygon(); break; case 9: /* draw triangle (point down) */ case 10: CGM_move(x, y - cgm_tic1241); CGM_solid_vector(x - cgm_tic1077, y + cgm_tic621); CGM_solid_vector(x + cgm_tic1077, y + cgm_tic621); CGM_flush_polygon(); break; case 11: /* draw diamond */ case 12: CGM_move(x - cgm_tic, y); CGM_solid_vector(x, y - cgm_tic); CGM_solid_vector(x + cgm_tic, y); CGM_solid_vector(x, y + cgm_tic); CGM_flush_polygon(); break; } CGM_dashtype(old_dashtype); } TERM_PUBLIC void CGM_set_pointsize(double size) { /* Markers were chosen to have approximately equal areas. Dimensions are as follows, in units of cgm_tic: plus, diamond: half height = 1 square, cross: half height = sqrt(1/2) ~ 12/17 triangle: half width = sqrt(sqrt(4/3)) ~ 14/13, height = sqrt(3*sqrt(4/3)) ~ 54/29 star: half height = 1, half width = sqrt(3/4) ~ 13/15 dodecagon: coordinates of vertices are 0, sin(30) = 1/2, cos(30) = sqrt(3/4) ~ 13/15, or 1 The fractions are approximates of the equivalent continued fractions. */ if (size < 0) size = 1; cgm_tic = (size * term->h_tic / 2); cgm_tic707 = cgm_tic * 12 / 17; cgm_tic866 = cgm_tic * 13 / 15; cgm_tic500 = cgm_tic / 2; cgm_tic1241 = cgm_tic * 36 / 29; cgm_tic1077 = cgm_tic * 14 / 13; cgm_tic621 = cgm_tic * 18 / 29; } static void CGM_flush_polygon() { if (cgm_coords == 0) return; CGM_write_int_record(4, 7, cgm_coords * 2, cgm_polyline); cgm_coords = 0; } /* * This terminal driver does not support true RGB color, * but we can at least try to find some reasonable approximation. */ #define CLOSE_ENOUGH 32 /* 0 would require a perfect match */ static int CGM_find_nearest_color(t_colorspec *colorspec) { int red = (colorspec->lt >> 16) & 0xff; int green = (colorspec->lt >> 8) & 0xff; int blue = colorspec->lt & 0xff; int closest = 0; int howclose = 1<<16; int i = 0; int k; int dr, dg, db, distance; for (k=0; k<cgm_user_color_count; k++) { dr = cgm_user_color_table[++i] - red; dg = cgm_user_color_table[++i] - green; db = cgm_user_color_table[++i] - blue; distance = (dr*dr + dg*dg + db*db); if (distance < howclose) { closest = k; howclose = distance; } if (distance < CLOSE_ENOUGH) break; } FPRINTF((stderr,"CGM_find_nearest_color: asked for %d %d %d\n",red,green,blue)); FPRINTF((stderr," got index %3d %d %d %d\n", closest, cgm_user_color_table[closest*3], cgm_user_color_table[closest*3+1], cgm_user_color_table[closest*3+2])); return closest; } #undef CLOSE_ENOUGH #ifdef DEFEAT_ASSERTIONS #define NDEBUG #include <assert.h> #undef DEFEAT_ASSERTIONS #endif /* DEFEAT_ASSERTIONS */ #ifdef NEXT #undef id #undef datum #endif #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(cgm_driver) "cgm", "Computer Graphics Metafile", CGM_LARGE - CGM_MARGIN, CGM_SMALL - CGM_MARGIN, CGM_VCHAR, CGM_HCHAR, CGM_VTIC, CGM_HTIC, CGM_options, CGM_init, CGM_reset, CGM_text, null_scale, CGM_graphics, CGM_move, CGM_solid_vector, CGM_linetype, CGM_put_text, CGM_text_angle, CGM_justify_text, CGM_point, do_arrow, CGM_set_font, CGM_set_pointsize, TERM_BINARY|TERM_CAN_DASH|TERM_LINEWIDTH, /* various flags */ NULL, /* after one plot of multiplot */ NULL, /* before subsequent plot of multiplot */ CGM_fillbox, CGM_linewidth #ifdef USE_MOUSE , NULL, NULL, NULL, NULL, NULL /* , waitforinput, put_tmptext, set_ruler, set_cursor, set_clipboard */ #endif , CGM_make_palette, NULL /* _previous_palette */, CGM_set_color, CGM_filled_polygon TERM_TABLE_END(cgm_driver) #undef LAST_TERM #define LAST_TERM cgm_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(cgm) "1 cgm", "?commands set terminal cgm", "?set terminal cgm", "?set term cgm", "?terminal cgm", "?term cgm", "?cgm", " The `cgm` terminal generates a Computer Graphics Metafile, Version 1. ", " This file format is a subset of the ANSI X3.122-1986 standard entitled", " \"Computer Graphics - Metafile for the Storage and Transfer of Picture", " Description Information\".", "", " Syntax:", " set terminal cgm {color | monochrome} {solid | dashed} {{no}rotate}", " {<mode>} {width <plot_width>} {linewidth <line_width>}", " {font \"<fontname>,<fontsize>\"}", " {background <rgb_color>}", " [deprecated] {<color0> <color1> <color2> ...}", "", " `solid` draws all curves with solid lines, overriding any dashed patterns;", " <mode> is `landscape`, `portrait`, or `default`;", " <plot_width> is the assumed width of the plot in points; ", " <line_width> is the line width in points (default 1); ", " <fontname> is the name of a font (see list of fonts below)", " <fontsize> is the size of the font in points (default 12).", "", " The first six options can be in any order. Selecting `default` sets all", " options to their default values.", "", " The mechanism of setting line colors in the `set term` command is", " deprecated. Instead you should set the background using a separate", " keyword and set the line colors using `set linetype`.", " The deprecated mechanism accepted colors of the form 'xrrggbb', where x is", " the literal character 'x' and 'rrggbb' are the red, green and blue components", " in hex. The first color was used for the background, subsequent colors are", " assigned to successive line types.", "", " Examples:", " set terminal cgm landscape color rotate dashed width 432 \\", " linewidth 1 'Helvetica Bold' 12 # defaults", " set terminal cgm linewidth 2 14 # wider lines & larger font", " set terminal cgm portrait \"Times Italic\" 12", " set terminal cgm color solid # no pesky dashes!", "2 cgm font", "?commands set terminal cgm font", "?set terminal cgm font", "?set term cgm font", "?cgm font", " The first part of a Computer Graphics Metafile, the metafile description,", " includes a font table. In the picture body, a font is designated by an", " index into this table. By default, this terminal generates a table with", " the following 35 fonts, plus six more with `italic` replaced by", " `oblique`, or vice-versa (since at least the Microsoft Office and Corel", " Draw CGM import filters treat `italic` and `oblique` as equivalent):", "@start table - first is interactive cleartext form", " Helvetica", " Helvetica Bold", " Helvetica Oblique", " Helvetica Bold Oblique", " Times Roman", " Times Bold", " Times Italic", " Times Bold Italic", " Courier", " Courier Bold", " Courier Oblique", " Courier Bold Oblique", " Symbol", " Hershey/Cartographic_Roman", " Hershey/Cartographic_Greek", " Hershey/Simplex_Roman", " Hershey/Simplex_Greek", " Hershey/Simplex_Script", " Hershey/Complex_Roman", " Hershey/Complex_Greek", " Hershey/Complex_Script", " Hershey/Complex_Italic", " Hershey/Complex_Cyrillic", " Hershey/Duplex_Roman", " Hershey/Triplex_Roman", " Hershey/Triplex_Italic", " Hershey/Gothic_German", " Hershey/Gothic_English", " Hershey/Gothic_Italian", " Hershey/Symbol_Set_1", " Hershey/Symbol_Set_2", " Hershey/Symbol_Math", " ZapfDingbats", " Script", " 15", "#\\begin{tabular}{|lll|} \\hline", "#\\multicolumn{3}{|c|}{CGM fonts}\\\\\\hline", "#&Helvetica&Hershey/Cartographic\\_Roman\\\\", "#&Helvetica Bold&Hershey/Cartographic\\_Greek\\\\", "#&Helvetica Oblique&Hershey/Simplex\\_Roman\\\\", "#&Helvetica Bold Oblique&Hershey/Simplex\\_Greek\\\\", "#&Times Roman&Hershey/Simplex\\_Script\\\\", "#&Times Bold&Hershey/Complex\\_Roman\\\\", "#&Times Italic&Hershey/Complex\\_Greek\\\\", "#&Times Bold Italic&Hershey/Complex\\_Italic\\\\", "#&Courier&Hershey/Complex\\_Cyrillic\\\\", "#&Courier Bold&Hershey/Duplex\\_Roman\\\\", "#&Courier Oblique&Hershey/Triplex\\_Roman\\\\", "#&Courier Bold Oblique&Hershey/Triplex\\_Italic\\\\", "#&Symbol&Hershey/Gothic\\_German\\\\", "#&ZapfDingbats&Hershey/Gothic\\_English\\\\", "#&Script&Hershey/Gothic\\_Italian\\\\", "#&15&Hershey/Symbol\\_Set\\_1\\\\", "#&&Hershey/Symbol\\_Set\\_2\\\\", "#&&Hershey/Symbol\\_Math\\\\", "%c c l .", "%@@CGM fonts", "%_", "%@@Helvetica", "%@@Helvetica Bold", "%@@Helvetica Oblique", "%@@Helvetica Bold Oblique", "%@@Times Roman", "%@@Times Bold", "%@@Times Italic", "%@@Times Bold Italic", "%@@Courier", "%@@Courier Bold", "%@@Courier Oblique", "%@@Courier Bold Oblique", "%@@Symbol", "%@@Hershey/Cartographic_Roman", "%@@Hershey/Cartographic_Greek", "%@@Hershey/Simplex_Roman", "%@@Hershey/Simplex_Greek", "%@@Hershey/Simplex_Script", "%@@Hershey/Complex_Roman", "%@@Hershey/Complex_Greek", "%@@Hershey/Complex_Script", "%@@Hershey/Complex_Italic", "%@@Hershey/Complex_Cyrillic", "%@@Hershey/Duplex_Roman", "%@@Hershey/Triplex_Roman", "%@@Hershey/Triplex_Italic", "%@@Hershey/Gothic_German", "%@@Hershey/Gothic_English", "%@@Hershey/Gothic_Italian", "%@@Hershey/Symbol_Set_1", "%@@Hershey/Symbol_Set_2", "%@@Hershey/Symbol_Math", "%@@ZapfDingbats", "%@@Script", "%@@15", "@end table", " The first thirteen of these fonts are required for WebCGM. The", " Microsoft Office CGM import filter implements the 13 standard fonts", " listed above, and also 'ZapfDingbats' and 'Script'. However, the", " script font may only be accessed under the name '15'. For more on", " Microsoft import filter font substitutions, check its help file which", " you may find here:", " C:\\Program Files\\Microsoft Office\\Office\\Cgmimp32.hlp", " and/or its configuration file, which you may find here:", " C:\\Program Files\\Common Files\\Microsoft Shared\\Grphflt\\Cgmimp32.cfg", "", " In the `set term` command, you may specify a font name which does not", " appear in the default font table. In that case, a new font table is", " constructed with the specified font as its first entry. You must ensure", " that the spelling, capitalization, and spacing of the name are", " appropriate for the application that will read the CGM file. (Gnuplot", " and any MIL-D-28003A compliant application ignore case in font names.)", " If you need to add several new fonts, use several `set term` commands.", "", " Example:", " set terminal cgm 'Old English'", " set terminal cgm 'Tengwar'", " set terminal cgm 'Arabic'", " set output 'myfile.cgm'", " plot ...", " set output", "", " You cannot introduce a new font in a `set label` command.", "2 cgm fontsize", "?commands set terminal cgm fontsize", "?set terminal cgm fontsize", "?set term cgm fontsize", "?cgm fontsize", " Fonts are scaled assuming the page is 6 inches wide. If the `size`", " command is used to change the aspect ratio of the page or the CGM file", " is converted to a different width, the resulting font sizes will be", " scaled up or down accordingly. To change the assumed width, use the", " `width` option.", "2 cgm linewidth", "?commands set terminal cgm linewidth", "?set terminal cgm linewidth", "?set term cgm linewidth", "?cgm linewidth", " The `linewidth` option sets the width of lines in pt. The default width", " is 1 pt. Scaling is affected by the actual width of the page, as", " discussed under the `fontsize` and `width` options.", "2 cgm rotate", "?commands set terminal cgm rotate", "?set terminal cgm rotate", "?set term cgm rotate", "?cgm rotate", " The `norotate` option may be used to disable text rotation. For", " example, the CGM input filter for Word for Windows 6.0c can accept", " rotated text, but the DRAW editor within Word cannot. If you edit a", " graph (for example, to label a curve), all rotated text is restored to", " horizontal. The Y axis label will then extend beyond the clip boundary.", " With `norotate`, the Y axis label starts in a less attractive location,", " but the page can be edited without damage. The `rotate` option confirms", " the default behavior.", "2 cgm solid", "?set terminal cgm solid", "?set term cgm solid", "?cgm solid", " The `solid` option may be used to disable dashed line styles in the", " plots. This is useful when color is enabled and the dashing of the", " lines detracts from the appearance of the plot. The `dashed` option", " confirms the default behavior, which gives a different dash pattern to", " each line type.", "2 cgm size", "?commands set terminal cgm size", "?set terminal cgm size", "?set term cgm size", "?cgm size", " Default size of a CGM plot is 32599 units wide and 23457 units high for", " landscape, or 23457 units wide by 32599 units high for portrait.", "2 cgm width", "?commands set terminal cgm width", "?set terminal cgm width", "?set term cgm width", "?cgm width", " All distances in the CGM file are in abstract units. The application", " that reads the file determines the size of the final plot. By default,", " the width of the final plot is assumed to be 6 inches (15.24 cm). This", " distance is used to calculate the correct font size, and may be changed", " with the `width` option. The keyword should be followed by the width in", " points. (Here, a point is 1/72 inch, as in PostScript. This unit is", " known as a \"big point\" in TeX.) Gnuplot `expressions` can be used to", " convert from other units.", "", " Example:", " set terminal cgm width 432 # default", " set terminal cgm width 6*72 # same as above", " set terminal cgm width 10/2.54*72 # 10 cm wide", "2 cgm nofontlist", "?commands set terminal cgm nofontlist", "?set terminal cgm nofontlist", "?set term cgm nofontlist", "?cgm nofontlist", "?set terminal cgm winword6", "?set term cgm winword6", "?cgm winword6", " The default font table includes the fonts recommended for WebCGM, which", " are compatible with the Computer Graphics Metafile input filter for", " Microsoft Office and Corel Draw. Another application might use", " different fonts and/or different font names, which may not be", " documented. The `nofontlist` (synonym `winword6`) option deletes the font", " table from the CGM file. In this case, the reading application should", " use a default table. Gnuplot will still use its own default font table", " to select font indices. Thus, 'Helvetica' will give you an index of 1,", " which should get you the first entry in your application's default font", " table. 'Helvetica Bold' will give you its second entry, etc.", "" END_HELP(cgm) #endif /* TERM_HELP */ /* * Local Variables: * mode:C * eval: (c-set-style "k&r") * End: */ �������������������������������������������gnuplot-4.6.4/term/metafont.trm���������������������������������������������������������������������0000644�0004711�0000144�00000050133�10460036603�013441� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: metafont.trm,v 1.20 2006/07/21 02:35:47 sfeam Exp $ */ /* GNUPLOT - metafont.trm */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * GNUPLOT -- mf.trm * * This terminal driver supports: * Metafont Plot Commands * * Written by : Pl Hedne * Trondheim, Norway * Pal.Hedne@termo.unit.no */ /* * Improvements and bug fixes by Carsten Steger: * - Set default plot size to 5 by 3 inches as in the latex- and eepic- * drivers * - Fixed some bugs concerning resolution dependent output * - Added MF_scale function * - Added MF_justify_text function and modified MF_put_text function and * put_text macro accordingly * - Modified MF_move and MF_vector to make output shorter and modified * MF_text accordingly * - Added various linetypes by plotting dashed lines; had to modify * MF_linetype and MF_vector for this * - Added MF_arrow function * - All global variables and #define'd names begin with MF_ now * As a consequence almost nothing of the original code by Pl Hedne remains * but credit goes to him for the ingenious trick of storing the character * images into picture variables, without which this driver would have been * impossible for me to write. * * 10/03/95: Converted to new terminal layout by Carsten Steger. */ #include "driver.h" #ifdef TERM_REGISTER register_term(mf) #endif #ifdef TERM_PROTO #define MF_DPI (300) /* resolution of printer we expect to use; the value itself is not * particularly important... it is here only for compatibility to the * LaTeX-driver and to get the spacing right. */ /* 5 inches wide by 3 inches high (default) */ #define MF_XSIZE 5.0 #define MF_YSIZE 3.0 #define MF_XMAX (MF_XSIZE*MF_DPI) #define MF_YMAX (MF_YSIZE*MF_DPI) #define MF_HTIC (5*MF_DPI/72) #define MF_VTIC (5*MF_DPI/72) #define MF_HCHAR (MF_DPI*53/10/72) #define MF_VCHAR (MF_DPI*11/72) TERM_PUBLIC void MF_init __PROTO((void)); TERM_PUBLIC void MF_graphics __PROTO((void)); TERM_PUBLIC void MF_text __PROTO((void)); TERM_PUBLIC int MF_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC int MF_text_angle __PROTO((int ang)); TERM_PUBLIC void MF_linetype __PROTO((int linetype)); TERM_PUBLIC void MF_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void MF_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void MF_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); TERM_PUBLIC void MF_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void MF_reset __PROTO((void)); #define GOT_MF_PROTO #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY /* Plot size in inches */ static double MF_xsize = MF_XSIZE; static double MF_ysize = MF_YSIZE; static int MF_char_code; static int MF_ang; static int MF_line_type; static enum JUSTIFY MF_justify; static double MF_dist_left; static int MF_is_solid; static int MF_picked_up_pen; /* * We keep track of where we are with respect to dashed lines by using * the next five variables. MF_dash_index indicates which element of * MF_lines[..].dashlen should be used. The MF_last.. variables keep * track of the position of the pen. */ static int MF_dash_index; static unsigned int MF_last_x, MF_last_y; static struct { int solid; /* Is the line solid? */ float thickness; /* Thickness of pen we are going to use */ int dashlen[4]; /* Length of individual segments; even: line; odd: gap */ } MF_lines[10] = { { 1, 1.5, { 0, 0, 0, 0 } }, { 0, 1.0, { MF_DPI / 60, MF_DPI / 50, MF_DPI / 60, MF_DPI / 50 } }, { 1, 1.5, { 0, 0, 0, 0 } }, { 0, 1.5, { MF_DPI / 20, MF_DPI / 30, MF_DPI / 20, MF_DPI / 30 } }, { 0, 1.5, { MF_DPI / 30, MF_DPI / 20, MF_DPI / 30, MF_DPI / 20 } }, { 0, 1.5, { MF_DPI / 15, MF_DPI / 30, MF_DPI / 60, MF_DPI / 30 } }, { 0, 1.5, { MF_DPI / 30, MF_DPI / 50, MF_DPI / 30, MF_DPI / 50 } }, { 0, 1.5, { MF_DPI / 20, MF_DPI / 50, MF_DPI / 60, MF_DPI / 30 } }, { 0, 1.5, { MF_DPI / 30, MF_DPI / 50, MF_DPI / 30, MF_DPI / 30 } }, { 0, 1.5, { MF_DPI / 60, MF_DPI / 50, MF_DPI / 60, MF_DPI / 30 } } /* dash: line, gap, line, gap */ }; TERM_PUBLIC void MF_init() { MF_char_code = 0; MF_ang = 0; fputs("\ if unknown cmbase: input cmbase fi\n\n\ tracingstats:=1;\n\ picture r[];\n\ \ndef openit = openwindow currentwindow\n\ from (0,0) to (400,800) at (-50,500) enddef;\n\ \nmode_setup;\n", gpoutfile); fputs("\ \n%Include next eight lines if you have problems with the mode on your system..\n\ %proofing:=0;\n\ %fontmaking:=1;\n\ %tracingtitles:=0;\n\ %pixels_per_inch:=300;\n\ %blacker:=0;\n\ %fillin:=.2;\n\ %o_correction:=.6;\n\ %fix_units;\n", gpoutfile); /* Next lines must be included if text support is needed (CM base used) */ fputs("\ \ndef put_text(expr ts,xstart,ystart,rot,justification) =\n\ begingroup\n\ text_width:=0;text_height:=0;text_depth:=0;\n\ for ind:=0 step 1 until length(ts)-1:\n\ dec_num:=ASCII substring (ind,ind+1) of ts;\n\ if unknown r[dec_num]: dec_num:=32; fi\n\ if dec_num=32: \n\ text_width:=text_width+wd[65];\n\ text_height:=max(text_height,ht[65]);\n\ text_depth:=max(text_depth,dp[65]);\n\ elseif dec_num>=0: \n\ text_width:=text_width+wd[dec_num];\n\ text_height:=max(text_height,ht[dec_num]);\n\ text_depth:=max(text_depth,dp[dec_num]);\n\ fi\n\ endfor\n\ if rot=90:\n\ if justification=1: ynext:=ystart;\n\ elseif justification=2: ynext:=round(ystart-text_width/2);\n\ else: ynext:=round(ystart-text_width);\n\ fi\n\ xnext:=xstart+(text_height-text_depth)/2;\n\ else:\n\ if justification=1: xnext:=xstart;\n\ elseif justification=2: xnext:=round(xstart-text_width/2);\n\ else: xnext:=round(xstart-text_width);\n\ fi\n\ ynext:=ystart-(text_height-text_depth)/2;\n\ fi\n\ for ind:=0 step 1 until length(ts)-1:\n\ dec_num:=ASCII substring (ind,ind+1) of ts;\n\ if unknown r[dec_num]: dec_num:=32; fi\n\ if dec_num=32: \n\ xnext:=xnext+wd[65]*cosd rot;\n\ ynext:=ynext+wd[65]*sind rot;\n\ elseif dec_num>=0: \n\ currentpicture:=currentpicture+r[dec_num] shifted(xnext,ynext)\n\ rotatedaround ((xnext,ynext),rot); \n\ xnext:=xnext+wd[dec_num]*cosd rot;\n\ ynext:=ynext+wd[dec_num]*sind rot;\n\ fi\n\ endfor\n\ endgroup \n\ enddef;\n", gpoutfile); fputs("\ \ndef endchar =\n\ r[charcode]:=currentpicture;\n\ wd[charcode]:=w;ht[charcode]:=h;dp[charcode]:=d;\n\ message \"Picture of charcode no.\" & decimal charcode;\n\ endgroup;\n\ enddef;\n\ let endchar_ = endchar;\n\ let generate = relax;\n\ let roman = relax;\n", gpoutfile); fputs("\ input cmr10.mf\n\ if ligs>1: font_coding_scheme:=\"TeX text\";\n\ spanish_shriek=oct\"074\"; spanish_query=oct\"076\";\n\ else: font_coding_scheme:=\n\ if ligs=0: \"TeX typewriter text\"\n\ else: \"TeX text without f-ligatures\" fi;\n\ spanish_shriek=oct\"016\"; spanish_query=oct\"017\"; fi\n\ font_setup;\n\ input romanu.mf %Roman uppercase.\n\ input romanl.mf %Roman lowercase.\n\ input greeku.mf %Greek uppercase.\n\ input romand.mf %Numerals.\n\ input romanp.mf %Ampersand, question marks, currency sign.\n\ input romspl.mf %Lowercase specials (dotless \\i, ligature \\ae, etc.)\n\ input romspu.mf %Uppercase specials (\\AE, \\OE, \\O)\n\ input punct.mf %Punctuation symbols.\n\ \nminus=ASCII\"-\"; cmchar \"Minus sign\";\n\ beginarithchar(minus); \n\ pickup rule.nib;\n\ lft x1=hround 1.5u-eps;\n\ x2=w-x1; y1=y2=math_axis;\n\ draw z1--z2; % bar\n\ labels(1,2); \n\ endchar;\n", gpoutfile); fputs("\ \ncmchar \"Period\";\n\ numeric dot_diam#; dot_diam#:=if monospace: 5/4 fi\\ dot_size#;\n\ define_whole_blacker_pixels(dot_diam);\n\ beginchar(\".\",5u#,dot_diam#,0);\n\ adjust_fit(0,0); pickup fine.nib;\n\ pos1(dot_diam,0); pos2(dot_diam,90);\n\ lft x1l=hround(.5w-.5dot_diam); bot y2l=0; z1=z2; dot(1,2); % dot\n\ penlabels(1,2);\n\ endchar;\n", gpoutfile); fputs("\ \ndef endchar =\n\ % Next line should probably be removed if CM base is used\n\ l:=0; r:=w;\n\ %Include the next two lines if you want to\n\ %rotate the picture 90 deg.(Portrait to Landscape)\n\ %currentpicture:=currentpicture rotated 90 shifted (h,0);\n\ %tmp:=charht; charht:=charwd; charwd:=tmp;\n\ scantokens extra_endchar;\n\ if proofing>0: makebox(proofrule); fi\n\ chardx:=w;\n\ shipit;\n\ if displaying>0: makebox(screenrule); showit; fi\n\ endgroup \n\ enddef;\n\ let endchar_ = endchar;\n\ let generate = input;\n\ let roman = roman;\n", gpoutfile); /* font_size must be bigger than em#/16 by METAFONT rules. * Therefore make it pretty big so big figures will be * handled correctly. Setting font_size to 72pt# lets us * handle characters up to 15.94 by 15.94 inches. */ fputs("\ \n\nfont_identifier:=\"GNUPLOT\";\n\ font_size 72pt#;\n\ th#=0.4pt#; define_whole_pixels(th);\n\ \npath arrowhead;\n\ arrowhead = (-7pt,-2pt){dir30}..(-6pt,0pt)..\ {dir150}(-7pt,2pt) &\n\ (-7pt,2pt)--(0pt,0pt)--(-7pt,-2pt) & cycle;\n", gpoutfile); } TERM_PUBLIC void MF_graphics() { register struct termentry *t = term; fprintf(gpoutfile, "\n\nbeginchar(%d,%gin#,%gin#,0);\n", MF_char_code, MF_xsize, MF_ysize); MF_char_code++; fprintf(gpoutfile, "a:=w/%d;b:=h/%d;\n", t->xmax, t->ymax); MF_picked_up_pen = 0; } TERM_PUBLIC void MF_text() { fputs("endchar;\n", gpoutfile); } TERM_PUBLIC int MF_justify_text(enum JUSTIFY mode) { MF_justify = mode; return TRUE; } TERM_PUBLIC int MF_text_angle(int ang) { if (ang > 0) MF_ang = 90; else MF_ang = 0; return TRUE; } TERM_PUBLIC void MF_linetype(int linetype) { if (linetype >= 8) linetype %= 8; linetype += 2; if (linetype < 0) linetype = 0; /* Only output change in pens if it actually affects the pen used */ if ((MF_lines[linetype].thickness != MF_lines[MF_line_type].thickness) || (!MF_picked_up_pen)) { fprintf(gpoutfile, "pickup pencircle scaled %gth;\n", MF_lines[linetype].thickness); MF_picked_up_pen = 1; } MF_line_type = linetype; MF_dash_index = 0; MF_dist_left = MF_lines[MF_line_type].dashlen[MF_dash_index]; MF_is_solid = MF_lines[MF_line_type].solid; } TERM_PUBLIC void MF_move(unsigned int x, unsigned int y) { MF_last_x = x; MF_last_y = y; MF_dash_index = 0; MF_dist_left = MF_lines[MF_line_type].dashlen[MF_dash_index]; } TERM_PUBLIC void MF_vector(unsigned int x, unsigned int y) { if (MF_is_solid) { if (x == MF_last_x && y == MF_last_y) fprintf(gpoutfile, "drawdot (%da,%db);\n", x, y); else fprintf(gpoutfile, "draw (%da,%db)--(%da,%db);\n", MF_last_x, MF_last_y, x, y); } else { double dist_to_go, delta_x, delta_y, inc_x, inc_y; double last_x_d, last_y_d, next_x_d, next_y_d; unsigned int next_x, next_y; if (x == MF_last_x && y == MF_last_y) { if (!(MF_dash_index & 1)) fprintf(gpoutfile, "drawdot (%da,%db);\n", x, y); } else { last_x_d = MF_last_x; last_y_d = MF_last_y; delta_x = x - last_x_d; delta_y = y - last_y_d; dist_to_go = sqrt(delta_x * delta_x + delta_y * delta_y); inc_x = delta_x / dist_to_go; inc_y = delta_y / dist_to_go; while (MF_dist_left < dist_to_go) { next_x_d = last_x_d + inc_x * MF_dist_left; next_y_d = last_y_d + inc_y * MF_dist_left; next_x = floor(next_x_d + 0.5); next_y = floor(next_y_d + 0.5); /* MF_dash_index & 1 == 0 means: draw a line; otherwise just move */ if (!(MF_dash_index & 1)) fprintf(gpoutfile, "draw (%da,%db)--(%da,%db);\n", MF_last_x, MF_last_y, next_x, next_y); MF_last_x = next_x; MF_last_y = next_y; last_x_d = next_x_d; last_y_d = next_y_d; dist_to_go -= MF_dist_left; MF_dash_index = (MF_dash_index + 1) & 3; MF_dist_left = MF_lines[MF_line_type].dashlen[MF_dash_index]; } delta_x = x - last_x_d; delta_y = y - last_y_d; MF_dist_left -= sqrt(delta_x * delta_x + delta_y * delta_y); if (!(MF_dash_index & 1)) { if (x == MF_last_x && y == MF_last_y) fprintf(gpoutfile, "drawdot (%da,%db);\n", x, y); else fprintf(gpoutfile, "draw (%da,%db)--(%da,%db);\n", MF_last_x, MF_last_y, x, y); } } } MF_last_x = x; MF_last_y = y; } TERM_PUBLIC void MF_arrow( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { int delta_x, delta_y; MF_move(sx, sy); MF_vector(ex, ey); if (head) { delta_x = ex - sx; delta_y = ey - sy; fprintf(gpoutfile, "fill arrowhead rotated angle(%d,%d) shifted (%da,%db);\n", delta_x, delta_y, ex, ey); } } TERM_PUBLIC void MF_put_text(unsigned int x, unsigned int y, const char *str) { int i, j = 0; char *text; /* ignore empty strings */ if (!str || !*str) return; /* F***. why do drivers need to modify string args? */ text = gp_strdup(str); for (i = 0; i < strlen(text); i++) if (text[i] == '"') text[i] = '\''; /* Replace " with ' */ switch (MF_justify) { case LEFT: j = 1; break; case CENTRE: j = 2; break; case RIGHT: j = 3; break; } fprintf(gpoutfile, "put_text(\"%s\",%da,%db,%d,%d);\n", text, x, y, MF_ang, j); free(text); } TERM_PUBLIC void MF_reset() { fputs("end.\n", gpoutfile); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(mf_driver) "mf", "Metafont plotting standard", MF_XMAX, MF_YMAX, MF_VCHAR, MF_HCHAR, MF_VTIC, MF_HTIC, options_null, MF_init, MF_reset, MF_text, null_scale, MF_graphics, MF_move, MF_vector, MF_linetype, MF_put_text, MF_text_angle, MF_justify_text, line_and_point, MF_arrow, set_font_null TERM_TABLE_END(mf_driver) #undef LAST_TERM #define LAST_TERM mf_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(mf) "1 mf", "?commands set terminal mf", "?set terminal mf", "?set term mf", "?terminal mf", "?term mf", "?mf", "?metafont", " The `mf` terminal driver creates an input file to the METAFONT program. Thus a", " figure may be used in the TeX document in the same way as is a character.", "", " To use a picture in a document, the METAFONT program must be run with the", " output file from `gnuplot` as input. Thus, the user needs a basic knowledge", " of the font creating process and the procedure for including a new font in a", " document. However, if the METAFONT program is set up properly at the local", " site, an unexperienced user could perform the operation without much trouble.", "", " The text support is based on a METAFONT character set. Currently the", " Computer Modern Roman font set is input, but the user is in principal free to", " choose whatever fonts he or she needs. The METAFONT source files for the", " chosen font must be available. Each character is stored in a separate", " picture variable in METAFONT. These variables may be manipulated (rotated,", " scaled etc.) when characters are needed. The drawback is the interpretation", " time in the METAFONT program. On some machines (i.e. PC) the limited amount", " of memory available may also cause problems if too many pictures are stored.", "", " The `mf` terminal has no options.", "2 METAFONT Instructions", "?commands set terminal mf detailed", "?set terminal mf detailed", "?set term mf detailed", "?mf detailed", "?metafont detailed", "", " - Set your terminal to METAFONT:", " set terminal mf", " - Select an output-file, e.g.:", " set output \"myfigures.mf\"", " - Create your pictures. Each picture will generate a separate character. Its", " default size will be 5*3 inches. You can change the size by saying `set size", " 0.5,0.5` or whatever fraction of the default size you want to have.", "", " - Quit `gnuplot`.", "", " - Generate a TFM and GF file by running METAFONT on the output of `gnuplot`.", " Since the picture is quite large (5*3 in), you will have to use a version of", " METAFONT that has a value of at least 150000 for memmax. On Unix systems", " these are conventionally installed under the name bigmf. For the following", " assume that the command virmf stands for a big version of METAFONT. For", " example:", "", " - Invoke METAFONT:", " virmf '&plain'", " - Select the output device: At the METAFONT prompt ('*') type:", " \\mode:=CanonCX; % or whatever printer you use", " - Optionally select a magnification:", " mag:=1; % or whatever you wish", " - Input the `gnuplot`-file:", " input myfigures.mf", " On a typical Unix machine there will usually be a script called \"mf\" that", " executes virmf '&plain', so you probably can substitute mf for virmf &plain.", " This will generate two files: mfput.tfm and mfput.$$$gf (where $$$ indicates", " the resolution of your device). The above can be conveniently achieved by", " typing everything on the command line, e.g.:", " virmf '&plain' '\\mode:=CanonCX; mag:=1; input myfigures.mf'", " In this case the output files will be named myfigures.tfm and", " myfigures.300gf.", "", " - Generate a PK file from the GF file using gftopk:", " gftopk myfigures.300gf myfigures.300pk", " The name of the output file for gftopk depends on the DVI driver you use.", " Ask your local TeX administrator about the naming conventions. Next, either", " install the TFM and PK files in the appropriate directories, or set your", " environment variables properly. Usually this involves setting TEXFONTS to", " include the current directory and doing the same thing for the environment", " variable that your DVI driver uses (no standard name here...). This step is", " necessary so that TeX will find the font metric file and your DVI driver will", " find the PK file.", "", " - To include your pictures in your document you have to tell TeX the font:", " \\font\\gnufigs=myfigures", " Each picture you made is stored in a single character. The first picture is", " character 0, the second is character 1, and so on... After doing the above", " step, you can use the pictures just like any other characters. Therefore, to", " place pictures 1 and 2 centered in your document, all you have to do is:", " \\centerline{\\gnufigs\\char0}", " \\centerline{\\gnufigs\\char1}", " in plain TeX. For LaTeX you can, of course, use the picture environment and", " place the picture wherever you wish by using the \\makebox and \\put macros.", "", " This conversion saves you a lot of time once you have generated the font;", " TeX handles the pictures as characters and uses minimal time to place them,", " and the documents you make change more often than the pictures do. It also", " saves a lot of TeX memory. One last advantage of using the METAFONT driver", " is that the DVI file really remains device independent, because no \\special", " commands are used as in the eepic and tpic drivers." END_HELP(mf) #endif /* TERM_HELP */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/driver.h�������������������������������������������������������������������������0000644�0004711�0000144�00000005640�10512264554�012555� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* $Id: driver.h,v 1.22 2006/10/08 21:11:08 sfeam Exp $ */ /* GNUPLOT - driver.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef TERM_DRIVER_H #define TERM_DRIVER_H #include "syscfg.h" #include <stdio.h> /* functions provided by term.c */ static void do_point __PROTO((unsigned int x, unsigned int y, int number)); static void line_and_point __PROTO((unsigned int x, unsigned int y, int number)); static int null_text_angle __PROTO((int ang)); static int null_justify_text __PROTO((enum JUSTIFY just)); static int null_scale __PROTO((double x, double y)); static void options_null __PROTO((void)); static void UNKNOWN_null __PROTO((void)); /* static int set_font_null __PROTO((const char *s)); */ /* unused */ #define set_font_null NULL extern FILE *gpoutfile; extern struct termentry *term; /* for use by all drivers */ #ifndef NEXT #define sign(x) ((x) >= 0 ? 1 : -1) #else /* it seems that sign as macro causes some conflict with precompiled headers */ static int sign(int x) { return x >= 0 ? 1 : -1; } #endif /* NEXT */ /* abs as macro is now uppercase, there are conflicts with a few C compilers that have abs as macro, even though ANSI defines abs as function (int abs(int)). Most calls to ABS in term/ could be changed to abs if they use only int arguments and others to fabs, but for the time being, all calls are done via the macro */ #ifndef ABS # define ABS(x) ((x) >= 0 ? (x) : -(x)) #endif /* ABS */ #define NICE_LINE 0 #define POINT_TYPES 6 #endif /* TERM_DRIVER_H */ ������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/hp500c.trm�����������������������������������������������������������������������0000644�0004711�0000144�00000032302�10460036603�012621� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: hp500c.trm,v 1.17 2006/07/21 02:35:47 sfeam Exp $ * */ /* GNUPLOT - hp500c.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * hpdj 500c * * AUTHORS * John Engels -- \ * Russell Lang ----> HPLJII.trm * Maurice Castro -- / * UdoHessenauer ----> derived this version from the above one * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* The following HP Deskjet500c driver uses generic bit mapped graphics routines from bitmap.c to build up a bit map in memory. The driver interchanges colomns and lines in order to access entire lines easily and returns the lines to get bits in the right order : (x,y) -> (y,XMAX-1-x). */ /* This interchange is done by calling b_makebitmap() with reversed xmax and ymax, and then setting b_rastermode to TRUE. b_setpixel() will then perform the interchange before each pixel is plotted */ /* by John Engels JENGELS@BNANDP51.BITNET, inspired by the hpljet driver of Jyrki Yli-Nokari */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(hp500c) #endif #ifdef TERM_PROTO TERM_PUBLIC void HP500C_options __PROTO((void)); TERM_PUBLIC void HP500C_init __PROTO((void)); TERM_PUBLIC void HP500C_reset __PROTO((void)); TERM_PUBLIC void HP500C_linetype __PROTO((int linetype)); TERM_PUBLIC void HP500C_graphics __PROTO((void)); TERM_PUBLIC void HP500C_text __PROTO((void)); /* default values for term_tbl */ #define HP500C_75PPI_XMAX (1920/4) #define HP500C_75PPI_YMAX (1920/4) #define HP500C_75PPI_HCHAR (1920/4/6) #define HP500C_75PPI_VCHAR (1920/4/10) #define HP500C_75PPI_VTIC 5 #define HP500C_75PPI_HTIC 5 #define GOT_HP500C_PROTO #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY /* We define 4 different print qualities : 300ppi, 150ppi, 100ppi and 75ppi. (Pixel size = 1, 2, 3, 4 dots) */ #define HP500C_DPP (hpdj_dpp) /* dots per pixel */ #define HP500C_PPI (300/HP500C_DPP) /* pixel per inch */ /* make XMAX and YMAX a multiple of 8 */ #define HP500C_XMAX (8*(unsigned int)(xsize*1920/HP500C_DPP/8.0+0.9)) #define HP500C_YMAX (8*(unsigned int)(ysize*1920/HP500C_DPP/8.0+0.9)) /* Courier font with 6 lines per inch */ #define HP500C_VCHAR (HP500C_PPI/6) /* Courier font with 10 caracters per inch */ #define HP500C_HCHAR (HP500C_PPI/10) /* Save current cursor position */ #define HP500C_PUSH_CURSOR fputs("\033&f0S",gpoutfile) /* Restore cursor position */ #define HP500C_POP_CURSOR fputs("\033&f1S",gpoutfile) /* be sure to use courier font with 6lpi and 10cpi */ #define HP500C_COURIER fputs("\033(0N\033(s0p10.0h12.0v0s0b3T\033&l6D",gpoutfile) static int HP_compress __PROTO((unsigned char *op, unsigned char *oe, unsigned char *cp)); static unsigned char HP_complement __PROTO((int c)); static int HP_compress_to_TIFF __PROTO((unsigned char *op, unsigned char *oe, unsigned char *cp)); static int HP_nocompress __PROTO((unsigned char *op, unsigned char *oe, unsigned char *cp)); static int hpdj_dpp = 4; static int HP_COMP_MODE = 0; /* bm_pattern not appropriate for 300ppi graphics */ #ifndef GOT_300_PATTERN #define GOT_300_PATTERN static unsigned int b_300ppi_pattern[] = { 0xffff, 0x1111, 0xffff, 0x3333, 0x0f0f, 0x3f3f, 0x0fff, 0x00ff, 0x33ff }; #endif TERM_PUBLIC void HP500C_options() { char opt[6]; #define HPDJCERROR "expecting dots per inch size 75, 100, 150 or 300 and/or compression method" while (!END_OF_COMMAND) { if (token[c_token].length > 4) int_error(c_token, HPDJCERROR); /* almost_equals() won't accept numbers - use strcmp() instead */ capture(opt, c_token, c_token, 6); if (!strcmp(opt, "75")) { hpdj_dpp = 4; HP_COMP_MODE = 0; } else if (!strcmp(opt, "100")) { hpdj_dpp = 3; HP_COMP_MODE = 0; } else if (!strcmp(opt, "150")) { hpdj_dpp = 2; HP_COMP_MODE = 0; } else if (!strcmp(opt, "300")) { hpdj_dpp = 1; HP_COMP_MODE = 0; } else if (!strcmp(opt, "rle")) { HP_COMP_MODE = 1; } else if (!strcmp(opt, "tiff")) { HP_COMP_MODE = 2; } c_token++; } term->xmax = HP500C_XMAX; term->ymax = HP500C_YMAX; switch (hpdj_dpp) { case 1: strcpy(term_options, "300"); term->v_tic = 15; term->h_tic = 15; break; case 2: strcpy(term_options, "150"); term->v_tic = 8; term->h_tic = 8; break; case 3: strcpy(term_options, "100"); term->v_tic = 6; term->h_tic = 6; break; case 4: strcpy(term_options, "75"); term->v_tic = 5; term->h_tic = 5; break; } switch (HP_COMP_MODE) { case 0: strcat(term_options, " no comp"); break; case 1: strcat(term_options, " RLE"); break; case 2: strcat(term_options, " TIFF"); break; case 3: /* not implemented yet */ strcat(term_options, " Delta Row"); break; } } TERM_PUBLIC void HP500C_init() { /* HBB 980226: all changes to term-> fields *must* happen here, not * in graphics() !*/ switch (hpdj_dpp) { case 1: b_charsize(FNT13X25); term->v_char = FNT13X25_VCHAR; term->h_char = FNT13X25_HCHAR; break; case 2: b_charsize(FNT13X25); term->v_char = FNT13X25_VCHAR; term->h_char = FNT13X25_HCHAR; break; case 3: b_charsize(FNT9X17); term->v_char = FNT9X17_VCHAR; term->h_char = FNT9X17_HCHAR; break; case 4: b_charsize(FNT5X9); term->v_char = FNT5X9_VCHAR; term->h_char = FNT5X9_HCHAR; break; } } TERM_PUBLIC void HP500C_reset() { #ifdef VMS fflush_binary(); #endif } /* HP DeskJet 500c routines */ TERM_PUBLIC void HP500C_linetype(int linetype) { if (linetype < 0) linetype = 7; else if (linetype >= 8) { linetype %= 8; } switch (linetype) { case 0: linetype = 6; break; case 1: linetype = 5; break; case 2: linetype = 3; break; case 3: linetype = 2; break; case 4: linetype = 1; break; case 5: linetype = 4; break; case 6: linetype = 7; } b_setvalue(linetype); } #if 0 void HP500C_point(unsigned int x, unsigned int y, int value) { HP500C_linetype(value); do_point(x,y,value); } #endif TERM_PUBLIC void HP500C_graphics() { /* HBB 980226: moved block of code from here to init() */ /* rotate plot -90 degrees by reversing XMAX and YMAX and by setting b_rastermode to TRUE */ b_makebitmap(HP500C_YMAX, HP500C_XMAX, 3); b_rastermode = TRUE; } /* * Run-length encoding for the DeskJet. We have pairs of <count> * <what>, where count goes from 0 (meaning one count) to 255 * this might double the size of the image. */ static int HP_compress(unsigned char *op, unsigned char *oe, unsigned char *cp) { unsigned char *ce = cp; while (op < oe) { unsigned char prevchar; unsigned char count; prevchar = *op; /* remember char */ count = 1; /* its read the first time */ while (++op < oe && *op == prevchar && count < 255) { /* set op to the next char */ count++; /* and count it */ } *ce++ = --count; /* were ready, so correct the count */ *ce++ = prevchar; /* and store <what> */ } *ce = 0; /* just to be safe */ return ce - cp; /* length of cbufs */ } static unsigned char HP_complement(int c) { return (unsigned char) (256 - c); } static int HP_compress_to_TIFF( unsigned char *op, /* original pointer */ unsigned char *oe, /* end of orig string */ unsigned char *cp) /* pointer for compressed data */ { unsigned char *countposition; unsigned char *ce = cp; while (op < oe) { unsigned char prevchar; unsigned char count; prevchar = *op; /* gelesenes Zeichen aufbewaren */ count = 1; /* bisher wurde es einmal gelesen */ while (++op < oe && *op == prevchar && count < 128) { count++; } *ce = HP_complement(count - 1); /* remember count for building blocks of literal bytes */ countposition = ce++; *ce++ = prevchar; if (count < 2) { while (op < oe && (prevchar != *op || *op != *(op + 1))) { /* only use rle for at leat 3 equal bytes */ *ce++ = *op; count++; prevchar = *op++; if (op > oe) puts("FATAL op> oe!!\n"); } if (op < oe && prevchar == *op) { op--; count--; ce--; } *countposition = count - 1; } } return ce - cp; } static int HP_nocompress( unsigned char *op, unsigned char *oe, unsigned char *cp) { unsigned char *ce = cp; while (op < oe) *ce++ = *op++; return ce - cp; } /* 0 compression raster bitmap dump. Compatible with HP DeskJet 500 hopefully compatible with other HP Deskjet printers */ TERM_PUBLIC void HP500C_text() { register int x, j, row, count = 0; unsigned char *obuf, *oe, *cbuf, *ce; if ((obuf = (unsigned char *) malloc(100 * b_psize)) == 0) puts("FATAL!-- couldn't get enough memory for obuf"); if ((cbuf = (unsigned char *) malloc(400 * b_psize)) == 0) puts("FATAL!-- couldn't get enough memory for cbuf"); oe = obuf; fprintf(gpoutfile, "\ \033*t%dR\ \033*r1A\ \033*b%1dM\ \033*r%dS\ \033*r-3U", HP500C_PPI, HP_COMP_MODE, b_ysize); /* dump bitmap in raster mode */ for (x = b_xsize - 1; x >= 0; x--) { row = (b_ysize / 8) - 1; for (j = row; j >= 0; j--) { *oe++ = (char) (*((*b_p)[j] + x)); } switch (HP_COMP_MODE) { case 2: count = HP_compress_to_TIFF(obuf, oe, cbuf); break; case 1: count = HP_compress(obuf, oe, cbuf); break; case 0: count = HP_nocompress(obuf, oe, cbuf); break; } fprintf(gpoutfile, "\033*b%dV", count); ce = cbuf; while (count--) fputc(*ce++, gpoutfile); oe = obuf; for (j = row; j >= 0; j--) { *oe++ = (char) (*((*b_p)[j + b_psize] + x)); } switch (HP_COMP_MODE) { case 2: count = HP_compress_to_TIFF(obuf, oe, cbuf); break; case 1: count = HP_compress(obuf, oe, cbuf); break; case 0: count = HP_nocompress(obuf, oe, cbuf); break; } fprintf(gpoutfile, "\033*b%dV", count); ce = cbuf; while (count--) fputc(*ce++, gpoutfile); oe = obuf; for (j = row; j >= 0; j--) { *oe++ = (char) (*((*b_p)[j + (2 * b_psize)] + x)); } switch (HP_COMP_MODE) { case 2: count = HP_compress_to_TIFF(obuf, oe, cbuf); break; case 1: count = HP_compress(obuf, oe, cbuf); break; case 0: count = HP_nocompress(obuf, oe, cbuf); break; } fprintf(gpoutfile, "\033*b%dW", count); ce = cbuf; while (count--) fputc(*ce++, gpoutfile); oe = obuf; } fputs("\033*rbC", gpoutfile); free(cbuf); free(obuf); b_freebitmap(); #ifndef VMS /* most vms spoolers add a formfeed character */ putc('\f', gpoutfile); #endif /* !VMS */ } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(hp500c_driver) "hp500c", "HP DeskJet 500c, [75 100 150 300] [rle tiff]", HP500C_75PPI_XMAX, HP500C_75PPI_YMAX, HP500C_75PPI_VCHAR, HP500C_75PPI_HCHAR, HP500C_75PPI_VTIC, HP500C_75PPI_HTIC, HP500C_options, HP500C_init, HP500C_reset, HP500C_text, null_scale, HP500C_graphics, b_move, b_vector, HP500C_linetype, b_put_text, b_text_angle, null_justify_text, do_point, do_arrow, set_font_null, 0, TERM_BINARY, 0, 0, b_boxfill TERM_TABLE_END(hp500c_driver) #undef LAST_TERM #define LAST_TERM hp500c_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(hp500c) "1 hp500c", "?commands set terminal hp500c", "?set terminal hp500c", "?set term hp500c", "?terminal hp500c", "?term hp500c", "?hp500c", " The `hp500c` terminal driver supports the Hewlett Packard HP DeskJet 500c.", " It has options for resolution and compression.", "", " Syntax:", " set terminal hp500c {<res>} {<comp>}", "", " where `res` can be 75, 100, 150 or 300 dots per inch and `comp` can be \"rle\",", " or \"tiff\". Any other inputs are replaced by the defaults, which are 75 dpi", " and no compression. Rasterization at the higher resolutions may require a", " large amount of memory." END_HELP(hp500c) #endif /* TERM_HELP */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/wxt.trm��������������������������������������������������������������������������0000644�0004711�0000144�00000046651�12147741216�012467� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: wxt.trm,v 1.29.2.2 2013/05/24 19:42:06 sfeam Exp $ */ /* GNUPLOT - wxt.trm */ /*[ * Copyright 2005,2006 Timothee Lecomte * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* ------------------------------------------------------ * Here you will find the terminal table, filled * with C++ functions defined in wxt_gui.cpp, * where the wxWidgets terminal is mainly implemented. * See wxt_gui.cpp for details about this terminal. * ------------------------------------------------------*/ #ifdef TERM_REGISTER register_term (wxt) #endif #ifdef TERM_PROTO TERM_PUBLIC void wxt_options __PROTO ((void)); TERM_PUBLIC void wxt_text_wrapper __PROTO ((void)); #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include "wxterminal/wxt_term.h" /* terminal state, defined extern in wxt_term.h */ int wxt_window_number = 0; TBOOLEAN wxt_enhanced_enabled = FALSE; TBOOLEAN wxt_dashed = FALSE; double wxt_dashlength = 1.0; int wxt_background = 0xffffff; rgb_color wxt_rgb_background = {1.,1.,1.}; int wxt_persist = UNSET; int wxt_raise = UNSET; int wxt_ctrl = UNSET; int wxt_toggle = UNSET; int wxt_rounded = no; /* default text font family: */ char wxt_set_fontname[MAX_ID_LEN + 1] = ""; /* default text size*/ int wxt_set_fontsize = 0; double wxt_set_fontscale = 1.0; /* window title */ char wxt_title[MAX_ID_LEN + 1] = ""; /* size of the plot area, in pixels * (window is bigger, includes toolbar and status bar) */ int wxt_width = 640; int wxt_height = 384; /* These are used to pass axis scaling information at the end of each plot */ int wxt_axis_mask; wxt_axis_state_t wxt_axis_state[4]; enum WXT_id { WXT_FONT, WXT_FONTSCALE, WXT_ENHANCED, WXT_NOENHANCED, WXT_SIZE, WXT_PERSIST, WXT_NOPERSIST, WXT_RAISE, WXT_NORAISE, WXT_CTRL, WXT_NOCTRL, WXT_TITLE, WXT_CLOSE, WXT_ROUNDED, WXT_BUTT, WXT_SOLID, WXT_DASHED, WXT_DASHLENGTH, WXT_BACKGROUND, WXT_OTHER }; static struct gen_table wxt_opts[] = { {"fontscale", WXT_FONTSCALE}, {"font", WXT_FONT}, {"enh$anced", WXT_ENHANCED}, {"noenh$anced", WXT_NOENHANCED}, {"s$ize", WXT_SIZE}, {"per$sist", WXT_PERSIST}, {"noper$sist", WXT_NOPERSIST}, {"rai$se", WXT_RAISE}, {"norai$se", WXT_NORAISE}, {"ct$rlq", WXT_CTRL}, {"noct$rlq", WXT_NOCTRL}, {"ti$tle", WXT_TITLE}, {"cl$ose", WXT_CLOSE}, {"round$ed", WXT_ROUNDED}, {"butt", WXT_BUTT}, {"solid", WXT_SOLID}, {"dash$ed", WXT_DASHED}, {"dashl$ength", WXT_DASHLENGTH}, {"dl", WXT_DASHLENGTH}, {"backg$round", WXT_BACKGROUND}, {NULL, WXT_OTHER} }; /* "Called when terminal type is selected. This procedure should parse options on the command line. * A list of the currently selected options should be stored in term_options[], * in a form suitable for use with the set term command. * term_options[] is used by the save command. Use options_null() if no options are available." */ TERM_PUBLIC void wxt_options() { char *s = NULL; char *font_setting = NULL; int sep; TBOOLEAN duplication = FALSE; TBOOLEAN set_enhanced = FALSE, set_font = FALSE; TBOOLEAN set_persist = FALSE, set_number = FALSE; TBOOLEAN set_raise = FALSE, set_ctrl = FALSE; TBOOLEAN set_title = FALSE, set_close = FALSE; TBOOLEAN set_capjoin = FALSE, set_size = FALSE; if (term_interlock != NULL && term_interlock != (void *)wxt_init) { term = NULL; int_error(NO_CARET, "The wxt terminal cannot be used in a qt session"); } while (!END_OF_COMMAND) { FPRINTF((stderr, "processing token\n")); switch (lookup_table(&wxt_opts[0], c_token)) { case WXT_FONT: c_token++; if (!(s = try_to_get_string())) int_error(c_token,"font: expecting string"); if (!(*s)) { strcpy (wxt_set_fontname, ""); wxt_set_fontsize = 0; } else { sep = strcspn(s,","); if (sep > 0) { strncpy(wxt_set_fontname, s, sep); wxt_set_fontname[sep] = '\0'; } if (s[sep] == ',') sscanf(&(s[sep+1]), "%d", &wxt_set_fontsize); } font_setting = (char*) gp_alloc(strlen(s) + 1,"wxt font"); strcpy(font_setting,s); free(s); if (set_font) duplication=TRUE; set_font = TRUE; break; case WXT_FONTSCALE: c_token++; wxt_set_fontscale = END_OF_COMMAND ? -1 : real_expression(); if (wxt_set_fontscale <= 0) wxt_set_fontscale = 1.; break; case WXT_ENHANCED: c_token++; wxt_enhanced_enabled = TRUE; term->flags |= TERM_ENHANCED_TEXT; if (set_enhanced) duplication=TRUE; set_enhanced = TRUE; break; case WXT_NOENHANCED: c_token++; wxt_enhanced_enabled = FALSE; term->flags &= ~TERM_ENHANCED_TEXT; if (set_enhanced) duplication=TRUE; set_enhanced = TRUE; break; case WXT_SIZE: c_token++; if (END_OF_COMMAND) int_error(c_token,"size requires 'width,heigth'"); wxt_width = real_expression(); if (!equals(c_token++,",")) int_error(c_token,"size requires 'width,heigth'"); wxt_height = real_expression(); if (wxt_width < 1 || wxt_height < 1) int_error(c_token, "size is out of range"); if (set_size) duplication=TRUE; set_size = TRUE; break; case WXT_PERSIST: c_token++; wxt_persist = yes; if (set_persist) duplication=TRUE; set_persist = TRUE; break; case WXT_NOPERSIST: c_token++; wxt_persist = no; if (set_persist) duplication=TRUE; set_persist = TRUE; break; case WXT_RAISE: c_token++; wxt_raise = yes; if (set_raise) duplication=TRUE; set_raise = TRUE; break; case WXT_NORAISE: c_token++; wxt_raise = no; if (set_raise) duplication=TRUE; set_raise = TRUE; break; case WXT_CTRL: c_token++; wxt_ctrl = yes; if (set_ctrl) duplication=TRUE; set_ctrl = TRUE; break; case WXT_NOCTRL: c_token++; wxt_ctrl = no; if (set_ctrl) duplication=TRUE; set_ctrl = TRUE; break; case WXT_TITLE: c_token++; if (!(s = try_to_get_string())) int_error(c_token,"title: expecting string"); if (*s) strncpy(wxt_title, s, sizeof(wxt_title)); free(s); if (set_title) duplication=TRUE; set_title = TRUE; break; case WXT_CLOSE: c_token++; if (set_close) duplication=TRUE; set_close = TRUE; break; case WXT_ROUNDED: c_token++; if (set_capjoin) duplication=TRUE; wxt_rounded = yes; set_capjoin = TRUE; break; case WXT_BUTT: c_token++; if (set_capjoin) duplication=TRUE; wxt_rounded = no; set_capjoin = TRUE; break; case WXT_DASHED: c_token++; wxt_dashed = TRUE; break; case WXT_DASHLENGTH: c_token++; wxt_dashlength = real_expression(); if (wxt_dashlength <= 0) wxt_dashlength = 1.0; break; case WXT_SOLID: c_token++; wxt_dashed = FALSE; break; case WXT_BACKGROUND: { c_token++; wxt_background = parse_color_name(); wxt_rgb_background.r = (double)((wxt_background >> 16) & 0xff) / 255.; wxt_rgb_background.g = (double)((wxt_background >> 8) & 0xff) / 255.; wxt_rgb_background.b = (double)( wxt_background & 0xff) / 255.; break; } case WXT_OTHER: default: wxt_window_number = int_expression(); if (set_number) duplication=TRUE; set_number = TRUE; /*int_error(c_token, "unrecognized terminal option");*/ break; } if (duplication) int_error(c_token-1, "Duplicated or contradicting arguments in wxt term options."); } /* Save options back into options string in normalized format */ snprintf(term_options, sizeof(term_options)-strlen(term_options), "%d", wxt_window_number); if (set_title) { strncat(term_options, " title \"", sizeof(term_options)-strlen(term_options)-1); strncat(term_options, wxt_title, sizeof(term_options)-strlen(term_options)-1); strncat(term_options, "\"", sizeof(term_options)-strlen(term_options)-1); wxt_update_title(wxt_window_number); } if (wxt_dashed) strncat(term_options, " dashed", sizeof(term_options)-strlen(term_options)-1); if (wxt_dashlength != 1.0) { char tmp_term_options[MAX_LINE_LEN+1] = ""; snprintf(tmp_term_options,sizeof(tmp_term_options), " dashlength %g", wxt_dashlength); strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1); } if (wxt_background != 0xffffff) { char tmp_term_options[MAX_LINE_LEN+1] = ""; snprintf(tmp_term_options,sizeof(tmp_term_options), " background '#%06x'", wxt_background); strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1); } if (set_size) { char tmp_term_options[MAX_LINE_LEN+1] = ""; snprintf(tmp_term_options, sizeof(tmp_term_options), " size %d, %d", wxt_width, wxt_height); strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1); wxt_update_size(wxt_window_number); } if (set_enhanced) strncat(term_options, wxt_enhanced_enabled ? " enhanced" : " noenhanced", sizeof(term_options)-strlen(term_options)-1); if (set_font) { strncat(term_options, " font \"", sizeof(term_options)-strlen(term_options)-1); strncat(term_options, font_setting, sizeof(term_options)-strlen(term_options)-1); strncat(term_options, "\"", sizeof(term_options)-strlen(term_options)-1); free(font_setting); } if (wxt_set_fontscale != 1.0) { char tmp_term_options[MAX_LINE_LEN+1] = ""; snprintf(tmp_term_options,sizeof(tmp_term_options), " fontscale %.1f", wxt_set_fontscale); strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1); } if (set_capjoin) strncat(term_options, wxt_rounded ? " rounded" : " butt", sizeof(term_options)-strlen(term_options)-1); if (set_persist) strncat(term_options, (wxt_persist==yes) ? " persist" : " nopersist", sizeof(term_options)-strlen(term_options)-1); if (set_raise) strncat(term_options, (wxt_raise==yes) ? " raise" : " noraise", sizeof(term_options)-strlen(term_options)-1); if (set_ctrl) strncat(term_options, (wxt_ctrl==yes) ? " ctrl" : " noctrl", sizeof(term_options)-strlen(term_options)-1); if (set_close) wxt_close_terminal_window(wxt_window_number); } /* wxt_text() will do most of the work, but we have to pass it axis scaling * info via a global structure that is loaded here. The axis scaling is * so that subsequent mouse events can be transformed into plot * coordinates even though the plot is no longer active. */ TERM_PUBLIC void wxt_text_wrapper() { int i; #ifdef USE_MOUSE int axis_order[4] = {FIRST_X_AXIS, FIRST_Y_AXIS, SECOND_X_AXIS, SECOND_Y_AXIS}; wxt_axis_mask = 0; for (i=0; i<4; i++) { if (axis_array[axis_order[i]].ticmode != NO_TICS) wxt_axis_mask |= (1 << i); } for (i=0; i<4; i++) { wxt_axis_state[i].min = axis_array[axis_order[i]].min; wxt_axis_state[i].term_lower = axis_array[axis_order[i]].term_lower; wxt_axis_state[i].term_scale = axis_array[axis_order[i]].term_scale; wxt_axis_state[i].logbase = axis_array[axis_order[i]].log ? axis_array[axis_order[i]].log_base : 0; } #endif wxt_text(); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START (wxt_driver) "wxt", "wxWidgets cross-platform windowed terminal", /* the following values are overriden by wxt_graphics */ 1 /* xmax */ , 1 /* ymax */ , 1 /* vchar */ , 1 /* hchar */ , 1 /* vtic */ , 1 /* htic */ , wxt_options, wxt_init, wxt_reset, wxt_text_wrapper, null_scale, wxt_graphics, wxt_move, wxt_vector, wxt_linetype, wxt_put_text, wxt_text_angle, wxt_justify_text, wxt_point, do_arrow, wxt_set_font, wxt_pointsize, TERM_CAN_MULTIPLOT|TERM_NO_OUTPUTFILE|TERM_ALPHA_CHANNEL|TERM_CAN_DASH|TERM_FONTSCALE, wxt_text /* suspend */, 0 /* resume */, wxt_fillbox, wxt_linewidth #ifdef USE_MOUSE , wxt_waitforinput, wxt_put_tmptext, wxt_set_ruler, wxt_set_cursor, wxt_set_clipboard #endif , wxt_make_palette, 0 /* wxt_previous_palette */, wxt_set_color, wxt_filled_polygon , wxt_image , wxt_enhanced_open, wxt_enhanced_flush, wxt_enhanced_writec , wxt_layer TERM_TABLE_END (wxt_driver) #undef LAST_TERM #define LAST_TERM wxt_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(wxt) "1 wxt", "?set terminal wxt", "?terminal wxt", "?set term wxt", "?term wxt", "?wxt", " The `wxt` terminal device generates output in a separate window. The window", " is created by the wxWidgets library, where the 'wxt' comes from. The actual", " drawing is done via cairo, a 2D graphics library, and pango, a library for", " laying out and rendering text.", "", " Syntax:", " set term wxt {<n>}", " {size <width>,<height>} {background <rgb_color>}", " {{no}enhanced}", " {font <font>} {fontscale <scale>}", " {title \"title\"}", " {dashed|solid} {dashlength <dl>}", " {{no}persist}", " {{no}raise}", " {{no}ctrl}", " {close}", "", " Multiple plot windows are supported: `set terminal wxt <n>` directs the", " output to plot window number n.", "", " The default window title is based on the window number. This title can also", " be specified with the keyword \"title\".", "", " Plot windows remain open even when the `gnuplot` driver is changed to a", " different device. A plot window can be closed by pressing the letter 'q'", " while that window has input focus, by choosing `close` from a window", " manager menu, or with `set term wxt <n> close`.", "", " The size of the plot area is given in pixels, it defaults to 640x384.", " In addition to that, the actual size of the window also includes the space", " reserved for the toolbar and the status bar.", " When you resize a window, the plot is immediately scaled to fit in the", " new size of the window. Unlike other interactive terminals, the `wxt`", " terminal scales the whole plot, including fonts and linewidths, and keeps", " its global aspect ratio constant, leaving an empty space painted in gray.", " If you type `replot`, click the `replot` icon in the terminal toolbar or", " type a new `plot` command, the new plot will completely fit in the window", " and the font size and the linewidths will be reset to their defaults.", "", " The active plot window (the one selected by `set term wxt <n>`) is", " interactive. Its behaviour is shared with other terminal types. See `mouse`", " for details. It also has some extra icons, which are supposed to be", " self-explanatory.", "", " This terminal supports an enhanced text mode, which allows font and other", " formatting commands (subscripts, superscripts, etc.) to be embedded in labels", " and other text strings. The enhanced text mode syntax is shared with other", " gnuplot terminal types. See `enhanced` for more details.", "", " <font> is in the format \"FontFace,FontSize\", i.e. the face and the size", " comma-separated in a single string. FontFace is a usual font face name, such", " as \'Arial\'. If you do not provide FontFace, the wxt terminal will use", " \'Sans\'. FontSize is the font size, in points. If you do not provide it,", " the wxt terminal will use a size of 10 points.", " For example :", " set term wxt font \"Arial,12\"", " set term wxt font \"Arial\" # to change the font face only", " set term wxt font \",12\" # to change the font size only", " set term wxt font \"\" # to reset the font name and size", "", " The fonts are retrieved from the usual fonts subsystems. Under Windows,", " those fonts are to be found and configured in the entry \"Fonts\" of the", " control panel. Under UNIX, they are handled by \"fontconfig\".", "", " Pango, the library used to layout the text, is based on utf-8. Thus, the wxt", " terminal has to convert from your encoding to utf-8. The default input", " encoding is based on your \'locale\'. If you want to use another encoding,", " make sure gnuplot knows which one you are using. See `encoding` for more", " details.", "", " Pango may give unexpected results with fonts that do not respect the unicode", " mapping. With the Symbol font, for example, the wxt terminal will use the map", " provided by http://www.unicode.org/ to translate character codes to unicode.", " Pango will do its best to find a font containing this character, looking for", " your Symbol font, or other fonts with a broad unicode coverage, like the", " DejaVu fonts. Note that \"the Symbol font\" is to be understood as the Adobe", " Symbol font, distributed with Acrobat Reader as \"SY______.PFB\".", " Alternatively, the OpenSymbol font, distributed with OpenOffice.org as", " \"opens___.ttf\", offers the same characters. Microsoft has distributed a", " Symbol font (\"symbol.ttf\"), but it has a different character set with", " several missing or moved mathematic characters. If you experience problems", " with your default setup (if the demo enhancedtext.dem is not displayed", " properly for example), you probably have to install one of the Adobe or", " OpenOffice Symbol fonts, and remove the Microsoft one.", " Other non-conform fonts, such as \"wingdings\" have been observed working.", "", " The rendering of the plot can be altered with a dialog available from the", " toolbar. To obtain the best output possible, the rendering involves three", " mechanisms : antialiasing, oversampling and hinting.", " Antialiasing allows to display non-horizontal and non-vertical lines", " smoother.", " Oversampling combined with antialiasing provides subpixel accuracy,", " so that gnuplot can draw a line from non-integer coordinates. This avoids", " wobbling effects on diagonal lines ('plot x' for example).", " Hinting avoids the blur on horizontal and vertical lines caused by", " oversampling. The terminal will snap these lines to integer coordinates so", " that a one-pixel-wide line will actually be drawn on one and only one pixel.", "", " By default, the window is raised to the top of your desktop when a plot is", " drawn. This can be controlled with the keyword \"raise\".", " The keyword \"persist\" will prevent gnuplot from exiting before you", " explicitely close all the plot windows.", " Finally, by default the key <space> raises the gnuplot console window, and", " 'q' closes the plot window. The keyword \"ctrl\" allows you to replace those", " bindings by <ctrl>+<space> and <ctrl>+'q', respectively.", " These three keywords (raise, persist and ctrl) can also be set and remembered", " between sessions through the configuration dialog." END_HELP(wxt) #endif /* TERM_HELP */ ���������������������������������������������������������������������������������������gnuplot-4.6.4/term/qms.trm��������������������������������������������������������������������������0000644�0004711�0000144�00000014604�10460036604�012430� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: qms.trm,v 1.12 2006/07/21 02:35:48 sfeam Exp $ * */ /* GNUPLOT - qms.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * QMS laser printers * * AUTHORS * Colin Kelley, Thomas Williams, Russell Lang * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(qms) #endif #ifdef TERM_PROTO TERM_PUBLIC void QMS_init __PROTO((void)); TERM_PUBLIC void QMS_graphics __PROTO((void)); TERM_PUBLIC void QMS_text __PROTO((void)); TERM_PUBLIC void QMS_linetype __PROTO((int linetype)); TERM_PUBLIC void QMS_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void QMS_vector __PROTO((unsigned int x2, unsigned int y2)); TERM_PUBLIC void QMS_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC void QMS_reset __PROTO((void)); #define QMS_XMAX 9000 #define QMS_YMAX 6000 #define QMS_XLAST (QMS_XMAX - 1) #define QMS_YLAST (QMS_YMAX - 1) #define QMS_VCHAR 120 #define QMS_HCHAR 70 #define QMS_VTIC 70 #define QMS_HTIC 70 #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static int qms_line = 0; /* to remember current line type */ TERM_PUBLIC void QMS_init() { /* This was just ^IOL, but at Rutgers at least we need some more stuff */ fputs("^PY^-\n^IOL\n^ISYNTAX00000^F^IB11000^IJ00000^IT00000\n", gpoutfile); /* ^ QUIC on ^set defaults ^ set botttom,top,left margins * ^landscape ^free format */ /* set defaults are: implicit decimal point, units in inches, * numbers left justified, units in 1/1000 inch, do not ignore spaces * margins are in 1/1000 inch units */ } TERM_PUBLIC void QMS_graphics() { fputs("^IGV\n", gpoutfile); /* ^enter graphics vector mode */ } TERM_PUBLIC void QMS_text() { /* added ^-, because ^, after an ^I command doesn't actually print a page */ /* Did anybody try this code out? [uhh...-cdk] */ fputs("^IGE\n^-^,", gpoutfile); /* ^exit graphics vector mode * ^pass terminator * ^print page */ } TERM_PUBLIC void QMS_linetype(int linetype) { static int width[2 + 9] = { 7, 3, 3, 3, 3, 5, 5, 5, 7, 7, 7 }; static int type[2 + 9] = { 0, 1, 0, 2, 3, 0, 2, 3, 0, 2, 3 }; /* * I don't know about Villanova, but on our printer, using ^V without * previously setting up a pattern crashes the microcode. * [nope, doesn't crash here. -cdk] * [it generates a controller error here on dotted lines. - rjl] */ /* Code to define patterns added by rjl * According to the manual it should work - but it doesn't */ qms_line = linetype; if (linetype >= 9) linetype %= 9; fprintf(gpoutfile, "^PW%02d\n", width[linetype + 2]); /* ^width in dots */ switch (type[linetype + 2]) { case 1: /* short dash */ fputs("^PV102025^G\n^V1\n", gpoutfile); /* ^PV = define pattern vector, 1 = pattern number, * 02 = number of pen downs and ups, 025 = .025" length of ups/downs */ break; case 2: /* medium dash */ fputs("^PV202050^G\n^V2\n", gpoutfile); break; case 3: /* long dash */ fputs("^PV302100^G\n^V3\n", gpoutfile); break; default: case 0: fputs("^V0\n", gpoutfile); break; } } TERM_PUBLIC void QMS_move(unsigned int x, unsigned int y) { fprintf(gpoutfile, "^U%05d:%05d\n", 1000 + x, QMS_YLAST + 1000 - y); /* ^pen up vector*/ } TERM_PUBLIC void QMS_vector(unsigned int x2, unsigned int y2) { fprintf(gpoutfile, "^D%05d:%05d\n", 1000 + x2, QMS_YLAST + 1000 - y2); /* ^pen down vector*/ } TERM_PUBLIC void QMS_put_text(unsigned int x, unsigned int y, const char str[]) { char ch; QMS_move(x, y + QMS_VCHAR / 3); fputs("^IGE\n", gpoutfile); ch = *str++; while (ch != NUL) { if (ch == '^') putc('^', gpoutfile); putc(ch, gpoutfile); ch = *str++; } fputs("\n^IGV\n", gpoutfile); QMS_linetype(qms_line); /* restore line type */ } TERM_PUBLIC void QMS_reset() { fputs("^PN^-\n", gpoutfile); /* ^QUIC off */ } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(qms_driver) "qms", "QMS/QUIC Laser printer (also Talaris 1200 and others)", QMS_XMAX, QMS_YMAX, QMS_VCHAR, QMS_HCHAR, QMS_VTIC, QMS_HTIC, options_null, QMS_init, QMS_reset, QMS_text, null_scale, QMS_graphics, QMS_move, QMS_vector, QMS_linetype, QMS_put_text, null_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(qms_driver) #undef LAST_TERM #define LAST_TERM qms_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(qms) "1 qms", "?commands set terminal qms", "?set terminal qms", "?set term qms", "?terminal qms", "?term qms", "?qms", " The `qms` terminal driver supports the QMS/QUIC Laser printer, the Talaris", " 1200 and others. It has no options." END_HELP(qms) #endif ����������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/post.h���������������������������������������������������������������������������0000644�0004711�0000144�00000005571�11656023060�012245� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: post.h,v 1.12 2011/11/07 18:40:48 markisch Exp $ */ /* GNUPLOT - post.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef TERM_POST_H # define TERM_POST_H /* Needed by terminals which output postscript * (post.trm and pslatex.trm) */ #ifdef PSLATEX_DRIVER TERM_PUBLIC void PSTEX_common_init __PROTO((void)); TERM_PUBLIC void PSTEX_reopen_output __PROTO((void)); TERM_PUBLIC void EPSLATEX_common_init __PROTO((void)); TERM_PUBLIC void EPSLATEX_reopen_output __PROTO((char *)); #endif #define PS_POINT_TYPES 8 /* assumes landscape */ #define PS_XMAX (10*720) #define PS_YMAX (7*720) #define PS_YMAX_OLDSTYLE (6*720) /* These seem to be unnecessary, thus commented out */ /* #define PS_XLAST (PS_XMAX - 1) #define PS_YLAST (PS_YMAX - 1) */ #define PS_VTIC (PS_YMAX/80) #define PS_HTIC (PS_YMAX/80) /* scale is 1pt = 10 units */ #define PS_SC 10 /* EAM March 2010 allow user to rescale fonts */ #define PS_SCF (PS_SC * ps_params->fontscale) /* linewidth = 0.5 pts */ #define PS_LW (0.5*PS_SC) /* character size defaults: */ /* 14 pt for postscript */ #define PS_VCHAR (14*PS_SC) #define PS_HCHAR (14*PS_SC*6/10) /* 10 pt for ps(la)tex */ #define PSTEX_VCHAR (10*PS_SC) #define PSTEX_HCHAR (10*PS_SC*6/10) /* 11 pt for epslatex */ #define EPSLATEX_VCHAR (11*PS_SC) #define EPSLATEX_HCHAR (11*PS_SC*6/10) /* additional LaTeX header information for epslatex terminal */ #ifdef PSLATEX_DRIVER TERM_PUBLIC char *epslatex_header; #endif #endif /* TERM_POST_H */ ���������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/lua/�����������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�011645� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/lua/README�����������������������������������������������������������������������0000644�0004711�0000144�00000007064�11530635716�012557� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� Gnuplot PGF/TikZ terminal ========================= The PGF/TikZ terminal mainly consists of a generic Lua terminal to wrap the gnuplot terminal C functions. This allows writing gnuplot terminals in Lua instead of C. The first (and currently only) implemented `backend' is the PGF/TikZ terminal for the use with TeX/LaTeX. The actual terminal functionality is a provided by a separate Lua script `gnuplot-tikz.lua'. The LaTeX style file is usually derived from PGF/TikZ terminal script to keep things consistent. Why all that hassle? ==================== There are are couple of terminals allready usable for LaTeX so why writing another one? Here is a brief list of reasons: 1. I like PGF/TikZ and there is no such terminal so far. 2. I also like lerning Lua and the use of Lua makes this terminal very versatile, e.g. there is no recompilation necessary if you want to change/add any terminal features and you also gain all the benefits of using a scripting language in this place -- whatever that means to you ;-) 3. Most advantages are directly related to PGF/TikZ: a. rescaling the plot does not automatically change the linewidths nor the size of points (aka plot marks), fonts, arrow tips or fill patterns. The aspect ratio of these elements will also remain unchanged on unproportional scalings. b. you can directly produce documents of any output format that is supported by PGF/TikZ. c. changing the appearance of the plots is an easy task even after the generation of the PGF/TikZ code. This can be done locally or globally by changing certain TikZ-styles or dimensions. d. it is also easy to put the keys (aka legend) into the normal text area (e.g. the plot caption), because the line and plotmark styles are available. e. overlaying of the plot with e.g. additional nodes, arrows etc. is possible through the use the of tikz coordinates of the actual plotting area. For more reasons please have a look at the PGF/TikZ manual ;-) Generating style and help file ============================== To generate the style files and wrapper for the various TeX flavors enter lua gnuplot-tikz.lua style on the command line. The files generated should be t-gnuplot-lua-tikz.tex (Context wrapper) gnuplot-lua-tikz.tex (plain TeX wrapper) gnuplot-lua-tikz.sty (LaTeX wrapper) gnuplot-lua-tikz-common.tex (common definitions) and can be copied to the appropriate places. lua gnuplot-tikz.lua help prints the terminal help on stdout and lua gnuplot-tikz.lua termhelp > gnuplot-tikz.help generates the version to be included in gnuplot help system. Usage ===== The usage is quite similar to the other terminals with the difference that most terminal options are processed by the external Lua script. To see the list of additional script options just type gnuplot> set term lua tikz help or # lua gnuplot-tikz.lua on the command line. A minimalist gnuplot session (or script) may look like this: > set term lua tikz # activate the Lua terminal and load "gnuplot.lua" > set out 'test.tex' # write output to file 'test.tex' > plot x*x # plot a nice parabola The generated file `test.tex' can be used by simply adding the line \input{test.tex} to your LaTeX document and by adding \usepackage{gnuplot-lua-tikz} to the preamble. Any comments, suggestions and bug reports are most welcome and can go to <peter(at)affenbande.org> or the Sourceforge bug and patch trackers. Have fun! Peter Hedwig <peter@affenbande.org> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/lua/TODO�������������������������������������������������������������������������0000644�0004711�0000144�00000002166�11530635716�012365� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������TODO and known issues ===================== Lua generic terminal * support color palettes (low priority, not really needed for TikZ?) * support enhanced text mode (low priority, not really needed for TikZ) * sort out what needs to be built + included as part of preparing a distribution package TikZ backend * automatic detection of font sizes (via LaTeX test call?! very low priority. It works with the gnuplottex package and the charsize option, see style file for an example) * setting the background color within a gnuplot (gnuplottex) environment does not work if the tikzpicture environment is used of this scope: \begin{tikzpicture}[gnuplot] \begin{gnuplot}[...] \end{gnuplot} \end{tikzpicture} As a workaround the background color can also be set manually right after \begin{tikzpicture}[gnuplot] using the \gpsetbgcolor{R,G,B} command. * there is an incompatibility/bug of the preview package and TikZ that leads to erroneous files on dvi and postscript output using the terminal's standalone mode. PDF output works flawlessly. * pattern fills are not supported by XeTeX ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/lua/gnuplot-tikz.lua�������������������������������������������������������������0000644�0004711�0000144�00000221711�11714262507�015044� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������--[[ This is the execution script for the `Lua generic terminal' driver. This script provides an interface to the PGF/TikZ package for LaTeX. Copyright 2008 Peter Hedwig <peter@affenbande.org> Permission to use, copy, and distribute this software and its documentation for any purpose with or without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Permission to modify the software is granted, but not the right to distribute the complete modified source code. Modifications are to be distributed as patches to the released version. Permission to distribute binaries produced by compiling modified sources is granted, provided you 1. distribute the corresponding source modifications from the released version in the form of a patch file along with the binaries, 2. add special version identification to distinguish your version in addition to the base release version number, 3. provide your name and address as the primary contact for the support of your modified version, and 4. retain our contact information in regard to use of the base software. Permission to distribute the released version of the source code along with corresponding source modifications in the form of a patch file is granted with same provisions 2 through 4 for binary distributions. This software is provided "as is" without express or implied warranty to the extent permitted by applicable law. $Date: 2012/02/07 17:54:15 $ $Author: sfeam $ $Rev: 100 $ ]]-- --[[ `term' gnuplot term_api -> local interface `gp' local -> gnuplot interface are both initialized by the terminal ]]-- -- -- internal variables -- local pgf = {} local gfx = {} -- the terminal default size in cm pgf.DEFAULT_CANVAS_SIZE_X = 12.5 pgf.DEFAULT_CANVAS_SIZE_Y = 8.75 -- tic default size in cm pgf.DEFAULT_TIC_SIZE = 0.18 -- the terminal resolution in "dots" per cm. pgf.DEFAULT_RESOLUTION = 1000 -- default font size in TeX pt pgf.DEFAULT_FONT_SIZE = 10 -- default sizes for CM@10pt and default resolution -- there is no need to adapt these values when changing -- pgf.DEFAULT_FONT_SIZE or pgf.DEFAULT_RESOLUTION ! pgf.DEFAULT_FONT_H_CHAR = 184 pgf.DEFAULT_FONT_V_CHAR = 308 pgf.STYLE_FILE_BASENAME = "gnuplot-lua-tikz" -- \usepackage{gnuplot-lua-tikz} pgf.REVISION = string.sub("$Rev: 100 $",7,-3) pgf.REVISION_DATE = string.gsub("$Date: 2012/02/07 17:54:15 $", "$Date: ([0-9]+).([0-9]+).([0-9]+) .*","%1/%2/%3") pgf.styles = {} -- the styles are used in conjunction with the 'tikzarrows' -- and the style number directly corresponds to the used -- angle in the gnuplot style definition pgf.styles.arrows = { [1] = {"gp arrow 1", ">=latex"}, [2] = {"gp arrow 2", ">=angle 90"}, [3] = {"gp arrow 3", ">=angle 60"}, [4] = {"gp arrow 4", ">=angle 45"}, [5] = {"gp arrow 5", ">=o"}, [6] = {"gp arrow 6", ">=*"}, [7] = {"gp arrow 7", ">=diamond"}, [8] = {"gp arrow 8", ">=open diamond"}, [9] = {"gp arrow 9", ">={]}"}, [10] = {"gp arrow 10", ">={[}"}, [11] = {"gp arrow 11", ">=)"}, [12] = {"gp arrow 12", ">=("} } -- plot styles are corresponding with linetypes and must have the same number of entries -- see option 'tikzplot' for usage pgf.styles.plotstyles_axes = { [1] = {"gp plot axes", ""}, [2] = {"gp plot border", ""}, } pgf.styles.plotstyles = { [1] = {"gp plot 0", "smooth"}, [2] = {"gp plot 1", "smooth"}, [3] = {"gp plot 2", "smooth"}, [4] = {"gp plot 3", "smooth"}, [5] = {"gp plot 4", "smooth"}, [6] = {"gp plot 5", "smooth"}, [7] = {"gp plot 6", "smooth"}, [8] = {"gp plot 7", "smooth"} } pgf.styles.linetypes_axes = { [1] = {"gp lt axes", "dotted"}, -- An lt of -1 is used for the X and Y axes. [2] = {"gp lt border", "solid"}, -- An lt of -2 is used for the border of the plot. } pgf.styles.linetypes = { [1] = {"gp lt plot 0", "solid"}, -- first graph [2] = {"gp lt plot 1", "dashed"}, -- second ... [3] = {"gp lt plot 2", "dash pattern=on 1.5pt off 2.25pt"}, [4] = {"gp lt plot 3", "dash pattern=on \\pgflinewidth off 1.125"}, [5] = {"gp lt plot 4", "dash pattern=on 4.5pt off 1.5pt on \\pgflinewidth off 1.5pt"}, [6] = {"gp lt plot 5", "dash pattern=on 2.25pt off 2.25pt on \\pgflinewidth off 2.25pt"}, [7] = {"gp lt plot 6", "dash pattern=on 1.5pt off 1.5pt on 1.5pt off 4.5pt"}, [8] = {"gp lt plot 7", "dash pattern=on \\pgflinewidth off 1.5pt on 4.5pt off 1.5pt on \\pgflinewidth off 1.5pt"} } -- corresponds to pgf.styles.linetypes pgf.styles.lt_colors_axes = { [1] = {"gp lt color axes", "black!30"}, [2] = {"gp lt color border", "black"}, } pgf.styles.lt_colors = { [1] = {"gp lt color 0", "red"}, [2] = {"gp lt color 1", "green"}, [3] = {"gp lt color 2", "blue"}, [4] = {"gp lt color 3", "magenta"}, [5] = {"gp lt color 4", "cyan"}, [6] = {"gp lt color 5", "yellow"}, [7] = {"gp lt color 6", "orange"}, [8] = {"gp lt color 7", "purple"} } pgf.styles.patterns = { [1] = {"gp pattern 0", "white"}, [2] = {"gp pattern 1", "pattern=north east lines"}, [3] = {"gp pattern 2", "pattern=north west lines"}, [4] = {"gp pattern 3", "pattern=crosshatch"}, [5] = {"gp pattern 4", "pattern=grid"}, [6] = {"gp pattern 5", "pattern=vertical lines"}, [7] = {"gp pattern 6", "pattern=horizontal lines"}, [8] = {"gp pattern 7", "pattern=dots"}, [9] = {"gp pattern 8", "pattern=crosshatch dots"}, [10] = {"gp pattern 9", "pattern=fivepointed stars"}, [11] = {"gp pattern 10", "pattern=sixpointed stars"}, [12] = {"gp pattern 11", "pattern=bricks"} } pgf.styles.plotmarks = { [1] = {"gp mark 0", "mark size=.5\\pgflinewidth,mark=*"}, -- point (-1) [2] = {"gp mark 1", "mark=+"}, [3] = {"gp mark 2", "mark=x"}, [4] = {"gp mark 3", "mark=star"}, [5] = {"gp mark 4", "mark=square"}, [6] = {"gp mark 5", "mark=square*"}, [7] = {"gp mark 6", "mark=o"}, [8] = {"gp mark 7", "mark=*"}, [9] = {"gp mark 8", "mark=triangle"}, [10] = {"gp mark 9", "mark=triangle*"}, [11] = {"gp mark 10", "mark=triangle,every mark/.append style={rotate=180}"}, [12] = {"gp mark 11", "mark=triangle*,every mark/.append style={rotate=180}"}, [13] = {"gp mark 12", "mark=diamond"}, [14] = {"gp mark 13", "mark=diamond*"}, [15] = {"gp mark 14", "mark=otimes"}, [16] = {"gp mark 15", "mark=oplus"} } --[[=============================================================================================== helper functions ]]--=============================================================================================== -- from the Lua wiki explode = function(div,str) if (div=='') then return false end local pos,arr = 0,{} local trim = function(s) return (string.gsub(s,"^%s*(.-)%s*$", "%1")) end -- for each divider found for st,sp in function() return string.find(str,div,pos,true) end do table.insert(arr, trim(string.sub(str,pos,st-1))) -- Attach chars left of current divider pos = sp + 1 -- Jump past current divider end table.insert(arr, trim(string.sub(str,pos))) -- Attach chars right of last divider return arr end --[[=============================================================================================== The PGF/TikZ output routines ]]--=============================================================================================== pgf.transform_xcoord = function(coord) return (coord+gfx.origin_xoffset)*gfx.scalex end pgf.transform_ycoord = function(coord) return (coord+gfx.origin_yoffset)*gfx.scaley end pgf.format_coord = function(xc, yc) return string.format("%.3f,%.3f", pgf.transform_xcoord(xc), pgf.transform_ycoord(yc)) end pgf.write_doc_begin = function(preamble) gp.write(gfx.format[gfx.opt.tex_format].docheader) gp.write(preamble) gp.write(gfx.format[gfx.opt.tex_format].begindocument) end pgf.write_doc_end = function() gp.write(gfx.format[gfx.opt.tex_format].enddocument) end pgf.write_graph_begin = function (font, noenv) local global_opt = "" -- unused if gfx.opt.full_doc then gp.write(gfx.format[gfx.opt.tex_format].beforetikzpicture) end if noenv then gp.write("%% ") -- comment out end gp.write(string.format("%s[gnuplot%s]\n", gfx.format[gfx.opt.tex_format].begintikzpicture, global_opt)) gp.write(string.format("%%%% generated with GNUPLOT %sp%s (%s; terminal rev. %s, script rev. %s)\n", term.gp_version, term.gp_patchlevel, _VERSION, string.sub(term.lua_term_revision,7,-3), pgf.REVISION)) if not gfx.opt.notimestamp then gp.write(string.format("%%%% %s\n", os.date())) end if font ~= "" then gp.write(string.format("\\tikzset{every node/.append style={font=%s}}\n", font)) end if gfx.opt.fontscale ~= nil then gp.write(string.format("\\tikzset{every node/.append style={scale=%.2f}}\n", gfx.opt.fontscale)) end if not gfx.opt.lines_dashed then gp.write("\\gpsolidlines\n") end if not gfx.opt.lines_colored then gp.write("\\gpmonochromelines\n") end if gfx.opt.bgcolor ~= nil then gp.write(string.format("\\gpsetbgcolor{%.3f,%.3f,%.3f}\n", gfx.opt.bgcolor[1], gfx.opt.bgcolor[2], gfx.opt.bgcolor[3])) end end pgf.write_graph_end = function(noenv) if noenv then gp.write("%% ") -- comment out end if gfx.opt.full_doc then gp.write(gfx.format[gfx.opt.tex_format].beforeendtikzpicture) end gp.write(gfx.format[gfx.opt.tex_format].endtikzpicture .. "\n") if gfx.opt.full_doc then gp.write(gfx.format[gfx.opt.tex_format].aftertikzpicture) end end pgf.draw_path = function(t) local use_plot = false local c_str = '--' -- is the current linetype in the list of plots? if #gfx.opt.plot_list > 0 then for k, v in pairs(gfx.opt.plot_list) do if gfx.linetype_idx_set == v then use_plot = true c_str = ' ' break end end end gp.write("\\draw[gp path] ") if use_plot then gp.write("plot["..pgf.styles.plotstyles[((gfx.linetype_idx_set) % #pgf.styles.plotstyles)+1][1].."] coordinates {") end gp.write("("..pgf.format_coord(t[1][1], t[1][2])..")") for i = 2,#t-1 do -- pretty printing if (i % 6) == 0 then gp.write("%\n ") end gp.write(c_str.."("..pgf.format_coord(t[i][1], t[i][2])..")") end if (#t % 6) == 0 then gp.write("%\n ") end -- check for a cyclic path if (t[1][1] == t[#t][1]) and (t[1][2] == t[#t][2]) and (not use_plot) then gp.write("--cycle") else gp.write(c_str.."("..pgf.format_coord(t[#t][1], t[#t][2])..")") end if use_plot then gp.write("}") end gp.write(";\n") end pgf.draw_arrow = function(t, direction, headstyle) gp.write("\\draw[gp path") if direction ~= '' then gp.write(","..direction) end if headstyle > 0 then gp.write(",gp arrow "..headstyle) end gp.write("]") gp.write("("..pgf.format_coord(t[1][1], t[1][2])..")") for i = 2,#t do if (i % 6) == 0 then gp.write("%\n ") end gp.write("--("..pgf.format_coord(t[i][1], t[i][2])..")") end gp.write(";\n") end pgf.draw_points = function(t, pm) gp.write("\\gppoint{"..pm.."}{") for i,v in ipairs(t) do gp.write("("..pgf.format_coord(v[1], v[2])..")") end gp.write("}\n") end pgf.set_linetype = function(linetype) gp.write("\\gpsetlinetype{"..linetype.."}\n") end pgf.set_color = function(color) gp.write("\\gpcolor{"..color.."}\n") end pgf.set_linewidth = function(width) gp.write(string.format("\\gpsetlinewidth{%.2f}\n", width)) end pgf.set_pointsize = function(size) gp.write(string.format("\\gpsetpointsize{%.2f}\n", 4*size)) end pgf.write_text_node = function(t, text, angle, justification, font) local node_options = justification if angle ~= 0 then node_options = node_options .. ",rotate=" .. angle end if font ~= '' then node_options = node_options .. ",font=" .. font end gp.write(string.format("\\node[%s] at (%s) {%s};\n", node_options, pgf.format_coord(t[1], t[2]), text)) end pgf.draw_fill = function(t, pattern, color, saturation, opacity) local fill_path = '' local fill_style = color if saturation < 100 then fill_style = fill_style .. ",color=.!"..saturation; end fill_path = fill_path .. '('..pgf.format_coord(t[1][1], t[1][2])..')' -- draw 2nd to n-1 corners for i = 2,#t-1 do if (i % 5) == 0 then -- pretty printing fill_path = fill_path .. "%\n " end fill_path = fill_path .. '--('..pgf.format_coord(t[i][1], t[i][2])..')' end if (#t % 5) == 0 then gp.write("%\n ") end -- draw last corner -- 'cycle' is just for the case that we want to draw a -- line around the filled area if (t[1][1] == t[#t][1]) and (t[1][2] == t[#t][2]) then -- cyclic fill_path = fill_path .. '--cycle' else fill_path = fill_path .. '--('..pgf.format_coord(t[#t][1], t[#t][2])..')--cycle' end if pattern == '' then -- solid fills -- fill_style = 'color='..color if opacity < 100 then fill_style = fill_style..string.format(",opacity=%.2f", opacity/100) else -- fill_style = "" -- color ? end else -- pattern fills fill_style = fill_style..','..pattern..',pattern color=.' end local out = '' if (pattern ~= '') and (opacity == 100) then -- have to fill bg for opaque patterns gp.write("\\def\\gpfillpath{"..fill_path.."}\n" .. "\\gpfill{color=gpbgfillcolor} \\gpfillpath;\n" .. "\\gpfill{"..fill_style.."} \\gpfillpath;\n") else gp.write("\\gpfill{"..fill_style.."} "..fill_path..";\n") end end pgf.load_image_file = function(ll, ur, xfile) gp.write(string.format("\\gploadimage{%.3f}{%.3f}{%.3f}{%.3f}{%s}\n", pgf.transform_xcoord(ll[1]), pgf.transform_ycoord(ll[2]), (pgf.transform_xcoord(ur[1]) - pgf.transform_xcoord(ll[1])), (pgf.transform_ycoord(ur[2]) - pgf.transform_ycoord(ll[2])), xfile)) end pgf.draw_raw_rgb_image = function(t, m, n, ll, ur, xfile) local gw = gp.write local sf = string.format local xs = sf("%.3f", pgf.transform_xcoord(ur[1]) - pgf.transform_xcoord(ll[1])) local ys = sf("%.3f", pgf.transform_ycoord(ur[2]) - pgf.transform_ycoord(ll[2])) gw("\\def\\gprawrgbimagedata{%\n ") for cnt = 1,#t do gw(sf("%02x%02x%02x", 255*t[cnt][1]+0.5, 255*t[cnt][2]+0.5, 255*t[cnt][3]+0.5)) if (cnt % 16) == 0 then gw("%\n ") end end gw("}%\n") gw("\\gprawimage{rgb}{"..sf("%.3f", pgf.transform_xcoord(ll[1])).."}" .."{"..sf("%.3f", pgf.transform_ycoord(ll[2])).."}" .."{"..m.."}{"..n.."}{"..xs.."}{"..ys.."}{\\gprawrgbimagedata}{"..xfile.."}\n") end pgf.draw_raw_cmyk_image = function(t, m, n, ll, ur, xfile) local gw = gp.write local sf = string.format local min = math.min local max = math.max local mf = math.floor local UCRBG = {1,1,1,1} -- default corrections local rgb2cmyk255 = function(r,g,b) local c = 1-r local m = 1-g local y = 1-b local k = min(c,m,y) c = mf(255*min(1, max(0, c - UCRBG[1]*k))+0.5) m = mf(255*min(1, max(0, m - UCRBG[2]*k))+0.5) y = mf(255*min(1, max(0, y - UCRBG[3]*k))+0.5) k = mf(255*min(1, max(0, UCRBG[4]*k))+0.5) return c,m,y,k end local xs = sf("%.3f", pgf.transform_xcoord(ur[1]) - pgf.transform_xcoord(ll[1])) local ys = sf("%.3f", pgf.transform_ycoord(ur[2]) - pgf.transform_ycoord(ll[2])) gw("\\def\\gprawcmykimagedata{%\n ") for cnt = 1,#t do gw(sf("%02x%02x%02x%02x", rgb2cmyk255(t[cnt][1],t[cnt][2],t[cnt][3]))) if (cnt % 12) == 0 then gw("%\n ") end end gw("}%\n") gw("\\gprawimage{cmyk}{"..sf("%.3f", pgf.transform_xcoord(ll[1])).."}" .."{"..sf("%.3f", pgf.transform_ycoord(ll[2])).."}" .."{"..m.."}{"..n.."}{"..xs.."}{"..ys.."}{\\gprawcmykimagedata}{"..xfile.."}\n") end pgf.write_clipbox_begin = function (ll, ur) gp.write(gfx.format[gfx.opt.tex_format].beginscope.."\n") gp.write(string.format("\\clip (%s) rectangle (%s);\n", pgf.format_coord(ll[1],ll[2]),pgf.format_coord(ur[1],ur[2]))) end pgf.write_clipbox_end = function() gp.write(gfx.format[gfx.opt.tex_format].endscope.."\n") end pgf.write_boundingbox = function(t, num) gp.write("%% coordinates of the plot area\n") gp.write("\\gpdefrectangularnode{gp plot "..num.."}{" ..string.format("\\pgfpoint{%.3fcm}{%.3fcm}", pgf.transform_xcoord(t.xleft), pgf.transform_ycoord(t.ybot)).."}{" ..string.format("\\pgfpoint{%.3fcm}{%.3fcm}", pgf.transform_xcoord(t.xright), pgf.transform_ycoord(t.ytop)).."}\n") end pgf.write_variables = function(t) gp.write("%% gnuplot variables\n") for k, v in pairs(t) do gp.write(string.format("\\gpsetvar{%s}{%s}\n",k,v)) end end -- write style to seperate file, or whatever... pgf.create_style = function() local name_common = pgf.STYLE_FILE_BASENAME.."-common.tex" local name_latex = pgf.STYLE_FILE_BASENAME..".sty" local name_tex = pgf.STYLE_FILE_BASENAME..".tex" local name_context = "t-"..pgf.STYLE_FILE_BASENAME..".tex" -- LaTeX local f_latex = io.open(name_latex, "w+") f_latex:write([[ %% %% LaTeX wrapper for gnuplot-tikz style file %% \NeedsTeXFormat{LaTeX2e} ]]) f_latex:write("\\ProvidesPackage{"..pgf.STYLE_FILE_BASENAME.."}%\n") f_latex:write(" ["..pgf.REVISION_DATE.." (rev. "..pgf.REVISION..") GNUPLOT Lua terminal style]\n\n") f_latex:write([[ \RequirePackage{tikz} \usetikzlibrary{arrows,patterns,plotmarks,backgrounds} ]]) f_latex:write("\\input "..name_common.."\n") f_latex:write([[ \endinput ]]) f_latex:close() -- ConTeXt local f_context = io.open(name_context, "w+") f_context:write([[ %% %% ConTeXt wrapper for gnuplot-tikz style file %% \usemodule[tikz] \usetikzlibrary[arrows,patterns,plotmarks,backgrounds] \edef\tikzatcode{\the\catcode`\@} \edef\tikzbarcode{\the\catcode`\|} \edef\tikzexclaimcode{\the\catcode`\!} \catcode`\@=11 \catcode`\|=12 \catcode`\!=12 ]]) f_context:write("\\input "..name_common.."\n") f_context:write([[ \catcode`\@=\tikzatcode \catcode`\|=\tikzbarcode \catcode`\!=\tikzexclaimcode \endinput ]]) f_context:close() -- plain TeX local f_tex = io.open(name_tex, "w+") f_tex:write([[ %% %% plain TeX wrapper for gnuplot-tikz style file %% \input tikz.tex \usetikzlibrary{arrows,patterns,plotmarks,backgrounds} \edef\tikzatcode{\the\catcode`\@} \catcode`\@=11 ]]) f_tex:write("\\input "..name_common.."\n\n") f_tex:write([[ \catcode`\@=\tikzatcode \endinput ]]) f_tex:close() -- common local f = io.open(name_common, "w+") f:write([[ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Common style file for TeX, LaTeX and ConTeXt %% %% It is associated with the 'gnuplot.lua' script, and usually generated %% automatically. So take care whenever you make any changes! %% % check for the correct TikZ version \def\gpchecktikzversion#1.#2\relax{% \ifnum#1<2% \PackageError{gnuplot-lua-tikz}{PGF/TikZ version >= 2.0 is required, but version \pgfversion\space was found}{}% \fi} \expandafter\gpchecktikzversion\pgfversion\relax % FIXME: is there a more elegant way to determine the output format? \def\pgfsysdriver@a{pgfsys-dvi.def} % ps \def\pgfsysdriver@b{pgfsys-dvipdfm.def} % pdf \def\pgfsysdriver@c{pgfsys-dvipdfmx.def} % pdf \def\pgfsysdriver@d{pgfsys-dvips.def} % ps \def\pgfsysdriver@e{pgfsys-pdftex.def} % pdf \def\pgfsysdriver@f{pgfsys-tex4ht.def} % html \def\pgfsysdriver@g{pgfsys-textures.def} % ps \def\pgfsysdriver@h{pgfsys-vtex.def} % ps \def\pgfsysdriver@i{pgfsys-xetex.def} % pdf \newif\ifgppdfout\gppdfoutfalse \newif\ifgppsout\gppsoutfalse \ifx\pgfsysdriver\pgfsysdriver@a \gppsouttrue \else\ifx\pgfsysdriver\pgfsysdriver@b \gppdfouttrue \else\ifx\pgfsysdriver\pgfsysdriver@c \gppdfouttrue \else\ifx\pgfsysdriver\pgfsysdriver@d \gppsouttrue \else\ifx\pgfsysdriver\pgfsysdriver@e \gppdfouttrue \else\ifx\pgfsysdriver\pgfsysdriver@f % tex4ht \else\ifx\pgfsysdriver\pgfsysdriver@g \gppsouttrue \else\ifx\pgfsysdriver\pgfsysdriver@h \gppsouttrue \else\ifx\pgfsysdriver\pgfsysdriver@i \gppdfouttrue \fi\fi\fi\fi\fi\fi\fi\fi\fi % uncomment the following lines to make font values "appendable" % and if you are really sure about that ;-) % \pgfkeyslet{/tikz/font/.@cmd}{\undefined} % \tikzset{font/.initial={}} % \def\tikz@textfont{\pgfkeysvalueof{/tikz/font}} % % image related stuff % \def\gp@rawimage@pdf#1#2#3#4#5#6{% \def\gp@tempa{cmyk}% \def\gp@tempb{#1}% \ifx\gp@tempa\gp@tempb% \def\gp@temp{/CMYK}% \else% \def\gp@temp{/RGB}% \fi% \pgf@sys@bp{#4}\pgfsysprotocol@literalbuffered{0 0}\pgf@sys@bp{#5}% \pgfsysprotocol@literalbuffered{0 0 cm}% \pgfsysprotocol@literalbuffered{BI /W #2 /H #3 /CS \gp@temp}% \pgfsysprotocol@literalbuffered{/BPC 8 /F /AHx ID}% \pgfsysprotocol@literal{#6 > EI}% } \def\gp@rawimage@ps#1#2#3#4#5#6{% \def\gp@tempa{cmyk}% \def\gp@tempb{#1}% \ifx\gp@tempa\gp@tempb% \def\gp@temp{4}% \else% \def\gp@temp{3}% \fi% \pgfsysprotocol@literalbuffered{0 0 translate}% \pgf@sys@bp{#4}\pgf@sys@bp{#5}\pgfsysprotocol@literalbuffered{scale}% \pgfsysprotocol@literalbuffered{#2 #3 8 [#2 0 0 -#3 0 #3]}% \pgfsysprotocol@literalbuffered{currentfile /ASCIIHexDecode filter}% \pgfsysprotocol@literalbuffered{false \gp@temp\space colorimage}% \pgfsysprotocol@literal{#6 >}% } \def\gp@rawimage@html#1#2#3#4#5#6{% % FIXME: print a warning message here } \ifgppdfout \def\gp@rawimage{\gp@rawimage@pdf} \else \ifgppsout \def\gp@rawimage{\gp@rawimage@ps} \else \def\gp@rawimage{\gp@rawimage@html} \fi \fi \def\gploadimage#1#2#3#4#5{% \pgftext[left,bottom,x=#1cm,y=#2cm] {\pgfimage[interpolate=false,width=#3cm,height=#4cm]{#5}};% } \def\gp@set@size#1{% \def\gp@image@size{#1}% } \def\gp@rawimage@#1#2#3#4#5#6#7#8{ \tikz@scan@one@point\gp@set@size(#6,#7)\relax% \tikz@scan@one@point\pgftransformshift(#2,#3)\relax% \pgftext {% \pgfsys@beginpurepicture% \gp@image@size% fill \pgf@x and \pgf@y \gp@rawimage{#1}{#4}{#5}{\pgf@x}{\pgf@y}{#8}% \pgfsys@endpurepicture% }% } %% \gprawimage{color model}{xcoord}{ycoord}{# of xpixel}{# of ypixel}{xsize}{ysize}{rgb/cmyk hex data RRGGBB/CCMMYYKK ...}{file name} %% color model is 'cmyk' or 'rgb' (default) \def\gprawimage#1#2#3#4#5#6#7#8#9{% \ifx &% \gp@rawimage@{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8} \else \ifgppsout \gp@rawimage@{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8} \else \gploadimage{#2}{#3}{#6}{#7}{#9} \fi \fi } % % gnuplottex comapatibility % (see http://www.ctan.org/tex-archive/help/Catalogue/entries/gnuplottex.html) % \def\gnuplottexextension@lua{\string tex} \def\gnuplottexextension@tikz{\string tex} % % gnuplot variables getter and setter % \def\gpsetvar#1#2{% \expandafter\xdef\csname gp@var@#1\endcsname{#2} } \def\gpgetvar#1{% \csname gp@var@#1\endcsname % } % % some wrapper code % % short for a filled path \def\gpfill#1{\path[line width=0.1\gpbaselw,draw,fill,#1]} % short for changing the line width \def\gpsetlinewidth#1{\pgfsetlinewidth{#1\gpbaselw}} % short for changing the line type \def\gpsetlinetype#1{\tikzset{gp path/.style={#1,#1 add}}} % short for changing the point size \def\gpsetpointsize#1{\tikzset{gp point/.style={mark size=#1\gpbasems}}} % wrapper for color settings \def\gpcolor#1{\tikzset{global #1}} \tikzset{rgb color/.code={\pgfutil@definecolor{.}{rgb}{#1}\tikzset{color=.}}} \tikzset{global rgb color/.code={\pgfutil@definecolor{.}{rgb}{#1}\pgfutil@color{.}}} \tikzset{global color/.code={\pgfutil@color{#1}}} % prevent plot mark distortions due to changes in the PGF transformation matrix % use `\gpscalepointstrue' and `\gpscalepointsfalse' for enabling and disabling % point scaling % \newif\ifgpscalepoints \tikzset{gp shift only/.style={% \ifgpscalepoints\else shift only\fi% }} \def\gppoint#1#2{% \path[solid] plot[only marks,gp point,mark options={gp shift only},#1] coordinates {#2};% } % % char size calculation, that might be used with gnuplottex % % Example code (needs gnuplottex.sty): % % % calculate the char size when the "gnuplot" style is used % \tikzset{gnuplot/.append style={execute at begin picture=\gpcalccharsize}} % % \tikzset{gnuplot/.append style={font=\ttfamily\footnotesize}} % % \begin{tikzpicture}[gnuplot] % \begin{gnuplot}[terminal=lua,% % terminaloptions={tikz solid nopic charsize \the\gphcharsize,\the\gpvcharsize}] % test % \end{gnuplot} % \end{tikzpicture} % %%% % The `\gpcalccharsize' command fills the lengths \gpvcharsize and \gphcharsize with % the values of the current default font used within nodes and is meant to be called % within a tikzpicture environment. % \newdimen\gpvcharsize \newdimen\gphcharsize \def\gpcalccharsize{% \pgfinterruptboundingbox% \pgfsys@begininvisible% \node at (0,0) {% \global\gphcharsize=1.05\fontcharwd\font`0% \global\gpvcharsize=1.05\fontcharht\font`0% \global\advance\gpvcharsize by 1.05\fontchardp\font`g% };% \pgfsys@endinvisible% \endpgfinterruptboundingbox% } % % define a rectangular node in tikz e.g. for the plot area % % #1 node name % #2 coordinate of "south west" % #3 coordinate of "north east" % \def\gpdefrectangularnode#1#2#3{% \expandafter\gdef\csname pgf@sh@ns@#1\endcsname{rectangle} \expandafter\gdef\csname pgf@sh@np@#1\endcsname{% \def\southwest{#2}% \def\northeast{#3}% } \pgfgettransform\pgf@temp% % once it is defined, no more transformations will be applied, I hope \expandafter\xdef\csname pgf@sh@nt@#1\endcsname{\pgf@temp}% \expandafter\xdef\csname pgf@sh@pi@#1\endcsname{\pgfpictureid}% } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% You may want to adapt the following to fit your needs (in your %% individual style file and/or within your document). %% % % style for every plot % \tikzset{gnuplot/.style={% >=stealth',% line cap=round,% line join=round,% }} \tikzset{gp node left/.style={anchor=mid west,yshift=-.12ex}} \tikzset{gp node center/.style={anchor=mid,yshift=-.12ex}} \tikzset{gp node right/.style={anchor=mid east,yshift=-.12ex}} % basic plot mark size (points) \newdimen\gpbasems \gpbasems=.4pt % basic linewidth \newdimen\gpbaselw \gpbaselw=.4pt % this is the default color for pattern backgrounds \colorlet{gpbgfillcolor}{white} % set background color and fill color \def\gpsetbgcolor#1{% \pgfutil@definecolor{gpbgfillcolor}{rgb}{#1}% \tikzset{tight background,background rectangle/.style={fill=gpbgfillcolor},show background rectangle}% } % this should reverse the normal text node presets, for the % later referencing as described below \tikzset{gp refnode/.style={coordinate,yshift=.12ex}} % to add an empty label with the referenceable name "my node" % to the plot, just add the following line to your gnuplot % file: % % set label "" at 1,1 font ",gp refnode,name=my node" % % enlargement of the bounding box in standalone mode (only used by LaTeX/ConTeXt) \def\gpbboxborder{0mm} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% The following TikZ-styles are derived from the 'pgf.styles.*' tables %% in the Lua script. %% To change the number of used styles you should change them there and %% regenerate this style file. %% ]]) f:write("% arrow styles settings\n") for i = 1, #pgf.styles.arrows do f:write("\\tikzset{"..pgf.styles.arrows[i][1].."/.style={"..pgf.styles.arrows[i][2].."}}\n") end f:write("\n% plotmark settings\n") for i = 1, #pgf.styles.plotmarks do f:write("\\tikzset{"..pgf.styles.plotmarks[i][1].."/.style={"..pgf.styles.plotmarks[i][2].."}}\n") end f:write("\n% pattern settings\n") for i = 1, #pgf.styles.patterns do f:write("\\tikzset{"..pgf.styles.patterns[i][1].."/.style={"..pgf.styles.patterns[i][2].."}}\n") end f:write("\n% if the 'tikzplot' option is used the corresponding lines will be smoothed by default\n") for i = 1, #pgf.styles.plotstyles_axes do f:write("\\tikzset{"..pgf.styles.plotstyles_axes[i][1].."/.style="..pgf.styles.plotstyles_axes[i][2].."}\n") end for i = 1, #pgf.styles.plotstyles do f:write("\\tikzset{"..pgf.styles.plotstyles[i][1].."/.style="..pgf.styles.plotstyles[i][2].."}\n") end -- line styles for borders etc ... f:write("\n% linestyle settings\n") for i = 1, #pgf.styles.linetypes_axes do f:write("\\tikzset{"..pgf.styles.linetypes_axes[i][1].."/.style="..pgf.styles.linetypes_axes[i][2].."}\n") end f:write("\n% linestyle \"addon\" settings for overwriting a default linestyle within the\n") f:write("% TeX document via eg. \\tikzset{gp lt plot 1 add/.style={fill=black,draw=none}} etc.\n") for i = 1, #pgf.styles.linetypes_axes do f:write("\\tikzset{"..pgf.styles.linetypes_axes[i][1].." add/.style={}}\n") end for i = 1, #pgf.styles.linetypes do f:write("\\tikzset{"..pgf.styles.linetypes[i][1].." add/.style={}}\n") end f:write("\n% linestyle color settings\n") for i = 1, #pgf.styles.lt_colors_axes do f:write("\\colorlet{"..pgf.styles.lt_colors_axes[i][1].."}{"..pgf.styles.lt_colors_axes[i][2].."}\n") end -- line styles for the plots f:write("\n% command for switching to dashed lines\n") f:write("\\def\\gpdashedlines{%\n") for i = 1, #pgf.styles.linetypes do f:write(" \\tikzset{"..pgf.styles.linetypes[i][1].."/.style={"..pgf.styles.linetypes[i][2].."}}\n") end f:write("}\n") f:write("\n% command for switching to colored lines\n") f:write("\\def\\gpcoloredlines{%\n") for i = 1, #pgf.styles.lt_colors do f:write(" \\colorlet{"..pgf.styles.lt_colors[i][1].."}{"..pgf.styles.lt_colors[i][2].."}%\n") end f:write("}\n") f:write("\n% command for switching to solid lines\n") f:write("\\def\\gpsolidlines{%\n") for i = 1, #pgf.styles.linetypes do f:write(" \\tikzset{"..pgf.styles.linetypes[i][1].."/.style=solid}%\n") end f:write("}\n") f:write("\n% command for switching to monochrome (black) lines\n") f:write("\\def\\gpmonochromelines{%\n") for i = 1, #pgf.styles.lt_colors do f:write(" \\colorlet{"..pgf.styles.lt_colors[i][1].."}{black}%\n") end f:write("}\n\n") f:write([[ % % some initialisations % % by default all lines will be colored and dashed \gpcoloredlines \gpdashedlines \gpsetpointsize{4} \gpsetlinetype{gp lt solid} \gpscalepointsfalse \endinput ]]) f:close() end pgf.print_help = function(fwrite) fwrite([[ {latex | tex | context} {color | monochrome} {dashed | solid} {nooriginreset | originreset} {nogparrows | gparrows} {nogppoints | gppoints} {picenvironment | nopicenvironment} {noclip | clip} {notightboundingbox | tightboundingbox} {background "<colorpec>"} {size <x>{unit},<y>{unit}} {scale <x>,<y>} {plotsize <x>{unit},<y>{unit}} {charsize <x>{unit},<y>{unit}} {font "<fontdesc>"} {{fontscale | textscale} <scale>} {nofulldoc | nostandalone | fulldoc | standalone} {{preamble | header} "<preamble_string>"} {tikzplot <ltn>,...} {notikzarrows | tikzarrows} {rgbimages | cmykimages} {noexternalimages|externalimages} {bitmap | nobitmap} {providevars <var name>,...} {createstyle} {help} For all options that expect lengths as their arguments they will default to 'cm' if no unit is specified. For all lengths the following units may be used: 'cm', 'mm', 'in' or 'inch', 'pt', 'pc', 'bp', 'dd', 'cc'. Blanks between numbers and units are not allowed. 'monochrome' disables line coloring and switches to grayscaled fills. 'solid' use only solid lines. 'originreset' moves the origin of the TikZ picture to the lower left corner of the plot. It may be used to align several plots within one tikzpicture environment. This is not tested with multiplots and pm3d plots! 'gparrows' use gnuplot's internal arrow drawing function instead of the ones provided by TikZ. 'gppoints' use gnuplot's internal plotmark drawing function instead of the ones provided by TikZ. 'nopicenvironment' omits the declaration of the 'tikzpicture' environment in order to set it manually. This permits putting some PGF/TikZ code directly before or after the plot. 'clip' crops the plot at the defined canvas size. Default is 'noclip' by which only a minimum bounding box of the canvas size is set. Neither a fixed bounding box nor a crop box is set if the 'plotsize' or 'tightboundingbox' option is used. If 'tightboundingbox' is set the 'clip' option is ignored and the final bounding box is the natural bounding box calculated by tikz. 'background' sets the background color to the value specified in the <colorpec> argument. <colorspec> must be a valid color name or a 3 byte RGB code as a hexadecimal number with a preceding number sign ('#'). E.g. '#ff0000' specifies pure red. If omitted the background is transparent. The 'size' option expects two lenghts <x> and <y> as the canvas size. The default size of the canvas is ]]..pgf.DEFAULT_CANVAS_SIZE_X..[[cm x ]]..pgf.DEFAULT_CANVAS_SIZE_Y..[[cm. The 'scale' option works similar to the 'size' option but expects scaling factors <x> and <y> instead of lengths. The 'plotsize' option permits setting the size of the plot area instead of the canvas size, which is the usual gnuplot behaviour. Using this option may lead to slightly asymmetric tic lengths. Like 'originreset' this option may not lead to convenient results if used with multiplots or pm3d plots. An alternative approach is to set all margins to zero and to use the 'noclip' option. The plot area has then the dimensions of the given canvas sizes. The 'charsize' option expects the average horizontal and vertical size of the used font. Look at the generated style file for an example of how to use it from within your TeX document. 'fontscale' or 'textscale' expects a scaling factor as a parameter. All texts in the plot are scaled by this factor then. The options 'tex', 'latex' and 'context' choose the TeX output format. LaTeX is the default. To load the style file put the according line at the beginning of your document: \input ]]..pgf.STYLE_FILE_BASENAME..[[.tex % (for plain TeX) \usepackage{]]..pgf.STYLE_FILE_BASENAME..[[} % (for LaTeX) \usemodule[]]..pgf.STYLE_FILE_BASENAME..[[] % (for ConTeXt) 'createstyle' derives the TeX/LaTeX/ConTeXt styles from the script and writes them to the appropriate files. 'fulldoc' or 'standalone' produces a full LaTeX document for direct compilation. 'preamble' or 'header' may be used to put any additional LaTeX code into the document preamble in standalone mode. With the 'tikzplot' option the '\path plot' command will be used instead of only '\path'. The following list of numbers of linetypes (<ltn>,...) defines the affected plotlines. There exists a plotstyle for every linetype. The default plotstyle is 'smooth' for every linetype >= 1. By using the 'tikzarrows' option the gnuplot arrow styles defined by the user will be mapped to TikZ arrow styles. This is done by 'misusing' the angle value of the arrow definition. E.g. an arrow style with the angle '7' will be mapped to the TikZ style 'gp arrow 7' ignoring all the other given values. By default the TikZ terminal uses the stealth' arrow tips for all arrows. To obtain the default gnuplot behaviour please use the 'gparrows' option. With 'cmykimages' the CMYK color model will be used for inline image data instead of the RGB model. All other colors (like line colors etc.) are not affected by this option, since they are handled e.g. by LaTeX's xcolor package. This option is ignored if images are externalized. By using the 'externalimages' option all bitmap images will be written as external PNG images and included at compile time of the document. Generating DVI and later postscript files requires to convert the PNGs into EPS files in a seperate step e.g. by using ImageMagick's `convert`. Transparent bitmap images are always generated as an external PNGs. The 'nobitmap' option let images be rendered as filled rectangles instead of the nativ PS or PDF inline image format. This option is ignored if images are externalized. The 'providevars' options makes gnuplot's internal and user variables available by using the '\gpgetvar{<var name>}' commmand within the TeX script. Use gnuplot's 'show variables all' command to see the list of valid variables. The <fontdesc> string may contain any valid TeX/LaTeX/ConTeXt font commands like e.g. '\small'. It is passed directly as a node parameter in form of "font={<fontdesc>}". This can be 'misused' to add further code to a node, e.g. '\small,yshift=1ex' or ',yshift=1ex' are also valid while the latter does not change the current font settings. One exception is the second argument of the list. If it is a number of the form <number>{unit} it will be interpreted as a fontsize like in other terminals and will be appended to the first argument. If the unit is omitted the value is interpreted as 'pt'. As an example the string '\sffamily,12,fill=red' sets the font to LaTeX's sans serif font at a size of 12pt and red background color. The same applies to ConTeXt, e.g. '\switchtobodyfont[iwona],10' changes the font to Iwona at a size of 10pt. Plain TeX users have to change the font size explicitly within the first argument. The second should be set to the same value to get proper scaling of text boxes. Strings have to be put in single or double quotes. Double quoted strings may contain special characters like newlines '\n' etc. ]]) end --[[=============================================================================================== gfx.* helper functions Main intention is to prevent redundancies in the drawing operations and keep the pgf.* API as consistent as possible. ]]--=============================================================================================== -- path coordinates gfx.path = {} gfx.posx = nil gfx.posy = nil gfx.linetype_idx = nil -- current linetype intended for the plot gfx.linetype_idx_set = nil -- current linetype set in the plot gfx.linewidth = nil gfx.linewidth_set = nil -- internal calculated scaling factors gfx.scalex = 1 gfx.scaley = 1 -- recalculate the origin of the plot -- used for moving the origin to the lower left -- corner... gfx.origin_xoffset = 0 gfx.origin_yoffset = 0 -- color set in the document gfx.color = '' gfx.color_set = '' gfx.pointsize = nil gfx.pointsize_set = nil gfx.text_font = '' gfx.text_justify = "center" gfx.text_angle = 0 -- option vars gfx.opt = { latex_preamble = '', default_font = '', lines_dashed = true, lines_colored = true, -- use gnuplot arrows or points instead of TikZ? gp_arrows = false, gp_points = false, -- don't put graphic commands into a tikzpicture environment nopicenv = false, -- produce full LaTeX document? full_doc = false, -- in gnuplot all sizes refer to the size of the canvas -- and not the size of plot itself plotsize_x = nil, plotsize_y = nil, set_plotsize = false, -- recalculate the origin of the plot -- used for moving the origin to the lower left -- corner... set_origin = false, -- list of _linetypes_ of plots that should be drawn as with the \plot -- command instead of \path plot_list = {}, -- uses some pdf/ps specials with image function that will only work -- with pdf/ps generation! direct_image = true, -- list of gnuplot variables that should be made available via -- \gpsetvar{name}{val} gnuplot_vars = {}, -- if true, the gnuplot arrow will be mapped to TikZ arrow styles by the -- given angle. E.g. an arrow with the angle `7' will be mapped to `gp arrow 7' -- style. tikzarrows = false, -- if true, cmyk image model will be used for bitmap images cmykimage = false, -- output TeX flavor, default is LaTeX tex_format = 'latex', -- for regression tests etc. we can turn off the timestamp notimestamp = false, -- background color, contains RGB triplet when set bgcolor = nil, -- crop to the given canvas size clip = false, -- if true, the natural bounding box will be used and 'clip' is ignored tightboundingbox = false, -- fontscale fontscale = nil } -- Formats for the various TeX flavors gfx.format = {} gfx.format.tex = { docheader = "\\input "..pgf.STYLE_FILE_BASENAME..".tex\n", begindocument = "", enddocument = "\\bye\n", beforetikzpicture= "", -- standalone only aftertikzpicture = "", -- standalone only begintikzpicture = "\\tikzpicture", endtikzpicture = "\\endtikzpicture", beginscope = "\\scope", endscope = "\\endscope", beforeendtikzpicture = "", -- standalone only fontsize = "" } gfx.format.latex = { docheader = "\\documentclass["..pgf.DEFAULT_FONT_SIZE.."pt]{article}\n" .."\\usepackage[T1]{fontenc}\n" .."\\usepackage{textcomp}\n\n" .."\\usepackage[utf8x]{inputenc}\n\n" .."\\usepackage{"..pgf.STYLE_FILE_BASENAME.."}\n" .."\\pagestyle{empty}\n" .."\\usepackage[active,tightpage]{preview}\n" .."\\PreviewEnvironment{tikzpicture}\n" .."\\setlength\\PreviewBorder{\\gpbboxborder}\n", begindocument = "\\begin{document}\n", enddocument = "\\end{document}\n", beforetikzpicture= "", -- standalone only aftertikzpicture = "", -- standalone only begintikzpicture = "\\begin{tikzpicture}", endtikzpicture = "\\end{tikzpicture}", beginscope = "\\begin{scope}", endscope = "\\end{scope}", beforeendtikzpicture = "", -- standalone only fontsize = "\\fontsize{%spt}{%spt}\\selectfont" } gfx.format.context = { docheader = "\\usemodule["..pgf.STYLE_FILE_BASENAME.."]\n", begindocument = "\\starttext\n", enddocument = "\\stoptext\n", beforetikzpicture= "\\startTEXpage\n", -- standalone only aftertikzpicture = "\\stopTEXpage\n", -- standalone only begintikzpicture = "\\starttikzpicture", endtikzpicture = "\\stoptikzpicture", beginscope = "\\startscope", endscope = "\\stopscope", beforeendtikzpicture = "\\path[use as bounding box] ([shift={(-\\gpbboxborder,-\\gpbboxborder)}]current bounding box.south west)" .." rectangle ([shift={(\\gpbboxborder,\\gpbboxborder)}]current bounding box.north east);\n", -- standalone only fontsize = "\\switchtobodyfont[%spt]" } -- within tikzpicture environment or not gfx.in_picture = false -- have not determined the plotbox, see the 'plotsize' option gfx.have_plotbox = false gfx.current_boundingbox = { xleft = nil, xright = nil, ytop = nil, ybot = nil } -- plot bounding boxes counter gfx.boundingbox_cnt = 0 gfx.TEXT_ANCHOR = { ["left"] = "gp node left", ["center"] = "gp node center", ["right"] = "gp node right" } gfx.HEAD_STR = {"", "->", "<-", "<->"} -- conversion factors in `cm' gfx.units = { [''] = 1, -- default ['cm'] = 1, ['mm'] = 0.1, ['in'] = 2.54, ['inch']= 2.54, ['pt'] = 0.035146, -- Pica Point (72.27pt = 1in) ['pc'] = 0.42176, -- Pica (1 Pica = 1/6 inch) ['bp'] = 0.035278, -- Big Point (72bp = 1in) ['dd'] = 0.0376, -- Didot Point (1cm = 26.6dd) ['cc'] = 0.45113 -- Cicero (1cc = 12 dd) } gfx.parse_number_unit = function (str, from, to) to = to or 'cm' from = from or 'cm' local num, unit = string.match(str, '^([%d%.]+)([a-z]*)$') if unit and (string.len(unit) > 0) then from = unit else unit = false end local factor_from = gfx.units[from] local factor_to = gfx.units[to] num = tonumber(num) if num and factor_from then -- to cm and then to our target unit return num*(factor_from/factor_to), unit else return false, false end end gfx.parse_font_string = function (str) local size,rets,toks = nil, str, explode(',', str) -- if at least two tokens if #toks > 1 then -- add first element to font string rets = table.remove(toks,1) -- no unit means 'pt' size, _ = gfx.parse_number_unit(toks[1],'pt','pt') if (size) then table.remove(toks,1) rets = rets .. string.format(gfx.format[gfx.opt.tex_format].fontsize,size,size*1.2) end -- add grouping braces for the font settings if #rets > 0 then rets = "{" .. rets .. "}" end -- add remaining parts for k,v in ipairs(toks) do rets = rets .. ',' .. v end else if #rets > 0 then rets = "{" .. rets .. "}" end end return rets, size end gfx.write_boundingbox = function() local t = gp.get_boundingbox() for k, v in pairs (t) do if v ~= gfx.current_boundingbox[k] then gfx.boundingbox_cnt = gfx.boundingbox_cnt + 1 gfx.current_boundingbox = t pgf.write_boundingbox(t, gfx.boundingbox_cnt) break end end end gfx.adjust_plotbox = function() local t = gp.get_boundingbox() if gfx.opt.set_origin then -- move origin to the lower left corner of the plot gfx.origin_xoffset = - t.xleft gfx.origin_yoffset = - t.ybot end if gfx.opt.set_plotsize then if (t.xright - t.xleft) > 0 then gfx.scalex = gfx.scalex*gfx.opt.plotsize_x * pgf.DEFAULT_RESOLUTION/(t.xright - t.xleft) gfx.scaley = gfx.scaley*gfx.opt.plotsize_y * pgf.DEFAULT_RESOLUTION/(t.ytop - t.ybot) else -- could not determin a valid bounding box, so keep using the -- plotsize as the canvas size gp.term_out("WARNING: PGF/TikZ Terminal: `plotsize' option used, but I could not determin the plot area!\n") end elseif not gfx.opt.tightboundingbox then if gfx.opt.clip then gp.write("\\clip") else gp.write("\\path") end gp.write(" (" .. pgf.format_coord(0,0) ..") rectangle (" .. pgf.format_coord(term.xmax, term.ymax) .. ");\n") end end gfx.check_variables = function() local vl = gfx.opt.gnuplot_vars local t = gp.get_all_variables() local sl = {} for i=1,#vl do if t[vl[i]] then sl[vl[i]] = t[vl[i]][3] if t[vl[i]][4] then sl[vl[i].." Im"] = t[vl[i]][4] end end end pgf.write_variables(sl) end -- check if the current path should be drawn gfx.check_in_path = function() -- also check the bounding box here -- bounding box data is available with the first drawing command if (not gfx.have_plotbox) and gfx.in_picture then gfx.adjust_plotbox() gfx.have_plotbox = true end -- ignore zero length paths if #gfx.path > 1 then -- check all line properties and draw current path gfx.check_color() gfx.check_linetype() gfx.check_linewidth() pgf.draw_path(gfx.path) -- remember last coordinates gfx.start_path(gfx.path[#gfx.path][1], gfx.path[#gfx.path][2]) end end -- did the linetype change? gfx.check_linetype = function() if gfx.linetype_idx ~= gfx.linetype_idx_set then local lt if gfx.linetype_idx < 0 then lt = pgf.styles.linetypes_axes[math.abs(gfx.linetype_idx)][1] else lt = pgf.styles.linetypes[(gfx.linetype_idx % #pgf.styles.linetypes)+1][1] end pgf.set_linetype(lt) gfx.linetype_idx_set = gfx.linetype_idx end end -- did the color change? gfx.check_color = function() if gfx.color_set ~= gfx.color then pgf.set_color(gfx.color) gfx.color_set = gfx.color end end -- sanity check if we already are at this position in our path -- and save this position gfx.check_coord = function(x, y) if (x == gfx.posx) and (y == gfx.posy) then return true end gfx.posx = x gfx.posy = y return false end -- did the linewidth change? gfx.check_linewidth = function() if gfx.linewidth ~= gfx.linewidth_set then pgf.set_linewidth(gfx.linewidth) gfx.linewidth_set = gfx.linewidth end end -- did the pointsize change? gfx.check_pointsize = function() if gfx.pointsize ~= gfx.pointsize_set then pgf.set_pointsize(gfx.pointsize) gfx.pointsize_set = gfx.pointsize end end gfx.start_path = function(x, y) -- init path with first coords gfx.path = {{x,y}} gfx.posx = x gfx.posy = y end -- ctype string LT|RGB|GRAY -- val table {name}|{r,g,b} gfx.format_color = function(ctype, val) local c if ctype == 'LT' then if val[1] < 0 then if val[1] < -2 then -- LT_NODRAW, LT_BACKGROUND, LT_UNDEFINED c = 'color=gpbgfillcolor' else c = 'color='..pgf.styles.lt_colors_axes[math.abs(val[1])][1] end else c = 'color='..pgf.styles.lt_colors[(val[1] % #pgf.styles.lt_colors)+1][1] end -- c = pgf.styles.lt_colors[((val[1]+3) % #pgf.styles.lt_colors) + 1][1] elseif ctype == 'RGB' then c = string.format("rgb color={%.3f,%.3f,%.3f}", val[1], val[2], val[3]) elseif ctype == 'RGBA' then c = string.format("rgb color={%.3f,%.3f,%.3f},opacity=%.3f", val[1], val[2], val[3], val[4]) elseif ctype == 'GRAY' then c = string.format("color=black!%i", 100*val[1]+0.5) end return c end gfx.set_color = function(ctype, val) gfx.color = gfx.format_color(ctype, val) end --[[=============================================================================================== The terminal layer The term.* functions are usually called from the gnuplot Lua terminal ]]--=============================================================================================== if arg then -- when called from the command line we have -- to initialize the table `term' manually -- to avoid errors term = {} else -- -- gnuplot terminal default parameters and flags -- term.xmax = pgf.DEFAULT_RESOLUTION * pgf.DEFAULT_CANVAS_SIZE_X term.ymax = pgf.DEFAULT_RESOLUTION * pgf.DEFAULT_CANVAS_SIZE_Y term.h_tic = pgf.DEFAULT_RESOLUTION * pgf.DEFAULT_TIC_SIZE term.v_tic = pgf.DEFAULT_RESOLUTION * pgf.DEFAULT_TIC_SIZE -- default size for CM@10pt term.h_char = math.floor(pgf.DEFAULT_FONT_H_CHAR * (pgf.DEFAULT_FONT_SIZE/10) * (pgf.DEFAULT_RESOLUTION/1000) + .5) term.v_char = math.floor(pgf.DEFAULT_FONT_V_CHAR * (pgf.DEFAULT_FONT_SIZE/10) * (pgf.DEFAULT_RESOLUTION/1000) + .5) term.description = "Lua PGF/TikZ terminal for TeX and friends" term_default_flags = term.TERM_BINARY + term.TERM_CAN_MULTIPLOT + term.TERM_CAN_DASH + term.TERM_ALPHA_CHANNEL + term.TERM_LINEWIDTH + term.TERM_IS_LATEX + term.TERM_FONTSCALE term.flags = term_default_flags + term.TERM_CAN_CLIP end -- -- initial = 1 for the initial "set term" call -- 0 for subsequent option changes -- currently unused, since the changeable options -- are hardcoded within gnuplot :-( -- -- t_count see e.g. int_error() -- term.options = function(opt_str, initial, t_count) local o_next = "" local o_type = nil local s_start, s_end = 1, 1 local term_opt = "" local term_opt_font, term_opt_size, term_opt_background, term_opt_fontscale, term_opt_scale, term_opt_preamble = "", "", "", "", "", "" local charsize_h, charsize_v, fontsize, fontscale = nil, nil, nil, nil -- trim spaces opt_str = opt_str:gsub("^%s*(.-)%s*$", "%1") local opt_len = string.len(opt_str) t_count = t_count - 1 local set_t_count = function(num) -- gnuplot handles commas as regular tokens t_count = t_count + 2*num - 2 end local almost_equals = function(param, opt) local op1, op2 local st, _ = string.find(opt, "$", 2, true) if st then op1 = string.sub(opt, 1, st-1) op2 = string.sub(opt, st+1) if (string.sub(param, 1, st-1) == op1) and (string.find(op1..op2, param, 1, true) == 1) then return true end elseif opt == param then return true end return false end -- -- simple parser for options and strings -- local get_next_token = function() -- beyond the limit? if s_start > opt_len then o_next = "" o_type = nil return end t_count = t_count + 1 -- search the start of the next token s_start, _ = string.find (opt_str, '[^%s]', s_start) if not s_start then o_next = "" o_type = nil return end -- a new string argument? local next_char = string.sub(opt_str, s_start, s_start) if next_char == '"' or next_char == "'" then -- find the end of the string by searching for -- the next not escaped quote _ , s_end = string.find (opt_str, '[^\\]'..next_char, s_start+1) if s_end then o_next = string.sub(opt_str, s_start+1, s_end-1) if next_char == '"' then -- Wow! this is to resolve all string escapes, kind of "unescape string" o_next = assert(loadstring("return(\""..o_next.."\")"))() end o_type = "string" else -- FIXME: error: string does not end... -- seems that gnuplot adds missing quotes -- so this will never happen... end else -- ok, it's not a string... -- then find the next white space or end of line -- comma separated strings are regarded as one token s_end, _ = string.find (opt_str, '[^,][%s]+[^,]', s_start) if not s_end then -- reached the end of the string s_end = opt_len + 1 else s_end = s_end + 1 end o_next = string.sub(opt_str, s_start, s_end-1) if tonumber(o_next) ~= nil then o_type = 'number' else o_type = "op" end end s_start = s_end + 1 return end local get_two_sizes = function(str) local args = explode(',', str) set_t_count(#args) local num1, num2, unit if #args ~= 2 then return false, nil else num1, unit = gfx.parse_number_unit(args[1]) if unit then t_count = t_count + 1 end num2, unit = gfx.parse_number_unit(args[2]) if unit then t_count = t_count + 1 end if not (num1 and num2) then return false, nil end end return num1, num2 end local print_help = false while true do get_next_token() if not o_type then break end if almost_equals(o_next, "he$lp") then print_help = true elseif almost_equals(o_next, "mono$chrome") then -- no colored lines -- Setting `term.TERM_MONOCHROME' would internally disable colors for all drawings. -- We do it the `soft' way by redefining all colors via a TeX command. -- Maybe an additional terminal option is useful here... gfx.opt.lines_colored = false elseif almost_equals(o_next, "c$olor") or almost_equals(o_next, "c$olour") then -- colored lines gfx.opt.lines_colored = true elseif almost_equals(o_next, "so$lid") then -- no dashed and dotted etc. lines gfx.opt.lines_dashed = false elseif almost_equals(o_next, "notime$stamp") then -- omit output of the timestamp gfx.opt.notimestamp = true elseif almost_equals(o_next, "da$shed") then -- dashed and dotted etc. lines gfx.opt.lines_dashed = true elseif almost_equals(o_next, "gparr$ows") then -- use gnuplot arrows instead of TikZ gfx.opt.gp_arrows = true elseif almost_equals(o_next, "nogparr$ows") then -- use gnuplot arrows instead of TikZ gfx.opt.gp_arrows = false elseif almost_equals(o_next, "gppoint$s") then -- use gnuplot points instead of TikZ gfx.opt.gp_points = true elseif almost_equals(o_next, "nogppoint$s") then -- use gnuplot points instead of TikZ gfx.opt.gp_points = false elseif almost_equals(o_next, "nopic$environment") then -- omit the 'tikzpicture' environment gfx.opt.nopicenv = true elseif almost_equals(o_next, "pic$environment") then -- omit the 'tikzpicture' environment gfx.opt.nopicenv = false elseif almost_equals(o_next, "origin$reset") then -- moves the origin of the TikZ picture to the lower left corner of the plot gfx.opt.set_origin = true elseif almost_equals(o_next, "noorigin$reset") then -- moves the origin of the TikZ picture to the lower left corner of the plot gfx.opt.set_origin = false elseif almost_equals(o_next, "plot$size") then get_next_token() gfx.opt.plotsize_x, gfx.opt.plotsize_y = get_two_sizes(o_next) if not gfx.opt.plotsize_x then gp.int_error(t_count, string.format("error: two comma seperated lengths expected, got `%s'.", o_next)) end gfx.opt.set_plotsize = true term_opt_size = string.format("plotsize %s,%s ", gfx.opt.plotsize_x, gfx.opt.plotsize_y) -- we set the canvas size to the plotsize to keep the aspect ratio as good as possible -- and rescale later once we know the actual plot size... term.xmax = gfx.opt.plotsize_x*pgf.DEFAULT_RESOLUTION term.ymax = gfx.opt.plotsize_y*pgf.DEFAULT_RESOLUTION elseif almost_equals(o_next, "si$ze") then get_next_token() local plotsize_x, plotsize_y = get_two_sizes(o_next) if not plotsize_x then gp.int_error(t_count, string.format("error: two comma seperated lengths expected, got `%s'.", o_next)) end gfx.opt.set_plotsize = false term_opt_size = string.format("size %s,%s ", plotsize_x, plotsize_y) term.xmax = plotsize_x*pgf.DEFAULT_RESOLUTION term.ymax = plotsize_y*pgf.DEFAULT_RESOLUTION elseif almost_equals(o_next, "char$size") then get_next_token() charsize_h, charsize_v = get_two_sizes(o_next) if not charsize_h then gp.int_error(t_count, string.format("error: two comma seperated lengths expected, got `%s'.", o_next)) end elseif almost_equals(o_next, "sc$ale") then get_next_token() local xscale, yscale = get_two_sizes(o_next) if not xscale then gp.int_error(t_count, string.format("error: two comma seperated numbers expected, got `%s'.", o_next)) end term_opt_scale = string.format("scale %s,%s ",xscale, yscale) term.xmax = term.xmax * xscale term.ymax = term.ymax * yscale elseif almost_equals(o_next, "tikzpl$ot") then get_next_token() local args = explode(',', o_next) set_t_count(#args) for i = 1,#args do args[i] = tonumber(args[i]) if args[i] == nil then gp.int_error(t_count, string.format("error: list of comma seperated numbers expected, got `%s'.", o_next)) end args[i] = args[i] - 1 end gfx.opt.plot_list = args elseif almost_equals(o_next, "provide$vars") then get_next_token() local args = explode(',', o_next) set_t_count(#args) gfx.opt.gnuplot_vars = args elseif almost_equals(o_next, "tikzar$rows") then -- map the arrow angles to TikZ arrow styles gfx.opt.tikzarrows = true elseif almost_equals(o_next, "notikzar$rows") then -- don't map the arrow angles to TikZ arrow styles gfx.opt.tikzarrows = false elseif almost_equals(o_next, "nobit$map") then -- render images as filled rectangles instead of the nativ -- PS or PDF image format gfx.opt.direct_image = false elseif almost_equals(o_next, "bit$map") then -- render images as nativ PS or PDF image gfx.opt.direct_image = true elseif almost_equals(o_next, "cmyk$image") then -- use cmyk color model for images gfx.opt.cmykimage = true elseif almost_equals(o_next, "rgb$image") then -- use cmyk color model for images gfx.opt.cmykimage = false elseif almost_equals(o_next, "full$doc") or almost_equals(o_next, "stand$alone") then -- produce full tex document gfx.opt.full_doc = true elseif almost_equals(o_next, "nofull$doc") or almost_equals(o_next, "nostand$alone") then -- produce full tex document gfx.opt.full_doc = true elseif almost_equals(o_next, "create$style") then -- creates the coresponding LaTeX style from the script pgf.create_style() elseif almost_equals(o_next, "backg$round") then -- set background color get_next_token() -- ignore rgbcolor keyword if present if almost_equals(o_next, "rgb$color") then get_next_token() end if o_type == 'string' then gfx.opt.bgcolor = gp.parse_color_name(t_count, o_next) term_opt_background = string.format("background '%s'", o_next) else gp.int_error(t_count, string.format("error: string expected, got `%s'.", o_next)) end elseif almost_equals(o_next, "fo$nt") then get_next_token() if o_type == 'string' then gfx.opt.default_font, fontsize = gfx.parse_font_string(o_next) else gp.int_error(t_count, string.format("error: string expected, got `%s'.", o_next)) end term_opt_font = string.format("font %q ", o_next) elseif almost_equals(o_next, "fonts$cale") or almost_equals(o_next, "texts$cale") then get_next_token() if o_type == 'number' then fontscale = tonumber(o_next) if fontscale < 0 then fontscale = 1.0 end else gp.int_error(t_count, string.format("error: number expected, got `%s'.", o_next)) end elseif almost_equals(o_next, "externalimages") then if term.external_images ~= nil then term.external_images = true; else gp.int_warn(t_count, "Externalization of images is not supported.") end elseif almost_equals(o_next, "noexternalimages") then if term.external_images ~= nil then term.external_images = false; else gp.int_warn(t_count, "Externalization of images is not supported.") end elseif almost_equals(o_next, "pre$amble") or almost_equals(o_next, "header") then get_next_token() if o_type == 'string' then term_opt_preamble = term_opt_preamble .. string.format("preamble %q ", o_next) gfx.opt.latex_preamble = gfx.opt.latex_preamble .. o_next .. "\n" else gp.int_error(t_count, string.format("error: string expected, got `%s'.", o_next)) end elseif almost_equals(o_next, "nopre$amble") or almost_equals(o_next, "noheader") then gfx.opt.latex_preamble = '' elseif almost_equals(o_next, "con$text") then gfx.opt.tex_format = "context" -- ConTeXt has a default of 12pt fontsize = 12 elseif almost_equals(o_next, "tex") then gfx.opt.tex_format = "tex" elseif almost_equals(o_next, "latex") then gfx.opt.tex_format = "latex" elseif almost_equals(o_next, "clip") then gfx.opt.clip = true term.flags = term_default_flags term.flags = term_default_flags + term.TERM_CAN_CLIP elseif almost_equals(o_next, "noclip") then gfx.opt.clip = false term.flags = term_default_flags elseif almost_equals(o_next, "tight$boundingbox") then gfx.opt.tightboundingbox = true elseif almost_equals(o_next, "notight$boundingbox") then gfx.opt.tightboundingbox = false else gp.int_warn(t_count, string.format("unknown option `%s'.", o_next)) end end -- determine "internal" font size -- FIXME: what happens on "set termoptions font ..." or subsequent terminal calls local term_h_char, term_v_char = term.h_char, term.v_char if fontsize ~= nil then term_h_char = pgf.DEFAULT_FONT_H_CHAR * (fontsize/10) * (pgf.DEFAULT_RESOLUTION/1000) term_v_char = pgf.DEFAULT_FONT_V_CHAR * (fontsize/10) * (pgf.DEFAULT_RESOLUTION/1000) -- on change apply old text scaling if not fontscale then fontscale = gfx.opt.fontscale; end end -- a given character size overwrites font size if charsize_h ~= nil then term_h_char = charsize_h*pgf.DEFAULT_RESOLUTION term_v_char = charsize_v*pgf.DEFAULT_RESOLUTION -- on change apply old text scaling if not fontscale then fontscale = gfx.opt.fontscale; end end if fontscale ~= nil then term_h_char = term_h_char * fontscale term_v_char = term_v_char * fontscale gfx.opt.fontscale = fontscale; term_opt_fontscale = string.format("fontscale %s", gfx.opt.fontscale) end term.h_char = math.floor(term_h_char + .5) term.v_char = math.floor(term_v_char + .5) if print_help then pgf.print_help(gp.term_out) end local tf = function(b,y,n) local addopt = '' if b then addopt = y else addopt = n end if (string.len(addopt) > 0) then term_opt = term_opt .. addopt .. ' ' end end tf(true, gfx.opt.tex_format, nil) tf(true, term_opt_font, nil) tf(true, term_opt_size, nil) tf(true, term_opt_background, nil) tf(true, term_opt_fontscale, nil) tf((#gfx.opt.latex_preamble>0), term_opt_preamble, 'nopreamble') tf(gfx.opt.lines_colored, 'color', 'monochrome') tf(gfx.opt.full_doc, 'standalone', 'nostandalone') tf(gfx.opt.lines_dashed, 'dashed', 'solid') tf(gfx.opt.gp_arrows, 'gparrows', 'nogparrows') tf(gfx.opt.tikzarrows, 'tikzarrows', 'notikzarrows') tf(gfx.opt.gp_points, 'gppoints', 'nogppoints') tf(gfx.opt.nopicenv, 'nopicenvironment', 'picenvironment') tf(gfx.opt.set_origin, 'originreset', 'nooriginreset') tf(gfx.opt.direct_image, 'bitmap', 'nobitmap') tf(gfx.opt.cmykimage, 'cmykimage', 'rgbimage') tf(gfx.opt.clip, 'clip', 'noclip') tf(gfx.opt.tightboundingbox, 'tightboundingbox', 'notightboundingbox') if term.external_images ~= nil then tf(term.external_images, 'externalimages', 'noexternalimages') end gp.term_options(term_opt) return 1 end -- Called once, when the device is first selected. term.init = function() if gfx.opt.full_doc then pgf.write_doc_begin(gfx.opt.latex_preamble) end return 1 end -- Called just before a plot is going to be displayed. term.graphics = function() -- reset some state variables gfx.linetype_idx_set = nil gfx.linewidth_set = nil gfx.pointsize_set = nil gfx.color_set = nil gfx.in_picture = true gfx.have_plotbox = false gfx.boundingbox_cnt = 0 gfx.scalex = 1/pgf.DEFAULT_RESOLUTION gfx.scaley = 1/pgf.DEFAULT_RESOLUTION gfx.current_boundingbox = { xleft = nil, xright = nil, ytop = nil, ybot = nil } -- put a newline between subsequent plots in fulldoc mode... if gfx.opt.full_doc then gp.write("\n") end pgf.write_graph_begin(gfx.opt.default_font, gfx.opt.nopicenv) return 1 end term.vector = function(x, y) if #gfx.path == 0 then gfx.start_path(gfx.posx, gfx.posy) elseif not gfx.check_coord(x, y) then -- checked for zero path length and add the path coords to gfx.path gfx.path[#gfx.path+1] = {x,y} end return 1 end term.move = function(x, y) -- only "move" if we change our latest position if not gfx.check_coord(x, y) then -- finish old path and start a new one gfx.check_in_path() gfx.start_path(x, y) end return 1 end term.linetype = function(ltype) gfx.check_in_path() gfx.set_color('LT', {ltype}) if (ltype < -2) then -- LT_NODRAW, LT_BACKGROUND, LT_UNDEFINED ltype = -2 end gfx.linetype_idx = ltype return 1 end term.point = function(x, y, num) if gfx.opt.gp_points then return 0 else gfx.check_in_path() gfx.check_color() gfx.check_linewidth() gfx.check_pointsize() local pm if num == -1 then pm = pgf.styles.plotmarks[1][1] else pm = pgf.styles.plotmarks[(num % (#pgf.styles.plotmarks-1)) + 2][1] end pgf.draw_points({{x,y}}, pm) return 1 end end --[[ this differs from the original API one may use the additional parameters to define own styles e.g. "misuse" angle for numbering predefined styles... int length /* head length */ double angle /* head angle in degrees */ double backangle /* head back angle in degrees */ int filled /* arrow head filled or not */ ]] term.arrow = function(sx, sy, ex, ey, head, length, angle, backangle, filled) if gfx.opt.gp_arrows then return 0 else local headstyle = 0 if gfx.opt.tikzarrows then headstyle = angle end gfx.check_in_path() gfx.check_color() gfx.check_linetype() gfx.check_linewidth() pgf.draw_arrow({{sx,sy},{ex,ey}}, gfx.HEAD_STR[head+1], headstyle) return 1 end end -- Called immediately after a plot is displayed. term.text = function() gfx.check_in_path() pgf.write_graph_end(gfx.opt.nopicenv) gfx.in_picture = false return 1 end term.put_text = function(x, y, txt) gfx.check_in_path() gfx.check_color() if (txt ~= '') or (gfx.text_font ~= '') then -- omit empty nodes pgf.write_text_node({x, y}, txt, gfx.text_angle, gfx.TEXT_ANCHOR[gfx.text_justify], gfx.text_font) end return 1 end term.justify_text = function(justify) gfx.text_justify = justify return 1 end term.text_angle = function(ang) gfx.text_angle = ang return 1 end term.linewidth = function(width) if gfx.linewidth ~= width then gfx.check_in_path() gfx.linewidth = width end return 1 end term.pointsize = function(size) if gfx.pointsize ~= size then gfx.check_in_path() gfx.pointsize = size end return 1 end term.set_font = function(font) gfx.text_font = gfx.parse_font_string(font) return 1 end -- at the moment this is only used to check -- the plot's bounding box as seldom as possible term.layer = function(l) if l == 'end_text' then -- called after a plot is finished (also after each "mutiplot") gfx.write_boundingbox() end return 1 end -- we don't use this, because we are implicitly testing -- for closed paths term.path = function(p) return 1 end term.filled_polygon = function(style, fillpar, t) local pattern = nil local color = nil local opacity = 100 local saturation = 100 gfx.check_in_path() if style == 'EMPTY' then -- FIXME: should be the "background color" and not gpbgfillcolor pattern = '' color = 'gpbgfillcolor' saturation = 100 opacity = 100 elseif style == 'DEFAULT' or style == 'OPAQUE' then -- FIXME: not shure about the opaque style pattern = '' color = gfx.color saturation = 100 opacity = 100 elseif style == 'SOLID' then pattern = '' color = gfx.color if fillpar < 100 then saturation = fillpar else saturation = 100 end opacity = 100 elseif style == 'PATTERN' then pattern = pgf.styles.patterns[(fillpar % #pgf.styles.patterns) + 1][1] color = gfx.color saturation = 100 opacity = 100 elseif style == 'TRANSPARENT_SOLID' then pattern = '' color = gfx.color saturation = 100 opacity = fillpar elseif style == 'TRANSPARENT_PATTERN' then pattern = pgf.styles.patterns[(fillpar % #pgf.styles.patterns) + 1][1] color = gfx.color saturation = 100 opacity = 0 end pgf.draw_fill(t, pattern, color, saturation, opacity) return 1 end term.boxfill = function(style, fillpar, x1, y1, width, height) local t = {{x1, y1}, {x1+width, y1}, {x1+width, y1+height}, {x1, y1+height}} return term.filled_polygon(style, fillpar, t) end -- points[row][column] -- m: #cols, n: #rows -- corners: clip box and draw box coordinates -- ctype: "RGB" or "RGBA" or "PALETTE" term.image = function(m, n, points, corners, ctype, xfile) gfx.check_in_path() pgf.write_clipbox_begin({corners[3][1],corners[3][2]},{corners[4][1],corners[4][2]}) local ll = {corners[1][1],corners[2][2]} local ur = {corners[2][1],corners[1][2]} local xxfile if xfile ~= nil then -- strip file extension xxfile = string.match(xfile, "^(.*).png$") else xxfile = "" end -- load exclusively an external file and don't generate inline images if xfile ~= nil and term.external_images == true then pgf.load_image_file(ll, ur, xxfile) elseif gfx.opt.direct_image then if gfx.opt.cmykimage then pgf.draw_raw_cmyk_image(points, m, n, ll, ur, xxfile) else pgf.draw_raw_rgb_image(points, m, n, ll, ur, xxfile) end else -- draw as filled squares local w = (corners[2][1] - corners[1][1])/m local h = (corners[1][2] - corners[2][2])/n local yy,yyy,xx,xxx for cnt = 1,#points do xx = corners[1][1]+(cnt%m-1)*w yy = corners[1][2]-math.floor(cnt/m)*h yyy = yy-h xxx = xx+w pgf.draw_fill({{xx, yy}, {xxx, yy}, {xxx, yyy}, {xx, yyy}}, '', gfx.format_color(ctype, points[cnt]) , 100, 100) end end pgf.write_clipbox_end() end term.make_palette = function() -- continuous number of colours return 0 end term.previous_palette = function() return 1 end term.set_color = function(ctype, lt, value, r, g, b) gfx.check_in_path() -- FIXME gryscale on monochrome?? ... or use xcolor? if ctype == 'LT' then gfx.set_color('LT', {lt}) elseif ctype == 'FRAC' then if gfx.opt.lines_colored then gfx.set_color('RGB', {r, g , b}) else gfx.set_color('GRAY', {value}) end elseif ctype == 'RGB' then gfx.set_color('RGB', {r, g , b}) else gp.int_error(string.format("set color: unknown type (%s), lt (%i), value (%.3f)\n", ctype, lt, value)) end return 1 end -- Called when gnuplot is exited. term.reset = function(p) gfx.check_in_path() gfx.check_variables() if gfx.opt.full_doc then pgf.write_doc_end() end return 1 end --[[=============================================================================================== command line code ]]--=============================================================================================== term_help = function(helptext) local w for w in string.gmatch(helptext, "([^\n]*)\n") do w = string.gsub(w, "\\", "\\\\") w = string.gsub(w, "\"", "\\\"") io.write('"'..w.."\",\n") end --[[ local out = string.gsub(helptext, "\n", "\",\n\"") local out = string.gsub(helptext, "\n", "\",\n\"") io.write(out)]] end if arg then -- called from the command line! if #arg > 0 and arg[1] == 'style' then -- write style file pgf.create_style() elseif arg[1] == 'termhelp' then io.write([["2 lua tikz", "?set terminal lua tikz", "?set term lua tikz", "?term lua tikz", " The TikZ driver is one output mode of the generic Lua terminal.", "", " Syntax:", " set terminal lua tikz", "", ]]) pgf.print_help(term_help) io.write("\"\"\n") else io.write([[ This script is intended to be called from GNUPLOT. For generating the associated TeX/LaTeX/ConTeXt style files just call this script with the additional option 'style': # lua gnuplot.lua style The TikZ driver provides the following additional terminal options: ]]) pgf.print_help(io.write) end end �������������������������������������������������������gnuplot-4.6.4/term/lua/NEWS�������������������������������������������������������������������������0000644�0004711�0000144�00000011663�11530635716�012376� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������2011-02-19 * support for ConTeXt and plain TeX * removed dependencies for LaTeX packages other than TikZ * needs TikZ Version >= 2.0 * better support for saving terminal options with gnuplot 'save' command * all bitmap images can be externalized * alpha channel support for bimap images via externalized PNGs * new options 'crop', 'background', 'textscale', 'externalimages' * fixed "overflow" bug on negative coordinates that are outside of the crop box * various small bugfixes Backward compatibility is dropped again. 2009-03-29 * Providing a script or target name is now mandatory. The new syntax: set terminal lua <target name> | "<file name>" {<script_args> ...} This will look for a script named `gnuplot-<target name>.lua' or a script named "<file name>" (in quotes!). * Support for script names via the environmental variable GNUPLOT_LUA_SCRIPT is dropped. * The option "script" is obsolete and also removed. * Via the environmental variable GNUPLOT_DRIVER_DIR the default search directory for driver scripts can be changed. * The TikZ driver help is now included as a subsection of the Lua terminal. * minor bugfixes (see ChangeLog) This version drops backward compatibility again! 2008-12-20 * Removed all underscrores in style and color names. * The plot box coordinates are now accessible via a special node. (e.g. "gp plot 1.north east". * Added aliases 'standalone' ('fulldoc') and 'header' ('preamble') * Preparations to echo back the options string to the user. This version drops backward compatibility! 2008-11-22 * Changed default canvas size to 12.5cm x 8.75cm and use the preview package to clip the plot in 'fulldoc' mode (suggested by Juergen Wieferink). * New option 'charsize'. In conjunction with the gnuplottex.sty the font size can now be determined automatically. (look at the style file for example code). * Removed the default font setting (previously set to "\small"). No binary updates needed. 2008-02-02 * Implemented a mapping of gnuplot arrow styles to TikZ arrow styles by "misusing" the angle of the gnuplot arrow definition. * CMYK support for image data (all other colors are handled through the xcolor package). * terminal works with gnuplottex (\begin{gnuplot}[terminal=lua]...) (http://www.ctan.org/tex-archive/help/Catalogue/entries/gnuplottex.html) * compatibility updates for gnuplot 4.3cvs version * optional environment variable GNUPLOT_LUA_SCRIPT * fixed zero length paths artifacts and some more minor bugs * added simple pager functionality for help output The Lua script should work with the previous binary version, but the new GNUPLOT_LUA_SCRIPT feature and pager functionality will not be available. Maybe a minor issue for most users ;-) 2007-10-03 * New option 'providevars' to make gnuplot's internal and user variables available within the TeX-script. * Adopted the color scheme and dash patterns to (largely) resemble the look of the postscript terminal. * Changed the names of the bounding box coordinates from 'lowerleft' to 'south west' etc. to be closer to the TikZ naming scheme. Binary update needed on upgrade. 2007-09-22 * Lengths in the 'size' options now accept the units cm, mm, in or inch, pt, pc, bp, dd and cc. * Switched from generic TikZ styles like 'every plot' to gnuplot specific TikZ-styles. * Support for plotting images of pixel and binary 2D-data. For PDF and Postscript generation the image will be included in a native PDF or PS format what reduces space and compile time and improves rendering quality. For the SVG output of PGF/TikZ the 'native image' feature has to be disabled manually. The image will then be rendered of filled rectangles. * Added 'tikzplot' option which allows using the TikZ '\path plot' command instead of the simple '\path' for plots with given linetypes. * Added 'is_multiplot()' to the Lua terminal (currently unused in the TikZ backend). * Changed the Lua-API: Color and fill styles are now passed as strings instead of integers to the script. Binary update needed on upgrade. 2007-08-25 ii * Improved robustness of the option parser. * Fixed a PGF/TikZ compatibility issue reported by Scott Murman. No binary update from previous version needed. 2007-08-25 * Fixed rectangle scaling in conjunction with the 'plotsize' option (thanks to Scott Murman for reporting). This update only affects the gnuplot.lua script. 2007-08-24 * A 'size' option for the canvas was added. * The 'scale' option now expects an x and y parameter, so the 'xscale' and 'yscale' options where removed. Scaling and resizing now work similar to the other terminals. * The 'monochrome' and 'solid' options do not change the actual TikZ plot commands anymore, but only change the according TikZ style settings. See the 'ChangeLog' file for previous changes. �����������������������������������������������������������������������������gnuplot-4.6.4/term/lua/gnuplot-tikz.help������������������������������������������������������������0000644�0004711�0000144�00000017151�11724740755�015223� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������"2 lua tikz", "?set terminal lua tikz", "?set term lua tikz", "?term lua tikz", " The TikZ driver is one output mode of the generic Lua terminal.", "", " Syntax:", " set terminal lua tikz", "", " {latex | tex | context}", " {color | monochrome}", " {dashed | solid}", " {nooriginreset | originreset}", " {nogparrows | gparrows}", " {nogppoints | gppoints}", " {picenvironment | nopicenvironment}", " {noclip | clip}", " {notightboundingbox | tightboundingbox}", " {background \"<colorpec>\"}", " {size <x>{unit},<y>{unit}}", " {scale <x>,<y>}", " {plotsize <x>{unit},<y>{unit}}", " {charsize <x>{unit},<y>{unit}}", " {font \"<fontdesc>\"}", " {{fontscale | textscale} <scale>}", " {nofulldoc | nostandalone | fulldoc | standalone}", " {{preamble | header} \"<preamble_string>\"}", " {tikzplot <ltn>,...}", " {notikzarrows | tikzarrows}", " {rgbimages | cmykimages}", " {noexternalimages|externalimages}", " {bitmap | nobitmap}", " {providevars <var name>,...}", " {createstyle}", " {help}", "", " For all options that expect lengths as their arguments they", " will default to 'cm' if no unit is specified. For all lengths", " the following units may be used: 'cm', 'mm', 'in' or 'inch',", " 'pt', 'pc', 'bp', 'dd', 'cc'. Blanks between numbers and units", " are not allowed.", "", " 'monochrome' disables line coloring and switches to grayscaled", " fills.", "", " 'solid' use only solid lines.", "", " 'originreset' moves the origin of the TikZ picture to the lower", " left corner of the plot. It may be used to align several plots", " within one tikzpicture environment. This is not tested with", " multiplots and pm3d plots!", "", " 'gparrows' use gnuplot's internal arrow drawing function", " instead of the ones provided by TikZ.", "", " 'gppoints' use gnuplot's internal plotmark drawing function", " instead of the ones provided by TikZ.", "", " 'nopicenvironment' omits the declaration of the 'tikzpicture'", " environment in order to set it manually. This permits putting", " some PGF/TikZ code directly before or after the plot.", "", " 'clip' crops the plot at the defined canvas size. Default is", " 'noclip' by which only a minimum bounding box of the canvas size", " is set. Neither a fixed bounding box nor a crop box is set if the", " 'plotsize' or 'tightboundingbox' option is used.", "", " If 'tightboundingbox' is set the 'clip' option is ignored and the", " final bounding box is the natural bounding box calculated by tikz.", "", " 'background' sets the background color to the value specified in", " the <colorpec> argument. <colorspec> must be a valid color name or", " a 3 byte RGB code as a hexadecimal number with a preceding number", " sign ('#'). E.g. '#ff0000' specifies pure red. If omitted the", " background is transparent.", "", " The 'size' option expects two lenghts <x> and <y> as the canvas", " size. The default size of the canvas is 12.5cm x 8.75cm.", "", " The 'scale' option works similar to the 'size' option but expects", " scaling factors <x> and <y> instead of lengths.", "", " The 'plotsize' option permits setting the size of the plot area", " instead of the canvas size, which is the usual gnuplot behaviour.", " Using this option may lead to slightly asymmetric tic lengths.", " Like 'originreset' this option may not lead to convenient results", " if used with multiplots or pm3d plots. An alternative approach", " is to set all margins to zero and to use the 'noclip' option.", " The plot area has then the dimensions of the given canvas sizes.", "", " The 'charsize' option expects the average horizontal and vertical", " size of the used font. Look at the generated style file for an", " example of how to use it from within your TeX document.", "", " 'fontscale' or 'textscale' expects a scaling factor as a parameter.", " All texts in the plot are scaled by this factor then.", "", " The options 'tex', 'latex' and 'context' choose the TeX output", " format. LaTeX is the default. To load the style file put the", " according line at the beginning of your document:", " \\input gnuplot-lua-tikz.tex % (for plain TeX)", " \\usepackage{gnuplot-lua-tikz} % (for LaTeX)", " \\usemodule[gnuplot-lua-tikz] % (for ConTeXt)", "", " 'createstyle' derives the TeX/LaTeX/ConTeXt styles from the script", " and writes them to the appropriate files.", "", " 'fulldoc' or 'standalone' produces a full LaTeX document for direct", " compilation.", "", " 'preamble' or 'header' may be used to put any additional LaTeX code", " into the document preamble in standalone mode.", "", " With the 'tikzplot' option the '\\path plot' command will be used", " instead of only '\\path'. The following list of numbers of linetypes", " (<ltn>,...) defines the affected plotlines. There exists a plotstyle", " for every linetype. The default plotstyle is 'smooth' for every", " linetype >= 1.", "", " By using the 'tikzarrows' option the gnuplot arrow styles defined by", " the user will be mapped to TikZ arrow styles. This is done by 'misusing'", " the angle value of the arrow definition. E.g. an arrow style with the", " angle '7' will be mapped to the TikZ style 'gp arrow 7' ignoring all the", " other given values. By default the TikZ terminal uses the stealth' arrow", " tips for all arrows. To obtain the default gnuplot behaviour please use", " the 'gparrows' option.", "", " With 'cmykimages' the CMYK color model will be used for inline image data", " instead of the RGB model. All other colors (like line colors etc.) are", " not affected by this option, since they are handled e.g. by LaTeX's", " xcolor package. This option is ignored if images are externalized.", "", " By using the 'externalimages' option all bitmap images will be written", " as external PNG images and included at compile time of the document.", " Generating DVI and later postscript files requires to convert the PNGs", " into EPS files in a seperate step e.g. by using ImageMagick's `convert`.", " Transparent bitmap images are always generated as an external PNGs.", "", " The 'nobitmap' option let images be rendered as filled rectangles instead", " of the nativ PS or PDF inline image format. This option is ignored if", " images are externalized.", "", " The 'providevars' options makes gnuplot's internal and user variables", " available by using the '\\gpgetvar{<var name>}' commmand within the TeX", " script. Use gnuplot's 'show variables all' command to see the list", " of valid variables.", "", " The <fontdesc> string may contain any valid TeX/LaTeX/ConTeXt font commands", " like e.g. '\\small'. It is passed directly as a node parameter in form of", " \"font={<fontdesc>}\". This can be 'misused' to add further code to a node,", " e.g. '\\small,yshift=1ex' or ',yshift=1ex' are also valid while the", " latter does not change the current font settings. One exception is", " the second argument of the list. If it is a number of the form", " <number>{unit} it will be interpreted as a fontsize like in other", " terminals and will be appended to the first argument. If the unit is", " omitted the value is interpreted as 'pt'. As an example the string", " '\\sffamily,12,fill=red' sets the font to LaTeX's sans serif font at", " a size of 12pt and red background color.", " The same applies to ConTeXt, e.g. '\\switchtobodyfont[iwona],10' changes the", " font to Iwona at a size of 10pt.", " Plain TeX users have to change the font size explicitly within the first", " argument. The second should be set to the same value to get proper scaling", " of text boxes.", "", " Strings have to be put in single or double quotes. Double quoted", " strings may contain special characters like newlines '\\n' etc.", "" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/Makefile.in����������������������������������������������������������������������0000644�0004711�0000144�00000043676�12223337636�013174� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = term DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alpha.m4 \ $(top_srcdir)/m4/apple.m4 $(top_srcdir)/m4/beos.m4 \ $(top_srcdir)/m4/msdos.m4 $(top_srcdir)/m4/next.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(jsdir)" "$(DESTDIR)$(luadir)" \ "$(DESTDIR)$(postscriptdir)" DATA = $(js_DATA) $(lua_DATA) $(postscript_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROEPS_CFLAGS = @CAIROEPS_CFLAGS@ CAIROEPS_LIBS = @CAIROEPS_LIBS@ CAIROPANGO_CFLAGS = @CAIROPANGO_CFLAGS@ CAIROPANGO_LIBS = @CAIROPANGO_LIBS@ CAIROPDF_CFLAGS = @CAIROPDF_CFLAGS@ CAIROPDF_LIBS = @CAIROPDF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIST_CONTACT = @DIST_CONTACT@ DVIPS = @DVIPS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ GDLIB_CONFIG = @GDLIB_CONFIG@ GIHDIR = @GIHDIR@ GREP = @GREP@ GTK28_CFLAGS = @GTK28_CFLAGS@ GTK28_LIBS = @GTK28_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEXPAND = @KPSEXPAND@ LASERGNU = @LASERGNU@ LATEX = @LATEX@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARIES_FOR_X = @LIBRARIES_FOR_X@ LIBS = @LIBS@ LINUXSUID = @LINUXSUID@ LISPDIR = @LISPDIR@ LN_S = @LN_S@ LRELEASE = @LRELEASE@ LTLIBOBJS = @LTLIBOBJS@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGO_1_10_2_CFLAGS = @PANGO_1_10_2_CFLAGS@ PANGO_1_10_2_LIBS = @PANGO_1_10_2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PDFLIB_CONFIG = @PDFLIB_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ PLAINTEX = @PLAINTEX@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RCC = @RCC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMLIBS = @TERMLIBS@ TERMXLIBS = @TERMXLIBS@ TEXDIR = @TEXDIR@ TEXHASH = @TEXHASH@ TROFF = @TROFF@ TUTORIAL = @TUTORIAL@ UIC = @UIC@ VERSION = @VERSION@ VERSION_MAJOR = @VERSION_MAJOR@ WX_CONFIG = @WX_CONFIG@ WX_LIBS = @WX_LIBS@ X11_APPDEFAULTS_DIR = @X11_APPDEFAULTS_DIR@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_OBJC = @ac_ct_OBJC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign EXTRA_DIST = README Makefile.am.in driver.h impcodes.h \ object.h post.h $(CORETERM) PostScript lua js write_png_image.c postscriptdir = $(pkgdatadir)/$(VERSION_MAJOR)/PostScript luadir = $(pkgdatadir)/$(VERSION_MAJOR)/lua jsdir = $(pkgdatadir)/$(VERSION_MAJOR)/js # List of terminal drivers, and list of postscript installation files # must be created prior to running automake CORETERM = aed.trm ai.trm aquaterm.trm be.trm cairo.trm canvas.trm cgi.trm \ cgm.trm context.trm corel.trm debug.trm djsvga.trm dumb.trm dxf.trm \ dxy.trm eepic.trm emf.trm emxvga.trm epson.trm estimate.trm excl.trm \ fig.trm gd.trm ggi.trm gpic.trm grass.trm hp2648.trm hp26.trm hp500c.trm \ hpgl.trm hpljii.trm hppj.trm imagen.trm kyo.trm latex.trm linux.trm \ lua.trm mac.trm metafont.trm metapost.trm mif.trm next.trm openstep.trm \ pbm.trm pc.trm pdf.trm pm.trm post.trm pslatex.trm pstricks.trm qms.trm \ qt.trm regis.trm sun.trm svg.trm t410x.trm tek.trm texdraw.trm tgif.trm \ tkcanvas.trm tpic.trm unixpc.trm v384.trm vgagl.trm vws.trm win.trm \ wxt.trm x11.trm xlib.trm # postscript_DATA = PostScript/8859-15.ps PostScript/8859-1.ps \ PostScript/8859-2.ps PostScript/8859-9.ps PostScript/cp1250.ps \ PostScript/cp1251.ps PostScript/cp437.ps PostScript/cp850.ps \ PostScript/cp852.ps PostScript/koi8r.ps PostScript/koi8u.ps \ PostScript/prologue.ps PostScript/utf-8.ps PostScript/aglfn.txt js_DATA = js/canvasmath.js js/canvastext.js js/gnuplot_common.js \ js/gnuplot_dashedlines.js js/gnuplot_mouse.js js/gnuplot_svg.js \ js/grid.png js/help.png js/nextzoom.png js/previouszoom.png \ js/textzoom.png js/gnuplot_mouse.css js/README lua_DATA = lua/gnuplot-tikz.lua @BUILD_LUA_FALSE@build_lua = @BUILD_LUA_TRUE@build_lua = BUILD_LUA all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign term/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign term/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-jsDATA: $(js_DATA) @$(NORMAL_INSTALL) @list='$(js_DATA)'; test -n "$(jsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(jsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(jsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(jsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(jsdir)" || exit $$?; \ done uninstall-jsDATA: @$(NORMAL_UNINSTALL) @list='$(js_DATA)'; test -n "$(jsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(jsdir)'; $(am__uninstall_files_from_dir) install-luaDATA: $(lua_DATA) @$(NORMAL_INSTALL) @list='$(lua_DATA)'; test -n "$(luadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(luadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(luadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(luadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(luadir)" || exit $$?; \ done uninstall-luaDATA: @$(NORMAL_UNINSTALL) @list='$(lua_DATA)'; test -n "$(luadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(luadir)'; $(am__uninstall_files_from_dir) install-postscriptDATA: $(postscript_DATA) @$(NORMAL_INSTALL) @list='$(postscript_DATA)'; test -n "$(postscriptdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(postscriptdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(postscriptdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(postscriptdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(postscriptdir)" || exit $$?; \ done uninstall-postscriptDATA: @$(NORMAL_UNINSTALL) @list='$(postscript_DATA)'; test -n "$(postscriptdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(postscriptdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(jsdir)" "$(DESTDIR)$(luadir)" "$(DESTDIR)$(postscriptdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-jsDATA install-luaDATA install-postscriptDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-jsDATA uninstall-luaDATA \ uninstall-postscriptDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-jsDATA install-luaDATA install-man \ install-pdf install-pdf-am install-postscriptDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags-am \ uninstall uninstall-am uninstall-jsDATA uninstall-luaDATA \ uninstall-postscriptDATA Makefile.am: Makefile.am.in rm -f $@ $@t sed -n '1,/^##trm-files-begin/p' $< > $@t echo CORETERM = *.trm | fmt | (tr '\012' @; echo) \ |sed 's/@$$/%/;s/@/ \\@/g' | tr @% '\012 ' \ >> $@t echo '#' >> $@t echo postscript_DATA = PostScript/*.ps PostScript/*.txt | fmt \ | (tr '\012' @; echo) |sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012 ' >> $@t echo js_DATA = js/*.js js/*.png js/*.css js/README | fmt \ | (tr '\012' @; echo) |sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012 ' >> $@t echo lua_DATA = lua/gnuplot-tikz.lua | fmt \ | (tr '\012' @; echo) |sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012 ' >> $@t echo if BUILD_LUA >> $@t echo build_lua = BUILD_LUA >> $@t echo else >> $@t echo build_lua = >> $@t echo endif >> $@t sed -n '/^##trm-files-end/,$$p' $< >> $@t chmod og-w $@t mv $@t $@ all: lua/gnuplot-tikz.help $(srcdir)/lua/gnuplot-tikz.help: $(srcdir)/lua/gnuplot-tikz.lua test -z "$(build_lua)" || (chmod u+w $@ && lua $< termhelp > $@) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ������������������������������������������������������������������gnuplot-4.6.4/term/dxy.trm��������������������������������������������������������������������������0000644�0004711�0000144�00000011635�10460036601�012432� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: dxy.trm,v 1.14 2006/07/21 02:35:45 sfeam Exp $ * */ /* GNUPLOT - dxy.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * Roland DXY800A plotter * * AUTHORS * Martin Yii, eln557h@monu3.OZ * Further modified Jan 1990 by Russell Lang, rjl@monu1.cc.monash.oz * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(dxy800a) #endif #ifdef TERM_PROTO TERM_PUBLIC void DXY_init __PROTO((void)); TERM_PUBLIC void DXY_graphics __PROTO((void)); TERM_PUBLIC void DXY_text __PROTO((void)); TERM_PUBLIC void DXY_linetype __PROTO((int linetype)); TERM_PUBLIC void DXY_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void DXY_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void DXY_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int DXY_text_angle __PROTO((int ang)); TERM_PUBLIC void DXY_reset __PROTO((void)); #define DXY_XMAX 2470 #define DXY_YMAX 1700 #define DXY_XLAST (DXY_XMAX - 1) #define DXY_YLAST (DXY_XMAX - 1) #define DXY_VCHAR (56) /* double actual height of characters */ #define DXY_HCHAR (28) /* actual width including spacing */ #define DXY_VTIC (28) #define DXY_HTIC (28) #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY int dxy_angle = 0; TERM_PUBLIC void DXY_init() { /* No initialisation sequences for DXY 800A */ } TERM_PUBLIC void DXY_graphics() { /* HOME, Character size 3 */ fputs("H\nS3\n", gpoutfile); } TERM_PUBLIC void DXY_text() { /* No sequences needed */ } TERM_PUBLIC void DXY_linetype(int linetype) { /* select pen */ fprintf(gpoutfile, "J%d\n", (linetype + 2) % 8 + 1); switch (linetype) { case LT_AXIS: /* use dotted line for axis */ fputs("L1\nB50\n", gpoutfile); break; default: /* use solid line for all others */ fputs("L0\n", gpoutfile); break; } } TERM_PUBLIC void DXY_move(unsigned int x, unsigned int y) { fprintf(gpoutfile, "M%d,%d\n", x, y); } TERM_PUBLIC void DXY_vector(unsigned int x, unsigned int y) { fprintf(gpoutfile, "D%d,%d\n", x, y); } TERM_PUBLIC void DXY_put_text(unsigned int x, unsigned int y, const char *str) { if (dxy_angle == 1) { /* vertical */ DXY_move(x + DXY_VCHAR / 4, y); } else { /* horiz */ DXY_move(x, y - DXY_VCHAR / 4); } fprintf(gpoutfile, "P%s\n", str); } TERM_PUBLIC int DXY_text_angle(int ang) { dxy_angle = (ang ? 1 : 0); fprintf(gpoutfile, "Q%d\n", ang); return TRUE; } TERM_PUBLIC void DXY_reset() { /* Home pen */ fputs("H\n", gpoutfile); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(dxy_driver) "dxy800a", "Roland DXY800A plotter", DXY_XMAX, DXY_YMAX, DXY_VCHAR, DXY_HCHAR, DXY_VTIC, DXY_HTIC, options_null, DXY_init, DXY_reset, DXY_text, null_scale, DXY_graphics, DXY_move, DXY_vector, DXY_linetype, DXY_put_text, DXY_text_angle, null_justify_text, do_point, do_arrow, set_font_null TERM_TABLE_END(dxy_driver) #undef LAST_TERM #define LAST_TERM dxy_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(dxy800a) "1 dxy800a", "?commands set terminal dxy800a", "?set terminal dxy800a", "?set term dxy800a", "?terminal dxy800a", "?term dxy800a", "?dxy800a", " This terminal driver supports the Roland DXY800A plotter. It has no options." END_HELP(dxy800a) #endif ���������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/README���������������������������������������������������������������������������0000644�0004711�0000144�00000067172�11676710606�012007� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������DOCUMENTATION FOR GNUPLOT TERMINAL DRIVER WRITERS By Russell Lang 1/90 Updated for new file layout by drd 4/95 Paragraphs about inclusion of TERM_HELP added by rcc 1/96 No change to the interface between gnuplot and the terminal drivers, but we would like to make the terminal drivers standalone 1) in order move the support for the terminal drivers outside of the support for the main program, thereby encouraging a library of contributed drivers 2) To make it easy for users to add contributed drivers, by adding a single #include line to term.h Whole of terminal driver should be contained in one <driver>.trm file, with a fairly strict layout as detailed below - this allows the gnuplot maintainers to change the way the terminal drivers are compiled without having to change the drivers themselves. term.h, and therefore each file.trm file, may be loaded more than once, with different sections selected by macros. Each driver provides all the functions it needs, and a table of function pointers and other data to interface to gnuplot. The table entry is currently defined as follows in term_api.h: struct TERMENTRY { /* required entries */ const char *name; const char *description; unsigned int xmax,ymax,v_char,h_char,v_tic,h_tic; void (*options) __PROTO((void)); void (*init) __PROTO((void)); void (*reset) __PROTO((void)); void (*text) __PROTO((void)); int (*scale) __PROTO((double, double)); void (*graphics) __PROTO((void)); void (*move) __PROTO((unsigned int, unsigned int)); void (*vector) __PROTO((unsigned int, unsigned int)); void (*linetype) __PROTO((int)); void (*put_text) __PROTO((unsigned int, unsigned int, const char*)); /* optional entries */ int (*text_angle) __PROTO((int)); int (*justify_text) __PROTO((enum JUSTIFY)); void (*point) __PROTO((unsigned int, unsigned int,int)); void (*arrow) __PROTO((unsigned int, unsigned int, unsigned int, unsigned int, TBOOLEAN)); int (*set_font) __PROTO((const char *font)); /* "font,size" */ void (*pointsize) __PROTO((double pointsize)); int flags; /* various flags */ void (*suspend) __PROTO((void)); /* after one plot of multiplot */ void (*resume) __PROTO((void)); /* before subsequent plot of multiplot */ void (*fillbox) __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); /* clear part of multiplot */ void (*linewidth) __PROTO((double linewidth)); #ifdef USE_MOUSE int (*waitforinput) __PROTO((void)); void (*put_tmptext) __PROTO((int i, const char str[])); void (*set_ruler) __PROTO((int x, int y)); void (*set_cursor) __PROTO((int c, int x, int y)); void (*set_clipboard) __PROTO((const char s[])); #endif int (*make_palette)__PROTO((t_sm_palette *palette)); void (*previous_palette) __PROTO(()); void (*set_color) __PROTO((t_colorspec *colorspec)); void (*filled_polygon) __PROTO((int points, gpiPoint *corners)); void (*image) __PROTO((unsigned, unsigned, coordval *, gpiPoint *, t_imagecolor)); /* Enhanced text mode driver call-backs */ void (*enhanced_open) __PROTO((char * fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint)); void (*enhanced_flush) __PROTO((void)); void (*enhanced_writec) __PROTO((int c)); /* Driver-specific synchronization or other layering commands */ void (*layer) __PROTO((t_termlayer syncpoint)); /* Path control for end-joins of closed polygons on PostScript-like devices */ void (*path) __PROTO((int p)); }; One consequence of (1) is that we would like drivers to be backwards compatible - drivers in the correct form below should work in future versions of gnuplot without change. ISO C guarantees to fill uninitialised members of a static structure to zero, so gnuplot can detect old drivers, in which fields have not been initialised, and can point new interface entry pointers to dummy functions. We can add fields to the terminal structure, but only at the end of the list. If you design a terminal that can't work without a new interface being defined, and consequent changes to the main gnuplot source, please contact gnuplot-beta@lists.sourceforge.net simply to ensure that you have the most up to date definition of the terminal structure. Also, please ensure that the 'set term' command checks for 0 values in added fields when an old driver is selected, and a pointer to a suitable 'can't do' function is provided. It is therefore not required (and in fact not possible) to add padding fields to the end of all drivers. Similarly, if you add an optional field to an old driver, take care to ensure that all intervening fields are padded with zeros. Some of the above fields are required - this should not be a problem, since they were all required in earlier releases of gnuplot. The later fields are interfaces to capabilities that not all devices can do, or for which the generic routines provided should be adequate. There are several null ('can't do') functions provided by term.c which a driver can reference in the table. Similarly, for bitmap devices, there are generic routines for lines and text provided by bitmap.c Here's a brief description of each variable: The char *name is a pointer to a string containing the name of the terminal. This name is used by the 'set terminal' and 'show terminal' commands. The name must be unique and must not be confused with an abbreviation of another name. For example if the name "postscript" exists, it is not possible to have another name "postscript2". Keep the name under 15 characters. The char *description is a pointer to a string containing a description of the terminal, which is displayed in response to the 'set terminal' command. Keep the description under 60 characters. xmax is the maximum number of points in the x direction. The range of points used by gnuplot is 0 to xmax-1. ymax is the maximum number of points in the y direction. The range of points used by gnuplot is 0 to ymax-1. v_char is the height of characters, in the same units as xmax and ymax. The border for labelling at the top and bottom of the plot is calculated using v_char. v_char is used as the vertical line spacing for characters. h_char is the width of characters, in the same units as xmax and ymax. The border for labelling at the left and right of the plot is calculated using h_char, for example. If the _justify_text function returns FALSE, h_char is used to justify text right or centre. If characters are not fixed width, then the _justify_text function must correctly justify the text. v_tic is the vertical size of tics along the x axis, in the same units as ymax. h_tic is the horizontal size of tics along the y axis, in the same units as xmax. v_tic and h_tic should give tics of the same physical size on the output. The ratio of these two quantities is used by gnuplot to set the aspect ratio to 1 so that circles appear circular when 'set size square' is active. All the above values need not be static - values can be substituted into the table during terminal initialisation, based on options for example. Here's a brief description of what each term.c function does: _options() Called when terminal type is selected. Also called by 'set termoption'. The two cases can be distinguished because on entry the value of c_token is either 3 or 2, respectively. This procedure should parse options on the command line. A list of the currently selected options should be stored in term_options[] in a form suitable for use with the set term command. term_options[] is used by the save command. Use options_null() if no options are available. _init() Called once, when the device is first selected. This procedure should set up things that only need to be set once, like handshaking and character sets etc... There is a global variable 'pointsize' which you might want to use here. If set pointsize is issued after init has been called, the pointsize() function is called. _reset() Called when gnuplot is exited, the output device changed or the terminal type changed. This procedure should reset the device, possibly flushing a buffer somewhere or generating a form feed. _scale(xs,ys) Called just before _graphics(). This takes the x and y scaling factors as information. If the terminal would like to do its own scaling, it returns TRUE. Otherwise, it can ignore the information and return FALSE: do_plot will do the scaling for you. null_scale is provided to do just this, so most drivers can ignore this function. PLEASE DO NOT USE THIS INTERFACE - IT IS NOT COMPATIBLE WITH MULTIPLOT. _graphics() Called just before a plot is going to be displayed. This procedure should set the device into graphics mode. Devices which can't be used as terminals (like plotters) will probably be in graphics mode always and therefore won't need this. _text() Called immediately after a plot is displayed. This procedure should set the device back into text mode if it is also a terminal, so that commands can be seen as they're typed. Again, this will probably do nothing if the device can't be used as a terminal. This call can be used to trigger conversion and output for bitmap devices. _move(x,y) Called at the start of a line. The cursor should move to the (x,y) position without drawing. _vector(x,y) Called when a line is to be drawn. This should display a line from the last (x,y) position given by _move() or _vector() to this new (x,y) position. _linetype(lt) Called to set the line type before text is displayed or line(s) plotted. This procedure should select a pen color or line style if the device has these capabilities. lt is an integer from -3 to 0 or greater. An lt of -3 is solid and drawn with xor (for temporary interactive annotations). An lt of -2 is used for the border of the plot. An lt of -1 is used for the X and Y axes. lt 0 and upwards are used for plots 0 and upwards. If _linetype() is called with lt greater than the available line types, it should map it to one of the available line types. Most drivers provide 9 different linetypes (lt is 0 to 8). _put_text(x,y,str) Called to display text at the (x,y) position, while in graphics mode. The text should be vertically (with respect to the text) justified about (x,y). The text is rotated according to _text_angle and then horizontally (with respect to the text) justified according to _justify_text. The following are optional _text_angle(ang) Called to rotate the text angle when placing the y label. Ang is the rotation angle in degrees. If ang = 0 then text is horizontal. Returns TRUE if text can be rotated, FALSE otherwise. [But you must return TRUE if called with ang=0] _justify_text(mode) Called to justify text left, right or centre. If mode = LEFT then text placed by _put_text is flushed left against (x,y). If mode = CENTRE then centre of text is at (x,y). If mode = RIGHT then text is placed flushed right against (x,y). Returns TRUE if text can be justified Returns FALSE otherwise and then _put_text assumes text is flushed left; justification of text is then performed by calculating the text width using strlen(text) * h_char. _point(x,y,point) Called to place a point at position (x,y). point is -1 or an integer from 0 upwards. At least 6 point types (numbered 0 to 5) are normally provided. Point type -1 is a dot. 'point' corresponds to (pointtype - 1), e.g. 'plot x with points pointtype 2' will call _point(x, y, 1). If possible, the driver should support the following 13 point types in the given order: point pointtype 0 1 plus 1 2 X 2 3 star 3 4 box 4 5 box filled 5 6 circle 6 7 circle (disk) filled 7 8 triangle 8 9 triangle filled 9 10 upside down triangle 10 11 upside down triangle filled 11 12 diamond 12 13 diamond filled If point is more than the available point types then it should be mapped back to one of the available points. Two _point() functions called do_point() and line_and_point() are provided in term.c and should be suitable for most drivers. do_point() draws the points in the current line type. If your driver uses dotted line types (generally because it is monochrome), you should use line_and_point() which changes to line type 0 before drawing the point. line type 0 should be solid. There is a global variable 'pointsize' which is controlled by the set pointsize command. If possible, use that. pointsize should be examined at terminal init. If it is subsequently changed, the pointsize() function will be called. _arrow(sx,sy,ex,ey,head) Called to draw an arrow from (sx,sy) to (ex,ey). A head is drawn on the arrow if head = TRUE. An _arrow() function called do_arrow() is provided in term.c which will draw arrows using the _move() and _vector() functions. Drivers should use do_arrow unless it causes problems. _set_font() is called to set the font of labels, etc. - fonts are selected as strings "name,size". - _set_font("") restores the terminal's default font. The core code does not currently use this entry point, but many terminal drivers use it internally to process font requests either in "set term" or enhanced text strings. _pointsize() is used to set the pointsize for subsequent points _flags stores various flags describing driver capabilities. - TERM_CAN_MULTIPLOT - driver can do multiplot in interactive mode, - TERM_CANNOT_MULTIPLOT - driver cannot multiplot, even if output is redirected. (not used by any current driver) - TERM_BINARY - output file must be opened in binary mode - TERM_ENHANCED_TEXT - terminal is currently in enhanced text mode - TERM_NO_OUTPUTFILE - terminal does not use gpoutfile See other flags defined in term_api.h _suspend() - Called before gnuplot issues a prompt in multiplot mode. Called only in interactive mode, and only for drivers that have set the flag TERM_CAN_MULTIPLOT. Some of these must flip between text/graphics mode (e.g. linuxvga). X11 driver will take this opportunity to paint the window on the display. _resume() - called after suspend(), before subsequent plots of a multiplot. Called only in interactive mode, and only for drivers that have set the flag TERM_CAN_MULTIPLOT. _fillbox() - draws a filled axis-aligned rectangular box. The first argument controls the type of fill-in: either a solid color at some percentage of full intensity, or a hatch pattern. Used by plot style "with filledboxes" and by the "clear" command (with background as fill colour) to do inset plots via multiplot. _linewidth() - sets the linewidth The next five functions are used for mouse support, and should be conditioned on USE_MOUSE: _waitforinput() - used for mouse input. Return the next character that can be read from stdin. In the mean time, process any mouse events. _put_tmptext(int i, const char str[]) - Display temporary text, after erasing any temporary text displayed previously at this location. The int determines where: 0=statusline, 1,2: at corners of zoom box, with \r separating text above and below the point. _set_ruler(int x, int y) - Draw a ruler (crosshairs) centered at the indicated screen coordinates. If x<0, switch ruler off. _set_cursor(int c, int x, int y) - Set cursor style and corner of rubber band rectangle. c selects the action: -2=warp the cursor to the given point, -1=start zooming, 0=standard cross-hair cursor, 1=cursor during rotation, 2=cursor during scaling, 3=cursor during zooming, -3=draw line between ruler and current mouse position, -4=don't draw (erase) line between ruler and current mouse position. _set_clipboard(const char s[]) - Write a string to the clipboard. The following four functions support PM3D and RGB colors. _make_palette(t_sm_palette *palette) - If argument is NULL, return number of colors available. If the number of colors is not limited (continuously shaded colors can be generated), return 0. Otherwise, allocate the palette. (t_sm_palette is defined in src/color.h.) _set_color(t_colorspec *colorspec) - EAM November 2004 ***CHANGED*** This routine used to accept a single double value, which was interpreted as a fractional index into the current color palette. Changing the parameter to a colorspec allows terminals to support other methods of specifying a color. If a given driver can not support a particular color request mechanism, it ignores it. If (colorspec->type == TC_FRAC) (this was the old behavior): Set current color according to colorspec->value, where 0 <= value <= 1. If using a palette, first map value to an integer i in the interval [0...num_colors-1], then set to the ith color in the palette. If (colorspec->type == TC_RGB): Set current color to the rgb triple given in colorspec->lt. _filled_polygon(int points, gpiPoint *corners) - Draw a polygon with the fill color set by set_color, and no border. (gpiPoint is defined in src/color.h.) _previous_palette() - Release the palette that the above routine allocated and get back the palette that was active before. Some terminals, like displays, may draw parts of the figure using their own palette. Terminals that use only one palette for the whole plot don't need this routine. The following 3 functions are required for drivers that support enhanced text mode. They are called only by the term.c routine enhanced_recursion(). _enhanced_open() - initialize state variables to process an enhanced text fragment _enhanced_writec() - write (or buffer) a single character of the text fragment being constructed _enhanced_flush() - finish processing of previous fragment and write it to the output stream _image(unsigned M, unsigned N, coordval *image, gpiPoint *corner, t_imagecolor color_mode) Plot a pixel-based image on the display device. 'M' is the number of pixels along the y-dimension of the image and 'N' is the number of pixels along the x-dimension of the image. The coordval pointer 'image' is the pixel values normalized to the range [0:1]. These values should be scaled appropriately for the output device. The 'image' data starts in the upper left corner and scans along rows finishing in the lower right corner. If 'color_mode' is IC_PALETTE, the terminal is to use palette lookup to generate color information. In this scenario the size of 'image' is M*N. If 'color_mode' is IC_RGB, successive bytes of the data structure are interpreted as RGB components of a single pixel. In this scenario the size of 'image' is 3*M*N. The data appears in RGB triples, i.e., image[0] = R(1,1), image[1] = G(1,1), image[2] = B(1,1), image[3] = R(1,2), image[4] = G(1,2), ..., image[3*M*N-1] = B(M,N). The mode IC_RGBA is similar except that four values red, green, blue, alpha per pixel are passed to the terminal in the image structure. The 'image' is actually an "input" image in the sense that it must also be properly resampled for the output device. Many output media, e.g., PostScript, do this work via various driver functions. To determine the appropriate rescaling, the 'corner' information should be used. There are four entries in the gpiPoint data array. 'corner[0]' is the upper left corner (in terms of plot location) of the outer edge of the image. Similarly, 'corner[1]' is the lower right corner of the outer edge of the image. (Outer edge means the outer extent of the corner pixels, not the middle of the corner pixels.) 'corner[2]' is the upper left corner of the visible part of the image, and 'corner[3]' is the lower right corner of the visible part of the image. The information is provided in this way because often it is necessary to clip a portion of the outer pixels of the image. _layer(t_termlayer syncpoint) Driver-specific synchronization or other layering commands. For example, the BEGIN_KEY_SAMPLE/END_KEY_SAMPLE sync points allow a driver to respond differently to mouse-clicks on the key sample than to mouse clicks elsewhere. See term_api.h for defined synchronization points. Any driver that implements term->layer() must silently ignore unrecognized syncpoints. _path(int p) PostScript-like devices make a distinction between the end of a line segment that is internal to a polyline and one that has no line-join to another segment. In order to treat the endpoints of a closed polygon as "internal" line-joins, one must bracket the polygon segments with "newpath ... closepath". term->path(0) triggers a "newpath" term->path(1) triggers a "closepath" These calls are optional, and only required by a few drivers. The following should illustrate the order in which calls to these routines are made: _options() _init() _scale(xs,ys) _graphics() _linewidth(lw) _linetype(lt) _path(0) _move(x,y) _vector(x,y) _path(1) _pointsize(size) _point(x,y,point) _text_angle(angle) _justify_text(mode) _set_font(font) _put_text(x,y,text) _enhanced_open(fontname,fontsize,base,width,show,overprint) _enhanced_writec(char) _enhanced_flush() _arrow(sx,sy,ex,ey) _image(M,N,image,corner,color_mode) _text() _graphics() . _suspend() _set_pointsize() _resume() . _text() _reset() ------------------------------------ BITMAP DEVICES A file bitmap.c is provided, implementing a generic set of bitmap routines. It provides all the routines required to generate a bitmap in memory, drawing lines and writing text. A simple driver need provide only a text() entry point, which converts and outputs the stored bitmap in the format required by the device. As of version 4.5, inclusion of bitmap.c and the terminal drivers that depend on it is controlled by ./configure --with-bitmap-terminals. This may be desirable because the license for bitmap.c is more restrictive than the gnuplot license itself, and because the terminals it supports are mostly obsolete. Internally, the bitmap is built of one or more planes of 1 bit per pixel. In fact, I think the library would be easier to use if it offered one or more planes of pixels with 1,2,4 or 8 bits per pixel, since not all bitmap devices are based on planes, and the planes have to be recombined at the end at present. In general, a device would use either planes or bits-per-pixel, though I guess a 24-bit bitmap could use 3 planes of 8 bits per pixel..? The pixels are currently organised horizontally packed into bytes. i.e. ********%%%%%%%%$$$$$$$$!!!!!!!! etc ^^^^^^^^@@@@@@@@########++++++++ etc where like symbols are stored in one byte. Vertical packing can be arranged by reversing x and y dimensions and setting the global b_rastermode to TRUE. (e.g. Epson 8-pin dot-matrix printer) Functions provided are (internal functions ? - should probably be static, not external ?) b_setpixel(x,y,value) b_setmaskpixel(x,y,value) b_putc(x,y,char,angle) b_setvalue(size) setting up stuff b_makebitmap(x,y,planes) - make a bitmap of size x * y b_freebitmap() - free bitmap b_charsize(size) gnuplot driver interface functions (can go straight into gnuplot structure) b_setlinetype(linetype) b_move(x,y) b_vector(x,y) b_put_text(x,y,*str) b_text_angle(ang) I think that the library could be made easier to use if we defined a structure which described the bitmap (raster mode, planes, bits-per-pixel, colours, etc) and then added to the gnuplot term struct a pointer to this structure. Then we could have b_graphics() routine which did all the initialisation that presently has to be done by the driver graphics() entry point. Also, one day I would like to have parsing, including terminal driver options, table-driven, but I'm getting ahead of myself here. ------------------------------------ FILE LAYOUT ----------- I think a file layout like the following will leave most flexibility to the gnuplot maintainers. I use REGIS for example. #include "driver.h" #ifdef TERM_REGISTER register_term(regis) /* no ; */ #endif #ifdef TERM_PROTO TERM_PUBLIC void REGISinit __PROTO((void)); TERM_PUBLIC void REGISgraphics __PROTO((void)); /* etc */ #define GOT_REGIS_PROTO #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY TERM_PUBLIC void REGISinit() { /* etc */ } /* etc */ #endif #ifdef TERM_TABLE TERM_TABLE_START(regis_driver) /* no { */ "regis", "REGIS graphics language", REGISXMAX, /* etc */ /* no } */ TERM_TABLE_END(regis_driver) #undef LAST_TERM #define LAST_TERM regis_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(regis) "1 regis", "?set terminal regis", "?regis", " The `regis` terminal device generates output in the REGIS graphics language.", " It has the option of using 4 (the default) or 16 colors.", "", " Syntax:", " set term regis {4 | 16}" END_HELP(regis) #endif -------------- The first three lines in the TERM_HELP section must contain the same name as that specified by register_term, since this is the name that will be entered into the list of available terminals. If more than one name is registered, the additional names should have their own two "?" lines, but not the "1" line. Each record is enclosed in double-quotes and (except for the last record) followed by a comma. The text is copied as a single string into gnuplot.doc, so the syntax must obey the rules of that entity. If the text includes double-quotes or backslashes, these must be escaped by preceding each occurrence with a backslash. -------------- Rationale: We may want to compile all drivers into term.c or one driver at a time this layout should support both TERM_PUBLIC will be static if all modules are in term.c, or blank otherwise. Please make private support functions static if possible. We may include term.h, and therefore all these files, one or more times. If just once (all modules compiled into term.c) putting the four parts in this order should make it work. We may compile the table entries into either an array or a linked list. This organisation should support both. For separate compilation, we may write a program which defines TERM_REGISTER and #include term.h to find out which drivers are selected in term.h and thereby generate a makefile. For a driver which depends on another (e.g. enhpost and pslatex on post) the driver can do something like #ifndef GOT_POST_PROTO #define TERM_PROTO_ONLY #include "post.trm" #undef TERM_PROTO_ONLY #endif this is probably needed only in the TERM_TABLE section, but may also be used in the body. The TERM_PROTO_ONLY means that we pick up only the prototypes from post.trm, even if current driver is being compiled with TERM_BODY or TERM_TABLE If we do it the linked-list way, the argument to TERM_TABLE_START will be the name of the variable, so any valid, unique name is fine. The TERM_TABLE_START macro will do all the work of linking the entries together, probably using LAST_TERM The inclusion of the TERM_HELP section (and removal of terminal documentation from the master gnuplot.doc file) means that the online help will include discussions of only those terminals available to the user. For generation of the printed manual, all can be included. Please make as many things as possible static, but do still try to use unique names since all drivers may be compiled into term.o The bit in the PROTO section is basically what you would put into a .h file if we had them - everything that is needed by the TABLE_ENTRY should be defined in this part. In particular, don't forget all the maxes and character sizes and things for the table entry. Don't forget to put TERM_PUBLIC in the definitions of the functions as well as the prototypes. It will probably always expand to 'static' except for PCs. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/svg.trm��������������������������������������������������������������������������0000644�0004711�0000144�00000201724�12151702407�012430� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: svg.trm,v 1.128.2.15 2013/05/30 05:53:14 sfeam Exp $ */ /*------------------------------------------------------------------------------------------------------------------------------------ GNUPLOT - svg.trm This file is included by ../term.c. This terminal driver supports: W3C Scalable Vector Graphics AUTHOR Amedeo Farello afarello@libero.it HEAVILY MODIFIED by Hans-Bernhard Br"oker broeker@physik.rwth-aachen.de ------------------------------------------------------------------------------------------------------------------------------------*/ /* PM3D support by Johannes Zellner <johannes@zellner.org>, May-16-2002 */ /* set_color fixes by Petr Mikulik <mikulik@physics.muni.cz>, June-10-2002 */ /* ISO-Latin encoding, Font selection fixes, option "fixed|dynamic" by * Wilhelm Braunschober <Wilhelm.Braunschober@t-online.de>, Feb-21-2002 */ /* * Additional code for gnuplot versions 4.2 and 4.3 * Ethan Merritt <merritt@u.washington.edu> * * Tweaked code for compatibility with Sodipodi svg viewer/editor. * Added enhanced text support. * Additional line properties. * Increase resolution by adding a coordinate scale factor. * Support dashed lines, TC_* color model. * Change path markup from style='attribute: foo' to attribute='foo' * * Additional code for gnuplot versions 4.5 * Ethan Merritt <merritt@u.washington.edu> * * Wrap each plot in a named group <g id="name_plot_%02d"> * Set the name using 'set term svg name "foo"' * Background option * Bitmap image support by creating and linking to external png files * Mouse-tracking with coordinate readout. * * Contributed by <plotter@piments.com> * Javascript code to toggle plots on/off */ /* * Code for gnuplot version 4.5 * Bold -> font-weight:bold * Italic -> font-style:italic * Trying to match well with PNG output. * Rich Seymour <rseymour@usc.edu> */ #include "driver.h" #ifdef TERM_REGISTER register_term(svg) #endif #ifdef TERM_PROTO TERM_PUBLIC void SVG_options __PROTO ((void)); TERM_PUBLIC void SVG_init __PROTO ((void)); TERM_PUBLIC void SVG_graphics __PROTO ((void)); TERM_PUBLIC void SVG_text __PROTO ((void)); TERM_PUBLIC void SVG_linetype __PROTO ((int linetype)); TERM_PUBLIC void SVG_move __PROTO ((unsigned int x, unsigned int y)); TERM_PUBLIC void SVG_vector __PROTO ((unsigned int x, unsigned int y)); TERM_PUBLIC void SVG_put_text __PROTO ((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void SVG_reset __PROTO ((void)); TERM_PUBLIC int SVG_justify_text __PROTO ((enum JUSTIFY mode)); TERM_PUBLIC int SVG_text_angle __PROTO ((int ang)); TERM_PUBLIC void SVG_point __PROTO ((unsigned int x, unsigned int y, int pointstyle)); TERM_PUBLIC int SVG_set_font __PROTO ((const char *font)); /* TERM_PUBLIC void SVG_pointsize __PROTO((double pointsize)); */ TERM_PUBLIC void SVG_fillbox __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); TERM_PUBLIC void SVG_linewidth __PROTO ((double linewidth)); TERM_PUBLIC int SVG_make_palette __PROTO((t_sm_palette *)); TERM_PUBLIC void SVG_previous_palette __PROTO((void)); TERM_PUBLIC void SVG_set_color __PROTO((t_colorspec *)); TERM_PUBLIC void SVG_filled_polygon __PROTO((int, gpiPoint *)); TERM_PUBLIC void SVG_layer __PROTO((t_termlayer syncpoint)); TERM_PUBLIC void ENHsvg_OPEN __PROTO((char *, double, double, TBOOLEAN, TBOOLEAN, int)); TERM_PUBLIC void ENHsvg_FLUSH __PROTO((void)); TERM_PUBLIC void ENHsvg_put_text __PROTO((unsigned int, unsigned int, const char *)); TERM_PUBLIC void ENHsvg_writec __PROTO((int)); TERM_PUBLIC void SVG_path __PROTO((int p)); #ifdef WRITE_PNG_IMAGE TERM_PUBLIC void SVG_image __PROTO((unsigned m, unsigned n, coordval *image, gpiPoint *corner, t_imagecolor color_mode)); #endif #define SVG_SCALE 10. #define Y(y) ((float)((int)term->ymax - (int)y) / SVG_SCALE) #define X(x) ((float)(x) / SVG_SCALE) #define SVG_XMAX (600 * SVG_SCALE) #define SVG_YMAX (480 * SVG_SCALE) #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static t_sm_palette SVG_palette; static unsigned char SVG_red = 0; static unsigned char SVG_green = 0; static unsigned char SVG_blue = 0; static unsigned char SVG_color_mode = TC_DEFAULT; static char *SVG_linecolor = NULL; static char *SVG_name = NULL; static char *SVG_scriptdir = NULL; static TBOOLEAN SVG_mouseable = FALSE; static TBOOLEAN SVG_standalone = FALSE; static TBOOLEAN SVG_groupFilledIsOpen = FALSE; /* open pm3d group flag*/ struct SVG_PEN { double width; char color[8]; }; static unsigned int SVG_xSize = SVG_XMAX; /* plot horizontal size */ static unsigned int SVG_ySize = SVG_YMAX; /* plot vertical size*/ static TBOOLEAN SVG_fixed_size = TRUE; /* make SVG viewer size fixed */ static unsigned int SVG_xLast = UINT_MAX; /* current pen horizontal position*/ static unsigned int SVG_yLast = UINT_MAX; /* current pen vertical position*/ static int SVG_LineType = LT_NODRAW; /* current line type*/ static double SVG_LineWidth = 1.0; /* current line width*/ static double SVG_linewidth_factor = 1.0; /* Multiplier for linewidths */ static TBOOLEAN SVG_rounded = FALSE; /* linejoin and linecap */ static int SVG_TextAngle = 0; /* current text orientation*/ static enum JUSTIFY SVG_TextJust = LEFT; /* current text justification*/ /* default text font family: */ static char *SVG_fontNameDef = NULL; static char *SVG_fontStyleDef = NULL; /* default font style */ static char *SVG_fontWeightDef = NULL; /* default font weight */ static double SVG_fontSizeDef = 12; /* default text size*/ /* current text font family: */ static char *SVG_fontNameCur = NULL; static char *SVG_fontStyleCur = NULL; /* current font style */ static char *SVG_fontWeightCur = NULL; /* current font weight */ static double SVG_fontSizeCur = 12; /* current text size*/ static TBOOLEAN SVG_groupIsOpen = FALSE; /* open group flag*/ static TBOOLEAN SVG_pathIsOpen = FALSE; /* open path flag*/ static unsigned int SVG_path_count = 0; /* size of current path*/ static struct SVG_PEN SVG_pens[16]; /* pen descriptors*/ static int SVG_fillPattern = -1; /* active fill pattern (-1 == undefined) */ static unsigned int SVG_fillPatternIndex = 0; static int SVG_background = -1; static int SVG_imageno = 0; static int SVG_plotno = 0; static TBOOLEAN SVG_gridline = FALSE; static TBOOLEAN SVG_hasgrid = FALSE; static int SVG_fontAscent = 0; /* estimated current font ascent*/ static int SVG_fontDescent = 0; /* estimated current font descent*/ static int SVG_fontLeading = 0; /* estimated current font leading*/ static int SVG_fontAvWidth = 0; /* estimated current font char average width*/ static short SVG_Pen_RealID __PROTO ((int)); static void SVG_PathOpen __PROTO ((void)); static void SVG_PathClose __PROTO ((void)); static void SVG_PathLimit __PROTO ((void)); static void SVG_GroupOpen __PROTO ((void)); static void SVG_GroupClose __PROTO ((void)); static void SVG_SetFont __PROTO ((const char *name, double size)); static void SVG_GroupFilledOpen __PROTO ((void)); static void SVG_GroupFilledClose __PROTO ((void)); static void SVG_StyleColor __PROTO((const char*)); static void SVG_StyleFillColor __PROTO((void)); static void SVG_local_reset __PROTO((void)); static void SVG_DefineFillPattern __PROTO((int fillpat)); static void SVG_MoveForced __PROTO((unsigned int x, unsigned int y)); /* Points to source of requested embedded font */ static char *SVG_embedded_font = NULL; static void SVG_load_fontfile __PROTO((char *fontfile)); /* Stuff for enhanced text mode */ static int ENHsvg_string_state = 0; static double ENHsvg_x_offset = 0; static TBOOLEAN ENHsvg_preserve_spaces = FALSE; /* Support for dashed lines */ #define SVG_dashtypes 5 static TBOOLEAN SVG_dashed = FALSE; static char *SVG_dashpattern[SVG_dashtypes] = { "", " 5,8", " 2,4", " 8,4,2,4", " 9,4,1,4,1,4" }; /*------------------------------------------------------------------------------------------------------------------------------------ SVG_Pen_RealID ------------------------------------------------------------------------------------------------------------------------------------*/ static short SVG_Pen_RealID (int inPenCode) { if (inPenCode >= 13) inPenCode %= 13; /* normalize pen code*/ inPenCode += 3; if (inPenCode < 0) inPenCode = 0; /* LT_NODRAW or LT_BACKGROUND should use background color */ return (inPenCode); } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_GroupOpen ------------------------------------------------------------------------------------------------------------------------------------*/ static void SVG_GroupOpen () { SVG_GroupFilledClose(); if (!SVG_groupIsOpen) { fprintf (gpoutfile, "<g style=\"fill:none; color:%s; stroke:", SVG_pens[SVG_Pen_RealID (SVG_LineType)].color); if (SVG_color_mode == TC_RGB) fprintf(gpoutfile, "rgb(%3d, %3d, %3d)", SVG_red, SVG_green, SVG_blue); else if (SVG_color_mode == TC_LT) fprintf(gpoutfile, "%s", SVG_linecolor); else fprintf(gpoutfile, "currentColor"); fprintf (gpoutfile, "; stroke-width:%.2f; stroke-linecap:%s; stroke-linejoin:%s", SVG_pens[SVG_Pen_RealID (SVG_LineType)].width * SVG_linewidth_factor, SVG_rounded ? "round" : "butt", SVG_rounded ? "round" : "miter"); fprintf (gpoutfile, "\">\n"); SVG_groupIsOpen = TRUE; } } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_GroupClose ------------------------------------------------------------------------------------------------------------------------------------*/ static void SVG_GroupClose () { SVG_GroupFilledClose(); if (SVG_groupIsOpen) { fputs ("</g>\n", gpoutfile); SVG_groupIsOpen = FALSE; SVG_fillPattern = -1; } } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_PathOpen ------------------------------------------------------------------------------------------------------------------------------------*/ static void SVG_PathOpen () { if (!SVG_pathIsOpen) { SVG_GroupFilledClose(); fputs ("\t<path ", gpoutfile); /* Line color */ if (SVG_color_mode == TC_RGB) fprintf(gpoutfile, "stroke='rgb(%3d, %3d, %3d)' ", SVG_red, SVG_green, SVG_blue); else if (SVG_color_mode == TC_LT) fprintf(gpoutfile, "stroke='%s' ", SVG_linecolor); /* Dash patterns */ if (SVG_dashed && SVG_LineType % SVG_dashtypes > 0) fprintf(gpoutfile, "stroke-dasharray='%s' ", SVG_dashpattern[SVG_LineType % SVG_dashtypes]); /* Axis is dotted */ else if (SVG_LineType == -1) fprintf(gpoutfile, "stroke-dasharray='%s' ", SVG_dashpattern[2]); /* Mark grid lines so that we can toggle them on/off */ if (SVG_gridline) fprintf(gpoutfile, "class=\"gridline\" "); fputs (" d='", gpoutfile); SVG_pathIsOpen = TRUE; } } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_PathClose ------------------------------------------------------------------------------------------------------------------------------------*/ static void SVG_PathClose () { if (SVG_pathIsOpen) { SVG_GroupFilledClose(); /* FIXME: HORRIBLE KLUDGE TO WORK AROUNG BUG IN FIREFOX V3.x */ fprintf(gpoutfile," h0.01'/>"); SVG_path_count = 0; SVG_pathIsOpen = FALSE; } } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_PathLimit ------------------------------------------------------------------------------------------------------------------------------------*/ static void SVG_PathLimit () { if (SVG_path_count % 8 == 0) /* avoid excessive line length*/ fputs ("\n\t\t", gpoutfile); } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_SetFont ------------------------------------------------------------------------------------------------------------------------------------*/ static void SVG_SetFont (const char *name, double size) { if (name != SVG_fontNameCur) { free(SVG_fontNameCur); SVG_fontNameCur = gp_strdup(name); } SVG_fontSizeCur = size; /* since we cannot interrogate SVG about text properties and according * to SVG 1.0 W3C Candidate Recommendation 2 August 2000 the * "line-height" of the 'text' element is defined to be equal to the * 'font-size' (!), we have to to define font properties in a less * than optimal way */ SVG_fontAscent = (int) (SVG_fontSizeCur * 1.00 * SVG_SCALE); SVG_fontDescent = (int) (SVG_fontSizeCur * 0.25 * SVG_SCALE); SVG_fontLeading = (int) (SVG_fontSizeCur * 0.25 * SVG_SCALE); SVG_fontAvWidth = (int) (SVG_fontSizeCur * 0.70 * SVG_SCALE); term->h_char = SVG_fontAvWidth; term->v_char = (SVG_fontAscent + SVG_fontDescent + SVG_fontLeading); } static void SVG_GroupFilledOpen() { if (!SVG_groupFilledIsOpen) { SVG_PathClose(); fputs("\t<g style = 'stroke:none; shape-rendering:crispEdges'>\n", gpoutfile); SVG_groupFilledIsOpen = TRUE; } } static void SVG_GroupFilledClose() { if (SVG_groupFilledIsOpen) { fputs("\t</g>\n", gpoutfile); SVG_groupFilledIsOpen = FALSE; } } static void SVG_StyleColor(const char* paint) { if (SVG_color_mode == TC_RGB) fprintf(gpoutfile, "%s = 'rgb(%3d, %3d, %3d)'", paint, SVG_red, SVG_green, SVG_blue); else if (SVG_color_mode == TC_LT) fprintf(gpoutfile, "%s = '%s'", paint, SVG_linecolor); else fprintf(gpoutfile, "%s = 'currentColor'", paint); } static void SVG_StyleFillColor() { SVG_StyleColor("fill"); } static void SVG_DefineFillPattern(int fillpat) { char *path; char *style="stroke"; fillpat %= 8; if (fillpat != SVG_fillPattern) { SVG_fillPattern = fillpat; SVG_PathClose(); SVG_fillPatternIndex++; fprintf(gpoutfile, "\t<defs>\n" "\t\t<pattern id='gpPat%d' patternUnits='userSpaceOnUse' x='0' y='0' width='8' height='8'>\n", SVG_fillPatternIndex); switch (fillpat) { default: case 0: path=""; break; case 1: path="M0,0 L8,8 M0,8 L8,0"; break; case 2: path="M0,0 L8,8 M0,8 L8,0 M0,4 L4,8 L8,4 L4,0 L0,4"; break; case 3: path="M0,0 L0,8 L8,8 L8,0 L0,0"; style="fill"; break; case 4: path="M-4,0 L8,12 M0,-4 L12,8"; break; case 5: path="M-4,8 L8,-4 M0,12 L12,0"; break; case 6: path="M-2,8 L4,-4 M0,12 L8,-4 M4,12 L10,0"; break; case 7: path="M-2,0 L4,12 M0,-4 L8,12 M4,-4 L10,8"; break; } if (*path) { char *figure = "fill:none;"; if (!strcmp(style,"fill")) figure = "stroke:none;"; if (SVG_color_mode == TC_RGB) fprintf(gpoutfile,"\t\t\t<path style='%s %s:rgb(%d,%d,%d)' d='%s'/>\n", figure, style, SVG_red, SVG_green, SVG_blue, path); else if (SVG_color_mode == TC_LT) fprintf(gpoutfile, "\t\t\t<path style = '%s %s:%s' d= '%s'/>\n", figure, style, SVG_linecolor, path); else fprintf(gpoutfile, "\t\t\t<path style = '%s %s:currentColor' d='%s'/>\n", figure, style, path); } fputs("\t\t</pattern>\n" "\t</defs>\n", gpoutfile); } } static void SVG_MoveForced(unsigned int x, unsigned int y) { if (SVG_path_count > 512) SVG_PathClose(); SVG_PathOpen (); fprintf (gpoutfile, "M%.1f,%.1f ", X(x), Y(y)); SVG_path_count++; SVG_PathLimit (); SVG_xLast = x; SVG_yLast = y; } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_options ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_options () { /* Annoying hack to handle the case of 'set termoption' after */ /* we have already initialized the terminal settings. */ if (c_token != 2) SVG_local_reset(); while (!END_OF_COMMAND) { if (almost_equals(c_token, "s$ize")) { double value; c_token++; if (END_OF_COMMAND) int_error(c_token,"expecting x size"); value = real_expression(); if (value < 2) int_error(c_token,"x size out of range"); SVG_xSize = value * SVG_SCALE; if (equals(c_token,",")) c_token++; if (END_OF_COMMAND) int_error(c_token,"expecting y size"); value = real_expression(); if (value < 2) int_error(c_token,"y size out of range"); SVG_ySize = value * SVG_SCALE; continue; } if (equals(c_token, "mouse") || almost_equals(c_token, "mous$ing")) { c_token++; SVG_mouseable = TRUE; continue; } if (almost_equals(c_token, "stand$alone")) { c_token++; SVG_standalone = TRUE; continue; } if (equals(c_token, "name")) { c_token++; SVG_name = try_to_get_string(); if (!SVG_name) int_error(c_token,"expecting a plot name"); if (SVG_name[strspn(SVG_name, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_1234567890")]) int_error(c_token-1,"name must contain only alphanumerics or _"); continue; } if (equals(c_token, "jsdir")) { c_token++; SVG_scriptdir = try_to_get_string(); continue; } if (almost_equals(c_token, "d$ynamic")) { c_token++; SVG_fixed_size = FALSE; continue; } if (almost_equals(c_token, "fi$xed")){ c_token++; SVG_fixed_size = TRUE; continue; } if (almost_equals(c_token, "enh$anced")) { c_token++; term->put_text = ENHsvg_put_text; term->flags |= TERM_ENHANCED_TEXT; continue; } if (almost_equals(c_token, "noenh$anced")) { c_token++; term->put_text = SVG_put_text; term->flags &= ~TERM_ENHANCED_TEXT; continue; } if (almost_equals(c_token, "fn$ame") || almost_equals(c_token, "font")) { char *s, *comma; c_token++; if (!(s = try_to_get_string())) int_error(c_token,"expecting font name"); comma = strrchr(s,','); if (comma && (1 == sscanf(comma + 1, "%lf", &SVG_fontSizeDef))) *comma = '\0'; if (*s) { char *bold, *italic; if (!((bold = strstr(s," bold")))) bold = strstr(s," Bold"); if (!((italic = strstr(s," italic")))) italic = strstr(s," Italic"); free(SVG_fontNameDef); SVG_fontNameDef = s; if (italic) { SVG_fontStyleDef = "italic"; SVG_fontNameDef[strlen(s) - strlen(italic)] = NUL; } else { SVG_fontStyleDef = "normal"; } if (bold) { SVG_fontWeightDef="bold"; SVG_fontNameDef[strlen(s) - strlen(bold)] = NUL; } else { SVG_fontWeightDef = "normal"; } } else free(s); continue; } if (almost_equals(c_token, "fs$ize")) { c_token++; if (END_OF_COMMAND) int_error(c_token,"fsize: expecting font size"); SVG_fontSizeDef = real_expression(); continue; } if (almost_equals(c_token, "fontfile")) { char *fontfile_name; c_token++; fontfile_name = try_to_get_string(); if (!fontfile_name) int_error(c_token, "Font filename expected"); gp_expand_tilde(&fontfile_name); #if defined(PIPES) if ( *fontfile_name == '<' ) { SVG_embedded_font = fontfile_name; } else #endif SVG_embedded_font = fontpath_fullname(fontfile_name); if (!SVG_embedded_font) int_error(c_token, "Font file '%s' not found", fontfile_name); continue; } if (almost_equals(c_token, "linew$idth") || equals(c_token, "lw")) { c_token++; SVG_linewidth_factor = real_expression(); if (SVG_linewidth_factor <= 0.0) SVG_linewidth_factor = 1.0; continue; } if (almost_equals (c_token, "round$ed")) { c_token++; SVG_rounded = TRUE; continue; } if (equals (c_token, "butt")) { c_token++; SVG_rounded = FALSE; continue; } if (equals(c_token, "solid")) { c_token++; SVG_dashed = FALSE; continue; } if (almost_equals(c_token, "dash$ed")) { c_token++; SVG_dashed = TRUE; continue; } if (almost_equals(c_token, "backg$round")) { c_token++; SVG_background = parse_color_name(); continue; } int_error(c_token, "unrecognized terminal option"); } /* I don't think any error checks on font name are possible; just set it */ SVG_set_font(""); /* Save options back into options string in normalized format */ sprintf(term_options, "size %d,%d%s %s fname '%s' fsize %g ", (int)(SVG_xSize/SVG_SCALE), (int)(SVG_ySize/SVG_SCALE), SVG_fixed_size ? " fixed": " dynamic", term->put_text == ENHsvg_put_text ? "enhanced" : "", SVG_fontNameCur, SVG_fontSizeCur); if (SVG_mouseable) { sprintf(term_options + strlen(term_options), "mousing "); } if (SVG_standalone) { sprintf(term_options + strlen(term_options), "standalone "); } if (SVG_name) { sprintf(term_options + strlen(term_options), "name \"%s\" ", SVG_name); } if (SVG_embedded_font) { sprintf(term_options + strlen(term_options), "fontfile \"%s\" ", SVG_embedded_font); } sprintf(term_options + strlen(term_options), SVG_rounded ? "rounded " : "butt "); sprintf(term_options + strlen(term_options), SVG_dashed ? "dashed " : "solid "); if (SVG_linewidth_factor != 1.0) { sprintf(term_options + strlen(term_options), "linewidth %3.1f ", SVG_linewidth_factor); } if (SVG_background >= 0) { sprintf(term_options + strlen(term_options), "background \"#%06x\" ", SVG_background); } } static void SVG_local_reset() { SVG_xSize = SVG_XMAX; SVG_ySize = SVG_YMAX; SVG_fixed_size = TRUE; free(SVG_fontNameDef); SVG_fontNameDef = gp_strdup("Arial"); SVG_fontSizeDef = 12; if (SVG_embedded_font) free(SVG_embedded_font); SVG_embedded_font = NULL; SVG_mouseable = FALSE; SVG_standalone = FALSE; free(SVG_name); SVG_name = NULL; free(SVG_scriptdir); SVG_scriptdir = NULL; SVG_gridline = FALSE; SVG_hasgrid = FALSE; } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_init ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_init () { int len; double stroke_width; char *svg_encoding = ""; /* setup pens*/ SVG_pens[0].width = SVG_LineWidth; strcpy (SVG_pens[0].color, "white"); /* should really be background */ SVG_pens[1].width = SVG_LineWidth; strcpy(SVG_pens[1].color, "black"); SVG_pens[2].width = SVG_LineWidth; strcpy(SVG_pens[2].color, "gray"); SVG_pens[3].width = SVG_LineWidth; strcpy(SVG_pens[3].color, "red"); SVG_pens[4].width = SVG_LineWidth; strcpy(SVG_pens[4].color, "green"); SVG_pens[5].width = SVG_LineWidth; strcpy(SVG_pens[5].color, "blue"); SVG_pens[6].width = SVG_LineWidth; strcpy(SVG_pens[6].color, "cyan"); SVG_pens[7].width = SVG_LineWidth; sprintf(SVG_pens[7].color, "#%2.2X%2.2X%2.2X", 21, 117, 69); /* pine green*/ SVG_pens[8].width = SVG_LineWidth; sprintf (SVG_pens[8].color, "#%2.2X%2.2X%2.2X", 0, 0, 148); /* navy*/ SVG_pens[9].width = SVG_LineWidth; sprintf (SVG_pens[9].color, "#%2.2X%2.2X%2.2X", 255, 153, 0); /* orange*/ SVG_pens[10].width = SVG_LineWidth; sprintf (SVG_pens[10].color, "#%2.2X%2.2X%2.2X", 0, 153, 161); /* green blue*/ SVG_pens[11].width = SVG_LineWidth; sprintf (SVG_pens[11].color, "#%2.2X%2.2X%2.2X", 214, 214, 69); /* olive*/ SVG_pens[12].width = SVG_LineWidth; sprintf (SVG_pens[12].color, "#%2.2X%2.2X%2.2X", 163, 145, 255); /* cornflower*/ SVG_pens[13].width = SVG_LineWidth; sprintf (SVG_pens[13].color, "#%2.2X%2.2X%2.2X", 255, 204, 0); /* gold*/ SVG_pens[14].width = SVG_LineWidth; sprintf (SVG_pens[14].color, "#%2.2X%2.2X%2.2X", 214, 0, 120); /* mulberry*/ SVG_pens[15].width = SVG_LineWidth; sprintf (SVG_pens[15].color, "#%2.2X%2.2X%2.2X", 171, 214, 0); /* green yellow*/ if (SVG_background >= 0) sprintf(SVG_pens[0].color, "#%2.2X%2.2X%2.2X", (SVG_background >> 16)&0xff, (SVG_background >> 8)&0xff, (SVG_background)&0xff); SVG_LineType = LT_NODRAW; /* set xmax, ymax*/ term->xmax = SVG_xSize; term->ymax = SVG_ySize; /* set current font, including h_char and v_char */ SVG_SetFont (SVG_fontNameCur, SVG_fontSizeCur); /* set h_tic, v_tic*/ term->h_tic = term->v_char / 2; term->v_tic = term->v_char / 2; /* write file header*/ switch (encoding) { case S_ENC_ISO8859_1: svg_encoding = "encoding=\"iso-8859-1\" "; break; case S_ENC_ISO8859_2: svg_encoding = "encoding=\"iso-8859-2\" "; break; case S_ENC_ISO8859_9: svg_encoding = "encoding=\"iso-8859-9\" "; break; case S_ENC_ISO8859_15: svg_encoding = "encoding=\"iso-8859-15\" "; break; case S_ENC_CP850: svg_encoding = "encoding=\"ibm-850\" "; break; case S_ENC_CP852: svg_encoding = "encoding=\"ibm-852\" "; break; case S_ENC_CP950: svg_encoding = "encoding=\"cp950\" "; break; case S_ENC_CP1250: svg_encoding = "encoding=\"windows-1250\" "; break; case S_ENC_CP1251: svg_encoding = "encoding=\"windows-1251\" "; break; case S_ENC_KOI8_R: svg_encoding = "encoding=\"koi8-r\" "; break; case S_ENC_KOI8_U: svg_encoding = "encoding=\"koi8-u\" "; break; case S_ENC_SJIS: svg_encoding = "encoding=\"Shift_JIS\" "; break; case S_ENC_CP437: svg_encoding = ""; break; default: /* UTF-8 */ svg_encoding = "encoding=\"utf-8\" "; break; } fprintf (gpoutfile, "<?xml version=\"1.0\" %s standalone=\"no\"?>\n" "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \n" " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n" "<svg ", svg_encoding); if (SVG_mouseable) fprintf (gpoutfile, "onload=\"if (typeof(gnuplot_svg)!='undefined') gnuplot_svg.Init(evt)\" "); if (SVG_fixed_size) fprintf (gpoutfile, "\n width=\"%u\" height=\"%u\" ", (unsigned int) (term->xmax / SVG_SCALE), (unsigned int) (term->ymax / SVG_SCALE)); fprintf (gpoutfile, "\n viewBox=\"0 0 %u %u\"\n", (unsigned int) (term->xmax / SVG_SCALE), (unsigned int) (term->ymax / SVG_SCALE)); fprintf (gpoutfile, " xmlns=\"http://www.w3.org/2000/svg\"\n"); fprintf (gpoutfile, " xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n"); #if (0) /* This should be required, but Firefox gets it totally wrong */ fprintf (gpoutfile, " xml:space=\"preserve\"\n"); #endif fprintf (gpoutfile, ">\n\n"); /* TODO: It would be nice to print the actual plot title here */ fprintf (gpoutfile, "<title>%s\n", SVG_name ? SVG_name : "Gnuplot"); fprintf (gpoutfile, "Produced by GNUPLOT %s patchlevel %s \n\n", gnuplot_version, gnuplot_patchlevel); /* * FIXME: This code could be shared with canvas.trm * Figure out the full URL to use for xlink:href="gnuplot_svg.js" */ if (SVG_scriptdir == NULL) { char *svg_default_jsdir = ""; #ifdef GNUPLOT_JS_DIR # if defined(_Windows) /* retrieve path relative to the gnuplot executable, * whose path is in szModuleName (winmain.c) */ /* EAM FIXME: memory leak */ svg_default_jsdir = gp_alloc(strlen((char*) szPackageDir) + strlen(GNUPLOT_JS_DIR) + 2, "jsdir"); strcpy(svg_default_jsdir, (char*) szPackageDir); len = strlen(svg_default_jsdir); if (*svg_default_jsdir && svg_default_jsdir[len-1] != '\\' && svg_default_jsdir[len-1] != '/') strcat(svg_default_jsdir, "\\"); /* GNUPLOT_JS_DIR is _relative_ path */ strcat(svg_default_jsdir, GNUPLOT_JS_DIR); # else /* !_Windows */ /* use hardcoded _absolute_ path */ svg_default_jsdir = GNUPLOT_JS_DIR; # endif #endif /* GNUPLOT_JS_DIR */ SVG_scriptdir = gp_strdup(svg_default_jsdir); } #if !defined(VMS) len = strlen(SVG_scriptdir); # if defined(_Windows) if (*SVG_scriptdir && SVG_scriptdir[len-1] != '\\' && SVG_scriptdir[len-1] != '/') { SVG_scriptdir = gp_realloc(SVG_scriptdir, len+2, "jsdir"); if (SVG_scriptdir[len-1] == '\\') /* use backslash if used in jsdir, otherwise slash */ strcat(SVG_scriptdir,"\\"); else strcat(SVG_scriptdir,"/"); } # else if (*SVG_scriptdir && SVG_scriptdir[len-1] != '/') { SVG_scriptdir = gp_realloc(SVG_scriptdir, len+2, "jsdir"); strcat(SVG_scriptdir,"/"); } # endif #endif if (SVG_mouseable) { /* Inclusion of gnuplot_svg.js is sufficient to support toggling plots on/off */ if (!SVG_standalone) { fprintf(gpoutfile, "\n"); fclose(svg_js_fd); } free(fullname); } } if (SVG_mouseable) { /* FIXME: Should only do this for 2D plots */ /* This is extra code to support tracking the mouse coordinates */ fprintf(gpoutfile,"\n\n"); fprintf(gpoutfile,"xmax/SVG_SCALE), (int)(term->ymax/SVG_SCALE)); fprintf(gpoutfile," fill=\"#%06x\" stroke=\"black\" stroke-width=\"1\"\n", SVG_background>0 ? SVG_background : 0xffffff); fprintf(gpoutfile,"onclick=\"gnuplot_svg.toggleCoordBox(evt)\" onmousemove=\"gnuplot_svg.moveCoordBox(evt)\"/>\n"); fprintf(gpoutfile,"\n\n"); fprintf(gpoutfile,"\n\n"); } else { fprintf(gpoutfile,"\n\n"); fprintf(gpoutfile,"xmax/SVG_SCALE), (int)(term->ymax/SVG_SCALE)); if (SVG_background >= 0) fprintf(gpoutfile," fill=\"#%06x\"", SVG_background); else fprintf(gpoutfile," fill=\"none\""); fprintf(gpoutfile,"/>\n"); } /* Start prologue section of output file, and load fonts if requested */ fprintf(gpoutfile,"\n"); if (SVG_embedded_font) SVG_load_fontfile(SVG_embedded_font); /* definitions of point symbols */ /* FIXME: SVG scales linewidth along with the marker itself, and * there seems to be no way to avoid that without copying the * marker definition into the file, rather than referencing a * defined one :-( That would make for much larger files */ /* "\t\n" */ stroke_width = 2.0 *SVG_SCALE / term->h_tic; fprintf (gpoutfile, "\n" /* dot: */ "\t\n" /* 0 plus */ "\t\n" /* 1 X */ "\t\n" /* 2 star */ "\t\n" /* 3 box */ "\t\n" /* 4 box filled */ "\t\n" /* 5 circle */ "\t\n" /* 6 circle (disk) filled */ "\t\n" /* 7 triangle */ "\t\n" /* 8 triangle filled */ "\t\n" /* 9 upside down triangle */ "\t\n" /* 10 upside down triangle filled */ "\t\n" /* 11 diamond */ "\t\n" /* 12 diamond filled */ "\t\n" /* NOTE: Fill patterns must be defined after the stroke color has been * set to use the correct (current) stroke color. Therefore we can't * define fill patterns here. */ "\n" , stroke_width , stroke_width , stroke_width , stroke_width , stroke_width , stroke_width , stroke_width ); } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_graphics ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_graphics () { /* EAM 5-May-2004 We must force a new group with fill:none in order for */ /* multiple plots per page to work. Otherwise new plots are black-filled */ SVG_GroupOpen(); SVG_fillPattern = -1; SVG_fillPatternIndex = 0; SVG_groupFilledIsOpen = FALSE; SVG_color_mode = TC_DEFAULT; SVG_pathIsOpen = FALSE; /* reset position*/ SVG_xLast = SVG_yLast = UINT_MAX; } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_text ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_text () { SVG_PathClose (); SVG_GroupClose (); if (SVG_mouseable) { struct udvt_entry *udv; fprintf(gpoutfile, "\n\n"); } /* End of section writing out variables for mousing */ /* Close off the group with id=gnuplot_canvas that wraps the entire plot */ fprintf(gpoutfile,"\n"); /* Now create a text element to hold the mouse-tracking text. */ /* It comes _after_ the plot group so that it floats on top. */ if (SVG_mouseable) { fprintf(gpoutfile,"\n \n"); } /* If there were any grid lines in this plot, add a button to toggle them */ if (SVG_mouseable && SVG_hasgrid) { fprintf(gpoutfile,"\n ymax/SVG_SCALE)-26); fprintf(gpoutfile," onclick='gnuplot_svg.toggleGrid();'/>\n"); } } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_reset ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_reset () { fputs("\n\n", gpoutfile); } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_linetype ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_linetype (int linetype) { SVG_color_mode = TC_DEFAULT; if (linetype != SVG_LineType) { SVG_PathClose (); SVG_GroupClose (); SVG_LineType = linetype; SVG_GroupOpen (); } } TERM_PUBLIC void SVG_fillbox(int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height) { gpiPoint corner[4]; corner[0].x = x1; corner[0].y = y1; corner[1].x = x1+width; corner[1].y = y1; corner[2].x = x1+width; corner[2].y = y1+height; corner[3].x = x1; corner[3].y = y1+height; corner->style = style; SVG_filled_polygon(4, corner); } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_linewidth - verificare ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_linewidth (double linewidth) { if (linewidth != SVG_LineWidth) { short k; SVG_LineWidth = linewidth; for (k = 0; k < 16; k++) SVG_pens[k].width = SVG_LineWidth; SVG_PathClose (); SVG_GroupClose (); SVG_GroupOpen (); } } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_move ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_move (unsigned int x, unsigned int y) { if (x != SVG_xLast || y != SVG_yLast) { SVG_MoveForced(x, y); } } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_vector ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_vector (unsigned int x, unsigned int y) { if (x != SVG_xLast || y != SVG_yLast) { if (!SVG_pathIsOpen) { /* The SVG 'path' MUST have a 'moveto' as first command. */ SVG_MoveForced(SVG_xLast, SVG_yLast); } fprintf (gpoutfile, "L%.1f,%.1f ", X(x), Y(y)); SVG_path_count++; SVG_PathLimit (); SVG_xLast = x; SVG_yLast = y; } } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_point ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_point (unsigned int x, unsigned int y, int number) { char color_spec[0x40]; if (SVG_color_mode == TC_RGB) sprintf(color_spec, " color='rgb(%3d, %3d, %3d)'", SVG_red, SVG_green, SVG_blue); else if (SVG_color_mode == TC_LT) sprintf(color_spec, " color='%s'", SVG_linecolor); else *color_spec = '\0'; SVG_PathClose (); if (number < 0) { /* do dot */ fprintf (gpoutfile, "\ \t\n", X(x), Y(y), color_spec); } else { /* draw a point symbol */ fprintf (gpoutfile, "\ \t\ \n", number % 13, X(x), Y(y), term_pointsize * term->h_tic / (2 * SVG_SCALE), color_spec); } SVG_xLast = x; SVG_yLast = y; } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_justify_text ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC int SVG_justify_text (enum JUSTIFY mode) { SVG_TextJust = mode; return (TRUE); } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_text_angle ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC int SVG_text_angle (int ang) { /* Can only do pure horizontal or vertical */ SVG_TextAngle = ang; return (TRUE); } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_put_text ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_put_text (unsigned int x, unsigned int y, const char *str) { char *alignment; int h = x, v = y; SVG_PathClose (); /* horizontal justification*/ switch (SVG_TextJust) { case LEFT: alignment = "start"; break; case CENTRE: alignment = "middle"; break; case RIGHT: default: /* can't happen, just to make gcc happy */ alignment = "end"; break; } /* vertical justification*/ if (SVG_TextAngle % 180) { /* vertical text */ h += (SVG_fontAscent - SVG_fontDescent) / 2; } else { /* horizontal text */ v -= (SVG_fontAscent - SVG_fontDescent) / 2; } /* define text position and attributes */ fprintf (gpoutfile, "\t\n", alignment); /* output text (unless the enhanced_text processing is in action) */ if (strstr(str," ")) fputs ("\t\t", gpoutfile); else fputs ("\t\t", gpoutfile); if (!ENHsvg_string_state) { while (*str) { /* Escape SVG reserved characters */ switch (*str) { case '<': fputs("<", gpoutfile); break; case '&': if (str[1] == '#' && str[2] == 'x') fputc(*str, gpoutfile); else fputs("&", gpoutfile); break; default: fputc(*str, gpoutfile); break; } str++; } fputs("\n\t\n", gpoutfile); } } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_set_font ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC int SVG_set_font (const char *font) { if (!font || !(*font)) { free(SVG_fontNameCur); SVG_fontNameCur = gp_strdup(SVG_fontNameDef); SVG_fontSizeCur = SVG_fontSizeDef; SVG_fontStyleCur = SVG_fontStyleDef; SVG_fontWeightCur = SVG_fontWeightDef; } else { char *bold, *italic; int sep; if (!((bold = strstr(font," bold")))) bold = strstr(font," Bold"); if (!((italic = strstr(font," italic")))) italic = strstr(font," Italic"); sep = strcspn(font,","); if (sep > 0) { free(SVG_fontNameCur); SVG_fontNameCur = gp_strdup(font); if (italic) { SVG_fontStyleCur="italic"; SVG_fontNameCur[strlen(font) - strlen(italic)] = NUL; } else { SVG_fontStyleCur="normal"; } if (bold) { SVG_fontWeightCur="bold"; SVG_fontNameCur[strlen(font) - strlen(bold)] = NUL; } else { SVG_fontWeightCur="normal"; } SVG_fontNameCur[sep] = NUL; } if (font[sep] == ',') sscanf(font + sep + 1, "%lf", &SVG_fontSizeCur); } /* Set other font metrics */ SVG_SetFont(SVG_fontNameCur, SVG_fontSizeCur); return (TRUE); } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_make_palette ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC int SVG_make_palette(t_sm_palette *palette) { SVG_GroupFilledClose(); if (palette == NULL) { /* svg can do continuous colors */ return 0; } /* save mapping formulae needed if SMPAL_COLOR_MODE_RGB */ SVG_palette.colorMode = palette->colorMode; SVG_palette.formulaR = palette->formulaR; SVG_palette.formulaG = palette->formulaG; SVG_palette.formulaB = palette->formulaB; SVG_palette.positive = palette->positive; return 0; } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_set_color ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_set_color(t_colorspec *colorspec) { rgb255_color rgb255; if (colorspec->type == TC_LT) { SVG_linecolor = SVG_pens[SVG_Pen_RealID (colorspec->lt)].color; SVG_color_mode = TC_LT; return; } else if (colorspec->type == TC_FRAC) rgb255maxcolors_from_gray( colorspec->value, &rgb255 ); else if (colorspec->type == TC_RGB) { rgb255.r = colorspec->lt >> 16 & 0xff; rgb255.g = colorspec->lt >> 8 & 0xff; rgb255.b = colorspec->lt & 0xff; } else return; SVG_color_mode = TC_RGB; if (rgb255.r != SVG_red || rgb255.g != SVG_green || rgb255.b != SVG_blue) { /* pm3d color has changed. We've to start a new path * with a different line color. This is necessary when * using "linetype palette". */ SVG_PathClose(); SVG_red = rgb255.r; SVG_green = rgb255.g; SVG_blue = rgb255.b; } return; } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_previous_palette ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_previous_palette() { SVG_GroupFilledClose(); } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_filled_polygon ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_filled_polygon(int points, gpiPoint* corners) { int i; int fillpar = corners->style >> 4; int style = corners->style &= 0xf; if (style == FS_PATTERN || style == FS_TRANSPARENT_PATTERN) { /* make sure the pattern is defined (with the current stroke color) * must be defined AFTER the current group is opened with the color * attribute set, as the patterns use 'currentColor' */ SVG_DefineFillPattern(fillpar); } SVG_GroupFilledOpen(); fputs("\t\t= 0 && fillpar < 100) fprintf(gpoutfile, " fill-opacity = '%f'", fillpar * 0.01); break; case FS_PATTERN: /* pattern fill */ case FS_TRANSPARENT_PATTERN: fprintf(gpoutfile, " fill = 'url(#gpPat%d)'", SVG_fillPatternIndex); break; default: SVG_StyleFillColor(); break; } fputs(" points = '", gpoutfile); for (i = 0; i < points; i++) fprintf(gpoutfile, "%.1f,%.1f%s", X(corners[i].x), Y(corners[i].y), i % 16 == 15 ? "\n" : " "); fputs("'/>\n", gpoutfile); } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_layer ------------------------------------------------------------------------------------------------------------------------------------*/ TERM_PUBLIC void SVG_layer(t_termlayer syncpoint) { char *name = NULL; char panel[2] = {'\0','\0'}; /* We must ignore all syncpoints that we don't recognize */ switch (syncpoint) { default: break; case TERM_LAYER_BEFORE_PLOT: SVG_PathClose(); SVG_GroupClose(); ++SVG_plotno; name = (SVG_name) ? SVG_name : "gnuplot"; if (multiplot && mp_layout.current_panel < 26) panel[0] = 'a' + mp_layout.current_panel; fprintf(gpoutfile, "\t%s_plot_%d%s\n", name,SVG_plotno,panel); SVG_LineType = LT_UNDEFINED; /* Force a new group on next stroke */ break; case TERM_LAYER_AFTER_PLOT: SVG_PathClose(); SVG_GroupClose(); fprintf(gpoutfile, "\t\n"); SVG_LineType = LT_UNDEFINED; /* Force a new group on next stroke */ break; case TERM_LAYER_BEGIN_GRID: SVG_gridline = TRUE; SVG_hasgrid = TRUE; break; case TERM_LAYER_END_GRID: SVG_gridline = FALSE; break; case TERM_LAYER_BEGIN_KEYSAMPLE: if (SVG_mouseable) { SVG_PathClose(); SVG_GroupFilledClose(); name = (SVG_name) ? SVG_name : "gnuplot"; if (multiplot && mp_layout.current_panel < 26) panel[0] = 'a' + mp_layout.current_panel; fprintf(gpoutfile, "\t\n"); } break; case TERM_LAYER_END_KEYSAMPLE: if (SVG_mouseable) { SVG_PathClose(); SVG_GroupFilledClose(); fprintf(gpoutfile, "\t\n"); SVG_LineType = LT_UNDEFINED; } break; case TERM_LAYER_RESET: case TERM_LAYER_RESET_PLOTNO: SVG_plotno = 0; break; } } /*------------------------------------------------------------------------------------------------------------------------------------ SVG_image ------------------------------------------------------------------------------------------------------------------------------------*/ #ifdef WRITE_PNG_IMAGE TERM_PUBLIC void SVG_image (unsigned m, unsigned n, coordval *image, gpiPoint *corner, t_imagecolor color_mode) { char *image_file; char *base_name = SVG_name ? SVG_name : "gp"; /* Write the image to a png file */ image_file = gp_alloc(strlen(base_name)+16, "SVG_image"); sprintf(image_file, "%s_image_%02d.png", base_name, ++SVG_imageno); write_png_image (m, n, image, color_mode, image_file); /* Map it onto the terminals coordinate system. */ fprintf(gpoutfile, ";\n", base_name, SVG_imageno); } #endif /* Enhanced text mode support starts here */ static double ENHsvg_base = 0.0; static TBOOLEAN ENHsvg_opened_string = FALSE; static int ENHsvg_charcount = 0; TERM_PUBLIC void ENHsvg_OPEN( char *fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { /* overprint = 1 means print the base text (leave position in center) * overprint = 2 means print the overlying text * overprint = 3 means save current position * overprint = 4 means restore saved position * EAM FIXME - Unfortunately I can find no way in the svg spec to do this. * The best I can come up with is to count characters from here and then * try to back up over them. */ switch (overprint) { case 2: /* FIXME: If there are multiple overprint characters, * they all get piled on top of one another. */ ENHsvg_FLUSH(); fprintf(gpoutfile, "", 0.5 * ENHsvg_charcount, ENHsvg_base-base); ENHsvg_base = base; ENHsvg_x_offset = 0.0; enhanced_cur_text = enhanced_text; ENHsvg_charcount = 0; ENHsvg_opened_string = TRUE; break; case 3: ENHsvg_charcount = 0; return; case 4: /* Defer setting the offsets until the text arrives */ ENHsvg_x_offset = -0.5 * ENHsvg_charcount; ENHsvg_base -= base; ENHsvg_charcount = 0; return; default: break; } if (!ENHsvg_opened_string) { ENHsvg_opened_string = TRUE; enhanced_cur_text = enhanced_text; /* Start a new textspan fragment */ fputs("", gpoutfile); } } TERM_PUBLIC void ENHsvg_FLUSH() { if (ENHsvg_opened_string) { ENHsvg_opened_string = FALSE; *enhanced_cur_text = '\0'; fprintf(gpoutfile, "%s", enhanced_text); } } TERM_PUBLIC void ENHsvg_put_text(unsigned int x, unsigned int y, const char *str) { /* We need local copies of the starting font properties */ double fontsize = SVG_fontSizeCur; static char *fontname = NULL; free(fontname); fontname = gp_strdup(SVG_fontNameCur); /* We need the full set of tags for text, just as normal. But in */ /* the case of enhanced text ENHsvg_string_state == 1 tells the */ /* SVG_put_text() to return without actually putting the text. */ if (ignore_enhanced_text) { ENHsvg_string_state = 0; SVG_put_text(x, y, str); return; } else { ENHsvg_string_state = 1; SVG_put_text(x, y, str); ENHsvg_string_state = 0; } /* EAM FIXME - This is a total hack, to make up for the fact that all */ /* svg viewers I have tried fail to pick up the xml:space setting from */ /* the environment. So it has to be set all over again for each text */ /* fragment. Without this, all whitespace is collapsed to a single ' '.*/ if (strstr(str," ")) ENHsvg_preserve_spaces = TRUE; /* Set up global variables needed by enhanced_recursion() */ ENHsvg_charcount = 0; enhanced_fontscale = 1.0; strncpy(enhanced_escape_format,"%c",sizeof(enhanced_escape_format)); while (*(str = enhanced_recursion((char *)str, TRUE, fontname, fontsize, 0.0, TRUE, TRUE, 0))) { (term->enhanced_flush)(); enh_err_check(str); if (!*++str) break; /* end of string */ } /* Make sure we leave with the same font properties as on entry */ free(SVG_fontNameCur); SVG_fontNameCur = fontname; fontname = NULL; if (SVG_fontSizeCur != fontsize || ENHsvg_base != 0) { fprintf(gpoutfile, "", fontsize, ENHsvg_base); SVG_fontSizeCur = fontsize; ENHsvg_base = 0; } ENHsvg_preserve_spaces = FALSE; /* Close the text section */ fputs("\n\t\n", gpoutfile); return; } TERM_PUBLIC void ENHsvg_writec(int c) { /* Kludge for phantom box accounting */ ENHsvg_charcount++; /* Escape SVG reserved characters. Are there any besides '<' and '&' ? */ switch (c) { case '<': *enhanced_cur_text++ = '&'; *enhanced_cur_text++ = 'l'; *enhanced_cur_text++ = 't'; *enhanced_cur_text++ = ';'; break; case '&': *enhanced_cur_text++ = '&'; *enhanced_cur_text++ = 'a'; *enhanced_cur_text++ = 'm'; *enhanced_cur_text++ = 'p'; *enhanced_cur_text++ = ';'; break; case '\376': /* This is an illegal UTF-8 byte; we use it to escape the reserved '&' */ if (encoding == S_ENC_DEFAULT) { *enhanced_cur_text++ = '&'; break; } /* else fall through */ default: *enhanced_cur_text++ = c; break; } } static void SVG_load_fontfile(char *fontfile) { if (fontfile) { unsigned int linesread = 0; FILE *ffont = NULL; char line[256]; char *fontname = NULL; #if defined(PIPES) TBOOLEAN ispipe = FALSE; #endif #if defined(PIPES) if ( *fontfile == '<' ) { restrict_popen(); ispipe = TRUE; ffont = popen(fontfile + 1, "r" ); if ( !ffont ) int_error(NO_CARET, "Could not execute pipe '%s'", fontfile + 1 ); } else #endif { ffont = fopen(fontfile, "r"); if (!ffont) int_error(NO_CARET, "Font file '%s' not found", fontfile); } /* read the file */ while (fgets(line,255,ffont)) { /* Echo fontname to terminal */ if ((fontname = strstr(line,"font-family"))) { fprintf(stderr, "Font file '%s' contains the font '%s'\n", fontfile, fontname); } /* Copy contents into output file */ fputs(line,gpoutfile); ++linesread; } #if defined(PIPES) if ( ispipe ) { int exitcode; if ( (exitcode = pclose(ffont)) != 0 ) int_error(NO_CARET, "Command '%s' generated error exitcode %d", fontfile + 1, exitcode); } else #endif fclose(ffont); if (linesread == 0) { #if defined(PIPES) if ( ispipe ) int_error(NO_CARET, "Command '%s' generates empty output", fontfile + 1); else #endif int_error(NO_CARET, "Font file '%s' is empty", fontfile); } } } TERM_PUBLIC void SVG_path(int p) { switch (p) { case 1: /* Close path */ fputs("Z ", gpoutfile); SVG_PathClose(); break; case 0: break; } } #undef Y #undef X #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START (svg_driver) "svg", "W3C Scalable Vector Graphics driver", 0 /* xmax */ , 0 /* ymax */ , 0 /* vchar */ , 0 /* hchar */ , 0 /* vtic */ , 0 /* htic */ , SVG_options, SVG_init, SVG_reset, SVG_text, null_scale, SVG_graphics, SVG_move, SVG_vector, SVG_linetype, SVG_put_text, SVG_text_angle, SVG_justify_text, SVG_point, do_arrow, SVG_set_font, do_pointsize, TERM_CAN_MULTIPLOT | TERM_BINARY | TERM_CAN_DASH | TERM_ALPHA_CHANNEL|TERM_LINEWIDTH, 0 /* suspend */, 0 /* resume */ , SVG_fillbox, SVG_linewidth #ifdef USE_MOUSE , 0, 0, 0, 0, 0 /* no mouse support for svg */ #endif , SVG_make_palette, SVG_previous_palette, SVG_set_color, SVG_filled_polygon #ifdef WRITE_PNG_IMAGE , SVG_image #else , NULL /* image */ #endif , ENHsvg_OPEN, ENHsvg_FLUSH, ENHsvg_writec , SVG_layer /* layer */ , SVG_path /* path */ , SVG_SCALE /* pixel oversampling scale */ TERM_TABLE_END (svg_driver) #undef LAST_TERM #define LAST_TERM svg_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(svg) "1 svg", "?commands set terminal svg", "?set terminal svg", "?set term svg", "?terminal svg", "?term svg", "?svg", " This terminal produces files in the W3C Scalable Vector Graphics format.", "", " Syntax:", " set terminal svg {size , {|fixed|dynamic}}", " {{no}enhanced}", " {fname \"\"} {fsize }", " {mouse} {standalone | jsdir }", " {name }", " {font \"{,}\"}", " {fontfile }", " {rounded|butt} {solid|dashed} {linewidth }", " {background }", "", " where and are the size of the SVG plot to generate,", " `dynamic` allows a svg-viewer to resize plot, whereas the default", " setting, `fixed`, will request an absolute size.", "", " `linewidth ` increases the width of all lines used in the figure", " by a factor of .", "", " is the name of the default font to use (default Arial) and", " is the font size (in points, default 12). SVG viewing", " programs may substitute other fonts when the file is displayed.", "", " The svg terminal supports an enhanced text mode, which allows font", " and other formatting commands to be embedded in labels and other text", " strings. The enhanced text mode syntax is shared with other gnuplot", " terminal types. See `enhanced` for more details.", "", " The `mouse` option tells gnuplot to add support for mouse tracking and for", " toggling individual plots on/off by clicking on the corresponding key entry.", " By default this is done by including a link that points to a script in a", " local directory, usually /usr/local/share/gnuplot//js.", " You can change this by using the `jsdir` option to specify either a", " different local directory or a general URL. The latter is usually", " appropriate if you are embedding the svg into a web page.", " Alternatively, the `standalone` option embeds the mousing code in the", " svg document itself rather than linking to an external resource.", "", " When an SVG file will be used in conjunction with external files,", " e.g. if it embeds a PNG image or is referenced by javascript code", " in a web page or embedding document, then a unique name is required", " to avoid potential conflicting references to other SVG plots.", " Use the `name` option to ensure uniqueness.", "", " SVG allows you to embed fonts directly into an SVG document, or to", " provide a hypertext link to the desired font. The `fontfile` option", " specifies a local file which is copied into the section of the", " resulting SVG output file. This file may either itself contain a font,", " or may contain the records necessary to create a hypertext reference to", " the desired font. Gnuplot will look for the requested file using the", " directory list in the GNUPLOT_FONTPATH environmental variable.", " NB: You must embed an svg font, not a TrueType or PostScript font." END_HELP(svg) #endif gnuplot-4.6.4/term/latex.trm0000644000471100001440000007374711444255314012766 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: latex.trm,v 1.37 2010/09/15 23:46:20 sfeam Exp $ * */ /* GNUPLOT - latex.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * LaTeX pictures (latex). * LaTeX pictures with emTeX specials (emtex). * * AUTHORS * David Kotz, Russell Lang * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* modified to optimize use of \rule for long lines */ /* TLDC: modified to have nice line types */ /* the following LATEX driver has been modified by Russell Lang, eln272v@monu1.cc.monash.oz from the GnuTeX 1.3 driver by David Kotz, David.Kotz@Dartmouth.edu. Since then it has been further extended by David Kotz. EmTeX driver by Russell Lang. */ /* 9 Dec 1992 LATEX_put_text rewritten to handle \\ newlines Daniel S. Lewart (d-lewart@uiuc.edu) */ /* Since it took me a little while to figure out what is happening, * I may as well write it down. * There are three length scales of interest: inches, points * and dots. inches are obvious. points are the usual typesetting * thing (ie approx 72 points per inch). This driver works in * units of dots, which corresponds to pixels on a 300 DPI printer. * We do a \setlength{unitlength}{...pt} to make teX work in * terms of dots. The ... is called LATEX_UNIT in here. * The reason I had to get involved in all of this is because * font size (in pts) was not being scaled up by DOTS_PER_POINT * - drd, Sept 1996 */ /* E A Merritt Feb 2007 - change sequence of point types to match * PostScript and other terminals. Uses symbols from amssymb package. */ /* T.Sefzick Oct 2009 - rotate text when option 'rotated' is given. * needs graphics or graphicx package. */ #include "driver.h" #ifdef TERM_REGISTER register_term(latex) #ifdef EMTEX register_term(emtex) #endif #endif #ifdef TERM_PROTO TERM_PUBLIC void LATEX_options __PROTO((void)); TERM_PUBLIC void LATEX_init __PROTO((void)); TERM_PUBLIC void LATEX_graphics __PROTO((void)); TERM_PUBLIC void LATEX_text __PROTO((void)); TERM_PUBLIC void LATEX_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC void LATEX_linetype __PROTO((int linetype)); TERM_PUBLIC void LATEX_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void LATEX_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void LATEX_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void LATEX_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); TERM_PUBLIC int LATEX_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC int LATEX_text_angle __PROTO((int ang)); TERM_PUBLIC void LATEX_reset __PROTO((void)); TERM_PUBLIC void LATEX_fillbox __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); #ifdef EMTEX TERM_PUBLIC void EMTEX_init __PROTO((void)); TERM_PUBLIC void EMTEX_reset __PROTO((void)); TERM_PUBLIC void EMTEX_text __PROTO((void)); #endif #ifdef EEPIC TERM_PUBLIC void EEPIC_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void EEPIC_vector __PROTO((unsigned int ux, unsigned int uy)); #endif #define TINY_STEP 0.5 /* tiny steps for high quality lines */ #define LATEX_PTS_PER_INCH (72.27) #define DOTS_PER_INCH (300) /* resolution of printer we expect to use */ #define LATEX_UNIT (LATEX_PTS_PER_INCH/DOTS_PER_INCH) /* dot size in pt */ /* 5 inches wide by 3 inches high (default) */ #define LATEX_XMAX (5*DOTS_PER_INCH) /* (LATEX_PTS_PER_INCH/LATEX_UNIT*5.0) */ #define LATEX_YMAX (3*DOTS_PER_INCH) /* (LATEX_PTS_PER_INCH/LATEX_UNIT*3.0) */ #define LATEX_HTIC (5*DOTS_PER_INCH/72) /* (5 pts) */ #define LATEX_VTIC (5*DOTS_PER_INCH/72) /* (5 pts) */ #define LATEX_HCHAR (DOTS_PER_INCH*53/10/72) /* (5.3 pts) */ #define LATEX_VCHAR (DOTS_PER_INCH*11/72) /* (11 pts) */ #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static int LATEX_posx; static int LATEX_posy; static int LATEX_fontsize = 10; static char LATEX_font[MAX_ID_LEN+1] = "doc"; static enum JUSTIFY latex_justify = LEFT; static int latex_angle = 0; static TBOOLEAN latex_rotate = FALSE; static TBOOLEAN latex_explicit_size = FALSE; static size_units latex_explicit_units = INCHES; /* Default line-drawing character */ /* the definition of plotpoint varies with linetype */ #define LATEX_DOT "\\usebox{\\plotpoint}" #define LATEX_TINY_DOT "\\rule{1pt}{1pt}" /* for dots plot style */ /* POINTS */ #define LATEX_POINT_TYPES 15 /* we supply more point types */ static const char GPFAR *GPFAR LATEX_points[] = { "\\makebox(0,0){$+$}", "\\makebox(0,0){$\\times$}", "\\makebox(0,0){$\\ast$}", "\\raisebox{-.8pt}{\\makebox(0,0){$\\Box$}}", "\\makebox(0,0){$\\blacksquare$}", "\\makebox(0,0){$\\circ$}", "\\makebox(0,0){$\\bullet$}", "\\makebox(0,0){$\\triangle$}", "\\makebox(0,0){$\\blacktriangle$}", "\\makebox(0,0){$\\triangledown$}", "\\makebox(0,0){$\\blacktriangledown$}", "\\makebox(0,0){$\\lozenge$}", "\\makebox(0,0){$\\blacklozenge$}", "\\makebox(0,0){$\\heartsuit$}", "\\makebox(0,0){$\\spadesuit$}", }; /* LINES */ static float LATEX_size = 0; /* current thick of line in points */ static float LATEX_dotspace = 0; /* current dotspace of line in points */ #define LATEX_LINE_TYPES 6 /* number of line types below */ #define LATEX_THIN_LINE 0 /* the thinnest solid line type */ static struct { float size; /* size of dot, or thick of line in points */ float dotspace; /* inter-dot space in points; 0 for lines */ } GPFAR LATEX_lines[] = { {0.4, 0.0}, /* thin solid line */ {0.4, 5.0}, /* thin dotted line */ {0.8, 0.0}, /* thick solid line */ {1.0, 5.0}, /* thick dotted line */ {1.2, 0.0}, /* Thick solid line */ {1.0, 10.0}, /* thick widely dotted line */ }; /* for drawing dotted and solid lines */ static void LATEX_dot_line __PROTO((int x1, int x2, int y1, int y2)); static void LATEX_solid_line __PROTO((int x1, int x2, int y1, int y2)); static void LATEX_rule __PROTO((int code, double x, double y, double width, double height)); static void LATEX_flushdot __PROTO((void)); #define LATEX_flushrule() LATEX_rule(2, 0.,0.,0.,0.) /* flush old rule */ static TBOOLEAN LATEX_moved = TRUE; /* pen is up after move */ static float LATEX_dotsize; /* size of LATEX_DOT in units */ static TBOOLEAN LATEX_needsdot = FALSE; /* does dotted line need termination? */ #ifdef EMTEX static TBOOLEAN emtex = FALSE; /* not currently using emtex */ static void EMTEX_solid_line __PROTO((int x1, int x2, int y1, int y2)); #endif /* ARROWS */ /* the set of non-vertical/non-horizontal LaTeX vector slopes */ /* except negatives - they are handled specially */ static struct vslope { int dx, dy; } GPFAR LATEX_slopes[] = { {1, 1}, {1, 2}, {1, 3}, {1, 4}, {2, 1}, {2, 3}, {3, 1}, {3, 2}, {3, 4}, {4, 1}, {4, 3}, {0, 0} /* terminator */ }; /* figure out the best arrow */ static void best_latex_arrow __PROTO((int, int, int, int, int, int)); enum LATEX_id { LATEX_COURIER, LATEX_ROMAN, LATEX_DEFAULT, LATEX_SIZE, LATEX_ROTATE, LATEX_NOROTATE, LATEX_OTHER }; static struct gen_table LATEX_opts[] = { { "c$ourier", LATEX_COURIER }, { "r$oman", LATEX_ROMAN }, { "d$efault", LATEX_DEFAULT }, { "si$ze", LATEX_SIZE }, { "rot$ate", LATEX_ROTATE }, { "no$rotate", LATEX_NOROTATE }, { NULL, LATEX_OTHER } }; TERM_PUBLIC void LATEX_options() { latex_explicit_size = FALSE; while (!END_OF_COMMAND) { switch(lookup_table(&LATEX_opts[0],c_token)) { case LATEX_COURIER: strcpy(LATEX_font, "cmtt"); c_token++; break; case LATEX_ROMAN: strcpy(LATEX_font, "cmr"); c_token++; break; case LATEX_DEFAULT: strcpy(LATEX_font, "doc"); c_token++; break; case LATEX_SIZE: { float xmax_t = 5., ymax_t = 3.; c_token++; latex_explicit_size = TRUE; latex_explicit_units = parse_term_size(&xmax_t, &ymax_t, INCHES); term->xmax = xmax_t * DOTS_PER_INCH/72; term->ymax = ymax_t * DOTS_PER_INCH/72; break; } case LATEX_ROTATE: latex_rotate = TRUE; c_token++; break; case LATEX_NOROTATE: latex_rotate = FALSE; c_token++; break; case LATEX_OTHER: default: /* if isannumber? */ LATEX_fontsize = int_expression(); } } /* tell gnuplot core about char. sizes. Horizontal spacing * is about half the text pointsize */ term->v_char = (unsigned int) (LATEX_fontsize * DOTS_PER_INCH / 72); term->h_char = (unsigned int) (LATEX_fontsize * DOTS_PER_INCH / 144); if (strcmp(LATEX_font, "doc")==0) strncpy(term_options, "(document specific font)",MAX_LINE_LEN); else sprintf(term_options, "%s %d", LATEX_font[2] == 't' ? "courier" : "roman", LATEX_fontsize); if (latex_explicit_size) { if (latex_explicit_units == CM) sprintf(&(term_options[strlen(term_options)]), "size %.2fcm, %.2fcm ", 2.54*(float)term->xmax/(DOTS_PER_INCH), 2.54*(float)term->ymax/(DOTS_PER_INCH)); else sprintf(&(term_options[strlen(term_options)]), "size %.2fin, %.2fin ", (float)term->xmax/(DOTS_PER_INCH), (float)term->ymax/(DOTS_PER_INCH)); } if (latex_rotate) { sprintf(&(term_options[strlen(term_options)]), " rotate"); } else { sprintf(&(term_options[strlen(term_options)]), " norotate"); } } TERM_PUBLIC void LATEX_init() { #ifdef EMTEX emtex = FALSE; #endif LATEX_posx = LATEX_posy = 0; fprintf(gpoutfile, "\ %% GNUPLOT: LaTeX picture\n\ \\setlength{\\unitlength}{%fpt}\n\ \\ifx\\plotpoint\\undefined\\newsavebox{\\plotpoint}\\fi\n", LATEX_UNIT); LATEX_linetype(LT_AXIS); LATEX_size = 0; } TERM_PUBLIC void LATEX_graphics() { int xscale, yscale; /* set size of canvas */ if (!latex_explicit_size) { term->xmax = LATEX_XMAX; term->ymax = LATEX_YMAX; } /* bounding box */ xscale = xsize * term->xmax; yscale = ysize * term->ymax; fprintf(gpoutfile, "\\begin{picture}(%d,%d)(0,0)\n", xscale, yscale); if (strcmp(LATEX_font, "doc") != 0) { fprintf(gpoutfile, "\ \\font\\gnuplot=%s10 at %dpt\n\ \\gnuplot\n", LATEX_font, LATEX_fontsize); } } TERM_PUBLIC void LATEX_text() { LATEX_flushrule(); LATEX_flushdot(); fputs("\\end{picture}\n", gpoutfile); LATEX_posx = LATEX_posy = 0; /* current position */ LATEX_moved = TRUE; /* pen is up after move */ } TERM_PUBLIC void LATEX_linetype(int linetype) { float size; if (linetype >= LATEX_LINE_TYPES) linetype %= LATEX_LINE_TYPES; #ifdef EMTEX if (!emtex) #endif LATEX_flushrule(); LATEX_flushdot(); /* Find the new desired line thickness. */ /* negative linetypes (for axes) use a thin line */ /* only relevant for drawing axes/border in 3d */ size = (linetype >= 0 ? LATEX_lines[linetype].size : LATEX_lines[LATEX_THIN_LINE].size); /* If different from current size, redefine \plotpoint */ if (size != LATEX_size) { fprintf(gpoutfile, "\\sbox{\\plotpoint}{\\rule[%.3fpt]{%.3fpt}{%.3fpt}}%%\n", -size / 2, size, size); #ifdef EMTEX if (emtex) /* change line width */ fprintf(gpoutfile, "\\special{em:linewidth %.1fpt}%%\n", size); #endif } LATEX_size = size; LATEX_dotsize = size / LATEX_UNIT; LATEX_dotspace = (linetype >= 0) ? LATEX_lines[linetype].dotspace : 0; LATEX_moved = TRUE; /* reset */ } TERM_PUBLIC void LATEX_move(unsigned int x, unsigned int y) { LATEX_flushdot(); LATEX_posx = x; LATEX_posy = y; LATEX_moved = TRUE; /* reset */ } TERM_PUBLIC void LATEX_point(unsigned int x, unsigned int y, int number) { LATEX_move(x, y); /* Print the character defined by 'number'; number < 0 means to use a dot, otherwise one of the defined points. */ fprintf(gpoutfile, "\\put(%d,%d){%s}\n", x, y, (number < 0 ? LATEX_TINY_DOT : LATEX_points[number % LATEX_POINT_TYPES])); } TERM_PUBLIC void LATEX_vector(unsigned int ux, unsigned int uy) { if (LATEX_dotspace == 0.0) { /* solid line */ #ifdef EMTEX if (emtex) EMTEX_solid_line(LATEX_posx, (int) ux, LATEX_posy, (int) uy); else #endif LATEX_solid_line(LATEX_posx, (int) ux, LATEX_posy, (int) uy); } else /* dotted line */ LATEX_dot_line(LATEX_posx, (int) ux, LATEX_posy, (int) uy); LATEX_posx = ux; LATEX_posy = uy; } static void LATEX_solid_line(int x1, int x2, int y1, int y2) { float slope; int inc; float dx, dy, x, y; float offset, length; int code; /* possibly combine with previous rule */ /* we draw a solid line using the current line thickness (size) */ /* we do it with lots of \\rules */ if (x1 == x2 && y1 == y2) { /* zero-length line - just a dot */ if (LATEX_moved) { LATEX_flushrule(); /* plot a dot */ fprintf(gpoutfile, "\\put(%u,%u){%s}\n", x1, y1, LATEX_DOT); } } else { code = (LATEX_moved ? 0 : 1); /* no combine after move */ LATEX_moved = FALSE; if (x1 == x2) /* vertical line - special case */ LATEX_rule(code, (double) x1, (double) y1, LATEX_dotsize, (double) y2 - y1); else if (y1 == y2) /* horizontal line - special case */ LATEX_rule(code, (double) x1, (double) y1, (double) x2 - x1, LATEX_dotsize); else { dx = (float) x2 - x1; dy = (float) y2 - y1; slope = dy / dx; if (ABS(slope) <= 1.0) { /* longer than high */ x = GPMIN(ABS(dx), (0.25 + 1.0 / ABS(slope)) * LATEX_dotsize); offset = sign(dy) * GPMIN(LATEX_dotsize, ABS(dy)); dy = dy - offset; length = x * LATEX_UNIT; inc = (x == ABS(dx) ? 1 : GPMAX(1, ABS(dy) / TINY_STEP + 0.5)); if (inc == 1) { fprintf(gpoutfile, "\\put(%u,%.2f){\\rule{%.3fpt}{%.3fpt}}\n", (x2 >= x1 ? x1 : x2), ((float) y1 + y2 - LATEX_dotsize) / 2, length, LATEX_dotsize * LATEX_UNIT); } else { dy = dy / inc; dx = (dx - sign(dx) * x) / (inc - 1); fprintf(gpoutfile, "\\multiput(%.2f,%.2f)(%.3f,%.3f){%u}{\\rule{%.3fpt}{%.3fpt}}\n", (dx >= 0.0 ? (float) x1 : x1 - x), (float) y1 - (ABS(dy) - offset) / 2, dx, dy, inc, length, ABS(dy) * LATEX_UNIT); } /* done with one section, now smooth it */ x = x / 2; dx = sign(dx) * x; dx = (float) x2 - x1 - dx; dy = (float) y2 - y1; fprintf(gpoutfile, "\\multiput(%.2f,%.2f)(%.3f,%.3f){2}{\\rule{%.3fpt}{%.3fpt}}\n", (dx >= 0.0 ? (float) x1 : x1 - x), (float) y1 - LATEX_dotsize / 2, dx, dy, x * LATEX_UNIT, LATEX_dotsize * LATEX_UNIT); LATEX_moved = TRUE; } else { /* higher than long */ y = GPMIN(ABS(dy), (0.25 + ABS(slope)) * LATEX_dotsize); offset = sign(dx) * GPMIN(LATEX_dotsize, ABS(dx)); dx = dx - offset; length = y * LATEX_UNIT; inc = (y == ABS(dy) ? 1 : GPMAX(1, ABS(dx) / TINY_STEP + 0.5)); if (inc == 1) { fprintf(gpoutfile, "\\put(%.2f,%u){\\rule{%.3fpt}{%.3fpt}}\n", ((float) x1 + x2 - LATEX_dotsize) / 2, (y2 >= y1 ? y1 : y2), LATEX_dotsize * LATEX_UNIT, length); } else { dx = dx / inc; dy = (dy - sign(dy) * y) / (inc - 1); fprintf(gpoutfile, "\\multiput(%.2f,%.2f)(%.3f,%.3f){%u}{\\rule{%.3fpt}{%.3fpt}}\n", (float) x1 - (ABS(dx) - offset) / 2, (dy >= 0 ? (float) y1 : y1 - y), dx, dy, inc, ABS(dx) * LATEX_UNIT, length); } /* done with one section, now smooth it */ y = y / 2; dx = (float) x2 - x1; dy = sign(dy) * y; dy = (float) y2 - y1 - dy; fprintf(gpoutfile, "\\multiput(%.2f,%.2f)(%.3f,%.3f){2}{\\rule{%.3fpt}{%.3fpt}}\n", (float) x1 - LATEX_dotsize / 2, (dy >= 0.0 ? (float) y1 : y1 - y), dx, dy, LATEX_dotsize * LATEX_UNIT, y * LATEX_UNIT); LATEX_moved = TRUE; } } } } /* Draw a \rule. Width or height may be negative; we can correct. * The rule is never output immediately. The previous rule is output * as-is if code is 0, and the previous rule is * combined with the current rule (if possible) if code is 1. * The previous rule is output, and the new one ignored, if code is 2. */ static void LATEX_rule( int code, /* how do we treat this rule? */ double x, double y, double width, double height) { static float lastx, lasty; static float lastw, lasth; static TBOOLEAN isvalid = FALSE; /* is 'last' data valid? */ TBOOLEAN combine = (code == 1); TBOOLEAN flush = (code == 2); if (!flush) if (width == 0 || height == 0) return; /* ignore this rule */ if (isvalid && combine) { /* try to combine new rule with old rule */ if ((int) lastx == (int) x && lastw == width) { /* vertical rule */ if (lasth * height >= 0) { /* same sign */ lasth += height; return; } } else if ((int) lasty == (int) y && lasth == height) { /* horiz rule */ if (lastw * width >= 0) { /* same sign */ lastw += width; return; } } /* oh well, output last and remember the new one */ } if (isvalid) { /* output the rule */ if (lastw < 0) { lastx += lastw; lastw = -lastw; } if (lasth < 0) { lasty += lasth; lasth = -lasth; } /* if very small use canned dot */ if (lastw < LATEX_dotsize || lasth < LATEX_dotsize) fprintf(gpoutfile, "\\put(%.1f,%.1f){%s}\n", lastx, lasty, LATEX_DOT); else fprintf(gpoutfile, "\\put(%.1f,%.1f){\\rule[%.3fpt]{%.3fpt}{%.3fpt}}\n", lastx, lasty, -LATEX_dotsize * LATEX_UNIT / 2, lastw * LATEX_UNIT, lasth * LATEX_UNIT); } if (flush) { isvalid = FALSE; } else { lastx = x; lasty = y; lastw = width; lasth = height; isvalid = TRUE; } } static void LATEX_dot_line(int x1, int x2, int y1, int y2) { static float LATEX_left; /* fraction of space left after last dot */ /* we draw a dotted line using the current dot spacing */ if (LATEX_moved) LATEX_left = 1.0; /* reset after a move */ /* zero-length line? */ if (x1 == x2 && y1 == y2) { if (LATEX_moved) /* plot a dot */ fprintf(gpoutfile, "\\put(%u,%u){%s}\n", x1, y1, LATEX_DOT); } else { float dotspace = LATEX_dotspace / LATEX_UNIT; float x, y; /* current position */ float xinc, yinc; /* increments */ float slope; /* slope of line */ float lastx = -1; /* last x point plotted */ float lasty = -1; /* last y point plotted */ int numdots = 0; /* number of dots in this section */ /* first, figure out increments for x and y */ if (x2 == x1) { xinc = 0.0; yinc = (y2 - y1 > 0) ? dotspace : -dotspace; } else { slope = ((float) y2 - y1) / ((float) x2 - x1); xinc = dotspace / sqrt(1 + slope * slope) * sign(x2 - x1); yinc = slope * xinc; } /* now draw the dotted line */ /* we take into account where we last placed a dot */ for (x = x1 + xinc * (1 - LATEX_left), y = y1 + yinc * (1 - LATEX_left); (x2 - x) * xinc >= 0 && (y2 - y) * yinc >= 0; /* same sign or zero */ lastx = x, x += xinc, lasty = y, y += yinc) numdots++; if (numdots == 1) fprintf(gpoutfile, "\\put(%.2f,%.2f){%s}\n", lastx, lasty, LATEX_DOT); else if (numdots > 0) fprintf(gpoutfile, "\\multiput(%u,%u)(%.3f,%.3f){%u}{%s}\n", x1, y1, xinc, yinc, numdots, LATEX_DOT); /* how much is left over, as a fraction of dotspace? */ if (xinc != 0.0) { /* xinc must be nonzero */ if (lastx >= 0) LATEX_left = ABS(x2 - lastx) / ABS(xinc); else LATEX_left += ABS(x2 - x1) / ABS(xinc); } else if (lasty >= 0) LATEX_left = ABS(y2 - lasty) / ABS(yinc); else LATEX_left += ABS(y2 - y1) / ABS(yinc); } LATEX_needsdot = (LATEX_left > 0); LATEX_moved = FALSE; } static void LATEX_flushdot() { if (LATEX_needsdot) fprintf(gpoutfile, "\\put(%d,%d){%s}\n", LATEX_posx, LATEX_posy, LATEX_DOT); LATEX_needsdot = FALSE; } TERM_PUBLIC void LATEX_arrow( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { best_latex_arrow(sx, sy, ex, ey, 1, head); LATEX_posx = ex; LATEX_posy = ey; } static void best_latex_arrow( int sx, int sy, int ex, int ey, /* start and end points */ int who, /* 1=LATEX, 2=EEPIC */ int head) { int dx = ex - sx; int dy = ey - sy; float m; /* slope of line */ float arrowslope; /* slope of arrow */ float minerror = 0; /* best-case error */ struct vslope *slope; /* one of the slopes */ struct vslope *bestslope; /* the slope with min error */ /* We try to draw a real arrow (ie, \vector). If we can't get * a slope that is close, we draw a bent arrow. */ if (dx == 0) { /* vertical arrow */ fprintf(gpoutfile, "\\put(%d,%d){\\%s(0,%d){%d}}\n", sx, sy, head ? "vector" : "line", sign(ey - sy), ABS(ey - sy)); } else if (dy == 0) { /* horizontal arrow */ fprintf(gpoutfile, "\\put(%d,%d){\\%s(%d,0){%d}}\n", sx, sy, head ? "vector" : "line", sign(ex - sx), ABS(ex - sx)); } else { /* Slanted arrow. We'll give it a try. * we try to find the closest-slope arrowhead. */ bestslope = NULL; minerror = 0; /* to shut up turbo C */ m = ABS((float) dy / dx); /* the slope we want */ for (slope = LATEX_slopes; slope->dx != 0.0; slope++) { /* find the slope of the arrow */ arrowslope = (float) slope->dy / slope->dx; if (bestslope == NULL || ABS(m - arrowslope) < minerror) { minerror = ABS(m - arrowslope); bestslope = slope; } } /* now we have the best slope arrow */ /* maybe it's exactly the right slope! */ if (minerror == 0.0) /* unlikely but possible */ fprintf(gpoutfile, "\\put(%d,%d){\\%s(%d,%d){%d}}\n", sx, sy, head ? "vector" : "line", bestslope->dx * sign(ex - sx), bestslope->dy * sign(ey - sy), ABS(ex - sx)); else { /* we draw the line the usual way, with thin lines */ #ifdef EMTEX if (emtex) { LATEX_linetype(LATEX_THIN_LINE); EMTEX_solid_line(sx, ex, sy, ey); } else #endif if (who == 1) { LATEX_linetype(LATEX_THIN_LINE); LATEX_solid_line(sx, ex, sy, ey); } #ifdef EEPIC else { EEPIC_move(sx, sy); EEPIC_vector(ex, ey); } #endif /* EEPIC */ /* and then draw an arrowhead (a short vector) there */ if (head) fprintf(gpoutfile, "\\put(%d,%d){\\vector(%d,%d){0}}\n", ex, ey, bestslope->dx * sign(ex - sx), bestslope->dy * sign(ey - sy)); } } } TERM_PUBLIC void LATEX_put_text(unsigned int x, unsigned int y, const char str[]) { static const char *justify[] = { "[l]", "", "[r]" }; TBOOLEAN flag = FALSE; int i; /* ignore empty strings */ if (str[0] == NUL) return; if (!latex_rotate) for (flag = FALSE, i = 0; str[i] && !flag;) flag = (str[i++] == '\\') && (str[i++] == '\\'); fprintf(gpoutfile, "\\put(%d,%d)", x, y); if (latex_rotate && latex_angle) fprintf (gpoutfile, "{\\rotatebox{%d}", latex_angle); if ((str[0] == '{') || (str[0] == '[')) { fprintf(gpoutfile, "{\\makebox(0,0)%s}\n", str); } else if (flag) fprintf(gpoutfile, "{\\makebox(0,0)%s{\\shortstack{%s}}}\n", justify[latex_justify], str); else fprintf(gpoutfile, "{\\makebox(0,0)%s{%s}}\n", justify[latex_justify], str); if (latex_rotate && latex_angle) fprintf (gpoutfile, "}"); } TERM_PUBLIC int LATEX_justify_text(enum JUSTIFY mode) { latex_justify = mode; return (TRUE); } TERM_PUBLIC int LATEX_text_angle(int ang) { /* we can't really write text vertically, but this will put the ylabel centred at the left of the plot, and then we'll make a \shortstack */ /* latex_angle is not used elsewhere, so we use it for 'real' text rotation using '\rotatebox' */ latex_angle = ang; return (TRUE); } TERM_PUBLIC void LATEX_reset() { LATEX_posx = LATEX_posy = 0; /* current position */ LATEX_moved = TRUE; /* pen is up after move */ } TERM_PUBLIC void LATEX_fillbox(int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height) { /* TODO: Something other than black/white */ if ((style & 0xf) == FS_EMPTY) return; if ((style & 0xf) == FS_SOLID && (style >> 4) < 50) return; if ((style & 0xf) == FS_PATTERN && ((style >> 4) & 1) == 0) return; fprintf(gpoutfile, "\\put(%d,%d){\\rule{%gpt}{%gpt}}\n", x1, y1, width*LATEX_UNIT, height*LATEX_UNIT); } #ifdef EMTEX TERM_PUBLIC void EMTEX_init() { emtex = TRUE; LATEX_posx = LATEX_posy = 0; fprintf(gpoutfile, "\ %% GNUPLOT: LaTeX picture with emtex specials\n\ \\setlength{\\unitlength}{%fpt}\n\ \\ifx\\plotpoint\\undefined\\newsavebox{\\plotpoint}\\fi\n", LATEX_UNIT); LATEX_linetype(LT_AXIS); } TERM_PUBLIC void EMTEX_reset() { emtex = FALSE; LATEX_posx = LATEX_posy = 0; } TERM_PUBLIC void EMTEX_text() { fputs("\\end{picture}\n", gpoutfile); } static void EMTEX_solid_line(int x1, int x2, int y1, int y2) { /* emtex special solid line */ if (LATEX_moved) fprintf(gpoutfile, "\\put(%d,%d){\\special{em:moveto}}\n", x1, y1); if ((x1 != x2) || (y1 != y2)) fprintf(gpoutfile, "\\put(%d,%d){\\special{em:lineto}}\n", x2, y2); LATEX_posx = x2; LATEX_posy = y2; LATEX_moved = FALSE; } #endif /* EMTEX */ #endif /* TERM_BODY */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_TABLE TERM_TABLE_START(latex_driver) "latex", "LaTeX picture environment", LATEX_XMAX, LATEX_YMAX, LATEX_VCHAR, LATEX_HCHAR, LATEX_VTIC, LATEX_HTIC, LATEX_options, LATEX_init, LATEX_reset, LATEX_text, null_scale, LATEX_graphics, LATEX_move, LATEX_vector, LATEX_linetype, LATEX_put_text, LATEX_text_angle, LATEX_justify_text, LATEX_point, LATEX_arrow, set_font_null, NULL, /* pointsize */ TERM_IS_LATEX, /* flags */ NULL, NULL, /* suspend, resume */ LATEX_fillbox, NULL, /* linewidth */ #ifdef USE_MOUSE NULL, NULL, NULL, NULL, NULL, #endif NULL /* Color stuff */ TERM_TABLE_END(latex_driver) #undef LAST_TERM #define LAST_TERM latex_driver #ifdef EMTEX TERM_TABLE_START(emtex_driver) "emtex", "LaTeX picture environment with emTeX specials", LATEX_XMAX, LATEX_YMAX, LATEX_VCHAR, LATEX_HCHAR, LATEX_VTIC, LATEX_HTIC, LATEX_options, EMTEX_init, EMTEX_reset, EMTEX_text, null_scale, LATEX_graphics, LATEX_move, LATEX_vector, LATEX_linetype, LATEX_put_text, LATEX_text_angle, LATEX_justify_text, LATEX_point, LATEX_arrow, set_font_null, NULL, TERM_IS_LATEX TERM_TABLE_END(emtex_driver) #undef LAST_TERM #define LAST_TERM emtex_driver #endif /* EMTEX */ #endif /* TERM_TABLE */ #ifdef TERM_HELP START_HELP(latex) "1 latex", "?commands set terminal emtex", "?set terminal emtex", "?set term emtex", "?terminal emtex", "?term emtex", "?emtex", "?commands set terminal latex", "?set terminal latex", "?set term latex", "?terminal latex", "?term latex", "?latex", " Syntax:", " set terminal {latex | emtex} {default | {courier|roman} {}}", " {size {unit}, {unit}} {rotate | norotate}", "", " By default the plot will inherit font settings from the embedding document.", " You have the option of forcing either Courier (cmtt) or Roman (cmr) fonts", " instead. In this case you may also specify a fontsize.", " Unless your driver is capable of building fonts at any size (e.g. dvips),", " stick to the standard 10, 11 and 12 point sizes.", "", " METAFONT users beware: METAFONT does not like odd sizes.", "", " All drivers for LaTeX offer a special way of controlling text positioning:", " If any text string begins with '{', you also need to include a '}' at the", " end of the text, and the whole text will be centered both horizontally and", " vertically. If the text string begins with '[', you need to follow this with", " a position specification (up to two out of t,b,l,r), ']{', the text itself,", " and finally '}'. The text itself may be anything LaTeX can typeset as an", " LR-box. '\\rule{}{}'s may help for best positioning.", "", " Points, among other things, are drawn using the LaTeX commands \"\\Diamond\" and", " \"\\Box\". These commands no longer belong to the LaTeX2e core; they are included", " in the latexsym package, which is part of the base distribution and thus part", " of any LaTeX implementation. Please do not forget to use this package.", " Other point types use symbols from the amssymb package.", "", " The default size for the plot is 5 inches by 3 inches. The `size` option", " changes this to whatever the user requests. By default the X and Y sizes", " are taken to be in inches, but other units are possible (currently only cm).", "", " If 'rotate' is specified, rotated text, especially a rotated y-axis label,", " is possible (the packages graphics or graphicx are needed). The 'stacked'", " y-axis label mechanism is then deactivated.", "", " Examples:", " About label positioning:", " Use gnuplot defaults (mostly sensible, but sometimes not really best):", " set title '\\LaTeX\\ -- $ \\gamma $'", " Force centering both horizontally and vertically:", " set label '{\\LaTeX\\ -- $ \\gamma $}' at 0,0", " Specify own positioning (top here):", " set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'", " The other label -- account for long ticlabels:", " set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}}'" END_HELP(latex) #endif /* TERM_TABLE */ gnuplot-4.6.4/term/hpljii.trm0000644000471100001440000002664410460036603013115 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: hpljii.trm,v 1.24 2006/07/21 02:35:47 sfeam Exp $ * */ /* GNUPLOT - hpljii.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * hpljii, hpdj * * AUTHORS * John Engels * Russell Lang * Maurice Castro * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* The following HP laserjet series II driver uses generic bit mapped graphics routines from bitmap.c to build up a bit map in memory. The driver interchanges colomns and lines in order to access entire lines easily and returns the lines to get bits in the right order : (x,y) -> (y,XMAX-1-x). */ /* This interchange is done by calling b_makebitmap() with reversed xmax and ymax, and then setting b_rastermode to TRUE. b_setpixel() will then perform the interchange before each pixel is plotted */ /* by John Engels JENGELS@BNANDP51.BITNET, inspired by the hpljet driver of Jyrki Yli-Nokari */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(hpljii) register_term(hpdj) #endif #ifdef TERM_PROTO TERM_PUBLIC void HPLJII_options __PROTO((void)); TERM_PUBLIC void HPLJII_init __PROTO((void)); TERM_PUBLIC void HPLJII_graphics __PROTO((void)); TERM_PUBLIC void HPLJII_text __PROTO((void)); TERM_PUBLIC void HPLJII_linetype __PROTO((int linetype)); TERM_PUBLIC void HPLJII_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void HPLJII_reset __PROTO((void)); TERM_PUBLIC void HPDJ_graphics __PROTO((void)); TERM_PUBLIC void HPDJ_text __PROTO((void)); /* default values for term_tbl */ #define HPLJII_75PPI_XMAX (1920/4) #define HPLJII_75PPI_YMAX (1920/4) #define HPLJII_75PPI_HCHAR (1920/4/6) #define HPLJII_75PPI_VCHAR (1920/4/10) #define HPLJII_75PPI_VTIC 5 #define HPLJII_75PPI_HTIC 5 #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY /* We define 4 different print qualities : 300ppi, 150ppi, 100ppi and 75ppi. (Pixel size = 1, 2, 3, 4 dots) */ #define HPLJII_DPP (hplj_dpp) /* dots per pixel */ #define HPLJII_PPI (300/HPLJII_DPP) /* pixel per inch */ /* make XMAX and YMAX a multiple of 8 */ #define HPLJII_XMAX (8*(unsigned int)(xsize*1920/HPLJII_DPP/8.0+0.9)) #define HPLJII_YMAX (8*(unsigned int)(ysize*1920/HPLJII_DPP/8.0+0.9)) /* Courier font with 6 lines per inch */ #define HPLJII_VCHAR (HPLJII_PPI/6) /* Courier font with 10 caracters per inch */ #define HPLJII_HCHAR (HPLJII_PPI/10) /* Save current cursor position */ #define HPLJII_PUSH_CURSOR fputs("\033&f0S",gpoutfile) /* Restore cursor position */ #define HPLJII_POP_CURSOR fputs("\033&f1S",gpoutfile) /* be sure to use courier font with 6lpi and 10cpi */ #define HPLJII_COURIER fputs("\033(0N\033(s0p10.0h12.0v0s0b3T\033&l6D",gpoutfile) static void HPLJII_putc __PROTO((unsigned int x, unsigned int y, int c, int ang)); /* note: c is char, but must be declared int due to an old K&R ANSI-C strict HP cc */ static int hplj_dpp = 4; /* bm_pattern not appropriate for 300ppi graphics */ #ifndef GOT_300_PATTERN # define GOT_300_PATTERN static unsigned int b_300ppi_pattern[] = { 0xffff, 0x1111, 0xffff, 0x3333, 0x0f0f, 0x3f3f, 0x0fff, 0x00ff, 0x33ff }; #endif TERM_PUBLIC void HPLJII_options() { char opt[4]; int parse_error = 0; if (END_OF_COMMAND) { term_options[0] = NUL; } else { if (token[c_token].length > 3) { parse_error = 1; /* see below */ } else { /* almost_equals() won't accept numbers - use strcmp() instead */ capture(opt, c_token, c_token, 4); if (!strcmp(opt, "75")) { hplj_dpp = 4; } else if (!strcmp(opt, "100")) { hplj_dpp = 3; } else if (!strcmp(opt, "150")) { hplj_dpp = 2; } else if (!strcmp(opt, "300")) { hplj_dpp = 1; } else { /* error, but set dpi anyway, since term it already set */ parse_error = 1; } c_token++; } } term->xmax = HPLJII_XMAX; term->ymax = HPLJII_YMAX; switch (hplj_dpp) { case 1: strcpy(term_options, "300"); term->v_tic = 15; term->h_tic = 15; break; case 2: strcpy(term_options, "150"); term->v_tic = 8; term->h_tic = 8; break; case 3: strcpy(term_options, "100"); term->v_tic = 6; term->h_tic = 6; break; case 4: strcpy(term_options, "75"); term->v_tic = 5; term->h_tic = 5; break; } if (parse_error) int_error(c_token, "expecting dots per inch size 75, 100, 150 or 300"); } TERM_PUBLIC void HPLJII_init() { term->v_char = HPLJII_VCHAR; term->h_char = HPLJII_HCHAR; } TERM_PUBLIC void HPLJII_graphics() { HPLJII_COURIER; HPLJII_PUSH_CURSOR; /* rotate plot -90 degrees by reversing XMAX and YMAX and by setting b_rastermode to TRUE */ b_makebitmap(HPLJII_YMAX, HPLJII_XMAX, 1); b_rastermode = TRUE; } /* HPLJIItext by rjl - no compression */ TERM_PUBLIC void HPLJII_text() { register int x, j, row; fprintf(gpoutfile, "\033*t%dR", HPLJII_PPI); HPLJII_POP_CURSOR; fputs("\033*r1A", gpoutfile); /* dump bitmap in raster mode */ for (x = b_xsize - 1; x >= 0; x--) { row = (b_ysize / 8) - 1; fprintf(gpoutfile, "\033*b0m%dW", b_ysize / 8); for (j = row; j >= 0; j--) { (void) fputc((char) (*((*b_p)[j] + x)), gpoutfile); } } fputs("\033*rB", gpoutfile); b_freebitmap(); #ifndef VMS /* most vms spoolers add a formfeed character */ putc('\f', gpoutfile); #endif /* !VMS */ } TERM_PUBLIC void HPLJII_linetype(int linetype) { if (hplj_dpp == 1) { if (linetype >= 7) linetype %= 7; /* b_pattern not appropriate for 300ppi graphics */ b_linemask = b_300ppi_pattern[linetype + 2]; b_maskcount = 0; } else { b_setlinetype(linetype); } } TERM_PUBLIC void HPLJII_put_text(unsigned int x, unsigned int y, const char *str) { switch (b_angle) { case 0: y -= HPLJII_VCHAR / 5; HPLJII_POP_CURSOR; HPLJII_PUSH_CURSOR; /* (0,0) is the upper left point of the paper */ fprintf(gpoutfile, "\033*p%+dx%+dY", x * HPLJII_DPP ,(HPLJII_YMAX - y - 1) * HPLJII_DPP); fputs(str, gpoutfile); /* for (; *str; ++str, x += HPLJII_HCHAR) HPLJII_putc (x, y, *str, b_angle);*/ break; case 1: y += (HPLJII_HCHAR - 2 * HPLJII_VCHAR) / 2; y += (HPLJII_VCHAR + HPLJII_HCHAR) * strlen(str) / 2; for (; *str; ++str, y -= HPLJII_VCHAR) HPLJII_putc(x, y, *str, b_angle); break; } } static void HPLJII_putc(unsigned int x, unsigned int y, int c, int ang) { HPLJII_POP_CURSOR; HPLJII_PUSH_CURSOR; (void) ang; /* avoid -Wunused warnings */ /* (0,0) is the upper left point of the paper */ fprintf(gpoutfile, "\033*p%+dx%+dY", x * HPLJII_DPP, (HPLJII_YMAX - y - 1) * HPLJII_DPP); fputc(c, gpoutfile); } TERM_PUBLIC void HPLJII_reset() { #ifdef VMS fflush_binary(); #endif /* VMS */ } /* HP DeskJet routines */ TERM_PUBLIC void HPDJ_graphics() { switch (hplj_dpp) { case 1: b_charsize(FNT13X25); term->v_char = FNT13X25_VCHAR; term->h_char = FNT13X25_HCHAR; break; case 2: b_charsize(FNT13X25); term->v_char = FNT13X25_VCHAR; term->h_char = FNT13X25_HCHAR; break; case 3: b_charsize(FNT9X17); term->v_char = FNT9X17_VCHAR; term->h_char = FNT9X17_HCHAR; break; case 4: b_charsize(FNT5X9); term->v_char = FNT5X9_VCHAR; term->h_char = FNT5X9_HCHAR; break; } /* rotate plot -90 degrees by reversing XMAX and YMAX and by setting b_rastermode to TRUE */ b_makebitmap(HPLJII_YMAX, HPLJII_XMAX, 1); b_rastermode = TRUE; } /* 0 compression raster bitmap dump. Compatible with HP DeskJet 500 hopefully compatible with other HP Deskjet printers */ TERM_PUBLIC void HPDJ_text() { register int x, j, row; fprintf(gpoutfile, "\ \033*b0M\ \033*t%dR\ \033*r1A", HPLJII_PPI); /* dump bitmap in raster mode */ for (x = b_xsize - 1; x >= 0; x--) { row = (b_ysize / 8) - 1; fprintf(gpoutfile, "\033*b%dW", b_ysize / 8); for (j = row; j >= 0; j--) { (void) fputc((char) (*((*b_p)[j] + x)), gpoutfile); } } fputs("\033*rbC", gpoutfile); b_freebitmap(); #ifndef VMS /* most vms spoolers add a formfeed character */ putc('\f', gpoutfile); #endif /* !VMS */ } #endif #ifdef TERM_TABLE TERM_TABLE_START(hpljii_driver) "hpljii", "HP Laserjet series II, [75 100 150 300]", HPLJII_75PPI_XMAX, HPLJII_75PPI_YMAX, HPLJII_75PPI_VCHAR, HPLJII_75PPI_HCHAR, HPLJII_75PPI_VTIC, HPLJII_75PPI_HTIC, HPLJII_options, HPLJII_init, HPLJII_reset, HPLJII_text, null_scale, HPLJII_graphics, b_move, b_vector, HPLJII_linetype, HPLJII_put_text, b_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null, 0, TERM_BINARY, 0, 0, b_boxfill TERM_TABLE_END(hpljii_driver) #undef LAST_TERM #define LAST_TERM hpljii_driver TERM_TABLE_START(hpdj_driver) "hpdj", "HP DeskJet 500, [75 100 150 300]", HPLJII_75PPI_XMAX, HPLJII_75PPI_YMAX, HPLJII_75PPI_VCHAR, HPLJII_75PPI_HCHAR, HPLJII_75PPI_VTIC, HPLJII_75PPI_HTIC, HPLJII_options, HPLJII_init, HPLJII_reset, HPDJ_text, null_scale, HPDJ_graphics, b_move, b_vector, HPLJII_linetype, b_put_text, b_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null, 0, TERM_BINARY, 0, 0, b_boxfill TERM_TABLE_END(hpdj_driver) #undef LAST_TERM #define LAST_TERM hpdj_driver #endif #endif #ifdef TERM_HELP START_HELP(hpljii) "1 hpljii", "?commands set terminal hpljii", "?set terminal hpljii", "?set term hpljii", "?terminal hpljii", "?term hpljii", "?hpljii", "?commands set terminal hpdj", "?set terminal hpdj", "?set term hpdj", "?terminal hpdj", "?term hpdj", "?hpdj", " The `hpljii` terminal driver supports the HP Laserjet Series II printer. The", " `hpdj` driver supports the HP DeskJet 500 printer. These drivers allow a", " choice of resolutions.", "", " Syntax:", " set terminal hpljii | hpdj {}", "", " where `res` may be 75, 100, 150 or 300 dots per inch; the default is 75.", " Rasterization at the higher resolutions may require a large amount of memory.", "", " The `hp500c` terminal is similar to `hpdj`; `hp500c` additionally supports", " color and compression." END_HELP(hpljii) #endif /* TERM_HELP */ gnuplot-4.6.4/term/regis.trm0000644000471100001440000001607510460036604012745 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: regis.trm,v 1.15 2006/07/21 02:35:48 sfeam Exp $ * */ /* GNUPLOT - regis.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * REGIS devices * * AUTHORS * Colin Kelley, Thomas Williams * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ #include "driver.h" #ifdef TERM_REGISTER register_term(regis) #endif #ifdef TERM_PROTO TERM_PUBLIC void REGIS_init __PROTO((void)); TERM_PUBLIC void REGIS_graphics __PROTO((void)); TERM_PUBLIC void REGIS_init __PROTO((void)); TERM_PUBLIC void REGIS_graphics __PROTO((void)); TERM_PUBLIC void REGIS_text __PROTO((void)); TERM_PUBLIC void REGIS_linetype __PROTO((int linetype)); TERM_PUBLIC void REGIS_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void REGIS_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void REGIS_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int REGIS_text_angle __PROTO((int ang)); TERM_PUBLIC void REGIS_reset __PROTO((void)); TERM_PUBLIC void REGIS_options __PROTO((void)); #define REGISXMAX 800 #define REGISYMAX 440 #define REGISXLAST (REGISXMAX - 1) #define REGISYLAST (REGISYMAX - 1) #define REGISVCHAR 20 #define REGISHCHAR 9 #define REGISVTIC 8 #define REGISHTIC 6 /* is defined in plot.h #define TRUE 1 #define FALSE 0 */ #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static int REGIS16color = FALSE; static int REGISang = 0; TERM_PUBLIC void REGIS_init() { fputs("\033[r\033[24;1H", gpoutfile); /* 1 2 * 1. reset scrolling region * 2. locate cursor on bottom line */ } /* thanks to calmasd!dko (Dan O'Neill) for adding S(E) for vt125s */ TERM_PUBLIC void REGIS_graphics() { fputs("\033[2J\033P1pS(C0)S(E)T(A0)\n", gpoutfile); /* 1 2 3 4 5 * 1. clear screen * 2. enter ReGIS graphics * 3. turn off graphics diamond cursor * 4. clear graphics screen * 5. character set option. */ (void) REGIS_text_angle(0); /* select text size and angle */ } TERM_PUBLIC void REGIS_text() { fputs("\033\\\033[24;1H", gpoutfile); /* 1 2 * 1. Leave ReGIS graphics mode * 2. locate cursor on last line of screen */ } TERM_PUBLIC void REGIS_linetype(int linetype) { /* This will change color in order G,R,B,G-dot,R-dot,B-dot */ static int in_16_map[15 + 2] = { 7, 7, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; static int lt_16_map[15 + 2] = { 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; static int in_map[9 + 2] = { 2, 2, 3, 2, 1, 3, 2, 1, 3, 2, 1 }; static int lt_map[9 + 2] = { 1, 4, 1, 1, 1, 4, 4, 4, 6, 6, 6 }; if (linetype < -2) linetype = LT_BLACK; if (!REGIS16color) { if (linetype >= 9) linetype %= 9; fprintf(gpoutfile, "W(I%d)\n", in_map[linetype + 2]); fprintf(gpoutfile, "W(P%d)\n", lt_map[linetype + 2]); } else { if (linetype >= 15) linetype %= 15; fprintf(gpoutfile, "W(I%d)\n", in_16_map[linetype + 2]); fprintf(gpoutfile, "W(P%d)\n", lt_16_map[linetype + 2]); } } /* ** The \n was added in the functions below (and above) in order to not cause ** a buffer overflow in devices that can't deal with long line lengths. ** The DEC vt-340 doesn't need this, but Reflection 4, a vt-340 emulator ** for PC's under MS-DOS and Microsoft Windows does need it. ** Also needed for DECterm, a vt-340 emulator for use with Motif 1.0 ** on Open/VMS. ** NGB 9/13/93 */ TERM_PUBLIC void REGIS_move(unsigned int x, unsigned int y) { fprintf(gpoutfile, "P[%d,%d]\n", x, REGISYLAST - y); } TERM_PUBLIC void REGIS_vector(unsigned int x, unsigned int y) { fprintf(gpoutfile, "v[]v[%d,%d]\n", x, REGISYLAST - y); /* the initial v[] is needed to get the first pixel plotted */ } /* put_text and text_angle by rjl */ TERM_PUBLIC void REGIS_put_text(unsigned int x, unsigned int y, const char *str) { if (REGISang == 1) REGIS_move(x - REGISVCHAR / 2 - 1, y); else REGIS_move(x, y + REGISVCHAR / 2 - 1); (void) putc('T', gpoutfile); (void) putc('\'', gpoutfile); while (*str) { (void) putc(*str, gpoutfile); if (*str == '\'') (void) putc('\'', gpoutfile); /* send out another one */ str++; } (void) putc('\'', gpoutfile); (void) putc('\n', gpoutfile); } TERM_PUBLIC int REGIS_text_angle(int ang) { REGISang = (ang ? 1 : 0); if (REGISang == 1) fputs("T(D90,S1)\n", gpoutfile); else fputs("T(D0,S1)\n", gpoutfile); return TRUE; } TERM_PUBLIC void REGIS_reset() { fputs("\033[2J\033[24;1H", gpoutfile); } TERM_PUBLIC void REGIS_options() { int i = 0; struct value a; if (!END_OF_COMMAND) { i = (int) real(const_express(&a)); } REGIS16color = (i == 16); sprintf(term_options, "%s", REGIS16color ? "16" : "4"); } #endif #ifdef TERM_TABLE TERM_TABLE_START(regis_driver) "regis", "REGIS graphics language", REGISXMAX, REGISYMAX, REGISVCHAR, REGISHCHAR, REGISVTIC, REGISHTIC, REGIS_options, REGIS_init, REGIS_reset, REGIS_text, null_scale, REGIS_graphics, REGIS_move, REGIS_vector, REGIS_linetype, REGIS_put_text, REGIS_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(regis_driver) #undef LAST_TERM #define LAST_TERM regis_driver #endif #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(regis) "1 regis", "?commands set terminal regis", "?set terminal regis", "?set term regis", "?terminal regis", "?term regis", "?regis", " The `regis` terminal device generates output in the REGIS graphics language.", " It has the option of using 4 (the default) or 16 colors.", "", " Syntax:", " set terminal regis {4 | 16}" END_HELP(regis) #endif gnuplot-4.6.4/term/eepic.trm0000644000471100001440000004752311562045340012724 0ustar /* Hello, Emacs! This is -*-C-*- !*/ /* * $Id: eepic.trm,v 1.31 2011/05/09 20:13:20 sfeam Exp $ * */ /* GNUPLOT - eepic.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * The EEPIC macros for LaTeX. * * AUTHORS * David Kotz * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * This file contains the eepic terminal driver, intended for use with the * eepic.sty macro package for LaTeX. This is an alternative to the * latex driver. You need eepic.sty, epic.sty, and a printer driver that * supports the tpic \specials. * * Although dotted and dashed lines are possible with EEPIC, and are * tempting, they do not work well for high-sample-rate curves, mushing * the dashes all together into a solid line. For now anyway, the EEPIC * driver will have only solid lines. Anyone got a solution? * * LATEX must also be defined. */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ /* Additions by Gabriel Zachmann (Gabriel.Zachmann@gmx.net), Nov 2000: * - little bug fix in stacked (faked rotated) text * - color support * - true rotated text * - augmented line types set with dashed lines * - optionally small or tiny point symbols * - font size */ #include "driver.h" #ifdef TERM_REGISTER register_term(eepic) #endif #ifdef TERM_PROTO #include TERM_PUBLIC void EEPIC_init __PROTO((void)); TERM_PUBLIC void EEPIC_graphics __PROTO((void)); TERM_PUBLIC void EEPIC_text __PROTO((void)); TERM_PUBLIC void EEPIC_linetype __PROTO((int linetype)); TERM_PUBLIC void EEPIC_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void EEPIC_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void EEPIC_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void EEPIC_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); TERM_PUBLIC void EEPIC_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC int EEPIC_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC int EEPIC_text_angle __PROTO((int ang)); TERM_PUBLIC void EEPIC_reset __PROTO((void)); TERM_PUBLIC void EEPIC_options __PROTO((void)); #define EEPIC_PTS_PER_INCH 72. /* resolution of printer we expect to use */ #define EEPIC_DOTS_PER_INCH 600 /* dot size in pt */ #define EEPIC_UNIT (EEPIC_PTS_PER_INCH/EEPIC_DOTS_PER_INCH) /* 5 inches wide by 3 inches high (default) */ #define EEPIC_XMAX (5.0*EEPIC_PTS_PER_INCH/EEPIC_UNIT) #define EEPIC_YMAX (3.0*EEPIC_PTS_PER_INCH/EEPIC_UNIT) #define EEPIC_HTIC (5.0/EEPIC_UNIT) #define EEPIC_VTIC (5.0/EEPIC_UNIT) #define EEPIC_VCHAR (10.0/EEPIC_UNIT) /* 10 pt font */ #define EEPIC_HCHAR (EEPIC_VCHAR/2.0) #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static unsigned int EEPIC_posx; static unsigned int EEPIC_posy; static enum JUSTIFY eepic_justify = LEFT; static int eepic_angle = 0; static int eepic_color_on = FALSE; /* use \color */ static int eepic_true_rotate = FALSE; /* use \rotatebox */ static int eepic_fontsize_set = FALSE; static float eepic_xsize = 5.0; static float eepic_ysize = 3.0; /* for DOTS point style */ #define EEPIC_TINY_DOT "\\rule{.1pt}{.1pt}" /* POINTS */ static int eepic_num_point_types[] = { 12, 10, 8 }; static int eepic_pointsize = 0; static const char GPFAR *GPFAR EEPIC_points[][12] = { { "\\makebox(0,0){$\\Diamond$}", "\\makebox(0,0){$+$}", "\\makebox(0,0){$\\Box$}", "\\makebox(0,0){$\\times$}", "\\makebox(0,0){$\\triangle$}", "\\makebox(0,0){$\\star$}", "\\circle{12}", "\\circle{18}", "\\circle{24}", "\\circle*{12}", "\\circle*{18}", "\\circle*{24}" }, { "\\makebox(0,0){$\\scriptstyle\\Diamond$}", "\\makebox(0,0){$\\scriptstyle +$}", "\\makebox(0,0){$\\scriptstyle\\Box$}", "\\makebox(0,0){$\\scriptstyle\\times$}", "\\makebox(0,0){$\\scriptstyle\\triangle$}", "\\makebox(0,0){$\\scriptstyle\\star$}", "\\circle{12}", "\\circle{18}", "\\circle*{12}", "\\circle*{18}", }, { "\\makebox(0,0){$\\scriptscriptstyle\\Diamond$}", "\\makebox(0,0){$\\scriptscriptstyle +$}", "\\makebox(0,0){$\\scriptscriptstyle\\Box$}", "\\makebox(0,0){$\\scriptscriptstyle\\times$}", "\\makebox(0,0){$\\scriptscriptstyle\\triangle$}", "\\makebox(0,0){$\\scriptscriptstyle\\star$}", "\\circle{12}", "\\circle*{12}", } }; /* LINES */ static int eepic_numlines[] = { 5, 7, 8 }; /* number of linetypes below */ #define EEPIC_MAX_NUMLINES 8 /* max of eepic_numlines[] */ static int eepic_lineset = 0; static char GPFAR *GPFAR EEPIC_lines[][EEPIC_MAX_NUMLINES] = { { "\\thicklines \\path", /* -2 border */ "\\thinlines \\drawline[-50]", /* -1 axes */ "\\thinlines \\path", /* 0 solid thin */ "\\thicklines \\path", /* 1 solid thick */ "\\Thicklines \\path" /* 2 solid Thick */ }, { "\\thicklines \\path", /* -2 border */ "\\thinlines \\drawline[-50]", /* -1 axes */ "\\thinlines \\path", /* 0 solid thin */ "\\thinlines \\dashline[90]{10}", "\\thinlines \\dottedline{10}", "\\thinlines \\dashline[60]{20}", "\\thinlines \\dottedline{20}" }, { "\\thicklines \\path", /* -2 border */ "\\thinlines \\drawline[-50]", /* -1 axes */ "\\thinlines \\path", "\\thinlines \\path", "\\thinlines \\path", "\\thinlines \\path", "\\thinlines \\path", "\\thinlines \\path" } }; static int EEPIC_type; /* current line type */ static TBOOLEAN EEPIC_inline = FALSE; /* are we in the middle of a line */ static void EEPIC_endline __PROTO((void)); /* terminate any line in progress */ static int EEPIC_linecount = 0; /* number of points in line so far */ #define EEPIC_LINEMAX 50 /* max value for linecount */ #define EEPIC_NUM_COLORS 7 static int eepic_color = 0; static char GPFAR *GPFAR eepic_colors[EEPIC_NUM_COLORS] = { "\\color{black}\n", /* border and axes (must be black!) */ "\\color{red}\n", "\\color{blue}\n", "\\color{green}\n", "\\color{magenta}\n", "\\color{cyan}\n", "\\color{yellow}\n" }; /* ARROWS */ /* we use the same code as for LATEX */ /* figure out the best arrow */ static void best_latex_arrow __PROTO((int sx, int sy, int ex, int ey, int who, int head)); TERM_PUBLIC void EEPIC_init() { EEPIC_posx = EEPIC_posy = 0; EEPIC_type = 0; EEPIC_linecount = 0; EEPIC_inline = FALSE; eepic_color = 0; fprintf(gpoutfile, "\ %% GNUPLOT: LaTeX picture using EEPIC macros\n\ \\setlength{\\unitlength}{%fpt}\n", EEPIC_UNIT); } TERM_PUBLIC void EEPIC_graphics() { register struct termentry *t = term; /* HBB 20001027: respect 'size' and 'offset' settings to modify * picture box size and position */ fprintf(gpoutfile, "\\begin{picture}(%d,%d)(%d,%d)\n", (int) (t->xmax * xsize), (int) (t->ymax * ysize), (int) (t->xmax * xoffset), (int) (t->ymax * xoffset)); if (eepic_fontsize_set) { float x = t->v_char * EEPIC_UNIT + 0.5; fprintf(gpoutfile, "\\fontsize{%d}{%g}\\selectfont\n", (int) x, 1.2 * x ); } else fprintf(gpoutfile,"\\footnotesize\n" ); } TERM_PUBLIC void EEPIC_text() { EEPIC_endline(); fputs("\\end{picture}\n", gpoutfile); } TERM_PUBLIC void EEPIC_linetype(int linetype) { EEPIC_endline(); EEPIC_type = linetype % (eepic_numlines[eepic_lineset] - 2); if ( eepic_color_on ) { eepic_color = linetype; if ( eepic_color < 0 ) eepic_color = 0; else { eepic_color %= EEPIC_NUM_COLORS - 1; eepic_color += 1; } fputs( eepic_colors[eepic_color], gpoutfile ); } } TERM_PUBLIC void EEPIC_move(unsigned int x, unsigned int y) { EEPIC_endline(); EEPIC_posx = x; EEPIC_posy = y; } TERM_PUBLIC void EEPIC_point(unsigned int x, unsigned int y, int number) { EEPIC_move(x, y); /* Print the character defined by 'number'; number < 0 means to use a dot, otherwise one of the defined points. */ fprintf(gpoutfile, "\\put(%d,%d){%s}\n", x, y, (number < 0 ? EEPIC_TINY_DOT : EEPIC_points[eepic_pointsize][number % eepic_num_point_types[eepic_pointsize]])); } TERM_PUBLIC void EEPIC_vector(unsigned int ux, unsigned int uy) { if (!EEPIC_inline) { EEPIC_inline = TRUE; /* Start a new line. This depends on line type */ fprintf(gpoutfile, "%s(%u,%u)", EEPIC_lines[eepic_lineset][EEPIC_type + 2], EEPIC_posx, EEPIC_posy); EEPIC_linecount = 1; } else { /* Even though we are in middle of a path, * we may want to start a new path command. * If they are too long then latex will choke. */ if (EEPIC_linecount++ >= EEPIC_LINEMAX) { fprintf(gpoutfile, "\n%s(%u,%u)", EEPIC_lines[eepic_lineset][EEPIC_type + 2], EEPIC_posx, EEPIC_posy); EEPIC_linecount = 1; } } fprintf(gpoutfile, "(%u,%u)", ux, uy); EEPIC_posx = ux; EEPIC_posy = uy; } static void EEPIC_endline() { if (EEPIC_inline) { putc('\n', gpoutfile); EEPIC_inline = FALSE; } } TERM_PUBLIC void EEPIC_arrow( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { best_latex_arrow(sx, sy, ex, ey, 2, head); /* call latex routine */ EEPIC_posx = ex; EEPIC_posy = ey; } TERM_PUBLIC void EEPIC_put_text(unsigned int x, unsigned int y, const char str[]) { int i, l; EEPIC_endline(); fprintf(gpoutfile, "\\put(%d,%d)", x, y); if ((str[0] == '{') || (str[0] == '[')) { fprintf(gpoutfile, "{\\makebox(0,0)%s}\n", str); } else switch (eepic_angle) { case 0: { switch (eepic_justify) { case LEFT: fputs("{\\makebox(0,0)[l]{",gpoutfile); break; case CENTRE: fputs("{\\makebox(0,0){",gpoutfile); break; case RIGHT: fputs("{\\makebox(0,0)[r]{",gpoutfile); break; } fprintf(gpoutfile,"%s}}\n", str); break; } case 1: { if ( eepic_true_rotate ) { /* use \rotatebox */ switch (eepic_justify) { case LEFT: fputs("{\\makebox(0,0)[lb]{\\rotatebox[origin=c]{90}{", gpoutfile); break; case CENTRE: fputs("{\\makebox(0,0)[l]{\\rotatebox[origin=c]{90}{", gpoutfile); break; case RIGHT: fputs("{\\makebox(0,0)[lt]{\\rotatebox[origin=c]{90}{", gpoutfile); break; } fprintf(gpoutfile,"%s}}}\n", str); } else { /* put text in a short stack */ switch (eepic_justify) { case LEFT: fputs("{\\makebox(0,0)[lb]{\\shortstack{",gpoutfile); break; case CENTRE: fputs("{\\makebox(0,0)[l]{\\shortstack{",gpoutfile); break; case RIGHT: fputs("{\\makebox(0,0)[lt]{\\shortstack{",gpoutfile); break; } l = strlen(str)-1; for ( i = 0; i < l; i ++ ) fprintf(gpoutfile, "%c\\\\", str[i] ); fputc(str[l],gpoutfile); fputs("}}}\n",gpoutfile); } break; } } } TERM_PUBLIC int EEPIC_justify_text(enum JUSTIFY mode) { eepic_justify = mode; return (TRUE); } TERM_PUBLIC int EEPIC_text_angle(int ang) { eepic_angle = (ang ? 1 : 0); return (TRUE); } TERM_PUBLIC void EEPIC_reset() { EEPIC_endline(); EEPIC_posx = EEPIC_posy = 0; } TERM_PUBLIC void EEPIC_options() { float fontsize = 0; int eepic_explicit_units = INCH; static TBOOLEAN size_set = FALSE; eepic_color_on = eepic_true_rotate = FALSE; eepic_lineset = 0; eepic_pointsize = 0; while (!END_OF_COMMAND) { if (almost_equals(c_token, "def$ault")) { eepic_fontsize_set = FALSE; eepic_color_on = FALSE; eepic_true_rotate = FALSE; eepic_lineset = 0; eepic_pointsize = 0; eepic_explicit_units = INCH; term->xmax = EEPIC_XMAX; term->ymax = EEPIC_YMAX; size_set = FALSE; c_token++; } else if (almost_equals(c_token, "c$olor") || almost_equals(c_token, "c$olour")) { eepic_color_on = TRUE; eepic_lineset = 2; c_token++; } else if (almost_equals(c_token, "r$otate")) { eepic_true_rotate = TRUE; c_token++; } else if (almost_equals(c_token, "da$shed")) { if (! eepic_color_on) eepic_lineset = 1; /* ignore when color is on */ c_token++; } else if (equals(c_token, "size")) { c_token++; eepic_explicit_units = parse_term_size(&eepic_xsize, &eepic_ysize, INCHES); term->xmax = eepic_xsize / EEPIC_UNIT; term->ymax = eepic_ysize / EEPIC_UNIT; size_set = TRUE; } else if (almost_equals(c_token, "s$mall")) { eepic_pointsize = 1; c_token++; } else if (almost_equals(c_token, "t$iny")) { eepic_pointsize = 2; c_token++; } else if (isdigit((unsigned char) gp_input_line[token[c_token].start_index])) { struct value a; fontsize = real(const_express(&a)); if (fontsize < 1 || fontsize > 100) int_error(c_token, "font size out of bounds [1..100]"); else { eepic_fontsize_set = TRUE; term->v_char = (unsigned int)(fontsize/EEPIC_UNIT); term->h_char = (unsigned int)((fontsize/EEPIC_UNIT)/2); } } else int_error(c_token, "unrecognized option"); } /* while(command) */ sprintf(term_options, "%s%s%s%s", eepic_color_on ? " color" : "", eepic_lineset == 1 ? " dashed" : "", eepic_true_rotate ? " rotate" : "", eepic_pointsize == 1 ? " small" : eepic_pointsize == 2 ? " tiny" : "" ); if (eepic_fontsize_set) sprintf( term_options+strlen(term_options), " %d", (int) fontsize ); if (size_set) { if (eepic_explicit_units == CM) sprintf(term_options+strlen(term_options)," size %.2fcm, %.2fcm ", 2.54*(float)term->xmax/(EEPIC_DOTS_PER_INCH), 2.54*(float)term->ymax/(EEPIC_DOTS_PER_INCH)); else sprintf(term_options+strlen(term_options)," size %.2fin, %.2fin ", (float)term->xmax/(EEPIC_DOTS_PER_INCH), (float)term->ymax/(EEPIC_DOTS_PER_INCH)); } } #endif #ifdef TERM_TABLE TERM_TABLE_START(eepic_driver) "eepic", "EEPIC -- extended LaTeX picture environment", EEPIC_XMAX, EEPIC_YMAX, EEPIC_VCHAR, EEPIC_HCHAR, EEPIC_VTIC, EEPIC_HTIC, EEPIC_options, EEPIC_init, EEPIC_reset, EEPIC_text, null_scale, EEPIC_graphics, EEPIC_move, EEPIC_vector, EEPIC_linetype, EEPIC_put_text, EEPIC_text_angle, EEPIC_justify_text, EEPIC_point, EEPIC_arrow, set_font_null, 0, /* pointsize */ 0, /* flags */ 0, 0, /* suspend, resume */ 0, /* fillbox */ 0 /* linewidth */ TERM_TABLE_END(eepic_driver) #undef LAST_TERM #define LAST_TERM eepic_driver #endif #endif #ifdef TERM_HELP START_HELP(eepic) "1 eepic", "?commands set terminal eepic", "?set terminal eepic", "?set term eepic", "?terminal eepic", "?term eepic", "?eepic", " The `eepic` terminal driver supports the extended LaTeX picture environment.", " It is an alternative to the `latex` driver.", "", " The output of this terminal is intended for use with the \"eepic.sty\" macro", " package for LaTeX. To use it, you need \"eepic.sty\", \"epic.sty\" and a", " printer driver that supports the \"tpic\" \\specials. If your printer driver", " doesn't support those \\specials, \"eepicemu.sty\" will enable you to use some", " of them.", " dvips and dvipdfm do support the \"tpic\" \\specials.", "", " Syntax:", " set terminal eepic {default} {color|dashed} {rotate} {size XX,YY}", " {small|tiny|}", "", " Options:", " You can give options in any order you wish.", " 'color' causes gnuplot to produce \\color{...} commands so that the graphs are", " colored. Using this option, you must include \\usepackage{color} in the preambel", " of your latex document.", " 'dashed' will allow dashed line types; without this option, only solid lines", " with varying thickness will be used.", " 'dashed' and 'color' are mutually exclusive; if 'color' is specified, then", " 'dashed' will be ignored.", " 'rotate' will enable true rotated text (by 90 degrees). Otherwise, rotated text", " will be typeset with letters stacked above each other. If you use this option", " you must include \\usepackage{graphicx} in the preamble.", " 'small' will use \\scriptsize symbols as point markers (Probably does not work", " with TeX, only LaTeX2e). Default is to use the default math size.", " 'tiny' uses \\scriptscriptstyle symbols.", " 'default' resets all options to their defaults = no color, no dashed lines,", " pseudo-rotated (stacked) text, large point symbols.", " is a number which specifies the font size inside the picture", " environment; the unit is pt (points), i.e., 10 pt equals approx. 3.5 mm.", " If fontsize is not specified, then all text inside the picture will be set", " in \\footnotesize.", "", " Notes:", " Remember to escape the # character (or other chars meaningful to (La-)TeX)", " by \\\\ (2 backslashes).", " It seems that dashed lines become solid lines when the vertices of a plot", " are too close. (I do not know if that is a general problem with the tpic", " specials, or if it is caused by a bug in eepic.sty or dvips/dvipdfm.)", " The default size of an eepic plot is 5x3 inches. You can change this using ", " the `size` terminal option.", " Points, among other things, are drawn using the LaTeX commands \"\\Diamond\",", " \"\\Box\", etc. These commands no longer belong to the LaTeX2e core; they are", " included in the latexsym package, which is part of the base distribution and", " thus part of any LaTeX implementation. Please do not forget to use this package.", " Instead of latexsym, you can also include the amssymb package.", " All drivers for LaTeX offer a special way of controlling text positioning:", " If any text string begins with '{', you also need to include a '}' at the", " end of the text, and the whole text will be centered both horizontally and", " vertically. If the text string begins with '[', you need to follow this with", " a position specification (up to two out of t,b,l,r), ']{', the text itself,", " and finally '}'. The text itself may be anything LaTeX can typeset as an", " LR-box. '\\rule{}{}'s may help for best positioning.", "", " Examples:", " set term eepic", " output graphs as eepic macros inside a picture environment;", " \\input the resulting file in your LaTeX document.", " set term eepic color tiny rotate 8", " eepic macros with \\color macros, \\scripscriptsize point markers,", " true rotated text, and all text set with 8pt.", "", " About label positioning:", " Use gnuplot defaults (mostly sensible, but sometimes not really best):", " set title '\\LaTeX\\ -- $ \\gamma $'", " Force centering both horizontally and vertically:", " set label '{\\LaTeX\\ -- $ \\gamma $}' at 0,0", " Specify own positioning (top here):", " set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'", " The other label -- account for long ticlabels:", " set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}}'" END_HELP(eepic) #endif /* TERM_HELP */ gnuplot-4.6.4/term/t410x.trm0000644000471100001440000002005110460036604012501 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: t410x.trm,v 1.16 2006/07/21 02:35:48 sfeam Exp $ * */ /* GNUPLOT - t410x.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: Tektronix 410x and 420x series terminals * * AUTHORS * Colin Kelley, Thomas Williams * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* Tektronix 410X and 420X driver written by Cary D. Renzema. * email address: caryr@mxim.com * * I've tested this driver on the following terminals: 4106, 4107A, 4109 * and 4207. It should work, without editing, on other terminals in the * 410x and 420x families. It will probably need to be changed to work * on a 4105 (screen size and character rotation are two guesses). This * file can also be used as a start for a 411x driver. * * Cary R. * April 5, 1990 */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(tek410x) #endif #ifdef TERM_PROTO TERM_PUBLIC void T410X_init __PROTO((void)); TERM_PUBLIC void T410X_reset __PROTO((void)); TERM_PUBLIC void T410X_graphics __PROTO((void)); TERM_PUBLIC void T410X_text __PROTO((void)); TERM_PUBLIC void T410X_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void T410X_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void T410X_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void T410X_linetype __PROTO((int linetype)); TERM_PUBLIC void T410X_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC int T410X_text_angle __PROTO((int ang)); #define T410XXMAX 4095 #define T410XYMAX 3131 #define T410XVCHAR 71 #define T410XHCHAR 51 #define T410XVTIC 36 #define T410XHTIC 36 #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static void T410X_encode_x_y __PROTO((unsigned int x, unsigned int y)); static void T410X_encode_int __PROTO((int number)); static int T410X_angle = 0; TERM_PUBLIC void T410X_init() { fputs("\033%%!0\033MN0\033MCB7C;\033MQ1\033MT1", gpoutfile); fputs("\033MG1\033RK!\033SK!\033LZ\033%%!1", gpoutfile); /* 1. set tek mode 2. set character path to 0 (characters placed equal to rotation) 3. set character size to 59 height 4. set character precision to string 5. set character text index to 1 6. set character write mode to overstrike 7. clear the view 8. clear the segments 9. clear the dialog buffer 10. set ansi mode */ (void) fflush(gpoutfile); } TERM_PUBLIC void T410X_reset() { fputs("\033%%!0\033LZ\033%%!1", gpoutfile); /* 1. set tek mode 2. clear the dialog buffer 3. set ansi mode */ (void) fflush(gpoutfile); } TERM_PUBLIC void T410X_graphics() { fputs("\033%%!0\033\014\033LV0", gpoutfile); /* 1. set tek mode 2. clear the screen 3. set dialog area invisible */ (void) fflush(gpoutfile); } TERM_PUBLIC void T410X_text() { fputs("\033LV1\033%%!1", gpoutfile); /* 1. set dialog area visible 2. set ansi mode */ (void) fflush(gpoutfile); } TERM_PUBLIC void T410X_move(unsigned int x, unsigned int y) { fputs("\033LF", gpoutfile); (void) T410X_encode_x_y(x, y); (void) fflush(gpoutfile); } TERM_PUBLIC void T410X_vector(unsigned int x, unsigned int y) { fputs("\033LG", gpoutfile); (void) T410X_encode_x_y(x, y); (void) fflush(gpoutfile); } TERM_PUBLIC void T410X_point(unsigned int x, unsigned int y, int number) { fputs("\033MM", gpoutfile); (void) T410X_encode_int(GPMAX(number, 0) % 11); fputs("\033LH", gpoutfile); (void) T410X_encode_x_y(x, y); (void) fflush(gpoutfile); } TERM_PUBLIC void T410X_linetype(int linetype) { if (linetype < -2) linetype = LT_BLACK; switch (linetype) { case LT_AXIS: fputs("\033ML5", gpoutfile); break; case LT_BLACK: fputs("\033ML?", gpoutfile); break; default: fputs("\033ML", gpoutfile); (void) T410X_encode_int(linetype % 14 + 2); break; } fputs("\033MV", gpoutfile); (void) T410X_encode_int(GPMAX(linetype, 0) % 8); (void) fflush(gpoutfile); } TERM_PUBLIC void T410X_put_text(unsigned int x, unsigned int y, const char str[]) { if (T410X_angle == 0) { (void) T410X_move(x, y - T410XVCHAR / 2 + 6); fputs("\033MR00", gpoutfile); } else { (void) T410X_move(x + T410XHCHAR / 2 - 6, y); fputs("\033MRE:0", gpoutfile); } (void) fputs("\033LT", gpoutfile); (void) T410X_encode_int(strlen(str)); (void) fputs(str, gpoutfile); (void) fflush(gpoutfile); } TERM_PUBLIC int T410X_text_angle(int ang) { T410X_angle = ang; return (TRUE); } /* These last two routines are based on fortran code found in the * 4106/4107/4109/CX PROGRAMMERS manual. */ static void T410X_encode_x_y(unsigned int x, unsigned int y) { static char chix = 0, chiy = 0, cloy = 0, ceb = 0; register unsigned int hix, lox, hiy, loy, eb, lx, ly; lx = (x <= T410XXMAX) ? x : T410XXMAX; ly = (y <= T410XYMAX) ? y : T410XYMAX; hix = lx / 128 + 32; lox = (lx / 4) % 32 + 64; hiy = ly / 128 + 32; loy = (ly / 4) % 32 + 96; eb = (ly % 4) * 4 + lx % 4 + 96; if (chiy != hiy) (void) putc(hiy, gpoutfile); if (ceb != eb) (void) putc(eb, gpoutfile); if ((cloy != loy) || (ceb != eb) || (chix != hix)) (void) putc(loy, gpoutfile); if (chix != hix) (void) putc(hix, gpoutfile); (void) putc(lox, gpoutfile); chix = hix; chiy = hiy; cloy = loy; ceb = eb; } static void T410X_encode_int(int number) { register unsigned int mag, hi1, hi2, lo; mag = ABS(number); hi1 = mag / 1024 + 64; hi2 = (mag / 16) % 64 + 64; lo = mag % 16 + 32; if (number >= 0) lo += 16; if (hi1 != 64) (void) putc(hi1, gpoutfile); if ((hi2 != 64) || (hi1 != 64)) (void) putc(hi2, gpoutfile); (void) putc(lo, gpoutfile); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(tek410x_driver) "tek410x", "Tektronix 4106, 4107, 4109 and 420X terminals", T410XXMAX, T410XYMAX, T410XVCHAR, T410XHCHAR, T410XVTIC, T410XHTIC, options_null, T410X_init, T410X_reset, T410X_text, null_scale, T410X_graphics, T410X_move, T410X_vector, T410X_linetype, T410X_put_text, T410X_text_angle, null_justify_text, T410X_point, do_arrow, set_font_null TERM_TABLE_END(tek410x_driver) #undef LAST_TERM #define LAST_TERM tek410x_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(tek410x) "1 tek410x", "?commands set terminal tek410x", "?set terminal tek410x", "?set term tek410x", "?terminal tek410x", "?term tek410x", "?tek410x", " The `tek410x` terminal driver supports the 410x and 420x family of Tektronix", " terminals. It has no options." END_HELP(tek410x) #endif gnuplot-4.6.4/term/be.trm0000644000471100001440000005335711656676655012256 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: be.trm,v 1.20 2011/11/10 07:30:53 markisch Exp $ * */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * be.trm --- inboard terminal driver for BE * * AUTHOR * Xavier Pianet * */ #include "driver.h" #ifdef TERM_REGISTER register_term(be) #endif #ifdef TERM_PROTO int BE_args __PROTO((int argc, char *argv[])); TERM_PUBLIC void BE_options __PROTO((void)); TERM_PUBLIC void BE_init __PROTO((void)); TERM_PUBLIC void BE_graphics __PROTO((void)); TERM_PUBLIC void BE_text __PROTO((void)); TERM_PUBLIC void BE_reset __PROTO((void)); TERM_PUBLIC void BE_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void BE_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void BE_linewidth __PROTO((double lw)); TERM_PUBLIC void BE_pointsize __PROTO((double ps)); TERM_PUBLIC void BE_linetype __PROTO((int lt)); TERM_PUBLIC void BE_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC int BE_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void BE_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void BE_fillbox __PROTO((int style, unsigned int x, unsigned y, unsigned int width, unsigned int height)); #define BE_XMAX 4096 #define BE_YMAX 4096 /* approximations for typical font/screen sizes */ #define BE_VCHAR (BE_YMAX/25) #define BE_HCHAR (BE_XMAX/100) #define BE_VTIC (BE_YMAX/100) #define BE_HTIC (BE_XMAX/150) #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY /* non-zero if '-display' found on command line */ int BE_Display = 0; static void BE_atexit __PROTO((void)); typedef enum { hasNoArg, hasArg } OptionArg; static struct beopt { const char *option; /* Name of option */ OptionArg arg; /* Whether option has argument */ } BE_cmdargs[] = { { "-mono", hasNoArg }, { "-gray", hasNoArg }, { "-clear", hasNoArg }, { "-pointsize", hasArg }, { "-iconic", hasNoArg }, { "-rv", hasNoArg }, { "-reverse", hasNoArg }, { "+rv", hasNoArg }, { "-synchronous", hasNoArg }, { "-display", hasArg }, { "-geometry", hasArg }, { "-bg", hasArg }, { "-background", hasArg }, { "-bd", hasArg }, { "-bordercolor", hasArg }, { "-bw", hasArg }, { "-borderwidth", hasArg }, { "-fg", hasArg }, { "-foreground", hasArg }, { "-fn", hasArg }, { "-font", hasArg }, { "-name", hasArg }, { "-title", hasArg }, /* { "-xnllanguage", hasArg }, { "-xrm", hasArg }, */ { "-raise", hasNoArg }, { "-noraise", hasNoArg }, { "-persist", hasNoArg } }; #define BE_nopts (sizeof(BE_cmdargs) / sizeof(BE_cmdargs[0])) static FILE *BE_ipc; static char **xargv = (char **)NULL; static char *optvec[2*BE_nopts+1]; static char BE_command[] = "gnuplot_be"; /* Almost not worth the hassle, be want a uniform interface */ enum BE_id { BE_RESET, BE_OTHER }; static struct gen_table BE_opts[] = { { "res$et", BE_RESET }, { NULL, BE_OTHER } }; static unsigned int BE_plot_number; TERM_PUBLIC void BE_options() { struct value a; while (!END_OF_COMMAND) { switch(lookup_table(&BE_opts[0],c_token)) { case BE_RESET: c_token++; BE_atexit (); /* tell gnuplot_be to shut down */ break; case BE_OTHER: default: BE_plot_number = (int) real(const_express(&a)); /* let gnuplot_be check range */ break; } } sprintf(term_options, "%d", BE_plot_number); } /* BE_args - scan gnuplot command line for standard Toolkit options (to be * done) called from plot.c so must not be TERM_PUBLIC (which may be static) */ int BE_args(int argc, char *argv[]) { int nbe = 0, i = 0, n; xargv = (char **) gp_alloc (argc*sizeof(char *), ""); if (!xargv) { fputs ("not enough memory to copy argv - quitting\n", stderr); exit (EXIT_FAILURE); } /* We make a copy of the argument vector because * argv is modified later. */ memcpy (xargv, argv, argc*sizeof(char *)); optvec[i++] = BE_command; while (++argv, --argc > 0) { for (n = 0; n < BE_nopts; n++) { if (strcmp(*argv, BE_cmdargs[n].option) == 0) { optvec[i++] = *xargv; if (strcmp(*argv, "-display") == 0) BE_Display++; if (BE_cmdargs[n].arg == hasArg) { if (--argc <= 0) return nbe; optvec[i++] = *++xargv, ++argv; nbe++; } nbe++; break; } } if (n == BE_nopts) break; } return nbe; } /* we do not want to have to duplicate all the code, so we * do most of it with macros. * PRINT0(format), PRINT1(format, p1), PRINT2(format, p1, p2) etc * also FLUSH0(format), etc, which do an additional flush */ /* * The Be terminal driver uses popen() pipe IPC */ static void BE_atexit () { if (BE_ipc) { fputs("R\n", BE_ipc); fclose(BE_ipc); /* dont wait(), since they might be -persist */ BE_ipc = NULL; } } TERM_PUBLIC void BE_init() { if (!BE_ipc) { /* first time through or after a reset */ int fdes[2]; pipe(fdes); if (fork() == 0) { /* child */ close(fdes[1]); dup2(fdes[0], 0); /* stdin from pipe */ execvp(BE_command, optvec); /* if we get here, something went wrong */ perror("exec failed"); exit(1); } /* parent */ close(fdes[0]); /* read end of pipe */ BE_ipc = fdopen(fdes[1], "w"); } { static int been_here = 0; if (!been_here) { atexit(BE_atexit); been_here = 1; } } } TERM_PUBLIC void BE_reset() { /* leave the pipe alone, until exit or set term be reset */ } #define PRINT0(fmt) fprintf(BE_ipc, fmt) #define PRINT1(fmt,p1) fprintf(BE_ipc, fmt,p1) #define PRINT2(fmt,p1,p2) fprintf(BE_ipc, fmt,p1,p2) #define PRINT3(fmt,p1,p2,p3) fprintf(BE_ipc, fmt,p1,p2,p3) #define PRINT4(fmt,p1,p2,p3,p4) fprintf(BE_ipc, fmt,p1,p2,p3,p4) #define PRINT5(fmt,p1,p2,p3,p4,p5) fprintf(BE_ipc, fmt,p1,p2,p3,p4,p5) #define FFLUSH() fflush(BE_ipc) #define BEFORE_GRAPHICS /* nowt */ #define AFTER_TEXT /* nowt */ /* common stuff, using macros defined above */ TERM_PUBLIC void BE_graphics() { BEFORE_GRAPHICS; /* kludge for crippled select */ PRINT1("G%d\n", BE_plot_number); /* for VMS sake, keep as separate prints */ } TERM_PUBLIC void BE_text() { PRINT0("E\n"); FFLUSH(); AFTER_TEXT; /* kludge for crippled select */ } TERM_PUBLIC void BE_move(unsigned int x, unsigned int y) { PRINT2("M%04d%04d\n", x, y); } TERM_PUBLIC void BE_vector(unsigned int x, unsigned int y) { PRINT2("V%04d%04d\n", x, y); } TERM_PUBLIC void BE_pointsize(double ps) { if (ps < 0) ps = 1; PRINT2("P7%04d%04d\n", /* size of point symbols */ (int) (term->h_tic * ps * 0.5), (int) (term->v_tic * ps * 0.5)); } TERM_PUBLIC void BE_linewidth(double lw) { PRINT1("W%04d\n", (int) lw); } TERM_PUBLIC void BE_linetype(int lt) { PRINT1("L%04d\n", lt); } TERM_PUBLIC void BE_put_text(unsigned int x, unsigned int y, const char str[]) { /* badly outrange labels can overflow into text field */ if (x < 10000 && y < 10000) { PRINT3("T%04d%04d%s\n", x, y, str); } } TERM_PUBLIC int BE_justify_text(enum JUSTIFY mode) { PRINT1("J%04d\n", mode); return (TRUE); } TERM_PUBLIC void BE_point(unsigned int x, unsigned int y, int number) { if (number >= 0) number %= POINT_TYPES; number += 1; PRINT3("P%01d%04d%04d\n", number, x, y); } TERM_PUBLIC void BE_fillbox( int style; unsigned int x, unsigned int y, unsigned int w, unsigned int h) { PRINT5("F%04d%04u%04u%04u%04u\n", style, x, y, w, h); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(be_driver) "be", "BeOS Window System", BE_XMAX, BE_YMAX, BE_VCHAR, BE_HCHAR, BE_VTIC, BE_HTIC, BE_options, BE_init, BE_reset, BE_text, null_scale, BE_graphics, BE_move, BE_vector, BE_linetype, BE_put_text, null_text_angle, BE_justify_text, BE_point, do_arrow, set_font_null, BE_pointsize, TERM_CAN_MULTIPLOT|TERM_NO_OUTPUTFILE, BE_text /* suspend can use same routine */ , 0 /* resume */ , BE_fillbox, BE_linewidth TERM_TABLE_END(be_driver) #undef LAST_TERM #define LAST_TERM be_driver TERM_TABLE_START(BE_driver) "BE", "BE Window System (identical to be)", BE_XMAX, BE_YMAX, BE_VCHAR, BE_HCHAR, BE_VTIC, BE_HTIC, BE_options, BE_init, BE_reset, BE_text, null_scale, BE_graphics, BE_move, BE_vector, BE_linetype, BE_put_text, null_text_angle, BE_justify_text, BE_point, do_arrow, set_font_null, BE_pointsize, TERM_CAN_MULTIPLOT, BE_text /* suspend can use same routine */ , 0 /* resume */ , BE_fillbox, BE_linewidth TERM_TABLE_END(BE_driver) #undef LAST_TERM #define LAST_TERM be_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(be) "1 be", "?commands set terminal be", "?set terminal be", "?set term be", "?terminal be", "?term be", "?be", "?BE", " The `be` terminal type is present if gnuplot is built for the `beos`", " operating system and for use with X servers. It is selected at program", " startup if the `DISPLAY` environment variable is set, if the `TERM`", " environment variable is set to `xterm`, or if the `-display` command", " line option is used.", "", " Syntax:", " set terminal be {reset} {}", "", " Multiple plot windows are supported: `set terminal be ` directs the", " output to plot window number n. If n>0, the terminal number will be", " appended to the window title and the icon will be labeled `gplt `.", " The active window may distinguished by a change in cursor (from default", " to crosshair.)", "", " Plot windows remain open even when the `gnuplot` driver is changed to a", " different device. A plot window can be closed by pressing the letter q", " while that window has input focus, or by choosing `close` from a window", " manager menu. All plot windows can be closed by specifying `reset`, which", " actually terminates the subprocess which maintains the windows (unless", " `-persist` was specified).", "", " Plot windows will automatically be closed at the end of the session", " unless the `-persist` option was given.", "", " The size or aspect ratio of a plot may be changed by resizing the `gnuplot`", " window.", "", " Linewidths and pointsizes may be changed from within `gnuplot` with", " `set linestyle`.", "", " For terminal type `be`, `gnuplot` accepts (when initialized) the standard", " X Toolkit options and resources such as geometry, font, and name from the", " command line arguments or a configuration file. See the X(1) man page", " (or its equivalent) for a description of such options.", "", " A number of other `gnuplot` options are available for the `be` terminal.", " These may be specified either as command-line options when `gnuplot` is", " invoked or as resources in the configuration file \".Xdefaults\". They are", " set upon initialization and cannot be altered during a `gnuplot` session.", "2 command-line_options", "?commands set terminal be command-line-options", "?set terminal be command-line-options", "?set term be command-line-options", "?be command-line-options", " In addition to the X Toolkit options, the following options may be specified", " on the command line when starting `gnuplot` or as resources in your", " \".Xdefaults\" file:", "@start table - first is interactive cleartext form", " `-mono` forces monochrome rendering on color displays.", " `-gray` requests grayscale rendering on grayscale or color displays.", " (Grayscale displays receive monochrome rendering by default.)", " `-clear` requests that the window be cleared momentarily before a", " new plot is displayed.", " `-raise` raises plot window after each plot", " `-noraise` does not raise plot window after each plot", " `-persist` plots windows survive after main gnuplot program exits", "#\\begin{tabular}{|cl|} \\hline", "#`-mono` & forces monochrome rendering on color displays.\\\\", "#`-gray` & requests grayscale rendering on grayscale or color displays.\\\\", "# & (Grayscale displays receive monochrome rendering by default.) \\\\", "#`-clear` & requests that the window be cleared momentarily before a\\\\", "# & new plot is displayed. \\\\", "#`-raise` & raises plot window after each plot. \\\\", "#`-noraise` & does not raise plot window after each plot. \\\\", "#`-persist`&plots windows survive after main gnuplot program exits. \\\\", "%c l .", "%`-mono`@forces monochrome rendering on color displays.", "%`-gray`@requests grayscale rendering on grayscale or color displays.", "% @(Grayscale displays receive monochrome rendering by default.)", "%`-clear`@requests that the window be cleared momentarily before a", "% @new plot is displayed.", "%`-raise`@raises plot window after each plot", "%`-noraise`@does not raise plot window after each plot", "%`-persist`@plots windows survive after main gnuplot program exits", "@end table", " The options are shown above in their command-line syntax. When entered as", " resources in \".Xdefaults\", they require a different syntax.", "", " Example:", " gnuplot*gray: on", "", " `gnuplot` also provides a command line option (`-pointsize `) and a", " resource, `gnuplot*pointsize: `, to control the size of points plotted", " with the `points` plotting style. The value `v` is a real number (greater", " than 0 and less than or equal to ten) used as a scaling factor for point", " sizes. For example, `-pointsize 2` uses points twice the default size, and", " `-pointsize 0.5` uses points half the normal size.", "2 monochrome_options", "?commands set terminal be monochrome_options", "?set terminal be monochrome_options", "?set term be monochrome_options", "?be monochrome_options", " For monochrome displays, `gnuplot` does not honor foreground or background", " colors. The default is black-on-white. `-rv` or `gnuplot*reverseVideo: on`", " requests white-on-black.", "", "2 color_resources", "?commands set terminal be color_resources", "?set terminal be color_resources", "?set term be color_resources", "?be color_resources", " For color displays, `gnuplot` honors the following resources (shown here", " with their default values) or the greyscale resources. The values may be", " color names as listed in the BE rgb.txt file on your system, hexadecimal", " RGB color specifications (see BE documentation), or a color name followed", " by a comma and an `intensity` value from 0 to 1. For example, `blue, 0.5`", " means a half intensity blue.", "@start table - first is interactive cleartext form", " gnuplot*background: white", " gnuplot*textColor: black", " gnuplot*borderColor: black", " gnuplot*axisColor: black", " gnuplot*line1Color: red", " gnuplot*line2Color: green", " gnuplot*line3Color: blue", " gnuplot*line4Color: magenta", " gnuplot*line5Color: cyan", " gnuplot*line6Color: sienna", " gnuplot*line7Color: orange", " gnuplot*line8Color: coral", "#\\begin{tabular}{|cl|} \\hline", "#&gnuplot*background: white\\\\", "#&gnuplot*textColor: black\\\\", "#&gnuplot*borderColor: black\\\\", "#&gnuplot*axisColor: black\\\\", "#&gnuplot*line1Color: red\\\\", "#&gnuplot*line2Color: green\\\\", "#&gnuplot*line3Color: blue\\\\", "#&gnuplot*line4Color: magenta\\\\", "#&gnuplot*line5Color: cyan\\\\", "#&gnuplot*line6Color: sienna\\\\", "#&gnuplot*line7Color: orange\\\\", "#&gnuplot*line8Color: coral\\\\", "%c l .", "%@gnuplot*background: white", "%@gnuplot*textColor: black", "%@gnuplot*borderColor: black", "%@gnuplot*axisColor: black", "%@gnuplot*line1Color: red", "%@gnuplot*line2Color: green", "%@gnuplot*line3Color: blue", "%@gnuplot*line4Color: magenta", "%@gnuplot*line5Color: cyan", "%@gnuplot*line6Color: sienna", "%@gnuplot*line7Color: orange", "%@gnuplot*line8Color: coral", "@end table", "", " The command-line syntax for these is, for example,", "", " Example:", " gnuplot -background coral", "", "2 grayscale_resources", "?commands set terminal be grayscale_resources", "?set terminal be grayscale_resources", "?set term be grayscale_resources", "?be grayscale_resources", " When `-gray` is selected, `gnuplot` honors the following resources for", " grayscale or color displays (shown here with their default values). Note", " that the default background is black.", "@start table - first is interactive cleartext form", " gnuplot*background: black", " gnuplot*textGray: white", " gnuplot*borderGray: gray50", " gnuplot*axisGray: gray50", " gnuplot*line1Gray: gray100", " gnuplot*line2Gray: gray60", " gnuplot*line3Gray: gray80", " gnuplot*line4Gray: gray40", " gnuplot*line5Gray: gray90", " gnuplot*line6Gray: gray50", " gnuplot*line7Gray: gray70", " gnuplot*line8Gray: gray30", "#\\begin{tabular}{|cl|} \\hline", "#&gnuplot*background: black\\\\", "#&gnuplot*textGray: white\\\\", "#&gnuplot*borderGray: gray50\\\\", "#&gnuplot*axisGray: gray50\\\\", "#&gnuplot*line1Gray: gray100\\\\", "#&gnuplot*line2Gray: gray60\\\\", "#&gnuplot*line3Gray: gray80\\\\", "#&gnuplot*line4Gray: gray40\\\\", "#&gnuplot*line5Gray: gray90\\\\", "#&gnuplot*line6Gray: gray50\\\\", "#&gnuplot*line7Gray: gray70\\\\", "#&gnuplot*line8Gray: gray30\\\\", "%c l .", "%@gnuplot*background: black", "%@gnuplot*textGray: white", "%@gnuplot*borderGray: gray50", "%@gnuplot*axisGray: gray50", "%@gnuplot*line1Gray: gray100", "%@gnuplot*line2Gray: gray60", "%@gnuplot*line3Gray: gray80", "%@gnuplot*line4Gray: gray40", "%@gnuplot*line5Gray: gray90", "%@gnuplot*line6Gray: gray50", "%@gnuplot*line7Gray: gray70", "%@gnuplot*line8Gray: gray30", "@end table", "", "2 line_resources", "?commands set terminal be line_resources", "?set terminal be line_resources", "?set term be line_resources", "?be line_resources", " `gnuplot` honors the following resources for setting the width (in pixels) of", " plot lines (shown here with their default values.) 0 or 1 means a minimal", " width line of 1 pixel width. A value of 2 or 3 may improve the appearance of", " some plots.", "@start table - first is interactive cleartext form", " gnuplot*borderWidth: 2", " gnuplot*axisWidth: 0", " gnuplot*line1Width: 0", " gnuplot*line2Width: 0", " gnuplot*line3Width: 0", " gnuplot*line4Width: 0", " gnuplot*line5Width: 0", " gnuplot*line6Width: 0", " gnuplot*line7Width: 0", " gnuplot*line8Width: 0", "#\\begin{tabular}{|cl|} \\hline", "#&gnuplot*borderWidth: 2\\\\", "#&gnuplot*axisWidth: 0\\\\", "#&gnuplot*line1Width: 0\\\\", "#&gnuplot*line2Width: 0\\\\", "#&gnuplot*line3Width: 0\\\\", "#&gnuplot*line4Width: 0\\\\", "#&gnuplot*line5Width: 0\\\\", "#&gnuplot*line6Width: 0\\\\", "#&gnuplot*line7Width: 0\\\\", "#&gnuplot*line8Width: 0\\\\", "%c l .", "%@gnuplot*borderWidth: 2", "%@gnuplot*axisWidth: 0", "%@gnuplot*line1Width: 0", "%@gnuplot*line2Width: 0", "%@gnuplot*line3Width: 0", "%@gnuplot*line4Width: 0", "%@gnuplot*line5Width: 0", "%@gnuplot*line6Width: 0", "%@gnuplot*line7Width: 0", "%@gnuplot*line8Width: 0", "@end table", "", " `gnuplot` honors the following resources for setting the dash style used for", " plotting lines. 0 means a solid line. A two-digit number `jk` (`j` and `k`", " are >= 1 and <= 9) means a dashed line with a repeated pattern of `j` pixels", " on followed by `k` pixels off. For example, '16' is a \"dotted\" line with one", " pixel on followed by six pixels off. More elaborate on/off patterns can be", " specified with a four-digit value. For example, '4441' is four on, four off,", " four on, one off. The default values shown below are for monochrome displays", " or monochrome rendering on color or grayscale displays. For color displays,", " the default for each is 0 (solid line) except for `axisDashes` which defaults", " to a '16' dotted line.", "@start table - first is interactive cleartext form", " gnuplot*borderDashes: 0", " gnuplot*axisDashes: 16", " gnuplot*line1Dashes: 0", " gnuplot*line2Dashes: 42", " gnuplot*line3Dashes: 13", " gnuplot*line4Dashes: 44", " gnuplot*line5Dashes: 15", " gnuplot*line6Dashes: 4441", " gnuplot*line7Dashes: 42", " gnuplot*line8Dashes: 13", "#\\begin{tabular}{|cl|} \\hline", "#&gnuplot*borderDashes: 0\\\\", "#&gnuplot*axisDashes: 16\\\\", "#&gnuplot*line1Dashes: 0\\\\", "#&gnuplot*line2Dashes: 42\\\\", "#&gnuplot*line3Dashes: 13\\\\", "#&gnuplot*line4Dashes: 44\\\\", "#&gnuplot*line5Dashes: 15\\\\", "#&gnuplot*line6Dashes: 4441\\\\", "#&gnuplot*line7Dashes: 42\\\\", "#&gnuplot*line8Dashes: 13\\\\", "%c l .", "%@gnuplot*borderDashes: 0", "%@gnuplot*axisDashes: 16", "%@gnuplot*line1Dashes: 0", "%@gnuplot*line2Dashes: 42", "%@gnuplot*line3Dashes: 13", "%@gnuplot*line4Dashes: 44", "%@gnuplot*line5Dashes: 15", "%@gnuplot*line6Dashes: 4441", "%@gnuplot*line7Dashes: 42", "%@gnuplot*line8Dashes: 13", "@end table" END_HELP(be) #endif /* TERM_HELP */ gnuplot-4.6.4/term/lua.trm0000644000471100001440000011375112117426462012422 0ustar /* * $Id: lua.trm,v 1.17.2.3 2013/03/10 18:24:00 broeker Exp $ * $Date: 2013/03/10 18:24:00 $ * $Rev: 99 $ */ /* * GNUPLOT - lua.trm */ /*[ * * Copyright 2008 Peter Hedwig * * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "driver.h" #define LUA_TERM_REVISON "$Rev: 99 $" #ifdef TERM_REGISTER register_term(lua) #endif #ifdef TERM_PROTO TERM_PUBLIC void LUA_options __PROTO((void)); TERM_PUBLIC void LUA_init __PROTO((void)); TERM_PUBLIC void LUA_reset __PROTO((void)); TERM_PUBLIC void LUA_text __PROTO((void)); /* scale */ TERM_PUBLIC void LUA_graphics __PROTO((void)); TERM_PUBLIC void LUA_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void LUA_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void LUA_linetype __PROTO((int linetype)); TERM_PUBLIC void LUA_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC int LUA_text_angle __PROTO((int ang)); TERM_PUBLIC int LUA_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void LUA_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void LUA_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); TERM_PUBLIC int LUA_set_font __PROTO((const char *font)); TERM_PUBLIC void LUA_pointsize __PROTO((double ptsize)); TERM_PUBLIC void LUA_boxfill __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); TERM_PUBLIC void LUA_linewidth __PROTO((double width)); TERM_PUBLIC int LUA_make_palette __PROTO((t_sm_palette *)); TERM_PUBLIC void LUA_previous_palette __PROTO((void)); TERM_PUBLIC void LUA_set_color __PROTO((t_colorspec *)); TERM_PUBLIC void LUA_filled_polygon __PROTO((int, gpiPoint *)); TERM_PUBLIC void LUA_image __PROTO((unsigned, unsigned, coordval *, gpiPoint *, t_imagecolor)); TERM_PUBLIC void LUA_path __PROTO((int p)); /* defaults */ #define LUA_XMAX 10000.0 #define LUA_YMAX 10000.0 #define LUA_HTIC 100 #define LUA_VTIC 100 #define LUA_HCHAR 160 #define LUA_VCHAR 420 #define LUA_TERM_DESCRIPTION "Lua generic terminal driver" /* gnuplot 4.3, term->tscale */ #define LUA_TSCALE 1.0 #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #ifdef HAVE_CAIROPDF # include "wxterminal/gp_cairo.h" # include "wxterminal/gp_cairo_helpers.h" # define LUA_EXTERNAL_IMAGES 1 #elif defined(HAVE_GD_PNG) && (GD2_VERS >= 2) # include "gd.h" # define LUA_EXTERNAL_IMAGES 1 #endif #include #include #include static lua_State *L = NULL; static char *LUA_script = NULL; static int lua_term_status, lua_term_result; static int tb, luaterm, image_cnt, image_extern; #if LUA_VERSION_NUM > 501 /* * two helper functions to ease transitioning to lua 5.2 */ /* * same as lua_getfield(L, LUA_GLOBALINDEXS, f) in lua 5.1 */ static void LUA_getfield_global(lua_State *L, const char *f) { lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS); lua_getfield(L, -1, f); lua_replace(L, -2); } /* * approximately the same as luaL_register(L, libname, l) in lua 5.1 */ static void LUA_register(lua_State *L, const char *libname, const luaL_Reg *l) { if (!libname) luaL_setfuncs(L, l, 0); else { LUA_getfield_global(L, "package"); lua_getfield(L, -1, "loaded"); lua_newtable(L); luaL_setfuncs(L, l, 0); lua_pushvalue(L, -1); lua_setglobal(L, libname); lua_setfield(L, -2, libname); lua_pop(L, 2); lua_getglobal(L, libname); } } #endif /* LUA_VERSION_NUM > 501 */ /* * static buffer, because we cannot free memory after * calling int_error that never returns */ static char last_error_msg[MAX_LINE_LEN+1] = ""; /* * Handle Lua functions */ #define LUA_GP_FNC "gp" /* * returns a table with the coords of * the plot's bounding box */ static int LUA_GP_get_boundingbox() { lua_newtable (L); lua_pushstring (L, "xleft"); lua_pushinteger(L, plot_bounds.xleft); lua_rawset (L, -3); lua_pushstring (L, "xright"); lua_pushinteger(L, plot_bounds.xright); lua_rawset (L, -3); lua_pushstring (L, "ybot"); lua_pushinteger(L, plot_bounds.ybot); lua_rawset (L, -3); lua_pushstring (L, "ytop"); lua_pushinteger(L, plot_bounds.ytop); lua_rawset (L, -3); return(1); } /* gp.term_options(char *str) */ static int LUA_GP_term_options(lua_State *L) { int n = lua_gettop(L); /* Number of arguments */ const char *opt_str; if (n != 1) return luaL_error(L, "Got %d arguments expected 1", n); opt_str = luaL_checkstring(L, 1); n = strlen(opt_str); if (n > MAX_LINE_LEN) return luaL_error(L, "Option string consists of %d characters but only %d are allowed", n, MAX_LINE_LEN); strncpy(term_options, opt_str, MAX_LINE_LEN); term_options[MAX_LINE_LEN] = '\0'; return(0); } /* close Lua context and clean up */ static void LUA_close(void) { if (L) { lua_close(L); L = NULL; } if (LUA_script) { free(LUA_script); LUA_script = NULL; } } /* gp.write(char *str) */ static int LUA_GP_write(lua_State *L) { int n = lua_gettop(L); /* Number of arguments */ const char *out_str; if (n != 1) return luaL_error(L, "Got %d arguments expected 1", n); out_str = luaL_checkstring(L, 1); fputs(out_str, gpoutfile); return(0); } /* gp.int_error(int t_num, char *msg) gp.int_error(char *msg) */ static int LUA_GP_int_error(lua_State *L) { int t_num = NO_CARET; const char *msg = ""; int n = lua_gettop(L); /* Number of arguments */ switch (n) { case 1: msg = luaL_checkstring(L, 1); break; case 2: t_num = luaL_checkint(L, 1); msg = luaL_checkstring(L, 2); break; default: return luaL_error(L, "Got %d arguments expected 1 or 2", n); break; } snprintf(last_error_msg, MAX_LINE_LEN, "%s Lua context closed.", msg); /* close Lua context on fatal errors */ LUA_close(); int_error(t_num, last_error_msg); return(0); } /* gp.int_warn(int t_num, char *errmsg) gp.int_warn(char *errmsg) */ static int LUA_GP_int_warn(lua_State *L) { int t_num = NO_CARET; const char *msg = ""; int n = lua_gettop(L); /* Number of arguments */ switch (n) { case 1: msg = luaL_checkstring(L, 1); break; case 2: t_num = luaL_checkint(L, 1); msg = luaL_checkstring(L, 2); break; default: return luaL_error(L, "Got %d arguments expected 1 or 2", n); break; } int_warn(t_num, msg); return(0); } /* gp.term_out(char *terminal_msg) Print user messages, e.g. help messages */ static int LUA_GP_term_out(lua_State *L) { char c; /* dummy input char */ char *line, *last; int pagelines = 0; const char *msg = ""; int n = lua_gettop(L); /* Number of arguments */ switch (n) { case 1: msg = luaL_checkstring(L, 1); break; default: return luaL_error(L, "Got %d arguments expected 1", n); break; } last = (char *)msg; while ((line = strchr(last, '\n'))) { *line = '\0'; if (pagelines >= 22) { fputs("Press return for more: ", stderr); #if defined(ATARI) || defined(MTOS) do c = tos_getch(); while (c != '\x04' && c != '\r' && c != '\n'); #else do c = getchar(); while (c != EOF && c != '\n'); #endif pagelines = 0; } fputs(last, stderr); fputs("\n", stderr); pagelines++; last = line+1; } if (*last) fputs(last, stderr); return(0); } /* gp.is_multiplot() */ static int LUA_GP_is_multiplot(lua_State *L) { lua_pushboolean(L, multiplot); return(1); } /* returns all internal and userdefined variables [name] = {type, val1 [, val2]}, [name] = {type, val1 [, val2]}, ... */ static int LUA_GP_get_all_variables(lua_State *L) { struct udvt_entry *udv = first_udv; struct value *val; lua_newtable(L); while (udv) { /* ignore mouse related variables */ if(!strncmp(udv->udv_name, "MOUSE_", 6)) { udv = udv->next_udv; continue; } lua_newtable(L); if (udv->udv_undef) { lua_pushnil(L); lua_rawseti(L, -2, 2); } else { val = &(udv->udv_value); switch (val->type) { case INTGR: lua_pushstring(L, "int"); lua_rawseti(L, -2, 2); lua_pushinteger(L, val->v.int_val); lua_rawseti(L, -2, 3); break; case CMPLX: if (val->v.cmplx_val.imag != 0.0) { lua_pushstring(L, "cmplx"); lua_rawseti(L, -2, 2); lua_pushnumber(L, val->v.cmplx_val.imag); lua_rawseti(L, -2, 4); } else { lua_pushstring(L, "real"); lua_rawseti(L, -2, 2); } #ifdef HAVE_ISNAN if (isnan(val->v.cmplx_val.real)) { lua_pushnil(L); lua_rawseti(L, -2, 3); } else #endif { lua_pushnumber(L, val->v.cmplx_val.real); lua_rawseti(L, -2, 3); } break; #ifdef GP_STRING_VARS case STRING: lua_pushstring(L, "string"); lua_rawseti(L, -2, 2); if (val->v.string_val) { lua_pushstring(L, val->v.string_val); lua_rawseti(L, -2, 3); } break; #endif default: lua_pushstring(L, "unknown"); lua_rawseti(L, -2, 2); } } lua_setfield(L, -2, udv->udv_name); udv = udv->next_udv; } return(1); } /* * based on the parse_color_name() function in misc.c * returns rgb triplet based on color name or hex values */ static int LUA_GP_parse_color_name(lua_State *L) { int color = -1, token_cnt; int n = lua_gettop(L); /* Number of arguments */ const char *opt_str; if (n != 2) return luaL_error(L, "Got %d arguments expected 2", n); token_cnt = luaL_checkinteger(L, 1); opt_str = luaL_checkstring(L, 2); color = lookup_table_nth(pm3d_color_names_tbl, opt_str); if (color >= 0) color = pm3d_color_names_tbl[color].value; else sscanf(opt_str, "#%x", &color); if ((color & 0xff000000) != 0) int_error(token_cnt, "not recognized as a color name or a string of form \"#RRGGBB\""); lua_createtable(L, 3, 0); n = lua_gettop(L); lua_pushnumber(L, (double)((color >> 16 ) & 255) / 255.); lua_rawseti(L, n, 1); lua_pushnumber(L, (double)((color >> 8 ) & 255) / 255.); lua_rawseti(L, n, 2); lua_pushnumber(L, (double)(color & 255) / 255.); lua_rawseti(L, n, 3); return (1); } #if LUA_VERSION_NUM > 500 static const luaL_Reg gp_methods[] = { #else static const luaL_reg gp_methods[] = { #endif {"write", LUA_GP_write}, {"int_error", LUA_GP_int_error}, {"int_warn", LUA_GP_int_warn}, {"term_out", LUA_GP_term_out}, {"get_boundingbox", LUA_GP_get_boundingbox}, {"is_multiplot", LUA_GP_is_multiplot}, {"get_all_variables", LUA_GP_get_all_variables}, {"term_options", LUA_GP_term_options}, {"parse_color_name", LUA_GP_parse_color_name}, {NULL, NULL} }; static void LUA_register_gp_fnc () { #if LUA_VERSION_NUM > 501 LUA_register(L, LUA_GP_FNC, gp_methods); #else luaL_register(L, LUA_GP_FNC, gp_methods); #endif } /* read variables from script */ static void LUA_get_term_vars(void) { lua_getfield(L, luaterm, "description"); term->description = (lua_isstring(L, -1)) ? lua_tostring(L, -1) : LUA_TERM_DESCRIPTION; lua_pop(L, 1); lua_getfield(L, luaterm, "xmax"); term->xmax = (lua_isnumber(L, -1)) ? (unsigned int)lua_tointeger(L, -1) : LUA_XMAX; lua_pop(L, 1); lua_getfield(L, luaterm, "ymax"); term->ymax = (lua_isnumber(L, -1)) ? (unsigned int)lua_tointeger(L, -1) : LUA_YMAX; lua_pop(L, 1); lua_getfield(L, luaterm, "v_char"); term->v_char = (lua_isnumber(L, -1)) ? (unsigned int)lua_tointeger(L, -1) : LUA_VCHAR; lua_pop(L, 1); lua_getfield(L, luaterm, "h_char"); term->h_char = (lua_isnumber(L, -1)) ? (unsigned int)lua_tointeger(L, -1) : LUA_HCHAR; lua_pop(L, 1); lua_getfield(L, luaterm, "v_tic"); term->v_tic = (lua_isnumber(L, -1)) ? (unsigned int)lua_tointeger(L, -1) : LUA_VTIC; lua_pop(L, 1); lua_getfield(L, luaterm, "h_tic"); term->h_tic = (lua_isnumber(L, -1)) ? (unsigned int)lua_tointeger(L, -1) : LUA_HTIC; lua_pop(L, 1); lua_getfield(L, luaterm, "flags"); term->flags |= (lua_isnumber(L, -1)) ? (int)lua_tointeger(L, -1) : TERM_BINARY; lua_pop(L, 1); lua_getfield(L, luaterm, "tscale"); term->tscale = (lua_isnumber(L, -1)) ? (double)lua_tonumber(L, -1) : LUA_TSCALE; lua_pop(L, 1); lua_getfield(L, luaterm, "external_images"); image_extern = lua_toboolean(L ,-1); lua_pop(L, 1); } static void LUA_set_term_vars() { /* set term.version */ lua_pushstring(L, gnuplot_version); lua_setfield(L, luaterm, "gp_version"); /* set term.patchlevel */ lua_pushstring(L, gnuplot_patchlevel); lua_setfield(L, luaterm, "gp_patchlevel"); /* set term.patchlevel */ lua_pushstring(L, LUA_TERM_REVISON); lua_setfield(L, luaterm, "lua_term_revision"); /* set term.lua_ident */ lua_pushstring(L, LUA_RELEASE); lua_setfield(L, luaterm, "lua_ident"); /* set flag if terminal supports external images */ #ifdef LUA_EXTERNAL_IMAGES image_extern = 0; lua_pushboolean(L, image_extern); lua_setfield(L, luaterm, "external_images"); #endif /* some static definitions from term_api.h */ lua_pushinteger(L, TERM_CAN_MULTIPLOT); /* tested if stdout not redirected */ lua_setfield(L, luaterm, "TERM_CAN_MULTIPLOT"); lua_pushinteger(L, TERM_CANNOT_MULTIPLOT); /* tested if stdout is redirected */ lua_setfield(L, luaterm, "TERM_CANNOT_MULTIPLOT"); lua_pushinteger(L, TERM_BINARY); /* open output file with "b" */ lua_setfield(L, luaterm, "TERM_BINARY"); lua_pushinteger(L, TERM_INIT_ON_REPLOT); /* call term->init() on replot */ lua_setfield(L, luaterm, "TERM_INIT_ON_REPLOT"); lua_pushinteger(L, TERM_IS_POSTSCRIPT); /* post, next, pslatex, etc */ lua_setfield(L, luaterm, "TERM_IS_POSTSCRIPT"); lua_pushinteger(L, TERM_IS_LATEX); /* post, next, pslatex, etc */ lua_setfield(L, luaterm, "TERM_IS_LATEX"); lua_pushinteger(L, TERM_ENHANCED_TEXT); /* enhanced text mode is enabled */ lua_setfield(L, luaterm, "TERM_ENHANCED_TEXT"); lua_pushinteger(L, TERM_NO_OUTPUTFILE); /* terminal doesnt write to a file */ lua_setfield(L, luaterm, "TERM_NO_OUTPUTFILE"); lua_pushinteger(L, TERM_CAN_CLIP); /* terminal does its own clipping */ lua_setfield(L, luaterm, "TERM_CAN_CLIP"); lua_pushinteger(L, TERM_CAN_DASH); /* terminal knows dashed lines */ lua_setfield(L, luaterm, "TERM_CAN_DASH"); lua_pushinteger(L, TERM_ALPHA_CHANNEL); /* alpha channel transparency */ lua_setfield(L, luaterm, "TERM_ALPHA_CHANNEL"); lua_pushinteger(L, TERM_MONOCHROME); /* term is running in mono mode */ lua_setfield(L, luaterm, "TERM_MONOCHROME"); lua_pushinteger(L, TERM_LINEWIDTH); /* support for set term linewidth */ lua_setfield(L, luaterm, "TERM_LINEWIDTH"); #ifdef TERM_FONTSCALE lua_pushinteger(L, TERM_FONTSCALE); /* terminal supports fontscale */ lua_setfield(L, luaterm, "TERM_FONTSCALE"); #endif } static int LUA_init_luaterm_function(const char *fnc) { if (!L) int_error(NO_CARET, "Missing Lua context! No script?"); lua_getfield(L, luaterm, fnc); if(lua_isfunction(L, -1)) { return(1); } else { int_warn(NO_CARET, "Script lacks function `%s'!", fnc); lua_pop(L, 1); /* clean stack */ } return(0); } static int LUA_call_report (int status) { if (status) { const char *msg = lua_tostring(L, -1); if (msg == NULL) msg = "(error with no message)"; snprintf(last_error_msg, MAX_LINE_LEN, "%s. Lua context closed.", msg); LUA_close(); int_error(NO_CARET, last_error_msg); } return status; } static int LUA_init_lua(void) { int sf; /* Lua script "function" */ struct stat stat_buf; char *script_fqn; char *gp_lua_dir; /* * Close old Lua context and open a new one. */ if (L) lua_close(L); #if LUA_VERSION_NUM > 500 L = luaL_newstate(); #else L = lua_open(); #endif luaL_openlibs(L); /* Load Lua libraries */ luaopen_debug(L); gp_lua_dir = getenv("GNUPLOT_LUA_DIR"); # if defined(_Windows) if (!gp_lua_dir) { int len; /* retrieve path relative to the gnuplot executable whose path is in * szModuleName (winmain.c) */ gp_lua_dir = gp_alloc(strlen((char*) szPackageDir) + strlen(GNUPLOT_LUA_DIR) + 2, "luadir"); strcpy(gp_lua_dir, (char*) szPackageDir); len = strlen(gp_lua_dir); if (*gp_lua_dir && gp_lua_dir[len-1] != '\\' && gp_lua_dir[len-1] != '/') strcat(gp_lua_dir, "\\"); /* GNUPLOT_LUA_DIR is _relative_ path */ strcat(gp_lua_dir, GNUPLOT_LUA_DIR); } #else /* not _Windows */ if (!gp_lua_dir) gp_lua_dir = GNUPLOT_LUA_DIR; #endif if (stat(LUA_script, &stat_buf) || !S_ISREG(stat_buf.st_mode)) { script_fqn = gp_alloc(strlen(gp_lua_dir) + strlen(LUA_script) + 2, "LUA_script path"); sprintf(script_fqn, "%s%c%s", gp_lua_dir, DIRSEP1, LUA_script); } else { script_fqn = gp_strdup(LUA_script); } /* Load the file containing the script we are going to run */ lua_term_status = luaL_loadfile(L, script_fqn); if (lua_term_status) { fprintf(stderr, "error: %s. Lua context closed.\n", lua_tostring(L, -1)); LUA_close(); free(script_fqn); return(0); } free(script_fqn); /* remember script "function" */ sf = lua_gettop(L); /* lua_settop(L, 0);*/ /* clear stack */ #if LUA_VERSION_NUM > 501 LUA_getfield_global(L, "debug"); #else lua_getfield(L, LUA_GLOBALSINDEX, "debug"); #endif lua_getfield(L, -1, "traceback"); lua_remove(L, -2); /* rm debug */ tb = lua_gettop(L); /* store "traceback" */ /* create table `term' */ lua_newtable(L); lua_setglobal(L, "term"); #if LUA_VERSION_NUM > 501 LUA_getfield_global(L, "term"); #else lua_getfield(L, LUA_GLOBALSINDEX, "term"); #endif luaterm = lua_gettop(L); /* store `term' */ /* register gp functions */ LUA_register_gp_fnc(); /* set terminal variables */ LUA_set_term_vars(); /* put script "function" on top and call */ lua_pushvalue(L, sf); LUA_call_report(lua_pcall(L, 0, LUA_MULTRET, tb)); return(1); } /* see color.h */ static const char* LUA_get_colorstyle(int style) { const char *style_str = "unknown"; switch(style) { case TC_LT: /* Use the color of linetype */ style_str = "LT"; break; case TC_LINESTYLE:/* Use the color of line style (only for "internal" use or unsused?) */ style_str = "LINESTYLE"; break; case TC_RGB: /* Explicit RGB triple provided by user */ style_str = "RGB"; break; case TC_CB: /* "palette cb " (only for "internal" use or unsused?) */ style_str = "CB"; break; case TC_FRAC: /* "palette frac " */ style_str = "FRAC"; break; case TC_Z: /* "palette z" (only for "internal" use or unsused?) */ style_str = "Z"; break; case TC_DEFAULT: /* Use default color, set separately (only for "internal" use or unsused?) */ style_str = "DEFAULT"; break; } return(style_str); } /* see term_api.h */ static const char* LUA_get_fillstyle(int style) { const char *style_str = "unknown"; if (style == FS_OPAQUE) { /* FIXME: not quite shure how to handle this, since it is only used by the postscript terminal */ style_str = "OPAQUE"; } else { switch (style & 0xf) { case FS_EMPTY: style_str = "EMPTY"; break; case FS_SOLID: style_str = "SOLID"; break; case FS_PATTERN: style_str = "PATTERN"; break; case FS_TRANSPARENT_SOLID: style_str = "TRANSPARENT_SOLID"; break; case FS_TRANSPARENT_PATTERN: style_str = "TRANSPARENT_PATTERN"; break; case FS_DEFAULT: style_str = "DEFAULT"; break; } } return(style_str); } /* * Handle options */ TERM_PUBLIC void LUA_options() { char *opt_str = NULL; char *s; int tc_off = c_token+1; /* token counter offset */ int need_init = 1; /* 'set term tikz' is short for 'set term lua tikz' */ c_token--; /* see how we got here */ if (!equals(c_token, "tikz")) { if (almost_equals(c_token, "termop$tions")) { if (!LUA_script) { int_error(NO_CARET, "No Lua context for setting terminal options!"); return; } need_init = 0; } /* else should always be lua, so just count up ... */ c_token++; } opt_str = gp_input_line + token[c_token].start_index; if (need_init) { if (!END_OF_COMMAND) { if (*opt_str == '"' || *opt_str == '\'') { s = try_to_get_string(); gp_expand_tilde(&s); } else { s = gp_alloc(token_len(c_token)+strlen("gnuplot-.lua")+1, "LUA_script"); memcpy(s, "gnuplot-", 8); memcpy(s+8, opt_str , token_len(c_token)); memcpy(s+8+token_len(c_token), ".lua\0", 5); c_token++; } if (LUA_script) { if (strcmp(LUA_script, s)) { free(LUA_script); LUA_script = s; need_init = 1; } else { free(s); need_init = 0; } } else { LUA_script = s; } opt_str = gp_input_line + token[c_token].start_index; } else { LUA_close(); int_error(NO_CARET, "No Lua driver name or file name given!"); } /* init lua when opening the terminal or on script change */ if(!LUA_init_lua()) { return; } } /* since options are tokenized again in the script we always "finish" this here */ while (!END_OF_COMMAND) c_token++; if(LUA_init_luaterm_function("options")) { /* isolate the "set term ...;" part of the command line */ opt_str = gp_strdup(opt_str); opt_str[ strcspn(opt_str,";") ] = '\0'; lua_pushstring(L, opt_str); lua_pushinteger(L, need_init); lua_pushinteger(L, tc_off); LUA_call_report(lua_pcall(L, 3, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); free(opt_str); } LUA_get_term_vars(); } TERM_PUBLIC void LUA_init() { fseek(gpoutfile, 0, SEEK_SET); (void)ftruncate(fileno(gpoutfile), 0); /* reset image counter */ image_cnt = 0; LUA_linetype(-1); if(LUA_init_luaterm_function("init")) { LUA_call_report(lua_pcall(L, 0, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC void LUA_graphics() { if(LUA_init_luaterm_function("graphics")) { LUA_call_report(lua_pcall(L, 0, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC void LUA_text() { if(LUA_init_luaterm_function("text")) { LUA_call_report(lua_pcall(L, 0, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC void LUA_linetype(int linetype) { if(LUA_init_luaterm_function("linetype")) { lua_pushinteger(L, linetype); LUA_call_report(lua_pcall(L, 1, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC void LUA_move(unsigned int x, unsigned int y) { if(LUA_init_luaterm_function("move")) { lua_pushinteger(L, (int)x); lua_pushinteger(L, (int)y); LUA_call_report(lua_pcall(L, 2, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC void LUA_point(unsigned int x, unsigned int y, int number) { lua_term_result = 0; if(LUA_init_luaterm_function("point")) { lua_pushinteger(L, (int)x); lua_pushinteger(L, (int)y); lua_pushinteger(L, number); LUA_call_report(lua_pcall(L, 3, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } if (!lua_term_result) do_point(x, y, number); } TERM_PUBLIC void LUA_pointsize(double ptsize) { if(LUA_init_luaterm_function("pointsize")) { lua_pushnumber(L, ptsize); LUA_call_report(lua_pcall(L, 1, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC void LUA_vector(unsigned int ux, unsigned int uy) { if(LUA_init_luaterm_function("vector")) { lua_pushinteger(L, (int)ux); lua_pushinteger(L, (int)uy); LUA_call_report(lua_pcall(L, 2, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC void LUA_arrow( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { /* if the script does not provide an `arrow' functions or if it returns `0' we fall back to `do_arrow' */ lua_term_result = 0; if(LUA_init_luaterm_function("arrow")) { lua_pushinteger(L, (int)sx); lua_pushinteger(L, (int)sy); lua_pushinteger(L, (int)ex); lua_pushinteger(L, (int)ey); lua_pushinteger(L, head); /* additional vars */ lua_pushinteger(L, curr_arrow_headlength); /* access head length + angle (int) */ lua_pushnumber(L, curr_arrow_headangle); /* angle in degrees (double) */ lua_pushnumber(L, curr_arrow_headbackangle); /* angle in degrees (double) */ lua_pushinteger(L, curr_arrow_headfilled); /* arrow head filled or not */ LUA_call_report(lua_pcall(L, 9, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } if (!lua_term_result) do_arrow(sx, sy, ex, ey, head); } TERM_PUBLIC void LUA_put_text(unsigned int x, unsigned int y, const char str[]) { if(LUA_init_luaterm_function("put_text")) { lua_pushinteger(L, (int)x); lua_pushinteger(L, (int)y); lua_pushstring(L, str); LUA_call_report(lua_pcall(L, 3, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC int LUA_justify_text(enum JUSTIFY mode) { if(LUA_init_luaterm_function("justify_text")) { const char *m; switch (mode) { case LEFT: m = "left"; break; default: case CENTRE: m = "center"; break; case RIGHT: m = "right"; break; } lua_pushstring(L, m); LUA_call_report(lua_pcall(L, 1, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); return((lua_term_result ? TRUE : FALSE)); } return(FALSE); } TERM_PUBLIC int LUA_text_angle(int ang) { if(LUA_init_luaterm_function("text_angle")) { lua_pushinteger(L, ang); LUA_call_report(lua_pcall(L, 1, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); return(((lua_term_result || !ang ) ? TRUE : FALSE)); } return((ang ? FALSE : TRUE)); /* return TRUE if called with ang==0 */ } TERM_PUBLIC int LUA_set_font(const char *font) { if(LUA_init_luaterm_function("set_font")) { lua_pushstring(L, font); LUA_call_report(lua_pcall(L, 1, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); return((lua_term_result ? TRUE : FALSE)); } return(FALSE); } TERM_PUBLIC void LUA_boxfill (int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height) { if(LUA_init_luaterm_function("boxfill")) { lua_pushstring(L, LUA_get_fillstyle(style)); lua_pushinteger(L, style >> 4); lua_pushinteger(L, (int)x1); lua_pushinteger(L, (int)y1); lua_pushinteger(L, (int)width); lua_pushinteger(L, (int)height); LUA_call_report(lua_pcall(L, 6, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC void LUA_linewidth(double width) { if(LUA_init_luaterm_function("linewidth")) { lua_pushnumber(L, width); LUA_call_report(lua_pcall(L, 1, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC void LUA_previous_palette(void) { if(LUA_init_luaterm_function("previous_palette")) { LUA_call_report(lua_pcall(L, 0, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC void LUA_reset(void) { if(LUA_init_luaterm_function("reset")) { LUA_call_report(lua_pcall(L, 0, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC int LUA_make_palette (t_sm_palette *palette) { if(LUA_init_luaterm_function("make_palette")) { LUA_call_report(lua_pcall(L, 0, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); return(lua_term_result); } return(0); /* continuous number of colours */ } TERM_PUBLIC void LUA_set_color (t_colorspec *colorspec) { double gray = colorspec->value; rgb_color color = {0.,0.,0.}; if(LUA_init_luaterm_function("set_color")) { if (colorspec->type == TC_FRAC) { if (sm_palette.colors != 0) /* finite nb of colors explicitly requested */ gray = (gray >= ((double)(sm_palette.colors-1)) / sm_palette.colors) ? 1 : floor(gray * sm_palette.colors) / sm_palette.colors; rgb1_from_gray( gray, &color ); } else if (colorspec->type == TC_RGB) { color.r = (double)((colorspec->lt >> 16 ) & 255) / 255.; color.g = (double)((colorspec->lt >> 8 ) & 255) / 255.; color.b = (double)(colorspec->lt & 255) / 255.; } if (color.r < 1e-4) color.r = 0; if (color.g < 1e-4) color.g = 0; if (color.b < 1e-4) color.b = 0; lua_pushstring(L, LUA_get_colorstyle(colorspec->type)); lua_pushinteger(L, colorspec->lt); lua_pushnumber(L, colorspec->value); lua_pushnumber(L, color.r); lua_pushnumber(L, color.g); lua_pushnumber(L, color.b); LUA_call_report(lua_pcall(L, 6, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC void LUA_filled_polygon (int points, gpiPoint *corners) { if(LUA_init_luaterm_function("filled_polygon")) { int i; lua_pushstring(L, LUA_get_fillstyle(corners->style)); lua_pushinteger(L, corners->style >> 4); /* put all coords into a simple table */ lua_newtable(L); for (i = 0; i < points; i++) { lua_newtable(L); lua_pushinteger(L, corners[i].x); lua_rawseti(L, -2, 1); lua_pushinteger(L, corners[i].y); lua_rawseti(L, -2, 2); lua_rawseti(L, -2 , i+1); /* add "subtable" */ } LUA_call_report(lua_pcall(L, 3, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC void LUA_layer (t_termlayer syncpoint) { if(LUA_init_luaterm_function("layer")) { const char *m; switch (syncpoint) { case TERM_LAYER_RESET: /* Start of plot; reset flag */ m = "reset"; break; case TERM_LAYER_BACKTEXT: /* Start of "back" text layer */ m = "backtext"; break; case TERM_LAYER_FRONTTEXT: /* Start of "front" text layer */ m = "fronttext"; break; case TERM_LAYER_END_TEXT: /* Close off front or back macro before leaving */ m = "end_text"; break; case TERM_LAYER_BEFORE_PLOT: /* Close off front or back macro before leaving */ m = "before_plot"; break; case TERM_LAYER_AFTER_PLOT: /* Close off front or back macro before leaving */ m = "after_plot"; break; case TERM_LAYER_BEGIN_GRID: m = "begin_grid"; break; case TERM_LAYER_END_GRID: m = "end_grid"; break; default: m = ""; break; } lua_pushstring(L, m); LUA_call_report(lua_pcall(L, 1, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } TERM_PUBLIC void LUA_path (int path) { if(LUA_init_luaterm_function("path")) { lua_pushinteger(L, path); LUA_call_report(lua_pcall(L, 1, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } /* Lua table structure for the image pixel: pixel = {{r, g, b, [, a]}, {r, g, b [, a]}, ... , {r, g, b [, a]}} */ TERM_PUBLIC void LUA_image (unsigned m, unsigned n, coordval *image, gpiPoint *corner, t_imagecolor color_mode) { if(LUA_init_luaterm_function("image")) { int i; rgb_color rgb1; coordval alpha; char *image_file = NULL; #ifdef LUA_EXTERNAL_IMAGES /* "externalize" if transparent images are used or on user request */ if (outstr && ((color_mode == IC_RGBA) || image_extern)) { char *idx; /* cairo based png images with alpha channel */ if ((idx = strrchr(outstr, '.')) == NULL) idx = strchr(outstr, '\0'); image_file = (char*)gp_alloc((idx-outstr)+10, "LUA_image"); strncpy(image_file, outstr, (idx-outstr) + 1); snprintf(image_file+(idx-outstr), 8, ".%02d.png", ++image_cnt); write_png_image (m, n, image, color_mode, image_file); } #endif lua_pushinteger(L, m); lua_pushinteger(L, n); lua_newtable(L); /* pixel table */ for (i = 0; i < m*n; i++) { if (color_mode == IC_PALETTE) { /* FIXME: Is this correct? Needs a testcase. Would be nice to map it correctly to RGB. */ rgb1maxcolors_from_gray(*image++, &rgb1); } else { /* IC_RGB and IC_RGBA*/ rgb1.r = *image++; rgb1.g = *image++; rgb1.b = *image++; if (color_mode == IC_RGBA) alpha = (*image++)/255.; } lua_newtable(L); /* pixel color */ lua_pushnumber(L, rgb1.r); lua_rawseti(L, -2, 1); lua_pushnumber(L, rgb1.g); lua_rawseti(L, -2, 2); lua_pushnumber(L, rgb1.b); lua_rawseti(L, -2, 3); if (color_mode == IC_RGBA) { lua_pushnumber(L, alpha); lua_rawseti(L, -2, 4); } lua_rawseti(L, -2, i+1); /* add "pixel" */ } lua_newtable(L); /* "corner" table */ for (i = 0; i < 4; i++) { lua_newtable(L); lua_pushinteger(L, (int)corner[i].x); lua_rawseti(L, -2, 1); lua_pushinteger(L, (int)corner[i].y); lua_rawseti(L, -2, 2); lua_rawseti(L, -2 , i+1); /* add "subtable" */ } switch (color_mode) { case IC_PALETTE: case IC_RGB: lua_pushstring(L, "RGB"); break; case IC_RGBA: lua_pushstring(L, "RGBA"); break; } if (image_file) { lua_pushstring(L, image_file); free(image_file); } else { lua_pushnil(L); } LUA_call_report(lua_pcall(L, 6, 1, tb)); lua_term_result = (int)lua_tointeger(L, -1); lua_pop(L, 1); } } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(lua_driver) "lua", LUA_TERM_DESCRIPTION, LUA_XMAX, LUA_YMAX, LUA_VCHAR, LUA_HCHAR, LUA_VTIC, LUA_HTIC, LUA_options, LUA_init, LUA_reset, LUA_text, null_scale, LUA_graphics, LUA_move, LUA_vector, LUA_linetype, LUA_put_text, LUA_text_angle, LUA_justify_text, LUA_point, LUA_arrow, LUA_set_font, LUA_pointsize, TERM_BINARY /*flags*/, 0 /*suspend*/, 0 /*resume*/, LUA_boxfill, LUA_linewidth #ifdef USE_MOUSE , 0, 0, 0, 0, 0 #endif , LUA_make_palette, LUA_previous_palette, LUA_set_color , LUA_filled_polygon , LUA_image , 0, 0, 0 , LUA_layer , LUA_path , LUA_TSCALE TERM_TABLE_END(lua_driver) #undef LAST_TERM #define LAST_TERM lua_driver TERM_TABLE_START(tikz_driver) "tikz", "TeX TikZ graphics macros via the lua script driver", LUA_XMAX, LUA_YMAX, LUA_VCHAR, LUA_HCHAR, LUA_VTIC, LUA_HTIC, LUA_options, LUA_init, LUA_reset, LUA_text, null_scale, LUA_graphics, LUA_move, LUA_vector, LUA_linetype, LUA_put_text, LUA_text_angle, LUA_justify_text, LUA_point, LUA_arrow, LUA_set_font, LUA_pointsize, TERM_BINARY /*flags*/, 0 /*suspend*/, 0 /*resume*/, LUA_boxfill, LUA_linewidth #ifdef USE_MOUSE , 0, 0, 0, 0, 0 #endif , LUA_make_palette, LUA_previous_palette, LUA_set_color , LUA_filled_polygon , LUA_image , 0, 0, 0 , LUA_layer , LUA_path , LUA_TSCALE TERM_TABLE_END(tikz_driver) #undef LAST_TERM #define LAST_TERM tikz_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(lua) "1 lua", "?commands set terminal lua", "?set terminal lua", "?set term lua", "?terminal lua", "?term lua", "?lua", " The `lua` generic terminal driver works in conjunction with an", " external Lua script to create a target-specific plot file.", " Currently the only supported target is TikZ -> pdflatex.", "", " Information about Lua is available at http://www.lua.org .", "", " Syntax:", " set terminal lua | \"\"", " { ...}", " {help}", "", " A 'target name' or 'file name' (in quotes) for a script is mandatory.", " If a 'target name' for the script is given, the terminal will look for", " \"gnuplot-.lua\" in the local directory and on failure in", " the environmental variable GNUPLOT_LUA_DIR.", "", " All arguments will be provided to the selected script for further", " evaluation. E.g. 'set term lua tikz help' will cause the script itself", " to print additional help on options and choices for the script.", #include "lua/gnuplot-tikz.help" "" END_HELP(lua) START_HELP(tikz) "1 tikz", "?commands set terminal tikz", "?set terminal tikz", "?set term tikz", "?terminal tikz", "?term tikz", "?tikz", " This driver creates output for use with the TikZ package of graphics macros", " in TeX. It is currently implemented via an external lua script, and ", " `set term tikz` is a short form of the command `set term lua tikz`.", " See `term lua` for more information. Use the command `set term tikz help`", " to print terminal options." END_HELP(tikz) #endif /* TERM_HELP */ gnuplot-4.6.4/term/win.trm0000644000471100001440000010622412160133407012423 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: win.trm,v 1.107.2.3 2013/06/07 18:32:49 markisch Exp $ */ /* GNUPLOT - win.trm */ /*[ * Copyright 1992 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * * AUTHORS * * Gnuplot for Windows: * Maurice Castro, Russell Lang * */ /* This file implements the terminal and printer display for gnuplot */ /* under Microsoft Windows. */ /* */ /* The modifications to allow Gnuplot to run under Windows were made */ /* by Maurice Castro (maurice@bruce.cs.monash.edu.au) */ /* and Russell Lang (rjl@monu1.cc.monash.edu.au) 19 Nov 1992 */ /* */ /* Edit this file with tabstop=4 (vi :se ts=4) */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(windows) #endif #ifdef TERM_PROTO TERM_PUBLIC void WIN_options __PROTO((void)); TERM_PUBLIC void WIN_init __PROTO((void)); TERM_PUBLIC void WIN_reset __PROTO((void)); TERM_PUBLIC void WIN_text __PROTO((void)); TERM_PUBLIC void WIN_graphics __PROTO((void)); TERM_PUBLIC void WIN_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void WIN_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void WIN_linetype __PROTO((int lt)); TERM_PUBLIC void WIN_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int WIN_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC int WIN_text_angle __PROTO((int ang)); TERM_PUBLIC void WIN_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void WIN_resume __PROTO((void)); TERM_PUBLIC void WIN_set_pointsize __PROTO((double)); TERM_PUBLIC void WIN_linewidth __PROTO((double linewidth)); #ifdef USE_MOUSE TERM_PUBLIC void WIN_set_ruler __PROTO((int, int)); TERM_PUBLIC void WIN_set_cursor __PROTO((int, int, int)); TERM_PUBLIC void WIN_put_tmptext __PROTO((int, const char str[])); TERM_PUBLIC void WIN_set_clipboard __PROTO((const char[])); # ifdef WGP_CONSOLE TERM_PUBLIC int WIN_waitforinput __PROTO((void)); # endif #endif TERM_PUBLIC int WIN_make_palette __PROTO((t_sm_palette *palette)); TERM_PUBLIC void WIN_set_color __PROTO((t_colorspec *)); TERM_PUBLIC void WIN_filled_polygon __PROTO((int points, gpiPoint *corners)); TERM_PUBLIC void WIN_boxfill __PROTO((int, unsigned int, unsigned int, unsigned int, unsigned int)); TERM_PUBLIC int WIN_set_font __PROTO((const char *font)); TERM_PUBLIC void WIN_enhanced_open __PROTO((char * fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint)); TERM_PUBLIC void WIN_enhanced_flush __PROTO((void)); TERM_PUBLIC void WIN_image __PROTO((unsigned int, unsigned int, coordval *, gpiPoint *, t_imagecolor)); TERM_PUBLIC void WIN_layer __PROTO((t_termlayer syncpoint)); /* Initialization values - guess now, scale later */ #define WIN_XMAX (24000) #define WIN_YMAX (18000) #define WIN_HCHAR (WIN_XMAX/75) #define WIN_VCHAR (WIN_YMAX/25) #define WIN_HTIC (WIN_XMAX/160) #define WIN_VTIC WIN_HTIC #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include #include "win/winmain.h" #ifdef __MSC__ #include /* for mktemp() */ #endif /* Interface routines - create list of actions for Windows */ enum WIN_id { WIN_DEFAULT, WIN_MONOCHROME, WIN_COLOR, WIN_GTITLE, WIN_ENHANCED, WIN_NOENHANCED, WIN_FONT, WIN_SIZE, WIN_POSITION, WIN_CLOSE, WIN_BACKGROUND, WIN_FONTSCALE, WIN_LINEWIDTH, WIN_SOLID, WIN_DASHED, WIN_OTHER }; static struct gen_table WIN_opts[] = { { "d$efault", WIN_DEFAULT }, { "c$olor", WIN_COLOR }, { "c$olour", WIN_COLOR }, { "m$onochrome", WIN_MONOCHROME }, { "backg$round", WIN_BACKGROUND }, { "solid", WIN_SOLID }, { "dash$ed", WIN_DASHED }, { "enh$anced", WIN_ENHANCED }, { "noenh$anced", WIN_NOENHANCED }, { "font", WIN_FONT }, { "fonts$cale", WIN_FONTSCALE }, { "linewidth", WIN_LINEWIDTH }, { "lw", WIN_LINEWIDTH }, { "ti$tle", WIN_GTITLE }, { "siz$e", WIN_SIZE }, { "pos$ition", WIN_POSITION }, { "cl$ose", WIN_CLOSE }, { NULL, WIN_OTHER } }; static int WIN_last_linetype = LT_NODRAW; /* HBB 20000813: linetype caching */ termentry * WIN_term = NULL; char WIN_inifontname[MAXFONTNAME] = WINFONT; int WIN_inifontsize = WINFONTSIZE; TERM_PUBLIC void WIN_options() { char *s; TBOOLEAN set_font = FALSE, set_fontsize = FALSE; TBOOLEAN set_title = FALSE, set_close = FALSE; TBOOLEAN set_dashed = FALSE, set_color = FALSE; TBOOLEAN set_background = FALSE, set_fontscale = FALSE; TBOOLEAN set_linewidth = FALSE, set_size = FALSE; TBOOLEAN set_position = FALSE, set_number = FALSE; TBOOLEAN color, dashed; COLORREF background; double fontscale, linewidth; int win_x = 0; int win_y = 0; int win_width = 0; int win_height = 0; char * title; int fontsize; char fontname[MAXFONTNAME]; int window_number; while (!END_OF_COMMAND) { switch (lookup_table(&WIN_opts[0], c_token)) { case WIN_DEFAULT: color = TRUE; dashed = FALSE; strcpy(fontname, WIN_inifontname); fontsize = WIN_inifontsize; fontscale = linewidth = 1; set_color = set_dashed = TRUE; set_font = set_fontsize = TRUE; set_fontscale = set_linewidth = TRUE; c_token++; break; case WIN_COLOR: c_token++; color = TRUE; set_color = TRUE; break; case WIN_MONOCHROME: c_token++; color = FALSE; set_color = TRUE; break; case WIN_BACKGROUND: { int color; c_token++; color = parse_color_name(); /* TODO: save original background color and color string, add background color to status string */ background = RGB(((color >> 16) & 0xff), ((color >> 8) & 0xff), (color & 0xff)); set_background = TRUE; break; } case WIN_ENHANCED: c_token++; term->flags |= TERM_ENHANCED_TEXT; break; case WIN_NOENHANCED: c_token++; term->flags &= ~TERM_ENHANCED_TEXT; break; case WIN_FONTSCALE: { c_token++; fontscale = real_expression(); if (fontscale <= 0) fontscale = 1.; set_fontscale = TRUE; break; } case WIN_LINEWIDTH: { c_token++; linewidth = real_expression(); if (linewidth <= 0) linewidth = 1.; set_linewidth = TRUE; break; } case WIN_SOLID: c_token++; dashed = FALSE; set_dashed = TRUE; break; case WIN_DASHED: c_token++; dashed = TRUE; set_dashed = TRUE; break; case WIN_SIZE: { c_token++; if (END_OF_COMMAND) int_error(c_token,"size requires 'width,heigth'"); win_width = real_expression(); if (!equals(c_token++,",")) int_error(c_token,"size requires 'width,heigth'"); win_height = real_expression(); if (win_width < 1 || win_height < 1) int_error(c_token, "size is out of range"); set_size = TRUE; break; } case WIN_POSITION: { c_token++; if (END_OF_COMMAND) int_error(c_token,"position requires 'x,y'"); win_x = real_expression(); if (!equals(c_token++,",")) int_error(c_token,"position requires 'x,y'"); win_y = real_expression(); if (win_x < 1 || win_y < 1) int_error(c_token, "position is out of range"); set_position = TRUE; break; } case WIN_GTITLE: c_token++; title = try_to_get_string(); if (title == NULL) int_error(c_token, "expecting string argument"); if (strcmp(title, "") == 0) title = NULL; set_title = TRUE; break; case WIN_CLOSE: c_token++; set_close = TRUE; break; case WIN_FONT: c_token++; /* Code copied from ps.trm and modified for windows terminal */ if ((s = try_to_get_string())) { char *comma; if (set_font) int_error(c_token, "extraneous argument in set terminal %s", term->name); comma = strrchr(s,','); if (comma && (1 == sscanf(comma + 1, "%i", &fontsize))) { set_fontsize = TRUE; *comma = '\0'; } if (*s) { set_font = TRUE; strncpy(fontname, s, MAXFONTNAME); free(s); } } else { if (set_fontsize) int_error(c_token, "extraneous argument in set terminal %s", term->name); set_fontsize = TRUE; fontsize = int_expression(); } break; case WIN_OTHER: default: window_number = int_expression(); set_number = TRUE; break; } } /* change window? */ if (set_number) { char status[100]; LPGW lpgw = listgraphs; while ((lpgw->Id != window_number) && (lpgw->next)) lpgw = lpgw->next; if (lpgw->Id != window_number) { /* create new window */ lpgw->next = calloc(1, sizeof(GW)); lpgw = lpgw->next; lpgw->Id = window_number; } /* set status line of previous graph window */ sprintf(status, "(inactive, window number %i)", graphwin->Id); Graph_put_tmptext(graphwin, 0, status); /* reset status text */ Graph_put_tmptext(lpgw, 0, ""); graphwin = lpgw; } /* apply settings */ GraphInitStruct(graphwin); if (set_color) { graphwin->color = color; if (color) term->flags &= ~TERM_MONOCHROME; else term->flags |= TERM_MONOCHROME; if (!set_dashed) graphwin->dashed = !color; } if (set_dashed) graphwin->dashed = dashed; if (set_background) graphwin->background = background; if (set_fontscale) graphwin->fontscale = fontscale; if (set_linewidth) graphwin->linewidth = linewidth; if (set_size) { graphwin->Size.x = win_width; graphwin->Size.y = win_height + graphwin->StatusHeight; } if (set_position) { graphwin->Origin.x = win_x; graphwin->Origin.y = win_y; /* TODO: apply now */ } if (set_title) { free (graphwin->Title); graphwin->Title = (title) ? title : strdup(WINGRAPHTITLE); GraphChangeTitle(graphwin); /* TODO: apply now */ } if (set_fontsize) graphwin->deffontsize = graphwin->fontsize = fontsize; if (set_font) { strcpy(graphwin->fontname, fontname); strcpy(graphwin->deffontname, fontname); } /* font initialization */ WIN_set_font(NULL); WIN_update_options(); if (set_close) { win_close_terminal_window(graphwin); return; } /* update graph window */ if (GraphHasWindow(graphwin) && IsIconic(graphwin->hWndGraph)) ShowWindow(graphwin->hWndGraph, SW_SHOWNORMAL); GraphRedraw(graphwin); } void WIN_update_options() { TBOOLEAN set_font = FALSE, set_fontsize = FALSE; /* update term_options */ sprintf(term_options, "%i %s %s %s", graphwin->Id, graphwin->color ? "color" : "monochrome", graphwin->dashed ? "dashed" : "solid", term->flags & TERM_ENHANCED_TEXT ? "enhanced" : "noenhanced"); set_fontsize = (graphwin->deffontsize != WIN_inifontsize); set_font = (strcmp(graphwin->deffontname, WIN_inifontname) != 0); if (set_font || set_fontsize) { char * fontstring = (char*) gp_alloc(strlen(graphwin->fontname) + 25, "win font"); if (!set_fontsize) sprintf(fontstring, " font \"%s\"", graphwin->deffontname); else sprintf(fontstring, " font \"%s, %d\"", set_font ? graphwin->deffontname : "", graphwin->deffontsize); strcat (term_options, fontstring); free(fontstring); } if (graphwin->background != RGB(255, 255, 255)) sprintf(&(term_options[strlen(term_options)]), " background \"#%0x%0x%0x\"", GetRValue(graphwin->background), GetGValue(graphwin->background), GetBValue(graphwin->background)); if (graphwin->fontscale != 1) sprintf(&(term_options[strlen(term_options)]), " fontscale %.1f", graphwin->fontscale); if (graphwin->linewidth != 1) sprintf(&(term_options[strlen(term_options)]), " linewidth %.1f", graphwin->linewidth); } TERM_PUBLIC void WIN_init() { if (!graphwin->hWndGraph) { graphwin->xmax = WIN_XMAX; graphwin->ymax = WIN_YMAX; graphwin->htic = WIN_HTIC; graphwin->vtic = WIN_VTIC; GraphInit(graphwin); } WIN_last_linetype = LT_NODRAW; /* HBB 20000813: linetype caching */ WIN_term = term; } TERM_PUBLIC void WIN_reset() { } TERM_PUBLIC void WIN_text() { GraphEnd(graphwin); } TERM_PUBLIC void WIN_graphics() { GraphStart(graphwin, pointsize); /* Fix up the text size if the user has resized the window. */ term->h_char = graphwin->hchar; term->v_char = graphwin->vchar; term->h_tic = graphwin->htic; term->v_tic = graphwin->vtic; WIN_last_linetype = LT_NODRAW; /* HBB 20000813: linetype caching */ /* Save current text encoding */ GraphOp(graphwin, W_text_encoding, encoding, 0, NULL); } TERM_PUBLIC void WIN_move(unsigned int x, unsigned int y) { GraphOp(graphwin, W_move, x, y, NULL); } TERM_PUBLIC void WIN_vector(unsigned int x, unsigned int y) { GraphOp(graphwin, W_vect, x, y, NULL); } TERM_PUBLIC void WIN_linetype(int lt) { if (lt != WIN_last_linetype) { GraphOp(graphwin, W_line_type, lt, 0, NULL); WIN_last_linetype = lt; } } TERM_PUBLIC void WIN_put_text(unsigned int x, unsigned int y, const char *str) { if ((str == NULL) || !strlen(str)) return; /* If no enhanced text processing is needed, we can use the plain */ /* vanilla put_text() routine instead of this fancy recursive one. */ if (!(term->flags & TERM_ENHANCED_TEXT) || ignore_enhanced_text || !strpbrk(str, "{}^_@&~")) GraphOp(graphwin, W_put_text, x, y, str); else GraphOp(graphwin, W_enhanced_text, x, y, str); } TERM_PUBLIC int WIN_justify_text(enum JUSTIFY mode) { GraphOp(graphwin, W_justify, mode, 0, NULL); return (TRUE); } TERM_PUBLIC int WIN_text_angle(int ang) { if (graphwin->rotate) GraphOp(graphwin, W_text_angle, ang, 0, NULL); return graphwin->rotate; } TERM_PUBLIC void WIN_point(unsigned int x, unsigned int y, int number) { /* draw point shapes later to save memory */ /* HBB 20010411: secure against pointtype -1 or lower */ if (number < -1) number = -1; /* refuse nonsense values */ if (number >= 0) number %= WIN_POINT_TYPES; number += 1; GraphOp(graphwin, W_dot + number, x, y, NULL); } TERM_PUBLIC void WIN_resume() { GraphResume(graphwin); } TERM_PUBLIC void WIN_set_pointsize(double s) { if (s < 0) s = 1; /* Pass the scale as a scaled-up integer. */ GraphOp(graphwin, W_pointsize, (int) 100 * s, 0, NULL); } TERM_PUBLIC void WIN_linewidth(double linewidth) { /* HBB 20000813: New routine */ WIN_last_linetype = LT_NODRAW; /* invalidate cached linetype */ GraphOp(graphwin, W_line_width, (int) 100 * linewidth, 0, NULL); } #ifdef USE_MOUSE /* Implemented by Petr Mikulik, February 2001 --- the best Windows solutions * come from OS/2 :-)) */ TERM_PUBLIC void WIN_put_tmptext(int i, const char str[]) { Graph_put_tmptext(graphwin, i, str); } TERM_PUBLIC void WIN_set_ruler(int x, int y) { Graph_set_ruler(graphwin, x, y); } TERM_PUBLIC void WIN_set_cursor(int c, int x, int y) { Graph_set_cursor(graphwin, c, x, y); } TERM_PUBLIC void WIN_set_clipboard (const char s[]) { Graph_set_clipboard(graphwin, s); } #ifdef WGP_CONSOLE TERM_PUBLIC int WIN_waitforinput() { return ConsoleGetch(); } #endif /* WGP_CONSOLE */ #endif /* USE_MOUSE */ /* Note: this used to be a verbatim copy of PM_image (pm.trm) with only minor changes */ TERM_PUBLIC void WIN_image(unsigned int M, unsigned int N, coordval *image, gpiPoint *corner, t_imagecolor color_mode) { PBYTE rgb_image; unsigned int image_size; unsigned int pad_bytes; /* BM: IC_PALETTE, IC_RGB and IC_RGBA images are converted to a format suitable for Windows: - sequence of lines is reversed - each line starts at a 4 byte boundary - 24bits RGB for IC_PALETTE and IC_RGB - 32bits RGBA for IC_RGBA */ if ((color_mode == IC_PALETTE) || (color_mode == IC_RGB)) { pad_bytes = (4 - (3 * M) % 4) % 4; /* scan lines start on ULONG boundaries */ image_size = (3 * M + pad_bytes) * N; } else if (color_mode == IC_RGBA) { pad_bytes = 0; image_size = M * N * 4; } rgb_image = (PBYTE) gp_alloc(image_size, "WIN RGB image"); if (color_mode == IC_PALETTE) { unsigned int x, y; rgb_image += N * (3 * M + pad_bytes); for (y=0; ytype ) { case TC_FRAC: { /* Immediately translate palette index to RGB colour */ rgb255_color rgb255; rgb255maxcolors_from_gray(colorspec->value, &rgb255); GraphOp(graphwin, W_setcolor, (rgb255.g << 8) | rgb255.b, 0xff00 | (rgb255.r), NULL); /* GraphOp(graphwin, W_setcolor, (int)(WIN_PAL_COLORS*colorspec->value), 0, NULL); */ break; } case TC_RGB: GraphOp(graphwin, W_setcolor, (colorspec->lt) & 0xffff, 0xff00 | ((colorspec->lt >> 16) & 0x00ff), NULL); break; case TC_LT: GraphOp(graphwin, W_setcolor, colorspec->lt, TC_LT << 8, NULL); break; } WIN_last_linetype = LT_NODRAW; } TERM_PUBLIC void WIN_filled_polygon(int points, gpiPoint *corners) { GraphOp(graphwin, W_fillstyle, corners->style, 0, NULL); /* Eliminate duplicate polygon points. */ if ((corners[0].x == corners[points - 1].x) && (corners[0].y == corners[points - 1].y)) points--; if ((points == 4) && (((corners[0].x == corners[3].x) && (corners[0].y == corners[1].y) && (corners[2].x == corners[1].x) && (corners[2].y == corners[3].y)) || ((corners[0].x == corners[1].x) && (corners[0].y == corners[3].y) && (corners[2].x == corners[3].x) && (corners[2].y == corners[1].y)))) { /* The polygon describes a rectangle. Thus we use boxfill, which is more efficient. */ GraphOp(graphwin, W_move, corners[0].x, corners[0].y, NULL); GraphOp(graphwin, W_boxfill, corners[2].x, corners[2].y, NULL); } else { int i; for (i = 0; i < points; i++) GraphOp(graphwin, W_filled_polygon_pt, corners[i].x, corners[i].y, NULL); GraphOp(graphwin, W_filled_polygon_draw, points, 0, NULL); } } TERM_PUBLIC void WIN_boxfill( int style, unsigned int xleft, unsigned int ybottom, unsigned int width, unsigned int height) { /* split into multiple commands to squeeze through all the necessary info */ GraphOp(graphwin, W_fillstyle, style, 0, NULL); GraphOp(graphwin, W_move, xleft, ybottom, NULL); GraphOp(graphwin, W_boxfill, xleft + width, ybottom + height, NULL); } TERM_PUBLIC int WIN_set_font(const char *font) { /* Note: defer the determination of default font name and default font size until drawgraph() is executed. */ if ((font == NULL) || (font[0] == '\0')) { /* select default font */ GraphOp(graphwin, W_font, 0, 0, NULL); } else { int fontsize; char * size; size = strrchr(font, ','); if (size == NULL) { /* only font name given */ GraphOp(graphwin, W_font, 0, 0, font); } else if (size == font) { /* only font size given */ sscanf(size + 1, "%i", &fontsize); GraphOp(graphwin, W_font, fontsize, 0, NULL); } else { /* full font information supplied */ char fontname[MAXFONTNAME]; strncpy(fontname, font, size - font); fontname[size - font] = '\0'; sscanf(size + 1, "%i", &fontsize); GraphOp(graphwin, W_font, fontsize, 0, fontname); } } return TRUE; } /* BM: new callback functions for enhanced text These are only stubs that call functions in wgraph.c. */ TERM_PUBLIC void WIN_enhanced_open( char *fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { GraphEnhancedOpen(fontname, fontsize, base, widthflag, showflag, overprint); } TERM_PUBLIC void WIN_enhanced_flush() { GraphEnhancedFlush(); } TERM_PUBLIC void WIN_layer (t_termlayer syncpoint) { GraphOp(graphwin, W_layer, syncpoint, 0, NULL); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(win_driver) "windows", "Microsoft Windows", WIN_XMAX, WIN_YMAX, WIN_VCHAR, WIN_HCHAR, WIN_VTIC, WIN_HTIC, WIN_options, WIN_init, WIN_reset, WIN_text, null_scale, WIN_graphics, WIN_move, WIN_vector, WIN_linetype, WIN_put_text, WIN_text_angle, WIN_justify_text, WIN_point, do_arrow, WIN_set_font, WIN_set_pointsize, TERM_CAN_MULTIPLOT|TERM_NO_OUTPUTFILE|TERM_ALPHA_CHANNEL|TERM_CAN_DASH|TERM_LINEWIDTH|TERM_FONTSCALE, WIN_text /* suspend */ , WIN_resume, WIN_boxfill, WIN_linewidth, #ifdef USE_MOUSE # ifdef WGP_CONSOLE WIN_waitforinput , # else 0 /* WIN_waitforinput */, # endif /* WGP_CONSOLE */ WIN_put_tmptext, WIN_set_ruler, WIN_set_cursor, WIN_set_clipboard, #endif WIN_make_palette, 0 /* previous_palette */, WIN_set_color, WIN_filled_polygon, WIN_image, WIN_enhanced_open, WIN_enhanced_flush, do_enh_writec, WIN_layer TERM_TABLE_END(win_driver) #undef LAST_TERM #define LAST_TERM win_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(windows) "1 windows", "?commands set terminal windows", "?set terminal windows", "?set term windows", "?terminal windows", "?term windows", "?windows", " The `windows` terminal is a fast interactive terminal driver that uses the", " Windows GDI to draw and write text. The cross-platform `terminal wxt` is also", " supported on Windows.", "", " Syntax:", " set terminal windows {}", " {color | monochrome}", " {solid | dashed}", " {enhanced | noenhanced}", " {font }", " {fontscale }", " {linewdith }", " {background }", " {title \"Plot Window Title\"}", " {size ,}", " {position ,}", " {close}", "", " Multiple plot windows are supported: `set terminal win ` directs the", " output to plot window number n.", "", " `color` and `monochrome` select colored or mono output,", " `dashed` and `solid` select dashed or solid lines. Note that `color`", " defaults to `solid`, whereas `monochrome` defaults to `dashed`.", " `enhanced` enables enhanced text mode features (subscripts,", " superscripts and mixed fonts, see `enhanced text` for more information).", " `` is in the format \",\", where \"\"", " is the name of a valid Windows font, and is the size of the font", " in points and both components are optional.", " Note that in previous versions of gnuplot the `font` statement could be left", " out and could be given as a number without double quotes. This is", " no longer supported.", " `linewidth` and `fontscale` can be used to scale the width of lines and", " the size of text.", " `title` changes the title of the graph window.", " `size` defines the width and height of the window in pixel and `position`", " the origin of the window i.e. the position of the top left corner on the", " screen (again in pixel). These options override any default settings", " from the `wgnuplot.ini` file.", "", " Other options may be changed using the `graph-menu` or the initialization file", " `wgnuplot.ini`.", "", " The Windows version normally terminates immediately as soon as the end of", " any files given as command line arguments is reached (i.e. in non-interactive", " mode), unless you specify `-` as the last command line option.", " It will also not show the text-window at all, in this mode, only the plot.", " By giving the optional argument `-persist` (same as for gnuplot under x11;", " former Windows-only options `/noend` or `-noend` are still accepted as well),", " will not close gnuplot. Contrary to gnuplot on other operating systems,", " gnuplot's interactive command line is accessible after the -persist option.", "", " The plot window remains open when the gnuplot terminal is changed with a", " `set term` command. The plot window can be closed with `set term windows close`.", "", " `gnuplot` supports different methods to create printed output on Windows,", " see `windows printing`. The windows terminal supports data exchange with ", " other programs via clipboard and EMF files, see `graph-menu`. You can also", " use the `terminal emf` to create EMF files.", "2 graph-menu", "?commands set terminal windows graph-menu", "?set terminal windows graph-menu", "?set term windows graph-menu", "?windows graph-menu", "?graph-menu", " The `gnuplot graph` window has the following options on a pop-up menu", " accessed by pressing the right mouse button(*) or selecting `Options` from the", " system menu:", "", " `Copy to Clipboard` copies a bitmap and an enhanced Metafile picture.", "", " `Save as EMF...` allows the user to save the current graph window as enhanced metafile", "", " `Print...` prints the graphics windows using a Windows printer driver and", " allows selection of the printer and scaling of the output. The output", " produced by `Print` is not as good as that from `gnuplot`'s own printer", " drivers. See also `windows printing`.", "", " `Bring to Top` when checked brings the graph window to the top after every", " plot.", "", " `Color` when checked enables color linestyles. When unchecked it forces", " monochrome linestyles.", "", " `Double buffer` activates drawing into a memory buffer before copying the", " graph to the screen. This avoids flickering e.g. during animation and", " rotation of 3d graphs. See `mouse` and `scrolling`.", "", " `Oversampling` doubles the size of the virtual canvas. It is scaled down", " again for drawing to the screen. This gives smoother graphics but requires", " more memory and computing time. It requires `double buffer`.", "", " `Antialiasing` selects smoothing of lines and edges. Note that this slows", " down drawing.", "", " `Background...` sets the window background color.", "", " `Choose Font...` selects the font used in the graphics window.", "", " `Line Styles...` allows customization of the line colors and styles.", "", " `Update wgnuplot.ini` saves the current window locations, window sizes, text", " window font, text window font size, graph window font, graph window font", " size, background color and linestyles to the initialization file", " `wgnuplot.ini`.", "", "^
", " (*) Note that this menu is only available by pressing the right mouse button", " with `unset mouse`.", "2 printing", "?commands set terminal windows printing", "?set terminal windows printing", "?set term windows printing", "?windows printing", "?printing", "?screendump", " In order of preference, graphs may be printed in the following ways:", "", " `1.` Use the `gnuplot` command `set terminal` to select a printer and `set", " output` to redirect output to a file.", "", " `2.` Select the `Print...` command from the `gnuplot graph` window. An extra", " command `screendump` does this from the text window.", "", " `3.` If `set output \"PRN\"` is used, output will go to a temporary file. When", " you exit from `gnuplot` or when you change the output with another `set", " output` command, a dialog box will appear for you to select a printer port.", " If you choose OK, the output will be printed on the selected port, passing", " unmodified through the print manager. It is possible to accidentally (or", " deliberately) send printer output meant for one printer to an incompatible", " printer.", "", "2 text-menu", /* FIXME: this is not really related to the windows driver, but the windows platform */ "?commands set terminal windows text-menu", "?set terminal windows text-menu", "?set term windows text-menu", "?windows text-menu", "?text-menu", " The `gnuplot text` window has the following options on a pop-up menu accessed", " by pressing the right mouse button or selecting `Options` from the system", " menu:", "", " `Copy to Clipboard` copies marked text to the clipboard.", "", " `Paste` copies text from the clipboard as if typed by the user.", "", " `Choose Font...` selects the font used in the text window.", "", " `System Colors` when selected makes the text window honor the System Colors", " set using the Control Panel. When unselected, text is black or blue on a", " white background.", "", " `Wrap long lines` when selected lines longer than the current window width", " are wrapped.", "", " `Update wgnuplot.ini` saves the current settings to the initialisation file", " `wgnuplot.ini`, which is located in the user's application data directory.", "", "2 wgnuplot.mnu", /* FIXME: this is not really related to the windows driver, but the windows platform */ "?windows wgnuplot.mnu", "?wgnuplot.mnu", " If the menu file `wgnuplot.mnu` is found in the same directory as", " `gnuplot`, then the menu specified in `wgnuplot.mnu` will be loaded.", " Menu commands:", "", " [Menu] starts a new menu with the name on the following line.", " [EndMenu] ends the current menu.", " [--] inserts a horizontal menu separator.", " [|] inserts a vertical menu separator.", " [Button] puts the next macro on a push button instead of a menu.", "", " Macros take two lines with the macro name (menu entry) on the first line and", " the macro on the second line. Leading spaces are ignored. Macro commands:", "", " [INPUT] Input string with prompt terminated by [EOS] or {ENTER}", " [EOS] End Of String terminator. Generates no output.", " [OPEN] Get name of a file to open, with the title of the dialog", " terminated by [EOS], followed by a default filename terminated", " by [EOS] or {ENTER}.", " [SAVE] Get name of a file to save. Parameters like [OPEN]", " [DIRECTORY] Get name of a directory, with the title of the dialog", " terminated by [EOS] or {ENTER}", "", " Macro character substitutions:", "", " {ENTER} Carriage Return '\\r'", " {TAB} Tab '\\011'", " {ESC} Escape '\\033'", " {^A} '\\001'", " ...", " {^_} '\\031'", "", " Macros are limited to 256 characters after expansion.", "", "2 wgnuplot.ini", "?commands set terminal windows wgnuplot.ini", "?set terminal windows wgnuplot.ini", "?set term windows wgnuplot.ini", "?windows wgnuplot.ini", "?wgnuplot.ini", " The Windows text window and the `windows` terminal will read some of their options from", " the `[WGNUPLOT]` section of `wgnuplot.ini`.", " This file is located in the user's application data directory. Here's a sample", " `wgnuplot.ini` file:", "", " [WGNUPLOT]", " TextOrigin=0 0", " TextSize=640 150", " TextFont=Terminal,9", " TextWrap=1", " TextLines=400", " SysColors=0", " GraphOrigin=0 150", " GraphSize=640 330", " GraphFont=Arial,10", " GraphColor=1", " GraphToTop=1", " GraphDoublebuffer=1", " GraphOversampling=0", " GraphAntialiasing=1", " GraphBackground=255 255 255", " Border=0 0 0 0 0", " Axis=192 192 192 2 2", " Line1=0 0 255 0 0", " Line2=0 255 0 0 1", " Line3=255 0 0 0 2", " Line4=255 0 255 0 3", " Line5=0 0 128 0 4", "", "^

Text window options

", "", " These settings apply to the wgnuplot text-window only." "", " The `TextOrigin` and `TextSize` entries specify the location and size of the", " text window.", "", " The `TextFont` entry specifies the text window font and size.", "", " The `TextWrap` entry selects wrapping of long text lines.", "", " The `TextLines` entry specifies the number of (unwrapped) lines the internal", " buffer of the text window can hold. This value currently cannot be changed", " from within wgnuplot.", "", " See `text-menu`.", "", "^

Graph window options

", "", " The `GraphFont` entry specifies the font name and size in points.", "", " The five", " numbers given in the `Border`, `Axis` and `Line` entries are the `Red`", " intensity (0--255), `Green` intensity, `Blue` intensity, `Color Linestyle`", " and `Mono Linestyle`. `Linestyles` are 0=SOLID, 1=DASH, 2=DOT, 3=DASHDOT,", " 4=DASHDOTDOT. In the sample `wgnuplot.ini` file above, Line 2 is a green", " solid line in color mode, or a dashed line in monochrome mode. The default", " line width is 1 pixel. If `Linestyle` is negative, it specifies the width of", " a SOLID line in pixels. Line1 and any linestyle used with the `points` style", " must be SOLID with unit width.", "", " See `graph-menu`." END_HELP(windows) #endif /* TERM_HELP */ gnuplot-4.6.4/term/Makefile.am.in0000644000471100001440000000273711752300770013554 0ustar ## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign EXTRA_DIST = README Makefile.am.in driver.h impcodes.h \ object.h post.h $(CORETERM) PostScript lua js write_png_image.c postscriptdir = $(pkgdatadir)/$(VERSION_MAJOR)/PostScript luadir = $(pkgdatadir)/$(VERSION_MAJOR)/lua jsdir = $(pkgdatadir)/$(VERSION_MAJOR)/js # List of terminal drivers, and list of postscript installation files # must be created prior to running automake ##trm-files-begin ##trm-files-end Makefile.am: Makefile.am.in rm -f $@ $@t sed -n '1,/^##trm-files-begin/p' $< > $@t echo CORETERM = *.trm | fmt | (tr '\012' @; echo) \ |sed 's/@$$/%/;s/@/ \\@/g' | tr @% '\012 ' \ >> $@t echo '#' >> $@t echo postscript_DATA = PostScript/*.ps PostScript/*.txt | fmt \ | (tr '\012' @; echo) |sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012 ' >> $@t echo js_DATA = js/*.js js/*.png js/*.css js/README | fmt \ | (tr '\012' @; echo) |sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012 ' >> $@t echo lua_DATA = lua/gnuplot-tikz.lua | fmt \ | (tr '\012' @; echo) |sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012 ' >> $@t echo if BUILD_LUA >> $@t echo build_lua = BUILD_LUA >> $@t echo else >> $@t echo build_lua = >> $@t echo endif >> $@t sed -n '/^##trm-files-end/,$$p' $< >> $@t chmod og-w $@t mv $@t $@ all: lua/gnuplot-tikz.help $(srcdir)/lua/gnuplot-tikz.help: $(srcdir)/lua/gnuplot-tikz.lua test -z "$(build_lua)" || (chmod u+w $@ && lua $< termhelp > $@) gnuplot-4.6.4/term/pc.trm0000644000471100001440000003344110460036603012231 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: pc.trm,v 1.23 2006/07/21 02:35:47 sfeam Exp $ * */ /* GNUPLOT - pc.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * Under Microsoft C * cga, egabios, egalib, vgabios, hercules, corona325, att * Under Turboc C * cga, ega/vga, vgamono, svga, mcga, hercules, att * Under Watcom C * cga, ega/vga, vgamono, svga, mcga, hercules, ??? * * AUTHORS * Colin Kelley, Thomas Williams, William Wilson, Russell Lang * modified by David J. Liu (liu@csb.yale.edu) for version 3.6 * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * * Because only one compiler is used to generate gnuplot.exe * and the type of the single graphics board is auto-detected, * we can combine all these parts into one terminal type: PC * and let the computer take care of the rest. -- DJL * * Since I don't have MicroSoft C, I assume it would define MSC. * Please correct it if you are using MS C. Thank you. -- DJL * */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(dospc) #endif #ifdef TERM_PROTO TERM_PUBLIC void PC_text __PROTO((void)); TERM_PUBLIC void PC_reset __PROTO((void)); TERM_PUBLIC void PC_init __PROTO((void)); TERM_PUBLIC void PC_graphics __PROTO((void)); TERM_PUBLIC void PC_linetype __PROTO((int linetype)); TERM_PUBLIC void PC_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void PC_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void PC_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int PC_text_angle __PROTO((int ang)); TERM_PUBLIC int PC_justify_text __PROTO((enum JUSTIFY ang)); #define PC_HCHAR FNT5X9_HCHAR #define PC_VCHAR FNT5X9_VCHAR #define PC_HTIC 5 #define PC_VTIC 4 #define PC_XMAX 100 /* These two entries are just place holders. */ #define PC_YMAX 100 /* The actual values will be found in init. */ #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #ifdef __TURBOC__ static int huge detect_svga __PROTO((void)); #endif /* __TURBOC__ */ #include #include #ifdef __TURBOC__ #include #include #include #endif /* __TURBOC__ */ #ifdef __WATCOMC__ # include /* for getch() */ # include #endif /* WATCOMC */ #ifdef MSC #include "mcega.h" #endif /* MSC */ static unsigned int pattern[] ={ 0xffff, 0x0f0f, 0xffff, 0xaaaa, 0x3333, 0x3f3f, 0x0f0f }; static int vga_color[] ={ 7, 8, 2, 3, 4, 5, 9, 14, 12, 15, 13, 10, 11, 1, 6 }; static int pc_driver, pc_mode; static int graphics_on = FALSE, pc_graphics = FALSE; static int startx, starty, pc_lastx, pc_lasty, pc_colors; static int pc_angle, pc_hjustify, pc_vjustify, pc_text_size, pc_text_dir, pc_corscreen = -1; #ifdef __TURBOC__ extern int far _Cdecl SVGA_driver_far[]; #endif /* __TURBOC__ */ #ifdef __WATCOMC__ enum { HORIZ_DIR, VERT_DIR }; static void _settextang(int ang) { if (ang == HORIZ_DIR) { _settextorient(1, 0); } else { _settextorient(0, 1); } } #endif /* WATCOMC */ static int huge detect_svga() { return 0; /* the default mode, just a place holder */ } void PC_setup() { /* called from the beginning of main() */ int i, t, x, y; char pc_modename[9]; #ifdef __WATCOMC__ struct videoconfig VC; #endif /* WATCOMC */ /* First link all BRI dribers, then detect the display card. */ /* If environment PCTRM is set, try initiate the card/mode. */ /* special instruction on mode */ safe_strncpy(pc_modename, getenv("PCTRM"), 8); #ifdef __TURBOC__ /* Some of this code including BGI drivers are copyright Borland Intl. */ registerfarbgidriver(EGAVGA_driver_far); registerfarbgidriver(CGA_driver_far); registerfarbgidriver(Herc_driver_far); registerfarbgidriver(ATT_driver_far); registerfarbgidriver(PC3270_driver_far); pc_driver = DETECT; detectgraph(&pc_driver, &pc_mode); if (graphresult()) { fputs("Unable to initialize graphics.\n", stderr); return; } #ifdef BGI_NAME /* the highest standard pc_driver value, see graphics.h */ #define LAST_BGI 10 /* the last mode of the SVGA.BGI */ #define LAST_SVGA_MODE 6 /* test SVGA if we have VGA */ if ((pc_driver == VGA) && (pc_modename[0] == 'S')) { installuserdriver(BGI_NAME, &detect_svga); registerfarbgidriver(SVGA_driver_far); pc_driver = DETECT; initgraph(&pc_driver, &pc_mode, ""); /* The following code, which is independent of the actual SVGA.BGI * used, tries to find a mode of width defined in the environment * variable PCTRM */ if (pc_driver > LAST_BGI) { /* success */ sscanf(pc_modename, "S%d", &t); switch (t) { case 800: break; /* S800 */ case 1024: break; /* S1024 */ case 1280: break; /* S1280 */ default: t = 640; /* 640x480 */ } for (i = 0; i <= LAST_SVGA_MODE; i++) { setgraphmode(i); if ((getmaxx() + 1 == t) && (getmaxcolor() > 14)) pc_mode = i; } setgraphmode(pc_mode); if (graphresult()) { /* error, go back to VGA */ pc_driver = VGA; pc_mode = 4; } } } /* SVGA tested */ if (pc_driver <= LAST_BGI) #endif /* BGI_NAME */ initgraph(&pc_driver, &pc_mode, ""); pc_colors = getmaxcolor() + 1; pc_lastx = getmaxx(); pc_lasty = getmaxy(); restorecrtmode(); clrscr(); #endif /* __TURBOC__ */ #ifdef __WATCOMC__ _getvideoconfig(&VC); if ((pc_driver = VC.adapter) == 0) { fprintf(stderr, "Unable to initialize graphics.\n"); return; } switch (pc_driver = VC.adapter) { case _HERCULES: pc_mode = _HERCMONO; break; case _CGA: pc_mode = _HRESBW; break; case _MCGA: pc_mode = _MRES256COLOR; break; case _EGA: pc_mode = (VC.monitor == _MONO ? _ERESCOLOR : _ERESNOCOLOR); break; case _VGA: pc_mode = _VRES16COLOR; break; case _SVGA: if (pc_modename[0] == 'S') { /* test SVGA resolution */ sscanf(pc_modename, "S%d", &t); switch (t) { case 800: pc_mode = _SVRES256COLOR; break; /* S800 */ case 1024: pc_mode = _XRES256COLOR; break; /* S1024 */ case 1280: pc_mode = _XRES256COLOR + 2; break; /* S1280 */ /* Someone help me, who knows, how a newer Watcom calls that */ default: t = 640; pc_mode = _VRES256COLOR; /* 640x480 */ } while (_setvideomode(pc_mode) == 0) pc_mode--; } break; default: fputs("Unable to initialize graphics.\n", stderr); return; } _setvideomode(pc_mode); _getvideoconfig(&VC); pc_lastx = VC.numxpixels - 1; pc_lasty = VC.numypixels - 1; pc_colors = VC.numcolors; _setvideomode(_DEFAULTMODE); #endif /* WATCOMC */ x = pc_lastx + 1; y = pc_lasty + 1; fprintf(stderr, "\tScreen of %d x %d pixels and %d colors.\n", x, y, pc_colors); pc_graphics = TRUE; } TERM_PUBLIC void PC_init() { char *pathp; #ifdef __WATCOMC__ struct _fontinfo fi; #endif if (!pc_graphics) { fputs("Unable to initialize graphics.\n", stderr); term = 0; return; } /* Double the tic/font sizes. */ pc_text_size = (pc_lasty > 590) ? 2 : 1; term->h_char = PC_HCHAR; term->v_char = PC_VCHAR; term->h_tic = PC_HTIC * pc_text_size; term->v_tic = PC_VTIC * pc_text_size; term->xmax = pc_lastx + 1; term->ymax = pc_lasty + 1; #ifdef __TURBOC__ setgraphmode(pc_mode); settextstyle(DEFAULT_FONT, HORIZ_DIR, pc_text_size); settextjustify(pc_hjustify, pc_vjustify); term->h_char = textheight("X"); /* overriding the default */ term->v_char = textwidth("X"); /* overriding the default */ #endif /* __TURBOC__ */ #ifdef __WATCOMC__ _setvideomode(pc_mode); _settextang(HORIZ_DIR); _settextalign(pc_hjustify, pc_vjustify); _setcharsize(pc_text_size * PC_HCHAR, pc_text_size * PC_VCHAR); _getfontinfo(&fi); term->h_char = fi.avgwidth; term->v_char = fi.pixheight * 1.5; #endif /* WATCOMC */ #ifdef MSC #endif /* MSC */ } TERM_PUBLIC void PC_graphics() { graphics_on = TRUE; #ifdef __TURBOC__ setgraphmode(pc_mode); #endif /* __TURBOC__ */ #ifdef __WATCOMC__ _setvideomode(pc_mode); #endif /* WATCOMC */ #ifdef MSC if (pc_corscreen == -1) Vmode(18); /* VGA */ else { grinit(corscreen); grandtx(); } /* corolla */ #endif /* MSC */ } TERM_PUBLIC void PC_linetype(int linetype) { if (linetype < -2) linetype = LT_BLACK; if (pc_colors > 14) { /* 16 or more colors */ if (linetype >= 13) linetype %= 13; #ifdef __TURBOC__ setcolor(vga_color[linetype + 2]); #endif /* __TURBOC__ */ #ifdef __WATCOMC__ _setcolor(vga_color[linetype + 2]); #endif /* WATCOMC */ #ifdef MSC #endif /* MSC */ } else { /* MONO */ if (linetype >= 5) linetype %= 5; #ifdef __TURBOC__ setlinestyle(4, pattern[linetype + 2], 1); #endif /* __TURBOC__ */ #ifdef __WATCOMC__ _setlinestyle(pattern[linetype + 2]); #endif /* WATCOMC */ #ifdef MSC if (pc_corscreen != -1) Cor_mask(pattern[linetype + 2]); #endif /* MSC */ } } TERM_PUBLIC void PC_move(unsigned int x, unsigned int y) { #ifdef __TURBOC__ moveto(x, pc_lasty - y); #endif /* __TURBOC__ */ #ifdef __WATCOMC__ _moveto(x, pc_lasty - y); #endif /* WATCOMC */ #ifdef MSC #endif /* MSC */ startx = x; starty = y; } TERM_PUBLIC void PC_vector(unsigned int x, unsigned int y) { #ifdef __TURBOC__ lineto(x, pc_lasty - y); #endif /* __TURBOC__ */ #ifdef __WATCOMC__ _lineto(x, pc_lasty - y); #endif /* WATCOMC */ #ifdef MSC if (pc_corscreen != -1) Cor_line(startx, COR_YLAST - starty, x, COR_YLAST - y); #endif /* MSC */ startx = x; starty = y; } TERM_PUBLIC void PC_reset() { graphics_on = FALSE; #ifdef __TURBOC__ restorecrtmode(); clrscr(); #endif /* __TURBOC__ */ #ifdef __WATCOMC__ _setvideomode(_DEFAULTMODE); #endif /* WATCOMC */ #ifdef MSC Vmode(3); #endif /* MSC */ } TERM_PUBLIC void PC_text() { if (graphics_on) { graphics_on = FALSE; (void) getch(); #ifdef __TURBOC__ restorecrtmode(); clrscr(); #endif /* __TURBOC__ */ #ifdef __WATCOMC__ _setvideomode(_DEFAULTMODE); #endif /* WATCOMC */ #ifdef MSC if (pc_corscreen != -1) { grreset(); txonly(); } Vmode(3); #endif /* MSC */ } } TERM_PUBLIC int PC_text_angle(int ang) { switch (ang) { case 0: pc_text_dir = HORIZ_DIR; break; default: case 1: pc_text_dir = VERT_DIR; break; } return TRUE; } TERM_PUBLIC int PC_justify_text(enum JUSTIFY just) { #if defined(__TURBOC__) switch (just) { case LEFT: pc_hjustify = LEFT_TEXT; pc_vjustify = CENTER_TEXT; break; case CENTRE: pc_hjustify = CENTER_TEXT; pc_vjustify = CENTER_TEXT; break; case RIGHT: pc_hjustify = RIGHT_TEXT; pc_vjustify = CENTER_TEXT; break; } settextjustify(pc_hjustify, pc_vjustify); return 1; #elif defined(__WATCOMC__) switch (just) { case LEFT: pc_hjustify = _LEFT; pc_vjustify = _HALF; break; case CENTRE: pc_hjustify = _CENTER; pc_vjustify = _HALF; break; case RIGHT: pc_hjustify = _RIGHT; pc_vjustify = _HALF; break; } _settextalign(pc_hjustify, pc_vjustify); return 1; #else return (just == LEFT); #endif } TERM_PUBLIC void PC_put_text(unsigned int x, unsigned int y, const char *str) { #ifdef __TURBOC__ settextstyle(DEFAULT_FONT, pc_text_dir, pc_text_size); settextjustify(pc_hjustify, pc_vjustify); outtextxy(x, pc_lasty - y, str); #endif /* __TURBOC__ */ #ifdef __WATCOMC__ _setcharsize(pc_text_size * PC_VCHAR, pc_text_size * PC_HCHAR); _settextang(pc_text_dir); _settextalign(pc_hjustify, pc_vjustify); _grtext(x, pc_lasty - y, str); #endif /* WATCOMC */ #ifdef MSC #endif /* MSC */ } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(dospc_driver) "dospc", "IBM PC/Clone running DOS", PC_XMAX, PC_YMAX, PC_VCHAR, PC_HCHAR, PC_VTIC, PC_HTIC, options_null, PC_init, PC_reset, PC_text, null_scale, PC_graphics, PC_move, PC_vector, PC_linetype, PC_put_text, PC_text_angle, PC_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(dospc_driver) #undef LAST_TERM #define LAST_TERM dospc_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(dospc) "1 dospc", "?commands set terminal dospc", "?set terminal dospc", "?set term dospc", "?terminal dospc", "?term dospc", "?dospc", " The `dospc` terminal driver supports PCs with arbitrary graphics boards,", " which will be automatically detected. It should be used only if you are", " not using the gcc or Zortec C/C++ compilers." END_HELP(dospc) #endif /* TERM_HELP */ gnuplot-4.6.4/term/vws.trm0000644000471100001440000003607010705225361012452 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: vws.trm,v 1.19 2007/10/16 21:19:45 sfeam Exp $ * */ /* GNUPLOT - vws.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * AUTHORS * Walter Speth * BITNET: SPETH@DBNPIB5 * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) * adapted to VAX VMS 4.7, VAX C 2.4 and activated the INTENSITY and COLOR * monitor features (Lucas P. Hart, June 1997) */ #include "driver.h" #ifdef TERM_REGISTER register_term(vws) #endif #ifdef TERM_PROTO TERM_PUBLIC void VWS_init __PROTO((void)); TERM_PUBLIC void VWS_reset __PROTO((void)); TERM_PUBLIC void VWS_graphics __PROTO((void)); TERM_PUBLIC void VWS_text __PROTO((void)); TERM_PUBLIC void VWS_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void VWS_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void VWS_linetype __PROTO((int lt)); TERM_PUBLIC void VWS_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int VWS_text_angle __PROTO((int ang)); TERM_PUBLIC int VWS_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void VWS_point __PROTO((unsigned int x, unsigned int y, int point)); TERM_PUBLIC void VWS_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); #define VWS_XMAX 1024 #define VWS_YMAX 780 /* VAXstation 2000 is 864 */ #define VWS_VCHAR 25 #define VWS_HCHAR 15 #define VWS_VTIC 10 #define VWS_HTIC 10 #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY void VWS_resize_ast __PROTO((void)); #include /* */ #include #include #include #define DEFAULT_ATTR 0 #define OVER_ATTR 1 #define ERAS_ATTR 2 #define BIS_ATTR 3 #define COLOR_ATTR 4 #define TEXT_ATTR 5 #define LINE_ATTR 6 #define BACK_ATTR 7 float current_x, current_y; int vd_id, wd_id; int vcm_id, ws_type; static $DESCRIPTOR(ws_devname, "SYS$WORKSTATION"); static $DESCRIPTOR(vd_title, "gnuplot"); static float x0, y0, xsiz, ysiz, wc_xmin_new, wc_ymin_new, wc_xmax_new, wc_ymax_new, wc_xmin, wc_ymin, wc_xmax, wc_ymax, vd_width, vd_height; void VWS_resize_ast() { uis$resize_window(&vd_id, &wd_id, &x0, &y0, &xsiz, &ysiz, &wc_xmin, &wc_ymin, &wc_xmax, &wc_ymax); replotrequest(); } /****************************************************************************/ TERM_PUBLIC void VWS_init() { int i; int cattr; $DESCRIPTOR(a_font, "DTABER0003WK00PG0001UZZZZ02A000"); const int i0 = 0, i1 = 1, i2 = 2, i3 = 3, i4 = 4, i5 = 5, i6 = 6, i7 = 7, i8 = 8; const float p0 = 0.0, p1 = 0.1, p2 = 0.2, p3 = 0.3, p4 = 0.4; const float p5 = 0.5, p6 = 0.6, p7 = 0.7, p8 = 0.8, p9 = 0.9; const int n1 = 0xFFFFFFFF; const int uis$c_mode_over = UIS$C_MODE_OVER; const int uis$c_mode_eras = UIS$C_MODE_ERAS; const int uis$c_mode_bis = UIS$C_MODE_BIS; const float vws_hchar = (float) VWS_HCHAR; const float vws_vchar = (float) VWS_VCHAR; const int default_attr = DEFAULT_ATTR; const int over_attr = OVER_ATTR; const int eras_attr = ERAS_ATTR; const int bis_attr = BIS_ATTR; const int color_attr = COLOR_ATTR; const int text_attr = TEXT_ATTR; const int line_attr = LINE_ATTR; const int back_attr = BACK_ATTR; /* lph: the similar notation may lead to some confusion * attributes are grouped in "attribute block" data structures * which are referenced by block number * attribute block 0 contains default attribute settings * * To customize settings, a function will read the source * attribute block, set the particular attribute, and * write to the destination attribute block. * Both the block number and attribute are integers, so it * is easy to confuse an attribute and an attribute blcok */ /* lph: Color map corresponding to an example in * MicroVMS Graphics Progamming Guide (V3.0) */ const float r_map[8] = { 0.40, 0.50, 0.50, 0.00, 0.25, 0.90, 0.80, 0.35 }; const float g_map[8] = { 0.30, 0.50, 0.25, 0.70, 0.25, 0.50, 0.30, 0.65 }; const float b_map[8] = { 0.00, 0.50, 0.50, 0.30, 0.90, 0.00, 0.00, 0.95 }; /* the array format is easier to customize */ vd_width = 14; vd_height = 10; /* aspect sqrt(2) as DIN A paper */ wc_xmin = 0.0; wc_ymin = 0.0; wc_xmax = (float) VWS_XMAX; wc_ymax = (float) VWS_YMAX; vcm_id = uis$create_color_map(&i8); vd_id = uis$create_display(&wc_xmin, &wc_ymin, &wc_xmax, &wc_ymax, &vd_width, &vd_height, &vcm_id); uis$get_hw_color_info(&ws_devname, &ws_type); /* lph: ws's color table for monochrome */ /* by default, color table index 0 is backgound, and 1 is foregound */ /* a color {index into the color table} is assigned to the active line */ /* in VWS_linetype */ if (ws_type == UIS$C_DEV_MONO) { uis$set_color(&vd_id, &i0, &p5, &p5, &p5); uis$set_color(&vd_id, &i1, &p0, &p0, &p0); uis$set_color(&vd_id, &i2, &p0, &p0, &p0); uis$set_color(&vd_id, &i3, &p0, &p0, &p0); uis$set_color(&vd_id, &i4, &p0, &p0, &p0); uis$set_color(&vd_id, &i5, &p0, &p0, &p0); uis$set_color(&vd_id, &i6, &p0, &p0, &p0); uis$set_color(&vd_id, &i7, &p0, &p0, &p0); } else if (ws_type == UIS$C_DEV_INTENSITY) { /* Intensity scale, untested */ uis$set_color(&vd_id, &i2, &p2, &p2, &p2); uis$set_color(&vd_id, &i3, &p3, &p3, &p3); uis$set_color(&vd_id, &i4, &p4, &p4, &p4); uis$set_color(&vd_id, &i5, &p5, &p5, &p5); uis$set_color(&vd_id, &i6, &p6, &p6, &p6); uis$set_color(&vd_id, &i7, &p7, &p7, &p7); } /* ws: perhaps better for color terms (which I do not have) */ else if (ws_type == UIS$C_DEV_COLOR) { /* */ uis$set_color(&vd_id, &i0, &p0, &p0, &p0); uis$set_color(&vd_id, &i1, &p9, &p0, &p0); uis$set_color(&vd_id, &i2, &p0, &p9, &p0); uis$set_color(&vd_id, &i3, &p9, &p9, &p0); uis$set_color(&vd_id, &i4, &p0, &p0, &p9); uis$set_color(&vd_id, &i5, &p9, &p0, &p9); uis$set_color(&vd_id, &i6, &p0, &p9, &p9); uis$set_color(&vd_id, &i7, &p9, &p9, &p9); /* * lph: Another way to set up the color table is to use arrays, * which simplifies customizing the appearance. * uis$set_colors(&vd_id, &i0, &i8, &r_map, &g_map, &b_map); */ } uis$disable_display_list(&vd_id); wd_id = uis$create_window(&vd_id, &ws_devname, &vd_title, &wc_xmin, &wc_ymin, &wc_xmax, &wc_ymax, &vd_width, &vd_height); uis$set_resize_ast(&vd_id, &wd_id, &VWS_resize_ast, &i0, &x0, &y0, &xsiz, &ysiz, &wc_xmin_new, &wc_ymin_new, &wc_xmax_new, &wc_ymax_new); /* * lph: This sets up three different attribute blocks, each having a different * mode, but they are never utilized and it is not clear when they might * be of use. * The attribute blocks used for writing are line_attr, text_attr. * uis$set_writing_mode(&vd_id, &default_attr, &over_attr, &uis$c_mode_over); uis$set_writing_mode(&vd_id, &default_attr, &eras_attr, &uis$c_mode_eras); uis$set_writing_mode(&vd_id, &default_attr, &bis_attr, &uis$c_mode_bis); */ /* lph: this was commented out; it changes the COLOR_ATTR BLOCK and * the following BLOCKS * if (ws_type >= UIS$C_DEV_INTENSITY) { for (i=0; i<8; i++) { cattr = COLOR_ATTR+i; uis$set_writing_index(&vd_id, &default_attr, &cattr, &i); } } * */ /* lph: default value for the background index into the virtual color * table is 0, and the back_attr block is never used * uis$set_background_index(&vd_id, &default_attr, &back_attr, &i0); * * the rest look OK, setting up the two attribute blocks */ uis$set_writing_mode(&vd_id, &default_attr, &text_attr, &uis$c_mode_over); uis$set_font(&vd_id, &text_attr, &text_attr, &a_font); uis$set_char_size(&vd_id, &text_attr, &text_attr, &i0, &vws_hchar, &vws_vchar); uis$set_line_style(&vd_id, &line_attr, &line_attr, &n1); } /****************************************************************************/ TERM_PUBLIC void VWS_reset() { uis$delete_display(&vd_id); } /****************************************************************************/ TERM_PUBLIC void VWS_graphics() { uis$erase(&vd_id, &wc_xmin, &wc_ymin, &wc_xmax, &wc_ymax); } /****************************************************************************/ TERM_PUBLIC void VWS_text() { } /****************************************************************************/ TERM_PUBLIC void VWS_move(unsigned int x, unsigned int y) { current_x = (float) (x); current_y = (float) (y); } /****************************************************************************/ TERM_PUBLIC void VWS_vector(unsigned int x, unsigned int y) { int col; int line_attr = LINE_ATTR; float fx, fy; fx = (float) x; fy = (float) y; uis$line(&vd_id, &line_attr, ¤t_x, ¤t_y, &fx, &fy); VWS_move(x, y); } /****************************************************************************/ TERM_PUBLIC void VWS_linetype(int lt) { const int n1 = 0xFFFFFFFF; /* indices into the color map */ const int i[8] = {0, 1, 2, 3, 4, 5, 6, 7}; const float p15 = 2.0, p20 = 3.0, p10 = 1.0; long int lstyle[9] = {0xffffffff, 0Xff00ff00, 0xffffff00, 0xffff0000, 0xf0f0f0f0, 0Xfff0fff0, 0xf000f000, 0xa5a5a5af, 0xf00f00f0 }; int line_attr = LINE_ATTR; /* use multiplier of normal line width; default is width in pixels */ const int uis$c_width_world = UIS$C_WIDTH_WORLD; if (lt < 0) { switch (lt) { case LT_AXIS: /* used for axis */ uis$set_line_style(&vd_id, &line_attr, &line_attr, &n1); uis$set_line_width(&vd_id, &line_attr, &line_attr, &p15, &uis$c_width_world); if (ws_type >= UIS$C_DEV_INTENSITY) { uis$set_writing_index(&vd_id, &line_attr, &line_attr, &i[1]); } break; case LT_BLACK: /* the borders */ uis$set_line_style(&vd_id, &line_attr, &line_attr, &n1); uis$set_line_width(&vd_id, &line_attr, &line_attr, &p20, &uis$c_width_world); if (ws_type >= UIS$C_DEV_INTENSITY) { uis$set_writing_index(&vd_id, &line_attr, &line_attr, &i[1]); } break; default: /* else a thick line ? */ uis$set_line_style(&vd_id, &line_attr, &line_attr, &n1); uis$set_line_width(&vd_id, &line_attr, &line_attr, &p20, &uis$c_width_world); if (ws_type >= UIS$C_DEV_INTENSITY) { uis$set_writing_index(&vd_id, &line_attr, &line_attr, &i[1 + ((-lt) % 7)]); } break; } } else { /* assign the color index (excluding the background index, 0*/ if (ws_type >= UIS$C_DEV_INTENSITY) { uis$set_writing_index(&vd_id, &line_attr, &line_attr, &i[1 + lt % 7]); } /* assign the line style uis$set_line_style(&vd_id,&line_attr,&line_attr,&lstyle[lt % 8]); * ws: makes part of curve disappear on my workstation * lph: also observed w/ VS2000 and 4 plane graphics coprocesssor; line * types change appropriately, but has problems as pixels/line segment * decreases. Better with full screen display and "set samples" smaller * but start out with only solid lines */ uis$set_line_style(&vd_id, &line_attr, &line_attr, &n1); uis$set_line_width(&vd_id, &line_attr, &line_attr, &p10, &uis$c_width_world); } } /****************************************************************************/ static int justify_mode = CENTRE, up; TERM_PUBLIC void VWS_put_text(unsigned int x, unsigned int y, const char *str) { float fx, fy, thih, twid; int text_attr = TEXT_ATTR; /* uis$text parameter is descriptor string not character string */ struct dsc$descriptor_s textline = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, ""}; textline.dsc$a_pointer = str; textline.dsc$w_length = strlen(textline.dsc$a_pointer); uis$measure_text(&vd_id, &text_attr, &textline, &twid, &thih); fx = (float) x; fy = (float) y; switch (justify_mode) { case LEFT: fy += thih / 2.; break; case RIGHT: fy += thih / 2.; fx -= twid; break; case CENTRE: fy += thih / 2.; fx -= twid / 2; break; }; uis$text(&vd_id, &text_attr, &textline, &fx, &fy); /* write to Example Viewport window */ } /****************************************************************************/ TERM_PUBLIC int VWS_text_angle(int ang) { float degrees; int text_attr = TEXT_ATTR; up = (ang ? 1 : 0); degrees = 90. * up; uis$set_text_slope(&vd_id, &text_attr, &text_attr, °rees); return TRUE; } /****************************************************************************/ TERM_PUBLIC int VWS_justify_text(enum JUSTIFY mode) { justify_mode = mode; return TRUE; } /****************************************************************************/ TERM_PUBLIC void VWS_point(unsigned int x, unsigned int y, int point) { do_point(x, y, point); } /****************************************************************************/ TERM_PUBLIC void VWS_arrow( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { do_arrow(sx, sy, ex, ey, head); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(vws_driver) "VWS", "VAX Windowing System (UIS)", VWS_XMAX, VWS_YMAX, VWS_VCHAR, VWS_HCHAR, VWS_VTIC, VWS_HTIC, options_null, VWS_init, VWS_reset, VWS_text, null_scale, VWS_graphics, VWS_move, VWS_vector, VWS_linetype, VWS_put_text, VWS_text_angle, VWS_justify_text, do_point, do_arrow, set_font_null TERM_TABLE_END(vws_driver) #undef LAST_TERM #define LAST_TERM vws_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(VWS) "1 VWS", "?commands set terminal VWS", "?set terminal VWS", "?set term VWS", "?terminal VWS", "?term VWS", "?VWS", " The `VWS` terminal driver supports the VAX Windowing System. It has", " no options. It will sense the display type (monochrome, gray scale,", " or color.) All line styles are plotted as solid lines." END_HELP(VWS) #endif /* TERM_HELP */ gnuplot-4.6.4/term/sun.trm0000644000471100001440000002206711002270027012427 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: sun.trm,v 1.14 2008/04/19 04:07:51 sfeam Exp $ * */ /* GNUPLOT - sun.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * SUNview windowing system * * AUTHORS * Maurice Castro * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(sun) #endif #ifdef TERM_PROTO TERM_PUBLIC void SUN_init __PROTO((void)); TERM_PUBLIC void SUN_graphics __PROTO((void)); TERM_PUBLIC void SUN_text __PROTO((void)); TERM_PUBLIC void SUN_linetype __PROTO((int linetype)); TERM_PUBLIC void SUN_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void SUN_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void SUN_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int SUN_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void SUN_reset __PROTO((void)); #define SUN_XMAX 600 #define SUN_YMAX 512 #define SUN_VCHAR (12) /* default, will be changed */ #define SUN_HCHAR (8) /* default, will be changed */ #define SUN_VTIC (SUN_YMAX/80) #define SUN_HTIC (SUN_XMAX/80) #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include #include #include #include #include void sun_setmaskpixel __PROTO((unsigned int x, unsigned int y, unsigned int value)); void sun_line __PROTO((unsigned int x1, unsigned int x2, unsigned int y1, unsigned int y2)); static Notify_value local_notice_destroy __PROTO((Frame frame, Destroy_status status)); #define MARGIN 5 #define MINWIN 128 static Frame frame; static Canvas SUN_canvas; static Pixwin *pw; static struct pixfont *sun_font = NULL; static enum JUSTIFY sun_justify = LEFT; static Notify_value local_notice_destroy(); extern Notify_error notify_dispatch(); /* dotted line generator */ unsigned int sun_value = 1; /* this can be used for colour */ unsigned int sun_line_mask = 0xffff; /* 16 bit mask for dotted lines */ static unsigned int sun_pattern[] = {0xffff, 0x1111, 0xffff, 0x5555, 0x3333, 0x7777, 0x3f3f, 0x0f0f, 0x5f5f}; int sun_mask_count = 0; unsigned int sun_lastx, sun_lasty; /* last pixel set - used by sun_line */ TERM_PUBLIC void SUN_init() { struct termentry *t = term; struct pr_subregion bound; frame = window_create(NULL, FRAME, FRAME_LABEL, "Gnuplot", 0); notify_interpose_destroy_func(frame, local_notice_destroy); SUN_canvas = window_create(frame, CANVAS, CANVAS_AUTO_EXPAND, TRUE, CANVAS_AUTO_SHRINK, TRUE, CANVAS_MARGIN, MARGIN, 0); notify_do_dispatch(); pw = canvas_pixwin(SUN_canvas); window_set(frame, WIN_SHOW, TRUE, 0); /* figure out font and rough size */ sun_font = pf_default(); pf_textbound(&bound, 1, sun_font, "M"); t->v_char = bound.size.y; t->h_char = bound.size.x; return; } TERM_PUBLIC void SUN_graphics() { term->xmax = (int) window_get(SUN_canvas, CANVAS_WIDTH); term->ymax = (int) window_get(SUN_canvas, CANVAS_HEIGHT); pw_writebackground(pw, 0, 0, term->xmax, term->ymax, PIX_SRC); notify_dispatch(); /* do not let the user make the window too small */ if ((term->xmax) < MINWIN) { window_set(frame, WIN_WIDTH, MINWIN + 2 * MARGIN + 24, 0); notify_dispatch(); SUN_graphics(); } if ((term->ymax) < MINWIN) { window_set(frame, WIN_HEIGHT, MINWIN + 2 * MARGIN + 24, 0); notify_dispatch(); SUN_graphics(); } notify_dispatch(); return; } TERM_PUBLIC void SUN_text() { notify_dispatch(); return; /* enter text from another window!!! */ } TERM_PUBLIC void SUN_linetype(int linetype) { if (linetype < -2) linetype = LT_BLACK; if (linetype >= 7) linetype %= 7; sun_line_mask = sun_pattern[linetype + 2]; sun_mask_count = 0; } TERM_PUBLIC void SUN_move(unsigned int x, unsigned int y) { sun_lastx = x; sun_lasty = y; notify_dispatch(); return; } TERM_PUBLIC void SUN_vector(unsigned int x, unsigned int y) { if ((x >= term->xmax) || (y >= term->ymax)) return; sun_line(sun_lastx, x, sun_lasty, y); canvas_pixwin(SUN_canvas); notify_dispatch(); return; } TERM_PUBLIC void SUN_put_text(unsigned int x, unsigned int y, const char *str) { struct pr_subregion bound; if ((x >= term->xmax) || (y >= term->ymax)) return; pf_textbound(&bound, strlen(str), sun_font, str); y = term->ymax - 1 - y + bound.size.y / 3; /* vertical centering */ switch (sun_justify) { case LEFT: break; case CENTRE: x -= bound.size.x / 2; break; case RIGHT: x -= bound.size.x; break; } pw_text(pw, x, y, PIX_SRC | PIX_DST, 0, str); canvas_pixwin(SUN_canvas); notify_dispatch(); return; } TERM_PUBLIC int SUN_justify_text(enum JUSTIFY mode) { sun_justify = mode; return (TRUE); } TERM_PUBLIC void SUN_reset() { term->xmax = SUN_XMAX; term->ymax = SUN_YMAX; window_set(frame, WIN_SHOW, FALSE, 0); return; } void sun_setmaskpixel(unsigned int x, unsigned int y, unsigned int value) { /* dotted line generator */ if ((sun_line_mask >> sun_mask_count) & (unsigned int) (1)) { pw_put(pw, x, term->ymax - 1 - y, sun_value); } sun_mask_count = (sun_mask_count + 1) % 16; sun_lastx = x; /* last pixel set with mask */ sun_lasty = y; } void sun_line(unsigned int x1, unsigned int x2, unsigned int y1, unsigned int y2) { int runcount; int dx, dy; int xinc, yinc; unsigned int xplot, yplot; runcount = 0; dx = ABS((int) (x1) - (int) (x2)); if (x2 > x1) xinc = 1; if (x2 == x1) xinc = 0; if (x2 < x1) xinc = -1; dy = ABS((int) (y1) - (int) (y2)); if (y2 > y1) yinc = 1; if (y2 == y1) yinc = 0; if (y2 < y1) yinc = -1; xplot = x1; yplot = y1; if (dx > dy) { /* iterate x */ if ((sun_line_mask == 0xffff) || ((xplot != sun_lastx) && (yplot != sun_lasty))) sun_setmaskpixel(xplot, yplot, sun_value); while (xplot != x2) { xplot += xinc; runcount += dy; if (runcount >= (dx - runcount)) { yplot += yinc; runcount -= dx; } sun_setmaskpixel(xplot, yplot, sun_value); } } else { /* iterate y */ if ((sun_line_mask == 0xffff) || ((xplot != sun_lastx) && (yplot != sun_lasty))) sun_setmaskpixel(xplot, yplot, sun_value); while (yplot != y2) { yplot += yinc; runcount += dx; if (runcount >= (dy - runcount)) { xplot += xinc; runcount -= dy; } sun_setmaskpixel(xplot, yplot, sun_value); } } } static Notify_value local_notice_destroy(Frame frame, Destroy_status status) { if (status != DESTROY_CHECKING) { SUN_reset(); /* extern TBOOLEAN term_init is gone; is it sufficient just */ /* to comment it out? -lh */ /* term_init = FALSE; */ } return (NOTIFY_DONE); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(sun_driver) "sun", "SunView window system", SUN_XMAX, SUN_YMAX, SUN_VCHAR, SUN_HCHAR, SUN_VTIC, SUN_HTIC, options_null, SUN_init, SUN_reset, SUN_text, null_scale, SUN_graphics, SUN_move, SUN_vector, SUN_linetype, SUN_put_text, null_text_angle, SUN_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(sun_driver) #undef LAST_TERM #define LAST_TERM sun_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(sun) "1 sun", "?commands set terminal sun", "?set terminal sun", "?set term sun", "?terminal sun", "?term sun", "?sun", " The `sun` terminal driver supports the SunView window system. It has no", " options." END_HELP(sun) #endif gnuplot-4.6.4/term/aquaterm.trm0000644000471100001440000007140012112760350013442 0ustar /* -*- objc -*- * $Id: aquaterm.trm,v 1.43.2.4 2013/02/25 06:06:10 sfeam Exp $ * */ /* GNUPLOT - aquaTerm.trm */ /* * This file is included by ../term.c via ../term.h. * * This terminal driver supports: * Aqua (Mac OS X/Cocoa) * * AUTHORS * Per Persson from openstep.trm by Robert Lutwak * * Homepage: http://aquaterm.sourceforge.net * send your comments or suggestions to (persquare@users.sourceforge.net). * * This terminal attempts to connect, via the Mac OS X Distributed * Objects system, to the "aquatermServer." If there is no such * service registered with the OS, the terminal attempts to fire * up AquaTerm.app. If the user has not set the environment variable * AQUATERM_PATH, the terminal searches for AquaTerm.app in standard * locations like /Applications, ~/Applications, etc. * In order to use this filter, you MUST have AquaTerm.app installed * on your system. * * Once connected to the server, all gnuplot graphs are sent, * via the D.O. system, to AquaTerm.app, which produces renders graphs, * manages the windows, takes care of printing etc. * */ #include "driver.h" #ifdef TERM_REGISTER register_term(aqua) #endif #ifdef TERM_PROTO /* Required entries */ TERM_PUBLIC void AQUA_options __PROTO((void)); TERM_PUBLIC void AQUA_init __PROTO((void)); TERM_PUBLIC void AQUA_reset __PROTO((void)); TERM_PUBLIC void AQUA_text __PROTO((void)); TERM_PUBLIC void AQUA_graphics __PROTO((void)); TERM_PUBLIC void AQUA_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void AQUA_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void AQUA_linetype __PROTO((int linetype)); TERM_PUBLIC void AQUA_put_text __PROTO((unsigned int x, unsigned int y,const char *str)); /* Optional entries */ TERM_PUBLIC int AQUA_text_angle __PROTO((int)); TERM_PUBLIC int AQUA_justify_text __PROTO((enum JUSTIFY)); TERM_PUBLIC int AQUA_set_font __PROTO((const char *font)); /* "font,size" */ TERM_PUBLIC void AQUA_set_pointsize __PROTO((double size)); /* notification of set pointsize */ TERM_PUBLIC void AQUA_point __PROTO((unsigned int, unsigned int, int)); TERM_PUBLIC int flags; /* various flags */ TERM_PUBLIC void AQUA_suspend __PROTO((void)); /* after one plot of multiplot */ TERM_PUBLIC void AQUA_resume __PROTO((void)); /* before subsequent plot of multiplot */ TERM_PUBLIC void AQUA_boxfill __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); /* clear part of multiplot */ TERM_PUBLIC void AQUA_linewidth __PROTO((double linewidth)); TERM_PUBLIC void AQUA_pointsize __PROTO((double pointsize)); TERM_PUBLIC int AQUA_make_palette __PROTO((t_sm_palette *palette)); TERM_PUBLIC void AQUA_previous_palette __PROTO((void)); TERM_PUBLIC void AQUA_set_color __PROTO((t_colorspec *)); TERM_PUBLIC void AQUA_filled_polygon __PROTO((int points, gpiPoint *corners)); TERM_PUBLIC void AQUA_image __PROTO((unsigned, unsigned, coordval *, gpiPoint *, t_imagecolor)); TERM_PUBLIC void ENHAQUA_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC void ENHAQUA_open __PROTO((char * fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint)); TERM_PUBLIC void ENHAQUA_flush __PROTO((void)); TERM_PUBLIC void ENHAQUA_writec __PROTO((int c)); /* End of entries */ #define AQUA_RESOLUTION (20.0) /* Increase resolution */ #define AQUA_XMAX (11.75 * 72 * AQUA_RESOLUTION) /* = paper width (in) times screen resolution */ #define AQUA_YMAX (8.25 * 72 * AQUA_RESOLUTION) /* = paper height (in) times screen resolution */ #define AQUA_VTIC (8.0*AQUA_RESOLUTION) #define AQUA_HTIC (8.0*AQUA_RESOLUTION) #define AQUA_VCHAR (16.0*AQUA_RESOLUTION) /* default font is Times at 14 points */ #define AQUA_HCHAR (AQUA_VCHAR*6.0/10.0) #define AQUA_DASH_PATTERNS 8 #define AQUA_DEFAULT_DASHLENGTH_FACTOR 0.5 #define SPECIAL_COLORS 4 #define CYCLIC_COLORS 9 #define GOT_AQUA_PROTO #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #import #import #import #import #import #import /* Debugging extras */ static inline void NOOP_(id x, ...) {;} #ifdef LOGGING #define LOG NSLog #else #define LOG NOOP_ #endif /* LOGGING */ /* AquaTerm specific */ static NSAutoreleasePool *arpool; static NSAutoreleasePool *loopPool; static AQTAdapter *adapter; /* Supported features */ static TBOOLEAN AQUA_hasAlphaSupport = FALSE; /* Internal state */ static int AQUA_plotRef = 0; /* A ref to the current plot */ static char AQUA_title[MAX_LINE_LEN + 1] = "Figure 0"; /* Plot title (in windowbar) */ static unsigned int AQUA_xSize = AQUA_XMAX; /* plot horizontal size */ static unsigned int AQUA_ySize = AQUA_YMAX; /* plot vertical size*/ static int AQUA_LineType = LT_UNDEFINED; /* current line type*/ static float AQUA_LineWidth = 1.0; /* current line width*/ static float AQUA_TextAngle = 0.0; /* current text orientation*/ static enum JUSTIFY AQUA_TextJust = LEFT; /* current text justification*/ /* default text font family: */ static char AQUA_fontNameDef[MAX_ID_LEN + 1] = "Times-Roman"; static double AQUA_fontSizeDef = 14; /* default text size*/ /* current text font family: */ static char AQUA_fontNameCur[MAX_ID_LEN + 1] = "Times-Roman"; static double AQUA_fontSizeCur = 14; /* current text size*/ /* dash patterns */ static TBOOLEAN AQUA_dashedlines = FALSE; static float AQUA_dashlength_factor = AQUA_DEFAULT_DASHLENGTH_FACTOR; static int AQUA_dashPatternLengths[AQUA_DASH_PATTERNS] = {0, 2, 2, 2, 4, 4, 4, 6}; static int AQUA_dashPatterns[AQUA_DASH_PATTERNS][6] = { {0, 0, 0, 0, 0, 0}, {8, 8, 0, 0, 0, 0}, {4, 6, 0, 0, 0, 0}, {2, 3, 0, 0, 0, 0}, {12, 4, 2, 4, 0, 0}, {6, 6, 2, 6, 0, 0}, {4, 4, 4, 12, 0, 0}, {1, 4, 12, 4, 1, 4} }; /* Helper functions */ static NSString* AQUA_convert_using_encoding __PROTO((const char *string)); /* * ---------------------------------------------------------------- * Aquaterm driver implementation * ---------------------------------------------------------------- * * Current options are: * title "theTitle" size fname "fontface" fsize */ TERM_PUBLIC void AQUA_options() { char *s; TBOOLEAN set_number = FALSE; AQUA_title[0] = '\0'; /* Force re-interpretation of title string */ while (!END_OF_COMMAND) { if (almost_equals(c_token, "ti$tle")) { c_token++; if (!(s = try_to_get_string())) int_error(c_token,"fname: expecting plot title"); strncpy(AQUA_title,s,sizeof(AQUA_title)); free(s); continue; } if (almost_equals(c_token, "s$ize")) { double value; c_token++; if (END_OF_COMMAND) int_error(c_token,"expecting x size"); value = real_expression(); if (value < 2 || value > 2048) int_error(c_token,"x size out of range"); AQUA_xSize = (unsigned int) value * AQUA_RESOLUTION; if (END_OF_COMMAND) int_error(c_token,"expecting y size"); if (equals(c_token, ",")) c_token++; value = real_expression(); if (value < 2 || value > 2048) int_error(c_token,"y size out of range"); AQUA_ySize = (unsigned int) value * AQUA_RESOLUTION; continue; } if (almost_equals(c_token, "fn$ame") || almost_equals(c_token, "font")) { char *comma; c_token++; if (!(s = try_to_get_string())) int_error(c_token,"expecting font specifier"); comma = strrchr(s, ','); if (comma && (1 == sscanf(comma+1, "%lf", &AQUA_fontSizeCur))) *comma = '\0'; if (*s) strncpy(AQUA_fontNameCur, s, sizeof(AQUA_fontNameCur)); free(s); continue; } if (almost_equals(c_token, "fs$ize")) { c_token++; if (END_OF_COMMAND) int_error(c_token,"expecting font size"); AQUA_fontSizeCur = real_expression(); continue; } if (equals(c_token, "solid")) { c_token++; AQUA_dashedlines = FALSE; continue; } if (almost_equals(c_token, "dash$ed")) { c_token++; AQUA_dashedlines = TRUE; continue; } if (equals(c_token, "dl") || almost_equals(c_token, "dashl$ength")) { c_token++; if (END_OF_COMMAND) int_error(c_token, "expecting dashlength multiplier"); AQUA_dashlength_factor = real_expression(); if (AQUA_dashlength_factor < 0.0) AQUA_dashlength_factor = AQUA_DEFAULT_DASHLENGTH_FACTOR; continue; } if (almost_equals(c_token, "enh$anced")) { term->put_text = ENHAQUA_put_text; c_token++; term->flags |= TERM_ENHANCED_TEXT; continue; } if (almost_equals(c_token, "noenh$anced")) { term->put_text = AQUA_put_text; c_token++; term->flags &= ~TERM_ENHANCED_TEXT; continue; } if (!set_number) { /* plot ref number*/ AQUA_plotRef = int_expression(); set_number = TRUE; continue; } int_error(c_token, "unexpected text at end of command"); } if (AQUA_title[0]=='\0') /* always set title */ sprintf(AQUA_title, "Figure %d", AQUA_plotRef); /* Save options back into options string in normalized format */ sprintf(term_options, "%d title \"%s\" size %d,%d font \"%s,%g\" %s %s", AQUA_plotRef, AQUA_title, (unsigned int) (AQUA_xSize/AQUA_RESOLUTION), (unsigned int) (AQUA_ySize/AQUA_RESOLUTION), AQUA_fontNameCur, AQUA_fontSizeCur, term->put_text == ENHAQUA_put_text?"enhanced":"noenhanced", AQUA_dashedlines?"dashed":"solid"); if (AQUA_dashedlines) sprintf(&(term_options[strlen(term_options)]), " dl %3.1f", AQUA_dashlength_factor); } static NSString* AQUA_convert_using_encoding(const char *string) { static bool didCheckEncodingSupport = false; static bool hasStringEncodingSupport = false; NSStringEncoding currentEncoding; NSString *translatedString; /* Check encoding support in system on first call */ if(!didCheckEncodingSupport) { didCheckEncodingSupport = true; hasStringEncodingSupport = [NSString respondsToSelector:@selector(stringWithCString:encoding:)]; } /* Set encoding as requested by user via "set encoding" */ switch(encoding){ case S_ENC_ISO8859_1: currentEncoding = NSISOLatin1StringEncoding; break; case S_ENC_ISO8859_2: currentEncoding = NSISOLatin2StringEncoding; break; case S_ENC_ISO8859_9: currentEncoding = NSWindowsCP1254StringEncoding; break; case S_ENC_CP1250: currentEncoding = NSWindowsCP1250StringEncoding; break; /* FIXME: Add more encodings... */ case S_ENC_DEFAULT: /* Fallthrough */ default : /* UTF8 is 'default' */ currentEncoding = NSUTF8StringEncoding; break; } /* Perform translation (into UTF8 encoding used by Mac OS X) */ if (hasStringEncodingSupport) { translatedString = [NSString stringWithCString:string encoding:currentEncoding]; } else { translatedString = [NSString stringWithCString:string]; } /* Check for nil result before returning */ return translatedString?translatedString:@""; } TERM_PUBLIC void AQUA_init() { float fontSize, fontWHRatio; NSString *title; LOG(@"Aqua Init (open plot)"); if (arpool == NULL) { /* FIXME: This should be removed when pools are handled in gnuplot proper */ arpool = [[NSAutoreleasePool alloc] init]; } if (adapter == NULL) { adapter = [[AQTAdapter alloc] init]; if (!adapter) { /* server could be invalid (=nil) for several reasons */ /* FIXME: Issue warning here? */ } } /* Must open plot before all other commands */ [adapter openPlotWithIndex:AQUA_plotRef]; /* Check for support of version-dependent features */ AQUA_hasAlphaSupport = [AQTAdapter instancesRespondToSelector:@selector(setColorRed:green:blue:alpha:)]; /* set xmax, ymax*/ term->xmax = AQUA_xSize; term->ymax = AQUA_ySize; /* set current font*/ [adapter setFontname:AQUA_convert_using_encoding(AQUA_fontNameCur)]; [adapter setFontsize:AQUA_fontSizeCur]; /* set h_char, v_char*/ term->h_char = (int) (AQUA_fontSizeCur * 0.6 * AQUA_RESOLUTION); term->v_char = (int) (AQUA_fontSizeCur * 1.5 * AQUA_RESOLUTION); /* set h_tic, v_tic*/ term->h_tic = term->v_char / 3; term->v_tic = term->v_char / 3; [adapter setPlotSize:NSMakeSize(AQUA_xSize/AQUA_RESOLUTION, AQUA_ySize/AQUA_RESOLUTION)]; [adapter setPlotTitle:AQUA_convert_using_encoding(AQUA_title)]; /* * Set up the basic indexed colormap for gnuplot */ /* Special colors */ [adapter setColormapEntry:0 red:0.1 green:0.1 blue:0.1]; /* linetype -4 */ [adapter setColormapEntry:1 red:0.9 green:0.9 blue:0.9]; /* linetype -3 (xor;interactive) light gray */ [adapter setColormapEntry:2 red:0.0 green:0.0 blue:0.0]; /* linetype -2 (border) black */ [adapter setColormapEntry:3 red:0.8 green:0.8 blue:0.8]; /* linetype -1 (gridlines) light grey */ /* Cyclic colors */ [adapter setColormapEntry:4 red:1.0 green:0.0 blue:0.0]; /* red */ [adapter setColormapEntry:5 red:0.0 green:1.0 blue:0.0]; /* green */ [adapter setColormapEntry:6 red:0.0 green:0.0 blue:1.0]; /* blue */ [adapter setColormapEntry:7 red:1.0 green:0.0 blue:1.0]; /* magenta */ [adapter setColormapEntry:8 red:0.0 green:1.0 blue:1.0]; /* cyan */ [adapter setColormapEntry:9 red:0.6275 green:0.3216 blue:0.1765]; /* sienna */ [adapter setColormapEntry:10 red:1.0 green:0.6471 blue:0.0]; /* orange */ [adapter setColormapEntry:11 red:0.5 green:0.4980 blue:0.3137]; /* coral */ [adapter setColormapEntry:12 red:0.25 green:0.25 blue:0.25]; /* grey */ } TERM_PUBLIC void AQUA_reset() { LOG(@"Aqua reset"); } TERM_PUBLIC void AQUA_text() { LOG(@"Aqua text (render)"); [adapter renderPlot]; } TERM_PUBLIC void AQUA_graphics() { #ifdef LOGGING /* Keep the compiler quiet when not debugging */ LOG(@"Pre: (arpool + loopPool, loopPool) =(%d, %d)", [NSAutoreleasePool autoreleasedObjectCount], [NSAutoreleasePool topAutoreleasePoolCount]); #endif /* Avoid buildup of objects in the autoreleasepools */ [loopPool release]; loopPool = [[NSAutoreleasePool alloc] init]; #ifdef LOGGING /* Keep the compiler quiet when not debugging */ LOG(@"Post: (arpool + loopPool, loopPool) =(%d, %d)",[NSAutoreleasePool autoreleasedObjectCount], [NSAutoreleasePool topAutoreleasePoolCount]); #endif [adapter eraseRect:NSMakeRect(0.0, 0.0, AQUA_xSize/AQUA_RESOLUTION, AQUA_ySize/AQUA_RESOLUTION)]; AQUA_LineType = LT_UNDEFINED; } TERM_PUBLIC void AQUA_move(unsigned int x, unsigned int y) { [adapter moveToPoint:NSMakePoint(x/AQUA_RESOLUTION, y/AQUA_RESOLUTION)]; } TERM_PUBLIC void AQUA_vector(unsigned int x, unsigned int y) { [adapter addLineToPoint:NSMakePoint(x/AQUA_RESOLUTION, y/AQUA_RESOLUTION)]; } TERM_PUBLIC void AQUA_linetype(int linetype) { float dash[8]; int i, style; LOG(@"AQUA_linetype(%d) ---> entry: %d", linetype, (linetype%CYCLIC_COLORS)+SPECIAL_COLORS); if (linetype != AQUA_LineType) { /* Note: this operation maps linestyle -4 to -1 onto colormap entries 0 to 3 */ AQUA_LineType = linetype; [adapter takeColorFromColormapEntry:(linetype%CYCLIC_COLORS)+SPECIAL_COLORS]; } if (AQUA_dashedlines) { style = linetype%AQUA_DASH_PATTERNS; if (style <= 0) { [adapter setLinestyleSolid]; } else { // Set up a dash array for(i = 0; i 0) { /* Try to split the non-empty string into array parts (as string objects) */ NSArray *parts = [AQUA_convert_using_encoding(font) componentsSeparatedByString:@","]; /* Check that we have both non-empty name and size, otherwise stay with defaults */ if ([parts count] > 0 && ![[parts objectAtIndex:0] isEqualToString:@""] ) { fontFace = [parts objectAtIndex:0]; /* fontname */ if ([parts count] > 1 && ![[parts objectAtIndex:1] isEqualToString:@""] ) { fontSize = [[parts objectAtIndex:1] floatValue]; /* Convert (optional) 2nd string object (fontsize) to float */ } } } LOG(@"Setting:(%@,%f)", fontFace, fontSize); [adapter setFontname:fontFace]; [adapter setFontsize:fontSize]; term->h_char = (int) (fontSize * 0.6 * AQUA_RESOLUTION); term->v_char = (int) (fontSize * 1.5 * AQUA_RESOLUTION); return (TRUE); } TERM_PUBLIC void AQUA_set_pointsize(double size) /* notification of set pointsize */ { LOG(@"AQUA_set_pointsize(%f)", size); } TERM_PUBLIC void AQUA_point(unsigned int x, unsigned int y, int number) { /* The default dot-routine doesn't work with AQT */ [adapter setLinestyleSolid]; /* Symbols should never be dashed */ [adapter setLinewidth:1.0]; [adapter setLineCapStyle:AQTRoundLineCapStyle]; /* Set line cap style to round to create a dot */ [adapter moveToPoint:NSMakePoint(x/AQUA_RESOLUTION-0.005, y/AQUA_RESOLUTION)]; [adapter addLineToPoint:NSMakePoint(x/AQUA_RESOLUTION+0.005, y/AQUA_RESOLUTION)]; [adapter moveToPoint:NSMakePoint(0,0)]; /* Force a path end to work around a bug in AquaTerm 1.0.0 */ /* Round caps results in nicer symbols too */ if (number>=0) { do_point(x, y, number); } [adapter moveToPoint:NSMakePoint(0,0)]; /* Force a path end to work around a bug in AquaTerm 1.0.0 */ [adapter setLineCapStyle:AQTButtLineCapStyle]; /* Reset line capstyle */ } /* after one plot of multiplot */ TERM_PUBLIC void AQUA_suspend() { [adapter renderPlot]; } /* before subsequent plot of multiplot */ TERM_PUBLIC void AQUA_resume() { } /* clear part of multiplot */ TERM_PUBLIC void AQUA_boxfill(int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height) { float r,g,b; LOG(@"\nstyle=%d\nstyle & 0xf = %d\nfillpar=%d\n", style, style & 0xf, style >> 4); /* Save current color */ [adapter getColorRed:&r green:&g blue:&b]; /* fillpar: * - solid : 0 - 100 * - pattern : 0 - 100 */ int fillpar = style >> 4; style &= 0xf; switch (style) { case 0: /* fill with background color */ { float rb, gb, bb; [adapter getBackgroundColorRed:&rb green:&gb blue:&bb]; [adapter setColorRed:rb green:gb blue:bb]; } break; case FS_TRANSPARENT_SOLID: if (AQUA_hasAlphaSupport) { float alpha = fillpar * 0.01; [adapter setColorRed:r green:g blue:b alpha:alpha]; break; } else /* fall through */ case FS_SOLID: /* solid fill */ { float density = (100 - fillpar)*0.01; [adapter setColorRed:r*(1-density) + density green:g*(1-density) + density blue:b*(1-density) + density]; } break; case FS_PATTERN: /* pattern fill */ case FS_TRANSPARENT_PATTERN: /* Can't do pattern easily, using colors. */ [adapter takeColorFromColormapEntry:(fillpar%CYCLIC_COLORS)+SPECIAL_COLORS]; break; default: break; } NSRect scaledRect = NSMakeRect(x1/AQUA_RESOLUTION, y1/AQUA_RESOLUTION, width/AQUA_RESOLUTION, height/AQUA_RESOLUTION); [adapter eraseRect:scaledRect]; [adapter addFilledRect:scaledRect]; /* Restore color */ [adapter setColorRed:r green:g blue:b]; } TERM_PUBLIC void AQUA_linewidth(double linewidth) { [adapter setLinewidth:linewidth]; } TERM_PUBLIC void AQUA_pointsize(double pointsize) { LOG(@"AQUA_pointsize(%f)", pointsize); term_pointsize = pointsize; } TERM_PUBLIC int AQUA_make_palette(t_sm_palette *palette) { if (palette == NULL) { /* AquaTerm can do continuous colors */ return 0; } return 0; } TERM_PUBLIC void AQUA_set_color(t_colorspec *colorspec) { rgb_color color; switch (colorspec->type) { case TC_FRAC: rgb1maxcolors_from_gray(colorspec->value, &color); [adapter setColorRed:color.r green:color.g blue:color.b]; break; case TC_RGB: color.r = (double)((colorspec->lt >> 16 ) & 255) / 255.; color.g = (double)((colorspec->lt >> 8 ) & 255) / 255.; color.b = (double)(colorspec->lt & 255) / 255.; [adapter setColorRed:color.r green:color.g blue:color.b]; break; case TC_LT: [adapter takeColorFromColormapEntry:((colorspec->lt)%CYCLIC_COLORS)+SPECIAL_COLORS]; break; default: break; } AQUA_LineType = LT_UNDEFINED; } TERM_PUBLIC void AQUA_filled_polygon(int pc, gpiPoint *corners) { int i; int fillpar = corners->style >> 4; float r,g,b; [adapter getColorRed:&r green:&g blue:&b]; /* This switch is a clone of the one in AQUA_boxfill() */ switch (corners->style & 0xf) { case 0: /* fill with background color */ { float rb, gb, bb; [adapter getBackgroundColorRed:&rb green:&gb blue:&bb]; [adapter setColorRed:rb green:gb blue:bb]; } break; case FS_TRANSPARENT_SOLID: if (AQUA_hasAlphaSupport) { float alpha = fillpar * 0.01; [adapter setColorRed:r green:g blue:b alpha:alpha]; break; } else /* fall through */ case FS_SOLID: /* solid fill */ { float density = (100 - fillpar)*0.01; [adapter setColorRed:r*(1-density) + density green:g*(1-density) + density blue:b*(1-density) + density]; } break; case FS_PATTERN: /* pattern fill */ case FS_TRANSPARENT_PATTERN: /* Can't do pattern easily, using colors. */ [adapter takeColorFromColormapEntry:(fillpar%CYCLIC_COLORS)+SPECIAL_COLORS]; break; default: break; } [adapter moveToVertexPoint:NSMakePoint(corners[0].x/AQUA_RESOLUTION, corners[0].y/AQUA_RESOLUTION)]; for (i=1; i0.01) { /* consider this as super/subscript, and compute subscript level */ int n = (int)round(log(fontsize/AQUA_fontSizeCur)/log(0.8)); [attributes setObject:[NSNumber numberWithInt:(base > 0)?n:-n] forKey:@"NSSuperScript"]; } else if (abs(fontsize - AQUA_fontSizeCur)>0.01) { /* Fontsize was set explicitly */ [attributes setObject:[NSNumber numberWithFloat:fontsize] forKey:@"AQTFontsize"]; } if (!showflag) [attributes setObject:[NSNumber numberWithInt:1] forKey:@"AQTNonPrintingChar"]; } /* Local buffer used in encoding conversion */ #define ENHAQUA_CSTRBUFLEN 1023 static char cStrBuf[ENHAQUA_CSTRBUFLEN + 1]; static unsigned int cStrBufIndex = 0; TERM_PUBLIC void ENHAQUA_flush(void) { /* Convert cStrBuf UTF8 according to encoding, use convert_using_encoding() and apply attributes before adding to enhString */ NSAttributedString *aStr; cStrBuf[cStrBufIndex] = '\0'; cStrBufIndex = 0; aStr = [[NSAttributedString alloc] initWithString:AQUA_convert_using_encoding(cStrBuf) attributes:attributes]; [enhString appendAttributedString:aStr]; [aStr release]; } TERM_PUBLIC void ENHAQUA_writec(int c) { /* Buffer byte sequence into cStrBuf */ LOG(@"int c = 0x%04x", c); cStrBuf[cStrBufIndex] = (char)(c+0x100) & 0xFF; /* FIXME: Sometimes c is overflowed */ if (cStrBufIndex < ENHAQUA_CSTRBUFLEN) cStrBufIndex++; } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(aqua_driver) "aqua", "Interface to graphics terminal server for Mac OS X", 0 /* xmax */ , 0 /* ymax */ , 0 /* vchar */ , 0 /* hchar */ , 0 /* vtic */ , 0 /* htic */ , AQUA_options, AQUA_init, AQUA_reset, AQUA_text, null_scale, AQUA_graphics, AQUA_move, AQUA_vector, AQUA_linetype, AQUA_put_text, /* optionals */ AQUA_text_angle, AQUA_justify_text, AQUA_point, do_arrow, AQUA_set_font, AQUA_pointsize, TERM_CAN_MULTIPLOT|TERM_NO_OUTPUTFILE|TERM_CAN_DASH, AQUA_suspend, AQUA_resume, AQUA_boxfill, AQUA_linewidth #ifdef USE_MOUSE , 0, 0, 0, 0, 0 #endif /* USE_MOUSE */ , AQUA_make_palette, AQUA_previous_palette, AQUA_set_color, AQUA_filled_polygon, AQUA_image, ENHAQUA_open, ENHAQUA_flush, ENHAQUA_writec TERM_TABLE_END(aqua_driver) #undef LAST_TERM #define LAST_TERM aqua_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(aqua) "1 aqua", "?commands set terminal aqua", "?set terminal aqua", "?set term aqua", "?terminal aqua", "?term aqua", "?aqua", "?Aqua", " This terminal relies on AquaTerm.app for display on Mac OS X.", "", " Syntax:", " set terminal aqua {} {title \"\"} {size }", " {font \"{,}\"}", " {{no}enhanced} {solid|dashed} {dl }}", "", " where is the number of the window to draw in (default is 0),", " is the name shown in the title bar (default \"Figure \"),", " is the size of the plot (default is 846x594 pt = 11.75x8.25 in).", "", " Use to specify the font (default is \"Times-Roman\"),", " and to specify the font size (default is 14.0 pt).", "", " The aqua terminal supports enhanced text mode (see `enhanced`), except for", " overprint. Font support is limited to the fonts available on the system.", " Character encoding can be selected by `set encoding` and currently supports", " iso_latin_1, iso_latin_2, cp1250, and UTF8 (default).", "", " Lines can be drawn either solid or dashed, (default is solid) and the dash", " spacing can be modified by which is a multiplier > 0.", "" END_HELP(aqua) #endif /* TERM_HELP */ gnuplot-4.6.4/term/ai.trm0000644000471100001440000003132011616060277012222 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: ai.trm,v 1.22 2011/08/02 20:40:31 sfeam Exp $ * */ /* GNUPLOT - ai.trm */ /*[ * Copyright 1991, 1992, 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * aifm * * AUTHORS * Ray Ghanbari * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * * The 'aifm' driver produces files editable by Adobe Illustrator 3.0 * To change font to Courier and font size to 20pts use * 'set term aifm "Courier" 20'. * To switch to color output use * 'set term aifm color'. */ /* AIFM driver by Ray Ghanbari, ray@mtl.mit.edu, * based on PostScript driver by Russell Lang, rjl@monu1.cc.monash.edu.au */ /* Changed to 3.6 terminal format, David C. Schooley, 9/29/95 */ /* Improved multiple plot support, David C. Schooley, 6/5/95 */ /* Compatiblity with Illustrator 7.0, David C. Schooley, 6/5/95 */ /* Font and size support for labels, David C. Schooley, 6/5/95 */ #include "driver.h" #ifdef TERM_REGISTER register_term(aifm) #endif #ifdef TERM_PROTO TERM_PUBLIC void AI_init __PROTO((void)); TERM_PUBLIC void AI_graphics __PROTO((void)); TERM_PUBLIC void AI_text __PROTO((void)); TERM_PUBLIC void AI_linetype __PROTO((int linetype)); TERM_PUBLIC void AI_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void AI_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void AI_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int AI_text_angle __PROTO((int ang)); TERM_PUBLIC void AI_reset __PROTO((void)); TERM_PUBLIC void AI_options __PROTO((void)); TERM_PUBLIC int AI_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void AI_suspend __PROTO((void)); TERM_PUBLIC void AI_resume __PROTO((void)); TERM_PUBLIC int AI_set_font __PROTO((const char *font)); #define AI_XOFF 50 /* page offset in pts */ #define AI_YOFF 50 #define AI_XMAX 5000 #define AI_YMAX 3500 #define AI_XLAST (AI_XMAX - 1) #define AI_YLAST (AI_YMAX - 1) #define AI_VTIC (AI_YMAX/80) #define AI_HTIC (AI_YMAX/80) #define AI_SC (10.0) /* scale is 1pt = 10 units */ #define AI_LW (0.5*AI_SC) /* linewidth = 0.5 pts */ #define AI_VCHAR (14*AI_SC) /* default is 14 point characters */ #define AI_HCHAR (14*AI_SC*6/10) #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY enum AI_id { AI_DEFAULT, AI_MONOCHROME, AI_COLOUR, AI_OTHER }; static struct gen_table AI_opts[] = { { "d$efault", AI_DEFAULT }, { "m$onochrome", AI_MONOCHROME }, { "c$olor", AI_COLOUR }, { "c$olour", AI_COLOUR }, { NULL, AI_OTHER } }; #define DEFAULT_FONT "Times-Roman" /* name of font */ static char ai_font[MAX_ID_LEN + 1] = DEFAULT_FONT; /* size of font in pts */ static int ai_fontsize = 14; /* name of font */ static char ai_oldfont[MAX_ID_LEN + 1] = DEFAULT_FONT; /* size of font in pts */ static int ai_oldfontsize = 14; static TBOOLEAN ai_color = FALSE; static TBOOLEAN ai_stroke = FALSE; static int ai_page = 0; /* page count */ static int ai_path_count = 0; /* count of lines in path */ static int ai_ang = 0; /* text angle */ static int ai_subgroup_level = 0; /* depth of sub-groups */ static int ai_multiplot_group = 0; /* group for multiplot */ static enum JUSTIFY ai_justify = LEFT; /* text is flush left */ TERM_PUBLIC void AI_options() { while (!END_OF_COMMAND) { switch(lookup_table(&AI_opts[0],c_token)) { case AI_DEFAULT: c_token++; ai_color = FALSE; strncpy(ai_font,DEFAULT_FONT,sizeof(ai_font)); ai_fontsize = 14; strncpy(ai_oldfont,DEFAULT_FONT,sizeof(ai_oldfont)); ai_oldfontsize = 14; break; case AI_MONOCHROME: c_token++; ai_color = FALSE; break; case AI_COLOUR: c_token++; ai_color = TRUE; break; case AI_OTHER: default: if (isstring(c_token)) { quote_str(ai_font, c_token, MAX_ID_LEN); strcpy(ai_oldfont, ai_font); c_token++; } else { /* is a number */ /* We have font size specified */ struct value a; ai_fontsize = (int) real(const_express(&a)); ai_oldfontsize = ai_fontsize; term->v_char = (unsigned int) (ai_fontsize * AI_SC); term->h_char = (unsigned int) (ai_fontsize * AI_SC * 6 / 10); } break; } } sprintf(term_options, "%s \"%s\" %d", ai_color ? "color" : "monochrome", ai_font, ai_fontsize); } TERM_PUBLIC void AI_init() { ai_page = 0; fprintf(gpoutfile, "%%!PS-Adobe-2.0 EPSF-1.2\n\ %%%%Creator: Adobe Illustrator(TM) 3.2\n\ %%%%TrueCreator: gnuplot %s patchlevel %s ai terminal\n\ %%%%BoundingBox: %d %d %d %d\n\ %%%%Template:\n\ %%%%EndComments\n\ %%%%EndProlog\n", gnuplot_version, gnuplot_patchlevel, AI_XOFF, AI_YOFF, (int) ((AI_XMAX) / AI_SC + 0.5 + AI_XOFF), (int) ((AI_YMAX) / AI_SC + 0.5 + AI_YOFF)); } TERM_PUBLIC void AI_graphics() { ai_page++; /* fprintf(gpoutfile,"%%%%Page: %d %d\n",ai_page,ai_page);*/ fputs("\ 0 G\n\ 1 j\n\ 1 J\n\ u\n", gpoutfile); ai_path_count = 0; ai_stroke = FALSE; } TERM_PUBLIC void AI_text() { if (ai_stroke) { fputs("S\n", gpoutfile); ai_stroke = FALSE; } while (ai_subgroup_level) { fputs("U\n", gpoutfile); ai_subgroup_level--; } fputs("U\n", gpoutfile); ai_path_count = 0; ai_multiplot_group = 0; } TERM_PUBLIC void AI_reset() { fputs("%%Trailer\n", gpoutfile); /* fprintf(gpoutfile,"%%%%Pages: %d\n",ai_page);*/ } TERM_PUBLIC void AI_linetype(int linetype) { if (ai_stroke) { fputs("S\n", gpoutfile); ai_stroke = FALSE; } if (ai_subgroup_level) { fputs("U\n", gpoutfile); ai_subgroup_level--; } if (linetype == LT_BLACK && multiplot) { /* for each new plot, line_type gets called twice with a value of LT_BLACK. It gets called once for the border and again for the tics. This code will need to be changed if gnuplot's behavior changes. */ switch (ai_multiplot_group) { case 0: fputs("u\n", gpoutfile); ai_subgroup_level++; ai_multiplot_group = 1; break; case 1: ai_multiplot_group = 2; break; case 2: ai_multiplot_group = 1; fputs("U\nu\n", gpoutfile); break; } } if (linetype == LT_BLACK && !multiplot) { if (ai_multiplot_group) { fputs("U\n", gpoutfile); ai_subgroup_level--; ai_multiplot_group = 0; } } fputs("u\n", gpoutfile); ai_subgroup_level++; switch (linetype) { case LT_BLACK: fprintf(gpoutfile, "%.2f w\n", AI_LW / AI_SC * 2.0); if (ai_color) { fputs("0 0 0 1 K\n", gpoutfile); } else { fputs("[] 0 d\n", gpoutfile); } break; case LT_AXIS: fprintf(gpoutfile, "%.2f w\n", AI_LW / AI_SC / 2.0); if (ai_color) { fputs("0 0 0 1 K\n", gpoutfile); } else { fputs("[1 2] 0 d\n", gpoutfile); } break; case 0: fprintf(gpoutfile, "%.2f w\n", AI_LW / AI_SC); if (ai_color) { fputs("1 0 1 0 K\n", gpoutfile); } else { fputs("[] 0 d\n", gpoutfile); } break; case 1: fprintf(gpoutfile, "%.2f w\n", AI_LW / AI_SC); if (ai_color) { fputs("1 1 0 0 K\n", gpoutfile); } else { fputs("[4 2] 0 d\n", gpoutfile); } break; case 2: fprintf(gpoutfile, "%.2f w\n", AI_LW / AI_SC); if (ai_color) { fputs("0 1 1 0 K\n", gpoutfile); } else { fputs("[2 3] 0 d\n", gpoutfile); } break; case 3: fprintf(gpoutfile, "%.2f w\n", AI_LW / AI_SC); if (ai_color) { fputs("0 1 0 0 K\n", gpoutfile); } else { fputs("[1 1.5] 0 d\n", gpoutfile); } break; case 4: fprintf(gpoutfile, "%f w\n", AI_LW / AI_SC); if (ai_color) { fputs("1 0 0 0 K\n", gpoutfile); } else { fputs("[5 2 1 2] 0 d\n", gpoutfile); } break; case 5: fprintf(gpoutfile, "%.2f w\n", AI_LW / AI_SC); if (ai_color) { fputs("0 0 1 0 K\n", gpoutfile); } else { fputs("[4 3 1 3] 0 d\n", gpoutfile); } break; case 6: fprintf(gpoutfile, "%.2f w\n", AI_LW / AI_SC); if (ai_color) { fputs("0 0 0 1 K\n", gpoutfile); } else { fputs("[2 2 2 4] 0 d\n", gpoutfile); } break; case 7: fprintf(gpoutfile, "%.2f w\n", AI_LW / AI_SC); if (ai_color) { fputs("0 0.7 1 0 K\n", gpoutfile); } else { fputs("[2 2 2 2 2 4] 0 d\n", gpoutfile); } break; case 8: fprintf(gpoutfile, "%.2f w\n", AI_LW / AI_SC); if (ai_color) { fputs("0.5 0.5 0.5 0 K\n", gpoutfile); } else { fputs("[2 2 2 2 2 2 2 4] 0 d\n", gpoutfile); } break; } ai_path_count = 0; } TERM_PUBLIC void AI_move(unsigned int x, unsigned int y) { if (ai_stroke) fputs("S\n", gpoutfile); fprintf(gpoutfile, "%.2f %.2f m\n", x / AI_SC, y / AI_SC); ai_path_count += 1; ai_stroke = TRUE; } TERM_PUBLIC void AI_vector(unsigned int x, unsigned int y) { fprintf(gpoutfile, "%.2f %.2f l\n", x / AI_SC, y / AI_SC); ai_path_count += 1; ai_stroke = TRUE; if (ai_path_count >= 400) { fprintf(gpoutfile, "S\n%.2f %.2f m\n", x / AI_SC, y / AI_SC); ai_path_count = 0; } } TERM_PUBLIC void AI_put_text(unsigned int x, unsigned int y, const char *str) { char ch; if (ai_stroke) { fputs("S\n", gpoutfile); ai_stroke = FALSE; } switch (ai_justify) { case LEFT: fprintf(gpoutfile, "/_%s %d 0 0 0 z\n", ai_font, ai_fontsize); break; case CENTRE: fprintf(gpoutfile, "/_%s %d 0 0 1 z\n", ai_font, ai_fontsize); break; case RIGHT: fprintf(gpoutfile, "/_%s %d 0 0 2 z\n", ai_font, ai_fontsize); break; } if (ai_ang == 0) { fprintf(gpoutfile, "[ 1 0 0 1 %.2f %.2f] e\n", x / AI_SC, y / AI_SC - ai_fontsize / 3.0); } else { fprintf(gpoutfile, "[ 0 1 -1 0 %.2f %.2f] e\n", x / AI_SC - ai_fontsize / 3.0, y / AI_SC); } putc('(', gpoutfile); ch = *str++; while (ch != '\0') { if ((ch == '(') || (ch == ')') || (ch == '\\')) putc('\\', gpoutfile); putc(ch, gpoutfile); ch = *str++; } fputs(") t\nT\n", gpoutfile); ai_path_count = 0; } TERM_PUBLIC int AI_text_angle(int ang) { ai_ang = ang; return TRUE; } TERM_PUBLIC int AI_justify_text(enum JUSTIFY mode) { ai_justify = mode; return TRUE; } TERM_PUBLIC int AI_set_font(const char *font) { char name[32]; size_t sep; int size; if (font && *font) { sep = strcspn(font, ","); assert(sep < sizeof(name)); strncpy(name, font, sep); name[sep] = '\0'; size = ai_fontsize; sscanf(&(font[sep + 1]), "%d", &size); if (*name) strcpy(ai_font, name); if (size) ai_fontsize = size; } else { ai_fontsize = ai_oldfontsize; strcpy(ai_font, ai_oldfont); } return TRUE; } TERM_PUBLIC void AI_suspend() { } TERM_PUBLIC void AI_resume() { } #endif #ifdef TERM_TABLE TERM_TABLE_START(aifm_driver) "aifm", "Adobe Illustrator 3.0 Format", AI_XMAX, AI_YMAX, AI_VCHAR, AI_HCHAR, AI_VTIC, AI_HTIC, AI_options, AI_init, AI_reset, AI_text, null_scale, AI_graphics, AI_move, AI_vector, AI_linetype, AI_put_text, AI_text_angle, AI_justify_text, do_point, do_arrow, AI_set_font, NULL, 0, AI_suspend, AI_resume TERM_TABLE_END(aifm_driver) #undef LAST_TERM #define LAST_TERM aifm_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(aifm) "1 aifm", "?commands set terminal aifm", "?set terminal aifm", "?set term aifm", "?terminal aifm", "?term aifm", "?aifm", "", " `NOTE: Outdated terminal`, originally written for Adobe Illustrator 3.0+.", " Since Adobe Illustrator understands PostScript level 1 commands directly,", " you should use `set terminal post level1` instead.", "", " Syntax:", " set terminal aifm {color|monochrome} {\"\"} {}", "" END_HELP(ai) #endif /* TERM_HELP */ gnuplot-4.6.4/term/hpgl.trm0000644000471100001440000023416111153070756012572 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: hpgl.trm,v 1.23 2009/03/02 23:55:26 sfeam Exp $ */ /* GNUPLOT - hpgl.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.h. * * This terminal driver supports: * hpgl, hp7550, hp7580b, HP Laserjet III * hp7550 has been replaced by "hpgl 8 eject" * hp7580b has been replaced by "hpgl 4" * * AUTHORS * Colin Kelley, Thomas Williams, Russell Lang * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * * MODIFIED for expanded HPGL/2 and PCL utilites * Tom Swiler (tom@silica.mse.ufl.edu) * Modified June 1995 Ian MacPhedran to support newterm format * Modified October 1995 Ian MacPhedran to simplify HPGL terminals * Modified January 96 by David Denholm and Emmanuel Bigler for cp850 * and iso international character sets * Modified February 99 by Jeremy Brenes to give PCL5 terminal optional * multi-pen support (6 pen default), a default 34" plotting width for * use with large color plotters such as the HP Designjet 750C, * various alternative plot sizes, and variable fontsizes; * Also decreased the HPGL terminal's fixed fontsize to make it more * reasonable when plots get scaled to 34" * Modified July 99 by Jeremy Brenes to make extended plot area smaller; * added solid/dashed lines option, additional font types, mixed fonts * Modified November 99 by Jeremy Brenes to add a postscript pointtypes * option, special purpose negative pointtypes, and a pointsize function * */ #define HPGL #define PCL #include "driver.h" #ifdef TERM_REGISTER register_term(hpgl) register_term(pcl5) #endif /* TERM_REGISTER */ #ifdef TERM_PROTO TERM_PUBLIC void HPGL_options __PROTO((void)); TERM_PUBLIC void HPGL2_options __PROTO((void)); TERM_PUBLIC void PCL_options __PROTO((void)); TERM_PUBLIC void HPGL_init __PROTO((void)); /* TERM_PUBLIC void HPGL2_init __PROTO((void)); */ TERM_PUBLIC void PCL_init __PROTO((void)); TERM_PUBLIC void HPGL_graphics __PROTO((void)); TERM_PUBLIC void HPGL2_graphics __PROTO((void)); TERM_PUBLIC void PCL_graphics __PROTO((void)); TERM_PUBLIC void HPGL_text __PROTO((void)); /* TERM_PUBLIC void HPGL2_text __PROTO((void)); */ TERM_PUBLIC void PCL_text __PROTO((void)); TERM_PUBLIC void HPGL_linetype __PROTO((int linetype)); TERM_PUBLIC void HPGL2_linetype __PROTO((int linetype)); TERM_PUBLIC void HPGL_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void HPGL2_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void HPGL_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void HPGL_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void HPGL2_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void HPGL2_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void HPGL2_encode __PROTO((int d)); TERM_PUBLIC int HPGL_text_angle __PROTO((int ang)); TERM_PUBLIC int HPGL2_text_angle __PROTO((int ang)); TERM_PUBLIC void HPGL_reset __PROTO((void)); /* TERM_PUBLIC void HPGL2_reset __PROTO((void)); */ TERM_PUBLIC void PCL_reset __PROTO((void)); TERM_PUBLIC int HPGL2_justify_text __PROTO((enum JUSTIFY just)); TERM_PUBLIC int HPGL2_set_font __PROTO((const char *font)); TERM_PUBLIC void HPGL2_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void HPGL2_neg_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void HPGL2_pointsize __PROTO((double size)); #define GOT_HPGL_PROTO #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY /* * The maximum plot size, in plotter units. * Note that the actual size of larger plots may be limited by * available printer memory. */ #define HPGL_PUPI 1016 /* Plotter units per inch */ #define HPGL_XMAX_A 10000 #define HPGL_YMAX_A 7500 #define HPGL_XMAX_B 13000 #define HPGL_YMAX_B 7500 #define HPGL_XMAX_C 45333 #define HPGL_YMAX_C 34000 #define HPGL_XMAX_D 52000 #define HPGL_YMAX_D 34000 #define HPGL_XMAX HPGL_XMAX_A #define HPGL_YMAX HPGL_YMAX_A #define PCL_XMAX HPGL_XMAX_C #define PCL_YMAX (HPGL_YMAX_C-60) /* * Tic sizes */ #define HPGL_VTIC (HPGL_YMAX/70) #define HPGL_HTIC (HPGL_YMAX/70) #define PCL_VTIC ((HPGL_YMAX_C-60)/320) #define PCL_HTIC ((HPGL_YMAX_C-60)/320) /* * Font size for HPGL */ #define HPGL_VCHAR (HPGL_YMAX/100*8/10) /* 0.8% */ #define HPGL_HCHAR (HPGL_XMAX/100*3/10) /* 0.3% */ /* * Font size for HPGL/2 */ #define HPGL2_DEF_POINT 12 /* Height of font */ #define HPGL2_DEF_PITCH (3 * 72 / (HPGL2_DEF_POINT * 2)) #define HPGL2_VCHAR ((int) HPGL_PUPI * HPGL2_DEF_POINT / 72) #define HPGL2_HCHAR (HPGL2_VCHAR * 2 / 3) /* * Point size for HPGL/2 */ static double HPGL2_psize = 1.0; /* Default point size */ /* * Number of available pointtypes for HPGL/2 */ #define HPGL2_NUM_NOPSPOINTS 6; /* for nopspoints option */ #define HPGL2_NUM_PSPOINTS 75; /* for pspoints option */ /* * Control constants */ #define DOWN 0 /* Pen is down */ #define UP 1 /* Pen is up */ #define UNKNOWN -10 /* Unknown status for lots of things */ /* * For Polyline Encoded, either use base 64 or base 32. * Save space with base 64, but get 8-bit characters. */ #define HPGL2_BASE64 1 #if HPGL2_BASE64 #define HPGL2_BITS 6 #define HPGL2_LOW_OFFS 63 #define HPGL2_HIGH_OFFS 191 #define HPGL2_MASK 63 #else #define HPGL2_BITS 5 #define HPGL2_LOW_OFFS 63 #define HPGL2_HIGH_OFFS 95 #define HPGL2_MASK 31 #endif /* * Data structures for options */ struct HPGL2_font_str { const char *compare, *name; int symbol_set, spacing; double pitch, height; int posture, stroke_weight, typeface; }; struct PCL_mode_str { const char *compare, *name, *command; unsigned int xmax, ymax; }; /* * The default font goes first. Although it is the ugliest, the * stick font is probably supported by the most devices. */ static struct HPGL2_font_str GPFAR HPGL2_font_table[] = { {"u$nivers", "univers", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4148}, {"s$tick", "stick", 277, 0, HPGL2_DEF_PITCH, 0.0, 0, 0, 48}, {"cg_t$imes", "cg_times", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4101}, {"z$apf_dingbats", "zapf_dingbats", 364, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4141}, {"an$tique_olive", "antique_olive", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4168}, {"ar$ial", "arial", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 16602}, {"cou$rier", "courier", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4099}, {"g$aramond_antigua", "garamond_antigua", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4197}, {"l$etter_gothic", "letter_gothic", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4102}, {"cg_o$mega", "cg_omega", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4113}, {"al$bertus", "albertus", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 1, 4362}, {"ti$mes_new_roman", "times_new_roman", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 16901}, {"cl$arendon", "clarendon", 277, 1, 0.0, HPGL2_DEF_POINT, 4, 3, 4140}, {"cor$onet", "coronet", 277, 1, 0.0, HPGL2_DEF_POINT, 1, 0, 4116}, {"m$arigold", "marigold", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4297}, {"tr$uetype_symbols", "truetype_symbols", 621, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 16686}, {"w$ingdings", "wingdings", 18540, 1, 0.0, HPGL2_DEF_POINT, 1, 0, 31402} }; #define HPGL2_FONTS (sizeof(HPGL2_font_table) / sizeof (struct HPGL2_font_str)) static struct HPGL2_font_str *HPGL2_font = &HPGL2_font_table[0]; /* * The default mode goes first. Landscape style plots are probably the * most compatable with other HPGL devices. */ static struct PCL_mode_str GPFAR PCL_mode_table[] = { {"l$andscape", "landscape", "\033&l1O", PCL_XMAX, PCL_YMAX}, {"p$ortrait", "portrait", "\033&l0O", PCL_YMAX, PCL_XMAX} }; #define PCL_MODES (sizeof(PCL_mode_table) / sizeof (struct PCL_mode_str)) static struct PCL_mode_str *PCL_mode = &PCL_mode_table[0]; /* * Various line types and widths to distinguish data sets in monochrome */ static const char *HPGL2_lt[] = { "", ",2", ",2", ",2", ",2", ",2", ",2", ",2" }, *HPGL2_pw[] = { ".24", ".16", ".08"}; #define HPGL2_LINETYPES (sizeof(HPGL2_lt) / sizeof(char *)) #define HPGL2_PENWIDTHS (sizeof(HPGL2_pw) / sizeof(char *)) /* encoding vector for cp850 , characters 128 (0200) -> 255 (0377) */ static char hpgl_cp_850[128][4] = { /* 0200 */ "\0164\017", /* 0201 */ "\016O\017", /* 0202 */ "\016E\017", /* 0203 */ "\016@\017", /* 0204 */ "\016L\017", /* 0205 */ "\016H\017", /* 0206 */ "\016T\017", /* 0207 */ "\0165\017", /* 0210 */ "\016A\017", /* 0211 */ "\016M\017", /* 0212 */ "\016I\017", /* 0213 */ "\016]\017", /* 0214 */ "\016Q\017", /* 0215 */ "\016Y\017", /* 0216 */ "\016X\017", /* 0217 */ "\016P\017", /* 0220 */ "\016\134\017", /* 0221 */ "\016W\017", /* 0222 */ "\016S\017", /* 0223 */ "\016B\017", /* 0224 */ "\016N\017", /* 0225 */ "\016J\017", /* 0226 */ "\016C\017", /* 0227 */ "\016K\017", /* 0230 */ "\016o\017", /* 0231 */ "\016Z\017", /* 0232 */ "\016[\017", /* 0233 */ "\016V\017", /* 0234 */ "\016;\017", /* 0235 */ "\016R\017", /* 0236 */ "", /* 0237 */ "\016>\017", /* 0240 */ "\016D\017", /* 0241 */ "\016U\017", /* 0242 */ "\016F\017", /* 0243 */ "\016G\017", /* 0244 */ "\0167\017", /* 0245 */ "\0166\017", /* 0246 */ "\016y\017", /* 0247 */ "\016z\017", /* 0250 */ "\0169\017", /* 0251 */ "", /* 0252 */ "", /* 0253 */ "\016x\017", /* 0254 */ "\016w\017", /* 0255 */ "\0168\017", /* 0256 */ "\016{\017", /* 0257 */ "\016}\017", /* 0260 */ "", /* 0261 */ "", /* 0262 */ "", /* 0263 */ "", /* 0264 */ "", /* 0265 */ "\016`\017", /* 0266 */ "\016\042\017", /* 0267 */ "\016!\017", /* 0270 */ "", /* 0271 */ "", /* 0272 */ "", /* 0273 */ "", /* 0274 */ "", /* 0275 */ "\016?\017", /* 0276 */ "\016<\017", /* 0277 */ "", /* 0300 */ "", /* 0301 */ "", /* 0302 */ "", /* 0303 */ "", /* 0304 */ "", /* 0305 */ "", /* 0306 */ "\016b\017", /* 0307 */ "\016a\017", /* 0310 */ "", /* 0311 */ "", /* 0312 */ "", /* 0313 */ "", /* 0314 */ "", /* 0315 */ "", /* 0316 */ "", /* 0317 */ "\016:\017", /* 0320 */ "\016d\017", /* 0321 */ "\016c\017", /* 0322 */ "\016$\017", /* 0323 */ "\016%\017", /* 0324 */ "\016#\017", /* 0325 */ "", /* 0326 */ "\016e\017", /* 0327 */ "\016&\017", /* 0330 */ "\016'\017", /* 0331 */ "", /* 0332 */ "", /* 0333 */ "", /* 0334 */ "", /* 0335 */ "", /* 0336 */ "\016f\017", /* 0337 */ "", /* 0340 */ "\016g\017", /* 0341 */ "\016^\017", /* 0342 */ "\016_\017", /* 0343 */ "\016h\017", /* 0344 */ "\016j\017", /* 0345 */ "\016i\017", /* 0346 */ "", /* 0347 */ "\016q\017", /* 0350 */ "\016p\017", /* 0351 */ "\016m\017", /* 0352 */ "\016.\017", /* 0353 */ "\016-\017", /* 0354 */ "", /* 0355 */ "", /* 0356 */ "\0160\017", /* 0357 */ "\016(\017", /* 0360 */ "\016v\017", /* 0361 */ "\016~\017", /* 0362 */ "", /* 0363 */ "", /* 0364 */ "", /* 0365 */ "\016=\017", /* 0366 */ "", /* 0367 */ "", /* 0370 */ "\016z\017", /* 0371 */ "\016+\017", /* 0372 */ "", /* 0373 */ "", /* 0374 */ "", /* 0375 */ "", /* 0376 */ "", /* 0377 */ "" }; /* encoding vector for iso-8859-1 , characters 128 (0200) -> 255 (0377) */ static char hpgl_iso_8859_1[128][4] = { /* 0200 */ "", /* 0201 */ "", /* 0202 */ "", /* 0203 */ "", /* 0204 */ "", /* 0205 */ "", /* 0206 */ "", /* 0207 */ "", /* 0210 */ "", /* 0211 */ "", /* 0212 */ "", /* 0213 */ "", /* 0214 */ "", /* 0215 */ "", /* 0216 */ "", /* 0217 */ "", /* 0220 */ "", /* 0221 */ "\016\017", /* 0222 */ "\016\017", /* 0223 */ "", /* 0224 */ "", /* 0225 */ "", /* 0226 */ "", /* 0227 */ "", /* 0230 */ "", /* 0231 */ "", /* 0232 */ "", /* 0233 */ "", /* 0234 */ "", /* 0235 */ "", /* 0236 */ "", /* 0237 */ "", /* 0240 */ "", /* 0241 */ "\0168\017", /* 0242 */ "\0165\017", /* 0243 */ "\016;\017", /* 0244 */ "\016:\017", /* 0245 */ "\016<\017", /* 0246 */ "\017|\017", /* 0247 */ "\016=\017", /* 0250 */ "\016+\017", /* 0251 */ "", /* 0252 */ "\016y\017", /* 0253 */ "\016{\017", /* 0254 */ "", /* 0255 */ "", /* 0256 */ "", /* 0257 */ "\0160\017", /* 0260 */ "\016z\017", /* 0261 */ "\016~\017", /* 0262 */ "", /* 0263 */ "", /* 0264 */ "", /* 0265 */ "", /* 0266 */ "", /* 0267 */ "", /* 0270 */ "", /* 0271 */ "", /* 0272 */ "\016z\017", /* 0273 */ "\016}\017", /* 0274 */ "\016w\017", /* 0275 */ "\016x\017", /* 0276 */ "", /* 0277 */ "\0169\017", /* 0300 */ "\016!\017", /* 0301 */ "\016`\017", /* 0302 */ "\016\042\017", /* 0303 */ "\016a\017", /* 0304 */ "\016X\017", /* 0305 */ "\016P\017", /* 0306 */ "\016S\017", /* 0307 */ "\0164\017", /* 0310 */ "\016#\017", /* 0311 */ "\016\134\017", /* 0312 */ "\016$\017", /* 0313 */ "\016%\017", /* 0314 */ "\016f\017", /* 0315 */ "\016e\017", /* 0316 */ "\016\046\017", /* 0317 */ "\016'\017", /* 0320 */ "\016c\017", /* 0321 */ "\0166\017", /* 0322 */ "\016h\017", /* 0323 */ "\016g\017", /* 0324 */ "\016_\017", /* 0325 */ "\016i\017", /* 0326 */ "\016Z\017", /* 0327 */ "", /* 0330 */ "\016R\017", /* 0331 */ "\016-\017", /* 0332 */ "\016m\017", /* 0333 */ "\016.\017", /* 0334 */ "\016[\017", /* 0335 */ "", /* 0336 */ "\016p\017", /* 0337 */ "\016^\017", /* 0340 */ "\016H\017", /* 0341 */ "\016D\017", /* 0342 */ "\016@\017", /* 0343 */ "\016b\017", /* 0344 */ "\016L\017", /* 0345 */ "\016T\017", /* 0346 */ "\016W\017", /* 0347 */ "\0165\017", /* 0350 */ "\016I\017", /* 0351 */ "\016E\017", /* 0352 */ "\016A\017", /* 0353 */ "\016M\017", /* 0354 */ "\016Y\017", /* 0355 */ "\016U\017", /* 0356 */ "\016Q\017", /* 0357 */ "\016]\017", /* 0360 */ "\016d\017", /* 0361 */ "\0167\017", /* 0362 */ "\016J\017", /* 0363 */ "\016F\017", /* 0364 */ "\016B\017", /* 0365 */ "\016j\017", /* 0366 */ "\016N\017", /* 0367 */ "", /* 0370 */ "\016V\017", /* 0371 */ "\016K\017", /* 0372 */ "\016G\017", /* 0373 */ "\016C\017", /* 0374 */ "\016O\017", /* 0375 */ "", /* 0376 */ "\016q\017", /* 0377 */ "\016o\017" }; /* * Static variables to keep track of where we are, etc. */ static int HPGL_ang = 0, HPGL_x = UNKNOWN, HPGL_y = UNKNOWN, HPGL_penstate = UNKNOWN, HPGL_pentype, HPGL2_pentype = UNKNOWN, HPGL2_in_pe, HPGL2_lost; /* * The subroutines, grouped by function for different versions. */ static int HPGL_numpen, HPGL_eject; TERM_PUBLIC void HPGL_options() { HPGL_numpen = 6; /* default to six pens */ HPGL_eject = 0; /* default to no eject */ while (!END_OF_COMMAND) { if (almost_equals(c_token, "eje$ct")) HPGL_eject = 1; else if (isanumber(c_token)) { HPGL_numpen = (int) real(&token[c_token].l_val); if (HPGL_numpen <= 0) { HPGL_numpen = 6; int_error(c_token, "Number of pens must be positive"); } } else int_error(c_token, "expecting \"eject\" or number of pens"); c_token++; } sprintf(term_options, "%d pens %s", HPGL_numpen, HPGL_eject ? "eject" : "noeject"); } static int HPGL2_color = 1, HPGL2_numpen = 6; /* default to 6 pen color */ static int HPGL2_dashed = 0; /* current dashed linetype */ static int HPGL2_solid = 1; /* default to solid lines */ static int HPGL2_font_num = 0; /* font from options */ static int HPGL2_font_num_current = 0; /* current font */ static int pspointset = 0; /* default to standard point types */ static double HPGL2_point_size = HPGL2_DEF_POINT; /* pointsize from options */ static double HPGL2_point_size_current = 0; /* current pointsize */ static const char *PCL_dim = "noextended"; /* default plotting dimensions */ enum HPGL2_id { HPGL2_MONOCHROME, HPGL2_COLOR, HPGL2_SOLID, HPGL2_DASHED, HPGL2_FONT, HPGL2_SIZE, HPGL2_NOPSPOINTS, HPGL2_PSPOINTS, HPGL2_INVALID }; static struct gen_table HPGL2_opts[] = { { "mono$chrome", HPGL2_MONOCHROME }, { "col$or", HPGL2_COLOR }, { "col$our", HPGL2_COLOR }, { "sol$id", HPGL2_SOLID }, { "das$hed", HPGL2_DASHED }, { "f$ont", HPGL2_FONT }, { "s$ize", HPGL2_SIZE }, { "n$opspoints", HPGL2_NOPSPOINTS }, { "p$spoints", HPGL2_PSPOINTS }, { NULL, HPGL2_INVALID } }; TERM_PUBLIC void HPGL2_options() { struct termentry *t = term; int i; while (!END_OF_COMMAND) { switch(lookup_table(&HPGL2_opts[0],c_token)) { case HPGL2_MONOCHROME: HPGL2_color = 0; c_token++; break; case HPGL2_COLOR: HPGL2_color = 1; c_token++; if (!END_OF_COMMAND && isanumber(c_token)) { HPGL2_numpen = (int) real(&token[c_token].l_val); if (HPGL2_numpen <= 0) { HPGL2_numpen = 6; int_error(c_token, "Number of pens must be a positive"); } c_token++; } break; case HPGL2_SOLID: HPGL2_solid = 1; c_token++; break; case HPGL2_DASHED: HPGL2_solid = 0; c_token++; break; case HPGL2_FONT: c_token++; if (!END_OF_COMMAND) { for (i = 0; i < HPGL2_FONTS && !almost_equals(c_token, HPGL2_font_table[i].compare); i++); if (i < HPGL2_FONTS) { HPGL2_font = &HPGL2_font_table[i]; HPGL2_font_num = i; HPGL2_font_num_current = HPGL2_font_num; } else int_error(c_token, "expecting font: stick, cg_times, univers, zapf_dingbats, antique_olive,\narial, courier, garamond_antigua, letter_gothic, cg_omega, albertus,\ntimes_new_roman, clarendon, coronet, marigold, truetype_symbols, or wingdings"); c_token++; } else int_error(c_token, "expecting font: stick, cg_times, univers, zapf_dingbats, antique_olive,\narial, courier, garamond_antigua, letter_gothic, cg_omega, albertus,\ntimes_new_roman, clarendon, coronet, marigold, truetype_symbols, or wingdings"); break; case HPGL2_SIZE: c_token++; if (!END_OF_COMMAND) { if ((HPGL2_point_size = real(&token[c_token].l_val)) > 0.0) { HPGL2_point_size_current = HPGL2_point_size; t->v_char = (int) HPGL_PUPI *HPGL2_point_size / 72; t->h_char = t->v_char * 2 / 3; if (HPGL2_font->spacing) HPGL2_font->height = HPGL2_point_size; else HPGL2_font->pitch = 72 * 3 / (HPGL2_point_size * 2); } else int_error(c_token, "expecting point size: real number"); c_token++; } else int_error(c_token, "expecting point size: real number"); break; case HPGL2_NOPSPOINTS: c_token++; pspointset = 0; break; case HPGL2_PSPOINTS: c_token++; pspointset = 1; break; case HPGL2_INVALID: c_token++; default: break; } } sprintf(term_options+strlen(term_options)," %s %d %s \\\n" " %s %s %f %s", HPGL2_color ? "color" : "monochrome", HPGL2_color == 1 ? HPGL2_numpen : 1, HPGL2_solid ? "solid" : "dashed", HPGL2_font->name, HPGL2_font->spacing ? "height" : "pitch", HPGL2_font->spacing ? HPGL2_font->height : HPGL2_font->pitch, pspointset ? "pspoints" : "nopspoints"); } #if 0 /* Unused for now */ enum PCL_id { PCL_MODE, PCL_EXTENDED, PCL_EXTENDED, PCL_LEGAL, PCL_LETTER, PCL_INVALID }; static struct gen_table PCL_opts[] = { { "m$ode", PCL_MODE }, { "ext$ended", PCL_EXTENDED }, { "noext$ended", PCL_NOEXTENDED }, { "leg$al", PCL_LEGAL }, { "let$ter", PCL_LETTER }, { NULL, PCL_INVALID } }; #endif TERM_PUBLIC void PCL_options() { int i; if (!END_OF_COMMAND && almost_equals(c_token, "m$ode")) { c_token++; if (!END_OF_COMMAND) { for (i = 0; i < PCL_MODES && !almost_equals(c_token, PCL_mode_table[i].compare); i++); if (i < PCL_MODES) PCL_mode = &PCL_mode_table[i]; else int_error(c_token, "expecting mode: portrait or landscape"); c_token++; } else int_error(c_token, "expecting mode: portrait or landscape"); } if (!END_OF_COMMAND && almost_equals(c_token, "ext$ended")) { PCL_mode->xmax = (HPGL_XMAX_D); PCL_mode->ymax = (HPGL_YMAX_D - 60); PCL_dim = "extended"; c_token++; } else if (!END_OF_COMMAND && almost_equals(c_token, "noext$ended")) { PCL_mode->xmax = (HPGL_XMAX_C); PCL_mode->ymax = (HPGL_YMAX_C - 60); PCL_dim = "noextended"; c_token++; } else if (!END_OF_COMMAND && almost_equals(c_token, "leg$al")) { PCL_mode->xmax = (HPGL_XMAX_B); PCL_mode->ymax = (HPGL_YMAX_B - 60); PCL_dim = "legal"; c_token++; } else if (!END_OF_COMMAND && almost_equals(c_token, "let$ter")) { PCL_mode->xmax = (HPGL_XMAX_A); PCL_mode->ymax = (HPGL_YMAX_A - 60); PCL_dim = "letter"; c_token++; } sprintf(term_options, "%s %s", PCL_mode->name, PCL_dim); HPGL2_options(); } TERM_PUBLIC void HPGL_init() { } /* void HPGL2_init () { } */ TERM_PUBLIC void PCL_init() { struct termentry *t = term; /* * Reset printer, set to one copy, orientation of user's choice. * Make the change to the new orientation all at once. */ fprintf(gpoutfile, "\033E\033&l1X%s\n", PCL_mode->command); t->xmax = PCL_mode->xmax; t->ymax = PCL_mode->ymax; /* * Enter HPGL/2 graphics mode * Necessary here to keep the first DI0,1DI1,0 orientation command from being * printed as literal text on the page for some devices. Hopefully this * workaround has no bad consequences elsewhere; omit this line if it does. */ fputs("\033%0B", gpoutfile); } TERM_PUBLIC void HPGL_graphics() { fputs("\033.Y\n\033.I81;;17:\033.N;19:\033.M500:\n", gpoutfile); /* 1 1. enable eavesdropping */ fprintf(gpoutfile, "IN;%s\nSC0,%d,0,%d;\nSR%f,%f;\n", ((encoding == S_ENC_CP850) || (encoding == S_ENC_ISO8859_1)) ? "CA7;" : "", HPGL_XMAX, HPGL_YMAX, ((double) (HPGL_HCHAR) * 200 / 3 / HPGL_XMAX), ((double) (HPGL_VCHAR) * 100 / 2 / HPGL_YMAX)); /* 1 2 3 1. reset to power-up defaults 2. set SCaling 3. set character size */ HPGL_ang = 0; } TERM_PUBLIC void HPGL2_graphics() { /* * IN - Initialize * SP - Select pen * SD - Set default font */ fprintf(gpoutfile, "INSP1SD1,%d,2,%d,", HPGL2_font->symbol_set, HPGL2_font->spacing); if (HPGL2_font->spacing) fprintf(gpoutfile, "4,%f,", HPGL2_font->height); else fprintf(gpoutfile, "3,%f,", HPGL2_font->pitch); fprintf(gpoutfile, "5,%d,6,%d,7,%d;SS;\n", HPGL2_font->posture, HPGL2_font->stroke_weight, HPGL2_font->typeface); /* * Add a set of user-defined dashed linetypes if the dashed option is * selected. Of course, the UL's below can be edited to user preference. */ if (HPGL2_solid == 0) { fputs("\ UL1,100;\n\ UL2,8,8,9,8,8,9,8,8,9,8,8,9;\n\ UL3,6,6,6,7,6,6,6,7,6,6,6,7,6,6,6,7;\n\ UL4,5,5,5,10,5,5,5,10,5,5,5,10;\n\ UL5,5,5,5,5,5,8,5,5,5,5,5,8,5,5,5,5,5,9;\n\ UL6,8,8,0,9,8,8,0,9,8,8,0,9;\n\ UL7,4,4,4,4,0,4,4,4,4,4,0,4,4,4,4,4,0,4;\n\ UL8,6,6,6,6,6,6,0,6,6,6,6,6,6,6,0,6;\n", gpoutfile); } /* * Control variables */ HPGL_ang = 0; /* Horizontal */ HPGL2_in_pe = FALSE; /* Not in PE command */ HPGL2_lost = TRUE; /* Pen position is unknown */ HPGL_penstate = UP; /* Pen is up */ } TERM_PUBLIC void PCL_graphics() { /* * Enter HPGL/2 graphics mode */ fputs("\033%0B", gpoutfile); HPGL2_graphics(); } TERM_PUBLIC void HPGL_text() { if (HPGL_eject == 0) { fputs("PUSP0;\033.Z\n\0", gpoutfile); /* 1 2 3 1. pen up 2. park pen 3. disable eavesdropping */ } else { fputs("PUSP0;PG;\033.Z\n\0", gpoutfile); /* 1 2 3 4 1. pen up 2. park pen 3. page eject 4. disable eavesdropping */ } HPGL_penstate = UP; } #if 0 /* not used */ void HPGL2_text() { /* * If in Polyline Encoded command, leave Polyline Encoded command */ if (HPGL2_in_pe) { fputs(";\n", gpoutfile); HPGL2_in_pe = 0; } /* * Pen up, park pen */ fputs("PUSP0;", gpoutfile); HPGL_penstate = UP; } #endif TERM_PUBLIC void PCL_text() { if (HPGL2_in_pe) { fputs(";\n", gpoutfile); HPGL2_in_pe = 0; } /* * Go into PCL mode and eject the page */ fputs("\033%1A\033&l0H\n\0", gpoutfile); } TERM_PUBLIC void HPGL_linetype(int linetype) { if (linetype < -2) linetype = LT_BLACK; /* allow for set number of pens */ linetype = (linetype + 2) % HPGL_numpen + 1; /* only select pen if necessary */ if (HPGL_pentype != linetype) { fprintf(gpoutfile, "PU;\nSP%d;\n", linetype); HPGL_pentype = linetype; HPGL_penstate = UP; } } TERM_PUBLIC void HPGL2_linetype(int linetype) { /* * If in Polyline Encoded command, leave Polyline Encoded command */ if (HPGL2_in_pe) { fputs(";\n", gpoutfile); HPGL2_in_pe = 0; } /* allow for set number of pens for color displays */ if (HPGL2_color == 1) { if (linetype >= 0) { if (HPGL2_solid == 0) HPGL2_dashed = linetype % HPGL2_LINETYPES + 1; linetype = (linetype + 2) % HPGL2_numpen + 1; } /* only select pen if necessary */ if (linetype != HPGL2_pentype) { if (linetype >= 0) { if (HPGL2_solid == 0) { fprintf(gpoutfile, "PU;\nSP%d;\nLT%d;", linetype, HPGL2_dashed); } else fprintf(gpoutfile, "PU;\nSP%d;\nLT;", linetype); /* Borders and Tics */ } else if (linetype == LT_BLACK) { fprintf(gpoutfile, "PU;\nSP1;\nPW.2LT"); /* Axes and Grids */ } else if (linetype == LT_AXIS) fprintf(gpoutfile, "PU;\nSP1;\nPW.2LT1,.25"); HPGL_penstate = UP; HPGL2_pentype = linetype; } /* allow for lots of linetypes for monochrome displays */ } else { if (linetype >= 0) { if (HPGL2_solid == 0) HPGL2_dashed = linetype % HPGL2_LINETYPES + 1; linetype = linetype % (HPGL2_LINETYPES * HPGL2_PENWIDTHS); } /* only select pen if necessary */ if (linetype != HPGL2_pentype) { if (linetype >= 0) { if (HPGL2_solid == 0) { fprintf(gpoutfile, "PW%sLT%d%s", HPGL2_pw[linetype / HPGL2_LINETYPES], HPGL2_dashed, HPGL2_lt[linetype % HPGL2_LINETYPES]); } else fprintf(gpoutfile, "PW%sLT", HPGL2_pw[linetype / HPGL2_LINETYPES]); /* Borders and Tics */ } else if (linetype == LT_BLACK) { fprintf(gpoutfile, "PW.2LT"); /* Axes and Grids */ } else if (linetype == LT_AXIS) fprintf(gpoutfile, "PW.1LT1,.25"); HPGL2_pentype = linetype; } } } TERM_PUBLIC void HPGL_put_text(unsigned int x, unsigned int y, const char *str) { if (HPGL_ang == 1) HPGL_move(x + HPGL_VCHAR / 4, y); else HPGL_move(x, y - HPGL_VCHAR / 4); if (encoding == S_ENC_CP850) { unsigned char *s; fputs("LB", gpoutfile); for (s = (unsigned char *) str; *s; ++s) if (*s >= 128 && hpgl_cp_850[*s - 128][0]) fputs(hpgl_cp_850[*s - 128], gpoutfile); else putc(*s, gpoutfile); fputs("\003\n", gpoutfile); } else if (encoding == S_ENC_ISO8859_1) { unsigned char *s; fputs("LB", gpoutfile); for (s = (unsigned char *) str; *s; ++s) if (*s >= 128 && hpgl_iso_8859_1[*s - 128][0]) fputs(hpgl_iso_8859_1[*s - 128], gpoutfile); else putc(*s, gpoutfile); fputs("\003\n", gpoutfile); } else fprintf(gpoutfile, "LB%s\003\n", str); } TERM_PUBLIC void HPGL2_put_text(unsigned int x, unsigned int y, const char *str) { struct termentry *t = term; /* * Position the pen */ if (HPGL_ang == 1) HPGL2_move(x + t->v_char / 4, y); else HPGL2_move(x, y - t->v_char / 4); /* * If in Polyline Encoded command, leave Polyline Encoded command */ if (HPGL2_in_pe) { fputs(";\n", gpoutfile); HPGL2_in_pe = 0; } /* * Print the text string */ fprintf(gpoutfile, "LB%s\003\n", str); HPGL2_lost = 1; } /* * Some early HPGL plotters (e.g. HP7220C) require the * Pen Up/Down and Pen (move) Absolute commands to be separate. */ TERM_PUBLIC void HPGL_move(unsigned int x, unsigned int y) { if (HPGL_x != x || HPGL_y != y) { /* only move if necessary */ fprintf(gpoutfile, "PU;PA%d,%d;\n", x, y); HPGL_penstate = UP; HPGL_x = x; HPGL_y = y; } } TERM_PUBLIC void HPGL_vector(unsigned int x, unsigned int y) { if (HPGL_penstate != DOWN) { fprintf(gpoutfile, "PD;PA%d,%d;\n", x, y); HPGL_penstate = DOWN; } else fprintf(gpoutfile, "PA%d,%d;\n", x, y); HPGL_x = x; HPGL_y = y; } TERM_PUBLIC void HPGL2_move(unsigned int x, unsigned int y) { int dx, dy; if (HPGL2_in_pe) { dx = x - HPGL_x; dy = y - HPGL_y; fputs("<", gpoutfile); } else { #if HPGL2_BASE64 fputs("PE<", gpoutfile); #else fputs("PE7<", gpoutfile); #endif if (HPGL2_lost) { dx = x; dy = y; HPGL2_lost = 0; fputs("=", gpoutfile); } else { dx = x - HPGL_x; dy = y - HPGL_y; } HPGL2_in_pe = 1; } #if HPGL2_EXPLICIT_PD if (HPGL_penstate == DOWN) HPGL_penstate = UP; #endif HPGL2_encode(dx); HPGL2_encode(dy); fputs("\n", gpoutfile); HPGL_x = x; HPGL_y = y; } TERM_PUBLIC void HPGL2_vector(unsigned int x, unsigned int y) { int dx, dy; if (HPGL2_in_pe) { dx = x - HPGL_x; dy = y - HPGL_y; } else { #if HPGL2_BASE64 fputs("PE", gpoutfile); #else fputs("PE7", gpoutfile); #endif if (HPGL2_lost) { dx = x; dy = y; HPGL2_lost = 0; fputs("=", gpoutfile); } else { dx = x - HPGL_x; dy = y - HPGL_y; } HPGL2_in_pe = 1; } #if HPGL2_EXPLICIT_PD /* * Put the pen down in the current position, * relative vector of 0,0. */ if (HPGL_penstate == UP) { fputc((char) HPGL2_HIGH_OFFS, gpoutfile); fputc((char) HPGL2_HIGH_OFFS, gpoutfile); HPGL_penstate = DOWN; } #endif HPGL2_encode(dx); HPGL2_encode(dy); fputs("\n", gpoutfile); HPGL_x = x; HPGL_y = y; } /* * Routine to encode position in base 32 or base 64 characters */ TERM_PUBLIC void HPGL2_encode(int d) { int c; if ((d <<= 1) < 0) d = 1 - d; do { c = d & HPGL2_MASK; d >>= HPGL2_BITS; if (d > 0) fputc((char) (c + HPGL2_LOW_OFFS), gpoutfile); else fputc((char) (c + HPGL2_HIGH_OFFS), gpoutfile); } while (d > 0); } TERM_PUBLIC int HPGL_text_angle(int ang) { if (ang == -90 || ang == 270) HPGL_ang = -1; else HPGL_ang = (ang ? 1 : 0); if (HPGL_ang == 0) /* Horizontal */ fputs("DI1,0;\n", gpoutfile); else if (HPGL_ang == -1) /* Vertical Down */ fputs("DI0,-1;\n", gpoutfile); else /* Vertical Up */ fputs("DI0,1;\n", gpoutfile); return TRUE; } TERM_PUBLIC int HPGL2_text_angle(int ang) { /* * If in Polyline Encoded command, leave Polyline Encoded command */ if (ang == -90 || ang == 270) HPGL_ang = -1; else HPGL_ang = (ang ? 1 : 0); if (HPGL2_in_pe) { fputs(";", gpoutfile); HPGL2_in_pe = 0; } if (HPGL_ang == 1) /* Vertical Up */ fputs("DI0,1", gpoutfile); else if (HPGL_ang == -1) /* Vertical Down */ fputs("DI0,-1", gpoutfile); else /* Horizontal */ fputs("DI1,0", gpoutfile); return TRUE; } TERM_PUBLIC void HPGL_reset() { /* * do nothing */ } #if 0 void HPGL2_reset() { /* * Park the pen * Advance a page * End with ";" */ fputs("SP0PG;\n", gpoutfile); } #endif TERM_PUBLIC void PCL_reset() { /* * Return to PCL mode * Printer reset (conditional eject) */ fputs("\033%0A\033E\n", gpoutfile); } TERM_PUBLIC int HPGL2_justify_text(enum JUSTIFY just) { /* * If in Polyline Encoded command, leave Polyline Encoded command */ if (HPGL2_in_pe) { fputs(";\n", gpoutfile); HPGL2_in_pe = 0; } switch (just) { case LEFT: fputs("LO1", gpoutfile); break; case CENTRE: fputs("LO4", gpoutfile); break; case RIGHT: fputs("LO7", gpoutfile); break; default: return 0; } return 1; } TERM_PUBLIC int HPGL2_set_font(const char *font) { struct termentry *t = term; char name[MAX_ID_LEN + 1]; int i, sep, int_size, sep2; double size; /* * If in Polyline Encoded command, leave Polyline Encoded command */ if (HPGL2_in_pe) { fputs(";\n", gpoutfile); HPGL2_in_pe = 0; } /* determine font, use default from options if invalid */ sep = strcspn(font, ","); strncpy(name, font, sep); name[sep] = NUL; for (i = 0; i < HPGL2_FONTS; i++) { sep2 = strcspn(HPGL2_font_table[i].compare, "$"); if (strncmp(name, HPGL2_font_table[i].compare, sep2) == 0) break; } if (i >= HPGL2_FONTS) i = HPGL2_font_num; /* determine font size, use default from options if invalid */ int_size = 0; sscanf(&(font[sep + 1]), "%d", &int_size); if (int_size > 0) { size = int_size; } else size = HPGL2_point_size; /* apply font changes only if necessary */ if (size == HPGL2_point_size_current && i == HPGL2_font_num_current) return FALSE; HPGL2_font = &HPGL2_font_table[i]; HPGL2_font_num_current = i; HPGL2_point_size_current = size; t->v_char = (int) HPGL_PUPI *HPGL2_point_size_current / 72; t->h_char = t->v_char * 2 / 3; fprintf(gpoutfile, "SD1,%d,2,%d,", HPGL2_font->symbol_set, HPGL2_font->spacing); if (HPGL2_font->spacing) { HPGL2_font->height = HPGL2_point_size_current; fprintf(gpoutfile, "4,%f,", HPGL2_font->height); } else { HPGL2_font->pitch = 72 * 3 / (HPGL2_point_size_current * 2); fprintf(gpoutfile, "3,%f,", HPGL2_font->pitch); } fprintf(gpoutfile, "5,%d,6,%d,7,%d;SS;\n", HPGL2_font->posture, HPGL2_font->stroke_weight, HPGL2_font->typeface); return TRUE; } TERM_PUBLIC void HPGL2_point(unsigned int x, unsigned int y, int number) { int htic, vtic; if (pspointset) { /* postscript style points */ if (number < 0) { HPGL2_neg_point(x, y, number); } else { htic = (int) (HPGL2_psize * PCL_HTIC / 2); vtic = (int) (HPGL2_psize * PCL_VTIC / 2); number %= HPGL2_NUM_PSPOINTS; switch (number) { case 0: /* plus */ HPGL2_move(x - htic, y); HPGL2_vector(x - htic, y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - vtic); HPGL2_vector(x, y + vtic); break; case 1: /* X */ HPGL2_move(x - htic, y - vtic); HPGL2_vector(x - htic, y - vtic); HPGL2_vector(x + htic, y + vtic); HPGL2_move(x - htic, y + vtic); HPGL2_vector(x - htic, y + vtic); HPGL2_vector(x + htic, y - vtic); break; case 2: /* star */ HPGL2_move(x - htic, y); HPGL2_vector(x - htic, y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - vtic); HPGL2_vector(x, y + vtic); HPGL2_move(x - htic, y - vtic); HPGL2_vector(x - htic, y - vtic); HPGL2_vector(x + htic, y + vtic); HPGL2_move(x - htic, y + vtic); HPGL2_vector(x - htic, y + vtic); HPGL2_vector(x + htic, y - vtic); break; case 3: /* hollow square 1 */ HPGL2_move(x - (3 * htic / 4), y - (3 * vtic / 4)); HPGL2_vector(x + (3 * htic / 4), y - (3 * vtic / 4)); HPGL2_vector(x + (3 * htic / 4), y + (3 * vtic / 4)); HPGL2_vector(x - (3 * htic / 4), y + (3 * vtic / 4)); HPGL2_vector(x - (3 * htic / 4), y - (3 * vtic / 4)); HPGL2_move(x, y); HPGL2_vector(x, y); break; case 4: /* solid square 1 */ HPGL2_move(x - (3 * htic / 4), y - (3 * vtic / 4)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%.2f,%.2f;EP;\n", ((double) x + (3 * htic / 4)), ((double) y + (3 * vtic / 4))); break; case 5: /* hollow circle 1 */ HPGL2_move(x, y); HPGL2_vector(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4)); break; case 6: /* solid circle 1 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4)); break; case 7: /* hollow triangle 1 */ HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8)); HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8)); HPGL2_vector(x, y + (3 * vtic / 4)); HPGL2_move(x, y); HPGL2_vector(x, y); break; case 8: /* solid triangle 1 */ HPGL2_move(x, y + (3 * vtic / 4)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8)); HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8)); HPGL2_vector(x, y + (3 * vtic / 4)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 9: /* hollow triangle 2 */ HPGL2_move(x, y - (3 * vtic / 4)); HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8)); HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8)); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_move(x, y); HPGL2_vector(x, y); break; case 10: /* solid triangle 2 */ HPGL2_move(x, y - (3 * vtic / 4)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8)); HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8)); HPGL2_vector(x, y - (3 * vtic / 4)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 11: /* hollow diamond 1 */ HPGL2_move(x - (3 * htic / 4), y); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_vector(x + (3 * htic / 4), y); HPGL2_vector(x, y + (3 * vtic / 4)); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x, y); HPGL2_vector(x, y); break; case 12: /* solid diamond 1 */ HPGL2_move(x - (3 * htic / 4), y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_vector(x + (3 * htic / 4), y); HPGL2_vector(x, y + (3 * vtic / 4)); HPGL2_vector(x - (3 * htic / 4), y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 13: /* hollow pentagon 1 */ HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x - (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x - (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x + (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x + (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x, y + (3 * vtic / 4)); HPGL2_move(x, y); HPGL2_vector(x, y); break; case 14: /* solid pentagon */ HPGL2_move(x, y + (3 * vtic / 4)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x - (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x - (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x + (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x + (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x, y + (3 * vtic / 4)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 15: /* hollow circle 2 */ HPGL2_move(x, y + vtic); HPGL2_vector(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "CI%d;\n", htic); break; case 16: /* semisolid circle 1 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,0,90;EP;EW%d,90,270;\n", htic, htic); break; case 17: /* semisolid circle 2 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,90,90;EP;EW%d,180,270;\n", htic, htic); break; case 18: /* semisolid circle 3 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,0,180;EP;EW%d,180,180;\n", htic, htic); break; case 19: /* semisolid circle 4 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,180,90;EP;EW%d,270,270;\n", htic, htic); break; case 20: /* semisolid circle 5 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,0,90;EP;EW%d,90,90;WG%d,180,90;EP;EW%d,270,90;\n", htic, htic, htic, htic); break; case 21: /* semisolid circle 6 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,90,180;EP;EW%d,270,180;\n", htic, htic); break; case 22: /* semisolid circle 7 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,0,270;EP;EW%d,270,90;\n", htic, htic); break; case 23: /* semisolid circle 8 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,270,90;EP;EW%d,0,270;\n", htic, htic); break; case 24: /* semisolid circle 9 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,270,180;EP;EW%d,90,180;\n", htic, htic); break; case 25: /* semisolid circle 10 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,90,90;EP;EW%d,180,90;WG%d,270,90;EP;EW%d,0,90;\n", htic, htic, htic, htic); break; case 26: /* semisolid circle 11 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,270,270;EP;EW%d,180,90;\n", htic, htic); break; case 27: /* semisolid circle 12 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,180,180;EP;EW%d,0,180;\n", htic, htic); break; case 28: /* semisolid circle 13 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,180,270;EP;EW%d,90,90;\n", htic, htic); break; case 29: /* semisolid circle 14 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,90,270;EP;EW%d,0,90;\n", htic, htic); break; case 30: /* solid circle 2 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%d,0,360;EP;\n", htic); break; case 31: /* hollow square 2 */ HPGL2_move(x - htic, y - vtic); HPGL2_vector(x + htic, y - vtic); HPGL2_vector(x + htic, y + vtic); HPGL2_vector(x - htic, y + vtic); HPGL2_vector(x - htic, y - vtic); HPGL2_move(x, y + vtic); HPGL2_vector(x, y); break; case 32: /* semisolid square 1 */ HPGL2_move(x, y + vtic); HPGL2_vector(x - htic, y + vtic); HPGL2_vector(x - htic, y - vtic); HPGL2_vector(x + htic, y - vtic); HPGL2_vector(x + htic, y); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic); break; case 33: /* semisolid square 2 */ HPGL2_move(x - htic, y); HPGL2_vector(x - htic, y - vtic); HPGL2_vector(x + htic, y - vtic); HPGL2_vector(x + htic, y + vtic); HPGL2_vector(x, y + vtic); HPGL2_move(x - htic, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y + vtic); break; case 34: /* semisolid square 3 */ HPGL2_move(x - htic, y); HPGL2_vector(x - htic, y - vtic); HPGL2_vector(x + htic, y - vtic); HPGL2_vector(x + htic, y); HPGL2_move(x - htic, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic); break; case 35: /* semisolid square 4 */ HPGL2_move(x, y - vtic); HPGL2_vector(x + htic, y - vtic); HPGL2_vector(x + htic, y + vtic); HPGL2_vector(x - htic, y + vtic); HPGL2_vector(x - htic, y); HPGL2_move(x - htic, y - vtic); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y); break; case 36: /* semisolid square 5 */ HPGL2_move(x, y - vtic); HPGL2_vector(x + htic, y - vtic); HPGL2_vector(x + htic, y); HPGL2_move(x, y + vtic); HPGL2_vector(x - htic, y + vtic); HPGL2_vector(x - htic, y); HPGL2_move(x - htic, y - vtic); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic); break; case 37: /* semisolid square 6 */ HPGL2_move(x, y - vtic); HPGL2_vector(x + htic, y - vtic); HPGL2_vector(x + htic, y + vtic); HPGL2_vector(x, y + vtic); HPGL2_move(x - htic, y - vtic); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y + vtic); break; case 38: /* semisolid square 7 */ HPGL2_move(x, y - vtic); HPGL2_vector(x + htic, y - vtic); HPGL2_vector(x + htic, y); HPGL2_move(x - htic, y - vtic); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic); break; case 39: /* semisolid square 8 */ HPGL2_move(x + htic, y); HPGL2_vector(x + htic, y + vtic); HPGL2_vector(x - htic, y + vtic); HPGL2_vector(x - htic, y - vtic); HPGL2_vector(x, y - vtic); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y); break; case 40: /* semisolid square 9 */ HPGL2_move(x, y + vtic); HPGL2_vector(x - htic, y + vtic); HPGL2_vector(x - htic, y - vtic); HPGL2_vector(x, y - vtic); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic); break; case 41: /* semisolid square 10 */ HPGL2_move(x - htic, y); HPGL2_vector(x - htic, y - vtic); HPGL2_vector(x, y - vtic); HPGL2_move(x + htic, y); HPGL2_vector(x + htic, y + vtic); HPGL2_vector(x, y + vtic); HPGL2_move(x - htic, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y + vtic); HPGL2_move(x, y - vtic); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y); break; case 42: /* semisolid square 11 */ HPGL2_move(x - htic, y); HPGL2_vector(x - htic, y - vtic); HPGL2_vector(x, y - vtic); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic); HPGL2_move(x - htic, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y + vtic); break; case 43: /* semisolid square 12 */ HPGL2_move(x + htic, y); HPGL2_vector(x + htic, y + vtic); HPGL2_vector(x - htic, y + vtic); HPGL2_vector(x - htic, y); HPGL2_move(x - htic, y - vtic); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y); break; case 44: /* semisolid square 13 */ HPGL2_move(x, y + vtic); HPGL2_vector(x - htic, y + vtic); HPGL2_vector(x - htic, y); HPGL2_move(x - htic, y - vtic); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic); break; case 45: /* semisolid square 14 */ HPGL2_move(x + htic, y); HPGL2_vector(x + htic, y + vtic); HPGL2_vector(x, y + vtic); HPGL2_move(x - htic, y - vtic); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y); HPGL2_move(x - htic, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y + vtic); break; case 46: /* solid square 2 */ HPGL2_move(x - htic, y - vtic); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic); break; case 47: /* hollow diamond 2 */ HPGL2_move(x - htic, y); HPGL2_vector(x, y - vtic); HPGL2_vector(x + htic, y); HPGL2_vector(x, y + vtic); HPGL2_vector(x - htic, y); HPGL2_move(x - (htic / 2), y + (vtic / 2)); HPGL2_vector(x, y); break; case 48: /* semisolid diamond 1 */ HPGL2_move(x - (htic / 2), y + (vtic / 2)); HPGL2_vector(x - htic, y); HPGL2_vector(x, y - vtic); HPGL2_vector(x + htic, y); HPGL2_vector(x + (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x, y + vtic); HPGL2_vector(x - (htic / 2), y + (vtic / 2)); HPGL2_vector(x, y); HPGL2_vector(x + (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 49: /* semisolid diamond 2 */ HPGL2_move(x - (htic / 2), y - (vtic / 2)); HPGL2_vector(x, y - vtic); HPGL2_vector(x + htic, y); HPGL2_vector(x, y + vtic); HPGL2_vector(x - (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x - htic, y); HPGL2_vector(x - (htic / 2), y - (vtic / 2)); HPGL2_vector(x, y); HPGL2_vector(x - (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 50: /* semisolid diamond 3 */ HPGL2_move(x - (htic / 2), y - (vtic / 2)); HPGL2_vector(x, y - vtic); HPGL2_vector(x + htic, y); HPGL2_vector(x + (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x - (htic / 2), y - (vtic / 2)); HPGL2_vector(x - htic, y); HPGL2_vector(x, y + vtic); HPGL2_vector(x + (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 51: /* semisolid diamond 4 */ HPGL2_move(x + (htic / 2), y - (vtic / 2)); HPGL2_vector(x + htic, y); HPGL2_vector(x, y + vtic); HPGL2_vector(x - htic, y); HPGL2_vector(x - (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x, y); HPGL2_vector(x + (htic / 2), y - (vtic / 2)); HPGL2_vector(x, y - vtic); HPGL2_vector(x - (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 52: /* semisolid diamond 5 */ HPGL2_move(x - (htic / 2), y + (vtic / 2)); HPGL2_vector(x - htic, y); HPGL2_vector(x - (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x, y); HPGL2_vector(x + (htic / 2), y - (vtic / 2)); HPGL2_vector(x, y - vtic); HPGL2_vector(x - (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); HPGL2_move(x + (htic / 2), y - (vtic / 2)); HPGL2_vector(x + htic, y); HPGL2_vector(x + (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x, y + vtic); HPGL2_vector(x - (htic / 2), y + (vtic / 2)); HPGL2_vector(x, y); HPGL2_vector(x + (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 53: /* semisolid diamond 6 */ HPGL2_move(x + (htic / 2), y - (vtic / 2)); HPGL2_vector(x + htic, y); HPGL2_vector(x, y + vtic); HPGL2_vector(x - (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x - htic, y); HPGL2_vector(x, y - vtic); HPGL2_vector(x + (htic / 2), y - (vtic / 2)); HPGL2_vector(x - (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 54: /* semisolid diamond 7 */ HPGL2_move(x + (htic / 2), y - (vtic / 2)); HPGL2_vector(x + htic, y); HPGL2_vector(x + (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x, y + vtic); HPGL2_vector(x - htic, y); HPGL2_vector(x, y - vtic); HPGL2_vector(x + (htic / 2), y - (vtic / 2)); HPGL2_vector(x, y); HPGL2_vector(x + (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 55: /* semisolid diamond 8 */ HPGL2_move(x + (htic / 2), y + (vtic / 2)); HPGL2_vector(x, y + vtic); HPGL2_vector(x - htic, y); HPGL2_vector(x, y - vtic); HPGL2_vector(x + (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x, y); HPGL2_vector(x + (htic / 2), y + (vtic / 2)); HPGL2_vector(x + htic, y); HPGL2_vector(x + (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 56: /* semisolid diamond 9 */ HPGL2_move(x - (htic / 2), y + (vtic / 2)); HPGL2_vector(x - htic, y); HPGL2_vector(x, y - vtic); HPGL2_vector(x + (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x - (htic / 2), y + (vtic / 2)); HPGL2_vector(x, y + vtic); HPGL2_vector(x + htic, y); HPGL2_vector(x + (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 57: /* semisolid diamond 10 */ HPGL2_move(x + (htic / 2), y + (vtic / 2)); HPGL2_vector(x, y + vtic); HPGL2_vector(x - (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x, y); HPGL2_vector(x - (htic / 2), y - (vtic / 2)); HPGL2_vector(x - htic, y); HPGL2_vector(x - (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); HPGL2_move(x - (htic / 2), y - (vtic / 2)); HPGL2_vector(x, y - vtic); HPGL2_vector(x + (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x, y); HPGL2_vector(x + (htic / 2), y + (vtic / 2)); HPGL2_vector(x + htic, y); HPGL2_vector(x + (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 58: /* semisolid diamond 11 */ HPGL2_move(x - (htic / 2), y - (vtic / 2)); HPGL2_vector(x, y - vtic); HPGL2_vector(x + (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x, y); HPGL2_vector(x - (htic / 2), y - (vtic / 2)); HPGL2_vector(x - htic, y); HPGL2_vector(x, y + vtic); HPGL2_vector(x + htic, y); HPGL2_vector(x + (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 59: /* semisolid diamond 12 */ HPGL2_move(x + (htic / 2), y + (vtic / 2)); HPGL2_vector(x, y + vtic); HPGL2_vector(x - htic, y); HPGL2_vector(x - (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x + (htic / 2), y + (vtic / 2)); HPGL2_vector(x + htic, y); HPGL2_vector(x, y - vtic); HPGL2_vector(x - (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 60: /* semisolid diamond 13 */ HPGL2_move(x - (htic / 2), y + (vtic / 2)); HPGL2_vector(x - htic, y); HPGL2_vector(x - (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x, y - vtic); HPGL2_vector(x + htic, y); HPGL2_vector(x, y + vtic); HPGL2_vector(x - (htic / 2), y + (vtic / 2)); HPGL2_vector(x, y); HPGL2_vector(x - (htic / 2), y - (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 61: /* semisolid diamond 14 */ HPGL2_move(x + (htic / 2), y + (vtic / 2)); HPGL2_vector(x, y + vtic); HPGL2_vector(x - (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x - htic, y); HPGL2_vector(x, y - vtic); HPGL2_vector(x + htic, y); HPGL2_vector(x + (htic / 2), y + (vtic / 2)); HPGL2_vector(x, y); HPGL2_vector(x - (htic / 2), y + (vtic / 2)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 62: /* solid diamond 2 */ HPGL2_move(x - htic, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x, y - vtic); HPGL2_vector(x + htic, y); HPGL2_vector(x, y + vtic); HPGL2_vector(x - htic, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FP;EP;\n"); break; case 63: /* hollow square 3 */ HPGL2_move(x - (3 * htic / 4), y - (3 * vtic / 4)); HPGL2_vector(x + (3 * htic / 4), y - (3 * vtic / 4)); HPGL2_vector(x + (3 * htic / 4), y + (3 * vtic / 4)); HPGL2_vector(x - (3 * htic / 4), y + (3 * vtic / 4)); HPGL2_vector(x - (3 * htic / 4), y - (3 * vtic / 4)); break; case 64: /* hollow circle 3 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4)); break; case 65: /* hollow triangle 3 */ HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8)); HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8)); HPGL2_vector(x, y + (3 * vtic / 4)); break; case 66: /* hollow triangle 4 */ HPGL2_move(x, y - (3 * vtic / 4)); HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8)); HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8)); HPGL2_vector(x, y - (3 * vtic / 4)); break; case 67: /* hollow diamond 3 */ HPGL2_move(x - (3 * htic / 4), y); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_vector(x + (3 * htic / 4), y); HPGL2_vector(x, y + (3 * vtic / 4)); HPGL2_vector(x - (3 * htic / 4), y); break; case 68: /* hollow pentagon 2 */ HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x - (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x - (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x + (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x + (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x, y + (3 * vtic / 4)); break; case 69: /* opaque square */ HPGL2_move(x - htic, y - vtic); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "FT10,30;RA%d,%d;EP;FT;\n", x + (3 * htic / 4), y + (3 * vtic / 4)); break; case 70: /* opaque circle */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "FT10,30;WG%.2f,0,360;EP;FT;\n", ((double) 3 * (htic) / 4)); break; case 71: /* opaque triangle 1 */ HPGL2_move(x, y + (3 * vtic / 4)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8)); HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8)); HPGL2_vector(x, y + (3 * vtic / 4)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FT10,30;FP;EP;FT;\n"); break; case 72: /* opaque triangle 2 */ HPGL2_move(x, y - (3 * vtic / 4)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8)); HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8)); HPGL2_vector(x, y - (3 * vtic / 4)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FT10,30;FP;EP;FT;\n"); break; case 73: /* opaque diamond */ HPGL2_move(x - (3 * htic / 4), y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_vector(x + (3 * htic / 4), y); HPGL2_vector(x, y + (3 * vtic / 4)); HPGL2_vector(x - (3 * htic / 4), y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FT10,30;FP;EP;FT;\n"); break; case 74: /* opaque pentagon */ HPGL2_move(x, y + (3 * vtic / 4)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM0;\n"); HPGL2_vector(x - (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x - (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x + (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x + (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4)); HPGL2_vector(x, y + (3 * vtic / 4)); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "PM2;FT10,30;FP;EP;FT;\n"); break; } } } else { /* default style points */ if (number < 0) { HPGL2_neg_point(x, y, number); } else { htic = (int) (HPGL2_psize * PCL_HTIC / 2); vtic = (int) (HPGL2_psize * PCL_VTIC / 2); number %= HPGL2_NUM_NOPSPOINTS; switch (number) { case 0: /* diamond */ HPGL2_move(x - htic, y); HPGL2_vector(x, y - vtic); HPGL2_vector(x + htic, y); HPGL2_vector(x, y + vtic); HPGL2_vector(x - htic, y); HPGL2_move(x, y); HPGL2_vector(x, y); break; case 1: /* plus */ HPGL2_move(x - htic, y); HPGL2_vector(x - htic, y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - vtic); HPGL2_vector(x, y + vtic); break; case 2: /* box */ HPGL2_move(x - htic, y - vtic); HPGL2_vector(x - htic, y - vtic); HPGL2_vector(x + htic, y - vtic); HPGL2_vector(x + htic, y + vtic); HPGL2_vector(x - htic, y + vtic); HPGL2_vector(x - htic, y - vtic); HPGL2_move(x, y); HPGL2_vector(x, y); break; case 3: /* X */ HPGL2_move(x - htic, y - vtic); HPGL2_vector(x - htic, y - vtic); HPGL2_vector(x + htic, y + vtic); HPGL2_move(x - htic, y + vtic); HPGL2_vector(x - htic, y + vtic); HPGL2_vector(x + htic, y - vtic); break; case 4: /* triangle */ HPGL2_move(x, y + (4 * vtic / 3)); HPGL2_vector(x - (4 * htic / 3), y - (2 * vtic / 3)); HPGL2_vector(x + (4 * htic / 3), y - (2 * vtic / 3)); HPGL2_vector(x, y + (4 * vtic / 3)); HPGL2_move(x, y); HPGL2_vector(x, y); break; case 5: /* star */ HPGL2_move(x - htic, y); HPGL2_vector(x - htic, y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - vtic); HPGL2_vector(x, y + vtic); HPGL2_move(x - htic, y - vtic); HPGL2_vector(x - htic, y - vtic); HPGL2_vector(x + htic, y + vtic); HPGL2_move(x - htic, y + vtic); HPGL2_vector(x - htic, y + vtic); HPGL2_vector(x + htic, y - vtic); break; } } } } /* * This is for special purpose negative point types. If they are not needed, * they should be safely ignorable, but the special pointypes can be omitted * if necessary, leaving only the dot (which is -1). */ TERM_PUBLIC void HPGL2_neg_point(unsigned int x, unsigned int y, int number) { int htic, vtic; htic = (int) (HPGL2_psize * PCL_HTIC / 2); vtic = (int) (HPGL2_psize * PCL_VTIC / 2); switch (number) { case -20: /* well 18 */ HPGL2_move(x - htic, y - vtic); HPGL2_vector(x + htic, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4)); break; case -19: /* well 17 */ HPGL2_move(x, y - vtic); HPGL2_vector(x, y - (vtic / 2)); HPGL2_move(x, y + (vtic / 2)); HPGL2_vector(x, y + vtic); HPGL2_move(x, y - vtic); HPGL2_vector(x - (htic / 4), y - (3 * vtic / 4)); HPGL2_move(x, y - vtic); HPGL2_vector(x + (htic / 4), y - (3 * vtic / 4)); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "CI%.2f;\n", ((double) (htic) / 2)); break; case -18: /* well 16 */ HPGL2_move(x - htic, y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4)); break; case -17: /* well 15 */ HPGL2_move(x - htic, y - vtic); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2)); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + htic, y + vtic); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - htic, y); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x + (3 * htic / 4), y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "EW%.2f,0,180;\n", ((double) 3 * (htic) / 4)); fprintf(gpoutfile, "WG%.2f,180,180;EP;\n", ((double) 3 * (htic) / 4)); break; case -16: /* well 14 */ HPGL2_move(x - htic, y - vtic); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + htic, y + vtic); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - htic, y); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x + (3 * htic / 4), y); HPGL2_vector(x + htic, y); HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4)); break; case -15: /* well 13 */ HPGL2_move(x - htic, y - vtic); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2)); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + htic, y + vtic); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - htic, y); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x + (3 * htic / 4), y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4)); break; case -14: /* well 12 */ HPGL2_move(x - htic, y - vtic); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2)); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + htic, y + vtic); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - htic, y); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x + (3 * htic / 4), y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4)); break; case -13: /* well 11 */ HPGL2_move(x - htic, y - vtic); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + htic, y + vtic); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4)); break; case -12: /* well 10 */ HPGL2_move(x + (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - htic, y); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x + (3 * htic / 4), y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "EW%.2f,0,180;\n", ((double) 3 * (htic) / 4)); fprintf(gpoutfile, "WG%.2f,180,180;EP;\n", ((double) 3 * (htic) / 4)); break; case -11: /* well 9 */ HPGL2_move(x + (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - htic, y); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x + (3 * htic / 4), y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4)); break; case -10: /* well 8 */ HPGL2_move(x - htic, y); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x + (3 * htic / 4), y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "EW%.2f,0,180;\n", ((double) 3 * (htic) / 4)); fprintf(gpoutfile, "WG%.2f,180,180;EP;\n", ((double) 3 * (htic) / 4)); break; case -9: /* well 7 */ HPGL2_move(x - (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2)); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2)); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - htic, y); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x + (3 * htic / 4), y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "EW%.2f,0,180;\n", ((double) 3 * (htic) / 4)); fprintf(gpoutfile, "WG%.2f,180,180;EP;\n", ((double) 3 * (htic) / 4)); break; case -8: /* well 6 */ HPGL2_move(x + (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - htic, y); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x + (3 * htic / 4), y); HPGL2_vector(x + htic, y); HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4)); break; case -7: /* well 5 */ HPGL2_move(x - (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2)); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2)); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - htic, y); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x + (3 * htic / 4), y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4)); break; case -6: /* well 4 */ HPGL2_move(x - (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2)); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2)); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8)); HPGL2_move(x + (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2)); HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8)); HPGL2_move(x - htic, y); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x + (3 * htic / 4), y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4)); break; case -5: /* well 3 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4)); break; case -4: /* well 2 */ HPGL2_move(x - htic, y); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x + (3 * htic / 4), y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x, y + vtic); HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4)); break; case -3: /* well 1 */ HPGL2_move(x, y); fputs(";\n", gpoutfile); HPGL2_in_pe = 0; fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4)); break; case -2: /* v box */ HPGL2_move(x - htic, y); HPGL2_vector(x - (3 * htic / 4), y); HPGL2_move(x + (3 * htic / 4), y); HPGL2_vector(x + htic, y); HPGL2_move(x, y - vtic); HPGL2_vector(x, y - (3 * vtic / 4)); HPGL2_move(x, y + (3 * vtic / 4)); HPGL2_vector(x, y + vtic); HPGL2_move(x - (3 * htic / 4), y - (3 * vtic / 4)); HPGL2_vector(x + (3 * htic / 4), y - (3 * vtic / 4)); HPGL2_vector(x + (3 * htic / 4), y + (3 * vtic / 4)); HPGL2_vector(x - (3 * htic / 4), y + (3 * vtic / 4)); HPGL2_vector(x - (3 * htic / 4), y - (3 * vtic / 4)); HPGL2_move(x - (htic / 2), y + (vtic / 2)); HPGL2_vector(x, y - (vtic / 2)); HPGL2_vector(x + (htic / 2), y + (vtic / 2)); break; default: /* dot */ HPGL2_move(x, y); HPGL2_vector(x, y); break; return; } } TERM_PUBLIC void HPGL2_pointsize(double size) { HPGL2_psize = (size >= 0 ? size : 1); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(hpgl_driver) "hpgl", "HP7475 and relatives [number of pens] [eject]", HPGL_XMAX, HPGL_YMAX, HPGL_VCHAR, HPGL_HCHAR, HPGL_VTIC, HPGL_HTIC, HPGL_options, HPGL_init, HPGL_reset, HPGL_text, null_scale, HPGL_graphics, HPGL_move, HPGL_vector, HPGL_linetype, HPGL_put_text, HPGL_text_angle, null_justify_text, do_point, do_arrow, set_font_null TERM_TABLE_END(hpgl_driver) #undef LAST_TERM #define LAST_TERM hpgl_driver TERM_TABLE_START(pcl5_driver) "pcl5", "HP Designjet 750C, HP Laserjet III/IV, etc. (many options)", PCL_XMAX, PCL_YMAX, HPGL2_VCHAR, HPGL2_HCHAR, PCL_VTIC, PCL_HTIC, PCL_options, PCL_init, PCL_reset, PCL_text, null_scale, PCL_graphics, HPGL2_move, HPGL2_vector, HPGL2_linetype, HPGL2_put_text, HPGL2_text_angle, HPGL2_justify_text, HPGL2_point, do_arrow, HPGL2_set_font, HPGL2_pointsize TERM_TABLE_END(pcl5_driver) #undef LAST_TERM #define LAST_TERM pcl5_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(hpgl) "1 hpgl", "?commands set terminal hpgl", "?set terminal hpgl", "?set term hpgl", "?terminal hpgl", "?term hpgl", "?hpgl", "?commands set terminal pcl5", "?set terminal pcl5", "?set term pcl5", "?terminal pcl5", "?term pcl5", "?pcl5", " The `hpgl` driver produces HPGL output for devices like the HP7475A plotter.", " There are two options which can be set: the number of pens and `eject`,", " which tells the plotter to eject a page when done. The default is to use 6", " pens and not to eject the page when done.", "", " The international character sets ISO-8859-1 and CP850 are recognized via", " `set encoding iso_8859_1` or `set encoding cp850` (see `set encoding` for", " details).", "", " Syntax:", " set terminal hpgl {} {eject}", "", " The selection", "", " set terminal hpgl 8 eject", "", " is equivalent to the previous `hp7550` terminal, and the selection", "", " set terminal hpgl 4", "", " is equivalent to the previous `hp7580b` terminal.", "", " The `pcl5` driver supports plotters such as the Hewlett-Packard Designjet", " 750C, the Hewlett-Packard Laserjet III, and the Hewlett-Packard Laserjet IV.", " It actually uses HPGL-2, but there is a name conflict among the terminal", " devices. It has several options which must be specified in the order", " indicated below:", "", " Syntax:", " set terminal pcl5 {mode } {}", " {{color {}} | monochrome} {solid | dashed}", " {font } {size } {pspoints | nopspoints}", "", " is `landscape` or `portrait`. is the physical", " plotting size of the plot, which is one of the following: `letter` for", " standard (8 1/2\" X 11\") displays, `legal` for (8 1/2\" X 14\") displays,", " `noextended` for (36\" X 48\") displays (a letter size ratio) or,", " `extended` for (36\" X 55\") displays (almost a legal size ratio).", " `color` is for multi-pen (i.e. color) plots, and is", " the number of pens (i.e. colors) used in color plots. `monochrome` is for", " one (e.g. black) pen plots. `solid` draws all lines as solid lines, or", " `dashed` will draw lines with different dashed and dotted line patterns.", " is `stick`, `univers`, `cg_times`, `zapf_dingbats`, `antique_olive`,", " `arial`, `courier`, `garamond_antigua`, `letter_gothic`, `cg_omega`,", " `albertus`, `times_new_roman`, `clarendon`, `coronet`, `marigold`,", " `truetype_symbols`, or `wingdings`. is the font size in points.", " The point type selection can be the standard default set by specifying", " `nopspoints`, or the same set of point types found in the postscript terminal", " by specifying `pspoints`.", "", " Note that built-in support of some of these options is printer device", " dependent. For instance, all the fonts are supposedly supported by the HP", " Laserjet IV, but only a few (e.g. univers, stick) may be supported by the HP", " Laserjet III and the Designjet 750C. Also, color obviously won't work on the", " the laserjets since they are monochrome devices.", "", " Defaults: landscape, noextended, color (6 pens), solid, univers, 12 point,", " and nopspoints.", "", " With `pcl5` international characters are handled by the printer; you just put", " the appropriate 8-bit character codes into the text strings. You don't need", " to bother with `set encoding`.", "", " HPGL graphics can be imported by many software packages." END_HELP(hpgl) #endif /* TERM_HELP */ gnuplot-4.6.4/term/grass.trm0000644000471100001440000004323410460036602012746 0ustar /* Hello, Emacs, this is -*-C-*- */ /*[ * GNUPLOT - grass.trm * $Id: *- * Copyright (C) 1992-1995, 1999, 2004 James Darrell McCauley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * This software is provided "as is" without express or implied warranty. * * This file is included by ../term.c. * * This terminal driver supports: * GRASS graphics driver * * AUTHOR * James Darrell McCauley, PhD http://soils.ecn.purdue.edu/~mccauley/ * Dept of Agricultural Engineering mccauley@ecn.purdue.edu * Purdue University tel: 317.494.1198 fax: 317.496.1115 * * 05 Apr 1995 - cleaned up code by adding explicit function declarations. * compiles clean with 'gcc -Wall' * 14 Apr 1995 - adapted for new layout, added font selection * * 13 Jan 1999 - Copyright statement changed to new gnuplot copyright * Permission given by orig author in private email (lh) * * send your comments or suggestions to (grassp-list@moon.cecer.army.mil). * ]*/ #include "driver.h" #ifdef TERM_REGISTER register_term(grass) #endif #ifdef TERM_PROTO TERM_PUBLIC void GRASS_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void GRASS_options __PROTO((void)); TERM_PUBLIC void GRASS_init __PROTO((void)); TERM_PUBLIC void GRASS_reset __PROTO((void)); TERM_PUBLIC void GRASS_graphics __PROTO((void)); TERM_PUBLIC void GRASS_text __PROTO((void)); TERM_PUBLIC void GRASS_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void GRASS_linetype __PROTO((int lt)); TERM_PUBLIC void GRASS_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int GRASS_text_angle __PROTO((int ang)); TERM_PUBLIC int GRASS_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void GRASS_point __PROTO((unsigned int x, unsigned int y, int point)); TERM_PUBLIC int GRASS_set_font __PROTO((const char *font)); /* TERM_PUBLIC void GRASS_set_pointsize __PROTO((double size)); */ TERM_PUBLIC void GRASS_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include #include /* #include "gis.h" */ /* this causes conflicts with things in term.c */ #define GRASS_XMAX 1000 #define GRASS_YMAX 1000 #define GRASS_VCHAR 5 #define GRASS_HCHAR 5 #define GRASS_VTIC 3 #define GRASS_HTIC 3 #define PNT_SIZE 3 #define TYPE_DOT -1 #define TYPE_X 0 #define TYPE_PLUS 1 #define TYPE_BOX 2 #define TYPE_DIAMOND 3 /* need type 4 and 5 */ #define TYPE_TRIANGLE 4 #define TYPE_OCTO 5 #define TYPE_ITRIANGLE 6 #define TYPE_FBOX 7 #define TYPE_FTRIANGLE 8 #define TYPE_FITRIANGLE 9 #define TYPE_FOCTO 10 static void cont_abs __PROTO((int x, int y)); static void draw_points_dot __PROTO((int x, int y)); static void draw_points_diamond __PROTO((int x, int y)); static void draw_points_box __PROTO((int x, int y)); static void draw_points_fbox __PROTO((int x, int y)); static void draw_points_itriangle __PROTO((int x, int y)); static void draw_points_fitriangle __PROTO((int x, int y)); static void draw_points_triangle __PROTO((int x, int y)); static void draw_points_ftriangle __PROTO((int x, int y)); static void draw_points_plus __PROTO((int x, int y)); static void draw_points_octo __PROTO((int x, int y)); static void draw_points_focto __PROTO((int x, int y)); static void draw_points_x __PROTO((int x, int y)); static int R__curx, R__cury; static int grass_yoffset; static int grass_xoffset; static int y_max; static int points_buf_x[PNT_SIZE*PNT_SIZE]; /* for filled point types */ static int points_buf_y[PNT_SIZE*PNT_SIZE]; extern int R_move_abs (); extern int R_cont_abs (); TERM_PUBLIC void GRASS_move(unsigned int x, unsigned int y) { /* R_move_abs (grass_xoffset+x, grass_yoffset-y + y_max); */ R_move_abs (grass_xoffset+x, grass_yoffset-y); } static void cont_abs(int x, int y) { /* R_cont_abs (grass_xoffset+x, grass_xoffset-y + y_max); */ R_cont_abs (grass_xoffset+x, grass_yoffset-y); } TERM_PUBLIC void GRASS_options() { options_null (); /* no options to begin with */ } TERM_PUBLIC void GRASS_init() { /* char buff[128]; */ char window_name[64]; float size = 3.0; /* int backcolor; */ int dots_per_line; int top, b, l, r; /* int textcolor; */ struct termentry *t = term; extern int G_gisinit(); extern int R_open_driver(); extern int D_setup(); extern int D_get_cur_wind(); extern int G_fatal_error(); extern int D_set_cur_wind(); extern int D_get_screen_window(); extern int R_set_window(); extern int R_text_size(); extern int R_font(); extern int R_screen_top(); extern int R_screen_bot(); extern int D_erase_window(); G_gisinit ("g.gnuplot"); R_open_driver (); D_setup (0); if (D_get_cur_wind (window_name)) G_fatal_error ("No current window"); if (D_set_cur_wind (window_name)) G_fatal_error ("Current window not available"); /* Set up the screen, conversions, and graphics */ D_get_screen_window (&top, &b, &l, &r); /* D_set_overlay_mode (1); */ /* Figure out where to put text */ R_set_window (top, b, l, r); t->xmax = r-l; t->ymax = b-top; grass_xoffset=l; grass_yoffset=b; dots_per_line = (int) (size / 100.0 * (float) (t->ymax)); t->v_char = t->h_char = (int) (.8 * (float) dots_per_line); R_text_size (t->h_char, t->v_char); R_font("romans"); t->v_tic = t->h_tic = 4; y_max = t->ymax; /* kludge? */ R__curx = R_screen_top (); R__cury = R_screen_bot () + grass_yoffset; D_erase_window(); fprintf(stderr,"**********************************************\n"); fprintf(stderr,"DIAGNOSTIC TERMINAL SETUP\n"); fprintf(stderr,"top = %d\tb = %d\tl = %d\tr = %d\n", top,b,l,r); fprintf(stderr,"name = %s\n", t->name); fprintf(stderr,"description = %s\n", t->description); fprintf(stderr,"xmax = %d\t", (int)t->xmax); fprintf(stderr,"ymax = %d\n", (int)t->ymax); fprintf(stderr,"v_char = %d\t", (int)t->v_char); fprintf(stderr,"h_char = %d\n", (int)t->h_char); fprintf(stderr,"v_tic = %d\t", (int)t->v_tic); fprintf(stderr,"h_tic = %d\n", (int)t->h_tic); fprintf(stderr,"**********************************************\n\n"); } TERM_PUBLIC void GRASS_reset () { extern int R_standard_color(); extern int D_translate_color(); extern int R_flush(); extern int R_stabilize(); extern int R_close_driver(); R_standard_color (D_translate_color ("black")); /* D_erase_window(); .* don't clear after g.gnuplot is finished */ R_flush (); R_stabilize (); R_close_driver (); } TERM_PUBLIC void GRASS_graphics () { extern int D_erase_window(); extern int R_flush(); extern int R_stabilize(); extern int R_standard_color(); extern int D_translate_color(); R_flush (); R_stabilize (); R_standard_color (D_translate_color ("black")); D_erase_window(); return; } TERM_PUBLIC void GRASS_text () { extern int R_flush (); extern int R_stabilize (); R_flush (); R_stabilize (); return; /* device can't be used as a terminal */ } TERM_PUBLIC void GRASS_vector(unsigned int x, unsigned int y) { extern int R_flush (); extern int R_stabilize (); cont_abs (x, y); R_flush (); R_stabilize (); } TERM_PUBLIC void GRASS_linetype(int lt) { extern int R_standard_color(); extern int D_translate_color(); extern int R_flush (); extern int R_stabilize (); while (lt > 10) lt-=10; if (lt <= LT_BLACK) R_standard_color (D_translate_color ("gray")); else if (lt == LT_AXIS) R_standard_color (D_translate_color ("white")); else if (lt == 0) R_standard_color (D_translate_color ("red")); else if (lt == 1) R_standard_color (D_translate_color ("green")); else if (lt == 2) R_standard_color (D_translate_color ("magenta")); else if (lt == 3) R_standard_color (D_translate_color ("brown")); else if (lt == 4) R_standard_color (D_translate_color ("orange")); else if (lt == 5) R_standard_color (D_translate_color ("yellow")); else if (lt == 6) R_standard_color (D_translate_color ("blue")); else if (lt == 7) R_standard_color (D_translate_color ("violet")); else if (lt == 8) R_standard_color (D_translate_color ("indigo")); else if (lt == 9) R_standard_color (D_translate_color ("gray")); else /* if (lt == 10) */ R_standard_color (D_translate_color ("white")); R_flush (); R_stabilize (); return; } /* originally /usr/grass4/src/display/d.label/cmd/label.c */ TERM_PUBLIC void GRASS_put_text(unsigned int x, unsigned int y, const char *str) { extern int R_text(); extern int R_flush (); extern int R_stabilize (); if (strlen (str) == 0) return; GRASS_move (x, y); /* R_standard_color (D_translate_color ("white")); */ R_text (str); R_flush (); R_stabilize (); } TERM_PUBLIC int GRASS_text_angle (int ang) { extern int R_text_rotation(); R_text_rotation((float)ang); return TRUE; /* GRASS can (?) rotate text */ } TERM_PUBLIC int GRASS_justify_text (enum JUSTIFY mode) { return (FALSE); /* don't mess with this now */ } TERM_PUBLIC void GRASS_point (unsigned int x, unsigned y, int point) { switch (point) { case TYPE_DOT: draw_points_dot (x, y); break; case TYPE_X: draw_points_x (x, y); break; case TYPE_PLUS: draw_points_plus (x, y); break; case TYPE_BOX: draw_points_box (x, y); break; case TYPE_DIAMOND: draw_points_diamond (x, y); break; case TYPE_TRIANGLE: draw_points_triangle (x, y); break; case TYPE_OCTO: draw_points_octo (x, y); break; case TYPE_ITRIANGLE: draw_points_itriangle (x, y); break; case TYPE_FBOX: draw_points_fbox (x, y); break; case TYPE_FTRIANGLE: draw_points_ftriangle (x, y); break; case TYPE_FITRIANGLE: draw_points_fitriangle (x, y); break; case TYPE_FOCTO: draw_points_focto (x, y); break; } } /* modified from /usr/grass4/src/display/d.points/cmd/main.c */ static void draw_points_dot(int x, int y) { GRASS_move (x, y); cont_abs (x, y); } static void draw_points_diamond(int x, int y) { GRASS_move (x, y + PNT_SIZE); GRASS_vector (x + PNT_SIZE, y); GRASS_vector (x, y - PNT_SIZE); GRASS_vector (x - PNT_SIZE, y); GRASS_vector (x, y + PNT_SIZE); } static void draw_points_box(int x, int y) { GRASS_move (x - PNT_SIZE, y - PNT_SIZE); GRASS_vector (x - PNT_SIZE, y + PNT_SIZE); GRASS_vector (x + PNT_SIZE, y + PNT_SIZE); GRASS_vector (x + PNT_SIZE, y - PNT_SIZE); GRASS_vector (x - PNT_SIZE, y - PNT_SIZE); } static void draw_points_fbox(int x, int y) { int R_polygon_abs(); points_buf_x[0] = grass_xoffset + x - PNT_SIZE; points_buf_y[0]= grass_yoffset - (y + PNT_SIZE); points_buf_x[1] = grass_xoffset + x + PNT_SIZE; points_buf_y[1]= grass_yoffset - (y + PNT_SIZE); points_buf_x[2] = grass_xoffset + x + PNT_SIZE; points_buf_y[2]= grass_yoffset - (y - PNT_SIZE); points_buf_x[3] = grass_xoffset + x - PNT_SIZE; points_buf_y[3]= grass_yoffset - (y - PNT_SIZE); R_polygon_abs(points_buf_x, points_buf_y, 4 ); } static void draw_points_itriangle(int x, int y) { GRASS_move (x - PNT_SIZE, y + PNT_SIZE); GRASS_vector (x + PNT_SIZE, y + PNT_SIZE); GRASS_vector (x , y - PNT_SIZE); GRASS_vector (x - PNT_SIZE, y + PNT_SIZE); } static void draw_points_fitriangle(int x, int y) { int R_polygon_abs(); points_buf_x[0] = grass_xoffset + x + PNT_SIZE; points_buf_y[0] = grass_yoffset - (y + PNT_SIZE); points_buf_x[1] = grass_xoffset + x ; points_buf_y[1] = grass_yoffset - (y - PNT_SIZE); points_buf_x[2] = grass_xoffset + x - PNT_SIZE; points_buf_y[2] = grass_yoffset - (y + PNT_SIZE); R_polygon_abs(points_buf_x, points_buf_y, 3 ); } static void draw_points_triangle(int x, int y) { GRASS_move (x - PNT_SIZE, y - PNT_SIZE); GRASS_vector (x , y + PNT_SIZE); GRASS_vector (x + PNT_SIZE, y - PNT_SIZE); GRASS_vector (x - PNT_SIZE, y - PNT_SIZE); } static void draw_points_ftriangle(int x, int y) { int R_polygon_abs(); points_buf_x[0] = grass_xoffset + x; points_buf_y[0]= grass_yoffset - (y + PNT_SIZE); points_buf_x[1] = grass_xoffset + x + PNT_SIZE; points_buf_y[1]= grass_yoffset - (y - PNT_SIZE); points_buf_x[2] = grass_xoffset + x - PNT_SIZE; points_buf_y[2]= grass_yoffset - (y - PNT_SIZE); R_polygon_abs(points_buf_x, points_buf_y, 3 ); } static void draw_points_plus(int x, int y) { GRASS_move (x - PNT_SIZE, y); GRASS_vector (x + PNT_SIZE, y); GRASS_move (x, y - PNT_SIZE); GRASS_vector (x, y + PNT_SIZE); } /* depends on PNT_SIZE */ static void draw_points_octo(int x, int y) { /* CCW */ GRASS_move (x - (int) (PNT_SIZE/3), y - PNT_SIZE); /* 1 */ GRASS_vector (x + (int) (PNT_SIZE/3), y - PNT_SIZE); /* 2 */ GRASS_vector (x + PNT_SIZE, y - (int) (PNT_SIZE/3)); /* 3 */ GRASS_vector (x + PNT_SIZE, y + (int) (PNT_SIZE/3)); /* 4 */ GRASS_vector (x + (int) (PNT_SIZE/3), y + PNT_SIZE); /* 5 */ GRASS_vector (x - (int) (PNT_SIZE/3), y + PNT_SIZE); /* 6 */ GRASS_vector (x - PNT_SIZE, y + (int) (PNT_SIZE/3)); /* 7 */ GRASS_vector (x - PNT_SIZE, y - (int) (PNT_SIZE/3)); /* 8 */ GRASS_vector (x - (int) (PNT_SIZE/3), y - PNT_SIZE); /* 1 */ } /* depends on PNT_SIZE */ static void draw_points_focto(int x, int y) { int R_polygon_abs(); /* CCW */ points_buf_x[0] = grass_xoffset + x + (int) (PNT_SIZE/3); points_buf_y[0] = grass_yoffset - (y - PNT_SIZE); points_buf_x[1] = grass_xoffset + x + PNT_SIZE; points_buf_y[1] = grass_yoffset - (y - (int) (PNT_SIZE/3)); points_buf_x[2] = grass_xoffset + x + PNT_SIZE; points_buf_y[2] = grass_yoffset - (y + (int) (PNT_SIZE/3)); points_buf_x[3] = grass_xoffset + x + (int) (PNT_SIZE/3); points_buf_y[3] = grass_yoffset - (y + PNT_SIZE); points_buf_x[4] = grass_xoffset + x - (int) (PNT_SIZE/3); points_buf_y[4] = grass_yoffset - (y + PNT_SIZE); points_buf_x[5] = grass_xoffset + x - PNT_SIZE; points_buf_y[5] = grass_yoffset - (y + (int) (PNT_SIZE/3)); points_buf_x[6] = grass_xoffset + x - PNT_SIZE; points_buf_y[6] = grass_yoffset - (y - (int) (PNT_SIZE/3)); points_buf_x[7] = grass_xoffset + x - (int) (PNT_SIZE/3); points_buf_y[7] = grass_yoffset - (y - PNT_SIZE); R_polygon_abs(points_buf_x, points_buf_y, 8 ); } static void draw_points_x(int x, int y) { GRASS_move (x - PNT_SIZE, y - PNT_SIZE); GRASS_vector (x + PNT_SIZE, y + PNT_SIZE); GRASS_move (x + PNT_SIZE, y - PNT_SIZE); GRASS_vector (x - PNT_SIZE, y + PNT_SIZE); } TERM_PUBLIC int GRASS_set_font(const char *font) { char name[32]; int size,sep, R_font(); struct termentry *t = term; int R_text_size (), dots_per_line; /* G_warning(font); */ sep=strcspn(font,","); strncpy(name,font,sep); name[sep]=NUL; sscanf (&(font[sep+1]),"%d",&size); if (size==0) size=3; dots_per_line = (int) (size / 100.0 * (float) (t->ymax)); t->v_char = t->h_char = (int) (.8 * (float) dots_per_line); R_text_size (t->h_char, t->v_char); /* cyrilc,gothgbt,gothgrt,gothitt,greekc,greekcs,greekp, greeks,italicc,italiccs,italict,romanc,romancs,romand, romans,romant,scriptc,scripts */ if (strlen(name) > 5 ) R_font(name); else R_font("romans"); return TRUE; } #ifdef GRASS_POINTSIZE /* HBB FIXME 20040619: argument type wrong, but luckily unused anyway... */ TERM_PUBLIC void GRASS_set_pointsize(double *size) { return; } #endif /* GRASS_POINTSIZE */ /* need to fix */ TERM_PUBLIC void GRASS_arrow( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { do_arrow (sx, sy, ex, ey, 1); return; } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(grass_driver) "grass", "GRASS Graphics Monitor", GRASS_XMAX, GRASS_YMAX, GRASS_VCHAR, GRASS_HCHAR, GRASS_VTIC, GRASS_HTIC, GRASS_options, GRASS_init, GRASS_reset, GRASS_text, null_scale, GRASS_graphics, GRASS_move, GRASS_vector, GRASS_linetype, GRASS_put_text, GRASS_text_angle, GRASS_justify_text, GRASS_point, GRASS_arrow, GRASS_set_font TERM_TABLE_END(grass_driver) #undef LAST_TERM #define LAST_TERM grass_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(grass) "1 grass", "?commands set terminal grass", "?set terminal grass", "?set term grass", "?terminal grass", "?term grass", "?grass", " The `grass` terminal driver gives `gnuplot` capabilities to users of the ", " GRASS geographic information system. Contact grassp-list@moon.cecer.army.mil", " for more information. Pages are written to the current frame of the GRASS", " Graphics Window. There are no options." END_HELP(grass) #endif gnuplot-4.6.4/term/aed.trm0000644000471100001440000001323510460036601012355 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: aed.trm,v 1.14 2006/07/21 02:35:45 sfeam Exp $ * */ /* GNUPLOT - aed.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * AED terminals * * AUTHORS * Colin Kelley, Thomas Williams, Russell Lang * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * adapted to the new terminal layout by Stefan Bodewig (Dez. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(aed512) register_term(aed767) #endif #ifdef TERM_PROTO TERM_PUBLIC void AED_init __PROTO((void)); TERM_PUBLIC void AED_graphics __PROTO((void)); TERM_PUBLIC void AED_text __PROTO((void)); TERM_PUBLIC void AED_linetype __PROTO((int linetype)); TERM_PUBLIC void AED_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void AED_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void AED_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void AED_reset __PROTO((void)); #define AED_XMAX 768 #define AED_YMAX 575 #define AED_VCHAR 13 #define AED_HCHAR 8 #define AED_VTIC 8 #define AED_HTIC 7 /* slightly different for AED 512 */ #define AED5_XMAX 512 #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #define AED_XLAST (AED_XMAX - 1) #define AED_YLAST (AED_YMAX - 1) #define AED5_XLAST (AED5_XMAX - 1) TERM_PUBLIC void AED_init() { fputs("\033SEN3DDDN.SEC.7.SCT.0.1.80.80.90.SBC.0.AAV2.MOV.0.9.CHR.0.FFD", gpoutfile); /* 2 3 4 5 7 6 1 1. Clear Screen 2. Set Encoding 3. Set Default Color 4. Set Backround Color Table Entry 5. Set Backround Color 6. Move to Bottom Lefthand Corner 7. Anti-Alias Vectors */ } TERM_PUBLIC void AED_graphics() { fputs("\033FFD\033", gpoutfile); } TERM_PUBLIC void AED_text() { fputs("\033MOV.0.9.SEC.7.XXX", gpoutfile); } TERM_PUBLIC void AED_linetype(int linetype) { static int color[2 + 9] = { 7, 1, 6, 2, 3, 5, 1, 6, 2, 3, 5 }; static int type[2 + 9] = { 85, 85, 255, 255, 255, 255, 255, 85, 85, 85, 85 }; if (linetype <= -3) return; if (linetype >= 10) linetype %= 10; fprintf(gpoutfile, "\ \033SLS%d.255.\ \033SEC%d.", type[linetype + 2], color[linetype + 2]); } TERM_PUBLIC void AED_move(unsigned int x, unsigned int y) { fprintf(gpoutfile, "\033MOV%d.%d.", x, y); } TERM_PUBLIC void AED_vector(unsigned int x, unsigned int y) { fprintf(gpoutfile, "\033DVA%d.%d.", x, y); } TERM_PUBLIC void AED_put_text(unsigned int x, unsigned int y, const char *str) { AED_move(x, y - AED_VCHAR / 2 + 2); fprintf(gpoutfile, "\033XXX%s\033", str); } #define hxt (AED_HTIC/2) #define hyt (AED_VTIC/2) TERM_PUBLIC void AED_reset() { fputs("\033SCT0.1.0.0.0.SBC.0.FFD", gpoutfile); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(aed512_driver) "aed512", "AED 512 Terminal", AED5_XMAX, AED_YMAX, AED_VCHAR, AED_HCHAR, AED_VTIC, AED_HTIC, options_null, AED_init, AED_reset, AED_text, null_scale, AED_graphics, AED_move, AED_vector, AED_linetype, AED_put_text, null_text_angle, null_justify_text, do_point, do_arrow, set_font_null TERM_TABLE_END(aed512_driver) #undef LAST_TERM #define LAST_TERM aed512_driver TERM_TABLE_START(aed767_driver) "aed767", "AED 767 Terminal", AED_XMAX, AED_YMAX, AED_VCHAR, AED_HCHAR, AED_VTIC, AED_HTIC, options_null, AED_init, AED_reset, AED_text, null_scale, AED_graphics, AED_move, AED_vector, AED_linetype, AED_put_text, null_text_angle, null_justify_text, do_point, do_arrow, set_font_null TERM_TABLE_END(aed767_driver) #undef LAST_TERM #define LAST_TERM aed767_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(aed767) "1 aed767", "?commands set terminal aed767", "?set terminal aed767", "?set term aed767", "?terminal aed767", "?term aed767", "?aed767", "?commands set terminal aed512", "?set terminal aed512", "?set term aed512", "?terminal aed512", "?term aed512", "?aed512", " The `aed512` and `aed767` terminal drivers support AED graphics terminals.", " The two drivers differ only in their horizontal ranges, which are 512 and", " 768 pixels, respectively. Their vertical range is 575 pixels. There are", " no options for these drivers." END_HELP(aed767) #endif gnuplot-4.6.4/term/cairo.trm0000644000471100001440000017355512213417572012745 0ustar /* Hello, Emacs: this is -*-C-*- ! * $Id: cairo.trm,v 1.51.2.5 2013/09/09 19:20:26 sfeam Exp $ */ /* GNUPLOT - cairo.trm */ /*[ * Copyright 2007 Timothee Lecomte * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * Modifications: * Peter Danenberg, Ethan Merritt - handle png output as well as pdf * Peter Danenberg - crop for PNGs * René Haber - added epscairo terminal * Bastian Maerkisch - cairolatex terminal */ #ifdef TERM_REGISTER register_term (pdfcairo) #endif #ifdef TERM_PROTO TERM_PUBLIC void cairotrm_options __PROTO ((void)); TERM_PUBLIC void cairotrm_init __PROTO ((void)); TERM_PUBLIC void cairotrm_graphics __PROTO ((void)); TERM_PUBLIC void cairotrm_text __PROTO ((void)); TERM_PUBLIC void cairotrm_linetype __PROTO ((int linetype)); TERM_PUBLIC void cairotrm_move __PROTO ((unsigned int x, unsigned int y)); TERM_PUBLIC void cairotrm_vector __PROTO ((unsigned int x, unsigned int y)); TERM_PUBLIC void cairotrm_put_text __PROTO ((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void cairotrm_enhanced_flush(); TERM_PUBLIC void cairotrm_enhanced_writec(int c); TERM_PUBLIC void cairotrm_enhanced_open(char* fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint); TERM_PUBLIC void cairotrm_reset __PROTO ((void)); TERM_PUBLIC int cairotrm_justify_text __PROTO ((enum JUSTIFY mode)); TERM_PUBLIC void cairotrm_point __PROTO ((unsigned int x, unsigned int y, int pointstyle)); TERM_PUBLIC void cairotrm_linewidth __PROTO ((double linewidth)); TERM_PUBLIC int cairotrm_text_angle __PROTO ((int ang)); TERM_PUBLIC void cairotrm_fillbox __PROTO ((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); TERM_PUBLIC int cairotrm_set_font __PROTO ((const char *font)); TERM_PUBLIC void cairotrm_pointsize __PROTO ((double ptsize)); TERM_PUBLIC void cairotrm_image __PROTO ((unsigned int M, unsigned int N, coordval * image, gpiPoint * corner, t_imagecolor color_mode)); TERM_PUBLIC int cairotrm_make_palette __PROTO ((t_sm_palette *palette)); TERM_PUBLIC void cairotrm_set_color __PROTO ((t_colorspec *colorspec)); TERM_PUBLIC void cairotrm_filled_polygon __PROTO ((int n, gpiPoint * corners)); #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include "cairo-pdf.h" #ifdef HAVE_CAIROEPS #include "cairo-ps.h" #endif #include "wxterminal/gp_cairo.h" #include "wxterminal/gp_cairo_helpers.h" #include "glib.h" /* For guint32 */ #define CAIROTRM_DEFAULT_FONTNAME "Sans" static cairo_status_t cairostream_write __PROTO ((void *closure, unsigned char *data, unsigned int length)); static int cairostream_error[1]; /* Terminal type of postscript dialect */ enum CAIRO_TERMINALTYPE { CAIROTERM_EPS, CAIROTERM_PDF, CAIROTERM_PNG, CAIROTERM_LATEX }; /* One struct that takes all terminal parameters * by Harald Harders */ typedef struct cairo_params_t { enum CAIRO_TERMINALTYPE terminal; size_units explicit_units; TBOOLEAN enhanced; TBOOLEAN dashed; float dash_length; rgb_color background; TBOOLEAN mono; TBOOLEAN rounded; /* rounded linecaps and linejoins */ TBOOLEAN transparent; TBOOLEAN crop; char fontname[MAX_ID_LEN + 1]; /* name of font */ int fontsize; /* size of font in pts */ float fontscale; /* modified by this */ float width; float height; float base_linewidth; float lw; TBOOLEAN pdf_output; /* format of the graphics produced by cairolatex */ } cairo_params_t; #define CAIROEPS_PARAMS_DEFAULT { \ CAIROTERM_EPS, INCHES, FALSE, FALSE, 1.0, {1.,1.,1.}, FALSE, FALSE, TRUE, FALSE, "", \ 12, 0.5, 5*72., 3*72., 0.25, 1.0, FALSE \ } static cairo_params_t cairoeps_params = CAIROEPS_PARAMS_DEFAULT; static const cairo_params_t cairoeps_params_default = CAIROEPS_PARAMS_DEFAULT; #ifdef HAVE_CAIROEPS #define CAIROLATEX_PARAMS_DEFAULT { \ CAIROTERM_LATEX, INCHES, FALSE, FALSE, 1.0, {1.,1.,1.}, FALSE, FALSE, TRUE, FALSE, "", \ 11, 0.6, 5*72., 3*72., 0.25, 1.0, FALSE \ } #else #define CAIROLATEX_PARAMS_DEFAULT { \ CAIROTERM_LATEX, INCHES, FALSE, FALSE, 1.0, {1.,1.,1.}, FALSE, FALSE, TRUE, FALSE, "", \ 11, 0.6, 5*72., 3*72., 0.25, 1.0, TRUE \ } #endif static cairo_params_t cairolatex_params = CAIROLATEX_PARAMS_DEFAULT; static const cairo_params_t cairolatex_params_default = CAIROLATEX_PARAMS_DEFAULT; #define CAIROPDF_PARAMS_DEFAULT { \ CAIROTERM_PDF, INCHES, FALSE, FALSE, 1.0, {1.,1.,1.}, FALSE, FALSE, TRUE, FALSE, "", \ 12, 0.5, 5*72., 3*72., 0.25, 1.0, FALSE \ } static cairo_params_t cairopdf_params = CAIROPDF_PARAMS_DEFAULT; static const cairo_params_t cairopdf_params_default = CAIROPDF_PARAMS_DEFAULT; #define CAIROPNG_PARAMS_DEFAULT { \ CAIROTERM_PNG, PIXELS, FALSE, FALSE, 1.0, {1.,1.,1.}, FALSE, FALSE, FALSE, FALSE, "", \ 12, 1.0, 640., 480., 1.0, 1.0, FALSE \ } static cairo_params_t cairopng_params = CAIROPNG_PARAMS_DEFAULT; static const cairo_params_t cairopng_params_default = CAIROPNG_PARAMS_DEFAULT; static cairo_params_t *cairo_params = &cairopdf_params; static const cairo_params_t *cairo_params_default = &cairopdf_params; #ifdef PSLATEX_DRIVER #define ISCAIROLATEX (cairo_params->terminal == CAIROTERM_LATEX) static ps_params_t cairo_epslatex_params = EPSLATEX_PARAMS_DEFAULT; #else #define ISCAIROLATEX (FALSE) #endif plot_struct plot; enum CAIROTRM_id { CAIROTRM_FONT, CAIROTRM_FONTSCALE, CAIROTRM_ENHANCED, CAIROTRM_NOENHANCED, CAIROTRM_SIZE, CAIROTRM_ROUNDED, CAIROTRM_BUTT, CAIROTRM_LINEWIDTH, CAIROTRM_DASHED, CAIROTRM_SOLID, CAIROTRM_MONO, CAIROTRM_COLOR, CAIROTRM_DASHLENGTH, CAIROTRM_TRANSPARENT, CAIROTRM_NOTRANSPARENT, CAIROTRM_CROP, CAIROTRM_NOCROP, CAIROTRM_BACKGROUND, CAIROLATEX_STANDALONE, CAIROLATEX_INPUT, CAIROLATEX_HEADER, CAIROLATEX_NOHEADER, CAIROLATEX_BLACKTEXT, CAIROLATEX_COLORTEXT, CAIROLATEX_EPS, CAIROLATEX_PDF, CAIROTRM_OTHER }; static struct gen_table cairotrm_opts[] = { {"fontscale", CAIROTRM_FONTSCALE}, {"f$ont", CAIROTRM_FONT}, {"enh$anced", CAIROTRM_ENHANCED}, {"noenh$anced", CAIROTRM_NOENHANCED}, {"si$ze", CAIROTRM_SIZE}, {"round$ed", CAIROTRM_ROUNDED}, {"butt", CAIROTRM_BUTT}, {"lw", CAIROTRM_LINEWIDTH}, {"linew$idth", CAIROTRM_LINEWIDTH}, {"dash$ed", CAIROTRM_DASHED}, {"solid", CAIROTRM_SOLID}, {"mono$chrome", CAIROTRM_MONO}, {"color", CAIROTRM_COLOR}, {"col$our", CAIROTRM_COLOR}, {"dl", CAIROTRM_DASHLENGTH}, {"dashl$ength", CAIROTRM_DASHLENGTH}, {"transp$arent", CAIROTRM_TRANSPARENT}, {"notransp$arent", CAIROTRM_NOTRANSPARENT}, {"crop", CAIROTRM_CROP}, {"nocrop", CAIROTRM_NOCROP}, {"backg$round", CAIROTRM_BACKGROUND}, {"nobackg$round", CAIROTRM_TRANSPARENT}, {"stand$alone", CAIROLATEX_STANDALONE}, {"inp$ut", CAIROLATEX_INPUT}, {"header", CAIROLATEX_HEADER}, {"noheader", CAIROLATEX_NOHEADER}, {"b$lacktext", CAIROLATEX_BLACKTEXT}, {"colort$ext", CAIROLATEX_COLORTEXT}, {"colourt$ext", CAIROLATEX_COLORTEXT}, {"eps", CAIROLATEX_EPS}, {"pdf", CAIROLATEX_PDF}, {NULL, CAIROTRM_OTHER} }; /* "Called when terminal type is selected. This procedure should parse options on the command line. * A list of the currently selected options should be stored in term_options[], * in a form suitable for use with the set term command. * term_options[] is used by the save command. Use options_null() if no options are available." */ TERM_PUBLIC void cairotrm_options() { char *s = NULL; char *font_setting = NULL; int sep; TBOOLEAN duplication = FALSE; TBOOLEAN set_enhanced = FALSE, set_font = FALSE, set_size = FALSE; TBOOLEAN set_capjoin = FALSE, set_fontscale = FALSE; TBOOLEAN set_standalone = FALSE, set_header = FALSE; TBOOLEAN set_colortext = FALSE; char tmp_term_options[MAX_LINE_LEN+1] = ""; /* Initialize terminal-dependent values */ if (strcmp(term->name, "pngcairo") == 0) { cairo_params = &cairopng_params; cairo_params_default = &cairopng_params_default; } else if (strcmp(term->name, "epscairo") == 0) { cairo_params = &cairoeps_params; cairo_params_default = &cairoeps_params_default; } #ifdef PSLATEX_DRIVER else if (strcmp(term->name, "cairolatex") == 0) { cairo_params = &cairolatex_params; cairo_params_default = &cairolatex_params_default; ps_params = &cairo_epslatex_params; } #endif else { cairo_params = &cairopdf_params; cairo_params_default = &cairopdf_params_default; } while (!END_OF_COMMAND) { FPRINTF((stderr, "processing token\n")); switch (lookup_table(&cairotrm_opts[0], c_token)) { case CAIROTRM_FONT: c_token++; if (!(s = try_to_get_string())) int_error(c_token,"font: expecting string"); if (!(*s)) { strcpy (cairo_params->fontname, ""); cairo_params->fontsize = 0; } else { sep = strcspn(s,","); if (sep > 0) { strncpy(cairo_params->fontname, s, sep); cairo_params->fontname[sep] = '\0'; } if (s[sep] == ',') sscanf(&(s[sep+1]), "%d", &cairo_params->fontsize); } font_setting = (char*) gp_alloc(strlen(s) + 1,"cairo terminal font"); strcpy(font_setting,s); free(s); if (set_font) duplication=TRUE; set_font = TRUE; break; case CAIROTRM_ENHANCED: if (ISCAIROLATEX) int_error(c_token, "extraneous argument in set terminal %s", term->name); c_token++; cairo_params->enhanced = TRUE; term->flags |= TERM_ENHANCED_TEXT; if (set_enhanced) duplication=TRUE; set_enhanced = TRUE; break; case CAIROTRM_NOENHANCED: if (ISCAIROLATEX) int_error(c_token, "extraneous argument in set terminal %s", term->name); c_token++; cairo_params->enhanced = FALSE; term->flags &= ~TERM_ENHANCED_TEXT; if (set_enhanced) duplication=TRUE; set_enhanced = TRUE; break; case CAIROTRM_SIZE: c_token++; if (!strcmp(term->name,"pngcairo")) cairo_params->explicit_units = parse_term_size(&cairo_params->width, &cairo_params->height, PIXELS); else cairo_params->explicit_units = parse_term_size(&cairo_params->width, &cairo_params->height, INCHES); if (set_size) duplication=TRUE; set_size = TRUE; break; case CAIROTRM_ROUNDED: c_token++; if (set_capjoin) duplication=TRUE; cairo_params->rounded = TRUE; set_capjoin = TRUE; break; case CAIROTRM_BUTT: c_token++; if (set_capjoin) duplication=TRUE; cairo_params->rounded = FALSE; set_capjoin = TRUE; break; case CAIROTRM_LINEWIDTH: c_token++; cairo_params->lw = real_expression(); if (cairo_params->lw < 0.0) cairo_params->lw = cairo_params_default->lw; break; case CAIROTRM_DASHED: c_token++; cairo_params->dashed = TRUE; break; case CAIROTRM_SOLID: c_token++; cairo_params->dashed = FALSE; break; case CAIROTRM_MONO: c_token++; cairo_params->mono = TRUE; term->flags |= TERM_MONOCHROME; break; case CAIROTRM_COLOR: c_token++; cairo_params->mono = FALSE; term->flags &= ~TERM_MONOCHROME; break; case CAIROTRM_DASHLENGTH: c_token++; cairo_params->dash_length = real_expression(); if (cairo_params->dash_length < 0.0) cairo_params->dash_length = cairo_params_default->dash_length; break; case CAIROTRM_FONTSCALE: c_token++; cairo_params->fontscale = END_OF_COMMAND ? -1 : real_expression(); if (cairo_params->fontscale <= 0.0) cairo_params->fontscale = cairo_params_default->fontscale; set_fontscale = TRUE; break; case CAIROTRM_TRANSPARENT: c_token++; cairo_params->transparent = TRUE; break; case CAIROTRM_NOTRANSPARENT: c_token++; cairo_params->transparent = FALSE; break; case CAIROTRM_CROP: c_token++; if ((cairo_params->terminal == CAIROTERM_PNG) || (cairo_params->terminal == CAIROTERM_EPS)) cairo_params->crop = TRUE; break; case CAIROTRM_NOCROP: c_token++; if ((cairo_params->terminal == CAIROTERM_PNG) || (cairo_params->terminal == CAIROTERM_EPS)) cairo_params->crop = FALSE; break; case CAIROTRM_BACKGROUND: { int wxt_background; c_token++; wxt_background = parse_color_name(); cairo_params->background.r = (double)((wxt_background >> 16) & 0xff) / 255.; cairo_params->background.g = (double)((wxt_background >> 8) & 0xff) / 255.; cairo_params->background.b = (double)( wxt_background & 0xff) / 255.; cairo_params->transparent = FALSE; break; } #ifdef PSLATEX_DRIVER case CAIROLATEX_STANDALONE: if (!ISCAIROLATEX) int_error(c_token, "extraneous argument in set terminal %s", term->name); ps_params->epslatex_standalone = TRUE; ++c_token; if (set_standalone) duplication = TRUE; set_standalone = TRUE; break; case CAIROLATEX_INPUT: if (!ISCAIROLATEX) int_error(c_token, "extraneous argument in set terminal %s", term->name); ps_params->epslatex_standalone = FALSE; ++c_token; if (set_standalone) duplication = TRUE; set_standalone = TRUE; break; case CAIROLATEX_HEADER: if (!ISCAIROLATEX) int_error(c_token, "extraneous argument in set terminal %s", term->name); ++c_token; free(epslatex_header); /* Protect against int_error() bail from try_to_get_string() */ epslatex_header = NULL; epslatex_header = try_to_get_string(); if (!epslatex_header) int_error(c_token,"String containing header information expected"); if (set_header) duplication = TRUE; set_header = TRUE; break; case CAIROLATEX_NOHEADER: if (!ISCAIROLATEX) int_error(c_token, "extraneous argument in set terminal %s", term->name); free(epslatex_header); epslatex_header = NULL; if (set_header) duplication = TRUE; set_header = TRUE; ++c_token; break; case CAIROLATEX_BLACKTEXT: if (!ISCAIROLATEX) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_colortext = TRUE; ps_params->blacktext = TRUE; c_token++; break; case CAIROLATEX_COLORTEXT: if (!ISCAIROLATEX) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_colortext = TRUE; ps_params->blacktext = FALSE; c_token++; break; case CAIROLATEX_EPS: if (!ISCAIROLATEX) int_error(c_token, "extraneous argument in set terminal %s",term->name); #ifdef HAVE_CAIROEPS cairo_params->pdf_output = FALSE; #else int_error(c_token, "eps output not supported"); #endif c_token++; break; case CAIROLATEX_PDF: if (!ISCAIROLATEX) int_error(c_token, "extraneous argument in set terminal %s",term->name); cairo_params->pdf_output = TRUE; c_token++; break; #endif /* PSLATEX_DRIVER */ case CAIROTRM_OTHER: /* Ignore irrelevant keywords used by other png/pdf drivers */ if (almost_equals(c_token,"true$color") || almost_equals(c_token,"inter$lace") || almost_equals(c_token,"nointer$lace")) { c_token++; break; } default: int_error(c_token, "unrecognized terminal option"); break; } if (duplication) int_error(c_token-1, "Duplicated or contradicting arguments in cairo terminal options."); } #if 0 /* Copy terminal-dependent values to the generic equivalent */ cairo_params->width = cairo_params_default->width; cairo_params->height = cairo_params_default->height; cairo_params->base_linewidth = cairo_params_default->base_linewidth; #endif #ifdef PSLATEX_DRIVER if (ISCAIROLATEX) { sprintf(tmp_term_options, " %s %s", cairo_params->pdf_output ? "pdf" : "eps", ps_params->epslatex_standalone ? "standalone" : "input"); strcat(term_options, tmp_term_options); if (epslatex_header) sprintf(tmp_term_options, " header \"%s\"", epslatex_header); else sprintf(tmp_term_options, " noheader"); strcat(term_options, tmp_term_options); sprintf(tmp_term_options, " %s", ps_params->blacktext ? "blacktext" : "colortext"); strcat(term_options, tmp_term_options); } #endif /* Save options back into options string in normalized format */ if (cairo_params->transparent) strncat(term_options, ISCAIROLATEX ? " nobackground" : " transparent", sizeof(term_options) - strlen(term_options) - 1); else { sprintf(tmp_term_options, " background \"#%02x%02x%02x\"", (int)(255 * cairo_params->background.r), (int)(255 * cairo_params->background.g), (int)(255 * cairo_params->background.b)); strcat(term_options, tmp_term_options); } if (cairo_params->crop) strncat(term_options, " crop", sizeof(term_options)-strlen(term_options)-1); if (set_enhanced) strncat(term_options, " enhanced", sizeof(term_options)-strlen(term_options)-1); if (set_font) { snprintf(tmp_term_options, sizeof(tmp_term_options), " font \"%s\"", font_setting); free(font_setting); strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1); } /* if (set_fontscale) */ { snprintf(tmp_term_options, sizeof(tmp_term_options), " fontscale %.1f", cairo_params->fontscale); strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1); } if (cairo_params->mono) strncat(term_options, " monochrome", sizeof(term_options)-strlen(term_options)-1); if (cairo_params->dashed) strncat(term_options, " dashed", sizeof(term_options)-strlen(term_options)-1); if (1 || set_size) { if (cairo_params->explicit_units == CM) snprintf(tmp_term_options, sizeof(tmp_term_options), " size %.2fcm, %.2fcm ", 2.54*cairo_params->width/72., 2.54*cairo_params->height/72.); else if (cairo_params->explicit_units == PIXELS) snprintf(tmp_term_options, sizeof(tmp_term_options), " size %d, %d ", (int)cairo_params->width, (int)cairo_params->height); else snprintf(tmp_term_options, sizeof(tmp_term_options), " size %.2fin, %.2fin ", cairo_params->width/72., cairo_params->height/72.); strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1); } if (set_capjoin) { strncat(term_options, cairo_params->rounded ? " rounded" : " butt", sizeof(term_options)-strlen(term_options)-1); } if (cairo_params->lw != cairo_params_default->lw) { snprintf(tmp_term_options,sizeof(tmp_term_options), " linewidth %g", cairo_params->lw); strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1); } if (cairo_params->dash_length != cairo_params_default->dash_length) { snprintf(tmp_term_options,sizeof(tmp_term_options), " dashlength %g", cairo_params->dash_length); strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1); } /* sync settings with ps_params for latex terminal */ #ifdef PSLATEX_DRIVER if (ISCAIROLATEX) { ps_params->color = !cairo_params->mono; ps_params->font[sizeof(ps_params->font) - 1] = '\0'; strncpy(ps_params->font, cairo_params->fontname, sizeof(ps_params->font) - 1); ps_params->fontsize = cairo_params->fontsize; ps_params->fontscale = cairo_params->fontscale; if (cairo_params->transparent) { ps_params->background.r = -1; ps_params->background.g = -1; ps_params->background.b = -1; } else { ps_params->background.r = cairo_params->background.r; ps_params->background.g = cairo_params->background.g; ps_params->background.b = cairo_params->background.b; } } #endif } /* "Called once, when the device is first selected." * Is the 'main' function of the terminal. */ void cairotrm_init() { cairo_surface_t *surface = NULL; FPRINTF((stderr,"Init\n")); /* do a sanity check for once */ if (strcmp(term->name, "epscairo") && strcmp(term->name, "cairolatex") && strcmp(term->name, "pdfcairo") && strcmp(term->name, "pngcairo")) int_error(c_token,"Unrecognized cairo terminal"); /* cairolatex requires a file */ if (ISCAIROLATEX && !outstr) os_error(c_token, "cairolatex terminal cannot write to standard output"); /* initialisations */ gp_cairo_initialize_plot(&plot); plot.device_xmax = (double) cairo_params->width; plot.device_ymax = (double) cairo_params->height; plot.dashlength = cairo_params->dash_length; /* is supposed to be done in cairotrm_reset */ if ( plot.cr ) cairo_destroy(plot.cr); if (!strcmp(term->name,"pdfcairo")) { /* Output can either be a file or stdout */ if (!outstr) { surface = cairo_pdf_surface_create_for_stream( (cairo_write_func_t)cairostream_write, cairostream_error, plot.device_xmax /*double width_in_points*/, plot.device_ymax /*double height_in_points*/); } else { surface = cairo_pdf_surface_create(outstr, plot.device_xmax /*double width_in_points*/, plot.device_ymax /*double height_in_points*/); } /* it is up to the pdf viewer to do the hinting */ plot.hinting = 0; /* disable OPERATOR_SATURATE, not implemented in cairo pdf backend, * results in bitmap fallback. However, polygons are drawn with seams * between each other. */ plot.polygons_saturate = FALSE; /* Empirical correction to make pdf output look more like wxt and png */ plot.dashlength /= 2; } else if (!strcmp(term->name,"pngcairo")) { surface = cairo_image_surface_create( CAIRO_FORMAT_ARGB32, plot.device_xmax /*double width_in_points*/, plot.device_ymax /*double height_in_points*/); /* png is bitmapped, let's do the full hinting */ plot.hinting = 100; /* png is produced by cairo "image" backend, which has full support * of OPERATOR_SATURATE */ plot.polygons_saturate = TRUE; } #ifdef HAVE_CAIROEPS else if (!strcmp(term->name,"epscairo")) { /* Output can either be a file or stdout */ if (!outstr) { surface = cairo_ps_surface_create_for_stream( (cairo_write_func_t)cairostream_write, cairostream_error, plot.device_xmax /*double width_in_points*/, plot.device_ymax /*double height_in_points*/); } else { surface = cairo_ps_surface_create(outstr, plot.device_xmax /*double width_in_points*/, plot.device_ymax /*double height_in_points*/); } cairo_ps_surface_set_eps(surface, TRUE); #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,11,1) if (!cairo_params->crop) { /* Normally, cairo clips the bounding box of eps files, but newer versions of Cairo let us enforce the bounding box. See http://old.nabble.com/EPS-target%3A-force-boundingbox-td29050435.html */ char bb[100]; sprintf(bb, "%%%%BoundingBox: 0 0 %i %i", plot.device_xmax, plot.device_ymax); cairo_ps_surface_dsc_comment(surface, bb); cairo_ps_surface_dsc_begin_page_setup(surface); sprintf(bb, "%%%%PageBoundingBox: 0 0 %i %i", plot.device_xmax, plot.device_ymax); cairo_ps_surface_dsc_comment(surface, bb); } #endif /* it is up to the pdf viewer to do the hinting */ plot.hinting = 0; /* disable OPERATOR_SATURATE, not implemented in cairo pdf backend, * results in bitmap fallback. However, polygons are drawn with seams * between each other. */ plot.polygons_saturate = FALSE; /* Empirical correction to make pdf output look more like wxt and png */ plot.dashlength /= 2; } #endif /* HAVE_CAIROEPS */ #ifdef PSLATEX_DRIVER else if (ISCAIROLATEX) { EPSLATEX_reopen_output(cairo_params->pdf_output ? "pdf" : "eps"); /* Output can only go to a stream */ if (cairo_params->pdf_output) { surface = cairo_pdf_surface_create_for_stream( (cairo_write_func_t)cairostream_write, cairostream_error, plot.device_xmax /*double width_in_points*/, plot.device_ymax /*double height_in_points*/); } #ifdef HAVE_CAIROEPS else { surface = cairo_ps_surface_create_for_stream( (cairo_write_func_t)cairostream_write, cairostream_error, plot.device_xmax /*double width_in_points*/, plot.device_ymax /*double height_in_points*/); cairo_ps_surface_set_eps(surface, TRUE); #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,11,1) { /* Always enforce the bounding box. */ char bb[100]; sprintf(bb, "%%%%BoundingBox: 0 0 %i %i", plot.device_xmax, plot.device_ymax); cairo_ps_surface_dsc_comment(surface, bb); cairo_ps_surface_dsc_begin_page_setup(surface); sprintf(bb, "%%%%PageBoundingBox: 0 0 %i %i", plot.device_xmax, plot.device_ymax); cairo_ps_surface_dsc_comment(surface, bb); } #endif } #endif /* it is up to the pdf viewer to do the hinting */ plot.hinting = 0; /* disable OPERATOR_SATURATE, not implemented in cairo pdf backend, * results in bitmap fallback. However, polygons are drawn with seams * between each other. */ plot.polygons_saturate = FALSE; /* Empirical correction to make pdf output look more like wxt and png */ plot.dashlength /= 2; } #endif plot.cr = cairo_create(surface); cairo_surface_destroy( surface ); FPRINTF((stderr,"status = %s\n",cairo_status_to_string(cairo_status(plot.cr)))); FPRINTF((stderr,"Init finished \n")); } /* "Called just before a plot is going to be displayed." * Should clear the terminal. */ void cairotrm_graphics() { /* Initialize background */ plot.background.r = cairo_params->background.r; plot.background.g = cairo_params->background.g; plot.background.b = cairo_params->background.b; gp_cairo_set_background(cairo_params->background); if (ISCAIROLATEX || cairo_params->transparent) gp_cairo_clear_background(&plot); else gp_cairo_solid_background(&plot); /* update the window scale factor first, cairo needs it */ plot.xscale = 1.0; plot.yscale = 1.0; /* update graphics state properties */ plot.rounded = cairo_params->rounded; FPRINTF((stderr,"Graphics1\n")); /* set the transformation matrix of the context, and other details */ /* depends on plot.xscale and plot.yscale */ gp_cairo_initialize_context(&plot); /* set or refresh terminal size according to the window size */ /* oversampling_scale is updated in gp_cairo_initialize_context */ term->xmax = (unsigned int) plot.device_xmax*plot.oversampling_scale; term->ymax = (unsigned int) plot.device_ymax*plot.oversampling_scale; term->tscale = plot.oversampling_scale; plot.xmax = term->xmax; plot.ymax = term->ymax; /* initialize encoding */ plot.encoding = encoding; /* set font details (h_char, v_char) according to settings */ cairotrm_set_font(""); term->v_tic = (unsigned int) (term->v_char/2.5); term->h_tic = (unsigned int) (term->v_char/2.5); #ifdef PSLATEX_DRIVER /* Init latex output, requires terminal size */ if (ISCAIROLATEX) EPSLATEX_common_init(); #endif #if CAIRO_VERSION < CAIRO_VERSION_ENCODE(1,11,1) /* Put "invisible" points in two corners to enforce bounding box. */ if ((ISCAIROLATEX) || ((cairo_params->terminal == CAIROTERM_EPS) && !cairo_params->crop)) { cairo_set_line_width(plot.cr, 1); cairo_set_source_rgb(plot.cr, cairo_params->background.r, cairo_params->background.g, cairo_params->background.b); cairo_move_to(plot.cr, 0, 0); cairo_line_to(plot.cr, 1, 0); cairo_move_to(plot.cr, plot.xmax - 1, plot.ymax); cairo_line_to(plot.cr, plot.xmax, plot.ymax); cairo_stroke(plot.cr); } #endif FPRINTF((stderr,"Graphics xmax %d ymax %d v_char %d h_char %d\n", term->xmax, term->ymax, term->v_char, term->h_char)); } /* cairo mechanism to allow writing to an output stream */ cairo_status_t cairostream_write(void *closure, unsigned char *data, unsigned int length) { /* in case of a cairolatex terminal, output is redirected to secondary file */ if (length != fwrite(data, 1, length, (ISCAIROLATEX) ? gppsfile : gpoutfile)) return CAIRO_STATUS_WRITE_ERROR; return CAIRO_STATUS_SUCCESS; } void cairopng_write_cropped_image(cairo_surface_t *surface) { unsigned char *data = cairo_image_surface_get_data(surface); int width = cairo_image_surface_get_width(surface); int height = cairo_image_surface_get_height(surface); int stride = cairo_image_surface_get_stride(surface); int i, j, x1 = 0, y1 = 0, x2 = width, y2 = height; guint32 *row; guint32 BG = (cairo_params->transparent) ? 0x0 : ~0x0; /* Row-wise, top-down iteration */ for (i = 0; i < height; i++) { row = (guint32 *) (data + i * stride); for (j = 0; j < width; j++) { if (row[j] != BG) { y1 = i; goto found_y1; } } } found_y1: /* Row-wise, bottom-up iteration */ for (i = height - 1; i >= y1; i--) { row = (guint32 *)(data + i * stride); for (j = 0; j < width; j++) { if (row[j] != BG) { y2 = i; goto found_y2; } } } found_y2: /* Column-wise, left-to-right iteration */ for (j = 0; j < width; j++) { for (i = y1; i <= y2; i++) { row = (guint32 *) (data + i * stride); if (row[j] != BG) { x1 = j; goto found_x1; } } } found_x1: /* Column-wise, right-to-left iteration */ for (j = width - 1; j >= x1; j--) { for (i = y1; i <= y2; i++) { row = (guint32 *) (data + i * stride); if (row[j] != BG) { x2 = j; goto found_x2; } } } found_x2: { const int padding = 10; int clip_width = GPMIN(x2 - x1 + padding, width); int clip_height = GPMIN(y2 - y1 + padding, height); cairo_surface_t *clip = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, clip_width, clip_height); cairo_t *clip_cr = cairo_create(clip); cairo_set_source_surface(clip_cr, surface, -GPMAX(x1 - padding / 2, 0), -GPMAX(y1 - padding / 2, 0)); cairo_rectangle(clip_cr, 0, 0, clip_width, clip_height); cairo_fill(clip_cr); /* Write out the clipped version of the surface and clean up */ cairo_surface_write_to_png_stream(clip, (cairo_write_func_t)cairostream_write, cairostream_error); cairo_surface_destroy(clip); cairo_destroy(clip_cr); } } void cairotrm_text() { FPRINTF((stderr,"Text0\n")); /* don't forget to stroke the last path if vector was the last command */ gp_cairo_stroke(&plot); /* and don't forget to draw the polygons if draw_polygon was the last command */ gp_cairo_end_polygon(&plot); FPRINTF((stderr,"status = %s\n",cairo_status_to_string(cairo_status(plot.cr)))); /* finish the page - cairo_destroy still has to be called for the whole documentation * to be written */ cairo_show_page(plot.cr); if (!strcmp(term->name,"pngcairo")) { cairo_surface_t *surface = cairo_get_target(plot.cr); if (cairo_params->crop) { cairopng_write_cropped_image(surface); } else { cairo_surface_write_to_png_stream(surface, (cairo_write_func_t)cairostream_write, cairostream_error); } } FPRINTF((stderr,"status = %s\n",cairo_status_to_string(cairo_status(plot.cr)))); FPRINTF((stderr,"Text finished\n")); } /* sent when gnuplot exits and when the terminal or the output change.*/ void cairotrm_reset() { /* finish the document */ cairo_destroy(plot.cr); #ifdef PSLATEX_DRIVER /* finish latex output */ if (ISCAIROLATEX) PSLATEX_reset(); #endif FPRINTF((stderr,"cairotrm_reset\n")); } void cairotrm_move(unsigned int x, unsigned int y) { gp_cairo_move(&plot, x, term->ymax - y); } void cairotrm_vector(unsigned int x, unsigned int y) { gp_cairo_vector(&plot, x, term->ymax - y); } void cairotrm_put_text(unsigned int x, unsigned int y, const char * string) { if (!string || !strlen(string)) return; /* if ignore_enhanced_text is set, draw with the normal routine. * This is meant to avoid enhanced syntax when the enhanced mode is on */ if (ignore_enhanced_text || !cairo_params->enhanced) { gp_cairo_draw_text(&plot, x, term->ymax - y, string); return; } /* If there are no mark-up characters we can use the normal routine */ if (!strpbrk(string, "{}^_@&~")) { gp_cairo_draw_text(&plot, x, term->ymax - y, string); return; } /* Uses enhanced_recursion() to analyse the string to print. * enhanced_recursion() calls _enhanced_open() to initialize the text drawing, * then it calls _enhanced_writec() which buffers the characters to draw, * and finally _enhanced_flush() to draw the buffer with the correct justification. */ gp_cairo_enhanced_init(&plot, strlen(string)); /* set up the global variables needed by enhanced_recursion() */ enhanced_fontscale = cairo_params->fontscale; strncpy(enhanced_escape_format, "%c", sizeof(enhanced_escape_format)); /* Set the recursion going. We say to keep going until a * closing brace, but we don't really expect to find one. * If the return value is not the nul-terminator of the * string, that can only mean that we did find an unmatched * closing brace in the string. We inplot->crement past it (else * we get stuck in an infinite loop) and try again. */ while (*(string = enhanced_recursion((char*)string, TRUE, plot.fontname, plot.fontsize, 0.0, TRUE, TRUE, 0))) { cairotrm_enhanced_flush(); /* we can only get here if *str == '}' */ enh_err_check(string); if (!*++string) break; /* end of string */ /* else carry on and process the rest of the string */ } /* finish */ gp_cairo_enhanced_finish(&plot, x, term->ymax - y); return; } void cairotrm_enhanced_flush() { gp_cairo_enhanced_flush(&plot); } void cairotrm_enhanced_writec(int c) { gp_cairo_enhanced_writec(&plot, c); } void cairotrm_enhanced_open(char* fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { gp_cairo_enhanced_open(&plot, fontname, fontsize, base, widthflag, showflag, overprint); } void cairotrm_linetype(int lt) { gp_cairo_set_linetype(&plot, lt); if (cairo_params->dashed || lt == -1) gp_cairo_set_linestyle(&plot, GP_CAIRO_DASH); else gp_cairo_set_linestyle(&plot, GP_CAIRO_SOLID); if (cairo_params->mono && lt >= -1) gp_cairo_set_color(&plot, gp_cairo_linetype2color( -1 )); else gp_cairo_set_color(&plot, gp_cairo_linetype2color( lt )); } /* - fonts are selected as strings "name,size". * - _set_font("") restores the terminal's default font.*/ int cairotrm_set_font (const char *font) { char fontname[MAX_ID_LEN + 1] = ""; int fontsize = 0; if (!font || !(*font)) { strncpy(fontname, "", sizeof(fontname)); fontsize = 0; } else { int sep; sep = strcspn(font,","); if (sep > 0) { strncpy(fontname, font, sep); fontname[sep] = '\0'; } if (font[sep] == ',') sscanf(&(font[sep+1]), "%d", &fontsize); } if ( strlen(fontname) == 0 ) { if ( strlen(cairo_params->fontname) == 0 ) strncpy(fontname, CAIROTRM_DEFAULT_FONTNAME, sizeof(fontname)); else strncpy(fontname, cairo_params->fontname, sizeof(fontname)); } if ( fontsize == 0 ) { if ( cairo_params->fontsize == 0 ) fontsize = cairo_params_default->fontsize; else fontsize = cairo_params->fontsize; } /* Reset the term variables (hchar, vchar, h_tic, v_tic). * They may be taken into account in next plot commands */ gp_cairo_set_font(&plot, fontname, fontsize * cairo_params->fontscale); gp_cairo_set_termvar(&plot, &(term->v_char), &(term->h_char)); /* the returned int is not used anywhere */ return 1; } int cairotrm_justify_text(enum JUSTIFY mode) { gp_cairo_set_justify(&plot,mode); return 1; /* we can justify */ } void cairotrm_point(unsigned int x, unsigned int y, int pointstyle) { gp_cairo_draw_point(&plot, x, term->ymax - y, pointstyle); } void cairotrm_pointsize(double ptsize) { /* same behaviour as x11 terminal */ if (ptsize<0) ptsize = 1; gp_cairo_set_pointsize(&plot, ptsize); } void cairotrm_linewidth(double lw) { lw *= cairo_params->lw * cairo_params->base_linewidth; gp_cairo_set_linewidth(&plot, lw); } int cairotrm_text_angle(int angle) { /* a double is needed to compute cos, sin, etc. */ gp_cairo_set_textangle(&plot, (double) angle); return 1; /* 1 means we can rotate */ } void cairotrm_fillbox(int style, unsigned int x, unsigned int y, unsigned int width, unsigned int height) { gp_cairo_draw_fillbox(&plot, x, term->ymax - y, width, height, style); } int cairotrm_make_palette(t_sm_palette * palette) { /* we can do continuous colors */ return 0; } void cairotrm_set_color(t_colorspec *colorspec) { rgb_color rgb1; if (colorspec->type == TC_LT) { rgb1 = gp_cairo_linetype2color(colorspec->lt); } else if (colorspec->type == TC_FRAC && cairo_params->mono) { int save_colorMode = sm_palette.colorMode; sm_palette.colorMode = SMPAL_COLOR_MODE_GRAY; rgb1maxcolors_from_gray( colorspec->value, &rgb1 ); sm_palette.colorMode = save_colorMode; } else if (colorspec->type == TC_FRAC) { rgb1maxcolors_from_gray( colorspec->value, &rgb1 ); } else if (colorspec->type == TC_RGB) { rgb1.r = (double) ((colorspec->lt >> 16) & 0xff)/255; rgb1.g = (double) ((colorspec->lt >> 8) & 0xff)/255; rgb1.b = (double) ((colorspec->lt) & 0xff)/255; } else return; gp_cairo_set_color(&plot, rgb1); } /* 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"); /* 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; } gp_cairo_draw_polygon(&plot, n, mirrored_corners); free(mirrored_corners); } void cairotrm_image(unsigned int M, unsigned int N, coordval * image, gpiPoint * corner, t_imagecolor color_mode) { /* This routine is to plot a pixel-based image on the display device. 'M' is the number of pixels along the y-dimension of the image and 'N' is the number of pixels along the x-dimension of the image. The coordval pointer 'image' is the pixel values normalized to the range [0:1]. These values should be scaled accordingly for the output device. They 'image' data starts in the upper left corner and scans along rows finishing in the lower right corner. If 'color_mode' is IC_PALETTE, the terminal is to use palette lookup to generate color information. In this scenario the size of 'image' is M*N. If 'color_mode' is IC_RGB, the terminal is to use RGB components. In this scenario the size of 'image' is 3*M*N. The data appears in RGB tripples, i.e., image[0] = R(1,1), image[1] = G(1,1), image[2] = B(1,1), image[3] = R(1,2), image[4] = G(1,2), ..., image[3*M*N-1] = B(M,N). The 'image' is actually an "input" image in the sense that it must also be properly resampled for the output device. Many output mediums, e.g., PostScript, do this work via various driver functions. To determine the appropriate rescaling, the 'corner' information should be used. There are four entries in the gpiPoint data array. 'corner[0]' is the upper left corner (in terms of plot location) of the outer edge of the image. Similarly, 'corner[1]' is the lower right corner of the outer edge of the image. (Outer edge means the outer extent of the corner pixels, not the middle of the corner pixels.) 'corner[2]' is the upper left corner of the visible part of the image, and 'corner[3]' is the lower right corner of the visible part of the image. The information is provided in this way because often it is necessary to clip a portion of the outer pixels of the image. */ /* we will draw an image, scale and resize it */ /* FIXME add palette support ??? */ unsigned int *image255 = gp_cairo_helper_coordval_to_chars(image, M, N, color_mode); gp_cairo_draw_image(&plot, image255, corner[0].x, term->ymax - corner[0].y, corner[1].x, term->ymax - corner[1].y, corner[2].x, term->ymax - corner[2].y, corner[3].x, term->ymax - corner[3].y, M, N); free(image255); } #endif /* TERM_BODY */ #ifdef TERM_TABLE #ifdef HAVE_CAIROEPS TERM_TABLE_START (epscairo_driver) "epscairo", "eps terminal based on cairo", /* the following values are overriden by cairotrm_graphics */ 1 /* xmax */ , 1 /* ymax */ , 1 /* vchar */ , 1 /* hchar */ , 1 /* vtic */ , 1 /* htic */ , cairotrm_options, cairotrm_init, cairotrm_reset, cairotrm_text, null_scale, cairotrm_graphics, cairotrm_move, cairotrm_vector, cairotrm_linetype, cairotrm_put_text, cairotrm_text_angle, cairotrm_justify_text, cairotrm_point, do_arrow, cairotrm_set_font, cairotrm_pointsize, TERM_CAN_MULTIPLOT|TERM_BINARY|TERM_CAN_DASH|TERM_ALPHA_CHANNEL|TERM_LINEWIDTH|TERM_FONTSCALE, 0 /* suspend */, 0 /* resume */, cairotrm_fillbox, cairotrm_linewidth #ifdef USE_MOUSE , 0, 0, 0, 0, 0 #endif , cairotrm_make_palette, 0 /* cairotrm_previous_palette */, cairotrm_set_color, cairotrm_filled_polygon , cairotrm_image , cairotrm_enhanced_open, cairotrm_enhanced_flush, cairotrm_enhanced_writec , 0, 0, 1.0 TERM_TABLE_END (epscairo_driver) #undef LAST_TERM #define LAST_TERM epscairo_driver #endif /* HAVE_CAIROEPS */ #ifdef PSLATEX_DRIVER TERM_TABLE_START(cairolatex_driver) "cairolatex", "LaTeX picture environment using graphicx package and Cairo backend", /* the following values are overriden by cairotrm_graphics */ 1 /* xmax */ , 1 /* ymax */ , 1 /* vchar */ , 1 /* hchar */ , 1 /* vtic */ , 1 /* htic */ , cairotrm_options, cairotrm_init, cairotrm_reset, cairotrm_text, null_scale, cairotrm_graphics, cairotrm_move, cairotrm_vector, cairotrm_linetype, EPSLATEX_put_text, PS_text_angle, PS_justify_text, cairotrm_point, do_arrow, cairotrm_set_font, cairotrm_pointsize, TERM_CAN_MULTIPLOT|TERM_BINARY|TERM_CAN_DASH|TERM_ALPHA_CHANNEL|TERM_LINEWIDTH|TERM_FONTSCALE|TERM_IS_LATEX, 0 /* suspend */, 0 /* resume */, cairotrm_fillbox, cairotrm_linewidth, #ifdef USE_MOUSE 0, 0, 0, 0, 0, /* no mouse support for postscript */ #endif cairotrm_make_palette, 0 /* cairotrm_previous_palette */, EPSLATEX_set_color, cairotrm_filled_polygon, cairotrm_image, 0, 0, 0, /* Enhanced text mode not used */ EPSLATEX_layer, /* Used to signal front/back text */ 0, 1.0 TERM_TABLE_END(cairolatex_driver) #undef LAST_TERM #define LAST_TERM cairolatex_driver #endif /* PSLATEX_DRIVER */ TERM_TABLE_START (pdfcairo_driver) "pdfcairo", "pdf terminal based on cairo", /* the following values are overriden by cairotrm_graphics */ 1 /* xmax */ , 1 /* ymax */ , 1 /* vchar */ , 1 /* hchar */ , 1 /* vtic */ , 1 /* htic */ , cairotrm_options, cairotrm_init, cairotrm_reset, cairotrm_text, null_scale, cairotrm_graphics, cairotrm_move, cairotrm_vector, cairotrm_linetype, cairotrm_put_text, cairotrm_text_angle, cairotrm_justify_text, cairotrm_point, do_arrow, cairotrm_set_font, cairotrm_pointsize, TERM_CAN_MULTIPLOT|TERM_BINARY|TERM_CAN_DASH|TERM_ALPHA_CHANNEL|TERM_LINEWIDTH|TERM_FONTSCALE, 0 /* suspend */, 0 /* resume */, cairotrm_fillbox, cairotrm_linewidth #ifdef USE_MOUSE , 0, 0, 0, 0, 0 #endif , cairotrm_make_palette, 0 /* cairotrm_previous_palette */, cairotrm_set_color, cairotrm_filled_polygon , cairotrm_image , cairotrm_enhanced_open, cairotrm_enhanced_flush, cairotrm_enhanced_writec , 0, 0, 1.0 TERM_TABLE_END (pdfcairo_driver) #undef LAST_TERM #define LAST_TERM pdfcairo_driver TERM_TABLE_START (pngcairo_driver) "pngcairo", "png terminal based on cairo", /* the following values are overriden by cairotrm_graphics */ 1 /* xmax */ , 1 /* ymax */ , 1 /* vchar */ , 1 /* hchar */ , 1 /* vtic */ , 1 /* htic */ , cairotrm_options, cairotrm_init, cairotrm_reset, cairotrm_text, null_scale, cairotrm_graphics, cairotrm_move, cairotrm_vector, cairotrm_linetype, cairotrm_put_text, cairotrm_text_angle, cairotrm_justify_text, cairotrm_point, do_arrow, cairotrm_set_font, cairotrm_pointsize, TERM_BINARY|TERM_CAN_DASH|TERM_ALPHA_CHANNEL|TERM_LINEWIDTH|TERM_FONTSCALE, 0 /* suspend */, 0 /* resume */, cairotrm_fillbox, cairotrm_linewidth #ifdef USE_MOUSE , 0, 0, 0, 0, 0 #endif , cairotrm_make_palette, 0 /* cairotrm_previous_palette */, cairotrm_set_color, cairotrm_filled_polygon , cairotrm_image , cairotrm_enhanced_open, cairotrm_enhanced_flush, cairotrm_enhanced_writec , 0, 0, 1.0 TERM_TABLE_END (pngcairo_driver) #undef LAST_TERM #define LAST_TERM pngcairo_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(epscairo) "1 epscairo", "?set terminal epscairo", "?terminal epscairo", "?set term epscairo", "?term epscairo", "?epscairo", " The `epscairo` terminal device generates encapsulated PostScript (*.eps) using", " the cairo and pango support libraries. cairo verion >= 1.6 is required.", "", " Please read the help for the `pdfcairo` terminal." "" END_HELP(epscairo) #endif /* TERM_HELP */ #ifdef TERM_HELP START_HELP(cairolatex) "1 cairolatex", "?set terminal cairolatex", "?terminal cairolatex", "?set term cairolatex", "?term cairolatex", "?cairolatex", " The `cairolatex` terminal device generates encapsulated PostScript (*.eps) or", " PDF output using the cairo and pango support libraries and uses LaTeX for", " text output using the same routines as the `epslatex` terminal.", "", " Syntax:", " set terminal cairolatex", " {eps | pdf}", " {standalone | input}", " {blacktext | colortext | colourtext}", " {header
| noheader}", " {mono|color} {solid|dashed}", " {{no}transparent} {{no}crop} {background }", " {font } {fontscale }", " {linewidth } {rounded|butt} {dashlength
}", " {size {unit},{unit}}", "", " The cairolatex terminal prints a plot like `terminal epscairo` or", " `terminal pdfcairo` but transfers the texts to LaTeX instead of including", " them in the graph. For reference of options not explained here see `pdfcairo`.", "", " `eps` and `pdf` select the type of grahics output. Use `eps` with", " latex/dvips and `pdf` for pdflatex.", "", " `blacktext` forces all text to be written in black even in color mode;", "", " The `cairolatex` driver offers a special way of controlling text positioning:", " (a) If any text string begins with '{', you also need to include a '}' at the", " end of the text, and the whole text will be centered both horizontally", " and vertically by LaTeX. (b) If the text string begins with '[', you need", " to continue it with: a position specification (up to two out of t,b,l,r,c),", " ']{', the text itself, and finally, '}'. The text itself may be anything", " LaTeX can typeset as an LR-box. \\rule{}{}'s may help for best positioning.", " See also the documentation for the `pslatex` terminal driver.", " To create multiline labels, use \\shortstack, for example", " set ylabel '[r]{\\shortstack{first line \\\\ second line}}'", "", " The `back` option of `set label` commands is handled slightly different", " than in other terminals. Labels using 'back' are printed behind all other", " elements of the plot while labels using 'front' are printed above", " everything else.", "", " The driver produces two different files, one for the eps or pdf part of the", " figure and one for the LaTeX part. The name of the LaTeX file is taken from", " the `set output` command. The name of the eps/pdf file is derived by", " replacing the file extension (normally '.tex') with '.eps' or '.pdf' instead.", " There is no LaTeX output if no output file is given! Remember to close the", " `output file` before next plot unless in `multiplot` mode.", "", " In your LaTeX documents use '\\input{filename}' to include the figure.", " The '.eps' or '.pdf' file is included by the command \\includegraphics{...},", " so you must also include \\usepackage{graphicx} in the LaTeX preamble. If", " you want to use coloured text (option `colourtext`) you also have to include", " \\usepackage{color} in the LaTeX preamble.", "", " The behaviour concerning font selection depends on the header mode.", " In all cases, the given font size is used for the calculation of proper", " spacing. When not using the `standalone` mode the actual LaTeX font and", " font size at the point of inclusion is taken, so use LaTeX commands for", " changing fonts. If you use e.g. 12pt as font size for your LaTeX", " document, use '\", 12\"' as options. The font name is ignored. If using", " `standalone` the given font and font size are used, see below for a", " detailed description.", "", " If text is printed coloured is controlled by the TeX booleans \\ifGPcolor", " and \\ifGPblacktext. Only if \\ifGPcolor is true and \\ifGPblacktext is", " false, text is printed coloured. You may either change them in the", " generated TeX file or provide them globally in your TeX file, for example", " by using", " \\newif\\ifGPblacktext", " \\GPblacktexttrue", " in the preamble of your document. The local assignment is only done if no", " global value is given.", "", " When using the cairolatex terminal give the name of the TeX file in the", " `set output` command including the file extension (normally \".tex\").", " The graph filename is generated by replacing the extension.", "", " If using the `standalone` mode a complete LaTeX header is added to the", " LaTeX file; and \"-inc\" is added to the filename of the gaph file.", " The `standalone` mode generates a TeX file that produces", " output with the correct size when using dvips, pdfTeX, or VTeX.", " The default, `input`, generates a file that has to be included into a", " LaTeX document using the \\input command.", "", " If a font other than \"\" or \"default\" is given it is interpreted as", " LaTeX font name. It contains up to three parts, separated by a comma:", " 'fontname,fontseries,fontshape'. If the default fontshape or fontseries", " are requested, they can be omitted. Thus, the real syntax for the fontname", " is '{fontname}{,fontseries}{,fontshape}'. The naming convention for all", " parts is given by the LaTeX font scheme. The fontname is 3 to 4 characters", " long and is built as follows: One character for the font vendor, two", " characters for the name of the font, and optionally one additional", " character for special fonts, e.g., 'j' for fonts with old-style numerals", " or 'x' for expert fonts. The names of many fonts is described in", "^ ", " http://www.tug.org/fontname/fontname.pdf", "^ ", " For example, 'cmr' stands for Computer Modern Roman, 'ptm' for Times-Roman,", " and 'phv' for Helvetica. The font series denotes the thickness of the", " glyphs, in most cases 'm' for normal (\"medium\") and 'bx' or 'b' for bold", " fonts. The font shape is 'n' for upright, 'it' for italics, 'sl' for", " slanted, or 'sc' for small caps, in general. Some fonts may provide", " different font series or shapes.", "", " Examples:", "", " Use Times-Roman boldface (with the same shape as in the surrounding text):", " set terminal cairolatex font 'ptm,bx'", " Use Helvetica, boldface, italics:", " set terminal cairolatex font 'phv,bx,it'", " Continue to use the surrounding font in slanted shape:", " set terminal cairolatex font ',,sl'", " Use small capitals:", " set terminal cairolatex font ',,sc'", "", " By this method, only text fonts are changed. If you also want to change", " the math fonts you have to use the \"gnuplot.cfg\" file or the `header`", " option, described below.", "", " In `standalone` mode, the font size is taken from the given font size in the", " `set terminal` command. To be able to use a specified font size, a file", " \"size.clo\" has to reside in the LaTeX search path. By default,", " 10pt, 11pt, and 12pt are supported. If the package \"extsizes\" is", " installed, 8pt, 9pt, 14pt, 17pt, and 20pt are added.", "", " The `header` option takes a string as argument. This string is written", " into the generated LaTeX file. If using the `standalone` mode, it is", " written into the preamble, directly before the \\begin{document} command.", " In the `input` mode, it is placed directly after the \\begingroup command", " to ensure that all settings are local to the plot.", "", " Examples:", "", " Use T1 fontencoding, change the text and math font to Times-Roman as well", " as the sans-serif font to Helvetica:", " set terminal cairolatex standalone header \\", " \"\\\\usepackage[T1]{fontenc}\\n\\\\usepackage{mathptmx}\\n\\\\usepackage{helvet}\"", " Use a boldface font in the plot, not influencing the text outside the plot:", " set terminal cairolatex input header \"\\\\bfseries\"", "", " If the file \"gnuplot.cfg\" is found by LaTeX it is input in the preamble", " the LaTeX document, when using `standalone` mode. It can be used for", " further settings, e.g., changing the document font to Times-Roman,", " Helvetica, and Courier, including math fonts (handled by \"mathptmx.sty\"):", " \\usepackage{mathptmx}", " \\usepackage[scaled=0.92]{helvet}", " \\usepackage{courier}", " The file \"gnuplot.cfg\" is loaded before the header information given", " by the `header` command. Thus, you can use `header` to overwrite some of", " settings performed using \"gnuplot.cfg\"", "" END_HELP(cairolatex) #endif /* TERM_HELP */ #ifdef TERM_HELP START_HELP(pdfcairo) "1 pdfcairo", "?set terminal pdfcairo", "?terminal pdfcairo", "?set term pdfcairo", "?term pdfcairo", "?pdfcairo", " The `pdfcairo` terminal device generates output in pdf. The actual", " drawing is done via cairo, a 2D graphics library, and pango, a library for", " laying out and rendering text.", "", " Syntax:", " set term pdfcairo", " {{no}enhanced} {mono|color} {solid|dashed}", " {font } {fontscale }", " {linewidth } {rounded|butt} {dashlength
}", " {size {unit},{unit}}", "", " This terminal supports an enhanced text mode, which allows font and other", " formatting commands (subscripts, superscripts, etc.) to be embedded in labels", " and other text strings. The enhanced text mode syntax is shared with other", " gnuplot terminal types. See `enhanced` for more details.", "", " The width of all lines in the plot can be modified by the factor ", " specified in `linewidth`. The default linewidth is 0.25 points.", " (1 \"PostScript\" point = 1/72 inch = 0.353 mm)", "", " `rounded` sets line caps and line joins to be rounded; `butt` is the", " default, butt caps and mitered joins.", "", " The default size for the output is 5 inches x 3 inches. The `size` option", " changes this to whatever the user requests. By default the X and Y sizes are", " taken to be in inches, but other units are possible (currently only cm).", " Screen coordinates always run from 0.0 to 1.0 along the full length of the", " plot edges as specified by the `size` option.", "", " is in the format \"FontFace,FontSize\", i.e. the face and the size", " comma-separated in a single string. FontFace is a usual font face name, such", " as \'Arial\'. If you do not provide FontFace, the pdfcairo terminal will use", " \'Sans\'. FontSize is the font size, in points. If you do not provide it,", " the pdfcairo terminal will use a nominal font size of 12 points.", " However, the default fontscale parameter for this terminal is 0.5,", " so the apparent font size is smaller than this if the pdf output is", " viewed at full size.", " For example :", " set term pdfcairo font \"Arial,12\"", " set term pdfcairo font \"Arial\" # to change the font face only", " set term pdfcairo font \",12\" # to change the font size only", " set term pdfcairo font \"\" # to reset the font name and size", "", " The fonts are retrieved from the usual fonts subsystems. Under Windows,", " those fonts are to be found and configured in the entry \"Fonts\" of the", " control panel. Under UNIX, they are handled by \"fontconfig\".", "", " Pango, the library used to layout the text, is based on utf-8. Thus, the pdfcairo", " terminal has to convert from your encoding to utf-8. The default input", " encoding is based on your \'locale\'. If you want to use another encoding,", " make sure gnuplot knows which one you are using. See `encoding` for more", " details.", "", " Pango may give unexpected results with fonts that do not respect the unicode", " mapping. With the Symbol font, for example, the pdfcairo terminal will use the map", " provided by http://www.unicode.org/ to translate character codes to unicode.", " Note that \"the Symbol font\" is to be understood as the Adobe", " Symbol font, distributed with Acrobat Reader as \"SY______.PFB\".", " Alternatively, the OpenSymbol font, distributed with OpenOffice.org as", " \"opens___.ttf\", offers the same characters. Microsoft has distributed a", " Symbol font (\"symbol.ttf\"), but it has a different character set with", " several missing or moved mathematic characters. If you experience problems", " with your default setup (if the demo enhancedtext.dem is not displayed", " properly for example), you probably have to install one of the Adobe or", " OpenOffice Symbol fonts, and remove the Microsoft one.", " Other non-conform fonts, such as \"wingdings\" have been observed working.", "", " The rendering of the plot cannot be altered yet. To obtain the best output", " possible, the rendering involves two mechanisms : antialiasing and", " oversampling.", " Antialiasing allows to display non-horizontal and non-vertical lines", " smoother.", " Oversampling combined with antialiasing provides subpixel accuracy,", " so that gnuplot can draw a line from non-integer coordinates. This avoids", " wobbling effects on diagonal lines ('plot x' for example).", "" END_HELP(pdfcairo) #endif /* TERM_HELP */ #ifdef TERM_HELP START_HELP(pngcairo) "1 pngcairo", "?set terminal pngcairo", "?terminal pngcairo", "?set term pngcairo", "?term pngcairo", "?pngcairo", " The `pngcairo` terminal device generates output in png. The actual", " drawing is done via cairo, a 2D graphics library, and pango, a library for", " laying out and rendering text.", "", " Syntax:", " set term pngcairo", " {{no}enhanced} {mono|color} {solid|dashed}", " {{no}transparent} {{no}crop} {background ", " {font } {fontscale }", " {linewidth } {rounded|butt} {dashlength
}", " {size {unit},{unit}}", "", " This terminal supports an enhanced text mode, which allows font and other", " formatting commands (subscripts, superscripts, etc.) to be embedded in labels", " and other text strings. The enhanced text mode syntax is shared with other", " gnuplot terminal types. See `enhanced` for more details.", "", " The width of all lines in the plot can be modified by the factor .", "", " `rounded` sets line caps and line joins to be rounded; `butt` is the", " default, butt caps and mitered joins.", "", " The default size for the output is 640 x 480 pixels. The `size` option", " changes this to whatever the user requests. By default the X and Y sizes are", " taken to be in pixels, but other units are possible (currently cm and inch).", " A size given in centimeters or inches will be converted into pixels assuming", " a resolution of 72 dpi. Screen coordinates always run from 0.0 to 1.0 along", " the full length of the plot edges as specified by the `size` option.", "", " is in the format \"FontFace,FontSize\", i.e. the face and the size", " comma-separated in a single string. FontFace is a usual font face name, such", " as \'Arial\'. If you do not provide FontFace, the pngcairo terminal will use", " \'Sans\'. FontSize is the font size, in points. If you do not provide it,", " the pngcairo terminal will use a size of 12 points.", " For example :", " set term pngcairo font \"Arial,12\"", " set term pngcairo font \"Arial\" # to change the font face only", " set term pngcairo font \",12\" # to change the font size only", " set term pngcairo font \"\" # to reset the font name and size", "", " The fonts are retrieved from the usual fonts subsystems. Under Windows,", " those fonts are to be found and configured in the entry \"Fonts\" of the", " control panel. Under UNIX, they are handled by \"fontconfig\".", "", " Pango, the library used to layout the text, is based on utf-8. Thus, the pngcairo", " terminal has to convert from your encoding to utf-8. The default input", " encoding is based on your \'locale\'. If you want to use another encoding,", " make sure gnuplot knows which one you are using. See `encoding` for more", " details.", "", " Pango may give unexpected results with fonts that do not respect the unicode", " mapping. With the Symbol font, for example, the pngcairo terminal will use the map", " provided by http://www.unicode.org/ to translate character codes to unicode.", " Note that \"the Symbol font\" is to be understood as the Adobe", " Symbol font, distributed with Acrobat Reader as \"SY______.PFB\".", " Alternatively, the OpenSymbol font, distributed with OpenOffice.org as", " \"opens___.ttf\", offers the same characters. Microsoft has distributed a", " Symbol font (\"symbol.ttf\"), but it has a different character set with", " several missing or moved mathematic characters. If you experience problems", " with your default setup (if the demo enhancedtext.dem is not displayed", " properly for example), you probably have to install one of the Adobe or", " OpenOffice Symbol fonts, and remove the Microsoft one.", " Other non-conform fonts, such as \"wingdings\" have been observed working.", "", " The rendering of the plot cannot be altered yet. To obtain the best output", " possible, the rendering involves two mechanisms : antialiasing and", " oversampling.", " Antialiasing allows to display non-horizontal and non-vertical lines", " smoother.", " Oversampling combined with antialiasing provides subpixel accuracy,", " so that gnuplot can draw a line from non-integer coordinates. This avoids", " wobbling effects on diagonal lines ('plot x' for example).", "" END_HELP(pngcairo) #endif /* TERM_HELP */ gnuplot-4.6.4/term/kyo.trm0000644000471100001440000001435310460036603012432 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: kyo.trm,v 1.12 2006/07/21 02:35:47 sfeam Exp $ * */ /* Prescribe (KYOCERA) driver - Michael Waldor */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* Modified for gnuplot 2.0 sk@sun4 24-Apr-1990 13:23 */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(prescribe) register_term(kyo) #endif #ifdef TERM_PROTO TERM_PUBLIC void PRE_init __PROTO((void)); TERM_PUBLIC void KYO_init __PROTO((void)); TERM_PUBLIC void PRE_graphics __PROTO((void)); TERM_PUBLIC void PRE_text __PROTO((void)); TERM_PUBLIC void PRE_linetype __PROTO((int linetype)); TERM_PUBLIC void PRE_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void PRE_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void PRE_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int PRE_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void PRE_reset __PROTO((void)); #define PRE_XMAX 2567 #define PRE_YMAX 1815 /* X:Y = sqrt(2) */ #define PRE_VCHAR (PRE_YMAX/30) #define PRE_HCHAR 33 /* about 9 chars per inch */ #define PRE_HTIC (PRE_XMAX/80) #define PRE_VTIC PRE_HTIC /* for Courier font: */ #define KYO_VCHAR (14*(300/72)) /* 12 pt + 2 pt baselineskip */ #define KYO_HCHAR (300/10) /* 10 chars per inch */ #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #define PRE_XLAST (PRE_XMAX - 1) #define PRE_YLAST (PRE_YMAX - 1) enum JUSTIFY pre_justify = LEFT; /* text is flush left */ TERM_PUBLIC void PRE_init() { fputs("!R! RES;\n", gpoutfile); /* UNIT: units are dots, 300 dots = 1 in = 72 pt */ /* SPO: landscape format */ /* STM, SLM set top, left margin */ /* Font: bold Helvetica (proportional font) */ fputs("PAGE; UNIT D; SPO L; STM 280; SLM 440;\n", gpoutfile); fputs("FTMD 15; FONT 29; SCPI 9;\n", gpoutfile); } TERM_PUBLIC void KYO_init() { fputs("!R! RES;\n", gpoutfile); /* UNIT: units are dots, 300 dots = 1 in = 72 pt */ /* SPO: landscape format */ /* STM, SLM set top, left margin */ /* Font: Courier (fixed width font) */ fputs("PAGE; UNIT D; SPO L; STM 280; SLM 440;\n", gpoutfile); fputs("FTMD 15; FONT 17; SCPI 10;\n", gpoutfile); } TERM_PUBLIC void PRE_graphics() { } TERM_PUBLIC void PRE_text() { /* eject page after each plot */ fputs("PAGE;\n", gpoutfile); } TERM_PUBLIC void PRE_linetype(int linetype) { /* actually choose pendiameter */ if (linetype < 0) linetype = -linetype; else linetype = 3; (void) fprintf(gpoutfile, "SPD %d;\n", linetype); } TERM_PUBLIC void PRE_move(unsigned int x, unsigned int y) { (void) fprintf(gpoutfile, "MAP %1d,%1d;\n", x, PRE_YMAX - y); } TERM_PUBLIC void PRE_vector(unsigned int x, unsigned int y) { (void) fprintf(gpoutfile, "DAP %1d, %1d;\n", x, PRE_YMAX - y); } TERM_PUBLIC void PRE_put_text(unsigned int x, unsigned int y, const char *str) { PRE_move(x, y); switch (pre_justify) { case RIGHT: (void) fprintf(gpoutfile, "RTXT \"%s\", B;\n", str); break; default: (void) fprintf(gpoutfile, "TEXT \"%s\", B;\n", str); } } TERM_PUBLIC int PRE_justify_text(enum JUSTIFY mode) { pre_justify = mode; switch (pre_justify) { case LEFT: case RIGHT: return (TRUE); default: return (FALSE); } } TERM_PUBLIC void PRE_reset() { fputs("PAGE; RES; EXIT;\n", gpoutfile); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(prescribe_driver) "prescribe", "Prescribe - for the Kyocera Laser Printer", PRE_XMAX, PRE_YMAX, PRE_VCHAR, PRE_HCHAR, PRE_VTIC, PRE_HTIC, options_null, PRE_init, PRE_reset, PRE_text, null_scale, PRE_graphics, PRE_move, PRE_vector, PRE_linetype, PRE_put_text, null_text_angle, PRE_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(prescribe_driver) #undef LAST_TERM #define LAST_TERM prescribe_driver TERM_TABLE_START(kyo_driver) "kyo", "Kyocera Laser Printer with Courier font", PRE_XMAX, PRE_YMAX, KYO_VCHAR, KYO_HCHAR, PRE_VTIC, PRE_HTIC, options_null, KYO_init, PRE_reset, PRE_text, null_scale, PRE_graphics, PRE_move, PRE_vector, PRE_linetype, PRE_put_text, null_text_angle, PRE_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(kyo_driver) #undef LAST_TERM #define LAST_TERM kyo_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(kyo) "1 kyo", "?commands set terminal kyo", "?set terminal kyo", "?set term kyo", "?terminal kyo", "?term kyo", "?kyo", "?commands set terminal prescribe", "?set terminal prescribe", "?set term prescribe", "?terminal prescribe", "?term prescribe", "?prescribe", " The `kyo` and `prescribe` terminal drivers support the Kyocera laser printer.", " The only difference between the two is that `kyo` uses \"Helvetica\" whereas", " `prescribe` uses \"Courier\". There are no options." END_HELP(kyo) #endif gnuplot-4.6.4/term/pdf.trm0000644000471100001440000014625111350330645012406 0ustar /* Hello, Emacs, this is -*-C-*- * $Id: pdf.trm,v 1.88 2010/03/18 04:52:53 sfeam Exp $ */ /*------------------------------ GNUPLOT - pdf.trm This file is included by ../term.c. This driver uses PDFlib from www.pdflib.com Author: Hans-Bernhard Br"oker broeker@physik.rwth-aachen.de Licence: see the gnuplot copyright (to be merged into here...) Options: can #define PDF_DONT_COMPRESS to avoid PDF output generated being compressed (by the 'deflate' algorithm as used in 'zip' or 'gzip'). That helps in debugging. ------------------------------*/ /* CODEME: Add patterned lines (?). */ /* PM3D support by Johannes Zellner , May-15-2002 */ /* set_color fixes by Petr Mikulik , June-10-2002 */ /* image support by Ethan A Merritt , March 2003 */ /* Text rotation 24-Jul-2002 Ethan A Merritt */ /* Revised fill patterns 02-Apr-2003 Ethan A Merritt */ /* Enhanced text mode support November 2003 Ethan A Merritt */ #include "driver.h" #ifdef TERM_REGISTER register_term(pdf) #endif #ifdef TERM_PROTO TERM_PUBLIC void PDF_options __PROTO ((void)); TERM_PUBLIC void PDF_init __PROTO ((void)); TERM_PUBLIC void PDF_graphics __PROTO ((void)); TERM_PUBLIC void PDF_text __PROTO ((void)); TERM_PUBLIC void PDF_linetype __PROTO ((int linetype)); TERM_PUBLIC void PDF_move __PROTO ((unsigned int x, unsigned int y)); TERM_PUBLIC void PDF_vector __PROTO ((unsigned int x, unsigned int y)); TERM_PUBLIC void PDF_put_text __PROTO ((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void PDF_reset __PROTO ((void)); TERM_PUBLIC int PDF_justify_text __PROTO ((enum JUSTIFY mode)); TERM_PUBLIC int PDF_text_angle __PROTO ((int ang)); TERM_PUBLIC void PDF_point __PROTO ((unsigned int x, unsigned int y, int pointstyle)); TERM_PUBLIC int PDF_set_font __PROTO ((const char *font)); TERM_PUBLIC void PDF_boxfill __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); TERM_PUBLIC void PDF_linewidth __PROTO ((double linewidth)); TERM_PUBLIC int PDF_make_palette __PROTO((t_sm_palette *)); TERM_PUBLIC void PDF_previous_palette __PROTO((void)); TERM_PUBLIC void PDF_set_color __PROTO((t_colorspec *)); TERM_PUBLIC void PDF_image __PROTO((unsigned int, unsigned int, coordval *, gpiPoint *, t_imagecolor)); TERM_PUBLIC void PDF_filled_polygon __PROTO((int, gpiPoint *)); /* To support "set term png enhanced" */ TERM_PUBLIC void ENHPDF_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void ENHPDF_OPEN __PROTO((char * fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint)); TERM_PUBLIC void ENHPDF_FLUSH __PROTO((void)); #define PDF_NUM_POINTTYPES 75 /* number of point symbol types not counting the dot */ #define PDF_RESOLUTION (20) /* number of terminal pixels per pt */ #define PDF_XMAX (5*72*PDF_RESOLUTION) /* 5 inches, 72 pt/inch */ #define PDF_YMAX (3*72*PDF_RESOLUTION) /* 3 inches, 72 pt/inch */ static TBOOLEAN pdf_explicit_size = FALSE; static size_units pdf_explicit_units = INCHES; #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include static PDF *myPDF = NULL; static unsigned int PDF_xLast = UINT_MAX; /* current pen horizontal position*/ static unsigned int PDF_yLast = UINT_MAX; /* current pen vertical position*/ static int PDF_LineType = LT_UNDEFINED; /* current line type*/ static int PDF_LineCap = 0; /* Butt ends */ static double PDF_LineWidth = 1.0; /* current line width*/ static int PDF_TextAngle = 0; /* current text orientation*/ static enum JUSTIFY PDF_TextJust = LEFT; /* current text justification*/ static double PDF_linewidth_factor = 1.0; /* multiplier for line width */ static double PDF_dashlength_factor = 1.0; /* multiplier for dash length */ static TBOOLEAN PDF_dashedlines = FALSE; /* solid or dashed? */ static TBOOLEAN PDF_monochrome = FALSE; /* default all linetypes to black */ static rgb_color PDF_current_rgb = {0.,0.,0.}; /* Last color set */ static double PDF_current_gray = 0.0; /* Last color set (mono version) */ /* default text font family: */ static char PDF_fontNameDef[MAX_ID_LEN + 1] = "Helvetica"; static double PDF_fontSizeDef = 6; /* default text size*/ /* current text font family: */ static char PDF_fontNameCur[MAX_ID_LEN + 1] = "Helvetica"; static double PDF_fontSizeCur = 6; /* current text size*/ static double PDF_fontscale = 1.0; static TBOOLEAN PDF_pageIsOpen = FALSE; /* already started a page ?? */ static TBOOLEAN PDF_pathIsOpen = FALSE; /* open path flag*/ static int PDF_fontAscent = 0; /* estimated current font ascent*/ static int PDF_fontDescent = 0; /* estimated current font descent*/ static int PDF_fontLeading = 0; /* estimated current font leading*/ static int PDF_fontAvWidth = 0; /* estimated current font char average width*/ static int PDF_currentFontHandle; /* Needed for exhanced text mode */ static short PDF_Pen_RealID __PROTO ((int)); static void PDF_PathOpen __PROTO ((void)); static void PDF_PathClose __PROTO ((void)); static void PDF_SetFont __PROTO ((void)); static void PDF_DefinePatterns __PROTO((void)); enum { PDF_patterns = 7 }; static int PDF_patternHandles[PDF_patterns]; #ifndef HAVE_NODASH_LIBPDF /* Description of dash patterns (same as those in post.trm) */ static int dash1[] = {8, 8}; static int dash2[] = {4, 6}; static int dash3[] = {2, 3}; static int dash4[] = {12, 4, 2, 4}; static int dash5[] = {6, 6, 2, 6}; static int dash6[] = {4, 4, 4, 12}; static int dash7[] = {1, 4, 12, 4, 1, 4}; #endif /*------------------------ helper functions -------------------*/ static short PDF_Pen_RealID (int inPenCode) { if (inPenCode >= 12) inPenCode %= 12; /* normalize pen code*/ if (inPenCode <= LT_NODRAW) inPenCode = LT_NODRAW; return (inPenCode + 2); } /* Functions to ensure that as many move() and vector() calls as * possible get converted into a single long 'path', before closing it * with a stroke or similar command. */ static void PDF_PathOpen () { PDF_pathIsOpen = TRUE; } static void PDF_PathClose () { if (PDF_pathIsOpen) { PDF_stroke(myPDF); PDF_pathIsOpen = FALSE; } } /* Helper function to deal with switching over to a newly selected font. * For now, this does not try to embed fonts into the PDF file. * We would like to allow UTF-8 fonts via font_handle = PDF_findfont(myPDF, PDF_fontNameCur, "unicode", 0); * but this is not supported by the free-as-in-beer PDFlib Lite. */ static void PDF_SetFont () { int font_handle; const char *pdfenc = "host"; /* Allow graceful failure */ PDF_set_parameter(myPDF, "fontwarning", "false"); /* LCB : Symbol and ZapfDingbats should use "builtin" encoding */ if ( (strcmp(PDF_fontNameCur,"Symbol") == 0) || (strcmp(PDF_fontNameCur,"ZapfDingbats") == 0) ) { pdfenc = "builtin"; } else if (encoding == S_ENC_ISO8859_1) { pdfenc = "iso8859-1"; } else if (encoding == S_ENC_ISO8859_2) { pdfenc = "iso8859-2"; } else if (encoding == S_ENC_ISO8859_9) { pdfenc = "iso8859-9"; } else if (encoding == S_ENC_ISO8859_15) { pdfenc = "iso8859-15"; } else if (encoding == S_ENC_CP1250) { pdfenc = "cp1250"; } font_handle = PDF_findfont(myPDF, PDF_fontNameCur, pdfenc, 0); if (font_handle == -1 && strcmp(pdfenc, "host")) { fprintf(stderr,"Couldn't find font %s in encoding %s, trying \"host\"\n", PDF_fontNameCur, pdfenc); font_handle = PDF_findfont(myPDF, PDF_fontNameCur, "host", 0); } if (font_handle == -1) { font_handle = PDF_findfont(myPDF, "Times-Roman", "host", 0); fprintf(stderr,"Couldn't find font %s, falling back to Times-Roman\n", PDF_fontNameCur); } PDF_setfont(myPDF, font_handle, PDF_fontSizeCur * PDF_RESOLUTION * PDF_fontscale); /* Ask PDFlib for the actual numbers */ PDF_fontAscent = (int) (PDF_RESOLUTION * PDF_fontSizeCur * PDF_fontscale * PDF_get_value(myPDF, "ascender", 0)); PDF_fontDescent = (int) (- PDF_RESOLUTION * PDF_fontSizeCur * PDF_fontscale * PDF_get_value(myPDF, "descender", 0)); PDF_fontLeading = (int) (PDF_RESOLUTION * PDF_fontSizeCur * PDF_fontscale * 0.25); /* Assume this particular string is a somewhat reasonable typical * output, for getting at the average character width */ PDF_fontAvWidth = (int) (PDF_RESOLUTION * PDF_stringwidth(myPDF, "01234567890123456789", font_handle, PDF_fontSizeCur * PDF_fontscale ) / 20.0); PDF_currentFontHandle = font_handle; } #if !HAVE_OLD_LIBPDF static void PDF_DefinePatterns() { int i; /* EAM April 2003 - Rearrange patterns to maximize contrast in mono. * Because of the finite linewidth, each pattern must include line * fragments at the "empty" corners. */ for (i=0; iput_text = ENHPDF_put_text; term->flags |= TERM_ENHANCED_TEXT; continue; } else if (almost_equals(c_token, "noenh$anced")) { c_token++; term->put_text = PDF_put_text; term->flags &= ~TERM_ENHANCED_TEXT; continue; } if (almost_equals(c_token, "fn$ame") || almost_equals(c_token, "font")) { char *s, *comma; c_token++; if (!(s = try_to_get_string())) int_error(c_token,"fname: expecting font name"); comma = strrchr(s,','); if (comma && (1 == sscanf(comma+1,"%lf",&PDF_fontSizeDef))) *comma = '\0'; if (*s) strncpy(PDF_fontNameDef, s, sizeof(PDF_fontNameDef)); free(s); continue; } if (almost_equals(c_token, "fs$ize")) { c_token++; if (END_OF_COMMAND) int_error(c_token,"fsize: expecting font size"); PDF_fontSizeDef = real_expression(); continue; } if (equals(c_token, "lw") || almost_equals(c_token, "linew$idth")) { c_token++; if (END_OF_COMMAND) int_error(c_token, "expecting line width"); PDF_linewidth_factor = real_expression(); if (PDF_linewidth_factor <= 0) PDF_linewidth_factor = 0.1; continue; } if (almost_equals(c_token, "rou$nded")) { c_token++; PDF_LineCap = 1; continue; } if (equals(c_token, "butt")) { PDF_LineCap = 0; continue; } if (equals(c_token, "color") || almost_equals(c_token, "col$our")) { c_token++; PDF_monochrome = FALSE; term->flags &= ~TERM_MONOCHROME; continue; } if (almost_equals(c_token, "mono$chrome")) { c_token++; PDF_monochrome = TRUE; term->flags |= TERM_MONOCHROME; continue; } if (equals(c_token, "dl") || almost_equals(c_token, "dashl$ength")) { c_token++; if (END_OF_COMMAND) int_error(c_token, "expecting dashlength multiplier"); PDF_dashlength_factor = real_expression(); if (PDF_dashlength_factor < 0.0) PDF_dashlength_factor = 1.0; continue; } if (equals(c_token, "solid")) { c_token++; PDF_dashedlines = FALSE; continue; } if (equals(c_token, "size")) { float xmax_t, ymax_t; c_token++; pdf_explicit_size = TRUE; pdf_explicit_units = parse_term_size(&xmax_t, &ymax_t, INCHES); term->xmax = xmax_t*PDF_RESOLUTION*72./gp_resolution; term->ymax = ymax_t*PDF_RESOLUTION*72./gp_resolution; continue; } if (equals(c_token, "fontscale")) { c_token++; PDF_fontscale = END_OF_COMMAND ? -1 : real_expression(); if (PDF_fontscale < 0) PDF_fontscale = 1.0; continue; } #ifdef HAVE_NODASH_LIBPDF int_warn(NO_CARET,"gnuplot was linked against a version of pdflib with no dash or pattern support"); #else if (almost_equals(c_token, "dash$ed")) { c_token++; PDF_dashedlines = TRUE; continue; } #endif int_error(c_token, "unexpected text at end of command"); } /* Save options back into options string in normalized format */ sprintf(term_options, "%s%s fname '%s' fsize %g fontscale %3.1f linewidth %3.1f %s ", PDF_monochrome ? "monochrome " : " ", term->put_text == ENHPDF_put_text ? "enhanced" : "noenhanced", PDF_fontNameDef, PDF_fontSizeDef, PDF_fontscale, PDF_linewidth_factor, PDF_LineCap == 1 ? "rounded" : ""); if (PDF_dashedlines) sprintf(&(term_options[strlen(term_options)]), "dashed dl %3.1f", PDF_dashlength_factor); if (pdf_explicit_size) { if (pdf_explicit_units == CM) sprintf(&(term_options[strlen(term_options)]), "size %.2fcm, %.2fcm ", 2.54*(float)term->xmax/(72.*PDF_RESOLUTION), 2.54*(float)term->ymax/(72.*PDF_RESOLUTION)); else sprintf(&(term_options[strlen(term_options)]), "size %.2fin, %.2fin ", (float)term->xmax/(72.*PDF_RESOLUTION), (float)term->ymax/(72.*PDF_RESOLUTION)); } } TERM_PUBLIC void PDF_init () { static TBOOLEAN PDFlib_booted = FALSE; char *gpversionstring; char *username; char *timedate; time_t now; if (!PDFlib_booted) { PDF_boot(); PDFlib_booted = TRUE; } if (!myPDF) myPDF = PDF_new(); /*open new PDF file */ #ifdef HAVE_LIBPDF_OPEN_FILE if (PDF_open_file(myPDF, outstr) == -1) #else if (PDF_begin_document(myPDF, outstr?outstr:"-", 0, "compatibility=1.4") == -1) #endif /* HAVE_LIBPDF_OPEN_FILE */ int_error(NO_CARET, "Error:cannot open PDF file .\n"); #ifdef PDF_DONT_COMPRESS /* for easier debugging of the output, turn off PDF stream * compression */ PDF_set_value(myPDF, "compress", 0); #endif gpversionstring = gp_alloc(20 + strlen(gnuplot_version) + strlen(gnuplot_patchlevel) + 1, "PDF_init"); sprintf(gpversionstring,"gnuplot %s patchlevel %s", gnuplot_version, gnuplot_patchlevel); time(&now); timedate=asctime(localtime(&now)); timedate[strlen(timedate)-1]='\0'; PDF_set_info(myPDF,"Creator",gpversionstring); username=getusername(); if (username) { PDF_set_info(myPDF,"Author",username); free(username); } if (outstr) PDF_set_info(myPDF,"Title",outstr); /* FIXME: use 'set title', if any? */ PDF_set_info(myPDF,"Subject","gnuplot plot"); if (gpversionstring) free(gpversionstring); PDF_LineType = LT_UNDEFINED; /* set current font to default */ strcpy(PDF_fontNameCur, PDF_fontNameDef); PDF_fontSizeCur = PDF_fontSizeDef; #if !HAVE_OLD_LIBPDF PDF_DefinePatterns(); #endif /* Have to start the first page now, in order to know the actual * size of the selected font */ PDF_graphics(); /* set h_char, v_char*/ term->h_char = PDF_fontAvWidth; term->v_char = (PDF_fontAscent + PDF_fontDescent + PDF_fontLeading); /* set h_tic, v_tic*/ term->h_tic = term->v_tic = 3 * PDF_RESOLUTION; /* initialize terminal's pointsize from "set pointsize" value */ term_pointsize = pointsize; /* Initialize other default settings */ PDF_setlinecap(myPDF, PDF_LineCap); PDF_setlinejoin(myPDF, PDF_LineCap); /* round+round or butt+mitre */ } TERM_PUBLIC void PDF_graphics () { if (PDF_pageIsOpen) return; /* already open --> nothing to do */ PDF_pathIsOpen = FALSE; PDF_xLast = PDF_yLast = UINT_MAX; /* set size of canvas */ if (!pdf_explicit_size) { term->xmax = PDF_XMAX; term->ymax = PDF_YMAX; } PDF_begin_page(myPDF, (double)term->xmax / PDF_RESOLUTION, (double)term->ymax / PDF_RESOLUTION); PDF_scale(myPDF, 1.0/PDF_RESOLUTION, 1.0/PDF_RESOLUTION); if (title.text && title.text[0]) /* a title has been set --> use it as the bookmark name, too */ PDF_add_bookmark(myPDF, title.text, 0, 1); PDF_pageIsOpen = TRUE; PDF_SetFont(); } TERM_PUBLIC void PDF_text () { PDF_PathClose(); PDF_end_page(myPDF); PDF_pageIsOpen = FALSE; } TERM_PUBLIC void PDF_reset () { assert(PDF_pageIsOpen == FALSE); #ifdef HAVE_LIBPDF_OPEN_FILE PDF_close(myPDF); #else PDF_end_document(myPDF, ""); #endif /* HAVE_LIBPDF_OPEN_FILE */ PDF_delete(myPDF); myPDF = NULL; } TERM_PUBLIC void PDF_linetype (int linetype) { int dash = linetype % 8; linetype = PDF_Pen_RealID(linetype); if (linetype == PDF_LineType) return; PDF_PathClose (); PDF_LineType = linetype; if (PDF_monochrome) { PDF_current_gray = 0.0; PDF_setgray(myPDF, PDF_current_gray); } else { unsigned int irgb = pm3d_color_names_tbl[1+linetype].value; PDF_current_rgb.r = (double)((irgb >> 16) & 0xff) / 255.; PDF_current_rgb.g = (double)((irgb >> 8) & 0xff) / 255.; PDF_current_rgb.b = (double)((irgb ) & 0xff) / 255.; PDF_setrgbcolor(myPDF, PDF_current_rgb.r, PDF_current_rgb.g, PDF_current_rgb.b); } #ifndef HAVE_NODASH_LIBPDF if (PDF_dashedlines) { char dashtype[64]; float dl = 8.0 * PDF_dashlength_factor; switch (dash) { default: case 0: PDF_setdash(myPDF, 0.0, 0.0); return; case 1: sprintf(dashtype,"dasharray={%4.1f %4.1f}", dl*dash1[0],dl*dash1[1]); break; case 2: sprintf(dashtype,"dasharray={%4.1f %4.1f}", dl*dash2[0],dl*dash2[1]); break; case 3: sprintf(dashtype,"dasharray={%4.1f %4.1f}", dl*dash3[0],dl*dash3[1]); break; case 4: sprintf(dashtype,"dasharray={%4.1f %4.1f %4.1f %4.1f}", dl*dash4[0],dl*dash4[1],dl*dash4[2],dl*dash4[3]); break; case 5: sprintf(dashtype,"dasharray={%4.1f %4.1f %4.1f %4.1f}", dl*dash5[0],dl*dash5[1],dl*dash5[2],dl*dash5[3]); break; case 6: sprintf(dashtype,"dasharray={%4.1f %4.1f %4.1f %4.1f}", dl*dash6[0],dl*dash6[1],dl*dash6[2],dl*dash6[3]); break; case 7: sprintf(dashtype,"dasharray={%4.1f %4.1f %4.1f %4.1f %4.1f %4.1f}", dl*dash7[0],dl*dash7[1],dl*dash7[2],dl*dash7[3],dl*dash7[4],dl*dash7[5]); break; } PDF_setdashpattern(myPDF,dashtype); } #endif } TERM_PUBLIC void PDF_linewidth (double linewidth) { PDF_PathClose(); PDF_LineWidth = PDF_RESOLUTION * PDF_linewidth_factor * linewidth / 4.0; if (PDF_LineWidth < 0.1) PDF_LineWidth = 0.1; PDF_setlinewidth(myPDF, PDF_LineWidth); } TERM_PUBLIC void PDF_move (unsigned int x, unsigned int y) { if (PDF_pathIsOpen && x == PDF_xLast && y == PDF_yLast) return; PDF_PathOpen (); PDF_moveto(myPDF, x, y); PDF_xLast = x; PDF_yLast = y; } TERM_PUBLIC void PDF_vector (unsigned int x, unsigned int y) { if (PDF_pathIsOpen && x == PDF_xLast && y == PDF_yLast) return; if (!PDF_pathIsOpen) { PDF_PathOpen (); PDF_moveto(myPDF, PDF_xLast, PDF_yLast); } PDF_lineto(myPDF, x, y); PDF_xLast = x; PDF_yLast = y; } /* Helper function. Many symbols have an additional dot in their * center, so isolate its drawing into a separate function. */ static GP_INLINE void PDF_dot (unsigned int x, unsigned int y) { /* Imitate PS's way of creating a small dot by a zero-length line * segment with rounded endpoints */ PDF_setlinecap(myPDF, 1); /* rounded ends */ PDF_moveto(myPDF, x, y); PDF_lineto(myPDF, x, y); PDF_stroke(myPDF); PDF_setlinecap(myPDF, PDF_LineCap); /* restore ends */ } TERM_PUBLIC void PDF_point (unsigned int x, unsigned int y, int number) { PDF_PathClose (); PDF_save(myPDF); if (number < 0) { /* Treat all negative point sizes as dots */ PDF_dot(x, y); } else { /* Change coordinate system so the point symbols themselves * can be drawn without depending on position or size (--> * better compression and less coding for gnuplot) */ /* NB: I use the do_pointsize() default implementation, which * just stores the last set pointsize into `term_pointsize', * to avoid introducing another static driver-local variable * */ PDF_translate(myPDF, x, y); PDF_scale(myPDF, term->h_tic / 2.0 * term_pointsize, term->v_tic / 2.0 * term_pointsize); /* Correct linewidth to counter the scaling effect --- assume * h_tic is usable, to avoid having to average h_ and v_tic */ PDF_setlinewidth(myPDF, PDF_LineWidth / (term->h_tic / 2.0 * term_pointsize)); switch (number %= PDF_NUM_POINTTYPES) { case 0: /* Plus */ PDF_moveto(myPDF, -1, 0); PDF_lineto(myPDF, 1, 0); PDF_moveto(myPDF, 0, -1); PDF_lineto(myPDF, 0, 1); PDF_stroke(myPDF); break; case 2: /* Star */ PDF_moveto(myPDF, -1, 0); PDF_lineto(myPDF, 1, 0); PDF_moveto(myPDF, 0, -1); PDF_lineto(myPDF, 0, 1); /* FALLTHROUGH */ case 1: /* Cross */ PDF_moveto(myPDF, -1, -1); PDF_lineto(myPDF, 1, 1); PDF_moveto(myPDF, 1, -1); PDF_lineto(myPDF, -1, 1); PDF_stroke(myPDF); break; /* For each x = 0..5, 4 shapes are defined: * 3 + 2*x --> hollow symbol with a dot at its center * 4 + 2*x --> solid symbol filled in linetype's color * 63 + x --> hollow symbol without the center dot * 69 + x --> symbol filled with white --> opaque symbol */ case 63+0: /* BoxEmpty */ case 3+2*0: /* Box */ PDF_moveto(myPDF, -1, -1); PDF_lineto(myPDF, 1, -1); PDF_lineto(myPDF, 1, 1); PDF_lineto(myPDF, -1, 1); PDF_closepath_stroke(myPDF); if (number == 3) PDF_dot(0,0); break; case 69+0: /* BoxWhitefilled */ PDF_setgray_fill(myPDF, 1); /* FALLTHROUGH */ case 4+2*0: /* BoxFilled */ PDF_moveto(myPDF, -1, -1); PDF_lineto(myPDF, 1, -1); PDF_lineto(myPDF, 1, 1); PDF_lineto(myPDF, -1, 1); PDF_closepath_fill_stroke(myPDF); break; case 63+1: /* CircleEmpty */ case 3+2*1: /* Circle */ PDF_circle(myPDF, 0, 0, 1); PDF_stroke(myPDF); if (number == 5) PDF_dot(0,0); break; case 69+1: /* CircleWhitefilled */ PDF_setgray_fill(myPDF, 1); /* FALLTHROUGH */ case 4+2*1: /* CircleFilled */ PDF_circle(myPDF, 0, 0, 1); PDF_fill_stroke(myPDF); break; case 63+2: /* TriangleUpEmpty */ case 3+2*2: /* TriangleUp */ PDF_moveto(myPDF, 0, 1.12); PDF_lineto(myPDF, -1, -0.5); PDF_lineto(myPDF, 1, -0.5); PDF_closepath_stroke(myPDF); if (number == 7) PDF_dot(0,0); break; case 69+2: /* TriangleUpWhitefilled */ PDF_setgray_fill(myPDF, 1); /* FALLTHROUGH */ case 4+2*2: /* TriangleUpFilled */ PDF_moveto(myPDF, 0, 1.12); PDF_lineto(myPDF, -1, -0.5); PDF_lineto(myPDF, 1, -0.5); PDF_closepath_fill_stroke(myPDF); break; case 63+3: /* TriangleDownEmpty */ case 3+2*3: /* TriangleDown */ PDF_moveto(myPDF, 0, -1.12); PDF_lineto(myPDF, -1, 0.5); PDF_lineto(myPDF, 1, 0.5); PDF_closepath_stroke(myPDF); if (number == 9) PDF_dot(0,0); break; case 69+3: /* TriangleDownWhitefilled */ PDF_setgray_fill(myPDF, 1); /* FALLTHROUGH */ case 4+2*3: /* TriangleDownFilled */ PDF_moveto(myPDF, 0, -1.12); PDF_lineto(myPDF, -1, 0.5); PDF_lineto(myPDF, 1, 0.5); PDF_closepath_fill_stroke(myPDF); break; case 63+4: /* DiamondEmpty */ case 3+2*4: /* Diamond */ PDF_moveto(myPDF, 0, -1); PDF_lineto(myPDF, 1, 0); PDF_lineto(myPDF, 0, 1); PDF_lineto(myPDF, -1, 0); PDF_closepath_stroke(myPDF); if (number == 11) PDF_dot(0,0); break; case 69+4: /* DiamondWhitefilled */ PDF_setgray_fill(myPDF, 1); /* FALLTHROUGH */ case 4+2*4: /* DiamondFilled */ PDF_moveto(myPDF, 0, -1); PDF_lineto(myPDF, 1, 0); PDF_lineto(myPDF, 0, 1); PDF_lineto(myPDF, -1, 0); PDF_closepath_fill_stroke(myPDF); break; case 63+5: /* PentagonEmpty */ case 3+2*5: /* Pentagon */ PDF_moveto(myPDF, 0, 1); PDF_lineto(myPDF, -0.95, 0.31); PDF_lineto(myPDF, -0.58, -0.81); PDF_lineto(myPDF, +0.58, -0.81); PDF_lineto(myPDF, +0.95, 0.31); PDF_closepath_stroke(myPDF); if (number == 13) PDF_dot(0,0); break; case 69+5: /* PentagonWhitefilled */ PDF_setgray_fill(myPDF, 1); /* FALLTHROUGH */ case 4+2*5: /* PentagonFilled */ PDF_moveto(myPDF, 0, 1); PDF_lineto(myPDF, -0.95, 0.31); PDF_lineto(myPDF, -0.58, -0.81); PDF_lineto(myPDF, +0.58, -0.81); PDF_lineto(myPDF, +0.95, 0.31); PDF_closepath_fill_stroke(myPDF); break; /* 15 + (0..15): circles with varying parts of'em filled. The added * number is a bit-pattern of the 4 quadrants: 1 signals a quadrant * filled */ case 15+0: PDF_moveto(myPDF, 0, 0); PDF_lineto(myPDF, 0, 1); PDF_arc(myPDF, 0, 0, 1, 90, 360+90); PDF_closepath_stroke(myPDF); break; /* Generalize common code into a macro... */ #define CIRCLE_SINGLE_PIESLICE(x, y, angle1, angle2) \ PDF_moveto(myPDF, 0, 0); \ PDF_lineto(myPDF, (x), (y)); \ PDF_arc(myPDF, 0, 0, 1, (angle1), (angle2)); \ PDF_lineto(myPDF, 0, 0); \ PDF_closepath(myPDF); \ PDF_fill_stroke(myPDF); \ PDF_arc(myPDF, 0, 0, 1, (angle2), (angle1) + 360); \ PDF_stroke(myPDF); \ break; #define CIRCLE_SINGLE_QUADRANT(x, y, angle) \ CIRCLE_SINGLE_PIESLICE(x, y, angle, angle+90); case 15+1: CIRCLE_SINGLE_QUADRANT(1, 0, 0); case 15+2: CIRCLE_SINGLE_QUADRANT(0, 1, 90); case 15+4: CIRCLE_SINGLE_QUADRANT(-1, 0, 180); case 15+8: CIRCLE_SINGLE_QUADRANT(0, -1, 270); #undef CIRCLE_SINGLE_QUADRANT #define CIRCLE_TWO_NEIGHBOR_QUADRANTS(x, y, angle) \ CIRCLE_SINGLE_PIESLICE(x, y, angle, angle+180) case 15+3: CIRCLE_TWO_NEIGHBOR_QUADRANTS(1, 0, 0); case 15+6: CIRCLE_TWO_NEIGHBOR_QUADRANTS(0, 1, 90); case 15+12: CIRCLE_TWO_NEIGHBOR_QUADRANTS(-1, 0, 180); case 15+9: CIRCLE_TWO_NEIGHBOR_QUADRANTS(0, -1, 270); #undef CIRCLE_TWO_NEIGHBOR_QUADRANTS #define CIRCLE_TWO_OPPOSING_QUADRANTS(x, y, angle) \ PDF_moveto(myPDF, 0, 0); \ PDF_lineto(myPDF, x, y); \ PDF_arc(myPDF, 0, 0, 1, angle, angle + 90); \ PDF_lineto(myPDF, 0, 0); \ PDF_fill_stroke(myPDF); \ PDF_moveto(myPDF, 0, 0); \ PDF_lineto(myPDF, -x, -y); \ PDF_arc(myPDF, 0, 0, 1, angle + 180, angle + 270); \ PDF_lineto(myPDF, 0, 0); \ PDF_fill_stroke(myPDF); \ PDF_arc(myPDF, 0, 0, 1, angle + 90, angle + 360); \ PDF_stroke(myPDF); \ break; case 15+5: CIRCLE_TWO_OPPOSING_QUADRANTS(1, 0, 0); case 15+10: CIRCLE_TWO_OPPOSING_QUADRANTS(0, 1, 90); #undef CIRCLE_TWO_OPPOSING_QUADRANTS #define CIRCLE_THREE_QUADRANTS(x, y, angle) \ CIRCLE_SINGLE_PIESLICE(x, y, angle, angle+270) case 15+7: CIRCLE_THREE_QUADRANTS(1, 0, 0); case 15+14: CIRCLE_THREE_QUADRANTS(0, 1, 90); case 15+13: CIRCLE_THREE_QUADRANTS(-1, 0, 180); case 15+11: CIRCLE_THREE_QUADRANTS(0, -1, 270); #undef CIRCLE_THREE_QUADRANTS #undef CIRCLE_SINGLE_PIESLICE case 15+15: PDF_circle(myPDF, 0, 0, 1); PDF_closepath_fill_stroke(myPDF); break; /*************************************************************************/ /* 31 + (0..15): squares with different quadrants of them filled in. */ /*************************************************************************/ /*************************************************************************/ /* 47 + (0..15): diamonds with filled quadrants as given by bit pattern */ /* Diamonds are drawn as squares rotated by 45 degrees, so can use * fall-through from diamond to squares, and re-use some macros. */ /*************************************************************************/ case 47+0: PDF_rotate(myPDF, 45); /* FALLTHROUGH */ case 31+0: PDF_moveto(myPDF, 0, 0); PDF_lineto(myPDF, 0, 1); PDF_lineto(myPDF, -1, 1); PDF_lineto(myPDF, -1, -1); PDF_lineto(myPDF, 1, -1); PDF_lineto(myPDF, 1, 1); PDF_lineto(myPDF, 0, 1); PDF_stroke(myPDF); break; case 47+15: PDF_rotate(myPDF, 45); /* FALLTHROUGH */ case 31+15: PDF_moveto(myPDF, -1, 1); PDF_lineto(myPDF, -1, -1); PDF_lineto(myPDF, 1, -1); PDF_lineto(myPDF, 1, 1); PDF_closepath_fill_stroke(myPDF); break; /* macros defining shapes of the partly filled symbols. Done by * rotating the starting point (x0, y0) by 90 degrees or 45 degrees * (with length adjustment). The rotations can be done without * trigonometric function calls, since their values are known: * cos(90)=0, sin(90)=1, cos(45)=sin(45)=1/sqrt(2). A good compiler * should be able to optimize away all the local variables and * loops... */ #define SQUARE_SINGLE_PIESLICE(x0, y0, quadrants) \ { \ int quadrant = 0; \ int x= x0, y=y0; \ PDF_moveto(myPDF, 0, 0); \ PDF_lineto(myPDF, x, y); \ /* poor man's rotation by 45 and 90 degrees around the \ * square's outline. */ \ while (quadrant++ < quadrants) { \ int dummy; \ PDF_lineto(myPDF, x-y, x+y); \ dummy = x; x = -y; y = dummy; \ } \ PDF_lineto(myPDF, x, y); \ PDF_closepath_fill_stroke(myPDF); \ PDF_moveto(myPDF, x, y); \ while (quadrant++ <= 4) { \ int dummy; \ PDF_lineto(myPDF, x-y, x+y); \ dummy = x; x = -y; y = dummy; \ } \ PDF_lineto(myPDF, x, y); \ PDF_stroke(myPDF); \ } \ break; #define SQUARE_TWO_OPPOSING_QUADRANTS(x0, y0, angle) \ { \ int x = x0, y = y0, dummy; \ int counter = 0; \ \ while (counter++ < 2) { \ PDF_moveto(myPDF, 0, 0); \ PDF_lineto(myPDF, x, y); \ PDF_lineto(myPDF, x-y, x+y); \ dummy = x; x = -y; y = dummy; \ PDF_lineto(myPDF, x, y); \ PDF_closepath_fill_stroke(myPDF); \ \ PDF_moveto(myPDF, x, y); \ PDF_lineto(myPDF, x-y, x+y); \ dummy = x; x = -y; y = dummy; \ PDF_lineto(myPDF, x, y); \ PDF_stroke(myPDF); \ } \ break; \ } /* Macros for diamonds just prepend the rotation and then call those * for squares: */ #define DIAMOND_SINGLE_PIESLICE(x, y, quadrants) \ PDF_rotate(myPDF, 45); \ SQUARE_SINGLE_PIESLICE(x, y, quadrants); #define DIAMOND_TWO_OPPOSING_QUADRANTS(x, y, angle) \ PDF_rotate(myPDF, 45); \ SQUARE_TWO_OPPOSING_QUADRANTS(x, y, angle); /* ... and now all the individual cases. The 'angle' arguments' are * purely for the sake of easing cut'n'paste with the circle case */ #define SQUARE_SINGLE_QUADRANT(x, y, angle) \ SQUARE_SINGLE_PIESLICE(x, y, 1); case 31+1: SQUARE_SINGLE_QUADRANT(1, 0, 0); case 31+2: SQUARE_SINGLE_QUADRANT(0, 1, 90); case 31+4: SQUARE_SINGLE_QUADRANT(-1, 0, 180); case 31+8: SQUARE_SINGLE_QUADRANT(0, -1, 270); #undef SQUARE_SINGLE_QUADRANT #define SQUARE_TWO_NEIGHBOR_QUADRANTS(x, y, angle) \ SQUARE_SINGLE_PIESLICE(x, y, 2) case 31+3: SQUARE_TWO_NEIGHBOR_QUADRANTS(1, 0, 0); case 31+6: SQUARE_TWO_NEIGHBOR_QUADRANTS(0, 1, 90); case 31+12: SQUARE_TWO_NEIGHBOR_QUADRANTS(-1, 0, 180); case 31+9: SQUARE_TWO_NEIGHBOR_QUADRANTS(0, -1, 270); #undef SQUARE_TWO_NEIGHBOR_QUADRANTS case 31+5: SQUARE_TWO_OPPOSING_QUADRANTS(1, 0, 0); case 31+10: SQUARE_TWO_OPPOSING_QUADRANTS(0, 1, 90); #define SQUARE_THREE_QUADRANTS(x, y, angle) \ SQUARE_SINGLE_PIESLICE(x, y, 3) case 31+7: SQUARE_THREE_QUADRANTS(1, 0, 0); case 31+14: SQUARE_THREE_QUADRANTS(0, 1, 90); case 31+13: SQUARE_THREE_QUADRANTS(-1, 0, 180); case 31+11: SQUARE_THREE_QUADRANTS(0, -1, 270); #undef SQUARE_THREE_QUADRANTS #define DIAMOND_SINGLE_QUADRANT(x, y, angle) \ DIAMOND_SINGLE_PIESLICE(x, y, 1) case 47+1: DIAMOND_SINGLE_QUADRANT(1, 0, 0); case 47+2: DIAMOND_SINGLE_QUADRANT(0, 1, 90); case 47+4: DIAMOND_SINGLE_QUADRANT(-1, 0, 180); case 47+8: DIAMOND_SINGLE_QUADRANT(0, -1, 270); #undef DIAMOND_SINGLE_QUADRANT #define DIAMOND_TWO_NEIGHBOR_QUADRANTS(x, y, angle) \ DIAMOND_SINGLE_PIESLICE(x, y, 2) case 47+3: DIAMOND_TWO_NEIGHBOR_QUADRANTS(1, 0, 0); case 47+6: DIAMOND_TWO_NEIGHBOR_QUADRANTS(0, 1, 90); case 47+12: DIAMOND_TWO_NEIGHBOR_QUADRANTS(-1, 0, 180); case 47+9: DIAMOND_TWO_NEIGHBOR_QUADRANTS(0, -1, 270); #undef DIAMOND_TWO_NEIGHBOR_QUADRANTS case 47+5: DIAMOND_TWO_OPPOSING_QUADRANTS(1, 0, 0); case 47+10: DIAMOND_TWO_OPPOSING_QUADRANTS(0, 1, 90); #undef DIAMOND_TWO_OPPOSING_QUADRANTS #undef SQUARE_TWO_OPPOSING_QUADRANTS #define DIAMOND_THREE_QUADRANTS(x, y, angle) \ DIAMOND_SINGLE_PIESLICE(x, y, 3) case 47+7: DIAMOND_THREE_QUADRANTS(1, 0, 0); case 47+14: DIAMOND_THREE_QUADRANTS(0, 1, 90); case 47+13: DIAMOND_THREE_QUADRANTS(-1, 0, 180); case 47+11: DIAMOND_THREE_QUADRANTS(0, -1, 270); #undef DIAMOND_THREE_QUADRANTS #undef DIAMOND_SINGLE_PIESLICE #undef SQUARE_SINGLE_PIESLICE default: int_warn(NO_CARET, "PDF: unknown point type number %d", number); } } PDF_restore(myPDF); PDF_xLast = x; PDF_yLast = y; } TERM_PUBLIC int PDF_justify_text (enum JUSTIFY mode) { PDF_TextJust = mode; return (TRUE); } TERM_PUBLIC int PDF_text_angle (int ang) { PDF_TextAngle = ang; return (TRUE); } TERM_PUBLIC void PDF_put_text (unsigned int x, unsigned int y, const char *str) { char *alignment = NULL; double h = x, v = y; PDF_PathClose (); /* horizontal justification*/ switch (PDF_TextJust) { case LEFT: alignment = "left"; break; case CENTRE: alignment = "center"; break; case RIGHT: alignment = "right"; break; } if (PDF_TextAngle) { PDF_save(myPDF); PDF_translate(myPDF, h, v); PDF_rotate(myPDF, PDF_TextAngle); /* vertical justification*/ PDF_translate(myPDF, 0, -(PDF_fontAscent-PDF_fontDescent)/2); PDF_show_boxed(myPDF, str, 0,0, 0, 0, alignment, NULL); PDF_restore(myPDF); } else { /* vertical justification*/ v -= (PDF_fontAscent - PDF_fontDescent) / 2; PDF_show_boxed(myPDF, str, h , v, 0, 0, alignment, NULL); } } TERM_PUBLIC int PDF_set_font (const char *font) { if (!font || !(*font)) { strcpy (PDF_fontNameCur, PDF_fontNameDef); PDF_fontSizeCur = PDF_fontSizeDef; } else { int sep = strcspn(font,","); if (sep > 0) { strncpy(PDF_fontNameCur,font,sep); PDF_fontNameCur[sep] = NUL; } if (font[sep] == ',') sscanf(&(font[sep+1]), "%lf", &PDF_fontSizeCur); } PDF_PathClose(); PDF_SetFont(); term->h_char = PDF_fontAvWidth; term->v_char = (PDF_fontAscent + PDF_fontDescent + PDF_fontLeading); return (TRUE); } TERM_PUBLIC void PDF_boxfill(int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height) { gpiPoint corner[4]; corner[0].x = x1; corner[0].y = y1; corner[1].x = x1+width; corner[1].y = y1; corner[2].x = x1+width; corner[2].y = y1+height; corner[3].x = x1; corner[3].y = y1+height; corner->style = style; PDF_filled_polygon(4, corner); } TERM_PUBLIC void PDF_filled_polygon(int points, gpiPoint* corners) { int i; int fillpar = corners->style >> 4; int style = corners->style &= 0xf; PDF_PathClose(); PDF_save(myPDF); switch (style) { case FS_EMPTY: /* fill with white */ PDF_setgray(myPDF, 1); break; case FS_TRANSPARENT_SOLID: #if !HAVE_OLD_LIBPDF { /* FIXME: This attribute will be in effect until the end of */ /* the current page. We should explicitly reset it to restore */ /* opaque fill areas as the default. But when should it be? */ char density[18]; double red = PDF_current_rgb.r; double green = PDF_current_rgb.g; double blue = PDF_current_rgb.b; sprintf(density,"opacityfill=%4.2f", (double)fillpar*0.01); i = PDF_create_gstate(myPDF, density); PDF_set_gstate(myPDF, i); if (PDF_monochrome) PDF_setgray_fill(myPDF, PDF_current_gray); else PDF_setrgbcolor_fill(myPDF, red, green, blue); break; } #endif case FS_SOLID: { double fact = (double)fillpar * 0.01; double _fact = (double)(100-fillpar) * 0.01; double red = PDF_current_rgb.r * fact + _fact; double green = PDF_current_rgb.g * fact + _fact; double blue = PDF_current_rgb.b * fact + _fact; if (PDF_monochrome) PDF_setgray_fill(myPDF, PDF_current_gray); else PDF_setrgbcolor_fill(myPDF, red, green, blue); } break; #if !HAVE_OLD_LIBPDF case FS_PATTERN: fillpar = fillpar % (PDF_patterns + 1) /* 0 == white */; /* Fill in solid background before drawing pattern */ /* NOTE: kpdf/xpdf would accept this as part of the pattern definition */ /* but acroread does not. So for compatibility we do the fill in */ /* a separate step, despite its inefficiency. */ if (fillpar != 0) { PDF_setcolor(myPDF, "fill", "rgb", 1, 1, 1, 0 /* unused */); PDF_moveto(myPDF, corners[0].x, corners[0].y); for (i=1; itype == TC_LT) { unsigned int irgb = pm3d_color_names_tbl[ 1 + PDF_Pen_RealID(colorspec->lt) ].value; PDF_current_rgb.r = (double)((irgb >> 16) & 0xff) / 255.; PDF_current_rgb.g = (double)((irgb >> 8) & 0xff) / 255.; PDF_current_rgb.b = (double)((irgb ) & 0xff) / 255.; PDF_current_gray = 0.0; /* monochrome mode only */ } else if (colorspec->type == TC_FRAC) { rgb1maxcolors_from_gray( colorspec->value, &PDF_current_rgb); PDF_current_gray = colorspec->value; /* monochrome mode only */ } else if (colorspec->type == TC_RGB) { PDF_current_rgb.r = (double)((colorspec->lt >> 16 ) & 255) / 255.; PDF_current_rgb.g = (double)((colorspec->lt >> 8 ) & 255) / 255.; PDF_current_rgb.b = (double)(colorspec->lt & 255) / 255.; } else return; /* make sure that the path is stroked with the current color * before changing the color */ PDF_PathClose(); if (PDF_monochrome && colorspec->type != TC_RGB) PDF_setgray(myPDF, PDF_current_gray); /* FIXME - Should this be NTSC(current_rgb)? */ else PDF_setrgbcolor(myPDF, PDF_current_rgb.r, PDF_current_rgb.g, PDF_current_rgb.b); /* mark linetype invalid so that the color will be * set when PDF_linetype() is called next */ PDF_LineType = LT_UNDEFINED; } TERM_PUBLIC void PDF_previous_palette() { } TERM_PUBLIC void PDF_image (unsigned int M, unsigned int N, coordval * image, gpiPoint * corner, t_imagecolor color_mode) { unsigned char *pixel; float xscale, yscale; int i, im; /* Allocate memory to hold a copy of the entire image in raw RGB format */ unsigned char *rawrgb = gp_alloc( M*N*3, "Raw RGB image"); /* Convert the input image into raw RGB 24-bit color representation */ if (color_mode == IC_RGB) { for (i=0, pixel=rawrgb; ienhanced_flush)(); /* I think we can only get here if *str == '}' */ enh_err_check(str); if (!*++str) break; /* end of string */ /* else carry on and process the rest of the string */ } PDF_restore(myPDF); /* We can do text justification by running the entire top level string */ /* through 2 times, with the ENHpdf_sizeonly flag set the first time. */ /* After seeing where the final position is, we then offset the start */ /* point accordingly and run it again. */ if (PDF_TextJust == RIGHT || PDF_TextJust == CENTRE) { int justification = PDF_TextJust; int x_offset = PDF_xLast - x; int y_offset = 0; if (PDF_TextAngle != 0) y_offset = PDF_yLast - y; PDF_TextJust = LEFT; ENHpdf_sizeonly = FALSE; if (justification == RIGHT) { ENHPDF_put_text(x - x_offset, y - y_offset, original_string); } else if (justification == CENTRE) { ENHPDF_put_text(x - x_offset/2, y - y_offset/2, original_string); } PDF_TextJust = justification; } } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START (pdf_driver) "pdf", "PDF (Portable Document File) file driver", 0 /* xmax */ , 0 /* ymax */ , 0 /* vchar */ , 0 /* hchar */ , 0 /* vtic */ , 0 /* htic */ , PDF_options, PDF_init, PDF_reset, PDF_text, null_scale, PDF_graphics, PDF_move, PDF_vector, PDF_linetype, PDF_put_text, PDF_text_angle, PDF_justify_text, PDF_point, do_arrow, PDF_set_font, do_pointsize, TERM_BINARY|TERM_CAN_DASH|TERM_LINEWIDTH|TERM_FONTSCALE, 0 /* suspend */, 0 /* resume */ , PDF_boxfill, PDF_linewidth # ifdef USE_MOUSE , 0, 0, 0, 0, 0 /* no mouse support for pdf */ # endif , PDF_make_palette, PDF_previous_palette, PDF_set_color, PDF_filled_polygon , PDF_image , ENHPDF_OPEN, ENHPDF_FLUSH, do_enh_writec TERM_TABLE_END (pdf_driver) #undef LAST_TERM #define LAST_TERM pdf_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(pdf) "1 pdf", "?commands set terminal pdf", "?set terminal pdf", "?set term pdf", "?terminal pdf", "?term pdf", "?pdf", " This terminal produces files in the Adobe Portable Document Format", " (PDF), useable for printing or display with tools like Acrobat Reader", "", " Syntax:", " set terminal pdf {monochrome|color|colour}", " {{no}enhanced}", " {fname \"\"} {fsize }", " {font \"{,}\"} {fontscale }", " {linewidth } {rounded|butt}", " {solid|dashed} {dl }}", " {size {unit},{unit}}", "", " The default is to use a different color for each line type. Selecting", " `monochome` will use black for all linetypes, in which case you probably", " want to select `dashed` to distinguish line types. Even in in mono mode", " you can still use explicit colors for filled areas or linestyles.", "", " where is the name of the default font to use (default Helvetica)", " and is the font size (in points, default 12).", " For help on which fonts are available or how to install new ones, please", " see the documentation for your local installation of pdflib.", "", " The `enhanced` option enables enhanced text processing features", " (subscripts, superscripts and mixed fonts). See `enhanced`.", "", " The width of all lines in the plot can be increased by the factor ", " specified in `linewidth`. Similarly `dashlength` is a multiplier for the", " default dash spacing.", "", " `rounded` sets line caps and line joins to be rounded; `butt` is the", " default, butt caps and mitered joins.", "", " The default size for PDF output is 5 inches by 3 inches. The `size` option", " changes this to whatever the user requests. By default the X and Y sizes", " are taken to be in inches, but other units are possible (currently only cm).", "" END_HELP(pdf) #endif gnuplot-4.6.4/term/openstep.trm0000644000471100001440000012332710460036603013467 0ustar /* -*- objc -*- * $Id: openstep.trm,v 1.18 2006/07/21 02:35:47 sfeam Exp $ * */ /* GNUPLOT - openstep.trm */ /*[ * Copyright 1991 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * Name changed from "next" to "openstep" to distinguish the two different * drivers. Also avoids duplications in the complete gnuplot documentation. * (March 2003) */ /* * This file is included by ../term.c via ../term.h. * * This terminal driver supports: * openstep * * AUTHORS * Robert Lutwak from Russell Lang's post.trm * 'old' option invokes Nick Strobel's original, single viewport terminal * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * * This terminal attempts to connect, via the NeXTstep Distributed * Objects system, to the "gnuplotServer." If there is no such * service registered with the OS, the terminal attempts to fire * up GnuTerm.app. If the user has not set the environment variable * GNUTERMPATH, the terminal uses the users ApplicationPaths Workspace * dwrite to search for GnuTerm.app (Note: this is usually something * like ~/Apps, ~/LocalApps, ~/NextApps, etc.). * In order to use this filter, you MUST have GnuTerm.app installed * on your system. * * Once connected to the server, this filter is basically Russell Lang's * Postscript filter, except that the resultant postscript code * is sent, via the D.O. system, to GnuTerm.app, which manages * the windows which produce the postscript output on the screen. * * * Defaults are * 'set term openstep new dashed auto "Helvetica" 14' * * To change font to Times-Roman and font size to 20pts use * 'set term openstep "Times-Roman" 20'. * * to choose window by title * 'set term openstep title "Window title" * * Monitor Options: * monochrome, color * * To invoke Nick Strobel's old terminal * 'set term openstep old' */ #include "driver.h" #ifdef TERM_REGISTER register_term(openstep) #endif #ifdef TERM_PROTO #import #import #import TERM_PUBLIC void NEXT_options __PROTO((void)); TERM_PUBLIC void NEXT_common_init __PROTO((int uses_fonts, unsigned int xoff, unsigned int yoff, unsigned int xsize, unsigned int ysize, char **dict)); TERM_PUBLIC void NEXT_init __PROTO((void)); TERM_PUBLIC void NEXT_graphics __PROTO((void)); TERM_PUBLIC void NEXT_text __PROTO((void)); TERM_PUBLIC void NEXT_reset __PROTO((void)); TERM_PUBLIC void NEXT_linetype __PROTO((int linetype)); TERM_PUBLIC void NEXT_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void NEXT_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void NEXT_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int NEXT_text_angle __PROTO((int ang)); TERM_PUBLIC int NEXT_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void NEXT_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC int NEXT_set_font __PROTO((const char *font)); TERM_PUBLIC char *NEXT_RememberFont __PROTO((char *fname)); TERM_PUBLIC void NEXT_set_pointsize __PROTO((double size)); #define NEXT_POINT_TYPES 8 /* div */ #define NEXT_XOFF 1 /* page offset in pts */ #define NEXT_YOFF 1 #define NEXT_XMAX 6400 #define NEXT_YMAX 4800 #define NEXT_XLAST (NEXT_XMAX - 1) #define NEXT_YLAST (NEXT_YMAX - 1) #define NEXT_VTIC (NEXT_YMAX/80) #define NEXT_HTIC (NEXT_YMAX/80) #define NEXT_SC (10) /* scale is 1pt = 10 units */ #define NEXT_LW (0.5*NEXT_SC) /* linewidth = 0.5 pts */ #define NEXT_VCHAR (14*NEXT_SC) /* default is 14 point characters */ #define NEXT_HCHAR (14*NEXT_SC*6/10) #define GOT_NEXT_PROTO #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY @interface GnuTermDriver:NSObject { id server; } - (void)senderIsInvalid:(NSNotification *)sender; - (void)plot:(char *)PSstr; -init; @end #define DEFAULTNEXTSIZE 10000 static NSAutoreleasePool *arpool; /* our autorelease pool */ static id gnuTermAccess; /* local object manages the D.O. connection */ static char *NEXTBuffer, *NEXTBufAt, *NEXTBufEnd; static int NEXTsize; static char NEXTTmpBuf[1000]; static void NEXTPrintf(char *,...); static TBOOLEAN NEXT_oldterminal = FALSE; /*static TBOOLEAN NEXT_colordetect();*/ static char NEXT_title[MAX_LINE_LEN + 1]; /* name of font */ static char NEXT_font[MAX_LINE_LEN + 1] = "Helvetica"; /* name of font */ static int NEXT_fontsize = 14; /* size of font in pts */ static int NEXT_default_font[MAX_ID_LEN+1] = {'\0'}; static TBOOLEAN NEXT_color = FALSE; static TBOOLEAN NEXT_solid = FALSE; /* use dashed lines */ static int NEXT_path_count = 0; /* count of lines in path */ static int NEXT_ang = 0; /* text angle */ static enum JUSTIFY NEXT_justify = LEFT; /* text is flush left */ static TBOOLEAN NEXT_duplex_state = FALSE; static TBOOLEAN NEXT_duplex_option = FALSE; static char GPFAR *GPFAR NEXT_header[] = { "/M {moveto} bind def\n", "/L {lineto} bind def\n", "/R {rmoveto} bind def\n", "/V {rlineto} bind def\n", "/vpt2 vpt 2 mul def\n", "/hpt2 hpt 2 mul def\n", /* flush left show */ "/Lshow { currentpoint stroke M\n", " 0 vshift R show } def\n", /* flush right show */ "/Rshow { currentpoint stroke M\n", " dup stringwidth pop neg vshift R show } def\n", /* centred show */ "/Cshow { currentpoint stroke M\n", " dup stringwidth pop -2 div vshift R show } def\n", /* Dash or Color Line */ "/DL { Color {setrgbcolor Solid {pop []} if 0 setdash }\n", " {pop pop pop Solid {pop []} if 0 setdash} ifelse } def\n", /* Border Lines */ "/BL { stroke gnulinewidth 2 mul setlinewidth } def\n", /* Axes Lines */ "/AL { stroke gnulinewidth 2 div setlinewidth } def\n", /* Plot Lines */ "/PL { stroke gnulinewidth setlinewidth } def\n", /* Line Types */ "/LTb { BL [] 0 0 0 DL } def\n", /* border */ "/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def\n", /* axes */ "/LT0 { PL [] 0 1 0 DL } def\n", "/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def\n", "/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def\n", "/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def\n", "/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def\n", "/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def\n", "/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def\n", "/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def\n", "/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def\n", /* Point (Round) */ /* Matt Heffron make it round */ "/Pnt { stroke [] 0 setdash\n", " gsave 1 setlinecap M 0 0 V stroke grestore } def\n", /* Diamond */ "/Dia { stroke [] 0 setdash 2 copy vpt add M\n", " hpt neg vpt neg V hpt vpt neg V\n", " hpt vpt V hpt neg vpt V closepath stroke\n", " Pnt } def\n", /* Plus */ "/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V\n", " currentpoint stroke M\n", " hpt neg vpt neg R hpt2 0 V stroke\n", " } def\n", /* Box */ "/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M\n", " 0 vpt2 neg V hpt2 0 V 0 vpt2 V\n", " hpt2 neg 0 V closepath stroke\n", " Pnt } def\n", /* Cross (X) */ "/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M\n", " hpt2 vpt2 neg V currentpoint stroke M\n", " hpt2 neg 0 R hpt2 vpt2 V stroke } def\n", /* Triangle Up*/ "/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M\n", " hpt neg vpt -1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt 1.62 mul V closepath stroke\n", " Pnt } def\n", /* Star */ "/Star { 2 copy Pls Crs } def\n", /* div added filed box */ /* Filled Box */ "/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M\n", " 0 vpt2 neg V hpt2 0 V 0 vpt2 V\n", " hpt2 neg 0 V closepath fill } def\n", /* div added filled triangle */ /* Triangle Up, Filled */ "/TriUF { stroke [] 0 setdash vpt 1.12 mul add M\n", " hpt neg vpt -1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt 1.62 mul V closepath fill } def\n", /* Matt Heffron: added a few more types */ /* Triangle Down */ "/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M\n", " hpt neg vpt 1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt -1.62 mul V closepath stroke\n", " Pnt } def\n", /* Triangle Down, Filled*/ "/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M\n", " hpt neg vpt 1.62 mul V\n", " hpt 2 mul 0 V\n", " hpt neg vpt -1.62 mul V closepath fill} def\n", /* Diamond, Filled */ "/DiaF { stroke [] 0 setdash vpt add M\n", " hpt neg vpt neg V hpt vpt neg V\n", " hpt vpt V hpt neg vpt V closepath fill } def\n", /* Pentagon */ "/Pent { stroke [] 0 setdash 2 copy gsave\n", " translate 0 hpt M 4 {72 rotate 0 hpt L} repeat\n", " closepath stroke grestore Pnt } def\n", /* Pentagon, Filled */ "/PentF { stroke [] 0 setdash gsave\n", " translate 0 hpt M 4 {72 rotate 0 hpt L} repeat\n", " closepath fill grestore } def\n", /* Circle */ "/Circle { stroke [] 0 setdash 2 copy\n", " hpt 0 360 arc stroke Pnt } def\n", /* Circle,Filled */ "/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def\n", /* 16 differently filled circles */ "/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def\n", "/C1 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 0 90 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C2 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 90 180 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C3 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 0 180 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C4 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 180 270 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C5 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 0 90 arc\n", " 2 copy moveto\n", " 2 copy vpt 180 270 arc closepath fill\n", " vpt 0 360 arc } bind def\n", "/C6 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 90 270 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C7 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 0 270 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C8 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 270 360 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C9 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 270 450 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill\n", " 2 copy moveto\n", " 2 copy vpt 90 180 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C11 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 0 90 arc closepath fill\n", " 2 copy moveto\n", " 2 copy vpt 180 360 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C12 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 180 360 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C13 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 0 90 arc closepath fill\n", " 2 copy moveto\n", " 2 copy vpt 180 360 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", "/C14 { BL [] 0 setdash 2 copy moveto\n", " 2 copy vpt 90 360 arc closepath fill\n", " vpt 0 360 arc } bind def\n", "/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill\n", " vpt 0 360 arc closepath } bind def\n", /* Auxiliary definitions for rectangles */ "/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto\n", " neg 0 rlineto closepath } bind def\n", "/Square { dup Rec } bind def\n", "/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def\n", /* 16 differently filled squares */ "/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def\n", "/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def\n", "/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def\n", "/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def\n", "/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def\n", "/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill\n", " exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def\n", "/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def\n", "/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill\n", " 2 copy vpt Square fill\n", " Bsquare } bind def\n", "/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def\n", "/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def\n", "/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill\n", " Bsquare } bind def\n", "/S11 { 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill\n", " Bsquare } bind def\n", "/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def\n", "/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill\n", " 2 copy vpt Square fill Bsquare } bind def\n", "/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill\n", " 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def\n", "/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def\n", /* 16 different diamonds (actually just rotated squares) */ "/D0 { gsave translate 45 rotate 0 0 Box stroke grestore } bind def\n", "/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def\n", "/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def\n", "/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def\n", "/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def\n", "/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def\n", "/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def\n", "/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def\n", "/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def\n", "/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def\n", "/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def\n", "/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def\n", "/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def\n", "/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def\n", "/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def\n", "/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def\n", NULL }; static char GPFAR *GPFAR ENHNEXT_header[] = { /* For MFshow and MFwidth the tos is an array with the string and font info: */ /* [ ] */ "/MFshow {{dup dup 0 get findfont exch 1 get scalefont setfont\n", " [ currentpoint ] exch dup 2 get 0 exch rmoveto dup 4 get show dup\n", " 3 get {2 get neg 0 exch rmoveto pop} {pop aload pop moveto}ifelse} forall} bind def\n", "/MFwidth {0 exch {dup 3 get{dup dup 0 get findfont exch 1 get scalefont setfont\n", " 4 get stringwidth pop add}\n", " {pop} ifelse} forall} bind def\n", /* flush left show */ "/MLshow { currentpoint stroke M\n", " 0 exch R MFshow } bind def\n", /* flush right show */ "/MRshow { currentpoint stroke M\n", " exch dup MFwidth neg 3 -1 roll R MFshow } def\n", /* centred show */ "/MCshow { currentpoint stroke M\n", " exch dup MFwidth -2 div 3 -1 roll R MFshow } def\n", NULL }; /* added to post by Matt Heffron */ /* moved to post.trm by drd */ struct NEXT_FontName { char *name; struct NEXT_FontName *next; } *NEXT_DocFonts = NULL; enum NEXT_id { NEXT_DEFAULT, NEXT_MONOCHROME, NEXT_COLOR, NEXT_SOLID, NEXT_DASHED, NEXT_SIMPLEX, NEXT_DUPLEX, NEXT_DEFAULTPLEX, NEXT_OLD, NEXT_NEW, NEXT_TITLE, NEXT_OTHER }; static struct gen_table NEXT_opts[] = { { "d$efault", NEXT_DEFAULT }, { "mono$chrome", NEXT_MONOCHROME }, { "col$or", NEXT_COLOR }, { "col$our", NEXT_COLOR }, { "so$lid", NEXT_SOLID }, { "da$shed", NEXT_DASHED }, { "si$mplex", NEXT_SIMPLEX }, { "du$plex", NEXT_DUPLEX }, { "defaultp$lex", NEXT_DEFAULTPLEX }, { "old", NEXT_OLD }, { "new", NEXT_NEW }, { "ti$tle", NEXT_TITLE }, { NULL, NEXT_OTHER } }; TERM_PUBLIC void NEXT_options() { char buf[40]; struct value a; while (!END_OF_COMMAND) { switch(lookup_table(&NEXT_opts[0],c_token)) { case NEXT_DEFAULT: NEXT_oldterminal = FALSE; /*NEXT_color=NEXT_colordetect(); */ NEXT_color = FALSE; NEXT_solid = FALSE; NEXT_duplex_option = FALSE; strcpy(NEXT_font, "Helvetica"); NEXT_fontsize = 14; term->v_char = (unsigned int) (NEXT_fontsize * NEXT_SC); term->h_char = (unsigned int) (NEXT_fontsize * NEXT_SC * 6 / 10); term->put_text = NEXT_put_text; c_token++; break; case NEXT_MONOCHROME: NEXT_color = FALSE; c_token++; break; case NEXT_COLOR: NEXT_color = TRUE; c_token++; break; case NEXT_SOLID: NEXT_solid = TRUE; c_token++; break; case NEXT_DASHED: NEXT_solid = FALSE; c_token++; break; case NEXT_SIMPLEX: NEXT_duplex_state = FALSE; NEXT_duplex_option = TRUE; c_token++; break; case NEXT_DUPLEX: NEXT_duplex_state = TRUE; NEXT_duplex_option = TRUE; c_token++; break; case NEXT_DEFAULTPLEX: NEXT_duplex_option = FALSE; c_token++; break; case NEXT_OLD: NEXT_oldterminal = TRUE; c_token++; break; case NEXT_NEW: NEXT_oldterminal = FALSE; c_token++; break; case NEXT_TITLE: c_token++; if (!isstring(c_token)) { fprintf(stderr, "usage: set term openstep title \"newtitle\"\n"); } quote_str(NEXT_title, c_token, MAX_LINE_LEN + 1); break; case NEXT_OTHER: default: if (isstring(c_token)) { quote_str(NEXT_font, c_token, MAX_LINE_LEN + 1); /* We must have font size specified */ NEXT_fontsize = (int) real(const_express(&a)); term->v_char = (unsigned int) (NEXT_fontsize * NEXT_SC); term->h_char = (unsigned int) (NEXT_fontsize * NEXT_SC * 6 / 10); sprintf(NEXT_default_font, "%s,%d", NEXT_font, NEXT_fontsize); } break; } } sprintf(term_options, "%s %s %s %s \"%s\" %d title \"%s\"", NEXT_oldterminal ? "old" : "new", NEXT_color ? "color" : "monochrome", NEXT_solid ? "solid" : "dashed", NEXT_duplex_option ? (NEXT_duplex_state ? "duplex" : "simplex") : "defaultplex", NEXT_font, NEXT_fontsize, NEXT_title); } TERM_PUBLIC char * NEXT_RememberFont(char *fname) { struct NEXT_FontName *fnp; for (fnp = NEXT_DocFonts; fnp && strcmp(fnp->name, fname); fnp = fnp->next); if (fnp) return fnp->name; /* we must have found it in the list */ if (encoding == S_ENC_ISO8859_1) { NEXTPrintf("/%s reencodeISO def\n", fname); } fnp = (struct NEXT_FontName *) gp_alloc(sizeof(struct NEXT_FontName), "PostScript Font record"); fnp->name = gp_alloc(1 + strlen(fname), "PostScript Font name"); strcpy(fnp->name, fname); fnp->next = NEXT_DocFonts; NEXT_DocFonts = fnp; return fnp->name; } int NEXT_pen_x, NEXT_pen_y; int NEXT_taken; int NEXT_linetype_last; TBOOLEAN NEXT_relative_ok; /* store settings passed to common_init() for use in NEXT_graphics() * are reserved for storing the term options */ static int NEXT_common_uses_fonts; static unsigned int NEXT_common_xoff, NEXT_common_yoff; TERM_PUBLIC void NEXT_common_init( int uses_fonts, /* 0 for NEXT(la)tex */ unsigned int xoff, unsigned int yoff, /* offset - 50 for /post, 0 for NEXT(la)tex */ unsigned int width, unsigned int height, /* for bounding box */ char **dict) /* extra entries for the dictionary */ { static char GPFAR NEXTi1[] = "%%%%Creator: gnuplot\n\ %%%%DocumentFonts: %s\n"; static char GPFAR NEXTi2[] = "%%%%EndComments\n\ /gnudict 120 dict def\ngnudict begin\n\ /Color %s def\n\ /Solid %s def\n\ /gnulinewidth %.3f def\n\ /vshift %d def\n\ /dl {%d mul} def\n\ /hpt %.1f def\n\ /vpt %.1f def\n"; static char GPFAR *NEXT_iso_8859_1_encoding[] = { "/reencodeISO {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", "/Encoding ISOLatin1Encoding def\n", "currentdict end definefont\n", "} def\n", "/ISOLatin1Encoding [\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n", "/parenleft/parenright/asterisk/plus/comma/minus/period/slash\n", "/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n", "/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N\n", "/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n", "/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n", "/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n", "/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve\n", "/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut\n", "/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar\n", "/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot\n", "/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior\n", "/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine\n", "/guillemotright/onequarter/onehalf/threequarters/questiondown\n", "/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla\n", "/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex\n", "/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis\n", "/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute\n", "/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis\n", "/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave\n", "/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex\n", "/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis\n", "/yacute/thorn/ydieresis\n", "] def\n", NULL}; struct termentry *t = term; int i; NEXT_common_uses_fonts = uses_fonts; NEXT_common_xoff = xoff; NEXT_common_yoff = yoff; NEXTPrintf("%%!NEXT-Adobe-2.0\n"); NEXTPrintf(NEXTi1, uses_fonts ? "(atend)" : ""); NEXTPrintf("%%%%BoundingBox: %d %d %d %d\n", xoff, yoff, (int) (xsize * width / NEXT_SC + 0.5 + xoff), (int) (ysize * height / NEXT_SC + 0.5 + yoff)); NEXTPrintf(NEXTi2, NEXT_color ? "true" : "false", NEXT_solid ? "true" : "false", NEXT_LW, /* line width */ (int) (t->v_char) / (-3), /* shift for vertical centring */ NEXT_SC, /* dash length */ NEXT_HTIC / 2.0, /* half point width */ NEXT_VTIC / 2.0); /* half point height */ if (uses_fonts && (encoding == S_ENC_ISO8859_1)) { for (i = 0; NEXT_iso_8859_1_encoding[i] != NULL; i++) { NEXTPrintf("%s", NEXT_iso_8859_1_encoding[i]); } } for (i = 0; NEXT_header[i] != NULL; i++) NEXTPrintf("%s", NEXT_header[i]); if (NEXT_duplex_option) NEXTPrintf("statusdict begin %s setduplexmode end\n", NEXT_duplex_state ? "true" : "false"); NEXT_RememberFont(NEXT_font); if (dict) while (*dict) NEXTPrintf("%s", *(dict++)); NEXTPrintf("end\n%%%%EndProlog\n"); } /* the init fn for the NeXT Terminal driver */ TERM_PUBLIC void NEXT_init() { /* is this called more than once? */ arpool = [[NSAutoreleasePool alloc] init]; /* Initialize output string */ NEXTsize = DEFAULTNEXTSIZE; if ((NEXTBuffer = malloc(NEXTsize)) == NULL) { printf("Malloc error in openstep filter init\n"); exit(1); } NEXTBufEnd = NEXTBuffer + NEXTsize; NEXTBufAt = NEXTBuffer; term->xmax = NEXT_XMAX; term->ymax = NEXT_YMAX; gnuTermAccess = [[GnuTermDriver alloc] init]; /* [gnuTermAccess retain]; -- since we hold it privately. */ } TERM_PUBLIC void NEXT_graphics() { static char GPFAR NEXTg1[] = "0 setgray\nnewpath\n"; struct termentry *t = term; *NEXTBuffer = 0; NEXTBufAt = NEXTBuffer; NEXT_common_init(1, NEXT_XOFF, NEXT_YOFF, term->xmax, term->ymax, ENHNEXT_header); NEXTPrintf("gnudict begin\ngsave\n"); NEXTPrintf("%d %d translate\n", NEXT_common_xoff, NEXT_common_yoff); NEXTPrintf("%.3f %.3f scale\n", 1.0 / NEXT_SC, 1.0 / NEXT_SC); NEXTPrintf(NEXTg1); if (NEXT_common_uses_fonts) NEXTPrintf("(%s) findfont %d scalefont setfont\n", NEXT_font, (t->v_char)); NEXT_path_count = 0; NEXT_relative_ok = FALSE; NEXT_pen_x = NEXT_pen_y = -4000; NEXT_taken = 0; NEXT_linetype_last = LT_UNDEFINED; } TERM_PUBLIC voidNEXT_text() { static DPSContext d; NEXT_path_count = 0; NEXTPrintf("stroke\ngrestore\nend\n"); /* Terminate string */ *NEXTBufAt = 0; if (NEXT_oldterminal) { d = DPSGetCurrentContext(); DPSPrintf(d, NEXTBuffer); DPSFlushContext(d); } else { /* Here's the call that dumps the string to the server */ [gnuTermAccess plot:NEXTBuffer]; } } TERM_PUBLIC void NEXT_reset() { NEXTPrintf("%%%%Trailer\n"); if (!NEXT_common_uses_fonts) { NEXTPrintf("%%%%DocumentFonts: "); while (NEXT_DocFonts) { struct NEXT_FontName *fnp; fnp = NEXT_DocFonts->next; NEXTPrintf("%s%s", NEXT_DocFonts->name, fnp ? ", " : "\n"); free(NEXT_DocFonts->name); free(NEXT_DocFonts); NEXT_DocFonts = fnp; } } } TERM_PUBLIC void NEXT_linetype(int linetype) { linetype = (linetype % 9) + 2; if (linetype < 0) linetype = 0; NEXT_relative_ok = FALSE; if (NEXT_linetype_last == linetype) return; NEXT_linetype_last = linetype; NEXTPrintf("LT%c\n", "ba012345678"[linetype]); NEXT_path_count = 0; } TERM_PUBLIC void NEXT_move(unsigned int x, unsigned int y) { int dx, dy; char abso[20], rel[20]; dx = x - NEXT_pen_x; dy = y - NEXT_pen_y; /* can't cancel all null moves--need a move after stroke'ing */ if (dx == 0 && dy == 0 && NEXT_relative_ok) return; sprintf(abso, "%d %d M\n", x, y); sprintf(rel, "%d %d R\n", dx, dy); if (strlen(rel) < strlen(abso) && NEXT_relative_ok) { NEXTPrintf("%s", rel); NEXT_taken++; } else NEXTPrintf("%s", abso); NEXT_relative_ok = TRUE; NEXT_path_count += 1; NEXT_pen_x = x; NEXT_pen_y = y; } TERM_PUBLIC void NEXT_vector(unsigned int x, unsigned int y) { int dx, dy; char abso[20], rel[20]; dx = x - NEXT_pen_x; dy = y - NEXT_pen_y; if (dx == 0 && dy == 0) return; sprintf(abso, "%d %d L\n", x, y); sprintf(rel, "%d %d V\n", dx, dy); if (strlen(rel) < strlen(abso) && NEXT_relative_ok) { NEXTPrintf("%s", rel); NEXT_taken++; } else NEXTPrintf("%s", abso); NEXT_relative_ok = TRUE; NEXT_path_count += 1; NEXT_pen_x = x; NEXT_pen_y = y; if (NEXT_path_count >= 400) { NEXTPrintf("currentpoint stroke M\n"); NEXT_path_count = 0; } } TERM_PUBLIC int NEXT_text_angle(int ang) { NEXT_ang = ang; return TRUE; } TERM_PUBLIC int NEXT_justify_text(enum JUSTIFY mode) { NEXT_justify = mode; return TRUE; } TERM_PUBLIC int NEXT_set_font(const char *font) { char name[32]; int size, sep; if (!font || !(*font)) font = NEXT_default_font; sep = strcspn(font, ","); strncpy(name, font, sep); name[sep] = NUL; size = NEXT_fontsize; if (font[sep] == ',') sscanf(&(font[sep + 1]), "%d", &size); NEXTPrintf("/%s findfont %d scalefont setfont\n", name, size * NEXT_SC); NEXT_RememberFont(name); term->v_char = (unsigned int) (size * NEXT_SC); term->h_char = (unsigned int) (size * NEXT_SC * 6 / 10); return TRUE; } /* postscript point routines */ TERM_PUBLIC void NEXT_set_pointsize(double size) { NEXTPrintf("/vpt %.1f def /hpt %.1f def /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def\n", pointsize * NEXT_VTIC * 0.5, pointsize * NEXT_HTIC * 0.5); } TERM_PUBLIC void NEXT_point(unsigned int x, unsigned int y, int number) { static char *pointFNS[] = {"Pnt", "Pls", "Crs", "Star", "Box", "BoxF", "Circle", "CircleF", "TriU", "TriUF", "TriD", "TriDF", "Dia", "DiaF", "Pent", "PentF", "C0", "C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8", "C9", "C10", "C11", "C12", "C13", "C14", "C15", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "S10", "S11", "S12", "S13", "S14", "S15", "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D15" }; if (number < 0) number = -1; /* negative types are all 'dot' */ else number %= sizeof(pointFNS) / sizeof(pointFNS[0]) - 1; NEXTPrintf("%d %d %s\n", x, y, pointFNS[number + 1]); NEXT_relative_ok = 0; NEXT_path_count = 0; NEXT_linetype_last = LT_UNDEFINED; /* force next linetype change */ } /* All lifted from the enhanced postscript driver */ static TBOOLEAN NEXT_opened_string; /* try to cut out empty ()'s */ /* used in determining height of processed text */ static float NEXT_max_height, NEXT_min_height; /* process a bit of string, and return the last character used. * p is start of string * brace is TRUE to keep processing to }, FALSE for do one character * fontname & fontsize are obvious * base is the current baseline * widthflag is TRUE if the width of this should count, * FALSE for zero width boxes */ static char * NEXT_recurse( char *p, TBOOLEAN brace, char *fontname, double fontsize, double basem, TBOOLEAN widthflag) { /* close a postscript string if it has been opened */ #define NEXT_FLUSH \ { if (NEXT_opened_string) \ { NEXTPrintf("%s", ")]\n"); \ NEXT_opened_string = FALSE; \ } \ } #define NEXT_OPEN \ { if (!NEXT_opened_string) \ { NEXTPrintf( "[(%s) %.1f %.1f %s (", \ fontname, fontsize, base, \ widthflag ? "true" : "false"); \ NEXT_opened_string = TRUE; \ } \ } /* Start each recursion with a clean string */ NEXT_FLUSH if (base + fontsize > NEXT_max_height) { NEXT_max_height = base + fontsize; } if (base < NEXT_min_height) { NEXT_min_height = base; } for (; *p; ++p) { float shift; float f = 0; /* used for getting new font size */ char *localfontname, ch; switch (*p) { case '}': if (brace) return (p); fprintf(stderr, "openstep driver - spurious }\n"); break; case '_': case '^': shift = (*p == '^') ? 0.5 : -0.3; NEXT_FLUSH p = NEXT_recurse(p + 1, FALSE, fontname, fontsize * 0.8, base + shift * fontsize, widthflag); break; case '{': /*{{{ recurse (possibly with a new font) */ if (*++p == '/') { /* then parse a fontname, optional fontsize */ while (*++p == ' '); localfontname = p; while ((ch = *p) > ' ' && ch != '=') ++p; if (ch == '=') { *p++ = '\0'; /*{{{ get optional font size */ f = (float) strtod(p, &p); if (f) f *= NEXT_SC; /* remember the scaling */ else f = fontsize; /*}}} */ } else { *p++ = '\0'; f = fontsize; } while (*p == ' ') ++p; if (*localfontname) localfontname = NEXT_RememberFont(localfontname); else localfontname = fontname; } else { localfontname = fontname; f = fontsize; } /*}}} */ p = NEXT_recurse(p, TRUE, localfontname, f, base, widthflag); NEXT_FLUSH break; case '@': /*{{{ phantom box - prints next 'char', then restores currentpoint */ NEXT_FLUSH p = NEXT_recurse(++p, FALSE, fontname, fontsize, base, FALSE); break; /*}}} */ case '(': case ')': /* special cases */ NEXT_OPEN NEXTPrintf("\\"); NEXTPrintf("%c", *p); break; /*}}} */ case '\\': /*{{{ is it an escape */ /* special cases */ if (p[1] == '\\' || p[1] == '(' || p[1] == ')') { NEXT_OPEN NEXTPrintf("%c", '\\'); } else if ((ch = p[1]) >= '0' && ch <= '7') { /* up to 3 octal digits */ NEXT_OPEN NEXTPrintf("%c", '\\'); NEXTPrintf("%c", ch); ++p; if ((ch = p[1]) >= '0' && ch <= '7') { NEXTPrintf("%c", ch); ++p; if ((ch = p[1]) >= '0' && ch <= '7') { NEXTPrintf("%c", ch); ++p; } } break; } ++p; /* just go and print it (fall into the 'default' case) */ /*}}} */ default: NEXT_OPEN NEXTPrintf("%c", *p); } /* like TeX, we only do one character in a recursion, unless it's * in braces */ if (!brace) { NEXT_FLUSH return (p); /* the ++p in the outer copy will increment us */ } } NEXT_FLUSH return p; } TERM_PUBLIC void NEXT_put_text(unsigned int x, unsigned int y, const char *str) { /* flush any pending graphics (all the XShow routines do this...) */ if (!strlen(str)) return; if (NEXT_path_count) { NEXTPrintf(" stroke\n"); NEXT_path_count = 0; NEXT_relative_ok = FALSE; } NEXT_move(x, y); if (NEXT_ang != 0) NEXTPrintf("currentpoint gsave translate %d rotate 0 0 moveto\n", NEXT_ang); NEXTPrintf("[ "); /* set up the globals */ NEXT_opened_string = FALSE; NEXT_max_height = -1000; NEXT_min_height = 1000; while (*(str = NEXT_recurse(str, TRUE, NEXT_font, (double) term->v_char, 0.0, TRUE))); NEXT_max_height += NEXT_min_height; NEXTPrintf("] %.1f ", -NEXT_max_height / 3); switch (NEXT_justify) { case LEFT: NEXTPrintf("MLshow\n"); break; case CENTRE: NEXTPrintf("MCshow\n"); break; case RIGHT: NEXTPrintf("MRshow\n"); break; } if (NEXT_ang != 0) NEXTPrintf("grestore\n"); NEXT_path_count = 0; NEXT_relative_ok = FALSE; } /* static TBOOLEAN NEXT_colordetect() { NXScreen * mainscreen; mainscreen = [Application mainScreen]; if (mainscreen->depth == NX_TwoBitGrayDepth) return(FALSE); return(TRUE); } */ /* This just packs all the postscript into one (possibly huge) string * which will be passed (as a fake pointer) via D.O. to the server */ void NEXTPrintf(char *fmt,...) { va_list ap; char *pb; int NEXToff; /* Process formatting instructions */ va_start(ap, fmt); vsprintf(NEXTTmpBuf, fmt, ap); va_end(ap); /* Add to buffer */ for (pb = NEXTTmpBuf; (*pb != 0); ++pb, ++NEXTBufAt) { /* reallocate if necessary */ if (NEXTBufAt >= NEXTBufEnd) { NEXToff = NEXTBufAt - NEXTBuffer; NEXTsize *= 2; NEXTBuffer = realloc(NEXTBuffer, NEXTsize); NEXTBufEnd = NEXTBuffer + NEXTsize; NEXTBufAt = NEXTBuffer + NEXToff; } *NEXTBufAt = *pb; } return; } /* This next section implements the GnuTermDriver object which manages the D.O. connection and interface to Obj-C */ @protocol GnuTermServerMethods /*- (oneway) executePScode:(in char *)PStext termTitle:(in char *)title;*/ - (void) executePScode:(NSString *) PStext termTitle:(NSString *) title; @end @implementation GnuTermDriver - init { NSConnection *myConnection; char serverpath[100], *envstring; int GnuTermPathSet = 0; /* Ask OS for connection to server */ server = [NSConnection rootProxyForConnectionWithRegisteredName: @"gnuplotServer" host:nil]; [server retain]; /* Server is running ready to go */ if (server) printf("Connected to server\n") ; /* Server isn't running, we must fire it up */ else { printf("Launching GnuTerm\n"); *serverpath = 0; /* Check for path set in environment */ if ((envstring = getenv("GNUTERMPATH")) != (char *) NULL) { sprintf(serverpath, "%s/GnuTerm.app/GnuTerm", envstring); GnuTermPathSet = 1; } /* Not in environment */ else strcpy(serverpath, "GnuTerm"); /* Try to launch application */ if ([[NSWorkspace sharedWorkspace] launchApplication:[NSString stringWithCString:serverpath]] == NO) { printf("Failed to launch %s.\n", serverpath); /* Offer a little advice */ if (GnuTermPathSet) { printf("You must have setenv GNUTERMPATH to something wrong\n"); printf("I recommend you exit gnuplot and fix this.\n"); } else { printf("It must be located in ~/Apps or /LocalApps\n"); printf("I recommend that you either\n"); printf("- move GnuTerm.app to one of these locations\n"); printf("- set GNUTERMPATH with host%% setenv GNUTERMPATH /directory/containing_GnuTerm.app\n"); printf("- start GnuTerm ahead of the first plot command\n"); } } /* I wish the gnuplot terminal interface would let me return an error here. */ /* Application is launching */ else { /* Wait for it to register Server methods with OS */ do { server =[[NSConnection rootProxyForConnectionWithRegisteredName: @"gnuplotServer" host:nil] retain]; } while (!server); /* This could result in a hang, but I've never seen it fail */ } } /* By limiting ourselves to known protocol * we speed up the messaging */ [server setProtocolForProxy:@protocol(GnuTermServerMethods)]; myConnection = [server connectionForProxy]; /* If the server dies we want to know about it */ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(senderIsInvalid:) name:NSConnectionDidDieNotification object:myConnection]; /* In fact, we'll worry about it */ ; return self; } - (void) plot:(char *)PSstr; { /* If server has become invalid, re-initialize */ if (!server) [self init]; /* This is where we send the huge postscript string to the server Note: The D.O. system doesn't actually give this pointer to the server. The pointer is dereferenced on the client side and the resulting data is sent to the server. On the server side, space for the data is automatically allocated, and a pointer to the local data is received. For details check out: /NextLibrary/Documentation/NextDev/GeneralRef/06_DistributedObjects/IntroDistObjects.rtf */ printf("Calling server..."); [server executePScode: [NSString stringWithCString: PSstr] termTitle: [NSString stringWithCString: NEXT_title]]; printf("returned\n"); *NEXT_title = 0; } /* This gets called by OS if server goes down */ - (void) senderIsInvalid: (NSNotification *) sender { server = 0; } @end #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(openstep_driver) "openstep", "Interface to GnuTerm.app under OpenStep", NEXT_XMAX, NEXT_YMAX, NEXT_VCHAR, NEXT_HCHAR, NEXT_VTIC, NEXT_HTIC, NEXT_options, NEXT_init, NEXT_reset, NEXT_text, null_scale, NEXT_graphics, NEXT_move, NEXT_vector, NEXT_linetype, NEXT_put_text, NEXT_text_angle, NEXT_justify_text, NEXT_point, do_arrow, NEXT_set_font, NEXT_set_pointsize TERM_TABLE_END(openstep_driver) #undef LAST_TERM #define LAST_TERM openstep_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(openstep) "1 Openstep (next)", #ifndef TERM_HELP_OPENSTEP "?commands set terminal openstep", "?set terminal openstep", "?set term openstep", "?terminal openstep", "?term openstep", "?openstep", "?OpenStep", "?Openstep", /* "?next", "?NeXT", */ #endif " Several options may be set in the openstep (next) driver.", "", " Syntax:", " set terminal openstep {} { } {} {}", " {\"\"} {} title {\"\"}", "", " where is `default`, which sets all options to their defaults;", " is either `new` or `old`, where `old` invokes the old single window;", " is either `color` or `monochrome`;", " is either `solid` or `dashed`;", " \"\" is the name of a valid PostScript font;", " is the size of the font in PostScript points; and", " is the title for the GnuTerm window.", " Defaults are `new`, `monochrome`, `dashed`, \"Helvetica\", 14pt.", "", " Examples:", " set term openstep default", " set term openstep 22", " set term openstep color \"Times-Roman\" 14", " set term openstep color \"Helvetica\" 12 title \"MyPlot\"", " set term openstep old", "", " Pointsizes may be changed with `set linestyle`." END_HELP(openstep) #endif /* TERM_HELP */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/cgi.trm��������������������������������������������������������������������������0000644�0004711�0000144�00000020304�11616060277�012373� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: cgi.trm,v 1.15 2011/08/02 20:40:31 sfeam Exp $ * */ /* GNUPLOT - cgi.trm */ /*[ * Copyright (C) 1990 - 1993 Ronald Florence * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.h. * * This terminal driver supports SCO CGI drivers * * AUTHOR * Ronald Florence <ron@18james.com> */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(cgi) register_term(hcgi) #endif #ifdef TERM_PROTO TERM_PUBLIC void CGI_init __PROTO((void)); TERM_PUBLIC void HCGI_init __PROTO((void)); TERM_PUBLIC void CGI_graphics __PROTO((void)); TERM_PUBLIC void CGI_text __PROTO((void)); TERM_PUBLIC void CGI_reset __PROTO((void)); TERM_PUBLIC void CGI_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void CGI_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void CGI_linetype __PROTO((int linetype)); TERM_PUBLIC void CGI_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int CGI_text_angle __PROTO((int ang)); TERM_PUBLIC int CGI_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void CGI_point __PROTO((unsigned int x, unsigned int y, int num)); #define CGI_XMAX 32767 #define CGI_YMAX 32767 #define CGI_VTIC (CGI_YMAX / 75) #define CGI_HTIC term->h_tic #define CGI_VCHAR term->v_char #define CGI_HCHAR term->h_char #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #ifdef VGA_MONO static short rgb[16][3] = { 0, 0, 0, /* Black */ 1000, 1000, 1000, /* White */ 800, 800, 0, /* Red */ 0, 600, 0, /* Green */ 0, 800, 800, /* Blue */ 1000, 1000, 400, /* Yellow */ 0, 600, 600, /* Cyan */ 600, 600, 600, /* Magenta */ 800, 800, 0, /* Brown */ 600, 600, 600, /* Lt. Grey */ 400, 600, 400, /* Dark Grey */ 400, 600, 1000, /* Lt. Blue */ 400, 1000, 400, /* Lt Green */ 400, 1000, 1000, /* Lt Cyan */ 1000, 600, 400, /* Lt Red */ 600, 600, 1000 /* Lt Magenta */ }; #endif #define CRT (gout[45] == 0) #define CGICOLORS gout[13] #define CGILINES gout[6] #define CGIROTATES gout[36] #define CGITEXTALIGN gout[48] static short gout[66]; static short cgidev; static short vect[4]; static short gin[19] = { 0, /* default aspect ratio */ 1, /* solid line */ 1, /* line color */ 1, /* marker type . */ 1, /* marker color */ 1, /* graphics text font */ 1, /* graphics text color */ 0, /* fill interior style */ 0, /* fill style index */ 1, /* fill color index */ 1 /* prompt for paper changes */ }; char *cgidriver, *getenv(); TERM_PUBLIC void CGI_init() { if (getenv(cgidriver = "CGIDISP") == NULL) HCGI_init(); } TERM_PUBLIC void HCGI_init() { if (getenv(cgidriver = "CGIPRNT") == NULL) int_error(NO_CARET, "no CGI driver"); } TERM_PUBLIC void CGI_graphics() { int i, aspect; char *s; short font_cap[9]; if ((s = getenv("ASPECT")) != NULL && (aspect = atoi(s)) >= 0 && aspect <= 3) gin[0] = aspect; for (i = 0; cgidriver[i]; i++) gin[11 + i] = cgidriver[i]; gin[18] = ' '; if (v_opnwk(gin, &cgidev, gout) < 0) { int_error(NO_CARET, "CGI error %d opening %s", -vq_error(), cgidriver); } vqt_representation(cgidev, 9, font_cap); CGI_VCHAR = font_cap[8] * 3 / 2; CGI_HCHAR = font_cap[7]; CGI_HTIC = CGI_VTIC * ((double) gout[1] / (double) gout[4]) / ((double) gout[0] / (double) gout[3]); #ifdef VGA_MONO if (CGICOLORS > 2) vsc_table(cgidev, 0, CGICOLORS, rgb); #endif } TERM_PUBLIC void CGI_text() { if (CRT) { short ptin[2]; char strin[2]; ptin[0] = 0; ptin[1] = 0; vrq_string(cgidev, 1, 0, ptin, strin); } v_clswk(cgidev); } TERM_PUBLIC void CGI_reset() { } TERM_PUBLIC void CGI_move(unsigned int x, unsigned int y) { vect[0] = x; vect[1] = y; } TERM_PUBLIC void CGI_vector(unsigned int x, unsigned int y) { vect[2] = x; vect[3] = y; v_pline(cgidev, 2, vect); vect[0] = x; vect[1] = y; } TERM_PUBLIC void CGI_linetype(int linetype) { short lcolor; if (CGICOLORS > 2) { lcolor = (linetype + 2) % CGICOLORS + 1; vsl_color(cgidev, lcolor); vsm_color(cgidev, lcolor); } vsl_type(cgidev, (linetype < 1) ? 1 : (linetype % CGILINES) + 1); } TERM_PUBLIC void CGI_put_text(unsigned int x, unsigned int y, const char *str) { v_gtext(cgidev, (short) x, (short) y, str); } TERM_PUBLIC int CGI_text_angle(int ang) { if (!CGIROTATES) return FALSE; /* angles are 1/10 degree ccw */ vst_rotation(cgidev, (ang) ? 900 : 0); return TRUE; } TERM_PUBLIC int CGI_justify_text(enum JUSTIFY mode) { short hor_in, hor_out, vert_out; if (!CGITEXTALIGN) return FALSE; switch (mode) { case LEFT: hor_in = 0; break; case CENTRE: hor_in = 1; break; case RIGHT: hor_in = 2; break; } vst_alignment(cgidev, hor_in, 1, &hor_out, &vert_out); return TRUE; } #define POINT_TYPES 6 TERM_PUBLIC void CGI_point(unsigned int x, unsigned y, int num) { short point[2]; static short cgimarker[POINT_TYPES] = { 1, 2, 6, 4, 5, 3 }; /* . + <> [] X * */ if (num < 0) { CGI_move(x, y); CGI_vector(x, y); } else { vsm_type(cgidev, cgimarker[num % POINT_TYPES]); point[0] = x; point[1] = y; v_pmarker(cgidev, 1, point); } } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(cgi_driver) "cgi", "SCO CGI drivers (requires CGIDISP or CGIPRNT env variable)", CGI_XMAX, CGI_YMAX, 0, 0, CGI_VTIC, 0, options_null, CGI_init, CGI_reset, CGI_text, null_scale, CGI_graphics, CGI_move, CGI_vector, CGI_linetype, CGI_put_text, CGI_text_angle, CGI_justify_text, CGI_point, do_arrow, set_font_null TERM_TABLE_END(cgi_driver) #undef LAST_TERM #define LAST_TERM cgi_driver TERM_TABLE_START(hcgi_driver) "hcgi", "SCO CGI drivers (hardcopy, requires CGIPRNT env variable)", CGI_XMAX, CGI_YMAX, 0, 0, CGI_VTIC, 0, options_null, HCGI_init, CGI_reset, CGI_text, null_scale, CGI_graphics, CGI_move, CGI_vector, CGI_linetype, CGI_put_text, CGI_text_angle, CGI_justify_text, CGI_point, do_arrow, set_font_null TERM_TABLE_END(hcgi_driver) #undef LAST_TERM #define LAST_TERM hcgi_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(cgi) "1 cgi", "?commands set terminal cgi", "?set terminal cgi", "?set term cgi", "?terminal cgi", "?term cgi", "?cgi", "?commands set terminal hcgi", "?set terminal hcgi", "?set term hcgi", "?terminal hcgi", "?term hcgi", "?hcgi", " The `cgi` and `hcgi` terminal drivers support SCO CGI drivers. `hcgi` is for", " printers; the environment variable CGIPRNT must be set. `cgi` may be used", " for either a display or hardcopy; the environment variable CGIDISP is checked,", " first, then CGIPRNT. These terminals have no options." END_HELP(cgi) #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/gd.trm���������������������������������������������������������������������������0000644�0004711�0000144�00000247273�12037071640�012235� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: gd.trm,v 1.163.2.4 2012/10/15 20:35:44 sfeam Exp $ * based on gif.trm,v 1.26.2.1 2000/05/01 00:17:20 joze */ /* GNUPLOT -- gd.trm */ /*[ * Copyright 1998, 2001, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports PNG and JPEG output using * GD library 1.8, 2.0 * * To Use: * * set terminal png ?options ...? * * Where an option is: * * transparent - generate transparent PNGs. The first color will * be the transparent one. * * interlace - generate interlaced PNGs. * * image size (in pixels) * * font size (tiny,small,medium,large,giant) * * font name (TrueType or Adobe Type 1 font name is passed to libgd) * * EAM Dec 2010: Obsolete! * xrrggbb - sets the next color. x is the literal character 'x', * rrggbb are the red green and blue components in hex. For example * x00ff00 is green. The background color is set first, then the * color borders, then the X & Y axis, then the plotting colors. * (The wierd color spec is in order to get around limitations * in gnuplot's scanner.) * * This driver is modeled after the PBM driver pbm.trm. * * AUTHORS * Sam Shen <sls@mh1.lbl.gov> * Alex Woo <woo@playfair.stanford.edu> * Ethan A Merritt <merritt@u.washington.edu> * * CONTRIBUTORS * Alfred Reibenschuh <alfred.reibenschuh@it-austria.com> or <fredo@blackbox.at> * Ben Laurie <ben@algroup.co.uk> * * This version outputs either indexed or truecolor (24-bit RGB) images * The default size is 640x480 pixels. * ****************************************************************************** * PLEASE READ * * This driver uses the gd library, available from http://www.libgd.org * * This driver allows you to use TrueType, OpenType, or Adobe Type 1 fonts. * * If you have libgd version 2.0.36 or later, you may also be able to access * * any fonts that are managed by the fontconfig utility. * * You can use this driver without having any TrueType fonts installed, * * but the default fonts are comparatively limited. * ****************************************************************************** * * Petr Mikulik, Jan 1999: terminal entries for PM3D functionality * Ethan Merritt, May 2001: modified gd/gif driver to produce png instead; * added support for line width and TrueType fonts * Shige Takeno, Mar 2011: deal with libgd built to use SJIS rather than UTF-8 */ /* Approximate "fillstyle solid FRAC " for indexed palettes */ #define PASTEL_PALETTE #define GD_DEFINED_COLORS 96 /* Must not exceed size of pm3d_color_names_tbl[] */ #include "driver.h" #ifdef TERM_REGISTER register_term(png) #endif #ifdef TERM_PROTO TERM_PUBLIC void PNG_options __PROTO((void)); TERM_PUBLIC void PNG_init __PROTO((void)); TERM_PUBLIC void PNG_graphics __PROTO((void)); TERM_PUBLIC void PNG_text __PROTO((void)); TERM_PUBLIC void PNG_linetype __PROTO((int linetype)); TERM_PUBLIC void PNG_linewidth __PROTO((double linewidth)); TERM_PUBLIC void PNG_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void PNG_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void PNG_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC int PNG_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void PNG_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC int PNG_text_angle __PROTO((int ang)); TERM_PUBLIC void PNG_reset __PROTO((void)); TERM_PUBLIC int PNG_set_font __PROTO((const char *fontname)); TERM_PUBLIC void PNG_pointsize __PROTO((double ptsize)); TERM_PUBLIC void PNG_boxfill(int, unsigned int, unsigned int, unsigned int, unsigned int); TERM_PUBLIC int PNG_make_palette (t_sm_palette *); /* TERM_PUBLIC void PNG_previous_palette (void); */ TERM_PUBLIC void PNG_set_color (t_colorspec *); TERM_PUBLIC void PNG_filled_polygon (int, gpiPoint *); TERM_PUBLIC void PNG_image __PROTO((unsigned int, unsigned int, coordval *, gpiPoint *, t_imagecolor)); /* To support "set term png enhanced" */ TERM_PUBLIC void ENHGD_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC void ENHGD_OPEN __PROTO((char * fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint)); TERM_PUBLIC void ENHGD_FLUSH __PROTO((void)); #include <gd.h> /* Include files for bitmap fonts */ #include <gdfontt.h> #include <gdfonts.h> #include <gdfontl.h> #include <gdfontmb.h> #include <gdfontg.h> /* Before version 2.0.36, the libgd function gdFTUseFontConfig() didn't */ /* do what we need. Test for earlier versions and ignore it. */ #ifdef GD_MAJOR_VERSION # if (GD_MINOR_VERSION > 0 || GD_RELEASE_VERSION > 35) # define gdUseFontConfig(x) gdFTUseFontConfig(x) # endif #endif #ifndef gdUseFontConfig #define gdUseFontConfig(x) 0 #endif /* These intermediate functions are necessary on Windows since the shared version of libgd uses a different calling convention and there is no proper macro defined. */ #if defined(WIN32) && !defined(NONDLL) static void gp_gdImagePolygon(gdImagePtr, gdPointPtr, int, int); static void gp_gdImageFilledPolygon(gdImagePtr, gdPointPtr, int, int); #else # define gp_gdImagePolygon gdImagePolygon # define gp_gdImageFilledPolygon gdImageFilledPolygon #endif static void PNG_PointX __PROTO((unsigned int, unsigned int)); static void PNG_PointPlus __PROTO((unsigned int, unsigned int)); static void PNG_Triangle(unsigned int x, unsigned int y, int direction, void (*draw_func)(gdImagePtr, gdPointPtr, int, int)); static void PNG_Diamond(unsigned int x, unsigned int y, void (*draw_func)(gdImagePtr, gdPointPtr, int, int)); static void PNG_init_brush __PROTO((int)); #define GREG_XMAX 640 #define GREG_YMAX 480 /* This will be the default font */ # define gdfont gdFontMediumBold # define PNG_VCHAR 13 # define PNG_HCHAR 7 #define PNG_TICSIZE (GREG_YMAX/100) #define PNG_MAX_COLORS 256 #define GOT_NEXT_PROTO #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static TBOOLEAN PNG_initialized = FALSE; /* Set when terminal first initialized */ static struct { gdImagePtr image; gdFontPtr font; unsigned int x, y; int height; int charh, charw; int color; /* Magic index returned by libgd */ int rgb; /* Our guess at the corresponding rgb */ int n_colors; int color_table[PNG_MAX_COLORS]; int rgb_table[PNG_MAX_COLORS]; int angle; enum JUSTIFY justify; int flags; int linetype; int linewidth; TBOOLEAN capbutt; /* use capbutt on lines with GD2, 20051205 MWS*/ TBOOLEAN use_builtin; int ttfsize; char *ttffont; gdFontPtr default_font; char * default_ttffont; int default_ttfsize; double fontscale; TBOOLEAN TrueColor; /* Variables for animated gif support: */ TBOOLEAN animate; /* Only gif supports animation */ int loop_count; /* Number of times to repeat sequence */ int frame_count; /* Number of frames in animation */ int frame_delay; /* Time between frames in .01 seconds */ TBOOLEAN frame_optimization; gdImagePtr previous_image; /* Needed to encode animation as a series of deltas */ } png_state; #define PNG_USE_TRANSPARENT 1 #define PNG_USE_INTERLACE 2 #define PNG_USE_CROP 4 enum PNG_id { PNG_TRANSPARENT, PNG_NOTRANSPARENT, PNG_INTERLACE, PNG_NOINTERLACE, PNG_CROP, PNG_NOCROP, /* Font size */ PNG_TINY, PNG_SMALL, PNG_MEDIUM, PNG_LARGE, PNG_GIANT, PNG_FONT, PNG_FONTSCALE, PNG_SIZE, PNG_BACKGROUND, PNG_ENHANCED, PNG_NOENHANCED, PNG_TRUECOLOR, PNG_NOTRUECOLOR, PNG_LINEWIDTH, PNG_BUTT, PNG_ROUNDED, PNG_DASHLENGTH, GIF_ANIMATE, GIF_DELAY, GIF_LOOP, GIF_NOOPT, GIF_OPT, PNG_OTHER }; #ifdef Y # undef Y #endif #define Y(y) (png_state.height - (y)) static int PNG_XMAX = GREG_XMAX; static int PNG_YMAX = GREG_YMAX; static const int PNG_POINT_SCALE = 3; static int PNG_ps = 3; static struct gen_table PNG_opts[] = { { "trans$parent", PNG_TRANSPARENT }, { "notran$sparent", PNG_NOTRANSPARENT }, { "inter$lace", PNG_INTERLACE }, { "nointer$lace", PNG_NOINTERLACE }, { "crop", PNG_CROP }, { "nocrop", PNG_NOCROP }, { "ti$ny", PNG_TINY }, { "s$mall", PNG_SMALL }, { "m$edium", PNG_MEDIUM }, { "l$arge", PNG_LARGE }, { "g$iant", PNG_GIANT }, { "fontscale", PNG_FONTSCALE }, { "fo$nt", PNG_FONT }, { "si$ze", PNG_SIZE }, { "enh$anced", PNG_ENHANCED }, { "noenh$anced", PNG_NOENHANCED }, { "true$color", PNG_TRUECOLOR }, { "notrue$color", PNG_NOTRUECOLOR }, { "linew$idth", PNG_LINEWIDTH }, { "anim$ate", GIF_ANIMATE }, /* gif animation options */ { "delay", GIF_DELAY }, { "loop", GIF_LOOP }, { "noopt$imize", GIF_NOOPT }, { "opt$imize", GIF_OPT }, /* end of gif animation options */ { "lw", PNG_LINEWIDTH }, { "butt", PNG_BUTT}, { "round$ed", PNG_ROUNDED}, { "dashl$ength", PNG_DASHLENGTH}, { "dl", PNG_DASHLENGTH}, { "backg$round", PNG_BACKGROUND}, { NULL, PNG_OTHER } }; #undef MAXLINEWIDTH #define MAXLINEWIDTH 100 static double PNG_linewidth_factor = 1.0; static double PNG_dashlength_factor = 1.0; /* shige takeno: * libgd can be built to prefer UTF-8 or SJIS encoding for Japanese. * If it wants SJIS and we are currently in UTF8, convert. * If it wants UTF8 and we are currently in SJIS, convert. * conditional compilation flags: * HAVE_ICONV (iconv library) * JIS_GDLIB (using gdlib configured with -DJISX0208) */ #ifdef HAVE_ICONV #include <iconv.h> #endif static void gd_iconv __PROTO((char **string)); /* EAM - gdImage structure to hold brushes for linewidth */ /* We will allocate and initialize these on demand */ typedef struct { gdImagePtr im; unsigned int last_rgb; int bgnd; int fgnd; } PNG_BRUSH; static PNG_BRUSH *PNG_brush[MAXLINEWIDTH+1]; typedef struct { gdImagePtr im; unsigned int last_rgb; int fillpar; } PNG_FILL_TILE; static PNG_FILL_TILE PNG_fill_tile = { (gdImagePtr)0, 0, 0 }; /* To be used with libgd 2.0.34 to request Symbol encoding */ #ifdef gdFTEX_Adobe_Custom static gdFTStringExtra PNG_FONT_INFO = {0,0,0,0,0,NULL,NULL}; #endif #if defined(WIN32) && !defined(NONDLL) static void gp_gdImagePolygon(gdImagePtr im, gdPointPtr p, int n, int c) { gdImagePolygon(im, p, n, c); } static void gp_gdImageFilledPolygon(gdImagePtr im, gdPointPtr p, int n, int c) { gdImageFilledPolygon(im, p, n, c); } #endif /* Common code to crop the image around its bounding box, just before writing down the file. */ static void image_do_crop () { if (png_state.flags & PNG_USE_CROP) { int x, y, x1, y1, x2, y2, flag; int bg = png_state.color_table[0]; /* index of the background color */ gdImagePtr im_crop; for (flag=0, x1=0; x1 < gdImageSX(png_state.image)-1; x1++) { for (y=0; y < gdImageSY(png_state.image); y++) if (gdImageGetPixel(png_state.image, x1, y) != bg) { flag = 1; break; } if (flag) break; } for (flag=0, x2=gdImageSX(png_state.image)-1; x2 >= x1; x2--) { for (y=0; y < gdImageSY(png_state.image); y++) if (gdImageGetPixel(png_state.image, x2, y) != bg) { flag = 1; break; } if (flag) break; } for (flag=0, y1=0; y1 < gdImageSY(png_state.image)-1; y1++) { for (x=x1; x <= x2; x++) if (gdImageGetPixel(png_state.image, x, y1) != bg) { flag = 1; break; }; if (flag) break; } for (flag=0, y2=gdImageSY(png_state.image)-1; y2 >= y1; y2--) { for (x=x1; x <= x2; x++) if (gdImageGetPixel(png_state.image, x, y2) != bg) { flag = 1; break; }; if (flag) break; } x = x2 - x1 + 1; /* width */ y = y2 - y1 + 1; /* height */ #if (GD2_VERS >= 2) if (png_state.TrueColor) im_crop = gdImageCreateTrueColor(x,y); else im_crop = gdImageCreate(x,y); if (!im_crop) { int_warn(NO_CARET,"libgd: failed to create cropped image structure"); return; } bg = gdImageColorAllocateAlpha(im_crop,255,255,255,127); #else im_crop = gdImageCreate(x,y); #endif gdImagePaletteCopy(im_crop, png_state.image); if (png_state.flags & PNG_USE_TRANSPARENT) { gdImageColorTransparent(im_crop, bg); /* WARNING: This is a work-around for strangeness in libgd, */ /* which doesn't copy transparent pixels in TrueColor images. */ if (png_state.TrueColor) gdImageColorTransparent(png_state.image, -1); } else gdImageColorTransparent(im_crop, -1); gdImageCopy(im_crop, png_state.image, 0, 0, x1, y1, x, y); gdImageDestroy(png_state.image); png_state.image = im_crop; } } static int PNG_FillSolid __PROTO((int fillpar)); static int PNG_FillPattern __PROTO((int fillpar)); static int PNG_FillTransparent __PROTO((int fillpar)); static int PNG_FillSolid(int fillpar) { int red = (png_state.rgb >> 16) & 0xff; int green = (png_state.rgb >> 8) & 0xff; int blue = png_state.rgb & 0xff; double fact = (double)(100 - fillpar) * 0.01; int color; if (fact <= 0 || fact >= 1.0) return png_state.color; red += (0xff - red) * fact; green += (0xff - green) * fact; blue += (0xff - blue) * fact; color = gdImageColorExact(png_state.image, red, green, blue); if (color < 0) { color = gdImageColorAllocate(png_state.image, red, green, blue); } if (color < 0) { color = gdImageColorClosest(png_state.image, red, green, blue); } return color; } static int PNG_FillTransparent(int fillpar) { int red = (png_state.rgb >> 16) & 0xff; int green = (png_state.rgb >> 8) & 0xff; int blue = png_state.rgb & 0xff; int alpha = 127 * (float)(100-fillpar) / 100.; return gdImageColorExactAlpha(png_state.image, red, green, blue, alpha); } static int PNG_FillPattern(int style) { int rgb = png_state.rgb; int brgb = png_state.rgb_table[0]; int fillpar = (style >> 4) % 8; style = style & 0xf; if (!PNG_fill_tile.im || rgb != PNG_fill_tile.last_rgb || PNG_fill_tile.fillpar != fillpar) { int foreground, background; if (PNG_fill_tile.im) { gdImageDestroy(PNG_fill_tile.im); PNG_fill_tile.im = (gdImagePtr)0; } /* save new values */ PNG_fill_tile.fillpar = fillpar; PNG_fill_tile.last_rgb = rgb; /* create new tile */ if (!((PNG_fill_tile.im = gdImageCreate(8, 8)))) int_error(NO_CARET,"libgd: failed to create pattern-fill tile"); background = gdImageColorAllocate(PNG_fill_tile.im, (brgb >> 16) & 0xff, (brgb >> 8) & 0xff, brgb & 0xff); if (style == FS_TRANSPARENT_PATTERN) gdImageColorTransparent(PNG_fill_tile.im, background); gdImageFilledRectangle(PNG_fill_tile.im, 0, 0, 7, 7, background); /* foreground */ foreground = gdImageColorAllocate(PNG_fill_tile.im, (rgb >> 16) & 0xff, (rgb >> 8) & 0xff, rgb & 0xff); switch (fillpar) { case 0: /* no fill */ default: break; case 1: /* cross-hatch */ gdImageLine(PNG_fill_tile.im, 0, 0, 7, 7, foreground); gdImageLine(PNG_fill_tile.im, 0, 6, 6, 0, foreground); break; case 2: /* double cross-hatch */ gdImageLine(PNG_fill_tile.im, 0, 0, 7, 7, foreground); gdImageLine(PNG_fill_tile.im, 0, 6, 6, 0, foreground); gdImageLine(PNG_fill_tile.im, 0, 2, 2, 0, foreground); gdImageLine(PNG_fill_tile.im, 7, 3, 3, 7, foreground); gdImageLine(PNG_fill_tile.im, 4, 0, 7, 3, foreground); gdImageLine(PNG_fill_tile.im, 0, 4, 3, 7, foreground); break; case 3: /* solid */ gdImageFilledRectangle(PNG_fill_tile.im, 0, 0, 7, 7, foreground); break; case 4: gdImageLine(PNG_fill_tile.im, 0, 0, 7, 7, foreground); break; case 5: gdImageLine(PNG_fill_tile.im, 0, 7, 7, 0, foreground); break; case 6: gdImageLine(PNG_fill_tile.im, 0, 0, 3, 7, foreground); gdImageLine(PNG_fill_tile.im, 4, 0, 7, 7, foreground); break; case 7: gdImageLine(PNG_fill_tile.im, 0, 7, 3, 0, foreground); gdImageLine(PNG_fill_tile.im, 4, 7, 7, 0, foreground); break; case 8: gdImageLine(PNG_fill_tile.im, 0, 0, 7, 3, foreground); gdImageLine(PNG_fill_tile.im, 0, 4, 7, 7, foreground); break; case 9: gdImageLine(PNG_fill_tile.im, 0, 3, 7, 0, foreground); gdImageLine(PNG_fill_tile.im, 0, 7, 7, 4, foreground); break; } } gdImageSetTile(png_state.image, PNG_fill_tile.im); return (int)gdTiled; } static void PNG_PointX(unsigned int x, unsigned int y) { gdImageLine(png_state.image, x - PNG_ps, y - PNG_ps, x + PNG_ps, y + PNG_ps, png_state.color); gdImageLine(png_state.image, x + PNG_ps, y - PNG_ps, x - PNG_ps, y + PNG_ps, png_state.color); } static void PNG_PointPlus(unsigned int x, unsigned int y) { gdImageLine(png_state.image, x - PNG_ps, y, x + PNG_ps, y, png_state.color); gdImageLine(png_state.image, x, y - PNG_ps, x, y + PNG_ps, png_state.color); } static void PNG_Triangle( unsigned int x, unsigned int y, int direction, void (*draw_func)(gdImagePtr, gdPointPtr, int, int)) { int delta = (int)((1.33 * (double)PNG_ps) + 0.5); int delta_ = (int)((0.67 * (double)PNG_ps) + 0.5); gdPoint points[4]; points[0].x = x; points[0].y = y - direction * delta; points[1].x = x - delta; points[1].y = y + direction * delta_; points[2].x = x + delta; points[2].y = y + direction * delta_; points[3].x = points[0].x; points[3].y = points[0].y; draw_func(png_state.image, points, 4, png_state.color); } static void PNG_Diamond( unsigned int x, unsigned int y, void (*draw_func)(gdImagePtr, gdPointPtr, int, int)) { gdPoint points[5]; points[0].x = x; points[0].y = y - PNG_ps; points[1].x = x + PNG_ps; points[1].y = y; points[2].x = x; points[2].y = y + PNG_ps; points[3].x = x - PNG_ps; points[3].y = y; points[4].x = points[0].x; points[4].y = points[0].y; draw_func(png_state.image, points, 5, png_state.color); } /* * _options() Called when terminal type is selected. * This procedure should parse options on the command line. A list of the * currently selected options should be stored in term_options[] in a form * suitable for use with the set term command. term_options[] is used by * the save command. Use options_null() if no options are available. */ TERM_PUBLIC void PNG_options() { int i; char *string; unsigned long color; TBOOLEAN gif_anim_option = FALSE; /* set to TRUE if an animated gif option given */ if (!PNG_initialized) { PNG_initialized = TRUE; term_options[0] = '\0'; term->h_char = PNG_HCHAR; /* Default to medium font */ png_state.default_font = gdfont; png_state.n_colors = 0; png_state.flags = 0; png_state.use_builtin = FALSE; png_state.ttffont = NULL; png_state.default_ttffont = NULL; png_state.default_ttfsize = 0; png_state.fontscale = 1; png_state.justify = CENTRE; png_state.TrueColor = FALSE; PNG_linewidth_factor = 1.0; PNG_dashlength_factor = 1.0; png_state.capbutt = FALSE; /* to preserve previous default behavior */ #ifdef _Windows /* Set the default search path for fonts to something useful. */ if (getenv("GDFONTPATH") == NULL) { const char fonts[] = "\\fonts"; char *windir = getenv("windir"); if (windir) { char *gdfontpath = (char *) gp_alloc(strlen(windir) + strlen(fonts) + 1, "GDFONTPATH"); if (gdfontpath) { strcpy(gdfontpath, windir); strcat(gdfontpath, fonts); SetEnvironmentVariable("GDFONTPATH", gdfontpath); free(gdfontpath); } } } #endif } else { /* FIXME EAM - these should never happen! */ if (!png_state.default_font) { fprintf(stderr,"gd.trm: caught initialization error\n"); png_state.default_font = gdfont; } } /* Annoying hack to handle the case of 'set termoption' after */ /* we are already in animation mode. */ if (c_token == 2) FPRINTF((stderr,"gif: Maintaining animation state\n")); else { /* Otherwise reset animation parameters */ if (png_state.previous_image) gdImageDestroy(png_state.previous_image); png_state.animate = FALSE; png_state.previous_image = NULL; png_state.frame_optimization = FALSE; png_state.loop_count = 0; /* And default font size */ term->h_char = PNG_HCHAR; png_state.default_ttfsize = 0; PNG_linewidth_factor = 1.0; PNG_dashlength_factor = 1.0; } while (!END_OF_COMMAND) { switch(lookup_table(&PNG_opts[0],c_token)) { case PNG_TRANSPARENT: png_state.flags |= PNG_USE_TRANSPARENT; ++c_token; break; case PNG_NOTRANSPARENT: png_state.flags &= ~PNG_USE_TRANSPARENT; ++c_token; break; case PNG_INTERLACE: png_state.flags |= PNG_USE_INTERLACE; ++c_token; break; case PNG_NOINTERLACE: png_state.flags &= ~PNG_USE_INTERLACE; ++c_token; break; case PNG_CROP: png_state.flags |= PNG_USE_CROP; ++c_token; break; case PNG_NOCROP: png_state.flags &= ~PNG_USE_CROP; ++c_token; break; #ifdef HAVE_GD_TTF # define UNSET_TTF_FONT \ free(png_state.ttffont); \ png_state.ttffont = NULL; \ png_state.default_ttfsize = 2 * term->h_char - 2; \ png_state.use_builtin = TRUE; #else # define UNSET_TTF_FONT \ ; /* nothing to do */ #endif case PNG_TINY: png_state.default_font = gdFontGetTiny(); term->v_char = png_state.default_font->h; term->h_char = png_state.default_font->w; ++c_token; UNSET_TTF_FONT; break; case PNG_SMALL: png_state.default_font = gdFontGetSmall(); term->v_char = png_state.default_font->h; term->h_char = png_state.default_font->w; ++c_token; UNSET_TTF_FONT; break; case PNG_MEDIUM: png_state.default_font = gdFontGetMediumBold(); term->v_char = png_state.default_font->h; term->h_char = png_state.default_font->w; ++c_token; UNSET_TTF_FONT; break; case PNG_LARGE: png_state.default_font = gdFontGetLarge(); term->v_char = png_state.default_font->h; term->h_char = png_state.default_font->w; ++c_token; UNSET_TTF_FONT; break; case PNG_GIANT: png_state.default_font = gdFontGetGiant(); term->v_char = png_state.default_font->h; term->h_char = png_state.default_font->w; ++c_token; UNSET_TTF_FONT; break; case PNG_FONT: c_token++; #ifdef HAVE_GD_TTF if (END_OF_COMMAND) { free(png_state.ttffont); png_state.ttffont = NULL; png_state.default_ttfsize = 0; } else { int brect[8]; char *err; if (isstringvalue(c_token)) { char *s = try_to_get_string(); char *comma = strrchr(s,','); double fontsize; if (comma && (1 == sscanf(comma+1,"%lf",&fontsize))) { png_state.default_ttfsize = (int)(fontsize+0.5); png_state.ttfsize = png_state.default_ttfsize; *comma = '\0'; } if (*s) { free(png_state.ttffont); png_state.ttffont = s; } else { continue; } } else { free(png_state.ttffont); png_state.ttffont = gp_alloc(token_len(c_token)+1,"new font"); copy_str(png_state.ttffont, c_token, token_len(c_token)+1); c_token++; } free(png_state.default_ttffont); png_state.default_ttffont = gp_strdup(png_state.ttffont); /* First try the old GDFONTPATH mechanism for locating fonts */ (void)gdUseFontConfig(0); err = gdImageStringFT(NULL, &brect[0], 0, png_state.ttffont, (double)png_state.default_ttfsize*png_state.fontscale, 0.0, 0, 0, "test"); /* If that didn't work, try again using the fontconfig mechanism */ if (err && gdUseFontConfig(1)) { err = gdImageStringFT(NULL, &brect[0], 0, png_state.ttffont, (double)png_state.default_ttfsize*png_state.fontscale, 0.0, 0, 0, "test"); } /* If we still haven't found the font, punt to the internal non-TTF default set */ if (err) { fprintf(stderr, "%s when opening font %s, trying default\n", err, png_state.ttffont); free(png_state.ttffont); free(png_state.default_ttffont); png_state.ttffont = NULL; png_state.default_ttffont = NULL; } } #else c_token++; fprintf(stderr,"No TTF font support, using internal non-scalable font\n"); #endif break; # undef UNSET_TTF_FONT case PNG_FONTSCALE: c_token++; png_state.fontscale = END_OF_COMMAND ? 1 : real_expression(); if (png_state.fontscale <= 0) png_state.fontscale = 1.; break; case PNG_SIZE: c_token++; if (END_OF_COMMAND) { PNG_XMAX = GREG_XMAX; PNG_YMAX = GREG_YMAX; } else { PNG_XMAX = real_expression(); if (equals(c_token, ",")) { c_token++; PNG_YMAX = real_expression(); } if (PNG_XMAX < 0) PNG_XMAX = GREG_XMAX; if (PNG_YMAX < 0) PNG_YMAX = GREG_YMAX; } term->ymax = PNG_YMAX; term->xmax = PNG_XMAX; /* EAM Apr 2003 - same tic size on both x and y axes */ term->v_tic = (PNG_XMAX < PNG_YMAX) ? PNG_XMAX/100 : PNG_YMAX/100; if (term->v_tic < 1) term->v_tic = 1; term->h_tic = term->v_tic; break; case PNG_ENHANCED: term->flags |= TERM_ENHANCED_TEXT; term->put_text = ENHGD_put_text; ++c_token; break; case PNG_NOENHANCED: term->flags &= ~TERM_ENHANCED_TEXT; term->put_text = PNG_put_text; ++c_token; break; case PNG_TRUECOLOR: png_state.TrueColor = TRUE; term->flags |= TERM_ALPHA_CHANNEL; c_token++; break; case PNG_NOTRUECOLOR: png_state.TrueColor = FALSE; term->flags &= ~TERM_ALPHA_CHANNEL; c_token++; break; case PNG_LINEWIDTH: c_token++; PNG_linewidth_factor = real_expression(); if (PNG_linewidth_factor < 0) PNG_linewidth_factor = 1.0; break; case PNG_DASHLENGTH: c_token++; PNG_dashlength_factor = real_expression(); if (PNG_dashlength_factor <= 0.2) PNG_dashlength_factor = 1.0; break; /* parse gif animation options */ case GIF_ANIMATE: if (strncmp("gif",term->name,3)) int_error(c_token,"Only the gif terminal supports animation"); c_token++; png_state.animate = TRUE; png_state.frame_count = 0; png_state.frame_delay = 10; png_state.frame_optimization = FALSE; gif_anim_option = 1; break; case GIF_DELAY: if (strncmp("gif",term->name,3)) int_error(c_token,"Only the gif terminal supports animation"); c_token++; png_state.frame_delay = int_expression(); if (png_state.frame_delay <= 0) png_state.frame_delay = 10; gif_anim_option = 1; break; case GIF_LOOP: if (strncmp("gif",term->name,3)) int_error(c_token,"Only the gif terminal supports animation"); c_token++; png_state.loop_count = int_expression(); gif_anim_option = 1; break; case GIF_NOOPT: if (strncmp("gif",term->name,3)) int_error(c_token,"Only the gif terminal supports animation"); c_token++; png_state.frame_optimization = FALSE; gif_anim_option = 1; break; case GIF_OPT: if (strncmp("gif",term->name,3)) int_error(c_token,"Only the gif terminal supports animation"); c_token++; png_state.frame_optimization = TRUE; gif_anim_option = 1; break; case PNG_BUTT: png_state.capbutt = TRUE; c_token++; break; case PNG_ROUNDED: png_state.capbutt = FALSE; c_token++; break; case PNG_BACKGROUND: c_token++; png_state.rgb_table[0] = parse_color_name(); png_state.n_colors = 1; break; case PNG_OTHER: default: /* not "size" */ string = gp_input_line + token[c_token].start_index; #ifdef HAVE_GD_TTF /* Check for explicit TTF font size */ if (sscanf(string, "%d", &i) == 1) { if (i > 0 && i < 999) png_state.default_ttfsize = i; else int_warn(c_token,"illegal font size"); c_token++; break; } #endif if (sscanf(string, "x%lx", &color) == 1) { int_warn(c_token++, "deprecated color option"); png_state.rgb_table[png_state.n_colors++] = color; break; } else int_error(c_token, "unrecognized terminal option"); break; } } #ifndef GIF_ANIMATION /* animated gifs not supported by the current GD library */ if (gif_anim_option) { png_state.animate = FALSE; int_warn(NO_CARET, "gif animation options ignored (not compiled into this binary)"); } #endif #ifdef HAVE_GD_TTF /* If no font has been chosen but there is a default, use it */ if (!png_state.ttffont && !png_state.use_builtin) { char *external_default = getenv("GNUPLOT_DEFAULT_GDFONT"); int brect[8]; char *err; if (external_default) png_state.ttffont = gp_strdup(external_default); else /* Might as well try some plausible font; it's no worse than failing immediately */ png_state.ttffont = gp_strdup("arial"); free(png_state.default_ttffont); png_state.default_ttffont = gp_strdup(png_state.ttffont); if (png_state.default_ttfsize == 0) png_state.default_ttfsize = 2 * term->h_char - 2; /* First try the old GDFONTPATH mechanism for locating fonts */ (void)gdUseFontConfig(0); err = gdImageStringFT(NULL, &brect[0], 0, png_state.ttffont, (double)png_state.default_ttfsize*png_state.fontscale, 0.0, 0, 0, "test"); /* If that didn't work, try again using fontconfig mechanism */ if (err && gdUseFontConfig(1)) { err = gdImageStringFT(NULL, &brect[0], 0, png_state.ttffont, (double)png_state.default_ttfsize*png_state.fontscale, 0.0, 0, 0, "test"); } /* If we still haven't found the font, punt to the internal non-TTF default set */ if (err) { fprintf(stderr,"%s when opening font \"%s\", using internal non-scalable font\n", err, png_state.ttffont); free(png_state.ttffont); free(png_state.default_ttffont); png_state.ttffont = NULL; png_state.default_ttffont = NULL; } } /* If no explicit TTF font size found, generate default */ if (png_state.default_ttfsize == 0) png_state.default_ttfsize = 2 * term->h_char - 2; png_state.ttfsize = png_state.default_ttfsize; /* Find approximate character width of selected TTF font */ /* This is needed in order to set appropriate border width */ if (png_state.default_ttffont) { int brect[8]; char *err; err = gdImageStringFT(NULL, &brect[0], 0, png_state.default_ttffont, (double)png_state.default_ttfsize*png_state.fontscale, 0.0, 0, 0, "f00000000g"); if (!err) { term->h_char = .11 * (float)(brect[2] - brect[0]) + 0.5; term->v_char = 1.1 * (float)(brect[1] - brect[7]) + 0.5; } } #endif /* This code is shared by png, gif, and jpeg terminal types */ if (!strcmp(term->name,"jpeg")) png_state.flags &= ~PNG_USE_TRANSPARENT; /* now generate options string */ if (png_state.flags & PNG_USE_TRANSPARENT) { strcat(term_options, "transparent "); } if (png_state.flags & PNG_USE_INTERLACE) { strcat(term_options, "interlace "); } /* JPEG files are always 24-bit color */ if (strcmp(term->name, "jpeg") == 0) { png_state.TrueColor = TRUE; term->flags |= TERM_ALPHA_CHANNEL; } else if (png_state.TrueColor) { strcat(term_options, "truecolor "); } if (!(png_state.flags & PNG_USE_CROP)) { strcat(term_options, "no"); } strcat(term_options, "crop "); if (term->flags & TERM_ENHANCED_TEXT) { strcat(term_options, "enhanced "); } if (png_state.ttffont) { sprintf(term_options + strlen(term_options), "font \"%s,%d\" ", png_state.ttffont, png_state.ttfsize); sprintf(term_options + strlen(term_options), "fontscale %.1f ", png_state.fontscale); } else switch (term->h_char) { case 5: strcat(term_options,"tiny "); break; case 6: strcat(term_options, "small "); break; case 7: default: strcat(term_options, "medium "); break; case 8: strcat(term_options, "large "); break; case 9: strcat(term_options,"giant "); break; } if (PNG_linewidth_factor != 1.0) sprintf(term_options + strlen(term_options), "linewidth %3.1f ", PNG_linewidth_factor); if (PNG_dashlength_factor != 1.0) sprintf(term_options + strlen(term_options), "dashlength %3.1f ", PNG_dashlength_factor); if (png_state.capbutt) { sprintf(term_options + strlen(term_options), "butt "); } if (png_state.animate) { sprintf(term_options + strlen(term_options), "animate delay %d loop %d %soptimize ", png_state.frame_delay, png_state.loop_count, png_state.frame_optimization ? "" : "no"); } sprintf(term_options + strlen(term_options), "size %d,%d ", PNG_XMAX, PNG_YMAX); if (png_state.n_colors == 1) sprintf(term_options + strlen(term_options), "background \"#%06x\" ", png_state.rgb_table[0]); } /* * _init() Called once, when the device is first selected. This procedure * should set up things that only need to be set once, like handshaking and * character sets etc... */ TERM_PUBLIC void PNG_init() { int i; png_state.linetype = 0; png_state.linewidth = 1; /* Clear brush array, then initialize a few small ones */ for (i=2; i<=MAXLINEWIDTH; i++) PNG_brush[i] = NULL; } /* * Internal helper routine to initialize brushes used for stroking linewidth > 1 */ static void PNG_init_brush(int width) { PNG_BRUSH *brush = PNG_brush[width]; if (!brush) { brush = gp_alloc(sizeof(PNG_BRUSH),"gd brush"); PNG_brush[width] = brush; brush->last_rgb = -99; /* Something invalid */ if (!((brush->im = gdImageCreate(width,width)))) int_error(NO_CARET,"libgd: failed to create brush structure"); brush->bgnd = gdImageColorAllocate( brush->im, 255, 255, 255 ); gdImageFill(brush->im, 0, 0, brush->bgnd); gdImageColorTransparent(brush->im, brush->bgnd); } if (png_state.color != brush->last_rgb) { brush->fgnd = gdImageColorResolve(brush->im, gdImageRed(png_state.image,png_state.color), gdImageGreen(png_state.image,png_state.color), gdImageBlue(png_state.image,png_state.color) ); brush->last_rgb = png_state.color; /* EAM - quick and dirty is to fill the entire brush (square nib) */ /* It might be better to approximate a circular nib by selectively */ /* coloring the individual pixels of the brush image. */ gdImageFilledRectangle(brush->im, 0, 0, width-1, width-1, brush->fgnd); } } /* * _reset() Called when gnuplot is exited, the output device changed or * the terminal type changed. This procedure should reset the device, * possibly flushing a buffer somewhere or generating a form feed. */ TERM_PUBLIC void PNG_reset() { int i; /* EAM - Clean up the brushes used for linewidth */ for (i=2; i<=MAXLINEWIDTH; i++) { if (PNG_brush[i]) { if (PNG_brush[i]->im) gdImageDestroy(PNG_brush[i]->im); PNG_brush[i] = NULL; } } if (PNG_fill_tile.im) { gdImageDestroy(PNG_fill_tile.im); PNG_fill_tile.im = (gdImagePtr)0; } #ifdef GIF_ANIMATION if (png_state.animate) { gdImageGifAnimEnd(gpoutfile); png_state.frame_count = 0; png_state.animate = FALSE; fprintf(stderr,"End of animation sequence\n"); } #endif } #if 0 /* use #if 1 that's just for debugging */ void PNG_show_current_palette() { int i; fprintf(stderr, "*****\n SHOW THE PALETTE! total=%i\n", gdImageColorsTotal(png_state.image)); for (i=0; i < gdImageColorsTotal(png_state.image); i++) { /* Use access macros to learn colors. */ fprintf(stderr, "%i\tr=%d\t g=%d\tb=%d\n", i, gdImageRed(png_state.image,i), gdImageGreen(png_state.image,i), gdImageBlue(png_state.image,i)); } } #endif /* How this works: Gray interval [0;1] will be mapped to interval [0;sm_palette.colors-1] those r,g,b components are mapped by the array below palette.offset equals 0 since png_smooth_color[0..colors] are from ColorAllocate */ static int png_smooth_color[gdMaxColors]; #ifdef PASTEL_PALETTE /* * This is only needed in order to maintain png_state_rgb for fillstyle variants, * and only for palette-based coloring. It doesn't seem worth the space or effort. * EAM November 2004 */ static int png_smooth_rgb[gdMaxColors]; #endif /* TODO: how to recover from a multiplot with two colour pm3d maps? They must use the same palette! Or palette size must be restricted to certain number of colours---a new user's option */ TERM_PUBLIC int PNG_make_palette (t_sm_palette *palette) { int i; if (palette == NULL) { /* If the output format is TrueColor there in no color limit */ if (png_state.TrueColor) return(0); /* return maximal number of colours in a PNG palette */ i = gdMaxColors /*256*/ - gdImageColorsTotal(png_state.image); /* the latter is the number of currently allocated colours. We want to allocate the rest */ /*BACK PLEASE fprintf(stderr,"colors in PNG palette=%i\n",(int)gdMaxColors); */ if (i == 0) { i = (sm_palette.colors <= 0) ? -1 : sm_palette.colors; /* (no more colorus) : (previous palette (obviously multiplot mode)) */ } return i; } if (0 == gdMaxColors /*256*/ - gdImageColorsTotal(png_state.image)) return 0; /* reuse previous palette (without warning) */ for (i = 0; i < sm_palette.colors; i++) { png_smooth_color[i] = gdImageColorAllocate(png_state.image, (int)( palette->color[i].r * 255 + 0.5 ), /* r,g,b values for png */ (int)( palette->color[i].g * 255 + 0.5 ), /* terminal are [0;255] */ (int)( palette->color[i].b * 255 + 0.5 ) ); #ifdef PASTEL_PALETTE png_smooth_rgb[i] = (((int)(palette->color[i].r * 255.) & 0xff) << 16) + (((int)(palette->color[i].g * 255.) & 0xff) << 8) + ((int)(palette->color[i].b * 255.) & 0xff); #endif if (png_smooth_color[i] < 0) { /* this should never happen! take away? */ FPRINTF((stderr,"png_smooth_color[i]<0 cannot happen")); exit(1); } } return 0; } TERM_PUBLIC void PNG_set_color (t_colorspec *colorspec) { double gray = colorspec->value; if (colorspec->type == TC_LT) { int savetype = png_state.linetype; PNG_linetype(colorspec->lt); /* Harmless now; will be needed if we ever support dot/dash */ png_state.linetype = savetype; } if (colorspec->type == TC_RGB) { png_state.rgb = colorspec->lt; png_state.color = gdImageColorResolve(png_state.image, (colorspec->lt >> 16) & 0xff, (colorspec->lt >> 8) & 0xff, colorspec->lt & 0xff); } if (colorspec->type != TC_FRAC) return; if (png_state.TrueColor) { rgb255_color color; rgb255maxcolors_from_gray(gray, &color); png_state.color = gdImageColorResolve(png_state.image, (int)color.r, (int)color.g, (int)color.b); png_state.rgb = (color.r << 16) + (color.g << 8) +color.b; return; } else { int png_color = (gray <= 0) ? 0 : (int)(gray * sm_palette.colors); if (png_color >= sm_palette.colors) png_color = sm_palette.colors - 1; /* map [0;1] to interval [0;png_smooth_colors-1] */ png_state.color = png_smooth_color[ png_color ]; #ifdef PASTEL_PALETTE png_state.rgb = png_smooth_rgb[ png_color ]; #endif } } TERM_PUBLIC void PNG_filled_polygon(int points, gpiPoint *corners) { int i; int fillpar = corners->style >> 4; int color = png_state.color; /* since gpiPoint carries more than just x and y if * we have EXTENDED_COLOR_SPECS defined, we need to * copy it to the gdPointPtr struct; make it static * so that is faster (joze) */ static gdPointPtr gd_corners = (gdPointPtr) 0; static unsigned int size = 0; if (points > size) { size = points; gd_corners = gp_realloc(gd_corners, sizeof(gdPoint) * size, "PNG_filled_polygon->gd_corners"); } for (i = 0; i < points; i++) { gd_corners[i].x = corners[i].x; gd_corners[i].y = Y(corners[i].y); } switch (corners->style & 0xf) { case FS_EMPTY: /* fill with background color */ color = png_state.color_table[0]; break; case FS_SOLID: /* solid fill */ color = PNG_FillSolid(fillpar); break; case FS_TRANSPARENT_SOLID: if (png_state.TrueColor) color = PNG_FillTransparent(fillpar); else color = PNG_FillSolid(fillpar); break; case FS_PATTERN: /* pattern fill */ case FS_TRANSPARENT_PATTERN: color = PNG_FillPattern(corners->style); break; default: color = png_state.color; break; } gdImageFilledPolygon(png_state.image, gd_corners, points, color); } /* * This function is used for filledboxes * style parameter is some garbled hash combining fillstyle and filldensity */ TERM_PUBLIC void PNG_boxfill( int style, unsigned int x, unsigned int y, unsigned int width, unsigned int height) { unsigned int x1, y1, x2, y2; int color; /* fillpar: * - solid : 0 - 100 * - pattern : 0 - 100 */ int fillpar = style >> 4; switch (style & 0xf) { case FS_EMPTY: /* fill with background color */ color = png_state.color_table[0]; break; case FS_SOLID: /* solid fill */ color = PNG_FillSolid(fillpar); break; case FS_TRANSPARENT_SOLID: if (png_state.TrueColor) color = PNG_FillTransparent(fillpar); else color = PNG_FillSolid(fillpar); break; case FS_PATTERN: /* pattern fill */ case FS_TRANSPARENT_PATTERN: color = PNG_FillPattern(style); break; default: /* should never happen */ color = png_state.color; break; } x1 = x; x2 = x + width - 1; y2 = Y(y); y1 = y2 - height + 1; gdImageFilledRectangle(png_state.image, x1, y1, x2, y2, color); } /* * _graphics() Called just before a plot is going to be displayed. This * procedure should set the device into graphics mode. Devices which can't * be used as terminals (like plotters) will probably be in graphics mode * always and therefore won't need this. */ TERM_PUBLIC void PNG_graphics() { int i; unsigned int rgb; for (i = png_state.n_colors; i < GD_DEFINED_COLORS; i++) png_state.rgb_table[i] = pm3d_color_names_tbl[i].value; if (png_state.n_colors < GD_DEFINED_COLORS) png_state.n_colors = GD_DEFINED_COLORS; #if (GD2_VERS >= 2) /* TrueColor images default to a black background; load white instead. */ /* If PNG_USE_TRANSPARENT, store the background alpha in the output file */ /* but apply alpha for the rest of the image internally. Otherwise you */ /* see only background through the topmost transparent layer. */ if (png_state.TrueColor) { unsigned int brgb = png_state.rgb_table[0]; png_state.image = gdImageCreateTrueColor(PNG_XMAX, PNG_YMAX); if (!png_state.image) int_error(NO_CARET,"libgd: failed to create output image structure"); if (png_state.flags & PNG_USE_TRANSPARENT) { rgb = gdImageColorAllocateAlpha(png_state.image, (brgb >> 16) & 0xff, (brgb >> 8) & 0xff, brgb & 0xff, 127); gdImageSaveAlpha(png_state.image, 1); gdImageAlphaBlending(png_state.image, 0); } else { rgb = gdImageColorAllocate(png_state.image, (brgb >> 16) & 0xff, (brgb >> 8) & 0xff, brgb & 0xff); } gdImageFill(png_state.image, 1, 1, rgb); gdImageAlphaBlending(png_state.image, 1); } else #endif png_state.image = gdImageCreate(PNG_XMAX, PNG_YMAX); if (!png_state.image) int_error(NO_CARET,"libgd: failed to create output image structure"); png_state.height = PNG_YMAX - 1; png_state.charw = term->h_char; /* png_state.font->w; */ png_state.charh = term->v_char; /* png_state.font->h; */ png_state.font = png_state.default_font; png_state.color = 0; for (i = 0; i < png_state.n_colors; i++) { rgb = png_state.rgb_table[i]; png_state.color_table[i] = gdImageColorAllocate(png_state.image, (rgb >> 16) & 0xff, (rgb >> 8) & 0xff, rgb & 0xff); } if (png_state.flags & PNG_USE_TRANSPARENT) gdImageColorTransparent(png_state.image, png_state.color_table[0]); else gdImageColorTransparent(png_state.image, -1); } /* * _text() Called immediately after a plot is displayed. This procedure * should set the device back into text mode if it is also a terminal, so * that commands can be seen as they're typed. Again, this will probably * do nothing if the device can't be used as a terminal. */ TERM_PUBLIC void PNG_text() { image_do_crop(); if (png_state.flags & PNG_USE_INTERLACE) gdImageInterlace(png_state.image, 1); gdImagePng(png_state.image, gpoutfile); gdImageDestroy(png_state.image); } /* _move(x,y) Called at the start of a line. The cursor should move to the * (x,y) position without drawing. */ TERM_PUBLIC void PNG_move(unsigned int x, unsigned int y) { png_state.x = x; png_state.y = y; } /* _vector(x,y) Called when a line is to be drawn. This should display a line * from the last (x,y) position given by _move() or _vector() to this new (x,y) * position. */ TERM_PUBLIC void PNG_vector(unsigned int x, unsigned int y) { int lw = png_state.linewidth; /* Dashed line style; used only for the x/y grid */ if (png_state.linetype == -1) { static int last_lw = -1; static double last_dl = -1; static int last_color = -1; static int *png_linetype_dotted = NULL; static int ssize; /* Adjust the style when linewidth or dashlength has changed. */ if (lw != last_lw || PNG_dashlength_factor != last_dl || last_color != png_state.color) { int i; int dashlength = 2 * PNG_dashlength_factor; int spacelength = 3 * PNG_dashlength_factor; int psize = lw*lw*dashlength; ssize = lw*lw*(spacelength + dashlength); png_linetype_dotted = gp_realloc( png_linetype_dotted, ssize*sizeof(int), "dashes"); /* Fill style with with color then transparent. * The style is 2 on / 3 off and scales with linewidth and dashlength. */ for(i = 0;i < psize; i++) png_linetype_dotted[i] = png_state.color; for (;i < ssize; i++) png_linetype_dotted[i] = gdTransparent; last_lw = lw; last_dl = PNG_dashlength_factor; last_color = png_state.color; } /* This driver does not in general use gd's built-in SetThickness command, * because it only works right for purely horizontal or vertical lines. * But that's OK for a 2D grid. */ gdImageSetStyle(png_state.image, png_linetype_dotted, ssize); gdImageSetThickness(png_state.image,lw); gdImageLine(png_state.image, png_state.x, Y(png_state.y), x, Y(y), gdStyled); gdImageSetThickness(png_state.image,1); /* All other (not dashed) vectors */ } else { if (png_state.linewidth == 1) { #if (GD2_VERS >= 2) && defined(gdAntiAliased) gdImageSetThickness(png_state.image,1); gdImageSetAntiAliased(png_state.image, png_state.color); gdImageLine(png_state.image, png_state.x, Y(png_state.y), x, Y(y), gdAntiAliased); #else gdImageLine(png_state.image, png_state.x, Y(png_state.y), x, Y(y), png_state.color); #endif #if (GD2_VERS >= 2) } else if (png_state.capbutt){ gdImageSetThickness(png_state.image,png_state.linewidth); gdImageLine(png_state.image, png_state.x, Y(png_state.y), x, Y(y), png_state.color); #endif } else { /* EAM - Implement linewidth by using a brush */ PNG_init_brush(lw); gdImageSetBrush(png_state.image, PNG_brush[lw]->im); gdImageLine(png_state.image, png_state.x, Y(png_state.y), x, Y(y), gdBrushed ); } } png_state.x = x; png_state.y = y; } /* _linetype(lt) Called to set the line type before text is displayed or * line(s) plotted. * Negative linetypes are defined in gadgets.h * lt 0 and upwards are used for plots 0 and upwards. * If _linetype() is called with lt greater than the available line types, * it should map it to one of the available line types. */ TERM_PUBLIC void PNG_linetype(int type) { if (type >= (png_state.n_colors - 3)) type %= (png_state.n_colors - 3); if (type <= LT_BACKGROUND) /* LT_NODRAW, LT_BACKGROUND, LT_UNDEFINED */ type = -3; /* Draw in background color */ png_state.color = png_state.color_table[type + 3]; png_state.rgb = png_state.rgb_table[type + 3]; png_state.linetype = type; } /* Use the "brush" tools in the gd library to control line width. * Pre-define brushes for linewidths 2, 3, 4, 5, 6 (1 doesn't need a brush!). * Here we just remember the state. */ TERM_PUBLIC void PNG_linewidth(double linewidth) { png_state.linewidth = (int)(PNG_linewidth_factor * linewidth+0.49); if (png_state.linewidth > MAXLINEWIDTH) png_state.linewidth = MAXLINEWIDTH; if (png_state.linewidth < 1) png_state.linewidth = 1; } /* _put_text(x,y,str) Called to display text at the (x,y) position, * while in graphics mode. The text should be vertically (with respect * to the text) justified about (x,y). The text is rotated according * to _text_angle and then horizontally (with respect to the text) * justified according to _justify_text. */ #ifdef HAVE_GD_TTF TERM_PUBLIC void PNG_put_text(unsigned int x, unsigned int y, const char *string) { /* Mar 2011 - added to handle SJIS/UTF8 conversion */ if (contains8bit(string)) { gd_iconv((char **)(&string)); } if (png_state.ttffont) { int brect[8]; char *err; /* Draw once with a NULL image to get the bounding rectangle */ /* then draw it again, centered. */ err = gdImageStringFT(NULL, brect, png_state.color, png_state.ttffont, (double)png_state.ttfsize*png_state.fontscale, (double)png_state.angle * M_PI_2 / 90. , x, Y(y), (char *)string); if (err) { fprintf(stderr,"gdImageStringFT: %s while printing string %s with font %s\n", err,string,png_state.ttffont); } else { x += sin((double)png_state.angle * M_PI_2/90.) * (double)png_state.charh/4.; y -= cos((double)png_state.angle * M_PI_2/90.) * (double)png_state.charh/4.; switch (png_state.justify) { case RIGHT: x -= (brect[2]-brect[0]); y += (brect[3]-brect[1]); break; case CENTRE: x -= (brect[2]-brect[0]) / 2.; y += (brect[3]-brect[1]) / 2.; break; case LEFT: default: break; } err = gdImageStringFT(png_state.image, brect, png_state.color, png_state.ttffont, (double)png_state.ttfsize*png_state.fontscale, (double)png_state.angle * M_PI_2 / 90., x, Y(y), (char *)string); if (err) fprintf(stderr,"gdImageStringFT: %s while printing string %s with font %s\n", err,string,png_state.ttffont); } } else if (png_state.angle != 0) { x -= png_state.charh / 2; switch (png_state.justify) { case RIGHT: y -= png_state.charw * strlen(string); break; case CENTRE:y -= png_state.charw * strlen(string) / 2; break; case LEFT: default: break; } gdImageStringUp(png_state.image, png_state.font, x, Y(y), (unsigned char *)string, png_state.color); } else { y += png_state.charh / 2; switch (png_state.justify) { case RIGHT: x -= png_state.charw * strlen(string); break; case CENTRE:x -= png_state.charw * strlen(string) / 2; break; case LEFT: default: break; } gdImageString(png_state.image, png_state.font, x, Y(y), (unsigned char *)string, png_state.color); } } #else /* not HAVE_GD_TTF */ TERM_PUBLIC void PNG_put_text(unsigned int x, unsigned int y, const char *string) { if (png_state.angle == 0) { y += png_state.charh / 2; gdImageString(png_state.image, png_state.font, x, Y(y), (unsigned char *)string, png_state.color); } else { x -= png_state.charh / 2; gdImageStringUp(png_state.image, png_state.font, x, Y(y), (unsigned char *)string, png_state.color); } } #endif /* HAVE_GD_TTF */ TERM_PUBLIC int PNG_text_angle(int ang) { while (ang < -180) ang += 360; /* Should not be needed, but reported to */ while (ang > 180) ang -= 360; /* avoid a bug in some libgd versions */ png_state.angle = ang; return TRUE; } TERM_PUBLIC int PNG_justify_text(enum JUSTIFY mode) { #ifdef HAVE_GD_TTF png_state.justify = mode; return TRUE; #else return null_justify_text(mode); #endif } TERM_PUBLIC void PNG_point(unsigned int x, unsigned int y, int number) { int save_color = png_state.color; if (number < 0) { /* Dot */ gdImageSetPixel(png_state.image, x, Y(y), png_state.color); return; } /* Use current linewidth to draw the point symbol */ if (png_state.linewidth > 1) { /* EAM - Implement linewidth by using a brush */ int lw = png_state.linewidth; PNG_init_brush(lw); gdImageSetBrush(png_state.image, PNG_brush[lw]->im); png_state.color = gdBrushed; } y = Y(y); switch (number % 13) { case 0: /* plus */ default: PNG_PointPlus(x, y); break; case 1: /* X */ PNG_PointX(x, y); break; case 2: /* star */ PNG_PointPlus(x, y); PNG_PointX(x, y); break; case 3: /* box */ gdImageRectangle(png_state.image, x - PNG_ps, y - PNG_ps, x + PNG_ps, y + PNG_ps, png_state.color); break; case 4: /* box filled */ gdImageFilledRectangle(png_state.image, x - PNG_ps, y - PNG_ps, x + PNG_ps, y + PNG_ps, png_state.color); break; case 5: /* circle */ gdImageArc(png_state.image, x, y, 2 * PNG_ps, 2 * PNG_ps, 0, 360, png_state.color); break; case 6: /* circle (disk) filled */ #if (GD2_VERS >= 2) gdImageFilledArc(png_state.image, x, y, 2 * PNG_ps, 2 * PNG_ps, 0, 360, png_state.color, gdArc); #else gdImageArc(png_state.image, x, y, 2 * PNG_ps, 2 * PNG_ps, 0, 360, png_state.color); gdImageFillToBorder(png_state.image, x, y, png_state.color, png_state.color); #endif break; case 7: /* triangle */ PNG_Triangle(x, y, 1, gp_gdImagePolygon); break; case 8: /* triangle filled */ PNG_Triangle(x, y, 1, gp_gdImageFilledPolygon); break; case 9: /* upside down triangle */ PNG_Triangle(x, y, -1, gp_gdImagePolygon); break; case 10: /* upside down triangle filled */ PNG_Triangle(x, y, -1, gp_gdImageFilledPolygon); break; case 11: /* diamond */ PNG_Diamond(x, y, gp_gdImagePolygon); break; case 12: /* diamond filled */ PNG_Diamond(x, y, gp_gdImageFilledPolygon); break; } png_state.color = save_color; } TERM_PUBLIC int PNG_set_font(const char *fontname) { int sep; int size; gdFontPtr font = png_state.default_font; char *name = gp_strdup(fontname); sep = strcspn(fontname,","); strncpy(name,fontname,sep); name[sep] = '\0'; size = png_state.default_ttfsize; sscanf (&(fontname[sep+1]),"%d",&size); if (!strcmp(name,"small")) font = gdFontGetSmall(); else if (!strcmp(name,"medium")) font = gdFontGetMediumBold(); else if (!strcmp(name,"large")) font = gdFontGetLarge(); else if (!strcmp(name,"giant")) font = gdFontGetGiant(); else if (!strcmp(name,"tiny")) font = gdFontGetTiny(); else if (*name) { /* New ttf font */ free(png_state.ttffont); png_state.ttffont = gp_strdup(name); png_state.ttfsize = size; } else { /* Restore initial default font */ free(png_state.ttffont); png_state.ttffont = gp_strdup(png_state.default_ttffont); png_state.ttfsize = size; } free(name); png_state.font = font; png_state.charw = font->w; png_state.charh = font->h; /* EAM 9-Feb-2003 Make new font size visible to higher level routines like write_multiline */ term->h_char = font->w; term->v_char = font->h; #ifdef HAVE_GD_TTF /* Find approximate character width and height of selected TTF font */ if (png_state.ttffont) { int brect[8]; char *err; /* First try the old GDFONTPATH mechanism for locating fonts */ (void)gdUseFontConfig(0); err = gdImageStringFT(NULL, &brect[0], 0, png_state.ttffont, (double)png_state.ttfsize*png_state.fontscale, 0.0, 0, 0, "f00000000g"); /* If that didn't work, try again using fontconfig mechanism */ if (err && gdUseFontConfig(1)) { FPRINTF((stderr,"DEBUG1: gd.trm:3: gdUseFontConfig(1) (%s)\n", png_state.ttffont)); err = gdImageStringFT(NULL, &brect[0], 0, png_state.ttffont, (double)png_state.default_ttfsize*png_state.fontscale, 0.0, 0, 0, "f00000000g"); } if (!err) { term->h_char = .11 * (float)(brect[2] - brect[0]) + 0.5; term->v_char = 1.1 * (float)(brect[1] - brect[7]) + 0.5; } } #endif return TRUE; } TERM_PUBLIC void PNG_pointsize(double ptsize) { if (ptsize < 0) ptsize = 1; PNG_ps = (int)(((double)PNG_POINT_SCALE * ptsize) + 0.5); } /* * Ethan A Merritt November 2003 * - Support for enhanced text mode * BUGS: * - placement of overprinted characters is not correct; * the overprinted text (pass 2) should be centered, not left-justified * PROBLEMS: * - the Symbol font encoding didn't work in libgd until 2.0.21 * - Placement of superscripts and subscripts relies on information * in the font description that is not always reliable * - the TTF character encoding for non-keyboard characters does * not always match the PostScript standard. * - Spacing of rotated text is incorrect; I believe this is a due * to a problem in the text rotation code (aspect ratio??). */ static TBOOLEAN ENHgd_opened_string; /* used in determining height of processed text */ static float ENHgd_base; /* use these so that we don't over-write the current font settings in png_state */ static double ENHgd_fontsize; static char *ENHgd_font; static TBOOLEAN ENHgd_show = TRUE; static TBOOLEAN ENHgd_sizeonly = FALSE; static int ENHgd_overprint = 0; static TBOOLEAN ENHgd_widthflag = TRUE; static unsigned int ENHgd_xsave, ENHgd_ysave; TERM_PUBLIC void ENHGD_OPEN( char *fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { /* If the overprint code requests a save or restore, that's all we do */ if (overprint == 3) { ENHgd_xsave = png_state.x; ENHgd_ysave = png_state.y; return; } else if (overprint == 4) { PNG_move(ENHgd_xsave, ENHgd_ysave); return; } if (!ENHgd_opened_string) { ENHgd_opened_string = TRUE; enhanced_cur_text = &enhanced_text[0]; ENHgd_font = fontname; ENHgd_fontsize = fontsize; ENHgd_base = base; ENHgd_show = showflag; ENHgd_overprint = overprint; ENHgd_widthflag = widthflag; } } /* Write a string fragment and update the current position */ TERM_PUBLIC void ENHGD_FLUSH() { int brect[8]; char *err; unsigned int x, y; char *fragment = enhanced_text; if (!ENHgd_opened_string) return; ENHgd_opened_string = FALSE; *enhanced_cur_text = '\0'; /* Mar 2011 - added to handle SJIS/UTF8 conversion */ if (contains8bit(fragment)) { gd_iconv(&fragment); } x = png_state.x; y = png_state.y; x -= sin((double)png_state.angle * M_PI_2/90.) * ENHgd_base; y += cos((double)png_state.angle * M_PI_2/90.) * ENHgd_base; x += sin((double)png_state.angle * M_PI_2/90.) * (double)png_state.charh/4.; y -= cos((double)png_state.angle * M_PI_2/90.) * (double)png_state.charh/4.; /* First try the old GDFONTPATH mechanism for locating fonts */ (void)gdUseFontConfig(0); #ifdef gdFTEX_Adobe_Custom /* libgd defaults to UTF-8 encodings. We have limited options for */ /* over-riding this, but we can try */ if (encoding != S_ENC_UTF8 && ENHgd_font && !strcmp(ENHgd_font,"Symbol")) { PNG_FONT_INFO.flags |= gdFTEX_CHARMAP; PNG_FONT_INFO.charmap = gdFTEX_Adobe_Custom; } else { PNG_FONT_INFO.flags &= ~gdFTEX_CHARMAP; PNG_FONT_INFO.charmap = 0; /* gdFTEX_Adobe_Custom */ } err = gdImageStringFTEx( (ENHgd_show && !ENHgd_sizeonly) ? png_state.image : NULL, brect, png_state.color, ENHgd_font, ENHgd_fontsize, (double)png_state.angle * M_PI_2/90., x, Y(y), fragment, &PNG_FONT_INFO); if (err && gdUseFontConfig(1)) { err = gdImageStringFTEx( (ENHgd_show && !ENHgd_sizeonly) ? png_state.image : NULL, brect, png_state.color, ENHgd_font, ENHgd_fontsize, (double)png_state.angle * M_PI_2/90., x, Y(y), fragment, &PNG_FONT_INFO); } #else err = gdImageStringFT( (ENHgd_show && !ENHgd_sizeonly) ? png_state.image : NULL, brect, png_state.color, ENHgd_font, ENHgd_fontsize, (double)png_state.angle * M_PI_2/90., x, Y(y), fragment); if (err && gdUseFontConfig(1)) { err = gdImageStringFT( (ENHgd_show && !ENHgd_sizeonly) ? png_state.image : NULL, brect, png_state.color, ENHgd_font, ENHgd_fontsize, (double)png_state.angle * M_PI_2/90., x, Y(y), fragment); } #endif if (err) fprintf(stderr,"gdImageStringFT: %s while printing string %s with font %s\n", err,enhanced_text,ENHgd_font); FPRINTF((stderr,"outputstring: %s boundingbox: %d %d %d %d\n", enhanced_text, brect[6], brect[7], brect[2], brect[3])); if (ENHgd_overprint == 1) { png_state.x += ((brect[2] - brect[0]))/2; png_state.y -= (brect[3] - brect[1]); } else if (ENHgd_widthflag) { png_state.x += (brect[2] - brect[0]); png_state.y -= (brect[3] - brect[1]); } } TERM_PUBLIC void ENHGD_put_text(unsigned int x, unsigned int y, const char *str) { char *original_string = (char *)str; if (ignore_enhanced_text || !png_state.ttffont) { PNG_put_text(x,y,str); return; } if (!strlen(str)) return; /* if there are no magic characters, we should just be able * punt the string to PNG_put_text() */ if (!strpbrk(str, "{}^_@&~")) { /* FIXME: do something to ensure default font is selected */ PNG_put_text(x,y,str); return; } PNG_move(x,y); /* set up the global variables needed by enhanced_recursion() */ enhanced_fontscale = png_state.fontscale; strncpy(enhanced_escape_format,"&#x%2.2x;",sizeof(enhanced_escape_format)); ENHgd_opened_string = FALSE; ENHgd_show = TRUE; ENHgd_overprint = 0; /* EAM - post.trm wasn't doing this, but how else do they get initialized? */ ENHgd_font = png_state.ttffont; ENHgd_fontsize = png_state.ttfsize; /* EAM - Software text justification requires two passes */ if (png_state.justify == RIGHT || png_state.justify == CENTRE) ENHgd_sizeonly = TRUE; /* Set the recursion going. We say to keep going until a * closing brace, but we don't really expect to find one. * If the return value is not the nul-terminator of the * string, that can only mean that we did find an unmatched * closing brace in the string. We increment past it (else * we get stuck in an infinite loop) and try again. */ while (*(str = enhanced_recursion((char *)str, TRUE, ENHgd_font, ENHgd_fontsize * png_state.fontscale, 0.0, TRUE, TRUE, 0))) { (term->enhanced_flush)(); /* I think we can only get here if *str == '}' */ enh_err_check(str); if (!*++str) break; /* end of string */ /* else carry on and process the rest of the string */ } /* We can do text justification by running the entire top level string */ /* through 2 times, with the ENHgd_sizeonly flag set the first time. */ /* After seeing where the final position is, we then offset the start */ /* point accordingly and run it again without the flag set. */ if (png_state.justify == RIGHT || png_state.justify == CENTRE) { int justification = png_state.justify; int x_offset = png_state.x - x; int y_offset = 0; if (png_state.angle != 0) y_offset = png_state.y - y; png_state.justify = LEFT; ENHgd_sizeonly = FALSE; if (justification == RIGHT) { ENHGD_put_text(x - x_offset, y - y_offset, original_string); } else if (justification == CENTRE) { ENHGD_put_text(x - x_offset/2, y - y_offset/2, original_string); } png_state.justify = justification; } } #undef gdfont TERM_PUBLIC void PNG_image (unsigned int M, unsigned int N, coordval * image, gpiPoint * corner, t_imagecolor color_mode) { int m, n, mout, nout; int x1,y1,x2,y2; int xclip1, xclip2, yclip1, yclip2; int pixel; gdImagePtr im; #if (GD2_VERS >= 2) if (png_state.TrueColor) { im = gdImageCreateTrueColor(M, N); if (!im) int_error(NO_CARET,"libgd: failed to create image structure"); } else #endif { im = gdImageCreate(M, N); if (!im) int_error(NO_CARET,"libgd: failed to create image structure"); gdImagePaletteCopy(im, png_state.image); } #if (GD2_VERS >= 2) /* Set clipping bound for area into which we will copy */ xclip1 = GPMIN(corner[2].x, corner[3].x); xclip2 = GPMAX(corner[2].x, corner[3].x); yclip1 = GPMIN(Y(corner[2].y), Y(corner[3].y)); yclip2 = GPMAX(Y(corner[2].y), Y(corner[3].y)); gdImageGetClip(png_state.image, &x1, &y1, &x2, &y2); gdImageSetClip(png_state.image, xclip1, yclip1, xclip2, yclip2); #endif /* Initialize image area with current contents of plot. */ mout = abs( (int)corner[1].x - (int)corner[0].x ); nout = abs( (int)corner[1].y - (int)corner[0].y ); if (color_mode == IC_RGBA) { /* RGB + Alpha channel * Resize explicitly in a loop rather than calling a library * routine in order not to apply the alpha correction more than * once when building up any given output pixel. */ for (n=0; n<nout; n++) { for (m=0; m<mout; m++) { rgb_color rgb1; rgb255_color rgb255; int alpha; int msrc = (m*(long)(M-1))/(mout-1); int nsrc = (n*(long)(N-1))/(nout-1); coordval *cval = image + 4*(M*nsrc + msrc); rgb1.r = *cval++; rgb1.g = *cval++; rgb1.b = *cval++; alpha = *cval++; alpha = 127 - (alpha>>1); /* input is [0:255] but gd wants [127:0] */ rgb255_from_rgb1( rgb1, &rgb255 ); pixel = gdImageColorResolveAlpha( png_state.image, (int)rgb255.r, (int)rgb255.g, (int)rgb255.b, alpha); gdImageSetPixel( png_state.image, m + corner[0].x, n + Y(corner[0].y), pixel ); } } } else if (color_mode == IC_RGB) { /* TrueColor 24-bit color mode */ for (n=0; n<N; n++) { for (m=0; m<M; m++) { rgb_color rgb1; rgb255_color rgb255; rgb1.r = *image++; rgb1.g = *image++; rgb1.b = *image++; rgb255_from_rgb1( rgb1, &rgb255 ); pixel = gdImageColorResolve( im, (int)rgb255.r, (int)rgb255.g, (int)rgb255.b ); gdImageSetPixel( im, m, n, pixel ); } } } else if (color_mode == IC_PALETTE) { /* Palette color lookup from gray value */ for (n=0; n<N; n++) { for (m=0; m<M; m++) { rgb255_color rgb; if (isnan(*image)) { /* Transparent would be even better */ pixel = png_state.color_table[0]; image++; } else { rgb255maxcolors_from_gray( *image++, &rgb ); pixel = gdImageColorResolve( im, (int)rgb.r, (int)rgb.g, (int)rgb.b ); } gdImageSetPixel( im, m, n, pixel ); } } } /* Copy and resize onto requested region of plot */ if (color_mode != IC_RGBA) gdImageCopyResized(png_state.image, im, (corner[0].x), Y(corner[0].y), /* Destination X, Y */ 0, 0, /* Source X, Y */ mout, nout, /* Destination Width, Height */ M, N /* Source Width, Height */ ); gdImageDestroy(im); #if (GD2_VERS >= 2) /* Restore previous clipping, if any */ gdImageSetClip(png_state.image, x1, y1, x2, y2); #endif } /* Mar 2011 - shige takeno * libgd can be built to prefer UTF-8 or SJIS encoding for Japanese. * If it wants SJIS and we are currently in UTF8, convert. * If it wants UTF8 and we are currently in SJIS, convert. */ static void gd_iconv(char **string) { #ifdef HAVE_ICONV size_t len1 = strlen(*string)+1; size_t len2; iconv_t cd; char *stmp; /* We will return this to the caller and free it next time */ static char *iconv_string = NULL; free(iconv_string); iconv_string = NULL; #ifdef JIS_GDLIB if (encoding == S_ENC_UTF8) { /* UTF-8 -> Shift_JIS by iconv */ len2 = len1; iconv_string = gp_alloc(len2, "iconv string"); stmp = iconv_string; if ((cd = iconv_open("Shift_JIS", "UTF-8")) == (iconv_t)-1) int_warn(NO_CARET, "iconv_open failed"); else { if (iconv(cd, (void *)string, &len1, &stmp, &len2) == (size_t)-1) int_warn(NO_CARET, "iconv failed"); else *string = iconv_string; iconv_close(cd); } } #else /* ! JIS_GDLIB */ if (encoding == S_ENC_SJIS) { /* Shift_JIS -> UTF-8 by iconv */ len2 = len1*3/2+2; iconv_string = gp_alloc(len2, "iconv string"); stmp = iconv_string; if ((cd = iconv_open("UTF-8", "Shift_JIS")) == (iconv_t)-1) int_warn(NO_CARET, "iconv_open failed"); else { if (iconv(cd, (void *)string, &len1, &stmp, &len2) == (size_t)-1) int_warn(NO_CARET, "iconv failed"); else *string = iconv_string; iconv_close(cd); } } #endif /* JIS_GDLIB */ #else /* ! HAVE_ICONV */ #ifdef JIS_GDLIB if (encoding == S_ENC_UTF8) int_warn(NO_CARET, "This gdlib supports Shift_JIS encoding, but not UTF-8."); #else /* ! JIS_GDLIB */ if (encoding == S_ENC_SJIS) /* Shift_JIS -> UTF-8 */ int_warn(NO_CARET, "This gdlib supports UTF-8 encoding, but not Shift_JIS."); #endif /* JIS_GDLIB */ #endif /* HAVE_ICONV */ } #undef MAXLINEWIDTH #undef Y #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(png_driver) "png", "PNG images using libgd and TrueType fonts", GREG_XMAX, GREG_YMAX, PNG_VCHAR, PNG_HCHAR, PNG_TICSIZE, PNG_TICSIZE, PNG_options, PNG_init, PNG_reset, PNG_text, null_scale, PNG_graphics, PNG_move, PNG_vector, PNG_linetype, PNG_put_text, PNG_text_angle, PNG_justify_text, PNG_point, do_arrow, PNG_set_font, PNG_pointsize, TERM_CAN_MULTIPLOT|TERM_BINARY|TERM_LINEWIDTH|TERM_FONTSCALE, /* TERM_ALPHA_CHANNEL only if truecolor */ 0 /*suspend*/, 0 /*resume*/, PNG_boxfill /*EAM - fillbox*/, PNG_linewidth /*EAM - linewidth*/ #ifdef USE_MOUSE , 0, 0, 0, 0, 0 /* no mouse support */ #endif , PNG_make_palette, 0, /* previous_palette() ... no, single array of 256 colours for PNG */ PNG_set_color, PNG_filled_polygon , PNG_image , ENHGD_OPEN, ENHGD_FLUSH, do_enh_writec TERM_TABLE_END(png_driver) #undef LAST_TERM #define LAST_TERM png_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifndef JPEG_HELP_ONLY #ifdef TERM_HELP START_HELP(png) "1 png", "?commands set terminal png", "?set terminal png", "?set term png", "?terminal png", "?term png", "?png", " Syntax:", " set terminal png ", " {{no}enhanced}", " {{no}transparent} {{no}interlace}", " {{no}truecolor} {rounded|butt}", " {linewidth <lw>} {dashlength <dl>}", " {tiny | small | medium | large | giant}", " {font \"<face> {,<pointsize>}\"} {fontscale <scale>}", " {size <x>,<y>} {{no}crop}", " {background <rgb_color>}", "", " PNG, JPEG and GIF images are created using the external library libgd.", " PNG plots may be viewed interactively by piping the output to the", " 'display' program from the ImageMagick package as follows:", " set term png", " set output '| display png:-'", " You can view the output from successive plot commands interactively by typing", " <space> in the display window. To save the current plot to a file,", " left click in the display window and choose `save`.", "", " `transparent` instructs the driver to make the background color transparent.", " Default is `notransparent`.", "", " `interlace` instructs the driver to generate interlaced PNGs.", " Default is `nointerlace`.", "", " The `linewidth` and `dashlength` options are scaling factors that affect all", " lines drawn, i.e. they are multiplied by values requested in various drawing", " commands.", "", " By default output png images use 256 indexed colors. The `truecolor` option", " instead creates TrueColor images with 24 bits of color information per pixel.", " Transparent fill styles require the `truecolor` option. See `fillstyle`.", " A transparent background is possible in either indexed or TrueColor images.", "", " `butt` instructs the driver to use a line drawing method that does", " not overshoot the desired end point of a line. This setting is only", " applicable for line widths greater than 1. This setting is most useful when", " drawing horizontal or vertical lines. Default is `rounded`.", "", " The details of font selection are complicated.", " Two equivalent simple examples are given below:", " set term png font arial 11", " set term png font \"arial,11\"", " For more information please see the separate section under `fonts`.", "", " The output plot size <x,y> is given in pixels---it defaults to 640x480.", " Please see additional information under `canvas` and `set size`.", " Blank space at the edges of the finished plot may be trimmed using the `crop`", " option, resulting in a smaller final image size. Default is `nocrop`.", "", "2 examples", "?set term png examples", " set terminal png medium size 640,480 background '#ffffff'", "", " Use the medium size built-in non-scaleable, non-rotatable font.", " Use white (24-bit RGB in hexadecimal) for the non-transparent background.", "", " set terminal png font arial 14 size 800,600", "", " Searches for a scalable font with face name 'arial' and sets the font", " size to 14pt. Please see `fonts` for details of how the font search", " is done.", "", " set terminal png transparent truecolor enhanced", "", " Use 24 bits of color information per pixel, with a transparent background.", " Use the `enhanced text` mode to control the layout of strings to be printed.", "" END_HELP(png) #endif /* TERM_HELP */ #endif /* JPEG_HELP_ONLY */ /* * JPEG support comes almost for free. * We just piggy-back on the PNG routines, since they both go via libgd */ #ifdef HAVE_GD_JPEG #ifdef TERM_REGISTER register_term(jpeg) #endif #ifdef TERM_PROTO TERM_PUBLIC void JPEG_text __PROTO((void)); #define GOT_NEXT_PROTO #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include <gd.h> /* * All functions except the final write to file * are actually performed by the PNG driver code */ TERM_PUBLIC void JPEG_text() { int quality = 90; image_do_crop(); if (png_state.flags & PNG_USE_INTERLACE) gdImageInterlace(png_state.image, 1); gdImageJpeg(png_state.image, gpoutfile, quality); gdImageDestroy(png_state.image); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(jpeg_driver) "jpeg", "JPEG images using libgd and TrueType fonts", GREG_XMAX, GREG_YMAX, PNG_VCHAR, PNG_HCHAR, PNG_TICSIZE, PNG_TICSIZE, PNG_options, PNG_init, PNG_reset, JPEG_text, null_scale, PNG_graphics, PNG_move, PNG_vector, PNG_linetype, PNG_put_text, PNG_text_angle, PNG_justify_text, PNG_point, do_arrow, PNG_set_font, PNG_pointsize, TERM_CAN_MULTIPLOT|TERM_BINARY|TERM_ALPHA_CHANNEL|TERM_LINEWIDTH|TERM_FONTSCALE, 0 /*suspend*/, 0 /*resume*/, PNG_boxfill /*EAM - fillbox*/, PNG_linewidth /*EAM - linewidth*/ #ifdef USE_MOUSE , 0, 0, 0, 0, 0 /* no mouse support */ #endif , PNG_make_palette, 0, /* previous_palette() ... no, single array of 256 colours for PNG */ PNG_set_color, PNG_filled_polygon , PNG_image , ENHGD_OPEN, ENHGD_FLUSH, do_enh_writec TERM_TABLE_END(jpeg_driver) #undef LAST_TERM #define LAST_TERM jpeg_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(jpeg) "1 jpeg", "?commands set terminal jpeg", "?set terminal jpeg", "?set term jpeg", "?terminal jpeg", "?term jpeg", "?jpeg", " Syntax:", " set terminal jpeg ", " {{no}enhanced}", " {{no}interlace}", " {linewidth <lw>} {dashlength <dl>} {rounded|butt}", " {tiny | small | medium | large | giant}", " {font \"<face> {,<pointsize>}\"} {fontscale <scale>}", " {size <x>,<y>} {{no}crop}", " {background <rgb_color>}", "", " PNG, JPEG and GIF images are created using the external library libgd.", " In most cases, PNG is to be preferred for single plots, and GIF for", " animations. Both are loss-less image formats, and produce better image", " quality than the lossy JPEG format. This is in particular noticeable", " for solid color lines against a solid background, i.e. exactly the sort", " of image typically created by gnuplot.", "", " The `interlace` option creates a progressive JPEG image.", " Default is `nointerlace`.", "", " The `linewidth` and `dashlength` options are scaling factors that affect all", " lines drawn, i.e. they are multiplied by values requested in various drawing", " commands.", "", " `butt` instructs the driver to use a line drawing method that does", " not overshoot the desired end point of a line. This setting is only", " applicable for line widths greater than 1. This setting is most useful when", " drawing horizontal or vertical lines. Default is `rounded`.", "", " The details of font selection are complicated.", " Two equivalent simple examples are given below:", " set term jpeg font arial 11", " set term jpeg font \"arial,11\"", " For more information please see the separate section under `fonts`.", "", " The output plot size <x,y> is given in pixels---it defaults to 640x480.", " Please see additional information under `canvas` and `set size`.", " Blank space at the edges of the finished plot may be trimmed using the `crop`", " option, resulting in a smaller final image size. Default is `nocrop`.", "" END_HELP(jpeg) #endif /* TERM_HELP */ #endif /* HAVE_GD_JPEG */ #ifdef HAVE_GD_GIF /* * GIF support comes almost for free. * We just piggy-back on the PNG routines, since they both go via libgd. * Required libgd version is 2.0.28 or newer. */ #ifdef HAVE_GD_GIF #ifdef TERM_REGISTER register_term(gif) #endif #ifdef TERM_PROTO TERM_PUBLIC void GIF_text __PROTO((void)); #define GOT_NEXT_PROTO #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include <gd.h> /* * All functions except the final write to file * are actually performed by the PNG driver code */ TERM_PUBLIC void GIF_text() { image_do_crop(); #ifdef GIF_ANIMATION if (png_state.animate) { /* Note - using a global colormap saves space, but it breaks */ /* if later frames add new colors to the palette. */ if (png_state.frame_count == 0) { gdImageGifAnimBegin(png_state.image, gpoutfile, 1, /* Load Global Colormap even if it isn't used */ png_state.loop_count ); } gdImageGifAnimAdd(png_state.image, gpoutfile, png_state.frame_optimization ? 0 /* use global map */ : 1, /* use private map */ 0, 0 /* No offset */, png_state.frame_delay, (png_state.flags & PNG_USE_TRANSPARENT) ? gdDisposalRestorePrevious : gdDisposalNone, (png_state.frame_optimization && !(png_state.flags & PNG_USE_TRANSPARENT)) ? png_state.previous_image : NULL); png_state.frame_count++; if (png_state.previous_image) gdImageDestroy(png_state.previous_image); png_state.previous_image = png_state.image; return; } #endif gdImageGif(png_state.image, gpoutfile); gdImageDestroy(png_state.image); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(gif_driver) "gif", "GIF images using libgd and TrueType fonts", GREG_XMAX, GREG_YMAX, PNG_VCHAR, PNG_HCHAR, PNG_TICSIZE, PNG_TICSIZE, PNG_options, PNG_init, PNG_reset, GIF_text, null_scale, PNG_graphics, PNG_move, PNG_vector, PNG_linetype, PNG_put_text, PNG_text_angle, PNG_justify_text, PNG_point, do_arrow, PNG_set_font, PNG_pointsize, TERM_CAN_MULTIPLOT|TERM_BINARY|TERM_LINEWIDTH|TERM_FONTSCALE, 0 /*suspend*/, 0 /*resume*/, PNG_boxfill /*EAM - fillbox*/, PNG_linewidth /*EAM - linewidth*/ #ifdef USE_MOUSE , 0, 0, 0, 0, 0 /* no mouse support */ #endif , PNG_make_palette, 0, /* previous_palette() ... no, single array of 256 colours for PNG */ PNG_set_color, PNG_filled_polygon , PNG_image , ENHGD_OPEN, ENHGD_FLUSH, do_enh_writec TERM_TABLE_END(gif_driver) #undef LAST_TERM #define LAST_TERM gif_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(gif) "1 gif", "?commands set terminal gif", "?set terminal gif", "?set term gif", "?terminal gif", "?term gif", "?gif", " Syntax:", " set terminal gif ", " {{no}enhanced}", " {{no}transparent} {rounded|butt}", " {linewidth <lw>} {dashlength <dl>}", " {tiny | small | medium | large | giant}", " {font \"<face> {,<pointsize>}\"} {fontscale <scale>}", " {size <x>,<y>} {{no}crop}", " {animate {delay <d>} {loop <n>} {{no}optimize}}", " {background <rgb_color>}", "", " PNG, JPEG and GIF images are created using the external library libgd.", " GIF plots may be viewed interactively by piping the output to the", " 'display' program from the ImageMagick package as follows:", " set term gif", " set output '| display gif:-'", " You can view the output from successive plot commands interactively by typing", " <space> in the display window. To save the current plot to a file,", " left click in the display window and choose `save`.", "", " `transparent` instructs the driver to make the background color transparent.", " Default is `notransparent`.", "", " The `linewidth` and `dashlength` options are scaling factors that affect all", " lines drawn, i.e. they are multiplied by values requested in various drawing", " commands.", "", " `butt` instructs the driver to use a line drawing method that does", " not overshoot the desired end point of a line. This setting is only", " applicable for line widths greater than 1. This setting is most useful when", " drawing horizontal or vertical lines. Default is `rounded`.", "", " The details of font selection are complicated.", " Two equivalent simple examples are given below:", " set term gif font arial 11", " set term gif font \"arial,11\"", " For more information please see the separate section under `fonts`.", "", " The `animate` option is available only if your local gd library supports", " the creation of animated gifs. The default delay between display of", " successive images may be specified in units of 1/100 second (default 5).", " The actual delay may vary depending on the program used as a viewer.", " Number of animation loops can be specified, default 0 means infinity.", " An animation sequence is terminated by the next `set output` or `set term`", " command. The `optimize` option has two effects on the animation.", "", " 1) A single color map is used for the entire animation. This requires", " that all colors used in any frame of the animation are already", " defined in the first frame.", "", " 2) If possible, only the portions of a frame that differ from the", " previous frame are stored in the animation file. This space saving", " may not be possible if the animation uses transparency.", "", " Both of these optimizations are intended to produce a smaller output file,", " but the decrease in size is probably only significant for long animations", " or very small frame sizes.", " The `nooptimize` option turns off both of the effects just described.", " Each frame is stored in its entirety along with a private color map.", " Note that it is possible to post-process a non-optimized animation", " using external utilities, and this post-processing can yield a smaller", " file than gnuplot's internal optimization mode.", " The default is `nooptimize`.", "", " The output plot size <x,y> is given in pixels---it defaults to 640x480.", " Please see additional information under `canvas` and `set size`.", " Blank space at the edges of the finished plot may be trimmed using the `crop`", " option, resulting in a smaller final image size. Default is `nocrop`.", "", "2 examples", "?set term gif examples", " set terminal gif medium size 640,480 background '#ffffff'", "", " Use the medium size built-in non-scaleable, non-rotatable font.", " Use white (24 bit RGB in hexadecimal) for the non-transparent background.", "", " set terminal gif font arial 14 enhanced", "", " Searches for a scalable font with face name 'arial' and sets the font", " size to 14pt. Please see `fonts` for details of how the font search", " is done. Because this is a scalable font, we can use enhanced text mode.", "", " set term gif animate transparent opt delay 10 size 200,200", " load \"animate2.dem\"", "", " Open the gif terminal for creation of an animated gif file. The individual", " frames of the animation sequence are created by the script file animate2.dem", " from the standard collection of demos.", "" END_HELP(gif) #endif /* TERM_HELP */ #endif /* HAVE_GD_GIF */ #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/ggi.trm��������������������������������������������������������������������������0000644�0004711�0000144�00000111263�11031021121�012354� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: ggi.trm,v 1.27 2008/06/26 23:12:17 sfeam Exp $ */ /* GNUPLOT - ggi.trm */ /*[ * Copyright 2000, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHOR: * Cesar Crusius <crusius@leland.stanford.edu> * event / mouse processing & double-buffering * by Johannes Zellner <johannes@zellner.org> * pm3d support by Johannes Zellner <johannes@zellner.org> (Oct. 2000) * * TODO: * * - reimplement wmh (if it's available) * - implement window title using wmh (if it's available) * - check for availability of two frames, and if not * do it with one frame. (will eventually not do * with mouse/event reporting) * - check if libxmi is available and if so, use * it to draw filled polygons. * - enable cursors using blits. */ #include "driver.h" #ifdef TERM_REGISTER register_term(ggi) #endif #ifdef TERM_PROTO #include <ggi/ggi.h> #ifdef USE_MOUSE # include <ggi/ggi-unix.h> #endif #ifdef HAVE_GGI_WMH_H # include <ggi/wmh.h> static TBOOLEAN GGI_use_whm = 0; #endif #if 1 #if defined(HAVE_GGI_XMI_H) # define ENABLE_XMI 1 #endif #endif #ifdef ENABLE_XMI # include <ggi/xmi.h> #endif static void GGI_line_colors __PROTO((void)); TERM_PUBLIC void GGI_graphics __PROTO((void)); TERM_PUBLIC void GGI_set_size __PROTO((void)); TERM_PUBLIC void GGI_init __PROTO((void)); TERM_PUBLIC void GGI_linetype __PROTO((int)); TERM_PUBLIC void GGI_move __PROTO((unsigned int,unsigned int)); TERM_PUBLIC void GGI_options __PROTO((void)); TERM_PUBLIC void GGI_put_text __PROTO((unsigned int,unsigned int, const char*)); TERM_PUBLIC void GGI_suspend __PROTO((void)); TERM_PUBLIC void GGI_resume __PROTO((void)); TERM_PUBLIC void GGI_fillbox __PROTO((int style, unsigned int x, unsigned int y, unsigned int w, unsigned int h)); TERM_PUBLIC void GGI_close __PROTO((void)); TERM_PUBLIC void GGI_reset __PROTO((void)); TERM_PUBLIC void GGI_text __PROTO((void)); TERM_PUBLIC void GGI_vector __PROTO((unsigned int,unsigned int)); #ifdef USE_MOUSE /* zoom box information */ typedef struct { int x; int y; } GGI_point_t; typedef struct { int x; int y; int width; int height; char str[0xff]; } GGI_vertex_t; TERM_PUBLIC long int GGI_SetTime(const struct timeval* current); TERM_PUBLIC int GGI_from_keysym __PROTO((uint32_t keysym)); TERM_PUBLIC int GGI_from_button __PROTO((uint32_t button)); TERM_PUBLIC int GGI_y __PROTO((int32_t y)); TERM_PUBLIC int GGI_dispatch_event __PROTO((const ggi_event* event)); TERM_PUBLIC int GGI_eventually_update_modifiers __PROTO((const ggi_event* event, const int add)); TERM_PUBLIC int GGI_waitforinput __PROTO((void)); TERM_PUBLIC void GGI_draw_ruler __PROTO((void)); TERM_PUBLIC void GGI_clear_zoombox __PROTO((void)); TERM_PUBLIC void GGI_draw_zoombox __PROTO((void)); TERM_PUBLIC void GGI_set_ruler __PROTO((int, int)); TERM_PUBLIC void GGI_set_cursor __PROTO((int, int, int)); TERM_PUBLIC void GGI_save_frame_canvas __PROTO((void)); TERM_PUBLIC void GGI_save_frame_stl __PROTO((void)); TERM_PUBLIC void GGI_replot __PROTO((void)); TERM_PUBLIC void GGI_clear __PROTO((const GGI_vertex_t* v, const int tag)); TERM_PUBLIC void GGI_save_puts __PROTO((GGI_vertex_t* v, const int tag)); TERM_PUBLIC void GGI_set_vertex __PROTO((GGI_vertex_t* v, const int x, const int y, const char* str, const int tag)); TERM_PUBLIC void GGI_abort_zooming __PROTO((void)); TERM_PUBLIC void GGI_put_tmptext __PROTO((int, const char str[])); TERM_PUBLIC void GGI_relative __PROTO((int r[2])); TERM_PUBLIC void GGI_clear_hline __PROTO((int x1, int x2, int y)); TERM_PUBLIC void GGI_clear_vline __PROTO((int y1, int y2, int x)); TERM_PUBLIC void GGI_draw_hline __PROTO((int x1, int x2, int y)); TERM_PUBLIC void GGI_draw_vline __PROTO((int y1, int y2, int x)); TERM_PUBLIC void GGI_set_clipboard __PROTO((const char[])); #endif /* USE_MOUSE */ TERM_PUBLIC int GGI_make_palette __PROTO((t_sm_palette*)); TERM_PUBLIC void GGI_previous_palette __PROTO((void)); TERM_PUBLIC void GGI_set_color __PROTO((struct t_colorspec *colorspec)); #ifdef ENABLE_XMI TERM_PUBLIC void GGI_filled_polygon __PROTO((int, gpiPoint*)); #endif #define GOT_GGI_PROTO #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #define GGI_XMAX 800 #define GGI_YMAX 600 #define GGI_VCHAR 8 #define GGI_HCHAR 8 #define GGI_VTIC 8 #define GGI_HTIC 8 #ifdef USE_MOUSE static GGI_vertex_t GGI_zoom[2][2]; static GGI_vertex_t GGI_stl_vertex; static GGI_point_t GGI_ruler = {-1, -1}; static GGI_point_t GGI_zoombox[2] = {{-1, -1}, {-1, -1}}; static struct timeval GGI_timestamp; static int GGI_mouse_x = 0; static int GGI_mouse_y = 0; static int GGI_modifiers = 0; static int GGI_use_mouse = 1; /* mouse is on by default */ static unsigned int GGIcanvas_height = 0; static int GGI_font_width = 0; static int GGI_font_height = 0; static int GGI_saved_canvas = 0; static int GGI_saved_stl = 0; static int GGI_needs_update = 1; #endif static t_sm_palette GGI_save_pal = { -1, -1, -1, -1, -1, -1, -1, -1, (rgb_color*) 0, -1, -1 }; /* First to some global variables * * GGIvisual is our 'piece of paper.' * GGIborderColor and axixColor have the obvious meanings. * GGIcolors are the colors for linestyles 0 and up. * GGImap is for initializing colors. * GGIx,GGIy are the current coordinates. * GGIwidth, GGIheight are the extensions in the visual. * GGIymax = term->ymax */ static ggi_visual_t GGIvisual = (ggi_visual_t)0; static ggi_pixel GGIborderColor; static ggi_pixel GGIaxisColor; static ggi_pixel GGIblack; static ggi_pixel GGIcolors[7]; #define GGI_PM3D_COLORS 240 static const int ggi_pm3d_colors = GGI_PM3D_COLORS; static ggi_pixel GGI_smooth_colors[GGI_PM3D_COLORS]; static unsigned int GGIx,GGIy; static unsigned int GGIwidth, GGIheight, GGIymax; #if 0 static unsigned int Xenv; #endif static int GGI_frames = #ifdef USE_MOUSE 2 #else 1 #endif ; #ifdef ENABLE_XMI static miGC* GGI_miGC = (miGC*)0; static miPaintedSet* GGI_miPaintedSet = (miPaintedSet*)0; static miPixel GGI_miPixels[2]; /* only GGI_miPixels[1] is used */ static int GGI_numblendstages = 0; static miBlendStage GGI_blendstages[4]; #endif static TBOOLEAN GGI_mode_changed = 1; static char GGI_mode_spec[0xff] = ""; static int GGI_acceleration = 7; /* arbitrary */ enum GGI_id { GGI_MODE, GGI_ACCELERATION, GGI_OTHER }; static struct gen_table GGI_opts[] = { { "mo$de", GGI_MODE }, { "ac$celeration", GGI_ACCELERATION }, { NULL, GGI_OTHER } }; static void GGI_line_colors() { ggi_pixel GGIwhite,GGIred,GGIgreen,GGIblue,GGIcyan,GGImagenta,GGIgray; ggi_pixel GGIyellow; ggi_color color; color.r = 0xFFFF; color.g = 0xFFFF; color.b = 0xFFFF; GGIwhite = ggiMapColor(GGIvisual,&color); color.r = 0x0000; color.g = 0x0000; color.b = 0x0000; GGIblack = ggiMapColor(GGIvisual,&color); color.r = 0xFFFF; color.g = 0x0000; color.b = 0x0000; GGIred = ggiMapColor(GGIvisual,&color); color.r = 0x0000; color.g = 0xFFFF; color.b = 0x0000; GGIgreen = ggiMapColor(GGIvisual,&color); color.r = 0x0000; color.g = 0x0000; color.b = 0xFFFF; GGIblue = ggiMapColor(GGIvisual,&color); color.r = 0x0000; color.g = 0xFFFF; color.b = 0xFFFF; GGIcyan = ggiMapColor(GGIvisual,&color); color.r = 0xFFFF; color.g = 0x0000; color.b = 0xFFFF; GGImagenta = ggiMapColor(GGIvisual,&color); color.r = 0xFFFF; color.g = 0xFFFF; color.b = 0x0000; GGIyellow = ggiMapColor(GGIvisual,&color); color.r = 0x8888; color.g = 0x8888; color.b = 0x8888; GGIgray = ggiMapColor(GGIvisual,&color); GGIborderColor = GGIwhite; GGIaxisColor = GGIgray; GGIcolors[0] = GGIred; GGIcolors[1] = GGIgreen; GGIcolors[2] = GGIblue; GGIcolors[3] = GGImagenta; GGIcolors[4] = GGIcyan; GGIcolors[5] = GGIyellow; GGIcolors[6] = GGIgray; } /* Called bevore a graphic is displayed */ TERM_PUBLIC void GGI_graphics() { #ifdef USE_MOUSE int i, j; int display_frame = ggiGetDisplayFrame(GGIvisual); #endif #if 0 if(!Xenv) { GGI_line_colors(); return; } #endif ggiSetGCForeground(GGIvisual,GGIblack); #ifdef USE_MOUSE /* write to the currently not displayed buffer */ ggiSetWriteFrame(GGIvisual, !display_frame); /* mark the contents of the alternate frame as invalid */ GGI_saved_canvas = 0; GGI_saved_stl = 0; GGI_needs_update = 1; /* reset the stl vertex */ GGI_stl_vertex.width = 0; /* reset the zoom box coordinates */ for (i = 0; i < 2; i++) { for (j = 0; j < 2; j++) { GGI_zoom[i][j].width = 0; } GGI_zoombox[i].x = -1; GGI_zoombox[i].y = -1; } #endif /* USE_MOUSE */ /* clear *write* buffer. */ ggiDrawBox(GGIvisual, 0, 0, GGIwidth, GGIheight); #ifdef USE_MOUSE if (GGI_use_mouse) { /* copy the contents of the currently * displayed stl to the write frame. * This way the stl won't jitter. */ ggiSetReadFrame(GGIvisual, display_frame); ggiCopyBox(GGIvisual, 0, GGIcanvas_height, GGIwidth, GGI_font_height, 0, GGIcanvas_height); } #endif } TERM_PUBLIC void GGI_set_size() { ggi_mode mode; ggiGetMode(GGIvisual,&mode); GGIwidth = mode.virt.x; GGIheight = mode.virt.y; term->xmax = mode.virt.x - 1; #ifdef USE_MOUSE GGIcanvas_height = mode.virt.y - (GGI_use_mouse ? GGI_font_height : 0); term->ymax = GGIcanvas_height - 1; #else term->ymax = mode.virt.y - 1; #endif GGIymax = term->ymax; } /* * init * ----------------------- * Called only once, when the terminal is initialized. We have to open the visual here because it * is during 'init' that we have to change the terminal dimensions (xmax, ymax). */ TERM_PUBLIC void GGI_init() { int success = 0; ggi_mode mode; #if 0 if (0 != giiInit()) { ggiPanic("*** giiInit() failed *** \n"); } #endif if (0 != ggiInit()) { ggiPanic("*** ggiInit() failed *** \n"); } if (NULL == (GGIvisual = ggiOpen(NULL))) { /* TODO: abort a bit more gracefully */ ggiPanic("(GGI_init() unable to open default\n"); } if (strlen(GGI_mode_spec)) { /* user specified mode */ if (!ggiParseMode(GGI_mode_spec, &mode)) { mode.frames = GGI_frames; if (!ggiSetMode(GGIvisual, &mode)) { success = 1; } } } if (!success) { /* try the default mode */ if(ggiSetSimpleMode(GGIvisual,GGI_AUTO,GGI_AUTO,GGI_frames,GT_AUTO)) { ggiPanic("(GGI_init() unable to set default mode\n"); GGIvisual = (ggi_visual_t)0; } } ggiGetMode(GGIvisual, &mode); /* print the mode only once if it has changed */ if (GGI_mode_changed) { GGI_mode_changed = 0; ggiFPrintMode(stderr, &mode); fprintf(stderr, "\n"); } #ifdef USE_MOUSE /* must come before GGI_set_size() */ ggiGetCharSize(GGIvisual, &GGI_font_width, &GGI_font_height); #endif GGI_set_size(); #ifdef USE_MOUSE ggiSetReadFrame(GGIvisual, 0); ggiSetWriteFrame(GGIvisual, 0); ggiSetDisplayFrame(GGIvisual, 0); #endif #ifdef HAVE_GGI_WMH_H /* Initialize WMH extension */ if (ggiWmhInit() != 0 || ggiWmhAttach(GGIvisual) < 0) { GGI_use_whm = 0; } else { GGI_use_whm = 1; ggiWmhAllowResize(GGIvisual, 100, 50, 2000, 2000, 10, 10); ggiWmhSetTitle(GGIvisual, "GGI Gnuplot Driver"); ggiWmhSetIconTitle(GGIvisual, "Gnuplot"); } #endif /* * if(!(Xenv=!ggiWmhAttach(GGIvisual))) ggiWmhDetach(GGIvisual); * else Xenv=!ggiWmhSetTitle(GGIvisual,"GGI Gnuplot Driver"); */ #if 0 if(!Xenv) { /* * ggiWmhDetach(GGIvisual); * ggiWmhExit(); */ ggiClose(GGIvisual); ggiExit(); GGIvisual=NULL; } #endif GGI_line_colors(); ggiSetFlags(GGIvisual, GGIFLAG_ASYNC); #ifdef USE_MOUSE GGI_mouse_x = 0; GGI_mouse_y = 0; GGI_modifiers = 0; { struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz); GGI_SetTime(&tv); /* initialize time */ } #endif #ifdef ENABLE_XMI if (0 != xmiInit()) { /* TODO: abort a bit more gracefully */ ggiPanic("(GGI_init() unable to initialize xmi\n"); } if (xmiAttach(GGIvisual) < 0) { ggiPanic("(GGI_init) Unable to attach XMI extension to visual\n"); } /* miPaintedSet */ if (GGI_miPaintedSet) { miDeletePaintedSet(GGIvisual, GGI_miPaintedSet); GGI_miPaintedSet = (miPaintedSet*)0; } GGI_miPaintedSet = miNewPaintedSet(GGIvisual); miClearPaintedSet(GGIvisual, GGI_miPaintedSet); /* miGC */ if (GGI_miGC) { miDeleteGC(GGIvisual, GGI_miGC); GGI_miGC = (miGC*)0; } GGI_miGC = miNewGC(GGIvisual, 2, GGI_miPixels, GGI_numblendstages, GGI_blendstages); #endif setvbuf(stdin, (char*)0, _IONBF, 0); } TERM_PUBLIC void GGI_linetype(int linetype) { if(linetype == LT_BLACK) ggiSetGCForeground(GGIvisual,GGIborderColor); if(linetype == LT_AXIS) ggiSetGCForeground(GGIvisual,GGIaxisColor); if(linetype < 0) return; if(linetype >= 6) linetype%=6; ggiSetGCForeground(GGIvisual,GGIcolors[linetype]); } TERM_PUBLIC void GGI_move(unsigned int x, unsigned int y) { GGIx=x; GGIy=GGI_y(y); } TERM_PUBLIC void GGI_options() { while (!END_OF_COMMAND) { switch(lookup_table(&GGI_opts[0], c_token)) { case GGI_ACCELERATION: { int itmp; struct value a; c_token++; itmp = (int) real(const_express(&a)); if (itmp < 1) { fprintf(stderr, "acceleration must be strictly positive!\n"); } else { GGI_acceleration = itmp; } break; } case GGI_MODE: c_token++; /* fallthru */ default: if (!END_OF_COMMAND) { copy_str(GGI_mode_spec, c_token, 0xfe); GGI_mode_changed = 1; } break; } c_token++; } /* while(command) */ if (*GGI_mode_spec) { sprintf(term_options, "mode %s acceleration %d", GGI_mode_spec, GGI_acceleration); } else { sprintf(term_options, "acceleration %d", GGI_acceleration); } } TERM_PUBLIC void GGI_close() { ggiFlush(GGIvisual); /* DETACH EXTENSIONS */ #if HAVE_WMH_H if(GGI_use_whm) { ggiWmhDetach(GGIvisual); } #endif #ifdef ENABLE_XMI xmiDetach(GGIvisual); #endif ggiClose(GGIvisual); GGIvisual = (ggi_visual_t)0; /* EXIT EXTENSIONS */ #if HAVE_WMH_H if(GGI_use_whm) { ggiWmhExit(); GGI_use_whm = 0; } #endif #ifdef ENABLE_XMI xmiExit(); #endif } /* Called when terminal is terminated i.e. * when switching to another terminal. */ TERM_PUBLIC void GGI_reset() { if(GGIvisual!=NULL) { GGI_close(); } # if 0 /* not needed */ GGI_save_pal.colorFormulae = -1; /* force later reallocation of palette */ # endif } TERM_PUBLIC void GGI_put_text(unsigned int x, unsigned int y, const char *str) { ggi_pixel current_foreground; ggiGetGCForeground(GGIvisual,¤t_foreground); ggiSetGCForeground(GGIvisual,GGIborderColor); ggiPuts(GGIvisual,x,GGI_y(y) - 4 /* ? (joze ? */,str); ggiSetGCForeground(GGIvisual,current_foreground); } TERM_PUBLIC void GGI_suspend() { /* this fails on the console */ GGI_text(); } TERM_PUBLIC void GGI_resume() { /* do nothing */ } TERM_PUBLIC void GGI_fillbox( int style, unsigned int x, unsigned int y, unsigned int w, unsigned int h) { ggiDrawBox(GGIvisual, x, GGI_y((int)(y+h)), w, h); } TERM_PUBLIC void GGI_text() { ggiFlush(GGIvisual); #ifdef USE_MOUSE /* now display the buffer which was just written */ ggiSetDisplayFrame(GGIvisual, ggiGetWriteFrame(GGIvisual)); return; #else /* Wait for a key to be pressed and exit graphics mode if * running in console mode. */ /* TODO: return immediately, if in X */ ggiGetc(GGIvisual); GGI_close(); #endif } TERM_PUBLIC void GGI_vector(unsigned int x, unsigned int y) { y = GGI_y(y); ggiDrawLine(GGIvisual,GGIx,GGIy,x,y); GGIx=x; GGIy=y; } #ifdef USE_MOUSE /* translate ggi keysym to gnuplot keysym */ TERM_PUBLIC int GGI_from_keysym(uint32_t keysym) { switch (keysym) { case GIIUC_BackSpace: return GP_BackSpace; case GIIUC_Tab: return GP_Tab; case GIIUC_Linefeed: return GP_Linefeed; case GIIK_Clear: return GP_Clear; case GIIUC_Return: return GP_Return; case GIIK_Pause: return GP_Pause; case GIIK_ScrollLock: return GP_Scroll_Lock; case GIIK_SysRq: return GP_Sys_Req; case GIIUC_Escape: return GP_Escape; case GIIK_Insert: return GP_Insert; case GIIUC_Delete: return GP_Delete; case GIIK_Home: return GP_Home; case GIIK_Left: return GP_Left; case GIIK_Up: return GP_Up; case GIIK_Right: return GP_Right; case GIIK_Down: return GP_Down; case GIIK_PageUp: return GP_PageUp; case GIIK_PageDown: return GP_PageDown; case GIIK_End: return GP_End; case GIIK_Begin: return GP_Begin; case GIIK_PSpace: return GP_KP_Space; case GIIK_PTab: return GP_KP_Tab; case GIIK_PEnter: return GP_KP_Enter; case GIIK_PF1: return GP_KP_F1; case GIIK_PF2: return GP_KP_F2; case GIIK_PF3: return GP_KP_F3; case GIIK_PF4: return GP_KP_F4; #if 0 case 1: return GP_KP_Insert; /* ~ KP_0 */ case 1: return GP_KP_End; /* ~ KP_1 */ case 1: return GP_KP_Down; /* ~ KP_2 */ case 1: return GP_KP_Page_Down; /* ~ KP_3 */ case 1: return GP_KP_Left; /* ~ KP_4 */ case 1: return GP_KP_Begin; /* ~ KP_5 */ case 1: return GP_KP_Right; /* ~ KP_6 */ case 1: return GP_KP_Home; /* ~ KP_7 */ case 1: return GP_KP_Up; /* ~ KP_8 */ case 1: return GP_KP_Page_Up; /* ~ KP_9 */ #endif #if 0 case GIIK_PDelete: return GP_KP_Delete; #endif case GIIK_PEqual: return GP_KP_Equal; case GIIK_PAsterisk: return GP_KP_Multiply; case GIIK_PPlus: return GP_KP_Add; case GIIK_PSeparator: return GP_KP_Separator; case GIIK_PMinus: return GP_KP_Subtract; case GIIK_PDecimal: return GP_KP_Decimal; case GIIK_PSlash: return GP_KP_Divide; case GIIK_P0: return GP_KP_0; case GIIK_P1: return GP_KP_1; case GIIK_P2: return GP_KP_2; case GIIK_P3: return GP_KP_3; case GIIK_P4: return GP_KP_4; case GIIK_P5: return GP_KP_5; case GIIK_P6: return GP_KP_6; case GIIK_P7: return GP_KP_7; case GIIK_P8: return GP_KP_8; case GIIK_P9: return GP_KP_9; case GIIK_F1: return GP_F1; case GIIK_F2: return GP_F2; case GIIK_F3: return GP_F3; case GIIK_F4: return GP_F4; case GIIK_F5: return GP_F5; case GIIK_F6: return GP_F6; case GIIK_F7: return GP_F7; case GIIK_F8: return GP_F8; case GIIK_F9: return GP_F9; case GIIK_F10: return GP_F10; case GIIK_F11: return GP_F11; case GIIK_F12: return GP_F12; default: /* return it untranslated */ return keysym; } } TERM_PUBLIC long int GGI_SetTime(const struct timeval* current) { /* --> dsec in musec */ int dsec = (current->tv_sec - GGI_timestamp.tv_sec) * 1000000; /* --> dmu in millisec */ int dmu = (current->tv_usec - GGI_timestamp.tv_usec + dsec) / 1000; GGI_timestamp = *current; return dmu; } TERM_PUBLIC int GGI_from_button(uint32_t button) { switch (button) { case GII_PBUTTON_LEFT: return 1; case GII_PBUTTON_MIDDLE: return 2; case GII_PBUTTON_RIGHT: return 3; default: /* should not happen */ return 0; } } TERM_PUBLIC int GGI_y(int32_t y) { return GGIymax - y; } TERM_PUBLIC int GGI_eventually_update_modifiers(const ggi_event* event, const int add) { int mod = 0; int old_modifiers = GGI_modifiers; switch (event->key.sym) { case GIIK_Shift: mod = Mod_Shift; break; case GIIK_Ctrl: mod = Mod_Ctrl; break; case GIIK_Alt: case GIIK_Meta: mod = Mod_Alt; break; default: return 0; } if (add) { GGI_modifiers |= mod; } else { GGI_modifiers &= ~mod; } if (GGI_modifiers != old_modifiers) { struct gp_event_t gp_ev; gp_ev.type = GE_modifier; gp_ev.mx = GGI_mouse_x; gp_ev.my = GGI_y(GGI_mouse_y); gp_ev.par1 = 0; gp_ev.par2 = 0; gp_ev.par1 = GGI_modifiers; do_event(&gp_ev); } return 1; } TERM_PUBLIC int GGI_dispatch_event(const ggi_event* event) { struct gp_event_t gp_ev; gp_ev.type = 0; gp_ev.mx = GGI_mouse_x; gp_ev.my = GGI_y(GGI_mouse_y); gp_ev.par1 = 0; gp_ev.par2 = 0; switch (event->any.type) { /* [-- KEY EVENTS --] */ case evKeyPress: case evKeyRepeat: if (GGI_eventually_update_modifiers(event, 1)) { /* was just a modifier pressed */ return 0; } gp_ev.type = GE_keypress; gp_ev.par1 = GGI_from_keysym(event->key.sym); if ('q' == gp_ev.par1) { return 'q'; } break; case evKeyRelease: if (GGI_eventually_update_modifiers(event, 0)) { /* was just a modifier pressed */ return 0; } break; /* [-- POINTER EVENTS --] */ case evPtrRelative: /* relative motion is not implemented. Should it ? */ /* * fprintf(stderr, "%s:%d report this to <johannes@zellner.org> %d %d\n", * __FILE__, __LINE__, event->pmove.x, event->pmove.y); */ gp_ev.type = GE_motion; GGI_mouse_x += GGI_acceleration * event->pmove.x; GGI_mouse_y += GGI_acceleration * event->pmove.y; break; case evPtrAbsolute: gp_ev.type = GE_motion; GGI_mouse_x = event->pmove.x; GGI_mouse_y = event->pmove.y; break; case evPtrButtonPress: gp_ev.type = GE_buttonpress; gp_ev.par1 = GGI_from_button(event->pbutton.button); break; case evPtrButtonRelease: gp_ev.type = GE_buttonrelease; gp_ev.par1 = GGI_from_button(event->pbutton.button); gp_ev.par2 = GGI_SetTime(&(event->pbutton.time)); break; #ifdef HAVE_GGI_WMH_H case evCommand: /* [-- resizing --] */ if (GGI_use_whm) { /* fprintf(stderr, "(GGI_dispatch_event) \n"); */ if (event->cmd.code==GGICMD_REQUEST_SWITCH) { /* * ggi_cmddata_switchrequest *req; * req = &(event->cmd.data); * ggi_resize(GGIvisual, &(req->mode)); */ /* * while( ggiEventPoll(GGIvisual, emAll, &tv) ) { * ggiEventRead(GGIvisual, event, emAll); * } */ } } break; #endif default: /* fprintf(stderr, "(GGI_dispatch_event) unhandled event\n"); */ break; } do_event(&gp_ev); gp_ev.type = GE_plotdone; do_event(&gp_ev); return 0; } /* save currently displayed frame to alternate buffer */ TERM_PUBLIC void GGI_save_frame_canvas() { if (!GGI_saved_canvas && GGIvisual) { int display_frame = ggiGetDisplayFrame(GGIvisual); /* save the currently displayed frame to alternate frame */ ggiSetReadFrame(GGIvisual, display_frame); ggiSetWriteFrame(GGIvisual, !display_frame); ggiCopyBox(GGIvisual, 0, 0, GGIwidth, GGIcanvas_height, 0, 0); /* write again directly to the display frame */ ggiSetWriteFrame(GGIvisual, display_frame); /* remember that the alternate frame is valid */ GGI_saved_canvas = 1; } } TERM_PUBLIC void GGI_save_frame_stl() { if (!GGI_saved_stl) { int display_frame = ggiGetDisplayFrame(GGIvisual); /* clear the stl part of the alternate buffer */ ggiSetGCForeground(GGIvisual, GGIblack); ggiSetWriteFrame(GGIvisual, !display_frame); ggiDrawBox(GGIvisual, 0, GGIcanvas_height, GGIwidth, GGI_font_height); ggiSetWriteFrame(GGIvisual, display_frame); /* clear the currently displayed area, which is left * from a previous plot (see above, where the stl of * the previous plot is copied to the current frame) */ ggiSetReadFrame(GGIvisual, !display_frame); ggiCopyBox(GGIvisual, 0, GGIcanvas_height, GGIwidth, GGI_font_height, 0, GGIcanvas_height); GGI_saved_stl = 1; } } TERM_PUBLIC void GGI_replot() { struct gp_event_t ev = { GE_replot, 0, 0, 0, 0 }; do_event(&ev); } TERM_PUBLIC void GGI_clear(const GGI_vertex_t* v, const int tag) { if (tag && v->width) { /* turn off current */ ggiSetReadFrame(GGIvisual, !ggiGetDisplayFrame(GGIvisual)); ggiCopyBox(GGIvisual, v->x, v->y, v->width, v->height, v->x, v->y); } } TERM_PUBLIC void GGI_save_puts(GGI_vertex_t* v, const int tag) { GGI_clear(v, tag); if (v->width) { /* draw the text in the axis color (gray) */ ggiSetGCForeground(GGIvisual, GGIaxisColor); /* write the string directly to the display */ ggiPuts(GGIvisual, v->x, v->y, v->str); } } TERM_PUBLIC void GGI_set_vertex( GGI_vertex_t* v, const int x, const int y, const char* str, const int tag) { GGI_clear(v, tag); v->x = x; v->y = y; v->height = GGI_font_height; if (str && *str) { v->width = strlen(str) * GGI_font_width; strcpy(v->str, str); } else { /* turn string off */ v->width = 0; *(v->str) = '\0'; } } TERM_PUBLIC void GGI_relative(int r[2]) { int diff = r[1] - r[0]; if (diff < 0) { r[0] = r[1]; r[1] = -diff; } else { r[1] = diff; } } TERM_PUBLIC void GGI_clear_hline(int x1, int x2, int y) { if (GGI_saved_canvas && x1 >= 0 && x2 >= 0 && y >= 0) { int r[2]; ggiSetReadFrame(GGIvisual, !ggiGetDisplayFrame(GGIvisual)); r[0] = x1; r[1] = x2; GGI_relative(r); /* horizontal line */ ggiCopyBox(GGIvisual, r[0], y, r[1], 1, r[0], y); } } TERM_PUBLIC void GGI_clear_vline(int y1, int y2, int x) { if (GGI_saved_canvas && y1 >= 0 && y2 >= 0 && x >= 0) { int r[2]; ggiSetReadFrame(GGIvisual, !ggiGetDisplayFrame(GGIvisual)); r[0] = y1; r[1] = y2; GGI_relative(r); /* vertical line */ ggiCopyBox(GGIvisual, x, r[0], 1, r[1], x, r[0]); } } TERM_PUBLIC void GGI_draw_hline(int x1, int x2, int y) { if (x1 >= 0 && x2 >= 0 && y >= 0) { int r[2]; r[0] = x1; r[1] = x2; GGI_relative(r); /* horizontal line */ ggiDrawHLine(GGIvisual, r[0], y, r[1]); } } TERM_PUBLIC void GGI_draw_vline(int y1, int y2, int x) { if (y1 >= 0 && y2 >= 0 && x >= 0) { int r[2]; r[0] = y1; r[1] = y2; GGI_relative(r); /* vertical line */ ggiDrawVLine(GGIvisual, x, r[0], r[1]); } } TERM_PUBLIC void GGI_draw_ruler() { if (GGI_ruler.x >= 0 && GGI_ruler.y >= 0) { ggi_pixel current_foreground; GGI_save_frame_canvas(); /* TODO: we could choose a nicer color here */ ggiGetGCForeground(GGIvisual, ¤t_foreground); ggiSetGCForeground(GGIvisual, GGIaxisColor); ggiDrawHLine(GGIvisual, 0, GGI_ruler.y, GGIwidth); ggiDrawVLine(GGIvisual, GGI_ruler.x, 0, GGIcanvas_height); /* restore old foreground color */ /* XXX need this ? */ ggiSetGCForeground(GGIvisual, current_foreground); } } TERM_PUBLIC void GGI_clear_zoombox() { GGI_clear_hline(GGI_zoombox[0].x, GGI_zoombox[1].x, GGI_zoombox[0].y); GGI_clear_hline(GGI_zoombox[0].x, GGI_zoombox[1].x, GGI_zoombox[1].y); GGI_clear_vline(GGI_zoombox[0].y, GGI_zoombox[1].y, GGI_zoombox[0].x); GGI_clear_vline(GGI_zoombox[0].y, GGI_zoombox[1].y, GGI_zoombox[1].x); } TERM_PUBLIC void GGI_draw_zoombox() { if (GGI_zoombox[0].x >= 0 && GGI_zoombox[0].y >= 0 && GGI_zoombox[0].x >= 0 && GGI_zoombox[0].y >= 0) { ggi_pixel current_foreground; GGI_save_frame_canvas(); /* TODO: we could choose a nicer color here */ ggiGetGCForeground(GGIvisual, ¤t_foreground); ggiSetGCForeground(GGIvisual, GGIaxisColor); GGI_draw_hline(GGI_zoombox[0].x, GGI_zoombox[1].x, GGI_zoombox[0].y); GGI_draw_hline(GGI_zoombox[0].x, GGI_zoombox[1].x, GGI_zoombox[1].y); GGI_draw_vline(GGI_zoombox[0].y, GGI_zoombox[1].y, GGI_zoombox[0].x); GGI_draw_vline(GGI_zoombox[0].y, GGI_zoombox[1].y, GGI_zoombox[1].x); /* restore old foreground color */ /* XXX need this ? */ ggiSetGCForeground(GGIvisual, current_foreground); } } TERM_PUBLIC void GGI_abort_zooming() { /* empty string: finish zooming */ int i, j; GGI_clear_zoombox(); for (i = 0; i < 2; i++) { for (j = 0; j < 2; j++) { GGI_set_vertex(&(GGI_zoom[i][j]), 0, 0, (char*)0, GGI_saved_canvas); } GGI_zoombox[i].x = -1; } } TERM_PUBLIC int GGI_waitforinput() { char c; /* XXX: if the input device it not a tty (e.g. /dev/null) * mouse events are not processed. This is necessary * as on some systems /dev/null is not selectable. */ if (GGIvisual) { fd_set fds; int fd = fileno(stdin); int i, j; do { int n; ggi_event_mask mask = emAll; /* TODO: choose a more selective mask */ ggiSetEventMask(GGIvisual, mask); FD_ZERO(&fds); FD_SET(fd, &fds); /* listen to stdin */ if (GGI_needs_update) { /* draw the ruler below the other items */ GGI_draw_ruler(); /* update the zoombox */ GGI_draw_zoombox(); for (i = 0; i < 2; i++) { for (j = 0; j < 2; j++) { GGI_save_puts(&(GGI_zoom[i][j]), GGI_saved_canvas); } } /* update the status line */ GGI_save_puts(&GGI_stl_vertex, GGI_saved_stl); ggiFlush(GGIvisual); GGI_needs_update = 0; } n = ggiEventSelect(GGIvisual, &mask, fd + 1, SELECT_TYPE_ARG234 &fds, 0, 0, (struct timeval*)0); if (mask) { ggi_event event; /* mask pointer motions and key repeat events, * to they don't pile up */ ggiEventRead(GGIvisual, &event, mask); ggiRemoveEventMask(GGIvisual, emPtrMove | emKeyRepeat); if ('q' == GGI_dispatch_event(&event)) { term_reset(); break; } else { ggiAddEventMask(GGIvisual, emPtrMove | emKeyRepeat); } } } while (!FD_ISSET(fd, &fds) && GGIvisual); } if (read(0, &c, 1)!=1) return EOF; else return c; } TERM_PUBLIC void GGI_put_tmptext(int i, const char str[]) { char* second; switch (i) { case 0: /* statusline text */ if (!str || !(*str)) { /* statusline is empty. This is the case, * if the mouse was just turned off. */ if (GGI_use_mouse) { /* The user just toggled of the mouse. */ GGI_use_mouse = 0; GGI_set_size(); GGI_replot(); } } else { /* statusline is non-empty */ if (!GGI_use_mouse) { /* The mouse was off before and was just turned on. */ GGI_use_mouse = 1; GGI_set_size(); GGI_replot(); } GGI_save_frame_stl(); GGI_set_vertex(&GGI_stl_vertex, 0, GGIcanvas_height, str, GGI_saved_stl); } break; case 1: /* coordinate text for first corner of zoombox */ case 2: /* coordinate text for second corner of zoombox */ GGI_save_frame_canvas(); second = (char*) strchr(str, '\r'); --i; /* transform to [0, 1] */ GGI_clear_zoombox(); if (second == NULL) { /* remove box and / or coordinates */ GGI_set_vertex(&(GGI_zoom[i][0]), 0, 0, (char*)0, GGI_saved_canvas); GGI_set_vertex(&(GGI_zoom[i][1]), 0, 0, (char*)0, GGI_saved_canvas); break; } else { *second = '\0'; /* XXX this assumes that str is writable XXX */ second++; GGI_set_vertex(&(GGI_zoom[i][0]), GGI_mouse_x, GGI_mouse_y - GGI_font_height - 1, str, GGI_saved_canvas); GGI_set_vertex(&(GGI_zoom[i][1]), GGI_mouse_x, GGI_mouse_y + 1, second, GGI_saved_canvas); GGI_zoombox[i].x = GGI_mouse_x; GGI_zoombox[i].y = GGI_mouse_y; } break; } GGI_needs_update++; } TERM_PUBLIC void GGI_set_ruler(int x, int y) { if (x < 0) { /* turn ruler off */ GGI_clear_hline(0, GGIwidth, GGI_ruler.y); GGI_clear_vline(0, GGIcanvas_height, GGI_ruler.x); GGI_ruler.x = -1; GGI_ruler.y = -1; } else { GGI_ruler.x = x; GGI_ruler.y = GGI_y(y); } GGI_needs_update++; } TERM_PUBLIC void GGI_set_cursor(int c, int x, int y) { /* TODO */ switch (c) { case 0: GGI_abort_zooming(); break; case 1: case 2: case 3: default: /* XXX not implemented */ break; } GGI_needs_update++; } TERM_PUBLIC void GGI_set_clipboard(const char s[]) { /* XXX: not implemented */ (void) s; /* avoid -Wunused */ } #endif TERM_PUBLIC int GGI_make_palette(t_sm_palette *palette) { /* reallocate only, if it has changed */ if (palette && (GGI_save_pal.colorFormulae < 0 || palette->colorFormulae != GGI_save_pal.colorFormulae || palette->colorMode != GGI_save_pal.colorMode || palette->formulaR != GGI_save_pal.formulaR || palette->formulaG != GGI_save_pal.formulaG || palette->formulaB != GGI_save_pal.formulaB || palette->positive != GGI_save_pal.positive)) { int i; ggi_color color; for (i = 0; i < ggi_pm3d_colors; i++) { color.r = (short)floor(palette->color[i].r * 0xffff), color.g = (short)floor(palette->color[i].g * 0xffff), color.b = (short)floor(palette->color[i].b * 0xffff), GGI_smooth_colors[i] = ggiMapColor(GGIvisual, &color); } GGI_save_pal = *palette; } else { return ggi_pm3d_colors; } return 0; } TERM_PUBLIC void GGI_previous_palette() { #if 0 #ifdef ENABLE_XMI fprintf(stderr, "(GGI_previous_palette) \n"); if (GGI_miPaintedSet) { miPoint offset; offset.x = 0; offset.y = 0; miCopyPaintedSetToVisual(GGIvisual, GGI_miGC, GGI_miPaintedSet, offset); miClearPaintedSet(GGIvisual, GGI_miPaintedSet); } #endif #endif } TERM_PUBLIC void GGI_set_color(struct t_colorspec *colorspec) { ggi_color rgb; double gray = colorspec->value; if (colorspec->type == TC_RGB) { rgb.r = ((colorspec->lt >> 16) & 0xff) * (65535./255.); rgb.g = ((colorspec->lt >> 8) & 0xff) * (65535./255.); rgb.b = ((colorspec->lt) & 0xff) * (65535./255.); ggiSetGCForeground(GGIvisual, ggiMapColor(GGIvisual,&rgb)); } if (colorspec->type != TC_FRAC) return; if (GGIvisual) { int idx = (gray <= 0) ? 0 : (int)(gray * ggi_pm3d_colors); if (idx >= ggi_pm3d_colors) idx = ggi_pm3d_colors - 1; ggiSetGCForeground(GGIvisual, GGI_smooth_colors[idx]); #ifdef ENABLE_XMI GGI_miGC->pixels[1] = GGI_smooth_colors[idx]; #endif } } #ifdef ENABLE_XMI TERM_PUBLIC void GGI_filled_polygon(int points, gpiPoint *corners) { static miPoint offset = {0, 0}; if (GGI_miPaintedSet) { #define MI_POINTS 4 miPoint mi_corners[MI_POINTS]; unsigned int i; if (MI_POINTS != points) { fprintf(stderr, "(GGI_filled_polygon) internal error %s:%d\n", __FILE__, __LINE__); return; } for (i = 0; i < MI_POINTS; i++) { mi_corners[i].x = corners[i].x; mi_corners[i].y = GGI_y(corners[i].y); } miFillPolygon(GGIvisual, GGI_miPaintedSet, GGI_miGC, MI_SHAPE_GENERAL, MI_COORD_MODE_ORIGIN, MI_POINTS, mi_corners); miCopyPaintedSetToVisual(GGIvisual, GGI_miGC, GGI_miPaintedSet, offset); miClearPaintedSet(GGIvisual, GGI_miPaintedSet); } } #endif #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(ggi_driver) "ggi", "GGI target", GGI_XMAX, GGI_YMAX, GGI_VCHAR, GGI_HCHAR, GGI_VTIC, GGI_HTIC, GGI_options, GGI_init, GGI_reset, GGI_text, null_scale, GGI_graphics, GGI_move, GGI_vector, GGI_linetype, GGI_put_text, 0, /* angle */ 0, /* justify text */ 0, /* point */ 0, /* arrow */ 0, /* set_font */ 0, /* set_pointsize */ TERM_CAN_MULTIPLOT, GGI_suspend, GGI_resume, GGI_fillbox, 0 /* linewidth */ #ifdef USE_MOUSE , GGI_waitforinput, GGI_put_tmptext, GGI_set_ruler, GGI_set_cursor, GGI_set_clipboard #endif , GGI_make_palette, GGI_previous_palette, GGI_set_color, #ifdef ENABLE_XMI GGI_filled_polygon #else 0 /* GGI_filled_polygon */ #endif TERM_TABLE_END(ggi_driver) #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(ggi) "1 ggi", "?commands set terminal ggi", "?set terminal ggi", "?set term ggi", "?terminal ggi", "?term ggi", "?ggi", " The `ggi` driver can run on different targets as X or svgalib.", "", " Syntax:", " set terminal ggi [acceleration <integer>] [[mode] {mode}]", "", " In X the window cannot be resized using window manager handles, but the", " mode can be given with the mode option, e.g.:", " - V1024x768", " - V800x600", " - V640x480", " - V320x200", " Please refer to the ggi documentation for other modes. The 'mode' keyword", " is optional. It is recommended to select the target by environment variables", " as explained in the libggi manual page. To get DGA on X, you should for", " example", " bash> export GGI_DISPLAY=DGA", " csh> setenv GGI_DISPLAY DGA", "", " 'acceleration' is only used for targets which report relative pointer", " motion events (e.g. DGA) and is a strictly positive integer multiplication", " factor for the relative distances. The default for acceleration is 7.", "", " Examples:", " set term ggi acc 10", " set term ggi acc 1 mode V1024x768", " set term ggi V1024x768" END_HELP(ggi) #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/post.trm�������������������������������������������������������������������������0000644�0004711�0000144�00000442063�12063654170�012626� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs: this is -*-C-*- ! * $Id: post.trm,v 1.267.2.4 2012/12/17 05:31:28 sfeam Exp $ */ /* GNUPLOT - post.trm */ /*[ * Copyright 1990 - 1993, 1998, 1999, 2000, 2001, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This terminal driver supports: * postscript * * AUTHORS * Russell Lang <rjl@monu1.cc.monash.edu.au> * * modified 10/5/95 by drd - put in support for other postscript drivers * (enhpost, pslatex, ...) so they dont have to work quite so hard * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * * The 'postscript' driver produces landscape output 10" wide and 7" high. * To change font to Times-Roman and font size to 20pts use * 'set term postscript "Times-Roman" 20'. * To get a smaller (5" x 3.5") eps output use 'set term post eps' * and make only one plot per file. Font size for eps will be half * the specified size. * * Erik Luijten 30/5/97: added %%CreationDate, made %%DocumentFonts conform * to DSC, added version no. and patchl. to %%Creator * Petr Mikulik, Jan 1999: terminal entries for PM3D functionality * * Dick Crawford 24/5/00: added 'a{}{}' syntax to allow for overprinting * * Dan Sebald, 7 March 2003: terminal entry for image functionality * * Harald Harders (h.harders@tu-bs.de), 2004-12-02: * Moved all terminal settings into a single structure. * * Harald Harders (h.harders@tu-bs.de), 2005-02-08: * Merged functionality of postscript, pslatex, pstex, and epslatex terminals. * * Ethan Merritt Mar 2006: Break out prolog and character encodings into * separate files loaded at runtime * * Thomas Henlich Sep 2007: Add support for UTF-8 encoding via the glyphshow * operator. It supports PostScript Type1 fonts that use glyph names according * to the Adobe Glyph List For New Fonts. */ #include "driver.h" #ifdef TERM_PROTO #include "variable.h" /* For loadpath_handler used in PS_dump_prologue_file */ #endif #ifdef TERM_REGISTER register_term(post) #endif #ifdef TERM_PROTO TERM_PUBLIC void PS_options __PROTO((void)); TERM_PUBLIC void PS_common_init __PROTO((TBOOLEAN uses_fonts, unsigned int xoff, unsigned int yoff, unsigned int bb_xmin, unsigned int bb_ymin, unsigned int bb_xmax, unsigned int bb_ymax, const char **dict)); TERM_PUBLIC void PS_init __PROTO((void)); TERM_PUBLIC void PS_graphics __PROTO((void)); TERM_PUBLIC void PS_text __PROTO((void)); TERM_PUBLIC void PS_reset __PROTO((void)); TERM_PUBLIC void PS_linetype __PROTO((int linetype)); TERM_PUBLIC void PS_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void PS_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void PS_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int PS_text_angle __PROTO((int ang)); TERM_PUBLIC int PS_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void PS_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void PS_arrow __PROTO(( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); TERM_PUBLIC int PS_set_font __PROTO((const char * font)); TERM_PUBLIC void PS_fillbox __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); TERM_PUBLIC void PS_linewidth __PROTO((double linewidth)); /* JFi [linewidth] */ TERM_PUBLIC void PS_pointsize __PROTO((double ptsize)); /* JFi [pointsize] */ TERM_PUBLIC int PS_make_palette (t_sm_palette *); TERM_PUBLIC void PS_previous_palette (void); TERM_PUBLIC void PS_set_color (t_colorspec *); TERM_PUBLIC void PS_filled_polygon (int, gpiPoint *); TERM_PUBLIC void PS_image __PROTO((unsigned int, unsigned int, coordval *, gpiPoint *, t_imagecolor)); /* To support "set term post enhanced" */ TERM_PUBLIC void ENHPS_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int ENHPS_set_font __PROTO((const char * font)); TERM_PUBLIC void ENHPS_OPEN __PROTO((char * fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint)); TERM_PUBLIC void ENHPS_FLUSH __PROTO((void)); TERM_PUBLIC void ENHPS_WRITEC __PROTO((int c)); static void PS_RememberFont __PROTO((char *fname)); TERM_PUBLIC char *PS_escape_string __PROTO((char *origstr, char *escapelist)); TERM_PUBLIC void PS_path __PROTO((int p)); static TBOOLEAN PS_newpath = FALSE; static TBOOLEAN ENHps_opened_string = FALSE; /* try to cut out empty ()'s */ TERM_PUBLIC void PS_layer __PROTO((t_termlayer syncpoint)); #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include "post.h" #define PS_FLUSH_PATH do { \ if (ps_path_count) { \ fputs("stroke\n", gppsfile); \ ps_path_count = 0; \ PS_relative_ok = FALSE; \ } \ } while (0) /* Data structure implementing inclusion of font files */ struct ps_fontfile_def { struct ps_fontfile_def *next;/* pointer to next fontfile in linked list */ char *fontfile_name; char *fontfile_fullname; char *fontname; }; /* Terminal type of postscript dialect */ enum PS_TERMINALTYPE { PSTERM_PSTEX, PSTERM_PSLATEX, PSTERM_EPSLATEX, PSTERM_POSTSCRIPT }; enum PS_PSFORMAT { PSTERM_EPS, PSTERM_PORTRAIT, PSTERM_LANDSCAPE }; /* One struct that takes all terminal parameters * by Harald Harders <h.harders@tu-bs.de> */ typedef struct ps_params_t { enum PS_TERMINALTYPE terminal; int xoff; int yoff; enum PS_PSFORMAT psformat; TBOOLEAN level1; TBOOLEAN color; TBOOLEAN blacktext; TBOOLEAN solid; float dash_length; float linewidth_factor; TBOOLEAN duplex_option; /* one of duplex or simplex specified? */ TBOOLEAN duplex_state; TBOOLEAN rounded; /* rounded linecaps and linejoins */ TBOOLEAN clipped; /* path clipped to BoundingBox? */ struct ps_fontfile_def *first_fontfile; char font[MAX_ID_LEN+1]; /* name of font */ float fontsize; /* size of font in pts */ float fontscale; /* multiplier for nominal font size */ TBOOLEAN useauxfile; /* only necessary for ps(la)tex */ TBOOLEAN rotate; /* only necessary for ps(la)tex */ int palfunc_samples; /* setable via "palf$uncparam" */ double palfunc_deviation; /* terminal option */ TBOOLEAN oldstyle; TBOOLEAN epslatex_standalone; TBOOLEAN adobeglyphnames; /* Choice of output names for UTF8 */ rgb_color background; } ps_params_t; #define POST_PARAMS_DEFAULT { \ PSTERM_POSTSCRIPT, 50, 50, \ PSTERM_LANDSCAPE, FALSE, FALSE, FALSE, FALSE, 1.0, 1.0, FALSE, \ FALSE, FALSE, FALSE, NULL, "Helvetica", 14., 1., FALSE, FALSE, 2000, 0.003, \ FALSE, TRUE, FALSE, {-1.,-1.,-1.} \ } static ps_params_t post_params = POST_PARAMS_DEFAULT; static const ps_params_t post_params_default = POST_PARAMS_DEFAULT; #define EPSLATEX_PARAMS_DEFAULT { \ PSTERM_EPSLATEX, 50, 50, \ PSTERM_EPS, FALSE, FALSE, TRUE, FALSE, 1.0, 1.0, FALSE, \ FALSE, FALSE, FALSE, NULL, "", 11., 1., TRUE, FALSE, 2000, 0.003, \ FALSE, FALSE, FALSE, {-1.,-1.,-1.} \ } static ps_params_t epslatex_params = EPSLATEX_PARAMS_DEFAULT; static const ps_params_t epslatex_params_default = EPSLATEX_PARAMS_DEFAULT; #define PSLATEX_PARAMS_DEFAULT { \ PSTERM_PSLATEX, 0, 0, \ PSTERM_EPS, FALSE, FALSE, TRUE, FALSE, 1.0, 1.0, FALSE, \ FALSE, FALSE, FALSE, NULL, "", 0., 1., FALSE, TRUE, 2000, 0.003, \ FALSE, FALSE, FALSE, {-1.,-1.,-1.} \ } static ps_params_t pslatex_params = PSLATEX_PARAMS_DEFAULT; static const ps_params_t pslatex_params_default = PSLATEX_PARAMS_DEFAULT; #define PSTEX_PARAMS_DEFAULT { \ PSTERM_PSTEX, 0, 0, \ PSTERM_EPS, FALSE, FALSE, TRUE, FALSE, 1.0, 1.0, FALSE, \ FALSE, FALSE, FALSE, NULL, "", 0., 1., FALSE, TRUE, 2000, 0.003, \ FALSE, FALSE, FALSE, {-1.,-1.,-1.} \ } static ps_params_t pstex_params = PSTEX_PARAMS_DEFAULT; static const ps_params_t pstex_params_default = PSTEX_PARAMS_DEFAULT; static ps_params_t *ps_params = &post_params; static void make_interpolation_code __PROTO((void)); static void make_color_model_code __PROTO((void)); static char * save_space __PROTO((double gray)); static void write_component_array __PROTO((const char *text, gradient_struct *grad, int cnt, int offset)); static void write_gradient_definition __PROTO((gradient_struct *gradient, int cnt)); static void write_color_space __PROTO((t_sm_palette *palette)); static void make_palette_formulae __PROTO((void)); static void PS_make_header __PROTO((t_sm_palette *palette)); #ifndef GNUPLOT_PS_DIR static void PS_dump_header_to_file __PROTO((char *name)); #endif static float ps_fontsize; static float ps_fontsize_previous; /* for enhanced mode, we keep a separate font name and size, which * is restored to the default value on font of "" */ static char ps_enh_font[MAX_ID_LEN+1]; static float ps_enh_fontsize; static int ENHPS_initialized; static int ps_page = 0; /* page count */ static int ps_path_count = 0; /* count of lines in path */ static int ps_ang = 0; /* text angle */ static enum JUSTIFY ps_justify = LEFT; /* text is flush left */ static void delete_ps_fontfile __PROTO((struct ps_fontfile_def *, struct ps_fontfile_def *)); TERM_PUBLIC void PS_load_fontfile __PROTO((struct ps_fontfile_def *,TBOOLEAN)); TERM_PUBLIC void PS_load_fontfiles __PROTO((TBOOLEAN)); static TBOOLEAN ps_explicit_size = FALSE; static size_units ps_explicit_units = INCHES; static int eps_explicit_x = 0; static int eps_explicit_y = 0; #define DOTS_PER_INCH (300) /* resolution of printer we expect to use */ /* name of auxiliary file */ static char *pslatex_auxname = NULL; /* Routine to copy pre-existing prolog files into output stream */ static FILE *PS_open_prologue_file __PROTO((char *)); static void PS_dump_prologue_file __PROTO((char *)); static void PS_load_glyphlist __PROTO((void)); static const char GPFAR * GPFAR OldEPSL_linetypes[] = { /* Line Types */ "% Redefine line types to match old epslatex driver\n", "/LTw { PL [] 1 setgray } def\n", /* background (assumed white) */ "/LTb { BL [] 0 0 0 DL } def\n", /* border */ "/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def\n", /* axes */ "/LT0 { PL [] 1 0 0 DL } def\n", "/LT1 { PL [8 dl1 5 dl1] 0 0 1 DL } def\n", "/LT2 { PL [4 dl1 4 dl1] 0 1 1 DL } def\n", "/LT3 { PL [8 dl1 5 dl1 0.5 dl1 5 dl1] 1 0 1 DL } def\n", NULL }; static const char GPFAR * GPFAR ENHPS_header[] = { /* For MFshow and MFwidth the tos is an array with the string and font info: */ /* [<fontname (a string)> <fontsize> <vertical offset> <width significant?> <printed?> <overprint> <text string>] */ /* EAM Mar 2004 - Add in a special case overprint 3 = save, overprint 4 = restore */ /* EAM Nov 2007 - Accommodate UTF-8 support (Gshow) */ "/MFshow {\n", " { dup 5 get 3 ge\n", /* EAM test for overprint 3 or 4 */ " { 5 get 3 eq {gsave} {grestore} ifelse }\n", /* EAM */ " {dup dup 0 get findfont exch 1 get scalefont setfont\n", " [ currentpoint ] exch dup 2 get 0 exch R dup 5 get 2 ne {dup dup 6\n", " get exch 4 get {Gshow} {stringwidth pop 0 R} ifelse }if dup 5 get 0 eq\n", " {dup 3 get {2 get neg 0 exch R pop} {pop aload pop M} ifelse} {dup 5\n", " get 1 eq {dup 2 get exch dup 3 get exch 6 get stringwidth pop -2 div\n", " dup 0 R} {dup 6 get stringwidth pop -2 div 0 R 6 get\n", " show 2 index {aload pop M neg 3 -1 roll neg R pop pop} {pop pop pop\n", " pop aload pop M} ifelse }ifelse }ifelse }\n", " ifelse }\n", /* EAM */ " forall} def\n", /* get the width of the text */ /* HH 2005-07-24 - Add in a special case overprint 3 = save, 4 = restore * also for estimation of string width. This is done by interposing an * additional value on the stack. between XYsave and XYrestore, * this number is increased by the strings. By pop'ing this number, all * strings between XYsave and XYrestore are ignored. */ /* EAM Nov 2007 - GSwidth is to allow the operator to work either with a string * or with a glyph. Needed for UTF-8 support. Gwidth may do it better. */ "/Gswidth {dup type /stringtype eq {stringwidth} {pop (n) stringwidth} ifelse} def\n", "/MFwidth {0 exch { dup 5 get 3 ge { 5 get 3 eq { 0 } { pop } ifelse }\n", " {dup 3 get{dup dup 0 get findfont exch 1 get scalefont setfont\n", " 6 get Gswidth pop add} {pop} ifelse} ifelse} forall} def\n", /* flush left show */ "/MLshow { currentpoint stroke M\n", " 0 exch R\n Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def\n", /* flush right show */ "/MRshow { currentpoint stroke M\n", " exch dup MFwidth neg 3 -1 roll R\n Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def\n", /* centred show */ "/MCshow { currentpoint stroke M\n", " exch dup MFwidth -2 div 3 -1 roll R\n Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def\n", /* Save and restore for @-text (phantom box) */ "/XYsave { [( ) 1 2 true false 3 ()] } bind def\n", "/XYrestore { [( ) 1 2 true false 4 ()] } bind def\n", NULL }; /* external/internal prologue files machinery */ #if defined(GNUPLOT_PS_DIR) # if defined(_Windows) # include "win/winmain.h" # elif defined(OS2) # define INCL_DOSPROCESS # define INCL_DOSMODULEMGR # include <os2.h> # endif /* _Windows || OS2 */ #else /* GNUPLOT_PS_DIR */ # include "PostScript/prologues.h" #endif /* GNUPLOT_PS_DIR */ /* added to enhpost by Matt Heffron <heffron@falstaff.css.beckman.com> */ /* moved to post.trm by drd */ static struct PS_FontName { char *name; struct PS_FontName *next; } *PS_DocFonts = NULL; static char PS_default_font[MAX_ID_LEN+1] = {'H','e','l','v','e','t','i','c','a',',','1','4','\0'}; /* given a font, look in store to see if it is there already * if so, return NULL. If not, reencode it if allowed to, otherwise * return an appropriate re-encode string */ static void PS_RememberFont(char *fname) { struct PS_FontName *fnp; char *recode = NULL; char *myfname = "Symbol"; if (strcmp(fname, "Symbol-Oblique") != 0) myfname = fname; for (fnp = PS_DocFonts; fnp ; fnp = fnp->next) if (strcmp(fnp->name, myfname) == 0) return; /* Ignore it if illegal characters will corrupt the PostScript syntax */ if (strpbrk(myfname, "{}[]() ")) return; /* we have not seen this font before; store name and apply encoding */ fnp = (struct PS_FontName *)gp_alloc(sizeof(struct PS_FontName), "PostScript Font record"); fnp->name = gp_strdup(myfname); fnp->next = PS_DocFonts; PS_DocFonts = fnp; switch(encoding) { case S_ENC_ISO8859_1: case S_ENC_UTF8: recode = "reencodeISO def\n"; break; case S_ENC_ISO8859_2: recode = "reencodeISO2 def\n"; break; case S_ENC_ISO8859_9: /* ISO8859-9 is Latin5 */ case S_ENC_CP1254: recode = "reencodeISO9 def\n"; break; case S_ENC_ISO8859_15: /* ISO8859-15 is Latin9 */ recode = "reencodeISO15 def\n"; break; case S_ENC_CP437: recode = "reencodeCP437 def\n"; break; case S_ENC_CP850 : recode = "reencodeCP850 def\n"; break; case S_ENC_CP852 : recode = "reencodeCP852 def\n"; break; case S_ENC_KOI8_R : recode = "reencodeKOI8R def\n"; break; case S_ENC_CP1250 : recode = "reencodeCP1250 def\n"; break; case S_ENC_CP1251 : recode = "reencodeCP1251 def\n"; break; case S_ENC_KOI8_U : recode = "reencodeKOI8U def\n"; break; default: /* do nothing */ break; } if (recode) { if (ENHps_opened_string) ENHPS_FLUSH(); fprintf(gppsfile,"/%s %s", fnp->name, recode); } return; } char * PS_escape_string(char *origstr, char *escapelist) { char *newstr; char *n; if (!origstr || !*origstr) return NULL; newstr = gp_alloc(2*strlen(origstr)+1,"PS_escape_string"); for (n=newstr; *origstr; *n++ = *origstr++) { if (strchr(escapelist,*origstr)) *n++ = '\\'; } *n = '\0'; return newstr; } static int PS_pen_x, PS_pen_y; static int PS_taken; static int PS_linetype_last; static double PS_linewidth_last; static double PS_linewidth_current; static TBOOLEAN PS_relative_ok; /* HBB 990914: PS_SOLID is already used by the WIN32 API headers. * Renamed to PS_SOLIDE, therefore... */ enum PS_id { PS_PORTRAIT, PS_LANDSCAPE, PS_EPSF, PS_DEFAULT, PS_ENHANCED, PS_NOENHANCED, PS_LATEX, EPSLATEX_STANDALONE, EPSLATEX_INPUT, PS_MONOCHROME, PS_COLOR, PS_BLACKTEXT, PS_COLORTEXT, PS_SOLIDE, PS_DASHED, PS_DASHLENGTH, PS_LINEWIDTH, PS_SIMPLEX, PS_DUPLEX, PS_DEFAULTPLEX, PS_ROUNDED, PS_NOROUNDED, PS_CLIP, PS_NOCLIP, PS_FONTFILE, PS_NOFONTFILES, PS_PALFUNCPARAM, PS_LEVEL1, PS_LEVELDEFAULT, PS_FONT, PS_FONTSCALE, PSLATEX_ROTATE, PSLATEX_NOROTATE, PSLATEX_AUXFILE, PSLATEX_NOAUXFILE, PSLATEX_OLDSTYLE, PSLATEX_NEWSTYLE, EPSLATEX_HEADER, EPSLATEX_NOHEADER, PS_SIZE, PS_ADOBEGLYPHNAMES, PS_NOADOBEGLYPHNAMES, PS_BACKGROUND, PS_NOBACKGROUND, PS_OTHER }; static struct gen_table PS_opts[] = { { "d$efault", PS_DEFAULT }, { "p$ortrait", PS_PORTRAIT }, { "l$andscape", PS_LANDSCAPE }, { "ep$sf", PS_EPSF }, { "enh$anced", PS_ENHANCED }, { "noenh$anced", PS_NOENHANCED }, { "m$onochrome", PS_MONOCHROME }, { "c$olor", PS_COLOR }, { "c$olour", PS_COLOR }, { "b$lacktext", PS_BLACKTEXT }, { "colort$ext", PS_COLORTEXT }, { "colourt$ext", PS_COLORTEXT }, { "so$lid", PS_SOLIDE }, { "da$shed", PS_DASHED }, { "dashl$ength", PS_DASHLENGTH }, { "dl", PS_DASHLENGTH }, { "linew$idth", PS_LINEWIDTH }, { "lw", PS_LINEWIDTH }, { "size", PS_SIZE }, { "si$mplex", PS_SIMPLEX }, { "du$plex", PS_DUPLEX }, { "defaultp$lex", PS_DEFAULTPLEX }, { "butt", PS_NOROUNDED }, { "rou$nded", PS_ROUNDED }, { "clip", PS_CLIP }, { "noclip", PS_NOCLIP }, { "fontf$ile", PS_FONTFILE }, { "fontscale", PS_FONTSCALE }, { "nofontf$iles", PS_NOFONTFILES }, { "palf$uncparam", PS_PALFUNCPARAM }, { "level1", PS_LEVEL1 }, { "leveldefault", PS_LEVELDEFAULT }, { "font", PS_FONT }, { "stand$alone", EPSLATEX_STANDALONE }, { "inp$ut", EPSLATEX_INPUT }, { "header", EPSLATEX_HEADER }, { "noheader", EPSLATEX_NOHEADER }, { "r$otate", PSLATEX_ROTATE }, { "n$orotate", PSLATEX_NOROTATE }, { "a$uxfile", PSLATEX_AUXFILE }, { "noa$uxfile", PSLATEX_NOAUXFILE }, { "old$style", PSLATEX_OLDSTYLE }, { "new$style", PSLATEX_NEWSTYLE }, { "adobe$glyphnames", PS_ADOBEGLYPHNAMES }, { "noadobe$glyphnames", PS_NOADOBEGLYPHNAMES }, { "backg$round", PS_BACKGROUND }, { "nobackg$round", PS_NOBACKGROUND }, { NULL, PS_OTHER } }; TERM_PUBLIC void PS_options() { char *s; char *ps_fontfile_char = NULL; char tmp_term_options[MAX_LINE_LEN+1] = ""; TBOOLEAN set_orientation = FALSE, set_enhanced = FALSE, set_plex = FALSE; TBOOLEAN set_level = FALSE, set_color = FALSE, set_dashed = FALSE; TBOOLEAN set_dashlen = FALSE, set_linewidth = FALSE, set_round = FALSE; TBOOLEAN set_clip = FALSE, set_palfunc = FALSE, set_colortext = FALSE; TBOOLEAN set_standalone = FALSE, set_epslheader = FALSE; TBOOLEAN set_pslrotate = FALSE, set_pslauxfile = FALSE; TBOOLEAN set_psloldstyle = FALSE, set_font = FALSE, set_fontsize = FALSE; TBOOLEAN set_fontscale = FALSE; /* Annoying hack to handle the case of 'set termoption' after */ /* we have already initialized the terminal. */ if (c_token != 2) ps_explicit_size = FALSE; if (strcmp(term->name, "pstex") == 0) ps_params = &pstex_params; else if (strcmp(term->name, "pslatex") == 0) ps_params = &pslatex_params; else if (strcmp(term->name, "epslatex") == 0) { ps_params = &epslatex_params; } else ps_params = &post_params; if (ps_params->terminal == PSTERM_POSTSCRIPT) { if (pslatex_auxname) free(pslatex_auxname); pslatex_auxname = NULL; } else { term->set_font = PS_set_font; } if (!END_OF_COMMAND) { if (lookup_table(&PS_opts[0],c_token) == PS_DEFAULT) { switch (ps_params->terminal) { case PSTERM_POSTSCRIPT: while (ps_params->first_fontfile != NULL) delete_ps_fontfile((struct ps_fontfile_def *) NULL, ps_params->first_fontfile); *ps_params = post_params_default; break; case PSTERM_EPSLATEX: *ps_params = epslatex_params_default; break; case PSTERM_PSLATEX: *ps_params = pslatex_params_default; break; case PSTERM_PSTEX: *ps_params = pstex_params_default; break; } term->flags &= ~TERM_ENHANCED_TEXT; c_token++; if (!END_OF_COMMAND) int_error(c_token, "extraneous argument in set terminal %s",term->name); } } while (!END_OF_COMMAND) { switch(lookup_table(&PS_opts[0],c_token)) { case PS_PORTRAIT: if (set_orientation || ps_params->terminal != PSTERM_POSTSCRIPT) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_orientation = TRUE; ps_params->psformat = PSTERM_PORTRAIT; c_token++; break; case PS_LANDSCAPE: if (set_orientation || ps_params->terminal != PSTERM_POSTSCRIPT) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_orientation = TRUE; ps_params->psformat = PSTERM_LANDSCAPE; c_token++; break; case PS_EPSF: if (set_orientation || ps_params->terminal != PSTERM_POSTSCRIPT) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_orientation = TRUE; ps_params->psformat = PSTERM_EPS; c_token++; break; case PS_LEVEL1: if (set_level) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_level = TRUE; ps_params->level1 = TRUE; c_token++; break; case PS_LEVELDEFAULT: if (set_level) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_level = TRUE; ps_params->level1 = FALSE; c_token++; break; case PS_DEFAULT: int_error(c_token, "extraneous argument in set terminal %s",term->name); c_token++; break; case PS_ENHANCED: if (set_enhanced || ps_params->terminal != PSTERM_POSTSCRIPT) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_enhanced = TRUE; term->put_text = ENHPS_put_text; term->set_font = ENHPS_set_font; term->flags |= TERM_ENHANCED_TEXT; ++c_token; break; case PS_NOENHANCED: if (set_enhanced || ps_params->terminal != PSTERM_POSTSCRIPT) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_enhanced = TRUE; term->put_text = PS_put_text; term->set_font = PS_set_font; term->flags &= ~TERM_ENHANCED_TEXT; ++c_token; break; #ifdef PSLATEX_DRIVER case EPSLATEX_STANDALONE: if (set_standalone || ps_params->terminal != PSTERM_EPSLATEX) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_standalone = TRUE; ps_params->epslatex_standalone = TRUE; ++c_token; break; case EPSLATEX_INPUT: if (set_standalone || ps_params->terminal != PSTERM_EPSLATEX) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_standalone = TRUE; ps_params->epslatex_standalone = FALSE; ++c_token; break; case EPSLATEX_HEADER: if (set_epslheader || ps_params->terminal != PSTERM_EPSLATEX) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_epslheader = TRUE; ++c_token; free(epslatex_header); /* Protect against int_error() bail from try_to_get_string() */ epslatex_header = NULL; epslatex_header = try_to_get_string(); if (!epslatex_header) int_error(c_token,"String containing header information expected"); break; case EPSLATEX_NOHEADER: if (set_epslheader || ps_params->terminal != PSTERM_EPSLATEX) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_epslheader = TRUE; free(epslatex_header); epslatex_header = NULL; ++c_token; break; case PSLATEX_ROTATE: if (set_pslrotate || ((ps_params->terminal != PSTERM_PSLATEX) && (ps_params->terminal != PSTERM_PSTEX))) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_pslrotate = TRUE; ps_params->rotate = TRUE; ++c_token; break; case PSLATEX_NOROTATE: if (set_pslrotate || ((ps_params->terminal != PSTERM_PSLATEX) && (ps_params->terminal != PSTERM_PSTEX))) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_pslrotate = TRUE; ps_params->rotate = FALSE; ++c_token; break; case PSLATEX_AUXFILE: if (set_pslauxfile || ((ps_params->terminal == PSTERM_POSTSCRIPT) || (ps_params->terminal == PSTERM_EPSLATEX))) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_pslauxfile = TRUE; ps_params->useauxfile = TRUE; c_token++; break; case PSLATEX_NOAUXFILE: if (set_pslauxfile || ((ps_params->terminal == PSTERM_POSTSCRIPT) || (ps_params->terminal == PSTERM_EPSLATEX))) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_pslauxfile = TRUE; ps_params->useauxfile = FALSE; c_token++; break; case PSLATEX_OLDSTYLE: if (set_psloldstyle || ps_params->terminal == PSTERM_POSTSCRIPT) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_psloldstyle = TRUE; ps_params->oldstyle = TRUE; if (ps_params->terminal == PSTERM_EPSLATEX) ps_params->rounded = TRUE; c_token++; break; case PSLATEX_NEWSTYLE: if (set_psloldstyle || ps_params->terminal == PSTERM_POSTSCRIPT) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_psloldstyle = TRUE; ps_params->oldstyle = FALSE; c_token++; break; #endif case PS_MONOCHROME: if (set_color) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_color = TRUE; ps_params->color = FALSE; term->flags |= TERM_MONOCHROME; c_token++; break; case PS_COLOR: if (set_color) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_color = TRUE; ps_params->color = TRUE; term->flags &= ~TERM_MONOCHROME; c_token++; break; case PS_BLACKTEXT: if (set_colortext || ((ps_params->terminal != PSTERM_POSTSCRIPT) && (ps_params->terminal != PSTERM_EPSLATEX))) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_colortext = TRUE; ps_params->blacktext = TRUE; c_token++; break; case PS_COLORTEXT: if (set_colortext || ((ps_params->terminal != PSTERM_POSTSCRIPT) && (ps_params->terminal != PSTERM_EPSLATEX))) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_colortext = TRUE; ps_params->blacktext = FALSE; c_token++; break; case PS_SOLIDE: if (set_dashed) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_dashed = TRUE; ps_params->solid = TRUE; c_token++; break; case PS_DASHED: if (set_dashed) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_dashed = TRUE; ps_params->solid = FALSE; c_token++; break; case PS_DASHLENGTH: if (set_dashlen) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_dashlen = TRUE; c_token++; ps_params->dash_length = real_expression(); if (ps_params->dash_length <= 0.0) ps_params->dash_length = 1.0; break; case PS_LINEWIDTH: if (set_linewidth) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_linewidth = TRUE; c_token++; ps_params->linewidth_factor = real_expression(); if (ps_params->linewidth_factor <= 0.0) ps_params->linewidth_factor = 1.0; break; case PS_SIMPLEX: if (set_plex || ps_params->terminal != PSTERM_POSTSCRIPT) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_plex = TRUE; ps_params->duplex_state = FALSE; ps_params->duplex_option = TRUE; c_token++; break; case PS_DUPLEX: if (set_plex || ps_params->terminal != PSTERM_POSTSCRIPT) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_plex = TRUE; ps_params->duplex_state = TRUE; ps_params->duplex_option = TRUE; c_token++; break; case PS_DEFAULTPLEX: if (set_plex || ps_params->terminal != PSTERM_POSTSCRIPT) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_plex = TRUE; ps_params->duplex_option = FALSE; c_token++; break; case PS_ROUNDED: if (set_round) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_round = TRUE; ps_params->rounded = TRUE; c_token++; break; case PS_NOROUNDED: if (set_round) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_round = TRUE; ps_params->rounded = FALSE; c_token++; break; case PS_CLIP: if (set_clip) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_clip = TRUE; ps_params->clipped = TRUE; c_token++; break; case PS_NOCLIP: if (set_clip) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_clip = TRUE; ps_params->clipped = FALSE; c_token++; break; case PS_FONTSCALE: if (set_fontscale) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_fontscale = TRUE; c_token++; ps_params->fontscale = END_OF_COMMAND ? -1 : real_expression(); if (ps_params->fontscale < 0.0) ps_params->fontscale = 1.0; break; case PS_FONTFILE: { TBOOLEAN deleteentry = FALSE; char *fontfilename = NULL; c_token++; if (ps_params->terminal != PSTERM_POSTSCRIPT) int_error(c_token, "extraneous argument in set terminal %s",term->name); if (equals(c_token, "add")) c_token++; else if (almost_equals(c_token, "del$ete")) { deleteentry = TRUE; c_token++; } if (!(fontfilename = try_to_get_string())) { int_error(c_token, "Font filename expected"); } else { TBOOLEAN filename_doubled = FALSE; struct ps_fontfile_def *curr_ps_fontfile = ps_params->first_fontfile; struct ps_fontfile_def *prev_ps_fontfile = NULL; struct ps_fontfile_def *new_ps_fontfile = gp_alloc(sizeof(struct ps_fontfile_def), "new_ps_fontfile"); new_ps_fontfile->fontfile_name = gp_alloc (token_len(c_token), "new_ps_fontfile->fontfile_name"); gp_expand_tilde(&fontfilename); new_ps_fontfile->fontfile_name = fontfilename; new_ps_fontfile->fontname = NULL; if (!deleteentry) { #if defined(PIPES) if (*(new_ps_fontfile->fontfile_name) != '<') { #endif new_ps_fontfile->fontfile_fullname = fontpath_fullname(new_ps_fontfile->fontfile_name); if (!new_ps_fontfile->fontfile_fullname) int_error(c_token-1, "Font file '%s' not found", new_ps_fontfile->fontfile_name); #if defined(PIPES) } else new_ps_fontfile->fontfile_fullname = NULL; #endif } new_ps_fontfile->next = NULL; if (!deleteentry) { LFS *lf=lf_head; if (lf) { while (lf->prev) lf=lf->prev; } if ((lf && lf->interactive) || interactive) PS_load_fontfile(new_ps_fontfile,FALSE); } if (ps_params->first_fontfile) { while (curr_ps_fontfile) { if (strcmp(curr_ps_fontfile->fontfile_name, new_ps_fontfile->fontfile_name) == 0) { filename_doubled = TRUE; if (deleteentry) { delete_ps_fontfile(prev_ps_fontfile, curr_ps_fontfile); curr_ps_fontfile = NULL; break; } } prev_ps_fontfile = curr_ps_fontfile; curr_ps_fontfile = curr_ps_fontfile->next; } if (!filename_doubled) { if (!deleteentry) prev_ps_fontfile->next = new_ps_fontfile; else int_warn(c_token-1,"Can't delete Font filename '%s'", new_ps_fontfile->fontfile_name); } } else { if (!deleteentry) ps_params->first_fontfile = new_ps_fontfile; else int_warn(c_token-1, "Can't delete Font filename '%s'", new_ps_fontfile->fontfile_name); } } break; } case PS_NOFONTFILES: if (ps_params->terminal != PSTERM_POSTSCRIPT) int_error(c_token, "extraneous argument in set terminal %s",term->name); while (ps_params->first_fontfile != NULL) delete_ps_fontfile((struct ps_fontfile_def *) NULL, ps_params->first_fontfile); ++c_token; break; case PS_ADOBEGLYPHNAMES: ps_params->adobeglyphnames = TRUE; ++c_token; break; case PS_NOADOBEGLYPHNAMES: ps_params->adobeglyphnames = FALSE; ++c_token; break; case PS_BACKGROUND: { int ps_background; c_token++; ps_background = parse_color_name(); ps_params->background.r = ((ps_background >> 16) & 0xff) / 255.0; ps_params->background.g = ((ps_background >> 8) & 0xff) / 255.0; ps_params->background.b = (ps_background & 0xff) / 255.0; break; } case PS_NOBACKGROUND: c_token++; ps_params->background.r = ps_params->background.g = ps_params->background.b = -1.0; break; case PS_PALFUNCPARAM: if (set_palfunc) int_error(c_token, "extraneous argument in set terminal %s",term->name); set_palfunc = TRUE; ++c_token; ps_params->palfunc_samples = int_expression(); if (ps_params->palfunc_samples < 2) ps_params->palfunc_samples = 2; if (!END_OF_COMMAND && equals(c_token, ",")) { ++c_token; ps_params->palfunc_deviation = fabs(real_expression()); if (ps_params->palfunc_deviation >= 1) int_error(c_token-1,"allowed deviation must be < 1"); } break; case PS_SIZE: { float xmax_t, ymax_t; c_token++; ps_explicit_size = TRUE; ps_explicit_units = parse_term_size(&xmax_t, &ymax_t, INCHES); /* PostScript *always* works in pts, not locally defined dpi */ term->xmax = xmax_t * PS_SC * 72./gp_resolution; term->ymax = ymax_t * PS_SC * 72./gp_resolution; eps_explicit_x = 2 * term->xmax; eps_explicit_y = 2 * term->ymax; break; } case PS_FONT: c_token++; /* Fall through to attempt to read font name */ case PS_OTHER: default: if ((s = try_to_get_string())) { if (set_font) int_error(c_token, "extraneous argument in set terminal %s", term->name); set_font = TRUE; if ((ps_params->terminal == PSTERM_POSTSCRIPT) || (ps_params->terminal == PSTERM_EPSLATEX)) { char *comma = strrchr(s,','); if (comma && (1 == sscanf(comma+1,"%f",&ps_params->fontsize))) { set_fontsize = TRUE; *comma = '\0'; } if (*s) { /* Filter out characters that would confuse PostScript */ if (strpbrk(s, "()[]{}| ")) { int_warn(c_token-1,"Illegal characters in PostScript font name."); int_warn(NO_CARET,"I will try to fix it but this may not work."); while (strpbrk(s, "()[]{}| ")) *(strpbrk(s, "()[]{}| ")) = '-'; } ps_params->font[sizeof(ps_params->font)-1] = '\0'; strncpy(ps_params->font, s, sizeof(ps_params->font)-1); } free(s); } else int_error(c_token-1, "terminal %s does not allow specification %s", term->name, "of font name"); } else { if (set_fontsize) int_error(c_token, "extraneous argument in set terminal %s", term->name); set_fontsize = TRUE; /* We have font size specified */ ps_params->fontsize = real_expression(); } break; } } switch (ps_params->terminal) { case PSTERM_POSTSCRIPT: ps_fontsize = ps_params->fontsize; break; case PSTERM_EPSLATEX: ps_fontsize = 2 * ps_params->fontsize; break; case PSTERM_PSLATEX: case PSTERM_PSTEX: if (ps_params->fontsize > 0) ps_fontsize = 2 * ps_params->fontsize; else ps_fontsize = 20; /* default: 10pt */ break; } term->v_char = (unsigned int)(ps_fontsize*PS_SCF); if (ps_params->oldstyle) term->h_char = (unsigned int)(ps_fontsize*PS_SCF*5/10); else term->h_char = (unsigned int)(ps_fontsize*PS_SCF*6/10); sprintf(PS_default_font,"%s,%g",ps_params->font,ps_fontsize); if (ps_params->terminal == PSTERM_POSTSCRIPT) { if (ps_params->first_fontfile) { struct ps_fontfile_def *curr_ps_fontfile = ps_params->first_fontfile; unsigned int totlength = 0; char *running; while (curr_ps_fontfile) { totlength += strlen(curr_ps_fontfile->fontfile_name) + strlen(" fontfile \"\""); curr_ps_fontfile = curr_ps_fontfile->next; } curr_ps_fontfile = ps_params->first_fontfile; ps_fontfile_char = gp_alloc (totlength+1,"ps_fontfile_char"); running = ps_fontfile_char; while (curr_ps_fontfile) { sprintf(running," fontfile \"%s\"", curr_ps_fontfile->fontfile_name); running += strlen(running); curr_ps_fontfile = curr_ps_fontfile->next; } } } /* HBB 19990823: fixed the options string. It violated the 'save * loadable output' rule */ if (ps_params->terminal == PSTERM_POSTSCRIPT) sprintf(term_options,"%s %s %s \\\n", ps_params->psformat==PSTERM_EPS ? "eps" : (ps_params->psformat==PSTERM_PORTRAIT ? "portrait" : "landscape"), term->put_text == ENHPS_put_text ? "enhanced" : "noenhanced", ps_params->duplex_option ? (ps_params->duplex_state ? "duplex" : "simplex") : "defaultplex"); else if (ps_params->terminal != PSTERM_EPSLATEX) sprintf(term_options, "%s%s", ps_params->rotate ? "rotate" : "norotate", ps_params->useauxfile ? " auxfile" : ""); else term_options[0] = '\0'; sprintf(tmp_term_options," %s %s %s \\\n\ %s dashlength %.1f linewidth %.1f %s %s \\\n", ps_params->level1 ? "level1" : "leveldefault", ps_params->color ? "color" : "monochrome", ps_params->blacktext ? "blacktext" : "colortext", ps_params->solid ? "solid" : "dashed", ps_params->dash_length, ps_params->linewidth_factor, ps_params->rounded ? "rounded" : "butt", ps_params->clipped ? "clip" : "noclip"); strcat(term_options,tmp_term_options); if (ps_params->background.r >= 0) { sprintf(tmp_term_options, " background \"#%02x%02x%02x\" \\\n", (int)(255 * ps_params->background.r), (int)(255 * ps_params->background.g), (int)(255 * ps_params->background.b)); strcat(term_options, tmp_term_options); } else { strcat(term_options, " nobackground \\\n"); } sprintf(tmp_term_options," palfuncparam %d,%g \\\n ", ps_params->palfunc_samples, ps_params->palfunc_deviation); strcat(term_options,tmp_term_options); #ifdef PSLATEX_DRIVER if ((ps_params->terminal == PSTERM_PSTEX) || (ps_params->terminal == PSTERM_PSLATEX)) { sprintf(tmp_term_options, "%s %s ", ps_params->rotate ? "rotate" : "norotate", ps_params->useauxfile ? "auxfile" : "noauxfile"); strcat(term_options,tmp_term_options); } if (ps_params->terminal == PSTERM_EPSLATEX) { sprintf(tmp_term_options, "%s ", ps_params->epslatex_standalone ? "standalone" : "input"); if (epslatex_header) sprintf(tmp_term_options, "header \"%s\" ", epslatex_header); else sprintf(tmp_term_options, "noheader "); strcat(term_options,tmp_term_options); } #endif if ((encoding == S_ENC_UTF8) && (ps_params->terminal == PSTERM_POSTSCRIPT)) { sprintf(tmp_term_options," %sadobeglyphnames \\\n ", ps_params->adobeglyphnames ? "" : "no"); strcat(term_options,tmp_term_options); } if (ps_explicit_size) { if (ps_explicit_units == CM) sprintf(tmp_term_options,"size %.2fcm, %.2fcm ", 2.54*(float)term->xmax/(72.*PS_SC), 2.54*(float)term->ymax/(72.*PS_SC)); else sprintf(tmp_term_options,"size %.2fin, %.2fin ", (float)term->xmax/(72.*PS_SC), (float)term->ymax/(72.*PS_SC)); strcat(term_options,tmp_term_options); } if (ps_params->terminal == PSTERM_POSTSCRIPT) sprintf(tmp_term_options,"\"%s\" %g%s ", ps_params->font,ps_params->fontsize, ps_fontfile_char ? ps_fontfile_char : ""); else if (ps_params->terminal == PSTERM_EPSLATEX) sprintf(tmp_term_options,"\"%s\" %g ", ps_params->font,ps_params->fontsize); else if (ps_params->fontsize) sprintf(tmp_term_options,"%g ",ps_params->fontsize); else tmp_term_options[0]='\0'; if (ps_fontfile_char) free(ps_fontfile_char); strcat(term_options,tmp_term_options); sprintf(tmp_term_options," fontscale %3.1f ",ps_params->fontscale); strcat(term_options,tmp_term_options); } /* store settings passed to common_init() for use in PS_graphics() * ps_params->psformat, etc are reserved for storing the term options */ static TBOOLEAN ps_common_uses_fonts; static unsigned int ps_common_xoff, ps_common_yoff; /* The default UTF8 code will use glyph identifiers uniXXXX for all glyphs above 0x0100. * If you define ADOBE_ENCODING_NAMES, then it will instead use the glyph names from the * file aglfn.txt. Names in the range 0x0100 - 0x01FF correspond to those used by the * Latin1 encoding scheme. This unicode code page deliberately uses the same character * mapping as Latin1. Adobe also recommends names for many characters outside this * range, but not all fonts adhere to this. You can substitute a different aglfn.txt * file at run time if you want to use a different scheme. */ #define ADOBE_ENCODING_NAMES 1 #if (ADOBE_ENCODING_NAMES) typedef struct ps_glyph { unsigned long unicode; char * glyphname; } ps_glyph; static ps_glyph *aglist = NULL; static int aglist_alloc = 0; static int aglist_size = 0; static int psglyphs = 0; #endif TERM_PUBLIC void PS_load_fontfile(struct ps_fontfile_def *current_ps_fontfile, TBOOLEAN doload) { if (current_ps_fontfile) { unsigned int linesread = 0; FILE *ffont = NULL; char line[256]; char ext[4]; char cmd[256]; char *fontname = NULL; int i; #if defined(PIPES) char *envcmd = NULL; TBOOLEAN ispipe = FALSE; #endif ext[0] = '\0'; cmd[0] = '\0'; if (doload) fprintf(gppsfile,"%%%%BeginProcSet: %s\n", current_ps_fontfile->fontfile_name); /* get filename extension if no pipe (if pipe *ext=='\0') */ #if defined(PIPES) if (*(current_ps_fontfile->fontfile_name) != '<') { /* Filename is given */ #endif if (strlen(current_ps_fontfile->fontfile_name) > 3) strcpy(ext, current_ps_fontfile->fontfile_name + strlen(current_ps_fontfile->fontfile_name) - 3); else strcpy(ext, current_ps_fontfile->fontfile_name); /* make extension lowercase for comparison */ for (i=0; i<3; i++) ext[i] = tolower(ext[i]); if (!current_ps_fontfile->fontfile_fullname) int_error(NO_CARET, "Font file '%s' not found", current_ps_fontfile->fontfile_name); #if defined(PIPES) } #endif if (strlen(ext) == 0) { #if defined(PIPES) /* Pipe is given */ restrict_popen(); ispipe = TRUE; strcpy(cmd,current_ps_fontfile->fontfile_name + 1); ffont = popen(cmd, "r"); if (!ffont) int_error(NO_CARET, "Could not execute pipe '%s'", current_ps_fontfile->fontfile_name + 1); #endif } else if (!strcmp(ext,"ttf") || !strcmp(ext,"otf")) { /* TrueType */ #if defined(PIPES) restrict_popen(); ispipe = TRUE; envcmd = getenv("GNUPLOT_TTFTOPFA"); if (envcmd != NULL) sprintf(cmd,envcmd,current_ps_fontfile->fontfile_fullname); else sprintf(cmd,"ttf2pt1 -a -e -W 0 %s -", current_ps_fontfile->fontfile_fullname); if (strlen(cmd) == 0) int_error(NO_CARET, "No command for automatic font conversion ttf->pfa defined"); else { ffont = popen(cmd,"r"); if (!ffont) int_error(NO_CARET,"Could not execute command '%s'", cmd); } #else os_error(NO_CARET, "Automatic font conversion ttf->pfa not supported"); #endif } else if (strcmp(ext,"pfb") == 0) { /* PFB */ #if defined(PIPES) restrict_popen(); ispipe = TRUE; envcmd = getenv("GNUPLOT_PFBTOPFA"); if (envcmd != NULL) sprintf(cmd,envcmd,current_ps_fontfile->fontfile_fullname); else sprintf(cmd,"pfbtops %s", current_ps_fontfile->fontfile_fullname); if (strlen(cmd) == 0) int_error(NO_CARET, "No command for automatic font conversion pfb->pfa defined"); else { ffont = popen(cmd,"r"); if (!ffont) int_error(NO_CARET,"Could not execute command '%s'", cmd); } #else os_error(NO_CARET, "Automatic font conversion pfb->pfa not supported"); #endif } else { /* PFA */ if (strcmp(ext,"pfa") != 0) int_warn(NO_CARET, "Font file '%s' has unknown extension. Assume it is a pfa file", current_ps_fontfile->fontfile_name); ffont = fopen(current_ps_fontfile->fontfile_fullname, "r"); if (!ffont) int_error(NO_CARET, "Font file '%s' not found", current_ps_fontfile->fontfile_name); } /* read the file */ while (fgets(line,255,ffont)) { /* test file format */ if ((linesread == 0) && (strstr(line,"%!PS-AdobeFont") != line) && (strstr(line,"%!FontType1") != line)) { #if defined(PIPES) if (ispipe) int_warn(NO_CARET, "Command '%s' seems not to generate PFA data", cmd); else #endif int_warn(NO_CARET, "Font file '%s' seems not to be a PFA file", current_ps_fontfile->fontfile_name); } /* get fontname */ if (strstr(line,"/FontName") == line) { char *fnende = NULL; fontname = gp_alloc(strlen(line)-9,"load_fontfiles"); strcpy(fontname,strstr(line+1,"/")+1); fnende = strstr(fontname," "); *fnende = '\0'; current_ps_fontfile->fontname = gp_strdup(fontname); /* Print font name */ if (!doload) { if (current_ps_fontfile->fontfile_fullname) fprintf(stderr, "Font file '%s' contains the font '%s'. Location:\n %s\n", current_ps_fontfile->fontfile_name, fontname, current_ps_fontfile->fontfile_fullname); else fprintf(stderr, "Pipe '%s' contains the font '%s'.\n", current_ps_fontfile->fontfile_name, fontname); #if defined(PIPES) /* Stop reading font file in order to save time */ /* This does not work for pipes because they give the */ /* error message 'broken pipe' */ if (!ispipe) #endif break; } } if (doload) fputs(line, gppsfile); ++linesread; } #if defined(PIPES) if (ispipe) { int exitcode; if ((exitcode = pclose(ffont)) != 0) int_error(NO_CARET, "Command '%s' generated error, exitcode is %d", cmd, exitcode); } else #endif fclose(ffont); if (linesread == 0) { #if defined(PIPES) if (ispipe) int_error(NO_CARET, "Command '%s' generates empty output", cmd); else #endif int_error(NO_CARET, "Font file '%s' is empty", current_ps_fontfile->fontfile_name); } if (doload) fputs("%%EndProcSet\n", gppsfile); /* Computer Modern Symbol font with corrected baseline if the * font CMEX10 is embedded */ if (doload && fontname && (strcmp(fontname,"CMEX10") == 0)) { fputs("%%BeginProcSet: CMEX10-Baseline\n", gppsfile); fputs("/CMEX10-Baseline /CMEX10 findfont [1 0 0 1 0 1] makefont\n", gppsfile); fputs("dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall\n", gppsfile); fputs("currentdict end definefont pop\n", gppsfile); fputs("%%EndProcSet\n",gppsfile); } if (fontname) { free(fontname); fontname = NULL; } } } TERM_PUBLIC void PS_load_fontfiles(TBOOLEAN doload) { struct ps_fontfile_def *current_ps_fontfile=ps_params->first_fontfile; while (current_ps_fontfile) { PS_load_fontfile(current_ps_fontfile,doload); if (current_ps_fontfile->fontname) PS_RememberFont(current_ps_fontfile->fontname); current_ps_fontfile = current_ps_fontfile->next; } } TERM_PUBLIC void PS_common_init( TBOOLEAN uses_fonts, /* FALSE for (e)ps(la)tex */ unsigned int xoff, unsigned int yoff, /* how much to translate by */ unsigned int bb_xmin, unsigned int bb_ymin, unsigned int bb_xmax, unsigned int bb_ymax, /* bounding box */ const char **dict) /* extra entries for the dictionary */ { static const char GPFAR psi1[] = "\ %%%%Creator: gnuplot %s patchlevel %s\n\ %%%%CreationDate: %s\n\ %%%%DocumentFonts: %s\n"; static const char GPFAR psi2[] = "\ %%%%EndComments\n\ %%%%BeginProlog\n\ /gnudict 256 dict def\ngnudict begin\n\ %%\n\ %% The following true/false flags may be edited by hand if desired.\n\ %% The unit line width and grayscale image gamma correction may also be changed.\n\ %%\n\ /Color %s def\n\ /Blacktext %s def\n\ /Solid %s def\n\ /Dashlength %g def\n\ /Landscape %s def\n\ /Level1 %s def\n\ /Rounded %s def\n\ /ClipToBoundingBox %s def\n\ /SuppressPDFMark false def\n\ /TransparentPatterns false def\n\ /gnulinewidth %.3f def\n\ /userlinewidth gnulinewidth def\n\ /Gamma 1.0 def\n\ /BackgroundColor {%.3f %.3f %.3f} def\n\ %%\n\ /vshift %d def\n\ /dl1 {\n\ %.1f Dashlength mul mul\n\ Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if\n\ } def\n\ /dl2 {\n\ %.1f Dashlength mul mul\n\ Rounded { currentlinewidth 0.75 mul add } if\n\ } def\n\ /hpt_ %.1f def\n\ /vpt_ %.1f def\n\ /hpt hpt_ def\n\ /vpt vpt_ def\n"; static const char GPFAR psi3[] = "\ Level1 SuppressPDFMark or \n\ {} {\n\ /SDict 10 dict def\n\ systemdict /pdfmark known not {\n\ userdict /pdfmark systemdict /cleartomark get put\n\ } if\n\ SDict begin [\n\ /Title (%s)\n\ /Subject (gnuplot plot)\n\ /Creator (gnuplot %s patchlevel %s)\n\ /Author (%s)\n\ %% /Producer (gnuplot)\n\ %% /Keywords ()\n\ /CreationDate (%s)\n\ /DOCINFO pdfmark\n\ end\n\ } ifelse\n"; struct termentry *t = term; int i; time_t now; char *timedate; ps_common_uses_fonts = uses_fonts; ps_common_xoff = xoff; ps_common_yoff = yoff; ps_page = 0; time(&now); timedate=asctime(localtime(&now)); timedate[strlen(timedate)-1]='\0'; #ifdef PSLATEX_DRIVER /* Set files for (e)ps(la)tex terminals */ switch (ps_params->terminal) { case PSTERM_EPSLATEX: EPSLATEX_common_init(); break; case PSTERM_PSLATEX: case PSTERM_PSTEX: PSTEX_common_init(); break; default:; /* do nothing, just avoid a compiler warning */ } #endif if (ps_params->psformat == PSTERM_EPS) fputs("%!PS-Adobe-2.0 EPSF-2.0\n", gppsfile); else fputs("%!PS-Adobe-2.0\n", gppsfile); if (outstr) fprintf(gppsfile, "%%%%Title: %s\n", outstr); /* JFi */ fprintf(gppsfile, psi1, gnuplot_version, gnuplot_patchlevel, timedate, uses_fonts ? "(atend)" : ""); fprintf(gppsfile,"%%%%BoundingBox: %d %d %d %d\n", xoff + bb_xmin, yoff + bb_ymin, xoff + bb_xmax, yoff + bb_ymax); if ((ps_params->terminal == PSTERM_POSTSCRIPT) && (ps_params->psformat != PSTERM_EPS)) fprintf(gppsfile,"%%%%Orientation: %s\n", ps_params->psformat == PSTERM_LANDSCAPE ? "Landscape" : "Portrait"); if (ps_params->psformat != PSTERM_EPS) fputs("%%Pages: (atend)\n", gppsfile); fprintf(gppsfile, psi2, ps_params->color ? "true" : "false", ps_params->blacktext ? "true" : "false", ps_params->solid ? "true" : "false", ps_params->dash_length, /* dash length */ ps_params->psformat == PSTERM_LANDSCAPE ? "true" : "false", ps_params->level1 ? "true" : "false", ps_params->rounded ? "true" : "false", ps_params->clipped ? "true" : "false", PS_LW*ps_params->linewidth_factor, /* line width */ ps_params->background.r, ps_params->background.g, ps_params->background.b, /* background color, used only if all components >= 0 */ (int)(t->v_char)/(-3), /* shift for vertical centring */ PS_SC*1.0, /* dash length */ PS_SC*1.0, /* dash length */ PS_HTIC/2.0, /* half point width */ PS_VTIC/2.0); /* half point height */ /* HH: Clip to BoundingBox if the corresponding flag is toggled */ fprintf(gppsfile,"\ /doclip {\n\ ClipToBoundingBox {\n\ newpath %d %d moveto %d %d lineto %d %d lineto %d %d lineto closepath\n\ clip\n\ } if\n\ } def\n", xoff + bb_xmin, yoff + bb_ymin, xoff + bb_xmax, yoff + bb_ymin, xoff + bb_xmax, yoff + bb_ymax, xoff + bb_xmin, yoff + bb_ymax); /* Dump the body of the prologue */ PS_dump_prologue_file("prologue.ps"); /* insert font encoding vector */ if (uses_fonts) { switch (encoding) { case S_ENC_ISO8859_1: PS_dump_prologue_file("8859-1.ps"); break; case S_ENC_ISO8859_2: PS_dump_prologue_file("8859-2.ps"); break; case S_ENC_CP1254: case S_ENC_ISO8859_9: PS_dump_prologue_file("8859-9.ps"); break; case S_ENC_ISO8859_15: PS_dump_prologue_file("8859-15.ps"); break; case S_ENC_CP437: PS_dump_prologue_file("cp437.ps"); break; case S_ENC_CP850: PS_dump_prologue_file("cp850.ps"); break; case S_ENC_CP852: PS_dump_prologue_file("cp852.ps"); break; case S_ENC_CP1250: PS_dump_prologue_file("cp1250.ps"); break; case S_ENC_CP1251: PS_dump_prologue_file("cp1251.ps"); break; case S_ENC_KOI8_R: PS_dump_prologue_file("koi8r.ps"); break; case S_ENC_KOI8_U: PS_dump_prologue_file("koi8u.ps"); break; case S_ENC_UTF8: PS_dump_prologue_file("utf-8.ps"); if (!aglist) PS_load_glyphlist(); break; case S_ENC_DEFAULT: default: break; } } /* Redefine old epslatex linetypes if requested */ if ((ps_params->terminal == PSTERM_EPSLATEX) && ps_params->oldstyle) { for (i = 0; OldEPSL_linetypes[i] != NULL; i++) fprintf(gppsfile,"%s",OldEPSL_linetypes[i]); } if (ps_params->duplex_option) fprintf(gppsfile, "statusdict begin %s setduplexmode end\n", ps_params->duplex_state ? "true" : "false"); if (dict) while (*dict) fputs(*(dict++), gppsfile); if (uses_fonts) { PS_load_fontfiles(TRUE); PS_RememberFont(ps_params->font); } /* This pdfmark has triggered many complaints and bug reports */ /* because it causes epslatex (but not pdflatex) to overwrite */ /* the actual TeX document title. We can argue that that is */ /* an epslatex bug rather than a gnuplot bug, but people still*/ /* complain. I have created a flag SuppressPDFMark in the */ /* postscript prolog file that users can toggle to disable it.*/ /* HH: print pdf information interpreted by ghostscript/acrobat */ { char *username=getusername(); char *username2=PS_escape_string(username,"()\\"); char *outstr2=PS_escape_string(outstr,"()\\"); fprintf(gppsfile, psi3, outstr2?outstr2:"", gnuplot_version, gnuplot_patchlevel, username2?username2:"", timedate); if (username) free(username); if (username2) free(username2); if (outstr2) free(outstr2); } fputs("end\n%%EndProlog\n", gppsfile); } /* the init fn for the postscript driver */ TERM_PUBLIC void PS_init() { unsigned int xmin_t = 0, ymin_t = 0, xmax_t = 0, ymax_t = 0; switch (ps_params->psformat) { case PSTERM_EPS: if (ps_explicit_size) { term->xmax = eps_explicit_x; term->ymax = eps_explicit_y; } else { term->xmax = PS_XMAX; if (ps_params->oldstyle) term->ymax = PS_YMAX_OLDSTYLE; else term->ymax = PS_YMAX; } xmin_t = term->xmax * xoffset / (2*PS_SC); xmax_t = term->xmax * (xsize + xoffset) / (2*PS_SC); ymin_t = term->ymax * yoffset / (2*PS_SC); ymax_t = term->ymax * (ysize + yoffset) / (2*PS_SC); term->tscale = PS_SC * 2; break; case PSTERM_PORTRAIT: if (!ps_explicit_size) { term->xmax = PS_YMAX; term->ymax = PS_XMAX; } xmin_t = term->xmax * xoffset / PS_SC; xmax_t = term->xmax * (xsize + xoffset) / PS_SC; ymin_t = term->ymax * yoffset / PS_SC; ymax_t = term->ymax * (ysize + yoffset) / PS_SC; term->tscale = PS_SC; break; case PSTERM_LANDSCAPE: if (!ps_explicit_size) { term->xmax = PS_XMAX; term->ymax = PS_YMAX; } ymin_t = term->xmax * xoffset / PS_SC; ymax_t = term->xmax * (xsize+xoffset) / PS_SC; xmin_t = term->ymax * (1-ysize-yoffset) / PS_SC; xmax_t = term->ymax * (1-yoffset) / PS_SC; term->tscale = PS_SC; break; default: int_error(NO_CARET, "invalid postscript format used"); } /* for enhanced postscript, copy ps_params->font to ps_enh_font * does no harm for non-enhanced */ strcpy(ps_enh_font, ps_params->font); ps_enh_fontsize = ps_fontsize; switch (ps_params->terminal) { case PSTERM_POSTSCRIPT: gppsfile = gpoutfile; break; default: #ifdef PSLATEX_DRIVER PSTEX_reopen_output(); break; case PSTERM_EPSLATEX: EPSLATEX_reopen_output("eps"); #endif break; } PS_common_init(ps_params->terminal == PSTERM_POSTSCRIPT, ps_params->xoff, ps_params->yoff, xmin_t, ymin_t, xmax_t, ymax_t, (term->put_text == ENHPS_put_text) ? ENHPS_header : NULL); /* Keep track of whether we have written the enhanced text dictionary yet */ ENHPS_initialized = (term->put_text == ENHPS_put_text) ? 2 : 1; } TERM_PUBLIC void PS_graphics() { struct termentry *t = term; ps_page++; /* if (ps_params->psformat != PSTERM_EPS) */ fprintf(gppsfile,"%%%%Page: %d %d\n",ps_page,ps_page); /* If we are about to use enhanced text mode for the first time in a plot that */ /* was initialized previously without it, we need to write out the macros now */ if (term->put_text == ENHPS_put_text && ENHPS_initialized == 1) { const char **dict = ENHPS_header; while (*dict) fputs(*(dict++), gppsfile); fprintf(stderr,"Writing out PostScript macros for enhanced text mode\n"); ENHPS_initialized = 2; } fprintf(gppsfile,"\ gnudict begin\ngsave\n\ doclip\n\ %d %d translate\n\ %.3f %.3f scale\n", ps_common_xoff, ps_common_yoff, (ps_params->psformat == PSTERM_EPS ? 0.5 : 1.0)/PS_SC, (ps_params->psformat == PSTERM_EPS ? 0.5 : 1.0)/PS_SC); if (ps_params->psformat == PSTERM_LANDSCAPE) fprintf(gppsfile,"90 rotate\n0 %d translate\n", -(int)(term->ymax)); fprintf(gppsfile, "0 setgray\nnewpath\n"); if (ps_common_uses_fonts) fprintf(gppsfile, "(%s) findfont %d scalefont setfont\n", ps_params->font, (t->v_char)); ps_path_count = 0; PS_relative_ok = FALSE; PS_pen_x = PS_pen_y = -4000; PS_taken = 0; PS_linetype_last = LT_UNDEFINED; PS_linewidth_last = PS_linewidth_current = LT_UNDEFINED; ps_fontsize_previous = -1; if (ps_params->terminal != PSTERM_EPSLATEX) { /* set the background only if all components are >= 0 */ fputs("BackgroundColor 0 lt 3 1 roll 0 lt exch 0 lt or or not {", gppsfile); if (ps_params->psformat == PSTERM_EPS) { /* for eps files set the color only for the graphics area */ fprintf(gppsfile, "BackgroundColor C 1.000 0 0 %.2f %.2f BoxColFill", term->xmax * xsize, term->ymax * ysize); } else { /* otherwise set the page background color, the code is taken from the TeX \pagecolor command (color package). */ fputs("gsave BackgroundColor C clippath fill grestore", gppsfile); } fputs("} if\n", gppsfile); } } TERM_PUBLIC void PS_text() { ps_path_count = 0; fputs("stroke\ngrestore\nend\nshowpage\n", gppsfile); /* fprintf(stderr,"taken %d times\n",PS_taken); */ /* informational: tells how many times it was "cheaper" * to do a relative moveto or lineto rather than an * absolute one */ } TERM_PUBLIC void PS_reset() { fputs("%%Trailer\n", gppsfile); if (ps_common_uses_fonts) { fputs("%%DocumentFonts: ", gppsfile); while (PS_DocFonts) { struct PS_FontName *fnp; fnp = PS_DocFonts->next; fprintf(gppsfile, "%s%s", PS_DocFonts->name, fnp ? " " : "\n"); free(PS_DocFonts->name); free(PS_DocFonts); PS_DocFonts = fnp; } } if (ps_params->psformat != PSTERM_EPS) fprintf(gppsfile,"%%%%Pages: %d\n",ps_page); } TERM_PUBLIC void PS_linetype(int linetype) { if ((ps_params->terminal == PSTERM_EPSLATEX) && ps_params->oldstyle) linetype = (linetype % 4) + 3; else linetype = (linetype % 9) + 3; if (linetype < 0) /* LT_NODRAW, LT_BACKGROUND, LT_UNDEFINED */ linetype = 0; if (PS_linetype_last == linetype) return; PS_relative_ok = FALSE; PS_FLUSH_PATH; PS_linetype_last = linetype; PS_linewidth_last = PS_linewidth_current; fprintf(gppsfile, "LT%c\n", "wba012345678"[linetype]); ps_path_count = 0; } TERM_PUBLIC void PS_linewidth (double linewidth) { /* HBB NEW 20031219: don't do anything if nothing changed */ if (ps_path_count != 0 && PS_linewidth_last == linewidth) return; PS_FLUSH_PATH; PS_linewidth_current = linewidth; PS_linetype_last = LT_UNDEFINED; /* disable cache for next linetype change */ fprintf(gppsfile, "%.3f UL\n", linewidth); /* Documentation of the 'change linewidth' strategy of the postscript terminal: 1. define a new postscript variable with a default value: /userlinewidth gnulinewidth def 2. define a new postscript command to change the contents of that variable: /UL { gnulinewidth mul /userlinewidth exch def } def usage: multiplication_factor UL 3. modify the already known postscript command /PL for the plot lines: /PL { stroke userlinewidth setlinewidth } def 4. issue the new command before every change of the plot linestyle: example: 4.0 UL LT0 result: Linetype 0 is drawn four times as thick as defined by the contents of the postscript variable 'gnulinewidth'. */ } TERM_PUBLIC void PS_pointsize (double ptsize) { fprintf(gppsfile, "%.3f UP\n", ptsize); /* * Documentation of the 'change pointsize' strategy of the postscript * terminal: * * 1. define two new postscript variables to hold the overall pointsize: * /hpt_ and /vpt_ * * 2. define a new postscript command to use the contents of these variables: * /UP { cf. definition above } def * usage: multiplication_factor UP * * [3.] [doesn't exist, skip to next number] * * 4. issue the new command whereever you change the symbols (and linetype): * example: * 2.5 UP * 4.0 UL % optionally change linewidth, too * LT0 * result: * Next symbols will be drawn 2.5 times as big as defined by the * GNUPLOT `set pointsize` command (= overall pointsize). */ } TERM_PUBLIC void PS_move(unsigned int x, unsigned int y) { /* Make this semi-dynamic and independent of architecture */ char abso[5+2*INT_STR_LEN], rel[5+2*INT_STR_LEN]; int dx = x - PS_pen_x; int dy = y - PS_pen_y; /* can't cancel all null moves--need a move after stroke'ing */ if (dx==0 && dy==0 && PS_relative_ok) return; sprintf(abso, "%d %d M\n", x, y); sprintf(rel, "%d %d R\n", dx, dy); if (PS_newpath) { fprintf(gppsfile, "%d %d N\n", x, y); PS_newpath = FALSE; } else if (strlen(rel) < strlen(abso) && PS_relative_ok) { fputs(rel, gppsfile); PS_taken++; } else fputs(abso, gppsfile); PS_relative_ok = TRUE; ps_path_count += 1; PS_pen_x = x; PS_pen_y = y; } TERM_PUBLIC void PS_vector(unsigned int x, unsigned int y) { char abso[5+2*INT_STR_LEN], rel[5+2*INT_STR_LEN]; int dx = x - PS_pen_x; int dy = y - PS_pen_y; if (dx==0 && dy==0) return; sprintf(abso, "%d %d L\n", x, y); sprintf(rel, "%d %d V\n", dx, dy); /* The following PS_move() is executed only when the limit of ps_path_count * has been reached below: then PS_FLUSH_PATH has been called which has not * moved to currentpoint after the stroke. */ if (!PS_relative_ok) PS_move(PS_pen_x, PS_pen_y); if (strlen(rel) < strlen(abso)) { fputs(rel, gppsfile); PS_taken++; /* only used for debug info */ ps_path_count += 1; } else { fputs(abso, gppsfile); ps_path_count = 1; /* If we set it to zero, it may never get flushed */ } /* Ghostscript has a "pile-up of rounding errors" bug: a sequence of many * rmove's or rlineto's does not yield the same line as move's or lineto's. * Therefore, we periodically force an update of the absolute position. * There was a case when 400 rlineto's were too much, so let's go a little * bit higher than the default function sampling rate in gnuplot. * This runs into a second ghostscript bug, that mixing relative and absolute * lineto with no intervening 'stroke' is ridiculously slow to render. * So we stroke the partial line, update the position in absolute terms, * then continue. This whole section can go away if ghostscript/gv is fixed. */ #define MAX_REL_PATHLEN 105 if (ps_path_count >= MAX_REL_PATHLEN) { fprintf(gppsfile, "stroke %d %d M\n", x, y); ps_path_count = 1; } PS_relative_ok = TRUE; PS_pen_x = x; PS_pen_y = y; } TERM_PUBLIC void PS_put_text(unsigned int x, unsigned int y, const char *str) { #define PS_NONE 0 #define PS_TEXT 1 #define PS_GLYPH 2 unsigned long ch; if (!str && !strlen(str)) return; PS_move(x,y); if (ps_ang != 0) fprintf(gppsfile,"currentpoint gsave translate %d rotate 0 0 M\n", ps_ang); if (encoding == S_ENC_UTF8 && contains8bit(str)) { /* UTF-8 encoding with multibyte characters present */ int mode = PS_NONE; putc('[', gppsfile); for (utf8toulong(&ch, &str); ch != '\0'; utf8toulong(&ch, &str)) { if (ch < 0x100) { if (mode != PS_TEXT) putc('(', gppsfile); if (ch == '(' || ch == ')' || ch == '\\') putc('\\', gppsfile); putc((char)ch, gppsfile); mode = PS_TEXT; } else { int i; if (mode == PS_TEXT) putc(')', gppsfile); putc('/', gppsfile); #if (ADOBE_ENCODING_NAMES) for (i = 0; i < psglyphs; i++) { if (aglist[i].unicode == ch) { fputs(aglist[i].glyphname, gppsfile); break; } } if (i >= psglyphs) /* Must not have found a glyph name */ #endif fprintf(gppsfile, (ch > 0xffff) ? "u%lX" : "uni%04lX", ch); mode = PS_GLYPH; } } if (mode == PS_TEXT) putc(')', gppsfile); switch(ps_justify) { case LEFT : fputs("] GLshow\n", gppsfile); break; case CENTRE : fputs("] GCshow\n", gppsfile); break; case RIGHT : fputs("] GRshow\n", gppsfile); break; } } else { /* plain old 8-bit mode (not UTF-8), or UTF-8 string with only 7-bit characters */ putc('(',gppsfile); ch = (char) *str++; while(ch!='\0') { if ((ch=='(') || (ch==')') || (ch=='\\')) putc('\\', gppsfile); putc((char) ch, gppsfile); ch = (char) *str++; } switch(ps_justify) { case LEFT : fputs(") Lshow\n", gppsfile); break; case CENTRE : fputs(") Cshow\n", gppsfile); break; case RIGHT : fputs(") Rshow\n", gppsfile); break; } } if (ps_ang != 0) fputs("grestore\n", gppsfile); ps_path_count = 0; PS_relative_ok = FALSE; #undef PS_NONE #undef PS_TEXT #undef PS_GLYPH } TERM_PUBLIC int PS_text_angle(int ang) { ps_ang = ang; return TRUE; } TERM_PUBLIC int PS_justify_text(enum JUSTIFY mode) { ps_justify = mode; return TRUE; } TERM_PUBLIC int PS_set_font(const char *font) { char *name; unsigned int i; float size; size_t sep; if (!font || !(*font)) font = PS_default_font; sep = strcspn(font,","); size = ps_fontsize; if (font[sep] == ',') sscanf (&(font[sep+1]),"%f",&size); if (sep == 0) { name = gp_strdup(PS_default_font); sep = strcspn(name,","); } else name = gp_strdup(font); name[sep] = NUL; for (i=0; i<sep; i++) if (name[i] == ' ') name[i] = '-'; /* If TeX is doing the font handling, we don't need to */ /* write anything into the postscript stream */ if (ps_params->terminal == PSTERM_POSTSCRIPT) { PS_RememberFont(name); fprintf(gppsfile, "/%s findfont %g scalefont setfont\n", name, size*PS_SCF); /* FIXME: instead of trying to keep an approximate vshift current */ /* we could modify Lshow/Rshow/Cshow to query the font. */ if (size != ps_fontsize_previous) fprintf(gppsfile, "/vshift %d def\n", -(int)((size*PS_SCF)/3.)); ps_fontsize_previous = size; } free(name); term->v_char = (unsigned int)(size*PS_SCF); term->h_char = (unsigned int)(size*PS_SCF*6/10); return TRUE; } /* postscript point routines */ TERM_PUBLIC void PS_point(unsigned int x, unsigned int y, int number) { static const char GPFAR * GPFAR pointFNS[] = { "Pnt", "Pls", "Crs", "Star", "Box", "BoxF", "Circle", "CircleF", "TriU", "TriUF", "TriD", "TriDF", "Dia", "DiaF", "Pent", "PentF", "C0", "C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8", "C9", "C10", "C11", "C12", "C13", "C14", "C15", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "S10", "S11", "S12", "S13", "S14", "S15", "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D15", "BoxE", "CircE", "TriUE", "TriDE", "DiaE", "PentE", "BoxW", "CircW", "TriUW","TriDW", "DiaW", "PentW" }; static const char GPFAR * GPFAR pointFNS_OldEPSL[] = { "Pnt", "Dia", "Circle", "Pls", "Crs", "Box", "DiaF", "CircleF", "BoxF" }; if ((ps_params->terminal == PSTERM_EPSLATEX) && ps_params->oldstyle) { if (number < 0) number = -1; /* negative types are all 'dot' */ else number %= sizeof(pointFNS_OldEPSL)/sizeof(pointFNS_OldEPSL[0]) -1; fprintf(gppsfile, "%d %d %s\n", x, y, pointFNS_OldEPSL[number+1]); } else { if (number < 0) number = -1; /* negative types are all 'dot' */ else number %= sizeof(pointFNS)/sizeof(pointFNS[0]) -1; fprintf(gppsfile, "%d %d %s\n", x, y, pointFNS[number+1]); } PS_relative_ok = FALSE; ps_path_count = 0; PS_linetype_last = LT_UNDEFINED; /* force next linetype change */ } TERM_PUBLIC void PS_fillbox( int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height) { double filldens; int pattern; PS_FLUSH_PATH; switch(style & 0xf) { case FS_DEFAULT: /* Fill with current color, wherever it came from */ fprintf(gppsfile, "%d %d %d %d Rec fill\n", x1,y1, width,height); break; case FS_SOLID: case FS_TRANSPARENT_SOLID: /* style == 1 --> fill with intensity according to filldensity */ filldens = (style >> 4) / 100.0; if(filldens < 0.0) filldens = 0.0; if(filldens > 1.0) filldens = 1.0; fprintf(gppsfile, "%.3f %d %d %d %d BoxColFill\n", filldens, x1,y1, width,height); break; case FS_TRANSPARENT_PATTERN: fprintf(gppsfile,"\n /TransparentPatterns true def\n"); case FS_PATTERN: /* style == 2 --> fill with pattern according to fillpattern */ /* the upper 3 nibbles of 'style' contain pattern number */ pattern = (style >> 4) % 8; switch (pattern) { default: case 0: fprintf(gppsfile, "%d %d %d %d BoxFill\n", x1, y1, width, height); break; case 1: fprintf(gppsfile, "%d %d %d %d %d %d 1 PatternFill\n", x1, y1, width, height, 80, -45); break; case 2: fprintf(gppsfile, "%d %d %d %d %d %d 2 PatternFill\n", x1, y1, width, height, 40, 45); break; case 3: fprintf(gppsfile, "1 %d %d %d %d BoxColFill\n", x1, y1, width, height); break; case 4: fprintf(gppsfile, "%d %d %d %d %d %d 0 PatternFill\n", x1, y1, width, height, 80, 45); break; case 5: fprintf(gppsfile, "%d %d %d %d %d %d 0 PatternFill\n", x1, y1, width, height, 80, -45); break; case 6: fprintf(gppsfile, "%d %d %d %d %d %d 0 PatternFill\n", x1, y1, width, height, 40, 30); break; case 7: fprintf(gppsfile, "%d %d %d %d %d %d 0 PatternFill\n", x1, y1, width, height, 40, -30); break; } break; /* end of pattern filling part */ case FS_EMPTY: default: /* fill with background color */ fprintf(gppsfile, "%d %d %d %d BoxFill\n", x1, y1, width, height); } PS_relative_ok = FALSE; PS_linetype_last = LT_UNDEFINED; } /* ENHPOST */ /* * close a postscript string if it has been opened */ TERM_PUBLIC void ENHPS_FLUSH() { if (ENHps_opened_string) { fputs(")]\n", gppsfile); ENHps_opened_string = FALSE; } } static char *ENHps_opensequence = NULL; /* * open a postscript string */ TERM_PUBLIC void ENHPS_OPEN( char *fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { /* overprint 3 means save current position; 4 means restore saved position */ /* EAM FIXME - I couldn't figure out how to use less than the 7 parameters */ /* that the normal case macro wants. Somebody more familiar with PostScript*/ /* than I am please clean it up! */ if (overprint == 3) { fputs("XYsave\n", gppsfile); return; } else if (overprint == 4) { fputs("XYrestore\n", gppsfile); return; } if (!ENHps_opened_string) { int safelen = strlen(fontname) + 40; free(ENHps_opensequence); ENHps_opensequence = gp_alloc(safelen,"ENHPS_opensequence"); /* EAM November 2007 - moved here from enhanced_recursion() */ PS_RememberFont(fontname); #ifdef HAVE_SNPRINTF snprintf(ENHps_opensequence, safelen, "[(%s) %.1f %.1f %s %s %d ", fontname, fontsize, base, widthflag ? "true" : "false", showflag ? "true" : "false", overprint); #else sprintf(ENHps_opensequence, "[(%s) %.1f %.1f %s %s %d ", fontname, fontsize, base, widthflag ? "true" : "false", showflag ? "true" : "false", overprint); #endif fprintf(gppsfile, "%s(", ENHps_opensequence); ENHps_opened_string = TRUE; } } /* * Write one character from inside enhanced text processing. * This is trivial except in the case of multi-byte encoding. */ TERM_PUBLIC void ENHPS_WRITEC(int c) { static int in_utf8 = 0; /* nonzero means we are inside a multibyte sequence */ static char utf8[6]; /* holds the multibyte sequence being accumulated */ static int nbytes = 0; /* number of bytes expected in the sequence */ /* UTF-8 Encoding */ if (encoding == S_ENC_UTF8 && (c & 0x80) != 0) { if (in_utf8 == 0) { nbytes = (c & 0xE0) == 0xC0 ? 2 : (c & 0xF0) == 0xE0 ? 3 : (c & 0xF8) == 0xF0 ? 4 : 0; if (!nbytes) /* Illegal UTF8 char; hope it's printable */ fputc(c, gppsfile); else utf8[in_utf8++] = c; } else { utf8[in_utf8++] = c; if (in_utf8 >= nbytes) { unsigned long wch = '\0'; const char *str = &utf8[0]; int i; utf8[nbytes] = '\0'; in_utf8 = 0; utf8toulong(&wch, &str); if (wch < 0x100) { /* Single byte ISO8859-1 character */ fputc(wch, gppsfile); return; } /* Finish off previous partial string, if any */ ENHPS_FLUSH(); /* Write a new partial string for this glyph */ fprintf(gppsfile, "%s/", ENHps_opensequence); #if (ADOBE_ENCODING_NAMES) for (i = 0; i < psglyphs; i++) { if (aglist[i].unicode == wch) { fputs(aglist[i].glyphname, gppsfile); break; } } if (i >= psglyphs) /* Must not have found a glyph name */ #endif fprintf(gppsfile, (wch > 0xffff) ? "u%lX" : "uni%04lX", wch); fprintf(gppsfile, "]\n"); /* Mark string closed */ ENHps_opened_string = FALSE; } } /* shige jan 2011 */ } else if (encoding == S_ENC_SJIS) { static TBOOLEAN in_sjis = FALSE; fputc(c, gppsfile); if (in_sjis || (c & 0x80)) { /* shige: This may remain original string instead octal bytes. */ if (in_sjis) { in_sjis = 0; if ((unsigned)(c) == '\\') fputc('\\', gppsfile); } else { in_sjis = TRUE; } } } else /* Single byte character */ fputc(c, gppsfile); } /* a set-font routine for enhanced post : simply copies * the font into a global, or restores the globals * to the ps_params->font default */ TERM_PUBLIC int ENHPS_set_font(const char *font) { double size; if (ignore_enhanced_text) return PS_set_font(font); if (*font) { size_t sep = strcspn(font,","); if (sep > 0 && sep < sizeof(ps_enh_font)) { strncpy(ps_enh_font,font,sep); ps_enh_font[sep] = NUL; PS_RememberFont(ps_enh_font); } ps_enh_fontsize = ps_fontsize; sscanf (font+sep+1,"%f",&ps_enh_fontsize); } else { /* return to defaults */ strcpy(ps_enh_font, ps_params->font); ps_enh_fontsize = ps_fontsize; } size = ps_enh_fontsize * ps_params->fontscale; term->v_char = (unsigned int)(size*PS_SCF); term->h_char = (unsigned int)(size*PS_SCF*6/10); return TRUE; } TERM_PUBLIC void ENHPS_put_text(unsigned int x, unsigned int y, const char *str) { if (ignore_enhanced_text) { PS_put_text(x,y,str); return; } /* flush any pending graphics (all the XShow routines do this...) */ if (!strlen(str)) return; PS_FLUSH_PATH; /* FIXME: if there are no magic characters, we should just be able * punt the string to PS_put_text(), which will give shorter * ps output [eg tics and stuff rarely need extra processing], * but we need to make sure that the current font is the * default one before we can do that. {ie I tried it and it * used the wrong font !} * if (!strpbrk(str, "{}^_@&~")) * { * - do something to ensure default font is selected * PS_put_text(x,y,str); * return; * } */ PS_move(x,y); if (ps_ang != 0) fprintf(gppsfile,"currentpoint gsave translate %d rotate 0 0 moveto\n", ps_ang); fputs("[ ", gppsfile); /* set up the global variables needed by enhanced_recursion() */ enhanced_max_height = -1000; enhanced_min_height = 1000; enhanced_fontscale = PS_SCF; strncpy(enhanced_escape_format,"\\%o",sizeof(enhanced_escape_format)); ENHps_opened_string = FALSE; /* Set the recursion going. We say to keep going until a * closing brace, but we don't really expect to find one. * If the return value is not the nul-terminator of the * string, that can only mean that we did find an unmatched * closing brace in the string. We increment past it (else * we get stuck in an infinite loop) and try again. * * ps_enh_font and ps_enh_fontsize are either set to the * the defaults set on option line, or have been set to * "font,size". That is to say, ps_params->font is used only * at startup and by ENHPS_set_font */ while (*(str = enhanced_recursion((char *)str, TRUE, ps_enh_font, (double)(ps_enh_fontsize*PS_SCF), 0.0, TRUE, TRUE, 0))) { ENHPS_FLUSH(); /* I think we can only get here if *str == '}' */ enh_err_check(str); if (!*++str) break; /* end of string */ /* else carry on and process the rest of the string */ } enhanced_max_height += enhanced_min_height; fprintf(gppsfile, "] %.1f ", -enhanced_max_height/3); switch(ps_justify) { case LEFT : fputs("MLshow\n", gppsfile); break; case CENTRE : fputs("MCshow\n", gppsfile); break; case RIGHT : fputs("MRshow\n", gppsfile); break; } if (ps_ang != 0) fputs("grestore\n", gppsfile); ps_path_count = 0; PS_relative_ok = FALSE; } static void make_palette_formulae() { #define R sm_palette.formulaR #define G sm_palette.formulaG #define B sm_palette.formulaB /* print the definition of R,G,B formulae */ fputs("/InterpolatedColor false def\n", gppsfile); if (sm_palette.ps_allcF == 0) { /* print only those 3 used formulae */ fprintf(gppsfile, "/cF%i {%s} bind def\t%% %s\n", abs(R), ps_math_color_formulae[ 2*abs(R) ], ps_math_color_formulae[ 2*abs(R)+1 ]); if (abs(G) != abs(R)) fprintf(gppsfile, "/cF%i {%s} bind def\t%% %s\n", abs(G), ps_math_color_formulae[ 2*abs(G) ], ps_math_color_formulae[ 2*abs(G)+1 ]); if ((abs(B) != abs(R)) && (abs(B) != abs(G))) fprintf(gppsfile, "/cF%i {%s} bind def\t%% %s\n", abs(B), ps_math_color_formulae[ 2*abs(B) ], ps_math_color_formulae[ 2*abs(B)+1 ]); } else { /* all color formulae are written into the output PostScript file */ int i = 0; while (*(ps_math_color_formulae[2*i])) { fprintf(gppsfile, "/cF%i {%s} bind def\t%% %s\n", i, ps_math_color_formulae[ 2*i ], ps_math_color_formulae[ 2*i+1 ]); i++; } } #undef R #undef G #undef B } static void make_interpolation_code() { static const char *header[] = { "/grayindex {/gidx 0 def\n", " {GrayA gidx get grayv ge {exit} if /gidx gidx 1 add def} loop} def\n", "/dgdx {grayv GrayA gidx get sub GrayA gidx 1 sub get\n", " GrayA gidx get sub div} def \n", "/redvalue {RedA gidx get RedA gidx 1 sub get\n", " RedA gidx get sub dgdxval mul add} def\n", "/greenvalue {GreenA gidx get GreenA gidx 1 sub get\n", " GreenA gidx get sub dgdxval mul add} def\n", "/bluevalue {BlueA gidx get BlueA gidx 1 sub get\n", " BlueA gidx get sub dgdxval mul add} def\n", "/interpolate {\n", " grayindex grayv GrayA gidx get sub abs 1e-5 le\n", " {RedA gidx get GreenA gidx get BlueA gidx get}\n", " {/dgdxval dgdx def redvalue greenvalue bluevalue} ifelse} def\n", NULL, }; int i; for(i=0; header[i]!=NULL; ++i) { fputs(header[i], gppsfile); } } static void make_color_model_code() { /* Postscript version of the color space transformations in getcolor.c */ static const char *header[] = { "/HSV2RGB {", " exch dup 0.0 eq {pop exch pop dup dup} % achromatic gray\n", " { /HSVs exch def /HSVv exch def 6.0 mul dup floor dup 3 1 roll sub\n ", " /HSVf exch def /HSVi exch cvi def /HSVp HSVv 1.0 HSVs sub mul def\n", " /HSVq HSVv 1.0 HSVs HSVf mul sub mul def \n", " /HSVt HSVv 1.0 HSVs 1.0 HSVf sub mul sub mul def\n", " /HSVi HSVi 6 mod def 0 HSVi eq {HSVv HSVt HSVp}\n", " {1 HSVi eq {HSVq HSVv HSVp}{2 HSVi eq {HSVp HSVv HSVt}\n", " {3 HSVi eq {HSVp HSVq HSVv}{4 HSVi eq {HSVt HSVp HSVv}\n", " {HSVv HSVp HSVq} ifelse} ifelse} ifelse} ifelse} ifelse\n", " } ifelse} def\n", "/Constrain {\n", " dup 0 lt {0 exch pop}{dup 1 gt {1 exch pop} if} ifelse} def\n", "/YIQ2RGB {\n", " 3 copy -1.702 mul exch -1.105 mul add add Constrain 4 1 roll\n", " 3 copy -0.647 mul exch -0.272 mul add add Constrain 5 1 roll\n", " 0.621 mul exch -0.956 mul add add Constrain 3 1 roll } def\n", "/CMY2RGB {", " 1 exch sub exch 1 exch sub 3 2 roll 1 exch sub 3 1 roll exch } def\n", "/XYZ2RGB {", " 3 copy -0.9017 mul exch -0.1187 mul add exch 0.0585 mul exch add\n", " Constrain 4 1 roll 3 copy -0.0279 mul exch 1.999 mul add exch\n", " -0.9844 mul add Constrain 5 1 roll -0.2891 mul exch -0.5338 mul add\n", " exch 1.91 mul exch add Constrain 3 1 roll} def\n", "/SelectSpace {ColorSpace (HSV) eq {HSV2RGB}{ColorSpace (XYZ) eq {\n", " XYZ2RGB}{ColorSpace (CMY) eq {CMY2RGB}{ColorSpace (YIQ) eq {YIQ2RGB}\n", " if} ifelse} ifelse} ifelse} def\n", NULL, }; int i; for(i=0; header[i]!=NULL; ++i) { fputs(header[i], gppsfile); } } static char *save_space(double gray) { /* printing the gray with 4 digits and without the leading 0 * ... saving space */ static char s[40]; gray = 0.0001*(int)(gray*10000+0.5); /* round it to 4 digits */ sprintf(s, "%.4g", gray); if (s[0] == '0' && s[1] == '.') return &(s[1]); /* strip leading 0 */ else return s; } static void write_color_space(t_sm_palette *palette) { /* write something like * /ColorSpace (HSV) def * depending on the selected cmodel in palette */ fputs("/ColorSpace ", gppsfile); switch(palette->cmodel) { case C_MODEL_RGB: fputs("(RGB)", gppsfile); break; case C_MODEL_HSV: fputs("(HSV)", gppsfile); break; case C_MODEL_CMY: fputs("(CMY)", gppsfile); break; case C_MODEL_YIQ: fputs("(YIQ)", gppsfile); break; case C_MODEL_XYZ: fputs("(XYZ)", gppsfile); break; default: fprintf(stderr,"%s:%d ooops: Unknown color model '%c'. Will be RGB\n", __FILE__, __LINE__, (char)(palette->cmodel)); fputs("(RGB)", gppsfile); break; } fputs(" def\n", gppsfile); } static void write_component_array(const char *text, gradient_struct *grad, int cnt, int offset) { /* write someting like * /RedA [ 0 .1 .2 .3 .35 .3 .2 .1 0 0 0 ] def * nicely formated to gppsfile */ int i=0, len=0; char *val; fprintf(gppsfile, "/%s [", text); len = strlen(text) + 4; for(i=0; i<cnt; ++i) { char *ref = (char*)(&(grad[i])); ref += offset; val = save_space(*((double*) (ref))); len += strlen(val) + 1; if(len > 77) { fputs("\n ",gppsfile); len = strlen(val) + 3; } fprintf(gppsfile, "%s ", val); } fputs("] def\n", gppsfile); } static void write_gradient_definition(gradient_struct *gradient, int cnt) { /* some strange pointer acrobatic here, but it seems to work... */ char *ref = (char*) (gradient); int p = (char*) (&(gradient[0].pos)) - ref; int r = (char*) (&(gradient[0].col.r)) - ref; int g = (char*) (&(gradient[0].col.g)) - ref; int b = (char*) (&(gradient[0].col.b)) - ref; write_component_array("GrayA", gradient, cnt, p); write_component_array("RedA", gradient, cnt, r); write_component_array("GreenA", gradient, cnt, g); write_component_array("BlueA", gradient, cnt, b); } static void PS_make_header(t_sm_palette *palette) { /* write header for smooth colors */ fputs("gsave % colour palette begin\n", gppsfile); fprintf(gppsfile, "/maxcolors %i def\n", sm_palette.use_maxcolors); make_color_model_code(); switch(sm_palette.colorMode) { case SMPAL_COLOR_MODE_GRAY: fputs("/InterpolatedColor false def\n", gppsfile); break; /* nothing to do for gray */ case SMPAL_COLOR_MODE_RGB: make_palette_formulae(); break; case SMPAL_COLOR_MODE_CUBEHELIX: case SMPAL_COLOR_MODE_FUNCTIONS: { int cnt=0; gradient_struct *gradient; fputs("/InterpolatedColor true def\n", gppsfile); make_interpolation_code(); gradient = approximate_palette(palette, ps_params->palfunc_samples, ps_params->palfunc_deviation, &cnt); write_gradient_definition(gradient, cnt); free(gradient); break; } case SMPAL_COLOR_MODE_GRADIENT: fputs("/InterpolatedColor true def\n", gppsfile); make_interpolation_code(); write_gradient_definition(palette->gradient, palette->gradient_num); break; default: fprintf(stderr, "%s:%d ooops: Unknown color mode '%c'\n", __FILE__, __LINE__, (char)(sm_palette.colorMode)); } fputs("/pm3dround {maxcolors 0 gt {dup 1 ge\n", gppsfile); fputs("\t{pop 1} {maxcolors mul floor maxcolors 1 sub div} ifelse} if} def\n", gppsfile); fprintf(gppsfile, "/pm3dGamma 1.0 %g Gamma mul div def\n", sm_palette.gamma); write_color_space(palette); /* Now print something like /g {dup cF7 exch dup cF5 exch cF15 setrgbcolor} bind def */ #define R sm_palette.formulaR #define G sm_palette.formulaG #define B sm_palette.formulaB /* 18.1.2009 Since the beginning of pm3d, the Color definition switched between gray and colour map. This led to ambiguities for custom colour palettes if they contain grays only. Thus let postscript choose always always colour palette for interpolated colours ('set palette defined', 'set palette file') and colour/gray according to Color otherwise ('set palette gray', 'set palette rgb'). */ if (sm_palette.colorMode == SMPAL_COLOR_MODE_GRAY) fputs("false { % COLOUR vs. GRAY map\n", gppsfile); else fputs("Color InterpolatedColor or { % COLOUR vs. GRAY map\n", gppsfile); fputs(" InterpolatedColor { %% Interpolation vs. RGB-Formula\n", gppsfile); fputs(" /g {stroke pm3dround /grayv exch def interpolate\n", gppsfile); fputs(" SelectSpace setrgbcolor} bind def\n", gppsfile); fputs(" }{\n", gppsfile); fputs(" /g {stroke pm3dround dup ", gppsfile); if (R < 0) fputs("1 exch sub ", gppsfile); /* negate */ fprintf(gppsfile,"cF%i Constrain exch dup ", abs(R)); if (G < 0) fputs("1 exch sub ", gppsfile); /* negate */ fprintf(gppsfile,"cF%i Constrain exch ", abs(G)); if (R<0 || G<0 || B<0) fputs("\n\t", gppsfile); if (B < 0) fputs("1 exch sub ", gppsfile); /* negate */ fprintf(gppsfile,"cF%i Constrain ", abs(B)); fputs("\n SelectSpace setrgbcolor} bind def\n", gppsfile); fputs(" } ifelse\n", gppsfile); fputs("}{\n", gppsfile); fputs(" /g {stroke pm3dround pm3dGamma exp setgray} bind def\n", gppsfile); fputs("} ifelse\n", gppsfile); #undef R #undef G #undef B } TERM_PUBLIC int PS_make_palette (t_sm_palette *palette) { if (palette == NULL) { return 0; /* postscript can do continuous colors */ } PS_make_header(palette); return 0; } TERM_PUBLIC void PS_set_color (t_colorspec *colorspec) { double gray; PS_linetype_last = LT_UNDEFINED; /* Force next call to linetype to be honored */ if (PS_linewidth_last != PS_linewidth_current) { PS_linewidth_last = PS_linewidth_current; fprintf(gppsfile, "PL "); } if (colorspec->type == TC_LT) { int linetype = colorspec->lt; PS_FLUSH_PATH; if ((ps_params->terminal == PSTERM_EPSLATEX) && ps_params->oldstyle) linetype = (linetype % 4) + 3; else linetype = (linetype % 9) + 3; if (linetype < 0) /* LT_NODRAW, LT_BACKGROUND, LT_UNDEFINED */ linetype = 0; fprintf(gppsfile, "LC%1c setrgbcolor\n","wba012345678"[linetype]); } else if (colorspec->type == TC_RGB) { double r = (double)((colorspec->lt >> 16 ) & 255) / 255.; double g = (double)((colorspec->lt >> 8 ) & 255) / 255.; double b = (double)(colorspec->lt & 255) / 255.; PS_FLUSH_PATH; fprintf(gppsfile, "%3.2f %3.2f %3.2f C ",r,g,b); } if (colorspec->type != TC_FRAC) return; /* map [0;1] to gray/colors */ gray = colorspec->value; if (gray <= 0) fputs("0 g ", gppsfile); else { if (gray >= 1) fputs("1 g ", gppsfile); else fprintf(gppsfile, "%s g ", save_space(gray)); } PS_relative_ok = FALSE; /* "M" required because "g" forces stroke (??) */ } TERM_PUBLIC void PS_filled_polygon (int points, gpiPoint *corners) { int i; float filldens = 1.0; int pattern = 0; int style = corners->style; /* Stroke the previous graphic element if required. */ if (PS_relative_ok) PS_FLUSH_PATH; if (points == 4 && style == FS_OPAQUE) { /* Special case for pm3d surface quadrangles * <x0> <y0> ... <x4> <y4> h */ fprintf(gppsfile, "%i %i N", corners[0].x, corners[0].y); fprintf(gppsfile, " %i %i %i %i %i %i h\n", corners[3].x-corners[2].x, corners[3].y-corners[2].y, corners[2].x-corners[1].x, corners[2].y-corners[1].y, corners[1].x-corners[0].x, corners[1].y-corners[0].y); } else { /* General case for solid or pattern-filled polygons * gsave <x0> <y0> N <x1> <y1> ... <xn> <yn> density PolyFill */ int fillpar = style >> 4; style = style &0xf; fprintf(gppsfile, "gsave "); fprintf(gppsfile, "%i %i N", corners[0].x, corners[0].y); for (i = 1; i < points; i++) { /* The rationale for mixing V and L is given in PS_vector */ if (i % MAX_REL_PATHLEN) fprintf(gppsfile, " %i %i V", corners[i].x-corners[i-1].x, corners[i].y-corners[i-1].y); else fprintf(gppsfile, " %i %i L", corners[i].x, corners[i].y); } switch(style) { case FS_SOLID: case FS_TRANSPARENT_SOLID: filldens = (fillpar) / 100.0; if(filldens < 0.0) filldens = 0.0; if(filldens >= 1.0) fprintf(gppsfile, " 1 PolyFill\n"); else fprintf(gppsfile, " %.2f PolyFill\n", filldens); break; case FS_TRANSPARENT_PATTERN: fprintf(gppsfile," /TransparentPatterns true def\n"); case FS_PATTERN: pattern = (fillpar) % 8; if (pattern == 0) { filldens = 0.5; fprintf(gppsfile, " %.1f PolyFill\n", filldens); } else { fprintf(gppsfile," Pattern%d fill grestore\n", pattern); } break; default: fputs(" 1 PolyFill\n", gppsfile); break; } } PS_relative_ok = FALSE; } #undef MAX_REL_PATHLEN TERM_PUBLIC void PS_previous_palette() { /* Needed to stroke the previous graphic element. */ PS_FLUSH_PATH; fputs("grestore % colour palette end\n", gppsfile); } /* * The reason for having a PostScript-specific wrapper for do_arrow * is that post.trm draws dotted lines for monochrome output, and * dotted arrowheads are ugly. So in that case we call do_arrow twice, * the second time to retrace the head with the line style forced to solid. */ TERM_PUBLIC void PS_arrow ( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { do_arrow( sx, sy, ex, ey, head ); if (!ps_params->solid && head != 0) { PS_FLUSH_PATH; fputs("gsave [] 0 setdash\n", gppsfile); do_arrow( sx, sy, ex, ey, -head ); PS_FLUSH_PATH; fputs("grestore\n", gppsfile); } } static void delete_ps_fontfile(struct ps_fontfile_def *prev, struct ps_fontfile_def *this) { if (this != NULL) { /* there really is something to delete */ FPRINTF((stderr, "Remove font/kerning file `%s'\n", this->fontfile_name)); if (prev != NULL) /* there is a previous ps_fontfile */ prev->next = this->next; else /* this = ps_params->first_fontfile */ /* so change ps_params->first_fontfile */ ps_params->first_fontfile = this->next; free(this->fontfile_name); free(this->fontfile_fullname); free(this->fontname); free(this); this = NULL; } } static void PS_encode85(unsigned long tuple4, unsigned char *tuple5) { /* The compiler should know to carry out the powers of * 85 computation at compilation time. */ tuple5[0] = tuple4/(85*85*85*85); tuple4 -= ((unsigned long)tuple5[0])*(85*85*85*85); tuple5[1] = tuple4/(85*85*85); tuple4 -= ((unsigned long)tuple5[1])*(85*85*85); tuple5[2] = tuple4/(85*85); tuple4 -= ((unsigned long)tuple5[2])*(85*85); tuple5[3] = tuple4/(85); tuple4 -= ((unsigned long)tuple5[3])*(85); tuple5[4] = tuple4; } enum PS_ENCODING { PS_ASCII_HEX, PS_ASCII85 } PS_ENCODING; /* Returns pointer to encoded image, allocated on heap that the * caller must free. Can error to command line so make sure all * heap memory is recorded in static pointers when calling this * routine. */ static char * PS_encode_image(unsigned int M, unsigned int N, coordval *image, t_imagecolor color_mode, int bits_per_component, int max_colors, double cscale, enum PS_ENCODING encoding, int *return_num_bytes) { unsigned int coord_remaining; coordval *coord_ptr; unsigned short i_line; unsigned int i_element; unsigned int end_of_line; unsigned short bits_remaining, bits_start; unsigned long tuple4; unsigned char tuple5[5]; int max_encoded_bytes; char *encoded_image, *encoded_image_ptr; unsigned long total_bits; #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); /* At the end of each image line, data is aligned to the nearest 8 bits, * which means potentially adding 7 bits per line. */ end_of_line = M; total_bits += N*7; /* Compute max number of ascii characters encoding will require. */ if (encoding == PS_ASCII_HEX) { /* Straight hex encoding */ max_encoded_bytes = (total_bits/4 + 1); max_encoded_bytes += max_encoded_bytes / ASCII_PER_LINE; /* newline characters */ } else { /* ASCII85 encoding */ max_encoded_bytes = (total_bits/32 + 1)*5 + 2; /* 5 tuples and additional ~> */ max_encoded_bytes += max_encoded_bytes / ASCII_PER_LINE; /* newline characters */ } /* Reserve enough memory. */ if (!(encoded_image = gp_alloc(max_encoded_bytes, "encoded image"))) int_error(NO_CARET, "GNUPLOT (post.trm): Error allocating memory.\n"); encoded_image_ptr = encoded_image; coord_ptr = image; i_line = ASCII_PER_LINE; i_element = 0; coord_remaining = M*N; if (color_mode == IC_RGB /* && ps_params->color */) { end_of_line *= 3; coord_remaining *= 3; } bits_remaining = 32; bits_start = 0; tuple4 = 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); if (us_tmp > (max_colors-1)) us_tmp = max_colors-1; /* Rescale to accommodate a mismatch between max_colors and # of bits */ us_tmp *= cscale; if (bits_remaining < bits_per_component) { tuple4 <<= bits_remaining; bits_start = bits_per_component - bits_remaining; bits_remaining = 0; tuple4 |= (us_tmp >> bits_start); } else { tuple4 <<= bits_per_component; tuple4 |= us_tmp; bits_remaining -= bits_per_component; } /* If this is last pixel in line, pad to nearest 8 bits. */ i_element++; if (i_element == end_of_line) { register unsigned short bit_align = (bits_remaining & 0x7); tuple4 <<= bit_align; bits_remaining -= bit_align; i_element = 0; } /* Check if another 4-tuple is complete. */ if (!bits_remaining) { if (ps_params->level1) { /* A straight hex encoding for every 4 bits. */ unsigned char tuple8[8]; int i; for (i=7; i >= 0; i--) { tuple8[i] = tuple4 & 0xf; tuple4 >>= 4; } for (i=0; i < 8; i++) { sprintf(encoded_image_ptr++, "%1x", tuple8[i]); i_line--; if (!i_line) {i_line = ASCII_PER_LINE; *encoded_image_ptr++ = '\n';} } } else { /* Convert to ASCII85 representation. */ if (tuple4) { int i; PS_encode85(tuple4, tuple5); tuple4 = 0; for (i=0; i < 5; i++) { sprintf(encoded_image_ptr++, "%c", tuple5[i]+'!'); i_line--; if (!i_line) {i_line = ASCII_PER_LINE; *encoded_image_ptr++ = '\n';} } } else { *encoded_image_ptr++ = 'z'; i_line--; if (!i_line) {i_line = ASCII_PER_LINE; *encoded_image_ptr++ = '\n';} } } /* Now pick up any bits that may have not made it into the 4-tuple. */ if (bits_start) {tuple4 = us_tmp - ((us_tmp>>bits_start)<<bits_start);} bits_remaining = 32 - bits_start; bits_start = 0; } coord_remaining--; } if (bits_remaining < 32) { int i; int n = 4 - bits_remaining/8; if (ps_params->level1) { /* A straight hex encoding for every 4 bits. */ unsigned char tuple8[8]; for (i=2*n-1; i >= 0; i--) { tuple8[i] = tuple4 & 0xf; tuple4 >>= 4; } for (i=0; i < 2*n; i++) { sprintf(encoded_image_ptr++, "%1x", tuple8[i]); i_line--; if (!i_line) {i_line = ASCII_PER_LINE; *encoded_image_ptr++ = '\n';} } } else { /* Convert to ASCII85 representation. * * The case where not all bytes in a tuple are used is slightly different. * There is no use of 'z' as a special character and the remaining bytes * need to be filled. Then use only a portion of the final 5-tuple. */ tuple4 <<= bits_remaining; PS_encode85(tuple4, tuple5); /* Write first n+1 bytes. */ for (i=0; i <= n; i++) { sprintf(encoded_image_ptr++, "%c", tuple5[i]+'!'); i_line--; if (!i_line) {i_line = ASCII_PER_LINE; *encoded_image_ptr++ = '\n';} } } } if (!ps_params->level1) { sprintf(encoded_image_ptr, "~>"); encoded_image_ptr += 2; } *return_num_bytes = (encoded_image_ptr - encoded_image); assert(*return_num_bytes <= max_encoded_bytes); return encoded_image; } static void print_five_operand_image(unsigned int M, unsigned int N, gpiPoint *corner, t_imagecolor color_mode, unsigned short bits_per_component) { char *space = ps_params->level1 ? "" : " "; fprintf(gppsfile, "%sgsave\n", space); if (sm_palette.colorMode == SMPAL_COLOR_MODE_GRAY) fprintf(gppsfile, "%s{pm3dGamma exp} settransfer\n", space); fprintf(gppsfile, "%s%d %d translate\n", space, corner[0].x, corner[0].y); fprintf(gppsfile, "%s%d %d scale\n", space, (corner[1].x - corner[0].x), (corner[1].y - corner[0].y)); fprintf(gppsfile, "%s%d %d %d\n", space, M, N, bits_per_component); 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); fputs("{currentfile imagebuf readhexstring pop}\n", gppsfile); } else fprintf(gppsfile, " currentfile /ASCII85Decode filter\n"); if (color_mode == IC_RGB /* && ps_params->color */) { fprintf(gppsfile, "%sfalse 3\n" "%scolorimage\n", space, space); } else fprintf(gppsfile, "%simage\n", space); } TERM_PUBLIC void PS_image (unsigned int M, unsigned int N, coordval *image, gpiPoint *corner, t_imagecolor color_mode) { char *encoded_image; int num_encoded_bytes; unsigned short bits_per_component = 0; int max_colors, i_tmp; TBOOLEAN five_operand_image; double cscale; #define DEFAULT_BITS_PER_COMPONENT 8 #define DEFAULT_COMPONENT_MAX (1<<DEFAULT_BITS_PER_COMPONENT) if (sm_palette.use_maxcolors > 0) max_colors = sm_palette.use_maxcolors; else max_colors = DEFAULT_COMPONENT_MAX; i_tmp = 1; while (i_tmp < max_colors) { bits_per_component++; i_tmp <<= 1; } if (bits_per_component < 1 || bits_per_component > 12) { fprintf(stderr, "GNUPLOT (post.trm): Component bits (%d) out of range.\n", bits_per_component); return; } if (bits_per_component > 8) bits_per_component = 12; else if (bits_per_component > 4) bits_per_component = 8; else if (bits_per_component > 2) bits_per_component = 4; /* 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 five_operand_image = TRUE; else five_operand_image = FALSE; /* The five operand image doesn't have a palette and the values are * such that 0 maps to 0.0 and 2^bits_per_component - 1 maps to 1.0 * in the PostScript driver. Without any other knowledge, we scale * things so that our max colors corresponds to 1.0. */ if (five_operand_image) cscale = (float)((1 << bits_per_component)-1) / (float)(max_colors-1); else cscale = 1.0; 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); fputs("%%%%BeginImage\n", gppsfile); /* Clip image to requested bounding box */ fprintf(gppsfile,"gsave %d %d N %d %d L %d %d L %d %d L Z clip\n", corner[2].x, corner[2].y, corner[2].x, corner[3].y, corner[3].x, corner[3].y, corner[3].x, corner[2].y); /* Color and gray scale images do not need a palette and can use * the 5 operand form of the image routine. For other types of * palettes, the 1 operand form of the image routine must be used * and an indexed palette needs to be constructed. */ if (five_operand_image) { if (ps_params->level1) { print_five_operand_image(M, N, corner, color_mode, bits_per_component); } else { fputs("InterpretLevel1 {\n" " %% Construct a box instead of image\n" " LTb\n", gppsfile); fprintf(gppsfile, " %d %d M\n", corner[0].x, corner[0].y); fprintf(gppsfile, " %d 0 V\n", (corner[1].x - corner[0].x)); fprintf(gppsfile, " 0 %d V\n", (corner[1].y - corner[0].y)); fprintf(gppsfile, " %d 0 V\n", -(corner[1].x - corner[0].x)); fprintf(gppsfile, " %d %d L\n", corner[0].x, corner[0].y); fputs(" 40 -110 R\n" " (PS level 2 image) Lshow\n" " % Read data but ignore it\n", gppsfile); fprintf(gppsfile, " /imagebuf %d string def\n", num_encoded_bytes); fputs(" currentfile imagebuf readstring\n" "} {\n", gppsfile); print_five_operand_image(M, N, corner, color_mode, bits_per_component); fputs("} ifelse\n", gppsfile); } } else { int allocated; unsigned short i_tuple; double fact = 1.0 / (double)(max_colors-1); if (!ps_params->level1) { fputs("InterpretLevel1 {\n" " %% Construct a box instead of image\n" " LTb\n", gppsfile); fprintf(gppsfile, " %d %d M\n", corner[0].x, corner[0].y); fprintf(gppsfile, " %d 0 V\n", (corner[1].x - corner[0].x)); fprintf(gppsfile, " 0 %d V\n", (corner[1].y - corner[0].y)); fprintf(gppsfile, " %d 0 V\n", -(corner[1].x - corner[0].x)); fprintf(gppsfile, " %d %d L\n", corner[0].x, corner[0].y); fprintf(gppsfile, " 40 -110 R\n" " (PS level 2 image) Lshow\n" " %% Read data but ignore it\n" " /imagebuf %d string def\n" " currentfile imagebuf readstring\n", num_encoded_bytes); fputs("} {\n", gppsfile); } fputs("gsave\n", gppsfile); fprintf(gppsfile, "%d %d translate\n", corner[0].x, corner[0].y); fprintf(gppsfile, "%d %d scale\n", (corner[1].x - corner[0].x), (corner[1].y - corner[0].y)); fputs("%%%%BeginPalette\n", gppsfile); fprintf(gppsfile, "[ /Indexed\n /DeviceRGB %d\n <", (max_colors-1)); #define TUPLES_PER_LINE 8 for (allocated = 0, i_tuple = 0; allocated < max_colors; allocated++, i_tuple--) { double gray = (double) allocated * fact; rgb255_color color; rgb255maxcolors_from_gray( gray, &color ); if (!i_tuple) { fprintf(gppsfile,"\n "); i_tuple = TUPLES_PER_LINE; } fprintf(gppsfile," %2.2x%2.2x%2.2x", (int)color.r, (int)color.g, (int)color.b); } fputs("\n >\n] setcolorspace\n", gppsfile); fputs("%%%%EndPalette\n", gppsfile); fprintf(gppsfile, "<<\n /ImageType 1\n /Width %d\n /Height %d\n", M, N); fprintf(gppsfile, " /BitsPerComponent %d\n /ImageMatrix [ %d 0 0 %d 0 0 ]\n", bits_per_component, M, N); fprintf(gppsfile, " /Decode [ 0 %d ]\n", ((1<<bits_per_component)-1)); if (ps_params->level1) { fprintf(gppsfile, " /imagebuf %d string def\n", (M*N*bits_per_component + 7)/8); fputs(" /DataSource {currentfile imagebuf readhexstring pop}\n", gppsfile); } else { fputs(" /DataSource currentfile /ASCII85Decode filter\n", gppsfile); } fputs(" /MultipleDataSources false\n", gppsfile); fputs(" /Interpolate false\n" ">>\n" "image\n", gppsfile); if (!ps_params->level1) fputs("} ifelse\n", gppsfile); } /* Send encoded image to file. */ { char *encoded_image_ptr; for (i_tmp=0, encoded_image_ptr = encoded_image; i_tmp < num_encoded_bytes; i_tmp++) fputc(*encoded_image_ptr++, gppsfile); } if (ps_params->level1) fputs("\ngrestore\n", gppsfile); else fputs("\nInterpretLevel1 not {\n" " grestore\n" "} if\n", gppsfile); fputs("grestore\n", gppsfile); fputs("%%%%EndImage\n", gppsfile); free(encoded_image); return; } /* Feb 2010 - Search order for prolog and other files * 1) current setting of "set psdir <dir>" * 2) environmental variable GNUPLOT_PS_DIR * 3) hard-coded path selected at build time * 4) directories in "set loadpath <dirlist>" */ static FILE * PS_open_prologue_file(char *name) { char *fullname = NULL; char *ps_prologue_dir; char *ps_prologue_env; FILE *prologue_fd; /* Allocate and load default directory into ps_prologue_dir. */ /* FIXME: Why should we have to recalculate this every time? */ #ifdef GNUPLOT_PS_DIR # if defined(_Windows) /* retrieve prologues path relatively to gnuplot executable, * whose path is in szModuleName (winmain.c) */ ps_prologue_dir = gp_alloc(strlen((char*) szPackageDir) + strlen(GNUPLOT_PS_DIR) + 2, "Prolog path"); strcpy(ps_prologue_dir, (char*) szPackageDir); strcat(ps_prologue_dir, "\\"); /* GNUPLOT_PS_DIR is _relative_ path */ strcat(ps_prologue_dir, GNUPLOT_PS_DIR); # elif defined(OS2) const ULONG bufsiz = 1024; CHAR exepath[bufsiz]; PPIB ppib; ULONG rc; rc = DosGetInfoBlocks(NULL, &ppib); if (!rc) rc = DosQueryModuleName(ppib->pib_hmte, bufsiz, (PCHAR) &exepath); if (!rc) { char *p = strrchr(exepath, '\\'); *(++p) = '\0'; ps_prologue_dir = gp_alloc(strlen(exepath) + strlen(GNUPLOT_PS_DIR) + 2, "Prolog path"); strcpy(ps_prologue_dir, exepath); strcat(ps_prologue_dir, "\\"); /* GNUPLOT_PS_DIR is _relative_ path */ strcat(ps_prologue_dir, GNUPLOT_PS_DIR); } else { ps_prologue_dir = gp_alloc(1, "Prolog path"); /* unsucessful to retrieve executable path */ strcpy(ps_prologue_dir,""); } # else /* !_Windows && !OS2 */ /* use hardcoded _absolute_ path */ ps_prologue_dir = gp_strdup(GNUPLOT_PS_DIR); # endif # endif /* system-dependent ps_prologue_dir */ prologue_fd = NULL; /* First try current setting of "set psdir" */ if (PS_psdir) { fullname = gp_alloc(strlen(PS_psdir) + strlen(name) + 4,"Prolog name"); strcpy(fullname, PS_psdir); PATH_CONCAT(fullname, name); prologue_fd = fopen(fullname, "r"); free(fullname); } /* Second try environmental variable GNUPLOT_PS_DIR */ if (!prologue_fd && (ps_prologue_env = getenv("GNUPLOT_PS_DIR"))) { fullname = gp_alloc(strlen(ps_prologue_env) + strlen(name) + 4,"Prolog name"); strcpy(fullname, ps_prologue_env); PATH_CONCAT(fullname, name); prologue_fd = fopen(fullname, "r"); free(fullname); } # ifndef GNUPLOT_PS_DIR /* We should have a built-in copy of the headers */ if (!prologue_fd) { PS_dump_header_to_file(name); return NULL; } # endif /* Third try system default directory */ if (!prologue_fd) { fullname = gp_alloc(strlen(ps_prologue_dir) + strlen(name) + 4,"Prolog name"); strcpy(fullname, ps_prologue_dir); PATH_CONCAT(fullname, name); prologue_fd = fopen(fullname, "r"); free(fullname); } free(ps_prologue_dir); /* Last-gasp effort: look in loadpath directories */ if (!prologue_fd) prologue_fd = loadpath_fopen(name,"r"); if (!prologue_fd) { fprintf(stderr,"Can't find PostScript prologue file %s\n", name); loadpath_handler(ACTION_SHOW,NULL); fprintf(stderr,"Please copy %s to one of the above directories\n",name); fprintf(stderr,"or set the environmental variable GNUPLOT_PS_DIR\n"); fprintf(stderr,"or set the loadpath appropriately\n"); int_error(NO_CARET,"Plot failed!"); } return prologue_fd; } #ifndef GNUPLOT_PS_DIR static void PS_dump_header_to_file(char *name) { const char **dump = NULL; int i; /* load from included header */ if (!strcmp(name,"8859-15.ps")) dump = prologue_8859_15_ps; else if (!strcmp(name,"8859-1.ps")) dump = prologue_8859_1_ps; else if (!strcmp(name,"8859-2.ps")) dump = prologue_8859_2_ps; else if (!strcmp(name,"8859-9.ps")) dump = prologue_8859_9_ps; else if (!strcmp(name,"cp1250.ps")) dump = prologue_cp1250_ps; else if (!strcmp(name,"cp1251.ps")) dump = prologue_cp1251_ps; else if (!strcmp(name,"cp437.ps")) dump = prologue_cp437_ps; else if (!strcmp(name,"cp850.ps")) dump = prologue_cp850_ps; else if (!strcmp(name,"cp852.ps")) dump = prologue_cp852_ps; else if (!strcmp(name,"koi8r.ps")) dump = prologue_koi8r_ps; else if (!strcmp(name,"koi8u.ps")) dump = prologue_koi8u_ps; else if (!strcmp(name,"utf-8.ps")) dump = prologue_utf_8_ps; else if (!strcmp(name,"prologue.ps")) dump = prologue_prologue_ps; else int_warn(NO_CARET,"Requested Postscript prologue %s not included in this build of gnuplot",name); if (dump) { for (i = 0; dump[i] != NULL; ++i) fprintf(gppsfile, "%s", dump[i]); } } #endif static void PS_dump_prologue_file(char *name) { char buf[256]; FILE *prologue_fd = PS_open_prologue_file(name); if (prologue_fd) { while (fgets(buf, sizeof(buf), prologue_fd)) fputs(buf, gppsfile); fclose(prologue_fd); } } static void PS_load_glyphlist() { char buf[256]; char *next = NULL; unsigned int code; int len; char glyph_name[32]; FILE *prologue_fd = PS_open_prologue_file("aglfn.txt"); if (!prologue_fd) return; while (fgets(buf, sizeof(buf), prologue_fd)) { if (*buf == '#' || *buf == '\n') continue; code = strtol(buf,&next,16); /* User control over whether Adobe glyph names are used for unicode */ /* entries above 0x0100. I.e. when we see a UTF-8 alpha, do we write */ /* /alpha rather than /uni03B1? Some fonts want one or the other. */ /* This is controlled by 'set term post adobeglyphnames'. */ if (code >= 0x0100 && !ps_params->adobeglyphnames) continue; next++; len = strchr(next,';') - next; strncpy(glyph_name, next, len); glyph_name[len] = '\0'; FPRINTF((stderr, "%04X %s\n", code, glyph_name)); if (aglist_size + sizeof(ps_glyph) > aglist_alloc) { aglist_alloc += 2048; aglist = gp_realloc(aglist, aglist_alloc, "aglist"); } aglist[psglyphs].unicode = code; aglist[psglyphs].glyphname = gp_strdup(glyph_name); aglist_size += sizeof(ps_glyph); psglyphs++; } fclose(prologue_fd); } TERM_PUBLIC void PS_path(int p) { switch (p) { case 0: /* Start new path */ PS_FLUSH_PATH; PS_newpath = TRUE; break; case 1: /* Close path */ fprintf(gppsfile, "Z "); PS_FLUSH_PATH; break; } } TERM_PUBLIC void PS_layer(t_termlayer syncpoint) { static int plotno = 0; /* We must ignore all syncpoints that we don't recognize */ switch (syncpoint) { default: break; case TERM_LAYER_BEFORE_PLOT: fprintf(gppsfile, "%% Begin plot #%d\n", ++plotno); break; case TERM_LAYER_AFTER_PLOT: fprintf(gppsfile, "%% End plot #%d\n", plotno); break; case TERM_LAYER_BEGIN_PM3D_MAP: fprintf(gppsfile, "%%pm3d_map_begin\n"); break; case TERM_LAYER_END_PM3D_MAP: fprintf(gppsfile, "%%pm3d_map_end\n"); break; case TERM_LAYER_RESET: plotno = 0; break; } } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(post_driver) "postscript", "PostScript graphics, including EPSF embedded files (*.eps)", PS_XMAX, PS_YMAX, PS_VCHAR, PS_HCHAR, PS_VTIC, PS_HTIC, PS_options, PS_init, PS_reset, PS_text, null_scale, PS_graphics, PS_move, PS_vector, PS_linetype, PS_put_text, PS_text_angle, PS_justify_text, PS_point, PS_arrow, PS_set_font, PS_pointsize, TERM_BINARY|TERM_IS_POSTSCRIPT|TERM_CAN_CLIP|TERM_CAN_DASH|TERM_MONOCHROME|TERM_LINEWIDTH|TERM_FONTSCALE, 0 /*suspend*/, 0 /*resume*/, PS_fillbox, PS_linewidth #ifdef USE_MOUSE , 0, 0, 0, 0, 0 /* no mouse support for postscript */ #endif , PS_make_palette, PS_previous_palette, /* write grestore */ PS_set_color, PS_filled_polygon , PS_image , ENHPS_OPEN, ENHPS_FLUSH, ENHPS_WRITEC , PS_layer /* used only to insert comments */ , PS_path , PS_SC /* terminal to pixel coord scale factor */ TERM_TABLE_END(post_driver) #undef LAST_TERM #define LAST_TERM post_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP /* This is a pseudo help section that is labeled with 00psglobal to be * sure that it is sorted in before `post', `epslatex', and `pslatex'. * This section just defines commonly used text snippets for all three * help sections defined in this file. Defining PS_COMMON_OPTS1, * PS_COMMON_OPTS2, and PS_COMMON_DOC1 outside START_HELP()...END_HELP() * does not work. * The last line before the END_HELP(00psglobal) contains one single line * of "text" that is necessary to avoid errors. */ START_HELP(00psglobal) #define PS_COMMON_OPTS1 \ " {level1 | leveldefault}",\ " {color | colour | monochrome}",\ " {background <rgbcolor> | nobackground}",\ " {solid | dashed}",\ " {dashlength | dl <DL>}",\ " {linewidth | lw <LW>}",\ " {rounded | butt}",\ " {clip | noclip}",\ " {palfuncparam <samples>{,<maxdeviation>}}",\ " {size <XX>{unit},<YY>{unit}}", #define PS_COMMON_OPTS2 \ " {blacktext | colortext | colourtext}",\ " {{font} \"fontname{,fontsize}\" {<fontsize>}}",\ " {fontscale <scale>}", #define PS_COMMON_PROLOG_INFO \ " If you see the error message",\ " \"Can't find PostScript prologue file ... \"",\ " Please see and follow the instructions in `postscript prologue`.",\ "", #define PS_COMMON_DOC1 \ " The option `color` enables color, while `monochrome` prefers black and white",\ " drawing elements. Further, `monochrome` uses gray `palette` but it does not",\ " change color of objects specified with an explicit `colorspec`."\ "",\ " `solid` draws all plots with solid lines, overriding any dashed patterns.",\ " `dashlength` or `dl` scales the length of the dashed-line segments by <DL>,",\ " which is a floating-point number greater than zero.",\ " `linewidth` or `lw` scales all linewidths by <LW>.",\ "",\ " By default the generated PostScript code uses language features that were",\ " introduced in PostScript Level 2, notably filters and pattern-fill of",\ " irregular objects such as filledcurves. PostScript Level 2 features are",\ " conditionally protected so that PostScript Level 1 interpreters do not issue",\ " errors but, rather, display a message or a PostScript Level 1 approximation.",\ " The `level1` option substitutes PostScript Level 1 approximations of these",\ " features and uses no PostScript Level 2 code. This may be required by some",\ " old printers and old versions of Adobe Illustrator. The flag `level1` can be", \ " toggled later by editing a single line in the PostScript output file to force",\ " PostScript Level 1 interpretation. In the case of files containing level 2",\ " code, the above features will not appear or will be replaced by a note when",\ " this flag is set or when the interpreting program does not indicate that it",\ " understands level 2 PostScript or higher.",\ "",\ " `rounded` sets line caps and line joins to be rounded; `butt` is the",\ " default, butt caps and mitered joins.",\ "",\ " `clip` tells PostScript to clip all output to the bounding box;",\ " `noclip` is the default.",\ "",\ " `palfuncparam` controls how `set palette functions` are encoded as gradients",\ " in the output. Analytic color component functions (set via",\ " `set palette functions`) are encoded as linear interpolated gradients in the",\ " postscript output: The color component functions are sampled at <samples>",\ " points and all points are removed from this gradient which can be removed",\ " without changing the resulting colors by more than <maxdeviation>. For",\ " almost every useful palette you may safely leave the defaults of",\ " <samples>=2000 and <maxdeviation>=0.003 untouched.",\ "",\ " The default size for postscript output is 10 inches x 7 inches. The default",\ " for eps output is 5 x 3.5 inches. The `size` option changes this to",\ " whatever the user requests. By default the X and Y sizes are taken to be in",\ " inches, but other units are possibly (currently only cm). The BoundingBox",\ " of the plot is correctly adjusted to contain the resized image.",\ " Screen coordinates always run from 0.0 to 1.0 along the full length of the",\ " plot edges as specified by the `size` option.",\ " NB: `this is a change from the previously recommended method of using the",\ " set size command prior to setting the terminal type`. The old method left",\ " the BoundingBox unchanged and screen coordinates did not correspond to the",\ " actual limits of the plot.",\ "", "" END_HELP(00psglobal) START_HELP(epslatex) "1 epslatex", "?commands set terminal epslatex", "?set terminal epslatex", "?set term epslatex", "?terminal epslatex", "?term epslatex", "?epslatex", " The `epslatex` driver generates output for further processing by LaTeX.", "", " Syntax:", " set terminal epslatex {default}", " set terminal epslatex {standalone | input}", " {oldstyle | newstyle}", PS_COMMON_OPTS1 " {header <header> | noheader}", PS_COMMON_OPTS2 "", " The epslatex terminal prints a plot as `terminal postscript eps`", " but transfers the texts to LaTeX instead of including in the PostScript", " code. Thus, many options are the same as in the `postscript terminal`.", "", " The appearance of the epslatex terminal changed between versions 4.0 and 4.2", " to reach better consistency with the postscript terminal:", " The plot size has been changed from 5 x 3 inches to 5 x 3.5 inches;", " the character width is now estimated to be 60% of the font size", " while the old epslatex terminal used 50%; now, the larger number of", " postscript linetypes and symbols are used. To reach an appearance that is", " nearly identical to the old one specify the option `oldstyle`. (In fact", " some small differences remain: the symbol sizes are slightly different, the", " tics are half as large as in the old terminal which can be changed using", " `set tics scale`, and the arrows have all features as in the postscript", " terminal.)", "", PS_COMMON_PROLOG_INFO PS_COMMON_DOC1 " `blacktext` forces all text to be written in black even in color mode;", "", " The epslatex driver offers a special way of controlling text positioning:", " (a) If any text string begins with '{', you also need to include a '}' at the", " end of the text, and the whole text will be centered both horizontally", " and vertically by LaTeX. (b) If the text string begins with '[', you need", " to continue it with: a position specification (up to two out of t,b,l,r,c),", " ']{', the text itself, and finally, '}'. The text itself may be anything", " LaTeX can typeset as an LR-box. \\rule{}{}'s may help for best positioning.", " See also the documentation for the `pslatex` terminal driver.", " To create multiline labels, use \\shortstack, for example", " set ylabel '[r]{\\shortstack{first line \\\\ second line}}' ", "", " The `back` option of `set label` commands is handled slightly different", " than in other terminals. Labels using 'back' are printed behind all other", " elements of the plot while labels using 'front' are printed above ", " everything else.", "", " The driver produces two different files, one for the eps part of the figure", " and one for the LaTeX part. The name of the LaTeX file is taken from the", " `set output` command. The name of the eps file is derived by replacing", " the file extension (normally `.tex`) with `.eps` instead. There is no", " LaTeX output if no output file is given! Remember to close the", " `output file` before next plot unless in `multiplot` mode.", "", " In your LaTeX documents use '\\input{filename}' to include the figure.", " The `.eps` file is included by the command \\includegraphics{...}, so you", " must also include \\usepackage{graphicx} in the LaTeX preamble. If you", " want to use coloured text (option `textcolour`) you also have to include", " \\usepackage{color} in the LaTeX preamble.", "", " Pdf files can be made from the eps file using 'epstopdf'. If the graphics", " package is properly configured, the LaTeX files can also be processed by", " pdflatex without changes, using the pdf files instead of the eps files." "", " The behaviour concerning font selection depends on the header mode.", " In all cases, the given font size is used for the calculation of proper", " spacing. When not using the `standalone` mode the actual LaTeX font and", " font size at the point of inclusion is taken, so use LaTeX commands for", " changing fonts. If you use e.g. 12pt as font size for your LaTeX", " document, use '\"\" 12' as options. The font name is ignored. If using", " `standalone` the given font and font size are used, see below for a", " detailed description.", "", " If text is printed coloured is controlled by the TeX booleans \\ifGPcolor", " and \\ifGPblacktext. Only if \\ifGPcolor is true and \\ifGPblacktext is", " false, text is printed coloured. You may either change them in the", " generated TeX file or provide them globally in your TeX file, for example", " by using", " \\newif\\ifGPblacktext", " \\GPblacktexttrue", " in the preamble of your document. The local assignment is only done if no", " global value is given.", "", " When using the epslatex terminal give the name of the TeX file in the", " `set output` command including the file extension (normally \".tex\").", " The eps filename is generated by replacing the extension by \".eps\".", "", " If using the `standalone` mode a complete LaTeX header is added to the", " LaTeX file; and \"-inc\" is added to the filename of the eps file.", " The `standalone` mode generates a TeX file that produces", " output with the correct size when using dvips, pdfTeX, or VTeX.", " The default, `input`, generates a file that has to be included into a", " LaTeX document using the \\input command.", "", " If a font other than \"\" or \"default\" is given it is interpreted as", " LaTeX font name. It contains up to three parts, separated by a comma:", " 'fontname,fontseries,fontshape'. If the default fontshape or fontseries", " are requested, they can be omitted. Thus, the real syntax for the fontname", " is '[fontname][,fontseries][,fontshape]'. The naming convention for all", " parts is given by the LaTeX font scheme. The fontname is 3 to 4 characters", " long and is built as follows: One character for the font vendor, two", " characters for the name of the font, and optionally one additional", " character for special fonts, e.g., 'j' for fonts with old-style numerals", " or 'x' for expert fonts. The names of many fonts is described in", "^ <a href=\"http://www.tug.org/fontname/fontname.pdf\">", " http://www.tug.org/fontname/fontname.pdf", "^ </a>", " For example, 'cmr' stands for Computer Modern Roman, 'ptm' for Times-Roman,", " and 'phv' for Helvetica. The font series denotes the thickness of the", " glyphs, in most cases 'm' for normal (\"medium\") and 'bx' or 'b' for bold", " fonts. The font shape is 'n' for upright, 'it' for italics, 'sl' for", " slanted, or 'sc' for small caps, in general. Some fonts may provide", " different font series or shapes.", "", " Examples:", "", " Use Times-Roman boldface (with the same shape as in the surrounding text):", " set terminal epslatex 'ptm,bx'", " Use Helvetica, boldface, italics:", " set terminal epslatex 'phv,bx,it'", " Continue to use the surrounding font in slanted shape:", " set terminal epslatex ',,sl'", " Use small capitals:", " set terminal epslatex ',,sc'", "", " By this method, only text fonts are changed. If you also want to change", " the math fonts you have to use the \"gnuplot.cfg\" file or the `header`", " option, described below.", "", " In standalone mode, the font size is taken from the given font size in the", " `set terminal` command. To be able to use a specified font size, a file", " \"size<size>.clo\" has to reside in the LaTeX search path. By default,", " 10pt, 11pt, and 12pt are supported. If the package \"extsizes\" is", " installed, 8pt, 9pt, 14pt, 17pt, and 20pt are added.", "", " The `header` option takes a string as argument. This string is written", " into the generated LaTeX file. If using the `standalone` mode, it is ", " written into the preamble, directly before the \\begin{document} command.", " In the `input` mode, it is placed directly after the \\begingroup command", " to ensure that all settings are local to the plot.", "", " Examples:", "", " Use T1 fontencoding, change the text and math font to Times-Roman as well", " as the sans-serif font to Helvetica:", " set terminal epslatex standalone header \\", " \"\\\\usepackage[T1]{fontenc}\\n\\\\usepackage{mathptmx}\\n\\\\usepackage{helvet}\"", " Use a boldface font in the plot, not influencing the text outside the plot:", " set terminal epslatex input header \"\\\\bfseries\"", "", " If the file \"gnuplot.cfg\" is found by LaTeX it is input in the preamble", " the LaTeX document, when using `standalone` mode. It can be used for", " further settings, e.g., changing the document font to Times-Roman,", " Helvetica, and Courier, including math fonts (handled by \"mathptmx.sty\"):", " \\usepackage{mathptmx}", " \\usepackage[scaled=0.92]{helvet}", " \\usepackage{courier}", " The file \"gnuplot.cfg\" is loaded before the header information given", " by the `header` command. Thus, you can use `header` to overwrite some of", " settings performed using \"gnuplot.cfg\"", "" END_HELP(epslatex) START_HELP(pslatex) "1 pslatex and pstex", "?commands set terminal pslatex", "?set terminal pslatex", "?set term pslatex", "?terminal pslatex", "?term pslatex", "?pslatex", "?commands set terminal pstex", "?set terminal pstex", "?set term pstex", "?terminal pstex", "?term pstex", "?pstex", " The `pslatex` driver generates output for further processing by LaTeX,", " while the `pstex` driver generates output for further processing by", " TeX. `pslatex` uses \\specials understandable by dvips and xdvi. Figures", " generated by `pstex` can be included in any plain-based format (including", " LaTeX).", "", " Syntax:", " set terminal [pslatex | pstex] {default}", " set terminal [pslatex | pstex]", " {rotate | norotate}", " {oldstyle | newstyle}", " {auxfile | noauxfile}", PS_COMMON_OPTS1 " {<font_size>}", "", PS_COMMON_PROLOG_INFO PS_COMMON_DOC1 " if `rotate` is specified, the y-axis label is rotated.", " <font_size> is the size (in pts) of the desired font.", "", " If `auxfile` is specified, it directs the driver to put the PostScript", " commands into an auxiliary file instead of directly into the LaTeX file.", " This is useful if your pictures are large enough that dvips cannot handle", " them. The name of the auxiliary PostScript file is derived from the name of", " the TeX file given on the `set output` command; it is determined by replacing", " the trailing `.tex` (actually just the final extent in the file name) with", " `.ps` in the output file name, or, if the TeX file has no extension, `.ps`", " is appended. The `.ps` is included into the `.tex` file by a", " \\special{psfile=...} command. Remember to close the `output file` before", " next plot unless in `multiplot` mode.", "", " Gnuplot versions prior to version 4.2 generated plots of the size", " 5 x 3 inches using the ps(la)tex terminal while the current version generates", " 5 x 3.5 inches to be consistent with the postscript eps terminal. In", " addition, the character width is now estimated to be 60% of the font size", " while the old epslatex terminal used 50%. To reach the old format specify", " the option `oldstyle`.", "", " The pslatex driver offers a special way of controlling text positioning: ", " (a) If any text string begins with '{', you also need to include a '}' at the", " end of the text, and the whole text will be centered both horizontally", " and vertically by LaTeX. (b) If the text string begins with '[', you need", " to continue it with: a position specification (up to two out of t,b,l,r),", " ']{', the text itself, and finally, '}'. The text itself may be anything", " LaTeX can typeset as an LR-box. \\rule{}{}'s may help for best positioning.", "", " The options not described here are identical to the `Postscript terminal`.", " Look there if you want to know what they do.", "", " Examples:", " set term pslatex monochrome dashed rotate # set to defaults", " To write the PostScript commands into the file \"foo.ps\":", " set term pslatex auxfile", " set output \"foo.tex\"; plot ...; set output", " About label positioning:", " Use gnuplot defaults (mostly sensible, but sometimes not really best):", " set title '\\LaTeX\\ -- $ \\gamma $'", " Force centering both horizontally and vertically:", " set label '{\\LaTeX\\ -- $ \\gamma $}' at 0,0", " Specify own positioning (top here):", " set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'", " The other label -- account for long ticlabels:", " set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}}'", "", " Linewidths and pointsizes may be changed with `set style line`." "" END_HELP(pslatex) START_HELP(post) "1 postscript", "?commands set terminal postscript", "?set terminal postscript", "?set term postscript", "?terminal postscript", "?term postscript", "?postscript", " Several options may be set in the `postscript` driver.", "", " Syntax:", " set terminal postscript {default}", " set terminal postscript {landscape | portrait | eps}", " {enhanced | noenhanced}", " {defaultplex | simplex | duplex}", " {fontfile [add | delete] \"<filename>\"", " | nofontfiles} {{no}adobeglyphnames}", PS_COMMON_OPTS1 PS_COMMON_OPTS2 PS_COMMON_PROLOG_INFO "", " `landscape` and `portrait` choose the plot orientation.", " `eps` mode generates EPS (Encapsulated PostScript) output, which is just", " regular PostScript with some additional lines that allow the file to be", " imported into a variety of other applications. (The added lines are", " PostScript comment lines, so the file may still be printed by itself.) To", " get EPS output, use the `eps` mode and make only one plot per file. In `eps`", " mode the whole plot, including the fonts, is reduced to half of the default", " size.", "", " `enhanced` enables enhanced text mode features (subscripts,", " superscripts and mixed fonts). See `enhanced` for more information.", " `blacktext` forces all text to be written in black even in color mode;", "", " Duplexing in PostScript is the ability of the printer to print on both", " sides of the same sheet of paper. With `defaultplex`, the default setting", " of the printer is used; with `simplex` only one side is printed; `duplex`", " prints on both sides (ignored if your printer can't do it).", "", " `\"<fontname>\"` is the name of a valid PostScript font; and `<fontsize>` is", " the size of the font in PostScript points.", " In addition to the standard postscript fonts, an oblique version of the", " Symbol font, useful for mathematics, is defined. It is called", " \"Symbol-Oblique\".", "", " `default` sets all options to their defaults: `landscape`, `monochrome`,", " `dashed`, `dl 1.0`, `lw 1.0`, `defaultplex`, `noenhanced`, \"Helvetica\" and", " 14pt. Default size of a PostScript plot is 10 inches wide and 7 inches high.", PS_COMMON_DOC1 " Fonts listed by `fontfile` or `fontfile add` encapsulate the font", " definitions of the listed font from a postscript Type 1 or TrueType font", " file directly into the gnuplot output postscript file. Thus, the enclosed", " font can be used in labels, titles, etc. See the section", " `postscript fontfile` for more details. With `fontfile delete`, a fontfile", " is deleted from the list of embedded files. `nofontfiles` cleans the list", " of embedded fonts.", "", " Examples:", " set terminal postscript default # old postscript", " set terminal postscript enhanced # old enhpost", " set terminal postscript landscape 22 # old psbig", " set terminal postscript eps 14 # old epsf1", " set terminal postscript eps 22 # old epsf2", " set size 0.7,1.4; set term post portrait color \"Times-Roman\" 14", " set term post \"VAGRoundedBT_Regular\" 14 fontfile \"bvrr8a.pfa\"", "", " Linewidths and pointsizes may be changed with `set style line`.", "", " The `postscript` driver supports about 70 distinct pointtypes, selectable", " through the `pointtype` option on `plot` and `set style line`.", "", " Several possibly useful files about `gnuplot`'s PostScript are included", " in the /docs/psdoc subdirectory of the `gnuplot` distribution and at the", " distribution sites. These are \"ps_symbols.gpi\" (a `gnuplot` command file", " that, when executed, creates the file \"ps_symbols.ps\" which shows all the", " symbols available through the `postscript` terminal), \"ps_guide.ps\" (a", " PostScript file that contains a summary of the enhanced syntax and a page", " showing what the octal codes produce with text and symbol fonts),", " \"ps_file.doc\" (a text file that contains a discussion of the organization", " of a PostScript file written by `gnuplot`), and \"ps_fontfile_doc.tex\"", " (a LaTeX file which contains a short documentation concerning the", " encapsulation of LaTeX fonts with a glyph table of the math fonts).", "", " A PostScript file is editable, so once `gnuplot` has created one, you are", " free to modify it to your heart's desire. See the `editing postscript`", " section for some hints.", "2 editing postscript", "?commands set terminal postscript editing", "?set terminal postscript editing", "?set term postscript editing", "?terminal postscript editing", "?term postscript editing", "?editing_postscript", "?editing postscript", " The PostScript language is a very complex language---far too complex to", " describe in any detail in this document. Nevertheless there are some things", " in a PostScript file written by `gnuplot` that can be changed without risk of", " introducing fatal errors into the file.", "", " For example, the PostScript statement \"/Color true def\" (written into the", " file in response to the command `set terminal postscript color`), may be", " altered in an obvious way to generate a black-and-white version of a plot.", " Similarly line colors, text colors, line weights and symbol sizes can also be", " altered in straight-forward ways. Text (titles and labels) can be edited to", " correct misspellings or to change fonts. Anything can be repositioned, and", " of course anything can be added or deleted, but modifications such as these", " may require deeper knowledge of the PostScript language.", "", " The organization of a PostScript file written by `gnuplot` is discussed in", " the text file \"ps_file.doc\" in the docs/ps subdirectory of the gnuplot", " source distribution.", "2 postscript fontfile", "?commands set terminal postscript fontfile", "?set terminal postscript fontfile", "?set term postscript fontfile", "?terminal postscript fontfile", "?term postscript fontfile", "?postscript fontfile", "?fontfile", " The `fontfile` or `fontfile add` option takes one file name as argument", " and encapsulates this file into the postscript output in order to make", " this font available for text elements (labels, tic marks, titles, etc.).", " The `fontfile delete` option also takes one file name as argument. It", " deletes this file name from the list of encapsulated files.", "", " The postscript terminal understands some", " font file formats: Type 1 fonts in ASCII file format (extension \".pfa\"),", " Type 1 fonts in binary file format (extension \".pfb\"), and TrueType", " fonts (extension \".ttf\"). Pfa files are understood directly, pfb and ttf", " files are converted on the fly if appropriate conversion tools are", " installed (see below). You have to specify the full filename including the", " extension. Each `fontfile` option takes exact one font file name. This", " option can be used multiple times in order to include more than one font", " file.", "", " The font file is searched in the working directory and in all directories", " listed in the fontpath which is determined by `set fontpath`.", " In addition, the fontpath can be set using the environment variable", " GNUPLOT_FONTPATH. If this is not set a system dependent default search", " list is used. See `set fontpath` for more details.", "", " For using the encapsulated font file you have to specify the font name", " (which normally is not the same as the file name). When embedding a", " font file by using the `fontfile` option in interactive mode, the ", " font name is printed on the screen. E.g.", " Font file 'p052004l.pfb' contains the font 'URWPalladioL-Bold'. Location:", " /usr/lib/X11/fonts/URW/p052004l.pfb", "", " When using pfa or pfb fonts, you can also find it out by looking into the", " font file. There is a line similar to \"/FontName /URWPalladioL-Bold def\".", " The middle string without the slash is the fontname, here", " \"URWPalladioL-Bold\".", " For TrueType fonts, this is not so easy since the font name is stored in a", " binary format. In addition, they often have spaces in the font names which", " is not supported by Type 1 fonts (in which a TrueType is converted on the", " fly). The font names are changed in order to eliminate the spaces in the", " fontnames. The easiest way to find out which font name is generated for", " use with gnuplot, start gnuplot in interactive mode and type in", " \"set terminal postscript fontfile '<filename.ttf>'\".", "", " For converting font files (either ttf or pfb) to pfa format, the conversion", " tool has to read the font from a file and write it to standard output. If", " the output cannot be written to standard output, on-the-fly conversion is", " not possible.", "", " For pfb files \"pfbtops\" is a tool which can do this. If this program", " is installed on your system the on the fly conversion should work.", " Just try to encapsulate a pfb file. If the compiled in program call does", " not work correctly you can specify how this program is called by", " defining the environment variable GNUPLOT_PFBTOPFA e.g. to", " \"pfbtops %s\". The `%s` will be replaced by the font file name and thus", " has to exist in the string.", "", " If you don't want to do the conversion on the fly but get a pfa file of", " the font you can use the tool \"pfb2pfa\" which is written in simple c", " and should compile with any c compiler.", " It is available from many ftp servers, e.g.", "^ <a href=\"ftp://ftp.dante.de/tex-archive/fonts/utilities/ps2mf/\">", " ftp://ftp.dante.de/tex-archive/fonts/utilities/ps2mf/", "^ </a>", " In fact, \"pfbtopfa\" and \"pfb2ps\" do the same job. \"pfbtopfa\" puts", " the resulting pfa code into a file, whereas \"pfbtops\" writes it to", " standard output.", "", " TrueType fonts are converted into Type 1 pfa format, e.g.", " by using the tool \"ttf2pt1\" which is available from", "^ <a href=\"http://ttf2pt1.sourceforge.net/\">", " http://ttf2pt1.sourceforge.net/", "^ </a>", " If the builtin conversion does not", " work, the conversion command can be changed by the environment variable", " GNUPLOT_TTFTOPFA. For usage with ttf2pt1 it may be set to", " \"ttf2pt1 -a -e -W 0 %s - \". Here again, `%s` stands for the", " file name.", "", " For special purposes you also can use a pipe (if available for your", " operating system). Therefore you start the file name definition with ", " the character \"<\" and append a program call. This program has ", " to write pfa data to standard output. Thus, a pfa file may be accessed", " by `set fontfile \"< cat garamond.pfa\"`.", "", " For example, including Type 1 font files can be used for including the", " postscript output in LaTeX documents. The \"european computer modern\"", " font (which is a variant of the \"computer modern\" font) is available", " in pfb format from any CTAN server, e.g.", "^ <a href=\"ftp://ftp.dante.de/tex-archive/fonts/ps-type1/cm-super/\">", " ftp://ftp.dante.de/tex-archive/fonts/ps-type1/cm-super/", "^ </a>", " For example, the file \"sfrm1000.pfb\" contains the normal upright fonts", " with serifs in the design size 10pt (font name \"SFRM1000\").", " The computer modern fonts, which are still necessary for mathematics,", " are available from", "^ <a href=\"ftp://ftp.dante.de/tex-archive/fonts/cm/ps-type1/bluesky\">", " ftp://ftp.dante.de/tex-archive/fonts/cm/ps-type1/bluesky", "^ </a>", " With these you can use any character available in TeX. However, the", " computer modern fonts have a strange encoding. (This is why you should not", " use cmr10.pfb for text, but sfrm1000.pfb instead.)", " The usage of TeX fonts is shown in one of the demos.", " The file \"ps_fontfile_doc.tex\" in the /docs/psdoc subdirectory of the", " `gnuplot` source distribution contains a table with glyphs of the TeX", " mathfonts.", "", " If the font \"CMEX10\" is embedded (file \"cmex10.pfb\") gnuplot defines", " the additional font \"CMEX10-Baseline\". It is shifted vertically in order", " to fit better to the other glyphs (CMEX10 has its baseline at the top of", " the symbols).", "2 postscript prologue", "?commands set terminal postscript prologue", "?set terminal postscript prologue", "?terminal postscript prologue", "?postscript prologue", "?prologue", " Each PostScript output file includes a %%Prolog section and possibly some", " additional user-defined sections containing, for example, character encodings.", " These sections are copied from a set of PostScript prologue files that are", " either compiled into the gnuplot executable or stored elsewhere on your", " computer. A default directory where these files live is set at the time", " gnuplot is built. However, you can override this default either by using the", " gnuplot command `set psdir` or by defining an environment variable", " GNUPLOT_PS_DIR. See `set psdir`.", "2 postscript adobeglyphnames", "?commands set terminal postscript adobeglyphnames", "?set terminal postscript adobeglyphnames", "?terminal postscript adobeglyphnames", "?postscript adobeglyphnames", "?adobeglyphnames", "=UTF-8", " This setting is only relevant to PostScript output with UTF-8 encoding.", " It controls the names used to describe characters with Unicode entry points", " higher than 0x00FF. That is, all characters outside of the Latin1 set.", " In general unicode characters do not have a unique name; they have only a", " unicode identification code. However, Adobe have a recommended scheme for", " assigning names to certain ranges of characters (extended Latin, Greek, etc).", " Some fonts use this scheme, others do not. By default, gnuplot will use", " the Adobe glyph names. E.g. the lower case Greek letter alpha will be called", " /alpha. If you specific `noadobeglyphnames` then instead gnuplot will use", " /uni03B1 to describe this character. If you get this setting wrong, the", " character may not be found even if it is present in the font.", " It is probably always correct to use the default for Adobe fonts, but for", " other fonts you may have to try both settings. See also `fontfile`.", "", "" END_HELP(post) #endif /* TERM_HELP */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/estimate.trm���������������������������������������������������������������������0000644�0004711�0000144�00000013713�11751656333�013456� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: estimate.trm,v 1.10.2.1 2012/05/06 00:32:17 sfeam Exp $ * */ /* GNUPLOT - estimate.trm */ /* * This file is included by ../src/term.c via term.h. * * This terminal driver supports: * On return from ENHest_put_text() * (*term)->xmax = estimated string width * (*term)->ymax = estimated string height (in tenths of a character height) * * AUTHORS * * Ethan A Merritt - Dec 2004 * */ #include "driver.h" #ifdef TERM_PROTO TERM_PUBLIC void ENHest_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC void ENHest_OPEN __PROTO((char * fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint)); TERM_PUBLIC void ENHest_FLUSH __PROTO((void)); #endif /* TERM_PROTO */ #ifdef TERM_BODY static double ENHest_x, ENHest_y; static double ENHest_xsave, ENHest_ysave; static double ENHest_fragment_width; static double ENHest_fontsize; static double ENHest_min_height, ENHest_max_height; static double ENHest_total_width; static TBOOLEAN ENHest_opened_string; static TBOOLEAN ENHest_show = TRUE; static int ENHest_overprint = 0; static TBOOLEAN ENHest_widthflag = TRUE; #define ENHest_font "" static double ENHest_base; /* Internal routines for UTF-8 support */ static size_t strwidth_utf8 __PROTO((const char *s)); TERM_PUBLIC void ENHest_OPEN( char *fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { /* There are two special cases: * overprint = 3 means save current position * overprint = 4 means restore saved position */ if (overprint == 3) { ENHest_xsave = ENHest_x; ENHest_ysave = ENHest_y; return; } else if (overprint == 4) { ENHest_x = ENHest_xsave; ENHest_y = ENHest_ysave; return; } if (!ENHest_opened_string) { ENHest_opened_string = TRUE; /* Start new text fragment */ ENHest_fragment_width = 0; /* font size will be used to estimate width of each character */ ENHest_fontsize = fontsize > 2.0 ? 1.0 : fontsize; /* Scale fractional font height */ ENHest_base = base * 1.0; if (ENHest_max_height < ENHest_base+1.0*fontsize) ENHest_max_height = ENHest_base+1.0*fontsize; if (ENHest_min_height > ENHest_base) ENHest_min_height = ENHest_base; FPRINTF((stderr,"ENHest_OPEN: base %g fontsize %g min %g max %g\n", base,fontsize,ENHest_min_height,ENHest_max_height)); /* Keep track of whether we are supposed to show this string */ ENHest_show = showflag; /* 0/1/2 no overprint / 1st pass / 2nd pass */ ENHest_overprint = overprint; /* widthflag FALSE means do not update text position after printing */ ENHest_widthflag = widthflag; } } TERM_PUBLIC void ENHest_FLUSH() { double len = ENHest_fragment_width; if (ENHest_opened_string) { ENHest_fragment_width = 0; if (!ENHest_widthflag) /* don't update position */ ; else if (ENHest_overprint == 1) /* First pass of overprint, leave position in center of fragment */ ENHest_x += len / 2; else /* Normal case is to update position to end of fragment */ ENHest_x += len; ENHest_total_width = GPMAX(ENHest_total_width, ENHest_x); ENHest_opened_string = FALSE; } } TERM_PUBLIC void ENHest_put_text(unsigned int x, unsigned int y, const char *str) { /* Set up global variables needed by enhanced_recursion() */ ENHest_fontsize = 1.0; ENHest_opened_string = FALSE; ENHest_max_height = 1.0; ENHest_min_height = 0.0; ENHest_total_width = 0.0; strncpy(enhanced_escape_format,".",sizeof(enhanced_escape_format)); /* If no enhanced text processing is needed, strlen() is sufficient */ if (ignore_enhanced_text || !strpbrk(str, "{}^_@&~\n")) { if (encoding == S_ENC_UTF8) term->xmax = strwidth_utf8(str); else term->xmax = strlen(str); term->ymax = 10; return; } ENHest_x = x; ENHest_y = y; while (*(str = enhanced_recursion((char *)str, TRUE, ENHest_font, ENHest_fontsize, 0.0, TRUE, TRUE, 0))) { (term->enhanced_flush)(); enh_err_check(str); if (!*++str) break; /* end of string */ } if (ENHest_x > 0.0 && ENHest_x < 1.0) ENHest_x = 1; term->xmax = ENHest_total_width; term->ymax = 10. * (ENHest_max_height - ENHest_min_height) + 0.5; } TERM_PUBLIC void ENHest_writec(int c) { if (c == '\n') { ENHest_FLUSH(); ENHest_opened_string = TRUE; ENHest_min_height -= 1.0 * ENHest_fontsize; ENHest_base -= 1.0 * ENHest_fontsize; ENHest_x = 0; } if (encoding == S_ENC_UTF8) { /* Skip all but the first byte of UTF-8 multi-byte characters. */ if ((c & 0xc0) != 0x80) { ENHest_fragment_width += ENHest_fontsize; /* [most] characters above 0x3000 are square CJK glyphs, */ /* which are wider than western characters. */ if ((unsigned int)c >= 0xec) ENHest_fragment_width += ENHest_fontsize; } } else ENHest_fragment_width += ENHest_fontsize; } /* * This routine accounts for multi-byte characters in UTF-8. * NB: It does not return the _number_ of characters in the string, but * rather their approximate _width_ in units of typical character width. * As with the ENHest_writec() routine, it approximates the width of characters * above unicode 0x3000 as being twice that of western alphabetic characters. */ size_t strwidth_utf8(const char *s) { int i = 0, j = 0; while (s[i]) { if ((s[i] & 0xc0) != 0x80) { j++; if ((unsigned char)(s[i]) >= 0xe3) j++; } i++; } return j; } static struct termentry ENHest = { "estimate", "estimate width of enhanced text string", 1, 1, 1, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ENHest_put_text, NULL, NULL, NULL, NULL, NULL, 0, 0, /* pointsize, flags */ NULL, NULL, NULL, NULL #ifdef USE_MOUSE , NULL, NULL, NULL, NULL, NULL #endif , NULL, NULL, NULL, NULL , NULL , ENHest_OPEN, ENHest_FLUSH, ENHest_writec }; #endif /* TERM_BODY */ �����������������������������������������������������gnuplot-4.6.4/term/v384.trm�������������������������������������������������������������������������0000644�0004711�0000144�00000012020�10460036604�012322� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: v384.trm,v 1.12 2006/07/21 02:35:48 sfeam Exp $ * */ /* GNUPLOT - v384.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * Vectrix 384 - works with tandy color printer as well * * AUTHORS * roland@moncskermit.OZ (Roland Yap) * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * Vectrix 384 driver - works with tandy color printer as well * in reverse printing 8 color mode. * This doesn't work on Vectrix 128 because it redefines the * color table. It can be hacked to work on the 128 by changing * the colours but then it will probably not print best. The color * table is purposely designed so that it will print well * */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER register_term(vx384) #endif #ifdef TERM_PROTO TERM_PUBLIC void V384_init __PROTO((void)); TERM_PUBLIC void V384_graphics __PROTO((void)); TERM_PUBLIC void V384_text __PROTO((void)); TERM_PUBLIC void V384_linetype __PROTO((int linetype)); TERM_PUBLIC void V384_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void V384_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void V384_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC void V384_reset __PROTO((void)); #define V384_XMAX 630 #define V384_YMAX 480 #define V384_XLAST (V384_XMAX - 1) #define V384_YLAST (V384_YMAX - 1) #define V384_VCHAR 12 #define V384_HCHAR 7 #define V384_VTIC 8 #define V384_HTIC 7 #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY TERM_PUBLIC void V384_init() { fprintf(gpoutfile, "%c%c G0 \n\ Q 0 8\n\ 0 0 0\n\ 255 0 0\n\ 0 255 0\n\ 0 0 255\n\ 0 255 255\n\ 255 0 255\n\ 255 255 0\n\ 255 255 255\n", 27, 18); } TERM_PUBLIC void V384_graphics() { fprintf(gpoutfile, "%c%c E0 RE N 65535\n", 27, 18); } TERM_PUBLIC void V384_text() { fprintf(gpoutfile, "%c%c\n", 27, 17); } TERM_PUBLIC void V384_linetype(int linetype) { static int color[] = { 1 /* red */ , 2 /* green */ , 3 /* blue */ , 4 /* cyan */ , 5 /* magenta */ , 6 /* yellow */ , /* not a good color so not in use at the moment */ 7 /* white */ }; if (linetype < 0) linetype = 6; else linetype %= 5; fprintf(gpoutfile, "C %d\n", color[linetype]); } TERM_PUBLIC void V384_move(unsigned int x, unsigned int y) { fprintf(gpoutfile, "M %d %d\n", x + 20, y); } TERM_PUBLIC void V384_vector(unsigned int x, unsigned int y) { fprintf(gpoutfile, "L %d %d\n", x + 20, y); } TERM_PUBLIC void V384_put_text(unsigned int x, unsigned int y, const char str[]) { V384_move(x, y + V384_VCHAR / 2); fprintf(gpoutfile, "$%s\n", str); } TERM_PUBLIC void V384_reset() { } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(vx384_driver) "vx384", "Vectrix 384 and Tandy color printer", V384_XMAX, V384_YMAX, V384_VCHAR, V384_HCHAR, V384_VTIC, V384_HTIC, options_null, V384_init, V384_reset, V384_text, null_scale, V384_graphics, V384_move, V384_vector, V384_linetype, V384_put_text, null_text_angle, null_justify_text, do_point, do_arrow, set_font_null TERM_TABLE_END(vx384_driver) #undef LAST_TERM #define LAST_TERM vx384_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(vx384) "1 vx384", "?commands set terminal vx384", "?set terminal vx384", "?set term vx384", "?terminal vx384", "?term vx384", "?vx384", " The `vx384` terminal driver supports the Vectrix 384 and Tandy color", " printers. It has no options." END_HELP(vx384) #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/tek.trm��������������������������������������������������������������������������0000644�0004711�0000144�00000050013�11241135412�012400� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: tek.trm,v 1.20 2009/08/14 01:16:58 sfeam Exp $ * */ /* GNUPLOT - tek.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * tek40xx, bitgraph, kermit_color_tek40xx, kermit_mono_tek40xx, selanar * ln03plus, xterm * * AUTHORS * Colin Kelley, Thomas Williams, Russell Lang * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * Modified June 1995 Ian MacPhedran to support newterm format */ #define TEK #define CTEK #define VTTEK #define XTERM /* Version 4.3: still available, but no longer built by default */ #if 0 #define KERMIT #define SELANAR #define BITGRAPH #endif #include "driver.h" #ifdef TERM_REGISTER register_term(tek40) #ifdef VTTEK register_term(vttek) #endif #ifdef XTERM register_term(xterm) #endif #ifdef KERMIT register_term(kc_tek40) register_term(km_tek40) #endif #ifdef SELANAR register_term(selanar) #endif #ifdef BITGRAPH register_term(bitgraph) #endif #endif /* TERM_REGISTER */ #ifdef TERM_PROTO TERM_PUBLIC void TEK40init __PROTO((void)); TERM_PUBLIC void TEK40graphics __PROTO((void)); TERM_PUBLIC void TEK40text __PROTO((void)); TERM_PUBLIC void TEK40move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void TEK40vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void TEK40put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC void TEK40reset __PROTO((void)); #ifdef BITGRAPH TERM_PUBLIC void BG_text __PROTO((void)); TERM_PUBLIC void BG_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); #endif #if defined(SELANAR) || defined(BITGRAPH) TERM_PUBLIC void TEK40linetype __PROTO((int linetype)); #endif #ifdef KERMIT TERM_PUBLIC void KTEK40graphics __PROTO((void)); TERM_PUBLIC void KTEK40Ctext __PROTO((void)); TERM_PUBLIC void KTEK40Clinetype __PROTO((int linetype)); TERM_PUBLIC void KTEK40Mlinetype __PROTO((int linetype)); TERM_PUBLIC void KTEK40reset __PROTO((void)); #endif #ifdef SELANAR TERM_PUBLIC void SEL_init __PROTO((void)); TERM_PUBLIC void SEL_graphics __PROTO((void)); TERM_PUBLIC void SEL_text __PROTO((void)); TERM_PUBLIC void SEL_reset __PROTO((void)); #endif TERM_PUBLIC void VTTEK40init __PROTO((void)); TERM_PUBLIC void VTTEK40reset __PROTO((void)); TERM_PUBLIC void VTTEK40linetype __PROTO((int linetype)); TERM_PUBLIC void VTTEK40put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC void XTERM_graphics __PROTO((void)); TERM_PUBLIC void XTERM_resume __PROTO((void)); TERM_PUBLIC void XTERM_text __PROTO((void)); TERM_PUBLIC int XTERM_set_font __PROTO((const char * fontname)); TERM_PUBLIC void CTEK_linetype __PROTO((int linetype)); TERM_PUBLIC void CTEK_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void CTEK_vector __PROTO((unsigned int x, unsigned int y)); #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #ifdef TEK #define TEK40XMAX 1024 #define TEK40YMAX 780 #define TEK40XLAST (TEK40XMAX - 1) #define TEK40YLAST (TEK40YMAX - 1) #define TEK40VCHAR 25 #define TEK40HCHAR 14 #define TEK40VTIC 11 #define TEK40HTIC 11 #define HX 0x20 /* bit pattern to OR over 5-bit data */ #define HY 0x20 #define LX 0x40 #define LY 0x60 #define LOWER5 31 #define UPPER5 (31<<5) TERM_PUBLIC void TEK40init() { } TERM_PUBLIC void TEK40graphics() { #ifdef VMS term_pasthru(); #endif /* VMS */ fputs("\033\014", gpoutfile); /* 1 1. clear screen */ (void) fflush(gpoutfile); sleep(1); /* sleep 1 second to allow screen time to clear on real tektronix terminals */ } TERM_PUBLIC void TEK40text() { #ifdef VMS (void) fflush(gpoutfile); /* finish the graphics */ #endif TEK40move(0, 12); fputs("\037", gpoutfile); /* 1 1. into alphanumerics */ #ifdef VMS term_nopasthru(); #endif /* VMS */ } #if defined(SELANAR) || defined(BITGRAPH) TERM_PUBLIC void TEK40linetype(int linetype) { (void) linetype; } #endif TERM_PUBLIC void TEK40move(unsigned int x, unsigned int y) { (void) putc('\035', gpoutfile); /* into graphics */ TEK40vector(x, y); } TERM_PUBLIC void TEK40vector(unsigned int x, unsigned int y) { (void) putc((HY | (y & UPPER5) >> 5), gpoutfile); (void) putc((LY | (y & LOWER5)), gpoutfile); (void) putc((HX | (x & UPPER5) >> 5), gpoutfile); (void) putc((LX | (x & LOWER5)), gpoutfile); } TERM_PUBLIC void TEK40put_text(unsigned int x, unsigned int y, const char str[]) { TEK40move(x, y - 11); fprintf(gpoutfile, "\037%s\n", str); } TERM_PUBLIC void TEK40reset() { } #endif /* TEK */ /* thanks to dukecdu!evs (Ed Simpson) for the BBN BitGraph driver */ #ifdef BITGRAPH #define BG_XMAX 768 /* width of plot area */ #define BG_YMAX 768 /* height of plot area */ #define BG_SCREEN_HEIGHT 1024 /* full screen height */ #define BG_XLAST (BG_XMAX - 1) #define BG_YLAST (BG_YMAX - 1) #define BG_VCHAR 16 #define BG_HCHAR 9 #define BG_VTIC 8 #define BG_HTIC 8 #define BG_init TEK40init #define BG_graphics TEK40graphics #define BG_linetype TEK40linetype #define BG_move TEK40move #define BG_vector TEK40vector #define BG_reset TEK40reset TERM_PUBLIC void BG_text() { #ifdef VMS (void) fflush(gpoutfile); /* finish the graphics */ #endif BG_move(0, BG_SCREEN_HEIGHT - 2 * BG_VCHAR); fputs("\037", gpoutfile); /* 1 1. into alphanumerics */ } TERM_PUBLIC void BG_put_text(unsigned int x, unsigned int y, const char str[]) { BG_move(x, y - 11); fprintf(gpoutfile, "\037%s\n", str); } #endif /* BITGRAPH */ /* Color and Monochrome specials for the MS-DOS Kermit Tektronix Emulator by Russell Lang, eln272v@monu1.cc.monash.oz */ #ifdef KERMIT #define KTEK40HCHAR 13 TERM_PUBLIC void KTEK40graphics() { #ifdef VMS term_mode_tek(); term_pasthru(); #endif /* VMS */ fputs("\033\014", gpoutfile); /* 1 1. clear screen */ /* kermit tektronix emulation doesn't need to wait */ } TERM_PUBLIC void KTEK40Ctext() { TEK40text(); KTEK40Clinetype(0); /* change to green */ #ifdef VMS term_nopasthru(); #endif /* VMS */ } /* special color linetypes for MS-DOS Kermit v2.31 tektronix emulator */ /* 0 = normal, 1 = bright foreground color (30-37) = 30 + colors where colors are 1=red, 2=green, 4=blue */ static const char *kermit_color[15] = {"\033[0;37m", "\033[1;30m", "\033[0;32m", "\033[0;36m", "\033[0;31m", "\033[0;35m", "\033[1;34m", "\033[1;33m", "\033[1;31m", "\033[1;37m", "\033[1;35m", "\033[1;32m", "\033[1;36m", "\033[0;34m", "\033[0;33m"}; TERM_PUBLIC void KTEK40Clinetype(int linetype) { if (linetype < -2) linetype = LT_BLACK; if (linetype >= 13) linetype %= 13; fprintf(gpoutfile, "%s", kermit_color[linetype + 2]); } /* linetypes for MS-DOS Kermit v2.30 tektronix emulator */ /* `=solid, a=fine dots, b=short dashes, c=dash dot, d=long dash dot, e=dash dot dot */ static const char *kerm_linetype = "`a`abcde"; TERM_PUBLIC void KTEK40Mlinetype(int linetype) { if (linetype < -2) linetype = LT_BLACK; if (linetype >= 6) linetype %= 6; fprintf(gpoutfile, "\033%c", kerm_linetype[linetype + 2]); } TERM_PUBLIC void KTEK40reset() { fputs("\030\n", gpoutfile); /* turn off Tek emulation */ #ifdef VMS term_mode_native(); #endif /* VMS */ } #endif /* KERMIT */ /* thanks to sask!macphed (Geoff Coleman and Ian Macphedran) for the Selanar driver */ #ifdef SELANAR TERM_PUBLIC void SEL_init() { fputs("\033\062", gpoutfile); /* 1 1. set to ansi mode */ } TERM_PUBLIC void SEL_graphics() { fputs("\033[H\033[J\033\061\033\014", gpoutfile); /* 1 2 3 1. clear ANSI screen 2. set to TEK mode 3. clear screen */ #ifdef VMS term_pasthru(); #endif /* VMS */ } TERM_PUBLIC void SEL_text() { #ifdef VMS (void) fflush(gpoutfile); /* finish the graphics */ #endif TEK40move(0, 12); fputs("\033\062", gpoutfile); /* 1 1. into ANSI mode */ #ifdef VMS term_nopasthru(); #endif /* VMS */ } TERM_PUBLIC void SEL_reset() { fputs("\033\061\033\012\033\062\033[H\033[J", gpoutfile); /* 1 2 3 4 1 set tek mode 2 clear screen 3 set ansi mode 4 clear screen */ } #endif /* SELANAR */ #ifdef VTTEK TERM_PUBLIC void VTTEK40init() { fputs("\033[?38h", gpoutfile); fflush(gpoutfile); sleep(1); /* sleep 1 second to allow screen time to clear on some terminals */ #ifdef VMS term_mode_tek(); #endif /* VMS */ } TERM_PUBLIC void VTTEK40reset() { fputs("\033[?38l", gpoutfile); fflush(gpoutfile); sleep(1); /* sleep 1 second to allow screen time to clear on some terminals */ #ifdef VMS term_mode_native(); #endif /* VMS */ } /* linetypes for VT-type terminals in tektronix emulator mode */ /* `=solid, a=fine dots, b=short dashes, c=dash dot, d=long dash dot, h=bold solid, i=bold fine dots, j=bold short dashes, k=bold dash dot, l=bold long dash dot */ static const char *vt_linetype = "`a`abcdhijkl"; static int last_vt_linetype = 0; TERM_PUBLIC void VTTEK40linetype(int linetype) { if (linetype < -2) linetype = LT_BLACK; if (linetype >= 10) linetype %= 10; fprintf(gpoutfile, "\033%c", vt_linetype[linetype + 2]); last_vt_linetype = linetype; } TERM_PUBLIC void VTTEK40put_text(unsigned int x, unsigned int y, const char str[]) { int linetype; linetype = last_vt_linetype; VTTEK40linetype(0); TEK40put_text(x, y, str); VTTEK40linetype(linetype); } #endif /* VTTEK */ #ifdef XTERM #define XT_TEK_ESC "\033" #define XT_TEK_GFX XT_TEK_ESC "[?38h" #define XT_TEK_ANSI XT_TEK_ESC "\003" #define XT_TEK_CLR XT_TEK_ESC "\014" #define XT_TEK_ALPHA "\037" static const char *xt_tek_fontsize = "89:;"; TERM_PUBLIC void XTERM_graphics() { XTERM_resume(); fputs(XT_TEK_CLR, gpoutfile); } TERM_PUBLIC void XTERM_resume() { fputs(XT_TEK_GFX, gpoutfile); } TERM_PUBLIC void XTERM_text() { fputs(XT_TEK_ALPHA XT_TEK_ANSI, gpoutfile); } TERM_PUBLIC int XTERM_set_font(const char *fontname) { char size = 0; if (fontname) { size_t lp = strlen(fontname); if (lp>0) size = fontname[lp-1]-'1'; } fprintf(gpoutfile, XT_TEK_ESC "%c", xt_tek_fontsize[size>0&&size<4?size:0]); return(TRUE); } #endif /* XTERM */ #ifdef LN03P TERM_PUBLIC void LN03Pinit() { fputs("\033[?38h", gpoutfile); } TERM_PUBLIC void LN03Preset() { fputs("\033[?38l", gpoutfile); } #endif /* LN03P */ /* tek40xx (monochrome) with linetype support by Jay I. Choe */ #ifdef CTEK /*#define ABS(A) (((A)>=0)? (A):-(A))*/ #define SIGN(A) (((A) >= 0)? 1:-1) static void CT_solid_vector __PROTO((int x, int y)); static void CT_draw_vpoint __PROTO((int x, int y, int last)); static void CT_pattern_vector __PROTO((int x1, int y1)); /* CT_lines are line types defined as bit pattern */ static unsigned long CT_lines[] = {~(unsigned long)0, /* solid line */ 0x000fffff, /* long dash */ 0x00ff00ff, /* short dash */ 0x00f00fff, /* dash-dot */ 0x00f07fff, /* long dash - dot */ 0x07070707, 0x07ff07ff, 0x070707ff}; /* current line pattern */ static unsigned long *CT_pattern = &CT_lines[0]; /* we need to keep track of tek cursor location */ static int CT_last_linetype = 0, CT_last_x, CT_last_y; TERM_PUBLIC void CTEK_linetype(int linetype) { if (linetype < 0) linetype = 0; linetype %= (sizeof(CT_lines) / sizeof(unsigned long)); CT_pattern = &CT_lines[linetype]; CT_last_linetype = linetype; } TERM_PUBLIC void CTEK_move(unsigned int x, unsigned int y) { TEK40move(x, y); CT_last_x = x; CT_last_y = y; } static void CT_solid_vector(int x, int y) { TEK40vector(x, y); CT_last_x = x; CT_last_y = y; } /* simulate pixel draw using tek vector draw. delays actual line drawing until maximum line segment is determined (or first/last point is defined) */ static int CT_penon = 0; /* is Pen on? */ static void CT_draw_vpoint(int x, int y, int last) { static int xx0, yy0, xx1, yy1; if ((*CT_pattern) & 1) { if (CT_penon) { /* This point is a continuation of current line */ xx1 = x; yy1 = y; } else { /* beginning of new line */ xx0 = xx1 = x; yy0 = yy1 = y; CT_penon = 1; } *CT_pattern = ((*CT_pattern) >> 1) | ((unsigned long)1 << 31); /* rotate the pattern */ if (last) { /* draw the line anyway if this is the last point */ TEK40move(xx0, yy0); TEK40vector(xx1, yy1); CT_penon = 0; } } else { /* do not draw this pixel */ if (CT_penon) { /* last line segment ended at the previous pixel. */ /* draw the line */ TEK40move(xx0, yy0); TEK40vector(xx1, yy1); CT_penon = 0; } *CT_pattern = (*CT_pattern) >> 1; /* rotate the current pattern */ } } /* draw vector line with pattern */ static void CT_pattern_vector(int x1, int y1) { int op; /* order parameter */ int x0 = CT_last_x; int y0 = CT_last_y; int dx = x1 - x0; int dy = y1 - y0; int ax = ABS(dx) << 1; int ay = ABS(dy) << 1; int sx = SIGN(dx); int sy = SIGN(dy); if (ax >= ay) { for (op = ay - (ax >> 1); x0 != x1; x0 += sx, op += ay) { CT_draw_vpoint(x0, y0, 0); if (op > 0 || (op == 0 && sx == 1)) { op -= ax; y0 += sy; } } } else { /* ax < ay */ for (op = ax - (ay >> 1); y0 != y1; y0 += sy, op += ax) { CT_draw_vpoint(x0, y0, 0); if (op > 0 || (op == 0 && sy == 1)) { op -= ay; x0 += sx; } } } CT_draw_vpoint(x0, y0, 1); /* last point */ CT_last_x = x1; CT_last_y = y1; } TERM_PUBLIC void CTEK_vector(unsigned int x, unsigned int y) { if (CT_last_linetype <= 0) CT_solid_vector(x, y); else CT_pattern_vector(x, y); } #endif /* CTEK */ #endif /* TERM_BODY */ #ifdef TERM_TABLE #ifdef CTEK TERM_TABLE_START(tek40_driver) "tek40xx", "Tektronix 4010 and others; most TEK emulators", TEK40XMAX, TEK40YMAX, TEK40VCHAR, TEK40HCHAR, TEK40VTIC, TEK40HTIC, options_null, TEK40init, TEK40reset, TEK40text, null_scale, TEK40graphics, CTEK_move, CTEK_vector, CTEK_linetype, TEK40put_text, null_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(tek40_driver) #endif /* CTEK */ #undef LAST_TERM #define LAST_TERM tek40_driver #ifdef VTTEK TERM_TABLE_START(vttek_driver) "vttek", "VT-like tek40xx terminal emulator", TEK40XMAX, TEK40YMAX, TEK40VCHAR, TEK40HCHAR, TEK40VTIC, TEK40HTIC, options_null, VTTEK40init, VTTEK40reset, TEK40text, null_scale, TEK40graphics, TEK40move, TEK40vector, VTTEK40linetype, VTTEK40put_text, null_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(vttek_driver) #undef LAST_TERM #define LAST_TERM vttek_driver #endif /* VTTEK */ #ifdef XTERM TERM_TABLE_START(xterm_driver) "xterm", "Xterm Tektronix 4014 Mode", TEK40XMAX, TEK40YMAX, TEK40VCHAR, TEK40HCHAR, TEK40VTIC, TEK40HTIC, options_null, TEK40init, TEK40reset, XTERM_text, null_scale, XTERM_graphics, TEK40move, TEK40vector, VTTEK40linetype, VTTEK40put_text, null_text_angle, null_justify_text, line_and_point, do_arrow, XTERM_set_font, 0, TERM_CAN_MULTIPLOT|TERM_NO_OUTPUTFILE, XTERM_text, XTERM_resume TERM_TABLE_END(xterm_driver) #undef LAST_TERM #define LAST_TERM xterm_driver #endif /* XTERM */ #ifdef KERMIT TERM_TABLE_START(kc_tek40_driver) "kc_tek40xx", "MS-DOS Kermit Tek4010 terminal emulator - color", TEK40XMAX, TEK40YMAX, TEK40VCHAR, KTEK40HCHAR, TEK40VTIC, TEK40HTIC, options_null, TEK40init, KTEK40reset, KTEK40Ctext, null_scale, KTEK40graphics, TEK40move, TEK40vector, KTEK40Clinetype, TEK40put_text, null_text_angle, null_justify_text, do_point, do_arrow, set_font_null TERM_TABLE_END(kc_tek40_driver) #undef LAST_TERM #define LAST_TERM kc_tek40_driver TERM_TABLE_START(km_tek40_driver) "km_tek40xx", "MS-DOS Kermit Tek4010 terminal emulator - monochrome", TEK40XMAX, TEK40YMAX, TEK40VCHAR, KTEK40HCHAR, TEK40VTIC, TEK40HTIC, options_null, TEK40init, KTEK40reset, TEK40text, null_scale, KTEK40graphics, TEK40move, TEK40vector, KTEK40Mlinetype, TEK40put_text, null_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(km_tek40_driver) #undef LAST_TERM #define LAST_TERM km_tek40_driver #endif /* KERMIT */ #ifdef SELANAR TERM_TABLE_START(selanar_driver) "selanar", "Selanar", TEK40XMAX, TEK40YMAX, TEK40VCHAR, TEK40HCHAR, TEK40VTIC, TEK40HTIC, options_null, SEL_init, SEL_reset, SEL_text, null_scale, SEL_graphics, TEK40move, TEK40vector, TEK40linetype, TEK40put_text, null_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(selanar_driver) #undef LAST_TERM #define LAST_TERM selanar_driver #endif /* SELANAR */ #ifdef BITGRAPH TERM_TABLE_START(bitgraph_driver) "bitgraph", "BBN Bitgraph Terminal", BG_XMAX, BG_YMAX, BG_VCHAR, BG_HCHAR, BG_VTIC, BG_HTIC, options_null, BG_init, BG_reset, BG_text, null_scale, BG_graphics, BG_move, BG_vector, BG_linetype, BG_put_text, null_text_angle, null_justify_text, line_and_point, do_arrow, set_font_null TERM_TABLE_END(bitgraph_driver) #undef LAST_TERM #define LAST_TERM bitgraph_driver #endif /* BITGRAPH */ #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(tek40) "1 tek40", "?commands set terminal tek40xx", "?set terminal tek40xx", "?set term tek40xx", "?terminal tek40xx", "?term tek40xx", "?tek40", "?commands set terminal vttek", "?set terminal vttek", "?set term vttek", "?terminal vttek", "?term vttek", "?vttek", "?commands set terminal xterm", "?set terminal xterm", "?set term xterm", "?terminal xterm", "?term xterm", "?xterm", #ifdef KERMIT "?commands set terminal kc-tek40xx", "?set terminal kc-tek40xx", "?set term kc-tek40xx", "?terminal kc-tek40xx", "?term kc-tek40xx", "?kc-tek40xx", "?commands set terminal km-tek40xx", "?set terminal km-tek40xx", "?set term km-tek40xx", "?terminal km-tek40xx", "?term km-tek40xx", "?km-tek40xx", #endif #ifdef SELANAR "?commands set terminal selanar", "?set terminal selanar", "?set term selanar", "?terminal selanar", "?term selanar", "?selanar", #endif #ifdef BITGRAPH "?commands set terminal bitgraph", "?set terminal bitgraph", "?set term bitgraph", "?terminal bitgraph", "?term bitgraph", "?bitgraph", #endif " This family of terminal drivers supports a variety of VT-like terminals.", " `tek40xx` supports Tektronix 4010 and others as well as most TEK emulators.", " `vttek` supports VT-like tek40xx terminal emulators.", " The following are present only if selected when gnuplot is built:", " `kc-tek40xx` supports MS-DOS Kermit Tek4010 terminal emulators in color;", " `km-tek40xx` supports them in monochrome. `selanar` supports Selanar graphics.", " `bitgraph` supports BBN Bitgraph terminals.", " None have any options." END_HELP(tek40) #endif /* TERM_HELP */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/metapost.trm���������������������������������������������������������������������0000644�0004711�0000144�00000107426�11640460414�013472� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: metapost.trm,v 1.45 2011/09/27 23:49:32 sfeam Exp $ */ /* GNUPLOT - metapost.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* 1999/04/22 * GNUPLOT -- metapost.trm * * This terminal driver supports: * Metapost Commands * * Based on metafont.trm, written by * Pl Hedne * Trondheim, Norway * Pal.Hedne@termo.unit.no; * with improvements by Carsten Steger * * and pstricks.trm, written by * David Kotz and Raymond Toy * * Adapted to metapost by: * Daniel H. Luecking <luecking@comp.uark.edu> and * L Srinivasa Mohan <mohan@chemeng.iisc.ernet.in> */ #include "driver.h" #ifdef TERM_REGISTER register_term(mp) #endif #ifdef TERM_PROTO TERM_PUBLIC void MP_options __PROTO((void)); TERM_PUBLIC void MP_init __PROTO((void)); TERM_PUBLIC void MP_graphics __PROTO((void)); TERM_PUBLIC void MP_text __PROTO((void)); TERM_PUBLIC void MP_linetype __PROTO((int linetype)); TERM_PUBLIC void MP_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void MP_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void MP_pointsize __PROTO((double size)); TERM_PUBLIC void MP_linewidth __PROTO((double width)); TERM_PUBLIC void MP_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void MP_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); TERM_PUBLIC void MP_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC int MP_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC int MP_text_angle __PROTO((int ang)); TERM_PUBLIC void MP_reset __PROTO((void)); TERM_PUBLIC int MP_set_font __PROTO((const char *font)); TERM_PUBLIC void MP_boxfill __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); TERM_PUBLIC int MP_make_palette __PROTO((t_sm_palette *)); TERM_PUBLIC void MP_previous_palette __PROTO((void)); TERM_PUBLIC void MP_set_color __PROTO((t_colorspec *)); TERM_PUBLIC void MP_filled_polygon __PROTO((int, gpiPoint *)); /* 5 inches wide by 3 inches high (default) */ #define MP_XSIZE 5.0 #define MP_YSIZE 3.0 /* gnuplot units will be one pixel if printing device has this resolution. Too small resolutions (like 300) can give rough appearence to curves when user tries to smooth a curve by choosing high sampling rate. */ #define MP_DPI (2400) #define MP_XMAX (MP_XSIZE*MP_DPI) #define MP_YMAX (MP_YSIZE*MP_DPI) #define MP_HTIC (5*MP_DPI/72) /* nominally 5pt */ #define MP_VTIC (5*MP_DPI/72) /* " 5pt */ #define MP_HCHAR (MP_DPI*53/10/72) /* " 5.3pt */ #define MP_VCHAR (MP_DPI*11/72) /* " 11pt */ #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static double MP_xsize = MP_XSIZE; static double MP_ysize = MP_YSIZE; /* static double MP_xmax = MP_XMAX; static double MP_ymax = MP_YMAX; * unused, for now */ static int MP_posx; static int MP_posy; static char MP_fontname[MAX_ID_LEN + 1]; static double MP_fontsize; static double MP_textmag; static enum JUSTIFY MP_justify = LEFT; static int MP_ang = 0; static int MP_char_code = 0; /* number of nodes in an output line so far */ static int MP_linecount = 1; /* Number of point types */ #define MP_POINT_TYPES 10 /* Number of line types */ #define MP_LINE_TYPES 8 /* are we in the middle of a MP path? */ static TBOOLEAN MP_inline = FALSE; /* colored or dashed lines? */ static TBOOLEAN MP_color = FALSE; static TBOOLEAN MP_solid = FALSE; /* compatability mode*/ /* static TBOOLEAN MP_notex = FALSE; */ #define MP_NO_TEX 0 #define MP_TEX 1 #define MP_LATEX 2 static int MP_tex = MP_TEX; /* add usepackage instructions for PSNFSS ? */ #define MP_PSNFSS_NONE 0 #define MP_PSNFSS_7 1 #define MP_PSNFSS_8 2 static int MP_psnfss = MP_PSNFSS_NONE; /* should amstex packages be included? */ static int MP_amstex = 0; /* add a4paper option to documentclass */ static int MP_a4paper = 0; /* write a prologues line */ static int MP_prologues = -1; /* has color changed? */ static int MP_color_changed = 0; /* has a font change taken place? */ static TBOOLEAN MP_fontchanged = FALSE; /* The old types */ static int MP_oldline = -2; /* The old sizes */ static double MP_oldptsize = 1.0; static double MP_oldpen = 1.0; /* terminate any path in progress */ static void MP_endline __PROTO((void)); /* max number of path nodes before a newline */ #define MP_LINEMAX 5 enum MP_id { MP_OPT_MONOCHROME, MP_OPT_COLOUR, MP_OPT_SOLID, MP_OPT_DASHED, MP_OPT_NOTEX, MP_OPT_TEX, MP_OPT_LATEX, MP_OPT_A4PAPER, MP_OPT_PSNFSS, MP_OPT_PSNFSS_V7, MP_OPT_NOPSNFSS, MP_OPT_AMSTEX, MP_OPT_FONT, MP_OPT_FONTSIZE, MP_OPT_PROLOGUES, MP_OPT_NOPROLOGUES, MP_OPT_MAGNIFICATION, MP_OPT_OTHER }; static struct gen_table MP_opts[] = { { "mo$nochrome", MP_OPT_MONOCHROME }, { "c$olor", MP_OPT_COLOUR }, { "c$olour", MP_OPT_COLOUR }, { "s$olid", MP_OPT_SOLID }, { "da$shed", MP_OPT_DASHED }, { "n$otex", MP_OPT_NOTEX }, { "t$ex", MP_OPT_TEX }, { "la$tex", MP_OPT_LATEX }, { "a4$paper", MP_OPT_A4PAPER }, { "am$stex", MP_OPT_AMSTEX }, { "ps$nfss", MP_OPT_PSNFSS }, { "psnfss-v$ersion7", MP_OPT_PSNFSS_V7 }, { "nops$nfss", MP_OPT_NOPSNFSS }, { "pro$logues", MP_OPT_PROLOGUES }, { "nopro$logues", MP_OPT_NOPROLOGUES }, { "ma$gnification", MP_OPT_MAGNIFICATION }, { "fo$nt", MP_OPT_FONT }, { NULL, MP_OPT_OTHER } }; TERM_PUBLIC void MP_options() { struct value a; /* Annoying hack to handle the case of 'set termoption' after */ /* we have already initialized the terminal. */ if (c_token != 2) { MP_color = FALSE; MP_solid = FALSE; MP_tex = MP_TEX; MP_a4paper = 0; MP_amstex = 0; MP_psnfss = MP_PSNFSS_NONE; MP_fontsize = 10.0; MP_textmag = 1.0; MP_prologues = -1; strcpy(MP_fontname, "cmr10"); } while (!END_OF_COMMAND) { int option = lookup_table(&MP_opts[0], c_token); switch (option) { case MP_OPT_MONOCHROME: MP_color = FALSE; c_token++; break; case MP_OPT_COLOUR: MP_color = TRUE; c_token++; break; case MP_OPT_SOLID: MP_solid = TRUE; c_token++; break; case MP_OPT_DASHED: MP_solid = FALSE; c_token++; break; case MP_OPT_NOTEX: MP_tex = MP_NO_TEX; strcpy(MP_fontname, "pcrr8r"); c_token++; break; case MP_OPT_TEX: MP_tex = MP_TEX; c_token++; break; case MP_OPT_LATEX: MP_tex = MP_LATEX; c_token++; break; case MP_OPT_AMSTEX: MP_tex = MP_LATEX; /* only makes sense when using LaTeX */ MP_amstex = 1; c_token++; break; case MP_OPT_A4PAPER: MP_tex = MP_LATEX; /* only makes sense when using LaTeX */ MP_a4paper = 1; c_token++; break; case MP_OPT_PSNFSS: MP_tex = MP_LATEX; /* only makes sense when using LaTeX */ MP_psnfss = MP_PSNFSS_8; c_token++; break; case MP_OPT_PSNFSS_V7: MP_tex = MP_LATEX; /* only makes sense when using LaTeX */ MP_psnfss = MP_PSNFSS_7; c_token++; break; case MP_OPT_NOPSNFSS: MP_psnfss = MP_PSNFSS_NONE; c_token++; break; case MP_OPT_PROLOGUES: c_token++; if (!(END_OF_COMMAND)) { int dummy_for_prologues; if (sscanf(gp_input_line + token[c_token].start_index, "%d", &dummy_for_prologues) == 1) { MP_prologues = dummy_for_prologues; } c_token++; } break; case MP_OPT_NOPROLOGUES: MP_prologues = -1; c_token++; break; case MP_OPT_MAGNIFICATION: c_token++; if (!END_OF_COMMAND) /* global text scaling */ MP_textmag = (double) real(const_express(&a)); /* c_token++; */ /* Needed ??? */ break; case MP_OPT_FONT: c_token++; case MP_OPT_OTHER: default: { char *s; if ((s = try_to_get_string())) { int sep = strcspn(s,","); if (sep > 0) { strncpy(MP_fontname, s, sizeof(MP_fontname)); MP_fontname[sep] = '\0'; } if (s[sep] == ',') sscanf(&s[sep+1],"%lf",&MP_fontsize); free(s); } else if (option == MP_OPT_FONT) { int_error(c_token,"expecting font name"); } else if (!END_OF_COMMAND) { /*font size */ MP_fontsize = (double) real(const_express(&a)); c_token++; } break; } } } /* minimal error recovery: */ if (MP_fontsize < 5.0) MP_fontsize = 5.0; if (MP_fontsize > 99.99) MP_fontsize = 99.99; term->v_char = (unsigned int) (MP_DPI * MP_fontsize * MP_textmag * 11 / 720); if (MP_tex == MP_NO_TEX) { /* Courier is a little wider than cmtt */ term->h_char = (unsigned int) (MP_DPI * MP_fontsize * MP_textmag * 6.0 / 720 + 0.5); } else { term->h_char = (unsigned int) (MP_DPI * MP_fontsize * MP_textmag * 5.3 / 720 + 0.5); } if (MP_psnfss == MP_PSNFSS_NONE) { /* using the normal font scheme */ sprintf(term_options, "%s %s %stex%s%s mag %.3f font \"%s,%.2f\" %sprologues(%d)", MP_color ? "color" : "monochrome", MP_solid ? "solid" : "dashed", (MP_tex == MP_NO_TEX) ? "no" : (MP_tex == MP_LATEX) ? "la" : "", MP_a4paper ? " a4paper" : "", MP_amstex ? " amstex" : "", MP_textmag, MP_fontname, MP_fontsize, (MP_prologues > -1) ? "" : "no", MP_prologues ); } else { /* using postscript fonts */ sprintf(term_options, "%s %s %stex%s%s mag %.3f %s %sprologues(%d)", MP_color ? "color" : "monochrome", MP_solid ? "solid" : "dashed", (MP_tex == MP_NO_TEX) ? "no" : (MP_tex == MP_LATEX) ? "la" : "", MP_a4paper ? " a4paper" : "", MP_amstex ? " amstex" : "", MP_textmag, (MP_psnfss == MP_PSNFSS_7) ? "psnsfss(v7)" : "psnsfss", (MP_prologues > -1) ? "" : "no", MP_prologues ); }; } TERM_PUBLIC void MP_init() { time_t now; time(&now); MP_posx = MP_posy = 0; fprintf(gpoutfile, "%%GNUPLOT Metapost output: %s\n", asctime(localtime(&now))); if (MP_prologues > -1) { fprintf(gpoutfile, "prologues:=%d;\n", MP_prologues); } if (MP_tex == MP_LATEX) { fputs("\n\ %% Add \\documentclass and \\begin{dcoument} for latex\n\ %% NB you should set the environment variable TEX to the name of your\n\ %% latex executable (normally latex) inorder for metapost to work\n\ %% or run\n\ %% mpost --tex=latex ...\n\ \n\ % BEGPRE\n\ verbatimtex\n", gpoutfile); if (MP_a4paper) { fputs("\\documentclass[a4paper]{article}\n", gpoutfile); } else { fputs("\\documentclass{article}\n", gpoutfile); } switch (MP_psnfss) { case MP_PSNFSS_7:{ fputs("\\usepackage[latin1]{inputenc}\n\ \\usepackage[T1]{fontenc}\n\ \\usepackage{times,mathptmx}\n\ \\usepackage{helvet}\n\ \\usepackage{courier}\n", gpoutfile); } break; case MP_PSNFSS_8:{ fputs("\\usepackage[latin1]{inputenc}\n\ \\usepackage[T1]{fontenc}\n\ \\usepackage{textcomp}\n\ \\usepackage{mathptmx}\n\ \\usepackage[scaled=.92]{helvet}\n\ \\usepackage{courier}\n\ \\usepackage{latexsym}\n", gpoutfile); } break; } if (MP_amstex) { fputs("\\usepackage[intlimits]{amsmath}\n\ \\usepackage{amsfonts}\n", gpoutfile); }; fputs("\\begin{document}\n\ etex\n% ENDPRE\n", gpoutfile); } fputs("\n\ warningcheck:=0;\n\ defaultmpt:=mpt:=4;\n\ th:=.6;\n\ %% Have nice sharp joins on our lines\n\ linecap:=butt;\n\ linejoin:=mitered;\n\ \n\ def scalepen expr n = pickup pencircle scaled (n*th) enddef;\n\ def ptsize expr n = mpt:=n*defaultmpt enddef;\n\ \n", gpoutfile); fprintf(gpoutfile, "\ntextmag:=%6.3f;\n", MP_textmag); fputs("\ vardef makepic(expr str) =\n\ if picture str : str scaled textmag\n\ % otherwise a string\n\ else: str infont defaultfont scaled (defaultscale*textmag)\n\ fi\n\ enddef;\n\ \n\ def infontsize(expr str, size) =\n\ infont str scaled (size / fontsize str)\n\ enddef;\n", gpoutfile); if (MP_tex == MP_NO_TEX) { fprintf(gpoutfile, "\n\ defaultfont:= \"%s\";\n\ defaultscale := %6.3f/fontsize defaultfont;\n", MP_fontname, MP_fontsize); } else { if (MP_tex != MP_LATEX) { fputs("\n\ %font changes\n\ verbatimtex\n\ \\def\\setfont#1#2{%.\n\ \\font\\gpfont=#1 at #2pt\n\ \\gpfont}\n", gpoutfile); fprintf(gpoutfile, "\\setfont{%s}{%5.2f}\netex\n", MP_fontname, MP_fontsize); } } fputs("\n\ color currentcolor; currentcolor:=black;\n\ color fillcolor;\n\ boolean colorlines,dashedlines;\n", gpoutfile); if (MP_color) { fputs("colorlines:=true;\n", gpoutfile); } else { fputs("colorlines:=false;\n", gpoutfile); } if (MP_solid) { fputs("dashedlines:=false;\n", gpoutfile); } else { fputs("dashedlines:=true;\n", gpoutfile); } fputs("\n\ def _wc = withpen currentpen withcolor currentcolor enddef;\n\ def _ac = addto currentpicture enddef;\n\ def _sms = scaled mpt shifted enddef;\n\ % drawing point-types\n\ def gpdraw (expr n, x, y) =\n\ if n<0: _ac contour fullcircle _sms (x,y)\n\ elseif (n=1) or (n=3):\n\ _ac doublepath ptpath[n] _sms (x,y) _wc;\n\ _ac doublepath ptpath[n] rotated 90 _sms (x,y) _wc\n\ elseif n<6: _ac doublepath ptpath[n] _sms (x,y) _wc\n\ else: _ac contour ptpath[n] _sms (x,y) _wc\n\ fi\n\ enddef;\n\ \n\ % the point shapes\n\ path ptpath[];\n\ %diamond\n\ ptpath0 = ptpath6 = (-1/2,0)--(0,-1/2)--(1/2,0)--(0,1/2)--cycle;\n\ % plus sign\n\ ptpath1 = (-1/2,0)--(1/2,0);\n\ % square\n\ ptpath2 = ptpath7 = (-1/2,-1/2)--(1/2,-1/2)--(1/2,1/2)--(-1/2,1/2)--cycle;\n\ % cross\n\ ptpath3 := (-1/2,-1/2)--(1/2,1/2);\n\ % circle:\n\ ptpath4 = ptpath8:= fullcircle;\n\ % triangle\n\ ptpath5 = ptpath9 := (0,1/2)--(-1/2,-1/2)--(1/2,-1/2)--cycle;\n\ \n\ def linetype expr n =\n\ currentcolor:= if colorlines : col[n] else: black fi;\n\ if n = -1 :\n\ drawoptions(withcolor currentcolor withpen (currentpen scaled .5));\n\ elseif n < 1 :\n\ drawoptions(_wc);\n\ else :\n\ drawoptions( if dashedlines: dashed lt[n] fi _wc);\n\ fi\n\ enddef;\n\ \n\ % dash patterns\n\ picture lt[];\n\ lt1=dashpattern(on 2 off 2); % dashes\n\ lt2=dashpattern(on 2 off 2 on 0.2 off 2); %dash-dot\n\ lt3=lt1 scaled 1.414;\n\ lt4=lt2 scaled 1.414;\n\ lt5=lt1 scaled 2;\n\ lt6:=lt2 scaled 2;\n\ lt7=dashpattern(on 0.2 off 2); %dots\n\ \n\ color col[],cyan, magenta, yellow;\n\ cyan=blue+green; magenta=red+blue;yellow=green+red;\n\ col[-2]:=col[-1]:=col0:=black;\n\ col1:=red;\n\ col2:=(.2,.2,1); %blue\n\ col3:=(1,.66,0); %orange\n\ col4:=.85*green;\n\ col5:=.9*magenta;\n\ col6:=0.85*cyan;\n\ col7:=.85*yellow;\n\ \n\ %placing text\n\ picture GPtext;\n\ def put_text(expr pic, x, y, r, j) =\n\ GPtext:=makepic(pic);\n\ GPtext:=GPtext shifted\n\ if j = 1: (-(ulcorner GPtext + llcorner GPtext)/2)\n\ elseif j = 2: (-center GPtext)\n\ else: (-(urcorner GPtext + lrcorner GPtext)/2)\n\ fi\n\ rotated r;\n\ addto currentpicture also GPtext shifted (x,y)\n\ enddef;\n", gpoutfile); } TERM_PUBLIC void MP_graphics() { /* initialize "remembered" drawing parameters */ MP_oldline = -2; MP_oldpen = 1.0; MP_oldptsize = pointsize; fprintf(gpoutfile, "\nbeginfig(%d);\nw:=%.3fin;h:=%.3fin;\n", MP_char_code, MP_xsize, MP_ysize); /* MetaPost can only handle numbers up to 4096. When MP_DPI * is larger than 819, this is exceeded by (term->xmax). So we * scale it and all coordinates down by factor of 10.0. And * compensate by scaling a and b up. */ fprintf(gpoutfile, "a:=w/%.1f;b:=h/%.1f;\n", (term->xmax) / 10.0, (term->ymax) / 10.0); fprintf(gpoutfile, "scalepen 1; ptsize %.3f;linetype -2;\n", pointsize); MP_char_code++; /* reset MP_color_changed */ MP_color_changed = 0; } TERM_PUBLIC void MP_text() { if (MP_inline) MP_endline(); fputs("endfig;\n", gpoutfile); } TERM_PUBLIC void MP_linetype(int lt) { int linetype = lt; if (linetype >= MP_LINE_TYPES) linetype %= MP_LINE_TYPES; if (MP_inline) MP_endline(); /* reset the color in case it has been changed in MP_set_color() */ if (MP_color_changed) { MP_oldline = linetype + 1; MP_color_changed = 0; } if (MP_oldline != linetype) { fprintf(gpoutfile, "linetype %d;\n", linetype); MP_oldline = linetype; } } TERM_PUBLIC void MP_move(unsigned int x, unsigned int y) { if ((x != MP_posx) || (y != MP_posy)) { if (MP_inline) MP_endline(); MP_posx = x; MP_posy = y; } /* else we seem to be there already */ } TERM_PUBLIC void MP_point(unsigned int x, unsigned int y, int pt) { int pointtype = pt; if (MP_inline) MP_endline(); /* Print the shape defined by 'number'; number < 0 means to use a dot, otherwise one of the defined points. */ if (pointtype >= MP_POINT_TYPES) pointtype %= MP_POINT_TYPES; /* Change %d to %f, divide x,y by 10 */ fprintf(gpoutfile, "gpdraw(%d,%.1fa,%.1fb);\n", pointtype, x / 10.0, y / 10.0); } TERM_PUBLIC void MP_pointsize(double ps) { if (ps < 0) ps = 1; if (MP_oldptsize != ps) { if (MP_inline) MP_endline(); fprintf(gpoutfile, "ptsize %.3f;\n", ps); MP_oldptsize = ps; } } TERM_PUBLIC void MP_linewidth(double lw) { if (MP_oldpen != lw) { if (MP_inline) MP_endline(); fprintf(gpoutfile, "scalepen %.3f;\n", lw); MP_oldpen = lw; } } TERM_PUBLIC void MP_vector(unsigned int ux, unsigned int uy) { if ((ux == MP_posx) && (uy == MP_posy)) return; /* Zero length line */ if (MP_inline) { if (MP_linecount++ >= MP_LINEMAX) { fputs("\n", gpoutfile); MP_linecount = 1; } } else { MP_inline = TRUE; fprintf(gpoutfile, "draw (%.1fa,%.1fb)", MP_posx / 10.0, MP_posy / 10.0); MP_linecount = 2; } MP_posx = ux; MP_posy = uy; fprintf(gpoutfile, "--(%.1fa,%.1fb)", MP_posx / 10.0, MP_posy / 10.0); } static void MP_endline() { MP_inline = FALSE; fprintf(gpoutfile, ";\n"); } TERM_PUBLIC void MP_arrow(unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { MP_move(sx, sy); if (head) { fprintf(gpoutfile, "%s (%.1fa,%.1fb)--(%.1fa,%.1fb);\n", head == 1 ? "drawarrow" : "drawdblarrow", sx / 10.0, sy / 10.0, ex / 10.0, ey / 10.0); } else if ((sx != ex) || (sy != ey)) { fprintf(gpoutfile, "draw (%.1fa,%.1fb)--(%.1fa,%.1fb);\n", sx / 10.0, sy / 10.0, ex / 10.0, ey / 10.0); } /* else: arrow with no length and no head = sound of one hand clapping? */ MP_posx = ex; MP_posy = ey; } TERM_PUBLIC void MP_put_text(unsigned int x, unsigned int y, const char str[]) { int i, j = 0; char *text; /* ignore empty strings */ if (!str || !*str) return; /* F***. why do drivers need to modify string args? */ text = gp_strdup(str); if (MP_inline) MP_endline(); switch (MP_justify) { case LEFT: j = 1; break; case CENTRE: j = 2; break; case RIGHT: j = 3; break; } if (MP_tex == MP_NO_TEX) { for (i = 0; i < strlen(text); i++) if (text[i] == '"') text[i] = '\''; /* Replace " with ' */ if (MP_fontchanged) { fprintf(gpoutfile, "\ put_text(\"%s\" infontsize(\"%s\",%5.2f), %.1fa, %.1fb, %d, %d);\n", text, MP_fontname, MP_fontsize, x / 10.0, y / 10.0, MP_ang, j); } else { fprintf(gpoutfile, "put_text(\"%s\", %.1fa, %.1fb, %d, %d);\n", text, x / 10.0, y / 10.0, MP_ang, j); } } else if (MP_fontchanged) { if (MP_tex != MP_LATEX) { fprintf(gpoutfile, "\ put_text( btex \\setfont{%s}{%5.2f} %s etex, %.1fa, %.1fb, %d, %d);\n", MP_fontname, MP_fontsize, text, x / 10.0, y / 10.0, MP_ang, j); } else { fprintf(gpoutfile, "put_text( btex %s etex, %.1fa, %.1fb, %d, %d);\n", text, x / 10.0, y / 10.0, MP_ang, j); } } else { fprintf(gpoutfile, "put_text( btex %s etex, %.1fa, %.1fb, %d, %d);\n", text, x / 10.0, y / 10.0, MP_ang, j); } free(text); } TERM_PUBLIC int MP_justify_text(enum JUSTIFY mode) { MP_justify = mode; return (TRUE); } TERM_PUBLIC int MP_text_angle(int ang) { /* Metapost code does the conversion */ MP_ang = ang; return (TRUE); } TERM_PUBLIC int MP_set_font(const char *font) { if (*font) { size_t sep = strcspn(font, ","); if (sep < sizeof(MP_fontname)) strncpy(MP_fontname, font, sizeof(MP_fontname)); sscanf(&(font[sep + 1]), "%lf", &MP_fontsize); if (MP_fontsize < 5) MP_fontsize = 5.0; if (MP_fontsize >= 100) MP_fontsize = 99.99; /* */ MP_fontchanged = TRUE; } else { MP_fontchanged = FALSE; } return TRUE; } TERM_PUBLIC void MP_reset() { if (MP_tex == MP_LATEX) { fputs("% BEGPOST\n",gpoutfile); fputs("verbatimtex\n",gpoutfile); fputs(" \\end{document}\n",gpoutfile); fputs("etex\n",gpoutfile); fputs("% ENDPOST\n",gpoutfile); }; fputs("end.\n", gpoutfile); } TERM_PUBLIC void MP_boxfill( int style, unsigned int x1, unsigned int y1, unsigned int wd, unsigned int ht) { /* fillpar: * - solid : 0 - 100% intensity * - pattern : 0 - n pattern number */ int fillpar = style >> 4; style &= 0xf; if (MP_inline) MP_endline(); switch (style) { case FS_EMPTY: /* fill with background color */ fprintf(gpoutfile, "\ fill (%.1fa,%.1fb)--(%.1fa,%.1fb)--(%.1fa,%.1fb)--(%.1fa,%.1fb)--cycle withcolor background;\n", x1 / 10.0, y1 / 10.0, (x1 + wd) / 10.0, y1 / 10.0, (x1 + wd) / 10.0, (y1 + ht) / 10.0, x1 / 10.0, (y1 + ht) / 10.0); break; case FS_PATTERN: /* pattern fill */ case FS_TRANSPARENT_PATTERN: /* FIXME: not yet implemented, dummy it up as fill density */ fillpar *= 12; default: case FS_SOLID: /* solid fill */ case FS_TRANSPARENT_SOLID: if (fillpar < 100) { double density = (100-fillpar) * 0.01; fprintf(gpoutfile,"fillcolor:=currentcolor*%.2f+background*%.2f;\n", 1.0-density, density); MP_color_changed = 1; } else fprintf(gpoutfile,"fillcolor:=currentcolor;\n"); fprintf(gpoutfile, "\ fill (%.1fa,%.1fb)--(%.1fa,%.1fb)--(%.1fa,%.1fb)--(%.1fa,%.1fb)--cycle withpen (pencircle scaled 0pt) withcolor fillcolor;\n", x1 / 10.0, y1 / 10.0, (x1 + wd) / 10.0, y1 / 10.0, (x1 + wd) / 10.0, (y1 + ht) / 10.0, x1 / 10.0, (y1 + ht) / 10.0); break; } } TERM_PUBLIC int MP_make_palette(t_sm_palette *palette) { /* metapost can do continuous number of colours */ return 0; } TERM_PUBLIC void MP_set_color(t_colorspec *colorspec) { double gray = colorspec->value; rgb_color color; /* remeber that we changed the color, needed to reset color in MP_linetype()*/ MP_color_changed = 1; if (MP_inline) MP_endline(); if (!MP_color) { /* gray mode */ if (gray < 1e-3) gray = 0; fprintf(gpoutfile, "currentcolor:=%.3gwhite;\n", gray); } else { /* color mode */ if (colorspec->type == TC_LT) { int linecolor = colorspec->lt; if (linecolor >= MP_LINE_TYPES) linecolor %= MP_LINE_TYPES; if (linecolor == -1) fprintf(gpoutfile, "currentcolor:=black;\n"); else if (linecolor >= 0) fprintf(gpoutfile, "currentcolor:=col%d;\n",linecolor); } if (colorspec->type == TC_FRAC) { if (sm_palette.colors != 0) /* finite nb of colors explicitly requested */ gray = (gray >= ((double)(sm_palette.colors-1)) / sm_palette.colors) ? 1 : floor(gray * sm_palette.colors) / sm_palette.colors; rgb1_from_gray( gray, &color ); } else if (colorspec->type == TC_RGB) { color.r = (double)((colorspec->lt >> 16 ) & 255) / 255.; color.g = (double)((colorspec->lt >> 8 ) & 255) / 255.; color.b = (double)(colorspec->lt & 255) / 255.; } else return; if (color.r < 1e-4) color.r = 0; if (color.g < 1e-4) color.g = 0; if (color.b < 1e-4) color.b = 0; fprintf(gpoutfile, "currentcolor:=%.4g*red+%.4g*green+%.4g*blue;\n", color.r, color.g, color.b); } return; } TERM_PUBLIC void MP_filled_polygon(int points, gpiPoint *corners) { int i; int fillpar = corners->style >> 4; int style = corners->style & 0xf; if (MP_inline) MP_endline(); switch (style) { case FS_EMPTY: /* fill with background color */ fprintf(gpoutfile,"fillcolor:=background;\n"); break; case FS_PATTERN: /* pattern fill implemented as partial density */ case FS_TRANSPARENT_PATTERN: fillpar *= 12; case FS_SOLID: /* solid fill */ case FS_TRANSPARENT_SOLID: if (fillpar < 100) { double density = (100-fillpar) * 0.01; fprintf(gpoutfile,"fillcolor:=currentcolor*%.2f+background*%.2f;\n", 1.0-density, density); } else { fprintf(gpoutfile,"fillcolor:=currentcolor;\n"); } default: break; } fprintf(gpoutfile, "fill "); for (i = 0; i < points; i++) fprintf(gpoutfile, "(%.1fa,%.1fb)%s", corners[i].x / 10.0, corners[i].y / 10.0, (i < points - 1 && (i + 1) % MP_LINEMAX == 0) ? "\n--" : "--"); fprintf(gpoutfile, "cycle withcolor fillcolor;\n"); } TERM_PUBLIC void MP_previous_palette() { return; } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(mp_driver) "mp", "MetaPost plotting standard", MP_XMAX, MP_YMAX, MP_VCHAR, MP_HCHAR, MP_VTIC, MP_HTIC, MP_options, MP_init, MP_reset, MP_text, null_scale, MP_graphics, MP_move, MP_vector, MP_linetype, MP_put_text, MP_text_angle, MP_justify_text, MP_point, MP_arrow, MP_set_font, MP_pointsize, TERM_BINARY|TERM_CAN_CLIP|TERM_CAN_DASH, /*flags*/ 0, 0, MP_boxfill, MP_linewidth #ifdef USE_MOUSE , 0, 0, 0, 0, 0 /* no mouse support for metapost */ #endif , MP_make_palette, MP_previous_palette, /* write grestore */ MP_set_color, MP_filled_polygon TERM_TABLE_END(mp_driver) #undef LAST_TERM #define LAST_TERM mp_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(mp) "1 mp", "?commands set terminal mpost", "?set terminal mp", "?set term mp", "?terminal mp", "?term mp", "?mp", "?metapost", "", " The `mp` driver produces output intended to be input to the Metapost program.", " Running Metapost on the file creates EPS files containing the plots. By", " default, Metapost passes all text through TeX. This has the advantage of", " allowing essentially any TeX symbols in titles and labels.", "", " Syntax:", " set term mp {color | colour | monochrome}", " {solid | dashed}", " {notex | tex | latex}", " {magnification <magsize>}", " {psnfss | psnfss-version7 | nopsnfss}", " {prologues <value>}", " {a4paper}", " {amstex}", " {\"<fontname> {,<fontsize>}\"} ", "", " The option `color` causes lines to be drawn in color (on a printer or display", " that supports it), `monochrome` (or nothing) selects black lines. The option", " `solid` draws solid lines, while `dashed` (or nothing) selects lines with", " different patterns of dashes. If `solid` is selected but `color` is not,", " nearly all lines will be identical. This may occasionally be useful, so it is", " allowed.", "", " The option `notex` bypasses TeX entirely, therefore no TeX code can be used in", " labels under this option. This is intended for use on old plot files or files", " that make frequent use of common characters like `$` and `%` that require", " special handling in TeX.", "", " The option `tex` sets the terminal to output its text for TeX to process.", "", " The option `latex` sets the terminal to output its text for processing by", " LaTeX. This allows things like \\frac for fractions which LaTeX knows about", " but TeX does not. Note that you must set the environment variable TEX to the", " name of your LaTeX executable (normally latex) if you use this option or use", " `mpost --tex=<name of LaTeX executable> ...`. Otherwise metapost will try and", " use TeX to process the text and it won't work.", "", " Changing font sizes in TeX has no effect on the size of mathematics, and there", " is no foolproof way to make such a change, except by globally setting a", " magnification factor. This is the purpose of the `magnification` option. It", " must be followed by a scaling factor. All text (NOT the graphs) will be scaled", " by this factor. Use this if you have math that you want at some size other", " than the default 10pt. Unfortunately, all math will be the same size, but see", " the discussion below on editing the MP output. `mag` will also work under", " `notex` but there seems no point in using it as the font size option (below)", " works as well.", "", " The option `psnfss` uses postscript fonts in combination with LaTeX. Since", " this option only makes sense, if LaTeX is being used, the `latex` option is selected", " automatically. This option includes the following packages for LaTeX:", " inputenc(latin1), fontenc(T1), mathptmx, helvet(scaled=09.2), courier, latexsym ", " and textcomp.", "", " The option `psnfss-version7` uses also postscript fonts in LaTeX (option `latex`", " is also automatically selected), but uses the following packages with LaTeX:", " inputenc(latin1), fontenc(T1), times, mathptmx, helvet and courier.", "", " The option `nopsnfss` is the default and uses the standard font (cmr10 if not", " otherwise specified).", "", " The option `prologues` takes a value as an additional argument and adds the line", " `prologues:=<value>` to the metapost file. If a value of `2` is specified metapost", " uses postscript fonts to generate the eps-file, so that the result can be viewed", " using e.g. ghostscript. Normally the output of metapost uses TeX fonts and therefore", " has to be included in a (La)TeX file before you can look at it.", "", " The option `noprologues` is the default. No additional line specifying the prologue", " will be added.", "", " The option `a4paper` adds a `[a4paper]` to the documentclass. Normally letter paper", " is used (default). Since this option is only used in case of LaTeX, the `latex` option", " is selected automatically.", "", " The option `amstex` automatically selects the `latex` option and includes the following", " LaTeX packages: amsfonts, amsmath(intlimits). By default these packages are not", " included.", "", " A name in quotes selects the font that will be used when no explicit font is", " given in a `set label` or `set title`. A name recognized by TeX (a TFM file", " exists) must be used. The default is \"cmr10\" unless `notex` is selected,", " then it is \"pcrr8r\" (Courier). Even under `notex`, a TFM file is needed by", " Metapost. The file `pcrr8r.tfm` is the name given to Courier in LaTeX's psnfss", " package. If you change the font from the `notex` default, choose a font that", " matches the ASCII encoding at least in the range 32-126. `cmtt10` almost", " works, but it has a nonblank character in position 32 (space).", "", " The size can be any number between 5.0 and 99.99. If it is omitted, 10.0 is", " used. It is advisable to use `magstep` sizes: 10 times an integer or", " half-integer power of 1.2, rounded to two decimals, because those are the most", " available sizes of fonts in TeX systems.", "", " All the options are optional. If font information is given, it must be at the", " end, with size (if present) last. The size is needed to select a size for the", " font, even if the font name includes size information. For example,", " `set term mp \"cmtt12\"` selects cmtt12 shrunk to the default size 10. This", " is probably not what you want or you would have used cmtt10.", "", " The following common ascii characters need special treatment in TeX:", " $, &, #, %, _; |, <, >; ^, ~, \\, {, and }", " The five characters $, #, &, _, and % can simply be escaped, e.g., `\\$`.", " The three characters <, >, and | can be wrapped in math mode, e.g., `$<$`.", " The remainder require some TeX work-arounds. Any good book on TeX will give", " some guidance.", "", " If you type your labels inside double quotes, backslashes in TeX code need to", " be escaped (doubled). Using single quotes will avoid having to do this, but", " then you cannot use `\\n` for line breaks. As of this writing, version 3.7 of", " gnuplot processes titles given in a `plot` command differently than in other", " places, and backslashes in TeX commands need to be doubled regardless of the", " style of quotes.", "", " Metapost pictures are typically used in TeX documents. Metapost deals with", " fonts pretty much the same way TeX does, which is different from most other", " document preparation programs. If the picture is included in a LaTeX document", " using the graphics package, or in a plainTeX document via epsf.tex, and then", " converted to PostScript with dvips (or other dvi-to-ps converter), the text in", " the plot will usually be handled correctly. However, the text may not appear", " if you send the Metapost output as-is to a PostScript interpreter.", "", "2 Metapost Instructions", "?commands set terminal mp detailed", "?set terminal mp detailed", "?set term mp detailed", "?mp detailed", "?metapost detailed", "", " - Set your terminal to Metapost, e.g.:", " set terminal mp mono \"cmtt12\" 12", "", " - Select an output-file, e.g.:", " set output \"figure.mp\"", "", " - Create your pictures. Each plot (or multiplot group) will generate a", " separate Metapost beginfig...endfig group. Its default size will be 5 by 3", " inches. You can change the size by saying `set size 0.5,0.5` or whatever", " fraction of the default size you want to have.", "", " - Quit gnuplot.", "", " - Generate EPS files by running Metapost on the output of gnuplot:", " mpost figure.mp OR mp figure.mp", " The name of the Metapost program depends on the system, typically `mpost` for", " a Unix machine and `mp` on many others. Metapost will generate one EPS file", " for each picture.", "", " - To include your pictures in your document you can use the graphics package", " in LaTeX or epsf.tex in plainTeX:", " \\usepackage{graphics} % LaTeX", " \\input epsf.tex % plainTeX", " If you use a driver other than dvips for converting TeX DVI output to PS, you", " may need to add the following line in your LaTeX document:", " \\DeclareGraphicsRule{*}{eps}{*}{}", " Each picture you made is in a separate file. The first picture is in, e.g.,", " figure.0, the second in figure.1, and so on.... To place the third picture in", " your document, for example, all you have to do is:", " \\includegraphics{figure.2} % LaTeX", " \\epsfbox{figure.2} % plainTeX", "", " The advantage, if any, of the mp terminal over a postscript terminal is", " editable output. Considerable effort went into making this output as clean as", " possible. For those knowledgeable in the Metapost language, the default line", " types and colors can be changed by editing the arrays `lt[]` and `col[]`.", " The choice of solid vs dashed lines, and color vs black lines can be change by", " changing the values assigned to the booleans `dashedlines` and `colorlines`.", " If the default `tex` option was in effect, global changes to the text of", " labels can be achieved by editing the `vebatimtex...etex` block. In", " particular, a LaTeX preamble can be added if desired, and then LaTeX's", " built-in size changing commands can be used for maximum flexibility. Be sure", " to set the appropriate MP configuration variable to force Metapost to run", " LaTeX instead of plainTeX." END_HELP(mp) #endif /* TERM_HELP */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/texdraw.trm����������������������������������������������������������������������0000644�0004711�0000144�00000025465�10460036604�013315� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: texdraw.trm,v 1.19 2006/07/21 02:35:48 sfeam Exp $ */ /* GNUPLOT - texdraw.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * The TEXDRAW macros for LaTeX. * * AUTHORS * Khun Yee Fung. Modified from eepic.trm. * clipper@csd.uwo.ca * January 20, 1992 * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * This file contains the texdraw terminal driver, intended for use with the * texdraw macro package for LaTeX. This is an alternative to the * latex driver. You need texdraw.sty, and texdraw.tex in the texdraw package. * */ #include "driver.h" #ifdef TERM_REGISTER register_term(texdraw) #endif #ifdef TERM_PROTO TERM_PUBLIC void TEXDRAW_init __PROTO((void)); TERM_PUBLIC void TEXDRAW_graphics __PROTO((void)); TERM_PUBLIC void TEXDRAW_text __PROTO((void)); TERM_PUBLIC void TEXDRAW_linetype __PROTO((int linetype)); TERM_PUBLIC void TEXDRAW_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void TEXDRAW_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void TEXDRAW_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void TEXDRAW_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); TERM_PUBLIC void TEXDRAW_put_text __PROTO((unsigned int x, unsigned int y, const char str[])); TERM_PUBLIC int TEXDRAW_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC int TEXDRAW_text_angle __PROTO((int ang)); TERM_PUBLIC void TEXDRAW_reset __PROTO((void)); #define TEXDRAW_PTS_PER_INCH (72.27) /* resolution of printer we expect to use */ #define DOTS_PER_INCH (300) /* dot size in pt */ #define TEXDRAW_UNIT (TEXDRAW_PTS_PER_INCH/DOTS_PER_INCH) /* 5 inches wide by 3 inches high (default) */ #define TEXDRAW_XMAX (5*DOTS_PER_INCH) #define TEXDRAW_YMAX (3*DOTS_PER_INCH) #define TEXDRAW_HTIC (5*DOTS_PER_INCH/72) /* (5./TEXDRAW_UNIT) */ #define TEXDRAW_VTIC (5*DOTS_PER_INCH/72) /* (5./TEXDRAW_UNIT) */ #define TEXDRAW_HCHAR (DOTS_PER_INCH*53/10/72) /* (5.3/TEXDRAW_UNIT) */ #define TEXDRAW_VCHAR (DOTS_PER_INCH*11/72) /* (11./TEXDRAW_UNIT) */ #define GOT_TEXDRAW_PROTO #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY static void TEXDRAW_endline __PROTO((void)); static unsigned int TEXDRAW_posx; static unsigned int TEXDRAW_posy; static enum JUSTIFY TEXDRAW_justify = LEFT; static enum JUSTIFY TEXDRAW_last_justify = LEFT; static int TEXDRAW_angle = 0; static float TEXDRAW_scalefactor = 0.2409; static double TEXDRAW_xscale = 1.0, TEXDRAW_yscale = 1.0; /* for DOTS point style */ #define TEXDRAW_TINY_DOT "\\htext{$\\cdot$}" /* POINTS */ #define TEXDRAW_POINT_TYPES 12 /* we supply more point types */ static const char GPFAR *GPFAR TEXDRAW_points[] = { "\\rmove(0 4)\\htext{$\\Diamond$}", "\\htext{$+$}", "\\rmove(0 4)\\htext{$\\Box$}", "\\htext{$\\times$}", "\\htext{$\\triangle$}", "\\htext{$\\star$}", "\\lcir r:9", "\\lcir r:12", "\\lcir r:16", "\\fcir f:0.9 r:9", "\\fcir f:0.9 r:12", "\\fcir f:0.9 r:16" }; /* LINES */ #define TEXDRAW_NUMLINES 5 /* number of linetypes below */ static const int TEXDRAW_lines[] = { 4, /* -2 border */ 3, /* -1 axes */ 3, /* 0 solid thin */ 4, /* 1 solid thick */ 6, /* 2 solid Thick */ }; /* The line type selected most recently */ static int TEXDRAW_last_type = 0; /* current line type */ static int TEXDRAW_type; /* are we in the middle of a line */ static TBOOLEAN TEXDRAW_inline = FALSE; /* terminate any line in progress */ static void TEXDRAW_endline __PROTO((void)); /* number of points in line so far */ static int TEXDRAW_linecount = 0; /* max value for linecount */ #define TEXDRAW_LINEMAX 5 TERM_PUBLIC void TEXDRAW_init() { TEXDRAW_posx = TEXDRAW_posy = 0; TEXDRAW_linetype(-1); fputs("%% GNUPLOT: LaTeX using TEXDRAW macros\n", gpoutfile); } TERM_PUBLIC void TEXDRAW_graphics() { static char GPFAR tdg1[] = "\ \\begin{texdraw}\n\ \\normalsize\n\ \\ifx\\pathDEFINED\\relax\\else\\let\\pathDEFINED\\relax\n\ \\def\\QtGfr{\\ifx (\\TGre \\let\\YhetT\\cpath\\else\\let\\YhetT\\relax\\fi\\YhetT}\n\ \\def\\path (#1 #2){\\move (#1 #2)\\futurelet\\TGre\\QtGfr}\n\ \\def\\cpath (#1 #2){\\lvec (#1 #2)\\futurelet\\TGre\\QtGfr}\n\ \\fi\n\ \\drawdim pt\n\ \\setunitscale %2.2f\n\ \\linewd %d\n\ \\textref h:L v:C\n"; fprintf(gpoutfile, tdg1, TEXDRAW_scalefactor, TEXDRAW_lines[2]); TEXDRAW_last_type = 0; TEXDRAW_type = 0; } TERM_PUBLIC void TEXDRAW_text() { TEXDRAW_endline(); fputs("\\end{texdraw}\n", gpoutfile); } TERM_PUBLIC void TEXDRAW_linetype(int linetype) { TEXDRAW_endline(); if (linetype >= TEXDRAW_NUMLINES - 2) linetype %= (TEXDRAW_NUMLINES - 2); TEXDRAW_type = linetype > -2 ? linetype : LT_BLACK; } TERM_PUBLIC void TEXDRAW_move(unsigned int x, unsigned int y) { TEXDRAW_endline(); TEXDRAW_posx = x; TEXDRAW_posy = y; } TERM_PUBLIC void TEXDRAW_point(unsigned int x, unsigned int y, int number) { TEXDRAW_move(x, y); /* Print the character defined by 'number'; number < 0 means * to use a dot, otherwise one of the defined points. */ fprintf(gpoutfile, "\\move (%d %d)\n", (int) ((double) x * TEXDRAW_xscale), (int) ((double) y * TEXDRAW_yscale)); if (TEXDRAW_last_justify != CENTRE) { fprintf(gpoutfile, "\\textref h:C v:C "); TEXDRAW_last_justify = CENTRE; } fprintf(gpoutfile, "%s\n", (number < 0 ? TEXDRAW_TINY_DOT : TEXDRAW_points[number % TEXDRAW_POINT_TYPES])); } TERM_PUBLIC void TEXDRAW_vector(unsigned int ux, unsigned int uy) { if (!TEXDRAW_inline) { TEXDRAW_inline = TRUE; /* Start a new line. This depends on line type */ if (TEXDRAW_type != TEXDRAW_last_type) { if (TEXDRAW_lines[TEXDRAW_type + 2] != TEXDRAW_lines[TEXDRAW_last_type + 2]) fprintf(gpoutfile, "\\linewd %d\n", TEXDRAW_lines[TEXDRAW_type + 2]); TEXDRAW_last_type = TEXDRAW_type; } fprintf(gpoutfile, "\\path (%d %d)", (int) ((double) TEXDRAW_posx * TEXDRAW_xscale), (int) ((double) TEXDRAW_posy * TEXDRAW_yscale)); TEXDRAW_linecount = 1; } else { /* Even though we are in middle of a path, * we may want to start a new path command. * If they are too long then latex will choke. */ if (TEXDRAW_linecount++ >= TEXDRAW_LINEMAX) { fputs("\n\\cpath ", gpoutfile); TEXDRAW_linecount = 1; } } fprintf(gpoutfile, "(%d %d)", (int) ((double) ux * TEXDRAW_xscale), (int) ((double) uy * TEXDRAW_yscale)); TEXDRAW_posx = ux; TEXDRAW_posy = uy; } static void TEXDRAW_endline() { if (TEXDRAW_inline) { putc('\n', gpoutfile); TEXDRAW_inline = FALSE; } } TERM_PUBLIC void TEXDRAW_arrow( unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head) { char text; if (head) text = 'a'; else text = 'l'; fprintf(gpoutfile, "\\move (%d %d)\\%cvec (%d %d)", (int) ((double) sx * TEXDRAW_xscale), (int) ((double) sy * TEXDRAW_yscale), text, (int) ((double) ex * TEXDRAW_xscale), (int) ((double) ey * TEXDRAW_yscale)); TEXDRAW_posx = ex; TEXDRAW_posy = ey; } TERM_PUBLIC void TEXDRAW_put_text(unsigned int x, unsigned int y, const char str[]) { char text; TEXDRAW_endline(); fprintf(gpoutfile, "\\move (%d %d)", (int) ((double) x * TEXDRAW_xscale), (int) ((double) y * TEXDRAW_yscale)); if (!TEXDRAW_angle) text = 'h'; else text = 'v'; if (TEXDRAW_last_justify != TEXDRAW_justify) { TEXDRAW_last_justify = TEXDRAW_justify; if (TEXDRAW_justify == LEFT) fputs("\\textref h:L v:C ", gpoutfile); else if (TEXDRAW_justify == CENTRE) fputs("\\textref h:C v:C ", gpoutfile); else if (TEXDRAW_justify == RIGHT) fputs("\\textref h:R v:C ", gpoutfile); } fprintf(gpoutfile, "\\%ctext{%s}\n", text, str); } TERM_PUBLIC int TEXDRAW_justify_text(enum JUSTIFY mode) { TEXDRAW_justify = mode; return (TRUE); } TERM_PUBLIC int TEXDRAW_text_angle(int ang) { TEXDRAW_angle = ang; return (TRUE); } TERM_PUBLIC void TEXDRAW_reset() { TEXDRAW_endline(); TEXDRAW_posx = TEXDRAW_posy = 0; } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(texdraw_driver) "texdraw", "LaTeX texdraw environment", TEXDRAW_XMAX, TEXDRAW_YMAX, TEXDRAW_VCHAR, TEXDRAW_HCHAR, TEXDRAW_VTIC, TEXDRAW_HTIC, options_null, TEXDRAW_init, TEXDRAW_reset, TEXDRAW_text, null_scale, TEXDRAW_graphics, TEXDRAW_move, TEXDRAW_vector, TEXDRAW_linetype, TEXDRAW_put_text, TEXDRAW_text_angle, TEXDRAW_justify_text, TEXDRAW_point, TEXDRAW_arrow, set_font_null TERM_TABLE_END(texdraw_driver) #undef LAST_TERM #define LAST_TERM texdraw_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(texdraw) "1 texdraw", "?commands set terminal texdraw", "?set terminal texdraw", "?set term texdraw", "?terminal texdraw", "?term texdraw", "?texdraw", " The `texdraw` terminal driver supports the LaTeX texdraw environment. It is", " intended for use with \"texdraw.sty\" and \"texdraw.tex\" in the texdraw package.", "", " Points, among other things, are drawn using the LaTeX commands \"\\Diamond\" and", " \"\\Box\". These commands no longer belong to the LaTeX2e core; they are included", " in the latexsym package, which is part of the base distribution and thus part", " of any LaTeX implementation. Please do not forget to use this package.", "", " It has no options." END_HELP(texdraw) #endif /* TERM_HELP */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/pbm.trm��������������������������������������������������������������������������0000644�0004711�0000144�00000031037�11213112611�012373� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: pbm.trm,v 1.30 2009/06/08 04:37:29 sfeam Exp $ * */ /* GNUPLOT - pbm.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * pbm * * AUTHORS * Russell Lang * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* The following pbmplus drivers use the generic bit mapped graphics routines from bitmap.c to build up a bit map in memory. The driver interchanges colomns and lines in order to access entire lines easily and returns the lines to get bits in the right order : (x,y) -> (y,XMAX-1-x). */ /* This interchange is done by calling b_makebitmap() with reversed xmax and ymax, and then setting b_rastermode to TRUE. b_setpixel() will then perform the interchange before each pixel is plotted */ /* See Jef Poskanzer's excellent PBMplus package for more details of the Portable BitMap format and for programs to convert PBM files to other bitmap formats. */ #include "driver.h" #ifdef TERM_REGISTER register_term(pbm_driver) #endif #ifdef TERM_PROTO TERM_PUBLIC void PBM_options __PROTO((void)); TERM_PUBLIC void PBM_init __PROTO((void)); TERM_PUBLIC void PBM_reset __PROTO((void)); TERM_PUBLIC void PBM_setfont __PROTO((void)); TERM_PUBLIC void PBM_graphics __PROTO((void)); TERM_PUBLIC void PBM_monotext __PROTO((void)); TERM_PUBLIC void PBM_graytext __PROTO((void)); TERM_PUBLIC void PBM_colortext __PROTO((void)); TERM_PUBLIC void PBM_text __PROTO((void)); TERM_PUBLIC void PBM_linetype __PROTO((int linetype)); TERM_PUBLIC void PBM_point __PROTO((unsigned int x, unsigned int y, int point)); #endif /* TERM_PROTO */ /* make XMAX and YMAX a multiple of 8 */ #define PBM_XMAX (640) #define PBM_YMAX (480) #define PBM_VCHAR (FNT5X9_VCHAR) #define PBM_HCHAR (FNT5X9_VCHAR) #define PBM_VTIC FNT5X9_HBITS #define PBM_HTIC FNT5X9_HBITS #ifdef TERM_BODY static int pbm_font = 1; /* small font */ static int pbm_mode = 0; /* 0:monochrome 1:gray 2:color */ /* Only needed for dubious backwards compatibility with 'set size' * in pre-4.2 versions that didn't support 'set term size' */ static TBOOLEAN PBM_explicit_size = FALSE; /* 7=black, 0=white */ static int pgm_gray[] = { 7, 1, 6, 5, 4, 3, 2, 1, 7 }; /* grays */ /* bit3=!intensify, bit2=!red, bit1=!green, bit0=!blue */ static int ppm_color[] ={ 15, 8, 3, 5, 6, 2, 4, 1, 11, 13, 14 }; /* colors */ enum PBM_id { PBM_SMALL, PBM_MEDIUM, PBM_LARGE, PBM_MONOCHROME, PBM_GRAY, PBM_COLOR, PBM_SIZE, PBM_OTHER }; static struct gen_table PBM_opts[] = { { "s$mall", PBM_SMALL }, { "me$dium", PBM_MEDIUM }, { "l$arge", PBM_LARGE }, { "mo$nochrome", PBM_MONOCHROME }, { "g$ray", PBM_GRAY }, { "c$olor", PBM_COLOR }, { "c$olour", PBM_COLOR }, { "size", PBM_SIZE }, { NULL, PBM_OTHER } }; TERM_PUBLIC void PBM_options() { int xpixels = PBM_XMAX; int ypixels = PBM_YMAX; struct value a; pbm_font = 1; pbm_mode = 0; term_options[0] = NUL; while (!END_OF_COMMAND) { switch(lookup_table(&PBM_opts[0],c_token)) { case PBM_SMALL: pbm_font = 1; c_token++; break; case PBM_MEDIUM: pbm_font = 2; c_token++; break; case PBM_LARGE: pbm_font = 3; c_token++; break; case PBM_MONOCHROME: pbm_mode = 0; term->flags |= TERM_MONOCHROME; c_token++; break; case PBM_GRAY: pbm_mode = 1; c_token++; break; case PBM_COLOR: pbm_mode = 2; term->flags &= ~TERM_MONOCHROME; c_token++; break; case PBM_SIZE: c_token++; if (END_OF_COMMAND) { term->xmax = PBM_XMAX; term->ymax = PBM_YMAX; PBM_explicit_size = FALSE; } else { xpixels = real(const_express(&a)); if (equals(c_token, ",")) { c_token++; ypixels = real(const_express(&a)); } PBM_explicit_size = TRUE; } if (xpixels > 0) term->xmax = xpixels; if (ypixels > 0) term->ymax = ypixels; break; case PBM_OTHER: default: /* reset to default, since term is already set */ pbm_font = 1; pbm_mode = 0; int_error(c_token, "expecting: {small, medium, large} and {monochrome, gray, color}"); break; } } term->v_tic = (term->xmax < term->ymax) ? term->xmax/100 : term->ymax/100; if (term->v_tic < 1) term->v_tic = 1; term->h_tic = term->v_tic; /* setup options string */ switch (pbm_font) { case 1: strcat(term_options, "small"); break; case 2: strcat(term_options, "medium"); break; case 3: strcat(term_options, "large"); break; } switch (pbm_mode) { case 0: strcat(term_options, " monochrome"); break; case 1: strcat(term_options, " gray"); break; case 2: strcat(term_options, " color"); break; } if (PBM_explicit_size) sprintf(term_options + strlen(term_options), " size %d,%d", term->xmax, term->ymax); } TERM_PUBLIC void PBM_init() { PBM_setfont(); /* HBB 980226: call it here! */ } TERM_PUBLIC void PBM_reset() { #ifdef VMS fflush_binary(); #endif /* VMS */ } TERM_PUBLIC void PBM_setfont() { switch (pbm_font) { case 1: b_charsize(FNT5X9); term->v_char = FNT5X9_VCHAR; term->h_char = FNT5X9_HCHAR; break; case 2: b_charsize(FNT9X17); term->v_char = FNT9X17_VCHAR; term->h_char = FNT9X17_HCHAR; break; case 3: b_charsize(FNT13X25); term->v_char = FNT13X25_VCHAR; term->h_char = FNT13X25_HCHAR; break; } } TERM_PUBLIC void PBM_graphics() { int numplanes = 1; unsigned int xpixels = term->xmax; unsigned int ypixels = term->ymax; /* 'set size' should not affect the size of the canvas in pixels, * but versions prior to 4.2 did not have a separate 'set term size' */ if (!PBM_explicit_size) { xpixels *= xsize; ypixels *= ysize; } switch (pbm_mode) { case 1: numplanes = 3; break; case 2: numplanes = 4; break; } /* HBB 980226: this is not the right place to do this: setfont() influences * fields of the termtable entry, and therefore must be called by init() * already. */ /* PBMsetfont(); */ /* rotate plot -90 degrees by reversing XMAX and YMAX and by setting b_rastermode to TRUE */ b_makebitmap(ypixels, xpixels, numplanes); b_rastermode = TRUE; if (pbm_mode != 0) b_setlinetype(0); /* solid lines */ } static void PBM_monotext() { register int x, j, row; fputs("P4\n", gpoutfile); fprintf(gpoutfile, "%u %u\n", b_ysize, b_xsize); /* dump bitmap in raster mode */ for (x = b_xsize - 1; x >= 0; x--) { row = (b_ysize / 8) - 1; for (j = row; j >= 0; j--) { (void) fputc((char) (*((*b_p)[j] + x)), gpoutfile); } } b_freebitmap(); } static void PBM_graytext() { register int x, j, row; register int i, value; int mask, plane1, plane2, plane3; fprintf(gpoutfile, "\ P5\n\ %u %u\n\ %u\n", b_ysize, b_xsize, 255); /* dump bitmap in raster mode */ for (x = b_xsize - 1; x >= 0; x--) { row = (b_ysize / 8) - 1; for (j = row; j >= 0; j--) { mask = 0x80; plane1 = (*((*b_p)[j] + x)); plane2 = (*((*b_p)[j + b_psize] + x)); plane3 = (*((*b_p)[j + b_psize + b_psize] + x)); for (i = 0; i < 8; i++) { /* HBB: The values below are set to span the full range * from 0 up to 255 in 7 steps: */ value = 255; if (plane1 & mask) value -= 36; if (plane2 & mask) value -= 73; if (plane3 & mask) value -= 146; (void) fputc((char) (value), gpoutfile); mask >>= 1; } } } b_freebitmap(); } static void PBM_colortext() { register int x, j, row; register int i; int mask, plane1, plane2, plane3, plane4; int red, green, blue; fprintf(gpoutfile, "P6\n\ %u %u\n\ %u\n", b_ysize, b_xsize, 255); /* dump bitmap in raster mode */ for (x = b_xsize - 1; x >= 0; x--) { row = (b_ysize / 8) - 1; for (j = row; j >= 0; j--) { mask = 0x80; plane1 = (*((*b_p)[j] + x)); plane2 = (*((*b_p)[j + b_psize] + x)); plane3 = (*((*b_p)[j + b_psize + b_psize] + x)); plane4 = (*((*b_p)[j + b_psize + b_psize + b_psize] + x)); for (i = 0; i < 8; i++) { red = (plane3 & mask) ? 1 : 3; green = (plane2 & mask) ? 1 : 3; blue = (plane1 & mask) ? 1 : 3; if (plane4 & mask) { red--; green--; blue--; } /* HBB: '85' is exactly 255/3, so this spans the full * range of colors in three steps: */ (void) fputc((char) (red * 85), gpoutfile); (void) fputc((char) (green * 85), gpoutfile); (void) fputc((char) (blue * 85), gpoutfile); mask >>= 1; } } } b_freebitmap(); } TERM_PUBLIC void PBM_text() { switch (pbm_mode) { case 0: PBM_monotext(); break; case 1: PBM_graytext(); break; case 2: PBM_colortext(); break; } } TERM_PUBLIC void PBM_linetype(int linetype) { if (linetype < -2) linetype = LT_BLACK; switch (pbm_mode) { case 0: b_setlinetype(linetype); break; case 1: if (linetype >= 7) linetype %= 7; b_setvalue(pgm_gray[linetype + 2]); break; case 2: if (linetype >= 9) linetype %= 9; b_setvalue(ppm_color[linetype + 2]); break; } } TERM_PUBLIC void PBM_point(unsigned int x, unsigned int y, int point) { if (pbm_mode == 0) line_and_point(x, y, point); else do_point(x, y, point); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(pbm_driver) "pbm", "Portable bitmap [small medium large] [monochrome gray color]", PBM_XMAX, PBM_YMAX, PBM_VCHAR, PBM_HCHAR, PBM_VTIC, PBM_HTIC, PBM_options, PBM_init, PBM_reset, PBM_text, null_scale, PBM_graphics, b_move, b_vector, PBM_linetype, b_put_text, b_text_angle, null_justify_text, PBM_point, do_arrow, set_font_null, 0, /* pointsize */ TERM_CAN_MULTIPLOT | TERM_BINARY, 0, 0, b_boxfill TERM_TABLE_END(pbm_driver) #undef LAST_TERM #define LAST_TERM pbm_driver #endif /* TERM_TABLE */ #ifdef TERM_HELP START_HELP(pbm) "1 pbm", "?commands set terminal pbm", "?set terminal pbm", "?set term pbm", "?terminal pbm", "?term pbm", "?pbm", " Syntax:", " set terminal pbm {<fontsize>} {<mode>} {size <x>,<y>}", "", " where <fontsize> is `small`, `medium`, or `large` and <mode> is `monochrome`,", " `gray` or `color`. The default plot size is 640 pixels wide and 480 pixels", " high. The output size is white-space padded to the nearest multiple of", " 8 pixels on both x and y. This empty space may be cropped later if needed.", "", " The output of the `pbm` driver depends upon <mode>: `monochrome` produces a", " portable bitmap (one bit per pixel), `gray` a portable graymap (three bits", " per pixel) and `color` a portable pixmap (color, four bits per pixel).", "", " The output of this driver can be used with various image conversion and", " manipulation utilities provided by NETPBM. Based on Jef Poskanzer's", " PBMPLUS package, NETPBM provides programs to convert the above PBM formats", " to GIF, TIFF, MacPaint, Macintosh PICT, PCX, X11 bitmap and many others.", " Complete information is available at http://netpbm.sourceforge.net/.", "", " Examples:", " set terminal pbm small monochrome # defaults", " set terminal pbm color medium size 800,600", " set output '| pnmrotate 45 | pnmtopng > tilted.png' # uses NETPBM" END_HELP(pbm) #endif /* TERM_HELP */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/fig.trm��������������������������������������������������������������������������0000644�0004711�0000144�00000166542�11656022044�012407� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: fig.trm,v 1.69 2011/11/07 18:32:04 markisch Exp $ */ /* GNUPLOT - fig.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * Fig graphics language * * AUTHORS * Micah Beck, David Kotz * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * Original for Fig code output by Micah Beck, 1989 * Department of Computer Science, Cornell University * Updated by David Kotz for gnuplot 2.0 * More efficient output by Ian Dall * Updated to FIG 2.1 (with color) format by Vivek Khera * Updated to FIG 3.1 (higher resolution) format by Ian MacPhedran, Jan 1995 * Updated to conform to newterm format Ian MacPhedran, Apr 1995 * Point-count option joachim.selinger@ins.uni-stuttgart.de (JFS) Feb 9 1996 * More options (portrait/landscape, metric/inches, size, fontsize, thickness) * plus symbols and depth/thickness by bernlohr@eu1.mpi-hd.mpg.de (KB) Aug 15 1996 * Added PM3D functionality Ian MacPhedran, April 15 1999 * Take into account 'set palette maxcolors' Petr Mikulik, June 11 2002 * Don't reset options when 'set term fig <new options>', Petr Mikulik, Aug 24 2002 * Ethan A Merritt - May 2008: * Bring into line with other terminals for point types, size syntax, font spec */ #include "driver.h" #ifdef TERM_REGISTER register_term(fig) #endif /* TERM_REGISTER */ #ifdef TERM_PROTO TERM_PUBLIC void FIG_options __PROTO((void)); TERM_PUBLIC void FIG_init __PROTO((void)); TERM_PUBLIC void FIG_graphics __PROTO((void)); TERM_PUBLIC void FIG_text __PROTO((void)); TERM_PUBLIC void FIG_linetype __PROTO((int linetype)); TERM_PUBLIC void FIG_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void FIG_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void FIG_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); TERM_PUBLIC void FIG_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int FIG_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC int FIG_text_angle __PROTO((int ang)); TERM_PUBLIC void FIG_pointsize __PROTO((double arg_pointsize)); TERM_PUBLIC void FIG_linewidth __PROTO((double linewidth)); TERM_PUBLIC void FIG_reset __PROTO((void)); TERM_PUBLIC void FIG_lpoint __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void FIG_boxfill __PROTO((int style, unsigned int x, unsigned int y, unsigned int w, unsigned int h)); TERM_PUBLIC int FIG_make_palette (t_sm_palette *); /* TERM_PUBLIC void FIG_previous_palette (void); */ TERM_PUBLIC void FIG_set_color (t_colorspec *); TERM_PUBLIC void FIG_filled_polygon (int, gpiPoint *); TERM_PUBLIC void FIG_layer __PROTO((t_termlayer syncpoint)); #define GOT_FIG_PROTO #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include "object.h" /* modified from the XFig distribution */ #define FIG_DEFAULT DEFAULT #define FIG_ROMAN_FONT (0) /* actually, the default font */ #if METRIC # define INCH FALSE #else # define INCH TRUE #endif /* These should not be defined elsewhere - ACZ */ /* This is now 1200 per inch */ #define FIG_IRES (1200) /* This is now 450 per cm */ #define FIG_MRES (450) #define FIG_COORD_SYS 2 #define FIG_ORIENT (FIG_portrait?"Portrait":"Landscape") /* Could be "Portrait" */ #define FIG_JUST "Center" /* Could be "Flush Left" */ #define FIG_UNIT (FIG_inches?"Inches":"Metric") /* Could be "Inches" */ #define FIG_PAPER (FIG_inches ? "Letter" : "A4") #define FIG_MAGNIFICATION 100.0 #define FIG_MULTIPAGE "Single" /* Could be "Multiple" */ #define FIG_TRANSCOLOR -2 /* none: -2; background: -1; 0..31: foreground colors */ /* This could probably be dropped with the support of GIFs. */ #define FIG_TRUERES (FIG_inches ? FIG_IRES : FIG_MRES) /* ACZ */ #define FIG_DEFAULTVERSION "3.2" #define FIG_HTIC(inch) ((inch) ? (5*FIG_IRES)/80 : (15*FIG_MRES)/100) #define FIG_VTIC(inch) ((inch) ? (5*FIG_IRES)/80 : (15*FIG_MRES)/100) #define FIG_FONT_S (10) /* size in points */ #define FIG_MAX_POINTS 99999L /* almost infinite ;-) */ /* height of font in pixels: */ #define FIG_to_pixel_v(inch,s) (((inch) ? (s)*FIG_IRES : (s)*FIG_MRES*2.54) / 72 * 3/4) /* This is fudged to enlarge the drawing area, but gives fairly good results */ /* this is a guess at the width: */ #define FIG_to_pixel_h(inch,s) (FIG_to_pixel_v(inch,s)*6/10) #define FIG_VCHAR FIG_to_pixel_v(INCH,FIG_FONT_S) /* just for default, */ #define FIG_HCHAR FIG_to_pixel_h(INCH,FIG_FONT_S) /* not really used */ /* Text flags (ULIG) */ enum FIG_TEXT_STYLEBITS { FIG_TEXT_RIGID = 1<<0, FIG_TEXT_SPECIAL = 1<<1, FIG_TEXT_POSTSCRIPT = 1<<2, FIG_TEXT_HIDDEN = 1<<3 }; #define FIG_TEXT_NORMAL FIG_TEXT_POSTSCRIPT enum FIG_poly_stat { FIG_poly_new, FIG_poly_part }; static int FIG_posx; static int FIG_posy; static long FIG_poly_vec_cnt; static int FIG_depth = 10; static int FIG_linedepth = 10; static int FIG_thickness = 1; static int FIG_default_thickness = 1; static double FIG_current_pointsize = 1.; static double FIG_current_linewidth = 1.; /* Maximum number of points per POLYLINE. Default 1000 (hardcoded in help section as well) */ static int FIG_poly_vec_max = 999; /* JFS */ static enum FIG_poly_stat FIG_polyvec_stat; /* 5 inches wide by 3 inches high */ #define FIG_XMAX(inch) ((inch) ? 5*FIG_IRES : 12*FIG_MRES) #define FIG_YMAX(inch) ((inch) ? 3*FIG_IRES : 8*FIG_MRES) #define FIG_XOFF(inch) ((inch) ? FIG_IRES : 2*FIG_MRES) #define FIG_YOFF(inch) ((inch) ? FIG_IRES : 2*FIG_MRES) #define BFIG_HTIC(inch) ((inch) ? (7*FIG_IRES)/80 : (20*FIG_MRES)/100) #define BFIG_VTIC(inch) ((inch) ? (7*FIG_IRES)/80 : (20*FIG_MRES)/100) #define BFIG_FONT_S (16) /* size in points */ #define BFIG_VCHAR FIG_to_pixel_v(INCH,BFIG_FONT_S) /* height in pixels of font */ #define BFIG_HCHAR FIG_to_pixel_h(INCH,BFIG_FONT_S) /* this is a guess at the width */ static F_point *FIG_points = NULL; /* Array for the collection of points for POLYLINE, allocated on demand. */ static F_line FIG_line; /* 8 inches wide by 5 inches high */ #define BFIG_XMAX(inch) ((inch) ? 8*FIG_IRES : 20*FIG_MRES) #define BFIG_YMAX(inch) ((inch) ? 5*FIG_IRES : 15*FIG_MRES) #define BFIG_XOFF(inch) ((inch) ? FIG_IRES : 2*FIG_MRES) #define BFIG_YOFF(inch) ((inch) ? FIG_IRES : 2*FIG_MRES) static int FIG_type; /* negative types use real lines */ static float FIG_spacing; /* length of dash or dot spacing */ static int FIG_justify; /* Fig justification T_*_JUSTIFIED */ static float FIG_angle; /* Fig text angle (in radians) */ static int FIG_use_color = FALSE; /* do we use color or not? */ static int FIG_is_big = FALSE; /* big plot ? */ static int FIG_color = DEFAULT; /* which color to use */ static int FIG_xoff = FIG_XOFF(INCH); static int FIG_yoff = FIG_YOFF(INCH); static int FIG_font_id = FIG_ROMAN_FONT; static int FIG_font_s = FIG_FONT_S; static int FIG_portrait = FALSE; static int FIG_inches = INCH; static int FIG_text_flags = FIG_TEXT_NORMAL; /* whether text is special or hidden etc. */ static char FIG_version[MAX_ID_LEN+1] = FIG_DEFAULTVERSION; /* file format version */ static int FIG_solid = FALSE; /* dashed lines or not */ static int FIG_palette_set = FALSE; /* PM3D Palette Set ? */ static int FIG_palette_size = 128; /* Number of colours in palette */ static int FIG_palette_offst = 32; /* Offset from zero for user colours */ static int FIG_fill_style = 20; /* Full saturation */ static void FIG_poly_clean __PROTO((enum FIG_poly_stat fig_stat)); enum FIG_id { FIG_MONOCHROME, FIG_COLOR, FIG_SMALL, FIG_BIG, FIG_INCHES, FIG_METRIC, FIG_PORTRAIT, FIG_LANDSCAPE, FIG_SIZE, FIG_FONT, FIG_FONTSIZE, FIG_THICKNESS, FIG_DEPTH, FIG_POINTSMAX, FIG_SOLID, FIG_DASHED, FIG_NORMALTEXT, FIG_SPECIALTEXT, FIG_HIDDENTEXT, FIG_RIGIDTEXT, FIG_VERSION, FIG_OTHER }; static struct gen_table FIG_opts[] = { { "b$ig", FIG_BIG }, { "c$olor", FIG_COLOR }, { "c$olour", FIG_COLOR }, { "da$shed", FIG_DASHED }, { "de$pth", FIG_DEPTH }, { "font", FIG_FONT }, { "f$ontsize", FIG_FONTSIZE }, { "in$ches", FIG_INCHES }, { "l$andscape", FIG_LANDSCAPE }, { "me$tric", FIG_METRIC }, { "mo$nochrome", FIG_MONOCHROME }, { "poi$ntsmax", FIG_POINTSMAX }, { "por$trait", FIG_PORTRAIT }, { "si$ze", FIG_SIZE }, { "sm$all", FIG_SMALL }, { "so$lid", FIG_SOLID }, { "linew$idth", FIG_THICKNESS }, { "t$hickness", FIG_THICKNESS }, { "texth$idden", FIG_HIDDENTEXT }, { "textn$ormal", FIG_NORMALTEXT }, { "textr$igid", FIG_RIGIDTEXT }, { "texts$pecial", FIG_SPECIALTEXT }, { "v$ersion", FIG_VERSION }, { NULL, FIG_OTHER } }; const struct gen_table FIG_fonts[] = { { "Times Roman", 0 }, { "Times Italic", 1 }, { "Times Bold", 2 }, { "Times Bold Italic", 3 }, { "AvantGarde Book", 4 }, { "AvantGarde Book Oblique", 5 }, { "AvantGarde Demi", 6 }, { "AvantGarde Demi Oblique", 7 }, { "Bookman Light", 8 }, { "Bookman Light Italic", 9 }, { "Bookman Demi", 10 }, { "Bookman Demi Italic", 11 }, { "Courier", 12 }, { "Courier Oblique", 13 }, { "Courier Bold", 14 }, { "Courier Bold Oblique", 15 }, { "Helvetica", 16 }, { "Helvetica Oblique", 17 }, { "Helvetica Bold", 18 }, { "Helvetica Bold Oblique", 19 }, { "Helvetica Narrow", 20 }, { "Helvetica Narrow Oblique", 21 }, { "Helvetica Narrow Bold", 22 }, { "Helvetica Narrow Bold Oblique", 23 }, { "New Century Schoolbook Roman", 24 }, { "New Century Schoolbook Italic", 25 }, { "New Century Schoolbook Bold", 26 }, { "New Century Schoolbook Bold Italic", 27 }, { "Palatino Roman", 28 }, { "Palatino Italic", 29 }, { "Palatino Bold", 30 }, { "Palatino Bold Italic", 31 }, { "Symbol", 32 }, { "Zapf Chancery Medium Italic", 33 }, { "Zapf Dingbats", 34 }, { NULL, -1} }; TERM_PUBLIC void FIG_options() { int parse_error = FALSE; long temp_max; unsigned int tmax_t; double xsize_t = 0, ysize_t = 0; char text_flags[256]; /* for description only */ #if 0 /* Terminals should not reset options to defaults. */ FIG_use_color = FALSE; /* default */ FIG_is_big = FALSE; /* default */ FIG_portrait = FALSE; FIG_font_id = FIG_ROMAN_FONT; FIG_font_s = 0; FIG_default_thickness = 1; xsize_t = ysize_t = 0.; FIG_inches = INCH; FIG_text_flags = FIG_TEXT_NORMAL; FIG_solid = FALSE; strcpy( FIG_version, FIG_DEFAULTVERSION ); #endif while (!END_OF_COMMAND) { switch(lookup_table(&FIG_opts[0],c_token)) { case FIG_MONOCHROME: FIG_use_color = FALSE; c_token++; break; case FIG_COLOR: FIG_use_color = TRUE; c_token++; break; case FIG_SMALL: FIG_is_big = FALSE; c_token++; break; case FIG_BIG: FIG_is_big = TRUE; c_token++; break; case FIG_INCHES: FIG_inches = TRUE; c_token++; break; case FIG_METRIC: FIG_inches = FALSE; c_token++; break; case FIG_SOLID: FIG_solid = TRUE; c_token++; break; case FIG_DASHED: FIG_solid = FALSE; c_token++; break; case FIG_NORMALTEXT: FIG_text_flags = FIG_TEXT_NORMAL; c_token++; break; case FIG_SPECIALTEXT: FIG_text_flags |= FIG_TEXT_SPECIAL; FIG_text_flags &= ~FIG_TEXT_POSTSCRIPT; FIG_font_id = 0; c_token++; break; case FIG_HIDDENTEXT: FIG_text_flags |= FIG_TEXT_HIDDEN; c_token++; break; case FIG_RIGIDTEXT: FIG_text_flags |= FIG_TEXT_RIGID; c_token++; break; case FIG_PORTRAIT: FIG_portrait = TRUE; c_token++; break; case FIG_LANDSCAPE: FIG_portrait = FALSE; c_token++; break; case FIG_SIZE: c_token++; if (END_OF_COMMAND) { int_error(c_token, "size: 2 numbers expected"); } else { xsize_t = real_expression(); if (equals(c_token,",")) c_token++; if (END_OF_COMMAND) { int_error(c_token, "size: 2 numbers expected"); xsize_t = 0.; } else { ysize_t = real_expression(); } if (xsize_t < 2. || ysize_t < 2. || xsize_t > 99. || ysize_t > 99.) { if (xsize_t != 0. || ysize_t != 0.) int_error(c_token, "size: out of range"); xsize_t = ysize_t = 0.; } } break; case FIG_FONT: { char *fontname; int sep; c_token++; if (END_OF_COMMAND || !((fontname = try_to_get_string()))) int_error(c_token, "expecting font name"); sep = strcspn(fontname,","); sscanf (&(fontname[sep+1]),"%d",&FIG_font_s); fontname[sep] = '\0'; FIG_font_id = lookup_table_entry(FIG_fonts, fontname); if (FIG_font_id < 0) FIG_font_id = FIG_ROMAN_FONT; free(fontname); break; } case FIG_FONTSIZE: c_token++; FIG_font_s = int_expression(); break; case FIG_THICKNESS: c_token++; if (END_OF_COMMAND) { int_error(c_token, "thickness: number expected"); } else { FIG_default_thickness = int_expression(); if (FIG_default_thickness < 1 || FIG_default_thickness > 10) { int_error(c_token - 1, "thickness out of range"); FIG_default_thickness = 1; } } break; case FIG_DEPTH: c_token++; if (END_OF_COMMAND) { int_error(c_token, "depth: number expected"); } else { FIG_depth = int_expression(); if (FIG_depth < 0 || FIG_depth > 99) { int_error(c_token - 1, "depth out of range"); FIG_depth = 10; } FIG_linedepth = FIG_depth; } break; case FIG_POINTSMAX: /* Skip the word and then expect the number ! */ c_token++; if (END_OF_COMMAND) { int_error(c_token, "max. points per polyline: number expected"); } else { temp_max = (long) real_expression(); /* Now check the range for the number */ if ((temp_max > 1) && (temp_max < (FIG_MAX_POINTS + 2))) { /* OK. subtract one to the right number! See other numbers... */ FIG_poly_vec_max = temp_max - 1; } else { int_error(c_token, "pointsmax: number out of range (2,%ld)", (FIG_MAX_POINTS + 1)); } } break; case FIG_VERSION: c_token++; if (END_OF_COMMAND) { int_error(c_token, "version: 3.1 or 3.2 expected"); } else { copy_str( FIG_version, c_token, MAX_ID_LEN ); c_token++; if( strcmp( FIG_version, "3.1" ) != 0 && strcmp( FIG_version, "3.2" ) != 0 ) { int_error(c_token, "wrong version number, must be 3.1 or 3.2"); } } break; case FIG_OTHER: default: parse_error = TRUE; int_error(c_token, "unrecognized option"); break; } } if( FIG_text_flags == FIG_TEXT_NORMAL ) { strcpy( text_flags, " textnormal" ); } else { sprintf( text_flags, "%s%s%s", (FIG_text_flags & FIG_TEXT_SPECIAL) ? " textspecial" : "", (FIG_text_flags & FIG_TEXT_HIDDEN) ? " texthidden" : "", (FIG_text_flags & FIG_TEXT_RIGID) ? " textrigid" : "" ); } sprintf(term_options, "%s %s %s %d %s %s %s%s %s \"%s,%d\" %s %d %s %d %s %s", FIG_use_color ? "color" : "monochrome", FIG_is_big ? "big" : "small", "pointsmax", FIG_poly_vec_max + 1, FIG_portrait ? "portrait" : "landscape", FIG_inches ? "inches" : "metric", FIG_solid ? "solid" : "dashed", text_flags, "font", FIG_fonts[FIG_font_id].key, /* fontsize */ (FIG_font_s > 0 ? FIG_font_s : (FIG_is_big ? BFIG_FONT_S : FIG_FONT_S)), "linewidth", FIG_default_thickness, "depth", FIG_depth, "version", FIG_version ); /* JFS, KB, ULIG */ if (xsize_t > 0. && ysize_t > 0.) { if (xsize_t - (int) xsize_t == 0. && ysize_t - (int) ysize_t == 0.) sprintf(term_options + strlen(term_options), " size %d %d", (int) xsize_t, (int) ysize_t); else sprintf(term_options + strlen(term_options), " size %f %f", xsize_t, ysize_t); } if (!FIG_is_big) { if (FIG_font_s <= 0) /* KB */ FIG_font_s = FIG_FONT_S; term->xmax = FIG_XMAX(FIG_inches); term->ymax = FIG_YMAX(FIG_inches); term->v_tic = FIG_VTIC(FIG_inches); term->h_tic = FIG_HTIC(FIG_inches); FIG_xoff = FIG_XOFF(FIG_inches); FIG_yoff = FIG_YOFF(FIG_inches); } else { if (FIG_font_s <= 0) /* KB */ FIG_font_s = BFIG_FONT_S; term->xmax = BFIG_XMAX(FIG_inches); term->ymax = BFIG_YMAX(FIG_inches); term->v_tic = BFIG_VTIC(FIG_inches); term->h_tic = BFIG_HTIC(FIG_inches); FIG_xoff = BFIG_XOFF(FIG_inches); FIG_yoff = BFIG_YOFF(FIG_inches); } if (FIG_portrait) { /* KB */ tmax_t = term->xmax; term->xmax = term->ymax; term->ymax = tmax_t; } if (xsize_t > 0. && ysize_t > 0.) { term->xmax = (unsigned int) (xsize_t * FIG_TRUERES); term->ymax = (unsigned int) (ysize_t * FIG_TRUERES); } term->v_char = FIG_to_pixel_v(FIG_inches, FIG_font_s); term->h_char = FIG_to_pixel_h(FIG_inches, FIG_font_s); FIG_thickness = FIG_default_thickness; if (parse_error) { /* JFS, KB */ int_error(c_token, "unrecognized option"); } } static void FIG_poly_clean(enum FIG_poly_stat fig_stat) { int i, j; int cap_style; if (fig_stat == FIG_poly_part) { cap_style = (FIG_line.style==DOTTED_LINE) ? CAP_ROUND : FIG_line.cap_style; fprintf(gpoutfile, "%d %d %d %d %d %d %d %d %d %9.3f %d %d %d %d %d %ld\n\t", O_POLYLINE, FIG_line.type, FIG_line.style, FIG_line.thickness, FIG_line.pen_color, FIG_line.fill_color, FIG_line.depth, FIG_line.pen_style, FIG_line.fill_style, FIG_line.style_val, FIG_line.join_style, cap_style, FIG_line.radius, 0, 0, FIG_poly_vec_cnt); j = 0; for (i = 0; i < FIG_poly_vec_cnt; i++) { fprintf(gpoutfile, " %d %d", FIG_points[i].x, FIG_points[i].y); if (j++ > 4 && i != FIG_poly_vec_cnt - 1) { fputs("\n\t", gpoutfile); j = 0; /* JFS */ } } if (j != 0) { putc('\n', gpoutfile); } /* Give the memory back to the system because we are done with this * polyline. Make sure FIG_points contains NULL afterwards! */ free(FIG_points); FIG_points = NULL; } FIG_polyvec_stat = FIG_poly_new; } TERM_PUBLIC void FIG_init() { FIG_posx = FIG_posy = 0; FIG_polyvec_stat = FIG_poly_new; FIG_linetype(-1); FIG_justify_text(LEFT); FIG_text_angle(0); FIG_palette_set = FALSE; /* PM3D Palette Set ? */ FIG_line.tagged = FIG_DEFAULT; FIG_line.distrib = FIG_DEFAULT; FIG_line.type = T_POLYLINE; FIG_line.style = 0; FIG_line.thickness = FIG_thickness; FIG_line.fill_style = -1; FIG_line.depth = FIG_linedepth; FIG_line.pen_style = 0; FIG_line.for_arrow = NULL; FIG_line.back_arrow = NULL; FIG_line.cap_style = 0; FIG_line.join_style = 0; FIG_line.style_val = 0.0; FIG_line.radius = 0; FIG_line.pic = NULL; FIG_line.next = NULL; /* Add further versions headers below (ULIG). There is probably more work to be done */ /* than only changing the header in future xfig versions */ if( strcmp(FIG_version, "3.1") == 0 ) { fprintf( gpoutfile, "#FIG 3.1\n%s\n%s\n%s\n%d %d\n", FIG_ORIENT, FIG_JUST, FIG_UNIT, FIG_IRES, FIG_COORD_SYS ); } else if( strcmp(FIG_version, "3.2") == 0 ) { fprintf( gpoutfile, "#FIG 3.2\n%s\n%s\n%s\n%s\n%6.2f\n%s\n%d\n%d %d\n", FIG_ORIENT, FIG_JUST, FIG_UNIT, FIG_PAPER, FIG_MAGNIFICATION, FIG_MULTIPAGE, FIG_TRANSCOLOR, FIG_IRES, FIG_COORD_SYS ); } } TERM_PUBLIC void FIG_graphics() { FIG_posx = FIG_posy = 0; FIG_polyvec_stat = FIG_poly_new; /* there is no way to have separate pictures in a FIG file */ } TERM_PUBLIC void FIG_text() { /* there is no way to have separate pictures in a FIG file */ FIG_poly_clean(FIG_polyvec_stat); FIG_posx = FIG_posy = 0; fflush(gpoutfile); } /* Line types for FIG work like this: * for monochrome: * -2 : solid (border) * -1 : dotted 4 (axes) * 0 : solid (first curve) * 1 : dotted 3 * 2 : dashed 3 * 3 : dotted 6 * 4 : dashed 6 * ... ... * for color, cycle through colors. once colors are used up, repeat colors * but start using dashed lines of different dash length. don't use white * as a color. */ TERM_PUBLIC void FIG_linetype(int linetype) /* expect linetype >= -2 */ { int last_FIG_type = FIG_type; int last_FIG_spacing = FIG_spacing; int last_FIG_color = FIG_color; int last_FIG_depth = FIG_linedepth; int last_FIG_thickness = FIG_thickness; /* mapping of fig color codes to color sequence as in the postscript terminal */ #define npscolors 9 int fig2pscolors[npscolors] = { 4 /*red*/, 2 /*green*/, 1 /*blue*/, 5 /*magenta*/, 3 /*cyan*/, 6 /*yellow*/, 0 /*black*/, 26 /*brown*/, 11 /*use LtBlue instead of light gray*/ /* note: black=1, white=8 */ }; FIG_linedepth = FIG_depth; FIG_thickness = FIG_current_linewidth * FIG_default_thickness; if (FIG_thickness < 1) FIG_thickness = 1; FIG_color = DEFAULT; if (linetype <= LT_NODRAW) linetype = LT_BLACK; switch (linetype) { case 0: case LT_BLACK:{ FIG_type = SOLID_LINE; FIG_spacing = 0.0; if (FIG_use_color) #if 0 /* fig's old color sequence */ FIG_color = BLACK; #else /* color sequence compatible to the postscript terminal */ if (linetype==0) FIG_color = fig2pscolors[0]; /* red */ #endif break; } case LT_AXIS:{ FIG_type = DOTTED_LINE; if( FIG_solid ) FIG_type = SOLID_LINE; FIG_spacing = 4.0; /* gap */ if (FIG_use_color) FIG_color = BLACK; break; } default:{ /* now linetype >= 1 --- shouldn't be negative anyway */ FIG_linedepth = FIG_depth + linetype / 1000; linetype %= 1000; /* Thickness of lines is either included in the linetype */ /* (in Fig units) or the default is scaled with the */ /* current 'linewidth'. */ if ((FIG_thickness = linetype / 100) == 0) FIG_thickness = FIG_current_linewidth * FIG_default_thickness; if (FIG_thickness < 1) /* Less than 1 would be invisible */ FIG_thickness = 1; linetype %= 100; if (FIG_use_color) { #if 0 /* fig's old color sequence */ FIG_type = (linetype >= WHITE); /* dashed line */ FIG_color = linetype % WHITE; FIG_spacing = (linetype / WHITE) * 3; #else /* color sequence compatible to the postscript terminal */ FIG_type = (linetype >= npscolors); /* dashed line */ FIG_color = fig2pscolors[linetype % npscolors]; FIG_spacing = (linetype / npscolors) * 3; #endif } else { /* monochrome */ FIG_type = (linetype)? linetype%2 + 1 : SOLID_LINE; /* dotted, dashed, ... */ FIG_spacing = (linetype + 1) / 2 * 3; } if( FIG_solid ) FIG_type = SOLID_LINE; break; } } if (FIG_type != last_FIG_type || FIG_spacing != last_FIG_spacing || FIG_color != last_FIG_color || FIG_linedepth != last_FIG_depth || FIG_thickness != last_FIG_thickness) FIG_poly_clean(FIG_polyvec_stat); } TERM_PUBLIC void FIG_move(unsigned int x, unsigned int y) { int last_FIG_posx = FIG_posx; int last_FIG_posy = FIG_posy; FIG_posx = x; FIG_posy = y; if (FIG_posx != last_FIG_posx || FIG_posy != last_FIG_posy) FIG_poly_clean(FIG_polyvec_stat); } TERM_PUBLIC void FIG_vector(unsigned int ux, unsigned int uy) { int x = ux, y = uy; if (FIG_polyvec_stat != FIG_poly_part) { FIG_line.pen_color = FIG_color; FIG_line.fill_color = FIG_color; FIG_line.style = FIG_type; FIG_line.style_val = FIG_spacing; FIG_line.depth = FIG_linedepth; FIG_line.thickness = FIG_thickness; FIG_poly_vec_cnt = 0; /* allocate memory for the first point */ FIG_points = (F_point *) gp_realloc(FIG_points, sizeof(F_point), "FIG_points"); /* JFS */ FIG_points[FIG_poly_vec_cnt].x = FIG_xoff + FIG_posx; FIG_points[FIG_poly_vec_cnt].y = term->ymax + FIG_yoff - FIG_posy; FIG_poly_vec_cnt = 1; FIG_polyvec_stat = FIG_poly_part; } /* allocate memory for the next point */ FIG_points = (F_point *) gp_realloc(FIG_points, (FIG_poly_vec_cnt + 1) * sizeof(F_point), "FIG_points"); /* JFS */ FIG_points[FIG_poly_vec_cnt].x = FIG_xoff + x; FIG_points[FIG_poly_vec_cnt].y = term->ymax + FIG_yoff - y; FIG_poly_vec_cnt++; if (FIG_poly_vec_cnt > FIG_poly_vec_max) FIG_poly_clean(FIG_polyvec_stat); FIG_posx = x; FIG_posy = y; } TERM_PUBLIC void FIG_arrow( unsigned int sx, unsigned int sy, /* start coord */ unsigned int ex, unsigned int ey, /* end coord */ int head) { int cap_style; double awidth, aheight; /* arrow head sizes */ FIG_poly_clean(FIG_polyvec_stat); cap_style = (FIG_line.style==DOTTED_LINE)? CAP_ROUND : FIG_line.cap_style; fprintf(gpoutfile, "%d %d %d %d %d %d %d %d %d %9.3f %d %d %d %d %d %d\n", O_POLYLINE, FIG_line.type, FIG_type, FIG_thickness, FIG_color, FIG_color, FIG_linedepth, FIG_line.pen_style, FIG_line.fill_style, FIG_spacing, FIG_line.join_style, cap_style, FIG_line.radius, head ? 1 : 0, head==2 ? 1 : 0, 2); /* arrow head(s) */ if (head) { unsigned int headbackangleparameter = 0; unsigned int headfillparameter = 0; /* arrow head size */ if (curr_arrow_headlength==0) { awidth = (double) (term->h_tic / 2 + 1); aheight = (double) term->h_tic; } else { awidth = (double) curr_arrow_headlength * 2*sin(curr_arrow_headangle*M_PI/180); aheight = (double) curr_arrow_headlength * cos(curr_arrow_headangle*M_PI/180); } /* arrow head geometry */ if ( curr_arrow_headbackangle < 70 ) headbackangleparameter = 2; else if ( curr_arrow_headbackangle > 110 ) headbackangleparameter = 3; else headbackangleparameter = 1; if (curr_arrow_headfilled==2) headfillparameter = 1; else headfillparameter = 0; /* forward head */ fprintf(gpoutfile, "%d %d %.3f %.3f %.3f\n", headbackangleparameter, headfillparameter, 1.0, awidth, aheight); /* backward head */ if (head==2) fprintf(gpoutfile, "%d %d %.3f %.3f %.3f\n", headbackangleparameter, headfillparameter, 1.0, awidth, aheight); } /* arrow line */ fprintf(gpoutfile, "%d %d %d %d\n", FIG_xoff + sx, FIG_yoff + term->ymax - sy, FIG_yoff + ex, FIG_yoff + term->ymax - ey); FIG_posx = ex; FIG_posy = ey; } TERM_PUBLIC void FIG_put_text(unsigned int x, unsigned int y, const char *str) { char *s1, *s2, *output_string; if (strlen(str) == 0) return; output_string = (char *) gp_alloc(2*strlen(str)+1, "FIG text"); s1 = (char *)str; s2 = output_string; do { if (*s1 == '\\') *(s2++) = *s1; *(s2++) = *s1; } while ( *(s1++) ); FIG_poly_clean(FIG_polyvec_stat); if (FIG_angle == 0.) y -= term->v_char / 2; /* assuming vertical center justified */ else { x += (int)(term->v_char*sin(FIG_angle)/4.); y -= (int)(term->v_char*cos(FIG_angle)/4.); } fprintf(gpoutfile, "%d %d %d %d %d %d %6.3f %6.3f %d %6.3f %6.3f %d %d %s\\001\n", OBJ_TEXT, FIG_justify, FIG_color, 0, FIG_DEFAULT, FIG_font_id, (float) FIG_font_s, FIG_angle, FIG_text_flags, (float) term->v_char, (float) term->h_char * strlen(str), FIG_xoff + x, term->ymax + FIG_yoff - y, output_string); free(output_string); } TERM_PUBLIC int FIG_justify_text(enum JUSTIFY mode) { switch (mode) { case LEFT: FIG_justify = T_LEFT_JUSTIFIED; break; case CENTRE: FIG_justify = T_CENTER_JUSTIFIED; break; case RIGHT: FIG_justify = T_RIGHT_JUSTIFIED; break; /* shouldn't happen */ default: FIG_justify = T_LEFT_JUSTIFIED; return (FALSE); break; } return (TRUE); } TERM_PUBLIC int FIG_text_angle(int ang) { FIG_angle = ang * M_PI_2 / 90. ; return (TRUE); } TERM_PUBLIC void FIG_lpoint(unsigned int x, unsigned int y, int number) { FIG_type = 0; /* Solid lines for marker outline */ if (number % 100 >= 49 && number % 100 < 99) { /* circles, squares, triangles */ int r, d, h, xpc, ypc; int line_color, fill_color, fill_style; int cnum, tnum, color, depth; FIG_poly_clean(FIG_polyvec_stat); depth = FIG_linedepth - 1; /* Above error bars */ if (number > 1000) depth = FIG_depth + number / 1000 - 1; number %= 1000; if (depth < 0) depth = 0; if (number < 100) color = FIG_color; else if (FIG_use_color) color = number / 100 - 1; else if (number / 100 >= WHITE) color = WHITE; else color = DEFAULT; number %= 100; cnum = (number + 1) % 10; tnum = (number - 49) / 10; if (cnum < 5) line_color = (FIG_use_color ? BLACK : DEFAULT); else line_color = FIG_color; fill_color = color; if (cnum == 0 || cnum == 5) fill_style = -1; else fill_style = (cnum % 5) * 5; xpc = FIG_xoff + x; ypc = term->ymax + FIG_yoff - y; if (tnum == 0) { /* circle */ r = FIG_current_pointsize * term->v_char / 4 + 1; fprintf(gpoutfile, "1 3 %d %d %d %d %d %d %d %6.3f 1 0.000 %d %d %d %d %d %d %d %d\n", FIG_type, FIG_thickness, line_color, fill_color, depth, 0, fill_style, FIG_spacing, xpc, ypc, r, r, xpc, ypc, xpc, ypc - r); } else { fprintf(gpoutfile, "2 3 %d %d %d %d %d %d %d %6.3f 0 0 0 0 0 ", FIG_type, FIG_thickness, line_color, fill_color, depth, 0, fill_style, FIG_spacing); if (tnum == 1) { /* square */ d = FIG_current_pointsize * term->v_char / 4 + 1; fprintf(gpoutfile, "5\n\t%d %d %d %d %d %d %d %d %d %d\n", xpc - d, ypc - d, xpc - d, ypc + d, xpc + d, ypc + d, xpc + d, ypc - d, xpc - d, ypc - d); } else if (tnum == 2) { /* diamond */ d = FIG_current_pointsize * term->v_char / 3 + 1; fprintf(gpoutfile, "5\n\t%d %d %d %d %d %d %d %d %d %d\n", xpc - d, ypc, xpc, ypc + d, xpc + d, ypc, xpc, ypc - d, xpc - d, ypc); } else if (tnum == 3) { /* triangle up */ d = FIG_current_pointsize * term->v_char / 3 + 1; h = d * 4 / 7; /* About d times one 3rd of sqrt(3) */ fprintf(gpoutfile, "4\n\t%d %d %d %d %d %d %d %d\n", xpc - d, ypc + h, xpc, ypc - 2 * h, xpc + d, ypc + h, xpc - d, ypc + h); } else if (tnum == 4) { /* triangle down */ d = FIG_current_pointsize * term->v_char / 3 + 1; h = d * 4 / 7; fprintf(gpoutfile, "4\n\t%d %d %d %d %d %d %d %d\n", xpc - d, ypc - h, xpc, ypc + 2 * h, xpc + d, ypc - h, xpc - d, ypc - h); } } } else { int pt = number % 13; switch (pt) { default: do_point(x, y, pt); break; case 3: FIG_lpoint(x, y, 64); break; case 4: FIG_lpoint(x, y, 68); break; case 5: FIG_lpoint(x, y, 54); break; case 6: FIG_lpoint(x, y, 58); break; case 7: FIG_lpoint(x, y, 84); break; case 8: FIG_lpoint(x, y, 88); break; case 9: FIG_lpoint(x, y, 94); break; case 10: FIG_lpoint(x, y, 98); break; case 11: FIG_lpoint(x, y, 74); break; case 12: FIG_lpoint(x, y, 78); break; } } } TERM_PUBLIC void FIG_pointsize(double arg_pointsize) { FIG_current_pointsize = arg_pointsize < 0. ? 1. : arg_pointsize; /* Bug-fix by hkeller@gwdg.de and K.B.: set pointsize for do_point() */ do_pointsize(arg_pointsize * FIG_font_s / (double) FIG_FONT_S); } TERM_PUBLIC void FIG_linewidth(double linewidth) { FIG_current_linewidth = linewidth; } TERM_PUBLIC void FIG_reset() { FIG_poly_clean(FIG_polyvec_stat); FIG_posx = FIG_posy = 0; fflush(gpoutfile); } TERM_PUBLIC void FIG_boxfill( int style, unsigned int x, unsigned int y, unsigned int w, unsigned int h) { int pen_color, fill_color, fill_style, fill_dens; FIG_poly_clean(FIG_polyvec_stat); FIG_line.pen_color = FIG_color; switch( style & 0xf ) { case FS_SOLID: case FS_TRANSPARENT_SOLID: /* style == 1 --> filled with intensity according to filldensity */ pen_color = FIG_line.pen_color; fill_color = FIG_line.pen_color; fill_dens = style >> 4; if( fill_dens < 0 ) fill_dens = 0; if( fill_dens > 100 ) fill_dens = 100; if( FIG_color == -1 || FIG_color == 0 ) /* default color or black: solid 0%...100% -> 0...20 */ fill_style = fill_dens / 5; else /* all other colors: solid 0%...100% -> 40...20 */ fill_style = 40 - fill_dens / 5; break; case FS_PATTERN: case FS_TRANSPARENT_PATTERN: /* style == 2 --> filled with pattern according to fillpattern */ pen_color = FIG_line.pen_color; fill_color = WHITE; fill_style = 41 + ( ( (style>>4) < 0 ) ? 0 : style>>4 ); break; case FS_EMPTY: default: /* style == 0 or unknown --> filled with background color */ pen_color = FIG_line.pen_color; fill_color = WHITE; fill_style = 20; } x = FIG_xoff + x; y = term->ymax + FIG_yoff - y; fprintf(gpoutfile, "%d %d %d %d %d %d %d %d %d %6.3f %d %d %d %d %d %d\n" " %d %d %d %d %d %d %d %d %d %d\n", O_POLYLINE, FIG_line.type, FIG_line.style, FIG_line.thickness, pen_color, fill_color, FIG_line.depth, FIG_line.pen_style, fill_style, FIG_line.style_val, FIG_line.join_style, FIG_line.cap_style, FIG_line.radius, 0, 0, 5, x, y, x+w, y, x+w, y-h, x, y-h, x, y ); } TERM_PUBLIC int FIG_make_palette(t_sm_palette *palette) { int i; /* Query to determine palette size */ if (palette==NULL) { return FIG_palette_size; /* How big is palette ? */ } FIG_poly_clean(FIG_polyvec_stat); /* Clean up current data */ if (FIG_palette_set == FALSE) { /* Create new palette */ FIG_palette_set = TRUE; if (FIG_use_color == FALSE || sm_palette.colorMode == SMPAL_COLOR_MODE_GRAY) { /* Gray palette */ if (FIG_use_color == FALSE && sm_palette.colorMode == SMPAL_COLOR_MODE_RGB) fprintf(stderr, "Monochrome fig file: using gray palette instead of color\n"); for (i = 0; i < sm_palette.colors; i++) { int j = (int)(i * 255.0 / (sm_palette.colors-1) + 0.5); fprintf(gpoutfile, "%d %d #%2.2x%2.2x%2.2x\n", O_COLOR_DEF, (i + FIG_palette_offst), j, j, j); } } else { /* Create colour/normal palette */ for (i = 0; i < sm_palette.colors; i++) { fprintf(gpoutfile, "%d %d #%2.2x%2.2x%2.2x\n", O_COLOR_DEF, (i + FIG_palette_offst), (int)( palette->color[i].r * 255 + 0.5 ), (int)( palette->color[i].g * 255 + 0.5 ), (int)( palette->color[i].b * 255 + 0.5 ) ); } } } else { fprintf(stderr, "fig: Attempt to set palette twice\n"); } return 0; } /* This doesn't apply for FIG format files TERM_PUBLIC void FIG_previous_palette() { } */ TERM_PUBLIC void FIG_set_color(t_colorspec *colorspec) { double gray = colorspec->value; int new_color; if (colorspec->type == TC_LT) { FIG_linetype(colorspec->lt); return; } if (colorspec->type != TC_FRAC) return; new_color = (gray <= 0) ? 0 : (int)(gray * sm_palette.colors); if (new_color >= FIG_palette_size) new_color = FIG_palette_size - 1; if (FIG_palette_set == FALSE) { fprintf(stderr,"fig: Palette used before set\n"); /* Error condition */ } new_color += FIG_palette_offst; if (FIG_color != new_color) { FIG_poly_clean(FIG_polyvec_stat); FIG_color = new_color; } } TERM_PUBLIC void FIG_filled_polygon(int points, gpiPoint *corners) { int i,j; FIG_poly_clean(FIG_polyvec_stat); /* Clean up current data */ fprintf(gpoutfile, "%d %d %d %d %d %d %d %d %d %9.3f %d %d %d %d %d %ld\n\t", O_POLYLINE, T_POLYGON, FIG_line.style, 0, FIG_color, FIG_color, FIG_line.depth, FIG_line.pen_style, FIG_fill_style, FIG_line.style_val, FIG_line.join_style, FIG_line.cap_style, FIG_line.radius, 0, 0, (long)(points+1)); /* set thickness (arg 4) to 0 */ j = 0; for (i = 0; i < points; i++) { fprintf(gpoutfile, " %d %d", FIG_xoff + corners[i].x, term->ymax + FIG_yoff - corners[i].y); if (j++ > 4 && i != points - 1) { fputs("\n\t", gpoutfile); j = 0; /* JFS */ } } fprintf(gpoutfile, " %d %d", FIG_xoff + corners[0].x, term->ymax + FIG_yoff - corners[0].y); j++; if (j != 0) { putc('\n', gpoutfile); } } TERM_PUBLIC void FIG_layer(t_termlayer syncpoint) { static int plotno = 0; /* We must ignore all syncpoints that we don't recognize */ switch (syncpoint) { default: break; case TERM_LAYER_BEFORE_PLOT: FIG_poly_clean(FIG_polyvec_stat); fputs("6", gpoutfile); /* Bounding box? Give it the entire plot area */ fprintf(gpoutfile, " %d %d %d %d\n", FIG_xoff + plot_bounds.xleft, term->ymax + FIG_yoff - plot_bounds.ytop, FIG_xoff + plot_bounds.xright, term->ymax + FIG_yoff - plot_bounds.ybot); fprintf(gpoutfile, "# Begin plot #%d\n", ++plotno); break; case TERM_LAYER_AFTER_PLOT: FIG_poly_clean(FIG_polyvec_stat); fprintf(gpoutfile, "# End plot #%d\n", plotno); fputs("-6\n", gpoutfile); break; case TERM_LAYER_RESET: plotno = 0; break; } } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(fig_driver) "fig", "FIG graphics language for XFIG graphics editor", FIG_XMAX(INCH), FIG_YMAX(INCH), FIG_VCHAR, FIG_HCHAR, FIG_VTIC(INCH), FIG_HTIC(INCH), FIG_options, FIG_init, FIG_reset, FIG_text, null_scale, FIG_graphics, FIG_move, FIG_vector, FIG_linetype, FIG_put_text, FIG_text_angle, FIG_justify_text, FIG_lpoint, FIG_arrow, set_font_null, FIG_pointsize, TERM_BINARY|TERM_CAN_DASH /*flags */ , 0 /*suspend */ , 0 /*resume */ , FIG_boxfill, FIG_linewidth #ifdef USE_MOUSE ,0, 0, 0, 0, 0 /* no mouse support for the fig terminal */ #endif , FIG_make_palette, 0 /*previous_palette*/, FIG_set_color, FIG_filled_polygon , 0 , 0, 0, 0 /* no enhanced text support */ , FIG_layer TERM_TABLE_END(fig_driver) #undef LAST_TERM #define LAST_TERM fig_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(fig) "1 fig", "?commands set terminal fig", "?set terminal fig", "?set term fig", "?terminal fig", "?term fig", "?fig", "?xfig", " The `fig` terminal device generates output in the Fig graphics language.", "", " Syntax:", " set terminal fig {monochrome | color}", " {landscape | portrait}", " {small | big | size <xsize> <ysize>}", " {metric | inches}", " {pointsmax <max_points>}", " {solid | dashed}", " {font \"<fontname>{,<fontsize>}\"}", " {textnormal | {textspecial texthidden textrigid}}", " {{thickness|linewidth} <units>}", " {depth <layer>}", " {version <number>}", "", " `monochrome` and `color` determine whether the picture is black-and-white or", " `color`. `small` and `big` produce a 5x3 or 8x5 inch graph in the default", " `landscape` mode and 3x5 or 5x8 inches in `portrait` mode.", " `size` sets (overrides) the size of the drawing", " area to <xsize>*<ysize> in units of inches or centimeters depending on the", " `inches` or `metric` setting in effect.", " The latter settings is also used as default units for editing with \"xfig\".", "", " `pointsmax <max_points>` sets the maximum number of points per polyline.", "", " `solid` inhibits automatic usage of `dash`ed lines when solid linestyles are", " used up, which otherwise occurs.", "", " `font` sets the text font face to <fontname> and its size to <fontsize>", " points. `textnormal` resets the text flags and selects postscript fonts,", " `textspecial` sets the text flags for LaTeX specials, `texthidden` sets the", " hidden flag and `textrigid` the rigid flag.", "", " `depth` sets the default depth layer for all lines and text. The default", " depth is 10 to leave room for adding material with \"xfig\" on top of the", " plot.", "", " `version` sets the format version of the generated fig output. Currently", " only versions 3.1 and 3.2 are supported.", "", " `thickness` sets the default line thickness, which is 1 if not specified.", " Overriding the thickness can be achieved by adding a multiple of 100 to the", " `linetype` value for a `plot` command. In a similar way the `depth`", " of plot elements (with respect to the default depth) can be controlled by", " adding a multiple of 1000 to <linetype>. The depth is then <layer> +", " <linetype>/1000 and the thickness is (<linetype>%1000)/100 or, if that is", " zero, the default line thickness. `linewidth` is a synonym for `thickness`.", "", " Additional point-plot symbols are also available with the `fig` driver. The", " symbols can be used through `pointtype` values % 100 above 50, with different", " fill intensities controlled by <pointtype> % 5 and outlines in black (for", " <pointtype> % 10 < 5) or in the current color. Available symbols are", " 50 - 59: circles", " 60 - 69: squares", " 70 - 79: diamonds", " 80 - 89: upwards triangles", " 90 - 99: downwards triangles", " The size of these symbols is linked to the font size. The depth of symbols", " is by default one less than the depth for lines to achieve nice error bars.", " If <pointtype> is above 1000, the depth is <layer> + <pointtype>/1000-1. If", " <pointtype>%1000 is above 100, the fill color is (<pointtype>%1000)/100-1.", "", " Available fill colors are (from 1 to 9): black, blue, green, cyan, red,", " magenta, yellow, white and dark blue (in monochrome mode: black for 1 to 6", " and white for 7 to 9).", "", " See `plot with` for details of <linetype> and <pointtype>.", "", " The `big` option is a substitute for the `bfig` terminal in earlier versions,", " which is no longer supported.", "", " Examples:", " set terminal fig monochrome small pointsmax 1000 # defaults", "", " plot 'file.dat' with points linetype 102 pointtype 759", " would produce circles with a blue outline of width 1 and yellow fill color.", "", " plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 554", " would produce errorbars with black lines and circles filled red. These", " circles are one layer above the lines (at depth 9 by default).", "", " To plot the error bars on top of the circles use", " plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 2554" END_HELP(fig) #endif /* TERM_HELP */ #if 0 /* I hope this is enough to stop compilers looking in here * (I think that anything inside #if 0 is still strictly * required to be valid C, rather than just any old junk * like this.) */ /* * FIG : Facility for Interactive Generation of figures * Copyright (c) 1985 by Supoj Sutanthavibul * Parts Copyright (c) 1994 by Brian V. Smith * Parts Copyright (c) 1991 by Paul King * * The X Consortium, and any party obtaining a copy of these files from * the X Consortium, directly or indirectly, is granted, free of charge, a * full and unrestricted irrevocable, world-wide, paid up, royalty-free, * nonexclusive right and license to deal in this software and * documentation files (the "Software"), including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons who receive * copies from any such party to do so, with the only requirement being * that this copyright notice remain intact. This license includes without * limitation a license to do the foregoing actions under any patents of * the party supplying this software to the X Consortium. */ /* The only difference from version 3.0 to version 3.1 is that the position of the "magnet" has been shifted by 14 Fig units. In the 2.1 and older versions of xfig the grid was in multiples of 5 Fig units, but they were on intervals 4, 9, 14, 19, etc. When version 3.0 was created, coordinates were simply multiplied by the ratio of the resolutions (1200/80 = 15) so values like 4 became 60 instead of 74 ((4+1)*15 - 1). This means that figures converted from 2.1 and older files are offset by 14 Fig units but new objects entered with version 3.0 are correct. In version 3.1 the magnet grid is at intervals 0, 75, 150, etc instead of -1, 74, 149, etc. Figures from 2.1 and older are correctly converted now and a warning is popped up when you read in a version 3.0 file that says you may have to offset the figure when you load it, using the x and y offsets in the file panel. -------------------------------------------------------------------------------- Description of the Fig Format Follows -------------------------------------------------------------------------------- (1) The very first line is a comment line containing the name and version: #FIG 3.1 The character # at the first column of a line indicates that the line is a comment line which will be ignored. (2) The first non-comment line consists of two numbers and two strings: int fig_resolution (Fig units/inch) string orientation ("Landscape" or "Portrait") string justification ("Center" or "Flush Left") string units ("Metric" or "Inches") int coordinate_system (1: origin is the lower left corner (NOT USED) 2: upper left) Fig_resolution is the resolution of the figure in the file. Xfig will always write the file with a resolution of 1200ppi so it will scale the figure upon reading it in if its resolution is different from 1200ppi. Pixels are assumed to be square. Xfig will read the orientation string and change the canvas to match either the Landscape or Portrait mode of the figure file. The units specification is self-explanatory. The coordinate_system variable is ignored - the origin is ALWAYS the upper-left corner. ** Coordinates are given in "fig_resolution" units. ** Line thicknesses are given in 1/80 of an inch ("display units"). The minimum line thickness is 0 (no line is drawn) and the maximum is 500. ** dash-lengths/dot-gaps are given in 1/80 of an inch. (3) The rest of the file contains various objects. An object can be one of six classes (or types). 0) Color pseudo-object. 1) Arc. 2) Ellipse which is a generalization of circle. 3) Polyline which includes polygon and box. 4) Spline which includes closed/open control/interpolated spline. 5) Text. 6) Compound object which is composed of one or more objects. In the following elaboration on object formats, every value of Fig output are separated by blank characters or new line ('\n'). The value of the unused parameters will be -1. Some fields are described as "enumeration type" or "bit vector"; the values which these fields can take are defined in the header file object.h. The pen_style field is unused. These values may be defined in some future version of Fig. The two color fields (pen and fill; pen only, for texts) are defined as follows: -1 = Default 0 = Black 1 = Blue 2 = Green 3 = Cyan 4 = Red 5 = Magenta 6 = Yellow 7 = White 8-11 = four shades of blue (dark to lighter) 12-14 = three shades of green (dark to lighter) 15-17 = three shades of cyan (dark to lighter) 18-20 = three shades of red (dark to lighter) 21-23 = three shades of magenta (dark to lighter) 24-26 = three shades of brown (dark to lighter) 27-30 = four shades of pink (dark to lighter) 31 = Gold values from 32 to 543 (512 total) are user colors and are defined in color pseudo-objects (type 0) For WHITE color, the area fill field is defined as follows: -1 = not filled 0 = black ... values from 1 to 19 are shades of grey, from darker to lighter 20 = white 21-40 not used 41-56 see patterns for colors, below For BLACK or DEFAULT color, the area fill field is defined as follows: -1 = not filled 0 = white ... values from 1 to 19 are shades of grey, from lighter to darker 20 = black 21-40 not used 41-56 see patterns for colors, below For all other colors, the area fill field is defined as follows: -1 = not filled 0 = black ... values from 1 to 19 are "shades" of the color, from darker to lighter. A shade is defined as the color mixed with black 20 = full saturation of the color ... values from 21 to 39 are "tints" of the color from the color to white. A tint is defined as the color mixed with white 40 = white 41 = 30 degree left diagonal pattern 42 = 30 degree right diagonal pattern 43 = 30 degree crosshatch 44 = 45 degree left diagonal pattern 45 = 45 degree right diagonal pattern 46 = 45 degree crosshatch 47 = bricks 48 = circles 49 = horizontal lines 50 = vertical lines 51 = crosshatch 52 = fish scales 53 = small fish scales 54 = octagons 55 = horizontal "tire treads" 56 = vertical "tire treads" The depth field is defined as follows: 0 ... 999 where larger value means object is deeper than (under) objects with smaller depth The line_style field is defined as follows: -1 = Default 0 = Solid 1 = Dashed 2 = Dotted The style_val field is defined as the length, in 1/80 inches, of the on/off dashes for dashed lines, and the distance between the dots, in 1/80 inches, for dotted lines. The join_style field is defined FOR LINES only as follows: 0 = Miter (the default in xfig 2.1 and earlier) 1 = Bevel 2 = Round The cap_style field is defined FOR LINES, OPEN SPLINES and ARCS only as follows: 0 = Butt (the default in xfig 2.1 and earlier) 1 = Round 2 = Projecting The arrow_type field is defined for LINES, ARCS and OPEN SPLINES only as follows: 0 = Stick-type (the default in xfig 2.1 and earlier) 1 = Closed triangle: |\ | \ | \ | / | / |/ 2 = Closed with "indented" butt: |\ \ \ \ \ \ \ / / / / / / |/ 3 = Closed with "pointed" butt: |\ / \ / \ / \ \ / \ / \ / |/ The arrow_style field is defined for LINES, ARCS and OPEN SPLINES only as follows: 0 = Hollow (actually filled with white) 1 = Filled with pen_color (3.0) OBJECT DEFINITION: (3.1) Color Pseudo-objects (user-defined colors) This is used to define arbitrary colors beyond the 32 standard colors. The color objects must be defined before any other Fig objects. First line: type name (brief description) ---- ---- ------------------- int object_code (always 0) int color_number (color number, from 32-543 (512 total)) hex string rgb values (hexadecimal string describing red, green and blue values (e.g. #330099) ) (3.2) ARC First line: type name (brief description) ---- ---- ------------------- int object_code (always 5) int sub_type (0: pie-wedge (closed) 1: open ended arc) int line_style (enumeration type) int line_thickness (1/80 inch) int pen_color (enumeration type, pen color) int fill_color (enumeration type, fill color) int depth (enumeration type) int pen_style (pen style, not used) int area_fill (enumeration type, -1 = no fill) float style_val (1/80 inch) int cap_style (enumeration type) int direction (0: clockwise, 1: counterclockwise) int forward_arrow (0: no forward arrow, 1: on) int backward_arrow (0: no forward arrow, 1: on) float center_x, center_y (center of the arc) int x1, y1 (Fig units, the 1st point the user entered) int x2, y2 (Fig units, the 2nd point) int x3, y3 (Fig units, the last point) Forward arrow line (Optional; absent if forward_arrow is 0): type name (brief description) ---- ---- ------------------- int arrow_type (enumeration type) int arrow_style (enumeration type) float arrow_thickness (1/80 inch) float arrow_width (Fig units) float arrow_height (Fig units) Backward arrow line (Optional; absent if backward_arrow is 0): type name (brief description) ---- ---- ------------------- int arrow_type (enumeration type) int arrow_style (enumeration type) float arrow_thickness (1/80 inch) float arrow_width (Fig units) float arrow_height (Fig units) (3.3) COMPOUND A line with object code 6 signifies the start of a compound. There are four more numbers on this line which indicate the upper right corner and the lower left corner of the bounding box of this compound. A line with object code -6 signifies the end of the compound. Compound may be nested. First line: type name (brief description) ---- ---- ------------------- int object_code (always 6) int upperright_corner_x (Fig units) int upperright_corner_y (Fig units) int lowerleft_corner_x (Fig units) int lowerleft_corner_y (Fig units) Subsequent lines: objects . . Last line: -6 (3.4) ELLIPSE First line: type name (brief description) ---- ---- ------------------- int object_code (always 1) int sub_type (1: ellipse defined by radiuses 2: ellipse defined by diameters 3: circle defined by radius 4: circle defined by diameter) int line_style (enumeration type) int thickness (1/80 inch) int pen_color (enumeration type, pen color) int fill_color (enumeration type, fill color) int depth (enumeration type) int pen_style (pen style, not used) int area_fill (enumeration type, -1 = no fill) float style_val (1/80 inch) int direction (always 1) float angle (radians, the angle of the x-axis) int center_x, center_y (Fig units) int radius_x, radius_y (Fig units) int start_x, start_y (Fig units; the 1st point entered) int end_x, end_y (Fig units; the last point entered) (3.5) POLYLINE First line: type name (brief description) ---- ---- ------------------- int object_code (always 2) int sub_type (1: polyline 2: box 3: polygon 4: arc-box) 5: imported-picture bounding-box) int line_style (enumeration type) int thickness (1/80 inch) int pen_color (enumeration type, pen color) int fill_color (enumeration type, fill color) int depth (enumeration type) int pen_style (pen style, not used) int area_fill (enumeration type, -1 = no fill) float style_val (1/80 inch) int join_style (enumeration type) int cap_style (enumeration type, only used for POLYLINE) int radius (1/80 inch, radius of arc-boxes) int forward_arrow (0: off, 1: on) int backward_arrow (0: off, 1: on) int npoints (number of points in line) Forward arrow line: same as ARC object Backward arrow line: same as ARC object Points line: type name (brief description) ---- ---- ------------------- int x1, y1 (Fig units) int x2, y2 (Fig units) . . int xnpoints ynpoints (this will be the same as the 1st point for polygon and box) PIC line: type name (brief description) ---- ---- ------------------- boolean flipped orientation = normal (0) or flipped (1) char file[] name of picture file to import (3.6) SPLINE First line: type name (brief description) ---- ---- ------------------- int object_code (always 3) int sub_type (0: open spline 1: closed spline 2: open interpolated spline 3: closed interpolated spline) int line_style (See the end of this section) int thickness (1/80 inch) int pen_color (enumeration type, pen color) int fill_color (enumeration type, fill color) int depth (enumeration type) int pen_style (pen style, not used) int area_fill (enumeration type, -1 = no fill) float style_val (1/80 inch) int cap_style (enumeration type, only used for open splines) int forward_arrow (0: off, 1: on) int backward_arrow (0: off, 1: on) int npoints (number of control points in spline) Forward arrow line: same as ARC object Backward arrow line: same as ARC object Points line: same as POLYLINE object Control points line (absent if sub_type is 0 or 1): Control points of interpolated spline. There are two control points for each knots. A section i, of the spline is drawn using Bezier cubic with the following four points: (x ,y ), (rx ,ry ), (lx , ly ), (x , y ). i i i i i+1 i+1 i+1 i+1 For closed interpolated spline the last pair of control points, (lxnpoints,lynpoints) and (rxnpoints,rynpoints) (which can be ignored), are the same as (lx1,ly1) and (rx1,ry1) respectively. type name (brief description) ---- ---- ------------------- float lx1, ly1 (Fig units) float rx1, ry1 (Fig units) float lx2, ly2 (Fig units) float rx2, ry2 (Fig units) . . float lxnpoints, lynpoints (Fig units) float rxnpoints, rynpoints (Fig units) (3.7) TEXT type name (brief description) ---- ---- ------------------- int object (always 4) int sub_type (0: Left justified 1: Center justified 2: Right justified) int color (enumeration type) int depth (enumeration type) int pen_style (enumeration , not used) int font (enumeration type) float font_size (font size in points) float angle (radians, the angle of the text) int font_flags (bit vector) float height (Fig units) float length (Fig units) int x, y (Fig units, coordinate of the origin of the string. If sub_type = 0, it is the lower left corner of the string. If sub_type = 1, it is the lower center. Otherwise it is the lower right corner of the string.) char string[] (ASCII characters; starts after a blank character following the last number and ends before the sequence '\001'. This sequence is not part of the string. Characters above octal 177 are represented by \xxx where xxx is the octal value. This permits Fig files to be edited with 7-bit editors and sent by e-mail without data loss. Note that the string may contain '\n'.) The font_flags field is defined as follows: Bit Description 0 Rigid text (text doesn't scale when scaling compound objects) 1 Special text (for LaTeX) 2 PostScript font (otherwise LaTeX font is used) 3 Hidden text The font field is defined as follows: For font_flags bit 2 = 0 (LaTeX fonts): 0 Default font 1 Roman 2 Bold 3 Italic 4 Sans Serif 5 Typewriter For font_flags bit 3 = 1 (PostScript fonts): -1 Default font 0 Times Roman 1 Times Italic 2 Times Bold 3 Times Bold Italic 4 AvantGarde Book 5 AvantGarde Book Oblique 6 AvantGarde Demi 7 AvantGarde Demi Oblique 8 Bookman Light 9 Bookman Light Italic 10 Bookman Demi 11 Bookman Demi Italic 12 Courier 13 Courier Oblique 14 Courier Bold 15 Courier Bold Oblique 16 Helvetica 17 Helvetica Oblique 18 Helvetica Bold 19 Helvetica Bold Oblique 20 Helvetica Narrow 21 Helvetica Narrow Oblique 22 Helvetica Narrow Bold 23 Helvetica Narrow Bold Oblique 24 New Century Schoolbook Roman 25 New Century Schoolbook Italic 26 New Century Schoolbook Bold 27 New Century Schoolbook Bold Italic 28 Palatino Roman 29 Palatino Italic 30 Palatino Bold 31 Palatino Bold Italic 32 Symbol 33 Zapf Chancery Medium Italic 34 Zapf Dingbats */ #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/tkcanvas.trm���������������������������������������������������������������������0000644�0004711�0000144�00000051606�10474414146�013453� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: tkcanvas.trm,v 1.28 2006/08/27 22:10:46 sfeam Exp $ * */ /* GNUPLOT - tkcanvas.trm */ /*[ * Copyright 1990 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * Tk/Tcl canvas widgets * * AUTHORS - original dxy.trm * Martin Yii, eln557h@monu3.OZ * Further modified Jan 1990 by Russell Lang, rjl@monu1.cc.monash.oz * * Port to the Tk/Tcl canvas widget * D. Jeff Dionne, July 1995 jeff@ryeham.ee.ryerson.ca * Alex Woo, woo@playfair.stanford.edu * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* * adapted to the new terminal layout by Alex Woo (Sept. 1996) */ /* * extended interactive Tk/Tcl capabilities * Thomas Sefzick, March 1999, t.sefzick@fz-juelich.de * * added the perltk.trm code written by Slaven Rezic <eserte@cs.tu-berlin.de>, * the variable 'tk_perl' switches between tcl/tk and perltk code. * 'linewidth' and 'justify text' added, ends of plotted lines are now rounded. * Thomas Sefzick, May 1999, t.sefzick@fz-juelich.de * * scale plot to fit into the actual size of the canvas as reported by * the window manager (the canvas itself doesn't report its real size). * Matt Willis, October 1999, mattbwillis@my-deja.com */ #include "driver.h" #ifdef TERM_REGISTER register_term(tkcanvas) #endif #ifdef TERM_PROTO TERM_PUBLIC void TK_options __PROTO((void)); TERM_PUBLIC void TK_init __PROTO((void)); TERM_PUBLIC void TK_graphics __PROTO((void)); TERM_PUBLIC void TK_text __PROTO((void)); TERM_PUBLIC void TK_linetype __PROTO((int linetype)); TERM_PUBLIC void TK_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void TK_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void TK_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void TK_reset __PROTO((void)); TERM_PUBLIC int TK_justify_text __PROTO((enum JUSTIFY)); TERM_PUBLIC int TK_set_font __PROTO((const char *font)); TERM_PUBLIC void TK_linewidth __PROTO((double linewidth)); #define TK_XMAX 1000 #define TK_YMAX 1000 #define TK_XLAST (TK_XMAX - 1) #define TK_YLAST (TK_XMAX - 1) #define TK_VCHAR (25) /* double actual height of characters */ #define TK_HCHAR (16) /* actual width including spacing */ #define TK_VTIC (18) #define TK_HTIC (18) #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY /* axis.c */ /* FIXME HBB 20000725: "Never use extern in a source file". This needs * to be fixed. As is, this driver causes the terminal layer to * depend on several other core modules. The lack of proper #include's * partly hides this, but it's still a design bug. "term" is supposed * a 'frontier' layer: it should not be dependant on any other code * inside gnuplot */ extern AXIS axis_array[]; /* command.c */ extern TBOOLEAN is_3d_plot; /* static int tk_angle = 0; unused, for now */ static int tk_lastx; static int tk_lasty; static int tk_color = 0; static char tk_anchor[7] = "w"; static double tk_linewidth = 1.0; static int tk_perl = 0; static int tk_interactive = 0; static const char *tk_colors[] = { "black", "gray", "red", "blue", "green", "brown", "magenta", "cyan" }; enum TK_id { TK_PERLTK, TK_INTERACTIVE, TK_OTHER }; static struct gen_table TK_opts[] = { { "p$erltk", TK_PERLTK }, { "i$nteractive", TK_INTERACTIVE }, { NULL, TK_OTHER } }; TERM_PUBLIC void TK_options() { tk_perl = 0; tk_interactive = 0; while (!END_OF_COMMAND) { switch(lookup_table(&TK_opts[0],c_token)) { case TK_PERLTK: tk_perl = 1; c_token++; break; case TK_INTERACTIVE: tk_interactive = 1; c_token++; break; case TK_OTHER: default: c_token++; break; } } sprintf(term_options, "%s %s", tk_perl ? "perltk" : "", tk_interactive ? "interactive" : ""); } TERM_PUBLIC void TK_init() { } TERM_PUBLIC void TK_graphics() { /* * the resulting tcl or perl code takes the actual width and height * of the defined canvas and scales the plot to fit. * => NOTE: this makes 'set size' useless !!! * unless the original width and height is taken into account * by some tcl or perl code, that's why the 'gnuplot_plotarea' and * 'gnuplot_axisranges' procedures are supplied. */ if (tk_perl) { fputs("\ sub {\n\ my($can) = @_;\n\ $can->delete('all');\n\ my $cmx = $can->width - 2 * $can->cget(-border) - 2 * $can->cget(-highlightthickness);\n\ if ($cmx <= 1) {\n$cmx = ($can->cget(-width));\n}\n\ my $cmy = $can->height - 2 * $can->cget(-border) - 2 * $can->cget(-highlightthickness);\n\ if ($cmy <= 1) {\n$cmy = ($can->cget(-height));\n}\n", gpoutfile); } else { fputs("\ proc gnuplot can {\n\ $can delete all\n\ set cmx [expr [winfo width $can]-2*[$can cget -border]-2*[$can cget -highlightthickness]]\n\ if {$cmx <= 1} {set cmx [$can cget -width]}\n\ set cmy [expr [winfo height $can]-2*[$can cget -border]-2*[$can cget -highlightthickness]]\n\ if {$cmy <= 1} {set cmy [$can cget -height]}\n", gpoutfile); } tk_lastx = tk_lasty = tk_color = 0; } TERM_PUBLIC void TK_reset() { } TERM_PUBLIC void TK_linetype(int linetype) { if (linetype < -2) linetype = LT_BLACK; tk_color = (linetype + 2) & 7; } TERM_PUBLIC void TK_linewidth(double linewidth) { tk_linewidth = linewidth; } TERM_PUBLIC void TK_move(unsigned int x, unsigned int y) { tk_lastx = x; tk_lasty = 1000 - y; } /* FIXME HBB 20000725: should use AXIS_UNDO_LOG() macro... */ #define TK_REAL_VALUE(value,axis) \ (axis_array[axis].log) \ ? pow(axis_array[axis].base, axis_array[axis].min \ + value*(axis_array[axis].max-axis_array[axis].min)) \ : axis_array[axis].min \ + value*(axis_array[axis].max-axis_array[axis].min) #define TK_X_VALUE(value) \ (double)(value-plot_bounds.xleft)/(double)(plot_bounds.xright-plot_bounds.xleft) #define TK_Y_VALUE(value) \ (double)((TK_YMAX-value)-plot_bounds.ybot)/(double)(plot_bounds.ytop-plot_bounds.ybot) TERM_PUBLIC void TK_vector(unsigned int x, unsigned int y) { /* * this is the 1st part of the wrapper around the 'create line' command * used to bind some actions to a line segment: * bind { * normal create line command * } gnuplot_xy(some coordinates) */ if (tk_interactive && !is_3d_plot) { if (tk_perl) fprintf(gpoutfile, "$can->bind("); else fprintf(gpoutfile, "$can bind [\n"); } /* * end of 1st part of wrapper */ y = 1000 - y; /* * here is the basic well-known command for plotting a line segment */ if (tk_perl) { fprintf(gpoutfile,"\ $can->createLine(\ $cmx * %d / 1000, \ $cmy * %d / 1000, \ $cmx * %d / 1000, \ $cmy * %d / 1000, -fill => q{%s}, -width => %f, -capstyle => q{round})", tk_lastx, tk_lasty, x, y, tk_colors[tk_color], tk_linewidth); } else { fprintf(gpoutfile,"\ $can create line \ [expr $cmx * %d /1000] \ [expr $cmy * %d /1000] \ [expr $cmx * %d /1000] \ [expr $cmy * %d /1000] -fill %s -width %f -capstyle round\n", tk_lastx, tk_lasty, x, y, tk_colors[tk_color], tk_linewidth); } /* * this is the 2nd part of the wrapper around the 'create line' * command it generates a mechanism which calls 'gnuplot_xy' for * the line segment pointed to by the mouse cursor when a mouse * button is pressed */ if (tk_interactive && !is_3d_plot) { if (tk_perl) { /* Ev('W') not needed here, supplied anyhow, WHY ??? */ fprintf(gpoutfile,"\ , '<Button>' => \ [\\&gnuplot_xy, %f, %f, %f, %f, %f, %f, %f, %f,", TK_REAL_VALUE(TK_X_VALUE(tk_lastx), FIRST_X_AXIS), TK_REAL_VALUE(TK_Y_VALUE(tk_lasty), FIRST_Y_AXIS), TK_REAL_VALUE(TK_X_VALUE(tk_lastx), SECOND_X_AXIS), TK_REAL_VALUE(TK_Y_VALUE(tk_lasty), SECOND_Y_AXIS), TK_REAL_VALUE(TK_X_VALUE(x), FIRST_X_AXIS), TK_REAL_VALUE(TK_Y_VALUE(y), FIRST_Y_AXIS), TK_REAL_VALUE(TK_X_VALUE(x), SECOND_X_AXIS), TK_REAL_VALUE(TK_Y_VALUE(y), SECOND_Y_AXIS)); if (axis_array[FIRST_X_AXIS].log) { fprintf(gpoutfile, " %f,", TK_REAL_VALUE(TK_X_VALUE(0.5 * (x + tk_lastx)), FIRST_X_AXIS)); } else { fprintf(gpoutfile, " \"\","); } if (axis_array[FIRST_Y_AXIS].log) { fprintf(gpoutfile, " %f,", TK_REAL_VALUE(TK_Y_VALUE(0.5 * (y + tk_lasty)), FIRST_Y_AXIS)); } else { fprintf(gpoutfile, " \"\","); } if (axis_array[SECOND_X_AXIS].log) { fprintf(gpoutfile, " %f,", TK_REAL_VALUE(TK_X_VALUE(0.5 * (x + tk_lastx)), SECOND_X_AXIS)); } else { fprintf(gpoutfile, " \"\","); } if (axis_array[SECOND_Y_AXIS].log) { fprintf(gpoutfile, " %f", TK_REAL_VALUE(TK_Y_VALUE(0.5 * (y + tk_lasty)), SECOND_Y_AXIS)); } else { fprintf(gpoutfile, " \"\""); } fprintf(gpoutfile, "]);\n"); } else { fprintf(gpoutfile,"\ ] <Button> \ \"gnuplot_xy %%W %f %f %f %f %f %f %f %f", TK_REAL_VALUE(TK_X_VALUE(tk_lastx), FIRST_X_AXIS), TK_REAL_VALUE(TK_Y_VALUE(tk_lasty), FIRST_Y_AXIS), TK_REAL_VALUE(TK_X_VALUE(tk_lastx), SECOND_X_AXIS), TK_REAL_VALUE(TK_Y_VALUE(tk_lasty), SECOND_Y_AXIS), TK_REAL_VALUE(TK_X_VALUE(x), FIRST_X_AXIS), TK_REAL_VALUE(TK_Y_VALUE(y), FIRST_Y_AXIS), TK_REAL_VALUE(TK_X_VALUE(x), SECOND_X_AXIS), TK_REAL_VALUE(TK_Y_VALUE(y), SECOND_Y_AXIS)); if (axis_array[FIRST_X_AXIS].log) { fprintf(gpoutfile, " %f", TK_REAL_VALUE(TK_X_VALUE(0.5 * (x + tk_lastx)), FIRST_X_AXIS)); } else { fprintf(gpoutfile, " {}"); } if (axis_array[FIRST_Y_AXIS].log) { fprintf(gpoutfile, " %f", TK_REAL_VALUE(TK_Y_VALUE(0.5 * (y + tk_lasty)), FIRST_Y_AXIS)); } else { fprintf(gpoutfile, " {}"); } if (axis_array[SECOND_X_AXIS].log) { fprintf(gpoutfile, " %f", TK_REAL_VALUE(TK_X_VALUE(0.5 * (x + tk_lastx)), SECOND_X_AXIS)); } else { fprintf(gpoutfile, " {}"); } if (axis_array[SECOND_Y_AXIS].log) { fprintf(gpoutfile, " %f", TK_REAL_VALUE(TK_Y_VALUE(0.5 * (y + tk_lasty)), SECOND_Y_AXIS)); } else { fprintf(gpoutfile, " {}"); } fprintf(gpoutfile, "\"\n"); } } else { if (tk_perl) { fprintf(gpoutfile, ";\n"); } } /* * end of the wrapper */ tk_lastx = x; tk_lasty = y; } #undef TK_REAL_VALUE #undef TK_X_VALUE #undef TK_Y_VALUE TERM_PUBLIC void TK_put_text(unsigned int x, unsigned int y, const char *str) { y = 1000 - y; if (tk_perl) { fprintf(gpoutfile,"\ $can->createText($cmx * %d / 1000, $cmy * %d / 1000, -text => q{%s}, \ -fill => q{%s}, -anchor => '%s', (defined $font ? (-font => $font) : ()));\n", x, y, str, tk_colors[tk_color], tk_anchor); } else { /* Have to quote-protect '[' and ']' characters */ int i, newsize = 0; char *quoted_str; for (i=0; str[i] != '\0'; i++) { if ((str[i] == '[') || (str[i] == ']')) newsize++; newsize++; } quoted_str = gp_alloc(newsize + 1, "TK_put_text: quoted string"); for (i=0, newsize = 0; str[i] != '\0'; i++) { if ((str[i] == '[') || (str[i] == ']')) quoted_str[newsize++] = '\\'; quoted_str[newsize++] = str[i]; } quoted_str[newsize] = '\0'; fprintf(gpoutfile,"\ eval $can create text \ [expr $cmx * %d /1000] \ [expr $cmy * %d /1000] \ -text \\{%s\\} -fill %s -anchor %s\ [expr [info exists font]?\"-font \\$font\":{}]\n", x, y, quoted_str, tk_colors[tk_color], tk_anchor); free(quoted_str); } /* else (!tk_perl) */ } TERM_PUBLIC int TK_justify_text(enum JUSTIFY anchor) { int return_value; switch (anchor) { case RIGHT: strcpy(tk_anchor, "e"); return_value = TRUE; break; case CENTRE: strcpy(tk_anchor, "center"); return_value = TRUE; break; case LEFT: strcpy(tk_anchor, "w"); return_value = TRUE; break; default: strcpy(tk_anchor, "w"); return_value = FALSE; } return return_value; } TERM_PUBLIC int TK_set_font(const char *font) { if (!font || *font == NUL) { if (tk_perl) fputs("undef $font;\n", gpoutfile); else fputs("catch {unset $font}\n", gpoutfile); } else { char *name; int size = 0; size_t sep = strcspn(font, ","); name = malloc(sep + 1); if (!name) return FALSE; strncpy(name, font, sep); name[sep] = NUL; if (sep < strlen(font)) sscanf(&(font[sep + 1]), "%d", &size); if (tk_perl) { fprintf(gpoutfile,"\ if ($can->can('fontCreate')) {\n\ $font = $can->fontCreate(-family => q{%s}", name); if (size) fprintf(gpoutfile, ", -size => %d", size); fputs(");\n}\n", gpoutfile); } else { fprintf(gpoutfile, "set font [font create -family %s", name); if (size) fprintf(gpoutfile, " -size %d", size); fputs("]\n", gpoutfile); } free(name); } return TRUE; } TERM_PUBLIC void TK_text() { /* * when switching back to text mode some procedures are generated which * return important information about plotarea size and axis ranges: * 'gnuplot_plotarea' returns the plotarea size in tkcanvas units * 'gnuplot_axisranges' returns the min. and max. values of the axis * these are essentially needed to set the size of the canvas when the * axis scaling is important. * moreover, a procedure 'gnuplot_xy' is created which contains the * actions bound to line segments (see the above 'TK_vector' code): * if the user has defined a procedure named 'user_gnuplot_coordinates' * then 'gnuplot_xy' calls this procedure, otherwise is writes the * coordinates of the line segment the mouse cursor is pointing to * to standard output. */ if (tk_perl) { fputs("};\n", gpoutfile); if (!is_3d_plot) { fputs("sub gnuplot_plotarea {\n", gpoutfile); fprintf(gpoutfile, "return (%d, %d, %d, %d);\n", plot_bounds.xleft, plot_bounds.xright, 1000 - plot_bounds.ytop, 1000 - plot_bounds.ybot); fputs("};\n", gpoutfile); fputs("sub gnuplot_axisranges {\n", gpoutfile); fprintf(gpoutfile, "return (%f, %f, %f, %f, %f, %f, %f, %f);\n", axis_array[FIRST_X_AXIS].min, axis_array[FIRST_X_AXIS].max, axis_array[FIRST_Y_AXIS].min, axis_array[FIRST_Y_AXIS].max, axis_array[SECOND_X_AXIS].min, axis_array[SECOND_X_AXIS].max, axis_array[SECOND_Y_AXIS].min, axis_array[SECOND_Y_AXIS].max); fputs("};\n", gpoutfile); if (tk_interactive) { fputs("sub gnuplot_xy {\n", gpoutfile); fputs("my ($win, $x1s, $y1s, $x2s, $y2s, $x1e, $y1e, $x2e, $y2e, $x1m, $y1m, $x2m, $y2m) = @_;\n", gpoutfile); fputs("if (defined &user_gnuplot_coordinates) {\n", gpoutfile); fputs("my $id = $win->find('withtag', 'current');\n", gpoutfile); fputs("user_gnuplot_coordinates $win, $id, $x1s, $y1s, $x2s, $y2s, $x1e, $y1e, $x2e, $y2e, $x1m, $y1m, $x2m, $y2m\n", gpoutfile); fputs("} else {\n", gpoutfile); fputs("if (length($x1m)>0) {print \" $x1m\";} else {print \" \", 0.5*($x1s+$x1e);}\n", gpoutfile); fputs("if (length($y1m)>0) {print \" $y1m\";} else {print \" \", 0.5*($y1s+$y1e);}\n", gpoutfile); fputs("if (length($x2m)>0) {print \" $x2m\";} else {print \" \", 0.5*($x2s+$x2e);}\n", gpoutfile); fputs("if (length($y2m)>0) {print \" $y2m\";} else {print \" \", 0.5*($y2s+$y2e);}\n", gpoutfile); fputs("print \"\\n\"\n", gpoutfile); fputs("}\n", gpoutfile); fputs("};\n", gpoutfile); } } } else { fputs("}\n", gpoutfile); if (!is_3d_plot) { fputs("proc gnuplot_plotarea {} {\n", gpoutfile); fprintf(gpoutfile, "return {%d %d %d %d}\n", plot_bounds.xleft, plot_bounds.xright, 1000 - plot_bounds.ytop, 1000 - plot_bounds.ybot); fputs("}\n", gpoutfile); fputs("proc gnuplot_axisranges {} {\n", gpoutfile); fprintf(gpoutfile, "return {%f %f %f %f %f %f %f %f}\n", axis_array[FIRST_X_AXIS].min, axis_array[FIRST_X_AXIS].max, axis_array[FIRST_Y_AXIS].min, axis_array[FIRST_Y_AXIS].max, axis_array[SECOND_X_AXIS].min, axis_array[SECOND_X_AXIS].max, axis_array[SECOND_Y_AXIS].min, axis_array[SECOND_Y_AXIS].max); fputs("}\n", gpoutfile); if (tk_interactive) { fputs("proc gnuplot_xy {win x1s y1s x2s y2s x1e y1e x2e y2e x1m y1m x2m y2m} {\n", gpoutfile); fputs("if {([llength [info commands user_gnuplot_coordinates]])} {\n", gpoutfile); fputs("set id [$win find withtag current]\n", gpoutfile); fputs("user_gnuplot_coordinates $win $id $x1s $y1s $x2s $y2s $x1e $y1e $x2e $y2e $x1m $y1m $x2m $y2m\n", gpoutfile); fputs("} else {\n", gpoutfile); fputs("if {[string length $x1m]>0} {puts -nonewline \" $x1m\"} else {puts -nonewline \" [expr 0.5*($x1s+$x1e)]\"}\n", gpoutfile); fputs("if {[string length $y1m]>0} {puts -nonewline \" $y1m\"} else {puts -nonewline \" [expr 0.5*($y1s+$y1e)]\"}\n", gpoutfile); fputs("if {[string length $x2m]>0} {puts -nonewline \" $x2m\"} else {puts -nonewline \" [expr 0.5*($x2s+$x2e)]\"}\n", gpoutfile); fputs("if {[string length $y2m]>0} {puts \" $y2m\"} else {puts \" [expr 0.5*($y2s+$y2e)]\"}\n", gpoutfile); fputs("}\n", gpoutfile); fputs("}\n", gpoutfile); } } } fflush(gpoutfile); } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(tkcanvas) "tkcanvas", "Tk/Tcl canvas widget [perltk] [interactive]", TK_XMAX, TK_YMAX, TK_VCHAR, TK_HCHAR, TK_VTIC, TK_HTIC, TK_options, TK_init, TK_reset, TK_text, null_scale, TK_graphics, TK_move, TK_vector, TK_linetype, TK_put_text, null_text_angle, TK_justify_text, do_point, do_arrow, TK_set_font, NULL, 0, NULL, NULL, NULL, TK_linewidth TERM_TABLE_END(tkcanvas) #undef LAST_TERM #define LAST_TERM tkcanvas #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(tkcanvas) "1 tkcanvas", "?commands set terminal tkcanvas", "?set terminal tkcanvas", "?set term tkcanvas", "?terminal tkcanvas", "?term tkcanvas", "?tkcanvas", " This terminal driver generates Tk canvas widget commands based on Tcl/Tk", " (default) or Perl. To use it, rebuild `gnuplot` (after uncommenting or", " inserting the appropriate line in \"term.h\"), then", "", " gnuplot> set term tkcanvas {perltk} {interactive}", " gnuplot> set output 'plot.file'", "", " After invoking \"wish\", execute the following sequence of Tcl/Tk commands:", "", " % source plot.file", " % canvas .c", " % pack .c", " % gnuplot .c", "", " Or, for Perl/Tk use a program like this:", "", " use Tk;", " my $top = MainWindow->new;", " my $c = $top->Canvas->pack;", " my $gnuplot = do \"plot.pl\";", " $gnuplot->($c);", " MainLoop;", "", " The code generated by `gnuplot` creates a procedure called \"gnuplot\"", " that takes the name of a canvas as its argument. When the procedure is", " called, it clears the canvas, finds the size of the canvas and draws the plot", " in it, scaled to fit.", "", " For 2-dimensional plotting (`plot`) two additional procedures are defined:", " \"gnuplot_plotarea\" will return a list containing the borders of the plotting", " area \"xleft, xright, ytop, ybot\" in canvas screen coordinates, while the ranges", " of the two axes \"x1min, x1max, y1min, y1max, x2min, x2max, y2min, y2max\" in plot", " coordinates can be obtained calling \"gnuplot_axisranges\".", " If the \"interactive\" option is specified, mouse clicking on a line segment", " will print the coordinates of its midpoint to stdout. Advanced actions", " can happen instead if the user supplies a procedure named", " \"user_gnuplot_coordinates\", which takes the following arguments:", " \"win id x1s y1s x2s y2s x1e y1e x2e y2e x1m y1m x2m y2m\",", " the name of the canvas and the id of the line segment followed by the", " coordinates of its start and end point in the two possible axis ranges; the", " coordinates of the midpoint are only filled for logarithmic axes.", "", " The current version of `tkcanvas` supports neither `multiplot` nor `replot`." END_HELP(tkcanvas) #endif ��������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/djsvga.trm�����������������������������������������������������������������������0000644�0004711�0000144�00000034206�10631076036�013111� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: djsvga.trm,v 1.21 2007/06/04 20:54:54 mikulik Exp $ */ /* GNUPLOT - djsvga.trm */ /*[ * Copyright 1992 - 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * svga * * AUTHORS * Russell Lang * Edzer Pebesma (gnuplot 3.6: new terminal layout, fonts, grx20) * Hans-Bernhard Broeker (several improvements) * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). * */ /* HBB: A new version, called grx21a was released recently. To * tell gnuplot you have it, add '-DGRX21' to your compilation flags. * Currently, that only enables the drawing of wide lines. Maybe more * to come. */ #include "driver.h" #ifdef TERM_REGISTER register_term(djsvga) /* no ; */ #endif #ifdef TERM_PROTO #define DJSVGA_XMAX 640 #define DJSVGA_YMAX 480 #define DJSVGA_XLAST (DJSVGA_XMAX - 1) #define DJSVGA_YLAST (DJSVGA_YMAX - 1) #define DJSVGA_VCHAR 16 #define DJSVGA_HCHAR 8 #define DJSVGA_VTIC 4 #define DJSVGA_HTIC 4 TERM_PUBLIC void DJSVGA_init __PROTO((void)); TERM_PUBLIC void DJSVGA_graphics __PROTO((void)); TERM_PUBLIC void DJSVGA_text __PROTO((void)); TERM_PUBLIC void DJSVGA_reset __PROTO((void)); TERM_PUBLIC void DJSVGA_options __PROTO((void)); TERM_PUBLIC void DJSVGA_linetype __PROTO((int linetype)); TERM_PUBLIC void DJSVGA_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void DJSVGA_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC int DJSVGA_angle __PROTO((int ang)); TERM_PUBLIC int DJSVGA_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void DJSVGA_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int DJSVGA_set_font __PROTO((const char *fontname)); TERM_PUBLIC void DJSVGA_suspend __PROTO((void)); TERM_PUBLIC void DJSVGA_resume __PROTO((void)); /* clear part of multiplot */ TERM_PUBLIC void DJSVGA_fillbox __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); TERM_PUBLIC void DJSVGA_linewidth __PROTO((double linewidth)); #define GOT_DJSVGA_PROTO #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY /* SVGA driver using DJGPP */ #if (DJGPP==2) # define GRX20 #endif #ifdef GRX20 /* use grx20.h for DJGPP V1 / GRX V2 combo as well */ # include <grx20.h> #else # include <grx.h> #endif #include <pc.h> static int dj_startx, dj_starty; static int dj_xlast, dj_ylast; #define DJNUMCOLOR 15 /* HBB: Let's just use long for GRX1 as well */ static long dj_color; static long svga256color[DJNUMCOLOR] = /* old sequence: {7, 8, 2, 3, 4, 5, 9, 14, 12, 15, 13, 10, 11, 1, 6}; */ { 7 /*black*/, 8 /*grey*/, #if 0 /* prefer dark colors */ 4 /*dark red*/, 2 /*dark green*/, 1 /*dark blue*/, 5 /*dark magenta*/, 3 /*dark cyan*/, 14 /*yellow*/, 15 /*white*/, 12 /*red*/, 9 /*blue*/, 13 /*magenta*/, 10 /*green*/, 11 /*cyan*/, 6 /*brown*/ #else /* prefer light colors */ 12 /*red*/, 10 /*green*/, 9 /*blue*/, 13 /*magenta*/, 11 /*cyan*/, 14 /*yellow*/, 15 /*white*/, 4 /*dark red*/, 1 /*dark blue*/, 5 /*dark magenta*/, 2 /*dark green*/, 3 /*dark cyan*/, 6 /*brown*/ #endif }; static long dj_colors[DJNUMCOLOR]; #ifdef GRX20 /* Save, Restore: for 16 color mode! */ static void *DJSVGA_colorbuf = NULL; #endif static GrTextOption DJSVGA_TextOption; /* HBB: I think we should use GR_NAMEWIDTH (=16), instead of MAX_ID_LEN, * which has nothing to do with GRX at all */ #ifdef GRX20 char DJSVGA_fontname[MAX_ID_LEN + 1] = ""; #else char DJSVGA_fontname[MAX_ID_LEN + 1] = "@:pc8x14.fnt"; /* EGA bios font */ #endif static GrContext *DJSVGA_context = 0; /* save screen for suspend/resume */ static char *dj_textsave = 0; /* for text-screen-saving */ static int dj_cursorx, dj_cursory; static int dj_width, dj_height; #ifdef GRX21 static double dj_linewidth; /* store linewidth assignments here */ #endif TERM_PUBLIC void DJSVGA_options() { if (!END_OF_COMMAND && isstring(c_token)) { quote_str(DJSVGA_fontname, c_token, MAX_ID_LEN); c_token++; } sprintf(term_options, "\"%s\"", DJSVGA_fontname); } TERM_PUBLIC void DJSVGA_init() { int i, on, r, g, b, medium = 170, low = 85; GrFont *font = NULL; #ifdef GRX20 font = &GrDefaultFont; #endif /* HBB: save textscreen contents and cursor-position */ dj_textsave = gp_alloc(ScreenRows() * ScreenCols() * 2, "djsvga term scrbuf"); ScreenRetrieve(dj_textsave); dj_width = ScreenCols(); dj_height = ScreenRows(); ScreenGetCursor(&dj_cursory, &dj_cursorx); GrSetMode(GR_default_graphics); GrSetRGBcolorMode(); GrResetColors(); /* Allocate colors */ for (i = 0; i < DJNUMCOLOR; i++) { on = (svga256color[i] & 8) ? 255 : medium; r = (svga256color[i] & 4) ? on : 0; g = (svga256color[i] & 2) ? on : 0; b = (svga256color[i] & 1) ? on : 0; if (svga256color[i] == 8) r = g = b = low; dj_colors[i] = GrAllocColor(r, g, b); } /* Get the screen size: */ dj_xlast = GrMaxX(); term->xmax = dj_xlast + 1; dj_ylast = GrMaxY(); term->ymax = dj_ylast + 1; /* if GRX 1.x loads an GRX 2.x save'd file: */ if (font == NULL && DJSVGA_fontname[0] == '\0') sprintf(DJSVGA_fontname, "@:pc8x14.fnt"); if (DJSVGA_fontname[0] != '\0') font = GrLoadFont(DJSVGA_fontname); if (font == NULL) font = GrLoadFont("@:pc8x14.fnt"); /* try EGA bios font */ if (font == NULL) font = GrLoadFont("@:pc8x16.fnt"); /* try VGA bios font */ /* * HBB: There are cases when we reach this point with font still NULL, * eg. when the GRXFONT env.variable points to the GRX V1 fonts, but * GRX V2 is used for this program: some fonts will *fail* to load in * that setup (e.g. cour20b)! So IMHO, there should be some error * treatment here..., like int_error("Couldn't load font!"); */ DJSVGA_TextOption.txo_font = font; DJSVGA_TextOption.txo_direct = GR_TEXT_RIGHT; DJSVGA_TextOption.txo_xalign = GR_ALIGN_LEFT; DJSVGA_TextOption.txo_yalign = GR_ALIGN_CENTER; DJSVGA_TextOption.txo_chrtype = GR_BYTE_TEXT; DJSVGA_TextOption.txo_bgcolor.v = GrNOCOLOR; #ifndef GRX20 DJSVGA_TextOption.txo_xmag = 1; DJSVGA_TextOption.txo_ymag = 1; #endif /* HBB: this version should work in all configurations */ term->v_char = font->h.height; term->h_char = font->h.width; #ifdef GRX20 if (DJSVGA_colorbuf == NULL) DJSVGA_colorbuf = (void *) gp_alloc(GrColorSaveBufferSize(), "djsvga term colorbuf"); GrSaveColors(DJSVGA_colorbuf); #endif GrSetMode(GR_default_text); ScreenUpdate(dj_textsave); ScreenSetCursor(dj_cursory, dj_cursorx); } /* * HBB: make these two inline, as they're called by other routines * inside this module, and -finline-functions (normally switched * on by 'gcc -O3') doesn't work for compiling term.c */ __inline__ TERM_PUBLIC void DJSVGA_graphics() { ScreenRetrieve(dj_textsave); /* HBB: save text screen contents */ ScreenGetCursor(&dj_cursory, &dj_cursorx); GrSetMode(GR_default_graphics); #ifdef GRX20 GrRestoreColors(DJSVGA_colorbuf); #endif } __inline__ TERM_PUBLIC void DJSVGA_text() { (void) getkey(); GrSetMode(GR_width_height_text, dj_width, dj_height); ScreenUpdate(dj_textsave); /* HBB: restore text screen */ ScreenSetCursor(dj_cursory, dj_cursorx); } TERM_PUBLIC void DJSVGA_reset() { GrResetColors(); free(dj_textsave); } TERM_PUBLIC void DJSVGA_linetype(int linetype) { if (linetype < -2) linetype = LT_BLACK; if (linetype >= 13) linetype %= 13; /* HBB: set the TextOption color variable right here (faster) */ DJSVGA_TextOption.txo_fgcolor.v = dj_color = dj_colors[linetype + 2]; } TERM_PUBLIC void DJSVGA_move(unsigned int x, unsigned int y) { dj_startx = x; dj_starty = y; } TERM_PUBLIC void DJSVGA_vector(unsigned int x, unsigned int y) { #ifdef GRX21 GrLineOption dj_lineoption = {dj_color, dj_linewidth, 0, ""}; GrCustomLine(dj_startx, dj_ylast - dj_starty, x, dj_ylast - y, &dj_lineoption); #else GrLine(dj_startx, dj_ylast - dj_starty, x, dj_ylast - y, dj_color); #endif dj_startx = x; dj_starty = y; } /* * HBB: IMHO, the previous version was seriously flawed. E.g. * in the termentry, _justify_text was pointing to the * null_justify_text dummy routine, so DJSVGA_justify wasn't * ever called at all. I copied the routines from my (now * otherwise pointless) own private driver, djgrx.trm, to * cure that. */ TERM_PUBLIC int DJSVGA_angle(int ang) { if (ang) { DJSVGA_TextOption.txo_direct = GR_TEXT_UP; } else { DJSVGA_TextOption.txo_direct = GR_TEXT_RIGHT; } return TRUE; } TERM_PUBLIC int DJSVGA_justify_text(enum JUSTIFY mode) { if (DJSVGA_TextOption.txo_direct == GR_TEXT_RIGHT) { DJSVGA_TextOption.txo_yalign = GR_ALIGN_CENTER; switch (mode) { case LEFT: DJSVGA_TextOption.txo_xalign = GR_ALIGN_LEFT; break; case CENTRE: DJSVGA_TextOption.txo_xalign = GR_ALIGN_CENTER; break; case RIGHT: DJSVGA_TextOption.txo_xalign = GR_ALIGN_RIGHT; break; } } else { DJSVGA_TextOption.txo_xalign = GR_ALIGN_CENTER; switch (mode) { case LEFT: DJSVGA_TextOption.txo_yalign = GR_ALIGN_BOTTOM; break; case CENTRE: DJSVGA_TextOption.txo_yalign = GR_ALIGN_CENTER; break; case RIGHT: DJSVGA_TextOption.txo_yalign = GR_ALIGN_TOP; break; } } return TRUE; } TERM_PUBLIC int DJSVGA_set_font(const char *fontname) { char *cp; GrFont *font; if (!fontname || !fontname[0]) return FALSE; safe_strncpy(DJSVGA_fontname, fontname, sizeof(DJSVGA_fontname)); cp = strstr(DJSVGA_fontname, ","); if (cp != NULL) *cp = NUL; font = GrLoadFont(DJSVGA_fontname); /*HBB: if no font found, do *not* report success! */ if (font != NULL) { GrUnloadFont(DJSVGA_TextOption.txo_font); DJSVGA_TextOption.txo_font = font; return TRUE; } else { graph_error("Font not found"); return FALSE; } } TERM_PUBLIC void DJSVGA_put_text(unsigned int x, unsigned int y, const char *str) { /* HBB: why isn't font!=NULL ensured elsewhere? Testing it at * this point doesn't really make much sense (we're in graphics * mode, so we can't even print out a useful error message!) */ /*if (DJSVGA_TextOption.txo_font != NULL) */ GrDrawString(str, strlen(str), x, dj_ylast - y, &DJSVGA_TextOption); } TERM_PUBLIC void DJSVGA_suspend() { DJSVGA_context = GrCreateContext(GrSizeX(), GrSizeY(), 0, 0); GrBitBltNC(DJSVGA_context, 0, 0, 0, 0, 0, GrMaxX(), GrMaxY(), GrWRITE); DJSVGA_text(); } TERM_PUBLIC void DJSVGA_resume() { DJSVGA_graphics(); GrBitBltNC(0, 0, 0, DJSVGA_context, 0, 0, GrMaxX(), GrMaxY(), GrWRITE); GrDestroyContext(DJSVGA_context); } TERM_PUBLIC void DJSVGA_fillbox( int style, unsigned int left, unsigned int bottom, unsigned int width, unsigned height) { if (style >= 13) style %= 13; /* HBB: prize question: should it be 'width-1' instead? */ /* HBB: fill with GRX Color '0', which *should* be black : */ /* ULIG: the style parameter is now used for the fillboxes style */ /* (not implemented here), see the documentation */ GrFilledBox(left, dj_ylast - bottom, left + width, dj_ylast - bottom - height, 0); } TERM_PUBLIC void DJSVGA_linewidth(double linewidth) { #ifdef GRX21 dj_linewidth = linewidth; #endif } #endif /* TERM_BODY */ #ifdef TERM_TABLE /* HBB: I think \" is more readable than \042. BTW: why is this * option 'documented' here, but not in the Help node? */ TERM_TABLE_START(djsvga_driver) "svga", "IBM PC/Clone with Super VGA graphics board [\"fontname\"]", DJSVGA_XMAX, DJSVGA_YMAX, DJSVGA_VCHAR, DJSVGA_HCHAR, DJSVGA_VTIC, DJSVGA_HTIC, DJSVGA_options, DJSVGA_init, DJSVGA_reset, DJSVGA_text, null_scale, DJSVGA_graphics, DJSVGA_move, DJSVGA_vector, DJSVGA_linetype, DJSVGA_put_text, DJSVGA_angle, DJSVGA_justify_text, do_point, do_arrow, DJSVGA_set_font, 0, /* no pointsize() */ TERM_CAN_MULTIPLOT, DJSVGA_suspend, DJSVGA_resume, DJSVGA_fillbox, DJSVGA_linewidth TERM_TABLE_END(djsvga_driver) #undef LAST_TERM #define LAST_TERM djsvga_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ /* * HBB: I think this documentation should be at least a *bit* longer * (E.g., the "fontname" parameter is claimed to be non-existent!) */ /* RCC: Not any more... * If you have other ideas about what could be in the help section, * please let me know (rccrawford@lanl.gov) --- particularly info * about what fonts are permitted, if there is such a list. */ #ifdef TERM_HELP START_HELP(svga) "1 svga", "?commands set terminal svga", "?set terminal svga", "?set term svga", "?terminal svga", "?term svga", "?svga", " The `svga` terminal driver supports PCs with SVGA graphics. It can only be", " used if it is compiled with DJGPP. Its only option is the font.", "", " Syntax:", " set terminal svga {\"<fontname>\"}" END_HELP(svga) #endif /* TERM_HELP */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/emf.trm��������������������������������������������������������������������������0000644�0004711�0000144�00000157443�12216164161�012411� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hey Emacs this is -*- C -*- * $Id: emf.trm,v 1.78.2.9 2013/09/17 23:40:33 sfeam Exp $ */ /* GNUPLOT - emf.trm */ /*[ * Copyright 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c and ../docs/termdoc.c. * * This terminal driver supports: * Enhanced Metafile Format * * TODO * * HISTORY * * 4.6.1 04-Sep-2012 Shige Takeno * - Revised order of object handling Deselect/Delete/Create/Select * - Defer application of new dash+color style until needed for a new line segment * * 4.6.1 04-Sep-2012 Ethan A Merritt * - Fix dashed line option, but make solid lines the default * - Seek to start of output file after plotting so that successive plots will * overwrite each other cleanly rather than producing a corrupt file. * * 4.5 28-Nov-2010 Ethan A Merritt * - Use the EMR_ELLIPSE primitive to draw point types 6 and 7 * - Switch to using linecap=flat and linejoin=miter by default, * but add option "rounded/butt" to toggle this * * 4.3.1 12-Sep-2008 Ethan A Merritt * - enhanced text mode * - Two variants are here. One uses the TA_UPDATECP mode to track character position. * This works great horizontally, but I could not find a way to introduce a vertical * offset to handle subscripts and superscripts. * - The second variant tracks both x and y by estimating the character width/height. * This causes visible imperfections in the character spacing. * - Rotated enhanced text not yet supported * * 1.0.11 06-Dec-2004 Ethan A Merritt * - implement term->set_color(), term->filled_polygon(), and term->fillbox() * RGB colors supported, but not yet PM3D palettes * 1.0.10 08-Jul-2004 Hans-Bernhard Broeker * - cleaned up to match gnuplot CodeStyle conventions (one line per statement, * even in macro bodies, no meddling with assert()). * - purged K&R definitions * 1.0.9 03-Jun-2004 Stephane Barbaray <stephane.barbaray@compodata.com>, Ethan Merritt <merritt@u.washington.edu> * - fixed linewidth bug * - all is now really assumed as 1024x768@96dpi, * before it was a mix between 1600x1200@120dpi and 1024x768@96dpi, * so font may now render differently than before... * - pointsize rework (size twice also now) * - HCHAR and VCHAR are more efficiently computed * 1.0.8 06-May-2004 Stephane Barbaray <stephane.barbaray@compodata.com> * - fixed to work with MS security patch (kb835732) applied, because MS introduced bugs!!! * - EMR_EXTTEXTOUTW (84) is now EMR_EXTTEXTOUTA (83) * 1.0.7 3-Feb-2003 Ethan A Merritt * - modify text and point color handling to match other terminal types * - FIXME! alignment of rotated text is not correct. * 1.0.6 25-Jul-2002 Ethan A Merritt <merritt@u.washington.edu> * - generalized text rotation and justification * 1.0.5 2000/07/20 * - Handles were not freed at all, resulting to resource leaks when viewing on Windows 9x (not on NT4/W2000!!!) * 1.0.4 2000/06/28 * - Emulated dashed vectors are now looking better * - 15 colors * 8 pointstyles = 120 pointtypes * 1.0.3 2000/03/29 * - default font is now Arial 12 * - implemented options (color/mono,dashed/solid,font) * - 15 colors * 5 dashtypes = 75 linetypes * 1.0.2 2000/03/22 * - Polygon and Polyline structures are not working for Windows 9X, I * really don't know why, replaced with lineto/moveto couples... * - Texts are now displayed in GM_Compatible mode because GM_Advanced is * displaying correctly but it does not print correctly with Word97! * - Text centering now works best according to escapement/orientation * - Now there is 8 colors * 5 dashtypes = 40 linetypes * - Successfully Working on Linux Suse 6.1 (x86) * * 1.0.1 2000/03/16 * - Unicode text have be to long aligned in EMF files (exttextoutw) * - Problems with text transparence (SetBkMode was not called) * - Null brush created for *not* filling polygon * * 1.0.0 2000/03/15 * - Only tested on x86 Win32 * * AUTHOR * Stephane Barbaray <stephane.barbaray@compodata.com> * Some code based on cgm.trm * * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net). */ #include "driver.h" #ifdef TERM_REGISTER register_term(emf) #endif #ifdef TERM_PROTO TERM_PUBLIC void EMF_options __PROTO((void)); TERM_PUBLIC void EMF_init __PROTO((void)); TERM_PUBLIC void EMF_reset __PROTO((void)); TERM_PUBLIC void EMF_text __PROTO((void)); TERM_PUBLIC void EMF_graphics __PROTO((void)); TERM_PUBLIC void EMF_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void EMF_dashed_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void EMF_solid_vector __PROTO((unsigned int ux, unsigned int uy)); TERM_PUBLIC void EMF_linetype __PROTO((int linetype)); TERM_PUBLIC void EMF_linecolor __PROTO((int color)); TERM_PUBLIC void EMF_dashtype __PROTO((int dashtype)); TERM_PUBLIC void EMF_linewidth __PROTO((double width)); TERM_PUBLIC void EMF_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int EMF_text_angle __PROTO((int ang)); TERM_PUBLIC int EMF_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void EMF_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void EMF_set_pointsize __PROTO((double size)); TERM_PUBLIC int EMF_set_font __PROTO((const char *)); TERM_PUBLIC int EMF_make_palette __PROTO((t_sm_palette *palette)); TERM_PUBLIC void EMF_previous_palette __PROTO((void)); TERM_PUBLIC void EMF_set_color __PROTO((t_colorspec *colorspec)); TERM_PUBLIC void EMF_filled_polygon __PROTO((int, gpiPoint *)); TERM_PUBLIC void EMF_fillbox __PROTO((int, unsigned int, unsigned int, unsigned int, unsigned int)); TERM_PUBLIC void EMF_flush_dashtype __PROTO((void)); /* Enhanced text support */ TERM_PUBLIC void ENHemf_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC void ENHemf_OPEN __PROTO((char * fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint)); TERM_PUBLIC void ENHemf_FLUSH __PROTO((void)); #undef RGB #define RGB(r,g,b) ((long) \ (((unsigned char)(r) \ | ((short) ((unsigned char) (g)) << 8)) \ | (((long) (unsigned char) (b)) << 16))) #ifndef GPMIN # define GPMIN(a,b) (a < b ? a : b) #endif #ifndef GPMAX # define GPMAX(a,b) (a > b ? a : b) #endif #define EMF_PX2HM 26.37 #define EMF_PT2HM 35.28 #define EMF_10THDEG2RAD (3.14159265359/1800) #define EMF_XMAX (1024 * EMF_PX2HM) #define EMF_YMAX (768 * EMF_PX2HM) #define EMF_HTIC (EMF_XMAX / 160) #define EMF_VTIC EMF_HTIC #define EMF_FONTNAME "Arial" #define EMF_FONTSIZE 12 #define EMF_HCHAR ((EMF_FONTSIZE * EMF_PT2HM) * 0.6) #define EMF_VCHAR ((EMF_FONTSIZE * EMF_PT2HM) * 1.3) #define EMF_LINE_TYPES 5 /* number of line types we support */ #define EMF_COLORS 15 /* number of colors we support */ #define EMF_POINTS 13 /* number of markers we support */ #define EMF_MAX_SEGMENTS 104 /* maximum # polyline coordinates */ #define EMF_HANDLE_PEN 1 #define EMF_HANDLE_FONT 2 #define EMF_HANDLE_BRUSH 3 #define EMF_HANDLE_MAX 4 /* typedef enum { EMF_PS_COSMETIC = 0x00000000, EMF_PS_ENDCAP_ROUND = 0x00000000, EMF_PS_JOIN_ROUND = 0x00000000, EMF_PS_SOLID = 0x00000000, EMF_PS_DASH = 0x00000001, EMF_PS_DOT = 0x00000002, EMF_PS_DASHDOT = 0x00000003, EMF_PS_DASHDOTDOT = 0x00000004, EMF_PS_NULL = 0x00000005, EMF_PS_INSIDEFRAME = 0x00000006, EMF_PS_USERSTYLE = 0x00000007, EMF_PS_ALTERNATE = 0x00000008, EMF_PS_ENDCAP_SQUARE = 0x00000100, EMF_PS_ENDCAP_FLAT = 0x00000200, EMF_PS_JOIN_BEVEL = 0x00001000, EMF_PS_JOIN_MITER = 0x00002000, EMF_PS_GEOMETRIC = 0x00010000 } EMF_PenStyle; */ #define EMF_STOCK_OBJECT_FLAG ((unsigned long)0x1 << 31) #define EMF_STOCK_OBJECT_WHITE_BRUSH (EMF_STOCK_OBJECT_FLAG + 0x00) #define EMF_STOCK_OBJECT_BLACK_PEN (EMF_STOCK_OBJECT_FLAG + 0x07) #define EMF_STOCK_OBJECT_DEFAULT_FONT (EMF_STOCK_OBJECT_FLAG + 0x0A) #define EMF_write_emr(type, size) { \ EMF_write_long(type); \ EMF_write_long(size); \ emf_record_count++; \ } #define EMF_write_sizel(width, height) { \ EMF_write_long(width); \ EMF_write_long(height); \ } #define EMF_write_points(x, y) { \ EMF_write_short(x); \ EMF_write_short(y); \ } #define EMF_write_pointl(x, y) { \ EMF_write_long(x); \ EMF_write_long(y); \ } #define EMF_write_rectl(left, top, right, bottom) { \ EMF_write_long(left); \ EMF_write_long(top); \ EMF_write_long(right); \ EMF_write_long(bottom); \ } #define EMF_EOF() { \ EMF_write_emr(14, 0x14); \ EMF_write_long(0); \ EMF_write_long(0x10); \ EMF_write_long(20); \ } #define EMF_SetMapMode(mode) { \ EMF_write_emr(17, 0x0C); \ EMF_write_long(mode); \ } #define EMF_SetWindowExtEx(width, height) { \ EMF_write_emr(9, 0x10); \ EMF_write_sizel(width, height); \ } #define EMF_SetWindowOrgEx(width, height) { \ EMF_write_emr(10, 0x10); \ EMF_write_sizel(width, height); \ } #define EMF_SetViewportExtEx(width, height) { \ EMF_write_emr(11, 0x10); \ EMF_write_sizel(width, height); \ } #define EMF_SetViewportOrgEx(width, height) { \ EMF_write_emr(12, 0x10); \ EMF_write_sizel(width, height); \ } #define EMF_SetTextColor(color) { \ EMF_write_emr(24, 0x0C); \ EMF_write_long(color); \ } #define EMF_MoveToEx(x,y) { \ EMF_write_emr(27, 0x10); \ EMF_write_pointl(x, y); \ } #define EMF_LineTo(x,y) { \ EMF_write_emr(54, 0x10); \ EMF_write_pointl(x, y); \ } #define EMF_CreatePen(handle, type, width, color) { \ EMF_write_emr(38, 0x1C); \ EMF_write_long(handle); \ EMF_write_long(type); \ EMF_write_long(width); \ EMF_write_long(0); \ EMF_write_long(color); \ } #define EMF_CreateBrush(handle, type, color, hatch) { \ EMF_write_emr(39, 0x18); \ EMF_write_long(handle); \ EMF_write_long(type); \ EMF_write_long(color); \ EMF_write_long(hatch); \ } #define EMF_SelectObject(handle) { \ EMF_write_emr(37, 0x0C); \ EMF_write_long(handle); \ } #define EMF_DeleteObject(handle) { \ EMF_write_emr(40, 0x0C); \ EMF_write_long(handle); \ } #define EMF_Ellipse(left,top,right,bottom) { \ EMF_write_emr(42, 0x18); \ EMF_write_rectl(left,top,right,bottom) \ } #define EMF_SetTextAlign(align) { \ EMF_write_emr(22, 0x0C); \ EMF_write_long(align); \ } #define EMF_SetBkMode(mode) { \ EMF_write_emr(18, 0x0C); \ EMF_write_long(mode); \ } #define EMF_SaveDC() { \ EMF_write_emr(33, 0x0C); \ EMF_write_long(0); \ } #define EMF_RestoreDC() { \ EMF_write_emr(34, 0x0C); \ EMF_write_long(1); \ } #define EMF_CreatePolygon(nvert) { \ EMF_write_emr(3, (7+2*nvert)*4); \ EMF_write_rectl(0,0,0,0); /* Bounds */ \ EMF_write_long(nvert); \ } #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #include <ctype.h> /* for isspace() */ #ifdef HAVE_ICONV #include <iconv.h> #endif static int emf_posx; static int emf_posy; static int emf_record_count = 0; static int emf_linetype = 1; static int emf_dashtype = 0; static long emf_color = 0L; static long emf_textcolor = LT_UNDEFINED; static unsigned long emf_pentype = 0x2200; /* cap=flat join=miter */ static unsigned int emf_polyline[EMF_MAX_SEGMENTS]; /* stored polyline coordinates */ static unsigned int emf_graphics = FALSE; static unsigned int emf_dashed = FALSE; static unsigned int emf_monochrome = FALSE; static unsigned int emf_background = 0xffffff; /* defaults to white */ static double emf_linewidth; /* line width in plot units */ static double emf_linewidth_factor = 1.0; static double emf_dashlength = 1.0; static int emf_coords = 0; /* # polyline coordinates saved */ static char emf_fontname[255] = EMF_FONTNAME; static float emf_fontsize = EMF_FONTSIZE; static enum JUSTIFY emf_justify = LEFT; static char emf_defaultfontname[255] = EMF_FONTNAME; static float emf_defaultfontsize = EMF_FONTSIZE; static int emf_vert_text = 0; /* text orientation -- nonzero for vertical */ static int emf_step_sizes[8]; /* array of currently used dash lengths in plot units */ static int emf_step_index = 0; /* index into emf_step_sizes[] */ static int emf_step = 0; /* amount of current dash not yet drawn, in plot units */ static int emf_tic, emf_tic707, emf_tic866, emf_tic500, emf_tic1241, emf_tic1077, emf_tic621; /* marker dimensions */ static TBOOLEAN emf_tweak = TRUE; /* Empirical hack to adjust character widths */ static double emf_fontscale = 1.0; static int emf_dashtype_count = 0; /* count > 0 if EMF_dashtype needed before drawing */ static void EMF_flush_polyline __PROTO((void)); static void EMF_flush_polygon __PROTO((void)); static void EMF_write_byte __PROTO((int)); static void EMF_write_short __PROTO((int)); static void EMF_write_long __PROTO((unsigned long)); static void EMF_write_float __PROTO((double)); static void EMF_setfont __PROTO((void)); #define ANSI_CHARSET 0 #define DEFAULT_CHARSET 1 #define CHINESEBIG5_CHARSET 136 #define GREEK_CHARSET 161 #define TURKISH_CHARSET 162 #define BALTIC_CHARSET 186 #define RUSSIAN_CHARSET 204 #define EASTEUROPE_CHARSET 238 #define KOI8_CHARSET 242 /* Text alignment */ #define GP_TA_NOUPDATECP 0x00 #define GP_TA_UPDATECP 0x01 #define GP_TA_LEFT 0x00 #define GP_TA_RIGHT 0x02 #define GP_TA_CENTER 0x06 #define GP_TA_TOP 0x00 #define GP_TA_BOTTOM 0x08 #define GP_TA_BASELINE 0x18 /* ExtTextOut options */ #define ETO_NO_RECT 0x100 #define ETO_PDY 0x2000 static void EMF_setfont() { int i, count; int bold = 400; char italic = 0, underline = 0, strikeout = 0; char font[32]; char *sub; if (!emf_graphics) return; count = GPMIN (strlen(emf_fontname), 31); if (((sub = strstr(emf_fontname, " bold")) != NULL) || ((sub = strstr(emf_fontname, " Bold")) != NULL)) { bold = 700; count = GPMIN(sub - emf_fontname, count); } if (((sub = strstr(emf_fontname, " italic")) != NULL) || ((sub = strstr(emf_fontname, " Italic")) != NULL)) { italic = 1; count = GPMIN(sub - emf_fontname, count); } if (((sub = strstr(emf_fontname, " underline")) != NULL) || ((sub = strstr(emf_fontname, " Underline")) != NULL)) { underline = 1; count = GPMIN(sub - emf_fontname, count); } if (((sub = strstr(emf_fontname, " strikeout")) != NULL) || ((sub = strstr(emf_fontname, " Strikeout")) != NULL) || ((sub = strstr(emf_fontname, " StrikeOut")) != NULL) ) { strikeout = 1; count = GPMIN(sub - emf_fontname, count); } safe_strncpy(font, emf_fontname, count + 1); EMF_SelectObject(EMF_STOCK_OBJECT_DEFAULT_FONT); EMF_DeleteObject(EMF_HANDLE_FONT); /* SB 20040506: was not complete size was 104, now it is 332 */ EMF_write_emr(82, 332); EMF_write_long(EMF_HANDLE_FONT); EMF_write_long((long) (-emf_fontsize * EMF_PT2HM * emf_fontscale)); /* height */ EMF_write_long(0); /* width */ EMF_write_long(emf_vert_text); /* escapement */ EMF_write_long(emf_vert_text); /* orientation */ EMF_write_long(bold); /* weight */ EMF_write_byte(italic); /* italic */ EMF_write_byte(underline); /* underline */ EMF_write_byte(strikeout); /* strikeout */ /* charset: could be extended? */ switch (encoding) { case S_ENC_CP1250: case S_ENC_ISO8859_2: EMF_write_byte(EASTEUROPE_CHARSET); break; case S_ENC_KOI8_R: case S_ENC_KOI8_U: EMF_write_byte(KOI8_CHARSET); break; case S_ENC_CP1254: case S_ENC_ISO8859_9: EMF_write_byte(TURKISH_CHARSET); break; case S_ENC_CP950: EMF_write_byte(CHINESEBIG5_CHARSET); break; default: EMF_write_byte(DEFAULT_CHARSET); } EMF_write_byte(0); /* out precision */ EMF_write_byte(0); /* clip precision */ EMF_write_byte(0); /* quality */ EMF_write_byte(0); /* pitch and family */ for (i = 0; i < 32; i++) { /* face name (max 32) */ EMF_write_byte((char) (i < strlen(font) ? font[i] : 0)); EMF_write_byte(0); } /* SB 20040506: modification following */ for (i = 0; i < 64; i++) { /* FULL face name (max 64) */ EMF_write_byte((char) (i < strlen(font) ? font[i] : 0)); EMF_write_byte(0); } for (i = 0; i < 32; i++) { /* style name (max 32) */ EMF_write_byte(0); EMF_write_byte(0); } EMF_write_long(0); /* version */ EMF_write_long(0); /* Style size */ EMF_write_long(0); /* Match */ EMF_write_long(0); /* reserved */ EMF_write_long(0); /* VendorId */ EMF_write_long(0); /* Culture */ for (i = 0; i < 10; i++) EMF_write_byte(0); /* Panose (ignored) */ EMF_write_byte(0); /* pad (long aligned) */ EMF_write_byte(0); /* pad (long aligned) */ /* SB 20040506: End of modification */ EMF_SelectObject(EMF_HANDLE_FONT); } static void EMF_flush_polygon() { int i = 0; if (emf_coords == 0) return; EMF_flush_dashtype(); EMF_MoveToEx(emf_polyline[i++], term->ymax - emf_polyline[i++]); while (i < emf_coords * 2) EMF_LineTo(emf_polyline[i++], term->ymax - emf_polyline[i++]); EMF_LineTo(emf_polyline[0], term->ymax - emf_polyline[1]); emf_coords = 0; } static void EMF_flush_polyline() { if (emf_coords == 0) return; EMF_flush_dashtype(); if (emf_coords <= 2) { EMF_MoveToEx(emf_polyline[0], term->ymax - emf_polyline[1]); EMF_LineTo(emf_polyline[2], term->ymax - emf_polyline[3]); } else { int i = 0; EMF_MoveToEx(emf_polyline[i++], term->ymax - emf_polyline[i++]); while (i < emf_coords * 2) EMF_LineTo(emf_polyline[i++], term->ymax - emf_polyline[i++]); } emf_coords = 0; } /* HBB 20040708: the following keep K&R argument types for now */ static void EMF_write_byte(int value) { char c = value; fwrite(&c, 1, 1, gpoutfile); } static void EMF_write_short(int value) { short actual_value = value; char c[2]; c[1] = (actual_value >> 8) & 255; /* convert to x86 order */ c[0] = actual_value & 255; fwrite(c, 1, 2, gpoutfile); } static void EMF_write_long(unsigned long value) { char c[4]; c[3] = (value >> 24) & 0xFFL; /* convert to x86 order */ c[2] = (value >> 16) & 0xFFL; c[1] = (value >> 8) & 0xFFL; c[0] = value & 0xFFL; fwrite(c, 1, 4, gpoutfile); } /* FIXME HBB 20001103: this only works as given iff 'float' is the * same format as on x86's, i.e. IEEE 4-byte floating point format */ static void EMF_write_float(double value) { char c[4]; union { long l; float f; } u; u.f = value; c[3] = (u.l >> 24) & 0xFFL; /* convert to x86 order */ c[2] = (u.l >> 16) & 0xFFL; c[1] = (u.l >> 8) & 0xFFL; c[0] = u.l & 0xFFL; fwrite(c, 1, 4, gpoutfile); } TERM_PUBLIC void EMF_options() { char *s; int emf_bgnd_rgb = 0; /* Annoying hack to handle the case of 'set termoption' after */ /* we have already initialized the terminal. */ if (c_token != 2) { term->xmax = EMF_XMAX; term->ymax = EMF_YMAX; emf_dashed = FALSE; emf_monochrome = FALSE; emf_background = 0xffffff; emf_tweak = TRUE; } while (!END_OF_COMMAND) { if (almost_equals(c_token, "de$fault")) { strcpy(emf_defaultfontname, EMF_FONTNAME); emf_defaultfontsize = EMF_FONTSIZE; emf_monochrome = FALSE; emf_dashed = FALSE; term->flags &= ~TERM_MONOCHROME; c_token++; continue; } if (almost_equals(c_token, "m$onochrome")) { emf_monochrome = TRUE; term->flags |= TERM_MONOCHROME; c_token++; continue; } if (almost_equals(c_token, "c$olor") || almost_equals(c_token, "c$olour")) { emf_monochrome = FALSE; term->flags &= ~TERM_MONOCHROME; c_token++; continue; } if (almost_equals(c_token, "da$shed")) { emf_dashed = TRUE; c_token++; continue; } if (almost_equals(c_token, "round$ed")) { emf_pentype= 0x0; c_token++; continue; } if (almost_equals(c_token, "butt")) { emf_pentype = 0x2200; c_token++; continue; } if (equals(c_token, "dl") || almost_equals(c_token, "dashl$ength")) { c_token++; emf_dashlength = real_expression(); if (emf_dashlength < 0.5) emf_dashlength = 1.0; continue; } if (almost_equals(c_token, "s$olid")) { emf_dashed = FALSE; c_token++; continue; } if (equals(c_token, "lw") || almost_equals(c_token, "linew$idth")) { c_token++; emf_linewidth_factor = real_expression(); if (emf_linewidth_factor < 0.1) emf_linewidth_factor = 1.0; continue; } if (almost_equals(c_token,"enh$anced")) { c_token++; term->put_text = ENHemf_put_text; term->flags |= TERM_ENHANCED_TEXT; continue; } else if (almost_equals(c_token,"noenh$anced")) { c_token++; term->put_text = EMF_put_text; term->flags &= ~TERM_ENHANCED_TEXT; } if (almost_equals(c_token,"back$ground")) { c_token++; emf_bgnd_rgb = parse_color_name(); emf_background = RGB((emf_bgnd_rgb>>16)&0xFF, (emf_bgnd_rgb>>8)&0xFF, emf_bgnd_rgb&0xFF); } if (almost_equals(c_token,"nopro$portional")) { c_token++; emf_tweak = FALSE; } if (almost_equals(c_token, "si$ze")) { int tempxmax = 1024; int tempymax = 768; c_token++; if (!END_OF_COMMAND) { tempxmax = real_expression(); if (equals(c_token, ",")) { c_token++; tempymax = real_expression(); } } if (tempxmax > 0) term->xmax = tempxmax * EMF_PX2HM; if (tempymax > 0) term->ymax = tempymax * EMF_PX2HM; term->h_tic = term->xmax / 160; term->v_tic = term->h_tic; continue; } if (equals(c_token, "fontscale")) { c_token++; emf_fontscale = END_OF_COMMAND ? -1 : real_expression(); if (emf_fontscale <= 0) emf_fontscale = 1.0; continue; } if (equals(c_token, "font")) c_token++; /* Fall through to old-style bare font name */ if ((s = try_to_get_string())) { char *comma = strrchr(s,','); if (comma && (1 == sscanf(comma+1,"%g",&emf_defaultfontsize))) { *comma = '\0'; } if (*s) strncpy(emf_defaultfontname, s, sizeof(emf_defaultfontname)); free(s); if (isanumber(c_token)) { emf_defaultfontsize = int_expression(); } continue; } break; } /* while(!end of command) */ if (!END_OF_COMMAND) { /* We have old-style bare font size specified */ emf_defaultfontsize = int_expression(); } #if (0) /* Shige May 2013 - Does not function properly until we enter graphics mode */ EMF_set_font(NULL); /* set default font */ #endif sprintf(term_options, "%s %s %s font \"%s,%g\"", emf_monochrome ? "monochrome" : "color", emf_dashed ? "dashed" : "solid", emf_pentype ? "butt" : "rounded", emf_defaultfontname, emf_defaultfontsize); if (term->flags & TERM_ENHANCED_TEXT) strcat(term_options, " enhanced "); if (emf_fontscale != 1.0) sprintf(&(term_options[strlen(term_options)]), " fontscale %.1f", emf_fontscale); if (term->xmax != (int)EMF_XMAX || term->ymax != (int)EMF_YMAX) sprintf(&(term_options[strlen(term_options)]), " size %d,%d ", (int)(0.5+term->xmax/EMF_PX2HM), (int)(0.5+term->ymax/EMF_PX2HM)); if (emf_linewidth_factor != 1.0) sprintf(&(term_options[strlen(term_options)]), " lw %.1f", emf_linewidth_factor); if (emf_dashlength != 1.0) sprintf(&(term_options[strlen(term_options)]), " dashlength %.1f", emf_dashlength); if (emf_bgnd_rgb) sprintf(&(term_options[strlen(term_options)]), " background \"#%06x\"", emf_bgnd_rgb); } TERM_PUBLIC void EMF_init() { emf_posx = emf_posy = 0; emf_linetype = 0; emf_vert_text = 0; emf_graphics = FALSE; } TERM_PUBLIC void EMF_graphics() { int width = 0.5 + term->xmax/EMF_PX2HM; int height = 0.5 + term->ymax/EMF_PX2HM; int mmwidth = 0.5 + (term->xmax/EMF_PX2HM) * (270./1024.); int mmheight = 0.5 + (term->ymax/EMF_PX2HM) * (200./768.); /* header start */ emf_record_count = 0; EMF_write_emr(1, 100); EMF_write_long(0); /* rclBounds */ EMF_write_long(0); EMF_write_long(term->xmax / EMF_PX2HM); EMF_write_long(term->ymax / EMF_PX2HM); EMF_write_long(0); /* rclFrame */ EMF_write_long(0); EMF_write_long(term->xmax); EMF_write_long(term->ymax); EMF_write_long(0x464D4520); /* signature */ EMF_write_long(0x00010000); /* version */ EMF_write_long(0); /* nBytes */ EMF_write_long(0); /* nRecords */ EMF_write_short(EMF_HANDLE_MAX); /* nHandles, MUST NOT BE 0 */ EMF_write_short(0); /* reserved */ EMF_write_long(0); /* descSize */ EMF_write_long(0); /* descOff */ EMF_write_long(0); /* nPalEntries */ EMF_write_long(width); /* ref dev pixwidth, default 1024 */ EMF_write_long(height); /* ref dev pixheight, default 768 */ EMF_write_long(mmwidth); /* ref dev mwidth, default 270 */ EMF_write_long(mmheight); /* ref dev mheight, default 200 */ EMF_write_long(0); /* cbPixelFormat */ EMF_write_long(0); /* offPixelFormat */ EMF_write_long(0); /* bOpenGL */ emf_graphics = TRUE; /* header end */ EMF_SetMapMode(8); /* forcing anisotropic mode */ EMF_SetWindowExtEx(term->xmax, term->ymax); /* setting logical (himetric) size */ EMF_SetViewportExtEx(term->xmax / EMF_PX2HM, term->ymax / EMF_PX2HM); /* setting device (pixel) size */ /* Paint with background color */ if (emf_background != 0xffffff) EMF_fillbox(FS_EMPTY, 0, 0, term->xmax, term->ymax); EMF_CreatePen(EMF_HANDLE_PEN, emf_pentype, 1, 0x000000); /* init default pen */ EMF_SelectObject(EMF_HANDLE_PEN); EMF_SetBkMode(1); /* transparent background for text */ EMF_CreateBrush(EMF_HANDLE_BRUSH, 1, 0, 0); /* transparent brush for polygons */ EMF_SelectObject(EMF_HANDLE_BRUSH); EMF_set_font(NULL); /* init default font */ emf_color = emf_textcolor = LT_UNDEFINED; } TERM_PUBLIC int EMF_set_font(const char *font) { static float last_fontsize = -1; static char last_fontname[256] = {'\0'}; /* FIXME: This condition is somehow triggered by enhanced_recursion */ if (font == emf_fontname) ; else if (font && *font) { float tempsize; int sep = strcspn(font,","); if (sep > 0) safe_strncpy(emf_fontname, font, GPMIN(sep + 1, 32)); if (sep < strlen(font) && sscanf(font+sep+1, "%f", &tempsize)) emf_fontsize = tempsize; } else { strcpy(emf_fontname, emf_defaultfontname); emf_fontsize = emf_defaultfontsize; } /* Skip redundant requests for the same font */ if (!strcmp(last_fontname, emf_fontname) && last_fontsize == emf_fontsize) { return TRUE; } else { safe_strncpy(last_fontname, emf_fontname, sizeof(last_fontname)); last_fontsize = emf_fontsize; } term->h_char = 0.6 * (emf_fontsize * EMF_PT2HM * emf_fontscale); term->v_char = 1.3 * (emf_fontsize * EMF_PT2HM * emf_fontscale); EMF_setfont(); return TRUE; } TERM_PUBLIC void EMF_text() { long pos; EMF_flush_polyline(); emf_graphics = FALSE; /* shige: 08/30 2012 * FIXME: * The following command prevents export of a spurious rectangle * (not the bounding box) on some Windows systems. Why? How? */ EMF_MoveToEx(emf_polyline[0], term->ymax - emf_polyline[1]); /* writing end of metafile */ EMF_SelectObject(EMF_STOCK_OBJECT_DEFAULT_FONT); EMF_DeleteObject(EMF_HANDLE_FONT); EMF_SelectObject(EMF_STOCK_OBJECT_BLACK_PEN); EMF_DeleteObject(EMF_HANDLE_PEN); EMF_SelectObject(EMF_STOCK_OBJECT_WHITE_BRUSH); EMF_DeleteObject(EMF_HANDLE_BRUSH); EMF_EOF(); /* update the header */ pos = ftell(gpoutfile); fseek(gpoutfile, 48L, SEEK_SET); EMF_write_long(pos); EMF_write_long(emf_record_count); /* Reset to start of output file. If the user mistakenly tries to */ /* plot again into the same file, it will overwrite the original */ /* rather than corrupting it. */ /* FIXME: An alternative would be to open a new output file. */ fseek(gpoutfile, 0L, SEEK_SET); } TERM_PUBLIC void EMF_linetype(int linetype) { EMF_flush_polyline(); /* Note : separating linetype and color would have not been futile, but anyway... */ #if (0) /* Not safe because linetype/color/pen are intermixed */ if (linetype == emf_linetype) return; #endif if (linetype == LT_NODRAW) linetype = LT_BACKGROUND; emf_linetype = linetype; EMF_linecolor(linetype); EMF_dashtype(linetype); } TERM_PUBLIC void EMF_linecolor(int linecolor) { static long GPFAR color_table_data[] = { RGB(255, 0, 0), /* red */ RGB(0, 255, 0), /* green */ RGB(0, 0, 255), /* blue */ RGB(255, 0, 255), /* magenta */ RGB(0, 0, 128), /* dark blue */ RGB(128, 0, 0), /* dark red */ RGB(0, 128, 128), /* dark cyan */ RGB(0, 0, 0), /* black */ RGB(128, 128, 128), /* grey */ RGB(0, 128, 64), /* very dark cyan */ RGB(128, 128, 0), /* dark yellow */ RGB(128, 0, 128), /* dark magenta */ RGB(192, 192, 192), /* light grey */ RGB(0, 255, 255), /* cyan */ RGB(255, 255, 0) /* yellow */ }; if (linecolor == LT_BACKGROUND) emf_color = emf_background; else { linecolor = (linecolor < 0 || emf_monochrome) ? 7 : (linecolor % EMF_COLORS); emf_color = color_table_data[linecolor]; } EMF_flush_polyline(); } TERM_PUBLIC int EMF_make_palette(t_sm_palette *palette) { return 0; /* can do continous colors */ } TERM_PUBLIC void EMF_previous_palette() { /* do nothing */ } TERM_PUBLIC void EMF_set_color(t_colorspec *colorspec) { rgb255_color rgb255; EMF_flush_polyline(); if (colorspec->type == TC_LT) { EMF_linecolor(colorspec->lt); } else if (colorspec->type == TC_FRAC) { rgb255maxcolors_from_gray(colorspec->value, &rgb255); emf_color = RGB(rgb255.r, rgb255.g, rgb255.b); } else if (colorspec->type == TC_RGB) { emf_color = RGB( colorspec->lt >> 16 & 0xff, colorspec->lt >> 8 & 0xff, colorspec->lt & 0xff ); } /* else { fprintf(stderr, "unhandled colorspec type %d\n", colorspec->type); } */ /* Force reevaluation of dash type */ emf_dashtype = emf_linetype; emf_dashtype_count++; } TERM_PUBLIC void EMF_filled_polygon(int points, gpiPoint *corners) { int i; unsigned long color = emf_color; int fillpar = corners->style >> 4; int style = corners->style & 0xf; switch (style) { case FS_EMPTY: /* fill with background color */ color = emf_background; break; case FS_PATTERN: /* pattern fill implemented as partial density */ fillpar *= 12; case FS_SOLID: /* solid fill */ if (fillpar >= 0 && fillpar < 100) { double density = (double)fillpar / 100.; color = ((int)((double)((emf_color>>16)&0xff)*density) << 16) + ((int)((double)((emf_color>>8)&0xff)*density) << 8) + ((int)((double)(emf_color&0xff)*density)); color += ((int)(255.*(1.-density)) << 16) + ((int)(255.*(1.-density)) << 8) + ((int)(255.*(1.-density))); } break; default: break; } EMF_flush_dashtype(); /* MS documentation says not to delete an object while it is selected */ EMF_SelectObject(EMF_STOCK_OBJECT_BLACK_PEN); EMF_SelectObject(EMF_STOCK_OBJECT_WHITE_BRUSH); EMF_DeleteObject(EMF_HANDLE_BRUSH); EMF_CreateBrush(EMF_HANDLE_BRUSH, 0, color, 0); EMF_SelectObject(EMF_HANDLE_BRUSH); EMF_DeleteObject(EMF_HANDLE_PEN); EMF_CreatePen(EMF_HANDLE_PEN, emf_pentype, 0, color); EMF_SelectObject(EMF_HANDLE_PEN); EMF_CreatePolygon(points); for (i=0; i<points; i++) EMF_write_pointl(corners[i].x, term->ymax - corners[i].y); /* Force re-evaluation of linetype next time we draw a line */ emf_linetype = LT_UNDEFINED; emf_dashtype = LT_UNDEFINED; } TERM_PUBLIC void EMF_fillbox(int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height) { gpiPoint corner[4]; corner[0].x = x1; corner[0].y = y1; corner[1].x = x1+width; corner[1].y = y1; corner[2].x = x1+width; corner[2].y = y1+height; corner[3].x = x1; corner[3].y = y1+height; corner->style = style; EMF_filled_polygon(4, corner); } TERM_PUBLIC void EMF_linewidth(double width) { EMF_flush_polyline(); width *= emf_linewidth_factor; if (width == emf_linewidth) return; emf_linewidth = width; /* The linewidth is applied at the same time as the dash pattern */ emf_dashtype_count++; } TERM_PUBLIC void EMF_flush_dashtype(void) { if (emf_dashtype_count > 0) { EMF_dashtype(emf_dashtype); emf_dashtype_count = 0; /* EMF_dashtype clears this also (shrug) */ } } /* * Resets _both_ line color and dash type! */ TERM_PUBLIC void EMF_dashtype(int dashtype) { int i, j; /* Each group of 8 entries in dot_length[] defines a dash pattern. Entries in each group are alternately length of whitespace and length of line, in units of 2/3 of the linewidth. */ static int dot_length[EMF_LINE_TYPES * 8] = { /* 0 - solid */ 5, 8, 5, 8, 5, 8, 5, 8, /* 1 - dashes */ 4, 2, 4, 2, 4, 2, 4, 2, /* 2 - dotted */ 4, 8, 4, 2, 4, 8, 4, 2, /* 3 - dash-dot */ 4, 9, 4, 2, 4, 2, 0, 0, /* 4 - dash-dot-dot */ }; emf_dashtype = dashtype; if (dashtype >= 0) dashtype = dashtype % EMF_LINE_TYPES; if (dashtype == LT_AXIS) dashtype = 2; if (dashtype < 1 || !emf_dashed) { /* solid mode */ EMF_SelectObject(EMF_STOCK_OBJECT_BLACK_PEN); EMF_DeleteObject(EMF_HANDLE_PEN); EMF_CreatePen(EMF_HANDLE_PEN, emf_pentype, emf_linewidth * EMF_PX2HM, emf_color); EMF_SelectObject(EMF_HANDLE_PEN); term->vector = EMF_solid_vector; } else { /* Since win32 dashed lines works only with 1 pixel linewith we must emulate */ EMF_SelectObject(EMF_STOCK_OBJECT_BLACK_PEN); EMF_DeleteObject(EMF_HANDLE_PEN); EMF_CreatePen(EMF_HANDLE_PEN, emf_pentype, emf_linewidth * EMF_PX2HM, emf_color); EMF_SelectObject(EMF_HANDLE_PEN); term->vector = EMF_dashed_vector; /* set up dash dimensions */ j = (dashtype - 1) * 8; for (i = 0; i < 8; i++, j++) { emf_step_sizes[i] = dot_length[j] * emf_dashlength * EMF_PX2HM; } /* first thing drawn will be a line */ emf_step = emf_step_sizes[1]; emf_step_index = 1; } emf_dashtype_count = 0; } TERM_PUBLIC void EMF_move(unsigned int x, unsigned int y) { if (x >= term->xmax || y >= term->ymax) { int_warn(NO_CARET, "emf_move: (%d,%d) out of range",x,y); x = GPMIN(x, term->xmax); y = GPMIN(y, term->ymax); } if (x == emf_posx && y == emf_posy) return; EMF_flush_polyline(); emf_posx = x; emf_posy = y; } TERM_PUBLIC void EMF_dashed_vector(unsigned int ux, unsigned int uy) { int xa, ya; int dx, dy, adx, ady; int dist; /* approximate distance in plot units from starting point to specified end point. */ long remain; /* approximate distance in plot units remaining to specified end point. */ if (ux >= term->xmax || uy >= term->ymax) int_warn(NO_CARET, "emf_dashed_vector: (%d,%d) out of range",ux,uy); dx = (ux - emf_posx); dy = (uy - emf_posy); adx = abs(dx); ady = abs(dy * 10); /* using the approximation sqrt(x**2 + y**2) ~ x + (5*x*x)/(12*y) when x > y. Note ordering of calculations to avoid overflow on 16 bit architectures */ if (10 * adx < ady) dist = (ady / 2 + 25 * adx / ady * adx / 6 * 5) / 5; else { if (adx == 0) return; dist = (adx * 10 + (ady / 24) * (ady / adx)) / 10; } remain = dist; xa = emf_posx; ya = emf_posy; while (remain > emf_step) { remain -= emf_step; if (emf_step_index & 1) EMF_solid_vector((int) (ux - (remain * dx) / dist), (int) (uy - (remain * dy) / dist)); else { xa = (int) (ux - (remain * dx) / dist); ya = (int) (uy - (remain * dy) / dist); EMF_move(xa, ya); } if (++emf_step_index >= 8) emf_step_index = 0; emf_step = emf_step_sizes[emf_step_index]; } if (emf_step_index & 1) EMF_solid_vector(ux, uy); else EMF_move(ux, uy); emf_step -= (int) remain; } TERM_PUBLIC void EMF_solid_vector(unsigned int ux, unsigned int uy) { if (ux >= term->xmax || uy >= term->ymax) int_warn(NO_CARET, "emf_solid_vector: (%d,%d) out of range",ux,uy); if (ux == emf_posx && uy == emf_posy) return; if (emf_coords * 2 > EMF_MAX_SEGMENTS - 2) EMF_flush_polyline(); if (emf_coords == 0) { emf_polyline[0] = emf_posx; emf_polyline[1] = emf_posy; emf_coords++; } emf_posx = emf_polyline[emf_coords * 2] = ux; emf_posy = emf_polyline[emf_coords * 2 + 1] = uy; emf_coords++; } TERM_PUBLIC void EMF_put_text(unsigned int x, unsigned int y, const char str[]) { int i, alen; int slen = strlen(str); int nchars = slen; #ifdef HAVE_ICONV char * wstr; if (encoding == S_ENC_UTF8 || encoding == S_ENC_SJIS) { iconv_t cd; size_t wsize, wlen, mblen; const char * str_start = str; char * wstr_start; char * FromEnc; nchars = strlen(str); mblen = nchars; wlen = wsize = 2 * mblen + 2; wstr = gp_alloc(wlen, "iconv string"); wstr_start = wstr; if (encoding == S_ENC_UTF8) FromEnc = "UTF-8"; else FromEnc = "Shift_JIS"; if ((cd = iconv_open("UTF-16LE", FromEnc)) == (iconv_t)-1) int_warn(NO_CARET, "iconv_open failed"); else { if (iconv(cd, (void *)&str_start, &mblen, &wstr_start, &wlen) == (size_t)-1) int_warn(NO_CARET, "iconv failed"); iconv_close(cd); slen = wsize - wlen; nchars = slen / 2; } } #endif if (slen <=0) return; /* shige: 08/30 2012 */ alen = slen; EMF_flush_polyline(); if (emf_textcolor != emf_color) { EMF_SetTextColor(emf_color); emf_textcolor = emf_color; } /* SB 20040506: offset array now included since it won't work with MS Security patch (kb835732) */ /* SB 20040506: also changed function from unicode to ansi version */ if (alen % 4) alen += 4 - (slen % 4); /* Structure must be long aligned! */ #ifdef HAVE_ICONV if (encoding == S_ENC_UTF8 || encoding == S_ENC_SJIS) { EMF_write_emr(84, 76 + alen + nchars * 4); /* ExtTextOutW, UTF16-LE version */ } else #endif { EMF_write_emr(83, 76 + alen + nchars * 4); /* ExtTextOutA, ANSI char version! */ } EMF_write_rectl(0, 0, 0, 0); /* bounding, never used */ EMF_write_long(1); /* GM_Compatible mode for advanced scaling */ EMF_write_float(EMF_PX2HM); /* x scale */ EMF_write_float(EMF_PX2HM); /* y scale */ /* positioning... y is recentered from bottom reference set in * text align */ EMF_write_pointl( x + (long) ((term->v_char/ 2) * sin(emf_vert_text * EMF_10THDEG2RAD)), term->ymax - y + (long) (term->v_char / 2 * cos(emf_vert_text * EMF_10THDEG2RAD))); EMF_write_long(nchars); /* true number of characters */ EMF_write_long(76); /* offset to text */ EMF_write_long(0); /* options, none */ EMF_write_rectl(0, 0, 0, 0); /* rectangle clipping not used */ EMF_write_long(0); /* offset to intercharacter spacing array */ /* can't be used since we don't know anything */ /* about the font properties being used */ #ifdef HAVE_ICONV if (encoding == S_ENC_UTF8 || encoding == S_ENC_SJIS) { for (i = 0; i < alen; i++) EMF_write_byte(i < slen ? wstr[i] : 0); /* writing text */ free(wstr); } else #endif for (i = 0; i < alen; i++) EMF_write_byte(i < slen ? str[i] : 0); /* writing text */ for (i = 0; i < nchars; i++) /* writing intercharacter spacing array (but we don't use it) */ EMF_write_long(300); /* SB 20040506: end of modification */ /* Invalidate current position */ emf_posx = emf_posy = -2000; } TERM_PUBLIC int EMF_text_angle(int ang) { /* Win GDI rotation is scaled in tenth of degrees, so... */ switch (ang) { case 0: /* left right */ if (emf_vert_text != 0) { emf_vert_text = 0; EMF_setfont(); } break; case TEXT_VERTICAL: /* bottom up */ if (emf_vert_text != 900) { emf_vert_text = 900; EMF_setfont(); } break; default: /* the general case */ emf_vert_text = 10 * ang; EMF_setfont(); break; } return TRUE; } TERM_PUBLIC int EMF_justify_text(enum JUSTIFY mode) { int align = GP_TA_BOTTOM; emf_justify = mode; switch (mode) { case LEFT: align |= GP_TA_LEFT; break; case RIGHT: align |= GP_TA_RIGHT; break; case CENTRE: align |= GP_TA_CENTER; break; } EMF_SetTextAlign(align); return (TRUE); } TERM_PUBLIC void EMF_reset() { emf_posx = emf_posy = 0; emf_graphics = FALSE; } TERM_PUBLIC void EMF_point(unsigned int x, unsigned int y, int number) { int old_dashtype; gpiPoint corners[12]; corners->style = FS_OPAQUE; EMF_flush_polyline(); /* Calls EMF_flush_dashtype */ old_dashtype = emf_dashtype; emf_dashtype = 0; emf_dashtype_count++; /* A few special point types */ if (69 <= number && number <= 73) { int emf_color_save = emf_color; emf_color = emf_background; switch (number) { case 69: EMF_point(x,y,4); break; case 70: EMF_point(x,y,6); break; case 71: EMF_point(x,y,8); break; case 72: EMF_point(x,y,10); break; case 73: EMF_point(x,y,12); break; } emf_color = emf_color_save; switch (number) { case 69: EMF_point(x,y,3); break; case 70: EMF_point(x,y,5); break; case 71: EMF_point(x,y,7); break; case 72: EMF_point(x,y,9); break; case 73: EMF_point(x,y,11); break; } emf_dashtype = old_dashtype; emf_dashtype_count++; return; } /* draw dot */ EMF_move(x, y); EMF_solid_vector(x + 1, y); number = number % EMF_POINTS; switch (number) { case 0: /* draw plus */ EMF_move(x - emf_tic, y); EMF_solid_vector(x + emf_tic, y); EMF_move(x, y - emf_tic); EMF_solid_vector(x, y + emf_tic); break; case 1: /* draw X */ EMF_move(x - emf_tic707, y - emf_tic707); EMF_solid_vector(x + emf_tic707, y + emf_tic707); EMF_move(x - emf_tic707, y + emf_tic707); EMF_solid_vector(x + emf_tic707, y - emf_tic707); break; case 2: /* draw star (asterisk) */ EMF_move(x, y - emf_tic); EMF_solid_vector(x, y + emf_tic); EMF_move(x + emf_tic866, y - emf_tic500); EMF_solid_vector(x - emf_tic866, y + emf_tic500); EMF_move(x + emf_tic866, y + emf_tic500); EMF_solid_vector(x - emf_tic866, y - emf_tic500); break; case 3: /* draw box */ EMF_move(x - emf_tic707, y - emf_tic707); EMF_solid_vector(x + emf_tic707, y - emf_tic707); EMF_solid_vector(x + emf_tic707, y + emf_tic707); EMF_solid_vector(x - emf_tic707, y + emf_tic707); EMF_flush_polygon(); break; case 4: /* draw filled box */ corners[0].x = x - emf_tic707; corners[0].y = y - emf_tic707; corners[1].x = x + emf_tic707; corners[1].y = y - emf_tic707; corners[2].x = x + emf_tic707; corners[2].y = y + emf_tic707; corners[3].x = x - emf_tic707; corners[3].y = y + emf_tic707; EMF_filled_polygon(4, corners); break; case 5: y = term->ymax-y; /* EAM - WTF? */ EMF_SelectObject(EMF_STOCK_OBJECT_BLACK_PEN); EMF_SelectObject(EMF_STOCK_OBJECT_WHITE_BRUSH); EMF_DeleteObject(EMF_HANDLE_BRUSH); EMF_CreateBrush(EMF_HANDLE_BRUSH, 1, 0, 0); /* transparent brush */ EMF_SelectObject(EMF_HANDLE_BRUSH); EMF_DeleteObject(EMF_HANDLE_PEN); EMF_CreatePen(EMF_HANDLE_PEN, emf_pentype, 1, emf_color); EMF_SelectObject(EMF_HANDLE_PEN); EMF_Ellipse((long)(x-emf_tic),(long)(y-emf_tic),(long)(x+emf_tic),(long)(y+emf_tic)); break; case 6: /* filled circle */ y = term->ymax-y; /* EAM - WTF? */ EMF_SelectObject(EMF_STOCK_OBJECT_WHITE_BRUSH); EMF_DeleteObject(EMF_HANDLE_BRUSH); EMF_CreateBrush(EMF_HANDLE_BRUSH, 0, emf_color, 0); EMF_SelectObject(EMF_HANDLE_BRUSH); EMF_SelectObject(EMF_STOCK_OBJECT_BLACK_PEN); EMF_DeleteObject(EMF_HANDLE_PEN); EMF_CreatePen(EMF_HANDLE_PEN, emf_pentype, 1, emf_color); EMF_SelectObject(EMF_HANDLE_PEN); EMF_Ellipse((long)(x-emf_tic),(long)(y-emf_tic),(long)(x+emf_tic),(long)(y+emf_tic)); break; case 7: /* draw triangle (point up) */ EMF_move(x, y + emf_tic1241); EMF_solid_vector(x - emf_tic1077, y - emf_tic621); EMF_solid_vector(x + emf_tic1077, y - emf_tic621); EMF_flush_polygon(); break; case 8: /* filled triangle point up */ corners[0].x = x ; corners[0].y = y + emf_tic1241; corners[1].x = x - emf_tic1077 ; corners[1].y = y - emf_tic621; corners[2].x = x + emf_tic1077 ; corners[2].y = y - emf_tic621; EMF_filled_polygon(3, corners); break; case 9: /* draw triangle (point down) */ EMF_move(x, y - emf_tic1241); EMF_solid_vector(x - emf_tic1077, y + emf_tic621); EMF_solid_vector(x + emf_tic1077, y + emf_tic621); EMF_flush_polygon(); break; case 10: /* filled triangle point down */ corners[0].x = x ; corners[0].y = y - emf_tic1241; corners[1].x = x - emf_tic1077 ; corners[1].y = y + emf_tic621; corners[2].x = x + emf_tic1077 ; corners[2].y = y + emf_tic621; EMF_filled_polygon(3, corners); break; case 11: /* draw diamond */ EMF_move(x - emf_tic, y); EMF_solid_vector(x, y - emf_tic); EMF_solid_vector(x + emf_tic, y); EMF_solid_vector(x, y + emf_tic); EMF_flush_polygon(); break; case 12: /* filled diamond */ corners[0].x = x - emf_tic ; corners[0].y = y; corners[1].x = x ; corners[1].y = y - emf_tic; corners[2].x = x + emf_tic ; corners[2].y = y; corners[3].x = x ; corners[3].y = y + emf_tic; EMF_filled_polygon(4, corners); break; } /* end_points: */ emf_dashtype = old_dashtype; emf_dashtype_count++; } TERM_PUBLIC void EMF_set_pointsize(double size) { if (size < 0) size = 1; emf_tic = (size * term->h_tic); emf_tic707 = floor((double)emf_tic * 0.707 + 0.5); emf_tic866 = emf_tic * 13 / 15; emf_tic500 = emf_tic / 2; emf_tic1241 = emf_tic * 36 / 29; emf_tic1077 = emf_tic * 14 / 13; emf_tic621 = emf_tic * 18 / 29; } /* * Ethan A Merritt September 2008 * - Support for enhanced text mode * PROBLEMS: * - Rotated enhanced text is not handled * - The proportional spacing hack is really ugly * ETO_PDY is supposed to handle this, but pre-Vista Windows * doesn't support the flag so it's of no real use. */ static TBOOLEAN ENHemf_opened_string; /* used in determining height of processed text */ static float ENHemf_base; /* use these so that we don't over-write the current font settings */ static float ENHemf_fontsize; static char *ENHemf_font; static TBOOLEAN ENHemf_show = TRUE; static TBOOLEAN ENHemf_sizeonly = FALSE; static int ENHemf_overprint = 0; TERM_PUBLIC void ENHemf_OPEN( char *fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { /* If the overprint code requests a save or restore, that's all we do */ #define EMF_AVG_WID 0.8 #undef TA_UPDATECP_MODE #ifdef TA_UPDATECP_MODE if (overprint == 3) { EMF_SaveDC(); return; } else if (overprint == 4) { EMF_RestoreDC(); return; } #else static int save_x, save_y; if (overprint == 3) { save_x = emf_posx; save_y = emf_posy; return; } else if (overprint == 4) { emf_posx = save_x; emf_posy = save_y; return; } #endif if (!ENHemf_opened_string) { ENHemf_opened_string = TRUE; enhanced_cur_text = &enhanced_text[0]; ENHemf_font = fontname; ENHemf_fontsize = fontsize; ENHemf_base = base * emf_fontscale; ENHemf_show = showflag; ENHemf_overprint = overprint; } } /* Write a string fragment and update the current position */ TERM_PUBLIC void ENHemf_FLUSH() { unsigned int x, y; int x_offset, y_offset; char *str; int i; int incr_x; double strl; if (ENHemf_opened_string) { *enhanced_cur_text = '\0'; ENHemf_opened_string = FALSE; x = emf_posx; y = emf_posy; if (1) { char save_font[256]; float save_fontsize = emf_fontsize; strcpy(save_font,emf_fontname); emf_fontsize = ENHemf_fontsize; EMF_set_font(ENHemf_font); emf_fontsize = save_fontsize; strcpy(emf_fontname,save_font); } str = enhanced_text; #ifndef GP_TA_UPDATEPC_MODE /* We are especially bad at guessing the width of whitespace. */ /* Best is to pile up all our errors on top of leading space. */ i = strspn(enhanced_text," "); if (i > 0) { double blank = i * term->h_char * EMF_AVG_WID; x += cos(emf_vert_text * EMF_10THDEG2RAD) * blank; y += sin(emf_vert_text * EMF_10THDEG2RAD) * blank; emf_posx = x; emf_posy = y; str += i; } #endif x_offset = sin(emf_vert_text * EMF_10THDEG2RAD) * ENHemf_base * EMF_PX2HM; y_offset = cos(emf_vert_text * EMF_10THDEG2RAD) * ENHemf_base * EMF_PX2HM; if (ENHemf_show && !ENHemf_sizeonly) EMF_put_text(x-x_offset, y+y_offset, str); strl = strlen(str); if (emf_tweak) { /* Tweak estimated length of rendered string by counting "thin" */ /* characters. In principle EMF will accept an array of char */ /* widths. But EMF viewers don't implement this option (ETO_PDY */ { int thin = 0, wide = 0; for (i=0; i<strlen(str); i++) { if (strchr(" ijl.,;:|!()[]I-'",str[i])) thin++; if (('A' <= str[i] && str[i] <= 'Z') || strchr("mw<>",str[i])) wide++; if (strchr(" i.,;:|!'",str[i])) /* really thin */ thin++; } incr_x = (strl * EMF_AVG_WID + (double)(wide) * 0.3 + (double)(-thin) * 0.2) * term->h_char; } } else { incr_x = strl * EMF_AVG_WID * term->h_char; } /* Attempt to handle slanted text. Not entirely successful */ emf_posx = x + incr_x * cos(emf_vert_text * EMF_10THDEG2RAD); emf_posy = y + incr_x * sin(emf_vert_text * EMF_10THDEG2RAD); FPRINTF((stderr,"fontwidth = %d text box: %d x %d\n", (int)(EMF_AVG_WID * term->h_char), (int)(incr_x * cos(emf_vert_text * EMF_10THDEG2RAD)), (int)(incr_x * sin(emf_vert_text * EMF_10THDEG2RAD)))); if (ENHemf_overprint == 1) { emf_posx -= 0.5 * incr_x * cos(emf_vert_text * EMF_10THDEG2RAD); emf_posy -= 0.5 * incr_x * sin(emf_vert_text * EMF_10THDEG2RAD); } } } TERM_PUBLIC void ENHemf_put_text(unsigned int x, unsigned int y, const char *str) { char *original_string = (char *) str; if (str == NULL || *str == '\0') return; /* if there are no magic characters, we should just be able * punt the string to EMF_put_text() */ if (ignore_enhanced_text || !strpbrk(str, "{}^_@&~")) { /* FIXME: do something to ensure default font is selected */ EMF_put_text(x,y,str); return; } EMF_move(x,y); if (emf_textcolor != emf_color) { EMF_SetTextColor(emf_color); emf_textcolor = emf_color; } /* set up the global variables needed by enhanced_recursion() */ enhanced_fontscale = 1.0; strncpy(enhanced_escape_format,"&#x%2.2x;",sizeof(enhanced_escape_format)); ENHemf_opened_string = FALSE; ENHemf_overprint = 0; ENHemf_font = emf_fontname; ENHemf_fontsize = emf_fontsize; if (emf_justify == RIGHT || emf_justify == CENTRE) ENHemf_sizeonly = TRUE; #ifdef UPDATECP_MODE EMF_SetTextAlign(GP_TA_BASELINE|GP_TA_LEFT|GP_TA_UPDATECP); #else EMF_SetTextAlign(GP_TA_BASELINE|GP_TA_LEFT|GP_TA_NOUPDATECP); #endif /* Set the recursion going. We say to keep going until a * closing brace, but we don't really expect to find one. * If the return value is not the nul-terminator of the * string, that can only mean that we did find an unmatched * closing brace in the string. We increment past it (else * we get stuck in an infinite loop) and try again. */ while (*(str = enhanced_recursion((char *)str, TRUE, ENHemf_font, ENHemf_fontsize, 0.0, TRUE, TRUE, 0))) { (term->enhanced_flush)(); /* I think we can only get here if *str == '}' */ enh_err_check(str); if (!*++str) break; /* end of string */ /* else carry on and process the rest of the string */ } /* EAM May 2010 - 2-pass text justification */ /* We can do text justification by running the entire top level string */ /* through 2 times, with the ENHgd_sizeonly flag set the first time. */ /* After seeing where the final position is, we then offset the start */ /* point accordingly and run it again without the sizeonly flag set. */ if (emf_justify == RIGHT || emf_justify == CENTRE) { enum JUSTIFY justification = emf_justify; int x_offset = emf_posx - x; int y_offset = (emf_vert_text == 0) ? 0 : emf_posy - y; emf_justify = LEFT; ENHemf_sizeonly = FALSE; if (justification == RIGHT) ENHemf_put_text(x - x_offset, y - y_offset, original_string); else if (justification == CENTRE) ENHemf_put_text(x - x_offset/2, y - y_offset/2, original_string); emf_justify = justification; } /* Restore everything we messed with */ EMF_setfont(); /* Necessary? */ ENHemf_base = 0; } #endif /* TERM_BODY */ #ifdef TERM_TABLE TERM_TABLE_START(emf_driver) "emf", "Enhanced Metafile format", EMF_XMAX, EMF_YMAX, EMF_VCHAR, EMF_HCHAR, EMF_VTIC, EMF_HTIC, EMF_options, EMF_init, EMF_reset, EMF_text, null_scale, EMF_graphics, EMF_move, EMF_solid_vector, EMF_linetype, EMF_put_text, EMF_text_angle, EMF_justify_text, EMF_point, do_arrow, EMF_set_font, EMF_set_pointsize, TERM_BINARY|TERM_CAN_DASH|TERM_LINEWIDTH|TERM_FONTSCALE, NULL, /* suspend */ NULL, /* resume */ EMF_fillbox, EMF_linewidth #ifdef USE_MOUSE , 0, 0, 0, 0, 0 /* no mouse support for emf */ #endif , EMF_make_palette, EMF_previous_palette, EMF_set_color, EMF_filled_polygon , NULL /* image */ , ENHemf_OPEN, ENHemf_FLUSH, do_enh_writec TERM_TABLE_END(emf_driver) #undef LAST_TERM #define LAST_TERM emf_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(emf) "1 emf", "?commands set terminal emf", "?set terminal emf", "?set term emf", "?terminal emf", "?term emf", "?emf", " The `emf` terminal generates an Enhanced Metafile Format file.", " This file format is recognized by many Windows applications.", "", " Syntax:", " set terminal emf {color | monochrome} {solid | dashed}", " {enhanced {noproportional}}", " {rounded | butt}", " {linewidth <LW>} {dashlength <DL>}", " {size XX,YY} {background <rgb_color>}", " {font \"<fontname>{,<fontsize>}\"}", " {fontscale <scale>}", "", " In `monochrome` mode successive line types cycle through dash patterns.", " In `color` mode successive line types use successive colors, and only after", " all 8 default colors are exhausted is the dash pattern incremented.", " `solid` draws all curves with solid lines, overriding any dashed patterns;", " `linewidth <factor>` multiplies all line widths by this factor.", " `dashlength <factor>` is useful for thick lines.", " <fontname> is the name of a font; and ", " `<fontsize>` is the size of the font in points.", "", " The nominal size of the output image defaults to 1024x768 in arbitrary", " units. You may specify a different nominal size using the `size` option.", "", " Enhanced text mode tries to approximate proportional character spacing.", " If you are using a monospaced font, or don't like the approximation, you", " can turn off this correction using the `noproportional` option.", "", " The default settings are `color solid font \"Arial,12\" size 1024,768`", " Selecting `default` sets all options to their default values.", "", " Examples:", " set terminal emf 'Times Roman Italic, 12'", " set terminal emf dashed # otherwise all lines are solid" END_HELP(emf) #endif /* TERM_HELP */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/emxvga.trm�����������������������������������������������������������������������0000644�0004711�0000144�00000040167�10460036602�013120� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: emxvga.trm,v 1.15 2006/07/21 02:35:46 sfeam Exp $ */ /* GNUPLOT - emxvga.trm */ /*[ * Copyright 1994, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver supports: * SVGA 1024x768x256 for PC's running DOS or OS/2 * * AUTHOR * David J. Liu (liudj0@minerva.cis.yale.edu) */ /* * Compile with GCC (emx) with VESA and SVGAKIT maintained by * Johannes Martin (JMARTIN@GOOFY.ZDV.UNI-MAINZ.DE) * with additions by David J. Liu (liudj0@minerva.cis.yale.edu) * supports VESA, Trident, Cirrus, ET4000, WD and S3. */ /* * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995) */ #include "driver.h" #ifdef TERM_REGISTER #ifdef EMXVESA register_term(vesa) #endif /* EMXVESA */ register_term(emxvga) #endif #ifdef TERM_PROTO TERM_PUBLIC void EMXVGA_init __PROTO((void)); TERM_PUBLIC void EMXVGA_reset __PROTO((void)); TERM_PUBLIC void EMXVGA_text __PROTO((void)); TERM_PUBLIC void EMXVGA_graphics __PROTO((void)); TERM_PUBLIC void EMXVGA_linetype __PROTO((int)); TERM_PUBLIC void EMXVGA_move __PROTO((unsigned int, unsigned int)); TERM_PUBLIC void EMXVGA_vector __PROTO((unsigned int, unsigned int)); TERM_PUBLIC int EMXVGA_text_angle __PROTO((int)); TERM_PUBLIC void EMXVGA_put_text __PROTO((unsigned int, unsigned int, const char *)); #define EMXVGA_VCHAR 8 #define EMXVGA_HCHAR 8 #define EMXVGA_VTIC 4 #define EMXVGA_HTIC 4 #define EMXVGA_XMAX 0 /* These two entries are just place holders. */ #define EMXVGA_YMAX 0 /* The actual values will be filled in init. */ #ifdef EMXVESA TERM_PUBLIC void EMXVESA_options __PROTO((void)); TERM_PUBLIC void EMXVESA_init __PROTO((void)); TERM_PUBLIC void EMXVESA_graphics __PROTO((void)); TERM_PUBLIC void EMXVESA_text __PROTO((void)); TERM_PUBLIC void EMXVESA_reset __PROTO((void)); #endif #endif /* TERM_PROTO */ #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY /* avoid name clash with graph.h - lets hope that no following * driver needs these symbols ! */ #ifdef RIGHT #undef RIGHT #endif #ifdef DOWN #undef DOWN #endif #include <vesa.h> #include <jmgraph.h> #include <conio.h> /* for getch() -SB */ #include <stdlib.h> #include <dos.h> /* * Some versions of graph.h (e.g. jmgraph.h) define RIGHT to be 0 * colliding with enum JUSTIFY. We don't need this define anyway, * just undef it. -SB */ #ifdef RIGHT #undef RIGHT #endif #ifdef DOWN #undef DOWN #endif static int EMXVGA_vmode = G640x480x256; /* default mode */ static int vgacolor[] ={ 7, 8, 2, 3, 4, 5, 9, 14, 12, 15, 13, 10, 11, 1, 6 }; static int graphics_on = FALSE; int startx, starty, lasty; int EMXVGA_angle, EMXVGA_color; char *EMXVGA_buf; void emx_getch() { union REGS reg; char c; if (_osmode == OS2_MODE) VesaGetCharacter(&c); else { reg.x.ax = 0x0000; _int86(0x16, ®, ®); if (reg.h.al == 0) { reg.x.ax = 0x0000; _int86(0x16, ®, ®); } } } /* gstring.c (emx+gcc) -- Copyright (c) 1994 by David J. Liu */ unsigned char font[128][8] = { /* 8x8 font */ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x7E, 0x81, 0xA5, 0x81, 0xBD, 0x99, 0x81, 0x7E}, {0x7E, 0xFF, 0xDB, 0xFF, 0xC3, 0xE7, 0xFF, 0x7E}, {0x6C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, 0x10, 0x00}, {0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x10, 0x00}, {0x38, 0x7C, 0x38, 0xFE, 0xFE, 0x92, 0x10, 0x7C}, {0x00, 0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x7C}, {0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x00, 0x00}, {0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF}, {0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00}, {0xFF, 0xC3, 0x99, 0xBD, 0xBD, 0x99, 0xC3, 0xFF}, {0x0F, 0x07, 0x0F, 0x7D, 0xCC, 0xCC, 0xCC, 0x78}, {0x3C, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18}, {0x3F, 0x33, 0x3F, 0x30, 0x30, 0x70, 0xF0, 0xE0}, {0x7F, 0x63, 0x7F, 0x63, 0x63, 0x67, 0xE6, 0xC0}, {0x99, 0x5A, 0x3C, 0xE7, 0xE7, 0x3C, 0x5A, 0x99}, {0x80, 0xE0, 0xF8, 0xFE, 0xF8, 0xE0, 0x80, 0x00}, {0x02, 0x0E, 0x3E, 0xFE, 0x3E, 0x0E, 0x02, 0x00}, {0x18, 0x3C, 0x7E, 0x18, 0x18, 0x7E, 0x3C, 0x18}, {0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x00}, {0x7F, 0xDB, 0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x00}, {0x3E, 0x63, 0x38, 0x6C, 0x6C, 0x38, 0x86, 0xFC}, {0x00, 0x00, 0x00, 0x00, 0x7E, 0x7E, 0x7E, 0x00}, {0x18, 0x3C, 0x7E, 0x18, 0x7E, 0x3C, 0x18, 0xFF}, {0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x00}, {0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00}, {0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00}, {0x00, 0x30, 0x60, 0xFE, 0x60, 0x30, 0x00, 0x00}, {0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xFE, 0x00, 0x00}, {0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00}, {0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x00, 0x00}, {0x00, 0xFF, 0xFF, 0x7E, 0x3C, 0x18, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x18, 0x3C, 0x3C, 0x18, 0x18, 0x00, 0x18, 0x00}, {0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x6C, 0x6C, 0xFE, 0x6C, 0xFE, 0x6C, 0x6C, 0x00}, {0x18, 0x7E, 0xC0, 0x7C, 0x06, 0xFC, 0x18, 0x00}, {0x00, 0xC6, 0xCC, 0x18, 0x30, 0x66, 0xC6, 0x00}, {0x38, 0x6C, 0x38, 0x76, 0xDC, 0xCC, 0x76, 0x00}, {0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x18, 0x30, 0x60, 0x60, 0x60, 0x30, 0x18, 0x00}, {0x60, 0x30, 0x18, 0x18, 0x18, 0x30, 0x60, 0x00}, {0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00}, {0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30}, {0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00}, {0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0x80, 0x00}, {0x7C, 0xCE, 0xDE, 0xF6, 0xE6, 0xC6, 0x7C, 0x00}, {0x30, 0x70, 0x30, 0x30, 0x30, 0x30, 0xFC, 0x00}, {0x78, 0xCC, 0x0C, 0x38, 0x60, 0xCC, 0xFC, 0x00}, {0x78, 0xCC, 0x0C, 0x38, 0x0C, 0xCC, 0x78, 0x00}, {0x1C, 0x3C, 0x6C, 0xCC, 0xFE, 0x0C, 0x1E, 0x00}, {0xFC, 0xC0, 0xF8, 0x0C, 0x0C, 0xCC, 0x78, 0x00}, {0x38, 0x60, 0xC0, 0xF8, 0xCC, 0xCC, 0x78, 0x00}, {0xFC, 0xCC, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x00}, {0x78, 0xCC, 0xCC, 0x78, 0xCC, 0xCC, 0x78, 0x00}, {0x78, 0xCC, 0xCC, 0x7C, 0x0C, 0x18, 0x70, 0x00}, {0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00}, {0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30}, {0x18, 0x30, 0x60, 0xC0, 0x60, 0x30, 0x18, 0x00}, {0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x00}, {0x60, 0x30, 0x18, 0x0C, 0x18, 0x30, 0x60, 0x00}, {0x3C, 0x66, 0x0C, 0x18, 0x18, 0x00, 0x18, 0x00}, {0x7C, 0xC6, 0xDE, 0xDE, 0xDC, 0xC0, 0x7C, 0x00}, {0x30, 0x78, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0x00}, {0xFC, 0x66, 0x66, 0x7C, 0x66, 0x66, 0xFC, 0x00}, {0x3C, 0x66, 0xC0, 0xC0, 0xC0, 0x66, 0x3C, 0x00}, {0xF8, 0x6C, 0x66, 0x66, 0x66, 0x6C, 0xF8, 0x00}, {0xFE, 0x62, 0x68, 0x78, 0x68, 0x62, 0xFE, 0x00}, {0xFE, 0x62, 0x68, 0x78, 0x68, 0x60, 0xF0, 0x00}, {0x3C, 0x66, 0xC0, 0xC0, 0xCE, 0x66, 0x3A, 0x00}, {0xCC, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0xCC, 0x00}, {0x78, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00}, {0x1E, 0x0C, 0x0C, 0x0C, 0xCC, 0xCC, 0x78, 0x00}, {0xE6, 0x66, 0x6C, 0x78, 0x6C, 0x66, 0xE6, 0x00}, {0xF0, 0x60, 0x60, 0x60, 0x62, 0x66, 0xFE, 0x00}, {0xC6, 0xEE, 0xFE, 0xFE, 0xD6, 0xC6, 0xC6, 0x00}, {0xC6, 0xE6, 0xF6, 0xDE, 0xCE, 0xC6, 0xC6, 0x00}, {0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0x6C, 0x38, 0x00}, {0xFC, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xF0, 0x00}, {0x7C, 0xC6, 0xC6, 0xC6, 0xD6, 0x7C, 0x0E, 0x00}, {0xFC, 0x66, 0x66, 0x7C, 0x6C, 0x66, 0xE6, 0x00}, {0x7C, 0xC6, 0xE0, 0x78, 0x0E, 0xC6, 0x7C, 0x00}, {0xFC, 0xB4, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00}, {0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xFC, 0x00}, {0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x00}, {0xC6, 0xC6, 0xC6, 0xC6, 0xD6, 0xFE, 0x6C, 0x00}, {0xC6, 0xC6, 0x6C, 0x38, 0x6C, 0xC6, 0xC6, 0x00}, {0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x30, 0x78, 0x00}, {0xFE, 0xC6, 0x8C, 0x18, 0x32, 0x66, 0xFE, 0x00}, {0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, 0x00}, {0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x02, 0x00}, {0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00}, {0x10, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF}, {0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0x76, 0x00}, {0xE0, 0x60, 0x60, 0x7C, 0x66, 0x66, 0xDC, 0x00}, {0x00, 0x00, 0x78, 0xCC, 0xC0, 0xCC, 0x78, 0x00}, {0x1C, 0x0C, 0x0C, 0x7C, 0xCC, 0xCC, 0x76, 0x00}, {0x00, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00}, {0x38, 0x6C, 0x64, 0xF0, 0x60, 0x60, 0xF0, 0x00}, {0x00, 0x00, 0x76, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8}, {0xE0, 0x60, 0x6C, 0x76, 0x66, 0x66, 0xE6, 0x00}, {0x30, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00}, {0x0C, 0x00, 0x1C, 0x0C, 0x0C, 0xCC, 0xCC, 0x78}, {0xE0, 0x60, 0x66, 0x6C, 0x78, 0x6C, 0xE6, 0x00}, {0x70, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00}, {0x00, 0x00, 0xCC, 0xFE, 0xFE, 0xD6, 0xD6, 0x00}, {0x00, 0x00, 0xB8, 0xCC, 0xCC, 0xCC, 0xCC, 0x00}, {0x00, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0x78, 0x00}, {0x00, 0x00, 0xDC, 0x66, 0x66, 0x7C, 0x60, 0xF0}, {0x00, 0x00, 0x76, 0xCC, 0xCC, 0x7C, 0x0C, 0x1E}, {0x00, 0x00, 0xDC, 0x76, 0x62, 0x60, 0xF0, 0x00}, {0x00, 0x00, 0x7C, 0xC0, 0x70, 0x1C, 0xF8, 0x00}, {0x10, 0x30, 0xFC, 0x30, 0x30, 0x34, 0x18, 0x00}, {0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00}, {0x00, 0x00, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x00}, {0x00, 0x00, 0xC6, 0xC6, 0xD6, 0xFE, 0x6C, 0x00}, {0x00, 0x00, 0xC6, 0x6C, 0x38, 0x6C, 0xC6, 0x00}, {0x00, 0x00, 0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8}, {0x00, 0x00, 0xFC, 0x98, 0x30, 0x64, 0xFC, 0x00}, {0x1C, 0x30, 0x30, 0xE0, 0x30, 0x30, 0x1C, 0x00}, {0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00}, {0xE0, 0x30, 0x30, 0x1C, 0x30, 0x30, 0xE0, 0x00}, {0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x10, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0x00} }; void g_set(int x, int y, int color); /* part of SVGA */ void g_string(int x0, int y0, int color, int angle, char *s) { int i, j, k; float sa, ca, x, y; k = 0; x = 0.5 + x0; y = 0.5 + y0; sa = sin(- DEG2RAD * angle); ca = cos(DEG2RAD * angle); while (s[k]) { for (i = 0; i < 8; i++) for (j = 0; j < 8; j++) g_set(x + ca * j - sa * i, y + ca * i + sa * j, (font[(int) s[k]][i] & (1 << (7 - j))) ? color : 0); k++; x += ca * 8; y += sa * 8; } } /* end of gstring.c */ TERM_PUBLIC void EMXVGA_init() { if (!g_mode(EMXVGA_vmode)) { fputs("Unable to initiate graphics.\n", stderr); return; } term->xmax = g_xsize; term->ymax = g_ysize; lasty = g_ysize - 1; } TERM_PUBLIC void EMXVGA_reset() { g_mode(GTEXT); graphics_on = FALSE; } TERM_PUBLIC void EMXVGA_text() { if (graphics_on) { emx_getch(); g_mode(GTEXT); graphics_on = FALSE; } } TERM_PUBLIC void EMXVGA_graphics() { if (!graphics_on) { g_mode(EMXVGA_vmode); graphics_on = TRUE; } } TERM_PUBLIC void EMXVGA_linetype(int linetype) { EMXVGA_color = vgacolor[(linetype % 13) + 2]; } TERM_PUBLIC void EMXVGA_move(unsigned int x, unsigned int y) { startx = x; starty = y; } TERM_PUBLIC void EMXVGA_vector(unsigned int x, unsigned int y) { g_line(startx, lasty - starty, x, lasty - y, EMXVGA_color); startx = x; starty = y; } TERM_PUBLIC int EMXVGA_text_angle(int ang) { EMXVGA_angle = (ang ? 90 : 0); return (TRUE); } TERM_PUBLIC void EMXVGA_put_text(unsigned int x, unsigned int y, const char *str) { g_string(x, lasty - y - 3, EMXVGA_color, EMXVGA_angle, str); } TERM_PUBLIC void EMXVGA_suspend() { if (EMXVGA_buf) free(EMXVGA_buf); /* do this just for safety */ EMXVGA_buf = (char *) malloc(g_memsize); g_save(EMXVGA_buf); emx_getch(); g_mode(GTEXT); } TERM_PUBLIC void EMXVGA_resume() { g_mode(EMXVGA_vmode); g_restore(EMXVGA_buf); free(EMXVGA_buf); } #ifdef EMXVESA int emx_vesamode = G640x480x256; int emx_xlast, emx_ylast; TERM_PUBLIC void EMXVESA_options() { if (!END_OF_COMMAND) { if (almost_equals(c_token, "d$efault")) { emx_vesamode = G640x480x256; c_token++; } } if (!END_OF_COMMAND) { /* We have a vesa mode specified */ struct value a; emx_vesamode = (int) real(const_express(&a)); } sprintf(term_options, "%d", emx_vesamode); } TERM_PUBLIC void EMXVESA_init() { if (!g_mode(emx_vesamode)) int_error(NO_CARET, "Couldn't select graphics mode"); emx_xlast = g_xsize - 1; term->xmax = emx_xlast + 1; emx_ylast = g_ysize - 1; term->ymax = emx_ylast + 1; g_mode(GTEXT); } TERM_PUBLIC void EMXVESA_graphics() { g_mode(emx_vesamode); } TERM_PUBLIC void EMXVESA_text() { int ch; ch = getch(); g_mode(GTEXT); if (ch == 3) int_error(NO_CARET, "Interrupt"); } TERM_PUBLIC void EMXVESA_reset() { } #endif /* VESA */ #endif /* TERM_BODY */ #ifdef TERM_TABLE #ifdef EMXVESA TERM_TABLE_START(vesa_driver) "vesa", "IBM PC/Clone with VESA SVGA graphics board [vesa mode]", EMXVGA_XMAX, EMXVGA_YMAX, EMXVGA_VCHAR, EMXVGA_HCHAR, EMXVGA_VTIC, EMXVGA_HTIC, EMXVESA_options, EMXVESA_init, EMXVESA_reset, EMXVESA_text, null_scale, EMXVESA_graphics, EMXVGA_move, EMXVGA_vector, EMXVGA_linetype, EMXVGA_put_text, EMXVGA_text_angle, null_justify_text, do_point, do_arrow, set_font_null TERM_TABLE_END(vesa_driver) #undef LAST_TERM #define LAST_TERM vesa_driver #endif /* VESA */ TERM_TABLE_START(emxvga_driver) "emxvga", "PC with VGA running DOS or OS/2", EMXVGA_XMAX, EMXVGA_YMAX, EMXVGA_VCHAR, EMXVGA_HCHAR, EMXVGA_VTIC, EMXVGA_HTIC, options_null, EMXVGA_init, EMXVGA_reset, EMXVGA_text, null_scale, EMXVGA_graphics, EMXVGA_move, EMXVGA_vector, EMXVGA_linetype, EMXVGA_put_text, EMXVGA_text_angle, null_justify_text, do_point, do_arrow, set_font_null, 0, /* pointsize */ TERM_CAN_MULTIPLOT, EMXVGA_suspend, EMXVGA_resume TERM_TABLE_END(emxvga_driver) #undef LAST_TERM #define LAST_TERM emxvga_driver #endif /* TERM_TABLE */ #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(emxvga) "1 emxvga", "?commands set terminal emxvga", "?set terminal emxvga", "?set term emxvga", "?terminal emxvga", "?term emxvga", "?emxvga", "?commands set terminal emxvesa", "?set terminal emxvesa", "?set term emxvesa", "?terminal emxvesa", "?term emxvesa", "?emxvesa", "?commands set terminal vgal", "?set terminal vgal", "?set term vgal", "?terminal vgal", "?term vgal", "?vgal", " The `emxvga`, `emxvesa` and `vgal` terminal drivers support PCs with SVGA,", " vesa SVGA and VGA graphics boards, respectively. They are intended to be", " compiled with \"emx-gcc\" under either DOS or OS/2. They also need VESA and", " SVGAKIT maintained by Johannes Martin (JMARTIN@GOOFY.ZDV.UNI-MAINZ.DE) with", " additions by David J. Liu (liu@phri.nyu.edu).", "", " Syntax:", " set terminal emxvga", " set terminal emxvesa {vesa-mode}", " set terminal vgal", "", " The only option is the vesa mode for `emxvesa`, which defaults to G640x480x256." END_HELP(emxvga) #endif /* TERM_HELP */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/Makefile.am����������������������������������������������������������������������0000644�0004711�0000144�00000005426�12223337633�013147� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign EXTRA_DIST = README Makefile.am.in driver.h impcodes.h \ object.h post.h $(CORETERM) PostScript lua js write_png_image.c postscriptdir = $(pkgdatadir)/$(VERSION_MAJOR)/PostScript luadir = $(pkgdatadir)/$(VERSION_MAJOR)/lua jsdir = $(pkgdatadir)/$(VERSION_MAJOR)/js # List of terminal drivers, and list of postscript installation files # must be created prior to running automake ##trm-files-begin CORETERM = aed.trm ai.trm aquaterm.trm be.trm cairo.trm canvas.trm cgi.trm \ cgm.trm context.trm corel.trm debug.trm djsvga.trm dumb.trm dxf.trm \ dxy.trm eepic.trm emf.trm emxvga.trm epson.trm estimate.trm excl.trm \ fig.trm gd.trm ggi.trm gpic.trm grass.trm hp2648.trm hp26.trm hp500c.trm \ hpgl.trm hpljii.trm hppj.trm imagen.trm kyo.trm latex.trm linux.trm \ lua.trm mac.trm metafont.trm metapost.trm mif.trm next.trm openstep.trm \ pbm.trm pc.trm pdf.trm pm.trm post.trm pslatex.trm pstricks.trm qms.trm \ qt.trm regis.trm sun.trm svg.trm t410x.trm tek.trm texdraw.trm tgif.trm \ tkcanvas.trm tpic.trm unixpc.trm v384.trm vgagl.trm vws.trm win.trm \ wxt.trm x11.trm xlib.trm # postscript_DATA = PostScript/8859-15.ps PostScript/8859-1.ps \ PostScript/8859-2.ps PostScript/8859-9.ps PostScript/cp1250.ps \ PostScript/cp1251.ps PostScript/cp437.ps PostScript/cp850.ps \ PostScript/cp852.ps PostScript/koi8r.ps PostScript/koi8u.ps \ PostScript/prologue.ps PostScript/utf-8.ps PostScript/aglfn.txt js_DATA = js/canvasmath.js js/canvastext.js js/gnuplot_common.js \ js/gnuplot_dashedlines.js js/gnuplot_mouse.js js/gnuplot_svg.js \ js/grid.png js/help.png js/nextzoom.png js/previouszoom.png \ js/textzoom.png js/gnuplot_mouse.css js/README lua_DATA = lua/gnuplot-tikz.lua if BUILD_LUA build_lua = BUILD_LUA else build_lua = endif ##trm-files-end Makefile.am: Makefile.am.in rm -f $@ $@t sed -n '1,/^##trm-files-begin/p' $< > $@t echo CORETERM = *.trm | fmt | (tr '\012' @; echo) \ |sed 's/@$$/%/;s/@/ \\@/g' | tr @% '\012 ' \ >> $@t echo '#' >> $@t echo postscript_DATA = PostScript/*.ps PostScript/*.txt | fmt \ | (tr '\012' @; echo) |sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012 ' >> $@t echo js_DATA = js/*.js js/*.png js/*.css js/README | fmt \ | (tr '\012' @; echo) |sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012 ' >> $@t echo lua_DATA = lua/gnuplot-tikz.lua | fmt \ | (tr '\012' @; echo) |sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012 ' >> $@t echo if BUILD_LUA >> $@t echo build_lua = BUILD_LUA >> $@t echo else >> $@t echo build_lua = >> $@t echo endif >> $@t sed -n '/^##trm-files-end/,$$p' $< >> $@t chmod og-w $@t mv $@t $@ all: lua/gnuplot-tikz.help $(srcdir)/lua/gnuplot-tikz.help: $(srcdir)/lua/gnuplot-tikz.lua test -z "$(build_lua)" || (chmod u+w $@ && lua $< termhelp > $@) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/term/mif.trm��������������������������������������������������������������������������0000644�0004711�0000144�00000067723�10460036603�012414� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hello, Emacs, this is -*-C-*- * $Id: mif.trm,v 1.33 2006/07/21 02:35:47 sfeam Exp $ */ /* GNUPLOT -- mif.trm */ /*[ * Copyright 1992, 1993, 1998, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * This file is included by ../term.c. * * This terminal driver was developed for * gnuplot for unix version 3.0 (patchlevel 1) * gnuplot for unix version 3.2 (patchlevel 2) * * This terminal driver supports: * Frame Maker MIF format version 3.00 * * Options for this terminal driver (set terminal mif [options]): * colour / Draw primitives with line types >= 0 in colour (sep. 2-7) * monochrome Draw primitives in black (sep. 0) * * polyline / Draw lines as continuous curves * vectors Draw lines as collections of vectors * * help / ? Print short usage description on stderr * * Properties for this terminal driver: * -Gnuplot size of worksheet: MIF_XMAX * MIF_YMAX * -Unit in MIF output: cm * -Plot primitives with the same pen will * be grouped in the same MIF group. * -Plot primitives with line types >= 0 * will as default be drawn in colour. * -Lines are plotted as collections of * vectors, or as continuous lines (default) * -Plot primitives in a plot will be in a * Frame in MIF. Several plot Frames will * be collected in one large Frame. * -Point size of MIF output characters: MIF_PSIZE * -Used font for MIF output characters: Times * -Supports vertical text * -points and dots as characters * -character formats for TextLines * * AUTHORS: * Olof Franksson, Physics IV, KTH, S-100 44 Stockholm, Sweden * * NEW TERMINAL FORMAT: David C. Schooley * COMMENTS: * Send comments and/or suggestions to olof@fysik4.kth.se * * CHANGES: * Changed to new terminal format 9/29/95 schooley@ee.gatech.edu * Changed order of routine declarations. olof@fysik4.kth.se * Changed mechanism for pen pattern selection. kssingvo@immd4.informatik.uni-erlangen.de * Support for vertical text. kssingvo@immd4.informatik.uni-erlangen.de * Fixed plot bug for "set size XS,YS", XS/YS > 1. olof@fysik4.kth.se * Support colored text merritt@u.washington.edu * Support box fill and pattern fill merritt@u.washington.edu * */ #include "driver.h" #ifdef TERM_REGISTER register_term(mif) #endif #ifdef TERM_PROTO TERM_PUBLIC void MIF_init __PROTO((void)); TERM_PUBLIC void MIF_graphics __PROTO((void)); TERM_PUBLIC void MIF_text __PROTO((void)); TERM_PUBLIC void MIF_linetype __PROTO((int linetype)); TERM_PUBLIC void MIF_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void MIF_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void MIF_put_text __PROTO((unsigned int x, unsigned int y, const char *str)); TERM_PUBLIC int MIF_text_angle __PROTO((int ang)); TERM_PUBLIC void MIF_reset __PROTO((void)); TERM_PUBLIC void MIF_options __PROTO((void)); TERM_PUBLIC int MIF_justify_text __PROTO((enum JUSTIFY mode)); TERM_PUBLIC void MIF_point __PROTO((unsigned int x, unsigned int y, int number)); TERM_PUBLIC void MIF_boxfill __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); TERM_PUBLIC void MIF_filled_polygon __PROTO((int points, gpiPoint* corners)); /** Coordinates **/ /* The cast to float is not necessary because we are dividing by a float */ /* On OSK the cast to a float is not allowed in a constant expression wich */ /* is used by the declaration and initialization of mif_line */ /* Converts gnuplot units to MIF units */ #define GNP_TO_MIF(P) ((P) / 1000.0) /* Basic unit: 0.01 mm (15cm -> 15*10*100=15000) */ #define MIF_XMAX 15000 /* Basic unit: 0.01 mm (10cm -> 10*10*100=10000) */ #define MIF_YMAX 10000 #define MIF_XLAST (MIF_XMAX - 1) #define MIF_YLAST (MIF_YMAX - 1) static int insert_mif_line __PROTO((double fx, double fy)); static int proc_group_id __PROTO((int group_id)); static void free_mif_line __PROTO((void)); static void put_mif_line __PROTO((void)); static void MIF_set_font __PROTO((const char *)); static void mif_put_point __PROTO((unsigned int x, unsigned int y, int np)); #endif #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY #ifndef cfree # define cfree free #endif static struct mif_line { /* Line point structure specification */ float fpos_x; /* Line point X coordinate */ float fpos_y; /* Y coordinate */ struct mif_line *next; /* Pointer to next line point */ struct mif_line *prev; /* Pointer to previous line point */ } mif_line = { /* Current position structure. Adjust for orign. Local for this file. */ GNP_TO_MIF(0), GNP_TO_MIF(MIF_YLAST), &mif_line, &mif_line }; /** Characters **/ #define MIF_PSIZE 9 /* Point size of used characters */ #define MIF_VCHAR (MIF_YMAX/31) /* Distance between rows (a guess) */ #define MIF_HCHAR (MIF_XMAX/95) /* Distance between characters (a guess) */ /** Scale marks **/ #define MIF_VTIC (MIF_YMAX/150) /* Size of scale mark (vert) */ #define MIF_HTIC (MIF_XMAX/225) /* Size of scale mark (hor) */ /** Drawing properties **/ static char mif_justify[64]; /* How to justify the used text */ static char mif_pen[64], mif_pen_width[64], mif_separation[64]; /* How to plot */ static char mif_textcolor[64]; /* EAM parallels separation */ static int mif_text_ang = 0; /* Rotation angle of text */ static int mif_fill_patterns[] = {7,12,3,0,9,8,14,13}; #define MIF_FILL_SOLID 0 #define MIF_FILL_NONE 15 #define MIF_NPENS 16 /* Number of MIF pen types */ static int mif_pentype = 0; /* Pen type to use. Also used to create groups for graphics */ #define MIF_PEN_TO_GROUP(P) ( 1 + (P) ) /* Map pen type to group number. Must be >= 1 */ static int mif_pattern_table[MIF_NPENS] = { /* Table, which pattern should be used for drawing */ 0, /* border */ 1, /* not used */ 2, 3, 4, 8, 12, 13, /* other lines: functions, data, ... (5 is used for grid; 6,7 is (nearly) invisible) */ 5, /* grid */ 9, 10, 11, 12, 13, 14, 15 /* not used */ }; /** MIF groups administration **/ #define MIF_NGROUP_ID 20 static struct mif_group_id { int group_existance; /* This group id should generate a MIF group */ #define MIF_GROUP_EXISTS 1 /* This group id should not generate a MIF group */ #define MIF_GROUP_NOT_EXISTS 0 int group_id; #define MIF_INVALID_GROUP_ID 0 /* An invalid MIF group ID */ } mif_group_id[MIF_NGROUP_ID]; /* List of used group ID:s and corresponding MIF groups existance */ /** Semaphores **/ static int mif_initialized = 0; /* != 0 when output is active */ static int mif_in_frame = 0; /* != 0 when inside a plot frame */ static int mif_frameno = -1; /* Current frame number */ static int mif_colour = TRUE; /* == TRUE when colour should be used */ static int mif_polyline = TRUE; /* == TRUE when lines are drawn as continuous curves */ struct mpt { /* point definition structure */ int chr; /* character for point */ float x_offset, y_offset; /* offset for vertical positioning */ char *font; /* font */ }; static char zgnuplot[] = "ZGnuplot"; /* character formats */ static char zgnuplotp[] = "ZGnuplotP"; static char zgnuplotd[] = "ZGnuplotD"; static const char *mif_font = NULL; /* actual character format */ static struct mpt mpt[POINT_TYPES + 1] = { /* point definition data */ {'.', 0.000, 0.005, zgnuplotd, /* dot */ }, {'G', 0.002, 0.084, zgnuplotp, /* diamond */ }, {';', 0.002, 0.084, zgnuplotp, /* plus */ }, {'n', 0.002, 0.084, zgnuplotp, /* box */ }, {'5', 0.002, 0.084, zgnuplotp, /* X */ }, {'s', 0.002, 0.062, zgnuplotp, /* triangle */ }, {'K', 0.005, 0.075, zgnuplotp, /* star */ }, }; /* diamond is offset 0, dot is offset -1 */ static struct mpt *mif_point = &(mpt[1]); /** Declaration of routine/s for internal use **/ static int insert_mif_line __PROTO((double fx, double fy)); static int proc_group_id __PROTO((int group_id)); enum MIF_id { MIF_MONOCHROME, MIF_COLOR, MIF_VECTORS, MIF_POLYLINE, MIF_HELP, MIF_OTHER }; static struct gen_table MIF_opts[] = { { "m$onochrome", MIF_MONOCHROME }, { "c$olor", MIF_COLOR }, { "c$olour", MIF_COLOR }, { "v$ectors", MIF_VECTORS }, { "p$olyline", MIF_POLYLINE }, { "h$elp", MIF_HELP }, { "?$", MIF_HELP }, { NULL, MIF_OTHER } }; /** Routine/s **/ /* Called when this terminal type is set in order to parse options */ TERM_PUBLIC void MIF_options() { while (!END_OF_COMMAND) { switch(lookup_table(&MIF_opts[0],c_token)) { /* Colour options */ case MIF_MONOCHROME: mif_colour = FALSE; c_token++; break; case MIF_COLOR: mif_colour = TRUE; c_token++; break; /* Curve options */ case MIF_VECTORS: mif_polyline = FALSE; c_token++; break; case MIF_POLYLINE: mif_polyline = TRUE; c_token++; break; /* Short help */ case MIF_HELP: case MIF_OTHER: default: fprintf(stderr, "\ Usage: set terminal mif [options]\n\ \toptions:\n\ \t\tcolour / Draw primitives with line types >= 0 in colour (sep. 2-7)\n\ \t\tmonochrome Draw primitives in black (sep. 0)\n\n\ \t\tpolyline / Draw lines as continuous curves\n\ \t\tvectors Draw lines as collections of vectors\n\n\ \t\thelp / ? Print short usage description on stderr\n"); c_token++; break; } } sprintf(term_options, "%s %s", (mif_colour == TRUE) ? "colour" : "monochrome", (mif_polyline == TRUE) ? "polyline" : "vectors"); } /* Deallocate the used line structure elements */ static void free_mif_line() { struct mif_line *tline; while (mif_line.prev != &mif_line) { /* Unlink */ tline = mif_line.prev; mif_line.prev = mif_line.prev->prev; mif_line.prev->next = &mif_line; /* Deallocate */ free(tline); } /* Make sure that the list will be empty */ mif_line.prev = &mif_line; mif_line.next = &mif_line; } /* Draw the pending line. Change current position. */ static void put_mif_line() { int np, i; struct mif_line *tline; /* Process if inside a Frame */ if (mif_initialized != 0 && mif_in_frame != 0) { /* Count the number of available points */ for (tline = mif_line.next, np = 1; tline != &mif_line; tline = tline->next, np++); /* Draw line (at least two points) */ if (np >= 2) { /* Line preamble */ fprintf(gpoutfile, "\t<PolyLine <GroupID %d> %s %s %s <Fill 15>\n", MIF_PEN_TO_GROUP(mif_pentype), mif_pen, mif_pen_width, mif_separation); /* Draw the line elements */ fprintf(gpoutfile, "\t\t<NumPoints %d> ", np); for (i = 0, tline = &mif_line; i < np; i++, tline = tline->next) { if (i % 4 == 0) fputs("\n\t\t", gpoutfile); fprintf(gpoutfile, "<Point %.3f %.3f> ", tline->fpos_x, tline->fpos_y); } /* Line post amble */ fputs("\n\t>\n", gpoutfile); /* Register the used group ID */ proc_group_id(MIF_PEN_TO_GROUP(mif_pentype)); /* Avoid to redraw this. The MIF system should remember it. */ mif_pen[0] = '\0'; mif_pen_width[0] = '\0'; mif_separation[0] = '\0'; /* Move current position to end of line */ mif_line.fpos_x = mif_line.prev->fpos_x; mif_line.fpos_y = mif_line.prev->fpos_y; /* Restore the line */ free_mif_line(); } } /* Line processed */ } /* Filled box support - Ethan Merritt <merritt@u.washington.edu> */ TERM_PUBLIC void MIF_boxfill(int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height) { int fill_pattern; int fillpar = style >> 4; style &= 0xf; switch (style) { default: case FS_EMPTY: fill_pattern = 7; break; case FS_SOLID: fill_pattern = MIF_FILL_SOLID; break; case FS_PATTERN:fill_pattern = mif_fill_patterns[fillpar % 8]; break; } /* Object preamble */ fprintf(gpoutfile, "\t<Rectangle <GroupID %d> %s\n", MIF_PEN_TO_GROUP(mif_pentype), mif_separation); /* Set fill type */ fprintf(gpoutfile, "\t\t<Fill %d>\n", fill_pattern); /* Draw the box */ fprintf(gpoutfile, "\t\t<ShapeRect %.3f %.3f %.3f %.3f>\n", GNP_TO_MIF(x1), GNP_TO_MIF(MIF_YLAST - (y1+height)), GNP_TO_MIF(width), GNP_TO_MIF(height)); /* End of object */ fputs("\n\t>\n", gpoutfile); /* Register the used group ID */ proc_group_id(MIF_PEN_TO_GROUP(mif_pentype)); } /* Filled polygon. Ethan Merritt <merritt@u.washington.edu> */ TERM_PUBLIC void MIF_filled_polygon(int points, gpiPoint* corners) { int i; /* Object preamble */ fprintf(gpoutfile, "\t<Polygon <GroupID %d>\n", MIF_PEN_TO_GROUP(mif_pentype)); /* Set fill type */ fprintf(gpoutfile, "\t\t<Fill %d>\n", MIF_FILL_SOLID); /* Draw the line elements */ fprintf(gpoutfile, "\t\t<NumPoints %d> ", points); for (i=0; i<points; i++) { fprintf(gpoutfile, "<Point %.3f %.3f> ", GNP_TO_MIF(corners[i].x), GNP_TO_MIF(MIF_YLAST - corners[i].y)); } /* End of object */ fputs("\n\t>\n", gpoutfile); /* Register the used group ID */ proc_group_id(MIF_PEN_TO_GROUP(mif_pentype)); } /* Draw a point */ static void mif_put_point(unsigned int x, unsigned int y, int np) { /* Process if inside a Frame */ if (mif_initialized != 0 && mif_in_frame != 0) { /* Draw pending line */ if (mif_polyline == TRUE) put_mif_line(); /* Adjust current position for text-graphics alignment */ MIF_move(x, y); /* center text */ MIF_justify_text(CENTRE); /* Draw the point */ fprintf(gpoutfile, "\t<TextLine <GroupID %d> %s\n", MIF_PEN_TO_GROUP(mif_pentype), mif_textcolor); MIF_set_font(mif_point[np].font); fprintf(gpoutfile, "\t\t<TLOrigin %.3f %.3f> %s <String `%c'>\n", mif_line.fpos_x + mif_point[np].x_offset, mif_line.fpos_y + mif_point[np].y_offset, mif_justify, mif_point[np].chr); fputs("\t>\n", gpoutfile); /* Register the used group ID */ proc_group_id(MIF_PEN_TO_GROUP(mif_pentype)); /* Avoid to redraw this. The MIF system should remember it. */ mif_justify[0] = '\0'; } /* Point processed */ } /* * draw points */ TERM_PUBLIC void MIF_point(unsigned int x, unsigned int y, int number) { if (number < 0) { /* dot */ number = -1; } else { /* point */ number %= POINT_TYPES; } mif_put_point(x, y, number); } /* Set up a MIF output file */ TERM_PUBLIC void MIF_init() { int i; /* Process if not inside a MIF file and Frame */ if (mif_initialized == 0 && mif_in_frame == 0) { /* Tell this terminal driver that the output is initialized and * no current frames are processed */ mif_initialized = 1; mif_in_frame = 0; /* Reset internal position */ free_mif_line(); mif_line.fpos_x = GNP_TO_MIF(0); mif_line.fpos_y = GNP_TO_MIF(MIF_YLAST); /* Reset drawing properties strings */ mif_pen[0] = '\0'; mif_pen_width[0] = '\0'; mif_separation[0] = '\0'; MIF_justify_text(LEFT); /* Reset group ID generator */ for (i = 0; i < MIF_NGROUP_ID; i++) { mif_group_id[i].group_id = MIF_INVALID_GROUP_ID; mif_group_id[i].group_existance = MIF_GROUP_NOT_EXISTS; } /* Identify ourselves */ /*bs show borders */ /* Setup a default environment to use */ fprintf(gpoutfile, "\ <MIFFile 3.00> # Generated by gnuplot version %s patchlevel %s; identifies this as a MIF file\n\ #\n\ # show borders\n\ <Document\n<DBordersOn Yes>\n>\n\ # Set a default pen pattern, pen width, unit and font for subsequent objects\n\ <Pen 0>\n\ <Fill 15>\n\ <PenWidth 0.5 pt>\n\ <Separation 0>\n\ <Units Ucm>\n\ <FontCatalog\n\ \t<Font <FTag `%s'><FFamily `Times'><FSize %d><FPlain Yes>>\n\ \t<Font <FTag `%s'><FFamily `ZapfDingbats'><FSize 7.0 pt><FPlain Yes>>\n\ \t<Font <FTag `%s'><FFamily `Symbol'><FSize 5.0 pt><FPlain Yes>>\n\ >\n\ #\n", gnuplot_version, gnuplot_patchlevel, zgnuplot, MIF_PSIZE, zgnuplotp, zgnuplotd); } /* MIF file created */ } /* Finish of a MIF output file */ TERM_PUBLIC void MIF_reset() { /* Process if inside a MIF file and not inside a Frame */ if (mif_initialized != 0 && mif_in_frame == 0) { /* Finish off the MIF file */ fputs("\ #\n\ # End of MIFFile\n", gpoutfile); /* Tell this terminal driver that the output is finished */ mif_initialized = 0; /* bs: reset frame number */ mif_frameno = -1; } /* MIF file finished */ } /* Start plotting a Frame (-> graphics mode) */ TERM_PUBLIC void MIF_graphics() { int i; /* Process if not inside a Frame */ if (mif_initialized != 0 && mif_in_frame == 0) { /* Tell that this terminal driver is working with a plot frame */ mif_in_frame = 1; /* Update frame number */ mif_frameno++; /* Set current position */ free_mif_line(); mif_line.fpos_x = GNP_TO_MIF(0); mif_line.fpos_y = GNP_TO_MIF(MIF_YLAST); /* Set drawing properties */ mif_pen[0] = '\0'; mif_pen_width[0] = '\0'; mif_separation[0] = '\0'; MIF_justify_text(LEFT); /* Reset group ID generator */ for (i = 0; i < MIF_NGROUP_ID; i++) { mif_group_id[i].group_id = MIF_INVALID_GROUP_ID; mif_group_id[i].group_existance = MIF_GROUP_NOT_EXISTS; } /* Frame preamble */ fprintf(gpoutfile, "\ #\n\ # Frame number %d with plot of graphics\n\ <Frame\n\ \t<Pen 15>\n\ \t<Fill 15>\n\ \t<PenWidth 0.5 pt>\n\ \t<Separation 0>\n\ \t<BRect 2.000 %.3f %.3f %.3f>\n\ \t<NSOffset 0.000>\n\ \t<BLOffset 0.000>\n", mif_frameno, ((float) mif_frameno) * GNP_TO_MIF(MIF_YMAX + 100), GNP_TO_MIF(MIF_XMAX), GNP_TO_MIF(MIF_YMAX)); } /* Frame created */ } /* Stop plotting a Frame (-> text mode) */ TERM_PUBLIC void MIF_text() { int i; /* Process if inside a Frame */ if (mif_initialized != 0 && mif_in_frame != 0) { /* Draw pending line */ if (mif_polyline == TRUE) put_mif_line(); /* Group the used plot primitives */ fputs("\ \t#\n\ \t# Group the the objects in groups to make the chart easier to manipulate\n\ \t# after it's imported into FrameMaker.\n", gpoutfile); for (i = 0; i < MIF_NGROUP_ID; i++) { if (mif_group_id[i].group_id != MIF_INVALID_GROUP_ID && mif_group_id[i].group_existance == MIF_GROUP_EXISTS) { fprintf(gpoutfile, "\ \t<Group\n\ \t\t<ID %d>\n\ \t>\n", mif_group_id[i].group_id); } } /* Frame post amble */ fprintf(gpoutfile, "\ >\n\ # End of Frame number %d\n\ #\n", mif_frameno); /* Tell that this terminal driver is not working with a plot frame */ mif_in_frame = 0; } /* Frame finshed */ } /* Select type of line in grapics */ /* NOTE: actually written to output the first time a primitive * is drawn AFTER this call */ /* -2=border, -1=X/Y-axis, 0-13=lines, and 14-=mapped back */ TERM_PUBLIC void MIF_linetype(int linetype) { /* Process if inside a Frame */ if (mif_initialized != 0 && mif_in_frame != 0) { /* Draw pending line */ if (mif_polyline == TRUE) put_mif_line(); /* Translate gnuplot pen types to MIF pen types */ if (linetype < 0) { /* Special lines */ if (linetype == LT_AXIS) { mif_pentype = 8 + MIF_NPENS; /* -1 */ if (mif_colour == TRUE) sprintf(mif_separation, " <Separation 0> "); } else { mif_pentype = 0 + MIF_NPENS; /* -2 or less */ if (mif_colour == TRUE) sprintf(mif_separation, " <Separation 0> "); } sprintf(mif_pen_width, " <PenWidth 1.0 pt> "); /* EAM - set text color to black */ sprintf(mif_textcolor, " <Font <FSeparation 0>> "); } else { /* Normal lines */ mif_pentype = (linetype) % MIF_NPENS; /* 0-(MIF_NPENS-1) */ sprintf(mif_pen_width, " <PenWidth 0.1 pt> "); if (mif_colour == TRUE) sprintf(mif_separation, " <Separation %d> ", 2 + (mif_pentype % 6)); /* 2-7 */ /* EAM - set text color also */ if (mif_colour == TRUE) sprintf(mif_textcolor, " <Font <FSeparation %d>> ", 2 + (mif_pentype % 6)); /* 2-7 */ } /* Set pen type */ sprintf(mif_pen, " <Pen %d> ", mif_pattern_table[mif_pentype % MIF_NPENS]); } /* Primitive processed */ } /* Allow arbitrary text rotation */ TERM_PUBLIC int MIF_text_angle(int ang) { mif_text_ang = ang; return (TRUE); } /* Justify following text lines (MIF_put_text()) relative to the * insertion point * NOTE: actually written to output in text primitives which are * drawn AFTER this call */ TERM_PUBLIC int MIF_justify_text(enum JUSTIFY mode) { int rval = TRUE; /* Process if inside a Frame */ if (mif_initialized != 0 && mif_in_frame != 0) { switch (mode) { case LEFT: sprintf(mif_justify, " <TLAlignment Left> "); break; case CENTRE: sprintf(mif_justify, " <TLAlignment Center> "); break; case RIGHT: sprintf(mif_justify, " <TLAlignment Right> "); break; default: rval = FALSE; break; } } /* Primitive processed */ else { rval = FALSE; } return (rval); } /* Draw a vector from current position to (x, y) and change current position. * NOTE: actually written to output the first time another primitive * is called AFTER this call */ TERM_PUBLIC void MIF_vector(unsigned int x, unsigned int y) { /* Process if inside a Frame */ if (mif_initialized != 0 && mif_in_frame != 0) { /* Setup the vector as a part of the line */ insert_mif_line(GNP_TO_MIF(x), GNP_TO_MIF(MIF_YLAST - (int) y)); /* Draw pending line -> vector */ if (mif_polyline == FALSE) put_mif_line(); } /* Vector processed */ } /* Move current position */ TERM_PUBLIC void MIF_move(unsigned int x, unsigned int y) { /* Process if inside a Frame */ if (mif_initialized != 0 && mif_in_frame != 0) { /* Draw pending line */ if (mif_polyline == TRUE) put_mif_line(); mif_line.fpos_x = GNP_TO_MIF(x); mif_line.fpos_y = GNP_TO_MIF(MIF_YLAST - (int) y); } } /* set font */ static void MIF_set_font(const char *font) { if (font != mif_font) { fprintf(gpoutfile, "\t\t<Font\n\t\t\t<FTag `%s'>\n\t\t>\n", font); mif_font = font; } } /* Draw the text string str at (x, y). Adjust according to MIF_justify_text(). * Change current position. */ TERM_PUBLIC void MIF_put_text(unsigned int x, unsigned int y, const char str[]) { /* Process if inside a Frame */ if (mif_initialized != 0 && mif_in_frame != 0) { /* Draw pending line */ if (mif_polyline == TRUE) put_mif_line(); /* Adjust current position for text-graphics alignment */ MIF_move(x, y - MIF_VCHAR / 5); if (strlen(str) > 0) { /* Draw the text */ fprintf(gpoutfile, "\t<TextLine <GroupID %d> %s %s %s %s\n", MIF_PEN_TO_GROUP(mif_pentype), mif_pen, mif_pen_width, mif_separation, mif_textcolor); MIF_set_font(zgnuplot); fprintf(gpoutfile, "\ \t\t<TLOrigin %.3f %.3f> %s <Angle %d> <String `%s'>\n\ \t>\n", mif_line.fpos_x, mif_line.fpos_y, mif_justify, mif_text_ang, str); /* Register the used group ID */ proc_group_id(MIF_PEN_TO_GROUP(mif_pentype)); /* Avoid to redraw this. The MIF system should remember it. */ mif_pen[0] = '\0'; mif_pen_width[0] = '\0'; mif_separation[0] = '\0'; mif_justify[0] = '\0'; /* Independent of linetype */ } } /* Text processed */ } /* Insert one point in the line */ static int insert_mif_line(double fx, double fy) { int rval = TRUE; if ((mif_line.prev->next = (struct mif_line *) gp_alloc(sizeof(struct mif_line), "MIF driver")) != (struct mif_line *) NULL) { /* Link */ mif_line.prev->next->next = &mif_line; mif_line.prev->next->prev = mif_line.prev; mif_line.prev = mif_line.prev->next; /* Fill */ mif_line.prev->fpos_x = fx; mif_line.prev->fpos_y = fy; rval = TRUE; } else { /* Failed to allocate */ /* Relink */ mif_line.prev->next = &mif_line; rval = FALSE; } return (rval); } /* Register group ID. Update group ID existance. */ /* Returns: 1 group_id belongs to a MIF group 0 group_id does not belong to a MIF group -1 not inside a Frame -2 group ID list is full */ static int proc_group_id(int group_id) { int i, rval = 0; /* Process if inside a Frame */ if (mif_initialized != 0 && mif_in_frame != 0) { /* Find out the group ID, or a free group ID slot index. */ for (i = 0; i < MIF_NGROUP_ID && mif_group_id[i].group_id != MIF_INVALID_GROUP_ID && mif_group_id[i].group_id != group_id; i++) { /* Don't check the group_existance variable */ } if (i < MIF_NGROUP_ID) { if (mif_group_id[i].group_id == MIF_INVALID_GROUP_ID) { /* Register as new group ID for eventual use as MIF group */ mif_group_id[i].group_id = group_id; mif_group_id[i].group_existance = MIF_GROUP_NOT_EXISTS; } else { /* If second use of this group ID -> create a new MIF group */ if (mif_group_id[i].group_id == group_id) { mif_group_id[i].group_existance = MIF_GROUP_EXISTS; /* NOTE: a group MUST have at least two members. */ rval = 1; } } } else { rval = -2; /* No place for this group ID in the list */ } } /* Group ID processed */ else { rval = -1; /* Not inside a Frame */ } /* Return MIF group status */ return (rval); } #endif #ifdef TERM_TABLE TERM_TABLE_START(mif_driver) "mif", "Frame maker MIF 3.00 format", MIF_XMAX, MIF_YMAX, MIF_VCHAR, MIF_HCHAR, MIF_VTIC, MIF_HTIC, MIF_options, MIF_init, MIF_reset, MIF_text, null_scale, MIF_graphics, MIF_move, MIF_vector, MIF_linetype, MIF_put_text, MIF_text_angle, MIF_justify_text, MIF_point, do_arrow, set_font_null, 0, /* pointsize */ 0, /* flags */ 0, 0, /* suspend, resume */ MIF_boxfill, 0 /* linewidth */ #ifdef USE_MOUSE , 0, 0, 0, 0, 0 #endif ,0 /* make_palette */ ,0 /* previous_palette */ ,0 /* set_color */ ,MIF_filled_polygon /* filled_polygon */ TERM_TABLE_END(mif_driver) #undef LAST_TERM #define LAST_TERM mif_driver #endif #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(mif) "1 mif", "?commands set terminal mif", "?set terminal mif", "?set term mif", "?terminal mif", "?term mif", "?mif", " The `mif` terminal driver produces Frame Maker MIF format version 3.00. It", " plots in MIF Frames with the size 15*10 cm, and plot primitives with the same", " pen will be grouped in the same MIF group. Plot primitives in a `gnuplot`", " page will be plotted in a MIF Frame, and several MIF Frames are collected in", " one large MIF Frame. The MIF font used for text is \"Times\".", "", " Several options may be set in the MIF 3.00 driver.", "", " Syntax:", " set terminal mif {color | colour | monochrome} {polyline | vectors}", " {help | ?}", "", " `colour` plots lines with line types >= 0 in colour (MIF sep. 2--7) and", " `monochrome` plots all line types in black (MIF sep. 0).", " `polyline` plots curves as continuous curves and `vectors` plots curves as", " collections of vectors.", " `help` and `?` print online help on standard error output---both print a", " short description of the usage; `help` also lists the options.", "", " Examples:", " set term mif colour polylines # defaults", " set term mif # defaults", " set term mif vectors", " set term mif help" END_HELP(mif) #endif /* TERM_HELP */ ���������������������������������������������gnuplot-4.6.4/src/����������������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340010�010703� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/specfun.c�������������������������������������������������������������������������0000644�0004711�0000144�00000166365�11646146725�012564� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: specfun.c,v 1.47 2011/10/15 00:03:33 sfeam Exp $"); } #endif /* GNUPLOT - specfun.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Original Software: * Jos van der Woude, jvdwoude@hut.nl * */ /* FIXME: * plain comparisons of floating point numbers! */ #include "specfun.h" #include "stdfn.h" #include "util.h" #define ITMAX 200 #ifdef FLT_EPSILON # define MACHEPS FLT_EPSILON /* 1.0E-08 */ #else # define MACHEPS 1.0E-08 #endif #ifndef E_MINEXP /* AS239 value, e^-88 = 2^-127 */ #define E_MINEXP (-88.0) #endif #ifndef E_MAXEXP #define E_MAXEXP (-E_MINEXP) #endif #ifdef FLT_MAX # define OFLOW FLT_MAX /* 1.0E+37 */ #else # define OFLOW 1.0E+37 #endif /* AS239 value for igamma(a,x>=XBIG) = 1.0 */ #define XBIG 1.0E+08 /* * Mathematical constants */ #define LNPI 1.14472988584940016 #define LNSQRT2PI 0.9189385332046727 #ifdef PI # undef PI #endif #define PI 3.14159265358979323846 #define PNT68 0.6796875 #define SQRT_TWO 1.41421356237309504880168872420969809 /* JG */ /* Prefer lgamma */ #ifndef GAMMA # ifdef HAVE_LGAMMA # define GAMMA(x) lgamma (x) # elif defined(HAVE_GAMMA) # define GAMMA(x) gamma (x) # else # undef GAMMA # endif #endif #if defined(GAMMA) && !HAVE_DECL_SIGNGAM extern int signgam; /* this is not always declared in math.h */ #endif /* Local function declarations, not visible outside this file */ static int mtherr __PROTO((char *, int)); static double polevl __PROTO((double x, const double coef[], int N)); static double p1evl __PROTO((double x, const double coef[], int N)); static double confrac __PROTO((double a, double b, double x)); static double ibeta __PROTO((double a, double b, double x)); static double humlik __PROTO((double x, double y)); static double igamma __PROTO((double a, double x)); static double ranf __PROTO((struct value * init)); static double inverse_error_func __PROTO((double p)); static double inverse_normal_func __PROTO((double p)); static double lambertw __PROTO((double x)); static double airy_neg __PROTO(( double x )); static double airy_pos __PROTO((double x)); static double expint __PROTO((double n, double x)); #ifndef GAMMA static int ISNAN __PROTO((double x)); static int ISFINITE __PROTO((double x)); static double lngamma __PROTO((double z)); #endif #ifndef HAVE_ERF static double erf __PROTO((double a)); #endif #ifndef HAVE_ERFC static double erfc __PROTO((double a)); #endif /* Macros to configure routines taken from CEPHES: */ /* Unknown arithmetic, invokes coefficients given in * normal decimal format. Beware of range boundary * problems (MACHEP, MAXLOG, etc. in const.c) and * roundoff problems in pow.c: * (Sun SPARCstation) */ #define UNK 1 /* Define to support tiny denormal numbers, else undefine. */ #define DENORMAL 1 /* Define to ask for infinity support, else undefine. */ #define INFINITIES 1 /* Define to ask for support of numbers that are Not-a-Number, else undefine. This may automatically define INFINITIES in some files. */ #define NANS 1 /* Define to distinguish between -0.0 and +0.0. */ #define MINUSZERO 1 /* Cephes Math Library Release 2.0: April, 1987 Copyright 1984, 1987 by Stephen L. Moshier Direct inquiries to 30 Frost Street, Cambridge, MA 02140 */ static int merror = 0; /* Notice: the order of appearance of the following messages cannot be bound * to error codes defined in mconf.h or math.h or similar, as these files are * not available on every platform. Thus, enumerate them explicitly. */ #define MTHERR_DOMAIN 1 #define MTHERR_SING 2 #define MTHERR_OVERFLOW 3 #define MTHERR_UNDERFLOW 4 #define MTHERR_TLPREC 5 #define MTHERR_PLPREC 6 static int mtherr(char *name, int code) { static const char *ermsg[7] = { "unknown", /* error code 0 */ "domain", /* error code 1 */ "singularity", /* et seq. */ "overflow", "underflow", "total loss of precision", "partial loss of precision" }; /* Display string passed by calling program, * which is supposed to be the name of the * function in which the error occurred: */ printf("\n%s ", name); /* Set global error message word */ merror = code; /* Display error message defined by the code argument. */ if ((code <= 0) || (code >= 7)) code = 0; printf("%s error\n", ermsg[code]); /* Return to calling program */ return (0); } /* polevl.c * p1evl.c * * Evaluate polynomial * * * * SYNOPSIS: * * int N; * double x, y, coef[N+1], polevl[]; * * y = polevl( x, coef, N ); * * * * DESCRIPTION: * * Evaluates polynomial of degree N: * * 2 N * y = C + C x + C x +...+ C x * 0 1 2 N * * Coefficients are stored in reverse order: * * coef[0] = C , ..., coef[N] = C . * N 0 * * The function p1evl() assumes that coef[N] = 1.0 and is * omitted from the array. Its calling arguments are * otherwise the same as polevl(). * * * SPEED: * * In the interest of speed, there are no checks for out * of bounds arithmetic. This routine is used by most of * the functions in the library. Depending on available * equipment features, the user may wish to rewrite the * program in microcode or assembly language. * */ /* Cephes Math Library Release 2.1: December, 1988 Copyright 1984, 1987, 1988 by Stephen L. Moshier Direct inquiries to 30 Frost Street, Cambridge, MA 02140 */ static double polevl(double x, const double coef[], int N) { double ans; int i; const double *p; p = coef; ans = *p++; i = N; do ans = ans * x + *p++; while (--i); return (ans); } /* N * Evaluate polynomial when coefficient of x is 1.0. * Otherwise same as polevl. */ static double p1evl(double x, const double coef[], int N) { double ans; const double *p; int i; p = coef; ans = x + *p++; i = N - 1; do ans = ans * x + *p++; while (--i); return (ans); } #ifndef GAMMA /* Provide GAMMA function for those who do not already have one */ int sgngam; static int ISNAN(double x) { volatile double a = x; if (a != a) return 1; return 0; } static int ISFINITE(double x) { volatile double a = x; if (a < DBL_MAX) return 1; return 0; } double lngamma(double x) { /* A[]: Stirling's formula expansion of log gamma * B[], C[]: log gamma function between 2 and 3 */ #ifdef UNK static const double A[] = { 8.11614167470508450300E-4, -5.95061904284301438324E-4, 7.93650340457716943945E-4, -2.77777777730099687205E-3, 8.33333333333331927722E-2 }; static const double B[] = { -1.37825152569120859100E3, -3.88016315134637840924E4, -3.31612992738871184744E5, -1.16237097492762307383E6, -1.72173700820839662146E6, -8.53555664245765465627E5 }; static const double C[] = { /* 1.00000000000000000000E0, */ -3.51815701436523470549E2, -1.70642106651881159223E4, -2.20528590553854454839E5, -1.13933444367982507207E6, -2.53252307177582951285E6, -2.01889141433532773231E6 }; /* log( sqrt( 2*pi ) ) */ static const double LS2PI = 0.91893853320467274178; #define MAXLGM 2.556348e305 #endif /* UNK */ #ifdef DEC static const unsigned short A[] = { 0035524, 0141201, 0034633, 0031405, 0135433, 0176755, 0126007, 0045030, 0035520, 0006371, 0003342, 0172730, 0136066, 0005540, 0132605, 0026407, 0037252, 0125252, 0125252, 0125132 }; static const unsigned short B[] = { 0142654, 0044014, 0077633, 0035410, 0144027, 0110641, 0125335, 0144760, 0144641, 0165637, 0142204, 0047447, 0145215, 0162027, 0146246, 0155211, 0145322, 0026110, 0010317, 0110130, 0145120, 0061472, 0120300, 0025363 }; static const unsigned short C[] = { /*0040200,0000000,0000000,0000000*/ 0142257, 0164150, 0163630, 0112622, 0143605, 0050153, 0156116, 0135272, 0144527, 0056045, 0145642, 0062332, 0145213, 0012063, 0106250, 0001025, 0145432, 0111254, 0044577, 0115142, 0145366, 0071133, 0050217, 0005122 }; /* log( sqrt( 2*pi ) ) */ static const unsigned short LS2P[] = {040153, 037616, 041445, 0172645,}; #define LS2PI *(double *)LS2P #define MAXLGM 2.035093e36 #endif /* DEC */ #ifdef IBMPC static const unsigned short A[] = { 0x6661, 0x2733, 0x9850, 0x3f4a, 0xe943, 0xb580, 0x7fbd, 0xbf43, 0x5ebb, 0x20dc, 0x019f, 0x3f4a, 0xa5a1, 0x16b0, 0xc16c, 0xbf66, 0x554b, 0x5555, 0x5555, 0x3fb5 }; static const unsigned short B[] = { 0x6761, 0x8ff3, 0x8901, 0xc095, 0xb93e, 0x355b, 0xf234, 0xc0e2, 0x89e5, 0xf890, 0x3d73, 0xc114, 0xdb51, 0xf994, 0xbc82, 0xc131, 0xf20b, 0x0219, 0x4589, 0xc13a, 0x055e, 0x5418, 0x0c67, 0xc12a }; static const unsigned short C[] = { /*0x0000,0x0000,0x0000,0x3ff0,*/ 0x12b2, 0x1cf3, 0xfd0d, 0xc075, 0xd757, 0x7b89, 0xaa0d, 0xc0d0, 0x4c9b, 0xb974, 0xeb84, 0xc10a, 0x0043, 0x7195, 0x6286, 0xc131, 0xf34c, 0x892f, 0x5255, 0xc143, 0xe14a, 0x6a11, 0xce4b, 0xc13e }; /* log( sqrt( 2*pi ) ) */ static const unsigned short LS2P[] = { 0xbeb5, 0xc864, 0x67f1, 0x3fed }; #define LS2PI *(double *)LS2P #define MAXLGM 2.556348e305 #endif /* IBMPC */ #ifdef MIEEE static const unsigned short A[] = { 0x3f4a, 0x9850, 0x2733, 0x6661, 0xbf43, 0x7fbd, 0xb580, 0xe943, 0x3f4a, 0x019f, 0x20dc, 0x5ebb, 0xbf66, 0xc16c, 0x16b0, 0xa5a1, 0x3fb5, 0x5555, 0x5555, 0x554b }; static const unsigned short B[] = { 0xc095, 0x8901, 0x8ff3, 0x6761, 0xc0e2, 0xf234, 0x355b, 0xb93e, 0xc114, 0x3d73, 0xf890, 0x89e5, 0xc131, 0xbc82, 0xf994, 0xdb51, 0xc13a, 0x4589, 0x0219, 0xf20b, 0xc12a, 0x0c67, 0x5418, 0x055e }; static const unsigned short C[] = { 0xc075, 0xfd0d, 0x1cf3, 0x12b2, 0xc0d0, 0xaa0d, 0x7b89, 0xd757, 0xc10a, 0xeb84, 0xb974, 0x4c9b, 0xc131, 0x6286, 0x7195, 0x0043, 0xc143, 0x5255, 0x892f, 0xf34c, 0xc13e, 0xce4b, 0x6a11, 0xe14a }; /* log( sqrt( 2*pi ) ) */ static const unsigned short LS2P[] = { 0x3fed, 0x67f1, 0xc864, 0xbeb5 }; #define LS2PI *(double *)LS2P #define MAXLGM 2.556348e305 #endif /* MIEEE */ static const double LOGPI = 1.1447298858494001741434273513530587116472948129153; double p, q, u, w, z; int i; sgngam = 1; #ifdef NANS if (ISNAN(x)) return (x); #endif #ifdef INFINITIES if (!ISFINITE((x))) return (DBL_MAX * DBL_MAX); #endif if (x < -34.0) { q = -x; w = lngamma(q); /* note this modifies sgngam! */ p = floor(q); if (p == q) { lgsing: #ifdef INFINITIES mtherr("lngamma", MTHERR_SING); return (DBL_MAX * DBL_MAX); #else goto loverf; #endif } i = p; if ((i & 1) == 0) sgngam = -1; else sgngam = 1; z = q - p; if (z > 0.5) { p += 1.0; z = p - q; } z = q * sin(PI * z); if (z == 0.0) goto lgsing; /* z = log(PI) - log( z ) - w;*/ z = LOGPI - log(z) - w; return (z); } if (x < 13.0) { z = 1.0; p = 0.0; u = x; while (u >= 3.0) { p -= 1.0; u = x + p; z *= u; } while (u < 2.0) { if (u == 0.0) goto lgsing; z /= u; p += 1.0; u = x + p; } if (z < 0.0) { sgngam = -1; z = -z; } else sgngam = 1; if (u == 2.0) return (log(z)); p -= 2.0; x = x + p; p = x * polevl(x, B, 5) / p1evl(x, C, 6); return (log(z) + p); } if (x > MAXLGM) { #ifdef INFINITIES return (sgngam * (DBL_MAX * DBL_MAX)); #else loverf: mtherr("lngamma", MTHERR_OVERFLOW); return (sgngam * MAXNUM); #endif } q = (x - 0.5) * log(x) - x + LS2PI; if (x > 1.0e8) return (q); p = 1.0 / (x * x); if (x >= 1000.0) q += ((7.9365079365079365079365e-4 * p - 2.7777777777777777777778e-3) * p + 0.0833333333333333333333) / x; else q += polevl(p, A, 4) / x; return (q); } #define GAMMA(x) lngamma ((x)) /* HBB 20030816: must override name of sgngam so f_gamma() uses it */ #define signgam sgngam #endif /* !GAMMA */ /* * Make all the following internal routines f_whatever() perform * autoconversion from string to numeric value. */ #define pop(x) pop_or_convert_from_string(x) void f_erf(union argument *arg) { struct value a; double x; (void) arg; /* avoid -Wunused warning */ x = real(pop(&a)); x = erf(x); push(Gcomplex(&a, x, 0.0)); } void f_erfc(union argument *arg) { struct value a; double x; (void) arg; /* avoid -Wunused warning */ x = real(pop(&a)); x = erfc(x); push(Gcomplex(&a, x, 0.0)); } void f_ibeta(union argument *arg) { struct value a; double x; double arg1; double arg2; (void) arg; /* avoid -Wunused warning */ x = real(pop(&a)); arg2 = real(pop(&a)); arg1 = real(pop(&a)); x = ibeta(arg1, arg2, x); if (x == -1.0) { undefined = TRUE; push(Ginteger(&a, 0)); } else push(Gcomplex(&a, x, 0.0)); } void f_igamma(union argument *arg) { struct value a; double x; double arg1; (void) arg; /* avoid -Wunused warning */ x = real(pop(&a)); arg1 = real(pop(&a)); x = igamma(arg1, x); if (x == -1.0) { undefined = TRUE; push(Ginteger(&a, 0)); } else push(Gcomplex(&a, x, 0.0)); } void f_gamma(union argument *arg) { double y; struct value a; (void) arg; /* avoid -Wunused warning */ y = GAMMA(real(pop(&a))); if (y > E_MAXEXP) { undefined = TRUE; push(Ginteger(&a, 0)); } else push(Gcomplex(&a, signgam * gp_exp(y), 0.0)); } void f_lgamma(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ push(Gcomplex(&a, GAMMA(real(pop(&a))), 0.0)); } #ifndef BADRAND void f_rand(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ push(Gcomplex(&a, ranf(pop(&a)), 0.0)); } #else /* BADRAND */ /* Use only to observe the effect of a "bad" random number generator. */ void f_rand(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ static unsigned int y = 0; unsigned int maxran = 1000; (void) real(pop(&a)); y = (781 * y + 387) % maxran; push(Gcomplex(&a, (double) y / maxran, 0.0)); } #endif /* BADRAND */ void f_voigt(union argument *arg) { struct value a; double x,y; (void) arg; /* avoid -Wunused warning */ y = real(pop(&a)); x = real(pop(&a)); push(Gcomplex(&a, humlik(x, y), 0.0)); } /* * Calculate the Voigt/Faddeeva function with relative error less than 10^(-4). * (see http://www.atm.ox.ac.uk/user/wells/voigt.html) * * K(x,y) = \frac{y}{\pi} \int{\frac{e^{t^2}}{(x-t)^2+y^2}}dt * * arguments: * x, y - real and imaginary components of complex argument * return value * real value K(x,y) * * Algorithm: Josef Humlíček JQSRT 27 (1982) pp 437 * Fortran program by J.R. Wells JQSRT 62 (1999) pp 29-48. * Translated to C++ with f2c program and modified by Marcin Wojdyr * Minor adaptations from C++ to C by E. Stambulchik * Adapted for gnuplot by Tommaso Vinci */ static double humlik(double x, double y) { const double c[6] = { 1.0117281, -0.75197147, 0.012557727, 0.010022008, -2.4206814e-4, 5.0084806e-7 }; const double s[6] = { 1.393237, 0.23115241, -0.15535147, 0.0062183662, 9.1908299e-5, -6.2752596e-7 }; const double t[6] = { 0.31424038, 0.94778839, 1.5976826, 2.2795071, 3.020637, 3.8897249 }; const double rrtpi = 0.56418958; /* 1/SQRT(pi) */ double a0, d0, d2, e0, e2, e4, h0, h2, h4, h6, p0, p2, p4, p6, p8, z0, z2, z4, z6, z8; double mf[6], pf[6], mq[6], pq[6], xm[6], ym[6], xp[6], yp[6]; bool rg1, rg2, rg3; double xlim0, xlim1, xlim2, xlim3, xlim4; double yq, yrrtpi; double abx, xq; double k; yq = y * y; yrrtpi = y * rrtpi; rg1 = true, rg2 = true, rg3 = true; abx = fabs(x); xq = abx * abx; if (y >= 70.55) return yrrtpi / (xq + yq); xlim0 = sqrt(y * (40. - y * 3.6) + 15100.); xlim1 = (y >= 8.425 ? 0. : sqrt(164. - y * (y * 1.8 + 4.3))); xlim2 = 6.8 - y; xlim3 = y * 2.4; xlim4 = y * 18.1 + 1.65; if (y <= 1e-6) xlim2 = xlim1 = xlim0; if (abx >= xlim0) /* Region 0 algorithm */ return yrrtpi / (xq + yq); else if (abx >= xlim1) { /* Humlicek W4 Region 1 */ if (rg1) { /* First point in Region 1 */ rg1 = false; a0 = yq + 0.5; /* Region 1 y-dependents */ d0 = a0 * a0; d2 = yq + yq - 1.; } return rrtpi / (d0 + xq * (d2 + xq)) * y * (a0 + xq); } else if (abx > xlim2) { /* Humlicek W4 Region 2 */ if (rg2) { /* First point in Region 2 */ rg2 = false; /* Region 2 y-dependents */ h0 = yq * (yq * (yq * (yq + 6.) + 10.5) + 4.5) + 0.5625; h2 = yq * (yq * (yq * 4. + 6.) + 9.) - 4.5; h4 = 10.5 - yq * (6. - yq * 6.); h6 = yq * 4. - 6.; e0 = yq * (yq * (yq + 5.5) + 8.25) + 1.875; e2 = yq * (yq * 3. + 1.) + 5.25; e4 = h6 * 0.75; } return rrtpi / (h0 + xq * (h2 + xq * (h4 + xq * (h6 + xq)))) * y * (e0 + xq * (e2 + xq * (e4 + xq))); } else if (abx < xlim3) { /* Humlicek W4 Region 3 */ if (rg3) { /* First point in Region 3 */ rg3 = false; /* Region 3 y-dependents */ z0 = y * (y * (y * (y * (y * (y * (y * (y * (y * (y + 13.3988) + 88.26741) + 369.1989) + 1074.409) + 2256.981) + 3447.629) + 3764.966) + 2802.87) + 1280.829) + 272.1014; z2 = y * (y * (y * (y * (y * (y * (y * (y * 5. + 53.59518) + 266.2987) + 793.4273) + 1549.675) + 2037.31) + 1758.336) + 902.3066) + 211.678; z4 = y * (y * (y * (y * (y * (y * 10. + 80.39278) + 269.2916) + 479.2576) + 497.3014) + 308.1852) + 78.86585; z6 = y * (y * (y * (y * 10. + 53.59518) + 92.75679) + 55.02933) + 22.03523; z8 = y * (y * 5. + 13.3988) + 1.49646; p0 = y * (y * (y * (y * (y * (y * (y * (y * (y * 0.3183291 + 4.264678) + 27.93941) + 115.3772) + 328.2151) + 662.8097) + 946.897) + 919.4955) + 549.3954) + 153.5168; p2 = y * (y * (y * (y * (y * (y * (y * 1.2733163 + 12.79458) + 56.81652) + 139.4665) + 189.773) + 124.5975) - 1.322256) - 34.16955; p4 = y * (y * (y * (y * (y * 1.9099744 + 12.79568) + 29.81482) + 24.01655) + 10.46332) + 2.584042; p6 = y * (y * (y * 1.273316 + 4.266322) + 0.9377051) - 0.07272979; p8 = y * .3183291 + 5.480304e-4; } return 1.7724538 / (z0 + xq * (z2 + xq * (z4 + xq * (z6 + xq * (z8 + xq))))) * (p0 + xq * (p2 + xq * (p4 + xq * (p6 + xq * p8)))); } else { /* Humlicek CPF12 algorithm */ double ypy0 = y + 1.5; double ypy0q = ypy0 * ypy0; int j; for (j = 0; j <= 5; ++j) { double d = x - t[j]; mq[j] = d * d; mf[j] = 1. / (mq[j] + ypy0q); xm[j] = mf[j] * d; ym[j] = mf[j] * ypy0; d = x + t[j]; pq[j] = d * d; pf[j] = 1. / (pq[j] + ypy0q); xp[j] = pf[j] * d; yp[j] = pf[j] * ypy0; } k = 0.; if (abx <= xlim4) /* Humlicek CPF12 Region I */ for (j = 0; j <= 5; ++j) k += c[j] * (ym[j]+yp[j]) - s[j] * (xm[j]-xp[j]); else { /* Humlicek CPF12 Region II */ double yf = y + 3.; for (j = 0; j <= 5; ++j) k += (c[j] * (mq[j] * mf[j] - ym[j] * 1.5) + s[j] * yf * xm[j]) / (mq[j] + 2.25) + (c[j] * (pq[j] * pf[j] - yp[j] * 1.5) - s[j] * yf * xp[j]) / (pq[j] + 2.25); k = y * k + exp(-xq); } return k; } } /* ** ibeta.c * * DESCRIBE Approximate the incomplete beta function Ix(a, b). * * _ * |(a + b) /x (a-1) (b-1) * Ix(a, b) = -_-------_--- * | t * (1 - t) dt (a,b > 0) * |(a) * |(b) /0 * * * * CALL p = ibeta(a, b, x) * * double a > 0 * double b > 0 * double x [0, 1] * * WARNING none * * RETURN double p [0, 1] * -1.0 on error condition * * XREF lngamma() * * BUGS This approximation is only accurate on the domain * x < (a-1)/(a+b-2) * * REFERENCE The continued fraction expansion as given by * Abramowitz and Stegun (1964) is used. * * Copyright (c) 1992 Jos van der Woude, jvdwoude@hut.nl * * Note: this function was translated from the Public Domain Fortran * version available from http://lib.stat.cmu.edu/apstat/xxx * */ static double ibeta(double a, double b, double x) { /* Test for admissibility of arguments */ if (a <= 0.0 || b <= 0.0) return -1.0; if (x < 0.0 || x > 1.0) return -1.0;; /* If x equals 0 or 1, return x as prob */ if (x == 0.0 || x == 1.0) return x; /* Swap a, b if necessary for more efficient evaluation */ if (a < x * (a + b)) { double temp = confrac(b, a, 1.0 - x); return (temp < 0.0) ? temp : 1.0 - temp; } else { return confrac(a, b, x); } } static double confrac(double a, double b, double x) { double Alo = 0.0; double Ahi; double Aev; double Aod; double Blo = 1.0; double Bhi = 1.0; double Bod = 1.0; double Bev = 1.0; double f; double fold; double Apb = a + b; double d; int i; int j; /* Set up continued fraction expansion evaluation. */ Ahi = gp_exp(GAMMA(Apb) + a * log(x) + b * log(1.0 - x) - GAMMA(a + 1.0) - GAMMA(b)); /* * Continued fraction loop begins here. Evaluation continues until * maximum iterations are exceeded, or convergence achieved. */ for (i = 0, j = 1, f = Ahi; i <= ITMAX; i++, j++) { d = a + j + i; Aev = -(a + i) * (Apb + i) * x / d / (d - 1.0); Aod = j * (b - j) * x / d / (d + 1.0); Alo = Bev * Ahi + Aev * Alo; Blo = Bev * Bhi + Aev * Blo; Ahi = Bod * Alo + Aod * Ahi; Bhi = Bod * Blo + Aod * Bhi; if (fabs(Bhi) < MACHEPS) Bhi = 0.0; if (Bhi != 0.0) { fold = f; f = Ahi / Bhi; if (fabs(f - fold) < fabs(f) * MACHEPS) return f; } } return -1.0; } /* ** igamma.c * * DESCRIBE Approximate the incomplete gamma function P(a, x). * * 1 /x -t (a-1) * P(a, x) = -_--- * | e * t dt (a > 0) * |(a) /0 * * CALL p = igamma(a, x) * * double a > 0 * double x >= 0 * * WARNING none * * RETURN double p [0, 1] * -1.0 on error condition * * XREF lngamma() * * BUGS Values 0 <= x <= 1 may lead to inaccurate results. * * REFERENCE ALGORITHM AS239 APPL. STATIST. (1988) VOL. 37, NO. 3 * * Copyright (c) 1992 Jos van der Woude, jvdwoude@hut.nl * * Note: this function was translated from the Public Domain Fortran * version available from http://lib.stat.cmu.edu/apstat/239 * */ static double igamma(double a, double x) { double arg; double aa; double an; double b; int i; /* Check that we have valid values for a and x */ if (x < 0.0 || a <= 0.0) return -1.0; /* Deal with special cases */ if (x == 0.0) return 0.0; if (x > XBIG) return 1.0; /* Check value of factor arg */ arg = a * log(x) - x - GAMMA(a + 1.0); /* HBB 20031006: removed a spurious check here */ arg = gp_exp(arg); /* Choose infinite series or continued fraction. */ if ((x > 1.0) && (x >= a + 2.0)) { /* Use a continued fraction expansion */ double pn1, pn2, pn3, pn4, pn5, pn6; double rn; double rnold; aa = 1.0 - a; b = aa + x + 1.0; pn1 = 1.0; pn2 = x; pn3 = x + 1.0; pn4 = x * b; rnold = pn3 / pn4; for (i = 1; i <= ITMAX; i++) { aa++; b += 2.0; an = aa * (double) i; pn5 = b * pn3 - an * pn1; pn6 = b * pn4 - an * pn2; if (pn6 != 0.0) { rn = pn5 / pn6; if (fabs(rnold - rn) <= GPMIN(MACHEPS, MACHEPS * rn)) return 1.0 - arg * rn * a; rnold = rn; } pn1 = pn3; pn2 = pn4; pn3 = pn5; pn4 = pn6; /* Re-scale terms in continued fraction if terms are large */ if (fabs(pn5) >= OFLOW) { pn1 /= OFLOW; pn2 /= OFLOW; pn3 /= OFLOW; pn4 /= OFLOW; } } } else { /* Use Pearson's series expansion. */ for (i = 0, aa = a, an = b = 1.0; i <= ITMAX; i++) { aa++; an *= x / aa; b += an; if (an < b * MACHEPS) return arg * b; } } return -1.0; } /*********************************************************************** double ranf(double init) Random number generator as a Function Returns a random floating point number from a uniform distribution over 0 - 1 (endpoints of this interval are not returned) using a large integer generator. This is a transcription from Pascal to Fortran of routine Uniform_01 from the paper L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package with Splitting Facilities." ACM Transactions on Mathematical Software, 17:98-111 (1991) Generate Large Integer Returns a random integer following a uniform distribution over (1, 2147483562) using the generator. This is a transcription from Pascal to Fortran of routine Random from the paper L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package with Splitting Facilities." ACM Transactions on Mathematical Software, 17:98-111 (1991) ***********************************************************************/ static double ranf(struct value *init) { long k, z; static int firsttime = 1; static long seed1, seed2; static const long Xm1 = 2147483563L; static const long Xm2 = 2147483399L; static const long Xa1 = 40014L; static const long Xa2 = 40692L; /* Seed values must be integer, but check for both values equal zero before casting for speed */ if (real(init) != 0.0 || imag(init) != 0.0) { /* Construct new seed values from input parameter */ long seed1cvrt = real(init); long seed2cvrt = imag(init); if ( real(init) != (double)seed1cvrt || imag(init) != (double)seed2cvrt || seed1cvrt > 017777777777L || seed2cvrt > 017777777777L || (seed1cvrt <= 0 && seed2cvrt != 0) || seed2cvrt < 0 ) int_error(NO_CARET,"Illegal seed value"); else if (seed1cvrt < 0) firsttime = 1; else { seed1 = seed1cvrt; seed2 = (seed2cvrt) ? seed2cvrt : seed1cvrt; firsttime = 0; } } /* (Re)-Initialize seeds if necessary */ if (firsttime) { firsttime = 0; seed1 = 1234567890L; seed2 = 1234567890L; } FPRINTF((stderr,"ranf: seed = %lo %lo %ld %ld\n", seed1, seed2)); /* Generate pseudo random integers, which always end up positive */ k = seed1 / 53668L; seed1 = Xa1 * (seed1 - k * 53668L) - k * 12211; if (seed1 < 0) seed1 += Xm1; k = seed2 / 52774L; seed2 = Xa2 * (seed2 - k * 52774L) - k * 3791; if (seed2 < 0) seed2 += Xm2; z = seed1 - seed2; if (z < 1) z += (Xm1 - 1); /* * 4.656613057E-10 is 1/Xm1. Xm1 is set at the top of this file and is * currently 2147483563. If Xm1 changes, change this also. */ return (double) 4.656613057E-10 *z; } /* ---------------------------------------------------------------- Following to specfun.c made by John Grosh (jgrosh@arl.mil) on 28 OCT 1992. ---------------------------------------------------------------- */ void f_normal(union argument *arg) { /* Normal or Gaussian Probability Function */ struct value a; double x; /* ref. Abramowitz and Stegun 1964, "Handbook of Mathematical Functions", Applied Mathematics Series, vol 55, Chapter 26, page 934, Eqn. 26.2.29 and Jos van der Woude code found above */ (void) arg; /* avoid -Wunused warning */ x = real(pop(&a)); x = 0.5 * SQRT_TWO * x; x = 0.5 * erfc(-x); /* by using erfc instead of erf, we can get accurate values for -38 < arg < -8 */ push(Gcomplex(&a, x, 0.0)); } void f_inverse_normal(union argument *arg) { /* Inverse normal distribution function */ struct value a; double x; (void) arg; /* avoid -Wunused warning */ x = real(pop(&a)); if (x <= 0.0 || x >= 1.0) { undefined = TRUE; push(Gcomplex(&a, 0.0, 0.0)); } else { push(Gcomplex(&a, inverse_normal_func(x), 0.0)); } } void f_inverse_erf(union argument *arg) { /* Inverse error function */ struct value a; double x; (void) arg; /* avoid -Wunused warning */ x = real(pop(&a)); if (fabs(x) >= 1.0) { undefined = TRUE; push(Gcomplex(&a, 0.0, 0.0)); } else { push(Gcomplex(&a, inverse_error_func(x), 0.0)); } } /* ndtri.c * * Inverse of Normal distribution function * * * * SYNOPSIS: * * double x, y, ndtri(); * * x = ndtri( y ); * * * * DESCRIPTION: * * Returns the argument, x, for which the area under the * Gaussian probability density function (integrated from * minus infinity to x) is equal to y. * * * For small arguments 0 < y < exp(-2), the program computes * z = sqrt( -2.0 * log(y) ); then the approximation is * x = z - log(z)/z - (1/z) P(1/z) / Q(1/z). * There are two rational functions P/Q, one for 0 < y < exp(-32) * and the other for y up to exp(-2). For larger arguments, * w = y - 0.5, and x/sqrt(2pi) = w + w**3 R(w**2)/S(w**2)). * * * ACCURACY: * * Relative error: * arithmetic domain # trials peak rms * DEC 0.125, 1 5500 9.5e-17 2.1e-17 * DEC 6e-39, 0.135 3500 5.7e-17 1.3e-17 * IEEE 0.125, 1 20000 7.2e-16 1.3e-16 * IEEE 3e-308, 0.135 50000 4.6e-16 9.8e-17 * * * ERROR MESSAGES: * * message condition value returned * ndtri domain x <= 0 -DBL_MAX * ndtri domain x >= 1 DBL_MAX * */ /* Cephes Math Library Release 2.8: June, 2000 Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier */ #ifdef UNK /* sqrt(2pi) */ static double s2pi = 2.50662827463100050242E0; #endif #ifdef DEC static unsigned short s2p[] = {0040440, 0066230, 0177661, 0034055}; #define s2pi *(double *)s2p #endif #ifdef IBMPC static unsigned short s2p[] = {0x2706, 0x1ff6, 0x0d93, 0x4004}; #define s2pi *(double *)s2p #endif #ifdef MIEEE static unsigned short s2p[] = { 0x4004, 0x0d93, 0x1ff6, 0x2706 }; #define s2pi *(double *)s2p #endif static double inverse_normal_func(double y0) { /* approximation for 0 <= |y - 0.5| <= 3/8 */ #ifdef UNK static const double P0[5] = { -5.99633501014107895267E1, 9.80010754185999661536E1, -5.66762857469070293439E1, 1.39312609387279679503E1, -1.23916583867381258016E0, }; static const double Q0[8] = { /* 1.00000000000000000000E0,*/ 1.95448858338141759834E0, 4.67627912898881538453E0, 8.63602421390890590575E1, -2.25462687854119370527E2, 2.00260212380060660359E2, -8.20372256168333339912E1, 1.59056225126211695515E1, -1.18331621121330003142E0, }; #endif #ifdef DEC static const unsigned short P0[20] = { 0141557, 0155170, 0071360, 0120550, 0041704, 0000214, 0172417, 0067307, 0141542, 0132204, 0040066, 0156723, 0041136, 0163161, 0157276, 0007747, 0140236, 0116374, 0073666, 0051764, }; static const unsigned short Q0[32] = { /*0040200,0000000,0000000,0000000,*/ 0040372, 0026256, 0110403, 0123707, 0040625, 0122024, 0020277, 0026661, 0041654, 0134161, 0124134, 0007244, 0142141, 0073162, 0133021, 0131371, 0042110, 0041235, 0043516, 0057767, 0141644, 0011417, 0036155, 0137305, 0041176, 0076556, 0004043, 0125430, 0140227, 0073347, 0152776, 0067251, }; #endif #ifdef IBMPC static const unsigned short P0[20] = { 0x142d, 0x0e5e, 0xfb4f, 0xc04d, 0xedd9, 0x9ea1, 0x8011, 0x4058, 0xdbba, 0x8806, 0x5690, 0xc04c, 0xc1fd, 0x3bd7, 0xdcce, 0x402b, 0xca7e, 0x8ef6, 0xd39f, 0xbff3, }; static const unsigned short Q0[36] = { /*0x0000,0x0000,0x0000,0x3ff0,*/ 0x74f9, 0xd220, 0x4595, 0x3fff, 0xe5b6, 0x8417, 0xb482, 0x4012, 0x81d4, 0x350b, 0x970e, 0x4055, 0x365f, 0x56c2, 0x2ece, 0xc06c, 0xcbff, 0xa8e9, 0x0853, 0x4069, 0xb7d9, 0xe78d, 0x8261, 0xc054, 0x7563, 0xc104, 0xcfad, 0x402f, 0xcdd5, 0xfabf, 0xeedc, 0xbff2, }; #endif #ifdef MIEEE static const unsigned short P0[20] = { 0xc04d, 0xfb4f, 0x0e5e, 0x142d, 0x4058, 0x8011, 0x9ea1, 0xedd9, 0xc04c, 0x5690, 0x8806, 0xdbba, 0x402b, 0xdcce, 0x3bd7, 0xc1fd, 0xbff3, 0xd39f, 0x8ef6, 0xca7e, }; static const unsigned short Q0[32] = { /*0x3ff0,0x0000,0x0000,0x0000,*/ 0x3fff, 0x4595, 0xd220, 0x74f9, 0x4012, 0xb482, 0x8417, 0xe5b6, 0x4055, 0x970e, 0x350b, 0x81d4, 0xc06c, 0x2ece, 0x56c2, 0x365f, 0x4069, 0x0853, 0xa8e9, 0xcbff, 0xc054, 0x8261, 0xe78d, 0xb7d9, 0x402f, 0xcfad, 0xc104, 0x7563, 0xbff2, 0xeedc, 0xfabf, 0xcdd5, }; #endif /* Approximation for interval z = sqrt(-2 log y ) between 2 and 8 * i.e., y between exp(-2) = .135 and exp(-32) = 1.27e-14. */ #ifdef UNK static const double P1[9] = { 4.05544892305962419923E0, 3.15251094599893866154E1, 5.71628192246421288162E1, 4.40805073893200834700E1, 1.46849561928858024014E1, 2.18663306850790267539E0, -1.40256079171354495875E-1, -3.50424626827848203418E-2, -8.57456785154685413611E-4, }; static const double Q1[8] = { /* 1.00000000000000000000E0,*/ 1.57799883256466749731E1, 4.53907635128879210584E1, 4.13172038254672030440E1, 1.50425385692907503408E1, 2.50464946208309415979E0, -1.42182922854787788574E-1, -3.80806407691578277194E-2, -9.33259480895457427372E-4, }; #endif #ifdef DEC static const unsigned short P1[36] = { 0040601, 0143074, 0150744, 0073326, 0041374, 0031554, 0113253, 0146016, 0041544, 0123272, 0012463, 0176771, 0041460, 0051160, 0103560, 0156511, 0041152, 0172624, 0117772, 0030755, 0040413, 0170713, 0151545, 0176413, 0137417, 0117512, 0022154, 0131671, 0137017, 0104257, 0071432, 0007072, 0135540, 0143363, 0063137, 0036166, }; static const unsigned short Q1[32] = { /*0040200,0000000,0000000,0000000,*/ 0041174, 0075325, 0004736, 0120326, 0041465, 0110044, 0047561, 0045567, 0041445, 0042321, 0012142, 0030340, 0041160, 0127074, 0166076, 0141051, 0040440, 0046055, 0040745, 0150400, 0137421, 0114146, 0067330, 0010621, 0137033, 0175162, 0025555, 0114351, 0135564, 0122773, 0145750, 0030357, }; #endif #ifdef IBMPC static const unsigned short P1[36] = { 0x8edb, 0x9a3c, 0x38c7, 0x4010, 0x7982, 0x92d5, 0x866d, 0x403f, 0x7fbf, 0x42a6, 0x94d7, 0x404c, 0x1ba9, 0x10ee, 0x0a4e, 0x4046, 0x463e, 0x93ff, 0x5eb2, 0x402d, 0xbfa1, 0x7a6c, 0x7e39, 0x4001, 0x9677, 0x448d, 0xf3e9, 0xbfc1, 0x41c7, 0xee63, 0xf115, 0xbfa1, 0xe78f, 0x6ccb, 0x18de, 0xbf4c, }; static const unsigned short Q1[32] = { /*0x0000,0x0000,0x0000,0x3ff0,*/ 0xd41b, 0xa13b, 0x8f5a, 0x402f, 0x296f, 0x89ee, 0xb204, 0x4046, 0x461c, 0x228c, 0xa89a, 0x4044, 0xd845, 0x9d87, 0x15c7, 0x402e, 0xba20, 0xa83c, 0x0985, 0x4004, 0x0232, 0xcddb, 0x330c, 0xbfc2, 0xb31d, 0x456d, 0x7f4e, 0xbfa3, 0x061e, 0x797d, 0x94bf, 0xbf4e, }; #endif #ifdef MIEEE static const unsigned short P1[36] = { 0x4010, 0x38c7, 0x9a3c, 0x8edb, 0x403f, 0x866d, 0x92d5, 0x7982, 0x404c, 0x94d7, 0x42a6, 0x7fbf, 0x4046, 0x0a4e, 0x10ee, 0x1ba9, 0x402d, 0x5eb2, 0x93ff, 0x463e, 0x4001, 0x7e39, 0x7a6c, 0xbfa1, 0xbfc1, 0xf3e9, 0x448d, 0x9677, 0xbfa1, 0xf115, 0xee63, 0x41c7, 0xbf4c, 0x18de, 0x6ccb, 0xe78f, }; static const unsigned short Q1[32] = { /*0x3ff0,0x0000,0x0000,0x0000,*/ 0x402f, 0x8f5a, 0xa13b, 0xd41b, 0x4046, 0xb204, 0x89ee, 0x296f, 0x4044, 0xa89a, 0x228c, 0x461c, 0x402e, 0x15c7, 0x9d87, 0xd845, 0x4004, 0x0985, 0xa83c, 0xba20, 0xbfc2, 0x330c, 0xcddb, 0x0232, 0xbfa3, 0x7f4e, 0x456d, 0xb31d, 0xbf4e, 0x94bf, 0x797d, 0x061e, }; #endif /* Approximation for interval z = sqrt(-2 log y ) between 8 and 64 * i.e., y between exp(-32) = 1.27e-14 and exp(-2048) = 3.67e-890. */ #ifdef UNK static const double P2[9] = { 3.23774891776946035970E0, 6.91522889068984211695E0, 3.93881025292474443415E0, 1.33303460815807542389E0, 2.01485389549179081538E-1, 1.23716634817820021358E-2, 3.01581553508235416007E-4, 2.65806974686737550832E-6, 6.23974539184983293730E-9, }; static const double Q2[8] = { /* 1.00000000000000000000E0,*/ 6.02427039364742014255E0, 3.67983563856160859403E0, 1.37702099489081330271E0, 2.16236993594496635890E-1, 1.34204006088543189037E-2, 3.28014464682127739104E-4, 2.89247864745380683936E-6, 6.79019408009981274425E-9, }; #endif #ifdef DEC static const unsigned short P2[36] = { 0040517, 0033507, 0036236, 0125641, 0040735, 0044616, 0014473, 0140133, 0040574, 0012567, 0114535, 0102541, 0040252, 0120340, 0143474, 0150135, 0037516, 0051057, 0115361, 0031211, 0036512, 0131204, 0101511, 0125144, 0035236, 0016627, 0043160, 0140216, 0033462, 0060512, 0060141, 0010641, 0031326, 0062541, 0101304, 0077706, }; static const unsigned short Q2[32] = { /*0040200,0000000,0000000,0000000,*/ 0040700, 0143322, 0132137, 0040501, 0040553, 0101155, 0053221, 0140257, 0040260, 0041071, 0052573, 0010004, 0037535, 0066472, 0177261, 0162330, 0036533, 0160475, 0066666, 0036132, 0035253, 0174533, 0027771, 0044027, 0033502, 0016147, 0117666, 0063671, 0031351, 0047455, 0141663, 0054751, }; #endif #ifdef IBMPC static const unsigned short P2[36] = { 0xd574, 0xe793, 0xe6e8, 0x4009, 0x780b, 0xc327, 0xa931, 0x401b, 0xb0ac, 0xf32b, 0x82ae, 0x400f, 0x9a0c, 0x18e7, 0x541c, 0x3ff5, 0x2651, 0xf35e, 0xca45, 0x3fc9, 0x354d, 0x9069, 0x5650, 0x3f89, 0x1812, 0xe8ce, 0xc3b2, 0x3f33, 0x2234, 0x4c0c, 0x4c29, 0x3ec6, 0x8ff9, 0x3058, 0xccac, 0x3e3a, }; static const unsigned short Q2[32] = { /*0x0000,0x0000,0x0000,0x3ff0,*/ 0xe828, 0x568b, 0x18da, 0x4018, 0x3816, 0xaad2, 0x704d, 0x400d, 0x6200, 0x2aaf, 0x0847, 0x3ff6, 0x3c9b, 0x5fd6, 0xada7, 0x3fcb, 0xc78b, 0xadb6, 0x7c27, 0x3f8b, 0x2903, 0x65ff, 0x7f2b, 0x3f35, 0xccf7, 0xf3f6, 0x438c, 0x3ec8, 0x6b3d, 0xb876, 0x29e5, 0x3e3d, }; #endif #ifdef MIEEE static const unsigned short P2[36] = { 0x4009, 0xe6e8, 0xe793, 0xd574, 0x401b, 0xa931, 0xc327, 0x780b, 0x400f, 0x82ae, 0xf32b, 0xb0ac, 0x3ff5, 0x541c, 0x18e7, 0x9a0c, 0x3fc9, 0xca45, 0xf35e, 0x2651, 0x3f89, 0x5650, 0x9069, 0x354d, 0x3f33, 0xc3b2, 0xe8ce, 0x1812, 0x3ec6, 0x4c29, 0x4c0c, 0x2234, 0x3e3a, 0xccac, 0x3058, 0x8ff9, }; static const unsigned short Q2[32] = { /*0x3ff0,0x0000,0x0000,0x0000,*/ 0x4018, 0x18da, 0x568b, 0xe828, 0x400d, 0x704d, 0xaad2, 0x3816, 0x3ff6, 0x0847, 0x2aaf, 0x6200, 0x3fcb, 0xada7, 0x5fd6, 0x3c9b, 0x3f8b, 0x7c27, 0xadb6, 0xc78b, 0x3f35, 0x7f2b, 0x65ff, 0x2903, 0x3ec8, 0x438c, 0xf3f6, 0xccf7, 0x3e3d, 0x29e5, 0xb876, 0x6b3d, }; #endif double x, y, z, y2, x0, x1; int code; if (y0 <= 0.0) { mtherr("inverse_normal_func", MTHERR_DOMAIN); return (-DBL_MAX); } if (y0 >= 1.0) { mtherr("inverse_normal_func", MTHERR_DOMAIN); return (DBL_MAX); } code = 1; y = y0; if (y > (1.0 - 0.13533528323661269189)) { /* 0.135... = exp(-2) */ y = 1.0 - y; code = 0; } if (y > 0.13533528323661269189) { y = y - 0.5; y2 = y * y; x = y + y * (y2 * polevl(y2, P0, 4) / p1evl(y2, Q0, 8)); x = x * s2pi; return (x); } x = sqrt(-2.0 * log(y)); x0 = x - log(x) / x; z = 1.0 / x; if (x < 8.0) /* y > exp(-32) = 1.2664165549e-14 */ x1 = z * polevl(z, P1, 8) / p1evl(z, Q1, 8); else x1 = z * polevl(z, P2, 8) / p1evl(z, Q2, 8); x = x0 - x1; if (code != 0) x = -x; return (x); } /* Cephes Math Library Release 2.8: June, 2000 Copyright 1984, 1987, 1988, 1992, 2000 by Stephen L. Moshier */ #ifndef HAVE_ERFC /* erfc.c * * Complementary error function * * * * SYNOPSIS: * * double x, y, erfc(); * * y = erfc( x ); * * * * DESCRIPTION: * * * 1 - erf(x) = * * inf. * - * 2 | | 2 * erfc(x) = -------- | exp( - t ) dt * sqrt(pi) | | * - * x * * * For small x, erfc(x) = 1 - erf(x); otherwise rational * approximations are computed. * * * * ACCURACY: * * Relative error: * arithmetic domain # trials peak rms * DEC 0, 9.2319 12000 5.1e-16 1.2e-16 * IEEE 0,26.6417 30000 5.7e-14 1.5e-14 * * * ERROR MESSAGES: * * message condition value returned * erfc underflow x > 9.231948545 (DEC) 0.0 * * */ static double erfc(double a) { #ifdef UNK static const double P[] = { 2.46196981473530512524E-10, 5.64189564831068821977E-1, 7.46321056442269912687E0, 4.86371970985681366614E1, 1.96520832956077098242E2, 5.26445194995477358631E2, 9.34528527171957607540E2, 1.02755188689515710272E3, 5.57535335369399327526E2 }; static const double Q[] = { /* 1.00000000000000000000E0,*/ 1.32281951154744992508E1, 8.67072140885989742329E1, 3.54937778887819891062E2, 9.75708501743205489753E2, 1.82390916687909736289E3, 2.24633760818710981792E3, 1.65666309194161350182E3, 5.57535340817727675546E2 }; static const double R[] = { 5.64189583547755073984E-1, 1.27536670759978104416E0, 5.01905042251180477414E0, 6.16021097993053585195E0, 7.40974269950448939160E0, 2.97886665372100240670E0 }; static const double S[] = { /* 1.00000000000000000000E0,*/ 2.26052863220117276590E0, 9.39603524938001434673E0, 1.20489539808096656605E1, 1.70814450747565897222E1, 9.60896809063285878198E0, 3.36907645100081516050E0 }; #endif /* UNK */ #ifdef DEC static const unsigned short P[] = { 0030207, 0054445, 0011173, 0021706, 0040020, 0067272, 0030661, 0122075, 0040756, 0151236, 0173053, 0067042, 0041502, 0106175, 0062555, 0151457, 0042104, 0102525, 0047401, 0003667, 0042403, 0116176, 0011446, 0075303, 0042551, 0120723, 0061641, 0123275, 0042600, 0070651, 0007264, 0134516, 0042413, 0061102, 0167507, 0176625 }; static const unsigned short Q[] = { /*0040200,0000000,0000000,0000000,*/ 0041123, 0123257, 0165741, 0017142, 0041655, 0065027, 0173413, 0115450, 0042261, 0074011, 0021573, 0004150, 0042563, 0166530, 0013662, 0007200, 0042743, 0176427, 0162443, 0105214, 0043014, 0062546, 0153727, 0123772, 0042717, 0012470, 0006227, 0067424, 0042413, 0061103, 0003042, 0013254 }; static const unsigned short R[] = { 0040020, 0067272, 0101024, 0155421, 0040243, 0037467, 0056706, 0026462, 0040640, 0116017, 0120665, 0034315, 0040705, 0020162, 0143350, 0060137, 0040755, 0016234, 0134304, 0130157, 0040476, 0122700, 0051070, 0015473 }; static const unsigned short S[] = { /*0040200,0000000,0000000,0000000,*/ 0040420, 0126200, 0044276, 0070413, 0041026, 0053051, 0007302, 0063746, 0041100, 0144203, 0174051, 0061151, 0041210, 0123314, 0126343, 0177646, 0041031, 0137125, 0051431, 0033011, 0040527, 0117362, 0152661, 0066201 }; #endif /* DEC */ #ifdef IBMPC static const unsigned short P[] = { 0x6479, 0xa24f, 0xeb24, 0x3df0, 0x3488, 0x4636, 0x0dd7, 0x3fe2, 0x6dc4, 0xdec5, 0xda53, 0x401d, 0xba66, 0xacad, 0x518f, 0x4048, 0x20f7, 0xa9e0, 0x90aa, 0x4068, 0xcf58, 0xc264, 0x738f, 0x4080, 0x34d8, 0x6c74, 0x343a, 0x408d, 0x972a, 0x21d6, 0x0e35, 0x4090, 0xffb3, 0x5de8, 0x6c48, 0x4081 }; static const unsigned short Q[] = { /*0x0000,0x0000,0x0000,0x3ff0,*/ 0x23cc, 0xfd7c, 0x74d5, 0x402a, 0x7365, 0xfee1, 0xad42, 0x4055, 0x610d, 0x246f, 0x2f01, 0x4076, 0x41d0, 0x02f6, 0x7dab, 0x408e, 0x7151, 0xfca4, 0x7fa2, 0x409c, 0xf4ff, 0xdafa, 0x8cac, 0x40a1, 0xede2, 0x0192, 0xe2a7, 0x4099, 0x42d6, 0x60c4, 0x6c48, 0x4081 }; static const unsigned short R[] = { 0x9b62, 0x5042, 0x0dd7, 0x3fe2, 0xc5a6, 0xebb8, 0x67e6, 0x3ff4, 0xa71a, 0xf436, 0x1381, 0x4014, 0x0c0c, 0x58dd, 0xa40e, 0x4018, 0x960e, 0x9718, 0xa393, 0x401d, 0x0367, 0x0a47, 0xd4b8, 0x4007 }; static const unsigned short S[] = { /*0x0000,0x0000,0x0000,0x3ff0,*/ 0xce21, 0x0917, 0x1590, 0x4002, 0x4cfd, 0x21d8, 0xcac5, 0x4022, 0x2c4d, 0x7f05, 0x1910, 0x4028, 0x7ff5, 0x959c, 0x14d9, 0x4031, 0x26c1, 0xaa63, 0x37ca, 0x4023, 0x2d90, 0x5ab6, 0xf3de, 0x400a }; #endif /* IBMPC */ #ifdef MIEEE static const unsigned short P[] = { 0x3df0, 0xeb24, 0xa24f, 0x6479, 0x3fe2, 0x0dd7, 0x4636, 0x3488, 0x401d, 0xda53, 0xdec5, 0x6dc4, 0x4048, 0x518f, 0xacad, 0xba66, 0x4068, 0x90aa, 0xa9e0, 0x20f7, 0x4080, 0x738f, 0xc264, 0xcf58, 0x408d, 0x343a, 0x6c74, 0x34d8, 0x4090, 0x0e35, 0x21d6, 0x972a, 0x4081, 0x6c48, 0x5de8, 0xffb3 }; static const unsigned short Q[] = { 0x402a, 0x74d5, 0xfd7c, 0x23cc, 0x4055, 0xad42, 0xfee1, 0x7365, 0x4076, 0x2f01, 0x246f, 0x610d, 0x408e, 0x7dab, 0x02f6, 0x41d0, 0x409c, 0x7fa2, 0xfca4, 0x7151, 0x40a1, 0x8cac, 0xdafa, 0xf4ff, 0x4099, 0xe2a7, 0x0192, 0xede2, 0x4081, 0x6c48, 0x60c4, 0x42d6 }; static const unsigned short R[] = { 0x3fe2, 0x0dd7, 0x5042, 0x9b62, 0x3ff4, 0x67e6, 0xebb8, 0xc5a6, 0x4014, 0x1381, 0xf436, 0xa71a, 0x4018, 0xa40e, 0x58dd, 0x0c0c, 0x401d, 0xa393, 0x9718, 0x960e, 0x4007, 0xd4b8, 0x0a47, 0x0367 }; static const unsigned short S[] = { 0x4002, 0x1590, 0x0917, 0xce21, 0x4022, 0xcac5, 0x21d8, 0x4cfd, 0x4028, 0x1910, 0x7f05, 0x2c4d, 0x4031, 0x14d9, 0x959c, 0x7ff5, 0x4023, 0x37ca, 0xaa63, 0x26c1, 0x400a, 0xf3de, 0x5ab6, 0x2d90 }; #endif /* MIEEE */ double p, q, x, y, z; if (a < 0.0) x = -a; else x = a; if (x < 1.0) return (1.0 - erf(a)); z = -a * a; if (z < DBL_MIN_10_EXP) { under: mtherr("erfc", MTHERR_UNDERFLOW); if (a < 0) return (2.0); else return (0.0); } z = exp(z); if (x < 8.0) { p = polevl(x, P, 8); q = p1evl(x, Q, 8); } else { p = polevl(x, R, 5); q = p1evl(x, S, 6); } y = (z * p) / q; if (a < 0) y = 2.0 - y; if (y == 0.0) goto under; return (y); } #endif /* !HAVE_ERFC */ #ifndef HAVE_ERF /* erf.c * * Error function * * * * SYNOPSIS: * * double x, y, erf(); * * y = erf( x ); * * * * DESCRIPTION: * * The integral is * * x * - * 2 | | 2 * erf(x) = -------- | exp( - t ) dt. * sqrt(pi) | | * - * 0 * * The magnitude of x is limited to 9.231948545 for DEC * arithmetic; 1 or -1 is returned outside this range. * * For 0 <= |x| < 1, erf(x) = x * P4(x**2)/Q5(x**2); otherwise * erf(x) = 1 - erfc(x). * * * * ACCURACY: * * Relative error: * arithmetic domain # trials peak rms * DEC 0,1 14000 4.7e-17 1.5e-17 * IEEE 0,1 30000 3.7e-16 1.0e-16 * */ static double erf(double x) { # ifdef UNK static const double T[] = { 9.60497373987051638749E0, 9.00260197203842689217E1, 2.23200534594684319226E3, 7.00332514112805075473E3, 5.55923013010394962768E4 }; static const double U[] = { /* 1.00000000000000000000E0,*/ 3.35617141647503099647E1, 5.21357949780152679795E2, 4.59432382970980127987E3, 2.26290000613890934246E4, 4.92673942608635921086E4 }; # endif # ifdef DEC static const unsigned short T[] = { 0041031, 0126770, 0170672, 0166101, 0041664, 0006522, 0072360, 0031770, 0043013, 0100025, 0162641, 0126671, 0043332, 0155231, 0161627, 0076200, 0044131, 0024115, 0021020, 0117343 }; static const unsigned short U[] = { /*0040200,0000000,0000000,0000000,*/ 0041406, 0037461, 0177575, 0032714, 0042402, 0053350, 0123061, 0153557, 0043217, 0111227, 0032007, 0164217, 0043660, 0145000, 0004013, 0160114, 0044100, 0071544, 0167107, 0125471 }; # endif # ifdef IBMPC static const unsigned short T[] = { 0x5d88, 0x1e37, 0x35bf, 0x4023, 0x067f, 0x4e9e, 0x81aa, 0x4056, 0x35b7, 0xbcb4, 0x7002, 0x40a1, 0xef90, 0x3c72, 0x5b53, 0x40bb, 0x13dc, 0xa442, 0x2509, 0x40eb }; static const unsigned short U[] = { /*0x0000,0x0000,0x0000,0x3ff0,*/ 0xa6ba, 0x3fef, 0xc7e6, 0x4040, 0x3aee, 0x14c6, 0x4add, 0x4080, 0xfd12, 0xe680, 0xf252, 0x40b1, 0x7c0a, 0x0101, 0x1940, 0x40d6, 0xf567, 0x9dc8, 0x0e6c, 0x40e8 }; # endif # ifdef MIEEE static const unsigned short T[] = { 0x4023, 0x35bf, 0x1e37, 0x5d88, 0x4056, 0x81aa, 0x4e9e, 0x067f, 0x40a1, 0x7002, 0xbcb4, 0x35b7, 0x40bb, 0x5b53, 0x3c72, 0xef90, 0x40eb, 0x2509, 0xa442, 0x13dc }; static const unsigned short U[] = { 0x4040, 0xc7e6, 0x3fef, 0xa6ba, 0x4080, 0x4add, 0x14c6, 0x3aee, 0x40b1, 0xf252, 0xe680, 0xfd12, 0x40d6, 0x1940, 0x0101, 0x7c0a, 0x40e8, 0x0e6c, 0x9dc8, 0xf567 }; # endif double y, z; if (fabs(x) > 1.0) return (1.0 - erfc(x)); z = x * x; y = x * polevl(z, T, 4) / p1evl(z, U, 5); return (y); } #endif /* !HAVE_ERF */ /* ---------------------------------------------------------------- Following function for the inverse error function is taken from NIST on 16. May 2002. Use Newton-Raphson correction also for range -1 to -y0 and add 3rd cycle to improve convergence - E A Merritt 21.10.2003 ---------------------------------------------------------------- */ static double inverse_error_func(double y) { double x = 0.0; /* The output */ double z = 0.0; /* Intermadiate variable */ double y0 = 0.7; /* Central range variable */ /* Coefficients in rational approximations. */ static const double a[4] = { 0.886226899, -1.645349621, 0.914624893, -0.140543331 }; static const double b[4] = { -2.118377725, 1.442710462, -0.329097515, 0.012229801 }; static const double c[4] = { -1.970840454, -1.624906493, 3.429567803, 1.641345311 }; static const double d[2] = { 3.543889200, 1.637067800 }; if ((y < -1.0) || (1.0 < y)) { printf("inverse_error_func: The value out of the range of the function"); x = log(-1.0); return (x); } else if ((y == -1.0) || (1.0 == y)) { x = -y * log(0.0); return (x); } else if ((-1.0 < y) && (y < -y0)) { z = sqrt(-log((1.0 + y) / 2.0)); x = -(((c[3] * z + c[2]) * z + c[1]) * z + c[0]) / ((d[1] * z + d[0]) * z + 1.0); } else { if ((-y0 <= y) && (y <= y0)) { z = y * y; x = y * (((a[3] * z + a[2]) * z + a[1]) * z + a[0]) / ((((b[3] * z + b[3]) * z + b[1]) * z + b[0]) * z + 1.0); } else if ((y0 < y) && (y < 1.0)) { z = sqrt(-log((1.0 - y) / 2.0)); x = (((c[3] * z + c[2]) * z + c[1]) * z + c[0]) / ((d[1] * z + d[0]) * z + 1.0); } } /* Three steps of Newton-Raphson correction to full accuracy. OK - four */ x = x - (erf(x) - y) / (2.0 / sqrt(PI) * gp_exp(-x * x)); x = x - (erf(x) - y) / (2.0 / sqrt(PI) * gp_exp(-x * x)); x = x - (erf(x) - y) / (2.0 / sqrt(PI) * gp_exp(-x * x)); x = x - (erf(x) - y) / (2.0 / sqrt(PI) * gp_exp(-x * x)); return (x); } /* Implementation of Lamberts W-function which is defined as * w(x)*e^(w(x))=x * Implementation by Gunter Kuhnle, gk@uni-leipzig.de * Algorithm originally developed by * KEITH BRIGGS, DEPARTMENT OF PLANT SCIENCES, * e-mail:kmb28@cam.ac.uk * http://epidem13.plantsci.cam.ac.uk/~kbriggs/W-ology.html */ static double lambertw(double x) { double p, e, t, w, eps; int i; eps = MACHEPS; if (x < -exp(-1)) return -1; /* error, value undefined */ if (fabs(x) <= eps) return x; if (x < 1) { p = sqrt(2.0 * (exp(1.0) * x + 1.0)); w = -1.0 + p - p * p / 3.0 + 11.0 / 72.0 * p * p * p; } else { w = log(x); } if (x > 3) { w = w - log(w); } for (i = 0; i < 20; i++) { e = gp_exp(w); t = w * e - x; t = t / (e * (w + 1.0) - 0.5 * (w + 2.0) * t / (w + 1.0)); w = w - t; if (fabs(t) < eps * (1.0 + fabs(w))) return w; } return -1; /* error: iteration didn't converge */ } void f_lambertw(union argument *arg) { struct value a; double x; (void) arg; /* avoid -Wunused warning */ x = real(pop(&a)); x = lambertw(x); if (x <= -1) /* Error return from lambertw --> flag 'undefined' */ undefined = TRUE; push(Gcomplex(&a, x, 0.0)); } /* ------------------------------------------------------------ Airy Function Ai(x) After: "Two-Point Quasi-Fractional Approximations to the Airy Function Ai(x)" by Pablo Martin, Ricardo Perez, Antonio L. Guerrero Journal of Computational Physics 99, 337-340 (1992) Beware of a misprint in equation (5) in this paper: The second term in parentheses must be multiplied by "x", as is clear from equation (3) and by comparison with equation (6). The implementation in this file uses the CORRECT formula (with the "x"). This is not a very high accuracy approximation, but sufficient for plotting and similar applications. Higher accuracy formulas are available, but are much more complicated (typically requiring iteration). Added: janert (PKJ) 2009-09-05 ------------------------------------------------------------ */ static double airy_neg( double x ) { double z = sqrt( 0.37 + pow( fabs(x), 3.0 ) ); double t = (2.0/3.0)*pow( fabs(x), 1.5 ); double y = 0; y += ( -0.043883564 + 0.3989422*z )*cos(t)/pow( z, 7.0/6.0 ); y += x*( -0.013883003 - 0.3989422*z )*sin(t)/( pow( z, 5.0/6.0 ) * 1.5 * t ); return y; } static double airy_pos( double x ) { double z = sqrt( 0.0425 + pow( fabs(x), 3.0 ) ); double y = 0; y += (-0.002800908 + 0.326662423*z )/pow( z, 7.0/6.0 ); y += x * ( -0.007232251 - 0.044567423*z )/pow( z, 11.0/6.0 ); y *= exp(-(2.0/3.0)*z ); return y; } void f_airy(union argument *arg) { struct value a; double x; (void) arg; /* avoid -Wunused warning */ x = real(pop(&a)); if( x < 0 ) { x = airy_neg(x); } else { x = airy_pos(x); } push(Gcomplex(&a, x, 0.0)); } /* ** expint.c * * DESCRIBE Approximate the exponential integral function * * * /inf -n -zt * E_n(z) = | t * e dt (n = 0, 1, 2, ...) * /1 * * * CALL p = expint(n, z) * * double n >= 0 * double z >= 0 * also: n must be an integer * either z > 0 or n > 1 * * WARNING none * * RETURN double p > 0 * -1.0 on error condition * * REFERENCE Abramowitz and Stegun (1964) * * Copyright (c) 2010 James R. Van Zandt, jrvz@comcast.net */ static double expint(double n, double z) { double y; /* the answer */ { /* Test for admissibility of arguments */ double junk; if (n < 0 || z < 0 || modf(n,&junk)) return -1.0; if (z == 0 && n < 2) return -1.0; } /* special cases */ if (n == 0) return exp(-z)/z; if (z == 0) return 1/(n-1); /* for z=3, CF requires 36 terms and series requires 29 */ if (z > 3) { /* For large z, use continued fraction (Abramowitz & Stegun 5.1.22): E_n(z) = exp(-z)(1/(z+n/(1+1/(z+(n+1)/1+2/(z+...))))) The CF is valid and stable for z>0, and efficient for z>1 or so. */ double n0, n1, n2, n3, d0, d1, d2, d3, y_prev=1; int i; n0 = 0; n1 = 1; d0 = 1; d1 = z; for (i=0; i<333; i++) { /* evaluate the CF "top down" using the recurrence relations for the numerators and denominators of successive convergents */ n2 = n0*(n+i) + n1; d2 = d0*(n+i) + d1; n3 = n1*(1+i) + n2*z; d3 = d1*(1+i) + d2*z; y = n3/d3; if (y == y_prev) break; y_prev = y; n0 = n2; n1 = n3; d0 = d2; d1 = d3; /* Re-scale terms in continued fraction if terms are large */ if (d3 >= OFLOW) { n0 /= OFLOW; n1 /= OFLOW; d0 /= OFLOW; d1 /= OFLOW; } } y = exp(-z)*y; } else { /* For small z, use series (Abramowitz & Stegun 5.1.12): E_1(z) = -\gamma + \ln z + \sum_{m=1}^\infty { (-z)^m \over (m) m! } The series is valid for z>0, and efficient for z<4 or so. */ /* from Abramowitz & Stegun, Table 1.1 */ double euler_constant = .577215664901532860606512; double y_prev = 0; double t, m; y = -euler_constant - log(z); t = 1; for (m = 1; m<333; m++) { t = -t*z/m; y = y - t/m; if (y == y_prev) break; y_prev = y; } /* For n > 1, use recurrence relation (Abramowitz & Stegun 5.1.14): n E_{n+1}(z) + z E_n(z) = e^{-z}, n >= 1 The recurrence is unstable for increasing n and z>4 or so, but okay for z<3. */ for (m=1; m<n; m++) y=(exp(-z) - z*y)/m; } return y; } void f_expint(union argument *arg) { struct value a; double n, x; (void) arg; /* avoid -Wunused warning */ x = real(pop(&a)); n = real(pop(&a)); x = expint(n, x); if (x <= -1) /* Error return from expint --> flag 'undefined' */ undefined = TRUE; push(Gcomplex(&a, x, 0.0)); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/mouse.h���������������������������������������������������������������������������0000644�0004711�0000144�00000012524�12043621616�012226� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: mouse.h,v 1.21.4.1 2012/10/27 02:24:37 sfeam Exp $ */ /* GNUPLOT - mouse.h */ /*[ * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Original Software (October 1999 - January 2000): * Pieter-Tjerk de Boer <ptdeboer@cs.utwente.nl> * Petr Mikulik <mikulik@physics.muni.cz> * Johannes Zellner <johannes@zellner.org> */ #ifndef _HAVE_MOUSE_H #define _HAVE_MOUSE_H #include "mousecmn.h" #include "syscfg.h" /* Zoom queue */ struct t_zoom { double xmin, ymin, xmax, ymax; double x2min, y2min, x2max, y2max; int was_splot_map; struct t_zoom *prev, *next; }; typedef struct mouse_setting_t { int on; /* ... */ int doubleclick; /* Button1 double / single click resolution */ int annotate_zoom_box; /* draw coordinates at zoom box */ int label; /* draw real gnuplot labels on Button 2 */ int polardistance; /* display dist. to ruler in polar coordinates */ int verbose; /* display ipc commands */ int warp_pointer; /* warp pointer after starting a zoom box */ char *fmt; /* fprintf format for printing numbers */ char *labelopts; /* label options */ } mouse_setting_t; extern mouse_setting_t mouse_setting; extern char mouse_fmt_default[]; /* enum of GP_ -keycodes has moved to mousecmn.h so that it can be * accessed by standalone terminals too */ /* FIXME HBB 20010207: Codestyle violation, again. */ #ifdef _MOUSE_C /* the following table must match exactly the * enum's of GP_ and end with a NULL pointer! */ static char* special_keys[] = { "GP_FIRST_KEY", /* keep this dummy there */ "Linefeed", "Clear", "Pause", "Scroll_Lock", "Sys_Req", "Insert", "Home", "Left", "Up", "Right", "Down", "PageUp", "PageDown", "End", "Begin", "KP_Space", "KP_Tab", "KP_F1", "KP_F2", "KP_F3", "KP_F4", /* see KP_0 - KP_9 */ "KP_Insert", "KP_End", "KP_Down", "KP_PageDown", "KP_Left", "KP_Begin", "KP_Right", "KP_Home", "KP_Up", "KP_PageUp", "KP_Delete", "KP_Equal", "KP_Multiply", "KP_Add", "KP_Separator", "KP_Subtract", "KP_Decimal", "KP_Divide", "KP_0", "KP_1", "KP_2", "KP_3", "KP_4", "KP_5", "KP_6", "KP_7", "KP_8", "KP_9", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "Close", "Button1", "GP_LAST_KEY", (char*) 0 /* must be the last line */ }; #endif /* _MOUSE_C */ enum { MOUSE_COORDINATES_REAL = 0, MOUSE_COORDINATES_REAL1, /* w/o brackets */ MOUSE_COORDINATES_FRACTIONAL, #if 0 MOUSE_COORDINATES_PIXELS, MOUSE_COORDINATES_SCREEN, #endif MOUSE_COORDINATES_TIMEFMT, MOUSE_COORDINATES_XDATE, MOUSE_COORDINATES_XTIME, MOUSE_COORDINATES_XDATETIME, MOUSE_COORDINATES_ALT /* alternative format as specified by the user */ }; /* FIXME HBB 20010207: Codestyle violation: these should be in mouse.c! */ #if defined(_MOUSE_C) long mouse_mode = MOUSE_COORDINATES_REAL; long clipboard_mode = MOUSE_COORDINATES_REAL; char* mouse_alt_string = (char*) 0; char* clipboard_alt_string = (char*) 0; #else extern long mouse_mode; extern long clipboard_mode; extern char* mouse_alt_string; extern char* clipboard_alt_string; #endif void event_plotdone __PROTO((void)); void recalc_statusline __PROTO((void)); void update_ruler __PROTO((void)); void set_ruler __PROTO((TBOOLEAN on, int mx, int my)); void UpdateStatusline __PROTO((void)); void do_event __PROTO((struct gp_event_t *ge)); int plot_mode __PROTO((int mode)); void event_reset __PROTO((struct gp_event_t *ge)); /* bind prototype(s) */ void bind_process __PROTO((char* lhs, char* rhs, TBOOLEAN allwindows)); void bind_remove_all __PROTO((void)); #endif /* !_HAVE_MOUSE_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/variable.c������������������������������������������������������������������������0000644�0004711�0000144�00000041406�12165050771�012662� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: variable.c,v 1.42.2.2 2013/07/03 16:31:53 sfeam Exp $"); } #endif /* GNUPLOT - variable.c */ /*[ * Copyright 1999, 2004 Lars Hecking * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* The Death of Global Variables - part one. */ #include <string.h> #include "variable.h" #include "alloc.h" #include "command.h" #include "plot.h" #include "util.h" #include "term_api.h" #define PATHSEP_TO_NUL(arg) \ do { \ char *s = arg; \ while ((s = strchr(s, PATHSEP)) != NULL) \ *s++ = NUL; \ } while (0) #define PRINT_PATHLIST(start, limit) \ do { \ char *s = start; \ \ while (s < limit) { \ fprintf(stderr, "\"%s\" ", s); \ s += strlen(s) + 1; \ } \ fputc('\n',stderr); \ } while (0) /* * char *loadpath_handler (int, char *) * */ char * loadpath_handler(int action, char *path) { /* loadpath variable * the path elements are '\0' separated (!) * this way, reading out loadpath is very * easy to implement */ static char *loadpath; /* index pointer, end of loadpath, * env section of loadpath, current limit, in that order */ static char *p, *last, *envptr, *limit; #ifdef X11 char *appdir; #endif switch (action) { case ACTION_CLEAR: /* Clear loadpath, fall through to init */ FPRINTF((stderr, "Clear loadpath\n")); free(loadpath); loadpath = p = last = NULL; /* HBB 20000726: 'limit' has to be initialized to NULL, too! */ limit = NULL; case ACTION_INIT: /* Init loadpath from environment */ FPRINTF((stderr, "Init loadpath from environment\n")); assert(loadpath == NULL); if (!loadpath) { char *envlib = getenv("GNUPLOT_LIB"); if (envlib) { int len = strlen(envlib); loadpath = gp_strdup(envlib); /* point to end of loadpath */ last = loadpath + len; /* convert all PATHSEPs to \0 */ PATHSEP_TO_NUL(loadpath); } /* else: NULL = empty */ } /* else: already initialised; int_warn (?) */ /* point to env portion of loadpath */ envptr = loadpath; break; case ACTION_SET: /* set the loadpath */ FPRINTF((stderr, "Set loadpath\n")); if (path && *path != NUL) { /* length of env portion */ size_t elen = last - envptr; size_t plen = strlen(path); if (loadpath && envptr) { /* we are prepending a path name; because * realloc() preserves only the contents up * to the minimum of old and new size, we move * the part to be preserved to the beginning * of the string; use memmove() because strings * may overlap */ memmove(loadpath, envptr, elen + 1); } loadpath = gp_realloc(loadpath, elen + 1 + plen + 1, "expand loadpath"); /* now move env part back to the end to make space for * the new path */ memmove(loadpath + plen + 1, loadpath, elen + 1); strcpy(loadpath, path); /* separate new path(s) and env path(s) */ loadpath[plen] = PATHSEP; /* adjust pointer to env part and last */ envptr = &loadpath[plen+1]; last = envptr + elen; PATHSEP_TO_NUL(loadpath); } /* else: NULL = empty */ break; case ACTION_SHOW: /* print the current, full loadpath */ FPRINTF((stderr, "Show loadpath\n")); if (loadpath) { fputs("\tloadpath is ", stderr); PRINT_PATHLIST(loadpath, envptr); if (envptr) { /* env part */ fputs("\tloadpath from GNUPLOT_LIB is ", stderr); PRINT_PATHLIST(envptr, last); } } else fputs("\tloadpath is empty\n", stderr); #ifdef GNUPLOT_SHARE_DIR fprintf(stderr,"\tgnuplotrc is read from %s\n",GNUPLOT_SHARE_DIR); #endif #ifdef X11 if ((appdir = getenv("XAPPLRESDIR"))) { fprintf(stderr,"\tenvironmental path for X11 application defaults: \"%s\"\n", appdir); } #ifdef XAPPLRESDIR else { fprintf(stderr,"\tno XAPPLRESDIR found in the environment,\n"); fprintf(stderr,"\t falling back to \"%s\"\n", XAPPLRESDIR); } #endif #endif break; case ACTION_SAVE: /* we don't save the load path taken from the * environment, so don't go beyond envptr when * extracting the path elements */ limit = envptr; case ACTION_GET: /* subsequent calls to get_loadpath() return all * elements of the loadpath until exhausted */ FPRINTF((stderr, "Get loadpath\n")); if (!loadpath) return NULL; if (!p) { /* init section */ p = loadpath; if (!limit) limit = last; } else { /* skip over '\0' */ p += strlen(p) + 1; } if (p >= limit) limit = p = NULL; return p; break; case ACTION_NULL: /* just return */ default: break; } /* should always be ignored - points to the * first path in the list */ return loadpath; } struct path_table { const char *dir; }; /* Yet, no special font paths for these operating systems: * MSDOS, NeXT, ultrix, VMS, _IBMR2, alliant * * Environmental variables are written as $(name). * Commands are written as $`command`. */ #if defined(OS2) && !defined(FONTPATHSET) # define FONTPATHSET static const struct path_table fontpath_tbl[] = { { "$(BOOTDIR)/PSFONTS" }, /* X11 */ { "$(X11ROOT)/X11R6/lib/X11/fonts/Type1" }, { NULL } }; #endif #if defined(_Windows) && !defined(FONTPATHSET) # define FONTPATHSET static const struct path_table fontpath_tbl[] = { { "$(windir)\\fonts" }, /* Ghostscript */ { "c:\\gs\\fonts" }, /* X11 */ { "$(CYGWIN_ROOT)\\usr\\X11R6\\lib\\X11\\fonts\\Type1" }, #ifdef HAVE_KPSEXPAND /* fpTeX */ { "$`kpsewhich -expand-path=$HOMETEXMF`\\fonts\\type1!" }, { "$`kpsewhich -expand-path=$TEXMFLOCAL`\\fonts\\type1!" }, { "$`kpsewhich -expand-path=$TEXMFMAIN`\\fonts\\type1!" }, { "$`kpsewhich -expand-path=$TEXMFDIST`\\fonts\\type1!" }, #endif { NULL } }; #endif #if defined(__APPLE__) && !defined(FONTPATHSET) # define FONTPATHSET static const struct path_table fontpath_tbl[] = { { "/System/Library/Fonts!" }, { "/Library/Fonts!" }, { "$(HOME)/Library/Fonts!" }, { NULL } }; #endif #if defined(VMS) && !defined(FONTPATHSET) # define FONTPATHSET static const struct path_table fontpath_tbl[] = { { "SYS$COMMON:[SYSFONT]!" }, { NULL } }; #endif /* Fallback: Should work for unix */ #ifndef FONTPATHSET static const struct path_table fontpath_tbl[] = { #ifdef HAVE_KPSEXPAND /* teTeX or TeXLive */ { "$`kpsexpand '$HOMETEXMF'`/fonts/type1!" }, { "$`kpsexpand '$TEXMFLOCAL'`/fonts/type1!" }, { "$`kpsexpand '$TEXMFMAIN'`/fonts/type1!" }, { "$`kpsexpand '$TEXMFDIST'`/fonts/type1!" }, #endif /* Linux paths */ { "/usr/X11R6/lib/X11/fonts/Type1" }, { "/usr/X11R6/lib/X11/fonts/truetype" }, /* HP-UX */ { "/usr/lib/X11/fonts!"}, /* Ghostscript */ { "/usr/share/ghostscript/fonts" }, { "/usr/local/share/ghostscript/fonts" }, { NULL } }; #endif #undef FONTPATHSET static TBOOLEAN fontpath_init_done = FALSE; /* * char *fontpath_handler (int, char *) * */ char * fontpath_handler(int action, char *path) { /* fontpath variable * the path elements are '\0' separated (!) * this way, reading out fontpath is very * easy to implement */ static char *fontpath; /* index pointer, end of fontpath, * env section of fontpath, current limit, in that order */ static char *p, *last, *envptr, *limit; if (!fontpath_init_done) { fontpath_init_done = TRUE; init_fontpath(); } switch (action) { case ACTION_CLEAR: /* Clear fontpath, fall through to init */ FPRINTF((stderr, "Clear fontpath\n")); free(fontpath); fontpath = p = last = NULL; /* HBB 20000726: 'limit' has to be initialized to NULL, too! */ limit = NULL; case ACTION_INIT: /* Init fontpath from environment */ FPRINTF((stderr, "Init fontpath from environment\n")); assert(fontpath == NULL); if (!fontpath) { char *envlib = getenv("GNUPLOT_FONTPATH"); if (envlib) { /* get paths from environment */ int len = strlen(envlib); fontpath = gp_strdup(envlib); /* point to end of fontpath */ last = fontpath + len; /* convert all PATHSEPs to \0 */ PATHSEP_TO_NUL(fontpath); } #if defined(HAVE_DIRENT_H) || defined(_Windows) else { /* set hardcoded paths */ const struct path_table *curr_fontpath = fontpath_tbl; while (curr_fontpath->dir) { char *currdir = NULL; char *envbeg = NULL; # if defined(PIPES) char *cmdbeg = NULL; # endif TBOOLEAN subdirs = FALSE; currdir = gp_strdup( curr_fontpath->dir ); while ( (envbeg=strstr(currdir, "$(")) # if defined(PIPES) || (cmdbeg=strstr( currdir, "$`" )) # endif ) { /* Read environment variables */ if (envbeg) { char *tmpdir = NULL; char *envend = NULL, *envval = NULL; unsigned int envlen; envend = strchr(envbeg+2,')'); envend[0] = '\0'; envval = getenv(envbeg+2); envend[0] = ')'; envlen = envval ? strlen(envval) : 0; tmpdir = gp_alloc(strlen(currdir)+envlen +envbeg-envend+1, "expand fontpath"); strncpy(tmpdir,currdir,envbeg-currdir); if (envval) strcpy(tmpdir+(envbeg-currdir),envval); strcpy(tmpdir+(envbeg-currdir+envlen), envend+1); free(currdir); currdir = tmpdir; } # if defined(PIPES) /* Read environment variables */ else if (cmdbeg) { char *tmpdir = NULL; char *envend = NULL; char envval[256]; unsigned int envlen; FILE *fcmd; envend = strchr(cmdbeg+2,'`'); envend[0] = '\0'; restrict_popen(); fcmd = popen(cmdbeg+2,"r"); if (fcmd) { fgets(envval,255,fcmd); if (envval[strlen(envval)-1]=='\n') envval[strlen(envval)-1]='\0'; pclose(fcmd); } envend[0] = '`'; envlen = strlen(envval); tmpdir = gp_alloc(strlen(currdir)+envlen +cmdbeg-envend+1, "expand fontpath"); strncpy(tmpdir,currdir,cmdbeg-currdir); if (*envval) strcpy(tmpdir+(cmdbeg-currdir),envval); strcpy(tmpdir+(cmdbeg-currdir+envlen), envend+1); free(currdir); currdir = tmpdir; } # endif } if ( currdir[strlen(currdir)-1] == '!' ) { /* search subdirectories */ /* delete ! from directory name */ currdir[strlen(currdir)-1] = '\0'; subdirs = TRUE; } if ( existdir( currdir ) ) { size_t plen; if ( subdirs ) /* add ! to directory name again */ currdir[strlen(currdir)] = '!'; plen = strlen(currdir); if (fontpath) { size_t elen = strlen(fontpath); fontpath = gp_realloc(fontpath, elen + 1 + plen + 1, "expand fontpath"); last = fontpath+elen; *last = PATHSEP; ++last; *last = '\0'; } else { fontpath = gp_alloc(plen + 1, "expand fontpath"); last = fontpath; } strcpy(last, currdir ); last += plen; } curr_fontpath++; if (currdir) { free(currdir); currdir = NULL; } } /* convert all PATHSEPs to \0 */ if (fontpath) PATHSEP_TO_NUL(fontpath); } #endif /* HAVE_DIRENT_H */ } /* else: already initialised; int_warn (?) */ /* point to env portion of fontpath */ envptr = fontpath; break; case ACTION_SET: /* set the fontpath */ FPRINTF((stderr, "Set fontpath\n")); if (path && *path != NUL) { /* length of env portion */ size_t elen = last - envptr; size_t plen = strlen(path); if (fontpath && envptr) { /* we are prepending a path name; because * realloc() preserves only the contents up * to the minimum of old and new size, we move * the part to be preserved to the beginning * of the string; use memmove() because strings * may overlap */ memmove(fontpath, envptr, elen + 1); } fontpath = gp_realloc(fontpath, elen + 1 + plen + 1, "expand fontpath"); /* now move env part back to the end to make space for * the new path */ memmove(fontpath + plen + 1, fontpath, elen + 1); strcpy(fontpath, path); /* separate new path(s) and env path(s) */ fontpath[plen] = PATHSEP; /* adjust pointer to env part and last */ envptr = &fontpath[plen+1]; last = envptr + elen; PATHSEP_TO_NUL(fontpath); } /* else: NULL = empty */ break; case ACTION_SHOW: /* print the current, full fontpath */ FPRINTF((stderr, "Show fontpath\n")); if (fontpath) { fputs("\tfontpath is ", stderr); PRINT_PATHLIST(fontpath, envptr); if (envptr) { /* env part */ fputs("\tsystem fontpath is ", stderr); PRINT_PATHLIST(envptr, last); } } else fputs("\tfontpath is empty\n", stderr); break; case ACTION_SAVE: /* we don't save the font path taken from the * environment, so don't go beyond envptr when * extracting the path elements */ limit = envptr; case ACTION_GET: /* subsequent calls to get_fontpath() return all * elements of the fontpath until exhausted */ FPRINTF((stderr, "Get fontpath\n")); if (!fontpath) return NULL; if (!p) { /* init section */ p = fontpath; if (!limit) limit = last; } else { /* skip over '\0' */ p += strlen(p) + 1; } if (p >= limit) limit = p = NULL; return p; case ACTION_NULL: /* just return */ default: break; } /* should always be ignored - points to the * first path in the list */ return fontpath; } /* not set or shown directly, but controlled by 'set locale' * defined in national.h */ char full_month_names[12][32] = { FMON01, FMON02, FMON03, FMON04, FMON05, FMON06, FMON07, FMON08, FMON09, FMON10, FMON11, FMON12 }; char abbrev_month_names[12][8] = { AMON01, AMON02, AMON03, AMON04, AMON05, AMON06, AMON07, AMON08, AMON09, AMON10, AMON11, AMON12 }; char full_day_names[7][32] = { FDAY0, FDAY1, FDAY2, FDAY3, FDAY4, FDAY5, FDAY6 }; char abbrev_day_names[7][8] = { ADAY0, ADAY1, ADAY2, ADAY3, ADAY4, ADAY5, ADAY6 }; char * locale_handler(int action, char *newlocale) { struct tm tm; int i; switch(action) { case ACTION_CLEAR: case ACTION_INIT: free(current_locale); #ifdef HAVE_LOCALE_H setlocale(LC_TIME, ""); setlocale(LC_CTYPE, ""); current_locale = gp_strdup(setlocale(LC_TIME,NULL)); #else current_locale = gp_strdup(INITIAL_LOCALE); #endif break; case ACTION_SET: #ifdef HAVE_LOCALE_H if (setlocale(LC_TIME, newlocale)) { free(current_locale); current_locale = gp_strdup(setlocale(LC_TIME,NULL)); } else { int_error(c_token, "Locale not available"); } /* we can do a *lot* better than this ; eg use system functions * where available; create values on first use, etc */ memset(&tm, 0, sizeof(struct tm)); for (i = 0; i < 7; ++i) { tm.tm_wday = i; /* hope this enough */ strftime(full_day_names[i], sizeof(full_day_names[i]), "%A", &tm); strftime(abbrev_day_names[i], sizeof(abbrev_day_names[i]), "%a", &tm); } for (i = 0; i < 12; ++i) { tm.tm_mon = i; /* hope this enough */ strftime(full_month_names[i], sizeof(full_month_names[i]), "%B", &tm); strftime(abbrev_month_names[i], sizeof(abbrev_month_names[i]), "%b", &tm); } #else current_locale = gp_realloc(current_locale, strlen(newlocale) + 1, "locale"); strcpy(current_locale, newlocale); #endif /* HAVE_LOCALE_H */ break; case ACTION_SHOW: #ifdef HAVE_LOCALE_H fprintf(stderr, "\tgnuplot LC_CTYPE %s\n", setlocale(LC_CTYPE,NULL)); fprintf(stderr, "\tgnuplot encoding %s\n", encoding_names[encoding]); fprintf(stderr, "\tgnuplot LC_TIME %s\n", setlocale(LC_TIME,NULL)); fprintf(stderr, "\tgnuplot LC_NUMERIC %s\n", numeric_locale ? numeric_locale : "C"); #else fprintf(stderr, "\tlocale is \"%s\"\n", current_locale); #endif break; case ACTION_GET: default: break; } return current_locale; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/matrix.h��������������������������������������������������������������������������0000644�0004711�0000144�00000002425�10071042556�012400� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: matrix.h,v 1.10 2004/07/01 17:10:06 broeker Exp $ */ /* GNUPLOT - matrix.h */ /* NOTICE: Change of Copyright Status * * The author of this module, Carsten Grammes, has expressed in * personal email that he has no more interest in this code, and * doesn't claim any copyright. He has agreed to put this module * into the public domain. * * Lars Hecking 15-02-1999 */ /* * Header file: public functions in matrix.c * * * Previous copyright of this module: Carsten Grammes, 1993 * Experimental Physics, University of Saarbruecken, Germany */ #ifndef MATRIX_H #define MATRIX_H #include "syscfg.h" /******* public functions ******/ double *vec __PROTO((int n)); int *ivec __PROTO((int n)); double **matr __PROTO((int r, int c)); void free_matr __PROTO((double **m)); double *redim_vec __PROTO((double **v, int n)); void solve __PROTO((double **a, int n, double **b, int m)); void Givens __PROTO((double **C, double *d, double *x, double *r, int N, int n, int want_r)); void Invert_RtR __PROTO((double **R, double **I, int n)); /* Functions for use by THIN_PLATE_SPLINES_GRID method */ void lu_decomp __PROTO((double **, int, int *, double *)); void lu_backsubst __PROTO((double **, int n, int *, double *)); #endif /* MATRIX_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/graph3d.h�������������������������������������������������������������������������0000644�0004711�0000144�00000014156�11613211161�012421� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: graph3d.h,v 1.41 2011/07/25 06:51:29 sfeam Exp $ */ /* GNUPLOT - graph3d.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_GRAPH3D_H # define GNUPLOT_GRAPH3D_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "gp_types.h" #include "gadgets.h" #include "term_api.h" /* Function macros to map from user 3D space into normalized -1..1 */ #define map_x3d(x) ((x-X_AXIS.min)*xscale3d + xcenter3d -1.0) #define map_y3d(y) ((y-Y_AXIS.min)*yscale3d + ycenter3d -1.0) #define map_z3d(z) ((z-floor_z)*zscale3d + zcenter3d -1.0) /* Type definitions */ typedef enum en_dgrid3d_mode { DGRID3D_DEFAULT, DGRID3D_QNORM, DGRID3D_SPLINES, DGRID3D_GAUSS, DGRID3D_EXP, DGRID3D_CAUCHY, DGRID3D_BOX, DGRID3D_HANN, DGRID3D_OTHER } t_dgrid3d_mode; typedef enum en_contour_placement { /* Where to place contour maps if at all. */ CONTOUR_NONE, CONTOUR_BASE, CONTOUR_SRF, CONTOUR_BOTH } t_contour_placement; typedef double transform_matrix[4][4]; /* HBB 990826: added */ typedef struct gnuplot_contours { struct gnuplot_contours *next; struct coordinate GPHUGE *coords; char isNewLevel; char label[32]; int num_pts; double z; } gnuplot_contours; typedef struct iso_curve { struct iso_curve *next; int p_max; /* how many points are allocated */ int p_count; /* count of points in points */ struct coordinate GPHUGE *points; } iso_curve; typedef struct surface_points { struct surface_points *next_sp; /* pointer to next plot in linked list */ int token; /* last token used, for second parsing pass */ enum PLOT_TYPE plot_type; /* DATA2D? DATA3D? FUNC2D FUNC3D? NODATA? */ enum PLOT_STYLE plot_style; /* style set by "with" or by default */ char *title; /* plot title, a.k.a. key entry */ TBOOLEAN title_no_enhanced; /* don't typeset title in enhanced mode */ TBOOLEAN title_is_filename; /* not used in 3D */ TBOOLEAN title_is_suppressed;/* TRUE if 'notitle' was specified */ TBOOLEAN noautoscale; /* ignore data from this plot during autoscaling */ struct lp_style_type lp_properties; struct arrow_style_type arrow_properties; struct fill_style_type fill_properties; /* FIXME: ignored in 3D */ struct text_label *labels; /* Only used if plot_style == LABELPOINTS */ struct t_image image_properties; /* only used if plot_style is IMAGE or RGB_IMAGE */ /* 2D and 3D plot structure fields overlay only to this point */ TBOOLEAN opt_out_of_hidden3d; /* set by "nohidden" option to splot command */ TBOOLEAN opt_out_of_contours; /* set by "nocontours" option to splot command */ TBOOLEAN opt_out_of_surface; /* set by "nosurface" option to splot command */ TBOOLEAN pm3d_color_from_column; int hidden3d_top_linetype; /* before any calls to load_linetype() */ int has_grid_topology; int iteration; /* needed for tracking iteration */ /* Data files only - num of isolines read from file. For functions, */ /* num_iso_read is the number of 'primary' isolines (in x direction) */ int num_iso_read; struct gnuplot_contours *contours; /* NULL if not doing contours. */ struct iso_curve *iso_crvs; /* the actual data */ char pm3d_where[7]; /* explicitly given base, top, surface */ } surface_points; /* Variables of graph3d.c needed by other modules: */ extern int xmiddle, ymiddle, xscaler, yscaler; extern double floor_z; extern double ceiling_z, base_z; /* made exportable for PM3D */ extern transform_matrix trans_mat; extern double xscale3d, yscale3d, zscale3d; extern double xcenter3d, ycenter3d, zcenter3d; extern t_contour_placement draw_contour; extern TBOOLEAN label_contours; extern TBOOLEAN draw_surface; /* is hidden3d display wanted? */ extern TBOOLEAN hidden3d; extern int hidden3d_layer; /* LAYER_FRONT or LAYER_BACK */ extern float surface_rot_z; extern float surface_rot_x; extern float surface_scale; extern float surface_zscale; extern float surface_lscale; extern int splot_map; typedef struct { double z; TBOOLEAN absolute; } t_xyplane; extern t_xyplane xyplane; #define ISO_SAMPLES 10 /* default number of isolines per splot */ extern int iso_samples_1; extern int iso_samples_2; #ifdef USE_MOUSE extern int axis3d_o_x, axis3d_o_y, axis3d_x_dx, axis3d_x_dy, axis3d_y_dx, axis3d_y_dy; #endif /* Prototypes from file "graph3d.c" */ void do_3dplot __PROTO((struct surface_points *plots, int pcount, int quick)); void map3d_position __PROTO((struct position *pos, int *x, int *y, const char *what)); void map3d_position_double __PROTO((struct position *pos, double *x, double *y, const char *what)); void map3d_position_r __PROTO((struct position *pos, int *x, int *y, const char *what)); #endif /* GNUPLOT_GRAPH3D_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/misc.c����������������������������������������������������������������������������0000644�0004711�0000144�00000106743�12173327737�012046� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: misc.c,v 1.138.2.15 2013/07/22 22:19:11 sfeam Exp $"); } #endif /* GNUPLOT - misc.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "misc.h" #include "alloc.h" #include "command.h" #include "graphics.h" #include "parse.h" /* for const_*() */ #include "plot.h" #include "tables.h" #include "util.h" #include "variable.h" #include "axis.h" #include "scanner.h" /* so that scanner() can count curly braces */ #if defined(HAVE_DIRENT_H) # include <sys/types.h> # include <dirent.h> #elif defined(_Windows) # include <windows.h> #endif static char *recursivefullname __PROTO((const char *path, const char *filename, TBOOLEAN recursive)); static void prepare_call __PROTO((void)); static void expand_call_args __PROTO((void)); /* A copy of the declaration from set.c */ /* There should only be one declaration in a header file. But I do not know * where to put it */ /* void get_position __PROTO((struct position * pos)); */ /* State information for load_file(), to recover from errors * and properly handle recursive load_file calls */ LFS *lf_head = NULL; /* NULL if not in load_file */ /* these two could be in load_file, except for error recovery */ static TBOOLEAN do_load_arg_substitution = FALSE; static char *call_args[10] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static int call_argc; /* * iso_alloc() allocates a iso_curve structure that can hold 'num' * points. */ struct iso_curve * iso_alloc(int num) { struct iso_curve *ip; ip = (struct iso_curve *) gp_alloc(sizeof(struct iso_curve), "iso curve"); ip->p_max = (num >= 0 ? num : 0); ip->p_count = 0; if (num > 0) { ip->points = (struct coordinate GPHUGE *) gp_alloc(num * sizeof(struct coordinate), "iso curve points"); memset(ip->points, 0, num * sizeof(struct coordinate)); } else ip->points = (struct coordinate GPHUGE *) NULL; ip->next = NULL; return (ip); } /* * iso_extend() reallocates a iso_curve structure to hold "num" * points. This will either expand or shrink the storage. */ void iso_extend(struct iso_curve *ip, int num) { if (num == ip->p_max) return; if (num > 0) { if (ip->points == NULL) { ip->points = (struct coordinate GPHUGE *) gp_alloc(num * sizeof(struct coordinate), "iso curve points"); } else { ip->points = (struct coordinate GPHUGE *) gp_realloc(ip->points, num * sizeof(struct coordinate), "expanding curve points"); } if (num > ip->p_max) memset( &(ip->points[ip->p_max]), 0, (num - ip->p_max) * sizeof(struct coordinate)); ip->p_max = num; } else { if (ip->points != (struct coordinate GPHUGE *) NULL) free(ip->points); ip->points = (struct coordinate GPHUGE *) NULL; ip->p_max = 0; } } /* * iso_free() releases any memory which was previously malloc()'d to hold * iso curve points. */ void iso_free(struct iso_curve *ip) { if (ip) { if (ip->points) free((char *) ip->points); free((char *) ip); } } static void prepare_call(void) { call_argc = 0; /* Gnuplot "call" command can have up to 10 arguments "$0" to "$9" */ while (!END_OF_COMMAND && call_argc <= 9) { if (isstring(c_token)) m_quote_capture(&call_args[call_argc++], c_token, c_token); else m_capture(&call_args[call_argc++], c_token, c_token); c_token++; } if (!END_OF_COMMAND) int_error(++c_token, "too many arguments for 'call <file>'"); } const char * expand_call_arg(int c) { static char numstr[3]; if (c == '$') { return "$"; } else if (c == '#') { assert(call_argc >= 0 && call_argc <= 9); sprintf(numstr, "%i", call_argc); return numstr; } else if (c >= '0' && c <= '9') { int ind = c - '0'; if (ind >= call_argc) return ""; else return call_args[ind]; } else int_error(NO_CARET, "Invalid substitution $%c", c); return NULL; /* Avoid compiler warning */ } static void expand_call_args(void) { int il = 0; int len; char *rl; char *raw_line = gp_strdup(gp_input_line); rl = raw_line; *gp_input_line = '\0'; while (*rl) { if (*rl == '$') { const char *sub = expand_call_arg(*(++rl)); len = strlen(sub); while (gp_input_line_len - il < len + 1) extend_input_line(); strcpy(gp_input_line + il, sub); il += len; } else { if (il + 1 > gp_input_line_len) extend_input_line(); gp_input_line[il++] = *rl; } rl++; } if (il + 1 > gp_input_line_len) extend_input_line(); gp_input_line[il] = '\0'; free(raw_line); } void load_file(FILE *fp, char *name, TBOOLEAN can_do_args) { int len; int start, left; int more; int stop = FALSE; lf_push(fp, name, NULL); /* save state for errors and recursion */ do_load_arg_substitution = can_do_args; if (fp == (FILE *) NULL) { os_error(NO_CARET, "Cannot open %s file '%s'", can_do_args ? "call" : "load", name); } else if (fp == stdin) { /* DBT 10-6-98 go interactive if "-" named as load file */ interactive = TRUE; while (!com_line()); } else { call_argc = 0; if (can_do_args) { prepare_call(); lf_head->c_token = c_token; /* update after prepare_call() */ } /* things to do after lf_push */ inline_num = 0; /* go into non-interactive mode during load */ /* will be undone below, or in load_file_error */ interactive = FALSE; while (!stop) { /* read all lines in file */ left = gp_input_line_len; start = 0; more = TRUE; /* read one logical line */ while (more) { if (fgets(&(gp_input_line[start]), left, fp) == (char *) NULL) { stop = TRUE; /* EOF in file */ gp_input_line[start] = '\0'; more = FALSE; } else { inline_num++; len = strlen(gp_input_line) - 1; if (gp_input_line[len] == '\n') { /* remove any newline */ gp_input_line[len] = '\0'; /* Look, len was 1-1 = 0 before, take care here! */ if (len > 0) --len; if (gp_input_line[len] == '\r') { /* remove any carriage return */ gp_input_line[len] = NUL; if (len > 0) --len; } } else if (len + 2 >= left) { extend_input_line(); left = gp_input_line_len - len - 1; start = len + 1; continue; /* don't check for '\' */ } if (gp_input_line[len] == '\\') { /* line continuation */ start = len; left = gp_input_line_len - start; } else { /* EAM May 2011 - handle multi-line bracketed clauses {...}. * Introduces a requirement for scanner.c and scanner.h * This code is redundant with part of do_line(), * but do_line() assumes continuation lines come from stdin. */ /* macros in a clause are problematic, as they are */ /* only expanded once even if the clause is replayed */ string_expand_macros(); /* Strip off trailing comment and count curly braces */ num_tokens = scanner(&gp_input_line, &gp_input_line_len); if (gp_input_line[token[num_tokens].start_index] == '#') { gp_input_line[token[num_tokens].start_index] = NUL; start = token[num_tokens].start_index; left = gp_input_line_len - start; } /* Read additional lines if necessary to complete a * bracketed clause {...} */ if (curly_brace_count < 0) int_error(NO_CARET, "Unexpected }"); if (curly_brace_count > 0) { if (len + 4 > gp_input_line_len) extend_input_line(); strcat(gp_input_line,";\n"); start = strlen(gp_input_line); left = gp_input_line_len - start; continue; } more = FALSE; } } } /* process line */ if (strlen(gp_input_line) > 0) { if (can_do_args) expand_call_args(); screen_ok = FALSE; /* make sure command line is echoed on error */ if (do_line()) stop = TRUE; } } } /* pop state */ (void) lf_pop(); /* also closes file fp */ } /* pop from load_file state stack FALSE if stack was empty called by load_file and load_file_error */ TBOOLEAN lf_pop() { LFS *lf; int argindex; if (lf_head == NULL) return (FALSE); lf = lf_head; if (lf->fp == NULL || lf->fp == stdin) /* Do not close stdin in the case that "-" is named as a load file */ ; #if defined(PIPES) else if (lf->name != NULL && lf->name[0] == '<') pclose(lf->fp); #endif else fclose(lf->fp); for (argindex = 0; argindex < 10; argindex++) { if (call_args[argindex]) free(call_args[argindex]); call_args[argindex] = lf->call_args[argindex]; } call_argc = lf->call_argc; do_load_arg_substitution = lf->do_load_arg_substitution; interactive = lf->interactive; inline_num = lf->inline_num; if_depth = lf->if_depth; if_condition = lf->if_condition; if_open_for_else = lf->if_open_for_else; /* Restore saved input state and free the copy */ if (lf->tokens) { num_tokens = lf->num_tokens; c_token = lf->c_token; assert(token_table_size >= lf->num_tokens+1); memcpy(token, lf->tokens, (lf->num_tokens+1) * sizeof(struct lexical_unit)); free(lf->tokens); } if (lf->input_line) { strcpy(gp_input_line, lf->input_line); free(lf->input_line); } free(lf->name); free(lf->cmdline); lf_head = lf->prev; free(lf); return (TRUE); } /* push onto load_file state stack essentially, we save information needed to undo the load_file changes called by load_file */ void lf_push(FILE *fp, char *name, char *cmdline) { LFS *lf; int argindex; lf = (LFS *) gp_alloc(sizeof(LFS), (char *) NULL); if (lf == (LFS *) NULL) { if (fp != (FILE *) NULL) (void) fclose(fp); /* it won't be otherwise */ int_error(c_token, "not enough memory to load file"); } lf->fp = fp; /* save this file pointer */ lf->name = name; lf->cmdline = cmdline; lf->interactive = interactive; /* save current state */ lf->inline_num = inline_num; /* save current line number */ lf->do_load_arg_substitution = do_load_arg_substitution; lf->call_argc = call_argc; for (argindex = 0; argindex < 10; argindex++) { lf->call_args[argindex] = call_args[argindex]; call_args[argindex] = NULL; /* initially no args */ } lf->depth = lf_head ? lf_head->depth+1 : 0; /* recursion depth */ if (lf->depth > STACK_DEPTH) int_error(NO_CARET, "load/eval nested too deeply"); lf->if_depth = if_depth; lf->if_open_for_else = if_open_for_else; lf->if_condition = if_condition; lf->c_token = c_token; lf->num_tokens = num_tokens; lf->tokens = gp_alloc((num_tokens+1) * sizeof(struct lexical_unit), "lf tokens"); memcpy(lf->tokens, token, (num_tokens+1) * sizeof(struct lexical_unit)); lf->input_line = gp_strdup(gp_input_line); lf->prev = lf_head; /* link to stack */ lf_head = lf; } /* used for reread vsnyder@math.jpl.nasa.gov */ FILE * lf_top() { if (lf_head == (LFS *) NULL) return ((FILE *) NULL); return (lf_head->fp); } /* called from main */ void load_file_error() { /* clean up from error in load_file */ /* pop off everything on stack */ while (lf_pop()); } /* find max len of keys and count keys with len > 0 */ /* FIXME HBB 2000508: by design, this one belongs into 'graphics', and the * next to into 'graph3d'. Actually, the existence of a module like this * 'misc' is almost always a sign of bad design, IMHO */ /* may return NULL */ FILE * loadpath_fopen(const char *filename, const char *mode) { FILE *fp; #if defined(PIPES) if (*filename == '<') { restrict_popen(); if ((fp = popen(filename + 1, "r")) == (FILE *) NULL) return (FILE *) 0; } else #endif /* PIPES */ if ((fp = fopen(filename, mode)) == (FILE *) NULL) { /* try 'loadpath' variable */ char *fullname = NULL, *path; while ((path = get_loadpath()) != NULL) { /* length of path, dir separator, filename, \0 */ fullname = gp_realloc(fullname, strlen(path) + 1 + strlen(filename) + 1, "loadpath_fopen"); strcpy(fullname, path); PATH_CONCAT(fullname, filename); if ((fp = fopen(fullname, mode)) != NULL) { free(fullname); fullname = NULL; /* reset loadpath internals! * maybe this can be replaced by calling get_loadpath with * a NULL argument and some loadpath_handler internal logic */ while (get_loadpath()); break; } } if (fullname) free(fullname); } return fp; } /* Harald Harders <h.harders@tu-bs.de> */ /* Thanks to John Bollinger <jab@bollingerbands.com> who has tested the windows part */ static char * recursivefullname(const char *path, const char *filename, TBOOLEAN recursive) { char *fullname = NULL; FILE *fp; /* length of path, dir separator, filename, \0 */ fullname = gp_alloc(strlen(path) + 1 + strlen(filename) + 1, "recursivefullname"); strcpy(fullname, path); PATH_CONCAT(fullname, filename); if ((fp = fopen(fullname, "r")) != NULL) { fclose(fp); return fullname; } else { free(fullname); fullname = NULL; } if (recursive) { #ifdef HAVE_DIRENT_H DIR *dir; struct dirent *direntry; struct stat buf; dir = opendir(path); if (dir) { while ((direntry = readdir(dir)) != NULL) { char *fulldir = gp_alloc(strlen(path) + 1 + strlen(direntry->d_name) + 1, "fontpath_fullname"); strcpy(fulldir, path); # if defined(VMS) if (fulldir[strlen(fulldir) - 1] == ']') fulldir[strlen(fulldir) - 1] = '\0'; strcpy(&(fulldir[strlen(fulldir)]), "."); strcpy(&(fulldir[strlen(fulldir)]), direntry->d_name); strcpy(&(fulldir[strlen(fulldir)]), "]"); # else PATH_CONCAT(fulldir, direntry->d_name); # endif stat(fulldir, &buf); if ((S_ISDIR(buf.st_mode)) && (strcmp(direntry->d_name, ".") != 0) && (strcmp(direntry->d_name, "..") != 0)) { fullname = recursivefullname(fulldir, filename, TRUE); if (fullname != NULL) break; } free(fulldir); } closedir(dir); } #elif defined(_Windows) HANDLE filehandle; WIN32_FIND_DATA finddata; char *pathwildcard = gp_alloc(strlen(path) + 2, "fontpath_fullname"); strcpy(pathwildcard, path); PATH_CONCAT(pathwildcard, "*"); filehandle = FindFirstFile(pathwildcard, &finddata); free(pathwildcard); if (filehandle != INVALID_HANDLE_VALUE) do { if ((finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && (strcmp(finddata.cFileName, ".") != 0) && (strcmp(finddata.cFileName, "..") != 0)) { char *fulldir = gp_alloc(strlen(path) + 1 + strlen(finddata.cFileName) + 1, "fontpath_fullname"); strcpy(fulldir, path); PATH_CONCAT(fulldir, finddata.cFileName); fullname = recursivefullname(fulldir, filename, TRUE); free(fulldir); if (fullname != NULL) break; } } while (FindNextFile(filehandle, &finddata) != 0); FindClose(filehandle); #else int_warn(NO_CARET, "Recursive directory search not supported\n\t('%s!')", path); #endif } return fullname; } /* may return NULL */ char * fontpath_fullname(const char *filename) { FILE *fp; char *fullname = NULL; #if defined(PIPES) if (*filename == '<') { os_error(NO_CARET, "fontpath_fullname: No Pipe allowed"); } else #endif /* PIPES */ if ((fp = fopen(filename, "r")) == (FILE *) NULL) { /* try 'fontpath' variable */ char *tmppath, *path = NULL; while ((tmppath = get_fontpath()) != NULL) { TBOOLEAN subdirs = FALSE; path = gp_strdup(tmppath); if (path[strlen(path) - 1] == '!') { path[strlen(path) - 1] = '\0'; subdirs = TRUE; } /* if */ fullname = recursivefullname(path, filename, subdirs); if (fullname != NULL) { while (get_fontpath()); free(path); break; } free(path); } } else fullname = gp_strdup(filename); return fullname; } /* Push current terminal. * Called 1. in main(), just after init_terminal(), * 2. from load_rcfile(), * 3. anytime by user command "set term push". */ static char *push_term_name = NULL; static char *push_term_opts = NULL; void push_terminal(int is_interactive) { if (term) { free(push_term_name); free(push_term_opts); push_term_name = gp_strdup(term->name); push_term_opts = gp_strdup(term_options); if (is_interactive) fprintf(stderr, " pushed terminal %s %s\n", push_term_name, push_term_opts); } else { if (is_interactive) fputs("\tcurrent terminal type is unknown\n", stderr); } } /* Pop the terminal. * Called anytime by user command "set term pop". */ void pop_terminal() { if (push_term_name != NULL) { char *s; int i = strlen(push_term_name) + 11; if (push_term_opts) { /* do_string() does not like backslashes -- thus remove them */ for (s=push_term_opts; *s; s++) if (*s=='\\' || *s=='\n') *s=' '; i += strlen(push_term_opts); } s = gp_alloc(i, "pop"); i = interactive; interactive = 0; sprintf(s,"set term %s %s", push_term_name, (push_term_opts ? push_term_opts : "")); do_string_and_free(s); interactive = i; if (interactive) fprintf(stderr," restored terminal is %s %s\n", term->name, ((*term_options) ? term_options : "")); } else fprintf(stderr,"No terminal has been pushed yet\n"); } /* Parse a plot style. Used by 'set style {data|function}' and by (s)plot. */ enum PLOT_STYLE get_style() { /* defined in plot.h */ enum PLOT_STYLE ps; c_token++; ps = lookup_table(&plotstyle_tbl[0], c_token); c_token++; if (ps == -1) int_error(c_token, "unrecognized plot type"); return ps; } /* Parse options for style filledcurves and fill fco accordingly. * If no option given, then set fco->opt_given to 0. */ void get_filledcurves_style_options(filledcurves_opts *fco) { int p; p = lookup_table(&filledcurves_opts_tbl[0], c_token); if (p == FILLEDCURVES_ABOVE) { fco->oneside = 1; p = lookup_table(&filledcurves_opts_tbl[0], ++c_token); } else if (p == FILLEDCURVES_BELOW) { fco->oneside = -1; p = lookup_table(&filledcurves_opts_tbl[0], ++c_token); } else fco->oneside = 0; if (p == -1) { fco->opt_given = 0; return; /* no option given */ } else fco->opt_given = 1; c_token++; fco->closeto = p; fco->at = 0; if (!equals(c_token, "=")) return; /* parameter required for filledcurves x1=... and friends */ if (p < FILLEDCURVES_ATXY) fco->closeto += 4; c_token++; fco->at = real_expression(); if (p != FILLEDCURVES_ATXY) return; /* two values required for FILLEDCURVES_ATXY */ if (!equals(c_token, ",")) int_error(c_token, "syntax is xy=<x>,<y>"); c_token++; fco->aty = real_expression(); return; } /* Print filledcurves style options to a file (used by 'show' and 'save' * commands). */ void filledcurves_options_tofile(filledcurves_opts *fco, FILE *fp) { if (!fco->opt_given) return; if (fco->oneside) fputs(fco->oneside > 0 ? "above " : "below ", fp); if (fco->closeto == FILLEDCURVES_CLOSED) { fputs("closed", fp); return; } if (fco->closeto <= FILLEDCURVES_Y2) { fputs(filledcurves_opts_tbl[fco->closeto].key, fp); return; } if (fco->closeto <= FILLEDCURVES_ATY2) { fprintf(fp, "%s=%g", filledcurves_opts_tbl[fco->closeto - 4].key, fco->at); return; } if (fco->closeto == FILLEDCURVES_ATXY) { fprintf(fp, "xy=%g,%g", fco->at, fco->aty); return; } } TBOOLEAN need_fill_border(struct fill_style_type *fillstyle) { struct lp_style_type p; p.pm3d_color = fillstyle->border_color; if (p.pm3d_color.type == TC_LT) { /* Doesn't want a border at all */ if (p.pm3d_color.lt == LT_NODRAW) return FALSE; load_linetype(&p, p.pm3d_color.lt+1); } /* Wants a border in a new color */ if (p.pm3d_color.type != TC_DEFAULT) apply_pm3dcolor(&p.pm3d_color,term); return TRUE; } /* * allow_ls controls whether we are allowed to accept linestyle in * the current context [ie not when doing a set linestyle command] * allow_point is whether we accept a point command */ int lp_parse(struct lp_style_type *lp, TBOOLEAN allow_ls, TBOOLEAN allow_point) { /* keep track of which options were set during this call */ int set_lt = 0, set_pal = 0, set_lw = 0, set_pt = 0, set_ps = 0, set_pi = 0; int new_lt = 0; /* EAM Mar 2010 - We don't want properties from a user-defined default * linetype to override properties explicitly set here. So fill in a * local lp_style_type as we go and then copy over the specifically * requested properties on top of the default ones. */ struct lp_style_type newlp = *lp; if (allow_ls && (almost_equals(c_token, "lines$tyle") || equals(c_token, "ls"))) { c_token++; lp_use_properties(lp, int_expression()); } while (!END_OF_COMMAND) { if (almost_equals(c_token, "linet$ype") || equals(c_token, "lt")) { if (set_lt++) break; c_token++; if (almost_equals(c_token, "rgb$color")) { if (set_pal++) break; c_token--; parse_colorspec(&(newlp.pm3d_color), TC_RGB); newlp.use_palette = 1; } else /* both syntaxes allowed: 'with lt pal' as well as 'with pal' */ if (almost_equals(c_token, "pal$ette")) { if (set_pal++) break; c_token--; parse_colorspec(&(newlp.pm3d_color), TC_Z); newlp.use_palette = 1; } else if (equals(c_token,"bgnd")) { *lp = background_lp; c_token++; } else { /* These replace the base style */ new_lt = int_expression(); lp->l_type = new_lt - 1; /* user may prefer explicit line styles */ if (prefer_line_styles && allow_ls) lp_use_properties(lp, new_lt); else load_linetype(lp, new_lt); } } /* linetype, lt */ /* both syntaxes allowed: 'with lt pal' as well as 'with pal' */ if (almost_equals(c_token, "pal$ette")) { if (set_pal++) break; c_token--; parse_colorspec(&(newlp.pm3d_color), TC_Z); newlp.use_palette = 1; continue; } if (equals(c_token,"lc") || almost_equals(c_token,"linec$olor") || equals(c_token,"fc") || almost_equals(c_token,"fillc$olor")) { newlp.use_palette = 1; if (set_pal++) break; c_token++; if (almost_equals(c_token, "rgb$color")) { c_token--; parse_colorspec(&(newlp.pm3d_color), TC_RGB); } else if (almost_equals(c_token, "pal$ette")) { c_token--; parse_colorspec(&(newlp.pm3d_color), TC_Z); } else if (equals(c_token,"bgnd")) { newlp.pm3d_color.type = TC_LT; newlp.pm3d_color.lt = LT_BACKGROUND; c_token++; } else if (almost_equals(c_token, "var$iable")) { c_token++; newlp.l_type = LT_COLORFROMCOLUMN; newlp.pm3d_color.type = TC_LINESTYLE; } else { /* Pull the line colour from a default linetype, but */ /* only if we are not in the middle of defining one! */ if (allow_ls) { struct lp_style_type temp; load_linetype(&temp, int_expression()); newlp.pm3d_color = temp.pm3d_color; } else { newlp.pm3d_color.type = TC_LT; newlp.pm3d_color.lt = int_expression() - 1; } } continue; } if (almost_equals(c_token, "linew$idth") || equals(c_token, "lw")) { if (set_lw++) break; c_token++; newlp.l_width = real_expression(); if (newlp.l_width < 0) newlp.l_width = 0; continue; } if (equals(c_token,"bgnd")) { if (set_lt++) break;; c_token++; *lp = background_lp; continue; } if (almost_equals(c_token, "pointt$ype") || equals(c_token, "pt")) { if (allow_point) { if (set_pt++) break; c_token++; newlp.p_type = int_expression() - 1; } else { int_warn(c_token, "No pointtype specifier allowed, here"); c_token += 2; } continue; } if (almost_equals(c_token, "points$ize") || equals(c_token, "ps")) { if (allow_point) { if (set_ps++) break; c_token++; if (almost_equals(c_token, "var$iable")) { newlp.p_size = PTSZ_VARIABLE; c_token++; } else if (almost_equals(c_token, "def$ault")) { newlp.p_size = PTSZ_DEFAULT; c_token++; } else { newlp.p_size = real_expression(); if (newlp.p_size < 0) newlp.p_size = 0; } } else { int_warn(c_token, "No pointsize specifier allowed, here"); c_token += 2; } continue; } if (almost_equals(c_token, "pointi$nterval") || equals(c_token, "pi")) { c_token++; if (allow_point) { newlp.p_interval = int_expression(); set_pi = 1; } else { int_warn(c_token, "No pointinterval specifier allowed, here"); int_expression(); } continue; } /* caught unknown option -> quit the while(1) loop */ break; } if (set_lt > 1 || set_pal > 1 || set_lw > 1 || set_pt > 1 || set_ps > 1) int_error(c_token, "duplicated arguments in style specification"); if (set_pal) { lp->pm3d_color = newlp.pm3d_color; lp->use_palette = newlp.use_palette; new_lt = LT_SINGLECOLOR; } if (set_lw) lp->l_width = newlp.l_width; if (set_pt) lp->p_type = newlp.p_type; if (set_ps) lp->p_size = newlp.p_size; if (set_pi) lp->p_interval = newlp.p_interval; if (newlp.l_type == LT_COLORFROMCOLUMN) lp->l_type = LT_COLORFROMCOLUMN; return new_lt; } /* <fillstyle> = {empty | solid {<density>} | pattern {<n>}} {noborder | border {<lt>}} */ void parse_fillstyle(struct fill_style_type *fs, int def_style, int def_density, int def_pattern, t_colorspec def_bordertype) { TBOOLEAN set_fill = FALSE; TBOOLEAN set_param = FALSE; TBOOLEAN transparent = FALSE; /* Set defaults */ fs->fillstyle = def_style; fs->filldensity = def_density; fs->fillpattern = def_pattern; fs->border_color = def_bordertype; if (END_OF_COMMAND) return; if (!equals(c_token, "fs") && !almost_equals(c_token, "fill$style")) return; c_token++; while (!END_OF_COMMAND) { if (almost_equals(c_token, "trans$parent")) { transparent = TRUE; c_token++; } if (almost_equals(c_token, "e$mpty")) { fs->fillstyle = FS_EMPTY; c_token++; } else if (almost_equals(c_token, "s$olid")) { fs->fillstyle = transparent ? FS_TRANSPARENT_SOLID : FS_SOLID; set_fill = TRUE; c_token++; } else if (almost_equals(c_token, "p$attern")) { fs->fillstyle = transparent ? FS_TRANSPARENT_PATTERN : FS_PATTERN; set_fill = TRUE; c_token++; } if (END_OF_COMMAND) continue; else if (almost_equals(c_token, "bo$rder")) { fs->border_color.type = TC_DEFAULT; c_token++; if (equals(c_token,"-") || isanumber(c_token)) { fs->border_color.type = TC_LT; fs->border_color.lt = int_expression() - 1; } else if (equals(c_token,"lc") || almost_equals(c_token,"linec$olor")) { parse_colorspec(&fs->border_color, TC_Z); } else if (equals(c_token,"rgb") || equals(c_token,"lt") || almost_equals(c_token,"linet$ype")) { c_token--; parse_colorspec(&fs->border_color, TC_Z); } continue; } else if (almost_equals(c_token, "nobo$rder")) { fs->border_color.type = TC_LT; fs->border_color.lt = LT_NODRAW; c_token++; continue; } /* We hit something unexpected */ if (!set_fill || set_param) break; if (!(isanumber(c_token) || type_udv(c_token) == INTGR || type_udv(c_token) == CMPLX)) break; if (fs->fillstyle == FS_SOLID || fs->fillstyle == FS_TRANSPARENT_SOLID) { /* user sets 0...1, but is stored as an integer 0..100 */ fs->filldensity = 100.0 * real_expression() + 0.5; if (fs->filldensity < 0) fs->filldensity = 0; if (fs->filldensity > 100) fs->filldensity = 100; set_param = TRUE; } else if (fs->fillstyle == FS_PATTERN || fs->fillstyle == FS_TRANSPARENT_PATTERN) { fs->fillpattern = int_expression(); if (fs->fillpattern < 0) fs->fillpattern = 0; set_param = TRUE; } } } /* * Parse the sub-options of text color specification * { def$ault | lt <linetype> | pal$ette { cb <val> | frac$tion <val> | z } * The ordering of alternatives shown in the line above is kept in the symbol definitions * TC_DEFAULT TC_LT TC_LINESTYLE TC_RGB TC_CB TC_FRAC TC_Z TC_VARIABLE (0 1 2 3 4 5 6 7) * and the "options" parameter to parse_colorspec limits legal input to the * corresponding point in the series. So TC_LT allows only default or linetype * coloring, while TC_Z allows all coloring options up to and including pal z */ void parse_colorspec(struct t_colorspec *tc, int options) { c_token++; if (END_OF_COMMAND) int_error(c_token, "expected colorspec"); if (almost_equals(c_token,"def$ault")) { c_token++; tc->type = TC_DEFAULT; } else if (equals(c_token,"bgnd")) { c_token++; tc->type = TC_LT; tc->lt = LT_BACKGROUND; } else if (equals(c_token,"lt")) { c_token++; if (END_OF_COMMAND) int_error(c_token, "expected linetype"); tc->type = TC_LT; tc->lt = int_expression()-1; if (tc->lt < LT_BACKGROUND) { tc->type = TC_DEFAULT; int_warn(c_token,"illegal linetype"); } } else if (options <= TC_LT) { tc->type = TC_DEFAULT; int_error(c_token, "only tc lt <n> possible here"); } else if (equals(c_token,"ls") || almost_equals(c_token,"lines$tyle")) { c_token++; tc->type = TC_LINESTYLE; tc->lt = real_expression(); } else if (almost_equals(c_token,"rgb$color")) { c_token++; tc->type = TC_RGB; if (almost_equals(c_token, "var$iable")) { tc->value = -1.0; c_token++; } else { tc->value = 0.0; tc->lt = parse_color_name(); } } else if (almost_equals(c_token,"pal$ette")) { c_token++; if (equals(c_token,"z")) { /* The actual z value is not yet known, fill it in later */ if (options >= TC_Z) { tc->type = TC_Z; } else { tc->type = TC_DEFAULT; int_error(c_token, "palette z not possible here"); } c_token++; } else if (equals(c_token,"cb")) { tc->type = TC_CB; c_token++; if (END_OF_COMMAND) int_error(c_token, "expected cb value"); tc->value = real_expression(); } else if (almost_equals(c_token,"frac$tion")) { tc->type = TC_FRAC; c_token++; if (END_OF_COMMAND) int_error(c_token, "expected palette fraction"); tc->value = real_expression(); if (tc->value < 0. || tc->value > 1.0) int_error(c_token, "palette fraction out of range"); } else { /* END_OF_COMMAND or palette <blank> */ if (options >= TC_Z) tc->type = TC_Z; } } else if (options >= TC_VARIABLE && almost_equals(c_token,"var$iable")) { tc->type = TC_VARIABLE; c_token++; } else { int_error(c_token, "colorspec option not recognized"); } } long parse_color_name() { char *string; long color = -2; /* Terminal drivers call this after seeing a "background" option */ if (almost_equals(c_token,"rgb$color") && almost_equals(c_token-1,"back$ground")) c_token++; if ((string = try_to_get_string())) { color = lookup_table_nth(pm3d_color_names_tbl, string); if (color >= 0) color = pm3d_color_names_tbl[color].value; else sscanf(string,"#%lx",&color); free(string); if (color == -2) int_error(c_token, "unrecognized color name and not a string \"#AARRGGBB\""); } else { color = int_expression(); } return (unsigned int)(color); } /* arrow parsing... * * allow_as controls whether we are allowed to accept arrowstyle in * the current context [ie not when doing a set style arrow command] */ void arrow_use_properties(struct arrow_style_type *arrow, int tag) { /* This function looks for an arrowstyle defined by 'tag' and * copies its data into the structure 'ap'. */ struct arrowstyle_def *this; this = first_arrowstyle; while (this != NULL) { if (this->tag == tag) { *arrow = this->arrow_properties; return; } else { this = this->next; } } /* tag not found: */ default_arrow_style(arrow); int_warn(NO_CARET,"arrowstyle %d not found", tag); } void arrow_parse( struct arrow_style_type *arrow, TBOOLEAN allow_as) { int set_layer=0, set_line=0, set_head=0; int set_headsize=0, set_headfilled=0; /* Use predefined arrow style */ if (allow_as && (almost_equals(c_token, "arrows$tyle") || equals(c_token, "as"))) { c_token++; if (almost_equals(c_token, "var$iable")) { arrow->tag = AS_VARIABLE; c_token++; } else { arrow_use_properties(arrow, int_expression()); } return; } /* No predefined arrow style; read properties from command line */ /* avoid duplicating options */ while (!END_OF_COMMAND) { if (equals(c_token, "nohead")) { if (set_head++) break; c_token++; arrow->head = NOHEAD; continue; } if (equals(c_token, "head")) { if (set_head++) break; c_token++; arrow->head = END_HEAD; continue; } if (equals(c_token, "backhead")) { if (set_head++) break; c_token++; arrow->head = BACKHEAD; continue; } if (equals(c_token, "heads")) { if (set_head++) break; c_token++; arrow->head = BACKHEAD | END_HEAD; continue; } if (almost_equals(c_token, "fill$ed")) { if (set_headfilled++) break; c_token++; arrow->head_filled = 2; continue; } if (almost_equals(c_token, "empty")) { if (set_headfilled++) break; c_token++; arrow->head_filled = 1; continue; } if (almost_equals(c_token, "nofill$ed")) { if (set_headfilled++) break; c_token++; arrow->head_filled = 0; continue; } if (equals(c_token, "size")) { struct position hsize; if (set_headsize++) break; hsize.scalex = hsize.scaley = hsize.scalez = first_axes; /* only scalex used; scaley is angle of the head in [deg] */ c_token++; if (END_OF_COMMAND) int_error(c_token, "head size expected"); get_position(&hsize); arrow->head_length = hsize.x; arrow->head_lengthunit = hsize.scalex; arrow->head_angle = hsize.y; arrow->head_backangle = hsize.z; /* invalid backangle --> default of 90.0 degrees */ if (arrow->head_backangle <= arrow->head_angle) arrow->head_backangle = 90.0; continue; } if (equals(c_token, "back")) { if (set_layer++) break; c_token++; arrow->layer = 0; continue; } if (equals(c_token, "front")) { if (set_layer++) break; c_token++; arrow->layer = 1; continue; } /* pick up a line spec - allow ls, but no point. */ { int stored_token = c_token; lp_parse(&arrow->lp_properties, TRUE, FALSE); if (stored_token == c_token || set_line++) break; continue; } /* unknown option caught -> quit the while(1) loop */ break; } if (set_layer>1 || set_line>1 || set_head>1 || set_headsize>1 || set_headfilled>1) int_error(c_token, "duplicated arguments in style specification"); } void get_image_options(t_image *image) { if (equals(c_token, "failsafe")) { c_token++; image->fallback = TRUE; } } �����������������������������gnuplot-4.6.4/src/hrcgraph.asm����������������������������������������������������������������������0000644�0004711�0000144�00000020000�06677000231�013211� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������TITLE Hercules graphics module ; Michael Gordon - 8-Dec-86 ; ; Certain routines were taken from the Hercules BIOS of Dave Tutelman - 8/86 ; Others came from pcgraph.asm included in GNUPLOT by Colin Kelley ; ; modified slightly by Colin Kelley - 22-Dec-86 ; added header.mac, parameterized declarations ; added dgroup: in HVmodem to reach HCh_Parms and HGr_Parms - 30-Jan-87 ; modified by Russell Lang 3 Jun 1988 ; added H_init include header.mac if1 include lineproc.mac endif GPg1_Base equ 0B800h ; Graphics page 1 base address _text segment public _H_line, _H_color, _H_mask, _HVmode, _H_puts public _H_init HCfg_Switch equ 03BFH ; Configuration Switch - software switch ; to select graphics card memory map beginproc _H_init mov al, 03H ; allow graphics in b8000:bffff mov dx, HCfg_Switch out dx, al ret _H_init endp hpixel proc near ror word ptr bmask,1 jc cont ret cont: push ax push bx push cx push dx push si mov cx,ax ; x mov dx,bx ; y ; ; [couldn't this be done faster with a lookup table? -cdk] ; ; first compute the address of byte to be modified ; = 90*[row/4] + [col/8] + 2^D*[row/4] + 2^F*page mov bh,cl ; col (low order) in BH mov bl,dl ; row (low order) in BL and bx,0703H ; mask the col & row remainders IFDEF iAPX286 shr cx,3 ; col / 8 shr dx,2 ; row / 4 mov al,90 mul dx ; AX = 90*[ row/4 ] add ax,cx ; ... + col/8 shl bl,5 ; align row remainder ELSE ; same as above, obscure but fast for 8086 shr cx,1 ; divide col by 8 shr cx,1 shr cx,1 shr dx,1 ; divide row by 4 shr dx,1 shl dx,1 ; begin fast multiply by 90 (1011010 B) mov ax,dx shl dx,1 shl dx,1 add ax,dx shl dx,1 add ax,dx shl dx,1 shl dx,1 add ax,dx ; end fast multiply by 90 add ax,cx ; add on the col/8 shl bl,1 ; align row remainder shl bl,1 shl bl,1 shl bl,1 shl bl,1 ENDIF add ah,bl ; use aligned row remainder end_adr_calc: ; address of byte is now in AX mov dx,GPg1_Base ; base of pixel display to DX mov es,dx ; ...and thence to segment reg mov si,ax ; address of byte w/ pixel to index reg mov cl,bh ; bit addr in byte mov al,80H ; '1000 0000' in AL shr al,cl ; shift mask to line up with bit to read/write set_pix: ; set the pixel or es:[si],al ; or the mask with the right byte pop si pop dx pop cx pop bx pop ax ret hpixel endp lineproc _H_line, hpixel ; ; clear - clear page 1 of the screen buffer to zero (effectively, blank ; the screen) ; clear proc near push es push ax push cx push di mov ax, GPg1_Base mov es, ax xor di, di mov cx, 4000h xor ax, ax cld rep stosw ; zero out screen page pop di pop cx pop ax pop es ret clear endp beginproc _H_color push bp mov bp,sp mov al,[bp+X] ; color mov byte ptr color,al pop bp ret _H_color endp beginproc _H_mask push bp mov bp,sp mov ax,[bp+X] ; mask mov word ptr bmask,ax pop bp ret _H_mask endp HCtrl_Port equ 03B8H ; Hercules 6845 control port IO addr HIndx_Port equ 03B4H ; Hercules 6845 index port IO addr HScrn_Enable equ 008h ; Control port bit to enable video HCh_Mode equ 020h ; Character output mode HGr_Mode equ 082h ; Graphics output mode page 1 parm_count equ 12 beginproc _HVmode push bp mov bp, sp push si mov ax, [bp+X] or ah, al mov al, HCh_Mode ; Assume character mode is wanted mov si, offset dgroup:HCh_Parms cmp ah, 0 ; nonzero means switch to graphics jz vmode_ok call near ptr clear ; clear the graphics page mov al, HGr_Mode mov si, offset dgroup:HGr_Parms vmode_ok: mov dx, HCtrl_Port out dx, al ; Set Hercules board to proper mode call near ptr setParms ; Set the 6845 parameters or al, HScrn_Enable ; Enable the video output out dx, al pop si pop bp ret _HVmode endp setParms proc near ; Send 6845 parms to Hercules board push ax push dx push si mov dx, HIndx_Port ; Index port addr -> DX mov ah, 0 ; 0 -> parameter counter sp_loop: mov al, ah out dx, al ; output to 6845 addr register inc dx ; next output to data register mov al, [si] ; next control byte -> al inc si out dx, al ; output control byte dec dx ; 6845 index addr -> dx inc ah ; bump addr cmp ah, parm_count jnz sp_loop pop si pop dx pop ax ret setParms endp ; H_puts - print text in graphics mode ; ; cx = row ; bx = column ; si = address of string (null terminated) to print beginproc _H_puts push bp mov bp, sp push si push ds mov si, [bp+X] ; string offset ifdef LARGE_DATA mov ds, [bp+X+2] ; string segment mov cx, [bp+X+4] ; row mov bx, [bp+X+6] ; col else mov cx, [bp+X+2] ; row mov bx, [bp+X+4] ; col endif ploop: lodsb ; get next char or al, al ; end of display? je pdone call near ptr display inc bx ; bump to next column jmp ploop pdone: pop ds pop si pop bp ret _H_puts endp ; ; display - output an 8x8 character from the IBM ROM to the Herc board ; ; AX = char, BX = column (0-89), CX = row(0-42) ** all preserved ** ; CON8 db 8 CON180 db 180 IBMROM equ 0F000h CHARTAB equ 0FA6Eh display proc near push ds ; save the lot push es push ax push bx push cx push dx push si push di ; setup ds -> IBM ROM, and si -> index into IBM ROM character table located ; at 0fa6eh in the ROM and ax, 07fh mul cs:CON8 ; mult by 8 bytes of table per char mov si, ax mov ax, IBMROM mov ds, ax assume ds:nothing add si, CHARTAB ; add offset of character table ; compute index into Hercules screen memory for scan line 0. The remaining ; seven scan lines are all at fixed offsets from the first. ; ; Since graphics mode treats the screen as sets of 16x4 "characters", ; we need to map an 8x8 real character onto the front or back of ; a pair of graphics "characters". The first four scan lines of our ; 8x8 character will map to the top graphics "character", and the second ; four scan lines map to the graphics character on the "line" (4 scan ; lines high) below it. ; ; For some exotic hardware reason (probably speed), all scan line 0 ; bits (i.e. every fourth scan line) are stored in memory locations ; 0-2000h in the screen buffer. All scan line 1 bits are stored ; 2000h-4000h. Within these banks, they are stored by rows. The first ; scan line on the screen (scan line 0 of graphics character row 0) ; is the first 45 words of memory in the screen buffer. The next 45 ; words are the first scan line graphics row 1, and since graphics ; "characters" are 4 bits high, this second scan line is physically ; the fifth scan line displayed on the screen. ; ; SO, to display an 8x8 character, the 1st and 5th rows of dots are ; both scan line 0 of the graphics "character", the 2nd and 6th are ; scan line 1, and so on. ; ; The column (0-89) tells which byte in a scan line we need to load. ; Since it takes two rows of graphics characters to hold one row of ; our characters, column+90 is a index to scan line 4 rows of pixels ; higher (n+4). Thus 180 bytes of screen memory in any bank (0h, 2000h, ; 4000h, 6000h) represent a row of 8x8 characters. ; ; The starting location in screen memory for the first scan line of ; a character to be displayed will be: (row*180)+column ; The 5th scan line will be at: (row*180)+column+90 ; ; The second and 6th scan lines will be at the above offsets plus ; the bank offset of 2000h. The third and 7th, add 4000h and finally ; the 4th and 8th, add 6000h. ; mov ax, GPg1_Base mov es, ax ; es = hercules page 0 mov ax, cx ; get row mul cs:CON180 ; mult by 180(10) mov di, ax ; di = index reg cld ; insure right direction ;output 8 segments of character to video ram lodsb ; line 0 mov es:[di+bx], al lodsb mov es:[di+bx+2000h], al ; line 1 lodsb mov es:[di+bx+4000h], al ; line 2 lodsb mov es:[di+bx+6000h], al ; line 3 lodsb mov es:[di+bx+90], al ; line 4 lodsb mov es:[di+bx+2000h+90], al ; line 5 lodsb mov es:[di+bx+4000h+90], al ; line 6 lodsb mov es:[di+bx+6000h+90], al ; line 7 pop di pop si pop dx pop cx pop bx pop ax pop es pop ds ret display endp _text ends _data segment bmask dw -1 color db 1 _data ends const segment HCh_Parms db 61H, 50H, 52H, 0FH, 19H, 06H, 19H, 19H, 02H, 0DH, 0BH, 0CH HGr_Parms db 35H, 2DH, 2EH, 07H, 5BH, 02H, 57H, 57H, 02H, 03H, 00H, 00H const ends end gnuplot-4.6.4/src/pm3d.h����������������������������������������������������������������������������0000644�0004711�0000144�00000010437�11453202122�011731� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: pm3d.h,v 1.28 2010/10/06 23:20:50 sfeam Exp $ */ /* GNUPLOT - pm3d.h */ /*[ * * Petr Mikulik, since December 1998 * Copyright: open source as much as possible * * * What is here: #defines, global variables and declaration of routines for * the pm3d plotting mode * ]*/ /* avoid multiple includes */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifndef TERM_HELP #ifndef PM3D_H #define PM3D_H #include "graph3d.h" /* struct surface_points */ /**** Global options for pm3d algorithm (to be accessed by set / show) ****/ /* where to plot pm3d: base or top (color map) or surface (color surface) The string pm3d.where can be any combination of the #defines below. For instance, "b" plot at botton only, "st" plots firstly surface, then top, etc. */ #define PM3D_AT_BASE 'b' #define PM3D_AT_TOP 't' #define PM3D_AT_SURFACE 's' /* options for flushing scans (for pm3d.flush) Note: new terminology compared to my pm3d program; in gnuplot it became begin and right instead of left and right */ #define PM3D_FLUSH_BEGIN 'b' #define PM3D_FLUSH_END 'r' #define PM3D_FLUSH_CENTER 'c' /* direction of taking the scans: forward = as the scans are stored in the file; backward = opposite direction, i.e. like from the end of the file */ #define PM3D_SCANS_AUTOMATIC 'a' #define PM3D_SCANS_FORWARD 'f' #define PM3D_SCANS_BACKWARD 'b' #define PM3D_DEPTH 'd' /* clipping method: PM3D_CLIP_1IN: all 4 points of the quadrangle must be defined and at least 1 point of the quadrangle must be in the x and y ranges PM3D_CLIP_4IN: all 4 points of the quadrangle must be in the x and y ranges */ #define PM3D_CLIP_1IN '1' #define PM3D_CLIP_4IN '4' /* is pm3d plotting style implicit or explicit? */ typedef enum { PM3D_EXPLICIT = 0, PM3D_IMPLICIT = 1 } PM3D_IMPL_MODE; /* from which corner take the color? */ typedef enum { /* keep the following order of PM3D_WHICHCORNER_C1 .. _C4 */ PM3D_WHICHCORNER_C1 = 0, /* corner 1: first scan, first point */ PM3D_WHICHCORNER_C2 = 1, /* corner 2: first scan, second point */ PM3D_WHICHCORNER_C3 = 2, /* corner 3: second scan, first point */ PM3D_WHICHCORNER_C4 = 3, /* corner 4: second scan, second point */ /* now in any order */ PM3D_WHICHCORNER_MEAN = 4, /* average z-value from all 4 corners */ PM3D_WHICHCORNER_GEOMEAN = 5, /* geometrical mean of 4 corners */ PM3D_WHICHCORNER_MEDIAN = 6, /* median of 4 corners */ PM3D_WHICHCORNER_MIN = 7, /* minimum of 4 corners */ PM3D_WHICHCORNER_MAX = 8 /* maximum of 4 corners */ } PM3D_WHICH_CORNERS2COLOR; /* structure defining all properties of pm3d plotting mode (except for the properties of the smooth color box, see color_box instead) */ typedef struct { char where[7]; /* base, top, surface */ char flush; /* left, right, center */ char ftriangles; /* 0/1 (don't) draw flushing triangles */ char direction; /* forward, backward */ char clip; /* 1in, 4in */ int hidden3d_tag; /* if this is > 0, pm3d hidden lines are drawn with this linestyle (which must naturally present). */ PM3D_IMPL_MODE implicit; /* 1: [default] draw ALL surfaces with pm3d 0: only surfaces specified with 'with pm3d' */ PM3D_WHICH_CORNERS2COLOR which_corner_color; /* default: average color from all 4 points */ int interp_i; /* # of interpolation steps along scanline */ int interp_j; /* # of interpolation steps between scanlines */ } pm3d_struct; extern pm3d_struct pm3d; extern struct lp_style_type pm3d_border_lp; /**** Declaration of routines ****/ int get_pm3d_at_option __PROTO((char *pm3d_where)); void pm3d_depth_queue_clear __PROTO((void)); void pm3d_depth_queue_flush __PROTO((void)); void pm3d_reset __PROTO((void)); void pm3d_draw_one __PROTO((struct surface_points* plots)); double z2cb __PROTO((double z)); double cb2gray __PROTO((double cb)); void pm3d_rearrange_scan_array __PROTO((struct surface_points* this_plot, struct iso_curve*** first_ptr, int* first_n, int* first_invert, struct iso_curve*** second_ptr, int* second_n, int* second_invert)); void set_plot_with_palette __PROTO((int plot_num, int plot_mode)); TBOOLEAN is_plot_with_palette __PROTO((void)); TBOOLEAN is_plot_with_colorbox __PROTO((void)); #endif /* PM3D_H */ #endif /* TERM_HELP */ /* eof pm3d.h */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/getcolor.c������������������������������������������������������������������������0000644�0004711�0000144�00000054342�11643712115�012713� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: getcolor.c,v 1.32 2011/10/08 00:07:41 sfeam Exp $"); } #endif /* GNUPLOT - getcolor.c */ /*[ * * Petr Mikulik, December 1998 -- June 1999 * Copyright: open source as much as possible * ]*/ #include "syscfg.h" #include "stdfn.h" #include "util.h" #include "getcolor.h" /* * This file implements all the gray to color transforms except one: * calculate_color_from_formulae() which can be found in color.c. * calculate_color_from_formulae() belongs logicaly into this (getcolor.c) * file, but it can't be here due to linkage problems: gnuplot_x11 * needs a lot of code from getcolor.c but does not contain any function * evaluation code [and does not call calculate_color_from_formulae()]. * This file is compiled twice: Once as part of gnuplot and the second * time with -DGPLT_X11_MODE resulting in getcolor_x11.o which is linked * into gnuplot_x11. With GPLT_X11_MODE defined this file does not * contain code for calculating colors from gray by user defined functions. */ #ifndef GPLT_X11_MODE static int calculate_color_from_formulae __PROTO((double, rgb_color *)); #endif static void color_components_from_gray __PROTO((double gray, rgb_color *color)); static int interpolate_color_from_gray __PROTO((double, rgb_color *)); static double get_max_dev __PROTO((rgb_color *colors, int j, double limit)); static int is_extremum __PROTO((rgb_color left,rgb_color mid,rgb_color right)); static void CMY_2_RGB __PROTO((rgb_color *color)); static void CIEXYZ_2_RGB __PROTO((rgb_color *color)); static void YIQ_2_RGB __PROTO((rgb_color *color)); static void HSV_2_RGB __PROTO((rgb_color *color)); /* check if two palettes p1 and p2 differ significantly */ int palettes_differ(t_sm_palette *p1, t_sm_palette *p2) { if (p1->colorMode != p2->colorMode) return 1; if (p1->positive != p2->positive) return 1; if (p1->cmodel != p2->cmodel) return 1; if (p1->use_maxcolors != p2->use_maxcolors) return 1; switch(p1->colorMode) { case SMPAL_COLOR_MODE_NONE: return 0; /* ?? */ case SMPAL_COLOR_MODE_GRAY: if (fabs(p1->gamma - p2->gamma) > 1e-3) return 1; break; case SMPAL_COLOR_MODE_RGB: if (p1->colorFormulae != p2->colorFormulae) return 1; if (p1->formulaR != p2->formulaR) return 1; if (p1->formulaG != p2->formulaG) return 1; if (p1->formulaB != p2->formulaB) return 1; /* if (p1->ps_allcF != p2->ps_allcF) return 1; */ break; case SMPAL_COLOR_MODE_FUNCTIONS: /* coarse check based on typed fnct definitions */ if (strcmp(p1->Afunc.definition, p2->Afunc.definition)) return 1; if (strcmp(p1->Bfunc.definition, p2->Bfunc.definition)) return 1; if (strcmp(p1->Cfunc.definition, p2->Cfunc.definition)) return 1; break; case SMPAL_COLOR_MODE_GRADIENT: { int i=0; if (p1->gradient_num != p2->gradient_num) return 1; for(i=0; i<p1->gradient_num; ++i) { if (p1->gradient[i].pos != p2->gradient[i].pos) return 1; if (p1->gradient[i].col.r != p2->gradient[i].col.r) return 1; if (p1->gradient[i].col.g != p2->gradient[i].col.g) return 1; if (p1->gradient[i].col.b != p2->gradient[i].col.b) return 1; } break; case SMPAL_COLOR_MODE_CUBEHELIX: return 1; break; } /* case GRADIENT */ } /* switch() */ return 0; /* no real difference found */ } #define CONSTRAIN(x) ((x) < 0 ? 0 : ((x) > 1 ? 1 : (x))) /* This one takes the gradient defined in sm_palette.gradient and * returns an interpolated color for the given gray value. It * does not matter wether RGB or HSV or whatever values are stored * in sm_palette.gradient[i].col, they will simply be interpolated. * Return 0 on sucess, 1 if gray outside the range covered by the * gradient. No gamma correction is done. The user can implement * gamma correction specifying more points. * sm_palette.gradient[] should be sorted acording to .pos. * Returns 1 on failure and fills color with "nearest" color. */ static int interpolate_color_from_gray(double gray, rgb_color *color) { int idx, maxidx; rgb_color *col1; rgb_color *col2; if (gray < 0) { color->r = sm_palette.gradient[0].col.r; color->g = sm_palette.gradient[0].col.g; color->b = sm_palette.gradient[0].col.b; return 1; } maxidx = sm_palette.gradient_num; if (gray > 1) { color->r = sm_palette.gradient[maxidx-1].col.r; color->g = sm_palette.gradient[maxidx-1].col.g; color->b = sm_palette.gradient[maxidx-1].col.b; return 1; } /* find index by bisecting */ idx = 0; if (maxidx > 1) { int topidx = maxidx - 1; /* treat idx as though it is bottom index */ while (idx != topidx) { int tmpidx = (idx + topidx) / 2; if (sm_palette.gradient[tmpidx].pos < gray) idx = tmpidx + 1; /* round up */ else topidx = tmpidx; } } col2 = & sm_palette.gradient[idx].col; if (gray == sm_palette.gradient[idx].pos) { /* exact hit */ color->r = col2->r; color->g = col2->g; color->b = col2->b; } else { /* linear interpolation of two colors */ double dx = sm_palette.gradient[idx].pos - sm_palette.gradient[idx - 1].pos; double f = (gray - sm_palette.gradient[idx-1].pos) / dx; col1 = & sm_palette.gradient[idx - 1].col; color->r = (col1->r + f * (col2->r - col1->r)); color->g = (col1->g + f * (col2->g - col1->g)); color->b = (col1->b + f * (col2->b - col1->b)); } return 0; } #ifndef GPLT_X11_MODE /* Fills color with the values calculated from sm_palette.[ABC]func * The color values are clipped to [0,1] without further notice. * Returns 0 or does an int_error() when function evaluatin failed. * The result is not in RGB color space jet. */ static int calculate_color_from_formulae(double gray, rgb_color *color) { struct value v; double a, b, c; #define NO_CARET (-1) (void) Gcomplex(&sm_palette.Afunc.dummy_values[0], gray, 0.0); evaluate_at(sm_palette.Afunc.at, &v); if (undefined) int_error(NO_CARET, "Undefined value first color during function evaluation"); a = real(&v); a = CONSTRAIN(a); (void) Gcomplex(&sm_palette.Bfunc.dummy_values[0], gray, 0.0); evaluate_at(sm_palette.Bfunc.at, &v); if (undefined) int_error(NO_CARET, "Undefined value second color during function evaluation"); b = real(&v); b = CONSTRAIN(b); (void) Gcomplex(&sm_palette.Cfunc.dummy_values[0], gray, 0.0); evaluate_at(sm_palette.Cfunc.at, &v); if (undefined) int_error(NO_CARET, "Undefined value third color during function evaluation"); c = real(&v); c = CONSTRAIN(c); color->r = a; color->g = b; color->b = c; #undef NO_CARET return 0; } #endif /* !GPLT_X11_MODE */ /* Map gray in [0,1] to color components according to colorMode */ static void color_components_from_gray(double gray, rgb_color *color) { if (gray < 0) gray = 0; else if (gray > 1.0) gray = 1.0; switch(sm_palette.colorMode) { case SMPAL_COLOR_MODE_GRAY: color->r = color->g = color->b = pow(gray, 1.0/sm_palette.gamma); return; /* all done, no color space transformation needed */ case SMPAL_COLOR_MODE_RGB: color->r = GetColorValueFromFormula(sm_palette.formulaR, gray); color->g = GetColorValueFromFormula(sm_palette.formulaG, gray); color->b = GetColorValueFromFormula(sm_palette.formulaB, gray); break; case SMPAL_COLOR_MODE_GRADIENT: interpolate_color_from_gray(gray, color); break; #ifndef GPLT_X11_MODE case SMPAL_COLOR_MODE_FUNCTIONS: calculate_color_from_formulae(gray, color); break; #endif /* !GPLT_X11_MODE */ case SMPAL_COLOR_MODE_CUBEHELIX: { double phi, a; phi = 2. * M_PI * (sm_palette.cubehelix_start/3. + gray * sm_palette.cubehelix_cycles); if (sm_palette.gamma != 1.0) gray = pow(gray, 1./sm_palette.gamma); a = sm_palette.cubehelix_saturation * gray * (1.-gray) / 2.; color->r = gray + a * (-0.14861 * cos(phi) + 1.78277 * sin(phi)); color->g = gray + a * (-0.29227 * cos(phi) - 0.90649 * sin(phi)); color->b = gray + a * ( 1.97294 * cos(phi)); if (color->r > 1.0) color->r = 1.0; if (color->r < 0.0) color->r = 0.0; if (color->g > 1.0) color->g = 1.0; if (color->g < 0.0) color->g = 0.0; if (color->b > 1.0) color->b = 1.0; if (color->b < 0.0) color->b = 0.0; } break; default: fprintf(stderr, "%s:%d ooops: Unknown colorMode '%c'.\n", __FILE__, __LINE__, (char)(sm_palette.colorMode)); } } /* * Map a gray value in [0,1] to the corresponding RGB values in [0,1], * according to the current colorMode and color space. * * Note -- November 2003: this routine has been renamed from color_from_gray() * to rgb1_from_gray() in order to more clearly distinguish structures * rgb_color and rgb255_color. */ void rgb1_from_gray(double gray, rgb_color *color) { /* get the color */ color_components_from_gray(gray, color); if (sm_palette.colorMode == SMPAL_COLOR_MODE_GRAY) return; /* transform to RGB if necessary */ switch(sm_palette.cmodel) { case C_MODEL_RGB: break; case C_MODEL_HSV: HSV_2_RGB(color); break; case C_MODEL_CMY: CMY_2_RGB(color); break; case C_MODEL_YIQ: YIQ_2_RGB(color); break; case C_MODEL_XYZ: CIEXYZ_2_RGB(color); break; default: fprintf(stderr, "%s:%d ooops: Unknown color model '%c'\n", __FILE__, __LINE__, (char)(sm_palette.cmodel)); } } /* * Convenience function to map R, G and B float values [0,1] to uchars [0,255]. */ void rgb255_from_rgb1(rgb_color rgb1, rgb255_color *rgb255) { rgb255->r = (unsigned char)(255 * rgb1.r + 0.5); rgb255->g = (unsigned char)(255 * rgb1.g + 0.5); rgb255->b = (unsigned char)(255 * rgb1.b + 0.5); } /* * Convenience function to map gray values to R, G and B values in [0,1], * limiting the resolution of sampling a continuous palette to use_maxcolors. * * EAM Sep 2010 - Guarantee that for palettes with multiple segments * (created by 'set palette defined ...') the mapped gray value is always * in the appropriate segment. This has the effect of overriding * use_maxcolors if the defined palette has more segments than the nominal * limit. */ void rgb1maxcolors_from_gray(double gray, rgb_color *color) { if (sm_palette.use_maxcolors != 0) gray = quantize_gray(gray); rgb1_from_gray(gray, color); } double quantize_gray( double gray ) { double degray = floor(gray * sm_palette.use_maxcolors) / (sm_palette.use_maxcolors-1); if (sm_palette.colorMode == SMPAL_COLOR_MODE_GRADIENT) { int j; if ((sm_palette.gradient_num <= 2) && (degray == 0)) ; /* Backward compatibility with common case of 1 segment */ else for (j=0; j<sm_palette.gradient_num; j++) { if ((gray >= sm_palette.gradient[j].pos) && (gray < sm_palette.gradient[j+1].pos)) { if ((degray < sm_palette.gradient[j].pos) || (degray > sm_palette.gradient[j+1].pos)) degray = (sm_palette.gradient[j].pos + sm_palette.gradient[j+1].pos) / 2.; } if (gray < sm_palette.gradient[j+1].pos) break; } } return degray; } /* * Convenience function to map gray values to R, G and B values in [0,255], * taking care of palette maxcolors (i.e., discrete nb of colors). */ void rgb255maxcolors_from_gray(double gray, rgb255_color *rgb255) { rgb_color rgb1; rgb1maxcolors_from_gray(gray, &rgb1); rgb255_from_rgb1(rgb1, rgb255); } /* * Used by approximate_palette */ static double get_max_dev(rgb_color *colors, int j, double limit) { double max_dev = 0.0; double rdev, gdev, bdev; double r=colors[0].r, g=colors[0].g, b=colors[0].b; int i; double sr = (colors[j].r - r) / j; double sg = (colors[j].g - g) / j; double sb = (colors[j].b - b) / j; for(i=1; i<j; ++i) { double dx = i; rdev = fabs(sr*dx + r - colors[i].r); gdev = fabs(sg*dx + g - colors[i].g); bdev = fabs(sb*dx + b - colors[i].b); if(rdev > max_dev) max_dev = rdev; if(gdev > max_dev) max_dev = gdev; if(bdev > max_dev) max_dev = bdev; if(max_dev >= limit) break; } return max_dev; } /* * Used by approximate_palette: true if one color component in mid * is higher (or lower) than both left and right, flase other wise */ static int is_extremum(rgb_color left, rgb_color mid, rgb_color right) { /* mid is maximum */ if(left.r < mid.r && mid.r > right.r) return 1; if(left.g < mid.g && mid.g > right.g) return 1; if(left.b < mid.b && mid.b > right.b) return 1; /* mid is minimum */ if(left.r > mid.r && mid.r < right.r) return 1; if(left.g > mid.g && mid.g < right.g) return 1; if(left.b > mid.b && mid.b < right.b) return 1; return 0; } #define GROW_GRADIENT(n) do { \ if(cnt == gradient_size) { \ gradient_size += (n); \ gradient = (gradient_struct*) \ realloc(gradient, gradient_size * sizeof(gradient_struct)); \ } \ } while(0) /* * This function takes a palette and constructs a gradient which can * be used to approximate the palette by linear interpolation. * The palette is sampled at samples+1 points equally spaced in [0,1]. * From this huge gradient a much smaler one is constructed by selecting * just those sampling points which still do approximate the full sampled * one well enough. allowed_deviation determines the maximum deviation * of all color components which is still acceptable for the reduced * gradient. Use a sufficiently large number of samples (500 to 5000). * Please free() the returned gradient after use. samples, allowed_deviation * and max_skip may be <=0 and useful defaults will be used. * Most probably it's useless to approximate a gradient- or rgbformulae- * palette. Use it to build gradients from function palettes. */ gradient_struct * approximate_palette(t_sm_palette *palette, int samples, double allowed_deviation, int *gradient_num) { int i=0, j=0; double gray=0; int gradient_size=50; gradient_struct *gradient; int colors_size=100; rgb_color *colors; int cnt=0; rgb_color color; double max_dev=0.0; /* int maximum_j=0, extrema=0; */ /* useful defaults */ if (samples <= 0) samples = 2000; if (allowed_deviation <= 0) allowed_deviation = 0.003; gradient = (gradient_struct*) malloc(gradient_size * sizeof(gradient_struct)); colors = (rgb_color*) malloc(colors_size * sizeof(rgb_color)); /* start (gray=0.0) is needed */ cnt = 0; color_components_from_gray(0.0, colors + 0); gradient[0].pos = 0.0; gradient[0].col = colors[0]; ++cnt; color_components_from_gray(1.0 / samples, colors + 1); for(i = 0; i < samples; ++i) { for(j = 2; i + j <= samples; ++j) { gray = ((double) (i + j)) / samples; if (j == colors_size) { colors_size += 50; colors = (rgb_color *) realloc(colors, colors_size*sizeof(gradient_struct)); } color_components_from_gray(gray, colors + j); /* test for extremum */ if(is_extremum(colors[j - 2], colors[j - 1], colors[j])) { /* fprintf(stderr,"Extremum at %g\n", gray); */ /* ++extrema; */ break; } /* to big deviation */ max_dev = get_max_dev(colors, j, allowed_deviation); if(max_dev > allowed_deviation) { /* fprintf(stderr,"Control Point at %.3g\n",gray); */ break; } } GROW_GRADIENT(25); gradient[cnt].pos = gray; gradient[cnt].col = colors[j - 1]; ++cnt; /* if(j-1 > maximum_j) maximum_j = j-1; */ colors[0] = colors[j - 1]; colors[1] = colors[j]; i += j - 1; } color_components_from_gray(1.0, &color); GROW_GRADIENT(1); gradient[cnt].pos = 1.0; gradient[cnt].col = color; ++cnt; /*********** fprintf(stderr, "PS interpolation table: %d samples, allowed deviation %.2f%%:\n", samples, 100*allowed_deviation); fprintf(stderr, " --> new size %d, %d extrema, max skip %d\n", cnt, extrema, maximum_j); ************/ free(colors); *gradient_num = cnt; return gradient; /* don't forget to free() it once you'r done with it */ } #undef GROW_GRADIENT /* * Original fixed color transformations */ double GetColorValueFromFormula(int formula, double x) { /* the input gray x is supposed to be in interval [0,1] */ if (formula < 0) { /* negate the value for negative formula */ x = 1 - x; formula = -formula; } switch (formula) { case 0: return 0; case 1: return 0.5; case 2: return 1; case 3: /* x = x */ break; case 4: x = x * x; break; case 5: x = x * x * x; break; case 6: x = x * x * x * x; break; case 7: x = sqrt(x); break; case 8: x = sqrt(sqrt(x)); break; case 9: x = sin(90 * x * DEG2RAD); break; case 10: x = cos(90 * x * DEG2RAD); break; case 11: x = fabs(x - 0.5); break; case 12: x = (2 * x - 1) * (2.0 * x - 1); break; case 13: x = sin(180 * x * DEG2RAD); break; case 14: x = fabs(cos(180 * x * DEG2RAD)); break; case 15: x = sin(360 * x * DEG2RAD); break; case 16: x = cos(360 * x * DEG2RAD); break; case 17: x = fabs(sin(360 * x * DEG2RAD)); break; case 18: x = fabs(cos(360 * x * DEG2RAD)); break; case 19: x = fabs(sin(720 * x * DEG2RAD)); break; case 20: x = fabs(cos(720 * x * DEG2RAD)); break; case 21: x = 3 * x; break; case 22: x = 3 * x - 1; break; case 23: x = 3 * x - 2; break; case 24: x = fabs(3 * x - 1); break; case 25: x = fabs(3 * x - 2); break; case 26: x = (1.5 * x - 0.5); break; case 27: x = (1.5 * x - 1); break; case 28: x = fabs(1.5 * x - 0.5); break; case 29: x = fabs(1.5 * x - 1); break; case 30: if (x <= 0.25) return 0; if (x >= 0.57) return 1; x = x / 0.32 - 0.78125; break; case 31: if (x <= 0.42) return 0; if (x >= 0.92) return 1; x = 2 * x - 0.84; break; case 32: if (x <= 0.42) x *= 4; else x = (x <= 0.92) ? -2 * x + 1.84 : x / 0.08 - 11.5; break; case 33: x = fabs(2 * x - 0.5); break; case 34: x = 2 * x; break; case 35: x = 2 * x - 0.5; break; case 36: x = 2 * x - 1; break; /* IMPORTANT: if any new formula is added here, then: (1) its postscript counterpart must be added to the array ps_math_color_formulae[] below. (2) number of colours must be incremented in color.c: variable sm_palette, first item---search for "t_sm_palette sm_palette = " */ default: fprintf(stderr, "Fatal: undefined color formula (can be 0--%i)\n", sm_palette.colorFormulae - 1); exit(1); } if (x <= 0) return 0; if (x >= 1) return 1; return x; } /* Implementation of pm3dGetColorValue() in the postscript way. Notice that the description, i.e. the part after %, is important since it is used in `show pm3d' for displaying the analytical formulae. The postscript formulae will be expanded into lines like: "/cF0 {pop 0} bind def\t% 0", "/cF4 {dup mul} bind def\t% x^2", */ const char *ps_math_color_formulae[] = { /* /cF0 */ "pop 0", "0", /* /cF1 */ "pop 0.5", "0.5", /* /cF2 */ "pop 1", "1", /* /cF3 */ " ", "x", /* /cF4 */ "dup mul", "x^2", /* /cF5 */ "dup dup mul mul", "x^3", /* /cF6 */ "dup mul dup mul", "x^4", /* /cF7 */ "sqrt", "sqrt(x)", /* /cF8 */ "sqrt sqrt", "sqrt(sqrt(x))", /* /cF9 */ "90 mul sin", "sin(90x)", /* /cF10 */ "90 mul cos", "cos(90x)", /* /cF11 */ "0.5 sub abs", "|x-0.5|", /* /cF12 */ "2 mul 1 sub dup mul", "(2x-1)^2", /* /cF13 */ "180 mul sin", "sin(180x)", /* /cF14 */ "180 mul cos abs", "|cos(180x)|", /* /cF15 */ "360 mul sin", "sin(360x)", /* /cF16 */ "360 mul cos", "cos(360x)", /* /cF17 */ "360 mul sin abs", "|sin(360x)|", /* /cF18 */ "360 mul cos abs", "|cos(360x)|", /* /cF19 */ "720 mul sin abs", "|sin(720x)|", /* /cF20 */ "720 mul cos abs", "|cos(720x)|", /* /cF21 */ "3 mul", "3x", /* /cF22 */ "3 mul 1 sub", "3x-1", /* /cF23 */ "3 mul 2 sub", "3x-2", /* /cF24 */ "3 mul 1 sub abs", "|3x-1|", /* /cF25 */ "3 mul 2 sub abs", "|3x-2|", /* /cF26 */ "1.5 mul .5 sub", "(3x-1)/2", /* /cF27 */ "1.5 mul 1 sub", "(3x-2)/2", /* /cF28 */ "1.5 mul .5 sub abs", "|(3x-1)/2|", /* /cF29 */ "1.5 mul 1 sub abs", "|(3x-2)/2|", /* /cF30 */ "0.32 div 0.78125 sub", "x/0.32-0.78125", /* /cF31 */ "2 mul 0.84 sub", "2*x-0.84", /* /cF32 */ "dup 0.42 le {4 mul} {dup 0.92 le {-2 mul 1.84 add} {0.08 div 11.5 sub} ifelse} ifelse", "4x;1;-2x+1.84;x/0.08-11.5", /* /cF33 */ "2 mul 0.5 sub abs", "|2*x - 0.5|", /* /cF34 */ "2 mul", "2*x", /* /cF35 */ "2 mul 0.5 sub", "2*x - 0.5", /* /cF36 */ "2 mul 1 sub", "2*x - 1", "", ""}; /* * Color Conversion Algorithms * taken from http://www.cs.rit.edu/~ncs/color/t_convert.html * each color model should provide a conversion to RGB. * RGB values are clipped to [0,1] as some colors in some * models have no RGB value. */ static void CMY_2_RGB(rgb_color *col) { double c,m,y; c = col->r; m = col->g; y = col->b; col->r = CONSTRAIN(1.0 - c); col->g = CONSTRAIN(1.0 - m); col->b = CONSTRAIN(1.0 - y); } static void CIEXYZ_2_RGB(rgb_color *col) { double x,y,z; x = col->r; y = col->g; z = col->b; col->r = CONSTRAIN( 1.9100 * x - 0.5338 * y - 0.2891 * z); col->g = CONSTRAIN(-0.9844 * x + 1.9990 * y - 0.0279 * z); col->b = CONSTRAIN( 0.0585 * x - 0.1187 * y - 0.9017 * z); } static void YIQ_2_RGB(rgb_color *col) { double y,i,q; y = col->r; i = col->g; q = col->b; col->r = CONSTRAIN(y - 0.956 * i + 0.621 * q); col->g = CONSTRAIN(y - 0.272 * i - 0.647 * q); col->b = CONSTRAIN(y - 1.105 * i - 1.702 * q); } static void HSV_2_RGB(rgb_color *col) { double h,s,v, f,p,q,t; int i; h = col->r; s = col->g; v = col->b; if (s == 0) { /* achromatic (gray) */ col->r = col->g = col->b = v; return; } h *= 6.; /* h range in gnuplot is [0,1] and not the usual [0,360] */ i = floor(h); f = h - i; p = v * (1.0 - s); q = v * (1.0 - s*f); t = v * (1.0 - s*(1.0-f)); switch(i % 6) { case 0: col->r = v; col->g = t; col->b = p; break; case 1: col->r = q; col->g = v; col->b = p; break; case 2: col->r = p; col->g = v; col->b = t; break; case 3: col->r = p; col->g = q; col->b = v; break; case 4: col->r = t; col->g = p; col->b = v; break; default: col->r = v; col->g = p; col->b = q; break; } } #undef CONSTRAIN /* eof getcolor.c */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/version.h�������������������������������������������������������������������������0000644�0004711�0000144�00000003724�10465207233�012566� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: version.h,v 1.5 2006/08/05 21:33:15 sfeam Exp $ */ /* GNUPLOT - version.h */ /*[ * Copyright 2000, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_VERSION_H #define GNUPLOT_VERSION_H #include "syscfg.h" extern const char gnuplot_version[]; extern const char gnuplot_patchlevel[]; extern const char gnuplot_date[]; extern const char gnuplot_copyright[]; extern const char faq_location[]; extern const char bug_email[]; extern const char help_email[]; extern char os_name[]; extern char os_rel[]; extern char *compile_options; #endif /* GNUPLOT_VERSION_H */ ��������������������������������������������gnuplot-4.6.4/src/pcgraph.asm�����������������������������������������������������������������������0000644�0004711�0000144�00000007525�06677000256�013067� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������TITLE PC graphics module ; uses LINEPROC.MAC ; Michael Gordon - 8-Dec-86 ; ; Certain routines were taken from the Hercules BIOS of Dave Tutelman - 8/86 ; Others came from pcgraph.asm included in GNUPLOT by Colin Kelley ; ; modified slightly by Colin Kelley - 22-Dec-86 ; added header.mac, parameterized declarations ; added dgroup: in HVmodem to reach HCh_Parms and HGr_Parms - 30-Jan-87 ; ; modified and added to for use in plot(3) routines back end. ; Gil Webster. ; ; Assemble with masm ver. 4. include header.mac if1 include lineproc.mac endif GPg1_Base equ 0B800h ; Graphics page 1 base address extrn _inter:far _text segment public _PC_line, _PC_color, _PC_mask, _PC_curloc, _PC_puts, _Vmode public _erase, _save_stack, _ss_interrupt pcpixel proc near ror word ptr linemask,1 jc cont ret cont: push ax push bx push cx push dx push bp mov cx,ax ; x mov dx,bx ; y mov ah,0ch ; ah = write pixel mov al,byte ptr color mov bh, 0 ; page 0 int 10h pop bp pop dx pop cx pop bx pop ax ret pcpixel endp lineproc _PC_line, pcpixel ; ; erase - clear page 1 of the screen buffer to zero (effectively, blank ; the screen) ; beginproc _erase push es push ax push cx push di mov ax, GPg1_Base mov es, ax xor di, di mov cx, 4000h xor ax, ax cld rep stosw ; zero out screen page pop di pop cx pop ax pop es ret _erase endp beginproc _PC_color push bp mov bp,sp mov al,[bp+X] ; color mov byte ptr color,al pop bp ret _PC_color endp beginproc _PC_mask push bp mov bp,sp mov ax,[bp+X] ; mask mov word ptr linemask,ax pop bp ret _PC_mask endp beginproc _Vmode push bp mov bp,sp push si push di mov ax,[bp+X] int 10h pop di pop si pop bp ret _Vmode endp beginproc _PC_curloc push bp mov bp,sp mov dh, byte ptr [bp+X] ; row number mov dl, byte ptr [bp+X+2] ; col number mov bh, 0 mov ah, 2 int 10h pop bp ret _PC_curloc endp ; ; thanks to watale!broehl for finding a bug here--I wasn't pushing BP ; and reloading AH before INT 10H, which is necessary on genuine IBM ; boards... ; beginproc _PC_puts push bp mov bp,sp push si mov bl,byte ptr color mov si,[bp+X] ; offset ifdef LARGE_DATA mov es,[bp+X+2] ; segment if large or compact data model endif puts2: ifdef LARGE_DATA mov al,es:[si] else mov al,[si] endif or al,al jz puts3 mov ah,0eh ; write TTY char int 10h inc si jmp short puts2 puts3: pop si pop bp ret _PC_puts endp ; int kbhit(); ; for those without MSC 4.0 ; Use BIOS interrupt 16h to determine if a key is waiting in the buffer. ; Return nonzero if so. ; beginproc _kbhit mov ah, 1 ; function code 1 is keyboard test int 16h ; keyboard functions jnz kbfin ; Exit if char available xor ax, ax ; No char: return zero. kbfin: ret _kbhit endp ; _save_stack and _ss_interrupt are needed due to a bug in the MSC 4.0 ; code when run under MS-DOS 3.x. Starting with 3.0, MS-DOS automatically ; switches to an internal stack during system calls. This leaves SS:SP ; pointing at MS-DOS's stack when the ^C interrupt (INT 23H) is triggered. ; MSC should restore its own stack before calling the user signal() routine, ; but it doesn't. ; ; Presumably this code will be unnecessary in later releases of the compiler. ; ; _save_stack saves the current SS:SP to be loaded later by _ss_interrupt. ; beginproc _save_stack mov ax,ss mov cs:save_ss,ax mov ax,sp mov cs:save_sp,ax ret _save_stack endp ; _ss_interrupt is called on ^C (INT 23H). It restores SS:SP as saved in ; _save_stack and then jumps to the C routine interrupt(). ; beginproc _ss_interrupt cli ; no interrupts while the stack is changed! mov ax,-1 ; self-modifying code again save_ss equ this word - 2 mov ss,ax mov sp,-1 ; here too save_sp equ this word - 2 sti jmp far ptr _inter; now it's safe to call the real routine _ss_interrupt endp _text ends const segment linemask dw -1 color db 1 const ends end ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/save.c����������������������������������������������������������������������������0000644�0004711�0000144�00000125462�11651442342�012036� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: save.c,v 1.197 2011/10/25 05:10:58 sfeam Exp $"); } #endif /* GNUPLOT - save.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "save.h" #include "command.h" #include "contour.h" #include "datafile.h" #include "eval.h" #include "fit.h" #include "gp_time.h" #include "graphics.h" #include "hidden3d.h" #include "misc.h" #include "plot2d.h" #include "plot3d.h" #include "setshow.h" #include "term_api.h" #include "util.h" #include "variable.h" #include "pm3d.h" #include "getcolor.h" static void save_functions__sub __PROTO((FILE *)); static void save_variables__sub __PROTO((FILE *)); static void save_tics __PROTO((FILE *, AXIS_INDEX)); static void save_position __PROTO((FILE *, struct position *, TBOOLEAN offset)); static void save_zeroaxis __PROTO((FILE *,AXIS_INDEX)); static void save_set_all __PROTO((FILE *)); /* * functions corresponding to the arguments of the GNUPLOT `save` command */ void save_functions(FILE *fp) { /* I _love_ information written at the top and the end * of a human readable ASCII file. */ show_version(fp); save_functions__sub(fp); fputs("# EOF\n", fp); } void save_variables(FILE *fp) { show_version(fp); save_variables__sub(fp); fputs("# EOF\n", fp); } void save_set(FILE *fp) { show_version(fp); save_set_all(fp); fputs("# EOF\n", fp); } void save_all(FILE *fp) { show_version(fp); save_set_all(fp); save_functions__sub(fp); save_variables__sub(fp); fprintf(fp, "%s\n", replot_line); if (wri_to_fil_last_fit_cmd(NULL)) { fputs("## ", fp); wri_to_fil_last_fit_cmd(fp); putc('\n', fp); } fputs("# EOF\n", fp); } /* * auxiliary functions */ static void save_functions__sub(FILE *fp) { struct udft_entry *udf = first_udf; while (udf) { if (udf->definition) { fprintf(fp, "%s\n", udf->definition); } udf = udf->next_udf; } } static void save_variables__sub(FILE *fp) { /* always skip pi */ struct udvt_entry *udv = first_udv->next_udv; while (udv) { if (!udv->udv_undef) { if (strncmp(udv->udv_name,"GPVAL_",6) && strncmp(udv->udv_name,"MOUSE_",6) && strncmp(udv->udv_name,"NaN",4)) { fprintf(fp, "%s = ", udv->udv_name); disp_value(fp, &(udv->udv_value), TRUE); (void) putc('\n', fp); } } udv = udv->next_udv; } } /* HBB 19990823: new function 'save term'. This will be mainly useful * for the typical 'set term post ... plot ... set term <normal term> * sequence. It's the only 'save' function that will write the * current term setting to a file uncommentedly. */ void save_term(FILE *fp) { show_version(fp); /* A possible gotcha: the default initialization often doesn't set * term_options, but a 'set term <type>' without options doesn't * reset the options to startup defaults. This may have to be * changed on a per-terminal driver basis... */ if (term) fprintf(fp, "set terminal %s %s\n", term->name, term_options); else fputs("set terminal unknown\n", fp); /* output will still be written in commented form. Otherwise, the * risk of overwriting files is just too high */ if (outstr) fprintf(fp, "# set output '%s'\n", outstr); else fputs("# set output\n", fp); fputs("# EOF\n", fp); } static void save_set_all(FILE *fp) { struct text_label *this_label; struct arrow_def *this_arrow; struct linestyle_def *this_linestyle; struct arrowstyle_def *this_arrowstyle; legend_key *key = &keyT; int axis; /* opinions are split as to whether we save term and outfile * as a compromise, we output them as comments ! */ if (term) fprintf(fp, "# set terminal %s %s\n", term->name, term_options); else fputs("# set terminal unknown\n", fp); if (outstr) fprintf(fp, "# set output '%s'\n", outstr); else fputs("# set output\n", fp); fprintf(fp, "\ %sset clip points\n\ %sset clip one\n\ %sset clip two\n\ set bar %f %s\n", (clip_points) ? "" : "un", (clip_lines1) ? "" : "un", (clip_lines2) ? "" : "un", bar_size, (bar_layer == LAYER_BACK) ? "back" : "front"); if (draw_border) { fprintf(fp, "set border %d %s", draw_border, border_layer == 0 ? "back" : "front"); save_linetype(fp, &border_lp, FALSE); fprintf(fp, "\n"); } else fputs("unset border\n", fp); for (axis = FIRST_AXES; axis < LAST_REAL_AXIS; axis++) { if (axis == SECOND_Z_AXIS) continue; if (strlen(axis_array[axis].timefmt)) fprintf(fp, "set timefmt %s \"%s\"\n", axis_defaults[axis].name, conv_text(axis_array[axis].timefmt)); if (axis == COLOR_AXIS) continue; fprintf(fp, "set %sdata %s\n", axis_defaults[axis].name, axis_array[axis].datatype == DT_TIMEDATE ? "time" : ""); } if (boxwidth < 0.0) fputs("set boxwidth\n", fp); else fprintf(fp, "set boxwidth %g %s\n", boxwidth, (boxwidth_is_absolute) ? "absolute" : "relative"); fprintf(fp, "set style fill "); save_fillstyle(fp, &default_fillstyle); #ifdef EAM_OBJECTS /* Default rectangle style */ fprintf(fp, "set style rectangle %s fc ", default_rectangle.layer > 0 ? "front" : default_rectangle.layer < 0 ? "behind" : "back"); if (default_rectangle.lp_properties.use_palette) save_pm3dcolor(fp, &default_rectangle.lp_properties.pm3d_color); else fprintf(fp, "lt %d",default_rectangle.lp_properties.l_type+1); fprintf(fp, " fillstyle "); save_fillstyle(fp, &default_rectangle.fillstyle); /* Default circle properties */ fprintf(fp, "set style circle radius "); save_position(fp, &default_circle.o.circle.extent, FALSE); fputs(" \n", fp); /* Default ellipse properties */ fprintf(fp, "set style ellipse size "); save_position(fp, &default_ellipse.o.ellipse.extent, FALSE); fprintf(fp, " angle %g ", default_ellipse.o.ellipse.orientation); fputs("units ", fp); switch (default_ellipse.o.ellipse.type) { case ELLIPSEAXES_XY: fputs("xy\n", fp); break; case ELLIPSEAXES_XX: fputs("xx\n", fp); break; case ELLIPSEAXES_YY: fputs("yy\n", fp); break; } #endif if (dgrid3d) { if( dgrid3d_mode == DGRID3D_QNORM ) { fprintf(fp, "set dgrid3d %d,%d, %d\n", dgrid3d_row_fineness, dgrid3d_col_fineness, dgrid3d_norm_value); } else if( dgrid3d_mode == DGRID3D_SPLINES ) { fprintf(fp, "set dgrid3d %d,%d splines\n", dgrid3d_row_fineness, dgrid3d_col_fineness ); } else { fprintf(fp, "set dgrid3d %d,%d %s%s %f,%f\n", dgrid3d_row_fineness, dgrid3d_col_fineness, reverse_table_lookup(dgrid3d_mode_tbl, dgrid3d_mode), dgrid3d_kdensity ? " kdensity2d" : "", dgrid3d_x_scale, dgrid3d_y_scale ); } } fprintf(fp, "set dummy %s,%s\n", set_dummy_var[0], set_dummy_var[1]); #define SAVE_FORMAT(axis) \ fprintf(fp, "set format %s \"%s\"\n", axis_defaults[axis].name, \ conv_text(axis_array[axis].formatstring)); SAVE_FORMAT(FIRST_X_AXIS ); SAVE_FORMAT(FIRST_Y_AXIS ); SAVE_FORMAT(SECOND_X_AXIS); SAVE_FORMAT(SECOND_Y_AXIS); SAVE_FORMAT(FIRST_Z_AXIS ); SAVE_FORMAT(COLOR_AXIS ); SAVE_FORMAT(POLAR_AXIS ); #undef SAVE_FORMAT fprintf(fp, "set angles %s\n", (ang2rad == 1.0) ? "radians" : "degrees"); /* Grid back/front controls tics also. Make sure it is saved */ if (grid_layer >= 0) fprintf(fp,"set tics %s\n", grid_layer == 0 ? "back" : "front"); if (! some_grid_selected()) fputs("unset grid\n", fp); else { if (polar_grid_angle) /* set angle already output */ fprintf(fp, "set grid polar %f\n", polar_grid_angle / ang2rad); else fputs("set grid nopolar\n", fp); #define SAVE_GRID(axis) \ fprintf(fp, " %s%stics %sm%stics", \ axis_array[axis].gridmajor ? "" : "no", \ axis_defaults[axis].name, \ axis_array[axis].gridminor ? "" : "no", \ axis_defaults[axis].name); fputs("set grid", fp); SAVE_GRID(FIRST_X_AXIS); SAVE_GRID(FIRST_Y_AXIS); SAVE_GRID(FIRST_Z_AXIS); fputs(" \\\n", fp); SAVE_GRID(SECOND_X_AXIS); SAVE_GRID(SECOND_Y_AXIS); SAVE_GRID(COLOR_AXIS); fputs("\n", fp); #undef SAVE_GRID fprintf(fp, "set grid %s ", (grid_layer==-1) ? "layerdefault" : ((grid_layer==0) ? "back" : "front")); save_linetype(fp, &grid_lp, FALSE); fprintf(fp, ", "); save_linetype(fp, &mgrid_lp, FALSE); fputc('\n', fp); } fprintf(fp, "%sset raxis\n", raxis ? "" : "un"); fprintf(fp, "set key title \"%s\"", conv_text(key->title)); if (key->font) fprintf(fp, " font \"%s\"", key->font); if (key->textcolor.type != TC_LT || key->textcolor.lt != LT_BLACK) save_textcolor(fp, &key->textcolor); fputs("\n", fp); fputs("set key ", fp); switch (key->region) { case GPKEY_AUTO_INTERIOR_LRTBC: fputs("inside", fp); break; case GPKEY_AUTO_EXTERIOR_LRTBC: fputs("outside", fp); break; case GPKEY_AUTO_EXTERIOR_MARGIN: switch (key->margin) { case GPKEY_TMARGIN: fputs("tmargin", fp); break; case GPKEY_BMARGIN: fputs("bmargin", fp); break; case GPKEY_LMARGIN: fputs("lmargin", fp); break; case GPKEY_RMARGIN: fputs("rmargin", fp); break; } break; case GPKEY_USER_PLACEMENT: fputs("at ", fp); save_position(fp, &key->user_pos, FALSE); break; } if (!(key->region == GPKEY_AUTO_EXTERIOR_MARGIN && (key->margin == GPKEY_LMARGIN || key->margin == GPKEY_RMARGIN))) { switch (key->hpos) { case RIGHT: fputs(" right", fp); break; case LEFT: fputs(" left", fp); break; case CENTRE: fputs(" center", fp); break; } } if (!(key->region == GPKEY_AUTO_EXTERIOR_MARGIN && (key->margin == GPKEY_TMARGIN || key->margin == GPKEY_BMARGIN))) { switch (key->vpos) { case JUST_TOP: fputs(" top", fp); break; case JUST_BOT: fputs(" bottom", fp); break; case JUST_CENTRE: fputs(" center", fp); break; } } fprintf(fp, " %s %s %sreverse %senhanced %s ", key->stack_dir == GPKEY_VERTICAL ? "vertical" : "horizontal", key->just == GPKEY_LEFT ? "Left" : "Right", key->reverse ? "" : "no", key->enhanced ? "" : "no", key->auto_titles == COLUMNHEAD_KEYTITLES ? "autotitles columnhead" : key->auto_titles == FILENAME_KEYTITLES ? "autotitles" : "noautotitles" ); if (key->box.l_type > LT_NODRAW) { fputs("box", fp); save_linetype(fp, &(key->box), FALSE); } else fputs("nobox", fp); /* Put less common options on separate lines */ fprintf(fp, "\nset key %sinvert samplen %g spacing %g width %g height %g ", key->invert ? "" : "no", key->swidth, key->vert_factor, key->width_fix, key->height_fix); fprintf(fp, "\nset key maxcolumns %d maxrows %d",key->maxcols,key->maxrows); fputc('\n', fp); fprintf(fp, "set key %sopaque\n", key->front ? "" : "no"); if (!(key->visible)) fputs("unset key\n", fp); fputs("unset label\n", fp); for (this_label = first_label; this_label != NULL; this_label = this_label->next) { fprintf(fp, "set label %d \"%s\" at ", this_label->tag, conv_text(this_label->text)); save_position(fp, &this_label->place, FALSE); switch (this_label->pos) { case LEFT: fputs(" left", fp); break; case CENTRE: fputs(" centre", fp); break; case RIGHT: fputs(" right", fp); break; } if (this_label->rotate) fprintf(fp, " rotate by %d", this_label->rotate); else fprintf(fp, " norotate"); if (this_label->font != NULL) fprintf(fp, " font \"%s\"", this_label->font); fprintf(fp, " %s", (this_label->layer==0) ? "back" : "front"); if (this_label->noenhanced) fprintf(fp, " noenhanced"); save_textcolor(fp, &(this_label->textcolor)); if (this_label->lp_properties.pointflag == 0) fprintf(fp, " nopoint"); else { fprintf(fp, " point"); save_linetype(fp, &(this_label->lp_properties), TRUE); } save_position(fp, &this_label->offset, TRUE); fputc('\n', fp); } fputs("unset arrow\n", fp); for (this_arrow = first_arrow; this_arrow != NULL; this_arrow = this_arrow->next) { fprintf(fp, "set arrow %d from ", this_arrow->tag); save_position(fp, &this_arrow->start, FALSE); fputs(this_arrow->relative ? " rto " : " to ", fp); save_position(fp, &this_arrow->end, FALSE); fprintf(fp, " %s %s %s", arrow_head_names[this_arrow->arrow_properties.head], (this_arrow->arrow_properties.layer==0) ? "back" : "front", ( (this_arrow->arrow_properties.head_filled==2) ? "filled" : ( (this_arrow->arrow_properties.head_filled==1) ? "empty" : "nofilled" )) ); save_linetype(fp, &(this_arrow->arrow_properties.lp_properties), FALSE); if (this_arrow->arrow_properties.head_length > 0) { static char *msg[] = {"first", "second", "graph", "screen", "character"}; fprintf(fp, " size %s %.3f,%.3f,%.3f", msg[this_arrow->arrow_properties.head_lengthunit], this_arrow->arrow_properties.head_length, this_arrow->arrow_properties.head_angle, this_arrow->arrow_properties.head_backangle); } fprintf(fp, "\n"); } fprintf(fp, "set style increment %s\n", prefer_line_styles ? "userstyles" : "default"); fputs("unset style line\n", fp); for (this_linestyle = first_linestyle; this_linestyle != NULL; this_linestyle = this_linestyle->next) { fprintf(fp, "set style line %d ", this_linestyle->tag); save_linetype(fp, &(this_linestyle->lp_properties), TRUE); fprintf(fp, "\n"); } fputs("unset style arrow\n", fp); for (this_arrowstyle = first_arrowstyle; this_arrowstyle != NULL; this_arrowstyle = this_arrowstyle->next) { fprintf(fp, "set style arrow %d", this_arrowstyle->tag); fprintf(fp, " %s %s %s", arrow_head_names[this_arrowstyle->arrow_properties.head], (this_arrowstyle->arrow_properties.layer==0)?"back":"front", ( (this_arrowstyle->arrow_properties.head_filled==2)?"filled": ( (this_arrowstyle->arrow_properties.head_filled==1)?"empty": "nofilled" )) ); save_linetype(fp, &(this_arrowstyle->arrow_properties.lp_properties), FALSE); if (this_arrowstyle->arrow_properties.head_length > 0) { static char *msg[] = {"first", "second", "graph", "screen", "character"}; fprintf(fp, " size %s %.3f,%.3f,%.3f", msg[this_arrowstyle->arrow_properties.head_lengthunit], this_arrowstyle->arrow_properties.head_length, this_arrowstyle->arrow_properties.head_angle, this_arrowstyle->arrow_properties.head_backangle); } fprintf(fp, "\n"); } fprintf(fp, "set style histogram "); switch (histogram_opts.type) { default: case HT_CLUSTERED: fprintf(fp,"clustered gap %d ",histogram_opts.gap); break; case HT_ERRORBARS: fprintf(fp,"errorbars gap %d lw %g",histogram_opts.gap,histogram_opts.bar_lw); break; case HT_STACKED_IN_LAYERS: fprintf(fp,"rowstacked "); break; case HT_STACKED_IN_TOWERS: fprintf(fp,"columnstacked "); break; } fprintf(fp,"title "); save_position(fp, &histogram_opts.title.offset, TRUE); fprintf(fp, "\n"); #ifdef EAM_OBJECTS save_object(fp, 0); #endif fputs("unset logscale\n", fp); #define SAVE_LOG(axis) \ if (axis_array[axis].log) \ fprintf(fp, "set logscale %s %g\n", axis_defaults[axis].name, \ axis_array[axis].base); SAVE_LOG(FIRST_X_AXIS ); SAVE_LOG(FIRST_Y_AXIS ); SAVE_LOG(SECOND_X_AXIS); SAVE_LOG(SECOND_Y_AXIS); SAVE_LOG(FIRST_Z_AXIS ); SAVE_LOG(COLOR_AXIS ); SAVE_LOG(POLAR_AXIS ); #undef SAVE_LOG save_offsets(fp, "set offsets"); /* FIXME */ fprintf(fp, "\ set pointsize %g\n\ set pointintervalbox %g\n\ set encoding %s\n\ %sset polar\n\ %sset parametric\n", pointsize, pointintervalbox, encoding_names[encoding], (polar) ? "" : "un", (parametric) ? "" : "un"); if (numeric_locale) fprintf(fp, "set decimalsign locale \"%s\"\n", numeric_locale); if (decimalsign != NULL) fprintf(fp, "set decimalsign '%s'\n", decimalsign); if (!numeric_locale && !decimalsign) fprintf(fp, "unset decimalsign\n"); fputs("set view ", fp); if (splot_map == TRUE) fputs("map", fp); else { fprintf(fp, "%g, %g, %g, %g", surface_rot_x, surface_rot_z, surface_scale, surface_zscale); } if (aspect_ratio_3D) fprintf(fp, "\nset view %s", aspect_ratio_3D == 2 ? "equal xy" : aspect_ratio_3D == 3 ? "equal xyz": ""); fprintf(fp, "\n\ set samples %d, %d\n\ set isosamples %d, %d\n\ %sset surface\n\ %sset contour", samples_1, samples_2, iso_samples_1, iso_samples_2, (draw_surface) ? "" : "un", (draw_contour) ? "" : "un"); switch (draw_contour) { case CONTOUR_NONE: fputc('\n', fp); break; case CONTOUR_BASE: fputs(" base\n", fp); break; case CONTOUR_SRF: fputs(" surface\n", fp); break; case CONTOUR_BOTH: fputs(" both\n", fp); break; } if (label_contours) fprintf(fp, "set clabel '%s'\n", contour_format); else fputs("unset clabel\n", fp); #ifdef GP_MACROS if (expand_macros) fputs("set macros\n", fp); #endif fputs("set mapping ", fp); switch (mapping3d) { case MAP3D_SPHERICAL: fputs("spherical\n", fp); break; case MAP3D_CYLINDRICAL: fputs("cylindrical\n", fp); break; case MAP3D_CARTESIAN: default: fputs("cartesian\n", fp); break; } if (missing_val != NULL) fprintf(fp, "set datafile missing '%s'\n", missing_val); if (df_separator != '\0') fprintf(fp, "set datafile separator \"%c\"\n",df_separator); else fprintf(fp, "set datafile separator whitespace\n"); if (strcmp(df_commentschars, DEFAULT_COMMENTS_CHARS)) fprintf(fp, "set datafile commentschars '%s'\n", df_commentschars); if (df_fortran_constants) fprintf(fp, "set datafile fortran\n"); if (df_nofpe_trap) fprintf(fp, "set datafile nofpe_trap\n"); save_hidden3doptions(fp); fprintf(fp, "set cntrparam order %d\n", contour_order); fputs("set cntrparam ", fp); switch (contour_kind) { case CONTOUR_KIND_LINEAR: fputs("linear\n", fp); break; case CONTOUR_KIND_CUBIC_SPL: fputs("cubicspline\n", fp); break; case CONTOUR_KIND_BSPLINE: fputs("bspline\n", fp); break; } fputs("set cntrparam levels ", fp); switch (contour_levels_kind) { case LEVELS_AUTO: fprintf(fp, "auto %d\n", contour_levels); break; case LEVELS_INCREMENTAL: fprintf(fp, "incremental %g,%g,%g\n", contour_levels_list[0], contour_levels_list[1], contour_levels_list[0] + contour_levels_list[1] * contour_levels); break; case LEVELS_DISCRETE: { int i; fprintf(fp, "discrete %g", contour_levels_list[0]); for (i = 1; i < contour_levels; i++) fprintf(fp, ",%g ", contour_levels_list[i]); fputc('\n', fp); } } fprintf(fp, "\ set cntrparam points %d\n\ set size ratio %g %g,%g\n\ set origin %g,%g\n", contour_pts, aspect_ratio, xsize, ysize, xoffset, yoffset); fprintf(fp, "set style data "); save_data_func_style(fp,"data",data_style); fprintf(fp, "set style function "); save_data_func_style(fp,"function",func_style); save_zeroaxis(fp, FIRST_X_AXIS); save_zeroaxis(fp, FIRST_Y_AXIS); save_zeroaxis(fp, FIRST_Z_AXIS); save_zeroaxis(fp, SECOND_X_AXIS); save_zeroaxis(fp, SECOND_Y_AXIS); if (xyplane.absolute) fprintf(fp, "set xyplane at %g\n", xyplane.z); else fprintf(fp, "set ticslevel %g\n", xyplane.z); #define SAVE_MINI(axis) \ switch(axis_array[axis].minitics & TICS_MASK) { \ case 0: \ fprintf(fp, "set nom%stics\n", axis_defaults[axis].name); \ break; \ case MINI_AUTO: \ fprintf(fp, "set m%stics\n", axis_defaults[axis].name); \ break; \ case MINI_DEFAULT: \ fprintf(fp, "set m%stics default\n", axis_defaults[axis].name); \ break; \ case MINI_USER: \ fprintf(fp, "set m%stics %f\n", axis_defaults[axis].name, \ axis_array[axis].mtic_freq); \ break; \ } SAVE_MINI(FIRST_X_AXIS); SAVE_MINI(FIRST_Y_AXIS); SAVE_MINI(FIRST_Z_AXIS); /* HBB 20000506: noticed mztics were not saved! */ SAVE_MINI(SECOND_X_AXIS); SAVE_MINI(SECOND_Y_AXIS); SAVE_MINI(COLOR_AXIS); #undef SAVE_MINI save_tics(fp, FIRST_X_AXIS); save_tics(fp, FIRST_Y_AXIS); save_tics(fp, FIRST_Z_AXIS); save_tics(fp, SECOND_X_AXIS); save_tics(fp, SECOND_Y_AXIS); save_tics(fp, COLOR_AXIS); save_tics(fp, POLAR_AXIS); #define SAVE_AXISLABEL_OR_TITLE(name,suffix,lab) \ { \ fprintf(fp, "set %s%s \"%s\" ", \ name, suffix, lab.text ? conv_text(lab.text) : ""); \ fprintf(fp, "\nset %s%s ", name, suffix); \ save_position(fp, &(lab.offset), TRUE); \ fprintf(fp, " font \"%s\"", lab.font ? conv_text(lab.font) : "");\ save_textcolor(fp, &(lab.textcolor)); \ if (lab.tag == ROTATE_IN_3D_LABEL_TAG) \ fprintf(fp, " rotate parallel"); \ if (lab.rotate) \ fprintf(fp, " rotate by %d", lab.rotate); \ else \ fprintf(fp, " norotate"); \ fprintf(fp, "%s\n", (lab.noenhanced) ? " noenhanced" : ""); \ } SAVE_AXISLABEL_OR_TITLE("", "title", title); /* FIXME */ fprintf(fp, "set timestamp %s \n", timelabel_bottom ? "bottom" : "top"); SAVE_AXISLABEL_OR_TITLE("", "timestamp", timelabel); save_range(fp, POLAR_AXIS); save_range(fp, T_AXIS); save_range(fp, U_AXIS); save_range(fp, V_AXIS); #define SAVE_AXISLABEL(axis) \ SAVE_AXISLABEL_OR_TITLE(axis_defaults[axis].name,"label", \ axis_array[axis].label) SAVE_AXISLABEL(FIRST_X_AXIS); SAVE_AXISLABEL(SECOND_X_AXIS); save_range(fp, FIRST_X_AXIS); save_range(fp, SECOND_X_AXIS); SAVE_AXISLABEL(FIRST_Y_AXIS); SAVE_AXISLABEL(SECOND_Y_AXIS); if (splot_map == FALSE) { save_range(fp, FIRST_Y_AXIS); save_range(fp, SECOND_Y_AXIS); } else { /* 'set view map' uses flipped y-axes */ splot_map_deactivate(); save_range(fp, FIRST_Y_AXIS); save_range(fp, SECOND_Y_AXIS); splot_map_activate(); } SAVE_AXISLABEL(FIRST_Z_AXIS); save_range(fp, FIRST_Z_AXIS); SAVE_AXISLABEL(COLOR_AXIS); save_range(fp, COLOR_AXIS); #undef SAVE_AXISLABEL #undef SAVE_AXISLABEL_OR_TITLE fprintf(fp, "set zero %g\n", zero); fprintf(fp, "set lmargin %s %g\n", lmargin.scalex == screen ? "at screen" : "", lmargin.x); fprintf(fp, "set bmargin %s %g\n", bmargin.scalex == screen ? "at screen" : "", bmargin.x); fprintf(fp, "set rmargin %s %g\n", rmargin.scalex == screen ? "at screen" : "", rmargin.x); fprintf(fp, "set tmargin %s %g\n", tmargin.scalex == screen ? "at screen" : "", tmargin.x); fprintf(fp, "set locale \"%s\"\n", get_time_locale()); fputs("set pm3d ", fp); fputs((PM3D_IMPLICIT == pm3d.implicit ? "implicit" : "explicit"), fp); fprintf(fp, " at %s\n", pm3d.where); fputs("set pm3d ", fp); switch (pm3d.direction) { case PM3D_SCANS_AUTOMATIC: fputs("scansautomatic\n", fp); break; case PM3D_SCANS_FORWARD: fputs("scansforward\n", fp); break; case PM3D_SCANS_BACKWARD: fputs("scansbackward\n", fp); break; case PM3D_DEPTH: fputs("depthorder\n", fp); break; } fprintf(fp, "set pm3d interpolate %d,%d", pm3d.interp_i, pm3d.interp_j); fputs(" flush ", fp); switch (pm3d.flush) { case PM3D_FLUSH_CENTER: fputs("center", fp); break; case PM3D_FLUSH_BEGIN: fputs("begin", fp); break; case PM3D_FLUSH_END: fputs("end", fp); break; } fputs((pm3d.ftriangles ? " " : " no"), fp); fputs("ftriangles", fp); if (pm3d.hidden3d_tag > 0) fprintf(fp," hidden3d %d", pm3d.hidden3d_tag); else fputs(pm3d.hidden3d_tag ? " hidden3d" : " nohidden3d", fp); fputs(" corners2color ", fp); switch (pm3d.which_corner_color) { case PM3D_WHICHCORNER_MEAN: fputs("mean", fp); break; case PM3D_WHICHCORNER_GEOMEAN: fputs("geomean", fp); break; case PM3D_WHICHCORNER_MEDIAN: fputs("median", fp); break; case PM3D_WHICHCORNER_MIN: fputs("min", fp); break; case PM3D_WHICHCORNER_MAX: fputs("max", fp); break; default: /* PM3D_WHICHCORNER_C1 ... _C4 */ fprintf(fp, "c%i", pm3d.which_corner_color - PM3D_WHICHCORNER_C1 + 1); } fputs("\n", fp); /* * Save palette information */ fprintf( fp, "set palette %s %s maxcolors %d ", sm_palette.positive==SMPAL_POSITIVE ? "positive" : "negative", sm_palette.ps_allcF ? "ps_allcF" : "nops_allcF", sm_palette.use_maxcolors); fprintf( fp, "gamma %g ", sm_palette.gamma ); if (sm_palette.colorMode == SMPAL_COLOR_MODE_GRAY) { fputs( "gray\n", fp ); } else { fputs( "color model ", fp ); switch( sm_palette.cmodel ) { case C_MODEL_RGB: fputs( "RGB ", fp ); break; case C_MODEL_HSV: fputs( "HSV ", fp ); break; case C_MODEL_CMY: fputs( "CMY ", fp ); break; case C_MODEL_YIQ: fputs( "YIQ ", fp ); break; case C_MODEL_XYZ: fputs( "XYZ ", fp ); break; default: fprintf( stderr, "%s:%d ooops: Unknown color model '%c'.\n", __FILE__, __LINE__, (char)(sm_palette.cmodel) ); } fputs( "\nset palette ", fp ); switch( sm_palette.colorMode ) { case SMPAL_COLOR_MODE_RGB: fprintf( fp, "rgbformulae %d, %d, %d\n", sm_palette.formulaR, sm_palette.formulaG, sm_palette.formulaB ); break; case SMPAL_COLOR_MODE_GRADIENT: { int i=0; fprintf( fp, "defined (" ); for( i=0; i<sm_palette.gradient_num; ++i ) { fprintf( fp, " %.4g %.4g %.4g %.4g", sm_palette.gradient[i].pos, sm_palette.gradient[i].col.r, sm_palette.gradient[i].col.g, sm_palette.gradient[i].col.b ); if (i<sm_palette.gradient_num-1) { fputs( ",", fp); if (i==2 || i%4==2) fputs( "\\\n ", fp ); } } fputs( " )\n", fp ); break; } case SMPAL_COLOR_MODE_FUNCTIONS: fprintf( fp, "functions %s, %s, %s\n", sm_palette.Afunc.definition, sm_palette.Bfunc.definition, sm_palette.Cfunc.definition ); break; case SMPAL_COLOR_MODE_CUBEHELIX: fprintf( fp, "cubehelix start %.2g cycles %.2g saturation %.2g\n", sm_palette.cubehelix_start, sm_palette.cubehelix_cycles, sm_palette.cubehelix_saturation); break; default: fprintf( stderr, "%s:%d ooops: Unknown color mode '%c'.\n", __FILE__, __LINE__, (char)(sm_palette.colorMode) ); } } /* * Save colorbox info */ if (color_box.where != SMCOLOR_BOX_NO) fprintf(fp,"set colorbox %s\n", color_box.where==SMCOLOR_BOX_DEFAULT ? "default" : "user"); fprintf(fp, "set colorbox %sal origin ", color_box.rotation == 'v' ? "vertic" : "horizont"); save_position(fp, &color_box.origin, FALSE); fputs(" size ", fp); save_position(fp, &color_box.size, FALSE); fprintf(fp, " %s ", color_box.layer == LAYER_FRONT ? "front" : "back"); if (color_box.border == 0) fputs("noborder", fp); else if (color_box.border_lt_tag < 0) fputs("bdefault", fp); else fprintf(fp, "border %d", color_box.border_lt_tag); if (color_box.where == SMCOLOR_BOX_NO) fputs("\nunset colorbox\n", fp); else fputs("\n", fp); fprintf(fp, "set style boxplot %s %s %5.2f %soutliers pt %d separation %g labels %s %ssorted\n", boxplot_opts.plotstyle == FINANCEBARS ? "financebars" : "candles", boxplot_opts.limit_type == 1 ? "fraction" : "range", boxplot_opts.limit_value, boxplot_opts.outliers ? "" : "no", boxplot_opts.pointtype+1, boxplot_opts.separation, (boxplot_opts.labels == BOXPLOT_FACTOR_LABELS_X) ? "x" : (boxplot_opts.labels == BOXPLOT_FACTOR_LABELS_X2) ? "x2" : (boxplot_opts.labels == BOXPLOT_FACTOR_LABELS_AUTO) ? "auto" :"off", boxplot_opts.sort_factors ? "" : "un"); fputs("set loadpath ", fp); { char *s; while ((s = save_loadpath()) != NULL) fprintf(fp, "\"%s\" ", s); fputc('\n', fp); } fputs("set fontpath ", fp); { char *s; while ((s = save_fontpath()) != NULL) fprintf(fp, "\"%s\" ", s); fputc('\n', fp); } if (PS_psdir) fprintf(fp, "set psdir \"%s\"\n", PS_psdir); else fprintf(fp, "set psdir\n"); /* HBB NEW 20020927: fit logfile name option */ fprintf(fp, "set fit %serrorvariables", fit_errorvariables ? "" : "no"); if (fitlogfile) { fprintf(fp, " logfile \'%s\'", fitlogfile); } fputc('\n', fp); } static void save_tics(FILE *fp, AXIS_INDEX axis) { if ((axis_array[axis].ticmode & TICS_MASK) == NO_TICS) { fprintf(fp, "set no%stics\n", axis_defaults[axis].name); return; } fprintf(fp, "set %stics %s %s scale %g,%g %smirror %s ", axis_defaults[axis].name, ((axis_array[axis].ticmode & TICS_MASK) == TICS_ON_AXIS) ? "axis" : "border", (axis_array[axis].tic_in) ? "in" : "out", axis_array[axis].ticscale, axis_array[axis].miniticscale, (axis_array[axis].ticmode & TICS_MIRROR) ? "" : "no", axis_array[axis].tic_rotate ? "rotate" : "norotate"); if (axis_array[axis].tic_rotate) fprintf(fp,"by %d ",axis_array[axis].tic_rotate); save_position(fp, &axis_array[axis].ticdef.offset, TRUE); if (axis_array[axis].manual_justify) { switch (axis_array[axis].label.pos) { case LEFT:{ fputs(" left", fp); break; } case RIGHT:{ fputs(" right", fp); break; } case CENTRE:{ fputs(" center", fp); break; } } } else fputs(" autojustify", fp); fprintf(fp, "\nset %stics ", axis_defaults[axis].name); switch (axis_array[axis].ticdef.type) { case TIC_COMPUTED:{ fputs("autofreq ", fp); break; } case TIC_MONTH:{ fprintf(fp, "\nset %smtics", axis_defaults[axis].name); break; } case TIC_DAY:{ fprintf(fp, "\nset %sdtics", axis_defaults[axis].name); break; } case TIC_SERIES: if (axis_array[axis].ticdef.def.series.start != -VERYLARGE) { SAVE_NUM_OR_TIME(fp, (double) axis_array[axis].ticdef.def.series.start, axis); putc(',', fp); } fprintf(fp, "%g", axis_array[axis].ticdef.def.series.incr); if (axis_array[axis].ticdef.def.series.end != VERYLARGE) { putc(',', fp); SAVE_NUM_OR_TIME(fp, (double) axis_array[axis].ticdef.def.series.end, axis); } break; case TIC_USER: break; } fprintf(fp, (axis_array[axis].ticdef.rangelimited)?" rangelimit":" norangelimit"); if (axis_array[axis].ticdef.font && *axis_array[axis].ticdef.font) fprintf(fp, " font \"%s\"", axis_array[axis].ticdef.font); if (axis_array[axis].ticdef.textcolor.type != TC_DEFAULT) save_textcolor(fp, &axis_array[axis].ticdef.textcolor); putc('\n', fp); if (axis_array[axis].ticdef.def.user) { struct ticmark *t; fprintf(fp, "set %stics %s ", axis_defaults[axis].name, (axis_array[axis].ticdef.type == TIC_USER) ? "" : "add"); fputs(" (", fp); for (t = axis_array[axis].ticdef.def.user; t != NULL; t = t->next) { if (t->level < 0) /* Don't save ticlabels read from data file */ continue; if (t->label) fprintf(fp, "\"%s\" ", conv_text(t->label)); SAVE_NUM_OR_TIME(fp, (double) t->position, axis); if (t->level) fprintf(fp, " %d", t->level); if (t->next) { fputs(", ", fp); } } fputs(")\n", fp); } } static const char *coord_msg[] = { "first ", "second ", "graph ", "screen ", "character "}; static void save_position(FILE *fp, struct position *pos, TBOOLEAN offset) { assert(first_axes == 0 && second_axes == 1 && graph == 2 && screen == 3 && character == 4); if (offset) fprintf(fp, " offset "); fprintf(fp, "%s%g, %s%g, %s%g", pos->scalex == first_axes ? "" : coord_msg[pos->scalex], pos->x, pos->scaley == pos->scalex ? "" : coord_msg[pos->scaley], pos->y, pos->scalez == pos->scaley ? "" : coord_msg[pos->scalez], pos->z); } void save_range(FILE *fp, AXIS_INDEX axis) { fprintf(fp, "set %srange [ ", axis_defaults[axis].name); if (axis_array[axis].set_autoscale & AUTOSCALE_MIN) { if (axis_array[axis].min_constraint & CONSTRAINT_LOWER ) { SAVE_NUM_OR_TIME(fp, axis_array[axis].min_lb, axis); fputs(" < ", fp); } putc('*', fp); if (axis_array[axis].min_constraint & CONSTRAINT_UPPER ) { fputs(" < ", fp); SAVE_NUM_OR_TIME(fp, axis_array[axis].min_ub, axis); } } else { SAVE_NUM_OR_TIME(fp, axis_array[axis].set_min, axis); } fputs(" : ", fp); if (axis_array[axis].set_autoscale & AUTOSCALE_MAX) { if (axis_array[axis].max_constraint & CONSTRAINT_LOWER ) { SAVE_NUM_OR_TIME(fp, axis_array[axis].max_lb, axis); fputs(" < ", fp); } putc('*', fp); if (axis_array[axis].max_constraint & CONSTRAINT_UPPER ) { fputs(" < ", fp); SAVE_NUM_OR_TIME(fp, axis_array[axis].max_ub, axis); } } else { SAVE_NUM_OR_TIME(fp, axis_array[axis].set_max, axis); } fprintf(fp, " ] %sreverse %swriteback", axis_array[axis].range_flags & RANGE_REVERSE ? "" : "no", axis_array[axis].range_flags & RANGE_WRITEBACK ? "" : "no"); if (axis_array[axis].set_autoscale && fp == stderr) { /* add current (hidden) range as comments */ fputs(" # (currently [", fp); if (axis_array[axis].set_autoscale & AUTOSCALE_MIN) { SAVE_NUM_OR_TIME(fp, axis_array[axis].min, axis); } putc(':', fp); if (axis_array[axis].set_autoscale & AUTOSCALE_MAX) { SAVE_NUM_OR_TIME(fp, axis_array[axis].max, axis); } fputs("] )\n", fp); if (axis_array[axis].set_autoscale & (AUTOSCALE_FIXMIN)) fprintf(fp, "set autoscale %sfixmin\n", axis_defaults[axis].name); if (axis_array[axis].set_autoscale & AUTOSCALE_FIXMAX) fprintf(fp, "set autoscale %sfixmax\n", axis_defaults[axis].name); } else putc('\n', fp); } static void save_zeroaxis(FILE *fp, AXIS_INDEX axis) { fprintf(fp, "set %szeroaxis", axis_defaults[axis].name); save_linetype(fp, &(axis_array[axis].zeroaxis), FALSE); putc('\n', fp); } void save_fillstyle(FILE *fp, const struct fill_style_type *fs) { switch(fs->fillstyle) { case FS_SOLID: case FS_TRANSPARENT_SOLID: fprintf(fp, " %s solid %.2f ", fs->fillstyle == FS_SOLID ? "" : "transparent", fs->filldensity / 100.0); break; case FS_PATTERN: case FS_TRANSPARENT_PATTERN: fprintf(fp, " %s pattern %d ", fs->fillstyle == FS_PATTERN ? "" : "transparent", fs->fillpattern); break; case FS_DEFAULT: fprintf(fp, " default\n"); return; default: fprintf(fp, " empty "); break; } if (fs->border_color.type == TC_LT && fs->border_color.lt == LT_NODRAW) { fprintf(fp, "noborder\n"); } else { fprintf(fp, "border"); save_pm3dcolor(fp, &fs->border_color); fprintf(fp, "\n"); } } void save_textcolor(FILE *fp, const struct t_colorspec *tc) { if (tc->type) { fprintf(fp, " textcolor"); save_pm3dcolor(fp, tc); } } void save_pm3dcolor(FILE *fp, const struct t_colorspec *tc) { if (tc->type) { switch(tc->type) { case TC_LT: fprintf(fp," lt %d", tc->lt+1); break; case TC_LINESTYLE: fprintf(fp," linestyle %d", tc->lt); break; case TC_Z: fprintf(fp," palette z"); break; case TC_CB: fprintf(fp," palette cb %g", tc->value); break; case TC_FRAC: fprintf(fp," palette fraction %4.2f", tc->value); break; case TC_RGB: { const char *color = reverse_table_lookup(pm3d_color_names_tbl, tc->lt); if (tc->value < 0) fprintf(fp," rgb variable "); else if (color) fprintf(fp," rgb \"%s\" ", color); else fprintf(fp," rgb \"#%6.6x\" ", tc->lt); break; } default: break; } } } void save_data_func_style(FILE *fp, const char *which, enum PLOT_STYLE style) { switch (style) { case LINES: fputs("lines\n", fp); break; case POINTSTYLE: fputs("points\n", fp); break; case IMPULSES: fputs("impulses\n", fp); break; case LINESPOINTS: fputs("linespoints\n", fp); break; case DOTS: fputs("dots\n", fp); break; case YERRORLINES: fputs("yerrorlines\n", fp); break; case XERRORLINES: fputs("xerrorlines\n", fp); break; case XYERRORLINES: fputs("xyerrorlines\n", fp); break; case YERRORBARS: fputs("yerrorbars\n", fp); break; case XERRORBARS: fputs("xerrorbars\n", fp); break; case XYERRORBARS: fputs("xyerrorbars\n", fp); break; case BOXES: fputs("boxes\n", fp); break; case HISTOGRAMS: fputs("histograms\n", fp); break; case FILLEDCURVES: fputs("filledcurves ", fp); if (!strcmp(which, "data") || !strcmp(which, "Data")) filledcurves_options_tofile(&filledcurves_opts_data, fp); else filledcurves_options_tofile(&filledcurves_opts_func, fp); fputc('\n', fp); break; case BOXERROR: fputs("boxerrorbars\n", fp); break; case BOXXYERROR: fputs("boxxyerrorbars\n", fp); break; case STEPS: fputs("steps\n", fp); break; /* JG */ case FSTEPS: fputs("fsteps\n", fp); break; /* HOE */ case HISTEPS: fputs("histeps\n", fp); break; /* CAC */ case VECTOR: fputs("vector\n", fp); break; case FINANCEBARS: fputs("financebars\n", fp); break; case CANDLESTICKS: fputs("candlesticks\n", fp); break; case BOXPLOT: fputs("boxplot\n", fp); break; case PM3DSURFACE: fputs("pm3d\n", fp); break; case LABELPOINTS: fputs("labels\n", fp); break; case IMAGE: fputs("image\n", fp); break; case RGBIMAGE: fputs("rgbimage\n", fp); break; #ifdef EAM_OBJECTS case CIRCLES: fputs("circles\n", fp); break; case ELLIPSES: fputs("ellipses\n", fp); break; #endif default: fputs("---error!---\n", fp); } } void save_linetype(FILE *fp, lp_style_type *lp, TBOOLEAN show_point) { fprintf(fp, " linetype %d", lp->l_type + 1); if (lp->use_palette) { fprintf(fp, " linecolor"); if (lp->pm3d_color.type == TC_LT) fprintf(fp, " %d", lp->pm3d_color.lt+1); else if (lp->pm3d_color.type == TC_LINESTYLE && lp->l_type == LT_COLORFROMCOLUMN) fprintf(fp, " variable"); else save_pm3dcolor(fp,&(lp->pm3d_color)); } fprintf(fp, " linewidth %.3f", lp->l_width); if (show_point) { fprintf(fp, " pointtype %d", lp->p_type + 1); if (lp->p_size == PTSZ_VARIABLE) fprintf(fp, " pointsize variable"); else if (lp->p_size == PTSZ_DEFAULT) fprintf(fp, " pointsize default"); else fprintf(fp, " pointsize %.3f", lp->p_size); fprintf(fp, " pointinterval %d", lp->p_interval); } } void save_offsets(FILE *fp, char *lead) { fprintf(fp, "%s %s%g, %s%g, %s%g, %s%g\n", lead, loff.scalex == graph ? "graph " : "", loff.x, roff.scalex == graph ? "graph " : "", roff.x, toff.scaley == graph ? "graph " : "", toff.y, boff.scaley == graph ? "graph " : "", boff.y); } #ifdef EAM_OBJECTS /* Save/show rectangle <tag> (0 means show all) */ void save_object(FILE *fp, int tag) { t_object *this_object; t_rectangle *this_rect; t_circle *this_circle; t_ellipse *this_ellipse; TBOOLEAN showed = FALSE; for (this_object = first_object; this_object != NULL; this_object = this_object->next) { if ((this_object->object_type == OBJ_RECTANGLE) && (tag == 0 || tag == this_object->tag)) { this_rect = &this_object->o.rectangle; showed = TRUE; fprintf(fp, "%sobject %2d rect ", (fp==stderr) ? "\t" : "set ",this_object->tag); if (this_rect->type == 1) { fprintf(fp, "center "); save_position(fp, &this_rect->center, FALSE); fprintf(fp, " size "); save_position(fp, &this_rect->extent, FALSE); } else { fprintf(fp, "from "); save_position(fp, &this_rect->bl, FALSE); fprintf(fp, " to "); save_position(fp, &this_rect->tr, FALSE); } } else if ((this_object->object_type == OBJ_CIRCLE) && (tag == 0 || tag == this_object->tag)) { struct position *e = &this_object->o.circle.extent; this_circle = &this_object->o.circle; showed = TRUE; fprintf(fp, "%sobject %2d circle ", (fp==stderr) ? "\t" : "set ",this_object->tag); fprintf(fp, "center "); save_position(fp, &this_circle->center, FALSE); fprintf(fp, " size "); fprintf(fp, "%s%g", e->scalex == first_axes ? "" : coord_msg[e->scalex], e->x); fprintf(fp, " arc [%g:%g] ", this_circle->arc_begin, this_circle->arc_end); } else if ((this_object->object_type == OBJ_ELLIPSE) && (tag == 0 || tag == this_object->tag)) { struct position *e = &this_object->o.ellipse.extent; this_ellipse = &this_object->o.ellipse; showed = TRUE; fprintf(fp, "%sobject %2d ellipse ", (fp==stderr) ? "\t" : "set ",this_object->tag); fprintf(fp, "center "); save_position(fp, &this_ellipse->center, FALSE); fprintf(fp, " size "); fprintf(fp, "%s%g", e->scalex == first_axes ? "" : coord_msg[e->scalex], e->x); fprintf(fp, ", %s%g", e->scaley == e->scalex ? "" : coord_msg[e->scaley], e->y); fprintf(fp, " angle %g", this_ellipse->orientation); fputs(" units ", fp); switch (this_ellipse->type) { case ELLIPSEAXES_XY: fputs("xy", fp); break; case ELLIPSEAXES_XX: fputs("xx", fp); break; case ELLIPSEAXES_YY: fputs("yy", fp); break; } } else if ((this_object->object_type == OBJ_POLYGON) && (tag == 0 || tag == this_object->tag)) { t_polygon *this_polygon = &this_object->o.polygon; int nv; showed = TRUE; fprintf(fp, "%sobject %2d polygon ", (fp==stderr) ? "\t" : "set ",this_object->tag); if (this_polygon->vertex) { fprintf(fp, "from "); save_position(fp, &this_polygon->vertex[0], FALSE); } for (nv=1; nv < this_polygon->type; nv++) { fprintf(fp, (fp==stderr) ? "\n\t\t\t to " : " to "); save_position(fp, &this_polygon->vertex[nv], FALSE); } } /* Properties common to all objects */ fprintf(fp, "\n%sobject %2d ", (fp==stderr) ? "\t" : "set ",this_object->tag); fprintf(fp, "%s ", this_object->layer > 0 ? "front" : this_object->layer < 0 ? "behind" : "back"); if (this_object->lp_properties.l_width) fprintf(fp, "lw %.1f ",this_object->lp_properties.l_width); fprintf(fp, "fc "); if (this_object->lp_properties.l_type == LT_DEFAULT) fprintf(fp,"default"); else if (this_object->lp_properties.use_palette) save_pm3dcolor(fp, &this_object->lp_properties.pm3d_color); else fprintf(fp, "lt %d",this_object->lp_properties.l_type+1); fprintf(fp, " fillstyle "); save_fillstyle(fp, &this_object->fillstyle); } if (tag > 0 && !showed) int_error(c_token, "object not found"); } #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/tables.c��������������������������������������������������������������������������0000644�0004711�0000144�00000063301�11656657016�012356� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: tables.c,v 1.110 2011/11/10 05:15:58 sfeam Exp $"); } #endif /* GNUPLOT - tables.c */ /*[ * Copyright 1999, 2004 Lars Hecking * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "tables.h" #include "command.h" #include "fit.h" #include "setshow.h" #include "term_api.h" #include "util.h" #include "alloc.h" /* for init_colornames() */ #include "graph3d.h" /* for DGRID3D_* options */ # include "getcolor.h" /* gnuplot commands */ /* the actual commands */ const struct gen_ftable command_ftbl[] = { { "ra$ise", raise_command }, { "low$er", lower_command }, #ifdef USE_MOUSE { "bi$nd", bind_command }, #endif { "ca$ll", call_command }, { "cd", changedir_command }, { "cl$ear", clear_command }, { "do", do_command }, { "eval$uate", eval_command }, { "ex$it", exit_command }, { "f$it", fit_command }, { "h$elp", help_command }, { "?", help_command }, { "hi$story", history_command }, { "if", if_command }, { "else", else_command }, { "l$oad", load_command }, { "pa$use", pause_command }, { "p$lot", plot_command }, { "pr$int", print_command }, { "pwd", pwd_command }, { "q$uit", exit_command }, #ifdef VOLATILE_REFRESH { "ref$resh", refresh_command }, #endif { "rep$lot", replot_command }, { "re$read", reread_command }, { "res$et", reset_command }, { "sa$ve", save_command }, { "scr$eendump", screendump_command }, { "se$t", set_command }, { "she$ll", do_shell }, { "sh$ow", show_command }, { "sp$lot", splot_command }, { "st$ats", stats_command }, { "sy$stem", system_command }, { "test", test_command }, { "und$efine", undefine_command }, { "uns$et", unset_command }, { "up$date", update_command }, { "while", while_command }, { "{", begin_clause }, { "}", end_clause }, { ";", null_command }, /* last key must be NULL */ { NULL, invalid_command } }; /* 'plot ax[ei]s' parameter */ const struct gen_table plot_axes_tbl[] = { { "x1y1", AXES_X1Y1 }, { "x2y2", AXES_X2Y2 }, { "x1y2", AXES_X1Y2 }, { "x2y1", AXES_X2Y1 }, { NULL, AXES_NONE } }; /* 'plot smooth' parameter */ const struct gen_table plot_smooth_tbl[] = { { "a$csplines", SMOOTH_ACSPLINES }, { "b$ezier", SMOOTH_BEZIER }, { "c$splines", SMOOTH_CSPLINES }, { "s$bezier", SMOOTH_SBEZIER }, { "u$nique", SMOOTH_UNIQUE }, { "f$requency", SMOOTH_FREQUENCY }, { "cum$ulative", SMOOTH_CUMULATIVE }, { "k$density", SMOOTH_KDENSITY }, { "cn$ormal", SMOOTH_CUMULATIVE_NORMALISED }, { NULL, SMOOTH_NONE } }; /* dgrid3d modes */ const struct gen_table dgrid3d_mode_tbl[] = { { "qnorm", DGRID3D_QNORM }, { "spline$s", DGRID3D_SPLINES }, { "gauss", DGRID3D_GAUSS }, { "exp", DGRID3D_EXP }, { "cauchy", DGRID3D_CAUCHY }, { "box", DGRID3D_BOX }, { "hann", DGRID3D_HANN }, { NULL, DGRID3D_OTHER } }; /* 'save' command */ const struct gen_table save_tbl[] = { { "f$unctions", SAVE_FUNCS }, { "s$et", SAVE_SET }, { "t$erminal", SAVE_TERMINAL }, { "v$ariables", SAVE_VARS }, { NULL, SAVE_INVALID } }; /* 'set' and 'show' commands */ const struct gen_table set_tbl[] = { { "a$ll", S_ALL }, { "ac$tion_table", S_ACTIONTABLE }, { "at", S_ACTIONTABLE }, { "an$gles", S_ANGLES }, { "ar$row", S_ARROW }, { "au$toscale", S_AUTOSCALE }, { "b$ars", S_BARS }, { "bind", S_BIND }, { "bor$der", S_BORDER }, { "box$width", S_BOXWIDTH }, { "cl$abel", S_CLABEL }, { "c$lip", S_CLIP }, { "cn$trparam", S_CNTRPARAM }, { "co$ntours", S_CONTOUR }, { "da$ta", S_DATA }, { "data$file", S_DATAFILE }, { "dg$rid3d", S_DGRID3D }, { "du$mmy", S_DUMMY }, { "enc$oding", S_ENCODING }, { "dec$imalsign", S_DECIMALSIGN }, { "fit", S_FIT }, { "font$path", S_FONTPATH }, { "fo$rmat", S_FORMAT }, { "fu$nction", S_FUNCTIONS }, { "fu$nctions", S_FUNCTIONS }, { "g$rid", S_GRID }, { "hid$den3d", S_HIDDEN3D }, { "his$torysize", S_HISTORYSIZE }, { "is$osamples", S_ISOSAMPLES }, { "k$ey", S_KEY }, { "keyt$itle", S_KEYTITLE }, { "la$bel", S_LABEL }, { "lines$tyle", S_LINESTYLE }, { "linetype$s", S_LINETYPE }, { "ls", S_LINESTYLE }, { "lt", S_LINETYPE }, { "loa$dpath", S_LOADPATH }, { "loc$ale", S_LOCALE }, { "log$scale", S_LOGSCALE }, #ifdef GP_MACROS { "mac$ros", S_MACROS }, #endif { "map$ping", S_MAPPING }, { "map$ping3d", S_MAPPING }, { "mar$gin", S_MARGIN }, { "lmar$gin", S_LMARGIN }, { "rmar$gin", S_RMARGIN }, { "tmar$gin", S_TMARGIN }, { "bmar$gin", S_BMARGIN }, #ifdef USE_MOUSE { "mo$use", S_MOUSE }, #endif { "multi$plot", S_MULTIPLOT }, { "mxt$ics", S_MXTICS }, { "nomxt$ics", S_NOMXTICS }, { "mx2t$ics", S_MX2TICS }, { "nomx2t$ics", S_NOMX2TICS }, { "myt$ics", S_MYTICS }, { "nomyt$ics", S_NOMYTICS }, { "my2t$ics", S_MY2TICS }, { "nomy2t$ics", S_NOMY2TICS }, { "mzt$ics", S_MZTICS }, { "nomzt$ics", S_NOMZTICS }, { "mcbt$ics", S_MCBTICS }, { "nomcbt$ics", S_NOMCBTICS }, { "of$fsets", S_OFFSETS }, { "or$igin", S_ORIGIN }, { "o$utput", SET_OUTPUT }, { "pa$rametric", S_PARAMETRIC }, { "pm$3d", S_PM3D }, { "pal$ette", S_PALETTE }, { "colorb$ox", S_COLORBOX }, { "colorn$ames", S_COLORNAMES }, { "colors", S_COLORNAMES }, { "p$lot", S_PLOT }, { "pointint$ervalbox", S_POINTINTERVALBOX }, { "poi$ntsize", S_POINTSIZE }, { "pol$ar", S_POLAR }, { "pr$int", S_PRINT }, { "psdir", S_PSDIR }, { "obj$ect", S_OBJECT }, { "sa$mples", S_SAMPLES }, { "si$ze", S_SIZE }, { "st$yle", S_STYLE }, { "su$rface", S_SURFACE }, { "table", S_TABLE }, { "t$erminal", S_TERMINAL }, { "termo$ptions", S_TERMOPTIONS }, { "ti$cs", S_TICS }, { "ticsc$ale", S_TICSCALE }, { "ticsl$evel", S_TICSLEVEL }, { "timef$mt", S_TIMEFMT }, { "tim$estamp", S_TIMESTAMP }, { "tit$le", S_TITLE }, { "v$ariables", S_VARIABLES }, { "ve$rsion", S_VERSION }, { "vi$ew", S_VIEW }, { "xyp$lane", S_XYPLANE }, { "xda$ta", S_XDATA }, { "x2da$ta", S_X2DATA }, { "yda$ta", S_YDATA }, { "y2da$ta", S_Y2DATA }, { "zda$ta", S_ZDATA }, { "cbda$ta", S_CBDATA }, { "xl$abel", S_XLABEL }, { "x2l$abel", S_X2LABEL }, { "yl$abel", S_YLABEL }, { "y2l$abel", S_Y2LABEL }, { "zl$abel", S_ZLABEL }, { "cbl$abel", S_CBLABEL }, { "xti$cs", S_XTICS }, { "noxti$cs", S_NOXTICS }, { "x2ti$cs", S_X2TICS }, { "nox2ti$cs", S_NOX2TICS }, { "yti$cs", S_YTICS }, { "noyti$cs", S_NOYTICS }, { "y2ti$cs", S_Y2TICS }, { "noy2ti$cs", S_NOY2TICS }, { "zti$cs", S_ZTICS }, { "nozti$cs", S_NOZTICS }, { "rti$cs", S_RTICS }, { "norti$cs", S_NORTICS }, { "cbti$cs", S_CBTICS }, { "nocbti$cs", S_NOCBTICS }, { "xdti$cs", S_XDTICS }, { "noxdti$cs", S_NOXDTICS }, { "x2dti$cs", S_X2DTICS }, { "nox2dti$cs", S_NOX2DTICS }, { "ydti$cs", S_YDTICS }, { "noydti$cs", S_NOYDTICS }, { "y2dti$cs", S_Y2DTICS }, { "noy2dti$cs", S_NOY2DTICS }, { "zdti$cs", S_ZDTICS }, { "nozdti$cs", S_NOZDTICS }, { "cbdti$cs", S_CBDTICS }, { "nocbdti$cs", S_NOCBDTICS }, { "xmti$cs", S_XMTICS }, { "noxmti$cs", S_NOXMTICS }, { "x2mti$cs", S_X2MTICS }, { "nox2mti$cs", S_NOX2MTICS }, { "ymti$cs", S_YMTICS }, { "noymti$cs", S_NOYMTICS }, { "y2mti$cs", S_Y2MTICS }, { "noy2mti$cs", S_NOY2MTICS }, { "zmti$cs", S_ZMTICS }, { "nozmti$cs", S_NOZMTICS }, { "cbmti$cs", S_CBMTICS }, { "nocbmti$cs", S_NOCBMTICS }, { "xr$ange", S_XRANGE }, { "x2r$ange", S_X2RANGE }, { "yr$ange", S_YRANGE }, { "y2r$ange", S_Y2RANGE }, { "zr$ange", S_ZRANGE }, { "cbr$ange", S_CBRANGE }, { "rr$ange", S_RRANGE }, { "tr$ange", S_TRANGE }, { "ur$ange", S_URANGE }, { "vr$ange", S_VRANGE }, { "xzeroa$xis", S_XZEROAXIS }, { "x2zeroa$xis", S_X2ZEROAXIS }, { "yzeroa$xis", S_YZEROAXIS }, { "y2zeroa$xis", S_Y2ZEROAXIS }, { "zzeroa$xis", S_ZZEROAXIS }, { "zeroa$xis", S_ZEROAXIS }, { "rax$is", S_RAXIS }, { "z$ero", S_ZERO }, { NULL, S_INVALID } }; /* 'set hidden3d' options */ const struct gen_table set_hidden3d_tbl[] = { { "def$aults", S_HI_DEFAULTS }, { "off$set", S_HI_OFFSET }, { "nooff$set", S_HI_NOOFFSET }, { "tri$anglepattern", S_HI_TRIANGLEPATTERN }, { "undef$ined", S_HI_UNDEFINED }, { "nound$efined", S_HI_NOUNDEFINED }, { "alt$diagonal", S_HI_ALTDIAGONAL }, { "noalt$diagonal", S_HI_NOALTDIAGONAL }, { "bent$over", S_HI_BENTOVER }, { "nobent$over", S_HI_NOBENTOVER }, { "front", S_HI_FRONT }, { "back", S_HI_BACK }, { NULL, S_HI_INVALID } }; /* 'set key' options */ const struct gen_table set_key_tbl[] = { { "def$ault", S_KEY_DEFAULT }, { "on", S_KEY_ON }, { "off", S_KEY_OFF }, { "t$op", S_KEY_TOP }, { "b$ottom", S_KEY_BOTTOM }, { "l$eft", S_KEY_LEFT }, { "r$ight", S_KEY_RIGHT }, { "c$enter", S_KEY_CENTER }, { "ver$tical", S_KEY_VERTICAL }, { "hor$izontal", S_KEY_HORIZONTAL }, { "ov$er", S_KEY_OVER }, { "ab$ove", S_KEY_ABOVE }, { "u$nder", S_KEY_UNDER }, { "be$low", S_KEY_BELOW }, { "at", S_KEY_MANUAL }, { "ins$ide", S_KEY_INSIDE }, { "o$utside", S_KEY_OUTSIDE }, { "tm$argin", S_KEY_TMARGIN }, { "bm$argin", S_KEY_BMARGIN }, { "lm$argin", S_KEY_LMARGIN }, { "rm$argin", S_KEY_RMARGIN }, { "L$eft", S_KEY_LLEFT }, { "R$ight", S_KEY_RRIGHT }, { "rev$erse", S_KEY_REVERSE }, { "norev$erse", S_KEY_NOREVERSE }, { "inv$ert", S_KEY_INVERT }, { "noinv$ert", S_KEY_NOINVERT }, { "enh$anced", S_KEY_ENHANCED }, { "noenh$anced", S_KEY_NOENHANCED }, { "b$ox", S_KEY_BOX }, { "nob$ox", S_KEY_NOBOX }, { "sa$mplen", S_KEY_SAMPLEN }, { "sp$acing", S_KEY_SPACING }, { "w$idth", S_KEY_WIDTH }, { "h$eight", S_KEY_HEIGHT }, { "a$utotitles", S_KEY_AUTOTITLES }, { "noa$utotitles", S_KEY_NOAUTOTITLES }, { "ti$tle", S_KEY_TITLE }, { "noti$tle", S_KEY_NOTITLE }, { "font", S_KEY_FONT }, { "tc", S_KEY_TEXTCOLOR }, { "text$color", S_KEY_TEXTCOLOR }, { "maxcol$s", S_KEY_MAXCOLS}, { "maxcolu$mns", S_KEY_MAXCOLS}, { "maxrow$s", S_KEY_MAXROWS}, { "opaque", S_KEY_FRONT}, { "noopaque", S_KEY_NOFRONT}, { NULL, S_KEY_INVALID } }; /* 'test' command */ const struct gen_table test_tbl[] = { { "term$inal", TEST_TERMINAL }, { "pal$ette", TEST_PALETTE }, { "time", TEST_TIME }, { NULL, TEST_INVALID } }; /* 'set colorbox' options */ const struct gen_table set_colorbox_tbl[] = { { "v$ertical", S_COLORBOX_VERTICAL }, { "h$orizontal", S_COLORBOX_HORIZONTAL }, { "def$ault", S_COLORBOX_DEFAULT }, { "u$ser", S_COLORBOX_USER }, { "at", S_COLORBOX_USER }, { "bo$rder", S_COLORBOX_BORDER }, { "bd$efault", S_COLORBOX_BDEFAULT }, { "nobo$rder", S_COLORBOX_NOBORDER }, { "o$rigin", S_COLORBOX_ORIGIN }, { "s$ize", S_COLORBOX_SIZE }, { "fr$ont", S_COLORBOX_FRONT }, { "ba$ck", S_COLORBOX_BACK }, { NULL, S_COLORBOX_INVALID } }; /* 'set palette' options */ const struct gen_table set_palette_tbl[] = { { "pos$itive", S_PALETTE_POSITIVE }, { "neg$ative", S_PALETTE_NEGATIVE }, { "gray", S_PALETTE_GRAY }, { "grey", S_PALETTE_GRAY }, { "col$or", S_PALETTE_COLOR }, { "rgb$formulae", S_PALETTE_RGBFORMULAE }, { "def$ined", S_PALETTE_DEFINED }, { "file", S_PALETTE_FILE }, { "func$tions", S_PALETTE_FUNCTIONS }, { "mo$del", S_PALETTE_MODEL }, { "nops_allcF", S_PALETTE_NOPS_ALLCF }, { "ps_allcF", S_PALETTE_PS_ALLCF }, { "maxc$olors", S_PALETTE_MAXCOLORS }, { "gam$ma", S_PALETTE_GAMMA }, { "cubehelix", S_PALETTE_CUBEHELIX }, { NULL, S_PALETTE_INVALID } }; const struct gen_table color_model_tbl[] = { { "RGB", C_MODEL_RGB }, { "HSV", C_MODEL_HSV }, { "CMY", C_MODEL_CMY }, { "YIQ", C_MODEL_YIQ }, { "XYZ", C_MODEL_XYZ }, { NULL, -1 } }; /* 'set pm3d' options */ const struct gen_table set_pm3d_tbl[] = { { "at", S_PM3D_AT }, { "interp$olate", S_PM3D_INTERPOLATE }, { "scansfor$ward", S_PM3D_SCANSFORWARD }, { "scansback$ward", S_PM3D_SCANSBACKWARD }, { "scansauto$matic",S_PM3D_SCANS_AUTOMATIC }, { "dep$thorder", S_PM3D_DEPTH }, { "fl$ush", S_PM3D_FLUSH }, { "ftr$iangles", S_PM3D_FTRIANGLES }, { "noftr$iangles", S_PM3D_NOFTRIANGLES }, { "clip1$in", S_PM3D_CLIP_1IN }, { "clip4$in", S_PM3D_CLIP_4IN }, { "map", S_PM3D_MAP }, { "hi$dden3d", S_PM3D_HIDDEN }, { "nohi$dden3d", S_PM3D_NOHIDDEN }, { "so$lid", S_PM3D_SOLID }, { "notr$ansparent", S_PM3D_NOTRANSPARENT }, { "noso$lid", S_PM3D_NOSOLID }, { "tr$ansparent", S_PM3D_TRANSPARENT }, { "i$mplicit", S_PM3D_IMPLICIT }, { "noe$xplicit", S_PM3D_NOEXPLICIT }, { "noi$mplicit", S_PM3D_NOIMPLICIT }, { "e$xplicit", S_PM3D_EXPLICIT }, { "corners2c$olor",S_PM3D_WHICH_CORNER }, { NULL, S_PM3D_INVALID } }; /* EAM Nov 2008 - RGB color names for 'set palette defined' * merged with colors from web_color_rgbs used by terminals. */ struct gen_table default_color_names_tbl[] = { /* Put the colors used by gd/pdf/ppm terminals first */ { "white" , 255*(1<<16) + 255*(1<<8) + 255 }, { "black" , 0*(1<<16) + 0*(1<<8) + 0 }, { "dark-grey" , 160*(1<<16) + 160*(1<<8) + 160 }, { "red" , 255*(1<<16) + 0*(1<<8) + 0 }, { "web-green" , 0*(1<<16) + 192*(1<<8) + 0 }, { "web-blue" , 0*(1<<16) + 128*(1<<8) + 255 }, { "dark-magenta" , 192*(1<<16) + 0*(1<<8) + 255 }, { "dark-cyan" , 0*(1<<16) + 238*(1<<8) + 238 }, { "dark-orange" , 192*(1<<16) + 64*(1<<8) + 0 }, { "dark-yellow" , 200*(1<<16) + 200*(1<<8) + 0 }, { "royalblue" , 65*(1<<16) + 105*(1<<8) + 225 }, { "goldenrod" , 255*(1<<16) + 192*(1<<8) + 32 }, { "dark-spring-green", 0*(1<<16) + 128*(1<<8) + 64 }, { "purple" , 192*(1<<16) + 128*(1<<8) + 255 }, { "steelblue" , 48*(1<<16) + 96*(1<<8) + 128 }, { "dark-red" , 139*(1<<16) + 0*(1<<8) + 0 }, { "dark-chartreuse" , 64*(1<<16) + 128*(1<<8) + 0 }, { "orchid" , 255*(1<<16) + 128*(1<<8) + 255 }, { "aquamarine" , 127*(1<<16) + 255*(1<<8) + 212 }, { "brown" , 165*(1<<16) + 42*(1<<8) + 42 }, { "yellow" , 255*(1<<16) + 255*(1<<8) + 0 }, { "turquoise" , 64*(1<<16) + 224*(1<<8) + 208 }, /* greyscale gradient */ { "grey0" , 0*(1<<16) + 0*(1<<8) + 0 }, { "grey10" , 26*(1<<16) + 26*(1<<8) + 26 }, { "grey20" , 51*(1<<16) + 51*(1<<8) + 51 }, { "grey30" , 77*(1<<16) + 77*(1<<8) + 77 }, { "grey40" , 102*(1<<16) + 102*(1<<8) + 102 }, { "grey50" , 127*(1<<16) + 127*(1<<8) + 127 }, { "grey60" , 153*(1<<16) + 153*(1<<8) + 153 }, { "grey70" , 179*(1<<16) + 179*(1<<8) + 179 }, { "grey" , 192*(1<<16) + 192*(1<<8) + 192 }, { "grey80" , 204*(1<<16) + 204*(1<<8) + 204 }, { "grey90" , 229*(1<<16) + 229*(1<<8) + 229 }, { "grey100" , 255*(1<<16) + 255*(1<<8) + 255 }, /* random other colors */ { "light-red" , 240*(1<<16) + 50*(1<<8) + 50 }, { "light-green" , 144*(1<<16) + 238*(1<<8) + 144 }, { "light-blue" , 173*(1<<16) + 216*(1<<8) + 230 }, { "light-magenta" , 240*(1<<16) + 85*(1<<8) + 240 }, { "light-cyan" , 224*(1<<16) + 255*(1<<8) + 255 }, { "light-goldenrod" , 238*(1<<16) + 221*(1<<8) + 130 }, { "light-pink" , 255*(1<<16) + 182*(1<<8) + 193 }, { "light-turquoise" , 175*(1<<16) + 238*(1<<8) + 238 }, { "gold" , 255*(1<<16) + 215*(1<<8) + 0 }, { "green" , 0*(1<<16) + 255*(1<<8) + 0 }, { "dark-green" , 0*(1<<16) + 100*(1<<8) + 0 }, { "spring-green" , 0*(1<<16) + 255*(1<<8) + 127 }, { "forest-green" , 34*(1<<16) + 139*(1<<8) + 34 }, { "sea-green" , 46*(1<<16) + 139*(1<<8) + 87 }, { "blue" , 0*(1<<16) + 0*(1<<8) + 255 }, { "dark-blue" , 0*(1<<16) + 0*(1<<8) + 139 }, { "midnight-blue" , 25*(1<<16) + 25*(1<<8) + 112 }, { "navy" , 0*(1<<16) + 0*(1<<8) + 128 }, { "medium-blue" , 0*(1<<16) + 0*(1<<8) + 205 }, { "skyblue" , 135*(1<<16) + 206*(1<<8) + 235 }, { "cyan" , 0*(1<<16) + 255*(1<<8) + 255 }, { "magenta" , 255*(1<<16) + 0*(1<<8) + 255 }, { "dark-turquoise" , 0*(1<<16) + 206*(1<<8) + 209 }, { "dark-pink" , 255*(1<<16) + 20*(1<<8) + 147 }, { "coral" , 255*(1<<16) + 127*(1<<8) + 80 }, { "light-coral" , 240*(1<<16) + 128*(1<<8) + 128 }, { "orange-red" , 255*(1<<16) + 69*(1<<8) + 0 }, { "salmon" , 250*(1<<16) + 128*(1<<8) + 114 }, { "dark-salmon" , 233*(1<<16) + 150*(1<<8) + 122 }, { "khaki" , 240*(1<<16) + 230*(1<<8) + 140 }, { "dark-khaki" , 189*(1<<16) + 183*(1<<8) + 107 }, { "dark-goldenrod" , 184*(1<<16) + 134*(1<<8) + 11 }, { "beige" , 245*(1<<16) + 245*(1<<8) + 220 }, { "olive" , 160*(1<<16) + 128*(1<<8) + 32 }, { "orange" , 255*(1<<16) + 165*(1<<8) + 0 }, { "violet" , 238*(1<<16) + 130*(1<<8) + 238 }, { "dark-violet" , 148*(1<<16) + 0*(1<<8) + 211 }, { "plum" , 221*(1<<16) + 160*(1<<8) + 221 }, { "dark-plum" , 144*(1<<16) + 80*(1<<8) + 64 }, { "dark-olivegreen" , 85*(1<<16) + 107*(1<<8) + 47 }, { "orangered4" , 128*(1<<16) + 20*(1<<8) + 0 }, { "brown4" , 128*(1<<16) + 20*(1<<8) + 20 }, { "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 }, { "yellow4" , 128*(1<<16) + 128*(1<<8) + 0 }, { "sienna1" , 255*(1<<16) + 128*(1<<8) + 64 }, { "tan1" , 255*(1<<16) + 160*(1<<8) + 64 }, { "sandybrown" , 255*(1<<16) + 160*(1<<8) + 96 }, { "light-salmon" , 255*(1<<16) + 160*(1<<8) + 112 }, { "pink" , 255*(1<<16) + 192*(1<<8) + 192 }, { "khaki1" , 255*(1<<16) + 255*(1<<8) + 128 }, { "lemonchiffon" , 255*(1<<16) + 255*(1<<8) + 192 }, { "bisque" , 205*(1<<16) + 183*(1<<8) + 158 }, { "honeydew" , 240*(1<<16) + 255*(1<<8) + 240 }, { "slategrey" , 160*(1<<16) + 182*(1<<8) + 205 }, { "seagreen" , 193*(1<<16) + 255*(1<<8) + 193 }, { "antiquewhite" , 205*(1<<16) + 192*(1<<8) + 176 }, { "chartreuse" , 124*(1<<16) + 255*(1<<8) + 64 }, { "greenyellow" , 160*(1<<16) + 255*(1<<8) + 32 }, /* Synonyms */ { "gray" , 190*(1<<16) + 190*(1<<8) + 190 }, { "light-gray" , 211*(1<<16) + 211*(1<<8) + 211 }, { "light-grey" , 211*(1<<16) + 211*(1<<8) + 211 }, { "dark-gray" , 160*(1<<16) + 160*(1<<8) + 160 }, { "slategray" , 160*(1<<16) + 182*(1<<8) + 205 }, { "gray0" , 0*(1<<16) + 0*(1<<8) + 0 }, { "gray10" , 26*(1<<16) + 26*(1<<8) + 26 }, { "gray20" , 51*(1<<16) + 51*(1<<8) + 51 }, { "gray30" , 77*(1<<16) + 77*(1<<8) + 77 }, { "gray40" , 102*(1<<16) + 102*(1<<8) + 102 }, { "gray50" , 127*(1<<16) + 127*(1<<8) + 127 }, { "gray60" , 153*(1<<16) + 153*(1<<8) + 153 }, { "gray70" , 179*(1<<16) + 179*(1<<8) + 179 }, { "gray80" , 204*(1<<16) + 204*(1<<8) + 204 }, { "gray90" , 229*(1<<16) + 229*(1<<8) + 229 }, { "gray100" , 255*(1<<16) + 255*(1<<8) + 255 }, { NULL, -1 } }; struct gen_table *pm3d_color_names_tbl = default_color_names_tbl; struct gen_table *user_color_names_tbl = NULL; const int num_predefined_colors = sizeof(default_color_names_tbl) / sizeof(struct gen_table); int num_userdefined_colors = 0; const struct gen_table show_style_tbl[] = { { "d$ata", SHOW_STYLE_DATA }, { "f$unction", SHOW_STYLE_FUNCTION }, { "l$ines", SHOW_STYLE_LINE }, { "fill", SHOW_STYLE_FILLING }, { "fs", SHOW_STYLE_FILLING }, { "ar$row", SHOW_STYLE_ARROW }, { "incr$ement", SHOW_STYLE_INCREMENT }, { "hist$ogram", SHOW_STYLE_HISTOGRAM }, { "circ$le", SHOW_STYLE_CIRCLE }, { "ell$ipse", SHOW_STYLE_ELLIPSE }, { "rect$angle", SHOW_STYLE_RECTANGLE }, { "boxplot", SHOW_STYLE_BOXPLOT }, { NULL, SHOW_STYLE_INVALID } }; const struct gen_table plotstyle_tbl[] = { { "l$ines", LINES }, { "i$mpulses", IMPULSES }, { "p$oints", POINTSTYLE }, { "linesp$oints", LINESPOINTS }, { "lp", LINESPOINTS }, { "d$ots", DOTS }, { "yerrorl$ines", YERRORLINES }, { "errorl$ines", YERRORLINES }, { "xerrorl$ines", XERRORLINES }, { "xyerrorl$ines", XYERRORLINES }, { "ye$rrorbars", YERRORBARS }, { "e$rrorbars", YERRORBARS }, { "xe$rrorbars", XERRORBARS }, { "xye$rrorbars", XYERRORBARS }, { "boxes", BOXES }, { "hist$ograms", HISTOGRAMS }, { "filledc$urves", FILLEDCURVES }, { "boxer$rorbars", BOXERROR }, { "boxx$yerrorbars", BOXXYERROR }, { "st$eps", STEPS }, { "fillst$eps", FILLSTEPS }, { "fs$teps", FSTEPS }, { "his$teps", HISTEPS }, { "vec$tors", VECTOR }, { "fin$ancebars", FINANCEBARS }, { "can$dlesticks", CANDLESTICKS }, { "boxplot", BOXPLOT }, { "pm$3d", PM3DSURFACE }, { "labels", LABELPOINTS }, { "ima$ge", IMAGE }, { "rgbima$ge", RGBIMAGE }, { "rgba$lpha", RGBA_IMAGE }, #ifdef EAM_OBJECTS { "cir$cles", CIRCLES }, { "ell$ipses", ELLIPSES }, #endif { NULL, -1 } }; const struct gen_table filledcurves_opts_tbl[] = { { "c$losed", FILLEDCURVES_CLOSED }, { "x1", FILLEDCURVES_X1 }, { "y1", FILLEDCURVES_Y1 }, { "x2", FILLEDCURVES_X2 }, { "y2", FILLEDCURVES_Y2 }, { "xy", FILLEDCURVES_ATXY }, { "r", FILLEDCURVES_ATR }, { "above", FILLEDCURVES_ABOVE }, { "below", FILLEDCURVES_BELOW }, { NULL, -1 } }; int lookup_table(const struct gen_table *tbl, int find_token) { while (tbl->key) { if (almost_equals(find_token, tbl->key)) return tbl->value; tbl++; } return tbl->value; /* *_INVALID */ } parsefuncp_t lookup_ftable(const struct gen_ftable *ftbl, int find_token) { while (ftbl->key) { if (almost_equals(find_token, ftbl->key)) return ftbl->value; ftbl++; } return ftbl->value; } /* Returns value of the first table entry for which the search string * is a leading substring, or -1 if there is no match. */ int lookup_table_entry(const struct gen_table *tbl, const char *search_str) { while (tbl->key) { if (!strncmp(search_str, tbl->key, strlen(search_str))) return tbl->value; tbl++; } return -1; } /* Returns the index of the table entry whose key matches the search string. * If there is no exact match return the first table entry that is a leading * substring of the search string. Returns -1 if there is no match. */ int lookup_table_nth(const struct gen_table *tbl, const char *search_str) { int k = -1; int best_so_far = -1; while (tbl[++k].key) { /* Exact match always wins */ if (!strcmp(search_str, tbl[k].key)) return k; if (!strncmp(search_str, tbl[k].key, strlen(tbl[k].key))) if (best_so_far < 0) best_so_far = k; } return best_so_far; } /* Returns index of the table tbl whose key matches the beginning of the * search string search_str. The table_len is necessary because the table * is searched in the reversed order. The routine is used in parsing commands * '(un)set log x2zcb', for instance. * It returns index into the table or -1 if there is no match. */ int lookup_table_nth_reverse( const struct gen_table *tbl, int table_len, const char *search_str) { while (--table_len >= 0) { if (tbl[table_len].key && !strncmp(search_str, tbl[table_len].key, strlen(tbl[table_len].key))) return table_len; } return -1; /* not found */ } /* Returns the key associated with this indexed value * or NULL if the key/value pair is not found. */ const char * reverse_table_lookup(const struct gen_table *tbl, int entry) { int k = -1; while (tbl[++k].key) if (tbl[k].value == entry) return(tbl[k].key); return NULL; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/gp_time.h�������������������������������������������������������������������������0000644�0004711�0000144�00000005003�11413143531�012507� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: gp_time.h,v 1.8 2010/07/01 16:50:33 sfeam Exp $ */ /* GNUPLOT - gp_time.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_GP_TIME_H # define GNUPLOT_GP_TIME_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "stdfn.h" /* defines used for timeseries, seconds */ #define ZERO_YEAR 2000 #define JAN_FIRST_WDAY 6 /* 1st jan, 2000 is a Saturday (cal 1 2000 on unix) */ #define SEC_OFFS_SYS 946684800.0 /* zero gnuplot (2000) - zero system (1970) */ #define YEAR_SEC 31557600.0 /* avg, incl. leap year */ #define MON_SEC 2629800.0 /* YEAR_SEC / 12 */ #define WEEK_SEC 604800.0 #define DAY_SEC 86400.0 /* Type definitions */ /* Variables of time.c needed by other modules: */ /* Prototypes of functions exported by time.c */ /* string to *tm */ char * gstrptime __PROTO((char *, char *, struct tm *, double *)); /* seconds to string */ size_t gstrftime __PROTO((char *, size_t, const char *, double)); /* *tm to seconds */ double gtimegm __PROTO((struct tm *)); /* seconds to *tm */ int ggmtime __PROTO((struct tm *, double)); #endif /* GNUPLOT_GP_TIME_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/scanner.h�������������������������������������������������������������������������0000644�0004711�0000144�00000003750�11664763054�012543� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: scanner.h,v 1.7.2.1 2011/11/28 19:51:08 sfeam Exp $ */ /* GNUPLOT - scanner.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_SCANNER_H # define GNUPLOT_SCANNER_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "stdfn.h" /* Type definitions */ /* Variables of scanner.c needed by other modules: */ extern int curly_brace_count; /* Prototypes of functions exported by scanner.c */ TBOOLEAN legal_identifier __PROTO((char *p)); int scanner __PROTO((char **expression, size_t *line_lengthp)); #endif /* GNUPLOT_SCANNER_H */ ������������������������gnuplot-4.6.4/src/hidden3d.c������������������������������������������������������������������������0000644�0004711�0000144�00000214435�12077277413�012571� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: hidden3d.c,v 1.82.2.4 2013/01/21 17:46:51 sfeam Exp $"); } #endif /* GNUPLOT - hidden3d.c */ /*[ * Copyright 1986 - 1993, 1998, 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * 1999 Hans-Bernhard Broeker (Broeker@physik.rwth-aachen.de) * * Major rewrite, affecting just about everything * */ #include "hidden3d.h" #include "color.h" #include "pm3d.h" #include "alloc.h" #include "axis.h" #include "command.h" #include "dynarray.h" #include "graph3d.h" #include "tables.h" #include "term_api.h" #include "util.h" #include "util3d.h" /*************************/ /* Configuration section */ /*************************/ /* If this module is compiled with HIDDEN3D_GRIDBOX = 1 defined, it * will store the information about {x|y}{min|max} in an other * (additional!) form: a bit mask, with each bit representing one * horizontal or vertical strip of the screen. The bits for strips a * polygon spans are set to one. This allows to test for xy overlap * of an edge with a polygon simply by comparing bit patterns. */ #ifndef HIDDEN3D_GRIDBOX #define HIDDEN3D_GRIDBOX 0 #endif /* HBB 19991204: new code started to finally implement a spatially * ordered data structure to store the polygons in. This is meant to * speed up the HLR process. Before, the hot spot of hidden3d was the * loop in in_front, where by far most of the polygons are rejected by * the first test, already. The idea is to _not_ to loop over all * those polygons far away from the edge under consideration, in the * first place. Instead, store the polygons in an xy grid of lists, * so we can select a sample of these lists to test a given edge * against. */ #ifndef HIDDEN3D_QUADTREE #define HIDDEN3D_QUADTREE 0 #endif #if HIDDEN3D_QUADTREE && HIDDEN3D_GRIDBOX # warning HIDDEN3D_QUADTREE & HIDDEN3D_GRIDBOX do not work together, sensibly! #endif /* If you don't want the color-distinction between the * 'top' and 'bottom' sides of the surface, like I do, then just compile * with -DBACKSIDE_LINETYPE_OFFSET = 0. */ #ifndef BACKSIDE_LINETYPE_OFFSET # define BACKSIDE_LINETYPE_OFFSET 1 #endif /* This #define lets you choose if the diagonals that * divide each original quadrangle in two triangles will be drawn * visible or not: do draw them, define it to be 7L, otherwise let be * 3L */ #ifndef TRIANGLE_LINESDRAWN_PATTERN # define TRIANGLE_LINESDRAWN_PATTERN 3L #endif /* Handle out-of-range or undefined points. Compares the maximum * marking (0=inrange, 1=outrange, 2=undefined) of the coordinates of * a vertex to the value #defined here. If not less, the vertex is * rejected, and all edges that hit it, as well. NB: if this is set to * anything above 1, gnuplot may crash with a floating point exception * in hidden3d. You get what you asked for ... */ #ifndef HANDLE_UNDEFINED_POINTS # define HANDLE_UNDEFINED_POINTS 1 #endif /* Symbolic value for 'do not handle Undefined Points specially' */ #define UNHANDLED (UNDEFINED+1) /* If both subtriangles of a quad were cancelled, try if using the * other diagonal is better. This only makes a difference if exactly * one vertex of the quad is unusable, and that one is on the 'usual' * tried diagonal. In such a case, the border of the hole in the * surface will be less rough than with the previous method, as the * border follows the undefined region as close as it can. */ #ifndef SHOW_ALTERNATIVE_DIAGONAL # define SHOW_ALTERNATIVE_DIAGONAL 1 #endif /* If the two triangles in a quad are both drawn, and they show * different sides to the user (the quad is 'bent over'), then it's * preferrable to force the diagonal being visible to avoid other * parts of the scene being obscured by a line the user can't * see. This avoids unnecessary user surprises. */ #ifndef HANDLE_BENTOVER_QUADRANGLES # define HANDLE_BENTOVER_QUADRANGLES 1 #endif /* The actual configuration is stored in these variables, modifiable * at runtime through 'set hidden3d' options */ static int hiddenBacksideLinetypeOffset = BACKSIDE_LINETYPE_OFFSET; static long hiddenTriangleLinesdrawnPattern = TRIANGLE_LINESDRAWN_PATTERN; static int hiddenHandleUndefinedPoints = HANDLE_UNDEFINED_POINTS; static int hiddenShowAlternativeDiagonal = SHOW_ALTERNATIVE_DIAGONAL; static int hiddenHandleBentoverQuadrangles = HANDLE_BENTOVER_QUADRANGLES; /**************************************************************/ /************************************************************** * The 'real' code begins, here. * * * * first: types and global variables * **************************************************************/ /**************************************************************/ /* precision of calculations in normalized space. Coordinates closer to * each other than an absolute difference of EPSILON are considered * equal, by some of the routines in this module. */ #define EPSILON 1e-5 /* The code used to die messily if the scale parameters got over-large. * Prevent this from happening due to mousing by locking out the mouse * response. */ TBOOLEAN disable_mouse_z = FALSE; /* Some inexact operations: == , > , >=, sign() */ #define EQ(X,Y) (fabs( (X) - (Y) ) < EPSILON) /* X == Y */ #define GR(X,Y) ((X) > (Y) + EPSILON) /* X > Y */ #define GE(X,Y) ((X) >= (Y) - EPSILON) /* X >= Y */ #define SIGN(X) ( ((X)<-EPSILON) ? -1: ((X)>EPSILON) ) /* A plane equation, stored as a four-element vector. The equation * itself is: x*p[0]+y*p[1]+z*p[2]+1*p[3]=0 */ typedef coordval t_plane[4]; /* One edge of the mesh. The edges are (currently) organized into a * linked list as a method of traversing them back-to-front. */ typedef struct edge { long v1, v2; /* the vertices at either end */ int style; /* linetype index */ struct lp_style_type *lp; /* line/point style attributes */ long next; /* index of next edge in z-sorted list */ } edge; typedef edge GPHUGE *p_edge; /* One triangle of the surface mesh(es). */ #define POLY_NVERT 3 typedef struct mesh_triangle { long vertex[POLY_NVERT]; /* The vertices (indices on vlist) */ /* min/max in all three directions */ coordval xmin, xmax, ymin, ymax, zmin, zmax; t_plane plane; /* the plane coefficients */ TBOOLEAN frontfacing; /* is polygon facing front- or backwards? */ #if ! HIDDEN3D_QUADTREE long next; /* index of next polygon in z-sorted list */ #endif #if HIDDEN3D_GRIDBOX unsigned long xbits; /* x coverage mask of bounding box */ unsigned long ybits; /* y coverage mask of bounding box */ #endif } mesh_triangle; typedef mesh_triangle GPHUGE *p_polygon; #if HIDDEN3D_GRIDBOX # define UINT_BITS (CHAR_BIT * sizeof(unsigned int)) # define COORD_TO_BITMASK(x,shift) \ (~0U << (unsigned int) ((((x) / surface_scale) + 1.0) / 2.0 * UINT_BITS + (shift))) # define CALC_BITRANGE(range_min, range_max) \ ((~COORD_TO_BITMASK((range_max), 1)) & COORD_TO_BITMASK(range_min, 0)) #endif /* Enumeration of possible types of line, for use with the * store_edge() function. Influences the position in the grid the * second vertex will be put to, relative to the one that is passed * in, as another argument to that function. edir_none is for * single-pixel 'blind' edges, which exist only to facilitate output * of 'points' style splots. * * Directions are interpreted in a pseudo-geographical coordinate * system of the data grid: within the isoline, we count from left to * right (west to east), and the isolines themselves are counted from * top to bottom, described as north and south. */ typedef enum edge_direction { edir_west, edir_north, edir_NW, edir_NE, edir_impulse, edir_point, edir_vector } edge_direction; /* direction into which the polygon is facing (the corner with the * right angle, inside the mesh, that is). The reference identifiying * the whole cell is always the lower right, i.e. southeast one. */ typedef enum polygon_direction { pdir_NE, pdir_SE, pdir_SW, pdir_NW } polygon_direction; /* Three dynamical arrays that describe what we have to plot: */ static dynarray vertices, edges, polygons; /* convenience #defines to make the generic vector useable as typed arrays */ #define vlist ((p_vertex) vertices.v) #define plist ((p_polygon) polygons.v) #define elist ((p_edge) edges.v) static long pfirst; /* first polygon in zsorted chain*/ static long efirst; /* first edges in zsorted chain */ #if HIDDEN3D_QUADTREE /* HBB 20000716: spatially oriented hierarchical data structure to * store polygons in. For now, it's a simple xy grid of z-sorted * lists. A single polygon can appear in several lists, if it spans * cell borders */ typedef struct qtreelist { long p; /* the polygon */ long next; /* next element in this chain */ } qtreelist; typedef qtreelist GPHUGE *p_qtreelist; /* The quadtree algorithm sorts the objects into lists indexed by x/y. */ /* The number of cells in x and y direction has a huge effect on run time. */ /* If the granularity is 10, 24% of the CPU time for all.dem is spent in */ /* the routine in_front(). If granularity is bumped to 40 this goes down */ /* to 12%. The tradeoff is increased size of the quadtree array. */ # ifndef QUADTREE_GRANULARITY # define QUADTREE_GRANULARITY 30 # endif static long quadtree[QUADTREE_GRANULARITY][QUADTREE_GRANULARITY]; /* and a routine to calculate the cells' position in that array: */ static int coord_to_treecell(coordval x) { int index; index = ((((x) / surface_scale) + 1.0) / 2.0) * QUADTREE_GRANULARITY; if (index >= QUADTREE_GRANULARITY) index = QUADTREE_GRANULARITY - 1; else if (index < 0) index = 0; return index; } /* the dynarray to actually store all that stuff in: */ static dynarray qtree; #define qlist ((p_qtreelist) qtree.v) #endif /* HIDDEN3D_QUADTREE*/ /* Prototypes for internal functions of this module. */ static long int store_vertex __PROTO((struct coordinate GPHUGE *point, lp_style_type *lp_style, TBOOLEAN color_from_column)); static long int make_edge __PROTO((long int vnum1, long int vnum2, struct lp_style_type *lp, int style, int next)); static long int store_edge __PROTO((long int vnum1, edge_direction direction, long int crvlen, struct lp_style_type *lp, int style)); static GP_INLINE double eval_plane_equation __PROTO((t_plane p, p_vertex v)); static GP_INLINE double intersect_line_plane __PROTO((p_vertex v1, p_vertex v2, t_plane p)); static double intersect_line_line __PROTO((p_vertex v1, p_vertex v2, p_vertex w1, p_vertex w2)); static int cover_point_poly __PROTO((p_vertex v1, p_vertex v2, double u, p_polygon poly)); static long int store_polygon __PROTO((long int vnum1, polygon_direction direction, long int crvlen)); static void color_edges __PROTO((long int new_edge, long int old_edge, long int new_poly, long int old_poly, int style_above, int style_below)); static void build_networks __PROTO((struct surface_points * plots, int pcount)); int compare_edges_by_zmin __PROTO((SORTFUNC_ARGS p1, SORTFUNC_ARGS p2)); int compare_polys_by_zmax __PROTO((SORTFUNC_ARGS p1, SORTFUNC_ARGS p2)); static void sort_edges_by_z __PROTO((void)); static void sort_polys_by_z __PROTO((void)); static TBOOLEAN get_plane __PROTO((p_polygon p, t_plane plane)); static long split_line_at_ratio __PROTO((long int vnum1, long int vnum2, double w)); static GP_INLINE double area2D __PROTO((p_vertex v1, p_vertex v2, p_vertex v3)); static void draw_vertex __PROTO((p_vertex v)); static GP_INLINE void draw_edge __PROTO((p_edge e, p_vertex v1, p_vertex v2)); static GP_INLINE void handle_edge_fragment __PROTO((long int edgenum, long int vnum1, long int vnum2, long int firstpoly)); static int in_front __PROTO((long int edgenum, long int vnum1, long int vnum2, long int *firstpoly)); /* Set the options for hidden3d. To be called from set.c, when the * user has begun a command with 'set hidden3d', to parse the rest of * that command */ void set_hidden3doptions() { int tmp; while (!END_OF_COMMAND) { switch (lookup_table(&set_hidden3d_tbl[0], c_token)) { case S_HI_DEFAULTS: /* reset all parameters to defaults */ reset_hidden3doptions(); c_token++; if (!END_OF_COMMAND) int_error(c_token, "No further options allowed after 'defaults'"); return; break; case S_HI_OFFSET: c_token++; hiddenBacksideLinetypeOffset = int_expression(); c_token--; break; case S_HI_NOOFFSET: hiddenBacksideLinetypeOffset = 0; break; case S_HI_TRIANGLEPATTERN: c_token++; hiddenTriangleLinesdrawnPattern = int_expression(); c_token--; break; case S_HI_UNDEFINED: c_token++; tmp = int_expression(); if (tmp <= 0 || tmp > UNHANDLED) tmp = UNHANDLED; hiddenHandleUndefinedPoints = tmp; c_token--; break; case S_HI_NOUNDEFINED: hiddenHandleUndefinedPoints = UNHANDLED; break; case S_HI_ALTDIAGONAL: hiddenShowAlternativeDiagonal = 1; break; case S_HI_NOALTDIAGONAL: hiddenShowAlternativeDiagonal = 0; break; case S_HI_BENTOVER: hiddenHandleBentoverQuadrangles = 1; break; case S_HI_NOBENTOVER: hiddenHandleBentoverQuadrangles = 0; break; case S_HI_BACK: hidden3d_layer = LAYER_BACK; break; case S_HI_FRONT: hidden3d_layer = LAYER_FRONT; break; case S_HI_INVALID: int_error(c_token, "No such option to hidden3d (or wrong order)"); default: break; } c_token++; } } void show_hidden3doptions() { fprintf(stderr,"\t Hidden3d elements will be drawn in %s of non-hidden3d elements\n", hidden3d_layer == LAYER_BACK ? "back" : "front"); fprintf(stderr,"\ \t Back side of surfaces has linestyle offset of %d\n\ \t Bit-Mask of Lines to draw in each triangle is %ld\n\ \t %d: ", hiddenBacksideLinetypeOffset, hiddenTriangleLinesdrawnPattern, hiddenHandleUndefinedPoints); switch (hiddenHandleUndefinedPoints) { case OUTRANGE: fputs("Outranged and undefined datapoints are omitted from the surface.\n", stderr); break; case UNDEFINED: fputs("Only undefined datapoints are omitted from the surface.\n", stderr); break; case UNHANDLED: fputs("Will not check for undefined datapoints (may cause crashes).\n", stderr); break; default: fputs("Value stored for undefined datapoint handling is illegal!!!\n", stderr); break; } fprintf(stderr,"\ \t Will %suse other diagonal if it gives a less jaggy outline\n\ \t Will %sdraw diagonal visibly if quadrangle is 'bent over'\n", hiddenShowAlternativeDiagonal ? "" : "not ", hiddenHandleBentoverQuadrangles ? "" : "not "); } /* Implements proper 'save'ing of the new hidden3d options... */ void save_hidden3doptions(FILE *fp) { if (!hidden3d) { fputs("unset hidden3d\n", fp); return; } fprintf(fp, "set hidden3d %s offset %d trianglepattern %ld undefined %d %saltdiagonal %sbentover\n", hidden3d_layer == LAYER_BACK ? "back" : "front", hiddenBacksideLinetypeOffset, hiddenTriangleLinesdrawnPattern, hiddenHandleUndefinedPoints, hiddenShowAlternativeDiagonal ? "" : "no", hiddenHandleBentoverQuadrangles ? "" : "no"); } /* Initialize the necessary steps for hidden line removal and initialize global variables. */ void init_hidden_line_removal() { /* Check for some necessary conditions to be set elsewhere: */ /* HandleUndefinedPoints mechanism depends on these: */ assert(OUTRANGE == 1); assert(UNDEFINED == 2); /* Re-mapping of this value makes the test easier in the critical * section */ if (hiddenHandleUndefinedPoints < OUTRANGE) hiddenHandleUndefinedPoints = UNHANDLED; init_dynarray(&vertices, sizeof(vertex), 100, 100); init_dynarray(&edges, sizeof(edge), 100, 100); init_dynarray(&polygons, sizeof(mesh_triangle), 100, 100); #if HIDDEN3D_QUADTREE init_dynarray(&qtree, sizeof(qtreelist), 100, 100); #endif } /* Reset the hidden line data to a fresh start. */ void reset_hidden_line_removal() { vertices.end = 0; edges.end = 0; polygons.end = 0; #if HIDDEN3D_QUADTREE qtree.end = 0; #endif } /* Terminates the hidden line removal process. */ /* Free any memory allocated by init_hidden_line_removal above. */ void term_hidden_line_removal() { free_dynarray(&polygons); free_dynarray(&edges); free_dynarray(&vertices); #if HIDDEN3D_QUADTREE free_dynarray(&qtree); #endif } #if 0 /* UNUSED ! */ /* Do we see the top or bottom of the polygon, or is it 'on edge'? */ #define GET_SIDE(vlst,csign) \ do { \ double ctmp = \ vlist[vlst[0]].x * (vlist[vlst[1]].y - vlist[vlst[2]].y) + \ vlist[vlst[1]].x * (vlist[vlst[2]].y - vlist[vlst[0]].y) + \ vlist[vlst[2]].x * (vlist[vlst[0]].y - vlist[vlst[1]].y); \ csign = SIGN (ctmp); \ } while (0) #endif /* UNUSED */ static long int store_vertex ( struct coordinate GPHUGE * point, lp_style_type *lp_style, TBOOLEAN color_from_column) { p_vertex thisvert = nextfrom_dynarray(&vertices); thisvert->lp_style = lp_style; if ((int) point->type >= hiddenHandleUndefinedPoints) { FLAG_VERTEX_AS_UNDEFINED(*thisvert); return (-1); } map3d_xyz(point->x, point->y, point->z, thisvert); if (color_from_column) { thisvert->real_z = point->CRD_COLOR; thisvert->lp_style->pm3d_color.lt = LT_COLORFROMCOLUMN; } else thisvert->real_z = point->z; #ifdef HIDDEN3D_VAR_PTSIZE /* Store pointer back to original point */ /* Needed to support variable pointsize */ thisvert->original = point; #endif return (thisvert - vlist); } /* A part of store_edge that does the actual storing. Used by * in_front(), as well, so I separated it out. */ static long int make_edge( long vnum1, long vnum2, struct lp_style_type *lp, int style, int next) { p_edge thisedge = nextfrom_dynarray(&edges); p_vertex v1 = vlist + vnum1; p_vertex v2 = vlist + vnum2; thisedge->style = style; thisedge->lp = lp; thisedge->next = next; /* ensure z ordering inside each edge */ if (v1->z >= v2->z) { thisedge->v1 = vnum1; thisedge->v2 = vnum2; if (lp->p_type == PT_ARROWHEAD) thisedge->style = PT_ARROWHEAD; } else { thisedge->v1 = vnum2; thisedge->v2 = vnum1; if (lp->p_type == PT_ARROWHEAD) thisedge->style = PT_BACKARROW; } return thisedge - elist; } /* store the edge from vnum1 to vnum2 into the edge list. Ensure that * the vertex with higher z is stored in v1, to ease sorting by zmax */ static long int store_edge( long int vnum1, edge_direction direction, long int crvlen, struct lp_style_type *lp, int style) { p_vertex v1 = vlist + vnum1; p_vertex v2 = NULL; /* just in case: initialize... */ long int vnum2; unsigned int drawbits = (0x1 << direction); switch (direction) { case edir_vector: v2 = v1 + 1; drawbits = 0; break; case edir_west: v2 = v1 - 1; break; case edir_north: v2 = v1 - crvlen; break; case edir_NW: v2 = v1 - crvlen - 1; break; case edir_NE: v2 = v1 - crvlen; v1 -= 1; drawbits >>= 1; /* altDiag is handled like normal NW one */ break; case edir_impulse: v2 = v1 - 1; drawbits = 0; /* don't care about the triangle pattern */ break; case edir_point: v2 = v1; drawbits = 0; /* nothing to draw, but disable check */ break; } vnum2 = v2 - vlist; if (VERTEX_IS_UNDEFINED(*v1) || VERTEX_IS_UNDEFINED(*v2)) { return -2; } if (drawbits && /* no bits set: 'blind' edge --> no test! */ ! (hiddenTriangleLinesdrawnPattern & drawbits) ) style = LT_NODRAW; return make_edge(vnum1, vnum2, lp, style, -1); } /* Calculate the normal equation coefficients of the plane of polygon * 'p'. Uses is the 'signed projected area' method. Its benefit is * that it doesn't rely on only three of the vertices of 'p', as the * naive cross product method does. */ static TBOOLEAN get_plane(p_polygon poly, t_plane plane) { int i; p_vertex v1, v2; double x, y, z, s; TBOOLEAN frontfacing=TRUE; /* calculate the signed areas of the polygon projected onto the * planes x=0, y=0 and z=0, respectively. The three areas form * the components of the plane's normal vector: */ v1 = vlist + poly->vertex[POLY_NVERT - 1]; v2 = vlist + poly->vertex[0]; plane[0] = (v1->y - v2->y) * (v1->z + v2->z); plane[1] = (v1->z - v2->z) * (v1->x + v2->x); plane[2] = (v1->x - v2->x) * (v1->y + v2->y); for (i = 1; i < POLY_NVERT; i++) { v1 = v2; v2 = vlist + poly->vertex[i]; plane[0] += (v1->y - v2->y) * (v1->z + v2->z); plane[1] += (v1->z - v2->z) * (v1->x + v2->x); plane[2] += (v1->x - v2->x) * (v1->y + v2->y); } /* Normalize the resulting normal vector */ s = sqrt(plane[0] * plane[0] + plane[1] * plane[1] + plane[2] * plane[2]); if (GE(0.0, s)) { /* The normal vanishes, i.e. the polygon is degenerate. We build * another vector that is orthogonal to the line of the polygon */ v1 = vlist + poly->vertex[0]; for (i = 1; i < POLY_NVERT; i++) { v2 = vlist + poly->vertex[i]; if (!V_EQUAL(v1, v2)) break; } /* build (x,y,z) that should be linear-independant from <v1, v2> */ x = v1->x; y = v1->y; z = v1->z; if (EQ(y, v2->y)) y += 1.0; else x += 1.0; /* Re-do the signed area computations */ plane[0] = v1->y * (v2->z - z) + v2->y * (z - v1->z) + y * (v1->z - v2->z); plane[1] = v1->z * (v2->x - x) + v2->z * (x - v1->x) + z * (v1->x - v2->x); plane[2] = v1->x * (v2->y - y) + v2->x * (y - v1->y) + x * (v1->y - v2->y); s = sqrt(plane[0] * plane[0] + plane[1] * plane[1] + plane[2] * plane[2]); } /* ensure that normalized c is > 0 */ if (plane[2] < 0.0) { s *= -1.0; frontfacing = FALSE; } plane[0] /= s; plane[1] /= s; plane[2] /= s; /* Now we have the normalized normal vector, insert one of the * vertices into the equation to get 'd'. For an even better result, * an average over all the vertices might be used */ plane[3] = -plane[0] * v1->x - plane[1] * v1->y - plane[2] * v1->z; return frontfacing; } /* Evaluate the plane equation represented a four-vector for the given * vector. For points in the plane, this should result in values ==0. * < 0 is 'away' from the polygon, > 0 is infront of it */ static GP_INLINE double eval_plane_equation(t_plane p, p_vertex v) { return (p[0]*v->x + p[1]*v->y + p[2]*v->z + p[3]); } /* Find the intersection of a line and plane in 3d space in * terms of parameterization u where v = v1 + u * (v2 - v1) */ static GP_INLINE double intersect_line_plane(p_vertex v1, p_vertex v2, t_plane p) { double numerator = eval_plane_equation(p, v1); if (numerator == 0) return 0; else { double denominator = p[0]*(v1->x - v2->x) + p[1]*(v1->y - v2->y) + p[2]*(v1->z - v2->z); return numerator/denominator; } } /* Find the intersection of two lines in 2d space in terms * of parameterization u where v = v1 + u * (v2 - v1) */ static double intersect_line_line(p_vertex v1, p_vertex v2, p_vertex w1, p_vertex w2) { double numerator = (w2->x - w1->x)*(v1->y - w1->y) - (w2->y - w1->y)*(v1->x - w1->x); if (numerator == 0) return 0; else { double denominator = (w2->y - w1->y)*(v2->x - v1->x) - (w2->x - w1->x)*(v2->y - v1->y); return numerator/denominator; } } /* Check whether the point is covered by the plane in 3d space * * 0 - point not covered * 1 - point covered and does not lie in plane * 2 - point covered and lies in plane */ static int cover_point_poly(p_vertex v1, p_vertex v2, double u, p_polygon poly) { /* Using EQ() test seemed to have no effect on results */ if (poly->plane[2] == 0) { /* The element is "vertical" so treat as infitesimally small for now. * An alternative would be to interpolate the edge closest to the * viewer plane. However, there may be tests previous to this that * rule out this case. */ return 0; } else { p_vertex w1 = vlist + poly->vertex[0]; p_vertex w2 = vlist + poly->vertex[1]; p_vertex w3 = vlist + poly->vertex[2]; double p_side[3]; /* Signed areas */ vertex p; p.x = v1->x + u * (v2->x - v1->x); p.y = v1->y + u * (v2->y - v1->y); p.z = v1->z + u * (v2->z - v1->z); /* Check if point is inside triangular element */ p_side[0] = area2D(w1, w2, &p); p_side[1] = area2D(w2, w3, &p); p_side[2] = area2D(w3, w1, &p); if (0 || (GE(p_side[0], 0) && GE(p_side[1], 0) && GE(p_side[2], 0) ) || (GE(0 , p_side[0]) && GE(0 , p_side[1]) && GE(0 , p_side[2]) ) ) { /* Point inside closed triangle, now check z value */ double z_plane = -(poly->plane[0]*p.x + poly->plane[1]*p.y + poly->plane[3]) / poly->plane[2]; if (GE(z_plane, p.z)) { /* Covered, but is it on the plane? */ if (GE(p.z, z_plane)) return 2; else return 1; } else return 0; } else return 0; } } /* Build the data structure for this polygon. The return value is the * index of the newly generated polygon. This is memorized for access * to polygons in the previous isoline, from the next-following * one. */ static long int store_polygon(long vnum1, polygon_direction direction, long crvlen) { long int v[POLY_NVERT]; p_vertex v1, v2, v3; p_polygon p; switch (direction) { case pdir_NE: v[0] = vnum1; v[2] = vnum1 - crvlen; v[1] = v[2] - 1; break; case pdir_SW: /* triangle points southwest, here */ v[0] = vnum1; v[1] = vnum1 - 1; v[2] = v[1] - crvlen; break; case pdir_SE: /* alt-diagonal, case 1: southeast triangle: */ v[0] = vnum1; v[2] = vnum1 - crvlen; v[1] = vnum1 - 1; break; case pdir_NW: v[2] = vnum1 - crvlen; v[0] = vnum1 - 1; v[1] = v[0] - crvlen; break; } v1 = vlist + v[0]; v2 = vlist + v[1]; v3 = vlist + v[2]; if (VERTEX_IS_UNDEFINED(*v1) || VERTEX_IS_UNDEFINED(*v2) || VERTEX_IS_UNDEFINED(*v3) ) return (-2); /* Check if polygon is degenerate */ if (V_EQUAL(v1,v2) || V_EQUAL(v2,v3) || V_EQUAL(v3,v1)) return (-2); /* All else OK, fill in the polygon: */ p = nextfrom_dynarray(&polygons); memcpy (p->vertex, v, sizeof(v)); #if ! HIDDEN3D_QUADTREE p->next = -1; #endif /* Some helper macros for repeated code blocks: */ /* Gets Minimum 'var' value of polygon 'poly' into variable * 'min. C is one of x, y, or z: */ #define GET_MIN(poly, var, min) \ do { \ int i; \ long *v = poly->vertex; \ \ min = vlist[*v++].var; \ for (i = 1; i< POLY_NVERT; i++, v++) \ if (vlist[*v].var < min) \ min = vlist[*v].var; \ if (min < -surface_scale) disable_mouse_z = TRUE; \ } while (0) /* Gets Maximum 'var' value of polygon 'poly', as with GET_MIN */ #define GET_MAX(poly, var, max) \ do { \ int i; \ long *v = poly->vertex; \ \ max = vlist[*v++].var; \ for (i = 1; i< POLY_NVERT; i++, v++) \ if (vlist[*v].var > max) \ max = vlist[*v].var; \ if (max > surface_scale) disable_mouse_z = TRUE; \ } while (0) GET_MIN(p, x, p->xmin); GET_MIN(p, y, p->ymin); GET_MIN(p, z, p->zmin); GET_MAX(p, x, p->xmax); GET_MAX(p, y, p->ymax); GET_MAX(p, z, p->zmax); #undef GET_MIN #undef GET_MAX #if HIDDEN3D_GRIDBOX p->xbits = CALC_BITRANGE(p->xmin, p->xmax); p->ybits = CALC_BITRANGE(p->ymin, p->ymax); #endif p->frontfacing = get_plane(p, p->plane); return (p - plist); } /* color edges, based on the orientation of polygon(s). One of the two * edges passed in is a new one, meaning there is no other polygon * sharing it, yet. The other, 'old' edge is common to the new polygon * and another one, which was created earlier on. If these two polygon * differ in their orientation (one front-, the other backsided to the * viewer), this routine has to resolve that conflict. Edge colours * are changed only if the edge wasn't invisible, before */ static void color_edges( long int new_edge, /* index of 'new', conflictless edge */ long int old_edge, /* index of 'old' edge, may conflict */ long int new_poly, /* index of current polygon */ long int old_poly, /* index of poly sharing old_edge */ int above, /* style number for front of polygons */ int below) /* style number for backside of polys */ { int casenumber; if (new_poly > -2) { /* new polygon was built successfully */ if (old_poly <= -2) /* old polygon doesn't exist. Use new_polygon for both: */ old_poly = new_poly; casenumber = (plist[new_poly].frontfacing ? 1 : 0) + 2 * (plist[old_poly].frontfacing ? 1 : 0); switch (casenumber) { case 0: /* both backfacing */ if (elist[new_edge].style != LT_NODRAW) elist[new_edge].style = below; if (elist[old_edge].style != LT_NODRAW) elist[old_edge].style = below; break; case 2: if (elist[new_edge].style != LT_NODRAW) elist[new_edge].style = below; /* FALLTHROUGH */ case 1: /* new front-, old one backfacing, or */ /* new back-, old one frontfacing */ if (((new_edge == old_edge) && hiddenHandleBentoverQuadrangles) /* a diagonal edge! */ || (elist[old_edge].style != LT_NODRAW)) { /* conflict has occured: two polygons meet here, with opposige * sides being shown. What's to do? * 1) find a vertex of one polygon outside this common * edge * 2) check wether it's in front of or behind the * other polygon's plane * 3) if in front, color the edge accoring to the * vertex' polygon, otherwise, color like the other * polygon */ long int vnum1 = elist[old_edge].v1; long int vnum2 = elist[old_edge].v2; p_polygon p = plist + new_poly; long int pvert = -1; double point_to_plane; if (p->vertex[0] == vnum1) { if (p->vertex[1] == vnum2) { pvert = p->vertex[2]; } else if (p->vertex[2] == vnum2) { pvert = p->vertex[1]; } } else if (p->vertex[1] == vnum1) { if (p->vertex[0] == vnum2) { pvert = p->vertex[2]; } else if (p->vertex[2] == vnum2) { pvert = p->vertex[0]; } } else if (p->vertex[2] == vnum1) { if (p->vertex[0] == vnum2) { pvert = p->vertex[1]; } else if (p->vertex[1] == vnum2) { pvert = p->vertex[0]; } } assert (pvert >= 0); point_to_plane = eval_plane_equation(plist[old_poly].plane, vlist + pvert); if (point_to_plane > 0) { /* point in new_poly is in front of old_poly plane */ elist[old_edge].style = p->frontfacing ? above : below; } else { elist[old_edge].style = plist[old_poly].frontfacing ? above : below; } } break; case 3: /* both frontfacing: nothing to do */ break; } /* switch */ } else { /* Ooops? build_networks() must have guessed incorrectly that * this polygon should exist. */ return; } } /* This somewhat monstrous routine fills the vlist, elist and plist * dynamic arrays with values from all those plots. It strives to * respect all the topological linkage between vertices, edges and * polygons. E.g., it has to find the correct color for each edge, * based on the orientation of the two polygons sharing it, WRT both * the observer and each other. */ /* NEW FEATURE HBB 20000715: allow non-grid datasets too, by storing * only vertices and 'direct' edges, but no polygons or 'cross' edges * */ static void build_networks(struct surface_points *plots, int pcount) { long int i; struct surface_points *this_plot; int surface; /* count the surfaces (i.e. sub-plots) */ long int crv, ncrvs; /* count isolines */ long int nverts; /* count vertices */ long int max_crvlen; /* maximal length of isoline in any plot */ long int nv, ne, np; /* local poly/edge/vertex counts */ long int *north_polygons; /* stores polygons of isoline above */ long int *these_polygons; /* same, being built for use by next turn */ long int *north_edges; /* stores edges of polyline above */ long int *these_edges; /* same, being built for use by next turn */ struct iso_curve *icrvs; int above = LT_NODRAW; /* linetype for edges of front side*/ int below = LT_NODRAW; /* linetype for edges of back side*/ struct lp_style_type *lp; /* pointer to line and point properties */ /* Count out the initial sizes needed for the polygon and vertex * lists. */ nv = ne = np = 0; max_crvlen = -1; for (this_plot = plots, surface = 0; surface < pcount; this_plot = this_plot->next_sp, surface++) { long int crvlen; /* Quietly skip empty plots */ if (this_plot->plot_type == NODATA) continue; crvlen = this_plot->iso_crvs->p_count; /* Allow individual plots to opt out of hidden3d calculations */ if (this_plot->opt_out_of_hidden3d) continue; /* register maximal isocurve length. Only necessary for * grid-topology plots that will create polygons, so I can do * it here, already. */ if (crvlen > max_crvlen) max_crvlen = crvlen; /* count 'curves' (i.e. isolines) and vertices in this plot */ nverts = 0; if(this_plot->plot_type == FUNC3D) { ncrvs = 0; for(icrvs = this_plot->iso_crvs; icrvs; icrvs = icrvs->next) { ncrvs++; } nverts += ncrvs * crvlen; } else if(this_plot->plot_type == DATA3D) { ncrvs = this_plot->num_iso_read; if (this_plot->has_grid_topology) nverts += ncrvs * crvlen; else if (this_plot->plot_style == VECTOR) nverts += this_plot->iso_crvs->p_count; else { /* have to check each isoline separately: */ for (icrvs = this_plot->iso_crvs; icrvs; icrvs = icrvs->next) nverts += icrvs->p_count; } } else { graph_error("Plot type is neither function nor data"); return; } /* To avoid possibly suprising error messages, several 2d-only * plot styles are mapped to others, that are genuinely * available in 3d. */ switch (this_plot->plot_style) { case PM3DSURFACE: case LINESPOINTS: case STEPS: case FSTEPS: case HISTEPS: case LINES: nv += nverts; ne += nverts - ncrvs; if (this_plot->has_grid_topology) { ne += 2 * nverts - ncrvs - 2 * crvlen + 1; np += 2 * (ncrvs - 1) * (crvlen - 1); } break; case BOXES: case FILLEDCURVES: case IMPULSES: case VECTOR: nv += 2 * nverts; ne += nverts; break; case POINTSTYLE: default: /* treat all remaining ones like 'points' */ nv += nverts; ne += nverts; /* a 'phantom edge' per isolated point */ break; } /* switch */ } /* for (plots) */ /* Check for no data at all */ if (max_crvlen <= 0) return; /* allocate all the lists to the size we need: */ resize_dynarray(&vertices, nv); resize_dynarray(&edges, ne); resize_dynarray(&polygons, np); /* allocate the storage for polygons and edges of the isoline just * above the current one, to allow easy access to them from the * current isoline */ north_polygons = gp_alloc(2 * max_crvlen * sizeof(long), "hidden north_polys"); these_polygons = gp_alloc(2 * max_crvlen * sizeof(long), "hidden these_polys"); north_edges = gp_alloc(3 * max_crvlen * sizeof(long), "hidden north_edges"); these_edges = gp_alloc(3 * max_crvlen * sizeof(long), "hidden these_edges"); /* initialize the lists, all in one large loop. This is different * from the previous approach, which went over the vertices, * first, and only then, in new loop, built polygons */ for (this_plot = plots, surface = 0; surface < pcount; this_plot = this_plot->next_sp, surface++) { TBOOLEAN color_from_column = this_plot->pm3d_color_from_column; long int crvlen; lp = &(this_plot->lp_properties); /* Quietly skip empty plots */ if (this_plot->plot_type == NODATA) continue; crvlen = this_plot->iso_crvs->p_count; /* Allow individual plots to opt out of hidden3d calculations */ if (this_plot->opt_out_of_hidden3d) continue; /* We can't use the linetype passed to us, because it has been through */ /* load_linetype(), which replaced the nominal linetype with the one */ /* assigned by "set linetype ..." */ above = this_plot->hidden3d_top_linetype; below = above + hiddenBacksideLinetypeOffset; /* This is a special flag indicating that the user specified an */ /* explicit surface color in the splot command. */ if (above == LT_SINGLECOLOR-1) above = below = LT_SINGLECOLOR; /* We will not actually draw PM3D surfaces here, but their */ /* edges can be used to calculate occlusion of lines, including */ /* the plot borders. (NB: the PM3D surface will _not_ be hidden */ /* by other non-PM3D surfaces. */ if (this_plot->plot_style == PM3DSURFACE) above = below = LT_NODRAW; /* calculate the point symbol type: */ /* Assumes that upstream functions have made sure this is * initialized sensibly --- thou hast been warned */ if (this_plot->plot_style == VECTOR) { lp->p_type = PT_ARROWHEAD; if (this_plot->arrow_properties.head == NOHEAD) { this_plot->arrow_properties.head_length= 1; this_plot->arrow_properties.head_angle = 0; } apply_3dhead_properties(&(this_plot->arrow_properties)); } /* HBB 20000715: new initialization code block for non-grid * structured datasets. Sufficiently different from the rest * to warrant separate code, I think. */ if (! this_plot->has_grid_topology) { for (crv = 0, icrvs = this_plot->iso_crvs; icrvs; crv++, icrvs = icrvs->next) { struct coordinate GPHUGE *points = icrvs->points; long int previousvertex = -1; /* To handle labels we must look inside a separate list */ /* rather than just walking through the points arrays. */ if (this_plot->plot_style == LABELPOINTS) { struct text_label *label; long int thisvertex; struct coordinate labelpoint; lp->pointflag = 1; /* Labels can use the code for hidden points */ labelpoint.type = INRANGE; for (label = this_plot->labels->next; label != NULL; label = label->next) { labelpoint.x = label->place.x; labelpoint.y = label->place.y; labelpoint.z = label->place.z; if (label->textcolor.type == TC_Z) labelpoint.CRD_COLOR = label->textcolor.value; else labelpoint.CRD_COLOR = label->textcolor.lt; thisvertex = store_vertex(&labelpoint, &(this_plot->lp_properties), color_from_column); if (thisvertex < 0) continue; (vlist+thisvertex)->label = label; store_edge(thisvertex, edir_point, crvlen, lp, above); } } else for (i = 0; i < icrvs->p_count; i++) { long int thisvertex, basevertex; thisvertex = store_vertex(points + i, lp, color_from_column); if (this_plot->plot_style == VECTOR) { store_vertex(icrvs->next->points+i, 0, 0); } if (thisvertex < 0) { previousvertex = thisvertex; continue; } switch (this_plot->plot_style) { case PM3DSURFACE: case LINESPOINTS: case STEPS: case FSTEPS: case HISTEPS: case LINES: if (previousvertex >= 0) store_edge(thisvertex, edir_west, 0, lp, above); break; case VECTOR: store_edge(thisvertex, edir_vector, 0, lp, above); break; case BOXES: case FILLEDCURVES: /* set second vertex to the low end of zrange */ { coordval remember_z = points[i].z; points[i].z = axis_array[FIRST_Z_AXIS].min; basevertex = store_vertex(points + i, lp, color_from_column); points[i].z = remember_z; } if (basevertex > 0) store_edge(basevertex, edir_impulse, 0, lp, above); break; case IMPULSES: /* set second vertex to z=0 */ { coordval remember_z = points[i].z; points[i].z = 0.0; basevertex = store_vertex(points + i, lp, color_from_column); points[i].z = remember_z; } if (basevertex > 0) store_edge(basevertex, edir_impulse, 0, lp, above); break; case POINTSTYLE: default: /* treat all the others like 'points' */ store_edge(thisvertex, edir_point, crvlen, lp, above); break; } /* switch(plot_style) */ previousvertex = thisvertex; } /* for(vertex) */ } /* for(crv) */ continue; /* done with this plot! */ } /* initialize stored indices of north-of-this-isoline polygons and * edges properly */ for (i=0; i < this_plot->iso_crvs->p_count; i++) { north_polygons[2 * i] = north_polygons[2 * i + 1] = north_edges[3 * i] = north_edges[3 * i + 1] = north_edges[3 * i + 2] = -3; } for (crv = 0, icrvs = this_plot->iso_crvs; icrvs; crv++, icrvs = icrvs->next) { struct coordinate GPHUGE *points = icrvs->points; for (i = 0; i < icrvs->p_count; i++) { long int thisvertex, basevertex; long int e1, e2, e3; long int pnum; thisvertex = store_vertex(points + i, lp, color_from_column); /* Preset the pointers to the polygons and edges * belonging to this isoline */ these_polygons[2 * i] = these_polygons[2 * i + 1] = these_edges[3 * i] = these_edges[3 * i + 1] = these_edges[3 * i + 2] = -3; switch (this_plot->plot_style) { case PM3DSURFACE: case LINESPOINTS: case STEPS: case FSTEPS: case HISTEPS: case LINES: if (i > 0) { /* not first point, so we might want to set up * the edge(s) to the left of this vertex */ if (thisvertex < 0) { if ((crv > 0) && (hiddenShowAlternativeDiagonal) ) { /* this vertex is invalid, but the * other three might still form a * valid triangle, facing northwest to * do that, we'll need the 'wrong' * diagonal, which goes from SW to NE: * */ these_edges[i*3+2] = e3 = store_edge(vertices.end - 1, edir_NE, crvlen, lp, above); if (e3 > -2) { /* don't store this polygon for * later: it doesn't share edges * with any others to the south or * east, so there's need to */ pnum = store_polygon(vertices.end - 1, pdir_NW, crvlen); /* The other two edges of this * polygon need to be checked * against the neighboring * polygons' orientations, before * being coloured */ color_edges(e3, these_edges[3*(i-1) +1], pnum, these_polygons[2*(i-1) + 1], above, below); color_edges(e3, north_edges[3*i], pnum, north_polygons[2*i], above, below); } } break; /* nothing else to do for invalid vertex */ } /* Coming here means that the current vertex * is valid: check the other three of this * cell, by trying to set up the edges from * this one to there */ these_edges[i*3] = e1 = store_edge(thisvertex, edir_west, crvlen, lp, above); if (crv > 0) { /* vertices to the north exist */ these_edges[i*3 + 1] = e2 = store_edge(thisvertex, edir_north, crvlen, lp, above); these_edges[i*3 + 2] = e3 = store_edge(thisvertex, edir_NW, crvlen, lp, above); if (e3 > -2) { /* diagonal edge of this cell is OK, * so try to build both the polygons: * */ if (e1 > -2) { /* one pair of edges is valid: put * first polygon, which points * towards the southwest */ these_polygons[2*i] = pnum = store_polygon(thisvertex, pdir_SW, crvlen); color_edges(e1, these_edges[3*(i-1)+1], pnum, these_polygons[2*(i-1)+ 1], above, below ); } if (e2 > -2) { /* other pair of two is fine, put * the northeast polygon: */ these_polygons[2*i + 1] = pnum = store_polygon(thisvertex, pdir_NE, crvlen); color_edges(e2, north_edges[3*i], pnum, north_polygons[2*i], above, below); } /* In case these two new polygons * differ in orientation, find good * coloring of the diagonal */ color_edges(e3, e3, these_polygons[2*i], these_polygons[2*i+1], above, below); } /* if e3 valid */ else if ((e1 > -2) && (e2 > -2) && hiddenShowAlternativeDiagonal) { /* looks like all but the north-west * vertex are usable, so we set up the * southeast-pointing triangle, using * the 'wrong' diagonal: */ these_edges[3*i + 2] = e3 = store_edge(thisvertex, edir_NE, crvlen, lp, above); if (e3 > -2) { /* fill this polygon into *both* * polygon places for this * quadrangle, as this triangle * coincides with both edges that * will be used by later polygons * */ these_polygons[2*i] = these_polygons[2*i+1] = pnum = store_polygon(thisvertex, pdir_SE, crvlen); /* This case is somewhat special: * all edges are new, so there is * no other polygon orientation to * consider */ if (!plist[pnum].frontfacing) elist[e1].style = elist[e2].style = elist[e3].style = below; } } } } else if ((crv > 0) && (thisvertex >= 0)) { /* We're at the west border of the grid, but * not on the north one: put vertical end-wall * edge:*/ these_edges[3*i + 1] = store_edge(thisvertex, edir_north, crvlen, lp, above); } break; case BOXES: case FILLEDCURVES: case IMPULSES: if (thisvertex < 0) break; /* set second vertex to the low end of zrange */ { coordval remember_z = points[i].z; points[i].z = (this_plot->plot_style == IMPULSES) ? 0.0 : axis_array[FIRST_Z_AXIS].min; basevertex = store_vertex(points + i, lp, color_from_column); points[i].z = remember_z; } if (basevertex > 0) store_edge(basevertex, edir_impulse, 0, lp, above); break; case POINTSTYLE: default: /* treat all the others like 'points' */ if (thisvertex < 0) /* Ignore invalid vertex */ break; store_edge(thisvertex, edir_point, crvlen, lp, above); break; } /* switch */ } /* for(i) */ /* Swap the 'north' lists of polygons and edges with * 'these' ones, which have been filled in the pass * through this isocurve */ { long int *temp = north_polygons; north_polygons = these_polygons; these_polygons = temp; temp = north_edges; north_edges = these_edges; these_edges = temp; } } /* for(isocrv) */ } /* for(plot) */ free (these_polygons); free (north_polygons); free (these_edges); free (north_edges); } /* Sort the elist in order of growing zmax. Uses qsort on an array of * plist indices, and then fills in the 'next' fields in struct * polygon to store the resulting order inside the plist */ /* HBB 20010720: removed 'static' to avoid HP-sUX gcc bug */ int compare_edges_by_zmin(SORTFUNC_ARGS p1, SORTFUNC_ARGS p2) { return SIGN(vlist[elist[*(const long *) p1].v2].z - vlist[elist[*(const long *) p2].v2].z); } static void sort_edges_by_z() { long *sortarray, i; p_edge this; if (!edges.end) return; sortarray = gp_alloc(sizeof(long) * edges.end, "hidden sort edges"); /* initialize sortarray with an identity mapping */ for (i = 0; i < edges.end; i++) sortarray[i] = i; /* sort it */ qsort(sortarray, (size_t) edges.end, sizeof(long), compare_edges_by_zmin); /* traverse plist in the order given by sortarray, and set the * 'next' pointers */ this = elist + sortarray[0]; for (i = 1; i < edges.end; i++) { this->next = sortarray[i]; this = elist + sortarray[i]; } this->next = -1L; /* 'efirst' is the index of the leading element of plist */ efirst = sortarray[0]; free(sortarray); } /* HBB 20010720: removed 'static' to avoid HP-sUX gcc bug */ int compare_polys_by_zmax(SORTFUNC_ARGS p1, SORTFUNC_ARGS p2) { return (SIGN(plist[*(const long *) p1].zmax - plist[*(const long *) p2].zmax)); } static void sort_polys_by_z() { long *sortarray, i; p_polygon this; if (!polygons.end) return; sortarray = gp_alloc(sizeof(long) * polygons.end, "hidden sortarray"); /* initialize sortarray with an identity mapping */ for (i = 0; i < polygons.end; i++) sortarray[i] = i; /* sort it */ qsort(sortarray, (size_t) polygons.end, sizeof(long), compare_polys_by_zmax); /* traverse plist in the order given by sortarray, and set the * 'next' pointers */ #if HIDDEN3D_QUADTREE /* HBB 20000716: Loop backwards, to ease construction of * linked lists from the head: */ { int grid_x, grid_y; int grid_x_low, grid_x_high, grid_y_low, grid_y_high; for (grid_x = 0; grid_x < QUADTREE_GRANULARITY; grid_x++) for (grid_y = 0; grid_y < QUADTREE_GRANULARITY; grid_y++) quadtree[grid_x][grid_y] = -1; for (i=polygons.end - 1; i >= 0; i--) { this = plist + sortarray[i]; grid_x_low = coord_to_treecell(this->xmin); grid_x_high = coord_to_treecell(this->xmax); grid_y_low = coord_to_treecell(this->ymin); grid_y_high = coord_to_treecell(this->ymax); for (grid_x = grid_x_low; grid_x <= grid_x_high; grid_x++) { for (grid_y = grid_y_low; grid_y <= grid_y_high; grid_y++) { p_qtreelist newhead = nextfrom_dynarray(&qtree); newhead->next = quadtree[grid_x][grid_y]; newhead->p = sortarray[i]; quadtree[grid_x][grid_y] = newhead - qlist; } } } } #else /* HIDDEN3D_QUADTREE */ this = plist + sortarray[0]; for (i = 1; i < polygons.end; i++) { this->next = sortarray[i]; this = plist + sortarray[i]; } this->next = -1L; /* 'pfirst' is the index of the leading element of plist */ #endif /* HIDDEN3D_QUADTREE */ pfirst = sortarray[0]; free(sortarray); } /************************************************/ /******* Drawing the polygons ********/ /************************************************/ /* draw a single vertex as a point symbol, if requested by the chosen * plot style (linespoints, points, or dots...) */ static void draw_vertex(p_vertex v) { unsigned int x, y; TERMCOORD(v, x, y); if (v->lp_style && v->lp_style->p_type >= -1 && !clip_point(x,y)) { struct t_colorspec *tc = &(v->lp_style->pm3d_color); if (v->label) { write_label(x,y, v->label); v->lp_style = NULL; return; } if (tc->type == TC_LINESTYLE && tc->lt == LT_COLORFROMCOLUMN) { struct lp_style_type style = *(v->lp_style); load_linetype(&style, (int)v->real_z); tc = &style.pm3d_color; apply_pm3dcolor(tc, term); } else if (tc->type == TC_RGB && tc->lt == LT_COLORFROMCOLUMN) set_rgbcolor((int)v->real_z); else if (tc->type == TC_RGB) set_rgbcolor(tc->lt); else if (tc->type == TC_CB) set_color( cb2gray(v->real_z) ); else if (tc->type == TC_Z) set_color( cb2gray(z2cb(v->real_z)) ); #ifdef HIDDEN3D_VAR_PTSIZE if (v->lp_style->p_size == PTSZ_VARIABLE) (term->pointsize)(pointsize * v->original->CRD_PTSIZE); #endif (term->point)(x,y, v->lp_style->p_type); /* vertex has been drawn --> flag it as done */ v->lp_style = NULL; } } /* The function that actually draws the visible portions of lines */ static void draw_edge(p_edge e, p_vertex v1, p_vertex v2) { /* It used to be that e contained style as a integer linetype. * This destroyed any style attributes set in the splot command. * We really just want to extract a colorspec. */ struct t_colorspec color = e->lp->pm3d_color; struct lp_style_type lptemp = *(e->lp); TBOOLEAN recolor = FALSE; TBOOLEAN arrow = (lptemp.p_type == PT_ARROWHEAD || lptemp.p_type == PT_BACKARROW); int varcolor; if (arrow && (e->style == PT_BACKARROW)) varcolor = v2->real_z; else varcolor = v1->real_z; /* This handles 'lc rgb variable' */ if (color.type == TC_RGB && color.lt == LT_COLORFROMCOLUMN) { recolor = TRUE; lptemp.pm3d_color.lt = varcolor; } else /* This handles explicit 'lc rgb' in the plot command */ if (color.type == TC_RGB && e->style == LT_SINGLECOLOR) { recolor = TRUE; } else if (color.type == TC_RGB && e->lp == &border_lp) { lptemp.pm3d_color.lt = varcolor; } else /* This handles 'lc variable' */ if (lptemp.l_type == LT_COLORFROMCOLUMN) { recolor = TRUE; load_linetype(&lptemp, varcolor); } else /* This handles style VECTORS */ if (arrow) { lptemp.p_type = e->style; } else /* This is the default style: color top and bottom in successive colors */ if ((hiddenBacksideLinetypeOffset != 0) && (e->lp->pm3d_color.type != TC_Z)) { recolor = TRUE; load_linetype(&lptemp, e->style + 1); color = lptemp.pm3d_color; } /* The remaining case is hiddenBacksideLinetypeOffset == 0 */ /* in which case we assume the correct color is already set */ else ; if (recolor) { color = lptemp.pm3d_color; lptemp = *(e->lp); lptemp.pm3d_color = color; lptemp.use_palette = TRUE; if (arrow) lptemp.p_type = e->style; } draw3d_line_unconditional(v1, v2, &lptemp, color); if (e->lp->pointflag) { draw_vertex(v1); draw_vertex(v2); } } /*************************************************************/ /*************************************************************/ /******* The depth sort algorithm (in_front) and its ******/ /******* whole lot of helper functions ******/ /*************************************************************/ /*************************************************************/ /* Split a given line segment into two at an inner point. The inner * point is specified as a fraction of the line-length (0 is V1, 1 is * V2) */ /* HBB 20001108: changed to now take two vertex pointers as its * arguments, rather than an edge pointer. */ /* HBB 20001204: changed interface again. Now use vertex indices, * rather than pointers, to avoid problems with dangling pointers * after nextfrom_dynarray() call. */ static long split_line_at_ratio( long vnum1, long vnum2, /* vertex indices of line to split */ double w) /* where to split it */ { p_vertex v; /* Create a new vertex */ v = nextfrom_dynarray(&vertices); v->x = (vlist[vnum2].x - vlist[vnum1].x) * w + vlist[vnum1].x; v->y = (vlist[vnum2].y - vlist[vnum1].y) * w + vlist[vnum1].y; v->z = (vlist[vnum2].z - vlist[vnum1].z) * w + vlist[vnum1].z; v->real_z = (vlist[vnum2].real_z - vlist[vnum1].real_z) * w + vlist[vnum1].real_z; /* no point symbol for vertices generated by splitting an edge */ v->lp_style = NULL; /* additional checks to prevent adding unnecessary vertices */ if (V_EQUAL(v, vlist + vnum1)) { droplast_dynarray(&vertices); return vnum1; } if (V_EQUAL(v, vlist + vnum2)) { droplast_dynarray(&vertices); return vnum2; } return (v - vlist); } /* Compute the 'signed area' of 3 points in their 2d projection * to the x-y plane. Essentially the z component of the crossproduct. * Should come out positive if v1, v2, v3 are ordered counter-clockwise */ static GP_INLINE double area2D(p_vertex v1, p_vertex v2, p_vertex v3) { double dx12 = v2->x - v1->x, /* x/y components of (v2-v1) and (v3-v1) */ dx13 = v3->x - v1->x, dy12 = v2->y - v1->y, dy13 = v3->y - v1->y; return (dx12 * dy13 - dy12 * dx13); } /* Utility routine: takes an edge and makes a new one, which is a fragment * of the old one. The fragment inherits the line style and stuff of the * given edge; only the two new vertices are different. The new edge * is then passed to in_front, for recursive handling */ /* HBB 20001108: Changed from edge pointer to edge index. Don't * allocate a fresh anymore, as this is no longer needed after the * change to in_front(). What remains of this function may no longer * be worth having. I.e. it can be replaced by a direct recursion call * of in_front(), sometime soon. */ static GP_INLINE void handle_edge_fragment(long edgenum, long vnum1, long vnum2, long firstpoly) { #if !HIDDEN3D_QUADTREE /* Avoid checking against the same polygon again. */ firstpoly = plist[firstpoly].next; #endif in_front(edgenum, vnum1, vnum2, &firstpoly); } /*********************************************************************/ /* The actual heart of all this: determines if edge at index 'edgenum' * of the elist is in_front of all the polygons, or not. If necessary, * it will recursively call itself to isolate more than one visible * fragment of the input edge. Wherever possible, recursion is * avoided, by in-place modification of the edge. * * The visible fragments are then drawn by a call to 'draw_edge' from * inside this routine. */ /*********************************************************************/ /* HBB 20001108: changed to now take the vertex numbers as additional * arguments. The idea is to not overwrite the endpoint stored with * the edge, so Test 2 will catch on even after the subject edge has * been split up before one of its two polygons is tested against it. */ static int in_front( long edgenum, /* number of the edge in elist */ long vnum1, long vnum2, /* numbers of its endpoints */ long *firstpoly) /* first plist index to consider */ { p_polygon p; /* pointer to current testing polygon */ long int polynum; /* ... and its index in the plist */ p_vertex v1, v2; /* pointers to vertices of input edge */ coordval xmin, xmax; /* all of these are for the edge */ coordval ymin, ymax; coordval zmin, zmax; #if HIDDEN3D_GRIDBOX unsigned int xextent; /* extent bitmask in x direction */ unsigned int yextent; /* same, in y direction */ # define SET_XEXTENT \ xextent = CALC_BITRANGE(xmin, xmax); # define SET_YEXTENT \ yextent = CALC_BITRANGE(ymin, ymax); #else # define SET_XEXTENT /* nothing */ # define SET_YEXTENT /* nothing */ #endif #if HIDDEN3D_QUADTREE int grid_x, grid_y; int grid_x_low, grid_x_high; int grid_y_low, grid_y_high; long listhead; #endif /* zmin of the edge, as it started out. This is needed separately to * allow modifying '*firstpoly', without moving it too far to the * front. */ coordval first_zmin; /* Keep track of number of vertices before the process and compare * at end of process to know how many vertices to remove. */ long enter_vertices; /* macro for eliminating tail-recursion inside in_front: when the * current edge is modified, recompute all function-wide status * variables. Note that it guarantees that v1 is always closer to * the viewer than v2 (in z direction) */ /* HBB 20001108: slightly changed so it can be called with vnum1 * and vnum2 as its arguments, too */ #define setup_edge(vert1, vert2) \ do { \ if (vlist[vert1].z > vlist[vert2].z) { \ v1 = vlist + (vert1); \ v2 = vlist + (vert2); \ } else { \ v1 = vlist + (vert2); \ v2 = vlist + (vert1); \ } \ vnum1 = v1 - vlist; \ vnum2 = v2 - vlist; \ zmax = v1->z; zmin = v2->z; \ \ if (v1->x > v2->x) { \ xmin = v2->x; xmax = v1->x; \ } else { \ xmin = v1->x; xmax = v2->x; \ } \ SET_XEXTENT; \ \ if (v1->y > v2->y) { \ ymin = v2->y; ymax = v1->y; \ } else { \ ymin = v1->y; ymax = v2->y; \ } \ SET_YEXTENT; \ } while (0) /* end macro setup_edge */ /* use the macro for initial setup, too: */ setup_edge(vnum1, vnum2); first_zmin = zmin; enter_vertices = vertices.end; #if HIDDEN3D_QUADTREE grid_x_low = coord_to_treecell(xmin); grid_x_high = coord_to_treecell(xmax); grid_y_low = coord_to_treecell(ymin); grid_y_high = coord_to_treecell(ymax); for (grid_x = grid_x_low; grid_x <= grid_x_high; grid_x ++) for (grid_y = grid_y_low; grid_y <= grid_y_high; grid_y ++) for (listhead = quadtree[grid_x][grid_y]; listhead >= 0; listhead = qlist[listhead].next) #else /* HIDDEN3D_QUADTREE */ /* loop over all the polygons in the sorted list, starting at the * currently first (i.e. furthest, from the viewer) polygon. */ for (polynum = *firstpoly; polynum >=0; polynum = p->next) #endif /* HIDDEN3D_QUADTREE */ { /* shortcut variables for the three vertices of 'p':*/ p_vertex w1, w2, w3; #if HIDDEN3D_QUADTREE polynum = qlist[listhead].p; #endif p = plist + polynum; /* OK, off we go with the real work. This algorithm had its * beginnings as the one of 'HLines.java', as described in * the book 'Computer Graphics for Java Programmers', by * Dutch professor Leen Ammeraal, published by J. Wiley & * Sons, ISBN 0 471 98142 7. * * However, it was revamped with an approach that breaks * up the edge into five possible subsegments and removes * the one contiguous subsegment, if any, that is hidden. */ /* Test 1 (2D): minimax tests. Do x/y ranges of polygon * and edge have any overlap? */ if (0 #if HIDDEN3D_GRIDBOX /* First, check by comparing the extent bit patterns: */ || (!(xextent & p->xbits)) || (!(yextent & p->ybits)) #endif || (p->xmax < xmin) || (p->xmin > xmax) || (p->ymax < ymin) || (p->ymin > ymax) ) continue; /* Tests 2 and 3 switched... */ /* Test 3 (3D): Is edge completely in front of polygon? */ if (p->zmax < zmin) { /* Polygon completely behind this edge. Move start of * relevant plist to this point, to speed up next * run. This makes use of the fact that elist is also * kept in upwardly sorted order of zmin, i.e. the * condition found here will also hold for all coming * edges in the list */ if (p->zmax < first_zmin) *firstpoly = polynum; continue; /* this polygon is done with */ } /* Test 2 (0D): does edge belong to this very polygon? */ /* 20001108: to make this rejector more effective, do keep * the original edge vertices unchanged */ if (1 && (0 || (p->vertex[0] == elist[edgenum].v1) || (p->vertex[1] == elist[edgenum].v1) || (p->vertex[2] == elist[edgenum].v1) ) && (0 || (p->vertex[0] == elist[edgenum].v2) || (p->vertex[1] == elist[edgenum].v2) || (p->vertex[2] == elist[edgenum].v2) ) ) continue; w1 = vlist + p->vertex[0]; w2 = vlist + p->vertex[1]; w3 = vlist + p->vertex[2]; /* The final 'catch-all' handler: [was Test 4-9 (3D)] * Daniel Sebald 2007 * --------------------------------------------------- * If one examines the possible scenarios for an edge (v1,v2) * passing through a triangular 3D element in 2D space, it * is evident that at most 4 breaks in the edge are possible, * one for each infinite triangle side intersection and * one for the edge possibly passing directly through the * polygon. We first compute all these intersections in terms * of parameterization v = v1 + u * (v2 - v1). That gives us * four values of u. They likely will not all be in the range * (0,1), i.e., between v1 and v2. We discard all those not * in the range, and the remaining associated points along with * endpoint v1 and v2 describe a series of subsegements that are * considered individually. If any contiguous subgroup is * hidden (there can only be at most one for a convex polygon), * it is removed. * * This routine is general in the sense that the earlier tests * it are only need for speed. * * The following website illustrates geometrical concepts and * formulas: http://local.wasp.uwa.edu.au/~pbourke/geometry/ */ { double u_int[4]; /* Intersection points along edge v1, v2 */ double u_seg[6]; /* Sorted subsegment points */ int segs; /* Number of segments */ int i; u_int[0] = intersect_line_plane(v1, v2, p->plane); u_int[1] = intersect_line_line(v1, v2, w1, w2); u_int[2] = intersect_line_line(v1, v2, w2, w3); u_int[3] = intersect_line_line(v1, v2, w3, w1); /* Check if between v1 and v2 */ u_seg[0] = 0; segs = 1; for (i=0; i < 4; i++) { if ((0 < u_int[i]) && (u_int[i] < 1)) { u_seg[segs] = u_int[i]; segs++; } } u_seg[segs] = 1; /* Sort the points. First and last point already in order. */ for (i=1; i < segs; i++) { int j = i+1; for (; j < segs; j++) { if (u_seg[i] > u_seg[j]) { double temp = u_seg[i]; u_seg[i] = u_seg[j]; u_seg[j] = temp; } } } /* Check if contiguous segments or segment is covered */ for (i=0; i < segs; i++) { int covA = cover_point_poly(v1, v2, u_seg[i], p); if (covA) { /* First covered point, now look for last covered point */ int j, covB = 0; for (j=i; j < segs; j++) { int cover = cover_point_poly(v1, v2, u_seg[j+1], p); if (!cover) break; covB = cover; } if (i == j) break; /* Only one covered point, no segment covered */ if (covA == 2 && covB == 2) break; /* Points covered, but both are on the plane */ else { /* This is the hidden segment */ if (i == 0) { /* Missing segment is at start of v1, v2 */ if (j == segs) { /* Whole edge is hidden */ while (vertices.end > enter_vertices) droplast_dynarray(&vertices); return 0; } else { /* Shrink the edge and continue */ long newvert = split_line_at_ratio(vnum1, vnum2, u_seg[j]); setup_edge(newvert, vnum2); break; } } else if (j == segs) { /* Missing segment is at end of v1, v2. The i = 0 * case already tested, so shrink edge and continue */ long newvert = split_line_at_ratio(vnum1, vnum2, u_seg[i]); setup_edge(vnum1, newvert); break; } else { /* Handle new edge then shrink edge */ long newvert[2]; newvert[0] = split_line_at_ratio(vnum1, vnum2, u_seg[i]); newvert[1] = split_line_at_ratio(vnum1, vnum2, u_seg[j]); /* If the newvert[1] is vnum1 this would be an infinite * loop and stack overflow if not checked since in_front() * was just called with vnum1 and vnum2 and got to this * point. This is the equivalent of snipping out a tiny * segment near end of an edge. Simply ignore. */ if (newvert[1] != vnum1) { handle_edge_fragment(edgenum, newvert[1], vnum2, polynum); setup_edge(vnum1, newvert[0]); } break; } } } } /* Nothing is covered */ continue; } /* end of part 'T4-9' */ } /* for (polygons in list) */ /* Came here, so there's something left of this edge, which needs * to be drawn. But the vertices are different, now, so copy our * new vertices back into 'e' */ draw_edge(elist + edgenum, vlist + vnum1, vlist + vnum2); while (vertices.end > enter_vertices) droplast_dynarray(&vertices); return 1; } /* HBB 20000617: reimplemented this routine from scratch */ /* Externally callable function to draw a line, but hide it behind the * visible surface. */ /* NB: The p_vertex arguments are not allowed to be pointers into the * hidden3d 'vlist' structure. If they are, they may become invalid * before they're used, because of the nextfrom_dynarray() call. */ void draw_line_hidden( p_vertex v1, p_vertex v2, /* pointers to the end vertices */ struct lp_style_type *lp) /* line and point style to draw in */ { long int vstore1, vstore2; long int edgenum; long int temp_pfirst; /* If no polygons have been stored, nothing can be hidden, and we * can't use in_front() because the datastructures are partly * invalid. So just draw the line and be done with it */ if (!polygons.end) { draw3d_line_unconditional(v1, v2, lp, lp->pm3d_color); return; } /* Copy two vertices into hidden3d arrays: */ nextfrom_dynarray(&vertices); vstore1 = vertices.end - 1; vlist[vstore1] = *v1; if (v2) { vlist[vstore1].lp_style = NULL; nextfrom_dynarray(&vertices); vstore2 = vertices.end - 1; vlist[vstore2] = *v2; vlist[vstore2].lp_style = NULL; } else { /* v2 == NULL --> this is a point symbol to be drawn. Make two * vertex pointers the same, and set up the 'style' field */ vstore2 = vstore1; vlist[vstore2].lp_style = lp; } /* store the edge into the hidden3d datastructures */ edgenum = make_edge(vstore1, vstore2, lp, lp->l_type, -1); /* remove hidden portions of the line, and draw what remains */ temp_pfirst = pfirst; in_front(edgenum, elist[edgenum].v1, elist[edgenum].v2, &temp_pfirst); /* release allocated storage slots: */ droplast_dynarray(&edges); droplast_dynarray(&vertices); if (v2) droplast_dynarray(&vertices); } /*********************************************************************** * and, finally, the 'mother function' that uses all these lots of tools ***********************************************************************/ void plot3d_hidden(struct surface_points *plots, int pcount) { /* make vertices, edges and polygons out of all the plots */ build_networks(plots, pcount); if (! edges.end) { /* No drawable edges found. Free all storage and bail out. */ term_hidden_line_removal(); graph_error("*All* edges undefined or out of range, thus no plot."); } if (! polygons.end) { /* No polygons anything could be hidden behind... */ sort_edges_by_z(); while (efirst >= 0) { draw_edge(elist+efirst, vlist + elist[efirst].v1, vlist + elist[efirst].v2); efirst = elist[efirst].next; } } else { long int temporary_pfirst; /* Presort edges in z order */ sort_edges_by_z(); /* Presort polygons in z order */ sort_polys_by_z(); temporary_pfirst = pfirst; while (efirst >=0) { if (elist[efirst].style != LT_NODRAW) /* skip invisible edges */ in_front(efirst, elist[efirst].v1, elist[efirst].v2, &temporary_pfirst); efirst = elist[efirst].next; } } } void reset_hidden3doptions() { hiddenBacksideLinetypeOffset = BACKSIDE_LINETYPE_OFFSET; hiddenTriangleLinesdrawnPattern = TRIANGLE_LINESDRAWN_PATTERN; hiddenHandleUndefinedPoints = HANDLE_UNDEFINED_POINTS; hiddenShowAlternativeDiagonal = SHOW_ALTERNATIVE_DIAGONAL; hiddenHandleBentoverQuadrangles = HANDLE_BENTOVER_QUADRANGLES; hidden3d_layer = LAYER_BACK; } /* Emacs editing help for HBB: * Local Variables: *** * c-basic-offset: 4 *** * End: *** */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/vms.c�����������������������������������������������������������������������������0000644�0004711�0000144�00000017013�10071042561�011667� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: vms.c,v 1.5 2004/07/01 17:10:09 broeker Exp $"); } #endif /* GNUPLOT - vms.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* drop in popen() / pclose() for VMS * (originally written by drd for port of perl to vms) */ #include "syscfg.h" /* for the prototypes */ #include "stdfn.h" static int something_in_this_file; #ifdef PIPES /* (to aid porting) - how are errors dealt with */ #define ERROR(msg) { fprintf(stderr, "%s\nFile %s line %d\n", msg, __FILE__, __LINE__); } #define FATAL(msg) { fprintf(stderr, "%s\nFile %s line %d\n", msg, __FILE__, __LINE__); exit(EXIT_FAILURE); } #include <dvidef.h> #include <syidef.h> #include <jpidef.h> #include <ssdef.h> #include <descrip.h> #ifdef __DECC /* DECC does not automatically search */ #include <lib$routines.h> #include <starlet.h> /* for the sys$... routines */ #endif /* __DECC */ #ifndef EXIT_FAILURE /* not in older VAXC <stdlib.h> */ #define EXIT_FAILURE 0x10000002 /* (STS$K_ERROR | STS$M_INHIB_MSG */ #endif #define _cksts(call) \ if (!(sts=(call))&1) FATAL("Internal error") else {} static void create_mbx(unsigned short int *chan, struct dsc$descriptor_s *namdsc) { static unsigned long int mbxbufsiz; long int syiitm = SYI$_MAXBUF, dviitm = DVI$_DEVNAM; unsigned long sts; /* for _cksts */ if (!mbxbufsiz) { /* * Get the SYSGEN parameter MAXBUF, and the smaller of it and the * preprocessor consant BUFSIZ from stdio.h as the size of the * 'pipe' mailbox. */ _cksts(lib$getsyi(&syiitm, &mbxbufsiz, 0, 0, 0, 0)); if (mbxbufsiz > BUFSIZ) mbxbufsiz = BUFSIZ; } _cksts(sys$crembx(0,chan,mbxbufsiz,mbxbufsiz,0,0,0)); _cksts(lib$getdvi(&dviitm, chan, NULL, NULL, namdsc, &namdsc->dsc$w_length)); namdsc->dsc$a_pointer[namdsc->dsc$w_length] = '\0'; } /* end of create_mbx() */ struct pipe_details { struct pipe_details *next; FILE *fp; int pid; unsigned long int completion; }; static struct pipe_details *open_pipes = NULL; static $DESCRIPTOR(nl_desc, "NL:"); static int waitpid_asleep = 0; static void popen_completion_ast(unsigned long int unused) { if (waitpid_asleep) { waitpid_asleep = 0; sys$wake(0,0); } } FILE * popen(char *cmd, char *mode) { static char mbxname[64]; unsigned short int chan; unsigned long int flags=1; /* nowait - gnu c doesn't allow &1 */ struct pipe_details *info; struct dsc$descriptor_s namdsc = {sizeof mbxname, DSC$K_DTYPE_T, DSC$K_CLASS_S, mbxname}, cmddsc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0}; unsigned long sts; if (!(info=malloc(sizeof(struct pipe_details)))) { ERROR("Cannot malloc space"); return NULL; } info->completion=0; /* I assume this will remain 0 until terminates */ /* create mailbox */ create_mbx(&chan,&namdsc); /* open a FILE* onto it */ info->fp=fopen(mbxname, mode); /* give up other channel onto it */ _cksts(sys$dassgn(chan)); if (!info->fp) return NULL; cmddsc.dsc$w_length=strlen(cmd); cmddsc.dsc$a_pointer=cmd; if (strcmp(mode,"r")==0) { _cksts(lib$spawn(&cmddsc, &nl_desc, &namdsc, &flags, 0 /* name */, &info->pid, &info->completion, 0, popen_completion_ast,0,0,0,0)); } else { _cksts(lib$spawn(&cmddsc, &namdsc, 0 /* sys$output */, &flags, 0 /* name */, &info->pid, &info->completion)); } info->next=open_pipes; /* prepend to list */ open_pipes=info; return info->fp; } int pclose(FILE *fp) { struct pipe_details *info, *last = NULL; unsigned long int abort = SS$_TIMEOUT, retsts; unsigned long sts; for (info = open_pipes; info != NULL; last = info, info = info->next) if (info->fp == fp) break; if (info == NULL) /* get here => no such pipe open */ FATAL("pclose() - no such pipe open ???"); if (!info->completion) { /* Tap them gently on the shoulder . . .*/ _cksts(sys$forcex(&info->pid,0,&abort)); sleep(1); } if (!info->completion) /* We tried to be nice . . . */ _cksts(sys$delprc(&info->pid)); fclose(info->fp); /* remove from list of open pipes */ if (last) last->next = info->next; else open_pipes = info->next; retsts = info->completion; free(info); return retsts; } /* end of pclose() */ /* sort-of waitpid; use only with popen() */ /*{{{unsigned long int waitpid(unsigned long int pid, int *statusp, int flags)*/ unsigned long int waitpid(unsigned long int pid, int *statusp, int flags) { struct pipe_details *info; unsigned long int abort = SS$_TIMEOUT; unsigned long sts; for (info = open_pipes; info != NULL; info = info->next) if (info->pid == pid) break; if (info != NULL) { /* we know about this child */ while (!info->completion) { waitpid_asleep = 1; sys$hiber(); } *statusp = info->completion; return pid; } else { /* we haven't heard of this child */ $DESCRIPTOR(intdsc,"0 00:00:01"); unsigned long int ownercode = JPI$_OWNER, ownerpid, mypid; unsigned long int interval[2]; _cksts(lib$getjpi(&ownercode,&pid,0,&ownerpid,0,0)); _cksts(lib$getjpi(&ownercode,0,0,&mypid,0,0)); if (ownerpid != mypid) FATAL("pid not a child"); _cksts(sys$bintim(&intdsc,interval)); while ((sts=lib$getjpi(&ownercode,&pid,0,&ownerpid,0,0)) & 1) { _cksts(sys$schdwk(0,0,interval,0)); _cksts(sys$hiber()); } _cksts(sts); /* There's no easy way to find the termination status a child we're * not aware of beforehand. If we're really interested in the future, * we can go looking for a termination mailbox, or chase after the * accounting record for the process. */ *statusp = 0; return pid; } } /* end of waitpid() */ #endif /* PIPES */ /* vax c doesn't come with strftime - watch out for redefn of RCSid */ #ifdef VAXCRTL # define RCSid RCSid2 # include "strftime.c" #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/set.c�����������������������������������������������������������������������������0000644�0004711�0000144�00000463167�12214177375�011711� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: set.c,v 1.354.2.6 2013/09/11 23:38:37 sfeam Exp $"); } #endif /* GNUPLOT - set.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * 19 September 1992 Lawrence Crowl (crowl@cs.orst.edu) * Added user-specified bases for log scaling. */ #include "setshow.h" #include "alloc.h" #include "axis.h" #include "command.h" #include "contour.h" #include "datafile.h" #include "fit.h" #include "gadgets.h" #include "gp_hist.h" #include "gp_time.h" #include "hidden3d.h" #include "misc.h" /* #include "parse.h" */ #include "plot.h" #include "plot2d.h" #include "plot3d.h" #include "tables.h" #include "term_api.h" #include "util.h" #include "variable.h" #include "pm3d.h" #include "getcolor.h" #include <ctype.h> #ifdef HAVE_ICONV #include <iconv.h> #endif #ifdef HAVE_LANGINFO_H #include <langinfo.h> #endif static palette_color_mode pm3d_last_set_palette_mode = SMPAL_COLOR_MODE_NONE; static void set_angles __PROTO((void)); static void set_arrow __PROTO((void)); static int assign_arrow_tag __PROTO((void)); static void set_autoscale __PROTO((void)); static void set_bars __PROTO((void)); static void set_border __PROTO((void)); static void set_boxplot __PROTO((void)); static void set_boxwidth __PROTO((void)); static void set_clabel __PROTO((void)); static void set_clip __PROTO((void)); static void set_cntrparam __PROTO((void)); static void set_contour __PROTO((void)); static void set_dgrid3d __PROTO((void)); static void set_decimalsign __PROTO((void)); static void set_degreesign __PROTO((char *)); static void set_dummy __PROTO((void)); static void set_encoding __PROTO((void)); static void set_fit __PROTO((void)); static void set_format __PROTO((void)); static void set_grid __PROTO((void)); static void set_hidden3d __PROTO((void)); #ifdef GNUPLOT_HISTORY static void set_historysize __PROTO((void)); #endif static void set_isosamples __PROTO((void)); static void set_key __PROTO((void)); static void set_keytitle __PROTO((void)); static void set_label __PROTO((void)); static int assign_label_tag __PROTO((void)); static void set_loadpath __PROTO((void)); static void set_fontpath __PROTO((void)); static void set_locale __PROTO((void)); static void set_logscale __PROTO((void)); #ifdef GP_MACROS static void set_macros __PROTO((void)); #endif static void set_mapping __PROTO((void)); static void set_margin __PROTO((t_position *)); static void set_missing __PROTO((void)); static void set_separator __PROTO((void)); static void set_datafile_commentschars __PROTO((void)); #ifdef USE_MOUSE static void set_mouse __PROTO((void)); #endif static void set_offsets __PROTO((void)); static void set_origin __PROTO((void)); static void set_output __PROTO((void)); static void set_parametric __PROTO((void)); static void set_pm3d __PROTO((void)); static void set_palette __PROTO((void)); static void set_colorbox __PROTO((void)); static void set_pointsize __PROTO((void)); static void set_pointintervalbox __PROTO((void)); static void set_polar __PROTO((void)); static void set_print __PROTO((void)); #ifdef EAM_OBJECTS static void set_object __PROTO((void)); static void set_obj __PROTO((int, int)); #endif static void set_psdir __PROTO((void)); static void set_samples __PROTO((void)); static void set_size __PROTO((void)); static void set_style __PROTO((void)); static void set_surface __PROTO((void)); static void set_table __PROTO((void)); static void set_terminal __PROTO((void)); static void set_termoptions __PROTO((void)); static void set_tics __PROTO((void)); static void set_ticscale __PROTO((void)); static void set_timefmt __PROTO((void)); static void set_timestamp __PROTO((void)); static void set_view __PROTO((void)); static void set_zero __PROTO((void)); static void set_timedata __PROTO((AXIS_INDEX)); static void set_range __PROTO((AXIS_INDEX)); static void set_raxis __PROTO((void)); static void set_xyplane __PROTO((void)); static void set_ticslevel __PROTO((void)); static void set_zeroaxis __PROTO((AXIS_INDEX)); static void set_allzeroaxis __PROTO((void)); /******** Local functions ********/ static void set_xyzlabel __PROTO((text_label * label)); static void load_tics __PROTO((AXIS_INDEX axis)); static void load_tic_user __PROTO((AXIS_INDEX axis)); static void load_tic_series __PROTO((AXIS_INDEX axis)); static void set_linestyle __PROTO((struct linestyle_def **head)); static void set_arrowstyle __PROTO((void)); static int assign_arrowstyle_tag __PROTO((void)); static int looks_like_numeric __PROTO((char *)); static int set_tic_prop __PROTO((AXIS_INDEX)); static char *fill_numbers_into_string __PROTO((char *pattern)); static void check_palette_grayscale __PROTO((void)); static int set_palette_defined __PROTO((void)); static void set_palette_file __PROTO((void)); static void set_palette_function __PROTO((void)); static void parse_histogramstyle __PROTO((histogram_style *hs, t_histogram_type def_type, int def_gap)); static struct position default_position = {first_axes, first_axes, first_axes, 0., 0., 0.}; #ifdef BACKWARDS_COMPATIBLE static void set_nolinestyle __PROTO((void)); #endif /******** The 'set' command ********/ void set_command() { c_token++; #ifdef BACKWARDS_COMPATIBLE /* retain backwards compatibility to the old syntax for now * Oh, such ugliness ... */ if (almost_equals(c_token,"da$ta")) { if (interactive) int_warn(c_token, "deprecated syntax, use \"set style data\""); if (!almost_equals(++c_token,"s$tyle")) int_error(c_token,"expecting keyword 'style'"); else data_style = get_style(); } else if (almost_equals(c_token,"fu$nction")) { if (interactive) int_warn(c_token, "deprecated syntax, use \"set style function\""); if (!almost_equals(++c_token,"s$tyle")) int_error(c_token,"expecting keyword 'style'"); else { enum PLOT_STYLE temp_style = get_style(); if (temp_style & PLOT_STYLE_HAS_ERRORBAR) int_error(c_token, "style not usable for function plots, left unchanged"); else if (temp_style == HISTOGRAMS) int_error(c_token, "style not usable for function plots, left unchanged"); else func_style = temp_style; } } else if (almost_equals(c_token,"noli$nestyle") || equals(c_token, "nols" )) { c_token++; set_nolinestyle(); } else if (gp_input_line[token[c_token].start_index] == 'n' && gp_input_line[token[c_token].start_index+1] == 'o') { if (interactive) int_warn(c_token, "deprecated syntax, use \"unset\""); token[c_token].start_index += 2; token[c_token].length -= 2; c_token--; unset_command(); } else if (almost_equals(c_token,"miss$ing")) { if (interactive) int_warn(c_token, "deprecated syntax, use \"set datafile missing\""); set_missing(); } else { #else /* Milder form of backwards compatibility */ /* Allow "set no{foo}" rather than "unset foo" */ if (gp_input_line[token[c_token].start_index] == 'n' && gp_input_line[token[c_token].start_index+1] == 'o') { if (interactive) int_warn(c_token, "deprecated syntax, use \"unset\""); token[c_token].start_index += 2; token[c_token].length -= 2; c_token--; unset_command(); } else { #endif /* BACKWARDS_COMPATIBLE */ int save_token; set_iterator = check_for_iteration(); if (empty_iteration(set_iterator)) { /* Skip iteration [i=start:end] where start > end */ while (!END_OF_COMMAND) c_token++; cleanup_iteration(set_iterator); return; } save_token = c_token; ITERATE: switch(lookup_table(&set_tbl[0],c_token)) { case S_ANGLES: set_angles(); break; case S_ARROW: set_arrow(); break; case S_AUTOSCALE: set_autoscale(); break; case S_BARS: set_bars(); break; case S_BORDER: set_border(); break; case S_BOXWIDTH: set_boxwidth(); break; case S_CLABEL: set_clabel(); break; case S_CLIP: set_clip(); break; case S_CNTRPARAM: set_cntrparam(); break; case S_CONTOUR: set_contour(); break; case S_DGRID3D: set_dgrid3d(); break; case S_DECIMALSIGN: set_decimalsign(); break; case S_DUMMY: set_dummy(); break; case S_ENCODING: set_encoding(); break; case S_FIT: set_fit(); break; case S_FONTPATH: set_fontpath(); break; case S_FORMAT: set_format(); break; case S_GRID: set_grid(); break; case S_HIDDEN3D: set_hidden3d(); break; case S_HISTORYSIZE: #ifdef GNUPLOT_HISTORY set_historysize(); #else int_error(c_token, "Command 'set historysize' requires history support."); #endif break; case S_ISOSAMPLES: set_isosamples(); break; case S_KEY: set_key(); break; case S_KEYTITLE: set_keytitle(); break; case S_LINESTYLE: set_linestyle(&first_linestyle); break; case S_LINETYPE: if (equals(c_token+1,"cycle")) { c_token += 2; linetype_recycle_count = int_expression(); } else set_linestyle(&first_perm_linestyle); break; case S_LABEL: set_label(); break; case S_LOADPATH: set_loadpath(); break; case S_LOCALE: set_locale(); break; case S_LOGSCALE: set_logscale(); break; #ifdef GP_MACROS case S_MACROS: set_macros(); break; #endif case S_MAPPING: set_mapping(); break; case S_BMARGIN: set_margin(&bmargin); break; case S_LMARGIN: set_margin(&lmargin); break; case S_RMARGIN: set_margin(&rmargin); break; case S_TMARGIN: set_margin(&tmargin); break; case S_DATAFILE: if (almost_equals(++c_token,"miss$ing")) set_missing(); else if (almost_equals(c_token,"sep$arator")) set_separator(); else if (almost_equals(c_token,"com$mentschars")) set_datafile_commentschars(); else if (almost_equals(c_token,"bin$ary")) df_set_datafile_binary(); else if (almost_equals(c_token,"fort$ran")) { df_fortran_constants = TRUE; c_token++; } else if (almost_equals(c_token,"nofort$ran")) { df_fortran_constants = FALSE; c_token++; } else if (almost_equals(c_token,"fpe_trap")) { df_nofpe_trap = FALSE; c_token++; } else if (almost_equals(c_token,"nofpe_trap")) { df_nofpe_trap = TRUE; c_token++; } else int_error(c_token,"expecting datafile modifier"); break; #ifdef USE_MOUSE case S_MOUSE: set_mouse(); break; #endif case S_MULTIPLOT: term_start_multiplot(); break; case S_OFFSETS: set_offsets(); break; case S_ORIGIN: set_origin(); break; case SET_OUTPUT: set_output(); break; case S_PARAMETRIC: set_parametric(); break; case S_PM3D: set_pm3d(); break; case S_PALETTE: set_palette(); break; case S_COLORBOX: set_colorbox(); break; case S_POINTINTERVALBOX: set_pointintervalbox(); break; case S_POINTSIZE: set_pointsize(); break; case S_POLAR: set_polar(); break; case S_PRINT: set_print(); break; case S_PSDIR: set_psdir(); break; #ifdef EAM_OBJECTS case S_OBJECT: set_object(); break; #endif case S_SAMPLES: set_samples(); break; case S_SIZE: set_size(); break; case S_STYLE: set_style(); break; case S_SURFACE: set_surface(); break; case S_TABLE: set_table(); break; case S_TERMINAL: set_terminal(); break; case S_TERMOPTIONS: set_termoptions(); break; case S_TICS: set_tics(); break; case S_TICSCALE: set_ticscale(); break; case S_TIMEFMT: set_timefmt(); break; case S_TIMESTAMP: set_timestamp(); break; case S_TITLE: set_xyzlabel(&title); break; case S_VIEW: set_view(); break; case S_ZERO: set_zero(); break; case S_MXTICS: case S_NOMXTICS: case S_XTICS: case S_NOXTICS: case S_XDTICS: case S_NOXDTICS: case S_XMTICS: case S_NOXMTICS: set_tic_prop(FIRST_X_AXIS); break; case S_MYTICS: case S_NOMYTICS: case S_YTICS: case S_NOYTICS: case S_YDTICS: case S_NOYDTICS: case S_YMTICS: case S_NOYMTICS: set_tic_prop(FIRST_Y_AXIS); break; case S_MX2TICS: case S_NOMX2TICS: case S_X2TICS: case S_NOX2TICS: case S_X2DTICS: case S_NOX2DTICS: case S_X2MTICS: case S_NOX2MTICS: set_tic_prop(SECOND_X_AXIS); break; case S_MY2TICS: case S_NOMY2TICS: case S_Y2TICS: case S_NOY2TICS: case S_Y2DTICS: case S_NOY2DTICS: case S_Y2MTICS: case S_NOY2MTICS: set_tic_prop(SECOND_Y_AXIS); break; case S_MZTICS: case S_NOMZTICS: case S_ZTICS: case S_NOZTICS: case S_ZDTICS: case S_NOZDTICS: case S_ZMTICS: case S_NOZMTICS: set_tic_prop(FIRST_Z_AXIS); break; case S_MCBTICS: case S_NOMCBTICS: case S_CBTICS: case S_NOCBTICS: case S_CBDTICS: case S_NOCBDTICS: case S_CBMTICS: case S_NOCBMTICS: set_tic_prop(COLOR_AXIS); break; case S_RTICS: case S_NORTICS: set_tic_prop(POLAR_AXIS); break; case S_XDATA: set_timedata(FIRST_X_AXIS); axis_array[T_AXIS].datatype = axis_array[U_AXIS].datatype = axis_array[FIRST_X_AXIS].datatype; break; case S_YDATA: set_timedata(FIRST_Y_AXIS); axis_array[V_AXIS].datatype = axis_array[FIRST_X_AXIS].datatype; break; case S_ZDATA: set_timedata(FIRST_Z_AXIS); break; case S_CBDATA: set_timedata(COLOR_AXIS); break; case S_X2DATA: set_timedata(SECOND_X_AXIS); break; case S_Y2DATA: set_timedata(SECOND_Y_AXIS); break; case S_XLABEL: set_xyzlabel(&axis_array[FIRST_X_AXIS].label); break; case S_YLABEL: set_xyzlabel(&axis_array[FIRST_Y_AXIS].label); break; case S_ZLABEL: set_xyzlabel(&axis_array[FIRST_Z_AXIS].label); break; case S_CBLABEL: set_xyzlabel(&axis_array[COLOR_AXIS].label); break; case S_X2LABEL: set_xyzlabel(&axis_array[SECOND_X_AXIS].label); break; case S_Y2LABEL: set_xyzlabel(&axis_array[SECOND_Y_AXIS].label); break; case S_XRANGE: set_range(FIRST_X_AXIS); break; case S_X2RANGE: set_range(SECOND_X_AXIS); break; case S_YRANGE: set_range(FIRST_Y_AXIS); break; case S_Y2RANGE: set_range(SECOND_Y_AXIS); break; case S_ZRANGE: set_range(FIRST_Z_AXIS); break; case S_CBRANGE: set_range(COLOR_AXIS); break; case S_RRANGE: set_range(POLAR_AXIS); if (polar) rrange_to_xy(); break; case S_TRANGE: set_range(T_AXIS); break; case S_URANGE: set_range(U_AXIS); break; case S_VRANGE: set_range(V_AXIS); break; case S_RAXIS: set_raxis(); break; case S_XZEROAXIS: set_zeroaxis(FIRST_X_AXIS); break; case S_YZEROAXIS: set_zeroaxis(FIRST_Y_AXIS); break; case S_ZZEROAXIS: set_zeroaxis(FIRST_Z_AXIS); break; case S_X2ZEROAXIS: set_zeroaxis(SECOND_X_AXIS); break; case S_Y2ZEROAXIS: set_zeroaxis(SECOND_Y_AXIS); break; case S_ZEROAXIS: set_allzeroaxis(); break; case S_XYPLANE: set_xyplane(); break; case S_TICSLEVEL: set_ticslevel(); break; default: int_error(c_token, "Unrecognized option. See 'help set'."); break; } if (next_iteration(set_iterator)) { c_token = save_token; goto ITERATE; } } /* FIXME - Should this be inside the iteration loop? */ update_gpval_variables(0); set_iterator = cleanup_iteration(set_iterator); } /* process 'set angles' command */ static void set_angles() { c_token++; if (END_OF_COMMAND) { /* assuming same as defaults */ ang2rad = 1; } else if (almost_equals(c_token, "r$adians")) { c_token++; ang2rad = 1; } else if (almost_equals(c_token, "d$egrees")) { c_token++; ang2rad = DEG2RAD; } else int_error(c_token, "expecting 'radians' or 'degrees'"); if (polar && axis_array[T_AXIS].set_autoscale) { /* set trange if in polar mode and no explicit range */ axis_array[T_AXIS].set_min = 0; axis_array[T_AXIS].set_max = 2 * M_PI / ang2rad; } } /* process a 'set arrow' command */ /* set arrow {tag} {from x,y} {to x,y} {{no}head} ... */ /* allow any order of options - pm 25.11.2001 */ static void set_arrow() { struct arrow_def *this_arrow = NULL; struct arrow_def *new_arrow = NULL; struct arrow_def *prev_arrow = NULL; TBOOLEAN duplication = FALSE; TBOOLEAN set_start = FALSE; TBOOLEAN set_end = FALSE; int save_token; int tag; c_token++; /* get tag */ if (almost_equals(c_token, "back$head") || equals(c_token, "front") || equals(c_token, "from") || equals(c_token, "size") || equals(c_token, "to") || equals(c_token, "rto") || equals(c_token, "filled") || equals(c_token, "empty") || equals(c_token, "as") || equals(c_token, "arrowstyle") || almost_equals(c_token, "head$s") || equals(c_token, "nohead")) { tag = assign_arrow_tag(); } else tag = int_expression(); if (tag <= 0) int_error(c_token, "tag must be > 0"); /* OK! add arrow */ if (first_arrow != NULL) { /* skip to last arrow */ for (this_arrow = first_arrow; this_arrow != NULL; prev_arrow = this_arrow, this_arrow = this_arrow->next) /* is this the arrow we want? */ if (tag <= this_arrow->tag) break; } if (this_arrow == NULL || tag != this_arrow->tag) { new_arrow = gp_alloc(sizeof(struct arrow_def), "arrow"); if (prev_arrow == NULL) first_arrow = new_arrow; else prev_arrow->next = new_arrow; new_arrow->tag = tag; new_arrow->next = this_arrow; this_arrow = new_arrow; this_arrow->start = default_position; this_arrow->end = default_position; default_arrow_style(&(new_arrow->arrow_properties)); } while (!END_OF_COMMAND) { /* get start position */ if (equals(c_token, "from")) { if (set_start) { duplication = TRUE; break; } c_token++; if (END_OF_COMMAND) int_error(c_token, "start coordinates expected"); /* get coordinates */ get_position(&this_arrow->start); set_start = TRUE; continue; } /* get end or relative end position */ if (equals(c_token, "to") || equals(c_token,"rto")) { if (set_end) { duplication = TRUE; break; } this_arrow->relative = (equals(c_token,"rto")) ? TRUE : FALSE; c_token++; if (END_OF_COMMAND) int_error(c_token, "end coordinates expected"); /* get coordinates */ get_position(&this_arrow->end); set_end = TRUE; continue; } /* Allow interspersed style commands */ save_token = c_token; arrow_parse(&this_arrow->arrow_properties, TRUE); if (save_token != c_token) continue; if (!END_OF_COMMAND) int_error(c_token, "wrong argument in set arrow"); } /* while (!END_OF_COMMAND) */ if (duplication) int_error(c_token, "duplicate or contradictory arguments"); } /* assign a new arrow tag * arrows are kept sorted by tag number, so this is easy * returns the lowest unassigned tag number */ static int assign_arrow_tag() { struct arrow_def *this_arrow; int last = 0; /* previous tag value */ for (this_arrow = first_arrow; this_arrow != NULL; this_arrow = this_arrow->next) if (this_arrow->tag == last + 1) last++; else break; return (last + 1); } /* process 'set autoscale' command */ static void set_autoscale() { char min_string[20], max_string[20]; c_token++; if (END_OF_COMMAND) { int axis; for (axis=0; axis<AXIS_ARRAY_SIZE; axis++) axis_array[axis].set_autoscale = AUTOSCALE_BOTH; return; } else if (equals(c_token, "xy") || equals(c_token, "yx")) { axis_array[FIRST_X_AXIS].set_autoscale = axis_array[FIRST_Y_AXIS].set_autoscale = AUTOSCALE_BOTH; axis_array[FIRST_X_AXIS].min_constraint = axis_array[FIRST_X_AXIS].max_constraint = axis_array[FIRST_Y_AXIS].min_constraint = axis_array[FIRST_Y_AXIS].max_constraint = CONSTRAINT_NONE; c_token++; return; } else if (equals(c_token, "fix")) { int a = 0; while (a < AXIS_ARRAY_SIZE) { axis_array[a].set_autoscale |= AUTOSCALE_FIXMIN | AUTOSCALE_FIXMAX; a++; } c_token++; return; } else if (almost_equals(c_token, "ke$epfix")) { int a = 0; while (a < AXIS_ARRAY_SIZE) axis_array[a++].set_autoscale |= AUTOSCALE_BOTH; c_token++; return; } /* save on replication with a macro */ #define PROCESS_AUTO_LETTER(axis) \ do { \ AXIS *this = axis_array + axis; \ \ if (equals(c_token, axis_defaults[axis].name)) { \ this->set_autoscale = AUTOSCALE_BOTH; \ this->min_constraint = CONSTRAINT_NONE; \ this->max_constraint = CONSTRAINT_NONE; \ ++c_token; \ return; \ } \ sprintf(min_string, "%smi$n", axis_defaults[axis].name); \ if (almost_equals(c_token, min_string)) { \ this->set_autoscale |= AUTOSCALE_MIN; \ this->min_constraint = CONSTRAINT_NONE; \ ++c_token; \ return; \ } \ sprintf(max_string, "%sma$x", axis_defaults[axis].name); \ if (almost_equals(c_token, max_string)) { \ this->set_autoscale |= AUTOSCALE_MAX; \ this->max_constraint = CONSTRAINT_NONE; \ ++c_token; \ return; \ } \ sprintf(min_string, "%sfix", axis_defaults[axis].name); \ if (equals(c_token, min_string)) { \ this->set_autoscale |= AUTOSCALE_FIXMIN | AUTOSCALE_FIXMAX; \ ++c_token; \ return; \ } \ sprintf(min_string, "%sfixmi$n", axis_defaults[axis].name); \ if (almost_equals(c_token, min_string)) { \ this->set_autoscale |= AUTOSCALE_FIXMIN; \ ++c_token; \ return; \ } \ sprintf(max_string, "%sfixma$x", axis_defaults[axis].name); \ if (almost_equals(c_token, max_string)) { \ this->set_autoscale |= AUTOSCALE_FIXMAX; \ ++c_token; \ return; \ } \ } while(0) PROCESS_AUTO_LETTER(POLAR_AXIS); PROCESS_AUTO_LETTER(T_AXIS); PROCESS_AUTO_LETTER(U_AXIS); PROCESS_AUTO_LETTER(V_AXIS); PROCESS_AUTO_LETTER(FIRST_X_AXIS); PROCESS_AUTO_LETTER(FIRST_Y_AXIS); PROCESS_AUTO_LETTER(FIRST_Z_AXIS); PROCESS_AUTO_LETTER(SECOND_X_AXIS); PROCESS_AUTO_LETTER(SECOND_Y_AXIS); PROCESS_AUTO_LETTER(COLOR_AXIS); /* came here only if nothing found: */ int_error(c_token, "Invalid range"); } /* process 'set bars' command */ static void set_bars() { int save_token = ++c_token; while (!END_OF_COMMAND) { if (almost_equals(c_token,"s$mall")) { bar_size = 0.0; ++c_token; } else if (almost_equals(c_token,"l$arge")) { bar_size = 1.0; ++c_token; } else if (almost_equals(c_token,"full$width")) { bar_size = -1.0; ++c_token; } else if (equals(c_token,"front")) { bar_layer = LAYER_FRONT; ++c_token; } else if (equals(c_token,"back")) { bar_layer = LAYER_BACK; ++c_token; } else { bar_size = real_expression(); } } if (save_token == c_token) bar_size = 1.0; } /* process 'set border' command */ static void set_border() { c_token++; if(END_OF_COMMAND){ draw_border = 31; border_layer = 1; border_lp = default_border_lp; } while (!END_OF_COMMAND) { if (equals(c_token,"front")) { border_layer = 1; c_token++; } else if (equals(c_token,"back")) { border_layer = 0; c_token++; } else { int save_token = c_token; lp_parse(&border_lp, TRUE, FALSE); if (save_token != c_token) continue; draw_border = int_expression(); } } /* This is the only place the user can change the border */ /* so remember what he set. If draw_border is later changed*/ /* internally, we can still recover the user's preference. */ user_border = draw_border; } /* process 'set style boxplot' command */ static void set_boxplot() { c_token++; if (END_OF_COMMAND) { boxplot_style defstyle = DEFAULT_BOXPLOT_STYLE; boxplot_opts = defstyle; } while (!END_OF_COMMAND) { if (almost_equals(c_token, "noout$liers")) { boxplot_opts.outliers = FALSE; c_token++; } else if (almost_equals(c_token, "out$liers")) { boxplot_opts.outliers = TRUE; c_token++; } else if (almost_equals(c_token, "point$type") || equals (c_token, "pt")) { c_token++; boxplot_opts.pointtype = int_expression()-1; } else if (equals(c_token,"range")) { c_token++; boxplot_opts.limit_type = 0; boxplot_opts.limit_value = real_expression(); } else if (almost_equals(c_token,"frac$tion")) { c_token++; boxplot_opts.limit_value = real_expression(); if (boxplot_opts.limit_value < 0 || boxplot_opts.limit_value > 1) int_error(c_token-1,"fraction must be less than 1"); boxplot_opts.limit_type = 1; } else if (almost_equals(c_token,"candle$sticks")) { c_token++; boxplot_opts.plotstyle = CANDLESTICKS; } else if (almost_equals(c_token,"finance$bars")) { c_token++; boxplot_opts.plotstyle = FINANCEBARS; } else if (almost_equals(c_token,"sep$aration")) { c_token++; boxplot_opts.separation = real_expression(); if (boxplot_opts.separation < 0) int_error(c_token-1,"separation must be > 0"); } else if (almost_equals(c_token,"lab$els")) { c_token++; if (equals(c_token, "off")) { boxplot_opts.labels = BOXPLOT_FACTOR_LABELS_OFF; } else if (equals(c_token, "x")) { boxplot_opts.labels = BOXPLOT_FACTOR_LABELS_X; } else if (equals(c_token, "x2")) { boxplot_opts.labels = BOXPLOT_FACTOR_LABELS_X2; } else if (equals(c_token, "auto")) { boxplot_opts.labels = BOXPLOT_FACTOR_LABELS_AUTO; } else int_error(c_token-1,"expecting 'x', 'x2', 'auto' or 'off'"); c_token++; } else if (almost_equals(c_token, "so$rted")) { boxplot_opts.sort_factors = TRUE; c_token++; } else if (almost_equals(c_token, "un$sorted")) { boxplot_opts.sort_factors = FALSE; c_token++; } else int_error(c_token,"unrecognized option"); } } /* process 'set boxwidth' command */ static void set_boxwidth() { c_token++; if (END_OF_COMMAND) { boxwidth = -1.0; boxwidth_is_absolute = TRUE; } else { boxwidth = real_expression(); } if (END_OF_COMMAND) return; else { if (almost_equals(c_token, "a$bsolute")) boxwidth_is_absolute = TRUE; else if (almost_equals(c_token, "r$elative")) boxwidth_is_absolute = FALSE; else int_error(c_token, "expecting 'absolute' or 'relative' "); } c_token++; } /* process 'set clabel' command */ static void set_clabel() { char *new_format; c_token++; label_contours = TRUE; if ((new_format = try_to_get_string())) { strncpy(contour_format, new_format, sizeof(contour_format)); free(new_format); } } /* process 'set clip' command */ static void set_clip() { c_token++; if (END_OF_COMMAND) /* assuming same as points */ clip_points = TRUE; else if (almost_equals(c_token, "p$oints")) clip_points = TRUE; else if (almost_equals(c_token, "o$ne")) clip_lines1 = TRUE; else if (almost_equals(c_token, "t$wo")) clip_lines2 = TRUE; else int_error(c_token, "expecting 'points', 'one', or 'two'"); c_token++; } /* process 'set cntrparam' command */ static void set_cntrparam() { c_token++; if (END_OF_COMMAND) { /* assuming same as defaults */ contour_pts = DEFAULT_NUM_APPROX_PTS; contour_kind = CONTOUR_KIND_LINEAR; contour_order = DEFAULT_CONTOUR_ORDER; contour_levels = DEFAULT_CONTOUR_LEVELS; contour_levels_kind = LEVELS_AUTO; } else if (almost_equals(c_token, "p$oints")) { c_token++; contour_pts = int_expression(); } else if (almost_equals(c_token, "li$near")) { c_token++; contour_kind = CONTOUR_KIND_LINEAR; } else if (almost_equals(c_token, "c$ubicspline")) { c_token++; contour_kind = CONTOUR_KIND_CUBIC_SPL; } else if (almost_equals(c_token, "b$spline")) { c_token++; contour_kind = CONTOUR_KIND_BSPLINE; } else if (almost_equals(c_token, "le$vels")) { c_token++; if (!(set_iterator && set_iterator->iteration)) { free_dynarray(&dyn_contour_levels_list); init_dynarray(&dyn_contour_levels_list, sizeof(double), 5, 10); } /* RKC: I have modified the next two: * to use commas to separate list elements as in xtics * so that incremental lists start,incr[,end]as in " */ if (almost_equals(c_token, "di$screte")) { contour_levels_kind = LEVELS_DISCRETE; c_token++; if(END_OF_COMMAND) int_error(c_token, "expecting discrete level"); else *(double *)nextfrom_dynarray(&dyn_contour_levels_list) = real_expression(); while(!END_OF_COMMAND) { if (!equals(c_token, ",")) int_error(c_token, "expecting comma to separate discrete levels"); c_token++; *(double *)nextfrom_dynarray(&dyn_contour_levels_list) = real_expression(); } contour_levels = dyn_contour_levels_list.end; } else if (almost_equals(c_token, "in$cremental")) { int i = 0; /* local counter */ contour_levels_kind = LEVELS_INCREMENTAL; c_token++; contour_levels_list[i++] = real_expression(); if (!equals(c_token, ",")) int_error(c_token, "expecting comma to separate start,incr levels"); c_token++; if((contour_levels_list[i++] = real_expression()) == 0) int_error(c_token, "increment cannot be 0"); if(!END_OF_COMMAND) { if (!equals(c_token, ",")) int_error(c_token, "expecting comma to separate incr,stop levels"); c_token++; /* need to round up, since 10,10,50 is 5 levels, not four, * but 10,10,49 is four */ dyn_contour_levels_list.end = i; contour_levels = (int) ( (real_expression()-contour_levels_list[0])/contour_levels_list[1] + 1.0); } } else if (almost_equals(c_token, "au$to")) { contour_levels_kind = LEVELS_AUTO; c_token++; if(!END_OF_COMMAND) contour_levels = int_expression(); } else { if(contour_levels_kind == LEVELS_DISCRETE) int_error(c_token, "Levels type is discrete, ignoring new number of contour levels"); contour_levels = int_expression(); } } else if (almost_equals(c_token, "o$rder")) { int order; c_token++; order = int_expression(); if ( order < 2 || order > MAX_BSPLINE_ORDER ) int_error(c_token, "bspline order must be in [2..10] range."); contour_order = order; } else int_error(c_token, "expecting 'linear', 'cubicspline', 'bspline', 'points', 'levels' or 'order'"); } /* process 'set contour' command */ static void set_contour() { c_token++; if (END_OF_COMMAND) /* assuming same as points */ draw_contour = CONTOUR_BASE; else { if (almost_equals(c_token, "ba$se")) draw_contour = CONTOUR_BASE; else if (almost_equals(c_token, "s$urface")) draw_contour = CONTOUR_SRF; else if (almost_equals(c_token, "bo$th")) draw_contour = CONTOUR_BOTH; else int_error(c_token, "expecting 'base', 'surface', or 'both'"); c_token++; } } /* process 'set dgrid3d' command */ static void set_dgrid3d() { int token_cnt = 0; /* Number of comma-separated values read in */ int gridx = dgrid3d_row_fineness; int gridy = dgrid3d_col_fineness; int normval = dgrid3d_norm_value; double scalex = dgrid3d_x_scale; double scaley = dgrid3d_y_scale; /* dgrid3d has two different syntax alternatives: classic and new. If there is a "mode" keyword, the syntax is new, otherwise it is classic.*/ dgrid3d_mode = DGRID3D_DEFAULT; dgrid3d_kdensity = FALSE; c_token++; while ( !(END_OF_COMMAND) ) { int tmp_mode = lookup_table(&dgrid3d_mode_tbl[0],c_token); if (tmp_mode != DGRID3D_OTHER) { dgrid3d_mode = tmp_mode; c_token++; } switch (tmp_mode) { case DGRID3D_QNORM: if (!(END_OF_COMMAND)) normval = int_expression(); break; case DGRID3D_SPLINES: break; case DGRID3D_GAUSS: case DGRID3D_CAUCHY: case DGRID3D_EXP: case DGRID3D_BOX: case DGRID3D_HANN: if (!(END_OF_COMMAND) && almost_equals( c_token, "kdens$ity2d" )) { dgrid3d_kdensity = TRUE; c_token++; } if (!(END_OF_COMMAND)) { scalex = real_expression(); scaley = scalex; if (equals(c_token, ",")) { c_token++; scaley = real_expression(); } } break; default: /* {rows}{,cols{,norm}}} */ if ( equals( c_token, "," )) { c_token++; token_cnt++; } else if( token_cnt == 0) { gridx = int_expression(); gridy = gridx; /* gridy defaults to gridx, unless overridden below */ } else if( token_cnt == 1) { gridy = int_expression(); } else if( token_cnt == 2) { normval = int_expression(); } else int_error(c_token,"Unrecognize keyword or unexpected value"); break; } } /* we could warn here about floating point values being truncated... */ if( gridx < 2 || gridx > 1000 || gridy < 2 || gridy > 1000 ) int_error( NO_CARET, "Number of grid points must be in [2:1000] - not changed!"); /* no mode token found: classic format */ if( dgrid3d_mode == DGRID3D_DEFAULT ) dgrid3d_mode = DGRID3D_QNORM; if( scalex < 0.0 || scaley < 0.0 ) int_error( NO_CARET, "Scale factors must be greater than zero - not changed!" ); dgrid3d_row_fineness = gridx; dgrid3d_col_fineness = gridy; dgrid3d_norm_value = normval; dgrid3d_x_scale = scalex; dgrid3d_y_scale = scaley; dgrid3d = TRUE; } /* process 'set decimalsign' command */ static void set_decimalsign() { c_token++; /* Clear current setting */ free(decimalsign); decimalsign=NULL; if (END_OF_COMMAND) { reset_numeric_locale(); free(numeric_locale); numeric_locale = NULL; #ifdef HAVE_LOCALE_H } else if (equals(c_token,"locale")) { char *newlocale = NULL; c_token++; newlocale = try_to_get_string(); if (!newlocale) newlocale = gp_strdup(setlocale(LC_NUMERIC,"")); if (!newlocale) newlocale = gp_strdup(getenv("LC_ALL")); if (!newlocale) newlocale = gp_strdup(getenv("LC_NUMERIC")); if (!newlocale) newlocale = gp_strdup(getenv("LANG")); if (!setlocale(LC_NUMERIC, newlocale ? newlocale : "")) int_error(c_token-1, "Could not find requested locale"); decimalsign = gp_strdup(get_decimal_locale()); fprintf(stderr,"decimal_sign in locale is %s\n", decimalsign); /* Save this locale for later use, but return to "C" for now */ free(numeric_locale); numeric_locale = newlocale; setlocale(LC_NUMERIC,"C"); #endif } else if (!(decimalsign = try_to_get_string())) int_error(c_token, "expecting string"); } /* process 'set dummy' command */ static void set_dummy() { c_token++; if (END_OF_COMMAND) int_error(c_token, "expecting dummy variable name"); else { if (!equals(c_token,",")) copy_str(set_dummy_var[0],c_token++, MAX_ID_LEN); if (!END_OF_COMMAND && equals(c_token,",")) { c_token++; if (END_OF_COMMAND) int_error(c_token, "expecting second dummy variable name"); copy_str(set_dummy_var[1],c_token++, MAX_ID_LEN); } } } /* process 'set encoding' command */ static void set_encoding() { char *l = NULL; c_token++; if (END_OF_COMMAND) { encoding = S_ENC_DEFAULT; #ifdef HAVE_LOCALE_H } else if (equals(c_token,"locale")) { l = setlocale(LC_CTYPE,""); if (l && (strstr(l,"utf") || strstr(l,"UTF"))) encoding = S_ENC_UTF8; if (l && (strstr(l,"sjis") || strstr(l,"SJIS") || strstr(l,"932"))) encoding = S_ENC_SJIS; c_token++; #endif } else { int temp = lookup_table(&set_encoding_tbl[0],c_token); if (temp == S_ENC_INVALID) int_error(c_token, "unrecognized encoding specification; see 'help encoding'."); encoding = temp; c_token++; } /* Set degree sign to match encoding */ set_degreesign(l); } static void set_degreesign(char *locale) { #if defined(HAVE_ICONV) && !(defined WIN32) char degree_utf8[3] = {'\302', '\260', '\0'}; size_t lengthin = 3; size_t lengthout = 8; char *in = degree_utf8; char *out = degree_sign; iconv_t cd; if (locale) { /* This should work even if gnuplot doesn't understand the encoding */ #ifdef HAVE_LANGINFO_H char *cencoding = nl_langinfo(CODESET); #else char *cencoding = strchr(locale, '.'); if (cencoding) cencoding++; /* Step past the dot in, e.g., ja_JP.EUC-JP */ #endif if (cencoding) { if (strcmp(cencoding,"UTF-8") == 0) strcpy(degree_sign,degree_utf8); else if ((cd = iconv_open(cencoding, "UTF-8")) == (iconv_t)(-1)) int_warn(NO_CARET, "iconv_open failed for %s",cencoding); else { if (iconv(cd, &in, &lengthin, &out, &lengthout) == (size_t)(-1)) int_warn(NO_CARET, "iconv failed to convert degree sign"); iconv_close(cd); } } return; } #elif defined(WIN32) if (locale) { char *encoding = strchr(locale, '.'); if (encoding) { unsigned cp; encoding++; /* Step past the dot in, e.g., German_Germany.1252 */ /* iconv does not understand encodings returned by setlocale() */ if (sscanf(encoding, "%i", &cp)) { wchar_t wdegreesign = 176; /* "\u00B0" */ int n = WideCharToMultiByte(cp, WC_COMPOSITECHECK, &wdegreesign, 1, degree_sign, sizeof(degree_sign) - 1, NULL, NULL); degree_sign[n] = NUL; } } return; } #endif /* These are the internally-known encodings */ memset(degree_sign, 0, sizeof(degree_sign)); switch (encoding) { case S_ENC_UTF8: degree_sign[0] = '\302'; degree_sign[1] = '\260'; break; case S_ENC_KOI8_R: case S_ENC_KOI8_U: degree_sign[0] = '\234'; break; case S_ENC_CP437: case S_ENC_CP850: case S_ENC_CP852: degree_sign[0] = '\370'; break; case S_ENC_SJIS: break; /* should be 0x818B */ case S_ENC_CP950: break; /* should be 0xA258 */ default: degree_sign[0] = '\260'; break; } } /* process 'set fit' command */ static void set_fit() { c_token++; while (!END_OF_COMMAND) { if (almost_equals(c_token, "log$file")) { c_token++; if (END_OF_COMMAND) { if (fitlogfile != NULL) free(fitlogfile); fitlogfile=NULL; } else if (!(fitlogfile = try_to_get_string())) int_error(c_token, "expecting string"); } else if (almost_equals(c_token, "err$orvariables")) { fit_errorvariables = TRUE; c_token++; } else if (almost_equals(c_token, "noerr$orvariables")) { fit_errorvariables = FALSE; c_token++; } else if (equals(c_token,"quiet")) { fit_quiet = TRUE; c_token++; } else if (equals(c_token,"noquiet")) { fit_quiet = FALSE; c_token++; } else { int_error(c_token, "unknown --- expected 'logfile' or [no]errorvariables"); } } /* while (!end) */ } /* process 'set format' command */ static void set_format() { TBOOLEAN set_for_axis[AXIS_ARRAY_SIZE] = AXIS_ARRAY_INITIALIZER(FALSE); int axis; c_token++; if ((axis = lookup_table(axisname_tbl, c_token)) >= 0) { set_for_axis[axis] = TRUE; c_token++; } else if (equals(c_token,"xy") || equals(c_token,"yx")) { set_for_axis[FIRST_X_AXIS] = set_for_axis[FIRST_Y_AXIS] = TRUE; c_token++; } else { /* Assume he wants all */ for (axis = 0; axis < AXIS_ARRAY_SIZE; axis++) set_for_axis[axis] = TRUE; } if (END_OF_COMMAND) { SET_DEFFORMAT(FIRST_X_AXIS , set_for_axis); SET_DEFFORMAT(FIRST_Y_AXIS , set_for_axis); SET_DEFFORMAT(FIRST_Z_AXIS , set_for_axis); SET_DEFFORMAT(SECOND_X_AXIS, set_for_axis); SET_DEFFORMAT(SECOND_Y_AXIS, set_for_axis); SET_DEFFORMAT(COLOR_AXIS , set_for_axis); SET_DEFFORMAT(POLAR_AXIS , set_for_axis); } else { char *format = try_to_get_string(); if (!format) int_error(c_token, "expecting format string"); #define SET_FORMATSTRING(axis) \ if (set_for_axis[axis]) { \ strncpy(axis_array[axis].formatstring, format, MAX_ID_LEN); \ axis_array[axis].format_is_numeric = looks_like_numeric(format);\ } SET_FORMATSTRING(FIRST_X_AXIS); SET_FORMATSTRING(FIRST_Y_AXIS); SET_FORMATSTRING(FIRST_Z_AXIS); SET_FORMATSTRING(SECOND_X_AXIS); SET_FORMATSTRING(SECOND_Y_AXIS); SET_FORMATSTRING(COLOR_AXIS); SET_FORMATSTRING(POLAR_AXIS); #undef SET_FORMATSTRING free(format); } } /* process 'set grid' command */ static void set_grid() { TBOOLEAN explicit_change = FALSE; c_token++; #define GRID_MATCH(axis, string) \ if (almost_equals(c_token, string+2)) { \ if (string[2] == 'm') \ axis_array[axis].gridminor = TRUE; \ else \ axis_array[axis].gridmajor = TRUE; \ explicit_change = TRUE; \ ++c_token; \ } else if (almost_equals(c_token, string)) { \ if (string[2] == 'm') \ axis_array[axis].gridminor = FALSE; \ else \ axis_array[axis].gridmajor = FALSE; \ explicit_change = TRUE; \ ++c_token; \ } while (!END_OF_COMMAND) { GRID_MATCH(FIRST_X_AXIS, "nox$tics") else GRID_MATCH(FIRST_Y_AXIS, "noy$tics") else GRID_MATCH(FIRST_Z_AXIS, "noz$tics") else GRID_MATCH(SECOND_X_AXIS, "nox2$tics") else GRID_MATCH(SECOND_Y_AXIS, "noy2$tics") else GRID_MATCH(FIRST_X_AXIS, "nomx$tics") else GRID_MATCH(FIRST_Y_AXIS, "nomy$tics") else GRID_MATCH(FIRST_Z_AXIS, "nomz$tics") else GRID_MATCH(SECOND_X_AXIS, "nomx2$tics") else GRID_MATCH(SECOND_Y_AXIS, "nomy2$tics") else GRID_MATCH(COLOR_AXIS, "nocb$tics") else GRID_MATCH(COLOR_AXIS, "nomcb$tics") else GRID_MATCH(POLAR_AXIS, "nor$tics") else if (almost_equals(c_token,"po$lar")) { if (!some_grid_selected()) axis_array[POLAR_AXIS].gridmajor = TRUE; polar_grid_angle = 30*DEG2RAD; c_token++; if (isanumber(c_token) || type_udv(c_token) == INTGR || type_udv(c_token) == CMPLX) polar_grid_angle = ang2rad*real_expression(); } else if (almost_equals(c_token,"nopo$lar")) { polar_grid_angle = 0; /* not polar grid */ c_token++; } else if (equals(c_token,"back")) { grid_layer = 0; c_token++; } else if (equals(c_token,"front")) { grid_layer = 1; c_token++; } else if (almost_equals(c_token,"layerd$efault")) { grid_layer = -1; c_token++; } else { /* only remaining possibility is a line type */ int save_token = c_token; lp_parse(&grid_lp, TRUE, FALSE); if (equals(c_token,",")) { c_token++; lp_parse(&mgrid_lp, TRUE, FALSE); } else if (save_token != c_token) mgrid_lp = grid_lp; if (save_token == c_token) break; } } if (!explicit_change && !some_grid_selected()) { /* no axis specified, thus select default grid */ if (polar) { axis_array[POLAR_AXIS].gridmajor = TRUE; } else { axis_array[FIRST_X_AXIS].gridmajor = TRUE; axis_array[FIRST_Y_AXIS].gridmajor = TRUE; } } } /* process 'set hidden3d' command */ static void set_hidden3d() { c_token++; set_hidden3doptions(); hidden3d = TRUE; } #ifdef GNUPLOT_HISTORY /* process 'set historysize' command */ static void set_historysize() { c_token++; gnuplot_history_size = int_expression(); if (gnuplot_history_size < 0) { gnuplot_history_size = 0; } } #endif /* process 'set isosamples' command */ static void set_isosamples() { int tsamp1, tsamp2; c_token++; tsamp1 = abs(int_expression()); tsamp2 = tsamp1; if (!END_OF_COMMAND) { if (!equals(c_token,",")) int_error(c_token, "',' expected"); c_token++; tsamp2 = abs(int_expression()); } if (tsamp1 < 2 || tsamp2 < 2) int_error(c_token, "sampling rate must be > 1; sampling unchanged"); else { struct curve_points *f_p = first_plot; struct surface_points *f_3dp = first_3dplot; first_plot = NULL; first_3dplot = NULL; cp_free(f_p); sp_free(f_3dp); iso_samples_1 = tsamp1; iso_samples_2 = tsamp2; } } /* When plotting an external key, the margin and l/r/t/b/c are used to determine one of twelve possible positions. They must be defined appropriately in the case where stack direction determines exact position. */ static void set_key_position_from_stack_direction(legend_key *key) { if (key->stack_dir == GPKEY_VERTICAL) { switch(key->hpos) { case LEFT: key->margin = GPKEY_LMARGIN; break; case CENTRE: if (key->vpos == JUST_TOP) key->margin = GPKEY_TMARGIN; else key->margin = GPKEY_BMARGIN; break; case RIGHT: key->margin = GPKEY_RMARGIN; break; } } else { switch(key->vpos) { case JUST_TOP: key->margin = GPKEY_TMARGIN; break; case JUST_CENTRE: if (key->hpos == LEFT) key->margin = GPKEY_LMARGIN; else key->margin = GPKEY_RMARGIN; break; case JUST_BOT: key->margin = GPKEY_BMARGIN; break; } } } /* process 'set key' command */ static void set_key() { TBOOLEAN vpos_set = FALSE, hpos_set = FALSE, reg_set = FALSE, sdir_set = FALSE; char *vpos_warn = "Multiple vertical position settings"; char *hpos_warn = "Multiple horizontal position settings"; char *reg_warn = "Multiple location region settings"; char *sdir_warn = "Multiple stack direction settings"; legend_key *key = &keyT; c_token++; key->visible = TRUE; #ifdef BACKWARDS_COMPATIBLE if (END_OF_COMMAND) { free(key->font); reset_key(); if (interactive) int_warn(c_token, "deprecated syntax, use \"set key default\""); } #endif while (!END_OF_COMMAND) { switch(lookup_table(&set_key_tbl[0],c_token)) { case S_KEY_ON: key->visible = TRUE; break; case S_KEY_OFF: key->visible = FALSE; break; case S_KEY_DEFAULT: free(key->font); reset_key(); break; case S_KEY_TOP: if (vpos_set) int_warn(c_token, vpos_warn); key->vpos = JUST_TOP; vpos_set = TRUE; break; case S_KEY_BOTTOM: if (vpos_set) int_warn(c_token, vpos_warn); key->vpos = JUST_BOT; vpos_set = TRUE; break; case S_KEY_LEFT: if (hpos_set) int_warn(c_token, hpos_warn); key->hpos = LEFT; hpos_set = TRUE; break; case S_KEY_RIGHT: if (hpos_set) int_warn(c_token, hpos_warn); key->hpos = RIGHT; hpos_set = TRUE; break; case S_KEY_CENTER: if (!vpos_set) key->vpos = JUST_CENTRE; if (!hpos_set) key->hpos = CENTRE; if (vpos_set || hpos_set) vpos_set = hpos_set = TRUE; break; case S_KEY_VERTICAL: if (sdir_set) int_warn(c_token, sdir_warn); key->stack_dir = GPKEY_VERTICAL; sdir_set = TRUE; break; case S_KEY_HORIZONTAL: if (sdir_set) int_warn(c_token, sdir_warn); key->stack_dir = GPKEY_HORIZONTAL; sdir_set = TRUE; break; case S_KEY_OVER: if (reg_set) int_warn(c_token, reg_warn); /* Fall through */ case S_KEY_ABOVE: if (!hpos_set) key->hpos = CENTRE; if (!sdir_set) key->stack_dir = GPKEY_HORIZONTAL; key->region = GPKEY_AUTO_EXTERIOR_MARGIN; key->margin = GPKEY_TMARGIN; reg_set = TRUE; break; case S_KEY_UNDER: if (reg_set) int_warn(c_token, reg_warn); /* Fall through */ case S_KEY_BELOW: if (!hpos_set) key->hpos = CENTRE; if (!sdir_set) key->stack_dir = GPKEY_HORIZONTAL; key->region = GPKEY_AUTO_EXTERIOR_MARGIN; key->margin = GPKEY_BMARGIN; reg_set = TRUE; break; case S_KEY_INSIDE: if (reg_set) int_warn(c_token, reg_warn); key->region = GPKEY_AUTO_INTERIOR_LRTBC; reg_set = TRUE; break; case S_KEY_OUTSIDE: #ifdef BACKWARDS_COMPATIBLE if (!hpos_set) key->hpos = RIGHT; if (!sdir_set) key->stack_dir = GPKEY_VERTICAL; #endif if (reg_set) int_warn(c_token, reg_warn); key->region = GPKEY_AUTO_EXTERIOR_LRTBC; reg_set = TRUE; break; case S_KEY_TMARGIN: if (reg_set) int_warn(c_token, reg_warn); key->region = GPKEY_AUTO_EXTERIOR_MARGIN; key->margin = GPKEY_TMARGIN; reg_set = TRUE; break; case S_KEY_BMARGIN: if (reg_set) int_warn(c_token, reg_warn); key->region = GPKEY_AUTO_EXTERIOR_MARGIN; key->margin = GPKEY_BMARGIN; reg_set = TRUE; break; case S_KEY_LMARGIN: if (reg_set) int_warn(c_token, reg_warn); key->region = GPKEY_AUTO_EXTERIOR_MARGIN; key->margin = GPKEY_LMARGIN; reg_set = TRUE; break; case S_KEY_RMARGIN: if (reg_set) int_warn(c_token, reg_warn); key->region = GPKEY_AUTO_EXTERIOR_MARGIN; key->margin = GPKEY_RMARGIN; reg_set = TRUE; break; case S_KEY_LLEFT: key->just = GPKEY_LEFT; break; case S_KEY_RRIGHT: key->just = GPKEY_RIGHT; break; case S_KEY_REVERSE: key->reverse = TRUE; break; case S_KEY_NOREVERSE: key->reverse = FALSE; break; case S_KEY_INVERT: key->invert = TRUE; break; case S_KEY_NOINVERT: key->invert = FALSE; break; case S_KEY_ENHANCED: key->enhanced = TRUE; break; case S_KEY_NOENHANCED: key->enhanced = FALSE; break; case S_KEY_BOX: c_token++; key->box.l_type = LT_BLACK; if (!END_OF_COMMAND) { int old_token = c_token; lp_parse(&key->box, TRUE, FALSE); if (old_token == c_token && isanumber(c_token)) { key->box.l_type = int_expression() - 1; c_token++; } } c_token--; /* is incremented after loop */ break; case S_KEY_NOBOX: key->box.l_type = LT_NODRAW; break; case S_KEY_SAMPLEN: c_token++; key->swidth = real_expression(); c_token--; /* it is incremented after loop */ break; case S_KEY_SPACING: c_token++; key->vert_factor = real_expression(); if (key->vert_factor < 0.0) key->vert_factor = 0.0; c_token--; /* it is incremented after loop */ break; case S_KEY_WIDTH: c_token++; key->width_fix = real_expression(); c_token--; /* it is incremented after loop */ break; case S_KEY_HEIGHT: c_token++; key->height_fix = real_expression(); c_token--; /* it is incremented after loop */ break; case S_KEY_AUTOTITLES: if (almost_equals(++c_token, "col$umnheader")) key->auto_titles = COLUMNHEAD_KEYTITLES; else { key->auto_titles = FILENAME_KEYTITLES; c_token--; } break; case S_KEY_NOAUTOTITLES: key->auto_titles = NOAUTO_KEYTITLES; break; case S_KEY_TITLE: { char *s; c_token++; if ((s = try_to_get_string())) { strncpy(key->title,s,sizeof(key->title)); free(s); } else key->title[0] = '\0'; c_token--; } break; case S_KEY_NOTITLE: key->title[0] = '\0'; break; case S_KEY_FONT: c_token++; /* Make sure they've specified a font */ if (!isstringvalue(c_token)) int_error(c_token,"expected font"); else { free(key->font); key->font = try_to_get_string(); c_token--; } break; case S_KEY_TEXTCOLOR: { struct t_colorspec lcolor = DEFAULT_COLORSPEC; parse_colorspec(&lcolor, TC_VARIABLE); /* Only for backwards compatibility */ if (lcolor.type == TC_RGB && lcolor.value == -1.0) lcolor.type = TC_VARIABLE; key->textcolor = lcolor; } c_token--; break; case S_KEY_MAXCOLS: c_token++; if (END_OF_COMMAND || almost_equals(c_token, "a$utomatic")) key->maxcols = 0; else key->maxcols = int_expression(); if (key->maxcols < 0) key->maxcols = 0; c_token--; /* it is incremented after loop */ break; case S_KEY_MAXROWS: c_token++; if (END_OF_COMMAND || almost_equals(c_token, "a$utomatic")) key->maxrows = 0; else key->maxrows = int_expression(); if (key->maxrows < 0) key->maxrows = 0; c_token--; /* it is incremented after loop */ break; case S_KEY_FRONT: key->front = TRUE; break; case S_KEY_NOFRONT: key->front = FALSE; break; case S_KEY_MANUAL: c_token++; #ifdef BACKWARDS_COMPATIBLE case S_KEY_INVALID: default: #endif if (reg_set) int_warn(c_token, reg_warn); get_position(&key->user_pos); key->region = GPKEY_USER_PLACEMENT; reg_set = TRUE; c_token--; /* will be incremented again soon */ break; #ifndef BACKWARDS_COMPATIBLE case S_KEY_INVALID: default: int_error(c_token, "unknown key option"); break; #endif } c_token++; } if (key->region == GPKEY_AUTO_EXTERIOR_LRTBC) set_key_position_from_stack_direction(key); else if (key->region == GPKEY_AUTO_EXTERIOR_MARGIN) { if (vpos_set && (key->margin == GPKEY_TMARGIN || key->margin == GPKEY_BMARGIN)) int_warn(NO_CARET, "ignoring top/center/bottom; incompatible with tmargin/bmargin."); else if (hpos_set && (key->margin == GPKEY_LMARGIN || key->margin == GPKEY_RMARGIN)) int_warn(NO_CARET, "ignoring left/center/right; incompatible with lmargin/tmargin."); } } /* process 'set keytitle' command */ static void set_keytitle() { legend_key *key = &keyT; c_token++; if (END_OF_COMMAND) { /* set to default */ key->title[0] = NUL; } else { char *s; if ((s = try_to_get_string())) { strncpy(key->title,s,sizeof(key->title)); free(s); } } } /* process 'set label' command */ /* set label {tag} {"label_text"{,<value>{,...}}} {<label options>} */ /* EAM Mar 2003 - option parsing broken out into separate routine */ static void set_label() { struct text_label *this_label = NULL; struct text_label *new_label = NULL; struct text_label *prev_label = NULL; struct value a; int tag; c_token++; /* get tag */ if (!END_OF_COMMAND /* FIXME - Are these tests really still needed? */ && !isstringvalue(c_token) && !equals(c_token, "at") && !equals(c_token, "left") && !equals(c_token, "center") && !equals(c_token, "centre") && !equals(c_token, "right") && !equals(c_token, "front") && !equals(c_token, "back") && !almost_equals(c_token, "rot$ate") && !almost_equals(c_token, "norot$ate") && !equals(c_token, "lt") && !almost_equals(c_token, "linet$ype") && !equals(c_token, "pt") && !almost_equals(c_token, "pointt$ype") && !equals(c_token, "tc") && !almost_equals(c_token, "text$color") && !equals(c_token, "font")) { /* must be an expression, but is it a tag or is it the label itself? */ int save_token = c_token; const_express(&a); if (a.type == STRING) { c_token = save_token; tag = assign_label_tag(); gpfree_string(&a); } else tag = (int) real(&a); } else tag = assign_label_tag(); /* default next tag */ if (tag <= 0) int_error(c_token, "tag must be > zero"); if (first_label != NULL) { /* skip to last label */ for (this_label = first_label; this_label != NULL; prev_label = this_label, this_label = this_label->next) /* is this the label we want? */ if (tag <= this_label->tag) break; } /* Insert this label into the list if it is a new one */ if (this_label == NULL || tag != this_label->tag) { struct position default_offset = { character, character, character, 0., 0., 0. }; new_label = new_text_label(tag); new_label->offset = default_offset; if (prev_label == NULL) first_label = new_label; else prev_label->next = new_label; new_label->next = this_label; this_label = new_label; } if (!END_OF_COMMAND) { char* text; parse_label_options( this_label ); text = try_to_get_string(); if (text) { free(this_label->text); this_label->text = text; } /* HBB 20001021: new functionality. If next token is a ',' * treat it as a numeric expression whose value is to be * sprintf()ed into the label string (which contains an * appropriate %f format string) */ /* EAM Oct 2004 - this is superseded by general string variable * handling, but left in for backward compatibility */ if (!END_OF_COMMAND && equals(c_token, ",")) this_label->text = fill_numbers_into_string(this_label->text); } /* Now parse the label format and style options */ parse_label_options( this_label ); } /* assign a new label tag * labels are kept sorted by tag number, so this is easy * returns the lowest unassigned tag number */ static int assign_label_tag() { struct text_label *this_label; int last = 0; /* previous tag value */ for (this_label = first_label; this_label != NULL; this_label = this_label->next) if (this_label->tag == last + 1) last++; else break; return (last + 1); } /* process 'set loadpath' command */ static void set_loadpath() { /* We pick up all loadpath elements here before passing * them on to set_var_loadpath() */ char *collect = NULL; c_token++; if (END_OF_COMMAND) { clear_loadpath(); } else while (!END_OF_COMMAND) { char *ss; if ((ss = try_to_get_string())) { int len = (collect? strlen(collect) : 0); gp_expand_tilde(&ss); collect = gp_realloc(collect, len+1+strlen(ss)+1, "tmp loadpath"); if (len != 0) { strcpy(collect+len+1,ss); *(collect+len) = PATHSEP; } else strcpy(collect,ss); free(ss); } else { int_error(c_token, "expected string"); } } if (collect) { set_var_loadpath(collect); free(collect); } } /* process 'set fontpath' command */ static void set_fontpath() { /* We pick up all fontpath elements here before passing * them on to set_var_fontpath() */ char *collect = NULL; c_token++; if (END_OF_COMMAND) { clear_fontpath(); } else while (!END_OF_COMMAND) { char *ss; if ((ss = try_to_get_string())) { int len = (collect? strlen(collect) : 0); gp_expand_tilde(&ss); collect = gp_realloc(collect, len+1+strlen(ss)+1, "tmp fontpath"); if (len != 0) { strcpy(collect+len+1,ss); *(collect+len) = PATHSEP; } else strcpy(collect,ss); free(ss); } else { int_error(c_token, "expected string"); } } if (collect) { set_var_fontpath(collect); free(collect); } } /* process 'set locale' command */ static void set_locale() { char *s; c_token++; if (END_OF_COMMAND) { init_locale(); } else if ((s = try_to_get_string())) { set_var_locale(s); free(s); } else int_error(c_token, "expected string"); } /* process 'set logscale' command */ static void set_logscale() { TBOOLEAN set_for_axis[AXIS_ARRAY_SIZE] = AXIS_ARRAY_INITIALIZER(FALSE); int axis; double newbase = 10; c_token++; if (END_OF_COMMAND) { for (axis = 0; axis < LAST_REAL_AXIS; axis++) set_for_axis[axis] = TRUE; } else { /* do reverse search because of "x", "x1", "x2" sequence in axisname_tbl */ int i = 0; while (i < token[c_token].length) { axis = lookup_table_nth_reverse(axisname_tbl, LAST_REAL_AXIS+1, gp_input_line + token[c_token].start_index + i); if (axis < 0) { token[c_token].start_index += i; int_error(c_token, "invalid axis"); } set_for_axis[axisname_tbl[axis].value] = TRUE; i += strlen(axisname_tbl[axis].key); } c_token++; if (!END_OF_COMMAND) { newbase = fabs(real_expression()); if (newbase <= 1.0) int_error(c_token, "log base must be > 1.0; logscale unchanged"); } } for (axis = 0; axis <= LAST_REAL_AXIS; axis++) { if (set_for_axis[axis]) { axis_array[axis].log = TRUE; axis_array[axis].base = newbase; axis_array[axis].log_base = log(newbase); if ((axis == POLAR_AXIS) && polar) rrange_to_xy(); } } #ifdef VOLATILE_REFRESH /* Because the log scaling is applied during data input, a quick refresh */ /* using existing stored data will not work if the log setting changes. */ refresh_ok = 0; #endif } #ifdef GP_MACROS static void set_macros() { c_token++; expand_macros = TRUE; } #endif /* process 'set mapping3d' command */ static void set_mapping() { c_token++; if (END_OF_COMMAND) /* assuming same as points */ mapping3d = MAP3D_CARTESIAN; else if (almost_equals(c_token, "ca$rtesian")) mapping3d = MAP3D_CARTESIAN; else if (almost_equals(c_token, "s$pherical")) mapping3d = MAP3D_SPHERICAL; else if (almost_equals(c_token, "cy$lindrical")) mapping3d = MAP3D_CYLINDRICAL; else int_error(c_token, "expecting 'cartesian', 'spherical', or 'cylindrical'"); c_token++; } /* process 'set {blrt}margin' command */ static void set_margin(t_position *margin) { margin->scalex = character; margin->x = -1; c_token++; if (END_OF_COMMAND) return; if (equals(c_token,"at") && !almost_equals(++c_token,"sc$reen")) int_error(c_token,"expecting 'screen <fraction>'"); if (almost_equals(c_token,"sc$reen")) { margin->scalex = screen; c_token++; } margin->x = real_expression(); if (margin->x < 0) margin->x = -1; if (margin->scalex == screen) { if (margin->x < 0) margin->x = 0; if (margin->x > 1) margin->x = 1; } } static void set_separator() { c_token++; if (END_OF_COMMAND) { df_separator = '\0'; return; } if (almost_equals(c_token, "white$space")) df_separator = '\0'; else if (!isstring(c_token)) int_error(c_token, "expected \"<separator_char>\""); else if (equals(c_token, "\"\\t\"") || equals(c_token, "\'\\t\'")) df_separator = '\t'; else if (gp_input_line[token[c_token].start_index] != gp_input_line[token[c_token].start_index + 2]) int_error(c_token, "extra chars after <separation_char>"); else df_separator = gp_input_line[token[c_token].start_index + 1]; c_token++; } static void set_datafile_commentschars() { char *s; c_token++; if (END_OF_COMMAND) { free(df_commentschars); df_commentschars = gp_strdup(DEFAULT_COMMENTS_CHARS); } else if ((s = try_to_get_string())) { free(df_commentschars); df_commentschars = s; } else /* Leave it the way it was */ int_error(c_token, "expected string with comments chars"); } /* process 'set missing' command */ static void set_missing() { c_token++; if (END_OF_COMMAND) { free(missing_val); missing_val = NULL; } else if (!(missing_val = try_to_get_string())) int_error(c_token, "expected missing-value string"); } #ifdef USE_MOUSE static void set_mouse() { c_token++; mouse_setting.on = 1; while (!END_OF_COMMAND) { if (almost_equals(c_token, "do$ubleclick")) { ++c_token; mouse_setting.doubleclick = real_expression(); if (mouse_setting.doubleclick < 0) mouse_setting.doubleclick = 0; } else if (almost_equals(c_token, "nodo$ubleclick")) { mouse_setting.doubleclick = 0; /* double click off */ ++c_token; } else if (almost_equals(c_token, "zoomco$ordinates")) { mouse_setting.annotate_zoom_box = 1; ++c_token; } else if (almost_equals(c_token, "nozoomco$ordinates")) { mouse_setting.annotate_zoom_box = 0; ++c_token; } else if (almost_equals(c_token, "po$lardistancedeg")) { mouse_setting.polardistance = 1; UpdateStatusline(); ++c_token; } else if (almost_equals(c_token, "polardistancet$an")) { mouse_setting.polardistance = 2; UpdateStatusline(); ++c_token; } else if (almost_equals(c_token, "nopo$lardistance")) { mouse_setting.polardistance = 0; UpdateStatusline(); ++c_token; } else if (almost_equals(c_token, "label$s")) { mouse_setting.label = 1; ++c_token; /* check if the optional argument "<label options>" is present */ if (isstringvalue(c_token)) { free(mouse_setting.labelopts); mouse_setting.labelopts = try_to_get_string(); } } else if (almost_equals(c_token, "nola$bels")) { mouse_setting.label = 0; ++c_token; } else if (almost_equals(c_token, "ve$rbose")) { mouse_setting.verbose = 1; ++c_token; } else if (almost_equals(c_token, "nove$rbose")) { mouse_setting.verbose = 0; ++c_token; } else if (almost_equals(c_token, "zoomju$mp")) { mouse_setting.warp_pointer = 1; ++c_token; } else if (almost_equals(c_token, "nozoomju$mp")) { mouse_setting.warp_pointer = 0; ++c_token; } else if (almost_equals(c_token, "fo$rmat")) { ++c_token; if (isstringvalue(c_token)) { if (mouse_setting.fmt != mouse_fmt_default) free(mouse_setting.fmt); mouse_setting.fmt = try_to_get_string(); } else mouse_setting.fmt = mouse_fmt_default; } else if (almost_equals(c_token, "cl$ipboardformat")) { ++c_token; if (isstringvalue(c_token)) { free(clipboard_alt_string); clipboard_alt_string = try_to_get_string(); if (!strlen(clipboard_alt_string)) { free(clipboard_alt_string); clipboard_alt_string = NULL; if (MOUSE_COORDINATES_ALT == mouse_mode) mouse_mode = MOUSE_COORDINATES_REAL; } else { clipboard_mode = MOUSE_COORDINATES_ALT; } } else { int itmp = int_expression(); if (itmp >= MOUSE_COORDINATES_REAL && itmp <= MOUSE_COORDINATES_XDATETIME) { if (MOUSE_COORDINATES_ALT == itmp && !clipboard_alt_string) { fprintf(stderr, "please 'set mouse clipboard <fmt>' first.\n"); } else { clipboard_mode = itmp; } } else { fprintf(stderr, "should be: %d <= clipboardformat <= %d\n", MOUSE_COORDINATES_REAL, MOUSE_COORDINATES_XDATETIME); } } } else if (almost_equals(c_token, "mo$useformat")) { ++c_token; if (isstringvalue(c_token)) { free(mouse_alt_string); mouse_alt_string = try_to_get_string(); if (!strlen(mouse_alt_string)) { free(mouse_alt_string); mouse_alt_string = NULL; if (MOUSE_COORDINATES_ALT == mouse_mode) mouse_mode = MOUSE_COORDINATES_REAL; } else { mouse_mode = MOUSE_COORDINATES_ALT; } c_token++; } else { int itmp = int_expression(); if (itmp >= MOUSE_COORDINATES_REAL && itmp <= MOUSE_COORDINATES_ALT) { if (MOUSE_COORDINATES_ALT == itmp && !mouse_alt_string) { fprintf(stderr, "please 'set mouse mouseformat <fmt>' first.\n"); } else { mouse_mode = itmp; } } else { fprintf(stderr, "should be: %d <= mouseformat <= %d\n", MOUSE_COORDINATES_REAL, MOUSE_COORDINATES_ALT); } } } else if (almost_equals(c_token, "noru$ler")) { c_token++; set_ruler(FALSE, -1, -1); } else if (almost_equals(c_token, "ru$ler")) { c_token++; if (END_OF_COMMAND || !equals(c_token, "at")) { set_ruler(TRUE, -1, -1); } else { /* set mouse ruler at ... */ struct position where; int x, y; c_token++; if (END_OF_COMMAND) int_error(c_token, "expecting ruler coordinates"); get_position(&where); map_position(&where, &x, &y, "ruler at"); set_ruler(TRUE, (int)x, (int)y); } } else { if (!END_OF_COMMAND) int_error(c_token, "wrong option"); break; } } #ifdef OS2 PM_update_menu_items(); #endif } #endif /* process 'set offsets' command */ static void set_offsets() { c_token++; if (END_OF_COMMAND) { loff.x = roff.x = toff.y = boff.y = 0.0; return; } loff.scalex = first_axes; if (almost_equals(c_token,"gr$aph")) { loff.scalex = graph; c_token++; } loff.x = real_expression(); if (!equals(c_token, ",")) return; roff.scalex = first_axes; if (almost_equals(++c_token,"gr$aph")) { roff.scalex = graph; c_token++; } roff.x = real_expression(); if (!equals(c_token, ",")) return; toff.scaley = first_axes; if (almost_equals(++c_token,"gr$aph")) { toff.scaley = graph; c_token++; } toff.y = real_expression(); if (!equals(c_token, ",")) return; boff.scaley = first_axes; if (almost_equals(++c_token,"gr$aph")) { boff.scaley = graph; c_token++; } boff.y = real_expression(); } /* process 'set origin' command */ static void set_origin() { c_token++; if (END_OF_COMMAND) { xoffset = 0.0; yoffset = 0.0; } else { xoffset = real_expression(); if (!equals(c_token,",")) int_error(c_token, "',' expected"); c_token++; yoffset = real_expression(); } } /* process 'set output' command */ static void set_output() { char *testfile; c_token++; if (multiplot) int_error(c_token, "you can't change the output in multiplot mode"); if (END_OF_COMMAND) { /* no file specified */ term_set_output(NULL); if (outstr) { free(outstr); outstr = NULL; /* means STDOUT */ } } else if ((testfile = try_to_get_string())) { gp_expand_tilde(&testfile); term_set_output(testfile); if (testfile != outstr) { if (testfile) free(testfile); testfile = outstr; } /* if we get here then it worked, and outstr now = testfile */ } else int_error(c_token, "expecting filename"); /* Invalidate previous palette */ invalidate_palette(); } /* process 'set print' command */ static void set_print() { TBOOLEAN append_p = FALSE; char *testfile = NULL; c_token++; if (END_OF_COMMAND) { /* no file specified */ print_set_output(NULL, append_p); } else if ((testfile = try_to_get_string())) { gp_expand_tilde(&testfile); if (!END_OF_COMMAND) { if (equals(c_token, "append")) { append_p = TRUE; c_token++; } else { int_error(c_token, "expecting keyword \'append\'"); } } print_set_output(testfile, append_p); } else int_error(c_token, "expecting filename"); } /* process 'set psdir' command */ static void set_psdir() { c_token++; if (END_OF_COMMAND) { /* no file specified */ free(PS_psdir); PS_psdir = NULL; } else if ((PS_psdir = try_to_get_string())) { gp_expand_tilde(&PS_psdir); } else int_error(c_token, "expecting filename"); } /* process 'set parametric' command */ static void set_parametric() { c_token++; if (!parametric) { parametric = TRUE; if (!polar) { /* already done for polar */ strcpy (set_dummy_var[0], "t"); strcpy (set_dummy_var[1], "y"); if (interactive) (void) fprintf(stderr,"\n\tdummy variable is t for curves, u/v for surfaces\n"); } } } /* is resetting palette enabled? * note: reset_palette() is disabled within 'test palette' */ int enable_reset_palette = 1; /* default settings for palette */ void reset_palette() { if (!enable_reset_palette) return; sm_palette.colorMode = SMPAL_COLOR_MODE_RGB; sm_palette.formulaR = 7; sm_palette.formulaG = 5; sm_palette.formulaB = 15; sm_palette.positive = SMPAL_POSITIVE; sm_palette.ps_allcF = 0; sm_palette.use_maxcolors = 0; sm_palette.gradient_num = 0; free(sm_palette.gradient); sm_palette.gradient = NULL; free(sm_palette.color); sm_palette.color = NULL; sm_palette.cmodel = C_MODEL_RGB; sm_palette.gamma = 1.5; pm3d_last_set_palette_mode = SMPAL_COLOR_MODE_NONE; } /* Process 'set palette defined' gradient specification */ /* Syntax * set palette defined --> use default palette * set palette defined ( <pos1> <colorspec1>, ... , <posN> <colorspecN> ) * <posX> gray value, automatically rescaled to [0, 1] * <colorspecX> := { "<color_name>" | "<X-style-color>" | <r> <g> <b> } * <color_name> predefined colors (see below) * <X-style-color> "#rrggbb" with 2char hex values for red, green, blue * <r> <g> <b> three values in [0, 1] for red, green and blue * return 1 if named colors where used, 0 otherwise */ static int set_palette_defined() { double p=0, r=0, g=0, b=0; int num, named_colors=0; int actual_size=8; /* Invalidate previous gradient */ invalidate_palette(); free( sm_palette.gradient ); sm_palette.gradient = gp_alloc( actual_size*sizeof(gradient_struct), "pm3d gradient" ); if (END_OF_COMMAND) { /* lets use some default gradient */ double pal[][4] = { {0.0, 0.05, 0.05, 0.2}, {0.1, 0, 0, 1}, {0.25, 0.7, 0.85, 0.9}, {0.4, 0, 0.75, 0}, {0.5, 1, 1, 0}, {0.7, 1, 0, 0}, {0.9, 0.6, 0.6, 0.6}, {1.0, 0.95, 0.95, 0.95} }; int i; for( i=0; i<8; ++i ) { sm_palette.gradient[i].pos = pal[i][0]; sm_palette.gradient[i].col.r = pal[i][1]; sm_palette.gradient[i].col.g = pal[i][2]; sm_palette.gradient[i].col.b = pal[i][3]; } sm_palette.gradient_num = 8; sm_palette.cmodel = C_MODEL_RGB; return 0; } if ( !equals(c_token,"(") ) int_error( c_token, "Expected ( to start gradient definition." ); ++c_token; num = -1; while (!END_OF_COMMAND) { char *col_str; p = real_expression(); col_str = try_to_get_string(); if (col_str) { /* either color name or X-style rgb value "#rrggbb" */ if (col_str[0] == '#') { /* X-style specifier */ int rr,gg,bb; if (sscanf( col_str, "#%2x%2x%2x", &rr, &gg, &bb ) != 3 ) int_error( c_token-1, "Unknown color specifier. Use '#rrggbb'." ); r = (double)(rr)/255.; g = (double)(gg)/255.; b = (double)(bb)/255.; } else { /* some predefined names */ /* Maybe we could scan the X11 rgb.txt file to look up color * names? Or at least move these definitions to some file * which is included somehow during compilation instead * hardcoding them. */ /* Can't use lookupt_table() as it works for tokens only, so we'll do it manually */ const struct gen_table *tbl = pm3d_color_names_tbl; while (tbl->key) { if (!strcmp(col_str, tbl->key)) { r = (double)((tbl->value >> 16 ) & 255) / 255.; g = (double)((tbl->value >> 8 ) & 255) / 255.; b = (double)(tbl->value & 255) / 255.; break; } tbl++; } if (!tbl->key) int_error( c_token-1, "Unknown color name." ); named_colors = 1; } free(col_str); } else { /* numerical rgb, hsv, xyz, ... values [0,1] */ r = real_expression(); if (r<0 || r>1 ) int_error(c_token-1,"Value out of range [0,1]."); g = real_expression(); if (g<0 || g>1 ) int_error(c_token-1,"Value out of range [0,1]."); b = real_expression(); if (b<0 || b>1 ) int_error(c_token-1,"Value out of range [0,1]."); } ++num; if ( num >= actual_size ) { /* get more space for the gradient */ actual_size += 10; sm_palette.gradient = gp_realloc( sm_palette.gradient, actual_size*sizeof(gradient_struct), "pm3d gradient" ); } sm_palette.gradient[num].pos = p; sm_palette.gradient[num].col.r = r; sm_palette.gradient[num].col.g = g; sm_palette.gradient[num].col.b = b; if (equals(c_token,")") ) break; if ( !equals(c_token,",") ) int_error( c_token, "Expected comma." ); ++c_token; } sm_palette.gradient_num = num + 1; check_palette_grayscale(); return named_colors; } /* process 'set palette file' command * load a palette from file, honor datafile modifiers */ static void set_palette_file() { int specs; double v[4]; int i, j, actual_size; char *file_name; ++c_token; /* get filename */ if (!(file_name = try_to_get_string())) int_error(c_token, "missing filename"); df_set_plot_mode(MODE_QUERY); /* Needed only for binary datafiles */ specs = df_open(file_name, 4, NULL); free(file_name); if (specs > 0 && specs < 3) int_error( c_token, "Less than 3 using specs for palette"); if (sm_palette.gradient) { free( sm_palette.gradient ); sm_palette.gradient = 0; } actual_size = 10; sm_palette.gradient = gp_alloc( actual_size*sizeof(gradient_struct), "gradient" ); i = 0; #define VCONSTRAIN(x) ( (x)<0 ? 0 : ( (x)>1 ? 1: (x) ) ) /* values are simply clipped to [0,1] without notice */ while ((j = df_readline(v, 4)) != DF_EOF) { if (i >= actual_size) { actual_size += 10; sm_palette.gradient = (gradient_struct*) gp_realloc( sm_palette.gradient, actual_size*sizeof(gradient_struct), "pm3d gradient" ); } switch (j) { case 3: sm_palette.gradient[i].col.r = VCONSTRAIN(v[0]); sm_palette.gradient[i].col.g = VCONSTRAIN(v[1]); sm_palette.gradient[i].col.b = VCONSTRAIN(v[2]); sm_palette.gradient[i].pos = i ; break; case 4: sm_palette.gradient[i].col.r = VCONSTRAIN(v[1]); sm_palette.gradient[i].col.g = VCONSTRAIN(v[2]); sm_palette.gradient[i].col.b = VCONSTRAIN(v[3]); sm_palette.gradient[i].pos = v[0]; break; default: df_close(); int_error(c_token, "Bad data on line %d", df_line_number); break; } ++i; } #undef VCONSTRAIN df_close(); if (i==0) int_error( c_token, "No valid palette found" ); sm_palette.gradient_num = i; check_palette_grayscale(); } /* Process a 'set palette function' command. * Three functions with fixed dummy variable gray are registered which * map gray to the different color components. * If ALLOW_DUMMY_VAR_FOR_GRAY is set: * A different dummy variable may proceed the formulae in quotes. * This syntax is different from the usual '[u=<start>:<end>]', but * as <start> and <end> are fixed to 0 and 1 you would have to type * always '[u=]' which looks strange, especially as just '[u]' * wouldn't work. * If unset: dummy variable is fixed to 'gray'. */ static void set_palette_function() { int start_token; char saved_dummy_var[MAX_ID_LEN+1]; ++c_token; strncpy( saved_dummy_var, c_dummy_var[0], MAX_ID_LEN ); /* set dummy variable */ #ifdef ALLOW_DUMMY_VAR_FOR_GRAY if (isstring(c_token)) { quote_str( c_dummy_var[0], c_token, MAX_ID_LEN ); ++c_token; } else #endif /* ALLOW_DUMMY_VAR_FOR_GRAY */ strncpy( c_dummy_var[0], "gray", MAX_ID_LEN ); /* Afunc */ start_token = c_token; if (sm_palette.Afunc.at) { free_at( sm_palette.Afunc.at ); sm_palette.Afunc.at = NULL; } dummy_func = &sm_palette.Afunc; sm_palette.Afunc.at = perm_at(); if (! sm_palette.Afunc.at) int_error(start_token, "not enough memory for function"); m_capture(&(sm_palette.Afunc.definition), start_token, c_token-1); dummy_func = NULL; if (!equals(c_token,",")) int_error(c_token,"Expected comma" ); ++c_token; /* Bfunc */ start_token = c_token; if (sm_palette.Bfunc.at) { free_at( sm_palette.Bfunc.at ); sm_palette.Bfunc.at = NULL; } dummy_func = &sm_palette.Bfunc; sm_palette.Bfunc.at = perm_at(); if (! sm_palette.Bfunc.at) int_error(start_token, "not enough memory for function"); m_capture(&(sm_palette.Bfunc.definition), start_token, c_token-1); dummy_func = NULL; if (!equals(c_token,",")) int_error(c_token,"Expected comma" ); ++c_token; /* Cfunc */ start_token = c_token; if (sm_palette.Cfunc.at) { free_at( sm_palette.Cfunc.at ); sm_palette.Cfunc.at = NULL; } dummy_func = &sm_palette.Cfunc; sm_palette.Cfunc.at = perm_at(); if (! sm_palette.Cfunc.at) int_error(start_token, "not enough memory for function"); m_capture(&(sm_palette.Cfunc.definition), start_token, c_token-1); dummy_func = NULL; strncpy( c_dummy_var[0], saved_dummy_var, MAX_ID_LEN ); } /* * Normalize gray scale of gradient to fill [0,1] and * complain if gray values are not strictly increasing. * Maybe automatic sorting of the gray values could be a * feature. */ static void check_palette_grayscale() { int i; double off, f; /* check if gray values are sorted */ for (i=0; i<sm_palette.gradient_num-1; ++i ) { if (sm_palette.gradient[i].pos > sm_palette.gradient[i+1].pos) { int_error( c_token, "Gray scale not sorted in gradient." ); } } /* fit gray axis into [0:1]: subtract offset and rescale */ off = sm_palette.gradient[0].pos; f = 1.0 / ( sm_palette.gradient[sm_palette.gradient_num-1].pos-off ); for (i=1; i<sm_palette.gradient_num-1; ++i ) { sm_palette.gradient[i].pos = f*(sm_palette.gradient[i].pos-off); } /* paranoia on the first and last entries */ sm_palette.gradient[0].pos = 0.0; sm_palette.gradient[sm_palette.gradient_num-1].pos = 1.0; } #define SCAN_RGBFORMULA(formula) do { \ c_token++; \ i = int_expression(); \ if (abs(i) >= sm_palette.colorFormulae) \ int_error(c_token, \ "color formula out of range (use `show palette rgbformulae' to display the range)"); \ formula = i; \ } while(0) #define CHECK_TRANSFORM do { \ if (transform_defined) \ int_error(c_token, "conflicting options" ); \ transform_defined = 1; \ } while(0) /* Process 'set palette' command */ static void set_palette() { int transform_defined, named_color; transform_defined = named_color = 0; c_token++; if (END_OF_COMMAND) /* reset to default settings */ reset_palette(); else { /* go through all options of 'set palette' */ for ( ; !END_OF_COMMAND; c_token++ ) { switch (lookup_table(&set_palette_tbl[0],c_token)) { /* positive and negative picture */ case S_PALETTE_POSITIVE: /* "pos$itive" */ sm_palette.positive = SMPAL_POSITIVE; continue; case S_PALETTE_NEGATIVE: /* "neg$ative" */ sm_palette.positive = SMPAL_NEGATIVE; continue; /* Now the options that determine the palette of smooth colours */ /* gray or rgb-coloured */ case S_PALETTE_GRAY: /* "gray" */ sm_palette.colorMode = SMPAL_COLOR_MODE_GRAY; continue; case S_PALETTE_GAMMA: /* "gamma" */ ++c_token; sm_palette.gamma = real_expression(); --c_token; continue; case S_PALETTE_COLOR: /* "col$or" */ if (pm3d_last_set_palette_mode != SMPAL_COLOR_MODE_NONE) { sm_palette.colorMode = pm3d_last_set_palette_mode; } else { sm_palette.colorMode = SMPAL_COLOR_MODE_RGB; } continue; /* rgb color mapping formulae: rgb$formulae r,g,b (3 integers) */ case S_PALETTE_RGBFORMULAE: { /* "rgb$formulae" */ int i; CHECK_TRANSFORM; SCAN_RGBFORMULA( sm_palette.formulaR ); if (!equals(c_token,",")) { c_token--; continue; } SCAN_RGBFORMULA( sm_palette.formulaG ); if (!equals(c_token,",")) { c_token--; continue; } SCAN_RGBFORMULA( sm_palette.formulaB ); c_token--; sm_palette.colorMode = SMPAL_COLOR_MODE_RGB; pm3d_last_set_palette_mode = SMPAL_COLOR_MODE_RGB; continue; } /* rgbformulae */ /* rgb color mapping based on the "cubehelix" scheme proposed by */ /* D A Green (2011) http://arxiv.org/abs/1108.5083 */ case S_PALETTE_CUBEHELIX: { /* cubehelix */ TBOOLEAN done = FALSE; CHECK_TRANSFORM; sm_palette.colorMode = SMPAL_COLOR_MODE_CUBEHELIX; sm_palette.cubehelix_start = 0.5; sm_palette.cubehelix_cycles = -1.5; sm_palette.cubehelix_saturation = 1.0; c_token++; do { if (equals(c_token,"start")) { c_token++; sm_palette.cubehelix_start = real_expression(); } else if (almost_equals(c_token,"cyc$les")) { c_token++; sm_palette.cubehelix_cycles = real_expression(); } else if (almost_equals(c_token, "sat$uration")) { c_token++; sm_palette.cubehelix_saturation = real_expression(); } else done = TRUE; } while (!done); --c_token; continue; } /* cubehelix */ case S_PALETTE_DEFINED: { /* "def$ine" */ CHECK_TRANSFORM; ++c_token; named_color = set_palette_defined(); sm_palette.colorMode = SMPAL_COLOR_MODE_GRADIENT; pm3d_last_set_palette_mode = SMPAL_COLOR_MODE_GRADIENT; continue; } case S_PALETTE_FILE: { /* "file" */ CHECK_TRANSFORM; set_palette_file(); sm_palette.colorMode = SMPAL_COLOR_MODE_GRADIENT; pm3d_last_set_palette_mode = SMPAL_COLOR_MODE_GRADIENT; --c_token; continue; } case S_PALETTE_FUNCTIONS: { /* "func$tions" */ CHECK_TRANSFORM; set_palette_function(); sm_palette.colorMode = SMPAL_COLOR_MODE_FUNCTIONS; pm3d_last_set_palette_mode = SMPAL_COLOR_MODE_FUNCTIONS; --c_token; continue; } case S_PALETTE_MODEL: { /* "mo$del" */ int model; ++c_token; if (END_OF_COMMAND) int_error( c_token, "Expected color model." ); model = lookup_table(&color_model_tbl[0],c_token); if (model == -1) int_error(c_token,"Unknown color model."); sm_palette.cmodel = model; continue; } /* ps_allcF: write all rgb formulae into PS file? */ case S_PALETTE_NOPS_ALLCF: /* "nops_allcF" */ sm_palette.ps_allcF = 0; continue; case S_PALETTE_PS_ALLCF: /* "ps_allcF" */ sm_palette.ps_allcF = 1; continue; /* max colors used */ case S_PALETTE_MAXCOLORS: { /* "maxc$olors" */ int i; c_token++; i = int_expression(); if (i<0) int_error(c_token,"non-negative number required"); sm_palette.use_maxcolors = i; --c_token; continue; } } /* switch over palette lookup table */ int_error(c_token,"invalid palette option"); } /* end of while !end of command over palette options */ } /* else(arguments found) */ if (named_color && sm_palette.cmodel != C_MODEL_RGB && interactive) int_warn(NO_CARET, "Named colors will produce strange results if not in color mode RGB." ); /* Invalidate previous palette */ invalidate_palette(); } #undef CHECK_TRANSFORM #undef SCAN_RGBFORMULA /* process 'set colorbox' command */ static void set_colorbox() { c_token++; if (END_OF_COMMAND) /* reset to default position */ color_box.where = SMCOLOR_BOX_DEFAULT; else { /* go through all options of 'set colorbox' */ for ( ; !END_OF_COMMAND; c_token++ ) { switch (lookup_table(&set_colorbox_tbl[0],c_token)) { /* vertical or horizontal color gradient */ case S_COLORBOX_VERTICAL: /* "v$ertical" */ color_box.rotation = 'v'; continue; case S_COLORBOX_HORIZONTAL: /* "h$orizontal" */ color_box.rotation = 'h'; continue; /* color box where: default position */ case S_COLORBOX_DEFAULT: /* "def$ault" */ color_box.where = SMCOLOR_BOX_DEFAULT; continue; /* color box where: position by user */ case S_COLORBOX_USER: /* "u$ser" */ color_box.where = SMCOLOR_BOX_USER; continue; /* color box layer: front or back */ case S_COLORBOX_FRONT: /* "fr$ont" */ color_box.layer = LAYER_FRONT; continue; case S_COLORBOX_BACK: /* "ba$ck" */ color_box.layer = LAYER_BACK; continue; /* border of the color box */ case S_COLORBOX_BORDER: /* "bo$rder" */ color_box.border = 1; c_token++; if (!END_OF_COMMAND) { /* expecting a border line type */ color_box.border_lt_tag = int_expression(); if (color_box.border_lt_tag <= 0) { color_box.border_lt_tag = 0; int_error(c_token, "tag must be strictly positive (see `help set style line')"); } --c_token; } continue; case S_COLORBOX_BDEFAULT: /* "bd$efault" */ color_box.border_lt_tag = -1; /* use default border */ continue; case S_COLORBOX_NOBORDER: /* "nobo$rder" */ color_box.border = 0; continue; /* colorbox origin */ case S_COLORBOX_ORIGIN: /* "o$rigin" */ c_token++; if (END_OF_COMMAND) { int_error(c_token, "expecting screen value [0 - 1]"); } else { get_position_default(&color_box.origin, screen); } c_token--; continue; /* colorbox size */ case S_COLORBOX_SIZE: /* "s$ize" */ c_token++; if (END_OF_COMMAND) { int_error(c_token, "expecting screen value [0 - 1]"); } else { get_position_default(&color_box.size, screen); } c_token--; continue; } /* switch over colorbox lookup table */ int_error(c_token,"invalid colorbox option"); } /* end of while !end of command over colorbox options */ if (color_box.where == SMCOLOR_BOX_NO) /* default: draw at default position */ color_box.where = SMCOLOR_BOX_DEFAULT; } } /* process 'set pm3d' command */ static void set_pm3d() { int c_token0 = ++c_token; if (END_OF_COMMAND) { /* assume default settings */ pm3d_reset(); /* sets pm3d.implicit to PM3D_IMPLICIT and pm3d.where to "s" */ pm3d.implicit = PM3D_IMPLICIT; /* for historical reasons */ } else { /* go through all options of 'set pm3d' */ for ( ; !END_OF_COMMAND; c_token++ ) { switch (lookup_table(&set_pm3d_tbl[0],c_token)) { /* where to plot */ case S_PM3D_AT: /* "at" */ c_token++; if (get_pm3d_at_option(&pm3d.where[0])) return; /* error */ c_token--; #if 1 if (c_token == c_token0+1) /* for historical reasons: if "at" is the first option of pm3d, * like "set pm3d at X other_opts;", then implicit is switched on */ pm3d.implicit = PM3D_IMPLICIT; #endif continue; case S_PM3D_INTERPOLATE: /* "interpolate" */ c_token++; if (END_OF_COMMAND) { int_error(c_token, "expecting step values i,j"); } else { pm3d.interp_i = int_expression(); if (!equals(c_token,",")) int_error(c_token, "',' expected"); c_token++; pm3d.interp_j = int_expression(); c_token--; } continue; /* forward and backward drawing direction */ case S_PM3D_SCANSFORWARD: /* "scansfor$ward" */ pm3d.direction = PM3D_SCANS_FORWARD; continue; case S_PM3D_SCANSBACKWARD: /* "scansback$ward" */ pm3d.direction = PM3D_SCANS_BACKWARD; continue; case S_PM3D_SCANS_AUTOMATIC: /* "scansauto$matic" */ pm3d.direction = PM3D_SCANS_AUTOMATIC; continue; case S_PM3D_DEPTH: /* "dep$thorder" */ pm3d.direction = PM3D_DEPTH; continue; /* flush scans: left, right or center */ case S_PM3D_FLUSH: /* "fl$ush" */ c_token++; if (almost_equals(c_token, "b$egin")) pm3d.flush = PM3D_FLUSH_BEGIN; else if (almost_equals(c_token, "c$enter")) pm3d.flush = PM3D_FLUSH_CENTER; else if (almost_equals(c_token, "e$nd")) pm3d.flush = PM3D_FLUSH_END; else int_error(c_token,"expecting flush 'begin', 'center' or 'end'"); continue; /* clipping method */ case S_PM3D_CLIP_1IN: /* "clip1$in" */ pm3d.clip = PM3D_CLIP_1IN; continue; case S_PM3D_CLIP_4IN: /* "clip4$in" */ pm3d.clip = PM3D_CLIP_4IN; continue; /* setup everything for plotting a map */ case S_PM3D_MAP: /* "map" */ pm3d.where[0] = 'b'; pm3d.where[1] = 0; /* set pm3d at b */ data_style = PM3DSURFACE; func_style = PM3DSURFACE; splot_map = TRUE; continue; /* flushing triangles */ case S_PM3D_FTRIANGLES: /* "ftr$iangles" */ pm3d.ftriangles = 1; continue; case S_PM3D_NOFTRIANGLES: /* "noftr$iangles" */ pm3d.ftriangles = 0; continue; /* pm3d-specific hidden line overwrite */ case S_PM3D_HIDDEN: /* "hi$dden3d" */ c_token++; pm3d.hidden3d_tag = -1; if (isanumber(c_token) || type_udv(c_token)==INTGR) { pm3d.hidden3d_tag = int_expression(); if (pm3d.hidden3d_tag < -1) pm3d.hidden3d_tag = -1; } --c_token; continue; case S_PM3D_NOHIDDEN: /* "nohi$dden3d" */ pm3d.hidden3d_tag = 0; continue; case S_PM3D_SOLID: /* "so$lid" */ case S_PM3D_NOTRANSPARENT: /* "notr$ansparent" */ case S_PM3D_NOSOLID: /* "noso$lid" */ case S_PM3D_TRANSPARENT: /* "tr$ansparent" */ if (interactive) int_warn(c_token, "Deprecated syntax --- ignored"); case S_PM3D_IMPLICIT: /* "i$mplicit" */ case S_PM3D_NOEXPLICIT: /* "noe$xplicit" */ pm3d.implicit = PM3D_IMPLICIT; continue; case S_PM3D_NOIMPLICIT: /* "noi$mplicit" */ case S_PM3D_EXPLICIT: /* "e$xplicit" */ pm3d.implicit = PM3D_EXPLICIT; continue; case S_PM3D_WHICH_CORNER: /* "corners2color" */ c_token++; if (equals(c_token, "mean")) pm3d.which_corner_color = PM3D_WHICHCORNER_MEAN; else if (equals(c_token, "geomean")) pm3d.which_corner_color = PM3D_WHICHCORNER_GEOMEAN; else if (equals(c_token, "median")) pm3d.which_corner_color = PM3D_WHICHCORNER_MEDIAN; else if (equals(c_token, "min")) pm3d.which_corner_color = PM3D_WHICHCORNER_MIN; else if (equals(c_token, "max")) pm3d.which_corner_color = PM3D_WHICHCORNER_MAX; else if (equals(c_token, "c1")) pm3d.which_corner_color = PM3D_WHICHCORNER_C1; else if (equals(c_token, "c2")) pm3d.which_corner_color = PM3D_WHICHCORNER_C2; else if (equals(c_token, "c3")) pm3d.which_corner_color = PM3D_WHICHCORNER_C3; else if (equals(c_token, "c4")) pm3d.which_corner_color = PM3D_WHICHCORNER_C4; else int_error(c_token,"expecting 'mean', 'geomean', 'median', 'min', 'max', 'c1', 'c2', 'c3' or 'c4'"); continue; } /* switch over pm3d lookup table */ int_error(c_token,"invalid pm3d option"); } /* end of while !end of command over pm3d options */ if (PM3D_SCANS_AUTOMATIC == pm3d.direction && PM3D_FLUSH_BEGIN != pm3d.flush) { pm3d.direction = PM3D_SCANS_FORWARD; /* FIXME: Why isn't this combination supported? */ FPRINTF((stderr, "pm3d: `scansautomatic' and `flush %s' are incompatible\n", PM3D_FLUSH_END == pm3d.flush ? "end": "center")); } } } /* process 'set pointintervalbox' command */ static void set_pointintervalbox() { c_token++; if (END_OF_COMMAND) pointintervalbox = 1.0; else pointintervalbox = real_expression(); if (pointintervalbox <= 0) pointintervalbox = 1.0; } /* process 'set pointsize' command */ static void set_pointsize() { c_token++; if (END_OF_COMMAND) pointsize = 1.0; else pointsize = real_expression(); if (pointsize <= 0) pointsize = 1.0; } /* process 'set polar' command */ static void set_polar() { c_token++; if (polar) return; else polar = TRUE; if (!parametric) { if (interactive) (void) fprintf(stderr,"\n\tdummy variable is t for curves\n"); strcpy (set_dummy_var[0], "t"); } if (axis_array[T_AXIS].set_autoscale) { /* only if user has not set a range manually */ axis_array[T_AXIS].set_min = 0.0; /* 360 if degrees, 2pi if radians */ axis_array[T_AXIS].set_max = 2 * M_PI / ang2rad; } if (axis_array[POLAR_AXIS].set_autoscale != AUTOSCALE_BOTH) rrange_to_xy(); } #ifdef EAM_OBJECTS /* * Process command 'set object <tag> {rectangle|ellipse|circle|polygon}' * set object {tag} rectangle {from <bottom_left> {to|rto} <top_right>} * {{at|center} <xcen>,<ycen> size <w>,<h>} * {fc|fillcolor <colorspec>} {lw|linewidth <lw>} * {fs <fillstyle>} {front|back|behind} * {default} * EAM Jan 2005 */ static void set_object() { int tag; /* The next token must either be a tag or the object type */ c_token++; if (almost_equals(c_token, "rect$angle") || almost_equals(c_token, "ell$ipse") || almost_equals(c_token, "circ$le") || almost_equals(c_token, "poly$gon")) tag = -1; /* We'll figure out what it really is later */ else { tag = int_expression(); if (tag <= 0) int_error(c_token, "tag must be > zero"); } if (almost_equals(c_token, "rect$angle")) { set_obj(tag, OBJ_RECTANGLE); } else if (almost_equals(c_token, "ell$ipse")) { set_obj(tag, OBJ_ELLIPSE); } else if (almost_equals(c_token, "circ$le")) { set_obj(tag, OBJ_CIRCLE); } else if (almost_equals(c_token, "poly$gon")) { set_obj(tag, OBJ_POLYGON); } else if (tag > 0) { /* Look for existing object with this tag */ t_object *this_object = first_object; for (; this_object != NULL; this_object = this_object->next) if (tag == this_object->tag) break; if (this_object && tag == this_object->tag) { c_token--; set_obj(tag, this_object->object_type); } else int_error(c_token, "unknown object"); } else int_error(c_token, "unrecognized object type"); } static t_object * new_object(int tag, int object_type, t_object *new) { t_object def_rect = DEFAULT_RECTANGLE_STYLE; t_object def_ellipse = DEFAULT_ELLIPSE_STYLE; t_object def_circle = DEFAULT_CIRCLE_STYLE; t_object def_polygon = DEFAULT_POLYGON_STYLE; if (!new) new = gp_alloc(sizeof(struct object), "object"); else if (new->object_type == OBJ_POLYGON) free(new->o.polygon.vertex); if (object_type == OBJ_RECTANGLE) { *new = def_rect; new->lp_properties.l_type = LT_DEFAULT; /* Use default rectangle color */ new->fillstyle.fillstyle = FS_DEFAULT; /* and default fill style */ } else if (object_type == OBJ_ELLIPSE) *new = def_ellipse; else if (object_type == OBJ_CIRCLE) *new = def_circle; else if (object_type == OBJ_POLYGON) *new = def_polygon; else int_error(NO_CARET,"object initialization failure"); new->tag = tag; new->object_type = object_type; return new; } static void set_obj(int tag, int obj_type) { t_rectangle *this_rect = NULL; t_ellipse *this_ellipse = NULL; t_circle *this_circle = NULL; t_polygon *this_polygon = NULL; t_object *this_object = NULL; t_object *new_obj = NULL; t_object *prev_object = NULL; TBOOLEAN got_fill = FALSE; TBOOLEAN got_lt = FALSE; TBOOLEAN got_lw = FALSE; TBOOLEAN got_corners = FALSE; TBOOLEAN got_center = FALSE; TBOOLEAN got_origin = FALSE; double lw = 1.0; c_token++; /* We are setting the default, not any particular rectangle */ if (tag < -1) { c_token--; if (obj_type == OBJ_RECTANGLE) { this_object = &default_rectangle; this_rect = &this_object->o.rectangle; } else int_error(c_token, "Unknown object type"); } else { /* Look for existing object with this tag */ for (this_object = first_object; this_object != NULL; prev_object = this_object, this_object = this_object->next) /* is this the one we want? */ if (0 < tag && tag <= this_object->tag) break; /* Insert this rect into the list if it is a new one */ if (this_object == NULL || tag != this_object->tag) { if (tag == -1) tag = (prev_object) ? prev_object->tag+1 : 1; new_obj = new_object(tag, obj_type, NULL); if (prev_object == NULL) first_object = new_obj; else prev_object->next = new_obj; new_obj->next = this_object; this_object = new_obj; } /* Over-write old object if the type has changed */ else if (this_object->object_type != obj_type) { t_object *save_link = this_object->next; new_obj = new_object(tag, obj_type, this_object); this_object->next = save_link; } this_rect = &this_object->o.rectangle; this_ellipse = &this_object->o.ellipse; this_circle = &this_object->o.circle; this_polygon = &this_object->o.polygon; } while (!END_OF_COMMAND) { int save_token = c_token; switch (obj_type) { case OBJ_RECTANGLE: if (equals(c_token,"from")) { /* Read in the bottom left and upper right corners */ c_token++; get_position(&this_rect->bl); if (equals(c_token,"to")) { c_token++; get_position(&this_rect->tr); } else if (equals(c_token,"rto")) { c_token++; get_position_default(&this_rect->tr,this_rect->bl.scalex); if (this_rect->bl.scalex != this_rect->tr.scalex || this_rect->bl.scaley != this_rect->tr.scaley) int_error(c_token,"relative coordinates must match in type"); this_rect->tr.x += this_rect->bl.x; this_rect->tr.y += this_rect->bl.y; } else int_error(c_token,"Expecting to or rto"); got_corners = TRUE; this_rect->type = 0; continue; } else if (equals(c_token,"at") || almost_equals(c_token,"cen$ter")) { /* Read in the center position */ c_token++; get_position(&this_rect->center); got_center = TRUE; this_rect->type = 1; continue; } else if (equals(c_token,"size")) { /* Read in the width and height */ c_token++; get_position(&this_rect->extent); got_center = TRUE; this_rect->type = 1; continue; } break; case OBJ_CIRCLE: if (equals(c_token,"at") || almost_equals(c_token,"cen$ter")) { /* Read in the center position */ c_token++; get_position(&this_circle->center); continue; } else if (equals(c_token,"size") || equals(c_token,"radius")) { /* Read in the radius */ c_token++; get_position(&this_circle->extent); continue; } else if (equals(c_token, "arc")) { /* Start and end angle for arc */ if (equals(++c_token,"[")) { double arc; c_token++; arc = real_expression(); if (fabs(arc) > 1000.) int_error(c_token-1,"Angle out of range"); else this_circle->arc_begin = arc; if (equals(c_token++, ":")) { arc = real_expression(); if (fabs(arc) > 1000.) int_error(c_token-1,"Angle out of range"); else this_circle->arc_end = arc; if (equals(c_token++,"]")) continue; } } int_error(--c_token, "Expecting arc [<begin>:<end>]"); } break; case OBJ_ELLIPSE: if (equals(c_token,"at") || almost_equals(c_token,"cen$ter")) { /* Read in the center position */ c_token++; get_position(&this_ellipse->center); continue; } else if (equals(c_token,"size")) { /* Read in the width and height */ c_token++; get_position(&this_ellipse->extent); continue; } else if (almost_equals(c_token,"ang$le")) { c_token++; this_ellipse->orientation = real_expression(); continue; } else if (almost_equals(c_token,"unit$s")) { c_token++; if (equals(c_token,"xy") || END_OF_COMMAND) { this_ellipse->type = ELLIPSEAXES_XY; } else if (equals(c_token,"xx")) { this_ellipse->type = ELLIPSEAXES_XX; } else if (equals(c_token,"yy")) { this_ellipse->type = ELLIPSEAXES_YY; } else { int_error(c_token, "expecting 'xy', 'xx' or 'yy'" ); } c_token++; continue; } break; case OBJ_POLYGON: if (equals(c_token,"from")) { c_token++; this_polygon->vertex = gp_realloc(this_polygon->vertex, sizeof(struct position), "polygon vertex"); get_position(&this_polygon->vertex[0]); this_polygon->type = 1; got_origin = TRUE; } while (equals(c_token,"to") || equals(c_token,"rto")) { if (!got_origin) goto polygon_error; this_polygon->vertex = gp_realloc(this_polygon->vertex, (this_polygon->type+1) * sizeof(struct position), "polygon vertex"); if (equals(c_token++,"to")) { get_position(&this_polygon->vertex[this_polygon->type]); } else /* "rto" */ { int v = this_polygon->type; get_position_default(&this_polygon->vertex[v], this_polygon->vertex->scalex); if (this_polygon->vertex[v].scalex != this_polygon->vertex[v-1].scalex || this_polygon->vertex[v].scaley != this_polygon->vertex[v-1].scaley) int_error(c_token,"relative coordinates must match in type"); this_polygon->vertex[v].x += this_polygon->vertex[v-1].x; this_polygon->vertex[v].y += this_polygon->vertex[v-1].y; } this_polygon->type++; got_corners = TRUE; } if (got_corners && memcmp(&this_polygon->vertex[this_polygon->type-1], &this_polygon->vertex[0],sizeof(struct position))) { fprintf(stderr,"Polygon is not closed - adding extra vertex\n"); this_polygon->vertex = gp_realloc(this_polygon->vertex, (this_polygon->type+1) * sizeof(struct position), "polygon vertex"); this_polygon->vertex[this_polygon->type] = this_polygon->vertex[0]; this_polygon->type++; } break; polygon_error: free(this_polygon->vertex); this_polygon->vertex = NULL; this_polygon->type = 0; int_error(c_token, "Unrecognized polygon syntax"); default: int_error(c_token, "Unrecoginized object type"); } /* End of object-specific options */ /* The rest of the options apply to any type of object */ if (equals(c_token,"front")) { this_object->layer = 1; c_token++; continue; } else if (equals(c_token,"back")) { this_object->layer = 0; c_token++; continue; } else if (equals(c_token,"behind")) { this_object->layer = -1; c_token++; continue; } else if (almost_equals(c_token,"def$ault")) { if (tag < 0) { int_error(c_token, "Invalid command - did you mean 'unset style rectangle'?"); } else { this_object->lp_properties.l_type = LT_DEFAULT; this_object->fillstyle.fillstyle = FS_DEFAULT; } got_fill = got_lt = TRUE; c_token++; continue; } /* Now parse the style options; default to whatever the global style is */ if (!got_fill) { fill_style_type *default_style; if (this_object->object_type == OBJ_RECTANGLE) default_style = &default_rectangle.fillstyle; else default_style = &default_fillstyle; if (new_obj) parse_fillstyle(&this_object->fillstyle, default_style->fillstyle, default_style->filldensity, default_style->fillpattern, default_style->border_color); else parse_fillstyle(&this_object->fillstyle, this_object->fillstyle.fillstyle, this_object->fillstyle.filldensity, this_object->fillstyle.fillpattern, this_object->fillstyle.border_color); if (c_token != save_token) { got_fill = TRUE; continue; } } /* Parse the colorspec */ if (!got_lt) { if (equals(c_token,"fc") || almost_equals(c_token,"fillc$olor")) { this_object->lp_properties.use_palette = TRUE; this_object->lp_properties.l_type = LT_BLACK; /* Anything but LT_DEFAULT */ parse_colorspec(&this_object->lp_properties.pm3d_color, TC_FRAC); if (this_object->lp_properties.pm3d_color.type == TC_DEFAULT) this_object->lp_properties.l_type = LT_DEFAULT; } if (c_token != save_token) { got_lt = TRUE; continue; } } /* And linewidth */ if (!got_lw) { if (equals(c_token,"lw") || almost_equals(c_token,"linew$idth")) { c_token++; lw = real_expression(); } if (c_token != save_token) { got_lw = TRUE; continue; } } int_error(c_token, "Unrecognized or duplicate option"); } if (got_lw) this_object->lp_properties.l_width = lw; if (got_center && got_corners) int_error(NO_CARET,"Inconsistent options"); } #endif /* process 'set samples' command */ static void set_samples() { int tsamp1, tsamp2; c_token++; tsamp1 = abs(int_expression()); tsamp2 = tsamp1; if (!END_OF_COMMAND) { if (!equals(c_token,",")) int_error(c_token, "',' expected"); c_token++; tsamp2 = abs(int_expression()); } if (tsamp1 < 2 || tsamp2 < 2) int_error(c_token, "sampling rate must be > 1; sampling unchanged"); else { struct surface_points *f_3dp = first_3dplot; first_3dplot = NULL; sp_free(f_3dp); samples_1 = tsamp1; samples_2 = tsamp2; } } /* process 'set size' command */ static void set_size() { c_token++; if (END_OF_COMMAND) { xsize = 1.0; ysize = 1.0; } else { if (almost_equals(c_token, "sq$uare")) { aspect_ratio = 1.0; ++c_token; } else if (almost_equals(c_token,"ra$tio")) { ++c_token; aspect_ratio = real_expression(); } else if (almost_equals(c_token, "nora$tio") || almost_equals(c_token, "nosq$uare")) { aspect_ratio = 0.0; ++c_token; } if (!END_OF_COMMAND) { xsize = real_expression(); if (equals(c_token,",")) { c_token++; ysize = real_expression(); } else { ysize = xsize; } } } if (xsize <= 0 || ysize <=0) { xsize = ysize = 1.0; int_error(NO_CARET,"Illegal value for size"); } } /* process 'set style' command */ static void set_style() { c_token++; switch(lookup_table(&show_style_tbl[0],c_token)){ case SHOW_STYLE_DATA: data_style = get_style(); if (data_style == FILLEDCURVES) { get_filledcurves_style_options(&filledcurves_opts_data); if (!filledcurves_opts_data.opt_given) /* default value */ filledcurves_opts_data.closeto = FILLEDCURVES_CLOSED; } break; case SHOW_STYLE_FUNCTION: { enum PLOT_STYLE temp_style = get_style(); if ((temp_style & PLOT_STYLE_HAS_ERRORBAR) || (temp_style == LABELPOINTS) || (temp_style == HISTOGRAMS)) int_error(c_token, "style not usable for function plots, left unchanged"); else func_style = temp_style; if (func_style == FILLEDCURVES) { get_filledcurves_style_options(&filledcurves_opts_func); if (!filledcurves_opts_func.opt_given) /* default value */ filledcurves_opts_func.closeto = FILLEDCURVES_CLOSED; } break; } case SHOW_STYLE_LINE: set_linestyle(&first_linestyle); break; case SHOW_STYLE_FILLING: parse_fillstyle( &default_fillstyle, default_fillstyle.fillstyle, default_fillstyle.filldensity, default_fillstyle.fillpattern, default_fillstyle.border_color); break; case SHOW_STYLE_ARROW: set_arrowstyle(); break; #ifdef EAM_OBJECTS case SHOW_STYLE_RECTANGLE: c_token++; set_obj(-2, OBJ_RECTANGLE); break; case SHOW_STYLE_CIRCLE: c_token++; if (almost_equals(c_token++,"r$adius")) { get_position(&default_circle.o.circle.extent); } break; case SHOW_STYLE_ELLIPSE: c_token++; while (!END_OF_COMMAND) { if (equals(c_token,"size")) { c_token++; get_position(&default_ellipse.o.ellipse.extent); c_token--; } else if (almost_equals(c_token,"ang$le")) { c_token++; if (isanumber(c_token) || type_udv(c_token) == INTGR || type_udv(c_token) == CMPLX) { default_ellipse.o.ellipse.orientation = real_expression(); c_token--; } } else if (almost_equals(c_token,"unit$s")) { c_token++; if (equals(c_token,"xy") || END_OF_COMMAND) { default_ellipse.o.ellipse.type = ELLIPSEAXES_XY; } else if (equals(c_token,"xx")) { default_ellipse.o.ellipse.type = ELLIPSEAXES_XX; } else if (equals(c_token,"yy")) { default_ellipse.o.ellipse.type = ELLIPSEAXES_YY; } else { int_error(c_token, "expecting 'xy', 'xx' or 'yy'" ); } } else int_error(c_token, "expecting 'units {xy|xx|yy}', 'angle <number>' or 'size <position>'" ); c_token++; } break; #endif case SHOW_STYLE_HISTOGRAM: parse_histogramstyle(&histogram_opts,HT_CLUSTERED,histogram_opts.gap); break; case SHOW_STYLE_INCREMENT: c_token++; if (END_OF_COMMAND || almost_equals(c_token,"def$ault")) prefer_line_styles = FALSE; else if (almost_equals(c_token,"u$serstyles")) prefer_line_styles = TRUE; else int_error(c_token,"unrecognized option"); c_token++; break; case SHOW_STYLE_BOXPLOT: set_boxplot(); break; default: int_error(c_token, "expecting 'data', 'function', 'line', 'fill', 'rectangle', 'circle', 'ellipse' or 'arrow'" ); } } /* process 'set surface' command */ static void set_surface() { c_token++; draw_surface = TRUE; } /* process 'set table' command */ static void set_table() { char *tablefile; c_token++; if (table_outfile) { fclose(table_outfile); table_outfile = NULL; } if ((tablefile = try_to_get_string())) { /* 'set table "foo"' creates a new output file */ if (!(table_outfile = fopen(tablefile, "w"))) os_error(c_token, "cannot open table output file"); free(tablefile); } table_mode = TRUE; } /* process 'set terminal' comamnd */ static void set_terminal() { c_token++; if (multiplot) int_error(c_token, "You can't change the terminal in multiplot mode"); if (END_OF_COMMAND) { list_terms(); screen_ok = FALSE; return; } #ifdef BACKWARDS_COMPATIBLE if (equals(c_token,"table")) { set_table(); if (interactive) int_warn(NO_CARET,"The command 'set term table' is deprecated.\n\t Please use 'set table \"outfile\"' instead.\n"); return; } else table_mode = FALSE; #endif /* `set term push' */ if (equals(c_token,"push")) { push_terminal(interactive); c_token++; return; } /* set term push */ #ifdef EXTENDED_COLOR_SPECS /* each terminal is supposed to turn this on, probably * somewhere when the graphics is initialized */ supply_extended_color_specs = 0; #endif #ifdef USE_MOUSE event_reset((void *)1); /* cancel zoombox etc. */ #endif term_reset(); /* `set term pop' */ if (equals(c_token,"pop")) { pop_terminal(); c_token++; return; } /* set term pop */ /* `set term <normal terminal>' */ term = 0; /* in case set_term() fails */ term = set_term(); /* get optional mode parameters * not all drivers reset the option string before * strcat-ing to it, so we reset it for them */ *term_options = 0; if (term) (*term->options)(); if (interactive && *term_options) fprintf(stderr,"Options are '%s'\n",term_options); } /* * Accept a single terminal option to apply to the current terminal if possible. * If the current terminal cannot support this option, we silently ignore it. * Only reasonably common terminal options are supported. * * If necessary, the code in term->options() can detect that it was called * from here because in this case (c_token == 2), whereas when called from * 'set term foo ...' it will see (c_token == 3). */ static void set_termoptions() { TBOOLEAN ok_to_call_terminal = FALSE; int save_end_of_line = num_tokens; c_token++; if (END_OF_COMMAND || !term) return; if (almost_equals(c_token,"enh$anced") || almost_equals(c_token,"noenh$anced")) { num_tokens = GPMIN(num_tokens,c_token+1); if (term->enhanced_open) ok_to_call_terminal = TRUE; else c_token++; } else if (equals(c_token,"font") || equals(c_token,"fname")) { num_tokens = GPMIN(num_tokens,c_token+2); if (term->set_font) ok_to_call_terminal = TRUE; else c_token += 2; } else if (equals(c_token,"fontscale")) { if (term->flags & TERM_FONTSCALE) ok_to_call_terminal = TRUE; else { c_token++; real_expression(); /* Silently ignore the request */ } } else if (equals(c_token,"lw") || almost_equals(c_token,"linew$idth")) { if (term->flags & TERM_LINEWIDTH) ok_to_call_terminal = TRUE; else { c_token++; real_expression(); /* Silently ignore the request */ } } else if (almost_equals(c_token,"dash$ed") || equals(c_token,"solid")) { if (term->flags & TERM_CAN_DASH) ok_to_call_terminal = TRUE; else c_token++; } else if (!strcmp(term->name,"gif") && equals(c_token,"delay") && num_tokens==4) { ok_to_call_terminal = TRUE; } else { int_error(c_token,"This option cannot be changed using 'set termoption'"); } if (ok_to_call_terminal) { *term_options = 0; (term->options)(); } num_tokens = save_end_of_line; } /* process 'set tics' command */ static void set_tics() { unsigned int i = 0; TBOOLEAN axisset = FALSE; TBOOLEAN mirror_opt = FALSE; /* set to true if (no)mirror option specified) */ ++c_token; if (END_OF_COMMAND) { for (i = 0; i < AXIS_ARRAY_SIZE; ++i) axis_array[i].tic_in = TRUE; } while (!END_OF_COMMAND) { if (almost_equals(c_token, "ax$is")) { axisset = TRUE; for (i = 0; i < AXIS_ARRAY_SIZE; ++i) { axis_array[i].ticmode &= ~TICS_ON_BORDER; axis_array[i].ticmode |= TICS_ON_AXIS; } ++c_token; } else if (almost_equals(c_token, "bo$rder")) { for (i = 0; i < AXIS_ARRAY_SIZE; ++i) { axis_array[i].ticmode &= ~TICS_ON_AXIS; axis_array[i].ticmode |= TICS_ON_BORDER; } ++c_token; } else if (almost_equals(c_token, "mi$rror")) { for (i = 0; i < AXIS_ARRAY_SIZE; ++i) axis_array[i].ticmode |= TICS_MIRROR; mirror_opt = TRUE; ++c_token; } else if (almost_equals(c_token, "nomi$rror")) { for (i = 0; i < AXIS_ARRAY_SIZE; ++i) axis_array[i].ticmode &= ~TICS_MIRROR; mirror_opt = TRUE; ++c_token; } else if (almost_equals(c_token,"in$wards")) { for (i = 0; i < AXIS_ARRAY_SIZE; ++i) axis_array[i].tic_in = TRUE; ++c_token; } else if (almost_equals(c_token,"out$wards")) { for (i = 0; i < AXIS_ARRAY_SIZE; ++i) axis_array[i].tic_in = FALSE; ++c_token; } else if (almost_equals(c_token, "sc$ale")) { ++c_token; if (almost_equals(c_token, "def$ault")) { for (i = 0; i < AXIS_ARRAY_SIZE; ++i) { axis_array[i].ticscale = 1.0; axis_array[i].miniticscale = 0.5; } ++c_token; } else { double lticscale, lminiticscale; lticscale = real_expression(); if (equals(c_token, ",")) { ++c_token; lminiticscale = real_expression(); } else lminiticscale = 0.5 * lticscale; for (i = 0; i < AXIS_ARRAY_SIZE; ++i) { axis_array[i].ticscale = lticscale; axis_array[i].miniticscale = lminiticscale; } } } else if (almost_equals(c_token, "ro$tate")) { for (i = 0; i < AXIS_ARRAY_SIZE; ++i) { axis_array[i].tic_rotate = TEXT_VERTICAL; } ++c_token; if (equals(c_token, "by")) { int langle; ++c_token; langle = int_expression(); for (i = 0; i < AXIS_ARRAY_SIZE; ++i) axis_array[i].tic_rotate = langle; } } else if (almost_equals(c_token, "noro$tate")) { for (i = 0; i < AXIS_ARRAY_SIZE; ++i) axis_array[i].tic_rotate = 0; ++c_token; } else if (almost_equals(c_token, "l$eft")) { for (i = 0; i < AXIS_ARRAY_SIZE; ++i) { axis_array[i].label.pos = LEFT; axis_array[i].manual_justify = TRUE; } c_token++; } else if (almost_equals(c_token, "c$entre") || almost_equals(c_token, "c$enter")) { for (i = 0; i < AXIS_ARRAY_SIZE; ++i) { axis_array[i].label.pos = CENTRE; axis_array[i].manual_justify = TRUE; } c_token++; } else if (almost_equals(c_token, "ri$ght")) { for (i = 0; i < AXIS_ARRAY_SIZE; ++i) { axis_array[i].label.pos = RIGHT; axis_array[i].manual_justify = TRUE; } c_token++; } else if (almost_equals(c_token, "autoj$ustify")) { for (i = 0; i < AXIS_ARRAY_SIZE; ++i) axis_array[i].manual_justify = FALSE; c_token++; } else if (almost_equals(c_token, "off$set")) { struct position lpos; ++c_token; get_position_default(&lpos, character); for (i = 0; i < AXIS_ARRAY_SIZE; ++i) axis_array[i].ticdef.offset = lpos; } else if (almost_equals(c_token, "nooff$set")) { struct position tics_nooffset = { character, character, character, 0., 0., 0.}; ++c_token; for (i = 0; i < AXIS_ARRAY_SIZE; ++i) axis_array[i].ticdef.offset = tics_nooffset; } else if (almost_equals(c_token, "format")) { set_format(); } else if (almost_equals(c_token, "f$ont")) { ++c_token; /* Make sure they've specified a font */ if (!isstringvalue(c_token)) int_error(c_token,"expected font"); else { char *lfont = try_to_get_string(); for (i = 0; i < AXIS_ARRAY_SIZE; ++i) { free(axis_array[i].ticdef.font); axis_array[i].ticdef.font = gp_strdup(lfont); } free(lfont); } } else if (equals(c_token,"tc") || almost_equals(c_token,"text$color")) { struct t_colorspec lcolor; parse_colorspec(&lcolor, TC_FRAC); for (i = 0; i < AXIS_ARRAY_SIZE; ++i) axis_array[i].ticdef.textcolor = lcolor; } else if (equals(c_token,"front")) { grid_layer = 1; ++c_token; } else if (equals(c_token,"back")) { grid_layer = 0; ++c_token; } else if (!END_OF_COMMAND) { int_error(c_token, "extraneous arguments in set tics"); } } /* if tics are off and not set by axis, reset to default (border) */ for (i = 0; i < AXIS_ARRAY_SIZE; ++i) { if (((axis_array[i].ticmode & TICS_MASK) == NO_TICS) && (!axisset)) { if ((i == SECOND_X_AXIS) || (i == SECOND_Y_AXIS)) continue; /* don't switch on secondary axes by default */ axis_array[i].ticmode = TICS_ON_BORDER; if ((mirror_opt == FALSE) && ((i == FIRST_X_AXIS) || (i == FIRST_Y_AXIS) || (i == COLOR_AXIS))) { axis_array[i].ticmode |= TICS_MIRROR; } } } } /* process 'set ticscale' command */ static void set_ticscale() { double lticscale, lminiticscale; unsigned int i; int_warn(c_token, "Deprecated syntax - please use 'set tics scale' keyword"); ++c_token; if (END_OF_COMMAND) { lticscale = 1.0; lminiticscale = 0.5; } else { lticscale = real_expression(); if (END_OF_COMMAND) { lminiticscale = lticscale*0.5; } else { if (equals(c_token, ",")) ++c_token; lminiticscale = real_expression(); } } for (i = 0; i < AXIS_ARRAY_SIZE; ++i) { axis_array[i].ticscale = lticscale; axis_array[i].miniticscale = lminiticscale; } } /* process 'set ticslevel' command */ /* is datatype 'time' relevant here ? */ static void set_ticslevel() { c_token++; xyplane.z = real_expression(); xyplane.absolute = FALSE; } /* process 'set xyplane' command */ /* is datatype 'time' relevant here ? */ static void set_xyplane() { if (equals(++c_token, "at")) { c_token++; xyplane.z = real_expression(); xyplane.absolute = TRUE; return; } else if (!almost_equals(c_token,"rel$ative")) { c_token--; /* int_warn(NO_CARET, "deprecated syntax"); */ } set_ticslevel(); } /* Process 'set timefmt' command */ /* HBB 20000507: changed this to a per-axis setting. I.e. you can now * have separate timefmt parse strings, different axes */ static void set_timefmt() { int axis; char *newformat = NULL; c_token++; if (END_OF_COMMAND) { /* set all axes to default */ for (axis = 0; axis < AXIS_ARRAY_SIZE; axis++) strcpy(axis_array[axis].timefmt,TIMEFMT); } else { if ((axis = lookup_table(axisname_tbl, c_token)) >= 0) { c_token++; newformat = try_to_get_string(); if (newformat) strncpy(&(axis_array[axis].timefmt[0]), newformat, MAX_ID_LEN); } else { newformat = try_to_get_string(); if (newformat) for (axis = 0; axis < AXIS_ARRAY_SIZE; axis++) strncpy(&(axis_array[axis].timefmt[0]), newformat, MAX_ID_LEN); } if (!newformat) int_error(c_token, "time format string expected"); free(newformat); } } /* process 'set timestamp' command */ static void set_timestamp() { TBOOLEAN got_format = FALSE; char *new; c_token++; while (!END_OF_COMMAND) { if (almost_equals(c_token,"t$op")) { timelabel_bottom = FALSE; c_token++; continue; } else if (almost_equals(c_token, "b$ottom")) { timelabel_bottom = TRUE; c_token++; continue; } if (almost_equals(c_token,"r$otate")) { timelabel_rotate = TRUE; c_token++; continue; } else if (almost_equals(c_token, "n$orotate")) { timelabel_rotate = FALSE; c_token++; continue; } if (almost_equals(c_token,"off$set")) { c_token++; get_position_default(&(timelabel.offset),character); continue; } if (equals(c_token,"font")) { c_token++; new = try_to_get_string(); free(timelabel.font); timelabel.font = new; continue; } if (!got_format && ((new = try_to_get_string()))) { /* we have a format string */ free(timelabel.text); timelabel.text = new; got_format = TRUE; continue; } #ifdef BACKWARDS_COMPATIBLE /* The "font" keyword is new (v4.1), for backward compatibility we don't enforce it */ if (!END_OF_COMMAND && ((new = try_to_get_string()))) { free(timelabel.font); timelabel.font = new; continue; } /* The "offset" keyword is new (v4.1); for backward compatibility we don't enforce it */ get_position_default(&(timelabel.offset),character); #else int_error(c_token,"unrecognized option"); #endif } if (!(timelabel.text)) timelabel.text = gp_strdup(DEFAULT_TIMESTAMP_FORMAT); } /* process 'set view' command */ static void set_view() { int i; TBOOLEAN was_comma = TRUE; static const char errmsg1[] = "rot_%c must be in [0:%d] degrees range; view unchanged"; static const char errmsg2[] = "%sscale must be > 0; view unchanged"; double local_vals[4]; c_token++; if (equals(c_token,"map")) { splot_map = TRUE; c_token++; return; }; if (splot_map == TRUE) { splot_map_deactivate(); splot_map = FALSE; /* default is no map */ } if (almost_equals(c_token,"equal$_axes")) { c_token++; if (END_OF_COMMAND || equals(c_token,"xy")) { aspect_ratio_3D = 2; c_token++; } else if (equals(c_token,"xyz")) { aspect_ratio_3D = 3; c_token++; } return; } else if (almost_equals(c_token,"noequal$_axes")) { aspect_ratio_3D = 0; c_token++; return; } local_vals[0] = surface_rot_x; local_vals[1] = surface_rot_z; local_vals[2] = surface_scale; local_vals[3] = surface_zscale; for (i = 0; i < 4 && !(END_OF_COMMAND);) { if (equals(c_token,",")) { if (was_comma) i++; was_comma = TRUE; c_token++; } else { if (!was_comma) int_error(c_token, "',' expected"); local_vals[i] = real_expression(); i++; was_comma = FALSE; } } if (local_vals[0] < 0 || local_vals[0] > 360) int_error(c_token, errmsg1, 'x', 360); if (local_vals[1] < 0 || local_vals[1] > 360) int_error(c_token, errmsg1, 'z', 360); if (local_vals[2] < 1e-6) int_error(c_token, errmsg2, ""); if (local_vals[3] < 1e-6) int_error(c_token, errmsg2, "z"); surface_rot_x = local_vals[0]; surface_rot_z = local_vals[1]; surface_scale = local_vals[2]; surface_zscale = local_vals[3]; surface_lscale = log(surface_scale); } /* process 'set zero' command */ static void set_zero() { struct value a; c_token++; zero = magnitude(const_express(&a)); } /* process 'set {x|y|z|x2|y2}data' command */ static void set_timedata(AXIS_INDEX axis) { c_token++; axis_array[axis].datatype = DT_NORMAL; if (almost_equals(c_token,"t$ime")) { axis_array[axis].datatype = DT_TIMEDATE; c_token++; } } static void set_range(AXIS_INDEX axis) { c_token++; if (splot_map) splot_map_deactivate(); if(almost_equals(c_token,"re$store")) { /* ULIG */ c_token++; axis_array[axis].set_min = get_writeback_min(axis); axis_array[axis].set_max = get_writeback_max(axis); axis_array[axis].set_autoscale = AUTOSCALE_NONE; } else { if (!equals(c_token,"[")) int_error(c_token, "expecting '[' or 'restore'"); c_token++; axis_array[axis].set_autoscale = load_range(axis, &axis_array[axis].set_min,&axis_array[axis].set_max, axis_array[axis].set_autoscale); if (!equals(c_token,"]")) int_error(c_token, "expecting ']'"); c_token++; if (almost_equals(c_token, "rev$erse")) { ++c_token; axis_array[axis].range_flags |= RANGE_REVERSE; } else if (almost_equals(c_token, "norev$erse")) { ++c_token; axis_array[axis].range_flags &= ~RANGE_REVERSE; } if (almost_equals(c_token, "wr$iteback")) { ++c_token; axis_array[axis].range_flags |= RANGE_WRITEBACK; } else if (almost_equals(c_token, "nowri$teback")) { ++c_token; axis_array[axis].range_flags &= ~RANGE_WRITEBACK; } } if (splot_map) splot_map_activate(); } static void set_raxis() { raxis = TRUE; c_token++; } /* process 'set {xyz}zeroaxis' command */ static void set_zeroaxis(AXIS_INDEX axis) { c_token++; if (END_OF_COMMAND) axis_array[axis].zeroaxis.l_type = -1; else { int old_token = c_token; axis_array[axis].zeroaxis.l_type = LT_AXIS; lp_parse(&axis_array[axis].zeroaxis, TRUE, FALSE); if (old_token == c_token) axis_array[axis].zeroaxis.l_type = int_expression() - 1; } } /* process 'set zeroaxis' command */ static void set_allzeroaxis() { set_zeroaxis(FIRST_X_AXIS); axis_array[FIRST_Y_AXIS].zeroaxis = axis_array[FIRST_X_AXIS].zeroaxis; #ifndef BACKWARDS_COMPATIBLE axis_array[FIRST_Z_AXIS].zeroaxis = axis_array[FIRST_X_AXIS].zeroaxis; #endif } /*********** Support functions for set_command ***********/ /* * The set.c PROCESS_TIC_PROP macro has the following characteristics: * (a) options must in the correct order * (b) 'set xtics' (no option) resets only the interval (FREQ) * {it will also negate NO_TICS, see (d)} * (c) changing any property also resets the interval to automatic * (d) set no[xy]tics; set [xy]tics changes border to nomirror, rather * than to the default, mirror. * (e) effect of 'set no[]tics; set []tics border ...' is compiler * dependent; if '!(TICS)' is evaluated first, 'border' is an * undefined variable :-( * * This function replaces the macro, and introduces a new option * 'au$tofreq' to give somewhat different behaviour: * (a) no change * (b) 'set xtics' (no option) only affects NO_TICS; 'autofreq' resets * the interval calulation to automatic * (c) the interval mode is not affected by changing some other option * (d) if NO_TICS, set []tics will restore defaults (borders, mirror * where appropriate) * (e) if (NO_TICS), border option is processed. * * A 'default' option could easily be added to reset all options to * the initial values - mostly book-keeping. * * To retain tic properties after setting no[]tics may also be * straightforward (save value as negative), but requires changes * in other code ( e.g. for 'if (xtics)', use 'if (xtics > 0)' */ /* generates PROCESS_TIC_PROP strings from tic_side, e.g. "x2" * STRING, NOSTRING, MONTH, NOMONTH, DAY, NODAY, MINISTRING, NOMINI * "nox2t$ics" "nox2m$tics" "nox2d$tics" "nomx2t$ics" */ static int set_tic_prop(AXIS_INDEX axis) { int match = 0; /* flag, set by matching a tic command */ char nocmd[12]; /* fill w/ "no"+axis_name+suffix */ char *cmdptr, *sfxptr; (void) strcpy(nocmd, "no"); cmdptr = &nocmd[2]; (void) strcpy(cmdptr, axis_defaults[axis].name); sfxptr = &nocmd[strlen(nocmd)]; (void) strcpy(sfxptr, "t$ics"); /* STRING */ if (almost_equals(c_token, cmdptr)) { TBOOLEAN axisset = FALSE; TBOOLEAN mirror_opt = FALSE; /* set to true if (no)mirror option specified) */ axis_array[axis].ticdef.def.mix = FALSE; match = 1; ++c_token; do { if (almost_equals(c_token, "ax$is")) { axisset = TRUE; axis_array[axis].ticmode &= ~TICS_ON_BORDER; axis_array[axis].ticmode |= TICS_ON_AXIS; ++c_token; } else if (almost_equals(c_token, "bo$rder")) { axis_array[axis].ticmode &= ~TICS_ON_AXIS; axis_array[axis].ticmode |= TICS_ON_BORDER; ++c_token; } else if (almost_equals(c_token, "mi$rror")) { axis_array[axis].ticmode |= TICS_MIRROR; mirror_opt = TRUE; ++c_token; } else if (almost_equals(c_token, "nomi$rror")) { axis_array[axis].ticmode &= ~TICS_MIRROR; mirror_opt = TRUE; ++c_token; } else if (almost_equals(c_token, "in$wards")) { axis_array[axis].tic_in = TRUE; ++c_token; } else if (almost_equals(c_token, "out$wards")) { axis_array[axis].tic_in = FALSE; ++c_token; } else if (almost_equals(c_token, "sc$ale")) { ++c_token; if (almost_equals(c_token, "def$ault")) { axis_array[axis].ticscale = 1.0; axis_array[axis].miniticscale = 0.5; ++c_token; } else { axis_array[axis].ticscale = real_expression(); if (equals(c_token, ",")) { ++c_token; axis_array[axis].miniticscale = real_expression(); } else axis_array[axis].miniticscale = 0.5 * axis_array[axis].ticscale; } } else if (almost_equals(c_token, "ro$tate")) { axis_array[axis].tic_rotate = TEXT_VERTICAL; ++c_token; if (equals(c_token, "by")) { c_token++; axis_array[axis].tic_rotate = int_expression(); } } else if (almost_equals(c_token, "noro$tate")) { axis_array[axis].tic_rotate = 0; ++c_token; } else if (almost_equals(c_token, "off$set")) { ++c_token; get_position_default(&axis_array[axis].ticdef.offset, character); } else if (almost_equals(c_token, "nooff$set")) { struct position tics_nooffset = { character, character, character, 0., 0., 0.}; ++c_token; axis_array[axis].ticdef.offset = tics_nooffset; } else if (almost_equals(c_token, "l$eft")) { axis_array[axis].label.pos = LEFT; axis_array[axis].manual_justify = TRUE; c_token++; } else if (almost_equals(c_token, "c$entre") || almost_equals(c_token, "c$enter")) { axis_array[axis].label.pos = CENTRE; axis_array[axis].manual_justify = TRUE; c_token++; } else if (almost_equals(c_token, "ri$ght")) { axis_array[axis].label.pos = RIGHT; axis_array[axis].manual_justify = TRUE; c_token++; } else if (almost_equals(c_token, "autoj$ustify")) { axis_array[axis].manual_justify = FALSE; c_token++; } else if (almost_equals(c_token,"range$limited")) { axis_array[axis].ticdef.rangelimited = TRUE; ++c_token; } else if (almost_equals(c_token,"norange$limited")) { axis_array[axis].ticdef.rangelimited = FALSE; ++c_token; } else if (almost_equals(c_token, "f$ont")) { ++c_token; /* Make sure they've specified a font */ if (!isstringvalue(c_token)) int_error(c_token,"expected font"); else { free(axis_array[axis].ticdef.font); axis_array[axis].ticdef.font = NULL; axis_array[axis].ticdef.font = try_to_get_string(); } } else if (equals(c_token,"format")) { char *format; ++c_token; if (!((format = try_to_get_string()))) int_error(c_token,"expected format"); strncpy(axis_array[axis].formatstring, format, sizeof(axis_array[axis].formatstring)); free(format); axis_array[axis].format_is_numeric = looks_like_numeric(axis_array[axis].formatstring); } else if (equals(c_token,"tc") || almost_equals(c_token,"text$color")) { parse_colorspec(&axis_array[axis].ticdef.textcolor, axis == FIRST_Z_AXIS ? TC_Z : TC_FRAC); } else if (almost_equals(c_token, "au$tofreq")) { /* auto tic interval */ ++c_token; if (!axis_array[axis].ticdef.def.mix) { free_marklist(axis_array[axis].ticdef.def.user); axis_array[axis].ticdef.def.user = NULL; } axis_array[axis].ticdef.type = TIC_COMPUTED; } else if (equals(c_token,"add")) { ++c_token; axis_array[axis].ticdef.def.mix = TRUE; } else if (!END_OF_COMMAND) { load_tics(axis); } } while (!END_OF_COMMAND); /* if tics are off and not set by axis, reset to default (border) */ if (((axis_array[axis].ticmode & TICS_MASK) == NO_TICS) && (!axisset)) { axis_array[axis].ticmode |= TICS_ON_BORDER; if ((mirror_opt == FALSE) && ((axis == FIRST_X_AXIS) || (axis == FIRST_Y_AXIS) || (axis == COLOR_AXIS))) { axis_array[axis].ticmode |= TICS_MIRROR; } } } if (almost_equals(c_token, nocmd)) { /* NOSTRING */ axis_array[axis].ticmode &= ~TICS_MASK; c_token++; match = 1; } /* other options */ (void) strcpy(sfxptr, "m$tics"); /* MONTH */ if (almost_equals(c_token, cmdptr)) { if (!axis_array[axis].ticdef.def.mix) { free_marklist(axis_array[axis].ticdef.def.user); axis_array[axis].ticdef.def.user = NULL; } axis_array[axis].ticdef.type = TIC_MONTH; ++c_token; match = 1; } if (almost_equals(c_token, nocmd)) { /* NOMONTH */ axis_array[axis].ticdef.type = TIC_COMPUTED; ++c_token; match = 1; } (void) strcpy(sfxptr, "d$tics"); /* DAYS */ if (almost_equals(c_token, cmdptr)) { match = 1; if (!axis_array[axis].ticdef.def.mix) { free_marklist(axis_array[axis].ticdef.def.user); axis_array[axis].ticdef.def.user = NULL; } axis_array[axis].ticdef.type = TIC_DAY; ++c_token; } if (almost_equals(c_token, nocmd)) { /* NODAYS */ axis_array[axis].ticdef.type = TIC_COMPUTED; ++c_token; match = 1; } *cmdptr = 'm'; (void) strcpy(cmdptr + 1, axis_defaults[axis].name); (void) strcat(cmdptr, "t$ics"); /* MINISTRING */ if (almost_equals(c_token, cmdptr)) { c_token++; match = 1; if (END_OF_COMMAND) { axis_array[axis].minitics = MINI_AUTO; } else if (almost_equals(c_token, "def$ault")) { axis_array[axis].minitics = MINI_DEFAULT; ++c_token; } else { axis_array[axis].mtic_freq = floor(real_expression()); axis_array[axis].minitics = MINI_USER; } } if (almost_equals(c_token, nocmd)) { /* NOMINI */ axis_array[axis].minitics = MINI_OFF; c_token++; match = 1; } return (match); } /* process a 'set {x/y/z}label command */ /* set {x/y/z}label {label_text} {offset {x}{,y}} {<fontspec>} {<textcolor>} */ static void set_xyzlabel(text_label *label) { char *text = NULL; c_token++; if (END_OF_COMMAND) { /* no label specified */ free(label->text); label->text = NULL; return; } parse_label_options(label); if (!END_OF_COMMAND) { text = try_to_get_string(); if (text) { free(label->text); label->text = text; } #ifdef BACKWARDS_COMPATIBLE if (isanumber(c_token) || equals(c_token, "-")) { /* Parse offset with missing keyword "set xlabel 'foo' 1,2 "*/ get_position_default(&(label->offset),character); } #endif } parse_label_options(label); } /* * Change or insert a new linestyle in a list of line styles. * Supports the old 'set linestyle' command (backwards-compatible) * and the new "set style line" and "set linetype" commands. */ static void set_linestyle(struct linestyle_def **head) { struct linestyle_def *this_linestyle = NULL; struct linestyle_def *new_linestyle = NULL; struct linestyle_def *prev_linestyle = NULL; int tag; c_token++; /* get tag */ if (END_OF_COMMAND || ((tag = int_expression()) <= 0)) int_error(c_token, "tag must be > zero"); /* Check if linestyle is already defined */ for (this_linestyle = *head; this_linestyle != NULL; prev_linestyle = this_linestyle, this_linestyle = this_linestyle->next) if (tag <= this_linestyle->tag) break; if (this_linestyle == NULL || tag != this_linestyle->tag) { /* Default style is based on linetype with the same tag id */ struct lp_style_type loc_lp = DEFAULT_LP_STYLE_TYPE; loc_lp.l_type = tag - 1; loc_lp.p_type = tag - 1; new_linestyle = gp_alloc(sizeof(struct linestyle_def), "linestyle"); if (prev_linestyle != NULL) prev_linestyle->next = new_linestyle; /* add it to end of list */ else *head = new_linestyle; /* make it start of list */ new_linestyle->tag = tag; new_linestyle->next = this_linestyle; new_linestyle->lp_properties = loc_lp; this_linestyle = new_linestyle; } if (almost_equals(c_token, "def$ault")) { delete_linestyle(head, prev_linestyle, this_linestyle); c_token++; } else /* pick up a line spec; dont allow ls, do allow point type */ lp_parse(&this_linestyle->lp_properties, FALSE, TRUE); if (!END_OF_COMMAND) int_error(c_token,"Extraneous arguments to set %s", head == &first_perm_linestyle ? "linetype" : "style line"); } /* * Delete linestyle from linked list. * Called with pointers to the head of the list, * to the previous linestyle (not strictly necessary), * and to the linestyle to delete. */ void delete_linestyle(struct linestyle_def **head, struct linestyle_def *prev, struct linestyle_def *this) { if (this != NULL) { /* there really is something to delete */ if (this == *head) *head = this->next; else prev->next = this->next; free(this); } } /* ======================================================== */ /* process a 'set arrowstyle' command */ /* set style arrow {tag} {nohead|head|backhead|heads} {size l,a{,b}} {{no}filled} {linestyle...} {layer n}*/ static void set_arrowstyle() { struct arrowstyle_def *this_arrowstyle = NULL; struct arrowstyle_def *new_arrowstyle = NULL; struct arrowstyle_def *prev_arrowstyle = NULL; struct arrow_style_type loc_arrow; int tag; default_arrow_style(&loc_arrow); c_token++; /* get tag */ if (!END_OF_COMMAND) { /* must be a tag expression! */ tag = int_expression(); if (tag <= 0) int_error(c_token, "tag must be > zero"); } else tag = assign_arrowstyle_tag(); /* default next tag */ /* search for arrowstyle */ if (first_arrowstyle != NULL) { /* skip to last arrowstyle */ for (this_arrowstyle = first_arrowstyle; this_arrowstyle != NULL; prev_arrowstyle = this_arrowstyle, this_arrowstyle = this_arrowstyle->next) /* is this the arrowstyle we want? */ if (tag <= this_arrowstyle->tag) break; } if (this_arrowstyle == NULL || tag != this_arrowstyle->tag) { /* adding the arrowstyle */ new_arrowstyle = (struct arrowstyle_def *) gp_alloc(sizeof(struct arrowstyle_def), "arrowstyle"); default_arrow_style(&(new_arrowstyle->arrow_properties)); if (prev_arrowstyle != NULL) prev_arrowstyle->next = new_arrowstyle; /* add it to end of list */ else first_arrowstyle = new_arrowstyle; /* make it start of list */ new_arrowstyle->arrow_properties.tag = tag; new_arrowstyle->tag = tag; new_arrowstyle->next = this_arrowstyle; this_arrowstyle = new_arrowstyle; } if (END_OF_COMMAND) this_arrowstyle->arrow_properties = loc_arrow; else if (almost_equals(c_token, "def$ault")) { this_arrowstyle->arrow_properties = loc_arrow; c_token++; } else /* pick up a arrow spec : dont allow arrowstyle */ arrow_parse(&this_arrowstyle->arrow_properties, FALSE); if (!END_OF_COMMAND) int_error(c_token, "extraneous or out-of-order arguments in set arrowstyle"); } /* assign a new arrowstyle tag * arrowstyles are kept sorted by tag number, so this is easy * returns the lowest unassigned tag number */ static int assign_arrowstyle_tag() { struct arrowstyle_def *this; int last = 0; /* previous tag value */ for (this = first_arrowstyle; this != NULL; this = this->next) if (this->tag == last + 1) last++; else break; return (last + 1); } /* For set [xy]tics... command */ static void load_tics(AXIS_INDEX axis) { if (equals(c_token, "(")) { /* set : TIC_USER */ if (equals(++c_token, ")")) c_token++; else load_tic_user(axis); } else { /* series : TIC_SERIES */ load_tic_series(axis); } } /* load TIC_USER definition */ /* (tic[,tic]...) * where tic is ["string"] value [level] * Left paren is already scanned off before entry. */ static void load_tic_user(AXIS_INDEX axis) { char *ticlabel; double ticposition; /* Free any old tic labels */ if (!axis_array[axis].ticdef.def.mix && !(set_iterator && set_iterator->iteration)) { free_marklist(axis_array[axis].ticdef.def.user); axis_array[axis].ticdef.def.user = NULL; } while (!END_OF_COMMAND) { int ticlevel=0; int save_token; /* syntax is ( {'format'} value {level} {, ...} ) * but for timedata, the value itself is a string, which * complicates things somewhat */ /* has a string with it? */ save_token = c_token; ticlabel = try_to_get_string(); if (ticlabel && axis_array[axis].datatype == DT_TIMEDATE && (equals(c_token,",") || equals(c_token,")"))) { c_token = save_token; free(ticlabel); ticlabel = NULL; } /* in any case get the value */ GET_NUM_OR_TIME(ticposition, axis); if (!END_OF_COMMAND && !equals(c_token, ",") && !equals(c_token, ")")) { ticlevel = int_expression(); /* tic level */ } /* add to list */ add_tic_user(axis, ticlabel, ticposition, ticlevel); free(ticlabel); /* expect "," or ")" here */ if (!END_OF_COMMAND && equals(c_token, ",")) c_token++; /* loop again */ else break; /* hopefully ")" */ } if (END_OF_COMMAND || !equals(c_token, ")")) { free_marklist(axis_array[axis].ticdef.def.user); axis_array[axis].ticdef.def.user = NULL; int_error(c_token, "expecting right parenthesis )"); } c_token++; } void free_marklist(struct ticmark *list) { while (list != NULL) { struct ticmark *freeable = list; list = list->next; if (freeable->label != NULL) free(freeable->label); free(freeable); } } /* Remove tic labels that were read from a datafile during a previous plot * via the 'using xtics(n)' mechanism. These have tick level < 0. */ struct ticmark * prune_dataticks(struct ticmark *list) { struct ticmark a = {0.0,NULL,0,NULL}; struct ticmark *b = &a; struct ticmark *tmp; while (list) { if (list->level < 0) { free(list->label); tmp = list->next; free(list); list = tmp; } else { b->next = list; b = list; list = list->next; } } b->next = NULL; return a.next; } /* load TIC_SERIES definition */ /* [start,]incr[,end] */ static void load_tic_series(AXIS_INDEX axis) { double start, incr, end; int incr_token; struct ticdef *tdef = &axis_array[axis].ticdef; GET_NUM_OR_TIME(start, axis); if (!equals(c_token, ",")) { /* only step specified */ incr = start; start = -VERYLARGE; end = VERYLARGE; } else { c_token++; incr_token = c_token; GET_NUM_OR_TIME(incr, axis); if (!equals(c_token, ",")) { /* only step and increment specified */ end = VERYLARGE; } else { c_token++; GET_NUM_OR_TIME(end, axis); } if (start < end && incr <= 0) int_error(incr_token, "increment must be positive"); if (start > end && incr >= 0) int_error(incr_token, "increment must be negative"); if (start > end) { /* put in order */ double numtics = floor((end * (1 + SIGNIF) - start) / incr); end = start; start = end + numtics * incr; incr = -incr; } } if (!tdef->def.mix) { /* remove old list */ free_marklist(tdef->def.user); tdef->def.user = NULL; } tdef->type = TIC_SERIES; tdef->def.series.start = start; tdef->def.series.incr = incr; tdef->def.series.end = end; } /* return 1 if format looks like a numeric format * ie more than one %{efg}, or %something-else */ /* FIXME HBB 20000430: as coded, this will only check the *first* * format string, not all of them. */ static int looks_like_numeric(char *format) { if (!(format = strchr(format, '%'))) return 0; while (++format && (*format == ' ' || *format == '-' || *format == '+' || *format == '#')) ; /* do nothing */ while (isdigit((unsigned char) *format) || *format == '.') ++format; return (*format == 'f' || *format == 'g' || *format == 'e'); } #ifdef BACKWARDS_COMPATIBLE /* * Backwards compatibility ... */ static void set_nolinestyle() { struct linestyle_def *this, *prev; int tag; if (END_OF_COMMAND) { /* delete all linestyles */ while (first_linestyle != NULL) delete_linestyle(&first_linestyle, NULL, first_linestyle); } else { /* get tag */ tag = int_expression(); if (!END_OF_COMMAND) int_error(c_token, "extraneous arguments to set nolinestyle"); for (this = first_linestyle, prev = NULL; this != NULL; prev = this, this = this->next) { if (this->tag == tag) { delete_linestyle(&first_linestyle, prev, this); return; /* exit, our job is done */ } } int_error(c_token, "linestyle not found"); } } #endif /* HBB 20001021: new function: make label texts decoratable with numbers */ static char * fill_numbers_into_string(char *pattern) { size_t pattern_length = strlen(pattern) + 1; size_t newlen = pattern_length; char *output = gp_alloc(newlen, "fill_numbers output buffer"); size_t output_end = 0; do { /* loop over string/value pairs */ double value; if (isstring(++c_token)) { free(output); free(pattern); int_error(c_token, "constant expression expected"); } /* assume it's a numeric expression, concatenate it to output * string: parse value, enlarge output buffer, and gprintf() * it. */ value = real_expression(); newlen += pattern_length + 30; output = gp_realloc(output, newlen, "fill_numbers next number"); gprintf(output + output_end, newlen - output_end, pattern, 1.0, value); output_end += strlen(output + output_end); /* allow a string to follow, after another comma: */ if (END_OF_COMMAND || !equals(c_token, ",")) { /* no comma followed the number --> we're done. Jump out * directly, as falling out of the while loop means * something slightly different. */ free(pattern); return output; } c_token++; if (!END_OF_COMMAND && isstring(c_token)) { size_t length = token_len(c_token); if (length >= pattern_length) pattern = gp_realloc(pattern, pattern_length = length, "fill_numbers resize pattern"); quote_str(pattern, c_token, length); c_token++; } else { free(pattern); free(output); int_error(c_token, "string expected"); } /* if (string after comma) */ } while (!END_OF_COMMAND && equals(c_token, ",")); /* came out here --> the last element was a string, not a number. * that means that there is a string in pattern which was not yet * copied to 'output' */ output = gp_realloc(output, newlen += pattern_length, "fill_numbers closing"); strcpy(output + output_end, pattern); free(pattern); return output; } /* * new_text_label() allocates and initializes a text_label structure. * This routine is also used by the plot and splot with labels commands. */ struct text_label * new_text_label(int tag) { struct text_label *new; struct position default_offset = { character, character, character, 0., 0., 0. }; new = gp_alloc( sizeof(struct text_label), "text_label"); new->next = NULL; new->tag = tag; new->place = default_position; new->pos = LEFT; new->rotate = 0; new->layer = 0; new->text = (char *)NULL; new->font = (char *)NULL; new->textcolor.type = TC_DEFAULT; new->lp_properties.pointflag = 0; new->lp_properties.p_type = 1; new->offset = default_offset; new->noenhanced = FALSE; return(new); } /* * Parse the sub-options for label style and placement. * This is called from set_label, and from plot2d and plot3d * to handle options for 'plot with labels' */ void parse_label_options( struct text_label *this_label ) { struct position pos; char *font = NULL; enum JUSTIFY just = LEFT; int rotate = 0; TBOOLEAN set_position = FALSE, set_just = FALSE, set_rot = FALSE, set_font = FALSE, set_offset = FALSE, set_layer = FALSE, set_textcolor = FALSE; int layer = 0; TBOOLEAN axis_label = (this_label->tag == -2); struct position offset = { character, character, character, 0., 0., 0. }; t_colorspec textcolor = {TC_DEFAULT,0,0.0}; struct lp_style_type loc_lp = DEFAULT_LP_STYLE_TYPE; loc_lp.pointflag = -2; /* Now parse the label format and style options */ while (!END_OF_COMMAND) { /* get position */ if (! set_position && equals(c_token, "at") && !axis_label) { c_token++; get_position(&pos); set_position = TRUE; continue; } /* get justification */ if (! set_just) { if (almost_equals(c_token, "l$eft")) { just = LEFT; c_token++; set_just = TRUE; continue; } else if (almost_equals(c_token, "c$entre") || almost_equals(c_token, "c$enter")) { just = CENTRE; c_token++; set_just = TRUE; continue; } else if (almost_equals(c_token, "r$ight")) { just = RIGHT; c_token++; set_just = TRUE; continue; } } /* get rotation (added by RCC) */ if (almost_equals(c_token, "rot$ate")) { c_token++; set_rot = TRUE; rotate = this_label->rotate; if (equals(c_token, "by")) { c_token++; rotate = int_expression(); } else if (almost_equals(c_token,"para$llel")) { if (this_label->tag >= 0) int_error(c_token,"invalid option"); c_token++; this_label->tag = ROTATE_IN_3D_LABEL_TAG; } else rotate = TEXT_VERTICAL; continue; } else if (almost_equals(c_token, "norot$ate")) { rotate = 0; c_token++; set_rot = TRUE; if (this_label->tag == ROTATE_IN_3D_LABEL_TAG) this_label->tag = NONROTATABLE_LABEL_TAG; continue; } /* get font (added by DJL) */ if (! set_font && equals(c_token, "font")) { c_token++; if ((font = try_to_get_string())) { set_font = TRUE; continue; } else int_error(c_token, "'fontname,fontsize' expected"); } /* get front/back (added by JDP) */ if (! set_layer && !axis_label) { if (equals(c_token, "back")) { layer = 0; c_token++; set_layer = TRUE; continue; } else if (equals(c_token, "front")) { layer = 1; c_token++; set_layer = TRUE; continue; } } if (loc_lp.pointflag == -2 && !axis_label) { if (almost_equals(c_token, "po$int")) { int stored_token = ++c_token; struct lp_style_type tmp_lp; loc_lp.pointflag = 1; tmp_lp = loc_lp; lp_parse(&tmp_lp, TRUE, TRUE); if (stored_token != c_token) loc_lp = tmp_lp; continue; } else if (almost_equals(c_token, "nopo$int")) { loc_lp.pointflag = 0; c_token++; continue; } } if (! set_offset && almost_equals(c_token, "of$fset")) { c_token++; get_position_default(&offset,character); set_offset = TRUE; continue; } if ((equals(c_token,"tc") || almost_equals(c_token,"text$color")) && ! set_textcolor ) { parse_colorspec( &textcolor, TC_VARIABLE ); set_textcolor = TRUE; continue; } if (almost_equals(c_token,"noenh$anced")) { this_label->noenhanced = TRUE; c_token++; continue; } else if (almost_equals(c_token,"enh$anced")) { this_label->noenhanced = FALSE; c_token++; continue; } /* Coming here means that none of the previous 'if's struck * its "continue" statement, i.e. whatever is in the command * line is forbidden by the 'set label' command syntax. * On the other hand, 'plot with labels' may have additional stuff coming up. */ break; } /* while(!END_OF_COMMAND) */ /* HBB 20011120: this chunk moved here, behind the while() * loop. Only after all options have been parsed it's safe to * overwrite the position if none has been specified. */ if (!set_position) pos = default_position; /* OK! copy the requested options into the label */ if (set_position) this_label->place = pos; if (set_just) this_label->pos = just; if (set_rot) this_label->rotate = rotate; if (set_layer) this_label->layer = layer; if (set_font) this_label->font = font; if (set_textcolor) this_label->textcolor = textcolor; if (loc_lp.pointflag >= 0) this_label->lp_properties = loc_lp; if (set_offset) this_label->offset = offset; /* Make sure the z coord and the z-coloring agree */ if (this_label->textcolor.type == TC_Z) this_label->textcolor.value = this_label->place.z; } /* <histogramstyle> = {clustered {gap <n>} | rowstacked | columnstacked */ /* errorbars {gap <n>} {linewidth <lw>}} */ /* {title <title_options>} */ static void parse_histogramstyle( histogram_style *hs, t_histogram_type def_type, int def_gap) { text_label title_specs = EMPTY_LABELSTRUCT; /* Set defaults */ hs->type = def_type; hs->gap = def_gap; if (END_OF_COMMAND) return; if (!equals(c_token,"hs") && !almost_equals(c_token,"hist$ogram")) return; c_token++; while (!END_OF_COMMAND) { if (almost_equals(c_token, "clust$ered")) { hs->type = HT_CLUSTERED; c_token++; } else if (almost_equals(c_token, "error$bars")) { hs->type = HT_ERRORBARS; c_token++; } else if (almost_equals(c_token, "rows$tacked")) { hs->type = HT_STACKED_IN_LAYERS; c_token++; } else if (almost_equals(c_token, "columns$tacked")) { hs->type = HT_STACKED_IN_TOWERS; c_token++; } else if (equals(c_token, "gap")) { if (isanumber(++c_token)) hs->gap = int_expression(); else int_error(c_token,"expected gap value"); } else if (almost_equals(c_token, "ti$tle")) { title_specs.offset = hs->title.offset; set_xyzlabel(&title_specs); hs->title.textcolor = title_specs.textcolor; hs->title.offset = title_specs.offset; /* EAM FIXME - could allocate space and copy parsed font instead */ hs->title.font = axis_array[FIRST_X_AXIS].label.font; } else if ((equals(c_token,"lw") || almost_equals(c_token,"linew$idth")) && (hs->type == HT_ERRORBARS)) { c_token++; hs->bar_lw = real_expression(); if (hs->bar_lw <= 0) hs->bar_lw = 1; } else /* We hit something unexpected */ break; } } /* Utility routine to propagate rrange into corresponding x and y ranges */ void rrange_to_xy() { double min; if (R_AXIS.set_autoscale & AUTOSCALE_MIN) min = 0; else min = R_AXIS.set_min; if (R_AXIS.set_autoscale & AUTOSCALE_MAX) { X_AXIS.set_autoscale = AUTOSCALE_BOTH; Y_AXIS.set_autoscale = AUTOSCALE_BOTH; } else { X_AXIS.set_autoscale = AUTOSCALE_NONE; Y_AXIS.set_autoscale = AUTOSCALE_NONE; if (R_AXIS.log) X_AXIS.set_max = AXIS_DO_LOG(POLAR_AXIS, R_AXIS.set_max) - AXIS_DO_LOG(POLAR_AXIS, min); else X_AXIS.set_max = R_AXIS.set_max - min; Y_AXIS.set_max = X_AXIS.set_max; Y_AXIS.set_min = X_AXIS.set_min = -X_AXIS.set_max; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/beos/�����������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340010�011633� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/beos/GPWindow.cpp�����������������������������������������������������������������0000644�0004711�0000144�00000020635�10037021064�014051� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include <Application.h> #include <Messenger.h> #include <Message.h> #include <Alert.h> #include <Roster.h> #include <Window.h> #include <View.h> #include <MenuBar.h> #include <Menu.h> #include <MenuField.h> #include <Entry.h> #include <Path.h> #include <Box.h> #include <MenuItem.h> #include <TextView.h> #include <FilePanel.h> #include <ScrollView.h> #include <OutlineListView.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include "constants.h" #include "GPApp.h" #include "GPBitmap.h" #include "GPView.h" #include "GPWindow.h" // Constructs the window we'll be drawing into. // GPWindow::GPWindow(BRect frame) : BWindow(frame, " ", B_TITLED_WINDOW, 0) { _InitWindow(); Show(); } // Create a window from a file. // GPWindow::GPWindow(BRect frame, plot_struct *plot) : BWindow(frame, "Untitled ", B_TITLED_WINDOW, 0) { _InitWindow(); Show(); } void GPWindow::_InitWindow(void) { BRect r, rtool, plotframe; BMenu *menu; BMenuItem *item; // Initialize variables savemessage = NULL; // No saved path yet r = rtool = plotframe = Bounds(); // rtool = Bounds(); // plotframe = Bounds(); // Add the menu bar menubar = new BMenuBar(r, "menu_bar"); // Add File menu to menu bar menu = new BMenu("File"); menu->AddItem(new BMenuItem("New", new BMessage(MENU_FILE_NEW), 'N')); menu->AddItem(item=new BMenuItem("Open" B_UTF8_ELLIPSIS, new BMessage(MENU_FILE_OPEN), 'O')); item->SetTarget(be_app); menu->AddItem(new BMenuItem("Close", new BMessage(MENU_FILE_CLOSE), 'W')); menu->AddSeparatorItem(); menu->AddItem(saveitem=new BMenuItem("Save", new BMessage(MENU_FILE_SAVE), 'S')); saveitem->SetEnabled(false); menu->AddItem(new BMenuItem("Save as" B_UTF8_ELLIPSIS, new BMessage(MENU_FILE_SAVEAS))); menu->AddSeparatorItem(); menu->AddItem(item=new BMenuItem("Page Setup" B_UTF8_ELLIPSIS, new BMessage(MENU_FILE_PAGESETUP))); item->SetEnabled(false); menu->AddItem(item=new BMenuItem("Print" B_UTF8_ELLIPSIS, new BMessage(MENU_FILE_PRINT), 'P')); item->SetEnabled(false); menu->AddSeparatorItem(); menu->AddItem(new BMenuItem("Quit", new BMessage(MENU_FILE_QUIT), 'Q')); menubar->AddItem(menu); // Attach the menu bar to the window AddChild(menubar); // Add the plot view // plotframe.left +=rtool.right+5; plotframe.top = menubar->Bounds().bottom+2; // plotframe.right -= B_V_SCROLL_BAR_WIDTH; // plotframe.bottom -= B_H_SCROLL_BAR_HEIGHT; BRect plotrect = plotframe; plotrect.OffsetTo(B_ORIGIN); r.InsetBy(3.0,3.0); plotview = new GPView(plotframe, B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_PULSE_NEEDED, NULL); // plotview = new BView(plotframe, "test", B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_PULSE_NEEDED); AddChild(plotview); //help menu menu = new BMenu("Help"); menu->AddItem(new BMenuItem("Help",new BMessage(MENU_HELP_REQUESTED))); menu->AddItem(new BMenuItem("About...",new BMessage(MENU_HELP_ABOUT))); menubar->AddItem(menu); // Create the save filepanel for this window savePanel = new BFilePanel(B_SAVE_PANEL, new BMessenger(this), NULL, B_FILE_NODE, false); // Tell the application that there's one more window // and get the number for this untitled window. Register(true); Minimize(false); // So Show() doesn't really make it visible } // // GPWindow::FrameResized // // Adjust the size of the BTextView's text rectangle // when the window is resized. // void GPWindow::FrameResized(float width, float height) { BRect plotrect = plotview->Bounds(); plotrect.right = plotrect.left + (width - 3.0); // plotview->SetTextRect(plotrect); } // // GPWindow::~GPWindow // // Destruct the window. This calls Unregister(). // GPWindow::~GPWindow() { Unregister(); if (savemessage) { delete savemessage; } delete savePanel; } // // GPWindow::MessageReceived // // Called when a message is received by our // application. // void GPWindow::MessageReceived(BMessage *message) { switch(message->what) { case WINDOW_REGISTRY_ADDED: { char s[22]; BRect rect; if (message->FindInt32("new_window_number", &window_id) == B_OK) { if (!savemessage) { // if it's untitled sprintf(s, "File%ld.html", window_id); SetTitle(s); } } if (message->FindRect("rect", &rect) == B_OK) { MoveTo(rect.LeftTop()); ResizeTo(rect.Width(), rect.Height()); } Minimize(false); } break; case MENU_FILE_NEW: { BRect r; r = Frame(); new GPWindow(r); } break; case MENU_FILE_CLOSE: Quit(); break; case MENU_FILE_QUIT: be_app->PostMessage(B_QUIT_REQUESTED); break; case MENU_FILE_SAVEAS: savePanel->Show(); break; case MENU_FILE_SAVE: Save(NULL); break; case B_SAVE_REQUESTED: Save(message); break; case MENU_HELP_REQUESTED:{ int arg_c; char **_arg; arg_c=1; _arg = (char **)malloc(sizeof(char *) * (arg_c+ 1)); _arg[0]="/boot/home/peojects/WebEditor/help.html"; _arg[1]=NULL; be_roster->Launch("application/x-vnd.Be-NPOS",arg_c,_arg,NULL); free(_arg); } break; case MENU_HELP_ABOUT:{ BAlert *alert; alert= new BAlert("About ", "WebEditor for BeOS™\n©François Jouen 1999.\ne-mail:jouen@epeire.univ-rouen.fr", "OK"); alert->Go(); } break; // case B_MOUSE_UP: // printf("gor something\n"); // break; case bmsgNewCmd: case bmsgClrCmd: case bmsgBitmapDirty: case bmsgBitmapResize: // printf("gor something\n"); plotview->MessageReceived(message); break; default: BWindow::MessageReceived(message); break; } } // // GPWindow::Register // // Since MessageWorld can have multiple windows and // we need to know when there aren't any left so the // application can be shut down, this function is used // to tell the application that a new window has been // opened. // // If the need_id argument is true, we'll specify true // for the "need_id" field in the message we send; this // will cause the application to send back a // WINDOW_REGISTRY_ADDED message containing the window's // unique ID number. If this argument is false, we won't // request an ID. // void GPWindow::Register(bool need_id) { BMessenger messenger(APP_SIGNATURE); BMessage message(WINDOW_REGISTRY_ADD); message.AddBool("need_id", need_id); messenger.SendMessage(&message, this); } // // GPWindow::Unregister // // Unregisters a window. This tells the application that // one fewer windows are open. The application will // automatically quit if the count goes to zero because // of this call. // void GPWindow::Unregister(void) { BMessenger messenger(APP_SIGNATURE); messenger.SendMessage(new BMessage(WINDOW_REGISTRY_SUB)); } // // GPWindow::QuitRequested // // Here we just give permission to close the window. // bool GPWindow::QuitRequested() { return true; } // // GPWindow::Save // // Save the contents of the window. The message specifies // where to save it (see BFilePanel in the Storage Kit chapter // of the Be Book). // status_t GPWindow::Save(BMessage *message) { entry_ref ref; // For the directory to save into status_t err = B_OK; // For the return code return err; } ���������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/beos/constants.h������������������������������������������������������������������0000644�0004711�0000144�00000004735�10037021064�014037� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef __GNUPLCONSTANTS_H__ #define __GNUPLCONSTANTS_H__ // Messages for window registry with application const uint32 WINDOW_REGISTRY_ADD = 'WRad'; const uint32 WINDOW_REGISTRY_SUB = 'WRsb'; const uint32 WINDOW_REGISTRY_ADDED = 'WRdd'; const uint32 OUTLINE_REQUESTED = 'OuRq'; // Messages for menu commands const uint32 MENU_FILE_NEW = 'MFnw'; const uint32 MENU_FILE_OPEN = 'MFop'; const uint32 MENU_FILE_CLOSE = 'MFcl'; const uint32 MENU_FILE_BASIC = 'MFba'; const uint32 MENU_FILE_SAVE = 'MFsv'; const uint32 MENU_FILE_SAVEAS = 'MFsa'; const uint32 MENU_FILE_PAGESETUP = 'MFps'; const uint32 MENU_FILE_PRINT = 'MFpr'; const uint32 MENU_FILE_QUIT = 'MFqu'; const uint32 MENU_EDIT_CLEAR = 'MEcl'; const uint32 MENU_TOOL_PREVIEW = 'MTpw'; const uint32 MENU_HELP_ABOUT = 'MHab'; const uint32 MENU_HELP_REQUESTED = 'MHrq'; const uint32 bmsgBitmapDirty = 'Mbpd'; const uint32 bmsgBitmapResize = 'Mbrz'; const uint32 bmsgNewCmd = 'Mcmd'; const uint32 bmsgClrCmd = 'Mclr'; #endif �����������������������������������gnuplot-4.6.4/src/beos/GPApp.cpp��������������������������������������������������������������������0000644�0004711�0000144�00000015660�10037021063�013323� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include <Application.h> #include <Messenger.h> #include <Message.h> #include <Roster.h> #include <Window.h> #include <View.h> #include <MenuBar.h> #include <Menu.h> #include <MenuItem.h> #include <FilePanel.h> #include <Path.h> #include <Entry.h> #include <TextView.h> #include <ScrollView.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include "constants.h" #include "GPBitmap.h" #include "GPView.h" #include "GPApp.h" #include "GPWindow.h" // Application's signature const char *APP_SIGNATURE = "application/x-vnd.Xingo-gnuplotViewer"; BRect windowRect(50,50,600,400); // // main // // The main() function's only real job in a basic BeOS // application is to create the BApplication object // and run it. // int main(void) { GPApp theApp; // The application object theApp.Run(); return 0; } // // GPApp::GPApp // // The constructor for the WEApp class. This // will create our window. // GPApp::GPApp() : BApplication(APP_SIGNATURE) { window_count = 0; // No windows yet next_untitled_number = 1; // Next window is "Untitled 1" // Create the Open file panel // openPanel = new BFilePanel; } // // GPApp::MessageReceived // // Handle incoming messages. In particular, handle the // WINDOW_REGISTRY_ADD and WINDOW_REGISTRY_SUB messages. // void GPApp::MessageReceived(BMessage *message) { switch(message->what) { case WINDOW_REGISTRY_ADD: { bool need_id = false; BMessage reply(WINDOW_REGISTRY_ADDED); if (message->FindBool("need_id", &need_id) == B_OK) { if (need_id) { reply.AddInt32("new_window_number", next_untitled_number); next_untitled_number++; } window_count++; } reply.AddRect("rect", windowRect); windowRect.OffsetBy(20,20); message->SendReply(&reply); break; } case WINDOW_REGISTRY_SUB: window_count--; if (!window_count) { Quit(); } break; case MENU_FILE_OPEN: // openPanel->Show(); // Show the file panel break; default: BApplication::MessageReceived(message); break; } } // // GPApp::RefsReceived // // Handle a refs received message. // void GPApp::RefsReceived(BMessage *message) { entry_ref ref; // The entry_ref to open status_t err; // The error code int32 ref_num; // The index into the ref list // Loop through the ref list and open each one #if 0 ref_num = 0; do { if ((err = message->FindRef("refs", ref_num, &ref)) != B_OK) { return; } new GPWindow(windowRect, &ref); ref_num++; } while (1); #endif } void GPApp::ReadyToRun(void) { io_thread = spawn_thread(&io_loop, "gnuplot io_loop", B_LOW_PRIORITY, NULL); resume_thread(io_thread); } int32 GPApp::io_loop(void* data) { static plot_struct plot_array[MAX_WINDOWS]; int32 res = 1; while(res) res = io_task(plot_array); return res; } int32 GPApp::io_task(plot_struct *plot_array) { char buf[256]; struct plot_struct *plot = plot_array; FILE *fp = stdin; BMessage msg(bmsgNewCmd); int cnt = 0; while (fgets(buf, 256, fp)) { // printf("Got : %s", buf); switch (*buf) { case 'G': /* enter graphics mode */ { //printf("entering gfx mode\n"); int plot_number = atoi(buf + 1); /* 0 if none specified */ if (plot_number < 0 || plot_number >= MAX_WINDOWS) plot_number = 0; //printf("plot for window number %d\n", plot_number); plot = plot_array + plot_number; prepare_plot(plot, plot_number); continue; } case 'E': /* leave graphics mode / suspend */ { // BMessage msg(bmsgBitmapDirty); msg.AddInt32("numcmds",cnt); msg.AddPointer("cmds", plot->commands); if(plot->window) plot->window->PostMessage(&msg); // printf("displaying %d cmds, %X at %X\n",cnt,plot->commands[0],&plot->commands[0]); // display(plot); cnt = 0; return 1; } case 'R': /* leave x11 mode */ { //printf("leaving gfx mode\n"); return 0; } default: { // msg.AddString("cmd",buf); // plot->window->PostMessage(&msg); store_command(buf, plot); cnt++; continue; } } } /* get here if fgets fails */ return (feof(fp) || ferror(fp)) ? 0 : 1; } void GPApp::prepare_plot(plot_struct *plot, int term_number) { int i; for (i = 0; i < plot->ncommands; ++i) free(plot->commands[i]); plot->ncommands = 0; if (!plot->posn_flags) { /* first time this window has been used - use default or -geometry * settings */ plot->posn_flags = 1; plot->x = 50; plot->y = 20; plot->width = 400; plot->height = 400; } if (!plot->window) { windowRect.Set(plot->x,plot->y,plot->width,plot->height); plot->window = new GPWindow(windowRect); } else { BMessage msg(bmsgClrCmd); plot->window->PostMessage(&msg); } } void GPApp::display(plot_struct *plot) { BMessage msg(bmsgBitmapDirty); if(plot->window) plot->window->PostMessage(&msg); } /* store a command in a plot structure */ void GPApp::store_command(char *buffer, plot_struct *plot) { char *p; // BMessage msg(bmsgNewCmd); // FPRINTF((stderr, "Store in %d : %s", plot - plot_array, buffer)); if (plot->ncommands >= plot->max_commands) { plot->max_commands = plot->max_commands * 2 + 1; plot->commands = (plot->commands) ? (char **) realloc(plot->commands, plot->max_commands * sizeof(char *)) : (char **) malloc(sizeof(char *)); } p = (char *) malloc((unsigned) strlen(buffer) + 1); if (!plot->commands || !p) { fputs("gnuplot: can't get memory. aborted.\n", stderr); exit(1); } plot->commands[plot->ncommands++] = strcpy(p, buffer); // msg.AddString("cmd",buffer); // plot->window->PostMessage(&msg); } ��������������������������������������������������������������������������������gnuplot-4.6.4/src/beos/GPWindow.h�������������������������������������������������������������������0000644�0004711�0000144�00000004132�10071042561�013513� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef __GNUPLINDOW_H__ #define __GNUPLINDOW_H__ class GPWindow : public BWindow { public: GPWindow(BRect frame); GPWindow(BRect frame, plot_struct *plot); ~GPWindow(); virtual bool QuitRequested(); virtual void MessageReceived(BMessage *message); virtual void FrameResized(float width, float height); status_t Save(BMessage *message); private: void _InitWindow(void); void Register(bool need_id); void Unregister(void); BMenuBar *menubar; BView *plotview; // GPView *plotview; BMenuItem *saveitem; BMessage *savemessage; int32 window_id; BFilePanel *savePanel; }; #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/beos/GPView.cpp�������������������������������������������������������������������0000644�0004711�0000144�00000007636�10037021064�013522� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include "GPBitmap.h" #include "GPView.h" #include "constants.h" #include <Region.h> #include <ScrollBar.h> /*******************************************************************/ // GPView GPView::GPView(BRect rect, ulong resizeMode, ulong flags, GPBitmap *bitmap) : BView(rect,"BitmapEditor",resizeMode,flags|B_SUBPIXEL_PRECISE|B_FRAME_EVENTS) { m_bitmap = (bitmap) ? bitmap : new GPBitmap(rect.Width(), rect.Height()); SetScale(1); }; void GPView::GetMaxSize(float *width, float *height) { BRect r = m_bitmap->Bounds(); *width = floor((r.right+1)*m_scale - 0.5); *height = floor((r.bottom+1)*m_scale - 0.5); }; void GPView::MessageReceived(BMessage *msg) { switch (msg->what) { case bmsgBitmapDirty: { // m_bitmap->Lock(); // m_bitmap->display(); // m_bitmap->Unlock(); // printf("view (dirty) displaying %d commands\n",m_bitmap->ncommands); Draw(Bounds()); break; }; case bmsgBitmapResize: { BRect r; msg->FindRect("rect",&r); m_bitmap->ResizeTo(r.Width(),r.Height(),0); break; }; case bmsgNewCmd: { char *cmd = NULL; int32 i, num; num = msg->FindInt32("numcmds"); m_bitmap->addCommands(msg,num); // printf("view (new cmds) displaying %d commands\n",m_bitmap->ncommands); Draw(Bounds()); break; } case bmsgClrCmd: { m_bitmap->clearCommands(); break; } default: BView::MessageReceived(msg); }; }; GPView::~GPView() { }; void GPView::SetScale(float scale) { m_scale = scale; // FixupScrollbars(); Invalidate(); }; float GPView::Scale() { return m_scale; }; void GPView::FrameResized(float width, float height) { uint32 buttons; BPoint cursor; printf("resising\n"); // ResizeTo(width, height); // GetMouse(&cursor, &buttons); m_bitmap->Lock(); m_bitmap->ResizeTo(width, height,1); BBitmap *b = m_bitmap->RealBitmap(); DrawBitmap(b,b->Bounds(),Bounds()); Sync(); m_bitmap->Unlock(); // Draw(Bounds()); // FixupScrollbars(); }; void GPView::AttachedToWindow() { // FixupScrollbars(); SetViewColor(B_TRANSPARENT_32_BIT); }; void GPView::MouseDown(BPoint point) { printf("Mouse Down\n"); }; void GPView::MouseUp(BPoint point) { printf("Mouse Up\n"); Draw(Bounds()); }; void GPView::Draw(BRect updateRect) { m_bitmap->Lock(); m_bitmap->display(Bounds().Width(),Bounds().Height()); BBitmap *b = m_bitmap->RealBitmap(); DrawBitmap(b,b->Bounds(),Bounds()); Sync(); m_bitmap->Unlock(); }; void GPView::FixupScrollbars() { }; ��������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/beos/XStringList.h����������������������������������������������������������������0000644�0004711�0000144�00000001174�06677003762�014273� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Class XStringList { protected: int32 numStrings; int32 maxStrings; int32 bufferSize; int32 bufferUse; char *strArray[]; char *strBuffer; char *strNext; public : XStringList(); XStringList(char *head, int32 numStr); ~XStringList(); Add(char *str); char *operator[int i]; } XStringList::XStringList() { numStrings = 0; maxStrings = INITIAL_SIZE; bufferSize = INITIAL_SIZE * 16; bufferUse = 0; strArray new(); strNext = strBuffer = ; } XStringList::XStringList(char *head, int32 numStr) { } XStringList::~XStringList() { } XStringList::Add(char *str) { } char *XStringList::operator[int idx] { } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/beos/Makefile.in������������������������������������������������������������������0000644�0004711�0000144�00000022505�10323241501�013710� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## BeOS Generic Makefile v2.0b3 ## ## Fill in the top section of this makefile to define exactly what sort of ## binary you are creating, and what sources, resources and libraries are ## needed to create it. The makefile will then determine the proper ## platform specific options. ## Fill in the top section to define the binary being created and the makefile ## will make sure that all of the hard work is taken care of for you, for both ## PowerPC and Intel versions of the BeOS. ## Application Specific Settings --------------------------------------------- # specify the name of the binary NAME= gnuplot_be # specify the type of binary # APP: Application # SHARED: Shared library or add-on # STATIC: Static library archive # DRIVER: Kernel Driver TYPE= APP # specify the source files to use # full paths or paths relative to the makefile can be included # all files, regardless of directory, will have their object # files created in the common object directory. # Note that this means this makefile will not work correctly # if two source files with the same name (source.c or source.cpp) # are included from different directories. Also note that spaces # in folder names do not work well with this makefile. SOURCES= GPApp.cpp GPWindow.cpp GPView.cpp GPBitmap.cpp HEADERS= GPApp.h GPBitmap.h GPView.h GPWindow.h XStringList.h constants.h EXTRA_DIST= XStringList.cpp # specify the resource files to use # full path or a relative path to the resource file can be used. RSRCS= gnuplot_be.rsrc #specify additional libraries to link against # if libName.so or libName.a is the name of the library to link against # then simply specify Name in the LIBS list # if there is another naming scheme use the full binary # name: my_library.so or my_lib.a # libroot.so never needs to be specified here, although libbe.so does LIBS= be tracker # specify the paths to directories where additional # libraries are to be found. /boot/develop/lib/PLATFORM/ is # already set. The paths can be full or relative to this # makefile. The paths included may not be recursive, so # specify all of the needed paths explicitly # Directories containing source-files are automatically added. LIBPATHS= # specify additional directories where header files can be found # directories where sources are found are included automatically # included. INCPATHS= # specify the level of optimization that you desire # NONE, SOME, FULL OPTIMIZE= NONE # specify any symbols to be defined. The symbols will be # set to a value of 1. For example specify DEBUG if you want # DEBUG=1 to be set when compiling. DEFINES= # specify special warning levels # if unspecified default warnings will be used # NONE = supress all warnings # ALL = enable all warnings WARNINGS = # specify symbols # if TRUE debug symbols will be created SYMBOLS = TRUE # specify debug settings # if TRUE will allow application to be run from # the debugger DEBUGGER = TRUE ## Generic Makefile Rules --------------------------- ## DO NOT MODIFY BENEATH THIS LINE ----------------- # determine wheather running on x86 or ppc MACHINE=$(shell uname -m) ifeq ($(MACHINE), BePC) CPU = x86 else CPU = ppc endif # set the directory where object files and binaries will be created OBJ_DIR := obj.$(CPU) # specify that the binary should be created in the object directory TARGET := $(NAME) # specify the mimeset tool MIMESET := mimeset # specify the tools for adding and removing resources XRES = xres # platform specific settings # x86 Settings ifeq ($(CPU), x86) # set the compiler and compiler flags CC = gcc # SETTING: set the CFLAGS for each binary type ifeq ($(TYPE), DRIVER) CFLAGS += -no-fpic else CFLAGS += endif # SETTING: set the proper optimization level ifeq ($(OPTIMIZE), FULL) OPTIMIZER = -O3 else ifeq ($(OPTIMIZE), SOME) OPTIMIZER = -O1 else ifeq ($(OPTIMIZE), NONE) OPTIMIZER = -O0 else # OPTIMIZE not set so set to full OPTIMIZER = -O3 endif endif endif # SETTING: set proper debugger flags ifeq ($(DEBUGGER), TRUE) DEBUG = -gdwarf-2 OPTIMIZER = -O0 endif CFLAGS += $(OPTIMIZER) $(DEBUG) # SETTING: set warning level ifeq ($(WARNINGS), ALL) CFLAGS += -Wall -Wno-multichar -Wno-ctor-dtor-privacy else ifeq ($(WARNINGS), NONE) CFLAGS += endif endif # set the linker and linker flags LD = gcc LDFLAGS += $(DEBUG) # SETTING: set linker flags for each binary type ifeq ($(TYPE), APP) LDFLAGS += -Xlinker -soname=_APP_ else ifeq ($(TYPE), SHARED) LDFLAGS += -nostart -Xlinker -soname=$(NAME) else ifeq ($(TYPE), DRIVER) LDFLAGS += -nostdlib /boot/develop/lib/x86/_KERNEL_ endif endif endif # SETTING: define debug symbols if desired ifeq ($(SYMBOLS), TRUE) CFLAGS += -g endif else # ppc Settings ifeq ($(CPU), ppc) # set the compiler and compiler flags CC = mwcc CFLAGS += # SETTING: set the proper optimization level ifeq ($(OPTIMIZE), FULL) OPTIMIZER = -O7 else ifeq ($(OPTIMIZE), SOME) OPTIMIZER = -O3 else ifeq ($(OPTIMIZE), NONE) OPTIMIZER = else # OPTIMIZE not set so set to full OPTIMIZER = -O7 endif endif endif CFLAGS += $(OPTIMIZER) # SETTING: set warning level ifeq ($(WARNINGS), ALL) CFLAGS += -w all else ifeq ($(WARNINGS), NONE) CFLAGS += -w 0 endif endif # clear the standard environment variable # now there are no standard libraries to link against BELIBFILES= # set the linker and linker flags LD = mwldppc # SETTING: set linker flags for each binary type ifeq ($(TYPE), APP) LDFLAGS += else ifeq ($(TYPE), SHARED) LDFLAGS += -xms endif endif ifeq ($(TYPE), DRIVER) LDFLAGS += -nodefaults \ -export all \ -G \ /boot/develop/lib/ppc/glue-noinit.a \ /boot/develop/lib/ppc/_KERNEL_ else LDFLAGS += -export pragma \ -init _init_routine_ \ -term _term_routine_ \ -lroot \ /boot/develop/lib/ppc/glue-noinit.a \ /boot/develop/lib/ppc/init_term_dyn.o \ /boot/develop/lib/ppc/start_dyn.o endif # SETTING: output symbols in an xMAP file ifeq ($(SYMBOLS), TRUE) LDFLAGS += -map $(TARGET).xMAP endif # SETTING: output debugging info to a .SYM file ifeq ($(DEBUGGER), TRUE) LDFLAGS += -g -osym $(TARGET).SYM endif endif endif # psuedo-function for converting a list of source files in SOURCES variable # to a corresponding list of object files in $(OBJ_DIR)/xxx.o # The "function" strips off the src file suffix (.ccp or .c or whatever) # and then strips of the directory name, leaving just the root file name. # It then appends the .o suffix and prepends the $(OBJ_DIR)/ path define SRCS_LIST_TO_OBJS $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SOURCES), \ $(basename $(notdir $(file)))))) endef OBJS = $(SRCS_LIST_TO_OBJS) # create a unique list of paths to our sourcefiles SRC_PATHS += $(sort $(foreach file, $(SOURCES), $(dir $(file)))) # add source paths to VPATH if not already present VPATH := VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS)))) # add source paths and include paths to INLCUDES if not already present INCLUDES = $(foreach path, $(INCPATHS) $(SRC_PATHS), $(addprefix -I, $(path))) # SETTING: add the -L prefix to all library paths to search LINK_PATHS = $(foreach path, $(LIBPATHS) $(SRC_PATHS) , \ $(addprefix -L, $(path))) # SETTING: add the -l prefix to all libs to be linked against LINK_LIBS = $(foreach lib, $(LIBS), $(addprefix -l, $(lib))) # add to the linker flags LDFLAGS += $(LINK_PATHS) $(LINK_LIBS) # SETTING: add the defines to the compiler flags CFLAGS += $(foreach define, $(DEFINES), $(addprefix -D, $(define))) # SETTING: use the archive tools if building a static library # otherwise use the linker ifeq ($(TYPE), STATIC) BUILD_LINE = ar -cru $(TARGET) $(OBJS) else BUILD_LINE = $(LD) -o $@ $(OBJS) $(LDFLAGS) endif # create the resource instruction ifeq ($(RSRCS), ) DO_RSRCS := else DO_RSRCS := $(XRES) -o $(TARGET) $(RSRCS) endif # define the actual work to be done default: $(TARGET) $(TARGET): $(OBJ_DIR) $(OBJS) $(RSRCS) $(BUILD_LINE) $(DO_RSRCS) $(MIMESET) -f $@ # rule to create the object file directory if needed $(OBJ_DIR):: @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1 $(OBJ_DIR)/%.o : %.c $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@ $(OBJ_DIR)/%.o : %.cpp $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@ $(OBJ_DIR)/%.o : %.cp $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@ $(OBJ_DIR)/%.o : %.C $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@ $(OBJ_DIR)/%.o : %.CC $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@ $(OBJ_DIR)/%.o : %.CPP $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@ # empty rule. Things that depend on this rule will always get triggered FORCE: # The generic clean command. Delete everything in the object folder. clean :: FORCE -rm -rf $(OBJ_DIR) # distclean: clean # remove just the application from the object folder rmapp :: -rm -f $(TARGET) # generic distdir rules - needed with automake # maybe we can automakify the Makefile? srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ distdir = $(top_builddir)$(PACKAGE)-$(VERSION)/src/$(subdir) subdir = beos DISTFILES = $(SOURCES) $(HEADERS) $(EXTRA_DIST) distdir: # $(DISTFILES) distdir=`cd $(distdir) && pwd` @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/beos/GPApp.h����������������������������������������������������������������������0000644�0004711�0000144�00000004550�10071042561�012770� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef __GNUPLOTAPP_H__ #define __GNUPLOTAPP_H__ extern const char *APP_SIGNATURE; #define MAX_WINDOWS 10 typedef struct plot_struct { BWindow *window; // GPBixmap *pixmap; unsigned int posn_flags; int x, y; unsigned int width, height; /* window size */ unsigned int px, py; /* pointsize */ int ncommands, max_commands; char **commands; } plot_struct; class GPApp : public BApplication { public: GPApp(); virtual void ReadyToRun(void); virtual void MessageReceived(BMessage *message); virtual void RefsReceived(BMessage *message); private: int32 window_count; int32 next_untitled_number; void prepare_plot(plot_struct *plot, int term_number); void store_command(char *buffer, plot_struct *plot); void display(plot_struct *plot); int32 io_task(plot_struct *data); int32 io_loop(void *data); thread_id io_thread; // BFilePanel *openPanel; }; #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/beos/GPView.h���������������������������������������������������������������������0000644�0004711�0000144�00000004367�10071042561�013170� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GPView_h #define GPView_h #include <SupportDefs.h> #include <GraphicsDefs.h> #include <List.h> #include <Bitmap.h> #include <Rect.h> class GPView : public BView { protected: GPBitmap * m_bitmap; float m_scale; public: GPView(BRect rect, ulong resizeMode, ulong flags, GPBitmap *bitmap); ~GPView(); GPBitmap * Document() { return m_bitmap; }; void SetScale(float scale); float Scale(); void GetMaxSize(float *width, float *height); virtual void MouseDown(BPoint point); virtual void MouseUp(BPoint point); virtual void Draw(BRect updateRect); virtual void AttachedToWindow(); virtual void MessageReceived(BMessage *msg); virtual void FrameResized(float width, float height); void FixupScrollbars(); }; #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/beos/GPBitmap.cpp�����������������������������������������������������������������0000644�0004711�0000144�00000025477�07342460366�014050� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� #include <stdio.h> #include <stdlib.h> #include <string.h> #include "GPBitmap.h" #include "GPView.h" #include "constants.h" #include <Region.h> #include <ScrollBar.h> #define LineSolid 1 /*******************************************************************/ // GPBitmap GPBitmap::GPBitmap(float width, float height) { m_bitmap = new BBitmap(BRect(0,0,width-1,height-1),B_RGB_32_BIT,TRUE); BRect r(0,0,width-1,height-1); m_view = new BView(r,"BitmapDrawer",B_FOLLOW_ALL,0); m_bitmap->AddChild(m_view); max_commands = 7; ncommands = 0; m_needRedraw = false; m_redrawing = false; commands = (char **) malloc(max_commands * sizeof(char *)); this->width = nwidth = width; this->height = nheight = height; for(int i=1 ; i<16 ; i++) { colors[i].red = i*16; colors[i].green = i*16; colors[i].blue = i*16; colors[i].alpha = 255; } }; GPBitmap::GPBitmap(float width, float height, char **cmds) { } GPBitmap::~GPBitmap() { if (m_bitmap) delete m_bitmap; if(m_view) delete m_view; if(ncommands) clearCommands(); if(commands) { free(commands); commands = NULL; } } void GPBitmap::SetDirty(BRegion *r) { BMessage msg(bmsgBitmapDirty); m_needRedraw = true; } void GPBitmap::clearCommands() { int32 ncmds = atomic_add(&ncommands,-ncommands); if(ncmds > 0) { for( --ncmds ; ncmds >= 0 ; ncmds--) { if(commands[ncmds]) free(commands[ncmds]); commands[ncmds] = NULL; } } } #if 1 void GPBitmap::addCommands(BMessage *msg, int32 numCmds) { char *p, **cmd = NULL; if (numCmds+ncommands >= max_commands) { max_commands = max_commands + numCmds + 2; commands = (commands) ? (char **) realloc(commands, max_commands * sizeof(char *)) : (char **) malloc(sizeof(char *)); } if (!commands) { fputs("gnuplot: can't get memory. aborted.\n", stderr); // exit(1); } else { msg->FindPointer("cmds", (void **)&cmd); // printf("got : %X at %X\n",cmd[0], cmd); for(int i=0; i< numCmds; i++) { // cmd = msg->FindString("cmd", i); // p = (char *) malloc((unsigned) strlen(cmd[i]) + 1); // if (!p) { // fputs("gnuplot: can't get memory. aborted.\n", stderr); // exit(1); // } else // commands[ncommands++] = strcpy(p, cmd[i]); commands[ncommands++] = strdup(cmd[i]); // commands[ncommands++] = cmd[i]; m_needRedraw = true; } } } #else void GPBitmap::addCommands(BMessage *msg, int32 numCmds) { char *cmd = NULL; if (numCmds+ncommands >= max_commands) { max_commands = max_commands + numCmds + 2; commands = (commands) ? (char **) realloc(commands, max_commands * sizeof(char *)) : (char **) malloc(sizeof(char *)); } if (!commands) { fputs("gnuplot: can't get memory. aborted.\n", stderr); // exit(1); } else { for(int i=0; i< numCmds; i++) { cmd = msg->FindString("cmd", i); commands[ncommands++] = strdup(cmd); m_needRedraw = true; } } } #endif void GPBitmap::addCommand(char *cmd) { // printf("adding a cmd : %s\n",cmd); if(!cmd) return; if (ncommands >= max_commands) { max_commands = max_commands * 2 + 1; commands = (commands) ? (char **) realloc(commands, max_commands * sizeof(char *)) : (char **) malloc(sizeof(char *)); } if (!commands) { fputs("gnuplot: can't get memory. X11 aborted.\n", stderr); return; // exit(1); } else { commands[ncommands++] = strdup(cmd); m_needRedraw = true; } } void GPBitmap::ResizeTo(float width, float height, uint32 btns) { if(btns) { nwidth = width; nheight = height; // m_needRedraw = true; return; } BRect r(0,0,width-1,height-1); if (m_bitmap) m_bitmap->Lock(); if(m_view) { m_bitmap->RemoveChild(m_view); m_view->ResizeTo(nwidth, nheight); } else m_view = new BView(r,"BitmapDrawer",B_FOLLOW_ALL,0); // drawing_thread = spawn_thread(&drawing_loop, "gnuplot io_loop", B_LOW_PRIORITY, this); // resume_thread(drawing_thread); // kill_thread(drawing_thread); if (m_bitmap) { m_bitmap->Unlock(); delete m_bitmap; } m_bitmap = new BBitmap(r,B_RGB_32_BIT,TRUE); m_bitmap->Lock(); m_bitmap->AddChild(m_view); this->width = nwidth = width; this->height = nheight = height; m_needRedraw = true; } int32 GPBitmap::drawing_loop(void* data) { int32 res = 1; GPBitmap * bmp = (GPBitmap *)data; return res; } /*----------------------------------------------------------------------------- * display - display a stored plot *---------------------------------------------------------------------------*/ void GPBitmap::display(float v_width, float v_height) { int n, x, y, jmode, sl, lt = 0, type, point, px, py; int uwidth, user_width = 1; /* as specified by plot...linewidth */ char *buffer, *str; float sw, vchar; uint32 buttons; BPoint cursor; m_view->GetMouse(&cursor, &buttons); if(buttons == 0) { if ((width != v_width ) || (height != v_height)) ResizeTo(v_width, v_height, 0); } if (ncommands == 0 || m_needRedraw == false) return; vchar = 11.0; m_view->SetFontSize(vchar); /* set scaling factor between internal driver & window geometry */ xscale = width / 4096.0; yscale = height / 4096.0; /* initial point sizes, until overridden with P7xxxxyyyy */ px = (int) (xscale * pointsize); py = (int) (yscale * pointsize); /* set pixmap background */ m_view->SetHighColor(255,255,255); m_view->FillRect(BRect(0,0,width,height)); m_view->SetViewColor(colors[2]); /* loop over accumulated commands from inboard driver */ for (n = 0; n < ncommands; n++) { buffer = commands[n]; /* X11_vector(x,y) - draw vector */ if (*buffer == 'V') { sscanf(buffer, "V%4d%4d", &x, &y); m_view->StrokeLine( BPoint(X(cx), Y(cy)),BPoint(X(x), Y(y))); cx = x; cy = y; } /* X11_move(x,y) - move */ else if (*buffer == 'M') { sscanf(buffer, "M%4d%4d", &cx, &cy); m_view->MovePenTo(BPoint(X(cx), Y(cy))); } /* X11_put_text(x,y,str) - draw text */ else if (*buffer == 'T') { sscanf(buffer, "T%4d%4d", &x, &y); str = buffer + 9; sl = strlen(str) - 1; sw = m_view->StringWidth(str, sl); switch (jmode) { case CENTRE: sw = -sw / 2; break; case RIGHT: sw = -sw; break; case LEFT: sw = 0; break; } m_view->SetHighColor(colors[2]); m_view->DrawString(str, sl, BPoint(X(x) + sw, Y(y) + vchar / 3 )); m_view->SetHighColor(colors[lt + 3]); } else if (*buffer == 'F') { /* fill box */ int style, xtmp, ytmp, w, h; if (sscanf(buffer + 1, "%4d%4d%4d%4d%4d", &style, &xtmp, &ytmp, &w, &h) == 5) { /* gnuplot has origin at bottom left, but X uses top left * There may be an off-by-one (or more) error here. * style ignored here for the moment */ /* ULIG: the style parameter is now used for the fillboxes style * (not implemented here), see the documentation */ m_view->SetHighColor(colors[0]); m_view->FillRect(BRect(X(xtmp), Y(ytmp + h), w * xscale, h * yscale)); m_view->SetHighColor(colors[lt + 3]); } } /* X11_justify_text(mode) - set text justification mode */ else if (*buffer == 'J') sscanf(buffer, "J%4d", (int *) &jmode); /* X11_linewidth(width) - set line width */ else if (*buffer == 'W') sscanf(buffer + 1, "%4d", &user_width); /* X11_linetype(type) - set line type */ else if (*buffer == 'L') { sscanf(buffer, "L%4d", <); lt = (lt % 8) + 2; /* default width is 0 {which X treats as 1} */ uwidth = user_width; // widths[lt] ? user_width * widths[lt] : user_width; // if (dashes[lt][0]) { // type = LineOnOffDash; // XSetDashes(dpy, gc, 0, dashes[lt], strlen(dashes[lt])); // } else { type = LineSolid; // } m_view->SetHighColor(colors[lt + 3]); m_view->SetPenSize(uwidth); m_view->SetLineMode(B_ROUND_CAP,B_BEVEL_JOIN); // XSetLineAttributes(dpy, gc, width, type, CapButt, JoinBevel); } /* X11_point(number) - draw a point */ else if (*buffer == 'P') { /* linux sscanf does not like %1d%4d%4d" with Oxxxxyyyy */ /* sscanf(buffer, "P%1d%4d%4d", &point, &x, &y); */ point = buffer[1] - '0'; sscanf(buffer + 2, "%4d%4d", &x, &y); if (point == 7) { /* set point size */ px = (int) (x * xscale * pointsize); py = (int) (y * yscale * pointsize); } else { if (type != LineSolid || uwidth != 0) { /* select solid line */ m_view->SetPenSize(1.0); m_view->SetLineMode(B_ROUND_CAP,B_BEVEL_JOIN); // XSetLineAttributes(dpy, gc, 0, LineSolid, CapButt, JoinBevel); } switch (point) { case 0: /* dot */ doDot(x,y); break; case 1: /* do diamond */ doDiamond(x,y,px,py); break; case 2: /* do plus */ doPlus(x,y,px,py); break; case 3: /* do box */ doBox(x,y,px,py); break; case 4: /* do X */ doCross(x,y,px,py); break; case 5: /* do triangle */ doTriangle(x,y,px,py); break; case 6: /* do star */ doStar(x,y,px,py); break; } if (type != LineSolid || uwidth != 0) { /* select solid line */ m_view->SetPenSize(uwidth); // canview->SetLineMode(B_ROUND_CAP,B_ROUND_JOIN); // XSetLineAttributes(dpy, gc, width, type, CapButt, JoinBevel); } } } /* end X11_point(number) - draw a point */ } /* end loop over accumulated commands from inboard driver */ m_view->Sync(); m_needRedraw = false; } void GPBitmap::doDiamond(int x, int y, int px, int py) { m_view->StrokeLine(BPoint(X(x) - px, Y(y)),BPoint(X(x), Y(y) - py)); m_view->StrokeLine(BPoint(X(x) + px, Y(y))); m_view->StrokeLine(BPoint(X(x), Y(y) + py)); m_view->StrokeLine(BPoint(X(x) - px, Y(y))); m_view->StrokeLine(BPoint(X(x), Y(y)),BPoint(X(x), Y(y))); } void GPBitmap::doPlus(int x, int y, int px, int py) { m_view->StrokeLine(BPoint(X(x) - px, Y(y)),BPoint(X(x) + px, Y(y))); m_view->StrokeLine(BPoint(X(x), Y(y) - py),BPoint(X(x), Y(y) + py)); } void GPBitmap::doBox(int x, int y, int px, int py) { m_view->StrokeRect(BRect(X(x) - px, Y(y) - py, (px + px), (py + py))); m_view->StrokeLine(BPoint(X(x), Y(y)),BPoint(X(x), Y(y))); } void GPBitmap::doCross(int x, int y, int px, int py) { m_view->StrokeLine(BPoint(X(x) - px, Y(y) - py),BPoint(X(x) + px, Y(y) + py)); m_view->StrokeLine(BPoint(X(x) - px, Y(y) + py),BPoint(X(x) + px, Y(y) - py)); } void GPBitmap::doTriangle(int x, int y, int px, int py) { short temp_x, temp_y; temp_x = (short) (1.33 * (double) px + 0.5); temp_y = (short) (1.33 * (double) py + 0.5); m_view->StrokeLine(BPoint(X(x), Y(y) - temp_y), BPoint(X(x) + temp_x, Y(y) - temp_y + 2 * py)); m_view->StrokeLine(BPoint(X(x) - temp_x, Y(y) - temp_y + 2 * py)); m_view->StrokeLine(BPoint(X(x), Y(y) - temp_y)); m_view->StrokeLine(BPoint(X(x), Y(y)),BPoint(X(x), Y(y))); } void GPBitmap::doStar(int x, int y, int px, int py) { m_view->StrokeLine(BPoint(X(x)-px, Y(y)), BPoint(X(x) + px, Y(y))); m_view->StrokeLine(BPoint(X(x), Y(y)-py), BPoint(X(x), Y(y)+py)); m_view->StrokeLine(BPoint(X(x)-px, Y(y)-py), BPoint(X(x)+px, Y(y)+py)); m_view->StrokeLine(BPoint(X(x)-px, Y(y)+py), BPoint(X(x)+px, Y(y)-py)); } void GPBitmap::doDot(int x, int y) { m_view->StrokeLine(BPoint(X(x), Y(y)),BPoint(X(x), Y(y))); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/beos/GPBitmap.h�������������������������������������������������������������������0000644�0004711�0000144�00000007167�10071042561�013473� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GPBitmap_h #define GPBitmap_h #include <SupportDefs.h> #include <GraphicsDefs.h> #include <List.h> #include <Bitmap.h> #include <Rect.h> #define bmsgZoomIn 'zmin' #define bmsgZoomOut 'zmot' #define bmsgSetScale 'zset' class GPBitmap { protected: BView * m_view; BList m_editors; BBitmap * m_bitmap; BBitmap * m_bufbitmap; sem_id m_readerLock; rgb_color colors[16]; bool m_needRedraw; bool m_redrawing; thread_id drawing_thread; public: float width, height, nwidth, nheight, pointsize, xscale, yscale; int32 ncommands, max_commands; int cx, cy; char ** commands; //int gX = 100, gY = 100; //unsigned int gW = 640, gH = 450; GPBitmap(float width, float height); GPBitmap(float width, float height, char **cmds); ~GPBitmap(); BBitmap * RealBitmap() { return m_bitmap; }; void Lock() { m_bitmap->Lock(); }; void Unlock() { m_bitmap->Unlock(); }; BRect Bounds() { return m_bitmap->Bounds(); }; void * Bits() { return m_bitmap->Bits(); }; color_space ColorSpace() { return m_bitmap->ColorSpace(); }; int32 BitsLength() { return m_bitmap->BitsLength(); }; int32 BytesPerRow() { return m_bitmap->BytesPerRow(); }; BView * View() { return m_view; }; void SetDirty(BRegion *r); void ResizeTo(float width, float height, uint32 btns); rgb_color PixelAtRGB(int x, int y) { rgb_color c = *((rgb_color*)(((char*)Bits()) + x*4 + y*BytesPerRow())); return c; }; int32 drawing_loop(void *data); void addCommand(char *cmd); void addCommands(BMessage *msg, int32 numCmds); void clearCommands(); void display(float v_width, float v_height); void doDiamond(int x, int y, int px, int py); void doPlus(int x, int y, int px, int py); void doBox(int x, int y, int px, int py); void doCross(int x, int y, int px, int py); void doTriangle(int x, int y, int px, int py); void doStar(int x, int y, int px, int py); void doDot(int x, int y); inline float X(int x) { return x * xscale; }; inline float Y(int y) { return (4095-(y)) * yscale; } }; #ifndef LEFT #define LEFT 0 #endif #ifndef CENTRE #define CENTRE 1 #endif #ifndef RIGHT #define RIGHT 2 #endif #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/beos/XStringList.cpp��������������������������������������������������������������0000644�0004711�0000144�00000000446�06677003760�014625� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Class XStringList { protected: int32 numStrings; int32 maxStrings; int32 bufferSize; int32 bufferUse; char *strArray[]; char *strBuffer; char *strNext; public : XStringList(); XStringList(char *head, int32 numStr); ~XStringList(); Add(char *str); char *operator[]; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/strftime.c������������������������������������������������������������������������0000644�0004711�0000144�00000016116�10071042560�012721� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: strftime.c,v 1.7 2004/07/01 17:10:08 broeker Exp $"); } #endif /* GNUPLOT - strftime.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * Implementation of strftime for systems missing this (e.g. vaxctrl) * * This code was written based on the NeXT strftime man-page, sample output of * the function and an ANSI-C quickreference chart. This code does not use * parts of any existing strftime implementation. * * Apparently not all format chars are implemented, but this was all I had in * my documentation. * * (written by Alexander Lehmann) */ #define NOTIMEZONE #include "syscfg.h" /* for MAX_LINE_LEN */ #include "stdfn.h" /* for safe_strncpy */ #ifdef TEST_STRFTIME /* test case; link with stdfn */ #define strftime _strftime #include "national.h" /* language info for the following, */ /* extracted from set.c */ char full_month_names[12][32] = {FMON01, FMON02, FMON03, FMON04, FMON05, FMON06, FMON07, FMON08, FMON09, FMON10, FMON11, FMON12}; char abbrev_month_names[12][8] = {AMON01, AMON02, AMON03, AMON04, AMON05, AMON06, AMON07, AMON08, AMON09, AMON10, AMON11, AMON12}; char full_day_names[7][32] = {FDAY0, FDAY1, FDAY2, FDAY3, FDAY4, FDAY5, FDAY6}; char abbrev_day_names[7][8] = {ADAY0, ADAY1, ADAY2, ADAY3, ADAY4, ADAY5, ADAY6}; #endif /* TEST_STRFTIME */ static void fill __PROTO((char *from, char **pto, size_t *pmaxsize)); static void number __PROTO((int num, int pad, char **pto, size_t *pmaxsize)); static void fill(char *from, char **pto, size_t *pmaxsize) { safe_strncpy(*pto, from, *pmaxsize); if (*pmaxsize < strlen(from)) { (*pto) += *pmaxsize; *pmaxsize = 0; } else { (*pto) += strlen(from); (*pmaxsize) -= strlen(from); } } static void number(int num, int pad, char **pto, size_t *pmaxsize) { char str[100]; sprintf(str, "%0*d", pad, num); fill(str, pto, pmaxsize); } size_t strftime(char *s, size_t max, const char *format, const struct tm *tp) { char *start = s; size_t maxsize = max; if (max > 0) { while (*format && max > 0) { if (*format != '%') { *s++ = *format++; max--; } else { format++; switch (*format++) { case 'a': /* abbreviated weekday name */ if (tp->tm_wday >= 0 && tp->tm_wday <= 6) fill(abbrev_day_names[tp->tm_wday], &s, &max); break; case 'A': /* full name of the weekday */ if (tp->tm_wday >= 0 && tp->tm_wday <= 6) fill(full_day_names[tp->tm_wday], &s, &max); break; case 'b': /* abbreviated month name */ if (tp->tm_mon >= 0 && tp->tm_mon <= 11) fill(abbrev_month_names[tp->tm_mon], &s, &max); break; case 'B': /* full name of month */ if (tp->tm_mon >= 0 && tp->tm_mon <= 11) fill(full_month_names[tp->tm_mon], &s, &max); break; case 'c': /* locale's date and time reprensentation */ strftime(s, max, "%a %b %X %Y", tp); max -= strlen(s); s += strlen(s); break; case 'd': /* day of the month (01-31) */ number(tp->tm_mday, 2, &s, &max); break; case 'H': /* hour of the day (00-23) */ number(tp->tm_hour, 2, &s, &max); break; case 'I': /* hour of the day (01-12) */ number((tp->tm_hour + 11) % 12 + 1, 2, &s, &max); break; case 'j': /* day of the year (001-366) */ number(tp->tm_yday + 1, 3, &s, &max); break; case 'm': /* month of the year (01-12) */ number(tp->tm_mon + 1, 2, &s, &max); break; case 'M': /* minute (00-59) */ number(tp->tm_min, 2, &s, &max); break; case 'p': /* locale's version of AM or PM */ fill(tp->tm_hour >= 6 ? "PM" : "AM", &s, &max); break; case 'S': /* seconds (00-59) */ number(tp->tm_sec, 2, &s, &max); break; case 'U': /* week number of the year (00-53) with Sunday as the first day of the week */ number((tp->tm_yday - (tp->tm_yday - tp->tm_wday + 7) % 7 + 7) / 7, 1, &s, &max); break; case 'w': /* weekday (Sunday = 0 to Saturday = 6) */ number(tp->tm_wday, 1, &s, &max); break; case 'W': /* week number of the year (00-53) with Monday as the first day of the week */ number((tp->tm_yday - (tp->tm_yday - tp->tm_wday + 8) % 7 + 7) / 7, 2, &s, &max); break; case 'x': /* locale's date representation */ strftime(s, max, "%a %b %d %Y", tp); max -= strlen(s); s += strlen(s); break; case 'X': /* locale's time representation */ #ifndef NOTIMEZONE strftime(s, max, "%H:%M:%S %Z", tp); #else strftime(s, max, "%H:%M:%S", tp); #endif max -= strlen(s); s += strlen(s); break; case 'y': /* two-digit year representation (00-99) */ number(tp->tm_year % 100, 2, &s, &max); break; case 'Y': /* four-digit year representation */ number(tp->tm_year + 1900, 2, &s, &max); break; #ifndef NOTIMEZONE case 'Z': /* time zone name */ fill(tp->tm_zone, &s, &max); break; #endif case '%': /* percent sign */ default: *s++ = *(format - 1); max--; break; } } } if (s - start < maxsize) { *s++ = '\0'; } else { *(s - 1) = '\0'; } } return s - start; } #ifdef TEST_STRFTIME #undef strftime #define test(s) \ printf("%s -> ",s ); \ _strftime(str, 100, s, ts); \ printf("%s - ", str); \ strftime(str, 100, s, ts); \ printf("%s\n", str) int main() { char str[100]; struct tm *ts; time_t t; int i; t = time(NULL); ts = localtime(&t); test("%c"); test("test%%test"); test("%a %b %d %X %Y"); test("%x %X"); test("%A %B %U"); test("%I:%M %p %j %w"); t -= 245 * 24 * 60 * 60; for (i = 0; i < 366; i++) { ts = localtime(&t); printf("%03d: ", i); test("%a %d %m %W"); t += 24 * 60 * 60; } return 0; } #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/�����������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340010�013075� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/wxt_term.h�������������������������������������������������������������0000644�0004711�0000144�00000012100�12130567672�015137� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: wxt_term.h,v 1.16.2.1 2013/04/05 16:39:47 markisch Exp $ */ /* GNUPLOT - wxt_term.h */ /*[ * Copyright 2005,2006 Timothee Lecomte * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ /* ------------------------------------------------------ * Here you will find the declarations of the C++ functions * used in wxt.trm and defined in wxt_gui.cpp, * where the wxWidgets terminal is mainly implemented. * ------------------------------------------------------*/ #ifndef GNUPLOT_WXT_TERM_H # define GNUPLOT_WXT_TERM_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ void wxt_init(void); void wxt_graphics(void); void wxt_text(void); void wxt_linetype(int linetype); void wxt_move(unsigned int x, unsigned int y); void wxt_vector(unsigned int x, unsigned int y); void wxt_put_text(unsigned int x, unsigned int y, const char *str); void wxt_reset(void); int wxt_justify_text(enum JUSTIFY mode); void wxt_point(unsigned int x, unsigned int y, int pointstyle); void wxt_linewidth(double linewidth); int wxt_text_angle(int ang); void wxt_fillbox(int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height); int wxt_set_font __PROTO ((const char *font)); void wxt_pointsize(double ptsize); void wxt_image(unsigned int M, unsigned int N, coordval * image, gpiPoint * corner, t_imagecolor color_mode); # ifdef USE_MOUSE int wxt_waitforinput(void); void wxt_put_tmptext(int, const char str[]); void wxt_set_ruler(int x, int y); void wxt_set_cursor(int, int, int); void wxt_set_clipboard(const char s[]); # endif /*USE_MOUSE*/ int wxt_make_palette(t_sm_palette *palette); void wxt_set_color(t_colorspec *colorspec); void wxt_filled_polygon(int n, gpiPoint * corners); void wxt_enhanced_flush(); void wxt_enhanced_writec(int c); void wxt_enhanced_open(char* fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint); void wxt_layer(t_termlayer layer); void wxt_raise_terminal_window __PROTO((int)); void wxt_raise_terminal_group __PROTO((void)); void wxt_lower_terminal_window __PROTO((int)); void wxt_lower_terminal_group __PROTO((void)); void wxt_close_terminal_window __PROTO((int number)); void wxt_update_title __PROTO((int number)); void wxt_update_size __PROTO((int number)); TBOOLEAN wxt_window_opened(void); /* state variables shared between wxt.trm and wxt_gui.cpp */ extern int wxt_window_number; extern TBOOLEAN wxt_enhanced_enabled; extern TBOOLEAN wxt_dashed; extern double wxt_dashlength; extern int wxt_background; extern rgb_color wxt_rgb_background; extern int wxt_persist; extern int wxt_raise; extern int wxt_ctrl; extern int wxt_toggle; extern char wxt_set_fontname[MAX_ID_LEN + 1]; extern int wxt_set_fontsize; extern double wxt_set_fontscale; extern int wxt_rounded; extern char wxt_title[MAX_ID_LEN + 1]; extern int wxt_width; extern int wxt_height; extern int wxt_axis_mask; typedef struct wxt_axis_state_t { double min; double term_lower; double term_scale; double logbase; } wxt_axis_state_t; extern wxt_axis_state_t wxt_axis_state[4]; #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /* gnuplot_wxt_term_h */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/���������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�014535� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/�����������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�015321� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/help_png.h�������������������������������������������������0000644�0004711�0000144�00000007036�10445152334�017311� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������static unsigned char help_png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, 0x61, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64, 0x88, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x01, 0xde, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x85, 0x51, 0x4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, 0x52, 0x76, 0x5f, 0xc4, 0x18, 0x68, 0x6d, 0xbf, 0xce, 0xe3, 0x91, 0x84, 0x9c, 0x75, 0x1e, 0x4b, 0x20, 0x0d, 0x00, 0x3a, 0xb3, 0xea, 0x93, 0xfc, 0x91, 0x9b, 0x36, 0xcf, 0x40, 0x29, 0xcb, 0x17, 0x51, 0xae, 0x08, 0x08, 0x52, 0x20, 0x38, 0x8e, 0xe3, 0x68, 0x26, 0xcf, 0xc0, 0xc8, 0x5b, 0x2a, 0xa5, 0x8d, 0xf5, 0x87, 0x9f, 0x2c, 0xaf, 0xe6, 0x21, 0x8e, 0xbf, 0x63, 0x6b, 0x6b, 0xc5, 0xcc, 0xe3, 0x4d, 0x34, 0x00, 0x80, 0x82, 0x93, 0xa2, 0xe8, 0xa4, 0x18, 0x0c, 0x52, 0x40, 0x26, 0xb1, 0x26, 0x54, 0xd0, 0xda, 0xf4, 0x45, 0xb4, 0x2b, 0x02, 0x92, 0x14, 0x01, 0x8e, 0x07, 0x13, 0x2a, 0xfc, 0x03, 0xf6, 0x64, 0x4d, 0x42, 0xcd, 0x3e, 0xef, 0x74, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/autoscale_png.h��������������������������������������������0000644�0004711�0000144�00000010761�10445152333�020337� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������static unsigned char autoscale_png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, 0x61, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64, 0x88, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x02, 0x7e, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x95, 0x93, 0x3f, 0x68, 0x13, 0x71, 0x14, 0xc7, 0x3f, 0xbf, 0xbb, 0xeb, 0xdd, 0xe5, 0xee, 0x72, 0x67, 0xb4, 0xfe, 0x83, 0xd2, 0x40, 0xad, 0x83, 0x14, 0x21, 0x63, 0xc1, 0x56, 0x2a, 0xba, 0x08, 0xc1, 0x2e, 0xc5, 0x41, 0x3a, 0x38, 0x08, 0x15, 0x0a, 0xb6, 0x83, 0xda, 0x49, 0x11, 0x3a, 0x15, 0x41, 0x3a, 0x39, 0x34, 0xb6, 0x8a, 0xb8, 0x48, 0xc1, 0xa5, 0x1d, 0x3a, 0x28, 0x28, 0xb8, 0xb8, 0x48, 0xb7, 0x88, 0x64, 0x09, 0x18, 0x53, 0xff, 0x40, 0x6c, 0x4d, 0x62, 0x2e, 0xb9, 0xe4, 0x39, 0x24, 0xad, 0x8d, 0x4e, 0x3e, 0xf8, 0x0c, 0x3f, 0x78, 0xef, 0xf1, 0xfb, 0x7e, 0xdf, 0x7b, 0x88, 0x08, 0xfb, 0x01, 0xd2, 0x7a, 0x2c, 0x9e, 0x31, 0xbc, 0x44, 0x56, 0x19, 0x66, 0x55, 0x73, 0x13, 0x59, 0x65, 0xc7, 0x33, 0x40, 0xfa, 0xef, 0x5c, 0x11, 0x41, 0x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0x07, 0xe7, 0xa7, 0x42, 0xd3, 0x0d, 0xc4, 0xf6, 0xfe, 0xc5, 0xf2, 0x02, 0x31, 0xdd, 0x40, 0x74, 0x27, 0x10, 0x46, 0xa7, 0x42, 0x7a, 0x62, 0xef, 0xba, 0x56, 0x59, 0x29, 0xd5, 0x8b, 0xe9, 0x64, 0x9d, 0xb1, 0x6b, 0xfe, 0x91, 0x2b, 0x0b, 0xa6, 0x69, 0xd9, 0x08, 0x50, 0x6f, 0x42, 0x25, 0x82, 0xed, 0x3a, 0x34, 0xc2, 0x1a, 0xbc, 0x98, 0xab, 0xf3, 0xe6, 0x61, 0x44, 0x2b, 0x72, 0x80, 0xfb, 0x22, 0x72, 0xbb, 0xeb, 0x16, 0xb0, 0xfd, 0x27, 0x38, 0x89, 0x31, 0xed, 0xc2, 0xac, 0x4b, 0x5f, 0x8a, 0xd6, 0xe1, 0xc1, 0xb6, 0x61, 0x9f, 0x36, 0xe1, 0xd5, 0x62, 0x85, 0x9f, 0xdf, 0xde, 0xd3, 0xa8, 0x9e, 0x01, 0xb4, 0x8e, 0xfc, 0x5b, 0xff, 0x5c, 0x17, 0x90, 0xc6, 0x8e, 0x67, 0x70, 0x12, 0x59, 0x0c, 0xb3, 0x8a, 0x93, 0xc8, 0xb2, 0xef, 0x1a, 0x81, 0xeb, 0x80, 0x74, 0x78, 0xb0, 0xf7, 0x83, 0xff, 0x09, 0xa5, 0xd4, 0x1d, 0x40, 0x17, 0x91, 0x7b, 0xbf, 0x01, 0xfc, 0x50, 0x61, 0xfd, 0x80, 0xc2, 0x2b, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 }; ���������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/nextzoom_png.h���������������������������������������������0000644�0004711�0000144�00000011135�10445152334�020237� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������static unsigned char nextzoom_png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, 0x61, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64, 0x88, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x02, 0x90, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x95, 0x93, 0x5b, 0x88, 0x4c, 0x71, 0x1c, 0xc7, 0x3f, 0xff, 0x73, 0xce, 0xfc, 0xf7, 0xcc, 0x39, 0x73, 0x0e, 0x27, 0x76, 0x5d, 0x22, 0x85, 0x07, 0x72, 0x69, 0x15, 0x92, 0xc8, 0x28, 0x1e, 0x30, 0x89, 0x22, 0xcb, 0x8b, 0x75, 0x89, 0x17, 0x97, 0xf5, 0x20, 0x29, 0x97, 0x07, 0x0f, 0x6c, 0xb9, 0xad, 0x07, 0x61, 0x94, 0x21, 0x85, 0x94, 0x17, 0x5e, 0x85, 0xf0, 0xaa, 0x8d, 0x74, 0x36, 0x36, 0x35, 0xd9, 0x65, 0x5c, 0xb2, 0x2c, 0x33, 0x3b, 0x3b, 0x97, 0xf3, 0xf3, 0xb0, 0x63, 0xad, 0x4b, 0xca, 0xf7, 0xd7, 0xf7, 0xed, 0x77, 0xef, 0xfb, 0x45, 0x44, 0x18, 0x4a, 0x20, 0x65, 0xc6,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xf6, 0x1d, 0x7c, 0x21, 0x57, 0x25, 0xd4, 0xa2, 0xf4, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/help.png���������������������������������������������������0000644�0004711�0000144�00000001114�10424574737�017005� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a���sBIT|d���tEXtSoftware�www.inkscape.org<��IDAT8QMkQ= I3%кۅ?V @�D E)]4Zm3㦁I:^9sHb�Wy >�S�(Lx Ibt l[:t}oh7(.0GK`C;\'VZ/c>P"R=)E~sFQ:jF) DuҿjE{ Hp:+0FIIDjJ˕"'EaYHY[yR-? cs�`+ׯ<oBݬTւ۷|X R 3?Y|>?8 .:?8X%;GίJّRv_hm㑄uK �:6@)QR 8h&[*,!ckkM4� R@&&TE+*dMB>t����IENDB`����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/previouszoom_png.h�����������������������������������������0000644�0004711�0000144�00000011377�10445152334�021145� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������static unsigned char previouszoom_png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, 0x61, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64, 0x88, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x02, 0xaa, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x95, 0x93, 0x4d, 0x6c, 0x54, 0x75, 0x14, 0xc5, 0x7f, 0xff, 0x37, 0x6f, 0xfe, 0xf3, 0xe6, 0x4d, 0xe7, 0xd5, 0xa7, 0x53, 0x60, 0xd1, 0x04, 0x08, 0x34, 0x51, 0x0a, 0x49, 0x65, 0xa1, 0x89, 0x34, 0x30, 0x31, 0xb2, 0x30, 0x8c, 0xc8, 0x02, 0xd2, 0xe2, 0xaa, 0x9a, 0x1a, 0x36, 0x7c, 0x74, 0x01, 0x21, 0x2e, 0x74, 0x8b, 0x0d, 0x24, 0x50, 0x4c, 0x24, 0x61, 0x9a, 0x38, 0x71, 0x63, 0x58, 0x08, 0x24, 0x1a, 0x5d, 0x18, 0x4d, 0xc1, 0xb2, 0x32, 0x81, 0x89, 0x9b, 0x41, 0x6d, 0x42, 0x1a, 0x5b, 0x2c, 0x6d, 0xb1, 0x50, 0xda, 0xe9, 0xf4, 0xcd, 0xc7, 0x71, 0x31, 0xb4, 0x29, 0x1a, 0x16, 0x9e, 0xe4, 0xec, 0xee, 0x3d, 0xb9, 0xf7, 0xe4, 0x1c, 0x24, 0xb1, 0x96, 0x40, 0x2e, 0x96, 0x4c, 0xe7, 0xdd, 0x96, 0xb0, 0x64, 0x5c, 0x5b, 0x76, 0x52, 0x61, 0xc9, 0x78, 0xe9, 0x3c, 0x90, 0xfb, 0xf7, 0xac, 0x24, 0xcc, 0xd3, 0x25, 0x8c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x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/config_png.h�����������������������������������������������0000644�0004711�0000144�00000010637�10445152334�017627� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������static unsigned char config_png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, 0x61, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64, 0x88, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x02, 0x71, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x7d, 0x92, 0x6b, 0x68, 0x8d, 0x71, 0x1c, 0xc7, 0x3f, 0xff, 0xff, 0xf3, 0x9c, 0xe7, 0x3c, 0xcf, 0xb3, 0x76, 0x4e, 0xa3, 0x49, 0xed, 0x2c, 0xe6, 0x52, 0x6e, 0x1d, 0x2f, 0xa4, 0x58, 0x91, 0x2d, 0x0b, 0xc9, 0xca, 0x2d, 0xac, 0x5c, 0xf3, 0xc6, 0xb5, 0x96, 0x4b, 0xed, 0x05, 0xd1, 0xf6, 0x86, 0x5a, 0x4c, 0x78, 0xa3, 0x29, 0x49, 0x21, 0x73, 0x09, 0x29, 0x97, 0xd0, 0x92, 0x44, 0x79, 0x41, 0x31, 0x84, 0x42, 0x34, 0xda, 0xc6, 0x76, 0xce, 0xce, 0x79, 0x6e, 0x3f, 0x2f, 0xd6, 0xc9, 0x1a, 0xf6, 0xad, 0xdf, 0x9b, 0xdf, 0xaf, 0x3e, 0xbf, 0xef, 0xef, 0x82, 0x88, 0x50, 0x08, 0x60, 0x4b, 0x32, 0x49, 0x87, 0x1d, 0xa7, 0xdb, 0x32, 0x69, 0x04, 0x4a, 0x06, 0xd7, 0xff, 0x15, 0x0c, 0x01, 0xa4, 0x1c, 0x87, 0xce, 0xed, 0x1b, 0x09, 0x97, 0x56, 0xd2, 0x9f, 0x70, 0x78, 0x0c, 0xe8, 0x61, 0x01, 0x40, 0x31, 0xa0, 0x06, 0x25, 0x26, 0x69, 0x4d, 0x98, 0xbf, 0x87, 0xcc, 0x1a, 0x4f, 0x9f, 0x6b, 0x71, 0x60, 0x38, 0x80, 0x06, 0x56, 0xda, 0x36, 0x47, 0xf9, 0xa3, 0x4c, 0x71, 0x31, 0x39, 0x2b, 0x09, 0x27, 0xd6, 0x52, 0x64, 0x1a, 0x6c, 0x66, 0x18, 0x99, 0x25, 0x25, 0x2c, 0xc9, 0x64, 0xa8, 0x8d, 0xc7, 0x55, 0xde, 0xf3, 0x78, 0x06, 0x4c, 0x2e, 0x2f, 0xc7, 0xc7, 0x85, 0xd1, 0xa5, 0xe0, 0x07, 0x24, 0x86, 0x05, 0x88, 0x90, 0x6a, 0x6a, 0x42, 0xb7, 0xb7, 0xb3, 0x4d, 0x84, 0xc8, 0x8e, 0xa3, 0xe7, 0xcc, 0x25, 0x8e, 0x0b, 0x25, 0xa5, 0x90, 0x0f, 0x70, 0x95, 0x52, 0xa6, 0x88, 0x04, 0xff, 0x83, 0x54, 0x95, 0x95, 0xd1, 0xe7, 0x79, 0x43, 0xc6, 0xeb, 0x44, 0xe4, 0x0e, 0xb2, 0x78, 0x3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c1, 0xb1, 0x0b, 0x2f, 0xa6, 0x01, 0xdd, 0x22, 0xf2, 0x0c, 0xe0, 0x37, 0xe8, 0x5b, 0x78, 0x8b, 0xbf, 0xa2, 0x69, 0xd7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 }; �������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/autoscale.png����������������������������������������������0000644�0004711�0000144�00000001354�10424574737�020043� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a���sBIT|d���tEXtSoftware�www.inkscape.org<��~IDAT8?hq?rg@!cV*.A:8 I:A:94H:((Hd S@lMb.9$N> ?x~{z,1DVfUsYe3@\AuPJĊ'Ɔ&fĉA9>nym,^S۹*"Rd.]/X0M 4—_PQ#x^}hz^pSvpļ@z@S!O2ih|s(nܗR$bQJ?o;خ/Ţp0YcY7pl48p:llJG²l8?vwX74=BSW= /! yH&=�R#�ZT$cff`~̲`rwM!AW�n|D!ѽai U�jMkL7‡M@Pmc`�&&`xՌ(7OЊ{'ˣOx~])1B 1@t'FBzbVY)Ջdk+ iPoB%:4aD+r"r'81¬K_a6bӨ[\ƎgpY Ȳtx @{Pa+����IENDB`������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/README.embedding�������������������������������������������0000644�0004711�0000144�00000001261�10445152333�020132� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������===================== Embedded PNG icons ===================== To have nice icons in its toolbar, the wxWidgets terminal needs bitmaps with a true alpha channel (i.e. each pixel has four characteristics : red, green, blue, transparency, each one is coded in 8 bits). This is easily provided by the use of PNG images. However, finding those files at run-time in a portable and reliable way is difficult. That is why they are embedded directly in the source code at compile time. The necessary preliminary step is to convert these binary files to C array. This is done with a utility called 'bin2c' whose source code can be found in the wxWidgets wiki (search for "Embedding PNG Images"). �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/clipboard.png����������������������������������������������0000644�0004711�0000144�00000001252�10424574737�020017� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a���sBIT|d���tEXtSoftware�www.inkscape.org<��<IDAT8OHq?z3)eAr. )d4A P?B;x xeà+ o3{L/<x~PV0<+wpH=8竿uiE5O_76į{oO^o݃+7�BD@DPp֌wn>_ 6 6VΤ[*Je/`eMV΄}!h"`ef+Vά_؂U6"9EW MӤ9~ʚ7y>= Ձ MMr4MC&F3! ]ۃ E U\x/o&/&E5~r P-gq~&@�1Ƙmhzzx=]t?i#cd~c0<C $ +,.;3ܺ?.&3DžW1l8SJ4&L?FrWOq>} "rbO[b-ee$#s2'qT_w[6 2af&kF9喠?H U_a,JU����IENDB`������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/replot.png�������������������������������������������������0000644�0004711�0000144�00000001132�10424574737�017362� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a���sBIT|d���tEXtSoftware�www.inkscape.org<��IDAT8=hQcOm2T,HNvqIŶ..J%N:p!FĨ-":4m4=prι/}I7; pybDh| &۳-`fw~Rx@{^i-FDf#{GI7TaCdu(i3q.l 6<B:/e32$C\Dֵ8 H Hu8 nxb_ߵ?9I=L|="8jD*)I̒V3. ֻO B ^J*OJZWmu=3ڟ4f%y= / K<@3#UPN,� t_0qaZA^^[\'nQ$_cNlf&vH`$C!� m>`zFV&Ӹ%D 7Q‰ 7i����IENDB`��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/previouszoom.png�������������������������������������������0000644�0004711�0000144�00000001430�10424574737�020637� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a���sBIT|d���tEXtSoftware�www.inkscape.org<��IDAT8MlTu7oMէS`4Q Ie4010⪚6|t!.t $PL$a8qcX$]M2AmB[,mPq1)=$@.Lݖd\[vRax<$%1 t<8 ta7lej|ߋb}an|YH%Rヶ%�0 `Q<Q}}AGC%.4x.uڭB8ƘAއx& CKZ{-~5�%cu(]-R'ywEUD8t^x$\'vg:@/3*;@jg56A{8nwEז~yWM2.A]pN[ř?k˒pb^j_\X`B8ӨF'.6īMbYbD\m›_/Dw;œzk.u|%%>[/n\XI~ž/ qrTeBr"˿R&II%?{oڄ Ok8ryF- \t.05F֦aE"OfnS-A . %\[Ki#`Ys IXX@����IENDB`����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/nextzoom.png�����������������������������������������������0000644�0004711�0000144�00000001376�10424574737�017752� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a���sBIT|d���tEXtSoftware�www.inkscape.org<��IDAT8[Lq?s9s'v]"ri(0"ˋu )la!^t665e\,3;;cKwEDJ eƽBe4=WDP"R#-yArښ7Ԉ=\܋v>~OYD>RR#:'rlWNm" _~xݟ /R*L?3}EߴM!nA$[JMas~Yů<dJ^LQKD;f(3y~0 J"ֵj J`ƽ􂝧D'A 15[J0Qf%c`{iX"W'g =_#BqS2ž{"҅7_ZnI0m7v"0Q;]-? 0jQwG;* �O 1ssic>8g#tCTyD-5p}޷bMqy0 7n!pxJO&DvgSiǂ"_e ]ᅧTsEDvB'oЪu= *+"W*Q%ݿxIcI˸Fs滧|ra>`{w)l/X q#i؎n?PJL9|!W%Ԣ\����IENDB`������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/replot_png.h�����������������������������������������������0000644�0004711�0000144�00000007166�10445152334�017672� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������static unsigned char replot_png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, 0x61, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64, 0x88, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x01, 0xec, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x95, 0x93, 0x3d, 0x68, 0x93, 0x51, 0x14, 0x86, 0x9f, 0x13, 0x63, 0xbe, 0xe4, 0xcb, 0x4f, 0x6d, 0x32, 0x04, 0x84, 0x80, 0x1d, 0x03, 0x1d, 0x54, 0x2c, 0x48, 0x86, 0x96, 0x08, 0x8a, 0x4e, 0x76, 0x10, 0x71, 0x11, 0xd1, 0x49, 0xc5, 0xb6, 0x08, 0x2e, 0x2e, 0x92, 0xad, 0xa3, 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d8, 0xc5, 0x06, 0x4e, 0x6c, 0x11, 0xf0, 0xed, 0xf9, 0xca, 0x66, 0x26, 0x02, 0xa1, 0x1a, 0x76, 0xa0, 0x48, 0x60, 0x24, 0xcb, 0xc4, 0x43, 0x97, 0xd6, 0x21, 0xd8, 0x00, 0xd6, 0x0a, 0x6d, 0x3e, 0xdf, 0xef, 0x60, 0x7a, 0xca, 0x46, 0xfd, 0xae, 0xa4, 0xda, 0x10, 0x07, 0x56, 0x07, 0x26, 0xbb, 0x82, 0xd3, 0xb8, 0xf1, 0x25, 0xdc, 0x44, 0x09, 0x37, 0x51, 0xc2, 0x89, 0xe6, 0x81, 0xd4, 0xd0, 0xc5, 0x1b, 0xb6, 0xa2, 0xfb, 0xc9, 0x7f, 0x20, 0xc1, 0x8d, 0x1b, 0xa9, 0x37, 0x69, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 }; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/grid_png.h�������������������������������������������������0000644�0004711�0000144�00000002154�10445152334�017302� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������static unsigned char grid_png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, 0x61, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64, 0x88, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x00, 0x46, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x63, 0xfc, 0xff, 0xff, 0x3f, 0x03, 0x25, 0x80, 0x09, 0x99, 0xc3, 0xc8, 0xc8, 0xf8, 0x9b, 0x14, 0x36, 0x86, 0x01, 0x64, 0x01, 0xa8, 0x17, 0x7e, 0x43, 0xf1, 0x7f, 0x12, 0xd8, 0x6f, 0xfe, 0xff, 0xff, 0x0f, 0x31, 0x00, 0x86, 0x19, 0x18, 0x18, 0x7e, 0x93, 0xc2, 0xfe, 0xff, 0xff, 0xff, 0xa8, 0x17, 0x46, 0xbd, 0x40, 0x1b, 0x2f, 0x7c, 0x24, 0x91, 0xcd, 0xc0, 0x48, 0x69, 0x76, 0x06, 0x00, 0xfa, 0x8b, 0xfb, 0xb9, 0xe9, 0x7c, 0x34, 0x62, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/clipboard_png.h��������������������������������������������0000644�0004711�0000144�00000010137�10445152333�020313� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������static unsigned char clipboard_png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, 0x61, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64, 0x88, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x02, 0x3c, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x85, 0x93, 0x4f, 0x48, 0x93, 0x71, 0x18, 0xc7, 0x3f, 0xef, 0x7a, 0x9d, 0x33, 0x29, 0x65, 0xd2, 0x41, 0xc3, 0x72, 0x2e, 0xb1, 0x11, 0x04, 0x0a, 0x29, 0x1d, 0x64, 0x34, 0x41, 0xa1, 0xcb, 0x20, 0x08, 0xcc, 0x50, 0x04, 0xc1, 0xa3, 0xbe, 0xa7, 0xe8, 0xd2, 0x3f, 0x42, 0x3b, 0x78, 0xe9, 0x16, 0x0a, 0x12, 0x78, 0x18, 0xe2, 0xc1, 0x98, 0xe0, 0x65, 0xa3, 0xc3, 0xa0, 0xa0, 0x9b, 0x2b, 0x98, 0x7f, 0x98, 0xc4, 0x0a, 0xb6, 0x0e, 0xf6, 0x6f, 0x33, 0x7b, 0xf7, 0xfa, 0xbe, 0xef, 0x9e, 0x0e, 0xdb, 0x4c, 0x97, 0xa3, 0x2f, 0x3c, 0xfc, 0x78, 0x9e, 0xdf, 0xf7, 0xf9, 0xc0, 0xef, 0xf9, 0xfd, 0x7e, 0x8a, 0x88, 0x50, 0x56, 0x30, 0x18, 0xbc, 0x0f, 0x3c, 0x2b, 0xa5, 0x77, 0xc3, 0xe1, 0x70, 0x88, 0xff, 0x48, 0xe9, 0xed, 0x3d, 0xeb, 0xef, 0xe8, 0x38, 0xfd, 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x3e, 0x7d, 0x0d, 0x22, 0x72, 0x62, 0x8c, 0x4f, 0x8d, 0x8b, 0x5b, 0xdc, 0x62, 0x8b, 0x2d, 0x65, 0x65, 0x24, 0x23, 0x73, 0x32, 0x27, 0x71, 0x89, 0x8b, 0x88, 0xc8, 0x54, 0x5f, 0x9f, 0xa8, 0x95, 0x77, 0x5b, 0xd6, 0x36, 0xdb, 0x0c, 0x32, 0x88, 0x03, 0xc7, 0x61, 0xad, 0x99, 0x66, 0x26, 0x98, 0xf8, 0x6b, 0xea, 0xee, 0x46, 0x39, 0xfa, 0x9d, 0x8f, 0xca, 0xdd, 0xe5, 0x96, 0xa0, 0x3f, 0x48, 0x03, 0x0d, 0x55, 0x5f, 0x61, 0x2c, 0x16, 0xe3, 0x0f, 0xb5, 0xec, 0x4a, 0x7f, 0x55, 0xed, 0x93, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/config.png�������������������������������������������������0000644�0004711�0000144�00000001337�10424574737�017331� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a���sBIT|d���tEXtSoftware�www.inkscape.org<��qIDAT8}khq?<ϳvNI,Rn/X- -\ƵKZLx)I!s )ВDyA1B4vyn?/ߛ߯>P`K2I2iJ  Vҟpx a@1%&iMOkq`8V6GLq19+ 'Rdlf%%,dUxL./Džѥ$jjBMȎ% %pRTyCDx:ÍfXt2I۔)vt ![Ei2 1҇w, 4xH\ۉ;{< +J)c}uzMe.ҹ*Oʋ̑(>ĩzF]ތkz'e"hʈDF.R3"NjYmmWEW #pwfm'z] . |D,qRW,~p?<>�LY;c,5 KJ)Cޱ}۹j EWǵ݈[^-ȏ Аb=T7ml>1m1tٖl]aػU'|醟YY mpe\C'| "2yi/�ai.‘| /" 7[xi����IENDB`�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/png/grid.png���������������������������������������������������0000644�0004711�0000144�00000000264�10424574737�017007� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a���sBIT|d���tEXtSoftware�www.inkscape.org<���FIDAT8c?% 6d~Co1�~F@/|$Hiv�|4b����IENDB`��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/xpm/�����������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�015341� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/xpm/rotate.xpm�������������������������������������������������0000644�0004711�0000144�00000000644�10751701600�017402� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* XPM */ static const char *rotate[]={ "16 16 3 1 7 7", ". c None", "a c #000000", "# c #ffffff", "................", "....##....##....", "..##aa#..#aa##..", "##aaaa#..#aaaa##", "aaaaaa#..#aaaaaa", "aaaaaa#..#aaaaaa", "#aaaaa#..#aaaaa#", "#a##aa#..#aa##a#", "#a#.##....##.#a#", "#a#..........#a#", "#aa##......##aa#", ".#aaa######aaa#.", "..#aaaaaaaaaa#..", "...##aaaaaa##...", ".....######.....", "................"}; ��������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/xpm/right.xpm��������������������������������������������������0000644�0004711�0000144�00000000644�10751701576�017235� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* XPM */ static const char *right[]={ "16 16 3 1 15 0", ". c None", "a c #000000", "# c #ffffff", "..............##", ".............#a#", "............#aa#", "...........#aaa#", "..........#aaaa#", ".........#aaaaa#", "........#aaaaaa#", ".......#aaaaaaa#", "......#aaaaaaaa#", "......####aaaaa#", ".........#aa#aa#", "........#aa#.#a#", "........#aa#..##", ".......#aa#.....", ".......#aa#.....", "........##......"}; ��������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/xpm/icon64x64.xpm����������������������������������������������0000644�0004711�0000144�00000040177�10751701575�017570� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* XPM */ static const char * icon64x64_xpm[] = { "64 64 500 2", " c None", ". c #555555", "+ c #313131", "@ c #474747", "# c #2D2D2D", "$ c #000000", "% c #1C1C1C", "& c #AAAAAA", "* c #CECECE", "= c #9F9F9F", "- c #8AA591", "; c #05C93B", "> c #00C837", ", c #5FCB7C", "' c #8E8E8E", ") c #D2D2D2", "! c #FFFFFF", "~ c #C5C5C5", "{ c #3AE96A", "] c #00F844", "^ c #0FF84F", "/ c #E8FEEE", "( c #AFAFAF", "_ c #7CD895", ": c #93FCB0", "< c #AACCB3", "[ c #0BF54B", "} c #3EFA71", "| c #FDFFFE", "1 c #A2A2A2", "2 c #C1C6C2", "3 c #29ED5F", "4 c #08F649", "5 c #A9CCB3", "6 c #59E17E", "7 c #74DA90", "8 c #84D69A", "9 c #01F844", "0 c #3FE76E", "a c #A4CEAF", "b c #09F64A", "c c #18F254", "d c #B8C8BC", "e c #EFFFF3", "f c #26F960", "g c #05F748", "h c #9BD0A9", "i c #FBFFFC", "j c #45FA77", "k c #77D992", "l c #6AFB92", "m c #4EE477", "n c #94FCB0", "o c #2DEC61", "p c #C0C6C2", "q c #B2FDC7", "r c #03F846", "s c #20F95C", "t c #B4C9BA", "u c #C9FDD8", "v c #0BF84C", "w c #0EF84E", "x c #D3FEDF", "y c #D2C7C7", "z c #DCFEE5", "A c #16F954", "B c #04F847", "C c #B5FDC9", "D c #D24B4D", "E c #FFE3E3", "F c #24F95F", "G c #99FCB4", "H c #D23A3C", "I c #FF5D5F", "J c #FFF0F0", "K c #F0FFF4", "L c #31F968", "M c #7BFB9E", "N c #FF4649", "O c #FF787B", "P c #FFFEFE", "Q c #F7FFF9", "R c #3FFA72", "S c #5EFA89", "T c #FEFFFE", "U c #FFB2B3", "V c #FAFFFB", "W c #4EFA7D", "X c #4AFA7A", "Y c #FF4E51", "Z c #FFE7E7", "` c #C3C6C4", " . c #57FA84", ".. c #3BFA6F", "+. c #F5FFF8", "@. c #D23C3E", "#. c #FF8082", "$. c #C4C5C4", "%. c #4BE475", "&. c #2DF965", "*. c #EEFFF3", "=. c #D28A8B", "-. c #FFCCCD", ";. c #C4C5C5", ">. c #52E37A", ",. c #E6FEED", "'. c #D2D1D1", "). c #FF7072", "!. c #FF6568", "~. c #FFFDFD", "{. c #53E27B", "]. c #1FF95B", "^. c #E1FEE9", "/. c #FDFDFF", "(. c #D2D3FF", "_. c #B3B5FF", ":. c #C1C3FF", "<. c #B5B5CC", "[. c #FFDADA", "}. c #FF484B", "|. c #FFB9BA", "1. c #FEFFFF", "2. c #55E27B", "3. c #19F957", "4. c #DBFEE5", "5. c #FBFBFF", "6. c #ABADFF", "7. c #5558FF", "8. c #4145FF", "9. c #5D60F3", "0. c #9D9ED7", "a. c #E97678", "b. c #F85558", "c. c #C7C1C1", "d. c #12F350", "e. c #A5CDB0", "f. c #ABACD0", "g. c #575BF5", "h. c #7477E8", "i. c #C3C3C6", "j. c #ADADB0", "k. c #CCB6B6", "l. c #FD4A4D", "m. c #DE8E8F", "n. c #4FE378", "o. c #11F44F", "p. c #A4CDAF", "q. c #9192DC", "r. c #4549FD", "s. c #7173EA", "t. c #C2C2C6", "u. c #5E60D3", "v. c #E57E80", "w. c #F95355", "x. c #090203", "y. c #4AE574", "z. c #10F44F", "A. c #A3CEAF", "B. c #C4C4C5", "C. c #7C7FE5", "D. c #474BFC", "E. c #6E71EB", "F. c #6164F1", "G. c #4246FF", "H. c #8E90DD", "I. c #7375E9", "J. c #3A3DE3", "K. c #CABABA", "L. c #FC4C4E", "M. c #701F20", "N. c #43E770", "O. c #7376E9", "P. c #BABBCA", "Q. c #ADADD0", "R. c #5256F7", "S. c #B6B7CB", "T. c #8385E2", "U. c #FF9C9D", "V. c #E73F42", "W. c #F4FFF7", "X. c #47FA78", "Y. c #15F352", "Z. c #A6CDB1", "`. c #8082FF", " + c #4A4DFF", ".+ c #BFC0FF", "++ c #B2B3CD", "@+ c #494CFC", "#+ c #8284FF", "$+ c #9193DC", "%+ c #FF4F52", "&+ c #6E1E1F", "*+ c #ECFEF1", "=+ c #38F96D", "-+ c #C4C4C6", ";+ c #6F72EA", ">+ c #5256FF", ",+ c #DBDCFF", "'+ c #9092DC", ")+ c #D1D2FF", "!+ c #B5B7FF", "~+ c #FF9C9E", "{+ c #E43F41", "]+ c #080202", "^+ c #DDFEE6", "/+ c #27F960", "(+ c #28F961", "_+ c #7577E8", ":+ c #585CFF", "<+ c #E4E4FF", "[+ c #5C5FF3", "}+ c #5D60FF", "|+ c #F4F4FF", "1+ c #F6F6FF", "2+ c #9496FF", "3+ c #3B3FE2", "4+ c #FFEFF0", "5+ c #6A1D1E", "6+ c #00350E", "7+ c #34F96A", "8+ c #EAFEF0", "9+ c #7E80E4", "0+ c #5B5FFF", "a+ c #EAEAFF", "b+ c #A7A8D2", "c+ c #6568FF", "d+ c #C0C1FF", "e+ c #D0D1FF", "f+ c #9396FF", "g+ c #5154FF", "h+ c #4448FE", "i+ c #8889C0", "j+ c #2C2D2C", "k+ c #81D097", "l+ c #FF999B", "m+ c #8F8041", "n+ c #00F042", "o+ c #42FA74", "p+ c #F1FFF5", "q+ c #575AFF", "r+ c #E7E8FF", "s+ c #9092FF", "t+ c #9C9ED7", "u+ c #06CC3C", "v+ c #C7FDD6", "w+ c #FFEEEE", "x+ c #FF4D50", "y+ c #FA4A49", "z+ c #73A846", "A+ c #5CFA87", "B+ c #F9FFFA", "C+ c #C4C5FF", "D+ c #4246FE", "E+ c #E3E3FF", "F+ c #F9F9FF", "G+ c #6D70FF", "H+ c #5255F8", "I+ c #A9AAD1", "J+ c #00CC38", "K+ c #14F953", "L+ c #C4FDD3", "M+ c #DCAA93", "N+ c #36D245", "O+ c #DADBFF", "P+ c #494DFF", "Q+ c #D9DAFF", "R+ c #CDB4B4", "S+ c #F65A5D", "T+ c #FD494C", "U+ c #FF4D4F", "V+ c #F6606B", "W+ c #8146C1", "X+ c #4D51FF", "Y+ c #9D9FFF", "Z+ c #BFBFC8", "`+ c #02F846", " @ c #52FA80", ".@ c #B7FDCA", "+@ c #7DFBA0", "@@ c #09F84B", "#@ c #09F84A", "$@ c #A4FCBC", "%@ c #EDEEFF", "&@ c #4347FE", "*@ c #9FA0D6", "=@ c #FFADAE", "-@ c #FD4A4C", ";@ c #D44672", ">@ c #934DB7", ",@ c #7677FD", "'@ c #6E72FF", ")@ c #7B7DFF", "!@ c #9698FF", "~@ c #C3C4FF", "{@ c #F8F8FF", "]@ c #1DE445", "^@ c #CB7F5D", "/@ c #FFFAFA", "(@ c #6B6EFF", "_@ c #FFA1A3", ":@ c #FF7C7E", "<@ c #FFF7F7", "[@ c #51C046", "}@ c #ED5349", "|@ c #FFB1B3", "1@ c #898BFF", "2@ c #7B7DE5", "3@ c #FFBEBF", "4@ c #FF7274", "5@ c #FFF5F5", "6@ c #90D0A1", "7@ c #00E13E", "8@ c #5D7634", "9@ c #FF585A", "0@ c #B1B2FF", "a@ c #6669EF", "b@ c #FFECEC", "c@ c #FF5255", "d@ c #FB4E51", "e@ c #DB9597", "f@ c #C8BEBE", "g@ c #FFF1F2", "h@ c #FF5557", "i@ c #FF7779", "j@ c #FFFCFC", "k@ c #84FCA5", "l@ c #58FA85", "m@ c #8CFCAB", "n@ c #000E04", "o@ c #180607", "p@ c #F44346", "q@ c #D483AF", "r@ c #4549FF", "s@ c #5F62FF", "t@ c #BDBDC8", "u@ c #FF8B8D", "v@ c #D1AAAA", "w@ c #FFECED", "x@ c #FF6B6D", "y@ c #FF9192", "z@ c #842426", "A@ c #EF4658", "B@ c #5545EC", "C@ c #4B4FFF", "D@ c #E1E1FF", "E@ c #FFE0E0", "F@ c #FF474A", "G@ c #FFF4F4", "H@ c #FF6E70", "I@ c #FFBDBE", "J@ c #0E0404", "K@ c #EB4043", "L@ c #FE464A", "M@ c #7645CC", "N@ c #C2C3FF", "O@ c #FF8688", "P@ c #FF6769", "Q@ c #C6C3C3", "R@ c #FF5F61", "S@ c #FF5053", "T@ c #A445A0", "U@ c #9A9CFF", "V@ c #FFC5C6", "W@ c #FFDFDF", "X@ c #15123F", "Y@ c #4445FC", "Z@ c #6F51DF", "`@ c #FCFAFD", " # c #FF8A8C", ".# c #FF676A", "+# c #FFB3B4", "@# c #414141", "## c #4F4F4F", "$# c #050615", "%# c #3A3EE4", "&# c #5145F0", "*# c #EB465C", "=# c #B45D5E", "-# c #3D3D3D", ";# c #735859", "># c #FF494C", ",# c #7D3F40", "'# c #4F4E4E", ")# c #BE373A", "!# c #FB5154", "~# c #4C4141", "{# c #363636", "]# c #000002", "^# c #2F32B7", "/# c #4245FE", "(# c #CA467C", "_# c #F84447", ":# c #2D0C0D", "<# c #AA2E30", "[# c #D53A3D", "}# c #020101", "|# c #210909", "1# c #8E2729", "2# c #1E2077", "3# c #9845A7", "4# c #D63B3D", "5# c #0D0404", "6# c #451314", "7# c #571819", "8# c #7C2223", "9# c #F94447", "0# c #21090A", "a# c #0D0E33", "b# c #4043F9", "c# c #3134C2", "d# c #54181C", "e# c #B73234", "f# c #060202", "g# c #170607", "h# c #E43E41", "i# c #CB383A", "j# c #010000", "k# c #090202", "l# c #DF3D40", "m# c #A32D2F", "n# c #919191", "o# c #B0B0B0", "p# c #A8A8B0", "q# c #373AD8", "r# c #5054FF", "s# c #B2B2C6", "t# c #F58385", "u# c #C74648", "v# c #8B8383", "w# c #888888", "x# c #B09F9F", "y# c #DA4648", "z# c #D1AAAB", "A# c #DB9899", "B# c #FD4548", "C# c #927475", "D# c #797979", "E# c #8C8FFF", "F# c #FFF9F9", "G# c #FF6D6F", "H# c #F65A5C", "I# c #D79C9D", "J# c #CAB9B9", "K# c #FFDFE0", "L# c #FFA9AA", "M# c #FF5558", "N# c #FF9E9F", "O# c #FFFDFE", "P# c #EA7375", "Q# c #272998", "R# c #FFEEEF", "S# c #FF6265", "T# c #FF797C", "U# c #FFC4C5", "V# c #FE484A", "W# c #B79E9E", "X# c #ECECFF", "Y# c #4F53FF", "Z# c #373AD7", "`# c #03030A", " $ c #FFEDED", ".$ c #FF696B", "+$ c #FF7A7C", "@$ c #D16667", "#$ c #787BFF", "$$ c #3F43F9", "%$ c #0D0D32", "&$ c #FF9092", "*$ c #FFA8AA", "=$ c #FFBCBD", "-$ c #E23F42", ";$ c #B4B6FF", ">$ c #1E2076", ",$ c #CFAEAF", "'$ c #E77B7C", ")$ c #F55B5D", "!$ c #FA5053", "~$ c #FF5E61", "{$ c #FF7B7E", "]$ c #FFAEB0", "^$ c #FFF1F1", "/$ c #FFFBFC", "($ c #F85557", "_$ c #E33E41", ":$ c #010102", "<$ c #DF8C8D", "[$ c #B9B9B9", "}$ c #E0E0E0", "|$ c #696BE0", "1$ c #393CE0", "2$ c #3D41E0", "3$ c #090922", "4$ c #ADADAD", "5$ c #B0A6A6", "6$ c #DE4143", "7$ c #E03D40", "8$ c #C73739", "9$ c #464646", "0$ c #1F1F1F", "a$ c #373737", ". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ ", "# $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % ", "# $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $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 $#%#8.8.8.&#*#=#####-#-#-#-###########;#>#N N N ,###-#-#-#-#############'#)#N N N !#~#-#-#{#$ $ $ % ", "# $ $ $ $ $ $ $ $ $ $ $ $ ]#^#8.8.8./#(#N _#:#$ $ $ $ $ $ $ $ $ $ <#N N N [#}#$ $ $ $ $ $ $ $ $ $ $ $ |#p@N N N 1#$ $ $ $ $ $ % ", "# $ $ $ $ $ $ $ $ $ $ $ $ 2#8.8.8.8.3#N N N 4#5#$ $ $ $ $ $ $ $ 6#N N N N 7#$ $ $ $ $ $ $ $ $ $ $ $ $ $ 8#N N N 9#0#$ $ $ $ $ % ", "# $ $ $ $ $ $ $ $ $ $ $ a#b#8.8.8.c#d#N N N N e#f#$ $ $ $ $ $ g#h#N N N i#j#$ $ $ $ $ $ $ $ $ $ $ $ $ $ k#l#N N N m#$ $ $ $ $ % ", "# $ $ $ n#o#o#o#o#o#o#p#q#8.8.8.r#s#o#t#N N N N u#v#w#w#o#o#x#y#N N N }.z#o#o#o#w#w#w#w#o#o#o#o#o#o#o#o#o#A#N N N B#C#D#$ $ $ % ", "# $ $ $ ) ! ! ! ! ! ! E#8.8.8.8.C+! ! F#G#N N N N H#I#J#K#L#M#N N N N N#! ! ! ! ~ ~ ~ ~ ! ! ! ! ! ! ! ! ! O#.#N N N P#( $ $ $ % ", "# $ $ $ ) ! ! ! ! ! ~@8.8.8.8.Q#! ! ! ! R#S#N N N N N N N N N N N N T#~.! ! ! ! ~ ~ ~ ~ ! ! ! ! ! ! ! ! ! ! U#N N N V#W#$ $ $ % ", "# $ $ $ ) ! ! ! ! X#Y#8.8.8.Z#`#! ! ! ! ! $.$N N N N N N N N N N +$<@! ! ! ! ! ~ ~ ~ ~ ! ! ! ! ! ! ! ! ! ! P .#N N N @$$ $ $ % ", "# $ $ $ ) ! ! ! ! #$8.8.8.$$%$$ ! ! ! ! ! ! <@&$F@N N N N N N Y *$~.! ! ! ! ! ! ~ ~ ~ ~ ! ! ! ! ! ! ! ! ! ! ! =$N N N -$$ $ $ % ", "# $ $ $ ) ! ! ! ;$8.8.8.8.>$$ $ ! ! ! ! ! ! ! ! ,$'$)$!$~${$]$^$! ! ! ! ! ! ! ! ~ ~ ~ ~ ! ! ! ! ! ! ! ! ! ! ! /$($N N _$$ $ $ % ", "# $ $ $ ) ! ! r+C@8.8.8.c#:$$ $ ! ! ! ! ! ! ! ! ~ ~ ~ ~ ! ! ! ! ! ! ! ! ! ! ! ! ~ ~ ~ ~ ! ! ! ! ! ! ! ! ! ! ! ! <$N N _$$ $ $ % ", "# $ $ $ [$}$}$|$1$1$1$2$3$$ $ $ }$}$}$}$}$}$}$}$4$4$4$4$}$}$}$}$}$}$}$}$}$}$}$}$4$4$4$4$}$}$}$}$}$}$}$}$}$}$}$}$5$6$7$8$$ $ $ % ", "# $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % ", "# $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % ", "# $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % ", "9$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$0$a$"}; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/xpm/size.xpm���������������������������������������������������0000644�0004711�0000144�00000000642�10751701600�017054� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* XPM */ static const char *size[]={ "16 16 3 1 7 7", ". c None", "a c #000000", "# c #ffffff", "......#a#.......", ".....#aaa#......", "....#aaaaa#.....", "...#aaaaaaa#....", "..#a###a###a#...", ".#aa#.#a#.#aa#..", "#aaa###a###aaa#.", "aaaaaaaaaaaaaaa.", "#aaa###a###aaa#.", ".#aa#.#a#.#aa#..", "..#a###a###a#...", "...#aaaaaaa#....", "....#aaaaa#.....", ".....#aaa#......", "......#a#.......", "................"}; ����������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/xpm/icon32x32.xpm����������������������������������������������0000644�0004711�0000144�00000015077�10751701575�017557� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* XPM */ static const char * icon32x32_xpm[] = { "32 32 280 2", " c None", ". c #2D2D2D", "+ c #181818", "@ c #252525", "# c #161616", "$ c #000000", "% c #0E0E0E", "& c #D2D2D2", "* c #E7E7E7", "= c #B2B2B2", "- c #8ABC98", "; c #01E03E", "> c #04E040", ", c #C5E6CE", "' c #A8A8A8", ") c #E9E9E9", "! c #FFFFFF", "~ c #C5C5C5", "{ c #BEC7C1", "] c #22EF5A", "^ c #00F844", "/ c #74FB99", "( c #BABABA", "_ c #B4B4B4", ": c #51E379", "< c #1FF058", "[ c #BEC7C0", "} c #7DD796", "| c #06F648", "1 c #A0CEAD", "2 c #CCFED9", "3 c #09F84B", "4 c #77D992", "5 c #E4FEEB", "6 c #1BF958", "7 c #4FE478", "8 c #F2FFF5", "9 c #30F967", "0 c #40FA73", "a c #C1C6C2", "b c #E9BDBE", "c c #F9FFFB", "d c #46FA77", "e c #27F961", "f c #EDFEF1", "g c #E94648", "h c #FFD9DA", "i c #FDFFFD", "j c #58FA84", "k c #17F955", "l c #DEFEE7", "m c #E94043", "n c #FF6366", "o c #FFF9F9", "p c #C4C5C5", "q c #68FB90", "r c #0FF84F", "s c #CEFEDB", "t c #E95457", "u c #FF4649", "v c #FFA4A6", "w c #58E17E", "x c #C0FDD1", "y c #E9BBBC", "z c #FF4E51", "A c #FFEDED", "B c #5BE080", "C c #06F849", "D c #B6FDCA", "E c #FEFEFF", "F c #BFC0FF", "G c #8284FF", "H c #7E80FF", "I c #8688E1", "J c #BBBBC9", "K c #EC6F71", "L c #E77B7C", "M c #5AE17F", "N c #04F747", "O c #88D59D", "P c #B8B8CB", "Q c #6265F0", "R c #4145FF", "S c #4E51F9", "T c #AFB0CE", "U c #A4A5C4", "V c #CEB1B1", "W c #FE474A", "X c #FE494C", "Y c #1E0809", "Z c #C4C5C4", "` c #54E27B", " . c #87D59C", ".. c #B0B1CE", "+. c #5053F8", "@. c #8D8FDD", "#. c #9899D9", "$. c #6064F1", "%. c #5659F6", "&. c #C1C1C7", "*. c #B5B5CC", "=. c #4A4DEC", "-. c #FF888A", ";. c #97292B", ">. c #FAFFFC", ",. c #5DFA88", "'. c #08F84A", "). c #8BD49F", "!. c #AFAFCF", "~. c #5154FF", "{. c #6E71FF", "]. c #EFEFFF", "^. c #C0C0C7", "/. c #575AF5", "(. c #A5A7FF", "_. c #EDEDFF", ":. c #5559F6", "<. c #3D41F1", "[. c #E8E9E8", "}. c #FFE2E3", "|. c #FF484B", "1. c #F84447", "2. c #1C150C", "3. c #46FA78", "4. c #0DF84D", "5. c #BDFDCE", "6. c #B3B4CD", "7. c #4E52F9", "8. c #787AFF", "9. c #F8F8FF", "0. c #A3A4D4", "a. c #484CFF", "b. c #C6C7FF", "c. c #E3E4FF", "d. c #B6B8FF", "e. c #5659FF", "f. c #5255E8", "g. c #93E6AA", "h. c #FF8688", "i. c #DB5F48", "j. c #24D843", "k. c #CBFED9", "l. c #F0F1FF", "m. c #5558F6", "n. c #7376FF", "o. c #F9F9FF", "p. c #8E90FF", "q. c #6063F1", "r. c #B0B0BF", "s. c #05E242", "t. c #86FCA6", "u. c #D4FEDF", "v. c #98E79F", "w. c #0EEF44", "x. c #2BF964", "y. c #FBFBFF", "z. c #6F72FF", "A. c #5B5EF4", "B. c #F6F6FF", "C. c #FFEAEB", "D. c #EC7072", "E. c #FC4C4F", "F. c #FD4E53", "G. c #A5469F", "H. c #6353ED", "I. c #5B5EFF", "J. c #777AFF", "K. c #B8BAFF", "L. c #C3C4C6", "M. c #00E23E", "N. c #57BB46", "O. c #F29C95", "P. c #8C8EFF", "Q. c #5053F9", "R. c #FFEFEF", "S. c #FF5D5F", "T. c #FF5356", "U. c #FFD7D8", "V. c #A3E7B6", "W. c #53FA81", "X. c #28F961", "Y. c #36F96B", "Z. c #1D5B1F", "`. c #FC4548", " + c #FF4A4D", ".+ c #B29DE9", "++ c #ABACD0", "@+ c #FF8486", "#+ c #F26264", "$+ c #CBB7B8", "%+ c #FFE8E9", "&+ c #FF7D7F", "*+ c #FF5255", "=+ c #FFE3E3", "-+ c #9F2C2D", ";+ c #D8466E", ">+ c #4645FA", ",+ c #BBBDFF", "'+ c #CBB7B7", ")+ c #FFFCFC", "!+ c #FF8183", "~+ c #FF6669", "{+ c #210C18", "]+ c #5B45E6", "^+ c #928BF6", "/+ c #FF7F81", "(+ c #FF9C9E", "_+ c #FFF7F7", ":+ c #FF6365", "<+ c #FF9D9F", "[+ c #242424", "}+ c #272727", "|+ c #2C2EAC", "1+ c #6745DA", "2+ c #E54B53", "3+ c #332A2B", "4+ c #1E1E1E", "5+ c #5B3536", "6+ c #FF474A", "7+ c #F54346", "8+ c #332324", "9+ c #4B2424", "0+ c #46292A", "a+ c #1D1D1D", "b+ c #1B1C69", "c+ c #3D41F0", "d+ c #BB3A55", "e+ c #A62E30", "f+ c #010000", "g+ c #060202", "h+ c #CA373A", "i+ c #892527", "j+ c #992A2C", "k+ c #AF3032", "l+ c #D8D8D8", "m+ c #B9BAD8", "n+ c #3F42F5", "o+ c #B1B3F1", "p+ c #E9CBCB", "q+ c #FF5053", "r+ c #D25A5C", "s+ c #AC999A", "t+ c #D8BABB", "u+ c #E26062", "v+ c #FF5C5F", "w+ c #E0D6D6", "x+ c #A7A7A7", "y+ c #E2D1D1", "z+ c #FE4649", "A+ c #A98484", "B+ c #FAFAFF", "C+ c #6568FF", "D+ c #282B9E", "E+ c #FFCFD0", "F+ c #FF4F51", "G+ c #FFDBDC", "H+ c #FF9C9D", "I+ c #E16466", "J+ c #9B9DFF", "K+ c #383BDB", "L+ c #03030C", "M+ c #FFE1E2", "N+ c #ED6D6F", "O+ c #FB4E51", "P+ c #FF595C", "Q+ c #FF8D8F", "R+ c #FFE9E9", "S+ c #FFEDEE", "T+ c #FD4A4D", "U+ c #F14245", "V+ c #DADADA", "W+ c #CCCDF0", "X+ c #3F43F0", "Y+ c #3E42F0", "Z+ c #0F1039", "`+ c #F0F0F0", " @ c #B9B9B9", ".@ c #DB6E70", "+@ c #E23E41", "@@ c #0F0F0F", ". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ ", "# $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % ", "# $ & * * * $ $ * * * * = = * * * * * * = - ; > , * * * = ' $ % ", "# $ ) ! ! ! $ $ ! ! ! ! ~ ~ ! ! ! ! ! ! { ] ^ / ! ! ! ! ~ ( $ % ", "# $ _ ~ ~ ~ $ $ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ : ^ < [ ~ ~ ~ ~ ~ ( $ % ", "# $ _ ~ ~ ~ $ $ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ } ^ | 1 ~ ~ ~ ~ ~ ~ ( $ % ", "# $ ) ! ! ! $ $ ! ! ! ! ~ ~ ! ! ! ! 2 3 ^ 4 ! ! ! ! ! ! ~ ( $ % ", "# $ ) ! ! ! $ $ ! ! ! ! ~ ~ ! ! ! 5 6 ^ 7 ~ ! ! ! ! ! ! ~ ( $ % ", "# $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4+}+}+5+6+7+8+4+4+}+}+}+9+`.X 0+a+$ % ", "# $ $ $ $ $ b+R c+d+u e+f+$ $ g+h+u i+$ $ $ $ $ $ $ j+u k+$ $ % ", "# $ ~ l+l+m+n+R o+p+q+u r+s+t+u+u v+w+l+x+x+l+l+l+l+y+z z+A+$ % ", "# $ ) ! B+C+R D+! ! E+F+u u u u T.G+! ! ~ ~ ! ! ! ! ! H+u I+$ % ", "# $ ) ! J+R K+L+! ! ! M+N+O+P+Q+R+! ! ! ~ ~ ! ! ! ! ! S+T+U+$ % ", "# $ V+W+X+Y+Z+$ `+`+`+`+ @ @`+`+`+`+`+`+ @ @`+`+`+`+`+`+.@+@$ % ", "# $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % ", "[+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a+"}; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/xpm/notfound.xpm�����������������������������������������������0000644�0004711�0000144�00000002172�10751701575�017751� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* XPM */ static const char * notfound_xpm[] = { "16 16 51 1", " c None", ". c #FF0000", "+ c #FF0D0D", "@ c #FF0606", "# c #FF7979", "$ c #FF6969", "% c #FF0C0C", "& c #FFEBEB", "* c #FFE3E3", "= c #FF0808", "- c #FF7676", "; c #FFFFFF", "> c #FF6E6E", ", c #FF0B0B", "' c #FFE9E9", ") c #020202", "! c #FFE6E6", "~ c #FF0A0A", "{ c #FF7272", "] c #000000", "^ c #FF7373", "/ c #FFE7E7", "( c #FF6F6F", "_ c #FF7878", ": c #FFE5E5", "< c #0D0D0D", "[ c #FFECEC", "} c #FF0E0E", "| c #FF6C6C", "1 c #262626", "2 c #242424", "3 c #FF7D7D", "4 c #FF0707", "5 c #E9E9E9", "6 c #FFEFEF", "7 c #FF1111", "8 c #FF6868", "9 c #7A7A7A", "0 c #FF8282", "a c #FFE0E0", "b c #FFF1F1", "c c #FF1313", "d c #FF6565", "e c #FDFDFD", "f c #FF8888", "g c #FF0909", "h c #FF0505", "i c #FF0404", "j c #FF0303", "k c #FF0202", "l c #FF0101", " . ", " +@ ", " .#$. ", " %&*= ", " .-;;>. ", " ,'))!~ ", " .{;]];^. ", " ~/;]];'% ", " .(;;]];;_. ", " =:;;<<;;[} ", " .|;;;12;;;3. ", " 4*;;;55;;;67 ", " .8;;;;99;;;;0. ", " @a;;;;]];;;;bc ", ".d;;;;;ee;;;;;f.", ".4~g=4@@hijjkl.."}; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/xpm/cross.xpm��������������������������������������������������0000644�0004711�0000144�00000000643�10751701575�017247� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* XPM */ static const char *cross[]={ "16 16 3 1 7 7", ". c None", "a c #000000", "# c #ffffff", "......###.......", "......#a#.......", "......#a#.......", "......#a#.......", "......#a#.......", "......#a#.......", "#######.#######.", "#aaaaa...aaaaa#.", "#######.#######.", "......#a#.......", "......#a#.......", "......#a#.......", "......#a#.......", "......#a#.......", "......###.......", "................"}; ���������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/bitmaps/xpm/icon16x16.xpm����������������������������������������������0000644�0004711�0000144�00000005277�10751701575�017564� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* XPM */ static const char * icon16x16_xpm[] = { "16 16 132 2", " c None", ". c #171717", "+ c #0C0C0C", "@ c #131313", "# c #0B0B0B", "$ c #E8E8E8", "% c #F3F3F3", "& c #000000", "* c #BCBCBC", "= c #87C999", "- c #1EED57", "; c #EAF3ED", "> c #B6B6B6", ", c #070707", "' c #C5C5C5", ") c #B3CAB9", "! c #16F252", "~ c #91D3A3", "{ c #C0C0C0", "] c #F4F4F4", "^ c #FFFFFF", "/ c #F8FFFA", "( c #3CFA70", "_ c #63DE85", ": c #F4E9E9", "< c #FEFFFE", "[ c #5AFA86", "} c #55FA82", "| c #C4C5C4", "1 c #F47073", "2 c #FFFDFE", "3 c #6FFB95", "4 c #3DFA71", "5 c #F7FFF9", "6 c #F46769", "7 c #FFB7B9", "8 c #5EE082", "9 c #31F968", "0 c #DFEFF3", "a c #BFC1FF", "b c #B3B3CD", "c c #C8A2A2", "d c #F85457", "e c #080202", "f c #5DE081", "g c #24EF5C", "h c #90A4CC", "i c #4C50FA", "j c #6A6DED", "k c #A3A4D4", "l c #9A9BD0", "m c #FF7E80", "n c #6B2120", "o c #67FB90", "p c #34F96A", "q c #8FA2CD", "r c #5356FF", "s c #D5D6FF", "t c #A0A1D5", "u c #5C5FFF", "v c #EAEAFF", "w c #BEBFFF", "x c #494DF3", "y c #87F1A4", "z c #DADBC1", "A c #43C745", "B c #48FA79", "C c #C9D7F5", "D c #D8D9FF", "E c #FFFAFA", "F c #DC9293", "G c #9C5ABC", "H c #504FFA", "I c #6C6FFF", "J c #A3A4CC", "K c #3EEF6E", "L c #17F955", "M c #5C953C", "N c #E9A1B2", "O c #5659FF", "P c #9E9FD6", "Q c #FF8587", "R c #EF696C", "S c #FF7C7E", "T c #FF7173", "U c #FFF8F8", "V c #300E11", "W c #6F45D3", "X c #A3A3FD", "Y c #FFD5D6", "Z c #FF5E60", "` c #C7C1C2", " . c #FFFEFE", ".. c #FF888A", "+. c #FF9192", "@. c #141414", "#. c #222485", "$. c #6841C8", "%. c #AF3A3D", "&. c #100F0F", "*. c #151414", "=. c #C93E41", "-. c #6C2324", ";. c #0F0F0F", ">. c #1D1313", ",. c #E54042", "'. c #441D1E", "). c #E1E1E1", "!. c #BCBDEB", "~. c #3A3EE4", "{. c #E6DFEE", "]. c #FF6D6F", "^. c #DF6062", "/. c #EE6A6C", "(. c #FF7476", "_. c #EDEBEB", ":. c #EBEBEB", "<. c #F8AFB0", "[. c #E25D5F", "}. c #E3E4EC", "|. c #565AF7", "1. c #121448", "2. c #F7F7F7", "3. c #F7F0F0", "4. c #D78B8C", "5. c #F7B1B2", "6. c #F7F2F2", "7. c #BFBFBF", "8. c #F7F3F3", "9. c #EB4E51", "0. c #080808", "a. c #0E0E0E", ". + + + + + + + + + + + + + + @ ", "# $ % & % % * % % % = - ; % > , ", "# * ' & ' ' ' ' ' ) ! ~ ' ' { , ", "# ] ^ & ^ ^ ' ^ / ( _ ^ ^ ^ { , ", "# : ^ & ^ ^ ' < [ } | ^ ^ ^ { , ", "# 1 2 & ^ ^ ' 3 4 5 ' ^ ^ ^ { , ", "# 6 7 & ^ ^ 8 9 0 a b ^ ^ ^ { , ", "# c d e ' f g h i j i k ' ' l , ", "# ] m n o p q r s ^ t u v w x , ", "# y z A B C i D ^ E F G H I J , ", "# K L M N O P ^ ^ Q R S T U { , ", "# ] ^ V W X ' ^ Y Z ` ...+.{ , ", "# @ @.#.$.%.&.*.=.-.;.@.>.,.'., ", "# ).!.~.{.].^./.(._.> :.:.<.[., ", "# }.|.1.2.3.4.5.6.2.7.2.2.8.9., ", "@ 0.0.0.0.0.0.0.0.0.0.0.0.0.0.a."}; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/wxt_gui.h��������������������������������������������������������������0000644�0004711�0000144�00000043135�12130567672�014770� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: wxt_gui.h,v 1.36.2.2 2013/04/05 16:39:47 markisch Exp $ */ /* GNUPLOT - wxt_gui.h */ /*[ * Copyright 2005,2006 Timothee Lecomte * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ /* ----------------------------------------------------- * The following code uses the wxWidgets library, which is * distributed under its own licence (derivated from the LGPL). * * You can read it at the following address : * http://www.wxwidgets.org/licence.htm * -----------------------------------------------------*/ /* ------------------------------------------------------ * This file is the C++ header dedicated to wxt_gui.cpp * Everything here is static. * ------------------------------------------------------*/ /* =========================================================== * includes * =========================================================*/ #ifndef GNUPLOT_WXT_H # define GNUPLOT_WXT_H /* NOTE : Order of headers inclusion : * - wxWidgets headers must be included before Windows.h * to avoid conflicts on Unicode macros, * - then stdfn.h must be included, to obtain definitions from config.h * - then the rest */ /* main wxWidgets header */ #include <wx/wxprec.h> #ifndef WX_PRECOMP # include <wx/wx.h> #endif /* WX_PRECOMP */ /* clipboard functionnality */ #include <wx/dataobj.h> #include <wx/clipbrd.h> /* wxImage facility */ #include <wx/image.h> /* double buffering facility for the drawing context */ #include <wx/dcbuffer.h> /* system options used with wxMSW to workaround PNG problem in the toolbar */ #include <wx/sysopt.h> /* wxConfig stuff */ #include <wx/config.h> /* wxGenericValidator */ #include <wx/valgen.h> /* wxMemoryInputStream, for the embedded PNG icons */ #include <wx/mstream.h> /* c++ vectors and lists, used to store gnuplot commands */ #include <vector> #include <list> /* suprisingly Cocoa version of wxWidgets does not define _Bool ! */ #ifdef __WXOSX_COCOA__ #define _Bool bool #endif extern "C" { /* for interactive */ # include "plot.h" /* for stdfn.h, JUSTIFY, encoding, *term definition, color.h */ # include "term_api.h" /* for do_event declaration */ # include "mouse.h" /* for rgb functions */ # include "getcolor.h" /* for paused_for_mouse, PAUSE_BUTTON1 and friends */ # include "command.h" /* for int_error */ # include "util.h" } /* if the gtk headers are available, use them to tweak some behaviours */ #if defined(__WXGTK__)&&defined(HAVE_GTK) # define USE_GTK #endif /* With wxGTK, we use a different cairo surface starting from gtk28 */ #if defined(__WXGTK__)&&defined(HAVE_GTK28) # define GTK_SURFACE #endif #if defined(__WXGTK__)&&!defined(HAVE_GTK28) # define IMAGE_SURFACE #endif /* by default, enable IMAGE_SURFACE */ #if !defined(GTK_SURFACE)&&!defined(IMAGE_SURFACE)&&!defined(__WXMSW__) # define IMAGE_SURFACE #endif /* temporarly undef GTK_SURFACE for two reasons : * - because of a CAIRO_OPERATOR_SATURATE bug, * - because as for now, it is slower than the pure image surface, * (multiple copies between video memory and main memory for operations that are * not supported by the X server) */ #ifdef GTK_SURFACE # undef GTK_SURFACE # define IMAGE_SURFACE #endif /* depending on the platform, and mostly because of the Windows terminal which * already has its event loop, we may or may not be multithreaded */ #if defined(__WXGTK__) # define WXT_MULTITHREADED #elif defined(__WXMSW__) || defined(__WXMAC__) # define WXT_MONOTHREADED #else # error "wxt does not know if this platform has to be mono- or multi-threaded" #endif extern "C" { /* Windows native backend, * redefinition of fprintf, getch... * console window */ # ifdef _Windows # ifndef _WIN32_WINNT # define _WIN32_WINNT 0x0500 # endif # include "Windows.h" # include "win/wtext.h" # include "win/winmain.h" # endif /* for cairo_t */ # include <cairo.h> # ifdef USE_GTK # include <gdk/gdk.h> # include <gtk/gtk.h> # endif # ifdef _Windows # include <cairo-win32.h> # endif /* to avoid to receive SIGINT in wxWidgets threads, * already included unconditionally in plot.c, * only needed here when using WXGTK * (or at least not needed on Windows) */ # include <signal.h> } /* interaction with wxt.trm(wxt_options) : plot number, enhanced state. * Communication with gnuplot (wxt_exec_event) * Initialization of the library, and checks */ #include "wxt_term.h" /* drawing facility */ #include "gp_cairo.h" #include "gp_cairo_helpers.h" /* ====================================================================== * declarations * ====================================================================*/ #ifdef WXT_MULTITHREADED /* thread class, where the gui loop runs. * Not needed with Windows, where the main loop * already processes the gui messages */ class wxtThread : public wxThread { public: wxtThread() : wxThread(wxTHREAD_JOINABLE) {}; /* thread execution starts in the following */ void *Entry(); }; /* instance of the thread */ static wxtThread * thread; #endif /* WXT_MULTITHREADED */ DECLARE_EVENT_TYPE(wxExitLoopEvent, -1) DEFINE_EVENT_TYPE(wxExitLoopEvent) DECLARE_EVENT_TYPE(wxCreateWindowEvent, -1) DEFINE_EVENT_TYPE(wxCreateWindowEvent) #ifdef USE_MOUSE DECLARE_EVENT_TYPE(wxStatusTextEvent, -1) DEFINE_EVENT_TYPE(wxStatusTextEvent) #endif /* USE_MOUSE */ /* Define a new application type, each gui should derive a class from wxApp */ class wxtApp : public wxApp { public: /* This one is called just after wxWidgets initialization */ bool OnInit(); /* cleanup on exit */ int OnExit(); /* event handler */ void OnExitLoop( wxCommandEvent &event ); /* event handler */ void OnCreateWindow( wxCommandEvent &event ); /* wrapper for AddPendingEvent or ProcessEvent */ void SendEvent( wxEvent &event); private: /* any class wishing to process wxWidgets events must use this macro */ DECLARE_EVENT_TABLE() /* load a toolbar icon */ void LoadPngIcon(const unsigned char *embedded_png, int length, int icon_number); /* load a cursor */ void LoadCursor(wxCursor &cursor, const char* xpm_bits[]); }; /* IDs for gnuplot commands */ typedef enum wxt_gp_command_t { command_color = 1, command_linetype, command_linestyle, command_move, command_vector, command_put_text, command_enhanced_put_text, command_enhanced_init, command_enhanced_open, command_enhanced_writec, command_enhanced_flush, command_enhanced_finish, command_set_font, command_justify, command_point, command_pointsize, command_linewidth, command_text_angle, command_fillbox, command_filled_polygon, command_image, command_layer } wxt_gp_command_t; /* base structure for storing gnuplot commands */ typedef struct gp_command { enum wxt_gp_command_t command; unsigned int x1; unsigned int y1; unsigned int x2; unsigned int y2; unsigned int x3; unsigned int y3; unsigned int x4; unsigned int y4; int integer_value; int integer_value2; double double_value; double double_value2; char *string; gpiPoint *corners; enum JUSTIFY mode; rgb_color color; unsigned int * image; } gp_command; /* declare a type for our list of gnuplot commands */ typedef std::list<gp_command> command_list_t; /* panel class : this is the space between the toolbar * and the status bar, where the plot is actually drawn. */ class wxtPanel : public wxPanel { public : /* constructor*/ wxtPanel( wxWindow* parent, wxWindowID id, const wxSize& size ); /* event handlers (these functions should _not_ be virtual)*/ void OnPaint( wxPaintEvent &event ); void OnEraseBackground( wxEraseEvent &event ); void OnMouseLeave( wxMouseEvent &event ); void OnSize( wxSizeEvent& event ); void OnMotion( wxMouseEvent& event ); void OnLeftDown( wxMouseEvent& event ); void OnLeftUp( wxMouseEvent& event ); void OnMiddleDown( wxMouseEvent& event ); void OnMiddleUp( wxMouseEvent& event ); void OnRightDown( wxMouseEvent& event ); void OnRightUp( wxMouseEvent& event ); void OnMouseWheel( wxMouseEvent& event ); void OnKeyDownChar( wxKeyEvent& event ); void UpdateModifiers( wxMouseEvent& event ); void RaiseConsoleWindow(); void DrawToDC( wxDC& dc, wxRegion& region ); void Draw(); void wxt_settings_queue(TBOOLEAN antialiasing, TBOOLEAN oversampling, int hinting_setting); void wxt_settings_apply(); /* list of commands sent by gnuplot */ command_list_t command_list; /* mutex protecting this list */ wxMutex command_list_mutex; /* method to clear the command list, free the allocated memory */ void ClearCommandlist(); #ifdef USE_MOUSE /* mouse and zoom events datas */ bool wxt_zoombox; int mouse_x, mouse_y; int zoom_x1, zoom_y1; wxString zoom_string1, zoom_string2; bool wxt_ruler; double wxt_ruler_x, wxt_ruler_y; bool wxt_ruler_lineto; /* modifier_mask for wxKeyEvents */ int modifier_mask; #endif /* cairo context creation */ void wxt_cairo_create_context(); void wxt_cairo_free_context(); /* platform-dependant cairo context creation */ int wxt_cairo_create_platform_context(); void wxt_cairo_free_platform_context(); #ifdef IMAGE_SURFACE void wxt_cairo_create_bitmap(); #endif /* functions used to process the command list */ void wxt_cairo_refresh(); void wxt_cairo_exec_command(gp_command command); /* the plot structure, defined in gp_cairo.h */ plot_struct plot; /* destructor*/ ~wxtPanel(); private: /* any class wishing to process wxWidgets events must use this macro */ DECLARE_EVENT_TABLE() bool settings_queued; TBOOLEAN antialiasing_queued; TBOOLEAN oversampling_queued; int hinting_queued; wxMutex mutex_queued; #ifdef USE_MOUSE /* watches for time between mouse clicks */ wxStopWatch left_button_sw; wxStopWatch right_button_sw; wxStopWatch middle_button_sw; #endif /*USE_MOUSE*/ /* cairo surfaces, which depends on the implementation */ #if defined(GTK_SURFACE) GdkPixmap *gdkpixmap; #elif defined(__WXMSW__) HDC hdc; HBITMAP hbm; #else /* generic 'image' surface */ unsigned int *data32; wxBitmap* cairo_bitmap; #endif }; /* class implementing the configuration dialog */ class wxtConfigDialog : public wxDialog { public : /* constructor*/ wxtConfigDialog(wxWindow* parent); void OnRendering( wxCommandEvent& event ); void OnButton( wxCommandEvent& event ); void OnClose( wxCloseEvent& event ); /* destructor*/ ~wxtConfigDialog() {}; private: /* any class wishing to process wxWidgets events must use this macro */ DECLARE_EVENT_TABLE() /* these two elements are enabled/disabled dynamically */ wxSlider *slider; wxStaticText *text_hinting; /* settings */ bool raise_setting; bool persist_setting; bool ctrl_setting; bool toggle_setting; /* rendering_setting : * 0 = no antialiasing, no oversampling * 1 = antialiasing, no oversampling * 2 = antialiasing and oversampling * Note that oversampling without antialiasing makes no sense */ int rendering_setting; int hinting_setting; }; /* Define a new frame type: this is our main frame */ class wxtFrame : public wxFrame { public: /* constructor*/ wxtFrame( const wxString& title, wxWindowID id ); /* event handlers (these functions should _not_ be virtual)*/ void OnClose( wxCloseEvent& event ); void OnSize( wxSizeEvent& event ); void OnCopy( wxCommandEvent& event ); #ifdef USE_MOUSE void OnReplot( wxCommandEvent& event ); void OnToggleGrid( wxCommandEvent& event ); void OnZoomPrevious( wxCommandEvent& event ); void OnZoomNext( wxCommandEvent& event ); void OnAutoscale( wxCommandEvent& event ); void OnSetStatusText( wxCommandEvent& event ); #endif /*USE_MOUSE*/ void OnConfig( wxCommandEvent& event ); void OnHelp( wxCommandEvent& event ); /* wrapper for AddPendingEvent or ProcessEvent */ void SendEvent( wxEvent &event); /* destructor*/ ~wxtFrame() {}; wxtPanel * panel; bool config_displayed; private: wxtConfigDialog * config_dialog; /* any class wishing to process wxWidgets events must use this macro */ DECLARE_EVENT_TABLE() }; /* IDs for the controls and the menu commands, and for wxEvents */ enum { /* start at wxID_HIGHEST to avoid collisions */ Toolbar_CopyToClipboard = wxID_HIGHEST, Toolbar_Replot, Toolbar_ToggleGrid, Toolbar_ZoomPrevious, Toolbar_ZoomNext, Toolbar_Autoscale, Toolbar_Config, Toolbar_Help, Config_Rendering, Config_OK, Config_APPLY, Config_CANCEL }; /* array of toolbar icons */ #define ICON_NUMBER 8 static wxBitmap* toolBarBitmaps[ICON_NUMBER]; /* frames icons in the window manager */ static wxIconBundle icon; /* mouse cursors */ static wxCursor wxt_cursor_cross; static wxCursor wxt_cursor_right; static wxCursor wxt_cursor_rotate; static wxCursor wxt_cursor_size; #ifdef DEBUG /* performance watch */ static wxStopWatch sw; #endif /* wxt_abort_init is set to true if there is an error when * wxWidgets is initialized, for example if the X server is unreachable. * If there has been an error, we should not try to initialize again, * because the following try-out will return that it succeeded, * although this is false. */ static bool wxt_abort_init = false; /* Sometimes, terminal functions are called although term->init() has not been called before. * It's the case when you hit 'set terminal wxt' twice. * So, we check for earlier initialisation. * External module, such as cairo, can check for status!=0, instead of using the enums defined here. * This is used to process interrupt (ctrl-c) */ enum { STATUS_OK = 0, STATUS_UNINITIALIZED, STATUS_INCONSISTENT, STATUS_INTERRUPT_ON_NEXT_CHECK, STATUS_INTERRUPT }; static int wxt_status = STATUS_UNINITIALIZED; /* wxt_handling_persist is set to true after a child process is created for the * "persist-effect", and starts handling events directly without having two * separate threads. */ static bool wxt_handling_persist = false; /* structure to store windows and their ID * also used to pass titles and waiting condition to the GUI thread on * window creation */ typedef struct wxt_window_t { wxWindowID id; wxtFrame * frame; wxString title; wxMutex * mutex; wxCondition * condition; int axis_mask; wxt_axis_state_t axis_state[4]; } wxt_window_t; /* list of already created windows */ static std::vector<wxt_window_t> wxt_window_list; /* given a window number, return the window structure */ static wxt_window_t* wxt_findwindowbyid(wxWindowID); /* pointers to currently active instances */ static wxt_window_t *wxt_current_window; static command_list_t *wxt_current_command_list; static wxtPanel *wxt_current_panel; static plot_struct *wxt_current_plot; /* push a command to the commands list */ static void wxt_command_push(gp_command command); #ifdef USE_MOUSE /* routine to send an event to gnuplot * returns true if the event has really been processed - it will * not if the window is not the current one. */ static bool wxt_exec_event(int type, int mx, int my, int par1, int par2, wxWindowID id); static void wxt_check_for_toggle(unsigned int x, unsigned int y); /* process one event, returns true if it ends the pause */ static bool wxt_process_one_event(struct gp_event_t *); # ifdef WXT_MULTITHREADED /* set of pipe file descriptors for event communication with the core */ int wxt_event_fd = -1; int wxt_sendevent_fd = -1; # endif /* WXT_MULTITHREADED */ #endif /*USE_MOUSE*/ /* helpers to handle the issues of the default Raise() and Lower() methods */ static void wxt_raise_window(wxt_window_t* window, bool force); static void wxt_lower_window(wxt_window_t* window); /* cleanup on exit : close all created windows, delete thread if necessary */ static void wxt_cleanup(); /* helpers for gui mutex handling : they do nothing in WXMSW */ static void wxt_MutexGuiEnter(); static void wxt_MutexGuiLeave(); /* interrupt stuff */ static void (*original_siginthandler) (int); static void wxt_sigint_handler(int WXUNUSED(sig)); static void wxt_sigint_return(); static void wxt_sigint_check(); static void wxt_sigint_init(); static void wxt_sigint_restore(); static int wxt_sigint_counter = 0; /* cleanup at exit, and handle 'persist' setting */ void wxt_atexit(); #endif /*gnuplot_wxt_h*/ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/gp_cairo.h�������������������������������������������������������������0000644�0004711�0000144�00000021547�11556267152�015071� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: gp_cairo.h,v 1.17 2011/04/28 13:40:58 markisch Exp $ */ /* GNUPLOT - gp_cairo.h */ /*[ * Copyright 2005,2006 Timothee Lecomte * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ /* ----------------------------------------------------- * This code uses the cairo library, a 2D graphics library with * support for multiple output devices. * Cairo is distributed under the LGPL licence. * * See http://www.cairographics.org for details. * It also uses the pango library, a text-layout rendering library. * Pango is distributed under the LGPL licence. * * See http://www.pango.org for details. * -----------------------------------------------------*/ /* ------------------------------------------------------ * This is the header for all cairo related functions, * which provide drawing facilities to implement gnuplot's needs. * * In particular, we have here : * - all the basic calls (lines, polygons for pm3d, custom patterns), * - image support, * - enhanced text mode * * The text rendering is done via pango. * ------------------------------------------------------*/ #ifndef GNUPLOT_WXT_CAIRO_H # define GNUPLOT_WXT_CAIRO_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /* for JUSTIFY, set_encoding_id, *term definitions, color.h */ # include "term_api.h" /* for rgb functions */ # include "getcolor.h" # include <cairo.h> /* oversampling scale */ #define GP_CAIRO_SCALE 20 /* linked list in reverse order used to draw polygons more efficiently */ typedef struct path_item { gpiPoint *corners; int n; rgb_color color; struct path_item *previous; } path_item; /* plot structure containing all the information cairo needs to execute * the drawing commands. * Don't forget to update gp_cairo_initialize_plot when a new entry is added there. */ typedef struct plot_struct { /* scaling and conversion between gnuplot and device coordinates. * For a static terminal, scales are 1 and sizes are those of the term table. * For an interactive terminal, they are used to handle window resizing. * xmax and ymax are the sizes known by gnuplot. * device_xmax and device_ymax are the device size, which may change when the window * is resized. * xmax and ymax are stored here in addition to term->xmax and term->ymax, * to handle the case when another terminal is chosen (x11 for example), which * may change these variables whereas we want to keep the one used for our plot */ double xscale, yscale; int device_xmax, device_ymax; int xmax, ymax; /* either GP_CAIRO_SCALE or 1, depending on rendering */ int oversampling_scale; /* handle vertical/horizontal lines properly */ double current_x, current_y; double orig_current_x, orig_current_y; /* style data used while processing gnuplot commands */ JUSTIFY justify_mode; int linetype; double linewidth; int linestyle; double pointsize; double dashlength; double text_angle; rgb_color color; rgb_color background; /* "polyline" */ TBOOLEAN opened_path; /* font handling */ char fontname[MAX_ID_LEN + 1]; int fontweight; int fontstyle; double fontsize; enum set_encoding_id encoding; /* state of the cairo context creation */ TBOOLEAN success; TBOOLEAN antialiasing; TBOOLEAN oversampling; TBOOLEAN rounded; /* hinting option for horizontal and vertical lines : * Hinting is the process of fitting outlines to the pixel grid * in order to improve the appearance of the result. * Since hinting outlines involves distorting them, * it also reduces the faithfulness to the original outline shapes. * hinting = 100 means full hinting * hinting = 0 means no hinting */ int hinting; TBOOLEAN polygons_saturate; /* cairo drawing context */ cairo_t *cr; /* polygons list */ path_item *polygon_path_last; /* flag set to true when the user hit ctrl-c */ TBOOLEAN interrupt; } plot_struct; /* linetype enums */ enum { GP_CAIRO_SOLID, GP_CAIRO_DASH, GP_CAIRO_DOTS }; /* correspondance between gnuplot's linetypes and colors */ rgb_color gp_cairo_linetype2color( int linetype ); void gp_cairo_set_background(rgb_color background); /* functions to handle scaling between device and gnuplot coordinates */ double device_x(plot_struct *plot, double x); double device_y(plot_struct *plot, double y); double gnuplot_x(plot_struct *plot, double x); double gnuplot_y(plot_struct *plot, double y); /* initialize all fields of the plot structure */ void gp_cairo_initialize_plot(plot_struct *plot); /* initialize the transformation matrix of the drawing context and other details */ /* Depends on the setting of xscale and yscale */ void gp_cairo_initialize_context(plot_struct *plot); /* functions used to process gnuplot commands */ void gp_cairo_move(plot_struct *plot, int x, int y); void gp_cairo_vector(plot_struct *plot, int x, int y); void gp_cairo_stroke(plot_struct *plot); void gp_cairo_draw_text(plot_struct *plot, int x1, int y1, const char* str); void gp_cairo_draw_enhanced_text(plot_struct *plot, int x1, int y1, const char* str); void gp_cairo_enhanced_init(plot_struct *plot, int len); void gp_cairo_enhanced_finish(plot_struct *plot, int x, int y); void gp_cairo_enhanced_open(plot_struct *plot, char* fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint); void gp_cairo_enhanced_flush(plot_struct *plot); void gp_cairo_enhanced_writec(plot_struct *plot, int character); void gp_cairo_draw_point(plot_struct *plot, int x1, int y1, int style); void gp_cairo_draw_fillbox(plot_struct *plot, int x, int y, int width, int height, int style); void gp_cairo_draw_polygon(plot_struct *plot, int n, gpiPoint *corners); void gp_cairo_end_polygon(plot_struct *plot); void gp_cairo_draw_image(plot_struct *plot, unsigned int * image, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int M, int N); void gp_cairo_set_color(plot_struct *plot, rgb_color color); void gp_cairo_set_linestyle(plot_struct *plot, int linestyle); void gp_cairo_set_linetype(plot_struct *plot, int linetype); void gp_cairo_set_pointsize(plot_struct *plot, double pointsize); void gp_cairo_set_justify(plot_struct *plot, JUSTIFY mode); void gp_cairo_set_font(plot_struct *plot, const char *name, int fontsize); void gp_cairo_set_linewidth(plot_struct *plot, double linewidth); void gp_cairo_set_textangle(plot_struct *plot, double angle); /* erase the contents of the cairo drawing context */ void gp_cairo_solid_background(plot_struct *plot); void gp_cairo_clear_background(plot_struct *plot); /* helps to fill term->h_char, v_char, h_tic, v_tic * Depends on plot->fontsize and fontname */ void gp_cairo_set_termvar(plot_struct *plot, unsigned int *v_char, unsigned int *h_char); /* translate plot->encoding int to char* suitable for glib */ const char* gp_cairo_get_encoding(plot_struct *plot); /* determine default font to use */ const char * gp_cairo_default_font(void); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /* gnuplot_wxt_cairo_h */ ���������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/Makefile.in������������������������������������������������������������0000644�0004711�0000144�00000027106�12223337636�015174� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/wxterminal DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alpha.m4 \ $(top_srcdir)/m4/apple.m4 $(top_srcdir)/m4/beos.m4 \ $(top_srcdir)/m4/msdos.m4 $(top_srcdir)/m4/next.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROEPS_CFLAGS = @CAIROEPS_CFLAGS@ CAIROEPS_LIBS = @CAIROEPS_LIBS@ CAIROPANGO_CFLAGS = @CAIROPANGO_CFLAGS@ CAIROPANGO_LIBS = @CAIROPANGO_LIBS@ CAIROPDF_CFLAGS = @CAIROPDF_CFLAGS@ CAIROPDF_LIBS = @CAIROPDF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIST_CONTACT = @DIST_CONTACT@ DVIPS = @DVIPS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ GDLIB_CONFIG = @GDLIB_CONFIG@ GIHDIR = @GIHDIR@ GREP = @GREP@ GTK28_CFLAGS = @GTK28_CFLAGS@ GTK28_LIBS = @GTK28_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEXPAND = @KPSEXPAND@ LASERGNU = @LASERGNU@ LATEX = @LATEX@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARIES_FOR_X = @LIBRARIES_FOR_X@ LIBS = @LIBS@ LINUXSUID = @LINUXSUID@ LISPDIR = @LISPDIR@ LN_S = @LN_S@ LRELEASE = @LRELEASE@ LTLIBOBJS = @LTLIBOBJS@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGO_1_10_2_CFLAGS = @PANGO_1_10_2_CFLAGS@ PANGO_1_10_2_LIBS = @PANGO_1_10_2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PDFLIB_CONFIG = @PDFLIB_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ PLAINTEX = @PLAINTEX@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RCC = @RCC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMLIBS = @TERMLIBS@ TERMXLIBS = @TERMXLIBS@ TEXDIR = @TEXDIR@ TEXHASH = @TEXHASH@ TROFF = @TROFF@ TUTORIAL = @TUTORIAL@ UIC = @UIC@ VERSION = @VERSION@ VERSION_MAJOR = @VERSION_MAJOR@ WX_CONFIG = @WX_CONFIG@ WX_LIBS = @WX_LIBS@ X11_APPDEFAULTS_DIR = @X11_APPDEFAULTS_DIR@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_OBJC = @ac_ct_OBJC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign # here are listed all the wxterminal files that go to the distribution EXTRA_DIST = gp_cairo.c gp_cairo.h wxt_gui.cpp wxt_gui.h \ gp_cairo_helpers.c gp_cairo_helpers.h wxt_term.h bitmaps all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/wxterminal/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/wxterminal/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/gp_cairo_helpers.h�����������������������������������������������������0000644�0004711�0000144�00000005154�11133120160�016561� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: gp_cairo_helpers.h,v 1.1 2009/01/13 14:08:48 tlecomte Exp $ */ /* GNUPLOT - gp_cairo_helpers.h */ /*[ * Copyright 2009 Timothee Lecomte * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #ifndef GNUPLOT_GP_CAIRO_HELPERS_H # define GNUPLOT_GP_CAIRO_HELPERS_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /* for JUSTIFY, set_encoding_id, *term definitions, color.h */ # include "term_api.h" unsigned int * gp_cairo_helper_coordval_to_chars(coordval* image, int M, int N, t_imagecolor color_mode); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /* gnuplot_gp_cairo_helpers_h */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/gp_cairo_helpers.c�����������������������������������������������������0000644�0004711�0000144�00000007506�11272745002�016573� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: gp_cairo_helpers.c,v 1.3 2009/10/31 05:24:18 sfeam Exp $ */ /* GNUPLOT - gp_cairo_helpers.c */ /*[ * Copyright 2009 Timothee Lecomte * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #include "gp_cairo_helpers.h" #include "alloc.h" /* for rgb functions */ # include "getcolor.h" unsigned int * gp_cairo_helper_coordval_to_chars(coordval* image, int M, int N, t_imagecolor color_mode) { int m,n; unsigned int *image255, *image255copy; rgb_color rgb1; rgb255_color rgb255; /* cairo image buffer, upper bits are alpha, then r, g and b * Depends on endianess */ image255 = (unsigned int*) malloc(M*N*sizeof(unsigned int)); if (!image255) { fprintf(stderr,"cairo terminal: out of memory!\n"); exit(-1);} image255copy = image255; /* TrueColor 24-bit plot->color mode */ if (color_mode == IC_RGB) { for (n=0; n<N; n++) { for (m=0; m<M; m++) { rgb1.r = *image++; rgb1.g = *image++; rgb1.b = *image++; rgb255_from_rgb1( rgb1, &rgb255 ); *image255copy++ = (0xFF<<24) + (rgb255.r<<16) + (rgb255.g<<8) + rgb255.b; } } } else if (color_mode == IC_RGBA) { unsigned char alpha255; double alpha1; for (n=0; n<N; n++) { for (m=0; m<M; m++) { alpha255 = *(image+3); alpha1 = (float)alpha255 / 255.; rgb1.r = alpha1 * (*image++); rgb1.g = alpha1 * (*image++); rgb1.b = alpha1 * (*image++); image++; rgb255_from_rgb1( rgb1, &rgb255 ); *image255copy++ = (alpha255<<24) + (rgb255.r<<16) + (rgb255.g<<8) + rgb255.b; } } /* Palette plot->color lookup from gray value */ } else { for (n=0; n<N; n++) { for (m=0; m<M; m++) { if (isnan(*image)) { image++; *image255copy++ = 0x00000000; } else { rgb255maxcolors_from_gray( *image++, &rgb255 ); *image255copy++ = (0xFF<<24) + (rgb255.r<<16) + (rgb255.g<<8) + rgb255.b; } } } } return image255; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/gp_cairo.c�������������������������������������������������������������0000644�0004711�0000144�00000217306�12147741215�015056� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: gp_cairo.c,v 1.60.2.5 2013/05/24 19:42:05 sfeam Exp $ */ /* GNUPLOT - gp_cairo.c */ /*[ * Copyright 2005,2006 Timothee Lecomte * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ /* ----------------------------------------------------- * This code uses the cairo library, a 2D graphics library with * support for multiple output devices. * Cairo is distributed under the LGPL licence. * * See http://www.cairographics.org for details. * It also uses the pango library, a text-layout rendering library. * Pango is distributed under the LGPL licence. * * See http://www.pango.org for details. * -----------------------------------------------------*/ /* ------------------------------------------------------ * This file implements all cairo related functions, * which provide drawing facilities. * * In particular, we have here : * - all the basic calls (lines, polygons for pm3d, custom patterns), * - image support, * - enhanced text mode * * The text rendering is done via pango. * ------------------------------------------------------*/ #include "gp_cairo.h" #include "alloc.h" #include <pango/pangocairo.h> #include <glib.h> #ifdef _MSC_VER #define rint(x) floor((x)+0.5L) #endif /* undef this to see what happens without the Symbol-to-unicode processing */ #define MAP_SYMBOL /* ======== enhanced text mode ======== */ /* copies of internal variables */ static char gp_cairo_enhanced_font[100] = ""; static const char* gp_cairo_enhanced_get_fontname(plot_struct *plot); static double gp_cairo_enhanced_fontsize = 0; static double gp_cairo_enhanced_base = 0; static TBOOLEAN gp_cairo_enhanced_widthflag = TRUE; static TBOOLEAN gp_cairo_enhanced_showflag = TRUE; static int gp_cairo_enhanced_overprint = FALSE; static TBOOLEAN gp_cairo_enhanced_opened_string = FALSE; /* try to cut out empty ()'s */ static char *gp_cairo_enhanced_string; static char *gp_cairo_enhanced_char; /* utf8 text to draw and its attributes */ static gchar gp_cairo_utf8[2048] = ""; static PangoAttrList *gp_cairo_enhanced_AttrList = NULL; /* save/restore facilitiy */ static TBOOLEAN gp_cairo_enhanced_restore_now = FALSE; static TBOOLEAN gp_cairo_enhanced_save = FALSE; static gchar gp_cairo_save_utf8[2048] = ""; static PangoAttrList *gp_cairo_enhanced_save_AttrList = NULL; /* underprint/overprint facility */ static gchar gp_cairo_underprinted_utf8[2048] = ""; static PangoAttrList *gp_cairo_enhanced_underprinted_AttrList = NULL; /* converts text from symbol encoding to utf8 encoding */ static gchar* gp_cairo_convert_symbol_to_unicode(plot_struct *plot, const char* string); /* add standard attributes (fontsize,fontfamily, rise) to * the specified characters in a PangoAttrList */ static void gp_cairo_add_attr(plot_struct *plot, PangoAttrList * AttrList, int start, int end ); /* add a blank character to the text string and an associated custom shape to the attribute list */ static void gp_cairo_add_shape( PangoRectangle rect,int position); /* Average character height as reported back through term->v_char */ static int avg_vchar = 150; /* set a cairo pattern or solid fill depending on parameters */ static void gp_cairo_fill(plot_struct *plot, int fillstyle, int fillpar); static void gp_cairo_fill_pattern(plot_struct *plot, int fillstyle, int fillpar); /* array of colors * FIXME could be shared with all gnuplot terminals */ static rgb_color gp_cairo_colorlist[12] = { {1,1,1}, /* white */ {0,0,0}, /* black */ {0,0,0}, /* black */ {1,0,0}, /* red */ {0,1,0}, /* green */ {0,0,1}, /* blue */ {1,0,1}, /* magenta */ {0,1,1}, /* cyan */ {1,1,0}, /* yellow */ {0,0,0}, /* black */ {1,0.3,0}, /* orange */ {0.5,0.5,0.5} /* grey */ }; /* correspondance between gnuplot linetypes and terminal colors */ void gp_cairo_set_background( rgb_color background ) { gp_cairo_colorlist[0] = background; } rgb_color gp_cairo_linetype2color( int linetype ) { if (linetype<=LT_NODRAW) return gp_cairo_colorlist[ 0 ]; else return gp_cairo_colorlist[ linetype%9 +3 ]; } /* initialize all fields of the plot structure */ void gp_cairo_initialize_plot(plot_struct *plot) { plot->xscale = 1.0; plot->yscale = 1.0; plot->device_xmax = 1; plot->device_ymax = 1; plot->xmax = 1; plot->ymax = 1; plot->justify_mode = LEFT; plot->linetype = 1; plot->linewidth = 1.0; plot->linestyle = 1; plot->pointsize = 1.0; plot->dashlength = 1.0; plot->text_angle = 0.0; plot->color.r = 0.0; plot->color.g = 0.0; plot->color.b = 0.0; plot->background.r = 1.0; plot->background.g = 1.0; plot->background.b = 1.0; plot->opened_path = FALSE; strncpy(plot->fontname, "", sizeof(plot->fontname)); plot->fontsize = 1.0; plot->encoding = S_ENC_DEFAULT; plot->success = FALSE; plot->antialiasing = TRUE; plot->oversampling = TRUE; plot->oversampling_scale = GP_CAIRO_SCALE; plot->rounded = FALSE; plot->hinting = 100; plot->polygons_saturate = TRUE; plot->cr = NULL; plot->polygon_path_last = NULL; plot->interrupt = FALSE; } /* set the transformation matrix of the context, and other details */ /* NOTE : depends on the setting of xscale and yscale */ void gp_cairo_initialize_context(plot_struct *plot) { cairo_matrix_t matrix; if (plot->oversampling) plot->oversampling_scale = GP_CAIRO_SCALE; else plot->oversampling_scale = 1; if (plot->antialiasing) cairo_set_antialias(plot->cr,CAIRO_ANTIALIAS_DEFAULT); else cairo_set_antialias(plot->cr,CAIRO_ANTIALIAS_NONE); cairo_matrix_init(&matrix, plot->xscale/plot->oversampling_scale, 0, 0, plot->yscale/plot->oversampling_scale, 0.5, 0.5); cairo_set_matrix(plot->cr, &matrix); /* Default is square caps, mitered joins */ if (plot->rounded) { cairo_set_line_cap (plot->cr, CAIRO_LINE_CAP_ROUND); cairo_set_line_join (plot->cr, CAIRO_LINE_JOIN_ROUND); } else { cairo_set_line_cap (plot->cr, CAIRO_LINE_CAP_SQUARE); cairo_set_line_join (plot->cr, CAIRO_LINE_JOIN_MITER); cairo_set_miter_limit(plot->cr, 3.8); } } void gp_cairo_set_color(plot_struct *plot, rgb_color color) { /*stroke any open path */ gp_cairo_stroke(plot); FPRINTF((stderr,"set_color %lf %lf %lf\n",color.r, color.g, color.b)); plot->color = color; } void gp_cairo_set_linestyle(plot_struct *plot, int linestyle) { /*stroke any open path */ gp_cairo_stroke(plot); /* draw any open polygon set */ gp_cairo_end_polygon(plot); FPRINTF((stderr,"set_linestyle %d\n",linestyle)); plot->linestyle = linestyle; } void gp_cairo_set_linetype(plot_struct *plot, int linetype) { /*stroke any open path */ gp_cairo_stroke(plot); /* draw any open polygon set */ gp_cairo_end_polygon(plot); FPRINTF((stderr,"set_linetype %d\n",linetype)); plot->linetype = linetype; } void gp_cairo_set_pointsize(plot_struct *plot, double pointsize) { FPRINTF((stderr,"set_pointsize %lf\n",pointsize)); plot->pointsize = pointsize; } void gp_cairo_set_justify(plot_struct *plot, JUSTIFY mode) { FPRINTF((stderr,"set_justify\n")); plot->justify_mode = mode; } void gp_cairo_set_font(plot_struct *plot, const char *name, int fontsize) { char *c; char *fname; FPRINTF(("set_font \"%s\" %d\n", name,fontsize)); /* Split out Bold and Italic attributes from font name */ fname = strdup(name); for (c=fname; *c; c++) { if (*c == '\\') { char *d = c; do { *d = *(d+1); } while (*d++); } else { if (*c == '-') *c = ' '; } } if ((c = strstr(fname, " Bold"))) { do { *c = *(c+5); } while (*c++); plot->fontweight = PANGO_WEIGHT_BOLD; } else plot->fontweight = 0; if ((c = strstr(fname, " Italic"))) { do { *c = *(c+7); } while (*c++); plot->fontstyle = PANGO_STYLE_ITALIC; } else plot->fontstyle = 0; strncpy( plot->fontname, fname, sizeof(plot->fontname) ); plot->fontsize = fontsize; free(fname); } void gp_cairo_set_linewidth(plot_struct *plot, double linewidth) { /*stroke any open path */ gp_cairo_stroke(plot); /* draw any open polygon set */ gp_cairo_end_polygon(plot); FPRINTF((stderr,"set_linewidth %lf\n",linewidth)); plot->linewidth = linewidth; } void gp_cairo_set_textangle(plot_struct *plot, double angle) { FPRINTF((stderr,"set_textangle %lf\n",angle)); plot->text_angle =angle; } /* By default, Cairo uses an antialiasing algorithm which may * leave a seam between polygons which share a common edge. * Several solutions allow to workaround this behaviour : * - don't antialias the polygons * Problem : aliased lines are ugly * - stroke on each edge * Problem : stroking is a very time-consuming operation * - draw without antialiasing to a separate context of a bigger size * Problem : not really in the spirit of the rest of the drawing. * - enlarge the polygons so that they overlap slightly * Problem : It is really more time-consuming that it may seem. * It implies inspecting each corner to find which direction to move it * (making the difference between the inside and the outside of the polygon). * - using CAIRO_OPERATOR_SATURATE * Problem : for each set of polygons, we have to draw front-to-back * on a separate context and then copy back to this one. * Time-consuming but probably less than stroking all the edges. * * The last solution is implemented if plot->polygons_saturate is set to TRUE * Otherwise the default (antialiasing but may have seams) is used. */ void gp_cairo_draw_polygon(plot_struct *plot, int n, gpiPoint *corners) { /* begin by stroking any open path */ gp_cairo_stroke(plot); if (plot->polygons_saturate) { int i; path_item *path; path = (path_item*) gp_alloc(sizeof(path_item), "gp_cairo : polygon path"); path->n = n; path->corners = (gpiPoint*) gp_alloc(n*sizeof(gpiPoint), "gp_cairo : polygon corners"); for(i=0;i<n;i++) *(path->corners + i) = *corners++; path->color = plot->color; if (plot->polygon_path_last == NULL) { FPRINTF((stderr,"creating a polygon path\n")); path->previous = NULL; plot->polygon_path_last = path; } else { FPRINTF((stderr,"adding a polygon to the polygon path\n")); path->previous = plot->polygon_path_last; plot->polygon_path_last = path; } } else { int i; /* draw the polygon directly */ FPRINTF((stderr,"processing one polygon\n")); cairo_move_to(plot->cr, corners[0].x, corners[0].y); for (i=1;i<n;++i) cairo_line_to(plot->cr, corners[i].x, corners[i].y); cairo_close_path(plot->cr); gp_cairo_fill( plot, corners->style & 0xf, corners->style >> 4 ); cairo_fill(plot->cr); } } void gp_cairo_end_polygon(plot_struct *plot) { int i; path_item *path; path_item *path2; rgb_color color_sav; cairo_t *context; cairo_t *context_sav; cairo_surface_t *surface; cairo_matrix_t matrix; cairo_matrix_t matrix2; cairo_pattern_t *pattern; /* when we are not using OPERATOR_SATURATE, the polygons are drawn * directly in gp_cairo_draw_polygon */ if (!plot->polygons_saturate) return; if (plot->polygon_path_last == NULL) return; path = plot->polygon_path_last; color_sav = plot->color; /* if there's only one polygon, draw it directly */ if (path->previous == NULL) { FPRINTF((stderr,"processing one polygon\n")); cairo_move_to(plot->cr, path->corners[0].x, path->corners[0].y); for (i=1;i<path->n;++i) cairo_line_to(plot->cr, path->corners[i].x, path->corners[i].y); cairo_close_path(plot->cr); plot->color = path->color; gp_cairo_fill( plot, path->corners->style & 0xf, path->corners->style >> 4 ); cairo_fill(plot->cr); free(path->corners); free(path); plot->polygon_path_last = NULL; plot->color = color_sav; return; } FPRINTF((stderr,"processing several polygons\n")); /* this is meant to test Full-Scene-Anti-Aliasing by supersampling, * in association with CAIRO_ANTIALIAS_NONE a few lines below */ #define SCALE 1 /* otherwise, draw front-to-back to a separate context, * using CAIRO_OPERATOR_SATURATE */ context_sav = plot->cr; surface = cairo_surface_create_similar(cairo_get_target(plot->cr), CAIRO_CONTENT_COLOR_ALPHA, plot->device_xmax*SCALE, plot->device_ymax*SCALE); context = cairo_create(surface); cairo_set_operator(context,CAIRO_OPERATOR_SATURATE); if (plot->antialiasing) cairo_set_antialias(context,CAIRO_ANTIALIAS_DEFAULT); else cairo_set_antialias(context,CAIRO_ANTIALIAS_NONE); /* transformation matrix between gnuplot and cairo coordinates */ cairo_matrix_init(&matrix, plot->xscale/SCALE/plot->oversampling_scale, 0,0, plot->yscale/SCALE/plot->oversampling_scale, 0.5,0.5); cairo_set_matrix(context, &matrix); plot->cr = context; path = plot->polygon_path_last; while (path != NULL) { /* check for interrupt */ if (plot->interrupt) break; /* build the path */ cairo_move_to(plot->cr, path->corners[0].x, path->corners[0].y); for (i=1;i<(path->n);++i) cairo_line_to(plot->cr, path->corners[i].x, path->corners[i].y); cairo_close_path(plot->cr); /* set the fill pattern */ plot->color = path->color; gp_cairo_fill( plot, path->corners->style & 0xf, path->corners->style >> 4 ); cairo_fill(plot->cr); /* free the ressources, and go to the next point */ free(path->corners); path2 = path->previous; free(path); path = path2; } plot->polygon_path_last = NULL; pattern = cairo_pattern_create_for_surface( surface ); cairo_destroy( context ); /* compensate the transformation matrix of the main context */ cairo_matrix_init(&matrix2, plot->xscale*SCALE/plot->oversampling_scale, 0,0, plot->yscale*SCALE/plot->oversampling_scale, 0.5,0.5); cairo_pattern_set_matrix( pattern, &matrix2 ); plot->cr = context_sav; plot->color = color_sav; cairo_surface_destroy( surface ); cairo_set_source( plot->cr, pattern ); cairo_pattern_destroy( pattern ); cairo_paint( plot->cr ); } void gp_cairo_stroke(plot_struct *plot) { double dashes[8]; static double dashpattern[4][8] = { {5, 8, 5, 8, 5, 8, 5, 8}, /* Medium dash */ {1, 4, 1, 4, 1, 4, 1, 4}, /* dots */ {8, 4, 2, 4, 8, 4, 2, 4}, /* dash dot */ {9, 4, 1, 4, 1, 4, 0, 0} /* dash dot dot */ }; int lt = plot->linetype; double lw = plot->linewidth * plot->oversampling_scale; if (!plot->opened_path) { FPRINTF((stderr,"stroke with non-opened path !\n")); return; } /* add last point */ cairo_line_to (plot->cr, plot->current_x, plot->current_y); cairo_save(plot->cr); if (plot->linetype == LT_NODRAW) cairo_set_operator(plot->cr, CAIRO_OPERATOR_XOR); else if (lt == LT_AXIS || plot->linestyle == GP_CAIRO_DOTS) { /* Grid lines (lt 0) */ dashes[0] = 0.4 * plot->oversampling_scale * plot->dashlength; dashes[1] = 4.0 * plot->oversampling_scale * plot->dashlength; cairo_set_dash(plot->cr, dashes, 2 /*num_dashes*/, 0 /*offset*/); lw *= 0.6; } else if (plot->linestyle == GP_CAIRO_DASH && lt >= 0 && (lt % 5 != 0)) { int i; for (i=0; i<8; i++) dashes[i] = dashpattern[(lt-1) % 5][i] * plot->dashlength * plot->oversampling_scale; cairo_set_dash(plot->cr, dashes, 8 /*num_dashes*/, 0 /*offset*/); } cairo_set_source_rgb(plot->cr, plot->color.r, plot->color.g, plot->color.b); cairo_set_line_width(plot->cr, lw); cairo_stroke(plot->cr); cairo_restore(plot->cr); plot->opened_path = FALSE; } void gp_cairo_move(plot_struct *plot, int x, int y) { /* begin by stroking any open path */ gp_cairo_stroke(plot); /* also draw any open polygon set */ gp_cairo_end_polygon(plot); FPRINTF((stderr,"move\n")); plot->current_x = x; plot->current_y = y; plot->orig_current_x = x; plot->orig_current_y = y; } void gp_cairo_vector(plot_struct *plot, int x, int y) { double x1 = x, y1 = y; double new_pos; double weight1 = (double) plot->hinting/100; double weight2 = 1.0 - weight1; /* begin by drawing any open polygon set */ gp_cairo_end_polygon(plot); FPRINTF((stderr,"vector\n")); /* hinting magic when we are using antialiasing+oversampling */ if (plot->antialiasing && plot->oversampling) { if (plot->hinting < 0 || plot->hinting > 100) { fprintf(stderr,"wxt terminal : hinting error, setting to default\n"); plot->hinting = 100; } /* detect and handle vertical lines */ /* the second test is there to avoid artefacts when you choose * a high sampling ('set samples 10000'), so that a smooth function * may be drawn as lines between very close points */ if (plot->orig_current_x == x1 && fabs(plot->orig_current_y - y1)>plot->oversampling_scale) { new_pos = rint(plot->current_x*plot->xscale/plot->oversampling_scale); new_pos *= plot->oversampling_scale/plot->xscale; plot->current_x = weight1*new_pos + weight2*plot->current_x; x1 = plot->current_x; new_pos = rint(plot->current_y*plot->yscale/plot->oversampling_scale); new_pos *= plot->oversampling_scale/plot->yscale; plot->current_y = weight1*new_pos + weight2*plot->current_y; new_pos = rint(y1*plot->yscale/plot->oversampling_scale); new_pos *= plot->oversampling_scale/plot->yscale; y1 = weight1*new_pos + weight2*y1; } /* do the same for horizontal lines */ if (plot->orig_current_y == y1 && fabs(plot->orig_current_x - x1)>plot->oversampling_scale) { new_pos = rint(plot->current_y*plot->yscale/plot->oversampling_scale); new_pos *= plot->oversampling_scale/plot->yscale; plot->current_y = weight1*new_pos + weight2*plot->current_y; y1 = plot->current_y; new_pos = rint(plot->current_x*plot->xscale/plot->oversampling_scale); new_pos *= plot->oversampling_scale/plot->xscale; plot->current_x = weight1*new_pos + weight2*plot->current_x; new_pos = rint(x1*plot->xscale/plot->oversampling_scale); new_pos *= plot->oversampling_scale/plot->xscale; x1 = weight1*new_pos + weight2*x1; } } if (!plot->opened_path) { plot->opened_path = TRUE; cairo_move_to (plot->cr, plot->current_x, plot->current_y); } else cairo_line_to (plot->cr, plot->current_x, plot->current_y); plot->current_x = x1; plot->current_y = y1; plot->orig_current_x = x; plot->orig_current_y = y; } /* pango needs a string encoded in utf-8. We use g_convert from glib. * gp_cairo_get_encoding() gives the encoding set via 'set enconding' * memory allocated for the string has to be freed */ gchar * gp_cairo_convert(plot_struct *plot, const char* string) { gsize bytes_read; GError *error = NULL; const char *charset = NULL; gchar * string_utf8; if (g_utf8_validate(string, -1, NULL)) { string_utf8 = g_strdup(string); } else { charset = gp_cairo_get_encoding(plot); string_utf8 = g_convert(string, -1, "UTF-8", charset, &bytes_read, NULL, &error); } /* handle error case */ if (error != NULL) { /* fatal error in conversion */ if (error->code != G_CONVERT_ERROR_ILLEGAL_SEQUENCE) { fprintf(stderr, "Unable to convert \"%s\": %s\n", string, error->message); g_error_free (error); return ""; } /* The sequence is invalid in the chosen charset. * we will try to fall back to iso_8859_1, and if it doesn't work, * we'll use bytes_read to convert up to the faulty character, * and throw the rest. */ g_error_free (error); error = NULL; string_utf8 = g_convert(string, -1, "UTF-8", "ISO-8859-1", NULL, NULL, &error); if (error != NULL) { fprintf(stderr, "Unable to convert \"%s\": the sequence is invalid "\ "in the current charset (%s), %d bytes read out of %d\n", string, charset, (int)bytes_read, (int)strlen(string)); string_utf8 = g_convert(string, bytes_read, "UTF-8", charset, NULL, NULL, NULL); g_error_free (error); } else fprintf(stderr, "Unable to convert \"%s\": the sequence is invalid "\ "in the current charset (%s), falling back to iso_8859_1\n", string, charset); } return string_utf8; } /* * The following #ifdef WIN32 section is all to work around a bug in * the cairo/win32 backend for font rendering. It has the effect of * testing for libfreetype support, and using that instead if possible. * Suggested by cairo developer Behdad Esfahbod. * Allin Cottrell suggests that this not necessary anymore for newer * versions of cairo. */ #if defined(WIN32) && (CAIRO_VERSION_MAJOR < 2) && (CAIRO_VERSION_MINOR < 10) PangoLayout * gp_cairo_create_layout (cairo_t *cr) { static PangoFontMap *fontmap; PangoContext *context; PangoLayout *layout; if (fontmap == NULL) { fontmap = pango_cairo_font_map_new_for_font_type(CAIRO_FONT_TYPE_FT); if (fontmap == NULL) { fontmap = pango_cairo_font_map_get_default(); } } #if PANGO_VERSION_MAJOR > 1 || PANGO_VERSION_MINOR >= 22 context = pango_font_map_create_context(fontmap); #else context = pango_cairo_font_map_create_context((PangoCairoFontMap *) fontmap); #endif layout = pango_layout_new(context); g_object_unref(context); return layout; } #else PangoLayout * gp_cairo_create_layout (cairo_t *cr) { return pango_cairo_create_layout(cr); } #endif void gp_cairo_draw_text(plot_struct *plot, int x1, int y1, const char* string) { double x,y; double arg = plot->text_angle * M_PI/180; double vert_just, delta, deltax, deltay; PangoRectangle ink_rect; PangoRectangle logical_rect; PangoLayout *layout; PangoFontDescription *desc; gchar* string_utf8; #ifdef MAP_SYMBOL TBOOLEAN symbol_font_parsed = FALSE; #endif /*MAP_SYMBOL*/ /* begin by stroking any open path */ gp_cairo_stroke(plot); /* also draw any open polygon set */ gp_cairo_end_polygon(plot); FPRINTF((stderr,"draw_text\n")); #ifdef MAP_SYMBOL /* we have to treat Symbol font as a special case */ if (!strcmp(plot->fontname,"Symbol")) { FPRINTF((stderr,"Parsing a Symbol string\n")); string_utf8 = gp_cairo_convert_symbol_to_unicode(plot, string); strncpy(plot->fontname, gp_cairo_default_font(), sizeof(plot->fontname)); symbol_font_parsed = TRUE; } else #endif /*MAP_SYMBOL*/ { /* convert the input string to utf8 */ string_utf8 = gp_cairo_convert(plot, string); } /* Create a PangoLayout, set the font and text */ layout = gp_cairo_create_layout (plot->cr); pango_layout_set_text (layout, string_utf8, -1); g_free(string_utf8); desc = pango_font_description_new (); pango_font_description_set_family (desc, (const char*) plot->fontname); #ifdef MAP_SYMBOL /* restore the Symbol font setting */ if (symbol_font_parsed) strncpy(plot->fontname, "Symbol", sizeof(plot->fontname)); #endif /*MAP_SYMBOL*/ pango_font_description_set_size (desc, (int) (plot->fontsize*PANGO_SCALE*plot->oversampling_scale) ); pango_font_description_set_weight (desc, plot->fontweight ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL); pango_font_description_set_style (desc, plot->fontstyle ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL); pango_layout_set_font_description (layout, desc); pango_font_description_free (desc); pango_layout_get_extents(layout, &ink_rect, &logical_rect); /* EAM Mar 2009 - Adjusting the vertical position for every character fragment */ /* leads to uneven baselines. Better to adjust to the "average" character height */ /* EAM Dec 2012 - The problem is that avg_vchar is not kept in sync with the */ /* font size. It is changed when the set_font command is received, not when */ /* it is executed in the display list. Try basing off plot->fontsize instead. */ /* vert_just = ((double)ink_rect.height/2 +(double)ink_rect.y) / PANGO_SCALE; */ /* vert_just = avg_vchar/2; */ vert_just = 0.8 * (float)(plot->fontsize * plot->oversampling_scale); x = (double) x1; y = (double) y1; x -= vert_just * sin(arg); y -= vert_just * cos(arg); delta = ((double)logical_rect.width/2) / PANGO_SCALE; deltax = delta * cos(arg); deltay = delta * sin(arg); switch (plot->justify_mode) { case LEFT : break; case CENTRE : x -= deltax; y += deltay; break; case RIGHT : x -= 2*deltax; y += 2*deltay; break; } #if 0 /* helper point */ gp_cairo_draw_point(plot, x1, y1, 0); #endif /* helper point */ cairo_save (plot->cr); cairo_set_source_rgb(plot->cr, plot->color.r, plot->color.g, plot->color.b); cairo_move_to (plot->cr, x-0.5, y-0.5); cairo_rotate(plot->cr, -arg); /* Inform Pango to re-layout the text with the new transformation */ pango_cairo_update_layout (plot->cr, layout); pango_cairo_show_layout (plot->cr, layout); /* pango_cairo_show_layout does not clear the path (here a starting point) * Do it by ourselves, or we can get spurious lines on future calls. */ cairo_new_path(plot->cr); #if 0 /* helper boxes to understand how text is positionned */ cairo_set_line_width(plot->cr, plot->linewidth*plot->oversampling_scale); cairo_rotate(plot->cr, arg); cairo_translate(plot->cr, x, y); cairo_rotate(plot->cr, -arg); { PangoRectangle ink, logical; double lw = cairo_get_line_width (plot->cr); pango_layout_get_extents (layout, &ink, &logical); cairo_set_source_rgba (plot->cr, 1.0, 0.0, 0.0, 0.75); cairo_rectangle (plot->cr, (double)logical.x / PANGO_SCALE - lw / 2, (double)logical.y / PANGO_SCALE - lw / 2, (double)logical.width / PANGO_SCALE + lw, (double)logical.height / PANGO_SCALE + lw); cairo_stroke (plot->cr); cairo_set_source_rgba (plot->cr, 0.0, 1.0, 0.0, 0.75); cairo_rectangle (plot->cr, (double)ink.x / PANGO_SCALE - lw / 2, (double)ink.y / PANGO_SCALE - lw / 2, (double)ink.width / PANGO_SCALE + lw, (double)ink.height / PANGO_SCALE + lw); cairo_stroke (plot->cr); } #endif /* helper boxes to understand how text is positionned */ /* free the layout object */ g_object_unref (layout); cairo_restore (plot->cr); } void gp_cairo_draw_point(plot_struct *plot, int x1, int y1, int style) { double x = x1; double y = y1; double new_pos; double weight1 = (double) plot->hinting/100; double weight2 = 1.0 - weight1; double size = plot->pointsize*3*plot->oversampling_scale; /* begin by stroking any open path */ gp_cairo_stroke(plot); /* also draw any open polygon set */ gp_cairo_end_polygon(plot); FPRINTF((stderr,"drawpoint\n")); /* hinting magic when we are using antialiasing+oversampling */ if (plot->antialiasing && plot->oversampling) { if (plot->hinting < 0 || plot->hinting > 100) { fprintf(stderr,"wxt terminal : hinting error, setting to default\n"); plot->hinting = 100; } new_pos = rint(x*plot->xscale/plot->oversampling_scale); new_pos *= plot->oversampling_scale/plot->xscale; x = weight1*new_pos + weight2*x; new_pos = rint(y*plot->yscale/plot->oversampling_scale); new_pos *= plot->oversampling_scale/plot->yscale; y = weight1*new_pos + weight2*y; } cairo_save(plot->cr); cairo_set_line_width(plot->cr, plot->linewidth*plot->oversampling_scale); cairo_set_source_rgb(plot->cr, plot->color.r, plot->color.g, plot->color.b); /* Dot FIXME: because this is drawn as a filled circle, it's quite slow */ if (style < 0) { cairo_arc (plot->cr, x, y, 0.5*plot->oversampling_scale, 0, 2*M_PI); cairo_fill (plot->cr); } switch (style%13) { case 0: /* plus */ cairo_move_to(plot->cr, x-size, y); cairo_line_to(plot->cr, x+size,y); cairo_stroke(plot->cr); cairo_move_to(plot->cr, x, y-size); cairo_line_to(plot->cr, x,y+size); cairo_stroke(plot->cr); break; case 1: /* plot->cross */ cairo_move_to(plot->cr, x-size, y-size); cairo_line_to(plot->cr, x+size,y+size); cairo_stroke(plot->cr); cairo_move_to(plot->cr, x-size, y+size); cairo_line_to(plot->cr, x+size,y-size); cairo_stroke(plot->cr); break; case 2: /* star */ cairo_move_to(plot->cr, x-size, y); cairo_line_to(plot->cr, x+size,y); cairo_stroke(plot->cr); cairo_move_to(plot->cr, x, y-size); cairo_line_to(plot->cr, x,y+size); cairo_stroke(plot->cr); cairo_move_to(plot->cr, x-size, y-size); cairo_line_to(plot->cr, x+size,y+size); cairo_stroke(plot->cr); cairo_move_to(plot->cr, x-size, y+size); cairo_line_to(plot->cr, x+size,y-size); cairo_stroke(plot->cr); break; case 3: /* box */ cairo_move_to(plot->cr, x-size, y-size); cairo_line_to(plot->cr, x-size,y+size); cairo_line_to(plot->cr, x+size,y+size); cairo_line_to(plot->cr, x+size,y-size); cairo_close_path(plot->cr); cairo_stroke(plot->cr); break; case 4: /* filled box */ cairo_move_to(plot->cr, x-size, y-size); cairo_line_to(plot->cr, x-size,y+size); cairo_line_to(plot->cr, x+size,y+size); cairo_line_to(plot->cr, x+size,y-size); cairo_close_path(plot->cr); cairo_fill_preserve(plot->cr); cairo_stroke(plot->cr); break; case 5: /* circle */ cairo_arc (plot->cr, x, y, size, 0, 2*M_PI); cairo_stroke (plot->cr); break; case 6: /* filled circle */ cairo_arc (plot->cr, x, y, size, 0, 2*M_PI); cairo_fill_preserve(plot->cr); cairo_stroke(plot->cr); break; case 7: /* triangle */ cairo_move_to(plot->cr, x-size, y+size-plot->oversampling_scale); cairo_line_to(plot->cr, x,y-size); cairo_line_to(plot->cr, x+size,y+size-plot->oversampling_scale); cairo_close_path(plot->cr); cairo_stroke(plot->cr); break; case 8: /* filled triangle */ cairo_move_to(plot->cr, x-size, y+size-plot->oversampling_scale); cairo_line_to(plot->cr, x,y-size); cairo_line_to(plot->cr, x+size,y+size-plot->oversampling_scale); cairo_close_path(plot->cr); cairo_fill_preserve(plot->cr); cairo_stroke(plot->cr); break; case 9: /* upside down triangle */ cairo_move_to(plot->cr, x-size, y-size+plot->oversampling_scale); cairo_line_to(plot->cr, x,y+size); cairo_line_to(plot->cr, x+size,y-size+plot->oversampling_scale); cairo_close_path(plot->cr); cairo_stroke(plot->cr); break; case 10: /* filled upside down triangle */ cairo_move_to(plot->cr, x-size, y-size+plot->oversampling_scale); cairo_line_to(plot->cr, x,y+size); cairo_line_to(plot->cr, x+size,y-size+plot->oversampling_scale); cairo_close_path(plot->cr); cairo_fill_preserve(plot->cr); cairo_stroke(plot->cr); break; case 11: /* diamond */ cairo_move_to(plot->cr, x-size, y); cairo_line_to(plot->cr, x,y+size); cairo_line_to(plot->cr, x+size,y); cairo_line_to(plot->cr, x,y-size); cairo_close_path(plot->cr); cairo_stroke(plot->cr); break; case 12: /* filled diamond */ cairo_move_to(plot->cr, x-size, y); cairo_line_to(plot->cr, x,y+size); cairo_line_to(plot->cr, x+size,y); cairo_line_to(plot->cr, x,y-size); cairo_close_path(plot->cr); cairo_fill_preserve(plot->cr); cairo_stroke(plot->cr); break; default : break; } cairo_restore(plot->cr); } void gp_cairo_draw_fillbox(plot_struct *plot, int x, int y, int width, int height, int style) { int fillpar = style >> 4; int fillstyle = style & 0xf; /* begin by stroking any open path */ gp_cairo_stroke(plot); /* also draw any open polygon set */ gp_cairo_end_polygon(plot); FPRINTF((stderr,"fillbox fillpar = %d, fillstyle = %d\n",fillpar, fillstyle)); gp_cairo_fill( plot, fillstyle, fillpar); cairo_move_to(plot->cr, x, y); cairo_rel_line_to(plot->cr, 0, -height); cairo_rel_line_to(plot->cr, width, 0); cairo_rel_line_to(plot->cr, 0, height); cairo_rel_line_to(plot->cr, -width, 0); cairo_close_path(plot->cr); cairo_fill(plot->cr); } /* corner[0] = (x1,y1) is the upper left corner (in terms of plot location) of * the outer edge of the image. Similarly, corner[1] = (x2,y2) is the lower * right corner of the outer edge of the image. (Outer edge means the * outer extent of the corner pixels, not the middle of the corner pixels). * corner[2] and corner[3] = (x3,y3) and (x4,y4) define a clipping box in * the primary plot into which all or part of the image will be rendered. */ void gp_cairo_draw_image(plot_struct *plot, unsigned int * image, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int M, int N) { double scale_x, scale_y; cairo_surface_t *image_surface; cairo_pattern_t *pattern; cairo_matrix_t matrix; /* begin by stroking any open path */ gp_cairo_stroke(plot); /* also draw any open polygon set */ gp_cairo_end_polygon(plot); image_surface = cairo_image_surface_create_for_data((unsigned char*) image, CAIRO_FORMAT_ARGB32, M, N, 4*M); scale_x = (double)M/fabs( x2 - x1 ); scale_y = (double)N/fabs( y2 - y1 ); FPRINTF((stderr,"M %d N %d x1 %d y1 %d\n", M, N, x1, y1)); cairo_save( plot->cr ); /* Set clipping boundaries for image copy. * The bounds were originally possed in corners[2] and corners[3] */ cairo_move_to(plot->cr, x3, y3); cairo_line_to(plot->cr, x3, y4); cairo_line_to(plot->cr, x4, y4); cairo_line_to(plot->cr, x4, y3); cairo_close_path(plot->cr); cairo_clip(plot->cr); pattern = cairo_pattern_create_for_surface( image_surface ); /* scale and keep sharp edges */ cairo_pattern_set_filter( pattern, CAIRO_FILTER_FAST ); cairo_matrix_init_scale( &matrix, scale_x, scale_y ); /* x1 and y1 give the user-space coordinate * at which the surface origin should appear. * (The surface origin is its upper-left corner * before any transformation has been applied.) */ cairo_matrix_translate( &matrix, -x1, -y1 ); cairo_pattern_set_matrix( pattern, &matrix ); cairo_set_source( plot->cr, pattern ); cairo_paint( plot->cr ); cairo_restore( plot->cr ); cairo_pattern_destroy( pattern ); cairo_surface_destroy( image_surface ); } /* ======================================================================= * Enhanced text mode support * =====================================================================*/ void gp_cairo_add_attr(plot_struct *plot, PangoAttrList * AttrList, int start, int end ) { PangoAttribute *p_attr_rise, *p_attr_size, *p_attr_family; p_attr_size = pango_attr_size_new ((int) (gp_cairo_enhanced_fontsize*PANGO_SCALE)); p_attr_size->start_index = start; p_attr_size->end_index = end; pango_attr_list_insert (AttrList, p_attr_size); p_attr_rise = pango_attr_rise_new ((int) (gp_cairo_enhanced_base*PANGO_SCALE)); p_attr_rise->start_index = start; p_attr_rise->end_index = end; pango_attr_list_insert (AttrList, p_attr_rise); p_attr_family = pango_attr_family_new (gp_cairo_enhanced_get_fontname(plot)); p_attr_family->start_index = start; p_attr_family->end_index = end; pango_attr_list_insert (AttrList, p_attr_family); } /* add a blank character to the text string with a custom shape */ void gp_cairo_add_shape( PangoRectangle rect,int position) { PangoAttribute *p_attr_shape; FPRINTF((stderr, "adding blank custom shape\n")); strncat(gp_cairo_utf8, " ", sizeof(gp_cairo_utf8)-strlen(gp_cairo_utf8)-1); p_attr_shape = pango_attr_shape_new (&rect,&rect); p_attr_shape->start_index = position; p_attr_shape->end_index = position+1; pango_attr_list_insert (gp_cairo_enhanced_AttrList, p_attr_shape); } /* gp_cairo_enhanced_flush() draws enhanced_text, which has been filled by _writec()*/ void gp_cairo_enhanced_flush(plot_struct *plot) { PangoRectangle save_logical_rect; PangoLayout *save_layout; PangoLayout *current_layout; PangoRectangle current_ink_rect; PangoRectangle current_logical_rect; PangoFontDescription *current_desc; PangoRectangle underprinted_logical_rect; int overprinted_width = 0; PangoLayout *underprinted_layout; int start, end; PangoLayout *hide_layout; PangoRectangle hide_ink_rect; PangoRectangle hide_logical_rect; PangoFontDescription *hide_desc; PangoLayout *zerowidth_layout; PangoFontDescription *zerowidth_desc; PangoRectangle zerowidth_logical_rect; /* PangoRectangle zerowidth_ink_rect; */ int save_start, save_end; int underprinted_start, underprinted_end; gchar* enhanced_text_utf8; #ifdef MAP_SYMBOL TBOOLEAN symbol_font_parsed = FALSE; #endif /*MAP_SYMBOL*/ if (!gp_cairo_enhanced_opened_string) return; FPRINTF((stderr, "enhanced flush str=\"%s\" font=%s op=%d sf=%d wf=%d base=%f os=%d\n", enhanced_text, gp_cairo_enhanced_font, gp_cairo_enhanced_overprint, gp_cairo_enhanced_showflag, gp_cairo_enhanced_widthflag, gp_cairo_enhanced_base, gp_cairo_enhanced_opened_string )); gp_cairo_enhanced_opened_string = FALSE; #ifdef MAP_SYMBOL /* we have to treat Symbol font as a special case */ if (!strcmp(gp_cairo_enhanced_font,"Symbol")) { FPRINTF((stderr,"Parsing a Symbol string\n")); enhanced_text_utf8 = gp_cairo_convert_symbol_to_unicode(plot, gp_cairo_enhanced_string); if (!strcmp(plot->fontname,"Symbol")) { strncpy(gp_cairo_enhanced_font, plot->fontname, sizeof(gp_cairo_enhanced_font)); } else { strncpy(gp_cairo_enhanced_font, gp_cairo_default_font(), sizeof(gp_cairo_enhanced_font)); } symbol_font_parsed = TRUE; } else #endif /*MAP_SYMBOL*/ { /* convert the input string to utf8 */ enhanced_text_utf8 = gp_cairo_convert(plot, gp_cairo_enhanced_string); } start = strlen(gp_cairo_utf8); if (gp_cairo_enhanced_restore_now) { /* restore saved position */ /* the idea is to use a space character, drawn with a negative width */ /* we first compute the size of the text drawn since the 'save' command */ /* Create a PangoLayout, set the font and text * with the saved attributes list, get extents */ save_layout = gp_cairo_create_layout (plot->cr); pango_layout_set_text (save_layout, gp_cairo_save_utf8, -1); pango_layout_set_attributes (save_layout, gp_cairo_enhanced_save_AttrList); pango_layout_get_extents(save_layout, NULL, &save_logical_rect); g_object_unref (save_layout); pango_attr_list_unref( gp_cairo_enhanced_save_AttrList ); /* invert the size, so we will go back to the saved state */ save_logical_rect.width = -save_logical_rect.width; /* adding a blank character with the corresponding shape */ gp_cairo_add_shape(save_logical_rect,start); strncpy(gp_cairo_save_utf8, "", sizeof(gp_cairo_save_utf8)); gp_cairo_enhanced_restore_now = FALSE; start++; } if (gp_cairo_enhanced_overprint==2) { /* the idea is first to use a space character, drawn with an appropriate negative width */ /* we first compute the size of the text drawn since overprint==1 was used */ /* Create a PangoLayout, set the font and text with * the saved attributes list, get extents */ underprinted_layout = gp_cairo_create_layout (plot->cr); pango_layout_set_text (underprinted_layout, gp_cairo_underprinted_utf8, -1); if (!gp_cairo_enhanced_underprinted_AttrList) fprintf(stderr,"uninitialized gp_cairo_enhanced_underprinted_AttrList!\n"); else pango_layout_set_attributes (underprinted_layout, gp_cairo_enhanced_underprinted_AttrList); pango_layout_get_extents(underprinted_layout, NULL, &underprinted_logical_rect); g_object_unref (underprinted_layout); /* compute the size of the text to overprint*/ /* Create a PangoLayout, set the font and text */ current_layout = gp_cairo_create_layout (plot->cr); pango_layout_set_text (current_layout, enhanced_text_utf8, -1); current_desc = pango_font_description_new (); pango_font_description_set_family (current_desc, gp_cairo_enhanced_get_fontname(plot)); pango_font_description_set_size(current_desc,(int) gp_cairo_enhanced_fontsize*PANGO_SCALE); pango_font_description_set_weight (current_desc, plot->fontweight ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL); pango_font_description_set_style (current_desc, plot->fontstyle ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL); pango_layout_set_font_description (current_layout, current_desc); pango_font_description_free (current_desc); pango_layout_get_extents(current_layout, ¤t_ink_rect, ¤t_logical_rect); g_object_unref (current_layout); /* calculate the distance to remove to center the overprinted text */ underprinted_logical_rect.width = -(underprinted_logical_rect.width + current_logical_rect.width)/2; overprinted_width = current_logical_rect.width; /* adding a blank character with the corresponding shape */ gp_cairo_add_shape(underprinted_logical_rect, start); strncpy(gp_cairo_underprinted_utf8, "", sizeof(gp_cairo_underprinted_utf8)); /* increment the position as we added a character */ start++; } if (gp_cairo_enhanced_showflag) { strncat(gp_cairo_utf8, enhanced_text_utf8, sizeof(gp_cairo_utf8)-strlen(gp_cairo_utf8)-1); end = strlen(gp_cairo_utf8); /* add text attributes to the main list */ gp_cairo_add_attr(plot, gp_cairo_enhanced_AttrList, start, end); } else { /* position must be modified, but text not actually drawn */ /* the idea is to use a blank character, drawn with the width of the text*/ current_layout = gp_cairo_create_layout (plot->cr); pango_layout_set_text (current_layout, gp_cairo_utf8, -1); pango_layout_set_attributes (current_layout, gp_cairo_enhanced_AttrList); pango_layout_get_extents(current_layout, ¤t_ink_rect, ¤t_logical_rect); g_object_unref (current_layout); /* we first compute the size of the text */ /* Create a PangoLayout, set the font and text */ hide_layout = gp_cairo_create_layout (plot->cr); pango_layout_set_text (hide_layout, enhanced_text_utf8, -1); hide_desc = pango_font_description_new (); pango_font_description_set_family (hide_desc, gp_cairo_enhanced_get_fontname(plot)); pango_font_description_set_size(hide_desc,(int) gp_cairo_enhanced_fontsize*PANGO_SCALE); pango_font_description_set_weight (hide_desc, plot->fontweight ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL); pango_font_description_set_style (hide_desc, plot->fontstyle ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL); pango_layout_set_font_description (hide_layout, hide_desc); pango_font_description_free (hide_desc); pango_layout_get_extents(hide_layout, &hide_ink_rect, &hide_logical_rect); g_object_unref (hide_layout); /* rect.y must be reworked to take previous text into account, which may be smaller */ /* hide_logical_rect.y is always initialized at zero, but should be : */ if (current_logical_rect.height<hide_logical_rect.height) hide_logical_rect.y = current_logical_rect.height - hide_logical_rect.height; /* adding a blank character with the corresponding shape */ gp_cairo_add_shape(hide_logical_rect, start); end = start+1; /* end *must* be defined, as it is used if widthflag is false */ } if (!gp_cairo_enhanced_widthflag) { /* the idea is to use a blank character, drawn with the inverted width of the text*/ /* we first compute the size of the text */ /* Create a PangoLayout, set the font and text */ zerowidth_layout = gp_cairo_create_layout (plot->cr); pango_layout_set_text (zerowidth_layout, enhanced_text_utf8, -1); zerowidth_desc = pango_font_description_new (); pango_font_description_set_family (zerowidth_desc, gp_cairo_enhanced_get_fontname(plot)); pango_font_description_set_size(zerowidth_desc,(int) gp_cairo_enhanced_fontsize*PANGO_SCALE); pango_font_description_set_weight (zerowidth_desc, plot->fontweight ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL); pango_font_description_set_style (zerowidth_desc, plot->fontstyle ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL); pango_layout_set_font_description (zerowidth_layout, zerowidth_desc); pango_font_description_free (zerowidth_desc); pango_layout_get_extents(zerowidth_layout, NULL, &zerowidth_logical_rect); g_object_unref (zerowidth_layout); /* invert the size, so we will go back to the start of the string */ zerowidth_logical_rect.width = -zerowidth_logical_rect.width; /* adding a blank character with the corresponding shape */ gp_cairo_add_shape(zerowidth_logical_rect,end); end++; } if (gp_cairo_enhanced_overprint==2) { /* revert the previous negative space to go back to starting point. * Take centered overprinted text width into account */ underprinted_logical_rect.width = -underprinted_logical_rect.width - overprinted_width/2; /* adding a blank character with the corresponding shape */ gp_cairo_add_shape(underprinted_logical_rect,end); } if (gp_cairo_enhanced_save) /* we aim at restoring position later */ { save_start = strlen( gp_cairo_save_utf8); strncat(gp_cairo_save_utf8, enhanced_text_utf8, sizeof(gp_cairo_utf8)-strlen(gp_cairo_utf8)-1); save_end = strlen( gp_cairo_save_utf8); /* add text attributes to the save list */ gp_cairo_add_attr(plot, gp_cairo_enhanced_save_AttrList, save_start, save_end); } if (gp_cairo_enhanced_overprint==1) /* save underprinted text with its attributes */{ underprinted_start = strlen(gp_cairo_underprinted_utf8); strncat(gp_cairo_underprinted_utf8, enhanced_text_utf8, sizeof(gp_cairo_underprinted_utf8)-strlen(gp_cairo_underprinted_utf8)-1); underprinted_end = strlen(gp_cairo_underprinted_utf8); if (gp_cairo_enhanced_underprinted_AttrList) pango_attr_list_unref( gp_cairo_enhanced_underprinted_AttrList ); gp_cairo_enhanced_underprinted_AttrList = pango_attr_list_new(); /* add text attributes to the underprinted list */ gp_cairo_add_attr(plot, gp_cairo_enhanced_underprinted_AttrList, underprinted_start, underprinted_end); } #ifdef MAP_SYMBOL if (symbol_font_parsed) strncpy(gp_cairo_enhanced_font, "Symbol", sizeof(gp_cairo_enhanced_font)); #endif /* MAP_SYMBOL */ g_free(enhanced_text_utf8); } /* brace is TRUE to keep processing to }, * FALSE to do one character only * fontname & fontsize are obvious * base is the current baseline * widthflag is TRUE if the width of this should count, * FALSE for zero width boxes * showflag is TRUE if this should be shown, * FALSE if it should not be shown (like TeX \phantom) * overprint is 0 for normal operation, * 1 for the underprinted text (included in width calculation), * 2 for the overprinted text (not included in width calc, through widhtflag=false), * (overprinted text is centered horizontally on underprinted text) * 3 means "save current position", * 4 means "restore saved position" */ void gp_cairo_enhanced_open(plot_struct *plot, char* fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { if (overprint == 3) { gp_cairo_enhanced_save = TRUE; gp_cairo_enhanced_restore_now = FALSE; gp_cairo_enhanced_save_AttrList = pango_attr_list_new(); return; } if (overprint == 4) { gp_cairo_enhanced_save = FALSE; gp_cairo_enhanced_restore_now = TRUE; return; } if (!gp_cairo_enhanced_opened_string) { gp_cairo_enhanced_opened_string = TRUE; gp_cairo_enhanced_char = gp_cairo_enhanced_string; strncpy(gp_cairo_enhanced_font, fontname, sizeof(gp_cairo_enhanced_font)); gp_cairo_enhanced_fontsize = fontsize*plot->oversampling_scale; gp_cairo_enhanced_base = base*plot->oversampling_scale; gp_cairo_enhanced_showflag = showflag; gp_cairo_enhanced_overprint = overprint; gp_cairo_enhanced_widthflag = widthflag; } } void gp_cairo_enhanced_writec(plot_struct *plot, int character) { *gp_cairo_enhanced_char++ = character; *gp_cairo_enhanced_char = '\0'; } void gp_cairo_enhanced_init(plot_struct *plot, int len) { /* begin by stroking any open path */ gp_cairo_stroke(plot); /* also draw any open polygon set */ gp_cairo_end_polygon(plot); gp_cairo_enhanced_string = (char*) malloc(len+1); gp_cairo_enhanced_opened_string = FALSE; gp_cairo_enhanced_overprint = FALSE; gp_cairo_enhanced_showflag = TRUE; gp_cairo_enhanced_fontsize = plot->fontsize*plot->oversampling_scale; strncpy(gp_cairo_enhanced_font, plot->fontname, sizeof(gp_cairo_enhanced_font)); gp_cairo_enhanced_AttrList = pango_attr_list_new(); } void gp_cairo_enhanced_finish(plot_struct *plot, int x, int y) { PangoRectangle ink_rect, logical_rect; PangoLayout *layout; double vert_just, arg, enh_x, enh_y, delta, deltax, deltay; /* Create a PangoLayout, set the font and text */ layout = gp_cairo_create_layout (plot->cr); pango_layout_set_text (layout, gp_cairo_utf8, -1); pango_layout_set_attributes (layout, gp_cairo_enhanced_AttrList); pango_layout_get_extents(layout, &ink_rect, &logical_rect); /* vert_just = ((double)ink_rect.height/2 +(double)ink_rect.y) / PANGO_SCALE; */ vert_just = avg_vchar/2; arg = plot->text_angle * M_PI/180; enh_x = x - vert_just * sin(arg); enh_y = y - vert_just * cos(arg); delta = ((double)logical_rect.width/2) / PANGO_SCALE; deltax = delta * cos(arg); deltay = delta * sin(arg); switch (plot->justify_mode) { case LEFT : break; case CENTRE : enh_x -= deltax; enh_y += deltay; break; case RIGHT : enh_x -= 2*deltax; enh_y += 2*deltay; break; } cairo_save(plot->cr); cairo_move_to (plot->cr, enh_x, enh_y); /* angle in radians */ cairo_rotate(plot->cr, -arg); cairo_set_source_rgb(plot->cr, plot->color.r, plot->color.g, plot->color.b); /* Inform Pango to re-layout the text with the new transformation */ pango_cairo_update_layout (plot->cr, layout); pango_cairo_show_layout (plot->cr, layout); /* pango_cairo_show_layout does not clear the path (here a starting point) * Do it by ourselves, or we can get spurious lines on future calls. */ cairo_new_path(plot->cr); /* free the layout object */ pango_attr_list_unref( gp_cairo_enhanced_AttrList ); g_object_unref (layout); cairo_restore(plot->cr); strncpy(gp_cairo_utf8, "", sizeof(gp_cairo_utf8)); free(gp_cairo_enhanced_string); } /* obtain the right pattern or solid fill from fillstyle and fillpar. * Used to draw fillboxes and polygons */ void gp_cairo_fill(plot_struct *plot, int fillstyle, int fillpar) { double red = 0, green = 0, blue = 0, fact = 0; switch (fillstyle) { case FS_TRANSPARENT_SOLID: red = plot->color.r; green = plot->color.g; blue = plot->color.b; cairo_set_source_rgba(plot->cr, red, green, blue, (double)fillpar/100.); return; case FS_SOLID: /* solid fill */ if (fillpar==100) /* treated as a special case to accelerate common situation */ { cairo_set_source_rgb(plot->cr, plot->color.r, plot->color.g, plot->color.b); FPRINTF((stderr,"solid %lf %lf %lf\n",plot->color.r, plot->color.g, plot->color.b)); return; } red = plot->color.r; green = plot->color.g; blue = plot->color.b; fact = (double)(100 - fillpar) /100; if (fact >= 0 && fact <= 1) { red += (1 - red) * fact; green += (1 - green) * fact; blue += (1 - blue) * fact; } cairo_set_source_rgb(plot->cr, red, green, blue); FPRINTF((stderr,"transparent solid %lf %lf %lf\n",red, green, blue)); return; case FS_PATTERN: /* pattern fill */ case FS_TRANSPARENT_PATTERN: gp_cairo_fill_pattern(plot, fillstyle, fillpar); FPRINTF((stderr,"pattern fillpar = %d %lf %lf %lf\n",fillpar, plot->color.r, plot->color.g, plot->color.b)); return; case FS_EMPTY: /* fill with background plot->color */ cairo_set_source_rgb(plot->cr, plot->background.r, plot->background.g, plot->background.b); FPRINTF((stderr,"empty\n")); return; default: cairo_set_source_rgb(plot->cr, plot->color.r, plot->color.g, plot->color.b); FPRINTF((stderr,"default %lf %lf %lf\n",plot->color.r, plot->color.g, plot->color.b)); return; } } #define PATTERN_SIZE 8 /* return a pattern used for fillboxes and polygons */ void gp_cairo_fill_pattern(plot_struct *plot, int fillstyle, int fillpar) { cairo_surface_t *pattern_surface; cairo_t *pattern_cr; cairo_pattern_t *pattern; cairo_matrix_t context_matrix; cairo_matrix_t matrix; pattern_surface = cairo_surface_create_similar(cairo_get_target(plot->cr), CAIRO_CONTENT_COLOR_ALPHA, PATTERN_SIZE, PATTERN_SIZE); pattern_cr = cairo_create(pattern_surface); cairo_matrix_init_scale(&context_matrix, PATTERN_SIZE, PATTERN_SIZE); cairo_set_matrix(pattern_cr,&context_matrix); if (fillstyle == FS_TRANSPARENT_PATTERN) cairo_set_source_rgba( pattern_cr, 1.0, 1.0, 1.0, 0.0); else cairo_set_source_rgb( pattern_cr, 1.0, 1.0, 1.0); cairo_paint(pattern_cr); if (!strcmp(term->name,"pdfcairo")) /* Work-around for poor scaling in cairo <= 1.10 */ cairo_set_line_width(pattern_cr, PATTERN_SIZE/150.); else cairo_set_line_width(pattern_cr, PATTERN_SIZE/50.); cairo_set_line_cap (pattern_cr, CAIRO_LINE_CAP_BUTT); cairo_set_source_rgb(pattern_cr, plot->color.r, plot->color.g, plot->color.b); switch (fillpar%8) { case 0: /* no fill */ default: break; case 1: /* cross-hatch */ case 2: /* double cross-hatch */ cairo_move_to(pattern_cr, 0,0); cairo_line_to(pattern_cr, 1.0,1.0); cairo_stroke(pattern_cr); cairo_move_to(pattern_cr, 0,1.0); cairo_line_to(pattern_cr, 1.0,0); cairo_stroke(pattern_cr); break; case 3: /* solid */ cairo_paint(pattern_cr); break; case 4: /* diagonal hatch */ case 5: case 6: case 7: cairo_move_to(pattern_cr, 0.5,0.); cairo_line_to(pattern_cr, 0.5,1.); cairo_stroke(pattern_cr); break; } pattern = cairo_pattern_create_for_surface( pattern_surface ); cairo_pattern_set_extend( pattern, CAIRO_EXTEND_REPEAT ); /* compensate the transformation matrix of the main context */ cairo_matrix_init_scale(&matrix, 1.0/plot->oversampling_scale, 1.0/plot->oversampling_scale); switch (fillpar%8) { case 0: /* no fill */ case 1: /* cross-hatch */ case 3: /* solid */ default: break; case 2: /* double cross-hatch */ cairo_matrix_scale( &matrix, 2.,2.); break; case 4: /* diagonal hatch */ cairo_matrix_rotate( &matrix, M_PI/4); break; case 5: cairo_matrix_rotate( &matrix, -M_PI/4); break; case 6: cairo_matrix_rotate( &matrix, M_PI/4); cairo_matrix_scale( &matrix, 2.,2.); break; case 7: cairo_matrix_rotate( &matrix, -M_PI/4); cairo_matrix_scale( &matrix, 2.,2.); break; } cairo_pattern_set_matrix(pattern,&matrix); cairo_destroy( pattern_cr ); cairo_set_source( plot->cr, pattern ); cairo_pattern_destroy( pattern ); cairo_surface_destroy( pattern_surface ); } /* Sets term vars v_char, h_char, v_tic, h_tic * Depends on plot->fontsize and fontname */ void gp_cairo_set_termvar(plot_struct *plot, unsigned int *v_char, unsigned int *h_char) { PangoLayout *layout; PangoFontDescription *desc; PangoRectangle ink_rect; PangoRectangle logical_rect; unsigned int tmp_v_char, tmp_h_char; /* Create a PangoLayout, set the font and text */ layout = gp_cairo_create_layout (plot->cr); pango_layout_set_text (layout, "0123456789", -1); desc = pango_font_description_new (); pango_font_description_set_family (desc, plot->fontname); pango_font_description_set_size(desc,(int) (plot->fontsize*PANGO_SCALE*plot->oversampling_scale)); pango_font_description_set_weight (desc, plot->fontweight ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL); pango_font_description_set_style (desc, plot->fontstyle ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL); pango_layout_set_font_description (layout, desc); pango_font_description_free (desc); pango_layout_get_extents(layout, &ink_rect, &logical_rect); g_object_unref (layout); /* we don't use gnuplot_x() and gnuplot_y() in the following * as the scale should have just been updated to 1. * Although PANGO works with integer, it scales them via a huge number (usually ~1000). * That's why I use ceil() instead of direct division result */ tmp_v_char = (int) ceil( (double) logical_rect.height/PANGO_SCALE) - 1; tmp_h_char = (int) ceil( (double) logical_rect.width/(10*PANGO_SCALE)); if (v_char) *v_char = tmp_v_char; if (h_char) *h_char = tmp_h_char; /* FIXME!!! So far, so good. But now we have a problem. This routine */ /* is called synchronously with the set_font command, but avg_vchar is */ /* needed asynchronously during execution of the display list. */ avg_vchar = tmp_v_char; } void gp_cairo_solid_background(plot_struct *plot) { if (cairo_status (plot->cr)) { printf("Cairo is unhappy: %s\n", cairo_status_to_string (cairo_status (plot->cr))); exit(0); } cairo_set_source_rgb(plot->cr, plot->background.r, plot->background.g, plot->background.b); cairo_paint(plot->cr); } void gp_cairo_clear_background(plot_struct *plot) { if (cairo_status (plot->cr)) { printf("Cairo is unhappy: %s\n", cairo_status_to_string (cairo_status (plot->cr))); exit(0); } cairo_set_source_rgba(plot->cr, 0.0, 0.0, 0.0, 0.0); cairo_paint(plot->cr); } /*---------------------------------------------------------------------------- font functions ----------------------------------------------------------------------------*/ /* in enhanced text mode, look if enhanced mode has set the font, * otherwise return the default */ const char* gp_cairo_enhanced_get_fontname(plot_struct *plot) { if ( strlen(gp_cairo_enhanced_font)==0 ) return plot->fontname; else return gp_cairo_enhanced_font; } /* BM: New function to determine the default font. * On Windows, the "Sans" alias normally is equivalent to * "Tahoma" but the resolution fails on some systems. */ const char * gp_cairo_default_font(void) { #ifdef WIN32 return "Tahoma"; #else return "Sans"; #endif } /*---------------------------------------------------------------------------- coordinates functions ----------------------------------------------------------------------------*/ #define OFFSET 0 double device_x(plot_struct *plot, double x) { double scaled_x; scaled_x = plot->xscale*x/plot->oversampling_scale ; return scaled_x + OFFSET; } double device_y(plot_struct *plot, double y) { double scaled_and_mirrored_y; scaled_and_mirrored_y = (plot->ymax - y)*plot->yscale/plot->oversampling_scale; return scaled_and_mirrored_y + OFFSET; } double gnuplot_x(plot_struct *plot, double x) { double scaled_x; scaled_x = (x + OFFSET)/plot->xscale*plot->oversampling_scale ; return scaled_x; } double gnuplot_y(plot_struct *plot, double y) { double scaled_and_mirrored_y; scaled_and_mirrored_y = plot->ymax +(-y + OFFSET)/plot->yscale*plot->oversampling_scale; return scaled_and_mirrored_y; } /* return the charset as a string accepted by glib routines, * default to the locale charset, * the returned char* doesn't have to be freed. */ const char* gp_cairo_get_encoding(plot_struct *plot) { const char * charset; switch (plot->encoding) { case S_ENC_ISO8859_2 : return "ISO-8859-2"; case S_ENC_ISO8859_15 : return "ISO-8859-15"; case S_ENC_CP437 : return "cp437"; case S_ENC_CP850 : return "cp850"; case S_ENC_CP852 : return "cp852"; case S_ENC_CP1250 : return "windows-1250"; case S_ENC_KOI8_R : return "KOI8-R"; case S_ENC_KOI8_U : return "KOI8-U"; case S_ENC_ISO8859_1 : return "ISO-8859-1"; case S_ENC_UTF8 : return "UTF-8"; case S_ENC_DEFAULT : case S_ENC_INVALID : default : g_get_charset(&charset); return charset; } } /* Symbol font handling. * To ensure compatibility with other terminals, * use the map provided by http://www.unicode.org/ to * translate character codes to their unicode counterparts. * The returned string has te be freed by the calling function. */ gchar* gp_cairo_convert_symbol_to_unicode(plot_struct *plot, const char* string) { gchar *string_utf8; gchar *output; gchar *iter; gchar *iter_mod; int i; int imax; GError *error = NULL; /* first step, get a valid utf8 string, without taking care of Symbol. * The input string is likely to be encoded in iso_8859_1, with characters * going from 1 to 255. Try this first. If it's not the case, fall back to * routine based on the encoding variable. */ string_utf8 = g_convert(string, -1, "UTF-8", "ISO-8859-1", NULL, NULL, &error); if (error != NULL) { fprintf(stderr,"Symbol font : fallback to iso_8859_1 did not work\n"); g_error_free(error); string_utf8 = gp_cairo_convert(plot, string); } iter = string_utf8; /* Assume that the output string in utf8 won't use more than 8 bytes per character/ * The utf8 specification fixes the limit to 4 bytes per character, but here we can also * composite two characters */ output = (gchar*) gp_alloc((4*strlen(string)+1)*sizeof(gchar),"Symbol to unicode"); iter_mod = output; imax = g_utf8_strlen(string_utf8,-1) + 1; for (i=0; i<imax; ++i) { switch(g_utf8_get_char(iter)) { #define SYMB_UNICODE(symbol_char,unicode) case symbol_char : g_unichar_to_utf8(unicode, iter_mod); break; /* not modifying ASCII characters */ /* SYMB_UNICODE(0x20,0x0020); */ /* SPACE */ /* SYMB_UNICODE(0x21,0x0021); */ /* EXCLAMATION MARK */ SYMB_UNICODE(0x22,0x2200); /* FOR ALL */ /* SYMB_UNICODE(0x23,0x0023); */ /* NUMBER SIGN */ SYMB_UNICODE(0x24,0x2203); /* THERE EXISTS */ /* SYMB_UNICODE(0x25,0x0025); */ /* PERCENT SIGN */ /* SYMB_UNICODE(0x26,0x0026); */ /* AMPERSAND */ SYMB_UNICODE(0x27,0x220D); /* SMALL CONTAINS AS MEMBER */ /* SYMB_UNICODE(0x28,0x0028); */ /* LEFT PARENTHESIS */ /* SYMB_UNICODE(0x29,0x0029); */ /* RIGHT PARENTHESIS */ /* SYMB_UNICODE(0x2A,0x2217); */ /* ASTERISK OPERATOR */ /* SYMB_UNICODE(0x2B,0x002B); */ /* PLUS SIGN */ /* SYMB_UNICODE(0x2C,0x002C); */ /* COMMA */ /* SYMB_UNICODE(0x2D,0x2212); */ /* MINUS SIGN */ /* SYMB_UNICODE(0x2E,0x002E); */ /* FULL STOP */ /* SYMB_UNICODE(0x2F,0x002F); */ /* SOLIDUS */ /* SYMB_UNICODE(0x30,0x0030); */ /* DIGIT ZERO */ /* SYMB_UNICODE(0x31,0x0031); */ /* DIGIT ONE */ /* SYMB_UNICODE(0x32,0x0032); */ /* DIGIT TWO */ /* SYMB_UNICODE(0x33,0x0033); */ /* DIGIT THREE */ /* SYMB_UNICODE(0x34,0x0034); */ /* DIGIT FOUR */ /* SYMB_UNICODE(0x35,0x0035); */ /* DIGIT FIVE */ /* SYMB_UNICODE(0x36,0x0036); */ /* DIGIT SIX */ /* SYMB_UNICODE(0x37,0x0037); */ /* DIGIT SEVEN */ /* SYMB_UNICODE(0x38,0x0038); */ /* DIGIT EIGHT */ /* SYMB_UNICODE(0x39,0x0039); */ /* DIGIT NINE */ /* SYMB_UNICODE(0x3A,0x003A); */ /* COLON */ /* SYMB_UNICODE(0x3B,0x003B); */ /* SEMICOLON */ /* SYMB_UNICODE(0x3C,0x003C); */ /* LESS-THAN SIGN */ /* SYMB_UNICODE(0x3D,0x003D); */ /* EQUALS SIGN */ /* SYMB_UNICODE(0x3E,0x003E); */ /* GREATER-THAN SIGN */ /* SYMB_UNICODE(0x3F,0x003F); */ /* QUESTION MARK */ SYMB_UNICODE(0x40,0x2245); /* APPROXIMATELY EQUAL TO */ SYMB_UNICODE(0x41,0x0391); /* GREEK CAPITAL LETTER ALPHA */ SYMB_UNICODE(0x42,0x0392); /* GREEK CAPITAL LETTER BETA */ SYMB_UNICODE(0x43,0x03A7); /* GREEK CAPITAL LETTER CHI */ SYMB_UNICODE(0x44,0x0394); /* GREEK CAPITAL LETTER DELTA */ SYMB_UNICODE(0x45,0x0395); /* GREEK CAPITAL LETTER EPSILON */ SYMB_UNICODE(0x46,0x03A6); /* GREEK CAPITAL LETTER PHI */ SYMB_UNICODE(0x47,0x0393); /* GREEK CAPITAL LETTER GAMMA */ SYMB_UNICODE(0x48,0x0397); /* GREEK CAPITAL LETTER ETA */ SYMB_UNICODE(0x49,0x0399); /* GREEK CAPITAL LETTER IOTA */ SYMB_UNICODE(0x4A,0x03D1); /* GREEK THETA SYMBOL */ SYMB_UNICODE(0x4B,0x039A); /* GREEK CAPITAL LETTER KAPPA */ SYMB_UNICODE(0x4C,0x039B); /* GREEK CAPITAL LETTER LAMDA */ SYMB_UNICODE(0x4D,0x039C); /* GREEK CAPITAL LETTER MU */ SYMB_UNICODE(0x4E,0x039D); /* GREEK CAPITAL LETTER NU */ SYMB_UNICODE(0x4F,0x039F); /* GREEK CAPITAL LETTER OMICRON */ SYMB_UNICODE(0x50,0x03A0); /* GREEK CAPITAL LETTER PI */ SYMB_UNICODE(0x51,0x0398); /* GREEK CAPITAL LETTER THETA */ SYMB_UNICODE(0x52,0x03A1); /* GREEK CAPITAL LETTER RHO */ SYMB_UNICODE(0x53,0x03A3); /* GREEK CAPITAL LETTER SIGMA */ SYMB_UNICODE(0x54,0x03A4); /* GREEK CAPITAL LETTER TAU */ SYMB_UNICODE(0x55,0x03A5); /* GREEK CAPITAL LETTER UPSILON */ SYMB_UNICODE(0x56,0x03C2); /* GREEK SMALL LETTER FINAL SIGMA */ SYMB_UNICODE(0x57,0x03A9); /* GREEK CAPITAL LETTER OMEGA */ SYMB_UNICODE(0x58,0x039E); /* GREEK CAPITAL LETTER XI */ SYMB_UNICODE(0x59,0x03A8); /* GREEK CAPITAL LETTER PSI */ SYMB_UNICODE(0x5A,0x0396); /* GREEK CAPITAL LETTER ZETA */ SYMB_UNICODE(0x5B,0x005B); /* LEFT SQUARE BRACKET */ SYMB_UNICODE(0x5C,0x2234); /* THEREFORE */ SYMB_UNICODE(0x5D,0x005D); /* RIGHT SQUARE BRACKET */ SYMB_UNICODE(0x5E,0x22A5); /* UP TACK */ SYMB_UNICODE(0x5F,0x005F); /* LOW LINE */ SYMB_UNICODE(0x60,0xF8E5); /* radical extender corporate char */ SYMB_UNICODE(0x61,0x03B1); /* GREEK SMALL LETTER ALPHA */ SYMB_UNICODE(0x62,0x03B2); /* GREEK SMALL LETTER BETA */ SYMB_UNICODE(0x63,0x03C7); /* GREEK SMALL LETTER CHI */ SYMB_UNICODE(0x64,0x03B4); /* GREEK SMALL LETTER DELTA */ SYMB_UNICODE(0x65,0x03B5); /* GREEK SMALL LETTER EPSILON */ SYMB_UNICODE(0x66,0x03C6); /* GREEK SMALL LETTER PHI */ SYMB_UNICODE(0x67,0x03B3); /* GREEK SMALL LETTER GAMMA */ SYMB_UNICODE(0x68,0x03B7); /* GREEK SMALL LETTER ETA */ SYMB_UNICODE(0x69,0x03B9); /* GREEK SMALL LETTER IOTA */ SYMB_UNICODE(0x6A,0x03D5); /* GREEK PHI SYMBOL */ SYMB_UNICODE(0x6B,0x03BA); /* GREEK SMALL LETTER KAPPA */ SYMB_UNICODE(0x6C,0x03BB); /* GREEK SMALL LETTER LAMDA */ /* SYMB_UNICODE(0x6D,0x03BC); */ /* GREEK SMALL LETTER MU */ SYMB_UNICODE(0x6D,0x00B5); /* GREEK SMALL LETTER MU */ SYMB_UNICODE(0x6E,0x03BD); /* GREEK SMALL LETTER NU */ SYMB_UNICODE(0x6F,0x03BF); /* GREEK SMALL LETTER OMICRON */ SYMB_UNICODE(0x70,0x03C0); /* GREEK SMALL LETTER PI */ SYMB_UNICODE(0x71,0x03B8); /* GREEK SMALL LETTER THETA */ SYMB_UNICODE(0x72,0x03C1); /* GREEK SMALL LETTER RHO */ SYMB_UNICODE(0x73,0x03C3); /* GREEK SMALL LETTER SIGMA */ SYMB_UNICODE(0x74,0x03C4); /* GREEK SMALL LETTER TAU */ SYMB_UNICODE(0x75,0x03C5); /* GREEK SMALL LETTER UPSILON */ SYMB_UNICODE(0x76,0x03D6); /* GREEK PI SYMBOL */ SYMB_UNICODE(0x77,0x03C9); /* GREEK SMALL LETTER OMEGA */ SYMB_UNICODE(0x78,0x03BE); /* GREEK SMALL LETTER XI */ SYMB_UNICODE(0x79,0x03C8); /* GREEK SMALL LETTER PSI */ SYMB_UNICODE(0x7A,0x03B6); /* GREEK SMALL LETTER ZETA */ SYMB_UNICODE(0x7B,0x007B); /* LEFT CURLY BRACKET */ SYMB_UNICODE(0x7C,0x007C); /* VERTICAL LINE */ SYMB_UNICODE(0x7D,0x007D); /* RIGHT CURLY BRACKET */ SYMB_UNICODE(0x7E,0x223C); /* TILDE OPERATOR */ SYMB_UNICODE(0xA0,0x20AC); /* EURO SIGN */ SYMB_UNICODE(0xA1,0x03D2); /* GREEK UPSILON WITH HOOK SYMBOL */ SYMB_UNICODE(0xA2,0x2032); /* PRIME minute */ SYMB_UNICODE(0xA3,0x2264); /* LESS-THAN OR EQUAL TO */ SYMB_UNICODE(0xA4,0x2044); /* FRACTION SLASH */ SYMB_UNICODE(0xA5,0x221E); /* INFINITY */ SYMB_UNICODE(0xA6,0x0192); /* LATIN SMALL LETTER F WITH HOOK */ SYMB_UNICODE(0xA7,0x2663); /* BLACK CLUB SUIT */ SYMB_UNICODE(0xA8,0x2666); /* BLACK DIAMOND SUIT */ SYMB_UNICODE(0xA9,0x2665); /* BLACK HEART SUIT */ SYMB_UNICODE(0xAA,0x2660); /* BLACK SPADE SUIT */ SYMB_UNICODE(0xAB,0x2194); /* LEFT RIGHT ARROW */ SYMB_UNICODE(0xAC,0x2190); /* LEFTWARDS ARROW */ SYMB_UNICODE(0xAD,0x2191); /* UPWARDS ARROW */ SYMB_UNICODE(0xAE,0x2192); /* RIGHTWARDS ARROW */ SYMB_UNICODE(0xAF,0x2193); /* DOWNWARDS ARROW */ SYMB_UNICODE(0xB0,0x00B0); /* DEGREE SIGN */ SYMB_UNICODE(0xB1,0x00B1); /* PLUS-MINUS SIGN */ SYMB_UNICODE(0xB2,0x2033); /* DOUBLE PRIME second */ SYMB_UNICODE(0xB3,0x2265); /* GREATER-THAN OR EQUAL TO */ SYMB_UNICODE(0xB4,0x00D7); /* MULTIPLICATION SIGN */ SYMB_UNICODE(0xB5,0x221D); /* PROPORTIONAL TO */ SYMB_UNICODE(0xB6,0x2202); /* PARTIAL DIFFERENTIAL */ SYMB_UNICODE(0xB7,0x2022); /* BULLET */ SYMB_UNICODE(0xB8,0x00F7); /* DIVISION SIGN */ SYMB_UNICODE(0xB9,0x2260); /* NOT EQUAL TO */ SYMB_UNICODE(0xBA,0x2261); /* IDENTICAL TO */ SYMB_UNICODE(0xBB,0x2248); /* ALMOST EQUAL TO */ SYMB_UNICODE(0xBC,0x2026); /* HORIZONTAL ELLIPSIS */ SYMB_UNICODE(0xBD,0x23D0); /* VERTICAL LINE EXTENSION (for arrows) */ SYMB_UNICODE(0xBE,0x23AF); /* HORIZONTAL LINE EXTENSION (for arrows) */ SYMB_UNICODE(0xBF,0x21B5); /* DOWNWARDS ARROW WITH CORNER LEFTWARDS */ SYMB_UNICODE(0xC0,0x2135); /* ALEF SYMBOL */ SYMB_UNICODE(0xC1,0x2111); /* BLACK-LETTER CAPITAL I */ SYMB_UNICODE(0xC2,0x211C); /* BLACK-LETTER CAPITAL R */ SYMB_UNICODE(0xC3,0x2118); /* SCRIPT CAPITAL P */ SYMB_UNICODE(0xC4,0x2297); /* CIRCLED TIMES */ SYMB_UNICODE(0xC5,0x2295); /* CIRCLED PLUS */ SYMB_UNICODE(0xC6,0x2205); /* EMPTY SET */ SYMB_UNICODE(0xC7,0x2229); /* INTERSECTION */ SYMB_UNICODE(0xC8,0x222A); /* UNION */ SYMB_UNICODE(0xC9,0x2283); /* SUPERSET OF */ SYMB_UNICODE(0xCA,0x2287); /* SUPERSET OF OR EQUAL TO */ SYMB_UNICODE(0xCB,0x2284); /* NOT A SUBSET OF */ SYMB_UNICODE(0xCC,0x2282); /* SUBSET OF */ SYMB_UNICODE(0xCD,0x2286); /* SUBSET OF OR EQUAL TO */ SYMB_UNICODE(0xCE,0x2208); /* ELEMENT OF */ SYMB_UNICODE(0xCF,0x2209); /* NOT AN ELEMENT OF */ SYMB_UNICODE(0xD0,0x2220); /* ANGLE */ SYMB_UNICODE(0xD1,0x2207); /* NABLA */ SYMB_UNICODE(0xD2,0x00AE); /* REGISTERED SIGN serif */ SYMB_UNICODE(0xD3,0x00A9); /* COPYRIGHT SIGN serif */ SYMB_UNICODE(0xD4,0x2122); /* TRADE MARK SIGN serif */ SYMB_UNICODE(0xD5,0x220F); /* N-ARY PRODUCT */ SYMB_UNICODE(0xD6,0x221A); /* SQUARE ROOT */ SYMB_UNICODE(0xD7,0x22C5); /* DOT OPERATOR */ SYMB_UNICODE(0xD8,0x00AC); /* NOT SIGN */ SYMB_UNICODE(0xD9,0x2227); /* LOGICAL AND */ SYMB_UNICODE(0xDA,0x2228); /* LOGICAL OR */ SYMB_UNICODE(0xDB,0x21D4); /* LEFT RIGHT DOUBLE ARROW */ SYMB_UNICODE(0xDC,0x21D0); /* LEFTWARDS DOUBLE ARROW */ SYMB_UNICODE(0xDD,0x21D1); /* UPWARDS DOUBLE ARROW */ SYMB_UNICODE(0xDE,0x21D2); /* RIGHTWARDS DOUBLE ARROW */ SYMB_UNICODE(0xDF,0x21D3); /* DOWNWARDS DOUBLE ARROW */ SYMB_UNICODE(0xE0,0x25CA); /* LOZENGE previously mapped to 0x22C4 DIAMOND OPERATOR */ SYMB_UNICODE(0xE1,0x3008); /* LEFT ANGLE BRACKET */ SYMB_UNICODE(0xE5,0x2211); /* N-ARY SUMMATION */ SYMB_UNICODE(0xE6,0x239B); /* LEFT PARENTHESIS UPPER HOOK */ SYMB_UNICODE(0xE7,0x239C); /* LEFT PARENTHESIS EXTENSION */ SYMB_UNICODE(0xE8,0x239D); /* LEFT PARENTHESIS LOWER HOOK */ SYMB_UNICODE(0xE9,0x23A1); /* LEFT SQUARE BRACKET UPPER CORNER */ SYMB_UNICODE(0xEA,0x23A2); /* LEFT SQUARE BRACKET EXTENSION */ SYMB_UNICODE(0xEB,0x23A3); /* LEFT SQUARE BRACKET LOWER CORNER */ SYMB_UNICODE(0xEC,0x23A7); /* LEFT CURLY BRACKET UPPER HOOK */ SYMB_UNICODE(0xED,0x23A8); /* LEFT CURLY BRACKET MIDDLE PIECE */ SYMB_UNICODE(0xEE,0x23A9); /* LEFT CURLY BRACKET LOWER HOOK */ SYMB_UNICODE(0xEF,0x23AA); /* CURLY BRACKET EXTENSION */ SYMB_UNICODE(0xF0,0xF8FF); /* Apple logo */ SYMB_UNICODE(0xF1,0x3009); /* RIGHT ANGLE BRACKET */ SYMB_UNICODE(0xF2,0x222B); /* INTEGRAL */ SYMB_UNICODE(0xF3,0x2320); /* TOP HALF INTEGRAL */ SYMB_UNICODE(0xF4,0x23AE); /* INTEGRAL EXTENSION */ SYMB_UNICODE(0xF5,0x2321); /* BOTTOM HALF INTEGRAL */ SYMB_UNICODE(0xF6,0x239E); /* RIGHT PARENTHESIS UPPER HOOK */ SYMB_UNICODE(0xF7,0x239F); /* RIGHT PARENTHESIS EXTENSION */ SYMB_UNICODE(0xF8,0x23A0); /* RIGHT PARENTHESIS LOWER HOOK */ SYMB_UNICODE(0xF9,0x23A4); /* RIGHT SQUARE BRACKET UPPER CORNER */ SYMB_UNICODE(0xFA,0x23A5); /* RIGHT SQUARE BRACKET EXTENSION */ SYMB_UNICODE(0xFB,0x23A6); /* RIGHT SQUARE BRACKET LOWER CORNER */ SYMB_UNICODE(0xFC,0x23AB); /* RIGHT CURLY BRACKET UPPER HOOK */ SYMB_UNICODE(0xFD,0x23AC); /* RIGHT CURLY BRACKET MIDDLE PIECE */ SYMB_UNICODE(0xFE,0x23AD); /* RIGHT CURLY BRACKET LOWER HOOK */ /* to be treated specifically : composed characters */ case 0xE2 : /* REGISTERED SIGN, alternate: sans serif */ g_unichar_to_utf8(0x00AE,iter_mod); iter_mod = g_utf8_next_char(iter_mod); g_unichar_to_utf8(0xF87F,iter_mod); break; case 0xE3 : /* COPYRIGHT SIGN, alternate: sans serif */ g_unichar_to_utf8(0x00A9,iter_mod); iter_mod = g_utf8_next_char(iter_mod); g_unichar_to_utf8(0xF87F,iter_mod); break; case 0xE4 : /* TRADE MARK SIGN, alternate: sans serif */ g_unichar_to_utf8(0x2122,iter_mod); iter_mod = g_utf8_next_char(iter_mod); g_unichar_to_utf8(0xF87F,iter_mod); break; default : g_unichar_to_utf8( g_utf8_get_char(iter), iter_mod); break; } iter = g_utf8_next_char(iter); iter_mod = g_utf8_next_char(iter_mod); } g_free(string_utf8); return output; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/wxt_gui.cpp������������������������������������������������������������0000644�0004711�0000144�00000326572�12160133407�015320� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: wxt_gui.cpp,v 1.91.2.14 2013/06/08 11:52:33 markisch Exp $ */ /* GNUPLOT - wxt_gui.cpp */ /*[ * Copyright 2005,2006 Timothee Lecomte * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file, apart from one portion * that originates from other gnuplot files and is designated as such, * may be used under the terms of the GNU General Public License * Version 2 or later (the "GPL"), in which case the provisions of GPL * are applicable instead of those above. If you wish to allow * use of your version of the appropriate portion of this file only * under the terms of the GPL and not to allow others to use your version * of this file under the above gnuplot license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ /* ----------------------------------------------------- * The following code uses the wxWidgets library, which is * distributed under its own licence (derivated from the LGPL). * * You can read it at the following address : * http://www.wxwidgets.org/licence.htm * -----------------------------------------------------*/ /* ------------------------------------------------------ * This file implements in C++ the functions which are called by wxt.trm : * * It depends on the generic cairo functions, * declared in gp_cairo.h for all the drawing work. * * Here is the interactive part : * - rescaling according to the window's size, * - mouse support (cursor position, zoom, rotation, ruler, clipboard...), * - a toolbar to give additionnal capabilities (similar to the OS/2 terminal), * - multiple plot windows. * * ------------------------------------------------------*/ /* PORTING NOTES * Since it uses wxWidgets and Cairo routines, this code is mostly cross-platform. * However some details have to be implemented or tweaked for each platform : * * 1) A generic 'image' surface is implemented as the destination surface * for cairo drawing. But for optimal results, cairo should draw to a native * surface corresponding to the graphical system. * Examples : * - a gdkpixmap when compiling for wxGTK (currently disabled because of a bug in CAIRO_OPERATOR_SATURATE), * - a HDC when compiling for wxMSW * - [insert your contribution here !] * * 2) You have to be careful with the gui main loop. * As far as I understand : * Some platforms (Windows ?) require that it is in the main thread. * When compiling for Windows (wxMSW), the text window already implements it, so we * don't have to do it, but wxWidgets still have to be initialized correctly. * When compiling for Unix (wxGTK), we don't have one, so we launch it in a separate thread. * For new platforms, it is necessary to figure out what is necessary. */ /* define DEBUG here to have debugging messages in stderr */ #include "wxt_gui.h" /* frame icon composed of three icons of different resolutions */ #include "bitmaps/xpm/icon16x16.xpm" #include "bitmaps/xpm/icon32x32.xpm" #include "bitmaps/xpm/icon64x64.xpm" /* cursors */ #include "bitmaps/xpm/cross.xpm" #include "bitmaps/xpm/right.xpm" #include "bitmaps/xpm/rotate.xpm" #include "bitmaps/xpm/size.xpm" /* Toolbar icons * Those are embedded PNG icons previously converted to an array. * See bitmaps/png/README for details */ #include "bitmaps/png/clipboard_png.h" #include "bitmaps/png/replot_png.h" #include "bitmaps/png/grid_png.h" #include "bitmaps/png/previouszoom_png.h" #include "bitmaps/png/nextzoom_png.h" #include "bitmaps/png/autoscale_png.h" #include "bitmaps/png/config_png.h" #include "bitmaps/png/help_png.h" /* Interactive toggle control variables */ static int wxt_cur_plotno = 0; static TBOOLEAN wxt_in_key_sample = FALSE; static TBOOLEAN wxt_in_plot = FALSE; static TBOOLEAN wxt_zoom_command = FALSE; #ifdef USE_MOUSE typedef struct { unsigned int left; unsigned int right; unsigned int ytop; unsigned int ybot; TBOOLEAN hidden; } wxtBoundingBox; wxtBoundingBox *wxt_key_boxes = NULL; int wxt_max_key_boxes = 0; #else #define wxt_update_key_box(x,y) #endif #ifdef __WXMAC__ #include <ApplicationServices/ApplicationServices.h> #endif /* --------------------------------------------------------------------------- * event tables and other macros for wxWidgets * --------------------------------------------------------------------------*/ /* the event tables connect the wxWidgets events with the functions (event * handlers) which process them. It can be also done at run-time, but for the * simple menu events like this the static method is much simpler. */ BEGIN_EVENT_TABLE( wxtApp, wxApp ) EVT_COMMAND( wxID_ANY, wxCreateWindowEvent, wxtApp::OnCreateWindow ) EVT_COMMAND( wxID_ANY, wxExitLoopEvent, wxtApp::OnExitLoop ) END_EVENT_TABLE() BEGIN_EVENT_TABLE( wxtFrame, wxFrame ) EVT_CLOSE( wxtFrame::OnClose ) EVT_SIZE( wxtFrame::OnSize ) EVT_TOOL( Toolbar_CopyToClipboard, wxtFrame::OnCopy ) #ifdef USE_MOUSE EVT_TOOL( Toolbar_Replot, wxtFrame::OnReplot ) EVT_TOOL( Toolbar_ToggleGrid, wxtFrame::OnToggleGrid ) EVT_TOOL( Toolbar_ZoomPrevious, wxtFrame::OnZoomPrevious ) EVT_TOOL( Toolbar_ZoomNext, wxtFrame::OnZoomNext ) EVT_TOOL( Toolbar_Autoscale, wxtFrame::OnAutoscale ) EVT_COMMAND( wxID_ANY, wxStatusTextEvent, wxtFrame::OnSetStatusText ) #endif /*USE_MOUSE*/ EVT_TOOL( Toolbar_Config, wxtFrame::OnConfig ) EVT_TOOL( Toolbar_Help, wxtFrame::OnHelp ) END_EVENT_TABLE() BEGIN_EVENT_TABLE( wxtPanel, wxPanel ) EVT_LEAVE_WINDOW( wxtPanel::OnMouseLeave ) EVT_PAINT( wxtPanel::OnPaint ) EVT_ERASE_BACKGROUND( wxtPanel::OnEraseBackground ) EVT_SIZE( wxtPanel::OnSize ) #ifdef USE_MOUSE EVT_MOTION( wxtPanel::OnMotion ) EVT_LEFT_DOWN( wxtPanel::OnLeftDown ) EVT_LEFT_UP( wxtPanel::OnLeftUp ) EVT_MIDDLE_DOWN( wxtPanel::OnMiddleDown ) EVT_MIDDLE_UP( wxtPanel::OnMiddleUp ) EVT_RIGHT_DOWN( wxtPanel::OnRightDown ) EVT_RIGHT_UP( wxtPanel::OnRightUp ) EVT_MOUSEWHEEL( wxtPanel::OnMouseWheel ) EVT_CHAR( wxtPanel::OnKeyDownChar ) #endif /*USE_MOUSE*/ END_EVENT_TABLE() BEGIN_EVENT_TABLE( wxtConfigDialog, wxDialog ) EVT_CLOSE( wxtConfigDialog::OnClose ) EVT_CHOICE( Config_Rendering, wxtConfigDialog::OnRendering ) EVT_COMMAND_RANGE( Config_OK, Config_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, wxtConfigDialog::OnButton ) END_EVENT_TABLE() #ifdef WXT_MULTITHREADED /* ---------------------------------------------------------------------------- * gui thread * ----------------------------------------------------------------------------*/ /* What really happens in the thread * Just before it returns, wxEntry will call a whole bunch of wxWidgets-cleanup functions */ void *wxtThread::Entry() { FPRINTF((stderr,"secondary thread entry\n")); /* don't answer to SIGINT in this thread - avoids LONGJMP problems */ sigset_t set; sigemptyset(&set); sigaddset(&set, SIGINT); pthread_sigmask(SIG_BLOCK, &set, NULL); /* gui loop */ wxTheApp->OnRun(); /* Workaround for a deadlock when the main thread will Wait() for this one. * This issue comes from the fact that our gui main loop is not in the * main thread as wxWidgets was written for. */ wxt_MutexGuiLeave(); FPRINTF((stderr,"secondary thread finished\n")); return NULL; } #endif /* WXT_MULTITHREADED */ /* ---------------------------------------------------------------------------- * `Main program' equivalent: the program execution "starts" here * ----------------------------------------------------------------------------*/ /* Create a new application object */ IMPLEMENT_APP_NO_MAIN(wxtApp) bool wxtApp::OnInit() { #ifdef __WXMAC__ ProcessSerialNumber PSN; GetCurrentProcess(&PSN); TransformProcessType(&PSN, kProcessTransformToForegroundApplication); #endif /* Usually wxWidgets apps create their main window here. * However, in the context of multiple plot windows, the same code is written in wxt_init(). * So, to avoid duplication of the code, we do only what is strictly necessary.*/ FPRINTF((stderr, "OnInit\n")); /* initialize frames icons */ icon.AddIcon(wxIcon(icon16x16_xpm)); icon.AddIcon(wxIcon(icon32x32_xpm)); icon.AddIcon(wxIcon(icon64x64_xpm)); /* we load the image handlers, needed to copy the plot to clipboard, and to load icons */ ::wxInitAllImageHandlers(); #ifdef __WXMSW__ /* allow the toolbar to display properly png icons with an alpha channel */ wxSystemOptions::SetOption(wxT("msw.remap"), 0); #endif /* __WXMSW__ */ /* load toolbar icons */ LoadPngIcon(clipboard_png, sizeof(clipboard_png), 0); LoadPngIcon(replot_png, sizeof(replot_png), 1); LoadPngIcon(grid_png, sizeof(grid_png), 2); LoadPngIcon(previouszoom_png, sizeof(previouszoom_png), 3); LoadPngIcon(nextzoom_png, sizeof(nextzoom_png), 4); LoadPngIcon(autoscale_png, sizeof(autoscale_png), 5); LoadPngIcon(config_png, sizeof(config_png), 6); LoadPngIcon(help_png, sizeof(help_png), 7); /* load cursors */ LoadCursor(wxt_cursor_cross, cross); LoadCursor(wxt_cursor_right, right); LoadCursor(wxt_cursor_rotate, rotate); LoadCursor(wxt_cursor_size, size); /* Initialize the config object */ /* application and vendor name are used by wxConfig to construct the name * of the config file/registry key and must be set before the first call * to Get() */ SetVendorName(wxT("gnuplot")); SetAppName(wxT("gnuplot-wxt")); wxConfigBase *pConfig = wxConfigBase::Get(); /* this will force writing back of the defaults for all values * if they're not present in the config - this can give the user an idea * of all possible settings */ pConfig->SetRecordDefaults(); FPRINTF((stderr, "OnInit finished\n")); return true; /* means that process must continue */ } /* load an icon from a PNG file embedded as a C array */ void wxtApp::LoadPngIcon(const unsigned char *embedded_png, int length, int icon_number) { wxMemoryInputStream pngstream(embedded_png, length); #ifdef __WXOSX_COCOA__ /* 16x16 bitmaps on wxCocoa cause blurry toolbar images, resize them to 24x24 */ toolBarBitmaps[icon_number] = new wxBitmap(wxImage(pngstream, wxBITMAP_TYPE_PNG).Resize(wxSize(24, 24), wxPoint(4, 4))); #else toolBarBitmaps[icon_number] = new wxBitmap(wxImage(pngstream, wxBITMAP_TYPE_PNG)); #endif } /* load a cursor */ void wxtApp::LoadCursor(wxCursor &cursor, const char* xpm_bits[]) { int hotspot_x, hotspot_y; wxBitmap cursor_bitmap = wxBitmap(xpm_bits); wxImage cursor_image = cursor_bitmap.ConvertToImage(); /* XPM spec : first string is : * width height ncolors charperpixel hotspotx hotspoty */ sscanf(xpm_bits[0], "%*d %*d %*d %*d %d %d", &hotspot_x, &hotspot_y); cursor_image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, hotspot_x); cursor_image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, hotspot_y); cursor = wxCursor(cursor_image); } /* cleanup on exit * In a pure wxWidgets app, the returned int is the exit status of the app. * Here it is not used. */ int wxtApp::OnExit() { FPRINTF((stderr,"wxtApp::OnExit\n")); /* clean up: Set() returns the active config object as Get() does, but unlike * Get() it doesn't try to create one if there is none (definitely not what * we want here!) */ delete wxConfigBase::Set((wxConfigBase *) NULL); return 0; } /* will gently terminate the gui thread */ void wxtApp::OnExitLoop( wxCommandEvent& WXUNUSED(event) ) { FPRINTF((stderr,"wxtApp::OnExitLoop\n")); wxTheApp->ExitMainLoop(); } void wxtApp::OnCreateWindow( wxCommandEvent& event ) { /* retrieve the pointer to wxt_window_t */ wxt_window_t *window = (wxt_window_t*) event.GetClientData(); FPRINTF((stderr,"wxtApp::OnCreateWindow\n")); window->frame = new wxtFrame( window->title, window->id ); window->frame->Show(true); FPRINTF((stderr,"new plot window opened\n")); /* make the panel able to receive keyboard input */ window->frame->panel->SetFocus(); /* set the default crosshair cursor */ window->frame->panel->SetCursor(wxt_cursor_cross); /* creating the true context (at initialization, it may be a fake one). * Note : the frame must be shown for this to succeed */ if (!window->frame->panel->plot.success) window->frame->panel->wxt_cairo_create_context(); /* tell the other thread we have finished */ wxMutexLocker lock(*(window->mutex)); window->condition->Broadcast(); } /* wrapper for AddPendingEvent or ProcessEvent */ void wxtApp::SendEvent( wxEvent &event) { #ifdef WXT_MULTITHREADED AddPendingEvent(event); #else /* !WXT_MULTITHREADED */ ProcessEvent(event); #endif /* !WXT_MULTITHREADED */ } /* --------------------------------------------------------------------------- * Frame : the main windows (one for each plot) * ----------------------------------------------------------------------------*/ /* frame constructor*/ wxtFrame::wxtFrame( const wxString& title, wxWindowID id ) : wxFrame((wxFrame *)NULL, id, title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE|wxWANTS_CHARS) { FPRINTF((stderr,"wxtFrame constructor\n")); /* used to check for panel initialization */ panel = NULL; /* initialize the state of the configuration dialog */ config_displayed = false; /* set up the window icon, in several resolutions */ SetIcons(icon); /* set up the status bar, and fill it with an empty * string. It will be immediately overriden by gnuplot. */ CreateStatusBar(); SetStatusText( wxT("") ); /* set up the toolbar */ wxToolBar * toolbar = CreateToolBar(); /* With wxMSW, default toolbar size is only 16x15. */ // toolbar->SetToolBitmapSize(wxSize(16,16)); toolbar->AddTool(Toolbar_CopyToClipboard, wxT("Copy"), *(toolBarBitmaps[0]), wxT("Copy the plot to clipboard")); #ifdef USE_MOUSE #ifdef __WXOSX_COCOA__ /* wx 2.9 Cocoa bug & crash workaround for Lion, which does not have toolbar separators anymore */ toolbar->AddStretchableSpace(); #else toolbar->AddSeparator(); #endif toolbar->AddTool(Toolbar_Replot, wxT("Replot"), *(toolBarBitmaps[1]), wxT("Replot")); toolbar->AddTool(Toolbar_ToggleGrid, wxT("Toggle grid"), *(toolBarBitmaps[2]),wxNullBitmap,wxITEM_NORMAL, wxT("Toggle grid")); toolbar->AddTool(Toolbar_ZoomPrevious, wxT("Previous zoom"), *(toolBarBitmaps[3]), wxT("Apply the previous zoom settings")); toolbar->AddTool(Toolbar_ZoomNext, wxT("Next zoom"), *(toolBarBitmaps[4]), wxT("Apply the next zoom settings")); toolbar->AddTool(Toolbar_Autoscale, wxT("Autoscale"), *(toolBarBitmaps[5]), wxT("Apply autoscale")); #endif /*USE_MOUSE*/ #ifdef __WXOSX_COCOA__ /* wx 2.9 Cocoa bug & crash workaround for Lion, which does not have toolbar separators anymore */ toolbar->AddStretchableSpace(); #else toolbar->AddSeparator(); #endif toolbar->AddTool(Toolbar_Config, wxT("Terminal configuration"), *(toolBarBitmaps[6]), wxT("Open configuration dialog")); toolbar->AddTool(Toolbar_Help, wxT("Help"), *(toolBarBitmaps[7]), wxT("Open help dialog")); toolbar->Realize(); FPRINTF((stderr,"wxtFrame constructor 2\n")); SetClientSize( wxSize(wxt_width, wxt_height) ); /* build the panel, which will contain the visible device context */ panel = new wxtPanel( this, this->GetId(), this->GetClientSize() ); /* setting minimum height and width for the window */ SetSizeHints(100, 100); FPRINTF((stderr,"wxtFrame constructor 3\n")); } /* toolbar event : Copy to clipboard * We will copy the panel to a bitmap, using platform-independant wxWidgets functions */ void wxtFrame::OnCopy( wxCommandEvent& WXUNUSED( event ) ) { FPRINTF((stderr,"Copy to clipboard\n")); int width = panel->plot.device_xmax, height = panel->plot.device_ymax; wxBitmap cp_bitmap(width,height); wxMemoryDC cp_dc; wxClientDC dc(panel); cp_dc.SelectObject(cp_bitmap); cp_dc.Blit(0,0,width,height,&dc,0,0); cp_dc.SelectObject(wxNullBitmap); wxTheClipboard->UsePrimarySelection(false); /* SetData clears the clipboard */ if ( wxTheClipboard->Open() ) { wxTheClipboard->SetData(new wxBitmapDataObject(cp_bitmap)); wxTheClipboard->Close(); } wxTheClipboard->Flush(); } #ifdef USE_MOUSE /* toolbar event : Replot */ void wxtFrame::OnReplot( wxCommandEvent& WXUNUSED( event ) ) { wxt_exec_event(GE_keypress, 0, 0, 'e' , 0, this->GetId()); } /* toolbar event : Toggle Grid */ void wxtFrame::OnToggleGrid( wxCommandEvent& WXUNUSED( event ) ) { wxt_exec_event(GE_keypress, 0, 0, 'g', 0, this->GetId()); } /* toolbar event : Previous Zoom in history */ void wxtFrame::OnZoomPrevious( wxCommandEvent& WXUNUSED( event ) ) { wxt_exec_event(GE_keypress, 0, 0, 'p', 0, this->GetId()); } /* toolbar event : Next Zoom in history */ void wxtFrame::OnZoomNext( wxCommandEvent& WXUNUSED( event ) ) { wxt_exec_event(GE_keypress, 0, 0, 'n', 0, this->GetId()); } /* toolbar event : Autoscale */ void wxtFrame::OnAutoscale( wxCommandEvent& WXUNUSED( event ) ) { wxt_exec_event(GE_keypress, 0, 0, 'a', 0, this->GetId()); } /* set the status text from the event data */ void wxtFrame::OnSetStatusText( wxCommandEvent& event ) { SetStatusText(event.GetString()); } #endif /*USE_MOUSE*/ /* toolbar event : Config */ void wxtFrame::OnConfig( wxCommandEvent& WXUNUSED( event ) ) { /* if we have already opened a dialog, just raise it */ if (config_displayed) { config_dialog->Raise(); return; } /* otherwise, open a dialog */ config_displayed = true; config_dialog = new wxtConfigDialog(this); config_dialog->Show(true); } /* toolbar event : Help */ void wxtFrame::OnHelp( wxCommandEvent& WXUNUSED( event ) ) { wxMessageBox( wxString(wxT("You are using an interactive terminal ") wxT("based on wxWidgets for the interface, Cairo ") wxT("for the drawing facilities, and Pango for the text layouts.\n") wxT("Please note that toolbar icons in the terminal ") wxT("don't reflect the whole range of mousing ") wxT("possibilities in the terminal.\n") wxT("Hit 'h' in the plot window ") wxT("and a help message for mouse commands ") wxT("will appear in the gnuplot console.\n") wxT("See also 'help mouse'.\n")), wxT("wxWidgets terminal help"), wxOK | wxICON_INFORMATION, this ); } /* called on Close() (menu or window manager) */ void wxtFrame::OnClose( wxCloseEvent& event ) { FPRINTF((stderr,"OnClose\n")); if ( event.CanVeto() && !wxt_handling_persist) { /* Default behaviour when Quit is clicked, or the window cross X */ event.Veto(); this->Hide(); #ifdef USE_MOUSE /* Pass it through mouse handling to check for "bind Close" */ wxt_exec_event(GE_reset, 0, 0, 0, 0, this->GetId()); #endif /* USE_MOUSE */ } else /* in "persist" mode */ { /* declare the iterator */ std::vector<wxt_window_t>::iterator wxt_iter; for(wxt_iter = wxt_window_list.begin(); wxt_iter != wxt_window_list.end(); wxt_iter++) { if (this == wxt_iter->frame) { wxt_window_list.erase(wxt_iter); break; } } this->Destroy(); } #if defined(_Windows) && !defined(WGP_CONSOLE) /* Close text window if this was the last plot window. */ WinPersistTextClose(); #endif } /* when the window is resized, * resize the panel to fit in the frame. * Note : can't simply use "replot", as it doesn't work with multiplot mode */ void wxtFrame::OnSize( wxSizeEvent& event ) { FPRINTF((stderr,"frame OnSize\n")); /* Under Windows the frame receives an OnSize event before being completely initialized. * So we must check for the panel to be properly initialized before.*/ if (panel) panel->SetSize( this->GetClientSize() ); #ifdef __WXOSX_COCOA__ /* wx 2.9 Cocoa bug workaround, that does not adjust layout for status bar on resize */ PositionStatusBar(); #endif } /* wrapper for AddPendingEvent or ProcessEvent */ void wxtFrame::SendEvent( wxEvent &event) { #ifdef WXT_MULTITHREADED AddPendingEvent(event); #else /* !WXT_MULTITHREADED */ ProcessEvent(event); #endif /* !WXT_MULTITHREADED */ } /* --------------------------------------------------------------------------- * Panel : the space used for the plot, between the toolbar and the statusbar * ----------------------------------------------------------------------------*/ /* panel constructor * Note : under Windows, wxDefaultPosition makes the panel hide the toolbar */ wxtPanel::wxtPanel( wxWindow *parent, wxWindowID id, const wxSize& size ) : wxPanel( parent, id, wxPoint(0,0) /*wxDefaultPosition*/, size, wxWANTS_CHARS ) { FPRINTF((stderr,"panel constructor\n")); /* initialisations */ gp_cairo_initialize_plot(&plot); GetSize(&(plot.device_xmax),&(plot.device_ymax)); plot.polygons_saturate = TRUE; settings_queued = false; #ifdef USE_MOUSE mouse_x = 0; mouse_y = 0; wxt_zoombox = false; zoom_x1 = 0; zoom_y1 = 0; zoom_string1 = wxT(""); zoom_string2 = wxT(""); wxt_ruler = false; wxt_ruler_x = 0; wxt_ruler_y = 0; modifier_mask = 0; #endif /*USE_MOUSE*/ #if defined(GTK_SURFACE) gdkpixmap = NULL; #elif defined(__WXMSW__) hdc = NULL; hbm = NULL; #else /* IMAGE_SURFACE */ cairo_bitmap = NULL; data32 = NULL; #endif /* SURFACE */ FPRINTF((stderr,"panel constructor4\n")); /* create the device context to be drawn */ wxt_cairo_create_context(); FPRINTF((stderr,"panel constructor5\n")); #ifdef IMAGE_SURFACE wxt_cairo_create_bitmap(); #endif FPRINTF((stderr,"panel constructor6\n")); } /* destructor */ wxtPanel::~wxtPanel() { FPRINTF((stderr,"panel destructor\n")); wxt_cairo_free_context(); /* clear the command list, free the allocated memory */ ClearCommandlist(); } /* temporary store new settings values to be applied for the next plot */ void wxtPanel::wxt_settings_queue(TBOOLEAN antialiasing, TBOOLEAN oversampling, int hinting_setting) { mutex_queued.Lock(); settings_queued = true; antialiasing_queued = antialiasing; oversampling_queued = oversampling; hinting_queued = hinting_setting; mutex_queued.Unlock(); } /* apply queued settings */ void wxtPanel::wxt_settings_apply() { mutex_queued.Lock(); if (settings_queued) { plot.antialiasing = antialiasing_queued; plot.oversampling = oversampling_queued; plot.hinting = hinting_queued; settings_queued = false; } mutex_queued.Unlock(); } /* clear the command list, free the allocated memory */ void wxtPanel::ClearCommandlist() { command_list_mutex.Lock(); command_list_t::iterator iter; /*declare the iterator*/ /* run through the list, and free allocated memory */ for(iter = command_list.begin(); iter != command_list.end(); ++iter) { if (iter->command == command_enhanced_put_text || iter->command == command_put_text || iter->command == command_set_font) delete[] iter->string; if (iter->command == command_filled_polygon) delete[] iter->corners; if (iter->command == command_image) free(iter->image); } command_list.clear(); command_list_mutex.Unlock(); } /* method called when the panel has to be painted * -> Refresh(), window dragged, dialogs over the window, etc. */ void wxtPanel::OnPaint( wxPaintEvent &WXUNUSED(event) ) { /* Constructor of the device context */ wxPaintDC dc(this); DrawToDC(dc, GetUpdateRegion()); } /* same as OnPaint, but can be directly called by a user function */ void wxtPanel::Draw() { wxClientDC dc(this); wxBufferedDC buffered_dc(&dc, wxSize(plot.device_xmax, plot.device_ymax)); wxRegion region(0, 0, plot.device_xmax, plot.device_ymax); DrawToDC(buffered_dc, region); } /* copy the plot to the panel, draw zoombow and ruler needed */ void wxtPanel::DrawToDC(wxDC &dc, wxRegion ®ion) { wxPen tmp_pen; /* TODO extend the region mechanism to surfaces other than GTK_SURFACE */ #ifdef GTK_SURFACE wxRegionIterator upd(region); int vX,vY,vW,vH; /* Dimensions of client area in pixels */ while (upd) { vX = upd.GetX(); vY = upd.GetY(); vW = upd.GetW(); vH = upd.GetH(); FPRINTF((stderr,"OnPaint %d,%d,%d,%d\n",vX,vY,vW,vH)); /* Repaint this rectangle */ if (gdkpixmap) gdk_draw_drawable(dc.GetWindow(), dc.m_penGC, gdkpixmap, vX,vY, vX,vY, vW,vH); ++upd; } #elif defined(__WXMSW__) BitBlt((HDC) dc.GetHDC(), 0, 0, plot.device_xmax, plot.device_ymax, hdc, 0, 0, SRCCOPY); #else dc.DrawBitmap(*cairo_bitmap, 0, 0, false); #endif /* fill in gray when the aspect ratio conservation has let empty space in the panel */ if (plot.device_xmax*plot.ymax > plot.device_ymax*plot.xmax) { dc.SetPen( *wxTRANSPARENT_PEN ); dc.SetBrush( wxBrush( wxT("LIGHT GREY"), wxSOLID ) ); dc.DrawRectangle((int) (plot.xmax/plot.oversampling_scale*plot.xscale), 0, plot.device_xmax - (int) (plot.xmax/plot.oversampling_scale*plot.xscale), plot.device_ymax); } else if (plot.device_xmax*plot.ymax < plot.device_ymax*plot.xmax) { dc.SetPen( *wxTRANSPARENT_PEN ); dc.SetBrush( wxBrush( wxT("LIGHT GREY"), wxSOLID ) ); dc.DrawRectangle(0, (int) (plot.ymax/plot.oversampling_scale*plot.yscale), plot.device_xmax, (int) (plot.device_ymax - plot.ymax/plot.oversampling_scale*plot.yscale)); } #ifdef USE_MOUSE if (wxt_zoombox) { tmp_pen = wxPen(wxT("black"), 1, wxSOLID); tmp_pen.SetCap( wxCAP_ROUND ); dc.SetPen( tmp_pen ); #ifndef __WXOSX_COCOA__ /* wx 2.9 Cocoa bug workaround, which has no logical functions support */ dc.SetLogicalFunction( wxINVERT ); #endif dc.DrawLine( zoom_x1, zoom_y1, mouse_x, zoom_y1 ); dc.DrawLine( mouse_x, zoom_y1, mouse_x, mouse_y ); dc.DrawLine( mouse_x, mouse_y, zoom_x1, mouse_y ); dc.DrawLine( zoom_x1, mouse_y, zoom_x1, zoom_y1 ); dc.SetPen( *wxTRANSPARENT_PEN ); dc.SetBrush( wxBrush( wxT("LIGHT BLUE"), wxSOLID ) ); dc.SetLogicalFunction( wxAND ); dc.DrawRectangle( zoom_x1, zoom_y1, mouse_x -zoom_x1, mouse_y -zoom_y1); dc.SetLogicalFunction( wxCOPY ); dc.SetFont( wxFont( (int) plot.fontsize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxString(plot.fontname, wxConvLocal) ) ); dc.DrawText( zoom_string1.BeforeFirst(wxT('\r')), zoom_x1, zoom_y1 - term->v_char/plot.oversampling_scale); dc.DrawText( zoom_string1.AfterFirst(wxT('\r')), zoom_x1, zoom_y1); dc.DrawText( zoom_string2.BeforeFirst(wxT('\r')), mouse_x, mouse_y - term->v_char/plot.oversampling_scale); dc.DrawText( zoom_string2.AfterFirst(wxT('\r')), mouse_x, mouse_y); /* if we have to redraw the zoombox, it is with another size, * so it will be issued later and we can disable it now */ wxt_zoombox = false; } if (wxt_ruler) { tmp_pen = wxPen(wxT("black"), 1, wxSOLID); tmp_pen.SetCap(wxCAP_BUTT); dc.SetPen( tmp_pen ); #ifndef __WXOSX_COCOA__ /* wx 2.9 Cocoa bug workaround, which has no logical functions support */ dc.SetLogicalFunction( wxINVERT ); #endif dc.CrossHair( (int)wxt_ruler_x, (int)wxt_ruler_y ); dc.SetLogicalFunction( wxCOPY ); } if (wxt_ruler && wxt_ruler_lineto) { tmp_pen = wxPen(wxT("black"), 1, wxSOLID); tmp_pen.SetCap(wxCAP_BUTT); dc.SetPen( tmp_pen ); #ifndef __WXOSX_COCOA__ /* wx 2.9 Cocoa bug workaround, which has no logical functions support */ dc.SetLogicalFunction( wxINVERT ); #endif dc.DrawLine((int)wxt_ruler_x, (int)wxt_ruler_y, mouse_x, mouse_y); dc.SetLogicalFunction( wxCOPY ); } #endif /*USE_MOUSE*/ } /* avoid flickering under win32 */ void wxtPanel::OnEraseBackground( wxEraseEvent &WXUNUSED(event) ) { } /* avoid leaving cross cursor when leaving window on Mac */ void wxtPanel::OnMouseLeave( wxMouseEvent &WXUNUSED(event) ) { #ifdef __WXMAC__ ::wxSetCursor(wxNullCursor); #endif } /* when the window is resized */ void wxtPanel::OnSize( wxSizeEvent& event ) { /* don't do anything if term variables are not initialized */ if (plot.xmax == 0 || plot.ymax == 0) return; /* update window size, and scaling variables */ GetSize(&(plot.device_xmax),&(plot.device_ymax)); double new_xscale, new_yscale; new_xscale = ((double) plot.device_xmax)*plot.oversampling_scale/((double) plot.xmax); new_yscale = ((double) plot.device_ymax)*plot.oversampling_scale/((double) plot.ymax); /* We will keep the aspect ratio constant */ if (new_yscale < new_xscale) { plot.xscale = new_yscale; plot.yscale = new_yscale; } else { plot.xscale = new_xscale; plot.yscale = new_xscale; } FPRINTF((stderr,"panel OnSize %d %d %lf %lf\n", plot.device_xmax, plot.device_ymax, plot.xscale,plot.yscale)); /* create a new cairo context of the good size */ wxt_cairo_create_context(); /* redraw the plot with the new scaling */ wxt_cairo_refresh(); } #ifdef USE_MOUSE /* when the mouse is moved over the panel */ void wxtPanel::OnMotion( wxMouseEvent& event ) { /* Get and store mouse position for _put_tmp_text() and key events (ruler) */ mouse_x = event.GetX(); mouse_y = event.GetY(); UpdateModifiers(event); /* update the ruler_lineto thing */ if (wxt_ruler && wxt_ruler_lineto) Draw(); /* informs gnuplot */ wxt_exec_event(GE_motion, (int)gnuplot_x( &plot, mouse_x ), (int)gnuplot_y( &plot, mouse_y ), 0, 0, this->GetId()); } /* mouse "click" event */ void wxtPanel::OnLeftDown( wxMouseEvent& event ) { int x,y; x = (int) gnuplot_x( &plot, event.GetX() ); y = (int) gnuplot_y( &plot, event.GetY() ); UpdateModifiers(event); if (wxt_toggle) wxt_check_for_toggle(x, y); wxt_exec_event(GE_buttonpress, x, y, 1, 0, this->GetId()); } /* mouse "click" event */ void wxtPanel::OnLeftUp( wxMouseEvent& event ) { int x,y; x = (int) gnuplot_x( &plot, event.GetX() ); y = (int) gnuplot_y( &plot, event.GetY() ); UpdateModifiers(event); if ( wxt_exec_event(GE_buttonrelease, x, y, 1, (int) left_button_sw.Time(), this->GetId()) ) { /* start a watch to send the time elapsed between up and down */ left_button_sw.Start(); } } /* mouse "click" event */ void wxtPanel::OnMiddleDown( wxMouseEvent& event ) { int x,y; x = (int) gnuplot_x( &plot, event.GetX() ); y = (int) gnuplot_y( &plot, event.GetY() ); UpdateModifiers(event); wxt_exec_event(GE_buttonpress, x, y, 2, 0, this->GetId()); } /* mouse "click" event */ void wxtPanel::OnMiddleUp( wxMouseEvent& event ) { int x,y; x = (int) gnuplot_x( &plot, event.GetX() ); y = (int) gnuplot_y( &plot, event.GetY() ); UpdateModifiers(event); if ( wxt_exec_event(GE_buttonrelease, x, y, 2, (int) middle_button_sw.Time(), this->GetId()) ) { /* start a watch to send the time elapsed between up and down */ middle_button_sw.Start(); } } /* mouse "click" event */ void wxtPanel::OnRightDown( wxMouseEvent& event ) { int x,y; x = (int) gnuplot_x( &plot, event.GetX() ); y = (int) gnuplot_y( &plot, event.GetY() ); UpdateModifiers(event); wxt_exec_event(GE_buttonpress, x, y, 3, 0, this->GetId()); } /* mouse "click" event */ void wxtPanel::OnRightUp( wxMouseEvent& event ) { int x,y; x = (int) gnuplot_x( &plot, event.GetX() ); y = (int) gnuplot_y( &plot, event.GetY() ); UpdateModifiers(event); if ( wxt_exec_event(GE_buttonrelease, x, y, 3, (int) right_button_sw.Time(), this->GetId()) ) { /* start a watch to send the time elapsed between up and down */ right_button_sw.Start(); } } /* mouse wheel event */ void wxtPanel::OnMouseWheel( wxMouseEvent& event ) { int mouse_button; int x,y; x = (int) gnuplot_x( &plot, event.GetX() ); y = (int) gnuplot_y( &plot, event.GetY() ); UpdateModifiers(event); mouse_button = (event.GetWheelRotation() > 0 ? 4 : 5); #if wxCHECK_VERSION(2, 9, 0) /* GetWheelAxis: 0 is the Y axis, 1 is the X axis. */ if (event.GetWheelAxis() > 0) mouse_button += 2; #endif wxt_exec_event(GE_buttonpress, x, y, mouse_button, 0, this->GetId()); } /* the state of the modifiers is checked each time a key is pressed instead of * tracking the press and release events of the modifiers keys, because the * window manager catches some combinations, like ctrl+F1, and thus we do not * receive a release event in this case */ void wxtPanel::UpdateModifiers( wxMouseEvent& event ) { int current_modifier_mask = 0; /* retrieve current modifier mask from the wxEvent */ current_modifier_mask |= (event.AltDown() ? (1<<2) : 0); current_modifier_mask |= (event.ControlDown() ? (1<<1) : 0); current_modifier_mask |= (event.ShiftDown() ? (1) : 0); /* update if changed */ if (modifier_mask != current_modifier_mask) { modifier_mask = current_modifier_mask; wxt_exec_event(GE_modifier, 0, 0, modifier_mask, 0, this->GetId()); } } /* a key has been pressed, modifiers have already been handled. * We receive keycodes here, and we send corresponding events to gnuplot main thread */ void wxtPanel::OnKeyDownChar( wxKeyEvent &event ) { int keycode = event.GetKeyCode(); int gp_keycode; /* this is the same code as in UpdateModifiers(), but the latter method cannot be * used here because wxKeyEvent and wxMouseEvent are different classes, both of them * derive from wxEvent, but wxEvent does not have the necessary AltDown() and friends */ int current_modifier_mask = 0; /* retrieve current modifier mask from the wxEvent */ current_modifier_mask |= (event.AltDown() ? (1<<2) : 0); current_modifier_mask |= (event.ControlDown() ? (1<<1) : 0); current_modifier_mask |= (event.ShiftDown() ? (1) : 0); /* update if changed */ if (modifier_mask != current_modifier_mask) { modifier_mask = current_modifier_mask; wxt_exec_event(GE_modifier, 0, 0, modifier_mask, 0, this->GetId()); } #define WXK_GPKEYCODE(wxkey,kcode) case wxkey : gp_keycode=kcode; break; if (keycode<256) { switch (keycode) { #ifndef DISABLE_SPACE_RAISES_CONSOLE case WXK_SPACE : if ((wxt_ctrl==yes && event.ControlDown()) || wxt_ctrl!=yes) { RaiseConsoleWindow(); return; } else { gp_keycode = ' '; break; } #endif /* DISABLE_SPACE_RAISES_CONSOLE */ case 'q' : /* ctrl+q does not send 113 but 17 */ /* WARNING : may be the same for other combinations */ case 17 : if ((wxt_ctrl==yes && event.ControlDown()) || wxt_ctrl!=yes) { /* closes terminal window */ this->GetParent()->Close(false); return; } else { gp_keycode = 'q'; break; } WXK_GPKEYCODE(WXK_BACK,GP_BackSpace); WXK_GPKEYCODE(WXK_TAB,GP_Tab); WXK_GPKEYCODE(WXK_RETURN,GP_Return); WXK_GPKEYCODE(WXK_ESCAPE,GP_Escape); WXK_GPKEYCODE(WXK_DELETE,GP_Delete); default : gp_keycode = keycode; break; /* exact solution */ } } else { switch( keycode ) { WXK_GPKEYCODE(WXK_PAUSE,GP_Pause); WXK_GPKEYCODE(WXK_SCROLL,GP_Scroll_Lock); WXK_GPKEYCODE(WXK_INSERT,GP_Insert); WXK_GPKEYCODE(WXK_HOME,GP_Home); WXK_GPKEYCODE(WXK_LEFT,GP_Left); WXK_GPKEYCODE(WXK_UP,GP_Up); WXK_GPKEYCODE(WXK_RIGHT,GP_Right); WXK_GPKEYCODE(WXK_DOWN,GP_Down); WXK_GPKEYCODE(WXK_PAGEUP,GP_PageUp); WXK_GPKEYCODE(WXK_PAGEDOWN,GP_PageDown); WXK_GPKEYCODE(WXK_END,GP_End); WXK_GPKEYCODE(WXK_NUMPAD_SPACE,GP_KP_Space); WXK_GPKEYCODE(WXK_NUMPAD_TAB,GP_KP_Tab); WXK_GPKEYCODE(WXK_NUMPAD_ENTER,GP_KP_Enter); WXK_GPKEYCODE(WXK_NUMPAD_F1,GP_KP_F1); WXK_GPKEYCODE(WXK_NUMPAD_F2,GP_KP_F2); WXK_GPKEYCODE(WXK_NUMPAD_F3,GP_KP_F3); WXK_GPKEYCODE(WXK_NUMPAD_F4,GP_KP_F4); WXK_GPKEYCODE(WXK_NUMPAD_INSERT,GP_KP_Insert); WXK_GPKEYCODE(WXK_NUMPAD_END,GP_KP_End); WXK_GPKEYCODE(WXK_NUMPAD_DOWN,GP_KP_Down); WXK_GPKEYCODE(WXK_NUMPAD_PAGEDOWN,GP_KP_Page_Down); WXK_GPKEYCODE(WXK_NUMPAD_LEFT,GP_KP_Left); WXK_GPKEYCODE(WXK_NUMPAD_BEGIN,GP_KP_Begin); WXK_GPKEYCODE(WXK_NUMPAD_RIGHT,GP_KP_Right); WXK_GPKEYCODE(WXK_NUMPAD_HOME,GP_KP_Home); WXK_GPKEYCODE(WXK_NUMPAD_UP,GP_KP_Up); WXK_GPKEYCODE(WXK_NUMPAD_PAGEUP,GP_KP_Page_Up); WXK_GPKEYCODE(WXK_NUMPAD_DELETE,GP_KP_Delete); WXK_GPKEYCODE(WXK_NUMPAD_EQUAL,GP_KP_Equal); WXK_GPKEYCODE(WXK_NUMPAD_MULTIPLY,GP_KP_Multiply); WXK_GPKEYCODE(WXK_NUMPAD_ADD,GP_KP_Add); WXK_GPKEYCODE(WXK_NUMPAD_SEPARATOR,GP_KP_Separator); WXK_GPKEYCODE(WXK_NUMPAD_SUBTRACT,GP_KP_Subtract); WXK_GPKEYCODE(WXK_NUMPAD_DECIMAL,GP_KP_Decimal); WXK_GPKEYCODE(WXK_NUMPAD_DIVIDE,GP_KP_Divide); WXK_GPKEYCODE(WXK_NUMPAD0,GP_KP_0); WXK_GPKEYCODE(WXK_NUMPAD1,GP_KP_1); WXK_GPKEYCODE(WXK_NUMPAD2,GP_KP_2); WXK_GPKEYCODE(WXK_NUMPAD3,GP_KP_3); WXK_GPKEYCODE(WXK_NUMPAD4,GP_KP_4); WXK_GPKEYCODE(WXK_NUMPAD5,GP_KP_5); WXK_GPKEYCODE(WXK_NUMPAD6,GP_KP_6); WXK_GPKEYCODE(WXK_NUMPAD7,GP_KP_7); WXK_GPKEYCODE(WXK_NUMPAD8,GP_KP_8); WXK_GPKEYCODE(WXK_NUMPAD9,GP_KP_9); WXK_GPKEYCODE(WXK_F1,GP_F1); WXK_GPKEYCODE(WXK_F2,GP_F2); WXK_GPKEYCODE(WXK_F3,GP_F3); WXK_GPKEYCODE(WXK_F4,GP_F4); WXK_GPKEYCODE(WXK_F5,GP_F5); WXK_GPKEYCODE(WXK_F6,GP_F6); WXK_GPKEYCODE(WXK_F7,GP_F7); WXK_GPKEYCODE(WXK_F8,GP_F8); WXK_GPKEYCODE(WXK_F9,GP_F9); WXK_GPKEYCODE(WXK_F10,GP_F10); WXK_GPKEYCODE(WXK_F11,GP_F11); WXK_GPKEYCODE(WXK_F12,GP_F12); default : return; /* probably not ideal */ } } /* only send char events to gnuplot if we are the active window */ if ( wxt_exec_event(GE_keypress, (int) gnuplot_x( &plot, mouse_x ), (int) gnuplot_y( &plot, mouse_y ), gp_keycode, 0, this->GetId()) ) { FPRINTF((stderr,"sending char event\n")); } /* The following wxWidgets keycodes are not mapped : * WXK_ALT, WXK_CONTROL, WXK_SHIFT, * WXK_LBUTTON, WXK_RBUTTON, WXK_CANCEL, WXK_MBUTTON, * WXK_CLEAR, WXK_MENU, * WXK_NUMPAD_PRIOR, WXK_NUMPAD_NEXT, * WXK_CAPITAL, WXK_PRIOR, WXK_NEXT, WXK_SELECT, * WXK_PRINT, WXK_EXECUTE, WXK_SNAPSHOT, WXK_HELP, * WXK_MULTIPLY, WXK_ADD, WXK_SEPARATOR, WXK_SUBTRACT, * WXK_DECIMAL, WXK_DIVIDE, WXK_NUMLOCK, WXK_WINDOWS_LEFT, * WXK_WINDOWS_RIGHT, WXK_WINDOWS_MENU, WXK_COMMAND * The following gnuplot keycodes are not mapped : * GP_Linefeed, GP_Clear, GP_Sys_Req, GP_Begin */ } /* -------------------------------------------------------- * Bookkeeping for clickable hot spots * --------------------------------------------------------*/ /* Initialize boxes starting from i */ static void wxt_initialize_key_boxes(int i) { for (; i<wxt_max_key_boxes; i++) { wxt_key_boxes[i].left = wxt_key_boxes[i].ybot = INT_MAX; wxt_key_boxes[i].right = wxt_key_boxes[i].ytop = 0; } } static void wxt_initialize_hidden(int i) { for (; i<wxt_max_key_boxes; i++) wxt_key_boxes[i].hidden = FALSE; } /* Update the box enclosing the key sample for the current plot * so that later we can detect mouse clicks in that area */ static void wxt_update_key_box( unsigned int x, unsigned int y ) { if (wxt_max_key_boxes <= wxt_cur_plotno) { wxt_max_key_boxes = wxt_cur_plotno + 10; wxt_key_boxes = (wxtBoundingBox *)realloc(wxt_key_boxes, wxt_max_key_boxes * sizeof(wxtBoundingBox)); wxt_initialize_key_boxes(wxt_cur_plotno); wxt_initialize_hidden(wxt_cur_plotno); } wxtBoundingBox *bb = &(wxt_key_boxes[wxt_cur_plotno]); y = term->ymax - y; if (x < bb->left) bb->left = x; if (x > bb->right) bb->right = x; if (y < bb->ybot) bb->ybot = y; if (y > bb->ytop) bb->ytop = y; } /* Called from wxtPanel::OnLeftDown * If the mouse click was on top of a key sample then toggle the * corresponding plot on/off */ static void wxt_check_for_toggle(unsigned int x, unsigned int y) { int i; for (i=1; i<=wxt_cur_plotno && i<wxt_max_key_boxes; i++) { if (wxt_key_boxes[i].left == INT_MAX) continue; if (x < wxt_key_boxes[i].left) continue; if (x > wxt_key_boxes[i].right) continue; if (y < wxt_key_boxes[i].ybot) continue; if (y > wxt_key_boxes[i].ytop) continue; wxt_key_boxes[i].hidden = !wxt_key_boxes[i].hidden; wxt_current_panel->wxt_cairo_refresh(); } } #endif /*USE_MOUSE*/ #ifndef DISABLE_SPACE_RAISES_CONSOLE /* ====license information==== * The following code originates from other gnuplot files, * and is not subject to the alternative license statement. */ /* FIXME : this code should be deleted, and the feature removed or handled differently, * because it is highly platform-dependant, is not reliable because * of a lot of factors (WINDOWID not set, multiple tabs in gnome-terminal, mechanisms * to prevent focus stealing) and is inconsistent with global bindings mechanism ) */ void wxtPanel::RaiseConsoleWindow() { #ifdef USE_GTK char *window_env; unsigned long windowid = 0; /* retrieve XID of gnuplot window */ window_env = getenv("WINDOWID"); if (window_env) sscanf(window_env, "%lu", &windowid); /* NOTE: This code uses DCOP, a KDE3 mechanism that no longer exists in KDE4 */ char *ptr = getenv("KONSOLE_DCOP_SESSION"); /* Try KDE's Konsole first. */ if (ptr) { /* We are in KDE's Konsole, or in a terminal window detached from a Konsole. * In order to active a tab: * 1. get environmental variable KONSOLE_DCOP_SESSION: it includes konsole id and session name * 2. if * $WINDOWID is defined and it equals * `dcop konsole-3152 konsole-mainwindow#1 getWinID` * (KDE 3.2) or when $WINDOWID is undefined (KDE 3.1), then run commands * dcop konsole-3152 konsole activateSession session-2; \ * dcop konsole-3152 konsole-mainwindow#1 raise * Note: by $WINDOWID we mean gnuplot's text console WINDOWID. * Missing: focus is not transferred unless $WINDOWID is defined (should be fixed in KDE 3.2). * * Implementation and tests on KDE 3.1.4: Petr Mikulik. */ char *konsole_name = NULL; char *cmd = NULL; /* use 'while' to easily break out (aka catch exception) */ while (1) { char *konsole_tab; unsigned long w; FILE *p; ptr = strchr(ptr, '('); /* the string for tab nb 4 looks like 'DCOPRef(konsole-2866, session-4)' */ if (!ptr) break; konsole_name = strdup(ptr+1); konsole_tab = strchr(konsole_name, ','); if (!konsole_tab) break; *konsole_tab++ = 0; ptr = strchr(konsole_tab, ')'); if (ptr) *ptr = 0; cmd = (char*) malloc(strlen(konsole_name) + strlen(konsole_tab) + 64); sprintf(cmd, "dcop %s konsole-mainwindow#1 getWinID 2>/dev/null", konsole_name); /* is 2>/dev/null portable among various shells? */ p = popen(cmd, "r"); if (p) { fscanf(p, "%lu", &w); pclose(p); } if (windowid) { /* $WINDOWID is known */ if (w != windowid) break; /* `dcop getWinID`==$WINDOWID thus we are running in a window detached from Konsole */ } else { windowid = w; /* $WINDOWID has not been known (KDE 3.1), thus set it up */ } sprintf(cmd, "dcop %s konsole activateSession %s", konsole_name, konsole_tab); system(cmd); } if (konsole_name) free(konsole_name); if (cmd) free(cmd); } /* NOTE: End of DCOP/KDE3 code (doesn't work in KDE4) */ /* now test for GNOME multitab console */ /* ... if somebody bothers to implement it ... */ /* we are not running in any known (implemented) multitab console */ if (windowid) { gdk_window_raise(gdk_window_foreign_new(windowid)); gdk_window_focus(gdk_window_foreign_new(windowid), GDK_CURRENT_TIME); } #endif /* USE_GTK */ #ifdef WIN32 WinRaiseConsole(); #endif #ifdef OS2 /* we assume that the console window is managed by PM, not by a X server */ HSWITCH hSwitch = 0; SWCNTRL swGnu; HWND hw; /* get details of command-line window */ hSwitch = WinQuerySwitchHandle(0, getpid()); WinQuerySwitchEntry(hSwitch, &swGnu); hw = WinQueryWindow(swGnu.hwnd, QW_BOTTOM); WinSetFocus(HWND_DESKTOP, hw); WinSwitchToProgram(hSwitch); #endif /* OS2 */ } /* ====license information==== * End of the non-relicensable portion. */ #endif /* DISABLE_SPACE_RAISES_CONSOLE */ /* ------------------------------------------------------ * Configuration dialog * ------------------------------------------------------*/ /* configuration dialog : handler for a close event */ void wxtConfigDialog::OnClose( wxCloseEvent& WXUNUSED( event ) ) { wxtFrame *parent = (wxtFrame *) GetParent(); parent->config_displayed = false; this->Destroy(); } /* configuration dialog : handler for a button event */ void wxtConfigDialog::OnButton( wxCommandEvent& event ) { TBOOLEAN antialiasing; TBOOLEAN oversampling; wxConfigBase *pConfig = wxConfigBase::Get(); Validate(); TransferDataFromWindow(); wxtFrame *parent = (wxtFrame *) GetParent(); switch (event.GetId()) { case Config_OK : Close(true); /* continue */ case Config_APPLY : /* changes are applied immediately */ wxt_raise = raise_setting?yes:no; wxt_persist = persist_setting?yes:no; wxt_ctrl = ctrl_setting?yes:no; wxt_toggle = toggle_setting?yes:no; switch (rendering_setting) { case 0 : antialiasing = FALSE; oversampling = FALSE; break; case 1 : antialiasing = TRUE; oversampling = FALSE; break; case 2 : default : antialiasing = TRUE; oversampling = TRUE; break; } /* we cannot apply the new settings right away, because it would mess up * the plot in case of a window resize. * Instead, we queue the settings until the next plot. */ parent->panel->wxt_settings_queue(antialiasing, oversampling, hinting_setting); if (!pConfig->Write(wxT("raise"), raise_setting)) wxLogError(wxT("Cannot write raise")); if (!pConfig->Write(wxT("persist"), persist_setting)) wxLogError(wxT("Cannot write persist")); if (!pConfig->Write(wxT("ctrl"), ctrl_setting)) wxLogError(wxT("Cannot write ctrl")); if (!pConfig->Write(wxT("toggle"), toggle_setting)) wxLogError(wxT("Cannot write toggle")); if (!pConfig->Write(wxT("rendering"), rendering_setting)) wxLogError(wxT("Cannot write rendering_setting")); if (!pConfig->Write(wxT("hinting"), hinting_setting)) wxLogError(wxT("Cannot write hinting_setting")); break; case Config_CANCEL : default : Close(true); break; } } /* Configuration dialog constructor */ wxtConfigDialog::wxtConfigDialog(wxWindow* parent) : wxDialog(parent, -1, wxT("Terminal configuration"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { /* wxStaticBox *sb = new wxStaticBox( this, wxID_ANY, wxT("&Explanation"), wxDefaultPosition, wxDefaultSize ); wxStaticBoxSizer *wrapping_sizer = new wxStaticBoxSizer( sb, wxVERTICAL ); wxStaticText *text1 = new wxStaticText(this, wxID_ANY, wxT("Options remembered between sessions, ") wxT("overriden by `set term wxt <options>`.\n\n"), wxDefaultPosition, wxSize(300, wxDefaultCoord)); wrapping_sizer->Add(text1,wxSizerFlags(0).Align(0).Expand().Border(wxALL) );*/ wxConfigBase *pConfig = wxConfigBase::Get(); pConfig->Read(wxT("raise"),&raise_setting); pConfig->Read(wxT("persist"),&persist_setting); pConfig->Read(wxT("ctrl"),&ctrl_setting); pConfig->Read(wxT("toggle"),&toggle_setting); pConfig->Read(wxT("rendering"),&rendering_setting); pConfig->Read(wxT("hinting"),&hinting_setting); wxCheckBox *check1 = new wxCheckBox (this, wxID_ANY, wxT("Put the window at the top of your desktop after each plot (raise)"), wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator(&raise_setting)); wxCheckBox *check2 = new wxCheckBox (this, wxID_ANY, wxT("Don't quit until all windows are closed (persist)"), wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator(&persist_setting)); wxCheckBox *check3 = new wxCheckBox (this, wxID_ANY, wxT("Replace 'q' by <ctrl>+'q' and <space> by <ctrl>+<space> (ctrl)"), wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator(&ctrl_setting)); wxCheckBox *check4 = new wxCheckBox (this, wxID_ANY, wxT("Toggle plots on/off when key sample is clicked"), wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator(&toggle_setting)); wxString choices[3]; choices[0] = wxT("No antialiasing"); choices[1] = wxT("Antialiasing"); choices[2] = wxT("Antialiasing and oversampling"); wxStaticBox *sb2 = new wxStaticBox( this, wxID_ANY, wxT("Rendering options (applied to the next plot)"), wxDefaultPosition, wxDefaultSize ); wxStaticBoxSizer *box_sizer2 = new wxStaticBoxSizer( sb2, wxVERTICAL ); wxStaticText *text_rendering = new wxStaticText(this, wxID_ANY, wxT("Rendering method :")); wxChoice *box = new wxChoice (this, Config_Rendering, wxDefaultPosition, wxDefaultSize, 3, choices, 0, wxGenericValidator(&rendering_setting)); text_hinting = new wxStaticText(this, wxID_ANY, wxT("Hinting (100=full,0=none) :")); slider = new wxSlider(this, wxID_ANY, 0, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxGenericValidator(&hinting_setting)); if (rendering_setting != 2) { slider->Enable(false); text_hinting->Enable(false); } box_sizer2->Add(text_rendering,wxSizerFlags().Align(0).Border(wxALL)); box_sizer2->Add(box,wxSizerFlags().Align(0).Border(wxALL)); box_sizer2->Add(text_hinting,wxSizerFlags().Align(0).Expand().Border(wxALL)); box_sizer2->Add(slider,wxSizerFlags().Align(0).Expand().Border(wxALL)); wxBoxSizer *hsizer = new wxBoxSizer( wxHORIZONTAL ); hsizer->Add( new wxButton(this, Config_OK, wxT("OK")), wxSizerFlags().Align(0).Expand().Border(wxALL)); hsizer->Add( new wxButton(this, Config_APPLY, wxT("Apply")), wxSizerFlags().Align(0).Expand().Border(wxALL)); hsizer->Add( new wxButton(this, Config_CANCEL, wxT("Cancel")), wxSizerFlags().Align(0).Expand().Border(wxALL)); wxBoxSizer *vsizer = new wxBoxSizer( wxVERTICAL ); vsizer->Add(check1,wxSizerFlags().Align(0).Expand().Border(wxALL)); vsizer->Add(check2,wxSizerFlags().Align(0).Expand().Border(wxALL)); vsizer->Add(check3,wxSizerFlags().Align(0).Expand().Border(wxALL)); vsizer->Add(check4,wxSizerFlags().Align(0).Expand().Border(wxALL)); vsizer->Add(box_sizer2,wxSizerFlags().Align(0).Expand().Border(wxALL)); /*vsizer->Add(CreateButtonSizer(wxOK|wxCANCEL),wxSizerFlags().Align(0).Expand().Border(wxALL));*/ vsizer->Add(hsizer,wxSizerFlags().Align(0).Expand().Border(wxALL)); /* use the sizer for layout */ SetSizer( vsizer ); /* set size hints to honour minimum size */ vsizer->SetSizeHints( this ); } /* enable or disable the hinting slider depending on the selection of the oversampling method */ void wxtConfigDialog::OnRendering( wxCommandEvent& event ) { if (event.GetInt() != 2) { slider->Enable(false); text_hinting->Enable(false); } else { slider->Enable(true); text_hinting->Enable(true); } } /* ------------------------------------------------------ * functions that are called by gnuplot * ------------------------------------------------------*/ /* "Called once, when the device is first selected." * Is the 'main' function of the terminal. */ void wxt_init() { FPRINTF((stderr,"Init\n")); if ( wxt_abort_init ) { fprintf(stderr,"Previous attempt to initialize wxWidgets has failed. Not retrying.\n"); return; } wxt_sigint_init(); if ( wxt_status == STATUS_UNINITIALIZED ) { FPRINTF((stderr,"First Init\n")); #ifdef __WXMSW__ /* the following is done in wxEntry() with wxMSW only */ WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst); wxSetInstance(GetModuleHandle(NULL)); wxApp::m_nCmdShow = SW_SHOW; #endif if (!wxInitialize()) { fprintf(stderr,"Failed to initialize wxWidgets.\n"); wxt_abort_init = true; if (interactive) { change_term("unknown",7); int_error(NO_CARET,"wxt init failure"); } else exit(-1); } /* app initialization */ wxTheApp->CallOnInit(); #ifdef WXT_MULTITHREADED /* Three commands to create the thread and run it. * We do this at first init only. * If the user sets another terminal and goes back to wxt, * the gui thread is already in action. */ thread = new wxtThread(); thread->Create(); thread->Run(); # ifdef USE_MOUSE int filedes[2]; if (pipe(filedes) == -1) { fprintf(stderr, "Pipe error, mousing will not work\n"); } wxt_event_fd = filedes[0]; wxt_sendevent_fd = filedes[1]; # endif /* USE_MOUSE */ #endif /* WXT_MULTITHREADED */ FPRINTF((stderr,"First Init2\n")); term_interlock = (void *)wxt_init; /* register call for "persist" effect and cleanup */ GP_ATEXIT(wxt_atexit); } wxt_sigint_check(); /* try to find the requested window in the list of existing ones */ wxt_current_window = wxt_findwindowbyid(wxt_window_number); /* open a new plot window if it does not exist */ if ( wxt_current_window == NULL ) { FPRINTF((stderr,"opening a new plot window\n")); /* create a new plot window and show it */ wxt_window_t window; window.id = wxt_window_number; if (strlen(wxt_title)) /* NOTE : this assumes that the title is encoded in the locale charset. * This is probably a good assumption, but it is not guaranteed ! * May be improved by using gnuplot encoding setting. */ window.title << wxString(wxt_title, wxConvLocal); else window.title.Printf(wxT("Gnuplot (window id : %d)"), window.id); window.mutex = new wxMutex(); window.condition = new wxCondition(*(window.mutex)); wxCommandEvent event(wxCreateWindowEvent); event.SetClientData((void*) &window); #ifdef WXT_MULTITHREADED window.mutex->Lock(); #endif /* WXT_MULTITHREADED */ wxt_MutexGuiEnter(); dynamic_cast<wxtApp*>(wxTheApp)->SendEvent( event ); wxt_MutexGuiLeave(); #ifdef WXT_MULTITHREADED /* While we are waiting, the other thread is busy mangling */ /* our locale settings. We will have to restore them later. */ window.condition->Wait(); #endif /* WXT_MULTITHREADED */ /* store the plot structure in the list and keep shortcuts */ wxt_window_list.push_back(window); wxt_current_window = &(wxt_window_list.back()); } /* initialize helper pointers */ wxt_current_panel = wxt_current_window->frame->panel; wxt_current_plot = &(wxt_current_panel->plot); wxt_current_command_list = &(wxt_current_panel->command_list); wxt_sigint_check(); bool raise_setting; bool persist_setting; bool ctrl_setting; bool toggle_setting; int rendering_setting; int hinting_setting; /* if needed, restore the setting from the config file/registry keys. * Unset values are set to default reasonable values. */ wxConfigBase *pConfig = wxConfigBase::Get(); if (!pConfig->Read(wxT("raise"), &raise_setting)) { pConfig->Write(wxT("raise"), true); raise_setting = true; } if (wxt_raise==UNSET) wxt_raise = raise_setting?yes:no; if (!pConfig->Read(wxT("persist"), &persist_setting)) pConfig->Write(wxT("persist"), false); if (!pConfig->Read(wxT("ctrl"), &ctrl_setting)) { pConfig->Write(wxT("ctrl"), false); ctrl_setting = false; } if (wxt_ctrl==UNSET) wxt_ctrl = ctrl_setting?yes:no; if (!pConfig->Read(wxT("toggle"), &toggle_setting)) { pConfig->Write(wxT("toggle"), true); toggle_setting = true; } if (wxt_toggle==UNSET) wxt_toggle = toggle_setting?yes:no; if (!pConfig->Read(wxT("rendering"), &rendering_setting)) { pConfig->Write(wxT("rendering"), 2); rendering_setting = 2; } switch (rendering_setting) { case 0 : wxt_current_plot->antialiasing = FALSE; wxt_current_plot->oversampling = FALSE; break; case 1 : wxt_current_plot->antialiasing = TRUE; wxt_current_plot->oversampling = FALSE; break; case 2 : default : wxt_current_plot->antialiasing = TRUE; wxt_current_plot->oversampling = TRUE; break; } if (!pConfig->Read(wxT("hinting"), &hinting_setting)) { pConfig->Write(wxT("hinting"), 100); hinting_setting = 100; } wxt_current_plot->hinting = hinting_setting; #ifdef HAVE_LOCALE_H /* when wxGTK was initialised above, GTK+ also set the locale of the * program itself; we must revert it */ if (wxt_status == STATUS_UNINITIALIZED) { extern char *current_locale; setlocale(LC_NUMERIC, "C"); setlocale(LC_TIME, current_locale); } #endif /* accept the following commands from gnuplot */ wxt_status = STATUS_OK; wxt_current_plot->interrupt = FALSE; wxt_sigint_check(); wxt_sigint_restore(); FPRINTF((stderr,"Init finished \n")); } /* "Called just before a plot is going to be displayed." * Should clear the terminal. */ void wxt_graphics() { if (wxt_status != STATUS_OK) return; #ifdef DEBUG /* performance watch - to be removed */ sw.Start(); #endif /* The sequence of gnuplot commands is critical as it involves mutexes. * We replace the original interrupt handler with a custom one. */ wxt_sigint_init(); /* update the window scale factor first, cairo needs it */ wxt_current_plot->xscale = 1.0; wxt_current_plot->yscale = 1.0; /* set the line properties */ /* FIXME: should this be in wxt_settings_apply() ? */ wxt_current_plot->rounded = wxt_rounded; /* background as given by set term */ wxt_current_plot->background = wxt_rgb_background; gp_cairo_set_background(wxt_rgb_background); /* apply the queued rendering settings */ wxt_current_panel->wxt_settings_apply(); FPRINTF((stderr,"Graphics1\n")); wxt_MutexGuiEnter(); /* set the transformation matrix of the context, and other details */ /* depends on plot->xscale and plot->yscale */ gp_cairo_initialize_context(wxt_current_plot); /* set or refresh terminal size according to the window size */ /* oversampling_scale is updated in gp_cairo_initialize_context */ term->xmax = (unsigned int) wxt_current_plot->device_xmax*wxt_current_plot->oversampling_scale; term->ymax = (unsigned int) wxt_current_plot->device_ymax*wxt_current_plot->oversampling_scale; wxt_current_plot->xmax = term->xmax; wxt_current_plot->ymax = term->ymax; /* initialize encoding */ wxt_current_plot->encoding = encoding; wxt_MutexGuiLeave(); /* set font details (h_char, v_char) according to settings */ wxt_set_font(""); term->v_tic = (unsigned int) (term->v_char/2.5); term->h_tic = (unsigned int) (term->v_char/2.5); /* clear the command list, and free the allocated memory */ wxt_current_panel->ClearCommandlist(); /* Don't reset the hide_plot flags if this refresh is a zoom/unzoom */ if (wxt_zoom_command) wxt_zoom_command = FALSE; else wxt_initialize_hidden(0); wxt_sigint_check(); wxt_sigint_restore(); FPRINTF((stderr,"Graphics time %d xmax %d ymax %d v_char %d h_char %d\n", sw.Time(), term->xmax, term->ymax, term->v_char, term->h_char)); } void wxt_text() { if (wxt_status != STATUS_OK) { #ifdef USE_MOUSE /* Inform gnuplot that we have finished plotting. * This avoids to lose the mouse after a interrupt. * Do this immediately, instead of posting an event which may not be processed. */ event_plotdone(); #endif return; } #ifdef USE_MOUSE /* Save a snapshot of the axis state so that we can continue * to update mouse cursor coordinates even though the plot is not active */ wxt_current_window->axis_mask = wxt_axis_mask; memcpy( wxt_current_window->axis_state, wxt_axis_state, sizeof(wxt_axis_state) ); #endif wxt_sigint_init(); FPRINTF((stderr,"Text0 %d\n", sw.Time())); /*performance watch*/ /* translates the command list to a bitmap */ wxt_MutexGuiEnter(); wxt_current_panel->wxt_cairo_refresh(); wxt_MutexGuiLeave(); wxt_sigint_check(); /* raise the window, conditionnaly to the user choice */ wxt_MutexGuiEnter(); wxt_raise_window(wxt_current_window,false); wxt_MutexGuiLeave(); FPRINTF((stderr,"Text2 %d\n", sw.Time())); /*performance watch*/ #ifdef USE_MOUSE /* Inform gnuplot that we have finished plotting */ wxt_exec_event(GE_plotdone, 0, 0, 0, 0, wxt_window_number ); #endif /*USE_MOUSE*/ wxt_sigint_check(); wxt_sigint_restore(); FPRINTF((stderr,"Text finished %d\n", sw.Time())); /*performance watch*/ } void wxt_reset() { /* sent when gnuplot exits and when the terminal or the output change.*/ FPRINTF((stderr,"wxt_reset\n")); if (wxt_status == STATUS_UNINITIALIZED) return; #ifdef USE_MOUSE if (wxt_status == STATUS_INTERRUPT) { /* send "reset" event to restore the mouse system in a well-defined state. * Send it directly, not with wxt_exec_event(), which would only enqueue it, * but not process it. */ FPRINTF((stderr,"send reset event to the mouse system\n")); event_reset((gp_event_t *)1); /* cancel zoombox etc. */ } #endif /*USE_MOUSE*/ FPRINTF((stderr,"wxt_reset ends\n")); } void wxt_move(unsigned int x, unsigned int y) { if (wxt_status != STATUS_OK) return; gp_command temp_command; temp_command.command = command_move; temp_command.x1 = x; temp_command.y1 = term->ymax - y; wxt_command_push(temp_command); } void wxt_vector(unsigned int x, unsigned int y) { if (wxt_status != STATUS_OK) return; gp_command temp_command; temp_command.command = command_vector; temp_command.x1 = x; temp_command.y1 = term->ymax - y; wxt_command_push(temp_command); } void wxt_enhanced_flush() { if (wxt_status != STATUS_OK) return; gp_command temp_command; temp_command.command = command_enhanced_flush; wxt_command_push(temp_command); } void wxt_enhanced_writec(int c) { if (wxt_status != STATUS_OK) return; gp_command temp_command; temp_command.command = command_enhanced_writec; temp_command.integer_value = c; wxt_command_push(temp_command); } void wxt_enhanced_open(char* fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { if (wxt_status != STATUS_OK) return; gp_command temp_command; temp_command.command = command_enhanced_open; temp_command.string = new char[strlen(fontname)+1]; strcpy(temp_command.string, fontname); temp_command.double_value = fontsize; temp_command.double_value2 = base; temp_command.integer_value = overprint; temp_command.integer_value2 = widthflag + (showflag << 1); wxt_command_push(temp_command); } void wxt_put_text(unsigned int x, unsigned int y, const char * string) { if (wxt_status != STATUS_OK) return; gp_command temp_command; /* if ignore_enhanced_text is set, draw with the normal routine. * This is meant to avoid enhanced syntax when the enhanced mode is on */ if (wxt_enhanced_enabled && !ignore_enhanced_text) { /* Uses enhanced_recursion() to analyse the string to print. * enhanced_recursion() calls _enhanced_open() to initialize the text drawing, * then it calls _enhanced_writec() which buffers the characters to draw, * and finally _enhanced_flush() to draw the buffer with the correct justification. */ /* init */ temp_command.command = command_enhanced_init; temp_command.integer_value = strlen(string); wxt_command_push(temp_command); /* set up the global variables needed by enhanced_recursion() */ enhanced_fontscale = wxt_set_fontscale; strncpy(enhanced_escape_format, "%c", sizeof(enhanced_escape_format)); /* Set the recursion going. We say to keep going until a * closing brace, but we don't really expect to find one. * If the return value is not the nul-terminator of the * string, that can only mean that we did find an unmatched * closing brace in the string. We inplot->crement past it (else * we get stuck in an infinite loop) and try again. */ while (*(string = enhanced_recursion((char*)string, TRUE, wxt_current_plot->fontname, wxt_current_plot->fontsize * wxt_set_fontscale, 0.0, TRUE, TRUE, 0))) { wxt_enhanced_flush(); /* we can only get here if *str == '}' */ enh_err_check(string); if (!*++string) break; /* end of string */ /* else carry on and process the rest of the string */ } /* finish */ temp_command.command = command_enhanced_finish; temp_command.x1 = x; temp_command.y1 = term->ymax - y; wxt_command_push(temp_command); return; } temp_command.command = command_put_text; temp_command.x1 = x; temp_command.y1 = term->ymax - y; /* Note : we must take '\0' (EndOfLine) into account */ temp_command.string = new char[strlen(string)+1]; strcpy(temp_command.string, string); wxt_command_push(temp_command); } void wxt_linetype(int lt) { if (wxt_status != STATUS_OK) return; gp_command temp_command; gp_command temp_command2; temp_command2.command = command_linestyle; if (lt == -1) temp_command2.integer_value = GP_CAIRO_DOTS; else if (wxt_dashed && lt >= 0) { temp_command2.integer_value = GP_CAIRO_DASH; wxt_current_plot->dashlength = wxt_dashlength; } else temp_command2.integer_value = GP_CAIRO_SOLID; wxt_command_push(temp_command2); temp_command.command = command_linetype; temp_command.integer_value = lt; wxt_command_push(temp_command); temp_command.command = command_color; temp_command.color = gp_cairo_linetype2color( lt ); wxt_command_push(temp_command); } /* - fonts are selected as strings "name,size". * - _set_font("") restores the terminal's default font.*/ int wxt_set_font (const char *font) { if (wxt_status != STATUS_OK) return 1; char fontname[MAX_ID_LEN + 1] = ""; gp_command temp_command; int fontsize = 0; temp_command.command = command_set_font; if (!font || !(*font)) { strncpy(fontname, "", sizeof(fontname)); fontsize = 0; } else { int sep; sep = strcspn(font,","); if (sep > 0) { strncpy(fontname, font, sep); fontname[sep] = '\0'; } if (font[sep] == ',') sscanf(&(font[sep+1]), "%d", &fontsize); } wxt_sigint_init(); wxt_MutexGuiEnter(); if ( strlen(fontname) == 0 ) { if ( strlen(wxt_set_fontname) == 0 ) strncpy(fontname, gp_cairo_default_font(), sizeof(fontname)); else strncpy(fontname, wxt_set_fontname, sizeof(fontname)); } if ( fontsize == 0 ) { if ( wxt_set_fontsize == 0 ) fontsize = 10; else fontsize = wxt_set_fontsize; } /* Reset the term variables (hchar, vchar, h_tic, v_tic). * They may be taken into account in next plot commands */ gp_cairo_set_font(wxt_current_plot, fontname, fontsize * wxt_set_fontscale); gp_cairo_set_termvar(wxt_current_plot, &(term->v_char), &(term->h_char)); gp_cairo_set_font(wxt_current_plot, fontname, fontsize); wxt_MutexGuiLeave(); wxt_sigint_check(); wxt_sigint_restore(); /* Note : we must take '\0' (EndOfLine) into account */ temp_command.string = new char[strlen(fontname)+1]; strcpy(temp_command.string, fontname); temp_command.integer_value = fontsize * wxt_set_fontscale; wxt_command_push(temp_command); /* the returned int is not used anywhere */ return 1; } int wxt_justify_text(enum JUSTIFY mode) { if (wxt_status != STATUS_OK) return 1; gp_command temp_command; temp_command.command = command_justify; temp_command.mode = mode; wxt_command_push(temp_command); return 1; /* we can justify */ } void wxt_point(unsigned int x, unsigned int y, int pointstyle) { if (wxt_status != STATUS_OK) return; gp_command temp_command; temp_command.command = command_point; temp_command.x1 = x; temp_command.y1 = term->ymax - y; temp_command.integer_value = pointstyle; wxt_command_push(temp_command); } void wxt_pointsize(double ptsize) { if (wxt_status != STATUS_OK) return; /* same behaviour as x11 terminal */ if (ptsize<0) ptsize = 1; gp_command temp_command; temp_command.command = command_pointsize; temp_command.double_value = ptsize; wxt_command_push(temp_command); } void wxt_linewidth(double lw) { if (wxt_status != STATUS_OK) return; gp_command temp_command; temp_command.command = command_linewidth; temp_command.double_value = lw; wxt_command_push(temp_command); } int wxt_text_angle(int angle) { if (wxt_status != STATUS_OK) return 1; gp_command temp_command; temp_command.command = command_text_angle; /* a double is needed to compute cos, sin, etc. */ temp_command.double_value = (double) angle; wxt_command_push(temp_command); return 1; /* 1 means we can rotate */ } void wxt_fillbox(int style, unsigned int x, unsigned int y, unsigned int width, unsigned int height) { if (wxt_status != STATUS_OK) return; gp_command temp_command; temp_command.command = command_fillbox; temp_command.x1 = x; temp_command.y1 = term->ymax - y; temp_command.x2 = width; temp_command.y2 = height; temp_command.integer_value = style; wxt_command_push(temp_command); } int wxt_make_palette(t_sm_palette * palette) { /* we can do continuous colors */ return 0; } void wxt_set_color(t_colorspec *colorspec) { if (wxt_status != STATUS_OK) return; rgb_color rgb1; gp_command temp_command; if (colorspec->type == TC_LT) { rgb1 = gp_cairo_linetype2color(colorspec->lt); } else if (colorspec->type == TC_FRAC) rgb1maxcolors_from_gray( colorspec->value, &rgb1 ); else if (colorspec->type == TC_RGB) { rgb1.r = (double) ((colorspec->lt >> 16) & 0xff)/255; rgb1.g = (double) ((colorspec->lt >> 8) & 0xff)/255; rgb1.b = (double) ((colorspec->lt) & 0xff)/255; } else return; temp_command.command = command_color; temp_command.color = rgb1; wxt_command_push(temp_command); } /* here we send the polygon command */ void wxt_filled_polygon(int n, gpiPoint *corners) { if (wxt_status != STATUS_OK) return; gp_command temp_command; temp_command.command = command_filled_polygon; temp_command.integer_value = n; temp_command.corners = new gpiPoint[n]; /* can't use memcpy() here, as we have to mirror the y axis */ gpiPoint *corners_copy = temp_command.corners; while (corners_copy < (temp_command.corners + n)) { *corners_copy = *corners++; corners_copy->y = term->ymax - corners_copy->y; ++corners_copy; } wxt_command_push(temp_command); } void wxt_image(unsigned int M, unsigned int N, coordval * image, gpiPoint * corner, t_imagecolor color_mode) { /* This routine is to plot a pixel-based image on the display device. 'M' is the number of pixels along the y-dimension of the image and 'N' is the number of pixels along the x-dimension of the image. The coordval pointer 'image' is the pixel values normalized to the range [0:1]. These values should be scaled accordingly for the output device. They 'image' data starts in the upper left corner and scans along rows finishing in the lower right corner. If 'color_mode' is IC_PALETTE, the terminal is to use palette lookup to generate color information. In this scenario the size of 'image' is M*N. If 'color_mode' is IC_RGB, the terminal is to use RGB components. In this scenario the size of 'image' is 3*M*N. The data appears in RGB tripples, i.e., image[0] = R(1,1), image[1] = G(1,1), image[2] = B(1,1), image[3] = R(1,2), image[4] = G(1,2), ..., image[3*M*N-1] = B(M,N). The 'image' is actually an "input" image in the sense that it must also be properly resampled for the output device. Many output mediums, e.g., PostScript, do this work via various driver functions. To determine the appropriate rescaling, the 'corner' information should be used. There are four entries in the gpiPoint data array. 'corner[0]' is the upper left corner (in terms of plot location) of the outer edge of the image. Similarly, 'corner[1]' is the lower right corner of the outer edge of the image. (Outer edge means the outer extent of the corner pixels, not the middle of the corner pixels.) 'corner[2]' is the upper left corner of the visible part of the image, and 'corner[3]' is the lower right corner of the visible part of the image. The information is provided in this way because often it is necessary to clip a portion of the outer pixels of the image. */ /* we will draw an image, scale and resize it, copy to bitmap, * give a pointer to it in the list, and when processing the list we will use DrawBitmap */ /* FIXME add palette support ??? */ if (wxt_status != STATUS_OK) return; gp_command temp_command; temp_command.command = command_image; temp_command.x1 = corner[0].x; temp_command.y1 = term->ymax - corner[0].y; temp_command.x2 = corner[1].x; temp_command.y2 = term->ymax - corner[1].y; temp_command.x3 = corner[2].x; temp_command.y3 = term->ymax - corner[2].y; temp_command.x4 = corner[3].x; temp_command.y4 = term->ymax - corner[3].y; temp_command.integer_value = M; temp_command.integer_value2 = N; temp_command.image = gp_cairo_helper_coordval_to_chars(image, M, N, color_mode); wxt_command_push(temp_command); } /* This is meta-information about the plot state */ void wxt_layer(t_termlayer layer) { /* There are two classes of meta-information. The first class */ /* is tied to the current state of the user interface or the */ /* main gnuplot thread. Any action on these must be done here, */ /* immediately. The second class relates to the sequence of */ /* operations in the plot itself. These are buffered for later */ /* execution in sequential order. */ if (layer == TERM_LAYER_BEFORE_ZOOM) { wxt_zoom_command = TRUE; return; } if (layer == TERM_LAYER_RESET || layer == TERM_LAYER_RESET_PLOTNO) { if (multiplot) return; } gp_command temp_command; temp_command.command = command_layer; temp_command.integer_value = layer; wxt_command_push(temp_command); } #ifdef USE_MOUSE /* Display temporary text, after * erasing any temporary text displayed previously at this location. * The int determines where: 0=statusline, 1,2: at corners of zoom * box, with \r separating text above and below the point. */ void wxt_put_tmptext(int n, const char str[]) { if (wxt_status == STATUS_UNINITIALIZED) return; wxt_sigint_init(); wxt_MutexGuiEnter(); switch ( n ) { case 0: { wxCommandEvent event(wxStatusTextEvent); event.SetString(wxString(str, wxConvLocal)); wxt_current_window->frame->SendEvent( event ); } break; case 1: wxt_current_panel->zoom_x1 = wxt_current_panel->mouse_x; wxt_current_panel->zoom_y1 = wxt_current_panel->mouse_y; wxt_current_panel->zoom_string1 = wxString(str, wxConvLocal); break; case 2: if ( strlen(str)==0 ) wxt_current_panel->wxt_zoombox = false; else { wxt_current_panel->wxt_zoombox = true; wxt_current_panel->zoom_string2 = wxString(str, wxConvLocal); } wxt_current_panel->Draw(); break; default : break; } wxt_MutexGuiLeave(); wxt_sigint_check(); wxt_sigint_restore(); } /* c selects the action: * -4=don't draw (erase) line between ruler and current mouse position, * -3=draw line between ruler and current mouse position, * -2=warp the cursor to the given point, * -1=start zooming, * 0=standard cross-hair cursor, * 1=cursor during rotation, * 2=cursor during scaling, * 3=cursor during zooming. */ void wxt_set_cursor(int c, int x, int y) { if (wxt_status == STATUS_UNINITIALIZED) return; wxt_sigint_init(); wxt_MutexGuiEnter(); switch ( c ) { case -4: wxt_current_panel->wxt_ruler_lineto = false; wxt_current_panel->Draw(); break; case -3: wxt_current_panel->wxt_ruler_lineto = true; wxt_current_panel->Draw(); break; case -2: /* warp the pointer to the given position */ wxt_current_panel->WarpPointer( (int) device_x(wxt_current_plot, x), (int) device_y(wxt_current_plot, y) ); break; case -1: /* start zooming */ wxt_current_panel->SetCursor(wxt_cursor_right); break; case 0: /* cross-hair cursor, also cancel zoombox when Echap is pressed */ wxt_current_panel->wxt_zoombox = false; wxt_current_panel->SetCursor(wxt_cursor_cross); wxt_current_panel->Draw(); break; case 1: /* rotation */ wxt_current_panel->SetCursor(wxt_cursor_rotate); break; case 2: /* scaling */ wxt_current_panel->SetCursor(wxt_cursor_size); break; case 3: /* zooming */ wxt_current_panel->SetCursor(wxt_cursor_right); break; default: wxt_current_panel->SetCursor(wxt_cursor_cross); break; } wxt_MutexGuiLeave(); wxt_sigint_check(); wxt_sigint_restore(); } /* Draw a ruler (crosshairs) centered at the * indicated screen coordinates. If x<0, switch ruler off. */ void wxt_set_ruler(int x, int y) { if (wxt_status == STATUS_UNINITIALIZED) return; wxt_sigint_init(); wxt_MutexGuiEnter(); if (x<0) { wxt_current_panel->wxt_ruler = false; wxt_current_panel->Draw(); } else { wxt_current_panel->wxt_ruler = true; wxt_current_panel->wxt_ruler_x = device_x(wxt_current_plot, x); wxt_current_panel->wxt_ruler_y = device_y(wxt_current_plot, y); wxt_current_panel->Draw(); } wxt_MutexGuiLeave(); wxt_sigint_check(); wxt_sigint_restore(); } /* Write a string to the clipboard */ void wxt_set_clipboard(const char s[]) { if (wxt_status == STATUS_UNINITIALIZED) return; wxt_sigint_init(); wxt_MutexGuiEnter(); if (wxTheClipboard->Open()) { wxTheClipboard->SetData( new wxTextDataObject(wxString(s, wxConvLocal)) ); wxTheClipboard->Flush(); wxTheClipboard->Close(); } wxt_MutexGuiLeave(); wxt_sigint_check(); wxt_sigint_restore(); } #endif /*USE_MOUSE*/ /* =================================================================== * Command list processing * =================================================================*/ /* push a command in the current commands list */ void wxt_command_push(gp_command command) { wxt_sigint_init(); wxt_current_panel->command_list_mutex.Lock(); wxt_current_command_list->push_back(command); wxt_current_panel->command_list_mutex.Unlock(); wxt_sigint_check(); wxt_sigint_restore(); } /* refresh the plot by (re)processing the plot commands list */ void wxtPanel::wxt_cairo_refresh() { /* Clear background. */ gp_cairo_solid_background(&plot); /* Initialize toggle in keybox mechanism */ wxt_cur_plotno = 0; wxt_in_key_sample = FALSE; #ifdef USE_MOUSE wxt_initialize_key_boxes(0); #endif command_list_mutex.Lock(); command_list_t::iterator wxt_iter; /*declare the iterator*/ for(wxt_iter = command_list.begin(); wxt_iter != command_list.end(); ++wxt_iter) { if (wxt_status == STATUS_INTERRUPT_ON_NEXT_CHECK) { FPRINTF((stderr,"interrupt detected inside drawing loop\n")); #ifdef IMAGE_SURFACE wxt_cairo_create_bitmap(); #endif /* IMAGE_SURFACE */ /* draw the pixmap to the screen */ Draw(); return; } /* Skip the plot commands, but not the key sample commands, * if the plot was toggled off by a mouse click in the GUI */ if (wxt_in_plot && !wxt_in_key_sample && wxt_iter->command != command_layer && wxt_cur_plotno < wxt_max_key_boxes && wxt_key_boxes[wxt_cur_plotno].hidden) continue; wxt_cairo_exec_command( *wxt_iter ); } command_list_mutex.Unlock(); /* don't forget to stroke the last path if vector was the last command */ gp_cairo_stroke(&plot); /* and don't forget to draw the polygons if draw_polygon was the last command */ gp_cairo_end_polygon(&plot); /* the following is a test for a bug in cairo when drawing to a gdkpixmap */ #if 0 cairo_set_source_rgb(plot.cr,1,1,1); cairo_paint(plot.cr); cairo_matrix_t matrix; cairo_matrix_init(&matrix, plot.xscale, 0, 0, plot.yscale, 0, 0); cairo_set_matrix(plot.cr, &matrix); cairo_t *context; cairo_surface_t *surface; surface = cairo_surface_create_similar(cairo_get_target(plot.cr), CAIRO_CONTENT_COLOR_ALPHA, plot.device_xmax, plot.device_ymax); context = cairo_create(surface); cairo_set_operator(context,CAIRO_OPERATOR_SATURATE); cairo_move_to(context, 300, 200); cairo_rel_line_to(context, 100, 0); cairo_rel_line_to(context, 0, 100); cairo_close_path(context); cairo_set_source_rgb(context,0,0,0); cairo_fill(context); cairo_move_to(context, 250, 170); cairo_rel_line_to(context, 100, 0); cairo_rel_line_to(context, 0, 100); cairo_close_path(context); cairo_set_source_rgb(context,0,0,0.5); cairo_fill(context); cairo_move_to(context, 360, 200); cairo_rel_line_to(context, 30, 0); cairo_rel_line_to(context, 0, -40); cairo_close_path(context); cairo_set_source_rgb(context,1,0,0); cairo_fill(context); cairo_move_to(context, 400, 100); cairo_rel_line_to(context, 100, 0); cairo_rel_line_to(context, -100, 300); cairo_close_path(context); cairo_set_source_rgb(context,0,1,0); cairo_fill(context); cairo_move_to(context, 400, 300); cairo_rel_line_to(context, -80, -80); cairo_rel_line_to(context, 0, 100); cairo_close_path(context); cairo_set_source_rgb(context,0.6,0.4,0); cairo_fill(context); cairo_pattern_t *pattern = cairo_pattern_create_for_surface( surface ); cairo_destroy( context ); cairo_surface_destroy( surface ); cairo_set_source( plot.cr, pattern ); cairo_pattern_destroy( pattern ); cairo_paint(plot.cr); cairo_matrix_init(&matrix, plot.xscale/plot.oversampling_scale, 0, 0, plot.yscale/plot.oversampling_scale, 0, 0); cairo_set_matrix(plot.cr, &matrix); #endif #ifdef IMAGE_SURFACE wxt_cairo_create_bitmap(); #endif /* !have_gtkcairo */ /* draw the pixmap to the screen */ Draw(); #if (0) /* Just for DEBUG */ FPRINTF((stderr,"commands done, number of commands %d\n", command_list.size())); int ibox; for (ibox=1; ibox<=wxt_max_key_boxes; ibox++) { if (ibox > wxt_cur_plotno) break; fprintf(stderr, wxt_key_boxes[ibox].hidden ? "hidden " : "visible "); fprintf(stderr,"box %d %8.8u %8.8u %8.8u %8.8u\n", ibox, wxt_key_boxes[ibox].left, wxt_key_boxes[ibox].ybot, wxt_key_boxes[ibox].right, wxt_key_boxes[ibox].ytop); } #endif } void wxtPanel::wxt_cairo_exec_command(gp_command command) { static JUSTIFY text_justification_mode = LEFT; switch ( command.command ) { case command_color : gp_cairo_set_color(&plot,command.color); return; case command_filled_polygon : if (wxt_in_key_sample) { wxt_update_key_box(command.x1 - term->h_tic, command.y1 - term->v_tic); wxt_update_key_box(command.x1 + term->h_tic, command.y1 + term->v_tic); } gp_cairo_draw_polygon(&plot, command.integer_value, command.corners); return; case command_move : if (wxt_in_key_sample) wxt_update_key_box(command.x1, command.y1); gp_cairo_move(&plot, command.x1, command.y1); return; case command_vector : if (wxt_in_key_sample) { wxt_update_key_box(command.x1, command.y1+term->v_tic); wxt_update_key_box(command.x1, command.y1-term->v_tic); } gp_cairo_vector(&plot, command.x1, command.y1); return; case command_linestyle : gp_cairo_set_linestyle(&plot, command.integer_value); return; case command_linetype : gp_cairo_set_linetype(&plot, command.integer_value); return; case command_pointsize : gp_cairo_set_pointsize(&plot, command.double_value); return; case command_point : if (wxt_in_key_sample) { wxt_update_key_box(command.x1 - term->h_tic, command.y1 - term->v_tic); wxt_update_key_box(command.x1 + term->h_tic, command.y1 + term->v_tic); } gp_cairo_draw_point(&plot, command.x1, command.y1, command.integer_value); return; case command_justify : gp_cairo_set_justify(&plot,command.mode); text_justification_mode = command.mode; return; case command_put_text : case command_enhanced_put_text : if (wxt_in_key_sample) { int slen = strlen(command.string) * term->h_char * 0.75; if (text_justification_mode == RIGHT) slen = -slen; wxt_update_key_box(command.x1, command.y1); wxt_update_key_box(command.x1 + slen, command.y1 - term->v_tic); } gp_cairo_draw_text(&plot, command.x1, command.y1, command.string); return; case command_enhanced_init : gp_cairo_enhanced_init(&plot, command.integer_value); return; case command_enhanced_finish : gp_cairo_enhanced_finish(&plot, command.x1, command.y1); return; case command_enhanced_flush : gp_cairo_enhanced_flush(&plot); return; case command_enhanced_open : gp_cairo_enhanced_open(&plot, command.string, command.double_value, command.double_value2, command.integer_value2 & 1, (command.integer_value2 & 2) >> 1, command.integer_value); return; case command_enhanced_writec : gp_cairo_enhanced_writec(&plot, command.integer_value); return; case command_set_font : gp_cairo_set_font(&plot, command.string, command.integer_value); return; case command_linewidth : gp_cairo_set_linewidth(&plot, command.double_value);; return; case command_text_angle : gp_cairo_set_textangle(&plot, command.double_value); return; case command_fillbox : if (wxt_in_key_sample) { wxt_update_key_box(command.x1, command.y1); wxt_update_key_box(command.x1+command.x2, command.y1-command.y2); } gp_cairo_draw_fillbox(&plot, command.x1, command.y1, command.x2, command.y2, command.integer_value); return; case command_image : gp_cairo_draw_image(&plot, command.image, command.x1, command.y1, command.x2, command.y2, command.x3, command.y3, command.x4, command.y4, command.integer_value, command.integer_value2); return; case command_layer : switch (command.integer_value) { case TERM_LAYER_RESET: case TERM_LAYER_RESET_PLOTNO: wxt_cur_plotno = 0; break; case TERM_LAYER_BEFORE_PLOT: wxt_cur_plotno++; wxt_in_plot = TRUE; break; case TERM_LAYER_AFTER_PLOT: wxt_in_plot = FALSE; break; case TERM_LAYER_BEGIN_KEYSAMPLE: wxt_in_key_sample = TRUE; break; case TERM_LAYER_END_KEYSAMPLE: wxt_in_key_sample = FALSE; break; default: break; } return; } } /* given a plot number (id), return the associated plot structure */ wxt_window_t* wxt_findwindowbyid(wxWindowID id) { size_t i; for(i=0;i<wxt_window_list.size();++i) { if (wxt_window_list[i].id == id) return &(wxt_window_list[i]); } return NULL; } /*---------------------------------------------------------------------------- * raise-lower functions *----------------------------------------------------------------------------*/ void wxt_raise_window(wxt_window_t* window, bool force) { FPRINTF((stderr,"raise window\n")); window->frame->Show(true); if (wxt_raise != no||force) { #ifdef USE_GTK /* Raise() in wxGTK call wxTopLevelGTK::Raise() * which also gives the focus to the window. * Refresh() also must be called, otherwise * the raise won't happen immediately */ window->frame->panel->Refresh(false); gdk_window_raise(window->frame->GetHandle()->window); #else window->frame->Raise(); #endif /*USE_GTK */ } } void wxt_lower_window(wxt_window_t* window) { #ifdef USE_GTK window->frame->panel->Refresh(false); gdk_window_lower(window->frame->GetHandle()->window); #else window->frame->Lower(); #endif /* USE_GTK */ } /* raise the plot with given number */ void wxt_raise_terminal_window(int number) { wxt_window_t *window; if (wxt_status != STATUS_OK) return; wxt_sigint_init(); wxt_MutexGuiEnter(); if ((window = wxt_findwindowbyid(number))) { FPRINTF((stderr,"wxt : raise window %d\n",number)); window->frame->Show(true); wxt_raise_window(window,true); } wxt_MutexGuiLeave(); wxt_sigint_check(); wxt_sigint_restore(); } /* raise the plot the whole group */ void wxt_raise_terminal_group() { /* declare the iterator */ std::vector<wxt_window_t>::iterator wxt_iter; if (wxt_status != STATUS_OK) return; wxt_sigint_init(); wxt_MutexGuiEnter(); for(wxt_iter = wxt_window_list.begin(); wxt_iter != wxt_window_list.end(); wxt_iter++) { FPRINTF((stderr,"wxt : raise window %d\n",wxt_iter->id)); wxt_iter->frame->Show(true); /* FIXME Why does wxt_iter not work directly? */ wxt_raise_window(&(*wxt_iter),true); } wxt_MutexGuiLeave(); wxt_sigint_check(); wxt_sigint_restore(); } /* lower the plot with given number */ void wxt_lower_terminal_window(int number) { wxt_window_t *window; if (wxt_status != STATUS_OK) return; wxt_sigint_init(); wxt_MutexGuiEnter(); if ((window = wxt_findwindowbyid(number))) { FPRINTF((stderr,"wxt : lower window %d\n",number)); wxt_lower_window(window); } wxt_MutexGuiLeave(); wxt_sigint_check(); wxt_sigint_restore(); } /* lower the plot the whole group */ void wxt_lower_terminal_group() { /* declare the iterator */ std::vector<wxt_window_t>::iterator wxt_iter; if (wxt_status != STATUS_OK) return; wxt_sigint_init(); wxt_MutexGuiEnter(); for(wxt_iter = wxt_window_list.begin(); wxt_iter != wxt_window_list.end(); wxt_iter++) { FPRINTF((stderr,"wxt : lower window %d\n",wxt_iter->id)); wxt_lower_window(&(*wxt_iter)); } wxt_MutexGuiLeave(); wxt_sigint_check(); wxt_sigint_restore(); } /* close the specified window */ void wxt_close_terminal_window(int number) { wxt_window_t *window; if (wxt_status != STATUS_OK) return; if ((window = wxt_findwindowbyid(number))) { FPRINTF((stderr,"wxt : close window %d\n",number)); wxCloseEvent event(wxEVT_CLOSE_WINDOW, window->id); event.SetCanVeto(true); wxt_sigint_init(); wxt_MutexGuiEnter(); window->frame->SendEvent(event); wxt_MutexGuiLeave(); wxt_sigint_check(); wxt_sigint_restore(); } } /* The following two routines allow us to update the cursor position * in the specified window even if the window is not active */ static double mouse_to_axis(int mouse_coord, wxt_axis_state_t *axis) { double axis_coord; if (axis->term_scale == 0.0) return 0; axis_coord = axis->min + ((double)mouse_coord - axis->term_lower) / axis->term_scale; if (axis->logbase > 0) axis_coord = exp(axis_coord * axis->logbase); return axis_coord; } static void wxt_update_mousecoords_in_window(int number, int mx, int my) { wxt_window_t *window; if (wxt_status != STATUS_OK) return; if ((window = wxt_findwindowbyid(number))) { /* TODO: rescale mx and my using stored per-plot scale info */ char mouse_format[66]; char *m = mouse_format; double x, y, x2, y2; if (window->axis_mask & (1<<0)) { x = mouse_to_axis(mx, &window->axis_state[0]); sprintf(m, "x= %10g %c", x, '\0'); m += 17; } if (window->axis_mask & (1<<1)) { y = mouse_to_axis(my, &window->axis_state[1]); sprintf(m, "y= %10g %c", y, '\0'); m += 17; } if (window->axis_mask & (1<<2)) { x2 = mouse_to_axis(mx, &window->axis_state[2]); sprintf(m, "x2= %10g %c", x2, '\0'); m += 17; } if (window->axis_mask & (1<<3)) { y2 = mouse_to_axis(my, &window->axis_state[3]); sprintf(m, "y2= %10g %c", y2, '\0'); m += 15; } FPRINTF((stderr,"wxt : update mouse coords in window %d\n",number)); window->frame->SetStatusText(wxString(mouse_format, wxConvLocal)); } } /* update the window title */ void wxt_update_title(int number) { wxt_window_t *window; wxString title; if (wxt_status != STATUS_OK) return; wxt_sigint_init(); wxt_MutexGuiEnter(); if ((window = wxt_findwindowbyid(number))) { FPRINTF((stderr,"wxt : close window %d\n",number)); if (strlen(wxt_title)) { /* NOTE : this assumes that the title is encoded in the locale charset. * This is probably a good assumption, but it is not guaranteed ! * May be improved by using gnuplot encoding setting. */ title << wxString(wxt_title, wxConvLocal); } else title.Printf(wxT("Gnuplot (window id : %d)"), window->id); window->frame->SetTitle(title); } wxt_MutexGuiLeave(); wxt_sigint_check(); wxt_sigint_restore(); } /* update the size of the plot area, resizes the whole window consequently */ void wxt_update_size(int number) { wxt_window_t *window; if (wxt_status != STATUS_OK) return; wxt_sigint_init(); wxt_MutexGuiEnter(); if ((window = wxt_findwindowbyid(number))) { FPRINTF((stderr,"wxt : update size of window %d\n",number)); window->frame->SetClientSize( wxSize(wxt_width, wxt_height) ); } wxt_MutexGuiLeave(); wxt_sigint_check(); wxt_sigint_restore(); } /* -------------------------------------------------------- * Cairo stuff * --------------------------------------------------------*/ void wxtPanel::wxt_cairo_create_context() { cairo_surface_t *fake_surface; if ( plot.cr ) cairo_destroy(plot.cr); if ( wxt_cairo_create_platform_context() ) { /* we are not able to create a true cairo context, * but will create a fake one to give proper initialisation */ FPRINTF((stderr,"creating temporary fake surface\n")); fake_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 1, 1); plot.cr = cairo_create( fake_surface ); cairo_surface_destroy( fake_surface ); /* this flag will make the program retry later */ plot.success = FALSE; } else { plot.success = TRUE; } /* set the transformation matrix of the context, and other details */ gp_cairo_initialize_context(&plot); } void wxtPanel::wxt_cairo_free_context() { if (plot.cr) cairo_destroy(plot.cr); if (plot.success) wxt_cairo_free_platform_context(); } #ifdef GTK_SURFACE /* create a cairo context, where the plot will be drawn on * If there is an error, return 1, otherwise return 0 */ int wxtPanel::wxt_cairo_create_platform_context() { cairo_surface_t *surface; wxClientDC dc(this); FPRINTF((stderr,"wxt_cairo_create_context\n")); /* free gdkpixmap */ wxt_cairo_free_platform_context(); /* GetWindow is a wxGTK specific wxDC method that returns * the GdkWindow on which painting should be done */ if ( !GDK_IS_DRAWABLE(dc.GetWindow()) ) return 1; gdkpixmap = gdk_pixmap_new(dc.GetWindow(), plot.device_xmax, plot.device_ymax, -1); if ( !GDK_IS_DRAWABLE(gdkpixmap) ) return 1; plot.cr = gdk_cairo_create(gdkpixmap); return 0; } void wxtPanel::wxt_cairo_free_platform_context() { if (gdkpixmap) g_object_unref(gdkpixmap); } #elif defined(__WXMSW__) /* create a cairo context, where the plot will be drawn on * If there is an error, return 1, otherwise return 0 */ int wxtPanel::wxt_cairo_create_platform_context() { cairo_surface_t *surface; wxClientDC dc(this); FPRINTF((stderr,"wxt_cairo_create_context\n")); /* free hdc and hbm */ wxt_cairo_free_platform_context(); /* GetHDC is a wxMSW specific wxDC method that returns * the HDC on which painting should be done */ /* Create a compatible DC. */ hdc = CreateCompatibleDC( (HDC) dc.GetHDC() ); if (!hdc) return 1; /* Create a bitmap big enough for our client rectangle. */ hbm = CreateCompatibleBitmap((HDC) dc.GetHDC(), plot.device_xmax, plot.device_ymax); if ( !hbm ) return 1; /* Select the bitmap into the off-screen DC. */ SelectObject(hdc, hbm); surface = cairo_win32_surface_create( hdc ); plot.cr = cairo_create(surface); cairo_surface_destroy( surface ); return 0; } void wxtPanel::wxt_cairo_free_platform_context() { if (hdc) DeleteDC(hdc); if (hbm) DeleteObject(hbm); } #else /* generic image surface */ /* create a cairo context, where the plot will be drawn on * If there is an error, return 1, otherwise return 0 */ int wxtPanel::wxt_cairo_create_platform_context() { int width, height; cairo_surface_t *surface; FPRINTF((stderr,"wxt_cairo_create_context\n")); if (data32) delete[] data32; width = plot.device_xmax; height = plot.device_ymax; if (width<1||height<1) return 1; data32 = new unsigned int[width*height]; surface = cairo_image_surface_create_for_data((unsigned char*) data32, CAIRO_FORMAT_ARGB32, width, height, 4*width); plot.cr = cairo_create(surface); cairo_surface_destroy( surface ); return 0; } /* create a wxBitmap (to be painted to the screen) from the buffered cairo surface. */ void wxtPanel::wxt_cairo_create_bitmap() { int width, height; unsigned char *data24; wxImage *image; if (!data32) return; width = plot.device_xmax; height = plot.device_ymax; data24 = new unsigned char[3*width*height]; /* data32 is the cairo image buffer, upper bits are alpha, then r, g and b * Depends on endianess ! * It is converted to RGBRGB... in data24 */ for(int i=0;i<width*height;++i) { *(data24+3*i)=*(data32+i)>>16; *(data24+3*i+1)=*(data32+i)>>8; *(data24+3*i+2)=*(data32+i); } /* create a wxImage from data24 */ image = new wxImage(width, height, data24, true); if (cairo_bitmap) delete cairo_bitmap; /* create a wxBitmap from the wxImage. */ cairo_bitmap = new wxBitmap( *image ); /* free memory */ delete image; delete[] data24; } void wxtPanel::wxt_cairo_free_platform_context() { if (data32) delete[] data32; if (cairo_bitmap) delete cairo_bitmap; } #endif /* IMAGE_SURFACE */ /* -------------------------------------------------------- * events handling * --------------------------------------------------------*/ /* Debugging events and _waitforinput adds a lot of lines of output * (~4 lines for an input character, and a few lines for each mouse move) * To debug it, define DEBUG and WXTDEBUGINPUT */ #ifdef WXTDEBUGINPUT # define FPRINTF2(a) FPRINTF(a) #else # define FPRINTF2(a) #endif #ifdef USE_MOUSE /* process one event, returns true if it ends the pause */ bool wxt_process_one_event(struct gp_event_t *event) { FPRINTF2((stderr,"Processing event\n")); do_event( event ); FPRINTF2((stderr,"Event processed\n")); if (event->type == GE_buttonrelease && (paused_for_mouse & PAUSE_CLICK)) { int button = event->par1; if (button == 1 && (paused_for_mouse & PAUSE_BUTTON1)) paused_for_mouse = 0; if (button == 2 && (paused_for_mouse & PAUSE_BUTTON2)) paused_for_mouse = 0; if (button == 3 && (paused_for_mouse & PAUSE_BUTTON3)) paused_for_mouse = 0; if (paused_for_mouse == 0) return true; } if (event->type == GE_keypress && (paused_for_mouse & PAUSE_KEYSTROKE)) { /* Ignore NULL keycode */ if (event->par1 > '\0') { paused_for_mouse = 0; return true; } } return false; } /* Similar to gp_exec_event(), * put the event sent by the terminal in a list, * to be processed by the main thread. * returns true if the event has really been processed. */ bool wxt_exec_event(int type, int mx, int my, int par1, int par2, wxWindowID id) { struct gp_event_t event; /* Allow a distinction between keys attached to "bind" or "bind all" */ if ( id != wxt_window_number ) { if (type == GE_motion) { /* Update mouse coordinates locally and echo back to originating window */ wxt_update_mousecoords_in_window(id, mx, my); return true; } if (type == GE_keypress) type = GE_keypress_old; if (type == GE_buttonpress) type = GE_buttonpress_old; if (type == GE_buttonrelease) type = GE_buttonrelease_old; else /* Other special cases? */ return false; } event.type = type; event.mx = mx; event.my = my; event.par1 = par1; event.par2 = par2; event.winid = id; #if defined(WXT_MONOTHREADED) || defined(_Windows) wxt_process_one_event(&event); return true; #else if (!wxt_handling_persist) { if (wxt_sendevent_fd<0) { FPRINTF((stderr,"not sending event, wxt_sendevent_fd error\n")); return false; } if (write(wxt_sendevent_fd, (char*) &event, sizeof(event))<0) { wxt_sendevent_fd = -1; fprintf(stderr,"not sending event, write error on wxt_sendevent_fd\n"); return false; } } else { wxt_process_one_event(&event); } return true; #endif /* ! _Windows */ } #ifdef WXT_MULTITHREADED /* Implements waitforinput used in wxt.trm * Returns the next input charachter, meanwhile treats terminal events */ int wxt_waitforinput() { /* wxt_waitforinput *is* launched immediately after the wxWidgets terminal * is set using 'set term wxt' whereas wxt_init has not been called. * So we must ensure that the library has been initialized * before using any wxwidgets functions. * When we just come back from SIGINT, * we must process window events, so the check is not * wxt_status != STATUS_OK */ if (wxt_status == STATUS_UNINITIALIZED) return getc(stdin); if (wxt_event_fd<0) { if (paused_for_mouse) int_error(NO_CARET, "wxt communication error, wxt_event_fd<0"); FPRINTF((stderr,"wxt communication error, wxt_event_fd<0\n")); return getc(stdin); } int stdin_fd = fileno(stdin); fd_set read_fds; do { FD_ZERO(&read_fds); FD_SET(wxt_event_fd, &read_fds); if (!paused_for_mouse) FD_SET(stdin_fd, &read_fds); int n_changed_fds = select(wxt_event_fd+1, &read_fds, NULL /* not watching for write-ready */, NULL /* not watching for exceptions */, NULL /* no timeout */); if (n_changed_fds<0) { if (paused_for_mouse) int_error(NO_CARET, "wxt communication error: select() error"); FPRINTF((stderr, "wxt communication error: select() error\n")); break; } if (FD_ISSET(wxt_event_fd, &read_fds)) { /* terminal event coming */ struct gp_event_t wxt_event; int n_bytes_read = read(wxt_event_fd, (void*) &wxt_event, sizeof(wxt_event)); if (n_bytes_read < (int)sizeof(wxt_event)) { if (paused_for_mouse) int_error(NO_CARET, "wxt communication error, not enough bytes read"); FPRINTF((stderr, "wxt communication error, not enough bytes read\n")); break; } if (wxt_process_one_event(&wxt_event)) { /* exit from paused_for_mouse */ return '\0'; } } } while ( paused_for_mouse || (!paused_for_mouse && !FD_ISSET(stdin_fd, &read_fds)) ); return getchar(); } #else /* WXT_MONOTHREADED */ /* Implements waitforinput used in wxt.trm * the terminal events are directly processed when they are received */ int wxt_waitforinput() { #ifdef _Windows if (paused_for_mouse) { MSG msg; BOOL ret; while ((ret = GetMessage(&msg, NULL, 0, 0)) != 0) { if (ret == -1) break; TranslateMessage(&msg); DispatchMessage(&msg); if (!paused_for_mouse) break; } return '\0'; } else return getch(); #else /* !_Windows */ /* Generic hybrid GUI & console message loop */ static int yield = 0; if(yield) return '\0'; while(wxTheApp) { yield = 1; wxTheApp->Yield(); yield = 0; struct timeval tv; fd_set read_fd; tv.tv_sec = 0; tv.tv_usec = 10000; FD_ZERO(&read_fd); FD_SET(0, &read_fd); if(select(1, &read_fd, NULL, NULL, &tv) != -1 && FD_ISSET(0, &read_fd)) break; } return getchar(); #endif } #endif /* WXT_MONOTHREADED || WXT_MULTITHREADED */ #endif /*USE_MOUSE*/ /* -------------------------------------------------------- * 'persist' option handling * --------------------------------------------------------*/ /* returns true if at least one plot window is opened. * Used to handle 'persist' */ TBOOLEAN wxt_window_opened(void) { std::vector<wxt_window_t>::iterator wxt_iter; /*declare the iterator*/ wxt_MutexGuiEnter(); for (wxt_iter = wxt_window_list.begin(); wxt_iter != wxt_window_list.end(); wxt_iter++) { if (wxt_iter->frame->IsShown()) { wxt_MutexGuiLeave(); return TRUE; } } wxt_MutexGuiLeave(); return FALSE; } /* Called when gnuplot exits. * Handle the 'persist' setting, ie will continue * to handle events and will return when * all the plot windows are closed. */ void wxt_atexit() { int i; int openwindows = 0; int persist_setting; if (wxt_status == STATUS_UNINITIALIZED) return; #ifdef WXT_MULTITHREADED /* send a message to exit the main loop */ /* protect the following from interrupt */ wxt_sigint_init(); wxCommandEvent event(wxExitLoopEvent); wxt_MutexGuiEnter(); dynamic_cast<wxtApp*>(wxTheApp)->SendEvent( event ); wxt_MutexGuiLeave(); /* handle eventual interrupt, and restore original sigint handler */ wxt_sigint_check(); wxt_sigint_restore(); FPRINTF((stderr,"gui thread status %d %d %d\n", thread->IsDetached(), thread->IsAlive(), thread->IsRunning() )); /* wait for the gui thread to exit */ thread->Wait(); delete thread; #endif /* WXT_MULTITHREADED */ /* first look for command_line setting */ if (wxt_persist==UNSET && persist_cl) wxt_persist = TRUE; wxConfigBase *pConfig = wxConfigBase::Get(); /* then look for persistent configuration setting */ if (wxt_persist==UNSET) { if (pConfig->Read(wxT("persist"),&persist_setting)) wxt_persist = persist_setting?yes:no; } /* and let's go ! */ if (wxt_persist==UNSET|| wxt_persist==no) { FPRINTF((stderr,"wxt_atexit: no \"persist\" setting, exit\n")); wxt_cleanup(); return; } /* if the user hits ctrl-c and quits again, really quit */ wxt_persist = no; FPRINTF((stderr,"wxt_atexit: handling \"persist\" setting\n")); #ifdef _Windows if (!persist_cl) { interactive = TRUE; while (!com_line()); } #else /*_Windows*/ /* process events directly */ wxt_handling_persist = true; /* if fork() is available, use it so that the initial gnuplot process * exits and the child process continues in the background. */ /* NB: * If there are no plot windows open, then once the parent process * exits the child can receive no input and will become a zombie. * So destroy any closed window first, and only fork if some remain open. */ /* declare the iterator */ std::vector<wxt_window_t>::iterator wxt_iter; for(wxt_iter = wxt_window_list.begin(), i=0; wxt_iter != wxt_window_list.end(); wxt_iter++, i++) { TBOOLEAN state = wxt_iter->frame->IsShown(); FPRINTF((stderr,"\tChecking window %d : %s shown\n", i, state?"":"not ")); if (state) openwindows++; else wxt_iter->frame->Destroy(); } # ifdef HAVE_WORKING_FORK /* fork */ pid_t pid; if (openwindows > 0) pid = fork(); else pid = -1; /* the parent just exits, the child keeps going */ if (!pid) { FPRINTF((stderr,"child process: running\n")); # endif /* HAVE_WORKING_FORK */ FPRINTF((stderr,"child process: restarting its event loop\n")); /* Some programs executing gnuplot -persist may wait for all default * handles to be closed before they consider the sub-process finished. * Using freopen() ensures that debug fprintf()s won't crash. */ freopen("/dev/null","w",stdout); freopen("/dev/null","w",stderr); /* (re)start gui loop */ wxTheApp->OnRun(); FPRINTF((stderr,"child process: event loop exited\n")); # ifdef HAVE_WORKING_FORK } else { FPRINTF((stderr,"parent process: exiting, child process "\ "has PID %d\n", pid)); } # endif /* HAVE_WORKING_FORK */ #endif /* !_Windows */ /* cleanup and quit */ wxt_cleanup(); } /* destroy everything related to wxWidgets */ void wxt_cleanup() { std::vector<wxt_window_t>::iterator wxt_iter; /*declare the iterator*/ if (wxt_status == STATUS_UNINITIALIZED) return; FPRINTF((stderr,"wxt_cleanup: start\n")); /* prevent wxt_reset (for example) from doing anything bad after that */ wxt_status = STATUS_UNINITIALIZED; /* protect the following from interrupt */ wxt_sigint_init(); /* Close all open terminal windows */ for(wxt_iter = wxt_window_list.begin(); wxt_iter != wxt_window_list.end(); wxt_iter++) wxt_iter->frame->Destroy(); wxTheApp->OnExit(); wxUninitialize(); /* handle eventual interrupt, and restore original sigint handler */ wxt_sigint_check(); wxt_sigint_restore(); FPRINTF((stderr,"wxt_cleanup: finished\n")); } /* ------------------------------------- * GUI Mutex helper functions for porting * ----------------------------------------*/ void wxt_MutexGuiEnter() { FPRINTF2((stderr,"locking gui mutex\n")); #ifdef WXT_MULTITHREADED if (!wxt_handling_persist) wxMutexGuiEnter(); #endif /* WXT_MULTITHREADED */ } void wxt_MutexGuiLeave() { FPRINTF2((stderr,"unlocking gui mutex\n")); #ifdef WXT_MULTITHREADED if (!wxt_handling_persist) wxMutexGuiLeave(); #endif /* WXT_MULTITHREADED */ } /* --------------------------------------------------- * SIGINT handling : as the terminal is multithreaded, it needs several mutexes. * To avoid inconsistencies and deadlock when the user hits ctrl-c, * each critical set of instructions (implying mutexes for example) should be written : * wxt_sigint_init(); * < critical instructions > * wxt_sigint_check(); * wxt_sigint_restore(); * Or, if the critical instructions are in a loop, wxt_sigint_check() should be * called regularly in the loop. * ---------------------------------------------------*/ /* our custom SIGINT handler, that just sets a flag */ void wxt_sigint_handler(int WXUNUSED(sig)) { FPRINTF((stderr,"custom interrupt handler called\n")); signal(SIGINT, wxt_sigint_handler); /* If this happens, it's bad. We already flagged that we want */ /* to quit but nobody acted on it. This can happen if the */ /* connection to the X-server is lost, which can be forced by */ /* using xkill on the display window. See bug #991. */ if (wxt_status == STATUS_INTERRUPT_ON_NEXT_CHECK) { fprintf(stderr,"wxt display server shutting down - no response\n"); exit(-1); } /* routines must check regularly for wxt_status, * and abort cleanly on STATUS_INTERRUPT_ON_NEXT_CHECK */ wxt_status = STATUS_INTERRUPT_ON_NEXT_CHECK; if (wxt_current_plot) wxt_current_plot->interrupt = TRUE; } /* To be called when the function has finished cleaning after facing STATUS_INTERRUPT_ON_NEXT_CHECK */ /* Provided for flexibility, but use wxt_sigint_check instead directly */ void wxt_sigint_return() { FPRINTF((stderr,"calling original interrupt handler\n")); wxt_status = STATUS_INTERRUPT; wxt_sigint_counter = 0; /* call the original sigint handler */ /* this will not return !! */ (*original_siginthandler)(SIGINT); } /* A critical function should call this from a safe zone (no locked mutex, objects destroyed). * If the interrupt is asked, this fonction will not return (longjmp) */ void wxt_sigint_check() { FPRINTF2((stderr,"checking interrupt status\n")); if (wxt_status == STATUS_INTERRUPT_ON_NEXT_CHECK) wxt_sigint_return(); } /* initialize our custom SIGINT handler */ /* this uses a usage counter, so that it can be encapsulated without problem */ void wxt_sigint_init() { /* put our custom sigint handler, store the original one */ if (wxt_sigint_counter == 0) original_siginthandler = signal(SIGINT, wxt_sigint_handler); ++wxt_sigint_counter; FPRINTF2((stderr,"initialize custom interrupt handler %d\n",wxt_sigint_counter)); } /* restore the original SIGINT handler */ void wxt_sigint_restore() { if (wxt_sigint_counter==1) signal(SIGINT, original_siginthandler); --wxt_sigint_counter; FPRINTF2((stderr,"restore custom interrupt handler %d\n",wxt_sigint_counter)); if (wxt_sigint_counter<0) fprintf(stderr,"sigint counter < 0 : error !\n"); } ��������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/wxterminal/Makefile.am������������������������������������������������������������0000644�0004711�0000144�00000000441�11752300770�015147� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign # here are listed all the wxterminal files that go to the distribution EXTRA_DIST = gp_cairo.c gp_cairo.h wxt_gui.cpp wxt_gui.h \ gp_cairo_helpers.c gp_cairo_helpers.h wxt_term.h bitmaps �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/graphics.h������������������������������������������������������������������������0000644�0004711�0000144�00000011610�11677127136�012703� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: graphics.h,v 1.52.2.1 2011/12/29 06:36:05 sfeam Exp $ */ /* GNUPLOT - graphics.h */ /*[ * Copyright 1999, 2004 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_GRAPHICS_H # define GNUPLOT_GRAPHICS_H #include "syscfg.h" #include "gp_types.h" #include "gadgets.h" #include "term_api.h" /* types defined for 2D plotting */ typedef struct curve_points { struct curve_points *next; /* pointer to next plot in linked list */ int token; /* last token used, for second parsing pass */ enum PLOT_TYPE plot_type; /* DATA2D? DATA3D? FUNC2D FUNC3D? NODATA? */ enum PLOT_STYLE plot_style; /* style set by "with" or by default */ char *title; /* plot title, a.k.a. key entry */ TBOOLEAN title_no_enhanced; /* don't typeset title in enhanced mode */ TBOOLEAN title_is_filename; /* TRUE if title was auto-generated from filename */ TBOOLEAN title_is_suppressed;/* TRUE if 'notitle' was specified */ TBOOLEAN noautoscale; /* ignore data from this plot during autoscaling */ struct lp_style_type lp_properties; struct arrow_style_type arrow_properties; struct fill_style_type fill_properties; struct text_label *labels; /* Only used if plot_style == LABELPOINTS */ struct t_image image_properties; /* only used if plot_style is IMAGE or RGB_IMAGE */ /* 2D and 3D plot structure fields overlay only to this point */ filledcurves_opts filledcurves_options; int ellipseaxes_units; /* Only used if plot_style == ELLIPSES */ struct histogram_style *histogram; /* Only used if plot_style == HISTOGRAM */ int histogram_sequence; /* Ordering of this dataset within the histogram */ enum PLOT_SMOOTH plot_smooth; /* which "smooth" method to be used? */ int boxplot_factors; /* Only used if plot_style == BOXPLOT */ int *boxplot_factor_order; /* Only used if plot_style == BOXPLOT */ int p_max; /* how many points are allocated */ int p_count; /* count of points in points */ int x_axis; /* FIRST_X_AXIS or SECOND_X_AXIS */ int y_axis; /* FIRST_Y_AXIS or SECOND_Y_AXIS */ int z_axis; /* same as either x_axis or y_axis, for 5-column plot types */ double *varcolor; /* Only used if plot has variable color */ struct coordinate GPHUGE *points; } curve_points; /* externally visible variables of graphics.h */ /* 'set offset' status variables */ extern t_position loff, roff, toff, boff; /* 'set bar' status */ extern double bar_size; extern int bar_layer; /* function prototypes */ void do_plot __PROTO((struct curve_points *, int)); int label_width __PROTO((const char *, int *)); void map_position __PROTO((struct position * pos, int *x, int *y, const char *what)); void map_position_r __PROTO((struct position* pos, double* x, double* y, const char* what)); #if defined(sun386) double CheckLog __PROTO((TBOOLEAN, double, double)); #endif void apply_head_properties __PROTO((struct arrow_style_type *arrow_properties)); void init_histogram __PROTO((struct histogram_style *hist, char *title)); void free_histlist __PROTO((struct histogram_style *hist)); void plot_image_or_update_axes __PROTO((void *plot, TBOOLEAN update_axes)); #ifdef EAM_OBJECTS void place_objects __PROTO((struct object *listhead, int layer, int dimensions)); void do_ellipse __PROTO((int dimensions, t_ellipse *e, int style, TBOOLEAN do_own_mapping )); void do_polygon __PROTO((int dimensions, t_polygon *p, int style )); #else #define place_objects(listhead,layer,dimensions) /* void() */ #endif int filter_boxplot __PROTO((struct curve_points *)); #endif /* GNUPLOT_GRAPHICS_H */ ������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/eval.h����������������������������������������������������������������������������0000644�0004711�0000144�00000015067�11632050113�012021� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: eval.h,v 1.39 2011/09/08 05:19:07 sfeam Exp $ */ /* GNUPLOT - eval.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_EVAL_H # define GNUPLOT_EVAL_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "gp_types.h" #include <stdio.h> /* for FILE* */ #define STACK_DEPTH 250 /* maximum size of the execution stack */ #define MAX_AT_LEN 150 /* max number of entries in action table */ /* Type definitions */ /* HBB 20010725: Moved here, from parse.h */ enum operators { /* keep this in line with table in eval.c */ PUSH, PUSHC, PUSHD1, PUSHD2, PUSHD, POP, CALL, CALLN, SUM, LNOT, BNOT, UMINUS, LOR, LAND, BOR, XOR, BAND, EQ, NE, GT, LT, GE, LE, PLUS, MINUS, MULT, DIV, MOD, POWER, FACTORIAL, BOOLE, DOLLARS, CONCATENATE, EQS, NES, RANGE, ASSIGN, /* only jump operators go between jump and sf_start, for is_jump() */ JUMP, JUMPZ, JUMPNZ, JTERN, SF_START, /* functions specific to using spec */ COLUMN, STRINGCOLUMN }; #define is_jump(operator) \ ((operator) >=(int)JUMP && (operator) <(int)SF_START) /* user-defined function table entry */ typedef struct udft_entry { struct udft_entry *next_udf; /* pointer to next udf in linked list */ char *udf_name; /* name of this function entry */ struct at_type *at; /* pointer to action table to execute */ char *definition; /* definition of function as typed */ int dummy_num; /* required number of input variables */ t_value dummy_values[MAX_NUM_VAR]; /* current value of dummy variables */ } udft_entry; /* user-defined variable table entry */ typedef struct udvt_entry { struct udvt_entry *next_udv; /* pointer to next value in linked list */ char *udv_name; /* name of this value entry */ TBOOLEAN udv_undef; /* true if not defined yet */ t_value udv_value; /* value it has */ } udvt_entry; /* p-code argument */ typedef union argument { int j_arg; /* offset for jump */ struct value v_arg; /* constant value */ struct udvt_entry *udv_arg; /* pointer to dummy variable */ struct udft_entry *udf_arg; /* pointer to udf to execute */ } argument; /* This type definition has to come after union argument has been declared. */ typedef void (*FUNC_PTR) __PROTO((union argument *arg)); /* standard/internal function table entry */ typedef struct ft_entry { const char *f_name; /* pointer to name of this function */ FUNC_PTR func; /* address of function to call */ } ft_entry; /* action table entry */ struct at_entry { enum operators index; /* index of p-code function */ union argument arg; }; struct at_type { /* count of entries in .actions[] */ int a_count; /* will usually be less than MAX_AT_LEN is malloc()'d copy */ struct at_entry actions[MAX_AT_LEN]; }; /* Variables of eval.c needed by other modules: */ extern const struct ft_entry GPFAR ft[]; /* The table of builtin functions */ extern struct udft_entry *first_udf; /* user-def'd functions */ extern struct udvt_entry *first_udv; /* user-def'd variables */ extern struct udvt_entry udv_pi; /* 'pi' variable */ extern struct udvt_entry *udv_NaN; /* 'NaN' variable */ extern TBOOLEAN undefined; /* Prototypes of functions exported by eval.c */ double gp_exp __PROTO((double x)); /* HBB 20010726: Moved these here, from util.h. */ double real __PROTO((struct value *)); double imag __PROTO((struct value *)); double magnitude __PROTO((struct value *)); double angle __PROTO((struct value *)); struct value * Gcomplex __PROTO((struct value *, double, double)); struct value * Ginteger __PROTO((struct value *, int)); struct value * Gstring __PROTO((struct value *, char *)); struct value * pop_or_convert_from_string __PROTO((struct value *)); struct value * gpfree_string __PROTO((struct value *a)); void reset_stack __PROTO((void)); void check_stack __PROTO((void)); TBOOLEAN more_on_stack __PROTO((void)); struct value *pop __PROTO((struct value *x)); void push __PROTO((struct value *x)); void int_check __PROTO((struct value * v)); void f_bool __PROTO((union argument *x)); void f_jump __PROTO((union argument *x)); void f_jumpz __PROTO((union argument *x)); void f_jumpnz __PROTO((union argument *x)); void f_jtern __PROTO((union argument *x)); void execute_at __PROTO((struct at_type *at_ptr)); void evaluate_at __PROTO((struct at_type *at_ptr, struct value *val_ptr)); void free_at __PROTO((struct at_type *at_ptr)); struct udvt_entry * add_udv_by_name __PROTO((char *key)); struct udvt_entry * get_udv_by_name __PROTO((char *key)); void del_udv_by_name __PROTO(( char *key, TBOOLEAN isWildcard )); /* update GPVAL_ variables available to user */ void update_gpval_variables __PROTO((int from_plot_command)); /* note: the routines below work for any variable name, not just those beginning GPVAL_ */ void fill_gpval_string __PROTO((char *var, const char *value)); void fill_gpval_integer __PROTO((char *var, int value)); void fill_gpval_float __PROTO((char *var, double value)); void fill_gpval_complex __PROTO((char *var, double areal, double aimag)); /* C-callable versions of internal gnuplot functions word() and words() */ char * gp_word __PROTO((char *string, int i)); int gp_words __PROTO((char *string)); #endif /* GNUPLOT_EVAL_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/gp_types.h������������������������������������������������������������������������0000644�0004711�0000144�00000014546�11552220476�012741� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: gp_types.h,v 1.50 2011/04/16 04:55:26 sfeam Exp $ */ /* GNUPLOT - gp_types.h */ /*[ * Copyright 2000, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_GPTYPES_H #define GNUPLOT_GPTYPES_H #include "syscfg.h" #define MAX_ID_LEN 50 /* max length of an identifier */ #define MAX_LINE_LEN 1024 /* maximum number of chars allowed on line */ #define DEG2RAD (M_PI / 180.0) /* type_udv() will return 0 rather than type if udv does not exist */ enum DATA_TYPES { INTGR=1, CMPLX , STRING }; enum MODE_PLOT_TYPE { MODE_QUERY, MODE_PLOT, MODE_SPLOT }; enum PLOT_TYPE { FUNC, DATA, FUNC3D, DATA3D, NODATA }; /* we explicitly assign values to the types, such that we can * perform bit tests to see if the style involves points and/or lines * bit 0 (val 1) = line, bit 1 (val 2) = point, bit 2 (val 4)= error * This allows rapid decisions about the sample drawn into the key, * for example. */ /* HBB 20010610: new enum, to make mnemonic names for these flags * accessible everywhere */ typedef enum e_PLOT_STYLE_FLAGS { PLOT_STYLE_HAS_LINE = (1<<0), PLOT_STYLE_HAS_POINT = (1<<1), PLOT_STYLE_HAS_ERRORBAR = (1<<2), PLOT_STYLE_HAS_FILL = (1<<3), PLOT_STYLE_BITS = (1<<4) } PLOT_STYLE_FLAGS; typedef enum PLOT_STYLE { LINES = 0*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE, POINTSTYLE = 1*PLOT_STYLE_BITS + PLOT_STYLE_HAS_POINT, IMPULSES = 2*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE, LINESPOINTS = 3*PLOT_STYLE_BITS + (PLOT_STYLE_HAS_POINT | PLOT_STYLE_HAS_LINE), DOTS = 4*PLOT_STYLE_BITS + 0, XERRORBARS = 5*PLOT_STYLE_BITS + (PLOT_STYLE_HAS_POINT | PLOT_STYLE_HAS_ERRORBAR), YERRORBARS = 6*PLOT_STYLE_BITS + (PLOT_STYLE_HAS_POINT | PLOT_STYLE_HAS_ERRORBAR), XYERRORBARS = 7*PLOT_STYLE_BITS + (PLOT_STYLE_HAS_POINT | PLOT_STYLE_HAS_ERRORBAR), BOXXYERROR = 8*PLOT_STYLE_BITS + (PLOT_STYLE_HAS_LINE | PLOT_STYLE_HAS_FILL), BOXES = 9*PLOT_STYLE_BITS + (PLOT_STYLE_HAS_LINE | PLOT_STYLE_HAS_FILL), BOXERROR = 10*PLOT_STYLE_BITS + (PLOT_STYLE_HAS_LINE | PLOT_STYLE_HAS_FILL), 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, VECTOR = 14*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE, CANDLESTICKS = 15*PLOT_STYLE_BITS + (PLOT_STYLE_HAS_ERRORBAR | PLOT_STYLE_HAS_FILL), FINANCEBARS = 16*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE, XERRORLINES = 17*PLOT_STYLE_BITS + (PLOT_STYLE_HAS_LINE | PLOT_STYLE_HAS_POINT | PLOT_STYLE_HAS_ERRORBAR), YERRORLINES = 18*PLOT_STYLE_BITS + (PLOT_STYLE_HAS_LINE | PLOT_STYLE_HAS_POINT | PLOT_STYLE_HAS_ERRORBAR), XYERRORLINES = 19*PLOT_STYLE_BITS + (PLOT_STYLE_HAS_LINE | PLOT_STYLE_HAS_POINT | PLOT_STYLE_HAS_ERRORBAR) , FILLEDCURVES = 21*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE + PLOT_STYLE_HAS_FILL , PM3DSURFACE = 22*PLOT_STYLE_BITS + 0 , LABELPOINTS = 23*PLOT_STYLE_BITS + 0 , HISTOGRAMS = 24*PLOT_STYLE_BITS + PLOT_STYLE_HAS_FILL , IMAGE = 25*PLOT_STYLE_BITS + 0 , RGBIMAGE = 26*PLOT_STYLE_BITS + 0 , RGBA_IMAGE = 27*PLOT_STYLE_BITS + 0 , CIRCLES = 28*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE + PLOT_STYLE_HAS_FILL , BOXPLOT = 29*PLOT_STYLE_BITS + PLOT_STYLE_HAS_FILL + PLOT_STYLE_HAS_POINT , ELLIPSES = 30*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE + PLOT_STYLE_HAS_FILL } PLOT_STYLE; typedef enum PLOT_SMOOTH { SMOOTH_NONE, SMOOTH_ACSPLINES, SMOOTH_BEZIER, SMOOTH_CSPLINES, SMOOTH_SBEZIER, SMOOTH_UNIQUE, SMOOTH_FREQUENCY, SMOOTH_CUMULATIVE, SMOOTH_KDENSITY, SMOOTH_CUMULATIVE_NORMALISED } PLOT_SMOOTH; /* FIXME HBB 20000521: 'struct value' and its part, 'cmplx', should go * into one of scanner/internal/standard/util .h, but I've yet to * decide which of them */ struct cmplx { double real, imag; }; typedef struct value { enum DATA_TYPES type; union { int int_val; struct cmplx cmplx_val; char *string_val; } v; } t_value; /* Defines the type of a coordinate */ /* INRANGE and OUTRANGE points have an x,y point associated with them */ typedef enum coord_type { INRANGE, /* inside plot boundary */ OUTRANGE, /* outside plot boundary, but defined */ UNDEFINED /* not defined at all */ } coord_type; /* These fields of 'struct coordinate' used for storing the color of 3D data * points (if requested by NEED_PALETTE(this_plot), for instance). */ #define CRD_COLOR ylow #define CRD_R yhigh #define CRD_G xlow #define CRD_B xhigh #define CRD_A ylow /* The field of 'struct coordinate' used for storing the point size in plot * style POINTSTYLE with variable point size */ #define CRD_PTSIZE xlow typedef struct coordinate { enum coord_type type; /* see above */ coordval x, y, z; coordval ylow, yhigh; /* ignored in 3d */ coordval xlow, xhigh; /* also ignored in 3d */ } coordinate; #endif /* GNUPLOT_GPTYPES_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/plot2d.h��������������������������������������������������������������������������0000644�0004711�0000144�00000004400�10766303077�012304� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: plot2d.h,v 1.14 2008/03/13 19:53:35 sfeam Exp $ */ /* GNUPLOT - plot2d.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_PLOT2D_H # define GNUPLOT_PLOT2D_H #include "syscfg.h" /* Variables of plot2d.c needed by other modules: */ extern struct curve_points *first_plot; extern double boxwidth; extern TBOOLEAN boxwidth_is_absolute; /* prototypes from plot2d.c */ void plotrequest __PROTO((void)); void refresh_bounds __PROTO((struct curve_points *first_plot, int nplots)); /* internal and external variables */ void cp_free __PROTO((struct curve_points *cp)); void cp_extend __PROTO((struct curve_points *cp, int num)); #include "gp_types.h" #include "gadgets.h" void store_label __PROTO((struct text_label *, struct coordinate *, int i, char * string, double colorval)); #endif /* GNUPLOT_PLOT2D_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/������������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340021�011410� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/gnupmdrv.ipf������������������������������������������������������������������0000644�0004711�0000144�00000037720�07051057462�014004� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������:userdoc. :docprof toc=12. :h1 res=5. This program :p.This program is a display interface for Gnuplot. :p.When it starts up, it spawns a new session which contains the :hp2.GNUPLOT:ehp2. program. This new session provides the usual Gnuplot command line. :h1 res=100. Options Menu Help :i1 id=mopt. Options menu :i2 refid=mopt. The options menu :p.The :hp2.Options:ehp2. menu enables you to change various options on the displayed plot, and to control printing of the plot via the OS/2 print system. :h2 res=104. Fonts :i2 refid=mopt. Fonts :p.The :hp2.Fonts:ehp2. menu item from the :hp2.Options:ehp2. pulldown menu enables you to change the font used in the displayed plot. :p.You can also 'drag and drop' a font from a Font Palette onto the Gnushell window. :h2 res=101. Print :i2 refid=mopt. Print :p.The :hp2.Print:ehp2. menu item from the :hp2.Options:ehp2. pulldown menu enables you to print the current window on the default printer. :h2 res=115. Printers :i2 refid=mopt. Printers :p.The :hp2.Printers:ehp2. menu item from the :hp2.Options:ehp2. pulldown menu enables you to select the printer to which output is directed. :h2 res=207. Linetype option :i2 refid=mopt. Linetype option :p.Selecting the :hp2.Lines:ehp2. menu item from the :hp2.Options:ehp2. enables you to choose various options for the lines used for the plots. :p.Selecting the :hp2.Thick:ehp2. option of the :hp2.Lines:ehp2. menu item toggles the :hp2.thick line:ehp2. option on and off. The selection is active if the menu item is checked. :p.Selecting the :hp2.Solid:ehp2. option of the :hp2.Lines:ehp2. menu item toggles the :hp2.solid line:ehp2. option on and off. The selection is active if the menu item is checked. :p.If the :hp2.Solid:ehp2. option is not active, curves on graphs will be plotted in various styles of broken lines. :h2 res=208. Thick line option :i2 refid=mopt. Thick line option :p.Selecting the :hp2.Thick:ehp2. option of the :hp2.Lines:ehp2. menu item toggles the :hp2.thick line:ehp2. option on and off. The selection is active if the menu item is checked. :p.The thick line option can give better output on high-resolution devices like laser printers. :h2 res=209. Solid lines option :i2 refid=mopt. Solid lines option :p.Selecting the :hp2.Solid:ehp2. option of the :hp2.Lines:ehp2. menu item toggles the :hp2.solid line:ehp2. option on and off. The selection is active if the menu item is checked. :p.If the :hp2.Solid:ehp2. option is not active, curves on graphs will be plotted in various styles of broken lines. :p.This option can be combined with the :hp2.Colours.:ehp2. option. When a plot is printed on a printer that does not support colour, the :hp2.Solid:ehp2. option is disabled. :h2 res=206. Colours :i2 refid=mopt. Colours :p.Selecting the :hp2.Colours:ehp2. menu item from the :hp2.Options:ehp2. pulldown menu causes lines used for graphs to be plotted in various colours. This is the default option for plotting on the screen. It can be combined with the :hp2.Lines:ehp2. option. :h2 res=120. Pause option :i2 refid=mopt. Pause option :p.Selecting the :hp2.Pause mode:ehp2. menu item from the :hp2.Options:ehp2. menu enables you to choose how the Gnuplot 'pause' command is handled. :p.Selecting the :hp2.Dialog box:ehp2. menu item from the :hp2.Pause options:ehp2. menu causes the Gnuplot 'pause' command to print a message in a dialog box, and wait for you to end the dialog before continuing. :h2 res=121. Pause with dialog box :i2 refid=mopt. Pause with dialog box :p.Selecting the :hp2.Dialog box:ehp2. menu item from the :hp2.Pause options:ehp2. menu causes the Gnuplot 'pause' command to print a message in a dialog box, and wait for you to end the dialog before continuing. :p.Selecting the :hp2.Menu bar:ehp2. menu item from the :hp2.Pause options:ehp2. menu causes the Gnuplot 'pause' command to enable the :hp2.Continue:ehp2. menu item. :p.Selecting the :hp2.Gnuplot:ehp2. menu item from the :hp2.Pause options:ehp2. menu causes the Gnuplot 'pause' command to be handled by the Gnuplot program. :h2 res=122. Pause with menu item :i2 refid=mopt. Pause with menu item :p.Selecting the :hp2.Menu bar:ehp2. menu item from the :hp2.Pause options:ehp2. menu causes the Gnuplot 'pause' command to enable the :hp2.Continue:ehp2. menu item. :p.Plotting will be resumed when this item is selected. :p.Any text message is ignored. :h2 res=123. Pause in Gnuplot :i2 refid=mopt. Pause in Gnuplot :p.Selecting the :hp2.Gnuplot:ehp2. menu item from the :hp2.Pause options:ehp2. menu causes the Gnuplot 'pause' command to be handled by the Gnuplot program. :p.In order to resume plotting, you will have to select the Gnuplot command line window, and press the enter key. :h2 res=210. Pop to front :i2 refid=mopt. Pop to front :p.Selecting the :hp2.Pop to front:ehp2. menu item from the :hp2.Options:ehp2. pulldown menu causes the plot window to pop to the front of the window stack each time a graph is plotted. If this item is unchecked, the user will have to bring the window to the front by manual selection. :h2 res=211. Keep aspect ratio :i2 refid=mopt. Keep aspect ratio :p.If this menu is checked, then the sides of the plot keep the aspect ratio of 1.56 thus filling only partially the plotting window. If it is unchecked, then the plot occupies the whole window. :h2 res=105. Save settings :i2 refid=mopt. gnupmdrv.ini :i2 refid=mopt. Save settings :p.Selecting the :hp2.Save settings:ehp2. menu item from the :hp2.Options:ehp2. pulldown menu causes the current line, colour and font options to be saved. The positions and sizes of the windows are also saved. :p.The data is saved in the file :hp2.gnupmdrv.ini:ehp2. file in the program&csq.s working directory. You can delete the file if you want to restore all settings to their default values. (This file is created even if no settings are saved.) :h1 res=500. Edit Menu Help :i1 id=medit. Edit menu :i2 refid=medit. The Edit menu :p.The :hp2.Edit:ehp2. menu gives you access to commands for copying the plot to the clipboard. :h2 res=501. Copy to clipboard :i2 refid=medit. Copy to clipboard :p.Selecting the :hp2.Copy:ehp2. menu item from the :hp2.Edit:ehp2. pulldown menu causes the current plot to be copied to the system clipboard. The plot is copied in bitmap and in metafile format. :h2 res=504. Clear clipboard :i2 refid=medit. Clear clipboard :p.Selecting the :hp2.Clear clipboard:ehp2. menu item from the :hp2.Edit:ehp2.pulldown menu causes the clipboard to be cleared. :h1 res=300. Gnuplot Menu Help :i1 id=mgnu. Gnuplot menu :i2 refid=mgnu. Moving to GNUPLOT window :p.Selecting the :hp2.Gnuplot:ehp2. menu item causes the GNUPLOT command window to be brought to the foreground. The same result can be be obtained by pressing the ESC key when the Gnushell window is active. :h1 res=600. Mouse Menu Help :i1 id=mmouse. Mouse menu :i2 refid=mmouse. The Mouse menu :p.The :hp2.Mouse:ehp2. menu gives you access to mouse (pointer)-related functions. Recently the mouse code has been rearranged so that many hotkeys and other actions are configurable in gnuplot itself; see 'help mouse' and 'help bind'. Help on current mouse configuration is available via hotkey 'h'. Consequently, the behaviour of the submenu items may be changed according to gnuplot or user settings. Menu items showing two hotkeys: the first one is user-configurable (so it may not corresponding to the actual settings), the other is fixed (has precedence over user settings). :p.Note that the new mouse style adds formats 'format', 'clipboardformat' and 'mouseformat' which are not well cared about in the menu; I mean that menu items 'Coordinates' and 'Coords. format' are out of date now (no more pixels, for instance). You are welcome to update this if you have time. :h2 res=601. Use mouse :i2 refid=mmouse. Use mouse :p.Checking this menu item enables the mouse (pointer device) functionality: tracing the position over graph, zooming, annotating graph etc. for 2d graphs and for maps (i.e. `set view` with z-rotation 0,90,180,270 or 360 degrees). Mousing is not available in multiplot mode. Except for the functions available from the menu, mouse buttons have the following functions: :p.:hp2.MB2:ehp2. starts zooming. Press :hp2.MB1:ehp2. to force zoom, or :hp2.Esc:ehp2. to cancel zooming. Zooming can be canceled if <Esc> is pressed or at least one of the chosen sizes is smaller than 8 pixels. This driver keeps the list of zoomed ranges. You can browse through it via :hp2.Unzoom all:ehp2., :hp2.Unzoom back:ehp2. and :hp2.Zoom next:ehp2.. :p.:hp2.Double click of MB1:ehp2. writes the current pointer position to clipbord according to the format chosen in :hp2.sprintf format:ehp2. menu. :p.:hp2.MB3:ehp2. annotates temporarily the graph. :h2 res=602. Mouse coordinates :i2 refid=mmouse. Coordinates :p.Choose the coordinates which are used for showing the mouse position, clipboard copy and annotation. :p.:hp2.Real coordinates:ehp2. are coordinates of x and y axes of the current graph. :p.:hp2.Screen coordinates:ehp2. are relative coordinates of the screen, i.e. [0,0]..[1,1]. These may be used in gnuplot commands like :hp2.set label "ahoj" at screen 0.85,0.85:ehp2. :p.:hp2.Pixel coordinates:ehp2. are the coordinates of the window depending on the screen resolution. They determine the precision of the other coordinates. :p.:hp2.x time / date:ehp2. coordinate is useful when the coordinate on the x axis is time or date. :h2 res=605. By mouse... :i2 refid=mmouse. By mouse: zoom :p.Well, subitems of this do nothing just remember you which mouse button combinations to use for putting the current position to the clipboard, for zooming or temporarily annotating the graph. :h2 res=603. Coordinates format :i2 refid=mmouse. Coordinates format :p.Choose here the format for writing the cursor position into clipboard (via double click of MB1). :h2 res=606. Unzoom and zoom history :i2 refid=mmouse. Unzoom and zoom :p.These choises lets you browse through the list of zooms. :h2 res=607. Ruler :i2 refid=mmouse. Ruler :p.Disables the ruler if it is already on. :p.If the ruler has been off, then show it at the current pointer position. For every mouse movement, print the ruler position aside of the current pointer position, and show their distance (for linear scale) or ratio (for log scale), and optionally the :link reftype=hd res=604.polar distance:elink.. :h2 res=604. Polar distance :i2 refid=mmouse. Polar distance :p.If this menu item is checked, then the distance between the ruler and mouse cursor is printed also in polar coordinates. This is particularly useful for dealing with peaks or other objects in maps. Disabled if x or y axis is logarithmic. :h1 res=700. Utilities Menu Help :i1 id=mutils. Utilities menu :i2 refid=mutils. The Utilities menu :p.The :hp2.Utilities:ehp2. menu gives you access to miscellaneous functions, mostly those which communicate with gnuplot. :h2 res=701. Break drawing :i2 refid=mutils. Break drawing :p.This menu item, or the hotkey Ctrl-C, lets you break long unwanted drawing immediately. :h2 res=702. Grid on/off :i2 refid=mutils. Grid on/off :p.Switches quickly on or off grid of the graph. Equivalent to the commands :p.:hp2.set mxtics 2; set mytics 2; set grid; replot:ehp2. :p.or :p.:hp2.set nogrid; replot:ehp2. :p.respectively, typed in the gnuplot window. :h2 res=703. Lin/log y axis :i2 refid=mutils. Lin/log y axis :p.Switches quickly between linear and logarithmic y axis. Equivalent to commands :hp2.set log y; replot:ehp2. or :hp2.set nolog y; replot:ehp2., respectively. :h2 res=704. Set :i2 refid=mutils. Set :p.Switches miscellaneous :hp2.set:ehp2. properties. For example, :hp2.set data style dots; replot:ehp2.. :h2 res=710. Autoscale :i2 refid=mutils. Autoscale :p.Switches autoscale of x and y axes. Equivalent to :p.:hp2.set autoscale; replot:ehp2. :h2 res=711. Replot :i2 refid=mutils. Replot :p.Replots the graph by sending the :hp2.replot:ehp2. command. :h2 res=712. Reload :i2 refid=mutils. Reload :p.Reloads a file, i.e it issues :hp2.history !load:ehp2. :h2 res=715. Command :i2 refid=mutils. Command :p.This enables you to send any command to gnuplot from within this display driver. This is particularly useful when the gnuplot command line is not available (an application sends commands and data to gnuplot via pipe, for instance). :h2 res=716. Commands to clipboard :i2 refid=mutils. Commands to clipboard :p.If this option is switched on, then all commands sent to gnuplot will be copied into clipboard. This can be useful for tracing the executed commands from mouse/hotkey actions, or for displaying x and y ranges during zoom, for instance. You may use your favourite clipboard viewer to look at the clipboard contents. :h1 res=400. Continue Menu Help :i1 id=mcont. Continue menu :i2 refid=mcont. Continue plotting :p.Selecting the :hp2.Continue:ehp2. menu item causes plotting to resume after a pause command is received from Gnuplot. :h1 res=103. Help Menu Help :i1 id=mabout. Help menu :p.gnupmdrv help or gnuplot documentation can be accessed from this menu. :h2 res=197. Help index :p.Use :hp2.Help index:ehp2. to browse through the help for this display driver. :h2 res=198. Gnuplot docs :p.Use :hp2.Gnuplot docs:ehp2. to read the gnuplot documentation. :h2 res=199. About :i2 refid=mabout. About :p.The :hp2.About:ehp2. menu item displays the About box, which just identifies the program. :h1 res=5000. Printer setup dialog box help :i1 id=qprint. Printing :i2 refid=qprint. Printer setup :p.This dialog box enables you to setup the printer. :p.The printer that output will be sent to is indicated in the :hp2.Current printer:ehp2. field. You can select a different printer by using the :hp2.Printers:ehp2. item of the :hp2.Options:ehp2. menu. :p.The setup can be selected by clicking on the :hp2.OK:ehp2. button. :p.The setup can be cancelled by selecting :hp2.Cancel:ehp2. . :p.If your printer driver supports printing to a file, the :hp2.Print to file named:ehp2. field will not be greyed out. In this case, you may enter a filename here for sending output to a file rather than to a printer. Some printer drivers also support this option from the printer setup dialog box accessible with the :hp2.Set printer:ehp2. option. You may choose either method. Some printer drivers (e.g. Postscript) will not overwrite a file if you use the second method. :p.The area of the page in which the plot will be displayed is indicated. You can change this by selecting the :hp2.Set Page:ehp2. button. You can then adjust the area with the mouse, and click on button 1 to select the new area. Another way of doing this is by typing the appropriate data into the entry windows which give the size of the plot area, either in centimeters or relative to the page size. :p.If you wish to adjust the default behaviour of the printer, choose the :hp2.Job properties:ehp2. option. This will bring up your printer setup dialog box. This is part of the printer driver, and the features you can adjust will depend on your printer. You can generally use this to swich between landscape and portrait mode, for instance. Note that some drivers might not have any options. :h1 res=2000. Printer selection dialog box help :i2 refid=qprint. Printer selection :p.This dialog box enables you to select the printer on which your output will appear. :p.Choose a printer from the displayed list. The chosen printer is highlighted. :p.The printer is selected by clicking on the :hp2.OK:ehp2. button. :p.The new selection is ignored by selecting :hp2.Cancel:ehp2. . :h1 res=3000. Pause dialog box help :i1 id=pausebox. Pause :p.This dialog box is (optionally) displayed when a 'pause -1 <text>' command is issued to Gnuplot. Plotting is paused until you: :p.Select :hp2.Continue:ehp2. to resume plotting. :p.Select :hp2.Cancel:ehp2. to cancel plotting and return to the Gnuplot command line. :h1 res=6000. Fonts dialog box help :i1 id=fonts. Font selection :p.This dialog box enables you to change the font used on the displayed plot. :p.The font is selected by clicking on the :hp2.OK:ehp2. button. :p.The new selection is ignored by selecting :hp2.Cancel:ehp2. . :p.Choose a font from the displayed list. The chosen font is previwed in the :hp2.Example:ehp2. window. :euserdoc. ������������������������������������������������gnuplot-4.6.4/src/os2/gnupmdrv.c��������������������������������������������������������������������0000644�0004711�0000144�00000021366�10272106476�013446� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifdef INCRCSDATA static char RCSid[]="$Id: gnupmdrv.c,v 1.6 2005/07/28 07:46:06 mikulik Exp $" ; #endif /**************************************************************************** PROGRAM: gnupmdrv Outboard PM driver for GNUPLOT 3.x MODULE: gnupmdrv.c This file contains the startup procedures for gnupmdrv ****************************************************************************/ /* PM driver for GNUPLOT */ /*[ * Copyright 1992, 1993, 1998, 2004 Roger Fearick * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHOR * * Gnuplot driver for OS/2: Roger Fearick */ #define INCL_PM #define INCL_WIN #define INCL_SPL #define INCL_SPLDOSPRINT #define INCL_DOSMEMMGR #define INCL_DOSPROCESS #define INCL_DOSFILEMGR #include <os2.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include "config.h" #include "gnupmdrv.h" /*==== g l o b a l d a t a ================================================*/ char szIPCName[256] ; char szIniFile[256] ; #define IPCDEFAULT "gnuplot" int bServer=0 ; int bPersist=0 ; int bWideLines=0 ; #ifdef PM_KEEP_OLD_ENHANCED_TEXT int bEnhanced=0 ; #endif /*==== l o c a l d a t a ==================================================*/ /* class names for window registration */ static char szTitle[256] = "Gnuplot" ; /*==== f u n c t i o n s =====================================================*/ BOOL QueryIni( HAB ) ; int main( int, char** ) ; static HWND InitHelp( HAB, HWND ) ; /*==== c o d e ===============================================================*/ int main ( int argc, char **argv ) /* ** args: argv[1] : name to be used for IPC (pipes/semaphores) with gnuplot ** ** Standard PM initialisation: ** -- set up message processing loop ** -- register all window classes ** -- start up main window ** -- subclass main window for help and dde message trapping to frame window ** -- init help system ** -- check command line and open any filename found there ** */ { static ULONG flFrameFlags = (FCF_ACCELTABLE|FCF_STANDARD);//&(~FCF_TASKLIST) ; static ULONG flClientFlags = WS_VISIBLE ; HMQ hmq ; QMSG qmsg ; PFNWP pfnOldFrameWndProc ; HWND hwndHelp ; BOOL bPos ; /* (am, 19981001) * A subtile problem is fixed here: * upon the first initialization of this driver (i.e. we're here in main()) * it may inherit handles of files opened (temporarily) by gnuplot itself! * We close them here. */ _fcloseall(); if( argc <= 1 ) strcpy( szIPCName, IPCDEFAULT ) ; else { int i ; strcpy( szIPCName, argv[1] ) ; for ( i=2; i<argc; i++ ) { while( *argv[i] != '\0' ) { if( *argv[i] == '-' ) { ++argv[i] ; switch( *argv[i] ) { case 's' : bServer = 1 ; break ; #ifdef PM_KEEP_OLD_ENHANCED_TEXT case 'e' : bEnhanced = 1 ; break ; #endif case 'p' : bPersist = 1 ; break ; case 'w' : bWideLines = 1 ; break ; } } else if ( *argv[i] == '"' ) { char *p = szTitle ; argv[i]++ ; while( *argv[i] != '"' ) { *p++ = *argv[i]++ ; } *p = '\0' ; } argv[i]++ ; } } } { char *p ; /* get path from argv[0] to track down program files */ strcpy( szIniFile, argv[0] ) ; while( (p=strchr(szIniFile,'/'))!=NULL ) *p = '\\' ; p = strrchr(szIniFile,'\\') ; if(p==NULL) p = strrchr(szIniFile,':') ; if(p==NULL) p = szIniFile ; else ++p ; strcpy(p,GNUINI); } hab = WinInitialize( 0 ) ; hmq = WinCreateMsgQueue( hab, 50 ) ; // get defaults from gnupmdrv.ini bPos = QueryIni( hab ) ; // register window and child window classes if( ! WinRegisterClass( hab, /* Exit if can't register */ APP_NAME, (PFNWP)DisplayClientWndProc, CS_SIZEREDRAW, 0 ) ) return 0L ; // create main window hwndFrame = WinCreateStdWindow ( HWND_DESKTOP, 0,//WS_VISIBLE, &flFrameFlags, APP_NAME, NULL, flClientFlags, 0L, 1, &hApp) ; if ( ! hwndFrame ) return 0 ; // subclass window for help & DDE trapping pfnOldFrameWndProc = WinSubclassWindow( hwndFrame, (PFNWP)NewFrameWndProc ) ; WinSetWindowULong( hwndFrame, QWL_USER, (ULONG) pfnOldFrameWndProc ) ; // init the help manager hwndHelp = InitHelp( hab, hwndFrame ) ; // set window title and make it active { char text[256] = APP_NAME; strcat( text, " [" ) ; strcat( text, szTitle ) ; strcat( text, "]" ) ; WinSetWindowText( hwndFrame, text ) ; } // process window messages while (WinGetMsg (hab, &qmsg, NULLHANDLE, 0, 0)) WinDispatchMsg (hab, &qmsg) ; // shut down WinDestroyHelpInstance( hwndHelp ) ; WinDestroyWindow (hwndFrame) ; WinDestroyMsgQueue (hmq) ; WinTerminate (hab) ; return 0 ; } static HWND InitHelp( HAB hab, HWND hwnd ) /* ** initialise the help system */ { static HELPINIT helpinit = { sizeof(HELPINIT), 0L, NULL, (PHELPTABLE)MAKELONG(1, 0xFFFF), 0L, 0L, 0, 0, "GnuplotPM Help", CMIC_HIDE_PANEL_ID, "gnupmdrv.hlp" } ; HWND hwndHelp ; /* should be bigger or dynamic */ static char helppath[256] ; char *p; _execname(helppath, sizeof(helppath)); _fnslashify(helppath); p=strrchr(helppath, '/'); if (p) *p='\0'; strcat( helppath, "/" ) ; strcat( helppath, helpinit.pszHelpLibraryName ) ; helpinit.pszHelpLibraryName = helppath ; hwndHelp = WinCreateHelpInstance( hab, &helpinit ) ; WinAssociateHelpInstance( hwndHelp, hwnd ) ; return hwndHelp ; } MRESULT EXPENTRY NewFrameWndProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) /* ** Subclasses top-level frame window to trap help & dde messages */ { PFNWP pfnOldFrameWndProc ; pfnOldFrameWndProc = (PFNWP) WinQueryWindowULong( hwnd, QWL_USER ) ; switch( msg ) { default: break ; case HM_QUERY_KEYS_HELP: return (MRESULT) IDH_KEYS ; } return (*pfnOldFrameWndProc)(hwnd, msg, mp1, mp2) ; } MRESULT EXPENTRY About( HWND hDlg, ULONG message, MPARAM mp1, MPARAM mp2) /* ** 'About' box dialog function */ { return WinDefDlgProc( hDlg, message, mp1, mp2 ) ; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/dialogs.c���������������������������������������������������������������������0000644�0004711�0000144�00000042001�10166511656�013215� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifdef INCRCSDATA static char RCSid[]="$Id: dialogs.c,v 1.7 2005/01/04 13:01:34 mikulik Exp $" ; #endif /**************************************************************************** PROGRAM: gnupmdrv Outboard PM driver for GNUPLOT 3.x MODULE: dialogs.c Dialog procedures for gnupmdrv ****************************************************************************/ /* PM driver for GNUPLOT */ /*[ * Copyright 1992, 1993, 1998, 2004 Roger Fearick * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHOR * * Gnuplot driver for OS/2: Roger Fearick */ #define INCL_PM #define INCL_WIN #define INCL_DEV #define INCL_SPL #define INCL_SPLDOSPRINT #define INCL_WINDIALOGS #define INCL_WINBUTTONS #define INCL_WINSYS #define INCL_WINFRAMEMGR #define INCL_WINPOINTERS #define INCL_WINTRACKRECT #define INCL_WINENTRYFIELDS #define INCL_WINWINDOWMGR #include <os2.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "gnupmdrv.h" /* struct for printer capabilities */ static struct { long lTech ; // printer technology long lVer ; // driver version long lWidth ; // page width in pels long lHeight ; // page height in pels long lWChars ; // page width in chars long lHChars ; // page height in chars long lHorRes ; // horizontal resolution pels / metre long lVertRes ; // vertical resolution pels / metre } prCaps ; ULONG GetPrinters( PPRQINFO3* pprq, ULONG *pcTot ) ; MRESULT EXPENTRY QPrintDlgProc ( HWND hwnd, ULONG usMsg, MPARAM mp1, MPARAM mp2 ) /* ** Query print area and printer setup */ { static PQPRINT pqp = NULL ; static SWP swp ; static RECTL rectlDef ; TRACKINFO ti ; RECTL rectlBox ; HDC hdc ; ULONG ulStyle ; char *psz ; switch ( usMsg ) { case WM_INITDLG : pqp = (PQPRINT) PVOIDFROMMP( mp2 ) ; if( pqp->caps & QP_CAPS_FILE ) { ulStyle = WinQueryWindowULong( WinWindowFromID( hwnd, IDD_PRINTQNAME ), QWL_STYLE ) ; WinSetWindowULong( WinWindowFromID( hwnd, IDD_PRINTQNAME ), QWL_STYLE, ulStyle ^ DT_HALFTONE ) ; } else { WinSendMsg( WinWindowFromID( hwnd, IDD_QPRNAME ), EM_SETREADONLY, (MPARAM)TRUE, 0L ) ; } WinQueryWindowRect( WinWindowFromID( hwnd, IDD_QPRBOX ), &rectlDef ) ; case WM_USER_SET_DATA : psz = *pqp->piPrinter->pszComment ? pqp->piPrinter->pszComment : pqp->piPrinter->pszName ; WinSetDlgItemText( hwnd, IDD_PRINTNAME, psz ) ; WinSetDlgItemFloatF( hwnd, IDD_QPRXSIZE, 1, pqp->xsize ) ; WinSetDlgItemFloatF( hwnd, IDD_QPRYSIZE, 1, pqp->ysize ) ; WinSetDlgItemFloat( hwnd, IDD_QPRXFRAC, pqp->xfrac ) ; WinSetDlgItemFloat( hwnd, IDD_QPRYFRAC, pqp->yfrac ) ; WinQueryWindowPos( WinWindowFromID( hwnd, IDD_QPRBOX ), &swp ) ; { int y = rectlDef.yTop ; rectlBox = rectlDef ; if( pqp->xsize < pqp->ysize ) rectlBox.xRight = rectlDef.yTop * pqp->xsize/pqp->ysize ; else { int x = rectlDef.yTop * pqp->ysize/pqp->xsize ; rectlBox.yTop = x ; rectlBox.xRight = y ; } } WinSetWindowPos( WinWindowFromID( hwnd, IDD_QPRBOX ), NULLHANDLE, 0, 0, (short) rectlBox.xRight, (short)rectlBox.yTop, SWP_SIZE ) ; { double ratio = 1.560 ; double xs = rectlBox.xRight - rectlBox.xLeft ; double ys = rectlBox.yTop - rectlBox.yBottom ; if( ys > xs/ratio ) { /* reduce ys to fit */ rectlBox.yTop = rectlBox.yBottom + (int)(xs/ratio) ; } else if( ys < xs/ratio ) { /* reduce xs to fit */ rectlBox.xRight = rectlBox.xLeft + (int)(ys*ratio) ; } } rectlBox.xRight *= pqp->xfrac ; rectlBox.yTop *= pqp->yfrac ; WinSetWindowPos( WinWindowFromID( hwnd, IDD_QPRFRAME ), NULLHANDLE, swp.x, swp.y, //+(short)(swp.cy*(1.0-pqp->yfrac)), (short)rectlBox.xRight, (short)rectlBox.yTop, SWP_SIZE|SWP_MOVE ) ; break ; case WM_COMMAND : switch ( SHORT1FROMMP(mp1) ) { case DID_OK: WinQueryDlgItemFloat( hwnd, IDD_QPRXFRAC, &pqp->xfrac ) ; WinQueryDlgItemFloat( hwnd, IDD_QPRYFRAC, &pqp->yfrac ) ; if( pqp->caps & QP_CAPS_FILE ) { WinQueryDlgItemText( hwnd, IDD_QPRNAME, 32, pqp->szFilename ) ; } break ; case IDD_QPRSETPR: /* printer setup */ if( SetPrinterMode( hwnd, pqp ) == 1 ) { if( (hdc = OpenPrinterDC( WinQueryAnchorBlock( hwnd ), pqp, OD_INFO, NULL )) != DEV_ERROR ) { DevQueryCaps( hdc, CAPS_TECHNOLOGY, (long)sizeof(prCaps)/sizeof(long), (PLONG)&prCaps ) ; DevCloseDC( hdc ) ; pqp->xsize = (float)100.0* (float) prCaps.lWidth / (float) prCaps.lHorRes ; // in cm pqp->ysize = (float)100.0* (float) prCaps.lHeight / (float) prCaps.lVertRes ; // in cm WinSendMsg( hwnd, WM_USER_SET_DATA, 0L, 0L ) ; } } return 0L ; case IDD_QPRTRACK : /* track plot area */ WinQueryWindowRect( WinWindowFromID( hwnd, IDD_QPRBOX ), &rectlBox ) ; { double ratio = 1.560 ; double xs = rectlBox.xRight - rectlBox.xLeft ; double ys = rectlBox.yTop - rectlBox.yBottom ; if( ys > xs/ratio ) { /* reduce ys to fit */ rectlBox.yTop = rectlBox.yBottom + (int)(xs/ratio) ; } else if( ys < xs/ratio ) { /* reduce xs to fit */ rectlBox.xRight = rectlBox.xLeft + (int)(ys*ratio) ; } } ti.cxBorder = ti.cyBorder = 2 ; ti.cxGrid = ti.cyGrid = 0 ; ti.cxKeyboard = ti.cyKeyboard = 2 ; ti.ptlMinTrackSize.x = ti.ptlMinTrackSize.y = 2 ; ti.rclBoundary = rectlBox ; ti.ptlMaxTrackSize.x = rectlBox.xRight ; ti.ptlMaxTrackSize.y = rectlBox.yTop ; ti.rclTrack.xRight = pqp->xfrac * rectlBox.xRight ; ti.rclTrack.yTop = pqp->yfrac*rectlBox.yTop ; ti.rclTrack.xLeft = 0 ; ti.rclTrack.yBottom = 0 ;//(1.0-pqp->yfrac) * rectlBox.yTop ; ti.fs = TF_RIGHT|TF_TOP|TF_STANDARD|TF_SETPOINTERPOS|TF_ALLINBOUNDARY ; WinSetPointer( HWND_DESKTOP, WinQuerySysPointer( HWND_DESKTOP, SPTR_SIZENWSE, FALSE ) ) ; WinTrackRect( WinWindowFromID( hwnd, IDD_QPRBOX ), NULLHANDLE, &ti ) ; pqp->xfrac = (float)ti.rclTrack.xRight / (float)rectlBox.xRight ; pqp->yfrac = ((float)(ti.rclTrack.yTop-ti.rclTrack.yBottom) / (float)rectlBox.yTop) ; rectlBox.yTop = ti.rclTrack.yTop - ti.rclTrack.yBottom ; rectlBox.xRight = ti.rclTrack.xRight ; { double ratio = 1.560 ; double xs = rectlBox.xRight - rectlBox.xLeft ; double ys = rectlBox.yTop - rectlBox.yBottom ; if( ys > xs/ratio ) { /* reduce ys to fit */ rectlBox.yTop = rectlBox.yBottom + (int)(xs/ratio) ; } else if( ys < xs/ratio ) { /* reduce xs to fit */ rectlBox.xRight = rectlBox.xLeft + (int)(ys*ratio) ; } } WinSetWindowPos( WinWindowFromID( hwnd, IDD_QPRFRAME ), NULLHANDLE, swp.x, swp.y,//+(short)(swp.cy*(1.0-pqp->yfrac)), (short)rectlBox.xRight, (short)rectlBox.yTop, SWP_SIZE|SWP_MOVE ) ; WinSetDlgItemFloat( hwnd, IDD_QPRXFRAC, pqp->xfrac ) ; WinSetDlgItemFloat( hwnd, IDD_QPRYFRAC, pqp->yfrac ) ; return 0L ; default: break ; } default: break ; } /* fall through to the default control processing */ return WinDefDlgProc ( hwnd , usMsg , mp1 , mp2 ) ; } MRESULT EXPENTRY QPrintersDlgProc ( HWND hwnd, ULONG usMsg, MPARAM mp1, MPARAM mp2 ) /* ** Query printers and allow selection */ { static HWND hwndLB ; static PPRQINFO3 pprq=NULL ; static ULONG cPrinters ; static USHORT usItem ; static char *szPrinterName ; int i, iSelect ; char *psz ; switch ( usMsg ) { case WM_INITDLG : szPrinterName = (char*) PVOIDFROMMP( mp2 ) ; iSelect = 0 ; GetPrinters( &pprq, &cPrinters ) ; hwndLB = WinWindowFromID( hwnd, IDD_QPRSLIST ) ; for( i=0; i<cPrinters;i++ ) { psz = *pprq[i].pszComment ? pprq[i].pszComment : pprq[i].pszName ; WinSendMsg( hwndLB, LM_INSERTITEM, (MPARAM)LIT_END, MPFROMP(psz) ) ; if( strcmp( pprq[i].pszName, szPrinterName ) == 0 ) iSelect = i ; } WinSendMsg( hwndLB, LM_SELECTITEM, MPFROMSHORT( iSelect ), (MPARAM)TRUE ) ; break ; case WM_COMMAND : switch ( SHORT1FROMMP(mp1) ) { case DID_OK: strcpy( szPrinterName, pprq[usItem].pszName ) ; case DID_CANCEL: free( pprq ) ; pprq = NULL; break ; } break ; case WM_CONTROL: if( SHORT1FROMMP( mp1 ) == IDD_QPRSLIST ) { if( SHORT2FROMMP( mp1 ) == LN_SELECT ) { usItem = (ULONG)WinSendMsg( hwndLB, LM_QUERYSELECTION, 0L, 0L ) ; } } default: break ; } /* fall through to the default control processing */ return WinDefDlgProc ( hwnd , usMsg , mp1 , mp2 ) ; } ULONG GetPrinters( PPRQINFO3 *pprq, ULONG *pcTot ) /* ** get a list of printers */ { ULONG rc ; ULONG cQueues, cbData ; rc = SplEnumQueue( NULL, 3, NULL, 0, &cQueues, pcTot, &cbData, NULL ) ; if( *pprq != NULL ) { free( *pprq ) ; *pprq = NULL ; } if( *pcTot == 0 ) { /* no printers */ return 0 ; } *pprq = malloc( cbData ) ; rc = SplEnumQueue( NULL, 3, *pprq, cbData, &cQueues, pcTot, &cbData, NULL ) ; return *pcTot ; } MRESULT EXPENTRY PauseMsgDlgProc ( HWND hwnd, ULONG usMsg, MPARAM mp1, MPARAM mp2 ) /* ** Pause message dialog box proc */ { static PPAUSEDATA ppdata = NULL ; char *pszText ; switch ( usMsg ) { case WM_INITDLG : /* set the position so user can move out the way, and have it come back there next time */ ppdata = (PPAUSEDATA) PVOIDFROMMP( mp2 ) ; if( ppdata->pswp != NULL ) WinSetWindowPos( hwnd, HWND_TOP, ppdata->pswp->x, ppdata->pswp->y, 0, 0, SWP_MOVE ) ; pszText = ppdata->pszMessage ; while(*pszText==' ') ++pszText ; WinSetDlgItemText( hwnd, IDD_PAUSETEXT, pszText ) ; break ; case WM_COMMAND : switch ( SHORT1FROMMP(mp1) ) { case DID_OK: case DID_CANCEL: WinPostMsg( WinQueryWindow( hwnd, QW_OWNER ), WM_PAUSEEND, SHORT1FROMMP(mp1)==DID_OK?(MPARAM)1L:0L, 0L ) ; if( ppdata->pswp == NULL ) ppdata->pswp = (PSWP)malloc( sizeof(SWP) ) ; WinQueryWindowPos( hwnd, ppdata->pswp ) ; WinDismissDlg( hwnd, 0 ) ; break ; case IDM_PRINT: WinPostMsg( WinQueryWindow( hwnd, QW_OWNER ), WM_COMMAND, MPFROMSHORT(IDM_PRINT), 0L ) ; return 0 ; default: break ; } default: break ; } /* fall through to the default control processing */ return WinDefDlgProc ( hwnd , usMsg , mp1 , mp2 ) ; } void WinSetDlgItemFloatF( HWND hwnd, USHORT usID, int nDec, float flValue ) /* */ { char achBuffer [ 34 ]; // default string field size ... char fmt[32] ; sprintf( fmt, "%%12.%df", nDec ) ; sprintf( achBuffer, fmt, flValue ) ; WinSetDlgItemText( hwnd, usID, achBuffer ) ; } void WinSetDlgItemFloat( HWND hwnd, USHORT usID, float flValue ) /* */ { char achBuffer [ 34 ] ; // default string field size ... char fmt[10] ; sprintf( fmt, "%%12.%df", 4 ) ; sprintf( achBuffer, fmt, flValue ) ; WinSetDlgItemText( hwnd, usID, achBuffer ) ; WinSetDlgItemText( hwnd, usID, achBuffer ) ; } void WinQueryDlgItemFloat( HWND hwnd, USHORT usID, float *pflValue ) /* */ { char achBuffer [ 34 ] ; // default string field size ... WinQueryDlgItemText( hwnd, usID, 34, achBuffer ) ; *pflValue = (float) atof( achBuffer ) ; } MRESULT EXPENTRY SendCommandDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) /* ** Dialog for sending a command to gnuplot ** //PM Petr Mikulik, 17. 8. 1999 */ { #define TEXT_LENGTH 80 static char buf[TEXT_LENGTH+1]; extern void gp_execute (char *s); switch (msg) { case WM_INITDLG: WinSendDlgItemMsg( hwnd, IDM_DO_SENDCOMMAND, EM_SETTEXTLIMIT, MPFROMSHORT (TEXT_LENGTH), 0L ); WinSetDlgItemText( hwnd, IDM_DO_SENDCOMMAND, buf ); WinSendDlgItemMsg( hwnd, IDM_DO_SENDCOMMAND, EM_SETSEL, MPFROM2SHORT (0, strlen(buf)), 0L ); return (MRESULT)FALSE; case WM_COMMAND: switch (COMMANDMSG (&msg)->cmd) { case DID_OK: WinQueryDlgItemText( hwnd, IDM_DO_SENDCOMMAND, sizeof(buf), buf ); WinDismissDlg( hwnd, TRUE ); gp_execute(buf); break; default: WinDismissDlg( hwnd, FALSE ); break; } return 0; } return ( WinDefDlgProc( hwnd, msg, mp1, mp2 ) ); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/scaling.ptr�������������������������������������������������������������������0000644�0004711�0000144�00000000440�07177626151�013604� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PT����� ��� ��� �@����������������������������������������������������������������������������������������� �� �� �� ���������� �����������������?�?�?��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/gnupmdrv.rc�������������������������������������������������������������������0000644�0004711�0000144�00000030322�11437176200�013614� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#define INCL_WINMENUS #include <os2.h> #include "dialogs.h" ICON 1 "gnuplot.ico" POINTER IDP_CROSSHAIR "ptrcross.ptr" POINTER IDP_SCALING "scaling.ptr" POINTER IDP_ROTATING "rotating.ptr" MENU 1 BEGIN SUBMENU "~Options" , IDM_FILE BEGIN MENUITEM "Prin~ters...", IDM_PRINTSETUP MENUITEM "~Print..." , IDM_PRINT MENUITEM "~Fonts...", IDM_FONTS MENUITEM "~Colours", IDM_COLOURS,,MIA_CHECKED SUBMENU "~Lines", IDM_LINES BEGIN MENUITEM "~Solid", IDM_LINES_SOLID,,MIA_CHECKED MENUITEM "~Thick", IDM_LINES_THICK END SUBMENU "Pa~use mode", IDM_PAUSEOPT BEGIN MENUITEM "~Dialog box", IDM_PAUSEDLG,,MIA_CHECKED MENUITEM "~Menu bar", IDM_PAUSEBTN MENUITEM "~Gnuplot", IDM_PAUSEGNU END MENUITEM "P~op to front", IDM_FRONT,,MIA_CHECKED MENUITEM "~Keep aspect ratio", IDM_KEEPRATIO,,MIA_CHECKED MENUITEM SEPARATOR MENUITEM "~Save settings", IDM_SAVE END SUBMENU "~Edit" , IDM_EDIT BEGIN MENUITEM "~Copy", IDM_COPY MENUITEM "Cl~ear clipboard", IDM_CLEARCLIP END SUBMENU "~Mouse" , IDM_MOUSE,,MIA_DISABLED BEGIN MENUITEM "~Use mouse\tm", IDM_USEMOUSE,,MIA_CHECKED MENUITEM "Mouse+key ~help\th", IDM_MOUSE_HELP /* SUBMENU "Coordinates", IDM_MOUSE_COORDINATES BEGIN MENUITEM "~real", IDM_MOUSE_COORDINATES_REAL,,MIA_CHECKED MENUITEM "~screen", IDM_MOUSE_COORDINATES_SCREEN MENUITEM "~pixels", IDM_MOUSE_COORDINATES_PIXELS MENUITEM SEPARATOR MENUITEM "x ~date", IDM_MOUSE_COORDINATES_XDATE MENUITEM "x ~time", IDM_MOUSE_COORDINATES_XTIME MENUITEM "x date+time", IDM_MOUSE_COORDINATES_XDATETIME END */ MENUITEM SEPARATOR SUBMENU "By mouse...", -1 BEGIN MENUITEM "Pos2clip\t2x MB1", -2,,MIA_DISABLED MENUITEM "Zoom\tMB2 - MB1",-3,,MIA_DISABLED MENUITEM "Annotate\tMB3", -4,,MIA_DISABLED END SUBMENU "Coords ~format", IDM_MOUSE_FORMAT BEGIN MENUITEM "x,y", IDM_MOUSE_FORMAT_XcY,,MIA_CHECKED MENUITEM "[x,y]", IDM_MOUSE_FORMAT_pXcYp MENUITEM "x y", IDM_MOUSE_FORMAT_X_Y MENUITEM SEPARATOR MENUITEM "timefmt", IDM_MOUSE_FORMAT_TIMEFMT MENUITEM "date", IDM_MOUSE_FORMAT_DATE MENUITEM "time", IDM_MOUSE_FORMAT_TIME MENUITEM "date / time", IDM_MOUSE_FORMAT_DATETIME /* MENUITEM SEPARATOR MENUITEM "x;y", IDM_MOUSE_FORMAT_XsY MENUITEM "x,y,", IDM_MOUSE_FORMAT_XcYc MENUITEM "x,y;", IDM_MOUSE_FORMAT_XcYs MENUITEM SEPARATOR MENUITEM "[x:y]", IDM_MOUSE_FORMAT_pXdYp MENUITEM "[x;y]", IDM_MOUSE_FORMAT_pXsYp MENUITEM SEPARATOR MENUITEM "set label...", IDM_MOUSE_FORMAT_LABEL */ END MENUITEM "Unzoom all\tu,F10", IDM_MOUSE_UNZOOMALL,,MIA_DISABLED MENUITEM "Unzoom back\tp,F11", IDM_MOUSE_UNZOOM,,MIA_DISABLED MENUITEM "Zoom next\tn,F12", IDM_MOUSE_ZOOMNEXT,,MIA_DISABLED MENUITEM SEPARATOR MENUITEM "~Ruler\tr", IDM_MOUSE_RULER MENUITEM "~Polar distance\t5", IDM_MOUSE_POLAR_DISTANCE,, END SUBMENU "~Utilities" , IDM_UTILS BEGIN MENUITEM "~Break drawing\tCtrl-C" , IDM_BREAK_DRAWING MENUITEM SEPARATOR MENUITEM "~grid on/off\tg", IDM_SET_GRID MENUITEM "~lin/log y\tl, L", IDM_SET_LINLOGY SUBMENU "~set",IDM_SET BEGIN SUBMENU "style ~data", IDM_SET_D_S BEGIN MENUITEM "~boxes", IDM_SET_D_S_BOXES MENUITEM "~dots", IDM_SET_D_S_DOTS MENUITEM "~fsteps", IDM_SET_D_S_FSTEPS MENUITEM "~histeps", IDM_SET_D_S_HISTEPS MENUITEM "~impulses", IDM_SET_D_S_IMPULSES MENUITEM "~lines", IDM_SET_D_S_LINES MENUITEM "li~nespoints", IDM_SET_D_S_LINESPOINTS MENUITEM "~points", IDM_SET_D_S_POINTS MENUITEM "~steps", IDM_SET_D_S_STEPS END SUBMENU "style ~function", IDM_SET_F_S BEGIN MENUITEM "~boxes", IDM_SET_F_S_BOXES MENUITEM "~dots", IDM_SET_F_S_DOTS MENUITEM "~fsteps", IDM_SET_F_S_FSTEPS MENUITEM "~histeps", IDM_SET_F_S_HISTEPS MENUITEM "~impulses", IDM_SET_F_S_IMPULSES MENUITEM "~lines", IDM_SET_F_S_LINES MENUITEM "li~nespoints", IDM_SET_F_S_LINESPOINTS MENUITEM "~points", IDM_SET_F_S_POINTS MENUITEM "~steps", IDM_SET_F_S_STEPS END END MENUITEM SEPARATOR MENUITEM "autoscale\ta,F3", IDM_SET_AUTOSCALE MENUITEM "replot\te,F4", IDM_DO_REPLOT MENUITEM "reload\tF5", IDM_DO_RELOAD MENUITEM SEPARATOR MENUITEM "~command...", IDM_DO_SENDCOMMAND // MENUITEM "cmds2clip", IDM_MOUSE_CMDS2CLIP,, END MENUITEM "~Gnuplot" , IDM_COMMAND MENUITEM "~Continue" , IDM_CONTINUE,,MIA_DISABLED SUBMENU "~Help", 1 BEGIN MENUITEM "~Help for Help...", IDM_HELPFORHELP MENUITEM "~Extended Help...", IDM_EXTENDEDHELP MENUITEM "~Keys Help...", IDM_KEYSHELP MENUITEM "Help ~index...", IDM_HELPINDEX MENUITEM SEPARATOR MENUITEM "~Gnuplot docs...", IDM_GPLOTINF MENUITEM SEPARATOR MENUITEM "A~bout...", IDM_ABOUT END END ACCELTABLE 1 BEGIN // VK_ESC, IDM_COMMAND, VIRTUALKEY VK_DELETE, IDM_CLEARCLIP, VIRTUALKEY VK_INSERT, IDM_COPY, VIRTUALKEY, CONTROL VK_F1, IDM_GPLOTINF, VIRTUALKEY "c", IDM_BREAK_DRAWING, CONTROL "C", IDM_BREAK_DRAWING, CONTROL "g", IDM_SET_GRID, CONTROL "G", IDM_SET_GRID, CONTROL "l", IDM_SET_LINLOGY, CONTROL "L", IDM_SET_LINLOGY, CONTROL "M", IDM_USEMOUSE, CONTROL "m", IDM_USEMOUSE, CONTROL "r", IDM_MOUSE_RULER, CONTROL "R", IDM_MOUSE_RULER, CONTROL "u", IDM_MOUSE_UNZOOMALL, CONTROL "U", IDM_MOUSE_UNZOOMALL, CONTROL "v", IDM_MOUSE_UNZOOM, CONTROL "V", IDM_MOUSE_UNZOOM, CONTROL VK_F3, IDM_SET_AUTOSCALE, VIRTUALKEY VK_F4, IDM_DO_REPLOT, VIRTUALKEY VK_F5, IDM_DO_RELOAD, VIRTUALKEY VK_F10, IDM_MOUSE_UNZOOMALL, VIRTUALKEY VK_F11, IDM_MOUSE_UNZOOM, VIRTUALKEY VK_F12, IDM_MOUSE_ZOOMNEXT, VIRTUALKEY END HELPSUBTABLE 1 BEGIN HELPSUBITEM IDH_EXTENDED, IDH_EXTENDED HELPSUBITEM IDM_PRINTSETUP ,IDM_PRINTSETUP HELPSUBITEM IDM_PRINT ,IDM_PRINT HELPSUBITEM IDM_FONTS ,IDM_FONTS HELPSUBITEM IDM_FILE ,IDM_FILE HELPSUBITEM IDM_ABOUT ,IDM_ABOUT HELPSUBITEM IDM_FRONT ,IDM_FRONT HELPSUBITEM IDM_COLOURS ,IDM_COLOURS HELPSUBITEM IDM_LINES ,IDM_LINES HELPSUBITEM IDM_LINES_THICK ,IDM_LINES_THICK HELPSUBITEM IDM_LINES_SOLID ,IDM_LINES_SOLID HELPSUBITEM IDM_SAVE ,IDM_SAVE HELPSUBITEM IDM_COMMAND ,IDM_COMMAND HELPSUBITEM IDM_CONTINUE,IDM_CONTINUE HELPSUBITEM IDM_PAUSEDLG,IDM_PAUSEDLG HELPSUBITEM IDM_PAUSEOPT,IDM_PAUSEOPT HELPSUBITEM IDM_PAUSEBTN,IDM_PAUSEBTN HELPSUBITEM IDM_PAUSEGNU,IDM_PAUSEGNU END HELPSUBTABLE ID_PRINT BEGIN HELPSUBITEM ID_PRINT, ID_PRINT END HELPSUBTABLE ID_QPRINT BEGIN HELPSUBITEM ID_QPRINT, ID_QPRINT END HELPSUBTABLE IDD_QUERYPRINT BEGIN HELPSUBITEM IDD_QUERYPRINT, IDD_QUERYPRINT END HELPSUBTABLE IDD_PAUSEBOX BEGIN HELPSUBITEM IDD_PAUSEBOX, IDD_PAUSEBOX END HELPTABLE 1 BEGIN HELPITEM 1, 1, IDH_EXTENDED HELPITEM ID_QPRINT, ID_QPRINT, ID_QPRINT HELPITEM ID_PRINT, ID_PRINT, ID_PRINT HELPITEM IDD_QUERYPRINT, IDD_QUERYPRINT, IDD_QUERYPRINT HELPITEM IDD_PAUSEBOX, IDD_PAUSEBOX, IDD_PAUSEBOX END DLGTEMPLATE ID_ABOUT LOADONCALL MOVEABLE DISCARDABLE BEGIN DIALOG "", ID_ABOUT, 22, 17, 144, 75, BEGIN CTEXT "GnuplotPM", -1, 8, 65, 128, 8 CTEXT "Gnuplot display for OS/2", -1, 8, 50, 128, 8 CTEXT "$Revision: 1.11 $", -1, 8, 35, 128, 8 DEFPUSHBUTTON "OK", DID_OK, 56, 10, 32, 14, WS_GROUP END END DLGTEMPLATE ID_QPRINT LOADONCALL MOVEABLE DISCARDABLE BEGIN DIALOG "GnuplotPM: printer setup", ID_QPRINT, 83, 7, 220, 175, FS_NOBYTEALIGN | WS_VISIBLE, FCF_TITLEBAR BEGIN DEFPUSHBUTTON "OK", DID_OK, 6, 5, 38, 13 PUSHBUTTON "Cancel", DID_CANCEL, 52, 5, 38, 13 PUSHBUTTON "Help", 310, 176, 5, 38, 13, BS_HELP GROUPBOX "Set plot area", -1, 2, 41, 214, 116 PUSHBUTTON "Adjust...", IDD_QPRTRACK, 7, 111, 56, 13 CONTROL "Text", IDD_QPRBOX, 84, 96, 98, 49, WC_STATIC, SS_FGNDRECT | WS_VISIBLE CONTROL "", IDD_QPRFRAME, 86, 98, 71, 34, WC_STATIC, SS_HALFTONERECT | WS_VISIBLE ENTRYFIELD "Text", IDD_QPRXSIZE, 83, 47, 36, 12, ES_RIGHT | NOT ES_AUTOSCROLL | ES_READONLY ENTRYFIELD "", IDD_QPRXFRAC, 168, 47, 39, 8, NOT ES_AUTOSCROLL | ES_MARGIN LTEXT "Vertical size:", -1, 8, 63, 66, 8, NOT WS_GROUP LTEXT "Horizontal size:", -1, 8, 47, 70, 8, NOT WS_GROUP ENTRYFIELD "Text", IDD_QPRYSIZE, 83, 63, 36, 12, ES_RIGHT | NOT ES_AUTOSCROLL | ES_READONLY ENTRYFIELD "", IDD_QPRYFRAC, 168, 63, 39, 8, NOT ES_AUTOSCROLL | ES_MARGIN LTEXT "Or enter fraction of indicated size:", -1, 9, 79, 143, 8, NOT WS_GROUP LTEXT "cm", -1, 125, 63, 13, 8, NOT WS_GROUP LTEXT "cm", -1, 125, 47, 13, 8 PUSHBUTTON "Job properties...", IDD_QPRSETPR, 98, 5, 72, 13 LTEXT "Print to file named:", IDD_PRINTQNAME, 8, 28, 80, 8, DT_HALFTONE ENTRYFIELD "", IDD_QPRNAME, 91, 28, 87, 8, NOT ES_AUTOSCROLL | ES_MARGIN LTEXT "Adjust using", -1, 8, 136, 72, 8 LTEXT "mouse...", -1, 8, 127, 37, 8 LTEXT "Current printer:", -1, 8, 161, 64, 8 ENTRYFIELD "", IDD_PRINTNAME, 74, 161, 139, 8, ES_MARGIN END END DLGTEMPLATE IDD_QUERYPRINT LOADONCALL MOVEABLE DISCARDABLE BEGIN DIALOG "GnuplotPM: printer selection", IDD_QUERYPRINT, 59, 44, 243, 99, FS_NOBYTEALIGN | WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR BEGIN LTEXT "Select printer:", IDD_QPTEXT, 4, 89, 65, 8 LISTBOX IDD_QPRSLIST, 5, 29, 232, 60 DEFPUSHBUTTON "OK", DID_OK, 5, 5, 38, 13, WS_GROUP PUSHBUTTON "Cancel", DID_CANCEL, 54, 5, 38, 13 PUSHBUTTON "Help", 310, 102, 5, 38, 13, BS_HELP END END DLGTEMPLATE IDD_PAUSEBOX LOADONCALL MOVEABLE DISCARDABLE BEGIN DIALOG "Gnuplot: pause", IDD_PAUSEBOX, 70, 30, 230, 33, WS_VISIBLE, FCF_TITLEBAR | FCF_MINBUTTON BEGIN DEFPUSHBUTTON "Continue", DID_OK, 2, 0, 40, 14 PUSHBUTTON "Cancel", DID_CANCEL, 54, 0, 40, 14 PUSHBUTTON "Help", 310, 106, 0, 40, 14, BS_HELP LTEXT "", IDD_PAUSETEXT, 4, 20, 223, 8 END END DLGTEMPLATE ID_PRINTSTOP LOADONCALL MOVEABLE DISCARDABLE BEGIN DIALOG "GnuplotPM printing...", ID_PRINTSTOP, 128, 74, 148, 22, WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR BEGIN PUSHBUTTON "Cancel current print job", DID_CANCEL, 7, 3, 132, 14 END END DLGTEMPLATE IDM_DO_SENDCOMMAND BEGIN DIALOG "Send a command to gnuplot", IDM_DO_SENDCOMMAND, 32, 32, 250, 56, , FCF_TITLEBAR | FCF_SYSMENU BEGIN CONTROL "~Command:", 0, 10, 32, 50, 8, WC_STATIC, WS_VISIBLE | SS_TEXT | DT_LEFT | DT_MNEMONIC CONTROL "", IDM_DO_SENDCOMMAND, 60, 32, 180, 8, WC_ENTRYFIELD, WS_VISIBLE | ES_AUTOSCROLL | ES_MARGIN | WS_TABSTOP | WS_GROUP DEFPUSHBUTTON "~OK", DID_OK, 10, 8, 38, 13, WS_TABSTOP | WS_GROUP CONTROL "~Cancel", DID_CANCEL, 60, 8, 38, 13, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP END END ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/gnupmdrv.h��������������������������������������������������������������������0000644�0004711�0000144�00000014352�10272106476�013450� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ** static char RCSid[]="$Id: gnupmdrv.h,v 1.8 2005/07/28 07:46:06 mikulik Exp $" ; */ /* PM driver for GNUPLOT */ /*[ * Copyright 1992, 1993, 1998, 2004 Roger Fearick * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHOR * * Gnuplot driver for OS/2: Roger Fearick */ #include "config.h" /* include resource defines */ #ifndef DISPDEFS_H /*#include "dispdefs.h"*/ #include "dialogs.h" #endif /*==== own window messages =================================================*/ #define WM_GNUPLOT (WM_USER+20) #define WM_PAUSEPLOT (WM_USER+21) #define WM_PAUSEEND (WM_USER+22) #define WM_GPSTART (WM_USER+23) #define WM_USER_SET_DATA (WM_USER+90) #define WM_USER_GET_DATA (WM_USER+91) #define WM_USER_CHGFONT (WM_USER+10) #define WM_USER_PRINT_BEGIN (WM_USER+200) #define WM_USER_PRINT_OK (WM_USER+201) #define WM_USER_PRINT_ERROR (WM_USER+202) #define WM_USER_DEV_ERROR (WM_USER+203) #define WM_USER_PRINT_QBUSY (WM_USER+204) #define WM_USER_PRINT_CANCEL (WM_USER+205) /*==== various names ========================================================*/ #define GNUPIPE "\\pipe\\gnuplot" /* named pipe to gnuplot */ #define GNUQUEUE "\\queues\\gnuplot" /* queue for gnuplot termination */ #define GNUSEM "\\sem32\\gnuplot.sem" /* synch gnuplot and gnupmdrv */ #define GNUINI "GNUPMDRV.INI" /* ini filename */ #define GNUEXEFILE "gnuplot.exe" /* exe file name */ #define GNUHELPFILE "gnuplot.gih" /* help file name */ #define GNUTERMINIT "GNUTERM=pm" /* terminal setup string */ #define INITIAL_FONT "14.Helvetica" /* initial font for plots */ #define APP_NAME "GnuplotPM" /* application name */ #define CHILD_NAME "GnupltChild" /* child window name */ /* profile (ini file) names */ #define INISHELLPOS "PosShell" #define INIPAUSEPOS "PosPause" #define INIPLOTPOS "PosPlot" #define INIFONT "DefFont" #define INIFRAC "PageFrac" #define INIPRDRIV "DrivData" #define INIPRPR "Printer" #define INIOPTS "DefOpts" #define INICHAR "Fontdata" #define INIKEEPRATIO "KeepRatio" /* PM */ #define INIUSEMOUSE "UseMouse" /* PM */ #define INIMOUSECOORD "MouseCoord" /* PM */ /*==== global data ==========================================================*/ HAB hab ; /* application anchor block handle */ HWND hApp ; /* application window handle */ HWND hwndFrame ; /* frame window handle */ #define FONTBUF 256 /* buffer for dropped font namesize */ #define GNUXPAGE 19500 /* width of plot area in 0.01 cm */ #define GNUYPAGE 12500 /* height of plot area in 0.01 cm */ extern char szIPCName[]; /* name used in IPC with gnuplot */ extern char szIniFile[256]; /* full path of ini file */ extern int bServer; extern int bPersist; extern int bWideLines; #ifdef PM_KEEP_OLD_ENHANCED_TEXT extern int bEnhanced; #endif /*==== stuff for querying printer capability =================================*/ typedef struct { /* query data for printer setup */ int cbStruct ; /* size of struct */ float xsize ; float ysize ; float xfrac ; float yfrac ; short caps ; char szFilename[CCHMAXPATHCOMP] ; char szPrinterName[128] ; PPRQINFO3 piPrinter ; int cbpdriv ; PDRIVDATA pdriv ; } QPRINT, *PQPRINT ; #define QP_CAPS_NORMAL 0 #define QP_CAPS_FILE 1 /* can print to file */ /*==== stuff for pause dialogs =================================*/ typedef struct { /* pause data for dialog box */ int cbStruct ; /* size of struct */ char *pszMessage ; /* pause message */ PSWP pswp ; /* dialog box position */ } PAUSEDATA, *PPAUSEDATA ; /*==== function declarations =================================================*/ short ScalePS( HPS ) ; int SetupPrinter( HWND, PQPRINT ) ; HDC OpenPrinterDC( HAB, PQPRINT, LONG, char* ) ; int SetPrinterMode( HWND, PQPRINT ) ; MPARAM PrintCmdProc( HWND, ULONG, MPARAM, MPARAM ) ; MRESULT EXPENTRY PrintDlgProc( HWND, ULONG, MPARAM, MPARAM ) ; MRESULT EXPENTRY PauseMsgDlgProc( HWND, ULONG, MPARAM, MPARAM ) ; MRESULT EXPENTRY QFontDlgProc( HWND ,ULONG, MPARAM, MPARAM ) ; MRESULT EXPENTRY QPrintDlgProc (HWND, ULONG, MPARAM, MPARAM) ; MRESULT EXPENTRY QPrintersDlgProc ( HWND, ULONG, MPARAM, MPARAM ) ; MRESULT EXPENTRY DisplayClientWndProc(HWND, ULONG, MPARAM, MPARAM); MRESULT EXPENTRY NewFrameWndProc(HWND, ULONG, MPARAM, MPARAM) ; MRESULT EXPENTRY About(HWND, ULONG, MPARAM, MPARAM); MRESULT EXPENTRY CancelPrintDlgProc ( HWND, ULONG, MPARAM, MPARAM ) ; MRESULT EXPENTRY SendCommandDlgProc( HWND, ULONG, MPARAM, MPARAM ) ; /* own window functions... */ void WinSetDlgItemFloat( HWND, USHORT, float ) ; void WinSetDlgItemFloatF( HWND, USHORT, int, float ) ; void WinQueryDlgItemFloat( HWND, USHORT, float* ) ; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/4allterm.cmd������������������������������������������������������������������0000644�0004711�0000144�00000004626�10431321445�013641� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* 4allterm.cmd This is an replacement for the unix shell script that makefiles normally use to extract and sort terminal help from .trm files It does only use cmd.exe as external tool and is much faster than the previous approach. */ allterm = "..\docs\allterm.h" term_prefix = "..\term\" parse arg args sort_list = 1 if args = "nosort" then do sort_list = 0 end else if args \= "sort" then do say "4allterm creates ..\term\allterm.h" say "Please specify `sort` or `nosort` options!" return 0 end /* extract all terminal files from makefile.all, extract terminal names from terminal files, store result in terminal. extract */ m = "makefile.all" i = 0 lf = "0A"x start_help = lf || "START_HELP(" end_help = lf || "END_HELP(" call stream m, "c", "open read" do while lines(m) > 0 l = linein(m) do while l \= '' parse var l "$(T)" term l if term \= '' then do /* read complete .trm file */ term = term_prefix || term size = stream(term, "c", "query size") call stream term, "c", "open read" data = charin(term, 1, size) call stream term, "c", "close" /* find help section */ p = pos( start_help, data ) do while p > 0 /* get terminal name, store it in terminal.i */ s = p + length(start_help) q = pos(")", data, s) i = i + 1 term_name = substr(data, s, q-p) terminal.i = term_name /* find end of help text */ q = pos(end_help, data, q+1) q = pos(")", data, q) /* save help text in help., use stem help. as hash table */ help.term_name = substr(data, p+1, q-p) /* find next help section */ p = pos(start_help, data, q) end end end end call stream m, "c", "close" terminal.0 = i drop q s p m l term_name term lf start_help end_help size data /* sort list of terminals */ /* simple bubble sort copied from Bernd Schemmer's "Rexx Tips'N Tricks" v3.5 */ if sort_list then do do i = terminal.0 to 1 by -1 until flip_flop = 1 flip_flop = 1 do j = 2 to i m = j - 1 if translate(terminal.m) >> translate(terminal.j) then do xchg = terminal.m terminal.m = terminal.j terminal.j = xchg flip_flop = 0 end end end end /* create allterm.h */ address "cmd" "@del" allterm "2>out" /* remove old file */ do i = 1 to terminal.0 term = terminal.i call lineout allterm, help.term end return 0 ����������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/print.c�����������������������������������������������������������������������0000644�0004711�0000144�00000042561�10166511662�012737� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifdef INCRCSDATA static char RCSid[]="$Id: print.c,v 1.4 2005/01/04 13:01:38 mikulik Exp $" ; #endif /**************************************************************************** PROGRAM: gnupmdrv Outboard PM driver for GNUPLOT 3.3 MODULE: print.c -- support for printing graphics under OS/2 ****************************************************************************/ /* PM driver for GNUPLOT */ /*[ * Copyright 1992, 1993, 1998, 2004 Roger Fearick * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHOR * * Gnuplot driver for OS/2: Roger Fearick */ #define INCL_SPLDOSPRINT #define INCL_DOSPROCESS #define INCL_DOSSEMAPHORES #define INCL_DEV #define INCL_SPL #define INCL_PM #define INCL_WIN #include <os2.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <process.h> #include "gnupmdrv.h" #define GNUPAGE 4096 /* size of gnuplot page in pixels (driver dependent) */ typedef struct { /* for print thread parameters */ HWND hwnd ; HDC hdc ; /* printer device context */ HPS hps ; /* screen PS to be printed */ char szPrintFile[256] ; /* file for printer output if not to printer */ PQPRINT pqp ; /* print queue info */ } PRINTPARAMS ; static struct { long lTech ; // printer technology long lVer ; // driver version long lWidth ; // page width in pels long lHeight ; // page height in pels long lWChars ; // page width in chars long lHChars ; // page height in chars long lHorRes ; // horizontal resolution pels / metre long lVertRes ; // vertical resolution pels / metre } prCaps ; //static PDRIVDATA pdriv = NULL ; static DRIVDATA driv = {sizeof( DRIVDATA) } ; static char szPrintFile[CCHMAXPATHCOMP] = {0} ; static DEVOPENSTRUC devop ; ULONG GetPrinters( PPRQINFO3 *, ULONG * ) ; int FindPrinter( char *, PPRQINFO3 ) ; HMF CopyToMetaFile( HPS ) ; static void ThreadPrintPage( ) ; MPARAM PrintCmdProc( HWND hWnd, ULONG msg, MPARAM mp1, MPARAM mp2 ) /* ** Handle messages for print commands for 1- and 2-d spectra ** (i.e for the appropriate 1-and 2-d child windows ) */ { static PRINTPARAMS tp ; static char szBusy[] = "Busy - try again later" ; static char szStart[] = "Printing started" ; static HEV semPrint = 0L ; static HWND hwndCancel = NULLHANDLE ; char szTemp[32] ; unsigned short lErr ; TID tid ; char *pszMess; if( semPrint == 0L ) { DosCreateMutexSem( NULL, &semPrint, 0L, 0L ) ; } switch( msg ) { case WM_USER_PRINT_BEGIN: if( DosRequestMutexSem( semPrint, SEM_IMMEDIATE_RETURN ) != 0 ) { pszMess = szBusy ; WinMessageBox( HWND_DESKTOP, hWnd, pszMess, APP_NAME, 0, MB_OK | MB_ICONEXCLAMATION ) ; } else { pszMess = szStart ; tp.hwnd = hWnd ; tp.pqp = (PQPRINT) mp1 ; tp.hps = (HPS) mp2 ; strcpy( tp.szPrintFile, szPrintFile ) ; tid = _beginthread( ThreadPrintPage, NULL, 32768, &tp ) ; hwndCancel = WinLoadDlg( HWND_DESKTOP, hWnd, (PFNWP)CancelPrintDlgProc, 0L, ID_PRINTSTOP, NULL ) ; } break ; case WM_USER_PRINT_OK : if( hwndCancel != NULLHANDLE ) { WinDismissDlg( hwndCancel, 0 ) ; hwndCancel = NULLHANDLE ; } DosReleaseMutexSem( semPrint ) ; break ; case WM_USER_DEV_ERROR : if( hwndCancel != NULLHANDLE ) { WinDismissDlg( hwndCancel, 0 ) ; hwndCancel = NULLHANDLE ; } lErr = ERRORIDERROR( (ERRORID) mp1 ) ; sprintf( szTemp, "Dev error: %d %x", lErr, lErr ) ; WinMessageBox( HWND_DESKTOP, hWnd, szTemp, APP_NAME, 0, MB_OK | MB_ICONEXCLAMATION ) ; DosReleaseMutexSem( semPrint ) ; break ; case WM_USER_PRINT_ERROR : if( hwndCancel != NULLHANDLE ) { WinDismissDlg( hwndCancel, 0 ) ; hwndCancel = NULLHANDLE ; } lErr = ERRORIDERROR( (ERRORID) mp1 ) ; sprintf( szTemp, "Print error: %d %x", lErr, lErr ) ; WinMessageBox( HWND_DESKTOP, hWnd, szTemp, APP_NAME, 0, MB_OK | MB_ICONEXCLAMATION ) ; DosReleaseMutexSem( semPrint ) ; break ; case WM_USER_PRINT_CANCEL : DevEscape( tp.hdc, DEVESC_ABORTDOC, 0L, NULL, NULL, NULL ) ; break ; case WM_USER_PRINT_QBUSY : return( (MPARAM)DosRequestMutexSem( semPrint, SEM_IMMEDIATE_RETURN ) ) ; default : break ; } return 0L ; } int SetupPrinter( HWND hwnd, PQPRINT pqp ) /* ** Set up the printer ** */ { HDC hdc ; float flXFrac, flYFrac; /* check that printer is still around .. */ if( FindPrinter( pqp->szPrinterName, pqp->piPrinter ) != 0 ) return 0 ; /* get printer capabilities */ if( (hdc = OpenPrinterDC( WinQueryAnchorBlock( hwnd ), pqp, OD_INFO, NULL )) != DEV_ERROR ) { DevQueryCaps( hdc, CAPS_TECHNOLOGY, (long)sizeof(prCaps)/sizeof(long), (PLONG)&prCaps ) ; DevCloseDC( hdc ) ; pqp->xsize = (float)100.0* (float) prCaps.lWidth / (float) prCaps.lHorRes ; // in cm pqp->ysize = (float)100.0* (float) prCaps.lHeight / (float) prCaps.lVertRes ; // in cm flXFrac = pqp->xfrac ; flYFrac = pqp->yfrac ; pqp->szFilename[0] = 0 ; szPrintFile[0] = 0 ; pqp->caps = prCaps.lTech & (CAPS_TECH_VECTOR_PLOTTER|CAPS_TECH_POSTSCRIPT) ? QP_CAPS_FILE : QP_CAPS_NORMAL ; if( WinDlgBox( HWND_DESKTOP, hwnd, (PFNWP)QPrintDlgProc, 0L, ID_QPRINT, pqp ) == DID_OK ) { if( pqp->caps & QP_CAPS_FILE ) { if( pqp->szFilename[0] != 0 ) strcpy( szPrintFile, pqp->szFilename ) ; } return 1 ; } pqp->xfrac = flXFrac ; pqp->yfrac = flYFrac ; } return 0 ; } int SetPrinterMode( HWND hwnd, PQPRINT pqp ) /* ** call up printer driver's own setup dialog box ** ** returns : -1 if error ** 0 if no settable modes ** 1 if OK */ { HAB hab ; LONG lBytes ; PPRQINFO3 pinfo = pqp->piPrinter ; hab = WinQueryAnchorBlock( hwnd ) ; driv.szDeviceName[0]='\0' ; lBytes = DevPostDeviceModes( hab, NULL, devop.pszDriverName, pinfo->pDriverData->szDeviceName, //driv.szDeviceName, NULL, DPDM_POSTJOBPROP ) ; if( lBytes > 0L ) { /* if we have old pdriv data, and if it's for the same printer, keep it to retain user's current settings, else get new */ if( pqp->pdriv != NULL && strcmp( pqp->pdriv->szDeviceName, pinfo->pDriverData->szDeviceName ) != 0 ) { free( pqp->pdriv ) ; pqp->pdriv = NULL ; } if( pqp->pdriv == NULL ) { if( lBytes < pinfo->pDriverData->cb ) lBytes = pinfo->pDriverData->cb ; pqp->pdriv = malloc( lBytes ) ; pqp->cbpdriv = lBytes ; memcpy( pqp->pdriv, pinfo->pDriverData, lBytes ) ; } strcpy( driv.szDeviceName, pqp->pdriv->szDeviceName ) ; // pqp->pdriv->szDeviceName[0] = '\0' ; /* to check if 'cancel' selected */ lBytes = DevPostDeviceModes( hab, pqp->pdriv, devop.pszDriverName, driv.szDeviceName, NULL, DPDM_POSTJOBPROP ) ; if( lBytes != 1 /*pqp->pdriv->szDeviceName[0] == '\0'*/ ) { /* could be: 'cancel' selected */ pqp->cbpdriv = lBytes = 0 ; free(pqp->pdriv ) ; /* is this right ???? */ pqp->pdriv = NULL ; } } return ( (int) lBytes ) ; } static void ThreadPrintPage( PRINTPARAMS *ptp ) /* ** thread to set up printer DC and print page ** ** Input: THREADPARAMS *ptp -- pointer to thread data passed by beginthread ** */ { HAB hab ; // thread anchor block nandle HDC hdc ; // printer device context handle HPS hps ; // presentation space handle SHORT msgRet ; // message posted prior to return (end of thread) SIZEL sizPage ; // size of page for creation of presentation space LONG alPage[2] ; // actual size of printer page in pixels RECTL rectPage ; // viewport on page into which we draw LONG lColors ; char *szPrintFile ; HMF hmf ; LONG alOpt[9] ; HPS hpsSc ; hab = WinInitialize( 0 ) ; szPrintFile = ptp->szPrintFile[0] == '\0' ? NULL : ptp->szPrintFile ; if( (hdc = OpenPrinterDC( hab, ptp->pqp, 0L, szPrintFile )) != DEV_ERROR ) { // create presentation space for printer ptp->hdc = hdc ; hmf = CopyToMetaFile( ptp->hps ) ; hpsSc = ptp->hps ; sizPage.cx = GNUXPAGE; sizPage.cy = GNUYPAGE; hps = GpiCreatePS( hab, hdc, &sizPage, PU_HIMETRIC | GPIF_DEFAULT | GPIT_NORMAL | GPIA_ASSOC ) ; DevQueryCaps( hdc, CAPS_WIDTH, 2L, alPage ) ; DevQueryCaps( hdc, CAPS_PHYS_COLORS, 1L, &lColors ) ; rectPage.xLeft = 0L ; rectPage.xRight = alPage[0] ; rectPage.yTop = alPage[1] ;//alPage[1]*(1.0-flYFrac) ; rectPage.yBottom = 0L ; // = alPage[1] ; { double ratio = 1.560 ; double xs = rectPage.xRight - rectPage.xLeft ; double ys = rectPage.yTop - rectPage.yBottom ; if( ys > xs/ratio ) { /* reduce ys to fit */ rectPage.yTop = rectPage.yBottom + (int)(xs/ratio) ; } else if( ys < xs/ratio ) { /* reduce xs to fit */ rectPage.xRight = rectPage.xLeft + (int)(ys*ratio) ; } } rectPage.xRight = rectPage.xRight*ptp->pqp->xfrac ; rectPage.yTop = rectPage.yTop*ptp->pqp->yfrac ;//alPage[1]*(1.0-flYFrac) ; { double ratio = 1.560 ; double xs = rectPage.xRight - rectPage.xLeft ; double ys = rectPage.yTop - rectPage.yBottom ; if( ys > xs/ratio ) { /* reduce ys to fit */ rectPage.yTop = rectPage.yBottom + (int)(xs/ratio) ; } else if( ys < xs/ratio ) { /* reduce xs to fit */ rectPage.xRight = rectPage.xLeft + (int)(ys*ratio) ; } } // start printing if( DevEscape( hdc, DEVESC_STARTDOC, 7L, APP_NAME, NULL, NULL ) != DEVESC_ERROR ) { char buff[256] ; int rc; rc = GpiSetPageViewport( hps, &rectPage ) ; alOpt[0] = 0L ; alOpt[1] = LT_ORIGINALVIEW ; alOpt[2] = 0L ; alOpt[3] = LC_LOADDISC ; alOpt[4] = RES_DEFAULT ; alOpt[5] = SUP_DEFAULT ; alOpt[6] = CTAB_DEFAULT ; alOpt[7] = CREA_DEFAULT ; alOpt[8] = DDEF_DEFAULT ; if (rc) rc=GpiPlayMetaFile( hps, hmf, 9L, alOpt, NULL, 255, buff ) ; if (rc) { DevEscape( hdc, DEVESC_ENDDOC, 0L, NULL, NULL, NULL ) ; msgRet = WM_USER_PRINT_OK ; } else msgRet = WM_USER_PRINT_ERROR; } else msgRet = WM_USER_PRINT_ERROR ; GpiDestroyPS( hps ) ; DevCloseDC( hdc ) ; } else msgRet = WM_USER_DEV_ERROR ; DosEnterCritSec() ; WinPostMsg( ptp->hwnd, msgRet, (MPARAM)WinGetLastError(hab), 0L ) ; WinTerminate( hab ) ; } HDC OpenPrinterDC( HAB hab, PQPRINT pqp, LONG lMode, char *szPrintFile ) /* ** get printer info from os2.ini and set up DC ** ** Input: HAB hab -- handle of anchor block of printing thread ** PQPRINT-- pointer to data of current selected printer ** LONG lMode -- mode in which device context is opened = OD_QUEUED, OD_DIRECT, OD_INFO ** char *szPrintFile -- name of file for printer output, NULL ** if to printer (only used for devices that support file ** output eg plotter, postscript) ** ** Return: HDC -- handle of printer device context ** = DEV_ERROR (=0) if error */ { LONG lType ; static CHAR achPrinterData[256] ; if( pqp->piPrinter == NULL ) return DEV_ERROR ; strcpy( achPrinterData, pqp->piPrinter->pszDriverName ) ; achPrinterData[ strcspn(achPrinterData,".") ] = '\0' ; devop.pszDriverName = achPrinterData ; devop.pszLogAddress = pqp->piPrinter->pszName ; if( pqp->pdriv != NULL && strcmp( pqp->pdriv->szDeviceName, pqp->piPrinter->pDriverData->szDeviceName ) == 0 ) { devop.pdriv = pqp->pdriv ; } else devop.pdriv = pqp->piPrinter->pDriverData ; if( szPrintFile != NULL ) devop.pszLogAddress = szPrintFile ; // set data type to RAW devop.pszDataType = "PM_Q_RAW" ; // open device context if( lMode != 0L ) lType = lMode ; else lType = (szPrintFile == NULL) ? OD_QUEUED: OD_DIRECT ; return DevOpenDC( hab, // WinQueryAnchorBlock( hwnd ), lType, "*", 4L, (PDEVOPENDATA) &devop, NULLHANDLE ) ; } int FindPrinter( char *szName, PPRQINFO3 piPrinter ) /* ** Find a valid printer */ { PPRQINFO3 pprq = NULL ; PDRIVDATA pdriv = NULL ; LONG np ; if( *szName && (strcmp( szName, piPrinter->pszName ) == 0) ) return 0 ; if( GetPrinters( &pprq , &np ) == 0 ) return 1 ; for( --np; np>=0; np-- ) { if( strcmp( szName, pprq[np].pszName ) == 0 ) { if( piPrinter->pDriverData != NULL ) free( piPrinter->pDriverData ) ; pdriv = malloc( pprq[np].pDriverData->cb ) ; memcpy( piPrinter, &pprq[np], sizeof( PRQINFO3 ) ) ; piPrinter->pDriverData = pdriv ; memcpy( pdriv, pprq[np].pDriverData, pprq[np].pDriverData->cb ) ; free( pprq ) ; return 0 ; } } memcpy( piPrinter, &pprq[0], sizeof( PRQINFO3 ) ) ; free( pprq ) ; return 0 ; } MRESULT EXPENTRY CancelPrintDlgProc ( HWND hwnd, ULONG usMsg, MPARAM mp1, MPARAM mp2 ) /* ** Cancel printing dialog box proc */ { switch ( usMsg ) { case WM_COMMAND : switch ( SHORT1FROMMP(mp1) ) { case DID_CANCEL: WinSendMsg( WinQueryWindow( hwnd, QW_OWNER ), WM_USER_PRINT_CANCEL, 0L, 0L ) ; WinDismissDlg( hwnd, 0 ) ; break ; default: break ; } default: break ; } /* fall through to the default control processing */ return WinDefDlgProc ( hwnd , usMsg , mp1 , mp2 ) ; } �����������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/gclient.c���������������������������������������������������������������������0000644�0004711�0000144�00000322572�11437176233�013236� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifdef INCRCSDATA static char RCSid[]="$Id: gclient.c,v 1.51 2010/08/31 12:59:07 mikulik Exp $"; #endif /**************************************************************************** PROGRAM: Gnupmdrv MODULE: gclient.c This file contains the client window procedures for Gnupmdrv ****************************************************************************/ /* PM driver for GNUPLOT */ /*[ * Copyright 1992, 1993, 1998, 2004 Roger Fearick * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHOR * * Gnuplot driver for OS/2: Roger Fearick * * * CONTRIBUTIONS: * * Petr Mikulik (see PM labels) * - menu item to keep aspect ratio on/off (October 1997) * - mouse support (1998, 1999); changes made after gnuplot 3.7.0.5: * - use gnuplot's pid in the name of shared memory (11. 5. 1999) * - mouse in maps; distance in polar coords (14. 5. 1999) * - event semaphore for sending data via shared memory; * zooming completely revised; * remap keys in 'case WM_CHAR'; * Ctrl-C for breaking long drawings; * new menu items under 'Mouse' and 'Utilities' (August 1999) * - rewrite of mouse support for the new scheme common with X11 * (October 1999 - January 2000) * - pm3d stuff (since January 1999) * * Franz Bakan * - communication gnupmdrv -> gnuplot via shared memory (April 1999) * - date and time on x axis (August 1999) */ #define INCL_PM #define INCL_WIN #define INCL_SPL #define INCL_SPLDOSPRINT #define INCL_WINSTDFONT #define INCL_DOSMEMMGR #define INCL_DOSPROCESS #define INCL_DOSERRORS #define INCL_DOSFILEMGR #define INCL_DOSNMPIPES #define INCL_DOSSESMGR #define INCL_DOSSEMAPHORES #define INCL_DOSMISC #define INCL_DOSQUEUES #define INCL_WINSWITCHLIST #define INCL_GPIPRIMITIVES #include <os2.h> #include <string.h> #include <stdio.h> #include <io.h> #include <fcntl.h> #include <math.h> #include <float.h> #include <stdlib.h> #include <unistd.h> #include <process.h> #include <signal.h> #include <time.h> #include "config.h" #include "term_api.h" #include "gnupmdrv.h" #include "pm_msgs.h" #include "mousecmn.h" /*==== m i s c e l l a n e o u s =============================================*/ /* February 2008, according to the gnuplot bugs report #1773922 The standard font selection dialog is somehow broken after saving options. Use the font palette dialog instead. */ /* #define STANDARD_FONT_DIALOG 1 */ #undef STANDARD_FONT_DIALOG /*==== d e b u g g i n g =====================================================*/ #if 0 # include "pmprintf.h" # define DEBUG_IMAGE(a) PmPrintf a #else # define DEBUG_IMAGE(a) #endif #if 0 # include "pmprintf.h" # define DEBUG_COLOR(a) PmPrintf a #else # define DEBUG_COLOR(a) #endif /*==== l o c a l d a t a ==================================================*/ static long lLineTypes[7] = { LINETYPE_SOLID, LINETYPE_SHORTDASH, LINETYPE_DOT, LINETYPE_DASHDOT, LINETYPE_LONGDASH, LINETYPE_DOUBLEDOT, LINETYPE_DASHDOUBLEDOT }; static long lCols[16] = { CLR_BLACK, CLR_DARKGRAY, CLR_RED, CLR_GREEN, CLR_BLUE, CLR_PINK, CLR_CYAN, CLR_BROWN, CLR_YELLOW, CLR_DARKBLUE, CLR_DARKRED, CLR_DARKGREEN, CLR_DARKCYAN, CLR_DARKPINK, CLR_PALEGRAY, CLR_WHITE }; static long lCols_init = 0; static long lCols_num = 16; static long bkColor = -1; /* Note that there are 16 colours used for drawing. The two more entries in this array were added by Ilya to avoid drawing white line on white background. */ #define nColors 16 static LONG alColourTable[nColors + 2]; static BOOL bPMPaletteMode = TRUE; /* do we use PM palette manager? */ /* RGB equivalents of all normal CLR_xxx colour constants Note: First entry corresponds to CLR_WHITE, which is negative (-2)! */ static LONG rgb_colors[18]; /* macro to facilitate translation */ #define RGB_TRANS(v) rgb_colors[(v)-CLR_WHITE] /* A value of 0 indicates direct rgb colors without palette */ /* FIXME: gnupmdrv crashes if this is > GNUBUF/4 ! */ /* FIXME: this must be <= 256 (see PM_SET_COLOR) */ #define RGB_PALETTE_SIZE 0 /* size of the 'virtual' palette used for translation of index to RGB value */ /* FIXME: increasing GNUBUF circumvents a bug/limitation in BufRead: it cannot read datablocks larger than GNUBUF */ #define GNUBUF 131072 //#define GNUBUF 2048 /* buffer for gnuplot commands */ #define PIPEBUF 4096 /* size of pipe buffers */ #define CMDALLOC 4096 /* command buffer allocation increment (ints) */ #define PAUSE_DLG 1 /* pause handled in dialog box */ #define PAUSE_BTN 2 /* pause handled by menu item */ #define PAUSE_GNU 3 /* pause handled by Gnuplot */ #define DEFLW 50 // ULONG ppidGnu = 0L; /* gnuplot pid */ -- now in gpexecute.c static HDC hdcScreen; static HPS hpsScreen; /* screen pres. space */ static int iSeg = 1; static HSWITCH hSwitch = 0; /* switching between windows */ static SWCNTRL swGnu; static BOOL bLineTypes = FALSE; // true if use dashed linetypes static BOOL bColours = TRUE; static BOOL bShellPos = FALSE; static BOOL bPopFront = TRUE; static BOOL bKeepRatio = TRUE; //PM #if 0 static BOOL bNewFont = FALSE; #endif static double multLineHor = 1.; /* Horizontal and vertical spacing shifts */ static double multLineVert = 0.; /* for multiline prints. */ static int codepage = 0; static int ulMouseSprintfFormatItem = IDM_MOUSE_FORMAT_XcY; static BOOL bSend2gp = FALSE; static const char *SetDataStyles[] = { "boxes", "dots", "fsteps", "histeps", "impulses", "lines", "linespoints", "points", "steps" }; struct { int on; // set to 1 during zooming POINTL from, to; // corners } zoombox = { 0 }; static int zooming = 0; // set to 1 during zooming static POINTL zoomrect_from, zoomrect_now; static ULONG ulPlotPos[4]; static ULONG ulShellPos[4]; static PAUSEDATA pausedata = {sizeof(PAUSEDATA), NULL, NULL}; static char szFontNameSize[FONTBUF]; /* default name and size, format: "10.Helvetica" */ /* FIXME: this might not always get updated on font change */ static char szCurrentFontNameSize[FONTBUF]; /* currently selected font */ static PRQINFO3 infPrinter = { "" }; static QPRINT qPrintData = { sizeof(QPRINT), 0.0, 0.0, 1.0, 1.0, 0, "", "", &infPrinter, 0, NULL }; //static HEV semStartSeq; /* semaphore to start things in right sequence */ static HEV semPause; static HMTX semHpsAccess; static ULONG ulPauseReply = 1; static ULONG ulPauseMode = PAUSE_DLG; static HWND hSysMenu; /* stuff for screen-draw thread control */ //static HEV semDrawDone; /* thread control */ static TID tidDraw, tidSpawn; static int breakDrawing = 0; /* //PM flag for stopping (long) drawings */ /* font data */ static int lSupOffset = 0; static int lSubOffset = 0; static int lBaseSupOffset = 0; static int lBaseSubOffset = 0; static int lCharWidth = 217; static int lCharHeight = 465; //PM: Now variables for mouse /* useMouse is set to 1 when user switches mousing on, e.g. the mouse is allowed */ static int useMouse = 0; /* gnuplot's PM terminal sends GR_MOUSECAPABLE message from its init routine, which sets the variable below to 1. Then we are sure that we talk to the mouseable terminal and can read the mouseable data from the pipe. Non-mouseable versions of PM terminal or non-new-gnuplot programs using gnupmdrv will let this variable set to 0, thus no mousing occurs. */ static char mouseTerminal = 0; /* Lock (hide) mouse when building the plot (redrawing screen). Otherwise gnupmdrv would crash when trying to display mouse position in a window not yet plotted. */ static char lock_mouse = 1; /* Structure for the ruler: on/off, position,... */ static struct { int on; int x, y; /* ruler position */ } ruler = {0,0,0,}; // Pointer definition HWND hptrDefault, hptrCrossHair, hptrScaling, hptrRotating, hptrZooming, hptrCurrent; // After passing gpPMmenu in PM_pipe and SET_GRAPHICS, it seems not to be possible // to update the menu. Thus this flag is set on and menu is updated // afterwards. struct t_gpPMmenu gpPMmenu; int gpPMmenu_update_req = 0; // colours of mouse-relating drawings (CLR_DEFAULT is not allowed!) #define COLOR_MOUSE CLR_BLACK // mouse position #define COLOR_ANNOTATE CLR_BLACK // annotating strings (MB3) #define COLOR_RULER CLR_DARKPINK // colour of the ruler #define COLOR_ERROR CLR_RED // colour of error messages static enum JUSTIFY jmode; static SIZEF sizBaseSubSup; static SIZEF sizCurSubSup; static SIZEF sizCurFont; static long lVOffset = 0; static SIZEF sizBaseFont; static struct _ft { char *name; LONG lcid; } tabFont[256] = { {NULL,0L}, {NULL} }; /*==== f u n c t i o n s =====================================================*/ int DoPrint(HWND); HBITMAP CopyToBitmap(HPS); HMF CopyToMetaFile(HPS); MRESULT WmClientCmdProc(HWND , ULONG, MPARAM, MPARAM); void ChangeCheck(HWND, USHORT, USHORT); BOOL QueryIni(HAB); static void SaveIni(HWND); static void ThreadDraw(void*); static void DoPaint(HWND, HPS); static void SelectFont(HPS, char *); static void SwapFont(HPS, char *); static void CopyToClipBrd(HWND); static void ReadGnu(void*); static void EditLineTypes(HWND, HPS, BOOL); #if 0 static void EditCharCell(HPS, SIZEF*); #endif static HPS InitScreenPS(void); static int BufRead(HFILE, void*, int, PULONG); static int GetNewFont(HWND, HPS); void SigHandler(int); static void FontExpand(char *); #ifdef PM_KEEP_OLD_ENHANCED_TEXT static char *ParseText(HPS, char *, BOOL, char *, int, int, BOOL, BOOL); static void CharStringAt(HPS, int, int, int, char *); static int QueryTextBox(HPS, int, char *); #endif static void LMove(HPS hps, POINTL *p); static void LLine(HPS hps, POINTL *p); static void LType(int iType); /* Functions related to the mouse processing */ static void TextToClipboard(PCSZ); static void GetMousePosViewport(HWND hWnd, int *mx, int *my); static void MousePosToViewport(int *x, int *y, SHORT mx, SHORT my); static void DisplayStatusLine(HPS hps); static void UpdateStatusLine(HPS hps, char *text); static void gpPMmenu_update(void); static void DrawZoomBox(void); static void DrawRuler(void); #define IGNORE_MOUSE (!mouseTerminal || useMouse==0 || lock_mouse) /* || !gp4mouse.graph */ /* don't react to mouse in the event handler, and avoid some crashes */ /* Drag'n'Drop support from PMEmacs */ struct drop { unsigned long cookie; unsigned len; char str[CCHMAXPATH]; }; /* Circular buffer of objects recently dropped. */ #define DROP_MAX 8 static int drop_count = 0; /* Each drop action is assigned a number, for relating drop events with PMR_DROP requests. */ /* Finally, include the common mousing declarations and routines: */ #include "../gpexecute.h" /* End of new functions related to the mouse processing */ /*==== c o d e ===============================================================*/ /* An object is being dragged over the client window. Check whether it can be dropped or not. */ void report_error(HWND hWnd, char* s) { HPS hps; POINTL pt; RECTL rc; hps = WinGetPS(hWnd); GpiSetMix(hps, FM_OVERPAINT); /* clear the rectangle below the text */ /* GpiSetColor(hps, RGB_TRANS(CLR_CYAN)); */ GpiSetColor(hps, RGB_TRANS(CLR_BACKGROUND)); pt.x = 0; pt.y = 0; GpiMove(hps,&pt); /* clear the whole line */ GpiQueryPageViewport(hpsScreen,&rc); pt.x = rc.xRight; pt.y = 16; GpiBox(hps, DRO_FILL, &pt, 0,0); /* now write the mouse position on the screen */ GpiSetColor(hps, RGB_TRANS(COLOR_ERROR)); /* set text color */ GpiSetCharMode(hps,CM_MODE1); pt.x = 2; pt.y = 2; GpiCharStringAt(hps,&pt,(long)strlen(s),s); WinReleasePS(hps); } MRESULT drag_over(HWND hWnd, PDRAGINFO pDraginfo) { PDRAGITEM pditem; USHORT indicator, operation; /* Redefine this macro for debugging. */ #define DRAG_FAIL(x) report_error(hWnd,x) indicator = DOR_NODROPOP; operation = DO_COPY; if (!DrgAccessDraginfo(pDraginfo)) DRAG_FAIL("DrgAccessDraginfo failed"); else if (!(pDraginfo->usOperation == DO_DEFAULT || pDraginfo->usOperation == DO_COPY)) DRAG_FAIL("Invalid operation"); else if (DrgQueryDragitemCount(pDraginfo) < 1) DRAG_FAIL("Invalid count"); else if (DrgQueryDragitemCount(pDraginfo) > DROP_MAX - drop_count) DRAG_FAIL("Circular buffer full"); else { pditem = DrgQueryDragitemPtr(pDraginfo, 0); if (!(pditem->fsSupportedOps & DO_COPYABLE)) DRAG_FAIL("Not copyable"); else if (!DrgVerifyRMF(pditem, "DRM_OS2FILE", NULL)) DRAG_FAIL("DrgVerifyRMF failed"); else { /* The object can be dropped (copied). */ indicator = DOR_DROP; operation = DO_COPY; } } DrgFreeDraginfo(pDraginfo); return (MRFROM2SHORT(indicator, operation)); } /* An object is dropped on the client window. */ MRESULT drag_drop(HWND hwnd, PDRAGINFO pDraginfo) { PDRAGITEM pditem; POINTL ptl; char name[CCHMAXPATH]; char path[CCHMAXPATH]; char *p; int count, idx, len; DrgAccessDraginfo(pDraginfo); ptl.x = pDraginfo->xDrop; ptl.y = pDraginfo->yDrop; WinMapWindowPoints(HWND_DESKTOP, hwnd, &ptl, 1); count = DrgQueryDragitemCount(pDraginfo); for (idx = 0; idx < count && drop_count < DROP_MAX; ++idx) { pditem = DrgQueryDragitemPtr(pDraginfo, idx); DrgQueryStrName(pditem->hstrContainerName, sizeof(path), path); DrgQueryStrName(pditem->hstrSourceName, sizeof(name), name); DrgSendTransferMsg(pditem->hwndItem, DM_ENDCONVERSATION, MPFROMLONG(pditem->ulItemID), MPFROMSHORT(DMFL_TARGETSUCCESSFUL)); len = strlen(path); if (len >= 1 && strchr("\\/:", path[len-1]) == NULL) path[len++] = '/'; if (len + strlen(name) + 1 <= sizeof(path)) { strcpy(path + len, name); for (p = path; *p != 0; ++p) if (*p == '\\') *p = '/'; if (input_from_PM_Terminal) { sprintf(input_from_PM_Terminal, "set loadpath \"%.*s\"; load \"%s\"", len, path, path); gp_execute(0); } } else report_error(hwnd, "Dropped path name too long"); } /* for(idx) */ DrgDeleteDraginfoStrHandles(pDraginfo); DrgFreeDraginfo(pDraginfo); return(0); } #if 0 /* A color has been dropped on a frame(or the background color has been changed with WinSetPresParam). */ static void drop_color(HWND hwnd) { RGB rgb; char buf[3]; if (WinQueryPresParam(hwnd, PP_BACKGROUNDCOLOR, 0, NULL, sizeof(rgb), &rgb, QPF_NOINHERIT | QPF_PURERGBCOLOR) == sizeof(rgb) ) { buf[0] = rgb.bRed; buf[1] = rgb.bGreen; buf[2] = rgb.bBlue; #if CAN_DROP_COLOR send_drop_color(buf, 3); #endif } } #endif /* ** Window proc for main window ** -- passes most stuff to active child window via WmClientCmdProc ** -- passes DDE messages to DDEProc */ MRESULT EXPENTRY DisplayClientWndProc(HWND hWnd, ULONG message, MPARAM mp1, MPARAM mp2) { static RECTL rectlPaint = { 0, 0, 0, 0 }; static int iPaintCount = 0; static int firstcall = 1; static int prev_mx = 0, prev_my = 0; /* previous mouse position */ int mx, my; /* current mouse position */ #if 1 GetMousePosViewport(hWnd, &mx, &my); #else /* The following cannot be used because `message' is not OK for * WM_CHAR */ /* macro which gets mouse coords in pixels */ mx = MOUSEMSG(&message)->x; my = MOUSEMSG(&message)->y; /* viewport units --- this trashes mx,my! */ MousePosToViewport(&mx, &my, mx, my); #endif /* Graphics part, SET_GRAPHICS, required to update menu */ if (gpPMmenu_update_req) gpPMmenu_update(); /* mouse events first */ switch (message) { case WM_MOUSEMOVE: if (IGNORE_MOUSE) { WinSetPointer(HWND_DESKTOP, hptrDefault); /* set default pointer */ return 0L; } /* was the mouse moved? */ if ((prev_mx != mx) || (prev_my != my)) { #if 1 WinSetPointer(HWND_DESKTOP, hptrCurrent); #else WinSetPointer(HWND_DESKTOP, hptrCrossHair); #endif if (zoombox.on) { DrawZoomBox(); /* erase zoom box */ zoombox.to.x = mx; zoombox.to.y = my; DrawZoomBox(); /* draw new zoom box */ } /* track(show) mouse position -- send the event to gnuplot */ gp_exec_event(GE_motion, mx, my, 0, 0, 0); } prev_mx = mx; prev_my = my; return 0L; /* end of WM_MOUSEMOVE */ case WM_BUTTON1DOWN: WinSetFocus(HWND_DESKTOP, hWnd); if (! IGNORE_MOUSE) gp_exec_event(GE_buttonpress, mx, my, 1, 0, 0); return 0L; case WM_BUTTON2DOWN: WinSetFocus(HWND_DESKTOP, hWnd); if (!IGNORE_MOUSE) gp_exec_event(GE_buttonpress, mx, my, 3, 0, 0); return 0L; case WM_BUTTON3DOWN: WinSetFocus(HWND_DESKTOP, hWnd); if (!IGNORE_MOUSE) gp_exec_event(GE_buttonpress, mx, my, 2, 0, 0); return 0L; case WM_BUTTON1DBLCLK: if (!IGNORE_MOUSE) gp_exec_event(GE_buttonrelease, mx, my, 1, 0, 0); return 0L; case WM_BUTTON2DBLCLK: if (!IGNORE_MOUSE) /* Note: 9999 should be replaced by time! */ gp_exec_event(GE_buttonrelease, mx, my, 3, 9999, 0); return 0L; case WM_BUTTON3DBLCLK: if (!IGNORE_MOUSE) gp_exec_event(GE_buttonrelease, mx, my, 2, 9999, 0); return 0L; #if 1 case WM_BUTTON1UP: #else case WM_BUTTON1CLICK: #endif if (!IGNORE_MOUSE) gp_exec_event(GE_buttonrelease, mx, my, 1, 9999, 0); return 0L; #if 0 case WM_BUTTON2UP: #else case WM_BUTTON2CLICK: #endif if (!IGNORE_MOUSE) gp_exec_event(GE_buttonrelease, mx, my, 3, 9999, 0); return 0L; #if 1 case WM_BUTTON3UP: #else case WM_BUTTON3CLICK: #endif if (!IGNORE_MOUSE) gp_exec_event(GE_buttonrelease, mx, my, 2, 9999, 0); return 0L; } /* switch over mouse events */ switch (message) { case WM_CREATE: { SIZEL sizlPage; LONG NumColors; LONG PalSupport; /* set initial values */ ChangeCheck(hWnd, IDM_LINES_THICK, bWideLines?IDM_LINES_THICK:0); ChangeCheck(hWnd, IDM_LINES_SOLID, bLineTypes?0:IDM_LINES_SOLID); ChangeCheck(hWnd, IDM_COLOURS, bColours?IDM_COLOURS:0); ChangeCheck(hWnd, IDM_FRONT, bPopFront?IDM_FRONT:0); ChangeCheck(hWnd, IDM_KEEPRATIO, bKeepRatio?IDM_KEEPRATIO:0); ChangeCheck(hWnd, IDM_USEMOUSE, useMouse?IDM_USEMOUSE:0); #if 0 ChangeCheck(hWnd, IDM_MOUSE_POLAR_DISTANCE, mousePolarDistance?IDM_MOUSE_POLAR_DISTANCE:0); #endif /* disable close from system menu(close only from gnuplot) */ hApp = WinQueryWindow(hWnd, QW_PARENT); /* temporary assignment.. */ hSysMenu = WinWindowFromID(hApp, FID_SYSMENU); /* setup semaphores */ /* DosCreateEventSem(NULL, &semDrawDone, 0L, 0L); */ /* DosCreateEventSem(NULL, &semStartSeq, 0L, 0L); */ DosCreateEventSem(NULL, &semPause, 0L, 0L); DosCreateMutexSem(NULL, &semHpsAccess, 0L, 1L); /* create a dc and hps to draw on the screen */ hdcScreen = WinOpenWindowDC(hWnd); /* How many colors can be displayed ? */ DevQueryCaps(hdcScreen, CAPS_COLORS, 1, &NumColors); /* Is Palette Manager supported at all? */ DevQueryCaps(hdcScreen, CAPS_ADDITIONAL_GRAPHICS, 1, &PalSupport); /* Determine if PM Palette Manager should be used */ bPMPaletteMode = (PalSupport & CAPS_PALETTE_MANAGER) && (NumColors <= 256); DEBUG_COLOR(( "WM_CREATE: colors = %i, pm = %i, rgb = %i", NumColors, PalSupport & CAPS_PALETTE_MANAGER, !bPMPaletteMode )); sizlPage.cx = 0; sizlPage.cy = 0; sizlPage.cx = 19500; sizlPage.cy = 12500; hpsScreen = GpiCreatePS(hab, hdcScreen, &sizlPage, PU_HIMETRIC|GPIT_NORMAL|GPIA_ASSOC); /* spawn server for GNUPLOT ... */ tidSpawn = _beginthread(ReadGnu, NULL, 32768, NULL); /* initialize pointers */ hptrDefault = WinQuerySysPointer(HWND_DESKTOP, SPTR_ARROW, FALSE); hptrCrossHair = WinLoadPointer(HWND_DESKTOP,(ULONG)0, IDP_CROSSHAIR); hptrScaling = WinLoadPointer(HWND_DESKTOP,(ULONG)0, IDP_SCALING); hptrRotating = WinLoadPointer(HWND_DESKTOP,(ULONG)0, IDP_ROTATING); hptrZooming = WinQuerySysPointer(HWND_DESKTOP, SPTR_MOVE, FALSE); hptrCurrent = hptrCrossHair; break; } case WM_GPSTART: /* Show the Mouse menu if connected to mouseable PM terminal */ if (1 || mouseTerminal) /* PM: workaround for a bug---SEE "BUGS 2" IN README!!! */ /* if (mouseTerminal) */ WinEnableMenuItem(WinWindowFromID( WinQueryWindow(hApp, QW_PARENT), FID_MENU), IDM_MOUSE, TRUE); if (!input_from_PM_Terminal) { /* no feedback */ #define NOFEEDBACK(X) \ WinEnableMenuItem(WinWindowFromID( \ WinQueryWindow(hApp, QW_PARENT), \ FID_MENU), \ X, FALSE) NOFEEDBACK(IDM_SET_GRID); NOFEEDBACK(IDM_SET_LINLOGY); NOFEEDBACK(IDM_SET_AUTOSCALE); NOFEEDBACK(IDM_DO_REPLOT); NOFEEDBACK(IDM_DO_RELOAD); NOFEEDBACK(IDM_DO_SENDCOMMAND); NOFEEDBACK(IDM_SET); #undef NOFEEDBACK } /* get details of command-line window */ hSwitch = WinQuerySwitchHandle(0, ppidGnu); WinQuerySwitchEntry(hSwitch, &swGnu); if (firstcall) { /* set size of this window */ WinSetWindowPos( WinQueryWindow(hWnd, QW_PARENT), bPopFront?HWND_TOP:swGnu.hwnd, ulShellPos[0], ulShellPos[1], ulShellPos[2], ulShellPos[3], bShellPos ? (bPopFront ? SWP_SIZE|SWP_MOVE|SWP_SHOW|SWP_ACTIVATE : SWP_SIZE|SWP_MOVE|SWP_SHOW|SWP_ZORDER) : (bPopFront ? SWP_SHOW|SWP_ACTIVATE : SWP_SHOW|SWP_ZORDER)); signal(SIGTERM, SigHandler); firstcall = 0; } if (!bPopFront) WinSwitchToProgram(hSwitch); /* DosPostEventSem(semDrawDone); */ DosReleaseMutexSem(semHpsAccess); return 0; case WM_COMMAND: return WmClientCmdProc(hWnd, message, mp1, mp2); case WM_CHAR: { /* Note: doc for WM_CHAR is available in PMMSG.INF */ USHORT usFlag = SHORT1FROMMP(mp1); /* keyboard control codes */ SHORT key = SHORT2FROMMP(mp2); /* virtual key code */ static int last_modifier_mask = -99; int modifier_mask = ((usFlag & KC_SHIFT) ? Mod_Shift : 0) | ((usFlag & KC_CTRL) ? Mod_Ctrl : 0) | ((usFlag & KC_ALT) ? Mod_Alt : 0); if (modifier_mask != last_modifier_mask) { gp_exec_event(GE_modifier, mx, my, modifier_mask, 0, 0); last_modifier_mask = modifier_mask; } #if 0 if (!(usFlag & KC_SCANCODE)) return 0L; // only modifier mask has changed */ #endif if (usFlag & KC_KEYUP) return 0L; /* ignore key release events */ #if 0 { FILE *ff = fopen("deb", "a"); fprintf(ff, "key = %i c=%c\n", (int) key, (char) key); fclose(ff); } #endif switch (key) { case VK_SPACE: { #ifndef DISABLE_SPACE_RAISES_CONSOLE /* raise gnuplot's window */ HWND hw = WinQueryWindow(swGnu.hwnd, QW_BOTTOM); WinSetFocus(HWND_DESKTOP, hw); WinSendMsg(hw, message, MPFROM2SHORT((USHORT)(KC_SCANCODE), 1), 0 /* MPFROMSHORT(key) */ ); WinSwitchToProgram(hSwitch); #else key = ' '; #endif /* DISABLE_SPACE_RAISES_CONSOLE */ break; } /* remap virtual keys to gnuplot's codes: */ case VK_BACKSPACE: key = GP_BackSpace; break; case VK_TAB: key = GP_Tab; break; case VK_NEWLINE: key = GP_Return; break; case VK_PAUSE: key = GP_Pause; break; case VK_SCRLLOCK: key = GP_Scroll_Lock; break; case VK_SYSRQ: key = GP_Sys_Req; break; case VK_ESC: key = GP_Escape; break; case VK_DELETE: key = GP_Delete; break; case VK_INSERT: key = GP_KP_Insert; break; case VK_HOME: key = GP_Home; break; case VK_LEFT: key = GP_Left; break; case VK_UP: key = GP_Up; break; case VK_RIGHT: key = GP_Right; break; case VK_DOWN: key = GP_Down; break; case VK_END: key = GP_End; break; case VK_PAGEUP: key = GP_PageUp; break; case VK_PAGEDOWN: key = GP_PageDown; break; case VK_F1: key = GP_F1; break; case VK_F2: key = GP_F2; break; case VK_F3: key = GP_F3; break; case VK_F4: key = GP_F4; break; case VK_F5: key = GP_F5; break; case VK_F6: key = GP_F6; break; case VK_F7: key = GP_F7; break; case VK_F8: key = GP_F8; break; case VK_F9: key = GP_F9; break; case VK_F10: key = GP_F10; break; case VK_F11: key = GP_F11; break; case VK_F12: key = GP_F12; break; case VK_SHIFT: case VK_CTRL: case VK_ALT: gp_exec_event(GE_modifier, mx, my, modifier_mask, 0, 0); return 0L; default: key = SHORT1FROMMP(mp2); /* character key code */ } /* switch(key) */ if (key) gp_exec_event(GE_keypress, mx, my, key, 0, 0); return 0L; } /*case(WM_CHAR) */ case WM_DESTROY: if (WinSendMsg(hWnd, WM_USER_PRINT_QBUSY, 0L, 0L) != 0L) { WinMessageBox(HWND_DESKTOP, hWnd, "Still printing - not closed", APP_NAME, 0, MB_OK | MB_ICONEXCLAMATION); return 0L; } return(WinDefWindowProc(hWnd, message, mp1, mp2)); case WM_PAINT: { ULONG ulCount; PID pid; TID tid; HPS hps_tmp; RECTL rectl_tmp; DosQueryMutexSem(semHpsAccess, &pid, &tid, &ulCount); if ((ulCount > 0) &&(tid != tidDraw)) { /* simple repaint while building plot or metafile */ /* use temporary PS */ lock_mouse = 1; /* PM: this may help against gnupmdrv crashes */ hps_tmp = WinBeginPaint(hWnd,0,&rectl_tmp); WinFillRect(hps_tmp,&rectl_tmp,CLR_BACKGROUND); WinEndPaint(hps_tmp); /* add dirty rectangle to saved rectangle */ /* to be repainted when PS is available again */ WinUnionRect(hab,&rectlPaint,&rectl_tmp,&rectlPaint); lock_mouse = 0; iPaintCount ++; break; } lock_mouse = 1; WinInvalidateRect(hWnd, &rectlPaint, TRUE); DoPaint(hWnd, hpsScreen); WinSetRectEmpty(hab, &rectlPaint); lock_mouse = 0; break; } case WM_SIZE : WinInvalidateRect(hWnd, NULL, TRUE); break; case WM_PRESPARAMCHANGED: { char *pp = malloc(FONTBUF); ULONG ulID; if (WinQueryPresParam(hWnd, PP_FONTNAMESIZE, 0, &ulID, FONTBUF, pp, QPF_NOINHERIT) != 0L) { strcpy(szFontNameSize, pp); #if 0 bNewFont = TRUE; #endif WinInvalidateRect(hWnd, NULL, TRUE); } free(pp); #ifndef STANDARD_FONT_DIALOG gp_execute("refresh"); #endif break; } case WM_USER_PRINT_BEGIN: case WM_USER_PRINT_OK : case WM_USER_DEV_ERROR : case WM_USER_PRINT_ERROR : case WM_USER_PRINT_QBUSY : return(PrintCmdProc(hWnd, message, mp1, mp2)); case WM_GNUPLOT: /* display the plot */ lock_mouse = 1; if (bPopFront) { SWP swp; /* pop to front only if the window is not minimized */ if ((WinQueryWindowPos(hwndFrame,(PSWP) &swp) == TRUE) &&((swp.fl & SWP_MINIMIZE) == 0)) WinSetWindowPos(hwndFrame, HWND_TOP, 0,0,0,0, SWP_ACTIVATE|SWP_ZORDER); } if (iPaintCount > 0) { /* if outstanding paint messages, repaint */ WinInvalidateRect(hWnd, &rectlPaint, TRUE); iPaintCount = 0; } lock_mouse = 0; return 0L; case WM_PAUSEPLOT: { SWP swp; /* restore the window if it has been minimized */ if ((WinQueryWindowPos(hwndFrame, &swp) == TRUE) &&((swp.fl & SWP_MINIMIZE) != 0)) WinSetWindowPos(hwndFrame, HWND_TOP, 0,0,0,0, SWP_RESTORE|SWP_SHOW|SWP_ACTIVATE); /* put pause message on screen, or enable 'continue' button */ if (ulPauseMode == PAUSE_DLG) { pausedata.pszMessage =(char*)mp1; WinLoadDlg(HWND_DESKTOP, hWnd, (PFNWP)PauseMsgDlgProc, 0L, IDD_PAUSEBOX, &pausedata); } else { WinEnableMenuItem(WinWindowFromID( WinQueryWindow(hWnd, QW_PARENT), FID_MENU), IDM_CONTINUE, TRUE); } return 0L; } case WM_PAUSEEND: /* resume plotting */ ulPauseReply =(ULONG) mp1; DosPostEventSem(semPause); return 0L; /* New event handles for mouse processing */ #if 0 /* already defined */ case WM_MOUSEMOVE: return 0L; #endif #if 0 case WM_BUTTON1DBLCLK: /* put the mouse coordinates to the clipboard */ if (!IGNORE_MOUSE) { SHORT mx = MOUSEMSG(&message)->x; SHORT my = MOUSEMSG(&message)->y; double x, y; char s[256]; int frm = ulMouseSprintfFormatItem - IDM_MOUSE_FORMAT_X_Y; /* Note: Another solution of getting mouse position *(available at any method, not just in this handle * event) is the following one: * * ok = WinQueryPointerPos(HWND_DESKTOP, &pt); // pt contains pos wrt desktop * WinMapWindowPoints(HWND_DESKTOP, hWnd, &pt, 1); // pt contains pos wrt our hwnd window * sprintf(s,"[%li,%li]",pt.x,pt.y); */ } return 0L; /* end of case WM_BUTTON1DBLCLK */ #endif case WM_BUTTON2CLICK: /* WM_BUTTON2UP: */ /* make zoom */ if (! IGNORE_MOUSE) { POINTL tmp; HPS hps = WinGetPS(hWnd); if (pausing) { /* zoom is not allowed during pause */ DosBeep(440,111); break; } DosBeep(555,155); zoomrect_from.x = MOUSEMSG(&message)->x; zoomrect_from.y = MOUSEMSG(&message)->y; /* set opposite corner */ tmp.x = zoomrect_now.x = zoomrect_from.x + 50; tmp.y = zoomrect_now.y = zoomrect_from.y + 50; /* move mouse to opposite corner */ WinMapWindowPoints(hWnd, HWND_DESKTOP, &tmp, 1); WinSetPointerPos(HWND_DESKTOP, tmp.x, tmp.y); WinReleasePS(hps); zooming = 1; } return 0; /* return from: case WM_BUTTON3DOWN(zoom) */ case WM_BUTTON3UP: /* WM_BUTTON3DBLCLK: */ /* write mouse position to screen */ if (! IGNORE_MOUSE) { SHORT mx = MOUSEMSG(&message)->x; /* mouse position */ SHORT my = MOUSEMSG(&message)->y; char s[256]; POINTL pt; HPS hps = WinGetPS(hWnd); GpiSetColor(hps, RGB_TRANS(COLOR_ANNOTATE)); /* set color of the text */ GpiSetCharMode(hps,CM_MODE1); pt.x = mx; pt.y = my+4; GpiCharStringAt(hps,&pt,(long)strlen(s),s); /* draw a cross at the clicked position */ pt.x = mx-3; pt.y = my; GpiMove(hps,&pt); pt.x += 7; GpiLine(hps,&pt); pt.x = mx; pt.y = my - 3; GpiMove(hps,&pt); pt.y += 7; GpiLine(hps,&pt); WinReleasePS(hps); } return 0L; /* end of case WM_BUTTON3... */ /* End of new event handles for mouse processing */ #if 0 case WM_PRESPARAMCHANGED: if (LONGFROMMP(mp1) == PP_BACKGROUNDCOLOR) drop_color(hWnd); return 0; #endif case DM_DRAGOVER: /* Determine whether the object can be dropped. */ return(drag_over(hWnd, (PDRAGINFO) mp1)); case DM_DROP: /* Drop an object. */ return(drag_drop(hWnd, (PDRAGINFO) mp1)); default: /* Passes it on if unproccessed */ return(WinDefWindowProc(hWnd, message, mp1, mp2)); } /* switch(message) */ return(NULL); } #if 0 /* unused */ /* * Gets the pointer position(in pixels) in the window hWnd */ void GetPointerPos(HWND hWnd, PPOINTL p) { WinQueryPointerPos(HWND_DESKTOP, p); /* this is position wrt desktop */ WinMapWindowPoints(HWND_DESKTOP, hWnd, p, 1); /* pos. wrt our window in pixels */ } #endif /* passing either n(n>=0) or f(when n==-1) */ void SetMouseCoords(HWND hWnd, MPARAM mp1, int n, char *f) { char s[100]; ChangeCheck(hWnd, ulMouseSprintfFormatItem, SHORT1FROMMP(mp1)); ulMouseSprintfFormatItem = SHORT1FROMMP(mp1); if (n >= 0) sprintf(s,"set mouse mouseformat %i clipboardformat %i", n, n); else sprintf(s,"set mouse mouseformat \"%s\" clipboardformat \"%s\"", f, f); gp_execute(s); } /* ** Handle client window command(menu) messages */ MRESULT WmClientCmdProc(HWND hWnd, ULONG message, MPARAM mp1, MPARAM mp2) { static int ulPauseItem = IDM_PAUSEDLG; // static int ulMouseCoordItem = IDM_MOUSE_COORDINATES_REAL; int mx, my; GetMousePosViewport(hWnd,&mx,&my); switch ((USHORT) SHORT1FROMMP(mp1)) { case IDM_ABOUT : /* show the 'About' box */ WinDlgBox(HWND_DESKTOP, hWnd , (PFNWP)About , 0L, ID_ABOUT, NULL); break; case IDM_GPLOTINF: /* view gnuplot.inf */ { const char cmd_prefix[] = "start view "; const char helpfile[] = "gnuplot.inf"; char *cmd; char *gnuplot_path; unsigned cmd_length; cmd_length = strlen(cmd_prefix) + strlen(helpfile); gnuplot_path = getenv("GNUPLOT"); if (gnuplot_path != NULL) cmd_length += strlen(gnuplot_path) + 1; cmd = (char *)malloc( cmd_length ); strcpy(cmd, cmd_prefix); if (gnuplot_path != NULL) { strcat(cmd, gnuplot_path); strcat(cmd, "\\"); } strcat(cmd, helpfile); system(cmd); free(cmd); break; } case IDM_PRINT : /* print plot */ if (SetupPrinter(hWnd, &qPrintData)) { WinPostMsg(hWnd, WM_USER_PRINT_BEGIN, (MPARAM) &qPrintData, (MPARAM) hpsScreen); } break; case IDM_PRINTSETUP : /* select printer */ WinDlgBox(HWND_DESKTOP, hWnd , (PFNWP) QPrintersDlgProc, 0L, IDD_QUERYPRINT, qPrintData.szPrinterName); break; case IDM_LINES_THICK: /* change line setting */ bWideLines = !bWideLines; ChangeCheck(hWnd, IDM_LINES_THICK, bWideLines?IDM_LINES_THICK:0); WinInvalidateRect(hWnd, NULL, TRUE); break; case IDM_LINES_SOLID: /* change line setting */ bLineTypes = !bLineTypes; ChangeCheck(hWnd, IDM_LINES_SOLID, bLineTypes?0:IDM_LINES_SOLID); EditLineTypes(hWnd, hpsScreen, bLineTypes); WinInvalidateRect(hWnd, NULL, TRUE); break; case IDM_COLOURS: /* change colour setting */ bColours = !bColours; ChangeCheck(hWnd, IDM_COLOURS, bColours?IDM_COLOURS:0); WinInvalidateRect(hWnd, NULL, TRUE); break; case IDM_FRONT: /* toggle z-order forcing */ bPopFront = !bPopFront; ChangeCheck(hWnd, IDM_FRONT, bPopFront?IDM_FRONT:0); break; case IDM_KEEPRATIO: /* toggle keep aspect ratio */ bKeepRatio = !bKeepRatio; ChangeCheck(hWnd, IDM_KEEPRATIO, bKeepRatio?IDM_KEEPRATIO:0); WinInvalidateRect(hWnd, NULL, TRUE); /* redraw screen */ break; case IDM_FONTS: if (GetNewFont(hWnd, hpsScreen)) { #if 0 bNewFont = TRUE; #endif WinInvalidateRect(hWnd, NULL, TRUE); } break; case IDM_SAVE: SaveIni(hWnd); break; case IDM_COPY: /* copy to clipboard */ if (WinOpenClipbrd(hab)) { CopyToClipBrd(hWnd); } else { WinMessageBox(HWND_DESKTOP, hWnd, "Can't open clipboard", APP_NAME, 0, MB_OK | MB_ICONEXCLAMATION); } break; case IDM_CLEARCLIP : /* clear clipboard */ if (WinOpenClipbrd(hab)) { WinEmptyClipbrd(hab); WinCloseClipbrd(hab); } else { WinMessageBox(HWND_DESKTOP, hWnd, "Can't open clipboard", APP_NAME, 0, MB_OK | MB_ICONEXCLAMATION); } break; case IDM_COMMAND: /* go back to GNUPLOT command window */ WinSwitchToProgram(hSwitch); break; case IDM_CONTINUE: WinPostMsg(hWnd, WM_PAUSEEND,(MPARAM)1L,(MPARAM)0L); WinEnableMenuItem(WinWindowFromID( WinQueryWindow(hWnd, QW_PARENT), FID_MENU), IDM_CONTINUE, FALSE); break; case IDM_PAUSEGNU: /* gnuplot handles pause */ ChangeCheck(hWnd, ulPauseItem, IDM_PAUSEGNU); ulPauseItem = IDM_PAUSEGNU; ulPauseMode = PAUSE_GNU; break; case IDM_PAUSEDLG: /* pause message in dlg box */ ChangeCheck(hWnd, ulPauseItem, IDM_PAUSEDLG); ulPauseItem = IDM_PAUSEDLG; ulPauseMode = PAUSE_DLG; break; case IDM_PAUSEBTN: /* pause uses menu button, no message */ ChangeCheck(hWnd, ulPauseItem, IDM_PAUSEBTN); ulPauseItem = IDM_PAUSEBTN; ulPauseMode = PAUSE_BTN; break; case IDM_HELPFORHELP: WinSendMsg(WinQueryHelpInstance(hWnd), HM_DISPLAY_HELP, 0L, 0L); return 0L; case IDM_EXTENDEDHELP: WinSendMsg(WinQueryHelpInstance(hWnd), HM_EXT_HELP, 0L, 0L); return 0L; case IDM_KEYSHELP: WinSendMsg(WinQueryHelpInstance(hWnd), HM_KEYS_HELP, 0L, 0L); return 0L; case IDM_HELPINDEX: WinSendMsg(WinQueryHelpInstance(hWnd), HM_HELP_INDEX, 0L, 0L); return 0L; /* Now new mousing stuff: */ case IDM_USEMOUSE: /* toggle using/not using mouse cursor tracking */ useMouse = !useMouse; ChangeCheck(hWnd, IDM_USEMOUSE, useMouse?IDM_USEMOUSE:0); gp_execute(useMouse ? "set mouse" : "unset mouse"); #if 0 if (!useMouse) /* redraw screen */ WinInvalidateRect(hWnd, NULL, TRUE); #endif return 0L; case IDM_MOUSE_HELP: gp_exec_event(GE_keypress, mx, my, 'h', 1, 0); return 0L; #if 0 case IDM_MOUSE_COORDINATES_REAL: ChangeCheck(hWnd, ulMouseCoordItem, IDM_MOUSE_COORDINATES_REAL); ulMouseCoordItem = IDM_MOUSE_COORDINATES_REAL; return 0L; case IDM_MOUSE_COORDINATES_PIXELS: ChangeCheck(hWnd, ulMouseCoordItem, IDM_MOUSE_COORDINATES_PIXELS); ulMouseCoordItem = IDM_MOUSE_COORDINATES_PIXELS; return 0L; case IDM_MOUSE_COORDINATES_SCREEN: ChangeCheck(hWnd, ulMouseCoordItem, IDM_MOUSE_COORDINATES_SCREEN); ulMouseCoordItem = IDM_MOUSE_COORDINATES_SCREEN; return 0L; case IDM_MOUSE_COORDINATES_XDATE: ChangeCheck(hWnd, ulMouseCoordItem, IDM_MOUSE_COORDINATES_XDATE); ulMouseCoordItem = IDM_MOUSE_COORDINATES_XDATE; return 0L; case IDM_MOUSE_COORDINATES_XTIME: ChangeCheck(hWnd, ulMouseCoordItem, IDM_MOUSE_COORDINATES_XTIME); ulMouseCoordItem = IDM_MOUSE_COORDINATES_XTIME; return 0L; case IDM_MOUSE_COORDINATES_XDATETIME: ChangeCheck(hWnd, ulMouseCoordItem, IDM_MOUSE_COORDINATES_XDATETIME); ulMouseCoordItem = IDM_MOUSE_COORDINATES_XDATETIME; return 0L; #endif case IDM_MOUSE_CMDS2CLIP: /* toggle copying the command sent to gnuplot to clipboard */ bSend2gp = !bSend2gp; ChangeCheck(hWnd, IDM_MOUSE_CMDS2CLIP, bSend2gp?IDM_MOUSE_CMDS2CLIP:0); return 0L; case IDM_MOUSE_FORMAT_pXcYp: SetMouseCoords(hWnd, mp1, -1, "[%g, %g]"); return 0L; case IDM_MOUSE_FORMAT_XcY: SetMouseCoords(hWnd, mp1, 1, NULL); return 0L; case IDM_MOUSE_FORMAT_TIMEFMT: SetMouseCoords(hWnd, mp1, 3, NULL); return 0L; case IDM_MOUSE_FORMAT_DATE: SetMouseCoords(hWnd, mp1, 4, NULL); return 0L; case IDM_MOUSE_FORMAT_TIME: SetMouseCoords(hWnd, mp1, 5, NULL); return 0L; case IDM_MOUSE_FORMAT_DATETIME: SetMouseCoords(hWnd, mp1, 6, NULL); return 0L; case IDM_MOUSE_FORMAT_X_Y: SetMouseCoords(hWnd, mp1, -1, "%g %g"); return 0L; case IDM_MOUSE_FORMAT_XcYc: SetMouseCoords(hWnd, mp1, -1, "%g %g "); return 0L; case IDM_MOUSE_FORMAT_XcYs: SetMouseCoords(hWnd, mp1, -1, "%g %g, "); return 0L; case IDM_MOUSE_POLAR_DISTANCE: /* toggle using/not using polar coords of distance */ gp_execute(gpPMmenu.polar_distance ? "set mouse nopolardistance" : "set mouse polardistance"); return 0L; case IDM_MOUSE_ZOOMNEXT: /* zoom to next level */ gp_exec_event(GE_keypress, mx, my, 'n', 1, 0); return 0L; case IDM_MOUSE_UNZOOM: /* unzoom one level back */ gp_exec_event(GE_keypress, mx, my, 'p', 1, 0); return 0L; case IDM_MOUSE_UNZOOMALL: /* unzoom to the first level */ gp_exec_event(GE_keypress, mx, my, 'u', 1, 0); return 0L; case IDM_MOUSE_RULER: { int mx, my; GetMousePosViewport(hWnd,&mx,&my); gp_exec_event(GE_keypress, mx, my, 'r', 1, 0); return 0L; } case IDM_BREAK_DRAWING: breakDrawing = 1; return 0L; case IDM_SET_GRID: { gp_exec_event(GE_keypress, mx, my, 'g', 1, 0); return 0L; } case IDM_SET_LINLOGY: { gp_exec_event(GE_keypress, mx, my, 'l', 1, 0); return 0L; } case IDM_SET_AUTOSCALE: gp_execute("set autoscale; replot"); return 0L; case IDM_DO_REPLOT: gp_execute("replot"); return 0L; case IDM_DO_RELOAD: gp_execute("history !load"); return 0L; case IDM_DO_SENDCOMMAND: if (input_from_PM_Terminal) { if (pausing) DosBeep(440,111); else WinDlgBox(HWND_DESKTOP, hWnd, SendCommandDlgProc, NULLHANDLE, IDM_DO_SENDCOMMAND, input_from_PM_Terminal); } return (MRESULT) 0; case IDM_SET_D_S_BOXES: case IDM_SET_D_S_DOTS: case IDM_SET_D_S_FSTEPS: case IDM_SET_D_S_HISTEPS: case IDM_SET_D_S_IMPULSES: case IDM_SET_D_S_LINES: case IDM_SET_D_S_LINESPOINTS: case IDM_SET_D_S_POINTS: case IDM_SET_D_S_STEPS: if (input_from_PM_Terminal) sprintf(input_from_PM_Terminal, "set style data %s; replot", SetDataStyles[(USHORT) SHORT1FROMMP(mp1) - IDM_SET_D_S_BOXES ]); gp_execute(0); return 0L; case IDM_SET_F_S_BOXES: case IDM_SET_F_S_DOTS: case IDM_SET_F_S_FSTEPS: case IDM_SET_F_S_HISTEPS: case IDM_SET_F_S_IMPULSES: case IDM_SET_F_S_LINES: case IDM_SET_F_S_LINESPOINTS: case IDM_SET_F_S_POINTS: case IDM_SET_F_S_STEPS: if (input_from_PM_Terminal) sprintf(input_from_PM_Terminal, "set style function %s; replot", SetDataStyles[(USHORT) SHORT1FROMMP(mp1) - IDM_SET_F_S_BOXES ]); gp_execute(0); return 0L; default : return WinDefWindowProc(hWnd, message, mp1, mp2); } /* switch(message) */ return(NULL); } /* ** Utility function: ** ** move check mark from menu item 1 to item 2 */ void ChangeCheck(HWND hWnd , USHORT wItem1 , USHORT wItem2) { HWND hMenu = WinWindowFromID(WinQueryWindow(hWnd, QW_PARENT), FID_MENU); if (wItem1 != 0) WinSendMsg(hMenu, MM_SETITEMATTR, MPFROM2SHORT(wItem1, TRUE), MPFROM2SHORT(MIA_CHECKED, 0)); if (wItem2 != 0) WinSendMsg(hMenu, MM_SETITEMATTR, MPFROM2SHORT(wItem2, TRUE), MPFROM2SHORT(MIA_CHECKED, MIA_CHECKED)); } /* ** Copy window to clipboard as bitmap. */ static void CopyToClipBrd(HWND hWnd) { HAB hab; HBITMAP hbm; HMF hmf; hab = WinQueryAnchorBlock(hWnd); WinEmptyClipbrd(hab); hbm = CopyToBitmap(hpsScreen); WinSetClipbrdData(hab,(ULONG) hbm, CF_BITMAP, CFI_HANDLE); hmf = CopyToMetaFile(hpsScreen); WinSetClipbrdData(hab,(ULONG) hmf, CF_METAFILE, CFI_HANDLE); WinCloseClipbrd(hab); } /* ** Copy ps to a bitmap. */ HBITMAP CopyToBitmap(HPS hps) { HPS hpsMem; HWND hwnd; HAB hab; PSZ psz[4] = {NULL, "Display", NULL, NULL}; HDC hdcMem, hdcScr; SIZEL sizel; BITMAPINFOHEADER2 bmp; HBITMAP hbm; LONG alData[2]; RECTL rectl; POINTL aptl[6]; hdcScr = GpiQueryDevice(hps); hwnd = WinWindowFromDC(hdcScr); hab = WinQueryAnchorBlock(hwnd); hdcMem = DevOpenDC(hab, OD_MEMORY, "*", 4L, (PDEVOPENDATA) psz, hdcScr); sizel.cx = 0/*GNUPAGE*/; sizel.cy = 0/*GNUPAGE*/; hpsMem = GpiCreatePS(hab, hdcMem, &sizel, PU_PELS | GPIA_ASSOC | GPIT_MICRO); GpiQueryDeviceBitmapFormats(hpsMem, 2L, alData); WinQueryWindowRect(hwnd, &rectl); memset(&bmp, 0, sizeof(bmp)); bmp.cbFix =(ULONG) sizeof(bmp); bmp.cx =(SHORT)(rectl.xRight - rectl.xLeft); bmp.cy =(SHORT)(rectl.yTop - rectl.yBottom); bmp.cPlanes = alData[0]; bmp.cBitCount = alData[1]; hbm = GpiCreateBitmap(hpsMem, &bmp, 0, NULL, NULL); GpiSetBitmap(hpsMem, hbm); aptl[0].x = 0; aptl[0].y = 0; aptl[1].x =(LONG) bmp.cx; aptl[1].y =(LONG) bmp.cy; aptl[2].x = 0; aptl[2].y = 0; GpiBitBlt(hpsMem, hps, 3L, aptl, ROP_SRCCOPY, BBO_IGNORE); GpiDestroyPS(hpsMem); DevCloseDC(hdcMem); return hbm; } /* ** Copy ps to a metafile. */ HMF CopyToMetaFile(HPS hps) { HDC hdcMF, hdcOld; HAB hab; HWND hwnd; PSZ psz[4] = {NULL,"Display",NULL,NULL}; HMF hmf; hdcOld = GpiQueryDevice(hps); hwnd = WinWindowFromDC(hdcOld); hab = WinQueryAnchorBlock(hwnd); hdcMF = DevOpenDC(hab, OD_METAFILE, "*", 4L, psz, hdcOld); DosRequestMutexSem(semHpsAccess,(ULONG) SEM_INDEFINITE_WAIT); GpiSetDrawingMode(hps, DM_DRAW); GpiAssociate(hps, 0); GpiAssociate(hps, hdcMF); ScalePS(hps); GpiDrawChain(hps); GpiAssociate(hps, 0); GpiAssociate(hps, hdcOld); DosReleaseMutexSem(semHpsAccess); hmf = DevCloseDC(hdcMF); return hmf; } /* ** Query INI file */ BOOL QueryIni(HAB hab) { BOOL bPos, bData, bSwp ; ULONG ulOpts[5]; HINI hini; ULONG ulCB; char *p; static SWP pauseswp; /* read gnuplot ini file */ hini = PrfOpenProfile(hab, szIniFile); ulCB = sizeof(ulShellPos); bPos = PrfQueryProfileData(hini, APP_NAME, INISHELLPOS, &ulShellPos, &ulCB); ulCB = sizeof(SWP); bSwp = PrfQueryProfileData(hini, APP_NAME, INIPAUSEPOS, &pauseswp, &ulCB); if (bSwp) pausedata.pswp = &pauseswp; ulCB = sizeof(ulOpts); bData = PrfQueryProfileData(hini, APP_NAME, INIOPTS, &ulOpts, &ulCB); if (bData) { bLineTypes =(BOOL)ulOpts[0]; bWideLines =(BOOL)ulOpts[1]; bColours =(BOOL)ulOpts[2]; ulPauseMode = ulOpts[3]; bPopFront =(BOOL)ulOpts[4]; } else { bLineTypes = FALSE; /* default values */ /* bWideLines = FALSE; */ bColours = TRUE; bPopFront = TRUE; ulPauseMode = 1; } ulCB = 4*sizeof(float); PrfQueryProfileData(hini, APP_NAME, INIFRAC, &qPrintData.xsize, &ulCB); if (PrfQueryProfileSize(hini, APP_NAME, INIPRDRIV, &ulCB)) { PDRIVDATA pdriv =(PDRIVDATA) malloc(ulCB); if (pdriv != NULL) { PrfQueryProfileData(hini, APP_NAME, INIPRDRIV, pdriv, &ulCB); qPrintData.pdriv = pdriv; qPrintData.cbpdriv = ulCB; } } PrfQueryProfileString(hini, APP_NAME, INIPRPR, "", qPrintData.szPrinterName, (long) sizeof qPrintData.szPrinterName); PrfQueryProfileString(hini, APP_NAME, INIFONT, INITIAL_FONT, szFontNameSize, FONTBUF); ulCB = sizeof(ulOpts); bData = PrfQueryProfileData(hini, APP_NAME, INICHAR, &ulOpts, &ulCB); if (bData) { lCharWidth = ulOpts[0]; lCharHeight = ulOpts[1]; } else { lCharWidth = 217; lCharHeight = 465; } ulCB = sizeof(bKeepRatio); bData = PrfQueryProfileData(hini, APP_NAME, INIKEEPRATIO, &ulOpts, &ulCB); if (bData) bKeepRatio =(BOOL)ulOpts[0]; /* Mousing: */ /* Ignore reading "Use mouse" --- no good idea to have mouse on by default. Maybe it was the reason of some crashes(mouse init before draw). ulCB = sizeof(useMouse); bData = PrfQueryProfileData(hini, APP_NAME, INIUSEMOUSE, &ulOpts, &ulCB); if (bData) useMouse =(int)ulOpts[0]; */ /* ignore reading mouse cursor(real, relative or pixels). Reason/bug: it does not switch the check mark in the menu, even though it works as expected. ulCB = sizeof(mouse_mode); bData = PrfQueryProfileData(hini, APP_NAME, INIMOUSECOORD, &ulOpts, &ulCB); if (bData) mouse_mode =(ULONG)ulOpts[0]; */ PrfCloseProfile(hini); if (qPrintData.szPrinterName[0] == '\0') { /* get default printer name */ PrfQueryProfileString(HINI_PROFILE, "PM_SPOOLER", "PRINTER", ";", qPrintData.szPrinterName, (long) sizeof qPrintData.szPrinterName); if ((p=strchr(qPrintData.szPrinterName, ';')) != NULL) *p = '\0'; } bShellPos = bPos; return bPos; } /* ** save data in ini file */ static void SaveIni(HWND hWnd) { SWP swp; HINI hini; ULONG ulOpts[5]; HAB hab; hab = WinQueryAnchorBlock(hWnd); hini = PrfOpenProfile(hab, szIniFile); if (hini != NULLHANDLE) { WinQueryWindowPos(hwndFrame, &swp); ulPlotPos[0] = swp.x; ulPlotPos[1] = swp.y; ulPlotPos[2] = swp.cx; ulPlotPos[3] = swp.cy; PrfWriteProfileData(hini, APP_NAME, INISHELLPOS, &ulPlotPos, sizeof(ulPlotPos)); if (pausedata.pswp != NULL) PrfWriteProfileData(hini, APP_NAME, INIPAUSEPOS, pausedata.pswp, sizeof(SWP)); ulOpts[0] =(ULONG)bLineTypes; ulOpts[1] =(ULONG)bWideLines; ulOpts[2] =(ULONG)bColours; ulOpts[3] = ulPauseMode; ulOpts[4] =(ULONG)bPopFront; PrfWriteProfileData(hini, APP_NAME, INIOPTS, &ulOpts, sizeof(ulOpts)); PrfWriteProfileData(hini, APP_NAME, INIFRAC, &qPrintData.xsize, 4*sizeof(float)); if (qPrintData.pdriv != NULL) PrfWriteProfileData(hini, APP_NAME, INIPRDRIV, qPrintData.pdriv, qPrintData.cbpdriv); PrfWriteProfileString(hini, APP_NAME, INIPRPR, qPrintData.szPrinterName[0] == '\0'? NULL: qPrintData.szPrinterName); PrfWriteProfileString(hini, APP_NAME, INIFONT, szFontNameSize); ulOpts[0] =(ULONG)lCharWidth; ulOpts[1] =(ULONG)lCharHeight; PrfWriteProfileData(hini, APP_NAME, INICHAR, &ulOpts, sizeof(ulOpts)); PrfWriteProfileData(hini, APP_NAME, INIKEEPRATIO, &bKeepRatio, sizeof(bKeepRatio)); /* Mouse stuff */ /* Ignore reading "Use mouse" --- no good idea to have mouse on by default. Maybe it was the reason of some crashes(mouse init before draw). PrfWriteProfileData(hini, APP_NAME, INIUSEMOUSE, &useMouse, sizeof(useMouse)); */ /* Do not write the mouse coord. mode. PrfWriteProfileData(hini, APP_NAME, INIMOUSECOORD, &mouse_mode, sizeof(mouse_mode)); */ PrfCloseProfile(hini); } else { WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, "Can't write ini file", APP_NAME, 0, MB_OK | MB_ICONEXCLAMATION); } } /* ** Paint the screen with current data */ static void DoPaint(HWND hWnd, HPS hps) { static RECTL rectl; if (tidDraw != 0) { /* already drawing - stop it; include the rectl now being drawn in, in the update region; and return without calling beginpaint so that the paint message is resent */ GpiSetStopDraw(hpsScreen, SDW_ON); DosSleep(1); WinInvalidateRect(hWnd, &rectl, TRUE); return; } /* winbeginpaint here, so paint message is not resent when we return, then spawn a thread to do the drawing */ WinBeginPaint(hWnd, hps, &rectl); /*rl */ tidDraw = _beginthread(ThreadDraw, NULL, 32768, NULL); } /* ** Thread to draw plot on screen */ static void ThreadDraw(void* arg) { HAB hab = WinInitialize(0); InitScreenPS(); DosRequestMutexSem(semHpsAccess,(ULONG) SEM_INDEFINITE_WAIT); ScalePS(hpsScreen); GpiSetStopDraw(hpsScreen, SDW_OFF); GpiSetDrawingMode(hpsScreen, DM_DRAW); GpiDrawChain(hpsScreen); DrawRuler(); DisplayStatusLine(hpsScreen); WinEndPaint(hpsScreen); DosReleaseMutexSem(semHpsAccess); WinTerminate(hab); tidDraw = 0; #if 0 /* This does not work here(why?!), thus moved to pm.trm: PM_text(); */ gp_exec_event(GE_plotdone, mx, my, 0, 0, 0); /* enable again zoom and scale by mouse motions */ #endif } /* ** Initialise the screen ps for drawing */ HPS InitScreenPS() { RECTL rectClient; int nColour = 0; GpiResetPS(hpsScreen, GRES_ATTRS); #if 0 /* Use default background color(the original version) */ GpiErase(hpsScreen); WinQueryWindowRect(hApp,(PRECTL)&rectClient); #else /* PM 14.3.2000: Use always white background */ WinQueryWindowRect(hApp,(PRECTL)&rectClient); WinFillRect(hpsScreen,&rectClient,CLR_WHITE); #endif if (bKeepRatio) { double ratio = 1.560; double xs = rectClient.xRight - rectClient.xLeft; double ys = rectClient.yTop - rectClient.yBottom; if (ys > xs/ratio) { /* reduce ys to fit */ rectClient.yTop = rectClient.yBottom +(int)(xs/ratio); } else if (ys < xs/ratio) { /* reduce xs to fit */ rectClient.xRight = rectClient.xLeft +(int)(ys*ratio); } } else /* PM: why this -10? Otherwise the right axis is too close to * the right border. However, this -10 should be taken into * account for mousing! Or can it be inside a transformation? */ rectClient.xRight -= 10; GpiSetPageViewport(hpsScreen, &rectClient); if (!bColours) { int i; nColour = 16; alColourTable[0] = 0xFFFFFF; for (i=1; i<nColour; i++) alColourTable[i] = 0; } if (bPMPaletteMode) { int i; GpiCreateLogColorTable(hpsScreen, LCOL_RESET, LCOLF_CONSECRGB, 0, nColour, alColourTable); if (!lCols_init) { /* Ilya: avoid white line on white background */ lCols_init = 1; GpiQueryLogColorTable(hpsScreen, 0, 0, 16, alColourTable + 2); alColourTable[2+CLR_WHITE] = 0xffffff; /* -2 */ alColourTable[2+CLR_BLACK] = 0; /* -1 */ bkColor = alColourTable[2+CLR_BACKGROUND]; i = -1; while (i++ < 16) { if (alColourTable[2+lCols[i]] == bkColor) { while (i++ < 16) lCols[i - 1] = lCols[i]; lCols_num--; break; } } } /* init rgb_colors: simple index translation only */ for (i=0; i<18; i++) rgb_colors[i] = i + CLR_WHITE; } else { if (!lCols_init) { int i; lCols_init = 1; /* get RGB values of all CLR_xxx constants */ for (i=0; i<18; i++) rgb_colors[i] = GpiQueryRGBColor(hpsScreen, LCOLOPT_REALIZED, i + CLR_WHITE ); } GpiCreateLogColorTable(hpsScreen, LCOL_RESET, LCOLF_RGB, 0, 0, 0); } return hpsScreen; } /* ** Get a font to use ** Scale the plot area to world coords for subsequent plotting */ short ScalePS(HPS hps) { SelectFont(hps, szFontNameSize); return 0; } /* ** Select a named and sized outline font */ void SelectFont(HPS hps, char *szFontNameSize) { HDC hdc; FATTRS fat; LONG xDeviceRes, yDeviceRes; POINTL ptlFont; SIZEF sizfx; static LONG lcid = 0L; static char *szFontName; static short shPointSize; sscanf(szFontNameSize, "%hd", &shPointSize); szFontName = strchr(szFontNameSize, '.') + 1; fat.usRecordLength = sizeof fat; fat.fsSelection = 0; fat.lMatch = 0; fat.idRegistry = 0; fat.usCodePage = codepage; /*GpiQueryCp(hps); */ fat.lMaxBaselineExt = 0; fat.lAveCharWidth = 0; fat.fsType = 0; fat.fsFontUse = FATTR_FONTUSE_OUTLINE | FATTR_FONTUSE_TRANSFORMABLE; strcpy(fat.szFacename, szFontName); if (tabFont[0].name !=NULL) free(tabFont[0].name); tabFont[0].name = strdup(szFontName); tabFont[0].lcid = 10L; lcid = GpiQueryCharSet(hps); if (lcid != 10L) lcid = 10L; else { GpiSetCharSet(hps, 0L); GpiDeleteSetId(hps, lcid); } GpiCreateLogFont(hps, NULL, lcid, &fat); GpiSetCharSet(hps, lcid); hdc = GpiQueryDevice(hps); DevQueryCaps(hdc, CAPS_HORIZONTAL_RESOLUTION, 1L, &xDeviceRes); DevQueryCaps(hdc, CAPS_VERTICAL_RESOLUTION, 1L, &yDeviceRes); /* Find desired font size in pixels */ ptlFont.x = 2540L *(long)shPointSize / 72L; ptlFont.y = 2540L *(long)shPointSize / 72L; /* Set the character box */ sizfx.cx = MAKEFIXED(ptlFont.x, 0); sizfx.cy = MAKEFIXED(ptlFont.y, 0); lVOffset = ptlFont.y; sizBaseFont = sizfx; GpiSetCharBox(hps, &sizfx); /* set up some useful globals */ { FONTMETRICS fm; GpiQueryFontMetrics(hps, sizeof(FONTMETRICS), &fm); lBaseSubOffset = -fm.lSubscriptYOffset; lBaseSupOffset = fm.lSuperscriptYOffset; lSubOffset = lBaseSubOffset; lSupOffset = lBaseSupOffset; lCharHeight = fm.lMaxAscender*1.2; lCharWidth = fm.lAveCharWidth; sizBaseSubSup.cx = MAKEFIXED(ptlFont.x*0.7, 0); sizBaseSubSup.cy = MAKEFIXED(ptlFont.y*0.7, 0); } sizCurFont = sizBaseFont; sizCurSubSup = sizBaseSubSup; #if 0 if (bNewFont) { /* EditCharCell(hps, &sizfx); */ bNewFont = FALSE; } #endif } /* ** Select a named and sized outline(adobe) font */ void SwapFont(HPS hps, char *szFNS) { HDC hdc; FATTRS fat; LONG xDeviceRes, yDeviceRes; POINTL ptlFont; static LONG lcid = 0L; static int itab = 1; static char *szFontName; static short shPointSize; if (szFNS == NULL) { /* restore base font */ sizCurFont = sizBaseFont; sizCurSubSup = sizBaseSubSup; lSubOffset = lBaseSubOffset; lSupOffset = lBaseSupOffset; GpiSetCharSet(hps, 10); GpiSetCharBox(hps, &sizBaseFont); } else { sscanf(szFNS, "%hd", &shPointSize); szFontName = strchr(szFNS, '.') + 1; { int i; lcid = 0; for (i=0; i<itab; i++) { if (strcmp(szFontName, tabFont[i].name) == 0) { lcid = tabFont[i].lcid; break; } } } if (lcid == 0) { fat.usRecordLength = sizeof fat; fat.fsSelection = 0; fat.lMatch = 0; fat.idRegistry = 0; fat.usCodePage = codepage; /*GpiQueryCp(hps); */ fat.lMaxBaselineExt = 0; fat.lAveCharWidth = 0; fat.fsType = 0; fat.fsFontUse = FATTR_FONTUSE_OUTLINE | FATTR_FONTUSE_TRANSFORMABLE; strcpy(fat.szFacename, szFontName); tabFont[itab].name = strdup(szFontName); lcid = itab+10; tabFont[itab].lcid = lcid; ++itab; /* lcid = 11L; */ GpiSetCharSet(hps, 0L); GpiDeleteSetId(hps, lcid); GpiCreateLogFont(hps, NULL, lcid, &fat); } /* if (lcid) */ GpiSetCharSet(hps, lcid); hdc = GpiQueryDevice(hps); DevQueryCaps(hdc, CAPS_HORIZONTAL_RESOLUTION, 1L, &xDeviceRes); DevQueryCaps(hdc, CAPS_VERTICAL_RESOLUTION, 1L, &yDeviceRes); /* Find desired font size in pixels */ ptlFont.x = 2540L *(long)shPointSize / 72L; ptlFont.y = 2540L *(long)shPointSize / 72L; /* Set the character box */ sizCurFont.cx = MAKEFIXED(ptlFont.x, 0); sizCurFont.cy = MAKEFIXED(ptlFont.y, 0); /* lVOffset = ptlFont.y; */ GpiSetCharBox(hps, &sizCurFont); sizCurSubSup.cx = MAKEFIXED(ptlFont.x*0.7, 0); sizCurSubSup.cy = MAKEFIXED(ptlFont.y*0.7, 0); /* set up some useful globals */ { FONTMETRICS fm; GpiQueryFontMetrics(hps, sizeof(FONTMETRICS), &fm); lSubOffset = -fm.lSubscriptYOffset; lSupOffset = fm.lSuperscriptYOffset; } } } typedef struct image_list_entry { PBITMAPINFO2 pbmi; PBYTE image; struct image_list_entry *next; } image_list_entry; static image_list_entry *image_list = NULL; /* ** Thread to read plot commands from GNUPLOT pm driver. ** Opens named pipe, then clears semaphore to allow GNUPLOT driver to proceed. ** Reads commands and builds a command list. */ static void ReadGnu(void* arg) { HPIPE hRead = 0L; POINTL ptl; long lOldLine = 0; BOOL bPath = FALSE; BOOL bDots = FALSE; ULONG rc; USHORT usErr; ULONG cbR; USHORT i; unsigned char buff[2]; HEV hev; static char *szPauseText = NULL; ULONG ulPause; char *pszPipeName, *pszSemName; HPS hps; HAB hab; int linewidth = DEFLW; HPAL pm3d_hpal = 0; /* palette used for make_palette() */ HPAL pm3d_hpal_old = 0; /* default palette used before make_palette() */ LONG pm3d_color = 0; /* current colour (used if it is >0) */ ULONG *rgbTable = NULL; /* current colour table (this is a 'virtual' palette) */ hab = WinInitialize(0); DosEnterCritSec(); pszPipeName = malloc(256); pszSemName = malloc(256); DosExitCritSec(); strcpy(pszPipeName, "\\pipe\\"); strcpy(pszSemName, "\\sem32\\"); strcat(pszPipeName, szIPCName); strcat(pszSemName, szIPCName); /* open a named pipe for communication with gnuplot */ rc = DosCreateNPipe(pszPipeName, &hRead, NP_ACCESS_DUPLEX|NP_NOINHERIT|NP_NOWRITEBEHIND , 1|NP_WAIT|NP_READMODE_MESSAGE|NP_TYPE_MESSAGE, PIPEBUF, PIPEBUF, 0xFFFFFFFF); hev = 0; /* OK, gnuplot can try to open npipe ... */ DosOpenEventSem(pszSemName, &hev); DosPostEventSem(hev); /* attach to gnuplot */ server: if (DosConnectNPipe(hRead) == 0L) { WinPostMsg(hSysMenu, MM_SETITEMATTR, MPFROM2SHORT(SC_CLOSE, TRUE), MPFROM2SHORT(MIA_DISABLED, MIA_DISABLED)); /* store graphics commands */ /* use semaphore to prevent problems with drawing while reallocating the command buffers */ DosRead(hRead, &ppidGnu, 4, &cbR); sprintf(mouseShareMemName, "\\SHAREMEM\\GP%i_Mouse_Input",(int)ppidGnu); if (DosGetNamedSharedMem(&input_from_PM_Terminal, mouseShareMemName, PAG_WRITE)) { /*now: gray menu items; old code: DosBeep(1440L,1000L); // indicates error */ input_from_PM_Terminal = 0; } semInputReady = 0; /* semaphore 'semInputReady' must be open later in order to avoid problems */ /* with the server mode; also 'bhave_*' init here because of server */ /* DosPostEventSem(semStartSeq); // once we've got pidGnu */ WinPostMsg(hApp, WM_GPSTART, 0, 0); hps = hpsScreen; InitScreenPS(); while (1) { usErr=BufRead(hRead,buff, 1, &cbR); if (usErr != 0) break; if (breakDrawing) { /* PM: drawing has been stopped(by Ctrl-C)... */ hps = 0; /* ...thus drawings go to nowhere... */ if (*buff == SET_TEXT) { /* ...unless 'plot finished' command */ POINTL p; hps = hpsScreen; /* drawings back to screen */ breakDrawing = 0; GpiSetColor(hps, RGB_TRANS(CLR_RED)); /* cross the unfinished plot */ GpiBeginPath(hps, 1); p.x = p.y = 0; GpiMove(hps, &p); p.x = 19500; p.y = 12500; GpiLine(hps, &p); p.x = 0; p.y = 12500; GpiMove(hps, &p); p.x = 19500; p.y = 0; GpiLine(hps, &p); GpiEndPath(hps); GpiStrokePath(hps, 1, 0); } } switch (*buff) { case SET_GRAPHICS : /* enter graphics mode */ { image_list_entry *ile; if (tidDraw != 0) { /* already drawing - stop it */ GpiSetStopDraw(hpsScreen, SDW_ON); while (tidDraw != 0) DosSleep(1); } /* wait for access to command list and lock it */ /* DosWaitEventSem(semDrawDone, SEM_INDEFINITE_WAIT); */ /* DosEnterCritSec(); */ DosRequestMutexSem(semHpsAccess,(ULONG) SEM_INDEFINITE_WAIT); InitScreenPS(); ScalePS(hps); /* DosResetEventSem(semDrawDone, &ulCount); */ GpiSetDrawingMode(hps, DM_DRAWANDRETAIN); for (i=1;i<=iSeg;i++) GpiDeleteSegment(hps, i); iSeg = 1; GpiOpenSegment(hps, iSeg); /* DosExitCritSec(); */ GpiSetLineEnd(hps, LINEEND_ROUND); GpiSetLineWidthGeom(hps, linewidth); GpiSetCharBox(hps, &sizBaseFont); /* free image buffers from previous plot, if any */ while (image_list) { DEBUG_IMAGE(("freeing image from last plot")); ile = image_list; image_list = ile->next; free(ile->image); free(ile->pbmi); free(ile); } break; } case GR_QUERY : /* query terminal info */ /* mouseable gnupmdrv sends greetings to mouseable PM terminal */ if (mouseTerminal) { int i=0xABCD; DosWrite(hRead, &i, sizeof(int), &cbR); } DosWrite(hRead, &lCharWidth, sizeof(int), &cbR); DosWrite(hRead, &lCharHeight, sizeof(int), &cbR); break; case SET_TEXT : /* leave graphics mode(graph completed) */ if (bPath) { GpiEndPath(hps); GpiStrokePath(hps, 1, 0); bPath = FALSE; } GpiCloseSegment(hps); DrawRuler(); DisplayStatusLine(hps); /* DosPostEventSem(semDrawDone); */ DosReleaseMutexSem(semHpsAccess); WinPostMsg(hApp, WM_GNUPLOT, 0L, 0L); break; case GR_RESET : /* gnuplot has reset drivers, allow user to kill this */ WinPostMsg(hSysMenu, MM_SETITEMATTR, MPFROM2SHORT(SC_CLOSE, TRUE), MPFROM2SHORT(MIA_DISABLED,(USHORT)0)); /* if we are keeping us on the screen, wait for new connection */ if (bServer||bPersist) { DosDisConnectNPipe(hRead); goto server; } break; case GR_RESUME : { /* resume after multiplot */ DosRequestMutexSem(semHpsAccess,(ULONG) SEM_INDEFINITE_WAIT); /* DosWaitEventSem(semDrawDone, SEM_INDEFINITE_WAIT); */ iSeg++; /* DosResetEventSem(semDrawDone, &ulCount); */ GpiSetDrawingMode(hps, DM_DRAWANDRETAIN); GpiOpenSegment(hps, iSeg); break; } case 's' : /* suspend after multiplot */ break; case GR_MOVE : /* move */ case GR_DRAW : /* draw vector */ { LONG curr_color; if (pm3d_color >= 0) { curr_color = GpiQueryColor(hps); GpiSetColor(hps, pm3d_color); } if (*buff=='M') { if (bPath) { GpiEndPath(hps); GpiStrokePath(hps, 1, 0); bPath = FALSE; } } else { if (bWideLines/*bWideLines*/ && !bPath) { GpiBeginPath(hps, 1); bPath = TRUE; } } BufRead(hRead,&ptl.x, 2*sizeof(int), &cbR); if ((*buff=='V') && bDots) ptl.x += 5; else if ((*buff=='M') && bDots) ptl.x -= 5; if (*buff == 'M') LMove(hps, &ptl); else LLine(hps, &ptl); if (pm3d_color >= 0) GpiSetColor(hps, curr_color); } break; case GR_PAUSE : /* pause */ { int len; pausing = 1; BufRead(hRead, &len, sizeof(int), &cbR); len = (len + sizeof(int) - 1) / sizeof(int); if (len > 0){ /* get pause text */ DosEnterCritSec(); szPauseText = malloc(len*sizeof(int)); DosExitCritSec(); BufRead(hRead,szPauseText, len*sizeof(int), &cbR); } if (ulPauseMode != PAUSE_GNU) { /* pause and wait for semaphore to be cleared */ DosResetEventSem(semPause, &ulPause); WinPostMsg(hApp, WM_PAUSEPLOT,(MPARAM) szPauseText, 0L); DosWaitEventSem(semPause, SEM_INDEFINITE_WAIT); } else { /* gnuplot handles pause */ ulPauseReply = 2; } DosEnterCritSec(); if (szPauseText != NULL) free(szPauseText); szPauseText = NULL; DosExitCritSec(); /* reply to gnuplot so it can continue */ DosWrite(hRead, &ulPauseReply, sizeof(int), &cbR); pausing = 0; break; } case GR_ENH_TEXT : /* write enhanced text */ if (bPath) { GpiEndPath(hps); GpiStrokePath(hps, 1, 0); bPath = FALSE; } { unsigned int x, y, len; unsigned int mode; int textwidth, textheight; char *str; POINTL aptl[TXTBOX_COUNT]; /* read x, y, mode, len */ BufRead(hRead, &x, sizeof(int), &cbR); BufRead(hRead, &y, sizeof(int), &cbR); BufRead(hRead, &mode, sizeof(int), &cbR); BufRead(hRead, &len, sizeof(int), &cbR); DosEnterCritSec(); len =(len+sizeof(int)-1)/sizeof(int); if (len == 0) len = 1; /*?? how about read */ str = malloc(len*sizeof(int)); *str = '\0'; DosExitCritSec(); BufRead(hRead, str, len*sizeof(int), &cbR); GpiQueryTextBox(hps, strlen(str), str, TXTBOX_COUNT, aptl); textwidth = aptl[TXTBOX_CONCAT].x; textheight = aptl[TXTBOX_CONCAT].y; /* only display text if requested */ if (mode & 0x01) { LONG curr_color; if (pm3d_color >= 0) { curr_color = GpiQueryColor(hps); GpiSetColor(hps, pm3d_color); } ptl.x = (LONG) (x + multLineVert * (lVOffset / 4)); ptl.y = (LONG) (y - multLineHor * (lVOffset / 4)); GpiSetBackMix(hps, BM_LEAVEALONE); GpiCharStringAt(hps, &ptl, strlen(str), str); if (pm3d_color >= 0) GpiSetColor(hps, curr_color); } /* report back textwidth */ DosWrite(hRead, &textwidth, sizeof(textwidth), &cbR); DosWrite(hRead, &textheight, sizeof(textheight), &cbR); DosEnterCritSec(); free(str); DosExitCritSec(); break; } case GR_TEXT : /* write text */ /* read x, y, len */ if (bPath) { GpiEndPath(hps); GpiStrokePath(hps, 1, 0); bPath = FALSE; } { unsigned int x, y, len; int sw; char *str; LONG curr_color; #ifndef PM_KEEP_OLD_ENHANCED_TEXT POINTL aptl[TXTBOX_COUNT]; #endif BufRead(hRead,&x, sizeof(int), &cbR); BufRead(hRead,&y, sizeof(int), &cbR); BufRead(hRead,&len, sizeof(int), &cbR); DosEnterCritSec(); len =(len+sizeof(int)-1)/sizeof(int); if (len == 0) len = 1; /*?? how about read */ str = malloc(len*sizeof(int)); *str = '\0'; DosExitCritSec(); BufRead(hRead, str, len*sizeof(int), &cbR); if (pm3d_color >= 0) { curr_color = GpiQueryColor(hps); GpiSetColor(hps, pm3d_color); } #ifdef PM_KEEP_OLD_ENHANCED_TEXT sw = QueryTextBox(hps, strlen(str), str); #else GpiQueryTextBox(hps, strlen(str), str, TXTBOX_COUNT, aptl); sw = aptl[TXTBOX_BOTTOMRIGHT].x; #endif switch (jmode) { case LEFT: sw = 0; break; case CENTRE: sw /= -2; break; case RIGHT: sw *= -1; break; } ptl.x = (LONG) (x + multLineHor * sw + multLineVert * (lVOffset / 4)); ptl.y = (LONG) (y + multLineVert * sw - multLineHor * (lVOffset / 4)); GpiSetBackMix(hps, BM_LEAVEALONE); #ifdef PM_KEEP_OLD_ENHANCED_TEXT if (bEnhanced) CharStringAt(hps, ptl.x, ptl.y, strlen(str) , str); else #endif GpiCharStringAt(hps, &ptl, strlen(str), str); if (pm3d_color >= 0) GpiSetColor(hps, curr_color); DosEnterCritSec(); free(str); DosExitCritSec(); break; } case SET_JUSTIFY : /* justify */ BufRead(hRead, &jmode, sizeof(int), &cbR); //printf( "SET_JUSTIFY: %i", jmode ); break; case SET_ANGLE : /* text angle */ { int ta, t1; GRADIENTL grdl; if (bPath) { GpiEndPath(hps); GpiStrokePath(hps, 1, 0); bPath = FALSE; } BufRead(hRead, &ta, sizeof(int), &cbR); t1 = ta % 360; if (t1 < 0) t1 += 360; switch (t1) { case 0: grdl.x = 1L; grdl.y = 0L; multLineHor = 1; multLineVert = 0; break; case 90: grdl.x = 0L; grdl.y = 1L; multLineHor = 0; multLineVert = 1; break; case 180: grdl.x = -1L; grdl.y = 0L; multLineHor = -1; multLineVert = 0; break; case 270: grdl.x = 0L; grdl.y = -1L; multLineHor = 0; multLineVert = -1; break; default: { double t = t1 * M_PI/180; grdl.x = (LONG) (100 * cos(t)); grdl.y = (LONG) (100 * sin(t)); multLineHor = cos(t); multLineVert = sin(t); } /* default case */ } /* switch(t1) */ GpiSetCharAngle(hps, &grdl); break; } case SET_LINE : /* line type */ { int lt, col; if (bPath) { GpiEndPath(hps); GpiStrokePath(hps, 1, 0); bPath = FALSE; } BufRead(hRead,<, sizeof(int), &cbR); /* linetype = -2 axes, -1 border, 0 arrows, all to 0 */ col = lt; if (lt == -2) GpiSetLineWidthGeom(hps, DEFLW*0.85); else if (lt == -1) GpiSetLineWidthGeom(hps, DEFLW*0.6); else GpiSetLineWidthGeom(hps, linewidth); if (lt < 0) lt = 0; lt =(lt%8); col =(col+2)%16; GpiLabel(hps, lLineTypes[lt]); lOldLine = lt; LType((bLineTypes) ? lt : 0); /* GpiSetLineType(hps, (bLineTypes) ? lLineTypes[lt] : lLineTypes[0]); */ /* maintain some flexibility here in case we don't want * the model T option */ if (bColours) GpiSetColor(hps, RGB_TRANS(lCols[col])); /* else GpiSetColor(hps, RGB_TRANS(CLR_BLACK)); */ else GpiSetColor(hps, RGB_TRANS(CLR_NEUTRAL)); pm3d_color = -1; /* switch off using pm3d colours */ break; } case SET_FILLBOX : /* fill box */ { int style; unsigned int x, y, w, h; POINTL pt; BufRead(hRead,&style, sizeof(style), &cbR); BufRead(hRead,&x, sizeof(x), &cbR); BufRead(hRead,&y, sizeof(y), &cbR); BufRead(hRead,&w, sizeof(w), &cbR); BufRead(hRead,&h, sizeof(h), &cbR); pt.x = x; pt.y = y; GpiMove(hpsScreen, &pt); pt.x += w; pt.y += h; switch(style & 0xf) { case FS_SOLID: case FS_TRANSPARENT_SOLID: { /* style == 1 --> fill with intensity according to filldensity */ static const ULONG patternlist[] = { PATSYM_NOSHADE, PATSYM_DENSE8, PATSYM_DENSE7, PATSYM_DENSE6, PATSYM_DENSE5, PATSYM_DENSE4, PATSYM_DENSE3, PATSYM_DENSE2, PATSYM_DENSE1, PATSYM_SOLID }; unsigned pattern; pattern = (unsigned) trunc(9*((style >> 4) / 100.0) + 0.5); if (pattern > 10) pattern = 9; /* only 10 patterns in list */ GpiSetMix(hps, FM_OVERPAINT); GpiSetBackMix(hps, BM_OVERPAINT); GpiSetPattern(hps, patternlist[pattern]); break; } case FS_PATTERN: case FS_TRANSPARENT_PATTERN: { /* style == 2 --> fill with pattern according to fillpattern */ /* the upper 3 nibbles of 'style' contain pattern number */ static const ULONG patternlist[] = { PATSYM_NOSHADE, PATSYM_DIAGHATCH, PATSYM_HATCH, PATSYM_SOLID, PATSYM_DIAG4, PATSYM_DIAG2, PATSYM_DIAG3, PATSYM_DIAG1 }; unsigned pattern; pattern = (style >> 4) % 8; GpiSetMix(hps, FM_OVERPAINT); GpiSetBackMix(hps, BM_OVERPAINT); GpiSetPattern(hps, patternlist[pattern]); break; } case FS_EMPTY: default: { /* style == 0 or unknown --> fill with background color */ GpiSetMix(hps, FM_OVERPAINT); GpiSetBackMix(hps, BM_OVERPAINT); //GpiSetColor(hps, RGB_TRANS(CLR_BACKGROUND)); // fixes 'with boxes' white on white GpiSetPattern(hps, PATSYM_SOLID); } } GpiBox(hps, DRO_FILL, &pt, 0,0); break; } case SET_LINEWIDTH : /* line width */ { int lw; if (bPath) { GpiEndPath(hps); GpiStrokePath(hps, 1, 0); bPath = FALSE; } BufRead(hRead,&lw, sizeof(int), &cbR); GpiSetLineWidthGeom(hps, DEFLW*lw/100); linewidth = DEFLW*lw/100; break; } case SET_POINTMODE : /* points mode */ { int lt; BufRead(hRead,<, sizeof(int), &cbR); /* 1: enter point mode, 0: exit */ if (bLineTypes) { if (lt==1) LType(0); else LType(lOldLine); #if 0 if (lt == 1) lOldLine = GpiSetLineType(hps, lLineTypes[0]); else GpiSetLineType(hps, lOldLine); #endif /* 0 */ } #if 0 if (lt == 1) GpiSetLineWidthGeom(hps, 20); else GpiSetLineWidthGeom(hps, 50); #endif /* 0 */ bDots = lt; } break; case SET_FONT : /* set font */ { int len; BufRead(hRead, &len, sizeof(int), &cbR); len = (len + sizeof(int) - 1) / sizeof(int); if (len == 0) { SwapFont(hps, NULL); strcpy(szCurrentFontNameSize, szFontNameSize); } else { char font[FONTBUF]; char *p, *tmp, *str; tmp = str = malloc(len * sizeof(int)); BufRead(hRead, str, len * sizeof(int), &cbR); p = strchr(str, ','); if (p==NULL) strcpy(font, "10"); else { *p = '\0'; strcpy(font, p+1); } strcat(font, "."); /* allow abbreviation of some well known font names */ FontExpand(str); strcat(font, str); free(tmp); SwapFont(hps, font); strcpy(szCurrentFontNameSize, font); } /* else(len==0) */ break; } case GR_QUERY_FONT : /* query current font */ { int namelen; namelen = strlen(szCurrentFontNameSize); DosWrite(hRead, &namelen, sizeof(int), &cbR); DosWrite(hRead, szCurrentFontNameSize, namelen, &cbR); /* FIXME: is padding necessary? */ break; } case SET_OPTIONS : /* set options */ { int len; char *str; BufRead(hRead,&len, sizeof(int), &cbR); len =(len + sizeof(int) - 1) / sizeof(int); bWideLines = FALSE; /* reset options */ #ifdef PM_KEEP_OLD_ENHANCED_TEXT bEnhanced = FALSE; #endif if (len > 0) { char *p; p = str = malloc(len * sizeof(int)); BufRead(hRead, str, len * sizeof(int), &cbR); while ((p=strchr(p,'-')) != NULL) { ++p; if (*p == 'w') bWideLines = TRUE; #ifdef PM_KEEP_OLD_ENHANCED_TEXT if (*p == 'e') bEnhanced = TRUE; #endif ++p; } free(str); } break; } case SET_SPECIAL : /* set special options */ { char opt; #ifdef PM_KEEP_OLD_ENHANCED_TEXT char param; static int prev_bEnhanced = 0; #endif BufRead(hRead,&opt, 1, &cbR); switch (opt) { #ifdef PM_KEEP_OLD_ENHANCED_TEXT case 'e': /* enhanced mode on, off and restore */ BufRead(hRead,¶m, 1, &cbR); switch (param) { case '0': prev_bEnhanced = bEnhanced; bEnhanced = 0; break; case '1': prev_bEnhanced = bEnhanced; bEnhanced = 1; break; case '2': bEnhanced = prev_bEnhanced; break; } break; #endif case 'c': /* set codepage */ BufRead(hRead,&codepage, sizeof(codepage), &cbR); break; case '^': /* raise window */ WinSetWindowPos( hwndFrame, HWND_TOP, 0,0,0,0, SWP_RESTORE|SWP_SHOW|SWP_ACTIVATE|SWP_ZORDER ) ; WinSetFocus( HWND_DESKTOP, hApp ) ; break; case '_': /* lower window */ WinSetWindowPos( hwndFrame, HWND_BOTTOM, 0,0,0,0, SWP_ZORDER ) ; break; } break; } case PUT_TMPTEXT : { /* put_tmptext(int i, char c[]) term API */ /* i = 0 at statusline, 1,2: at corners of zoom box, with \r separating text */ int where, l; static char *text = NULL; static int text_alloc = -1; /* Position of the "table" of values resulting from * mouse movement(and clicks). Negative y value would * position it at the top of the window---not * implemented. */ BufRead(hRead,&where, sizeof(int), &cbR); BufRead(hRead,&l, sizeof(int), &cbR); if (text_alloc < l) text = realloc(text, text_alloc = l+10); BufRead(hRead,&text[0], l, &cbR); switch (where) { case 0: UpdateStatusLine(hps,text); break; case 1: case 2: break; /* not implemented */ } break; } /* Implementation problems(I haven't understood that from * .INF doc): what is the difference between * GpiCreateLogColorTable and GpiCreatePalette? */ case GR_MAKE_PALETTE : { unsigned char c; int smooth_colors; LONG lRetCount; /* read switch */ BufRead(hRead, &c, sizeof(c), &cbR); if (c == 0) { /* gnuplot asks for the number of colours in palette */ smooth_colors = (bPMPaletteMode ? (256 - nColors) : RGB_PALETTE_SIZE); DosWrite(hRead, &smooth_colors, sizeof(int), &cbR); DEBUG_COLOR(("GR_MAKE_PALETTE: max %i colours", smooth_colors)); break; } /* read the number of colours for the palette */ BufRead(hRead, &smooth_colors, sizeof(int), &cbR); free(rgbTable); rgbTable = malloc(smooth_colors * sizeof(ULONG)); /* append new RGB table after */ DEBUG_COLOR(("GR_MAKE_PALETTE: reading palette with %i colours", smooth_colors)); BufRead(hRead, &rgbTable[bPMPaletteMode ? nColors : 0], smooth_colors * sizeof(ULONG), &cbR); if (bPMPaletteMode) { int i; ULONG cclr; /* preserve the first nColors entries of current palette */ /* retrieve the current table */ lRetCount = GpiQueryLogColorTable(hps, 0L, 0L, nColors, alColourTable); if ((lRetCount > 0) && (lRetCount != nColors)) /* ring for developers! */ DosBeep(880, 777); for (i=0; i<nColors; i++) rgbTable[i] = alColourTable[i]; if (pm3d_hpal != 0) GpiDeletePalette(pm3d_hpal); pm3d_hpal = GpiCreatePalette(hab, 0L, LCOLF_CONSECRGB, (long) (nColors + smooth_colors), rgbTable); pm3d_hpal_old = GpiSelectPalette(hps, pm3d_hpal); /* tell presentation manager to use the new palette */ WinRealizePalette(WinWindowFromDC(hdcScreen), hps, &cclr); } break; } case GR_RELEASE_PALETTE : #if 0 /* FIXME: REMOVE THIS ROUTINE COMPLETELY! */ if (pm3d_hpal) { GpiDeletePalette(pm3d_hpal); pm3d_hpal = 0; } /* GpiSelectPalette(hps, pm3d_hpal_old); */ #endif break; case GR_SET_COLOR : { /* FIXME: usgage of uchar limits the size of the 'virtual' palette to 256 entries. (see also RGB_PALETTE_SIZE) */ unsigned char c; BufRead(hRead, &c, sizeof(c), &cbR); if (bPMPaletteMode) pm3d_color = c + nColors; else pm3d_color = rgbTable[c]; DEBUG_COLOR(("GR_SET_COLOR: %i -> 0x%x", (int)c, pm3d_color)); break; } case GR_SET_RGBCOLOR : { int rgb_color; BufRead(hRead, &rgb_color, sizeof(rgb_color), &cbR); /* Find an approximate color in the current palette */ if (bPMPaletteMode) pm3d_color = GpiQueryColorIndex(hps, 0, rgb_color); else pm3d_color = rgb_color; #if 0 { int real_rgb = GpiQueryRGBColor(hps, LCOLOPT_REALIZED, pm3d_color); DEBUG_COLOR(( "GR_SET_RGBCOLOR: req = %x nearest = %x index = %x", rgb_color, real_rgb, pm3d_color )); } #endif break; } case GR_FILLED_POLYGON : { int points, x,y, i; LONG curr_color; POINTL p; BufRead(hRead, &points, sizeof(points), &cbR); GpiSetPattern(hps, PATSYM_SOLID); GpiSetBackMix(hps, BM_OVERPAINT); if (pm3d_color >= 0) { curr_color = GpiQueryColor(hps); GpiSetColor(hps, pm3d_color); } /* using colours defined in the palette */ GpiBeginArea(hps, BA_BOUNDARY | BA_ALTERNATE); for (i = 0; i < points; i++) { BufRead(hRead, &x, sizeof(x), &cbR); BufRead(hRead, &y, sizeof(y), &cbR); p.x = x; p.y = y; if (i) GpiLine(hps, &p); else GpiMove(hps, &p); } GpiEndArea(hps); if (pm3d_color >= 0) GpiSetColor(hps, curr_color); break; } case GR_RGB_IMAGE : { unsigned int i, M, N, image_size; POINTL corner[4]; PBYTE image; PBITMAPINFO2 pbmi; POINTL points[4]; LONG hits; PERRINFO perriBlk; image_list_entry *ile; BufRead(hRead, &M, sizeof(M), &cbR); BufRead(hRead, &N, sizeof(N), &cbR); for (i=0; i<4; i++) { BufRead(hRead, &(corner[i].x), sizeof(int), &cbR); BufRead(hRead, &(corner[i].y), sizeof(int), &cbR); } BufRead(hRead, &image_size, sizeof(image_size), &cbR); DEBUG_IMAGE(("GR_IMAGE: M=%i, N=%i, size=%i", M, N, image_size)); DEBUG_IMAGE(("GR_IMAGE: corner [0]=(%i,%i) [1]=(%i,%i)", corner[0].x, corner[0].y, corner[1].x, corner[1].y)); image = (PBYTE) malloc(image_size); /* FIXME: does not work if GNUBUF < image_size ! */ BufRead(hRead, image, image_size, &cbR); points[0].x = corner[0].x; points[0].y = corner[1].y; points[1].x = corner[1].x; points[1].y = corner[0].y; points[2].x = points[2].y = 0; points[3].x = M; points[3].y = N; pbmi = (PBITMAPINFO2) calloc( sizeof(BITMAPINFOHEADER2), 1 ); pbmi->cbFix = sizeof(BITMAPINFOHEADER2); pbmi->cx = M; pbmi->cy = N; pbmi->cPlanes = 1; pbmi->cBitCount = 24; pbmi->ulCompression = BCA_UNCOMP; hits = GpiDrawBits(hps, image, pbmi, 4, &points, ROP_SRCCOPY, BBO_IGNORE ); #if 0 if (hits == GPI_ERROR) { perriBlk = WinGetErrorInfo(hab); if (perriBlk) { PSZ pszOffset, pszErrMsg; pszOffset = ((PSZ)perriBlk) + perriBlk->offaoffszMsg; pszErrMsg = ((PSZ)perriBlk) + *((PULONG)pszOffset); if (perriBlk->cDetailLevel >= 2) pszErrMsg = ((PSZ)perriBlk) + ((PULONG)pszOffset)[1]; DEBUG_IMAGE(("GpiDrawBits code=%x msg=%s", perriBlk->idError, pszErrMsg)); // DEBUG_IMAGE(("GpiDrawBits code=%x", perriErrorInfo->idError)); WinFreeErrorInfo(perriBlk); } } #endif /* We have to keep the image and the image header in memory since we use retained graphics */ ile = (image_list_entry *) malloc(sizeof(image_list_entry)); ile->next = image_list; ile->pbmi = pbmi; ile->image = image; image_list = ile; break; } case SET_RULER : { /* set_ruler(int x, int y) term API: x<0 switches ruler off */ int x, y; BufRead(hRead, &x, sizeof(x), &cbR); BufRead(hRead, &y, sizeof(y), &cbR); DrawRuler(); /* remove previous drawing, if any */ if (x < 0) { ruler.on = 0; break; } ruler.on = 1; ruler.x = x; ruler.y = y; DrawRuler(); break; } case SET_CURSOR : { /* set_cursor(int c, int x, int y) term API */ int c, x, y; BufRead(hRead, &c, sizeof(x), &cbR); BufRead(hRead, &x, sizeof(x), &cbR); BufRead(hRead, &y, sizeof(y), &cbR); switch (c) { case -2: { /* move mouse to the given point */ RECTL rc; POINTL pt; GpiQueryPageViewport(hpsScreen,&rc); /* only distance is important */ rc.xRight -= rc.xLeft; rc.yTop -= rc.yBottom; /* window => pixels coordinates */ pt.x =(long int) ((x * (double) rc.xRight) / 19500.0); pt.y =(long int) ((x * (double) rc.yTop) / 12500.0); WinMapWindowPoints(hApp, HWND_DESKTOP, &pt, 1); WinSetPointerPos(HWND_DESKTOP, pt.x, pt.y); break; } case -1: /* start zooming; zooming cursor */ zoombox.on = 1; zoombox.from.x = zoombox.to.x = x; zoombox.from.y = zoombox.to.y = y; break; case 0: /* standard cross-hair cursor */ WinSetPointer(HWND_DESKTOP, hptrCurrent =(useMouse ?hptrCrossHair :hptrDefault)); break; case 1: /* cursor during rotation */ WinSetPointer(HWND_DESKTOP, hptrCurrent = hptrRotating); break; case 2: /* cursor during scaling */ WinSetPointer(HWND_DESKTOP, hptrCurrent = hptrScaling); break; case 3: /* cursor during zooming */ WinSetPointer(HWND_DESKTOP, hptrCurrent = hptrZooming); break; } if (c>=0 && zoombox.on) { /* erase zoom box */ DrawZoomBox(); zoombox.on = 0; } break; } case SET_CLIPBOARD : { /* set_clipboard(const char s[]) term API */ int len; char *s; BufRead(hRead, &len, sizeof(int), &cbR); s = malloc(len + 1); BufRead(hRead,s, len+1, &cbR); TextToClipboard(s); free(s); break; } case SET_MENU : /* update menu according to the gnuplot core * settings, e.g.(un)checking menu items */ if (mouseTerminal) { /* we are connected to mouseable terminal */ BufRead(hRead, &gpPMmenu, sizeof(gpPMmenu), &cbR); if (useMouse != gpPMmenu.use_mouse) WinSetPointer(HWND_DESKTOP, hptrCurrent = (gpPMmenu.use_mouse ?hptrCrossHair :hptrDefault)); useMouse = gpPMmenu.use_mouse; gpPMmenu_update_req = 1; } break; case GR_MOUSECAPABLE : /* notification of being connected to a mouse-enabled terminal */ mouseTerminal = 1; break; default : /* should handle error */ break; } } } DosDisConnectNPipe(hRead); WinPostMsg(hApp, WM_CLOSE, 0L, 0L); } static void EditLineTypes(HWND hwnd, HPS hps, BOOL bDashed) { int i; GpiSetDrawingMode(hps, DM_RETAIN); GpiOpenSegment(hps, iSeg); GpiSetEditMode(hps, SEGEM_REPLACE); for (i=0; i<7; i++) { while (GpiSetElementPointerAtLabel(hps, lLineTypes[i])) { GpiOffsetElementPointer(hps, 1); GpiSetLineType(hps, bDashed?lLineTypes[i]:lLineTypes[0]); } GpiSetElementPointer(hps, 0); } GpiSetEditMode(hps, SEGEM_INSERT); GpiCloseSegment(hps); } #if 0 /* ** Edit segment to change char cell(font size) */ static void EditCharCell(HPS hps, SIZEF *psize) { int i; LONG rl, rc; SIZEF sizH, sizV; int iVert = 0; sizH = *psize; sizV.cx = sizH.cy; sizV.cy = sizH.cx; GpiSetDrawingMode(hps, DM_RETAIN); GpiOpenSegment(hps, iSeg); GpiSetEditMode(hps, SEGEM_REPLACE); i=0; while (GpiSetElementPointer(hps, i)) { rc = GpiQueryElementPointer(hps); if (rc != i) break; rl = GpiQueryElementType(hps, &rc, 0, NULL); if (rc == 0x34 || rc == 0x74) { LONG gdata; GpiQueryElement(hps, 5, 4, (PBYTE) &gdata); if (gdata == 0) iVert = 0; else iVert = 1; } else if (rc==0x33 || rc==0x03) GpiSetCharBox(hps, iVert ? &sizV : &sizH); ++i; } GpiSetEditMode(hps, SEGEM_INSERT); GpiCloseSegment(hps); } #endif /* ** pull next plot command out of buffer read from GNUPLOT */ static int BufRead(HFILE hfile, void *buf, int nBytes, ULONG *pcbR) { ULONG ulR, ulRR; int rc; static char buffer[GNUBUF]; static char *pbuffer = buffer+GNUBUF, *ebuffer = buffer+GNUBUF; for (; nBytes > 0; nBytes--) { if (pbuffer >= ebuffer) { ulR = GNUBUF; rc = DosRead(hfile, buffer, ulR, &ulRR); if (rc != 0) return rc; if (ulRR == 0) return 1; pbuffer = buffer; ebuffer = pbuffer+ulRR; } *(char*)buf++ = *pbuffer++; } return 0L; } #ifdef STANDARD_FONT_DIALOG /* ** Get a new font using standard font dialog */ int GetNewFont(HWND hwnd, HPS hps) { static FONTDLG pfdFontdlg; /* Font dialog info structure */ static int i1 =1; static int iSize; char szPtList[64]; HWND hwndFontDlg; /* Font dialog window handle */ char szFamilyname[FACESIZE]; if (i1) { strcpy(pfdFontdlg.fAttrs.szFacename, strchr(szFontNameSize, '.') + 1); strcpy(szFamilyname, strchr(szFontNameSize, '.') + 1); sscanf(szFontNameSize, "%d", &iSize); memset(&pfdFontdlg, 0, sizeof(FONTDLG)); pfdFontdlg.cbSize = sizeof(FONTDLG); pfdFontdlg.hpsScreen = hps; /* szFamilyname[0] = 0; */ pfdFontdlg.pszFamilyname = szFamilyname; pfdFontdlg.usFamilyBufLen = FACESIZE; pfdFontdlg.fl = FNTS_HELPBUTTON | FNTS_CENTER | FNTS_VECTORONLY | FNTS_OWNERDRAWPREVIEW; pfdFontdlg.clrFore = CLR_BLACK; pfdFontdlg.clrBack = CLR_WHITE; pfdFontdlg.usWeight = FWEIGHT_NORMAL; pfdFontdlg.fAttrs.usCodePage = codepage; pfdFontdlg.fAttrs.usRecordLength = sizeof(FATTRS); } sprintf(szPtList, "%d 8 10 12 14 18 24", iSize); pfdFontdlg.pszPtSizeList = szPtList; pfdFontdlg.fxPointSize = MAKEFIXED(iSize,0); hwndFontDlg = WinFontDlg(HWND_DESKTOP, hwnd, &pfdFontdlg); if (i1) { pfdFontdlg.fl = FNTS_HELPBUTTON | FNTS_CENTER | FNTS_VECTORONLY | FNTS_INITFROMFATTRS; i1=0; } if (hwndFontDlg &&(pfdFontdlg.lReturn == DID_OK)) { iSize = FIXEDINT(pfdFontdlg.fxPointSize); sprintf(szFontNameSize, "%d.%s", iSize, pfdFontdlg.fAttrs.szFacename); return 1; } else return 0; } #else /* ** Get a new font using standard font palette */ int GetNewFont(HWND hwnd, HPS hps) { HOBJECT hObject; ULONG ulView = 0; /* OPEN_DEFAULT */ BOOL fSuccess = FALSE; hObject = WinQueryObject("<WP_FNTPAL>"); if (hObject != NULL) { fSuccess = WinOpenObject(hObject, ulView, TRUE); } if (fSuccess) return 1; else return 0; } #endif /* STANDARD_FONT_DIALOG */ /* ** Handle termination signal to free up resources before ** termination. */ void SigHandler(int sig) { if (sig == SIGTERM) { if (bPersist) { DosKillThread(tidSpawn); return; } DosEnterCritSec(); DosKillThread(tidSpawn); DosKillThread(tidDraw); DosExitCritSec(); exit(0); } } #ifdef PM_KEEP_OLD_ENHANCED_TEXT /* disable debugging info */ #define TEXT_DEBUG(x) /* fprintf x */ ; /* process a bit of string, and return the last character used. * p is start of string * brace is TRUE to keep processing to }, FALSE for do one character * fontname & fontsize are obvious * base is the current baseline * widthflag is TRUE if the width of this should count, * FALSE for zero width boxes * showflag is TRUE if this should be shown, * FALSE if it should not be shown(like TeX \phantom) */ static char *starttext = NULL; static int textlen = 0; static BOOL bText = FALSE; static int textwidth = 0; static POINTL ptlText; static FILE *ff; static char *ParseText( HPS hps, char *p, BOOL brace, char *fontname, int fontsize, int base, BOOL widthflag, BOOL showflag) { POINTL aptl[TXTBOX_COUNT]; BOOL bChangeFont = FALSE; TEXT_DEBUG((ff, "RECURSE WITH [%p] %s, %d %s %.1f %.1f %d %d\n", p, p, brace, fontname, fontsize, base, widthflag, showflag)); /* Start each recursion with a clean string */ #if 0 { FILE *ff = fopen("deb","a"); int i=textlen; for (i=0;i<textlen;i++) fputc(starttext[i], ff); fputc('\n',ff); fclose(ff); } #endif /* 0 */ if (textlen > 0) { GpiQueryTextBox(hps, textlen, starttext, TXTBOX_COUNT, aptl); textwidth += aptl[TXTBOX_BOTTOMRIGHT].x * multLineHor; textwidth += aptl[TXTBOX_BOTTOMRIGHT].y * multLineVert; } if (bText) { if (textlen > 0) { GpiCharStringAt(hps, &ptlText, textlen, starttext); ptlText.x += aptl[TXTBOX_CONCAT].x - multLineVert * base; ptlText.y += aptl[TXTBOX_CONCAT].y + multLineHor * base; } else { ptlText.x -= multLineVert * base; ptlText.y += multLineHor * base; } } textlen = 0; starttext = p; if (fontname != NULL) { char szFont[FONTBUF]; sprintf(szFont, "%d.%s", fontsize, fontname); SwapFont(hps, szFont); bChangeFont = TRUE; } if (base != 0) GpiSetCharBox(hps, &sizCurSubSup); for (; *p; ++p) { int shift; switch (*p) { case '}': /*{{{ deal with it*/ if (brace) { brace = 0; } break; /*}}}*/ case '_': case '^': /*{{{ deal with super/sub script*/ shift = ((*p == '^') ? lSupOffset : lSubOffset); p = ParseText(hps, p+1, FALSE, NULL/*fontname*/, fontsize*0.8, base+shift, widthflag, showflag); break; /*}}}*/ case '{': { char *savepos=NULL, save=0; char *localfontname=fontname, ch; char localfontbuf[FONTBUF]; int recode=1; int f=fontsize; char *q=localfontbuf; /*{{{ recurse(possibly with a new font) */ TEXT_DEBUG((ff,"Dealing with {\n")); if (*++p == '/') { /* then parse a fontname, optional fontsize */ while (*++p == ' ') ; /* do nothing */ if (*p=='-') { recode=0; while (*++p == ' ') ; /* do nothing */ } localfontname = p; while ((ch = *p) > ' ' && ch != '=') { localfontname=localfontbuf; if (*p=='_') *q=' '; else *q=*p; ++p;++q; } *q = '\0'; FontExpand(localfontbuf); save = *(savepos=p); if (ch == '=') { *p++ = '\0'; /*{{{ get optional font size*/ TEXT_DEBUG((ff,"Calling strtod(%s) ...", p)); f = strtod(p, &p); TEXT_DEBUG((ff,"Retured %.1f and %s\n", f, p)); if (!f) f = fontsize; TEXT_DEBUG((ff,"Font size %.1f\n", f)); /*}}}*/ } else { *p++ = '\0'; f = fontsize; } while (*p == ' ') ++p; if (!(*localfontname)) { localfontname = fontname; if (f != fontsize) localfontname = strchr(szFontNameSize, '.') + 1; } } /* if ('/') */ /*}}}*/ TEXT_DEBUG((ff,"Before recursing, we are at [%p] %s\n", p, p)); p = ParseText(hps,p, TRUE, localfontname, f, base, widthflag, showflag); TEXT_DEBUG((ff,"BACK WITH %s\n", p)); if (savepos) /* restore overwritten character */ *savepos = save; break; } case '@' : /*{{{ phantom box - prints next 'char', then restores currentpoint */ p = ParseText(hps, ++p, FALSE, NULL/*fontname*/, fontsize, base, FALSE, showflag); break; /*}}}*/ case '&' : /*{{{ character skip - skips space equal to length of character(s) */ p = ParseText(hps, ++p, FALSE, NULL/*fontname*/, fontsize, base, widthflag, FALSE); break; /*}}}*/ case '\\': { char buffer[4]; /* should need only one char.. */ char *q = buffer; *q = '\0'; ParseText(hps,q, FALSE, NULL, fontsize, base, widthflag, showflag); /*{{{ is it an escape */ /* special cases */ if (p[1]=='\\' || p[1]=='{' || p[1]=='}') { *q++=p[1]; ++p; } #if 0 else if (p[1] >= '0' && p[1] <= '7') { /* up to 3 octal digits */ int c = 0; c+=p[1]; ++p; if (p[1] >= '0' && p[1] <= '7') { c = c * 8 + p[1]; ++p; if (p[1] >= '0' && p[1] <= '7') { c = c * 8 + p[1]; ++p; } } *q++ = c; break; } #endif /* 0 */ *q = '\0'; textlen = 1; starttext=buffer; ParseText(hps,q, FALSE, NULL/*fontname*/, fontsize, base, widthflag, showflag); starttext=p+1; textlen = 0; /*}}}*/ break; } default: ++textlen; /*}}}*/ } /* switch(character) */ /* like TeX, we only do one character in a recursion, unless it's * in braces */ if (!brace) break; } if (textlen > 0) { GpiQueryTextBox(hps, textlen, starttext, TXTBOX_COUNT, aptl); if (widthflag) { textwidth += aptl[TXTBOX_BOTTOMRIGHT].x * multLineHor; textwidth += aptl[TXTBOX_BOTTOMRIGHT].y * multLineVert; } } if (bText) { if (textlen > 0) { if (showflag) GpiCharStringAt(hps, &ptlText, textlen, starttext); if (widthflag) { ptlText.x += aptl[TXTBOX_CONCAT].x; ptlText.y += aptl[TXTBOX_CONCAT].y; } } if (base != 0) { ptlText.x += multLineVert * base; ptlText.y -= multLineHor * base; } } if (bChangeFont) { SwapFont(hps, NULL); bChangeFont = FALSE; } if (base != 0) GpiSetCharBox(hps, &sizBaseFont); textlen = 0; starttext = p+1; return p; } static void CharStringAt(HPS hps, int x, int y, int len, char *str) { /* flush any pending graphics(all the XShow routines do this...) */ char *fontname; int fontsize; if (!strlen(str)) return; /* set up the globals */ ptlText.x = x; ptlText.y = y; bText = TRUE; starttext = NULL; textlen = 0; textwidth = 0; sscanf(szFontNameSize, "%d", &fontsize); fontname = strchr(szFontNameSize, '.') + 1; while (*(str = ParseText(hps, str, TRUE, NULL, fontsize, 0.0, TRUE, TRUE))) ; /* do nothing */ } static int QueryTextBox(HPS hps, int len, char *str) { char *fontname; int fontsize; if (!strlen(str)) return 0; /* set up the globals */ bText = FALSE; starttext = NULL; textlen = 0; textwidth = 0; sscanf(szFontNameSize, "%d", &fontsize); fontname = strchr(szFontNameSize, '.') + 1; while (*(str = ParseText(hps, str, TRUE, NULL, fontsize, 0.0, TRUE, TRUE))) ; /* do nothing */ return textwidth; } #endif void FontExpand(char *name) { if (strcmp(name,"S") == 0) strcpy(name, "Symbol Set"); if (strcmp(name,"Symbol") == 0) strcpy(name, "Symbol Set"); else if (strcmp(name,"H") == 0) strcpy(name, "Helvetica"); else if (strcmp(name,"T") == 0) strcpy(name, "Times New Roman"); else if (strcmp(name,"C") == 0) strcpy(name, "Courier"); } /*=======================================*/ static POINTL pCur; static int iLinebegin = 1; static int iLtype = 0; static int iState = 0; static double togo = 0.0; static int iPatt[8][9] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 300, 200, -1, 0, 0, 0, 0, 0, 0 }, { 150, 150, -1, 0, 0, 0, 0, 0, 0 }, { 300, 200, 150, 200, -1, 0, 0, 0, 0 }, { 500, 200, -1, 0, 0, 0, 0, 0, 0 }, { 300, 200, 150, 200, 150, 200, -1, 0, 0 }, { 300, 200, 150, 200, 150, 200, 150, 200, -1 }, { 500, 200, 150, 200, -1, 0, 0, 0, 0 } }; void LMove(HPS hps, POINTL *p) { double ds, dx, dy; if (iLinebegin) { pCur = *p; GpiMove(hps, p); } else if (iLtype == 0) GpiMove(hps, p); else { dx = p->x - pCur.x; dy = p->y - pCur.y; ds = sqrt(dx*dx + dy*dy); dx /= ds; dy /= ds; while (ds > 0.0) { if (ds < togo) { togo -= ds; ds = 0.0; GpiMove(hps, p); pCur = *p; } else { POINTL pn; pn.x = pCur.x + togo * dx; pn.y = pCur.y + togo * dy; GpiMove(hps, &pn); pCur = pn; ds -= togo; iState++; if (iPatt[iLtype][iState] < 0) { togo = iPatt[iLtype][0]; iState = 0; } else togo = iPatt[iLtype][iState]; } } } } void LLine(HPS hps, POINTL *p) { double ds, dx, dy; if (iLinebegin) iLinebegin = 0; if (iLtype == 0) GpiLine(hps, p); else { dx = p->x - pCur.x; dy = p->y - pCur.y; ds = sqrt(dx*dx + dy*dy); dx /= ds; dy /= ds; while (ds > 0.0) { if (ds < togo) { togo -= ds; ds = 0.0; if (iState & 1) GpiMove(hps, p); else GpiLine(hps, p); pCur = *p; } else { POINTL pn; pn.x = pCur.x + togo * dx; pn.y = pCur.y + togo * dy; if (iState & 1) GpiMove(hps, &pn); else GpiLine(hps, &pn); pCur = pn; ds -= togo; iState++; if (iPatt[iLtype][iState] < 0) { togo = iPatt[iLtype][0]; iState = 0; } else togo = iPatt[iLtype][iState]; } } } } void LType(int iType) { iLinebegin = 1; if (iType > 7) iType = 0; iLtype = iType; iState = 0; togo = iPatt[iLtype][0]; } /* Now routines for mouse etc. */ static void TextToClipboard(PCSZ szTextIn) { /* copy string given by szTextIn to the clipboard */ PSZ szTextOut = NULL; ULONG ulRC = DosAllocSharedMem( (PVOID*) &szTextOut, NULL, strlen(szTextIn) + 1, PAG_READ | PAG_WRITE | PAG_COMMIT | OBJ_GIVEABLE); if (!ulRC) { HAB hab = 0; strcpy(szTextOut, szTextIn); WinOpenClipbrd(hab); WinEmptyClipbrd(hab); WinSetClipbrdData(hab,(ULONG) szTextOut, CF_TEXT, CFI_POINTER); WinCloseClipbrd(hab); } } /* Draw the ruler */ static void DrawRuler() { POINTL p; if (!ruler.on || ruler.x < 0) return; /* GpiSetColor(hpsScreen, RGB_TRANS(COLOR_RULER)); */ GpiSetColor(hpsScreen, RGB_TRANS(CLR_RED)); GpiSetLineWidth(hpsScreen, LINEWIDTH_THICK); GpiSetMix(hpsScreen, FM_INVERT); /*GpiBeginPath(hpsScreen, 1); // will this help? I don't know, but makes thic cross */ p.x = 0; p.y = ruler.y; GpiMove(hpsScreen, &p); p.x = 19500; GpiLine(hpsScreen, &p); p.x = ruler.x; p.y = 0; GpiMove(hpsScreen, &p); p.y = 12500; GpiLine(hpsScreen, &p); /*GpiEndPath(hpsScreen); */ /*GpiStrokePath(hpsScreen, 1, 0); */ } #if 0 /* This routine recalculates mouse/pointer position [mx,my] in [in pixels] current window to the real/true [x,y] coordinates of the plotted graph. */ void MousePosToGraphPos( double *x, double *y, HWND hWnd, SHORT mx, SHORT my, ULONG mouse_mode) { RECTL rc; if (mouse_mode == MOUSE_COORDINATES_PIXELS) { *x = mx; *y = my; return; } /* Rectangle where we are moving: viewport, not the full window! */ GpiQueryPageViewport(hpsScreen, &rc); /* only distance is important */ rc.xRight -= rc.xLeft; rc.yTop -= rc.yBottom; if (mouse_mode == MOUSE_COORDINATES_SCREEN) { *x =(double) mx / rc.xRight; *y =(double) my / rc.yTop; return; } /* px=px(mx); mouse=>gnuplot driver coordinates */ *x = mx * 19500.0 / rc.xRight; *y = my * 12500.0 / rc.yTop; /* main job of transformation, which is not device dependent */ MousePosToGraphPosReal(x, y); } #endif /* * This routine recalculates mouse/pointer position [mx,my] in [in pixels] * current window to the viewport coordinates */ static void MousePosToViewport(int *x, int *y, SHORT mx, SHORT my) { RECTL rc; /* Rectangle where we are moving: viewport, not the full window! */ GpiQueryPageViewport(hpsScreen, &rc); rc.xRight -= rc.xLeft; rc.yTop -= rc.yBottom; /* only distance is important */ /* px=px(mx); mouse=>gnuplot driver coordinates */ *x =(int)(mx * 19500.0 / rc.xRight + 0.5); *y =(int)(my * 12500.0 / rc.yTop + 0.5); } /* * This routine gets the mouse/pointer position in the current window and * recalculates it to the viewport coordinates */ static void GetMousePosViewport(HWND hWnd, int *mx, int *my) { POINTL p; WinQueryPointerPos(HWND_DESKTOP, &p); /* this is position wrt desktop */ WinMapWindowPoints(HWND_DESKTOP, hWnd, &p, 1); /* pos. wrt our window in pixels */ MousePosToViewport(mx,my,p.x,p.y); } /* * Status line previous and current text: */ static char *sl_curr_text = NULL; /* * Display the status line by the text */ static void DisplayStatusLine(HPS hps) { POINTL pt; if (!sl_curr_text) return; GpiSetColor(hps, RGB_TRANS(COLOR_MOUSE)); /* set text color */ GpiSetCharMode(hps, CM_MODE1); pt.x = 2; pt.y = 2; GpiSetMix(hps, FM_INVERT); /* GpiSetMix(hps, FM_XOR); */ GpiCharStringAt(hps, &pt,(long) strlen(sl_curr_text), sl_curr_text); } /* * Update the status line by the text; firstly erase the previous text */ static void UpdateStatusLine(HPS hps, char *text) { if (gpPMmenu_update_req) gpPMmenu_update(); /* check for updated menu */ if (sl_curr_text) { /* erase the previous text */ DisplayStatusLine(hps); free(sl_curr_text); } if (!text || !*text) sl_curr_text = 0; else { /* display new text */ sl_curr_text = strdup(text); DisplayStatusLine(hps); } } /* * Graphics part SET_GRAPHICS or anything else required to update menu according to * the items in gpPMmenu */ static void gpPMmenu_update() { #if 0 if (!gpPMmenu_update_req) return; #endif ChangeCheck(hApp, IDM_USEMOUSE, useMouse ? IDM_USEMOUSE:0); WinEnableMenuItem(/* can this situation be unzoomed back? */ WinWindowFromID(WinQueryWindow(hApp, QW_PARENT), FID_MENU), IDM_MOUSE_UNZOOM,(gpPMmenu.where_zoom_queue & 1) ? TRUE : FALSE); WinEnableMenuItem(/* can this situation be unzoomed to the beginning? */ WinWindowFromID(WinQueryWindow(hApp, QW_PARENT), FID_MENU), IDM_MOUSE_UNZOOMALL,(gpPMmenu.where_zoom_queue & 2) ? TRUE : FALSE); if ( WinEnableMenuItem(/* can this situation be zoomed next? */ WinWindowFromID(WinQueryWindow(hApp, QW_PARENT), FID_MENU), IDM_MOUSE_ZOOMNEXT,(gpPMmenu.where_zoom_queue & 4) ? TRUE : FALSE) == TRUE) gpPMmenu_update_req = 0; ChangeCheck(hApp, IDM_MOUSE_POLAR_DISTANCE, gpPMmenu.polar_distance?IDM_MOUSE_POLAR_DISTANCE:0); } static void DrawZoomBox() { if (!zoombox.on) return; GpiSetLineWidth(hpsScreen, LINEWIDTH_NORMAL); GpiSetLineType(hpsScreen,LINETYPE_SHORTDASH); GpiSetMix(hpsScreen,FM_INVERT); GpiMove(hpsScreen, &zoombox.from); GpiBox(hpsScreen, DRO_OUTLINE, &zoombox.to, 0,0); GpiSetLineType(hpsScreen,LINETYPE_DEFAULT); } /* eof gclient.c */ ��������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/gnuplot.ico�������������������������������������������������������������������0000644�0004711�0000144�00000004620�06677003420�013615� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������BA(���x�������CI�������� ��� �@������CI������� ��� � ������������������������BA(���������CI������� ���(�P������CI�����p�� ���(�(������������������������������������������������������������������������������������������������������������������������������������������������������������'y'�����?q?~~�����������������3333333333330��3333333333330��0����������0��0���������#0��0���������#0��2 �������"0��2" �����"0��0" ����"�0��0�" ��"�0��0�� ����0��0�������0��0���������0��0���������0��0���������0��0���������0��0���������0��33333��33330��33333��33330����������������������������������������������������������������@����@��������D@����D�������@������@������D��������D��������������@�������@��������������������@�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/���o������?x���>~���)����������������������������������������������������������?����������~���y���x���?����?����������������������������������������3333333333333333����0������������������0������������������0��������������#����0�������������"#����0������������"����2 ����������" ����2"����������"�����0""��������"�����0"�������"������0�" ����"������0��"� ����" ������0��""����"�������0���" ��"�������0����� ����������0����������������0����������������0����������������0����������������0����������������0����������������0����������������3333330��333333������������������������������������������������ �� ���������������� �������������� �� ������������D������D@����������DD������DD���������@��������@��������D@��������D�������D����������D@�������D����������D��������@��������@���������D��������D������������������@������������������@�����������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/rotating.ptr������������������������������������������������������������������0000644�0004711�0000144�00000000440�07177626151�014013� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PT����� ��� ��� �@��������������������������������������������������������������������������������������������������������������������������������������< ����oG� 08��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/gnupmdrv.def������������������������������������������������������������������0000644�0004711�0000144�00000000230�06677003424�013750� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������NAME GnuShell WINDOWAPI DESCRIPTION 'Gnuplot shell' CODE MOVEABLE DATA MOVEABLE MULTIPLE HEAPSIZE 4096 STACKSIZE 98304 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/dialogs.h���������������������������������������������������������������������0000644�0004711�0000144�00000011545�10071042561�013220� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#define DIALOGS_H #define IDM_HELPINDEX 10004 #define IDM_KEYSHELP 10003 #define IDM_EXTENDEDHELP 10002 #define IDM_HELPFORHELP 10001 #define IDM_GPLOTINF 10005 #define IDM_FILE 100 #define IDM_PRINTSETUP 115 #define IDM_PRINTPIC 111 #define IDM_PRINT 101 #define IDM_EXIT 102 #define IDM_ABOUT 103 #define IDM_FONTS 104 #define IDM_SAVE 105 #define IDM_COMMAND 300 #define IDM_CONTINUE 400 #define IDM_PAUSEOPT 120 #define IDM_PAUSEDLG 121 #define IDM_PAUSEBTN 122 #define IDM_PAUSEGNU 123 #define IDM_OPTIONS 200 #define IDM_OPTIONMAIN 201 #define IDM_COLOURS 206 #define IDM_LINES 207 #define IDM_LINES_THICK 208 #define IDM_LINES_SOLID 209 #define IDM_FRONT 210 #define IDM_KEEPRATIO 211 #define IDM_EDIT 500 #define IDM_COPY 501 #define IDM_CUT 502 #define IDM_PASTE 503 #define IDM_CLEARCLIP 504 #define IDM_MOUSE 600 #define IDM_USEMOUSE 601 /* #define IDM_MOUSE_COORDINATES 602 #define IDM_MOUSE_COORDINATES_REAL 603 #define IDM_MOUSE_COORDINATES_PIXELS 604 #define IDM_MOUSE_COORDINATES_SCREEN 605 #define IDM_MOUSE_COORDINATES_XDATE 606 #define IDM_MOUSE_COORDINATES_XTIME 607 #define IDM_MOUSE_COORDINATES_XDATETIME 608 */ #define IDM_MOUSE_UNZOOM 610 #define IDM_MOUSE_UNZOOMALL 611 #define IDM_MOUSE_ZOOMNEXT 612 #define IDM_MOUSE_RULER 613 /*#define IDM_MOUSE_RULERWINDOW 614 */ #define IDM_MOUSE_POLAR_DISTANCE 615 #define IDM_MOUSE_CMDS2CLIP 616 #define IDM_MOUSE_FORMAT 620 /* keep this order of *_FORMAT_* constants! */ #define IDM_MOUSE_FORMAT_X_Y 621 #define IDM_MOUSE_FORMAT_XcY 622 #define IDM_MOUSE_FORMAT_XsY 623 #define IDM_MOUSE_FORMAT_XcYc 624 #define IDM_MOUSE_FORMAT_XcYs 625 #define IDM_MOUSE_FORMAT_pXdYp 626 #define IDM_MOUSE_FORMAT_pXcYp 627 #define IDM_MOUSE_FORMAT_pXsYp 628 #define IDM_MOUSE_FORMAT_LABEL 629 #define IDM_MOUSE_FORMAT_TIMEFMT 630 #define IDM_MOUSE_FORMAT_DATE 631 #define IDM_MOUSE_FORMAT_TIME 632 #define IDM_MOUSE_FORMAT_DATETIME 633 #define IDM_MOUSE_HELP 640 #define IDM_UTILS 650 #define IDM_BREAK_DRAWING 651 #define IDM_SET_GRID 652 #define IDM_SET_LINLOGY 653 #define IDM_SET_AUTOSCALE 655 #define IDM_DO_REPLOT 656 #define IDM_DO_RELOAD 657 #define IDM_DO_SENDCOMMAND 658 #define IDM_SET 700 #define IDM_SET_D_S 710 /* 'set data style' options */ #define IDM_SET_D_S_BOXES 711 /* must be the same order as SetDataStyles[] */ #define IDM_SET_D_S_DOTS 712 #define IDM_SET_D_S_FSTEPS 713 #define IDM_SET_D_S_HISTEPS 714 #define IDM_SET_D_S_IMPULSES 715 #define IDM_SET_D_S_LINES 716 #define IDM_SET_D_S_LINESPOINTS 717 #define IDM_SET_D_S_POINTS 718 #define IDM_SET_D_S_STEPS 719 #define IDM_SET_F_S 730 /* 'set function style' options */ #define IDM_SET_F_S_BOXES 731 /* must be the same order as SetDataStyles[] */ #define IDM_SET_F_S_DOTS 732 #define IDM_SET_F_S_FSTEPS 733 #define IDM_SET_F_S_HISTEPS 734 #define IDM_SET_F_S_IMPULSES 735 #define IDM_SET_F_S_LINES 736 #define IDM_SET_F_S_LINESPOINTS 737 #define IDM_SET_F_S_POINTS 738 #define IDM_SET_F_S_STEPS 739 #define ID_ABOUT 10 #define IDD_COLOURS 20 #define IDD_PRINTQNAME 5106 #define IDD_PRINTSETUP 5105 #define IDD_PRINTPIC 5101 #define ID_PRINT 5100 #define ID_QPRINT 5000 #define ID_QPRINTERS 5200 #define ID_PRINTSTOP 5300 #define IDD_QPRSLIST 5201 #define IDD_QPRSSEL 5202 #define IDD_QPRNAME 5009 #define IDD_QPRFRAME 5008 #define IDD_QPRTRACK 5007 #define IDD_QPRSETPR 5006 #define IDD_QPRXSIZE 5001 #define IDD_QPRYSIZE 5002 #define IDD_QPRXFRAC 5003 #define IDD_QPRYFRAC 5004 #define IDD_QPRBOX 5005 #define IDD_FONTS 6000 #define IDD_PAUSEBOX 3000 #define IDD_PAUSETEXT 3001 #define IDD_QUERYPRINT 2000 #define IDD_QPTEXT 2001 #define IDD_QPLISTBOX 2002 #define IDD_QPJOBPROP 2005 /* #define DID_HELP 10 #define DID_CANCEL 2 #define DID_OK 1 */ #define IDH_EXTENDED 905 #define IDH_INDEX 904 #define IDH_KEYS 903 #define IDH_FOREXTENDED 902 #define IDH_FORHELP 901 #define IDD_PRINTNAME 5010 /* Cursors */ #define IDP_CROSSHAIR 651 #define IDP_SCALING 652 #define IDP_ROTATING 653 �����������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/ptrcross.ptr������������������������������������������������������������������0000644�0004711�0000144�00000001552�06701720641�014037� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������CP�����j��� ��� �@������CP�����j�� ��� � �����������������������������������������������������������������������������UUUT���������������������������������������������������������UUUU��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/os2/pm_msgs.h���������������������������������������������������������������������0000644�0004711�0000144�00000005143�10320704525�013242� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: pm_msgs.h,v 1.4 2005/10/05 08:05:41 mikulik Exp $ */ /* GNUPLOT - pm_msgs.h */ /*[ * Copyright 1992, 1993, 1998, 2004 Roger Fearick * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * Message codes for communication between pm.trm (gnuplot) and gclient.c * (gnupmdrv). */ #ifndef PM_CMDS_H #define PM_CMDS_H /* graphics commands */ #define SET_GRAPHICS 'G' #define SET_TEXT 'E' #define SET_LINE 'L' #define SET_FILLBOX 'B' #define SET_LINEWIDTH 'W' #define SET_ANGLE 'A' #define SET_JUSTIFY 'J' #define SET_POINTMODE 'D' #define SET_FONT 'F' #define GR_QUERY_FONT 'g' #define SET_OPTIONS 'O' #define SET_SPECIAL 'o' /* used for special options */ #define SET_MENU '#' #define GR_QUERY 'Q' #define GR_SUSPEND 'E' /*'s' */ #define GR_RESUME 'r' #define GR_MOVE 'M' #define GR_DRAW 'V' #define GR_RESET 'R' #define GR_TEXT 'T' #define GR_ENH_TEXT 'x' #define GR_PAUSE 'P' #define GR_HELP 'H' #define GR_MOUSECAPABLE 'm' /* PM: say gnupmdrv we are mouseable */ #define PUT_TMPTEXT 't' #define SET_RULER 'u' #define SET_CURSOR 'c' #define SET_CLIPBOARD 'l' #define GR_MAKE_PALETTE 'p' #define GR_RELEASE_PALETTE 'e' #define GR_SET_COLOR 'C' #define GR_SET_RGBCOLOR 'b' #define GR_FILLED_POLYGON 'f' #define GR_IMAGE 'i' #define GR_RGB_IMAGE 'I' #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/contour.h�������������������������������������������������������������������������0000644�0004711�0000144�00000006036�10105545221�012562� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: contour.h,v 1.9 2004/08/09 00:51:29 sfeam Exp $ */ /* GNUPLOT - contour.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_CONTOUR_H # define GNUPLOT_CONTOUR_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "gp_types.h" #include "dynarray.h" #include "graph3d.h" #define DEFAULT_CONTOUR_LEVELS 5 #define DEFAULT_NUM_APPROX_PTS 5 #define DEFAULT_CONTOUR_ORDER 4 #define MAX_BSPLINE_ORDER 10 /* Type definitions */ typedef enum en_contour_kind { /* Method of drawing the contour lines found */ CONTOUR_KIND_LINEAR, CONTOUR_KIND_CUBIC_SPL, CONTOUR_KIND_BSPLINE } t_contour_kind; typedef enum en_contour_levels_kind { /* How contour levels are set */ LEVELS_AUTO, /* automatically selected */ LEVELS_INCREMENTAL, /* user specified start & incremnet */ LEVELS_DISCRETE /* user specified discrete levels */ } t_contour_levels_kind; /* Used to allocate the tri-diag matrix. */ typedef double tri_diag[3]; /* Variables of contour.c needed by other modules: */ extern char contour_format[32]; extern t_contour_kind contour_kind; extern t_contour_levels_kind contour_levels_kind; extern int contour_levels; extern int contour_order; extern int contour_pts; /* storage for z levels to draw contours at */ extern dynarray dyn_contour_levels_list; #define contour_levels_list ((double *)dyn_contour_levels_list.v) /* Prototypes of functions exported by contour.c */ struct gnuplot_contours *contour __PROTO((int num_isolines, struct iso_curve *iso_lines)); int solve_tri_diag __PROTO((tri_diag m[], double r[], double x[], int n)); #endif /* GNUPLOT_CONTOUR_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/corgraph.asm����������������������������������������������������������������������0000644�0004711�0000144�00000004340�06677000170�013233� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������TITLE Corona graphics module ; Colin Kelley ; January 1987 include header.mac if1 include lineproc.mac endif _text segment public _GrInit,_GrReset,_GrOnly,_TxOnly,_GrandTx,_Cor_line,_Cor_mask corpixel proc near ror word ptr linemask,1 jc cont ret cont: push bp mov bp,sp push ax push bx push cx mov es,ScSeg shl bx,1 ; y mov bx,word ptr LookUp[bx] ; bx has y mem address mov cl,al ; x and cl,7 shr ax,1 shr ax,1 shr ax,1 ; ax /= 8 add bx,ax mov al,1 shl al,cl ; al contains bit mask or byte ptr es:[bx],al pop cx pop bx pop ax pop bp ret lineproc _Cor_line, corpixel beginproc _GrInit push bp mov bp,sp push di mov ax, [bp+X] ; screen number (0 - 7) mov cl,11 shl ax,cl ; multiply by 2048 to get segment mov ScSeg,ax ; save segment for later push ax mov es, ax xor ax,ax mov di,ax mov cx, 4000h cld rep stosw pop cx call near ptr GrAddr mov ax,es pop di pop bp ret _GrInit endp beginproc _GrReset mov cx, 0 call near ptr GrAddr ret _GrReset endp GrAddr proc near mov dx,3b4h ; address of 6845 mov al,0ch ; register 12 out dx,al inc dx mov al,ch ; Graphics Segment High out dx,al dec dx mov al,0dh ; register 13 out dx,al mov al,cl ; Graphics Segment Low inc dx out dx,al ret GrAddr endp beginproc _GrOnly mov dx,3b8h mov al,0a0h out dx,al ret _GrOnly endp beginproc _TxOnly mov dx,3b8h mov al,28h out dx,al ret _TxOnly endp beginproc _GrandTx mov dx,3b8h mov al,0a8h out dx,al ret _GrandTx endp beginproc _Cor_mask push bp mov bp,sp mov ax,[bp+x] ; mask mov linemask,ax pop bp ret _Cor_mask endp corpixel endp _text ends _data segment linemask dw -1 ScSeg dw 0 _data ends const segment K equ 1024 mem_mac MACRO x dw x,2*K+x,4*K+x,6*K+x,8*K+x,10*K+x,12*K+x,14*K+x,16*K+x dw 18*K+x,20*K+x,22*K+x,24*K+x ENDM LookUp equ $ mem_mac 0 mem_mac 80 mem_mac (80*2) mem_mac (80*3) mem_mac (80*4) mem_mac (80*5) mem_mac (80*6) mem_mac (80*7) mem_mac (80*8) mem_mac (80*9) mem_mac (80*10) mem_mac (80*11) mem_mac (80*12) mem_mac (80*13) mem_mac (80*14) mem_mac (80*15) mem_mac (80*16) mem_mac (80*17) mem_mac (80*18) mem_mac (80*19) mem_mac (80*20) mem_mac (80*21) mem_mac (80*22) mem_mac (80*23) mem_mac (80*24) const ends end ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/Makefile.maint��������������������������������������������������������������������0000644�0004711�0000144�00000003655�11642261375�013507� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*-Makefile-*- # Makefile fragment to generate makefile.all and update version.c # Non-core sources and version.c noncoresrc = ansi2knr.c bf_test.c corplot.c gpexecute.c gplt_x11.c \ os9.c strftime.c version.c vms.c coresrc := $(filter-out $(noncoresrc),$(wildcard *.c)) coreterm := $(shell cd ../term && echo *.trm) version := $(shell cat ../VERSION) file_version := $(shell sed -n 's/.*gnuplot_version.*"\(.*\)".*/\1/p' ./version.c|tr -d ' ') patchlevel := $(shell cat ../PATCHLEVEL) file_pl := $(shell sed -n 's/.*gnuplot_patchlevel.*"\(.*\)".*/\1/p' ./version.c|tr -d ' ') last_change := $(shell dd if=../ChangeLog bs=11 count=1 2> /dev/null) date := $(shell date) makefile.all: Makefile.maint @echo "# $@ generated automatically by GNU make" >$@t @echo >>$@t @echo '# List of core object files except version.$$(O)' >>$@t @echo COREOBJS = $(coresrc:.c=.'$$(O)') \ | fmt | (tr '\012' @; echo) | sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012\012' >>$@t @echo "# List of terminal driver sources" >>$@t @echo CORETERM = $(patsubst %.trm,$$\(T\)%.trm,$(coreterm)) \ | fmt | (tr '\012' @; echo) | sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012\012' >>$@t @if cmp -s $@ $@t; then rm -f $@t; else mv $@t $@; fi makefile.awc: makefile.all sed -e 's/\\/\&/g' makefile.all > $@ version.c: ../VERSION ../PATCHLEVEL ../ChangeLog @echo Making $@ @if [ "$(version)" != "$(file_version)" -o \ "$(patchlevel)" != "$(file_pl)" ]; then \ sed -e '/^const char gnuplot_version/ s/"[^"]*"/"@VERS@"/' \ -e '/^const char gnuplot_patchlevel/ s/"[^"]*"/"@PLVL@"/' \ -e '/^const char gnuplot_date/ s/"[^"]*"/"@DATE@"/' \ -e "s/@VERS@/$(version)/" -e "s/@PLVL@/$(patchlevel)/" \ -e "s/@DATE@/$(date)/" $@ >$@t; \ if cmp -s $@ $@t; then rm -f $@t; else mv $@t $@; fi \ fi # Take most recent change date from the very top of ChangeLog sed -e '/^const char gnuplot_date/ s/"[^"]*"/"$(last_change)"/' \ $@ > $@t; mv $@t $@ �����������������������������������������������������������������������������������gnuplot-4.6.4/src/intergra.x11����������������������������������������������������������������������0000644�0004711�0000144�00000001253�06677000232�013071� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh mv gnuplot_x11.c gnuplot_x11.c_x mv corplot.c corplot.c_pc mv winmain.c winmain.c_pc mv wintext.c wintext.c_pc mv winmenu.c winmenu.c_pc mv bf_test.c bf_test.c_b acc -knr -DSYSV -DUSG -DGAMMA=gamma -DHAVE_GETCWD -DX11 \ -DUNIXPLOT -I/usr/include/X11 -I/usr/include/X11/Xaw *.c \ -lbsd -lplot -lm -o gnuplot.intergraph mv gnuplot_x11.c_x gnuplot_x11.c acc -knr -DSYSV -DUSG -DGAMMA=gamma -DHAVE_GETCWD -DX11 \ -DUNIXPLOT -I/usr/include/X11 -I/usr/include/X11/Xaw gnuplot_x11.c \ -lXaw -lXmu -lXt -lXext -lX11 -lbsd -lm -o gnuplot_x11.intergraph mv corplot.c_pc corplot.c mv winmain.c_pc winmain.c mv winmenu.c_pc winmenu.c mv wintext.c_pc wintext.c mv bf_test.c_b bf_test.c �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/������������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�011501� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wtext.h�����������������������������������������������������������������������0000644�0004711�0000144�00000007267�12130567672�013066� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: wtext.h,v 1.10.4.1 2013/04/05 16:39:50 markisch Exp $ */ /* GNUPLOT - win/wtext.h */ /*[ * Copyright 1992 - 1993, 1998, 2004 Russell Lang * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_WTEXT_H #define GNUPLOT_WTEXT_H #include <stdio.h> #include <stdarg.h> /* redefine functions that can talk to tty devices, to use * implementation in winmain.c */ #ifndef WGP_CONSOLE #define kbhit() MyKBHit() #define getche() MyGetChE() #define getch() MyGetCh() #define putch(ch) MyPutCh(ch) #define fgetc(file) MyFGetC(file) #undef getchar #define getchar() MyGetCh() #undef getc #define getc(file) MyFGetC(file) #define fgets(str,sz,file) MyFGetS(str,sz,file) #define gets(str) MyGetS(str) #define fputc(ch,file) MyFPutC(ch,file) #undef putchar #define putchar(ch) MyFPutC(ch,stdout) #undef putc #define putc(ch,file) MyFPutC(ch,file) #define fputs(str,file) MyFPutS(str,file) #define puts(str) MyPutS(str) #define vfprintf MyVFPrintF #define fprintf MyFPrintF #define printf MyPrintF #define fwrite(ptr, size, n, stream) MyFWrite(ptr, size, n, stream) #define fread(ptr, size, n, stream) MyFRead(ptr, size, n, stream) /* now cause errors for some unimplemented functions */ #define vprintf dontuse_vprintf #define fscanf dontuse_fscanf #define scanf dontuse_scanf #define clreol dontuse_clreol #define clrscr dontuse_clrscr #define gotoxy dontuse_gotoxy #define wherex dontuse_wherex #define wherey dontuse_wherey #define cgets dontuse_cgets #define cprintf dontuse_cprintf #define cputs dontuse_cputs #define cscanf dontuse_cscanf #define ungetch dontuse_ungetch /* now for the prototypes */ int MyPutCh(int ch); int MyKBHit(void); int MyGetCh(void); int MyGetChE(void); int MyFGetC(FILE *file); char * MyGetS(char *str); char * MyFGetS(char *str, unsigned int size, FILE *file); int MyFPutC(int ch, FILE *file); int MyFPutS(const char *str, FILE *file); int MyPutS(char *str); int MyFPrintF(FILE *file, const char *fmt, ...); int MyVFPrintF(FILE *file, const char *fmt, va_list args); int MyPrintF(const char *fmt, ...); size_t MyFWrite(const void *ptr, size_t size, size_t n, FILE *stream); size_t MyFRead(void *ptr, size_t size, size_t n, FILE *stream); #else /* WGP_CONSOLE */ #define getch ConsoleGetch #undef getchar #define getchar ConsoleGetch int ConsoleGetch(); #endif /* WGP_CONSOLE */ #endif /* GNUPLOT_WTEXT_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/screenbuf.h�������������������������������������������������������������������0000644�0004711�0000144�00000005227�11630664241�013653� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: screenbuf.h,v 1.2 2011/09/04 12:01:37 markisch Exp $ */ /* GNUPLOT - screenbuf.h */ /* Copyright (c) 2011 Bastian Maerkisch. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY Bastian Maerkisch ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef SCREENBUF_H #define SCREENBUF_H typedef unsigned int uint; typedef struct typLB { uint size; /* actual size of the memory buffer */ uint len; /* length of the string */ char *str; BYTE *attr; } LB; typedef LB * LPLB; typedef struct typSB { uint size; uint head; uint tail; uint wrap_at; /* wrap lines at this position */ LPLB lb; LPLB current_line; uint last_line; uint last_line_index; uint length; } SB; typedef SB * LPSB; /* ------------------------------------ */ void sb_init(LPSB sb, uint size); void sb_resize(LPSB sb, uint size); void sb_free(LPSB sb); LPLB sb_get(LPSB sb, uint index); LPLB sb_get_last(LPSB sb); int sb_append(LPSB sb, LPLB lb); uint sb_length(LPSB sb); uint sb_calc_length(LPSB sb); uint sb_lines(LPSB sb, LPLB lb); uint sb_max_line_length(LPSB sb); void sb_find_new_pos(LPSB sb, uint x, uint y, uint new_wrap_at, uint * new_x, uint * new_y); void sb_wrap(LPSB sb, uint wrap_at); void sb_last_insert_str(LPSB sb, uint pos, char *s, uint count); /* ------------------------------------ */ void lb_init(LPLB lb); uint lb_length(LPLB lb); void lb_insert_char(LPLB lb, uint pos, char ch); void lb_insert_str(LPLB lb, uint pos, char *s, uint count); char * lb_substr(LPLB lb, uint offset, uint count); #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/rotating.cur������������������������������������������������������������������0000644�0004711�0000144�00000000506�07247224464�014073� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ ����0�����(��� ���@������������������������������������������������������������������������������������������@�@�@� �@� �@� �@�8�@��@������������������??�?�?�???ǃ??�x?�x7#���� ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/screenbuf.c�������������������������������������������������������������������0000644�0004711�0000144�00000030012�11535250420�013626� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: screenbuf.c,v 1.1 2011/03/07 21:41:36 markisch Exp $"); } #endif /* GNUPLOT - screenbuf.c Data structure and methods to implement a screen buffer. Implementation as a circular buffer. (NB: sb->head == sb->tail means NO element stored) */ /* Copyright (c) 2011 Bastian Maerkisch. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY Bastian Maerkisch ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifdef _Windows # include <windows.h> #else typedef unsigned char BYTE; #endif #include <memory.h> #include <assert.h> #include "stdfn.h" #include "screenbuf.h" static uint sb_internal_length(LPSB sb); static LPLB sb_internal_get(LPSB sb, uint index); static void lb_free(LPLB lb); static void lb_copy(LPLB dest, LPLB src); /* ------------------------------------ */ /* line buffer functions */ /* ------------------------------------ */ /* lb_init: * initialize a line buffer, mark as free */ void lb_init(LPLB lb) { assert(lb != NULL); lb->str = NULL; lb->attr = NULL; lb->size = 0; lb->len = 0; } /* lb_free: * free members of a line buffer, mark as free */ static void lb_free(LPLB lb) { assert(lb != NULL); free(lb->str); free(lb->attr); lb_init(lb); } /* lb_copy: * copy a line buffer from <src> to <dest> */ static void lb_copy(LPLB dest, LPLB src) { assert(dest!= NULL); assert(src != NULL); dest->str = src->str; dest->attr = src->attr; dest->size = src->size; dest->len = src->len; } uint lb_length(LPLB lb) { assert(lb != NULL); return lb->len; /* if (lb->str != NULL) return strlen(lb->str); else return 0; */ } /* lb_insert_char: * insert a character <ch> at position <pos> into the line buffer, * increase the size of the line buffer if necessary, * fill gaps with spaces */ void lb_insert_char(LPLB lb, uint pos, char ch) { lb_insert_str(lb, pos, &ch, 1); } /* lb_insert_str: * (actually this is a misnomer as it overwrites any previous text) * insert a string <s> at position <pos> into the line buffer, * increase the size of the line buffer if necessary, * fill gaps with spaces */ void lb_insert_str(LPLB lb, uint pos, char *s, uint count) { assert(lb != NULL); /* enlarge string buffer if necessary */ if (lb->size <= pos + count) { uint newsize = ((pos + count + 8) / 8) * 8 + 32; lb->str = realloc(lb->str, newsize); lb->size = newsize; } /* fill up with spaces */ if (pos > lb->len) memset(lb->str + lb->len, ' ', pos - lb->len); /* copy characters */ memcpy(lb->str + pos, s, count); lb->len = GPMAX(pos + count, lb->len); lb->str[lb->len] = '\0'; } /* lb_substr: * get a substring from the line buffer, * this string has to bee free'd afterwards! */ char * lb_substr(LPLB lb, uint offset, uint count) { uint len; char * retval; len = (lb != NULL) ? lb->len : 0; /* allocate return string */ retval = (char *) malloc(count + 1); if (offset >= len) { memset(retval, ' ', count); } else { if (len >= (count + offset)) { memcpy(retval, lb->str + offset, count); } else { memcpy(retval, lb->str + offset, len - offset); memset(retval + len - offset, ' ', count + offset - len); } } retval[count] = '\0'; return retval; } /* ------------------------------------ */ /* screen buffer functions */ /* ------------------------------------ */ /* sb_init: * initialize a screen buffer with <size> line buffer elements */ void sb_init(LPSB sb, uint size) { assert(sb != NULL); sb->head = sb->tail = 0; sb->wrap_at = 0; sb->size = size + 1; sb->lb = calloc(size + 1, sizeof(LB)); sb->current_line = malloc(sizeof(LB)); sb->length = 0; sb->last_line = 0; sb->last_line_index = 0; } /* sb_free: * free all line buffers of a screen buffer */ void sb_free(LPSB sb) { uint idx, len; assert(sb != NULL); assert(sb->lb != NULL); /* free all line buffers */ len = sb_internal_length(sb); for(idx = 0; idx < len; idx++) lb_free(&(sb->lb[idx])); free(sb->lb); sb->lb = NULL; sb->head = sb->tail = 0; sb->size = 0; } /* sb_internal_get: * retrieve line buffer according to index */ LPLB sb_internal_get(LPSB sb, uint index) { LPLB line = NULL; assert(sb != NULL); assert(index < sb->size); assert(sb->lb != NULL); if (index < sb_internal_length(sb)) line = &(sb->lb[(sb->head + index) % sb->size]); return line; } /* sb_get: * retrieve (wrapped) line buffer */ LPLB sb_get(LPSB sb, uint index) { LPLB line = NULL; assert(sb != NULL); assert((index < sb->size) || (sb->wrap_at > 0)); assert(sb->lb != NULL); if (sb->wrap_at == 0) { if (index < sb_internal_length(sb)) line = &(sb->lb[(sb->head + index) % sb->size]); } else { /* count number of wrapped lines */ uint line_count; uint idx; uint internal_length = sb_internal_length(sb); if (sb->last_line <= index) { /* use cached values */ line_count = sb->last_line; idx = sb->last_line_index; } else { line_count = 0; idx = 0; } for ( ; (idx < internal_length); idx++) { line_count += sb_lines(sb, sb_internal_get(sb, idx)); if (line_count > index) break; } if (idx < internal_length) { uint wrapped_lines; uint len; LPLB lb; uint start, count; /* get last line buffer */ lb = sb_internal_get(sb, idx); len = lb_length(lb); wrapped_lines = sb_lines(sb, lb); line_count -= wrapped_lines; /* cache current index */ sb->last_line_index = idx; sb->last_line = line_count; /* index into current line buffer */ start = (index - line_count) * sb->wrap_at; count = GPMIN(len - start, sb->wrap_at); /* copy substring from current line buffer */ lb_init(sb->current_line); if (lb->str) { sb->current_line->len = count; sb->current_line->str = lb->str + start; //lb_insert_str(sb->current_line, 0, lb->str + start, count); } /* return temporary buffer */ line = sb->current_line; } } return line; } /* sb_get_last: * retrieve last line buffer */ LPLB sb_get_last(LPSB sb) { uint last; assert(sb != NULL); last = sb_internal_length(sb) - 1; return sb_internal_get(sb, last); } /* sb_append: * append a line buffer at the end of the screen buffer, * if the screen buffer is full discard the first line; * the line is _copied_ to the screen buffer */ int sb_append(LPSB sb, LPLB lb) { uint idx; int y_correction = 0; assert(sb != NULL); assert(lb != NULL); idx = sb->tail; sb->tail = (sb->tail + 1) % sb->size; if (sb->tail == sb->head) { y_correction = sb_lines(sb, &(sb->lb[sb->head])); lb_free(&(sb->lb[sb->head])); sb->head = (sb->head + 1) % sb->size; } lb_copy(&(sb->lb[idx]), lb); sb->length += sb_lines(sb, lb) - y_correction; return y_correction; } /* sb_internal_length: * return number of entries (line buffers) of the screen buffer */ uint sb_internal_length(LPSB sb) { uint lines; assert(sb != NULL); if (sb->head <= sb->tail) lines = sb->tail - sb->head; else lines = sb->size - 1; return lines; } /* sb_length: * get the current number of lines in the screen buffer */ uint sb_length(LPSB sb) { return sb->length; } /* sb_length: * get the current number of lines in the screen buffer */ uint sb_calc_length(LPSB sb) { int lines; assert(sb != NULL); if (sb->wrap_at == 0) { lines = sb_internal_length(sb); } else { uint idx; /* count number of wrapped lines */ for(idx=0, lines=0; idx < sb_internal_length(sb); idx++) lines += sb_lines(sb, sb_internal_get(sb, idx)); } return lines; } /* sb_resize: * change the maximum number of lines in the screen buffer to <size> * discard lines at the top if necessary */ void sb_resize(LPSB sb, uint size) { LPLB lb; uint sidx, idx, count; uint len; /* allocate new buffer */ lb = calloc(size + 1, sizeof(LB)); len = sb_internal_length(sb); sidx = (size > len) ? 0 : (len - size); count = (size > len) ? len : size; /* free elements if necessary */ for(idx = 0; idx < sidx; idx++) lb_free(sb_internal_get(sb, idx)); /* copy elements to new buffer */ for(idx = 0; idx < count; idx++, sidx++) lb_copy(&(lb[idx]), sb_internal_get(sb, sidx)); /* replace old buffer by new one */ free(sb->lb); sb->lb = lb; sb->size = size + 1; sb->head = 0; sb->tail = count; } /* sb_lines: * return the number of (wrapped) text lines */ uint sb_lines(LPSB sb, LPLB lb) { if (sb->wrap_at != 0) return (lb_length(lb) + sb->wrap_at) / sb->wrap_at; else return 1; } /* sb_max_line_length: * determine maximum length of a single text line */ uint sb_max_line_length(LPSB sb) { uint idx; uint len; uint count; len = 0; count = sb_internal_length(sb); for(idx = 0; idx < count; idx++) len = GPMAX(lb_length(sb_internal_get(sb, idx)), len); if ((sb->wrap_at != 0) && (len > sb->wrap_at)) len = sb->wrap_at; return len; } /* sb_find_new_pos: * determine new x,y position after a change of the wrapping position */ void sb_find_new_pos(LPSB sb, uint x, uint y, uint new_wrap_at, uint * new_x, uint * new_y) { uint internal_length; uint line_count; uint old_wrap_at; uint idx, xofs; uint i; /* determine index of corresponding internal line */ internal_length = sb_internal_length(sb); for (idx = line_count = 0; idx < internal_length; idx++) { uint lines = sb_lines(sb, sb_internal_get(sb, idx)); if (line_count + lines > y) break; line_count += lines; } if (line_count == 0) { *new_x = *new_y = 0; return; } /* calculate x offset within this line */ xofs = x + (y - line_count) * sb->wrap_at; if (new_wrap_at) { /* temporarily switch wrapping */ old_wrap_at = sb->wrap_at; sb->wrap_at = new_wrap_at; /* count lines with new wrapping */ for (i = line_count = 0; i < idx; i++) line_count += sb_lines(sb, sb_internal_get(sb, i)); /* determine new position */ *new_x = xofs % new_wrap_at; *new_y = line_count + (xofs / new_wrap_at); /* switch wrapping back */ sb->wrap_at = old_wrap_at; } else { *new_x = xofs; *new_y = idx; } } void sb_wrap(LPSB sb, uint wrap_at) { sb->wrap_at = wrap_at; /* invalidate line cache */ sb->last_line = 0; sb->last_line_index = 0; /* update length cache */ sb->length = sb_calc_length(sb); } /* sb_last_insert_str: * call lb_insert str for the last line, * adjust total number of lines accordingly */ void sb_last_insert_str(LPSB sb, uint pos, char *s, uint count) { LPLB lb; uint len; lb = sb_get_last(sb); len = sb_lines(sb, lb); lb_insert_str(lb, pos, s, count); /* check if total length of sb has changed */ sb->length += sb_lines(sb, lb) - len; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wgnuplib.h��������������������������������������������������������������������0000644�0004711�0000144�00000030053�11756524321�013524� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: wgnuplib.h,v 1.53.2.1 2012/05/20 21:26:31 markisch Exp $ */ /* GNUPLOT - win/wgnuplib.h */ /*[ * Copyright 1982 - 1993, 1998, 2004 Russell Lang * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Russell Lang */ #ifndef WGNUPLIB_H #define WGNUPLIB_H #include <windows.h> #include "screenbuf.h" #include "term_api.h" /* Functions flagged WDPROC are to be export by the DLL, so they can be called * directly from win.trm or the gnuplot core */ #define WDPROC WINAPI /* ================================== */ /* symbols for the two icons */ #define TEXTICON 123 #define GRPICON 124 /* ================================== */ /* For WIN32 API's */ /* #define DEFAULT_CHARSET ANSI_CHARSET */ # define MoveTo(hdc,x,y) MoveToEx(hdc,x,y,(LPPOINT)NULL); #if defined(__MINGW32__) && (__GNUC__ < 3) && !defined(CYGWIN) /* windowsx.h in MinGW32 2.x doesn't define some of the more traditional * things gnuplot expects in every Windows C compiler, it seems: */ #define _fstrstr(s1,s2) (strstr(s1,s2)) #define _fstrchr(s,c) (strchr(s,c)) #define _fstrrchr(s,c) (strrchr(s,c)) #define _fstrlen(s) (strlen(s)) #define _fstrcpy(d,s) (strcpy(d,s)) #define _fstrncpy(d,s,n) (strncpy(d,s,n)) #define _fstrcat(s1,s2) (strcat(s1,s2)) #endif /* __MINGW32__ */ /* ================================== */ /* wprinter.c - windows printer routines */ void WDPROC DumpPrinter(HWND hwnd, LPSTR szAppName, LPSTR szFileName); typedef struct tagPRINT { HDC hdcPrn; HWND hDlgPrint; BOOL bUserAbort; POINT pdef; POINT psize; POINT poff; struct tagPRINT *next; } GP_PRINT; typedef GP_PRINT * GP_LPPRINT; /* ================================== */ /* wpause.c - pause window structure */ typedef struct tagPW { HINSTANCE hInstance; /* required */ HINSTANCE hPrevInstance; /* required */ LPSTR Title; /* required */ LPSTR Message; /* required */ POINT Origin; /* optional */ HWND hWndParent; /* optional */ HWND hWndPause; HWND hOK; HWND hCancel; BOOL bPause; BOOL bPauseCancel; BOOL bDefOK; WNDPROC lpfnOK; WNDPROC lpfnCancel; WNDPROC lpfnPauseButtonProc; } PW; typedef PW * LPPW; int WDPROC PauseBox(LPPW lppw); /* ================================== */ /* wmenu.c - menu structure */ #define BUTTONMAX 10 typedef struct tagMW { LPSTR szMenuName; /* required */ HMENU hMenu; BYTE **macro; BYTE *macrobuf; int nCountMenu; DLGPROC lpProcInput; char *szPrompt; char *szAnswer; int nChar; int nButton; HWND hToolbar; HWND hButton[BUTTONMAX]; int hButtonID[BUTTONMAX]; } MW; typedef MW * LPMW; /* ================================== */ /* wtext.c text window structure */ /* If an optional item is not specified it must be zero */ #define MAXFONTNAME 80 typedef struct tagTW { GP_LPPRINT lpr; /* must be first */ HINSTANCE hInstance; /* required */ HINSTANCE hPrevInstance; /* required */ LPSTR Title; /* required */ LPMW lpmw; /* optional */ POINT ScreenSize; /* optional */ /* size of the visible screen in characters */ unsigned int KeyBufSize; /* optional */ LPSTR IniFile; /* optional */ LPSTR IniSection; /* optional */ LPSTR DragPre; /* optional */ LPSTR DragPost; /* optional */ int nCmdShow; /* optional */ FARPROC shutdown; /* optional */ HICON hIcon; /* optional */ LPSTR AboutText; /* optional */ HMENU hPopMenu; HWND hWndText; HWND hWndParent; HWND hStatusbar; POINT Origin; POINT Size; SB ScreenBuffer; BOOL bWrap; /* wrap long lines */ BYTE *KeyBuf; BYTE *KeyBufIn; BYTE *KeyBufOut; BYTE Attr; BOOL bFocus; BOOL bGetCh; BOOL bSysColors; HBRUSH hbrBackground; char fontname[MAXFONTNAME]; /* font name */ int fontsize; /* font size in pts */ HFONT hfont; int CharAscent; int ButtonHeight; int StatusHeight; int CaretHeight; int CursorFlag; /* scroll to cursor after \n & \r */ POINT CursorPos; /* cursor position on screen */ POINT ClientSize; /* size of the client window in pixels */ POINT CharSize; POINT ScrollPos; POINT ScrollMax; POINT MarkBegin; POINT MarkEnd; BOOL Marking; } TW; typedef TW * LPTW; #ifndef WGP_CONSOLE /* ================================== */ /* wtext.c - Text Window */ void WDPROC TextMessage(void); int WDPROC TextInit(LPTW lptw); void WDPROC TextClose(LPTW lptw); int WDPROC TextKBHit(LPTW); int WDPROC TextGetCh(LPTW); int WDPROC TextGetChE(LPTW); LPSTR WDPROC TextGetS(LPTW lptw, LPSTR str, unsigned int size); int WDPROC TextPutCh(LPTW, BYTE); int WDPROC TextPutS(LPTW lptw, LPSTR str); #if 0 /* The new screen buffer currently does not support these */ void WDPROC TextGotoXY(LPTW lptw, int x, int y); int WDPROC TextWhereX(LPTW lptw); int WDPROC TextWhereY(LPTW lptw); void WDPROC TextCursorHeight(LPTW lptw, int height); void WDPROC TextClearEOL(LPTW lptw); void WDPROC TextClearEOS(LPTW lptw); void WDPROC TextInsertLine(LPTW lptw); void WDPROC TextDeleteLine(LPTW lptw); void WDPROC TextScrollReverse(LPTW lptw); #endif void WDPROC TextAttr(LPTW lptw, BYTE attr); #endif /* WGP_CONSOLE */ void WDPROC AboutBox(HWND hwnd, LPSTR str); /* ================================== */ /* wgraph.c - graphics window */ /* windows data */ /* number of different 'basic' pens supported (the ones you can modify * by the 'Line styles...' dialog, and save to/from wgnuplot.ini). */ #define WGNUMPENS 15 /* maximum number of different colors per palette, used to be hardcoded (256) */ #define WIN_PAL_COLORS 4096 /* Information about one graphical operation to be stored by the * driver for the sake of redraws. Array of GWOP kept in global block */ struct GWOP { UINT op; UINT x, y; HLOCAL htext; }; /* memory block for graph operations */ struct GWOPBLK { /* kept in local memory */ struct GWOPBLK *next; HGLOBAL hblk; /* handle to a global block */ struct GWOP *gwop; /* pointer to global block if locked */ UINT used; /* number of GWOP's used */ }; /* ops */ #define W_endoflist 0 #define WIN_POINT_TYPES 15 /* required by win.trm */ #define W_dot 10 #define W_plus 11 #define W_cross 12 #define W_star 13 #define W_box 14 #define W_fbox 15 #define W_circle 16 #define W_fcircle 17 #define W_itriangle 18 #define W_fitriangle 19 #define W_triangle 20 #define W_ftriangle 21 #define W_diamond 22 #define W_fdiamond 23 #define W_pentagon 24 #define W_fpentagon 25 #define W_move 30 #define W_vect 31 #define W_line_type 32 #define W_put_text 33 #define W_justify 34 #define W_text_angle 35 #define W_pointsize 36 #define W_line_width 37 #define W_setcolor 38 #define W_filled_polygon_pt 39 #define W_filled_polygon_draw 40 #define W_boxfill 41 #define W_fillstyle 42 #define W_font 43 #define W_enhanced_text 44 #define W_image 45 #define W_layer 46 #define W_text_encoding 47 typedef struct tagGW { GP_LPPRINT lpr; /* must be first */ HINSTANCE hInstance; /* required */ HINSTANCE hPrevInstance; /* required */ int Id; /* plot number */ LPSTR Title; /* required */ int xmax; /* required */ int ymax; /* required */ LPTW lptw; /* optional */ /* associated text window */ POINT Origin; /* optional */ /* origin of graph window */ POINT Size; /* optional */ /* size of graph window */ LPSTR IniFile; /* optional */ LPSTR IniSection; /* optional */ HWND hWndGraph; /* window handle */ HWND hStatusbar; /* window handle of status bar */ int StatusHeight; /* height of status line area */ HWND hToolbar; int ToolbarHeight; HMENU hPopMenu; /* popup menu */ struct GWOPBLK *gwopblk_head; struct GWOPBLK *gwopblk_tail; unsigned int nGWOP; BOOL locked; /* locked if being written */ BOOL initialized; /* already initialized? */ BOOL graphtotop; /* bring graph window to top after every plot? */ BOOL color; /* color pens? */ BOOL dashed; /* dashed lines? */ BOOL doublebuffer; /* double buffering? */ BOOL oversample; /* oversampling? */ BOOL antialiasing; BOOL polyaa; /* anti-aliasing for polygons ? */ BOOL patternaa; /* anti-aliasing for polygons ? */ BOOL *hideplot; unsigned int maxhideplots; BOOL hidegrid; unsigned int numplots; BOOL hasgrid; LPRECT keyboxes; unsigned int maxkeyboxes; int htic; /* horizontal size of point symbol (xmax units) */ int vtic; /* vertical size of point symbol (ymax units)*/ int hchar; /* horizontal size of character (xmax units) */ int vchar; /* vertical size of character (ymax units)*/ char fontname[MAXFONTNAME]; /* current font name */ int fontsize; /* current font size in pts */ char deffontname[MAXFONTNAME]; /* default font name */ int deffontsize; /* default font size */ int angle; /* text angle */ BOOL rotate; /* can text be rotated 90 degrees ? */ int justify; /* text justification */ HFONT hfonth; /* horizonal font */ HFONT hfontv; /* rotated font (arbitrary angle) */ LOGFONT lf; /* cached to speed up rotated fonts */ double org_pointsize; /* Original Pointsize */ int encoding_error; /* last unknown encoding */ double fontscale; /* scale factor for font sizes */ enum set_encoding_id encoding; /* text encoding */ HPEN hapen; /* stored current pen */ HPEN hsolid; /* solid sibling of current pen */ HPEN hnull; /* empty null pen */ LOGPEN colorpen[WGNUMPENS+2]; /* color pen definitions */ LOGPEN monopen[WGNUMPENS+2]; /* mono pen definitions */ double linewidth; /* scale factor for linewidth */ HBRUSH colorbrush[WGNUMPENS+2]; /* brushes to fill points */ COLORREF background; /* background color */ HBRUSH hbrush; /* background brush */ HBRUSH hcolorbrush; /* */ int sampling; /* current sampling factor */ struct tagGW * next; /* pointer to next window */ } GW; typedef GW * LPGW; #define WINFONTSIZE 10 #define WINFONT "Tahoma" #ifndef WINJPFONT #define WINJPFONT "MS PGothic" #endif #define WINGRAPHTITLE "gnuplot graph" extern termentry * WIN_term; extern char WIN_inifontname[MAXFONTNAME]; extern int WIN_inifontsize; void WDPROC GraphInitStruct(LPGW lpgw); void WDPROC GraphInit(LPGW lpgw); void WDPROC GraphClose(LPGW lpgw); void WDPROC GraphStart(LPGW lpgw, double pointsize); void WDPROC GraphEnd(LPGW lpgw); void WDPROC GraphChangeTitle(LPGW lpgw); void WDPROC GraphResume(LPGW lpgw); void WDPROC GraphOp(LPGW lpgw, UINT op, UINT x, UINT y, LPCSTR str); void WDPROC GraphOpSize(LPGW lpgw, UINT op, UINT x, UINT y, LPCSTR str, DWORD size); void WDPROC GraphPrint(LPGW lpgw); void WDPROC GraphRedraw(LPGW lpgw); void WDPROC win_close_terminal_window(LPGW lpgw); TBOOLEAN GraphHasWindow(LPGW lpgw); #ifdef USE_MOUSE void WDPROC Graph_set_cursor(LPGW lpgw, int c, int x, int y); void WDPROC Graph_set_ruler(LPGW lpgw, int x, int y); void WDPROC Graph_put_tmptext(LPGW lpgw, int i, LPCSTR str); void WDPROC Graph_set_clipboard(LPGW lpgw, LPCSTR s); #endif /* BM: callback functions for enhanced text */ void WDPROC GraphEnhancedOpen(char *fontname, double fontsize, double base, BOOL widthflag, BOOL showflag, int overprint); void WDPROC GraphEnhancedFlush(void); void WIN_update_options __PROTO((void)); /* ================================== */ #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wgnuplib.c��������������������������������������������������������������������0000644�0004711�0000144�00000006275�11541445723�013530� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: wgnuplib.c,v 1.8 2011/03/20 18:47:47 markisch Exp $"); } #endif /* GNUPLOT - win/wgnuplib.c */ /*[ * Copyright 1992, 1993, 1998, 2004 Russell Lang * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Russell Lang */ #define STRICT #include <ctype.h> #include <windows.h> #include <windowsx.h> #include "wgnuplib.h" #include "wresourc.h" #include "wcommon.h" HINSTANCE hdllInstance; LPSTR szParentClass = "wgnuplot_parent"; LPSTR szTextClass = "wgnuplot_text"; LPSTR szPauseClass = "wgnuplot_pause"; LPSTR szGraphClass = "wgnuplot_graph"; /* Window ID */ struct WID { BOOL used; HWND hwnd; void * ptr; }; struct WID *widptr = NULL; unsigned int nwid = 0; HLOCAL hwid = 0; void NEAR * LocalAllocPtr(UINT flags, UINT size) { HLOCAL hlocal; hlocal = LocalAlloc(flags, size+1); return (char *)LocalLock(hlocal); } void NEAR * LocalReAllocPtr(void NEAR * ptr, UINT flags, UINT size) { HLOCAL hlocal; hlocal = LocalHandle(ptr); LocalUnlock(hlocal); hlocal = LocalReAlloc(hlocal, size+1, flags); return (char *)LocalLock(hlocal); } void LocalFreePtr(void NEAR *ptr) { HLOCAL hlocal; hlocal = LocalHandle(ptr); LocalUnlock(hlocal); LocalFree(hlocal); return; } /* ascii to int */ /* returns: * A pointer to character past int if successful, * otherwise NULL on failure. * convert int is stored at pval. */ LPSTR GetInt(LPSTR str, LPINT pval) { int val = 0; BOOL negative = FALSE; BOOL success = FALSE; unsigned char ch; if (!str) return NULL; while ( (ch = *str)!=0 && isspace(ch) ) str++; if (ch == '-') { negative = TRUE; str++; } while ( (ch = *str)!=0 && isdigit(ch) ) { success = TRUE; val = val * 10 + (ch - '0'); str++; } if (success) { if (negative) val = -val; *pval = val; return str; } return NULL; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/scaling.cur�������������������������������������������������������������������0000644�0004711�0000144�00000000506�07247224464�013664� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ ����0�����(��� ���@�������������������������������������������������������������������������������������������@��@��@�@��@�@�@�@�@�@���������������?�?�??????????���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/geticon.c���������������������������������������������������������������������0000644�0004711�0000144�00000004675�10071042562�013322� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: geticon.c,v 1.3 2004/07/01 17:10:10 broeker Exp $"); } #endif /* geticon.c */ /* extract Borland ascii format icons from resource script */ /* and write as Microsoft binary format .ICO files */ /* Russell Lang 1992-12-20 */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> /* HBB 980809: naming a variable 'inline' is a bad idea, these days. Too * many compilers use it as a keyword... Changed to 'inputline' */ #define MAXLINE 255 FILE *rcfile; char inputline[MAXLINE+1]; char *tok1, *tok2, *tok3; char *p; char iconname[MAXLINE+1]; FILE *iconfile; int line; int htoi(char ch) { ch = toupper(ch); if (ch < '0') return(0); else if (ch <= '9') return((int)(ch - '0')); else if (ch < 'A') return(0); else if (ch <= 'F') return((int)(ch - 'A' + 10)); return(0); } void geticon() { char ch; fgets(inputline,MAXLINE,rcfile); line++; if (strncmp(inputline,"BEGIN",5)) { fprintf(stderr,"Expecting BEGIN at line %d\n",line); exit(3); } if ( (iconfile = fopen(iconname,"wb")) == (FILE *)NULL) { fprintf(stderr,"Can't open ICON file %s\n",iconname); exit(4); } fgets(inputline,MAXLINE,rcfile); line++; while (strncmp(inputline,"END",3) && !feof(rcfile)) { for (p = inputline; *p && (*p==' ' || *p == '\t' || *p=='\''); p++); while (isxdigit(*p)) { ch = htoi(*p++)<<4; ch += htoi(*p++); fputc(ch, iconfile); p++; } fgets(inputline,MAXLINE,rcfile); line++; } fclose(iconfile); } int main(int argc, char *argv[]) { if ((argc < 2) || (argc > 3)) { fprintf(stderr,"Usage: geticon resource_file [icon_directory]\n"); return(1); } if ( (rcfile = fopen(argv[1],"r")) == (FILE *)NULL) { fprintf(stderr,"Can't open RC file\n"); return(2); } line = 0; while (fgets(inputline,MAXLINE,rcfile)) { line++; tok1 = strtok(inputline," \t\r\n"); tok2 = strtok(NULL," \t\r\n"); tok3 = strtok(NULL," \t\r\n"); if (tok2 && !strcmp(tok2,"ICON") && (tok3 == (char *)NULL)) { iconname[0] = '\0'; if (argc == 3) { strcpy(iconname,argv[2]); strcat(iconname,"\\"); } strcat(iconname,tok1); strcat(iconname,".ico"); fprintf(stdout,"%s\n",iconname); geticon(); } } return 0; } �������������������������������������������������������������������gnuplot-4.6.4/src/win/winmain.h���������������������������������������������������������������������0000644�0004711�0000144�00000004524�12160133407�013332� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: winmain.h,v 1.10.2.2 2013/06/08 11:52:33 markisch Exp $ */ /* GNUPLOT - win/winmain.h */ /*[ * Copyright 2000, 2004 Hans-Bernhard Broeker * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Hans-Bernhard Broeker */ /* this file contains items defined by winmain.c that other parts of * the program need to access. Like the global data containers */ #ifndef GNUPLOT_WINMAIN_H #define GNUPLOT_WINMAIN_H #include "wgnuplib.h" extern TW textwin; extern LPGW graphwin; extern LPGW listgraphs; extern PW pausewin; extern MW menuwin; extern HWND help_window; extern LPSTR winhelpname; extern LPSTR szModuleName; extern LPSTR szPackageDir; extern LPSTR szMenuName; int Pause __PROTO((LPSTR str)); void screen_dump __PROTO((void)); void kill_pending_Pause_dialog __PROTO((void)); void win_sleep __PROTO((DWORD dwMilliSeconds)); TBOOLEAN WinWindowOpened(void); void WinPersistTextClose(void); void WinMessageLoop(void); void WinRaiseConsole(void); #endif /* GNUPLOT_WINMAIN_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wpause.c����������������������������������������������������������������������0000644�0004711�0000144�00000024214�11676710605�013201� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: wpause.c,v 1.20.2.1 2011/12/11 11:38:53 markisch Exp $ */ /* GNUPLOT - win/wpause.c */ /*[ * Copyright 1992, 1993, 1998, 2004 Russell Lang * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Russell Lang */ /* PauseBox() */ /* MessageBox ALWAYS appears in the middle of the screen so instead */ /* we use this PauseBox so we can decide where it is to be placed */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #define STRICT #include <windows.h> #include <windowsx.h> #include <string.h> #include "wgnuplib.h" #include "wresourc.h" #include "wcommon.h" /* Pause Window */ LRESULT CALLBACK WndPauseProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK PauseButtonProc(HWND, UINT, WPARAM, LPARAM); /* We need to hide "OK" and "Cancel" buttons on the pause dialog during * "pause mouse". */ extern int paused_for_mouse; /* Non-blocking Sleep function, called by pause_command. This allows redrawing and (some) user interaction. */ void win_sleep(DWORD dwMilliSeconds) { MSG msg; DWORD t0, t1, tstop, rc; t0 = GetTickCount(); tstop = t0 + dwMilliSeconds; t1 = dwMilliSeconds; /* remaining time to wait */ do { rc = MsgWaitForMultipleObjects(0, NULL, 0, t1, QS_ALLINPUT); if (rc != WAIT_TIMEOUT) { while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) { if (msg.message == WM_QUIT) return; TranslateMessage(&msg); DispatchMessage(&msg); } /* calculate remaining time, detect overflow */ t1 = GetTickCount(); if (tstop > t0) { if ((t1 >= tstop) || (t1 < t0)) rc = WAIT_TIMEOUT; } else { if ((t1 >= tstop) && (t1 < t0)) rc = WAIT_TIMEOUT; } t1 = tstop - t1; /* remaining time to wait */ } } while(rc != WAIT_TIMEOUT); } /* Create Pause Class */ /* called from PauseBox the first time a pause window is created */ void CreatePauseClass(LPPW lppw) { WNDCLASS wndclass; wndclass.style = 0; wndclass.lpfnWndProc = (WNDPROC)WndPauseProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = sizeof(void *); wndclass.hInstance = lppw->hInstance; wndclass.hIcon = NULL; wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); wndclass.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1); wndclass.lpszMenuName = NULL; wndclass.lpszClassName = szPauseClass; RegisterClass(&wndclass); } /* PauseBox */ int WDPROC PauseBox(LPPW lppw) { MSG msg; HDC hdc; int width, height; TEXTMETRIC tm; RECT rect; char *current_pause_title = lppw->Title; static char TITLE_PAUSE_MOUSE[] = "waiting for mouse click"; if (paused_for_mouse) current_pause_title = TITLE_PAUSE_MOUSE; if (!lppw->hPrevInstance) CreatePauseClass(lppw); GetWindowRect(GetDesktopWindow(), &rect); if ( (lppw->Origin.x == CW_USEDEFAULT) || (lppw->Origin.x == 0) ) lppw->Origin.x = (rect.right + rect.left) / 2; if ( (lppw->Origin.y == CW_USEDEFAULT) || (lppw->Origin.y == 0) ) lppw->Origin.y = (rect.bottom + rect.top) / 2; hdc = GetDC(NULL); SelectObject(hdc, GetStockObject(SYSTEM_FONT)); GetTextMetrics(hdc, &tm); width = max(24,4+_fstrlen(lppw->Message)) * tm.tmAveCharWidth; width = min(width, rect.right-rect.left); height = 28 * (tm.tmHeight + tm.tmExternalLeading) / 4; ReleaseDC(NULL,hdc); lppw->hWndPause = CreateWindowEx( WS_EX_DLGMODALFRAME | WS_EX_TOPMOST | WS_EX_APPWINDOW , szPauseClass, current_pause_title, /* HBB 981202: WS_POPUPWINDOW would have WS_SYSMENU in it, but we don't * want, nor need, a System menu in our Pause windows. Actually, it was * emptied manually, in the WM_CREATE handler below, in the original code. * This solution seems cleaner. */ WS_POPUP | WS_BORDER | WS_CAPTION, lppw->Origin.x - width/2, lppw->Origin.y - height/2, width, height, lppw->hWndParent, NULL, lppw->hInstance, lppw); SendMessage(lppw->hCancel, BM_SETSTYLE, (WPARAM)BS_DEFPUSHBUTTON, (LPARAM)FALSE); /* Don't show the pause "OK CANCEL" dialog for "pause mouse ..." -- well, show it only for "pause -1". Note: maybe to show in the window titlebar or somewhere else a message like graphwin.Title = "gnuplot pausing (waiting for mouse click)"; */ if (!paused_for_mouse) { ShowWindow(lppw->hWndPause, SW_SHOWNORMAL); BringWindowToTop(lppw->hWndPause); UpdateWindow(lppw->hWndPause); } lppw->bPause = TRUE; lppw->bPauseCancel = IDCANCEL; while (lppw->bPause) { /* HBB 20021211: Nigel Nunn found a better way to avoid * 100% CPU load --> use it */ if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) { /* wait until window closed */ TranslateMessage(&msg); DispatchMessage(&msg); } else WaitMessage(); } DestroyWindow(lppw->hWndPause); return(lppw->bPauseCancel); } LRESULT CALLBACK WndPauseProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; RECT rect; TEXTMETRIC tm; LPPW lppw; int cxChar, cyChar, middle; lppw = (LPPW)GetWindowLong(hwnd, 0); switch(message) { case WM_KEYDOWN: if (wParam == VK_RETURN) { if (lppw->bDefOK) SendMessage(hwnd, WM_COMMAND, IDOK, 0L); else SendMessage(hwnd, WM_COMMAND, IDCANCEL, 0L); } return(0); case WM_COMMAND: switch(LOWORD(wParam)) { case IDCANCEL: case IDOK: if (!paused_for_mouse) { /* ignore OK and Cancel buttons during "pause mouse" */ lppw->bPauseCancel = LOWORD(wParam); lppw->bPause = FALSE; } break; } return(0); case WM_SETFOCUS: SetFocus(lppw->bDefOK ? lppw->hOK : lppw->hCancel); return(0); case WM_PAINT: { hdc = BeginPaint(hwnd, &ps); SelectObject(hdc, GetStockObject(SYSTEM_FONT)); SetTextAlign(hdc, TA_CENTER); GetClientRect(hwnd, &rect); SetBkMode(hdc,TRANSPARENT); TextOut(hdc,(rect.right+rect.left)/2, (rect.bottom+rect.top)/6, lppw->Message,_fstrlen(lppw->Message)); EndPaint(hwnd, &ps); return 0; } case WM_CREATE: { int ws_opts = WS_CHILD | BS_DEFPUSHBUTTON; if (!paused_for_mouse) /* don't show buttons during pausing for mouse or key */ ws_opts |= WS_VISIBLE; /* HBB 981202 HMENU sysmenu = GetSystemMenu(hwnd, FALSE); */ lppw = ((CREATESTRUCT *)lParam)->lpCreateParams; SetWindowLong(hwnd, 0, (LONG)lppw); lppw->hWndPause = hwnd; hdc = GetDC(hwnd); SelectObject(hdc, GetStockObject(SYSTEM_FONT)); GetTextMetrics(hdc, &tm); cxChar = tm.tmAveCharWidth; cyChar = tm.tmHeight + tm.tmExternalLeading; ReleaseDC(hwnd,hdc); middle = ((LPCREATESTRUCT) lParam)->cx / 2; lppw->hOK = CreateWindow((LPSTR)"button", (LPSTR)"OK", ws_opts, middle - 10*cxChar, 3*cyChar, 8*cxChar, 7*cyChar/4, hwnd, (HMENU)IDOK, ((LPCREATESTRUCT) lParam)->hInstance, NULL); lppw->bDefOK = TRUE; lppw->hCancel = CreateWindow((LPSTR)"button", (LPSTR)"Cancel", ws_opts, middle + 2*cxChar, 3*cyChar, 8*cxChar, 7*cyChar/4, hwnd, (HMENU)IDCANCEL, ((LPCREATESTRUCT) lParam)->hInstance, NULL); lppw->lpfnOK = (WNDPROC) GetWindowLong(lppw->hOK, GWL_WNDPROC); SetWindowLong(lppw->hOK, GWL_WNDPROC, (LONG)PauseButtonProc); lppw->lpfnCancel = (WNDPROC) GetWindowLong(lppw->hCancel, GWL_WNDPROC); SetWindowLong(lppw->hCancel, GWL_WNDPROC, (LONG)PauseButtonProc); if (GetParent(hwnd)) EnableWindow(GetParent(hwnd),FALSE); #if 0 /* HBB 981203 */ DeleteMenu(sysmenu,SC_RESTORE,MF_BYCOMMAND); DeleteMenu(sysmenu,SC_SIZE,MF_BYCOMMAND); DeleteMenu(sysmenu,SC_MINIMIZE,MF_BYCOMMAND); DeleteMenu(sysmenu,SC_MAXIMIZE,MF_BYCOMMAND); DeleteMenu(sysmenu,SC_TASKLIST,MF_BYCOMMAND); DeleteMenu(sysmenu,0,MF_BYCOMMAND); /* a separator */ DeleteMenu(sysmenu,0,MF_BYCOMMAND); /* a separator */ #endif } return 0; case WM_DESTROY: GetWindowRect(hwnd, &rect); lppw->Origin.x = (rect.right+rect.left)/2; lppw->Origin.y = (rect.bottom+rect.top)/2; lppw->bPause = FALSE; if (GetParent(hwnd)) EnableWindow(GetParent(hwnd),TRUE); break; } return DefWindowProc(hwnd, message, wParam, lParam); } LRESULT CALLBACK PauseButtonProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { LPPW lppw; LONG n = GetWindowLong(hwnd, GWL_ID); lppw = (LPPW)GetWindowLong(GetParent(hwnd), 0); switch(message) { case WM_KEYDOWN: switch(wParam) { case VK_TAB: case VK_BACK: case VK_LEFT: case VK_RIGHT: case VK_UP: case VK_DOWN: lppw->bDefOK = !(n == IDOK); if (lppw->bDefOK) { SendMessage(lppw->hOK, BM_SETSTYLE, (WPARAM)BS_DEFPUSHBUTTON, (LPARAM)TRUE); SendMessage(lppw->hCancel, BM_SETSTYLE, (WPARAM)BS_PUSHBUTTON, (LPARAM)TRUE); SetFocus(lppw->hOK); } else { SendMessage(lppw->hOK, BM_SETSTYLE, (WPARAM)BS_PUSHBUTTON, (LPARAM)TRUE); SendMessage(lppw->hCancel, BM_SETSTYLE, (WPARAM)BS_DEFPUSHBUTTON, (LPARAM)TRUE); SetFocus(lppw->hCancel); } break; default: SendMessage(GetParent(hwnd), message, wParam, lParam); } break; } return CallWindowProc(((n == IDOK) ? lppw->lpfnOK : lppw->lpfnCancel), hwnd, message, wParam, lParam); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/README.win-ja�����������������������������������������������������������������0000644�0004711�0000144�00000035020�11657457515�013601� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# $Id: README.win-ja,v 1.3 2011/11/12 11:58:05 markisch Exp $ # a Japanized kit of wgnuplot # Shigeharu TAKENO <shige@iee.niit.ac.jp> # wgnuplot ̓{ꉻɂ‚ Shigeharu TAKENO <shige@iee.niit.ac.jp> 1. ͂߂ ----------- ɂ́Agnuplot ɕt}jA̓{󂪒uĂ B̃t@Cł́AɒuĂȉ̃t@CɊւ (MS-Windows p gnuplot oCi̊ȈՓ{ꉻ) s܂B [a] wgnuplot-ja.mnu: wgnuplot ̃j[bZ[W̓{ [b] wgnuplot-ja.hlp: wgnuplot p̓{IC}jA (.hlp `) [c] wgnuplot-ja.chm: wgnuplot p̓{IC}jA (HTML help `) [d] README.win-ja: ̃t@C (MS-Windows [Uւ̐) ȂA[b],[c] ̓oCit@CŁA[a],[d] ͓{eLXgt@ CłAR[h Shift_JIS ɂȂĂ܂BKvȂΓK ɕϊĂpB ̃t@C ( Unix [Uւ̐) ɊւẮAREADME.ja B ̓{̍ŐVł₱̖Ɋւ钍ӓ͈ȉ WWW y[WɌf ڂĂ\ł̂łQƂĉB http://takeno.iee.niit.ac.jp/~foo/gp-jman/ gnuplot ̃}jA{ PDF PSALaTeX Ȃǂ̑̃tH[ }bǧ`ɕϊt@CɒuĂ܂B 2. CXg[ --------------- MS-Windows ͑SRڂ͂Ȃ̂łAȉ̂悤ɂ΂ Ǝv܂BȂAȉ͂ł MS-Windows XP ŎsmF ܂B [1] MS-Windows poCi̓WJ ܂AMS-Windows poCiKȃfBNgɓWJ܂BKv Ȃ̂́A̓{ꉻLbg MS-Windows p gnuplot {̂łB MS-Windows p gnuplot ́AKvȂ gnuplot ̌z[y[W http://www.gnuplot.info/ 炽ǂĎ擾ĂB ȂAgnuplot MS-Windows poCíAقɂp쐬 ̂⏼쐬̂́A邢͎Rꂳ쐬̂ (gnuplot+) Ȃǂ܂B http://w32tex.org/index-ja.html ftp://ftp.ring.gr.jp/pub/text/TeX/ptex-win32/w32/ http://www.tatsuromatsuoka.com/gnuplot/Eng/winbin/ http://www.yama-ga.com/gnuplot/ ̓{ꉻLbǵAPɃj[t@Cƃwvt@C{ ̂̂ɒu邾ł̂ŁA񂻂̔łłgpł ܂BĂ邱ƂƎ̂̋@\̂CɂȂ΁Agnuplot ̃o[WĂAقږȂpłƎv܂B IWiTCg gnuplot oCȉꍇ́Abin/ ȉɎsoC ipł̃wvt@C⃁j[t@C܂܂ĂƎv ܂B ł΁AIWĩwvt@C (wgnuplot.hlp, ܂ wgnuplot.chm) ƃj[t@C (wgnuplot.mnu) 𖼑Oςĕ ĂƂł傤B > cd bin > copy wgnuplot.mnu wgnuplot-en.mnu > copy wgnuplot.hlp wgnuplot-en.hlp ܂ > copy wgnuplot.chm wgnuplot-en.chm [2] {ꉻLbg̃Rs[ wgnuplot-ja.mnu wgnuplot-ja.hlp ܂ wgnuplot-ja.chm X wgnuplot.mnu, wgnuplot.hlp ܂ wgnuplot.chm ̑ɃRs [܂B ȂA‹ϐ𗘗pē{̃wvt@CƉp̃wvt@ CĐؑւ邱Ƃ”\łBɊւĂ̓wvt@ CQƂĂB wvt@ĆAwgnuplot wgnuplot.hlp wgnuplot.chm ̂ǂ 炩݂̂gp܂Aǂgp邩̓RpCɌ 肳Ă܂BA[1] ̒iKłǂ炩݂̂tĂ Ǝv܂Aꂪgpwvt@CłBSzȂΗ Rs[č\܂B [3] wgnuplot ̃tHg̐ݒ (1) ܂ wgnuplot N܂Bwgnuplot.ini ܂Ȃꍇ (ߋ wgnuplot ̐ݒsȂƂȂꍇ)Ał߂ȕ Ԃ̃EBhEオƎv܂B (2) ̗オEBhEŃ}EX̉ENbNsȂA uChoose FontvIAK؂ȓ{tHgݒ肵܂B (3) ݒ肪IAĂу}EX̉ENbNsȂAuUpdate wgnuplot.inivIAwgnuplot.ini XV܂BŁAʂ \Ǝv܂B [4] Window terminal ̃tHgݒ ̓Otʂ̃tHgݒsȂ܂BɂAOt ɓ{\ł悤ɂȂ܂B[3] wgnuplot ̋Nʂ \Ă gnuplot vvg gnuplot> Ɉȉ̂悤ɓ͂ăOt܂B gnuplot> plot sin(x) sin(x) ̃OtĂ郁j[ŁAĂ [3] Ɠ悤 }EXENbŃuChoose FontvŃtHgݒ肵āAuUpdate wgnuplot.inivsȂ̂łÂ܂ܕʂɃ}EXENbN ƃ}EX@\זăv_Ej[\܂B }EX@\ ON/OFF ɂɂ́AOtʂ m ܂Bꂩ ̂悤ɃtHg̐ݒsȂĂB ȂÃ}EX@\ ON/OFF ͈ȉ̂悤ɂĂł܂B gnuplot> unset mouse <-- OFF gnuplot> set mouse <-- ON ܂A}EX@\ ON ɂ܂܃v_Ej[\ ́A}EX@\̓Ot̕`ʈȊOAႦΕ`EBhE ̃o[EBhEACRNbNĂł悤łB [5] eXg ܂́AOtɓ{\eXgĂ݂܂傤B gnuplot> set title '{\ł܂' gnuplot> plot cos(x) ƂĂ݂ĂBȂAgnuplot vvg͎ɂ͐{ ꂪ\Ȃ܂񂪁A͌ɓ͉ʂtbV ƕ\܂BOtʂɂňꉞ{ꂪ\ v܂B A{ꂪ܂oȂꍇ́A{tHg̐ݒL̍ Ǝ菇A܂ gnuplot oCĩo[WmFĂ݂Ă B ܂A[2] ɂĊɋNʂ̃j[͓{ŕ\Ă Ǝv܂Aꉞ̃Tuj[̓{\mFĂ ĂB ŌɁAwv̓{\mFĂ݂ĂBuCg_N Vv̒g{ŕ\Ă OK ł傤Bwv́A Nʂ̏̃j[QƂ邱Ƃł܂A gnuplot> help introduction ̂悤ɂĎQƂ邱Ƃ”\łB 3. ------- ‚ӂqׂ܂BȂ‚ Gnuplot Q&A f http://ayapin.film.s.dendai.ac.jp/cgi-bin/trees.cgi 瓾ɏĂ̂łBڂ͂ B [1] MS-Windows gnuplot Ɋւ鎿ⓙ gAMS-Windows ͕ipĂ킯ł͂ȂA񎎂Ɏg Ă݂āA{ꉻeՂɂłƂƂł ̂ŁAMS-Windows ̖̂AMS-Windows gnuplot L̖ ւĂ͂܂ŏڂ͂܂BāAɊւ鎿 lIɑĂΉ͂ł˂܂Aĝ񓚂”\ Ƃ͎v܂̂ŁA gnuplot ̎̏pB ݂̂悤ȏƂāA E[OXg (Visualize ML) http://ayapin.film.s.dendai.ac.jp/~matuda/Gnuplot/visualize.html EGnuplot Q&A f (cd@ ) http://ayapin.film.s.dendai.ac.jp/cgi-bin/trees.cgi EUsenet j[XO[v (comp.graphics.apps.gnuplot; p) Ȃǂ܂B ܂AQandA WƂāAȉ̂悤Ȃ̂܂B Egnuplot t FAQ (̓{) http://takeno.iee.niit.ac.jp/~shige/unix/gnuplot/gnuplot.html#gp-FAQ-j EN\tgEFA FAQ http://takeno.iee.niit.ac.jp/~foo/gp-jman/data/gnuplotjp-1.3.txt EuGNUPLOT 邳񂿂܂vɂ QandA http://mibai.tec.u-ryukyu.ac.jp/~oshiro/Doc/gnuplot_primer/gnuplot_memo.html E͖쁗XAX ́unot so Frequently Asked Questionsv http://t16web.lanl.gov/Kawano/gnuplot/ Ecd@ gnuplot Tips W http://ayapin.film.s.dendai.ac.jp/~matuda/Gnuplot/Tips/tips.html E gnuplot http://www.tatsuromatsuoka.com/gnuplot/Jpn/gnuplot_memo.html Egnuplot }jǍT[rX http://takeno.iee.niit.ac.jp/~foo/gp-jman/gp-jman.html#search Egnuplot }jA̓{ꉻɊւ QandA http://takeno.iee.niit.ac.jp/~foo/gp-jman/gp-jman.html#QandA [2] Shift_JIS L̖ wgnuplot ̂{R[h (Shift_JIS) ɊSɑΉĂ킯 ł͂Ȃ̂ŁAShift_JIS ‹ł Shift_JIS L̖肪邱 ƂmFĂ܂BႦ΁A set title '͏\ł' ́ÂłA set title "͏\ł" ́AOtEBhEł͕܂B́Au\v 2 byte ڂ 5Ch (= '\') łAgnuplot "" ň͂܂ꂽ '\' ʂɈƂ痈錻ۂłB{ꕶOt\Ɏg ́A͂ވp "" ł͂Ȃ '' g悤ɂĂ B cf. Gnuplot Q&A f http://ayapin.film.s.dendai.ac.jp/cgi-bin/trees.cgi 63u{ꃉxvn܂Xbh [3] terminal ̓{ꉻ ̓{ꉻLbǵAPɋNʂ̃j[ƃwvt@C {ꉻ邾ŁA̓IWi gnuplot ̋@\ɔCĂ邾 Ȃ̂ŁAgnuplot terminal œ{g悤ɂ̂ł͂ ܂񂵁Agnuplot+ ̂悤ɂ̓_ǂ̂ł͂܂B ȂA݂‚ terminal ł̓IWi gnuplot œ{ g悤ɂȂĂāAwindows terminal ł{ꂪg ܂APostScript terminal łAgnuplot+ pb`𓖂ĂȂĂ {tHgw肷Γ{ꂪg܂B http://ayapin.film.s.dendai.ac.jp/~matuda/Gnuplot/Feature38i/kanji.html Unix ‹ł̗ႪĂ܂AMS-Windows ł set title '͏\ł' font "Ryumin-Light-83pv-RKSJ-H,32" set terminal postscript eps set output "kanji.eps" plot sin(x) w l ̂悤ȎwsȂ΂悤łBȂAset term post enh ̂ enhanced [hgꍇ́A Shift_JIS ‹ł͕ ܂̂ŁACVS gnuplot ł set encoding sjis ƂĂ݂ĂB [4] {̊܂܂ĂpX wgnuplot ́AOS ɂĂ͓{ꂪ܂܂ĂpX𐳏Ɉ ɗ邱Ƃ悤łBwgnuplot ̍ƃfBNgAуC Xg[͂Ƃ肠͓{̊܂܂ȂpXɂ̂ǂ łB cf. Gnuplot Q&A f http://ayapin.film.s.dendai.ac.jp/cgi-bin/trees.cgi 313uGnuplot Ă܂ہvn܂Xbh 4. ҂ƃCZX ------------------- ̓{ꉻLbg͖ۏ؂łBȀĆAΉł ͍̂s\ł̂ŁA̕񍐁AӌȂǂ͊}܂B ͉L[AhXւ肢v܂B܂AéA L WWW page Ɍfڂ\łB e-mail: shige@iee.niit.ac.jp WWW page: http://takeno.iee.niit.ac.jp/~foo/gp-jman/ zzCZX́AIWi gnuplot ̃CZXɏ]܂B QƂĂB ҂͈ȉ̒ʂłB [a] wgnuplot-ja.mnu: gnuplot 3.7.2 ܂: Rꐳl (gnuplot+) gnuplot 4.0 ȍ~: |Ύ [b] wgnuplot-ja.hlp, wgnuplot-ja.chm: gnuplot 3.2 p: c۔ gnuplot 3.5 p: J۔ gnuplot 3.7 p: 㒼A؋`ADAn糐LA wAΓcAVmAXؓOACєlA ĐMYA{A{mAROAR݊A|Ύ gnuplot 3.8 p: cA|Ύ gnuplot 4.0 ȍ~: |Ύ {ꃁj[t@ĆAX gnuplot+ ̍҂łRꐳl ̍ꂽ̂łBAς̂ɊւJ Ē܂BX gnuplot+ oCiɕt钘쌠Ɋւ 镶p܂B ----- (gnuplot plus patch Copyright.plus.txt) ----- Copyright (C) 1993 - 2001 Masahito Yamaga ̃pb`pbP[Wт̃hLg̎gp, , Ĕzz͖ړÎ ɂ炸RɍsȂč\܂. , K̕YtĂ. ̃pbP[W̕ύXRɍsȂč\܂, ύX̂zz ꍇ͎R(ma@yama-ga.com)܂œdq[łA. ̃pbP[W͊Sɖۏ؂ł. gpɂĂ͂̐ӔCł肢܂. ̃pbP[W̒쌠͎Rꐳl(Masahito Yamaga)ɂ܂, IWi gnuplot ̒쌠 Thomas Williams Colin Kelley ɂ܂. (IWi gnuplot ̃\[XpbP[WɓYt Copyright Q) ̃pb`ĂԂł gnuplot (ɃoCi) ̔zz͐TdɍsȂ . ڂƂ̓IWi gnuplot \[XpbP[WɓYtĂ Copyright . 2001/01/11 R l/Masahito Yamaga (ma@yama-ga.com) ----- ܂ (gnuplot plus patch Copyright.plus.txt) ----- gnuplot 3.2 gnuplot.doc ̓{̍҂̓c۔A gnuplot 3.5 p̓{̍҂̏J۔񂩂́A ̖̌JɉĒ܂B ȉ gnuplot 3.2, gnuplot 3.5 gnuplot.doc {ɕt p܂B ----- (gnuplot 3.2 p) ----- GNUPLOT 3.2 patchlevel 2 ̔zzA[JCuɂAdocs/gnuplot.doc ̓ {ł gnuplotj.doc łB̓IWiɏ̂Ƃ܂B R[h EUC ŏĂ܂BIWiɊ܂܂Ă doc2gih y doc2tex ł̐`mFĂ܂BA doc2tex ʂꍇ́AEUC ̂܂ܒʂāA.tex ɕϊ TeX ̏nɍR[hɕϊ ĉB܂Atitlepage.tex KvɉďCĉB тƂł͂܂񂪁Ał֗ɊĒ΍KłB c tamaru@keisu-s.t.u-tokyo.ac.jp ----- ܂ (gnuplot 3.2 p) ----- ----- (gnuplot 3.5 p) ----- 2 {ɂ‚ ?japanese ̓{́Cw̓c 񂪁Cfj.sources ɓeꂽ gnuplot 3.2 gnuplot.doc ̓{ From: tamaru@keisu-s.t.u-tokyo.ac.jp (Hiroharu Tamaru) Newsgroups: fj.sources Subject: gnuplot 3.2.2 Japanese document (1/2) Message-ID: <TAMARU.92Sep16174046@meipserv.keisu-s.t.u-tokyo.ac.jp> Date: 16 Sep 92 08:40:46 GMT Distribution: fj Cw̏J ۔ gnuplot 3.5 pɕύX̂łD 3.2 3.5 ̊ԂŌɕω̂Ȃ(3/4)́CƂ cۂ̖̂܂܎gĂ܂D ̓{̌Jɐ悾āC IvCɓ 󂳂 ẽ`FbNĂ܂D肪Ƃ܂D ȂC̖͂̕|󎩑̂ɊւoO‚́C masutani@me.es.osaka-u.ac.jp ܂łAD ----- ܂ (gnuplot 3.5 p) ----- 5. ӎ ------- gnuplot+ (http://www.yama-ga.com/gnuplot/) MS-Windows oCi pbP[WɊ܂܂ wgnuplot.jmn ̏CłɊւāA҂̎Rꐳ lɂ͌JɉĒ܂Bǂ肪Ƃ܂ B ܂ gnuplot 3.5 p̃}jA̓{͂肪g킹 ĂĐFXbɂȂĂ܂B̓{̌JɓA gnuplot 3.2 p}jA̓{̍҂̓c۔A3.5 p} jA̓{҂̏J۔ɂ͂̌JɉĒA ܂FXȏ𒸂܂B̏؂Ă\グ܂Bǂ 肪Ƃ܂B wgnuplot Ɋւ邢‚̏́Acd@ ̉^c ĂuGnuplot Q&A fŁvFXĂ܂B^c Ă鏼cd@ A܂A̎Q҂݂̂ȂA 肪Ƃ܂B (cf. Gnuplot Q&A f http://ayapin.film.s.dendai.ac.jp/cgi-bin/trees.cgi) Gnuplot Q&A fŏŁAwgnuplot ̃}EX@\ ON/OFF Ɋւ ⑽ wgnuplot ɊւA񂩂璸܂B ǂ肪Ƃ܂B (cf. gnuplot ̃y[W http://www.tatsuromatsuoka.com/gnuplot/Jpn/gnuplot_memo.html) 6. ڎ ------- 1. ͂߂ 2. CXg[ 3. 4. ҂ƃCZX 5. ӎ 6. ڎ +=================================================+ |Ύ 945-1195 VHȑw dqHw shige@iee.niit.ac.jp TEL(&FAX): 0257-22-8161 +=================================================+ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wgnuplot-ja.mnu���������������������������������������������������������������0000644�0004711�0000144�00000037703�11657457515�014537� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������; Menu file for Windows gnuplot ; Roger Hadgraft, 26-5-92 ; Russell Lang, 30 Nov 1992 ; Modified for 4.0, John Bollinger, 31 Dec 2002 ; translated by Masahito Yamaga (ma@yama-ga.com) (for 3.7.2) ; translated by Shigeharu TAKENO 03/25 2006 (for 4.1) ; $Id: wgnuplot-ja.mnu,v 1.3 2011/11/12 11:58:05 markisch Exp $ [Menu] t@C(&F) J(&O) ... load '[OPEN]load[EOS]*.plt[EOS]'{ENTER} ۑ(&S) ... save '[SAVE]save[EOS]*.plt[EOS]'{ENTER} f(&D) ... load '[OPEN]load[EOS]*.dem[EOS]'{ENTER} -- fBNg̈ړ(&C) ... cd '[DIRECTORY]New directory?[EOS]'{ENTER} ݂̃fBNg(&D) pwd{ENTER} -- o͐̐ݒ(&U) ... set output "[INPUT]Output filename?[EOS]"{ENTER} v^(&P) set output "PRN"{ENTER} EBhE\(&W) set output{ENTER}set terminal win{ENTER} ݂̏o͐ show output{ENTER} o̓foCX̐ݒ(&T) ... set terminal [INPUT]Terminal type?{ENTER} o̓foCX̕\ set terminal{ENTER}show terminal{ENTER} -- [Menu] sҏW OɎsR}h ^P {^P} ɎsR}h ^N {^N} -- ꕶ߂ ^B {^B} ꕶi ^F {^F} -- sֈړ ^A {^A} sֈړ ^E {^E} -- J[\̑Öꕶ폜 ^H {^H} J[\̈ꕶ폜 ^D {^D} J[\̑Ö폜 ^W {^W} J[\ȍ~ׂč폜 ^K {^K} sׂč폜 ^U {^U} -- sĕ\ ^L {^L} [EndMenu] DOS J shell{ENTER} DOS ̃R}hs ... ![INPUT]DOS command?{ENTER} -- I(&X) quit{ENTER} [EndMenu] [Menu] vbg(&P) vbg (plot) plot 3vbg (splot) splot ăvbg (replot) replot{ENTER} foCXNA (clear) clear{ENTER} -- ͈͎w [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]] [EOS] ̕ϐ͈͎̔w [[INPUT]Variable name?[EOS]=[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]] [EOS] -- f[^t@C ... '[OPEN]Open[EOS]*.dat[EOS]' [EOS] x,y ƂĎg using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS] [EOS] x,y,ydelta ƂĎg using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS]:[INPUT]Ydelta column?[EOS] [EOS] x,y,ylow,yhigh ƂĎg using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS]:[INPUT]Ylow column?[EOS]:[INPUT]Yhigh column?[EOS] [EOS] -- [Menu] X^C (P) (Lines) with lines |Cg (Points) with points ƃ|Cg (Lines and Points) with linespoints (Impulses) with impulses hbg (Dots) with dots Xebv (Steps) with steps ̍̃Xebv (Fsteps) with fsteps qXgOXebv (Histeps) with histeps [EndMenu] [Menu] X^C () G[o[ (Error Bars) with errorbars X G[o[ with xerrorbars Y G[o[ with yerrorbars XY G[o[ with xyerrorbars G[C (Error Lines) with errorlines X G[C with xerrorlines Y G[C with yerrorlines XY G[C with xyerrorlines ` (Boxes) with boxes ̈h‚Ԃ (Filled Curves) with filledcurves `ƃG[o[ (Box Error Bars) with boxerrorbars ` XY G[o[ with boxxyerrorbars Zf[^` (Finance Bars) with financebars ` (Candlesticks) with candlesticks [EndMenu] [EndMenu] [Menu] \(&E) ϐ print f ... {[INPUT]Real part?[EOS],[INPUT]Imaginary part?[EOS]} [Menu] PZq -a -[INPUT]Arg +a +[INPUT]Arg ␔ ~a ~[INPUT]Arg _ے !a ![INPUT]Arg K a! [INPUT]Arg[EOS]! [EndMenu] [Menu] 2 Zq wZq ** ** * * / / a + + - - -- WZq % % [EndMenu] [Menu] _Zq == == Ȃ != != -- 菬 < < ȉ <= <= 傫 > > ȏ >= >= -- rbgƂ AND & & rbgƂ̔rI OR ^ ^ rbgƂ OR | | -- _I AND && && _I OR || || -- 3 Zq a?b:c [INPUT]First arg[EOS]?[INPUT]Second arg[EOS]:[INPUT]Third arg[EOS] [EndMenu] [EndMenu] [Menu] ֐(&N) [Menu] ֐ rand([INPUT]Argument[EOS]) Βl (abs) abs([INPUT]Argument[EOS]) (sgn) sgn([INPUT]Argument[EOS]) -- 菬Ȃŏ̐ (ceil) ceil([INPUT]Argument[EOS]) 傫Ȃő̐ (floor) floor([INPUT]Argument[EOS]) (int) int([INPUT]Argument[EOS]) -- (sqrt) sqrt([INPUT]Argument[EOS]) w (exp) exp([INPUT]Argument[EOS]) Rΐ (log) log([INPUT]Argument[EOS]) pΐ (log10) log10([INPUT]Argument[EOS]) -- cos cos([INPUT]Argument[EOS]) sin sin([INPUT]Argument[EOS]) tan tan([INPUT]Argument[EOS]) -- arc cos acos([INPUT]Argument[EOS]) arc sin asin([INPUT]Argument[EOS]) arc tan atan([INPUT]Argument[EOS]) arc tan 2 atan2([INPUT]Argument[EOS]) -- cosh cosh([INPUT]Argument[EOS]) sinh sinh([INPUT]Argument[EOS]) tanh tanh([INPUT]Argument[EOS]) -- (imag) imag([INPUT]Argument[EOS]) (real) real([INPUT]Argument[EOS]) Ίp (arg) arg([INPUT]Argument[EOS]) [EndMenu] [Menu] ֐ 덷֐ (erf) erf([INPUT]Argument[EOS]) 덷֐ (erfc) erfc([INPUT]Argument[EOS]) t덷֐ (inverf) inverf([INPUT]Argument[EOS]) -- K}֐ (gamma) gamma([INPUT]Argument[EOS]) sSK}֐ (igamma) igamma([INPUT]First argument[EOS],[INPUT]Second argument[EOS]) ΐK}֐ (lgamma) lgamma([INPUT]Argument[EOS]) -- sSx[^֐ (ibeta) ibeta([INPUT]First argument[EOS],[INPUT]Second argument[EOS],[INPUT]Third argument[EOS]) -- j0xbZ֐ (besj0) besj0([INPUT]Argument[EOS]) j1xbZ֐ (besj1) besj1([INPUT]Argument[EOS]) y0xbZ֐ (besy0) besy0([INPUT]Argument[EOS]) y1xbZ֐ (besy1) besy1([INPUT]Argument[EOS]) -- xg W ֐ (lanbertw) lambertw([INPUT]Argument[EOS]) [EndMenu] [Menu] vw֐ Kz֐ (norm) norm([INPUT]Argument[EOS]) tKz֐ (invnrom) invnorm([INPUT]Argument[EOS]) [EndMenu] -- ֐` ... [INPUT]Name for function?[EOS][INPUT]Variable/s, eg. (a,b) ?[EOS]= `֐\ show functions{ENTER} -- ϐ` ... [INPUT]Name for variable?[EOS]=[INPUT]Value, eg. 9.81 ?{ENTER} `ϐ\ show variables{ENTER} -- x _~[ϐ set dummy [INPUT]Variable name?{ENTER} x,y _~[ϐ set dummy [INPUT]Variable names (eg. u,v)?{ENTER} _~[ϐ\ show dummy{ENTER} [EndMenu] [Menu] (&G) g‚ set border{ENTER} g‚Ȃ unset border{ENTER} g̏Ԃ\ show border{ENTER} -- `̕ݒ set boxwidth [INPUT]Box Width?{ENTER} `̕ݒ set boxwidth{ENTER} `̕\ show boxwidth{ENTER} -- ̕\ test{ENTER} -- [Menu] }ϐ }ϐ\ɂ set parametric{ENTER} }ϐ\Ȃ unset parametric{ENTER} }ϐ\̏Ԃ\ show parametric{ENTER} -- t ͈̔ set trange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} u ͈̔ set urange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} v ͈̔ set vrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} [EndMenu] -- [Menu] ؂蔲 Eɋ߂_ set clip points{ENTER} ̒[؂ set clip one{ENTER} [؂ set clip two{ENTER} ؂Ȃ unset clip{ENTER} ؂蔲̏Ԃ\ show clip{ENTER} [EndMenu] -- [Menu] ɍW ɍWnɕύX set polar{ENTER} WɕύX unset polar{ENTER} ɍWnǂ\ show polar{ENTER} a͈͎̔w set rrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} pxxŎw set angles degrees{ENTER} pxWAŎw set angles radians{ENTER} px̒Pʂ\ show angles{ENTER} [EndMenu] -- kڂݒ set size [INPUT]Xscale?[EOS],[INPUT]Yscale?{ENTER} kڂ\ show size{ENTER} -- ֐̃TvOw set sample [INPUT]Sampling rate (default=100)?{ENTER} ֐̃TvO\ show sample{ENTER} [EndMenu] [Menu] (&A) kڂg set autoscale [INPUT]Which axes (eg. xy)?{ENTER} kڂgȂ unset autoscale [INPUT]Which axes (eg. xy)?{ENTER} kڂ̏Ԃ\ show autoscale{ENTER} -- ΐg set logscale [INPUT]Which axes (eg. xy)?{ENTER} ΐgȂ unset logscale [INPUT]Which axes (eg. xy)?{ENTER} ΐ̏Ԃ\ show logscale{ENTER} -- [Menu] ڐ ڐȍw set format [INPUT]Axes?[EOS] "[INPUT]Format string?[EOS]"{ENTER} ڐȍ\ show format{ENTER} -- ڐ (ftHg) set tics in{ENTER} ڐO set tics out{ENTER} ڐ̐ݒ\ show tics{ENTER} -- z̍̎w set ticslevel [INPUT]Level (default=0.5)?{ENTER} -- ڐ̊Ԋu̎w set [INPUT]Axis: x, y or z ?[EOS]tics [INPUT]Start, Increment, End (eg. 0,0.5,10) ?{ENTER} -- ڐ̐ݒJn set [INPUT]Axis: x, y or z ?[EOS]tics ("[INPUT]Label text?[EOS]" [INPUT]Position?[EOS] ڐ̃xƈʒu̎w ,"[INPUT]Label text?[EOS]" [INPUT]Position?[EOS] ڐ̐ݒI ){ENTER} [EndMenu] -- X ͈̔ set xrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} Y ͈̔ set yrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} Z ͈̔ set zrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} -- X ̃x set xlabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER} Y ̃x set ylabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER} Z ̃x set zlabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER} ̃x\ show xlabel{ENTER}show ylabel{ENTER}show zlabel{ENTER} -- X ЂȂ unset xzeroaxis{ENTER} Y ЂȂ unset yzeroaxis{ENTER} X,Y Ђ set zeroaxis{ENTER} ̏Ԃ\ show zeroaxis{ENTER} [EndMenu] [Menu] `[g(&C) Obh\ set grid{ENTER} Obh\Ȃ unset grid{ENTER} Obh̏Ԃ\ show grid{ENTER} -- lj set arrow [INPUT]Tag (1-99)?[EOS] from [INPUT]From coordinate?[EOS] to [INPUT]To coordinate?{ENTER} 폜 unset arrow [INPUT]Tag (1-99)?{ENTER} ̏Ԃ\ show arrow{ENTER} -- xlj set label [INPUT]Tag?[EOS] "[INPUT]Label?[EOS]" at [INPUT]Coordinate?[EOS] [INPUT]Justification (l,c,r)?{ENTER} x폜 unset label [INPUT]Tag?{ENTER} x̏Ԃ\ show label{ENTER} -- ^Cgݒ set title "[INPUT]Title text?[EOS]" [INPUT]X position, Y position (eg. 2,4)?{ENTER} ^Cg\ show title{ENTER} -- }̈ʒuݒ set key [INPUT]Key position?{ENTER} }̈ʒuftHg set key{ENTER} }\Ȃ unset key{ENTER} }̈ʒu\ show key{ENTER} -- ItZbgݒ set offsets [INPUT]Offsets left,right,top,bottom ?{ENTER} ItZbg\ show offsets{ENTER} -- ̕\ʒuݒ set time [INPUT]Location (eg. 1,1)?{ENTER} \Ȃ unset time{ENTER} ̕\ʒu\ show time{ENTER} [EndMenu] [Menu] X^C(&S) [Menu] f[^̕\X^C (Lines) set style data lines{ENTER} |Cg (Points) set style data points{ENTER} ƃ|Cg (Lines + Points) set style data linespoints{ENTER} hbg (Dots) set style data dots{ENTER} (Impulses) set style data impulses{ENTER} -- G[o[ (Error Bars) set style data errorbars{ENTER} ` (Boxes) set style data boxes{ENTER} `ƃG[o[ (Box Error Bars) set style data boxerrorbars{ENTER} -- ` (Candlesticks) set style data candlesticks{ENTER} Zf[^` (Finance Bars) set style data financebars{ENTER} [EndMenu] f[^̃X^C\ show style data{ENTER} f[^̃X^C unset style data{ENTER} -- [Menu] ֐̕\X^C (Lines) set style function lines{ENTER} |Cg (Points) set style function points{ENTER} ƃ|Cg (Lines + Points) set style function linespoints{ENTER} hbg (Dots) set style function dots{ENTER} (Impulses) set style function impulses{ENTER} -- G[o[ (Error Bars) set style function errorbars{ENTER} ` (Boxes) set style function boxes{ENTER} `ƃG[o[ (Box Error Bars) set style function boxerrorbars{ENTER} -- ` (Candlesticks) set style function candlesticks{ENTER} Zf[^` (Finance Bars) set style function financebars{ENTER} [EndMenu] ֐̃X^C\ show style function{ENTER} ֐̃X^C unset style function{ENTER} -- [Menu] ̕\X^C (Head) set style arrow [INPUT]Arrow number?[EOS] head{ENTER} (Heads) set style arrow [INPUT]Arrow number?[EOS] heads{ENTER} Ȃ (No Heads) set style arrow [INPUT]Arrow number?[EOS] nohead{ENTER} [EndMenu] ̃X^C\ show style arrow [INPUT]Arrow number? {ENTER} ̃X^C unset style arrow [INPUT]Arrow number? {ENTER} -- [Menu] h‚ԂX^C h‚ԂȂ (Empty) set style fill empty{ENTER} x^h (Solid) set style fill solid [INPUT]Density?{ENTER} p^[h (Pattern) set style fill pattern [INPUT]Pattern number?{ENTER} E (Border) set style fill border [INPUT]Line Type?{ENTER} EȂ (No Border) set style fill noborder{ENTER} [EndMenu] h‚ԂX^C̕\ show style fill{ENTER} h‚ԂX^C̏ unset style fill{ENTER} -- [Menu] A_̕\X^C ̎ (Line Type) set style linetype [INPUT]Line Type?{ENTER} ̕ (Line Width) set style linewidth [INPUT]Line Width?{ENTER} _̎ (Point Type) set style pointtype [INPUT]Point Type?{ENTER} _̑傫 (Point Size) set style pointsize [INPUT]Point Size?{ENTER} ; F (Palette) ; set style line{ENTER} [EndMenu] A_̃X^C̕\ show style line{ENTER} A_̃X^C̏ unset style line{ENTER} [EndMenu] [Menu] &3 [Menu] ŕ` set cntrparam linear{ENTER} Ȑŕ` set cntrparam cubicspline{ENTER} B-spline Ԃŕ` set cntrparam bspline{ENTER} ̐ set cntrparam levels [INPUT]How many contours?{ENTER} Ԃ_̐ set cntrparam points [INPUT]How many points for the contours?{ENTER} B-spline Ԃ̎ set cntrparam order [INPUT]Order of B-splines (2-10)?{ENTER} -- ɓ\ set contour base{ENTER} \ʂɓ\ set contour surface{ENTER} ƕ\ʂ̗ɓ\ set contour both{ENTER} \Ȃ unset contour{ENTER} ̏Ԃ\ show contour{ENTER} -- ʕ`Ɏg̐w set isosamples [INPUT]Number of isosamples?{ENTER} ʕ`Ɏg̐\ show isosamples{ENTER} [EndMenu] -- Wn set mapping cartesian{ENTER} Wn set mapping spherical{ENTER} ~Wn set mapping cylindrical{ENTER} ʑ̐ݒ\ show mapping{ENTER} -- A set hidden3d{ENTER} AȂ unset hidden3d{ENTER} ȀԂ\ show hidden3d{ENTER} -- \ʂԂŕ\ set surface{ENTER} \ʂԂŕ\Ȃ unset surface{ENTER} \ʂ̕\Ԃ\ show surface{ENTER} -- pݒ set view [INPUT]X rotation (degrees)?[EOS],[INPUT]Z rotation?[EOS],[INPUT]Scale?[EOS],[INPUT]Z scale?{ENTER} p\ show view{ENTER} [EndMenu] [Menu] wv(&H) ڎ(&I) help{ENTER} Cg_NV help introduction{ENTER} gsbN(&T) help [INPUT]Help Topic?{ENTER} EBhEY(&W) help windows{ENTER} -- gnuplot Ɋւ(&A) [ABOUT] [EndMenu] ; {^‚ ; ^Cg̃Z~R̎̐̓ACR̃CfbNXB ; MSDN ̈ȉQ: "Toolbar Standard Button Image Index Values" ; http://msdn.microsoft.com/en-us/library/bb760433%28v=vs.85%29.aspx [Button] ĕ\;4 replot{ENTER} [Button] J;7 load '[OPEN]load[EOS]*.plt[EOS]'{ENTER} [Button] ۑ;8 save '[SAVE]save[EOS]*.plt[EOS]'{ENTER} [Button] ړ;31 cd '[DIRECTORY]New directory?[EOS]'{ENTER} [Button] ;14 set terminal [INPUT]Terminal type?{ENTER}set output "PRN"{ENTER}replot{ENTER}set terminal win{ENTER}set output{ENTER} [Button] _v;14 screendump{ENTER} [Button] O;15 {^P} [Button] ;16 {^N} [Button] IvV;10 [OPTIONS] �������������������������������������������������������������gnuplot-4.6.4/src/win/wgnuplot.hpj������������������������������������������������������������������0000644�0004711�0000144�00000000231�10423441435�014073� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[OPTIONS] COMPRESS=12 Hall Zeck LCID=0x409 0x0 0x0 ; Englisch (USA) TITLE=gnuplot HLP=wgnuplot.hlp [FILES] gnuplot.rtf [CONFIG] BrowseButtons() �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wgdiplus.cpp������������������������������������������������������������������0000644�0004711�0000144�00000013274�11661406714�014074� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: wgdiplus.cpp,v 1.5 2011/11/18 07:48:28 markisch Exp $ */ /* Copyright (c) 2011 Bastian Maerkisch. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY Bastian Maerkisch ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <windows.h> #include <gdiplus.h> #include "wgdiplus.h" using namespace Gdiplus; static bool gdiplusInitialized = false; static ULONG_PTR gdiplusToken; void gdiplusInit(void) { if (!gdiplusInitialized) { gdiplusInitialized = true; GdiplusStartupInput gdiplusStartupInput; GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); } }; void gdiplusCleanup(void) { if (gdiplusInitialized) { gdiplusInitialized = false; GdiplusShutdown(gdiplusToken); } }; static Color gdiplusCreateColor(COLORREF color, double alpha) { ARGB argb = Color::MakeARGB( BYTE(255 * alpha), GetRValue(color), GetGValue(color), GetBValue(color)); return Color(argb); } static Pen * gdiplusCreatePen(UINT style, float width, COLORREF color) { // create GDI+ pen Color gdipColor(0, 0, 0, 255); gdipColor.SetFromCOLORREF(color); Pen * pen = new Pen(gdipColor, width > 1 ? width : 1); if (style <= PS_DASHDOTDOT) // cast is save since GDI and GDI+ use same numbers pen->SetDashStyle(static_cast<DashStyle>(style)); pen->SetLineCap(LineCapFlat, LineCapFlat, DashCapFlat); return pen; } void gdiplusLine(HDC hdc, POINT x, POINT y, const PLOGPEN logpen) { gdiplusLineEx(hdc, x, y, logpen->lopnStyle, (float)logpen->lopnWidth.x, logpen->lopnColor); } void gdiplusLineEx(HDC hdc, POINT x, POINT y, UINT style, float width, COLORREF color) { gdiplusInit(); Graphics graphics(hdc); // Dash patterns get scaled with line width, in contrast to GDI. // Avoid smearing out caused by antialiasing for small line widths. if ((style == PS_SOLID) || (width >= 2.)) graphics.SetSmoothingMode(SmoothingModeAntiAlias); Pen * pen = gdiplusCreatePen(style, width, color); graphics.DrawLine(pen, (INT)x.x, (INT)x.y, (INT)y.x, (INT)y.y); delete(pen); } void gdiplusPolyline(HDC hdc, POINT *ppt, int polyi, const PLOGPEN logpen) { gdiplusPolylineEx(hdc, ppt, polyi, logpen->lopnStyle, (float)logpen->lopnWidth.x, logpen->lopnColor); } void gdiplusPolylineEx(HDC hdc, POINT *ppt, int polyi, UINT style, float width, COLORREF color) { gdiplusInit(); Graphics graphics(hdc); // Dash patterns get scaled with line width, in contrast to GDI. // Avoid smearing out caused by antialiasing for small line widths. if ((style == PS_SOLID) || (width >= 2.)) graphics.SetSmoothingMode(SmoothingModeAntiAlias); Pen * pen = gdiplusCreatePen(style, width, color); Point * points = new Point[polyi]; for (int i = 0; i < polyi; i++) { points[i].X = ppt[i].x; points[i].Y = ppt[i].y; } graphics.DrawLines(pen, points, polyi); delete(pen); delete(points); } void gdiplusSolidFilledPolygonEx(HDC hdc, POINT *ppt, int polyi, COLORREF color, double alpha) { gdiplusInit(); Graphics graphics(hdc); graphics.SetSmoothingMode(SmoothingModeAntiAlias); Color gdipColor = gdiplusCreateColor(color, alpha); Point * points = new Point[polyi]; for (int i = 0; i < polyi; i++) { points[i].X = ppt[i].x; points[i].Y = ppt[i].y; } SolidBrush brush(gdipColor); graphics.FillPolygon(&brush, points, polyi); delete points; } void gdiplusPatternFilledPolygonEx(HDC hdc, POINT *ppt, int polyi, COLORREF color, double alpha, COLORREF backcolor, BOOL transparent, int style) { gdiplusInit(); Graphics graphics(hdc); graphics.SetSmoothingMode(SmoothingModeAntiAlias); Color gdipColor = gdiplusCreateColor(color, alpha); Color gdipBackColor = gdiplusCreateColor(backcolor, transparent ? 0 : 1.); Brush * brush; style %= 8; const HatchStyle styles[] = { HatchStyleTotal, HatchStyleDiagonalCross, HatchStyleZigZag, HatchStyleTotal, HatchStyleForwardDiagonal, HatchStyleBackwardDiagonal, HatchStyleLightDownwardDiagonal, HatchStyleDarkUpwardDiagonal }; switch (style) { case 0: brush = new SolidBrush(gdipBackColor); break; case 3: brush = new SolidBrush(gdipColor); break; default: brush = new HatchBrush(styles[style], gdipColor, gdipBackColor); } Point * points = new Point[polyi]; for (int i = 0; i < polyi; i++) { points[i].X = ppt[i].x; points[i].Y = ppt[i].y; } graphics.FillPolygon(brush, points, polyi); delete(points); delete(brush); } void gdiplusCircleEx(HDC hdc, POINT * p, int radius, UINT style, float width, COLORREF color) { gdiplusInit(); Graphics graphics(hdc); graphics.SetSmoothingMode(SmoothingModeAntiAlias); Pen * pen = gdiplusCreatePen(style, width, color); graphics.DrawEllipse(pen, p->x - radius, p->y - radius, 2*radius, 2*radius); delete(pen); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/pgnuplot.c��������������������������������������������������������������������0000644�0004711�0000144�00000031662�11622253700�013537� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: pgnuplot.c,v 1.17 2011/08/15 17:30:40 markisch Exp $"); } #endif /* * pgnuplot.c -- pipe stdin to wgnuplot * * Version 0.4 -- October 2002 * * This program is based on pgnuplot.c Copyright (C) 1999 Hans-Bernhard Broeker * with substantial modifications Copyright (C) 1999 Craig R. Schardt. * * The code is released to the public domain. * */ /* Changes by Petr Mikulik, October 2002: * Added command line options --version and --help, and consequently dependency * on gnuplot's version.h and version.c. * Compile pgnuplot by: * gcc -O2 -s -o pgnuplot.exe pgnuplot.c ../version.c -I.. -luser32 */ /* Comments from original pgnuplot.c */ /* * pgnuplot.c -- 'Pipe to gnuplot' Version 990608 * * A small program, to be compiled as a Win32 console mode application. * (NB: will not work on 16bit Windows, not even with Win32s installed). * * This program will accept commands on STDIN, and pipe them to an * active (or newly created) wgnuplot text window. Command line options * are passed on to wgnuplot. * * Effectively, this means `pgnuplot' is an almost complete substitute * for `wgnuplot', on the command line, with the added benefit that it * does accept commands from redirected stdin. (Being a Windows GUI * application, `wgnuplot' itself cannot read stdin at all.) * * Copyright (C) 1999 by Hans-Bernhard Broeker * (broeker@physik.rwth-aachen.de) * This file is in the public domain. It might become part of a future * distribution of gnuplot. * * based on a program posted to comp.graphics.apps.gnuplot in May 1998 by * jl Hamel <jlhamel@cea.fr> * * Changes relative to that original version: * -- doesn't start a new wgnuplot if one already is running. * -- doesn't end up in an endless loop if STDIN is not redirected. * (refuses to read from STDIN at all, in that case). * -- doesn't stop the wgnuplot session at the end of * stdin, if it didn't start wgnuplot itself. * -- avoids the usual buffer overrun problem with gets(). * * For the record, I usually use MinGW32 to compile this, with a * command line looking like this: * * gcc -o pgnuplot.exe pgnuplot.c -luser32 -s * * Note that if you're using Cygwin GCC, you'll want to add the option * -mno-cygwin to that command line to avoid getting a pgnuplot.exe * that depends on their GPL'ed cygwin1.dll. */ /* Modifications by Craig R. Schardt (17 Jun 1999) Copyright (C) 1999 by Craig R. Schardt (craig@silica.mse.ufl.edu) Major changes: (See the explanation below for more information) + Always starts a new instance of wgnuplot. + If stdin isn't redirected then start wgnuplot and give it focus. + Uses CreateProcess() instead of WinExec() to start wgnuplot when stdin is redirected. Other changes: + New technique for building the command line to pass to wgnuplot.exe which is less complicated and seems to work more reliably than the old technique. + Simplified message passing section of the code. + All printf(...) statements are now fprintf(stderr,...) so that errors are sent to the console, even if stdout is redirected. The previous version of pgnuplot would fail when more than one program tried to access wgnuplot simultaneously or when one program tried to start more than one wgnuplot session. Only a single instance of wgnuplot would be started and all input would be sent to that instance. When two or more programs tried to pipe input to wgnuplot, the two seperate input streams would be sent to one wgnuplot window resulting in one very confused copy of wgnuplot. The only way to avoid this problem was to change pgnuplot so that it would start a new instance of wgnuplot every time. Just starting a new instance of wgnuplot isn't enough. pgnuplot must also make sure that the data on each stdin pipe is sent to the proper wgnuplot instance. This is achieved by using CreateProcess() which returns a handle to the newly created process. Once the process has initialized, it can be searched for the text window and then data can be routed correctly. The search is carried out by the EnumThreadWindows() call and the data passing is carried out by a rewritten version of the original code. With these changes, pgnuplot now behaves in a manner consistent with the behavior of gnuplot on UNIX computers. This program has been compiled using Microsoft Visual C++ 4.0 with the following command line: cl /O2 pgnuplot.c /link user32.lib The resulting program has been tested on WinNT and Win98 both by calling it directly from the command line with and without redirected input. The program also works on WinNT with a modified version of Gnuplot.py (a script for interactive control of Gnuplot from Python). 22 JUN 1999: + Fixed command line code to behave properly when the first item is quoted in the original command line. 29 JUN 1999: + Added some code to print the command line. This is for testing only and should be removed before the general release. To enable, compile with SHOWCMDLINE defined. 30 JUN 1999: + New function FindUnquotedSpace() which replaces the earlier technique for finding the command line arguments to send on to wgnuplot. Prior to this the arguments were assumed to start after argv[0], however argv[0] is not set the same by all combinitaions of compiler, command processor, and OS. The new method ignores argv completely and manually search the command line string for the first space which isn't enclosed in double-quotes. */ #include <io.h> #include <conio.h> #include <fcntl.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <windows.h> #include "version.h" #ifndef _O_BINARY # define _O_BINARY O_BINARY #endif #if (__BORLANDC__ >= 0x450) /* about BCBuilder 1.0 */ # define _setmode setmode #endif #ifdef __WATCOMC__ # define _setmode setmode #endif /* Customize this path if needed */ #define PROGNAME "wgnuplot.exe" /* CRS: The value given above will work correctly as long as pgnuplot.exe * is in the same directory as wgnuplot.exe or the directory containing * wgnuplot.exe is included in the path. I would recommend placing the * pgnuplot.exe executable in the same directory as wgnuplot.exe and * leaving this definition alone. */ #define WINDOWNAME "gnuplot" #define PARENTCLASS "wgnuplot_parent" #define TEXTCLASS "wgnuplot_text" #define GRAPHWINDOW "gnuplot graph" #define GRAPHCLASS "wgnuplot_graph" #define BUFFER_SIZE 80 /* GLOBAL Variables */ HWND hwndParent = NULL; HWND hwndText = NULL; PROCESS_INFORMATION piProcInfo; STARTUPINFO siStartInfo; /* CRS: Callback for the EnumThreadWindows function */ BOOL CALLBACK cbGetTextWindow(HWND hwnd, LPARAM lParam) { /* save the value of the parent window */ hwndParent = hwnd; /* check to see if it has a child text window */ hwndText = FindWindowEx(hwnd, NULL, TEXTCLASS, NULL); /* if the text window was found, stop looking */ return (hwndText == NULL); } /* sends a string to the specified window */ /* CRS: made this into a function call */ void PostString(HWND hwnd, char *pc) { while(*pc) { PostMessage(hwnd, WM_CHAR, (unsigned char) *pc, 1L); /* CRS: should add a check of return code on PostMessage. If 0, the message que was full and the message wasn't posted. */ pc++; } } /* FindUnquotedSpace(): Search a string for the first space not enclosed in quotes. * Returns a pointer to the space, or the empty string if no space is found. * -CRS 30061999 */ char* FindUnquotedSpace(char *pc) { while ((*pc) && (*pc != ' ') && (*pc != '\t')) { if (*pc == '"') { do { pc++; } while (pc[1] && (*pc != '"')); } pc++; } return pc; } BOOL ProcessAlive(HANDLE hProcess) { DWORD code = 0; if (GetExitCodeProcess(hProcess, &code)) return (code == STILL_ACTIVE); return FALSE; } int main (int argc, char *argv[]) { char psBuffer[BUFFER_SIZE]; char psGnuplotCommandLine[MAX_PATH] = PROGNAME; LPTSTR psCmdLine; BOOL bSuccess; BOOL bPersist = FALSE; int i; #if !defined(_O_BINARY) && defined(O_BINARY) # define _O_BINARY O_BINARY # define _setmode setmode /* this is for BC4.5 ... */ #endif _setmode(fileno(stdout), _O_BINARY); for (i = 1; i < argc; i++) { if (!argv[i]) continue; if (!strcmp(argv[i], "-V") || !strcmp(argv[i], "--version")) { printf("gnuplot %s patchlevel %s\n", gnuplot_version, gnuplot_patchlevel); return 0; } else if ((!stricmp(argv[i], "-noend")) || (!stricmp(argv[i], "/noend")) || (!stricmp(argv[i], "-persist"))) { bPersist = TRUE; } else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) { printf("Usage: gnuplot [OPTION] [FILE] [-]\n" " -V, --version show gnuplot version\n" " -h, --help show this help\n" " -e \"cmd; cmd; ...\" prepand additional commands\n" " -persist don't close the plot after executing FILE\n" " -noend, /noend like -persist (non-portable Windows-only options)\n" " - allow work in interactive mode after executing FILE\n" "Only on Windows, -persist and - have the same effect.\n" "This is gnuplot %s patchlevel %s\n" "Report bugs to <info-gnuplot-beta@lists.sourceforge.net>\n", gnuplot_version, gnuplot_patchlevel); return 0; } } /* for(argc) */ /* CRS: create the new command line, passing all of the command * line options to wgnuplot so that it can process them: * first, get the command line, * then move past the name of the program (e.g., 'pgnuplot'), * finally, add what's left of the line onto the gnuplot command line. */ psCmdLine = GetCommandLine(); #ifdef SHOWCMDLINE fprintf(stderr,"CmdLine: %s\n", psCmdLine); fprintf(stderr,"argv[0]: %s\n",argv[0]); #endif /* CRS 30061999: Search for the first unquoted space. This should separate the program name from the arguments. */ psCmdLine = FindUnquotedSpace(psCmdLine); strncat(psGnuplotCommandLine, psCmdLine, MAX_PATH - strlen(psGnuplotCommandLine)); #ifdef SHOWCMDLINE fprintf(stderr,"Arguments: %s\n", psCmdLine); fprintf(stderr,"GnuplotCommandLine: %s\n",psGnuplotCommandLine); #endif /* CRS: if stdin isn't redirected then just launch wgnuplot normally * and exit. */ if (isatty(fileno(stdin))) { if (WinExec(psGnuplotCommandLine, SW_SHOWDEFAULT) > 31) { exit(EXIT_SUCCESS); } fprintf(stderr,"ERROR %u: Couldn't execute: \"%s\"\n", GetLastError(), psGnuplotCommandLine); exit(EXIT_FAILURE); } /* CRS: initialize the STARTUPINFO and call CreateProcess(). */ siStartInfo.cb = sizeof(STARTUPINFO); siStartInfo.lpReserved = NULL; siStartInfo.lpReserved2 = NULL; siStartInfo.cbReserved2 = 0; siStartInfo.lpDesktop = NULL; siStartInfo.dwFlags = STARTF_USESHOWWINDOW; siStartInfo.wShowWindow = SW_SHOWMINIMIZED; bSuccess = CreateProcess( NULL, /* pointer to name of executable module */ psGnuplotCommandLine, /* pointer to command line string */ NULL, /* pointer to process security attributes */ NULL, /* pointer to thread security attributes */ FALSE, /* handle inheritance flag */ 0, /* creation flags */ NULL, /* pointer to new environment block */ NULL, /* pointer to current directory name */ &siStartInfo, /* pointer to STARTUPINFO */ &piProcInfo /* pointer to PROCESS_INFORMATION */ ); /* if CreateProcess() failed, print a warning and exit. */ if (! bSuccess) { fprintf(stderr,"ERROR %u: Couldn't execute: \"%s\"\n", GetLastError(), psGnuplotCommandLine); exit(EXIT_FAILURE); } /* CRS: give gnuplot enough time to start (1 sec.) */ if (WaitForInputIdle(piProcInfo.hProcess, 1000)) { fprintf(stderr, "Timeout: gnuplot is not ready\n"); exit(EXIT_FAILURE); } /* CRS: get the HWND of the parent window and text windows */ EnumThreadWindows(piProcInfo.dwThreadId, cbGetTextWindow, 0); if (! hwndParent || ! hwndText) { /* Still no gnuplot window? Problem! */ fprintf(stderr, "Can't find the gnuplot window"); /* CRS: free the process and thread handles */ CloseHandle(piProcInfo.hProcess); CloseHandle(piProcInfo.hThread); exit(EXIT_FAILURE); } /* wait for commands on stdin, and pass them on to the wgnuplot text * window */ while (fgets(psBuffer, BUFFER_SIZE, stdin) != NULL) { /* RWH: Check if wgnuplot is still alive */ if (!ProcessAlive(piProcInfo.hProcess)) break; PostString(hwndText, psBuffer); } /* exit gracefully, unless -persist is requested */ if (!bPersist && ProcessAlive(piProcInfo.hProcess)) { PostString(hwndText, "\nexit\n"); } /* CRS: free the process and thread handles */ CloseHandle(piProcInfo.hProcess); CloseHandle(piProcInfo.hThread); return EXIT_SUCCESS; } ������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wgraph.c����������������������������������������������������������������������0000644�0004711�0000144�00000367446�12160133407�013172� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: wgraph.c,v 1.144.2.8 2013/06/08 11:54:25 markisch Exp $ */ /* GNUPLOT - win/wgraph.c */ /*[ * Copyright 1992, 1993, 1998, 2004 Maurice Castro, Russell Lang * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Maurice Castro * Russell Lang */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #define STRICT #ifdef USE_MOUSE /* shige: for mouse wheel, BM: GetConsoleWindow */ #define _WIN32_WINNT 0x0500 #endif /* BM: for AlphaBlend/TransparentBlt */ #define WINVER 0x0501 /* BM: for Toolbars */ #define _WIN32_IE 0x0501 #include <windows.h> #include <windowsx.h> #include <commdlg.h> #include <commctrl.h> #ifndef __MSC__ # include <mem.h> #endif #include <stdio.h> #include <string.h> #include "winmain.h" #include "wresourc.h" #include "wcommon.h" #include "term_api.h" /* for enum JUSTIFY */ #ifdef USE_MOUSE # include "gpexecute.h" # include "mouse.h" # include "command.h" #endif #include "color.h" #include "getcolor.h" #ifdef HAVE_GDIPLUS #include "wgdiplus.h" #endif #include "fit.h" #ifdef USE_MOUSE /* Petr Mikulik, February 2001 * Declarations similar to src/os2/gclient.c -- see section * "PM: Now variables for mouse" there in. */ /* Status of the ruler */ static struct Ruler { TBOOLEAN on; /* ruler active ? */ int x, y; /* ruler position */ } ruler = {FALSE,0,0,}; /* Status of the line from ruler to cursor */ static struct RulerLineTo { TBOOLEAN on; /* ruler line active ? */ int x, y; /* ruler line end position (previous cursor position) */ } ruler_lineto = {FALSE,0,0,}; /* Status of zoom box */ static struct Zoombox { TBOOLEAN on; /* set to TRUE during zooming */ POINT from, to; /* corners of the zoom box */ LPCSTR text1, text2; /* texts in the corners (i.e. positions) */ } zoombox = { FALSE, {0,0}, {0,0}, NULL, NULL }; /* Pointer definitions */ HCURSOR hptrDefault, hptrCrossHair, hptrScaling, hptrRotating, hptrZooming, hptrCurrent; /* Mouse support routines */ static void Wnd_exec_event(LPGW lpgw, LPARAM lparam, char type, int par1); static void Wnd_refresh_zoombox(LPGW lpgw, LPARAM lParam); static void Wnd_refresh_ruler_lineto(LPGW lpgw, LPARAM lParam); static void GetMousePosViewport(LPGW lpgw, int *mx, int *my); static void Draw_XOR_Text(LPGW lpgw, const char *text, size_t length, int x, int y); static void UpdateStatusLine(LPGW lpgw, const char text[]); static void UpdateToolbar(LPGW lpgw); static void DrawRuler(LPGW lpgw); static void DrawRulerLineTo(LPGW lpgw); static void DrawZoomBox(LPGW lpgw); static void LoadCursors(LPGW lpgw); static void DestroyCursors(LPGW lpgw); #endif /* USE_MOUSE */ /* ================================== */ #define WGDEFCOLOR 15 COLORREF wginitcolor[WGDEFCOLOR] = { RGB(255,0,0), /* red */ RGB(0,255,0), /* green */ RGB(0,0,255), /* blue */ RGB(255,0,255), /* magenta */ RGB(0,0,128), /* dark blue */ RGB(128,0,0), /* dark red */ RGB(0,128,128), /* dark cyan */ RGB(0,0,0), /* black */ RGB(128,128,128), /* grey */ RGB(0,128,64), /* very dark cyan */ RGB(128,128,0), /* dark yellow */ RGB(128,0,128), /* dark magenta */ RGB(192,192,192), /* light grey */ RGB(0,255,255), /* cyan */ RGB(255,255,0), /* yellow */ }; #define WGDEFSTYLE 5 int wginitstyle[WGDEFSTYLE] = {PS_SOLID, PS_DASH, PS_DOT, PS_DASHDOT, PS_DASHDOTDOT}; /* Maximum number of GWOPBLK arrays to be remembered. */ /* HBB 20010218: moved here from wgnuplib.h: other parts of the program don't * need to know about it */ #define GWOPMAX 4096 #define MINMAX(a,val,b) (((val) <= (a)) ? (a) : ((val) <= (b) ? (val) : (b))) /* bitmaps for filled boxes (ULIG) */ /* zeros represent the foreground color and ones represent the background color */ static unsigned char pattern_bitmaps[][16] = { {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, /* no fill */ {0xFE, 0xFE, 0x7D, 0x7D, 0xBB, 0xBB, 0xD7, 0xD7, 0xEF, 0xEF, 0xD7, 0xD7, 0xBB, 0xBB, 0x7D, 0x7D}, /* cross-hatch (1) */ {0x77, 0x77, 0xAA, 0xAA, 0xDD, 0xDD, 0xAA, 0xAA, 0x77, 0x77, 0xAA, 0xAA, 0xDD, 0xDD, 0xAA, 0xAA}, /* double cross-hatch (2) */ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* solid fill (3) */ {0x7F, 0x7F, 0xBF, 0xBF, 0xDF, 0xDF, 0xEF, 0xEF, 0xF7, 0xF7, 0xFB, 0xFB, 0xFD, 0xFD, 0xFE, 0xFE}, /* diagonals (4) */ {0xFE, 0xFE, 0xFD, 0xFD, 0xFB, 0xFB, 0xF7, 0xF7, 0xEF, 0xEF, 0xDF, 0xDF, 0xBF, 0xBF, 0x7F, 0x7F}, /* diagonals (5) */ {0x77, 0x77, 0x77, 0x77, 0xBB, 0xBB, 0xBB, 0xBB, 0xDD, 0xDD, 0xDD, 0xDD, 0xEE, 0xEE, 0xEE, 0xEE}, /* steep diagonals (6) */ {0xEE, 0xEE, 0xEE, 0xEE, 0xDD, 0xDD, 0xDD, 0xDD, 0xBB, 0xBB, 0xBB, 0xBB, 0x77, 0x77, 0x77, 0x77} /* steep diagonals (7) */ #if (0) ,{0xFC, 0xFC, 0xF3, 0xF3, 0xCF, 0xCF, 0x3F, 0x3F, 0xFC, 0xFC, 0xF3, 0xF3, 0xCF, 0xCF, 0x3F, 0x3F}, /* shallow diagonals (old 5) */ {0x3F, 0x3F, 0xCF, 0xCF, 0xF3, 0xF3, 0xFC, 0xFC, 0x3F, 0x3F, 0xCF, 0xCF, 0xF3, 0xF3, 0xFC, 0xFC} /* shallow diagonals (old 6) */ #endif }; #define pattern_num (sizeof(pattern_bitmaps)/(sizeof(*pattern_bitmaps))) static HBRUSH pattern_brush[pattern_num]; static BITMAP pattern_bitdata[pattern_num]; static HBITMAP pattern_bitmap[pattern_num]; static TBOOLEAN brushes_initialized = FALSE; /* Internal state of enhanced text processing. Do not access outside draw_enhanced_text, GraphEnhancedOpen or GraphEnhancedFlush. */ static struct { LPGW lpgw; /* graph window */ HDC hdc; /* device context */ LPRECT rect; /* rect to update */ BOOL opened_string; /* started processing of substring? */ BOOL show; /* print this substring? */ int overprint; /* overprint flag */ BOOL widthflag; /* FALSE for zero width boxes */ BOOL sizeonly; /* only measure length of substring? */ double base; /* current baseline */ int xsave, ysave; /* save text position for overprinted text */ int x, y; /* current text position */ char fontname[MAXFONTNAME]; /* current font name */ double fontsize; /* current font size */ int totalwidth; /* total width of printed text */ double res_scale; /* scaling due to different resolution (printers) */ } enhstate; /* ================================== */ /* prototypes for module-local functions */ LRESULT CALLBACK WndGraphProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); BOOL CALLBACK LineStyleDlgProc(HWND hdlg, UINT wmsg, WPARAM wparam, LPARAM lparam); static void DestroyBlocks(LPGW lpgw); static BOOL AddBlock(LPGW lpgw); static void StorePen(LPGW lpgw, int i, COLORREF ref, int colorstyle, int monostyle); static void MakePens(LPGW lpgw, HDC hdc); static void DestroyPens(LPGW lpgw); static void Wnd_GetTextSize(HDC hdc, LPCSTR str, size_t len, int *cx, int *cy); static void GetPlotRect(LPGW lpgw, LPRECT rect); static void MakeFonts(LPGW lpgw, LPRECT lprect, HDC hdc); static void DestroyFonts(LPGW lpgw); static void SetFont(LPGW lpgw, HDC hdc); static void SelFont(LPGW lpgw); static LPWSTR UnicodeText(const char *str, enum set_encoding_id encoding); static void dot(HDC hdc, int xdash, int ydash); static unsigned int WDPROC GraphGetTextLength(LPGW lpgw, HDC hdc, LPCSTR text); static int draw_enhanced_text(LPGW lpgw, HDC hdc, LPRECT rect, int x, int y, char * str); static void draw_text_justify(HDC hdc, int justify); static void draw_put_text(LPGW lpgw, HDC hdc, int x, int y, char * str); static void drawgraph(LPGW lpgw, HDC hdc, LPRECT rect); static void CopyClip(LPGW lpgw); static void SaveAsEMF(LPGW lpgw); static void CopyPrint(LPGW lpgw); static void WriteGraphIni(LPGW lpgw); static char * GraphDefaultFont(void); static void ReadGraphIni(LPGW lpgw); static COLORREF GetColor(HWND hwnd, COLORREF ref); static void UpdateColorSample(HWND hdlg); static BOOL LineStyle(LPGW lpgw); static void GraphChangeFont(LPGW lpgw, LPCSTR font, int fontsize, HDC hdc, RECT rect); /* ================================== */ /* Helper functions for GraphOp(): */ /* destroy memory blocks holding graph operations */ static void DestroyBlocks(LPGW lpgw) { struct GWOPBLK *this, *next; struct GWOP *gwop; unsigned int i; this = lpgw->gwopblk_head; while (this != NULL) { next = this->next; if (!this->gwop) { this->gwop = (struct GWOP *)GlobalLock(this->hblk); } if (this->gwop) { /* free all text strings within this block */ gwop = this->gwop; for (i=0; i<GWOPMAX; i++) { if (gwop->htext) LocalFree(gwop->htext); gwop++; } } GlobalUnlock(this->hblk); GlobalFree(this->hblk); LocalFreePtr(this); this = next; } lpgw->gwopblk_head = NULL; lpgw->gwopblk_tail = NULL; lpgw->nGWOP = 0; } /* add a new memory block for graph operations */ /* returns TRUE if block allocated */ static BOOL AddBlock(LPGW lpgw) { HGLOBAL hblk; struct GWOPBLK *next, *this; /* create new block */ next = (struct GWOPBLK *)LocalAllocPtr(LHND, sizeof(struct GWOPBLK) ); if (next == NULL) return FALSE; hblk = GlobalAlloc(GHND, GWOPMAX*sizeof(struct GWOP)); if (hblk == NULL) return FALSE; next->hblk = hblk; next->gwop = (struct GWOP *)NULL; next->next = (struct GWOPBLK *)NULL; next->used = 0; /* attach it to list */ this = lpgw->gwopblk_tail; if (this == NULL) { lpgw->gwopblk_head = next; } else { this->next = next; this->gwop = (struct GWOP *)NULL; GlobalUnlock(this->hblk); } lpgw->gwopblk_tail = next; next->gwop = (struct GWOP *)GlobalLock(next->hblk); if (next->gwop == (struct GWOP *)NULL) return FALSE; return TRUE; } void WDPROC GraphOp(LPGW lpgw, UINT op, UINT x, UINT y, LPCSTR str) { if (str) GraphOpSize(lpgw, op, x, y, str, _fstrlen(str)+1); else GraphOpSize(lpgw, op, x, y, NULL, 0); } void WDPROC GraphOpSize(LPGW lpgw, UINT op, UINT x, UINT y, LPCSTR str, DWORD size) { struct GWOPBLK *this; struct GWOP *gwop; char *npstr; this = lpgw->gwopblk_tail; if ( (this==NULL) || (this->used >= GWOPMAX) ) { /* not enough space so get new block */ if (!AddBlock(lpgw)) return; this = lpgw->gwopblk_tail; } gwop = &this->gwop[this->used]; gwop->op = op; gwop->x = x; gwop->y = y; gwop->htext = 0; if (str) { gwop->htext = LocalAlloc(LHND, size); npstr = LocalLock(gwop->htext); if (gwop->htext && (npstr != (char *)NULL)) memcpy(npstr, str, size); LocalUnlock(gwop->htext); } this->used++; lpgw->nGWOP++; return; } /* ================================== */ /* Initialize the LPGW struct: * set default values and read options from ini file */ void WDPROC GraphInitStruct(LPGW lpgw) { if (!lpgw->initialized) { lpgw->initialized = TRUE; if (lpgw != listgraphs) { char titlestr[100]; /* copy important fields from window #0 */ LPGW graph0 = listgraphs; lpgw->IniFile = graph0->IniFile; lpgw->hInstance = graph0->hInstance; lpgw->hPrevInstance = graph0->hPrevInstance; lpgw->lptw = graph0->lptw; /* window title */ sprintf(titlestr, "%s %i", WINGRAPHTITLE, lpgw->Id); lpgw->Title = strdup(titlestr); } else { lpgw->Title = strdup(WINGRAPHTITLE); } lpgw->sampling = 1; lpgw->fontscale = 1.; lpgw->linewidth = 1.; lpgw->color = TRUE; lpgw->dashed = FALSE; lpgw->IniSection = "WGNUPLOT"; lpgw->fontsize = WINFONTSIZE; lpgw->maxkeyboxes = 0; lpgw->keyboxes = 0; lpgw->maxhideplots = MAXPLOTSHIDE; lpgw->hideplot = (BOOL *) calloc(MAXPLOTSHIDE, sizeof(BOOL)); ReadGraphIni(lpgw); } } /* Prepare Graph window for being displayed by windows, update * the window's menus and show it */ void WDPROC GraphInit(LPGW lpgw) { HMENU sysmenu; WNDCLASS wndclass; char buf[MAX_PATH]; if (!lpgw->hPrevInstance) { wndclass.style = CS_HREDRAW | CS_VREDRAW; wndclass.lpfnWndProc = WndGraphProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 2 * sizeof(void *); wndclass.hInstance = lpgw->hInstance; wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); wndclass.lpszMenuName = NULL; wndclass.lpszClassName = szGraphClass; RegisterClass(&wndclass); } lpgw->hWndGraph = CreateWindow(szGraphClass, lpgw->Title, WS_OVERLAPPEDWINDOW, lpgw->Origin.x, lpgw->Origin.y, lpgw->Size.x, lpgw->Size.y, NULL, NULL, lpgw->hInstance, lpgw); if (lpgw->hWndGraph) SetClassLong(lpgw->hWndGraph, GCL_HICON, (LONG) LoadIcon(lpgw->hInstance, "GRPICON")); lpgw->hStatusbar = CreateWindowEx(0, STATUSCLASSNAME, (LPSTR)NULL, WS_CHILD | SBARS_SIZEGRIP, 0, 0, 0, 0, lpgw->hWndGraph, (HMENU)ID_GRAPHSTATUS, lpgw->hInstance, lpgw); if (lpgw->hStatusbar) { RECT rect; /* auto-adjust size */ SendMessage(lpgw->hStatusbar, WM_SIZE, (WPARAM)0, (LPARAM)0); ShowWindow(lpgw->hStatusbar, TRUE); /* make room */ GetClientRect(lpgw->hStatusbar, &rect); lpgw->StatusHeight = rect.bottom - rect.top; } /* create a toolbar */ lpgw->hToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, WS_CHILD | TBSTYLE_LIST | TBSTYLE_TOOLTIPS, // TBSTYLE_WRAPABLE 0, 0, 0, 0, lpgw->hWndGraph, (HMENU)ID_TOOLBAR, lpgw->hInstance, lpgw); if (lpgw->hToolbar != NULL) { RECT rect; int i; TBBUTTON button; BOOL ret; char buttontext[10]; unsigned num = 0; SendMessage(lpgw->hToolbar, TB_SETBITMAPSIZE, (WPARAM)0, (LPARAM)((16<<16) + 16)); /* load standard toolbar icons: standard, history & view */ SendMessage(lpgw->hToolbar, TB_LOADIMAGES, (WPARAM)IDB_STD_SMALL_COLOR, (LPARAM)HINST_COMMCTRL); SendMessage(lpgw->hToolbar, TB_LOADIMAGES, (WPARAM)IDB_HIST_SMALL_COLOR, (LPARAM)HINST_COMMCTRL); SendMessage(lpgw->hToolbar, TB_LOADIMAGES, (WPARAM)IDB_VIEW_SMALL_COLOR, (LPARAM)HINST_COMMCTRL); /* create buttons */ SendMessage(lpgw->hToolbar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0); ZeroMemory(&button, sizeof(button)); button.fsState = TBSTATE_ENABLED; button.fsStyle = BTNS_AUTOSIZE | BTNS_SHOWTEXT | BTNS_NOPREFIX; button.iString = 0; /* copy */ button.iBitmap = STD_COPY; button.idCommand = M_COPY_CLIP; ret = SendMessage(lpgw->hToolbar, TB_INSERTBUTTON, (WPARAM)num++, (LPARAM)&button); /* print */ button.iBitmap = STD_PRINT; button.idCommand = M_PRINT; ret = SendMessage(lpgw->hToolbar, TB_INSERTBUTTON, (WPARAM)num++, (LPARAM)&button); /* save as EMF */ button.iBitmap = STD_FILESAVE; button.idCommand = M_SAVE_AS_EMF; ret = SendMessage(lpgw->hToolbar, TB_INSERTBUTTON, (WPARAM)num++, (LPARAM)&button); /* options */ button.iBitmap = STD_PROPERTIES; button.idCommand = 0; /* unused */ button.iString = (INT_PTR) "Options"; button.fsStyle = BTNS_AUTOSIZE | BTNS_SHOWTEXT | BTNS_NOPREFIX | BTNS_WHOLEDROPDOWN; ret = SendMessage(lpgw->hToolbar, TB_INSERTBUTTON, (WPARAM)num++, (LPARAM)&button); /* TODO: Add the following buttons: replot/refresh, toggle grid(?), previous/next zoom, autoscale, help */ button.fsStyle = BTNS_AUTOSIZE | BTNS_NOPREFIX | BTNS_SEP; ret = SendMessage(lpgw->hToolbar, TB_INSERTBUTTON, (WPARAM)num++, (LPARAM)&button); /* hide grid */ button.iBitmap = STD_CUT; button.idCommand = M_HIDEGRID; button.fsStyle = BTNS_AUTOSIZE | BTNS_SHOWTEXT | BTNS_NOPREFIX | BTNS_CHECK; button.iString = (INT_PTR) "Grid"; ret = SendMessage(lpgw->hToolbar, TB_INSERTBUTTON, (WPARAM)num++, (LPARAM)&button); /* hide graphs */ for (i = 0; i < MAXPLOTSHIDE; i++) { button.iBitmap = STD_CUT; button.idCommand = M_HIDEPLOT + i; sprintf(buttontext, "%i", i + 1); button.iString = (UINT_PTR) buttontext; button.dwData = i; ret = SendMessage(lpgw->hToolbar, TB_INSERTBUTTON, (WPARAM)num++, (LPARAM)&button); } /* auto-resize and show */ SendMessage(lpgw->hToolbar, TB_AUTOSIZE, (WPARAM)0, (LPARAM)0); ShowWindow(lpgw->hToolbar, TRUE); /* make room */ GetClientRect(lpgw->hToolbar, &rect); lpgw->ToolbarHeight = rect.bottom - rect.top + 1; } lpgw->hPopMenu = CreatePopupMenu(); /* actions */ AppendMenu(lpgw->hPopMenu, MF_STRING, M_COPY_CLIP, "&Copy to Clipboard (Ctrl+C)"); AppendMenu(lpgw->hPopMenu, MF_STRING, M_SAVE_AS_EMF, "&Save as EMF... (Ctrl+S)"); AppendMenu(lpgw->hPopMenu, MF_STRING, M_PRINT, "&Print..."); /* settings */ AppendMenu(lpgw->hPopMenu, MF_SEPARATOR, 0, NULL); AppendMenu(lpgw->hPopMenu, MF_STRING | (lpgw->graphtotop ? MF_CHECKED : MF_UNCHECKED), M_GRAPH_TO_TOP, "Bring to &Top"); AppendMenu(lpgw->hPopMenu, MF_STRING | (lpgw->color ? MF_CHECKED : MF_UNCHECKED), M_COLOR, "C&olor"); AppendMenu(lpgw->hPopMenu, MF_STRING | (lpgw->doublebuffer ? MF_CHECKED : MF_UNCHECKED), M_DOUBLEBUFFER, "&Double buffer"); AppendMenu(lpgw->hPopMenu, MF_STRING | (lpgw->oversample ? MF_CHECKED : MF_UNCHECKED), M_OVERSAMPLE, "O&versampling"); #ifdef HAVE_GDIPLUS AppendMenu(lpgw->hPopMenu, MF_STRING | (lpgw->antialiasing ? MF_CHECKED : MF_UNCHECKED), M_ANTIALIASING, "&Antialiasing"); AppendMenu(lpgw->hPopMenu, MF_STRING | (lpgw->polyaa ? MF_CHECKED : MF_UNCHECKED), M_POLYAA, "Antialiasing of Pol&ygons"); AppendMenu(lpgw->hPopMenu, MF_STRING | (lpgw->patternaa ? MF_CHECKED : MF_UNCHECKED), M_PATTERNAA, "Antialiasing of Patt&erns"); #endif AppendMenu(lpgw->hPopMenu, MF_STRING, M_BACKGROUND, "&Background..."); AppendMenu(lpgw->hPopMenu, MF_STRING, M_CHOOSE_FONT, "Choose &Font..."); AppendMenu(lpgw->hPopMenu, MF_STRING, M_LINESTYLE, "&Line Styles..."); /* save settings */ AppendMenu(lpgw->hPopMenu, MF_SEPARATOR, 0, NULL); if (lpgw->IniFile != (LPSTR)NULL) { wsprintf(buf,"&Update %s",lpgw->IniFile); AppendMenu(lpgw->hPopMenu, MF_STRING, M_WRITEINI, (LPSTR)buf); } /* modify the system menu to have the new items we want */ sysmenu = GetSystemMenu(lpgw->hWndGraph,0); AppendMenu(sysmenu, MF_SEPARATOR, 0, NULL); AppendMenu(sysmenu, MF_POPUP, (UINT)lpgw->hPopMenu, "&Options"); AppendMenu(sysmenu, MF_STRING, M_ABOUT, "&About"); #ifndef WGP_CONSOLE if (!IsWindowVisible(lpgw->lptw->hWndParent)) { AppendMenu(sysmenu, MF_SEPARATOR, 0, NULL); AppendMenu(sysmenu, MF_STRING, M_COMMANDLINE, "C&ommand Line"); } #endif ShowWindow(lpgw->hWndGraph, SW_SHOWNORMAL); } /* close a graph window */ void WDPROC GraphClose(LPGW lpgw) { /* Pass it through mouse handling to check for "bind Close" */ Wnd_exec_event(lpgw, (LPARAM)0, GE_reset, 0); /* close window */ if (lpgw->hWndGraph) DestroyWindow(lpgw->hWndGraph); WinMessageLoop(); lpgw->hWndGraph = NULL; lpgw->locked = TRUE; DestroyBlocks(lpgw); lpgw->locked = FALSE; } void WDPROC GraphStart(LPGW lpgw, double pointsize) { lpgw->locked = TRUE; DestroyBlocks(lpgw); lpgw->org_pointsize = pointsize; if ( !lpgw->hWndGraph || !IsWindow(lpgw->hWndGraph) ) GraphInit(lpgw); if (IsIconic(lpgw->hWndGraph)) ShowWindow(lpgw->hWndGraph, SW_SHOWNORMAL); if (lpgw->graphtotop) { /* HBB NEW 20040221: avoid grabbing the keyboard focus * unless mouse mode is on */ #ifdef USE_MOUSE if (mouse_setting.on) { BringWindowToTop(lpgw->hWndGraph); return; } #endif /* USE_MOUSE */ SetWindowPos(lpgw->hWndGraph, HWND_TOP, 0,0,0,0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); } } void WDPROC GraphEnd(LPGW lpgw) { RECT rect; GetClientRect(lpgw->hWndGraph, &rect); InvalidateRect(lpgw->hWndGraph, (LPRECT) &rect, 1); lpgw->locked = FALSE; UpdateWindow(lpgw->hWndGraph); #ifdef USE_MOUSE gp_exec_event(GE_plotdone, 0, 0, 0, 0, 0); /* notify main program */ #endif } /* shige */ void WDPROC GraphChangeTitle(LPGW lpgw) { if (GraphHasWindow(lpgw)) SetWindowText(lpgw->hWndGraph, lpgw->Title); } void WDPROC GraphResume(LPGW lpgw) { lpgw->locked = TRUE; } void WDPROC GraphPrint(LPGW lpgw) { if (GraphHasWindow(lpgw)) SendMessage(lpgw->hWndGraph, WM_COMMAND, M_PRINT, 0L); } void WDPROC GraphRedraw(LPGW lpgw) { if (GraphHasWindow(lpgw)) SendMessage(lpgw->hWndGraph, WM_COMMAND, M_REBUILDTOOLS, 0L); } TBOOLEAN GraphHasWindow(LPGW lpgw) { return (lpgw != NULL) && (lpgw->hWndGraph != NULL) && IsWindow(lpgw->hWndGraph); } /* ================================== */ /* Helper functions for bookkeeping of pens, brushes and fonts */ /* Set up LOGPEN structures based on information coming from wgnuplot.ini, via * ReadGraphIni() */ static void StorePen(LPGW lpgw, int i, COLORREF ref, int colorstyle, int monostyle) { LOGPEN *plp; plp = &lpgw->colorpen[i]; plp->lopnColor = ref; if (colorstyle < 0) { plp->lopnWidth.x = -colorstyle; plp->lopnStyle = 0; } else { plp->lopnWidth.x = 1; plp->lopnStyle = colorstyle % 5; } plp->lopnWidth.y = 0; plp = &lpgw->monopen[i]; plp->lopnColor = RGB(0,0,0); if (monostyle < 0) { plp->lopnWidth.x = -monostyle; plp->lopnStyle = 0; } else { plp->lopnWidth.x = 1; plp->lopnStyle = monostyle % 5; } plp->lopnWidth.y = 0; } /* Prepare pens and brushes (--> colors) for use by the driver. Pens are (now) created * on-the-fly (--> DeleteObject(SelectObject(...)) idiom), but the brushes are still * all created statically, and kept until the window is closed */ static void MakePens(LPGW lpgw, HDC hdc) { int i; LOGPEN pen; if ((GetDeviceCaps(hdc, NUMCOLORS) == 2) || !lpgw->color) { pen = lpgw->monopen[1]; pen.lopnWidth.x *= lpgw->linewidth * lpgw->sampling; lpgw->hapen = CreatePenIndirect(&pen); /* axis */ lpgw->hbrush = CreateSolidBrush(RGB(255,255,255)); for (i = 0; i < WGNUMPENS + 2; i++) lpgw->colorbrush[i] = CreateSolidBrush(RGB(0,0,0)); } else { pen = lpgw->colorpen[1]; pen.lopnWidth.x *= lpgw->linewidth * lpgw->sampling; lpgw->hapen = CreatePenIndirect(&pen); /* axis */ lpgw->hbrush = CreateSolidBrush(lpgw->background); for (i = 0; i < WGNUMPENS + 2; i++) lpgw->colorbrush[i] = CreateSolidBrush(lpgw->colorpen[i].lopnColor); } lpgw->hnull = CreatePen(PS_NULL, 0, 0); /* border for filled areas */ /* build pattern brushes for filled boxes (ULIG) */ if( ! brushes_initialized ) { int i; for(i=0; i < pattern_num; i++) { pattern_bitdata[i].bmType = 0; pattern_bitdata[i].bmWidth = 16; pattern_bitdata[i].bmHeight = 8; pattern_bitdata[i].bmWidthBytes = 2; pattern_bitdata[i].bmPlanes = 1; pattern_bitdata[i].bmBitsPixel = 1; pattern_bitdata[i].bmBits = pattern_bitmaps[i]; pattern_bitmap[i] = CreateBitmapIndirect(&pattern_bitdata[i]); pattern_brush[i] = CreatePatternBrush(pattern_bitmap[i]); } brushes_initialized = TRUE; } } /* Undo effect of MakePens(). To be called just before the window is closed. */ static void DestroyPens(LPGW lpgw) { int i; DeleteObject(lpgw->hbrush); DeleteObject(lpgw->hapen); DeleteObject(lpgw->hsolid); for (i=0; i<WGNUMPENS+2; i++) DeleteObject(lpgw->colorbrush[i]); DeleteObject(lpgw->hnull); /* delete brushes used for filled areas */ if (brushes_initialized) { int i; for (i = 0; i < pattern_num; i++) { DeleteObject(pattern_bitmap[i]); DeleteObject(pattern_brush[i]); } brushes_initialized = FALSE; } } /* ================================== */ /* HBB 20010218: new function. An isolated snippet from MakeFont(), now also * used in Wnd_put_tmptext() to size the temporary bitmap. */ static void Wnd_GetTextSize(HDC hdc, LPCSTR str, size_t len, int *cx, int *cy) { SIZE size; GetTextExtentPoint32(hdc, str, len, &size); *cx = size.cx; *cy = size.cy; } static void GetPlotRect(LPGW lpgw, LPRECT rect) { GetClientRect(lpgw->hWndGraph, rect); rect->bottom -= lpgw->StatusHeight; /* leave some room for the status line */ rect->top += lpgw->ToolbarHeight + 1; if (rect->bottom < rect->top) rect->bottom = rect->top; } static void GetPlotRectInMM(LPGW lpgw, LPRECT rect, HDC hdc) { int iWidthMM, iHeightMM, iWidthPels, iHeightPels; GetPlotRect (lpgw, rect); /* Taken from http://msdn.microsoft.com/en-us/library/dd183519(VS.85).aspx */ // Determine the picture frame dimensions. // iWidthMM is the display width in millimeters. // iHeightMM is the display height in millimeters. // iWidthPels is the display width in pixels. // iHeightPels is the display height in pixels iWidthMM = GetDeviceCaps(hdc, HORZSIZE); iHeightMM = GetDeviceCaps(hdc, VERTSIZE); iWidthPels = GetDeviceCaps(hdc, HORZRES); iHeightPels = GetDeviceCaps(hdc, VERTRES); // Convert client coordinates to .01-mm units. // Use iWidthMM, iWidthPels, iHeightMM, and // iHeightPels to determine the number of // .01-millimeter units per pixel in the x- // and y-directions. rect->left = (rect->left * iWidthMM * 100) / iWidthPels; rect->top = (rect->top * iHeightMM * 100) / iHeightPels; rect->right = (rect->right * iWidthMM * 100) / iWidthPels; rect->bottom = (rect->bottom * iHeightMM * 100) / iHeightPels; } static void MakeFonts(LPGW lpgw, LPRECT lprect, HDC hdc) { HFONT hfontold; TEXTMETRIC tm; int result; char *p; int cx, cy; lpgw->rotate = FALSE; _fmemset(&(lpgw->lf), 0, sizeof(LOGFONT)); _fstrncpy(lpgw->lf.lfFaceName,lpgw->fontname,LF_FACESIZE); lpgw->lf.lfHeight = -MulDiv(lpgw->fontsize * lpgw->fontscale, GetDeviceCaps(hdc, LOGPIXELSY), 72) * lpgw->sampling; lpgw->lf.lfCharSet = DEFAULT_CHARSET; if ( (p = _fstrstr(lpgw->fontname," Italic")) != (LPSTR)NULL ) { lpgw->lf.lfFaceName[ (unsigned int)(p-lpgw->fontname) ] = '\0'; lpgw->lf.lfItalic = TRUE; } if ( (p = _fstrstr(lpgw->fontname," Bold")) != (LPSTR)NULL ) { lpgw->lf.lfFaceName[ (unsigned int)(p-lpgw->fontname) ] = '\0'; lpgw->lf.lfWeight = FW_BOLD; } lpgw->lf.lfOutPrecision = OUT_OUTLINE_PRECIS; lpgw->lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; /* ClearType quality is only supported on XP or later */ lpgw->lf.lfQuality = IsWindowsXPorLater() && lpgw->antialiasing ? CLEARTYPE_QUALITY : PROOF_QUALITY; if (lpgw->hfonth == 0) { lpgw->hfonth = CreateFontIndirect((LOGFONT *)&(lpgw->lf)); } /* we do need a 90 degree font */ if (lpgw->hfontv) DeleteObject(lpgw->hfontv); lpgw->lf.lfEscapement = 900; lpgw->lf.lfOrientation = 900; lpgw->hfontv = CreateFontIndirect(&(lpgw->lf)); /* save text size */ hfontold = SelectObject(hdc, lpgw->hfonth); Wnd_GetTextSize(hdc, "0123456789", 10, &cx, &cy); lpgw->vchar = MulDiv(cy,lpgw->ymax,lprect->bottom - lprect->top); lpgw->hchar = MulDiv(cx/10,lpgw->xmax,lprect->right - lprect->left); /* CMW: Base tick size on character size */ lpgw->htic = MulDiv(lpgw->hchar, 2, 5); cy = MulDiv(cx/10, 2*GetDeviceCaps(hdc, LOGPIXELSY), 5*GetDeviceCaps(hdc, LOGPIXELSX)); lpgw->vtic = MulDiv(cy, lpgw->ymax, lprect->bottom - lprect->top); /* find out if we can rotate text 90deg */ SelectObject(hdc, lpgw->hfontv); result = GetDeviceCaps(hdc, TEXTCAPS); if ((result & TC_CR_90) || (result & TC_CR_ANY)) lpgw->rotate = TRUE; GetTextMetrics(hdc,(TEXTMETRIC *)&tm); if (tm.tmPitchAndFamily & TMPF_VECTOR) lpgw->rotate = TRUE; /* vector fonts can all be rotated */ if (tm.tmPitchAndFamily & TMPF_TRUETYPE) lpgw->rotate = TRUE; /* truetype fonts can all be rotated */ SelectObject(hdc, hfontold); return; } static void DestroyFonts(LPGW lpgw) { if (lpgw->hfonth) { DeleteObject(lpgw->hfonth); lpgw->hfonth = 0; } if (lpgw->hfontv) { DeleteObject(lpgw->hfontv); lpgw->hfontv = 0; } return; } static void SetFont(LPGW lpgw, HDC hdc) { SelectObject(hdc, lpgw->hfonth); if (lpgw->rotate && lpgw->angle) { if (lpgw->hfontv) DeleteObject(lpgw->hfontv); lpgw->lf.lfEscapement = lpgw->lf.lfOrientation = lpgw->angle * 10; lpgw->hfontv = CreateFontIndirect(&(lpgw->lf)); if (lpgw->hfontv) SelectObject(hdc, lpgw->hfontv); } return; } static void SelFont(LPGW lpgw) { LOGFONT lf; CHOOSEFONT cf; HDC hdc; char lpszStyle[LF_FACESIZE]; char *p; /* Set all structure fields to zero. */ _fmemset(&cf, 0, sizeof(CHOOSEFONT)); _fmemset(&lf, 0, sizeof(LOGFONT)); cf.lStructSize = sizeof(CHOOSEFONT); cf.hwndOwner = lpgw->hWndGraph; _fstrncpy(lf.lfFaceName,lpgw->fontname,LF_FACESIZE); if ((p = _fstrstr(lpgw->fontname," Bold")) != (LPSTR)NULL) { _fstrncpy(lpszStyle,p+1,LF_FACESIZE); lf.lfFaceName[ (unsigned int)(p-lpgw->fontname) ] = '\0'; } else if ((p = _fstrstr(lpgw->fontname," Italic")) != (LPSTR)NULL) { _fstrncpy(lpszStyle,p+1,LF_FACESIZE); lf.lfFaceName[ (unsigned int)(p-lpgw->fontname) ] = '\0'; } else { _fstrcpy(lpszStyle,"Regular"); } cf.lpszStyle = lpszStyle; hdc = GetDC(lpgw->hWndGraph); lf.lfHeight = -MulDiv(lpgw->fontsize, GetDeviceCaps(hdc, LOGPIXELSY), 72); ReleaseDC(lpgw->hWndGraph, hdc); cf.lpLogFont = &lf; cf.nFontType = SCREEN_FONTTYPE; cf.Flags = CF_SCREENFONTS | CF_INITTOLOGFONTSTRUCT | CF_USESTYLE; if (ChooseFont(&cf)) { _fstrcpy(lpgw->fontname,lf.lfFaceName); lpgw->fontsize = cf.iPointSize / 10; if (cf.nFontType & BOLD_FONTTYPE) lstrcat(lpgw->fontname," Bold"); if (cf.nFontType & ITALIC_FONTTYPE) lstrcat(lpgw->fontname," Italic"); /* set current font as default font */ strcpy(lpgw->deffontname, lpgw->fontname); lpgw->deffontsize = lpgw->fontsize; SendMessage(lpgw->hWndGraph,WM_COMMAND,M_REBUILDTOOLS,0L); } } static LPWSTR UnicodeText(const char *str, enum set_encoding_id encoding) { UINT codepage = 0; LPWSTR textw = NULL; /* For a list of code page identifiers see http://msdn.microsoft.com/en-us/library/dd317756%28v=vs.85%29.aspx */ switch (encoding) { case S_ENC_ISO8859_1: codepage = 28591; break; case S_ENC_ISO8859_2: codepage = 28592; break; case S_ENC_ISO8859_9: codepage = 28599; break; case S_ENC_ISO8859_15: codepage = 28605; break; case S_ENC_CP437: codepage = 437; break; case S_ENC_CP850: codepage = 850; break; case S_ENC_CP852: codepage = 852; break; case S_ENC_CP950: codepage = 950; break; case S_ENC_CP1250: codepage = 1250; break; case S_ENC_CP1251: codepage = 1251; break; case S_ENC_CP1254: codepage = 1254; break; case S_ENC_KOI8_R: codepage = 20866; break; case S_ENC_KOI8_U: codepage = 21866; break; case S_ENC_SJIS: codepage = 932; break; case S_ENC_UTF8: codepage = CP_UTF8; break; default: codepage = 0; } if (codepage != 0) { int length; /* get length of converted string */ length = MultiByteToWideChar(codepage, 0, str, -1, NULL, 0); textw = (LPWSTR) malloc(sizeof(WCHAR) * length); /* convert string to UTF-16 */ length = MultiByteToWideChar(codepage, 0, str, -1, textw, length); } return textw; } #ifdef USE_MOUSE /* ================================== */ static void LoadCursors(LPGW lpgw) { /* 3 of them are standard cursor shapes: */ hptrDefault = LoadCursor(NULL, IDC_ARROW); hptrZooming = LoadCursor(NULL, IDC_SIZEALL); hptrCrossHair = LoadCursor( NULL, IDC_CROSS); /* the other 2 are kept in the resource file: */ hptrScaling = LoadCursor( lpgw->hInstance, MAKEINTRESOURCE(IDC_SCALING)); hptrRotating = LoadCursor( lpgw->hInstance, MAKEINTRESOURCE(IDC_ROTATING)); hptrCurrent = hptrCrossHair; } static void DestroyCursors(LPGW lpgw) { /* No-op. Cursors from LoadCursor() don't need destroying */ return; } #endif /* USE_MOUSE */ /* ================================== */ static void dot(HDC hdc, int xdash, int ydash) { MoveTo(hdc, xdash, ydash); LineTo(hdc, xdash, ydash+1); } static unsigned int WDPROC GraphGetTextLength(LPGW lpgw, HDC hdc, LPCSTR text) { SIZE size; LPWSTR textw; textw = UnicodeText(text, lpgw->encoding); if (textw) { GetTextExtentPoint32W(hdc, textw, wcslen(textw), &size); free(textw); } else GetTextExtentPoint32(hdc, text, strlen(text), &size); size.cx += GetTextCharacterExtra(hdc); return size.cx; } void WDPROC GraphEnhancedOpen(char *fontname, double fontsize, double base, BOOL widthflag, BOOL showflag, int overprint) { const int win_scale = 1; /* scaling of base offset */ char *fontstring; /* There are two special cases: * overprint = 3 means save current position * overprint = 4 means restore saved position */ if (overprint == 3) { enhstate.xsave = enhstate.x; enhstate.ysave = enhstate.y; return; } else if (overprint == 4) { enhstate.x = enhstate.xsave; enhstate.y = enhstate.ysave; return; } if (!enhstate.opened_string) { /* Start new text fragment */ enhstate.opened_string = TRUE; enhanced_cur_text = enhanced_text; /* Keep track of whether we are supposed to show this string */ enhstate.show = showflag; /* 0/1/2 no overprint / 1st pass / 2nd pass */ enhstate.overprint = overprint; /* widthflag FALSE means do not update text position after printing */ enhstate.widthflag = widthflag; /* Select font */ if ((fontname != NULL) && (strlen(fontname) > 0)) fontstring = fontname; else fontstring = enhstate.lpgw->deffontname; strcpy(enhstate.fontname, fontstring); enhstate.fontsize = fontsize; GraphChangeFont(enhstate.lpgw, enhstate.fontname, enhstate.fontsize, enhstate.hdc, *(enhstate.rect)); SetFont(enhstate.lpgw, enhstate.hdc); /* Scale fractional font height to vertical units of display */ /* FIXME: Font scaling is not done properly (yet) and will lead to non-optimal results for most font and size selections. OUTLINEFONTMETRICS could be used for better results here. */ enhstate.base = win_scale * base * enhstate.lpgw->sampling * enhstate.lpgw->fontscale * enhstate.res_scale; } } void WDPROC GraphEnhancedFlush(void) { int width, height; unsigned int x, y, len; double angle = M_PI/180. * enhstate.lpgw->angle; if (!enhstate.opened_string) return; *enhanced_cur_text = '\0'; /* print the string fragment, perhaps invisibly */ /* NB: base expresses offset from current y pos */ x = enhstate.x - enhstate.base * sin(angle); y = enhstate.y - enhstate.base * cos(angle); /* calculate length of string first */ len = GraphGetTextLength(enhstate.lpgw, enhstate.hdc, enhanced_text); width = cos(angle) * len; height = -sin(angle) * len; if (enhstate.widthflag && !enhstate.sizeonly && !enhstate.overprint) enhstate.totalwidth += width; /* display string */ if (enhstate.show && !enhstate.sizeonly) draw_put_text(enhstate.lpgw, enhstate.hdc, x, y, enhanced_text); /* update drawing position according to len */ if (!enhstate.widthflag) { width = 0; height = 0; } if (enhstate.sizeonly) { /* This is the first pass for justified printing. */ /* We just adjust the starting position for second pass. */ if (enhstate.lpgw->justify == RIGHT) { enhstate.x -= width; enhstate.y -= height; } else if (enhstate.lpgw->justify == CENTRE) { enhstate.x -= width / 2; enhstate.y -= height / 2; } /* nothing to do for LEFT justified text */ } else if (enhstate.overprint == 1) { /* Save current position */ enhstate.xsave = enhstate.x + width; enhstate.ysave = enhstate.y + height; /* First pass of overprint, leave position in center of fragment */ enhstate.x += width / 2; enhstate.y += height / 2; } else if (enhstate.overprint == 2) { /* Restore current position, */ /* this sets the position behind the overprinted text */ enhstate.x = enhstate.xsave; enhstate.y = enhstate.ysave; } else { /* Normal case is to update position to end of fragment */ enhstate.x += width; enhstate.y += height; } enhstate.opened_string = FALSE; } static int draw_enhanced_text(LPGW lpgw, HDC hdc, LPRECT rect, int x, int y, char * str) { char * original_string = str; unsigned int pass, num_passes; struct termentry *tsave; char save_fontname[MAXFONTNAME]; int save_fontsize; /* Init enhanced text state */ enhstate.lpgw = lpgw; enhstate.hdc = hdc; enhstate.rect = rect; enhstate.opened_string = FALSE; strcpy(enhstate.fontname, lpgw->fontname); enhstate.fontsize = lpgw->fontsize; /* Store the start position */ enhstate.x = x; enhstate.y = y; enhstate.totalwidth = 0; /* Save font information */ strcpy(save_fontname, lpgw->fontname); save_fontsize = lpgw->fontsize; /* Set up global variables needed by enhanced_recursion() */ enhanced_fontscale = 1.0; strncpy(enhanced_escape_format, "%c", sizeof(enhanced_escape_format)); /* Text justification requires two passes. During the first pass we */ /* don't draw anything, we just measure the space it will take. */ /* Without justification one pass is enough */ if (enhstate.lpgw->justify == LEFT) { num_passes = 1; } else { num_passes = 2; enhstate.sizeonly = TRUE; } /* we actually print everything left to right */ SetTextAlign(hdc, TA_LEFT|TA_BASELINE); /* adjust baseline accordingly */ { TEXTMETRIC tm; if (GetTextMetrics(hdc, &tm)) { int shift = tm.tmHeight/2 - tm.tmDescent; enhstate.x += sin(lpgw->angle * M_PI/180) * shift; enhstate.y += cos(lpgw->angle * M_PI/180) * shift; } } /* enhanced_recursion() uses the callback functions of the current terminal. So we have to temporarily switch terminal. */ if (WIN_term) { tsave = term; term = WIN_term; } for (pass = 1; pass <= num_passes; pass++) { /* Set the recursion going. We say to keep going until a * closing brace, but we don't really expect to find one. * If the return value is not the nul-terminator of the * string, that can only mean that we did find an unmatched * closing brace in the string. We increment past it (else * we get stuck in an infinite loop) and try again. */ while (*(str = enhanced_recursion((char *)str, TRUE, save_fontname, save_fontsize, 0.0, TRUE, TRUE, 0))) { GraphEnhancedFlush(); if (!*++str) break; /* end of string */ /* else carry on and process the rest of the string */ } /* In order to do text justification we need to do a second pass that */ /* uses information stored during the first pass. */ /* see GraphEnhancedFlush() */ if (pass == 1) { /* do the actual printing in the next pass */ enhstate.sizeonly = FALSE; str = original_string; } } /* restore terminal */ if (WIN_term) term = tsave; /* restore previous font */ GraphChangeFont(lpgw, save_fontname, save_fontsize, hdc, *rect); SetFont(lpgw, hdc); /* restore text alignment */ draw_text_justify(hdc, enhstate.lpgw->justify); return enhstate.totalwidth; } static void draw_text_justify(HDC hdc, int justify) { switch (justify) { case LEFT: SetTextAlign(hdc, TA_LEFT|TA_BOTTOM); break; case RIGHT: SetTextAlign(hdc, TA_RIGHT|TA_BOTTOM); break; case CENTRE: SetTextAlign(hdc, TA_CENTER|TA_BOTTOM); break; } } static void draw_put_text(LPGW lpgw, HDC hdc, int x, int y, char * str) { SetBkMode(hdc, TRANSPARENT); /* support text encoding */ if ((lpgw->encoding == S_ENC_DEFAULT) || (lpgw->encoding == S_ENC_INVALID)) { TextOut(hdc, x, y, str, lstrlen(str)); } else { LPWSTR textw = UnicodeText(str, lpgw->encoding); if (textw) { TextOutW(hdc, x, y, textw, wcslen(textw)); free(textw); } else { /* print this only once */ if (lpgw->encoding != lpgw->encoding_error) { fprintf(stderr, "windows terminal: encoding %s not supported\n", encoding_names[lpgw->encoding]); lpgw->encoding_error = lpgw->encoding; } /* fall back to standard encoding */ TextOut(hdc, x, y, str, strlen(str)); } } SetBkMode(hdc, OPAQUE); } static void draw_new_pens(LPGW lpgw, HDC hdc, LOGPEN cur_penstruct) { HPEN old_hapen = lpgw->hapen; HPEN old_hsolid = lpgw->hsolid; if (cur_penstruct.lopnWidth.x <= 1) { /* shige: work-around for Windows clipboard bug */ lpgw->hapen = CreatePenIndirect((LOGPEN *) &cur_penstruct); lpgw->hsolid = CreatePen(PS_SOLID, 1, cur_penstruct.lopnColor); } else { LOGBRUSH lb; lb.lbStyle = BS_SOLID; lb.lbColor = cur_penstruct.lopnColor; lpgw->hapen = ExtCreatePen( PS_GEOMETRIC | cur_penstruct.lopnStyle | PS_ENDCAP_FLAT | PS_JOIN_BEVEL, cur_penstruct.lopnWidth.x, &lb, 0, 0); lpgw->hsolid = ExtCreatePen( PS_GEOMETRIC | PS_SOLID | PS_ENDCAP_FLAT | PS_JOIN_BEVEL, cur_penstruct.lopnWidth.x, &lb, 0, 0); } SelectObject(hdc, lpgw->hapen); DeleteObject(old_hapen); DeleteObject(old_hsolid); } static void draw_new_brush(LPGW lpgw, HDC hdc, COLORREF color) { HBRUSH new_brush = CreateSolidBrush(color); SelectObject(hdc, new_brush); if (lpgw->hcolorbrush) DeleteObject(lpgw->hcolorbrush); lpgw->hcolorbrush = new_brush; } static void draw_update_keybox(LPGW lpgw, unsigned plotno, unsigned x, unsigned y) { LPRECT bb; if (plotno == 0) return; if (plotno > lpgw->maxkeyboxes) { int i; lpgw->maxkeyboxes += 10; lpgw->keyboxes = (LPRECT) realloc(lpgw->keyboxes, lpgw->maxkeyboxes * sizeof(RECT)); for (i = plotno - 1; i < lpgw->maxkeyboxes; i++) { lpgw->keyboxes[i].left = INT_MAX; lpgw->keyboxes[i].right = 0; lpgw->keyboxes[i].bottom = INT_MAX; lpgw->keyboxes[i].top = 0; } } bb = lpgw->keyboxes + plotno - 1; if (x < bb->left) bb->left = x; if (x > bb->right) bb->right = x; if (y < bb->bottom) bb->bottom = y; if (y > bb->top) bb->top = y; } /* This one is really the heart of this module: it executes the stored set of * commands, whenever it changed or a redraw is necessary */ static void drawgraph(LPGW lpgw, HDC hdc, LPRECT rect) { /* draw ops */ unsigned int ngwop = 0; struct GWOP *curptr; struct GWOPBLK *blkptr; /* layers */ unsigned plotno = 0; BOOL gridline = FALSE; BOOL skipplot = FALSE; BOOL keysample = FALSE; /* colors */ BOOL isColor; /* use colors? */ COLORREF last_color = 0; /* currently selected color */ /* lines */ double line_width = lpgw->sampling * lpgw->linewidth; /* current line width */ double lw_scale = 1.; LOGPEN cur_penstruct; /* current pen settings */ /* polylines and polygons */ int polymax = 200; /* size of ppt */ int polyi = 0; /* number of points in ppt */ POINT *ppt; /* storage of polyline/polygon-points */ unsigned int lastop=-1; /* used for plotting last point on a line */ POINT cpoint; /* current GDI location */ /* filled polygons and boxes */ unsigned int fillstyle = 0; /* current fill style */ BOOL transparent = FALSE; /* transparent fill? */ double alpha = 0.; /* alpha for transarency */ int pattern = 0; /* patter number */ COLORREF fill_color = 0; /* color to use for fills */ HBRUSH solid_brush = 0; /* current solid fill brush */ int shadedblendcaps = SB_CONST_ALPHA; /* displays can always do AlphaBlend */ bool warn_no_transparent = FALSE; /* images */ int seq = 0; /* sequence counter for W_image ops */ POINT corners[4]; /* image corners */ int color_mode = 0; /* image color mode */ /* coordinates and lengths */ int xdash, ydash; /* the transformed coordinates */ int rr, rl, rt, rb; /* coordinates of drawing area */ int htic, vtic; /* tic sizes */ int hshift, vshift; /* correction of text position */ /* indices */ int i, k; if (lpgw->locked) return; /* The GDI status query functions don't work on metafile, printer or * plotter handles, so can't know whether the screen is actually showing * color or not, if drawgraph() is being called from CopyClip(). * Solve by defaulting isColor to TRUE in those cases. * Note that info on color capabilities of printers would be available * via DeviceCapabilities(). */ isColor = (((GetDeviceCaps(hdc, PLANES) * GetDeviceCaps(hdc, BITSPIXEL)) > 2) || (GetDeviceCaps(hdc, TECHNOLOGY) == DT_METAFILE) || (GetDeviceCaps(hdc, TECHNOLOGY) == DT_PLOTTER) || (GetDeviceCaps(hdc, TECHNOLOGY) == DT_RASPRINTER)); if (lpgw->color && isColor) { SetBkColor(hdc, lpgw->background); FillRect(hdc, rect, lpgw->hbrush); } else { FillRect(hdc, rect, (HBRUSH)GetStockObject(WHITE_BRUSH)); } /* Need to scale line widths for raster printers so they are the same as on screen */ if ((GetDeviceCaps(hdc, TECHNOLOGY) == DT_RASPRINTER)) { HDC hdc_screen = GetDC(NULL); lw_scale = (double) GetDeviceCaps(hdc, VERTRES) / (double) GetDeviceCaps(hdc_screen, VERTRES); line_width *= lw_scale; ReleaseDC(NULL, hdc_screen); /* Does the printer support AlphaBlend with transparency (const alpha)? */ shadedblendcaps = GetDeviceCaps(hdc, SHADEBLENDCAPS); warn_no_transparent = ((shadedblendcaps & SB_CONST_ALPHA) == 0); } /* Also needed for enhanced text */ enhstate.res_scale = lw_scale; ppt = (POINT *)LocalAllocPtr(LHND, (polymax+1) * sizeof(POINT)); rr = rect->right; rl = rect->left; rt = rect->top; rb = rect->bottom; htic = (lpgw->org_pointsize * MulDiv(lpgw->htic, rr - rl, lpgw->xmax) + 1); vtic = (lpgw->org_pointsize * MulDiv(lpgw->vtic, rb - rt, lpgw->ymax) + 1); lpgw->angle = 0; SetFont(lpgw, hdc); lpgw->justify = LEFT; SetTextAlign(hdc, TA_LEFT|TA_BOTTOM); /* calculate text shifting for horizontal text */ hshift = 0; vshift = MulDiv(lpgw->vchar, rb - rt, lpgw->ymax)/2; /* init layer variables */ lpgw->numplots = 0; lpgw->hasgrid = FALSE; for (i = 0; i < lpgw->maxkeyboxes; i++) { lpgw->keyboxes[i].left = INT_MAX; lpgw->keyboxes[i].right = 0; lpgw->keyboxes[i].bottom = INT_MAX; lpgw->keyboxes[i].top = 0; } SelectObject(hdc, lpgw->hapen); /* background brush */ SelectObject(hdc, lpgw->colorbrush[2]); /* first user pen */ /* do the drawing */ blkptr = lpgw->gwopblk_head; curptr = NULL; if (blkptr) { if (!blkptr->gwop) blkptr->gwop = (struct GWOP *)GlobalLock(blkptr->hblk); if (!blkptr->gwop) return; curptr = (struct GWOP *)blkptr->gwop; } while (ngwop < lpgw->nGWOP) { /* transform the coordinates */ xdash = MulDiv(curptr->x, rr-rl-1, lpgw->xmax) + rl; ydash = MulDiv(curptr->y, rt-rb+1, lpgw->ymax) + rb - 1; /* finish last polygon */ if ((lastop == W_vect) && (curptr->op != W_vect)) { if (polyi >= 2) { #ifdef HAVE_GDIPLUS if (lpgw->antialiasing) gdiplusPolyline(hdc, ppt, polyi, &cur_penstruct); else #endif Polyline(hdc, ppt, polyi); /* move internal GDI state to last point */ MoveTo(hdc, ppt[polyi-1].x, ppt[polyi-1].y); cpoint = ppt[polyi-1]; } else if (polyi == 1) { /* degenerate case e.g. when using 'linecolor variable' */ #ifdef HAVE_GDIPLUS if (lpgw->antialiasing) gdiplusLine(hdc, cpoint, ppt[0], &cur_penstruct); else #endif LineTo(hdc, ppt[0].x, ppt[0].y); cpoint = ppt[0]; } polyi = 0; } /* handle layer commands first */ if (curptr->op == W_layer) { t_termlayer layer = curptr->x; switch (layer) { case TERM_LAYER_BEFORE_PLOT: plotno++; lpgw->numplots = plotno; if (plotno >= lpgw->maxhideplots) { int idx; lpgw->maxhideplots += 10; lpgw->hideplot = (BOOL *) realloc(lpgw->hideplot, lpgw->maxhideplots * sizeof(BOOL)); for (idx = plotno; idx < lpgw->maxhideplots; idx++) lpgw->hideplot[idx] = FALSE; } if (plotno <= lpgw->maxhideplots) skipplot = lpgw->hideplot[plotno - 1]; break; case TERM_LAYER_AFTER_PLOT: skipplot = FALSE; break; #if 0 case TERM_LAYER_BACKTEXT: case TERM_LAYER_FRONTTEXT: break; #endif case TERM_LAYER_BEGIN_GRID: gridline = TRUE; lpgw->hasgrid = TRUE; break; case TERM_LAYER_END_GRID: gridline = FALSE; break; case TERM_LAYER_BEGIN_KEYSAMPLE: keysample = TRUE; break; case TERM_LAYER_END_KEYSAMPLE: keysample = FALSE; break; case TERM_LAYER_RESET: case TERM_LAYER_RESET_PLOTNO: //plotno = 0; break; default: break; }; } /* hide this layer? */ if (!(skipplot || (gridline && lpgw->hidegrid)) || (keysample || (curptr->op == W_line_type) || (curptr->op == W_setcolor)) ) { switch (curptr->op) { case 0: /* have run past last in this block */ break; case W_layer: /* already handled above */ break; case W_move: ppt[0].x = xdash; ppt[0].y = ydash; polyi = 1; if (keysample) draw_update_keybox(lpgw, plotno, xdash, ydash); break; case W_vect: ppt[polyi].x = xdash; ppt[polyi].y = ydash; polyi++; if (polyi >= polymax) { #ifdef HAVE_GDIPLUS if (lpgw->antialiasing) gdiplusPolyline(hdc, ppt, polyi, &cur_penstruct); else #endif Polyline(hdc, ppt, polyi); MoveTo(hdc, xdash, ydash); ppt[0].x = xdash; ppt[0].y = ydash; polyi = 1; cpoint = ppt[0]; } if (keysample) draw_update_keybox(lpgw, plotno, xdash, ydash); break; case W_line_type: { int cur_pen = (int)curptr->x % WGNUMPENS; /* create new pens */ if (cur_pen > LT_NODRAW) { cur_pen += 2; cur_penstruct = (lpgw->color && isColor) ? lpgw->colorpen[cur_pen] : lpgw->monopen[cur_pen]; cur_penstruct.lopnStyle = lpgw->dashed ? lpgw->monopen[cur_pen].lopnStyle : lpgw->colorpen[cur_pen].lopnStyle; } else if (cur_pen == LT_NODRAW) { cur_pen = WGNUMPENS; cur_penstruct.lopnStyle = PS_NULL; cur_penstruct.lopnColor = 0; cur_penstruct.lopnWidth.x = 1; } else { /* <= LT_BACKGROUND */ cur_pen = WGNUMPENS; cur_penstruct.lopnStyle = PS_SOLID; cur_penstruct.lopnColor = lpgw->background; cur_penstruct.lopnWidth.x = 1; } cur_penstruct.lopnWidth.x *= line_width; draw_new_pens(lpgw, hdc, cur_penstruct); /* select new brush */ if (cur_pen < WGNUMPENS) solid_brush = lpgw->colorbrush[cur_pen]; else solid_brush = lpgw->hbrush; SelectObject(hdc, solid_brush); /* set text color, also used for pattern fill */ SetTextColor(hdc, cur_penstruct.lopnColor); /* remember this color */ last_color = cur_penstruct.lopnColor; fill_color = last_color; break; } case W_text_encoding: lpgw->encoding = curptr->x; break; case W_put_text: { char * str; str = LocalLock(curptr->htext); if (str) { /* shift correctly for rotated text */ draw_put_text(lpgw, hdc, xdash + hshift, ydash + vshift, str); if (keysample) { int slen = GraphGetTextLength(lpgw, hdc, str); int vsize = MulDiv(lpgw->vchar, rb-rt, 2 * lpgw->ymax); if (lpgw->justify == RIGHT) slen *= -1; draw_update_keybox(lpgw, plotno, xdash, ydash - vsize); draw_update_keybox(lpgw, plotno, xdash + slen, ydash + vsize); } } LocalUnlock(curptr->htext); break; } case W_enhanced_text: { char * str; str = LocalLock(curptr->htext); if (str) { int slen = draw_enhanced_text(lpgw, hdc, rect, xdash, ydash, str); if (keysample) { int vsize = MulDiv(lpgw->vchar, rb-rt, 2 * lpgw->ymax); if (lpgw->justify == RIGHT) slen *= -1; draw_update_keybox(lpgw, plotno, xdash, ydash - vsize); draw_update_keybox(lpgw, plotno, xdash + slen, ydash + vsize); } } LocalUnlock(curptr->htext); break; } case W_fillstyle: /* HBB 20010916: new entry, needed to squeeze the many * parameters of a filled box call through the bottleneck * of the fixed number of parameters in GraphOp() and * struct GWOP, respectively. */ fillstyle = curptr->x; transparent = FALSE; alpha = 0.; switch (fillstyle & 0x0f) { case FS_TRANSPARENT_SOLID: alpha = (fillstyle >> 4) / 100.; if ((shadedblendcaps & SB_CONST_ALPHA) != 0) { transparent = TRUE; /* we already have a brush with that color */ } else { /* Printer does not support AlphaBlend() */ COLORREF color = RGB(255 - alpha * (255 - GetRValue(last_color)), 255 - alpha * (255 - GetGValue(last_color)), 255 - alpha * (255 - GetBValue(last_color))); solid_brush = lpgw->hcolorbrush; fill_color = color; draw_new_brush(lpgw, hdc, fill_color); fillstyle = (fillstyle & 0xfffffff0) | FS_SOLID; if (warn_no_transparent) { fprintf(stderr, "Warning: Transparency not supported on this device.\n"); warn_no_transparent = FALSE; /* Warn only once */ } } break; case FS_SOLID: { double density = MINMAX(0, (int)(fillstyle >> 4), 100) * 0.01; COLORREF color = RGB(255 - density * (255 - GetRValue(last_color)), 255 - density * (255 - GetGValue(last_color)), 255 - density * (255 - GetBValue(last_color))); draw_new_brush(lpgw, hdc, color); solid_brush = lpgw->hcolorbrush; fill_color = color; break; } case FS_TRANSPARENT_PATTERN: if ((shadedblendcaps & SB_CONST_ALPHA) != 0) { transparent = TRUE; alpha = 1.; } else { /* Printer does not support AlphaBlend() */ fillstyle = (fillstyle & 0xfffffff0) | FS_PATTERN; if (warn_no_transparent) { fprintf(stderr, "Warning: Transparency not supported on this device.\n"); warn_no_transparent = FALSE; /* Warn only once */ } } /* intentionally fall through */ case FS_PATTERN: /* style == 2 --> use fill pattern according to * fillpattern. Pattern number is enumerated */ pattern = GPMAX(fillstyle >> 4, 0) % pattern_num; SelectObject(hdc, pattern_brush[pattern]); break; case FS_DEFAULT: /* Leave the current brush and color in place */ break; case FS_EMPTY: default: /* fill with background color */ SelectObject(hdc, lpgw->hbrush); fill_color = lpgw->background; solid_brush = lpgw->hbrush; break; } break; case W_boxfill: { /* ULIG */ /* NOTE: the x and y passed with this call are the coordinates of the * lower right corner of the box. The upper left corner was stored into * ppt[0] by a preceding W_move, and the style was set * by a W_fillstyle call. */ POINT p; UINT height, width; width = xdash - ppt[0].x; height = ppt[0].y - ydash; p.x = ppt[0].x; p.y = ydash; #ifdef HAVE_GDIPLUS if (lpgw->antialiasing && lpgw->patternaa && (((fillstyle & 0x0f) == FS_PATTERN) || ((fillstyle & 0x0f) == FS_TRANSPARENT_PATTERN))) { ppt[1].x = ppt[0].x; ppt[1].y = ydash; ppt[2].x = xdash; ppt[2].y = ydash; ppt[3].x = xdash; ppt[3].y = ppt[0].y; ppt[4].x = ppt[0].x; ppt[4].y = ppt[0].y; gdiplusPatternFilledPolygonEx(hdc, ppt, 5, fill_color, 1., lpgw->background, transparent, pattern); } else #endif if (transparent) { HDC memdc; HBITMAP membmp, oldbmp; BLENDFUNCTION ftn; HBRUSH old_brush; /* create memory device context for bitmap */ memdc = CreateCompatibleDC(hdc); /* create standard bitmap, no alpha channel needed */ membmp = CreateCompatibleBitmap(hdc, xdash, abs(ydash)); oldbmp = (HBITMAP)SelectObject(memdc, membmp); /* prepare memory context */ SetTextColor(memdc, fill_color); if ((fillstyle & 0x0f) == FS_TRANSPARENT_PATTERN) old_brush = SelectObject(memdc, pattern_brush[pattern]); else old_brush = SelectObject(memdc, solid_brush); /* draw into memory bitmap */ PatBlt(memdc, 0, 0, width, height, PATCOPY); /* copy bitmap back */ if ((fillstyle & 0x0f) == FS_TRANSPARENT_PATTERN) { TransparentBlt(hdc, p.x, p.y, width, height, memdc, 0, 0, width, height, 0x00ffffff); } else { ftn.AlphaFormat = 0; /* no alpha channel in bitmap */ ftn.SourceConstantAlpha = (UCHAR)(alpha * 0xff); /* global alpha */ ftn.BlendOp = AC_SRC_OVER; ftn.BlendFlags = 0; AlphaBlend(hdc, p.x, p.y, width, height, memdc, 0, 0, width, height, ftn); } /* clean up */ SelectObject(memdc, old_brush); SelectObject(memdc, oldbmp); DeleteObject(membmp); DeleteDC(memdc); } else { /* not transparent */ /* FIXME: this actually is transparent, but probably shouldn't be */ PatBlt(hdc, p.x, p.y, width, height, PATCOPY); /* SelectObject(hdc, lpgw->hnull); Rectangle(hdc, p.x, p.y, p.x + width + 1, p.y + height + 1); SelectObject(hdc, lpgw->hapen); */ } polyi = 0; if (keysample) draw_update_keybox(lpgw, plotno, xdash + 1, ydash); break; } case W_text_angle: if (lpgw->angle != (int)curptr->x) { lpgw->angle = (int)curptr->x; SetFont(lpgw, hdc); /* recalculate shifting of rotated text */ hshift = sin(M_PI/180. * lpgw->angle) * MulDiv(lpgw->vchar, rr-rl, lpgw->xmax) / 2; vshift = cos(M_PI/180. * lpgw->angle) * MulDiv(lpgw->vchar, rb-rt, lpgw->ymax) / 2; } break; case W_justify: draw_text_justify(hdc, curptr->x); lpgw->justify = curptr->x; break; case W_font: { int size = curptr->x; char * font = LocalLock(curptr->htext); /* GraphChangeFont already handles font==NULL and size==0, so the checks below are a bit paranoid... */ GraphChangeFont(lpgw, font != NULL ? font : lpgw->deffontname, size > 0 ? size : lpgw->deffontsize, hdc, *rect); LocalUnlock(curptr->htext); SetFont(lpgw, hdc); /* recalculate shifting of rotated text */ hshift = sin(M_PI/180. * lpgw->angle) * MulDiv(lpgw->vchar, rr-rl, lpgw->xmax) / 2; vshift = cos(M_PI/180. * lpgw->angle) * MulDiv(lpgw->vchar, rb-rt, lpgw->ymax) / 2; break; } case W_pointsize: if (curptr->x != 0) { double pointsize = curptr->x / 100.0; htic = pointsize * MulDiv(lpgw->htic, rr-rl, lpgw->xmax) + 1; vtic = pointsize * MulDiv(lpgw->vtic, rb-rt, lpgw->ymax) + 1; } break; case W_line_width: /* HBB 20000813: this may look strange, but it ensures * that linewidth is exactly 1 iff it's in default * state */ line_width = curptr->x == 100 ? 1 : (curptr->x / 100.0); line_width *= lpgw->sampling * lpgw->linewidth * lw_scale; break; case W_setcolor: { COLORREF color; /* distinguish gray values and RGB colors */ if (curptr->y == 0) { /* TC_FRAC */ rgb255_color rgb255; rgb255maxcolors_from_gray(curptr->x / (double)WIN_PAL_COLORS, &rgb255); color = RGB(rgb255.r, rgb255.g, rgb255.b); } else if (curptr->y == (TC_LT << 8)) { /* TC_LT */ int pen = (int)curptr->x % WGNUMPENS; if (pen <= LT_NODRAW) color = lpgw->background; else color = lpgw->colorpen[pen + 2].lopnColor; } else { /* TC_RGB */ color = RGB(curptr->y & 0xff, (curptr->x >> 8) & 0xff, curptr->x & 0xff); } /* solid fill brush */ draw_new_brush(lpgw, hdc, color); solid_brush = lpgw->hcolorbrush; /* create new pen, too */ cur_penstruct.lopnColor = color; draw_new_pens(lpgw, hdc, cur_penstruct); /* set text color, which is also used for pattern fill */ SetTextColor(hdc, color); /* remember this color */ last_color = color; fill_color = color; break; } case W_filled_polygon_pt: { /* a point of the polygon is coming */ if (polyi >= polymax) { polymax += 200; ppt = (POINT *)LocalReAllocPtr(ppt, LHND, (polymax+1) * sizeof(POINT)); } ppt[polyi].x = xdash; ppt[polyi].y = ydash; polyi++; break; } case W_filled_polygon_draw: { /* end of point series --> draw polygon now */ if (!transparent) { #ifdef HAVE_GDIPLUS if (lpgw->antialiasing && lpgw->polyaa && ((fillstyle & 0x0f) == FS_SOLID)) { /* solid, antialiased fill */ gdiplusSolidFilledPolygonEx(hdc, ppt, polyi, fill_color, 1.0); } else if (lpgw->antialiasing && lpgw->patternaa && ((fillstyle & 0x0f) == FS_PATTERN)) { gdiplusPatternFilledPolygonEx(hdc, ppt, polyi, fill_color, 1., lpgw->background, transparent, pattern); } else #endif { /* fill area without border */ SelectObject(hdc, lpgw->hnull); Polygon(hdc, ppt, polyi); SelectObject(hdc, lpgw->hapen); /* restore previous pen */ } } else { #ifdef HAVE_GDIPLUS if (lpgw->antialiasing && lpgw->polyaa && (fillstyle & 0x0f) == FS_TRANSPARENT_SOLID) { gdiplusSolidFilledPolygonEx(hdc, ppt, polyi, fill_color, alpha); } else if (lpgw->antialiasing && lpgw->patternaa && ((fillstyle & 0x0f) == FS_TRANSPARENT_PATTERN)) { gdiplusPatternFilledPolygonEx(hdc, ppt, polyi, fill_color, 1., lpgw->background, transparent, pattern); } else #endif { /* BM: To support transparent fill on Windows we draw the polygon into a memory bitmap using a memory device context. We then associate an alpha value to the bitmap and use AlphaBlend() to copy the bitmap back. Note: we could probably simplify and speed up the case of pattern fill by using TransparentBlt() instead. */ HDC memdc; HBITMAP membmp, oldbmp; int minx, miny, maxx, maxy; UINT32 width, height; BITMAPINFO bmi; UINT32 *pvBits; int x, y, i; POINT * points; BLENDFUNCTION ftn; UINT32 uAlpha = (UCHAR)(0xff * alpha); /* make sure the indicator for transparency is different fill_color */ UINT32 transparentColor = fill_color ^ 0x00ffffff; COLORREF bkColor = RGB((transparentColor >> 16) & 0xff, (transparentColor >> 8) & 0xff, transparentColor & 0xff); HBRUSH old_brush; HPEN old_pen; /* find minimum rectangle enclosing our polygon. */ minx = maxx = ppt[0].x; miny = maxy = ppt[0].y; for (i = 1; i < polyi; i++) { minx = min(ppt[i].x, minx); miny = min(ppt[i].y, miny); maxx = max(ppt[i].x, maxx); maxy = max(ppt[i].y, maxy); } /* now shift polygon points to upper left corner */ points = (POINT *)LocalAllocPtr(LHND, (polyi+1) * sizeof(POINT)); for (i = 0; i < polyi; i++) { points[i].x = ppt[i].x - minx; points[i].y = ppt[i].y - miny; } /* create memory device context for bitmap */ memdc = CreateCompatibleDC(hdc); /* create memory bitmap with alpha channel and minimal size */ width = maxx - minx; height = maxy - miny; ZeroMemory(&bmi, sizeof(BITMAPINFO)); bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bmi.bmiHeader.biWidth = width; bmi.bmiHeader.biHeight = height; bmi.bmiHeader.biPlanes = 1; bmi.bmiHeader.biBitCount = 32; bmi.bmiHeader.biCompression = BI_RGB; bmi.bmiHeader.biSizeImage = width * height * 4; membmp = CreateDIBSection(memdc, &bmi, DIB_RGB_COLORS, (void **)&pvBits, NULL, 0x0); oldbmp = (HBITMAP)SelectObject(memdc, membmp); /* clear bitmap, could also do it via GDI */ for (i = 0; i < width * height; i++) pvBits[i] = transparentColor; /* prepare the memory context */ SetTextColor(memdc, fill_color); SetBkColor(memdc, bkColor); old_pen = SelectObject(memdc, lpgw->hnull); if ((fillstyle & 0x0f) == FS_TRANSPARENT_PATTERN) old_brush = SelectObject(memdc, pattern_brush[pattern]); else old_brush = SelectObject(memdc, solid_brush); /* finally, draw polygon */ Polygon(memdc, points, polyi); /* add alpha channel to bitmap */ /* Note: this is really a pre-scaled alpha channel, see MSDN. To make life easy we only use global transparency, see below */ for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { UINT32 pixel = pvBits[x + y * width]; if (pixel == transparentColor) pvBits[x + y * width] = 0x00000000; /* completely transparent */ else pvBits[x + y * width] |= 0xff000000; /* mark as completely opaque */ } } /* copy to device with alpha blending */ ftn.BlendOp = AC_SRC_OVER; ftn.BlendFlags = 0; ftn.AlphaFormat = AC_SRC_ALPHA; /* bitmap has an alpha channel */ ftn.SourceConstantAlpha = uAlpha; AlphaBlend(hdc, minx, miny, width, height, memdc, 0, 0, width, height, ftn); /* clean up */ LocalFreePtr(points); SelectObject(memdc, old_pen); SelectObject(memdc, old_brush); SelectObject(memdc, oldbmp); DeleteObject(membmp); DeleteDC(memdc); } } polyi = 0; } break; case W_image: { /* Due to the structure of gwop in total 6 entries are needed. These static variables help to collect all the information */ if (seq == 0) { /* First OP contains only the color mode */ color_mode = curptr->x; } else if (seq < 5) { /* Next four OPs contain the `corner` array */ corners[seq-1].x = xdash; corners[seq-1].y = ydash; } else { /* The last OP contains the image and it's size */ char *image; unsigned int width, height; int rc; width = curptr->x; height = curptr->y; image = LocalLock(curptr->htext); if (image) { BITMAPINFO bmi; HRGN hrgn; ZeroMemory(&bmi, sizeof(BITMAPINFO)); bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bmi.bmiHeader.biWidth = width; bmi.bmiHeader.biHeight = height; bmi.bmiHeader.biPlanes = 1; bmi.bmiHeader.biCompression = BI_RGB; /* create clip region */ hrgn = CreateRectRgn( GPMIN(corners[2].x, corners[3].x), GPMIN(corners[2].y, corners[3].y), GPMAX(corners[2].x, corners[3].x) + 1, GPMAX(corners[2].y, corners[3].y) + 1); SelectClipRgn(hdc, hrgn); if (color_mode != IC_RGBA) { bmi.bmiHeader.biBitCount = 24; rc = StretchDIBits(hdc, GPMIN(corners[0].x, corners[1].x) , GPMIN(corners[0].y, corners[1].y), abs(corners[1].x - corners[0].x), abs(corners[1].y - corners[0].y), 0, 0, width, height, image, &bmi, DIB_RGB_COLORS, SRCCOPY); } else { HDC memdc; HBITMAP membmp, oldbmp; UINT32 *pvBits; BLENDFUNCTION ftn; bmi.bmiHeader.biBitCount = 32; memdc = CreateCompatibleDC(hdc); membmp = CreateDIBSection(memdc, &bmi, DIB_RGB_COLORS, (void **)&pvBits, NULL, 0x0); oldbmp = (HBITMAP)SelectObject(memdc, membmp); memcpy(pvBits, image, width * height * 4); ftn.BlendOp = AC_SRC_OVER; ftn.BlendFlags = 0; ftn.AlphaFormat = AC_SRC_ALPHA; /* bitmap has an alpha channel */ ftn.SourceConstantAlpha = 0xff; AlphaBlend(hdc, GPMIN(corners[0].x, corners[1].x) , GPMIN(corners[0].y, corners[1].y), abs(corners[1].x - corners[0].x), abs(corners[1].y - corners[0].y), memdc, 0, 0, width, height, ftn); SelectObject(memdc, oldbmp); DeleteObject(membmp); DeleteDC(memdc); } SelectClipRgn(hdc, NULL); } LocalUnlock(curptr->htext); } seq = (seq + 1) % 6; } break; case W_dot: dot(hdc, xdash, ydash); if (keysample) { draw_update_keybox(lpgw, plotno, xdash + htic, ydash + vtic); draw_update_keybox(lpgw, plotno, xdash - htic, ydash - vtic); } break; case W_plus: /* do plus */ case W_star: /* do star: first plus, then cross */ #ifdef HAVE_GDIPLUS if (lpgw->antialiasing) { POINT a, b; a.x = xdash - htic; a.y = ydash; b.x = xdash + htic; b.y = ydash; gdiplusLineEx(hdc, a, b, PS_SOLID, line_width, last_color); a.x = xdash; a.y = ydash - vtic; b.x = xdash; b.y = ydash + vtic; gdiplusLineEx(hdc, a, b, PS_SOLID, line_width, last_color); } else #endif { SelectObject(hdc, lpgw->hsolid); MoveTo(hdc, xdash - htic, ydash); LineTo(hdc, xdash + htic + 1, ydash); MoveTo(hdc, xdash, ydash - vtic); LineTo(hdc, xdash, ydash + vtic + 1); SelectObject(hdc, lpgw->hapen); } if (keysample) { draw_update_keybox(lpgw, plotno, xdash + htic, ydash + vtic); draw_update_keybox(lpgw, plotno, xdash - htic, ydash - vtic); } if (curptr->op == W_plus) break; case W_cross: /* do X */ #ifdef HAVE_GDIPLUS if (lpgw->antialiasing) { POINT a, b; a.x = xdash - htic; a.y = ydash - vtic; b.x = xdash + htic; b.y = ydash + vtic; gdiplusLineEx(hdc, a, b, PS_SOLID, line_width, last_color); a.x = xdash - htic; a.y = ydash + vtic; b.x = xdash + htic; b.y = ydash - vtic; gdiplusLineEx(hdc, a, b, PS_SOLID, line_width, last_color); } else #endif { SelectObject(hdc, lpgw->hsolid); MoveTo(hdc, xdash - htic, ydash - vtic); LineTo(hdc, xdash + htic + 1, ydash + vtic + 1); MoveTo(hdc, xdash - htic, ydash + vtic); LineTo(hdc, xdash + htic + 1, ydash - vtic - 1); SelectObject(hdc, lpgw->hapen); } if (keysample) { draw_update_keybox(lpgw, plotno, xdash + htic, ydash + vtic); draw_update_keybox(lpgw, plotno, xdash - htic, ydash - vtic); } break; case W_circle: /* do open circle */ SelectObject(hdc, lpgw->hsolid); #ifdef HAVE_GDIPLUS if (lpgw->antialiasing) { POINT p; p.x = xdash; p.y = ydash; gdiplusCircleEx(hdc, &p, htic, PS_SOLID, line_width, last_color); } else #endif Arc(hdc, xdash-htic, ydash-vtic, xdash+htic+1, ydash+vtic+1, xdash, ydash+vtic+1, xdash, ydash+vtic+1); dot(hdc, xdash, ydash); SelectObject(hdc, lpgw->hapen); if (keysample) { draw_update_keybox(lpgw, plotno, xdash + htic, ydash + vtic); draw_update_keybox(lpgw, plotno, xdash - htic, ydash - vtic); } break; case W_fcircle: /* do filled circle */ SelectObject(hdc, lpgw->hsolid); Ellipse(hdc, xdash-htic, ydash-vtic, xdash+htic+1, ydash+vtic+1); SelectObject(hdc, lpgw->hapen); #ifdef HAVE_GDIPLUS if (lpgw->antialiasing) { POINT p; p.x = xdash; p.y = ydash; gdiplusCircleEx(hdc, &p, htic, PS_SOLID, line_width, last_color); } #endif if (keysample) { draw_update_keybox(lpgw, plotno, xdash + htic, ydash + vtic); draw_update_keybox(lpgw, plotno, xdash - htic, ydash - vtic); } break; default: /* potentially closed figure */ { POINT p[6]; int i; int shape = 0; int filled = 0; int index = 0; static float pointshapes[6][10] = { {-1, -1, +1, -1, +1, +1, -1, +1, 0, 0}, /* box */ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, /* dummy, circle */ { 0, +1, -1, 0, 0, -1, +1, 0, 0, 0}, /* diamond */ { 0, -4./3, -4./3, 2./3, 4./3, 2./3, 0, 0}, /* triangle */ { 0, 4./3, -4./3, -2./3, 4./3, -2./3, 0, 0}, /* inverted triangle */ { 0, 1, 0.95106, 0.30902, 0.58779, -0.80902, -0.58779, -0.80902, -0.95106, 0.30902} /* pentagon */ }; /* BM: calculate index, instead of an ugly long switch statement; Depends on definition of commands in wgnuplib.h. */ index = (curptr->op - W_box); if ((index > 0) && (index <= W_fpentagon - W_box)) { shape = index / 2; filled = (index % 2) > 0; } for (i = 0; i < 5; ++i) { if (pointshapes[shape][i * 2 + 1] == 0 && pointshapes[shape][i * 2] == 0) break; p[i].x = xdash + htic * pointshapes[shape][i * 2] + 0.5; p[i].y = ydash + vtic * pointshapes[shape][i * 2 + 1] + 0.5; } if (filled) { /* Filled polygon */ #ifdef HAVE_GDIPLUS if (lpgw->antialiasing) { /* filled polygon with border */ gdiplusSolidFilledPolygonEx(hdc, p, i, last_color, 1.); } else #endif { SelectObject(hdc, lpgw->hsolid); Polygon(hdc, p, i); SelectObject(hdc, lpgw->hapen); } } else { /* Outline polygon */ p[i].x = p[0].x; p[i].y = p[0].y; #ifdef HAVE_GDIPLUS if (lpgw->antialiasing) { gdiplusPolylineEx(hdc, p, i + 1, PS_SOLID, line_width, last_color); } else #endif { SelectObject(hdc, lpgw->hsolid); Polyline(hdc, p, i + 1); SelectObject(hdc, lpgw->hapen); } dot(hdc, xdash, ydash); } if (keysample) { draw_update_keybox(lpgw, plotno, xdash + htic, ydash + vtic); draw_update_keybox(lpgw, plotno, xdash - htic, ydash - vtic); } } /* default case */ } /* switch(opcode) */ } /* hide layer? */ lastop = curptr->op; ngwop++; curptr++; if ((unsigned)(curptr - blkptr->gwop) >= GWOPMAX) { GlobalUnlock(blkptr->hblk); blkptr->gwop = (struct GWOP *)NULL; if ((blkptr = blkptr->next) == NULL) /* If exact multiple of GWOPMAX entries are queued, * next will be NULL. Only the next GraphOp() call would * have allocated a new block */ return; if (!blkptr->gwop) blkptr->gwop = (struct GWOP *)GlobalLock(blkptr->hblk); if (!blkptr->gwop) return; curptr = (struct GWOP *)blkptr->gwop; } } if (polyi >= 2) { #ifdef HAVE_GDIPLUS if (lpgw->antialiasing) gdiplusPolyline(hdc, ppt, polyi, &cur_penstruct); else #endif Polyline(hdc, ppt, polyi); } LocalFreePtr(ppt); } /* ================================== */ /* save graph windows as enhanced metafile * The code in here is very similar to what CopyClip does... */ static void SaveAsEMF(LPGW lpgw) { char *cwd; static OPENFILENAME Ofn; static char lpstrCustomFilter[256] = { '\0' }; static char lpstrFileName[MAX_PATH] = { '\0' }; static char lpstrFileTitle[MAX_PATH] = { '\0' }; HWND hwnd = lpgw->hWndGraph; Ofn.lStructSize = sizeof(OPENFILENAME); Ofn.hwndOwner = hwnd; Ofn.lpstrInitialDir = (LPSTR)NULL; Ofn.lpstrFilter = (LPCTSTR) "Enhanced Metafile (*.EMF)\0*.EMF\0All Files (*.*)\0*.*\0"; Ofn.lpstrCustomFilter = lpstrCustomFilter; Ofn.nMaxCustFilter = 255; Ofn.nFilterIndex = 1; /* start with the *.emf filter */ Ofn.lpstrFile = lpstrFileName; Ofn.nMaxFile = MAX_PATH; Ofn.lpstrFileTitle = lpstrFileTitle; Ofn.nMaxFileTitle = MAX_PATH; Ofn.lpstrInitialDir = (LPSTR)NULL; Ofn.lpstrTitle = (LPSTR)NULL; Ofn.Flags = OFN_OVERWRITEPROMPT; Ofn.lpstrDefExt = (LPSTR) "emf"; /* save cwd as GetSaveFileName apparently changes it */ cwd = _getcwd(NULL, 0); if (GetSaveFileName(&Ofn) != 0) { RECT rect, mfrect; HDC hdc; HENHMETAFILE hemf; HDC hmf; TBOOLEAN antialiasing; /* get the context */ hdc = GetDC(hwnd); GetPlotRect(lpgw, &rect); GetPlotRectInMM(lpgw, &mfrect, hdc); /* temporarily disable antialiasing */ antialiasing = lpgw->antialiasing; lpgw->antialiasing = FALSE; hmf = CreateEnhMetaFile(hdc, Ofn.lpstrFile, &mfrect, (LPCTSTR)NULL); /* Always create EMF files using GDI only! */ drawgraph(lpgw, hmf, (LPRECT) &rect); hemf = CloseEnhMetaFile(hmf); lpgw->antialiasing = antialiasing; DeleteEnhMetaFile(hemf); ReleaseDC(hwnd, hdc); /* restore cwd */ if (cwd != NULL) _chdir( cwd ); } /* free the cwd buffer allcoated by _getcwd */ free(cwd); } /* ================================== */ /* copy graph window to clipboard --- note that the Metafile is drawn at the full * virtual resolution of the Windows terminal driver (24000 x 18000 pixels), to * preserve as much accuracy as remotely possible */ static void CopyClip(LPGW lpgw) { RECT rect, mfrect; HDC mem, hmf; HBITMAP bitmap; HENHMETAFILE hemf; HWND hwnd; HDC hdc; hwnd = lpgw->hWndGraph; /* view the window */ if (IsIconic(hwnd)) ShowWindow(hwnd, SW_SHOWNORMAL); BringWindowToTop(hwnd); UpdateWindow(hwnd); /* get the context */ hdc = GetDC(hwnd); GetPlotRect(lpgw, &rect); /* make a bitmap and copy it there */ mem = CreateCompatibleDC(hdc); bitmap = CreateCompatibleBitmap(hdc, rect.right - rect.left, rect.bottom - rect.top); if (bitmap) { /* there is enough memory and the bitmaps OK */ SelectObject(mem, bitmap); BitBlt(mem,0,0,rect.right - rect.left, rect.bottom - rect.top, hdc, rect.left, rect.top, SRCCOPY); } else { MessageBeep(MB_ICONHAND); MessageBox(hwnd, "Insufficient Memory to Copy Clipboard", lpgw->Title, MB_ICONHAND | MB_OK); } DeleteDC(mem); /* OK, bitmap done, now create an enhanced Metafile context * and redraw the whole plot into that. */ { /* make copy of window's main status struct for modification */ GW gwclip = *lpgw; /* disable antialiasing: do not mix GDI/GDI+ */ gwclip.antialiasing = FALSE; gwclip.hfonth = gwclip.hfontv = 0; MakePens(&gwclip, hdc); MakeFonts(&gwclip, &rect, hdc); GetPlotRectInMM(lpgw, &mfrect, hdc); hmf = CreateEnhMetaFile(hdc, (LPCTSTR)NULL, &mfrect, (LPCTSTR)NULL); /* Always create EMF files using GDI only! */ drawgraph(&gwclip, hmf, (LPRECT) &rect); hemf = CloseEnhMetaFile(hmf); DestroyFonts(&gwclip); DestroyPens(&gwclip); } /* Now we have the Metafile and Bitmap prepared, post their contents to * the Clipboard */ OpenClipboard(hwnd); EmptyClipboard(); SetClipboardData(CF_ENHMETAFILE,hemf); SetClipboardData(CF_BITMAP, bitmap); CloseClipboard(); ReleaseDC(hwnd, hdc); DeleteEnhMetaFile(hemf); return; } /* copy graph window to printer */ static void CopyPrint(LPGW lpgw) { DOCINFO docInfo; HDC printer; PRINTDLG pd; static DEVNAMES * pDevNames = NULL; static DEVMODE * pDevMode = NULL; LPCTSTR szDriver, szDevice, szOutput; HWND hwnd = lpgw->hWndGraph; RECT rect; GP_PRINT pr; /* Print Setup Dialog */ /* See http://support.microsoft.com/kb/240082 */ _fmemset (&pd, 0, sizeof pd); pd.lStructSize = sizeof pd; pd.hwndOwner = hwnd; pd.Flags = PD_PRINTSETUP; pd.hDevNames = pDevNames; pd.hDevMode = pDevMode; if (!PrintDlg(&pd)) return; pDevNames = (DEVNAMES *) GlobalLock(pd.hDevNames); pDevMode = (DEVMODE *) GlobalLock(pd.hDevMode); szDriver = (LPCTSTR)pDevNames + pDevNames->wDriverOffset; szDevice = (LPCTSTR)pDevNames + pDevNames->wDeviceOffset; szOutput = (LPCTSTR)pDevNames + pDevNames->wOutputOffset; printer = CreateDC(szDriver, szDevice, szOutput, pDevMode); GlobalUnlock(pd.hDevMode); GlobalUnlock(pd.hDevNames); /* We no longer free these structures, but preserve them for the next time GlobalFree(pd.hDevMode); GlobalFree(pd.hDevNames); */ if (printer == NULL) return; /* abort */ /* Print Size Dialog */ if (!PrintSize(printer, hwnd, &rect)) { DeleteDC(printer); return; /* abort */ } pr.hdcPrn = printer; SetWindowLong(hwnd, 4, (LONG)((GP_LPPRINT)&pr)); PrintRegister((GP_LPPRINT)&pr); EnableWindow(hwnd, FALSE); pr.bUserAbort = FALSE; pr.hDlgPrint = CreateDialogParam(hdllInstance, "CancelDlgBox", hwnd, PrintDlgProc, (LPARAM)lpgw->Title); SetAbortProc(printer, PrintAbortProc); memset(&docInfo, 0, sizeof(DOCINFO)); docInfo.cbSize = sizeof(DOCINFO); docInfo.lpszDocName = lpgw->Title; if (StartDoc(printer, &docInfo) > 0) { TBOOLEAN aa = lpgw->antialiasing; lpgw->sampling = 1; /* Mixing GDI/GDI+ does not seem to work properly on printer devices. */ lpgw->antialiasing = FALSE; SetMapMode(printer, MM_TEXT); SetBkMode(printer, OPAQUE); StartPage(printer); DestroyFonts(lpgw); MakeFonts(lpgw, &rect, printer); DestroyPens(lpgw); /* rebuild pens */ MakePens(lpgw, printer); /* Always print using GDI only! */ drawgraph(lpgw, printer, &rect); if (EndPage(printer) > 0) EndDoc(printer); lpgw->antialiasing = aa; } if (!pr.bUserAbort) { EnableWindow(hwnd, TRUE); DestroyWindow(pr.hDlgPrint); } DeleteDC(printer); SetWindowLong(hwnd, 4, (LONG)(0L)); PrintUnregister((GP_LPPRINT)&pr); /* make certain that the screen pen set is restored */ SendMessage(lpgw->hWndGraph, WM_COMMAND, M_REBUILDTOOLS, 0L); return; } /* ================================== */ /* INI file stuff */ static void WriteGraphIni(LPGW lpgw) { RECT rect; int i; char entry[32]; LPLOGPEN pc; LPLOGPEN pm; LPSTR file = lpgw->IniFile; LPSTR section = lpgw->IniSection; char profile[80]; if ((file == (LPSTR)NULL) || (section == (LPSTR)NULL)) return; if (IsIconic(lpgw->hWndGraph)) ShowWindow(lpgw->hWndGraph, SW_SHOWNORMAL); GetWindowRect(lpgw->hWndGraph,&rect); wsprintf(profile, "%d %d", rect.left, rect.top); WritePrivateProfileString(section, "GraphOrigin", profile, file); wsprintf(profile, "%d %d", rect.right-rect.left, rect.bottom-rect.top); WritePrivateProfileString(section, "GraphSize", profile, file); wsprintf(profile, "%s,%d", lpgw->deffontname, lpgw->deffontsize); WritePrivateProfileString(section, "GraphFont", profile, file); strcpy(WIN_inifontname, lpgw->deffontname); WIN_inifontsize = lpgw->deffontsize; wsprintf(profile, "%d", lpgw->color); WritePrivateProfileString(section, "GraphColor", profile, file); wsprintf(profile, "%d", lpgw->graphtotop); WritePrivateProfileString(section, "GraphToTop", profile, file); wsprintf(profile, "%d", lpgw->doublebuffer); WritePrivateProfileString(section, "GraphDoublebuffer", profile, file); wsprintf(profile, "%d", lpgw->oversample); WritePrivateProfileString(section, "GraphOversampling", profile, file); wsprintf(profile, "%d", lpgw->antialiasing); WritePrivateProfileString(section, "GraphAntialiasing", profile, file); wsprintf(profile, "%d", lpgw->polyaa); WritePrivateProfileString(section, "GraphPolygonAA", profile, file); wsprintf(profile, "%d", lpgw->patternaa); WritePrivateProfileString(section, "GraphPatternAA", profile, file); wsprintf(profile, "%d %d %d",GetRValue(lpgw->background), GetGValue(lpgw->background), GetBValue(lpgw->background)); WritePrivateProfileString(section, "GraphBackground", profile, file); /* now save pens */ for (i=0; i<WGNUMPENS+2; i++) { if (i==0) _fstrcpy(entry,"Border"); else if (i==1) _fstrcpy(entry,"Axis"); else wsprintf(entry,"Line%d",i-1); pc = &lpgw->colorpen[i]; pm = &lpgw->monopen[i]; wsprintf(profile, "%d %d %d %d %d",GetRValue(pc->lopnColor), GetGValue(pc->lopnColor), GetBValue(pc->lopnColor), (pc->lopnWidth.x != 1) ? -pc->lopnWidth.x : pc->lopnStyle, (pm->lopnWidth.x != 1) ? -pm->lopnWidth.x : pm->lopnStyle); WritePrivateProfileString(section, entry, profile, file); } return; } static char * GraphDefaultFont(void) { if (GetACP() == 932) /* Japanese Shift-JIS */ return WINJPFONT; else return WINFONT; }; static void ReadGraphIni(LPGW lpgw) { LPSTR file = lpgw->IniFile; LPSTR section = lpgw->IniSection; char profile[81]; char entry[32]; LPSTR p; int i,r,g,b,colorstyle,monostyle; COLORREF ref; BOOL bOKINI; bOKINI = (file != (LPSTR)NULL) && (section != (LPSTR)NULL); if (!bOKINI) profile[0] = '\0'; if (bOKINI) GetPrivateProfileString(section, "GraphOrigin", "", profile, 80, file); if ( (p = GetInt(profile, (LPINT)&lpgw->Origin.x)) == NULL) lpgw->Origin.x = CW_USEDEFAULT; if ( (p = GetInt(p, (LPINT)&lpgw->Origin.y)) == NULL) lpgw->Origin.y = CW_USEDEFAULT; if (bOKINI) GetPrivateProfileString(section, "GraphSize", "", profile, 80, file); if ( (p = GetInt(profile, (LPINT)&lpgw->Size.x)) == NULL) lpgw->Size.x = CW_USEDEFAULT; if ( (p = GetInt(p, (LPINT)&lpgw->Size.y)) == NULL) lpgw->Size.y = CW_USEDEFAULT; if (bOKINI) GetPrivateProfileString(section, "GraphFont", "", profile, 80, file); { char *size; size = _fstrchr(profile,','); if (size) { *size++ = '\0'; if ( (p = GetInt(size, (LPINT)&lpgw->fontsize)) == NULL) lpgw->fontsize = WINFONTSIZE; } _fstrcpy(lpgw->fontname, profile); if (lpgw->fontsize == 0) lpgw->fontsize = WINFONTSIZE; if (!(*lpgw->fontname)) _fstrcpy(lpgw->fontname, GraphDefaultFont()); /* set current font as default font */ _fstrcpy(lpgw->deffontname, lpgw->fontname); lpgw->deffontsize = lpgw->fontsize; strcpy(WIN_inifontname, lpgw->deffontname); WIN_inifontsize = lpgw->deffontsize; } if (bOKINI) GetPrivateProfileString(section, "GraphColor", "", profile, 80, file); if ( (p = GetInt(profile, (LPINT)&lpgw->color)) == NULL) lpgw->color = TRUE; if (bOKINI) GetPrivateProfileString(section, "GraphToTop", "", profile, 80, file); if ( (p = GetInt(profile, (LPINT)&lpgw->graphtotop)) == NULL) lpgw->graphtotop = TRUE; if (bOKINI) GetPrivateProfileString(section, "GraphDoubleBuffer", "", profile, 80, file); if ( (p = GetInt(profile, (LPINT)&lpgw->doublebuffer)) == NULL) lpgw->doublebuffer = TRUE; if (bOKINI) GetPrivateProfileString(section, "GraphOversampling", "", profile, 80, file); if ( (p = GetInt(profile, (LPINT)&lpgw->oversample)) == NULL) lpgw->oversample = FALSE; if (bOKINI) GetPrivateProfileString(section, "GraphAntialiasing", "", profile, 80, file); if ( (p = GetInt(profile, (LPINT)&lpgw->antialiasing)) == NULL) lpgw->antialiasing = TRUE; if (bOKINI) GetPrivateProfileString(section, "GraphPolygonAA", "", profile, 80, file); if ((p = GetInt(profile, (LPINT)&lpgw->polyaa)) == NULL) lpgw->polyaa = FALSE; if (bOKINI) GetPrivateProfileString(section, "GraphPatternAA", "", profile, 80, file); if ((p = GetInt(profile, (LPINT)&lpgw->patternaa)) == NULL) lpgw->patternaa = TRUE; lpgw->background = RGB(255,255,255); if (bOKINI) GetPrivateProfileString(section, "GraphBackground", "", profile, 80, file); if ( ((p = GetInt(profile, (LPINT)&r)) != NULL) && ((p = GetInt(p, (LPINT)&g)) != NULL) && ((p = GetInt(p, (LPINT)&b)) != NULL) ) lpgw->background = RGB(r,g,b); StorePen(lpgw, 0, RGB(0,0,0), PS_SOLID, PS_SOLID); if (bOKINI) GetPrivateProfileString(section, "Border", "", profile, 80, file); if ( ((p = GetInt(profile, (LPINT)&r)) != NULL) && ((p = GetInt(p, (LPINT)&g)) != NULL) && ((p = GetInt(p, (LPINT)&b)) != NULL) && ((p = GetInt(p, (LPINT)&colorstyle)) != NULL) && ((p = GetInt(p, (LPINT)&monostyle)) != NULL) ) StorePen(lpgw, 0, RGB(r,g,b), colorstyle, monostyle); StorePen(lpgw, 1, RGB(192,192,192), PS_DOT, PS_DOT); if (bOKINI) GetPrivateProfileString(section, "Axis", "", profile, 80, file); if ( ((p = GetInt(profile, (LPINT)&r)) != NULL) && ((p = GetInt(p, (LPINT)&g)) != NULL) && ((p = GetInt(p, (LPINT)&b)) != NULL) && ((p = GetInt(p, (LPINT)&colorstyle)) != NULL) && ((p = GetInt(p, (LPINT)&monostyle)) != NULL) ) StorePen(lpgw, 1, RGB(r,g,b), colorstyle, monostyle); for (i=0; i<WGNUMPENS; i++) { ref = wginitcolor[ i%WGDEFCOLOR ]; colorstyle = wginitstyle[ (i/WGDEFCOLOR) % WGDEFSTYLE ]; monostyle = wginitstyle[ i%WGDEFSTYLE ]; StorePen(lpgw, i+2, ref, colorstyle, monostyle); wsprintf(entry,"Line%d",i+1); if (bOKINI) GetPrivateProfileString(section, entry, "", profile, 80, file); if ( ((p = GetInt(profile, (LPINT)&r)) != NULL) && ((p = GetInt(p, (LPINT)&g)) != NULL) && ((p = GetInt(p, (LPINT)&b)) != NULL) && ((p = GetInt(p, (LPINT)&colorstyle)) != NULL) && ((p = GetInt(p, (LPINT)&monostyle)) != NULL) ) StorePen(lpgw, i + 2, RGB(r,g,b), colorstyle, monostyle); } } /* ================================== */ /* the "Line Styles..." dialog and its support functions */ /* FIXME HBB 20010218: this might better be delegated to a separate source file */ #define LS_DEFLINE 2 typedef struct tagLS { int widtype; int wid; HWND hwnd; int pen; /* current pen number */ LOGPEN colorpen[WGNUMPENS+2]; /* logical color pens */ LOGPEN monopen[WGNUMPENS+2]; /* logical mono pens */ } LS; typedef LS * LPLS; static COLORREF GetColor(HWND hwnd, COLORREF ref) { CHOOSECOLOR cc; COLORREF aclrCust[16]; int i; for (i=0; i<16; i++) { aclrCust[i] = RGB(0,0,0); } _fmemset(&cc, 0, sizeof(CHOOSECOLOR)); cc.lStructSize = sizeof(CHOOSECOLOR); cc.hwndOwner = hwnd; cc.lpCustColors = aclrCust; cc.rgbResult = ref; cc.Flags = CC_RGBINIT; if (ChooseColor(&cc)) return cc.rgbResult; return ref; } /* force update of owner draw button */ static void UpdateColorSample(HWND hdlg) { RECT rect; POINT ptul, ptlr; GetWindowRect( GetDlgItem(hdlg, LS_COLORSAMPLE), &rect); ptul.x = rect.left; ptul.y = rect.top; ptlr.x = rect.right; ptlr.y = rect.bottom; ScreenToClient(hdlg, &ptul); ScreenToClient(hdlg, &ptlr); rect.left = ptul.x; rect.top = ptul.y; rect.right = ptlr.x; rect.bottom = ptlr.y; InvalidateRect(hdlg, &rect, TRUE); UpdateWindow(hdlg); } /* Window handler function for the "Line Styles" dialog */ BOOL CALLBACK LineStyleDlgProc(HWND hdlg, UINT wmsg, WPARAM wparam, LPARAM lparam) { char buf[16]; LPLS lpls; int i; UINT pen; LPLOGPEN plpm, plpc; lpls = (LPLS)GetWindowLong(GetParent(hdlg), 4); switch (wmsg) { case WM_INITDIALOG: pen = 2; for (i=0; i<WGNUMPENS+2; i++) { if (i==0) _fstrcpy(buf,"Border"); else if (i==1) _fstrcpy(buf,"Axis"); else wsprintf(buf,"Line%d",i-1); SendDlgItemMessage(hdlg, LS_LINENUM, LB_ADDSTRING, 0, (LPARAM)((LPSTR)buf)); } SendDlgItemMessage(hdlg, LS_LINENUM, LB_SETCURSEL, pen, 0L); SendDlgItemMessage(hdlg, LS_MONOSTYLE, CB_ADDSTRING, 0, (LPARAM)((LPSTR)"Solid")); SendDlgItemMessage(hdlg, LS_MONOSTYLE, CB_ADDSTRING, 0, (LPARAM)((LPSTR)"Dash")); SendDlgItemMessage(hdlg, LS_MONOSTYLE, CB_ADDSTRING, 0, (LPARAM)((LPSTR)"Dot")); SendDlgItemMessage(hdlg, LS_MONOSTYLE, CB_ADDSTRING, 0, (LPARAM)((LPSTR)"DashDot")); SendDlgItemMessage(hdlg, LS_MONOSTYLE, CB_ADDSTRING, 0, (LPARAM)((LPSTR)"DashDotDot")); plpm = &lpls->monopen[pen]; SendDlgItemMessage(hdlg, LS_MONOSTYLE, CB_SETCURSEL, plpm->lopnStyle, 0L); wsprintf(buf,"%d",plpm->lopnWidth.x); SetDlgItemText(hdlg, LS_MONOWIDTH, buf); SendDlgItemMessage(hdlg, LS_COLORSTYLE, CB_ADDSTRING, 0, (LPARAM)((LPSTR)"Solid")); SendDlgItemMessage(hdlg, LS_COLORSTYLE, CB_ADDSTRING, 0, (LPARAM)((LPSTR)"Dash")); SendDlgItemMessage(hdlg, LS_COLORSTYLE, CB_ADDSTRING, 0, (LPARAM)((LPSTR)"Dot")); SendDlgItemMessage(hdlg, LS_COLORSTYLE, CB_ADDSTRING, 0, (LPARAM)((LPSTR)"DashDot")); SendDlgItemMessage(hdlg, LS_COLORSTYLE, CB_ADDSTRING, 0, (LPARAM)((LPSTR)"DashDotDot")); plpc = &lpls->colorpen[pen]; SendDlgItemMessage(hdlg, LS_COLORSTYLE, CB_SETCURSEL, plpc->lopnStyle, 0L); wsprintf(buf,"%d",plpc->lopnWidth.x); SetDlgItemText(hdlg, LS_COLORWIDTH, buf); return TRUE; case WM_COMMAND: pen = (UINT)SendDlgItemMessage(hdlg, LS_LINENUM, LB_GETCURSEL, 0, 0L); plpm = &lpls->monopen[pen]; plpc = &lpls->colorpen[pen]; switch (LOWORD(wparam)) { case LS_LINENUM: wsprintf(buf,"%d",plpm->lopnWidth.x); SetDlgItemText(hdlg, LS_MONOWIDTH, buf); SendDlgItemMessage(hdlg, LS_MONOSTYLE, CB_SETCURSEL, plpm->lopnStyle, 0L); wsprintf(buf,"%d",plpc->lopnWidth.x); SetDlgItemText(hdlg, LS_COLORWIDTH, buf); SendDlgItemMessage(hdlg, LS_COLORSTYLE, CB_SETCURSEL, plpc->lopnStyle, 0L); UpdateColorSample(hdlg); return FALSE; case LS_MONOSTYLE: plpm->lopnStyle = (UINT)SendDlgItemMessage(hdlg, LS_MONOSTYLE, CB_GETCURSEL, 0, 0L); if (plpm->lopnStyle != 0) { plpm->lopnWidth.x = 1; wsprintf(buf,"%d",plpm->lopnWidth.x); SetDlgItemText(hdlg, LS_MONOWIDTH, buf); } return FALSE; case LS_MONOWIDTH: GetDlgItemText(hdlg, LS_MONOWIDTH, buf, 15); GetInt(buf, (LPINT)&plpm->lopnWidth.x); if (plpm->lopnWidth.x != 1) { plpm->lopnStyle = 0; SendDlgItemMessage(hdlg, LS_MONOSTYLE, CB_SETCURSEL, plpm->lopnStyle, 0L); } return FALSE; case LS_CHOOSECOLOR: plpc->lopnColor = GetColor(hdlg, plpc->lopnColor); UpdateColorSample(hdlg); return FALSE; case LS_COLORSTYLE: plpc->lopnStyle = (UINT)SendDlgItemMessage(hdlg, LS_COLORSTYLE, CB_GETCURSEL, 0, 0L); if (plpc->lopnStyle != 0) { plpc->lopnWidth.x = 1; wsprintf(buf,"%d",plpc->lopnWidth.x); SetDlgItemText(hdlg, LS_COLORWIDTH, buf); } return FALSE; case LS_COLORWIDTH: GetDlgItemText(hdlg, LS_COLORWIDTH, buf, 15); GetInt(buf, (LPINT)&plpc->lopnWidth.x); if (plpc->lopnWidth.x != 1) { plpc->lopnStyle = 0; SendDlgItemMessage(hdlg, LS_COLORSTYLE, CB_SETCURSEL, plpc->lopnStyle, 0L); } return FALSE; case LS_DEFAULT: plpm = lpls->monopen; plpc = lpls->colorpen; /* border */ plpc->lopnColor = RGB(0,0,0); plpc->lopnStyle = PS_SOLID; plpc->lopnWidth.x = 1; plpm->lopnStyle = PS_SOLID; plpm->lopnWidth.x = 1; plpc++; plpm++; /* axis */ plpc->lopnColor = RGB(192,192,192); plpc->lopnStyle = PS_DOT; plpc->lopnWidth.x = 1; plpm->lopnStyle = PS_DOT; plpm->lopnWidth.x = 1; /* LineX */ for (i=0; i<WGNUMPENS; i++) { plpc++; plpm++; plpc->lopnColor = wginitcolor[ i%WGDEFCOLOR ]; plpc->lopnStyle = wginitstyle[ (i/WGDEFCOLOR) % WGDEFSTYLE ]; plpc->lopnWidth.x = 1; plpm->lopnStyle = wginitstyle[ i%WGDEFSTYLE ]; plpm->lopnWidth.x = 1; } /* update window */ plpm = &lpls->monopen[pen]; plpc = &lpls->colorpen[pen]; SendDlgItemMessage(hdlg, LS_LINENUM, LB_SETCURSEL, pen, 0L); wsprintf(buf,"%d",plpm->lopnWidth.x); SetDlgItemText(hdlg, LS_MONOWIDTH, buf); SendDlgItemMessage(hdlg, LS_MONOSTYLE, CB_SETCURSEL, plpm->lopnStyle, 0L); wsprintf(buf,"%d",plpc->lopnWidth.x); SetDlgItemText(hdlg, LS_COLORWIDTH, buf); SendDlgItemMessage(hdlg, LS_COLORSTYLE, CB_SETCURSEL, plpc->lopnStyle, 0L); UpdateColorSample(hdlg); return FALSE; case IDOK: EndDialog(hdlg, IDOK); return TRUE; case IDCANCEL: EndDialog(hdlg, IDCANCEL); return TRUE; } break; case WM_DRAWITEM: { HBRUSH hBrush; LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)lparam; pen = (UINT)SendDlgItemMessage(hdlg, LS_LINENUM, LB_GETCURSEL, (WPARAM)0, (LPARAM)0); plpc = &lpls->colorpen[pen]; hBrush = CreateSolidBrush(plpc->lopnColor); FillRect(lpdis->hDC, &lpdis->rcItem, hBrush); FrameRect(lpdis->hDC, &lpdis->rcItem, (HBRUSH)GetStockObject(BLACK_BRUSH)); DeleteObject(hBrush); } return FALSE; } return FALSE; } /* GetWindowLong(hwnd, 4) must be available for use */ static BOOL LineStyle(LPGW lpgw) { BOOL status = FALSE; LS ls; SetWindowLong(lpgw->hWndGraph, 4, (LONG)((LPLS)&ls)); _fmemcpy(&ls.colorpen, &lpgw->colorpen, (WGNUMPENS + 2) * sizeof(LOGPEN)); _fmemcpy(&ls.monopen, &lpgw->monopen, (WGNUMPENS + 2) * sizeof(LOGPEN)); if (DialogBox (hdllInstance, "LineStyleDlgBox", lpgw->hWndGraph, LineStyleDlgProc) == IDOK) { _fmemcpy(&lpgw->colorpen, &ls.colorpen, (WGNUMPENS + 2) * sizeof(LOGPEN)); _fmemcpy(&lpgw->monopen, &ls.monopen, (WGNUMPENS + 2) * sizeof(LOGPEN)); status = TRUE; } SetWindowLong(lpgw->hWndGraph, 4, (LONG)(0L)); return status; } #ifdef USE_MOUSE /* ================================== */ /* HBB 20010207: new helper functions: wrapper around gp_exec_event * and DoZoombox. These may vanish again, as has the original idea I * invented them for... */ static void Wnd_exec_event(LPGW lpgw, LPARAM lparam, char type, int par1) { int mx, my; static unsigned long lastTimestamp = 0; unsigned long thisTimestamp = GetMessageTime(); int par2 = thisTimestamp - lastTimestamp; if (lpgw == graphwin) { if (type == GE_keypress) par2 = 0; GetMousePosViewport(lpgw, &mx, &my); gp_exec_event(type, mx, my, par1, par2, 0); lastTimestamp = thisTimestamp; } } static void Wnd_refresh_zoombox(LPGW lpgw, LPARAM lParam) { if (lpgw == graphwin) { int mx, my; GetMousePosViewport(lpgw, &mx, &my); DrawZoomBox(lpgw); /* erase current zoom box */ zoombox.to.x = mx; zoombox.to.y = my; DrawZoomBox(lpgw); /* draw new zoom box */ } } static void Wnd_refresh_ruler_lineto(LPGW lpgw, LPARAM lParam) { if (lpgw == graphwin) { int mx, my; GetMousePosViewport(lpgw, &mx, &my); DrawRulerLineTo(lpgw); /* erase current line */ ruler_lineto.x = mx; ruler_lineto.y = my; DrawRulerLineTo(lpgw); /* draw new line box */ } } #endif /* USE_MOUSE */ /* ================================== */ /* The toplevel function of this module: Window handler function of the graph window */ LRESULT CALLBACK WndGraphProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; RECT rect; LPGW lpgw; HMENU sysmenu; int i; #ifdef USE_MOUSE static unsigned int last_modifier_mask = -99; #endif lpgw = (LPGW)GetWindowLong(hwnd, 0); #ifdef USE_MOUSE /* mouse events first */ if ((lpgw == graphwin) && mouse_setting.on) { switch (message) { case WM_MOUSEMOVE: #if 1 SetCursor(hptrCurrent); #else SetCursor(hptrCrossHair); #endif if (zoombox.on) { Wnd_refresh_zoombox(lpgw, lParam); } if (ruler.on && ruler_lineto.on) { Wnd_refresh_ruler_lineto(lpgw, lParam); } /* track (show) mouse position -- send the event to gnuplot */ Wnd_exec_event(lpgw, lParam, GE_motion, wParam); return 0L; /* end of WM_MOUSEMOVE */ case WM_LBUTTONDOWN: { int i; int x = GET_X_LPARAM(lParam); int y = GET_Y_LPARAM(lParam) - lpgw->ToolbarHeight; for (i = 0; (i < lpgw->numplots) && (i < lpgw->maxkeyboxes) && (i < lpgw->maxhideplots); i++) { if ((lpgw->keyboxes[i].left != INT_MAX) && (x >= lpgw->keyboxes[i].left) && (x <= lpgw->keyboxes[i].right) && (y <= lpgw->keyboxes[i].top) && (y >= lpgw->keyboxes[i].bottom)) { lpgw->hideplot[i] = ! lpgw->hideplot[i]; if (i < MAXPLOTSHIDE) SendMessage(lpgw->hToolbar, TB_CHECKBUTTON, M_HIDEPLOT + i, (LPARAM)lpgw->hideplot[i]); GetClientRect(hwnd, &rect); InvalidateRect(hwnd, (LPRECT) &rect, 1); UpdateWindow(hwnd); return 0L; } } Wnd_exec_event(lpgw, lParam, GE_buttonpress, 1); return 0L; } case WM_RBUTTONDOWN: /* FIXME HBB 20010207: this collides with the right-click * context menu !!! */ Wnd_exec_event(lpgw, lParam, GE_buttonpress, 3); return 0L; case WM_MBUTTONDOWN: Wnd_exec_event(lpgw, lParam, GE_buttonpress, 2); return 0L; #if _WIN32_WINNT >= 0x0400 /* shige : mouse wheel support */ case WM_MOUSEWHEEL: { WORD fwKeys; short int zDelta; int modifier_mask; fwKeys = LOWORD(wParam); zDelta = HIWORD(wParam); modifier_mask = ((fwKeys & MK_SHIFT)? Mod_Shift : 0) | ((fwKeys & MK_CONTROL)? Mod_Ctrl : 0) | ((fwKeys & MK_ALT)? Mod_Alt : 0); if (last_modifier_mask != modifier_mask) Wnd_exec_event(lpgw, lParam, GE_modifier, modifier_mask); Wnd_exec_event(lpgw, lParam, GE_buttonpress, zDelta > 0 ? 4 : 5); last_modifier_mask = modifier_mask; return 0L; } #endif case WM_LBUTTONDBLCLK: Wnd_exec_event(lpgw, lParam, GE_buttonrelease, 1); return 0L; case WM_RBUTTONDBLCLK: Wnd_exec_event(lpgw, lParam, GE_buttonrelease, 3); return 0L; case WM_MBUTTONDBLCLK: Wnd_exec_event(lpgw, lParam, GE_buttonrelease, 2); return 0L; #if 1 case WM_LBUTTONUP: #else case WM_LBUTTONCLICK: #endif Wnd_exec_event(lpgw, lParam, GE_buttonrelease, 1); return 0L; #if 1 case WM_RBUTTONUP: #else case WM_RBUTTONCLICK: #endif Wnd_exec_event(lpgw, lParam, GE_buttonrelease, 3); return 0L; #if 1 case WM_MBUTTONUP: #else case WM_MBUTTONCLICK: #endif Wnd_exec_event(lpgw, lParam, GE_buttonrelease, 2); return 0L; } /* switch over mouse events */ } #endif /* USE_MOUSE */ switch(message) { case WM_SYSCOMMAND: switch(LOWORD(wParam)) { case M_GRAPH_TO_TOP: case M_COLOR: case M_DOUBLEBUFFER: case M_OVERSAMPLE: case M_ANTIALIASING: case M_POLYAA: case M_PATTERNAA: case M_CHOOSE_FONT: case M_COPY_CLIP: case M_SAVE_AS_EMF: case M_LINESTYLE: case M_BACKGROUND: case M_PRINT: case M_WRITEINI: case M_REBUILDTOOLS: SendMessage(hwnd, WM_COMMAND, wParam, lParam); break; #ifndef WGP_CONSOLE case M_ABOUT: if (lpgw->lptw) AboutBox(hwnd,lpgw->lptw->AboutText); return 0; #endif case M_COMMANDLINE: sysmenu = GetSystemMenu(lpgw->hWndGraph,0); i = GetMenuItemCount (sysmenu); DeleteMenu (sysmenu, --i, MF_BYPOSITION); DeleteMenu (sysmenu, --i, MF_BYPOSITION); if (lpgw->lptw) ShowWindow (lpgw->lptw->hWndParent, SW_SHOW); break; } break; case WM_CHAR: /* All 'normal' keys (letters, digits and the likes) end up * here... */ #ifndef DISABLE_SPACE_RAISES_CONSOLE if (wParam == VK_SPACE) { WinRaiseConsole(); return 0L; } #endif /* DISABLE_SPACE_RAISES_CONSOLE */ #ifdef USE_MOUSE Wnd_exec_event(lpgw, lParam, GE_keypress, (TCHAR)wParam); #endif return 0L; #ifdef USE_MOUSE /* "special" keys have to be caught from WM_KEYDOWN, as they * don't generate WM_CHAR messages. */ /* NB: It may not be possible to catch Alt-keys, this way */ case WM_KEYUP: { /* First, look for a change in modifier status */ unsigned int modifier_mask = 0; modifier_mask = ((GetKeyState(VK_SHIFT) < 0) ? Mod_Shift : 0 ) | ((GetKeyState(VK_CONTROL) < 0) ? Mod_Ctrl : 0) | ((GetKeyState(VK_MENU) < 0) ? Mod_Alt : 0); if (modifier_mask != last_modifier_mask) { Wnd_exec_event ( lpgw, lParam, GE_modifier, modifier_mask); last_modifier_mask = modifier_mask; } } /* Ignore Key-Up events other than those of modifier keys */ break; case WM_KEYDOWN: if ((GetKeyState(VK_CONTROL) < 0) && (wParam != VK_CONTROL)) { switch(wParam) { case 'C': /* Ctrl-C: Copy to Clipboard */ SendMessage(hwnd,WM_COMMAND,M_COPY_CLIP,0L); break; case 'S': /* Ctrl-S: Save As EMF */ SendMessage(hwnd,WM_COMMAND,M_SAVE_AS_EMF,0L); break; } /* switch(wparam) */ } else { /* First, look for a change in modifier status */ unsigned int modifier_mask = 0; modifier_mask = ((GetKeyState(VK_SHIFT) < 0) ? Mod_Shift : 0 ) | ((GetKeyState(VK_CONTROL) < 0) ? Mod_Ctrl : 0) | ((GetKeyState(VK_MENU) < 0) ? Mod_Alt : 0); if (modifier_mask != last_modifier_mask) { Wnd_exec_event(lpgw, lParam, GE_modifier, modifier_mask); last_modifier_mask = modifier_mask; } } switch (wParam) { case VK_BACK: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_BackSpace); break; case VK_TAB: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_Tab); break; case VK_RETURN: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_Return); break; case VK_PAUSE: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_Pause); break; case VK_SCROLL: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_Scroll_Lock); break; #if 0 /* HOW_IS_THIS_FOR_WINDOWS */ /* HBB 20010215: not at all, AFAICS... :-( */ case VK_SYSRQ: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_Sys_Req); break; #endif case VK_ESCAPE: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_Escape); break; case VK_DELETE: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_Delete); break; case VK_INSERT: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_KP_Insert); break; case VK_HOME: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_Home); break; case VK_LEFT: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_Left); break; case VK_UP: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_Up); break; case VK_RIGHT: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_Right); break; case VK_DOWN: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_Down); break; case VK_END: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_End); break; case VK_PRIOR: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_PageUp); break; case VK_NEXT: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_PageDown); break; case VK_F1: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_F1); break; case VK_F2: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_F2); break; case VK_F3: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_F3); break; case VK_F4: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_F4); break; case VK_F5: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_F5); break; case VK_F6: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_F6); break; case VK_F7: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_F7); break; case VK_F8: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_F8); break; case VK_F9: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_F9); break; case VK_F10: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_F10); break; case VK_F11: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_F11); break; case VK_F12: Wnd_exec_event(lpgw, lParam, GE_keypress, GP_F12); break; case VK_CANCEL: /* FIXME: Currently, this only supports interrupting fit. */ ctrlc_flag = TRUE; break; } /* switch (wParam) */ return 0L; #if 0 /* DO WE NEED THIS ??? */ case WM_MOUSEMOVE: /* set default pointer: */ SetCursor(hptrDefault); return 0L; #endif #endif /* USE_MOUSE */ case WM_COMMAND: switch(LOWORD(wParam)) { case M_GRAPH_TO_TOP: lpgw->graphtotop = !lpgw->graphtotop; SendMessage(hwnd,WM_COMMAND,M_REBUILDTOOLS,0L); return(0); case M_COLOR: lpgw->color = !lpgw->color; lpgw->dashed = !lpgw->color; SendMessage(hwnd,WM_COMMAND,M_REBUILDTOOLS,0L); WIN_update_options(); return(0); case M_OVERSAMPLE: lpgw->oversample = !lpgw->oversample; SendMessage(hwnd, WM_COMMAND, M_REBUILDTOOLS, 0L); return 0; case M_DOUBLEBUFFER: lpgw->doublebuffer = !lpgw->doublebuffer; SendMessage(hwnd, WM_COMMAND, M_REBUILDTOOLS, 0L); return 0; case M_ANTIALIASING: lpgw->antialiasing = !lpgw->antialiasing; SendMessage(hwnd, WM_COMMAND, M_REBUILDTOOLS, 0L); return 0; case M_POLYAA: lpgw->polyaa = !lpgw->polyaa; SendMessage(hwnd, WM_COMMAND, M_REBUILDTOOLS, 0L); return 0; case M_PATTERNAA: lpgw->patternaa = !lpgw->patternaa; SendMessage(hwnd, WM_COMMAND, M_REBUILDTOOLS, 0L); return 0; case M_CHOOSE_FONT: SelFont(lpgw); WIN_update_options(); return 0; case M_COPY_CLIP: CopyClip(lpgw); return 0; case M_SAVE_AS_EMF: SaveAsEMF(lpgw); return 0; case M_LINESTYLE: if (LineStyle(lpgw)) SendMessage(hwnd,WM_COMMAND,M_REBUILDTOOLS,0L); return 0; case M_BACKGROUND: lpgw->background = GetColor(hwnd, lpgw->background); SendMessage(hwnd,WM_COMMAND,M_REBUILDTOOLS,0L); WIN_update_options(); return 0; case M_PRINT: CopyPrint(lpgw); return 0; case M_HIDEGRID: lpgw->hidegrid = SendMessage(lpgw->hToolbar, TB_ISBUTTONCHECKED, LOWORD(wParam), (LPARAM)0); GetClientRect(hwnd, &rect); InvalidateRect(hwnd, (LPRECT) &rect, 1); UpdateWindow(hwnd); return 0; case M_WRITEINI: WriteGraphIni(lpgw); #ifndef WGP_CONSOLE if (lpgw->lptw) WriteTextIni(lpgw->lptw); #endif WIN_update_options(); return 0; case M_REBUILDTOOLS: if (lpgw->color) CheckMenuItem(lpgw->hPopMenu, M_COLOR, MF_BYCOMMAND | MF_CHECKED); else CheckMenuItem(lpgw->hPopMenu, M_COLOR, MF_BYCOMMAND | MF_UNCHECKED); if (lpgw->doublebuffer) CheckMenuItem(lpgw->hPopMenu, M_DOUBLEBUFFER, MF_BYCOMMAND | MF_CHECKED); else CheckMenuItem(lpgw->hPopMenu, M_DOUBLEBUFFER, MF_BYCOMMAND | MF_UNCHECKED); if (lpgw->oversample) CheckMenuItem(lpgw->hPopMenu, M_OVERSAMPLE, MF_BYCOMMAND | MF_CHECKED); else CheckMenuItem(lpgw->hPopMenu, M_OVERSAMPLE, MF_BYCOMMAND | MF_UNCHECKED); #ifdef HAVE_GDIPLUS if (lpgw->antialiasing) CheckMenuItem(lpgw->hPopMenu, M_ANTIALIASING, MF_BYCOMMAND | MF_CHECKED); else CheckMenuItem(lpgw->hPopMenu, M_ANTIALIASING, MF_BYCOMMAND | MF_UNCHECKED); if (lpgw->polyaa) CheckMenuItem(lpgw->hPopMenu, M_POLYAA, MF_BYCOMMAND | MF_CHECKED); else CheckMenuItem(lpgw->hPopMenu, M_POLYAA, MF_BYCOMMAND | MF_UNCHECKED); if (lpgw->patternaa) CheckMenuItem(lpgw->hPopMenu, M_PATTERNAA, MF_BYCOMMAND | MF_CHECKED); else CheckMenuItem(lpgw->hPopMenu, M_PATTERNAA, MF_BYCOMMAND | MF_UNCHECKED); #endif if (lpgw->graphtotop) CheckMenuItem(lpgw->hPopMenu, M_GRAPH_TO_TOP, MF_BYCOMMAND | MF_CHECKED); else CheckMenuItem(lpgw->hPopMenu, M_GRAPH_TO_TOP, MF_BYCOMMAND | MF_UNCHECKED); DestroyPens(lpgw); DestroyFonts(lpgw); hdc = GetDC(hwnd); MakePens(lpgw, hdc); GetPlotRect(lpgw, &rect); MakeFonts(lpgw, (LPRECT)&rect, hdc); ReleaseDC(hwnd, hdc); GetClientRect(hwnd, &rect); InvalidateRect(hwnd, (LPRECT) &rect, 1); UpdateWindow(hwnd); return 0; } /* handle toolbar events */ if ((LOWORD(wParam) >= M_HIDEPLOT) && (LOWORD(wParam) < (M_HIDEPLOT + MAXPLOTSHIDE))) { unsigned button = LOWORD(wParam) - (M_HIDEPLOT); if (button < lpgw->maxhideplots) lpgw->hideplot[button] = SendMessage(lpgw->hToolbar, TB_ISBUTTONCHECKED, LOWORD(wParam), (LPARAM)0); GetClientRect(hwnd, &rect); InvalidateRect(hwnd, (LPRECT) &rect, 1); UpdateWindow(hwnd); return 0; } return 0; case WM_PARENTNOTIFY: /* Message from status bar (or another child window): */ #ifdef USE_MOUSE /* Cycle through mouse-mode on button 1 click */ if (LOWORD(wParam) == WM_LBUTTONDOWN) { int y = HIWORD(lParam); RECT rect; GetClientRect(hwnd, &rect); if (y > rect.bottom - lpgw->StatusHeight) /* simulate keyboard event '1' */ Wnd_exec_event(lpgw, lParam, GE_keypress, (TCHAR)'1'); return 0; } #endif /* Context menu is handled below, everything else is not */ if (LOWORD(wParam) != WM_CONTEXTMENU) return 1; /* intentionally fall through */ case WM_CONTEXTMENU: { /* Note that this only works via mouse in `unset mouse` * mode. You can access the popup via the System menu, * status bar or keyboard (Shift-F10, Menu-Key) instead. */ POINT pt; pt.x = GET_X_LPARAM(lParam); pt.y = GET_Y_LPARAM(lParam); if (pt.x == -1) { /* keyboard activation */ pt.x = pt.y = 0; ClientToScreen(hwnd, &pt); } TrackPopupMenu(lpgw->hPopMenu, TPM_LEFTALIGN, pt.x, pt.y, 0, hwnd, NULL); return 0; } case WM_NOTIFY: switch (((LPNMHDR)lParam)->code) { case TBN_DROPDOWN: { RECT rc; TPMPARAMS tpm; LPNMTOOLBAR lpnmTB = (LPNMTOOLBAR)lParam; SendMessage(lpnmTB->hdr.hwndFrom, TB_GETRECT, (WPARAM)lpnmTB->iItem, (LPARAM)&rc); MapWindowPoints(lpnmTB->hdr.hwndFrom, HWND_DESKTOP, (LPPOINT)&rc, 2); tpm.cbSize = sizeof(TPMPARAMS); tpm.rcExclude = rc; TrackPopupMenuEx(lpgw->hPopMenu, TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_VERTICAL, rc.left, rc.bottom, lpgw->hWndGraph, &tpm); return TBDDRET_DEFAULT; } case TTN_GETDISPINFO: { LPTOOLTIPTEXT lpttt = (LPTOOLTIPTEXT)lParam; UINT_PTR idButton = lpttt->hdr.idFrom; lpttt->hinst = 0; switch (idButton) { case M_COPY_CLIP: strcpy(lpttt->szText, "Copy graph to clipboard"); break; case M_PRINT: strcpy(lpttt->szText, "Print graph"); break; case M_SAVE_AS_EMF: strcpy(lpttt->szText, "Save graph as EMF"); break; case M_HIDEGRID: strcpy(lpttt->szText, "Do not draw grid lines"); break; } if ((idButton >= M_HIDEPLOT) && (idButton < (M_HIDEPLOT + MAXPLOTSHIDE))) { unsigned index = (unsigned)idButton - (M_HIDEPLOT) + 1; sprintf(lpttt->szText, "Hide graph #%i", index); } lpttt->uFlags |= TTF_DI_SETITEM; return TRUE; } } return FALSE; case WM_CREATE: lpgw = ((CREATESTRUCT *)lParam)->lpCreateParams; SetWindowLong(hwnd, 0, (LONG)lpgw); lpgw->hWndGraph = hwnd; hdc = GetDC(hwnd); MakePens(lpgw, hdc); #ifdef USE_MOUSE LoadCursors(lpgw); #endif GetPlotRect(lpgw, &rect); MakeFonts(lpgw, (LPRECT)&rect, hdc); ReleaseDC(hwnd, hdc); if ( lpgw->lptw && (lpgw->lptw->DragPre!=(LPSTR)NULL) && (lpgw->lptw->DragPost!=(LPSTR)NULL) ) DragAcceptFiles(hwnd, TRUE); return(0); case WM_ERASEBKGND: return(1); /* we erase the background ourselves */ case WM_PAINT: { HDC memdc; HBITMAP membmp, oldbmp; LONG width, height; int sampling; RECT memrect; hdc = BeginPaint(hwnd, &ps); SetMapMode(hdc, MM_TEXT); SetBkMode(hdc, OPAQUE); GetPlotRect(lpgw, &rect); SetViewportExtEx(hdc, rect.right, rect.bottom, NULL); /* double buffering */ if (lpgw->doublebuffer) { /* choose oversampling */ if (lpgw->oversample) sampling = 2; /* anything bigger than that makes the computer crawl ... */ else sampling = 1; /* create memory device context for double buffering */ width = rect.right - rect.left; height = rect.bottom - rect.top; memdc = CreateCompatibleDC(hdc); memrect.left = 0; memrect.right = width * sampling + sampling/2; memrect.top = 0; memrect.bottom = height * sampling + sampling/2; membmp = CreateCompatibleBitmap(hdc, memrect.right, memrect.bottom); oldbmp = (HBITMAP)SelectObject(memdc, membmp); /* TODO: we really should cache the results ... */ if (sampling > 1) { lpgw->sampling = sampling; DestroyFonts(lpgw); MakeFonts(lpgw, &memrect, memdc); } /* draw into memdc, then copy to hdc */ drawgraph(lpgw, memdc, &memrect); if (sampling == 1) BitBlt(hdc, rect.left, rect.top, width, height, memdc, 0, 0, SRCCOPY); else { int stretch = SetStretchBltMode(hdc, HALFTONE); StretchBlt(hdc, rect.left, rect.top, width, height, memdc,0, 0, memrect.right, memrect.bottom, SRCCOPY); SetStretchBltMode(hdc, stretch); } lpgw->sampling = 1; /* select the old bitmap back into the device context */ SelectObject(memdc, oldbmp); DeleteObject(membmp); DeleteDC(memdc); } else { drawgraph(lpgw, hdc, &rect); } EndPaint(hwnd, &ps); #ifdef USE_MOUSE /* drawgraph() erases the plot window, so immediately after * it has completed, all the 'real-time' stuff the gnuplot core * doesn't know anything about has to be redrawn */ DrawRuler(lpgw); DrawRulerLineTo(lpgw); DrawZoomBox(lpgw); #endif /* Update in case the number of graphs has changed */ UpdateToolbar(lpgw); return 0; } case WM_SIZE: SendMessage(lpgw->hStatusbar, WM_SIZE, wParam, lParam); if (lpgw->hToolbar) { RECT rect; SendMessage(lpgw->hToolbar, WM_SIZE, wParam, lParam); /* make room */ GetClientRect(lpgw->hToolbar, &rect); lpgw->ToolbarHeight = rect.bottom - rect.top + 1; } if ((wParam == SIZE_MAXIMIZED) || (wParam == SIZE_RESTORED)) { RECT rect; unsigned width, height; GetWindowRect(hwnd, &rect); width = rect.right - rect.left; height = rect.bottom - rect.top; /* Ignore minimize / de-minize */ if ((lpgw->Size.x != width) || (lpgw->Size.y != height)) { lpgw->Size.x = width; lpgw->Size.y = height; /* remake fonts */ DestroyFonts(lpgw); GetPlotRect(lpgw, &rect); hdc = GetDC(hwnd); MakeFonts(lpgw, &rect, hdc); ReleaseDC(hwnd, hdc); GetClientRect(hwnd, &rect); InvalidateRect(hwnd, &rect, 1); UpdateWindow(hwnd); } } break; #ifndef WGP_CONSOLE case WM_DROPFILES: if (lpgw->lptw) DragFunc(lpgw->lptw, (HDROP)wParam); break; #endif case WM_DESTROY: DestroyPens(lpgw); DestroyFonts(lpgw); #ifdef USE_MOUSE DestroyCursors(lpgw); #endif DragAcceptFiles(hwnd, FALSE); lpgw->hWndGraph = NULL; #ifndef WGP_CONSOLE WinPersistTextClose(); #endif return 0; case WM_CLOSE: GraphClose(lpgw); return 0; } return DefWindowProc(hwnd, message, wParam, lParam); } void GraphChangeFont(LPGW lpgw, LPCSTR font, int fontsize, HDC hdc, RECT rect) { int newfontsize; bool remakefonts = FALSE; bool font_is_not_empty = (font != NULL && *font != '\0'); newfontsize = (fontsize != 0) ? fontsize : lpgw->deffontsize; if (font_is_not_empty) { remakefonts = (strcmp(lpgw->fontname, font) != 0) || (newfontsize != lpgw->fontsize); } else { remakefonts = (strcmp(lpgw->fontname, lpgw->deffontname) != 0) || (newfontsize != lpgw->fontsize); } if (remakefonts) { lpgw->fontsize = newfontsize; strcpy(lpgw->fontname, font_is_not_empty ? font : lpgw->deffontname); DestroyFonts(lpgw); MakeFonts(lpgw, &rect, hdc); } } /* close the terminal window */ void WDPROC win_close_terminal_window(LPGW lpgw) { if (GraphHasWindow(lpgw)) SendMessage( lpgw->hWndGraph, WM_CLOSE, 0L, 0L); } #ifdef USE_MOUSE /* Implemented by Petr Mikulik, February 2001 --- the best Windows solutions * come from OS/2 :-)) */ /* ================================================================= */ /* Firstly: terminal calls from win.trm */ /* Note that these all take lpgw as their first argument. It's an OO-type * 'this' pointer, sort of: it stores all the status information of the graph * window that we need, in a single large structure. */ void WDPROC Graph_set_cursor(LPGW lpgw, int c, int x, int y) { switch (c) { case -4: /* switch off line between ruler and mouse cursor */ DrawRulerLineTo(lpgw); ruler_lineto.on = FALSE; break; case -3: /* switch on line between ruler and mouse cursor */ if (ruler.on && ruler_lineto.on) break; ruler_lineto.x = x; ruler_lineto.y = y; ruler_lineto.on = TRUE; DrawRulerLineTo(lpgw); break; case -2: { /* move mouse to the given point */ RECT rc; POINT pt; GetPlotRect(lpgw, &rc); pt.x = MulDiv(x, rc.right - rc.left, lpgw->xmax); pt.y = rc.bottom - MulDiv(y, rc.bottom - rc.top, lpgw->ymax); MapWindowPoints(lpgw->hWndGraph, HWND_DESKTOP, &pt, 1); SetCursorPos(pt.x, pt.y); } break; case -1: /* start zooming; zooming cursor */ zoombox.on = TRUE; zoombox.from.x = zoombox.to.x = x; zoombox.from.y = zoombox.to.y = y; break; case 0: /* standard cross-hair cursor */ SetCursor((hptrCurrent = mouse_setting.on ? hptrCrossHair : hptrDefault)); break; case 1: /* cursor during rotation */ SetCursor(hptrCurrent = hptrRotating); break; case 2: /* cursor during scaling */ SetCursor(hptrCurrent = hptrScaling); break; case 3: /* cursor during zooming */ SetCursor(hptrCurrent = hptrZooming); break; } if (c>=0 && zoombox.on) { /* erase zoom box */ DrawZoomBox(lpgw); zoombox.on = FALSE; } if (c>=0 && ruler_lineto.on) { /* erase ruler line */ DrawRulerLineTo(lpgw); ruler_lineto.on = FALSE; } } /* set_ruler(int x, int y) term API: x<0 switches ruler off. */ void WDPROC Graph_set_ruler (LPGW lpgw, int x, int y ) { DrawRuler(lpgw); /* remove previous drawing, if any */ DrawRulerLineTo(lpgw); if (x < 0) { ruler.on = FALSE; return; } ruler.on = TRUE; ruler.x = x; ruler.y = y; DrawRuler(lpgw); /* draw ruler at new positions */ DrawRulerLineTo(lpgw); } /* put_tmptext(int i, char c[]) term API * i: 0..at statusline * 1, 2: at corners of zoom box with \r separating text */ void WDPROC Graph_put_tmptext (LPGW lpgw, int where, LPCSTR text ) { /* Position of the annotation string (mouse movement) or zoom box * text or whatever temporary text added... */ switch (where) { case 0: UpdateStatusLine(lpgw, text); break; case 1: DrawZoomBox(lpgw); if (zoombox.text1) { free((char*)zoombox.text1); } zoombox.text1 = strdup(text); DrawZoomBox(lpgw); break; case 2: DrawZoomBox(lpgw); if (zoombox.text2) { free((char*)zoombox.text2); } zoombox.text2 = strdup(text); DrawZoomBox(lpgw); break; default: ; /* should NEVER happen */ } } void WDPROC Graph_set_clipboard (LPGW lpgw, LPCSTR s) { size_t length; HGLOBAL memHandle; LPSTR clipText; /* check: no string --> nothing to do */ if (!s || !s[0]) return; /* Transport the string into a system-global storage area. In case * of (unlikely) allocation failures, fail silently */ length = strlen(s); if ( (memHandle = GlobalAlloc(GHND, length + 1)) == NULL) return; if ( (clipText = GlobalLock(memHandle)) == NULL) { GlobalFree(memHandle); return; } strcpy(clipText, s); GlobalUnlock(memHandle); /* Now post that memory area to the Clipboard */ OpenClipboard(lpgw->hWndGraph); EmptyClipboard(); SetClipboardData(CF_TEXT, memHandle); CloseClipboard(); } /* ================================================================= */ /* Secondly, support routines that implement direct mouse reactions. */ /* This routine gets the mouse/pointer position in the current window and * recalculates it to the viewport coordinates. */ static void GetMousePosViewport(LPGW lpgw, int *mx, int *my) { POINT pt; RECT rc; GetPlotRect(lpgw, &rc); /* HBB: has to be done this way. The simpler method by taking apart LPARM * only works for mouse, but not for keypress events. */ GetCursorPos(&pt); ScreenToClient(lpgw->hWndGraph, &pt); /* px=px(mx); mouse=>gnuplot driver coordinates */ /* FIXME: classically, this would use MulDiv() call, and no floating point */ /* BM: protect against zero window size - Vista does that when minimizing windows */ *mx = *my = 0; if ((rc.right - rc.left) != 0) *mx = (int)((pt.x - rc.left) * lpgw->xmax / (rc.right - rc.left) + 0.5); if ((rc.bottom -rc.top) != 0) *my = (int)((rc.bottom - pt.y) * lpgw->ymax / (rc.bottom -rc.top) + 0.5); } /* HBB 20010218: Newly separated function: Draw text string in XOR mode. * That is surprisingly difficult using the Windows API: have to draw text * into a background bitmap, first, and then blit that onto the screen. * * x and y give the bottom-left corner of the bounding box into which the * text will be drawn */ static void Draw_XOR_Text(LPGW lpgw, const char *text, size_t length, int x, int y) { HDC hdc, tempDC; HBITMAP bitmap; int cx, cy; if (!text || !text[0]) return; /* no text to be displayed */ hdc = GetDC(lpgw->hWndGraph); /* Prepare background image buffer of the necessary size */ Wnd_GetTextSize(hdc, text, length, &cx, &cy); bitmap = CreateCompatibleBitmap(hdc, cx, cy); /* ... and a DeviceContext to access it by */ tempDC = CreateCompatibleDC(hdc); DeleteObject(SelectObject(tempDC, bitmap)); TextOut(tempDC, 0, 0, text, length); /* Copy printed string to the screen window using "target = target XOR (NOT source)" ROP, see "Ternary Raster Operations" http://msdn.microsoft.com/en-us/library/dd145130%28VS.85%29.aspx */ BitBlt(hdc, x, y - cy, cx, cy, tempDC, 0, 0, 0x00990066); /* Clean up behind ourselves */ DeleteDC(tempDC); DeleteObject(bitmap); ReleaseDC(lpgw->hWndGraph, hdc); } /* ================================== */ /* * Update the status line by the text; erase the previous text */ static void UpdateStatusLine(LPGW lpgw, const char text[]) { SendMessage(lpgw->hStatusbar, WM_SETTEXT, (WPARAM)0, (LPARAM)text); } /* * Update the toolbar to reflect the current the number of active plots */ static void UpdateToolbar(LPGW lpgw) { unsigned i; SendMessage(lpgw->hToolbar, TB_HIDEBUTTON, M_HIDEGRID, (LPARAM)!lpgw->hasgrid); if (!lpgw->hasgrid) { lpgw->hidegrid = FALSE; SendMessage(lpgw->hToolbar, TB_CHECKBUTTON, M_HIDEGRID, (LPARAM)FALSE); } for (i = 0; i < GPMAX(MAXPLOTSHIDE, lpgw->maxhideplots); i++) { if (i < lpgw->numplots) { if (i < MAXPLOTSHIDE) SendMessage(lpgw->hToolbar, TB_HIDEBUTTON, M_HIDEPLOT + i, (LPARAM)FALSE); } else { if (i < lpgw->maxhideplots) lpgw->hideplot[i] = FALSE; if (i < MAXPLOTSHIDE) { SendMessage(lpgw->hToolbar, TB_HIDEBUTTON, M_HIDEPLOT + i, (LPARAM)TRUE); SendMessage(lpgw->hToolbar, TB_CHECKBUTTON, M_HIDEPLOT + i, (LPARAM)FALSE); } } } } /* Draw the ruler. */ static void DrawRuler (LPGW lpgw) { HDC hdc; int iOldRop; RECT rc; long rx, ry; if (!ruler.on || ruler.x < 0) return; hdc = GetDC(lpgw->hWndGraph); GetPlotRect(lpgw, &rc); rx = MulDiv(ruler.x, rc.right - rc.left, lpgw->xmax); ry = rc.bottom - MulDiv(ruler.y, rc.bottom - rc.top, lpgw->ymax); iOldRop = SetROP2(hdc, R2_NOT); MoveTo(hdc, rc.left, ry); LineTo(hdc, rc.right, ry); MoveTo(hdc, rx, rc.top); LineTo(hdc, rx, rc.bottom); SetROP2(hdc, iOldRop); ReleaseDC(lpgw->hWndGraph, hdc); } /* Draw the ruler line to cursor position. */ static void DrawRulerLineTo (LPGW lpgw) { HDC hdc; int iOldRop; RECT rc; long rx, ry, rlx, rly; if (!ruler.on || !ruler_lineto.on || ruler.x < 0 || ruler_lineto.x < 0) return; hdc = GetDC(lpgw->hWndGraph); GetPlotRect(lpgw, &rc); rx = MulDiv(ruler.x, rc.right - rc.left, lpgw->xmax); ry = rc.bottom - MulDiv(ruler.y, rc.bottom - rc.top, lpgw->ymax); rlx = MulDiv(ruler_lineto.x, rc.right - rc.left, lpgw->xmax); rly = rc.bottom - MulDiv(ruler_lineto.y, rc.bottom - rc.top, lpgw->ymax); iOldRop = SetROP2(hdc, R2_NOT); MoveTo(hdc, rx, ry); LineTo(hdc, rlx, rly); SetROP2(hdc, iOldRop); ReleaseDC(lpgw->hWndGraph, hdc); } /* Draw the zoom box. */ static void DrawZoomBox (LPGW lpgw) { HDC hdc; long fx, fy, tx, ty, text_y; int OldROP2; RECT rc; HPEN OldPen; if (!zoombox.on) return; hdc = GetDC(lpgw->hWndGraph); GetPlotRect(lpgw, &rc); fx = MulDiv(zoombox.from.x, rc.right - rc.left, lpgw->xmax); fy = rc.bottom - MulDiv(zoombox.from.y, rc.bottom - rc.top, lpgw->ymax); tx = MulDiv(zoombox.to.x, rc.right - rc.left, lpgw->xmax); ty = rc.bottom - MulDiv(zoombox.to.y, rc.bottom - rc.top, lpgw->ymax); text_y = MulDiv(lpgw->vchar, rc.bottom - rc.top, lpgw->ymax); OldROP2 = SetROP2(hdc, R2_NOTXORPEN); OldPen = SelectObject(hdc, CreatePenIndirect( (lpgw->color ? lpgw->colorpen : lpgw->monopen) + 1)); Rectangle(hdc, fx, fy, tx, ty); DeleteObject(SelectObject(hdc, OldPen)); SetROP2(hdc, OldROP2); ReleaseDC(lpgw->hWndGraph, hdc); if (zoombox.text1) { char *separator = strchr(zoombox.text1, '\r'); if (separator) { Draw_XOR_Text(lpgw, zoombox.text1, separator - zoombox.text1, fx, fy); Draw_XOR_Text(lpgw, separator + 1, strlen(separator + 1), fx, fy + text_y); } else { Draw_XOR_Text(lpgw, zoombox.text1, strlen(zoombox.text1), fx, fy + lpgw->vchar / 2); } } if (zoombox.text2) { char *separator = strchr(zoombox.text2, '\r'); if (separator) { Draw_XOR_Text(lpgw, zoombox.text2, separator - zoombox.text2, tx, ty); Draw_XOR_Text(lpgw, separator + 1, strlen(separator + 1), tx, ty + text_y); } else { Draw_XOR_Text(lpgw, zoombox.text2, strlen(zoombox.text2), tx, ty + lpgw->vchar / 2); } } } #endif /* USE_MOUSE */ /* eof wgraph.c */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wgnuplot.mnu������������������������������������������������������������������0000644�0004711�0000144�00000035302�11544425623�014126� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������; Menu file for Windows gnuplot ; Roger Hadgraft, 26-5-92 ; Russell Lang, 30 Nov 1992 ; Modified for 4.0, John Bollinger, 31 Dec 2002 [Menu] &File &Open ... load '[OPEN]load[EOS]*.plt[EOS]'{ENTER} &Save ... save '[SAVE]save[EOS]*.plt[EOS]'{ENTER} &Demos ... load '[OPEN]load[EOS]*.dem[EOS]'{ENTER} -- &Change Directory ... cd '[DIRECTORY]New directory?[EOS]'{ENTER} show Current &Directory pwd{ENTER} -- O&utput ... set output "[INPUT]Output filename?[EOS]"{ENTER} &Printer Output set output "PRN"{ENTER} &Window Output set output{ENTER}set terminal win{ENTER} Show Output show output{ENTER} Ou&tput Device ... set terminal [INPUT]Terminal type?{ENTER} Show Output Devices set terminal{ENTER}show terminal{ENTER} -- [Menu] History Previous command ^P {^P} Next command ^N {^N} -- Back one character ^B {^B} Forward one character ^F {^F} -- Beginning of the line ^A {^A} End of the line ^E {^E} -- Delete previous character ^H {^H} Delete current character ^D {^D} Delete last word ^W {^W} Delete to end of line ^K {^K} Delete entire line ^U {^U} -- Redraw the line ^L {^L} [EndMenu] open DOS window shell{ENTER} run DOS command ... ![INPUT]DOS command?{ENTER} -- E&xit quit{ENTER} [EndMenu] [Menu] &Plot Plot plot 3D Plot splot Replot replot{ENTER} Clear device clear{ENTER} -- Simple Range [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]] [EOS] Named Range [[INPUT]Variable name?[EOS]=[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]] [EOS] -- Data filename ... '[OPEN]Open[EOS]*.dat[EOS]' [EOS] using x,y columns using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS] [EOS] using x,y,ydelta columns using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS]:[INPUT]Ydelta column?[EOS] [EOS] using x,y,ylow,yhigh columns using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS]:[INPUT]Ylow column?[EOS]:[INPUT]Yhigh column?[EOS] [EOS] -- [Menu] with Style (simple) Lines with lines Points with points Lines and Points with linespoints Impulses with impulses Dots with dots Steps with steps Fsteps with fsteps Histeps with histeps [EndMenu] [Menu] with Style (compound) Error Bars with errorbars X Error Bars with xerrorbars Y Error Bars with yerrorbars XY Error Bars with xyerrorbars Error Lines with errorlines X Error Lines with xerrorlines Y Error Lines with yerrorlines XY Error Lines with xyerrorlines Boxes with boxes Filled Curves with filledcurves Box Error Bars with boxerrorbars Box XY Error Bars with boxxyerrorbars Finance Bars with financebars Candlesticks with candlesticks [EndMenu] [EndMenu] [Menu] &Expressions Evaluate print Complex number ... {[INPUT]Real part?[EOS],[INPUT]Imaginary part?[EOS]} [Menu] Unary Minus -a -[INPUT]Arg Plus +a +[INPUT]Arg One's compliment ~a ~[INPUT]Arg Logcial negation !a ![INPUT]Arg Factorial a! [INPUT]Arg[EOS]! [EndMenu] [Menu] Binary Exponentiation ** ** Multiply * * Divide / / Add + + Subtract - - -- Modulo % % [EndMenu] [Menu] Logical Equality == == Inequality != != -- less than < < less than or equal <= <= greater than > > greater than or equal >= >= -- Bitwise AND & & Bitwise exclusive OR ^ ^ Bitwise inclusive OR | | -- Logical AND && && Logical OR || || -- Ternary operator a?b:c [INPUT]First arg[EOS]?[INPUT]Second arg[EOS]:[INPUT]Third arg[EOS] [EndMenu] [EndMenu] [Menu] Fu&nctions [Menu] Elementary random number rand([INPUT]Argument[EOS]) absolute value abs([INPUT]Argument[EOS]) sign sgn([INPUT]Argument[EOS]) -- ceiling ceil([INPUT]Argument[EOS]) floor floor([INPUT]Argument[EOS]) integer int([INPUT]Argument[EOS]) -- square root sqrt([INPUT]Argument[EOS]) exponent exp([INPUT]Argument[EOS]) logarithm (e) log([INPUT]Argument[EOS]) logarithm (10) log10([INPUT]Argument[EOS]) -- cosine cos([INPUT]Argument[EOS]) sine sin([INPUT]Argument[EOS]) tangent tan([INPUT]Argument[EOS]) -- arc cosine acos([INPUT]Argument[EOS]) arc sine asin([INPUT]Argument[EOS]) arc tangent atan([INPUT]Argument[EOS]) arc tangent 2 atan2([INPUT]Argument[EOS]) -- hyperbolic cosine cosh([INPUT]Argument[EOS]) hyperbolic sine sinh([INPUT]Argument[EOS]) hyperbolic tangent tanh([INPUT]Argument[EOS]) -- imaginary imag([INPUT]Argument[EOS]) real real([INPUT]Argument[EOS]) arg arg([INPUT]Argument[EOS]) [EndMenu] [Menu] Special error erf([INPUT]Argument[EOS]) error c erfc([INPUT]Argument[EOS]) inv error inverf([INPUT]Argument[EOS]) -- gamma gamma([INPUT]Argument[EOS]) igamma igamma([INPUT]First argument[EOS],[INPUT]Second argument[EOS]) lgamma lgamma([INPUT]Argument[EOS]) -- ibeta ibeta([INPUT]First argument[EOS],[INPUT]Second argument[EOS],[INPUT]Third argument[EOS]) -- bessel j0 besj0([INPUT]Argument[EOS]) bessel j1 besj1([INPUT]Argument[EOS]) bessel y0 besy0([INPUT]Argument[EOS]) bessel y1 besy1([INPUT]Argument[EOS]) -- lambertw lambertw([INPUT]Argument[EOS]) [EndMenu] [Menu] Statistical normal norm([INPUT]Argument[EOS]) inverse normal invnorm([INPUT]Argument[EOS]) [EndMenu] -- Define User Function ... [INPUT]Name for function?[EOS][INPUT]Variable/s, eg. (a,b) ?[EOS]= Show User Functions show functions{ENTER} -- Define User Variable ... [INPUT]Name for variable?[EOS]=[INPUT]Value, eg. 9.81 ?{ENTER} Show User Variables show variables{ENTER} -- x Dummy variable set dummy [INPUT]Variable name?{ENTER} x,y Dummy variables set dummy [INPUT]Variable names (eg. u,v)?{ENTER} Show Dummy variables show dummy{ENTER} [EndMenu] [Menu] &General Border on set border{ENTER} Border off unset border{ENTER} Show Border show border{ENTER} -- Box width set boxwidth [INPUT]Box Width?{ENTER} Auto Box Width set boxwidth{ENTER} Show Box width show boxwidth{ENTER} -- Show Line Types test{ENTER} -- [Menu] Parametric Set Parametric set parametric{ENTER} Not Parametric unset parametric{ENTER} Show Parametric show parametric{ENTER} -- t Range set trange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} u Range set urange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} v Range set vrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} [EndMenu] -- [Menu] Clipping Clip near points set clip points{ENTER} Clip one point set clip one{ENTER} Clip two points set clip two{ENTER} No Clipping unset clip{ENTER} Show Clip type show clip{ENTER} [EndMenu] -- [Menu] Polar Polar set polar{ENTER} Not Polar unset polar{ENTER} Show Polar show polar{ENTER} Radial Range set rrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} Angles in Degrees set angles degrees{ENTER} Angles in Radians set angles radians{ENTER} Show Angle units show angles{ENTER} [EndMenu] -- Set Plot Size set size [INPUT]Xscale?[EOS],[INPUT]Yscale?{ENTER} Show Plot Size show size{ENTER} -- Sampling Rate set sample [INPUT]Sampling rate (default=100)?{ENTER} Show Sampling Rate show sample{ENTER} [EndMenu] [Menu] &Axes Autoscale xy set autoscale [INPUT]Which axes (eg. xy)?{ENTER} No Autoscale xy unset autoscale [INPUT]Which axes (eg. xy)?{ENTER} Show Autoscale show autoscale{ENTER} -- Logscale xyz set logscale [INPUT]Which axes (eg. xy)?{ENTER} No Logscale xyz unset logscale [INPUT]Which axes (eg. xy)?{ENTER} Show Logscale show logscale{ENTER} -- [Menu] Tics Tic format string set format [INPUT]Axes?[EOS] "[INPUT]Format string?[EOS]"{ENTER} Tic marks format show format{ENTER} -- Inward facing tics (default) set tics in{ENTER} Outward facing tics set tics out{ENTER} Show tics show tics{ENTER} -- Tics level set ticslevel [INPUT]Level (default=0.5)?{ENTER} -- Tic interval set [INPUT]Axis: x, y or z ?[EOS]tics [INPUT]Start, Increment, End (eg. 0,0.5,10) ?{ENTER} -- Tic labels start set [INPUT]Axis: x, y or z ?[EOS]tics ("[INPUT]Label text?[EOS]" [INPUT]Position?[EOS] another Tic label ,"[INPUT]Label text?[EOS]" [INPUT]Position?[EOS] Tic labels finish ){ENTER} [EndMenu] -- X Range set xrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} Y Range set yrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} Z Range set zrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER} -- X Label set xlabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER} Y Label set ylabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER} Z Label set zlabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER} Show axis Labels show xlabel{ENTER}show ylabel{ENTER}show zlabel{ENTER} -- No X zero axis unset xzeroaxis{ENTER} No Y zero axis unset yzeroaxis{ENTER} X,Y zero axes on set zeroaxis{ENTER} Show zero axis status show zeroaxis{ENTER} [EndMenu] [Menu] &Chart Grid on set grid{ENTER} Grid off unset grid{ENTER} Show Grid show grid{ENTER} -- Add Arrow set arrow [INPUT]Tag (1-99)?[EOS] from [INPUT]From coordinate?[EOS] to [INPUT]To coordinate?{ENTER} Remove arrow unset arrow [INPUT]Tag (1-99)?{ENTER} Show Arrows show arrow{ENTER} -- Add Label set label [INPUT]Tag?[EOS] "[INPUT]Label?[EOS]" at [INPUT]Coordinate?[EOS] [INPUT]Justification (l,c,r)?{ENTER} Remove Label unset label [INPUT]Tag?{ENTER} Show Labels show label{ENTER} -- Set Title set title "[INPUT]Title text?[EOS]" [INPUT]X position, Y position (eg. 2,4)?{ENTER} Show Title show title{ENTER} -- Key (legend) position set key [INPUT]Key position?{ENTER} Default Key position set key{ENTER} No Key unset key{ENTER} Show Key position show key{ENTER} -- Offsets set offsets [INPUT]Offsets left,right,top,bottom ?{ENTER} Show Offsets show offsets{ENTER} -- Time location set time [INPUT]Location (eg. 1,1)?{ENTER} No Time unset time{ENTER} Show Time Location show time{ENTER} [EndMenu] [Menu] &Styles [Menu] Data Style Lines set style data lines{ENTER} Points set style data points{ENTER} Lines + Points set style data linespoints{ENTER} Dots set style data dots{ENTER} Impulses set style data impulses{ENTER} -- Error Bars set style data errorbars{ENTER} Boxes set style data boxes{ENTER} Box Error Bars set style data boxerrorbars{ENTER} -- Candlesticks set style data candlesticks{ENTER} Finance Bars set style data financebars{ENTER} [EndMenu] Show Data Style show style data{ENTER} Clear Data Style unset style data{ENTER} -- [Menu] Function Style Lines set style function lines{ENTER} Points set style function points{ENTER} Lines + Points set style function linespoints{ENTER} Dots set style function dots{ENTER} Impulses set style function impulses{ENTER} -- Error Bars set style function errorbars{ENTER} Boxes set style function boxes{ENTER} Box Error Bars set style function boxerrorbars{ENTER} -- Candlesticks set style function candlesticks{ENTER} Finance Bars set style function financebars{ENTER} [EndMenu] Show Function Style show style function{ENTER} Clear Function Style unset style function{ENTER} -- [Menu] Arrow Style Head set style arrow [INPUT]Arrow number?[EOS] head{ENTER} Heads set style arrow [INPUT]Arrow number?[EOS] heads{ENTER} No Heads set style arrow [INPUT]Arrow number?[EOS] nohead{ENTER} [EndMenu] Show Arrow Style show style arrow [INPUT]Arrow number? {ENTER} Clear Arrow Style unset style arrow [INPUT]Arrow number? {ENTER} -- [Menu] Fill Style Empty set style fill empty{ENTER} Solid set style fill solid [INPUT]Density?{ENTER} Pattern set style fill pattern [INPUT]Pattern number?{ENTER} Border set style fill border [INPUT]Line Type?{ENTER} No Border set style fill noborder{ENTER} [EndMenu] Show Fill Style show style fill{ENTER} Clear Fill Style unset style fill{ENTER} -- [Menu] Line Style Line Type set style linetype [INPUT]Line Type?{ENTER} Line Width set style linewidth [INPUT]Line Width?{ENTER} Point Type set style pointtype [INPUT]Point Type?{ENTER} Point Size set style pointsize [INPUT]Point Size?{ENTER} ; Palette ; set style line{ENTER} [EndMenu] Show Line Style show style line{ENTER} Clear Line Style unset style line{ENTER} [EndMenu] [Menu] &3D [Menu] Contours Linear Contours set cntrparam linear{ENTER} Cubic Spline Contours set cntrparam cubicspline{ENTER} B-spline Contours set cntrparam bspline{ENTER} Number of Contours set cntrparam levels [INPUT]How many contours?{ENTER} Points for Contours set cntrparam points [INPUT]How many points for the contours?{ENTER} Order of B-splines set cntrparam order [INPUT]Order of B-splines (2-10)?{ENTER} -- Contours on Base set contour base{ENTER} Contours on Surfaces set contour surface{ENTER} Contours on Both set contour both{ENTER} No Contours unset contour{ENTER} Show Contour show contour{ENTER} -- Number of Isosamples set isosamples [INPUT]Number of isosamples?{ENTER} Show Isosamples show isosamples{ENTER} [EndMenu] -- Cartesian Mapping set mapping cartesian{ENTER} Spherical Mapping set mapping spherical{ENTER} Cylindrical Mapping set mapping cylindrical{ENTER} Show Mapping show mapping{ENTER} -- Hidden line removal set hidden3d{ENTER} No Hidden line removal unset hidden3d{ENTER} Show Hidden line removal show hidden3d{ENTER} -- Display Surface mesh set surface{ENTER} No Surface mesh unset surface{ENTER} Show Surface status show surface{ENTER} -- Set View set view [INPUT]X rotation (degrees)?[EOS],[INPUT]Z rotation?[EOS],[INPUT]Scale?[EOS],[INPUT]Z scale?{ENTER} Show View show view{ENTER} [EndMenu] [Menu] &Help &Index help{ENTER} Introduction help introduction{ENTER} &Topic help [INPUT]Help Topic?{ENTER} &Windows help windows{ENTER} -- &About [ABOUT] [EndMenu] ; now some buttons ; a number after a semicolon in the title string is interpreted as icon index ; see the article "Toolbar Standard Button Image Index Values" on MSDN ; http://msdn.microsoft.com/en-us/library/bb760433%28v=vs.85%29.aspx [Button] Replot;4 replot{ENTER} [Button] Open;7 load '[OPEN]load[EOS]*.plt[EOS]'{ENTER} [Button] Save;8 save '[SAVE]save[EOS]*.plt[EOS]'{ENTER} [Button] ChDir;31 cd '[DIRECTORY]New directory?[EOS]'{ENTER} [Button] Print;14 set terminal [INPUT]Terminal type?{ENTER}set output "PRN"{ENTER}replot{ENTER}set terminal win{ENTER}set output{ENTER} [Button] PrtSc;14 screendump{ENTER} [Button] Prev;15 {^P} [Button] Next;16 {^N} [Button] Options;10 [OPTIONS] ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wgnuplot.rc�������������������������������������������������������������������0000644�0004711�0000144�00000012530�11563274466�013741� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#define WINVER 0x0410 #include <windows.h> #include "wgnuplib.rc" #ifndef NO_MANIFEST CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "wgnuplot.exe.manifest" #endif #ifdef MSRC /* using Microsoft RC.EXE */ /* texticon.ico and grpicon.ico are created from the */ /* Borland ascii format icons below using geticon.c */ /* cl win\geticon.c * geticon win\wgnuplot.rc * rc -30 -k -dMSRC win\wgnuplot.rc wgnuplot.exe */ GRPICON ICON "grpicon.ico" TEXTICON ICON "texticon.ico" #else /* using Borland BRC.EXE */ GRPICON ICON BEGIN '00 00 01 00 01 00 20 20 10 00 00 00 00 00 E8 02' '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00' '00 00 01 00 04 00 00 00 00 00 80 02 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 80 00 00 80 00 00 00 80 80 00 80 00' '00 00 80 00 80 00 80 80 00 00 80 80 80 00 C0 C0' 'C0 00 00 00 FF 00 00 FF 00 00 00 FF FF 00 FF 00' '00 00 FF 00 FF 00 FF FF 00 00 FF FF FF 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 0F FC' 'FF 0F FF FF F8 FF FF FF F8 FF FF FF F8 F0 0F FF' 'CF 0F FF FF F8 FF FF FF F8 FF FF FF F8 90 0F FF' 'FC 0F FF FF F8 FF FF FF F8 FF FF FF F9 F0 0F FF' 'FF 0C FF FF F8 FF 9F FF F8 FF FF FF 98 F0 0F FF' 'FF 0F CF FF F8 99 F9 FF F8 FF FF F9 F8 F0 0F FF' 'FF 0F CF FF F9 FF FF 9F F8 FF FF 9F F8 F0 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 0F FF' 'FF 0F FC FF 98 FF FF F9 F8 FF F9 FF F8 F0 0F FF' 'FF 0F FF C9 F8 FF FF FF 98 FF 9F FF F8 F0 0F FF' 'AF 0F FF F9 F8 FF FF FF F9 F9 FF FF F8 F0 0F FA' 'FA 0F FF 9F C8 FF FF FF F9 9F CF FF F8 F0 0F AF' 'FF 0A F9 FF FC FF FF FF F8 9C FC FF F8 F0 0F AF' 'FF 0F AF FF F8 CF FF FF F8 FC FF CF F8 F0 0A FF' 'FF 0F AF FF F8 FC FF FF F8 CF FF FC F8 F0 0F FF' 'FF 09 FA FF F8 FF CF FF FC FF FF FF C8 F0 08 88' '89 08 88 A8 88 88 8C 88 C8 88 88 88 C8 80 0F FF' '9F 0F FF AF F8 FF FF CF C8 FF FF FF FC F0 0F FF' '9F 0F FF FA F8 FF AF FC F8 FF FF FF F8 C0 0F F9' 'FF 0F FF FF A8 FA FA FF F8 FF FF FF F8 F0 0F 9F' 'FF 0F FF FF A8 AF FA FF F8 FF FF FF F8 F0 0F 9F' 'FF 0F FF FF FA FF FF AF F8 FF FF FF F8 F0 09 FF' 'FF 0F FF FF F8 FF FF FA F8 FF FF FF F8 F0 0F FF' 'FF 0F FF FF F8 FF FF FA F8 FF FF FF F8 F0 0F FF' 'FF 0F FF FF F8 FF FF FF A8 FF FF FF F8 F0 08 88' '88 08 88 88 88 88 88 88 8A 88 88 88 88 80 0F FF' 'FF 0F FF FF F8 FF FF FF FA FF FF FF F8 F0 0F FF' 'FF 0F FF FF F8 FF FF FF F8 AF FF FF F8 F0 0F FF' 'FF 0F FF FF F8 FF FF FF F8 FA FF FF F8 F0 0F FF' 'FF 0F FF FF F8 FF FF FF F8 FA FF FF F8 F0 0F FF' 'FF 0F FF FF F8 FF FF FF F8 FF AF FF F8 F0 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00' END TEXTICON ICON BEGIN '00 00 01 00 01 00 20 20 10 00 00 00 00 00 E8 02' '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00' '00 00 01 00 04 00 00 00 00 00 80 02 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 80 00 00 80 00 00 00 80 80 00 80 00' '00 00 80 00 80 00 80 80 00 00 80 80 80 00 C0 C0' 'C0 00 00 00 FF 00 00 FF 00 00 00 FF FF 00 FF 00' '00 00 FF 00 FF 00 FF FF 00 00 FF FF FF 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 88' '88 88 88 88 88 88 88 88 88 88 88 88 88 80 08 88' '88 88 88 88 88 88 88 88 88 88 88 88 88 80 08 88' '88 88 88 88 88 88 88 88 88 88 88 88 88 80 08 88' '88 88 88 88 88 88 88 88 88 88 88 88 88 80 08 88' '88 88 88 88 88 88 88 88 88 88 88 88 88 80 08 88' '88 88 88 88 88 88 88 88 88 88 88 88 88 80 08 88' '88 88 88 88 88 88 88 88 88 88 88 88 88 80 08 00' '08 80 80 88 08 88 00 80 88 08 00 88 88 80 08 08' '08 80 80 88 08 88 08 88 00 88 80 88 88 80 08 88' '08 80 80 88 08 88 08 88 00 88 80 88 88 80 08 80' '08 80 80 08 08 88 08 80 88 08 80 88 88 80 08 00' '88 00 80 80 08 88 08 88 88 88 80 88 88 80 08 08' '88 88 88 88 88 88 08 88 88 88 80 88 88 80 08 08' '08 80 88 88 88 88 08 88 88 88 80 88 88 80 08 00' '08 88 88 88 88 88 00 88 88 88 00 88 88 80 08 88' '88 88 88 88 88 88 88 88 88 88 88 88 88 80 0F FF' 'FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0F FF' 'FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0F FF' 'FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0F 0F' 'FF FF F0 FF 00 0F FF 0F FF FF FF FF FF F0 0F 0F' 'FF FF F0 F0 FF F0 F0 FF FF FF FF FF FF F0 0F 0F' 'FF FF F0 F0 FF F0 F0 FF FF FF FF FF FF F0 0F 0F' 'FF FF F0 F0 FF F0 F0 FF FF FF FF FF FF F0 0F 00' '00 0F F0 F0 FF F0 F0 FF FF FF FF FF FF F0 0F 0F' 'FF F0 F0 FF 00 0F F0 0F FF FF FF FF FF F0 0F 0F' 'FF F0 F0 FF FF FF F0 FF FF FF FF FF FF F0 0F 0F' 'FF F0 F0 FF FF FF F0 FF FF FF FF FF FF F0 0F 00' '00 0F F0 FF FF FF FF FF FF FF FF FF FF F0 0F FF' 'FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0F FF' 'FF FF FF FF FF FF FF FF FF FF FF FF FF F0 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00' END #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wresourc.h��������������������������������������������������������������������0000644�0004711�0000144�00000006720�11661406714�013552� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: wresourc.h,v 1.17 2011/11/18 07:48:28 markisch Exp $ */ /* GNUPLOT - win/wresourc.h */ /*[ * Copyright 1992 - 1993, 1998, 2004 Maurice Castro, Russell Lang * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Maurice Castro * Russell Lang */ /* This contains items internal to wgnuplot.dll that are used by the Resource Compiler */ /* wmenu.c */ #define ID_PROMPT 300 #define ID_ANSWER 302 #define NUMMENU 512 #define ID_TOOLBAR NUMMENU+42 #define ID_TEXTSTATUS NUMMENU+43 #define ID_GRAPHSTATUS NUMMENU+44 /* wpause.c */ /* wtext.c */ #define AB_ICON 250 #define AB_TEXT1 251 #define AB_TEXT2 252 #define AB_TEXT3 253 /* wgraph.c */ #define M_GRAPH_TO_TOP NUMMENU+1 #define M_CHOOSE_FONT NUMMENU+2 #define M_BACKGROUND NUMMENU+3 #define M_COLOR NUMMENU+4 #define M_COPY_CLIP NUMMENU+5 #define M_LINESTYLE NUMMENU+6 #define M_PRINT NUMMENU+7 #define M_WRITEINI NUMMENU+8 #define M_PASTE NUMMENU+9 #define M_ABOUT NUMMENU+10 #define M_REBUILDTOOLS NUMMENU+11 #define M_COMMANDLINE NUMMENU+12 /* wtext.c */ #define M_SYSCOLORS NUMMENU+13 #define M_WRAP NUMMENU+17 /* wgraph.c */ #define M_SAVE_AS_EMF NUMMENU+14 #define M_DOUBLEBUFFER NUMMENU+15 #define M_OVERSAMPLE NUMMENU+16 #define M_ANTIALIASING NUMMENU+17 #define M_POLYAA NUMMENU+18 #define M_PATTERNAA NUMMENU+19 #define M_HIDEGRID NUMMENU+20 #define M_HIDEPLOT NUMMENU+21 /* Warning: need MAXPLOTSHIDE slots */ /* wprinter.c */ #define PSIZE_SBOX 100 #define PSIZE_DEF 101 #define PSIZE_OTHER 102 #define PSIZE_DEFX 103 #define PSIZE_DEFY 104 #define PSIZE_X 105 #define PSIZE_Y 106 #define PSIZE_OFFBOX 107 #define PSIZE_OFFX 108 #define PSIZE_OFFY 109 #define CANCEL_PCDONE 120 /* wgraph.c */ /* line style dialog box */ #define LS_LINENUM 200 #define LS_MONOBOX 201 #define LS_COLORBOX 202 #define LS_MONOSTYLE 203 #define LS_MONOWIDTH 204 #define LS_CHOOSECOLOR 205 #define LS_COLORSAMPLE 206 #define LS_COLORSTYLE 207 #define LS_COLORWIDTH 208 #define LS_DEFAULT 209 /* HBB 20010208: cursors for mouse-enabled wgnuplot */ #define IDC_SCALING 222 #define IDC_ROTATING 223 ������������������������������������������������gnuplot-4.6.4/src/win/wgnuplot.exe.manifest���������������������������������������������������������0000644�0004711�0000144�00000001252�11537513675�015721� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="4.5.0.0" processorArchitecture="X86" name="gnuplot development team.gnuplot.wgnuplot" type="win32" /> <description>Famous scientific plotting package.</description> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency> </assembly> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wmenu.c�����������������������������������������������������������������������0000644�0004711�0000144�00000075077�11653744263�013047� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: wmenu.c,v 1.22 2011/11/01 10:23:47 markisch Exp $"); } #endif /* GNUPLOT - win/wmenu.c */ /*[ * Copyright 1992, 1993, 1998, 2004 Maurice Castro, Russell Lang * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Maurice Castro * Russell Lang * */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #define STRICT #define COBJMACROS /* required for COMCTRL32 5.81 or later */ #define _WIN32_IE 0x0501 #include <windows.h> #include <windowsx.h> #include <commdlg.h> #include <commctrl.h> #include <shlobj.h> #include <winuser.h> #include <shlwapi.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include "wgnuplib.h" #include "wresourc.h" #include "stdfn.h" #include "wcommon.h" /* Choose between the directory dialog of the windows shell and a modified version of the "file open" dialog */ #define SHELL_DIR_DIALOG BOOL CALLBACK InputBoxDlgProc(HWND, UINT, WPARAM, LPARAM); /* limits */ #define MAXSTR 255 #define MACROLEN 10000 /* #define NUMMENU 256 defined in wresourc.h */ #define MENUDEPTH 3 /* menu tokens */ #define CMDMIN 129 #define INPUT 129 #define EOS 130 #define OPEN 131 #define SAVE 132 #define DIRECTORY 133 #define OPTIONS 134 #define ABOUT 135 #define CMDMAX 135 char * keyword[] = { "[INPUT]", "[EOS]", "[OPEN]", "[SAVE]", "[DIRECTORY]", "[OPTIONS]", "[ABOUT]", "{ENTER}", "{ESC}", "{TAB}", "{^A}", "{^B}", "{^C}", "{^D}", "{^E}", "{^F}", "{^G}", "{^H}", "{^I}", "{^J}", "{^K}", "{^L}", "{^M}", "{^N}", "{^O}", "{^P}", "{^Q}", "{^R}", "{^S}", "{^T}", "{^U}", "{^V}", "{^W}", "{^X}", "{^Y}", "{^Z}", "{^[}", "{^\\}", "{^]}", "{^^}", "{^_}", NULL}; BYTE keyeq[] = { INPUT, EOS, OPEN, SAVE, DIRECTORY, OPTIONS, ABOUT, 13, 27, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 0}; #define GBUFSIZE 512 typedef struct tagGFILE { HFILE hfile; char getbuf[GBUFSIZE]; int getnext; int getleft; } GFILE; static GFILE * Gfopen(LPSTR lpszFileName, int fnOpenMode); static void Gfclose(GFILE * gfile); static int Gfgets(LPSTR lp, int size, GFILE *gfile); static int GetLine(char * buffer, int len, GFILE *gfile); static void LeftJustify(char *d, char *s); static BYTE MacroCommand(LPTW lptw, UINT m); static void TranslateMacro(char *string); #ifdef SHELL_DIR_DIALOG /* This is missing in MingW 2.95 */ #ifndef BIF_EDITBOX # define BIF_EDITBOX 0x0010 #endif /* Note: this code has been bluntly copied from MSDN article KB179378 "How To Browse for Folders from the Current Directory" */ INT CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) { TCHAR szDir[MAX_PATH]; switch (uMsg) { case BFFM_INITIALIZED: if (GetCurrentDirectory(sizeof(szDir)/sizeof(TCHAR), szDir)) { /* WParam is TRUE since you are passing a path. It would be FALSE if you were passing a pidl. */ SendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)szDir); } break; case BFFM_SELCHANGED: /* Set the status window to the currently selected path. */ if (SHGetPathFromIDList((LPITEMIDLIST) lp, szDir)) { SendMessage(hwnd, BFFM_SETSTATUSTEXT, 0, (LPARAM)szDir); } break; } return 0; } #else /* SHELL_DIR_DIALOG */ /* Yes, you can use Windows shell functions even without C++ ! These functions are not defined in shlobj.h, so we do it ourselves: */ #ifndef IShellFolder_BindToObject #define IShellFolder_BindToObject(This,pidl,pbcReserved,riid,ppvOut) \ (This)->lpVtbl -> BindToObject(This,pidl,pbcReserved,riid,ppvOut) #endif #ifndef IShellFolder_GetDisplayNameOf #define IShellFolder_GetDisplayNameOf(This,pidl,uFlags,lpName) \ (This)->lpVtbl -> GetDisplayNameOf(This,pidl,uFlags,lpName) #endif /* My windows header files do not define these: */ #ifndef WC_NO_BEST_FIT_CHARS #define WC_NO_BEST_FIT_CHARS 0x00000400 /* do not use best fit chars */ #endif /* We really need this struct which is used by newer Windows versions */ typedef struct tagOFN { DWORD lStructSize; HWND hwndOwner; HINSTANCE hInstance; LPCTSTR lpstrFilter; LPTSTR lpstrCustomFilter; DWORD nMaxCustFilter; DWORD nFilterIndex; LPTSTR lpstrFile; DWORD nMaxFile; LPTSTR lpstrFileTitle; DWORD nMaxFileTitle; LPCTSTR lpstrInitialDir; LPCTSTR lpstrTitle; DWORD Flags; WORD nFileOffset; WORD nFileExtension; LPCTSTR lpstrDefExt; LPARAM lCustData; LPOFNHOOKPROC lpfnHook; LPCTSTR lpTemplateName; /* #if (_WIN32_WINNT >= 0x0500) */ void * pvReserved; DWORD dwReserved; DWORD FlagsEx; /* #endif // (_WIN32_WINNT >= 0x0500) */ } NEW_OPENFILENAME, *NEW_LPOPENFILENAME; UINT_PTR CALLBACK OFNHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) { switch(uiMsg) { case WM_INITDIALOG: { HWND parent; parent = GetParent(hdlg); /* Hint: The control codes for this can be found on MSDN */ /* Hide "file type" display */ CommDlg_OpenSave_HideControl(parent, stc2); CommDlg_OpenSave_HideControl(parent, cmb1); /* Hide "current file" display */ CommDlg_OpenSave_HideControl(parent, stc3); CommDlg_OpenSave_HideControl(parent, cmb13); break; } case WM_NOTIFY: { LPOFNOTIFY lpOfNotify = (LPOFNOTIFY) lParam; switch(lpOfNotify->hdr.code) { #if 0 /* Well, this event is not called for ordinary files (sigh) */ case CDN_INCLUDEITEM: return 0; break; #endif /* But there's a solution which can be found here: http://msdn.microsoft.com/msdnmag/issues/03/10/CQA/default.aspx http://msdn.microsoft.com/msdnmag/issues/03/09/CQA/ It's C++ though (sigh again), so here is its analogue in plain C: */ /* case CDN_SELCHANGE: */ case CDN_FOLDERCHANGE: { HWND parent, hlst2, list; LPCITEMIDLIST pidlFolder; LPMALLOC pMalloc; signed int count, i; unsigned len; /* find listbox control */ parent = GetParent(hdlg); hlst2 = GetDlgItem(parent, lst2); list = GetDlgItem(hlst2, 1); SHGetMalloc(&pMalloc); /* First, get PIDL of current folder by sending CDM_GETFOLDERIDLIST get length first, then allocate. */ len = CommDlg_OpenSave_GetFolderIDList(parent, 0, 0); if (len>0) { LPSHELLFOLDER ishDesk; LPSHELLFOLDER ishFolder; HRESULT hr; STRRET str; pidlFolder = IMalloc_Alloc(pMalloc, len+1); CommDlg_OpenSave_GetFolderIDList(parent, (WPARAM)(void*)pidlFolder, len); /* Now get IShellFolder for pidlFolder */ SHGetDesktopFolder(&ishDesk); hr = IShellFolder_BindToObject(ishDesk, pidlFolder, NULL, &IID_IShellFolder, &ishFolder); if (!SUCCEEDED(hr)) { ishFolder = ishDesk; } /* Enumerate listview items */ count = ListView_GetItemCount(list); for (i = count-1; i >= 0; i--) { const ULONG flags = SHGDN_NORMAL | SHGDN_FORPARSING; LVITEM lvitem; LPCITEMIDLIST pidl; #if 0 /* The normal code to retrieve the item's text is not very useful since user may select "hide common extensions" */ path = (char *)malloc(MAX_PATH+1); ListView_GetItemText(list, i, 0, path, MAX_PATH ); #endif /* The following code retrieves the real path of every item in any case */ /* Retrieve PIDL of current item */ ZeroMemory(&lvitem,sizeof(lvitem)); lvitem.iItem = i; lvitem.mask = LVIF_PARAM; ListView_GetItem(list, &lvitem); pidl = (LPCITEMIDLIST)lvitem.lParam; /* Finally, get the path name from pidlFolder */ str.uType = STRRET_WSTR; hr = IShellFolder_GetDisplayNameOf(ishFolder, pidl, flags, &str); if (SUCCEEDED(hr)) { struct _stat itemStat; char path[MAX_PATH+1]; /* (sigh) conversion would have been so easy... hr = StrRetToBuf( str, pidl, path, MAX_PATH); */ if (str.uType == STRRET_WSTR) { unsigned wlen = wcslen(str.pOleStr); wlen = WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, str.pOleStr, wlen+1, path, MAX_PATH, NULL, NULL); _wstat(str.pOleStr, &itemStat); /* Must free memory allocated by shell using shell's IMalloc */ IMalloc_Free(pMalloc, (LPVOID)str.pOleStr); } else if (str.uType == STRRET_CSTR) { strncpy(path, str.cStr, MAX_PATH); _stat(str.cStr, &itemStat); } else { /* this shouldn't happen */ path[0] = '\0'; } /* discard all non-directories from list */ if ((itemStat.st_mode & _S_IFDIR) == 0) { ListView_DeleteItem(list, i); } } } /* Enumerate listview items */ IMalloc_Free(pMalloc, (void*)pidlFolder); } IMalloc_Release(pMalloc); break; } /* CDN_FOLDERCHANGE */ } /* switch(hdr.code) */ break; } /* WM_NOTIFY */ }; /* switch(uiMsg) */ return 0; } #endif /* !SHELL_DIR_DIALOG */ BYTE MacroCommand(LPTW lptw, UINT m) { BYTE *s = lptw->lpmw->macro[m]; while (s && *s) { if ((*s >= CMDMIN) && (*s <= CMDMAX)) return *s; s++; } return 0; } /* Send a macro to the text window */ void SendMacro(LPTW lptw, UINT m) { BYTE *s; char *d; char *buf; BOOL flag=TRUE; int i; LPMW lpmw = lptw->lpmw; OPENFILENAME ofn; char *szTitle; char *szFile; char *szFilter; if ( (buf = LocalAllocPtr(LHND, MAXSTR+1)) == (char *)NULL ) return; if (m>=lpmw->nCountMenu) return; s = lpmw->macro[m]; d = buf; *d = '\0'; while (s && *s && (d-buf < MAXSTR)) { if (*s>=CMDMIN && *s<=CMDMAX) { switch (*s) { case SAVE: /* [SAVE] - get a save filename from a file list box */ case OPEN: /* [OPEN] - get a filename from a file list box */ { BOOL save; char cwd[MAX_PATH]; if ( (szTitle = LocalAllocPtr(LHND, MAXSTR+1)) == (char *)NULL ) return; if ( (szFile = LocalAllocPtr(LHND, MAXSTR+1)) == (char *)NULL ) return; if ( (szFilter = LocalAllocPtr(LHND, MAXSTR+1)) == (char *)NULL ) return; save = (*s==SAVE); s++; for(i=0; (*s >= 32 && *s <= 126); i++) szTitle[i] = *s++; /* get dialog box title */ szTitle[i]='\0'; s++; for(i=0; (*s >= 32 && *s <= 126); i++) szFile[i] = *s++; /* temporary copy of filter */ szFile[i++]='\0'; lstrcpy(szFilter,"Default ("); lstrcat(szFilter,szFile); lstrcat(szFilter,")"); i=lstrlen(szFilter); i++; /* move past NULL */ lstrcpy(szFilter+i,szFile); i+=lstrlen(szFilter+i); i++; /* move past NULL */ lstrcpy(szFilter+i,"All Files (*.*)"); i+=lstrlen(szFilter+i); i++; /* move past NULL */ lstrcpy(szFilter+i,"*.*"); i+=lstrlen(szFilter+i); i++; /* move past NULL */ szFilter[i++]='\0'; /* add a second NULL */ flag = 0; szFile[0] = '\0'; /* clear the structrure */ _fmemset(&ofn, 0, sizeof(OPENFILENAME)); ofn.lStructSize = sizeof(OPENFILENAME); ofn.hwndOwner = lptw->hWndParent; ofn.lpstrFilter = szFilter; ofn.nFilterIndex = 1; ofn.lpstrFile = szFile; ofn.nMaxFile = MAXSTR; ofn.lpstrFileTitle = szFile; ofn.nMaxFileTitle = MAXSTR; ofn.lpstrTitle = szTitle; /* Windows XP has it's very special meaning of 'default directory' */ /* (search for OPENFILENAME on MSDN). So we set it here explicitly: */ /* ofn.lpstrInitialDir = (LPSTR)NULL; */ _getcwd(cwd, sizeof(cwd)); ofn.lpstrInitialDir = cwd; ofn.Flags = OFN_SHOWHELP | OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; flag = (save ? GetSaveFileName(&ofn) : GetOpenFileName(&ofn)); if( flag ) { lpmw->nChar = lstrlen(ofn.lpstrFile); for (i=0; i<lpmw->nChar; i++) *d++=ofn.lpstrFile[i]; } LocalFreePtr((void NEAR *)szTitle); LocalFreePtr((void NEAR *)szFilter); LocalFreePtr((void NEAR *)szFile); } break; case INPUT: /* [INPUT] - input a string of characters */ s++; for(i=0; (*s >= 32 && *s <= 126); i++) lpmw->szPrompt[i] = *s++; lpmw->szPrompt[i]='\0'; flag = DialogBox( hdllInstance, "InputDlgBox", lptw->hWndParent, InputBoxDlgProc); if( flag ) { for (i=0; i<lpmw->nChar; i++) *d++ = lpmw->szAnswer[i]; } break; case DIRECTORY: /* [DIRECTORY] - show standard directory dialog */ { #ifdef SHELL_DIR_DIALOG BROWSEINFO bi; LPITEMIDLIST pidl; #else NEW_OPENFILENAME ofn; #endif /* allocate some space */ if ( (szTitle = LocalAllocPtr(LHND, MAXSTR+1)) == (char *)NULL ) return; /* get dialog box title */ s++; for(i=0; (*s >= 32 && *s <= 126); i++) szTitle[i] = *s++; szTitle[i] = '\0'; flag = 0; #ifdef SHELL_DIR_DIALOG /* Option 1: use the Shell's internal directory chooser */ /* Note: This code does not work NT 3.51 and Win32s Windows 95 has shell32.dll version 4.0, but does not have a version number, so this will return FALSE. */ /* Make sure that the installed shell version supports this approach */ if (GetDllVersion(TEXT("shell32.dll")) >= PACKVERSION(4,0)) { ZeroMemory(&bi,sizeof(bi)); bi.hwndOwner = lptw->hWndParent; bi.pidlRoot = NULL; bi.pszDisplayName = NULL; bi.lpszTitle = szTitle; /* BIF_NEWDIALOGSTYLE is supported by Win 2000 or later (Version 5.0)*/ bi.ulFlags = BIF_NEWDIALOGSTYLE | BIF_EDITBOX | BIF_STATUSTEXT | BIF_RETURNONLYFSDIRS | BIF_RETURNFSANCESTORS; bi.lpfn = BrowseCallbackProc; bi.lParam = 0; bi.iImage = 0; pidl = SHBrowseForFolder( &bi ); if( pidl != NULL ) { LPMALLOC pMalloc; HRESULT hr; char szPath[MAX_PATH]; unsigned int len; /* Convert the item ID list's binary representation into a file system path */ BOOL f = SHGetPathFromIDList(pidl, szPath); len = strlen( szPath ); flag = len > 0; if (flag) for (i=0; i<len; i++) *d++ = szPath[i]; /* Allocate a pointer to an IMalloc interface Get the address of our task allocator's IMalloc interface */ hr = SHGetMalloc(&pMalloc) ; /* Free the item ID list allocated by SHGetSpecialFolderLocation */ IMalloc_Free( pMalloc, pidl ); /* Free our task allocator */ IMalloc_Release( pMalloc ); } } #else /* SHELL_DIR_DIALOG */ /* Option 2: use (abuse ?) standard "file open" dialog and discard the filename from result, have all non-directory items removed. */ /* Note: This code does not work NT 3.51 and Win32s Windows 95 has shell32.dll version 4.0, but does not have a version number, so this will return FALSE. */ /* Make sure that the installed shell version supports this approach */ if (GetDllVersion(TEXT("shell32.dll")) >= PACKVERSION(4,0)) { /* copy current working directory to szFile */ if ( (szFile = LocalAllocPtr(LHND, MAX_PATH+1)) == (char *)NULL ) return; GP_GETCWD( szFile, MAX_PATH ); strcat( szFile, "\\*.*" ); ZeroMemory(&ofn,sizeof(ofn)); ofn.lStructSize = sizeof(ofn); ofn.hwndOwner = lptw->hWndParent; ofn.lpstrFilter = (LPSTR)NULL; ofn.nFilterIndex = 0; ofn.lpstrFile = szFile; ofn.nMaxFile = MAX_PATH; ofn.lpstrFileTitle = szFile; ofn.nMaxFileTitle = MAXSTR; ofn.lpstrTitle = szTitle; ofn.lpstrInitialDir = (LPSTR)NULL; ofn.Flags = OFN_PATHMUSTEXIST | OFN_NOVALIDATE | OFN_HIDEREADONLY | OFN_ENABLESIZING | OFN_EXPLORER | OFN_ENABLEHOOK; ofn.lpfnHook = OFNHookProc; flag = GetOpenFileName((LPOPENFILENAME)&ofn); if ((flag) && (ofn.nFileOffset >0)) { unsigned int len; /* strip filename from result */ len = ofn.nFileOffset - 1; ofn.lpstrFile[len] = '\0'; for (i=0; i<len; i++) *d++ = ofn.lpstrFile[i]; } LocalFreePtr((void NEAR *)szFile); } #endif /* !SHELL_DIR_DIALOG */ else { strcpy(lpmw->szPrompt, szTitle); flag = DialogBox( hdllInstance, "InputDlgBox", lptw->hWndParent, InputBoxDlgProc); if( flag ) { for (i=0; i<lpmw->nChar; i++) *d++ = lpmw->szAnswer[i]; } } LocalFreePtr((void NEAR *)szTitle); } break; case OPTIONS: { /* [OPTIONS] - open popup menu */ POINT pt; RECT rect; int index; s++; /* align popup with toolbar button */ index = lpmw->nButton - (lpmw->nCountMenu - m); if (SendMessage(lpmw->hToolbar, TB_GETITEMRECT, (WPARAM)index, (LPARAM)&rect)) { pt.x = rect.left; pt.y = rect.bottom + 1; ClientToScreen(lptw->hWndParent, &pt); } else { GetCursorPos(&pt); } TrackPopupMenu(lptw->hPopMenu, TPM_LEFTALIGN | TPM_TOPALIGN, pt.x, pt.y, 0, lptw->hWndParent, NULL); break; } case ABOUT: /* [ABOUT] - display About box */ s++; SendMessage(lptw->hWndText, WM_COMMAND, M_ABOUT, (LPARAM)0); break; case EOS: /* [EOS] - End Of String - do nothing */ default: s++; break; } if (!flag) { /* abort */ d = buf; s = (BYTE *)""; } } else { *d++ = *s++; } } *d = '\0'; if (buf[0]!='\0') { d = buf; while (*d) { SendMessage(lptw->hWndText,WM_CHAR,*d,1L); d++; } } } static GFILE * Gfopen(LPSTR lpszFileName, int fnOpenMode) { GFILE *gfile; gfile = (GFILE *)LocalAllocPtr(LHND, sizeof(GFILE)); if (!gfile) return NULL; gfile->hfile = _lopen(lpszFileName, fnOpenMode); if (gfile->hfile == HFILE_ERROR) { LocalFreePtr((void NEAR *)gfile); return NULL; } gfile->getleft = 0; gfile->getnext = 0; return gfile; } static void Gfclose(GFILE * gfile) { _lclose(gfile->hfile); LocalFreePtr((void NEAR *)gfile); return; } /* returns number of characters read */ static int Gfgets(LPSTR lp, int size, GFILE *gfile) { int i; int ch; for (i=0; i<size; i++) { if (gfile->getleft <= 0) { if ( (gfile->getleft = _lread(gfile->hfile, gfile->getbuf, GBUFSIZE)) == 0) break; gfile->getnext = 0; } ch = *lp++ = gfile->getbuf[gfile->getnext++]; gfile->getleft --; if (ch == '\r') { i--; lp--; } if (ch == '\n') { i++; break; } } if (i<size) *lp++ = '\0'; return i; } /* Get a line from the menu file */ /* Return number of lines read from file including comment lines */ static int GetLine(char * buffer, int len, GFILE *gfile) { BOOL status; int nLine = 0; status = (Gfgets(buffer,len,gfile) != 0); nLine++; while( status && ( buffer[0] == 0 || buffer[0] == '\n' || buffer[0] == ';' ) ) { /* blank line or comment - ignore */ status = (Gfgets(buffer,len,gfile) != 0); nLine++; } if (lstrlen(buffer)>0) buffer[lstrlen(buffer)-1] = '\0'; /* remove trailing \n */ if (!status) nLine = 0; /* zero lines if file error */ return nLine; } /* Left justify string */ static void LeftJustify(char *d, char *s) { while ( *s && (*s==' ' || *s=='\t') ) s++; /* skip over space */ do { *d++ = *s; } while (*s++); } /* Translate string to tokenized macro */ static void TranslateMacro(char *string) { int i, len; LPSTR ptr; for( i=0; keyword[i]!=(char *)NULL; i++ ) { if( (ptr = _fstrstr( string, keyword[i] )) != NULL ) { len = lstrlen( keyword[i] ); *ptr = keyeq[i]; lstrcpy( ptr+1, ptr+len ); i--; /* allows for more than one occurrence of keyword */ } } } /* Load Macros, and create Menu from Menu file */ void LoadMacros(LPTW lptw) { GFILE *menufile; BYTE *macroptr; char *buf; int nMenuLevel; HMENU hMenu[MENUDEPTH+1]; LPMW lpmw; int nLine = 1; int nInc; HGLOBAL hmacro, hmacrobuf; int i; RECT rect; char *ButtonText[BUTTONMAX]; int ButtonIcon[BUTTONMAX]; lpmw = lptw->lpmw; /* mark all buffers and menu file as unused */ buf = (char *)NULL; hmacro = 0; hmacrobuf = 0; lpmw->macro = (BYTE **)NULL; lpmw->macrobuf = (BYTE *)NULL; lpmw->szPrompt = (char *)NULL; lpmw->szAnswer = (char *)NULL; menufile = (GFILE *)NULL; /* open menu file */ if ((menufile=Gfopen(lpmw->szMenuName,OF_READ)) == (GFILE *)NULL) goto errorcleanup; /* allocate buffers */ if ((buf = LocalAllocPtr(LHND, MAXSTR)) == (char *)NULL) goto nomemory; hmacro = GlobalAlloc(GHND,(NUMMENU) * sizeof(BYTE *)); if ((lpmw->macro = (BYTE **)GlobalLock(hmacro)) == (BYTE **)NULL) goto nomemory; hmacrobuf = GlobalAlloc(GHND, MACROLEN); if ((lpmw->macrobuf = (BYTE *)GlobalLock(hmacrobuf)) == (BYTE *)NULL) goto nomemory; if ((lpmw->szPrompt = LocalAllocPtr(LHND, MAXSTR)) == (char *)NULL) goto nomemory; if ((lpmw->szAnswer = LocalAllocPtr(LHND, MAXSTR)) == (char *)NULL) goto nomemory; macroptr = lpmw->macrobuf; lpmw->nButton = 0; lpmw->nCountMenu = 0; lpmw->hMenu = hMenu[0] = CreateMenu(); nMenuLevel = 0; while ((nInc = GetLine(buf,MAXSTR,menufile)) != 0) { nLine += nInc; LeftJustify(buf,buf); if (buf[0]=='\0') { /* ignore blank lines */ } else if (!lstrcmpi(buf,"[Menu]")) { /* new menu */ if (!(nInc = GetLine(buf,MAXSTR,menufile))) { nLine += nInc; wsprintf(buf,"Problem on line %d of %s\n",nLine,lpmw->szMenuName); MessageBox(lptw->hWndParent,(LPSTR) buf,lptw->Title, MB_ICONEXCLAMATION); goto errorcleanup; } LeftJustify(buf,buf); if (nMenuLevel<MENUDEPTH) nMenuLevel++; else { wsprintf(buf,"Menu is too deep at line %d of %s\n",nLine,lpmw->szMenuName); MessageBox(lptw->hWndParent,(LPSTR) buf,lptw->Title, MB_ICONEXCLAMATION); goto errorcleanup; } hMenu[nMenuLevel] = CreateMenu(); AppendMenu(hMenu[nMenuLevel > 0 ? nMenuLevel-1 : 0], MF_STRING | MF_POPUP, (UINT)hMenu[nMenuLevel], (LPCSTR)buf); } else if (!lstrcmpi(buf,"[EndMenu]")) { if (nMenuLevel > 0) nMenuLevel--; /* back up one menu */ } else if (!lstrcmpi(buf,"[Button]")) { /* button macro */ char *icon; if (lpmw->nButton >= BUTTONMAX) { wsprintf(buf,"Too many buttons at line %d of %s\n",nLine,lpmw->szMenuName); MessageBox(lptw->hWndParent,(LPSTR) buf,lptw->Title, MB_ICONEXCLAMATION); goto errorcleanup; } if (!(nInc = GetLine(buf,MAXSTR,menufile))) { nLine += nInc; wsprintf(buf,"Problem on line %d of %s\n",nLine,lpmw->szMenuName); MessageBox(lptw->hWndParent,(LPSTR) buf,lptw->Title, MB_ICONEXCLAMATION); goto errorcleanup; } LeftJustify(buf,buf); if (lstrlen(buf)+1 < MACROLEN - (macroptr-lpmw->macrobuf)) lstrcpy((char *)macroptr,buf); else { wsprintf(buf,"Out of space for storing menu macros\n at line %d of \n",nLine,lpmw->szMenuName); MessageBox(lptw->hWndParent,(LPSTR) buf,lptw->Title, MB_ICONEXCLAMATION); goto errorcleanup; } ButtonText[lpmw->nButton] = (char *)macroptr; ButtonIcon[lpmw->nButton] = I_IMAGENONE; /* comctl 5.81, Win 2000 */ if ((icon = strchr((char *)macroptr, ';'))) { *icon = NUL; ButtonIcon[lpmw->nButton] = atoi(++icon); } macroptr += lstrlen((char *)macroptr)+1; *macroptr = '\0'; if (!(nInc = GetLine(buf,MAXSTR,menufile))) { nLine += nInc; wsprintf(buf,"Problem on line %d of %s\n",nLine,lpmw->szMenuName); MessageBox(lptw->hWndParent,(LPSTR) buf,lptw->Title, MB_ICONEXCLAMATION); goto errorcleanup; } LeftJustify(buf,buf); TranslateMacro(buf); if (lstrlen(buf)+1 < MACROLEN - (macroptr - lpmw->macrobuf)) lstrcpy((char *)macroptr,buf); else { wsprintf(buf,"Out of space for storing menu macros\n at line %d of \n",nLine,lpmw->szMenuName); MessageBox(lptw->hWndParent,(LPSTR) buf,lptw->Title, MB_ICONEXCLAMATION); goto errorcleanup; } lpmw->hButtonID[lpmw->nButton] = lpmw->nCountMenu; lpmw->macro[lpmw->nCountMenu] = macroptr; macroptr += lstrlen((char *)macroptr)+1; *macroptr = '\0'; lpmw->nCountMenu++; lpmw->nButton++; } else { /* menu item */ if (lpmw->nCountMenu>=NUMMENU) { wsprintf(buf,"Too many menu items at line %d of %s\n",nLine,lpmw->szMenuName); MessageBox(lptw->hWndParent,(LPSTR) buf,lptw->Title, MB_ICONEXCLAMATION); goto errorcleanup; } LeftJustify(buf,buf); /* HBB 981202: added MF_SEPARATOR to the MF_MENU*BREAK items. This is meant * to maybe avoid a CodeGuard warning about passing last argument zero * when item style is not SEPARATOR... Actually, a better solution would * have been to combine the '|' divider with the next menu item. */ if (buf[0]=='-') { if (nMenuLevel == 0) AppendMenu(hMenu[0], MF_SEPARATOR | MF_MENUBREAK, 0, (LPSTR)NULL); else AppendMenu(hMenu[nMenuLevel], MF_SEPARATOR, 0, (LPSTR)NULL); } else if (buf[0]=='|') { AppendMenu(hMenu[nMenuLevel], MF_SEPARATOR | MF_MENUBARBREAK, 0, (LPSTR)NULL); } else { AppendMenu(hMenu[nMenuLevel],MF_STRING, lpmw->nCountMenu, (LPSTR)buf); if (!(nInc = GetLine(buf,MAXSTR,menufile))) { nLine += nInc; wsprintf(buf,"Problem on line %d of %s\n",nLine,lpmw->szMenuName); MessageBox(lptw->hWndParent,(LPSTR) buf,lptw->Title, MB_ICONEXCLAMATION); goto errorcleanup; } LeftJustify(buf,buf); TranslateMacro(buf); if (lstrlen(buf)+1 < MACROLEN - (macroptr - lpmw->macrobuf)) lstrcpy((char *)macroptr,buf); else { wsprintf(buf,"Out of space for storing menu macros\n at line %d of %s\n",nLine,lpmw->szMenuName); MessageBox(lptw->hWndParent,(LPSTR) buf,lptw->Title, MB_ICONEXCLAMATION); goto errorcleanup; } lpmw->macro[lpmw->nCountMenu] = macroptr; macroptr += lstrlen((char *)macroptr)+1; *macroptr = '\0'; lpmw->nCountMenu++; } } } if ( (lpmw->nCountMenu - lpmw->nButton) > 0 ) { /* we have a menu bar so put it on the window */ SetMenu(lptw->hWndParent,lpmw->hMenu); DrawMenuBar(lptw->hWndParent); } if (!lpmw->nButton) goto cleanup; /* no buttons */ /* create a toolbar */ lpmw->hToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, WS_CHILD | TBSTYLE_LIST, // TBSTYLE_WRAPABLE 0, 0, 0, 0, lptw->hWndParent, (HMENU)ID_TOOLBAR, lptw->hInstance, NULL); if (lpmw->hToolbar == NULL) goto cleanup; /* set size of toolbar icons */ /* lparam is (height<<16 + width) / default 16,15 */ SendMessage(lpmw->hToolbar, TB_SETBITMAPSIZE, (WPARAM)0, (LPARAM)((16<<16) + 16)); /* load standard toolbar icons: standard, history & view */ SendMessage(lpmw->hToolbar, TB_LOADIMAGES, (WPARAM)IDB_STD_SMALL_COLOR, (LPARAM)HINST_COMMCTRL); SendMessage(lpmw->hToolbar, TB_LOADIMAGES, (WPARAM)IDB_HIST_SMALL_COLOR, (LPARAM)HINST_COMMCTRL); SendMessage(lpmw->hToolbar, TB_LOADIMAGES, (WPARAM)IDB_VIEW_SMALL_COLOR, (LPARAM)HINST_COMMCTRL); /* create buttons */ SendMessage(lpmw->hToolbar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0); for (i = 0; i < lpmw->nButton; i++) { TBBUTTON button; BOOL ret; ZeroMemory(&button, sizeof(button)); button.iBitmap = ButtonIcon[i]; button.idCommand = lpmw->hButtonID[i]; button.fsState = TBSTATE_ENABLED; button.fsStyle = BTNS_AUTOSIZE | BTNS_SHOWTEXT | BTNS_NOPREFIX; if (MacroCommand(lptw, lpmw->hButtonID[i]) == OPTIONS) button.fsStyle |= BTNS_WHOLEDROPDOWN; button.iString = (UINT_PTR)ButtonText[i]; ret = SendMessage(lpmw->hToolbar, TB_INSERTBUTTON, (WPARAM)i+1, (LPARAM)&button); } /* auto-resize and show */ SendMessage(lpmw->hToolbar, TB_AUTOSIZE, (WPARAM)0, (LPARAM)0); ShowWindow(lpmw->hToolbar, TRUE); /* move top of client text window down to allow space for toolbar */ GetClientRect(lpmw->hToolbar, &rect); lptw->ButtonHeight = rect.bottom + 1; lptw->ButtonHeight++; GetClientRect(lptw->hWndParent, &rect); SetWindowPos(lptw->hWndText, (HWND)NULL, 0, lptw->ButtonHeight, rect.right, rect.bottom - lptw->ButtonHeight - lptw->StatusHeight, SWP_NOZORDER | SWP_NOACTIVATE); goto cleanup; nomemory: MessageBox(lptw->hWndParent,"Out of memory",lptw->Title, MB_ICONEXCLAMATION); errorcleanup: if (hmacro) { GlobalUnlock(hmacro); GlobalFree(hmacro); } if (hmacrobuf) { GlobalUnlock(hmacrobuf); GlobalFree(hmacrobuf); } if (lpmw->szPrompt != (char *)NULL) LocalFreePtr((void NEAR *)lpmw->szPrompt); if (lpmw->szAnswer != (char *)NULL) LocalFreePtr((void NEAR *)lpmw->szAnswer); cleanup: if (buf != (char *)NULL) LocalFreePtr((void NEAR *)buf); if (menufile != (GFILE *)NULL) Gfclose(menufile); return; } void CloseMacros(LPTW lptw) { HGLOBAL hglobal; LPMW lpmw; lpmw = lptw->lpmw; hglobal = (HGLOBAL)GlobalHandle(lpmw->macro); if (hglobal) { GlobalUnlock(hglobal); GlobalFree(hglobal); } hglobal = (HGLOBAL)GlobalHandle(lpmw->macrobuf); if (hglobal) { GlobalUnlock(hglobal); GlobalFree(hglobal); } if (lpmw->szPrompt != (char *)NULL) LocalFreePtr(lpmw->szPrompt); if (lpmw->szAnswer != (char *)NULL) LocalFreePtr(lpmw->szAnswer); } /***********************************************************************/ /* InputBoxDlgProc() - Message handling routine for Input dialog box */ /***********************************************************************/ BOOL CALLBACK InputBoxDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { LPTW lptw; LPMW lpmw; lptw = (LPTW)GetWindowLong(GetParent(hDlg), 0); lpmw = lptw->lpmw; switch( message) { case WM_INITDIALOG: SetDlgItemText( hDlg, ID_PROMPT, lpmw->szPrompt); return( TRUE); case WM_COMMAND: switch(LOWORD(wParam)) { case ID_ANSWER: return( TRUE); case IDOK: lpmw->nChar = GetDlgItemText( hDlg, ID_ANSWER, lpmw->szAnswer, MAXSTR); EndDialog( hDlg, TRUE); return( TRUE); case IDCANCEL: lpmw->szAnswer[0] = 0; EndDialog( hDlg, FALSE); return( TRUE); default: return( FALSE); } default: return( FALSE); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wcommon.h���������������������������������������������������������������������0000644�0004711�0000144�00000006043�12130567672�013361� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: wcommon.h,v 1.14.2.2 2013/04/05 16:39:50 markisch Exp $ */ /* GNUPLOT - wcommon.h */ /*[ * Copyright 1992 - 1993, 1998, 2004 Maurice Castro, Russell Lang * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Maurice Castro * Russell Lang */ #ifndef CLEARTYPE_QUALITY #define CLEARTYPE_QUALITY 5 #endif /* maximum number of plots which can be enabled/disabled via toolbar */ #define MAXPLOTSHIDE 10 /* winmain.c */ # define PACKVERSION(major,minor) MAKELONG(minor,major) extern DWORD GetDllVersion(LPCTSTR lpszDllName); extern BOOL IsWindowsXPorLater(void); extern char *appdata_directory(void); extern FILE *open_printer(); extern void close_printer(FILE *outfile); extern BOOL cp_changed; extern UINT cp_input; extern UINT cp_output; /* wgnuplib.c */ extern HINSTANCE hdllInstance; extern LPSTR szParentClass; extern LPSTR szTextClass; extern LPSTR szPauseClass; extern LPSTR szGraphClass; extern LPSTR szAboutClass; void NEAR * LocalAllocPtr(UINT flags, UINT size); void NEAR * LocalReAllocPtr(void NEAR * ptr, UINT flags, UINT size); void LocalFreePtr(void NEAR *ptr); LPSTR GetInt(LPSTR str, LPINT pval); /* wtext.c */ void WriteTextIni(LPTW lptw); void ReadTextIni(LPTW lptw); void DragFunc(LPTW lptw, HDROP hdrop); void TextShow(LPTW lptw); /* wmenu.c - Menu */ void SendMacro(LPTW lptw, UINT m); void LoadMacros(LPTW lptw); void CloseMacros(LPTW lptw); /* wprinter.c - Printer setup and dump */ BOOL PrintSize(HDC printer, HWND hwnd, LPRECT lprect); void PrintRegister(GP_LPPRINT lpr); void PrintUnregister(GP_LPPRINT lpr); BOOL CALLBACK PrintAbortProc(HDC hdcPrn, int code); BOOL CALLBACK PrintDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); /* wgraph.c */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wprinter.c��������������������������������������������������������������������0000644�0004711�0000144�00000021763�12160133407�013541� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: wprinter.c,v 1.7.2.1 2013/06/08 10:52:56 markisch Exp $"); } */ /* GNUPLOT - win/wprinter.c */ /*[ * Copyright 1992, 1993, 1998, 2004 Maurice Castro, Russell Lang * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Maurice Castro * Russell Lang */ /* Dump a file to the printer */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #define STRICT #include <windows.h> #include <windowsx.h> #include <commdlg.h> #include <stdio.h> #include <stdlib.h> #ifdef __MSC__ #include <memory.h> #else #include <mem.h> #endif #include "wgnuplib.h" #include "wresourc.h" #include "wcommon.h" GP_LPPRINT prlist = NULL; BOOL CALLBACK PrintSizeDlgProc(HWND hdlg, UINT wmsg, WPARAM wparam, LPARAM lparam); static GP_LPPRINT PrintFind(HDC hdc); BOOL CALLBACK PrintSizeDlgProc(HWND hdlg, UINT wmsg, WPARAM wparam, LPARAM lparam) { char buf[8]; GP_LPPRINT lpr = (GP_LPPRINT)GetWindowLong(GetParent(hdlg), 4); switch (wmsg) { case WM_INITDIALOG: wsprintf(buf,"%d",lpr->pdef.x); SetDlgItemText(hdlg, PSIZE_DEFX, buf); wsprintf(buf,"%d",lpr->pdef.y); SetDlgItemText(hdlg, PSIZE_DEFY, buf); wsprintf(buf,"%d",lpr->poff.x); SetDlgItemText(hdlg, PSIZE_OFFX, buf); wsprintf(buf,"%d",lpr->poff.y); SetDlgItemText(hdlg, PSIZE_OFFY, buf); wsprintf(buf,"%d",lpr->psize.x); SetDlgItemText(hdlg, PSIZE_X, buf); wsprintf(buf,"%d",lpr->psize.y); SetDlgItemText(hdlg, PSIZE_Y, buf); CheckDlgButton(hdlg, PSIZE_DEF, TRUE); EnableWindow(GetDlgItem(hdlg, PSIZE_X), FALSE); EnableWindow(GetDlgItem(hdlg, PSIZE_Y), FALSE); return TRUE; case WM_COMMAND: switch (wparam) { case PSIZE_DEF: EnableWindow(GetDlgItem(hdlg, PSIZE_X), FALSE); EnableWindow(GetDlgItem(hdlg, PSIZE_Y), FALSE); return FALSE; case PSIZE_OTHER: EnableWindow(GetDlgItem(hdlg, PSIZE_X), TRUE); EnableWindow(GetDlgItem(hdlg, PSIZE_Y), TRUE); return FALSE; case IDOK: if (SendDlgItemMessage(hdlg, PSIZE_OTHER, BM_GETCHECK, 0, 0L)) { SendDlgItemMessage(hdlg, PSIZE_X, WM_GETTEXT, 7, (LPARAM) (LPSTR) buf); GetInt(buf, (LPINT)&lpr->psize.x); SendDlgItemMessage(hdlg, PSIZE_Y, WM_GETTEXT, 7, (LPARAM) (LPSTR) buf); GetInt(buf, (LPINT)&lpr->psize.y); } else { lpr->psize.x = lpr->pdef.x; lpr->psize.y = lpr->pdef.y; } SendDlgItemMessage(hdlg, PSIZE_OFFX, WM_GETTEXT, 7, (LPARAM) (LPSTR) buf); GetInt(buf, (LPINT)&lpr->poff.x); SendDlgItemMessage(hdlg, PSIZE_OFFY, WM_GETTEXT, 7, (LPARAM) (LPSTR) buf); GetInt(buf, (LPINT)&lpr->poff.y); if (lpr->psize.x <= 0) lpr->psize.x = lpr->pdef.x; if (lpr->psize.y <= 0) lpr->psize.y = lpr->pdef.y; EndDialog(hdlg, IDOK); return TRUE; case IDCANCEL: EndDialog(hdlg, IDCANCEL); return TRUE; } /* switch(wparam) */ break; } /* switch(msg) */ return FALSE; } /* GetWindowLong(hwnd, 4) must be available for use */ BOOL PrintSize(HDC printer, HWND hwnd, LPRECT lprect) { HDC hdc; BOOL status = FALSE; GP_PRINT pr; SetWindowLong(hwnd, 4, (LONG)&pr); pr.poff.x = 0; pr.poff.y = 0; pr.psize.x = GetDeviceCaps(printer, HORZSIZE); pr.psize.y = GetDeviceCaps(printer, VERTSIZE); hdc = GetDC(hwnd); GetClientRect(hwnd,lprect); pr.pdef.x = MulDiv(lprect->right-lprect->left, 254, 10*GetDeviceCaps(hdc, LOGPIXELSX)); pr.pdef.y = MulDiv(lprect->bottom-lprect->top, 254, 10*GetDeviceCaps(hdc, LOGPIXELSX)); ReleaseDC(hwnd,hdc); if (DialogBox (hdllInstance, "PrintSizeDlgBox", hwnd, PrintSizeDlgProc) == IDOK) { lprect->left = MulDiv(pr.poff.x*10, GetDeviceCaps(printer, LOGPIXELSX), 254); lprect->top = MulDiv(pr.poff.y*10, GetDeviceCaps(printer, LOGPIXELSY), 254); lprect->right = lprect->left + MulDiv(pr.psize.x*10, GetDeviceCaps(printer, LOGPIXELSX), 254); lprect->bottom = lprect->top + MulDiv(pr.psize.y*10, GetDeviceCaps(printer, LOGPIXELSY), 254); status = TRUE; } SetWindowLong(hwnd, 4, (LONG)(0L)); return status; } /* Win32 doesn't support OpenJob() etc. so we must use some old code * which attempts to sneak the output through a Windows printer driver */ void PrintRegister(GP_LPPRINT lpr) { GP_LPPRINT next; next = prlist; prlist = lpr; lpr->next = next; } static GP_LPPRINT PrintFind(HDC hdc) { GP_LPPRINT this; this = prlist; while (this && (this->hdcPrn!=hdc)) { this = this->next; } return this; } void PrintUnregister(GP_LPPRINT lpr) { GP_LPPRINT this, prev; prev = (GP_LPPRINT)NULL; this = prlist; while (this && (this!=lpr)) { prev = this; this = this->next; } if (this && (this == lpr)) { /* unhook it */ if (prev) prev->next = this->next; else prlist = this->next; } } /* GetWindowLong(GetParent(hDlg), 4) must be available for use */ BOOL CALLBACK PrintDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { GP_LPPRINT lpr; lpr = (GP_LPPRINT)GetWindowLong(GetParent(hDlg), 4); /* FIXME: cause of crash in bug #3544949. No idea yet as to why this could happen, though. */ if (lpr == NULL) return FALSE; switch(message) { case WM_INITDIALOG: lpr->hDlgPrint = hDlg; SetWindowText(hDlg,(LPSTR)lParam); EnableMenuItem(GetSystemMenu(hDlg,FALSE),SC_CLOSE,MF_GRAYED); return TRUE; case WM_COMMAND: lpr->bUserAbort = TRUE; lpr->hDlgPrint = 0; EnableWindow(GetParent(hDlg),TRUE); EndDialog(hDlg, FALSE); return TRUE; } return FALSE; } BOOL CALLBACK PrintAbortProc(HDC hdcPrn, int code) { MSG msg; GP_LPPRINT lpr; lpr = PrintFind(hdcPrn); while (!lpr->bUserAbort && PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) { if (!lpr->hDlgPrint || !IsDialogMessage(lpr->hDlgPrint,&msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return(!lpr->bUserAbort); } /* GetWindowLong(hwnd, 4) must be available for use */ void WDPROC DumpPrinter(HWND hwnd, LPSTR szAppName, LPSTR szFileName) { HDC printer; PRINTDLG pd; GP_PRINT pr; DOCINFO di; char *buf; WORD *bufcount; int count; FILE *f; long lsize; long ldone; char pcdone[10]; memset(&pd, 0, sizeof(PRINTDLG)); pd.lStructSize = sizeof(PRINTDLG); pd.hwndOwner = hwnd; pd.Flags = PD_PRINTSETUP | PD_RETURNDC; if ((f = fopen(szFileName, "rb")) == (FILE *)NULL) return; fseek(f, 0L, SEEK_END); lsize = ftell(f); if (lsize <= 0) lsize = 1; fseek(f, 0L, SEEK_SET); ldone = 0; if (PrintDlg(&pd)) { printer = pd.hDC; if (printer != (HDC)NULL) { pr.hdcPrn = printer; SetWindowLong(hwnd, 4, (LONG)((GP_LPPRINT)&pr)); PrintRegister((GP_LPPRINT)&pr); if ( (buf = malloc(4096+2)) != (char *)NULL ) { bufcount = (WORD *)buf; EnableWindow(hwnd,FALSE); pr.bUserAbort = FALSE; /* is parent set correctly */ pr.hDlgPrint = CreateDialogParam(hdllInstance, "CancelDlgBox", hwnd, PrintDlgProc, (LPARAM) szAppName); SetAbortProc(printer, PrintAbortProc); di.cbSize = sizeof(DOCINFO); di.lpszDocName = szAppName; di.lpszOutput = NULL; if (StartDoc(printer, &di) > 0) { while ( pr.hDlgPrint && !pr.bUserAbort && (count = fread(buf+2, 1, 4096, f)) != 0 ) { *bufcount = count; Escape(printer, PASSTHROUGH, count+2, (LPSTR)buf, NULL); ldone += count; sprintf(pcdone, "%d%% done", (int) (ldone * 100 / lsize)); SetWindowText(GetDlgItem(pr.hDlgPrint, CANCEL_PCDONE), pcdone); if (pr.bUserAbort) AbortDoc(printer); else EndDoc(printer); } if (!pr.bUserAbort) { EnableWindow(hwnd,TRUE); DestroyWindow(pr.hDlgPrint); } free(buf); } } DeleteDC(printer); SetWindowLong(hwnd, 4, (LONG)(0L)); PrintUnregister((GP_LPPRINT)&pr); } } fclose(f); } �������������gnuplot-4.6.4/src/win/winmain.c���������������������������������������������������������������������0000644�0004711�0000144�00000063272�12160133407�013332� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: winmain.c,v 1.52.2.3 2013/06/08 11:52:33 markisch Exp $ */ /* GNUPLOT - win/winmain.c */ /*[ * Copyright 1992, 1993, 1998, 2004 Maurice Castro, Russell Lang * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Maurice Castro * Russell Lang * */ /* This file implements the initialization code for running gnuplot */ /* under Microsoft Windows. */ /* */ /* The modifications to allow Gnuplot to run under Windows were made */ /* by Maurice Castro. (maurice@bruce.cs.monash.edu.au) 3 Jul 1992 */ /* and Russell Lang (rjl@monu1.cc.monash.edu.au) 30 Nov 1992 */ /* */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #define STRICT /* required for MinGW64 */ #define _WIN32_IE 0x0501 #define _WIN32_WINNT 0x0501 #include <windows.h> #include <windowsx.h> #include <commctrl.h> #include <shlobj.h> #include <shlwapi.h> #ifdef WITH_HTML_HELP #include <htmlhelp.h> #endif #include <dos.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdarg.h> #include <ctype.h> #include <fcntl.h> #ifdef __MSC__ # include <malloc.h> #endif #ifdef __WATCOMC__ # define mktemp _mktemp #endif #include <io.h> #include <sys/stat.h> #include "plot.h" #include "setshow.h" #include "version.h" #include "command.h" #include "winmain.h" #include "wtext.h" #include "wcommon.h" #ifdef HAVE_GDIPLUS #include "wgdiplus.h" #endif #ifdef WXWIDGETS #include "wxterminal/wxt_term.h" #endif /* workaround for old header files */ #ifndef CSIDL_APPDATA # define CSIDL_APPDATA (0x001a) #endif /* limits */ #define MAXSTR 255 #define MAXPRINTF 1024 /* used if vsnprintf(NULL,0,...) returns zero (MingW 3.4) */ /* globals */ #ifndef WGP_CONSOLE TW textwin; MW menuwin; #endif LPGW graphwin; /* current graph window */ LPGW listgraphs; /* list of graph windows */ PW pausewin; LPSTR szModuleName; LPSTR szPackageDir; LPSTR winhelpname; LPSTR szMenuName; static LPSTR szLanguageCode = NULL; #if defined(WGP_CONSOLE) && defined(CONSOLE_SWITCH_CP) BOOL cp_changed = FALSE; UINT cp_input; /* save previous codepage settings */ UINT cp_output; #endif #ifdef WITH_HTML_HELP HWND help_window = NULL; #endif char *authors[]={ "Colin Kelley", "Thomas Williams" }; void WinExit(void); static void WinCloseHelp(void); int CALLBACK ShutDown(); static void CheckMemory(LPSTR str) { if (str == (LPSTR)NULL) { MessageBox(NULL, "out of memory", "gnuplot", MB_ICONSTOP | MB_OK); exit(1); } } int Pause(LPSTR str) { pausewin.Message = str; return (PauseBox(&pausewin) == IDOK); } void kill_pending_Pause_dialog () { if (pausewin.bPause == FALSE) /* no Pause dialog displayed */ return; /* Pause dialog displayed, thus kill it */ DestroyWindow(pausewin.hWndPause); pausewin.bPause = FALSE; } /* atexit procedure */ void WinExit(void) { LPGW lpgw; /* Last chance, call before anything else to avoid a crash. */ WinCloseHelp(); term_reset(); #ifndef __MINGW32__ /* HBB 980809: FIXME: doesn't exist for MinGW32. So...? */ fcloseall(); #endif /* Close all graph windows */ for (lpgw = listgraphs; lpgw != NULL; lpgw = lpgw->next) { if (GraphHasWindow(lpgw)) GraphClose(lpgw); } #ifndef WGP_CONSOLE TextMessage(); /* process messages */ #ifndef WITH_HTML_HELP WinHelp(textwin.hWndText,(LPSTR)winhelpname,HELP_QUIT,(DWORD)NULL); #endif TextMessage(); /* process messages */ #else #ifndef WITH_HTML_HELP WinHelp(GetDesktopWindow(), (LPSTR)winhelpname, HELP_QUIT, (DWORD)NULL); #endif #ifdef CONSOLE_SWITCH_CP /* restore console codepages */ if (cp_changed) { SetConsoleCP(cp_input); SetConsoleOutputCP(cp_output); /* file APIs are per process */ } #endif #endif #ifdef HAVE_GDIPLUS gdiplusCleanup(); #endif return; } /* call back function from Text Window WM_CLOSE */ int CALLBACK ShutDown() { /* First chance for wgnuplot to close help system. */ WinCloseHelp(); exit(0); return 0; } /* This function can be used to retrieve version information from * Window's Shell and common control libraries (Comctl32.dll, * Shell32.dll, and Shlwapi.dll) The code was copied from the MSDN * article "Shell and Common Controls Versions" */ DWORD GetDllVersion(LPCTSTR lpszDllName) { HINSTANCE hinstDll; DWORD dwVersion = 0; /* For security purposes, LoadLibrary should be provided with a fully-qualified path to the DLL. The lpszDllName variable should be tested to ensure that it is a fully qualified path before it is used. */ hinstDll = LoadLibrary(lpszDllName); if (hinstDll) { DLLGETVERSIONPROC pDllGetVersion; pDllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(hinstDll, "DllGetVersion"); /* Because some DLLs might not implement this function, you must test for it explicitly. Depending on the particular DLL, the lack of a DllGetVersion function can be a useful indicator of the version. */ if (pDllGetVersion) { DLLVERSIONINFO dvi; HRESULT hr; ZeroMemory(&dvi, sizeof(dvi)); dvi.cbSize = sizeof(dvi); hr = (*pDllGetVersion)(&dvi); if (SUCCEEDED(hr)) dwVersion = PACKVERSION(dvi.dwMajorVersion, dvi.dwMinorVersion); } FreeLibrary(hinstDll); } return dwVersion; } BOOL IsWindowsXPorLater(void) { OSVERSIONINFO versionInfo; /* get Windows version */ ZeroMemory(&versionInfo, sizeof(OSVERSIONINFO)); versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&versionInfo); return ((versionInfo.dwMajorVersion > 5) || ((versionInfo.dwMajorVersion == 5) && (versionInfo.dwMinorVersion >= 1))); } char * appdata_directory(void) { HMODULE hShell32; FARPROC pSHGetSpecialFolderPath; static char dir[MAX_PATH] = ""; if (dir[0]) return dir; /* Make sure that SHGetSpecialFolderPath is supported. */ hShell32 = LoadLibrary(TEXT("shell32.dll")); if (hShell32) { pSHGetSpecialFolderPath = GetProcAddress(hShell32, TEXT("SHGetSpecialFolderPathA")); if (pSHGetSpecialFolderPath) (*pSHGetSpecialFolderPath)(NULL, dir, CSIDL_APPDATA, FALSE); FreeModule(hShell32); return dir; } /* use APPDATA environment variable as fallback */ if (dir[0] == '\0') { char *appdata = getenv("APPDATA"); if (appdata) { strcpy(dir, appdata); return dir; } } return NULL; } static void WinCloseHelp(void) { #ifdef WITH_HTML_HELP /* Due to a known bug in the HTML help system we have to * call this as soon as possible before the end of the program. * See e.g. http://helpware.net/FAR/far_faq.htm#HH_CLOSE_ALL */ if (IsWindow(help_window)) SendMessage(help_window, WM_CLOSE, 0, 0); Sleep(0); #endif } static char * GetLanguageCode() { static char lang[6] = ""; if (lang[0] == NUL) { GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVLANGNAME, lang, sizeof(lang)); //strcpy(lang, "JPN"); //TEST /* language definition files for Japanese already use "ja" as abbreviation */ if (strcmp(lang, "JPN") == 0) lang[1] = 'A'; /* prefer lower case */ lang[0] = tolower(lang[0]); lang[1] = tolower(lang[1]); /* only use two character sequence */ lang[2] = NUL; } return lang; } static BOOL FileExists(const char * filename) { struct stat buffer; return stat(filename, &buffer) == 0; } static char * LocalisedFile(const char * name, const char * ext, const char * defaultname) { char * lang; char * filename; /* Allow user to override language detection. */ if (szLanguageCode) lang = szLanguageCode; else lang = GetLanguageCode(); filename = (LPSTR) malloc(strlen(szModuleName) + strlen(name) + strlen(lang) + strlen(ext) + 1); if (filename) { strcpy(filename, szModuleName); strcat(filename, name); strcat(filename, lang); strcat(filename, ext); if (!FileExists(filename)) { strcpy(filename, szModuleName); strcat(filename, defaultname); } } return filename; } static void ReadMainIni(LPSTR file, LPSTR section) { char profile[81] = ""; #ifdef WITH_HTML_HELP const char hlpext[] = ".chm"; #else const char hlpext[] = ".hlp"; #endif const char name[] = "wgnuplot-"; /* Language code override */ GetPrivateProfileString(section, "Language", "", profile, 80, file); if (profile[0] != NUL) szLanguageCode = strdup(profile); else szLanguageCode = NULL; /* help file name */ GetPrivateProfileString(section, "HelpFile", "", profile, 80, file); if (profile[0] != NUL) { winhelpname = (LPSTR) malloc(strlen(szModuleName) + strlen(profile) + 1); if (winhelpname) { strcpy(winhelpname, szModuleName); strcat(winhelpname, profile); } } else { /* default name is "wgnuplot-LL.chm" */ winhelpname = LocalisedFile(name, hlpext, HELPFILE); } /* menu file name */ GetPrivateProfileString(section, "MenuFile", "", profile, 80, file); if (profile[0] != NUL) { szMenuName = (LPSTR) malloc(strlen(szModuleName) + strlen(profile) + 1); if (szMenuName) { strcpy(szMenuName, szModuleName); strcat(szMenuName, profile); } } else { /* default name is "wgnuplot-LL.mnu" */ szMenuName = LocalisedFile(name, ".mnu", "wgnuplot.mnu"); } } #ifndef WGP_CONSOLE int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) #else int main(int argc, char **argv) #endif { LPSTR tail; int i; #ifdef WGP_CONSOLE # define _argv argv # define _argc argc HINSTANCE hInstance = GetModuleHandle(NULL), hPrevInstance = NULL; #else #if defined(__MSC__) || defined(__WATCOMC__) || defined(__MINGW32__) # define _argv __argv # define _argc __argc #endif #endif /* WGP_CONSOLE */ szModuleName = (LPSTR)malloc(MAXSTR+1); CheckMemory(szModuleName); /* get path to EXE */ GetModuleFileName(hInstance, (LPSTR) szModuleName, MAXSTR); if ((tail = (LPSTR)_fstrrchr(szModuleName,'\\')) != (LPSTR)NULL) { tail++; *tail = 0; } szModuleName = (LPSTR)realloc(szModuleName, _fstrlen(szModuleName)+1); CheckMemory(szModuleName); if (_fstrlen(szModuleName) >= 5 && _fstrnicmp(&szModuleName[_fstrlen(szModuleName)-5], "\\bin\\", 5) == 0) { int len = _fstrlen(szModuleName)-4; szPackageDir = (LPSTR)malloc(len+1); CheckMemory(szPackageDir); _fstrncpy(szPackageDir, szModuleName, len); szPackageDir[len] = '\0'; } else szPackageDir = szModuleName; #ifndef WGP_CONSOLE textwin.hInstance = hInstance; textwin.hPrevInstance = hPrevInstance; textwin.nCmdShow = nCmdShow; textwin.Title = "gnuplot"; #endif /* create structure of first graph window */ graphwin = calloc(1, sizeof(GW)); listgraphs = graphwin; /* locate ini file */ { char * inifile; get_user_env(); /* this hasn't been called yet */ inifile = gp_strdup("~\\wgnuplot.ini"); gp_expand_tilde(&inifile); /* if tilde expansion fails use current directory as default - that was the previous default behaviour */ if (inifile[0] == '~') { free(inifile); inifile = "wgnuplot.ini"; } #ifndef WGP_CONSOLE textwin.IniFile = inifile; #endif graphwin->IniFile = inifile; ReadMainIni(inifile, "WGNUPLOT"); } #ifndef WGP_CONSOLE textwin.IniSection = "WGNUPLOT"; textwin.DragPre = "load '"; textwin.DragPost = "'\n"; textwin.lpmw = &menuwin; textwin.ScreenSize.x = 80; textwin.ScreenSize.y = 80; textwin.KeyBufSize = 2048; textwin.CursorFlag = 1; /* scroll to cursor after \n & \r */ textwin.shutdown = MakeProcInstance((FARPROC)ShutDown, hInstance); textwin.AboutText = (LPSTR)malloc(1024); CheckMemory(textwin.AboutText); sprintf(textwin.AboutText, "Version %s patchlevel %s\n" \ "last modified %s\n" \ "%s\n%s, %s and many others\n" \ "gnuplot home: http://www.gnuplot.info\n", gnuplot_version, gnuplot_patchlevel, gnuplot_date, gnuplot_copyright, authors[1], authors[0]); textwin.AboutText = (LPSTR)realloc(textwin.AboutText, _fstrlen(textwin.AboutText)+1); CheckMemory(textwin.AboutText); menuwin.szMenuName = szMenuName; #endif pausewin.hInstance = hInstance; pausewin.hPrevInstance = hPrevInstance; pausewin.Title = "gnuplot pause"; graphwin->hInstance = hInstance; graphwin->hPrevInstance = hPrevInstance; #ifdef WGP_CONSOLE graphwin->lptw = NULL; #else graphwin->lptw = &textwin; #endif /* init common controls */ { INITCOMMONCONTROLSEX initCtrls; initCtrls.dwSize = sizeof(INITCOMMONCONTROLSEX); initCtrls.dwICC = ICC_WIN95_CLASSES; InitCommonControlsEx(&initCtrls); } #ifndef WGP_CONSOLE if (TextInit(&textwin)) exit(1); textwin.hIcon = LoadIcon(hInstance, "TEXTICON"); SetClassLong(textwin.hWndParent, GCL_HICON, (DWORD)textwin.hIcon); /* Note: we want to know whether this is an interactive session so that we can * decide whether or not to write status information to stderr. The old test * for this was to see if (argc > 1) but the addition of optional command line * switches broke this. What we really wanted to know was whether any of the * command line arguments are file names or an explicit in-line "-e command". * (This is a copy of a code snippet from plot.c) */ for (i = 1; i < _argc; i++) { if (!stricmp(_argv[i], "/noend")) continue; if ((_argv[i][0] != '-') || (_argv[i][1] == 'e')) { interactive = FALSE; break; } } if (interactive || persist_cl) { ShowWindow(textwin.hWndParent, textwin.nCmdShow); } if (IsIconic(textwin.hWndParent)) { /* update icon */ RECT rect; GetClientRect(textwin.hWndParent, (LPRECT) &rect); InvalidateRect(textwin.hWndParent, (LPRECT) &rect, 1); UpdateWindow(textwin.hWndParent); } #else /* WGP_CONSOLE */ #ifdef CONSOLE_SWITCH_CP /* Change codepage of console to match that of the graph window. WinExit() will revert this. Attention: display of characters does not work correctly with "Terminal" font! Users will have to use "Lucida Console" or similar. */ cp_input = GetConsoleCP(); cp_output = GetConsoleOutputCP(); if (cp_input != GetACP()) { cp_changed = TRUE; SetConsoleCP(GetACP()); /* keyboard input */ SetConsoleOutputCP(GetACP()); /* screen output */ SetFileApisToANSI(); /* file names etc. */ } #endif #endif atexit(WinExit); if (!isatty(fileno(stdin))) setmode(fileno(stdin), O_BINARY); gnu_main(_argc, _argv); /* First chance to close help system for console gnuplot, second for wgnuplot */ WinCloseHelp(); return 0; } #ifndef WGP_CONSOLE /* replacement stdio routines that use Text Window for stdin/stdout */ /* WARNING: Do not write to stdout/stderr with functions not listed in win/wtext.h */ #undef kbhit #undef getche #undef getch #undef putch #undef fgetc #undef getchar #undef getc #undef fgets #undef gets #undef fputc #undef putchar #undef putc #undef fputs #undef puts #undef fprintf #undef printf #undef vprintf #undef vfprintf #undef fwrite #undef fread #define isterm(f) (f==stdin || f==stdout || f==stderr) int MyPutCh(int ch) { return TextPutCh(&textwin, (BYTE)ch); } int MyKBHit() { return TextKBHit(&textwin); } int MyGetCh() { return TextGetCh(&textwin); } int MyGetChE() { return TextGetChE(&textwin); } int MyFGetC(FILE *file) { if (isterm(file)) { return MyGetChE(); } return fgetc(file); } char * MyGetS(char *str) { TextPutS(&textwin,"\nDANGER: gets() used\n"); MyFGetS(str,80,stdin); if (strlen(str) > 0 && str[strlen(str)-1]=='\n') str[strlen(str)-1] = '\0'; return str; } char * MyFGetS(char *str, unsigned int size, FILE *file) { char *p; if (isterm(file)) { p = TextGetS(&textwin, str, size); if (p != (char *)NULL) return str; return (char *)NULL; } return fgets(str,size,file); } int MyFPutC(int ch, FILE *file) { if (isterm(file)) { MyPutCh((BYTE)ch); #ifndef WGP_CONSOLE TextMessage(); #endif return ch; } return fputc(ch,file); } int MyFPutS(const char *str, FILE *file) { if (isterm(file)) { TextPutS(&textwin, (char*) str); #ifndef WGP_CONSOLE TextMessage(); #endif return (*str); /* different from Borland library */ } return fputs(str,file); } int MyPutS(char *str) { TextPutS(&textwin, str); MyPutCh('\n'); TextMessage(); return 0; /* different from Borland library */ } int MyFPrintF(FILE *file, const char *fmt, ...) { int count; va_list args; va_start(args, fmt); if (isterm(file)) { char *buf; #ifdef __MSC__ count = _vscprintf(fmt, args) + 1; #else count = vsnprintf(NULL,0,fmt,args) + 1; if (count == 0) count = MAXPRINTF; #endif va_end(args); va_start(args, fmt); buf = (char *)malloc(count * sizeof(char)); count = vsnprintf(buf, count, fmt, args); TextPutS(&textwin, buf); free(buf); } else count = vfprintf(file, fmt, args); va_end(args); return count; } int MyVFPrintF(FILE *file, const char *fmt, va_list args) { int count; if (isterm(file)) { char *buf; #ifdef __MSC__ count = _vscprintf(fmt, args) + 1; #else va_list args_copied; va_copy(args_copied, args); count = vsnprintf(NULL, 0U, fmt, args_copied) + 1; if (count == 0) count = MAXPRINTF; va_end(args_copied); #endif buf = (char *)malloc(count * sizeof(char)); count = vsnprintf(buf, count, fmt, args); TextPutS(&textwin, buf); free(buf); } else count = vfprintf(file, fmt, args); return count; } int MyPrintF(const char *fmt, ...) { int count; char *buf; va_list args; va_start(args, fmt); #ifdef __MSC__ count = _vscprintf(fmt, args) + 1; #else count = vsnprintf(NULL, 0, fmt, args) + 1; if (count == 0) count = MAXPRINTF; #endif va_end(args); va_start(args, fmt); buf = (char *)malloc(count * sizeof(char)); count = vsnprintf(buf, count, fmt, args); TextPutS(&textwin, buf); free(buf); va_end(args); return count; } size_t MyFWrite(const void *ptr, size_t size, size_t n, FILE *file) { if (isterm(file)) { size_t i; for (i=0; i<n; i++) TextPutCh(&textwin, ((BYTE *)ptr)[i]); TextMessage(); return n; } return fwrite(ptr, size, n, file); } size_t MyFRead(void *ptr, size_t size, size_t n, FILE *file) { if (isterm(file)) { size_t i; for (i=0; i<n; i++) ((BYTE *)ptr)[i] = TextGetChE(&textwin); TextMessage(); return n; } return fread(ptr, size, n, file); } #else /* WGP_CONSOLE */ DWORD WINAPI stdin_pipe_reader(LPVOID param) { #if 0 HANDLE h = (HANDLE)_get_osfhandle(fileno(stdin)); char c; DWORD cRead; if (ReadFile(h, &c, 1, &cRead, NULL)) return c; #else unsigned char c; if (fread(&c, 1, 1, stdin) == 1) return (DWORD)c; return EOF; #endif } int ConsoleGetch() { int fd = fileno(stdin); HANDLE h; DWORD waitResult; if (!isatty(fd)) h = CreateThread(NULL, 0, stdin_pipe_reader, NULL, 0, NULL); else h = (HANDLE)_get_osfhandle(fd); do { waitResult = MsgWaitForMultipleObjects(1, &h, FALSE, INFINITE, QS_ALLINPUT); if (waitResult == WAIT_OBJECT_0) { if (isatty(fd)) { INPUT_RECORD rec; DWORD recRead; ReadConsoleInput(h, &rec, 1, &recRead); if (recRead == 1 && rec.EventType == KEY_EVENT && rec.Event.KeyEvent.bKeyDown && (rec.Event.KeyEvent.wVirtualKeyCode < VK_SHIFT || rec.Event.KeyEvent.wVirtualKeyCode > VK_MENU)) { if (rec.Event.KeyEvent.uChar.AsciiChar) return rec.Event.KeyEvent.uChar.AsciiChar; else switch (rec.Event.KeyEvent.wVirtualKeyCode) { case VK_UP: return 020; case VK_DOWN: return 016; case VK_LEFT: return 002; case VK_RIGHT: return 006; case VK_HOME: return 001; case VK_END: return 005; case VK_DELETE: return 0117; } } } else { DWORD c; GetExitCodeThread(h, &c); CloseHandle(h); return c; } } else if (waitResult == WAIT_OBJECT_0+1) { MSG msg; while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); } } else break; } while (1); } #endif /* WGP_CONSOLE */ /* public interface to printer routines : Windows PRN emulation * (formerly in win.trm) */ #define MAX_PRT_LEN 256 static char win_prntmp[MAX_PRT_LEN+1]; FILE * open_printer() { char *temp; if ((temp = getenv("TEMP")) == (char *)NULL) *win_prntmp='\0'; else { strncpy(win_prntmp,temp,MAX_PRT_LEN); /* stop X's in path being converted by mktemp */ for (temp=win_prntmp; *temp; temp++) *temp = tolower(*temp); if ( strlen(win_prntmp) && (win_prntmp[strlen(win_prntmp)-1]!='\\') ) strcat(win_prntmp,"\\"); } strncat(win_prntmp, "_gptmp",MAX_PRT_LEN-strlen(win_prntmp)); strncat(win_prntmp, "XXXXXX",MAX_PRT_LEN-strlen(win_prntmp)); mktemp(win_prntmp); return fopen(win_prntmp, "w"); } void close_printer(FILE *outfile) { fclose(outfile); DumpPrinter(graphwin->hWndGraph, graphwin->Title, win_prntmp); } void screen_dump() { GraphPrint(graphwin); } void win_raise_terminal_window(int id) { LPGW lpgw = listgraphs; while ((lpgw != NULL) && (lpgw->Id != id)) lpgw = lpgw->next; if (lpgw != NULL) { ShowWindow(lpgw->hWndGraph, SW_SHOWNORMAL); BringWindowToTop(lpgw->hWndGraph); } } void win_raise_terminal_group(void) { LPGW lpgw = listgraphs; while (lpgw != NULL) { ShowWindow(lpgw->hWndGraph, SW_SHOWNORMAL); BringWindowToTop(lpgw->hWndGraph); lpgw = lpgw->next; } } void win_lower_terminal_window(int id) { LPGW lpgw = listgraphs; while ((lpgw != NULL) && (lpgw->Id != id)) lpgw = lpgw->next; if (lpgw != NULL) SetWindowPos(lpgw->hWndGraph, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); } void win_lower_terminal_group(void) { LPGW lpgw = listgraphs; while (lpgw != NULL) { SetWindowPos(lpgw->hWndGraph, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); lpgw = lpgw->next; } } /* return the number of graph windows (win terminal)*/ TBOOLEAN WinWindowOpened(void) { LPGW lpgw; lpgw = listgraphs; while (lpgw != NULL) { if (GraphHasWindow(lpgw)) return TRUE; lpgw = lpgw->next; } return FALSE; } #ifndef WGP_CONSOLE void WinPersistTextClose(void) { TBOOLEAN window_opened = WinWindowOpened(); #ifdef WXWIDGETS window_opened |= wxt_window_opened(); #endif if (!window_opened && (textwin.hWndParent != NULL) && !IsWindowVisible(textwin.hWndParent)) PostMessage(textwin.hWndParent, WM_CLOSE, 0, 0); } #endif void WinMessageLoop(void) { MSG msg; while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { /* HBB 19990505: Petzold says we should check this: */ if (msg.message == WM_QUIT) return; TranslateMessage(&msg); DispatchMessage(&msg); } } void WinRaiseConsole(void) { HWND console = NULL; # ifndef WGP_CONSOLE console = textwin.hWndParent; # else console = GetConsoleWindow(); # endif if (console != NULL) { ShowWindow(console, SW_SHOWNORMAL); BringWindowToTop(console); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wgdiplus.h��������������������������������������������������������������������0000644�0004711�0000144�00000004310�11661406714�013530� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: wgdiplus.h,v 1.4 2011/11/18 07:48:28 markisch Exp $ */ /* Copyright (c) 2011 Bastian Maerkisch. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY Bastian Maerkisch ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifdef __cplusplus extern "C" { #endif #include <windows.h> extern void gdiplusInit(void); extern void gdiplusCleanup(void); extern void gdiplusLine(HDC hdc, POINT x, POINT y, const PLOGPEN logpen); extern void gdiplusLineEx(HDC hdc, POINT x, POINT y, UINT style, float width, COLORREF color); extern void gdiplusPolyline(HDC hdc, POINT *ppt, int polyi, const PLOGPEN logpen); extern void gdiplusPolylineEx(HDC hdc, POINT *ppt, int polyi, UINT style, float width, COLORREF color); extern void gdiplusSolidFilledPolygonEx(HDC hdc, POINT *ppt, int polyi, COLORREF color, double alpha); extern void gdiplusPatternFilledPolygonEx(HDC hdc, POINT *ppt, int polyi, COLORREF color, double alpha, COLORREF backcolor, BOOL transparent, int style); extern void gdiplusCircleEx(HDC hdc, POINT *p, int radius, UINT style, float width, COLORREF color); #ifdef __cplusplus } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wtext.c�����������������������������������������������������������������������0000644�0004711�0000144�00000167130�12166601064�013046� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* *$Id: wtext.c,v 1.37.2.3 2013/07/06 08:28:24 markisch Exp $ */ /* GNUPLOT - win/wtext.c */ /*[ * Copyright 1992, 1993, 1998, 2004 Russell Lang * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Russell Lang */ /* WARNING: Do not write to stdout/stderr with functions not listed in win/wtext.h */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #define STRICT #include <string.h> #include <stdlib.h> #include <ctype.h> #include <dos.h> #ifndef __MSC__ # include <mem.h> #endif #include <sys/stat.h> /* needed for mouse scroll wheel support */ #define _WIN32_WINNT 0x0400 #define _WIN32_IE 0x0501 #include <windows.h> #include <windowsx.h> #include <commdlg.h> #include <commctrl.h> #include "wgnuplib.h" #include "winmain.h" #include "wresourc.h" #include "wcommon.h" #include "stdfn.h" #include "fit.h" /* font stuff */ #define TEXTFONTSIZE 9 #ifndef WGP_CONSOLE #ifndef EOF /* HBB 980809: for MinGW32 */ # define EOF -1 /* instead of using <stdio.h> */ #endif /* limits */ static POINT ScreenMinSize = {16,4}; BOOL CALLBACK AboutDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam); static LRESULT CALLBACK WndParentProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); static LRESULT CALLBACK WndTextProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); static void CreateTextClass(LPTW lptw); static void TextToCursor(LPTW lptw); static void NewLine(LPTW lptw); static void UpdateScrollBars(LPTW lptw); static void UpdateText(LPTW, int); static void TextPutStr(LPTW lptw, LPSTR str); static void LimitMark(LPTW lptw, POINT *lppt); static void ClearMark(LPTW lptw, POINT pt); static void DoLine(LPTW lptw, HDC hdc, int xpos, int ypos, int x, int y, int count); static void DoMark(LPTW lptw, POINT pt, POINT end, BOOL mark); static void UpdateMark(LPTW lptw, POINT pt); static void TextCopyClip(LPTW lptw); static void TextMakeFont(LPTW lptw); static void TextSelectFont(LPTW lptw); static int ReallocateKeyBuf(LPTW lptw); static void UpdateCaretPos(LPTW lptw); static LPSTR GetUInt(LPSTR str, uint *pval); static char szNoMemory[] = "out of memory"; static const COLORREF TextColorTable[16] = { RGB(0,0,0), /* black */ RGB(0,0,128), /* dark blue */ RGB(0,128,0), /* dark green */ RGB(0,128,128), /* dark cyan */ RGB(128,0,0), /* dark red */ RGB(128,0,128), /* dark magenta */ RGB(128,128,0), /* dark yellow */ RGB(128,128,128), /* dark grey */ RGB(192,192,192), /* light grey */ RGB(0,0,255), /* blue */ RGB(0,255,0), /* green */ RGB(0,255,255), /* cyan */ RGB(255,0,0), /* red */ RGB(255,0,255), /* magenta */ RGB(255,255,0), /* yellow */ RGB(255,255,255), /* white */ }; #define NOTEXT 0xF0 #define MARKFORE RGB(255,255,255) #define MARKBACK RGB(0,0,128) #define TextFore(attr) TextColorTable[(attr) & 15] #define TextBack(attr) TextColorTable[(attr>>4) & 15] void WDPROC TextMessage() { WinMessageLoop(); } void CreateTextClass(LPTW lptw) { WNDCLASS wndclass; hdllInstance = lptw->hInstance; /* not using a DLL */ wndclass.style = CS_HREDRAW | CS_VREDRAW; wndclass.lpfnWndProc = WndTextProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 2 * sizeof(void *); wndclass.hInstance = lptw->hInstance; wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); wndclass.hbrBackground = NULL; lptw->hbrBackground = CreateSolidBrush(lptw->bSysColors ? GetSysColor(COLOR_WINDOW) : RGB(0,0,0)); wndclass.lpszMenuName = NULL; wndclass.lpszClassName = szTextClass; RegisterClass(&wndclass); wndclass.style = CS_HREDRAW | CS_VREDRAW; wndclass.lpfnWndProc = WndParentProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 2 * sizeof(void *); wndclass.hInstance = lptw->hInstance; if (lptw->hIcon) wndclass.hIcon = lptw->hIcon; else wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); wndclass.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wndclass.lpszMenuName = NULL; wndclass.lpszClassName = szParentClass; RegisterClass(&wndclass); } /* make text window */ int WDPROC TextInit(LPTW lptw) { RECT rect; HMENU sysmenu; HGLOBAL hglobal; LB lb; ReadTextIni(lptw); if (!lptw->hPrevInstance) CreateTextClass(lptw); if (lptw->KeyBufSize == 0) lptw->KeyBufSize = 256; if (lptw->ScreenSize.x < ScreenMinSize.x) lptw->ScreenSize.x = ScreenMinSize.x; if (lptw->ScreenSize.y < ScreenMinSize.y) lptw->ScreenSize.y = ScreenMinSize.y; lptw->CursorPos.x = 0; lptw->CursorPos.y = 0; lptw->bFocus = FALSE; lptw->bGetCh = FALSE; lptw->CaretHeight = 0; if (!lptw->nCmdShow) lptw->nCmdShow = SW_SHOWNORMAL; if (!lptw->Attr) lptw->Attr = 0xf0; /* black on white */ /* init ScreenBuffer, add emtpy line buffer, initial size has already been read from wgnuplot.ini */ sb_init(&(lptw->ScreenBuffer), lptw->ScreenBuffer.size); /* TODO: add attribute support (NOTEXT) */ lb_init(&lb); sb_append(&(lptw->ScreenBuffer), &lb); hglobal = GlobalAlloc(LHND, lptw->KeyBufSize); lptw->KeyBuf = (BYTE *)GlobalLock(hglobal); if (lptw->KeyBuf == (BYTE *)NULL) { MessageBox((HWND)NULL,szNoMemory,(LPSTR)NULL, MB_ICONHAND | MB_SYSTEMMODAL); return(1); } lptw->KeyBufIn = lptw->KeyBufOut = lptw->KeyBuf; lptw->hWndParent = CreateWindow(szParentClass, lptw->Title, WS_OVERLAPPEDWINDOW, lptw->Origin.x, lptw->Origin.y, lptw->Size.x, lptw->Size.y, NULL, NULL, lptw->hInstance, lptw); if (lptw->hWndParent == (HWND)NULL) { MessageBox((HWND)NULL,"Couldn't open parent text window",(LPSTR)NULL, MB_ICONHAND | MB_SYSTEMMODAL); return(1); } GetClientRect(lptw->hWndParent, &rect); lptw->hWndText = CreateWindow(szTextClass, lptw->Title, WS_CHILD | WS_VSCROLL | WS_HSCROLL, 0, lptw->ButtonHeight, rect.right, rect.bottom - lptw->ButtonHeight, lptw->hWndParent, NULL, lptw->hInstance, lptw); if (lptw->hWndText == (HWND)NULL) { MessageBox((HWND)NULL,"Couldn't open text window",(LPSTR)NULL, MB_ICONHAND | MB_SYSTEMMODAL); return(1); } lptw->hStatusbar = CreateWindowEx(0, STATUSCLASSNAME, (LPSTR)NULL, WS_CHILD | SBARS_SIZEGRIP, 0, 0, 0, 0, lptw->hWndParent, (HMENU)ID_TEXTSTATUS, lptw->hInstance, lptw); if (lptw->hStatusbar) { RECT rect; /* auto-adjust size */ SendMessage(lptw->hStatusbar, WM_SIZE, (WPARAM)0, (LPARAM)0); /* make room */ GetClientRect(lptw->hStatusbar, &rect); lptw->StatusHeight = rect.bottom - rect.top; GetClientRect(lptw->hWndParent, &rect); SetWindowPos(lptw->hWndText, (HWND)NULL, 0, 0, rect.right, rect.bottom - lptw->StatusHeight, SWP_NOZORDER | SWP_NOACTIVATE); ShowWindow(lptw->hStatusbar, TRUE); } lptw->hPopMenu = CreatePopupMenu(); AppendMenu(lptw->hPopMenu, MF_STRING, M_COPY_CLIP, "&Copy to Clipboard\tCtrl-Ins"); AppendMenu(lptw->hPopMenu, MF_STRING, M_PASTE, "&Paste\tShift-Ins"); AppendMenu(lptw->hPopMenu, MF_SEPARATOR, 0, NULL); AppendMenu(lptw->hPopMenu, MF_STRING, M_CHOOSE_FONT, "Choose &Font..."); /* FIXME: Currently not implemented AppendMenu(lptw->hPopMenu, MF_STRING | (lptw->bSysColors ? MF_CHECKED : MF_UNCHECKED), M_SYSCOLORS, "&System Colors"); */ AppendMenu(lptw->hPopMenu, MF_STRING | (lptw->bWrap ? MF_CHECKED : MF_UNCHECKED), M_WRAP, "&Wrap long lines"); if (lptw->IniFile != (LPSTR)NULL) { char buf[MAX_PATH+80]; wsprintf(buf, "&Update %s", lptw->IniFile); AppendMenu(lptw->hPopMenu, MF_STRING, M_WRITEINI, (LPSTR)buf); } sysmenu = GetSystemMenu(lptw->hWndParent,0); /* get the sysmenu */ AppendMenu(sysmenu, MF_SEPARATOR, 0, NULL); AppendMenu(sysmenu, MF_POPUP, (UINT)lptw->hPopMenu, "&Options"); AppendMenu(sysmenu, MF_STRING, M_ABOUT, "&About"); if (lptw->lpmw) LoadMacros(lptw); ShowWindow(lptw->hWndText, SW_SHOWNORMAL); BringWindowToTop(lptw->hWndText); SetFocus(lptw->hWndText); TextMessage(); return(0); } /* close a text window */ void WDPROC TextClose(LPTW lptw) { HGLOBAL hglobal; /* close window */ if (lptw->hWndParent) DestroyWindow(lptw->hWndParent); TextMessage(); /* free the screen buffer */ sb_free(&(lptw->ScreenBuffer)); hglobal = (HGLOBAL)GlobalHandle(lptw->KeyBuf); if (hglobal) { GlobalUnlock(hglobal); GlobalFree(hglobal); } if (lptw->lpmw) CloseMacros(lptw); lptw->hWndParent = (HWND)NULL; } /* Bring the text window to front */ void TextShow(LPTW lptw) { ShowWindow(textwin.hWndParent, textwin.nCmdShow); ShowWindow(lptw->hWndText, SW_SHOWNORMAL); BringWindowToTop(lptw->hWndText); SetFocus(lptw->hWndText); } /* Bring Cursor into text window */ static void TextToCursor(LPTW lptw) { int nXinc=0; int nYinc=0; int cxCursor; int cyCursor; if (lptw->bWrap) cyCursor = (lptw->CursorPos.y + (lptw->CursorPos.x / lptw->ScreenBuffer.wrap_at)) * lptw->CharSize.y; else cyCursor = lptw->CursorPos.y * lptw->CharSize.y; if ((cyCursor + lptw->CharSize.y > lptw->ScrollPos.y + lptw->ClientSize.y) || (cyCursor < lptw->ScrollPos.y)) { nYinc = max(0, cyCursor + lptw->CharSize.y - lptw->ClientSize.y) - lptw->ScrollPos.y; nYinc = min(nYinc, lptw->ScrollMax.y - lptw->ScrollPos.y); } if (lptw->bWrap) cxCursor = (lptw->CursorPos.x % lptw->ScreenBuffer.wrap_at) * lptw->CharSize.x; else cxCursor = lptw->CursorPos.x * lptw->CharSize.x; if ((cxCursor + lptw->CharSize.x > lptw->ScrollPos.x + lptw->ClientSize.x) || (cxCursor < lptw->ScrollPos.x)) { nXinc = max(0, cxCursor + lptw->CharSize.x - lptw->ClientSize.x/2) - lptw->ScrollPos.x; nXinc = min(nXinc, lptw->ScrollMax.x - lptw->ScrollPos.x); } if (nYinc || nXinc) { lptw->ScrollPos.y += nYinc; lptw->ScrollPos.x += nXinc; ScrollWindow(lptw->hWndText, -nXinc, -nYinc, NULL, NULL); SetScrollPos(lptw->hWndText, SB_VERT, lptw->ScrollPos.y, TRUE); SetScrollPos(lptw->hWndText, SB_HORZ, lptw->ScrollPos.x, TRUE); UpdateWindow(lptw->hWndText); } } void NewLine(LPTW lptw) { LB lb; LPLB lplb; int ycorr; int last_lines; /* append an empty line buffer, dismiss previous lines if necessary */ lplb = sb_get_last(&(lptw->ScreenBuffer)); lb_init(&lb); /* return value is the number of lines which got dismissed */ ycorr = sb_append(&(lptw->ScreenBuffer), &lb); /* TODO: add attribute support (NOTEXT) */ last_lines = sb_lines(&(lptw->ScreenBuffer), lplb); lptw->CursorPos.x = 0; lptw->CursorPos.y += last_lines - ycorr; /* did we dismiss some lines ? */ if (ycorr != 0) { if (ycorr > 1) ycorr = ycorr +1 -1; /* make room for new last line */ ScrollWindow(lptw->hWndText, 0, - last_lines * lptw->CharSize.y, NULL, NULL); lptw->ScrollPos.y -= (ycorr - last_lines) * lptw->CharSize.y; lptw->MarkBegin.y -= ycorr; lptw->MarkEnd.y -= ycorr; LimitMark(lptw, &lptw->MarkBegin); LimitMark(lptw, &lptw->MarkEnd); UpdateWindow(lptw->hWndText); } /* maximum line size may have changed, so update scroll bars */ UpdateScrollBars(lptw); UpdateCaretPos(lptw); if (lptw->bFocus && lptw->bGetCh) { UpdateCaretPos(lptw); ShowCaret(lptw->hWndText); } if (lptw->CursorFlag) TextToCursor(lptw); TextMessage(); } static void UpdateScrollBars(LPTW lptw) { signed int length; /* this must be signed for this to work! */ /* horizontal scroll bar */ length = sb_max_line_length(&(lptw->ScreenBuffer)) + 1; if (length > lptw->ScreenSize.x) { /* maximum horizontal scroll position is given by maximum line length */ lptw->ScrollMax.x = max(0, lptw->CharSize.x * length - lptw->ClientSize.x); lptw->ScrollPos.x = min(lptw->ScrollPos.x, lptw->ScrollMax.x); SetScrollRange(lptw->hWndText, SB_HORZ, 0, lptw->ScrollMax.x, FALSE); SetScrollPos(lptw->hWndText, SB_HORZ, lptw->ScrollPos.x, TRUE); ShowScrollBar(lptw->hWndText, SB_HORZ, TRUE); } else { lptw->ScrollMax.x = 0; lptw->ScrollPos.x = 0; ShowScrollBar(lptw->hWndText, SB_HORZ, FALSE); } /* vertical scroll bar */ length = sb_length(&(lptw->ScreenBuffer)); if (length >= lptw->ScreenSize.y) { lptw->ScrollMax.y = max(0, lptw->CharSize.y * length - lptw->ClientSize.y); lptw->ScrollPos.y = min(lptw->ScrollPos.y, lptw->ScrollMax.y); SetScrollRange(lptw->hWndText, SB_VERT, 0, lptw->ScrollMax.y, FALSE); SetScrollPos(lptw->hWndText, SB_VERT, lptw->ScrollPos.y, TRUE); ShowScrollBar(lptw->hWndText, SB_VERT, TRUE); } else { lptw->ScrollMax.y = 0; lptw->ScrollPos.y = 0; ShowScrollBar(lptw->hWndText, SB_VERT, FALSE); } } /* Update count characters in window at cursor position */ /* Updates cursor position */ static void UpdateText(LPTW lptw, int count) { HDC hdc; int xpos, ypos; LPLB lb; if (lptw->CursorPos.x + count > lptw->ScreenSize.x) UpdateScrollBars(lptw); hdc = GetDC(lptw->hWndText); if (lptw->bSysColors) { SetTextColor(hdc, GetSysColor(COLOR_WINDOWTEXT)); SetBkColor(hdc, GetSysColor(COLOR_WINDOW)); } else { /* ignore attribute settings for now */ /* TODO: remove the following line when attribute support is added again */ lptw->Attr = 0xf0; SetTextColor(hdc, TextFore(lptw->Attr)); SetBkColor(hdc, TextBack(lptw->Attr)); } SelectObject(hdc, lptw->hfont); if (lptw->bWrap) { int n, yofs; uint width = lptw->ScreenBuffer.wrap_at; uint x = lptw->CursorPos.x; uint y = lptw->CursorPos.y; /* Always draw complete lines to avoid character overlap when using Cleartype. */ yofs = x / width; /* first line to draw */ n = (x + count - 1) / width + 1 - yofs; /* number of lines */ for (; n > 0; y++, n--) { ypos = (y + yofs) * lptw->CharSize.y - lptw->ScrollPos.y; DoLine(lptw, hdc, 0, ypos, 0, y + yofs, width); } } else { lb = sb_get_last(&(lptw->ScreenBuffer)); xpos = lptw->CursorPos.x * lptw->CharSize.x - lptw->ScrollPos.x; ypos = lptw->CursorPos.y * lptw->CharSize.y - lptw->ScrollPos.y; TextOut(hdc, xpos, ypos, lb->str + lptw->CursorPos.x, count); } lptw->CursorPos.x += count; ReleaseDC(lptw->hWndText, hdc); } int WDPROC TextPutCh(LPTW lptw, BYTE ch) { switch(ch) { case '\r': lptw->CursorPos.x = 0; if (lptw->CursorFlag) TextToCursor(lptw); break; case '\n': NewLine(lptw); break; case 7: MessageBeep(0xFFFFFFFF); if (lptw->CursorFlag) TextToCursor(lptw); break; case '\t': { uint tab = 8 - (lptw->CursorPos.x % 8); sb_last_insert_str(&(lptw->ScreenBuffer), lptw->CursorPos.x, " ", tab); break; } case 0x08: case 0x7f: lptw->CursorPos.x--; if (lptw->CursorPos.x < 0) { lptw->CursorPos.x = lptw->ScreenSize.x - 1; lptw->CursorPos.y--; } if (lptw->CursorPos.y < 0) lptw->CursorPos.y = 0; break; default: { char c = (char)ch; sb_last_insert_str(&(lptw->ScreenBuffer), lptw->CursorPos.x, &c, 1); /* TODO: add attribute support */ UpdateText(lptw, 1); /* maximum line size may have changed, so update scroll bars */ UpdateScrollBars(lptw); TextToCursor(lptw); } } return ch; } void TextPutStr(LPTW lptw, LPSTR str) { int count; uint n; uint idx; while (*str) { idx = lptw->CursorPos.x; for (count = 0, n = 0; *str && (isprint(*str) || *str == '\t'); str++) { if (*str == '\t') { uint tab; tab = 8 - ((lptw->CursorPos.x + count + n) % 8); sb_last_insert_str(&(lptw->ScreenBuffer), idx, str - n, n); sb_last_insert_str(&(lptw->ScreenBuffer), idx + n, " ", tab); /* TODO: add attribute support (lptw->Attr) */ idx += n + tab; count += n + tab; n = 0; } else n++; } if (n != 0) { sb_last_insert_str(&(lptw->ScreenBuffer), idx, str - n, n); count += n; } if (count > 0) UpdateText(lptw, count); if (*str == '\n') { NewLine(lptw); str++; n = 0; } else if (*str && !isprint(*str) && *str != '\t') { TextPutCh(lptw, *str++); } } } static void LimitMark(LPTW lptw, POINT *lppt) { int length; if (lppt->x < 0) lppt->x = 0; if (lppt->y < 0) { lppt->x = 0; lppt->y = 0; } length = sb_max_line_length(&(lptw->ScreenBuffer)); if (lppt->x > length) lppt->x = length; length = sb_length(&(lptw->ScreenBuffer)); if (lppt->y >= length) { lppt->x = 0; lppt->y = length; } } static void ClearMark(LPTW lptw, POINT pt) { RECT rect1, rect2, rect3; int tmp; if ((lptw->MarkBegin.x != lptw->MarkEnd.x) || (lptw->MarkBegin.y != lptw->MarkEnd.y) ) { if (lptw->MarkBegin.x > lptw->MarkEnd.x) { tmp = lptw->MarkBegin.x; lptw->MarkBegin.x = lptw->MarkEnd.x; lptw->MarkEnd.x = tmp; } if (lptw->MarkBegin.y > lptw->MarkEnd.y) { tmp = lptw->MarkBegin.y; lptw->MarkBegin.y = lptw->MarkEnd.y; lptw->MarkEnd.y = tmp; } /* calculate bounding rectangle in character coordinates */ if (lptw->MarkBegin.y != lptw->MarkEnd.y) { rect1.left = 0; rect1.right = lptw->ScreenSize.x; } else { rect1.left = lptw->MarkBegin.x; rect1.right = lptw->MarkEnd.x + 1; } rect1.top = lptw->MarkBegin.y; rect1.bottom = lptw->MarkEnd.y + 1; /* now convert to client coordinates */ rect1.left = rect1.left * lptw->CharSize.x - lptw->ScrollPos.x; rect1.right = rect1.right * lptw->CharSize.x - lptw->ScrollPos.x; rect1.top = rect1.top * lptw->CharSize.y - lptw->ScrollPos.y; rect1.bottom = rect1.bottom * lptw->CharSize.y - lptw->ScrollPos.y; /* get client rect and calculate intersection */ GetClientRect(lptw->hWndText, &rect2); IntersectRect(&rect3, &rect1, &rect2); /* update window if necessary */ if (!IsRectEmpty(&rect3)) { InvalidateRect(lptw->hWndText, &rect3, TRUE); } } LimitMark(lptw, &pt); lptw->MarkBegin.x = lptw->MarkEnd.x = pt.x; lptw->MarkBegin.y = lptw->MarkEnd.y = pt.y; UpdateWindow(lptw->hWndText); } /* output a line including attribute changes as needed */ static void DoLine(LPTW lptw, HDC hdc, int xpos, int ypos, int x, int y, int count) { int idx, num; char *outp; LPLB lb; idx = 0; num = count; if (y <= sb_length(&(lptw->ScreenBuffer))) { lb = sb_get(&(lptw->ScreenBuffer), y); outp = lb_substr(lb, x + idx, count - idx); } else { /* FIXME: actually, we could just do nothing in this case */ outp = (char *) malloc(sizeof(char) * (count + 1)); memset(outp, ' ', count); outp[count] = 0; } /* TODO: add attribute support */ #if 1 if (lptw->bSysColors) { SetTextColor(hdc, GetSysColor(COLOR_WINDOWTEXT)); SetBkColor(hdc, GetSysColor(COLOR_WINDOW)); } else { /* ignore user color right now */ SetTextColor(hdc, TextFore(0xf0)); SetBkColor(hdc, TextBack(0xf0)); } TextOut(hdc, xpos, ypos, outp, count - idx); free(outp); #else while (num > 0) { num = 0; attr = *pa; while ((num > 0) && (attr == *pa)) { /* skip over bytes with same attribute */ num--; pa++; } if (lptw->bSysColors) { SetTextColor(hdc, GetSysColor(COLOR_WINDOWTEXT)); SetBkColor(hdc, GetSysColor(COLOR_WINDOW)); } else { SetTextColor(hdc, TextFore(attr)); SetBkColor(hdc, TextBack(attr)); } outp = lb_substr(lb, x + idx, count - num - idx); TextOut(hdc, xpos, ypos, outp, count - num - idx); free(outp); xpos += lptw->CharSize.x * (count - num - idx); idx = count-num; } #endif } static void DoMark(LPTW lptw, POINT pt, POINT end, BOOL mark) { int xpos, ypos; HDC hdc; int count; hdc = GetDC(lptw->hWndText); SelectObject(hdc, lptw->hfont); if (lptw->bSysColors) { SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT)); SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT)); } else { SetTextColor(hdc, MARKFORE); SetBkColor(hdc, MARKBACK); } while (pt.y < end.y) { /* multiple lines */ xpos = pt.x * lptw->CharSize.x - lptw->ScrollPos.x; ypos = pt.y * lptw->CharSize.y - lptw->ScrollPos.y; count = max(lptw->ScreenSize.x - pt.x, 0); if (mark) { char *s; LPLB lb; lb = sb_get(&(lptw->ScreenBuffer), pt.y); s = lb_substr(lb, pt.x, count); TextOut(hdc, xpos, ypos, s, count); free(s); } else { DoLine(lptw, hdc, xpos, ypos, pt.x, pt.y, count); if (lptw->bSysColors) { SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT)); SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT)); } else { SetTextColor(hdc, MARKFORE); SetBkColor(hdc, MARKBACK); } } pt.y++; pt.x=0; } /* partial line */ xpos = pt.x * lptw->CharSize.x - lptw->ScrollPos.x; ypos = pt.y * lptw->CharSize.y - lptw->ScrollPos.y; count = end.x - pt.x; if (count > 0) { if (mark) { LPLB lb; char *s; lb = sb_get(&(lptw->ScreenBuffer), pt.y); s = lb_substr(lb, pt.x, count); TextOut(hdc, xpos, ypos, s, count); free(s); } else { DoLine(lptw, hdc, xpos, ypos, pt.x, pt.y, count); } } ReleaseDC(lptw->hWndText, hdc); } static void UpdateMark(LPTW lptw, POINT pt) { int begin, point, end; LimitMark(lptw, &pt); begin = lptw->ScreenSize.x * lptw->MarkBegin.y + lptw->MarkBegin.x; point = lptw->ScreenSize.x * pt.y + pt.x; end = lptw->ScreenSize.x * lptw->MarkEnd.y + lptw->MarkEnd.x; if (begin <= end) { /* forward mark */ if (point >= end) { /* extend marked area */ DoMark(lptw, lptw->MarkEnd, pt, TRUE); } else if (point >= begin) { /* retract marked area */ DoMark(lptw, pt, lptw->MarkEnd, FALSE); } else { /* retract and reverse */ DoMark(lptw, lptw->MarkBegin, lptw->MarkEnd, FALSE); DoMark(lptw, pt, lptw->MarkBegin, TRUE); } } else { /* reverse mark */ if (point <= end) { /* extend marked area */ DoMark(lptw, pt, lptw->MarkEnd, TRUE); } else if (point <= begin) { /* retract marked area */ DoMark(lptw, lptw->MarkEnd, pt, FALSE); } else { /* retract and reverse */ DoMark(lptw, lptw->MarkEnd, lptw->MarkBegin, FALSE); DoMark(lptw, lptw->MarkBegin, pt, TRUE); } } lptw->MarkEnd.x = pt.x; lptw->MarkEnd.y = pt.y; } static void TextCopyClip(LPTW lptw) { int size, count; HGLOBAL hGMem; LPSTR cbuf, cp; POINT pt, end; TEXTMETRIC tm; UINT type; HDC hdc; LPLB lb; if ((lptw->MarkBegin.x == lptw->MarkEnd.x) && (lptw->MarkBegin.y == lptw->MarkEnd.y) ) { /* copy user text */ return; } /* calculate maximum total size */ size = 1; /* end of string '\0' */ for (pt.y = lptw->MarkBegin.y; pt.y <= lptw->MarkEnd.y; pt.y++) { LPLB line = sb_get(&(lptw->ScreenBuffer), pt.y); if (line) size += lb_length(line); size += 2; } hGMem = GlobalAlloc(GMEM_MOVEABLE, (DWORD)size); cbuf = cp = (LPSTR)GlobalLock(hGMem); if (cp == (LPSTR)NULL) return; pt.x = lptw->MarkBegin.x; pt.y = lptw->MarkBegin.y; end.x = lptw->MarkEnd.x; end.y = lptw->MarkEnd.y; while (pt.y < end.y) { /* copy to global buffer */ lb = sb_get(&(lptw->ScreenBuffer), pt.y); count = lb_length(lb) - pt.x; if (count > 0) { memcpy(cp, lb->str + pt.x, count); cp += count; } *(cp++) = '\r'; *(cp++) = '\n'; pt.y++; pt.x = 0; } /* partial line */ count = end.x - pt.x; if (count > 0) { lb = sb_get(&(lptw->ScreenBuffer), pt.y); if (lb->len > pt.x) { if (end.x > lb->len) count = lb->len - pt.x; memcpy(cp, lb->str + pt.x, count); cp += count; } } *cp = '\0'; size = _fstrlen(cbuf) + 1; GlobalUnlock(hGMem); hGMem = GlobalReAlloc(hGMem, (DWORD)size, GMEM_MOVEABLE); /* find out what type to put into clipboard */ hdc = GetDC(lptw->hWndText); SelectObject(hdc, lptw->hfont); GetTextMetrics(hdc,(TEXTMETRIC *)&tm); if (tm.tmCharSet == OEM_CHARSET) type = CF_OEMTEXT; else type = CF_TEXT; ReleaseDC(lptw->hWndText, hdc); /* give buffer to clipboard */ OpenClipboard(lptw->hWndParent); EmptyClipboard(); SetClipboardData(type, hGMem); CloseClipboard(); } static void TextMakeFont(LPTW lptw) { LOGFONT lf; TEXTMETRIC tm; LPSTR p; HDC hdc; hdc = GetDC(lptw->hWndText); _fmemset(&lf, 0, sizeof(LOGFONT)); _fstrncpy(lf.lfFaceName,lptw->fontname,LF_FACESIZE); lf.lfHeight = -MulDiv(lptw->fontsize, GetDeviceCaps(hdc, LOGPIXELSY), 72); lf.lfPitchAndFamily = FIXED_PITCH; lf.lfOutPrecision = OUT_OUTLINE_PRECIS; lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; /* ClearType quality is only supported on XP or later */ lf.lfQuality = IsWindowsXPorLater() ? CLEARTYPE_QUALITY : PROOF_QUALITY; lf.lfCharSet = DEFAULT_CHARSET; if ( (p = _fstrstr(lptw->fontname," Italic")) != (LPSTR)NULL ) { lf.lfFaceName[ (unsigned int)(p-lptw->fontname) ] = '\0'; lf.lfItalic = TRUE; } if ( (p = _fstrstr(lptw->fontname," Bold")) != (LPSTR)NULL ) { lf.lfFaceName[ (unsigned int)(p-lptw->fontname) ] = '\0'; lf.lfWeight = FW_BOLD; } if (lptw->hfont != 0) DeleteObject(lptw->hfont); lptw->hfont = CreateFontIndirect((LOGFONT *)&lf); /* get text size */ SelectObject(hdc, lptw->hfont); GetTextMetrics(hdc,(TEXTMETRIC *)&tm); lptw->CharSize.y = tm.tmHeight; lptw->CharSize.x = tm.tmAveCharWidth; lptw->CharAscent = tm.tmAscent; if (lptw->bFocus) CreateCaret(lptw->hWndText, 0, lptw->CharSize.x, 2+lptw->CaretHeight); ReleaseDC(lptw->hWndText, hdc); return; } static void TextSelectFont(LPTW lptw) { LOGFONT lf; CHOOSEFONT cf; HDC hdc; char lpszStyle[LF_FACESIZE]; LPSTR p; /* Set all structure fields to zero. */ _fmemset(&cf, 0, sizeof(CHOOSEFONT)); _fmemset(&lf, 0, sizeof(LOGFONT)); cf.lStructSize = sizeof(CHOOSEFONT); cf.hwndOwner = lptw->hWndParent; _fstrncpy(lf.lfFaceName,lptw->fontname,LF_FACESIZE); if ( (p = _fstrstr(lptw->fontname," Bold")) != (LPSTR)NULL ) { _fstrncpy(lpszStyle,p+1,LF_FACESIZE); lf.lfFaceName[ (unsigned int)(p-lptw->fontname) ] = '\0'; } else if ( (p = _fstrstr(lptw->fontname," Italic")) != (LPSTR)NULL ) { _fstrncpy(lpszStyle,p+1,LF_FACESIZE); lf.lfFaceName[ (unsigned int)(p-lptw->fontname) ] = '\0'; } else _fstrcpy(lpszStyle,"Regular"); cf.lpszStyle = lpszStyle; hdc = GetDC(lptw->hWndText); lf.lfHeight = -MulDiv(lptw->fontsize, GetDeviceCaps(hdc, LOGPIXELSY), 72); ReleaseDC(lptw->hWndText, hdc); lf.lfPitchAndFamily = FIXED_PITCH; cf.lpLogFont = &lf; cf.nFontType = SCREEN_FONTTYPE; cf.Flags = CF_SCREENFONTS | CF_FIXEDPITCHONLY | CF_INITTOLOGFONTSTRUCT | CF_USESTYLE; if (ChooseFont(&cf)) { RECT rect; _fstrcpy(lptw->fontname,lf.lfFaceName); lptw->fontsize = cf.iPointSize / 10; if (cf.nFontType & BOLD_FONTTYPE) lstrcat(lptw->fontname," Bold"); if (cf.nFontType & ITALIC_FONTTYPE) lstrcat(lptw->fontname," Italic"); TextMakeFont(lptw); /* force a window update */ GetClientRect(lptw->hWndText, (LPRECT) &rect); SendMessage(lptw->hWndText, WM_SIZE, SIZE_RESTORED, MAKELPARAM(rect.right-rect.left, rect.bottom-rect.top)); GetClientRect(lptw->hWndText, (LPRECT) &rect); InvalidateRect(lptw->hWndText, (LPRECT) &rect, 1); UpdateWindow(lptw->hWndText); } } /* parent overlapped window */ LRESULT CALLBACK WndParentProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; LPTW lptw; lptw = (LPTW)GetWindowLong(hwnd, 0); switch(message) { case WM_SYSCOMMAND: switch(LOWORD(wParam)) { case M_COPY_CLIP: case M_PASTE: case M_CHOOSE_FONT: case M_SYSCOLORS: case M_WRAP: case M_WRITEINI: case M_ABOUT: SendMessage(lptw->hWndText, WM_COMMAND, wParam, lParam); } break; case WM_SETFOCUS: if (IsWindow(lptw->hWndText)) { SetFocus(lptw->hWndText); return(0); } break; case WM_GETMINMAXINFO: { POINT * MMinfo = (POINT *)lParam; MMinfo[3].x = GetSystemMetrics(SM_CXVSCROLL) + 2*GetSystemMetrics(SM_CXFRAME); MMinfo[3].y = GetSystemMetrics(SM_CYHSCROLL) + 2*GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYMENU); if (lptw) { MMinfo[3].x += ScreenMinSize.x * lptw->CharSize.x; MMinfo[3].y += ScreenMinSize.y * lptw->CharSize.y; MMinfo[3].y += lptw->ButtonHeight + lptw->StatusHeight; } return(0); } case WM_SIZE: if (lParam > 0) { /* Vista sets window size to 0,0 when Windows-D is pressed */ SetWindowPos(lptw->hWndText, (HWND)NULL, 0, lptw->ButtonHeight, LOWORD(lParam), HIWORD(lParam) - lptw->ButtonHeight - lptw->StatusHeight, SWP_NOZORDER | SWP_NOACTIVATE); SendMessage(lptw->lpmw->hToolbar, WM_SIZE, wParam, lParam); SendMessage(lptw->hStatusbar, WM_SIZE, wParam, lParam); } return(0); case WM_COMMAND: if (IsWindow(lptw->hWndText)) SetFocus(lptw->hWndText); SendMessage(lptw->hWndText, message, wParam, lParam); /* pass on menu commands */ return(0); case WM_NOTIFY: switch (((LPNMHDR)lParam)->code) { case TBN_DROPDOWN: { RECT rc; TPMPARAMS tpm; LPNMTOOLBAR lpnmTB = (LPNMTOOLBAR)lParam; SendMessage(lpnmTB->hdr.hwndFrom, TB_GETRECT, (WPARAM)lpnmTB->iItem, (LPARAM)&rc); MapWindowPoints(lpnmTB->hdr.hwndFrom, HWND_DESKTOP, (LPPOINT)&rc, 2); tpm.cbSize = sizeof(TPMPARAMS); tpm.rcExclude = rc; TrackPopupMenuEx(lptw->hPopMenu, TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_VERTICAL, rc.left, rc.bottom, lptw->hWndText, &tpm); return TBDDRET_DEFAULT; } default: return FALSE; } case WM_ERASEBKGND: return 1; case WM_DROPFILES: DragFunc(lptw, (HDROP)wParam); break; case WM_CONTEXTMENU: SendMessage(lptw->hWndText, WM_CONTEXTMENU, wParam, lParam); return 0; case WM_CREATE: { TEXTMETRIC tm; lptw = ((CREATESTRUCT *)lParam)->lpCreateParams; SetWindowLong(hwnd, 0, (LONG)lptw); lptw->hWndParent = hwnd; /* get character size */ TextMakeFont(lptw); hdc = GetDC(hwnd); SelectObject(hdc, lptw->hfont); GetTextMetrics(hdc,(LPTEXTMETRIC)&tm); lptw->CharSize.y = tm.tmHeight; lptw->CharSize.x = tm.tmAveCharWidth; lptw->CharAscent = tm.tmAscent; ReleaseDC(hwnd,hdc); if ( (lptw->DragPre!=(LPSTR)NULL) && (lptw->DragPost!=(LPSTR)NULL) ) DragAcceptFiles(hwnd, TRUE); } break; case WM_DESTROY: DragAcceptFiles(hwnd, FALSE); DeleteObject(lptw->hfont); lptw->hfont = 0; break; case WM_CLOSE: if (lptw->shutdown) { FARPROC lpShutDown = lptw->shutdown; (*lpShutDown)(); } break; } /* switch() */ return DefWindowProc(hwnd, message, wParam, lParam); } /* PM 20011218: Reallocate larger keyboard buffer */ static int ReallocateKeyBuf(LPTW lptw) { int newbufsize = lptw->KeyBufSize + 16*1024; /* new buffer size */ HGLOBAL h_old = (HGLOBAL)GlobalHandle(lptw->KeyBuf); HGLOBAL h = GlobalAlloc(LHND, newbufsize); int pos_in = lptw->KeyBufIn - lptw->KeyBuf; int pos_out = lptw->KeyBufOut - lptw->KeyBuf; BYTE *NewKeyBuf = (BYTE *)GlobalLock(h); if (NewKeyBuf == (BYTE *)NULL) { MessageBox((HWND)NULL, szNoMemory, (LPSTR)NULL, MB_ICONHAND | MB_SYSTEMMODAL); return 1; } if (lptw->KeyBufIn > lptw->KeyBufOut) { /* | Buf ... Out ... In | */ _fmemcpy(NewKeyBuf, lptw->KeyBufOut, lptw->KeyBufIn - lptw->KeyBufOut); lptw->KeyBufIn = NewKeyBuf + (pos_in - pos_out); } else { /* | Buf ... In ... Out ... | */ _fmemcpy(NewKeyBuf, lptw->KeyBufOut, lptw->KeyBufSize - pos_out ); _fmemcpy(NewKeyBuf, lptw->KeyBuf, pos_in ); lptw->KeyBufIn = NewKeyBuf + (lptw->KeyBufSize - pos_out + pos_in); } if (h_old) { GlobalUnlock(h_old); GlobalFree(h_old); } lptw->KeyBufSize = newbufsize; lptw->KeyBufOut = lptw->KeyBuf = NewKeyBuf; return 0; } /* update the position of the cursor */ static void UpdateCaretPos(LPTW lptw) { if (lptw->bWrap) SetCaretPos((lptw->CursorPos.x % lptw->ScreenBuffer.wrap_at) * lptw->CharSize.x - lptw->ScrollPos.x, (lptw->CursorPos.y + (lptw->CursorPos.x / lptw->ScreenBuffer.wrap_at)) * lptw->CharSize.y + lptw->CharAscent - lptw->CaretHeight - lptw->ScrollPos.y); else SetCaretPos(lptw->CursorPos.x * lptw->CharSize.x - lptw->ScrollPos.x, lptw->CursorPos.y * lptw->CharSize.y + lptw->CharAscent - lptw->CaretHeight - lptw->ScrollPos.y); } /* child text window */ LRESULT CALLBACK WndTextProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; RECT rect; int nYinc, nXinc; LPTW lptw; lptw = (LPTW)GetWindowLong(hwnd, 0); switch(message) { case WM_SETFOCUS: lptw->bFocus = TRUE; CreateCaret(hwnd, 0, lptw->CharSize.x, 2+lptw->CaretHeight); UpdateCaretPos(lptw); if (lptw->bGetCh) ShowCaret(hwnd); break; case WM_KILLFOCUS: DestroyCaret(); lptw->bFocus = FALSE; break; case WM_SIZE: { bool caret_visible; int new_wrap; int new_screensize_y = HIWORD(lParam); int new_screensize_x = LOWORD(lParam); new_wrap = lptw->bWrap ? (new_screensize_x / lptw->CharSize.x) : 0; /* is caret visible? */ caret_visible = ((lptw->ScrollPos.y < lptw->CursorPos.y * lptw->CharSize.y) && ((lptw->ScrollPos.y + lptw->ClientSize.y) >= (lptw->CursorPos.y * lptw->CharSize.y))); /* update scroll bar position */ if (!caret_visible) { uint new_x, new_y; /* keep upper left corner in place */ sb_find_new_pos(&(lptw->ScreenBuffer), lptw->ScrollPos.x / lptw->CharSize.x, lptw->ScrollPos.y / lptw->CharSize.y, new_wrap, & new_x, & new_y); lptw->ScrollPos.x = lptw->CharSize.x * new_x + lptw->ScrollPos.x % lptw->CharSize.x; lptw->ScrollPos.y = lptw->CharSize.y * new_y + lptw->ScrollPos.y % lptw->CharSize.y; } else { int xold, yold; int deltax, deltay; uint xnew, ynew; /* keep cursor in place */ xold = lptw->CursorPos.x; yold = lptw->CursorPos.y; if (lptw->ScreenBuffer.wrap_at) { xold %= lptw->ScreenBuffer.wrap_at; yold += lptw->CursorPos.x / lptw->ScreenBuffer.wrap_at; } deltay = GPMAX(lptw->ScrollPos.y + lptw->ClientSize.y - (yold - 1) * lptw->CharSize.y, 0); deltax = xold * lptw->CharSize.x - lptw->ScrollPos.x; sb_find_new_pos(&(lptw->ScreenBuffer), xold, yold, new_wrap, &xnew, &ynew); lptw->ScrollPos.x = GPMAX((xnew * lptw->CharSize.x) - deltax, 0); if ((ynew + 1)* lptw->CharSize.y > new_screensize_y) lptw->ScrollPos.y = GPMAX((ynew * lptw->CharSize.y) + deltay - new_screensize_y, 0); else lptw->ScrollPos.y = 0; } lptw->ClientSize.y = HIWORD(lParam); lptw->ClientSize.x = LOWORD(lParam); lptw->ScreenSize.y = lptw->ClientSize.y / lptw->CharSize.y + 1; lptw->ScreenSize.x = lptw->ClientSize.x / lptw->CharSize.x + 1; if (lptw->bWrap) { uint len; LPLB lb; /* update markers, if necessary */ if ((lptw->MarkBegin.x != lptw->MarkEnd.x) || (lptw->MarkBegin.y != lptw->MarkEnd.y) ) { uint new_x, new_y; sb_find_new_pos(&(lptw->ScreenBuffer), lptw->MarkBegin.x, lptw->MarkBegin.y, lptw->ScreenSize.x - 1, & new_x, & new_y); lptw->MarkBegin.x = new_x; lptw->MarkBegin.y = new_y; sb_find_new_pos(&(lptw->ScreenBuffer), lptw->MarkEnd.x, lptw->MarkEnd.y, lptw->ScreenSize.x - 1, & new_x, & new_y); lptw->MarkEnd.x = new_x; lptw->MarkEnd.y = new_y; } /* set new wrapping: the character at ScreenSize.x is only partially visible, so we wrap one character before */ sb_wrap(&(lptw->ScreenBuffer), new_wrap); /* update y-position of cursor, x-position is adjusted automatically; hint: the cursor is _always_ on the last (logical) line */ len = sb_length(&(lptw->ScreenBuffer)); lb = sb_get_last(&(lptw->ScreenBuffer)); lptw->CursorPos.y = len - sb_lines(&(lptw->ScreenBuffer), lb); if (lptw->CursorPos.y < 0) lptw->CursorPos.y = 0; } UpdateScrollBars(lptw); if (lptw->bFocus && lptw->bGetCh) { UpdateCaretPos(lptw); ShowCaret(hwnd); } return(0); } case WM_VSCROLL: switch(LOWORD(wParam)) { case SB_TOP: nYinc = -lptw->ScrollPos.y; break; case SB_BOTTOM: nYinc = lptw->ScrollMax.y - lptw->ScrollPos.y; break; case SB_LINEUP: nYinc = -lptw->CharSize.y; break; case SB_LINEDOWN: nYinc = lptw->CharSize.y; break; case SB_PAGEUP: nYinc = min(-1, -lptw->ClientSize.y); break; case SB_PAGEDOWN: nYinc = max(1, lptw->ClientSize.y); break; case SB_THUMBTRACK: case SB_THUMBPOSITION: nYinc = HIWORD(wParam) - lptw->ScrollPos.y; break; default: nYinc = 0; } /* switch(loword(wparam)) */ if ((nYinc = max(-lptw->ScrollPos.y, min(nYinc, lptw->ScrollMax.y - lptw->ScrollPos.y))) != 0 ) { lptw->ScrollPos.y += nYinc; ScrollWindow(hwnd, 0, -nYinc, NULL, NULL); SetScrollPos(hwnd, SB_VERT, lptw->ScrollPos.y, TRUE); UpdateWindow(hwnd); } return(0); case WM_HSCROLL: switch(LOWORD(wParam)) { case SB_LINEUP: nXinc = -lptw->CharSize.x; break; case SB_LINEDOWN: nXinc = lptw->CharSize.x; break; case SB_PAGEUP: nXinc = min(-1, -lptw->ClientSize.x); break; case SB_PAGEDOWN: nXinc = max(1, lptw->ClientSize.x); break; case SB_THUMBTRACK: case SB_THUMBPOSITION: nXinc = HIWORD(wParam) - lptw->ScrollPos.x; break; default: nXinc = 0; } /* switch(loword(wparam)) */ if ((nXinc = max(-lptw->ScrollPos.x, min(nXinc, lptw->ScrollMax.x - lptw->ScrollPos.x))) != 0 ) { lptw->ScrollPos.x += nXinc; ScrollWindow(hwnd, -nXinc, 0, NULL, NULL); SetScrollPos(hwnd, SB_HORZ, lptw->ScrollPos.x, TRUE); UpdateWindow(hwnd); } return(0); case WM_KEYDOWN: if (GetKeyState(VK_SHIFT) < 0) { switch(wParam) { case VK_HOME: SendMessage(hwnd, WM_VSCROLL, SB_TOP, (LPARAM)0); break; case VK_END: SendMessage(hwnd, WM_VSCROLL, SB_BOTTOM, (LPARAM)0); break; case VK_PRIOR: SendMessage(hwnd, WM_VSCROLL, SB_PAGEUP, (LPARAM)0); break; case VK_NEXT: SendMessage(hwnd, WM_VSCROLL, SB_PAGEDOWN, (LPARAM)0); break; case VK_UP: SendMessage(hwnd, WM_VSCROLL, SB_LINEUP, (LPARAM)0); break; case VK_DOWN: SendMessage(hwnd, WM_VSCROLL, SB_LINEDOWN, (LPARAM)0); break; case VK_LEFT: SendMessage(hwnd, WM_HSCROLL, SB_LINEUP, (LPARAM)0); break; case VK_RIGHT: SendMessage(hwnd, WM_HSCROLL, SB_LINEDOWN, (LPARAM)0); break; } /* switch(wparam) */ } else { /* if(shift) */ switch(wParam) { case VK_HOME: case VK_END: case VK_PRIOR: case VK_NEXT: case VK_UP: case VK_DOWN: case VK_LEFT: case VK_RIGHT: case VK_DELETE: { /* store key in circular buffer */ long count = lptw->KeyBufIn - lptw->KeyBufOut; if (count < 0) count += lptw->KeyBufSize; if (count < lptw->KeyBufSize-2) { *lptw->KeyBufIn++ = 0; if (lptw->KeyBufIn - lptw->KeyBuf >= lptw->KeyBufSize) lptw->KeyBufIn = lptw->KeyBuf; /* wrap around */ *lptw->KeyBufIn++ = HIWORD(lParam) & 0xff; if (lptw->KeyBufIn - lptw->KeyBuf >= lptw->KeyBufSize) lptw->KeyBufIn = lptw->KeyBuf; /* wrap around */ } } case VK_CANCEL: /* FIXME: Currently, this only supports interrupting fit. */ ctrlc_flag = TRUE; break; } /* switch(wparam) */ } /* else(shift) */ break; case WM_KEYUP: if (GetKeyState(VK_SHIFT) < 0) { switch(wParam) { case VK_INSERT: /* Shift-Insert: paste clipboard */ SendMessage(lptw->hWndText, WM_COMMAND, M_PASTE, (LPARAM)0); break; } } /* if(shift) */ if (GetKeyState(VK_CONTROL) < 0) { switch(wParam) { case VK_INSERT: case 'C': /* Ctrl-Insert: copy to clipboard */ SendMessage(lptw->hWndText, WM_COMMAND, M_COPY_CLIP, (LPARAM)0); break; case 'V': /* Ctrl-V: paste clipboard */ SendMessage(lptw->hWndText, WM_COMMAND, M_PASTE, (LPARAM)0); break; } /* switch(wparam) */ } /* if(Ctrl) */ break; case WM_CONTEXTMENU: { POINT pt; pt.x = GET_X_LPARAM(lParam); pt.y = GET_Y_LPARAM(lParam); if (pt.x == -1) { /* keyboard activation */ pt.x = pt.y = 0; ClientToScreen(hwnd, &pt); } TrackPopupMenu(lptw->hPopMenu, TPM_LEFTALIGN, pt.x, pt.y, 0, hwnd, NULL); return 0; } case WM_LBUTTONDOWN: { /* start marking text */ POINT pt; pt.x = LOWORD(lParam); pt.y = HIWORD(lParam); pt.x = (pt.x + lptw->ScrollPos.x)/lptw->CharSize.x; pt.y = (pt.y + lptw->ScrollPos.y)/lptw->CharSize.y; ClearMark(lptw, pt); SetCapture(hwnd); /* track the mouse */ lptw->Marking = TRUE; break; } case WM_LBUTTONUP: { /* finish marking text */ /* ensure begin mark is before end mark */ ReleaseCapture(); lptw->Marking = FALSE; if ((lptw->ScreenSize.x*lptw->MarkBegin.y + lptw->MarkBegin.x) > (lptw->ScreenSize.x*lptw->MarkEnd.y + lptw->MarkEnd.x)) { POINT tmp; tmp.x = lptw->MarkBegin.x; tmp.y = lptw->MarkBegin.y; lptw->MarkBegin.x = lptw->MarkEnd.x; lptw->MarkBegin.y = lptw->MarkEnd.y; lptw->MarkEnd.x = tmp.x; lptw->MarkEnd.y = tmp.y; } break; } case WM_MOUSEMOVE: if ((wParam & MK_LBUTTON) && lptw->Marking) { RECT rect; POINT pt; pt.x = LOWORD(lParam); pt.y = HIWORD(lParam); GetClientRect(hwnd, &rect); if (PtInRect(&rect, pt)) { pt.x = (pt.x + lptw->ScrollPos.x)/lptw->CharSize.x; pt.y = (pt.y + lptw->ScrollPos.y)/lptw->CharSize.y; UpdateMark(lptw, pt); } else { int nXinc, nYinc; do { nXinc = 0; nYinc = 0; if (pt.x > rect.right) { nXinc = lptw->CharSize.x * 4; pt.x = (rect.right + lptw->ScrollPos.x) / lptw->CharSize.x + 2; } else if (pt.x < rect.left) { nXinc = -lptw->CharSize.x * 4; pt.x = (rect.left + lptw->ScrollPos.x) / lptw->CharSize.x - 2; } else pt.x = (pt.x + lptw->ScrollPos.x) /lptw->CharSize.x; if (pt.y > rect.bottom) { nYinc = lptw->CharSize.y; pt.y = (rect.bottom + lptw->ScrollPos.y) / lptw->CharSize.y + 1; } else if (pt.y < rect.top) { nYinc = -lptw->CharSize.y; pt.y = (rect.top + lptw->ScrollPos.y) / lptw->CharSize.y - 1; } else pt.y = (pt.y + lptw->ScrollPos.y) / lptw->CharSize.y; LimitMark(lptw, &pt); nXinc = max(nXinc, -lptw->ScrollPos.x); nYinc = max(nYinc, -lptw->ScrollPos.y); nYinc = min(nYinc, lptw->ScrollMax.y - lptw->ScrollPos.y); nXinc = min(nXinc, lptw->ScrollMax.x - lptw->ScrollPos.x); if (nYinc || nXinc) { lptw->ScrollPos.y += nYinc; lptw->ScrollPos.x += nXinc; ScrollWindow(lptw->hWndText, -nXinc, -nYinc, NULL, NULL); SetScrollPos(lptw->hWndText, SB_VERT, lptw->ScrollPos.y, TRUE); SetScrollPos(lptw->hWndText, SB_HORZ, lptw->ScrollPos.x, TRUE); UpdateWindow(lptw->hWndText); } UpdateMark(lptw, pt); GetCursorPos(&pt); ScreenToClient(hwnd, &pt); } while((nYinc || nXinc) && !PtInRect(&rect, pt) && (GetAsyncKeyState(VK_LBUTTON) < 0)); } /* moved inside viewport */ } /* if(dragging) */ break; case WM_MOUSEWHEEL: { WORD fwKeys; short int zDelta; fwKeys = LOWORD(wParam); zDelta = HIWORD(wParam); switch (fwKeys) { case 0: if (zDelta < 0) SendMessage(hwnd, WM_VSCROLL, SB_LINEDOWN, (LPARAM)0); else SendMessage(hwnd, WM_VSCROLL, SB_LINEUP, (LPARAM)0); return 0; case MK_SHIFT: if (zDelta < 0) SendMessage(hwnd, WM_VSCROLL, SB_PAGEDOWN, (LPARAM)0); else SendMessage(hwnd, WM_VSCROLL, SB_PAGEUP, (LPARAM)0); return 0; case MK_CONTROL: if (zDelta < 0) SendMessage(hwnd, WM_CHAR, 0x0e, (LPARAM)0); // CTRL-N else SendMessage(hwnd, WM_CHAR, 0x10, (LPARAM)0); // CTRL-P return 0; } } break; case WM_CHAR: { /* store key in circular buffer */ long count = lptw->KeyBufIn - lptw->KeyBufOut; if (count < 0) count += lptw->KeyBufSize; if (count == lptw->KeyBufSize-1) { /* PM 20011218: Keyboard buffer is full, thus reallocate * larger one. (Up to now: forthcoming characters were * silently ignored.) */ if ( ReallocateKeyBuf(lptw) ) return 0; /* not enough memory */ } if (count < lptw->KeyBufSize-1) { *lptw->KeyBufIn++ = wParam; if (lptw->KeyBufIn - lptw->KeyBuf >= lptw->KeyBufSize) lptw->KeyBufIn = lptw->KeyBuf; /* wrap around */ } return 0; } case WM_COMMAND: if (LOWORD(wParam) < NUMMENU) SendMacro(lptw, LOWORD(wParam)); else switch(LOWORD(wParam)) { case M_COPY_CLIP: TextCopyClip(lptw); return 0; case M_PASTE: { HGLOBAL hGMem; BYTE *cbuf; TEXTMETRIC tm; UINT type; /* find out what type to get from clipboard */ hdc = GetDC(hwnd); SelectObject(hdc, lptw->hfont); GetTextMetrics(hdc,(TEXTMETRIC *)&tm); if (tm.tmCharSet == OEM_CHARSET) type = CF_OEMTEXT; else type = CF_TEXT; ReleaseDC(lptw->hWndText, hdc); /* now get it from clipboard */ OpenClipboard(hwnd); hGMem = GetClipboardData(type); if (hGMem) { cbuf = (BYTE *) GlobalLock(hGMem); while (*cbuf) { if (*cbuf != '\n') SendMessage(lptw->hWndText,WM_CHAR,*cbuf,1L); cbuf++; } GlobalUnlock(hGMem); } /* if(hGmem) */ CloseClipboard(); return 0; } case M_CHOOSE_FONT: TextSelectFont(lptw); return 0; case M_SYSCOLORS: lptw->bSysColors = !lptw->bSysColors; if (lptw->bSysColors) CheckMenuItem(lptw->hPopMenu, M_SYSCOLORS, MF_BYCOMMAND | MF_CHECKED); else CheckMenuItem(lptw->hPopMenu, M_SYSCOLORS, MF_BYCOMMAND | MF_UNCHECKED); SendMessage(hwnd, WM_SYSCOLORCHANGE, (WPARAM)0, (LPARAM)0); InvalidateRect(hwnd, (LPRECT)NULL, 1); UpdateWindow(hwnd); return 0; case M_WRAP: { LPLB lb; uint len; uint new_wrap; bool caret_visible; lptw->bWrap = !lptw->bWrap; if (lptw->bWrap) CheckMenuItem(lptw->hPopMenu, M_WRAP, MF_BYCOMMAND | MF_CHECKED); else CheckMenuItem(lptw->hPopMenu, M_WRAP, MF_BYCOMMAND | MF_UNCHECKED); new_wrap = lptw->bWrap ? lptw->ScreenSize.x - 1 : 0; /* update markers, if necessary */ if ((lptw->MarkBegin.x != lptw->MarkEnd.x) || (lptw->MarkBegin.y != lptw->MarkEnd.y) ) { uint new_x, new_y; sb_find_new_pos(&(lptw->ScreenBuffer), lptw->MarkBegin.x, lptw->MarkBegin.y, new_wrap, & new_x, & new_y); lptw->MarkBegin.x = new_x; lptw->MarkBegin.y = new_y; sb_find_new_pos(&(lptw->ScreenBuffer), lptw->MarkEnd.x, lptw->MarkEnd.y, new_wrap, & new_x, & new_y); lptw->MarkEnd.x = new_x; lptw->MarkEnd.y = new_y; } /* is caret visible? */ caret_visible = ((lptw->ScrollPos.y < lptw->CursorPos.y * lptw->CharSize.y) && ((lptw->ScrollPos.y + lptw->ClientSize.y) >= (lptw->CursorPos.y * lptw->CharSize.y))); /* update scroll bar position */ if (!caret_visible) { uint new_x, new_y; /* keep upper left corner in place */ sb_find_new_pos(&(lptw->ScreenBuffer), lptw->ScrollPos.x / lptw->CharSize.x, lptw->ScrollPos.y / lptw->CharSize.y, new_wrap, & new_x, & new_y); lptw->ScrollPos.x = lptw->CharSize.x * new_x; lptw->ScrollPos.y = lptw->CharSize.y * new_y; } else { int xold, yold; int deltax, deltay; uint xnew, ynew; /* keep cursor in place */ xold = lptw->CursorPos.x; yold = lptw->CursorPos.y; if (lptw->ScreenBuffer.wrap_at) { xold %= lptw->ScreenBuffer.wrap_at; yold += lptw->CursorPos.x / lptw->ScreenBuffer.wrap_at; } deltay = GPMAX(lptw->ScrollPos.y + lptw->ClientSize.y - (yold - 1) * lptw->CharSize.y, 0); deltax = xold * lptw->CharSize.x - lptw->ScrollPos.x; sb_find_new_pos(&(lptw->ScreenBuffer), xold, yold, new_wrap, &xnew, &ynew); lptw->ScrollPos.x = GPMAX((xnew * lptw->CharSize.x) - deltax, 0); if ((ynew + 1)* lptw->CharSize.y > lptw->ScreenSize.y) lptw->ScrollPos.y = GPMAX((ynew * lptw->CharSize.y) + deltay - lptw->ScreenSize.y, 0); else lptw->ScrollPos.y = 0; lptw->ScrollPos.x = (xnew * lptw->CharSize.x) - deltax; } /* now switch wrapping */ sb_wrap(&(lptw->ScreenBuffer), new_wrap); /* update y-position of cursor, x-position is adjusted automatically */ len = sb_length(&(lptw->ScreenBuffer)); lb = sb_get_last(&(lptw->ScreenBuffer)); lptw->CursorPos.y = len - sb_lines(&(lptw->ScreenBuffer), lb); UpdateScrollBars(lptw); if (lptw->bFocus && lptw->bGetCh) { UpdateCaretPos(lptw); ShowCaret(hwnd); } InvalidateRect(hwnd, (LPRECT)NULL, 1); UpdateWindow(hwnd); return 0; } case M_WRITEINI: WriteTextIni(lptw); return 0; case M_ABOUT: AboutBox(hwnd,lptw->AboutText); return 0; } /* switch(loword(wparam)) */ return(0); case WM_SYSCOLORCHANGE: DeleteObject(lptw->hbrBackground); lptw->hbrBackground = CreateSolidBrush(lptw->bSysColors ? GetSysColor(COLOR_WINDOW) : RGB(0,0,0)); return(0); case WM_ERASEBKGND: return 1; /* not necessary */ case WM_PAINT: { POINT source, width, dest; POINT MarkBegin, MarkEnd; /* check update region */ if (!GetUpdateRect(hwnd, NULL, FALSE)) return(0); hdc = BeginPaint(hwnd, &ps); SelectObject(hdc, lptw->hfont); SetMapMode(hdc, MM_TEXT); SetBkMode(hdc, OPAQUE); GetClientRect(hwnd, &rect); /* source */ source.x = (rect.left + lptw->ScrollPos.x) / lptw->CharSize.x; source.y = (rect.top + lptw->ScrollPos.y) / lptw->CharSize.y; /* destination */ dest.x = source.x * lptw->CharSize.x - lptw->ScrollPos.x; dest.y = source.y * lptw->CharSize.y - lptw->ScrollPos.y; width.x = ((rect.right + lptw->ScrollPos.x + lptw->CharSize.x - 1) / lptw->CharSize.x) - source.x; width.y = ((rect.bottom + lptw->ScrollPos.y + lptw->CharSize.y - 1) / lptw->CharSize.y) - source.y; if (source.x < 0) source.x = 0; if (source.y < 0) source.y = 0; /* ensure begin mark is before end mark */ if ((lptw->ScreenSize.x * lptw->MarkBegin.y + lptw->MarkBegin.x) > (lptw->ScreenSize.x * lptw->MarkEnd.y + lptw->MarkEnd.x)) { MarkBegin.x = lptw->MarkEnd.x; MarkBegin.y = lptw->MarkEnd.y; MarkEnd.x = lptw->MarkBegin.x; MarkEnd.y = lptw->MarkBegin.y; } else { MarkBegin.x = lptw->MarkBegin.x; MarkBegin.y = lptw->MarkBegin.y; MarkEnd.x = lptw->MarkEnd.x; MarkEnd.y = lptw->MarkEnd.y; } /* for each line */ while (width.y > 0) { if ((source.y >= MarkBegin.y) && (source.y <= MarkEnd.y)) { int start, end; int count, offset; if (source.y == MarkBegin.y) start = MarkBegin.x; else start = 0; if (source.y == MarkEnd.y) end = MarkEnd.x; else end = lptw->ScreenSize.x; /* do stuff before marked text */ offset = 0; count = start - source.x; if (count > 0) DoLine(lptw, hdc, dest.x, dest.y, source.x, source.y, count); /* then the marked text */ offset += count; count = end - start; if ((count > 0) && (offset < width.x)){ LPLB lb; char *s; if (lptw->bSysColors) { SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT)); SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT)); } else { SetTextColor(hdc, MARKFORE); SetBkColor(hdc, MARKBACK); } lb = sb_get(&(lptw->ScreenBuffer), source.y); s = lb_substr(lb, source.x + offset, count); TextOut(hdc, dest.x + lptw->CharSize.x * offset, dest.y, s, count); free(s); } /* then stuff after marked text */ offset += count; count = width.x + source.x - end; if ((count > 0) && (offset < width.x)) DoLine(lptw, hdc, dest.x + lptw->CharSize.x * offset, dest.y, source.x + offset, source.y, count); } else { DoLine(lptw, hdc, dest.x, dest.y, source.x, source.y, width.x); } dest.y += lptw->CharSize.y; source.y++; width.y--; } EndPaint(hwnd, &ps); return 0; } case WM_CREATE: lptw = ((CREATESTRUCT *)lParam)->lpCreateParams; SetWindowLong(hwnd, 0, (LONG)lptw); lptw->hWndText = hwnd; break; case WM_DESTROY: DeleteObject(lptw->hbrBackground); break; } /* switch(message) */ return DefWindowProc(hwnd, message, wParam, lParam); } /* ================================== */ /* replacement stdio routines */ /* TRUE if key hit, FALSE if no key */ int WDPROC TextKBHit(LPTW lptw) { return (lptw->KeyBufIn != lptw->KeyBufOut); } /* get character from keyboard, no echo */ /* need to add extended codes */ int WDPROC TextGetCh(LPTW lptw) { int ch; TextToCursor(lptw); lptw->bGetCh = TRUE; if (lptw->bFocus) { UpdateCaretPos(lptw); ShowCaret(lptw->hWndText); } while (!TextKBHit(lptw)) { /* CMW: can't use TextMessage here as it does not idle properly */ MSG msg; GetMessage(&msg, 0, 0, 0); TranslateMessage(&msg); DispatchMessage(&msg); } ch = *lptw->KeyBufOut++; if (ch=='\r') ch = '\n'; if (lptw->KeyBufOut - lptw->KeyBuf >= lptw->KeyBufSize) lptw->KeyBufOut = lptw->KeyBuf; /* wrap around */ if (lptw->bFocus) HideCaret(lptw->hWndText); lptw->bGetCh = FALSE; return ch; } /* get character from keyboard, with echo */ int WDPROC TextGetChE(LPTW lptw) { int ch; ch = TextGetCh(lptw); TextPutCh(lptw, (BYTE)ch); return ch; } LPSTR WDPROC TextGetS(LPTW lptw, LPSTR str, unsigned int size) { LPSTR next = str; while (--size>0) { switch(*next = TextGetChE(lptw)) { case EOF: *next = 0; if (next == str) return (LPSTR) NULL; return str; case '\n': *(next+1) = 0; return str; case 0x08: case 0x7f: if (next > str) --next; break; default: ++next; } } *next = 0; return str; } int WDPROC TextPutS(LPTW lptw, LPSTR str) { TextPutStr(lptw, str); return str[_fstrlen(str)-1]; } void WDPROC TextAttr(LPTW lptw, BYTE attr) { lptw->Attr = attr; } #endif /* WGP_CONSOLE */ void DragFunc(LPTW lptw, HDROP hdrop) { int i, cFiles; LPSTR p; struct stat buf; if ((lptw->DragPre==(LPSTR)NULL) || (lptw->DragPost==(LPSTR)NULL)) return; cFiles = DragQueryFile(hdrop, (UINT) -1, (LPSTR)NULL, 0); for (i=0; i<cFiles; i++) { char szFile[MAX_PATH]; DragQueryFile(hdrop, i, szFile, MAX_PATH); stat(szFile, &buf); if (buf.st_mode & S_IFDIR) for (p="cd '"; *p; p++) SendMessage(lptw->hWndText,WM_CHAR,*p,1L); else for (p=lptw->DragPre; *p; p++) SendMessage(lptw->hWndText,WM_CHAR,*p,1L); for (p=szFile; *p; p++) SendMessage(lptw->hWndText,WM_CHAR,*p,1L); for (p=lptw->DragPost; *p; p++) SendMessage(lptw->hWndText,WM_CHAR,*p,1L); } DragFinish(hdrop); } void WriteTextIni(LPTW lptw) { RECT rect; LPSTR file = lptw->IniFile; LPSTR section = lptw->IniSection; char profile[80]; int iconic; if ((file == (LPSTR)NULL) || (section == (LPSTR)NULL)) return; iconic = IsIconic(lptw->hWndParent); if (iconic) ShowWindow(lptw->hWndParent, SW_SHOWNORMAL); GetWindowRect(lptw->hWndParent,&rect); wsprintf(profile, "%d %d", rect.left, rect.top); WritePrivateProfileString(section, "TextOrigin", profile, file); wsprintf(profile, "%d %d", rect.right-rect.left, rect.bottom-rect.top); WritePrivateProfileString(section, "TextSize", profile, file); wsprintf(profile, "%d", iconic); WritePrivateProfileString(section, "TextMinimized", profile, file); wsprintf(profile, "%s,%d", lptw->fontname, lptw->fontsize); WritePrivateProfileString(section, "TextFont", profile, file); wsprintf(profile, "%d", lptw->bWrap); WritePrivateProfileString(section, "TextWrap", profile, file); wsprintf(profile, "%d", lptw->ScreenBuffer.size - 1); WritePrivateProfileString(section, "TextLines", profile, file); wsprintf(profile, "%d", lptw->bSysColors); WritePrivateProfileString(section, "SysColors", profile, file); if (iconic) ShowWindow(lptw->hWndParent, SW_SHOWMINIMIZED); return; } /* Helper function to avoid signedness conflict --- windows delivers an INT, we want an uint */ static LPSTR GetUInt(LPSTR str, uint *pval) { INT val_fromGetInt; str = GetInt(str, &val_fromGetInt); *pval = (uint)val_fromGetInt; return str; } void ReadTextIni(LPTW lptw) { LPSTR file = lptw->IniFile; LPSTR section = lptw->IniSection; char profile[81]; LPSTR p; BOOL bOKINI; bOKINI = (file != (LPSTR)NULL) && (section != (LPSTR)NULL); profile[0] = '\0'; if (bOKINI) GetPrivateProfileString(section, "TextOrigin", "", profile, 80, file); if ( (p = GetInt(profile, (LPINT)&lptw->Origin.x)) == NULL) lptw->Origin.x = CW_USEDEFAULT; if ( (p = GetInt(p, (LPINT)&lptw->Origin.y)) == NULL) lptw->Origin.y = CW_USEDEFAULT; if ( (file != (LPSTR)NULL) && (section != (LPSTR)NULL) ) GetPrivateProfileString(section, "TextSize", "", profile, 80, file); if ( (p = GetInt(profile, (LPINT)&lptw->Size.x)) == NULL) lptw->Size.x = CW_USEDEFAULT; if ( (p = GetInt(p, (LPINT)&lptw->Size.y)) == NULL) lptw->Size.y = CW_USEDEFAULT; if (bOKINI) GetPrivateProfileString(section, "TextFont", "", profile, 80, file); { char *size; size = _fstrchr(profile,','); if (size) { *size++ = '\0'; if ( (p = GetInt(size, &lptw->fontsize)) == NULL) lptw->fontsize = TEXTFONTSIZE; } if (lptw->fontsize == 0) lptw->fontsize = TEXTFONTSIZE; _fstrcpy(lptw->fontname, profile); if (!(*lptw->fontname)) { if (GetACP() == 932) /* Japanese Shift-JIS */ strcpy(lptw->fontname, "MS Gothic"); else { /* select a default type face depending on the OS version */ OSVERSIONINFO versionInfo; ZeroMemory(&versionInfo, sizeof(OSVERSIONINFO)); versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&versionInfo); if (versionInfo.dwMajorVersion >= 6) /* Vista or later */ strcpy(lptw->fontname, "Consolas"); else if ((versionInfo.dwMajorVersion == 5) && (versionInfo.dwMinorVersion >= 1)) /* Windows XP */ strcpy(lptw->fontname, "Lucida Console"); else /* Windows 2000 or earlier */ strcpy(lptw->fontname, "Courier New"); } } } if (bOKINI) { int iconic; GetPrivateProfileString(section, "TextMinimized", "", profile, 80, file); if ((p = GetInt(profile, &iconic)) == NULL) iconic = 0; if (iconic) lptw->nCmdShow = SW_SHOWMINIMIZED; } lptw->bSysColors = FALSE; GetPrivateProfileString(section, "SysColors", "", profile, 80, file); if ((p = GetInt(profile, &lptw->bSysColors)) == NULL) lptw->bSysColors = 0; /* autowrapping is activated by default */ GetPrivateProfileString(section, "TextWrap", "", profile, 80, file); if ((p = GetInt(profile, &lptw->bWrap)) == NULL) lptw->bWrap = TRUE; sb_wrap(&(lptw->ScreenBuffer), lptw->bWrap ? 80 : 0); /* length of screen buffer (unwrapped lines) */ GetPrivateProfileString(section, "TextLines", "", profile, 80, file); if ((p = GetUInt(profile, &lptw->ScreenBuffer.size)) == NULL) lptw->ScreenBuffer.size = 400; } /* About Box */ BOOL CALLBACK AboutDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam) { switch (wMsg) { case WM_INITDIALOG: { char buf[80]; GetWindowText(GetParent(hDlg),buf,80); SetDlgItemText(hDlg, AB_TEXT1, buf); SetDlgItemText(hDlg, AB_TEXT2, (LPSTR)lParam); return TRUE; } case WM_DRAWITEM: { LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)lParam; DrawIcon(lpdis->hDC, 0, 0, (HICON)GetClassLong(GetParent(hDlg), GCL_HICON)); return FALSE; } case WM_COMMAND: switch (LOWORD(wParam)) { case IDCANCEL: case IDOK: EndDialog(hDlg, LOWORD(wParam)); return TRUE; } break; } /* switch(message) */ return FALSE; } void WDPROC AboutBox(HWND hwnd, LPSTR str) { DialogBoxParam(hdllInstance, "AboutDlgBox", hwnd, AboutDlgProc, (LPARAM)str); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/win/wgnuplib.rc�������������������������������������������������������������������0000644�0004711�0000144�00000011732�11544425721�013703� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#define WINVER 0x0410 #include <windows.h> #include "wresourc.h" InputDlgBox DIALOGEX 64, 32, 150, 57 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Input" FONT 10, "MS Shell Dlg" BEGIN CONTROL "", ID_PROMPT, "static", SS_LEFT | WS_GROUP | WS_CHILD, 6, 5, 138, 10 CONTROL "", ID_ANSWER, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | WS_CHILD, 6, 17, 138, 12 CONTROL "&Ok", IDOK, "button", BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP | WS_CHILD, 30, 36, 30, 15 CONTROL "&Cancel", IDCANCEL, "button", BS_PUSHBUTTON | WS_GROUP | WS_TABSTOP | WS_CHILD, 90, 36, 30, 15 END PrintSizeDlgBox DIALOGEX 16, 32, 210, 96 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE FONT 10, "MS Shell Dlg" CAPTION "Print Size" BEGIN DEFPUSHBUTTON "OK", IDOK, 168, 16, 33, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 168, 40, 34, 14 CONTROL "Size", PSIZE_SBOX, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE | WS_GROUP, 6, 2, 153, 58 CONTROL "&Default Size", PSIZE_DEF, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 11, 52, 10 CONTROL "&Other Size", PSIZE_OTHER, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 34, 52, 10 RTEXT "Width", -1, 30, 23, 24, 8, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP CONTROL "", PSIZE_DEFX, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 57, 23, 16, 8 LTEXT "mm", -1, 74, 23, 12, 8 RTEXT "Height", -1, 97, 23, 24, 8, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP CONTROL "", PSIZE_DEFY, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 125, 23, 16, 8 LTEXT "mm", -1, 142, 23, 12, 8 RTEXT "Width", -1, 30, 46, 24, 8, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP CONTROL "120", PSIZE_X, "EDIT", ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 56, 44, 16, 12 LTEXT "mm", -1, 74, 46, 12, 8 LTEXT "Height", -1, 100, 46, 24, 8 CONTROL "90", PSIZE_Y, "EDIT", ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 124, 44, 16, 12 LTEXT "mm", -1, 142, 46, 12, 8 CONTROL "Page Offset", PSIZE_OFFBOX, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE | WS_GROUP, 6, 64, 153, 27 RTEXT "Left", -1, 29, 76, 24, 8, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP CONTROL "0", PSIZE_OFFX, "EDIT", ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 56, 74, 16, 12 LTEXT "mm", -1, 74, 76, 12, 8 RTEXT "Top", -1, 100, 76, 21, 8, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP CONTROL "0", PSIZE_OFFY, "EDIT", ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 124, 74, 16, 12 LTEXT "mm", -1, 142, 76, 12, 8 END CancelDlgBox DIALOGEX 32, 40, 120, 48 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE FONT 10, "MS Shell Dlg" BEGIN CTEXT "Printing", -1, 8, 4, 104, 8, WS_CHILD | WS_VISIBLE | WS_GROUP CTEXT "", CANCEL_PCDONE, 8, 16, 104, 8, WS_CHILD | WS_VISIBLE | WS_GROUP CONTROL "&Cancel", IDCANCEL, "button", BS_PUSHBUTTON | WS_GROUP | WS_TABSTOP | WS_CHILD, 44, 30, 32, 14 END LineStyleDlgBox DIALOGEX 16, 32, 172, 137 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 10, "MS Shell Dlg" CAPTION "Line Styles" BEGIN CONTROL "", LS_LINENUM, "LISTBOX", LBS_NOTIFY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 8, 8, 49, 47 CONTROL "Monochrome", LS_MONOBOX, "button", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 72, 4, 92, 52 CONTROL "Color", LS_COLORBOX, "button", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 8, 60, 156, 52 LTEXT "Style", -1, 80, 20, 22, 8, WS_CHILD | WS_VISIBLE | WS_GROUP CONTROL "", LS_MONOSTYLE, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 106, 18, 52, 52 LTEXT "Width", -1, 80, 40, 20, 8, WS_CHILD | WS_VISIBLE | WS_GROUP EDITTEXT LS_MONOWIDTH, 106, 38, 16, 12 PUSHBUTTON "&Choose Color", LS_CHOOSECOLOR, 16, 92, 52, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP CONTROL "", LS_COLORSAMPLE, "BUTTON", BS_OWNERDRAW | WS_CHILD | WS_VISIBLE, 36, 75, 12, 8 LTEXT "Style", -1, 80, 76, 20, 8, WS_CHILD | WS_VISIBLE | WS_GROUP CONTROL "", LS_COLORSTYLE, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 106, 74, 52, 52 LTEXT "Width", -1, 80, 96, 19, 8, WS_CHILD | WS_VISIBLE | WS_GROUP EDITTEXT LS_COLORWIDTH, 106, 94, 16, 12 PUSHBUTTON "OK", IDOK, 16, 118, 32, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 70, 118, 32, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "&Default", LS_DEFAULT, 124, 118, 32, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END AboutDlgBox DIALOGEX 32, 32, 180, 80 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 10, "MS Shell Dlg" CAPTION "About" BEGIN CONTROL "", AB_ICON, "BUTTON", BS_OWNERDRAW | WS_CHILD | WS_VISIBLE, 4, 4, 16, 16 LTEXT "", AB_TEXT1, 24, 8, 96, 10 PUSHBUTTON "OK", IDOK, 142, 6, 32, 12 LTEXT "", AB_TEXT2, 4, 22, 172, 48 LTEXT "", AB_TEXT3, 4, 70, 172, 48 END IDC_SCALING CURSOR "scaling.cur" IDC_ROTATING CURSOR "rotating.cur" ��������������������������������������gnuplot-4.6.4/src/parse.h���������������������������������������������������������������������������0000644�0004711�0000144�00000007441�12044303264�012207� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: parse.h,v 1.25.2.1 2012/10/31 20:14:44 sfeam Exp $ */ /* GNUPLOT - parse.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef PARSE_H # define PARSE_H # include "syscfg.h" # include "gp_types.h" #include "eval.h" /* externally usable types defined by parse.h */ /* exported variables of parse.c */ extern TBOOLEAN scanning_range_in_progress; /* The choice of dummy variables, as set by 'set dummy', 'set polar' * and 'set parametric' */ extern char set_dummy_var[MAX_NUM_VAR][MAX_ID_LEN+1]; /* the currently used 'dummy' variables. Usually a copy of * set_dummy_var, but may be changed by the '(s)plot' command * containing an explicit range (--> 'plot [phi=0..pi]') */ extern char c_dummy_var[MAX_NUM_VAR][MAX_ID_LEN+1]; /* This is used by plot_option_using() */ extern int at_highest_column_used; /* This is checked by df_readascii() */ extern TBOOLEAN parse_1st_row_as_headers; /* Prototypes of exported functions in parse.c */ int int_expression __PROTO(()); double real_expression __PROTO(()); void parse_reset_after_error __PROTO(()); struct value * const_string_express __PROTO((struct value *valptr)); struct value * const_express __PROTO((struct value *valptr)); char* string_or_express __PROTO((struct at_type **atptr)); struct at_type * temp_at __PROTO((void)); struct at_type * perm_at __PROTO((void)); struct at_type * create_call_column_at __PROTO((char *)); struct udvt_entry * add_udv __PROTO((int t_num)); struct udft_entry * add_udf __PROTO((int t_num)); void cleanup_udvlist __PROTO((void)); /* Code that uses the iteration routines here must provide */ /* a blank iteration structure to use for bookkeeping. */ typedef struct iterator { struct iterator *next; /* doubly linked list */ struct iterator *prev; struct udvt_entry *iteration_udv; char *iteration_string; int iteration_start; int iteration_end; int iteration_increment; int iteration_current; int iteration; TBOOLEAN done; TBOOLEAN really_done; TBOOLEAN empty_iteration; } t_iterator; extern t_iterator * plot_iterator; /* Used for plot and splot */ extern t_iterator * set_iterator; /* Used by set/unset commands */ /* These are used by the iteration code */ t_iterator * check_for_iteration __PROTO((void)); TBOOLEAN next_iteration __PROTO((t_iterator *)); TBOOLEAN empty_iteration __PROTO((t_iterator *)); t_iterator * cleanup_iteration __PROTO((t_iterator *)); #endif /* PARSE_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/tabulate.h������������������������������������������������������������������������0000644�0004711�0000144�00000000571�10614457241�012701� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: tabulate.h,v 1.1 2007/04/27 20:35:45 sfeam Exp $ */ /* GNUPLOT - tabulate.h */ #ifndef GNUPLOT_TABULATE_H # define GNUPLOT_TABULATE_H #include "syscfg.h" /* Routines in tabulate.c needed by other modules: */ void print_table __PROTO((struct curve_points * first_plot, int plot_num)); void print_3dtable __PROTO((int pcount)); #endif /* GNUPLOT_TABULATE_H */ ���������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/show.c����������������������������������������������������������������������������0000644�0004711�0000144�00000252464�12036420415�012056� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: show.c,v 1.261.2.4 2012/10/13 18:30:47 sfeam Exp $"); } #endif /* GNUPLOT - show.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * 19 September 1992 Lawrence Crowl (crowl@cs.orst.edu) * Added user-specified bases for log scaling. */ #include "setshow.h" #include "alloc.h" #include "axis.h" #include "command.h" #include "contour.h" #include "datafile.h" #include "eval.h" #include "fit.h" #include "gp_time.h" #include "graphics.h" #include "hidden3d.h" #include "misc.h" #include "gp_hist.h" #include "plot2d.h" #include "plot3d.h" #include "save.h" #include "tables.h" #include "util.h" #include "term_api.h" #include "variable.h" #include "version.h" #ifdef USE_MOUSE # include "mouse.h" #endif #include "color.h" #include "pm3d.h" #include "getcolor.h" #include <ctype.h> #ifdef WIN32 #include "win/winmain.h" #endif /******** Local functions ********/ static void show_at __PROTO((void)); static void disp_at __PROTO((struct at_type *, int)); static void show_all __PROTO((void)); static void show_autoscale __PROTO((void)); static void show_bars __PROTO((void)); static void show_border __PROTO((void)); static void show_boxwidth __PROTO((void)); static void show_boxplot __PROTO((void)); static void show_fillstyle __PROTO((void)); static void show_clip __PROTO((void)); static void show_contour __PROTO((void)); static void show_dgrid3d __PROTO((void)); static void show_label_contours __PROTO((void)); #ifdef GP_MACROS static void show_macros __PROTO((void)); #endif static void show_mapping __PROTO((void)); static void show_dummy __PROTO((void)); static void show_format __PROTO((void)); static void show_styles __PROTO((const char *name, enum PLOT_STYLE style)); static void show_style __PROTO((void)); #ifdef EAM_OBJECTS static void show_style_rectangle __PROTO((void)); static void show_style_circle __PROTO((void)); static void show_style_ellipse __PROTO((void)); #endif static void show_grid __PROTO((void)); static void show_raxis __PROTO((void)); static void show_zeroaxis __PROTO((AXIS_INDEX)); static void show_label __PROTO((int tag)); static void show_keytitle __PROTO((void)); static void show_key __PROTO((void)); static void show_logscale __PROTO((void)); static void show_offsets __PROTO((void)); static void show_margin __PROTO((void)); static void show_output __PROTO((void)); static void show_parametric __PROTO((void)); static void show_pm3d __PROTO((void)); static void show_palette __PROTO((void)); static void show_palette_rgbformulae __PROTO((void)); static void show_palette_fit2rgbformulae __PROTO((void)); static void show_palette_palette __PROTO((void)); static void show_palette_gradient __PROTO((void)); static void show_palette_colornames __PROTO((void)); static void show_colorbox __PROTO((void)); static void show_pointsize __PROTO((void)); static void show_pointintervalbox __PROTO((void)); static void show_encoding __PROTO((void)); static void show_decimalsign __PROTO((void)); static void show_fit __PROTO((void)); static void show_polar __PROTO((void)); static void show_print __PROTO((void)); static void show_psdir __PROTO((void)); static void show_angles __PROTO((void)); static void show_samples __PROTO((void)); static void show_isosamples __PROTO((void)); static void show_view __PROTO((void)); static void show_surface __PROTO((void)); static void show_hidden3d __PROTO((void)); static void show_increment __PROTO((void)); static void show_histogram __PROTO((void)); #ifdef GNUPLOT_HISTORY static void show_historysize __PROTO((void)); #endif static void show_size __PROTO((void)); static void show_origin __PROTO((void)); static void show_term __PROTO((void)); static void show_tics __PROTO((TBOOLEAN showx, TBOOLEAN showy, TBOOLEAN showz, TBOOLEAN showx2, TBOOLEAN showy2, TBOOLEAN showcb)); static void show_mtics __PROTO((AXIS_INDEX)); static void show_timestamp __PROTO((void)); static void show_range __PROTO((AXIS_INDEX axis)); static void show_xyzlabel __PROTO((const char *name, const char *suffix, text_label * label)); static void show_title __PROTO((void)); static void show_axislabel __PROTO((AXIS_INDEX)); static void show_data_is_timedate __PROTO((AXIS_INDEX)); static void show_timefmt __PROTO((void)); static void show_locale __PROTO((void)); static void show_loadpath __PROTO((void)); static void show_fontpath __PROTO((void)); static void show_zero __PROTO((void)); static void show_datafile __PROTO((void)); #ifdef USE_MOUSE static void show_mouse __PROTO((void)); #endif static void show_plot __PROTO((void)); static void show_variables __PROTO((void)); static void show_linestyle __PROTO((int tag)); static void show_linetype __PROTO((int tag)); static void show_arrowstyle __PROTO((int tag)); static void show_arrow __PROTO((int tag)); static void show_ticdef __PROTO((AXIS_INDEX)); static void show_position __PROTO((struct position * pos)); static void show_functions __PROTO((void)); static char *num_to_str __PROTO((double r)); static int var_show_all = 0; /* following code segment appears over and over again */ #define SHOW_NUM_OR_TIME(x, axis) SAVE_NUM_OR_TIME(stderr, x, axis) #define SHOW_ALL_NL { if (!var_show_all) (void) putc('\n',stderr); } /******* The 'show' command *******/ void show_command() { enum set_id token_found; int tag =0; char *error_message = NULL; c_token++; token_found = lookup_table(&set_tbl[0],c_token); /* rationalize c_token advancement stuff a bit: */ if (token_found != S_INVALID) c_token++; switch(token_found) { case S_ACTIONTABLE: show_at(); break; case S_ALL: show_all(); break; case S_VERSION: show_version(stderr); break; case S_AUTOSCALE: show_autoscale(); break; case S_BARS: show_bars(); break; case S_BIND: while (!END_OF_COMMAND) c_token++; c_token--; bind_command(); break; case S_BORDER: show_border(); break; case S_BOXWIDTH: show_boxwidth(); break; case S_CLIP: show_clip(); break; case S_CLABEL: /* contour labels are shown with 'show contour' */ case S_CONTOUR: case S_CNTRPARAM: show_contour(); break; case S_DGRID3D: show_dgrid3d(); break; #ifdef GP_MACROS case S_MACROS: show_macros(); break; #endif case S_MAPPING: show_mapping(); break; case S_DUMMY: show_dummy(); break; case S_FORMAT: show_format(); break; case S_FUNCTIONS: show_functions(); break; case S_GRID: show_grid(); break; case S_RAXIS: show_raxis(); break; case S_ZEROAXIS: show_zeroaxis(FIRST_X_AXIS); show_zeroaxis(FIRST_Y_AXIS); show_zeroaxis(FIRST_Z_AXIS); break; case S_XZEROAXIS: show_zeroaxis(FIRST_X_AXIS); break; case S_YZEROAXIS: show_zeroaxis(FIRST_Y_AXIS); break; case S_X2ZEROAXIS: show_zeroaxis(SECOND_X_AXIS); break; case S_Y2ZEROAXIS: show_zeroaxis(SECOND_Y_AXIS); break; case S_ZZEROAXIS: show_zeroaxis(FIRST_Z_AXIS); break; #define CHECK_TAG_GT_ZERO \ if (!END_OF_COMMAND) { \ tag = int_expression(); \ if (tag <= 0) { \ error_message = "tag must be > zero"; \ break; \ } \ } \ (void) putc('\n',stderr); case S_LABEL: CHECK_TAG_GT_ZERO; show_label(tag); break; case S_ARROW: CHECK_TAG_GT_ZERO; show_arrow(tag); break; case S_LINESTYLE: CHECK_TAG_GT_ZERO; show_linestyle(tag); break; case S_LINETYPE: CHECK_TAG_GT_ZERO; show_linetype(tag); break; case S_KEYTITLE: show_keytitle(); break; case S_KEY: show_key(); break; case S_LOGSCALE: show_logscale(); break; case S_OFFSETS: show_offsets(); break; case S_LMARGIN: /* HBB 20010525: handle like 'show margin' */ case S_RMARGIN: case S_TMARGIN: case S_BMARGIN: case S_MARGIN: show_margin(); break; case SET_OUTPUT: show_output(); break; case S_PARAMETRIC: show_parametric(); break; case S_PM3D: show_pm3d(); break; case S_PALETTE: show_palette(); break; case S_COLORBOX: show_colorbox(); break; case S_COLORNAMES: c_token--; show_palette_colornames(); break; case S_POINTINTERVALBOX: show_pointintervalbox(); break; case S_POINTSIZE: show_pointsize(); break; case S_DECIMALSIGN: show_decimalsign(); break; case S_ENCODING: show_encoding(); break; case S_FIT: show_fit(); break; case S_FONTPATH: show_fontpath(); break; case S_POLAR: show_polar(); break; case S_PRINT: show_print(); break; case S_PSDIR: show_psdir(); break; case S_OBJECT: #ifdef EAM_OBJECTS if (almost_equals(c_token,"rect$angle")) c_token++; CHECK_TAG_GT_ZERO; save_object(stderr,tag); #endif break; case S_ANGLES: show_angles(); break; case S_SAMPLES: show_samples(); break; case S_ISOSAMPLES: show_isosamples(); break; case S_VIEW: show_view(); break; #ifdef BACKWARDS_COMPATIBLE case S_DATA: /* HBB 20010525: re-implement old 'show data style' command */ /* FIXME: 'show function style' is gone completely */ if (almost_equals(c_token, "st$yle")) { show_styles("Data", data_style); c_token++; } else error_message = "keyword 'style' expected after 'show data'"; break; #else case S_DATA: error_message = "keyword 'data' deprecated, use 'show style data'"; break; #endif case S_STYLE: show_style(); break; case S_SURFACE: show_surface(); break; case S_HIDDEN3D: show_hidden3d(); break; #ifdef GNUPLOT_HISTORY case S_HISTORYSIZE: show_historysize(); break; #endif case S_SIZE: show_size(); break; case S_ORIGIN: show_origin(); break; case S_TERMINAL: show_term(); break; case S_TICS: case S_TICSLEVEL: case S_TICSCALE: case S_XYPLANE: show_tics(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE); break; case S_MXTICS: show_mtics(FIRST_X_AXIS); break; case S_MYTICS: show_mtics(FIRST_Y_AXIS); break; case S_MZTICS: show_mtics(FIRST_Z_AXIS); break; case S_MCBTICS: show_mtics(COLOR_AXIS); break; case S_MX2TICS: show_mtics(SECOND_X_AXIS); break; case S_MY2TICS: show_mtics(SECOND_Y_AXIS); break; case S_TIMESTAMP: show_timestamp(); break; case S_RRANGE: show_range(POLAR_AXIS); break; case S_TRANGE: show_range(T_AXIS); break; case S_URANGE: show_range(U_AXIS); break; case S_VRANGE: show_range(V_AXIS); break; case S_XRANGE: show_range(FIRST_X_AXIS); break; case S_YRANGE: show_range(FIRST_Y_AXIS); break; case S_X2RANGE: show_range(SECOND_X_AXIS); break; case S_Y2RANGE: show_range(SECOND_Y_AXIS); break; case S_ZRANGE: show_range(FIRST_Z_AXIS); break; case S_CBRANGE: show_range(COLOR_AXIS); break; case S_TITLE: show_title(); break; case S_XLABEL: show_axislabel(FIRST_X_AXIS); break; case S_YLABEL: show_axislabel(FIRST_Y_AXIS); break; case S_ZLABEL: show_axislabel(FIRST_Z_AXIS); break; case S_CBLABEL: show_axislabel(COLOR_AXIS); break; case S_X2LABEL: show_axislabel(SECOND_X_AXIS); break; case S_Y2LABEL: show_axislabel(SECOND_Y_AXIS); break; case S_XDATA: show_data_is_timedate(FIRST_X_AXIS); break; case S_YDATA: show_data_is_timedate(FIRST_Y_AXIS); break; case S_X2DATA: show_data_is_timedate(SECOND_X_AXIS); break; case S_Y2DATA: show_data_is_timedate(SECOND_Y_AXIS); break; case S_ZDATA: show_data_is_timedate(FIRST_Z_AXIS); break; case S_CBDATA: show_data_is_timedate(COLOR_AXIS); break; case S_TIMEFMT: show_timefmt(); break; case S_LOCALE: show_locale(); break; case S_LOADPATH: show_loadpath(); break; case S_ZERO: show_zero(); break; case S_DATAFILE: show_datafile(); break; #ifdef USE_MOUSE case S_MOUSE: show_mouse(); break; #endif case S_PLOT: show_plot(); #if defined(READLINE) || defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) if (!END_OF_COMMAND) { if (almost_equals(c_token, "a$dd2history")) { c_token++; add_history(replot_line); } } #endif break; case S_VARIABLES: show_variables(); break; /* FIXME: get rid of S_*DTICS, S_*MTICS cases */ case S_XTICS: case S_XDTICS: case S_XMTICS: show_tics(TRUE, FALSE, FALSE, TRUE, FALSE, FALSE); break; case S_YTICS: case S_YDTICS: case S_YMTICS: show_tics(FALSE, TRUE, FALSE, FALSE, TRUE, FALSE); break; case S_ZTICS: case S_ZDTICS: case S_ZMTICS: show_tics(FALSE, FALSE, TRUE, FALSE, FALSE, FALSE); break; case S_CBTICS: case S_CBDTICS: case S_CBMTICS: show_tics(FALSE, FALSE, FALSE, FALSE, FALSE, TRUE); break; case S_RTICS: show_ticdef(POLAR_AXIS); break; case S_X2TICS: case S_X2DTICS: case S_X2MTICS: show_tics(FALSE, FALSE, FALSE, TRUE, FALSE, FALSE); break; case S_Y2TICS: case S_Y2DTICS: case S_Y2MTICS: show_tics(FALSE, FALSE, FALSE, FALSE, TRUE, FALSE); break; #ifdef BACKWARDS_COMPATIBLE /* HBB 20010522: avoid triggering the 'default' parse error * message for these commands --- they don't really exist, and * shouldn't cause that message to appear */ case S_NOMX2TICS: case S_NOMXTICS: case S_NOMY2TICS: case S_NOMYTICS: case S_NOMZTICS: case S_NOCBTICS: case S_NOMCBTICS: case S_NOCBDTICS: case S_NOCBMTICS: case S_NOX2DTICS: case S_NOX2MTICS: case S_NOX2TICS: case S_NOXDTICS: case S_NOXMTICS: case S_NOXTICS: case S_NOY2DTICS: case S_NOY2MTICS: case S_NOY2TICS: case S_NOYDTICS: case S_NOYMTICS: case S_NOYTICS: case S_NOZDTICS: case S_NOZMTICS: case S_NOZTICS: error_message = "'show' does not accept the 'no...' type of 'set' options"; break; #endif /* BACKWARDS_COMPATIBLE */ case S_MULTIPLOT: fprintf(stderr,"multiplot mode is %s\n", multiplot ? "on" : "off"); break; case S_TERMOPTIONS: fprintf(stderr,"Terminal options are '%s'\n", (*term_options) ? term_options : "[none]"); break; /* HBB 20010525: 'set commands' that don't have an * accompanying 'show' version, for no particular reason: */ /* --- such case now, all implemented. */ case S_INVALID: error_message = "Unrecognized option. See 'help show'."; break; default: error_message = "invalid or deprecated syntax"; break; } if (error_message) int_error(c_token,error_message); screen_ok = FALSE; (void) putc('\n', stderr); #undef CHECK_TAG_GT_ZERO } /* process 'show actiontable|at' command * not documented */ static void show_at() { (void) putc('\n', stderr); disp_at(temp_at(), 0); c_token++; } /* called by show_at(), and recursively by itself */ static void disp_at(struct at_type *curr_at, int level) { int i, j; union argument *arg; for (i = 0; i < curr_at->a_count; i++) { (void) putc('\t', stderr); for (j = 0; j < level; j++) (void) putc(' ', stderr); /* indent */ /* print name of instruction */ fputs(ft[(int) (curr_at->actions[i].index)].f_name, stderr); arg = &(curr_at->actions[i].arg); /* now print optional argument */ switch (curr_at->actions[i].index) { case PUSH: fprintf(stderr, " %s\n", arg->udv_arg->udv_name); break; case PUSHC: (void) putc(' ', stderr); disp_value(stderr, &(arg->v_arg), TRUE); (void) putc('\n', stderr); break; case PUSHD1: fprintf(stderr, " %c dummy\n", arg->udf_arg->udf_name[0]); break; case PUSHD2: fprintf(stderr, " %c dummy\n", arg->udf_arg->udf_name[1]); break; case CALL: fprintf(stderr, " %s", arg->udf_arg->udf_name); if (level < 6) { if (arg->udf_arg->at) { (void) putc('\n', stderr); disp_at(arg->udf_arg->at, level + 2); /* recurse! */ } else fputs(" (undefined)\n", stderr); } else (void) putc('\n', stderr); break; case CALLN: case SUM: fprintf(stderr, " %s", arg->udf_arg->udf_name); if (level < 6) { if (arg->udf_arg->at) { (void) putc('\n', stderr); disp_at(arg->udf_arg->at, level + 2); /* recurse! */ } else fputs(" (undefined)\n", stderr); } else (void) putc('\n', stderr); break; case JUMP: case JUMPZ: case JUMPNZ: case JTERN: fprintf(stderr, " +%d\n", arg->j_arg); break; case DOLLARS: fprintf(stderr, " %d\n", arg->v_arg.v.int_val); break; default: (void) putc('\n', stderr); } } } /* process 'show all' command */ static void show_all() { var_show_all = 1; show_version(stderr); show_autoscale(); show_bars(); show_border(); show_boxwidth(); show_clip(); show_label_contours(); show_contour(); show_dgrid3d(); #ifdef GP_MACROS show_macros(); #endif show_mapping(); show_dummy(); show_format(); show_style(); show_grid(); show_raxis(); show_zeroaxis(FIRST_X_AXIS); show_zeroaxis(FIRST_Y_AXIS); show_zeroaxis(FIRST_Z_AXIS); show_label(0); show_arrow(0); show_key(); show_logscale(); show_offsets(); show_margin(); show_output(); show_print(); show_parametric(); show_palette(); show_colorbox(); show_pm3d(); show_pointsize(); show_pointintervalbox(); show_encoding(); show_decimalsign(); show_fit(); show_polar(); show_angles(); #ifdef EAM_OBJECTS save_object(stderr,0); #endif show_samples(); show_isosamples(); show_view(); show_surface(); show_hidden3d(); #ifdef GNUPLOT_HISTORY show_historysize(); #endif show_size(); show_origin(); show_term(); show_tics(TRUE,TRUE,TRUE,TRUE,TRUE,TRUE); show_mtics(FIRST_X_AXIS); show_mtics(FIRST_Y_AXIS); show_mtics(FIRST_Z_AXIS); show_mtics(SECOND_X_AXIS); show_mtics(SECOND_Y_AXIS); show_xyzlabel("", "time", &timelabel); if (parametric || polar) { if (!is_3d_plot) show_range(T_AXIS); else { show_range(U_AXIS); show_range(V_AXIS); } } show_range(FIRST_X_AXIS); show_range(FIRST_Y_AXIS); show_range(SECOND_X_AXIS); show_range(SECOND_Y_AXIS); show_range(FIRST_Z_AXIS); show_title(); show_axislabel(FIRST_X_AXIS ); show_axislabel(FIRST_Y_AXIS ); show_axislabel(FIRST_Z_AXIS ); show_axislabel(SECOND_X_AXIS); show_axislabel(SECOND_Y_AXIS); show_data_is_timedate(FIRST_X_AXIS); show_data_is_timedate(FIRST_Y_AXIS); show_data_is_timedate(SECOND_X_AXIS); show_data_is_timedate(SECOND_Y_AXIS); show_data_is_timedate(FIRST_Z_AXIS); show_timefmt(); show_loadpath(); show_fontpath(); show_psdir(); show_locale(); show_zero(); show_datafile(); #ifdef USE_MOUSE show_mouse(); #endif show_plot(); show_variables(); show_functions(); var_show_all = 0; } /* process 'show version' command */ void show_version(FILE *fp) { /* If printed to a file, we prefix everything with * a hash mark to comment out the version information. */ char prefix[6]; /* "# " */ char *p = prefix; char fmt[2048]; prefix[0] = '#'; prefix[1] = prefix[2] = prefix[3] = prefix[4] = ' '; prefix[5] = NUL; /* Construct string of configuration options used to build */ /* this particular copy of gnuplot. Executed once only. */ if (!compile_options) { compile_options = gp_alloc(1024,"compile_options"); { /* The following code could be a lot simpler if * it wasn't for Borland's broken compiler ... */ const char * rdline = #ifdef READLINE "+" #else "-" #endif "READLINE "; const char *gnu_rdline = #if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) "+" #else "-" #endif #ifdef HAVE_LIBEDITLINE "LIBEDITLINE " #else "LIBREADLINE " #endif #if defined(HAVE_LIBREADLINE) && defined(MISSING_RL_TILDE_EXPANSION) "+READLINE_IS_REALLY_EDITLINE " #endif #ifdef GNUPLOT_HISTORY "+" #else "-" #endif "HISTORY " ""; const char *libgd = #ifdef HAVE_LIBGD # ifdef HAVE_GD_PNG "+GD_PNG " # endif # ifdef HAVE_GD_JPEG "+GD_JPEG " # endif # ifdef HAVE_GD_TTF "+GD_TTF " # endif # ifdef HAVE_GD_GIF "+GD_GIF " # endif # ifdef GIF_ANIMATION "+ANIMATION " # endif #else "-LIBGD " #endif ""; const char *linuxvga = #ifdef LINUXVGA "+LINUXVGA " #endif ""; const char *compatibility = #ifdef BACKWARDS_COMPATIBLE "+BACKWARDS_COMPATIBILITY " #else "-BACKWARDS_COMPATIBILITY " #endif ""; const char *binary_files = "+BINARY_DATA " ""; const char *nocwdrc = #ifdef USE_CWDRC "+" #else "-" #endif "USE_CWDRC "; const char *x11 = #ifdef X11 "+X11 " "+X11_POLYGON " #ifdef USE_X11_MULTIBYTE "+MULTIBYTE " #endif #ifdef EXTERNAL_X11_WINDOW "+X11_EXTERNAL " #endif #endif ""; const char *use_mouse = #ifdef USE_MOUSE "+USE_MOUSE " #endif ""; const char *hiddenline = #ifdef HIDDEN3D_QUADTREE "+HIDDEN3D_QUADTREE " #else # ifdef HIDDEN3D_GRIDBOX "+HIDDEN3D_GRIDBOX " # endif #endif ""; const char *plotoptions= "+DATASTRINGS " "+HISTOGRAMS " #ifdef EAM_OBJECTS "+OBJECTS " #endif "+STRINGVARS " #ifdef GP_MACROS "+MACROS " #endif # ifdef THIN_PLATE_SPLINES_GRID "+THIN_SPLINES " # endif "+IMAGE " "+USER_LINETYPES " #ifdef USE_STATS "+STATS " #else "-STATS " #endif ""; sprintf(compile_options, "\ %s%s\n%s%s\n\ %s%s\n\ %s%s%s%s\n%s\n", rdline, gnu_rdline, compatibility, binary_files, libgd, linuxvga, nocwdrc, x11, use_mouse, hiddenline, plotoptions); } compile_options = gp_realloc(compile_options, strlen(compile_options)+1, "compile_options"); } /* The only effect of fp == NULL is to load the compile_options string */ if (fp == NULL) return; if (fp == stderr) { /* No hash mark - let p point to the trailing '\0' */ p += sizeof(prefix) - 1; } else { #ifdef BINDIR # ifdef X11 fprintf(fp, "#!%s/gnuplot -persist\n#\n", BINDIR); # else fprintf(fp, "#!%s/gnuplot\n#\n", BINDIR); # endif /* not X11 */ #endif /* BINDIR */ } strcpy(fmt, "\ %s\n\ %s\t%s\n\ %s\tVersion %s patchlevel %s last modified %s\n\ %s\tBuild System: %s %s\n\ %s\n\ %s\t%s\n\ %s\tThomas Williams, Colin Kelley and many others\n\ %s\n\ %s\tgnuplot home: http://www.gnuplot.info\n\ "); #ifdef DEVELOPMENT_VERSION strcat(fmt, "%s\tmailing list: %s\n"); #endif strcat(fmt, "\ %s\tfaq, bugs, etc: type \"help FAQ\"\n\ %s\timmediate help: type \"help\" (plot window: hit 'h')\n\ "); fprintf(fp, fmt, p, /* empty line */ p, PROGRAM, p, gnuplot_version, gnuplot_patchlevel, gnuplot_date, p, os_name, os_rel, p, /* empty line */ p, gnuplot_copyright, p, /* authors */ p, /* empty line */ p, /* website */ #ifdef DEVELOPMENT_VERSION p, help_email, /* mailing list */ #endif p, /* type "help" */ p /* type "help seeking-assistance" */ ); /* show version long */ if (almost_equals(c_token, "l$ong")) { char *helpfile = NULL; c_token++; fprintf(stderr, "Compile options:\n%s\n", compile_options); #ifndef WIN32 if ((helpfile = getenv("GNUHELP")) == NULL) helpfile = HELPFILE; #else helpfile = winhelpname; #endif #ifdef X11 { char *driverdir = getenv("GNUPLOT_DRIVER_DIR"); if (driverdir == NULL) driverdir = X11_DRIVER_DIR; fprintf(stderr, "GNUPLOT_DRIVER_DIR = \"%s\"\n", driverdir); } #endif #ifdef GNUPLOT_PS_DIR { fprintf(stderr, "GNUPLOT_PS_DIR = \"%s\"\n", GNUPLOT_PS_DIR); } #endif fprintf(stderr, "HELPFILE = \"%s\"\n", helpfile); #if defined(WIN32) && !defined(WGP_CONSOLE) fprintf(stderr, "MENUNAME = \"%s\"\n", szMenuName); #endif } } /* process 'show autoscale' command */ static void show_autoscale() { SHOW_ALL_NL; #define SHOW_AUTOSCALE(axis) { \ t_autoscale ascale = axis_array[axis].set_autoscale; \ \ fprintf(stderr, "\t%s: %s%s%s%s%s, ", \ axis_defaults[axis].name, \ (ascale & AUTOSCALE_BOTH) ? "ON" : "OFF", \ ((ascale & AUTOSCALE_BOTH) == AUTOSCALE_MIN) ? " (min)" : "", \ ((ascale & AUTOSCALE_BOTH) == AUTOSCALE_MAX) ? " (max)" : "", \ (ascale & AUTOSCALE_FIXMIN) ? " (fixmin)" : "", \ (ascale & AUTOSCALE_FIXMAX) ? " (fixmax)" : ""); \ } fputs("\tautoscaling is ", stderr); if (parametric) { if (is_3d_plot) { SHOW_AUTOSCALE(T_AXIS); } else { SHOW_AUTOSCALE(U_AXIS); SHOW_AUTOSCALE(V_AXIS); } } if (polar) { SHOW_AUTOSCALE(POLAR_AXIS) } SHOW_AUTOSCALE(FIRST_X_AXIS ); SHOW_AUTOSCALE(FIRST_Y_AXIS ); fputs("\n\t ", stderr); SHOW_AUTOSCALE(SECOND_X_AXIS); SHOW_AUTOSCALE(SECOND_Y_AXIS); fputs("\n\t ", stderr); SHOW_AUTOSCALE(FIRST_Z_AXIS ); SHOW_AUTOSCALE(COLOR_AXIS); #undef SHOW_AUTOSCALE } /* process 'show bars' command */ static void show_bars() { SHOW_ALL_NL; /* I really like this: "terrorbars" ;-) */ if (bar_size > 0.0) fprintf(stderr, "\terrorbars are plotted in %s with bars of size %f\n", (bar_layer == LAYER_BACK) ? "back" : "front", bar_size); else fputs("\terrors are plotted without bars\n", stderr); } /* process 'show border' command */ static void show_border() { SHOW_ALL_NL; if (!draw_border) fprintf(stderr, "\tborder is not drawn\n"); else { fprintf(stderr, "\tborder %d is drawn in %s of the plot elements with\n\t ", draw_border, border_layer == 0 ? "back" : "front"); save_linetype(stderr, &border_lp, FALSE); fputc('\n',stderr); } } /* process 'show boxwidth' command */ static void show_boxwidth() { SHOW_ALL_NL; if (boxwidth < 0.0) fputs("\tboxwidth is auto\n", stderr); else { fprintf(stderr, "\tboxwidth is %g %s\n", boxwidth, (boxwidth_is_absolute) ? "absolute" : "relative"); } } /* process 'show boxplot' command */ static void show_boxplot() { fprintf(stderr, "\tboxplot representation is %s\n", boxplot_opts.plotstyle == FINANCEBARS ? "finance bar" : "box and whisker"); fprintf(stderr, "\tboxplot range extends from the "); if (boxplot_opts.limit_type == 1) fprintf(stderr, " median to include %5.2f of the points\n", boxplot_opts.limit_value); else fprintf(stderr, " box by %5.2f of the interquartile distance\n", boxplot_opts.limit_value); if (boxplot_opts.outliers) fprintf(stderr, "\toutliers will be drawn using point type %d\n", boxplot_opts.pointtype+1); else fprintf(stderr,"\toutliers will not be drawn\n"); fprintf(stderr,"\tseparation between boxplots is %g\n", boxplot_opts.separation); fprintf(stderr,"\tfactor labels %s\n", (boxplot_opts.labels == BOXPLOT_FACTOR_LABELS_X) ? "will be put on the x axis" : (boxplot_opts.labels == BOXPLOT_FACTOR_LABELS_X2) ? "will be put on the x2 axis" : (boxplot_opts.labels == BOXPLOT_FACTOR_LABELS_AUTO) ? "are automatic" : "are off"); fprintf(stderr,"\tfactor labels will %s\n", boxplot_opts.sort_factors ? "be sorted alphabetically" : "appear in the order they were found"); } /* process 'show fillstyle' command */ static void show_fillstyle() { SHOW_ALL_NL; switch(default_fillstyle.fillstyle) { case FS_SOLID: case FS_TRANSPARENT_SOLID: fprintf(stderr, "\tFill style uses %s solid colour with density %.3f", default_fillstyle.fillstyle == FS_SOLID ? "" : "transparent", default_fillstyle.filldensity/100.0); break; case FS_PATTERN: case FS_TRANSPARENT_PATTERN: fprintf(stderr, "\tFill style uses %s patterns starting at %d", default_fillstyle.fillstyle == FS_PATTERN ? "" : "transparent", default_fillstyle.fillpattern); break; default: fprintf(stderr, "\tFill style is empty"); } if (default_fillstyle.border_color.type == TC_LT && default_fillstyle.border_color.lt == LT_NODRAW) fprintf(stderr," with no border\n"); else { fprintf(stderr," with border "); save_pm3dcolor(stderr, &default_fillstyle.border_color); fprintf(stderr,"\n"); } } /* process 'show clip' command */ static void show_clip() { SHOW_ALL_NL; fprintf(stderr, "\tpoint clip is %s\n", (clip_points) ? "ON" : "OFF"); if (clip_lines1) fputs("\tdrawing and clipping lines between inrange and outrange points\n", stderr); else fputs("\tnot drawing lines between inrange and outrange points\n", stderr); if (clip_lines2) fputs("\tdrawing and clipping lines between two outrange points\n", stderr); else fputs("\tnot drawing lines between two outrange points\n", stderr); } /* process 'show cntrparam|contour' commands */ static void show_contour() { SHOW_ALL_NL; fprintf(stderr, "\tcontour for surfaces are %s", (draw_contour) ? "drawn" : "not drawn\n"); if (draw_contour) { fprintf(stderr, " in %d levels on ", contour_levels); switch (draw_contour) { case CONTOUR_BASE: fputs("grid base\n", stderr); break; case CONTOUR_SRF: fputs("surface\n", stderr); break; case CONTOUR_BOTH: fputs("grid base and surface\n", stderr); break; case CONTOUR_NONE: /* should not happen --- be easy: don't complain... */ break; } switch (contour_kind) { case CONTOUR_KIND_LINEAR: fputs("\t\tas linear segments\n", stderr); break; case CONTOUR_KIND_CUBIC_SPL: fprintf(stderr, "\t\tas cubic spline interpolation segments with %d pts\n", contour_pts); break; case CONTOUR_KIND_BSPLINE: fprintf(stderr, "\t\tas bspline approximation segments of order %d with %d pts\n", contour_order, contour_pts); break; } switch (contour_levels_kind) { case LEVELS_AUTO: fprintf(stderr, "\t\tapprox. %d automatic levels\n", contour_levels); break; case LEVELS_DISCRETE: { int i; fprintf(stderr, "\t\t%d discrete levels at ", contour_levels); fprintf(stderr, "%g", contour_levels_list[0]); for (i = 1; i < contour_levels; i++) fprintf(stderr, ",%g ", contour_levels_list[i]); putc('\n', stderr); break; } case LEVELS_INCREMENTAL: fprintf(stderr, "\t\t%d incremental levels starting at %g, step %g, end %g\n", contour_levels, contour_levels_list[0], contour_levels_list[1], contour_levels_list[0] + (contour_levels - 1) * contour_levels_list[1]); /* contour-levels counts both ends */ break; } /* fprintf(stderr,"\t\tcontour line types are %s\n", label_contours ? "varied" : "all the same"); */ show_label_contours(); } } /* called by show_contour() */ static void show_label_contours() { if (label_contours) fprintf(stderr, "\tcontour line types are varied & labeled with format '%s'\n", contour_format); else fputs("\tcontour line types are all the same\n", stderr); } /* process 'show dgrid3d' command */ static void show_dgrid3d() { SHOW_ALL_NL; if (dgrid3d) if( dgrid3d_mode == DGRID3D_QNORM ) { fprintf(stderr, "\tdata grid3d is enabled for mesh of size %dx%d, norm=%d\n", dgrid3d_row_fineness, dgrid3d_col_fineness, dgrid3d_norm_value ); } else if( dgrid3d_mode == DGRID3D_SPLINES ){ fprintf(stderr, "\tdata grid3d is enabled for mesh of size %dx%d, splines\n", dgrid3d_row_fineness, dgrid3d_col_fineness ); } else { fprintf(stderr, "\tdata grid3d is enabled for mesh of size %dx%d, kernel=%s,\n\tscale factors x=%f, y=%f%s\n", dgrid3d_row_fineness, dgrid3d_col_fineness, reverse_table_lookup(dgrid3d_mode_tbl, dgrid3d_mode), dgrid3d_x_scale, dgrid3d_y_scale, dgrid3d_kdensity ? ", kdensity2d mode" : "" ); } else fputs("\tdata grid3d is disabled\n", stderr); } #ifdef GP_MACROS /* process 'show macros' command */ static void show_macros() { SHOW_ALL_NL; fprintf(stderr,"\tcommand line macros will %sbe expanded\n", expand_macros ? "" : "not "); } #endif /* process 'show mapping' command */ static void show_mapping() { SHOW_ALL_NL; fputs("\tmapping for 3-d data is ", stderr); switch (mapping3d) { case MAP3D_CARTESIAN: fputs("cartesian\n", stderr); break; case MAP3D_SPHERICAL: fputs("spherical\n", stderr); break; case MAP3D_CYLINDRICAL: fputs("cylindrical\n", stderr); break; } } /* process 'show dummy' command */ static void show_dummy() { SHOW_ALL_NL; fprintf(stderr, "\tdummy variables are \"%s\" and \"%s\"\n", set_dummy_var[0], set_dummy_var[1]); } /* process 'show format' command */ static void show_format() { SHOW_ALL_NL; fprintf(stderr, "\ttic format is:\n"); #define SHOW_FORMAT(_axis) \ fprintf(stderr, "\t %s-axis: \"%s\"\n", axis_defaults[_axis].name, \ conv_text(axis_array[_axis].formatstring)); SHOW_FORMAT(FIRST_X_AXIS ); SHOW_FORMAT(FIRST_Y_AXIS ); SHOW_FORMAT(SECOND_X_AXIS); SHOW_FORMAT(SECOND_Y_AXIS); SHOW_FORMAT(FIRST_Z_AXIS ); SHOW_FORMAT(COLOR_AXIS); SHOW_FORMAT(POLAR_AXIS); #undef SHOW_FORMAT } /* process 'show style' sommand */ static void show_style() { int tag = 0; #define CHECK_TAG_GT_ZERO \ if (!END_OF_COMMAND) { \ tag = real_expression(); \ if (tag <= 0) \ int_error(c_token,"tag must be > zero"); \ } switch(lookup_table(&show_style_tbl[0],c_token)){ case SHOW_STYLE_DATA: SHOW_ALL_NL; show_styles("Data",data_style); c_token++; break; case SHOW_STYLE_FUNCTION: SHOW_ALL_NL; show_styles("Functions", func_style); c_token++; break; case SHOW_STYLE_LINE: c_token++; CHECK_TAG_GT_ZERO; show_linestyle(tag); break; case SHOW_STYLE_FILLING: show_fillstyle(); c_token++; break; case SHOW_STYLE_INCREMENT: show_increment(); c_token++; break; case SHOW_STYLE_HISTOGRAM: show_histogram(); c_token++; break; case SHOW_STYLE_ARROW: c_token++; CHECK_TAG_GT_ZERO; show_arrowstyle(tag); break; case SHOW_STYLE_BOXPLOT: show_boxplot(); c_token++; break; #ifdef EAM_OBJECTS case SHOW_STYLE_RECTANGLE: show_style_rectangle(); c_token++; break; case SHOW_STYLE_CIRCLE: show_style_circle(); c_token++; break; case SHOW_STYLE_ELLIPSE: show_style_ellipse(); c_token++; break; #endif default: /* show all styles */ show_styles("Data",data_style); show_styles("Functions", func_style); show_linestyle(0); show_fillstyle(); show_increment(); show_histogram(); show_arrowstyle(0); show_boxplot(); #ifdef EAM_OBJECTS show_style_rectangle(); show_style_circle(); show_style_ellipse(); #endif break; } #undef CHECK_TAG_GT_ZERO } #ifdef EAM_OBJECTS /* called by show_style() - defined for aesthetic reasons */ static void show_style_rectangle() { SHOW_ALL_NL; fprintf(stderr, "\tRectangle style is %s, fill color ", default_rectangle.layer > 0 ? "front" : default_rectangle.layer < 0 ? "behind" : "back"); if (default_rectangle.lp_properties.use_palette) save_pm3dcolor(stderr, &default_rectangle.lp_properties.pm3d_color); else if (default_rectangle.lp_properties.l_type == LT_BACKGROUND) fprintf(stderr, "background"); else fprintf(stderr, "lt %d",default_rectangle.lp_properties.l_type+1); fprintf(stderr, ", lw %.1f ", default_rectangle.lp_properties.l_width); fprintf(stderr, ", fillstyle"); save_fillstyle(stderr, &default_rectangle.fillstyle); } static void show_style_circle() { SHOW_ALL_NL; fprintf(stderr, "\tCircle style has default radius "); show_position(&default_circle.o.circle.extent); fputs("\n", stderr); } static void show_style_ellipse() { SHOW_ALL_NL; fprintf(stderr, "\tEllipse style has default size "); show_position(&default_ellipse.o.ellipse.extent); fprintf(stderr, ", default angle is %.1f degrees", default_ellipse.o.ellipse.orientation); switch (default_ellipse.o.ellipse.type) { case ELLIPSEAXES_XY: fputs(", diameters are in different units (major: x axis, minor: y axis)\n", stderr); break; case ELLIPSEAXES_XX: fputs(", both diameters are in the same units as the x axis\n", stderr); break; case ELLIPSEAXES_YY: fputs(", both diameters are in the same units as the y axis\n", stderr); break; } } #endif /* called by show_data() and show_func() */ static void show_styles(const char *name, enum PLOT_STYLE style) { fprintf(stderr, "\t%s are plotted with ", name); save_data_func_style(stderr, name, style); } /* called by show_func() */ static void show_functions() { struct udft_entry *udf = first_udf; fputs("\n\tUser-Defined Functions:\n", stderr); while (udf) { if (udf->definition) fprintf(stderr, "\t%s\n", udf->definition); else fprintf(stderr, "\t%s is undefined\n", udf->udf_name); udf = udf->next_udf; } } /* process 'show grid' command */ static void show_grid() { SHOW_ALL_NL; if (! some_grid_selected()) { fputs("\tgrid is OFF\n", stderr); return; } /* HBB 20010806: new storage method for grid options: */ fprintf(stderr, "\t%s grid drawn at", (polar_grid_angle != 0) ? "Polar" : "Rectangular"); #define SHOW_GRID(axis) \ if (axis_array[axis].gridmajor) \ fprintf(stderr, " %s", axis_defaults[axis].name); \ if (axis_array[axis].gridminor) \ fprintf(stderr, " m%s", axis_defaults[axis].name); SHOW_GRID(FIRST_X_AXIS ); SHOW_GRID(FIRST_Y_AXIS ); SHOW_GRID(SECOND_X_AXIS); SHOW_GRID(SECOND_Y_AXIS); SHOW_GRID(FIRST_Z_AXIS ); SHOW_GRID(COLOR_AXIS); SHOW_GRID(POLAR_AXIS); #undef SHOW_GRID fputs(" tics\n", stderr); fprintf(stderr, "\tMajor grid drawn with"); save_linetype(stderr, &(grid_lp), FALSE); fprintf(stderr, "\n\tMinor grid drawn with"); save_linetype(stderr, &(mgrid_lp), FALSE); fputc('\n', stderr); if (polar_grid_angle) fprintf(stderr, "\tGrid radii drawn every %f %s\n", polar_grid_angle / ang2rad, (ang2rad == 1.0) ? "radians" : "degrees"); fprintf(stderr, "\tGrid drawn at %s\n", (grid_layer==-1) ? "default layer" : ((grid_layer==0) ? "back" : "front")); } static void show_raxis() { fprintf(stderr,"raxis is %sdrawn\n",raxis ? "" : "not "); } /* process 'show {x|y|z}zeroaxis' command */ static void show_zeroaxis(AXIS_INDEX axis) { SHOW_ALL_NL; if (axis_array[axis].zeroaxis.l_type > LT_NODRAW) { fprintf(stderr, "\t%szeroaxis is drawn with", axis_defaults[axis].name); save_linetype(stderr, &(axis_array[axis].zeroaxis), FALSE); fputc('\n',stderr); } else fprintf(stderr, "\t%szeroaxis is OFF\n", axis_defaults[axis].name); if ((axis / SECOND_AXES) == 0) { /* this is a 'first' axis. To output secondary axis, call self * recursively: */ show_zeroaxis(axis + SECOND_AXES); } } /* Show label number <tag> (0 means show all) */ static void show_label(int tag) { struct text_label *this_label; TBOOLEAN showed = FALSE; for (this_label = first_label; this_label != NULL; this_label = this_label->next) { if (tag == 0 || tag == this_label->tag) { showed = TRUE; fprintf(stderr, "\tlabel %d \"%s\" at ", this_label->tag, (this_label->text==NULL) ? "" : conv_text(this_label->text)); show_position(&this_label->place); switch (this_label->pos) { case LEFT:{ fputs(" left", stderr); break; } case CENTRE:{ fputs(" centre", stderr); break; } case RIGHT:{ fputs(" right", stderr); break; } } if (this_label->rotate) fprintf(stderr, " rotated by %d degrees (if possible)", this_label->rotate); else fprintf(stderr, " not rotated"); fprintf(stderr, " %s ", this_label->layer ? "front" : "back"); if (this_label->font != NULL) fprintf(stderr, " font \"%s\"", this_label->font); if (this_label->textcolor.type) save_textcolor(stderr, &this_label->textcolor); if (this_label->noenhanced) fprintf(stderr, " noenhanced"); if (this_label->lp_properties.pointflag == 0) fprintf(stderr, " nopoint"); else { fprintf(stderr, " point with color of"); save_linetype(stderr, &(this_label->lp_properties), TRUE); show_position(&this_label->offset); } /* Entry font added by DJL */ fputc('\n', stderr); } } if (tag > 0 && !showed) int_error(c_token, "label not found"); } /* Show arrow number <tag> (0 means show all) */ static void show_arrow(int tag) { struct arrow_def *this_arrow; TBOOLEAN showed = FALSE; for (this_arrow = first_arrow; this_arrow != NULL; this_arrow = this_arrow->next) { if (tag == 0 || tag == this_arrow->tag) { showed = TRUE; fprintf(stderr, "\tarrow %d, %s %s %s", this_arrow->tag, arrow_head_names[this_arrow->arrow_properties.head], ( (this_arrow->arrow_properties.head_filled==2) ? "filled" : ( (this_arrow->arrow_properties.head_filled==1) ? "empty" : "nofilled" )), this_arrow->arrow_properties.layer ? "front" : "back"); save_linetype(stderr, &(this_arrow->arrow_properties.lp_properties), FALSE); fprintf(stderr, "\n\t from "); show_position(&this_arrow->start); fputs(this_arrow->relative ? " rto " : " to ", stderr); show_position(&this_arrow->end); if (this_arrow->arrow_properties.head_length > 0) { static char *msg[] = {"(first x axis) ", "(second x axis) ", "(graph units) ", "(screen units) "}; fprintf(stderr,"\n\t arrow head: length %s%g, angle %g deg", this_arrow->arrow_properties.head_lengthunit == first_axes ? "" : msg[this_arrow->arrow_properties.head_lengthunit], this_arrow->arrow_properties.head_length, this_arrow->arrow_properties.head_angle); if (this_arrow->arrow_properties.head_filled!=0) fprintf(stderr,", backangle %g deg", this_arrow->arrow_properties.head_backangle); } putc('\n', stderr); } } if (tag > 0 && !showed) int_error(c_token, "arrow not found"); } /* process 'show keytitle' command */ static void show_keytitle() { legend_key *key = &keyT; SHOW_ALL_NL; fprintf(stderr, "\tkey title is \"%s\"\n", conv_text(key->title)); if (key->font && *(key->font)) fprintf(stderr,"\t font \"%s\"\n", key->font); if (key->textcolor.type != TC_LT || key->textcolor.lt != LT_BLACK) { fputs("\t ", stderr); save_textcolor(stderr, &(key->textcolor)); fputs("\n", stderr); } } /* process 'show key' command */ static void show_key() { legend_key *key = &keyT; SHOW_ALL_NL; if (!(key->visible)) { fputs("\ \tkey is OFF\n", stderr); return; } switch (key->region) { case GPKEY_AUTO_INTERIOR_LRTBC: case GPKEY_AUTO_EXTERIOR_LRTBC: case GPKEY_AUTO_EXTERIOR_MARGIN: { fputs("\tkey is ON, position: ", stderr); if (!(key->region == GPKEY_AUTO_EXTERIOR_MARGIN && (key->margin == GPKEY_TMARGIN || key->margin == GPKEY_BMARGIN))) { if (key->vpos == JUST_TOP) fputs("top", stderr); else if (key->vpos == JUST_BOT) fputs("bottom", stderr); else fputs("center", stderr); } if (!(key->region == GPKEY_AUTO_EXTERIOR_MARGIN && (key->margin == GPKEY_LMARGIN || key->margin == GPKEY_RMARGIN))) { if (key->hpos == LEFT) fputs(" left", stderr); else if (key->hpos == RIGHT) fputs(" right", stderr); else if (key->vpos != JUST_CENTRE) /* Don't print "center" twice. */ fputs(" center", stderr); } if (key->stack_dir == GPKEY_VERTICAL) { fputs(" vertical", stderr); } else { fputs(" horizontal", stderr); } if (key->region == GPKEY_AUTO_INTERIOR_LRTBC) fputs(" inside", stderr); else if (key->region == GPKEY_AUTO_EXTERIOR_LRTBC) fputs(" outside", stderr); else { switch (key->margin) { case GPKEY_TMARGIN: fputs(" tmargin", stderr); break; case GPKEY_BMARGIN: fputs(" bmargin", stderr); break; case GPKEY_LMARGIN: fputs(" lmargin", stderr); break; case GPKEY_RMARGIN: fputs(" rmargin", stderr); break; } } fputs("\n", stderr); break; } case GPKEY_USER_PLACEMENT: fputs("\tkey is at ", stderr); show_position(&key->user_pos); putc('\n', stderr); break; } fprintf(stderr, "\ \tkey is %s justified, %sreversed, %sinverted, %senhanced and ", key->just == GPKEY_LEFT ? "left" : "right", key->reverse ? "" : "not ", key->invert ? "" : "not ", key->enhanced ? "" : "not "); if (key->box.l_type > LT_NODRAW) { fprintf(stderr, "boxed\n\twith "); save_linetype(stderr, &(key->box), FALSE); fputc('\n', stderr); } else fprintf(stderr, "not boxed\n"); if (key->front) fprintf(stderr, "\tkey box is opaque and drawn in front of the graph\n"); fprintf(stderr, "\ \tsample length is %g characters\n\ \tvertical spacing is %g characters\n\ \twidth adjustment is %g characters\n\ \theight adjustment is %g characters\n\ \tcurves are%s automatically titled %s\n", key->swidth, key->vert_factor, key->width_fix, key->height_fix, key->auto_titles ? "" : " not", key->auto_titles == FILENAME_KEYTITLES ? "with filename" : key->auto_titles == COLUMNHEAD_KEYTITLES ? "with column header" : ""); fputs("\tmaximum number of columns is ", stderr); if (key->maxcols > 0) fprintf(stderr, "%d for horizontal alignment\n", key->maxcols); else fputs("calculated automatically\n", stderr); fputs("\tmaximum number of rows is ", stderr); if (key->maxrows > 0) fprintf(stderr, "%d for vertical alignment\n", key->maxrows); else fputs("calculated automatically\n", stderr); show_keytitle(); } static void show_position(struct position *pos) { static const char *msg[] = { "(first axes) ", "(second axes) ", "(graph units) ", "(screen units) ", "(character units) "}; assert(first_axes == 0 && second_axes == 1 && graph == 2 && screen == 3 && character == 4); fprintf(stderr, "(%s%g, %s%g, %s%g)", pos->scalex == first_axes ? "" : msg[pos->scalex], pos->x, pos->scaley == pos->scalex ? "" : msg[pos->scaley], pos->y, pos->scalez == pos->scaley ? "" : msg[pos->scalez], pos->z); } /* process 'show logscale' command */ static void show_logscale() { int count = 0; SHOW_ALL_NL; #define SHOW_LOG(axis) \ { \ if (axis_array[axis].log) \ fprintf(stderr, "%s %s (base %g)", \ !count++ ? "\tlogscaling" : " and", \ axis_defaults[axis].name,axis_array[axis].base); \ } SHOW_LOG(FIRST_X_AXIS ); SHOW_LOG(FIRST_Y_AXIS ); SHOW_LOG(FIRST_Z_AXIS ); SHOW_LOG(SECOND_X_AXIS); SHOW_LOG(SECOND_Y_AXIS); SHOW_LOG(COLOR_AXIS ); SHOW_LOG(POLAR_AXIS ); #undef SHOW_LOG if (count == 0) fputs("\tno logscaling\n", stderr); else if (count == 1) fputs(" only\n", stderr); else putc('\n', stderr); } /* process 'show offsets' command */ static void show_offsets() { SHOW_ALL_NL; save_offsets(stderr,"\toffsets are"); } /* process 'show margin' command */ static void show_margin() { SHOW_ALL_NL; if (lmargin.scalex == screen) fprintf(stderr, "\tlmargin is set to screen %g\n", lmargin.x); else if (lmargin.x >= 0) fprintf(stderr, "\tlmargin is set to %g\n", lmargin.x); else fputs("\tlmargin is computed automatically\n", stderr); if (bmargin.scalex == screen) fprintf(stderr, "\tbmargin is set to screen %g\n", bmargin.x); else if (bmargin.x >= 0) fprintf(stderr, "\tbmargin is set to %g\n", bmargin.x); else fputs("\tbmargin is computed automatically\n", stderr); if (rmargin.scalex == screen) fprintf(stderr, "\trmargin is set to screen %g\n", rmargin.x); else if (rmargin.x >= 0) fprintf(stderr, "\trmargin is set to %g\n", rmargin.x); else fputs("\trmargin is computed automatically\n", stderr); if (tmargin.scalex == screen) fprintf(stderr, "\ttmargin is set to screen %g\n", tmargin.x); else if (tmargin.x >= 0) fprintf(stderr, "\ttmargin is set to %g\n", tmargin.x); else fputs("\ttmargin is computed automatically\n", stderr); } /* process 'show output' command */ static void show_output() { SHOW_ALL_NL; if (outstr) fprintf(stderr, "\toutput is sent to '%s'\n", outstr); else fputs("\toutput is sent to STDOUT\n", stderr); } /* process 'show print' command */ static void show_print() { SHOW_ALL_NL; fprintf(stderr, "\tprint output is sent to '%s'\n", print_show_output()); } /* process 'show print' command */ static void show_psdir() { SHOW_ALL_NL; fprintf(stderr, "\tdirectory from 'set psdir': "); fprintf(stderr, "%s\n", PS_psdir ? PS_psdir : "none"); fprintf(stderr, "\tenvironment variable GNUPLOT_PS_DIR: "); fprintf(stderr, "%s\n", getenv("GNUPLOT_PS_DIR") ? getenv("GNUPLOT_PS_DIR") : "none"); #ifdef GNUPLOT_PS_DIR fprintf(stderr, "\tdefault system directory \"%s\"\n", GNUPLOT_PS_DIR); #else fprintf(stderr, "\tfall through to built-in defaults\n"); #endif } /* process 'show parametric' command */ static void show_parametric() { SHOW_ALL_NL; fprintf(stderr, "\tparametric is %s\n", (parametric) ? "ON" : "OFF"); } static void show_palette_rgbformulae() { int i; fprintf(stderr,"\t * there are %i available rgb color mapping formulae:", sm_palette.colorFormulae); /* print the description of the color formulae */ i = 0; while ( *(ps_math_color_formulae[2*i]) ) { if (i % 3 == 0) fputs("\n\t ", stderr); fprintf(stderr, "%2i: %-15s",i,ps_math_color_formulae[2*i+1]); i++; } fputs("\n", stderr); fputs("\t * negative numbers mean inverted=negative colour component\n", stderr); fprintf(stderr, "\t * thus the ranges in `set pm3d rgbformulae' are -%i..%i\n", sm_palette.colorFormulae-1,sm_palette.colorFormulae-1); ++c_token; } static void show_palette_fit2rgbformulae() { #define rgb_distance(r,g,b) ((r)*(r) + (g)*(g) + (b)*(b)) int pts = 32; /* resolution: nb of points in the discrete raster for comparisons */ int i, p, ir, ig, ib; int rMin=0, gMin=0, bMin=0; int maxFormula = sm_palette.colorFormulae - 1; /* max formula number */ double gray, dist, distMin; rgb_color *currRGB; int *formulaeSeq; double **formulae; ++c_token; if (sm_palette.colorMode == SMPAL_COLOR_MODE_RGB && sm_palette.cmodel == C_MODEL_RGB) { fprintf(stderr, "\tCurrent palette is\n\t set palette rgbformulae %i,%i,%i\n", sm_palette.formulaR, sm_palette.formulaG, sm_palette.formulaB); return; } /* allocate and fill R, G, B values rastered on pts points */ currRGB = (rgb_color*)gp_alloc(pts * sizeof(rgb_color), "RGB pts"); for (p = 0; p < pts; p++) { gray = (double)p / (pts - 1); rgb1_from_gray(gray, &(currRGB[p])); } /* organize sequence of rgb formulae */ formulaeSeq = gp_alloc((2*maxFormula+1) * sizeof(int), "formulaeSeq"); for (i = 0; i <= maxFormula; i++) formulaeSeq[i] = i; for (i = 1; i <= maxFormula; i++) formulaeSeq[maxFormula+i] = -i; /* allocate and fill all +-formulae on the interval of given number of points */ formulae = gp_alloc((2*maxFormula+1) * sizeof(double*), "formulae"); for (i = 0; i < 2*maxFormula+1; i++) { formulae[i] = gp_alloc(pts * sizeof(double), "formulae pts"); for (p = 0; p < pts; p++) { double gray = (double)p / (pts - 1); formulae[i][p] = GetColorValueFromFormula(formulaeSeq[i], gray); } } /* Now go over all rastered formulae, compare them to the current one, and find the minimal distance. */ distMin = VERYLARGE; for (ir = 0; ir < 2*maxFormula+1; ir++) { for (ig = 0; ig < 2*maxFormula+1; ig++) { for (ib = 0; ib < 2*maxFormula+1; ib++) { dist = 0; /* calculate distance of the two rgb profiles */ for (p = 0; p < pts; p++) { double tmp = rgb_distance( currRGB[p].r - formulae[ir][p], currRGB[p].g - formulae[ig][p], currRGB[p].b - formulae[ib][p] ); dist += tmp; } if (dist < distMin) { distMin = dist; rMin = formulaeSeq[ir]; gMin = formulaeSeq[ig]; bMin = formulaeSeq[ib]; } } } } fprintf(stderr, "\tThe best match of the current palette corresponds to\n\t set palette rgbformulae %i,%i,%i\n", rMin, gMin, bMin); #undef rgb_distance for (i = 0; i < 2*maxFormula+1; i++) free(formulae[i]); free(formulae); free(formulaeSeq); free(currRGB); } static void show_palette_palette() { int colors, i; double gray; rgb_color rgb1; rgb255_color rgb255; int how = 0; /* How to print table: 0: default large; 1: rgb 0..1; 2: integers 0..255 */ FILE *f; c_token++; if (END_OF_COMMAND) int_error(c_token,"palette size required"); colors = int_expression(); if (colors<2) colors = 128; if (!END_OF_COMMAND) { if (almost_equals(c_token, "f$loat")) /* option: print r,g,b floats 0..1 values */ how = 1; else if (almost_equals(c_token, "i$nt")) /* option: print only integer 0..255 values */ how = 2; else int_error(c_token, "expecting no option or int or float"); c_token++; } i = (print_out==NULL || print_out==stderr || print_out==stdout); f = (print_out) ? print_out : stderr; fprintf(stderr, "%s palette with %i discrete colors", (sm_palette.colorMode == SMPAL_COLOR_MODE_GRAY) ? "Gray" : "Color", colors); if (!i) fprintf(stderr," saved to \"%s\".", print_out_name); else fprintf(stderr, ".\n"); for (i = 0; i < colors; i++) { /* colours equidistantly from [0,1] */ gray = (double)i / (colors - 1); if (sm_palette.positive == SMPAL_NEGATIVE) gray = 1 - gray; rgb1_from_gray(gray, &rgb1); rgb255_from_rgb1(rgb1, &rgb255); switch (how) { case 1: fprintf(f, "%0.4f\t%0.4f\t%0.4f\n", rgb1.r, rgb1.g, rgb1.b); break; case 2: fprintf(f, "%i\t%i\t%i\n", (int)rgb255.r, (int)rgb255.g, (int)rgb255.b); break; default: fprintf(f, "%3i. gray=%0.4f, (r,g,b)=(%0.4f,%0.4f,%0.4f), #%02x%02x%02x = %3i %3i %3i\n", i, gray, rgb1.r, rgb1.g, rgb1.b, (int)rgb255.r, (int)rgb255.g, (int)rgb255.b, (int)rgb255.r, (int)rgb255.g, (int)rgb255.b ); } } } static void show_palette_gradient() { int i; double gray,r,g,b; ++c_token; if (sm_palette.colorMode != SMPAL_COLOR_MODE_GRADIENT) { fputs( "\tcolor mapping *not* done by defined gradient.\n", stderr ); return; } for( i=0; i<sm_palette.gradient_num; ++i ) { gray = sm_palette.gradient[i].pos; r = sm_palette.gradient[i].col.r; g = sm_palette.gradient[i].col.g; b = sm_palette.gradient[i].col.b; fprintf(stderr, "%3i. gray=%0.4f, (r,g,b)=(%0.4f,%0.4f,%0.4f), #%02x%02x%02x = %3i %3i %3i\n", i, gray, r,g,b, (int)(255*r+.5),(int)(255*g+.5),(int)(255*b+.5), (int)(255*r+.5),(int)(255*g+.5),(int)(255*b+.5) ); } } /* Helper function for show_palette_colornames() */ static void show_colornames(const struct gen_table *tbl) { int i=0; while (tbl->key) { /* Print color names and their rgb values, table with 1 column */ int r = ((tbl->value >> 16 ) & 255); int g = ((tbl->value >> 8 ) & 255); int b = (tbl->value & 255); fprintf( stderr, "\n %-18s ", tbl->key ); fprintf(stderr, "#%02x%02x%02x = %3i %3i %3i", r,g,b, r,g,b); ++tbl; ++i; } fputs( "\n", stderr ); ++c_token; } static void show_palette_colornames() { fprintf(stderr, "\tThere are %d predefined color names:", num_predefined_colors); show_colornames(pm3d_color_names_tbl); } static void show_palette() { /* no option given, i.e. "show palette" */ if (END_OF_COMMAND) { fprintf(stderr,"\tpalette is %s\n", sm_palette.colorMode == SMPAL_COLOR_MODE_GRAY ? "GRAY" : "COLOR"); switch( sm_palette.colorMode ) { case SMPAL_COLOR_MODE_GRAY: break; case SMPAL_COLOR_MODE_RGB: fprintf(stderr,"\trgb color mapping by rgbformulae are %i,%i,%i\n", sm_palette.formulaR, sm_palette.formulaG, sm_palette.formulaB); break; case SMPAL_COLOR_MODE_GRADIENT: fputs( "\tcolor mapping by defined gradient\n", stderr ); break; case SMPAL_COLOR_MODE_FUNCTIONS: fputs("\tcolor mapping is done by user defined functions\n",stderr); if (sm_palette.Afunc.at && sm_palette.Afunc.definition) fprintf( stderr, "\t A-formula: %s\n", sm_palette.Afunc.definition); if (sm_palette.Bfunc.at && sm_palette.Bfunc.definition) fprintf( stderr, "\t B-formula: %s\n", sm_palette.Bfunc.definition); if (sm_palette.Cfunc.at && sm_palette.Cfunc.definition) fprintf( stderr, "\t C-formula: %s\n", sm_palette.Cfunc.definition); break; case SMPAL_COLOR_MODE_CUBEHELIX: fprintf(stderr, "\tCubehelix color palette: start %g cycles %g saturation %g\n", sm_palette.cubehelix_start, sm_palette.cubehelix_cycles, sm_palette.cubehelix_saturation); break; default: fprintf( stderr, "%s:%d oops: Unknown color mode '%c'.\n", __FILE__, __LINE__, (char)(sm_palette.colorMode) ); } fprintf(stderr,"\tfigure is %s\n", sm_palette.positive == SMPAL_POSITIVE ? "POSITIVE" : "NEGATIVE"); fprintf( stderr, "\tall color formulae ARE%s written into output postscript file\n", sm_palette.ps_allcF == 0 ? " NOT" : ""); fputs("\tallocating ", stderr); if (sm_palette.use_maxcolors) fprintf(stderr,"MAX %i",sm_palette.use_maxcolors); else fputs("ALL remaining", stderr); fputs(" color positions for discrete palette terminals\n", stderr); fputs( "\tColor-Model: ", stderr ); switch( sm_palette.cmodel ) { case C_MODEL_RGB: fputs( "RGB\n", stderr ); break; case C_MODEL_HSV: fputs( "HSV\n", stderr ); break; case C_MODEL_CMY: fputs( "CMY\n", stderr ); break; case C_MODEL_YIQ: fputs( "YIQ\n", stderr ); break; case C_MODEL_XYZ: fputs( "XYZ\n", stderr ); break; default: fprintf( stderr, "%s:%d ooops: Unknown color mode '%c'.\n", __FILE__, __LINE__, (char)(sm_palette.cmodel) ); } fprintf(stderr,"\tgamma is %.4g\n", sm_palette.gamma ); return; } if (almost_equals(c_token, "pal$ette")) { /* 'show palette palette <n>' */ show_palette_palette(); return; } else if (almost_equals(c_token, "gra$dient")) { /* 'show palette gradient' */ show_palette_gradient(); return; } else if (almost_equals(c_token, "rgbfor$mulae" )) { /* 'show palette rgbformulae' */ show_palette_rgbformulae(); return; } else if (equals(c_token, "colors") || almost_equals(c_token, "color$names" )) { /* 'show palette colornames' */ show_palette_colornames(); return; } else if (almost_equals(c_token, "fit2rgb$formulae" )) { /* 'show palette fit2rgbformulae' */ show_palette_fit2rgbformulae(); return; } else { /* wrong option to "show palette" */ int_error( c_token, "Expecting 'gradient' or 'palette <n>' or 'rgbformulae' or 'colornames'"); } } static void show_colorbox() { c_token++; if (color_box.border) { fputs("\tcolor box with border, ", stderr); if (color_box.border_lt_tag >= 0) fprintf(stderr,"line type %d is ", color_box.border_lt_tag); else fputs("DEFAULT line type is ", stderr); } else { fputs("\tcolor box without border is ", stderr); } if (color_box.where != SMCOLOR_BOX_NO) { if (color_box.layer == LAYER_FRONT) fputs("drawn front\n\t", stderr); else fputs("drawn back\n\t", stderr); } switch (color_box.where) { case SMCOLOR_BOX_NO: fputs("NOT drawn\n", stderr); break; case SMCOLOR_BOX_DEFAULT: fputs("at DEFAULT position\n", stderr); break; case SMCOLOR_BOX_USER: fputs("at USER origin: ", stderr); show_position(&color_box.origin); fputs("\n\t size: ", stderr); show_position(&color_box.size); fputs("\n", stderr); break; default: /* should *never* happen */ int_error(NO_CARET, "Argh!"); } fprintf(stderr,"\tcolor gradient is %s in the color box\n", color_box.rotation == 'v' ? "VERTICAL" : "HORIZONTAL"); } static void show_pm3d() { c_token++; fprintf(stderr,"\tpm3d style is %s\n", PM3D_IMPLICIT == pm3d.implicit ? "implicit (pm3d draw for all surfaces)" : "explicit (draw pm3d surface according to style)"); fputs("\tpm3d plotted at ", stderr); { int i=0; for ( ; pm3d.where[i]; i++ ) { if (i>0) fputs(", then ", stderr); switch (pm3d.where[i]) { case PM3D_AT_BASE: fputs("BOTTOM", stderr); break; case PM3D_AT_SURFACE: fputs("SURFACE", stderr); break; case PM3D_AT_TOP: fputs("TOP", stderr); break; } } fputs("\n", stderr); } if (pm3d.direction == PM3D_DEPTH) { fprintf(stderr,"\ttrue depth ordering\n"); } else if (pm3d.direction != PM3D_SCANS_AUTOMATIC) { fprintf(stderr,"\ttaking scans in %s direction\n", pm3d.direction == PM3D_SCANS_FORWARD ? "FORWARD" : "BACKWARD"); } else { fputs("\ttaking scans direction automatically\n", stderr); } fputs("\tsubsequent scans with different nb of pts are ", stderr); if (pm3d.flush == PM3D_FLUSH_CENTER) fputs("CENTERED\n", stderr); else fprintf(stderr,"flushed from %s\n", pm3d.flush == PM3D_FLUSH_BEGIN ? "BEGIN" : "END"); fprintf(stderr,"\tflushing triangles are %sdrawn\n", pm3d.ftriangles ? "" : "not "); fputs("\tclipping: ", stderr); if (pm3d.clip == PM3D_CLIP_1IN) fputs("at least 1 point of the quadrangle in x,y ranges\n", stderr); else fputs( "all 4 points of the quadrangle in x,y ranges\n", stderr); if (pm3d.hidden3d_tag > 0) { fprintf(stderr,"\tpm3d-hidden3d is on and will use linestyle %d\n", pm3d.hidden3d_tag); } else { fprintf(stderr,"\tpm3d-hidden3d is %s\n", pm3d.hidden3d_tag ? "on" : "off"); } fprintf(stderr,"\tsteps for bilinear interpolation: %d,%d\n", pm3d.interp_i, pm3d.interp_j); fprintf(stderr,"\tquadrangle color according to "); switch (pm3d.which_corner_color) { case PM3D_WHICHCORNER_MEAN: fputs("averaged 4 corners\n", stderr); break; case PM3D_WHICHCORNER_GEOMEAN: fputs("geometrical mean of 4 corners\n", stderr); break; case PM3D_WHICHCORNER_MEDIAN: fputs("median of 4 corners\n", stderr); break; case PM3D_WHICHCORNER_MIN: fputs("minimum of 4 corners\n", stderr); break; case PM3D_WHICHCORNER_MAX: fputs("maximum of 4 corners\n", stderr); break; default: fprintf(stderr, "corner %i\n", pm3d.which_corner_color - PM3D_WHICHCORNER_C1 + 1); } } /* process 'show pointsize' command */ static void show_pointsize() { SHOW_ALL_NL; fprintf(stderr, "\tpointsize is %g\n", pointsize); } /* process 'show pointintervalbox' command */ static void show_pointintervalbox() { SHOW_ALL_NL; fprintf(stderr, "\tpointintervalbox is %g\n", pointintervalbox); } /* process 'show encoding' command */ static void show_encoding() { SHOW_ALL_NL; fprintf(stderr, "\tnominal character encoding is %s\n", encoding_names[encoding]); #ifdef HAVE_LOCALE_H fprintf(stderr, "\thowever LC_CTYPE in current locale is %s\n", setlocale(LC_CTYPE,NULL)); #endif } /* process 'show decimalsign' command */ static void show_decimalsign() { SHOW_ALL_NL; set_numeric_locale(); fprintf(stderr, "\tdecimalsign for input is %s \n", get_decimal_locale()); reset_numeric_locale(); if (decimalsign!=NULL) fprintf(stderr, "\tdecimalsign for output is %s \n", decimalsign); else fprintf(stderr, "\tdecimalsign for output has default value (normally '.')\n"); fprintf(stderr, "\tdegree sign for output is %s \n", degree_sign); } /* process 'show fit' command */ static void show_fit() { SHOW_ALL_NL; fprintf(stderr, "\ \tfit will%s place parameter errors in variables\n", fit_errorvariables ? "" : " not"); if (fitlogfile != NULL) { fprintf(stderr, "\ \tlog-file for fits is was set by the user to be \n\ \t'%s'\n", fitlogfile); } else { char *logfile = getfitlogfile(); if (logfile) { fprintf(stderr, "\ \tlog-file for fits is unchanged from the environment default of\n\ \t'%s'\n", logfile); free(logfile); } } } /* process 'show polar' command */ static void show_polar() { SHOW_ALL_NL; fprintf(stderr, "\tpolar is %s\n", (polar) ? "ON" : "OFF"); } /* process 'show angles' command */ static void show_angles() { SHOW_ALL_NL; fputs("\tAngles are in ", stderr); if (ang2rad == 1) { fputs("radians\n", stderr); } else { fputs("degrees\n", stderr); } } /* process 'show samples' command */ static void show_samples() { SHOW_ALL_NL; fprintf(stderr, "\tsampling rate is %d, %d\n", samples_1, samples_2); } /* process 'show isosamples' command */ static void show_isosamples() { SHOW_ALL_NL; fprintf(stderr, "\tiso sampling rate is %d, %d\n", iso_samples_1, iso_samples_2); } /* process 'show view' command */ static void show_view() { SHOW_ALL_NL; fputs("\tview is ", stderr); if (splot_map == TRUE) { fputs("map\n", stderr); return; } fprintf(stderr, "%g rot_x, %g rot_z, %g scale, %g scale_z\n", surface_rot_x, surface_rot_z, surface_scale, surface_zscale); fprintf(stderr,"\t\t%s axes are %s\n", aspect_ratio_3D == 2 ? "x/y" : aspect_ratio_3D == 3 ? "x/y/z" : "", aspect_ratio_3D >= 2 ? "on the same scale" : "independently scaled"); } /* process 'show surface' command */ static void show_surface() { SHOW_ALL_NL; fprintf(stderr, "\tsurface is %sdrawn\n", draw_surface ? "" : "not "); } /* process 'show hidden3d' command */ static void show_hidden3d() { SHOW_ALL_NL; fprintf(stderr, "\thidden surface is %s\n", hidden3d ? "removed" : "drawn"); show_hidden3doptions(); } static void show_increment() { fprintf(stderr,"\tPlot lines increment over "); if (prefer_line_styles) fprintf(stderr, "user-defined line styles rather than default line types\n"); else fprintf(stderr, "default linetypes\n"); } static void show_histogram() { if (histogram_opts.type == HT_CLUSTERED) fprintf(stderr, "\tHistogram style is clustered with gap %d ", histogram_opts.gap); else if (histogram_opts.type == HT_ERRORBARS) fprintf(stderr, "\tHistogram style is errorbars with gap %d lw %g ", histogram_opts.gap, histogram_opts.bar_lw); else if (histogram_opts.type == HT_STACKED_IN_LAYERS) fprintf(stderr, "\tHistogram style is rowstacked "); else if (histogram_opts.type == HT_STACKED_IN_TOWERS) fprintf(stderr, "\tHistogram style is columnstacked "); fprintf(stderr, " title offset "); show_position(&histogram_opts.title.offset); if (histogram_opts.title.textcolor.type == TC_LT) fprintf(stderr," textcolor lt %d", histogram_opts.title.textcolor.lt+1); fprintf(stderr, "\n"); } #ifdef GNUPLOT_HISTORY /* process 'show historysize' command */ static void show_historysize() { if (gnuplot_history_size >= 0) { fprintf(stderr, "\thistory size: %ld\n", gnuplot_history_size); } else { fprintf(stderr, "\thistory will not be truncated.\n"); } } #endif /* process 'show size' command */ static void show_size() { SHOW_ALL_NL; fprintf(stderr, "\tsize is scaled by %g,%g\n", xsize, ysize); if (aspect_ratio > 0) fprintf(stderr, "\tTry to set aspect ratio to %g:1.0\n", aspect_ratio); else if (aspect_ratio == 0) fputs("\tNo attempt to control aspect ratio\n", stderr); else fprintf(stderr, "\tTry to set LOCKED aspect ratio to %g:1.0\n", -aspect_ratio); } /* process 'show origin' command */ static void show_origin() { SHOW_ALL_NL; fprintf(stderr, "\torigin is set to %g,%g\n", xoffset, yoffset); } /* process 'show term' command */ static void show_term() { SHOW_ALL_NL; if (term) fprintf(stderr, " terminal type is %s %s\n", term->name, term_options); else fputs("\tterminal type is unknown\n", stderr); } /* process 'show tics|[xyzx2y2cb]tics' commands */ static void show_tics( TBOOLEAN showx, TBOOLEAN showy, TBOOLEAN showz, TBOOLEAN showx2, TBOOLEAN showy2, TBOOLEAN showcb) { SHOW_ALL_NL; if (xyplane.absolute) fprintf(stderr, "\txyplane intercepts z axis at %g\n", xyplane.z); else fprintf(stderr, "\txyplane ticslevel is %g\n", xyplane.z); if (grid_layer >= 0) fprintf(stderr, "tics are in %s of plot\n", (grid_layer==0) ? "back" : "front"); if (showx) show_ticdef(FIRST_X_AXIS); if (showx2) show_ticdef(SECOND_X_AXIS); if (showy) show_ticdef(FIRST_Y_AXIS); if (showy2) show_ticdef(SECOND_Y_AXIS); if (showz) show_ticdef(FIRST_Z_AXIS); if (showcb) show_ticdef(COLOR_AXIS); screen_ok = FALSE; } /* process 'show m[xyzx2y2cb]tics' commands */ static void show_mtics(AXIS_INDEX axis) { switch (axis_array[axis].minitics) { case MINI_OFF: fprintf(stderr, "\tminor %stics are off\n", axis_defaults[axis].name); break; case MINI_DEFAULT: fprintf(stderr, "\ \tminor %stics are off for linear scales\n\ \tminor %stics are computed automatically for log scales\n", axis_defaults[axis].name, axis_defaults[axis].name); break; case MINI_AUTO: fprintf(stderr, "\tminor %stics are computed automatically\n", axis_defaults[axis].name); break; case MINI_USER: fprintf(stderr, "\ \tminor %stics are drawn with %d subintervals between major xtic marks\n", axis_defaults[axis].name, (int) axis_array[axis].mtic_freq); break; default: int_error(NO_CARET, "Unknown minitic type in show_mtics()"); } } /* process 'show timestamp' command */ static void show_timestamp() { SHOW_ALL_NL; show_xyzlabel("", "time", &timelabel); fprintf(stderr, "\twritten in %s corner\n", (timelabel_bottom ? "bottom" : "top")); if (timelabel_rotate) fputs("\trotated if the terminal allows it\n\t", stderr); else fputs("\tnot rotated\n\t", stderr); } /* process 'show [xyzx2y2rtuv]range' commands */ static void show_range(AXIS_INDEX axis) { SHOW_ALL_NL; if (axis_array[axis].datatype == DT_TIMEDATE) fprintf(stderr, "\tset %sdata time\n", axis_defaults[axis].name); fprintf(stderr,"\t"); save_range(stderr, axis); } /* called by the functions below */ static void show_xyzlabel(const char *name, const char *suffix, text_label *label) { if (label) { fprintf(stderr, "\t%s%s is \"%s\", offset at ", name, suffix, label->text ? conv_text(label->text) : ""); show_position(&label->offset); } else return; if (label->font) fprintf(stderr, ", using font \"%s\"", conv_text(label->font)); if (label->tag == ROTATE_IN_3D_LABEL_TAG) fprintf(stderr, ", parallel to axis in 3D plots"); else if (label->rotate) fprintf(stderr, ", rotated by %d degrees in 2D plots", label->rotate); if (label->textcolor.type) save_textcolor(stderr, &label->textcolor); if (label->noenhanced) fprintf(stderr," noenhanced"); putc('\n', stderr); } /* process 'show title' command */ static void show_title() { SHOW_ALL_NL; show_xyzlabel("","title", &title); } /* process 'show {x|y|z|x2|y2}label' command */ static void show_axislabel(AXIS_INDEX axis) { SHOW_ALL_NL; show_xyzlabel(axis_defaults[axis].name, "label", &axis_array[axis].label); } /* process 'show [xyzx2y2]data' commands */ static void show_data_is_timedate(AXIS_INDEX axis) { SHOW_ALL_NL; fprintf(stderr, "\t%s is set to %s\n", axis_defaults[axis].name, axis_array[axis].datatype == DT_TIMEDATE ? "time" : "numerical"); } /* process 'show timefmt' command */ static void show_timefmt() { int axis; SHOW_ALL_NL; if ((axis = lookup_table(axisname_tbl, c_token)) >= 0) { c_token++; fprintf(stderr, "\tread format for time on %s axis is \"%s\"\n", axis_defaults[axis].name, conv_text(axis_array[axis].timefmt)); } else { /* show all currently active time axes' formats: */ for (axis = 0; axis<AXIS_ARRAY_SIZE; axis++) if (axis_array[axis].datatype == DT_TIMEDATE) fprintf(stderr, "\tread format for time on %s axis is \"%s\"\n", axis_defaults[axis].name, conv_text(axis_array[axis].timefmt)); } } /* process 'show locale' command */ static void show_locale() { SHOW_ALL_NL; locale_handler(ACTION_SHOW,NULL); } /* process 'show loadpath' command */ static void show_loadpath() { SHOW_ALL_NL; loadpath_handler(ACTION_SHOW,NULL); } /* process 'show fontpath' command */ static void show_fontpath() { SHOW_ALL_NL; fontpath_handler(ACTION_SHOW,NULL); } /* process 'show zero' command */ static void show_zero() { SHOW_ALL_NL; fprintf(stderr, "\tzero is %g\n", zero); } /* process 'show datafile' command */ static void show_datafile() { SHOW_ALL_NL; if (END_OF_COMMAND || almost_equals(c_token,"miss$ing")) { if (missing_val == NULL) fputs("\tNo missing data string set for datafile\n", stderr); else fprintf(stderr, "\t\"%s\" in datafile is interpreted as missing value\n", missing_val); } if (END_OF_COMMAND || almost_equals(c_token,"sep$arator")) { if (df_separator != '\0') fprintf(stderr, "\tdatafile fields separated by \"%c\"\n", df_separator); else fprintf(stderr, "\tdatafile fields separated by whitespace\n"); } if (END_OF_COMMAND || almost_equals(c_token,"com$ments")) { fprintf(stderr, "\tComments chars are \"%s\"\n", df_commentschars); } if (df_fortran_constants) fputs("\tDatafile parsing will accept Fortran D or Q constants\n",stderr); if (df_nofpe_trap) fputs("\tNo floating point exception handler during data input\n",stderr); if (almost_equals(c_token,"bin$ary")) { if (!END_OF_COMMAND) c_token++; if (END_OF_COMMAND) { /* 'show datafile binary' */ df_show_binary(stderr); fputc('\n',stderr); } if (END_OF_COMMAND || almost_equals(c_token, "datas$izes")) /* 'show datafile binary datasizes' */ df_show_datasizes(stderr); if (END_OF_COMMAND) fputc('\n',stderr); if (END_OF_COMMAND || almost_equals(c_token, "filet$ypes")) /* 'show datafile binary filetypes' */ df_show_filetypes(stderr); } if (!END_OF_COMMAND) c_token++; } #ifdef USE_MOUSE /* process 'show mouse' command */ static void show_mouse() { SHOW_ALL_NL; if (mouse_setting.on) { fprintf(stderr, "\tmouse is on\n"); if (mouse_setting.annotate_zoom_box) { fprintf(stderr, "\tzoom coordinates will be drawn\n"); } else { fprintf(stderr, "\tno zoom coordinates will be drawn\n"); } if (mouse_setting.polardistance) { fprintf(stderr, "\tdistance to ruler will be show in polar coordinates\n"); } else { fprintf(stderr, "\tno polar distance to ruler will be shown\n"); } if (mouse_setting.doubleclick > 0) { fprintf(stderr, "\tdouble click resolution is %d ms\n", mouse_setting.doubleclick); } else { fprintf(stderr, "\tdouble click resolution is off\n"); } fprintf(stderr, "\tformatting numbers with \"%s\"\n", mouse_setting.fmt); fprintf(stderr, "\tformat for Button 1 is %d\n", (int) clipboard_mode); if (clipboard_alt_string) { fprintf(stderr, "\talternative format for Button 1 is '%s'\n", clipboard_alt_string); } fprintf(stderr, "\tformat for Button 2 is %d\n", (int) mouse_mode); if (mouse_alt_string) { fprintf(stderr, "\talternative format for Button 2 is '%s'\n", mouse_alt_string); } if (mouse_setting.label) { fprintf(stderr, "\tButton 2 draws persistent labels with options \"%s\"\n", mouse_setting.labelopts); } else { fprintf(stderr, "\tButton 2 draws temporary labels\n"); } fprintf(stderr, "\tzoomjump is %s\n", mouse_setting.warp_pointer ? "on" : "off"); fprintf(stderr, "\tcommunication commands will %sbe shown\n", mouse_setting.verbose ? "" : "not "); } else { fprintf(stderr, "\tmouse is off\n"); } } #endif /* process 'show plot' command */ static void show_plot() { SHOW_ALL_NL; fprintf(stderr, "\tlast plot command was: %s\n", replot_line); } /* process 'show variables' command */ static void show_variables() { struct udvt_entry *udv = first_udv; int len; TBOOLEAN show_all = FALSE; char leading_string[MAX_ID_LEN+1] = {'\0'}; SHOW_ALL_NL; if (!END_OF_COMMAND) { if (almost_equals(c_token, "all")) show_all = TRUE; else copy_str(leading_string, c_token, MAX_ID_LEN); c_token++; } if (show_all) fputs("\n\tAll available variables:\n", stderr); else if (*leading_string) fprintf(stderr,"\n\tVariables beginning with %s:\n", leading_string); else fputs("\n\tUser and default variables:\n", stderr); while (udv) { len = strcspn(udv->udv_name, " "); if (*leading_string && strncmp(udv->udv_name,leading_string,strlen(leading_string))) { udv = udv->next_udv; continue; } else if (!show_all && !strncmp(udv->udv_name,"GPVAL_",6) && !(*leading_string)) { /* In the default case skip GPVAL_ variables */ udv = udv->next_udv; continue; } if (udv->udv_undef) { FPRINTF((stderr, "\t%-*s is undefined\n", len, udv->udv_name)); } else { fprintf(stderr, "\t%-*s ", len, udv->udv_name); fputs("= ", stderr); disp_value(stderr, &(udv->udv_value), TRUE); (void) putc('\n', stderr); } udv = udv->next_udv; } } /* Show line style number <tag> (0 means show all) */ static void show_linestyle(int tag) { struct linestyle_def *this_linestyle; TBOOLEAN showed = FALSE; for (this_linestyle = first_linestyle; this_linestyle != NULL; this_linestyle = this_linestyle->next) { if (tag == 0 || tag == this_linestyle->tag) { showed = TRUE; fprintf(stderr, "\tlinestyle %d, ", this_linestyle->tag); save_linetype(stderr, &(this_linestyle->lp_properties), TRUE); fputc('\n', stderr); } } if (tag > 0 && !showed) int_error(c_token, "linestyle not found"); } /* Show linetype number <tag> (0 means show all) */ static void show_linetype(int tag) { struct linestyle_def *this_linestyle; TBOOLEAN showed = FALSE; if (tag == 0) fprintf(stderr, "\tLinetypes repeat every %d unless explicitly defined\n", linetype_recycle_count); for (this_linestyle = first_perm_linestyle; this_linestyle != NULL; this_linestyle = this_linestyle->next) { if (tag == 0 || tag == this_linestyle->tag) { showed = TRUE; fprintf(stderr, "\tlinetype %d, ", this_linestyle->tag); save_linetype(stderr, &(this_linestyle->lp_properties), TRUE); fputc('\n', stderr); } } if (tag > 0 && !showed) int_error(c_token, "linetype not found"); } /* Show arrow style number <tag> (0 means show all) */ static void show_arrowstyle(int tag) { struct arrowstyle_def *this_arrowstyle; TBOOLEAN showed = FALSE; for (this_arrowstyle = first_arrowstyle; this_arrowstyle != NULL; this_arrowstyle = this_arrowstyle->next) { if (tag == 0 || tag == this_arrowstyle->tag) { showed = TRUE; fprintf(stderr, "\tarrowstyle %d, ", this_arrowstyle->tag); fflush(stderr); fprintf(stderr, "\t %s %s", this_arrowstyle->arrow_properties.head ? (this_arrowstyle->arrow_properties.head==2 ? " both heads " : " one head ") : " nohead", this_arrowstyle->arrow_properties.layer ? "front" : "back"); save_linetype(stderr, &(this_arrowstyle->arrow_properties.lp_properties), FALSE); fputc('\n', stderr); if (this_arrowstyle->arrow_properties.head > 0) { fprintf(stderr, "\t arrow heads: %s, ", ( (this_arrowstyle->arrow_properties.head_filled==2) ? "filled" : ( (this_arrowstyle->arrow_properties.head_filled==1) ? "empty" : "nofilled" ))); if (this_arrowstyle->arrow_properties.head_length > 0) { static char *msg[] = {"(first x axis) ", "(second x axis) ", "(graph units) ", "(screen units) ", "(character units) "}; fprintf(stderr," length %s%g, angle %g deg", this_arrowstyle->arrow_properties.head_lengthunit == first_axes ? "" : msg[this_arrowstyle->arrow_properties.head_lengthunit], this_arrowstyle->arrow_properties.head_length, this_arrowstyle->arrow_properties.head_angle); if (this_arrowstyle->arrow_properties.head_filled!=0) fprintf(stderr,", backangle %g deg", this_arrowstyle->arrow_properties.head_backangle); fprintf(stderr,"\n"); } else fprintf(stderr," (default length and angles)\n"); } } } if (tag > 0 && !showed) int_error(c_token, "arrowstyle not found"); } /* called by show_tics */ static void show_ticdef(AXIS_INDEX axis) { struct ticmark *t; const char *ticfmt = conv_text(axis_array[axis].formatstring); fprintf(stderr, "\t%s-axis tics are %s, \ \tmajor ticscale is %g and minor ticscale is %g\n", axis_defaults[axis].name, (axis_array[axis].tic_in ? "IN" : "OUT"), axis_array[axis].ticscale, axis_array[axis].miniticscale); fprintf(stderr, "\t%s-axis tics:\t", axis_defaults[axis].name); switch (axis_array[axis].ticmode & TICS_MASK) { case NO_TICS: fputs("OFF\n", stderr); return; case TICS_ON_AXIS: fputs("on axis", stderr); if (axis_array[axis].ticmode & TICS_MIRROR) fprintf(stderr, " and mirrored %s", (axis_array[axis].tic_in ? "OUT" : "IN")); break; case TICS_ON_BORDER: fputs("on border", stderr); if (axis_array[axis].ticmode & TICS_MIRROR) fputs(" and mirrored on opposite border", stderr); break; } if (axis_array[axis].ticdef.rangelimited) fprintf(stderr, "\n\t tics are limited to data range"); fputs("\n\t labels are ", stderr); if (axis_array[axis].manual_justify) { switch (axis_array[axis].label.pos) { case LEFT:{ fputs("left justified, ", stderr); break; } case RIGHT:{ fputs("right justified, ", stderr); break; } case CENTRE:{ fputs("center justified, ", stderr); break; } } } else fputs("justified automatically, ", stderr); fprintf(stderr, "format \"%s\"", ticfmt); if (axis_array[axis].tic_rotate) { fprintf(stderr," rotated"); fprintf(stderr," by %d",axis_array[axis].tic_rotate); fputs(" in 2D mode, terminal permitting,\n\t", stderr); } else fputs(" and are not rotated,\n\t", stderr); fputs(" offset ",stderr); show_position(&axis_array[axis].ticdef.offset); fputs("\n\t",stderr); switch (axis_array[axis].ticdef.type) { case TIC_COMPUTED:{ fputs(" intervals computed automatically\n", stderr); break; } case TIC_MONTH:{ fputs(" Months computed automatically\n", stderr); break; } case TIC_DAY:{ fputs(" Days computed automatically\n", stderr); break; } case TIC_SERIES:{ fputs(" series", stderr); if (axis_array[axis].ticdef.def.series.start != -VERYLARGE) { fputs(" from ", stderr); SHOW_NUM_OR_TIME(axis_array[axis].ticdef.def.series.start, axis); } fprintf(stderr, " by %g%s", axis_array[axis].ticdef.def.series.incr, axis_array[axis].datatype == DT_TIMEDATE ? " secs" : ""); if (axis_array[axis].ticdef.def.series.end != VERYLARGE) { fputs(" until ", stderr); SHOW_NUM_OR_TIME(axis_array[axis].ticdef.def.series.end, axis); } putc('\n', stderr); break; } case TIC_USER:{ fputs(" no auto-generated tics\n", stderr); break; } default:{ int_error(NO_CARET, "unknown ticdef type in show_ticdef()"); /* NOTREACHED */ } } if (axis_array[axis].ticdef.def.user) { fputs("\t explicit list (", stderr); for (t = axis_array[axis].ticdef.def.user; t != NULL; t = t->next) { if (t->label) fprintf(stderr, "\"%s\" ", conv_text(t->label)); SHOW_NUM_OR_TIME(t->position, axis); if (t->level) fprintf(stderr," %d",t->level); if (t->next) fputs(", ", stderr); } fputs(")\n", stderr); } if (axis_array[axis].ticdef.textcolor.type != TC_DEFAULT) { fputs("\t ", stderr); save_textcolor(stderr, &axis_array[axis].ticdef.textcolor); fputs("\n", stderr); } if (axis_array[axis].ticdef.font && *axis_array[axis].ticdef.font) { fprintf(stderr,"\t font \"%s\"\n", axis_array[axis].ticdef.font); } } /* Display a value in human-readable form. */ void disp_value(FILE *fp, struct value *val, TBOOLEAN need_quotes) { switch (val->type) { case INTGR: fprintf(fp, "%d", val->v.int_val); break; case CMPLX: if (isnan(val->v.cmplx_val.real)) fprintf(fp, "NaN"); else if (val->v.cmplx_val.imag != 0.0) fprintf(fp, "{%s, %s}", num_to_str(val->v.cmplx_val.real), num_to_str(val->v.cmplx_val.imag)); else fprintf(fp, "%s", num_to_str(val->v.cmplx_val.real)); break; case STRING: if (val->v.string_val) { if (need_quotes) fprintf(fp, "\"%s\"", conv_text(val->v.string_val)); else fprintf(fp, "%s", val->v.string_val); } break; default: int_error(NO_CARET, "unknown type in disp_value()"); } } /* Helper for disp_value(): display a single number in decimal * format. Rotates through 4 buffers 's[j]', and returns pointers to * them, to avoid execution ordering problems if this function is * called more than once between sequence points. */ static char * num_to_str(double r) { static int i = 0; static char s[4][25]; int j = i++; if (i > 3) i = 0; sprintf(s[j], "%.15g", r); if (strchr(s[j], '.') == NULL && strchr(s[j], 'e') == NULL && strchr(s[j], 'E') == NULL) strcat(s[j], ".0"); return s[j]; } /* convert unprintable characters as \okt, tab as \t, newline \n .. */ char * conv_text(const char *t) { static char *r = NULL, *s; if (t==NULL) return NULL; /* is this enough? */ r = gp_realloc(r, 4 * (strlen(t) + 1), "conv_text buffer"); s = r; while (*t != NUL) { switch (*t) { case '\t': *s++ = '\\'; *s++ = 't'; break; case '\n': *s++ = '\\'; *s++ = 'n'; break; case '\r': *s++ = '\\'; *s++ = 'r'; break; case '"': case '\\': *s++ = '\\'; *s++ = *t; break; default: if (encoding == S_ENC_UTF8) *s++ = *t; else if (isprint((unsigned char)*t)) *s++ = *t; else { *s++ = '\\'; sprintf(s, "%03o", (unsigned char)*t); while (*s != NUL) s++; } break; } t++; } *s = NUL; return r; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/standard.c������������������������������������������������������������������������0000644�0004711�0000144�00000073134�12004631271�012670� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: standard.c,v 1.30.2.2 2012/07/24 15:41:31 markisch Exp $"); } #endif /* GNUPLOT - standard.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "standard.h" #include "gadgets.h" /* for 'ang2rad' and 'zero' */ #include "gp_time.h" /* needed by f_tmsec() and friendsa */ #include "util.h" /* for int_error() */ static double carlson_elliptic_rc(double x,double y); static double carlson_elliptic_rf(double x,double y,double z); static double carlson_elliptic_rd(double x,double y,double z); static double carlson_elliptic_rj(double x,double y,double z,double p); static double jzero __PROTO((double x)); static double pzero __PROTO((double x)); static double qzero __PROTO((double x)); static double yzero __PROTO((double x)); static double rj0 __PROTO((double x)); static double ry0 __PROTO((double x)); static double jone __PROTO((double x)); static double pone __PROTO((double x)); static double qone __PROTO((double x)); static double yone __PROTO((double x)); static double rj1 __PROTO((double x)); static double ry1 __PROTO((double x)); /* The bessel function approximations here are from * "Computer Approximations" * by Hart, Cheney et al. * John Wiley & Sons, 1968 */ /* There appears to be a mistake in Hart, Cheney et al. on page 149. * Where it list Qn(x)/x ~ P(z*z)/Q(z*z), z = 8/x, it should read * Qn(x)/z ~ P(z*z)/Q(z*z), z = 8/x * In the functions below, Qn(x) is implementated using the later * equation. * These bessel functions are accurate to about 1e-13 */ #define PI_ON_FOUR 0.78539816339744830961566084581987572 #define PI_ON_TWO 1.57079632679489661923131269163975144 #define THREE_PI_ON_FOUR 2.35619449019234492884698253745962716 #define TWO_ON_PI 0.63661977236758134307553505349005744 static double dzero = 0.0; /* jzero for x in [0,8] * Index 5849, 19.22 digits precision */ static double GPFAR pjzero[] = { 0.4933787251794133561816813446e+21, -0.11791576291076105360384408e+21, 0.6382059341072356562289432465e+19, -0.1367620353088171386865416609e+18, 0.1434354939140346111664316553e+16, -0.8085222034853793871199468171e+13, 0.2507158285536881945555156435e+11, -0.4050412371833132706360663322e+8, 0.2685786856980014981415848441e+5 }; static double GPFAR qjzero[] = { 0.4933787251794133562113278438e+21, 0.5428918384092285160200195092e+19, 0.3024635616709462698627330784e+17, 0.1127756739679798507056031594e+15, 0.3123043114941213172572469442e+12, 0.669998767298223967181402866e+9, 0.1114636098462985378182402543e+7, 0.1363063652328970604442810507e+4, 0.1e+1 }; /* pzero for x in [8,inf] * Index 6548, 18.16 digits precision */ static double GPFAR ppzero[] = { 0.2277909019730468430227002627e+5, 0.4134538663958076579678016384e+5, 0.2117052338086494432193395727e+5, 0.348064864432492703474453111e+4, 0.15376201909008354295771715e+3, 0.889615484242104552360748e+0 }; static double GPFAR qpzero[] = { 0.2277909019730468431768423768e+5, 0.4137041249551041663989198384e+5, 0.2121535056188011573042256764e+5, 0.350287351382356082073561423e+4, 0.15711159858080893649068482e+3, 0.1e+1 }; /* qzero for x in [8,inf] * Index 6948, 18.33 digits precision */ static double GPFAR pqzero[] = { -0.8922660020080009409846916e+2, -0.18591953644342993800252169e+3, -0.11183429920482737611262123e+3, -0.2230026166621419847169915e+2, -0.124410267458356384591379e+1, -0.8803330304868075181663e-2, }; static double GPFAR qqzero[] = { 0.571050241285120619052476459e+4, 0.1195113154343461364695265329e+5, 0.726427801692110188369134506e+4, 0.148872312322837565816134698e+4, 0.9059376959499312585881878e+2, 0.1e+1 }; /* yzero for x in [0,8] * Index 6245, 18.78 digits precision */ static double GPFAR pyzero[] = { -0.2750286678629109583701933175e+20, 0.6587473275719554925999402049e+20, -0.5247065581112764941297350814e+19, 0.1375624316399344078571335453e+18, -0.1648605817185729473122082537e+16, 0.1025520859686394284509167421e+14, -0.3436371222979040378171030138e+11, 0.5915213465686889654273830069e+8, -0.4137035497933148554125235152e+5 }; static double GPFAR qyzero[] = { 0.3726458838986165881989980739e+21, 0.4192417043410839973904769661e+19, 0.2392883043499781857439356652e+17, 0.9162038034075185262489147968e+14, 0.2613065755041081249568482092e+12, 0.5795122640700729537380087915e+9, 0.1001702641288906265666651753e+7, 0.1282452772478993804176329391e+4, 0.1e+1 }; /* jone for x in [0,8] * Index 6050, 20.98 digits precision */ static double GPFAR pjone[] = { 0.581199354001606143928050809e+21, -0.6672106568924916298020941484e+20, 0.2316433580634002297931815435e+19, -0.3588817569910106050743641413e+17, 0.2908795263834775409737601689e+15, -0.1322983480332126453125473247e+13, 0.3413234182301700539091292655e+10, -0.4695753530642995859767162166e+7, 0.270112271089232341485679099e+4 }; static double GPFAR qjone[] = { 0.11623987080032122878585294e+22, 0.1185770712190320999837113348e+20, 0.6092061398917521746105196863e+17, 0.2081661221307607351240184229e+15, 0.5243710262167649715406728642e+12, 0.1013863514358673989967045588e+10, 0.1501793594998585505921097578e+7, 0.1606931573481487801970916749e+4, 0.1e+1 }; /* pone for x in [8,inf] * Index 6749, 18.11 digits precision */ static double GPFAR ppone[] = { 0.352246649133679798341724373e+5, 0.62758845247161281269005675e+5, 0.313539631109159574238669888e+5, 0.49854832060594338434500455e+4, 0.2111529182853962382105718e+3, 0.12571716929145341558495e+1 }; static double GPFAR qpone[] = { 0.352246649133679798068390431e+5, 0.626943469593560511888833731e+5, 0.312404063819041039923015703e+5, 0.4930396490181088979386097e+4, 0.2030775189134759322293574e+3, 0.1e+1 }; /* qone for x in [8,inf] * Index 7149, 18.28 digits precision */ static double GPFAR pqone[] = { 0.3511751914303552822533318e+3, 0.7210391804904475039280863e+3, 0.4259873011654442389886993e+3, 0.831898957673850827325226e+2, 0.45681716295512267064405e+1, 0.3532840052740123642735e-1 }; static double GPFAR qqone[] = { 0.74917374171809127714519505e+4, 0.154141773392650970499848051e+5, 0.91522317015169922705904727e+4, 0.18111867005523513506724158e+4, 0.1038187585462133728776636e+3, 0.1e+1 }; /* yone for x in [0,8] * Index 6444, 18.24 digits precision */ static double GPFAR pyone[] = { -0.2923821961532962543101048748e+20, 0.7748520682186839645088094202e+19, -0.3441048063084114446185461344e+18, 0.5915160760490070618496315281e+16, -0.4863316942567175074828129117e+14, 0.2049696673745662182619800495e+12, -0.4289471968855248801821819588e+9, 0.3556924009830526056691325215e+6 }; static double GPFAR qyone[] = { 0.1491311511302920350174081355e+21, 0.1818662841706134986885065935e+19, 0.113163938269888452690508283e+17, 0.4755173588888137713092774006e+14, 0.1500221699156708987166369115e+12, 0.3716660798621930285596927703e+9, 0.726914730719888456980191315e+6, 0.10726961437789255233221267e+4, 0.1e+1 }; /* * Make all the following internal routines perform autoconversion * from string to numeric value. */ #define pop(x) pop_or_convert_from_string(x) void f_real(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ push(Gcomplex(&a, real(pop(&a)), 0.0)); } void f_imag(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ push(Gcomplex(&a, imag(pop(&a)), 0.0)); } /* ang2rad is 1 if we are in radians, or pi/180 if we are in degrees */ void f_arg(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ push(Gcomplex(&a, angle(pop(&a)) / ang2rad, 0.0)); } void f_conjg(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); push(Gcomplex(&a, real(&a), -imag(&a))); } /* ang2rad is 1 if we are in radians, or pi/180 if we are in degrees */ void f_sin(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); push(Gcomplex(&a, sin(ang2rad * real(&a)) * cosh(ang2rad * imag(&a)), cos(ang2rad * real(&a)) * sinh(ang2rad * imag(&a)))); } void f_cos(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); push(Gcomplex(&a, cos(ang2rad * real(&a)) * cosh(ang2rad * imag(&a)), -sin(ang2rad * real(&a)) * sinh(ang2rad * imag(&a)))); } void f_tan(union argument *arg) { struct value a; double den; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); if (imag(&a) == 0.0) push(Gcomplex(&a, tan(ang2rad * real(&a)), 0.0)); else { den = cos(2 * ang2rad * real(&a)) + cosh(2 * ang2rad * imag(&a)); if (den == 0.0) { undefined = TRUE; push(&a); } else push(Gcomplex(&a, sin(2 * ang2rad * real(&a)) / den, sinh(2 * ang2rad * imag(&a)) / den)); } } void f_asin(union argument *arg) { struct value a; double alpha, beta, x, y; int ysign; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); x = real(&a); y = imag(&a); if (y == 0.0 && fabs(x) <= 1.0) { push(Gcomplex(&a, asin(x) / ang2rad, 0.0)); } else if (x == 0.0) { push(Gcomplex(&a, 0.0, -log(-y + sqrt(y * y + 1)) / ang2rad)); } else { beta = sqrt((x + 1) * (x + 1) + y * y) / 2 - sqrt((x - 1) * (x - 1) + y * y) / 2; if (beta > 1) beta = 1; /* Avoid rounding error problems */ alpha = sqrt((x + 1) * (x + 1) + y * y) / 2 + sqrt((x - 1) * (x - 1) + y * y) / 2; ysign = (y >= 0) ? 1 : -1; push(Gcomplex(&a, asin(beta) / ang2rad, ysign * log(alpha + sqrt(alpha * alpha - 1)) / ang2rad)); } } void f_acos(union argument *arg) { struct value a; double x, y; double ysign; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); x = real(&a); y = imag(&a); if (y == 0.0 && fabs(x) <= 1.0) { /* real result */ push(Gcomplex(&a, acos(x) / ang2rad, 0.0)); } else { double alpha = sqrt((x + 1) * (x + 1) + y * y) / 2 + sqrt((x - 1) * (x - 1) + y * y) / 2; double beta = sqrt((x + 1) * (x + 1) + y * y) / 2 - sqrt((x - 1) * (x - 1) + y * y) / 2; if (beta > 1) beta = 1; /* Avoid rounding error problems */ else if (beta < -1) beta = -1; ysign = (y >= 0) ? 1 : -1; push(Gcomplex(&a, acos(beta) / ang2rad, -ysign * log(alpha + sqrt(alpha * alpha - 1)) / ang2rad)); } } void f_atan(union argument *arg) { struct value a; double x, y, u, v, w, z; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); x = real(&a); y = imag(&a); if (y == 0.0) push(Gcomplex(&a, atan(x) / ang2rad, 0.0)); else if (x == 0.0 && fabs(y) >= 1.0) { undefined = TRUE; push(Gcomplex(&a, 0.0, 0.0)); } else { if (x >= 0) { u = x; v = y; } else { u = -x; v = -y; } z = atan(2 * u / (1 - u * u - v * v)); w = log((u * u + (v + 1) * (v + 1)) / (u * u + (v - 1) * (v - 1))) / 4; if (z < 0) z = z + 2 * PI_ON_TWO; if (x < 0) { z = -z; w = -w; } push(Gcomplex(&a, 0.5 * z / ang2rad, w)); } } /* real parts only */ void f_atan2(union argument *arg) { struct value a; double x; double y; (void) arg; /* avoid -Wunused warning */ x = real(pop(&a)); y = real(pop(&a)); if (x == 0.0 && y == 0.0) { undefined = TRUE; push(Ginteger(&a, 0)); } push(Gcomplex(&a, atan2(y, x) / ang2rad, 0.0)); } void f_sinh(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); push(Gcomplex(&a, sinh(real(&a)) * cos(imag(&a)), cosh(real(&a)) * sin(imag(&a)))); } void f_cosh(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); push(Gcomplex(&a, cosh(real(&a)) * cos(imag(&a)), sinh(real(&a)) * sin(imag(&a)))); } void f_tanh(union argument *arg) { struct value a; double den; double real_2arg, imag_2arg; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); real_2arg = 2. * real(&a); imag_2arg = 2. * imag(&a); #ifdef E_MINEXP if (-fabs(real_2arg) < E_MINEXP) { push(Gcomplex(&a, real_2arg < 0 ? -1.0 : 1.0, 0.0)); return; } #else { int old_errno = errno; if (exp(-fabs(real_2arg)) == 0.0) { /* some libm's will raise a silly ERANGE in cosh() and sin() */ errno = old_errno; push(Gcomplex(&a, real_2arg < 0 ? -1.0 : 1.0, 0.0)); return; } } #endif den = cosh(real_2arg) + cos(imag_2arg); push(Gcomplex(&a, sinh(real_2arg) / den, sin(imag_2arg) / den)); } void f_asinh(union argument *arg) { struct value a; /* asinh(z) = -I*asin(I*z) */ double alpha, beta, x, y; int ysign; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); x = -imag(&a); y = real(&a); if (y == 0.0 && fabs(x) <= 1.0) { push(Gcomplex(&a, 0.0, -asin(x) / ang2rad)); } else if (y == 0.0) { push(Gcomplex(&a, 0.0, 0.0)); undefined = TRUE; } else if (x == 0.0) { push(Gcomplex(&a, log(y + sqrt(y * y + 1)) / ang2rad, 0.0)); } else { beta = sqrt((x + 1) * (x + 1) + y * y) / 2 - sqrt((x - 1) * (x - 1) + y * y) / 2; alpha = sqrt((x + 1) * (x + 1) + y * y) / 2 + sqrt((x - 1) * (x - 1) + y * y) / 2; ysign = (y >= 0) ? 1 : -1; push(Gcomplex(&a, ysign * log(alpha + sqrt(alpha * alpha - 1)) / ang2rad, -asin(beta) / ang2rad)); } } void f_acosh(union argument *arg) { struct value a; double alpha, beta, x, y; /* acosh(z) = I*acos(z) */ (void) arg; /* avoid -Wunused warning */ (void) pop(&a); x = real(&a); y = imag(&a); if (y == 0.0 && fabs(x) <= 1.0) { push(Gcomplex(&a, 0.0, acos(x) / ang2rad)); } else if (y == 0) { push(Gcomplex(&a, log(x + sqrt(x * x - 1)) / ang2rad, 0.0)); } else { alpha = sqrt((x + 1) * (x + 1) + y * y) / 2 + sqrt((x - 1) * (x - 1) + y * y) / 2; beta = sqrt((x + 1) * (x + 1) + y * y) / 2 - sqrt((x - 1) * (x - 1) + y * y) / 2; push(Gcomplex(&a, log(alpha + sqrt(alpha * alpha - 1)) / ang2rad, (y<0 ? -1 : 1) * acos(beta) / ang2rad)); } } void f_atanh(union argument *arg) { struct value a; double x, y, u, v, w, z; /* atanh(z) = -I*atan(I*z) */ (void) arg; /* avoid -Wunused warning */ (void) pop(&a); x = -imag(&a); y = real(&a); if (y == 0.0) push(Gcomplex(&a, 0.0, -atan(x) / ang2rad)); else if (x == 0.0 && fabs(y) >= 1.0) { undefined = TRUE; push(Gcomplex(&a, 0.0, 0.0)); } else { if (x >= 0) { u = x; v = y; } else { u = -x; v = -y; } z = atan(2 * u / (1 - u * u - v * v)); w = log((u * u + (v + 1) * (v + 1)) / (u * u + (v - 1) * (v - 1))) / 4; if (z < 0) z = z + 2 * PI_ON_TWO; if (x < 0) { z = -z; w = -w; } push(Gcomplex(&a, w, -0.5 * z / ang2rad)); } } void f_ellip_first(union argument *arg) { struct value a; double ak,q; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); if (fabs(imag(&a)) > zero) int_error(NO_CARET, "can only do elliptic integrals of reals"); ak=real(&a); q=(1.0-ak)*(1.0+ak); if (q > 0.0) push(Gcomplex(&a,carlson_elliptic_rf(0.0,q,1.0) ,0.0)); else { push(&a); undefined=TRUE; } } void f_ellip_second(union argument *arg) { struct value a; double ak,q,e; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); if (fabs(imag(&a)) > zero) int_error(NO_CARET, "can only do elliptic integrals of reals"); ak=real(&a); q=(1.0-ak)*(1.0+ak); if (q > 0.0) { e=carlson_elliptic_rf(0.0,q,1.0)-(ak*ak)*carlson_elliptic_rd(0.0,q,1.0)/3.0; push(Gcomplex(&a,e,0.0)); } else if (q < 0.0) { undefined=TRUE; push(&a); } else { e=1.0; push(Gcomplex(&a,e,0.0)); } } void f_ellip_third(union argument *arg) { struct value a1,a2; double ak,en,q; (void) arg; /* avoid -Wunused warning */ (void) pop(&a1); (void) pop(&a2); if (fabs(imag(&a1)) > zero || fabs(imag(&a2)) > zero) int_error(NO_CARET, "can only do elliptic integrals of reals"); ak=real(&a1); en=real(&a2); q=(1.0-ak)*(1.0+ak); if (q > 0.0 && en < 1.0) push(Gcomplex(&a2, carlson_elliptic_rf(0.0,q,1.0)+en*carlson_elliptic_rj(0.0,q,1.0,1.0-en)/3.0, 0.0)); else { undefined=TRUE; push(&a1); } } void f_int(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ push(Ginteger(&a, (int) real(pop(&a)))); } #define BAD_DEFAULT default: int_error(NO_CARET, "internal error : argument neither INT or CMPLX") void f_abs(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); switch (a.type) { case INTGR: push(Ginteger(&a, abs(a.v.int_val))); break; case CMPLX: push(Gcomplex(&a, magnitude(&a), 0.0)); break; BAD_DEFAULT; } } void f_sgn(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); switch (a.type) { case INTGR: push(Ginteger(&a, (a.v.int_val > 0) ? 1 : (a.v.int_val < 0) ? -1 : 0)); break; case CMPLX: push(Ginteger(&a, (a.v.cmplx_val.real > 0.0) ? 1 : (a.v.cmplx_val.real < 0.0) ? -1 : 0)); break; BAD_DEFAULT; } } void f_sqrt(union argument *arg) { struct value a; double mag; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); mag = sqrt(magnitude(&a)); if (imag(&a) == 0.0) { if (real(&a) < 0.0) push(Gcomplex(&a, 0.0, mag)); else push(Gcomplex(&a, mag, 0.0)); } else { /* -pi < ang < pi, so real(sqrt(z)) >= 0 */ double ang = angle(&a) / 2.0; push(Gcomplex(&a, mag * cos(ang), mag * sin(ang))); } } void f_exp(union argument *arg) { struct value a; double mag, ang; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); mag = gp_exp(real(&a)); ang = imag(&a); push(Gcomplex(&a, mag * cos(ang), mag * sin(ang))); } void f_log10(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); if (magnitude(&a) == 0.0) { undefined = TRUE; push(&a); } else push(Gcomplex(&a, log(magnitude(&a)) / M_LN10, angle(&a) / M_LN10)); } void f_log(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); if (magnitude(&a) == 0.0) { undefined = TRUE; push(&a); } else push(Gcomplex(&a, log(magnitude(&a)), angle(&a))); } void f_floor(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); switch (a.type) { case INTGR: push(Ginteger(&a, (int) floor((double) a.v.int_val))); break; case CMPLX: push(Ginteger(&a, (int) floor(a.v.cmplx_val.real))); break; BAD_DEFAULT; } } void f_ceil(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); switch (a.type) { case INTGR: push(Ginteger(&a, (int) ceil((double) a.v.int_val))); break; case CMPLX: push(Ginteger(&a, (int) ceil(a.v.cmplx_val.real))); break; BAD_DEFAULT; } } /* Terminate the autoconversion from string to numeric values */ #undef pop /* EAM - replacement for defined(foo) + f_pushv + f_isvar * implements exists("foo") instead */ void f_exists(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); if (a.type == STRING) { struct udvt_entry *udv = add_udv_by_name(a.v.string_val); gpfree_string(&a); push(Ginteger(&a, udv->udv_undef ? 0 : 1)); } else { push(Ginteger(&a, 0)); } } /* bessel function approximations */ static double jzero(double x) { double p, q, x2; int n; x2 = x * x; p = pjzero[8]; q = qjzero[8]; for (n = 7; n >= 0; n--) { p = p * x2 + pjzero[n]; q = q * x2 + qjzero[n]; } return (p / q); } static double pzero(double x) { double p, q, z, z2; int n; z = 8.0 / x; z2 = z * z; p = ppzero[5]; q = qpzero[5]; for (n = 4; n >= 0; n--) { p = p * z2 + ppzero[n]; q = q * z2 + qpzero[n]; } return (p / q); } static double qzero(double x) { double p, q, z, z2; int n; z = 8.0 / x; z2 = z * z; p = pqzero[5]; q = qqzero[5]; for (n = 4; n >= 0; n--) { p = p * z2 + pqzero[n]; q = q * z2 + qqzero[n]; } return (p / q); } static double yzero(double x) { double p, q, x2; int n; x2 = x * x; p = pyzero[8]; q = qyzero[8]; for (n = 7; n >= 0; n--) { p = p * x2 + pyzero[n]; q = q * x2 + qyzero[n]; } return (p / q); } static double rj0(double x) { if (x <= 0.0) x = -x; if (x < 8.0) return (jzero(x)); else return (sqrt(TWO_ON_PI / x) * (pzero(x) * cos(x - PI_ON_FOUR) - 8.0 / x * qzero(x) * sin(x - PI_ON_FOUR))); } static double ry0(double x) { if (x < 0.0) return (dzero / dzero); /* error */ if (x < 8.0) return (yzero(x) + TWO_ON_PI * rj0(x) * log(x)); else return (sqrt(TWO_ON_PI / x) * (pzero(x) * sin(x - PI_ON_FOUR) + (8.0 / x) * qzero(x) * cos(x - PI_ON_FOUR))); } static double jone(double x) { double p, q, x2; int n; x2 = x * x; p = pjone[8]; q = qjone[8]; for (n = 7; n >= 0; n--) { p = p * x2 + pjone[n]; q = q * x2 + qjone[n]; } return (p / q); } static double pone(double x) { double p, q, z, z2; int n; z = 8.0 / x; z2 = z * z; p = ppone[5]; q = qpone[5]; for (n = 4; n >= 0; n--) { p = p * z2 + ppone[n]; q = q * z2 + qpone[n]; } return (p / q); } static double qone(double x) { double p, q, z, z2; int n; z = 8.0 / x; z2 = z * z; p = pqone[5]; q = qqone[5]; for (n = 4; n >= 0; n--) { p = p * z2 + pqone[n]; q = q * z2 + qqone[n]; } return (p / q); } static double yone(double x) { double p, q, x2; int n; x2 = x * x; p = 0.0; q = qyone[8]; for (n = 7; n >= 0; n--) { p = p * x2 + pyone[n]; q = q * x2 + qyone[n]; } return (p / q); } static double rj1(double x) { double v, w; v = x; if (x < 0.0) x = -x; if (x < 8.0) return (v * jone(x)); else { w = sqrt(TWO_ON_PI / x) * (pone(x) * cos(x - THREE_PI_ON_FOUR) - 8.0 / x * qone(x) * sin(x - THREE_PI_ON_FOUR)); if (v < 0.0) w = -w; return (w); } } static double ry1(double x) { if (x <= 0.0) return (dzero / dzero); /* error */ if (x < 8.0) return (x * yone(x) + TWO_ON_PI * (rj1(x) * log(x) - 1.0 / x)); else return (sqrt(TWO_ON_PI / x) * (pone(x) * sin(x - THREE_PI_ON_FOUR) + (8.0 / x) * qone(x) * cos(x - THREE_PI_ON_FOUR))); } /* FIXME HBB 20010726: should bessel functions really call int_error, * right in the middle of evaluating some mathematical expression? * Couldn't they just flag 'undefined', or ignore the real part of the * complex number? */ void f_besj0(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); if (fabs(imag(&a)) > zero) int_error(NO_CARET, "can only do bessel functions of reals"); push(Gcomplex(&a, rj0(real(&a)), 0.0)); } void f_besj1(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); if (fabs(imag(&a)) > zero) int_error(NO_CARET, "can only do bessel functions of reals"); push(Gcomplex(&a, rj1(real(&a)), 0.0)); } void f_besy0(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); if (fabs(imag(&a)) > zero) int_error(NO_CARET, "can only do bessel functions of reals"); if (real(&a) > 0.0) push(Gcomplex(&a, ry0(real(&a)), 0.0)); else { push(Gcomplex(&a, 0.0, 0.0)); undefined = TRUE; } } void f_besy1(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); if (fabs(imag(&a)) > zero) int_error(NO_CARET, "can only do bessel functions of reals"); if (real(&a) > 0.0) push(Gcomplex(&a, ry1(real(&a)), 0.0)); else { push(Gcomplex(&a, 0.0, 0.0)); undefined = TRUE; } } /* functions for accessing fields from tm structure, for time series * they are all the same, so define a macro */ #define TIMEFUNC(name, field) \ void \ name(union argument *arg) \ { \ struct value a; \ struct tm tm; \ \ (void) arg; /* avoid -Wunused warning */ \ (void) pop(&a); \ ggmtime(&tm, real(&a)); \ push(Gcomplex(&a, (double)tm.field, 0.0)); \ } TIMEFUNC( f_tmsec, tm_sec) TIMEFUNC( f_tmmin, tm_min) TIMEFUNC( f_tmhour, tm_hour) TIMEFUNC( f_tmmday, tm_mday) TIMEFUNC( f_tmmon, tm_mon) TIMEFUNC( f_tmyear, tm_year) TIMEFUNC( f_tmwday, tm_wday) TIMEFUNC( f_tmyday, tm_yday) /*****************************************************************************/ #define SQR(a) ((a)*(a)) #define C1 0.3 #define C2 (1.0/7.0) #define C3 0.375 #define C4 (9.0/22.0) static double carlson_elliptic_rc(double x,double y) { double alamb,ave,s,w,xt,yt,ans; if (y > 0.0) { xt=x; yt=y; w=1.0; } else { xt=x-y; yt = -y; w=sqrt(x)/sqrt(xt); } do { alamb=2.0*sqrt(xt)*sqrt(yt)+yt; xt=0.25*(xt+alamb); yt=0.25*(yt+alamb); ave=(1.0/3.0)*(xt+yt+yt); s=(yt-ave)/ave; } while (fabs(s) > 0.0012); ans=w*(1.0+s*s*(C1+s*(C2+s*(C3+s*C4))))/sqrt(ave); return(ans); } #undef C4 #undef C3 #undef C2 #undef C1 static double carlson_elliptic_rf(double x,double y,double z) { double alamb,ave,delx,dely,delz,e2,e3,sqrtx,sqrty,sqrtz,xt,yt,zt; xt=x; yt=y; zt=z; do { sqrtx=sqrt(xt); sqrty=sqrt(yt); sqrtz=sqrt(zt); alamb=sqrtx*(sqrty+sqrtz)+sqrty*sqrtz; xt=0.25*(xt+alamb); yt=0.25*(yt+alamb); zt=0.25*(zt+alamb); ave=(1.0/3.0)*(xt+yt+zt); delx=(ave-xt)/ave; dely=(ave-yt)/ave; delz=(ave-zt)/ave; } while (fabs(delx) > 0.0025 || fabs(dely) > 0.0025 || fabs(delz) > 0.0025); e2=delx*dely-delz*delz; e3=delx*dely*delz; return((1.0+((1.0/24.0)*e2-(0.1)-(3.0/44.0)*e3)*e2+(1.0/14.0)*e3)/sqrt(ave)); } #define C1 (3.0/14.0) #define C2 (1.0/6.0) #define C3 (9.0/22.0) #define C4 (3.0/26.0) #define C5 (0.25*C3) #define C6 (1.5*C4) static double carlson_elliptic_rd(double x,double y,double z) { double alamb,ave,delx,dely,delz,ea,eb,ec,ed,ee,fac, sqrtx,sqrty,sqrtz,sum,xt,yt,zt,ans; xt=x; yt=y; zt=z; sum=0.0; fac=1.0; do { sqrtx=sqrt(xt); sqrty=sqrt(yt); sqrtz=sqrt(zt); alamb=sqrtx*(sqrty+sqrtz)+sqrty*sqrtz; sum+=fac/(sqrtz*(zt+alamb)); fac=0.25*fac; xt=0.25*(xt+alamb); yt=0.25*(yt+alamb); zt=0.25*(zt+alamb); ave=0.2*(xt+yt+3.0*zt); delx=(ave-xt)/ave; dely=(ave-yt)/ave; delz=(ave-zt)/ave; } while (fabs(delx) > 0.0015 || fabs(dely) > 0.0015 || fabs(delz) > 0.0015); ea=delx*dely; eb=delz*delz; ec=ea-eb; ed=ea-6.0*eb; ee=ed+ec+ec; ans=3.0*sum+fac*(1.0+ed*(-C1+C5*ed-C6*delz*ee) +delz*(C2*ee+delz*(-C3*ec+delz*C4*ea)))/(ave*sqrt(ave)); return(ans); } #undef C6 #undef C5 #undef C4 #undef C3 #undef C2 #undef C1 #define C1 (3.0/14.0) #define C2 (1.0/3.0) #define C3 (3.0/22.0) #define C4 (3.0/26.0) #define C5 (0.75*C3) #define C6 (1.5*C4) #define C7 (0.5*C2) #define C8 (C3+C3) static double carlson_elliptic_rj(double x,double y,double z,double p) { double a,alamb,alpha,ans,ave,b,beta,delp,delx,dely,delz,ea,eb,ec, ed,ee,fac,pt,rcx,rho,sqrtx,sqrty,sqrtz,sum,tau,xt,yt,zt; sum=0.0; fac=1.0; if (p > 0.0) { xt=x; yt=y; zt=z; pt=p; a=b=rcx=0.0; } else { xt=GPMIN(GPMIN(x,y),z); zt=GPMAX(GPMAX(x,y),z); yt=x+y+z-xt-zt; a=1.0/(yt-p); b=a*(zt-yt)*(yt-xt); pt=yt+b; rho=xt*zt/yt; tau=p*pt/yt; rcx=carlson_elliptic_rc(rho,tau); } do { sqrtx=sqrt(xt); sqrty=sqrt(yt); sqrtz=sqrt(zt); alamb=sqrtx*(sqrty+sqrtz)+sqrty*sqrtz; alpha=SQR(pt*(sqrtx+sqrty+sqrtz)+sqrtx*sqrty*sqrtz); beta=pt*SQR(pt+alamb); sum += fac*carlson_elliptic_rc(alpha,beta); fac=0.25*fac; xt=0.25*(xt+alamb); yt=0.25*(yt+alamb); zt=0.25*(zt+alamb); pt=0.25*(pt+alamb); ave=0.2*(xt+yt+zt+pt+pt); delx=(ave-xt)/ave; dely=(ave-yt)/ave; delz=(ave-zt)/ave; delp=(ave-pt)/ave; } while (fabs(delx)>0.0015 || fabs(dely)>0.0015 || fabs(delz)>0.0015 || fabs(delp)>0.0015); ea=delx*(dely+delz)+dely*delz; eb=delx*dely*delz; ec=delp*delp; ed=ea-3.0*ec; ee=eb+2.0*delp*(ea-ec); ans=3.0*sum+fac*(1.0+ed*(-C1+C5*ed-C6*ee)+eb*(C7+delp*(-C8+delp*C4)) +delp*ea*(C2-delp*C3)-C2*delp*ec)/(ave*sqrt(ave)); if (p <= 0.0) ans=a*(b*ans+3.0*(rcx-carlson_elliptic_rf(xt,yt,zt))); return(ans); } #undef C6 #undef C5 #undef C4 #undef C3 #undef C2 #undef C1 #undef C8 #undef C7 #undef SQR /*****************************************************************************/ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/matrix.c��������������������������������������������������������������������������0000644�0004711�0000144�00000021115�10071042556�012370� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: matrix.c,v 1.10 2004/07/01 17:10:06 broeker Exp $"); } #endif /* NOTICE: Change of Copyright Status * * The author of this module, Carsten Grammes, has expressed in * personal email that he has no more interest in this code, and * doesn't claim any copyright. He has agreed to put this module * into the public domain. * * Lars Hecking 15-02-1999 */ /* * Matrix algebra, part of * * Nonlinear least squares fit according to the * Marquardt-Levenberg-algorithm * * added as Patch to Gnuplot (v3.2 and higher) * by Carsten Grammes * Experimental Physics, University of Saarbruecken, Germany * * Previous copyright of this module: Carsten Grammes, 1993 * */ #include "matrix.h" #include "alloc.h" #include "fit.h" #include "util.h" /*****************************************************************/ #define Swap(a,b) {double temp = (a); (a) = (b); (b) = temp;} /* HBB 20010424: unused: */ /* #define WINZIG 1e-30 */ /***************************************************************** internal prototypes *****************************************************************/ static GP_INLINE int fsign __PROTO((double x)); /***************************************************************** first straightforward vector and matrix allocation functions *****************************************************************/ /* allocates a double vector with n elements */ double * vec(int n) { double *dp; if (n < 1) return NULL; dp = gp_alloc(n * sizeof(double), "vec"); return dp; } /* allocates a double matrix */ double ** matr(int rows, int cols) { int i; double **m; if (rows < 1 || cols < 1) return NULL; m = gp_alloc(rows * sizeof(m[0]), "matrix row pointers"); m[0] = gp_alloc(rows * cols * sizeof(m[0][0]), "matrix elements"); for (i = 1; i < rows; i++) m[i] = m[i - 1] + cols; return m; } void free_matr(double **m) { free(m[0]); free(m); } double * redim_vec(double **v, int n) { if (n < 1) *v = NULL; else *v = gp_realloc(*v, n * sizeof((*v)[0]), "vec"); return *v; } /* HBB: TODO: is there a better value for 'epsilon'? how to specify * 'inline'? is 'fsign' really not available elsewhere? use * row-oriented version (p. 309) instead? */ static GP_INLINE int fsign(double x) { return (x > 0 ? 1 : (x < 0) ? -1 : 0); } /***************************************************************** Solve least squares Problem C*x+d = r, |r| = min!, by Given rotations (QR-decomposition). Direct implementation of the algorithm presented in H.R.Schwarz: Numerische Mathematik, 'equation' number (7.33) If 'd == NULL', d is not accesed: the routine just computes the QR decomposition of C and exits. If 'want_r == 0', r is not rotated back (\hat{r} is returned instead). *****************************************************************/ void Givens( double **C, double *d, double *x, double *r, int N, int n, int want_r) { int i, j, k; double w, gamma, sigma, rho, temp; double epsilon = DBL_EPSILON; /* FIXME (?) */ /* * First, construct QR decomposition of C, by 'rotating away' * all elements of C below the diagonal. The rotations are * stored in place as Givens coefficients rho. * Vector d is also rotated in this same turn, if it exists */ for (j = 0; j < n; j++) { for (i = j + 1; i < N; i++) { if (C[i][j]) { if (fabs(C[j][j]) < epsilon * fabs(C[i][j])) { /* find the rotation parameters */ w = -C[i][j]; gamma = 0; sigma = 1; rho = 1; } else { w = fsign(C[j][j]) * sqrt(C[j][j] * C[j][j] + C[i][j] * C[i][j]); if (w == 0) Eex3("w = 0 in Givens(); Cjj = %g, Cij = %g", C[j][j], C[i][j]); gamma = C[j][j] / w; sigma = -C[i][j] / w; rho = (fabs(sigma) < gamma) ? sigma : fsign(sigma) / gamma; } C[j][j] = w; C[i][j] = rho; /* store rho in place, for later use */ for (k = j + 1; k < n; k++) { /* rotation on index pair (i,j) */ temp = gamma * C[j][k] - sigma * C[i][k]; C[i][k] = sigma * C[j][k] + gamma * C[i][k]; C[j][k] = temp; } if (d) { /* if no d vector given, don't use it */ temp = gamma * d[j] - sigma * d[i]; /* rotate d */ d[i] = sigma * d[j] + gamma * d[i]; d[j] = temp; } } } } if (!d) /* stop here if no d was specified */ return; /* solve R*x+d = 0, by backsubstitution */ for (i = n - 1; i >= 0; i--) { double s = d[i]; r[i] = 0; /* ... and also set r[i] = 0 for i<n */ for (k = i + 1; k < n; k++) s += C[i][k] * x[k]; if (C[i][i] == 0) Eex("Singular matrix in Givens()"); x[i] = -s / C[i][i]; } for (i = n; i < N; i++) r[i] = d[i]; /* set the other r[i] to d[i] */ if (!want_r) /* if r isn't needed, stop here */ return; /* rotate back the r vector */ for (j = n - 1; j >= 0; j--) { for (i = N - 1; i >= 0; i--) { if ((rho = C[i][j]) == 1) { /* reconstruct gamma, sigma from stored rho */ gamma = 0; sigma = 1; } else if (fabs(rho) < 1) { sigma = rho; gamma = sqrt(1 - sigma * sigma); } else { gamma = 1 / fabs(rho); sigma = fsign(rho) * sqrt(1 - gamma * gamma); } temp = gamma * r[j] + sigma * r[i]; /* rotate back indices (i,j) */ r[i] = -sigma * r[j] + gamma * r[i]; r[j] = temp; } } } /* Given a triangular Matrix R, compute (R^T * R)^(-1), by forward * then back substitution * * R, I are n x n Matrices, I is for the result. Both must already be * allocated. * * Will only calculate the lower triangle of I, as it is symmetric */ void Invert_RtR(double **R, double **I, int n) { int i, j, k; /* fill in the I matrix, and check R for regularity : */ for (i = 0; i < n; i++) { for (j = 0; j < i; j++) /* upper triangle isn't needed */ I[i][j] = 0; I[i][i] = 1; if (!R[i][i]) Eex("Singular matrix in Invert_RtR"); } /* Forward substitution: Solve R^T * B = I, store B in place of I */ for (k = 0; k < n; k++) { for (i = k; i < n; i++) { /* upper half needn't be computed */ double s = I[i][k]; for (j = k; j < i; j++) /* for j<k, I[j][k] always stays zero! */ s -= R[j][i] * I[j][k]; I[i][k] = s / R[i][i]; } } /* Backward substitution: Solve R * A = B, store A in place of B */ for (k = 0; k < n; k++) { for (i = n - 1; i >= k; i--) { /* don't compute upper triangle of A */ double s = I[i][k]; for (j = i + 1; j < n; j++) s -= R[i][j] * I[j][k]; I[i][k] = s / R[i][i]; } } } /* HBB 20010424: Functions that used to be here in matrix.c, but were * replaced by others and deleted, later. But the * THIN_PLATE_SPLINES_GRID needed them, later, so they appeared in * plot3d.c, where they don't belong --> moved them back here. */ void lu_decomp(double **a, int n, int *indx, double *d) { int i, imax = -1, j, k; /* HBB: added initial value, to shut up gcc -Wall */ double large, dummy, temp, **ar, **lim, *limc, *ac, *dp, *vscal; dp = vscal = vec(n); *d = 1.0; for (ar = a, lim = &(a[n]); ar < lim; ar++) { large = 0.0; for (ac = *ar, limc = &(ac[n]); ac < limc;) if ((temp = fabs(*ac++)) > large) large = temp; if (large == 0.0) int_error(NO_CARET, "Singular matrix in LU-DECOMP"); *dp++ = 1 / large; } ar = a; for (j = 0; j < n; j++, ar++) { for (i = 0; i < j; i++) { ac = &(a[i][j]); for (k = 0; k < i; k++) *ac -= a[i][k] * a[k][j]; } large = 0.0; dp = &(vscal[j]); for (i = j; i < n; i++) { ac = &(a[i][j]); for (k = 0; k < j; k++) *ac -= a[i][k] * a[k][j]; if ((dummy = *dp++ * fabs(*ac)) >= large) { large = dummy; imax = i; } } if (j != imax) { ac = a[imax]; dp = *ar; for (k = 0; k < n; k++, ac++, dp++) Swap(*ac, *dp); *d = -(*d); vscal[imax] = vscal[j]; } indx[j] = imax; if (*(dp = &(*ar)[j]) == 0) *dp = 1e-30; if (j != n - 1) { dummy = 1 / (*ar)[j]; for (i = j + 1; i < n; i++) a[i][j] *= dummy; } } free(vscal); } void lu_backsubst(double **a, int n, int *indx, double *b) { int i, memi = -1, ip, j; double sum, *bp, *bip, **ar, *ac; ar = a; for (i = 0; i < n; i++, ar++) { ip = indx[i]; sum = b[ip]; b[ip] = b[i]; if (memi >= 0) { ac = &((*ar)[memi]); bp = &(b[memi]); for (j = memi; j <= i - 1; j++) sum -= *ac++ * *bp++; } else if (sum) memi = i; b[i] = sum; } ar--; for (i = n - 1; i >= 0; i--) { ac = &(*ar)[i + 1]; bp = &(b[i + 1]); bip = &(b[i]); for (j = i + 1; j < n; j++) *bip -= *ac++ * *bp++; *bip /= (*ar--)[i]; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/stdfn.h���������������������������������������������������������������������������0000644�0004711�0000144�00000034743�11636346766�012244� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: stdfn.h,v 1.40 2011/09/21 11:43:50 markisch Exp $ */ /* GNUPLOT - stdfn.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* get prototypes or declarations for string and stdlib functions and deal with missing functions like strchr. */ /* we will assume the ANSI/Posix/whatever situation as default. the header file is called string.h and the index functions are called strchr, strrchr. Exceptions have to be listed explicitly */ #ifndef STDFN_H #define STDFN_H #include "syscfg.h" #include <ctype.h> #include <stdio.h> #ifdef HAVE_STRING_H # include <string.h> #else # include <strings.h> #endif #ifdef HAVE_BCOPY # ifndef HAVE_MEMCPY # define memcpy(d,s,n) bcopy((s),(d),(n)) # endif # ifndef HAVE_MEMMOVE # define memmove(d,s,n) bcopy((s),(d),(n)) # endif #else # ifndef HAVE_MEMCPY char * memcpy __PROTO((char *, char *, size_t)); # endif #endif /* HAVE_BCOPY */ #ifndef HAVE_STRCHR # ifdef strchr # undef strchr # endif # ifdef HAVE_INDEX # define strchr index # else char *strchr __PROTO((const char *, int)); # endif # ifdef strrchr # undef strrchr # endif # ifdef HAVE_RINDEX # define strrchr rindex # endif #endif #ifndef HAVE_STRCSPN size_t gp_strcspn __PROTO((const char *, const char *)); # define strcspn gp_strcspn #endif #ifndef HAVE_STRSTR char *strstr __PROTO((const char *, const char *)); #endif #ifndef HAVE_STDLIB_H # ifdef HAVE_MALLOC_H # include <malloc.h> # else void free(); char *malloc(); char *realloc(); # endif /* HAVE_MALLOC_H */ char *getenv(); int system(); double atof(); int atoi(); long atol(); double strtod(); #else /* HAVE_STDLIB_H */ # include <stdlib.h> # ifndef VMS # ifndef EXIT_FAILURE # define EXIT_FAILURE (1) # endif # ifndef EXIT_SUCCESS # define EXIT_SUCCESS (0) # endif # else /* VMS */ # ifdef VAXC /* replacement values suppress some messages */ # ifdef EXIT_FAILURE # undef EXIT_FAILURE # endif # ifdef EXIT_SUCCESS # undef EXIT_SUCCESS # endif # endif /* VAXC */ # ifndef EXIT_FAILURE # define EXIT_FAILURE 0x10000002 # endif # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 1 # endif # endif /* VMS */ #endif /* HAVE_STDLIB_H */ /* Deal with varargs functions */ #if defined(HAVE_VFPRINTF) || defined(HAVE_DOPRNT) # ifdef STDC_HEADERS # include <stdarg.h> # define VA_START(args, lastarg) va_start(args, lastarg) # else # include <varargs.h> # define VA_START(args, lastarg) va_start(args) # endif /* !STDC_HEADERS */ #else /* HAVE_VFPRINTF || HAVE_DOPRNT */ # define va_dcl char *a1, char *a2, char *a3, char *a4, char *a5, char *a6, char *a7, char *a8 #endif /* !(HAVE_VFPRINTF || HAVE_DOPRNT) */ #ifdef HAVE_UNISTD_H # include <unistd.h> #else # ifdef HAVE_LIBC_H /* NeXT uses libc instead of unistd */ # include <libc.h> # endif #endif /* HAVE_UNISTD_H */ #ifdef HAVE_ERRNO_H # include <errno.h> #endif # ifdef EXTERN_ERRNO extern int errno; #endif #ifndef HAVE_STRERROR char *strerror __PROTO((int)); extern int sys_nerr; extern char *sys_errlist[]; #endif #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> /* This is all taken from GNU fileutils lib/filemode.h */ #if !S_IRUSR # if S_IREAD # define S_IRUSR S_IREAD # else # define S_IRUSR 00400 # endif #endif #if !S_IWUSR # if S_IWRITE # define S_IWUSR S_IWRITE # else # define S_IWUSR 00200 # endif #endif #if !S_IXUSR # if S_IEXEC # define S_IXUSR S_IEXEC # else # define S_IXUSR 00100 # endif #endif #ifdef STAT_MACROS_BROKEN # undef S_ISBLK # undef S_ISCHR # undef S_ISDIR # undef S_ISFIFO # undef S_ISLNK # undef S_ISMPB # undef S_ISMPC # undef S_ISNWK # undef S_ISREG # undef S_ISSOCK #endif /* STAT_MACROS_BROKEN. */ #if !defined(S_ISBLK) && defined(S_IFBLK) # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) #endif #if !defined(S_ISCHR) && defined(S_IFCHR) # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) #endif #if !defined(S_ISDIR) && defined(S_IFDIR) # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #endif #if !defined(S_ISREG) && defined(S_IFREG) # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif #if !defined(S_ISFIFO) && defined(S_IFIFO) # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) #endif #if !defined(S_ISLNK) && defined(S_IFLNK) # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) #endif #if !defined(S_ISSOCK) && defined(S_IFSOCK) # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) #endif #if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */ # define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) # define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) #endif #if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */ # define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) #endif #endif /* HAVE_SYS_STAT_H */ #ifdef HAVE_LIMITS_H # include <limits.h> #else # ifdef HAVE_VALUES_H # include <values.h> # endif /* HAVE_VALUES_H */ #endif /* HAVE_LIMITS_H */ /* ctime etc, should also define time_t and struct tm */ #ifdef HAVE_TIME_H # include <time.h> #endif #ifndef HAVE_TIME_T_IN_TIME_H # define time_t long #endif #ifdef HAVE_SYS_TIME_H # include <sys/time.h> /* for gettimeofday() */ #endif #if defined(PIPES) && defined(VMS) FILE *popen __PROTO((char *, char *)); int pclose __PROTO((FILE *)); #endif #ifdef HAVE_FLOAT_H # include <float.h> #endif /* Some older platforms, namely SunOS 4.x, don't define this. */ #ifndef DBL_EPSILON # define DBL_EPSILON 2.2204460492503131E-16 #endif #ifdef HAVE_LOCALE_H # include <locale.h> #endif #ifdef HAVE_MATH_H # include <math.h> #endif /* Normally in <math.h> */ #ifndef M_PI # define M_PI 3.14159265358979323846 #endif #ifndef M_PI_2 # define M_PI_2 1.57079632679489661923 #endif #ifndef M_LN10 # define M_LN10 2.3025850929940456840e0 #endif /* Use definitions from float.h and math.h if we found them */ #if defined(DBL_MIN_10_EXP) # define E_MINEXP (DBL_MIN_10_EXP * M_LN10) #endif #if defined(DBL_MAX_10_EXP) # define E_MAXEXP (DBL_MAX_10_EXP * M_LN10) #endif #ifndef HAVE_STRCASECMP # ifdef HAVE_STRICMP # define strcasecmp stricmp # else int gp_stricmp __PROTO((const char *, const char *)); # define strcasecmp gp_stricmp # endif #endif #ifndef HAVE_STRNCASECMP # ifdef HAVE_STRNICMP # define strncasecmp strnicmp # else int gp_strnicmp __PROTO((const char *, const char *, size_t)); # define strncasecmp gp_strnicmp # endif #endif #ifndef HAVE_STRNDUP char *strndup __PROTO((const char * str, size_t n)); #endif #ifndef HAVE_STRNLEN size_t strnlen __PROTO((const char *str, size_t n)); #endif #ifndef GP_GETCWD # if defined(HAVE_GETCWD) # if defined(__EMX__) # define GP_GETCWD(path,len) _getcwd2 (path, len) # else # define GP_GETCWD(path,len) getcwd (path, len) # endif /* __EMX__ */ # else # define GP_GETCWD(path,len) getwd (path) # endif #endif #ifdef WIN32 # include <windows.h> #endif /* sleep delay time, where delay is a double value */ #if defined(HAVE_USLEEP) # define GP_SLEEP(delay) usleep((unsigned int) ((delay)*1e6)) # ifndef HAVE_SLEEP # define HAVE_SLEEP # endif #elif defined(__EMX__) # define GP_SLEEP(delay) _sleep2((unsigned int) ((delay)*1e3)) # ifndef HAVE_SLEEP # define HAVE_SLEEP # endif #elif defined(WIN32) # define GP_SLEEP(delay) win_sleep((DWORD) 1000*delay) # ifndef HAVE_SLEEP # define HAVE_SLEEP # endif #endif #ifndef GP_SLEEP # define GP_SLEEP(delay) sleep ((unsigned int) (delay+0.5)) #endif #ifdef HAVE_ATEXIT # define GP_ATEXIT(x) atexit((x)) #elif defined(HAVE_ON_EXIT) # define GP_ATEXIT(x) on_exit((x),0) #else # define GP_ATEXIT(x) /* you lose */ #endif char * gp_basename __PROTO((char *path)); #if !defined(HAVE_DIRENT_H) && defined(WIN32) && (!defined(__WATCOMC__)) /* Declaration of POSIX directory browsing functions and types for Win32. Author: Kevlin Henney (kevlin@acm.org, kevlin@curbralan.com) History: Created March 1997. Updated June 2003. */ /* Copyright Kevlin Henney, 1997, 2003. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose is hereby granted without fee, provided that this copyright and permissions notice appear in all copies and derivatives. This software is supplied "as is" without express or implied warranty. But that said, if there are any problems please get in touch. */ typedef struct DIR DIR; struct dirent { char *d_name; }; DIR *opendir __PROTO((const char *)); int closedir __PROTO((DIR *)); struct dirent *readdir __PROTO((DIR *)); void rewinddir __PROTO((DIR *)); #elif defined(HAVE_DIRENT_H) # include <sys/types.h> # include <dirent.h> #endif /* !HAVE_DIRENT_H && WIN32 */ /* Misc. defines */ /* Null character */ #define NUL ('\0') /* Definitions for debugging */ /* #define NDEBUG */ /* #include <assert.h> */ #ifndef assert #define assert(X) if (!(X)) int_error(-1,"Assertion failed: %s", #X ) #endif #ifdef DEBUG # define DEBUG_WHERE do { fprintf(stderr,"%s:%d ",__FILE__,__LINE__); } while (0) # define FPRINTF(a) do { DEBUG_WHERE; fprintf a; } while (0) #else # define DEBUG_WHERE /* nought */ # define FPRINTF(a) /* nought */ #endif /* DEBUG */ #include "syscfg.h" #define INT_STR_LEN (3*sizeof(int)) /* HBB 20010223: moved this whole block from syscfg.h to here. It * needs both "syscfg.h" and <float.h> to have been #include'd before * this, since it relies on stuff like DBL_MAX */ /* There is a bug in the NEXT OS. This is a workaround. Lookout for * an OS correction to cancel the following dinosaur * * Hm, at least with my setup (compiler version 3.1, system 3.3p1), * DBL_MAX is defined correctly and HUGE and HUGE_VAL are both defined * as 1e999. I have no idea to which OS version the bugfix below * applies, at least wrt. HUGE, it is inconsistent with the current * version. Since we are using DBL_MAX anyway, most of this isn't * really needed anymore. */ #if defined ( NEXT ) && NX_CURRENT_COMPILER_RELEASE<310 # if defined ( DBL_MAX) # undef DBL_MAX # endif # define DBL_MAX 1.7976931348623157e+308 # undef HUGE # define HUGE DBL_MAX # undef HUGE_VAL # define HUGE_VAL DBL_MAX #endif /* NEXT && NX_CURRENT_COMPILER_RELEASE<310 */ /* * Note about VERYLARGE: This is the upper bound double (or float, if PC) * numbers. This flag indicates very large numbers. It doesn't have to * be the absolutely biggest number on the machine. * If your machine doesn't have HUGE, or float.h, * define VERYLARGE here. * * example: #define VERYLARGE 1e37 * * To get an appropriate value for VERYLARGE, we can use DBL_MAX (or * FLT_MAX on PCs), HUGE or HUGE_VAL. DBL_MAX is usually defined in * float.h and is the largest possible double value. HUGE and HUGE_VAL * are either DBL_MAX or +Inf (IEEE special number), depending on the * compiler. +Inf may cause problems with some buggy fp * implementations, so we better avoid that. The following should work * better than the previous setup (which used HUGE in preference to * DBL_MAX). */ /* Now define VERYLARGE. This is usually DBL_MAX/2 - 1. On MS-DOS however * we use floats for memory considerations and thus use FLT_MAX. */ #ifndef COORDVAL_FLOAT # ifdef DBL_MAX # define VERYLARGE (DBL_MAX/2-1) # endif #else /* COORDVAL_FLOAT */ # ifdef FLT_MAX # define VERYLARGE (FLT_MAX/2-1) # endif #endif /* COORDVAL_FLOAT */ #ifndef VERYLARGE # ifdef HUGE # define VERYLARGE (HUGE/2-1) # elif defined(HUGE_VAL) # define VERYLARGE (HUGE_VAL/2-1) # else /* as a last resort */ # define VERYLARGE (1e37) /* # warning "using last resort 1e37 as VERYLARGE define, please check your headers" */ /* Maybe add a note somewhere in the install docs instead */ # endif /* HUGE */ #endif /* VERYLARGE */ /* _POSIX_PATH_MAX is too small for practical purposes */ #ifdef HAVE_SYS_PARAM_H # include <sys/param.h> #endif #ifndef PATH_MAX # ifndef MAXPATHLEN # define PATH_MAX 1024 # else # define PATH_MAX MAXPATHLEN # endif #endif /* Concatenate a path name and a file name. The file name * may or may not end with a "directory separation" character. * Path must not be NULL, but can be empty */ #define PATH_CONCAT(path,file) \ { char *p = path; \ p += strlen(path); \ if (p!=path) p--; \ if (*p && (*p != DIRSEP1) && (*p != DIRSEP2)) { \ if (*p) p++; *p++ = DIRSEP1; *p = NUL; \ } \ strcat (path, file); \ } #ifndef inrange # define inrange(z,min,max) \ (((min)<(max)) ? (((z)>=(min)) && ((z)<=(max))) : \ (((z)>=(max)) && ((z)<=(min)))) #endif /* HBB 20030117: new macro to simplify clipping operations in the * presence of possibly reverted axes */ #ifndef cliptorange # define cliptorange(z,min,max) \ do { \ if ((min) < (max)) { \ if ((z) > (max)) \ (z) = (max); \ else if ((z) < (min)) \ (z) = (min); \ } else { \ if ((z) > (min)) \ (z) = (min); \ else if ((z) < (max)) \ (z) = (max); \ } \ } while (0) #endif /* both min/max and MIN/MAX are defined by some compilers. * we are now on GPMIN / GPMAX */ #define GPMAX(a,b) ( (a) > (b) ? (a) : (b) ) #define GPMIN(a,b) ( (a) < (b) ? (a) : (b) ) /* Prototypes from "stdfn.c" */ char *safe_strncpy __PROTO((char *, const char *, size_t)); #ifndef HAVE_SLEEP unsigned int sleep __PROTO((unsigned int)); #endif double gp_strtod __PROTO((const char *str, char **endptr)); double not_a_number __PROTO((void)); #endif /* STDFN_H */ �����������������������������gnuplot-4.6.4/src/util3d.h��������������������������������������������������������������������������0000644�0004711�0000144�00000010030�11703417137�012273� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: util3d.h,v 1.18.2.1 2012/01/11 23:42:23 sfeam Exp $ */ /* GNUPLOT - util3d.h */ /*[ * Copyright 1986 - 1993, 1998, 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_UTIL3D_H # define GNUPLOT_UTIL3D_H /* HBB 990828: moved all those variable decl's and #defines to new * file "graph3d.h", as the definitions are in graph3d.c, not in * util3d.c. Include that file from here, to ensure everything is * known */ #include "graph3d.h" #include "graphics.h" /* only needed for apply_head_properties() */ /* All the necessary information about one vertex. */ typedef struct vertex { coordval x, y, z; /* vertex coordinates */ lp_style_type *lp_style; /* where to find point symbol type (if any) */ coordval real_z; struct text_label *label; #ifdef HIDDEN3D_VAR_PTSIZE /* Needed for variable pointsize, but takes space */ struct coordinate *original; #endif } vertex; typedef vertex GPHUGE * p_vertex; /* Utility macros for vertices: */ #define FLAG_VERTEX_AS_UNDEFINED(v) \ do { (v).z = -2.0; } while (0) #define VERTEX_IS_UNDEFINED(v) ((v).z == -2.0) #define V_EQUAL(a,b) ( GE(0.0, fabs((a)->x - (b)->x) + \ fabs((a)->y - (b)->y) + fabs((a)->z - (b)->z)) ) /* Maps from normalized space to terminal coordinates */ #define TERMCOORD(v,xvar,yvar) \ { \ xvar = ((int)((v)->x * xscaler)) + xmiddle; \ yvar = ((int)((v)->y * yscaler)) + ymiddle; \ } /* Prototypes of functions exported by "util3d.c" */ void edge3d_intersect __PROTO((struct coordinate GPHUGE *, int, int, double *, double *, double *)); TBOOLEAN two_edge3d_intersect __PROTO((struct coordinate GPHUGE *, int, int, double *, double *, double *)); void mat_scale __PROTO((double sx, double sy, double sz, double mat[4][4])); void mat_rot_x __PROTO((double teta, double mat[4][4])); void mat_rot_z __PROTO((double teta, double mat[4][4])); void mat_mult __PROTO((double mat_res[4][4], double mat1[4][4], double mat2[4][4])); void map3d_xyz __PROTO((double x, double y, double z, p_vertex out)); void map3d_xy __PROTO((double x, double y, double z, int *xt, int *yt)); void map3d_xy_double __PROTO((double x, double y, double z, double *xt, double *yt)); void draw3d_line __PROTO((p_vertex, p_vertex, struct lp_style_type *)); void draw3d_line_unconditional __PROTO((p_vertex, p_vertex, struct lp_style_type *, t_colorspec)); void draw3d_point __PROTO((p_vertex v, struct lp_style_type *lp)); void apply_3dhead_properties __PROTO((struct arrow_style_type *arrow_properties)); /* HBB NEW 20031218: 3D polyline support */ void polyline3d_start __PROTO((p_vertex v1)); void polyline3d_next __PROTO((p_vertex v2, struct lp_style_type *lp)); #endif /* GNUPLOT_UTIL3D_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/setshow.h�������������������������������������������������������������������������0000644�0004711�0000144�00000006201�11651442342�012566� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: setshow.h,v 1.44 2011/10/25 05:10:58 sfeam Exp $ */ /* GNUPLOT - setshow.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_SETSHOW_H # define GNUPLOT_SETSHOW_H #include "stdfn.h" #include "axis.h" #include "gadgets.h" #include "term_api.h" #define PROGRAM "G N U P L O T" /* FIXME: move to show.c! */ #define SAVE_NUM_OR_TIME(fp, x, axis) \ do{ \ if (axis_array[axis].datatype == DT_TIMEDATE) { \ char s[80]; \ \ putc('"', fp); \ gstrftime(s,80,axis_array[axis].timefmt,(double)(x)); \ fputs(conv_text(s), fp); \ putc('"', fp); \ } else { \ fprintf(fp,"%#g",x); \ } \ } while(0) /* The set and show commands, in setshow.c */ void set_command __PROTO((void)); void unset_command __PROTO((void)); void reset_command __PROTO((void)); void show_command __PROTO((void)); /* and some accessible support functions */ void show_version __PROTO((FILE *fp)); char *conv_text __PROTO((const char *s)); void delete_linestyle __PROTO((struct linestyle_def **, struct linestyle_def *, struct linestyle_def *)); /* void delete_arrowstyle __PROTO((struct arrowstyle_def *, struct arrowstyle_def *)); */ void reset_key __PROTO((void)); void free_marklist __PROTO((struct ticmark * list)); extern int enable_reset_palette; void reset_palette __PROTO((void)); void rrange_to_xy __PROTO((void)); /* Called from set_label(), plot2d.c and plot3d.c */ extern void parse_label_options __PROTO((struct text_label *this_label)); extern struct text_label * new_text_label __PROTO((int tag)); extern void disp_value __PROTO((FILE *, struct value *, TBOOLEAN)); extern struct ticmark * prune_dataticks __PROTO((struct ticmark *list)); #endif /* GNUPLOT_SETSHOW_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/time.c����������������������������������������������������������������������������0000644�0004711�0000144�00000050574�12165047206�012040� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: time.c,v 1.24.2.2 2013/07/03 14:10:54 sfeam Exp $"); } #endif /* GNUPLOT - time.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* This module either adds a routine gstrptime() to read a formatted time, * augmenting the standard suite of time routines provided by ansi, * or it completely replaces the whole lot with a new set of routines, * which count time relative to the year 2000. Default is to use the * new routines. Define USE_SYSTEM_TIME to use the system routines, at your * own risk. One problem in particular is that not all systems allow * the time with integer value 0 to be represented symbolically, which * prevents use of relative times. Also, the system routines do not allow * you to read in fractional seconds. */ #include "gp_time.h" #include "util.h" #include "variable.h" /* build as a standalone test */ #ifdef TEST_TIME # ifdef HAVE_SYS_TIMEB_H # include <sys/timeb.h> # else /* declare struct timeb */ extern int ftime(struct timeb *); # endif /* !HAVE_SYS_TIMEB_H */ # define int_error(x,y) fprintf(stderr, "Error: " y "\n") # define int_warn(x,y) fprintf(stderr, "Warn: " y "\n") /* need (only) these from plot.h */ # define ZERO_YEAR 2000 /* 1st jan, 2000 is a Saturday (cal 1 2000 on unix) */ # define JAN_FIRST_WDAY 6 /* zero gnuplot (2000) - zero system (1970) */ # define SEC_OFFS_SYS 946684800.0 /* avg, incl. leap year */ # define YEAR_SEC 31557600.0 /* YEAR_SEC / 12 */ # define MON_SEC 2629800.0 # define WEEK_SEC 604800.0 # define DAY_SEC 86400.0 /* HBB 990826: moved definitions up here, to avoid 'extern' where * it is neither wanted nor needed */ char *abbrev_month_names[] = { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" }; char *full_month_names[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; char *abbrev_day_names[] = { "sun", "mon", "tue", "wed", "thu", "fri", "sat"}; char *full_day_names[] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; #else /* TEST_TIME */ /* # include "setshow.h" */ /* for month names etc */ #endif /* TEST_TIME */ static char *read_int __PROTO((char *s, int nr, int *d)); static char * read_int(char *s, int nr, int *d) { int result = 0; while (--nr >= 0 && *s >= '0' && *s <= '9') result = result * 10 + (*s++ - '0'); *d = result; return (s); } #ifndef USE_SYSTEM_TIME /* a new set of routines to completely replace the ansi ones * Use at your own risk */ static int gdysize __PROTO((int yr)); static int mndday[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; static size_t xstrftime __PROTO((char *buf, size_t bufsz, const char *fmt, struct tm * tm, double usec)); /* days in year */ static int gdysize(int yr) { if (!(yr % 4)) { if ((!(yr % 100)) && yr % 400) return (365); return (366); } return (365); } /* new strptime() and gmtime() to allow time to be read as 24 hour, * and spaces in the format string. time is converted to seconds from * year 2000.... */ char * gstrptime(char *s, char *fmt, struct tm *tm, double *usec) { int yday, date; date = yday = 0; tm->tm_mday = 1; tm->tm_mon = tm->tm_hour = tm->tm_min = tm->tm_sec = 0; /* make relative times work (user-defined tic step) */ tm->tm_year = ZERO_YEAR; /* Fractional seconds will be returned separately, since * there is no slot for the fraction in struct tm. */ *usec = 0.0; /* we do not yet calculate wday or yday, so make them illegal * [but yday will be read by %j] */ tm->tm_yday = tm->tm_wday = -1; while (*fmt) { if (*fmt != '%') { if (*fmt == ' ') { /* space in format means zero or more spaces in input */ while (*s == ' ') ++s; ++fmt; continue; } else if (*fmt == *s) { ++s; ++fmt; continue; } else break; /* literal match has failed */ } /* we are processing a percent escape */ switch (*++fmt) { case 'b': /* abbreviated month name */ { int m; for (m = 0; m < 12; ++m) if (strncasecmp(s, abbrev_month_names[m], strlen(abbrev_month_names[m])) == 0) { s += strlen(abbrev_month_names[m]); goto found_abbrev_mon; } /* get here => not found */ int_warn(DATAFILE, "Bad abbreviated month name"); m = 0; found_abbrev_mon: tm->tm_mon = m; break; } case 'B': /* full month name */ { int m; for (m = 0; m < 12; ++m) if (strncasecmp(s, full_month_names[m], strlen(full_month_names[m])) == 0) { s += strlen(full_month_names[m]); goto found_full_mon; } /* get here => not found */ int_warn(DATAFILE, "Bad full month name"); m = 0; found_full_mon: tm->tm_mon = m; break; } case 'd': /* read a day of month */ s = read_int(s, 2, &tm->tm_mday); date++; break; case 'm': /* month number */ s = read_int(s, 2, &tm->tm_mon); date++; --tm->tm_mon; break; case 'y': /* year number */ s = read_int(s, 2, &tm->tm_year); /* In line with the current UNIX98 specification by * The Open Group and major Unix vendors, * two-digit years 69-99 refer to the 20th century, and * values in the range 00-68 refer to the 21st century. */ if (tm->tm_year <= 68) tm->tm_year += 100; date++; tm->tm_year += 1900; break; case 'Y': s = read_int(s, 4, &tm->tm_year); date++; break; case 'j': s = read_int(s, 3, &tm->tm_yday); tm->tm_yday--; date++; yday++; break; case 'H': s = read_int(s, 2, &tm->tm_hour); break; case 'M': s = read_int(s, 2, &tm->tm_min); break; case 'S': s = read_int(s, 2, &tm->tm_sec); if (*s == '.' || (decimalsign && *s == *decimalsign)) *usec = atof(s); break; case 's': /* read EPOCH data * EPOCH is the std. unix timeformat seconds since 01.01.1970 UTC */ { char *fraction = strchr(s, decimalsign ? *decimalsign : '.'); double ufraction = 0; double when = strtod (s, &s) - SEC_OFFS_SYS; ggmtime(tm, when); if (fraction) ufraction = atof(fraction); if (ufraction < 1.) /* Filter out e.g. 123.456e7 */ *usec = ufraction; break; } default: int_warn(DATAFILE, "Bad time format in string"); } fmt++; } FPRINTF((stderr, "read date-time : %02d/%02d/%d:%02d:%02d:%02d\n", tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec)); /* now check the date/time entered, normalising if necessary * read_int cannot read a -ve number, but can read %m=0 then decrement * it to -1 */ #define S (tm->tm_sec) #define M (tm->tm_min) #define H (tm->tm_hour) if (S >= 60) { M += S / 60; S %= 60; } if (M >= 60) { H += M / 60; M %= 60; } if (H >= 24) { if (yday) tm->tm_yday += H / 24; tm->tm_mday += H / 24; H %= 24; } #undef S #undef M #undef H FPRINTF((stderr, "normalised time : %02d/%02d/%d:%02d:%02d:%02d\n", tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec)); if (date) { if (yday) { if (tm->tm_yday < 0) int_error(DATAFILE, "Illegal day of year"); /* we just set month to jan, day to yday, and let the * normalising code do the work. */ tm->tm_mon = 0; /* yday is 0->365, day is 1->31 */ tm->tm_mday = tm->tm_yday + 1; } if (tm->tm_mon < 0) { int_error(DATAFILE, "illegal month"); return (NULL); } if (tm->tm_mday < 1) { int_error(DATAFILE, "illegal day of month"); return (NULL); } if (tm->tm_mon > 11) { tm->tm_year += tm->tm_mon / 12; tm->tm_mon %= 12; } { int days_in_month; while (tm->tm_mday > (days_in_month = (mndday[tm->tm_mon] + (tm->tm_mon == 1 && (gdysize(tm->tm_year) > 365))))) { if (++tm->tm_mon == 12) { ++tm->tm_year; tm->tm_mon = 0; } tm->tm_mday -= days_in_month; } } } return (s); } size_t gstrftime(char *s, size_t bsz, const char *fmt, double l_clock) { struct tm tm; double usec; ggmtime(&tm, l_clock); usec = l_clock - (double)floor(l_clock); return xstrftime(s, bsz, fmt, &tm, usec); } static size_t xstrftime( char *str, /* output buffer */ size_t bsz, /* space available */ const char *fmt, struct tm *tm, double usec) { size_t l = 0; /* chars written so far */ char *s = str; memset(s, '\0', bsz); while (*fmt != '\0') { if (*fmt != '%') { if (l >= bsz) return (0); *s++ = *fmt++; l++; } else { /* set up format modifiers */ int w = 0; int z = 0; int p = 0; if (*++fmt == '0') { z = 1; ++fmt; } while (*fmt >= '0' && *fmt <= '9') { w = w * 10 + (*fmt - '0'); ++fmt; } if (*fmt == '.') { ++fmt; while (*fmt >= '0' && *fmt <= '9') { p = p * 10 + (*fmt - '0'); ++fmt; } if (p > 6) p = 6; } switch (*fmt++) { /* some shorthands : check that there is space in the * output string. */ #define CHECK_SPACE(n) do { \ if ((l+(n)) > bsz) return 0; \ } while (0) /* copy a fixed string, checking that there's room */ #define COPY_STRING(z) do { \ CHECK_SPACE(strlen(z)) ; \ strcpy(s, z); \ } while (0) /* format a string, using default spec if none given w * and z are width and zero-flag dw and dz are the * defaults for these In fact, CHECK_SPACE(w) is not a * sufficient test, since sprintf("%2d", 365) outputs * three characters */ #define FORMAT_STRING(dz, dw, x) do { \ if (w==0) { \ w=(dw); \ if (!z) \ z=(dz); \ } \ CHECK_SPACE(w); \ sprintf(s, z ? "%0*d" : "%*d", w, (x)); \ } while(0) case '%': CHECK_SPACE(1); *s = '%'; break; case 'a': COPY_STRING(abbrev_day_names[tm->tm_wday]); break; case 'A': COPY_STRING(full_day_names[tm->tm_wday]); break; case 'b': case 'h': COPY_STRING(abbrev_month_names[tm->tm_mon]); break; case 'B': COPY_STRING(full_month_names[tm->tm_mon]); break; #if 0 /* %x not currently supported, so neither is c */ case 'c': if (!xstrftime(s, bsz - l, "%x %X", tm, 0.)) return (0); break; #endif case 'd': FORMAT_STRING(1, 2, tm->tm_mday); /* %02d */ break; case 'D': if (!xstrftime(s, bsz - l, "%m/%d/%y", tm, 0.)) return (0); break; case 'F': if (!xstrftime(s, bsz - l, "%Y-%m-%d", tm, 0.)) return (0); break; case 'H': FORMAT_STRING(1, 2, tm->tm_hour); /* %02d */ break; case 'I': FORMAT_STRING(1, 2, (tm->tm_hour + 11) % 12 + 1); /* %02d */ break; case 'j': FORMAT_STRING(1, 3, tm->tm_yday + 1); /* %03d */ break; /* not in linux strftime man page. Not really needed now */ case 'k': FORMAT_STRING(0, 2, tm->tm_hour); /* %2d */ break; case 'l': FORMAT_STRING(0, 2, (tm->tm_hour + 11) % 12 + 1); /* %2d */ break; case 'm': FORMAT_STRING(1, 2, tm->tm_mon + 1); /* %02d */ break; case 'M': FORMAT_STRING(1, 2, tm->tm_min); /* %02d */ break; case 'p': CHECK_SPACE(2); strcpy(s, (tm->tm_hour < 12) ? "am" : "pm"); break; case 'r': if (!xstrftime(s, bsz - l, "%I:%M:%S %p", tm, 0.)) return (0); break; case 'R': if (!xstrftime(s, bsz - l, "%H:%M", tm, 0.)) return (0); break; case 's': CHECK_SPACE(12); /* large enough for year 9999 */ sprintf(s, "%.0f", gtimegm(tm)); break; case 'S': FORMAT_STRING(1, 2, tm->tm_sec); /* %02d */ /* EAM FIXME - need to implement an actual format specifier */ if (p > 0) { double base = pow(10.,p); int msec = floor(0.5 + base * usec); char *f = &s[strlen(s)]; CHECK_SPACE(p+1); sprintf(f, ".%0*d", p, msec<(int)base?msec:(int)base-1); } break; case 'T': if (!xstrftime(s, bsz - l, "%H:%M:%S", tm, 0.)) return (0); break; case 'W': /* mon 1 day of week */ { int week; if (tm->tm_yday <= tm->tm_wday) { week = 1; if ((tm->tm_mday - tm->tm_yday) > 4) { week = 52; } if (tm->tm_yday == tm->tm_wday && tm->tm_wday == 0) week = 52; } else { /* sun prev week */ int bw = tm->tm_yday - tm->tm_wday; if (tm->tm_wday > 0) bw += 7; /* sun end of week */ week = (int) bw / 7; if ((bw % 7) > 2) /* jan 1 is before friday */ week++; } FORMAT_STRING(1, 2, week); /* %02d */ break; } case 'U': /* sun 1 day of week */ { int week, bw; if (tm->tm_yday <= tm->tm_wday) { week = 1; if ((tm->tm_mday - tm->tm_yday) > 4) { week = 52; } } else { /* sat prev week */ bw = tm->tm_yday - tm->tm_wday - 1; if (tm->tm_wday >= 0) bw += 7; /* sat end of week */ week = (int) bw / 7; if ((bw % 7) > 1) { /* jan 1 is before friday */ week++; } } FORMAT_STRING(1, 2, week); /* %02d */ break; } case 'w': /* day of week, sun=0 */ FORMAT_STRING(1, 2, tm->tm_wday); /* %02d */ break; case 'y': FORMAT_STRING(1, 2, tm->tm_year % 100); /* %02d */ break; case 'Y': FORMAT_STRING(1, 4, tm->tm_year); /* %04d */ break; #if 0 case 'Z': COPY_STRING(tm->tm_zone); break; #endif } /* switch */ while (*s != '\0') { s++; l++; } #undef CHECK_SPACE #undef COPY_STRING #undef FORMAT_STRING } /* switch(fmt letter) */ } /* if(fmt letter not '%') */ return (l); } /* time_t */ double gtimegm(struct tm *tm) { int i; /* returns sec from year ZERO_YEAR, defined in plot.h */ double dsec = 0.; if (tm->tm_year < ZERO_YEAR) { for (i = tm->tm_year; i < ZERO_YEAR; i++) { dsec -= (double) gdysize(i); } } else { for (i = ZERO_YEAR; i < tm->tm_year; i++) { dsec += (double) gdysize(i); } } if (tm->tm_mday > 0) { for (i = 0; i < tm->tm_mon; i++) { dsec += (double) mndday[i] + (i == 1 && (gdysize(tm->tm_year) > 365)); } dsec += (double) tm->tm_mday - 1; } else { dsec += (double) tm->tm_yday; } dsec *= (double) 24; dsec += tm->tm_hour; dsec *= 60.0; dsec += tm->tm_min; dsec *= 60.0; dsec += tm->tm_sec; FPRINTF((stderr, "broken-down time : %02d/%02d/%d:%02d:%02d:%02d = %g seconds\n", tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec, dsec)); return (dsec); } int ggmtime(struct tm *tm, double l_clock) { /* l_clock is relative to ZERO_YEAR, jan 1, 00:00:00,defined in plot.h */ int i, days; /* dodgy way of doing wday - i hope it works ! */ int wday = JAN_FIRST_WDAY; /* eg 6 for 2000 */ FPRINTF((stderr, "%g seconds = ", l_clock)); if (fabs(l_clock) > 1.e12) { /* Some time in the year 33688 */ int_warn(NO_CARET, "time value out of range"); return(-1); } tm->tm_year = ZERO_YEAR; tm->tm_mday = tm->tm_yday = tm->tm_mon = tm->tm_hour = tm->tm_min = tm->tm_sec = 0; if (l_clock < 0) { while (l_clock < 0) { int days_in_year = gdysize(--tm->tm_year); l_clock += days_in_year * DAY_SEC; /* 24*3600 */ /* adding 371 is noop in modulo 7 arithmetic, but keeps wday +ve */ wday += 371 - days_in_year; } } else { for (;;) { int days_in_year = gdysize(tm->tm_year); if (l_clock < days_in_year * DAY_SEC) break; l_clock -= days_in_year * DAY_SEC; tm->tm_year++; /* only interested in result modulo 7, but %7 is expensive */ wday += (days_in_year - 364); } } tm->tm_yday = (int) (l_clock / DAY_SEC); l_clock -= tm->tm_yday * DAY_SEC; tm->tm_hour = (int) l_clock / 3600; l_clock -= tm->tm_hour * 3600; tm->tm_min = (int) l_clock / 60; l_clock -= tm->tm_min * 60; tm->tm_sec = (int) l_clock; days = tm->tm_yday; /* wday%7 should be day of week of first day of year */ tm->tm_wday = (wday + days) % 7; while (days >= (i = mndday[tm->tm_mon] + (tm->tm_mon == 1 && (gdysize(tm->tm_year) > 365)))) { days -= i; tm->tm_mon++; } tm->tm_mday = days + 1; FPRINTF((stderr, "broken-down time : %02d/%02d/%d:%02d:%02d:%02d\n", tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec)); return (0); } #else /* USE_SYSTEM_TIME */ /* define gnu time routines in terms of system time routines */ size_t gstrftime(char *buf, size_t bufsz, const char *fmt, double l_clock) { time_t t = (time_t) l_clock; return strftime(buf, bufsz, fmt, gmtime(&t)); } double gtimegm(struct tm *tm) { return (double) mktime(tm); } int ggmtime(struct tm *tm, double l_clock) { time_t t = (time_t) l_clock; struct tm *m = gmtime(&t); *tm = *m; /* can any non-ansi compilers not do this ? */ return 0; } /* supplemental routine gstrptime() to read a formatted time */ char * gstrptime(char *s, char *fmt, struct tm *tm) { FPRINTF((stderr, "gstrptime(\"%s\", \"%s\")\n", s, fmt)); /* linux does not appear to like years before 1902 * NT complains if its before 1970 * initialise fields to midnight, 1st Jan, 1970 (for relative times) */ tm->tm_sec = tm->tm_min = tm->tm_hour = 0; tm->tm_mday = 1; tm->tm_mon = 0; tm->tm_year = 70; /* oops - it goes wrong without this */ tm->tm_isdst = 0; for (; *fmt && *s; ++fmt) { if (*fmt != '%') { if (*s != *fmt) return s; ++s; continue; } assert(*fmt == '%'); switch (*++fmt) { case 0: /* uh oh - % is last character in format */ return s; case '%': /* literal % */ if (*s++ != '%') return s - 1; continue; #define NOTHING /* nothing */ #define LETTER(L, width, field, extra) \ case L: \ s=read_int(s,width,&tm->field); \ extra; \ continue; LETTER('d', 2, tm_mday, NOTHING); LETTER('m', 2, tm_mon, NOTHING); LETTER('y', 2, tm_year, NOTHING); LETTER('Y', 4, tm_year, tm->tm_year -= 1900); LETTER('H', 2, tm_hour, NOTHING); LETTER('M', 2, tm_min, NOTHING); LETTER('S', 2, tm_sec, NOTHING); #undef NOTHING #undef LETTER default: int_error(DATAFILE, "incorrect time format character"); } } FPRINTF((stderr, "Before mktime : %d/%d/%d:%d:%d:%d\n", tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec)); /* mktime range-checks the time */ if (mktime(tm) == -1) { FPRINTF((stderr, "mktime() was not happy\n")); int_error(DATAFILE, "Invalid date/time [mktime() did not like it]"); } FPRINTF((stderr, "After mktime : %d/%d/%d:%d:%d:%d\n", tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec)); return s; } #endif /* USE_SYSTEM_TIME */ #ifdef TEST_TIME /* either print current time using supplied format, or read * supplied time using supplied format */ int main(int argc, char *argv[]) { char output[80]; if (argc < 2) { fputs("usage : test 'format' ['time']\n", stderr); exit(EXIT_FAILURE); } if (argc == 2) { struct timeb now; struct tm *tm; ftime(&now); tm = gmtime(&now.time); xstrftime(output, 80, argv[1], tm, 0.); puts(output); } else { struct tm tm; gstrptime(argv[2], argv[1], &tm); puts(asctime(&tm)); } exit(EXIT_SUCCESS); } #endif /* TEST_TIME */ ������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/parse.c���������������������������������������������������������������������������0000644�0004711�0000144�00000102671�12044303264�012203� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: parse.c,v 1.66.2.3 2012/10/31 20:14:44 sfeam Exp $"); } #endif /* GNUPLOT - parse.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "parse.h" #include "alloc.h" #include "command.h" #include "eval.h" #include "help.h" #include "util.h" /* protection mechanism for parsing string followed by + or - sign */ static int parse_recursion_level; static TBOOLEAN string_result_only = FALSE; /* Exported globals: the current 'dummy' variable names */ char c_dummy_var[MAX_NUM_VAR][MAX_ID_LEN+1]; char set_dummy_var[MAX_NUM_VAR][MAX_ID_LEN+1] = { "x", "y" }; TBOOLEAN scanning_range_in_progress = FALSE; /* This is used by plot_option_using() */ int at_highest_column_used = -1; /* This is checked by df_readascii() */ TBOOLEAN parse_1st_row_as_headers = FALSE; /* Iteration structures used for bookkeeping */ /* Iteration can be nested so long as different iterators are used */ t_iterator * plot_iterator = NULL; t_iterator * set_iterator = NULL; /* Internal prototypes: */ static void convert __PROTO((struct value *, int)); static void extend_at __PROTO((void)); static union argument *add_action __PROTO((enum operators sf_index)); static void parse_expression __PROTO((void)); static void accept_logical_OR_expression __PROTO((void)); static void accept_logical_AND_expression __PROTO((void)); static void accept_inclusive_OR_expression __PROTO((void)); static void accept_exclusive_OR_expression __PROTO((void)); static void accept_AND_expression __PROTO((void)); static void accept_equality_expression __PROTO((void)); static void accept_relational_expression __PROTO((void)); static void accept_additive_expression __PROTO((void)); static void accept_multiplicative_expression __PROTO((void)); static void parse_primary_expression __PROTO((void)); static void parse_conditional_expression __PROTO((void)); static void parse_logical_OR_expression __PROTO((void)); static void parse_logical_AND_expression __PROTO((void)); static void parse_inclusive_OR_expression __PROTO((void)); static void parse_exclusive_OR_expression __PROTO((void)); static void parse_AND_expression __PROTO((void)); static void parse_equality_expression __PROTO((void)); static void parse_relational_expression __PROTO((void)); static void parse_additive_expression __PROTO((void)); static void parse_multiplicative_expression __PROTO((void)); static void parse_unary_expression __PROTO((void)); static void parse_sum_expression __PROTO((void)); static int parse_assignment_expression __PROTO((void)); static int is_builtin_function __PROTO((int t_num)); static void set_up_columnheader_parsing __PROTO((struct at_entry *previous )); /* Internal variables: */ static struct at_type *at = NULL; static int at_size = 0; static void convert(struct value *val_ptr, int t_num) { *val_ptr = token[t_num].l_val; } int int_expression() { return (int)real_expression(); } double real_expression() { double result; struct value a; result = real(const_express(&a)); gpfree_string(&a); return result; } void parse_reset_after_error() { string_result_only = FALSE; } /* JW 20051126: * Wrapper around const_express() called by try_to_get_string(). * Disallows top level + and - operators. * This enables things like set xtics ('-\pi' -pi, '-\pi/2' -pi/2.) */ struct value * const_string_express(struct value *valptr) { string_result_only = TRUE; const_express(valptr); string_result_only = FALSE; return (valptr); } struct value * const_express(struct value *valptr) { int tkn = c_token; if (END_OF_COMMAND) int_error(c_token, "constant expression required"); /* div - no dummy variables in a constant expression */ dummy_func = NULL; evaluate_at(temp_at(), valptr); /* run it and send answer back */ if (undefined) { int_error(tkn, "undefined value"); } return (valptr); } /* Used by plot2d/plot3d/fit: * Parse an expression that may return a string or may return a constant or may * be a dummy function using dummy variables x, y, ... * If any dummy variables are present, set (*atptr) to point to an action table * corresponding to the parsed expression, and return NULL. * Otherwise evaluate the expression and return a string if there is one. * The return value "str" and "*atptr" both point to locally-managed memory, * which must not be freed by the caller! */ char* string_or_express(struct at_type **atptr) { int i; TBOOLEAN has_dummies; static char* str = NULL; free(str); str = NULL; if (atptr) *atptr = NULL; if (END_OF_COMMAND) int_error(c_token, "expression expected"); if (isstring(c_token)) { str = try_to_get_string(); return str; } /* parse expression */ temp_at(); /* check if any dummy variables are used */ has_dummies = FALSE; for (i = 0; i < at->a_count; i++) { enum operators op_index = at->actions[i].index; if ( op_index == PUSHD1 || op_index == PUSHD2 || op_index == PUSHD || op_index == SUM ) { has_dummies = TRUE; break; } } if (!has_dummies) { /* no dummy variables: evaluate expression */ struct value val; evaluate_at(at, &val); if (!undefined && val.type == STRING) str = val.v.string_val; } /* prepare return */ if (atptr) *atptr = at; return str; } /* build an action table and return its pointer, but keep a pointer in at * so that we can free it later if the caller hasn't taken over management * of this table. */ struct at_type * temp_at() { if (at != NULL) free_at(at); at = (struct at_type *) gp_alloc(sizeof(struct at_type), "action table"); memset(at, 0, sizeof(*at)); /* reset action table !!! */ at_size = MAX_AT_LEN; parse_recursion_level = 0; parse_expression(); return (at); } /* build an action table, put it in dynamic memory, and return its pointer */ struct at_type * perm_at() { struct at_type *at_ptr; size_t len; (void) temp_at(); len = sizeof(struct at_type) + (at->a_count - MAX_AT_LEN) * sizeof(struct at_entry); at_ptr = (struct at_type *) gp_realloc(at, len, "perm_at"); at = NULL; /* invalidate at pointer */ return (at_ptr); } /* Create an action table that describes a call to column("string"). */ /* This is used by plot_option_using() to handle 'plot ... using "string"' */ struct at_type * create_call_column_at(char *string) { struct at_type *at = gp_alloc(sizeof(int) + 2*sizeof(struct at_entry),""); at->a_count = 2; at->actions[0].index = PUSHC; at->actions[0].arg.j_arg = 3; /* FIXME - magic number! */ at->actions[0].arg.v_arg.type = STRING; at->actions[0].arg.v_arg.v.string_val = string; at->actions[1].index = COLUMN; at->actions[1].arg.j_arg = 0; return (at); } static void extend_at() { size_t newsize = sizeof(struct at_type) + at_size * sizeof(struct at_entry); at = gp_realloc(at, newsize, "extend_at"); at_size += MAX_AT_LEN; FPRINTF((stderr, "Extending at size to %d\n", at_size)); } /* Add function number <sf_index> to the current action table */ static union argument * add_action(enum operators sf_index) { if (at->a_count >= at_size) { extend_at(); } at->actions[at->a_count].index = sf_index; return (&(at->actions[at->a_count++].arg)); } /* For external calls to parse_expressions() * parse_recursion_level is expected to be 0 */ static void parse_expression() { /* full expressions */ if (parse_assignment_expression()) return; parse_recursion_level++; accept_logical_OR_expression(); parse_conditional_expression(); parse_recursion_level--; } static void accept_logical_OR_expression() { /* ? : expressions */ accept_logical_AND_expression(); parse_logical_OR_expression(); } static void accept_logical_AND_expression() { accept_inclusive_OR_expression(); parse_logical_AND_expression(); } static void accept_inclusive_OR_expression() { accept_exclusive_OR_expression(); parse_inclusive_OR_expression(); } static void accept_exclusive_OR_expression() { accept_AND_expression(); parse_exclusive_OR_expression(); } static void accept_AND_expression() { accept_equality_expression(); parse_AND_expression(); } static void accept_equality_expression() { accept_relational_expression(); parse_equality_expression(); } static void accept_relational_expression() { accept_additive_expression(); parse_relational_expression(); } static void accept_additive_expression() { accept_multiplicative_expression(); parse_additive_expression(); } static void accept_multiplicative_expression() { parse_unary_expression(); /* - things */ parse_multiplicative_expression(); /* * / % */ } static int parse_assignment_expression() { /* Check for assignment operator */ if (isletter(c_token) && equals(c_token + 1, "=")) { /* push the variable name */ union argument *foo = add_action(PUSHC); char *varname = NULL; m_capture(&varname,c_token,c_token); foo->v_arg.type = STRING; foo->v_arg.v.string_val = varname; c_token += 2; /* and the expression whose value it will get */ parse_expression(); /* and the actual assignment operation */ (void) add_action(ASSIGN); return 1; } return 0; } /* add action table entries for primary expressions, i.e. either a * parenthesized expression, a variable name, a numeric constant, a * function evaluation, a power operator or postfix '!' (factorial) * expression */ static void parse_primary_expression() { if (equals(c_token, "(")) { c_token++; parse_expression(); /* Expressions may be separated by a comma */ while (equals(c_token,",")) { c_token++; (void) add_action(POP); parse_expression(); } if (!equals(c_token, ")")) int_error(c_token, "')' expected"); c_token++; } else if (equals(c_token, "$")) { struct value a; if (!isanumber(++c_token)) int_error(c_token, "Column number expected"); convert(&a, c_token++); if (a.type != INTGR || a.v.int_val < 0) int_error(c_token, "Positive integer expected"); if (at_highest_column_used < a.v.int_val) at_highest_column_used = a.v.int_val; add_action(DOLLARS)->v_arg = a; } else if (isanumber(c_token)) { /* work around HP 9000S/300 HP-UX 9.10 cc limitation ... */ /* HBB 20010724: use this code for all platforms, then */ union argument *foo = add_action(PUSHC); convert(&(foo->v_arg), c_token); c_token++; } else if (isletter(c_token)) { /* Found an identifier --- check whether its a function or a * variable by looking for the parentheses of a function * argument list */ if (equals(c_token + 1, "(")) { enum operators whichfunc = is_builtin_function(c_token); struct value num_params; num_params.type = INTGR; if (whichfunc) { #ifdef BACKWARDS_COMPATIBLE /* Deprecated syntax: if (defined(foo)) ... */ /* New syntax: if (exists("foo")) ... */ if (strcmp(ft[whichfunc].f_name,"defined")==0) { struct udvt_entry *udv = add_udv(c_token+2); union argument *foo = add_action(PUSHC); foo->v_arg.type = INTGR; foo->v_arg.v.int_val = udv->udv_undef ? 0 : 1; c_token += 4; /* skip past "defined ( <foo> ) " */ return; } #endif c_token += 2; /* skip fnc name and '(' */ parse_expression(); /* parse fnc argument */ num_params.v.int_val = 1; while (equals(c_token, ",")) { c_token++; num_params.v.int_val++; parse_expression(); } if (!equals(c_token, ")")) int_error(c_token, "')' expected"); c_token++; /* So far sprintf is the only built-in function */ /* with a variable number of arguments. */ if (!strcmp(ft[whichfunc].f_name,"sprintf")) add_action(PUSHC)->v_arg = num_params; /* "words(s)" is implemented as "word(s,-1)" */ if (!strcmp(ft[whichfunc].f_name,"words")) { num_params.v.int_val = -1; add_action(PUSHC)->v_arg = num_params; } /* The column() function has side effects requiring special handling */ if (!strcmp(ft[whichfunc].f_name,"column")) { set_up_columnheader_parsing( &(at->actions[at->a_count-1]) ); } (void) add_action(whichfunc); } else { /* it's a call to a user-defined function */ enum operators call_type = (int) CALL; int tok = c_token; c_token += 2; /* skip func name and '(' */ parse_expression(); if (equals(c_token, ",")) { /* more than 1 argument? */ num_params.v.int_val = 1; while (equals(c_token, ",")) { num_params.v.int_val += 1; c_token += 1; parse_expression(); } add_action(PUSHC)->v_arg = num_params; call_type = (int) CALLN; } if (!equals(c_token, ")")) int_error(c_token, "')' expected"); c_token++; add_action(call_type)->udf_arg = add_udf(tok); } } else if (equals(c_token, "sum") && equals(c_token+1, "[")) { parse_sum_expression(); /* dummy_func==NULL is a flag to say no dummy variables active */ } else if (dummy_func) { if (equals(c_token, c_dummy_var[0])) { c_token++; add_action(PUSHD1)->udf_arg = dummy_func; } else if (equals(c_token, c_dummy_var[1])) { c_token++; add_action(PUSHD2)->udf_arg = dummy_func; } else { int i, param = 0; for (i = 2; i < MAX_NUM_VAR; i++) { if (equals(c_token, c_dummy_var[i])) { struct value num_params; num_params.type = INTGR; num_params.v.int_val = i; param = 1; c_token++; add_action(PUSHC)->v_arg = num_params; add_action(PUSHD)->udf_arg = dummy_func; break; } } if (!param) { /* defined variable */ add_action(PUSH)->udv_arg = add_udv(c_token); c_token++; } } /* its a variable, with no dummies active - div */ } else { add_action(PUSH)->udv_arg = add_udv(c_token); c_token++; } } /* end if letter */ /* Maybe it's a string constant */ else if (isstring(c_token)) { union argument *foo = add_action(PUSHC); foo->v_arg.type = STRING; foo->v_arg.v.string_val = NULL; /* this dynamically allocated string will be freed by free_at() */ m_quote_capture(&(foo->v_arg.v.string_val), c_token, c_token); c_token++; } else int_error(c_token, "invalid expression "); /* add action code for ! (factorial) operator */ while (equals(c_token, "!")) { c_token++; (void) add_action(FACTORIAL); } /* add action code for ** operator */ if (equals(c_token, "**")) { c_token++; parse_unary_expression(); (void) add_action(POWER); } /* Parse and add actions for range specifier applying to previous entity. * Currently only used to generate substrings, but could also be used to * extract vector slices. */ if (equals(c_token, "[")) { /* handle '*' or empty start of range */ if (equals(++c_token,"*") || equals(c_token,":")) { union argument *empty = add_action(PUSHC); empty->v_arg.type = INTGR; empty->v_arg.v.int_val = 1; if (equals(c_token,"*")) c_token++; } else parse_expression(); if (!equals(c_token, ":")) int_error(c_token, "':' expected"); /* handle '*' or empty end of range */ if (equals(++c_token,"*") || equals(c_token,"]")) { union argument *empty = add_action(PUSHC); empty->v_arg.type = INTGR; empty->v_arg.v.int_val = 65535; /* should be MAXINT */ if (equals(c_token,"*")) c_token++; } else parse_expression(); if (!equals(c_token, "]")) int_error(c_token, "']' expected"); c_token++; (void) add_action(RANGE); } } /* HBB 20010309: Here and below: can't store pointers into the middle * of at->actions[]. That array may be realloc()ed by add_action() or * express() calls!. Access via index savepc1/savepc2, instead. */ static void parse_conditional_expression() { /* create action code for ? : expressions */ if (equals(c_token, "?")) { int savepc1, savepc2; /* Fake same recursion level for alternatives * set xlabel a>b ? 'foo' : 'bar' -1, 1 * FIXME: This won't work: * set xlabel a-b>c ? 'foo' : 'bar' offset -1, 1 */ parse_recursion_level--; c_token++; savepc1 = at->a_count; add_action(JTERN); parse_expression(); if (!equals(c_token, ":")) int_error(c_token, "expecting ':'"); c_token++; savepc2 = at->a_count; add_action(JUMP); at->actions[savepc1].arg.j_arg = at->a_count - savepc1; parse_expression(); at->actions[savepc2].arg.j_arg = at->a_count - savepc2; parse_recursion_level++; } } static void parse_logical_OR_expression() { /* create action codes for || operator */ while (equals(c_token, "||")) { int savepc; c_token++; savepc = at->a_count; add_action(JUMPNZ); /* short-circuit if already TRUE */ accept_logical_AND_expression(); /* offset for jump */ at->actions[savepc].arg.j_arg = at->a_count - savepc; (void) add_action(BOOLE); } } static void parse_logical_AND_expression() { /* create action code for && operator */ while (equals(c_token, "&&")) { int savepc; c_token++; savepc = at->a_count; add_action(JUMPZ); /* short-circuit if already FALSE */ accept_inclusive_OR_expression(); at->actions[savepc].arg.j_arg = at->a_count - savepc; /* offset for jump */ (void) add_action(BOOLE); } } static void parse_inclusive_OR_expression() { /* create action code for | operator */ while (equals(c_token, "|")) { c_token++; accept_exclusive_OR_expression(); (void) add_action(BOR); } } static void parse_exclusive_OR_expression() { /* create action code for ^ operator */ while (equals(c_token, "^")) { c_token++; accept_AND_expression(); (void) add_action(XOR); } } static void parse_AND_expression() { /* create action code for & operator */ while (equals(c_token, "&")) { c_token++; accept_equality_expression(); (void) add_action(BAND); } } static void parse_equality_expression() { /* create action codes for == and != numeric operators * eq and ne string operators */ while (TRUE) { if (equals(c_token, "==")) { c_token++; accept_relational_expression(); (void) add_action(EQ); } else if (equals(c_token, "!=")) { c_token++; accept_relational_expression(); (void) add_action(NE); } else if (equals(c_token, "eq")) { c_token++; accept_relational_expression(); (void) add_action(EQS); } else if (equals(c_token, "ne")) { c_token++; accept_relational_expression(); (void) add_action(NES); } else break; } } static void parse_relational_expression() { /* create action code for < > >= or <= * operators */ while (TRUE) { /* I hate "else if" statements */ if (equals(c_token, ">")) { c_token++; accept_additive_expression(); (void) add_action(GT); } else if (equals(c_token, "<")) { /* Workaround for * in syntax of range constraints */ if (scanning_range_in_progress && equals(c_token+1, "*") ) { break; } c_token++; accept_additive_expression(); (void) add_action(LT); } else if (equals(c_token, ">=")) { c_token++; accept_additive_expression(); (void) add_action(GE); } else if (equals(c_token, "<=")) { c_token++; accept_additive_expression(); (void) add_action(LE); } else break; } } static void parse_additive_expression() { /* create action codes for +, - and . operators */ while (TRUE) { if (equals(c_token, ".")) { c_token++; accept_multiplicative_expression(); (void) add_action(CONCATENATE); /* If only string results are wanted * do not accept '-' or '+' at the top level. */ } else if (string_result_only && parse_recursion_level == 1) { break; } else if (equals(c_token, "+")) { c_token++; accept_multiplicative_expression(); (void) add_action(PLUS); } else if (equals(c_token, "-")) { c_token++; accept_multiplicative_expression(); (void) add_action(MINUS); } else break; } } static void parse_multiplicative_expression() { /* add action code for * / and % operators */ while (TRUE) { if (equals(c_token, "*")) { c_token++; parse_unary_expression(); (void) add_action(MULT); } else if (equals(c_token, "/")) { c_token++; parse_unary_expression(); (void) add_action(DIV); } else if (equals(c_token, "%")) { c_token++; parse_unary_expression(); (void) add_action(MOD); } else break; } } static void parse_unary_expression() { /* add code for unary operators */ if (equals(c_token, "!")) { c_token++; parse_unary_expression(); (void) add_action(LNOT); } else if (equals(c_token, "~")) { c_token++; parse_unary_expression(); (void) add_action(BNOT); } else if (equals(c_token, "-")) { c_token++; parse_unary_expression(); (void) add_action(UMINUS); } else if (equals(c_token, "+")) { /* unary + is no-op */ c_token++; parse_unary_expression(); } else parse_primary_expression(); } /* create action code for 'sum' expressions */ static void parse_sum_expression() { /* sum [<var>=<range>] <expr> * - Pass a udf to f_sum (with action code (for <expr>) that is not added * to the global action table). * - f_sum uses a newly created udv (<var>) to pass the current value of * <var> to <expr> (resp. its ac). * - The original idea was to treat <expr> as function f(<var>), but there * was the following problem: Consider 'g(x) = sum [k=1:4] f(k)'. There * are two dummy variables 'x' and 'k' from different functions 'g' and * 'f' which would require changing the parsing of dummy variables. */ char *errormsg = "Expecting 'sum [<var> = <start>:<end>] <expression>'\n"; char *varname = NULL; union argument *arg; struct udft_entry *udf; struct at_type * save_at; int save_at_size; int i; /* Caller already checked for string "sum [" so skip both tokens */ c_token += 2; /* <var> */ if (!isletter(c_token)) int_error(c_token, errormsg); /* create a user defined variable and pass it to f_sum via PUSHC, since the * argument of f_sum is already used by the udf */ m_capture(&varname, c_token, c_token); add_udv(c_token); arg = add_action(PUSHC); Gstring(&(arg->v_arg), varname); c_token++; if (!equals(c_token, "=")) int_error(c_token, errormsg); c_token++; /* <start> */ parse_expression(); if (!equals(c_token, ":")) int_error(c_token, errormsg); c_token++; /* <end> */ parse_expression(); if (!equals(c_token, "]")) int_error(c_token, errormsg); c_token++; /* parse <expr> and convert it to a new action table. */ /* modeled on code from temp_at(). */ /* 1. save environment to restart parsing */ save_at = at; save_at_size = at_size; at = NULL; /* 2. save action table in a user defined function */ udf = (struct udft_entry *) gp_alloc(sizeof(struct udft_entry), "sum"); udf->next_udf = (struct udft_entry *) NULL; udf->udf_name = NULL; /* TODO maybe add a name and definition */ udf->at = perm_at(); udf->definition = NULL; udf->dummy_num = 0; for (i = 0; i < MAX_NUM_VAR; i++) (void) Ginteger(&(udf->dummy_values[i]), 0); /* 3. restore environment */ at = save_at; at_size = save_at_size; /* pass the udf to f_sum using the argument */ add_action(SUM)->udf_arg = udf; } /* find or add value and return pointer */ struct udvt_entry * add_udv(int t_num) { char varname[MAX_ID_LEN+1]; copy_str(varname, t_num, MAX_ID_LEN); return add_udv_by_name(varname); } /* find or add function at index <t_num>, and return pointer */ struct udft_entry * add_udf(int t_num) { struct udft_entry **udf_ptr = &first_udf; int i; while (*udf_ptr) { if (equals(t_num, (*udf_ptr)->udf_name)) return (*udf_ptr); udf_ptr = &((*udf_ptr)->next_udf); } /* get here => not found. udf_ptr points at first_udf or * next_udf field of last udf */ if (is_builtin_function(t_num)) int_warn(t_num, "Warning : udf shadowed by built-in function of the same name"); /* create and return a new udf slot */ *udf_ptr = (struct udft_entry *) gp_alloc(sizeof(struct udft_entry), "function"); (*udf_ptr)->next_udf = (struct udft_entry *) NULL; (*udf_ptr)->definition = NULL; (*udf_ptr)->at = NULL; (*udf_ptr)->udf_name = gp_alloc (token_len(t_num)+1, "user func"); copy_str((*udf_ptr)->udf_name, t_num, token_len(t_num)+1); for (i = 0; i < MAX_NUM_VAR; i++) (void) Ginteger(&((*udf_ptr)->dummy_values[i]), 0); return (*udf_ptr); } /* return standard function index or 0 */ static int is_builtin_function(int t_num) { int i; for (i = (int) SF_START; ft[i].f_name != NULL; i++) { if (equals(t_num, ft[i].f_name)) return (i); } return (0); } /* Look for iterate-over-plot constructs, of the form * for [<var> = <start> : <end> { : <increment>}] ... * If one (or more) is found, an iterator structure is allocated and filled * and a pointer to that structure is returned. * The pointer is NULL if no "for" statements are found. */ t_iterator * check_for_iteration() { char *errormsg = "Expecting iterator \tfor [<var> = <start> : <end>]\n\t\t\tor\tfor [<var> in \"string of words\"]"; int nesting_depth = 0; t_iterator *iter = NULL; t_iterator *this_iter = NULL; /* Now checking for iteration parameters */ /* Nested "for" statements are supported, each one corresponds to a node of the linked list */ while (equals(c_token, "for")) { struct udvt_entry *iteration_udv = NULL; char *iteration_string = NULL; int iteration_start; int iteration_end; int iteration_increment = 1; int iteration_current; int iteration = 0; TBOOLEAN empty_iteration; c_token++; if (!equals(c_token++, "[") || !isletter(c_token)) int_error(c_token-1, errormsg); iteration_udv = add_udv(c_token++); if (equals(c_token, "=")) { c_token++; iteration_start = int_expression(); if (!equals(c_token++, ":")) int_error(c_token-1, errormsg); iteration_end = int_expression(); if (equals(c_token,":")) { c_token++; iteration_increment = int_expression(); } if (!equals(c_token++, "]")) int_error(c_token-1, errormsg); if (iteration_udv->udv_undef == FALSE) gpfree_string(&(iteration_udv->udv_value)); Ginteger(&(iteration_udv->udv_value), iteration_start); iteration_udv->udv_undef = FALSE; } else if (equals(c_token++, "in")) { iteration_string = try_to_get_string(); if (!iteration_string) int_error(c_token-1, errormsg); if (!equals(c_token++, "]")) int_error(c_token-1, errormsg); iteration_start = 1; iteration_end = gp_words(iteration_string); if (iteration_udv->udv_undef == FALSE) gpfree_string(&(iteration_udv->udv_value)); Gstring(&(iteration_udv->udv_value), gp_word(iteration_string, 1)); iteration_udv->udv_undef = FALSE; } else /* Neither [i=B:E] or [s in "foo"] */ int_error(c_token-1, errormsg); iteration_current = iteration_start; empty_iteration = iteration_udv && ((iteration_end - iteration_start) * iteration_increment < 0); /* allocating a node of the linked list and initializing its fields */ /* iterating just once is the same as not iterating at all, * so we skip building the node in that case */ if (iteration_increment && (iteration_start != iteration_end) && (abs(iteration_end - iteration_start) >= abs(iteration_increment))) { this_iter = gp_alloc(sizeof(t_iterator), "iteration linked list"); this_iter->iteration_udv = iteration_udv; this_iter->iteration_string = iteration_string; this_iter->iteration_start = iteration_start; this_iter->iteration_end = iteration_end; this_iter->iteration_increment = iteration_increment; this_iter->iteration_current = iteration_current; this_iter->iteration = iteration; this_iter->done = FALSE; this_iter->really_done = FALSE; this_iter->empty_iteration = FALSE; this_iter->next = NULL; this_iter->prev = NULL; if (nesting_depth == 0) { /* first "for" statement: this will be the listhead */ iter = this_iter; } else { /* not the first "for" statement: attach the newly created node to the end of the list */ iter->prev->next = this_iter; /* iter->prev points to the last node of the list */ this_iter->prev = iter->prev; } iter->prev = this_iter; /* a shortcut: making the list circular */ /* if one iteration in the chain is empty, the whole chain of iterations is empty, too */ if (!iter->empty_iteration) iter->empty_iteration = empty_iteration; nesting_depth++; } } return iter; } /* Set up next iteration. * Return TRUE if there is one, FALSE if we're done */ TBOOLEAN next_iteration(t_iterator *iter) { t_iterator *this_iter; TBOOLEAN condition = FALSE; if (!iter || iter->empty_iteration) return FALSE; /* Support for nested iteration: * we start with the innermost loop. */ this_iter = iter->prev; /* linked to the last element of the list */ if (!this_iter) return FALSE; while (!iter->really_done && this_iter != iter && this_iter->done) { this_iter->iteration_current = this_iter->iteration_start; this_iter->done = FALSE; if (this_iter->iteration_string) { free(this_iter->iteration_udv->udv_value.v.string_val); this_iter->iteration_udv->udv_value.v.string_val = gp_word(this_iter->iteration_string, this_iter->iteration_current); } else this_iter->iteration_udv->udv_value.v.int_val = this_iter->iteration_current; this_iter = this_iter->prev; } if (!this_iter->iteration_udv) { this_iter->iteration = 0; return FALSE; } iter->iteration++; /* don't increment if we're at the last iteration */ if (!iter->really_done) this_iter->iteration_current += this_iter->iteration_increment; if (this_iter->iteration_string) { free(this_iter->iteration_udv->udv_value.v.string_val); this_iter->iteration_udv->udv_value.v.string_val = gp_word(this_iter->iteration_string, this_iter->iteration_current); } else this_iter->iteration_udv->udv_value.v.int_val = this_iter->iteration_current; /* no need to check for increment <> 0 here, * because that case was already caught in check_for_iteration */ this_iter->done = !((this_iter->iteration_end - this_iter->iteration_current - this_iter->iteration_increment) * this_iter->iteration_increment >= 0); /* We return false only if we're, erm, really done */ this_iter = iter; while (this_iter) { condition = condition || (!this_iter->done); this_iter = this_iter->next; } if (!condition) { if (!iter->really_done) { iter->really_done = TRUE; condition = TRUE; } else condition = FALSE; } return condition; } TBOOLEAN empty_iteration(t_iterator *iter) { if (!iter) return FALSE; else return iter->empty_iteration; } t_iterator * cleanup_iteration(t_iterator *iter) { while (iter) { t_iterator *next = iter->next; free(iter->iteration_string); free(iter); iter = next; } return NULL; } /* The column() function requires special handling because * - It has side effects if reference to a column entry * requires matching it to the column header string. * - These side effects must be handled at the time the * expression is parsed rather than when it it evaluated. */ static void set_up_columnheader_parsing( struct at_entry *previous ) { /* column("string") means we expect the first row of */ /* a data file to contain headers rather than data. */ if (previous->index == PUSHC && previous->arg.v_arg.type == STRING) parse_1st_row_as_headers = TRUE; /* This allows plot ... using (column(<const>)) title columnhead */ if (previous->index == PUSHC && previous->arg.v_arg.type == INTGR) { if (at_highest_column_used < previous->arg.v_arg.v.int_val) at_highest_column_used = previous->arg.v_arg.v.int_val; } /* This attempts to catch plot ... using (column(<variable>)) */ if (previous->index == PUSH) { udvt_entry *u = previous->arg.udv_arg; if (u->udv_value.type == INTGR) { if (at_highest_column_used < u->udv_value.v.int_val) at_highest_column_used = u->udv_value.v.int_val; } #if (0) /* Currently handled elsewhere, but could be done here instead */ if (u->udv_value.type == STRING) { parse_1st_row_as_headers = TRUE; } #endif } /* NOTE: There is no way to handle ... using (column(<general expression>)) */ } �����������������������������������������������������������������������gnuplot-4.6.4/src/x11.opt���������������������������������������������������������������������������0000644�0004711�0000144�00000000043�06736403705�012064� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sys$library:decw$xlibshr.exe/share ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/mousecmn.h������������������������������������������������������������������������0000644�0004711�0000144�00000012165�12043621616�012725� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: mousecmn.h,v 1.16.4.1 2012/10/27 02:24:37 sfeam Exp $ */ /* GNUPLOT - mousecnm.h */ /*[ * * Copyright: Petr Mikulik <mikulik@physics.muni.cz>, since 1999 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef MOUSECMN_H # define MOUSECMN_H /* * Definitions that are used by both gnuplot core and standalone terminals. */ /* * Structure for reporting mouse events to the main program */ struct gp_event_t { int type; /* see below */ int mx, my; /* current mouse coordinates */ int par1, par2; /* other parameters, depending on the event type */ int winid; /* ID of window in which the event occurred */ }; /* event types: */ enum { GE_motion, /* mouse has moved */ GE_buttonpress, /* mouse button has been pressed; par1 = number of the button (1, 2, 3...) */ GE_buttonrelease, /* mouse button has been released; par1 = number of the button (1, 2, 3...); par2 = time (ms) since previous button release */ GE_keypress, /* keypress; par1 = keycode (either ASCII, or one of the GP_ enums defined below); par2 = ( |1 .. don't pass through bindings )*/ GE_buttonpress_old, /* same as GE_buttonpress but triggered from inactive window */ GE_buttonrelease_old, /* same as GE_buttonrelease but triggered from inactive window */ GE_keypress_old, /* same as GE_keypress but triggered from inactive window */ GE_modifier, /* shift/ctrl/alt key pressed or released; par1 = is new mask, see Mod_ enums below */ GE_plotdone, /* acknowledgement of plot completion (for synchronization) */ GE_replot, /* used only by ggi.trm */ GE_reset /* reset to a well-defined state (e.g. after an X11 error occured) */ , GE_fontprops /* par1 = hchar par2 = vchar */ #if defined(PIPE_IPC) || defined(WIN_IPC) , GE_pending /* signal gp_exec_event() to send pending events */ #endif }; /* the status of the shift, ctrl and alt keys */ enum { Mod_Shift = (1), Mod_Ctrl = (1 << 1), Mod_Alt = (1 << 2) }; /* the below depends on the ascii character set lying in the * range from 0 to 255 (below 1000) */ enum { /* special keys with "usual well-known" keycodes */ GP_BackSpace = 0x08, GP_Tab = 0x09, GP_KP_Enter = 0x0A, GP_Return = 0x0D, GP_Escape = 0x1B, GP_Delete = 127 }; enum { /* other special keys */ GP_FIRST_KEY = 1000, GP_Linefeed, GP_Clear, GP_Pause, GP_Scroll_Lock, GP_Sys_Req, GP_Insert, GP_Home, GP_Left, GP_Up, GP_Right, GP_Down, GP_PageUp, GP_PageDown, GP_End, GP_Begin, GP_KP_Space, GP_KP_Tab, GP_KP_F1, GP_KP_F2, GP_KP_F3, GP_KP_F4, GP_KP_Insert, /* ~ KP_0 */ GP_KP_End, /* ~ KP_1 */ GP_KP_Down, /* ~ KP_2 */ GP_KP_Page_Down, /* ~ KP_3 */ GP_KP_Left, /* ~ KP_4 */ GP_KP_Begin, /* ~ KP_5 */ GP_KP_Right, /* ~ KP_6 */ GP_KP_Home, /* ~ KP_7 */ GP_KP_Up, /* ~ KP_8 */ GP_KP_Page_Up, /* ~ KP_9 */ GP_KP_Delete, GP_KP_Equal, GP_KP_Multiply, GP_KP_Add, GP_KP_Separator, GP_KP_Subtract, GP_KP_Decimal, GP_KP_Divide, GP_KP_0, GP_KP_1, GP_KP_2, GP_KP_3, GP_KP_4, GP_KP_5, GP_KP_6, GP_KP_7, GP_KP_8, GP_KP_9, GP_F1, GP_F2, GP_F3, GP_F4, GP_F5, GP_F6, GP_F7, GP_F8, GP_F9, GP_F10, GP_F11, GP_F12, GP_Cancel, GP_Button1, GP_LAST_KEY }; #ifdef OS2 /* Pass information necessary for (un)checking menu items in the Presentation Manager terminal. Thus this structure is required by pm.trm and gclient.c. */ struct t_gpPMmenu { int use_mouse; int where_zoom_queue; /* logical or: 1..unzoom, 2..unzoom back, 4..zoom next */ int polar_distance; }; #endif #endif /* MOUSECMN_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/dynarray.c������������������������������������������������������������������������0000644�0004711�0000144�00000007770�10071042554�012726� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: dynarray.c,v 1.11 2004/07/01 17:10:04 broeker Exp $"); } #endif /*[ * Copyright 1999, 2004 Hans-Bernhard Broeker * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* This module implements a dynamically growing array of arbitrary * elements parametrized by their sizeof(). There is no 'access * function', i.e. you'll have to access the elements of the * dynarray->v memory block by hand. It's implemented in OO-style, * even though this is C, not C++. In particular, every function * takes a pointer to a data structure type 'dynarray', which mimics * the 'this' pointer of an object. */ #include "dynarray.h" #include "alloc.h" #include "util.h" /* for graph_error() */ /* The 'constructor' of a dynarray object: initializes all the * variables to well-defined startup values */ void init_dynarray(dynarray *this, size_t entry_size, long size, long increment) { this->v = 0; /* preset value, in case gp_alloc fails */ if (size) this->v = gp_alloc(entry_size*size, "init dynarray"); this->size = size; this->end = 0; this->increment = increment; this->entry_size = entry_size; } /* The 'destructor'; sets all crucial elements of the structure to * well-defined values to avoid problems by use of bad pointers... */ void free_dynarray(dynarray *this) { free(this->v); /* should work, even if gp_alloc failed */ this->v = 0; this->end = this->size = 0; } /* Set the size of the dynamical array to a new, fixed value */ void resize_dynarray(dynarray *this, long newsize) { if (!this->v) graph_error("resize_dynarray: dynarray wasn't initialized!"); if (newsize == 0) free_dynarray(this); else { this->v = gp_realloc(this->v, this->entry_size * newsize, "extend dynarray"); this->size = newsize; } } /* Increase the size of the dynarray by a given amount */ void extend_dynarray(dynarray *this, long increment) { resize_dynarray(this, this->size + increment); } /* Get pointer to the element one past the current end of the dynamic * array. Resize it if necessary. Returns a pointer-to-void to that * element. */ void GPHUGE * nextfrom_dynarray(dynarray *this) { if (!this->v) graph_error("nextfrom_dynarray: dynarray wan't initialized!"); if (this->end >= this->size) extend_dynarray(this, this->increment); return (void *)((char *)(this->v) + this->entry_size * (this->end++)); } /* Release the element at the current end of the dynamic array, by * moving the 'end' index one element backwards */ void droplast_dynarray(dynarray *this) { if (!this->v) graph_error("droplast_dynarray: dynarray wasn't initialized!"); if (this->end) this->end--; } ��������gnuplot-4.6.4/src/interpol.c������������������������������������������������������������������������0000644�0004711�0000144�00000116236�12015521702�012724� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: interpol.c,v 1.39.2.2 2012/08/23 21:42:26 sfeam Exp $"); } #endif /* GNUPLOT - interpol.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * C-Source file identification Header * * This file belongs to a project which is: * * done 1993 by MGR-Software, Asgard (Lars Hanke) * written by Lars Hanke * * Contact me via: * * InterNet: mgr@asgard.bo.open.de * FIDO: Lars Hanke @ 2:243/4802.22 (as long as they keep addresses) * ************************************************************************** * * Project: gnuplot * Module: * File: interpol.c * * Revisor: Lars Hanke * Revised: 26/09/93 * Revision: 1.0 * ************************************************************************** * * LEGAL * This module is part of gnuplot and distributed under whatever terms * gnuplot is or will be published, unless exclusive rights are claimed. * * DESCRIPTION * Supplies 2-D data interpolation and approximation routines * * IMPORTS * plot.h * - cp_extend() * - structs: curve_points, coordval, coordinate * * setshow.h * - samples, axis array[] variables * - plottypes * * proto.h * - solve_tri_diag() * - typedef tri_diag * * EXPORTS * gen_interp() * sort_points() * cp_implode() * * BUGS and TODO * I would really have liked to use Gershon Elbers contouring code for * all the stuff done here, but I failed. So I used my own code. * If somebody is able to consolidate Gershon's code for this purpose * a lot of gnuplot users would be very happy - due to memory problems. * ************************************************************************** * * HISTORY * Changes: * Nov 24, 1995 Markus Schuh (M.Schuh@meteo.uni-koeln.de): * changed the algorithm for csplines * added algorithm for approximation csplines * copied point storage and range fix from plot2d.c * * Dec 12, 1995 David Denholm * oops - at the time this is called, stored co-ords are * internal (ie maybe log of data) but min/max are in * user co-ordinates. * Work with min and max of internal co-ords, and * check at the end whether external min and max need to * be increased. (since samples_1 is typically 100 ; we * dont want to take more logs than necessary) * Also, need to take into account which axes are active * * Jun 30, 1996 Jens Emmerich * implemented handling of UNDEFINED points */ #include "interpol.h" #include "alloc.h" #include "axis.h" #include "contour.h" #include "graphics.h" #include "misc.h" #include "plot2d.h" /* #include "setshow.h" */ #include "util.h" /* in order to support multiple axes, and to simplify ranging in * parametric plots, we use arrays to store some things. For 2d plots, * elements are z=0,y1=1,x1=2,z2=4,y2=5,x2=6 these are given symbolic * names in plot.h */ /* * IMHO, code is getting too cluttered with repeated chunks of * code. Some macros to simplify, I hope. */ /* store VALUE or log(VALUE) in STORE, set TYPE as appropriate Do * OUT_ACTION or UNDEF_ACTION as appropriate. Adjust range provided * type is INRANGE (ie dont adjust y if x is outrange). VALUE must not * be same as STORE */ /* FIXME 20010610: UNDEF_ACTION is completely unused ??? Furthermore, * this is so similar to STORE_WITH_LOG_AND_UPDATE_RANGE() from axis.h * that the two should probably be merged. */ #define STORE_AND_FIXUP_RANGE(store, value, type, min, max, auto, \ out_action, undef_action) \ do { \ store=value; \ if (type != INRANGE) \ break; /* don't set y range if x is outrange, for example */ \ if ((value) < (min)) { \ if ((auto) & AUTOSCALE_MIN) \ (min) = (value); \ else { \ (type) = OUTRANGE; \ out_action; \ break; \ } \ } \ if ((value) > (max)) { \ if ((auto) & AUTOSCALE_MAX) \ (max) = (value); \ else { \ (type) = OUTRANGE; \ out_action; \ } \ } \ } while(0) #define UPDATE_RANGE(TEST,OLD,NEW,AXIS) \ do { \ if (TEST) \ (OLD) = AXIS_DE_LOG_VALUE(AXIS,NEW); \ } while(0) #define spline_coeff_size 4 typedef double spline_coeff[spline_coeff_size]; typedef double five_diag[5]; static int next_curve __PROTO((struct curve_points * plot, int *curve_start)); static int num_curves __PROTO((struct curve_points * plot)); static void eval_kdensity __PROTO((struct curve_points *cp, int first_point, int num_points, double sr, coordval *px, coordval *py)); static void do_kdensity __PROTO((struct curve_points *cp, int first_point, int num_points, struct coordinate *dest)); static double *cp_binomial __PROTO((int points)); static void eval_bezier __PROTO((struct curve_points * cp, int first_point, int num_points, double sr, coordval * px, coordval *py, double *c)); static void do_bezier __PROTO((struct curve_points * cp, double *bc, int first_point, int num_points, struct coordinate * dest)); static int solve_five_diag __PROTO((five_diag m[], double r[], double x[], int n)); static spline_coeff *cp_approx_spline __PROTO((struct curve_points * plot, int first_point, int num_points)); static spline_coeff *cp_tridiag __PROTO((struct curve_points * plot, int first_point, int num_points)); static void do_cubic __PROTO((struct curve_points * plot, spline_coeff * sc, int first_point, int num_points, struct coordinate * dest)); static void do_freq __PROTO((struct curve_points *plot, int first_point, int num_points)); int compare_points __PROTO((SORTFUNC_ARGS p1, SORTFUNC_ARGS p2)); /* * position curve_start to index the next non-UNDEFINDED point, * start search at initial curve_start, * return number of non-UNDEFINDED points from there on, * if no more valid points are found, curve_start is set * to plot->p_count and 0 is returned */ static int next_curve(struct curve_points *plot, int *curve_start) { int curve_length; /* Skip undefined points */ while (*curve_start < plot->p_count && plot->points[*curve_start].type == UNDEFINED) { (*curve_start)++; }; curve_length = 0; /* curve_length is first used as an offset, then the correct # points */ while ((*curve_start) + curve_length < plot->p_count && plot->points[(*curve_start) + curve_length].type != UNDEFINED) { curve_length++; }; return (curve_length); } /* * determine the number of curves in plot->points, separated by * UNDEFINED points */ static int num_curves(struct curve_points *plot) { int curves; int first_point; int num_points; first_point = 0; curves = 0; while ((num_points = next_curve(plot, &first_point)) > 0) { curves++; first_point += num_points; } return (curves); } /* PKJ - May 2008 kdensity (short for Kernel Density) builds histograms using "Kernel Density Estimation" using Gaussian Kernels. Check: L. Wassermann: "All of Statistics" for example. The implementation is based closely on the implementation for Bezier curves, except for the way the actual interpolation is generated. */ /* eval_kdensity is a modification of eval_bezier */ static void eval_kdensity ( struct curve_points *cp, int first_point, /* where to start in plot->points (to find x-range) */ int num_points, /* to determine end in plot->points */ double sr, /* position inside curve, range [0:1] */ coordval *px, /* OUTPUT: x and y */ coordval *py ) { unsigned int i; unsigned int n = num_points - 1; struct coordinate GPHUGE *this_points = (cp->points) + first_point; double x, y, tmp; double avg, sigma; double min = DBL_MAX; double max = -DBL_MAX; double bandwidth, default_bandwidth; avg = 0.0; sigma = 0.0; for (i = 0; i <= n; i++) { avg += this_points[i].x; sigma += this_points[i].x * this_points[i].x; /* Find min and max of x-range. Necessary since points not sorted! */ min = this_points[i].x < min ? this_points[i].x : min; max = this_points[i].x > max ? this_points[i].x : max; } avg /= (double)num_points; sigma = sqrt( sigma/(double)num_points - avg*avg ); /* Standard Deviation */ /* This is the optimal bandwidth if the point distribution is Gaussian. (Applied Smoothing Techniques for Data Analysis by Adrian W, Bowman & Adelchi Azzalini (1997)) */ default_bandwidth = pow( 4.0/(3.0*num_points), 1.0/5.0 )*sigma; /* If the supplied bandwidth is zero of less, the default bandwidth is used. If only two columns have been specified in the using declaration, the value of the third column (z-value) is set to the value of '-1' in plot2d.c::get_data(). Therefore, a negative value of z indicates that the default bandwidth should be used. (I would prefer that a different magic value would be used to indicate a missing third column, so that we we could fail if the user supplies a negative bandwidth, but the -1 seems too deeply ingrained.) */ x = min + sr*(max-min); /* The current x-value */ y = 0; for (i = 0; i <= n; i++) { if ( this_points[i].z <= 0 ) { bandwidth = default_bandwidth; } else { bandwidth = this_points[i].z; } tmp = ( x - this_points[i].x )/bandwidth; y += this_points[i].y * exp( - 0.5*tmp*tmp ) / bandwidth; } y /= sqrt(2.0*M_PI); *px = x; *py = y; } /* do_kdensity is based on do_bezier, except for the call to eval_bezier */ static void do_kdensity( struct curve_points *cp, int first_point, /* where to start in plot->points */ int num_points, /* to determine end in plot->points */ struct coordinate *dest) /* where to put the interpolated data */ { int i; coordval x, y; /* min and max in internal (eg logged) co-ordinates. We update * these, then update the external extrema in user co-ordinates * at the end. */ double ixmin, ixmax, iymin, iymax; double sxmin, sxmax, symin, symax; /* starting values of above */ x_axis = cp->x_axis; y_axis = cp->y_axis; ixmin = sxmin = AXIS_LOG_VALUE(x_axis, X_AXIS.min); ixmax = sxmax = AXIS_LOG_VALUE(x_axis, X_AXIS.max); iymin = symin = AXIS_LOG_VALUE(y_axis, Y_AXIS.min); iymax = symax = AXIS_LOG_VALUE(y_axis, Y_AXIS.max); for (i = 0; i < samples_1; i++) { eval_kdensity( cp, first_point, num_points, (double) i / (double) (samples_1 - 1), &x, &y ); /* now we have to store the points and adjust the ranges */ dest[i].type = INRANGE; STORE_AND_FIXUP_RANGE( dest[i].x, x, dest[i].type, ixmin, ixmax, X_AXIS.autoscale, NOOP, continue); STORE_AND_FIXUP_RANGE( dest[i].y, y, dest[i].type, iymin, iymax, Y_AXIS.autoscale, NOOP, NOOP); dest[i].xlow = dest[i].xhigh = dest[i].x; dest[i].ylow = dest[i].yhigh = dest[i].y; dest[i].z = -1; } UPDATE_RANGE(ixmax > sxmax, X_AXIS.max, ixmax, x_axis); UPDATE_RANGE(ixmin < sxmin, X_AXIS.min, ixmin, x_axis); UPDATE_RANGE(iymax > symax, Y_AXIS.max, iymax, y_axis); UPDATE_RANGE(iymin < symin, Y_AXIS.min, iymin, y_axis); } /* * build up a cntr_struct list from curve_points * this funtion is only used for the alternate entry point to * Gershon's code and thus commented out ***deleted*** */ /* HBB 990205: rewrote the 'bezier' interpolation routine, * to prevent numerical overflow and other undesirable things happening * for large data files (num_data about 1000 or so), where binomial * coefficients would explode, and powers of 'sr' (0 < sr < 1) become * extremely small. Method used: compute logarithms of these * extremely large and small numbers, and only go back to the * real numbers once they've cancelled out each other, leaving * a reasonable-sized one. */ /* * cp_binomial() computes the binomial coefficients needed for BEZIER stuff * and stores them into an array which is hooked to sdat. * (MGR 1992) */ static double * cp_binomial(int points) { double *coeff; int n, k; int e; e = points; /* well we're going from k=0 to k=p_count-1 */ coeff = gp_alloc(e * sizeof(double), "bezier coefficients"); n = points - 1; e = n / 2; /* HBB 990205: calculate these in 'logarithmic space', * as they become _very_ large, with growing n (4^n) */ coeff[0] = 0.0; for (k = 0; k < e; k++) { coeff[k + 1] = coeff[k] + log(((double) (n - k)) / ((double) (k + 1))); } for (k = n; k >= e; k--) coeff[k] = coeff[n - k]; return (coeff); } /* This is a subfunction of do_bezier() for BEZIER style computations. * It is passed the stepration (STEP/MAXSTEPS) and the addresses of * the double values holding the next x and y coordinates. * (MGR 1992) */ static void eval_bezier( struct curve_points *cp, int first_point, /* where to start in plot->points (to find x-range) */ int num_points, /* to determine end in plot->points */ double sr, /* position inside curve, range [0:1] */ coordval *px, /* OUTPUT: x and y */ coordval *py, double *c) /* Bezier coefficient array */ { unsigned int n = num_points - 1; struct coordinate GPHUGE *this_points; this_points = (cp->points) + first_point; if (sr == 0.0) { *px = this_points[0].x; *py = this_points[0].y; } else if (sr == 1.0) { *px = this_points[n].x; *py = this_points[n].y; } else { /* HBB 990205: do calculation in 'logarithmic space', * to avoid over/underflow errors, which would exactly cancel * out each other, anyway, in an exact calculation */ unsigned int i; double lx = 0.0, ly = 0.0; double log_dsr_to_the_n = n * log(1 - sr); double log_sr_over_dsr = log(sr) - log(1 - sr); for (i = 0; i <= n; i++) { double u = exp(c[i] + log_dsr_to_the_n + i * log_sr_over_dsr); lx += this_points[i].x * u; ly += this_points[i].y * u; } *px = lx; *py = ly; } } /* * generate a new set of coordinates representing the bezier curve and * set it to the plot */ static void do_bezier( struct curve_points *cp, double *bc, /* Bezier coefficient array */ int first_point, /* where to start in plot->points */ int num_points, /* to determine end in plot->points */ struct coordinate *dest) /* where to put the interpolated data */ { int i; coordval x, y; /* min and max in internal (eg logged) co-ordinates. We update * these, then update the external extrema in user co-ordinates * at the end. */ double ixmin, ixmax, iymin, iymax; double sxmin, sxmax, symin, symax; /* starting values of above */ x_axis = cp->x_axis; y_axis = cp->y_axis; ixmin = sxmin = AXIS_LOG_VALUE(x_axis, X_AXIS.min); ixmax = sxmax = AXIS_LOG_VALUE(x_axis, X_AXIS.max); iymin = symin = AXIS_LOG_VALUE(y_axis, Y_AXIS.min); iymax = symax = AXIS_LOG_VALUE(y_axis, Y_AXIS.max); for (i = 0; i < samples_1; i++) { eval_bezier(cp, first_point, num_points, (double) i / (double) (samples_1 - 1), &x, &y, bc); /* now we have to store the points and adjust the ranges */ dest[i].type = INRANGE; STORE_AND_FIXUP_RANGE(dest[i].x, x, dest[i].type, ixmin, ixmax, X_AXIS.autoscale, NOOP, continue); STORE_AND_FIXUP_RANGE(dest[i].y, y, dest[i].type, iymin, iymax, Y_AXIS.autoscale, NOOP, NOOP); dest[i].xlow = dest[i].xhigh = dest[i].x; dest[i].ylow = dest[i].yhigh = dest[i].y; dest[i].z = -1; } UPDATE_RANGE(ixmax > sxmax, X_AXIS.max, ixmax, x_axis); UPDATE_RANGE(ixmin < sxmin, X_AXIS.min, ixmin, x_axis); UPDATE_RANGE(iymax > symax, Y_AXIS.max, iymax, y_axis); UPDATE_RANGE(iymin < symin, Y_AXIS.min, iymin, y_axis); } /* * call contouring routines -- main entry */ /* * it should be like this, but it doesn't run. If you find out why, * contact me: mgr@asgard.bo.open.de or Lars Hanke 2:243/4802.22@fidonet * * Well, all this had originally been inside contour.c, so maybe links * to functions and of contour.c are broken. * ***deleted*** * end of unused entry point to Gershon's code * */ /* * Solve five diagonal linear system equation. The five diagonal matrix is * defined via matrix M, right side is r, and solution X i.e. M * X = R. * Size of system given in n. Return TRUE if solution exist. * G. Engeln-Muellges/ F.Reutter: * "Formelsammlung zur Numerischen Mathematik mit Standard-FORTRAN-Programmen" * ISBN 3-411-01677-9 * * / m02 m03 m04 0 0 0 0 . . . \ / x0 \ / r0 \ * I m11 m12 m13 m14 0 0 0 . . . I I x1 I I r1 I * I m20 m21 m22 m23 m24 0 0 . . . I * I x2 I = I r2 I * I 0 m30 m31 m32 m33 m34 0 . . . I I x3 I I r3 I * . . . . . . . . . . . . * \ m(n-3)0 m(n-2)1 m(n-1)2 / \x(n-1)/ \r(n-1)/ * */ static int solve_five_diag(five_diag m[], double r[], double x[], int n) { int i; five_diag *hv; hv = gp_alloc((n + 1) * sizeof(five_diag), "five_diag help vars"); hv[0][0] = m[0][2]; if (hv[0][0] == 0) { free(hv); return FALSE; } hv[0][1] = m[0][3] / hv[0][0]; hv[0][2] = m[0][4] / hv[0][0]; hv[1][3] = m[1][1]; hv[1][0] = m[1][2] - hv[1][3] * hv[0][1]; if (hv[1][0] == 0) { free(hv); return FALSE; } hv[1][1] = (m[1][3] - hv[1][3] * hv[0][2]) / hv[1][0]; hv[1][2] = m[1][4] / hv[1][0]; for (i = 2; i < n; i++) { hv[i][3] = m[i][1] - m[i][0] * hv[i - 2][1]; hv[i][0] = m[i][2] - m[i][0] * hv[i - 2][2] - hv[i][3] * hv[i - 1][1]; if (hv[i][0] == 0) { free(hv); return FALSE; } hv[i][1] = (m[i][3] - hv[i][3] * hv[i - 1][2]) / hv[i][0]; hv[i][2] = m[i][4] / hv[i][0]; } hv[0][4] = 0; hv[1][4] = r[0] / hv[0][0]; for (i = 1; i < n; i++) { hv[i + 1][4] = (r[i] - m[i][0] * hv[i - 1][4] - hv[i][3] * hv[i][4]) / hv[i][0]; } x[n - 1] = hv[n][4]; x[n - 2] = hv[n - 1][4] - hv[n - 2][1] * x[n - 1]; for (i = n - 3; i >= 0; i--) x[i] = hv[i + 1][4] - hv[i][1] * x[i + 1] - hv[i][2] * x[i + 2]; free(hv); return TRUE; } /* * Calculation of approximation cubic splines * Input: x[i], y[i], weights z[i] * * Returns matrix of spline coefficients */ static spline_coeff * cp_approx_spline( struct curve_points *plot, int first_point, /* where to start in plot->points */ int num_points) /* to determine end in plot->points */ { spline_coeff *sc; five_diag *m; double *r, *x, *h, *xp, *yp; struct coordinate GPHUGE *this_points; int i; x_axis = plot->x_axis; y_axis = plot->y_axis; sc = gp_alloc((num_points) * sizeof(spline_coeff), "spline matrix"); if (num_points < 4) int_error(plot->token, "Can't calculate approximation splines, need at least 4 points"); this_points = (plot->points) + first_point; for (i = 0; i < num_points; i++) if (this_points[i].z <= 0) int_error(plot->token, "Can't calculate approximation splines, all weights have to be > 0"); m = gp_alloc((num_points - 2) * sizeof(five_diag), "spline help matrix"); r = gp_alloc((num_points - 2) * sizeof(double), "spline right side"); x = gp_alloc((num_points - 2) * sizeof(double), "spline solution vector"); h = gp_alloc((num_points - 1) * sizeof(double), "spline help vector"); xp = gp_alloc((num_points) * sizeof(double), "x pos"); yp = gp_alloc((num_points) * sizeof(double), "y pos"); /* KB 981107: With logarithmic axis first convert back to linear scale */ xp[0] = AXIS_DE_LOG_VALUE(x_axis, this_points[0].x); yp[0] = AXIS_DE_LOG_VALUE(y_axis, this_points[0].y); for (i = 1; i < num_points; i++) { xp[i] = AXIS_DE_LOG_VALUE(x_axis, this_points[i].x); yp[i] = AXIS_DE_LOG_VALUE(y_axis, this_points[i].y); h[i - 1] = xp[i] - xp[i - 1]; } /* set up the matrix and the vector */ for (i = 0; i <= num_points - 3; i++) { r[i] = 3 * ((yp[i + 2] - yp[i + 1]) / h[i + 1] - (yp[i + 1] - yp[i]) / h[i]); if (i < 2) m[i][0] = 0; else m[i][0] = 6 / this_points[i].z / h[i - 1] / h[i]; if (i < 1) m[i][1] = 0; else m[i][1] = h[i] - 6 / this_points[i].z / h[i] * (1 / h[i - 1] + 1 / h[i]) - 6 / this_points[i + 1].z / h[i] * (1 / h[i] + 1 / h[i + 1]); m[i][2] = 2 * (h[i] + h[i + 1]) + 6 / this_points[i].z / h[i] / h[i] + 6 / this_points[i + 1].z * (1 / h[i] + 1 / h[i + 1]) * (1 / h[i] + 1 / h[i + 1]) + 6 / this_points[i + 2].z / h[i + 1] / h[i + 1]; if (i > num_points - 4) m[i][3] = 0; else m[i][3] = h[i + 1] - 6 / this_points[i + 1].z / h[i + 1] * (1 / h[i] + 1 / h[i + 1]) - 6 / this_points[i + 2].z / h[i + 1] * (1 / h[i + 1] + 1 / h[i + 2]); if (i > num_points - 5) m[i][4] = 0; else m[i][4] = 6 / this_points[i + 2].z / h[i + 1] / h[i + 2]; } /* solve the matrix */ if (!solve_five_diag(m, r, x, num_points - 2)) { free(h); free(x); free(r); free(m); free(xp); free(yp); int_error(plot->token, "Can't calculate approximation splines"); } sc[0][2] = 0; for (i = 1; i <= num_points - 2; i++) sc[i][2] = x[i - 1]; sc[num_points - 1][2] = 0; sc[0][0] = yp[0] + 2 / this_points[0].z / h[0] * (sc[0][2] - sc[1][2]); for (i = 1; i <= num_points - 2; i++) sc[i][0] = yp[i] - 2 / this_points[i].z * (sc[i - 1][2] / h[i - 1] - sc[i][2] * (1 / h[i - 1] + 1 / h[i]) + sc[i + 1][2] / h[i]); sc[num_points - 1][0] = yp[num_points - 1] - 2 / this_points[num_points - 1].z / h[num_points - 2] * (sc[num_points - 2][2] - sc[num_points - 1][2]); for (i = 0; i <= num_points - 2; i++) { sc[i][1] = (sc[i + 1][0] - sc[i][0]) / h[i] - h[i] / 3 * (sc[i + 1][2] + 2 * sc[i][2]); sc[i][3] = (sc[i + 1][2] - sc[i][2]) / 3 / h[i]; } free(h); free(x); free(r); free(m); free(xp); free(yp); return (sc); } /* * Calculation of cubic splines * * This can be treated as a special case of approximation cubic splines, with * all weights -> infinity. * * Returns matrix of spline coefficients */ static spline_coeff * cp_tridiag(struct curve_points *plot, int first_point, int num_points) { spline_coeff *sc; tri_diag *m; double *r, *x, *h, *xp, *yp; struct coordinate GPHUGE *this_points; int i; x_axis = plot->x_axis; y_axis = plot->y_axis; if (num_points < 3) int_error(plot->token, "Can't calculate splines, need at least 3 points"); this_points = (plot->points) + first_point; sc = gp_alloc((num_points) * sizeof(spline_coeff), "spline matrix"); m = gp_alloc((num_points - 2) * sizeof(tri_diag), "spline help matrix"); r = gp_alloc((num_points - 2) * sizeof(double), "spline right side"); x = gp_alloc((num_points - 2) * sizeof(double), "spline solution vector"); h = gp_alloc((num_points - 1) * sizeof(double), "spline help vector"); xp = gp_alloc((num_points) * sizeof(double), "x pos"); yp = gp_alloc((num_points) * sizeof(double), "y pos"); /* KB 981107: With logarithmic axis first convert back to linear scale */ xp[0] = AXIS_DE_LOG_VALUE(x_axis,this_points[0].x); yp[0] = AXIS_DE_LOG_VALUE(y_axis,this_points[0].y); for (i = 1; i < num_points; i++) { xp[i] = AXIS_DE_LOG_VALUE(x_axis,this_points[i].x); yp[i] = AXIS_DE_LOG_VALUE(y_axis,this_points[i].y); h[i - 1] = xp[i] - xp[i - 1]; } /* set up the matrix and the vector */ for (i = 0; i <= num_points - 3; i++) { r[i] = 3 * ((yp[i + 2] - yp[i + 1]) / h[i + 1] - (yp[i + 1] - yp[i]) / h[i]); if (i < 1) m[i][0] = 0; else m[i][0] = h[i]; m[i][1] = 2 * (h[i] + h[i + 1]); if (i > num_points - 4) m[i][2] = 0; else m[i][2] = h[i + 1]; } /* solve the matrix */ if (!solve_tri_diag(m, r, x, num_points - 2)) { free(h); free(x); free(r); free(m); free(xp); free(yp); int_error(plot->token, "Can't calculate cubic splines"); } sc[0][2] = 0; for (i = 1; i <= num_points - 2; i++) sc[i][2] = x[i - 1]; sc[num_points - 1][2] = 0; for (i = 0; i <= num_points - 1; i++) sc[i][0] = yp[i]; for (i = 0; i <= num_points - 2; i++) { sc[i][1] = (sc[i + 1][0] - sc[i][0]) / h[i] - h[i] / 3 * (sc[i + 1][2] + 2 * sc[i][2]); sc[i][3] = (sc[i + 1][2] - sc[i][2]) / 3 / h[i]; } free(h); free(x); free(r); free(m); free(xp); free(yp); return (sc); } static void do_cubic( struct curve_points *plot, /* still containes old plot->points */ spline_coeff *sc, /* generated by cp_tridiag */ int first_point, /* where to start in plot->points */ int num_points, /* to determine end in plot->points */ struct coordinate *dest) /* where to put the interpolated data */ { double xdiff, temp, x, y; double xstart, xend; /* Endpoints of the sampled x range */ int i, l; struct coordinate GPHUGE *this_points; /* min and max in internal (eg logged) co-ordinates. We update * these, then update the external extrema in user co-ordinates * at the end. */ double ixmin, ixmax, iymin, iymax; double sxmin, sxmax, symin, symax; /* starting values of above */ x_axis = plot->x_axis; y_axis = plot->y_axis; ixmin = sxmin = AXIS_LOG_VALUE(x_axis, X_AXIS.min); ixmax = sxmax = AXIS_LOG_VALUE(x_axis, X_AXIS.max); iymin = symin = AXIS_LOG_VALUE(y_axis, Y_AXIS.min); iymax = symax = AXIS_LOG_VALUE(y_axis, Y_AXIS.max); this_points = (plot->points) + first_point; l = 0; /* HBB 20010727: Sample only across the actual x range, not the * full range of input data */ #if SAMPLE_CSPLINES_TO_FULL_RANGE xstart = this_points[0].x; xend = this_points[num_points - 1].x; #else xstart = GPMAX(this_points[0].x, sxmin); xend = GPMIN(this_points[num_points - 1].x, sxmax); if (xstart >= xend) int_error(plot->token, "Cannot smooth: no data within fixed xrange!"); #endif xdiff = (xend - xstart) / (samples_1 - 1); for (i = 0; i < samples_1; i++) { x = xstart + i * xdiff; /* Move forward to the spline interval this point is in */ while ((x >= this_points[l + 1].x) && (l < num_points - 2)) l++; /* KB 981107: With logarithmic x axis the values were * converted back to linear scale before calculating the * coefficients. Use exponential for log x values. */ temp = AXIS_DE_LOG_VALUE(x_axis, x) - AXIS_DE_LOG_VALUE(x_axis, this_points[l].x); /* Evaluate cubic spline polynomial */ y = ((sc[l][3] * temp + sc[l][2]) * temp + sc[l][1]) * temp + sc[l][0]; /* With logarithmic y axis, we need to convert from linear to * log scale now. */ if (Y_AXIS.log) { if (y > 0.) y = AXIS_DO_LOG(y_axis, y); else y = symin - (symax - symin); } dest[i].type = INRANGE; STORE_AND_FIXUP_RANGE(dest[i].x, x, dest[i].type, ixmin, ixmax, X_AXIS.autoscale, NOOP, continue); STORE_AND_FIXUP_RANGE(dest[i].y, y, dest[i].type, iymin, iymax, Y_AXIS.autoscale, NOOP, NOOP); dest[i].xlow = dest[i].xhigh = dest[i].x; dest[i].ylow = dest[i].yhigh = dest[i].y; dest[i].z = -1; } UPDATE_RANGE(ixmax > sxmax, X_AXIS.max, ixmax, x_axis); UPDATE_RANGE(ixmin < sxmin, X_AXIS.min, ixmin, x_axis); UPDATE_RANGE(iymax > symax, Y_AXIS.max, iymax, y_axis); UPDATE_RANGE(iymin < symin, Y_AXIS.min, iymin, y_axis); } /* * do_freq() is like the other smoothers only in that it * needs to adjust the plot ranges. We don't have to copy * approximated curves or anything like that. */ static void do_freq( struct curve_points *plot, /* still contains old plot->points */ int first_point, /* where to start in plot->points */ int num_points) /* to determine end in plot->points */ { double x, y; int i; int x_axis = plot->x_axis; int y_axis = plot->y_axis; struct coordinate GPHUGE *this; /* min and max in internal (eg logged) co-ordinates. We update * these, then update the external extrema in user co-ordinates * at the end. */ double ixmin, ixmax, iymin, iymax; double sxmin, sxmax, symin, symax; /* starting values of above */ ixmin = sxmin = AXIS_LOG_VALUE(x_axis, X_AXIS.min); ixmax = sxmax = AXIS_LOG_VALUE(x_axis, X_AXIS.max); iymin = symin = AXIS_LOG_VALUE(y_axis, Y_AXIS.min); iymax = symax = AXIS_LOG_VALUE(y_axis, Y_AXIS.max); this = (plot->points) + first_point; for (i=0; i<num_points; i++) { x = this[i].x; y = this[i].y; this[i].type = INRANGE; STORE_AND_FIXUP_RANGE(this[i].x, x, this[i].type, ixmin, ixmax, X_AXIS.autoscale, NOOP, continue); STORE_AND_FIXUP_RANGE(this[i].y, y, this[i].type, iymin, iymax, Y_AXIS.autoscale, NOOP, NOOP); this[i].xlow = this[i].xhigh = this[i].x; this[i].ylow = this[i].yhigh = this[i].y; this[i].z = -1; } UPDATE_RANGE(ixmax > sxmax, X_AXIS.max, ixmax, x_axis); UPDATE_RANGE(ixmin < sxmin, X_AXIS.min, ixmin, x_axis); UPDATE_RANGE(iymax > symax, Y_AXIS.max, iymax, y_axis); UPDATE_RANGE(iymin < symin, Y_AXIS.min, iymin, y_axis); } /* * Frequency plots have don't need new points allocated; we just need * to adjust the plot ranges. Wedging this into gen_interp() would * make that code even harder to read. */ void gen_interp_frequency(struct curve_points *plot) { int i, j, curves; int first_point, num_points; double y, y_total; curves = num_curves(plot); if (plot->plot_smooth == SMOOTH_CUMULATIVE_NORMALISED) { y_total = 0.0; first_point = 0; for (i = 0; i < curves; i++) { num_points = next_curve(plot, &first_point); for (j = first_point; j < first_point + num_points; j++) { if (plot->points[j].type == UNDEFINED) continue; y_total += plot->points[j].y; } first_point += num_points + 1; } } first_point = 0; for (i = 0; i < curves; i++) { num_points = next_curve(plot, &first_point); /* If cumulative, replace the current y-value with the sum of all previous y-values. This assumes that the data has already been sorted by x-values. */ if( plot->plot_smooth == SMOOTH_CUMULATIVE ) { y = 0; for (j = first_point; j < first_point + num_points; j++) { if (plot->points[j].type == UNDEFINED) continue; y += plot->points[j].y; plot->points[j].y = y; } } /* Alternatively, cumulative normalised means replace the current y-value with the sum of all previous y-values divided by the total sum of all values. This assumes the data is sorted as before. Normalising in this way allows comparison of the CDF of data sets with differing total numbers of samples. */ if (plot->plot_smooth == SMOOTH_CUMULATIVE_NORMALISED) { y = 0; for (j = first_point; j < first_point + num_points; j++) { if (plot->points[j].type == UNDEFINED) continue; y += plot->points[j].y; plot->points[j].y = y / y_total; } } do_freq(plot, first_point, num_points); first_point += num_points + 1; } return; } /* * This is the main entry point used for everything except frequencies. * As stated in the header, it is fine, but I'm not too happy with it. */ void gen_interp(struct curve_points *plot) { spline_coeff *sc; double *bc; struct coordinate *new_points; int i, curves; int first_point, num_points; curves = num_curves(plot); new_points = gp_alloc((samples_1 + 1) * curves * sizeof(struct coordinate), "interpolation table"); first_point = 0; for (i = 0; i < curves; i++) { num_points = next_curve(plot, &first_point); switch (plot->plot_smooth) { case SMOOTH_CSPLINES: sc = cp_tridiag(plot, first_point, num_points); do_cubic(plot, sc, first_point, num_points, new_points + i * (samples_1 + 1)); free(sc); break; case SMOOTH_ACSPLINES: sc = cp_approx_spline(plot, first_point, num_points); do_cubic(plot, sc, first_point, num_points, new_points + i * (samples_1 + 1)); free(sc); break; case SMOOTH_BEZIER: case SMOOTH_SBEZIER: bc = cp_binomial(num_points); do_bezier(plot, bc, first_point, num_points, new_points + i * (samples_1 + 1)); free((char *) bc); break; case SMOOTH_KDENSITY: do_kdensity( plot, first_point, num_points, new_points + i * (samples_1 + 1)); break; default: /* keep gcc -Wall quiet */ ; } new_points[(i + 1) * (samples_1 + 1) - 1].type = UNDEFINED; first_point += num_points; } free(plot->points); plot->points = new_points; plot->p_max = curves * (samples_1 + 1); plot->p_count = plot->p_max - 1; return; } /* * sort_points * * sort data succession for further evaluation by plot_splines, etc. * This routine is mainly introduced for compilers *NOT* supporting the * UNIX qsort() routine. You can then easily replace it by more convenient * stuff for your compiler. * (MGR 1992) */ /* HBB 20010720: To avoid undefined behaviour that would be caused by * casting functions pointers around, changed arguments to what * qsort() *really* wants */ /* HBB 20010720: removed 'static' to avoid HP-sUX gcc bug */ int compare_points(SORTFUNC_ARGS arg1, SORTFUNC_ARGS arg2) { struct coordinate const *p1 = arg1; struct coordinate const *p2 = arg2; if (p1->x > p2->x) return (1); if (p1->x < p2->x) return (-1); return (0); } void sort_points(struct curve_points *plot) { int first_point, num_points; first_point = 0; while ((num_points = next_curve(plot, &first_point)) > 0) { /* Sort this set of points, does qsort handle 1 point correctly? */ /* HBB 20010720: removed casts -- they don't help a thing, but * may hide problems */ qsort(plot->points + first_point, num_points, sizeof(struct coordinate), compare_points); first_point += num_points; } return; } /* * cp_implode() if averaging is selected this function computes the new * entries and shortens the whole thing to the necessary * size * MGR Addendum */ void cp_implode(struct curve_points *cp) { int first_point, num_points; int i, j, k; double x = 0., y = 0., sux = 0., slx = 0., suy = 0., sly = 0.; double weight; /* used for acsplines */ TBOOLEAN all_inrange = FALSE; x_axis = cp->x_axis; y_axis = cp->y_axis; j = 0; first_point = 0; while ((num_points = next_curve(cp, &first_point)) > 0) { k = 0; for (i = first_point; i < first_point + num_points; i++) { /* HBB 20020801: don't try to use undefined datapoints */ if (cp->points[i].type == UNDEFINED) continue; if (!k) { x = cp->points[i].x; y = cp->points[i].y; sux = cp->points[i].xhigh; slx = cp->points[i].xlow; suy = cp->points[i].yhigh; sly = cp->points[i].ylow; weight = cp->points[i].z; all_inrange = (cp->points[i].type == INRANGE); k = 1; } else if (cp->points[i].x == x) { y += cp->points[i].y; sux += cp->points[i].xhigh; slx += cp->points[i].xlow; suy += cp->points[i].yhigh; sly += cp->points[i].ylow; weight += cp->points[i].z; if (cp->points[i].type != INRANGE) all_inrange = FALSE; k++; } else { cp->points[j].x = x; if ( cp->plot_smooth == SMOOTH_FREQUENCY || cp->plot_smooth == SMOOTH_CUMULATIVE || cp->plot_smooth == SMOOTH_CUMULATIVE_NORMALISED ) k = 1; cp->points[j].y = y /= (double) k; cp->points[j].xhigh = sux / (double) k; cp->points[j].xlow = slx / (double) k; cp->points[j].yhigh = suy / (double) k; cp->points[j].ylow = sly / (double) k; cp->points[j].z = weight / (double) k; /* HBB 20000405: I wanted to use STORE_AND_FIXUP_RANGE * here, but won't: it assumes we want to modify the * range, and that the range is given in 'input' * coordinates. For logarithmic axes, the overhead * would be larger than the possible gain, so write it * out explicitly, instead: * */ cp->points[j].type = INRANGE; if (! all_inrange) { if (X_AXIS.log) { if (x <= -VERYLARGE) { cp->points[j].type = OUTRANGE; goto is_outrange; } x = AXIS_UNDO_LOG(x_axis, x); } if (((x < X_AXIS.min) && !(X_AXIS.autoscale & AUTOSCALE_MIN)) || ((x > X_AXIS.max) && !(X_AXIS.autoscale & AUTOSCALE_MAX))) { cp->points[j].type = OUTRANGE; goto is_outrange; } if (Y_AXIS.log) { if (y <= -VERYLARGE) { cp->points[j].type = OUTRANGE; goto is_outrange; } y = AXIS_UNDO_LOG(y_axis, y); } if (((y < Y_AXIS.min) && !(Y_AXIS.autoscale & AUTOSCALE_MIN)) || ((y > Y_AXIS.max) && !(Y_AXIS.autoscale & AUTOSCALE_MAX))) cp->points[j].type = OUTRANGE; is_outrange: ; } /* if(! all inrange) */ j++; /* next valid entry */ k = 0; /* to read */ i--; /* from this (-> last after for(;;)) entry */ } /* else (same x position) */ } /* for(points in curve) */ if (k) { cp->points[j].x = x; if ( cp->plot_smooth == SMOOTH_FREQUENCY || cp->plot_smooth == SMOOTH_CUMULATIVE || cp->plot_smooth == SMOOTH_CUMULATIVE) k = 1; cp->points[j].y = y /= (double) k; cp->points[j].xhigh = sux / (double) k; cp->points[j].xlow = slx / (double) k; cp->points[j].yhigh = suy / (double) k; cp->points[j].ylow = sly / (double) k; cp->points[j].z = weight / (double) k; cp->points[j].type = INRANGE; if (! all_inrange) { if (X_AXIS.log) { if (x <= -VERYLARGE) { cp->points[j].type = OUTRANGE; goto is_outrange2; } x = AXIS_UNDO_LOG(x_axis, x); } if (((x < X_AXIS.min) && !(X_AXIS.autoscale & AUTOSCALE_MIN)) || ((x > X_AXIS.max) && !(X_AXIS.autoscale & AUTOSCALE_MAX))) { cp->points[j].type = OUTRANGE; goto is_outrange2; } if (Y_AXIS.log) { if (y <= -VERYLARGE) { cp->points[j].type = OUTRANGE; goto is_outrange2; } y = AXIS_UNDO_LOG(y_axis, y); } if (((y < Y_AXIS.min) && !(Y_AXIS.autoscale & AUTOSCALE_MIN)) || ((y > Y_AXIS.max) && !(Y_AXIS.autoscale & AUTOSCALE_MAX))) cp->points[j].type = OUTRANGE; is_outrange2: ; } j++; /* next valid entry */ } /* insert invalid point to separate curves */ if (j < cp->p_count) { cp->points[j].type = UNDEFINED; j++; } first_point += num_points; } /* end while */ cp->p_count = j; cp_extend(cp, j); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/readline.c������������������������������������������������������������������������0000644�0004711�0000144�00000100677�11630664241�012665� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: readline.c,v 1.58 2011/09/04 12:01:37 markisch Exp $"); } #endif /* GNUPLOT - readline.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Original Software: * Tom Tkacik * * Msdos port and some enhancements: * Gershon Elber and many others. * * Adapted to work with UTF-8 enconding. * Ethan A Merritt April 2011 */ #include <signal.h> #include "stdfn.h" #include "readline.h" #include "alloc.h" #include "gp_hist.h" #include "plot.h" #include "util.h" #include "term_api.h" #ifdef HAVE_WCHAR_H #include <wchar.h> #endif #if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) #if defined(HAVE_LIBEDITLINE) int #else static int #endif #if defined(HAVE_LIBEDITLINE) getc_wrapper(FILE* fp /* is NULL, supplied by libedit */) #else getc_wrapper(FILE* fp /* should be stdin, supplied by readline */) #endif { int c; while (1) { #ifdef USE_MOUSE if (term && term->waitforinput && interactive) { c = term->waitforinput(); } else #endif if (fp) c = getc(fp); else c = getchar(); /* HAVE_LIBEDITLINE */ if (c == EOF && errno == EINTR) continue; return c; } } #endif /* HAVE_LIBREADLINE || HAVE_LIBEDITLINE */ #if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) || defined(READLINE) char* readline_ipc(const char* prompt) { #if defined(PIPE_IPC) && defined(HAVE_LIBREADLINE) rl_getc_function = getc_wrapper; #endif return readline((const char*) prompt); } #endif /* HAVE_LIBREADLINE || HAVE_LIBEDITLINE || READLINE */ #if defined(READLINE) && !(defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE)) /* This is a small portable version of GNU's readline that does not require * any terminal capabilities except backspace and space overwrites a character. * It is not the BASH or GNU EMACS version of READLINE due to Copyleft * restrictions. * Configuration option: ./configure --with-readline=builtin */ /* NANO-EMACS line editing facility * printable characters print as themselves (insert not overwrite) * ^A moves to the beginning of the line * ^B moves back a single character * ^E moves to the end of the line * ^F moves forward a single character * ^K kills from current position to the end of line * ^P moves back through history * ^N moves forward through history * ^H deletes the previous character * ^D deletes the current character, or EOF if line is empty * ^L/^R redraw line in case it gets trashed * ^U kills the entire line * ^W deletes previous full or partial word * LF and CR return the entire line regardless of the cursor postition * DEL deletes previous or current character (configuration dependent) * EOF with an empty line returns (char *)NULL * * all other characters are ignored */ #ifdef HAVE_SYS_IOCTL_H /* For ioctl() prototype under Linux (and BeOS?) */ # include <sys/ioctl.h> #endif /* replaces the previous klugde in configure */ #if defined(HAVE_TERMIOS_H) && defined(HAVE_TCGETATTR) # define TERMIOS #else /* not HAVE_TERMIOS_H && HAVE_TCGETATTR */ # ifdef HAVE_SGTTY_H # define SGTTY # endif #endif /* not HAVE_TERMIOS_H && HAVE_TCGETATTR */ #if !defined(MSDOS) && !defined(_Windows) /* * Set up structures using the proper include file */ # if defined(_IBMR2) || defined(alliant) # define SGTTY # endif /* submitted by Francois.Dagorn@cicb.fr */ # ifdef SGTTY # include <sgtty.h> static struct sgttyb orig_termio, rl_termio; /* define terminal control characters */ static struct tchars s_tchars; # ifndef VERASE # define VERASE 0 # endif /* not VERASE */ # ifndef VEOF # define VEOF 1 # endif /* not VEOF */ # ifndef VKILL # define VKILL 2 # endif /* not VKILL */ # ifdef TIOCGLTC /* available only with the 'new' line discipline */ static struct ltchars s_ltchars; # ifndef VWERASE # define VWERASE 3 # endif /* not VWERASE */ # ifndef VREPRINT # define VREPRINT 4 # endif /* not VREPRINT */ # ifndef VSUSP # define VSUSP 5 # endif /* not VSUP */ # endif /* TIOCGLTC */ # ifndef NCCS # define NCCS 6 # endif /* not NCCS */ # else /* not SGTTY */ /* SIGTSTP defines job control * if there is job control then we need termios.h instead of termio.h * (Are there any systems with job control that use termio.h? I hope not.) */ # if defined(SIGTSTP) || defined(TERMIOS) # ifndef TERMIOS # define TERMIOS # endif /* not TERMIOS */ # include <termios.h> /* Added by Robert Eckardt, RobertE@beta.TP2.Ruhr-Uni-Bochum.de */ # ifdef ISC22 # ifndef ONOCR /* taken from sys/termio.h */ # define ONOCR 0000020 /* true at least for ISC 2.2 */ # endif /* not ONOCR */ # ifndef IUCLC # define IUCLC 0001000 # endif /* not IUCLC */ # endif /* ISC22 */ # if !defined(IUCLC) /* translate upper to lower case not supported */ # define IUCLC 0 # endif /* not IUCLC */ static struct termios orig_termio, rl_termio; # else /* not SIGSTP || TERMIOS */ # include <termio.h> static struct termio orig_termio, rl_termio; /* termio defines NCC instead of NCCS */ # define NCCS NCC # endif /* not SIGTSTP || TERMIOS */ # endif /* SGTTY */ /* ULTRIX defines VRPRNT instead of VREPRINT */ # if defined(VRPRNT) && !defined(VREPRINT) # define VREPRINT VRPRNT # endif /* VRPRNT */ /* define characters to use with our input character handler */ static char term_chars[NCCS]; static int term_set = 0; /* =1 if rl_termio set */ #define special_getc() ansi_getc() static int ansi_getc __PROTO((void)); #define DEL_ERASES_CURRENT_CHAR #else /* MSDOS or _Windows */ # ifdef _Windows # include <windows.h> # include "win/wtext.h" # include "win/winmain.h" # define TEXTUSER 0xf1 # define TEXTGNUPLOT 0xf0 # ifdef WGP_CONSOLE # define special_getc() win_getch() static char win_getch __PROTO((void)); # else # define special_getc() msdos_getch() # endif /* WGP_CONSOLE */ static char msdos_getch __PROTO((void)); /* HBB 980308: PROTO'ed it */ # define DEL_ERASES_CURRENT_CHAR # endif /* _Windows */ # if defined(MSDOS) /* MSDOS specific stuff */ # ifdef DJGPP # include <pc.h> # endif /* DJGPP */ # if defined(__EMX__) || defined (__WATCOMC__) # include <conio.h> # endif /* __EMX__ */ # define special_getc() msdos_getch() static char msdos_getch(); # define DEL_ERASES_CURRENT_CHAR # endif /* MSDOS */ #endif /* MSDOS or _Windows */ #ifdef OS2 # if defined( special_getc ) # undef special_getc() # endif /* special_getc */ # define special_getc() os2_getch() static char msdos_getch __PROTO((void)); /* HBB 980308: PROTO'ed it */ static char os2_getch __PROTO((void)); # define DEL_ERASES_CURRENT_CHAR #endif /* OS2 */ /* initial size and increment of input line length */ #define MAXBUF 1024 #define BACKSPACE 0x08 /* ^H */ #define SPACE ' ' #define NEWLINE '\n' #define MAX_COMPLETIONS 50 static char *cur_line; /* current contents of the line */ static size_t line_len = 0; static size_t cur_pos = 0; /* current position of the cursor */ static size_t max_pos = 0; /* maximum character position */ static void fix_line __PROTO((void)); static void redraw_line __PROTO((const char *prompt)); static void clear_line __PROTO((const char *prompt)); static void clear_eoline __PROTO((const char *prompt)); static void delete_previous_word __PROTO((void)); static void copy_line __PROTO((char *line)); static void set_termio __PROTO((void)); static void reset_termio __PROTO((void)); static int user_putc __PROTO((int ch)); static int user_puts __PROTO((char *str)); static int backspace __PROTO((void)); static void extend_cur_line __PROTO((void)); static void step_forward __PROTO((void)); static void delete_forward __PROTO((void)); static void delete_backward __PROTO((void)); static int char_seqlen __PROTO((void)); #if defined(HAVE_DIRENT_H) || defined(WIN32) static char *fn_completion(size_t anchor_pos, int direction); static void tab_completion(TBOOLEAN forward); #endif /* user_putc and user_puts should be used in the place of * fputc(ch,stderr) and fputs(str,stderr) for all output * of user typed characters. This allows MS-Windows to * display user input in a different color. */ static int user_putc(int ch) { int rv; #ifdef _Windows #ifndef WGP_CONSOLE TextAttr(&textwin, TEXTUSER); #endif #endif rv = fputc(ch, stderr); #ifdef _Windows #ifndef WGP_CONSOLE TextAttr(&textwin, TEXTGNUPLOT); #endif #endif return rv; } static int user_puts(char *str) { int rv; #ifdef _Windows #ifndef WGP_CONSOLE TextAttr(&textwin, TEXTUSER); #endif #endif rv = fputs(str, stderr); #ifdef _Windows #ifndef WGP_CONSOLE TextAttr(&textwin, TEXTGNUPLOT); #endif #endif return rv; } /* EAM FIXME * This test is intended to determine if the current character, of which * we have only seen the first byte so far, will require twice the width * of an ascii character. The test catches glyphs above unicode 0x3000, * which is roughly the set of CJK characters. * It should be replaced with a more accurate test. */ static int mbwidth(char *c) { switch (encoding) { case S_ENC_UTF8: { #if defined(HAVE_WCHAR_H) && defined(HAVE_WCWIDTH) wchar_t wc; if (mbtowc(&wc, c, MB_CUR_MAX) < 0) return 1; else return wcwidth(wc); #else return ((unsigned char)(*c) >= 0xe3 ? 2 : 1); #endif } default: return 1; } } static int isdoublewidth(size_t pos) { return mbwidth(cur_line + pos) > 1; } /* * Determine length of multi-byte sequence starting at current position */ static int char_seqlen() { int i; switch (encoding) { case S_ENC_UTF8: i = cur_pos; do {i++;} while ((cur_line[i] & 0xc0) != 0xc0 && (cur_line[i] & 0x80) != 0 && i < max_pos); return (i - cur_pos); default: return 1; } } /* * Back up over one multi-byte UTF-8 character sequence immediately preceding * the current position. Non-destructive. Affects both cur_pos and screen cursor. */ static int backspace() { int seqlen; switch (encoding) { case S_ENC_UTF8: seqlen = 0; do {cur_pos--; seqlen++;} while ((cur_line[cur_pos] & 0xc0) != 0xc0 && (cur_line[cur_pos] & 0x80) != 0 && cur_pos > 0); if ((cur_line[cur_pos] & 0xc0) == 0xc0 || isprint(cur_line[cur_pos])) user_putc(BACKSPACE); if (isdoublewidth(cur_pos)) user_putc(BACKSPACE); return seqlen; default: cur_pos--; user_putc(BACKSPACE); return 1; } } /* * Step forward over one multi-byte character sequence. * We don't assume a non-destructive forward space, so we have * to redraw the character as we go. */ static void step_forward() { int i, seqlen; switch (encoding) { case S_ENC_UTF8: seqlen = char_seqlen(); for (i=0; i<seqlen; i++) user_putc(cur_line[cur_pos++]); break; default: user_putc(cur_line[cur_pos++]); break; } } /* * Delete the character we are on and collapse all subsequent characters back one */ static void delete_forward() { if (cur_pos < max_pos) { size_t i; int seqlen = char_seqlen(); max_pos -= seqlen; for (i = cur_pos; i < max_pos; i++) cur_line[i] = cur_line[i + seqlen]; cur_line[max_pos] = '\0'; fix_line(); } } /* * Delete the previous character and collapse all subsequent characters back one */ static void delete_backward() { if (cur_pos > 0) { size_t i; int seqlen = backspace(); max_pos -= seqlen; for (i = cur_pos; i < max_pos; i++) cur_line[i] = cur_line[i + seqlen]; cur_line[max_pos] = '\0'; fix_line(); } } static void extend_cur_line() { char *new_line; /* extent input line length */ new_line = gp_realloc(cur_line, line_len + MAXBUF, NULL); if (!new_line) { reset_termio(); int_error(NO_CARET, "Can't extend readline length"); } cur_line = new_line; line_len += MAXBUF; FPRINTF((stderr, "\nextending readline length to %d chars\n", line_len)); } #if defined(HAVE_DIRENT_H) || defined(WIN32) static char * fn_completion(size_t anchor_pos, int direction) { static char * completions[MAX_COMPLETIONS]; static int n_completions = 0; static int completion_idx = 0; if (direction == 0) { /* new completion */ DIR * dir; char * start, * path; char * t, * search; char * name = NULL; size_t nlen; if (n_completions != 0) { /* new completion, cleanup first */ int i; for (i = 0; i < n_completions; i++) free(completions[i]); memset(completions, 0, sizeof(completions)); n_completions = 0; completion_idx = 0; } /* extract path to complete */ start = cur_line + anchor_pos; if (anchor_pos > 0) { /* first, look for a quote to start the string */ for ( ; start > cur_line; start--) { if ((*start == '"') || (*start == '\'')) { start++; break; } } /* if not found, search for a space instead */ if (start == cur_line) { for (start = cur_line + anchor_pos ; start > cur_line; start--) { if ((*start == ' ') || (*start == '!')) { start++; break; } } } path = strndup(start, cur_line - start + anchor_pos); gp_expand_tilde(&path); } else { path = gp_strdup(""); } /* seperate directory and (partial) file directory name */ t = strrchr(path, DIRSEP1); #if DIRSEP2 != NUL if (t == NULL) t = strrchr(path, DIRSEP2); #endif if (t == NULL) { /* name... */ search = gp_strdup("."); name = strdup(path); } else if (t == path) { /* root dir: /name... */ search = strndup(path, 1); nlen = cur_pos - (t - path) - 1; name = strndup(t + 1, nlen); } else { /* normal case: dir/dir/name... */ search = strndup(path, t - path); nlen = cur_pos - (t - path) - 1; name = strndup(t + 1, nlen); } nlen = strlen(name); free(path); n_completions = 0; if ((dir = opendir(search))) { struct dirent * entry; while ((entry = readdir(dir)) != NULL) { /* ignore files and directories starting with a dot */ if (entry->d_name[0] == '.') continue; /* skip entries which don't match */ if (nlen > 0) if (strncmp(entry->d_name, name, nlen) != 0) continue; completions[n_completions] = gp_strdup(entry->d_name + nlen); n_completions++; /* limit number of completions */ if (n_completions == MAX_COMPLETIONS) break; } closedir(dir); free(search); if (name) free(name); if (n_completions > 0) return completions[0]; else return NULL; } free(search); if (name) free(name); } else { /* cycle trough previous results */ if (n_completions > 0) { if (direction > 0) completion_idx = (completion_idx + 1) % n_completions; else completion_idx = (completion_idx + n_completions - 1) % n_completions; return completions[completion_idx]; } else return NULL; } return NULL; } static void tab_completion(TBOOLEAN forward) { size_t i; char * completion; size_t completion_len; static size_t last_tab_pos = -1; static size_t last_completion_len = 0; int direction; /* detect tab cycling */ if ((last_tab_pos + last_completion_len) != cur_pos) { last_completion_len = 0; last_tab_pos = cur_pos; direction = 0; /* new completion */ } else { direction = (forward ? 1 : -1); } /* find completion */ completion = fn_completion(last_tab_pos, direction); if (!completion) return; /* make room for new completion */ completion_len = strlen(completion); if (completion_len > last_completion_len) while (max_pos + completion_len - last_completion_len + 1 > line_len) extend_cur_line(); /* erase from last_tab_pos to eol */ while (cur_pos > last_tab_pos) backspace(); while (cur_pos < max_pos) { user_putc(SPACE); if (isdoublewidth(cur_pos)) user_putc(SPACE); cur_pos += char_seqlen(); } /* rewind to last_tab_pos */ while (cur_pos > last_tab_pos) backspace(); /* insert completion string */ if (max_pos > (last_tab_pos - last_completion_len)) memmove(cur_line + last_tab_pos + completion_len, cur_line + last_tab_pos + last_completion_len, max_pos - last_tab_pos - last_completion_len); memcpy(cur_line + last_tab_pos, completion, completion_len); max_pos += completion_len - last_completion_len; cur_line[max_pos] = NUL; /* draw new completion */ for (i = 0; i < completion_len; i++) user_putc(cur_line[last_tab_pos+i]); cur_pos += completion_len; fix_line(); /* remember this completion */ last_tab_pos = cur_pos - completion_len; last_completion_len = completion_len; } #endif /* HAVE_DIRENT_H || WIN32 */ char * readline(const char *prompt) { int cur_char; char *new_line; /* start with a string of MAXBUF chars */ if (line_len != 0) { free(cur_line); line_len = 0; } cur_line = gp_alloc(MAXBUF, "readline"); line_len = MAXBUF; /* set the termio so we can do our own input processing */ set_termio(); /* print the prompt */ fputs(prompt, stderr); cur_line[0] = '\0'; cur_pos = 0; max_pos = 0; cur_entry = NULL; /* get characters */ for (;;) { cur_char = special_getc(); /* Accumulate ascii (7bit) printable characters * and all leading 8bit characters. */ if ((isprint(cur_char) || (((cur_char & 0x80) != 0) && (cur_char != EOF))) && (cur_char != 0x09) /* TAB is a printable character in some locales */ ) { size_t i; if (max_pos + 1 >= line_len) { extend_cur_line(); } for (i = max_pos; i > cur_pos; i--) { cur_line[i] = cur_line[i - 1]; } user_putc(cur_char); cur_line[cur_pos] = cur_char; cur_pos += 1; max_pos += 1; cur_line[max_pos] = '\0'; if (cur_pos < max_pos) { switch (encoding) { case S_ENC_UTF8: if ((cur_char & 0xc0) == 0) fix_line(); /* Normal ascii character */ else if ((cur_char & 0xc0) == 0xc0) ; /* start of a multibyte sequence. */ else if (((cur_char & 0xc0) == 0x80) && ((unsigned char)(cur_line[cur_pos-2]) >= 0xe0)) ; /* second byte of a >2 byte sequence */ else { /* Last char of multi-byte sequence */ fix_line(); } break; default: fix_line(); break; } } /* else interpret unix terminal driver characters */ #ifdef VERASE } else if (cur_char == term_chars[VERASE]) { /* ^H */ delete_backward(); #endif /* VERASE */ #ifdef VEOF } else if (cur_char == term_chars[VEOF]) { /* ^D? */ if (max_pos == 0) { reset_termio(); return ((char *) NULL); } delete_forward(); #endif /* VEOF */ #ifdef VKILL } else if (cur_char == term_chars[VKILL]) { /* ^U? */ clear_line(prompt); #endif /* VKILL */ #ifdef VWERASE } else if (cur_char == term_chars[VWERASE]) { /* ^W? */ delete_previous_word(); #endif /* VWERASE */ #ifdef VREPRINT } else if (cur_char == term_chars[VREPRINT]) { /* ^R? */ putc(NEWLINE, stderr); /* go to a fresh line */ redraw_line(prompt); #endif /* VREPRINT */ #ifdef VSUSP } else if (cur_char == term_chars[VSUSP]) { reset_termio(); kill(0, SIGTSTP); /* process stops here */ set_termio(); /* print the prompt */ redraw_line(prompt); #endif /* VSUSP */ } else { /* do normal editing commands */ /* some of these are also done above */ switch (cur_char) { case EOF: reset_termio(); return ((char *) NULL); case 001: /* ^A */ while (cur_pos > 0) backspace(); break; case 002: /* ^B */ if (cur_pos > 0) backspace(); break; case 005: /* ^E */ while (cur_pos < max_pos) { user_putc(cur_line[cur_pos]); cur_pos += 1; } break; case 006: /* ^F */ if (cur_pos < max_pos) { step_forward(); } break; #if defined(HAVE_DIRENT_H) || defined(WIN32) case 011: /* ^I / TAB */ tab_completion(TRUE); /* next tab completion */ break; #endif case 013: /* ^K */ clear_eoline(prompt); max_pos = cur_pos; break; case 020: /* ^P */ if (history != NULL) { if (cur_entry == NULL) { cur_entry = history; clear_line(prompt); copy_line(cur_entry->line); } else if (cur_entry->prev != NULL) { cur_entry = cur_entry->prev; clear_line(prompt); copy_line(cur_entry->line); } } break; case 016: /* ^N */ if (cur_entry != NULL) { cur_entry = cur_entry->next; clear_line(prompt); if (cur_entry != NULL) copy_line(cur_entry->line); else cur_pos = max_pos = 0; } break; case 014: /* ^L */ case 022: /* ^R */ putc(NEWLINE, stderr); /* go to a fresh line */ redraw_line(prompt); break; #ifndef DEL_ERASES_CURRENT_CHAR case 0177: /* DEL */ case 023: /* Re-mapped from CSI~3 in ansi_getc() */ #endif case 010: /* ^H */ delete_backward(); break; case 004: /* ^D */ if (max_pos == 0) { reset_termio(); return ((char *) NULL); } /* intentionally omitting break */ #ifdef DEL_ERASES_CURRENT_CHAR case 0177: /* DEL */ case 023: /* Re-mapped from CSI~3 in ansi_getc() */ #endif delete_forward(); break; case 025: /* ^U */ clear_line(prompt); break; case 027: /* ^W */ delete_previous_word(); break; case '\n': /* ^J */ case '\r': /* ^M */ cur_line[max_pos + 1] = '\0'; #ifdef OS2 while (cur_pos < max_pos) { user_putc(cur_line[cur_pos]); cur_pos += 1; } #endif putc(NEWLINE, stderr); /* Shrink the block down to fit the string ? * if the alloc fails, we still own block at cur_line, * but this shouldn't really fail. */ new_line = (char *) gp_realloc(cur_line, strlen(cur_line) + 1, "line resize"); if (new_line) cur_line = new_line; /* else we just hang on to what we had - it's not a problem */ line_len = 0; FPRINTF((stderr, "Resizing input line to %d chars\n", strlen(cur_line))); reset_termio(); return (cur_line); default: break; } } } } /* Fix up the line from cur_pos to max_pos. * Does not need any terminal capabilities except backspace, * and space overwrites a character */ static void fix_line() { size_t i; /* write tail of string */ for (i = cur_pos; i < max_pos; i++) user_putc(cur_line[i]); /* We may have just shortened the line by deleting a character. * Write a space at the end to over-print the former last character. * It needs 2 spaces in case the former character was double width. */ user_putc(SPACE); user_putc(SPACE); user_putc(BACKSPACE); user_putc(BACKSPACE); /* Back up to original position */ i = cur_pos; for (cur_pos = max_pos; cur_pos > i; ) backspace(); } /* redraw the entire line, putting the cursor where it belongs */ static void redraw_line(const char *prompt) { size_t i; fputs(prompt, stderr); user_puts(cur_line); /* put the cursor where it belongs */ i = cur_pos; for (cur_pos = max_pos; cur_pos > i; ) backspace(); } /* clear cur_line and the screen line */ static void clear_line(const char *prompt) { putc('\r', stderr); fputs(prompt, stderr); cur_pos = 0; while (cur_pos < max_pos) { user_putc(SPACE); if (isdoublewidth(cur_pos)) user_putc(SPACE); cur_pos += char_seqlen(); } while (max_pos > 0) cur_line[--max_pos] = '\0'; putc('\r', stderr); fputs(prompt, stderr); cur_pos = 0; } /* clear to end of line and the screen end of line */ static void clear_eoline(const char *prompt) { size_t save_pos = cur_pos; while (cur_pos < max_pos) { user_putc(SPACE); if (isdoublewidth(cur_line[cur_pos])) user_putc(SPACE); cur_pos += char_seqlen(); } cur_pos = save_pos; while (max_pos > cur_pos) cur_line[--max_pos] = '\0'; putc('\r', stderr); fputs(prompt, stderr); user_puts(cur_line); } /* delete the full or partial word immediately before cursor position */ static void delete_previous_word() { size_t save_pos = cur_pos; /* skip whitespace */ while ((cur_pos > 0) && (cur_line[cur_pos - 1] == SPACE)) { backspace(); } /* find start of previous word */ while ((cur_pos > 0) && (cur_line[cur_pos - 1] != SPACE)) { backspace(); } if (cur_pos != save_pos) { size_t new_cur_pos = cur_pos; size_t m = max_pos - save_pos; /* erase to eol */ while (cur_pos < max_pos) { user_putc(SPACE); if (isdoublewidth(cur_pos)) user_putc(SPACE); cur_pos += char_seqlen(); } while (cur_pos > new_cur_pos) backspace(); /* overwrite previous word with trailing characters */ memmove(cur_line + cur_pos, cur_line + save_pos, m); /* overwrite characters at end of string with NULs */ memset(cur_line + cur_pos + m, NUL, save_pos - cur_pos); /* update display and line length */ max_pos = cur_pos + m; fix_line(); } } /* copy line to cur_line, draw it and set cur_pos and max_pos */ static void copy_line(char *line) { while (strlen(line) + 1 > line_len) { extend_cur_line(); } strcpy(cur_line, line); user_puts(cur_line); cur_pos = max_pos = strlen(cur_line); } #if !defined(MSDOS) && !defined(_Windows) /* Convert ANSI arrow keys to control characters */ static int ansi_getc() { int c; #ifdef USE_MOUSE if (term && term->waitforinput && interactive) c = term->waitforinput(); else #endif c = getc(stdin); if (c == 033) { c = getc(stdin); /* check for CSI */ if (c == '[') { c = getc(stdin); /* get command character */ switch (c) { case 'D': /* left arrow key */ c = 002; break; case 'C': /* right arrow key */ c = 006; break; case 'A': /* up arrow key */ c = 020; break; case 'B': /* down arrow key */ c = 016; break; case 'F': /* end key */ c = 005; break; case 'H': /* home key */ c = 001; break; case '3': /* DEL can be <esc>[3~ */ getc(stdin); /* eat the ~ */ c = 023; /* DC3 ^S NB: non-standard!! */ } } } return c; } #endif #if defined(MSDOS) || defined(_Windows) || defined(OS2) #ifdef WGP_CONSOLE static char win_getch() { if (term && term->waitforinput) return term->waitforinput(); else return ConsoleGetch(); } #endif /* Convert Arrow keystrokes to Control characters: */ static char msdos_getch() { char c; #ifdef DJGPP int ch = getkey(); c = (ch & 0xff00) ? 0 : ch & 0xff; #elif defined (OS2) c = getc(stdin); #else /* not OS2, not DJGPP*/ # if defined (_Windows) && defined (USE_MOUSE) if (term && term->waitforinput && interactive) c = term->waitforinput(); else # endif /* not _Windows && not USE_MOUSE */ c = getch(); #endif /* not DJGPP, not OS2 */ if (c == 0) { #ifdef DJGPP c = ch & 0xff; #else /* not DJGPP */ # ifdef OS2 c = getc(stdin); # else /* not OS2 */ c = getch(); /* Get the extended code. */ # endif /* OS2 */ #endif /* not DJGPP */ switch (c) { case 75: /* Left Arrow. */ c = 002; break; case 77: /* Right Arrow. */ c = 006; break; case 72: /* Up Arrow. */ c = 020; break; case 80: /* Down Arrow. */ c = 016; break; case 115: /* Ctl Left Arrow. */ case 71: /* Home */ c = 001; break; case 116: /* Ctl Right Arrow. */ case 79: /* End */ c = 005; break; case 83: /* Delete */ c = 0177; break; default: c = 0; break; } } else if (c == 033) { /* ESC */ c = 025; } return c; } #endif /* MSDOS || _Windows || OS2 */ #ifdef OS2 /* We need to call different procedures, dependent on the session type: VIO/window or an (XFree86) xterm */ static char os2_getch() { static int IsXterm = 0; static int init = 0; if (!init) { if (getenv("WINDOWID")) { IsXterm = 1; } init = 1; } if (IsXterm) { return ansi_getc(); } else { return msdos_getch(); } } #endif /* OS2 */ /* set termio so we can do our own input processing */ static void set_termio() { #if !defined(MSDOS) && !defined(_Windows) /* set termio so we can do our own input processing */ /* and save the old terminal modes so we can reset them later */ if (term_set == 0) { /* * Get terminal modes. */ # ifdef SGTTY ioctl(0, TIOCGETP, &orig_termio); # else /* not SGTTY */ # ifdef TERMIOS # ifdef TCGETS ioctl(0, TCGETS, &orig_termio); # else /* not TCGETS */ tcgetattr(0, &orig_termio); # endif /* not TCGETS */ # else /* not TERMIOS */ ioctl(0, TCGETA, &orig_termio); # endif /* TERMIOS */ # endif /* not SGTTY */ /* * Save terminal modes */ rl_termio = orig_termio; /* * Set the modes to the way we want them * and save our input special characters */ # ifdef SGTTY rl_termio.sg_flags |= CBREAK; rl_termio.sg_flags &= ~(ECHO | XTABS); ioctl(0, TIOCSETN, &rl_termio); ioctl(0, TIOCGETC, &s_tchars); term_chars[VERASE] = orig_termio.sg_erase; term_chars[VEOF] = s_tchars.t_eofc; term_chars[VKILL] = orig_termio.sg_kill; # ifdef TIOCGLTC ioctl(0, TIOCGLTC, &s_ltchars); term_chars[VWERASE] = s_ltchars.t_werasc; term_chars[VREPRINT] = s_ltchars.t_rprntc; term_chars[VSUSP] = s_ltchars.t_suspc; /* disable suspending process on ^Z */ s_ltchars.t_suspc = 0; ioctl(0, TIOCSLTC, &s_ltchars); # endif /* TIOCGLTC */ # else /* not SGTTY */ rl_termio.c_iflag &= ~(BRKINT | PARMRK | INPCK | IUCLC | IXON | IXOFF); rl_termio.c_iflag |= (IGNBRK | IGNPAR); /* rl_termio.c_oflag &= ~(ONOCR); Costas Sphocleous Irvine,CA */ rl_termio.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHOK | ECHONL | NOFLSH); # ifdef OS2 /* for emx: remove default terminal processing */ rl_termio.c_lflag &= ~(IDEFAULT); # endif /* OS2 */ rl_termio.c_lflag |= (ISIG); rl_termio.c_cc[VMIN] = 1; rl_termio.c_cc[VTIME] = 0; # ifndef VWERASE # define VWERASE 3 # endif /* VWERASE */ term_chars[VERASE] = orig_termio.c_cc[VERASE]; term_chars[VEOF] = orig_termio.c_cc[VEOF]; term_chars[VKILL] = orig_termio.c_cc[VKILL]; # ifdef TERMIOS term_chars[VWERASE] = orig_termio.c_cc[VWERASE]; # ifdef VREPRINT term_chars[VREPRINT] = orig_termio.c_cc[VREPRINT]; # else /* not VREPRINT */ # ifdef VRPRNT term_chars[VRPRNT] = orig_termio.c_cc[VRPRNT]; # endif /* VRPRNT */ # endif /* not VREPRINT */ term_chars[VSUSP] = orig_termio.c_cc[VSUSP]; /* disable suspending process on ^Z */ rl_termio.c_cc[VSUSP] = 0; # endif /* TERMIOS */ # endif /* not SGTTY */ /* * Set the new terminal modes. */ # ifdef SGTTY ioctl(0, TIOCSLTC, &s_ltchars); # else /* not SGTTY */ # ifdef TERMIOS # ifdef TCSETSW ioctl(0, TCSETSW, &rl_termio); # else /* not TCSETSW */ tcsetattr(0, TCSADRAIN, &rl_termio); # endif /* not TCSETSW */ # else /* not TERMIOS */ ioctl(0, TCSETAW, &rl_termio); # endif /* not TERMIOS */ # endif /* not SGTTY */ term_set = 1; } #endif /* not MSDOS && not _Windows */ } static void reset_termio() { #if !defined(MSDOS) && !defined(_Windows) /* reset saved terminal modes */ if (term_set == 1) { # ifdef SGTTY ioctl(0, TIOCSETN, &orig_termio); # ifdef TIOCGLTC /* enable suspending process on ^Z */ s_ltchars.t_suspc = term_chars[VSUSP]; ioctl(0, TIOCSLTC, &s_ltchars); # endif /* TIOCGLTC */ # else /* not SGTTY */ # ifdef TERMIOS # ifdef TCSETSW ioctl(0, TCSETSW, &orig_termio); # else /* not TCSETSW */ tcsetattr(0, TCSADRAIN, &orig_termio); # endif /* not TCSETSW */ # else /* not TERMIOS */ ioctl(0, TCSETAW, &orig_termio); # endif /* TERMIOS */ # endif /* not SGTTY */ term_set = 0; } #endif /* not MSDOS && not _Windows */ } #endif /* READLINE && !(HAVE_LIBREADLINE || HAVE_LIBEDITLINE) */ �����������������������������������������������������������������gnuplot-4.6.4/src/command.c�������������������������������������������������������������������������0000644�0004711�0000144�00000237677�12173327736�012543� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: command.c,v 1.230.2.11 2013/07/22 22:19:10 sfeam Exp $"); } #endif /* GNUPLOT - command.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * Changes: * * Feb 5, 1992 Jack Veenstra (veenstra@cs.rochester.edu) Added support to * filter data values read from a file through a user-defined function before * plotting. The keyword "thru" was added to the "plot" command. Example * syntax: f(x) = x / 100 plot "test.data" thru f(x) This example divides all * the y values by 100 before plotting. The filter function processes the * data before any log-scaling occurs. This capability should be generalized * to filter x values as well and a similar feature should be added to the * "splot" command. * * 19 September 1992 Lawrence Crowl (crowl@cs.orst.edu) * Added user-specified bases for log scaling. * * April 1999 Franz Bakan (bakan@ukezyk.desy.de) * Added code to support mouse-input from OS/2 PM window * Changes marked by USE_MOUSE * * May 1999, update by Petr Mikulik * Use gnuplot's pid in shared mem name * * August 1999 Franz Bakan and Petr Mikulik * Encapsulating read_line into a thread, acting on input when thread or * gnupmdrv posts an event semaphore. Thus mousing works even when gnuplot * is used as a plotting device (commands passed via pipe). * * May 2011 Ethan A Merritt * Introduce block structure defined by { ... }, which may span multiple lines. * In order to have the entire block available at one time we now count * +/- curly brackets during input and keep extending the current input line * until the net count is zero. This is done in do_line() for interactive * input, and load_file() for non-interactive input. */ #include "command.h" #include "axis.h" #include "alloc.h" #include "eval.h" #include "fit.h" #include "binary.h" #include "datafile.h" #include "getcolor.h" #include "gp_hist.h" #include "gp_time.h" #include "misc.h" #include "parse.h" #include "plot.h" #include "plot2d.h" #include "plot3d.h" #include "readline.h" #include "save.h" #include "scanner.h" #include "setshow.h" #include "stats.h" #include "tables.h" #include "term_api.h" #include "util.h" #ifdef USE_MOUSE # include "mouse.h" int paused_for_mouse = 0; #endif #define PROMPT "gnuplot> " #ifdef OS2_IPC # define INCL_DOSMEMMGR # define INCL_DOSPROCESS # define INCL_DOSSEMAPHORES # include <os2.h> PVOID input_from_PM_Terminal = NULL; char mouseSharedMemName[40] = ""; HEV semInputReady = 0; /* semaphore to be created in plot.c */ int thread_rl_Running = 0; /* running status */ int thread_rl_RetCode = -1; /* return code from readline in a thread */ #endif /* OS2_IPC */ #ifndef _Windows # include "help.h" #else # ifdef USE_OWN_WINSYSTEM_FUNCTION static int winsystem __PROTO((const char *)); # endif #endif /* _Windows */ #ifdef _Windows # include <windows.h> # ifdef __MSC__ # include <malloc.h> # include <direct.h> /* getcwd() */ # else # include <alloc.h> # ifndef __WATCOMC__ # include <dir.h> /* setdisk() */ # endif # endif /* !MSC */ # ifdef WITH_HTML_HELP # include <htmlhelp.h> # endif # include "win/winmain.h" #endif /* _Windows */ #ifdef VMS int vms_vkid; /* Virtual keyboard id */ int vms_ktid; /* key table id, for translating keystrokes */ #endif /* VMS */ /* static prototypes */ static void command __PROTO((void)); static int changedir __PROTO((char *path)); static char* fgets_ipc __PROTO((char* dest, int len)); static char* gp_get_string __PROTO((char *, size_t, const char *)); static int read_line __PROTO((const char *prompt, int start)); static void do_system __PROTO((const char *)); static void test_palette_subcommand __PROTO((void)); static void test_time_subcommand __PROTO((void)); static int find_clause __PROTO((int *, int *)); #ifdef GP_MACROS TBOOLEAN expand_macros = FALSE; static int expand_1level_macros __PROTO((void)); #endif struct lexical_unit *token; int token_table_size; char *gp_input_line; size_t gp_input_line_len; int inline_num; /* input line number */ struct udft_entry *dummy_func; /* support for replot command */ char *replot_line; int plot_token; /* start of 'plot' command */ /* flag to disable `replot` when some data are sent through stdin; * used by mouse/hotkey capable terminals */ TBOOLEAN replot_disabled = FALSE; /* output file for the print command */ FILE *print_out = NULL; char *print_out_name = NULL; /* input data, parsing variables */ int num_tokens, c_token; int if_depth = 0; TBOOLEAN if_condition = FALSE; TBOOLEAN if_open_for_else = FALSE; static int clause_depth = 0; static int command_exit_status = 0; /* support for dynamic size of input line */ void extend_input_line() { if (gp_input_line_len == 0) { /* first time */ gp_input_line = gp_alloc(MAX_LINE_LEN, "gp_input_line"); gp_input_line_len = MAX_LINE_LEN; gp_input_line[0] = NUL; #ifdef OS2_IPC sprintf( mouseSharedMemName, "\\SHAREMEM\\GP%i_Mouse_Input", getpid() ); if (DosAllocSharedMem((PVOID) & input_from_PM_Terminal, mouseSharedMemName, MAX_LINE_LEN, PAG_WRITE | PAG_COMMIT)) fputs("command.c: DosAllocSharedMem ERROR\n",stderr); #endif /* OS2_IPC */ } else { gp_input_line = gp_realloc(gp_input_line, gp_input_line_len + MAX_LINE_LEN, "extend input line"); gp_input_line_len += MAX_LINE_LEN; FPRINTF((stderr, "extending input line to %d chars\n", gp_input_line_len)); } } /* constant by which token table grows */ #define MAX_TOKENS 400 void extend_token_table() { if (token_table_size == 0) { /* first time */ token = (struct lexical_unit *) gp_alloc(MAX_TOKENS * sizeof(struct lexical_unit), "token table"); token_table_size = MAX_TOKENS; /* HBB: for checker-runs: */ memset(token, 0, MAX_TOKENS * sizeof(*token)); } else { token = gp_realloc(token, (token_table_size + MAX_TOKENS) * sizeof(struct lexical_unit), "extend token table"); memset(token+token_table_size, 0, MAX_TOKENS * sizeof(*token)); token_table_size += MAX_TOKENS; FPRINTF((stderr, "extending token table to %d elements\n", token_table_size)); } } #ifdef OS2_IPC void thread_read_line() { thread_rl_Running = 1; thread_rl_RetCode = ( read_line(PROMPT, 0) ); thread_rl_Running = 0; DosPostEventSem(semInputReady); } #endif /* OS2_IPC */ int com_line() { #ifdef OS2_IPC static char *input_line_SharedMem = NULL; if (input_line_SharedMem == NULL) { /* get shared mem only once */ if (DosGetNamedSharedMem((PVOID) &input_line_SharedMem, mouseSharedMemName, PAG_WRITE | PAG_READ)) fputs("readline.c: DosGetNamedSharedMem ERROR\n", stderr); else *input_line_SharedMem = 0; } #endif /* OS2_IPC */ if (multiplot) { /* calls int_error() if it is not happy */ term_check_multiplot_okay(interactive); if (read_line("multiplot> ", 0)) return (1); } else { #if defined(OS2_IPC) && defined(USE_MOUSE) ULONG u; if (thread_rl_Running == 0) { int res = _beginthread(thread_read_line,NULL,32768,NULL); if (res == -1) fputs("error command.c could not begin thread\n",stderr); } /* wait until a line is read or gnupmdrv makes shared mem available */ DosWaitEventSem(semInputReady,SEM_INDEFINITE_WAIT); DosResetEventSem(semInputReady,&u); if (thread_rl_Running) { if (input_line_SharedMem == NULL || !*input_line_SharedMem) return (0); if (*input_line_SharedMem=='%') { do_event( (struct gp_event_t*)(input_line_SharedMem+1) ); /* pass terminal's event */ input_line_SharedMem[0] = 0; /* discard the whole command line */ thread_rl_RetCode = 0; return (0); } if (*input_line_SharedMem && strstr(input_line_SharedMem,"plot") != NULL && (strcmp(term->name,"pm") && strcmp(term->name,"x11"))) { /* avoid plotting if terminal is not PM or X11 */ fprintf(stderr,"\n\tCommand(s) ignored for other than PM and X11 terminals\a\n"); if (interactive) fputs(PROMPT,stderr); input_line_SharedMem[0] = 0; /* discard the whole command line */ return (0); } strcpy(gp_input_line, input_line_SharedMem); input_line_SharedMem[0] = 0; thread_rl_RetCode = 0; } if (thread_rl_RetCode) return (1); #else /* The normal case */ if (read_line(PROMPT, 0)) return (1); #endif /* defined(OS2_IPC) && defined(USE_MOUSE) */ } /* So we can flag any new output: if false at time of error, * we reprint the command line before printing caret. * TRUE for interactive terminals, since the command line is typed. * FALSE for non-terminal stdin, so command line is printed anyway. * (DFK 11/89) */ screen_ok = interactive; if (do_line()) return (1); else return (0); } int do_line() { /* Line continuation has already been handled by read_line() */ char *inlptr; /* Expand any string variables in the current input line */ string_expand_macros(); /* Skip leading whitespace */ inlptr = gp_input_line; while (isspace((unsigned char) *inlptr)) inlptr++; /* Strip off trailing comment */ FPRINTF((stderr,"doline( \"%s\" )\n", gp_input_line)); if (strchr(inlptr, '#')) { num_tokens = scanner(&gp_input_line, &gp_input_line_len); if (gp_input_line[token[num_tokens].start_index] == '#') gp_input_line[token[num_tokens].start_index] = NUL; } if (inlptr != gp_input_line) { /* If there was leading whitespace, copy the actual * command string to the front. use memmove() because * source and target may overlap */ memmove(gp_input_line, inlptr, strlen(inlptr)); /* Terminate resulting string */ gp_input_line[strlen(inlptr)] = NUL; } FPRINTF((stderr, " echo: \"%s\"\n", gp_input_line)); /* EAM May 2011 - This will not work in a bracketed clause. Should it? */ if (is_system(gp_input_line[0])) { do_system(gp_input_line + 1); return (0); } if_depth = 0; num_tokens = scanner(&gp_input_line, &gp_input_line_len); /* * Expand line if necessary to contain a complete bracketed clause {...} * Insert a ';' after current line and append the next input line. * NB: This may leave an "else" condition on the next line. */ if (curly_brace_count < 0) int_error(NO_CARET,"Unexpected }"); while (curly_brace_count > 0) { if (interactive || noinputfiles) { /* If we are really in interactive mode and there are unterminated blocks, * then we want to display a "more>" prompt to get the rest of the block. * However, there are two more cases that must be dealt here: * One is when commands are piped to gnuplot - on the command line, * the other is when commands are piped to gnuplot which is opened * as a slave process. The test for noinputfiles is for the latter case. * If we didn't have that test here, unterminated blocks sent via a pipe * would trigger the error message in the else branch below. */ int retval; strcat(gp_input_line,";"); retval = read_line("more> ", strlen(gp_input_line)); if (retval) int_error(NO_CARET, "Syntax error: missing block terminator }"); /* Expand any string variables in the current input line */ string_expand_macros(); num_tokens = scanner(&gp_input_line, &gp_input_line_len); if (gp_input_line[token[num_tokens].start_index] == '#') gp_input_line[token[num_tokens].start_index] = NUL; } else { /* Non-interactive mode here means that we got a string from -e. * Having curly_brace_count > 0 means that there are at least one * unterminated blocks in the string. * Likely user error, so we die with an error message. */ int_error(NO_CARET, "Syntax error: missing block terminator }"); } } c_token = 0; while (c_token < num_tokens) { command(); if (command_exit_status) { command_exit_status = 0; return 1; } if (c_token < num_tokens) { /* something after command */ if (equals(c_token, ";")) { c_token++; } else if (equals(c_token, "{")) { begin_clause(); } else if (equals(c_token, "}")) { end_clause(); } else int_error(c_token, "';' expected"); } } return (0); } void do_string(const char *s) { char *cmdline = gp_strdup(s); do_string_and_free(cmdline); } void do_string_and_free(char *cmdline) { #ifdef USE_MOUSE if (display_ipc_commands()) fprintf(stderr, "%s\n", cmdline); #endif lf_push(NULL, NULL, cmdline); /* save state for errors and recursion */ while (gp_input_line_len < strlen(cmdline) + 1) extend_input_line(); strcpy(gp_input_line, cmdline); screen_ok = FALSE; command_exit_status = do_line(); /* We don't know if screen_ok is appropriate so leave it FALSE. */ lf_pop(); } #ifdef USE_MOUSE void toggle_display_of_ipc_commands() { if (mouse_setting.verbose) mouse_setting.verbose = 0; else mouse_setting.verbose = 1; } int display_ipc_commands() { return mouse_setting.verbose; } void do_string_replot(const char *s) { do_string(s); #ifdef VOLATILE_REFRESH if (volatile_data && refresh_ok) { if (display_ipc_commands()) fprintf(stderr, "refresh\n"); refresh_request(); } else #endif if (!replot_disabled) replotrequest(); else int_warn(NO_CARET, "refresh not possible and replot is disabled"); } void restore_prompt() { if (interactive) { #if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) # if !defined(MISSING_RL_FORCED_UPDATE_DISPLAY) rl_forced_update_display(); # else rl_redisplay(); # endif #else fputs(PROMPT, stderr); fflush(stderr); #endif } } #endif /* USE_MOUSE */ void define() { int start_token; /* the 1st token in the function definition */ struct udvt_entry *udv; struct udft_entry *udf; struct value result; if (equals(c_token + 1, "(")) { /* function ! */ int dummy_num = 0; struct at_type *at_tmp; char save_dummy[MAX_NUM_VAR][MAX_ID_LEN+1]; memcpy(save_dummy, c_dummy_var, sizeof(save_dummy)); start_token = c_token; do { c_token += 2; /* skip to the next dummy */ copy_str(c_dummy_var[dummy_num++], c_token, MAX_ID_LEN); } while (equals(c_token + 1, ",") && (dummy_num < MAX_NUM_VAR)); if (equals(c_token + 1, ",")) int_error(c_token + 2, "function contains too many parameters"); c_token += 3; /* skip (, dummy, ) and = */ if (END_OF_COMMAND) int_error(c_token, "function definition expected"); udf = dummy_func = add_udf(start_token); udf->dummy_num = dummy_num; if ((at_tmp = perm_at()) == (struct at_type *) NULL) int_error(start_token, "not enough memory for function"); if (udf->at) /* already a dynamic a.t. there */ free_at(udf->at); /* so free it first */ udf->at = at_tmp; /* before re-assigning it. */ memcpy(c_dummy_var, save_dummy, sizeof(save_dummy)); m_capture(&(udf->definition), start_token, c_token - 1); dummy_func = NULL; /* dont let anyone else use our workspace */ /* Save function definition in a user-accessible variable */ if (1) { char *tmpnam = gp_alloc(8+strlen(udf->udf_name), "varname"); strcpy(tmpnam, "GPFUN_"); strcat(tmpnam, udf->udf_name); fill_gpval_string(tmpnam, udf->definition); free(tmpnam); } } else { /* variable ! */ char *varname = gp_input_line + token[c_token].start_index; if (!strncmp(varname, "GPVAL_", 6) || !strncmp(varname, "MOUSE_", 6)) int_error(c_token, "Cannot set internal variables GPVAL_ and MOUSE_"); start_token = c_token; c_token += 2; udv = add_udv(start_token); (void) const_express(&result); /* Prevents memory leak if the variable name is re-used */ if (!udv->udv_undef) gpfree_string(&udv->udv_value); udv->udv_value = result; udv->udv_undef = FALSE; } } void undefine_command() { char key[MAX_ID_LEN+1]; TBOOLEAN wildcard; c_token++; /* consume the command name */ while (!END_OF_COMMAND) { /* copy next var name into key */ copy_str(key, c_token, MAX_ID_LEN); /* Peek ahead - must do this, because a '*' is returned as a separate token, not as part of the 'key' */ wildcard = equals(c_token+1,"*"); if (wildcard) c_token++; /* ignore internal variables */ if (strncmp(key, "GPVAL_", 6) && strncmp(key, "MOUSE_", 6)) del_udv_by_name( key, wildcard ); c_token++; } } static void command() { int i; for (i = 0; i < MAX_NUM_VAR; i++) c_dummy_var[i][0] = NUL; /* no dummy variables */ if (is_definition(c_token)) define(); else (*lookup_ftable(&command_ftbl[0],c_token))(); return; } /* process the 'raise' or 'lower' command */ void raise_lower_command(int lower) { ++c_token; if (END_OF_COMMAND) { if (lower) { #ifdef OS2 pm_lower_terminal_window(); #endif #ifdef X11 x11_lower_terminal_group(); #endif #ifdef _Windows win_lower_terminal_group(); #endif #ifdef WXWIDGETS wxt_lower_terminal_group(); #endif } else { #ifdef OS2 pm_raise_terminal_window(); #endif #ifdef X11 x11_raise_terminal_group(); #endif #ifdef _Windows win_raise_terminal_group(); #endif #ifdef WXWIDGETS wxt_raise_terminal_group(); #endif } return; } else { int number; int negative = equals(c_token, "-"); if (negative || equals(c_token, "+")) c_token++; if (!END_OF_COMMAND && isanumber(c_token)) { number = real_expression(); if (negative) number = -number; if (lower) { #ifdef OS2 pm_lower_terminal_window(); #endif #ifdef X11 x11_lower_terminal_window(number); #endif #ifdef _Windows win_lower_terminal_window(number); #endif #ifdef WXWIDGETS wxt_lower_terminal_window(number); #endif } else { #ifdef OS2 pm_raise_terminal_window(); #endif #ifdef X11 x11_raise_terminal_window(number); #endif #ifdef _Windows win_raise_terminal_window(number); #endif #ifdef WXWIDGETS wxt_raise_terminal_window(number); #endif } ++c_token; return; } } if (lower) int_error(c_token, "usage: lower {plot_id}"); else int_error(c_token, "usage: raise {plot_id}"); } void raise_command(void) { raise_lower_command(0); } void lower_command(void) { raise_lower_command(1); } #ifdef USE_MOUSE #define WHITE_AFTER_TOKEN(x) \ (' ' == gp_input_line[token[x].start_index + token[x].length] \ || '\t' == gp_input_line[token[x].start_index + token[x].length] \ || '\0' == gp_input_line[token[x].start_index + token[x].length]) /* process the 'bind' command */ void bind_command() { char* lhs = (char*) 0; char* rhs = (char*) 0; TBOOLEAN allwindows = FALSE; ++c_token; if (!END_OF_COMMAND && equals(c_token,"!")) { bind_remove_all(); ++c_token; return; } if (!END_OF_COMMAND && almost_equals(c_token,"all$windows")) { allwindows = TRUE; c_token++; } /* get left hand side: the key or key sequence */ if (!END_OF_COMMAND) { char* first = gp_input_line + token[c_token].start_index; int size = (int) (strchr(first, ' ') - first); if (size < 0) { size = (int) (strchr(first, '\0') - first); } if (size < 0) { fprintf(stderr, "(bind_command) %s:%d\n", __FILE__, __LINE__); return; } lhs = (char*) gp_alloc(size + 1, "bind_command->lhs"); if (isstring(c_token)) { quote_str(lhs, c_token, token_len(c_token)); } else { char* ptr = lhs; while (!END_OF_COMMAND) { copy_str(ptr, c_token, token_len(c_token) + 1); ptr += token_len(c_token); if (WHITE_AFTER_TOKEN(c_token)) { break; } ++c_token; } } ++c_token; } /* get right hand side: the command. allocating the size * of gp_input_line is too big, but shouldn't hurt too much. */ if (!END_OF_COMMAND) { rhs = (char*) gp_alloc(strlen(gp_input_line) + 1, "bind_command->rhs"); if (isstring(c_token)) { /* bind <lhs> "..." */ quote_str(rhs, c_token, token_len(c_token)); c_token++; } else { char* ptr = rhs; while (!END_OF_COMMAND) { /* bind <lhs> ... ... ... */ copy_str(ptr, c_token, token_len(c_token) + 1); ptr += token_len(c_token); if (WHITE_AFTER_TOKEN(c_token)) { *ptr++ = ' '; *ptr = '\0'; } c_token++; } } } FPRINTF((stderr, "(bind_command) |%s| |%s|\n", lhs, rhs)); /* bind_process() will eventually free lhs / rhs ! */ bind_process(lhs, rhs, allwindows); } #endif /* USE_MOUSE */ /* * Command parser functions */ /* process the 'call' command */ void call_command() { char *save_file = NULL; c_token++; save_file = try_to_get_string(); if (!save_file) int_error(c_token, "expecting filename"); gp_expand_tilde(&save_file); /* Argument list follows filename */ load_file(loadpath_fopen(save_file, "r"), save_file, TRUE); } /* process the 'cd' command */ void changedir_command() { char *save_file = NULL; c_token++; save_file = try_to_get_string(); if (!save_file) int_error(c_token, "expecting directory name"); gp_expand_tilde(&save_file); if (changedir(save_file)) int_error(c_token, "Can't change to this directory"); else update_gpval_variables(5); free(save_file); } /* process the 'clear' command */ void clear_command() { term_start_plot(); if (multiplot && term->fillbox) { unsigned int xx1 = (unsigned int) (xoffset * term->xmax); unsigned int yy1 = (unsigned int) (yoffset * term->ymax); unsigned int width = (unsigned int) (xsize * term->xmax); unsigned int height = (unsigned int) (ysize * term->ymax); (*term->fillbox) (0, xx1, yy1, width, height); } term_end_plot(); screen_ok = FALSE; c_token++; } /* process the 'evaluate' command */ void eval_command() { char *command; c_token++; command = try_to_get_string(); if (!command) int_error(c_token, "Expected command string"); do_string_and_free(command); } /* process the 'exit' and 'quit' commands */ void exit_command() { /* If the command is "exit gnuplot" then do so */ if (equals(c_token+1,"gnuplot")) exit(0); /* else graphics will be tidied up in main */ command_exit_status = 1; } /* fit_command() is in fit.c */ /* help_command() is below */ /* process the 'history' command */ void history_command() { #if defined(READLINE) || defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) c_token++; if (!END_OF_COMMAND && equals(c_token,"?")) { static char *search_str = NULL; /* string from command line to search for */ /* find and show the entries */ c_token++; m_capture(&search_str, c_token, c_token); /* reallocates memory */ printf ("history ?%s\n", search_str); if (!history_find_all(search_str)) int_error(c_token,"not in history"); c_token++; } else if (!END_OF_COMMAND && equals(c_token,"!")) { char *search_str = NULL; /* string from command line to search for */ const char *line_to_do = NULL; /* command to execute at end if necessary */ c_token++; m_capture(&search_str, c_token, c_token); line_to_do = history_find(search_str); free(search_str); if (line_to_do == NULL) int_error(c_token, "not in history"); printf(" Executing:\n\t%s\n", line_to_do); do_string(line_to_do); c_token++; } else { int n = 0; /* print only <last> entries */ TBOOLEAN append = FALSE; /* rewrite output file or append it */ static char *name = NULL; /* name of the output file; NULL for stdout */ TBOOLEAN quiet = FALSE; if (!END_OF_COMMAND && almost_equals(c_token,"q$uiet")) { /* option quiet to suppress history entry numbers */ quiet = TRUE; c_token++; } /* show history entries */ if (!END_OF_COMMAND && isanumber(c_token)) { n = int_expression(); } free(name); if ((name = try_to_get_string())) { if (!END_OF_COMMAND && almost_equals(c_token, "ap$pend")) { append = TRUE; c_token++; } } write_history_n(n, (quiet ? "" : name), (append ? "a" : "w")); } #else c_token++; int_warn(NO_CARET, "You have to compile gnuplot with builtin readline or GNU readline or BSD editline to enable history support."); #endif /* defined(READLINE) || defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) */ } #define REPLACE_ELSE(tok) \ do { \ int idx = token[tok].start_index; \ token[tok].length = 1; \ gp_input_line[idx++] = ';'; /* e */ \ gp_input_line[idx++] = ' '; /* l */ \ gp_input_line[idx++] = ' '; /* s */ \ gp_input_line[idx++] = ' '; /* e */ \ } while (0) #if 0 #define PRINT_TOKEN(tok) \ do { \ int i; \ int end_index = token[tok].start_index + token[tok].length; \ for (i = token[tok].start_index; i < end_index && gp_input_line[i]; i++) { \ fputc(gp_input_line[i], stderr); \ } \ fputc('\n', stderr); \ fflush(stderr); \ } while (0) #endif /* process the 'if' command */ void if_command() { double exprval; if (!equals(++c_token, "(")) /* no expression */ int_error(c_token, "expecting (expression)"); exprval = real_expression(); /* * EAM May 2011 * New if {...} else {...} syntax can span multiple lines. * Isolate the active clause and execute it recursively. */ if (equals(c_token,"{")) { /* Identify start and end position of the clause substring */ char *clause = NULL; int if_start, if_end, else_start=0, else_end=0; int clause_start, clause_end; c_token = find_clause(&if_start, &if_end); if (equals(c_token,"else")) { if (!equals(++c_token,"{")) int_error(c_token,"expected {else-clause}"); c_token = find_clause(&else_start, &else_end); } if (exprval != 0) { clause_start = if_start; clause_end = if_end; if_condition = TRUE; } else { clause_start = else_start; clause_end = else_end; if_condition = FALSE; } if_open_for_else = (else_start) ? FALSE : TRUE; clause_depth++; if (if_condition || else_start != 0) { /* Make a clean copy without the opening and closing braces */ clause = gp_alloc(clause_end - clause_start, "clause"); memcpy(clause, &gp_input_line[clause_start+1], clause_end - clause_start); clause[clause_end - clause_start - 1] = '\0'; FPRINTF((stderr,"%s CLAUSE: \"{%s}\"\n", (exprval != 0.0) ? "IF" : "ELSE", clause)); do_string_and_free(clause); } c_token--; /* Let the parser see the closing curly brace */ return; } /* * EAM May 2011 * Old if/else syntax (no curly braces) affects the rest of the current line. * Deprecate? */ if (clause_depth > 0) int_error(c_token,"Old-style if/else statement encountered inside brackets"); if_depth++; if (exprval != 0.0) { /* fake the condition of a ';' between commands */ int eolpos = token[num_tokens - 1].start_index + token[num_tokens - 1].length; --c_token; token[c_token].length = 1; token[c_token].start_index = eolpos + 2; gp_input_line[eolpos + 2] = ';'; gp_input_line[eolpos + 3] = NUL; if_condition = TRUE; } else { while (c_token < num_tokens) { /* skip over until the next command */ while (!END_OF_COMMAND) { ++c_token; } if (equals(++c_token, "else")) { /* break if an "else" was found */ if_condition = FALSE; --c_token; /* go back to ';' */ return; } } /* no else found */ c_token = num_tokens = 0; } } /* process the 'else' command */ void else_command() { /* * EAM May 2011 * New if/else syntax permits else clause to appear on a new line */ if (equals(c_token+1,"{")) { int clause_start, clause_end; char *clause; if (if_open_for_else) if_open_for_else = FALSE; else int_error(c_token,"Invalid {else-clause}"); c_token++; /* Advance to the opening curly brace */ c_token = find_clause(&clause_start, &clause_end); c_token--; /* Let the parser eventually see the closing curly brace */ clause_depth++; if (!if_condition) { clause = gp_alloc(clause_end - clause_start, "clause"); memcpy(clause, &gp_input_line[clause_start+1], clause_end - clause_start); clause[clause_end - clause_start - 1] = '\0'; do_string_and_free(clause); } return; } /* EAM May 2011 * The rest is only relevant to the old if/else syntax (no curly braces) */ if (if_depth <= 0) { int_error(c_token, "else without if"); return; } else { if_depth--; } if (TRUE == if_condition) { /* First part of line was true so * discard the rest of the line. */ c_token = num_tokens = 0; } else { REPLACE_ELSE(c_token); if_condition = TRUE; } } /* process commands of the form 'do for [i=1:N] ...' */ void do_command() { t_iterator *do_iterator; int do_start, do_end; char *clause; c_token++; do_iterator = check_for_iteration(); if (!equals(c_token,"{")) int_error(c_token,"expecting {do-clause}"); c_token = find_clause(&do_start, &do_end); clause_depth++; c_token--; /* Let the parser see the closing curly brace */ clause = gp_alloc(do_end - do_start + 2, "clause"); memcpy(clause, &gp_input_line[do_start+1], do_end - do_start); clause[do_end - do_start - 1] = '\0'; if (empty_iteration(do_iterator)) strcpy(clause, ";"); do { do_string(clause); } while (next_iteration(do_iterator)); free(clause); do_iterator = cleanup_iteration(do_iterator); } /* process commands of the form 'while (foo) {...}' */ void while_command() { int do_start, do_end; char *clause; int save_token, end_token; double exprval; c_token++; save_token = c_token; exprval = real_expression(); if (!equals(c_token,"{")) int_error(c_token,"expecting {while-clause}"); end_token = find_clause(&do_start, &do_end); clause = gp_alloc(do_end - do_start, "clause"); memcpy(clause, &gp_input_line[do_start+1], do_end - do_start); clause[do_end - do_start - 1] = '\0'; clause_depth++; while (exprval != 0) { do_string(clause); c_token = save_token; exprval = real_expression(); }; free(clause); c_token = end_token; } /* process the 'load' command */ void load_command() { FILE *fp; char *save_file; c_token++; save_file = try_to_get_string(); if (!save_file) int_error(c_token, "expecting filename"); gp_expand_tilde(&save_file); fp = strcmp(save_file, "-") ? loadpath_fopen(save_file, "r") : stdout; load_file(fp, save_file, FALSE); } /* null command */ void null_command() { return; } /* Clauses enclosed by curly brackets: * do for [i = 1:N] { a; b; c; } * if (<test>) { * line1; * line2; * } else { * ... * } */ /* Find the start and end character positions within gp_input_line * bounding a clause delimited by {...}. * Assumes that c_token indexes the opening left curly brace. */ int find_clause(int *clause_start, int *clause_end) { int i, depth; *clause_start = token[c_token].start_index; for (i=++c_token, depth=1; i<num_tokens; i++) { if (equals(i,"{")) depth++; else if (equals(i,"}")) depth--; if (depth == 0) break; } *clause_end = token[i].start_index; return (i+1); } void begin_clause() { clause_depth++; c_token++; return; } void end_clause() { if (clause_depth == 0) int_error(c_token, "unexpected }"); else clause_depth--; c_token++; return; } void clause_reset_after_error() { if (clause_depth) FPRINTF((stderr,"CLAUSE RESET after error at depth %d\n",clause_depth)); clause_depth = 0; } /* process the 'pause' command */ void pause_command() { int text = 0; double sleep_time; static char *buf = NULL; c_token++; #ifdef USE_MOUSE paused_for_mouse = 0; if (equals(c_token,"mouse")) { sleep_time = -1; c_token++; /* EAM FIXME - This is not the correct test; what we really want */ /* to know is whether or not the terminal supports mouse feedback */ /* if (term_initialised) { */ if (mouse_setting.on && term) { struct udvt_entry *current; int end_condition = 0; while (!(END_OF_COMMAND)) { if (almost_equals(c_token,"key$press")) { end_condition |= PAUSE_KEYSTROKE; c_token++; } else if (equals(c_token,",")) { c_token++; } else if (equals(c_token,"any")) { end_condition |= PAUSE_ANY; c_token++; } else if (equals(c_token,"button1")) { end_condition |= PAUSE_BUTTON1; c_token++; } else if (equals(c_token,"button2")) { end_condition |= PAUSE_BUTTON2; c_token++; } else if (equals(c_token,"button3")) { end_condition |= PAUSE_BUTTON3; c_token++; } else if (equals(c_token,"close")) { end_condition |= PAUSE_WINCLOSE; c_token++; } else break; } if (end_condition) paused_for_mouse = end_condition; else paused_for_mouse = PAUSE_CLICK; /* Set the pause mouse return codes to -1 */ current = add_udv_by_name("MOUSE_KEY"); current->udv_undef = FALSE; Ginteger(¤t->udv_value,-1); current = add_udv_by_name("MOUSE_BUTTON"); current->udv_undef = FALSE; Ginteger(¤t->udv_value,-1); } else int_warn(NO_CARET,"Mousing not active"); } else #endif sleep_time = real_expression(); if (END_OF_COMMAND) { free(buf); /* remove the previous message */ buf = gp_strdup("paused"); /* default message, used in Windows GUI pause dialog */ } else { free(buf); buf = try_to_get_string(); if (!buf) int_error(c_token, "expecting string"); else { #ifdef _Windows if (sleep_time >= 0) #elif defined(OS2) if (strcmp(term->name, "pm") != 0 || sleep_time >= 0) #endif /* _Windows */ fputs(buf, stderr); text = 1; } } if (sleep_time < 0) { #if defined(_Windows) # ifdef WXWIDGETS if (!strcmp(term->name, "wxt")) { /* copy of the code below: !(_Windows || OS2) */ if (term && term->waitforinput && paused_for_mouse){ fprintf(stderr,"%s\n", buf); term->waitforinput(); } else { # if defined(WGP_CONSOLE) fprintf(stderr,"%s\n", buf); if (term && term->waitforinput) while (term->waitforinput() != (int)'\r') {}; /* waiting for Enter*/ # else /* !WGP_CONSOLE */ if (!Pause(buf)) bail_to_command_line(); # endif } } else # endif /* _Windows && WXWIDGETS */ { if (paused_for_mouse && !GraphHasWindow(graphwin)) { if (interactive) { /* cannot wait for Enter in a non-interactive session without the graph window */ if (buf) fprintf(stderr,"%s\n", buf); fgets(buf, strlen(buf), stdin); /* graphical window not yet initialized, wait for any key here */ } } else { /* pausing via graphical windows */ int tmp = paused_for_mouse; if (buf && paused_for_mouse) fprintf(stderr,"%s\n", buf); if (!tmp) { # if defined(WGP_CONSOLE) fprintf(stderr,"%s\n", buf); if (term && term->waitforinput) while (term->waitforinput() != (int)'\r') {}; /* waiting for Enter*/ # else if (!Pause(buf)) bail_to_command_line(); # endif } else { if (!Pause(buf)) if (!GraphHasWindow(graphwin)) bail_to_command_line(); } } } #elif defined(OS2) if (strcmp(term->name, "pm") == 0 && sleep_time < 0) { int rc; if ((rc = PM_pause(buf)) == 0) { /* if (!CallFromRexx) * would help to stop REXX programs w/o raising an error message * in RexxInterface() ... */ bail_to_command_line(); } else if (rc == 2) { fputs(buf, stderr); text = 1; (void) fgets(buf, strlen(buf), stdin); } } #else /* !(_Windows || OS2) */ #ifdef USE_MOUSE if (term && term->waitforinput) { /* term->waitforinput() will return, * if CR was hit */ term->waitforinput(); } else #endif /* USE_MOUSE */ (void) fgets(buf, strlen(buf), stdin); #endif /* !(_Windows || OS2) */ } if (sleep_time > 0) GP_SLEEP(sleep_time); if (text != 0 && sleep_time >= 0) fputc('\n', stderr); screen_ok = FALSE; } /* process the 'plot' command */ void plot_command() { plot_token = c_token++; plotted_data_from_stdin = FALSE; SET_CURSOR_WAIT; #ifdef USE_MOUSE plot_mode(MODE_PLOT); add_udv_by_name("MOUSE_X")->udv_undef = TRUE; add_udv_by_name("MOUSE_Y")->udv_undef = TRUE; add_udv_by_name("MOUSE_X2")->udv_undef = TRUE; add_udv_by_name("MOUSE_Y2")->udv_undef = TRUE; add_udv_by_name("MOUSE_BUTTON")->udv_undef = TRUE; add_udv_by_name("MOUSE_SHIFT")->udv_undef = TRUE; add_udv_by_name("MOUSE_ALT")->udv_undef = TRUE; add_udv_by_name("MOUSE_CTRL")->udv_undef = TRUE; #endif plotrequest(); SET_CURSOR_ARROW; } void print_set_output(char *name, TBOOLEAN append_p) { if (print_out && print_out != stderr && print_out != stdout) { #ifdef PIPES if (print_out_name[0] == '|') { if (0 > pclose(print_out)) perror(print_out_name); } else #endif if (0 > fclose(print_out)) perror(print_out_name); } if (print_out_name) free(print_out_name); print_out_name = NULL; if (! name) { print_out = stderr; return; } if (! strcmp(name, "-")) { print_out = stdout; return; } #ifdef PIPES if (name[0]=='|') { restrict_popen(); print_out = popen(name + 1, "w"); if (!print_out) perror(name); else print_out_name = name; return; } #endif print_out = fopen(name, append_p ? "a" : "w"); if (!print_out) { perror(name); return; } print_out_name = name; } char * print_show_output() { if (print_out==stdout) return "<stdout>"; if (!print_out || print_out==stderr || !print_out_name) return "<stderr>"; return print_out_name; } /* process the 'print' command */ void print_command() { struct value a; /* space printed between two expressions only */ int need_space = 0; if (!print_out) { print_out = stderr; } screen_ok = FALSE; do { ++c_token; const_express(&a); if (a.type == STRING) { fputs(a.v.string_val, print_out); gpfree_string(&a); need_space = 0; } else { if (need_space) putc(' ', print_out); disp_value(print_out, &a, FALSE); need_space = 1; } } while (!END_OF_COMMAND && equals(c_token, ",")); (void) putc('\n', print_out); fflush(print_out); } /* process the 'pwd' command */ void pwd_command() { char *save_file = NULL; save_file = (char *) gp_alloc(PATH_MAX, "print current dir"); if (save_file) { GP_GETCWD(save_file, PATH_MAX); fprintf(stderr, "%s\n", save_file); free(save_file); } c_token++; } #ifdef VOLATILE_REFRESH /* EAM April 2007 * The "refresh" command replots the previous graph without going back to read * the original data. This allows zooming or other operations on data that was * only transiently available in the input stream. */ void refresh_command() { c_token++; refresh_request(); } void refresh_request() { FPRINTF((stderr,"refresh_request\n")); if ((first_plot == NULL && refresh_ok == 2) || (first_3dplot == NULL && refresh_ok == 3)) int_error(NO_CARET, "no active plot; cannot refresh"); if (refresh_ok == 0) { int_warn(NO_CARET, "cannot refresh from this state. trying full replot"); replotrequest(); return; } /* If the state has been reset to autoscale since the last plot, * initialize the axis limits. */ AXIS_INIT2D_REFRESH(FIRST_X_AXIS,TRUE); AXIS_INIT2D_REFRESH(FIRST_Y_AXIS,TRUE); AXIS_INIT2D_REFRESH(SECOND_X_AXIS,TRUE); AXIS_INIT2D_REFRESH(SECOND_Y_AXIS,TRUE); AXIS_UPDATE2D_REFRESH(T_AXIS); /* Untested: T and R want INIT2D or UPDATE2D?? */ AXIS_UPDATE2D_REFRESH(POLAR_AXIS); AXIS_UPDATE2D_REFRESH(FIRST_Z_AXIS); AXIS_UPDATE2D_REFRESH(COLOR_AXIS); if (refresh_ok == 2) refresh_bounds(first_plot, refresh_nplots); else if (refresh_ok == 3) refresh_3dbounds(first_3dplot, refresh_nplots); /* FIXME EAM * The existing mechanism defined in axis.h does not work here for some reason. * The following defined check works empirically. Most of the time. Maybe. */ #undef CHECK_REVERSE #define CHECK_REVERSE(axis) do { \ AXIS *ax = axis_array + axis; \ if ((ax->range_flags & RANGE_REVERSE)) { \ double temp = ax->max; \ ax->max = ax->min; ax->min = temp; \ } } while (0) CHECK_REVERSE(FIRST_X_AXIS); CHECK_REVERSE(FIRST_Y_AXIS); CHECK_REVERSE(SECOND_X_AXIS); CHECK_REVERSE(SECOND_Y_AXIS); #undef CHECK_REVERSE if (refresh_ok == 2) do_plot(first_plot, refresh_nplots); else if (refresh_ok == 3) do_3dplot(first_3dplot, refresh_nplots, 0); else int_error(NO_CARET, "Internal error - refresh of unknown plot type"); } #endif /* process the 'replot' command */ void replot_command() { if (!*replot_line) int_error(c_token, "no previous plot"); /* Disable replot for some reason; currently used by the mouse/hotkey capable terminals to avoid replotting when some data come from stdin, i.e. when plotted_data_from_stdin==1 after plot "-". */ if (replot_disabled) { replot_disabled = FALSE; bail_to_command_line(); /* be silent --- don't mess the screen */ } if (!term) /* unknown terminal */ int_error(c_token, "use 'set term' to set terminal type first"); c_token++; SET_CURSOR_WAIT; if (term->flags & TERM_INIT_ON_REPLOT) term->init(); replotrequest(); SET_CURSOR_ARROW; } /* process the 'reread' command */ void reread_command() { FILE *fp = lf_top(); if (fp != (FILE *) NULL) rewind(fp); c_token++; } /* process the 'save' command */ void save_command() { FILE *fp; char *save_file = NULL; int what; c_token++; what = lookup_table(&save_tbl[0], c_token); switch (what) { case SAVE_FUNCS: case SAVE_SET: case SAVE_TERMINAL: case SAVE_VARS: c_token++; break; default: break; } save_file = try_to_get_string(); if (!save_file) int_error(c_token, "expecting filename"); #ifdef PIPES if (save_file[0]=='|') { restrict_popen(); fp = popen(save_file+1,"w"); } else #endif { gp_expand_tilde(&save_file); fp = strcmp(save_file,"-") ? loadpath_fopen(save_file,"w") : stdout; } if (!fp) os_error(c_token, "Cannot open save file"); switch (what) { case SAVE_FUNCS: save_functions(fp); break; case SAVE_SET: save_set(fp); break; case SAVE_TERMINAL: save_term(fp); break; case SAVE_VARS: save_variables(fp); break; default: save_all(fp); } if (stdout != fp) { #ifdef PIPES if (save_file[0] == '|') (void) pclose(fp); else #endif (void) fclose(fp); } free(save_file); } /* process the 'screendump' command */ void screendump_command() { c_token++; #ifdef _Windows screen_dump(); #else fputs("screendump not implemented\n", stderr); #endif } /* set_command() is in set.c */ /* 'shell' command is processed by do_shell(), see below */ /* show_command() is in show.c */ /* process the 'splot' command */ void splot_command() { plot_token = c_token++; plotted_data_from_stdin = FALSE; SET_CURSOR_WAIT; #ifdef USE_MOUSE plot_mode(MODE_SPLOT); add_udv_by_name("MOUSE_X")->udv_undef = TRUE; add_udv_by_name("MOUSE_Y")->udv_undef = TRUE; add_udv_by_name("MOUSE_X2")->udv_undef = TRUE; add_udv_by_name("MOUSE_Y2")->udv_undef = TRUE; add_udv_by_name("MOUSE_BUTTON")->udv_undef = TRUE; #endif plot3drequest(); SET_CURSOR_ARROW; } /* process the 'stats' command */ void stats_command() { #ifdef USE_STATS statsrequest(); #else int_error(NO_CARET,"This copy of gnuplot was not configured with support for the stats command"); #endif } /* process the 'system' command */ void system_command() { char *cmd; ++c_token; cmd = try_to_get_string(); do_system(cmd); free(cmd); } /* process the 'test palette' command * * note 1: it works on terminals supporting as well as not supporting pm3d * note 2: due to the call to load_file(), the rest of the current command * line after 'test palette ;' is discarded */ static void test_palette_subcommand() { enum {test_palette_colors = 256}; double gray, z[test_palette_colors]; rgb_color rgb1[test_palette_colors]; int i, k; static const char pre1[] = "\ reset;set multi;\ uns border;uns key;set tic in;uns xtics;uns ytics;\ se cbtic 0,0.1,1 mirr format '';\ se xr[0:1];se yr[0:1];se zr[0:1];se cbr[0:1];\ se pm3d map;set colorbox hor user orig 0.05,0.02 size 0.925,0.12;"; static const char pre2[] = "splot 1/0;\n\n\n"; /* note: those \n's are because of x11 terminal problems with blocking pipe */ static const char pre3[] = "\ uns pm3d;\ se lmarg scre 0.05;se rmarg scre 0.975; se bmarg scre 0.22; se tmarg scre 0.86;\ se grid;se tics scale 0; se xtics 0,0.1;se ytics 0,0.1;\ se key top right at scre 0.975,0.975 horizontal \ title 'R,G,B profiles of the current color palette';"; static const char post[] = "\ \n\n\nuns multi;\n"; /* no final 'reset' in favour of mousing */ int can_pm3d = (term->make_palette && term->set_color); char *order = "rgb"; char *save_replot_line; TBOOLEAN save_is_3d_plot; FILE *f = tmpfile(); #if defined(_MSC_VER) || defined(__MINGW32__) /* On Vista/Windows 7 tmpfile() fails. */ if (!f) { char buf[PATH_MAX]; GetTempPath(sizeof(buf), buf); strcat(buf, "gnuplot-pal.tmp"); f = fopen(buf, "w+"); } #endif c_token++; /* parse optional option */ if (!END_OF_COMMAND) { int err = (token[c_token].length != 3); order = gp_input_line + token[c_token].start_index; if (!err) { err += (memchr(order, 'r', 3) == NULL); err += (memchr(order, 'g', 3) == NULL); err += (memchr(order, 'b', 3) == NULL); } if (err) int_error(c_token, "combination rgb or gbr or brg etc. expected"); c_token++; } if (!f) int_error(NO_CARET, "cannot write temporary file"); /* generate r,g,b curves */ for (i = 0; i < test_palette_colors; i++) { /* colours equidistantly from [0,1] */ z[i] = (double)i / (test_palette_colors - 1); gray = (sm_palette.positive == SMPAL_NEGATIVE) ? 1-z[i] : z[i]; rgb1_from_gray(gray, &rgb1[i]); } /* commands to setup the test palette plot */ enable_reset_palette = 0; save_replot_line = gp_strdup(replot_line); save_is_3d_plot = is_3d_plot; fputs(pre1, f); if (can_pm3d) fputs(pre2, f); fputs(pre3, f); /* put inline data of the r,g,b curves */ fputs("p", f); for (i=0; i<strlen(order); i++) { if (i > 0) fputs(",", f); fputs("'-'tit'", f); switch (order[i]) { case 'r': fputs("red'w l lt 1 lc rgb 'red'", f); break; case 'g': fputs("green'w l lt 2 lc rgb 'green'", f); break; case 'b': fputs("blue'w l lt 3 lc rgb 'blue'", f); break; } /* switch(order[i]) */ } /* for (i) */ fputs(", '-' w l title 'NTSC' lt -1", f); fputs("\n", f); for (i = 0; i < 3; i++) { int c = order[i]; for (k = 0; k < test_palette_colors; k++) { double rgb = (c=='r') ? rgb1[k].r : ((c=='g') ? rgb1[k].g : rgb1[k].b); fprintf(f, "%0.4f\t%0.4f\n", z[k], rgb); } fputs("e\n", f); } for (k = 0; k < test_palette_colors; k++) { double ntsc = 0.299 * rgb1[k].r + 0.587 * rgb1[k].g + 0.114 * rgb1[k].b; fprintf(f, "%0.4f\t%0.4f\n", z[k], ntsc); } fputs("e\n", f); fputs(post, f); /* save current gnuplot 'set' status because of the tricky sets * for our temporary testing plot. */ save_set(f); /* execute all commands from the temporary file */ rewind(f); load_file(f, NULL, FALSE); /* note: it does fclose(f) */ /* enable reset_palette() and restore replot line */ enable_reset_palette = 1; free(replot_line); replot_line = save_replot_line; is_3d_plot = save_is_3d_plot; /* further, gp_input_line[] and token[] now destroyed! */ c_token = num_tokens = 0; } /* process the undocumented 'test time' command * test time 'format' 'string' * to assist testing of time routines */ static void test_time_subcommand() { char *format = NULL; char *string = NULL; struct tm tm; double secs; double usec; /* given a format and a time string, exercise the time code */ if (isstring(++c_token)) { m_quote_capture(&format, c_token, c_token); if (isstring(++c_token)) { m_quote_capture(&string, c_token, c_token); memset(&tm, 0, sizeof(tm)); gstrptime(string, format, &tm, &usec); secs = gtimegm(&tm); fprintf(stderr, "internal = %f - %d/%d/%d::%d:%d:%d , wday=%d, yday=%d\n", secs, tm.tm_mday, tm.tm_mon + 1, tm.tm_year % 100, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_wday, tm.tm_yday); memset(&tm, 0, sizeof(tm)); ggmtime(&tm, secs); gstrftime(string, strlen(string), format, secs); fprintf(stderr, "convert back \"%s\" - %d/%d/%d::%d:%d:%d , wday=%d, yday=%d\n", string, tm.tm_mday, tm.tm_mon + 1, tm.tm_year % 100, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_wday, tm.tm_yday); free(string); ++c_token; } /* else: expecting time string */ free(format); } /* else: expecting format string */ } /* process the 'test' command */ void test_command() { int what; c_token++; if (!term) /* unknown terminal */ int_error(c_token, "use 'set term' to set terminal type first"); if (END_OF_COMMAND) { test_term(); return; } what = lookup_table(&test_tbl[0], c_token); switch (what) { case TEST_TERMINAL: test_term(); break; case TEST_PALETTE: test_palette_subcommand(); break; case TEST_TIME: test_time_subcommand(); break; default: int_error(c_token, "only keywords are 'terminal' and 'palette'"); } } /* unset_command is in unset.c */ /* process the 'update' command */ void update_command() { /* old parameter filename */ char *opfname = NULL; /* new parameter filename */ char *npfname = NULL; c_token++; if (!(opfname = try_to_get_string())) int_error(c_token, "Parameter filename expected"); if (!END_OF_COMMAND && !(npfname = try_to_get_string())) int_error(c_token, "New parameter filename expected"); update(opfname, npfname); free(npfname); free(opfname); } /* process invalid commands and, on OS/2, REXX commands */ void invalid_command() { int save_token = c_token; #ifdef OS2 if (token[c_token].is_token) { int rc; rc = ExecuteMacro(gp_input_line + token[c_token].start_index, token[c_token].length); if (rc == 0) { c_token = num_tokens = 0; return; } } #endif /* Skip the rest of the command; otherwise we're left pointing to */ /* the middle of a command we already know is not valid. */ while (!END_OF_COMMAND) c_token++; int_error(save_token, "invalid command"); } /* * Auxiliary routines */ /* used by changedir_command() */ static int changedir(char *path) { #if defined(MSDOS) /* first deal with drive letter */ if (isalpha(path[0]) && (path[1] == ':')) { int driveno = toupper(path[0]) - 'A'; /* 0=A, 1=B, ... */ # if (defined(MSDOS) && defined(__EMX__)) || defined(__MSC__) (void) _chdrive(driveno + 1); # endif # ifdef DJGPP (void) setdisk(driveno); # endif path += 2; /* move past drive letter */ } /* then change to actual directory */ if (*path) if (chdir(path)) return 1; return 0; /* should report error with setdrive also */ #elif defined(WIN32) return !(SetCurrentDirectory(path)); #elif defined(__EMX__) && defined(OS2) return _chdir2(path); #else return chdir(path); #endif /* MSDOS etc. */ } /* used by replot_command() */ void replotrequest() { if (equals(c_token, "[")) int_error(c_token, "cannot set range with replot"); /* do not store directly into the replot_line string, until the * new plot line has been successfully plotted. This way, * if user makes a typo in a replot line, they do not have * to start from scratch. The replot_line will be committed * after do_plot has returned, whence we know all is well */ if (END_OF_COMMAND) { char *rest_args = &gp_input_line[token[c_token].start_index]; size_t replot_len = strlen(replot_line); size_t rest_len = strlen(rest_args); /* preserve commands following 'replot ;' */ /* move rest of input line to the start * necessary because of realloc() in extend_input_line() */ memmove(gp_input_line,rest_args,rest_len+1); /* reallocs if necessary */ while (gp_input_line_len < replot_len+rest_len+1) extend_input_line(); /* move old rest args off begin of input line to * make space for replot_line */ memmove(gp_input_line+replot_len,gp_input_line,rest_len+1); /* copy previous plot command to start of input line */ memcpy(gp_input_line, replot_line, replot_len); } else { char *replot_args = NULL; /* else m_capture will free it */ int last_token = num_tokens - 1; /* length = length of old part + length of new part + ", " + \0 */ size_t newlen = strlen(replot_line) + token[last_token].start_index + token[last_token].length - token[c_token].start_index + 3; m_capture(&replot_args, c_token, last_token); /* might be empty */ while (gp_input_line_len < newlen) extend_input_line(); strcpy(gp_input_line, replot_line); strcat(gp_input_line, ", "); strcat(gp_input_line, replot_args); free(replot_args); } plot_token = 0; /* whole line to be saved as replot line */ #ifdef VOLATILE_REFRESH refresh_ok = 0; /* start of replot will destory existing data */ #endif screen_ok = FALSE; num_tokens = scanner(&gp_input_line, &gp_input_line_len); c_token = 1; /* skip the 'plot' part */ if (is_3d_plot) plot3drequest(); else plotrequest(); } /* Is 'set view map' currently working inside 'splot' or not? Calculation of * mouse coordinates and the corresponding routines must know it, because * 'splot' can be either true 3D plot or a 2D map. * This flag is set when entering splot command and 'set view map', i.e. by * splot_map_activate(), and reset when calling splot_map_deactivate(). */ static int splot_map_active = 0; /* Store values reset by 'set view map' during splot, used by those two * routines below. */ static float splot_map_surface_rot_x; static float splot_map_surface_rot_z; static float splot_map_surface_scale; /* This routine is called at the beginning of 'splot'. It sets up some splot * parameters needed to present the 'set view map'. */ void splot_map_activate() { if (splot_map_active) return; splot_map_active = 1; /* save current values */ splot_map_surface_rot_x = surface_rot_x; splot_map_surface_rot_z = surface_rot_z ; splot_map_surface_scale = surface_scale; /* set new values */ surface_rot_x = 180; surface_rot_z = 0; surface_scale = 1.3; axis_array[FIRST_Y_AXIS].range_flags ^= RANGE_REVERSE; axis_array[SECOND_Y_AXIS].range_flags ^= RANGE_REVERSE; /* note: ^ is xor */ } /* This routine is called when the current 'set view map' is no more needed, * i.e., when calling "plot" --- the reversed y-axis et al must still be * available for mousing. */ void splot_map_deactivate() { if (!splot_map_active) return; splot_map_active = 0; /* restore the original values */ surface_rot_x = splot_map_surface_rot_x; surface_rot_z = splot_map_surface_rot_z; surface_scale = splot_map_surface_scale; axis_array[FIRST_Y_AXIS].range_flags ^= RANGE_REVERSE; axis_array[SECOND_Y_AXIS].range_flags ^= RANGE_REVERSE; /* note: ^ is xor */ } /* Support for input, shell, and help for various systems */ #ifdef VMS # include <descrip.h> # include <rmsdef.h> # include <smgdef.h> # include <smgmsg.h> # include <ssdef.h> extern lib$get_input(), lib$put_output(); extern smg$read_composed_line(); extern sys$putmsg(); extern lbr$output_help(); extern lib$spawn(); int vms_len; unsigned int status[2] = { 1, 0 }; static char Help[MAX_LINE_LEN+1] = "gnuplot"; $DESCRIPTOR(prompt_desc, PROMPT); /* temporary fix until change to variable length */ struct dsc$descriptor_s line_desc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL}; $DESCRIPTOR(help_desc, Help); $DESCRIPTOR(helpfile_desc, "GNUPLOT$HELP"); /* HBB 990829: confirmed this to be used on VMS, only --> moved into * the VMS-specific section */ void done(int status) { term_reset(); exit(status); } /* VMS-only version of read_line */ static int read_line(const char *prompt, int start) { int more; char expand_prompt[40]; current_prompt = prompt; /* HBB NEW 20040727 */ prompt_desc.dsc$w_length = strlen(prompt); prompt_desc.dsc$a_pointer = (char *) prompt; strcpy(expand_prompt, "_"); strncat(expand_prompt, prompt, 38); do { line_desc.dsc$w_length = MAX_LINE_LEN - start; line_desc.dsc$a_pointer = &gp_input_line[start]; switch (status[1] = smg$read_composed_line(&vms_vkid, &vms_ktid, &line_desc, &prompt_desc, &vms_len)) { case SMG$_EOF: done(EXIT_SUCCESS); /* ^Z isn't really an error */ break; case RMS$_TNS: /* didn't press return in time */ vms_len--; /* skip the last character */ break; /* and parse anyway */ case RMS$_BES: /* Bad Escape Sequence */ case RMS$_PES: /* Partial Escape Sequence */ sys$putmsg(status); vms_len = 0; /* ignore the line */ break; case SS$_NORMAL: break; /* everything's fine */ default: done(status[1]); /* give the error message */ } start += vms_len; gp_input_line[start] = NUL; inline_num++; if (gp_input_line[start - 1] == '\\') { /* Allow for a continuation line. */ prompt_desc.dsc$w_length = strlen(expand_prompt); prompt_desc.dsc$a_pointer = expand_prompt; more = 1; --start; } else { line_desc.dsc$w_length = strlen(gp_input_line); line_desc.dsc$a_pointer = gp_input_line; more = 0; } } while (more); return 0; } # ifdef NO_GIH void help_command() { int first = c_token; while (!END_OF_COMMAND) ++c_token; strcpy(Help, "GNUPLOT "); capture(Help + 8, first, c_token - 1, sizeof(Help) - 9); help_desc.dsc$w_length = strlen(Help); if ((vaxc$errno = lbr$output_help(lib$put_output, 0, &help_desc, &helpfile_desc, 0, lib$get_input)) != SS$_NORMAL) os_error(NO_CARET, "can't open GNUPLOT$HELP"); } # endif /* NO_GIH */ void do_shell() { screen_ok = FALSE; c_token++; if ((vaxc$errno = lib$spawn()) != SS$_NORMAL) { os_error(NO_CARET, "spawn error"); } } static void do_system(const char *cmd) { if (!cmd) return; /* gp_input_line is filled by read_line or load_file, but * line_desc length is set only by read_line; adjust now */ line_desc.dsc$w_length = strlen(cmd); line_desc.dsc$a_pointer = (char *) cmd; if ((vaxc$errno = lib$spawn(&line_desc)) != SS$_NORMAL) os_error(NO_CARET, "spawn error"); (void) putc('\n', stderr); } #endif /* VMS */ #ifdef NO_GIH #if defined(_Windows) void help_command() { HWND parent; c_token++; parent = GetDesktopWindow(); #ifdef WITH_HTML_HELP /* open help file if necessary */ help_window = HtmlHelp(parent, winhelpname, HH_GET_WIN_HANDLE, (DWORD_PTR)NULL); if (help_window == NULL) { help_window = HtmlHelp(parent, winhelpname, HH_DISPLAY_TOPIC, (DWORD_PTR)NULL); if (help_window == NULL) { fprintf(stderr, "Error: Could not open help file \"%s\"\n", winhelpname); return; } } if (END_OF_COMMAND) { /* show table of contents */ HtmlHelp(parent, winhelpname, HH_DISPLAY_TOC, (DWORD_PTR)NULL); } else { /* lookup topic in index */ HH_AKLINK link; char buf[128]; int start = c_token; while (!(END_OF_COMMAND)) c_token++; capture(buf, start, c_token - 1, 128); link.cbStruct = sizeof(HH_AKLINK) ; link.fReserved = FALSE; link.pszKeywords = buf; link.pszUrl = NULL; link.pszMsgText = NULL; link.pszMsgTitle = NULL; link.pszWindow = NULL; link.fIndexOnFail = TRUE; HtmlHelp(parent, winhelpname, HH_KEYWORD_LOOKUP, (DWORD_PTR)&link); } #else if (END_OF_COMMAND) WinHelp(parent, (LPSTR) winhelpname, HELP_INDEX, (DWORD) NULL); else { char buf[128]; int start = c_token; while (!(END_OF_COMMAND)) c_token++; capture(buf, start, c_token - 1, 128); WinHelp(parent, (LPSTR) winhelpname, HELP_PARTIALKEY, (DWORD) buf); } #endif } #else /* !_Windows */ void help_command() { while (!(END_OF_COMMAND)) c_token++; fputs("This gnuplot was not built with inline help\n", stderr); } #endif /* _Windows */ #endif /* NO_GIH */ /* * help_command: (not VMS, although it would work) Give help to the user. It * parses the command line into helpbuf and supplies help for that string. * Then, if there are subtopics available for that key, it prompts the user * with this string. If more input is given, help_command is called * recursively, with argument 0. Thus a more specific help can be supplied. * This can be done repeatedly. If null input is given, the function returns, * effecting a backward climb up the tree. * David Kotz (David.Kotz@Dartmouth.edu) 10/89 * drd - The help buffer is first cleared when called with toplevel=1. * This is to fix a bug where help is broken if ^C is pressed whilst in the * help. * Lars - The "int toplevel" argument is gone. I have converted it to a * static variable. * * FIXME - helpbuf is never free()'d */ #ifndef NO_GIH void help_command() { static char *helpbuf = NULL; static char *prompt = NULL; static int toplevel = 1; int base; /* index of first char AFTER help string */ int len; /* length of current help string */ TBOOLEAN more_help; TBOOLEAN only; /* TRUE if only printing subtopics */ TBOOLEAN subtopics; /* 0 if no subtopics for this topic */ int start; /* starting token of help string */ char *help_ptr; /* name of help file */ # if defined(SHELFIND) static char help_fname[256] = ""; /* keep helpfilename across calls */ # endif if ((help_ptr = getenv("GNUHELP")) == (char *) NULL) # ifndef SHELFIND /* if can't find environment variable then just use HELPFILE */ /* patch by David J. Liu for getting GNUHELP from home directory */ # ifdef __DJGPP__ help_ptr = HelpFile; # else help_ptr = HELPFILE; # endif #ifdef OS2 { /* look in the path where the executable lives */ static char buf[MAXPATHLEN]; char *ptr; _execname(buf, sizeof(buf)); _fnslashify(buf); ptr=strrchr(buf, '/'); if (ptr) { *(ptr+1)='\0'; strcat(buf, HELPFILE); help_ptr=&buf[0]; } else help_ptr = HELPFILE; } #endif /* end of patch - DJL */ # else /* !SHELFIND */ /* try whether we can find the helpfile via shell_find. If not, just use the default. (tnx Andreas) */ if (!strchr(HELPFILE, ':') && !strchr(HELPFILE, '/') && !strchr(HELPFILE, '\\')) { if (strlen(help_fname) == 0) { strcpy(help_fname, HELPFILE); if (shel_find(help_fname) == 0) { strcpy(help_fname, HELPFILE); } } help_ptr = help_fname; } else { help_ptr = HELPFILE; } # endif /* !SHELFIND */ /* Since MSDOS DGROUP segment is being overflowed we can not allow such */ /* huge static variables (1k each). Instead we dynamically allocate them */ /* on the first call to this function... */ if (helpbuf == NULL) { helpbuf = gp_alloc(MAX_LINE_LEN, "help buffer"); prompt = gp_alloc(MAX_LINE_LEN, "help prompt"); helpbuf[0] = prompt[0] = 0; } if (toplevel) helpbuf[0] = prompt[0] = 0; /* in case user hit ^c last time */ /* if called recursively, toplevel == 0; toplevel must == 1 if called * from command() to get the same behaviour as before when toplevel * supplied as function argument */ toplevel = 1; len = base = strlen(helpbuf); start = ++c_token; /* find the end of the help command */ while (!(END_OF_COMMAND)) c_token++; /* copy new help input into helpbuf */ if (len > 0) helpbuf[len++] = ' '; /* add a space */ capture(helpbuf + len, start, c_token - 1, MAX_LINE_LEN - len); squash_spaces(helpbuf + base); /* only bother with new stuff */ len = strlen(helpbuf); /* now, a lone ? will print subtopics only */ if (strcmp(helpbuf + (base ? base + 1 : 0), "?") == 0) { /* subtopics only */ subtopics = 1; only = TRUE; helpbuf[base] = NUL; /* cut off question mark */ } else { /* normal help request */ subtopics = 0; only = FALSE; } switch (help(helpbuf, help_ptr, &subtopics)) { case H_FOUND:{ /* already printed the help info */ /* subtopics now is true if there were any subtopics */ screen_ok = FALSE; do { if (subtopics && !only) { /* prompt for subtopic with current help string */ if (len > 0) { strcpy (prompt, "Subtopic of "); strncat (prompt, helpbuf, MAX_LINE_LEN - 16); strcat (prompt, ": "); } else strcpy(prompt, "Help topic: "); read_line(prompt, 0); num_tokens = scanner(&gp_input_line, &gp_input_line_len); c_token = 0; more_help = !(END_OF_COMMAND); if (more_help) { c_token--; toplevel = 0; /* base for next level is all of current helpbuf */ help_command(); } } else more_help = FALSE; } while (more_help); break; } case H_NOTFOUND: printf("Sorry, no help for '%s'\n", helpbuf); break; case H_ERROR: perror(help_ptr); break; default: int_error(NO_CARET, "Impossible case in switch"); break; } helpbuf[base] = NUL; /* cut it off where we started */ } #endif /* !NO_GIH */ #ifndef VMS static void do_system(const char *cmd) { # if defined(_Windows) && defined(USE_OWN_WINSYSTEM_FUNCTION) if (!cmd) return; restrict_popen(); winsystem(cmd); # else /* _Windows) */ /* (am, 19980929) * OS/2 related note: cmd.exe returns 255 if called w/o argument. * i.e. calling a shell by "!" will always end with an error message. * A workaround has to include checking for EMX,OS/2, two environment * variables,... */ if (!cmd) return; restrict_popen(); system(cmd); # endif /* !(_Windows) */ } # if defined(READLINE) || defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) /* keep some compilers happy */ static char *rlgets __PROTO((char *s, size_t n, const char *prompt)); static char * rlgets(char *s, size_t n, const char *prompt) { static char *line = (char *) NULL; static int leftover = -1; /* index of 1st char leftover from last call */ if (leftover == -1) { /* If we already have a line, first free it */ if (line != (char *) NULL) { free(line); line = NULL; /* so that ^C or int_error during readline() does * not result in line being free-ed twice */ } line = readline_ipc((interactive) ? prompt : ""); leftover = 0; /* If it's not an EOF */ if (line && *line) { # if defined(HAVE_LIBREADLINE) int found; /* Initialize readline history functions */ using_history(); /* search in the history for entries containing line. * They may have other tokens before and after line, hence * the check on strcmp below. */ found = history_search(line, -1); if (found != -1 && !strcmp(current_history()->line,line)) { /* this line is already in the history, remove the earlier entry */ HIST_ENTRY *removed = remove_history(where_history()); /* according to history docs we are supposed to free the stuff */ if (removed) { free(removed->line); free(removed->data); free(removed); } } add_history(line); # elif defined(HAVE_LIBEDITLINE) /* deleting history entries does not work, so suppress adjacent duplicates only */ int found; using_history(); found = history_search(line, -1); if (found <= 0) { add_history(line); } # else /* builtin readline */ add_history(line); # endif } } if (line) { /* s will be NUL-terminated here */ safe_strncpy(s, line + leftover, n); leftover += strlen(s); if (line[leftover] == NUL) leftover = -1; return s; } return NULL; } # endif /* READLINE || HAVE_LIBREADLINE || HAVE_LIBEDITLINE */ # if defined(MSDOS) || defined(_Windows) void do_shell() { screen_ok = FALSE; c_token++; if (user_shell) { # if defined(_Windows) if (WinExec(user_shell, SW_SHOWNORMAL) <= 32) # elif defined(DJGPP) if (system(user_shell) == -1) # else if (spawnl(P_WAIT, user_shell, NULL) == -1) # endif /* !(_Windows || DJGPP) */ os_error(NO_CARET, "unable to spawn shell"); } } # elif defined(OS2) void do_shell() { screen_ok = FALSE; c_token++; if (user_shell) { if (system(user_shell) == -1) os_error(NO_CARET, "system() failed"); } (void) putc('\n', stderr); } # else /* !OS2 */ /* plain old Unix */ #define EXEC "exec " void do_shell() { static char exec[100] = EXEC; screen_ok = FALSE; c_token++; if (user_shell) { if (system(safe_strncpy(&exec[sizeof(EXEC) - 1], user_shell, sizeof(exec) - sizeof(EXEC) - 1))) os_error(NO_CARET, "system() failed"); } (void) putc('\n', stderr); } # endif /* !MSDOS */ /* read from stdin, everything except VMS */ # if !defined(READLINE) && !defined(HAVE_LIBREADLINE) && !defined(HAVE_LIBEDITLINE) # if defined(MSDOS) && !defined(_Windows) && !defined(__EMX__) && !defined(DJGPP) /* if interactive use console IO so CED will work */ #define PUT_STRING(s) cputs(s) #define GET_STRING(s,l) ((interactive) ? cgets_emu(s,l) : fgets(s,l,stdin)) /* emulate a fgets like input function with DOS cgets */ char * cgets_emu(char *str, int len) { static char buffer[128] = ""; static int leftover = 0; if (buffer[leftover] == NUL) { buffer[0] = 126; cgets(buffer); fputc('\n', stderr); if (buffer[2] == 26) return NULL; leftover = 2; } safe_strncpy(str, buffer + leftover, len); leftover += strlen(str); return str; } # else /* !plain DOS */ # define PUT_STRING(s) fputs(s, stderr) # define GET_STRING(s,l) fgets(s, l, stdin) # endif /* !plain DOS */ # endif /* !READLINE && !HAVE_LIBREADLINE && !HAVE_LIBEDITLINE */ /* this function is called for non-interactive operation. Its usage is * like fgets(), but additionally it checks for ipc events from the * terminals waitforinput() (if USE_MOUSE, and terminal is * mouseable). This function will be used when reading from a pipe. * fgets() reads in at most one less than size characters from stream and * stores them into the buffer pointed to by s. * Reading stops after an EOF or a newline. If a newline is read, it is * stored into the buffer. A '\0' is stored after the last character in * the buffer. */ static char* fgets_ipc( char *dest, /* string to fill */ int len) /* size of it */ { #ifdef USE_MOUSE if (term && term->waitforinput) { /* This a mouseable terminal --- must expect input from it */ int c; /* char got from waitforinput() */ size_t i=0; /* position inside dest */ dest[0] = '\0'; for (i=0; i < len-1; i++) { c = term->waitforinput(); if ('\n' == c) { dest[i] = '\n'; i++; break; } else if (EOF == c) { dest[i] = '\0'; return (char*) 0; } else { dest[i] = c; } } dest[i] = '\0'; return dest; } else #endif return fgets(dest, len, stdin); } /* get a line from stdin, and display a prompt if interactive */ static char* gp_get_string(char * buffer, size_t len, const char * prompt) { # if defined(READLINE) || defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) if (interactive) return rlgets(buffer, len, prompt); else return fgets_ipc(buffer, len); # else if (interactive) PUT_STRING(prompt); return GET_STRING(buffer, len); # endif } /* Non-VMS version */ static int read_line(const char *prompt, int start) { TBOOLEAN more = FALSE; int last = 0; current_prompt = prompt; /* HBB NEW 20040727 */ /* Once we start to read a new line, the tokens pointing into the old */ /* line are no longer valid. We used to _not_ clear things here, but */ /* that lead to errors when a mouse-triggered replot request came in */ /* while a new line was being read. Bug 3602388 Feb 2013. */ /* FIXME: If this causes problems, push it down into fgets_ipc(). */ if (start == 0 && !interactive) { c_token = num_tokens = 0; gp_input_line[0] = '\0'; } do { /* grab some input */ if (gp_get_string(gp_input_line + start, gp_input_line_len - start, ((more) ? ">" : prompt)) == (char *) NULL) { /* end-of-file */ if (interactive) (void) putc('\n', stderr); gp_input_line[start] = NUL; inline_num++; if (start > 0 && curly_brace_count == 0) /* don't quit yet - process what we have */ more = FALSE; else return (1); /* exit gnuplot */ } else { /* normal line input */ /* gp_input_line must be NUL-terminated for strlen not to pass the * the bounds of this array */ last = strlen(gp_input_line) - 1; if (last >= 0) { if (gp_input_line[last] == '\n') { /* remove any newline */ gp_input_line[last] = NUL; if (last > 0 && gp_input_line[last-1] == '\r') { gp_input_line[--last] = NUL; } /* Watch out that we don't backup beyond 0 (1-1-1) */ if (last > 0) --last; } else if (last + 2 >= gp_input_line_len) { extend_input_line(); /* read rest of line, don't print "> " */ start = last + 1; more = TRUE; continue; /* else fall through to continuation handling */ } /* if(grow buffer?) */ if (gp_input_line[last] == '\\') { /* line continuation */ start = last; more = TRUE; } else more = FALSE; } else more = FALSE; } } while (more); return (0); } #endif /* !VMS */ #if defined(_Windows) # if defined(USE_OWN_WINSYSTEM_FUNCTION) /* there is a system like call on MS Windows but it is a bit difficult to use, so we will invoke the command interpreter and use it to execute the commands */ static int winsystem(const char *s) { LPSTR comspec; LPSTR execstr; LPCSTR p; /* get COMSPEC environment variable */ char envbuf[81]; GetEnvironmentVariable("COMSPEC", envbuf, 80); if (*envbuf == NUL) comspec = "\\command.com"; else comspec = envbuf; /* if the command is blank we must use command.com */ p = s; while ((*p == ' ') || (*p == '\n') || (*p == '\r')) p++; if (*p == NUL) { WinExec(comspec, SW_SHOWNORMAL); } else { /* attempt to run the windows/dos program via windows */ if (WinExec(s, SW_SHOWNORMAL) <= 32) { /* attempt to run it as a dos program from command line */ execstr = gp_alloc(strlen(s) + strlen(comspec) + 6, "winsystem cmdline"); strcpy(execstr, comspec); strcat(execstr, " /c "); strcat(execstr, s); WinExec(execstr, SW_SHOWNORMAL); free(execstr); } } /* regardless of the reality return OK - the consequences of */ /* failure include shutting down Windows */ return (0); /* success */ } # endif /* USE_OWN_WINSYSTEM_FUNCTION */ void call_kill_pending_Pause_dialog() { kill_pending_Pause_dialog(); } #endif /* _Windows */ #ifdef GP_MACROS /* * Walk through the input line looking for string variables preceded by @. * Replace the characters @<varname> with the contents of the string. * Anything inside quotes is not expanded. * Allow up to 3 levels of nested macros. */ void string_expand_macros() { if (expand_macros) { if (expand_1level_macros() && expand_1level_macros() && expand_1level_macros() && expand_1level_macros()) int_error(NO_CARET, "Macros nested too deeply"); } } #define COPY_CHAR gp_input_line[o++] = *c; \ after_backslash = FALSE; int expand_1level_macros() { TBOOLEAN in_squote = FALSE; TBOOLEAN in_dquote = FALSE; TBOOLEAN after_backslash = FALSE; TBOOLEAN in_comment= FALSE; int len; int o = 0; int nfound = 0; char *c; char *temp_string; char temp_char; char *m; struct udvt_entry *udv; /* Most lines have no macros */ if (!strchr(gp_input_line,'@')) return(0); temp_string = gp_alloc(gp_input_line_len,"string variable"); len = strlen(gp_input_line); if (len >= gp_input_line_len) len = gp_input_line_len-1; strncpy(temp_string,gp_input_line,len); temp_string[len] = '\0'; for (c=temp_string; len && c && *c; c++, len--) { switch (*c) { case '@': /* The only tricky bit */ if (!in_squote && !in_dquote && !in_comment && isalpha(c[1])) { /* Isolate the udv key as a null-terminated substring */ m = ++c; while (isalnum(*c) || (*c=='_')) c++; temp_char = *c; *c = '\0'; /* Look up the key and restore the original following char */ udv = add_udv_by_name(m); if (udv && udv->udv_value.type == STRING) { nfound++; m = udv->udv_value.v.string_val; FPRINTF((stderr,"Replacing @%s with \"%s\"\n",udv->udv_name,m)); while (strlen(m) + o + len > gp_input_line_len) extend_input_line(); while (*m) gp_input_line[o++] = (*m++); } else { int_warn( NO_CARET, "%s is not a string variable",m); } *c-- = temp_char; } else COPY_CHAR; break; case '"': if (!after_backslash) in_dquote = !in_dquote; COPY_CHAR; break; case '\'': in_squote = !in_squote; COPY_CHAR; break; case '\\': if (in_dquote) after_backslash = !after_backslash; gp_input_line[o++] = *c; break; case '#': if (!in_squote && !in_dquote) in_comment = TRUE; default : COPY_CHAR; break; } } gp_input_line[o] = '\0'; free(temp_string); if (nfound) FPRINTF((stderr, "After string substitution command line is:\n\t%s\n", gp_input_line)); return(nfound); } #endif /* much more than what can be useful */ #define MAX_TOTAL_LINE_LEN (1024 * MAX_LINE_LEN) int do_system_func(const char *cmd, char **output) { #if defined(VMS) || defined(PIPES) int c; FILE *f; size_t cmd_len; int result_allocated, result_pos; char* result; int ierr = 0; # if defined(VMS) int chan, one = 1; struct dsc$descriptor_s pgmdsc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0}; static $DESCRIPTOR(lognamedsc, "PLOT$MAILBOX"); # endif /* VMS */ cmd_len = strlen(cmd); /* open stream */ # ifdef VMS pgmdsc.dsc$a_pointer = cmd; pgmdsc.dsc$w_length = cmd_len; if (!((vaxc$errno = sys$crembx(0, &chan, 0, 0, 0, 0, &lognamedsc)) & 1)) os_error(NO_CARET, "sys$crembx failed"); if (!((vaxc$errno = lib$spawn(&pgmdsc, 0, &lognamedsc, &one)) & 1)) os_error(NO_CARET, "lib$spawn failed"); if ((f = fopen("PLOT$MAILBOX", "r")) == NULL) os_error(NO_CARET, "mailbox open failed"); # else /* everyone else */ restrict_popen(); if ((f = popen(cmd, "r")) == NULL) os_error(NO_CARET, "popen failed"); # endif /* everyone else */ /* get output */ result_pos = 0; result_allocated = MAX_LINE_LEN; result = gp_alloc(MAX_LINE_LEN, "do_system_func"); result[0] = NUL; while (1) { if ((c = getc(f)) == EOF) break; /* result <- c */ result[result_pos++] = c; if ( result_pos == result_allocated ) { if ( result_pos >= MAX_TOTAL_LINE_LEN ) { result_pos--; int_warn(NO_CARET, "*very* long system call output has been truncated"); break; } else { result = gp_realloc(result, result_allocated + MAX_LINE_LEN, "extend in do_system_func"); result_allocated += MAX_LINE_LEN; } } } result[result_pos] = NUL; /* close stream */ ierr = pclose(f); result = gp_realloc(result, strlen(result)+1, "do_system_func"); *output = result; return ierr; #else /* VMS || PIPES */ int_warn(NO_CARET, "system() requires support for pipes"); *output = gp_strdup(""); return 0; #endif /* VMS || PIPES */ } �����������������������������������������������������������������gnuplot-4.6.4/src/binary.h��������������������������������������������������������������������������0000644�0004711�0000144�00000005610�10700505621�012353� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: binary.h,v 1.11 2007/10/02 18:18:57 sfeam Exp $ */ /* GNUPLOT - binary.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_BINARY_H # define GNUPLOT_BINARY_H #include "syscfg.h" #include "stdfn.h" /* Routines for interfacing with command.c */ float GPFAR *alloc_vector __PROTO(( int nl, int nh)); float GPFAR *extend_vector __PROTO((float GPFAR *vec, int old_nl, int new_nh)); float GPFAR *retract_vector __PROTO((float GPFAR *v, int old_nl, int new_nh)); float GPFAR * GPFAR *matrix __PROTO(( int nrl, int nrh, int ncl, int nch)); float GPFAR * GPFAR *extend_matrix __PROTO(( float GPFAR * GPFAR *a, int nrl, int nrh, int ncl, int nch, int srh, int sch)); float GPFAR * GPFAR *retract_matrix __PROTO(( float GPFAR * GPFAR *a, int nrl, int nrh, int ncl, int nch, int srh, int sch)); void free_matrix __PROTO((float GPFAR * GPFAR *m, int nrl, int nrh, int ncl)); void free_vector __PROTO((float GPFAR *vec, int nl)); int is_binary_file __PROTO((FILE *fp)); int fread_matrix __PROTO((FILE *fin, float GPFAR * GPFAR * GPFAR *ret_matrix, int *nr, int *nc, float GPFAR * GPFAR *row_title, float GPFAR * GPFAR *column_title)); int fwrite_matrix __PROTO((FILE *fout, float GPFAR * GPFAR *m, int nrl, int nrh, int ncl, int nch, float GPFAR *row_title, float GPFAR *column_title)); float GPFAR * GPFAR *convert_matrix __PROTO((float GPFAR *a, int nrl, int nrh, int ncl, int nch)); void free_convert_matrix __PROTO((float GPFAR* GPFAR *b, int nrl)); #endif /* GNUPLOT_BINARY_H */ ������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/stats.h���������������������������������������������������������������������������0000644�0004711�0000144�00000000334�11642177422�012235� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: stats.h,v 1.1 2011/10/03 00:17:22 sfeam Exp $ */ /* GNUPLOT - stats.h */ #ifndef GNUPLOT_STAT_H # define GNUPLOT_STAT_H #include "syscfg.h" void statsrequest __PROTO((void)); #endif /* GNUPLOT_STAT_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/breaders.h������������������������������������������������������������������������0000644�0004711�0000144�00000004106�11245664057�012673� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: breaders.h,v 1.5 2009/08/28 05:16:31 sfeam Exp $ */ /* GNUPLOT - binedf.h */ /*[ * Copyright 2004 Petr Mikulik * * As part of the program Gnuplot, which is * * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_BINEDF_H # define GNUPLOT_BINEDF_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "syscfg.h" /* Prototypes of functions exported by breaders.c */ void edf_filetype_function __PROTO((void)); void png_filetype_function __PROTO((void)); void gif_filetype_function __PROTO((void)); void jpeg_filetype_function __PROTO((void)); int df_libgd_get_pixel __PROTO((int i, int j, int component)); #endif /* GNUPLOT_BINEDF_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/variable.h������������������������������������������������������������������������0000644�0004711�0000144�00000007532�10767604741�012701� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: variable.h,v 1.17 2008/03/18 00:16:33 sfeam Exp $ */ /* GNUPLOT - variable.h */ /*[ * Copyright 1999, 2004 Lars Hecking * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* The death of global variables - part one. */ #ifndef VARIABLE_H # define VARIABLE_H #include "syscfg.h" #include "national.h" /* Generic defines */ #ifdef ACTION_NULL # undef ACTION_NULL #endif #ifdef ACTION_INIT # undef ACTION_INIT #endif #ifdef ACTION_SHOW # undef ACTION_SHOW #endif #ifdef ACTION_SET # undef ACTION_SET #endif #ifdef ACTION_GET # undef ACTION_GET #endif #ifndef ACTION_SAVE # undef ACTION_SAVE #endif #ifdef ACTION_CLEAR # undef ACTION_CLEAR #endif #define ACTION_NULL 0 #define ACTION_INIT (1<<0) #define ACTION_SHOW (1<<1) #define ACTION_SET (1<<2) #define ACTION_GET (1<<3) #define ACTION_SAVE (1<<4) #define ACTION_CLEAR (1<<5) /* Loadpath related */ char *loadpath_handler __PROTO((int, char *)); #define init_loadpath() loadpath_handler(ACTION_INIT,NULL) #define set_var_loadpath(path) loadpath_handler(ACTION_SET,(path)) #define get_loadpath() loadpath_handler(ACTION_GET,NULL) #define save_loadpath() loadpath_handler(ACTION_SAVE,NULL) #define clear_loadpath() loadpath_handler(ACTION_CLEAR,NULL) /* Fontpath related */ char *fontpath_handler __PROTO((int, char *)); #define init_fontpath() fontpath_handler(ACTION_INIT,NULL) #define set_var_fontpath(path) fontpath_handler(ACTION_SET,(path)) #define get_fontpath() fontpath_handler(ACTION_GET,NULL) #define save_fontpath() fontpath_handler(ACTION_SAVE,NULL) #define clear_fontpath() fontpath_handler(ACTION_CLEAR,NULL) /* Locale related */ char *locale_handler __PROTO((int, char *)); #define INITIAL_LOCALE ("C") #define init_locale() locale_handler(ACTION_INIT,NULL) #define set_var_locale(path) locale_handler(ACTION_SET,(path)) #define get_time_locale() locale_handler(ACTION_GET,NULL) #ifdef HAVE_LOCALE_H #define set_numeric_locale() \ do {if (numeric_locale && strcmp(numeric_locale,"C")) setlocale(LC_NUMERIC,numeric_locale);} while (0) #define reset_numeric_locale() \ do {if (numeric_locale && strcmp(numeric_locale,"C")) setlocale(LC_NUMERIC,"C");} while (0) #define get_decimal_locale() \ (localeconv()->decimal_point) #else #define set_numeric_locale() #define reset_numeric_locale() #define get_decimal_locale() "." #endif extern char full_month_names[12][32]; extern char abbrev_month_names[12][8]; extern char full_day_names[7][32]; extern char abbrev_day_names[7][8]; #endif /* VARIABLE_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/gpexecute.h�����������������������������������������������������������������������0000644�0004711�0000144�00000005065�10221356372�013071� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - gpexecute.h */ /*[ * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Original Software (October 1999 - January 2000): * Pieter-Tjerk de Boer <ptdeboer@cs.utwente.nl> * Petr Mikulik <mikulik@physics.muni.cz> * Johannes Zellner <johannes@zellner.org> */ #ifndef GPEXECUTE_H #define GPEXECUTE_H #include "syscfg.h" #include "mousecmn.h" #ifdef OS2_IPC #define INCL_DOSPROCESS #define INCL_DOSSEMAPHORES #include <os2.h> void gp_execute(char *command); extern char mouseShareMemName[]; extern PVOID input_from_PM_Terminal; extern HEV semInputReady; extern int pausing; extern ULONG ppidGnu; /* forward declarations */ void gp_post_shared_mem __PROTO((void)); void gp_execute __PROTO((char *s)); #endif /* OS2_IPC */ #ifdef PIPE_IPC extern int pipe_died; RETSIGTYPE pipe_died_handler __PROTO((int signum)); #endif /* PIPE_IPC */ #if defined(PIPE_IPC) || defined(WIN_IPC) typedef struct gpe_fifo_t { struct gpe_fifo_t* prev; struct gp_event_t ge; struct gpe_fifo_t* next; } gpe_fifo_t; extern int buffered_output_pending; #endif /* PIPE_IPC || WIN_IPC */ void gp_exec_event __PROTO((char type, int mx, int my, int par1, int par2, int winid)); #endif /* GPEXECUTE_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/history.c�������������������������������������������������������������������������0000644�0004711�0000144�00000033104�11676710605�012577� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: history.c,v 1.28.2.1 2011/12/28 19:30:43 sfeam Exp $"); } #endif /* GNUPLOT - history.c */ /*[ * Copyright 1986 - 1993, 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include <stdio.h> #include "gp_hist.h" #include "alloc.h" #include "plot.h" #include "util.h" /* moved here from plot.c */ #ifdef GNUPLOT_HISTORY # ifndef HISTORY_SIZE /* Can be overriden with the environment variable 'GNUPLOT_HISTORY_SIZE' */ # define HISTORY_SIZE 666 # endif long int gnuplot_history_size = HISTORY_SIZE; #endif #if defined(READLINE) && !defined(HAVE_LIBREADLINE) && !defined(HAVE_LIBEDITLINE) struct hist *history = NULL; /* no history yet */ struct hist *cur_entry = NULL; /* add line to the history */ void add_history(char *line) { static struct hist *first_entry = NULL; /* this points to first entry in history list, whereas "history" points to last entry */ static long int hist_count = 0; /* number of entries in history list */ struct hist *entry; entry = history; while (entry != NULL) { /* Don't store duplicate entries */ if (!strcmp(entry->line, line)) { /* cmd lines are equal, relink entry that was found last */ if (entry->next == NULL) { /* previous command repeated, no change */ return; } if (entry->prev == NULL) { /* current cmd line equals the first in the history */ (entry->next)->prev = NULL; first_entry = entry->next; history->next = entry; entry->prev = history; entry->next = NULL; history = entry; return; } /* bridge over entry's vacancy, then move it to the end */ (entry->prev)->next = entry->next; (entry->next)->prev = entry->prev; entry->prev = history; history->next = entry; entry->next = NULL; history = entry; return; } entry = entry->prev; } /* end of not-storing duplicated entries */ #ifdef GNUPLOT_HISTORY /* limit size of history list to "gnuplot_history_size" */ if (gnuplot_history_size != -1) { while ((hist_count >= gnuplot_history_size) && (first_entry != NULL)) { entry = first_entry; /* remove first entry from chain */ first_entry = first_entry->next; if (first_entry) { first_entry->prev = NULL; } hist_count--; /* remove references */ if (cur_entry == entry) cur_entry = first_entry; if (history == entry) { cur_entry = history = NULL; hist_count = 0; } free( entry->line ); free( entry ); } } #endif entry = (struct hist *) gp_alloc(sizeof(struct hist), "history"); entry->line = gp_strdup(line); entry->prev = history; entry->next = NULL; if (history != NULL) { history->next = entry; } else { first_entry = entry; } history = entry; hist_count++; } /* * New functions for browsing the history. They are called from command.c * when the user runs the 'history' command */ /* write <n> last entries of the history to the file <filename> * Input parameters: * n > 0 ... write only <n> last entries; otherwise all entries * filename == NULL ... write to stdout; otherwise to the filename * filename == "" ... write to stdout, but without entry numbers * mode ... should be "w" or "a" to select write or append for file, * ignored if history is written to a pipe */ void write_history_n(const int n, const char *filename, const char *mode) { struct hist *entry = history, *start = NULL; FILE *out = stdout; #ifdef PIPES int is_pipe = 0; /* not filename but pipe to an external program */ #endif int hist_entries = 0; int hist_index = 1; if (entry == NULL) return; /* no history yet */ /* find the beginning of the history and count nb of entries */ while (entry->prev != NULL) { entry = entry->prev; hist_entries++; if (n <= 0 || hist_entries <= n) start = entry; /* listing will start from this entry */ } entry = start; hist_index = (n > 0) ? GPMAX(hist_entries - n, 0) + 1 : 1; /* now write the history */ if (filename != NULL && filename[0]) { #ifdef PIPES if (filename[0]=='|') { restrict_popen(); out = popen(filename+1, "w"); is_pipe = 1; } else #endif out = fopen(filename, mode); } if (!out) { /* cannot use int_error() because we are just exiting gnuplot: int_error(NO_CARET, "cannot open file for saving the history"); */ fprintf(stderr, "Warning: cannot open file %s for saving the history.", filename); } else { while (entry != NULL) { /* don't add line numbers when writing to file * to make file loadable */ if (filename) { if (filename[0]==0) fputs(" ", out); fprintf(out, "%s\n", entry->line); } else fprintf(out, "%5i %s\n", hist_index++, entry->line); entry = entry->next; } if (filename != NULL && filename[0]) { #ifdef PIPES if (is_pipe) pclose(out); else #endif fclose(out); } } } /* obviously the same routine as in GNU readline, according to code from * plot.c:#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) */ void write_history(char *filename) { write_history_n(0, filename, "w"); } /* routine to read history entries from a file, * this complements write_history and is necessary for * saving of history when we are not using libreadline */ void read_history(char *filename) { FILE *hist_file; if ((hist_file = fopen( filename, "r" ))) { while (!feof(hist_file)) { char *pline, line[MAX_LINE_LEN+1]; pline = fgets(line, MAX_LINE_LEN, hist_file); if (pline) { /* remove trailing linefeed */ if ((pline = strrchr(line, '\n'))) *pline = '\0'; if ((pline = strrchr(line, '\r'))) *pline = '\0'; add_history(line); } } fclose(hist_file); } } /* finds and returns a command from the history which starts with <cmd> * (ignores leading spaces in <cmd>) * Returns NULL if nothing found */ const char * history_find(char *cmd) { struct hist *entry = history; size_t len; char *line; if (entry == NULL) return NULL; /* no history yet */ if (*cmd == '"') cmd++; /* remove surrounding quotes */ if (!*cmd) return NULL; len = strlen(cmd); if (cmd[len - 1] == '"') cmd[--len] = 0; if (!*cmd) return NULL; /* search through the history */ while (entry != NULL) { line = entry->line; while (isspace((unsigned char) *line)) line++; /* skip leading spaces */ if (!strncmp(cmd, line, len)) /* entry found */ return line; entry = entry->prev; } return NULL; } /* finds and print all occurencies of commands from the history which * start with <cmd> * (ignores leading spaces in <cmd>) * Returns 1 on success, 0 if no such entry exists */ int history_find_all(char *cmd) { struct hist *entry = history; int hist_index = 1; char res = 0; int len; char *line; if (entry == NULL) return 0; /* no history yet */ if (*cmd == '"') cmd++; /* remove surrounding quotes */ if (!*cmd) return 0; len = strlen(cmd); if (cmd[len - 1] == '"') cmd[--len] = 0; if (!*cmd) return 0; /* find the beginning of the history */ while (entry->prev != NULL) entry = entry->prev; /* search through the history */ while (entry != NULL) { line = entry->line; while (isspace((unsigned char) *line)) line++; /* skip leading spaces */ if (!strncmp(cmd, line, len)) { /* entry found */ printf("%5i %s\n", hist_index, line); res = 1; } entry = entry->next; hist_index++; } return res; } #elif defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) /* Save history to file, or write to stdout or pipe. * For pipes, only "|" works, pipes starting with ">" get a strange * filename like in the non-readline version. * * Peter Weilbacher, 28Jun2004 */ void write_history_list(const int num, const char *const filename, const char *mode) { const HIST_ENTRY *list_entry; FILE *out = stdout; int is_pipe = 0; int is_file = 0; int is_quiet = 0; int i, istart; if (filename && filename[0] ) { /* good filename given and not quiet */ #ifdef PIPES if (filename[0]=='|') { restrict_popen(); out = popen(filename+1, "w"); is_pipe = 1; } else { #endif if (! (out = fopen(filename, mode) ) ) { /* Fall back to 'stdout' */ int_warn(NO_CARET, "Cannot open file to save history, using standard output.\n"); out = stdout; } else is_file = 1; #ifdef PIPES } #endif } else if (filename && !filename[0]) is_quiet = 1; /* Determine starting point and output in loop. * For some reason the readline functions append_history() * and write_history() do not work they way I thought they did... */ if (num > 0) { istart = history_length - num; if (istart <= 0 || istart > history_length) istart = 1; } else istart = 1; for (i = istart; (list_entry = history_get(i)); i++) { /* don't add line numbers when writing to file to make file loadable */ if (is_file) fprintf(out, "%s\n", list_entry->line); else { if (!is_quiet) fprintf(out, "%5i", i + history_base - 1); fprintf(out, " %s\n", list_entry->line); } } /* close if something was opened */ #ifdef PIPES if (is_pipe) pclose(out); #endif if (is_file) fclose(out); } /* This is the function getting called in command.c */ void write_history_n(const int n, const char *filename, const char *mode) { write_history_list(n, filename, mode); } /* finds and returns a command from the history which starts with <cmd> * Returns NULL if nothing found * * Peter Weilbacher, 28Jun2004 */ const char * history_find(char *cmd) { int len; /* quote removal, copied from non-readline version */ if (*cmd == '"') cmd++; if (!*cmd) return 0; len = strlen(cmd); if (cmd[len - 1] == '"') cmd[--len] = 0; if (!*cmd) return 0; /* printf ("searching for '%s'\n", cmd); */ /* Anchored backward search for prefix */ if (history_search_prefix(cmd, -1) == 0) return current_history()->line; return NULL; } /* finds and print all occurencies of commands from the history which * start with <cmd> * Returns the number of found entries on success, * and 0 if no such entry exists * * Peter Weilbacher 28Jun2004 */ int history_find_all(char *cmd) { int len; int found; int number = 0; /* each found entry increases this */ /* quote removal, copied from non-readline version */ if (*cmd == '"') cmd++; if (!*cmd) return 0; len = strlen(cmd); if (cmd[len - 1] == '"') cmd[--len] = 0; if (!*cmd) return 0; /* printf ("searching for all occurrences of '%s'\n", cmd); */ /* Output matching history entries in chronological order (not backwards * so we have to start at the beginning of the history list. */ #if defined(HAVE_LIBREADLINE) found = history_set_pos(0); if (found == -1) { fprintf(stderr, "ERROR (history_find_all): could not rewind history\n"); return 0; } #else /* HAVE_LIBEDITLINE */ /* libedit's history_set_pos() does not work properly, so we manually go to oldest entry */ while (next_history()); #endif do { found = history_search_prefix(cmd, 1); /* Anchored backward search for prefix */ if (found == 0) { number++; #if defined(HAVE_LIBREADLINE) printf("%5i %s\n", where_history() + history_base, current_history()->line); /* go one step back or you find always the same entry. */ if (!history_set_pos(where_history() + 1)) break; /* finished if stepping didn't work */ #else /* HAVE_LIBEDITLINE */ /* libedit's history indices are reversed wrt GNU readline */ printf("%5i %s\n", history_length - where_history() + history_base, current_history()->line); /* go one step back or you find always the same entry. */ if (!previous_history()) break; /* finished if stepping didn't work */ #endif } /* (found == 0) */ } while (found > -1); return number; } #endif /* READLINE && !HAVE_LIBREADLINE && !HAVE_LIBEDITLINE */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/util.h����������������������������������������������������������������������������0000644�0004711�0000144�00000011206�12162200516�012041� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: util.h,v 1.36.2.3 2013/06/23 22:13:36 markisch Exp $ */ /* GNUPLOT - util.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_UTIL_H # define GNUPLOT_UTIL_H #include "gp_types.h" #include "stdfn.h" /* for size_t */ /* special token number meaning 'do not draw the "caret"', for * int_error and friends: */ #define NO_CARET (-1) /* token number meaning 'the error was in the datafile, not the command line' */ #define DATAFILE (-2) /* TRUE if command just typed; becomes FALSE whenever we * send some other output to screen. If FALSE, the command line * will be echoed to the screen before the ^ error message. */ extern TBOOLEAN screen_ok; /* decimal sign */ extern char *decimalsign; extern char *numeric_locale; /* LC_NUMERIC */ extern char *current_locale; /* LC_TIME */ /* degree sign */ extern char degree_sign[8]; extern const char *current_prompt; /* needed by is_error() and friends */ /* Functions exported by util.c: */ /* Command parsing helpers: */ int equals __PROTO((int, const char *)); int almost_equals __PROTO((int, const char *)); int isstring __PROTO((int)); int isanumber __PROTO((int)); int isletter __PROTO((int)); int is_definition __PROTO((int)); void copy_str __PROTO((char *, int, int)); size_t token_len __PROTO((int)); void quote_str __PROTO((char *, int, int)); void capture __PROTO((char *, int, int, int)); void m_capture __PROTO((char **, int, int)); void m_quote_capture __PROTO((char **, int, int)); char *try_to_get_string __PROTO((void)); void parse_esc __PROTO((char *)); int type_udv __PROTO((int)); char *gp_stradd __PROTO((const char *, const char *)); #define isstringvalue(c_token) (isstring(c_token) || type_udv(c_token)==STRING) /* HBB 20010726: IMHO this one belongs into alloc.c: */ char *gp_strdup __PROTO((const char *)); /* HBB 20020405: moved this here, from axis.[ch] */ void gprintf __PROTO((char *, size_t, char *, double, double)); /* Error message handling */ #if defined(VA_START) && defined(STDC_HEADERS) # if defined(__GNUC__) void os_error __PROTO((int, const char *, ...)) __attribute__((noreturn)); void int_error __PROTO((int, const char *, ...)) __attribute__((noreturn)); void graph_error __PROTO((const char *, ...)) __attribute__((noreturn)); # else void os_error __PROTO((int, const char *, ...)); void int_error __PROTO((int, const char *, ...)); void graph_error __PROTO((const char *, ...)); # endif void int_warn __PROTO((int, const char *, ...)); #else void os_error __PROTO(()); void int_error __PROTO(()); void int_warn __PROTO(()); void graph_error __PROTO(()); #endif /* FIXME HBB 20010726: should be moved to where help_comamnd() is, and * made static. Currently, that's command.c, but it should probably * move to help.c, instead. */ void squash_spaces __PROTO((char *)); TBOOLEAN existdir __PROTO((const char *)); TBOOLEAN existfile(const char *); char *getusername __PROTO((void)); TBOOLEAN contains8bit __PROTO((const char *s)); TBOOLEAN utf8toulong __PROTO((unsigned long * wch, const char ** str)); size_t strlen_utf8 __PROTO((const char *s)); size_t gp_strlen __PROTO((const char *s)); char * gp_strchrn __PROTO((const char *s, int N)); TBOOLEAN streq __PROTO((const char *a, const char *b)); #endif /* GNUPLOT_UTIL_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/stdfn.c���������������������������������������������������������������������������0000644�0004711�0000144�00000025762�11636346765�012237� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: stdfn.c,v 1.25 2011/09/21 11:43:49 markisch Exp $"); } #endif /* GNUPLOT - stdfn.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* This module collects various functions, which were previously scattered * all over the place. In a future implementation of gnuplot, each of * these functions will probably reside in their own file in a subdirectory. * - Lars Hecking */ #include "stdfn.h" #ifdef WIN32 /* the WIN32 API has a Sleep function that does not consume CPU cycles */ #include <windows.h> #ifndef HAVE_DIRENT_H #include <io.h> /* _findfirst and _findnext set errno iff they return -1 */ #endif #endif /* * ANSI C functions */ /* memcpy() */ #ifndef HAVE_MEMCPY # ifndef HAVE_BCOPY /* * cheap and slow version of memcpy() in case you don't have one */ char * memcpy(char *dest, char *src, size_t len) { while (len--) *dest++ = *src++; return dest; } # endif /* !HAVE_BCOPY */ #endif /* HAVE_MEMCPY */ /* strchr() * Simple and portable version, conforming to Plauger. * Would this be more efficient as a macro? */ #ifndef HAVE_STRCHR # ifndef HAVE_INDEX char * strchr(const char *s, int c) { do { if (*s == (char) c) return s; } while (*s++ != (char) 0); return NULL; } # endif /* !HAVE_INDEX */ #endif /* HAVE_STRCHR */ /* memset () * * Since we want to use memset, we have to map a possibly nonzero fill byte * to the bzero function. The following defined might seem a bit odd, but I * think this is the only possible way. */ #ifndef HAVE_MEMSET # ifdef HAVE_BZERO # define memset(s, b, l) \ do { \ assert((b)==0); \ bzero((s), (l)); \ } while(0) # else # define memset NO_MEMSET_OR_BZERO # endif /* HAVE_BZERO */ #endif /* HAVE_MEMSET */ /* strerror() */ #ifndef HAVE_STRERROR char * strerror(int no) { static char res_str[30]; if (no > sys_nerr) { sprintf(res_str, "unknown errno %d", no); return res_str; } else { return sys_errlist[no]; } } #endif /* HAVE_STRERROR */ /* strstr() */ #ifndef HAVE_STRSTR char * strstr(const char *cs, const char *ct) { size_t len; if (!cs || !ct) return NULL; if (!*ct) return (char *) cs; len = strlen(ct); while (*cs) { if (strncmp(cs, ct, len) == 0) return (char *) cs; cs++; } return NULL; } #endif /* HAVE_STRSTR */ /* * POSIX functions */ #ifndef HAVE_SLEEP /* The implementation below does not even come close * to what is required by POSIX.1, but I suppose * it doesn't really matter on these systems. lh */ unsigned int sleep(unsigned int delay) { #if defined(MSDOS) # if !((defined(__EMX__) || defined(DJGPP)) /* kludge to provide sleep() for msc 5.1 */ unsigned long time_is_up; time_is_up = time(NULL) + (unsigned long) delay; while (time(NULL) < time_is_up) /* wait */ ; # endif #elif defined(WIN32) Sleep((DWORD) delay * 1000); #endif /* MSDOS ... */ return 0; } #endif /* HAVE_SLEEP */ /* * Other common functions */ /***************************************************************** portable implementation of strnicmp (hopefully) *****************************************************************/ #ifndef HAVE_STRCASECMP # ifndef HAVE_STRICMP /* return (see MSVC documentation and strcasecmp()): * -1 if str1 < str2 * 0 if str1 == str2 * 1 if str1 > str2 */ int gp_stricmp(const char *s1, const char *s2) { unsigned char c1, c2; do { c1 = *s1++; if (islower(c1)) c1 = toupper(c1); c2 = *s2++; if (islower(c2)) c2 = toupper(c2); } while (c1 == c2 && c1 && c2); if (c1 == c2) return 0; if (c1 == '\0' || c1 > c2) return 1; return -1; } # endif /* !HAVE_STRCASECMP */ #endif /* !HAVE_STRNICMP */ /***************************************************************** portable implementation of strnicmp (hopefully) *****************************************************************/ #ifndef HAVE_STRNCASECMP # ifndef HAVE_STRNICMP int gp_strnicmp(const char *s1, const char *s2, size_t n) { unsigned char c1, c2; if (n == 0) return 0; do { c1 = *s1++; if (islower(c1)) c1 = toupper(c1); c2 = *s2++; if (islower(c2)) c2 = toupper(c2); } while (c1 == c2 && c1 && c2 && --n > 0); if (n == 0 || c1 == c2) return 0; if (c1 == '\0' || c1 > c2) return 1; return -1; } # endif /* !HAVE_STRNCASECMP */ #endif /* !HAVE_STRNICMP */ #ifndef HAVE_STRNLEN size_t strnlen(const char *str, size_t n) { const char * stop = (char *)memchr(str, '\0', n); return stop ? stop - str : n; } #endif #ifndef HAVE_STRNDUP char * strndup(const char * str, size_t n) { char * ret = NULL; size_t len = strnlen(str, n); ret = (char *) malloc(len + 1); if (ret == NULL) return NULL; ret[len] = '\0'; return (char *)memcpy(ret, str, len); } #endif /* Safe, '\0'-terminated version of strncpy() * safe_strncpy(dest, src, n), where n = sizeof(dest) * This is basically the old fit.c(copy_max) function */ char * safe_strncpy(char *d, const char *s, size_t n) { char *ret; ret = strncpy(d, s, n); if (strlen(s) >= n) d[n > 0 ? n - 1 : 0] = NUL; return ret; } #ifndef HAVE_STRCSPN /* * our own substitute for strcspn() * return the length of the inital segment of str1 * consisting of characters not in str2 * returns strlen(str1) if none of the characters * from str2 are in str1 * based in misc.c(instring) */ size_t gp_strcspn(const char *str1, const char *str2) { char *s; size_t pos; if (!str1 || !str2) return 0; pos = strlen(str1); while (*str2++) if (s = strchr(str1, *str2)) if ((s - str1) < pos) pos = s - str1; return (pos); } #endif /* !HAVE_STRCSPN */ double gp_strtod(const char *str, char **endptr) { #if (0) /* replace with test for platforms with broken strtod() */ int used; double d; int n = sscanf(str, "%lf%n", &d, &used); if (n < 1) *endptr = (char *)str; else *endptr = (char *)(str + used); return d; #else return strtod(str,endptr); #endif } /* Implement portable generation of a NaN value. */ /* NB: Supposedly DJGPP V2.04 can use atof("NaN"), but... */ double not_a_number(void) { #if defined (__MSC__) || defined (DJGPP) || defined(__DJGPP__) || defined(__MINGW32__) unsigned long lnan[2]={0xffffffff, 0x7fffffff}; return *( double* )lnan; #else return atof("NaN"); #endif } /* Version of basename, which does take two possible separators into account and does not modify its argument. */ char * gp_basename(char *path) { char * basename = strrchr(path, DIRSEP1); if (basename) { basename++; return basename; } #if DIRSEP2 != NUL basename = strrchr(path, DIRSEP2); if (basename) { basename++; return basename; } #endif /* no path separator found */ return path; } #if !defined(HAVE_DIRENT_H) && defined(WIN32) && (!defined(__WATCOMC__)) /* BM: OpenWatcom has dirent functions in direct.h!*/ /* Implementation of POSIX directory browsing functions and types for Win32. Author: Kevlin Henney (kevlin@acm.org, kevlin@curbralan.com) History: Created March 1997. Updated June 2003. Rights: See end of section. */ struct DIR { long handle; /* -1 for failed rewind */ struct _finddata_t info; struct dirent result; /* d_name null iff first time */ char *name; /* null-terminated char string */ }; DIR *opendir(const char *name) { DIR *dir = 0; if (name && name[0]) { size_t base_length = strlen(name); /* search pattern must end with suitable wildcard */ const char *all = strchr("/\\", name[base_length - 1]) ? "*" : "/*"; if ((dir = (DIR *) malloc(sizeof *dir)) != 0 && (dir->name = (char *) malloc(base_length + strlen(all) + 1)) != 0) { strcat(strcpy(dir->name, name), all); if ((dir->handle = (long) _findfirst(dir->name, &dir->info)) != -1) { dir->result.d_name = 0; } else { /* rollback */ free(dir->name); free(dir); dir = 0; } } else { /* rollback */ free(dir); dir = 0; errno = ENOMEM; } } else { errno = EINVAL; } return dir; } int closedir(DIR *dir) { int result = -1; if (dir) { if(dir->handle != -1) { result = _findclose(dir->handle); } free(dir->name); free(dir); } if (result == -1) { /* map all errors to EBADF */ errno = EBADF; } return result; } struct dirent *readdir(DIR *dir) { struct dirent *result = 0; if (dir && dir->handle != -1) { if (!dir->result.d_name || _findnext(dir->handle, &dir->info) != -1) { result = &dir->result; result->d_name = dir->info.name; } } else { errno = EBADF; } return result; } void rewinddir(DIR *dir) { if (dir && dir->handle != -1) { _findclose(dir->handle); dir->handle = (long) _findfirst(dir->name, &dir->info); dir->result.d_name = 0; } else { errno = EBADF; } } /* Copyright Kevlin Henney, 1997, 2003. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose is hereby granted without fee, provided that this copyright and permissions notice appear in all copies and derivatives. This software is supplied "as is" without express or implied warranty. But that said, if there are any problems please get in touch. */ #endif /* !HAVE_DIRENT_H && WIN32 */ ��������������gnuplot-4.6.4/src/pm3d.c����������������������������������������������������������������������������0000644�0004711�0000144�00000112267�12213701611�011732� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: pm3d.c,v 1.85.2.3 2013/09/10 20:39:37 sfeam Exp $"); } #endif /* GNUPLOT - pm3d.c */ /*[ * * Petr Mikulik, since December 1998 * Copyright: open source as much as possible * * What is here: global variables and routines for the pm3d splotting mode. * This file is included only if PM3D is defined. * ]*/ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "pm3d.h" #include "alloc.h" #include "axis.h" #include "graphics.h" #include "graph3d.h" #include "hidden3d.h" /* p_vertex & map3d_xyz() */ #include "plot2d.h" #include "plot3d.h" #include "setshow.h" /* for surface_rot_z */ #include "term_api.h" /* for lp_use_properties() */ #include "command.h" /* for c_token */ #include <stdlib.h> /* qsort() */ /* Needed by routine filled_quadrangle() in color.c */ struct lp_style_type pm3d_border_lp; /* Global options for pm3d algorithm (to be accessed by set / show). */ pm3d_struct pm3d = { "s", /* where[6] */ PM3D_FLUSH_BEGIN, /* flush */ 0, /* no flushing triangles */ PM3D_SCANS_AUTOMATIC, /* scans direction is determined automatically */ PM3D_CLIP_4IN, /* clipping: all 4 points in ranges */ 0, /* no pm3d hidden3d is drawn */ PM3D_EXPLICIT, /* implicit */ PM3D_WHICHCORNER_MEAN, /* color from which corner(s) */ 1, /* interpolate along scanline */ 1 /* interpolate between scanlines */ }; typedef struct { double gray; double z; /* maximal z value after rotation to graph coordinate system */ gpdPoint corners[4]; #ifdef EXTENDED_COLOR_SPECS gpiPoint icorners[4]; #endif t_colorspec *border_color; /* Only used by depthorder processing */ } quadrangle; static int allocated_quadrangles = 0; static int current_quadrangle = 0; static quadrangle* quadrangles = (quadrangle*)0; /* Internal prototypes for this module */ static TBOOLEAN plot_has_palette; static double geomean4 __PROTO((double, double, double, double)); static double median4 __PROTO((double, double, double, double)); static void pm3d_plot __PROTO((struct surface_points *, int)); static void pm3d_option_at_error __PROTO((void)); static void pm3d_rearrange_part __PROTO((struct iso_curve *, const int, struct iso_curve ***, int *)); static void filled_color_contour_plot __PROTO((struct surface_points *, int)); static TBOOLEAN color_from_rgbvar = FALSE; /* * Utility routines. */ /* Geometrical mean = pow( prod(x_i > 0) x_i, 1/N ) * Sign of the result: result is positive if 3 or 4 x_i are positive, * it is negative if 3 or all 4 x_i are negative. Helps to splot surface * with all color coordinates negative. */ static double geomean4 (double x1, double x2, double x3, double x4) { /* honor signess, i.e. sign(geomean) = sign(prod(x_i)) */ int neg = (x1 < 0) + (x2 < 0) + (x3 < 0) + (x4 < 0); x1 *= x2 * x3 * x4; if (x1 == 0) return 0; /* pow(x, 0.25) is slightly faster than sqrt(sqrt(x)) */ x1 = sqrt(sqrt(fabs(x1))); #if 0 /* such a warning could be helpful, but under normal usage it is just an overhead */ if (neg > 1 && interactive && notwarned) { int notwarned = 1; ... to be set on every new splot if (notwarned) int_warn(NO_CARET, "corners2color geomean with negative data points"); notwarned = 0; } #endif return (neg <= 2) ? x1 : -x1; } /* Median: sort values, and then: for N odd, it is the middle value; for N even, * it is mean of the two middle values. */ static double median4 (double x1, double x2, double x3, double x4) { double tmp; /* sort them: x1 < x2 and x3 < x4 */ if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; } if (x3 > x4) { tmp = x3; x3 = x4; x4 = tmp; } /* sum middle numbers */ tmp = (x1 < x3) ? x3 : x1; tmp += (x2 < x4) ? x2 : x4; return tmp * 0.5; } /* Minimum of 4 numbers. */ static double minimum4 (double x1, double x2, double x3, double x4) { x1 = GPMIN(x1, x2); x3 = GPMIN(x3, x4); return GPMIN(x1, x3); } /* Maximum of 4 numbers. */ static double maximum4 (double x1, double x2, double x3, double x4) { x1 = GPMAX(x1, x2); x3 = GPMAX(x3, x4); return GPMAX(x1, x3); } /* * Now the routines which are really just those for pm3d.c */ /* * Rescale z to cb values. Nothing to do if both z and cb are linear or log of the * same base, other it has to un-log z and subsequently log it again. */ double z2cb(double z) { if (!Z_AXIS.log && !CB_AXIS.log) /* both are linear */ return z; if (Z_AXIS.log && !CB_AXIS.log) /* log z, linear cb */ return exp(z * Z_AXIS.log_base); /* unlog(z) */ if (!Z_AXIS.log && CB_AXIS.log) /* linear z, log cb */ return (z<=0) ? CB_AXIS.min : (log(z) / CB_AXIS.log_base); /* both are log */ if (Z_AXIS.base==CB_AXIS.base) /* can we compare double numbers like that? */ return z; return z * Z_AXIS.log_base / CB_AXIS.log_base; /* log_cb(unlog_z(z)) */ } /* * Rescale cb (color) value into the interval of grays [0,1], taking care * of palette being positive or negative. * Note that it is OK for logarithmic cb-axis too. */ double cb2gray(double cb) { if (cb <= CB_AXIS.min) return (sm_palette.positive == SMPAL_POSITIVE) ? 0 : 1; if (cb >= CB_AXIS.max) return (sm_palette.positive == SMPAL_POSITIVE) ? 1 : 0; cb = (cb - CB_AXIS.min) / (CB_AXIS.max - CB_AXIS.min); return (sm_palette.positive == SMPAL_POSITIVE) ? cb : 1-cb; } /* * Rearrange... */ static void pm3d_rearrange_part( struct iso_curve *src, const int len, struct iso_curve ***dest, int *invert) { struct iso_curve *scanA; struct iso_curve *scanB; struct iso_curve **scan_array; int i, scan; int invert_order = 0; /* loop over scans in one surface Scans are linked from this_plot->iso_crvs in the opposite order than they are in the datafile. Therefore it is necessary to make vector scan_array of iso_curves. Scans are sorted in scan_array according to pm3d.direction (this can be PM3D_SCANS_FORWARD or PM3D_SCANS_BACKWARD). */ scan_array = *dest = gp_alloc(len * sizeof(scanA), "pm3d scan array"); if (pm3d.direction == PM3D_SCANS_AUTOMATIC) { int cnt; int len2 = len; TBOOLEAN exit_outer_loop = 0; for (scanA = src; scanA && 0 == exit_outer_loop; scanA = scanA->next, len2--) { int from, i; vertex vA, vA2; if ((cnt = scanA->p_count - 1) <= 0) continue; /* ordering within one scan */ for (from=0; from<=cnt; from++) /* find 1st non-undefined point */ if (scanA->points[from].type != UNDEFINED) { map3d_xyz(scanA->points[from].x, scanA->points[from].y, 0, &vA); break; } for (i=cnt; i>from; i--) /* find the last non-undefined point */ if (scanA->points[i].type != UNDEFINED) { map3d_xyz(scanA->points[i].x, scanA->points[i].y, 0, &vA2); break; } if (i - from > cnt * 0.1) /* it is completely arbitrary to request at least * 10% valid samples in this scan. (joze Jun-05-2002) */ *invert = (vA2.z > vA.z) ? 0 : 1; else continue; /* all points were undefined, so check next scan */ /* check the z ordering between scans * Find last scan. If this scan has all points undefined, * find last but one scan, an so on. */ for (; len2 >= 3 && !exit_outer_loop; len2--) { for (scanB = scanA-> next, i = len2 - 2; i && scanB; i--) scanB = scanB->next; /* skip over to last scan */ if (scanB && scanB->p_count) { vertex vB; for (i = from /* we compare vA.z with vB.z */; i<scanB->p_count; i++) { /* find 1st non-undefined point */ if (scanB->points[i].type != UNDEFINED) { map3d_xyz(scanB->points[i].x, scanB->points[i].y, 0, &vB); invert_order = (vB.z > vA.z) ? 0 : 1; exit_outer_loop = 1; break; } } } } } } FPRINTF((stderr, "(pm3d_rearrange_part) invert = %d\n", *invert)); FPRINTF((stderr, "(pm3d_rearrange_part) invert_order = %d\n", invert_order)); for (scanA = src, scan = len - 1, i = 0; scan >= 0; --scan, i++) { if (pm3d.direction == PM3D_SCANS_AUTOMATIC) { switch (invert_order) { case 1: scan_array[scan] = scanA; break; case 0: default: scan_array[i] = scanA; break; } } else if (pm3d.direction == PM3D_SCANS_FORWARD) scan_array[scan] = scanA; else /* PM3D_SCANS_BACKWARD: i counts scans */ scan_array[i] = scanA; scanA = scanA->next; } } /* * Rearrange scan array * * Allocates *first_ptr (and eventually *second_ptr) * which must be freed by the caller */ void pm3d_rearrange_scan_array( struct surface_points *this_plot, struct iso_curve ***first_ptr, int *first_n, int *first_invert, struct iso_curve ***second_ptr, int *second_n, int *second_invert) { if (first_ptr) { pm3d_rearrange_part(this_plot->iso_crvs, this_plot->num_iso_read, first_ptr, first_invert); *first_n = this_plot->num_iso_read; } if (second_ptr) { struct iso_curve *icrvs = this_plot->iso_crvs; struct iso_curve *icrvs2; int i; /* advance until second part */ for (i = 0; i < this_plot->num_iso_read; i++) icrvs = icrvs->next; /* count the number of scans of second part */ for (i = 0, icrvs2 = icrvs; icrvs2; icrvs2 = icrvs2->next) i++; if (i > 0) { *second_n = i; pm3d_rearrange_part(icrvs, i, second_ptr, second_invert); } else { *second_ptr = (struct iso_curve **) 0; } } } static int compare_quadrangles(const void* v1, const void* v2) { const quadrangle* q1 = (const quadrangle*)v1; const quadrangle* q2 = (const quadrangle*)v2; if (q1->z > q2->z) return 1; else if (q1->z < q2->z) return -1; else return 0; } void pm3d_depth_queue_clear(void) { if (pm3d.direction != PM3D_DEPTH) return; if (quadrangles) free(quadrangles); quadrangles = (quadrangle*)0; allocated_quadrangles = 0; current_quadrangle = 0; } void pm3d_depth_queue_flush(void) { if (pm3d.direction != PM3D_DEPTH) return; if (current_quadrangle > 0 && quadrangles) { quadrangle* qp; quadrangle* qe; gpdPoint* gpdPtr; #ifdef EXTENDED_COLOR_SPECS gpdPoint* gpiPtr; double w = trans_mat[3][3]; #endif vertex out; double z = 0; /* assignment keeps the compiler happy */ int i; for (qp = quadrangles, qe = quadrangles + current_quadrangle; qp != qe; qp++) { gpdPtr = qp->corners; #ifdef EXTENDED_COLOR_SPECS gpiPtr = qp->icorners; #endif for (i = 0; i < 4; i++, gpdPtr++) { map3d_xyz(gpdPtr->x, gpdPtr->y, gpdPtr->z, &out); if (i == 0 || out.z > z) z = out.z; #ifdef EXTENDED_COLOR_SPECS gpiPtr->x = (unsigned int) ((out.x * xscaler / w) + xmiddle); gpiPtr->y = (unsigned int) ((out.y * yscaler / w) + ymiddle); gpiPtr++; #endif } qp->z = z; /* maximal z value of all four corners */ } qsort(quadrangles, current_quadrangle, sizeof (quadrangle), compare_quadrangles); for (qp = quadrangles, qe = quadrangles + current_quadrangle; qp != qe; qp++) { if (color_from_rgbvar) set_rgbcolor(qp->gray); else set_color(qp->gray); if (pm3d.hidden3d_tag < 0) pm3d_border_lp.pm3d_color = *(qp->border_color); #ifdef EXTENDED_COLOR_SPECS ifilled_quadrangle(qp->icorners); #else filled_quadrangle(qp->corners); #endif } } pm3d_depth_queue_clear(); } /* * Now the implementation of the pm3d (s)plotting mode * * Note: the input parameter at_which_z is char, but an old HP cc requires * ANSI C K&R routines with int only. */ static void pm3d_plot(struct surface_points *this_plot, int at_which_z) { int j, i, i1, ii, ii1, from, curve, scan, up_to, up_to_minus, invert = 0; int go_over_pts, max_pts; int are_ftriangles, ftriangles_low_pt = -999, ftriangles_high_pt = -999; struct iso_curve *scanA, *scanB; struct coordinate GPHUGE *pointsA, *pointsB; struct iso_curve **scan_array; int scan_array_n; double avgC, gray; double cb1, cb2, cb3, cb4; gpdPoint corners[4]; int interp_i, interp_j; #ifdef EXTENDED_COLOR_SPECS gpiPoint icorners[4]; #endif gpdPoint **bl_point = NULL; /* used for bilinear interpolation */ /* just a shortcut */ TBOOLEAN color_from_column = this_plot->pm3d_color_from_column; color_from_rgbvar = (this_plot->lp_properties.pm3d_color.type == TC_RGB && this_plot->lp_properties.pm3d_color.value == -1); if (this_plot == NULL) return; /* Apply and save the user-requested line properties */ pm3d_border_lp = this_plot->lp_properties; if (pm3d.hidden3d_tag > 0) lp_use_properties(&pm3d_border_lp, pm3d.hidden3d_tag); term_apply_lp_properties(&pm3d_border_lp); if (at_which_z != PM3D_AT_BASE && at_which_z != PM3D_AT_TOP && at_which_z != PM3D_AT_SURFACE) return; /* return if the terminal does not support filled polygons */ if (!term->filled_polygon) return; switch (at_which_z) { case PM3D_AT_BASE: corners[0].z = corners[1].z = corners[2].z = corners[3].z = base_z; break; case PM3D_AT_TOP: corners[0].z = corners[1].z = corners[2].z = corners[3].z = ceiling_z; break; /* the 3rd possibility is surface, PM3D_AT_SURFACE, coded below */ } scanA = this_plot->iso_crvs; curve = 0; pm3d_rearrange_scan_array(this_plot, &scan_array, &scan_array_n, &invert, (struct iso_curve ***) 0, (int *) 0, (int *) 0); interp_i = pm3d.interp_i; interp_j = pm3d.interp_j; if (interp_i <= 0 || interp_j <= 0) { /* Number of interpolations will be determined from desired number of points. Search for number of scans and maximal number of points in a scan for points which will be plotted (INRANGE). Then set interp_i,j so that number of points will be a bit larger than |interp_i,j|. If (interp_i,j==0) => set this number of points according to DEFAULT_OPTIMAL_NB_POINTS. Ideally this should be comparable to the resulution of the output device, which can hardly by done at this high level instead of the driver level. */ #define DEFAULT_OPTIMAL_NB_POINTS 200 int max_scan_pts = 0; int max_scans = 0; int pts; for (scan = 0; scan < this_plot->num_iso_read - 1; scan++) { scanA = scan_array[scan]; pointsA = scanA->points; pts = 0; for (j=0; j<scanA->p_count; j++) if (pointsA[j].type == INRANGE) pts++; if (pts > 0) { max_scan_pts = GPMAX(max_scan_pts, pts); max_scans++; } } if (interp_i <= 0) { ii = (interp_i == 0) ? DEFAULT_OPTIMAL_NB_POINTS : -interp_i; interp_i = floor(ii / max_scan_pts) + 1; } if (interp_j <= 0) { ii = (interp_j == 0) ? DEFAULT_OPTIMAL_NB_POINTS : -interp_j; interp_j = floor(ii / max_scans) + 1; } #if 0 fprintf(stderr, "pm3d.interp_i=%i\t pm3d.interp_j=%i\n", pm3d.interp_i, pm3d.interp_j); fprintf(stderr, "INRANGE: max_scans=%i max_scan_pts=%i\n", max_scans, max_scan_pts); fprintf(stderr, "seting interp_i=%i\t interp_j=%i => there will be %i and %i points\n", interp_i, interp_j, interp_i*max_scan_pts, interp_j*max_scans); #endif } if (pm3d.direction == PM3D_DEPTH) { for (scan = 0; scan < this_plot->num_iso_read - 1; scan++) { scanA = scan_array[scan]; scanB = scan_array[scan + 1]; are_ftriangles = pm3d.ftriangles && (scanA->p_count != scanB->p_count); if (!are_ftriangles) allocated_quadrangles += GPMIN(scanA->p_count, scanB->p_count) - 1; else { allocated_quadrangles += GPMAX(scanA->p_count, scanB->p_count) - 1; } } allocated_quadrangles *= (interp_i > 1) ? interp_i : 1; allocated_quadrangles *= (interp_j > 1) ? interp_j : 1; quadrangles = (quadrangle*)gp_realloc(quadrangles, allocated_quadrangles * sizeof (quadrangle), "pm3d_plot->quadrangles"); /* DEBUG: fprintf(stderr, "allocated_quadrangles = %d\n", allocated_quadrangles); */ } /* pm3d_rearrange_scan_array(this_plot, (struct iso_curve***)0, (int*)0, &scan_array, &invert); */ #if 0 /* debugging: print scan_array */ for (scan = 0; scan < this_plot->num_iso_read; scan++) { printf("**** SCAN=%d points=%d\n", scan, scan_array[scan]->p_count); } #endif #if 0 /* debugging: this loop prints properties of all scans */ for (scan = 0; scan < this_plot->num_iso_read; scan++) { struct coordinate GPHUGE *points; scanA = scan_array[scan]; printf("\n#IsoCurve = scan nb %d, %d points\n#x y z type(in,out,undef)\n", scan, scanA->p_count); for (i = 0, points = scanA->points; i < scanA->p_count; i++) { printf("%g %g %g %c\n", points[i].x, points[i].y, points[i].z, points[i].type == INRANGE ? 'i' : points[i].type == OUTRANGE ? 'o' : 'u'); /* Note: INRANGE, OUTRANGE, UNDEFINED */ } } printf("\n"); #endif /* * if bilinear interpolation is enabled, allocate memory for the * interpolated points here */ if (interp_i > 1 || interp_j > 1) { bl_point = (gpdPoint **)gp_alloc(sizeof(gpdPoint*) * (interp_i+1), "bl-interp along scan"); for (i1 = 0; i1 <= interp_i; i1++) bl_point[i1] = (gpdPoint *)gp_alloc(sizeof(gpdPoint) * (interp_j+1), "bl-interp between scan"); } /* * this loop does the pm3d draw of joining two curves * * How the loop below works: * - scanB = scan last read; scanA = the previous one * - link the scan from A to B, then move B to A, then read B, then draw */ for (scan = 0; scan < this_plot->num_iso_read - 1; scan++) { scanA = scan_array[scan]; scanB = scan_array[scan + 1]; FPRINTF((stderr,"\n#IsoCurveA = scan nb %d has %d points ScanB has %d points\n", scan, scanA->p_count, scanB->p_count)); pointsA = scanA->points; pointsB = scanB->points; /* if the number of points in both scans is not the same, then the * starting index (offset) of scan B according to the flushing setting * has to be determined */ from = 0; /* default is pm3d.flush==PM3D_FLUSH_BEGIN */ if (pm3d.flush == PM3D_FLUSH_END) from = abs(scanA->p_count - scanB->p_count); else if (pm3d.flush == PM3D_FLUSH_CENTER) from = abs(scanA->p_count - scanB->p_count) / 2; /* find the minimal number of points in both scans */ up_to = GPMIN(scanA->p_count, scanB->p_count) - 1; up_to_minus = up_to - 1; /* calculate only once */ are_ftriangles = pm3d.ftriangles && (scanA->p_count != scanB->p_count); if (!are_ftriangles) go_over_pts = up_to; else { max_pts = GPMAX(scanA->p_count, scanB->p_count); go_over_pts = max_pts - 1; /* the j-subrange of quadrangles; in the remaing of the interval * [0..up_to] the flushing triangles are to be drawn */ ftriangles_low_pt = from; ftriangles_high_pt = from + up_to_minus; } /* Go over * - the minimal number of points from both scans, if only quadrangles. * - the maximal number of points from both scans if flush triangles * (the missing points in the scan of lower nb of points will be * duplicated from the begin/end points). * * Notice: if it would be once necessary to go over points in `backward' * direction, then the loop body below would require to replace the data * point indices `i' by `up_to-i' and `i+1' by `up_to-i-1'. */ for (j = 0; j < go_over_pts; j++) { /* Now i be the index of the scan with smaller number of points, * ii of the scan with larger number of points. */ if (are_ftriangles && (j < ftriangles_low_pt || j > ftriangles_high_pt)) { i = (j <= ftriangles_low_pt) ? 0 : ftriangles_high_pt-from+1; ii = j; i1 = i; ii1 = ii + 1; } else { int jj = are_ftriangles ? j - from : j; i = jj; if (PM3D_SCANS_AUTOMATIC == pm3d.direction && invert) i = up_to_minus - jj; ii = i + from; i1 = i + 1; ii1 = ii + 1; } /* From here, i is index to scan A, ii to scan B */ if (scanA->p_count > scanB->p_count) { int itmp = i; i = ii; ii = itmp; itmp = i1; i1 = ii1; ii1 = itmp; } FPRINTF((stderr,"j=%i: i=%i i1=%i [%i] ii=%i ii1=%i [%i]\n", j,i,i1,scanA->p_count,ii,ii1,scanB->p_count)); /* choose the clipping method */ if (pm3d.clip == PM3D_CLIP_4IN) { /* (1) all 4 points of the quadrangle must be in x and y range */ if (!(pointsA[i].type == INRANGE && pointsA[i1].type == INRANGE && pointsB[ii].type == INRANGE && pointsB[ii1].type == INRANGE)) continue; } else { /* (pm3d.clip == PM3D_CLIP_1IN) */ /* (2) all 4 points of the quadrangle must be defined */ if (pointsA[i].type == UNDEFINED || pointsA[i1].type == UNDEFINED || pointsB[ii].type == UNDEFINED || pointsB[ii1].type == UNDEFINED) continue; /* and at least 1 point of the quadrangle must be in x and y range */ if (pointsA[i].type == OUTRANGE && pointsA[i1].type == OUTRANGE && pointsB[ii].type == OUTRANGE && pointsB[ii1].type == OUTRANGE) continue; } if ((interp_i <= 1 && interp_j <= 1) || pm3d.direction == PM3D_DEPTH) { #ifdef EXTENDED_COLOR_SPECS if (!supply_extended_color_specs) { #endif /* Get the gray as the average of the corner z- or gray-positions (note: log scale is already included). The average is calculated here if there is no interpolation (including the "pm3d depthorder" option), otherwise it is done for each interpolated quadrangle later. I always wonder what is faster: d*0.25 or d/4? Someone knows? -- 0.25 (joze) */ if (color_from_column) { /* color is set in plot3d.c:get_3ddata() */ cb1 = pointsA[i].CRD_COLOR; cb2 = pointsA[i1].CRD_COLOR; cb3 = pointsB[ii].CRD_COLOR; cb4 = pointsB[ii1].CRD_COLOR; } else { cb1 = z2cb(pointsA[i].z); cb2 = z2cb(pointsA[i1].z); cb3 = z2cb(pointsB[ii].z); cb4 = z2cb(pointsB[ii1].z); } switch (pm3d.which_corner_color) { default: case PM3D_WHICHCORNER_MEAN: if (color_from_rgbvar) { int r = (((int)cb1)&0xff0000)+(((int)cb2)&0xff0000) + (((int)cb3)&0xff0000)+(((int)cb4)&0xff0000); int g = (((int)cb1)&0xff00)+(((int)cb2)&0xff00) + (((int)cb3)&0xff00)+(((int)cb4)&0xff00); int b = (((int)cb1)&0xff)+(((int)cb2)&0xff) + (((int)cb3)&0xff)+(((int)cb4)&0xff); avgC = ((r>>2)&0xff0000) + ((g>>2)&0xff00) + ((b>>2)&0xff); } else { avgC = (cb1 + cb2 + cb3 + cb4) * 0.25; } break; case PM3D_WHICHCORNER_GEOMEAN: avgC = geomean4(cb1, cb2, cb3, cb4); break; case PM3D_WHICHCORNER_MEDIAN: avgC = median4(cb1, cb2, cb3, cb4); break; case PM3D_WHICHCORNER_MIN: avgC = minimum4(cb1, cb2, cb3, cb4); break; case PM3D_WHICHCORNER_MAX: avgC = maximum4(cb1, cb2, cb3, cb4); break; case PM3D_WHICHCORNER_C1: avgC = cb1; break; case PM3D_WHICHCORNER_C2: avgC = cb2; break; case PM3D_WHICHCORNER_C3: avgC = cb3; break; case PM3D_WHICHCORNER_C4: avgC = cb4; break; } if (color_from_rgbvar) /* we were given an explicit color */ gray = avgC; else /* transform z value to gray, i.e. to interval [0,1] */ gray = cb2gray(avgC); /* print the quadrangle with the given color */ FPRINTF((stderr, "averageColor %g\tgray=%g\tM %g %g L %g %g L %g %g L %g %g\n", avgC, gray, pointsA[i].x, pointsA[i].y, pointsB[ii].x, pointsB[ii].y, pointsB[ii1].x, pointsB[ii1].y, pointsA[i1].x, pointsA[i1].y)); /* set the color */ if (pm3d.direction != PM3D_DEPTH) { if (color_from_rgbvar) set_rgbcolor(gray); else set_color(gray); } #ifdef EXTENDED_COLOR_SPECS } #endif } corners[0].x = pointsA[i].x; corners[0].y = pointsA[i].y; corners[1].x = pointsB[ii].x; corners[1].y = pointsB[ii].y; corners[2].x = pointsB[ii1].x; corners[2].y = pointsB[ii1].y; corners[3].x = pointsA[i1].x; corners[3].y = pointsA[i1].y; if (interp_i > 1 || interp_j > 1 || at_which_z == PM3D_AT_SURFACE) { /* always supply the z value if * EXTENDED_COLOR_SPECS is defined */ corners[0].z = pointsA[i].z; corners[1].z = pointsB[ii].z; corners[2].z = pointsB[ii1].z; corners[3].z = pointsA[i1].z; if (color_from_column) { corners[0].c = pointsA[i].CRD_COLOR; corners[1].c = pointsB[ii].CRD_COLOR; corners[2].c = pointsB[ii1].CRD_COLOR; corners[3].c = pointsA[i1].CRD_COLOR; } } #ifdef EXTENDED_COLOR_SPECS if (supply_extended_color_specs) { if (color_from_column) { icorners[0].z = pointsA[i].CRD_COLOR; icorners[1].z = pointsB[ii].CRD_COLOR; icorners[2].z = pointsB[ii1].CRD_COLOR; icorners[3].z = pointsA[i1].CRD_COLOR; } else { /* the target wants z and gray value */ icorners[0].z = pointsA[i].z; icorners[1].z = pointsB[ii].z; icorners[2].z = pointsB[ii1].z; icorners[3].z = pointsA[i1].z; } for (i = 0; i < 4; i++) { icorners[i].spec.gray = cb2gray( color_from_column ? icorners[i].z : z2cb(icorners[i].z) ); } } if (pm3d.direction == PM3D_DEPTH) { /* copy quadrangle */ quadrangle* qp = quadrangles + current_quadrangle; memcpy(qp->corners, corners, 4 * sizeof (gpdPoint)); qp->gray = gray; for (i = 0; i < 4; i++) { qp->icorners[i].z = icorners[i].z; qp->icorners[i].spec.gray = icorners[i].spec.gray; } current_quadrangle++; } else filled_quadrangle(corners, icorners); #else if (interp_i > 1 || interp_j > 1) { /* Interpolation is enabled. * interp_i is the # of points along scan lines * interp_j is the # of points between scan lines * Algorithm is to first sample i points along the scan lines * defined by corners[3],corners[0] and corners[2],corners[1]. */ int j1; for (i1 = 0; i1 <= interp_i; i1++) { bl_point[i1][0].x = ((corners[3].x - corners[0].x) / interp_i) * i1 + corners[0].x; bl_point[i1][interp_j].x = ((corners[2].x - corners[1].x) / interp_i) * i1 + corners[1].x; bl_point[i1][0].y = ((corners[3].y - corners[0].y) / interp_i) * i1 + corners[0].y; bl_point[i1][interp_j].y = ((corners[2].y - corners[1].y) / interp_i) * i1 + corners[1].y; bl_point[i1][0].z = ((corners[3].z - corners[0].z) / interp_i) * i1 + corners[0].z; bl_point[i1][interp_j].z = ((corners[2].z - corners[1].z) / interp_i) * i1 + corners[1].z; if (color_from_column) { bl_point[i1][0].c = ((corners[3].c - corners[0].c) / interp_i) * i1 + corners[0].c; bl_point[i1][interp_j].c = ((corners[2].c - corners[1].c) / interp_i) * i1 + corners[1].c; } /* Next we sample j points between each of the new points * created in the previous step (this samples between * scan lines) in the same manner. */ for (j1 = 1; j1 < interp_j; j1++) { bl_point[i1][j1].x = ((bl_point[i1][interp_j].x - bl_point[i1][0].x) / interp_j) * j1 + bl_point[i1][0].x; bl_point[i1][j1].y = ((bl_point[i1][interp_j].y - bl_point[i1][0].y) / interp_j) * j1 + bl_point[i1][0].y; bl_point[i1][j1].z = ((bl_point[i1][interp_j].z - bl_point[i1][0].z) / interp_j) * j1 + bl_point[i1][0].z; if (color_from_column) bl_point[i1][j1].c = ((bl_point[i1][interp_j].c - bl_point[i1][0].c) / interp_j) * j1 + bl_point[i1][0].c; } } /* Once all points are created, move them into an appropriate * structure and call set_color on each to retrieve the * correct color mapping for this new sub-sampled quadrangle. */ for (i1 = 0; i1 < interp_i; i1++) { for (j1 = 0; j1 < interp_j; j1++) { corners[0].x = bl_point[i1][j1].x; corners[0].y = bl_point[i1][j1].y; corners[0].z = bl_point[i1][j1].z; corners[1].x = bl_point[i1+1][j1].x; corners[1].y = bl_point[i1+1][j1].y; corners[1].z = bl_point[i1+1][j1].z; corners[2].x = bl_point[i1+1][j1+1].x; corners[2].y = bl_point[i1+1][j1+1].y; corners[2].z = bl_point[i1+1][j1+1].z; corners[3].x = bl_point[i1][j1+1].x; corners[3].y = bl_point[i1][j1+1].y; corners[3].z = bl_point[i1][j1+1].z; if (color_from_column) { corners[0].c = bl_point[i1][j1].c; corners[1].c = bl_point[i1+1][j1].c; corners[2].c = bl_point[i1+1][j1+1].c; corners[3].c = bl_point[i1][j1+1].c; } FPRINTF((stderr,"(%g,%g),(%g,%g),(%g,%g),(%g,%g)\n", corners[0].x, corners[0].y, corners[1].x, corners[1].y, corners[2].x, corners[2].y, corners[3].x, corners[3].y)); /* If the colors are given separately, we already loaded them above */ if (!color_from_column) { cb1 = z2cb(corners[0].z); cb2 = z2cb(corners[1].z); cb3 = z2cb(corners[2].z); cb4 = z2cb(corners[3].z); } else { cb1 = corners[0].c; cb2 = corners[1].c; cb3 = corners[2].c; cb4 = corners[3].c; } switch (pm3d.which_corner_color) { case PM3D_WHICHCORNER_MEAN: avgC = (cb1 + cb2 + cb3 + cb4) * 0.25; break; case PM3D_WHICHCORNER_GEOMEAN: avgC = geomean4(cb1, cb2, cb3, cb4); break; case PM3D_WHICHCORNER_MEDIAN: avgC = median4(cb1, cb2, cb3, cb4); break; case PM3D_WHICHCORNER_MIN: avgC = minimum4(cb1, cb2, cb3, cb4); break; case PM3D_WHICHCORNER_MAX: avgC = maximum4(cb1, cb2, cb3, cb4); break; case PM3D_WHICHCORNER_C1: avgC = cb1; break; case PM3D_WHICHCORNER_C2: avgC = cb2; break; case PM3D_WHICHCORNER_C3: avgC = cb3; break; case PM3D_WHICHCORNER_C4: avgC = cb4; break; default: int_error(NO_CARET, "cannot be here"); avgC = 0; } if (color_from_rgbvar) /* we were given an explicit color */ gray = avgC; else /* transform z value to gray, i.e. to interval [0,1] */ gray = cb2gray(avgC); if (pm3d.direction != PM3D_DEPTH) { if (color_from_rgbvar) set_rgbcolor(gray); else set_color(gray); filled_quadrangle(corners); } else { /* copy quadrangle */ quadrangle* qp = quadrangles + current_quadrangle; memcpy(qp->corners, corners, 4 * sizeof (gpdPoint)); qp->gray = gray; qp->border_color = &this_plot->lp_properties.pm3d_color; current_quadrangle++; } } } } else { /* thus (interp_i == 1 && interp_j == 1) */ if (pm3d.direction != PM3D_DEPTH) { filled_quadrangle(corners); } else { /* copy quadrangle */ quadrangle* qp = quadrangles + current_quadrangle; memcpy(qp->corners, corners, 4 * sizeof (gpdPoint)); qp->gray = gray; qp->border_color = &this_plot->lp_properties.pm3d_color; current_quadrangle++; } } /* interpolate between points */ #endif } /* loop quadrangles over points of two subsequent scans */ } /* loop over scans */ if (bl_point) { for (i1 = 0; i1 <= interp_i; i1++) free(bl_point[i1]); free(bl_point); } /* free memory allocated by scan_array */ free(scan_array); } /* end of pm3d splotting mode */ /* * Now the implementation of the filled color contour plot */ static void filled_color_contour_plot(struct surface_points *this_plot, int contours_where) { double gray; struct gnuplot_contours *cntr; /* just a shortcut */ TBOOLEAN color_from_column = this_plot->pm3d_color_from_column; if (this_plot == NULL || this_plot->contours == NULL) return; if (contours_where != CONTOUR_SRF && contours_where != CONTOUR_BASE) return; /* return if the terminal does not support filled polygons */ if (!term->filled_polygon) return; /* TODO: CHECK FOR NUMBER OF POINTS IN CONTOUR: IF TOO SMALL, THEN IGNORE! */ cntr = this_plot->contours; while (cntr) { printf("# Contour: points %i, z %g, label: %s\n", cntr->num_pts, cntr->coords[0].z, (cntr->label) ? cntr->label : "<no>"); if (cntr->isNewLevel) { printf("\t...it isNewLevel\n"); /* contour split across chunks */ /* fprintf(gpoutfile, "\n# Contour %d, label: %s\n", number++, c->label); */ /* What is the color? */ /* get the z-coordinate */ /* transform contour z-coordinate value to gray, i.e. to interval [0,1] */ if (color_from_column) gray = cb2gray(cntr->coords[0].CRD_COLOR); else gray = cb2gray( z2cb(cntr->coords[0].z) ); set_color(gray); } /* draw one countour */ if (contours_where == CONTOUR_SRF) /* at CONTOUR_SRF */ filled_polygon_3dcoords(cntr->num_pts, cntr->coords); else /* at CONTOUR_BASE */ filled_polygon_3dcoords_zfixed(cntr->num_pts, cntr->coords, base_z); /* next contour */ cntr = cntr->next; } } /* end of filled color contour plot splot mode */ /* * unset pm3d for the reset command */ void pm3d_reset() { strcpy(pm3d.where, "s"); pm3d.flush = PM3D_FLUSH_BEGIN; pm3d.ftriangles = 0; pm3d.direction = PM3D_SCANS_AUTOMATIC; pm3d.clip = PM3D_CLIP_4IN; pm3d.hidden3d_tag = 0; pm3d.implicit = PM3D_EXPLICIT; pm3d.which_corner_color = PM3D_WHICHCORNER_MEAN; pm3d.interp_i = 1; pm3d.interp_j = 1; } /* * Draw (one) PM3D color surface. */ void pm3d_draw_one(struct surface_points *plot) { int i = 0; char *where = plot->pm3d_where[0] ? plot->pm3d_where : pm3d.where; /* Draw either at 'where' option of the given surface or at pm3d.where * global option. */ if (!where[0]) return; /* for pm3dCompress.awk */ if (pm3d.direction != PM3D_DEPTH) term->layer(TERM_LAYER_BEGIN_PM3D_MAP); for (; where[i]; i++) { pm3d_plot(plot, where[i]); } if (strchr(where, 'C') != NULL) { /* !!!!! FILLED COLOR CONTOURS, *UNDOCUMENTED* !!!!! LATER CHANGE TO STH LIKE !!!!! (if_filled_contours_requested) !!!!! ... Currently filled color contours do not work because gnuplot generates open contour lines, i.e. not closed on the graph boundary. */ if (draw_contour & CONTOUR_SRF) filled_color_contour_plot(plot, CONTOUR_SRF); if (draw_contour & CONTOUR_BASE) filled_color_contour_plot(plot, CONTOUR_BASE); } /* for pm3dCompress.awk */ if (pm3d.direction != PM3D_DEPTH) term->layer(TERM_LAYER_END_PM3D_MAP); } /* Display an error message for the routine get_pm3d_at_option() below. */ static void pm3d_option_at_error() { int_error(c_token, "\ parameter to `pm3d at` requires combination of up to 6 characters b,s,t\n\ \t(drawing at bottom, surface, top)"); } /* Read the option for 'pm3d at' command. * Used by 'set pm3d at ...' or by 'splot ... with pm3d at ...'. * If no option given, then returns empty string, otherwise copied there. * The string is unchanged on error, and 1 is returned. * On success, 0 is returned. */ int get_pm3d_at_option(char *pm3d_where) { char* c; if (END_OF_COMMAND || token[c_token].length >= sizeof(pm3d.where)) { pm3d_option_at_error(); return 1; } memcpy(pm3d_where, gp_input_line + token[c_token].start_index, token[c_token].length); pm3d_where[ token[c_token].length ] = 0; /* verify the parameter */ for (c = pm3d_where; *c; c++) { if (*c != 'C') /* !!!!! CONTOURS, UNDOCUMENTED, THIS LINE IS TEMPORARILY HERE !!!!! */ if (*c != PM3D_AT_BASE && *c != PM3D_AT_TOP && *c != PM3D_AT_SURFACE) { pm3d_option_at_error(); return 1; } } c_token++; return 0; } /* Set flag plot_has_palette to TRUE if there is any element on the graph * which requires palette of continuous colors. */ void set_plot_with_palette(int plot_num, int plot_mode) { struct surface_points *this_3dplot = first_3dplot; struct curve_points *this_2dplot = first_plot; int surface = 0; struct text_label *this_label = first_label; plot_has_palette = TRUE; /* Is pm3d switched on globally? */ if (pm3d.implicit == PM3D_IMPLICIT) return; /* Check 2D plots */ if (plot_mode == MODE_PLOT) { while (this_2dplot) { if (this_2dplot->plot_style == IMAGE) return; if (this_2dplot->lp_properties.use_palette && (this_2dplot->lp_properties.pm3d_color.type == TC_CB || this_2dplot->lp_properties.pm3d_color.type == TC_FRAC || this_2dplot->lp_properties.pm3d_color.type == TC_Z)) return; if (this_2dplot->labels && (this_2dplot->labels->textcolor.type == TC_CB || this_2dplot->labels->textcolor.type == TC_FRAC || this_2dplot->labels->textcolor.type == TC_Z)) return; this_2dplot = this_2dplot->next; } } /* Check 3D plots */ if (plot_mode == MODE_SPLOT) { /* Any surface 'with pm3d', 'with image' or 'with line|dot palette'? */ while (surface++ < plot_num) { if (this_3dplot->plot_style == PM3DSURFACE) return; if (this_3dplot->plot_style == IMAGE) return; if (this_3dplot->lp_properties.use_palette) { int type = this_3dplot->lp_properties.pm3d_color.type; if (type == TC_LT || type == TC_LINESTYLE || type == TC_RGB) /* don't return yet */ ; else /* TC_DEFAULT: splot x with line|lp|dot palette */ return; } if (this_3dplot->labels && this_3dplot->labels->textcolor.type >= TC_CB) return; this_3dplot = this_3dplot->next_sp; } } /* Any label with 'textcolor palette'? */ #define TC_USES_PALETTE(tctype) (tctype==TC_Z) || (tctype==TC_CB) || (tctype==TC_FRAC) for (; this_label != NULL; this_label = this_label->next) { if (TC_USES_PALETTE(this_label->textcolor.type)) return; } /* Any of title, xlabel, ylabel, zlabel, ... with 'textcolor palette'? */ if (TC_USES_PALETTE(title.textcolor.type)) return; if (TC_USES_PALETTE(axis_array[FIRST_X_AXIS].label.textcolor.type)) return; if (TC_USES_PALETTE(axis_array[FIRST_Y_AXIS].label.textcolor.type)) return; if (TC_USES_PALETTE(axis_array[SECOND_X_AXIS].label.textcolor.type)) return; if (TC_USES_PALETTE(axis_array[SECOND_Y_AXIS].label.textcolor.type)) return; if (plot_mode == MODE_SPLOT) if (TC_USES_PALETTE(axis_array[FIRST_Z_AXIS].label.textcolor.type)) return; if (TC_USES_PALETTE(axis_array[COLOR_AXIS].label.textcolor.type)) return; #undef TC_USES_PALETTE /* Palette with continuous colors is not used. */ plot_has_palette = FALSE; /* otherwise it stays TRUE */ } TBOOLEAN is_plot_with_palette() { return plot_has_palette; } TBOOLEAN is_plot_with_colorbox() { return plot_has_palette && (color_box.where != SMCOLOR_BOX_NO); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/contour.c�������������������������������������������������������������������������0000644�0004711�0000144�00000131212�12016753567�012571� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: contour.c,v 1.29.2.1 2012/08/27 20:24:23 sfeam Exp $"); } #endif /* GNUPLOT - contour.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Original Software: * Gershon Elber * * Improvements to the numerical algorithms: * Hans-Martin Keller, 1995,1997 (hkeller@gwdg.de) * */ #include "contour.h" #include "alloc.h" #include "axis.h" /* #include "setshow.h" */ /* exported variables (to be handled by the 'set' and friends): */ char contour_format[32] = "%8.3g"; /* format for contour key entries */ t_contour_kind contour_kind = CONTOUR_KIND_LINEAR; t_contour_levels_kind contour_levels_kind = LEVELS_AUTO; int contour_levels = DEFAULT_CONTOUR_LEVELS; int contour_order = DEFAULT_CONTOUR_ORDER; int contour_pts = DEFAULT_NUM_APPROX_PTS; /* storage for z levels to draw contours at */ dynarray dyn_contour_levels_list; /* position of edge in mesh */ typedef enum en_edge_position { INNER_MESH=1, BOUNDARY, DIAGONAL } t_edge_position; /* FIXME HBB 2000052: yet another local copy of 'epsilon'. Why? */ #define EPSILON 1e-5 /* Used to decide if two float are equal. */ #ifndef TRUE #define TRUE -1 #define FALSE 0 #endif #define MAX_POINTS_PER_CNTR 100 #define SQR(x) ((x) * (x)) typedef struct edge_struct { struct poly_struct *poly[2]; /* Each edge belongs to up to 2 polygons */ struct coordinate GPHUGE *vertex[2]; /* The two extreme points of this edge. */ struct edge_struct *next; /* To chain lists */ TBOOLEAN is_active; /* is edge is 'active' at certain Z level? */ t_edge_position position; /* position of edge in mesh */ } edge_struct; typedef struct poly_struct { struct edge_struct *edge[3]; /* As we do triangolation here... */ struct poly_struct *next; /* To chain lists. */ } poly_struct; /* Contours are saved using this struct list. */ typedef struct cntr_struct { double X, Y; /* The coordinates of this vertex. */ struct cntr_struct *next; /* To chain lists. */ } cntr_struct; static struct gnuplot_contours *contour_list = NULL; static double crnt_cntr[MAX_POINTS_PER_CNTR * 2]; static int crnt_cntr_pt_index = 0; static double contour_level = 0.0; /* Linear, Cubic interp., Bspline: */ static t_contour_kind interp_kind = CONTOUR_KIND_LINEAR; static double x_min, y_min, z_min; /* Minimum values of x, y, and z */ static double x_max, y_max, z_max; /* Maximum values of x, y, and z */ static void add_cntr_point __PROTO((double x, double y)); static void end_crnt_cntr __PROTO((void)); static void gen_contours __PROTO((edge_struct *p_edges, double z_level, double xx_min, double xx_max, double yy_min, double yy_max)); static int update_all_edges __PROTO((edge_struct *p_edges, double z_level)); static cntr_struct *gen_one_contour __PROTO((edge_struct *p_edges, double z_level, TBOOLEAN *contr_isclosed, int *num_active)); static cntr_struct *trace_contour __PROTO((edge_struct *pe_start, double z_level, int *num_active, TBOOLEAN contr_isclosed)); static cntr_struct *update_cntr_pt __PROTO((edge_struct *p_edge, double z_level)); static int fuzzy_equal __PROTO((cntr_struct *p_cntr1, cntr_struct *p_cntr2)); static void gen_triangle __PROTO((int num_isolines, struct iso_curve *iso_lines, poly_struct **p_polys, edge_struct **p_edges)); static void calc_min_max __PROTO((int num_isolines, struct iso_curve *iso_lines, double *xx_min, double *yy_min, double *zz_min, double *xx_max, double *yy_max, double *zz_max)); static edge_struct *add_edge __PROTO((struct coordinate GPHUGE *point0, struct coordinate GPHUGE *point1, edge_struct **p_edge, edge_struct **pe_tail)); static poly_struct *add_poly __PROTO((edge_struct *edge0, edge_struct *edge1, edge_struct *edge2, poly_struct **p_poly, poly_struct **pp_tail)); static void put_contour __PROTO((cntr_struct *p_cntr, double xx_min, double xx_max, double yy_min, double yy_max, TBOOLEAN contr_isclosed)); static void put_contour_nothing __PROTO((cntr_struct *p_cntr)); static int chk_contour_kind __PROTO((cntr_struct *p_cntr, TBOOLEAN contr_isclosed)); static void put_contour_cubic __PROTO((cntr_struct *p_cntr, double xx_min, double xx_max, double yy_min, double yy_max, TBOOLEAN contr_isclosed)); static void put_contour_bspline __PROTO((cntr_struct *p_cntr, TBOOLEAN contr_isclosed)); static void free_contour __PROTO((cntr_struct *p_cntr)); static int count_contour __PROTO((cntr_struct *p_cntr)); static int gen_cubic_spline __PROTO((int num_pts, cntr_struct *p_cntr, double d2x[], double d2y[], double delta_t[], TBOOLEAN contr_isclosed, double unit_x, double unit_y)); static void intp_cubic_spline __PROTO((int n, cntr_struct *p_cntr, double d2x[], double d2y[], double delta_t[], int n_intpol)); static int solve_cubic_1 __PROTO((tri_diag m[], int n)); static void solve_cubic_2 __PROTO((tri_diag m[], double x[], int n)); static void gen_bspline_approx __PROTO((cntr_struct *p_cntr, int num_of_points, int order, TBOOLEAN contr_isclosed)); static void eval_bspline __PROTO((double t, cntr_struct *p_cntr, int num_of_points, int order, int j, TBOOLEAN contr_isclosed, double *x, double *y)); static double fetch_knot __PROTO((TBOOLEAN contr_isclosed, int num_of_points, int order, int i)); /* * Entry routine to this whole set of contouring module. */ struct gnuplot_contours * contour(int num_isolines, struct iso_curve *iso_lines) { int i; int num_of_z_levels; /* # Z contour levels. */ poly_struct *p_polys, *p_poly; edge_struct *p_edges, *p_edge; double z = 0, dz = 0; struct gnuplot_contours *save_contour_list; /* HBB FIXME 20050804: The number of contour_levels as set by 'set * cnrparam lev inc a,b,c' is almost certainly wrong if z axis is * logarithmic */ num_of_z_levels = contour_levels; interp_kind = contour_kind; contour_list = NULL; /* * Calculate min/max values : */ calc_min_max(num_isolines, iso_lines, &x_min, &y_min, &z_min, &x_max, &y_max, &z_max); /* * Generate list of edges (p_edges) and list of triangles (p_polys): */ gen_triangle(num_isolines, iso_lines, &p_polys, &p_edges); crnt_cntr_pt_index = 0; if (contour_levels_kind == LEVELS_AUTO) { dz = fabs(z_max - z_min); if (dz == 0) return NULL; /* empty z range ? */ /* Find a tic step that will generate approximately the * desired number of contour levels. The "* 2" is historical. * */ dz = quantize_normal_tics(dz, ((int) contour_levels + 1) * 2); z = floor(z_min / dz) * dz; num_of_z_levels = (int) floor((z_max - z) / dz); } for (i = 0; i < num_of_z_levels; i++) { switch (contour_levels_kind) { case LEVELS_AUTO: z += dz; z = CheckZero(z,dz); break; case LEVELS_INCREMENTAL: z = AXIS_LOG_VALUE(FIRST_Z_AXIS, contour_levels_list[0]) + i * AXIS_LOG_VALUE(FIRST_Z_AXIS, contour_levels_list[1]); break; case LEVELS_DISCRETE: z = AXIS_LOG_VALUE(FIRST_Z_AXIS, contour_levels_list[i]); break; } contour_level = z; save_contour_list = contour_list; gen_contours(p_edges, z, x_min, x_max, y_min, y_max); if (contour_list != save_contour_list) { contour_list->isNewLevel = 1; /* Nov-2011 Use gprintf rather than sprintf so that LC_NUMERIC is used */ gprintf(contour_list->label, sizeof(contour_list->label), contour_format, 1.0, AXIS_DE_LOG_VALUE(FIRST_Z_AXIS,z)); contour_list->z = z; } } /* Free all contouring related temporary data. */ while (p_polys) { p_poly = p_polys->next; free(p_polys); p_polys = p_poly; } while (p_edges) { p_edge = p_edges->next; free(p_edges); p_edges = p_edge; } return contour_list; } /* * Adds another point to the currently build contour. */ static void add_cntr_point(double x, double y) { int index; if (crnt_cntr_pt_index >= MAX_POINTS_PER_CNTR - 1) { index = crnt_cntr_pt_index - 1; end_crnt_cntr(); crnt_cntr[0] = crnt_cntr[index * 2]; crnt_cntr[1] = crnt_cntr[index * 2 + 1]; crnt_cntr_pt_index = 1; /* Keep the last point as first of this one. */ } crnt_cntr[crnt_cntr_pt_index * 2] = x; crnt_cntr[crnt_cntr_pt_index * 2 + 1] = y; crnt_cntr_pt_index++; } /* * Done with current contour - create gnuplot data structure for it. */ static void end_crnt_cntr() { int i; struct gnuplot_contours *cntr = gp_alloc(sizeof(struct gnuplot_contours), "gnuplot_contour"); cntr->coords = gp_alloc(sizeof(struct coordinate) * crnt_cntr_pt_index, "contour coords"); for (i = 0; i < crnt_cntr_pt_index; i++) { cntr->coords[i].x = crnt_cntr[i * 2]; cntr->coords[i].y = crnt_cntr[i * 2 + 1]; cntr->coords[i].z = contour_level; } cntr->num_pts = crnt_cntr_pt_index; cntr->next = contour_list; contour_list = cntr; contour_list->isNewLevel = 0; crnt_cntr_pt_index = 0; } /* * Generates all contours by tracing the intersecting triangles. */ static void gen_contours( edge_struct *p_edges, double z_level, double xx_min, double xx_max, double yy_min, double yy_max) { int num_active; /* Number of edges marked ACTIVE. */ TBOOLEAN contr_isclosed; /* Is this contour a closed line? */ cntr_struct *p_cntr; num_active = update_all_edges(p_edges, z_level); /* Do pass 1. */ contr_isclosed = FALSE; /* Start to look for contour on boundaries. */ while (num_active > 0) { /* Do Pass 2. */ /* Generate One contour (and update NumActive as needed): */ p_cntr = gen_one_contour(p_edges, z_level, &contr_isclosed, &num_active); /* Emit it in requested format: */ put_contour(p_cntr, xx_min, xx_max, yy_min, yy_max, contr_isclosed); } } /* * Does pass 1, or marks the edges which are active (crosses this z_level) * Returns number of active edges (marked ACTIVE). */ static int update_all_edges(edge_struct *p_edges, double z_level) { int count = 0; while (p_edges) { /* use the same test at both vertices to avoid roundoff errors */ if ((p_edges->vertex[0]->z >= z_level) != (p_edges->vertex[1]->z >= z_level)) { p_edges->is_active = TRUE; count++; } else p_edges->is_active = FALSE; p_edges = p_edges->next; } return count; } /* * Does pass 2, or find one complete contour out of the triangulation * data base: * * Returns a pointer to the contour (as linked list), contr_isclosed * tells if the contour is a closed line or not, and num_active is * updated. */ static cntr_struct * gen_one_contour( edge_struct *p_edges, /* list of edges input */ double z_level, /* Z level of contour input */ TBOOLEAN *contr_isclosed, /* open or closed contour, in/out */ int *num_active) /* number of active edges in/out */ { edge_struct *pe_temp; if (! *contr_isclosed) { /* Look for something to start with on boundary: */ pe_temp = p_edges; while (pe_temp) { if (pe_temp->is_active && (pe_temp->position == BOUNDARY)) break; pe_temp = pe_temp->next; } if (!pe_temp) *contr_isclosed = TRUE; /* No more contours on boundary. */ else { return trace_contour(pe_temp, z_level, num_active, *contr_isclosed); } } if (*contr_isclosed) { /* Look for something to start with inside: */ pe_temp = p_edges; while (pe_temp) { if (pe_temp->is_active && (pe_temp->position != BOUNDARY)) break; pe_temp = pe_temp->next; } if (!pe_temp) { *num_active = 0; fprintf(stderr, "gen_one_contour: no contour found\n"); return NULL; } else { *contr_isclosed = TRUE; return trace_contour(pe_temp, z_level, num_active, *contr_isclosed); } } return NULL; /* We should never be here, but lint... */ } /* * Search the data base along a contour starts at the edge pe_start until * a boundary edge is detected or until we close the loop back to pe_start. * Returns a linked list of all the points on the contour * Also decreases num_active by the number of points on contour. */ static cntr_struct * trace_contour( edge_struct *pe_start, /* edge to start contour input */ double z_level, /* Z level of contour input */ int *num_active, /* number of active edges in/out */ TBOOLEAN contr_isclosed) /* open or closed contour line (input) */ { cntr_struct *p_cntr, *pc_tail; edge_struct *p_edge, *p_next_edge; poly_struct *p_poly, *PLastpoly = NULL; int i; p_edge = pe_start; /* first edge to start contour */ /* Generate the header of the contour - the point on pe_start. */ if (! contr_isclosed) { pe_start->is_active = FALSE; (*num_active)--; } if (p_edge->poly[0] || p_edge->poly[1]) { /* more than one point */ p_cntr = pc_tail = update_cntr_pt(pe_start, z_level); /* first point */ do { /* Find polygon to continue (Not where we came from - PLastpoly): */ if (p_edge->poly[0] == PLastpoly) p_poly = p_edge->poly[1]; else p_poly = p_edge->poly[0]; p_next_edge = NULL; /* In case of error, remains NULL. */ for (i = 0; i < 3; i++) /* Test the 3 edges of the polygon: */ if (p_poly->edge[i] != p_edge) if (p_poly->edge[i]->is_active) p_next_edge = p_poly->edge[i]; if (!p_next_edge) { /* Error exit */ pc_tail->next = NULL; free_contour(p_cntr); fprintf(stderr, "trace_contour: unexpected end of contour\n"); return NULL; } p_edge = p_next_edge; PLastpoly = p_poly; p_edge->is_active = FALSE; (*num_active)--; /* Do not allocate contour points on diagonal edges */ if (p_edge->position != DIAGONAL) { pc_tail->next = update_cntr_pt(p_edge, z_level); /* Remove nearby points */ if (fuzzy_equal(pc_tail, pc_tail->next)) { free(pc_tail->next); } else pc_tail = pc_tail->next; } } while ((p_edge != pe_start) && (p_edge->position != BOUNDARY)); pc_tail->next = NULL; /* For closed contour the first and last point should be equal */ if (pe_start == p_edge) { (p_cntr->X) = (pc_tail->X); (p_cntr->Y) = (pc_tail->Y); } } else { /* only one point, forget it */ p_cntr = NULL; } return p_cntr; } /* * Allocates one contour location and update it to to correct position * according to z_level and edge p_edge. */ static cntr_struct * update_cntr_pt(edge_struct *p_edge, double z_level) { double t; cntr_struct *p_cntr; t = (z_level - p_edge->vertex[0]->z) / (p_edge->vertex[1]->z - p_edge->vertex[0]->z); /* test if t is out of interval [0:1] (should not happen but who knows ...) */ t = (t < 0.0 ? 0.0 : t); t = (t > 1.0 ? 1.0 : t); p_cntr = gp_alloc(sizeof(cntr_struct), "contour cntr_struct"); p_cntr->X = p_edge->vertex[1]->x * t + p_edge->vertex[0]->x * (1 - t); p_cntr->Y = p_edge->vertex[1]->y * t + p_edge->vertex[0]->y * (1 - t); return p_cntr; } /* Simple routine to decide if two contour points are equal by * calculating the relative error (< EPSILON). */ /* HBB 20010121: don't use absolute value 'zero' to compare to data * values. */ static int fuzzy_equal(cntr_struct *p_cntr1, cntr_struct *p_cntr2) { double unit_x, unit_y; unit_x = fabs(x_max - x_min); /* reference */ unit_y = fabs(y_max - y_min); return ((fabs(p_cntr1->X - p_cntr2->X) < unit_x * EPSILON) && (fabs(p_cntr1->Y - p_cntr2->Y) < unit_y * EPSILON)); } /* * Generate the triangles. * Returns the lists (edges & polys) via pointers to their heads. */ static void gen_triangle( int num_isolines, /* number of iso-lines input */ struct iso_curve *iso_lines, /* iso-lines input */ poly_struct **p_polys, /* list of polygons output */ edge_struct **p_edges) /* list of edges output */ { int i, j, grid_x_max = iso_lines->p_count; edge_struct *p_edge1, *p_edge2, *edge0, *edge1, *edge2, *pe_tail, *pe_tail2, *pe_temp; poly_struct *pp_tail, *lower_tri, *upper_tri; /* HBB 980308: need to tag *each* of them as GPHUGE! */ struct coordinate GPHUGE *p_vrtx1, GPHUGE * p_vrtx2; (*p_polys) = pp_tail = NULL; /* clear lists */ (*p_edges) = pe_tail = NULL; p_vrtx1 = iso_lines->points; /* first row of vertices */ p_edge1 = pe_tail = NULL; /* clear list of edges */ /* Generate edges of first row */ for (j = 0; j < grid_x_max - 1; j++) add_edge(p_vrtx1 + j, p_vrtx1 + j + 1, &p_edge1, &pe_tail); (*p_edges) = p_edge1; /* update main list */ /* * Combines vertices to edges and edges to triangles: * ================================================== * The edges are stored in the edge list, referenced by p_edges * (pe_tail points on last edge). * * Temporary pointers: * 1. p_edge2: Top horizontal edge list: +-----------------------+ 2 * 2. p_tail : end of middle edge list: |\ |\ |\ |\ |\ |\ | * | \| \| \| \| \| \| * 3. p_edge1: Bottom horizontal edge list: +-----------------------+ 1 * * pe_tail2 : end of list beginning at p_edge2 * pe_temp : position inside list beginning at p_edge1 * p_edges : head of the master edge list (part of our output) * p_vrtx1 : start of lower row of input vertices * p_vrtx2 : start of higher row of input vertices * * The routine generates two triangle Lower Upper 1 * upper one and lower one: | \ ---- * (Nums. are edges order in polys) 0| \1 0\ |2 * The polygons are stored in the polygon ---- \ | * list (*p_polys) (pp_tail points on 2 * last polygon). * 1 * ----------- * In addition, the edge lists are updated - | \ 0 | * each edge has two pointers on the two | \ | * (one active if boundary) polygons which 0|1 0\1 0|1 * uses it. These two pointer to polygons | \ | * are named: poly[0], poly[1]. The diagram | 1 \ | * on the right show how they are used for the ----------- * upper and lower polygons (INNER_MESH polygons only). 0 */ for (i = 1; i < num_isolines; i++) { /* Read next column and gen. polys. */ iso_lines = iso_lines->next; p_vrtx2 = iso_lines->points; /* next row of vertices */ p_edge2 = pe_tail2 = NULL; /* clear top horizontal list */ pe_temp = p_edge1; /* pointer in bottom list */ /* * Generate edges and triagles for next row: */ /* generate first vertical edge */ edge2 = add_edge(p_vrtx1, p_vrtx2, p_edges, &pe_tail); for (j = 0; j < grid_x_max - 1; j++) { /* copy vertical edge for lower triangle */ edge0 = edge2; if (pe_temp && pe_temp->vertex[0] == p_vrtx1 + j) { /* test lower edge */ edge2 = pe_temp; pe_temp = pe_temp->next; } else { edge2 = NULL; /* edge is undefined */ } /* generate diagonal edge */ edge1 = add_edge(p_vrtx1 + j + 1, p_vrtx2 + j, p_edges, &pe_tail); if (edge1) edge1->position = DIAGONAL; /* generate lower triangle */ lower_tri = add_poly(edge0, edge1, edge2, p_polys, &pp_tail); /* copy diagonal edge for upper triangle */ edge0 = edge1; /* generate upper edge */ edge1 = add_edge(p_vrtx2 + j, p_vrtx2 + j + 1, &p_edge2, &pe_tail2); /* generate vertical edge */ edge2 = add_edge(p_vrtx1 + j + 1, p_vrtx2 + j + 1, p_edges, &pe_tail); /* generate upper triangle */ upper_tri = add_poly(edge0, edge1, edge2, p_polys, &pp_tail); } if (p_edge2) { /* HBB 19991130 bugfix: if p_edge2 list is empty, * don't change p_edges list! Crashes by access * to NULL pointer pe_tail, the second time through, * otherwise */ if ((*p_edges)) { /* Chain new edges to main list. */ pe_tail->next = p_edge2; pe_tail = pe_tail2; } else { (*p_edges) = p_edge2; pe_tail = pe_tail2; } } /* this row finished, move list heads up one row: */ p_edge1 = p_edge2; p_vrtx1 = p_vrtx2; } /* Update the boundary flag, saved in each edge, and update indexes: */ pe_temp = (*p_edges); while (pe_temp) { if ((!(pe_temp->poly[0])) || (!(pe_temp->poly[1]))) (pe_temp->position) = BOUNDARY; pe_temp = pe_temp->next; } } /* * Calculate minimum and maximum values */ static void calc_min_max( int num_isolines, /* number of iso-lines input */ struct iso_curve *iso_lines, /* iso-lines input */ double *xx_min, double *yy_min, double *zz_min, double *xx_max, double *yy_max, double *zz_max) /* min/max values in/out */ { int i, j, grid_x_max; struct coordinate GPHUGE *vertex; grid_x_max = iso_lines->p_count; /* number of vertices per iso_line */ (*xx_min) = (*yy_min) = (*zz_min) = VERYLARGE; /* clear min/max values */ (*xx_max) = (*yy_max) = (*zz_max) = -VERYLARGE; for (j = 0; j < num_isolines; j++) { vertex = iso_lines->points; for (i = 0; i < grid_x_max; i++) { if (vertex[i].type != UNDEFINED) { if (vertex[i].x > (*xx_max)) (*xx_max) = vertex[i].x; if (vertex[i].y > (*yy_max)) (*yy_max) = vertex[i].y; if (vertex[i].z > (*zz_max)) (*zz_max) = vertex[i].z; if (vertex[i].x < (*xx_min)) (*xx_min) = vertex[i].x; if (vertex[i].y < (*yy_min)) (*yy_min) = vertex[i].y; if (vertex[i].z < (*zz_min)) (*zz_min) = vertex[i].z; } } iso_lines = iso_lines->next; } /* * fprintf(stderr," x: %g, %g\n", (*xx_min), (*xx_max)); * fprintf(stderr," y: %g, %g\n", (*yy_min), (*yy_max)); * fprintf(stderr," z: %g, %g\n", (*zz_min), (*zz_max)); */ } /* * Generate new edge and append it to list, but only if both vertices are * defined. The list is referenced by p_edge and pe_tail (p_edge points on * first edge and pe_tail on last one). * Note, the list may be empty (pe_edge==pe_tail==NULL) on entry and exit. */ static edge_struct * add_edge( struct coordinate GPHUGE *point0, /* 2 vertices input */ struct coordinate GPHUGE *point1, edge_struct **p_edge, /* pointers to edge list in/out */ edge_struct **pe_tail) { edge_struct *pe_temp = NULL; #if 1 if (point0->type == INRANGE && point1->type == INRANGE) #else if (point0->type != UNDEFINED && point1->type != UNDEFINED) #endif { pe_temp = gp_alloc(sizeof(edge_struct), "contour edge"); pe_temp->poly[0] = NULL; /* clear links */ pe_temp->poly[1] = NULL; pe_temp->vertex[0] = point0; /* First vertex of edge. */ pe_temp->vertex[1] = point1; /* Second vertex of edge. */ pe_temp->next = NULL; pe_temp->position = INNER_MESH; /* default position in mesh */ if ((*pe_tail)) { (*pe_tail)->next = pe_temp; /* Stick new record as last one. */ } else { (*p_edge) = pe_temp; /* start new list if empty */ } (*pe_tail) = pe_temp; /* continue to last record. */ } return pe_temp; /* returns NULL, if no edge allocated */ } /* * Generate new triangle and append it to list, but only if all edges are defined. * The list is referenced by p_poly and pp_tail (p_poly points on first ploygon * and pp_tail on last one). * Note, the list may be empty (pe_ploy==pp_tail==NULL) on entry and exit. */ static poly_struct * add_poly( edge_struct *edge0, edge_struct *edge1, edge_struct *edge2, /* 3 edges input */ poly_struct **p_poly, poly_struct **pp_tail) /* pointers to polygon list in/out */ { poly_struct *pp_temp = NULL; if (edge0 && edge1 && edge2) { pp_temp = gp_alloc(sizeof(poly_struct), "contour polygon"); pp_temp->edge[0] = edge0; /* First edge of triangle */ pp_temp->edge[1] = edge1; /* Second one */ pp_temp->edge[2] = edge2; /* Third one */ pp_temp->next = NULL; if (edge0->poly[0]) /* update edge0 */ edge0->poly[1] = pp_temp; else edge0->poly[0] = pp_temp; if (edge1->poly[0]) /* update edge1 */ edge1->poly[1] = pp_temp; else edge1->poly[0] = pp_temp; if (edge2->poly[0]) /* update edge2 */ edge2->poly[1] = pp_temp; else edge2->poly[0] = pp_temp; if ((*pp_tail)) /* Stick new record as last one. */ (*pp_tail)->next = pp_temp; else (*p_poly) = pp_temp; /* start new list if empty */ (*pp_tail) = pp_temp; /* continue to last record. */ } return pp_temp; /* returns NULL, if no edge allocated */ } /* * Calls the (hopefully) desired interpolation/approximation routine. */ static void put_contour( cntr_struct *p_cntr, /* contour structure input */ double xx_min, double xx_max, double yy_min, double yy_max, /* minimum/maximum values input */ TBOOLEAN contr_isclosed) /* contour line closed? (input) */ { if (!p_cntr) return; /* Nothing to do if it is empty contour. */ switch (interp_kind) { case CONTOUR_KIND_LINEAR: /* No interpolation/approximation. */ put_contour_nothing(p_cntr); break; case CONTOUR_KIND_CUBIC_SPL: /* Cubic spline interpolation. */ put_contour_cubic(p_cntr, xx_min, xx_max, yy_min, yy_max, chk_contour_kind(p_cntr, contr_isclosed)); break; case CONTOUR_KIND_BSPLINE: /* Bspline approximation. */ put_contour_bspline(p_cntr, chk_contour_kind(p_cntr, contr_isclosed)); break; } free_contour(p_cntr); } /* * Simply puts contour coordinates in order with no interpolation or * approximation. */ static void put_contour_nothing(cntr_struct *p_cntr) { while (p_cntr) { add_cntr_point(p_cntr->X, p_cntr->Y); p_cntr = p_cntr->next; } end_crnt_cntr(); } /* * for some reason contours are never flagged as 'isclosed' * if first point == last point, set flag accordingly * */ static int chk_contour_kind(cntr_struct *p_cntr, TBOOLEAN contr_isclosed) { cntr_struct *pc_tail = NULL; TBOOLEAN current_contr_isclosed; current_contr_isclosed = contr_isclosed; if (! contr_isclosed) { pc_tail = p_cntr; while (pc_tail->next) pc_tail = pc_tail->next; /* Find last point. */ /* test if first and last point are equal */ if (fuzzy_equal(pc_tail, p_cntr)) current_contr_isclosed = TRUE; } return (current_contr_isclosed); } /* * Generate a cubic spline curve through the points (x_i,y_i) which are * stored in the linked list p_cntr. * The spline is defined as a 2d-function s(t) = (x(t),y(t)), where the * parameter t is the length of the linear stroke. */ static void put_contour_cubic( cntr_struct *p_cntr, double xx_min, double xx_max, double yy_min, double yy_max, TBOOLEAN contr_isclosed) { int num_pts, num_intpol; double unit_x, unit_y; /* To define norm (x,y)-plane */ double *delta_t; /* Interval length t_{i+1}-t_i */ double *d2x, *d2y; /* Second derivatives x''(t_i), y''(t_i) */ cntr_struct *pc_tail; num_pts = count_contour(p_cntr); /* Number of points in contour. */ pc_tail = p_cntr; /* Find last point. */ while (pc_tail->next) pc_tail = pc_tail->next; if (contr_isclosed) { /* Test if first and last point are equal (should be) */ if (!fuzzy_equal(pc_tail, p_cntr)) { pc_tail->next = p_cntr; /* Close contour list - make it circular. */ num_pts++; } } delta_t = gp_alloc(num_pts * sizeof(double), "contour delta_t"); d2x = gp_alloc(num_pts * sizeof(double), "contour d2x"); d2y = gp_alloc(num_pts * sizeof(double), "contour d2y"); /* Width and height of the grid is used as a unit length (2d-norm) */ unit_x = xx_max - xx_min; unit_y = yy_max - yy_min; /* FIXME HBB 20010121: 'zero' should not be used as an absolute * figure to compare to data */ unit_x = (unit_x > zero ? unit_x : zero); /* should not be zero */ unit_y = (unit_y > zero ? unit_y : zero); if (num_pts > 2) { /* * Calculate second derivatives d2x[], d2y[] and interval lengths delta_t[]: */ if (!gen_cubic_spline(num_pts, p_cntr, d2x, d2y, delta_t, contr_isclosed, unit_x, unit_y)) { free(delta_t); free(d2x); free(d2y); if (contr_isclosed) pc_tail->next = NULL; /* Un-circular list */ return; } } /* If following (num_pts > 1) is TRUE then exactly 2 points in contour. */ else if (num_pts > 1) { /* set all second derivatives to zero, interval length to 1 */ d2x[0] = 0.; d2y[0] = 0.; d2x[1] = 0.; d2y[1] = 0.; delta_t[0] = 1.; } else { /* Only one point ( ?? ) - ignore it. */ free(delta_t); free(d2x); free(d2y); if (contr_isclosed) pc_tail->next = NULL; /* Un-circular list */ return; } /* Calculate "num_intpol" interpolated values */ num_intpol = 1 + (num_pts - 1) * contour_pts; /* global: contour_pts */ intp_cubic_spline(num_pts, p_cntr, d2x, d2y, delta_t, num_intpol); free(delta_t); free(d2x); free(d2y); if (contr_isclosed) pc_tail->next = NULL; /* Un-circular list */ end_crnt_cntr(); } /* * Find Bspline approximation for this data set. * Uses global variable contour_pts to determine number of samples per * interval, where the knot vector intervals are assumed to be uniform, and * global variable contour_order for the order of Bspline to use. */ static void put_contour_bspline(cntr_struct *p_cntr, TBOOLEAN contr_isclosed) { int num_pts; int order = contour_order - 1; num_pts = count_contour(p_cntr); /* Number of points in contour. */ if (num_pts < 2) return; /* Can't do nothing if empty or one points! */ /* Order must be less than number of points in curve - fix it if needed. */ if (order > num_pts - 1) order = num_pts - 1; gen_bspline_approx(p_cntr, num_pts, order, contr_isclosed); end_crnt_cntr(); } /* * Free all elements in the contour list. */ static void free_contour(cntr_struct *p_cntr) { cntr_struct *pc_temp; while (p_cntr) { pc_temp = p_cntr; p_cntr = p_cntr->next; free(pc_temp); } } /* * Counts number of points in contour. */ static int count_contour(cntr_struct *p_cntr) { int count = 0; while (p_cntr) { count++; p_cntr = p_cntr->next; } return count; } /* * Find second derivatives (x''(t_i),y''(t_i)) of cubic spline interpolation * through list of points (x_i,y_i). The parameter t is calculated as the * length of the linear stroke. The number of points must be at least 3. * Note: For closed contours the first and last point must be equal. */ static int gen_cubic_spline( int num_pts, /* Number of points (num_pts>=3), input */ cntr_struct *p_cntr, /* List of points (x(t_i),y(t_i)), input */ double d2x[], double d2y[], /* Second derivatives (x''(t_i),y''(t_i)), output */ double delta_t[], /* List of interval lengths t_{i+1}-t_{i}, output */ TBOOLEAN contr_isclosed, /* Closed or open contour?, input */ double unit_x, double unit_y) /* Unit length in x and y (norm=1), input */ { int n, i; double norm; tri_diag *m; /* The tri-diagonal matrix is saved here. */ cntr_struct *pc_temp; m = gp_alloc(num_pts * sizeof(tri_diag), "contour tridiag m"); /* * Calculate first differences in (d2x[i], d2y[i]) and interval lengths * in delta_t[i]: */ pc_temp = p_cntr; for (i = 0; i < num_pts - 1; i++) { d2x[i] = pc_temp->next->X - pc_temp->X; d2y[i] = pc_temp->next->Y - pc_temp->Y; /* * The norm of a linear stroke is calculated in "normal coordinates" * and used as interval length: */ delta_t[i] = sqrt(SQR(d2x[i] / unit_x) + SQR(d2y[i] / unit_y)); d2x[i] /= delta_t[i]; /* first difference, with unit norm: */ d2y[i] /= delta_t[i]; /* || (d2x[i], d2y[i]) || = 1 */ pc_temp = pc_temp->next; } /* * Setup linear system: m * x = b */ n = num_pts - 2; /* Without first and last point */ if (contr_isclosed) { /* First and last points must be equal for closed contours */ delta_t[num_pts - 1] = delta_t[0]; d2x[num_pts - 1] = d2x[0]; d2y[num_pts - 1] = d2y[0]; n++; /* Add last point (= first point) */ } for (i = 0; i < n; i++) { /* Matrix M, mainly tridiagonal with cyclic second index ("j = j+n mod n") */ m[i][0] = delta_t[i]; /* Off-diagonal element M_{i,i-1} */ m[i][1] = 2. * (delta_t[i] + delta_t[i + 1]); /* M_{i,i} */ m[i][2] = delta_t[i + 1]; /* Off-diagonal element M_{i,i+1} */ /* Right side b_x and b_y */ d2x[i] = (d2x[i + 1] - d2x[i]) * 6.; d2y[i] = (d2y[i + 1] - d2y[i]) * 6.; /* * If the linear stroke shows a cusps of more than 90 degree, the right * side is reduced to avoid oscillations in the spline: */ norm = sqrt(SQR(d2x[i] / unit_x) + SQR(d2y[i] / unit_y)) / 8.5; if (norm > 1.) { d2x[i] /= norm; d2y[i] /= norm; /* The first derivative will not be continuous */ } } if (!contr_isclosed) { /* Third derivative is set to zero at both ends */ m[0][1] += m[0][0]; /* M_{0,0} */ m[0][0] = 0.; /* M_{0,n-1} */ m[n - 1][1] += m[n - 1][2]; /* M_{n-1,n-1} */ m[n - 1][2] = 0.; /* M_{n-1,0} */ } /* Solve linear systems for d2x[] and d2y[] */ if (solve_cubic_1(m, n)) { /* Calculate Cholesky decomposition */ solve_cubic_2(m, d2x, n); /* solve M * d2x = b_x */ solve_cubic_2(m, d2y, n); /* solve M * d2y = b_y */ } else { /* Should not happen, but who knows ... */ free(m); return FALSE; } /* Shift all second derivatives one place right and abdate end points */ for (i = n; i > 0; i--) { d2x[i] = d2x[i - 1]; d2y[i] = d2y[i - 1]; } if (contr_isclosed) { d2x[0] = d2x[n]; d2y[0] = d2y[n]; } else { d2x[0] = d2x[1]; /* Third derivative is zero in */ d2y[0] = d2y[1]; /* first and last interval */ d2x[n + 1] = d2x[n]; d2y[n + 1] = d2y[n]; } free(m); return TRUE; } /* * Calculate interpolated values of the spline function (defined via p_cntr * and the second derivatives d2x[] and d2y[]). The number of tabulated * values is n. On an equidistant grid n_intpol values are calculated. */ static void intp_cubic_spline( int n, cntr_struct *p_cntr, double d2x[], double d2y[], double delta_t[], int n_intpol) { double t, t_skip, t_max; double x0, x1, x, y0, y1, y; double d, hx, dx0, dx01, hy, dy0, dy01; int i; /* The length of the total interval */ t_max = 0.; for (i = 0; i < n - 1; i++) t_max += delta_t[i]; /* The distance between interpolated points */ t_skip = (1. - 1e-7) * t_max / (n_intpol - 1); t = 0.; /* Parameter value */ x1 = p_cntr->X; y1 = p_cntr->Y; add_cntr_point(x1, y1); /* First point. */ t += t_skip; for (i = 0; i < n - 1; i++) { p_cntr = p_cntr->next; d = delta_t[i]; /* Interval length */ x0 = x1; y0 = y1; x1 = p_cntr->X; y1 = p_cntr->Y; hx = (x1 - x0) / d; hy = (y1 - y0) / d; dx0 = (d2x[i + 1] + 2 * d2x[i]) / 6.; dy0 = (d2y[i + 1] + 2 * d2y[i]) / 6.; dx01 = (d2x[i + 1] - d2x[i]) / (6. * d); dy01 = (d2y[i + 1] - d2y[i]) / (6. * d); while (t <= delta_t[i]) { /* t in current interval ? */ x = x0 + t * (hx + (t - d) * (dx0 + t * dx01)); y = y0 + t * (hy + (t - d) * (dy0 + t * dy01)); add_cntr_point(x, y); /* next point. */ t += t_skip; } t -= delta_t[i]; /* Parameter t relative to start of next interval */ } } /* * The following two procedures solve the special linear system which arise * in cubic spline interpolation. If x is assumed cyclic ( x[i]=x[n+i] ) the * equations can be written as (i=0,1,...,n-1): * m[i][0] * x[i-1] + m[i][1] * x[i] + m[i][2] * x[i+1] = b[i] . * In matrix notation one gets M * x = b, where the matrix M is tridiagonal * with additional elements in the upper right and lower left position: * m[i][0] = M_{i,i-1} for i=1,2,...,n-1 and m[0][0] = M_{0,n-1} , * m[i][1] = M_{i, i } for i=0,1,...,n-1 * m[i][2] = M_{i,i+1} for i=0,1,...,n-2 and m[n-1][2] = M_{n-1,0}. * M should be symmetric (m[i+1][0]=m[i][2]) and positiv definite. * The size of the system is given in n (n>=1). * * In the first procedure the Cholesky decomposition M = C^T * D * C * (C is upper triangle with unit diagonal, D is diagonal) is calculated. * Return TRUE if decomposition exist. */ static int solve_cubic_1(tri_diag m[], int n) { int i; double m_ij, m_n, m_nn, d; if (n < 1) return FALSE; /* Dimension should be at least 1 */ d = m[0][1]; /* D_{0,0} = M_{0,0} */ if (d <= 0.) return FALSE; /* M (or D) should be positiv definite */ m_n = m[0][0]; /* M_{0,n-1} */ m_nn = m[n - 1][1]; /* M_{n-1,n-1} */ for (i = 0; i < n - 2; i++) { m_ij = m[i][2]; /* M_{i,1} */ m[i][2] = m_ij / d; /* C_{i,i+1} */ m[i][0] = m_n / d; /* C_{i,n-1} */ m_nn -= m[i][0] * m_n; /* to get C_{n-1,n-1} */ m_n = -m[i][2] * m_n; /* to get C_{i+1,n-1} */ d = m[i + 1][1] - m[i][2] * m_ij; /* D_{i+1,i+1} */ if (d <= 0.) return FALSE; /* Elements of D should be positiv */ m[i + 1][1] = d; } if (n >= 2) { /* Complete last column */ m_n += m[n - 2][2]; /* add M_{n-2,n-1} */ m[n - 2][0] = m_n / d; /* C_{n-2,n-1} */ m[n - 1][1] = d = m_nn - m[n - 2][0] * m_n; /* D_{n-1,n-1} */ if (d <= 0.) return FALSE; } return TRUE; } /* * The second procedure solves the linear system, with the Choleky * decomposition calculated above (in m[][]) and the right side b given * in x[]. The solution x overwrites the right side in x[]. */ static void solve_cubic_2(tri_diag m[], double x[], int n) { int i; double x_n; /* Division by transpose of C : b = C^{-T} * b */ x_n = x[n - 1]; for (i = 0; i < n - 2; i++) { x[i + 1] -= m[i][2] * x[i]; /* C_{i,i+1} * x_{i} */ x_n -= m[i][0] * x[i]; /* C_{i,n-1} * x_{i} */ } if (n >= 2) x[n - 1] = x_n - m[n - 2][0] * x[n - 2]; /* C_{n-2,n-1} * x_{n-1} */ /* Division by D: b = D^{-1} * b */ for (i = 0; i < n; i++) x[i] /= m[i][1]; /* Division by C: b = C^{-1} * b */ x_n = x[n - 1]; if (n >= 2) x[n - 2] -= m[n - 2][0] * x_n; /* C_{n-2,n-1} * x_{n-1} */ for (i = n - 3; i >= 0; i--) { /* C_{i,i+1} * x_{i+1} + C_{i,n-1} * x_{n-1} */ x[i] -= m[i][2] * x[i + 1] + m[i][0] * x_n; } return; } /* * Solve tri diagonal linear system equation. The tri diagonal matrix is * defined via matrix M, right side is r, and solution X i.e. M * X = R. * Size of system given in n. Return TRUE if solution exist. */ /* not used any more in "contour.c", but in "spline.c" (21. Dec. 1995) ! */ int solve_tri_diag(tri_diag m[], double r[], double x[], int n) { int i; double t; for (i = 1; i < n; i++) { /* Eliminate element m[i][i-1] (lower diagonal). */ if (m[i - 1][1] == 0) return FALSE; t = m[i][0] / m[i - 1][1]; /* Find ratio between the two lines. */ /* m[i][0] = m[i][0] - m[i-1][1] * t; */ /* m[i][0] is not used any more (and set to 0 in the above line) */ m[i][1] = m[i][1] - m[i - 1][2] * t; r[i] = r[i] - r[i - 1] * t; } /* Now do back subtitution - update the solution vector X: */ if (m[n - 1][1] == 0) return FALSE; x[n - 1] = r[n - 1] / m[n - 1][1]; /* Find last element. */ for (i = n - 2; i >= 0; i--) { if (m[i][1] == 0) return FALSE; x[i] = (r[i] - x[i + 1] * m[i][2]) / m[i][1]; } return TRUE; } /* * Generate a Bspline curve defined by all the points given in linked list p: * Algorithm: using deBoor algorithm * Note: if Curvekind is open contour than Open end knot vector is assumed, * else (closed contour) Float end knot vector is assumed. * It is assumed that num_of_points is at least 2, and order of Bspline is less * than num_of_points! */ static void gen_bspline_approx( cntr_struct *p_cntr, int num_of_points, int order, TBOOLEAN contr_isclosed) { int knot_index = 0, pts_count = 1; double dt, t, next_t, t_min, t_max, x, y; cntr_struct *pc_temp = p_cntr, *pc_tail = NULL; /* If the contour is Closed one we must update few things: * 1. Make the list temporary circular, so we can close the contour. * 2. Update num_of_points - increase it by "order-1" so contour will be * closed. This will evaluate order more sections to close it! */ if (contr_isclosed) { pc_tail = p_cntr; while (pc_tail->next) pc_tail = pc_tail->next; /* Find last point. */ /* test if first and last point are equal */ if (fuzzy_equal(pc_tail, p_cntr)) { /* Close contour list - make it circular. */ pc_tail->next = p_cntr->next; num_of_points += order - 1; } else { pc_tail->next = p_cntr; num_of_points += order; } } /* Find first (t_min) and last (t_max) t value to eval: */ t = t_min = fetch_knot(contr_isclosed, num_of_points, order, order); t_max = fetch_knot(contr_isclosed, num_of_points, order, num_of_points); next_t = t_min + 1.0; knot_index = order; dt = 1.0 / contour_pts; /* Number of points per one section. */ while (t < t_max) { if (t > next_t) { pc_temp = pc_temp->next; /* Next order ctrl. pt. to blend. */ knot_index++; next_t += 1.0; } eval_bspline(t, pc_temp, num_of_points, order, knot_index, contr_isclosed, &x, &y); /* Next pt. */ add_cntr_point(x, y); pts_count++; /* As we might have some real number round off problems we do */ /* the last point outside the loop */ if (pts_count == contour_pts * (num_of_points - order) + 1) break; t += dt; } /* Now do the last point */ eval_bspline(t_max - EPSILON, pc_temp, num_of_points, order, knot_index, contr_isclosed, &x, &y); add_cntr_point(x, y); /* Complete the contour. */ if (contr_isclosed) /* Update list - un-circular it. */ pc_tail->next = NULL; } /* * The routine to evaluate the B-spline value at point t using knot vector * from function fetch_knot(), and the control points p_cntr. * Returns (x, y) of approximated B-spline. Note that p_cntr points on the * first control point to blend with. The B-spline is of order order. */ static void eval_bspline( double t, cntr_struct *p_cntr, int num_of_points, int order, int j, TBOOLEAN contr_isclosed, double *x, double *y) { int i, p; double ti, tikp, *dx, *dy; /* Copy p_cntr into it to make it faster. */ dx = gp_alloc((order + j) * sizeof(double), "contour b_spline"); dy = gp_alloc((order + j) * sizeof(double), "contour b_spline"); /* Set the dx/dy - [0] iteration step, control points (p==0 iterat.): */ for (i = j - order; i <= j; i++) { dx[i] = p_cntr->X; dy[i] = p_cntr->Y; p_cntr = p_cntr->next; } for (p = 1; p <= order; p++) { /* Iteration (b-spline level) counter. */ for (i = j; i >= j - order + p; i--) { /* Control points indexing. */ ti = fetch_knot(contr_isclosed, num_of_points, order, i); tikp = fetch_knot(contr_isclosed, num_of_points, order, i + order + 1 - p); if (ti == tikp) { /* Should not be a problems but how knows... */ } else { dx[i] = dx[i] * (t - ti) / (tikp - ti) + /* Calculate x. */ dx[i - 1] * (tikp - t) / (tikp - ti); dy[i] = dy[i] * (t - ti) / (tikp - ti) + /* Calculate y. */ dy[i - 1] * (tikp - t) / (tikp - ti); } } } *x = dx[j]; *y = dy[j]; free(dx); free(dy); } /* * Routine to get the i knot from uniform knot vector. The knot vector * might be float (Knot(i) = i) or open (where the first and last "order" * knots are equal). contr_isclosed determines knot kind - open contour means * open knot vector, and closed contour selects float knot vector. * Note the knot vector is not exist and this routine simulates it existance * Also note the indexes for the knot vector starts from 0. */ static double fetch_knot(TBOOLEAN contr_isclosed, int num_of_points, int order, int i) { if(! contr_isclosed) { if (i <= order) return 0.0; else if (i <= num_of_points) return (double) (i - order); else return (double) (num_of_points - order); } else { return (double) i; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/misc.h����������������������������������������������������������������������������0000644�0004711�0000144�00000010646�11753033621�012034� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: misc.h,v 1.37.2.1 2012/05/10 21:48:01 sfeam Exp $ */ /* GNUPLOT - misc.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_MISC_H # define GNUPLOT_MISC_H #include "syscfg.h" #include "gp_types.h" #include "stdfn.h" #include "graphics.h" #include "graph3d.h" /* Variables of misc.c needed by other modules: */ /* Prototypes from file "misc.c" */ struct iso_curve * iso_alloc __PROTO((int num)); void iso_extend __PROTO((struct iso_curve *ip, int num)); void iso_free __PROTO((struct iso_curve *ip)); const char *expand_call_arg __PROTO((int c)); void load_file __PROTO((FILE *fp, char *name, TBOOLEAN subst_args)); FILE *lf_top __PROTO((void)); TBOOLEAN lf_pop __PROTO((void)); void lf_push __PROTO((FILE *fp, char *name, char *cmdline)); void load_file_error __PROTO((void)); FILE *loadpath_fopen __PROTO((const char *, const char *)); char *fontpath_fullname __PROTO((const char *)); void push_terminal __PROTO((int is_interactive)); void pop_terminal __PROTO((void)); /* moved here, from setshow */ enum PLOT_STYLE get_style __PROTO((void)); void get_filledcurves_style_options __PROTO((filledcurves_opts *)); void filledcurves_options_tofile __PROTO((filledcurves_opts *, FILE *)); int lp_parse __PROTO((struct lp_style_type *, TBOOLEAN, TBOOLEAN)); void arrow_parse __PROTO((struct arrow_style_type *, TBOOLEAN)); void arrow_use_properties __PROTO((struct arrow_style_type *arrow, int tag)); void parse_fillstyle __PROTO((struct fill_style_type *fs, int def_style, int def_density, int def_pattern, t_colorspec def_border )); void parse_colorspec __PROTO((struct t_colorspec *tc, int option)); long parse_color_name __PROTO((void)); TBOOLEAN need_fill_border __PROTO((struct fill_style_type *fillstyle)); void get_image_options __PROTO((t_image *image)); /* State information for load_file(), to recover from errors * and properly handle recursive load_file calls */ typedef struct lf_state_struct { /* new recursion level: */ FILE *fp; /* file pointer for load file */ char *name; /* name of file */ char *cmdline; /* content of command string for do_string() */ /* last recursion level: */ TBOOLEAN interactive; /* value of interactive flag on entry */ TBOOLEAN do_load_arg_substitution; /* likewise ... */ int inline_num; /* inline_num on entry */ int depth; /* recursion depth */ int if_depth; /* used by _old_ if/else syntax */ TBOOLEAN if_open_for_else; /* used by _new_ if/else syntax */ TBOOLEAN if_condition; /* used by both old and new if/else syntax */ char *input_line; /* Input line text to restore */ struct lexical_unit *tokens;/* Input line tokens to restore */ int num_tokens; /* How big is the above ? */ int c_token; /* Which one were we on ? */ struct lf_state_struct *prev; /* defines a stack */ int call_argc; /* This saves the _caller's_ argc */ char *call_args[10]; /* args when file is 'call'ed instead of 'load'ed */ } LFS; extern LFS *lf_head; #endif /* GNUPLOT_MISC_H */ ������������������������������������������������������������������������������������������gnuplot-4.6.4/src/standard.h������������������������������������������������������������������������0000644�0004711�0000144�00000007362�10773601424�012705� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: standard.h,v 1.12 2008/03/30 03:03:48 sfeam Exp $ */ /* GNUPLOT - standard.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_STANDARD_H # define GNUPLOT_STANDARD_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "eval.h" /* Type definitions */ /* Variables of standard.c needed by other modules: */ /* Prototypes of functions exported by standard.c */ /* These are the more 'usual' functions built into the stack machine */ void f_real __PROTO((union argument *x)); void f_imag __PROTO((union argument *x)); void f_int __PROTO((union argument *x)); void f_arg __PROTO((union argument *x)); void f_conjg __PROTO((union argument *x)); void f_sin __PROTO((union argument *x)); void f_cos __PROTO((union argument *x)); void f_tan __PROTO((union argument *x)); void f_asin __PROTO((union argument *x)); void f_acos __PROTO((union argument *x)); void f_atan __PROTO((union argument *x)); void f_atan2 __PROTO((union argument *x)); void f_sinh __PROTO((union argument *x)); void f_cosh __PROTO((union argument *x)); void f_tanh __PROTO((union argument *x)); void f_asinh __PROTO((union argument *x)); void f_acosh __PROTO((union argument *x)); void f_atanh __PROTO((union argument *x)); void f_ellip_first __PROTO((union argument *x)); void f_ellip_second __PROTO((union argument *x)); void f_ellip_third __PROTO((union argument *x)); void f_void __PROTO((union argument *x)); void f_abs __PROTO((union argument *x)); void f_sgn __PROTO((union argument *x)); void f_sqrt __PROTO((union argument *x)); void f_exp __PROTO((union argument *x)); void f_log10 __PROTO((union argument *x)); void f_log __PROTO((union argument *x)); void f_floor __PROTO((union argument *x)); void f_ceil __PROTO((union argument *x)); void f_besj0 __PROTO((union argument *x)); void f_besj1 __PROTO((union argument *x)); void f_besy0 __PROTO((union argument *x)); void f_besy1 __PROTO((union argument *x)); void f_exists __PROTO((union argument *x)); /* exists("foo") */ void f_tmsec __PROTO((union argument *x)); void f_tmmin __PROTO((union argument *x)); void f_tmhour __PROTO((union argument *x)); void f_tmmday __PROTO((union argument *x)); void f_tmmon __PROTO((union argument *x)); void f_tmyear __PROTO((union argument *x)); void f_tmwday __PROTO((union argument *x)); void f_tmyday __PROTO((union argument *x)); #endif /* GNUPLOT_STANDARD_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/GNUmakefile�����������������������������������������������������������������������0000644�0004711�0000144�00000001007�06677453333�013010� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Systems where /bin/sh is not the default shell need this. The $(shell) # command below won't work with e.g. stock DOS/Windows shells. SHELL = /bin/sh have-Makefile := $(shell test -f Makefile && echo yes) # If the user runs GNU make but has not yet run ./configure, # give them a diagnostic. ifeq ($(have-Makefile),yes) include Makefile include $(srcdir)/Makefile.maint else all: @echo There seems to be no Makefile in this directory. @echo "You must run ./configure before running \`make'." @exit 1 endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/Makefile.in�����������������������������������������������������������������������0000644�0004711�0000144�00000213665�12223337636�013011� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # makefile.all generated automatically by GNU make VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = gnuplot$(EXEEXT) noinst_PROGRAMS = bf_test$(EXEEXT) pkglibexec_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) @BUILD_GNUPLOT_X11_TRUE@am__append_1 = gnuplot_x11 @BUILD_WXWIDGETS_TRUE@am__append_2 = wxterminal/wxt_gui.cpp @BUILD_GPCAIRO_TRUE@am__append_3 = wxterminal/gp_cairo.c wxterminal/gp_cairo_helpers.c @BUILD_BITMAP_TRUE@am__append_4 = bitmap.c @BUILD_QT_TRUE@@HAVE_LRELEASE_TRUE@am__append_5 = -DQTGNUPLOT_DATA_DIR=\"$(qtgnuplotdir)\" # Qt terminal sources @BUILD_QT_TRUE@am__append_6 = qtterminal/qt_term.cpp @BUILD_ON_APPLE_TRUE@@BUILD_QT_TRUE@am__append_7 = qtterminal/qt_term_mac.m @BUILD_QT_TRUE@am__append_8 = gnuplot_qt DIST_COMMON = $(srcdir)/makefile.all $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/mkinstalldirs \ $(top_srcdir)/depcomp README subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alpha.m4 \ $(top_srcdir)/m4/apple.m4 $(top_srcdir)/m4/beos.m4 \ $(top_srcdir)/m4/msdos.m4 $(top_srcdir)/m4/next.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" \ "$(DESTDIR)$(qtgnuplotdir)" @BUILD_GNUPLOT_X11_TRUE@am__EXEEXT_1 = gnuplot_x11$(EXEEXT) @BUILD_QT_TRUE@am__EXEEXT_2 = gnuplot_qt$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(pkglibexec_PROGRAMS) am_bf_test_OBJECTS = bf_test.$(OBJEXT) binary.$(OBJEXT) \ alloc.$(OBJEXT) bf_test_OBJECTS = $(am_bf_test_OBJECTS) bf_test_LDADD = $(LDADD) am__gnuplot_SOURCES_DIST = alloc.c alloc.h ansichek.h axis.c axis.h \ binary.c breaders.c breaders.h bitmap.h color.c color.h \ command.c command.h contour.c contour.h datafile.c datafile.h \ dynarray.c dynarray.h eval.c eval.h fit.c fit.h gadgets.c \ gadgets.h getcolor.c getcolor.h gp_hist.h gp_time.h gp_types.h \ gplt_x11.h graph3d.c graph3d.h graphics.c graphics.h help.c \ help.h hidden3d.c hidden3d.h history.c internal.c internal.h \ interpol.c interpol.h matrix.c matrix.h misc.c misc.h mouse.c \ mouse.h mousecmn.h national.h parse.c parse.h plot.c plot.h \ plot2d.c plot2d.h plot3d.c plot3d.h pm3d.c pm3d.h readline.c \ readline.h save.c save.h scanner.c scanner.h set.c setshow.h \ show.c specfun.c specfun.h standard.c standard.h stats.h \ stats.c stdfn.c stdfn.h syscfg.h tables.c tables.h tabulate.c \ tabulate.h template.h term_api.h term.c term.h time.c unset.c \ util.c util.h util3d.c util3d.h variable.c variable.h \ version.c version.h wxterminal/wxt_gui.cpp \ wxterminal/gp_cairo.c wxterminal/gp_cairo_helpers.c bitmap.c \ qtterminal/qt_term.cpp qtterminal/qt_term_mac.m @BUILD_WXWIDGETS_TRUE@am__objects_1 = wxt_gui.$(OBJEXT) @BUILD_GPCAIRO_TRUE@am__objects_2 = gp_cairo.$(OBJEXT) \ @BUILD_GPCAIRO_TRUE@ gp_cairo_helpers.$(OBJEXT) @BUILD_BITMAP_TRUE@am__objects_3 = bitmap.$(OBJEXT) @BUILD_QT_TRUE@am__objects_4 = qt_term.$(OBJEXT) @BUILD_ON_APPLE_TRUE@@BUILD_QT_TRUE@am__objects_5 = \ @BUILD_ON_APPLE_TRUE@@BUILD_QT_TRUE@ qt_term_mac.$(OBJEXT) am_gnuplot_OBJECTS = alloc.$(OBJEXT) axis.$(OBJEXT) binary.$(OBJEXT) \ breaders.$(OBJEXT) color.$(OBJEXT) command.$(OBJEXT) \ contour.$(OBJEXT) datafile.$(OBJEXT) dynarray.$(OBJEXT) \ eval.$(OBJEXT) fit.$(OBJEXT) gadgets.$(OBJEXT) \ getcolor.$(OBJEXT) graph3d.$(OBJEXT) graphics.$(OBJEXT) \ help.$(OBJEXT) hidden3d.$(OBJEXT) history.$(OBJEXT) \ internal.$(OBJEXT) interpol.$(OBJEXT) matrix.$(OBJEXT) \ misc.$(OBJEXT) mouse.$(OBJEXT) parse.$(OBJEXT) plot.$(OBJEXT) \ plot2d.$(OBJEXT) plot3d.$(OBJEXT) pm3d.$(OBJEXT) \ readline.$(OBJEXT) save.$(OBJEXT) scanner.$(OBJEXT) \ set.$(OBJEXT) show.$(OBJEXT) specfun.$(OBJEXT) \ standard.$(OBJEXT) stats.$(OBJEXT) stdfn.$(OBJEXT) \ tables.$(OBJEXT) tabulate.$(OBJEXT) term.$(OBJEXT) \ time.$(OBJEXT) unset.$(OBJEXT) util.$(OBJEXT) util3d.$(OBJEXT) \ variable.$(OBJEXT) version.$(OBJEXT) $(am__objects_1) \ $(am__objects_2) $(am__objects_3) $(am__objects_4) \ $(am__objects_5) gnuplot_OBJECTS = $(am_gnuplot_OBJECTS) am__DEPENDENCIES_1 = gnuplot_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__gnuplot_qt_SOURCES_DIST = qtterminal/gnuplot_qt.cpp \ qtterminal/QtGnuplotWindow.cpp \ qtterminal/QtGnuplotApplication.cpp \ qtterminal/QtGnuplotWidget.cpp qtterminal/QtGnuplotScene.cpp \ qtterminal/QtGnuplotItems.cpp qtterminal/QtGnuplotEvent.cpp @BUILD_QT_TRUE@am_gnuplot_qt_OBJECTS = gnuplot_qt.$(OBJEXT) \ @BUILD_QT_TRUE@ QtGnuplotWindow.$(OBJEXT) \ @BUILD_QT_TRUE@ QtGnuplotApplication.$(OBJEXT) \ @BUILD_QT_TRUE@ QtGnuplotWidget.$(OBJEXT) \ @BUILD_QT_TRUE@ QtGnuplotScene.$(OBJEXT) \ @BUILD_QT_TRUE@ QtGnuplotItems.$(OBJEXT) \ @BUILD_QT_TRUE@ QtGnuplotEvent.$(OBJEXT) @BUILD_QT_TRUE@nodist_gnuplot_qt_OBJECTS = \ @BUILD_QT_TRUE@ moc_QtGnuplotWindow.$(OBJEXT) \ @BUILD_QT_TRUE@ moc_QtGnuplotApplication.$(OBJEXT) \ @BUILD_QT_TRUE@ moc_QtGnuplotWidget.$(OBJEXT) \ @BUILD_QT_TRUE@ moc_QtGnuplotScene.$(OBJEXT) \ @BUILD_QT_TRUE@ moc_QtGnuplotEvent.$(OBJEXT) \ @BUILD_QT_TRUE@ qrc_QtGnuplotResource.$(OBJEXT) gnuplot_qt_OBJECTS = $(am_gnuplot_qt_OBJECTS) \ $(nodist_gnuplot_qt_OBJECTS) @BUILD_QT_TRUE@gnuplot_qt_DEPENDENCIES = $(am__DEPENDENCIES_1) am__gnuplot_x11_SOURCES_DIST = gplt_x11.c gplt_x11.h gpexecute.c \ gpexecute.h mousecmn.h version.c version.h @BUILD_GNUPLOT_X11_TRUE@am_gnuplot_x11_OBJECTS = gplt_x11.$(OBJEXT) \ @BUILD_GNUPLOT_X11_TRUE@ gpexecute.$(OBJEXT) version.$(OBJEXT) gnuplot_x11_OBJECTS = $(am_gnuplot_x11_OBJECTS) @BUILD_GNUPLOT_X11_TRUE@gnuplot_x11_DEPENDENCIES = getcolor_x11.o \ @BUILD_GNUPLOT_X11_TRUE@ $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = OBJCCOMPILE = $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) AM_V_OBJC = $(am__v_OBJC_@AM_V@) am__v_OBJC_ = $(am__v_OBJC_@AM_DEFAULT_V@) am__v_OBJC_0 = @echo " OBJC " $@; am__v_OBJC_1 = OBJCLD = $(OBJC) OBJCLINK = $(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_OBJCLD = $(am__v_OBJCLD_@AM_V@) am__v_OBJCLD_ = $(am__v_OBJCLD_@AM_DEFAULT_V@) am__v_OBJCLD_0 = @echo " OBJCLD " $@; am__v_OBJCLD_1 = SOURCES = $(bf_test_SOURCES) $(gnuplot_SOURCES) \ $(EXTRA_gnuplot_SOURCES) $(gnuplot_qt_SOURCES) \ $(nodist_gnuplot_qt_SOURCES) $(gnuplot_x11_SOURCES) DIST_SOURCES = $(bf_test_SOURCES) $(am__gnuplot_SOURCES_DIST) \ $(EXTRA_gnuplot_SOURCES) $(am__gnuplot_qt_SOURCES_DIST) \ $(am__gnuplot_x11_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } DATA = $(qtgnuplot_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = beos wxterminal qtterminal DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" # in the spirit of automake ... pkglibexecdir = $(libexecdir)/@PACKAGE@/@VERSION_MAJOR@ transform = @program_transform_name@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROEPS_CFLAGS = @CAIROEPS_CFLAGS@ CAIROEPS_LIBS = @CAIROEPS_LIBS@ CAIROPANGO_CFLAGS = @CAIROPANGO_CFLAGS@ CAIROPANGO_LIBS = @CAIROPANGO_LIBS@ CAIROPDF_CFLAGS = @CAIROPDF_CFLAGS@ CAIROPDF_LIBS = @CAIROPDF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIST_CONTACT = @DIST_CONTACT@ DVIPS = @DVIPS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ GDLIB_CONFIG = @GDLIB_CONFIG@ GIHDIR = @GIHDIR@ GREP = @GREP@ GTK28_CFLAGS = @GTK28_CFLAGS@ GTK28_LIBS = @GTK28_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEXPAND = @KPSEXPAND@ LASERGNU = @LASERGNU@ LATEX = @LATEX@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARIES_FOR_X = @LIBRARIES_FOR_X@ LIBS = @LIBS@ LINUXSUID = @LINUXSUID@ LISPDIR = @LISPDIR@ LN_S = @LN_S@ LRELEASE = @LRELEASE@ LTLIBOBJS = @LTLIBOBJS@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGO_1_10_2_CFLAGS = @PANGO_1_10_2_CFLAGS@ PANGO_1_10_2_LIBS = @PANGO_1_10_2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PDFLIB_CONFIG = @PDFLIB_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ PLAINTEX = @PLAINTEX@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RCC = @RCC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMLIBS = @TERMLIBS@ TERMXLIBS = @TERMXLIBS@ TEXDIR = @TEXDIR@ TEXHASH = @TEXHASH@ TROFF = @TROFF@ TUTORIAL = @TUTORIAL@ UIC = @UIC@ VERSION = @VERSION@ VERSION_MAJOR = @VERSION_MAJOR@ WX_CONFIG = @WX_CONFIG@ WX_LIBS = @WX_LIBS@ X11_APPDEFAULTS_DIR = @X11_APPDEFAULTS_DIR@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_OBJC = @ac_ct_OBJC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign # Where to send email about bugs and comments (locally) EMAIL = gnuplot-bugs@lists.sourceforge.net # Default help file location HELPFILE = @GIHDIR@/gnuplot.gih # Location of X11 app defaults XAPPLRESDIR = @X11_APPDEFAULTS_DIR@ # Default X11 driver location X11_DRIVER_DIR = $(pkglibexecdir) # Default Qt driver location QT_DRIVER_DIR = $(pkglibexecdir) # Default lua driver location GNUPLOT_LUA_DIR = $(pkgdatadir)/$(VERSION_MAJOR)/lua # Default javascript location GNUPLOT_JS_DIR = $(pkgdatadir)/$(VERSION_MAJOR)/js # Default Postscript prologues location GNUPLOT_PS_DIR = $(pkgdatadir)/$(VERSION_MAJOR)/PostScript # System-wide initialization file GNUPLOT_SHARE_DIR = $(pkgdatadir)/$(VERSION_MAJOR) GNUPLOT_X11 = `echo gnuplot_x11 | sed '$(transform)'`$(EXEEXT) AM_CPPFLAGS = -I../term -I$(top_srcdir)/term -DBINDIR=\"$(bindir)\" \ -DX11_DRIVER_DIR=\"$(X11_DRIVER_DIR)\" \ -DQT_DRIVER_DIR=\"$(QT_DRIVER_DIR)\" \ -DGNUPLOT_SHARE_DIR=\"$(GNUPLOT_SHARE_DIR)\" \ -DGNUPLOT_PS_DIR=\"$(GNUPLOT_PS_DIR)\" \ -DGNUPLOT_JS_DIR=\"$(GNUPLOT_JS_DIR)\" \ -DGNUPLOT_LUA_DIR=\"$(GNUPLOT_LUA_DIR)\" \ -DCONTACT=\"$(EMAIL)\" -DHELPFILE=\"$(HELPFILE)\" \ -DGNUPLOT_X11=\"$(GNUPLOT_X11)\" \ -DXAPPLRESDIR=\"$(XAPPLRESDIR)\" $(am__append_5) gnuplot_SOURCES = alloc.c alloc.h ansichek.h axis.c axis.h binary.c \ breaders.c breaders.h bitmap.h color.c color.h command.c \ command.h contour.c contour.h datafile.c datafile.h dynarray.c \ dynarray.h eval.c eval.h fit.c fit.h gadgets.c gadgets.h \ getcolor.c getcolor.h gp_hist.h gp_time.h gp_types.h \ gplt_x11.h graph3d.c graph3d.h graphics.c graphics.h help.c \ help.h hidden3d.c hidden3d.h history.c internal.c internal.h \ interpol.c interpol.h matrix.c matrix.h misc.c misc.h mouse.c \ mouse.h mousecmn.h national.h parse.c parse.h plot.c plot.h \ plot2d.c plot2d.h plot3d.c plot3d.h pm3d.c pm3d.h readline.c \ readline.h save.c save.h scanner.c scanner.h set.c setshow.h \ show.c specfun.c specfun.h standard.c standard.h stats.h \ stats.c stdfn.c stdfn.h syscfg.h tables.c tables.h tabulate.c \ tabulate.h template.h term_api.h term.c term.h time.c unset.c \ util.c util.h util3d.c util3d.h variable.c variable.h \ version.c version.h $(am__append_2) $(am__append_3) \ $(am__append_4) $(am__append_6) $(am__append_7) gnuplot_LDADD = $(TERMLIBS) $(TERMXLIBS) $(WX_LIBS) $(QT_LIBS) @BUILD_GNUPLOT_X11_TRUE@gnuplot_x11_SOURCES = gplt_x11.c gplt_x11.h gpexecute.c gpexecute.h mousecmn.h version.c version.h @BUILD_GNUPLOT_X11_TRUE@XLIBS = @LIBRARIES_FOR_X@ @BUILD_GNUPLOT_X11_TRUE@gnuplot_x11_LDADD = getcolor_x11.o $(XLIBS) bf_test_SOURCES = bf_test.c binary.c binary.h alloc.c @BUILD_SRC_BEOS_SUBDIR_TRUE@d_beos = beos SUBDIRS = $(d_beos) wxterminal qtterminal EXTRA_gnuplot_SOURCES = corplot.c os9.c strftime.c vms.c EXTRA_DIST = GNUmakefile Makefile.maint NeXT OpenStep README \ corgraph.asm genopt.com gnuplot.opt header.mac \ hrcgraph.asm intergra.x11 lasergnu lineproc.mac linkopt.vms \ makefile.all makefile.awc os2 pcgraph.asm win x11.opt \ $(EXTRA_gnuplot_SOURCES) # List of compiles translation files @BUILD_QT_TRUE@@HAVE_LRELEASE_TRUE@TRANSLATIONS = qtgnuplot_fr.qm qtgnuplot_ja.qm # Install translation files @BUILD_QT_TRUE@@HAVE_LRELEASE_TRUE@qtgnuplotdir = $(pkgdatadir)/$(VERSION_MAJOR)/qt @BUILD_QT_TRUE@@HAVE_LRELEASE_TRUE@qtgnuplot_DATA = $(TRANSLATIONS) @BUILD_QT_TRUE@nodist_gnuplot_qt_SOURCES = moc_QtGnuplotWindow.cpp moc_QtGnuplotApplication.cpp \ @BUILD_QT_TRUE@ moc_QtGnuplotWidget.cpp moc_QtGnuplotScene.cpp \ @BUILD_QT_TRUE@ moc_QtGnuplotEvent.cpp qrc_QtGnuplotResource.cpp @BUILD_QT_TRUE@gnuplot_qt_SOURCES = qtterminal/gnuplot_qt.cpp qtterminal/QtGnuplotWindow.cpp \ @BUILD_QT_TRUE@qtterminal/QtGnuplotApplication.cpp qtterminal/QtGnuplotWidget.cpp \ @BUILD_QT_TRUE@qtterminal/QtGnuplotScene.cpp qtterminal/QtGnuplotItems.cpp \ @BUILD_QT_TRUE@qtterminal/QtGnuplotEvent.cpp @BUILD_QT_TRUE@gnuplot_qt_LDADD = $(QT_LIBS) # embed example (uncomment to build it) # bin_PROGRAMS += embed_example # # nodist_embed_example_SOURCES = moc_embed_example.cpp moc_QtGnuplotInstance.cpp \ # moc_QtGnuplotWidget.cpp moc_QtGnuplotScene.cpp \ # moc_QtGnuplotEvent.cpp qrc_QtGnuplotResource.cpp # # embed_example_SOURCES = qtterminal/embed_example.cpp \ # qtterminal/QtGnuplotWidget.cpp qtterminal/QtGnuplotEvent.cpp \ # qtterminal/QtGnuplotScene.cpp qtterminal/QtGnuplotItems.cpp \ # qtterminal/QtGnuplotInstance.cpp # # embed_example_LDADD = $(QT_LIBS) O = o T = $(top_srcdir)/term/ # List of core object files except version.$(O) COREOBJS = alloc.$(O) axis.$(O) binary.$(O) bitmap.$(O) breaders.$(O) \ color.$(O) command.$(O) contour.$(O) datafile.$(O) dynarray.$(O) eval.$(O) \ fit.$(O) gadgets.$(O) getcolor.$(O) graph3d.$(O) graphics.$(O) help.$(O) \ hidden3d.$(O) history.$(O) internal.$(O) interpol.$(O) matrix.$(O) \ misc.$(O) mouse.$(O) parse.$(O) plot.$(O) plot2d.$(O) plot3d.$(O) \ pm3d.$(O) readline.$(O) save.$(O) scanner.$(O) set.$(O) show.$(O) \ specfun.$(O) standard.$(O) stats.$(O) stdfn.$(O) tables.$(O) tabulate.$(O) \ term.$(O) time.$(O) unset.$(O) util.$(O) util3d.$(O) variable.$(O) # List of terminal driver sources CORETERM = $(T)aed.trm $(T)ai.trm $(T)aquaterm.trm $(T)be.trm \ $(T)cairo.trm $(T)canvas.trm $(T)cgi.trm $(T)cgm.trm $(T)context.trm \ $(T)corel.trm $(T)debug.trm $(T)djsvga.trm $(T)dumb.trm $(T)dxf.trm \ $(T)dxy.trm $(T)eepic.trm $(T)emf.trm $(T)emxvga.trm $(T)epson.trm \ $(T)estimate.trm $(T)excl.trm $(T)fig.trm $(T)gd.trm $(T)ggi.trm \ $(T)gpic.trm $(T)grass.trm $(T)hp2648.trm $(T)hp26.trm $(T)hp500c.trm \ $(T)hpgl.trm $(T)hpljii.trm $(T)hppj.trm $(T)imagen.trm $(T)kyo.trm \ $(T)latex.trm $(T)linux.trm $(T)lua.trm $(T)mac.trm $(T)metafont.trm \ $(T)metapost.trm $(T)mif.trm $(T)next.trm $(T)openstep.trm $(T)pbm.trm \ $(T)pc.trm $(T)pdf.trm $(T)pm.trm $(T)post.trm $(T)pslatex.trm \ $(T)pstricks.trm $(T)qms.trm $(T)qt.trm $(T)regis.trm $(T)sun.trm \ $(T)svg.trm $(T)t410x.trm $(T)tek.trm $(T)texdraw.trm $(T)tgif.trm \ $(T)tkcanvas.trm $(T)tpic.trm $(T)unixpc.trm $(T)v384.trm $(T)vgagl.trm \ $(T)vws.trm $(T)win.trm $(T)wxt.trm $(T)x11.trm $(T)xlib.trm all: all-recursive .SUFFIXES: .SUFFIXES: .c .cpp .m .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/makefile.all $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(srcdir)/makefile.all: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) install-pkglibexecPROGRAMS: $(pkglibexec_PROGRAMS) @$(NORMAL_INSTALL) @list='$(pkglibexec_PROGRAMS)'; test -n "$(pkglibexecdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibexecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkglibexecdir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibexecdir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-pkglibexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(pkglibexec_PROGRAMS)'; test -n "$(pkglibexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkglibexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkglibexecdir)" && rm -f $$files clean-pkglibexecPROGRAMS: -test -z "$(pkglibexec_PROGRAMS)" || rm -f $(pkglibexec_PROGRAMS) bf_test$(EXEEXT): $(bf_test_OBJECTS) $(bf_test_DEPENDENCIES) $(EXTRA_bf_test_DEPENDENCIES) @rm -f bf_test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(bf_test_OBJECTS) $(bf_test_LDADD) $(LIBS) gnuplot$(EXEEXT): $(gnuplot_OBJECTS) $(gnuplot_DEPENDENCIES) $(EXTRA_gnuplot_DEPENDENCIES) @rm -f gnuplot$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(gnuplot_OBJECTS) $(gnuplot_LDADD) $(LIBS) gnuplot_qt$(EXEEXT): $(gnuplot_qt_OBJECTS) $(gnuplot_qt_DEPENDENCIES) $(EXTRA_gnuplot_qt_DEPENDENCIES) @rm -f gnuplot_qt$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(gnuplot_qt_OBJECTS) $(gnuplot_qt_LDADD) $(LIBS) gnuplot_x11$(EXEEXT): $(gnuplot_x11_OBJECTS) $(gnuplot_x11_DEPENDENCIES) $(EXTRA_gnuplot_x11_DEPENDENCIES) @rm -f gnuplot_x11$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gnuplot_x11_OBJECTS) $(gnuplot_x11_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QtGnuplotApplication.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QtGnuplotEvent.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QtGnuplotItems.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QtGnuplotScene.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QtGnuplotWidget.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QtGnuplotWindow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/axis.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bf_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/breaders.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/contour.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/corplot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datafile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynarray.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gadgets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcolor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnuplot_qt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gp_cairo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gp_cairo_helpers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpexecute.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gplt_x11.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graph3d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphics.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hidden3d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/history.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/internal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_QtGnuplotApplication.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_QtGnuplotEvent.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_QtGnuplotScene.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_QtGnuplotWidget.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_QtGnuplotWindow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mouse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os9.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plot2d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plot3d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm3d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qrc_QtGnuplotResource.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qt_term.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qt_term_mac.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scanner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/show.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/specfun.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standard.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stats.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdfn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strftime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabulate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/term.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util3d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/variable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vms.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wxt_gui.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` gp_cairo.o: wxterminal/gp_cairo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gp_cairo.o -MD -MP -MF $(DEPDIR)/gp_cairo.Tpo -c -o gp_cairo.o `test -f 'wxterminal/gp_cairo.c' || echo '$(srcdir)/'`wxterminal/gp_cairo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gp_cairo.Tpo $(DEPDIR)/gp_cairo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wxterminal/gp_cairo.c' object='gp_cairo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gp_cairo.o `test -f 'wxterminal/gp_cairo.c' || echo '$(srcdir)/'`wxterminal/gp_cairo.c gp_cairo.obj: wxterminal/gp_cairo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gp_cairo.obj -MD -MP -MF $(DEPDIR)/gp_cairo.Tpo -c -o gp_cairo.obj `if test -f 'wxterminal/gp_cairo.c'; then $(CYGPATH_W) 'wxterminal/gp_cairo.c'; else $(CYGPATH_W) '$(srcdir)/wxterminal/gp_cairo.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gp_cairo.Tpo $(DEPDIR)/gp_cairo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wxterminal/gp_cairo.c' object='gp_cairo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gp_cairo.obj `if test -f 'wxterminal/gp_cairo.c'; then $(CYGPATH_W) 'wxterminal/gp_cairo.c'; else $(CYGPATH_W) '$(srcdir)/wxterminal/gp_cairo.c'; fi` gp_cairo_helpers.o: wxterminal/gp_cairo_helpers.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gp_cairo_helpers.o -MD -MP -MF $(DEPDIR)/gp_cairo_helpers.Tpo -c -o gp_cairo_helpers.o `test -f 'wxterminal/gp_cairo_helpers.c' || echo '$(srcdir)/'`wxterminal/gp_cairo_helpers.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gp_cairo_helpers.Tpo $(DEPDIR)/gp_cairo_helpers.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wxterminal/gp_cairo_helpers.c' object='gp_cairo_helpers.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gp_cairo_helpers.o `test -f 'wxterminal/gp_cairo_helpers.c' || echo '$(srcdir)/'`wxterminal/gp_cairo_helpers.c gp_cairo_helpers.obj: wxterminal/gp_cairo_helpers.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gp_cairo_helpers.obj -MD -MP -MF $(DEPDIR)/gp_cairo_helpers.Tpo -c -o gp_cairo_helpers.obj `if test -f 'wxterminal/gp_cairo_helpers.c'; then $(CYGPATH_W) 'wxterminal/gp_cairo_helpers.c'; else $(CYGPATH_W) '$(srcdir)/wxterminal/gp_cairo_helpers.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gp_cairo_helpers.Tpo $(DEPDIR)/gp_cairo_helpers.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wxterminal/gp_cairo_helpers.c' object='gp_cairo_helpers.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gp_cairo_helpers.obj `if test -f 'wxterminal/gp_cairo_helpers.c'; then $(CYGPATH_W) 'wxterminal/gp_cairo_helpers.c'; else $(CYGPATH_W) '$(srcdir)/wxterminal/gp_cairo_helpers.c'; fi` .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` wxt_gui.o: wxterminal/wxt_gui.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT wxt_gui.o -MD -MP -MF $(DEPDIR)/wxt_gui.Tpo -c -o wxt_gui.o `test -f 'wxterminal/wxt_gui.cpp' || echo '$(srcdir)/'`wxterminal/wxt_gui.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wxt_gui.Tpo $(DEPDIR)/wxt_gui.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='wxterminal/wxt_gui.cpp' object='wxt_gui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o wxt_gui.o `test -f 'wxterminal/wxt_gui.cpp' || echo '$(srcdir)/'`wxterminal/wxt_gui.cpp wxt_gui.obj: wxterminal/wxt_gui.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT wxt_gui.obj -MD -MP -MF $(DEPDIR)/wxt_gui.Tpo -c -o wxt_gui.obj `if test -f 'wxterminal/wxt_gui.cpp'; then $(CYGPATH_W) 'wxterminal/wxt_gui.cpp'; else $(CYGPATH_W) '$(srcdir)/wxterminal/wxt_gui.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wxt_gui.Tpo $(DEPDIR)/wxt_gui.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='wxterminal/wxt_gui.cpp' object='wxt_gui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o wxt_gui.obj `if test -f 'wxterminal/wxt_gui.cpp'; then $(CYGPATH_W) 'wxterminal/wxt_gui.cpp'; else $(CYGPATH_W) '$(srcdir)/wxterminal/wxt_gui.cpp'; fi` qt_term.o: qtterminal/qt_term.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT qt_term.o -MD -MP -MF $(DEPDIR)/qt_term.Tpo -c -o qt_term.o `test -f 'qtterminal/qt_term.cpp' || echo '$(srcdir)/'`qtterminal/qt_term.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/qt_term.Tpo $(DEPDIR)/qt_term.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/qt_term.cpp' object='qt_term.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o qt_term.o `test -f 'qtterminal/qt_term.cpp' || echo '$(srcdir)/'`qtterminal/qt_term.cpp qt_term.obj: qtterminal/qt_term.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT qt_term.obj -MD -MP -MF $(DEPDIR)/qt_term.Tpo -c -o qt_term.obj `if test -f 'qtterminal/qt_term.cpp'; then $(CYGPATH_W) 'qtterminal/qt_term.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/qt_term.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/qt_term.Tpo $(DEPDIR)/qt_term.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/qt_term.cpp' object='qt_term.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o qt_term.obj `if test -f 'qtterminal/qt_term.cpp'; then $(CYGPATH_W) 'qtterminal/qt_term.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/qt_term.cpp'; fi` gnuplot_qt.o: qtterminal/gnuplot_qt.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnuplot_qt.o -MD -MP -MF $(DEPDIR)/gnuplot_qt.Tpo -c -o gnuplot_qt.o `test -f 'qtterminal/gnuplot_qt.cpp' || echo '$(srcdir)/'`qtterminal/gnuplot_qt.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gnuplot_qt.Tpo $(DEPDIR)/gnuplot_qt.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/gnuplot_qt.cpp' object='gnuplot_qt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnuplot_qt.o `test -f 'qtterminal/gnuplot_qt.cpp' || echo '$(srcdir)/'`qtterminal/gnuplot_qt.cpp gnuplot_qt.obj: qtterminal/gnuplot_qt.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnuplot_qt.obj -MD -MP -MF $(DEPDIR)/gnuplot_qt.Tpo -c -o gnuplot_qt.obj `if test -f 'qtterminal/gnuplot_qt.cpp'; then $(CYGPATH_W) 'qtterminal/gnuplot_qt.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/gnuplot_qt.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gnuplot_qt.Tpo $(DEPDIR)/gnuplot_qt.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/gnuplot_qt.cpp' object='gnuplot_qt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnuplot_qt.obj `if test -f 'qtterminal/gnuplot_qt.cpp'; then $(CYGPATH_W) 'qtterminal/gnuplot_qt.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/gnuplot_qt.cpp'; fi` QtGnuplotWindow.o: qtterminal/QtGnuplotWindow.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QtGnuplotWindow.o -MD -MP -MF $(DEPDIR)/QtGnuplotWindow.Tpo -c -o QtGnuplotWindow.o `test -f 'qtterminal/QtGnuplotWindow.cpp' || echo '$(srcdir)/'`qtterminal/QtGnuplotWindow.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/QtGnuplotWindow.Tpo $(DEPDIR)/QtGnuplotWindow.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/QtGnuplotWindow.cpp' object='QtGnuplotWindow.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QtGnuplotWindow.o `test -f 'qtterminal/QtGnuplotWindow.cpp' || echo '$(srcdir)/'`qtterminal/QtGnuplotWindow.cpp QtGnuplotWindow.obj: qtterminal/QtGnuplotWindow.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QtGnuplotWindow.obj -MD -MP -MF $(DEPDIR)/QtGnuplotWindow.Tpo -c -o QtGnuplotWindow.obj `if test -f 'qtterminal/QtGnuplotWindow.cpp'; then $(CYGPATH_W) 'qtterminal/QtGnuplotWindow.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/QtGnuplotWindow.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/QtGnuplotWindow.Tpo $(DEPDIR)/QtGnuplotWindow.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/QtGnuplotWindow.cpp' object='QtGnuplotWindow.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QtGnuplotWindow.obj `if test -f 'qtterminal/QtGnuplotWindow.cpp'; then $(CYGPATH_W) 'qtterminal/QtGnuplotWindow.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/QtGnuplotWindow.cpp'; fi` QtGnuplotApplication.o: qtterminal/QtGnuplotApplication.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QtGnuplotApplication.o -MD -MP -MF $(DEPDIR)/QtGnuplotApplication.Tpo -c -o QtGnuplotApplication.o `test -f 'qtterminal/QtGnuplotApplication.cpp' || echo '$(srcdir)/'`qtterminal/QtGnuplotApplication.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/QtGnuplotApplication.Tpo $(DEPDIR)/QtGnuplotApplication.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/QtGnuplotApplication.cpp' object='QtGnuplotApplication.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QtGnuplotApplication.o `test -f 'qtterminal/QtGnuplotApplication.cpp' || echo '$(srcdir)/'`qtterminal/QtGnuplotApplication.cpp QtGnuplotApplication.obj: qtterminal/QtGnuplotApplication.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QtGnuplotApplication.obj -MD -MP -MF $(DEPDIR)/QtGnuplotApplication.Tpo -c -o QtGnuplotApplication.obj `if test -f 'qtterminal/QtGnuplotApplication.cpp'; then $(CYGPATH_W) 'qtterminal/QtGnuplotApplication.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/QtGnuplotApplication.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/QtGnuplotApplication.Tpo $(DEPDIR)/QtGnuplotApplication.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/QtGnuplotApplication.cpp' object='QtGnuplotApplication.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QtGnuplotApplication.obj `if test -f 'qtterminal/QtGnuplotApplication.cpp'; then $(CYGPATH_W) 'qtterminal/QtGnuplotApplication.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/QtGnuplotApplication.cpp'; fi` QtGnuplotWidget.o: qtterminal/QtGnuplotWidget.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QtGnuplotWidget.o -MD -MP -MF $(DEPDIR)/QtGnuplotWidget.Tpo -c -o QtGnuplotWidget.o `test -f 'qtterminal/QtGnuplotWidget.cpp' || echo '$(srcdir)/'`qtterminal/QtGnuplotWidget.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/QtGnuplotWidget.Tpo $(DEPDIR)/QtGnuplotWidget.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/QtGnuplotWidget.cpp' object='QtGnuplotWidget.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QtGnuplotWidget.o `test -f 'qtterminal/QtGnuplotWidget.cpp' || echo '$(srcdir)/'`qtterminal/QtGnuplotWidget.cpp QtGnuplotWidget.obj: qtterminal/QtGnuplotWidget.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QtGnuplotWidget.obj -MD -MP -MF $(DEPDIR)/QtGnuplotWidget.Tpo -c -o QtGnuplotWidget.obj `if test -f 'qtterminal/QtGnuplotWidget.cpp'; then $(CYGPATH_W) 'qtterminal/QtGnuplotWidget.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/QtGnuplotWidget.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/QtGnuplotWidget.Tpo $(DEPDIR)/QtGnuplotWidget.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/QtGnuplotWidget.cpp' object='QtGnuplotWidget.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QtGnuplotWidget.obj `if test -f 'qtterminal/QtGnuplotWidget.cpp'; then $(CYGPATH_W) 'qtterminal/QtGnuplotWidget.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/QtGnuplotWidget.cpp'; fi` QtGnuplotScene.o: qtterminal/QtGnuplotScene.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QtGnuplotScene.o -MD -MP -MF $(DEPDIR)/QtGnuplotScene.Tpo -c -o QtGnuplotScene.o `test -f 'qtterminal/QtGnuplotScene.cpp' || echo '$(srcdir)/'`qtterminal/QtGnuplotScene.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/QtGnuplotScene.Tpo $(DEPDIR)/QtGnuplotScene.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/QtGnuplotScene.cpp' object='QtGnuplotScene.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QtGnuplotScene.o `test -f 'qtterminal/QtGnuplotScene.cpp' || echo '$(srcdir)/'`qtterminal/QtGnuplotScene.cpp QtGnuplotScene.obj: qtterminal/QtGnuplotScene.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QtGnuplotScene.obj -MD -MP -MF $(DEPDIR)/QtGnuplotScene.Tpo -c -o QtGnuplotScene.obj `if test -f 'qtterminal/QtGnuplotScene.cpp'; then $(CYGPATH_W) 'qtterminal/QtGnuplotScene.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/QtGnuplotScene.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/QtGnuplotScene.Tpo $(DEPDIR)/QtGnuplotScene.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/QtGnuplotScene.cpp' object='QtGnuplotScene.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QtGnuplotScene.obj `if test -f 'qtterminal/QtGnuplotScene.cpp'; then $(CYGPATH_W) 'qtterminal/QtGnuplotScene.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/QtGnuplotScene.cpp'; fi` QtGnuplotItems.o: qtterminal/QtGnuplotItems.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QtGnuplotItems.o -MD -MP -MF $(DEPDIR)/QtGnuplotItems.Tpo -c -o QtGnuplotItems.o `test -f 'qtterminal/QtGnuplotItems.cpp' || echo '$(srcdir)/'`qtterminal/QtGnuplotItems.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/QtGnuplotItems.Tpo $(DEPDIR)/QtGnuplotItems.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/QtGnuplotItems.cpp' object='QtGnuplotItems.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QtGnuplotItems.o `test -f 'qtterminal/QtGnuplotItems.cpp' || echo '$(srcdir)/'`qtterminal/QtGnuplotItems.cpp QtGnuplotItems.obj: qtterminal/QtGnuplotItems.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QtGnuplotItems.obj -MD -MP -MF $(DEPDIR)/QtGnuplotItems.Tpo -c -o QtGnuplotItems.obj `if test -f 'qtterminal/QtGnuplotItems.cpp'; then $(CYGPATH_W) 'qtterminal/QtGnuplotItems.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/QtGnuplotItems.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/QtGnuplotItems.Tpo $(DEPDIR)/QtGnuplotItems.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/QtGnuplotItems.cpp' object='QtGnuplotItems.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QtGnuplotItems.obj `if test -f 'qtterminal/QtGnuplotItems.cpp'; then $(CYGPATH_W) 'qtterminal/QtGnuplotItems.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/QtGnuplotItems.cpp'; fi` QtGnuplotEvent.o: qtterminal/QtGnuplotEvent.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QtGnuplotEvent.o -MD -MP -MF $(DEPDIR)/QtGnuplotEvent.Tpo -c -o QtGnuplotEvent.o `test -f 'qtterminal/QtGnuplotEvent.cpp' || echo '$(srcdir)/'`qtterminal/QtGnuplotEvent.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/QtGnuplotEvent.Tpo $(DEPDIR)/QtGnuplotEvent.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/QtGnuplotEvent.cpp' object='QtGnuplotEvent.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QtGnuplotEvent.o `test -f 'qtterminal/QtGnuplotEvent.cpp' || echo '$(srcdir)/'`qtterminal/QtGnuplotEvent.cpp QtGnuplotEvent.obj: qtterminal/QtGnuplotEvent.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QtGnuplotEvent.obj -MD -MP -MF $(DEPDIR)/QtGnuplotEvent.Tpo -c -o QtGnuplotEvent.obj `if test -f 'qtterminal/QtGnuplotEvent.cpp'; then $(CYGPATH_W) 'qtterminal/QtGnuplotEvent.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/QtGnuplotEvent.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/QtGnuplotEvent.Tpo $(DEPDIR)/QtGnuplotEvent.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qtterminal/QtGnuplotEvent.cpp' object='QtGnuplotEvent.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QtGnuplotEvent.obj `if test -f 'qtterminal/QtGnuplotEvent.cpp'; then $(CYGPATH_W) 'qtterminal/QtGnuplotEvent.cpp'; else $(CYGPATH_W) '$(srcdir)/qtterminal/QtGnuplotEvent.cpp'; fi` .m.o: @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJCCOMPILE) -c -o $@ $< .m.obj: @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` qt_term_mac.o: qtterminal/qt_term_mac.m @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT qt_term_mac.o -MD -MP -MF $(DEPDIR)/qt_term_mac.Tpo -c -o qt_term_mac.o `test -f 'qtterminal/qt_term_mac.m' || echo '$(srcdir)/'`qtterminal/qt_term_mac.m @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/qt_term_mac.Tpo $(DEPDIR)/qt_term_mac.Po @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='qtterminal/qt_term_mac.m' object='qt_term_mac.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o qt_term_mac.o `test -f 'qtterminal/qt_term_mac.m' || echo '$(srcdir)/'`qtterminal/qt_term_mac.m qt_term_mac.obj: qtterminal/qt_term_mac.m @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT qt_term_mac.obj -MD -MP -MF $(DEPDIR)/qt_term_mac.Tpo -c -o qt_term_mac.obj `if test -f 'qtterminal/qt_term_mac.m'; then $(CYGPATH_W) 'qtterminal/qt_term_mac.m'; else $(CYGPATH_W) '$(srcdir)/qtterminal/qt_term_mac.m'; fi` @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/qt_term_mac.Tpo $(DEPDIR)/qt_term_mac.Po @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='qtterminal/qt_term_mac.m' object='qt_term_mac.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o qt_term_mac.obj `if test -f 'qtterminal/qt_term_mac.m'; then $(CYGPATH_W) 'qtterminal/qt_term_mac.m'; else $(CYGPATH_W) '$(srcdir)/qtterminal/qt_term_mac.m'; fi` install-qtgnuplotDATA: $(qtgnuplot_DATA) @$(NORMAL_INSTALL) @list='$(qtgnuplot_DATA)'; test -n "$(qtgnuplotdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(qtgnuplotdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(qtgnuplotdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(qtgnuplotdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(qtgnuplotdir)" || exit $$?; \ done uninstall-qtgnuplotDATA: @$(NORMAL_UNINSTALL) @list='$(qtgnuplot_DATA)'; test -n "$(qtgnuplotdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(qtgnuplotdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(qtgnuplotdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @BUILD_QT_FALSE@clean-local: clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-local \ clean-noinstPROGRAMS clean-pkglibexecPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-qtgnuplotDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-pkglibexecPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-pkglibexecPROGRAMS \ uninstall-qtgnuplotDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-binPROGRAMS clean-generic clean-local \ clean-noinstPROGRAMS clean-pkglibexecPROGRAMS cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkglibexecPROGRAMS install-ps install-ps-am \ install-qtgnuplotDATA install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS \ uninstall-pkglibexecPROGRAMS uninstall-qtgnuplotDATA binonly: $(bin_PROGRAMS) getcolor_x11.o: getcolor.c $(COMPILE) -c -DGPLT_X11_MODE -o getcolor_x11.o $(srcdir)/getcolor.c # Call the moc preprocessor @BUILD_QT_TRUE@moc_%.cpp : qtterminal/%.h @BUILD_QT_TRUE@ $(MOC) -o $@ $< # Call the Qt resource compiler @BUILD_QT_TRUE@qrc_%.cpp: qtterminal/%.qrc @BUILD_QT_TRUE@ $(RCC) -name QtGnuplotResource -o $@ $< # Call the Qt ui compiler @BUILD_QT_TRUE@ui_%.h: qtterminal/%.ui @BUILD_QT_TRUE@ $(UIC) -o $@ $< # Generate translation files @BUILD_QT_TRUE@@HAVE_LRELEASE_TRUE@%.qm: qtterminal/po/%.ts @BUILD_QT_TRUE@@HAVE_LRELEASE_TRUE@ $(LRELEASE) $< -qm $@ # Clean moc & qrc files @BUILD_QT_TRUE@clean-qt-extra: @BUILD_QT_TRUE@ rm -vf moc_*.cpp qrc_*.cpp qrc_*.o ui_*.h qtgnuplot*.qm # Clean transform gnuplot_x11 for demo @BUILD_QT_TRUE@clean-demo: @BUILD_QT_TRUE@ rm -f $(GNUPLOT_X11) @BUILD_QT_TRUE@clean-local: clean-qt-extra clean-demo @BUILD_QT_TRUE@$(gnuplot_qt_OBJECTS) : ui_QtGnuplotSettings.h # begin makefile.all # end makefile.all term$U.o: $(CORETERM) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ���������������������������������������������������������������������������gnuplot-4.6.4/src/syscfg.h��������������������������������������������������������������������������0000644�0004711�0000144�00000022163�11676710605�012404� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: syscfg.h,v 1.47.2.1 2011/12/11 11:41:03 markisch Exp $ */ /* GNUPLOT - syscfg.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* This header file provides system dependent definitions. New features * and platforms should be added here. */ #ifndef SYSCFG_H #define SYSCFG_H #ifdef HAVE_CONFIG_H # include "config.h" #endif /* * Define operating system dependent constants [default value]: * * OS: [""] Name of OS; only required if system has no uname(2) call * HELPFILE: ["docs/gnuplot.gih"] Location of helpfile - overridden by Makefile * HOME: ["HOME"] Name of environment variable which points to * the directory where gnuplot's config file is found. * PLOTRC: [".gnuplot"] Name of the gnuplot startup file. * SHELL: ["/bin/sh"] Name, and in some cases, full path to the shell * that is used to run external commands. * DIRSEP1: ['/'] Primary character which separates path components. * DIRSEP2: ['\0'] Secondary character which separates path components. * PATHSEP: [':'] Character which separates path names * */ #if defined(__NeXT__) || defined(NEXT) # ifndef NEXT # define NEXT # endif #endif /* NeXT */ #ifdef OS2 # define OS "OS/2" # define HELPFILE "gnuplot.gih" # define HOME "GNUPLOT" # define PLOTRC "gnuplot.ini" # define SHELL "c:\\os2\\cmd.exe" # define DIRSEP1 '\\' # define PATHSEP ';' # define GNUPLOT_HISTORY_FILE "~\\gnuplot_history" #endif /* OS/2 */ #if defined(vms) || defined(VMS) # define OS "VMS" # ifndef VMS # define VMS # endif # define HOME "sys$login:" # define PLOTRC "gnuplot.ini" # ifdef NO_GIH /* for show version long */ # define HELPFILE "GNUPLOT$HELP" # endif # if !defined(VAXCRTL) && !defined(DECCRTL) # define VAXCRTL VAXCRTL_AND_DECCRTL_UNDEFINED # define DECCRTL VAXCRTL_AND_DECCRTL_UNDEFINED # endif /* avoid some IMPLICITFUNC warnings */ # ifdef __DECC # include <starlet.h> # endif /* __DECC */ #endif /* VMS */ #if defined(_WINDOWS) || defined(_Windows) # ifndef _Windows # define _Windows # endif # define OS "MS-Windows 32 bit" /* introduced by Pedro Mendes, prm@aber.ac.uk */ # define far /* Fix for broken compiler headers * See stdfn.h */ # define S_IFIFO _S_IFIFO # define HOME "GNUPLOT" # define PLOTRC "gnuplot.ini" # define SHELL "\\command.com" # define DIRSEP1 '\\' # define DIRSEP2 '/' # define PATHSEP ';' # define GNUPLOT_HISTORY_FILE "~\\gnuplot_history" #endif /* _WINDOWS */ #if defined(MSDOS) && !defined(_Windows) /* should this be here ? */ # define OS "MS-DOS" # undef HELPFILE # define HELPFILE "gnuplot.gih" # define HOME "GNUPLOT" # define PLOTRC "gnuplot.ini" # define SHELL "\\command.com" # define DIRSEP1 '\\' # define PATHSEP ';' # ifdef __DJGPP__ # define DIRSEP2 '/' # endif # define GNUPLOT_HISTORY_FILE "~\\gnuplot.his" #endif /* MSDOS */ /* End OS dependent constants; fall-through defaults * for the constants defined above are following. */ #ifndef OS # define OS "non-recognized OS" #endif #ifndef HELPFILE # define HELPFILE "docs/gnuplot.gih" #endif #ifndef HOME # define HOME "HOME" #endif #ifndef PLOTRC # define PLOTRC ".gnuplot" #endif #ifndef SHELL # define SHELL "/bin/sh" /* used if SHELL env variable not set */ #endif #ifndef DIRSEP1 # define DIRSEP1 '/' #endif #ifndef DIRSEP2 # define DIRSEP2 NUL #endif #ifndef PATHSEP # define PATHSEP ':' #endif #ifndef FAQ_LOCATION #define FAQ_LOCATION "http://www.gnuplot.info/faq/" #endif #ifndef CONTACT # define CONTACT "gnuplot-bugs@lists.sourceforge.net" #endif #ifndef HELPMAIL # define HELPMAIL "gnuplot-info@lists.sourceforge.net" #endif /* End fall-through defaults */ /* Need this before any headers are incldued */ #ifdef PROTOTYPES # define __PROTO(proto) proto #else # define __PROTO(proto) () #endif /* DOS/Windows stuff. Moved here from command.c */ #if defined(MSDOS) # ifdef DJGPP # include <dos.h> # include <dir.h> /* HBB: for setdisk() */ # else # include <process.h> # endif /* !DJGPP */ # ifdef __MSC__ # include <direct.h> /* for _chdrive() */ # endif /* __MSC__ */ #endif /* MSDOS */ /* Watcom's compiler; this should probably be somewhere * in the Windows section */ #ifdef __WATCOMC__ # include <direct.h> # include <dos.h> # define HAVE_GETCWD 1 # define GP_EXCEPTION_NAME _exception #endif #ifdef __MSC__ # include <direct.h> /* for getcwd() */ #endif #if defined(alliant) # undef HAVE_LIMITS_H #endif #ifdef sequent # undef HAVE_LIMITS_H # undef HAVE_STRCHR #endif #ifdef unixpc # ifndef UNIXPC # define UNIXPC # endif #endif /* HBB 20000416: stuff moved from plot.h to here. It's system-dependent, * so it belongs here, IMHO */ /* BM 20110904: remnant of huge memory model support */ #define GPHUGE /* nothing */ #define GPFAR /* nothing */ typedef double coordval; /* Set max. number of arguments in a user-defined function */ # define MAX_NUM_VAR 12 /* HBB 20010223: Moved VERYLARGE definition to stdfn.h: it can only be * resolved correctly after #include <float.h>, which is done there, * not here. */ #ifdef VMS # define DEFAULT_COMMENTS_CHARS "#!" # define is_system(c) ((c) == '$') /* maybe configure could check this? */ # define BACKUP_FILESYSTEM 1 #else /* not VMS */ # define DEFAULT_COMMENTS_CHARS "#" # define is_system(c) ((c) == '!') #endif /* not VMS */ #ifndef RETSIGTYPE /* assume ANSI definition by default */ # define RETSIGTYPE void #endif #ifndef SIGFUNC_NO_INT_ARG typedef RETSIGTYPE (*sigfunc)__PROTO((int)); #else typedef RETSIGTYPE (*sigfunc)__PROTO((void)); #endif #ifdef HAVE_SIGSETJMP # define SETJMP(env, save_signals) sigsetjmp(env, save_signals) # define LONGJMP(env, retval) siglongjmp(env, retval) # define JMP_BUF sigjmp_buf #else # define SETJMP(env, save_signals) setjmp(env) # define LONGJMP(env, retval) longjmp(env, retval) # define JMP_BUF jmp_buf #endif /* generic pointer type. For old compilers this has to be changed to char *, * but I don't know if there are any CC's that support void and not void * */ #define generic void /* HBB 20010720: removed 'sortfunc' --- it's no longer used */ /* FIXME HBB 20010720: Where is SORTFUNC_ARGS supposed to be defined? */ #ifndef SORTFUNC_ARGS #define SORTFUNC_ARGS const generic * #endif /* Macros for string concatenation */ #ifdef HAVE_STRINGIZE /* ANSI version */ # define CONCAT(x,y) x##y # define CONCAT3(x,y,z) x##y##z #else /* K&R version */ # define CONCAT(x,y) x/**/y # define CONCAT3(x,y,z) x/**/y/**/z #endif /* Windows needs to redefine stdin/stdout functions */ #if defined(_Windows) && !defined(WINDOWS_NO_GUI) # include "win/wtext.h" #endif #ifndef GP_EXCEPTION_NAME # define GP_EXCEPTION_NAME exception #endif #ifndef GP_MATHERR # define GP_MATHERR matherr #endif #ifdef HAVE_STRUCT_EXCEPTION_IN_MATH_H # define STRUCT_EXCEPTION_P_X struct GP_EXCEPTION_NAME *x #else # define STRUCT_EXCEPTION_P_X /* nothing */ #endif /* if GP_INLINE has not yet been defined, set to __inline__ for gcc, * nothing. I'd prefer that any other compilers have the defn in * the makefile, rather than having a huge list of compilers here. * But gcc is sufficiently ubiquitous that I'll allow it here !!! */ #ifndef GP_INLINE # ifdef __GNUC__ # define GP_INLINE __inline__ # else # define GP_INLINE /*nothing*/ # endif #endif #if HAVE_STDBOOL_H # include <stdbool.h> #else # if ! HAVE__BOOL # ifdef __cplusplus typedef bool _Bool; # else typedef unsigned char _Bool; # endif # endif # define bool _Bool # define false 0 # define true 1 # define __bool_true_false_are_defined 1 #endif /* May or may not fix a problem reported for Sun Studio compilers */ #if defined(__SUNPRO_CC) && !defined __cplusplus && !defined(bool) #define bool unsigned char #endif #undef TRUE #define TRUE true #undef FALSE #define FALSE false #define TBOOLEAN bool #endif /* !SYSCFG_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/makefile.awc����������������������������������������������������������������������0000644�0004711�0000144�00000003211�12223340010�013151� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# makefile.all generated automatically by GNU make # List of core object files except version.$(O) COREOBJS = alloc.$(O) axis.$(O) binary.$(O) bitmap.$(O) breaders.$(O) & color.$(O) command.$(O) contour.$(O) datafile.$(O) dynarray.$(O) eval.$(O) & fit.$(O) gadgets.$(O) getcolor.$(O) graph3d.$(O) graphics.$(O) help.$(O) & hidden3d.$(O) history.$(O) internal.$(O) interpol.$(O) matrix.$(O) & misc.$(O) mouse.$(O) parse.$(O) plot.$(O) plot2d.$(O) plot3d.$(O) & pm3d.$(O) readline.$(O) save.$(O) scanner.$(O) set.$(O) show.$(O) & specfun.$(O) standard.$(O) stats.$(O) stdfn.$(O) tables.$(O) tabulate.$(O) & term.$(O) time.$(O) unset.$(O) util.$(O) util3d.$(O) variable.$(O) # List of terminal driver sources CORETERM = $(T)aed.trm $(T)ai.trm $(T)aquaterm.trm $(T)be.trm & $(T)cairo.trm $(T)canvas.trm $(T)cgi.trm $(T)cgm.trm $(T)context.trm & $(T)corel.trm $(T)debug.trm $(T)djsvga.trm $(T)dumb.trm $(T)dxf.trm & $(T)dxy.trm $(T)eepic.trm $(T)emf.trm $(T)emxvga.trm $(T)epson.trm & $(T)estimate.trm $(T)excl.trm $(T)fig.trm $(T)gd.trm $(T)ggi.trm & $(T)gpic.trm $(T)grass.trm $(T)hp2648.trm $(T)hp26.trm $(T)hp500c.trm & $(T)hpgl.trm $(T)hpljii.trm $(T)hppj.trm $(T)imagen.trm $(T)kyo.trm & $(T)latex.trm $(T)linux.trm $(T)lua.trm $(T)mac.trm $(T)metafont.trm & $(T)metapost.trm $(T)mif.trm $(T)next.trm $(T)openstep.trm $(T)pbm.trm & $(T)pc.trm $(T)pdf.trm $(T)pm.trm $(T)post.trm $(T)pslatex.trm & $(T)pstricks.trm $(T)qms.trm $(T)qt.trm $(T)regis.trm $(T)sun.trm & $(T)svg.trm $(T)t410x.trm $(T)tek.trm $(T)texdraw.trm $(T)tgif.trm & $(T)tkcanvas.trm $(T)tpic.trm $(T)unixpc.trm $(T)v384.trm $(T)vgagl.trm & $(T)vws.trm $(T)win.trm $(T)wxt.trm $(T)x11.trm $(T)xlib.trm ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/README����������������������������������������������������������������������������0000644�0004711�0000144�00000127751�10553463334�011623� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������******************************************************************************* ******************************************************************************* This file documents shortly some parts of the gnuplot internals. TABLE OF CONTENTS: * OVERVIEW OVER CODE STRUCTURE CHANGES AFTER MERGING THE 'AXES' BRANCH * TECHNICAL DETAILS FOR MOUSE COMMUNICATION * TECHNICAL DETAILS FOR FAST MOUSE ROTATION OF 3D SURFACES * TECHNICAL DETAILS ABOUT PM3D Document version: "$Id: README,v 1.9 2007/01/17 18:11:40 sfeam Exp $" ******************************************************************************* ******************************************************************************* OVERVIEW OVER CODE STRUCTURE CHANGES AFTER MERGING THE 'AXES' BRANCH ==================================================================== CODE structure changes --- an overview: - this is important info if you want to work on gnuplot or merge in patches, - made against gnuplot versions before 3.8e. As of November 1st, 2000, a large set of reorganizational changes to the gnuplot source code, formerly known as 'the axis branch', were folded into the main source tree. This was tagged as beta version 3.8e of the program. Due to the massive amount of changes, this will likely break most patches built against any previous version of gnuplot. To help others in resolving the conflicts that arise, I've set up this description. The change that is most likely to break your patches is that many variables formerly in setshow.h were renamed and grouped into an array of structures. All status that is set/saved for each individual axis got moved. A little overview: autoscale_* --> axis_array[].autoscale *format --> [].formatstring format_is_numeric[*] --> [].format_is_numeric is_log_* --> [].log base_log_* --> [].base log_base_log_* --> [].log_base *label --> [].label *min --> [].set_min *max --> [].set_max min_array[] --> [].min max_array[] --> [].max writeback_min[] --> [].writeback_min writeback_max[] --> [].writeback_max *zeroaxis --> [].zeroaxis *tics --> [].ticmode rotate_*tics --> [].tic_rotate m*tics --> [].minitics m*tfreq --> [].mtic_freq *ticdef --> [].ticdef timefmt --> [].timefmt --- one per axis, now! datatype[] --> [].is_timedata Other, general changes: 1) All status variables for features that have an axis name in 'set' are now contained in axis.c, and declared in axis.h. Some internal status variables also were moved there. 2) plot.h is no longer the 'master include file'. The big collection of type definitions is now in a new file 'gp_types.h'. Only relatively few sources will now want to #include "plot.h", but most will need "gp_types.h". It's often indirectly pulled in through other headers. 3) setshow.h now only declares variables that *do* belong to set.c and show.c. All the global status variables are now kept in their respective implementation modules. 4) Global variables are now all declared in the .h file of their 'home' module (i.e. if the definition is in foo.c, the decl is in foo.h). 5) Frequently repeated code blocks, like log()/pow() conversion of values for log axes, are now macros in axis.h or functions in the axis module. 6) reset_command() moved from set.c to unset.c 7) Many status variables and implementations for graphical plot elements that are not axis-specific (the timestamp, the key, the border, and some others) are now in the new source module 'gadgets.h'. 8) there's a header file 'version.h' now for the stuff exported by 'version.c'. 9) Variables and functions only used by one particular source file have been moved into that and made 'static', to improve mutual isolation of the individual source modules. 10) Series of #defines that represent different cases have been turned into enums. This makes for easier debugging, and better compiler warnings if you forget to handle some case. 11) Default/initial values of variables to be influenced by 'reset' usually have a #define in the .h that is used for both, to avoid 'reset' and the initialization getting out of synch. 12) Types not needed outside a certain module are defined in the source, where no other modules sees them, rather than in the header. 13) If an int was used as a yes/no flag, only, I made it a TBOOLEAN. Details, by file: ================= now in axis.c/h:(new) type axis enum AXIS_INDEX AXIS_ARRAY_SIZE t_ticseries_type types ticmark, ticdef, en_minitics_status, tic_callback, AXIS_DEFAULTS DEFAULT_AXIS_STRUCT axis_array[] --- what it all started about axis_defaults[] INIT_AXIS_ARRAY() --- set a field a given initial value, for all axes axisname_tbl[] --- for parsing ticscale, miniticscale, tic_in --- tic-related variables default_axis_ticdef, default_axis_label --- for unset/reset default_axis_zeroaxis, default_grid_lp --- dito DEF_FORMAT, TIMEFMT --- dito grid_selection, grid_lp, mgrid_lp, polar_grid_angle --- 'set grid' tic_start, tic_direction, tic_text, rotate_tics, tic_hjust, ... tic_vjust, tic_mirror --- globals for tic callbacks x_axis, y_axis, z_axis --- 'current' x, y and z axis index X_AXIS, Y_AXIS, Z_AXIS --- quick-access macros axis_array[x_axis] etc. AXIS_MAP, AXIS_MAPBACK --- user <-> term coord mapping map_x, map_y --- their old names AXIS_WRITEBACK() AXIS_DO_LOG(), AXIS_UNDO_LOG() --- log() a value for an axis' logbas AXIS_LOG_VALUE(), AXIS_DE_LOG_VALUE() --- same, but test if necessary AXIS_INIT3D, AXIS_INIT2D --- prepare axis for use ... and lots of others --- go read axis.h yourself :-) removed from command.c: c_dummy_var[][] now in command.c: replot_disabled, MAX_TOKENS removed from contour.c: num_approx_points bspline_order now in contour.c: contour_format contour_kind contour_levels_kind contour_levels contour_order contour_pts (dyn_)contour_levels_list removed from datafile.c: df_timecol now in datafile.c: missing_val plotted_data_from_stdin df_axis renamed: pipe_open -> df_pipe_open now in eval.c/h: udft_entry udvt_entry argument FUNC_PTR ft_entry now in gadgets.c/h: types position_type, position, text_label, arrow_def, linestyle_def types en_key_horizontal_position, en_key_sample_positioning, key_type type label_struct EMPTY_LABELSTRUCT --- for initializing/unset/reset key, key_user_pos, key_vpos, key_hpos, key_just, key_swidth key_vert_factor, key_width_fix, key_reverse, key_title default_keybox_lp, key_box --- status variables of 'set key' xleft, xright, ybot, ytop: the graph boundary xsize, ysize, ysize, aspect_ratio --- 'set size' xoffset, xoffset --- 'set offset' lmargin, bmargin,rmargin,tmargin --- set dito first_arrow first_label first_linestyle title timelabel, timelabel_rotate, timelabel_bottom --- 'set timedate' polar, parametric zero --- 'set zero' draw_border, border_lp clip_lines1, clip_lines2, clip_points samples_1, samples_2, SAMPLES ang2rad --- 'set angle' data_style, func_style --- 'set style data/func' suppressMove draw_clip_line, clip_line, clip_point --- moved from util3d.h clip_put_text, clip_put_text_just --- dito (used for 2D, too) clip_move, clip_vector --- from graph3d.h (also 2D usage) now in time.c/gp_time.h: ZERO_YEAR JAN_FIRST_WDAY SEC_OFFS_SYS YEAR_SEC MON_SEC WEEK_SEC DAY_SEC removed from graph3d.c/h: suppress_move hidden_active hidden_no_update map3d_xy() --- moved to util3d map3d_z(), dbl_raise() --- unused, anyway draw_bottom_grid() --- renamed, now draw3d_graphbox() setlinestyle() map_x3d & friend macros move_pos_x, move_pos_y clip_move(), clip_vector() now in graph3d.c/h: types t_contour_placement, gnuplot_contours, iso_curve, surface_points xscale3d, yscale3d, zscale3d draw_contour label_contours draw_surface hidden3d surface_rot_z surface_rot_x surface_scale surface_zscale ticslevel ISOSAMPLES iso_samples_1 iso_samples_2 cntr3d_linespoints() --- new cntr3d_dots() --- new setup_3d_box_corners --- new find_maxl_cntr() --- static, moved from misc.c find_maxl_keys3d() --- static, moved from misc.c right_x, right_y, front_x, front_y --- static, new removed from graphics.c/h: statics tic_start, tic_direction, tic_text, rotate_tics, ... tic_hjust, tic_vjust, tic_mirror, ... ticfmt, timelevel, ticstep --- now function-local min_array, max_array, log_array, base_array, scale[] ... log_base_array --- now in 'axis' structure. x_axis, y_axis --- now in axis.c mant_exp() --- now static in axis.c time_tic_just(), timetic_format(), fixup_range() --- dito set_tic(), setup_tics(), gen_tics() --- dito gprintf() --- now in axis.c (but may not stay there) CheckLog() --- renamed, now in axis.c write_multiline() --- now in term.c xleft, xright, xtop, xbot --- now in gadgets.c dbl_raise() --- unused now in graphics.c/h: type curve_points loff, roff, toff, boff bar_size find_maxl_keys() --- static, moved from misc.c default_font removed from hidden3d.h: type vertex --- now in util3d.h now in internal.h: undefined removed from misc.c/h: static find_maxl_cntr(), find_maxl_keys3d() --- now in graph3d static find_maxl_keys() --- now in graphics cp_alloc(), cp_extend(), cp_free() --- now in plot2d sp_alloc(), sp_extend(), sp_free() --- now in plot3d gp_strcspn --- now in stdfn now in misc.c/h: get_style() --- from set.c lp_use_properties() --- from set.c lp_parse --- from set.c now in parse.c/h: c_dummy_var[] set_dummy_var[] is_jump() removed from plot.c/h: PROGRAM --- now in show PROMPT --- now in command SAMPLES --- now in gadgets ISO_SAMPLES ZERO TERM TBOOLEAN DTRUE DEG2RAD() MIN_CRV_POINTS MIN_SRF_POINTS INT_STR_LEN() PATH_CONCAT() CONCAT CONCAT3 MAX_LINE_LEN MAX_TOKENS MAX_ID_LEN MAX_AT_LEN NO_CARET --- now in util.h MAX_NUM_VAR FIRST_AXES --- now in axis FIRST_Z_AXIS etc. --- now in axis GPHUGE --- now in syscfg HUGE_VAL, VERYLARGE --- dito coordval --- dito GPMAX(), GPMIN(), inrange() --- now in stdfn is_comment(), is_system() --- now in syscfg is_jump() --- now in parse ... lots of types --- now in gp_types.h, or gadgets.h type termentry/TERMENTRY --- now in term_api.h ... all declarations of variables from other sources --- now there removed from plot2d.c/h: INIT_ARRAYS(), CHECK_REVERSE(), LOAD_RANGE() --- now in axis STORE_WITH_LOG_AND_FIXUP_RANGE() --- dito FIXUP_RANGE_FOR_LOG() --- dito WRITEBACK(), SAVE_WRITEBACK() --- renamed, now in axis now in plot2d.c/h: boxwidth cp_alloc() cp_extend() cp_free() removed from plot3d.c/h: INIT_ARRAYS(), CHECK_REVERSE(), LOAD_RANGE() --- now in axis STORE_WITH_LOG_AND_FIXUP_RANGE() --- dito FIXUP_RANGE_FOR_LOG() --- dito WRITEBACK SAVE_WRITEBACK() --- renamed, now in axis (yes, these were duplicates in plot2d and plot3d...) now in plot3d.c/h: mapping3d dgrid3d_row_fineness dgrid3d_col_fineness dgrid3d_norm_value dgrid3d calculate_set_of_isolines() --- new, isolated from eval_plots() sp_alloc(), sp_extend(), sp_free() --- from misc sp_replace() --- new removed from save.c: SAVE_NUM_OR_TIME() --- now in setshow.h removed from set.c/setshow.h: GET_NUM_OR_TIME() --- now in axis reset_command --- now in unset get_writeback_min() and friends --- renamed, now in axis and many globals that are now structure elements in the axis_array[]: autoscale_* --> axis_array[].autoscale *format --> [].formatstring format_is_numeric[*] --> [].format_is_numeric is_log_* --> [].log base_log_* --> [].base log_base_log_* --> [].log_base *label --> [].label *min --> [].set_min *max --> [].set_max min_array[] --> [].min max_array[] --> [].max writeback_min[] --> [].writeback_min writeback_max[] --> [].writeback_max *zeroaxis --> [].zeroaxis *tics --> [].ticmode rotate_*tics --> [].tic_rotate m*tics --> [].minitics m*tfreq --> [].mtic_freq *ticdef --> [].ticdef timefmt --> [].timefmt --- one per axis, now! datatype[] --> [].is_timedata all other globals from set.c went to graph2d if they were 2D-releated, graph3d if 3D, gadgets if used by both 2D and 3D. now in stdfn.c/h: gp_strcspn() INT_STR_LEN PATH_CONCAT inrange GPMAX GPMIN now in syscfg.h: GPHUGE, GPFAR coordval MAX_NUM_VAR RETSIGTYPE type sortfunc GP_INLINE TRUE, FALSE, TBOOLEAN removed from tables.h: set_encoding_tbl, set_encoding_id --- now in term_api.h now in term.c/term_api.h: *term, term_options *outstr multiplot ignore_enhanced_text encoding, encoding_names set_encoding_tbl, set_encoding_id write_multiline types JUSTIFY, VERT_JUSTIFY, lp_style_type, TERMENTRY/termentry in unset.c: unset_mtics(), unset_tics(), unset_timedata() and others --- replace lots of functions by one, taking an axis_index argument now in util.c: graph_error() --- from graphics removed from util3d.c: clip_point(), draw_clip_line(), clip_put_text(), ... clip_put_text_just(), clip_line() --- caused problems with hidden3d now in util3d.c: type vertex --- from hidden3d FLAG_VERTEX_AS_UNDEFINED(), VERTEX_IS_UNDEFINED, V_EQUAL --- dito TERMCOORD() --- dito map3d_xyz map3d_xy --- from graph3d draw3d_line() --- new draw3d_line_unconditional() --- new draw3d_point() --- new --- these replace the old, removed ones If you've read all through this, you're one determined person --- congratulations. Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain. --------------------------------------------------------------------------- 2001/07/24: I made a lot of changes in the expression parser / evaluator subsystem. The interface from the expression evaluator to the rest of gnuplot is now through only *one* header file, eval.h. The headers interpol.h, specfun.h and standard.h are now used only for communication to eval.c and its helpers. Other modules should #include only eval.h, or parse.h if they need to handle user input (parse.h includes eval.h). I've also renamed all those incomprehendible functions 'aterms()' through 'hterms()' in parser.c, according to the type of expression they actually parse. The expression type names follow those in the C standard grammar. In order of increasing operator precedence: express --> parse_expression xterms --> parse_conditional_expression aterms --> parse_logical_OR_expression bterms --> parse_logical_AND_expression cterms --> parse_inclusive_OR_expression dterms --> parse_exclusive_OR_expression eterms --> parse_AND_expression fterms --> parse_equality_expression gterms --> parse_relational_expression hterms --> parse_additive_expression iterms --> parse_multiplicative_expression unary --> parse_unary_expression factor --> parse_primary_expression Those are the functions that actually parse expressions of a given type based upon lexical symbols found in the input. A second set of functions represent the grammar states: xterm --> accept_logical_OR_expression aterm --> accept_logical_AND_expression bterm --> accept_inclusive_OR_expression cterm --> accept_exclusive_OR_expression dterm --> accept_AND_expression eterm --> accept_equality_expression fterm --> accept_relational_expression gterm --> accept_additive_expression hterm --> accept_multiplicative_expression ******************************************************************************* ******************************************************************************* TECHNICAL DETAILS FOR HOTKEYS/MOUSE COMMUNICATION ================================================= The communication between a mouseable terminal and the main gnuplot core goes via structures defined in mousecmn.h. Further, the following terminal entries are used (see USE_MOUSE #defined code in .trm files): void XX_set_ruler (int, int); void XX_set_cursor (int, int, int); void XX_put_tmptext (int, const char str[]); void XX_set_clipboard (const char[]); On OS/2, the communication of these structures between the stand-alone terminals gnupmdrv.exe or gnuplot_x11.exe and the main gnuplot.exe executable is implemented by shared memory and an event semaphore. On Unix, a bidirectional pipe is implemented for the ipc (inter-process) communication between gnuplot_x11 and gnuplot. The readline interfaces were modified to listen to both stdin and the ipc file descriptor. (Well, that's just the usual way). Note that if compiling with gnu readline, you must have a gnu readline version > 2.2 (3.0). This will not be a major drawback, as 2.2 is out for years now and the current gnu readline version is 4.0. On VGAGL, the communication is done by...? On Windows, the windows terminal is a part of the gnuplot executable wgnuplot.exe. Thus it is possible to call the executing routine do_event(&ge); directly, without any communication at all. History of mouseable terminals: (*) March 1998: Implementation of mousing in OS/2 Presentation Manager terminal (Petr Mikulik). (*) April 1999: Proper implementation of the gnupmdrv-gnuplot communication by shared memory and event semaphores (Franz Bakan, Petr Mikulik). (*) October 1999: Mouseable X11 terminal on Unix and OS/2 (Johannes Zellner, Petr Mikulik). The stand-alone terminals gnupmdrv.exe and gnuplot_x11(.exe) had full control over mousing over its displayed graph (all relevant gnuplot structures were passed into the terminal). (*) January 2000: Mousing re-implemented by means of new terminal (.trm) entries, i.e. with a call-back of events passed from the stand-alone terminal to the main gnuplot (Pieter-Tjerk de Boer, Johannes Zellner, Petr Mikulik). (*) January 2000: Implemented mousing in vgagl terminal, the fast linux console terminal (Johannes Zellner). (*) February 2002: Implemented mousing in windows terminal (Petr Mikulik, Hans-Bernhard Broeker). ******************************************************************************* ******************************************************************************* TECHNICAL DETAILS FOR FAST MOUSE ROTATION OF 3D SURFACES ======================================================== For splots (3d) the data of all surfaces of the current graph are cached and can therefore be redrawn very quickly, without rereading and reparsing the input files. This enables smooth rotating and zooming of splots. Note that gnuplot frees the allocated data of the current graph when it starts to plot a new graph. ******************************************************************************* ******************************************************************************* TECHNICAL DETAILS ABOUT PM3D ============================ The pm3d splot mode for gray and colour maps and surface (and much later for much more: splots with color lines, plots with filled curves) has been implemented by Petr Mikulik in December 1998 and January 1999. It was released for public on 14. 3. 1999 as a patch for gnuplot 3.7. Below you can find the original notes about the implementation, slightly modified in February 2002. The pm3d algorithm: History and description ------------------------------------------- The gnuplot pm3d splot mode is a successor to my pm3d algorithm coded previously in my Turbo Vision Pascal plotting program "pmgraf" for DOS (April 1994) and the C++ command line "pm3d" program which is converting the input data into postscript maps (March 1995). Both programs are available on my homepage. The pm3d algorithm (in pmgraf, pm3d and now in gnuplot) draws a gray or colour map (or surface, in gnuplot only) of a 3D data, which are supposed to be a sequence of scans. Scan is the same what is called 'iso_curve' in gnuplot. For the given surface, the algorithm takes one scan after the other scan until the last but one. For a scan number K it looks at the subsequent scan K+1. For each (but the last one) point on scan K, it makes a quadrangle with 4 corners: two subsequent points at scan K and two points at scan K+1. (The quadrangle is a rectangle if the data are matrix-like.) The quadrangle is filled by the colour corresponding to the averaged Z coordinate of its 4 corners. Therefore it can plot matricial as well as non-rectangular non-gridded data without any preprocessing, and on single pass through the data. It does not require that the scans have the same number of points (see the details on flushing below or 'set pm3d flush'). pm3d implementation in gnuplot ------------------------------ Below, you find the basic description of gnuplot implementation of pm3d, colour palette and filled colour polygons. The pm3d implementation in gnuplot is is based on the following terminal entries (see below for more details): term->make_palette term->previous_palette term->set_color term->filled_polygon The topmost implementation of colour filled areas in plot3d.c: (*) pm3d mode is set on if (pm3d.where[0]). Its setting, or using 'with ... palette', requests the palette of continuous (smooth) colours for the given terminal according to 'set palette' setup. The palette is created by a call to make_palette(). The routine make_palette() is coded in pm3d.c. It will be commented below. (*) pm3d plot for a given surface is called from graph3d.c, just before the stuff for hidden line removal, i.e. before plotting surfaces and contours. For each surface, it calls pm3d_plot( this_plot, pm3d.where[i] ); (*) The colour box showing the sequence of continuous colours is drawn in routine draw_color_smooth_box(). Postscript output uses the box implementation directly in the postscript language, see below. (*) Routine term->previous_palette() is called after the plot. Currently, it is needed only for printing the string "grestore" into a postscript file. ----- Implementation of pm3d_plot( this_plot, at_which_z ) in pm3d.c ----- (*) This plots the map (for at_which_z=PM3D_AT_BASE or PM3D_AT_TOP) or surface (for at_which_z=PM3D_AT_SURFACE) for the given surface (variable this_plot). (*) The implementation of the pm3d algorithm is schematically: for scan J=1 to scans-1 { /* for each scan in the surface */ for pt=1 to min( points(J), points(J+1) ) { /* go over min nb of points */ pt' = ...; pt'' = ... /* see below */ ptJa = point(J,pt') ptJb = point(J,pt'+1) ptJ+1a = point(J+1,pt'') ptJ+1b = point(J+1,pt'') averagedZ = ( z(ptJa) + z(ptJb) + z(ptJ+1a) + z(ptJ+1b) ) / 4 set_color( averagedZ normalized to [0;1] ) fill_polygon( 4 corners, those 4 points transformed into coordinates of the map or surface on the terminal ) } } If the two subsequent scans have the same number of points, then pt''=pt'=pt. Otherwise, pt''=pt'=pt if 'scans flushed begin', pt'=points(J)-pt and pt''=points(J+1)-pt if 'scans flushed end', and similarly for 'scans center'. And nothing is drawn if there is only one point in the scan. ----- Implementation of make_palette() in pm3d.c ----- (*) Look into color.h, structure t_sm_palette: declaration of smooth palette, i.e. palette for smooth colours. It documents how gray [0,1] is mapped into (R,G,B) = ([0,1], [0,1], [0,1]). (*) Ask for the number of colours that are (still) available on the current terminal: i = term->make_palette(NULL); Postscript terminal returns 0 since it supports all RGB values (no limit on discrete number of colours). It has its own mapping: transformation of gray [0,1] is coded as postscript functions, and also in order to make the output size of the postscript file as small as possible, i.e. the same as the output from the pm3d program. Further, not 3 values of the RGB triplet but only 1 gray value is written into the postscript file. This is achieved by the analytical functions: pm3dGetColorValue() are coded as postscript functions, see post.trm: PostScriptColorFormulae[] used in PS_make_palette entry. PS->make_palette() looks itself into sm_palette and writes a header with the appropriate postscript codes for formulaR, formulaG, formulaB transformations. See also post.trm: PostScriptColorFormulae[] used in PS_make_palette. Return from make_palette(). All other terminals have discrete number of colours. Currently an RGB palette is allocated for the number of available colours returned by make_palette(); if pm3d is used in gnuplot's multiplot mode, then the result would be incorrect if the previous palette is not reused or if the number of colours is not limited by 'set palette maxcolors'. Creating the RGB palette: make the array of (RGB) triplets according to items in sm_palette (not for postscript) sm_palette.color = malloc( sm_palette.colors * sizeof(rgb_color) ); And then for (i = 0; i < sm_palette.colors; i++) { gray = (double)i / (sm_palette.colors - 1); /* rescale to [0;1] */ if (sm_palette.ColorMode == colorModeGRAY) /* gray scale only */ sm_palette.color[i].r = sm_palette.color[i].g = sm_palette.color[i].b = gray; else { /* i.e. sm_palette.ColorMode == colorModeRGB */ sm_palette.color[i].r = pm3dGetColorValue(sm_palette.formulaR, gray); sm_palette.color[i].g = pm3dGetColorValue(sm_palette.formulaG, gray); sm_palette.color[i].b = pm3dGetColorValue(sm_palette.formulaB, gray); } } Finally, tell the terminal to allocate the palette for the (RGB) triplets (again, not for postscript) term->make_palette(&sm_palette); ----- Transformation of the z-coordinate to gray and RGB in pm3c.c ----- How a colour is transformed from the gray? AveragedZ is mapped into the interval [min_z:max_z] which is transformed into [0:1], see routine double z2gray ( double z ) which rescales z into the interval [0,1]. This works fine also for the logarithmic z axis. Later, this is used by gray = z2gray ( avgZ ); This value can be used directly as a gray for gray maps. For colour maps it further needs to transform gray -> (R,G,B): [0:1] -> ([0:1], [0:1], [0:1]) thus some nice three functions have to be choosen --- see pm3d.c, function pm3dGetColorValue(), for the available mapping functions. Note that after the complete separation of the z and cb axes (cb-axis is the axis of colors) in February 2002, there is a new function z2cb(), and z2gray() was replaced by cb2gray(). ----- Implementation of pm3d terminal entries in *.trm ----- In this section you will find a brief discussion on the following pm3d-related terminal entries: term->make_palette term->previous_palette term->set_color term->filled_polygon which are required to make pm3d to work. Files considered by these functions are color.h, color.c, plot.h, and all .trm which are pm3d-capable. If you are coding pm3d support for a new terminal, then you can have a look at the code in these files: gif.trm (bitmap GIF terminal implementation), post.trm (PostScript terminal implementation), pm.trm + gclient.c (OS/2 PM terminal implementation), x11.trm + gplt_x11.c (X11 terminal implementation). The pm3d-specific code is surrounded by #ifdef PM3D ... #endif, so it is possible to compile gnuplot with or without pm3d support just bey (un)defining the PM3D constant. In plot.h, the following new terminal entries are added into struct TERMENTRY: int (*make_palette) __PROTO((t_sm_palette *palette)); 1. If palette==NULL, then return nice/suitable maximal number of colours supported by this terminal. Returns 0 if it can make colours without palette (like postscript). 2. If palette!=NULL, then allocate its own palette return value is undefined. 3. Available: some negative values of max_colors for whatever it can be useful. Some particular notes: (*) Terminals with palette (GIF, PM): there are already some basic colours allocated (see gnuplot command 'test'), thus an offset for the `part with smooth colours' is needed. (*) GIF: can allocate up to 256 colours, i.e. discrete number of colours. (*) PM: discrete number of colours. Passes the rgbTable through the pipe into standalone gnupmdrv driver. X11 should be implemented in the same way. (*) PostScript: continuous colours, as "setrgbcolor" PS command takes the triplet of intervals [0,1]. void (*previous_palette) __PROTO((void)); Release the palette that the above routine allocated and get back the palette that was active before. Some terminals, like displays, may draw parts of the figure using their own palette. The terminals possessing only one palette for the whole plot don't need this routine. Actually, this routine is currently used only for postscript terminal, where it writes "grestore" as make_palette() starts its postscript definitions by "gsave"... that's because there are the analytical mapping functions gray->RGB defined in the local header. void (*set_color) __PROTO((double gray)); The value of gray is [0;1]. The terminal uses its color palette or any other way to transform in into true gray or to r,g,b. This terminal entry remembers (or not) this colour so that it can reuse it for a subsequent drawing (for each terminal separately). void (*filled_polygon) __PROTO((int points, gpiPoint *corners)); The declaration has been made the same as in GIF's gd.h. It fills the given polygon according to color set by the previous call to set_color(). ******************************************************************************* ******************************************************************************* TECHNICAL DETAILS ABOUT PLOT WITH IMAGE ======================================= The plot_image() routine in graphics.c was added by Daniel Sebald on October 30, 2003. It is intended for plotting images if the terminal driver supports images, otherwise it reverts to pm3d color boxes if possible. A large part of the routine checks that the visible points form a valid rectangular grid. Because the data is in the form of 2D/3D point structures, this must be done. (A future feature might be the ability to circumvent the large storage requirements of 2D/3D point structures and the need to check whether data forms a grid whenever the user supplies image data in a known matrix format.) If a grid aligned with the Cartesian axes is not given, plot_image() will revert to plotting each pixel as a color boxes using term->filled_polygon(). This same fallback to individual polygons is used to render images on terminals that have no term->image() entry point. This mode can also be forced by the keyword "failsafe": ... with {rgb}image {failsafe}. Only details about the "tricky" algorithms are given here. There are eight valid ways that pixel grid information can be entered via the plot->points[] array. These are based upon the scanning direction (i.e., along one of the dimensions) and the two directions (positive vs. negative) along the dimensions that the points are entered. Definitions: K = input scan line length (i.e., number of samples along line) L = input plane length (i.e., number of scan lines) dim = dimension (0 means increments along x, 1 means increments along y) dxg0 = delta x grid along the scan line (can be positive or negative) dyg0 = delta y grid along the scan line (can be positive or negative) dxg1 = delta x grid between scan lines (can be positive or negative) dyg1 = delta y grid between scan lines (can be positive or negative) sgn() = sign of variable (- represented as 0, + represented as 1) a^b = raise a to the power b M = output row length (i.e., number of columns) N = output column length (i.e., number of rows) The goal is to move the data from the plot->points[] array to the matrix pixel grid in the order (1,1), (1,2), (1,3), ..., (M,N-1), (M,N) forming the M x N matrix (1,1)...(M,1) . . . . . . (1,N)...(M,N) (Note that the terminal scale, positive or negative, has an influence on the orientation of pixels. Ignore this temporarily for simplicity. Formulas are augmented later to account for axes directions.) The approach is to step through the plot points and copy each visible point to its appropriate spot in the image matrix array. The routine that does this is fundamentally for (i=0, j=line_length, i_image=i_start; i < plot->p_count; i++) { image[i_image] = plot->points[i].CRD_COLOR; i_image += i_delta_pixel; j--; if (j == 0) { i_image += i_delta_line; j = line_length; } } Thus the indexing parameters i_start, line_length, i_delta_pixel and i_delta_line must be determined. line_length is solely dependent upon the dimension; K if dimension = 0 (i.e., increment along a row) and L if dimension = 1 (i.e., along column). The other relationships can be determined by looking at the eight 4 x 2 illustrations which follow. Assume points are entered 0, 1, 2, 3, 4, 5, 6, 7, then the various ways of entry are: (1) (2) (3) (4) (5) (6) (7) (8) 3 2 1 0 7 6 5 4 0 1 2 3 4 5 6 7 6 4 2 0 7 5 3 1 0 2 4 6 1 3 5 7 7 6 5 4 3 2 1 0 4 5 6 7 0 1 2 3 7 5 3 1 6 4 2 0 1 3 5 7 0 2 4 6 The functions are: sgn(dyg1)---------| sgn(dxg1)------ | sgn(dyg0)-- | | i_delta_pixel sgn(dxg0) | | | | | | | | i_start | | | i_delta_line --- --- --- --- | -------------------- | ------- | --------------- (1) - 0 0 - | K - 1 = K*1 - 1 | -1 | 2*K = K + K (2) - 0 0 + | K*L - 1 = K*L - 1 | -1 | 0 = K - K (3) + 0 0 - | 0 = K*1 - K | 1 | 0 = -K + K (4) + 0 0 + | K*(L-1) = K*L - K | 1 | -2*K = -K - K | | | (5) 0 - - 0 | (L-1)*K = K*L - K | -K | K*L + 1 (6) 0 + - 0 | K*L - 1 = K*L - 1 | -K | K*L - 1 (7) 0 - + 0 | 0 = K*1 - K | K | -K*L + 1 (8) 0 + + 0 | K - 1 = K*1 - 1 | K | -K*L - 1 There is a clear distinction between formulas based upon dimension. Summarizing, dimension = 0 (x changing) ------------------------------------------------------- line_length: K i_start: L^(dyg1 > 0) * K - K^(dxg0 > 0) i_delta_pixel: (-1)^(dxg0 < 0) i_delta_line: K*[(-1)^(dxg0 > 0) + (-1)^(dyg1 > 0)] ------------------------------------------------------- dimension = 1 (y changing) ------------------------------------------------------- line_length: L i_start: L^(dxg1 < 0) * K - K^(dyg0 < 0) i_delta_pixel: K*(-1)^(dxg1 < 0) i_delta_line: K*L*(-1)^(dxg1 > 0) + (-1)^(dyg0 > 0) ------------------------------------------------------- The above formulas are what appear preceding the for() loop in the actual code except for one detail, the terminal scale, i.e., direction for which the axes are increasing. Simply note that if terminal scale is negative the orientation swaps along the related direction. Thus augmenting the sign tests in the above equations will account for the terminal scale. For example, let xsts and ysts be the sign of the x and y terminal scale, respectively. Then the formula for i_start when x is changing (dimension 0) becomes: i_start: L^(dyg1*ysts > 0) * K - K^(dxg0*xsts > 0) and so on. /***** NOTE: Info between starred comments was original method and now a simple, but less efficient, method of finding the corners by conditional tests while rearranging the points is done. So the following is obsolete... but may come back to it at some point. But if this has been sitting around for quite a while now, feel free to delete what is between the stars. There is also the matter of computing what points in the array of plot->point[] constitute pixels (1,1) and (N,M). There are four grid corners determined on the first pass through the data. However, what these map to also depend upon the three variables dim, d_x_g and d_y_g. Again, looking at the illustrations: dim sgn(d_x_g) sgn(d_y_g) | pixel_1_1 | pixel_M_N --- ---------- ---------- | --------- | --------- (1) 0 - - | 1 | 2 (2) 0 - + | 3 | 0 (3) 0 + - | 0 | 3 (4) 0 + + | 2 | 1 (5) 1 - - | 2 | 1 (6) 1 - + | 3 | 0 (7) 1 + - | 0 | 3 (8) 1 + + | 1 | 2 These functions are implemented by table look up. With int pixel_1_1_logic[2][2][2] = {1, 3, 0, 2, 2, 3, 0, 1}; int pixel_M_N_logic[2][2][2] = {2, 0, 3, 1, 1, 0, 3, 2}; The following yields the desired functions: pixel_1_1 = grid_corner[ pixel_1_1_logic[dimension][delta_x_grid > 0][delta_y_grid > 0] ]; pixel_M_N = grid_corner[ pixel_M_N_logic[dimension][delta_x_grid > 0][delta_y_grid > 0] ]; *****/ TECHNICAL DETAILS ABOUT TERMINAL DRIVER FUNCTION image ====================================================== Support for images in the X11 driver was added by Daniel Sebald on February 27, 2003. The function void (*image) __PROTO((unsigned M, unsigned N, coordval *image, gpiPoint *corner, int color_mode)); is the terminal driver routine for displaying an image. 'M' is the number of rows, 'N' is the number of columns, 'image' is a pointer to image data stored with upper left pixel first and scanning horizontally from left to right, 'corner' contains corner[0].x upper left pixel (1,1) location (extent) of image corner[0].y corner[1].x lower right pixel (M,N) location (extent) of image corner[1].y corner[2].x upper left corner of visible window corner[2].y corner[3].x lower right corner of visible window corner[3].y and 'color_mode' indicates if the image should use RGB triples or palette lookup. Image samples are a coordval which is a float. Image data attempts to be consistent with the color schemes of Petr Mikulik's pm3d. Therefore, the values in the image array are in the range [0.0,1.0] and the terminal driver routine can handle this data by mapping this range to a range appropriate for the output device. If `color_mode` is IC_RGB, the `image` array should be treated as triples of floats. That is, rather than the length of the image array being M*N, as is the case when `color_mode` is IC_PALETTE, the length of the array is 3*M*N. Triples are of the form image[0] = red 1,1 image[1] = green 1,1 image[2] = blue 1,1 image[3] = red 1,2 image[4] = green 1,2 image[5] = blue 1,2 etc. When in IC_PALETTE mode, image data should be used as an index into the palette constructed by the make_palette() terminal routine. That is, one should multiply the value by the palette size minus one, cast to an integer and range check (good practice) the index. The meaning of the corners is that the first two represent the outer extent of the pixels representing the image; not the centers of the pixels on the outer edge, but the outer edge of the pixels on the outer edge. The next two corners represent the extent of the visual, or clipping region. Thus, on the outer edge of the image may be pixels which are only fractionally displayed. TECHNICAL DETAILS ABOUT X11 IMAGE DRIVER ======================================== Support for images in the X11 driver was added by Daniel Sebald on February 27, 2003. For X11, this image terminal function is X11_image(). Because of the large amount of data associated with an image, the routine avoids using floats and avoids using formatted I/O representation for numbers. The "scanf" function is a very inefficient routine for large amounts of data. To avoid using floats, the maximum resolution of the color plane of the X11 device is assumed to be 16 bits. (Not an unreasonable assumption.) The image data is converted to short by multiplying by the maximum palette value. On the gplt_x11.c side of the pipe, these unsigned short values are shifted to the right to match the size of its palette. To avoid using formatted I/O. A simple encoding scheme is used to eliminate all image data values having a value equivalent to a '\n' character or a '\0' character because the core gplt_x11.c routine interprets these characters in a special way. The scheme is as follows: if the character '\n' or '\0' are found, they are replaced by a two byte representation (CODE_WORD,value+1). On the receiving side, if the CODE_WORD is found, the next byte after it minus one is the decoded character. Naturally, the CODE_WORD itself must also be encoded so as to not lose those in the data stream. An additional step is to first translate the data before sending it over the pipe. This is done by subtracting a constant. The constant is added back in on the other side. The reason for this is that image data often contains many 0 characters (e.g., upper 8 bits). Thus the character '\0' is prevalent in image data, and without translation, the encoding scheme would result in noticable expansion of the data stream. The encoding is meant to cut down the amount of data that is stored in the gplt_x11.c replot buffers. Because there may be an endianess problem if the gnuplot and gnuplot_x11 programs were compiled under different compilers, Petr and Dan added an endian check command. If this check finds it is necessary to swap bytes in encoded binary data coming across the pipe, then gnuplot_x11 will do so for those commands using encoded binary. In most cases, these programs will have been compiled with the same compiler so byte swapping will not be done. But it is there just in case. The X11 color bit packing is a bit tricky. It attempts to be portable, but I'm sure there are peculiar hardware formats out there that will not work properly as it currently exists. (Some additions and tweaking will probably be need, but without examples of every hardware configuration it is difficult to program for them.) Basically, shifts and masking for packing the bits from the RGB data (16 bits per channel) are derived from the masks of the X11 display information. Also, there is hardware option of byte order: most significant byte first or least significant byte first. The routine will swap bytes if necessary. However, if the bytes need to be swapped and the RGB masks are all 8 bits, then the swapping can be done inherently by appropriately altering the bit shifts. For example, say the masks are R: 0xff0000, G: 0xff00, B: 0xff and bytes need to be swapped. Rather than using these masks and swapping bytes, the masks could be changed to R: 0xff00, G: 0xff0000, B: 0xff000000. Comments: The method works rather well, short of a more direct method of storing image data in gplt_x11.c without having to pull the data out of the replot buffer for every refresh. The new 2D binary data file entry (well documented in the gnuplot.doc file) in concert with the image routines was suppose to make Octave fast at drawing images. However, Octave needs some reworking yet to make this happen seamlessly. The problem is that Octave does not yet use binary data but instead uses ASCII data files to get information to Gnuplot. I've attempted to write data to a file in binary format using Octave's fwrite() routine then use Octave's graw() routine. This speeds things up somewhat, but I still think this interface can be improved at a later time. TECHNICAL DETAILS ABOUT POSTSCRIPT IMAGE DRIVER =============================================== The PostScript image driver is rather straightforward. Its main processing involves encoding the data in ASCII85 format. No compression scheme is used currently. Run length encoding hardly seems worth the effort because in most cases the amount of compression won't be too significant, I'm guessing. For image data, other than the single bit variety such as a facsimile, other forms of compression are more efficient. COMMENTS ABOUT BINARY DATA FILE SYNTAX ====================================== A keyword for binary data indicates which way to scan within the file. The Cartesian variables x, y, and z are analogous to the cylindrical variables t (theta), r, and z internally. However, the common math convention for listing triples in these coordinate systems is (x,y,z) and (r,t,z). It may be worth switching the role of theta and r inside the program. (If done, change the `scan` note inside the `binary` documentation.) ******************************************************************************* ******************************************************************************* �����������������������gnuplot-4.6.4/src/command.h�������������������������������������������������������������������������0000644�0004711�0000144�00000017027�12173327737�012532� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: command.h,v 1.57.2.1 2013/07/22 22:19:11 sfeam Exp $ */ /* GNUPLOT - command.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_COMMAND_H # define GNUPLOT_COMMAND_H #include "gp_types.h" #include "stdfn.h" extern char *gp_input_line; extern size_t gp_input_line_len; extern int inline_num; extern int if_depth; /* old if/else syntax only */ extern TBOOLEAN if_open_for_else; /* new if/else syntax only */ extern TBOOLEAN if_condition; /* used by both old and new syntax */ typedef struct lexical_unit { /* produced by scanner */ TBOOLEAN is_token; /* true if token, false if a value */ struct value l_val; int start_index; /* index of first char in token */ int length; /* length of token in chars */ } lexical_unit; extern struct lexical_unit *token; extern int token_table_size; extern int plot_token; #define END_OF_COMMAND (c_token >= num_tokens || equals(c_token,";")) extern char *replot_line; /* flag to disable `replot` when some data are sent through stdin; * used by mouse/hotkey capable terminals */ extern TBOOLEAN replot_disabled; #ifdef USE_MOUSE extern int paused_for_mouse; /* Flag the end condition we are paused until */ #define PAUSE_BUTTON1 001 /* Mouse button 1 */ #define PAUSE_BUTTON2 002 /* Mouse button 2 */ #define PAUSE_BUTTON3 004 /* Mouse button 3 */ #define PAUSE_CLICK 007 /* Any button click */ #define PAUSE_KEYSTROKE 010 /* Any keystroke */ #define PAUSE_WINCLOSE 020 /* Window close event */ #define PAUSE_ANY 077 /* Terminate on any of the above */ #endif #ifdef GP_MACROS extern TBOOLEAN expand_macros; #endif /* output file for the print command */ extern FILE *print_out; extern char *print_out_name; extern struct udft_entry *dummy_func; #ifndef STDOUT # define STDOUT 1 #endif #if defined(MSDOS) # ifdef DJGPP extern char HelpFile[]; /* patch for do_help - AP */ # endif /* DJGPP */ #endif /* MSDOS */ #ifdef _Windows # define SET_CURSOR_WAIT SetCursor(LoadCursor((HINSTANCE) NULL, IDC_WAIT)) # define SET_CURSOR_ARROW SetCursor(LoadCursor((HINSTANCE) NULL, IDC_ARROW)) #else # define SET_CURSOR_WAIT /* nought, zilch */ # define SET_CURSOR_ARROW /* nought, zilch */ #endif /* wrapper for calling kill_pending_Pause_dialog() from win/winmain.c */ #ifdef _Windows void call_kill_pending_Pause_dialog(void); #endif /* input data, parsing variables */ extern int num_tokens, c_token; void raise_lower_command __PROTO((int)); void raise_command __PROTO((void)); void lower_command __PROTO((void)); #ifdef OS2 extern void pm_raise_terminal_window __PROTO((void)); extern void pm_lower_terminal_window __PROTO((void)); #endif #ifdef X11 extern void x11_raise_terminal_window __PROTO((int)); extern void x11_raise_terminal_group __PROTO((void)); extern void x11_lower_terminal_window __PROTO((int)); extern void x11_lower_terminal_group __PROTO((void)); #endif #ifdef _Windows extern void win_raise_terminal_window __PROTO((int)); extern void win_raise_terminal_group __PROTO((void)); extern void win_lower_terminal_window __PROTO((int)); extern void win_lower_terminal_group __PROTO((void)); #endif #ifdef WXWIDGETS extern void wxt_raise_terminal_window __PROTO((int)); extern void wxt_raise_terminal_group __PROTO((void)); extern void wxt_lower_terminal_window __PROTO((int)); extern void wxt_lower_terminal_group __PROTO((void)); #endif #ifdef GP_MACROS extern void string_expand_macros __PROTO((void)); #else #define string_expand_macros() #endif #ifdef USE_MOUSE void bind_command __PROTO((void)); void restore_prompt __PROTO((void)); #else #define bind_command() #endif #ifdef VOLATILE_REFRESH void refresh_request __PROTO((void)); #endif void call_command __PROTO((void)); void changedir_command __PROTO((void)); void clear_command __PROTO((void)); void eval_command __PROTO((void)); void exit_command __PROTO((void)); void help_command __PROTO((void)); void history_command __PROTO((void)); void do_command __PROTO((void)); void if_command __PROTO((void)); void else_command __PROTO((void)); void invalid_command __PROTO((void)); void load_command __PROTO((void)); void begin_clause __PROTO((void)); void clause_reset_after_error __PROTO((void)); void end_clause __PROTO((void)); void null_command __PROTO((void)); void pause_command __PROTO((void)); void plot_command __PROTO((void)); void print_command __PROTO((void)); void pwd_command __PROTO((void)); void refresh_command __PROTO((void)); void replot_command __PROTO((void)); void reread_command __PROTO((void)); void save_command __PROTO((void)); void screendump_command __PROTO((void)); void splot_command __PROTO((void)); void stats_command __PROTO((void)); void system_command __PROTO((void)); void test_command __PROTO((void)); void update_command __PROTO((void)); void do_shell __PROTO((void)); void undefine_command __PROTO((void)); void while_command __PROTO((void)); /* Prototypes for functions exported by command.c */ void extend_input_line __PROTO((void)); void extend_token_table __PROTO((void)); int com_line __PROTO((void)); int do_line __PROTO((void)); void do_string __PROTO((const char* s)); void do_string_and_free __PROTO((char* s)); #ifdef USE_MOUSE void toggle_display_of_ipc_commands __PROTO((void)); int display_ipc_commands __PROTO((void)); void do_string_replot __PROTO((const char* s)); #endif #ifdef VMS /* HBB 990829: used only on VMS */ void done __PROTO((int status)); #endif void define __PROTO((void)); void replotrequest __PROTO((void)); /* used in command.c & mouse.c */ void print_set_output __PROTO((char *, TBOOLEAN)); /* set print output file */ char *print_show_output __PROTO((void)); /* show print output file */ /* Activate/deactive effects of 'set view map' before 'splot'/'plot', * respectively. Required for proper mousing during 'set view map'; * actually it won't be necessary if gnuplot keeps a copy of all variables for * the current plot and don't share them with 'set' commands. * These routines need to be executed before each plotrequest() and * plot3drequest(). */ void splot_map_activate __PROTO((void)); void splot_map_deactivate __PROTO((void)); int do_system_func __PROTO((const char *cmd, char **output)); #endif /* GNUPLOT_COMMAND_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/datafile.c������������������������������������������������������������������������0000644�0004711�0000144�00000447521�12202541070�012643� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: datafile.c,v 1.212.2.24 2013/08/08 07:02:35 sfeam Exp $"); } #endif /* GNUPLOT - datafile.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* AUTHOR : David Denholm */ /* * this file provides the functions to handle data-file reading.. * takes care of all the pipe / stdin / index / using worries */ /*{{{ notes */ /* couldn't decide how to implement 'thru' only for 2d and 'index' * for only 3d, so I did them for both - I can see a use for * index in 2d, especially for fit. * * I keep thru for backwards compatibility, and extend it to allow * more natural plot 'data' thru f(y) - I (personally) prefer * my syntax, but then I'm biased... * * - because I needed it, I have added a range of indexes... * (s)plot 'data' [index i[:j]] * * also every a:b:c:d:e:f - plot every a'th point from c to e, * in every b lines from d to f * ie for (line=d; line<=f; line+=b) * for (point=c; point >=e; point+=a) * * * I dont like mixing this with the time series hack... I am * very into modular code, so I would prefer to not have to * have _anything_ to do with time series... for example, * we just look at columns in file, and that is independent * of 2d/3d. I really dont want to have to pass a flag to * this is plot or splot. * * Now that df_2dbinary() and df_3dbinary() are here, I am seriously * tempted to move get_data() and get_3ddata() in here too * * public variables declared in this file. * int df_no_use_specs - number of columns specified with 'using' * int df_no_tic_specs - count of additional ticlabel columns * int df_line_number - for error reporting * int df_datum - increases with each data point * int df_eof - end of file * * functions * int df_open(char *file_name, int max_using, plot_header *plot) * parses thru / index / using on command line * max_using is max no of 'using' columns allowed (obsolete?) * plot_header is NULL if called from fit or set_palette code * returns number of 'using' cols specified, or -1 on error (?) * * int df_readline(double vector[], int max) * reads a line, does all the 'index' and 'using' manipulation * deposits values into vector[] * returns * number of columns parsed [0 = not a blank line, but no valid data], * DF_EOF - end of file * DF_UNDEFINED - undefined result during eval of extended using spec * DF_MISSING - requested column matched that of 'set missing <foo>' * DF_FIRST_BLANK - first consecutive blank line * DF_SECOND_BLANK - second consecutive blank line * DF_FOUND_KEY_TITLE - only relevant to first line of data * DF_KEY_TITLE_MISSING and only for 'set key autotitle columnhead' * DF_STRINGDATA - not currently used by anyone * DF_COLUMN_HEADERS - first row used as headers rather than data * * if a using spec was given, lines not fulfilling spec are ignored. * we will always return exactly the number of items specified * * if no spec given, we return number of consecutive columns we parsed. * * if we are processing indexes, separated by 'n' blank lines, * we will return n-1 blank lines before noticing the index change * * void df_close() * closes a currently open file. * * void f_dollars(x) * void f_column() actions for expressions using $i, column(j), etc * void f_valid() * * * line parsing slightly differently from previous versions of gnuplot... * given a line containing fewer columns than asked for, gnuplot used to make * up values... I say that if I have explicitly said 'using 1:2:3', then if * column 3 doesn't exist, I dont want this point... * * a column number of 0 means generate a value... as before, this value * is useful in 2d as an x value, and is reset at blank lines. * a column number of -1 means the (data) line number (not the file line * number). splot 'file' using 1 is equivalent to * splot 'file' using 0:-1:1 * column number -2 is the index. It was put in to kludge multi-branch * fitting. * * 20/5/95 : accept 1.23d4 in place of e (but not in scanf string) * : autoextend data line buffer and MAX_COLS * * 11/8/96 : add 'columns' -1 for suggested y value, and -2 for * current index. * using 1:-1:-2 and column(-1) are supported. * $-1 and $-2 are not yet supported, because of the * way the parser works * */ /*}}} */ /* Daniel Sebald: added general binary 2d data support. (20 August 2004) */ #include "datafile.h" #include "alloc.h" #include "axis.h" #include "binary.h" #include "command.h" #include "eval.h" #include "gp_time.h" #include "graphics.h" #include "misc.h" #include "parse.h" #include "plot.h" #include "readline.h" #include "util.h" #include "breaders.h" #include "variable.h" /* For locale handling */ /* test to see if the end of an inline datafile is reached */ #define is_EOF(c) ((c) == 'e' || (c) == 'E') /* is it a comment line? */ #define is_comment(c) ((c) && (strchr(df_commentschars, (c)) != NULL)) /*{{{ static fns */ static int check_missing __PROTO((char *s)); static void expand_df_column __PROTO((int)); static void clear_df_column_headers __PROTO((void)); static char *df_gets __PROTO((void)); static int df_tokenise __PROTO((char *s)); static float *df_read_matrix __PROTO((int *rows, int *columns)); static void plot_option_every __PROTO((void)); static void plot_option_index __PROTO((void)); static void plot_option_thru __PROTO((void)); static void plot_option_using __PROTO((int)); static TBOOLEAN valid_format __PROTO((const char *)); static void plot_ticlabel_using __PROTO((int)); /*static char * df_parse_string_field __PROTO((char *));*/ static void add_key_entry __PROTO((char *temp_string, int df_datum)); static char * df_generate_pseudodata __PROTO((void)); static int df_skip_bytes __PROTO((int nbytes)); /*}}} */ /*{{{ variables */ enum COLUMN_TYPE { CT_DEFAULT, CT_STRING, CT_KEYLABEL, CT_XTICLABEL, CT_X2TICLABEL, CT_YTICLABEL, CT_Y2TICLABEL, CT_ZTICLABEL, CT_CBTICLABEL }; /* public variables client might access */ int df_no_use_specs; /* how many using columns were specified */ int df_line_number; int df_datum; /* suggested x value if none given */ AXIS_INDEX df_axis[MAXDATACOLS]; TBOOLEAN df_matrix = FALSE; /* indicates if data originated from a 2D or 3D format */ void *df_pixeldata; /* pixel data from an external library (e.g. libgd) */ /* jev -- the 'thru' function --- NULL means no dummy vars active */ /* HBB 990829: moved this here, from command.c */ struct udft_entry ydata_func; /* string representing missing values in ascii datafiles */ char *missing_val = NULL; /* input field separator, NUL if whitespace is the separator */ char df_separator = '\0'; /* comments chars */ char *df_commentschars = 0; /* If any 'inline data' are in use for the current plot, flag this */ TBOOLEAN plotted_data_from_stdin = FALSE; /* Setting this allows the parser to recognize Fortran D or Q */ /* format constants in the input file. But it slows things down */ TBOOLEAN df_fortran_constants = FALSE; /* Setting this disables re-initialization of the floating point exception */ /* handler before every expression evaluation in a using spec. */ TBOOLEAN df_nofpe_trap = FALSE; /* private variables */ /* in order to allow arbitrary data line length, we need to use the heap * might consider free-ing it in df_close, especially for small systems */ static char *line = NULL; static size_t max_line_len = 0; #define DATA_LINE_BUFSIZ 160 static FILE *data_fp = NULL; #if defined(PIPES) static TBOOLEAN df_pipe_open = FALSE; #endif #if defined(HAVE_FDOPEN) static int data_fd = -2; /* only used for file redirection */ #endif static TBOOLEAN mixed_data_fp = FALSE; /* inline data */ char *df_filename = NULL; /* name of data file */ static int df_eof = 0; static int df_no_tic_specs; /* ticlabel columns not counted in df_no_use_specs */ #ifndef MAXINT /* should there be one already defined ? */ # ifdef INT_MAX /* in limits.h ? */ # define MAXINT INT_MAX # else # define MAXINT ((~0)>>1) # endif #endif /* stuff for implementing index */ static int blank_count = 0; /* how many blank lines recently */ static int df_lower_index = 0; /* first mesh required */ static int df_upper_index = MAXINT; static int df_index_step = 1; /* 'every' for indices */ static int df_current_index; /* current mesh */ /* stuff for named index support */ static char *indexname = NULL; static TBOOLEAN index_found = FALSE; static int df_longest_columnhead = 0; /* stuff for every point:line */ static int everypoint = 1; static int firstpoint = 0; static int lastpoint = MAXINT; static int everyline = 1; static int firstline = 0; static int lastline = MAXINT; static int point_count = -1; /* point counter - preincrement and test 0 */ static int line_count = 0; /* line counter */ /* for pseudo-data (1 if filename = '+'; 2 if filename = '++') */ static int df_pseudodata = 0; static int df_pseudorecord = 0; static int df_pseudospan = 0; /* parsing stuff */ struct use_spec_s use_spec[MAXDATACOLS]; static char *df_format = NULL; static char *df_binary_format = NULL; static int current_using_spec; TBOOLEAN evaluate_inside_using = FALSE; TBOOLEAN df_warn_on_missing_columnheader = FALSE; /* rather than three arrays which all grow dynamically, make one * dynamic array of this structure */ typedef struct df_column_struct { double datum; enum { DF_BAD, DF_GOOD } good; char *position; /* points to start of this field in current line */ char *header; /* points to copy of the header for this column */ } df_column_struct; static df_column_struct *df_column = NULL; /* we'll allocate space as needed */ static int df_max_cols = 0; /* space allocated */ static int df_no_cols; /* cols read */ static int fast_columns; /* corey@cac optimization */ char *df_tokens[MAXDATACOLS]; /* filled in by df_tokenise */ static char *df_stringexpression[MAXDATACOLS] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL}; static struct curve_points *df_current_plot; /* used to process histogram labels + key entries */ /* These control the handling of fields in the first row of a data file. * See also parse_1st_row_as_headers. */ #define NO_COLUMN_HEADER (-99) /* some value that can never be a real column */ static int column_for_key_title = NO_COLUMN_HEADER; static TBOOLEAN df_already_got_headers = FALSE; static char *df_key_title = NULL; /* filled in from column header if requested */ /* Binary *read* variables used by df_readbinary(). * There is a confusing difference between the ascii and binary "matrix" keywords. * Ascii matrix data by default is interpreted as having an implicit uniform grid * of x and y coords that are not actually present in the data file. * The equivalent binary data format is called "binary general". * In both of these cases the internal flag df_nonuniform_matrix is FALSE; * Binary matrix data contains explicit y values in the first row, and explicit x * values in the first column. This is signalled by "binary matrix". * In this case the internal flag df_nonuniform_matrix is TRUE. * * EAM May 2011 - Add a keyword "nonuniform matrix" to indicate ascii matrix data * in the same format as "binary matrix", i.e. with explicit x and y coordinates. */ TBOOLEAN df_read_binary; TBOOLEAN df_nonuniform_matrix; int df_plot_mode; static int df_readascii __PROTO((double [], int)); static int df_readbinary __PROTO((double [], int)); static void initialize_use_spec __PROTO((void)); static void initialize_binary_vars __PROTO((void)); static void df_insert_scanned_use_spec __PROTO((int)); static void adjust_binary_use_spec __PROTO((void)); static void clear_binary_records __PROTO((df_records_type)); static void plot_option_binary_format __PROTO((char *)); static void plot_option_binary __PROTO((TBOOLEAN, TBOOLEAN)); static void plot_option_array __PROTO((void)); static TBOOLEAN rotation_matrix_2D __PROTO((double R[][2], double)); static TBOOLEAN rotation_matrix_3D __PROTO((double P[][3], double *)); static int token2tuple __PROTO((double *, int)); static void df_determine_matrix_info __PROTO((FILE *)); static void df_swap_bytes_by_endianess __PROTO((char *, int, int)); typedef enum df_multivalue_type { DF_DELTA, DF_FLIP_AXIS, DF_FLIP, DF_SCAN, DF_ORIGIN, DF_CENTER, DF_ROTATION, DF_PERPENDICULAR, DF_SKIP } df_multivalue_type; static void plot_option_multivalued __PROTO((df_multivalue_type,int)); char *df_endian[DF_ENDIAN_TYPE_LENGTH] = { "little", "pdp (middle)", "swapped pdp (dimmle)", "big" }; #define SUPPORT_MIDDLE_ENDIAN 1 #if SUPPORT_MIDDLE_ENDIAN /* To generate a swap, take the bit-wise complement of the lowest two bits. */ typedef enum df_byte_read_order_type { DF_0123, DF_1032, DF_2301, DF_3210 } df_byte_read_order_type; /* First argument, this program's endianess. Second argument, file's endianess. * Don't use directly. Use 'byte_read_order()' function instead.*/ static char df_byte_read_order_map[4][4] = { {DF_0123, DF_1032, DF_2301, DF_3210}, {DF_1032, DF_0123, DF_1032, DF_2301}, {DF_2301, DF_1032, DF_0123, DF_1032}, {DF_3210, DF_2301, DF_1032, DF_0123} }; static long long_0x2468 = 0x2468; #define TEST_BIG_PDP ( (((char *)&long_0x2468)[0] < 3) ? DF_BIG_ENDIAN : DF_PDP_ENDIAN ) #define THIS_COMPILER_ENDIAN ( (((char *)&long_0x2468)[0] < 5) ? TEST_BIG_PDP : DF_LITTLE_ENDIAN ) /* Argument is file's endianess type. */ static df_byte_read_order_type byte_read_order __PROTO((df_endianess_type)); /* Logical variables indicating information about data file. */ TBOOLEAN df_binary_file; TBOOLEAN df_matrix_file; int df_M_count; int df_N_count; int df_O_count; /* Initially set to default and then possibly altered by command line. */ df_binary_file_record_struct *df_bin_record = 0; /* Default settings. */ df_binary_file_record_struct *df_bin_record_default = 0; /* Settings that are transferred to default upon reset. */ df_binary_file_record_struct df_bin_record_reset = { {-1, 0, 0}, {1, 1, 1}, {1, 1, 1}, DF_TRANSLATE_DEFAULT, {0, 0, 0}, 0, {0, 0, 1}, {DF_SCAN_POINT, DF_SCAN_LINE, DF_SCAN_PLANE}, FALSE, {0, 0, 0}, {0, 0, 0}, {1, 1, 1}, {0, 0, 0}, DF_TRANSLATE_DEFAULT, {0, 0, 0}, NULL /* data_memory */ }; int df_max_num_bin_records = 0, df_num_bin_records, df_bin_record_count; int df_max_num_bin_records_default = 0, df_num_bin_records_default; /* Used to mark the location of a blank line in the original data input file */ struct coordinate blank_data_line = {UNDEFINED, -999, -999, -999, -999, -999, -999, -999}; static void gpbin_filetype_function __PROTO((void)); static void raw_filetype_function __PROTO((void)); static void avs_filetype_function __PROTO((void)); static void (*binary_input_function)(void); /* Will point to one of the above */ static void auto_filetype_function(void){}; /* Just a placeholder for auto */ struct gen_ftable df_bin_filetype_table[] = { {"avs", avs_filetype_function}, {"bin", raw_filetype_function}, {"edf", edf_filetype_function}, {"ehf", edf_filetype_function}, {"gif", gif_filetype_function}, {"gpbin", gpbin_filetype_function}, {"jpeg", jpeg_filetype_function}, {"jpg", jpeg_filetype_function}, {"png", png_filetype_function}, {"raw", raw_filetype_function}, {"rgb", raw_filetype_function}, {"auto", auto_filetype_function}, {NULL, NULL} }; #define RAW_FILETYPE 1 /* Initially set to default and then possibly altered by command line. */ int df_bin_filetype; df_endianess_type df_bin_file_endianess; /* Default setting. */ int df_bin_filetype_default; df_endianess_type df_bin_file_endianess_default; /* Setting that is transferred to default upon reset. */ int df_bin_filetype_reset = -1; #define DF_BIN_FILE_ENDIANESS_RESET THIS_COMPILER_ENDIAN typedef struct df_bin_scan_table_2D_struct { char *string; df_sample_scan_type scan[3]; } df_bin_scan_table_2D_struct; df_bin_scan_table_2D_struct df_bin_scan_table_2D[] = { {"xy", {DF_SCAN_POINT, DF_SCAN_LINE, DF_SCAN_PLANE}}, {"yx", {DF_SCAN_LINE, DF_SCAN_POINT, DF_SCAN_PLANE}}, {"tr", {DF_SCAN_POINT, DF_SCAN_LINE, DF_SCAN_PLANE}}, {"rt", {DF_SCAN_LINE, DF_SCAN_POINT, DF_SCAN_PLANE}} }; #define TRANSPOSE_INDEX 1 typedef struct df_bin_scan_table_3D_struct { char *string; df_sample_scan_type scan[3]; } df_bin_scan_table_3D_struct; df_bin_scan_table_3D_struct df_bin_scan_table_3D[] = { {"xyz", {DF_SCAN_POINT, DF_SCAN_LINE, DF_SCAN_PLANE}}, {"zxy", {DF_SCAN_LINE, DF_SCAN_PLANE, DF_SCAN_POINT}}, {"yzx", {DF_SCAN_PLANE, DF_SCAN_POINT, DF_SCAN_LINE}}, {"yxz", {DF_SCAN_LINE, DF_SCAN_POINT, DF_SCAN_PLANE}}, {"xzy", {DF_SCAN_POINT, DF_SCAN_PLANE, DF_SCAN_LINE}}, {"zyx", {DF_SCAN_PLANE, DF_SCAN_LINE, DF_SCAN_POINT}}, {"trz", {DF_SCAN_POINT, DF_SCAN_LINE, DF_SCAN_PLANE}}, {"ztr", {DF_SCAN_LINE, DF_SCAN_PLANE, DF_SCAN_POINT}}, {"rzt", {DF_SCAN_PLANE, DF_SCAN_POINT, DF_SCAN_LINE}}, {"rtz", {DF_SCAN_LINE, DF_SCAN_POINT, DF_SCAN_PLANE}}, {"tzr", {DF_SCAN_POINT, DF_SCAN_PLANE, DF_SCAN_LINE}}, {"zrt", {DF_SCAN_PLANE, DF_SCAN_LINE, DF_SCAN_POINT}} }; /* Names for machine dependent field sizes. */ char *ch_names[] = {"char","schar","c"}; char *uc_names[] = {"uchar"}; char *sh_names[] = {"short"}; char *us_names[] = {"ushort"}; char *in_names[] = {"int","sint","i","d"}; char *ui_names[] = {"uint","u"}; char *lo_names[] = {"long","ld"}; char *ul_names[] = {"ulong","lu"}; char *fl_names[] = {"float","f"}; char *db_names[] = {"double","lf"}; /* Machine independent names. */ char *byte_names[] = {"int8","byte"}; char *ubyte_names[] = {"uint8","ubyte"}; char *word_names[] = {"int16","word"}; char *uword_names[] = {"uint16","uword"}; char *word2_names[] = {"int32"}; char *uword2_names[] = {"uint32"}; char *word4_names[] = {"int64"}; char *uword4_names[] = {"uint64"}; char *float_names[] = {"float32"}; char *float2_names[] = {"float64"}; typedef struct df_binary_details_struct { char **name; unsigned short no_names; df_binary_type_struct type; } df_binary_details_struct; typedef struct df_binary_tables_struct { df_binary_details_struct *group; unsigned short group_length; } df_binary_tables_struct; df_binary_details_struct df_binary_details[] = { {ch_names,sizeof(ch_names)/sizeof(ch_names[0]),{DF_CHAR,sizeof(char)}}, {uc_names,sizeof(uc_names)/sizeof(uc_names[0]),{DF_UCHAR,sizeof(unsigned char)}}, {sh_names,sizeof(sh_names)/sizeof(sh_names[0]),{DF_SHORT,sizeof(short)}}, {us_names,sizeof(us_names)/sizeof(us_names[0]),{DF_USHORT,sizeof(unsigned short)}}, {in_names,sizeof(in_names)/sizeof(in_names[0]),{DF_INT,sizeof(int)}}, {ui_names,sizeof(ui_names)/sizeof(ui_names[0]),{DF_UINT,sizeof(unsigned int)}}, {lo_names,sizeof(lo_names)/sizeof(lo_names[0]),{DF_LONG,sizeof(long)}}, {ul_names,sizeof(ul_names)/sizeof(ul_names[0]),{DF_ULONG,sizeof(unsigned long)}}, {fl_names,sizeof(fl_names)/sizeof(fl_names[0]),{DF_FLOAT,sizeof(float)}}, {db_names,sizeof(db_names)/sizeof(db_names[0]),{DF_DOUBLE,sizeof(double)}} }; df_binary_details_struct df_binary_details_independent[] = { {byte_names,sizeof(byte_names)/sizeof(byte_names[0]),{SIGNED_TEST(1),1}}, {ubyte_names,sizeof(ubyte_names)/sizeof(ubyte_names[0]),{UNSIGNED_TEST(1),1}}, {word_names,sizeof(word_names)/sizeof(word_names[0]),{SIGNED_TEST(2),2}}, {uword_names,sizeof(uword_names)/sizeof(uword_names[0]),{UNSIGNED_TEST(2),2}}, {word2_names,sizeof(word2_names)/sizeof(word2_names[0]),{SIGNED_TEST(4),4}}, {uword2_names,sizeof(uword2_names)/sizeof(uword2_names[0]),{UNSIGNED_TEST(4),4}}, {word4_names,sizeof(word4_names)/sizeof(word4_names[0]),{SIGNED_TEST(8),8}}, {uword4_names,sizeof(uword4_names)/sizeof(uword4_names[0]),{UNSIGNED_TEST(8),8}}, {float_names,sizeof(float_names)/sizeof(float_names[0]),{FLOAT_TEST(4),4}}, {float2_names,sizeof(float2_names)/sizeof(float2_names[0]),{FLOAT_TEST(8),8}} }; int df_no_bin_cols; /* binary columns to read */ df_binary_tables_struct df_binary_tables[] = { {df_binary_details,sizeof(df_binary_details)/sizeof(df_binary_details[0])}, {df_binary_details_independent,sizeof(df_binary_details_independent)/sizeof(df_binary_details_independent[0])} }; /* Information about binary data structure, to be determined by the * using and format options. This should be one greater than df_no_bin_cols. */ static df_column_bininfo_struct *df_column_bininfo = NULL; /* allocate space as needed */ static int df_max_bininfo_cols = 0; /* space allocated */ static const char *matrix_general_binary_conflict_msg = "Conflict between some matrix binary and general binary keywords"; #endif /*}}} */ /*{{{ static char *df_gets() */ static char * df_gets() { int len = 0; /* HBB 20000526: prompt user for inline data, if in interactive mode */ /* EAM 08mar2008: we'd like to call readline(), but this only works * if isatty(stdin). Do all platforms have an equivalent to isatty()? */ if (mixed_data_fp && interactive) fputs("input data ('e' ends) > ", stderr); /* Special pseudofiles '+' and '++' return coords of sample */ if (df_pseudodata) return df_generate_pseudodata(); if (!fgets(line, max_line_len, data_fp)) return NULL; if (mixed_data_fp) ++inline_num; for (;;) { len += strlen(line + len); if (len > 0 && line[len - 1] == '\n') { /* we have read an entire text-file line. * Strip the trailing linefeed and return */ line[len - 1] = 0; return line; } /* buffer we provided may not be full - dont grab extra * memory un-necessarily. This may trap a problem with last * line in file not being properly terminated - each time * through a replot loop, it was doubling buffer size */ if ((max_line_len - len) < 32) line = gp_realloc(line, max_line_len *= 2, "datafile line buffer"); if (!fgets(line + len, max_line_len - len, data_fp)) return line; /* unexpected end of file, but we have something to do */ } /* NOTREACHED */ return NULL; } /*}}} */ /*{{{ static int df_tokenise(s) */ static int df_tokenise(char *s) { /* implement our own sscanf that takes 'missing' into account, * and can understand fortran quad format */ TBOOLEAN in_string; int i; for (i = 0; i<MAXDATACOLS; i++) df_tokens[i] = NULL; #define NOTSEP (*s != df_separator) df_no_cols = 0; while (*s) { /* check store - double max cols or add 20, whichever is greater */ if (df_max_cols <= df_no_cols) expand_df_column((df_max_cols < 20) ? df_max_cols+20 : 2*df_max_cols); /* have always skipped spaces at this point */ df_column[df_no_cols].position = s; in_string = FALSE; /* Keep pointer to start of this token if user wanted it for * anything, particularly if it is a string */ for (i = 0; i<MAXDATACOLS; i++) { if (df_no_cols == use_spec[i].column-1) { df_tokens[i] = s; if (use_spec[i].expected_type == CT_STRING) df_column[df_no_cols].good = DF_GOOD; } } /* CSV files must accept numbers inside quotes also, * so we step past the quote */ if (*s == '"' && df_separator != '\0') { in_string = TRUE; df_column[df_no_cols].position = ++s; } if (*s == '"') { /* treat contents of a quoted string as single column */ in_string = !in_string; df_column[df_no_cols].good = DF_STRINGDATA; } else if (check_missing(s)) { df_column[df_no_cols].good = DF_MISSING; df_column[df_no_cols].datum = not_a_number(); df_column[df_no_cols].position = NULL; } else { int used; int count; int dfncp1 = df_no_cols + 1; /* optimizations by Corey Satten, corey@cac.washington.edu */ if ((fast_columns == 0) || (df_no_use_specs == 0) || ((df_no_use_specs > 0) && (use_spec[0].column == dfncp1 || (df_no_use_specs > 1 && (use_spec[1].column == dfncp1 || (df_no_use_specs > 2 && (use_spec[2].column == dfncp1 || (df_no_use_specs > 3 && (use_spec[3].column == dfncp1 || (df_no_use_specs > 4 && (use_spec[4].column == dfncp1 || df_no_use_specs > 5) ) ) ) ) ) ) ) ) ) ) { /* This was the [slow] code used through version 4.0 * count = sscanf(s, "%lf%n", &df_column[df_no_cols].datum, &used); */ /* Use strtod() because * - it is faster than sscanf() * - sscanf(... %n ...) may not be portable * - it allows error checking * - atof() does not return a count or new position */ char *next; df_column[df_no_cols].datum = gp_strtod(s, &next); used = next - s; count = (used) ? 1 : 0; } else { /* skip any space at start of column */ /* HBB tells me that the cast must be to * unsigned char instead of int. */ while (isspace((unsigned char) *s) && NOTSEP) ++s; count = (*s && NOTSEP) ? 1 : 0; /* skip chars to end of column */ used = 0; if (df_separator != '\0' && in_string) { do ++s; while (*s && *s != '"'); in_string = FALSE; } while (!isspace((unsigned char) *s) && (*s != NUL) && NOTSEP) ++s; } /* it might be a fortran double or quad precision. * 'used' is only safe if count is 1 */ if (df_fortran_constants && count == 1 && (s[used] == 'd' || s[used] == 'D' || s[used] == 'q' || s[used] == 'Q')) { /* HBB 20001221: avoid breaking parsing of time/date * strings like 01Dec2000 that would be caused by * overwriting the 'D' with an 'e'... */ char *endptr; char save_char = s[used]; /* might be fortran double */ s[used] = 'e'; /* and try again */ df_column[df_no_cols].datum = gp_strtod(s, &endptr); count = (endptr == s) ? 0 : 1; s[used] = save_char; } df_column[df_no_cols].good = count == 1 ? DF_GOOD : DF_BAD; if (isnan(df_column[df_no_cols].datum)) df_column[df_no_cols].good = DF_BAD; } ++df_no_cols; /* If we are in a quoted string, skip to end of quote */ if (in_string) { do s++; while (*s && (unsigned char) *s != '"'); } /* skip to 1st character in the next field */ if (df_separator != '\0') { while (*s && NOTSEP) ++s; /* skip to next separator or end of line */ while ((*s != '\0') && NOTSEP) ++s; if (*s == '\0') /* End of line; we're done */ break; /* step over field separator */ ++s; /* skip whitespace at start of next field */ while (isspace((unsigned char) *s) && NOTSEP) ++s; if (*s == '\0') { /* Last field is empty */ df_column[df_no_cols].good = DF_MISSING; df_column[df_no_cols].datum = not_a_number(); ++df_no_cols; break; } } else { /* skip trash chars remaining in this column */ while ((!isspace((unsigned char) *s)) && (*s != '\0')) ++s; /* skip whitespace to start of next column */ while (isspace((unsigned char) *s)) ++s; } } return df_no_cols; #undef NOTSEP } /*}}} */ /*{{{ static float *df_read_matrix() */ /* Reads a matrix from a text file and stores it as floats in allocated * memory. * * IMPORTANT NOTE: The routine returns the memory pointer for that matrix, * but does not retain the pointer. Maintenance of the memory is left to * the calling code. */ static float * df_read_matrix(int *rows, int *cols) { int max_rows = 0; int c; float *linearized_matrix = NULL; int bad_data = 0; char *s; int index = 0; *rows = 0; *cols = 0; for (;;) { if (!(s = df_gets())) { df_eof = 1; /* NULL if we have not read anything yet */ return linearized_matrix; } while (isspace((unsigned char) *s)) ++s; if (!*s || is_comment(*s)) { if (linearized_matrix) return linearized_matrix; else continue; } if (mixed_data_fp && is_EOF(*s)) { df_eof = 1; return linearized_matrix; } c = df_tokenise(s); if (!c) return linearized_matrix; if (*cols && c != *cols) { /* its not regular */ if (linearized_matrix) free(linearized_matrix); int_error(NO_CARET, "Matrix does not represent a grid"); } *cols = c; ++*rows; if (*rows > max_rows) { max_rows = GPMAX(2*max_rows,1); linearized_matrix = gp_realloc(linearized_matrix, *cols * max_rows * sizeof(float), "df_matrix"); } /* store data */ { int i; for (i = 0; i < c; ++i) { if (i < firstpoint && df_column[i].good != DF_GOOD) { /* It's going to be skipped anyhow, so... */ linearized_matrix[index++] = 0; } else linearized_matrix[index++] = (float) df_column[i].datum; if (df_column[i].good != DF_GOOD) { if (bad_data++ == 0) int_warn(NO_CARET,"matrix contains missing or undefined values"); } } } } } /*}}} */ static void initialize_use_spec() { int i; df_no_use_specs = 0; for (i = 0; i < MAXDATACOLS; ++i) { use_spec[i].column = i + 1; /* default column */ use_spec[i].expected_type = CT_DEFAULT; /* no particular expectation */ if (use_spec[i].at) { free_at(use_spec[i].at); use_spec[i].at = NULL; /* no expression */ } df_axis[i] = NO_AXIS; /* no timefmt for this output column */ } } /*{{{ int df_open(char *file_name, int max_using, plot_header *plot) */ /* open file, parsing using/thru/index stuff return number of using * specs [well, we have to return something !] */ int df_open(const char *cmd_filename, int max_using, struct curve_points *plot) { int name_token = c_token - 1; TBOOLEAN duplication = FALSE; TBOOLEAN set_index = FALSE, set_every = FALSE, set_thru = FALSE; TBOOLEAN set_using = FALSE; TBOOLEAN set_matrix = FALSE; fast_columns = 1; /* corey@cac */ /* close file if necessary */ if (data_fp) { df_close(); data_fp = NULL; } /*{{{ initialise static variables */ free(df_format); df_format = NULL; /* no format string */ df_no_tic_specs = 0; free(df_key_title); df_key_title = NULL; initialize_use_spec(); clear_df_column_headers(); df_datum = -1; /* it will be preincremented before use */ df_line_number = 0; /* ditto */ df_lower_index = 0; df_index_step = 1; df_upper_index = MAXINT; free(indexname); indexname = NULL; df_current_index = 0; blank_count = 2; /* by initialising blank_count, leading blanks will be ignored */ everypoint = everyline = 1; /* unless there is an every spec */ firstpoint = firstline = 0; lastpoint = lastline = MAXINT; df_binary_file = df_matrix_file = FALSE; df_pixeldata = NULL; df_num_bin_records = 0; df_matrix = FALSE; df_nonuniform_matrix = FALSE; df_eof = 0; /* Save for use by df_readline(). */ /* Perhaps it should be a parameter to df_readline? */ df_current_plot = plot; column_for_key_title = NO_COLUMN_HEADER; parse_1st_row_as_headers = FALSE; df_already_got_headers = FALSE; /*}}} */ assert(max_using <= MAXDATACOLS); if (!cmd_filename) int_error(c_token, "missing filename"); if (!cmd_filename[0]) { if (!df_filename || !*df_filename) int_error(c_token, "No previous filename"); } else { free(df_filename); df_filename = gp_strdup(cmd_filename); } /* defer opening until we have parsed the modifiers... */ if (ydata_func.at) /* something for thru (?) */ free_at(ydata_func.at); ydata_func.at = NULL; /* pm 25.11.2001 allow any order of options */ while (!END_OF_COMMAND) { /* look for binary / matrix */ if (almost_equals(c_token, "bin$ary")) { c_token++; if (df_binary_file) { duplication=TRUE; break; } df_binary_file = TRUE; /* Up to the time of adding the general binary code, only matrix * binary for 3d was defined. So, use matrix binary by default. */ df_matrix_file = TRUE; initialize_binary_vars(); plot_option_binary(set_matrix, FALSE); continue; } /* deal with matrix */ if (almost_equals(c_token, "mat$rix")) { c_token++; if (set_matrix) { duplication=TRUE; break; } /* `binary` default is both df_matrix_file and df_binary_file. * So if df_binary_file is true, but df_matrix_file isn't, then * some keyword specific to general binary has been given. */ if (!df_matrix_file && df_binary_file) int_error(c_token, matrix_general_binary_conflict_msg); df_matrix_file = TRUE; set_matrix = TRUE; fast_columns = 0; continue; } /* May 2011 - "nonuniform matrix" indicates an ascii data file * with the same row/column layout as "binary matrix" */ if (almost_equals(c_token, "nonuni$form")) { c_token++; df_matrix_file = TRUE; df_nonuniform_matrix = TRUE; fast_columns = 0; continue; } /* deal with index */ if (almost_equals(c_token, "i$ndex")) { if (set_index) { duplication=TRUE; break; } plot_option_index(); set_index = TRUE; continue; } /* deal with every */ if (almost_equals(c_token, "ev$ery")) { if (set_every) { duplication=TRUE; break; } plot_option_every(); set_every = TRUE; continue; } /* deal with thru */ /* jev -- support for passing data from file thru user function */ if (almost_equals(c_token, "thru$")) { if (set_thru) { duplication=TRUE; break; } plot_option_thru(); set_thru = TRUE; continue; } /* deal with using */ if (almost_equals(c_token, "u$sing")) { if (set_using) { duplication=TRUE; break; } plot_option_using(max_using); set_using = TRUE; continue; } /* deal with volatile */ if (almost_equals(c_token, "volatile")) { c_token++; volatile_data = TRUE; continue; } /* Allow this plot not to affect autoscaling */ if (almost_equals(c_token, "noauto$scale")) { c_token++; plot->noautoscale = TRUE; continue; } break; /* unknown option */ } /* while (!END_OF_COMMAND) */ if (duplication) int_error(c_token, "duplicated or contradicting arguments in datafile options"); /* Check for auto-generation of key title from column header */ /* Mar 2009: This may no longer be the best place for this! */ if ((&keyT)->auto_titles == COLUMNHEAD_KEYTITLES) { if (df_no_use_specs == 1) column_for_key_title = use_spec[0].column; else if (plot && plot->plot_type == DATA3D) column_for_key_title = use_spec[2].column; else column_for_key_title = use_spec[1].column; } /*{{{ more variable inits */ point_count = -1; /* we preincrement */ line_count = 0; df_pseudodata = 0; df_pseudorecord = 0; df_pseudospan = 0; /* here so it's not done for every line in df_readline */ if (max_line_len < DATA_LINE_BUFSIZ) { max_line_len = DATA_LINE_BUFSIZ; line = gp_alloc(max_line_len, "datafile line buffer"); } /*}}} */ /*{{{ open file */ #if defined(HAVE_FDOPEN) if (*df_filename == '<' && strlen(df_filename) > 1 && df_filename[1] == '&') { char *substr; /* read from an already open file descriptor */ data_fd = strtol(df_filename + 2, &substr, 10); if (*substr != '\0' || data_fd < 0 || substr == df_filename+2) int_error(name_token, "invalid file descriptor integer"); else if (data_fd == fileno(stdin) || data_fd == fileno(stdout) || data_fd == fileno(stderr)) int_error(name_token, "cannot plot from stdin/stdout/stderr"); else if ((data_fp = fdopen(data_fd, "r")) == (FILE *) NULL) int_error(name_token, "cannot open file descriptor for reading data"); } else #endif /* HAVE_FDOPEN */ #if defined(PIPES) if (*df_filename == '<') { restrict_popen(); if ((data_fp = popen(df_filename + 1, "r")) == (FILE *) NULL) os_error(name_token, "cannot create pipe for data"); else df_pipe_open = TRUE; } else #endif /* PIPES */ /* Special filenames '-' '+' '++' '$DATABLOCK' */ if (*df_filename == '-' && strlen(df_filename) == 1) { plotted_data_from_stdin = TRUE; volatile_data = TRUE; data_fp = lf_top(); if (!data_fp) data_fp = stdin; mixed_data_fp = TRUE; /* don't close command file */ } else if (df_filename[0] == '+') { if (strlen(df_filename) == 1) df_pseudodata = 1; else if (df_filename[1] == '+' && strlen(df_filename) == 2) df_pseudodata = 2; } else { /* filename cannot be static array! */ gp_expand_tilde(&df_filename); #ifdef HAVE_SYS_STAT_H { struct stat statbuf; if ((stat(df_filename, &statbuf) > -1) && S_ISDIR(statbuf.st_mode)) { os_error(name_token, "\"%s\" is a directory", df_filename); } } #endif /* HAVE_SYS_STAT_H */ if ((data_fp = loadpath_fopen(df_filename, df_binary_file ? "rb" : "r")) == NULL) { int_warn(NO_CARET, "Skipping unreadable file \"%s\"", df_filename); df_eof = 1; return DF_EOF; } } /*}}} */ /* If the data is in binary matrix form, read in some values * to determine the nubmer of columns and rows. If data is in * ASCII matrix form, read in all the data to memory in preparation * for using df_readbinary() routine. */ if (df_matrix_file) df_determine_matrix_info(data_fp); /* General binary, matrix binary and ASCII matrix all use the * df_readbinary() routine. */ if (df_binary_file || df_matrix_file) { df_read_binary = TRUE; adjust_binary_use_spec(); } else df_read_binary = FALSE; /* Make information about whether the data forms a grid or not * available to the outside world. */ df_matrix = (df_matrix_file || ((df_num_bin_records == 1) && ((df_bin_record[0].cart_dim[1] > 0) || (df_bin_record[0].scan_dim[1] > 0)))); return df_no_use_specs; } /*}}} */ /*{{{ void df_close() */ void df_close() { int i; /* paranoid - mark $n and column(n) as invalid */ df_no_cols = 0; if (!data_fp) return; if (ydata_func.at) { free_at(ydata_func.at); ydata_func.at = NULL; } /* free any use expression storage */ for (i = 0; i < MAXDATACOLS; ++i) if (use_spec[i].at) { free_at(use_spec[i].at); use_spec[i].at = NULL; } /* free binary matrix data */ if (df_matrix) { for (i = 0; i < df_num_bin_records; i++) { free(df_bin_record[i].memory_data); df_bin_record[i].memory_data = NULL; } } if (!mixed_data_fp) { #if defined(HAVE_FDOPEN) if (data_fd == fileno(data_fp)) { /* This will allow replotting if this stream is backed by a file, * and hopefully is harmless if it connects to a pipe. * Leave it open in either case. */ rewind(data_fp); fprintf(stderr,"Rewinding fd %d\n", data_fd); } else #endif #if defined(PIPES) if (df_pipe_open) { (void) pclose(data_fp); df_pipe_open = FALSE; } else #endif /* PIPES */ (void) fclose(data_fp); } mixed_data_fp = FALSE; data_fp = NULL; } /*}}} */ /*{{{ void df_showdata() */ /* display the current data file line for an error message */ void df_showdata() { if (data_fp && df_filename && line) { /* display no more than 77 characters */ fprintf(stderr, "%.77s%s\n%s:%d:", line, (strlen(line) > 77) ? "..." : "", df_filename, df_line_number); } } /*}}} */ static void plot_option_every() { fast_columns = 0; /* corey@cac */ /* allow empty fields - every a:b:c::e we have already established * the defaults */ if (!equals(++c_token, ":")) { everypoint = int_expression(); if (everypoint < 0) everypoint = 1; else if (everypoint < 1) int_error(c_token, "Expected positive integer"); } /* if it fails on first test, no more tests will succeed. If it * fails on second test, next test will succeed with correct * c_token */ if (equals(c_token, ":") && !equals(++c_token, ":")) { everyline = int_expression(); if (everyline < 0) everyline = 1; else if (everyline < 1) int_error(c_token, "Expected positive integer"); } if (equals(c_token, ":") && !equals(++c_token, ":")) { firstpoint = int_expression(); if (firstpoint < 0) firstpoint = 0; } if (equals(c_token, ":") && !equals(++c_token, ":")) { firstline = int_expression(); if (firstline < 0) firstline = 0; } if (equals(c_token, ":") && !equals(++c_token, ":")) { lastpoint = int_expression(); if (lastpoint < 0) lastpoint = MAXINT; else if (lastpoint < firstpoint) int_error(c_token, "Last point must not be before first point"); } if (equals(c_token, ":")) { ++c_token; lastline = int_expression(); if (lastline < 0) lastline = MAXINT; else if (lastline < firstline) int_error(c_token, "Last line must not be before first line"); } } static void plot_option_index() { if (df_binary_file && df_matrix_file) int_error(c_token, "Binary matrix file format does not allow more than one surface per file"); ++c_token; /* Check for named index */ if ((indexname = try_to_get_string())) { index_found = FALSE; return; } /* Numerical index list */ df_lower_index = int_expression(); if (equals(c_token, ":")) { ++c_token; if (equals(c_token, ":")) { df_upper_index = MAXINT; /* If end index not specified */ } else { df_upper_index = int_expression(); if (df_upper_index < df_lower_index) int_error(c_token, "Upper index should be bigger than lower index"); } if (equals(c_token, ":")) { ++c_token; df_index_step = abs(int_expression()); if (df_index_step < 1) int_error(c_token, "Index step must be positive"); } } else df_upper_index = df_lower_index; } static void plot_option_thru() { c_token++; strcpy(c_dummy_var[0], set_dummy_var[0]); /* allow y also as a dummy variable. * during plot, c_dummy_var[0] and [1] are 'sacred' * ie may be set by splot [u=1:2] [v=1:2], and these * names are stored only in c_dummy_var[] * so choose dummy var 2 - can anything vital be here ? */ dummy_func = &ydata_func; strcpy(c_dummy_var[2], "y"); ydata_func.at = perm_at(); dummy_func = NULL; } static void plot_option_using(int max_using) { int no_cols = 0; /* For general binary only. */ char *column_label; /* The filetype function may have set the using specs, so reset * them before processing tokens. */ if (df_binary_file) initialize_use_spec(); /* Try to distinguish between 'using "A":"B"' and 'using "%lf %lf" */ if (!END_OF_COMMAND && isstring(++c_token)) { int save_token = c_token; df_format = try_to_get_string(); if (valid_format(df_format)) return; free(df_format); df_format = NULL; c_token = save_token; } if (!END_OF_COMMAND) { do { /* must be at least one */ if (df_no_use_specs >= max_using) int_error(c_token, "Too many columns in using specification"); if (equals(c_token, ":")) { /* empty specification - use default */ use_spec[df_no_use_specs].column = df_no_use_specs; if (df_no_use_specs > no_cols) no_cols = df_no_use_specs; ++df_no_use_specs; /* do not increment c+token ; let while() find the : */ } else if (equals(c_token, "(")) { fast_columns = 0; /* corey@cac */ dummy_func = NULL; /* no dummy variables active */ /* this will match ()'s: */ at_highest_column_used = NO_COLUMN_HEADER; use_spec[df_no_use_specs].at = perm_at(); if (no_cols < at_highest_column_used) no_cols = at_highest_column_used; /* Catch at least the simplest case of 'autotitle columnhead' using an expression */ use_spec[df_no_use_specs++].column = at_highest_column_used; /* It would be nice to handle these like any other */ /* internal function via perm_at() but it doesn't work. */ } else if (almost_equals(c_token, "xtic$labels")) { plot_ticlabel_using(CT_XTICLABEL); } else if (almost_equals(c_token, "x2tic$labels")) { plot_ticlabel_using(CT_X2TICLABEL); } else if (almost_equals(c_token, "ytic$labels")) { plot_ticlabel_using(CT_YTICLABEL); } else if (almost_equals(c_token, "y2tic$labels")) { plot_ticlabel_using(CT_Y2TICLABEL); } else if (almost_equals(c_token, "ztic$labels")) { plot_ticlabel_using(CT_ZTICLABEL); } else if (almost_equals(c_token, "cbtic$labels")) { plot_ticlabel_using(CT_CBTICLABEL); } else if (almost_equals(c_token, "key")) { plot_ticlabel_using(CT_KEYLABEL); } else if ((column_label = try_to_get_string())) { /* ...using "A"... Dummy up a call to column(column_label) */ use_spec[df_no_use_specs].at = create_call_column_at(column_label); use_spec[df_no_use_specs++].column = NO_COLUMN_HEADER; parse_1st_row_as_headers = TRUE; fast_columns = 0; /* FIXME - is it safe to always take the title from the 2nd use spec? */ if (df_no_use_specs == 2) { free(df_key_title); df_key_title = gp_strdup(column_label); } } else { int col = int_expression(); if (col < -2) int_error(c_token, "Column must be >= -2"); use_spec[df_no_use_specs++].column = col; /* Supposedly only happens for binary files, but don't bet on it */ if (col > no_cols) no_cols = col; } } while (equals(c_token, ":") && ++c_token); } if (df_binary_file) { /* If the highest user column number is greater than number of binary * columns, set the unitialized columns binary info to that of the last * specified column or the default. */ df_extend_binary_columns(no_cols); } /* Allow a format specifier after the enumeration of columns. */ /* Note: This was left out by mistake in versions 4.6.0 and 4.6.1 */ if (!END_OF_COMMAND && isstring(c_token)) { df_format = try_to_get_string(); if (!valid_format(df_format)) int_error(c_token, "format must have 1-7 conversions of type double (%%lf)"); } } static void plot_ticlabel_using(int axis) { int col = 0; c_token ++; if (!equals(c_token,"(")) int_error(c_token, "missing '('"); c_token++; /* FIXME: What we really want is a test for a constant expression as */ /* opposed to a dummy expression. This is similar to the problem with */ /* with parsing the first argument of the plot command itself. */ if (isanumber(c_token) || type_udv(c_token)==INTGR) { col = int_expression(); use_spec[df_no_use_specs+df_no_tic_specs].at = NULL; } else { use_spec[df_no_use_specs+df_no_tic_specs].at = perm_at(); fast_columns = 0; /* Force all columns to be evaluated */ col = 1; /* Redundant because of the above */ } if (col < 1) int_error(c_token, "ticlabels must come from a real column"); if (!equals(c_token,")")) int_error(c_token, "missing ')'"); c_token++; use_spec[df_no_use_specs+df_no_tic_specs].expected_type = axis; use_spec[df_no_use_specs+df_no_tic_specs].column = col; df_no_tic_specs++; } /*{{{ int df_readline(v, max) */ int df_readline(double v[], int max) { if (!data_fp && !df_pseudodata) return DF_EOF; if (df_read_binary) /* General binary, matrix binary or matrix ascii * that's been converted to binary. */ return df_readbinary(v, max); else return df_readascii(v, max); } /*}}} */ /* do the hard work... read lines from file, * - use blanks to get index number * - ignore lines outside range of indices required * - fill v[] based on using spec if given */ int df_readascii(double v[], int max) { char *s; assert(data_fp != NULL || df_pseudodata); assert(max_line_len); /* alloc-ed in df_open() */ assert(max <= MAXDATACOLS); /* catch attempt to read past EOF on mixed-input */ if (df_eof) return DF_EOF; /*{{{ process line */ while ((s = df_gets()) != NULL) { int line_okay = 1; int output = 0; /* how many numbers written to v[] */ ++df_line_number; df_no_cols = 0; /*{{{ check for blank lines, and reject by index/every */ /*{{{ skip leading spaces */ while (isspace((unsigned char) *s)) ++s; /* will skip the \n too, to point at \0 */ /*}}} */ /*{{{ skip comments */ if (is_comment(*s)) { if (indexname) { /* Look for index name in comment */ while (is_comment(*s) || isspace((int)*s)) ++s; if (*s && !strncmp(s, indexname, strlen(indexname))) index_found = TRUE; } continue; /* ignore comments */ } /*}}} */ /*{{{ check EOF on mixed data */ if (mixed_data_fp && is_EOF(*s)) { df_eof = 1; /* trap attempts to read past EOF */ return DF_EOF; } /*}}} */ /*{{{ its a blank line - update counters and continue or return */ if (*s == 0) { /* argh - this is complicated ! we need to * ignore it if we haven't reached first index * report EOF if passed last index * report blank line unless we've already done 2 blank lines * * - I have probably missed some obvious way of doing all this, * but its getting late */ point_count = -1; /* restart counter within line */ if (++blank_count == 1) { /* first blank line */ ++line_count; } /* just reached end of a group/surface */ if (blank_count == 2) { ++df_current_index; line_count = 0; df_datum = -1; /* Found two blank lines after a block of data with a named index */ if (indexname && index_found) { df_eof = 1; return DF_EOF; } /* ignore line if current_index has just become * first required one - client doesn't want this * blank line. While we're here, check for <= * - we need to do it outside this conditional, but * probably no extra cost at assembler level */ if (df_current_index <= df_lower_index) continue; /* dont tell client */ /* df_upper_index is MAXINT-1 if we are not doing index */ if (df_current_index > df_upper_index) { /* oops - need to gobble rest of input if mixed */ if (mixed_data_fp) continue; else { df_eof = 1; return DF_EOF; /* no point continuing */ } } } /* dont tell client if we haven't reached first index */ if (indexname && !index_found) continue; if (df_current_index < df_lower_index) continue; /* ignore blank lines after blank_index */ if (blank_count > 2) continue; return DF_FIRST_BLANK - (blank_count - 1); } /*}}} */ /* get here => was not blank */ blank_count = 0; /*{{{ ignore points outside range of index */ /* we try to return end-of-file as soon as we pass upper index, * but for mixed input stream, we must skip garbage */ if (indexname && !index_found) continue; if (df_current_index < df_lower_index || df_current_index > df_upper_index || ((df_current_index - df_lower_index) % df_index_step) != 0) continue; /*}}} */ /* Bookkeeping for the plot ... every N:M:etc option */ if ((parse_1st_row_as_headers || column_for_key_title > 0) && !df_already_got_headers) { FPRINTF((stderr,"skipping 'every' test in order to read column headers\n")); } else { /* Accept only lines with (line_count%everyline) == 0 */ if (line_count < firstline || line_count > lastline || (line_count - firstline) % everyline != 0) continue; /* update point_count. ignore point if point_count%everypoint != 0 */ if (++point_count < firstpoint || point_count > lastpoint || (point_count - firstpoint) % everypoint != 0) continue; } /*}}} */ ++df_datum; if (df_format) { /*{{{ do a sscanf */ int i; assert(MAXDATACOLS == 7); /* check we have room for at least 7 columns */ if (df_max_cols < 7) expand_df_column(7); df_no_cols = sscanf(line, df_format, &df_column[0].datum, &df_column[1].datum, &df_column[2].datum, &df_column[3].datum, &df_column[4].datum, &df_column[5].datum, &df_column[6].datum); if (df_no_cols == EOF) { df_eof = 1; return DF_EOF; /* tell client */ } for (i = 0; i < df_no_cols; ++i) { /* may be zero */ df_column[i].good = DF_GOOD; df_column[i].position = NULL; /* cant get a time */ } /*}}} */ } else df_tokenise(s); /* Always save the contents of the first row in case it is needed for * later access via column("header"). However, unless we know for certain that * it contains headers only, e.g. via parse_1st_row_as_headers or * (column_for_key_title > 0), also treat it as a data row. */ if (df_datum == 0 && !df_already_got_headers) { int j; for (j=0; j<df_no_cols; j++) { free(df_column[j].header); df_column[j].header = df_parse_string_field(df_column[j].position); if (df_column[j].header) { if (df_longest_columnhead < strlen(df_column[j].header)) df_longest_columnhead = strlen(df_column[j].header); FPRINTF((stderr,"Col %d: \"%s\"\n",j,df_column[j].header)); } } df_already_got_headers = TRUE; /* Restrict the column number to possible values */ if (column_for_key_title > df_no_cols) column_for_key_title = df_no_cols; if (column_for_key_title > 0) { df_key_title = gp_strdup(df_column[column_for_key_title-1].header); if (!df_key_title) { FPRINTF((stderr, "df_readline: missing column head for key title\n")); return(DF_KEY_TITLE_MISSING); } df_datum--; column_for_key_title = NO_COLUMN_HEADER; parse_1st_row_as_headers = FALSE; return DF_FOUND_KEY_TITLE; } else if (parse_1st_row_as_headers) { df_datum--; parse_1st_row_as_headers = FALSE; return DF_COLUMN_HEADERS; } } /*{{{ copy column[] to v[] via use[] */ { int limit = (df_no_use_specs ? df_no_use_specs + df_no_tic_specs : MAXDATACOLS); if (limit > max + df_no_tic_specs) limit = max + df_no_tic_specs; for (output = 0; output < limit; ++output) { /* if there was no using spec, column is output+1 and * at=NULL */ int column = use_spec[output].column; current_using_spec = output; /* Handle cases where column holds a meta-data string */ /* Axis labels, plot titles, etc. */ if (use_spec[output].expected_type >= CT_XTICLABEL) { int axis, axcol; float xpos; /* EAM FIXME - skip columnstacked histograms also */ if (df_current_plot) { if (df_current_plot->plot_style == BOXPLOT) continue; } switch (use_spec[output].expected_type) { default: case CT_XTICLABEL: axis = FIRST_X_AXIS; axcol = 0; break; case CT_X2TICLABEL: axis = SECOND_X_AXIS; axcol = 0; break; case CT_YTICLABEL: axis = FIRST_Y_AXIS; axcol = 1; break; case CT_Y2TICLABEL: axis = SECOND_Y_AXIS; axcol = 1; break; case CT_ZTICLABEL: axis = FIRST_Z_AXIS; axcol = 2; break; case CT_CBTICLABEL: /* EAM FIXME - Which column to set for cbtic? */ axis = COLOR_AXIS; axcol = 3; break; } /* FIXME EAM - Trap special case of only a single * 'using' column. But really we need to handle * general case of implicit column 0 */ if (output == 1) xpos = (axcol == 0) ? df_datum : v[axcol-1]; else xpos = v[axcol]; if (df_current_plot && df_current_plot->plot_style == HISTOGRAMS) { if (output > 1) /* Can only happen for HT_ERRORBARS */ xpos = (axcol == 0) ? df_datum : v[axcol-1]; xpos += df_current_plot->histogram->start; } /* Tic label is generated by a string-valued function */ if (use_spec[output].at) { struct value a; evaluate_inside_using = TRUE; evaluate_at(use_spec[output].at, &a); evaluate_inside_using = FALSE; if (a.type == STRING) { add_tic_user(axis, a.v.string_val, xpos, -1); gpfree_string(&a); } else fprintf(stderr,"Tic label does not evaluate as string!\n"); } else { char *temp_string = df_parse_string_field(df_tokens[output]); add_tic_user(axis, temp_string, xpos, -1); free(temp_string); } } else if (use_spec[output].expected_type == CT_KEYLABEL) { char *temp_string = df_parse_string_field(df_tokens[output]); if (df_current_plot) add_key_entry(temp_string,df_datum); free(temp_string); } else if (use_spec[output].at) { struct value a; TBOOLEAN timefield = FALSE; /* no dummy values to set up prior to... */ evaluate_inside_using = TRUE; evaluate_at(use_spec[output].at, &a); evaluate_inside_using = FALSE; if (undefined) return DF_UNDEFINED; /* store undefined point in plot */ if ((df_axis[output] != NO_AXIS) && axis_array[df_axis[output]].datatype == DT_TIMEDATE) timefield = TRUE; if (timefield && (a.type != STRING) && !strcmp(axis_array[df_axis[output]].timefmt,"%s")) { /* Handle the case of timefmt "%s" which expects a string */ /* containing a number. If evaluate_at() above returned a */ /* bare number then we must convert it to a sting before */ /* falling through to the usual processing case. */ /* NB: We only accept time values of +/- 10^12 seconds. */ char *timestring = gp_alloc(20,"timestring"); sprintf(timestring,"%16.3f",real(&a)); a.type = STRING; a.v.string_val = timestring; } if (a.type == STRING) { /* This string value will get parsed as if it were a data column */ /* so put it in quotes to allow embedded whitespace. */ if (use_spec[output].expected_type == CT_STRING) { char *s = gp_alloc(strlen(a.v.string_val)+3,"quote"); *s = '"'; strcpy(s+1, a.v.string_val); strcat(s, "\""); free(df_stringexpression[output]); df_tokens[output] = df_stringexpression[output] = s; } /* Check for timefmt string generated by a function */ if (timefield) { struct tm tm; double usec = 0.0; if (gstrptime(a.v.string_val, axis_array[df_axis[output]].timefmt, &tm, &usec)) v[output] = (double) gtimegm(&tm) + usec; else /* FIXME - Is this correct? Is it needed? */ line_okay = 0; } gpfree_string(&a); } else v[output] = real(&a); } else if (column == -2) { v[output] = df_current_index; } else if (column == -1) { v[output] = line_count; } else if (column == 0) { v[output] = df_datum; /* using 0 */ } else if (column <= 0) /* really < -2, but */ int_error(NO_CARET, "internal error: column <= 0 in datafile.c"); else if ((df_axis[output] != NO_AXIS) && (axis_array[df_axis[output]].datatype == DT_TIMEDATE)) { struct tm tm; double usec = 0.0; if (column > df_no_cols || df_column[column - 1].good == DF_MISSING || !df_column[column - 1].position || !gstrptime(df_column[column - 1].position, axis_array[df_axis[output]].timefmt, &tm, &usec) ) { /* line bad only if user explicitly asked for this column */ if (df_no_use_specs) line_okay = 0; /* return or ignore line depending on line_okay */ break; } v[output] = (double) gtimegm(&tm) + usec; } else if (use_spec[output].expected_type == CT_STRING) { /* Do nothing. */ /* String tokens were loaded into df_tokens already. */ } else { /* column > 0 */ if ((column <= df_no_cols) && df_column[column - 1].good == DF_GOOD) v[output] = df_column[column - 1].datum; /* EAM - Oct 2002 Distinguish between * DF_MISSING and DF_BAD. Previous versions * would never notify caller of either case. * Now missing data will be noted. Bad data * should arguably be noted also, but that * would change existing default behavior. */ else if ((column <= df_no_cols) && (df_column[column - 1].good == DF_MISSING)) return DF_MISSING; else { /* line bad only if user explicitly asked * for this column */ if (df_no_use_specs) line_okay = 0; break; /* return or ignore depending on line_okay */ } } /* Special case to make 'using 0' et al. to work with labels */ if (use_spec[output].expected_type == CT_STRING && (!(use_spec[output].at) || !df_tokens[output]) && (column == -2 || column == -1 || column == 0)) { char *s = gp_alloc(32*sizeof(char), "temp string for label hack"); sprintf(s, "%d", (int)v[output]); free(df_stringexpression[output]); df_tokens[output] = df_stringexpression[output] = s; } } } /*}}} */ if (!line_okay) continue; /* output == df_no_use_specs if using was specified - * actually, smaller of df_no_use_specs and max */ /* FIXME EAM - In theory it might be useful for the caller to * know whether or not tic specs were read from this line, but * all callers would have to be modified to deal with it one * way or the other. */ output -= df_no_tic_specs; assert(df_no_use_specs == 0 || output == df_no_use_specs || output == max); return output; } /*}}} */ /* get here => fgets failed */ /* no longer needed - mark column(x) as invalid */ df_no_cols = 0; df_eof = 1; return DF_EOF; } /*}}} */ char *read_error_msg = "Data file read error"; double df_matrix_corner[2][2]; /* First argument is corner, second argument is x (0) or y(1). */ float df_read_a_float(FILE *fin) { float fdummy; if (fread(&fdummy, sizeof(fdummy), 1, fin) != 1) { if (feof(fin)) int_error(NO_CARET, "Data file is empty"); else int_error(NO_CARET, read_error_msg); } df_swap_bytes_by_endianess((char *)&fdummy, byte_read_order(df_bin_file_endianess), sizeof(fdummy)); return fdummy; } void df_determine_matrix_info(FILE *fin) { if (df_binary_file) { /* Binary matrix format. */ float fdummy; int nc, nr; long flength; /* Read first value for number of columns. */ fdummy = df_read_a_float(fin); nc = ((size_t) fdummy); if (nc == 0) int_error(NO_CARET, "Read grid of zero width"); else if (nc > 1e8) int_error(NO_CARET, "Read grid width too large"); /* Read second value for corner_0 x. */ fdummy = df_read_a_float(fin); df_matrix_corner[0][0] = fdummy; /* Read nc+1 value for corner_1 x. */ if (nc > 1) { fseek(fin, (nc-2)*sizeof(float), SEEK_CUR); fdummy = df_read_a_float(fin); } df_matrix_corner[1][0] = fdummy; /* Read nc+2 value for corner_0 y. */ df_matrix_corner[0][1] = df_read_a_float(fin); /* Compute length of file and number of columns. */ fseek(fin, 0L, SEEK_END); flength = ftell(fin)/sizeof(float); nr = flength/(nc + 1); if (nr*(nc + 1) != flength) int_error(NO_CARET, "File doesn't factorize into full matrix"); /* Read last value for corner_1 y */ fseek(fin, -(nc + 1)*sizeof(float), SEEK_END); df_matrix_corner[1][1] = df_read_a_float(fin); /* Set up scan information for df_readbinary(). */ df_bin_record[0].scan_dim[0] = nc; df_bin_record[0].scan_dim[1] = nr; /* Reset counter file pointer. */ fseek(fin, 0L, SEEK_SET); } else { /* ASCII matrix format, converted to binary memory format. */ static float *matrix = NULL; int nr, nc; /* Insurance against creating a matrix with df_read_matrix() * and then erroring out through df_add_binary_records(). */ if (matrix) free(matrix); /* Set important binary variables, then free memory for all default * binary records and set number of records to 0. */ initialize_binary_vars(); clear_binary_records(DF_CURRENT_RECORDS); /* Keep reading matrices until file is empty. */ while (1) { if ((matrix = df_read_matrix(&nr, &nc)) != NULL) { int index = df_num_bin_records; /* Ascii matrix with explicit y in first row, x in first column */ if (df_nonuniform_matrix) { nc--; nr--; } /* *** Careful! Could error out in next step. "matrix" should * be static and test next time. *** */ df_add_binary_records(1, DF_CURRENT_RECORDS); df_bin_record[index].memory_data = (char *) matrix; matrix = NULL; df_bin_record[index].scan_dim[0] = nc; df_bin_record[index].scan_dim[1] = nr; df_bin_record[index].scan_dim[2] = 0; df_bin_file_endianess = THIS_COMPILER_ENDIAN; } else break; } /* Data from file is now in memory. Make the rest of gnuplot think * that the data stream has not yet reached the end of file. */ df_eof = 0; } } /* stuff for implementing the call-backs for picking up data values * do it here so we can make the variables private to this file */ /*{{{ void f_dollars(x) */ void f_dollars(union argument *x) { int column = x->v_arg.v.int_val - 1; /* we checked it was an integer >= 0 at compile time */ struct value a; if (column == -1) { push(Gcomplex(&a, (double) df_datum, 0.0)); /* $0 */ } else if (column >= df_no_cols || df_column[column].good != DF_GOOD) { undefined = TRUE; push(&(x->v_arg)); /* this okay ? */ } else push(Gcomplex(&a, df_column[column].datum, 0.0)); } /*}}} */ /*{{{ void f_column() */ void f_column(union argument *arg) { struct value a; int column; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); if (!evaluate_inside_using) int_error(c_token-1, "column() called from invalid context"); if (a.type == STRING) { int j; char *name = a.v.string_val; column = DF_COLUMN_HEADERS; for (j=0; j<df_no_cols; j++) { if (df_column[j].header) { int offset = (*df_column[j].header == '"') ? 1 : 0; if (streq(name, df_column[j].header + offset)) { column = j+1; if (!df_key_title) df_key_title = gp_strdup(df_column[j].header); break; } } } if (column == DF_COLUMN_HEADERS) FPRINTF(("could not find column with header \"%s\"\n", a.v.string_val)); gpfree_string(&a); } else column = (int) real(&a); if (column == -2) push(Ginteger(&a, df_current_index)); else if (column == -1) push(Ginteger(&a, line_count)); else if (column == 0) /* $0 = df_datum */ push(Gcomplex(&a, (double) df_datum, 0.0)); else if (column < 1 || column > df_no_cols || df_column[column - 1].good != DF_GOOD ) { undefined = TRUE; push(&a); /* any objection to this ? */ } else push(Gcomplex(&a, df_column[column - 1].datum, 0.0)); } /* Called from int_error() */ void df_reset_after_error() { reset_numeric_locale(); evaluate_inside_using = FALSE; } void f_stringcolumn(union argument *arg) { struct value a; int column; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); if (!evaluate_inside_using || df_matrix) int_error(c_token-1, "stringcolumn() called from invalid context"); if (a.type == STRING) { int j; char *name = a.v.string_val; column = DF_COLUMN_HEADERS; for (j=0; j<df_no_cols; j++) { if (df_column[j].header) { int offset = (*df_column[j].header == '"') ? 1 : 0; if (streq(name, df_column[j].header + offset)) { column = j+1; if (!df_key_title) df_key_title = gp_strdup(df_column[j].header); break; } } } /* This warning should only trigger once per problematic input file */ if (column == DF_COLUMN_HEADERS && df_warn_on_missing_columnheader) { df_warn_on_missing_columnheader = FALSE; int_warn(NO_CARET,"no column with header \"%s\"", a.v.string_val); for (j=0; j<df_no_cols; j++) { if (df_column[j].header) { int offset = (*df_column[j].header == '"') ? 1 : 0; if (!strncmp(name, df_column[j].header + offset,strlen(name))) int_warn(NO_CARET, "partial match against column %d header %s", j+1, df_column[j].header); } } } gpfree_string(&a); } else column = (int) real(&a); if (column == -2) { char temp_string[32]; sprintf(temp_string, "%d", df_current_index); push(Gstring(&a, temp_string )); } else if (column == -1) { char temp_string[32]; sprintf(temp_string, "%d", line_count); push(Gstring(&a, temp_string )); } else if (column == 0) { /* $0 = df_datum */ char temp_string[32]; sprintf(temp_string, "%d", df_datum); push(Gstring(&a, temp_string )); } else if (column < 1 || column > df_no_cols) { undefined = TRUE; push(&a); /* any objection to this ? */ } else { char *temp_string = df_parse_string_field(df_column[column-1].position); push(Gstring(&a, temp_string )); free(temp_string); } } /*{{{ void f_columnhead() */ void f_columnhead(union argument *arg) { static char placeholder[] = "@COLUMNHEAD00@"; struct value a; if (!evaluate_inside_using) int_error(c_token-1, "columnhead() called from invalid context"); (void) arg; /* avoid -Wunused warning */ (void) pop(&a); column_for_key_title = (int) real(&a); snprintf(placeholder+11, 4, "%02d@", column_for_key_title); push(Gstring(&a, placeholder)); } /*{{{ void f_valid() */ void f_valid(union argument *arg) { struct value a; int column, good; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); column = (int) magnitude(&a) - 1; good = column >= 0 && column < df_no_cols && df_column[column].good == DF_GOOD; push(Ginteger(&a, good)); } /*}}} */ /*{{{ void f_timecolumn() */ /* HBB NOTE 20050505: this job is excessively tricky. We have one * timefmt string per axis. Back then, that was essentially the only * possibility, but it now poses a severe limitation. For simple * using specs, the time parsing format should be a function of the * column number in the datafile, not of the axis the data will be * used for. For extended using specs, the value to go on a given * axis could conceivably be built from multiple time/date entries in * the datafile, each with its own format. */ /* HBB FIXME 20050505: this really should take two arguments, at * least. First, the datafile column number. Second either a timefmt * string (variable), or an axis index. For now, we have to try to * guess the right axis index */ /* JP 20110823: Each using spec has an axis (thus the correct timefmt) * associated with it, in df_axis[]. Furthermore, this function can * only be called while evaluating an using spec, we just didn't know * which one it was called from - hence the need for guessing. * This information is now stored in the new global variable * current_using_spec. */ void f_timecolumn(union argument *arg) { struct value a; int column; AXIS_INDEX whichaxis; struct tm tm; double usec = 0.0; #if 0 int spec; int limit = (df_no_use_specs ? df_no_use_specs : MAXDATACOLS); #endif (void) arg; /* avoid -Wunused warning */ (void) pop(&a); column = (int) magnitude(&a); /* HBB 20050505: removed - 1*/ if (!evaluate_inside_using) int_error(c_token-1, "timecolumn() called from invalid context"); #if 0 /* try to match datafile column with spec field number */ whichaxis = FIRST_X_AXIS; for (spec = 0; spec<limit; spec++) if(use_spec[spec].column == column) { /* Found a 'using' specifier whose (default) column number * is the same as the column being referred to here. So * assume this spec's output axis is the one that we want * to use the timefmt of. */ whichaxis = df_axis[spec]; break; } #endif whichaxis = df_axis[current_using_spec]; if (column < 1 || column > df_no_cols || !df_column[column - 1].position || !gstrptime(df_column[column - 1].position, axis_array[whichaxis].timefmt, &tm, &usec)) { undefined = TRUE; push(&a); /* any objection to this ? */ } else push(Gcomplex(&a, gtimegm(&tm) + usec, 0.0)); } /*}}} */ /*{{{ static int check_missing(s) */ static int check_missing(char *s) { if (missing_val != NULL) { size_t len = strlen(missing_val); if (strncmp(s, missing_val, len) == 0 && (isspace((unsigned char) s[len]) || !s[len])) return 1; /* store undefined point in plot */ } /* April 2013 - Treat an empty csv field as "missing" */ if (*s == df_separator) return 1; return (0); } /*}}} */ /* formerly in misc.c, but only used here */ /* check user defined format strings for valid double conversions */ /* HBB 20040601: Added check that the number of format specifiers is * workable (between 0 and 7) */ static TBOOLEAN valid_format(const char *format) { int formats_found = 0; if (!format) return FALSE; for (;;) { if (!(format = strchr(format, '%'))) /* look for format spec */ return (formats_found > 0 && formats_found <= 7); /* Found a % to check --- scan past option specifiers: */ do { format++; } while (strchr("+-#0123456789.", *format)); /* Now at format modifier */ switch (*format) { case '*': /* Ignore '*' statements */ case '%': /* Char '%' itself */ format++; continue; case 'l': /* Now we found it !!! */ if (!strchr("fFeEgG", format[1])) /* looking for a valid format */ return FALSE; formats_found++; format++; break; default: return FALSE; } } } /* * Plotting routines can call this prior to invoking df_readline() to indicate * that they expect a certain column to contain an ascii string rather than a * number. */ int expect_string(const char column) { use_spec[column-1].expected_type = CT_STRING; /* Nasty hack to make 'plot "file" using "A":"B":"C" with labels' work. * The case of named columns is handled by create_call_column_at(), * which fakes an action table as if '(column("string"))' was written * in the using spec instead of simply "string". In this specific case, however, * we need the values as strings - so we change the action table to call * f_stringcolumn() instead of f_column. */ if (use_spec[column-1].at && (use_spec[column-1].at->a_count == 2) && (use_spec[column-1].at->actions[1].index == COLUMN)) use_spec[column-1].at->actions[1].index = STRINGCOLUMN; return(use_spec[column-1].column); } /* * Load plot title for key box from the string found earlier by df_readline. * Called from get_data(). */ void df_set_key_title(struct curve_points *plot) { if (!df_key_title) return; if (plot->plot_style == HISTOGRAMS && histogram_opts.type == HT_STACKED_IN_TOWERS) { /* In this case it makes no sense to treat key titles in the usual */ /* way, so we assume that it is supposed to be an xtic label. */ /* FIXME EAM - This style should default to notitle! */ double xpos = plot->histogram_sequence + plot->histogram->start; add_tic_user(FIRST_X_AXIS, df_key_title, xpos, -1); free(df_key_title); df_key_title = NULL; return; } /* What if there was already a title specified? */ if (plot->title && !plot->title_is_filename) { int columnhead; char *placeholder = strstr(plot->title, "@COLUMNHEAD"); while (placeholder) { char *newtitle = gp_alloc(strlen(plot->title) + df_longest_columnhead, "plot title"); columnhead = atoi(placeholder+11); *placeholder = '\0'; sprintf(newtitle, "%s%s%s", plot->title, (columnhead <= 0) ? df_key_title : (columnhead <= df_no_cols) ? df_column[columnhead-1].header : "", placeholder+14); free(plot->title); plot->title = newtitle; placeholder = strstr(newtitle, "@COLUMNHEAD"); } return; } if (plot->title_is_suppressed) return; if (plot->title) free(plot->title); plot->title_no_enhanced = !keyT.enhanced; plot->title = df_key_title; df_key_title = NULL; } /* * Load plot title for key box from columnheader. * Called from eval_plots(), eval_3dplots() while parsing the plot title option */ void df_set_key_title_columnhead(struct curve_points *plot) { c_token++; if (equals(c_token,"(")) { c_token++; column_for_key_title = int_expression(); c_token++; } else if (!END_OF_COMMAND && isanumber(c_token)) { column_for_key_title = int_expression(); } else { if (df_no_use_specs == 1) column_for_key_title = use_spec[0].column; else if (plot->plot_type == DATA3D) column_for_key_title = use_spec[2].column; else column_for_key_title = use_spec[1].column; } /* This results from plot 'foo' using (column("name")) title columnhead */ if (column_for_key_title == NO_COLUMN_HEADER) plot->title = gp_strdup("@COLUMNHEAD-1@"); } char * df_parse_string_field(char *field) { char *temp_string; if (!field) { return NULL; } else if (*field == '"') { temp_string = gp_strdup(&field[1]); temp_string[strcspn(temp_string,"\"")] = '\0'; } else if (df_separator != '\0') { char eor[3]; eor[0] = df_separator; eor[1] = '"'; eor[2] = '\0'; temp_string = gp_strdup(field); temp_string[strcspn(temp_string,eor)] = '\0'; } else { temp_string = gp_strdup(field); temp_string[strcspn(temp_string,"\t ")] = '\0'; } parse_esc(temp_string); return temp_string; } static void add_key_entry(char *temp_string, int df_datum) { text_label *new_entry = gp_alloc(sizeof(text_label), "key entry"); /* Associate this key list with the histogram it belongs to. */ if (!df_current_plot->labels) { /* The first text_label structure in the list is a place-holder */ df_current_plot->labels = gp_alloc(sizeof(text_label), "key entry"); memset(df_current_plot->labels, 0, sizeof(text_label)); df_current_plot->labels->tag = -1; } new_entry->text = gp_strdup(temp_string); new_entry->tag = df_datum; new_entry->font = NULL; new_entry->next = df_current_plot->labels->next; df_current_plot->labels->next = new_entry; } /* Construct 2D rotation matrix. */ /* R - Matrix to construct. */ /* alpha - Rotation angle. */ /* return - TRUE means a translation is required. */ TBOOLEAN rotation_matrix_2D(double R[][2], double alpha) { static double I[2][2] = {{1, 0}, {0, 1}}; #define ANGLE_TOLERANCE 0.001 if (fabs(alpha) < ANGLE_TOLERANCE) { /* Zero angle. Unity rotation. */ memcpy(R, I, sizeof(I)); return FALSE; } else { R[0][0] = cos(alpha); R[0][1] = -sin(alpha); R[1][0] = sin(alpha); R[1][1] = cos(alpha); return TRUE; } } /* Construct 3D rotation matrix. */ /* P - Matrix to construct. */ /* p - Pointer to perpendicular vector. */ /* return - TRUE means a translation is required. */ TBOOLEAN rotation_matrix_3D(double P[][3], double *p) { static double I[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; double scale, C1, C2; #define x p[0] #define y p[1] #define z p[2] C1 = sqrt(x*x + y*y + z*z); C2 = sqrt(x*x + y*y); /* ????? Is there a precision constant for doubles similar to what is in limits.h for other types? */ if ((C1 < 10e-10) || (C2 < (10e-5*C1))) { /* Zero vector (invalid) || vector perpendiculat to x/y plane. Unity rotation. */ memcpy(P, I, sizeof(I)); return FALSE; } else { scale = 1.0/(C1*C2); P[0][0] = x*z * scale; P[0][1] = -y*C1 * scale; P[0][2] = x*C2 * scale; P[1][0] = y*z * scale; P[1][1] = x*C1 * scale; P[1][2] = y*C2 * scale; P[2][0] = -C2*C2 * scale; P[2][1] = 0; P[2][2] = z*C2 * scale; return TRUE; } #undef x #undef y #undef z } df_byte_read_order_type byte_read_order (df_endianess_type file_endian) { /* Range limit file endianess to ensure that future file type function * programmer doesn't incorrectly access array and cause segmentation * fault unknowingly. */ return df_byte_read_order_map[THIS_COMPILER_ENDIAN][GPMIN(file_endian, DF_ENDIAN_TYPE_LENGTH-1)]; } void df_unset_datafile_binary(void) { clear_binary_records(DF_DEFAULT_RECORDS); df_bin_filetype_default = df_bin_filetype_reset; df_bin_file_endianess_default = DF_BIN_FILE_ENDIANESS_RESET; } void df_set_datafile_binary() { c_token++; if (END_OF_COMMAND) int_error(c_token, "option expected"); clear_binary_records(DF_CURRENT_RECORDS); /* Set current records to default in order to retain current default settings. */ if (df_bin_record_default) { df_bin_filetype = df_bin_filetype_default; df_bin_file_endianess = df_bin_file_endianess_default; df_add_binary_records(df_num_bin_records_default, DF_CURRENT_RECORDS); memcpy(df_bin_record, df_bin_record_default, df_num_bin_records*sizeof(df_binary_file_record_struct)); } else { df_bin_filetype = df_bin_filetype_reset; df_bin_file_endianess = DF_BIN_FILE_ENDIANESS_RESET; df_add_binary_records(1, DF_CURRENT_RECORDS); } /* Process the binary tokens. */ df_set_plot_mode(MODE_QUERY); plot_option_binary(FALSE, TRUE); /* Copy the modified settings as the new default settings. */ df_bin_filetype_default = df_bin_filetype; df_bin_file_endianess_default = df_bin_file_endianess; clear_binary_records(DF_DEFAULT_RECORDS); df_add_binary_records(df_num_bin_records, DF_DEFAULT_RECORDS); memcpy(df_bin_record_default, df_bin_record, df_num_bin_records_default*sizeof(df_binary_file_record_struct)); } void gpbin_filetype_function(void) { /* Gnuplot binary. */ df_matrix_file = TRUE; df_binary_file = TRUE; } void raw_filetype_function(void) { /* No information in file, just data. */ df_matrix_file = FALSE; df_binary_file = TRUE; } void avs_filetype_function(void) { /* A very simple file format: * 8 byte header (width and height, 4 bytes each), unknown endian * followed by 4 bytes per pixel (alpha, red, green, blue). */ FILE *fp; unsigned long M, N; int read_order = 0; /* open (header) file */ fp = loadpath_fopen(df_filename, "rb"); if (!fp) os_error(NO_CARET, "Can't open data file \"%s\"", df_filename); /* read header: it is only 8 bytes */ if (!fread(&M, 4, 1, fp)) os_error(NO_CARET, "Can't read first dimension in data file \"%s\"", df_filename); if (M > 0xFFFF) read_order = DF_3210; df_swap_bytes_by_endianess((char *) &M, read_order, 4); if (!fread(&N, 4, 1, fp)) os_error(NO_CARET, "Can't read second dimension in data file \"%s\"", df_filename); df_swap_bytes_by_endianess((char *) &N, read_order, 4); fclose(fp); df_matrix_file = FALSE; df_binary_file = TRUE; df_bin_record[0].scan_skip[0] = 8; df_bin_record[0].scan_dim[0] = M; df_bin_record[0].scan_dim[1] = N; df_bin_record[0].scan_dir[0] = 1; df_bin_record[0].scan_dir[1] = -1; df_bin_record[0].scan_generate_coord = TRUE; df_bin_record[0].cart_scan[0] = DF_SCAN_POINT; df_bin_record[0].cart_scan[1] = DF_SCAN_LINE; /* The four components are 1 byte each. Permute ARGB to RGBA */ df_extend_binary_columns(4); df_set_read_type(1, DF_UCHAR); df_set_read_type(2, DF_UCHAR); df_set_read_type(3, DF_UCHAR); df_set_read_type(4, DF_UCHAR); df_set_skip_before(1,0); df_no_use_specs = 4; use_spec[0].column = 2; use_spec[1].column = 3; use_spec[2].column = 4; use_spec[3].column = 1; } static void initialize_binary_vars() { /* Initialize for the df_readline() routine. */ df_bin_record_count = 0; df_M_count = df_N_count = df_O_count = 0; /* Set default binary data widths and skip paratemers. */ df_no_bin_cols = 0; df_set_skip_before(1, 0); /* Copy the default binary records to the active binary records. The number * of records will always be at least one in case "record", "array", * or "filetype" are not issued by the user. */ clear_binary_records(DF_CURRENT_RECORDS); if (df_num_bin_records_default) { df_bin_filetype = df_bin_filetype_default; df_bin_file_endianess = df_bin_file_endianess_default; df_add_binary_records(df_num_bin_records_default, DF_CURRENT_RECORDS); memcpy(df_bin_record, df_bin_record_default, df_num_bin_records*sizeof(df_binary_file_record_struct)); } else { df_bin_filetype = df_bin_filetype_reset; df_bin_file_endianess = DF_BIN_FILE_ENDIANESS_RESET; df_add_binary_records(1, DF_CURRENT_RECORDS); } } static char *too_many_cols_msg = "Too many columns in using specification and implied sampling array"; /* Place a special marker in the using list to derive the x/y/z value * from the appropriate dimensional counter. */ void df_insert_scanned_use_spec(int uspec) { /* Place a special marker in the using list to derive the z value * from the third dimensional counter, which will be zero. */ if (df_no_use_specs >= MAXDATACOLS) int_error(NO_CARET, too_many_cols_msg); else { int j; for (j=df_no_use_specs; j > uspec; j--) use_spec[j] = use_spec[j - 1]; use_spec[uspec].column = (uspec == 2 ? DF_SCAN_PLANE : DF_SCAN_LINE); /* The at portion is set to NULL here, but this doesn't mash * a valid memory pointer because any valid memory pointers * were copied to new locations in the previous for loop. */ use_spec[uspec].at = NULL; /* Not a bad memory pointer overwrite!! */ df_no_use_specs++; } } /* Not the most elegant way of defining the default columns, but I prefer * this to switch and conditional statements when there are so many styles. */ typedef struct df_bin_default_columns { PLOT_STYLE plot_style; short excluding_gen_coords; /* Number of columns of information excluding generated coordinates. */ short dimen_in_2d; /* Number of additional columns required (in 2D plot) if coordinates not generated. */ } df_bin_default_columns; df_bin_default_columns default_style_cols[] = { {LINES, 1, 1}, {POINTSTYLE, 1, 1}, {IMPULSES, 1, 1}, {LINESPOINTS, 1, 1}, {DOTS, 1, 1}, {XERRORBARS, 2, 1}, {YERRORBARS, 2, 1}, {XYERRORBARS, 3, 1}, {BOXXYERROR, 3, 1}, {BOXES, 1, 1}, {BOXERROR, 3, 1}, {STEPS, 1, 1}, {FSTEPS, 1, 1}, {FILLSTEPS, 1, 1}, {HISTEPS, 1, 1}, {VECTOR, 2, 2}, {CANDLESTICKS, 4, 1}, {FINANCEBARS, 4, 1}, {BOXPLOT, 2, 1}, {XERRORLINES, 2, 1}, {YERRORLINES, 2, 1}, {XYERRORLINES, 3, 1}, {FILLEDCURVES, 1, 1}, {PM3DSURFACE, 1, 2}, {LABELPOINTS, 2, 1}, {HISTOGRAMS, 1, 0}, {IMAGE, 1, 2}, {RGBIMAGE, 3, 2}, {RGBA_IMAGE, 4, 2} #ifdef EAM_OBJECTS , {CIRCLES, 2, 1} , {ELLIPSES, 2, 3} #endif }; /* FIXME!!! * EAM Feb 2008: * This whole routine is a disaster. It makes so many broken assumptions it's not funny. * Other than filling in the first two columns of an implicit matrix, I suspect we can * do away with it altogether. Frankly, we _don't care_ how many columns there are, * so long as the ones that are present are mapped to the right ordering. */ static void adjust_binary_use_spec() { char *nothing_known = "No default columns known for that plot style"; enum PLOT_STYLE plot_style; unsigned int ps_index; int c_token_copy; /* The default binary matrix format is nonuniform, i.e. * it has an extra row and column for sample coordinates. */ if (df_matrix_file && df_binary_file) df_nonuniform_matrix = TRUE; c_token_copy = c_token; for ( ; !END_OF_COMMAND; c_token++) if (almost_equals(c_token, "w$ith")) break; if (!END_OF_COMMAND) plot_style = get_style(); else plot_style = LINES; c_token = c_token_copy; /* Determine index. */ for (ps_index = 0; ps_index < sizeof(default_style_cols)/sizeof(default_style_cols[0]); ps_index++) { if (default_style_cols[ps_index].plot_style == plot_style) break; } if (ps_index == sizeof(default_style_cols)/sizeof(default_style_cols[0])) int_error(c_token_copy, nothing_known); /* Matrix format is interpretted as always having three columns. */ if (df_matrix_file) { if (df_no_bin_cols > 3) int_error(NO_CARET, "Matrix data contains only three columns"); df_extend_binary_columns(3); } /* If nothing has been done to set the using specs, use the default using * characteristics for the style. */ if (!df_no_use_specs) { if (!df_matrix_file) { int no_cols = default_style_cols[ps_index].excluding_gen_coords; if (!no_cols) int_error(c_token_copy, nothing_known); /* If coordinates are generated, make sure this plot style allows it. * Otherwise, add in the number of generated coordinates and add an * extra column if using `splot`. */ if (df_num_bin_records && df_bin_record[0].scan_generate_coord) { if (default_style_cols[ps_index].dimen_in_2d == 0) int_error(c_token_copy, "Cannot generate coords for that plot style"); } else { /* If there aren't generated coordinates, then add the * amount of columns that would be generated. */ no_cols += default_style_cols[ps_index].dimen_in_2d; if (df_plot_mode == MODE_SPLOT) no_cols++; } assert(no_cols <= MAXDATACOLS); /* Nothing need be done here to set the using specs because they * will have been initialized appropriately and left unaltered. * So just set the number of specs. */ df_no_use_specs = no_cols; df_extend_binary_columns(no_cols); } else { /* Number of columns is fixed at three and no using specs given. Do what we can. * The obvious best combination is two dimensional coordinates and one information * value. One wonders what to do if a matrix is only one column; can be treated * as linear? This isn't implemented here, but if it were, this is where it * should go. */ if ((default_style_cols[ps_index].dimen_in_2d == 2) && (default_style_cols[ps_index].excluding_gen_coords == 1)) { df_no_use_specs = 3; } else if ((default_style_cols[ps_index].dimen_in_2d == 1) && (default_style_cols[ps_index].excluding_gen_coords == 1) ) { if (df_plot_mode == MODE_SPLOT) df_no_use_specs = 3; else { /* Command: plot 'foo' matrix with no using spec */ /* Matix element treated as y value rather than z value */ df_no_use_specs = 2; use_spec[1].column = 3; } } else int_error(NO_CARET, "Plot style does not conform to three column data in this graph mode"); } } if (df_num_bin_records && df_bin_record[0].scan_generate_coord && !df_matrix_file) { int i; struct use_spec_s original_use_spec[MAXDATACOLS]; int added_columns = 0; /* Keep record of the original using specs. */ memcpy(original_use_spec, use_spec, sizeof(use_spec)); /* Put in columns at front for generated variables. */ for (i = 0; i < 3; i++) { if (df_bin_record[0].cart_dim[i] || df_bin_record[0].scan_dim[i]) added_columns++; else break; } if ((df_no_use_specs + added_columns) >= MAXDATACOLS) int_error(NO_CARET, too_many_cols_msg); else { /* Shift the original columns over by added number of columns, but only * if not matrix data. */ memcpy(&use_spec[added_columns], original_use_spec, df_no_use_specs*sizeof(use_spec[0])); /* The at portion is set to NULL here, but this doesn't mash * a valid memory pointer because any valid memory pointers * were copied to new locations in the previous memcpy(). */ for (i = 0; i < added_columns; i++) { use_spec[i].column = df_bin_record[0].cart_scan[i]; use_spec[i].at = NULL; /* Not a bad memory pointer overwrite!! */ } df_no_use_specs += added_columns; /* Do not extend columns for generated coordinates. */ } if (df_plot_mode == MODE_SPLOT) { /* For binary data having an implied uniformly sampled grid, treat * less than three-dimensional data in special ways based upon what * is being plotted. */ int k; for (k = 0; k < df_num_bin_records; k++) { if ((df_bin_record[k].cart_dim[2] == 0) && (df_bin_record[k].scan_dim[2] == 0)) { if (default_style_cols[ps_index].dimen_in_2d > 2) int_error(NO_CARET, "Plot style requires higher than two-dimensional sampling array"); else { if ((df_bin_record[k].cart_dim[1] == 0) && (df_bin_record[k].scan_dim[1] == 0)) { if (default_style_cols[ps_index].dimen_in_2d > 1) int_error(NO_CARET, "Plot style requires higher than one-dimensional sampling array"); else { /* Place a special marker in the using list to derive the y value * from the second dimensional counter. */ df_insert_scanned_use_spec(1); } } /* Place a special marker in the using list to derive the z value * from the third dimensional counter. */ df_insert_scanned_use_spec(2); } } } } } } char *equal_symbol_msg = "Equal ('=') symbol required"; static void plot_option_binary(TBOOLEAN set_matrix, TBOOLEAN set_default) { TBOOLEAN duplication = FALSE; TBOOLEAN set_record = FALSE; TBOOLEAN set_array = FALSE, set_dx = FALSE, set_dy = FALSE, set_dz = FALSE; TBOOLEAN set_center = FALSE, set_origin = FALSE, set_skip = FALSE, set_endian = FALSE; TBOOLEAN set_rotation = FALSE, set_perpendicular = FALSE; TBOOLEAN set_flip = FALSE, set_noflip = FALSE; TBOOLEAN set_flipx = FALSE, set_flipy = FALSE, set_flipz = FALSE; TBOOLEAN set_scan = FALSE; TBOOLEAN set_format = FALSE; /* Binary file type must be the first word in the command following `binary`" */ if (df_bin_filetype_default >= 0) df_bin_filetype = df_bin_filetype_default; if (almost_equals(c_token, "file$type") || (df_bin_filetype >= 0)) { int i; char file_ext[8] = {'\0','\0','\0','\0','\0','\0','\0','\0'}; /* Above keyword not part of pre-existing binary definition. * So use general binary. */ if (set_matrix) int_error(c_token, matrix_general_binary_conflict_msg); df_matrix_file = FALSE; if (almost_equals(c_token, "file$type")) { if (!equals(++c_token, "=")) int_error(c_token, equal_symbol_msg); copy_str(file_ext, ++c_token, 8); for (i=0; df_bin_filetype_table[i].key; i++) if (!strcasecmp(file_ext, df_bin_filetype_table[i].key)) { binary_input_function = df_bin_filetype_table[i].value; df_bin_filetype = i; break; } if (df_bin_filetype != i) /* Maybe set to "auto" and continue? */ int_error(c_token, "Unrecognized filetype; try \"show datafile binary filetypes\""); c_token++; } if (df_plot_mode != MODE_QUERY && !strcmp("auto", df_bin_filetype_table[df_bin_filetype].key)) { int i; char *file_ext = strrchr(df_filename, '.'); if (file_ext++) { for (i=0; df_bin_filetype_table[i].key; i++) if (!strcasecmp(file_ext, df_bin_filetype_table[i].key)) binary_input_function = df_bin_filetype_table[i].value; } if (binary_input_function == auto_filetype_function) int_error(NO_CARET, "Unrecognized filetype; try \"show datafile binary filetypes\""); } /* Unless only querying settings, call the routine to prep binary data parameters. */ if (df_plot_mode != MODE_QUERY) (*binary_input_function)(); /* Now, at this point anything that was filled in for "scan" should * override the "cart" variables. */ for (i=0; i < df_num_bin_records; i++) { int j; /* Dimension */ if (df_bin_record[i].scan_dim[0] != df_bin_record_reset.scan_dim[0]) for (j=0; j < 3; j++) df_bin_record[i].cart_dim[j] = 0; /* Delta */ for (j=0; j < 3; j++) if (df_bin_record[i].scan_delta[j] != 0.0) { int k; for (k=0; k < 3; k++) if (df_bin_record[i].cart_scan[k] == (DF_SCAN_POINT - j)) df_bin_record[i].cart_delta[k] = 0; } /* Translation */ if (df_bin_record[i].scan_trans != DF_TRANSLATE_DEFAULT) df_bin_record[i].cart_trans = DF_TRANSLATE_DEFAULT; } } while (!END_OF_COMMAND) { char origin_and_center_conflict_message[] = "Can specify `origin` or `center`, but not both"; /* look for record */ if (almost_equals(c_token, "rec$ord")) { if (set_record) { duplication=TRUE; break; } c_token++; /* Above keyword not part of pre-existing binary definition. So use general binary. */ if (set_matrix) int_error(c_token, matrix_general_binary_conflict_msg); df_matrix_file = FALSE; plot_option_array(); set_record = TRUE; continue; } /* look for array */ if (almost_equals(c_token, "arr$ay")) { if (set_array) { duplication=TRUE; break; } c_token++; /* Above keyword not part of pre-existing binary definition. So use general binary. */ if (set_matrix) int_error(c_token, matrix_general_binary_conflict_msg); df_matrix_file = FALSE; plot_option_array(); {int i; for (i = 0; i < df_num_bin_records; i++) df_bin_record[i].scan_generate_coord = TRUE; /* Indicate that coordinate info should be generated by gnuplot code. */ } set_array = TRUE; continue; } /* deal with spacing between array points */ if (equals(c_token, "dx") || equals(c_token, "dt")) { if (set_dx) { duplication=TRUE; break; } c_token++; plot_option_multivalued(DF_DELTA, 0); if (!set_dy) { int i; for (i = 0; i < df_num_bin_records; i++) df_bin_record[i].cart_delta[1] = df_bin_record[i].cart_delta[0]; } if (!set_dz) { int i; for (i = 0; i < df_num_bin_records; i++) df_bin_record[i].cart_delta[2] = df_bin_record[i].cart_delta[0]; } set_dx = TRUE; continue; } if (equals(c_token, "dy") || equals(c_token, "dr")) { if (set_dy) { duplication=TRUE; break; } if (!set_array && !df_bin_record) int_error(c_token, "Must specify a sampling array size before indicating spacing in second dimension"); c_token++; plot_option_multivalued(DF_DELTA, 1); if (!set_dz) { int i; for (i = 0; i < df_num_bin_records; i++) df_bin_record[i].cart_delta[2] = df_bin_record[i].cart_delta[1]; } set_dy = TRUE; continue; } if (equals(c_token, "dz")) { int_error(c_token, "Currently not supporting three-dimensional sampling"); if (set_dz) { duplication=TRUE; break; } if (!set_array && !df_bin_record) int_error(c_token, "Must specify a sampling array size before indicating spacing in third dimension"); c_token++; plot_option_multivalued(DF_DELTA, 2); set_dz = TRUE; continue; } /* deal with direction in which sampling increments */ if (equals(c_token, "flipx")) { if (set_flipx) { duplication=TRUE; break; } c_token++; /* If no equal sign, then set flip true for all records. */ if (!equals(c_token, "=")) { int i; for (i = 0; i < df_num_bin_records; i++) df_bin_record[i].cart_dir[0] = -1; } else { plot_option_multivalued(DF_FLIP_AXIS, 0); } set_flipx = TRUE; continue; } if (equals(c_token, "flipy")) { if (set_flipy) { duplication=TRUE; break; } if (!set_array && !df_bin_record) int_error(c_token, "Must specify a sampling array size before indicating flip in second dimension"); c_token++; /* If no equal sign, then set flip true for all records. */ if (!equals(c_token, "=")) { int i; for (i = 0; i < df_num_bin_records; i++) df_bin_record[i].cart_dir[1] = -1; } else { plot_option_multivalued(DF_FLIP_AXIS, 1); } set_flipy = TRUE; continue; } if (equals(c_token, "flipz")) { int_error(c_token, "Currently not supporting three-dimensional sampling"); if (set_flipz) { duplication=TRUE; break; } if (!set_array && !df_bin_record) int_error(c_token, "Must specify a sampling array size before indicating spacing in third dimension"); c_token++; /* If no equal sign, then set flip true for all records. */ if (!equals(c_token, "=")) { int i; for (i=0; i < df_num_bin_records; i++) df_bin_record[i].cart_dir[2] = -1; } else { plot_option_multivalued(DF_FLIP_AXIS, 2); } set_flipz = TRUE; continue; } /* Deal with flipping data for individual records. */ if (equals(c_token, "flip")) { if (set_flip) { duplication=TRUE; break; } c_token++; plot_option_multivalued(DF_FLIP, -1); set_flip = TRUE; continue; } /* Deal with flipping data for individual records. */ if (equals(c_token, "noflip")) { if (set_noflip) { duplication=TRUE; break; } c_token++; plot_option_multivalued(DF_FLIP, 1); set_noflip = TRUE; continue; } /* Deal with manner in which dimensions are scanned from file. */ if (equals(c_token, "scan")) { if (set_scan) { duplication=TRUE; break; } c_token++; plot_option_multivalued(DF_SCAN, 0); set_scan = TRUE; continue; } /* Deal with manner in which dimensions are scanned from file. */ if (almost_equals(c_token, "trans$pose")) { int i; if (set_scan) { duplication=TRUE; break; } c_token++; for (i=0; i < df_num_bin_records; i++) memcpy(df_bin_record[i].cart_scan, df_bin_scan_table_2D[TRANSPOSE_INDEX].scan, sizeof(df_bin_record[0].cart_scan)); set_scan = TRUE; continue; } /* deal with origin */ if (almost_equals(c_token, "orig$in")) { if (set_center) int_error(c_token, origin_and_center_conflict_message); if (set_origin) { duplication=TRUE; break; } c_token++; plot_option_multivalued(DF_ORIGIN, df_plot_mode); set_origin = TRUE; continue; } /* deal with origin */ if (almost_equals(c_token, "cen$ter")) { if (set_origin) int_error(c_token, origin_and_center_conflict_message); if (set_center) { duplication=TRUE; break; } c_token++; plot_option_multivalued(DF_CENTER, df_plot_mode); set_center = TRUE; continue; } /* deal with rotation angle */ if (almost_equals(c_token, "rot$ation") || almost_equals(c_token, "rot$ate")) { if (set_rotation) { duplication=TRUE; break; } c_token++; plot_option_multivalued(DF_ROTATION, 0); set_rotation = TRUE; continue; } /* deal with rotation angle */ if (almost_equals(c_token, "perp$endicular")) { if (df_plot_mode == MODE_PLOT) int_error(c_token, "Key word `perpendicular` is not allowed with `plot` command"); if (set_perpendicular) { duplication=TRUE; break; } c_token++; plot_option_multivalued(DF_PERPENDICULAR, 0); set_perpendicular = TRUE; continue; } /* deal with number of bytes to skip before record */ if (almost_equals(c_token, "skip")) { if (set_skip) { duplication=TRUE; break; } c_token++; plot_option_multivalued(DF_SKIP, 0); set_skip = TRUE; continue; } /* deal with byte order */ if (almost_equals(c_token, "end$ian")) { if (set_endian) { duplication=TRUE; break; } c_token++; /* Require equal symbol. */ if (!equals(c_token, "=")) int_error(c_token, equal_symbol_msg); c_token++; if (almost_equals(c_token, "def$ault")) df_bin_file_endianess = THIS_COMPILER_ENDIAN; else if (equals(c_token, "swap") || equals(c_token, "swab")) df_bin_file_endianess = (~df_bin_file_endianess)&3; /* complement and isolate lowest two bits */ else if (almost_equals(c_token, "lit$tle")) df_bin_file_endianess = DF_LITTLE_ENDIAN; else if (equals(c_token, "big")) df_bin_file_endianess = DF_BIG_ENDIAN; #if SUPPORT_MIDDLE_ENDIAN else if (almost_equals(c_token, "mid$dle") || equals(c_token, "pdp")) df_bin_file_endianess = DF_PDP_ENDIAN; else int_error(c_token, "Options are default, swap (swab), little, big, middle (pdp)"); #else else int_error(c_token, "Options are default, swap (swab), little, big"); #endif c_token++; set_endian = TRUE; continue; } /* deal with various types of binary files */ if (almost_equals(c_token, "form$at")) { if (set_format) { duplication=TRUE; break; } c_token++; /* Format string not part of pre-existing binary definition. So use general binary. */ if (set_matrix) int_error(c_token, matrix_general_binary_conflict_msg); df_matrix_file = FALSE; /* Require equal sign */ if (!equals(c_token, "=")) int_error(c_token, equal_symbol_msg); c_token++; if (set_default) { free(df_binary_format); df_binary_format = try_to_get_string(); } else { char *format_string = try_to_get_string(); if (!format_string) int_error(c_token, "missing format string"); plot_option_binary_format(format_string); free(format_string); } set_format = TRUE; continue; } break; /* unknown option */ } /* while (!END_OF_COMMAND) */ if (duplication) int_error(c_token, "Duplicated or contradicting arguments in datafile options"); if (!set_default && !set_matrix && df_num_bin_records_default) { int_warn(NO_CARET, "using default binary record/array structure"); } if (!set_format && !df_matrix_file) { if (df_binary_format) { plot_option_binary_format(df_binary_format); int_warn(NO_CARET, "using default binary format"); } } } void df_add_binary_records(int num_records_to_add, df_records_type records_type) { int i; int new_number; df_binary_file_record_struct **bin_record; int *num_bin_records; int *max_num_bin_records; if (records_type == DF_CURRENT_RECORDS) { bin_record = &df_bin_record; num_bin_records = &df_num_bin_records; max_num_bin_records = &df_max_num_bin_records; } else { bin_record = &df_bin_record_default; num_bin_records = &df_num_bin_records_default; max_num_bin_records = &df_max_num_bin_records_default; } new_number = *num_bin_records + num_records_to_add; if (new_number > *max_num_bin_records) { *bin_record = gp_realloc(*bin_record, new_number * sizeof(df_binary_file_record_struct), "binary file data records"); if (!*bin_record) { *max_num_bin_records = 0; int_error(c_token, "Error assigning memory for binary file data records"); } *max_num_bin_records = new_number; } for (i = 0; i < num_records_to_add; i++) { memcpy(*bin_record + *num_bin_records, &df_bin_record_reset, sizeof(df_binary_file_record_struct)); (*num_bin_records)++; } } static void clear_binary_records(df_records_type records_type) { df_binary_file_record_struct *temp_bin_record; int *temp_num_bin_records; int i; if (records_type == DF_CURRENT_RECORDS) { temp_bin_record = df_bin_record; temp_num_bin_records = &df_num_bin_records; } else { temp_bin_record = df_bin_record_default; temp_num_bin_records = &df_num_bin_records_default; } for (i = 0; i < *temp_num_bin_records; i++) { if (temp_bin_record[i].memory_data != NULL) { free(temp_bin_record[i].memory_data); temp_bin_record[i].memory_data = NULL; } } *temp_num_bin_records = 0; } /* * Syntax is: array=(xdim,ydim):(xdim,ydim):CONST:(xdim) etc */ static void plot_option_array(void) { int number_of_records = 0; if (!equals(c_token, "=")) int_error(c_token, equal_symbol_msg); clear_binary_records(DF_CURRENT_RECORDS); do { c_token++; /* Partial backward compatibility with syntax up to 4.2.4 */ if (isanumber(c_token)) { if (++number_of_records > df_num_bin_records) df_add_binary_records(1, DF_CURRENT_RECORDS); df_bin_record[df_num_bin_records - 1].cart_dim[0] = int_expression(); /* Handle the old syntax: array=123x456 */ if (!END_OF_COMMAND) { char xguy[8]; int itmp=0; copy_str(xguy, c_token, 6); if (xguy[0] == 'x') { sscanf(&xguy[1],"%d",&itmp); df_bin_record[df_num_bin_records - 1].cart_dim[1] = itmp; c_token++; } } } else if (equals(c_token, "(")) { c_token++; if (++number_of_records > df_num_bin_records) df_add_binary_records(1, DF_CURRENT_RECORDS); df_bin_record[df_num_bin_records - 1].cart_dim[0] = int_expression(); if (equals(c_token, ",")) { c_token++; df_bin_record[df_num_bin_records - 1].cart_dim[1] = int_expression(); } if (!equals(c_token, ")")) int_error(c_token, "tuple syntax error"); c_token++; } } while (equals(c_token, ":")); } /* Evaluate a tuple of up to specified dimension. */ #define TUPLE_SEPARATOR_CHAR ":" #define LEFT_TUPLE_CHAR "(" #define RIGHT_TUPLE_CHAR ")" int token2tuple(double *tuple, int dimension) { if (equals(c_token, LEFT_TUPLE_CHAR)) { TBOOLEAN expecting_number = TRUE; int N = 0; c_token++; while (!END_OF_COMMAND) { if (expecting_number) { if (++N <= dimension) *tuple++ = real_expression(); else int_error(c_token-1, "More than %d elements", N); expecting_number = FALSE; } else if (equals(c_token, ",")) { c_token++; expecting_number = TRUE; } else if (equals(c_token, RIGHT_TUPLE_CHAR)) { c_token++; return N; } else int_error(c_token, "Expecting ',' or '" RIGHT_TUPLE_CHAR "'"); } } /* Not a tuple */ return 0; } /* Determine the 2D rotational matrix from the "rotation" qualifier. */ void plot_option_multivalued(df_multivalue_type type, int arg) { int bin_record_count = 0; int test_val; /* Require equal symbol. */ if (!equals(c_token, "=")) int_error(c_token, equal_symbol_msg); c_token++; while (!END_OF_COMMAND) { double tuple[3]; switch (type) { case DF_ORIGIN: case DF_CENTER: case DF_PERPENDICULAR: test_val = token2tuple(tuple, sizeof(tuple)/sizeof(tuple[0])); break; case DF_SCAN: case DF_FLIP: /* Will check later */ test_val = 1; break; default: { /* Check if a valid number. */ tuple[0] = real_expression(); test_val = 1; } } if (test_val) { char const * cannot_flip_msg = "Cannot flip a non-existent dimension"; char flip_list[4]; if (bin_record_count >= df_num_bin_records) int_error(c_token, "More parameters specified than data records specified"); switch (type) { case DF_DELTA: /* Set the spacing between grid points in the * specified dimension. */ *(df_bin_record[bin_record_count].cart_delta + arg) = tuple[0]; if (df_bin_record[bin_record_count].cart_delta[arg] <= 0) int_error(c_token - 2, "Sample period must be positive. Try `flip` for changing direction"); break; case DF_FLIP_AXIS: /* Set the direction of grid points increment in * the specified dimension. */ if (df_bin_record[bin_record_count].cart_dim[0] != 0) { if (tuple[0] == 0.0) df_bin_record[bin_record_count].cart_dir[arg] = 0; else if (tuple[0] == 1.0) df_bin_record[bin_record_count].cart_dir[arg] = 1; else int_error(c_token-1, "Flipping dimension direction must be 1 or 0"); } else int_error(c_token, cannot_flip_msg); break; case DF_FLIP: /* Set the direction of grid points increment in * based upon letters for axes. Check if there are * any characters in string that shouldn't be. */ copy_str(flip_list, c_token, 4); if (strlen(flip_list) != strspn(flip_list, "xXyYzZ")) int_error(c_token, "Can only flip x, y, and/or z"); /* Check for valid dimensions. */ if (strpbrk(flip_list, "xX")) { if (df_bin_record[bin_record_count].cart_dim[0] != 0) df_bin_record[bin_record_count].cart_dir[0] = arg; else int_error(c_token, cannot_flip_msg); } if (strpbrk(flip_list, "yY")) { if (df_bin_record[bin_record_count].cart_dim[1] != 0) df_bin_record[bin_record_count].cart_dir[1] = arg; else int_error(c_token, cannot_flip_msg); } if (strpbrk(flip_list, "zZ")) { if (df_bin_record[bin_record_count].cart_dim[2] != 0) df_bin_record[bin_record_count].cart_dir[2] = arg; else int_error(c_token, cannot_flip_msg); } c_token++; break; case DF_SCAN: { /* Set the method in which data is scanned from * file. Compare against a set number of strings. */ int i; if (!(df_bin_record[bin_record_count].cart_dim[0] || df_bin_record[bin_record_count].scan_dim[0]) || !(df_bin_record[bin_record_count].cart_dim[1] || df_bin_record[bin_record_count].scan_dim[1])) int_error(c_token, "Cannot alter scanning method for one-dimensional data"); else if (df_bin_record[bin_record_count].cart_dim[2] || df_bin_record[bin_record_count].scan_dim[2]) { for (i = 0; i < sizeof(df_bin_scan_table_3D) /sizeof(df_bin_scan_table_3D_struct); i++) if (equals(c_token, df_bin_scan_table_3D[i].string)) { memcpy(df_bin_record[bin_record_count].cart_scan, df_bin_scan_table_3D[i].scan, sizeof(df_bin_record[0].cart_scan)); break; } if (i == sizeof(df_bin_scan_table_3D) / sizeof(df_bin_scan_table_3D_struct)) int_error(c_token, "Improper scanning string. Try 3 character string for 3D data"); } else { for (i = 0; i < sizeof(df_bin_scan_table_2D) /sizeof(df_bin_scan_table_2D_struct); i++) if (equals(c_token, df_bin_scan_table_2D[i].string)) { memcpy(df_bin_record[bin_record_count].cart_scan, df_bin_scan_table_2D[i].scan, sizeof(df_bin_record[0].cart_scan)); break; } if (i == sizeof(df_bin_scan_table_2D) / sizeof(df_bin_scan_table_2D_struct)) int_error(c_token, "Improper scanning string. Try 2 character string for 2D data"); } /* Remove the file supplied scan direction. */ memcpy(df_bin_record[bin_record_count].scan_dir, df_bin_record_reset.scan_dir, sizeof(df_bin_record[0].scan_dir)); c_token++; break; } case DF_SKIP: /* Set the number of bytes to skip before reading * record. */ df_bin_record[bin_record_count].scan_skip[0] = tuple[0]; if ((df_bin_record[bin_record_count].scan_skip[0] != tuple[0]) || (df_bin_record[bin_record_count].scan_skip[0] < 0)) int_error(c_token, "Number of bytes to skip must be positive integer"); break; case DF_ORIGIN: case DF_CENTER: /* Set the origin or center of the image based upon * the plot mode. */ if (type == DF_ORIGIN) df_bin_record[bin_record_count].cart_trans = DF_TRANSLATE_VIA_ORIGIN; else df_bin_record[bin_record_count].cart_trans = DF_TRANSLATE_VIA_CENTER; if (arg == MODE_PLOT) { if (test_val != 2) int_error(c_token, "Two-dimensional tuple required for 2D plot"); tuple[2] = 0.0; } else if (arg == MODE_SPLOT) { if (test_val != 3) int_error(c_token, "Three-dimensional tuple required for 3D plot"); } else if (arg == MODE_QUERY) { if (test_val != 3) int_error(c_token, "Three-dimensional tuple required for setting binary parameters"); } else { int_error(c_token, "Internal error (datafile.c): Unknown plot mode"); } memcpy(df_bin_record[bin_record_count].cart_cen_or_ori, tuple, sizeof(tuple)); break; case DF_ROTATION: /* Allow user to enter angle in terms of pi or degrees. */ if (equals(c_token, "pi")) { tuple[0] *= M_PI; c_token++; } else if (almost_equals(c_token, "d$egrees")) { tuple[0] *= M_PI/180; c_token++; } /* Construct 2D rotation matrix. */ df_bin_record[bin_record_count].cart_alpha = tuple[0]; break; case DF_PERPENDICULAR: /* Make sure in three dimensional plotting mode before * accepting the perpendicular vector for translation. */ if (test_val != 3) int_error(c_token, "Three-dimensional tuple required"); /* Compare vector length against variable precision * to determine if this is the null vector */ if ((tuple[0]*tuple[0] + tuple[1]*tuple[1] + tuple[2]*tuple[2]) < 100.*DBL_EPSILON) int_error(c_token, "Perpendicular vector cannot be zero"); memcpy(df_bin_record[bin_record_count].cart_p, tuple, sizeof(tuple)); break; default: int_error(NO_CARET, "Internal error: Invalid comma separated type"); } /* switch() */ } else { int_error(c_token, "Invalid numeric or tuple form"); } if (equals(c_token, TUPLE_SEPARATOR_CHAR)) { bin_record_count++; c_token++; } else break; } /* while(!EOC) */ return; } /* Set the 'bytes' to skip before column 'col'. */ void df_set_skip_before(int col, int bytes) { assert(col > 0); /* Check if we have room at least col columns */ if (col > df_max_bininfo_cols) { df_column_bininfo = gp_realloc(df_column_bininfo, col * sizeof(df_column_bininfo_struct), "datafile columns binary information"); df_max_bininfo_cols = col; } df_column_bininfo[col-1].skip_bytes = bytes; } /* Set the column data type. */ void df_set_read_type(int col, df_data_type type) { assert(col > 0); /* Check if we have room at least col columns */ if (col > df_max_bininfo_cols) { df_column_bininfo = gp_realloc(df_column_bininfo, col * sizeof(df_column_bininfo_struct), "datafile columns binary information"); df_max_bininfo_cols = col; } df_column_bininfo[col-1].column.read_type = type; df_column_bininfo[col-1].column.read_size = df_binary_details[type].type.read_size; } /* Get the column data type. */ df_data_type df_get_read_type(int col) { assert(col > 0); /* Check if we have room at least col columns */ if (col < df_max_bininfo_cols) return(df_column_bininfo[col].column.read_type); else return -1; } /* Get the binary column data size. */ int df_get_read_size(int col) { assert(col > 0); /* Check if we have room at least col columns */ if (col < df_max_bininfo_cols) return(df_column_bininfo[col].column.read_size); else return -1; } /* If the column number is greater than number of binary columns, set * the unitialized columns binary info to that of the last specified * column or the default if none were set. */ void df_extend_binary_columns(int no_cols) { if (no_cols > df_no_bin_cols) { int i; df_data_type type; if (df_no_bin_cols > 0) type = df_column_bininfo[df_no_bin_cols-1].column.read_type; else type = DF_DEFAULT_TYPE; for (i = no_cols; i > df_no_bin_cols; i--) { df_set_skip_after(i, 0); df_set_read_type(i, type); } df_no_bin_cols = no_cols; } } /* Determine binary data widths from the `using` (or `binary`) format * specification. */ void plot_option_binary_format(char *format_string) { int prev_read_type = DF_DEFAULT_TYPE; /* Defaults when none specified. */ int no_fields = 0; char *substr = format_string; while (*substr != '\0' && *substr != '\"' && *substr != '\'') { if (*substr == ' ') { substr++; continue; } /* Ignore spaces. */ if (*substr == '%') { int ignore, field_repeat, j=0, k=0, m=0, breakout; substr++; ignore = (*substr == '*'); if(ignore) substr++; /* Check for field repeat number. */ field_repeat = isdigit(*substr) ? strtol(substr, &substr, 10) : 1; /* Try finding the word among the valid type names. */ for (j = 0, breakout = 0; j < (sizeof(df_binary_tables) /sizeof(df_binary_tables[0])); j++) { for (k = 0, breakout = 0; k < df_binary_tables[j].group_length; k++) { for (m = 0; m < df_binary_tables[j].group[k].no_names; m++) { int strl = strlen(df_binary_tables[j].group[k].name[m]); /* Check for exact match, which includes character * after the substring being non-alphanumeric. */ if (!strncmp(substr, df_binary_tables[j].group[k].name[m], strl) && strchr("%\'\" ", *(substr + strl)) ) { substr += strl; /* Advance pointer in array to next text. */ if (!ignore) { int n; for (n = 0; n < field_repeat; n++) { no_fields++; df_set_skip_after(no_fields, 0); df_set_read_type(no_fields, df_binary_tables[j].group[k].type.read_type); prev_read_type = df_binary_tables[j].group[k].type.read_type; } } else { if (!df_column_bininfo) int_error(NO_CARET,"Failure in binary table initialization"); df_column_bininfo[no_fields].skip_bytes += field_repeat * df_binary_tables[j].group[k].type.read_size; } breakout = 1; break; } } if (breakout) break; } if (breakout) break; } if (j == (sizeof(df_binary_tables) /sizeof(df_binary_tables[0])) && (k == df_binary_tables[j-1].group_length) && (m == df_binary_tables[j-1].group[k-1].no_names)) { int_error(c_token, "Unrecognized binary format specification"); } } else { int_error(c_token, "Format specifier must begin with '%'"); } } /* Any remaining unspecified fields are assumed to be of the same type * as the last specified field. */ for ( ; no_fields < df_no_bin_cols; no_fields++) { df_set_skip_after(no_fields, 0); df_set_skip_before(no_fields, 0); df_set_read_type(no_fields, prev_read_type); } df_no_bin_cols = no_fields; } void df_show_binary(FILE *fp) { int i, num_record; df_binary_file_record_struct *bin_record; fprintf(fp, "\tDefault binary data file settings (in-file settings may override):\n"); if (!df_num_bin_records_default) { bin_record = &df_bin_record_reset; num_record = 1; } else { bin_record = df_bin_record_default; num_record = df_num_bin_records_default; } fprintf(fp, "\n\t File Type: "); if (df_bin_filetype_default >= 0) fprintf(fp, "%s", df_bin_filetype_table[df_bin_filetype_default].key); else fprintf(fp, "none"); fprintf(fp, "\n\t File Endianness: %s", df_endian[df_bin_file_endianess_default]); fprintf(fp, "\n\t Default binary format: %s", df_binary_format ? df_binary_format : "none"); for (i = 0; i < num_record; i++) { int dimension = 1; fprintf(fp, "\n\t Record %d:\n", i); fprintf(fp, "\t Dimension: "); if (bin_record[i].cart_dim[0] < 0) fprintf(fp, "Inf"); else { fprintf(fp, "%d", bin_record[i].cart_dim[0]); if (bin_record[i].cart_dim[1] > 0) { dimension = 2; fprintf(fp, "x%d", bin_record[i].cart_dim[1]); if (bin_record[i].cart_dim[2] > 0) { dimension = 3; fprintf(fp, "x%d", bin_record[i].cart_dim[2]); } } } fprintf(fp, "\n\t Generate coordinates: %s", (bin_record[i].scan_generate_coord ? "yes" : "no")); if (bin_record[i].scan_generate_coord) { int j; TBOOLEAN no_flip = TRUE; fprintf(fp, "\n\t Direction: "); if (bin_record[i].cart_dir[0] == -1) { fprintf(fp, "flip x"); no_flip = FALSE; } if ((dimension > 1) && (bin_record[i].cart_dir[1] == -1)) { fprintf(fp, "%sflip y", (no_flip ? "" : ", ")); no_flip = FALSE; } if ((dimension > 2) && (bin_record[i].cart_dir[2] == -1)) { fprintf(fp, "%sflip z", (no_flip ? "" : ", ")); no_flip = FALSE; } if (no_flip) fprintf(fp, "all forward"); fprintf(fp, "\n\t Sample periods: dx=%f", bin_record[i].cart_delta[0]); if (dimension > 1) fprintf(fp, ", dy=%f", bin_record[i].cart_delta[1]); if (dimension > 2) fprintf(fp, ", dz=%f", bin_record[i].cart_delta[2]); if (bin_record[i].cart_trans == DF_TRANSLATE_VIA_ORIGIN) fprintf(fp, "\n\t Origin:"); else if (bin_record[i].cart_trans == DF_TRANSLATE_VIA_CENTER) fprintf(fp, "\n\t Center:"); if ((bin_record[i].cart_trans == DF_TRANSLATE_VIA_ORIGIN) || (bin_record[i].cart_trans == DF_TRANSLATE_VIA_CENTER)) fprintf(fp, " (%f, %f, %f)", bin_record[i].cart_cen_or_ori[0], bin_record[i].cart_cen_or_ori[1], bin_record[i].cart_cen_or_ori[2]); fprintf(fp, "\n\t 2D rotation angle: %f", bin_record[i].cart_alpha); fprintf(fp, "\n\t 3D normal vector: (%f, %f, %f)", bin_record[i].cart_p[0], bin_record[i].cart_p[1], bin_record[i].cart_p[2]); for (j = 0; j < (sizeof(df_bin_scan_table_3D) /sizeof(df_bin_scan_table_3D[0])); j++) { if (!strncmp((char *)bin_record[i].cart_scan, (char *)df_bin_scan_table_3D[j].scan, sizeof(bin_record[0].cart_scan)) ) { fprintf(fp, "\n\t Scan: "); fprintf(fp, (bin_record[i].cart_dim[2] ? "%s" : "%2.2s"), df_bin_scan_table_3D[j].string); break; } } fprintf(fp, "\n\t Skip bytes: %d before record", bin_record[i].scan_skip[0]); if (dimension > 1) fprintf(fp, ", %d before line", bin_record[i].scan_skip[1]); if (dimension > 2) fprintf(fp, ", %d before plane", bin_record[i].scan_skip[2]); } fprintf(fp, "\n"); } } void df_show_datasizes(FILE *fp) { int i; fprintf(fp,"\tThe following binary data sizes are machine dependent:\n\n" "\t name (size in bytes)\n\n"); for (i = 0; i < sizeof(df_binary_details)/sizeof(df_binary_details[0]); i++) { int j; fprintf(fp,"\t "); for (j = 0; j < df_binary_details[i].no_names; j++) { fprintf(fp,"\"%s\" ",df_binary_details[i].name[j]); } fprintf(fp,"(%d)\n",df_binary_details[i].type.read_size); } fprintf(fp,"\n\ \tThe following binary data sizes attempt to be machine independent:\n\n\ \t name (size in bytes)\n\n"); for (i = 0; i < sizeof(df_binary_details_independent) /sizeof(df_binary_details_independent[0]); i++) { int j; fprintf(fp,"\t "); for (j = 0; j < df_binary_details_independent[i].no_names; j++) { fprintf(fp,"\"%s\" ",df_binary_details_independent[i].name[j]); } fprintf(fp,"(%d)",df_binary_details_independent[i].type.read_size); if (df_binary_details_independent[i].type.read_type == DF_BAD_TYPE) fprintf(fp," -- processor does not support this size"); fputc('\n', fp); } } void df_show_filetypes(FILE *fp) { int i = 0; fprintf(fp,"\tThis version of gnuplot understands the following binary file types:\n"); while (df_bin_filetype_table[i].key) fprintf(fp, "\t %s", df_bin_filetype_table[i++].key); fputs("\n",fp); } void df_swap_bytes_by_endianess(char *data, int read_order, int read_size) { if ((read_order == DF_3210) #if SUPPORT_MIDDLE_ENDIAN || (read_order == DF_2301) #endif ) { int j = 0; int k = read_size - 1; for (; j < k; j++, k--) { char temp = data[j]; data[j] = data[k]; data[k] = temp; } } #if SUPPORT_MIDDLE_ENDIAN if ((read_order == DF_1032) || (read_order == DF_2301)) { int j= read_size - 1; for (; j > 0; j -= 2) { char temp = data[j-1]; data[j-1] = data[j]; data[j] = temp; } } #endif } static int df_skip_bytes(int nbytes) { #if defined(PIPES) char cval; if (df_pipe_open || plotted_data_from_stdin) { while (nbytes--) { if (1 == fread(&cval, 1, 1, data_fp)) continue; if (feof(data_fp)) { df_eof = 1; return DF_EOF; } int_error(NO_CARET, read_error_msg); } } else #endif if (fseek(data_fp, nbytes, SEEK_CUR)) { if (feof(data_fp)) { df_eof = 1; return DF_EOF; } int_error(NO_CARET, read_error_msg); } return 0; } /*{{{ int df_readbinary(v, max) */ /* do the hard work... read lines from file, * - use blanks to get index number * - ignore lines outside range of indices required * - fill v[] based on using spec if given */ int df_readbinary(double v[], int max) { /* For general column structured binary. */ static int scan_size[3]; static double delta[3]; /* sampling periods */ static double o[3]; /* add after rotations */ static double c[3]; /* subtract before doing rotations */ static double P[3][3]; /* 3D rotation matrix (perpendicular) */ static double R[2][2]; /* 2D rotation matrix (rotate) */ static int read_order; static int record_skip; static int end_of_scan_line; static int end_of_block; static TBOOLEAN translation_required; static char *memory_data; /* For matrix data structure (i.e., gnuplot binary). */ static double first_matrix_column; static float *scanned_matrix_row = 0; static int first_matrix_row_col_count; TBOOLEAN saved_first_matrix_column = FALSE; assert(data_fp != NULL); assert(max <= MAXDATACOLS); assert(df_max_bininfo_cols > df_no_bin_cols); assert(df_no_bin_cols); /* catch attempt to read past EOF on mixed-input */ if (df_eof) return DF_EOF; /* Check if we have room for at least df_no_bin_cols columns */ if (df_max_cols < df_no_bin_cols) expand_df_column(df_no_bin_cols); /* In binary mode, the number of user specs was increased by the * number of dimensions in the underlying uniformly sampled grid * previously. Fill in those values. Also, compute elements of * formula x' = P*R*(x - c) + o */ if (!df_M_count && !df_N_count && !df_O_count) { int i; TBOOLEAN D2, D3; df_binary_file_record_struct *this_record = df_bin_record + df_bin_record_count; scan_size[0] = scan_size[1] = scan_size[2] = 0; D2 = rotation_matrix_2D(R, this_record->cart_alpha); D3 = rotation_matrix_3D(P, this_record->cart_p); translation_required = D2 || D3; if (df_matrix_file) { /* Dimensions */ scan_size[0] = this_record->scan_dim[0]; scan_size[1] = this_record->scan_dim[1]; if (scan_size[0] == 0) int_error(NO_CARET, "Scan size of matrix is zero"); /* To accomplish flipping in this case, multiply the * appropriate column of the rotation matrix by -1. */ for (i = 0; i < 2; i++) { int j; for (j = 0; j < 2; j++) { R[i][j] *= this_record->cart_dir[i]; } } /* o */ for (i = 0; i < 3; i++) { if (this_record->cart_trans != DF_TRANSLATE_DEFAULT) { o[i] = this_record->cart_cen_or_ori[i]; } else { /* Default is translate by center. */ if (i < 2) o[i] = (df_matrix_corner[1][i] + df_matrix_corner[0][i]) / 2; else o[i] = 0; } } /* c */ for (i = 0; i < 3; i++) { if (this_record->cart_trans == DF_TRANSLATE_VIA_ORIGIN) { if (i < 2) c[i] = df_matrix_corner[0][i]; else c[i] = 0; } else { if (i < 2) c[i] = (df_matrix_corner[1][i] + df_matrix_corner[0][i]) / 2; else c[i] = 0; } } first_matrix_row_col_count = 0; } else { /* general binary */ for (i = 0; i < 3; i++) { int map; /* How to direct the generated coordinates in regard * to scan direction */ if (this_record->cart_dim[i] || this_record->scan_dim[i]) { if (this_record->scan_generate_coord) use_spec[i].column = this_record->cart_scan[i]; } /* Dimensions */ map = DF_SCAN_POINT - this_record->cart_scan[i]; if (this_record->cart_dim[i] > 0) scan_size[map] = this_record->cart_dim[i]; else if (this_record->cart_dim[i] < 0) scan_size[map] = MAXINT; else scan_size[map] = this_record->scan_dim[map]; /* Sample periods */ if (this_record->cart_delta[i]) delta[map] = this_record->cart_delta[i]; else delta[map] = this_record->scan_delta[map]; delta[map] *= this_record->scan_dir[map] * this_record->cart_dir[i]; /* o */ if (this_record->cart_trans != DF_TRANSLATE_DEFAULT) o[i] = this_record->cart_cen_or_ori[i]; else if (this_record->scan_trans != DF_TRANSLATE_DEFAULT) o[i] = this_record->scan_cen_or_ori[map]; else if (scan_size[map] > 0) o[i] = (scan_size[map] - 1)*fabs(delta[map])/2; else o[i] = 0; /* c */ if (this_record->cart_trans == DF_TRANSLATE_VIA_ORIGIN || (this_record->cart_trans == DF_TRANSLATE_DEFAULT && this_record->scan_trans == DF_TRANSLATE_VIA_ORIGIN) ) { if ((scan_size[map] > 0) && (delta[map] < 0)) c[i] = (scan_size[map] - 1)*delta[map]; else c[i] = 0; } else { if (scan_size[map] > 0) c[i] = (scan_size[map] - 1)*(delta[map]/2); else c[i] = 0; } } } /* Check if c and o are the same. */ for (i = 0; i < 3; i++) translation_required = translation_required || (c[i] != o[i]); /* Should data come from memory? */ memory_data = this_record->memory_data; /* byte read order */ read_order = byte_read_order(df_bin_file_endianess); /* amount to skip before first record */ record_skip = this_record->scan_skip[0]; end_of_scan_line = FALSE; end_of_block = FALSE; point_count = -1; line_count = 0; df_current_index = df_bin_record_count; /* Craig DeForest Feb 2013 - Fast version of uniform binary matrix. * Don't apply this to ascii input or special filetypes. * Slurp all data from file or pipe in one shot to minimize fread calls. */ if (!memory_data && !(df_bin_filetype > 0) && df_binary_file && df_matrix && !df_nonuniform_matrix) { int i; unsigned long int bytes_per_point = 0; unsigned long int bytes_per_line = 0; unsigned long int bytes_per_plane = 0; unsigned long int bytes_total = 0; size_t fread_ret; /* Accumulate total number of bytes in this tuple */ for (i=0; i<df_no_bin_cols; i++) bytes_per_point += df_column_bininfo[i].skip_bytes + df_column_bininfo[i].column.read_size; bytes_per_point += df_column_bininfo[df_no_bin_cols].skip_bytes; bytes_per_line = bytes_per_point * ( (scan_size[0] > 0) ? scan_size[0] : 1 ); bytes_per_plane = bytes_per_line * ( (scan_size[1] > 0) ? scan_size[1] : 1 ); bytes_total = bytes_per_plane * ( (scan_size[2]>0) ? scan_size[2] : 1); bytes_total += record_skip; /* Allocate a chunk of memory and stuff it */ /* EAM FIXME: Is this a leak if the plot errors out? */ memory_data = gp_alloc(bytes_total, "df_readbinary slurper"); this_record->memory_data = memory_data; FPRINTF((stderr,"Fast matrix code:\n")); FPRINTF((stderr,"\t\t skip %d bytes, read %ld bytes as %d x %d array\n", record_skip, bytes_total, scan_size[0], scan_size[1])); /* Do the actual slurping */ fread_ret = fread(memory_data, 1, bytes_total, data_fp); if (fread_ret != bytes_total) { int_warn(NO_CARET, "Couldn't slurp %ld bytes (return was %zd)\n", bytes_total, fread_ret); df_eof = 1; return DF_EOF; } } } while (!df_eof) { /*{{{ process line */ int line_okay = 1; int output = 0; /* how many numbers written to v[] */ int i, fread_ret = 0; int m_value, n_value, o_value; union io_val { char ch; unsigned char uc; short sh; unsigned short us; int in; unsigned int ui; long lo; unsigned long ul; long long llo; unsigned long long ull; float fl; double db; } io_val; /* Scan in a number of floats based upon the largest index in * the use_specs array. If the largest index in the array is * greater than maximum columns then issue an error. */ /* Handle end of line or end of block on previous read. */ if (end_of_scan_line) { end_of_scan_line = FALSE; point_count = -1; line_count++; return DF_FIRST_BLANK; } if (end_of_block) { end_of_block = FALSE; line_count = 0; return DF_SECOND_BLANK; } /* Possibly skip bytes before starting to read record. */ if (record_skip) { if (memory_data) memory_data += record_skip; else if (df_skip_bytes(record_skip)) return DF_EOF; record_skip = 0; } /* Bring in variables as described by the field parameters. * If less than than the appropriate number of bytes have been * read, issue an error stating not enough columns were found. */ for (i = 0; ; i++) { int skip_bytes = df_column_bininfo[i].skip_bytes; if (skip_bytes) { if (memory_data) memory_data += skip_bytes; else if (df_skip_bytes(skip_bytes)) return DF_EOF; } /* Last entry only has skip bytes, no data. */ if (i == df_no_bin_cols) break; /* Read in a "column", i.e., a binary value of various types. */ if (df_pixeldata) { io_val.uc = df_libgd_get_pixel(df_M_count, df_N_count, i); } else if (memory_data) { for (fread_ret = 0; fread_ret < df_column_bininfo[i].column.read_size; fread_ret++) (&io_val.ch)[fread_ret] = *memory_data++; } else { fread_ret = fread(&io_val.ch, df_column_bininfo[i].column.read_size, 1, data_fp); if (fread_ret != 1) { df_eof = 1; return DF_EOF; } } df_swap_bytes_by_endianess(&io_val.ch, read_order, df_column_bininfo[i].column.read_size); switch (df_column_bininfo[i].column.read_type) { case DF_CHAR: df_column[i].datum = io_val.ch; break; case DF_UCHAR: df_column[i].datum = io_val.uc; break; case DF_SHORT: df_column[i].datum = io_val.sh; break; case DF_USHORT: df_column[i].datum = io_val.us; break; case DF_INT: df_column[i].datum = io_val.in; break; case DF_UINT: df_column[i].datum = io_val.ui; break; case DF_LONG: df_column[i].datum = io_val.lo; break; case DF_ULONG: df_column[i].datum = io_val.ul; break; case DF_LONGLONG: df_column[i].datum = io_val.llo; break; case DF_ULONGLONG: df_column[i].datum = io_val.ull; break; case DF_FLOAT: df_column[i].datum = io_val.fl; break; case DF_DOUBLE: df_column[i].datum = io_val.db; break; default: int_error(NO_CARET, "Binary data type unknown"); } df_column[i].good = DF_GOOD; df_column[i].position = NULL; /* cant get a time */ /* Matrix file data is a special case. After reading in just * one binary value, stop and decide on what to do with it. */ if (df_matrix_file) break; } /* for(i) */ if (df_matrix_file) { if (df_nonuniform_matrix) { /* Store just first column? */ if (!df_M_count && !saved_first_matrix_column) { first_matrix_column = df_column[i].datum; saved_first_matrix_column = TRUE; continue; } /* Read reset of first row? */ if (!df_M_count && !df_N_count && !df_O_count && first_matrix_row_col_count < scan_size[0]) { if (!first_matrix_row_col_count && ! (scanned_matrix_row = gp_realloc(scanned_matrix_row, scan_size[0]*sizeof(float), "gpbinary matrix row"))) int_error(NO_CARET, "not enough memory to create vector"); scanned_matrix_row[first_matrix_row_col_count] = df_column[i].datum; first_matrix_row_col_count++; if (first_matrix_row_col_count == scan_size[0]) { /* Start of the second row. */ saved_first_matrix_column = FALSE; } continue; } } /* Update all the binary columns. Matrix binary and * matrix ASCII is a slight abuse of notation. At the * command line, 1 means first row, 2 means first * column. There can only be one column of data input * because it is a matrix of data, not columns. */ { int j; df_datum = df_column[i].datum; /* Fill backward so that current read value is not * overwritten. */ for (j = df_no_bin_cols-1; j >= 0; j--) { if (j == 0) df_column[j].datum = df_nonuniform_matrix ? scanned_matrix_row[df_M_count] : df_M_count; else if (j == 1) df_column[j].datum = df_nonuniform_matrix ? first_matrix_column : df_N_count; else df_column[j].datum = df_column[i].datum; df_column[j].good = DF_GOOD; df_column[j].position = NULL; } } } else { /* Not matrix file, general binray. */ df_datum = point_count + 1; if (i != df_no_bin_cols) { if (feof(data_fp)) { if (i != 0) int_error(NO_CARET, "Last point in the binary file did not match the specified `using` columns"); df_eof = 1; return DF_EOF; } else { int_error(NO_CARET, read_error_msg); } } } m_value = df_M_count; n_value = df_N_count; o_value = df_O_count; df_M_count++; if ((scan_size[0] > 0) && (df_M_count >= scan_size[0])) { /* This is a new "line". */ df_M_count = 0; df_N_count++; end_of_scan_line = TRUE; if ((scan_size[1] >= 0) && (df_N_count >= scan_size[1])) { /* This is a "block". */ df_N_count = 0; df_O_count++; if ((scan_size[2] >= 0) && (df_O_count >= scan_size[2])) { df_O_count = 0; end_of_block = TRUE; if (++df_bin_record_count >= df_num_bin_records) { df_eof = 1; } } } } /*{{{ ignore points outside range of index */ /* we try to return end-of-file as soon as we pass upper * index, but for mixed input stream, we must skip garbage */ if (df_current_index < df_lower_index || df_current_index > df_upper_index || ((df_current_index - df_lower_index) % df_index_step) != 0) continue; /*}}} */ /*{{{ reject points by every */ /* accept only lines with (line_count%everyline) == 0 */ if (line_count < firstline || line_count > lastline || (line_count - firstline) % everyline != 0) continue; /* update point_count. ignore point if point_count%everypoint != 0 */ if (++point_count < firstpoint || point_count > lastpoint || (point_count - firstpoint) % everypoint != 0) continue; /*}}} */ /* At this point the binary columns have been read * successfully. Set df_no_cols to df_no_bin_cols for use * in the interpretation code. */ df_no_cols = df_no_bin_cols; /*{{{ copy column[] to v[] via use[] */ { int limit = (df_no_use_specs ? df_no_use_specs : MAXDATACOLS); if (limit > max) limit = max; for (output = 0; output < limit; ++output) { int column = use_spec[output].column; /* if there was no using spec, column is output+1 and at=NULL */ if (use_spec[output].at) { struct value a; /* no dummy values to set up prior to... */ evaluate_inside_using = TRUE; evaluate_at(use_spec[output].at, &a); evaluate_inside_using = FALSE; if (undefined) return DF_UNDEFINED; if (a.type == STRING) { if (use_spec[output].expected_type == CT_STRING) { char *s = gp_alloc(strlen(a.v.string_val)+3,"quote"); *s = '"'; strcpy(s+1, a.v.string_val); strcat(s, "\""); free(df_stringexpression[output]); df_tokens[output] = df_stringexpression[output] = s; } gpfree_string(&a); } else v[output] = real(&a); } else if (column == DF_SCAN_PLANE) { if ((df_current_plot->plot_style == IMAGE) || (df_current_plot->plot_style == RGBIMAGE)) v[output] = o_value*delta[2]; /* EAM August 2009 * This was supposed to be "z" in a 3D grid holding a binary * value at each voxel. But in fact the binary code does not * support 3D grids, only 2D. So this always got set to 0, * making the whole thing pretty useless except for inherently. * planar objects like 2D images. * Now I set Z to be the pixel value, which allows you * to draw surfaces described by a 2D binary array. */ else v[output] = df_column[0].datum; } else if (column == DF_SCAN_LINE) { v[output] = n_value*delta[1]; } else if (column == DF_SCAN_POINT) { v[output] = m_value*delta[0]; } else if (column == -2) { v[output] = df_current_index; } else if (column == -1) { v[output] = line_count; } else if (column == 0) { v[output] = df_datum; } else if (column <= 0) { int_error(NO_CARET, "internal error: unknown column type"); /* July 2010 - We used to have special code to handle time data. */ /* But time data in a binary file is just one more binary value, */ /* so let the general case code handle it. */ } else if ((column <= df_no_cols) && df_column[column - 1].good == DF_GOOD) v[output] = df_column[column - 1].datum; /* EAM - Oct 2002 Distinguish between DF_MISSING * and DF_BAD. Previous versions would never * notify caller of either case. Now missing data * will be noted. Bad data should arguably be * noted also, but that would change existing * default behavior. */ else if ((column <= df_no_cols) && (df_column[column - 1].good == DF_MISSING)) return DF_MISSING; else { /* line bad only if user explicitly asked for this column */ if (df_no_use_specs) line_okay = 0; break; /* return or ignore depending on line_okay */ } if (isnan(v[output])) { if (!df_matrix) return DF_UNDEFINED; } } /* Linear translation. */ if (translation_required) { double x, y, z; x = v[0] - c[0]; y = v[1] - c[1]; v[0] = R[0][0] * x + R[0][1] * y; v[1] = R[1][0] * x + R[1][1] * y; if (df_plot_mode == MODE_SPLOT) { x = v[0]; y = v[1]; z = v[2] - c[2]; v[0] = P[0][0] * x + P[0][1] * y + P[0][2] * z; v[1] = P[1][0] * x + P[1][1] * y + P[1][2] * z; v[2] = P[2][0] * x + P[2][1] * y + P[2][2] * z; } v[0] += o[0]; v[1] += o[1]; if (df_plot_mode == MODE_SPLOT) v[2] += o[2]; } } /*}}} */ if (!line_okay) continue; for (i=df_no_use_specs; i<df_no_use_specs+df_no_tic_specs; i++) { if (use_spec[i].expected_type >= CT_XTICLABEL && use_spec[i].at != NULL) { struct value a; int axis, axcol; evaluate_inside_using = TRUE; evaluate_at(use_spec[i].at, &a); evaluate_inside_using = FALSE; switch (use_spec[i].expected_type) { default: case CT_XTICLABEL: axis = FIRST_X_AXIS; axcol = 0; break; case CT_X2TICLABEL: axis = SECOND_X_AXIS; axcol = 0; break; case CT_YTICLABEL: axis = FIRST_Y_AXIS; axcol = 1; break; case CT_Y2TICLABEL: axis = SECOND_Y_AXIS; axcol = 1; break; case CT_ZTICLABEL: axis = FIRST_Z_AXIS; axcol = 2; break; case CT_CBTICLABEL: /* EAM FIXME - Which column to set for cbtic? */ axis = COLOR_AXIS; axcol = 2; break; } if (a.type == STRING) { add_tic_user(axis, a.v.string_val, v[axcol], -1); gpfree_string(&a); } } } /* output == df_no_use_specs if using was specified - * actually, smaller of df_no_use_specs and max */ assert(df_no_use_specs == 0 || output == df_no_use_specs || output == max); return output; } /*}}} */ df_eof = 1; return DF_EOF; } void df_set_plot_mode(int mode) { df_plot_mode = mode; } /* Special pseudofile '+' returns x coord of sample for 2D plots, * Special pseudofile '++' returns x and y coordinates of grid for 3D plots. */ static char * df_generate_pseudodata() { /* Pseudofile '+' returns a set of (samples) x coordinates */ /* This code copied from that in second pass through eval_plots() */ if (df_pseudodata == 1) { static double t, t_min, t_max, t_step; if (df_pseudorecord >= samples_1) return NULL; if (df_pseudorecord == 0) { if (parametric || polar) int_error(NO_CARET,"Pseudodata not yet implemented for polar or parametric graphs"); if (axis_array[FIRST_X_AXIS].max == -VERYLARGE) axis_array[FIRST_X_AXIS].max = 10; if (axis_array[FIRST_X_AXIS].min == VERYLARGE) axis_array[FIRST_X_AXIS].min = -10; t_min = X_AXIS.min; t_max = X_AXIS.max; axis_unlog_interval(x_axis, &t_min, &t_max, 1); t_step = (t_max - t_min) / (samples_1 - 1); } t = t_min + df_pseudorecord * t_step; t = AXIS_DE_LOG_VALUE(x_axis, t); sprintf(line,"%g",t); ++df_pseudorecord; } /* Pseudofile '++' returns a (samples X isosamples) grid of x,y coordinates */ /* This code copied from that in second pass through eval_3dplots */ if (df_pseudodata == 2) { static double u_min, u_max, u_step, v_min, v_max, v_step; static double u_isostep, v_isostep; static int nusteps, nvsteps; double u, v; AXIS_INDEX u_axis = FIRST_X_AXIS; AXIS_INDEX v_axis = FIRST_Y_AXIS; if ((df_pseudorecord >= nusteps) && (df_pseudorecord > 0)) { df_pseudorecord = 0; if (++df_pseudospan >= nvsteps) return NULL; else return ""; /* blank record for end of scan line */ } if (df_pseudospan == 0) { if (samples_1 < 2 || samples_2 < 2 || iso_samples_1 < 2 || iso_samples_2 < 2) int_error(NO_CARET, "samples or iso_samples < 2. Must be at least 2."); axis_checked_extend_empty_range(FIRST_X_AXIS, "x range is invalid"); axis_checked_extend_empty_range(FIRST_Y_AXIS, "y range is invalid"); u_min = axis_log_value_checked(u_axis, axis_array[u_axis].min, "x range"); u_max = axis_log_value_checked(u_axis, axis_array[u_axis].max, "x range"); v_min = axis_log_value_checked(v_axis, axis_array[v_axis].min, "y range"); v_max = axis_log_value_checked(v_axis, axis_array[v_axis].max, "y range"); if (hidden3d) { u_step = (u_max - u_min) / (iso_samples_1 - 1); v_step = (v_max - v_min) / (iso_samples_2 - 1); nusteps = iso_samples_1; } else { u_step = (u_max - u_min) / (samples_1 - 1); v_step = (v_max - v_min) / (samples_2 - 1); nusteps = samples_1; } u_isostep = (u_max - u_min) / (iso_samples_1 - 1); v_isostep = (v_max - v_min) / (iso_samples_2 - 1); nvsteps = iso_samples_2; } /* Duplicate algorithm from calculate_set_of_isolines() */ u = u_min + df_pseudorecord * u_step; v = v_max - df_pseudospan * v_isostep; sprintf(line,"%g %g", AXIS_DE_LOG_VALUE(u_axis,u), AXIS_DE_LOG_VALUE(v_axis,v)); ++df_pseudorecord; } return line; } /* Allocate space for more data columns as needed */ void expand_df_column(int new_max) { df_column = gp_realloc(df_column, new_max * sizeof(df_column_struct), "datafile column"); for (; df_max_cols < new_max; df_max_cols++) { df_column[df_max_cols].datum = 0; df_column[df_max_cols].header = NULL; df_column[df_max_cols].position = NULL; } } /* Clear column headers stored for previous plot */ void clear_df_column_headers() { int i; for (i=0; i<df_max_cols; i++) { free(df_column[i].header); df_column[i].header = NULL; } df_longest_columnhead = 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/term_api.h������������������������������������������������������������������������0000644�0004711�0000144�00000040225�12035050427�012672� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: term_api.h,v 1.97.2.4 2012/10/09 16:30:15 sfeam Exp $ */ /* GNUPLOT - term_api.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_TERM_API_H # define GNUPLOT_TERM_API_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "stdfn.h" #include "gp_types.h" #include "color.h" #include "mousecmn.h" #include "tables.h" /* Constants that are interpreted by terminal driver routines */ /* Default line type is LT_BLACK; reset to this after changing colors */ #define LT_AXIS (-1) #define LT_BLACK (-2) #define LT_NODRAW (-3) #define LT_BACKGROUND (-4) #define LT_UNDEFINED (-5) #define LT_COLORFROMCOLUMN (-6) /* Used by hidden3d code */ #define LT_DEFAULT (-7) #define LT_SINGLECOLOR (-8) /* Used by hidden3d code */ /* Constant value passed to (term->text_angle)(ang) to generate vertical * text corresponding to old keyword "rotate", which produced the equivalent * of "rotate by 90 right-justified". */ #define TEXT_VERTICAL (-270) /* Type definitions */ /* this order means we can use x-(just*strlen(text)*t->h_char)/2 if * term cannot justify */ typedef enum JUSTIFY { LEFT, CENTRE, RIGHT } JUSTIFY; /* we use a similar trick for vertical justification of multi-line labels */ typedef enum VERT_JUSTIFY { JUST_TOP, JUST_CENTRE, JUST_BOT } VERT_JUSTIFY; typedef struct lp_style_type { /* contains all Line and Point properties */ int pointflag; /* 0 if points not used, otherwise 1 */ int l_type; int p_type; int p_interval; /* Every Nth point in style LINESPOINTS */ double l_width; double p_size; TBOOLEAN use_palette; struct t_colorspec pm3d_color; /* ... more to come ? */ } lp_style_type; #define DEFAULT_LP_STYLE_TYPE {0, LT_BLACK, 0, 0, 1.0, PTSZ_DEFAULT, FALSE, DEFAULT_COLORSPEC} typedef enum e_arrow_head { NOHEAD = 0, END_HEAD = 1, BACKHEAD = 2, BOTH_HEADS = 3 } t_arrow_head; extern const char *arrow_head_names[4]; typedef struct arrow_style_type { /* contains all Arrow properties */ int tag; /* -1 (local), AS_VARIABLE, or style index */ int layer; /* 0 = back, 1 = front */ struct lp_style_type lp_properties; /* head options */ t_arrow_head head; /* arrow head choice */ /* struct position headsize; */ /* x = length, y = angle [deg] */ double head_length; /* length of head, 0 = default */ int head_lengthunit; /* unit (x1, x2, screen, graph) */ double head_angle; /* front angle / deg */ double head_backangle; /* back angle / deg */ unsigned int head_filled; /* filled heads: 0=not, 1=empty, 2=filled */ /* ... more to come ? */ } arrow_style_type; /* Operations used by the terminal entry point term->layer(). */ typedef enum termlayer { TERM_LAYER_RESET, TERM_LAYER_BACKTEXT, TERM_LAYER_FRONTTEXT, TERM_LAYER_BEGIN_GRID, TERM_LAYER_END_GRID, TERM_LAYER_END_TEXT, TERM_LAYER_BEFORE_PLOT, TERM_LAYER_AFTER_PLOT, TERM_LAYER_BEGIN_KEYSAMPLE, TERM_LAYER_END_KEYSAMPLE, TERM_LAYER_RESET_PLOTNO, TERM_LAYER_BEFORE_ZOOM, TERM_LAYER_BEGIN_PM3D_MAP, TERM_LAYER_END_PM3D_MAP } t_termlayer; typedef struct fill_style_type { int fillstyle; int filldensity; int fillpattern; t_colorspec border_color; } fill_style_type; typedef enum t_fillstyle { FS_EMPTY, FS_SOLID, FS_PATTERN, FS_DEFAULT, FS_TRANSPARENT_SOLID, FS_TRANSPARENT_PATTERN } t_fillstyle; #define FS_OPAQUE (FS_SOLID + (100<<4)) /* Color construction for an image, palette lookup or rgb components. */ typedef enum t_imagecolor { IC_PALETTE, IC_RGB, IC_RGBA } t_imagecolor; /* Holder for various image properties */ typedef struct t_image { t_imagecolor type; /* See above */ TBOOLEAN fallback; /* true == don't use terminal-specific code */ } t_image; /* Values for the flags field of TERMENTRY */ #define TERM_CAN_MULTIPLOT 1 /* tested if stdout not redirected */ #define TERM_CANNOT_MULTIPLOT 2 /* tested if stdout is redirected */ #define TERM_BINARY 4 /* open output file with "b" */ #define TERM_INIT_ON_REPLOT 8 /* call term->init() on replot */ #define TERM_IS_POSTSCRIPT 16 /* post, next, pslatex, etc */ #define TERM_ENHANCED_TEXT 32 /* enhanced text mode is enabled */ #define TERM_NO_OUTPUTFILE 64 /* terminal doesnt write to a file */ #define TERM_CAN_CLIP 128 /* terminal does its own clipping */ #define TERM_CAN_DASH 256 /* terminal supports dashed lines */ #define TERM_ALPHA_CHANNEL 512 /* alpha channel transparency */ #define TERM_MONOCHROME 1024 /* term is running in mono mode */ #define TERM_LINEWIDTH 2048 /* support for set term linewidth */ #define TERM_FONTSCALE 4096 /* terminal supports fontscale */ #define TERM_IS_LATEX 8192 /* text uses TeX markup */ /* The terminal interface structure --- heart of the terminal layer. * * It should go without saying that additional entries may be made * only at the end of this structure. Any fields added must be * optional - a value of 0 (or NULL pointer) means an older driver * does not support that feature - gnuplot must still be able to * function without that terminal feature */ typedef struct TERMENTRY { const char *name; const char *description; unsigned int xmax,ymax,v_char,h_char,v_tic,h_tic; void (*options) __PROTO((void)); void (*init) __PROTO((void)); void (*reset) __PROTO((void)); void (*text) __PROTO((void)); int (*scale) __PROTO((double, double)); void (*graphics) __PROTO((void)); void (*move) __PROTO((unsigned int, unsigned int)); void (*vector) __PROTO((unsigned int, unsigned int)); void (*linetype) __PROTO((int)); void (*put_text) __PROTO((unsigned int, unsigned int, const char*)); /* the following are optional. set term ensures they are not NULL */ int (*text_angle) __PROTO((int)); int (*justify_text) __PROTO((enum JUSTIFY)); void (*point) __PROTO((unsigned int, unsigned int, int)); void (*arrow) __PROTO((unsigned int, unsigned int, unsigned int, unsigned int, int)); int (*set_font) __PROTO((const char *font)); void (*pointsize) __PROTO((double)); /* change pointsize */ int flags; void (*suspend) __PROTO((void)); /* called after one plot of multiplot */ void (*resume) __PROTO((void)); /* called before plots of multiplot */ void (*fillbox) __PROTO((int, unsigned int, unsigned int, unsigned int, unsigned int)); /* clear in multiplot mode */ void (*linewidth) __PROTO((double linewidth)); #ifdef USE_MOUSE int (*waitforinput) __PROTO((void)); /* used for mouse input */ void (*put_tmptext) __PROTO((int, const char [])); /* draws temporary text; int determines where: 0=statusline, 1,2: at corners of zoom box, with \r separating text above and below the point */ void (*set_ruler) __PROTO((int, int)); /* set ruler location; x<0 switches ruler off */ void (*set_cursor) __PROTO((int, int, int)); /* set cursor style and corner of rubber band */ void (*set_clipboard) __PROTO((const char[])); /* write text into cut&paste buffer (clipboard) */ #endif int (*make_palette) __PROTO((t_sm_palette *palette)); /* 1. if palette==NULL, then return nice/suitable maximal number of colours supported by this terminal. Returns 0 if it can make colours without palette (like postscript). 2. if palette!=NULL, then allocate its own palette return value is undefined 3. available: some negative values of max_colors for whatever can be useful */ void (*previous_palette) __PROTO((void)); /* release the palette that the above routine allocated and get back the palette that was active before. Some terminals, like displays, may draw parts of the figure using their own palette. Those terminals that possess only one palette for the whole plot don't need this routine. */ void (*set_color) __PROTO((t_colorspec *)); /* EAM November 2004 - revised to take a pointer to struct rgb_color, so that a palette gray value is not the only option for specifying color. */ void (*filled_polygon) __PROTO((int points, gpiPoint *corners)); void (*image) __PROTO((unsigned int, unsigned int, coordval *, gpiPoint *, t_imagecolor)); /* Enhanced text mode driver call-backs */ void (*enhanced_open) __PROTO((char * fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint)); void (*enhanced_flush) __PROTO((void)); void (*enhanced_writec) __PROTO((int c)); /* Driver-specific synchronization or other layering commands. * Introduced as an alternative to the ugly sight of * driver-specific code strewn about in the core routines. * As of this point (July 2005) used only by pslatex.trm */ void (*layer) __PROTO((t_termlayer)); /* Begin/End path control. * Needed by PostScript-like devices in order to join the endpoints of * a polygon cleanly. */ void (*path) __PROTO((int p)); /* Scale factor for converting terminal coordinates to output * pixel coordinates. Used to provide data for external mousing code. */ double tscale; } TERMENTRY; # define termentry TERMENTRY enum set_encoding_id { S_ENC_DEFAULT, S_ENC_ISO8859_1, S_ENC_ISO8859_2, S_ENC_ISO8859_9, S_ENC_ISO8859_15, S_ENC_CP437, S_ENC_CP850, S_ENC_CP852, S_ENC_CP950, S_ENC_CP1250, S_ENC_CP1251, S_ENC_CP1254, S_ENC_KOI8_R, S_ENC_KOI8_U, S_ENC_SJIS, S_ENC_UTF8, S_ENC_INVALID }; /* HBB 20020225: this stuff used to be in a separate header, ipc.h, * but I strongly disliked the way that was done */ /* * There are the following types of interprocess communication from * (gnupmdrv, gnuplot_x11) => gnuplot: * OS2_IPC ... the OS/2 shared memory + event semaphores approach * PIPE_IPC ... communication by using bidirectional pipe */ /* * OS2_IPC: gnuplot's terminals communicate with it by shared memory + event * semaphores => the code in gpexecute.c is used, and nothing more from here. */ #ifdef PIPE_IPC enum { IPC_BACK_UNUSABLE = -2, IPC_BACK_CLOSED = -1 }; /* * Currently only used for PIPE_IPC, but in principle * every term could use this file descriptor to write back * commands to gnuplot. Note, that terminals using this fd * should set it to a negative value when closing. (joze) */ /* HBB 20020225: currently not used anywhere outside term.c --> make * it static */ /* extern int ipc_back_fd; */ # endif /* PIPE_IPC */ /* options handling */ enum { UNSET = -1, no = 0, yes = 1 }; /* Variables of term.c needed by other modules: */ /* the terminal info structure, being the heart of the whole module */ extern struct termentry *term; /* Options string of the currently used terminal driver */ extern char term_options[]; /* access head length + angle without changing API */ extern int curr_arrow_headlength; /* angle in degrees */ extern double curr_arrow_headangle; extern double curr_arrow_headbackangle; /* arrow head filled or not */ extern int curr_arrow_headfilled; /* Recycle count for user-defined linetypes */ extern int linetype_recycle_count; /* Current 'output' file: name and open filehandle */ extern char *outstr; extern FILE *gpoutfile; /* Output file where postscript terminal output goes to. In particular: gppsfile == gpoutfile for 'set term': postscript, pstex gppsfile == PSLATEX_auxfile for 'set term': pslatex, cairolatex gppsfile == 0 for all other terminals */ extern FILE *gppsfile; extern char *PS_psdir; extern TBOOLEAN multiplot; /* 'set encoding' support: index of current encoding ... */ extern enum set_encoding_id encoding; /* ... in table of encoding names: */ extern const char *encoding_names[]; /* parsing table for encodings */ extern const struct gen_table set_encoding_tbl[]; /* mouse module needs this */ extern TBOOLEAN term_initialised; /* The qt and wxt terminals cannot be used in the same session. */ /* Whichever one is used first to plot, this locks out the other. */ extern void *term_interlock; /* Support for enhanced text mode. */ extern char enhanced_text[]; extern char *enhanced_cur_text; extern double enhanced_fontscale; /* give array size to allow the use of sizeof */ extern char enhanced_escape_format[16]; extern TBOOLEAN ignore_enhanced_text; /* Prototypes of functions exported by term.c */ void term_set_output __PROTO((char *)); void term_initialise __PROTO((void)); void term_start_plot __PROTO((void)); void term_end_plot __PROTO((void)); void term_start_multiplot __PROTO((void)); void term_end_multiplot __PROTO((void)); /* void term_suspend __PROTO((void)); */ void term_reset __PROTO((void)); void term_apply_lp_properties __PROTO((struct lp_style_type *lp)); void term_check_multiplot_okay __PROTO((TBOOLEAN)); struct termentry *change_term __PROTO((const char *name, int length)); void write_multiline __PROTO((unsigned int, unsigned int, char *, JUSTIFY, VERT_JUSTIFY, int, const char *)); int estimate_strlen __PROTO((char *)); void list_terms __PROTO((void)); char* get_terminals_names __PROTO((void)); struct termentry *set_term __PROTO((void)); void init_terminal __PROTO((void)); void test_term __PROTO((void)); /* Support for enhanced text mode. */ char *enhanced_recursion __PROTO((char *p, TBOOLEAN brace, char *fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint)); void enh_err_check __PROTO((const char *str)); /* note: c is char, but must be declared int due to K&R compatibility. */ void do_enh_writec __PROTO((int c)); /* flag: don't use enhanced output methods --- for output of * filenames, which usually looks bad using subscripts */ void ignore_enhanced __PROTO((TBOOLEAN flag)); /* Simple-minded test that point is with drawable area */ TBOOLEAN on_page __PROTO((int x, int y)); /* Convert a fill style into a backwards compatible packed form */ int style_from_fill __PROTO((struct fill_style_type *)); #ifdef EAM_OBJECTS /* Terminal-independent routine to draw a circle or arc */ void do_arc __PROTO(( unsigned int cx, unsigned int cy, double radius, double arc_start, double arc_end, int style)); #endif #ifdef LINUXVGA void LINUX_setup __PROTO((void)); #endif #ifdef PC void PC_setup __PROTO((void)); #endif #ifdef VMS void vms_reset(); #endif #ifdef OS2 int PM_pause __PROTO((char *)); void PM_intc_cleanup __PROTO((void)); # ifdef USE_MOUSE void PM_update_menu_items __PROTO((void)); void PM_set_gpPMmenu __PROTO((struct t_gpPMmenu * gpPMmenu)); # endif #endif void lp_use_properties __PROTO((struct lp_style_type *lp, int tag)); void load_linetype __PROTO((struct lp_style_type *lp, int tag)); /* Wrappers for term->path() */ void newpath __PROTO((void)); void closepath __PROTO((void)); #endif /* GNUPLOT_TERM_API_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/term.h����������������������������������������������������������������������������0000644�0004711�0000144�00000024006�11655451724�012054� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: term.h,v 1.54 2011/11/06 09:31:00 markisch Exp $ */ /* GNUPLOT - term.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * term.h: terminal support definitions * Edit this file depending on the set of terminals you wish to support. * Comment out the terminal types that you don't want or don't have, and * uncomment those that you want included. Be aware that some terminal * types (eg, SUN) will require changes in the makefile * LIBS definition. */ /* * first draft after all terminals are converted to new layout * Stefan Bodewig Dec. 1995 */ /* * >>> CONFIGURATION OPTIONS FOLLOW <<< PLEASE READ * * pslatex and epslatex support is now provided by the combination of * post.trm and pslatex.trm. You cannot build pslatex without post. * Both drivers are selected by default, but you can disable them below. */ #define GP_ENH_EST 1 /* estimate string length of enhanced text */ #define POSTSCRIPT_DRIVER 1 /* include post.trm */ #define PSLATEX_DRIVER 1 /* include pslatex.trm */ #if defined(PSLATEX_DRIVER) && !defined(POSTSCRIPT_DRIVER) #define POSTSCRIPT_DRIVER #endif /* Define SHORT_TERMLIST to select a few terminals. It is easier * to define the macro and list desired terminals in this section. * Sample configuration for a Unix workstation */ #ifdef SHORT_TERMLIST # include "dumb.trm" /* dumb terminal */ # ifdef GP_ENH_EST # include "estimate.trm" /* used for enhanced text processing */ # endif # ifdef POSTSCRIPT_DRIVER # ifdef PSLATEX_DRIVER # undef PSLATEX_DRIVER # endif # include "post.trm" /* postscript */ # endif # ifdef X11 # include "x11.trm" /* X Window system */ # endif /* X11 */ # ifdef OS2 # include "pm.trm" /* OS/2 Presentation Manager */ # endif # ifdef _Windows # include "win.trm" /* MS-Windows */ # endif #else /* include all applicable terminals not commented out */ /****************************************************************************/ /* Platform dependent part */ /****************************************************************************/ /* Apple Macintosh */ #ifdef _Macintosh # include "mac.trm" #endif /* BeOS */ #ifdef __BEOS__ # include "be.trm" #endif /****************************************************************************/ /* MS-DOS and Windows */ #if defined(MSDOS) || defined(_Windows) /* MSDOS with emx-gcc compiler */ # if defined(MSDOS) && defined(__EMX__) /* Vesa-Cards */ # define EMXVESA # include "emxvga.trm" # endif /* MSDOS && EMX */ /* MSDOS with djgpp compiler */ # if defined(DJGPP) && (!defined(DJSVGA) || (DJSVGA != 0)) # include "djsvga.trm" # endif /* All other Compilers */ # ifndef _Windows # ifdef PC /* uncomment the next line to include SuperVGA support */ # define BGI_NAME "svga256" /* the name of the SVGA.BGI for Borland C */ /* this also triggers the inclusion of Super VGA support */ # include "pc.trm" /* all PC types except MS WINDOWS */ # endif # else /* _Windows */ # include "win.trm" /* MS-Windows */ # endif /* _Windows */ #endif /* MSDOS || _Windows */ /****************************************************************************/ /* NeXT */ #ifdef NEXT # include "next.trm" #endif /* Apple Mac OS X Server 1.0 (Openstep Unix) */ /* Apparently, Openstep code won't work on newer versions of * MacOS X. If someone can fix this, and provide a proper * configure test, let us know. */ /* * #if defined(__APPLE__) && defined(__MACH__) * # include "openstep.trm" * #endif */ /* Apple Mac OS X */ #ifdef HAVE_LIBAQUATERM /* support for AquaTerm.app */ # include "aquaterm.trm" #endif /* OS/2 */ #ifdef OS2 /* presentation manager */ # include "pm.trm" # ifdef EMXVESA /* works with DOS and OS/2 (windowed/full screen) */ # include "emxvga.trm" # endif #endif /* OS2 */ /***************************************************************************/ /* Terminals for various Unix platforms */ /***************************************************************************/ /* Linux VGA */ #ifdef LINUXVGA # include "linux.trm" /* Linux VGAGL */ # if defined(VGAGL) && defined (THREEDKIT) # include "vgagl.trm" # endif #endif /* LINUXVGA */ /* SCO CGI drivers */ #ifdef SCO # include "cgi.trm" #endif /* SunView */ #ifdef SUN # include "sun.trm" #endif /* VAX Windowing System requires UIS libraries */ #ifdef UIS # include "vws.trm" #endif /* AT&T Unix-PC */ #ifdef UNIXPC # include "unixpc.trm" #endif /****************************************************************************/ /* Terminals not relevant for MSDOS, MS-Windows */ #if !(defined(MSDOS) || defined(_Windows)) /* AED 512 and AED 767 graphics terminals */ /* # include "aed.trm" */ /* gpic for groff */ # include "gpic.trm" /* REGIS graphics language */ # include "regis.trm" /* Tektronix 4106, 4107, 4109 and 420x terminals */ # include "t410x.trm" /* a Tek 4010 and others including VT-style */ # include "tek.trm" #endif /* !MSDOS && !_Windows */ /****************************************************************************/ /****************************************************************************/ /* These terminals can be used on any system */ #ifdef X11 # include "x11.trm" /* X Window System */ # include "xlib.trm" /* dumps x11 commands to gpoutfile */ #endif /* Adobe Illustrator Format */ /* obsolete: use 'set term postscript level1 */ /* #include "ai.trm" */ /* HTML Canvas terminal */ #if (defined(HAVE_GD_PNG) || defined(HAVE_CAIROPDF)) # include "write_png_image.c" #endif #include "canvas.trm" /* Computer Graphics Metafile (eg ms office) */ #include "cgm.trm" /* CorelDraw! eps format */ #include "corel.trm" /* debugging terminal */ #ifdef DEBUG # include "debug.trm" #endif /* dumb terminal */ #include "dumb.trm" /* DXF format for use with AutoCad (Release 10.x) */ #include "dxf.trm" /* Enhanced Metafile Format driver */ #include "emf.trm" /* Roland DXY800A plotter */ /* #include "dxy.trm" */ /* QMS/EXCL laserprinter (Talaris 1590 and others) */ /* #include "excl.trm" */ /* fig graphics */ #include "fig.trm" /* geographical info system */ /* #include "grass.trm" */ /* HP2623A and probably others */ #include "hp26.trm" /* HP2647 and 2648 */ #include "hp2648.trm" /* HP7475, HP7220 plotters, and (hopefully) lots of others */ #include "hpgl.trm" #ifndef NO_BITMAP_SUPPORT /* HP DeskJet 500 C */ #include "hp500c.trm" /* HP Laserjet II */ #include "hpljii.trm" /* HP PrintJet */ #include "hppj.trm" #endif /* NO_BITMAP_SUPPORT */ /* Imagen laser printers */ #include "imagen.trm" /* Kyocera Prescribe printer */ /* #include "kyo.trm" */ /* Frame Maker MIF 3.00 format driver */ #include "mif.trm" /* Adobe Portable Document Format (PDF) */ /* NOTE THAT PDF REQUIRES A SEPARATE LIBRARY : see term/pdf.trm */ #ifdef HAVE_LIBPDF # include "pdf.trm" #endif #if defined(HAVE_GD_PNG) || defined(HAVE_GD_JPEG) || defined(HAVE_GD_GIF) # include "gd.trm" #endif /* postscript */ #ifdef POSTSCRIPT_DRIVER #include "post.trm" #endif /* QMS laser printers */ #include "qms.trm" /* W3C Scalable Vector Graphics file */ #include "svg.trm" /* x11 tgif tool */ #include "tgif.trm" /* tcl/tk with perl extensions */ #include "tkcanvas.trm" /* Vectrix 384 printer, also Tandy colour */ /* #include "v384.trm" */ #ifndef NO_BITMAP_SUPPORT /* portable bit map */ #include "pbm.trm" /* wire printers */ /* Epson LX-800, Star NL-10, NX-1000 and lots of others */ #define EPSONP /* Epson-style 60-dot per inch printers */ #define EPS60 /* Epson-style 180-dot per inch (24 pin) printers */ #define EPS180 #define NEC #define OKIDATA #define STARC /* Seiko DPU-414 thermal printer */ #define DPU414 /* Tandy DMP-130 series 60-dot per inch graphics */ #define TANDY60 /* the common driver file for all of these */ #include "epson.trm" #endif /* NO_BITMAP_SUPPORT */ /* TeX related terminals */ #define EMTEX #define EEPIC /* latex and emtex */ #include "latex.trm" /* latex/tex with picture in postscript */ #ifdef PSLATEX_DRIVER #include "pslatex.trm" #endif /* EEPIC-extended LaTeX driver, for EEPIC users */ #include "eepic.trm" /* TPIC specials for TeX */ #include "tpic.trm" /* LaTeX picture environment with PSTricks macros */ #include "pstricks.trm" /* TeXDraw drawing package for LaTeX */ #include "texdraw.trm" /* METAFONT */ #include "metafont.trm" /* METAPOST */ #include "metapost.trm" /* ConTeXt */ #include "context.trm" #ifdef USE_GGI_DRIVER # include "ggi.trm" #endif #ifdef GP_ENH_EST #include "estimate.trm" #endif /* WXWIDGETS */ #ifdef WXWIDGETS # include "wxt.trm" #endif #ifdef HAVE_CAIROPDF # include "cairo.trm" #endif #ifdef HAVE_LUA #include "lua.trm" #endif #ifdef QTTERM # include "qt.trm" #endif #endif /* !SHORT_TERMLIST */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/plot.c����������������������������������������������������������������������������0000644�0004711�0000144�00000070426�12165050771�012057� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: plot.c,v 1.128.2.17 2013/07/03 16:31:53 sfeam Exp $"); } #endif /* GNUPLOT - plot.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "syscfg.h" #include "plot.h" #include "alloc.h" #include "command.h" #include "eval.h" #include "fit.h" #include "gp_hist.h" #include "misc.h" #include "readline.h" #include "setshow.h" #include "term_api.h" #include "util.h" #include "variable.h" #include "version.h" #include <signal.h> #include <setjmp.h> #ifdef OS2 /* os2.h required for gpexecute.h */ # define INCL_DOS # define INCL_REXXSAA # ifdef OS2_IPC # define INCL_DOSSEMAPHORES # endif # include <os2.h> #endif /* OS2 */ #ifdef USE_MOUSE # include "mouse.h" /* for mouse_setting */ # include "gpexecute.h" #endif /* on OS/2 this is needed even without USE_MOUSE */ #if defined(OS2_IPC) && !defined(USE_MOUSE) # include "gpexecute.h" #endif /* Used nowhere else */ #ifdef HAVE_SYS_UTSNAME_H # include <sys/utsname.h> #endif #if defined(MSDOS) || defined(__EMX__) # include <io.h> #endif #ifdef VMS # ifndef __GNUC__ # include <unixio.h> # endif # include <smgdef.h> # include <ssdef.h> extern int vms_vkid; extern smg$create_virtual_keyboard(); extern int vms_ktid; extern smg$create_key_table(); #endif /* VMS */ #ifdef _Windows # include <windows.h> # ifndef SIGINT # define SIGINT 2 /* for MSC */ # endif # include "win/winmain.h" # include "win/wcommon.h" #endif /* _Windows */ /* GNU readline * Only required by two files directly, * so I don't put this into a header file. -lh */ #if defined(HAVE_LIBREADLINE) && !defined(MISSING_RL_TILDE_EXPANSION) # include <readline/tilde.h> extern int rl_complete_with_tilde_expansion; #endif /* BSD editline */ #ifdef HAVE_LIBEDITLINE # include <editline/readline.h> #endif /* enable gnuplot history with readline */ #ifdef GNUPLOT_HISTORY # ifndef GNUPLOT_HISTORY_FILE # define GNUPLOT_HISTORY_FILE "~/.gnuplot_history" # endif /* * expanded_history_filename points to the value from 'tilde_expand()', * which expands '~' to the user's home directory, or $HOME. * Depending on your OS you have to make sure that the "$HOME" environment * variable exists. You are responsible for valid values. */ static char *expanded_history_filename; static void wrapper_for_write_history __PROTO((void)); #endif /* GNUPLOT_HISTORY */ TBOOLEAN interactive = TRUE; /* FALSE if stdin not a terminal */ TBOOLEAN noinputfiles = TRUE; /* FALSE if there are script files */ TBOOLEAN skip_gnuplotrc = FALSE;/* skip system gnuplotrc and ~/.gnuplot */ TBOOLEAN persist_cl = FALSE; /* TRUE if -persist is parsed in the command line */ /* user home directory */ static const char *user_homedir = NULL; /* user shell */ const char *user_shell = NULL; static TBOOLEAN successful_initialization = FALSE; #ifdef X11 extern int X11_args __PROTO((int, char **)); /* FIXME: defined in term/x11.trm */ #endif /* patch to get home dir, see command.c */ #ifdef DJGPP # include <dir.h> /* MAXPATH */ char HelpFile[MAXPATH]; #endif /* - DJL */ /* a longjmp buffer to get back to the command line */ /* FIXME HBB 20001103: should probably just use GPFAR, rather than * check for _Windows */ #ifdef _Windows static JMP_BUF far command_line_env; #else static JMP_BUF command_line_env; #endif static void load_rcfile __PROTO((int where)); static RETSIGTYPE inter __PROTO((int anint)); static void init_memory __PROTO((void)); static int exit_status = EXIT_SUCCESS; #ifdef OS2 # include <process.h> static ULONG RexxInterface(PRXSTRING, PUSHORT, PRXSTRING); TBOOLEAN CallFromRexx = FALSE; #endif /* OS2 */ static RETSIGTYPE inter(int anint) { (void) anint; /* aovid -Wunused warning */ (void) signal(SIGINT, (sigfunc) inter); (void) signal(SIGFPE, SIG_DFL); /* turn off FPE trapping */ #ifdef OS2 if (!strcmp(term->name,"pm")) { PM_intc_cleanup(); /* ?? putc('\n', stderr); LONGJMP(command_line_env, TRUE); */ } else #endif { term_reset(); (void) putc('\n', stderr); bail_to_command_line(); /* return to prompt */ } } #ifdef LINUXVGA /* utility functions to ensure that setuid gnuplot * assumes root privileges only for those parts * of the code which require root rights. * * By "Dr. Werner Fink" <werner@suse.de> */ static uid_t euid, ruid; static gid_t egid, rgid; static int asked_privi = 0; void drop_privilege() { if (!asked_privi) { euid = geteuid(); egid = getegid(); ruid = getuid(); rgid = getgid(); asked_privi = 1; } if (setegid(rgid) == -1) (void) fprintf(stderr, "setegid(%d): %s\n", (int) rgid, strerror(errno)); if (seteuid(ruid) == -1) (void) fprintf(stderr, "seteuid(%d): %s\n", (int) ruid, strerror(errno)); } void take_privilege() { if (!asked_privi) { euid = geteuid(); egid = getegid(); ruid = getuid(); rgid = getgid(); asked_privi = 1; } if (setegid(egid) == -1) (void) fprintf(stderr, "setegid(%d): %s\n", (int) egid, strerror(errno)); if (seteuid(euid) == -1) (void) fprintf(stderr, "seteuid(%d): %s\n", (int) euid, strerror(errno)); } #endif /* LINUXVGA */ /* a wrapper for longjmp so we can keep everything local */ void bail_to_command_line() { #ifdef _Windows call_kill_pending_Pause_dialog(); #endif LONGJMP(command_line_env, TRUE); } #if defined(_Windows) int gnu_main(int argc, char **argv) #else int main(int argc, char **argv) #endif { int i; #ifdef LINUXVGA LINUX_setup(); /* setup VGA before dropping privilege DBT 4/5/99 */ drop_privilege(); #endif /* make sure that we really have revoked root access, this might happen if gnuplot is compiled without vga support but is installed suid by mistake */ #ifdef __linux__ setuid(getuid()); #endif #if defined(MSDOS) && !defined(_Windows) && !defined(__GNUC__) PC_setup(); #endif /* MSDOS !Windows */ /* HBB: Seems this isn't needed any more for DJGPP V2? */ /* HBB: disable all floating point exceptions, just keep running... */ #if defined(DJGPP) && (DJGPP!=2) _control87(MCW_EM, MCW_EM); #endif #if defined(OS2) int rc; #ifdef OS2_IPC char semInputReadyName[40]; sprintf( semInputReadyName, "\\SEM32\\GP%i_Input_Ready", getpid() ); rc = DosCreateEventSem(semInputReadyName,&semInputReady,0,0); if (rc != 0) fputs("DosCreateEventSem error\n",stderr); #endif rc = RexxRegisterSubcomExe("GNUPLOT", (PFN) RexxInterface, NULL); #endif /* malloc large blocks, otherwise problems with fragmented mem */ #ifdef MALLOCDEBUG malloc_debug(7); #endif /* get helpfile from home directory */ #ifdef __DJGPP__ { char *s; strcpy(HelpFile, argv[0]); for (s = HelpFile; *s; s++) if (*s == DIRSEP1) *s = DIRSEP2; /* '\\' to '/' */ strcpy(strrchr(HelpFile, DIRSEP2), "/gnuplot.gih"); } /* Add also some "paranoid" tests for '\\': AP */ #endif /* DJGPP */ #ifdef VMS unsigned int status[2] = { 1, 0 }; #endif #if defined(HAVE_LIBEDITLINE) rl_getc_function = getc_wrapper; #endif #if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) /* T.Walter 1999-06-24: 'rl_readline_name' must be this fix name. * It is used to parse a 'gnuplot' specific section in '~/.inputrc' * or gnuplot specific commands in '.editrc' (when using editline * instead of readline) */ rl_readline_name = "Gnuplot"; rl_terminal_name = getenv("TERM"); #if defined(HAVE_LIBREADLINE) using_history(); #else history_init(); #endif #endif #if defined(HAVE_LIBREADLINE) && !defined(MISSING_RL_TILDE_EXPANSION) rl_complete_with_tilde_expansion = 1; #endif for (i = 1; i < argc; i++) { if (!argv[i]) continue; if (!strcmp(argv[i], "-V") || !strcmp(argv[i], "--version")) { printf("gnuplot %s patchlevel %s\n", gnuplot_version, gnuplot_patchlevel); return 0; } else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) { printf( "Usage: gnuplot [OPTION]... [FILE]\n" #ifdef X11 "for X11 options see 'help X11->command-line-options'\n" #endif " -V, --version\n" " -h, --help\n" " -p --persist\n" " -d --default-settings\n" " -e \"command1; command2; ...\"\n" "gnuplot %s patchlevel %s\n", gnuplot_version, gnuplot_patchlevel); #ifdef DEVELOPMENT_VERSION printf( #ifdef DIST_CONTACT "Report bugs to "DIST_CONTACT"\n" " or %s\n", #else "Report bugs to %s\n", #endif bug_email); #endif return 0; } else if (!strncmp(argv[i], "-persist", 2) || !strcmp(argv[i], "--persist") #ifdef _Windows || !stricmp(argv[i], "-noend") || !stricmp(argv[i], "/noend") #endif ) { persist_cl = TRUE; } else if (!strncmp(argv[i], "-d", 2) || !strcmp(argv[i], "--default-settings")) { /* Skip local customization read from ~/.gnuplot */ skip_gnuplotrc = TRUE; } } #ifdef X11 /* the X11 terminal removes tokens that it recognizes from argv. */ { int n = X11_args(argc, argv); argv += n; argc -= n; } #endif setbuf(stderr, (char *) NULL); #ifdef HAVE_SETVBUF /* This was once setlinebuf(). Docs say this is * identical to setvbuf(,NULL,_IOLBF,0), but MS C * faults this (size out of range), so we try with * size of 1024 instead. [SAS/C does that, too. -lh] */ if (setvbuf(stdout, (char *) NULL, _IOLBF, (size_t) 1024) != 0) (void) fputs("Could not linebuffer stdout\n", stderr); /* Switching to unbuffered mode causes all characters in the input * buffer to be lost. So the only safe time to do it is on program entry. * Do any non-X platforms suffer from this problem? * EAM - Jan 2013 YES. */ setvbuf(stdin, (char *) NULL, _IONBF, 0); #endif gpoutfile = stdout; /* Initialize pre-loaded user variables */ (void) Gcomplex(&udv_pi.udv_value, M_PI, 0.0); udv_NaN = add_udv_by_name("NaN"); (void) Gcomplex(&(udv_NaN->udv_value), not_a_number(), 0.0); udv_NaN->udv_undef = FALSE; init_memory(); interactive = FALSE; init_terminal(); /* can set term type if it likes */ push_terminal(0); /* remember the default terminal */ /* reset the terminal when exiting */ /* this is done through gp_atexit so that other terminal functions * can be registered to be executed before the terminal is reset. */ GP_ATEXIT(term_reset); # if defined(_Windows) && ! defined(WGP_CONSOLE) interactive = TRUE; # else interactive = isatty(fileno(stdin)); # endif /* Note: we want to know whether this is an interactive session so that we can * decide whether or not to write status information to stderr. The old test * for this was to see if (argc > 1) but the addition of optional command line * switches broke this. What we really wanted to know was whether any of the * command line arguments are file names or an explicit in-line "-e command". */ for (i = 1; i < argc; i++) { # ifdef _Windows if (!stricmp(argv[i], "/noend")) continue; # endif if ((argv[i][0] != '-') || (argv[i][1] == 'e')) { interactive = FALSE; break; } } /* Need this before show_version is called for the first time */ #ifdef HAVE_SYS_UTSNAME_H { struct utsname uts; /* something is fundamentally wrong if this fails ... */ if (uname(&uts) > -1) { # ifdef _AIX strcpy(os_name, uts.sysname); sprintf(os_name, "%s.%s", uts.version, uts.release); # elif defined(SCO) strcpy(os_name, "SCO"); strcpy(os_rel, uts.release); # elif defined(DJGPP) if (!strncmp(uts.sysname, "??Un", 4)) /* don't print ??Unknow" */ strcpy(os_name, "Unknown"); else { strcpy(os_name, uts.sysname); strcpy(os_rel, uts.release); } # else strcpy(os_name, uts.sysname); strcpy(os_rel, uts.machine); # ifdef OS2 if (!strchr(os_rel,'.')) /* write either "2.40" or "4.0", or empty -- don't print "OS/2 1" */ strcpy(os_rel, ""); # endif # endif } } #else /* ! HAVE_SYS_UTSNAME_H */ strcpy(os_name, OS); strcpy(os_rel, ""); #endif /* HAVE_SYS_UTSNAME_H */ if (interactive) show_version(stderr); else show_version(NULL); /* Only load GPVAL_COMPILE_OPTIONS */ #ifdef WGP_CONSOLE #ifdef CONSOLE_SWITCH_CP if (cp_changed && interactive) { fprintf(stderr, "\ngnuplot changed the codepage of this console from %i to %i to\n" \ "match the graph window. Some characters might only display correctly\n" \ "if you change the font to a non-raster type.\n", cp_input, GetConsoleCP()); } #else if ((GetConsoleCP() != GetACP()) && interactive) { fprintf(stderr, "\nWarning: The codepage of the graph window (%i) and that of the\n" \ "console (%i) differ. Use `set encoding` or `!chcp` if extended\n" \ "characters don't display correctly.\n", GetACP(), GetConsoleCP()); } #endif #endif update_gpval_variables(3); /* update GPVAL_ variables available to user */ #ifdef VMS /* initialise screen management routines for command recall */ if (status[1] = smg$create_virtual_keyboard(&vms_vkid) != SS$_NORMAL) done(status[1]); if (status[1] = smg$create_key_table(&vms_ktid) != SS$_NORMAL) done(status[1]); #endif /* VMS */ if (!SETJMP(command_line_env, 1)) { /* first time */ interrupt_setup(); /* should move this stuff another initialisation routine, * something like init_set() maybe */ get_user_env(); init_loadpath(); init_locale(); /* HBB: make sure all variables start in the same mode 'reset' * would set them to. Since the axis variables aren't in * initialized arrays any more, this is now necessary... */ reset_command(); init_color(); /* Initialization of color */ load_rcfile(0); /* System-wide gnuplotrc if configured */ load_rcfile(1); /* ./.gnuplot if configured */ init_fit(); /* Initialization of fitting module */ /* After this point we allow pipes and system commands */ successful_initialization = TRUE; load_rcfile(2); /* ~/.gnuplot */ if (interactive && term != 0) { /* not unknown */ #ifdef GNUPLOT_HISTORY FPRINTF((stderr, "Before read_history\n")); #if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) expanded_history_filename = tilde_expand(GNUPLOT_HISTORY_FILE); #else expanded_history_filename = gp_strdup(GNUPLOT_HISTORY_FILE); gp_expand_tilde(&expanded_history_filename); #endif FPRINTF((stderr, "expanded_history_filename = %s\n", expanded_history_filename)); read_history(expanded_history_filename); { /* BEGIN: Go local to get environment variable */ const char *temp_env = getenv ("GNUPLOT_HISTORY_SIZE"); if (temp_env) gnuplot_history_size = strtol (temp_env, (char **) NULL, 10); } /* END: Go local to get environment variable */ /* * It is safe to ignore the return values of 'atexit()' and * 'on_exit()'. In the worst case, there is no history of your * currrent session and you have to type all again in your next * session. * This is the default behaviour (traditional reasons), too. * In case you don't have one of these functions, or you don't * want to use them, 'write_history()' is called directly. */ GP_ATEXIT(wrapper_for_write_history); #endif /* GNUPLOT_HISTORY */ fprintf(stderr, "\nTerminal type set to '%s'\n", term->name); } /* if (interactive && term != 0) */ } else { /* come back here from int_error() */ if (!successful_initialization) { /* Only print the warning once */ successful_initialization = TRUE; fprintf(stderr,"WARNING: Error during initialization\n\n"); } if (interactive == FALSE) exit_status = EXIT_FAILURE; #ifdef HAVE_READLINE_RESET else { /* reset properly readline after a SIGINT+longjmp */ rl_reset_after_signal (); } #endif load_file_error(); /* if we were in load_file(), cleanup */ SET_CURSOR_ARROW; #ifdef VMS /* after catching interrupt */ /* VAX stuffs up stdout on SIGINT while writing to stdout, so reopen stdout. */ if (gpoutfile == stdout) { if ((stdout = freopen("SYS$OUTPUT", "w", stdout)) == NULL) { /* couldn't reopen it so try opening it instead */ if ((stdout = fopen("SYS$OUTPUT", "w")) == NULL) { /* don't use int_error here - causes infinite loop! */ fputs("Error opening SYS$OUTPUT as stdout\n", stderr); } } gpoutfile = stdout; } #endif /* VMS */ if (!interactive && !noinputfiles) { term_reset(); exit(EXIT_FAILURE); /* exit on non-interactive error */ } } /* load filenames given as arguments */ while (--argc > 0) { ++argv; c_token = 0; if (!strncmp(*argv, "-persist", 2) || !strcmp(*argv, "--persist") #ifdef _Windows || !stricmp(*argv, "-noend") || !stricmp(*argv, "/noend") #endif ) { FPRINTF((stderr,"'persist' command line option recognized\n")); } else if (strcmp(*argv, "-") == 0) { #if defined(_Windows) && !defined(WGP_CONSOLE) TextShow(&textwin); #endif interactive = TRUE; while (!com_line()); interactive = FALSE; } else if (strcmp(*argv, "-e") == 0) { --argc; ++argv; if (argc <= 0) { fprintf(stderr, "syntax: gnuplot -e \"commands\"\n"); return 0; } interactive = FALSE; noinputfiles = FALSE; do_string(*argv); } else if (!strncmp(*argv, "-d", 2) || !strcmp(*argv, "--default-settings")) { /* Ignore this; it already had its effect */ FPRINTF((stderr, "ignoring -d\n")); } else if (*argv[0] == '-') { fprintf(stderr, "unrecognized option %s\n", *argv); } else { interactive = FALSE; noinputfiles = FALSE; load_file(loadpath_fopen(*argv, "r"), gp_strdup(*argv), FALSE); } } #ifdef _Windows /* On Windows 'persist' is handled by keeping the main input loop running. */ if (persist_cl) { interactive = TRUE; while (!com_line()); interactive = FALSE; } else #endif { /* take commands from stdin */ if (noinputfiles) while (!com_line()); } #if (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE)) && defined(GNUPLOT_HISTORY) #if !defined(HAVE_ATEXIT) && !defined(HAVE_ON_EXIT) /* You should be here if you neither have 'atexit()' nor 'on_exit()' */ wrapper_for_write_history(); #endif /* !HAVE_ATEXIT && !HAVE_ON_EXIT */ #endif /* (HAVE_LIBREADLINE || HAVE_LIBEDITLINE) && GNUPLOT_HISTORY */ #ifdef OS2 RexxDeregisterSubcom("GNUPLOT", NULL); #endif /* HBB 20040223: Not all compilers like exit() to end main() */ /* exit(exit_status); */ return exit_status; } /* Set up to catch interrupts */ void interrupt_setup() { #if defined(WGP_CONSOLE) /* FIXME. CTRC+C crashes console mode gnuplot for windows. Failure of longjmp() is not easy to fix so that the signal of SIGINT is just ignored at the moment. */ (void) signal(SIGINT, SIG_IGN); #else (void) signal(SIGINT, (sigfunc) inter); #endif #ifdef SIGPIPE /* ignore pipe errors, this might happen with set output "|head" */ (void) signal(SIGPIPE, SIG_IGN); #endif /* SIGPIPE */ } /* * Read commands from an initialization file. * where = 0: look for gnuplotrc in system shared directory * where = 1: look for .gnuplot in current directory * where = 2: look for .gnuplot in home directory */ static void load_rcfile(int where) { FILE *plotrc = NULL; char *rcfile = NULL; if (skip_gnuplotrc) return; if (where == 0) { #ifdef GNUPLOT_SHARE_DIR # if defined(_Windows) /* retrieve path relative to gnuplot executable, * whose path is in szModuleName (winmain.c) */ rcfile = gp_alloc(strlen((char *)szPackageDir) + 1 + strlen(GNUPLOT_SHARE_DIR) + 1 + strlen("gnuplotrc") + 1, "rcfile"); strcpy(rcfile, (char *)szPackageDir); PATH_CONCAT(rcfile, GNUPLOT_SHARE_DIR); # else rcfile = (char *) gp_alloc(strlen(GNUPLOT_SHARE_DIR) + 1 + strlen("gnuplotrc") + 1, "rcfile"); strcpy(rcfile, GNUPLOT_SHARE_DIR); # endif PATH_CONCAT(rcfile, "gnuplotrc"); plotrc = fopen(rcfile, "r"); #endif } else if (where == 1) { #ifdef USE_CWDRC /* Allow check for a .gnuplot init file in the current directory */ /* This is a security risk, as someone might leave a malicious */ /* init file in a shared directory. */ plotrc = fopen(PLOTRC, "r"); #endif /* !USE_CWDRC */ } else if (where == 2 && user_homedir) { /* length of homedir + directory separator + length of file name + \0 */ int len = (user_homedir ? strlen(user_homedir) : 0) + 1 + strlen(PLOTRC) + 1; rcfile = gp_alloc(len, "rcfile"); strcpy(rcfile, user_homedir); PATH_CONCAT(rcfile, PLOTRC); plotrc = fopen(rcfile, "r"); } if (plotrc) { char *rc = gp_strdup(rcfile ? rcfile : PLOTRC); load_file(plotrc, rc, FALSE); push_terminal(0); /* needed if terminal or its options were changed */ } free(rcfile); } void get_user_env() { if (user_homedir == NULL) { const char *env_home; if ((env_home = getenv(HOME)) #ifdef WIN32 || (env_home = appdata_directory()) || (env_home = getenv("USERPROFILE")) #endif #ifndef VMS || (env_home = getenv("HOME")) #endif ) user_homedir = (const char *) gp_strdup(env_home); else if (interactive) int_warn(NO_CARET, "no HOME found"); } /* Hhm ... what about VMS? */ if (user_shell == NULL) { const char *env_shell; if ((env_shell = getenv("SHELL")) == NULL) #if defined(MSDOS) || defined(_Windows) || defined(OS2) if ((env_shell = getenv("COMSPEC")) == NULL) #endif env_shell = SHELL; user_shell = (const char *) gp_strdup(env_shell); } } /* expand tilde in path * path cannot be a static array! * tilde must be the first character in *pathp; * we may change that later */ void gp_expand_tilde(char **pathp) { if (!*pathp) int_error(NO_CARET, "Cannot expand empty path"); if ((*pathp)[0] == '~' && (*pathp)[1] == DIRSEP1) { if (user_homedir) { size_t n = strlen(*pathp); *pathp = gp_realloc(*pathp, n + strlen(user_homedir), "tilde expansion"); /* include null at the end ... */ memmove(*pathp + strlen(user_homedir) - 1, *pathp, n + 1); memcpy(*pathp, user_homedir, strlen(user_homedir)); } else int_warn(NO_CARET, "HOME not set - cannot expand tilde"); } } static void init_memory() { extend_input_line(); extend_token_table(); replot_line = gp_alloc(1, "string"); *replot_line = NUL; } #ifdef OS2 int ExecuteMacro(char *argv, int namelength) { RXSTRING rxRc; RXSTRING rxArg[2]; int rxArgCount = 0; char pszName[CCHMAXPATH]; char *rxArgStr; short sRc; long rc; if (namelength >= sizeof(pszName)) return 1; /* FIXME HBB 20010121: 3rd argument doesn't make sense. Either * this should be sizeof(pszName), or it shouldn't use * safe_strncpy(), here */ safe_strncpy(pszName, argv, namelength + 1); rxArgStr = &argv[namelength]; RXSTRPTR(rxRc) = NULL; #if 0 /* C-like calling of function: program name is first parameter. In REXX you would have to use Parse Arg param0, param1 to get the program name in param0 and the arguments in param1. Some versions before gnuplot 3.7pl1 used a similar approach but passed program name and arguments in a single string: (==> Parse Arg param0 param1) */ MAKERXSTRING(rxArg[0], pszName, strlen(pszName)); rxArgCount++; if (*rxArgStr) { MAKERXSTRING(rxArg[1], rxArgStr, strlen(rxArgStr)); rxArgCount++; } #else /* REXX standard calling (gnuplot 3.7pl1 and above): The program name is not supplied and so all actual arguments are in a single string: Parse Arg param We even handle blanks like cmd.exe when calling REXX programs. */ if (*rxArgStr) { MAKERXSTRING(rxArg[0], rxArgStr, strlen(rxArgStr)); rxArgCount++; } #endif CallFromRexx = TRUE; rc = RexxStart( rxArgCount, rxArg, pszName, NULL, "GNUPLOT", RXCOMMAND, NULL, &sRc, &rxRc); CallFromRexx = FALSE; /* am: a word WRT errors codes: the negative ones don't seem to have symbolic names, you can get them from the OREXX reference, they're not in REXX Programming Guide - no idea where to retrieve them from a Warp 3 reference ?? The positive ones are somehow referenced in REXXPG */ if (rc < 0) { /* REXX error */ } else if (rc > 0) { /* Interpreter couldn't be started */ if (rc == -4) /* run was cancelled, but don't give error message */ rc = 0; } else if (rc==0) { /* all was fine */ } /* We don't we try to use rxRc ? BTW, don't use free() instead since it's allocated inside RexxStart() and not in our executable using the EMX libraries */ if (RXSTRPTR(rxRc)) /* I guess it's NULL if something major went wrong, NULL strings are usually not part of the REXX language ... */ DosFreeMem(rxRc.strptr); return rc; } /* Rexx command line interface */ ULONG RexxInterface(PRXSTRING rxCmd, PUSHORT pusErr, PRXSTRING rxRc) { int rc; static JMP_BUF keepenv; int cmdlen; memcpy(keepenv, command_line_env, sizeof(JMP_BUF)); if (!SETJMP(command_line_env, 1)) { /* Set variable gp_input_line. Watch out for line length of NOT_ZERO_TERMINATED strings ! */ cmdlen = rxCmd->strlength + 1; /* FIXME HBB 20010121: 3rd argument doesn't make sense. Either * this should be gp_input_line_len, or it shouldn't use * safe_strncpy(), here */ safe_strncpy(gp_input_line, rxCmd->strptr, cmdlen); gp_input_line[cmdlen] = NUL; rc = do_line(); *pusErr = RXSUBCOM_OK; rxRc->strptr[0] = rc + '0'; rxRc->strptr[1] = NUL; rxRc->strlength = strlen(rxRc->strptr); } else { /* We end up here when bail_to_command_line() is called. Therefore sometimes this call should be avoided when executing a REXX program (e.g. 'Cancel' from PM GUI after a 'pause -1' command) */ *pusErr = RXSUBCOM_ERROR; RexxSetHalt(getpid(), 1); } memcpy(command_line_env, keepenv, sizeof(JMP_BUF)); return 0; } #endif /* OS2 */ #ifdef GNUPLOT_HISTORY /* cancel_history() can be called by terminals that fork a helper process * to make sure that the helper doesn't trash the history file on exit. */ void cancel_history() { expanded_history_filename = NULL; } # if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) static void wrapper_for_write_history() { if (!expanded_history_filename) return; if (history_is_stifled()) unstifle_history(); if (gnuplot_history_size >= 0) stifle_history (gnuplot_history_size); /* returns 0 on success */ if (write_history(expanded_history_filename)) fprintf (stderr, "Warning: Could not write history file!!!\n"); unstifle_history(); } # else /* HAVE_LIBREADLINE || HAVE_LIBEDITLINE */ /* version for gnuplot's own write_history */ static void wrapper_for_write_history() { /* What we really want to do is truncate(expanded_history_filename), but this is only available on BSD compatible systems */ if (!expanded_history_filename) return; remove(expanded_history_filename); if (gnuplot_history_size < 0) write_history(expanded_history_filename); else write_history_n(gnuplot_history_size, expanded_history_filename, "w"); } # endif /* HAVE_LIBREADLINE || HAVE_LIBEDITLINE */ #endif /* GNUPLOT_HISTORY */ void restrict_popen() { if (!successful_initialization) int_error(NO_CARET,"Pipes and shell commands not permitted during initialization"); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/graphics.c������������������������������������������������������������������������0000644�0004711�0000144�00000661656�12222614363�012711� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: graphics.c,v 1.379.2.24 2013/10/01 03:00:06 sfeam Exp $"); } #endif /* GNUPLOT - graphics.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* Daniel Sebald: added plot_image_or_update_axes() routine for images. * (5 November 2003) */ #include "graphics.h" #include "color.h" #include "pm3d.h" #include "plot.h" #include "alloc.h" #include "axis.h" #include "command.h" #include "misc.h" #include "gp_time.h" #include "gadgets.h" #include "plot2d.h" /* for boxwidth */ #include "term_api.h" #include "util.h" /* Externally visible/modifiable status variables */ /* 'set offset' --- artificial buffer zone between coordinate axes and * the area actually covered by the data */ t_position loff = {first_axes, first_axes, first_axes, 0.0, 0.0, 0.0}; t_position roff = {first_axes, first_axes, first_axes, 0.0, 0.0, 0.0}; t_position toff = {first_axes, first_axes, first_axes, 0.0, 0.0, 0.0}; t_position boff = {first_axes, first_axes, first_axes, 0.0, 0.0, 0.0}; /* set bars */ double bar_size = 1.0; int bar_layer = LAYER_FRONT; /* key placement is calculated in boundary, so we need file-wide variables * To simplify adjustments to the key, we set all these once [depends on * key->reverse] and use them throughout. */ /*{{{ local and global variables */ static int key_sample_width; /* width of line sample */ static int key_sample_left; /* offset from x for left of line sample */ static int key_sample_right; /* offset from x for right of line sample */ static int key_point_offset; /* offset from x for point sample */ static int key_text_left; /* offset from x for left-justified text */ static int key_text_right; /* offset from x for right-justified text */ static int key_size_left; /* size of left bit of key (text or sample, depends on key->reverse) */ static int key_size_right; /* size of right part of key (including padding) */ static int max_ptitl_len = 0; /* max length of plot-titles (keys) */ static double ktitl_lines = 0; /* no lines in key->title (key header) */ static int ptitl_cnt; /* count keys with len > 0 */ static int key_rows, key_col_wth, yl_ref; /* set by tic_callback - how large to draw polar radii */ static double largest_polar_circle; static int xlablin, x2lablin, ylablin, y2lablin, titlelin, xticlin, x2ticlin; static int key_entry_height; /* bigger of t->v_size, pointsize*t->v_tick */ static int p_width, p_height; /* pointsize * { t->h_tic | t->v_tic } */ /* used for filled points */ static t_colorspec background_fill = BACKGROUND_COLORSPEC; /* there are several things on right of plot - key, y2tics and y2label * when working out boundary, save posn of y2label for later... * Same goes for x2label. */ static int ylabel_x, y2label_x, xlabel_y, x2label_y, title_y, time_y, time_x; static int ylabel_y, y2label_y, xtic_y, x2tic_y, ytic_x, y2tic_x; /*}}} */ /* Status information for stacked histogram plots */ static struct coordinate GPHUGE *stackheight = NULL; /* top of previous row */ static int stack_count; /* points actually used */ static void place_histogram_titles __PROTO((void)); /*{{{ static fns and local macros */ static void recheck_ranges __PROTO((struct curve_points * plot)); static void plot_border __PROTO((void)); static void plot_impulses __PROTO((struct curve_points * plot, int yaxis_x, int xaxis_y)); static void plot_lines __PROTO((struct curve_points * plot)); static void plot_points __PROTO((struct curve_points * plot)); static void plot_dots __PROTO((struct curve_points * plot)); static void plot_bars __PROTO((struct curve_points * plot)); static void plot_boxes __PROTO((struct curve_points * plot, int xaxis_y)); static void plot_filledcurves __PROTO((struct curve_points * plot)); static void finish_filled_curve __PROTO((int, gpiPoint *, struct curve_points *)); static void plot_betweencurves __PROTO((struct curve_points * plot)); static void fill_missing_corners __PROTO((gpiPoint *corners, int *points, int exit, int reentry, int updown, int leftright)); static void fill_between __PROTO((double, double, double, double, double, double, double, double, struct curve_points *)); static TBOOLEAN bound_intersect __PROTO((struct coordinate GPHUGE * points, int i, double *ex, double *ey, filledcurves_opts *filledcurves_options)); static void plot_vectors __PROTO((struct curve_points * plot)); static void plot_f_bars __PROTO((struct curve_points * plot)); static void plot_c_bars __PROTO((struct curve_points * plot)); static void plot_boxplot __PROTO((struct curve_points * plot)); static int filter_boxplot_factor __PROTO((struct curve_points *plot, int level)); static void place_labels __PROTO((struct text_label * listhead, int layer, TBOOLEAN clip)); static void place_arrows __PROTO((int layer)); static void place_grid __PROTO((void)); static void place_raxis __PROTO((void)); static int edge_intersect __PROTO((struct coordinate GPHUGE * points, int i, double *ex, double *ey)); static TBOOLEAN two_edge_intersect __PROTO((struct coordinate GPHUGE * points, int i, double *lx, double *ly)); static TBOOLEAN two_edge_intersect_steps __PROTO((struct coordinate GPHUGE * points, int i, double *lx, double *ly)); static void plot_steps __PROTO((struct curve_points * plot)); /* JG */ static void plot_fsteps __PROTO((struct curve_points * plot)); /* HOE */ static void plot_histeps __PROTO((struct curve_points * plot)); /* CAC */ static void histeps_horizontal __PROTO((int *xl, int *yl, double x1, double x2, double y)); /* CAC */ static void histeps_vertical __PROTO((int *xl, int *yl, double x, double y1, double y2)); /* CAC */ static void edge_intersect_steps __PROTO((struct coordinate GPHUGE * points, int i, double *ex, double *ey)); /* JG */ static void edge_intersect_fsteps __PROTO((struct coordinate GPHUGE * points, int i, double *ex, double *ey)); /* HOE */ static TBOOLEAN two_edge_intersect_steps __PROTO((struct coordinate GPHUGE * points, int i, double *lx, double *ly)); /* JG */ static TBOOLEAN two_edge_intersect_fsteps __PROTO((struct coordinate GPHUGE * points, int i, double *lx, double *ly)); static void boundary __PROTO((struct curve_points * plots, int count)); /* HBB 20010118: these should be static, but can't --- HP-UX assembler bug */ void ytick2d_callback __PROTO((AXIS_INDEX, double place, char *text, struct lp_style_type grid, struct ticmark *userlabels)); void xtick2d_callback __PROTO((AXIS_INDEX, double place, char *text, struct lp_style_type grid, struct ticmark *userlabels)); int histeps_compare __PROTO((SORTFUNC_ARGS p1, SORTFUNC_ARGS p2)); static void get_arrow __PROTO((struct arrow_def* arrow, int* sx, int* sy, int* ex, int* ey)); static void map_position_double __PROTO((struct position* pos, double* x, double* y, const char* what)); static int find_maxl_keys __PROTO((struct curve_points *plots, int count, int *kcnt)); static void do_key_layout __PROTO((legend_key *key, TBOOLEAN key_pass, int *xl, int *yl)); static void do_key_sample __PROTO((struct curve_points *this_plot, legend_key *key, char *title, struct termentry *t, int xl, int yl)); static TBOOLEAN check_for_variable_color __PROTO((struct curve_points *plot, double *colorvalue)); #ifdef EAM_OBJECTS static void plot_circles __PROTO((struct curve_points *plot)); static void plot_ellipses __PROTO((struct curve_points *plot)); static void do_rectangle __PROTO((int dimensions, t_object *this_object, int style)); #endif /* for plotting error bars * half the width of error bar tic mark */ #define ERRORBARTIC GPMAX((t->h_tic/2),1) /* For tracking exit and re-entry of bounding curves that extend out of plot */ /* these must match the bit values returned by clip_point(). */ #define LEFT_EDGE 1 #define RIGHT_EDGE 2 #define BOTTOM_EDGE 4 #define TOP_EDGE 8 #define clip_fill ((plot->filledcurves_options.closeto == FILLEDCURVES_CLOSED) || clip_lines2) #define f_max(a,b) GPMAX((a),(b)) #define f_min(a,b) GPMIN((a),(b)) #define i_inrange(z,a,b) inrange((z),(a),(b)) /* True if a and b have the same sign or zero (positive or negative) */ #define samesign(a,b) ((a) * (b) >= 0) /*}}} */ /*{{{ more variables */ /* we make a local copy of the 'key' variable so that if something * goes wrong, we can switch it off temporarily */ static TBOOLEAN lkey; /*}}} */ static int find_maxl_keys(struct curve_points *plots, int count, int *kcnt) { int mlen, len, curve, cnt; int previous_plot_style = 0; struct curve_points *this_plot; mlen = cnt = 0; this_plot = plots; for (curve = 0; curve < count; this_plot = this_plot->next, curve++) { if (this_plot->title && !this_plot->title_is_suppressed) { ignore_enhanced(this_plot->title_no_enhanced); len = estimate_strlen(this_plot->title); if (len != 0) { cnt++; if (len > mlen) mlen = len; } ignore_enhanced(FALSE); } /* Check for new histogram here and save space for divider */ if (this_plot->plot_style == HISTOGRAMS && previous_plot_style == HISTOGRAMS && this_plot->histogram_sequence == 0 && cnt > 1) cnt++; /* Check for column-stacked histogram with key entries */ if (this_plot->plot_style == HISTOGRAMS && this_plot->labels) { text_label *key_entry = this_plot->labels->next; for (; key_entry; key_entry=key_entry->next) { cnt++; len = key_entry->text ? estimate_strlen(key_entry->text) : 0; if (len > mlen) mlen = len; } } previous_plot_style = this_plot->plot_style; } if (kcnt != NULL) *kcnt = cnt; return (mlen); } /*{{{ boundary() */ /* borders of plotting area * computed once on every call to do_plot * * The order in which things is done is getting pretty critical: * plot_bounds.ytop depends on title, x2label, ylabels (if no rotated text) * plot_bounds.ybot depends on key, if "under" * once we have these, we can setup the y1 and y2 tics and the * only then can we calculate plot_bounds.xleft and plot_bounds.xright * plot_bounds.xright depends also on key RIGHT * then we can do x and x2 tics * * For set size ratio ..., everything depends on everything else... * not really a lot we can do about that, so we lose if the plot has to * be reduced vertically. But the chances are the * change will not be very big, so the number of tics will not * change dramatically. * * Margin computation redone by Dick Crawford (rccrawford@lanl.gov) 4/98 */ static void boundary(struct curve_points *plots, int count) { int yticlin = 0, y2ticlin = 0, timelin = 0; legend_key *key = &keyT; struct termentry *t = term; int key_h, key_w; /* FIXME HBB 20000506: this line is the reason for the 'D0,1;D1,0' * bug in the HPGL terminal: we actually carry out the switch of * text orientation, just for finding out if the terminal can do * that. *But* we're not in graphical mode, yet, so this call * yields undesirable results */ int can_rotate = (*t->text_angle) (TEXT_VERTICAL); int xtic_textheight; /* height of xtic labels */ int x2tic_textheight; /* height of x2tic labels */ int title_textheight; /* height of title */ int xlabel_textheight; /* height of xlabel */ int x2label_textheight; /* height of x2label */ int timetop_textheight; /* height of timestamp (if at top) */ int timebot_textheight; /* height of timestamp (if at bottom) */ int ylabel_textheight; /* height of (unrotated) ylabel */ int y2label_textheight; /* height of (unrotated) y2label */ int ylabel_textwidth; /* width of (rotated) ylabel */ int y2label_textwidth; /* width of (rotated) y2label */ int timelabel_textwidth; /* width of timestamp */ int ytic_textwidth; /* width of ytic labels */ int y2tic_textwidth; /* width of y2tic labels */ int x2tic_height; /* 0 for tic_in or no x2tics, ticscale*v_tic otherwise */ int xtic_textwidth=0; /* amount by which the xtic label protrude to the right */ int xtic_height; int ytic_width; int y2tic_width; int key_xleft = 0; /* Amount of space on the left required by the key */ int key_cols = 1; /* # columns of keys */ /* figure out which rotatable items are to be rotated * (ylabel and y2label are rotated if possible) */ int vertical_timelabel = can_rotate ? timelabel_rotate : 0; int vertical_xtics = can_rotate ? axis_array[FIRST_X_AXIS].tic_rotate : 0; int vertical_x2tics = can_rotate ? axis_array[SECOND_X_AXIS].tic_rotate : 0; int vertical_ytics = can_rotate ? axis_array[FIRST_Y_AXIS].tic_rotate : 0; int vertical_y2tics = can_rotate ? axis_array[SECOND_Y_AXIS].tic_rotate : 0; TBOOLEAN shift_labels_to_border = FALSE; lkey = key->visible; /* but we may have to disable it later */ xticlin = ylablin = y2lablin = xlablin = x2lablin = titlelin = 0; /*{{{ count lines in labels and tics */ if (title.text) label_width(title.text, &titlelin); if (axis_array[FIRST_X_AXIS].label.text) label_width(axis_array[FIRST_X_AXIS].label.text, &xlablin); /* This should go *inside* label_width(), but it messes up the key title */ /* Imperfect check for subscripts or superscripts */ if ((term->flags & TERM_ENHANCED_TEXT) && axis_array[FIRST_X_AXIS].label.text && strpbrk(axis_array[FIRST_X_AXIS].label.text, "_^")) xlablin++; if (axis_array[SECOND_X_AXIS].label.text) label_width(axis_array[SECOND_X_AXIS].label.text, &x2lablin); if (axis_array[FIRST_Y_AXIS].label.text) label_width(axis_array[FIRST_Y_AXIS].label.text, &ylablin); if (axis_array[SECOND_Y_AXIS].label.text) label_width(axis_array[SECOND_Y_AXIS].label.text, &y2lablin); if (axis_array[FIRST_X_AXIS].ticmode) { label_width(axis_array[FIRST_X_AXIS].formatstring, &xticlin); /* Reserve room for user tic labels even if format of autoticks is "" */ if (xticlin == 0 && axis_array[FIRST_X_AXIS].ticdef.def.user) xticlin = 1; } if (axis_array[SECOND_X_AXIS].ticmode) label_width(axis_array[SECOND_X_AXIS].formatstring, &x2ticlin); if (axis_array[FIRST_Y_AXIS].ticmode) label_width(axis_array[FIRST_Y_AXIS].formatstring, &yticlin); if (axis_array[SECOND_Y_AXIS].ticmode) label_width(axis_array[SECOND_Y_AXIS].formatstring, &y2ticlin); if (timelabel.text) label_width(timelabel.text, &timelin); /*}}} */ /*{{{ preliminary plot_bounds.ytop calculation */ /* first compute heights of things to be written in the margin */ /* title */ if (titlelin) { double tmpx, tmpy; map_position_r(&(title.offset), &tmpx, &tmpy, "boundary"); title_textheight = (int) ((titlelin + 1) * (t->v_char) + tmpy); } else title_textheight = 0; /* x2label */ if (x2lablin) { double tmpx, tmpy; map_position_r(&(axis_array[SECOND_X_AXIS].label.offset), &tmpx, &tmpy, "boundary"); x2label_textheight = (int) (x2lablin * t->v_char + tmpy); if (!axis_array[SECOND_X_AXIS].ticmode) x2label_textheight += 0.5 * t->v_char; } else x2label_textheight = 0; /* tic labels */ if (axis_array[SECOND_X_AXIS].ticmode & TICS_ON_BORDER) { /* ought to consider tics on axes if axis near border */ x2tic_textheight = (int) (x2ticlin * t->v_char); } else x2tic_textheight = 0; /* tics */ if (!axis_array[SECOND_X_AXIS].tic_in && ((axis_array[SECOND_X_AXIS].ticmode & TICS_ON_BORDER) || ((axis_array[FIRST_X_AXIS].ticmode & TICS_MIRROR) && (axis_array[FIRST_X_AXIS].ticmode & TICS_ON_BORDER)))) x2tic_height = (int) (t->v_tic * axis_array[SECOND_X_AXIS].ticscale); else x2tic_height = 0; /* timestamp */ if (timelabel.text && !timelabel_bottom) { double tmpx, tmpy; map_position_r(&(timelabel.offset), &tmpx, &tmpy, "boundary"); timetop_textheight = (int) ((timelin + 2) * t->v_char + tmpy); } else timetop_textheight = 0; /* horizontal ylabel */ if (axis_array[FIRST_Y_AXIS].label.text && !can_rotate) { double tmpx, tmpy; map_position_r(&(axis_array[FIRST_Y_AXIS].label.offset), &tmpx, &tmpy, "boundary"); ylabel_textheight = (int) (ylablin * t->v_char + tmpy); } else ylabel_textheight = 0; /* horizontal y2label */ if (axis_array[SECOND_Y_AXIS].label.text && !can_rotate) { double tmpx, tmpy; map_position_r(&(axis_array[SECOND_Y_AXIS].label.offset), &tmpx, &tmpy, "boundary"); y2label_textheight = (int) (y2lablin * t->v_char + tmpy); } else y2label_textheight = 0; /* compute plot_bounds.ytop from the various components * unless tmargin is explicitly specified */ plot_bounds.ytop = (int) (0.5 + (ysize + yoffset) * (t->ymax-1)); if (tmargin.scalex == screen) { /* Specified as absolute position on the canvas */ plot_bounds.ytop = (tmargin.x) * (float)(t->ymax-1); } else if (tmargin.x >=0) { /* Specified in terms of character height */ plot_bounds.ytop -= (int)(tmargin.x * (float)t->v_char + 0.5); } else { /* Auto-calculation of space required */ int top_margin = x2label_textheight + title_textheight; if (timetop_textheight + ylabel_textheight > top_margin) top_margin = timetop_textheight + ylabel_textheight; if (y2label_textheight > top_margin) top_margin = y2label_textheight; top_margin += x2tic_height + x2tic_textheight; /* x2tic_height and x2tic_textheight are computed as only the * relevant heights, but they nonetheless need a blank * space above them */ if (top_margin > x2tic_height) top_margin += (int) t->v_char; plot_bounds.ytop -= top_margin; if (plot_bounds.ytop == (int)(0.5 + (ysize + yoffset) * (t->ymax-1))) { /* make room for the end of rotated ytics or y2tics */ plot_bounds.ytop -= (int) (t->h_char * 2); } } /* end of preliminary plot_bounds.ytop calculation }}} */ /*{{{ preliminary plot_bounds.xleft, needed for "under" */ if (lmargin.scalex == screen) plot_bounds.xleft = lmargin.x * (float)t->xmax; else plot_bounds.xleft = xoffset * t->xmax + t->h_char * (lmargin.x >= 0 ? lmargin.x : 1); /*}}} */ /*{{{ tentative plot_bounds.xright, needed for "under" */ if (rmargin.scalex == screen) plot_bounds.xright = rmargin.x * (float)(t->xmax - 1); else plot_bounds.xright = (xsize + xoffset) * (t->xmax - 1) - t->h_char * (rmargin.x >= 0 ? rmargin.x : 2); /*}}} */ /*{{{ preliminary plot_bounds.ybot calculation * first compute heights of labels and tics */ /* tic labels */ shift_labels_to_border = FALSE; if (axis_array[FIRST_X_AXIS].ticmode & TICS_ON_AXIS) { /* FIXME: This test for how close the axis is to the border does not match */ /* the tests in axis_output_tics(), and assumes FIRST_Y_AXIS. */ if (!inrange(0.0, axis_array[FIRST_Y_AXIS].min, axis_array[FIRST_Y_AXIS].max)) shift_labels_to_border = TRUE; if (0.05 > fabs( axis_array[FIRST_Y_AXIS].min / (axis_array[FIRST_Y_AXIS].max - axis_array[FIRST_Y_AXIS].min))) shift_labels_to_border = TRUE; } if ((axis_array[FIRST_X_AXIS].ticmode & TICS_ON_BORDER) || shift_labels_to_border) { xtic_textheight = (int) (t->v_char * (xticlin + 1)); } else xtic_textheight = 0; /* tics */ if (!axis_array[FIRST_X_AXIS].tic_in && ((axis_array[FIRST_X_AXIS].ticmode & TICS_ON_BORDER) || ((axis_array[SECOND_X_AXIS].ticmode & TICS_MIRROR) && (axis_array[SECOND_X_AXIS].ticmode & TICS_ON_BORDER)))) xtic_height = (int) (t->v_tic * axis_array[FIRST_X_AXIS].ticscale); else xtic_height = 0; /* xlabel */ if (xlablin) { double tmpx, tmpy; map_position_r(&(axis_array[FIRST_X_AXIS].label.offset), &tmpx, &tmpy, "boundary"); /* offset is subtracted because if > 0, the margin is smaller */ /* textheight is inflated by 0.2 to allow descenders to clear bottom of canvas */ xlabel_textheight = (((float)xlablin + 0.2) * t->v_char - tmpy); if (!axis_array[FIRST_X_AXIS].ticmode) xlabel_textheight += 0.5 * t->v_char; } else xlabel_textheight = 0; /* timestamp */ if (timelabel.text && timelabel_bottom) { /* && !vertical_timelabel) * DBT 11-18-98 resize plot for vertical timelabels too ! */ double tmpx, tmpy; map_position_r(&(timelabel.offset), &tmpx, &tmpy, "boundary"); /* offset is subtracted because if . 0, the margin is smaller */ timebot_textheight = (int) (timelin * t->v_char - tmpy); } else timebot_textheight = 0; /* compute plot_bounds.ybot from the various components * unless bmargin is explicitly specified */ plot_bounds.ybot = yoffset * (float)t->ymax; if (bmargin.scalex == screen) { /* Absolute position for bottom of plot */ plot_bounds.ybot = bmargin.x * (float)t->ymax; } else if (bmargin.x >= 0) { /* Position based on specified character height */ plot_bounds.ybot += bmargin.x * (float)t->v_char + 0.5; } else { plot_bounds.ybot += xtic_height + xtic_textheight; if (xlabel_textheight > 0) plot_bounds.ybot += xlabel_textheight; if (timebot_textheight > 0) plot_bounds.ybot += timebot_textheight; /* HBB 19990616: round to nearest integer, required to escape * floating point inaccuracies */ if (plot_bounds.ybot == (int) (t->ymax * yoffset)) { /* make room for the end of rotated ytics or y2tics */ plot_bounds.ybot += (int) (t->h_char * 2); } } /* end of preliminary plot_bounds.ybot calculation }}} */ if (lkey) { TBOOLEAN key_panic = FALSE; /*{{{ essential key features */ p_width = pointsize * t->h_tic; p_height = pointsize * t->v_tic; if (key->swidth >= 0) key_sample_width = key->swidth * t->h_char + p_width; else key_sample_width = 0; key_entry_height = p_height * 1.25 * key->vert_factor; if (key_entry_height < t->v_char) key_entry_height = t->v_char * key->vert_factor; /* HBB 20020122: safeguard to prevent division by zero later */ if (key_entry_height == 0) key_entry_height = 1; /* Count max_len key and number keys with len > 0 */ max_ptitl_len = find_maxl_keys(plots, count, &ptitl_cnt); /* Key title length and height */ if (key->title) { int ytlen, ytheight; ytlen = label_width(key->title, &ytheight); ytlen -= key->swidth + 2; /* EAM FIXME */ if ((ytlen > max_ptitl_len) && (key->stack_dir != GPKEY_HORIZONTAL)) max_ptitl_len = ytlen; ktitl_lines = (int)ytheight; } if (key->reverse) { key_sample_left = -key_sample_width; key_sample_right = 0; /* if key width is being used, adjust right-justified text */ key_text_left = t->h_char; key_text_right = t->h_char * (max_ptitl_len + 1 + key->width_fix); key_size_left = t->h_char - key_sample_left; /* sample left is -ve */ key_size_right = key_text_right; } else { key_sample_left = 0; key_sample_right = key_sample_width; /* if key width is being used, adjust left-justified text */ key_text_left = -(int) (t->h_char * (max_ptitl_len + 1 + key->width_fix)); key_text_right = -(int) t->h_char; key_size_left = -key_text_left; key_size_right = key_sample_right + t->h_char; } key_point_offset = (key_sample_left + key_sample_right) / 2; /* advance width for cols */ key_col_wth = key_size_left + key_size_right; key_rows = ptitl_cnt; key_cols = 1; /* calculate rows and cols for key */ if (key->stack_dir == GPKEY_HORIZONTAL) { /* maximise no cols, limited by label-length */ key_cols = (int) (plot_bounds.xright - plot_bounds.xleft) / key_col_wth; if (key->maxcols > 0 && key_cols > key->maxcols) key_cols = key->maxcols; /* EAM Dec 2004 - Rather than turn off the key, try to squeeze */ if (key_cols == 0) { key_cols = 1; key_panic = TRUE; key_col_wth = (plot_bounds.xright - plot_bounds.xleft); } key_rows = (int) (ptitl_cnt + key_cols - 1) / key_cols; /* now calculate actual no cols depending on no rows */ key_cols = (key_rows == 0) ? 1 : (int) (ptitl_cnt + key_rows - 1) / key_rows; if (key_cols == 0) { key_cols = 1; key_panic = TRUE; } } else { /* maximise no rows, limited by plot_bounds.ytop-plot_bounds.ybot */ int i = (int) (plot_bounds.ytop - plot_bounds.ybot - key->height_fix * t->v_char - (ktitl_lines + 1) * t->v_char) / key_entry_height; if (key->maxrows > 0 && i > key->maxrows) i = key->maxrows; if (i == 0) { i = 1; key_panic = TRUE; } if (ptitl_cnt > i) { key_cols = (int) (ptitl_cnt + i - 1) / i; /* now calculate actual no rows depending on no cols */ if (key_cols == 0) { key_cols = 1; key_panic = TRUE; } key_rows = (int) (ptitl_cnt + key_cols - 1) / key_cols; } } /* adjust for outside key, leave manually set margins alone */ if ((key->region == GPKEY_AUTO_EXTERIOR_LRTBC && (key->vpos != JUST_CENTRE || key->hpos != CENTRE)) || key->region == GPKEY_AUTO_EXTERIOR_MARGIN) { int more = 0; if (key->margin == GPKEY_BMARGIN && bmargin.x < 0) { more = key_entry_height * key_rows + (int) (t->v_char * (ktitl_lines + 1)) + (int) (key->height_fix * t->v_char); if (plot_bounds.ybot + more > plot_bounds.ytop) key_panic = TRUE; else plot_bounds.ybot += more; } else if (key->margin == GPKEY_TMARGIN && tmargin.x < 0) { more = key_entry_height * key_rows + (int) (t->v_char * (ktitl_lines + 1)) - (int) (key->height_fix * t->v_char); if (plot_bounds.ytop - more < plot_bounds.ybot) key_panic = TRUE; else plot_bounds.ytop -= more; } else if (key->margin == GPKEY_LMARGIN && lmargin.x < 0) { more = key_col_wth * key_cols; if (plot_bounds.xleft + more > plot_bounds.xright) key_panic = TRUE; else key_xleft = more; plot_bounds.xleft += key_xleft; } else if (key->margin == GPKEY_RMARGIN && rmargin.x < 0) { more = key_col_wth * key_cols; if (plot_bounds.xright - more < plot_bounds.xleft) key_panic = TRUE; else plot_bounds.xright -= more; } } /* warn if we had to punt on key size calculations */ if (key_panic) int_warn(NO_CARET, "Warning - difficulty fitting plot titles into key"); /*}}} */ } /*{{{ set up y and y2 tics */ setup_tics(FIRST_Y_AXIS, 20); setup_tics(SECOND_Y_AXIS, 20); /*}}} */ /* Adjust color axis limits if necessary. */ if (is_plot_with_palette()) { set_cbminmax(); axis_checked_extend_empty_range(COLOR_AXIS, "All points of color axis undefined."); if (color_box.where != SMCOLOR_BOX_NO) setup_tics(COLOR_AXIS, 20); } /*{{{ recompute plot_bounds.xleft based on widths of ytics, ylabel etc unless it has been explicitly set by lmargin */ /* tic labels */ shift_labels_to_border = FALSE; if (axis_array[FIRST_Y_AXIS].ticmode & TICS_ON_AXIS) { /* FIXME: This test for how close the axis is to the border does not match */ /* the tests in axis_output_tics(), and assumes FIRST_X_AXIS. */ if (!inrange(0.0, axis_array[FIRST_X_AXIS].min, axis_array[FIRST_X_AXIS].max)) shift_labels_to_border = TRUE; if (0.1 > fabs( axis_array[FIRST_X_AXIS].min / (axis_array[FIRST_X_AXIS].max - axis_array[FIRST_X_AXIS].min))) shift_labels_to_border = TRUE; } if ((axis_array[FIRST_Y_AXIS].ticmode & TICS_ON_BORDER) || shift_labels_to_border) { if (vertical_ytics) /* HBB: we will later add some white space as part of this, so * reserve two more rows (one above, one below the text ...). * Same will be done to similar calc.'s elsewhere */ ytic_textwidth = (int) (t->v_char * (yticlin + 2)); else { widest_tic_strlen = 0; /* reset the global variable ... */ /* get gen_tics to call widest_tic_callback with all labels * the latter sets widest_tic_strlen to the length of the widest * one ought to consider tics on axis if axis near border... */ gen_tics(FIRST_Y_AXIS, /* 0, */ widest_tic_callback); ytic_textwidth = (int) (t->h_char * (widest_tic_strlen + 2)); } } else { ytic_textwidth = 0; } /* tics */ if (!axis_array[FIRST_Y_AXIS].tic_in && ((axis_array[FIRST_Y_AXIS].ticmode & TICS_ON_BORDER) || ((axis_array[SECOND_Y_AXIS].ticmode & TICS_MIRROR) && (axis_array[SECOND_Y_AXIS].ticmode & TICS_ON_BORDER)))) ytic_width = (int) (t->h_tic * axis_array[FIRST_Y_AXIS].ticscale); else ytic_width = 0; /* ylabel */ if (axis_array[FIRST_Y_AXIS].label.text && can_rotate) { double tmpx, tmpy; map_position_r(&(axis_array[FIRST_Y_AXIS].label.offset), &tmpx, &tmpy, "boundary"); ylabel_textwidth = (int) (ylablin * (t->v_char) - tmpx); if (!axis_array[FIRST_Y_AXIS].ticmode) ylabel_textwidth += 0.5 * t->v_char; } else /* this should get large for NEGATIVE ylabel.xoffsets DBT 11-5-98 */ ylabel_textwidth = 0; /* timestamp */ if (timelabel.text && vertical_timelabel) { double tmpx, tmpy; map_position_r(&(timelabel.offset), &tmpx, &tmpy, "boundary"); timelabel_textwidth = (int) ((timelin + 1.5) * t->v_char - tmpx); } else timelabel_textwidth = 0; if (lmargin.x < 0) { /* Auto-calculation */ double tmpx, tmpy; int space_to_left = key_xleft; if (space_to_left < timelabel_textwidth) space_to_left = timelabel_textwidth; if (space_to_left < ylabel_textwidth) space_to_left = ylabel_textwidth; plot_bounds.xleft = xoffset * t->xmax; plot_bounds.xleft += space_to_left; plot_bounds.xleft += ytic_width + ytic_textwidth; /* make sure plot_bounds.xleft is wide enough for a negatively * x-offset horizontal timestamp */ map_position_r(&(timelabel.offset), &tmpx, &tmpy, "boundary"); if (!vertical_timelabel && plot_bounds.xleft - ytic_width - ytic_textwidth < -(int) (tmpx)) plot_bounds.xleft = ytic_width + ytic_textwidth - (int) (tmpx); if (plot_bounds.xleft == (int) (t->xmax * xoffset)) { /* make room for end of xtic or x2tic label */ plot_bounds.xleft += (int) (t->h_char * 2); } /* DBT 12-3-98 extra margin just in case */ plot_bounds.xleft += 0.5 * t->h_char; } /* Note: we took care of explicit 'set lmargin foo' at line 492 */ /* end of plot_bounds.xleft calculation }}} */ /*{{{ recompute plot_bounds.xright based on widest y2tic. y2labels, key "outside" unless it has been explicitly set by rmargin */ /* tic labels */ if (axis_array[SECOND_Y_AXIS].ticmode & TICS_ON_BORDER) { if (vertical_y2tics) y2tic_textwidth = (int) (t->v_char * (y2ticlin + 2)); else { widest_tic_strlen = 0; /* reset the global variable ... */ /* get gen_tics to call widest_tic_callback with all labels * the latter sets widest_tic_strlen to the length of the widest * one ought to consider tics on axis if axis near border... */ gen_tics(SECOND_Y_AXIS, /* 0, */ widest_tic_callback); y2tic_textwidth = (int) (t->h_char * (widest_tic_strlen + 2)); } } else { y2tic_textwidth = 0; } /* EAM May 2009 * Check to see if any xtic labels are so long that they extend beyond * the right boundary of the plot. If so, allow extra room in the margin. * If the labels are too long to fit even with a big margin, too bad. */ if (axis_array[FIRST_X_AXIS].ticdef.def.user) { struct ticmark *tic = axis_array[FIRST_X_AXIS].ticdef.def.user; int maxrightlabel = plot_bounds.xright; /* We don't really know the plot layout yet, but try for an estimate */ AXIS_SETSCALE(FIRST_X_AXIS, plot_bounds.xleft, plot_bounds.xright); axis_set_graphical_range(FIRST_X_AXIS, plot_bounds.xleft, plot_bounds.xright); while (tic) { if (tic->label) { double xx; int length = estimate_strlen(tic->label) * cos(DEG2RAD * (double)(axis_array[FIRST_X_AXIS].tic_rotate)) * term->h_char; if (inrange(tic->position, axis_array[FIRST_X_AXIS].set_min, axis_array[FIRST_X_AXIS].set_max)) { xx = axis_log_value_checked(FIRST_X_AXIS, tic->position, "xtic"); xx = AXIS_MAP(FIRST_X_AXIS, xx); xx += (axis_array[FIRST_X_AXIS].tic_rotate) ? length : length /2; if (maxrightlabel < xx) maxrightlabel = xx; } } tic = tic->next; } xtic_textwidth = maxrightlabel - plot_bounds.xright; if (xtic_textwidth > (term->xmax / 4)) { xtic_textwidth = term->xmax / 4; int_warn(NO_CARET, "difficulty making room for xtic labels"); } } /* tics */ if (!axis_array[SECOND_Y_AXIS].tic_in && ((axis_array[SECOND_Y_AXIS].ticmode & TICS_ON_BORDER) || ((axis_array[FIRST_Y_AXIS].ticmode & TICS_MIRROR) && (axis_array[FIRST_Y_AXIS].ticmode & TICS_ON_BORDER)))) y2tic_width = (int) (t->h_tic * axis_array[SECOND_Y_AXIS].ticscale); else y2tic_width = 0; /* y2label */ if (can_rotate && axis_array[SECOND_Y_AXIS].label.text) { double tmpx, tmpy; map_position_r(&(axis_array[SECOND_Y_AXIS].label.offset), &tmpx, &tmpy, "boundary"); y2label_textwidth = (int) (y2lablin * t->v_char + tmpx); if (!axis_array[SECOND_Y_AXIS].ticmode) y2label_textwidth += 0.5 * t->v_char; } else y2label_textwidth = 0; /* Make room for the color box if needed. */ if (rmargin.scalex != screen) { if (is_plot_with_colorbox()) { #define COLORBOX_SCALE 0.100 #define WIDEST_COLORBOX_TICTEXT 3 if ((color_box.where != SMCOLOR_BOX_NO) && (color_box.where != SMCOLOR_BOX_USER)) { plot_bounds.xright -= (int) (plot_bounds.xright-plot_bounds.xleft)*COLORBOX_SCALE; plot_bounds.xright -= (int) ((t->h_char) * WIDEST_COLORBOX_TICTEXT); } color_box.xoffset = 0; } if (rmargin.x < 0) { color_box.xoffset = plot_bounds.xright; plot_bounds.xright -= y2tic_width + y2tic_textwidth; if (y2label_textwidth > 0) plot_bounds.xright -= y2label_textwidth; if (plot_bounds.xright > (xsize+xoffset)*(t->xmax-1) - (t->h_char * 2)) plot_bounds.xright = (xsize+xoffset)*(t->xmax-1) - (t->h_char * 2); color_box.xoffset -= plot_bounds.xright; /* EAM 2009 - protruding xtic labels */ if ((term->xmax - plot_bounds.xright) < xtic_textwidth) plot_bounds.xright = term->xmax - xtic_textwidth; /* DBT 12-3-98 extra margin just in case */ plot_bounds.xright -= 1.0 * t->h_char; } /* Note: we took care of explicit 'set rmargin foo' at line 502 */ } /* end of plot_bounds.xright calculation }}} */ /*{{{ set up x and x2 tics */ /* we should base the guide on the width of the xtics, but we cannot * use widest_tics until tics are set up. Bit of a downer - let us * assume tics are 5 characters wide */ /* HBB 20001205: moved this block to before aspect_ratio is * applied: setup_tics may extend the ranges, which would distort * the aspect ratio */ setup_tics(FIRST_X_AXIS, 20); setup_tics(SECOND_X_AXIS, 20); if (polar) setup_tics(POLAR_AXIS, 10); /* Modify the bounding box to fit the aspect ratio, if any was * given. */ if (aspect_ratio != 0.0) { double current_aspect_ratio; if (aspect_ratio < 0 && (X_AXIS.max - X_AXIS.min) != 0.0 ) { current_aspect_ratio = - aspect_ratio * fabs((Y_AXIS.max - Y_AXIS.min) / (X_AXIS.max - X_AXIS.min)); } else current_aspect_ratio = aspect_ratio; /* Set aspect ratio if valid and sensible */ /* EAM Mar 2008 - fixed borders take precedence over centering */ if (current_aspect_ratio >= 0.01 && current_aspect_ratio <= 100.0) { double current = ((double) (plot_bounds.ytop - plot_bounds.ybot)) / (plot_bounds.xright - plot_bounds.xleft); double required = (current_aspect_ratio * t->v_tic) / t->h_tic; if (current > required) { /* too tall */ int old_height = plot_bounds.ytop - plot_bounds.ybot; int new_height = required * (plot_bounds.xright - plot_bounds.xleft); if (bmargin.scalex == screen) plot_bounds.ytop = plot_bounds.ybot + new_height; else if (tmargin.scalex == screen) plot_bounds.ybot = plot_bounds.ytop - new_height; else { plot_bounds.ybot += (old_height - new_height) / 2; plot_bounds.ytop -= (old_height - new_height) / 2; } } else { int old_width = plot_bounds.xright - plot_bounds.xleft; int new_width = (plot_bounds.ytop - plot_bounds.ybot) / required; if (lmargin.scalex == screen) plot_bounds.xright = plot_bounds.xleft + new_width; else if (rmargin.scalex == screen) plot_bounds.xleft = plot_bounds.xright - new_width; else { plot_bounds.xleft += (old_width - new_width) / 2; plot_bounds.xright -= (old_width - new_width) / 2; } } } } /* Calculate space needed for tic label rotation. * If [tb]margin is auto, move the plot boundary. * Otherwise use textheight to adjust placement of various titles. */ if (axis_array[SECOND_X_AXIS].ticmode & TICS_ON_BORDER && vertical_x2tics) { /* Assuming left justified tic labels. Correction below if they aren't */ double projection = sin((double)axis_array[SECOND_X_AXIS].tic_rotate*DEG2RAD); if (axis_array[SECOND_X_AXIS].label.pos == RIGHT) projection *= -1; else if (axis_array[SECOND_X_AXIS].label.pos == CENTRE) projection = 0.5*fabs(projection); widest_tic_strlen = 0; /* reset the global variable ... */ gen_tics(SECOND_X_AXIS, /* 0, */ widest_tic_callback); if (tmargin.x < 0) /* Undo original estimate */ plot_bounds.ytop += x2tic_textheight; /* Adjust spacing for rotation */ if (projection > 0.0) x2tic_textheight += (int) (t->h_char * (widest_tic_strlen)) * projection; if (tmargin.x < 0) plot_bounds.ytop -= x2tic_textheight; } if (axis_array[FIRST_X_AXIS].ticmode & TICS_ON_BORDER && vertical_xtics) { double projection; /* This adjustment will happen again in axis_output_tics but we need it now */ if (axis_array[FIRST_X_AXIS].tic_rotate == TEXT_VERTICAL && !axis_array[FIRST_X_AXIS].manual_justify) axis_array[FIRST_X_AXIS].label.pos = RIGHT; if (axis_array[FIRST_X_AXIS].tic_rotate == 90) projection = -1.0; else if (axis_array[FIRST_X_AXIS].tic_rotate == TEXT_VERTICAL) projection = -1.0; else projection = -sin((double)axis_array[FIRST_X_AXIS].tic_rotate*DEG2RAD); if (axis_array[FIRST_X_AXIS].label.pos == RIGHT) projection *= -1; widest_tic_strlen = 0; /* reset the global variable ... */ gen_tics(FIRST_X_AXIS, /* 0, */ widest_tic_callback); if (bmargin.x < 0) plot_bounds.ybot -= xtic_textheight; if (projection > 0.0) xtic_textheight = (int) (t->h_char * widest_tic_strlen) * projection + t->v_char; if (bmargin.x < 0) plot_bounds.ybot += xtic_textheight; } /* EAM - FIXME * Notwithstanding all these fancy calculations, plot_bounds.ytop must always be above plot_bounds.ybot */ if (plot_bounds.ytop < plot_bounds.ybot) { int i = plot_bounds.ytop; plot_bounds.ytop = plot_bounds.ybot; plot_bounds.ybot = i; FPRINTF((stderr,"boundary: Big problems! plot_bounds.ybot > plot_bounds.ytop\n")); } /* compute coordinates for axis labels, title et al * (some of these may not be used) */ x2label_y = plot_bounds.ytop + x2tic_height + x2tic_textheight + x2label_textheight; if (x2tic_textheight && (title_textheight || x2label_textheight)) x2label_y += t->v_char; title_y = x2label_y + title_textheight; ylabel_y = plot_bounds.ytop + x2tic_height + x2tic_textheight + ylabel_textheight; y2label_y = plot_bounds.ytop + x2tic_height + x2tic_textheight + y2label_textheight; /* Shift upward by 0.2 line to allow for descenders in xlabel text */ xlabel_y = plot_bounds.ybot - xtic_height - xtic_textheight - xlabel_textheight + ((float)xlablin+0.2) * t->v_char; ylabel_x = plot_bounds.xleft - ytic_width - ytic_textwidth; if (axis_array[FIRST_Y_AXIS].label.text && can_rotate) ylabel_x -= ylabel_textwidth; y2label_x = plot_bounds.xright + y2tic_width + y2tic_textwidth; if (axis_array[SECOND_Y_AXIS].label.text && can_rotate) y2label_x += y2label_textwidth - y2lablin * t->v_char; if (vertical_timelabel) { if (timelabel_bottom) time_y = xlabel_y - timebot_textheight + xlabel_textheight; else { time_y = title_y + timetop_textheight - title_textheight - x2label_textheight; } } else { if (timelabel_bottom) time_y = plot_bounds.ybot - xtic_height - xtic_textheight - xlabel_textheight - timebot_textheight + t->v_char; else if (ylabel_textheight > 0) time_y = ylabel_y + timetop_textheight; else time_y = plot_bounds.ytop + x2tic_height + x2tic_textheight + timetop_textheight + (int) t->h_char; } if (vertical_timelabel) time_x = plot_bounds.xleft - ytic_width - ytic_textwidth - timelabel_textwidth; else { double tmpx, tmpy; map_position_r(&(timelabel.offset), &tmpx, &tmpy, "boundary"); time_x = plot_bounds.xleft - ytic_width - ytic_textwidth + (int) (tmpx); } xtic_y = plot_bounds.ybot - xtic_height - (int) (vertical_xtics ? t->h_char : t->v_char); x2tic_y = plot_bounds.ytop + x2tic_height + (vertical_x2tics ? (int) t->h_char : x2tic_textheight); ytic_x = plot_bounds.xleft - ytic_width - (vertical_ytics ? (ytic_textwidth - (int) t->v_char) : (int) t->h_char); y2tic_x = plot_bounds.xright + y2tic_width + (int) (vertical_y2tics ? t->v_char : t->h_char); /* restore text to horizontal [we tested rotation above] */ (void) (*t->text_angle) (0); /* needed for map_position() below */ AXIS_SETSCALE(FIRST_Y_AXIS, plot_bounds.ybot, plot_bounds.ytop); AXIS_SETSCALE(SECOND_Y_AXIS, plot_bounds.ybot, plot_bounds.ytop); AXIS_SETSCALE(FIRST_X_AXIS, plot_bounds.xleft, plot_bounds.xright); AXIS_SETSCALE(SECOND_X_AXIS, plot_bounds.xleft, plot_bounds.xright); /* HBB 20020122: moved here from do_plot, because map_position * needs these, too */ axis_set_graphical_range(FIRST_X_AXIS, plot_bounds.xleft, plot_bounds.xright); axis_set_graphical_range(FIRST_Y_AXIS, plot_bounds.ybot, plot_bounds.ytop); axis_set_graphical_range(SECOND_X_AXIS, plot_bounds.xleft, plot_bounds.xright); axis_set_graphical_range(SECOND_Y_AXIS, plot_bounds.ybot, plot_bounds.ytop); /* Calculate space for keys (do_plot will use these to position key). */ key_w = key_col_wth * key_cols; key_h = (ktitl_lines) * t->v_char + key_rows * key_entry_height; key_h += (int) (key->height_fix * t->v_char); if (key->region == GPKEY_AUTO_INTERIOR_LRTBC || (key->region == GPKEY_AUTO_EXTERIOR_LRTBC && key->vpos == JUST_CENTRE && key->hpos == CENTRE)) { if (key->vpos == JUST_TOP) { key->bounds.ytop = plot_bounds.ytop - t->v_tic; key->bounds.ybot = key->bounds.ytop - key_h; } else if (key->vpos == JUST_BOT) { key->bounds.ybot = plot_bounds.ybot + t->v_tic; key->bounds.ytop = key->bounds.ybot + key_h; } else /* (key->vpos == JUST_CENTRE) */ { int key_box_half = key_h / 2; key->bounds.ybot = (plot_bounds.ybot + plot_bounds.ytop) / 2 - key_box_half; key->bounds.ytop = (plot_bounds.ybot + plot_bounds.ytop) / 2 + key_box_half; } if (key->hpos == LEFT) { key->bounds.xleft = plot_bounds.xleft + t->h_char; key->bounds.xright = key->bounds.xleft + key_w; } else if (key->hpos == RIGHT) { key->bounds.xright = plot_bounds.xright - t->h_char; key->bounds.xleft = key->bounds.xright - key_w; } else /* (key->hpos == CENTER) */ { int key_box_half = key_w / 2; key->bounds.xleft = (plot_bounds.xright + plot_bounds.xleft) / 2 - key_box_half; key->bounds.xright = (plot_bounds.xright + plot_bounds.xleft) / 2 + key_box_half; } } else if (key->region == GPKEY_AUTO_EXTERIOR_LRTBC || key->region == GPKEY_AUTO_EXTERIOR_MARGIN) { /* Vertical alignment */ if (key->margin == GPKEY_TMARGIN) { /* align top first since tmargin may be manual */ key->bounds.ytop = (ysize + yoffset) * t->ymax - t->v_tic; key->bounds.ybot = key->bounds.ytop - key_h; } else if (key->margin == GPKEY_BMARGIN) { /* align bottom first since bmargin may be manual */ key->bounds.ybot = yoffset * t->ymax + t->v_tic; key->bounds.ytop = key->bounds.ybot + key_h; } else { if (key->vpos == JUST_TOP) { /* align top first since tmargin may be manual */ key->bounds.ytop = plot_bounds.ytop; key->bounds.ybot = key->bounds.ytop - key_h; } else if (key->vpos == JUST_CENTRE) { int key_box_half = key_h / 2; key->bounds.ybot = (plot_bounds.ybot + plot_bounds.ytop) / 2 - key_box_half; key->bounds.ytop = (plot_bounds.ybot + plot_bounds.ytop) / 2 + key_box_half; } else { /* align bottom first since bmargin may be manual */ key->bounds.ybot = plot_bounds.ybot; key->bounds.ytop = key->bounds.ybot + key_h; } } /* Horizontal alignment */ if (key->margin == GPKEY_LMARGIN) { /* align left first since lmargin may be manual */ key->bounds.xleft = xoffset * t->xmax + t->h_char; key->bounds.xright = key->bounds.xleft + key_w; } else if (key->margin == GPKEY_RMARGIN) { /* align right first since rmargin may be manual */ key->bounds.xright = (xsize + xoffset) * (t->xmax-1) - t->h_char; key->bounds.xleft = key->bounds.xright - key_w; } else { if (key->hpos == LEFT) { /* align left first since lmargin may be manual */ key->bounds.xleft = plot_bounds.xleft; key->bounds.xright = key->bounds.xleft + key_w; } else if (key->hpos == CENTRE) { int key_box_half = key_w / 2; key->bounds.xleft = (plot_bounds.xright + plot_bounds.xleft) / 2 - key_box_half; key->bounds.xright = (plot_bounds.xright + plot_bounds.xleft) / 2 + key_box_half; } else { /* align right first since rmargin may be manual */ key->bounds.xright = plot_bounds.xright; key->bounds.xleft = key->bounds.xright - key_w; } } } else { int x, y; map_position(&key->user_pos, &x, &y, "key"); #if 0 /* FIXME!!! ** pm 22.1.2002: if key->user_pos.scalex or scaley == first_axes or second_axes, ** then the graph scaling is not yet known and the box is positioned incorrectly; ** you must do "replot" to avoid the wrong plot ... bad luck if output does not ** go to screen */ #define OK fprintf(stderr,"Line %i of %s is OK\n",__LINE__,__FILE__) OK; fprintf(stderr,"\tHELE: user pos: x=%i y=%i\n",key->user_pos.x,key->user_pos.y); fprintf(stderr,"\tHELE: user pos: x=%i y=%i\n",x,y); #endif /* Here top, bottom, left, right refer to the alignment with respect to point. */ key->bounds.xleft = x; if (key->hpos == CENTRE) key->bounds.xleft -= key_w/2; else if (key->hpos == RIGHT) key->bounds.xleft -= key_w; key->bounds.xright = key->bounds.xleft + key_w; key->bounds.ytop = y; if (key->vpos == JUST_CENTRE) key->bounds.ytop += key_h/2; else if (key->vpos == JUST_BOT) key->bounds.ytop += key_h; key->bounds.ybot = key->bounds.ytop - key_h; } /*}}} */ /* Set default clipping to the plot boundary */ clip_area = &plot_bounds; /* Sanity check. FIXME: Stricter test? Fatal error? */ if (plot_bounds.xright < plot_bounds.xleft || plot_bounds.ytop < plot_bounds.ybot) int_warn(NO_CARET, "Terminal canvas area too small to hold plot." "\n\t Check plot boundary and font sizes."); } /*}}} */ static void get_arrow( struct arrow_def *arrow, int* sx, int* sy, int* ex, int* ey) { double sx_d, sy_d, ex_d, ey_d; map_position_double(&arrow->start, &sx_d, &sy_d, "arrow"); *sx = (int)(sx_d); *sy = (int)(sy_d); if (arrow->relative) { /* different coordinate systems: * add the values in the drivers coordinate system. * For log scale: relative coordinate is factor */ map_position_r(&arrow->end, &ex_d, &ey_d, "arrow"); *ex = (int)(ex_d + sx_d); *ey = (int)(ey_d + sy_d); } else { map_position_double(&arrow->end, &ex_d, &ey_d, "arrow"); *ex = (int)(ex_d); *ey = (int)(ey_d); } } /* FIXME HBB 20020225: this is shared with graph3d.c, so it shouldn't * be in this module */ void apply_head_properties(struct arrow_style_type *arrow_properties) { curr_arrow_headfilled = arrow_properties->head_filled; curr_arrow_headlength = 0; if (arrow_properties->head_length > 0) { /* set head length+angle for term->arrow */ double xtmp, ytmp; struct position headsize = {first_axes,graph,graph,0.,0.,0.}; headsize.x = arrow_properties->head_length; headsize.scalex = arrow_properties->head_lengthunit; map_position_r(&headsize, &xtmp, &ytmp, "arrow"); curr_arrow_headangle = arrow_properties->head_angle; curr_arrow_headbackangle = arrow_properties->head_backangle; curr_arrow_headlength = xtmp; } } static void place_grid() { struct termentry *t = term; term_apply_lp_properties(&border_lp); /* border linetype */ largest_polar_circle = 0; /* select first mapping */ x_axis = FIRST_X_AXIS; y_axis = FIRST_Y_AXIS; /* label first y axis tics */ axis_output_tics(FIRST_Y_AXIS, &ytic_x, FIRST_X_AXIS, /* (GRID_Y | GRID_MY), */ ytick2d_callback); /* label first x axis tics */ axis_output_tics(FIRST_X_AXIS, &xtic_y, FIRST_Y_AXIS, /* (GRID_X | GRID_MX), */ xtick2d_callback); /* select second mapping */ x_axis = SECOND_X_AXIS; y_axis = SECOND_Y_AXIS; axis_output_tics(SECOND_Y_AXIS, &y2tic_x, SECOND_X_AXIS, /* (GRID_Y2 | GRID_MY2), */ ytick2d_callback); axis_output_tics(SECOND_X_AXIS, &x2tic_y, SECOND_Y_AXIS, /* (GRID_X2 | GRID_MX2), */ xtick2d_callback); /* select first mapping */ x_axis = FIRST_X_AXIS; y_axis = FIRST_Y_AXIS; /* POLAR GRID */ if (polar && R_AXIS.ticmode) { /* Piggyback on the xtick2d_callback. Avoid a call to the full */ /* axis_output_tics(), which wasn't really designed for this axis. */ tic_start = map_y(0); /* Always equivalent to tics on phi=0 axis */ tic_mirror = tic_start; /* tic extends on both sides of phi=0 */ tic_text = tic_start - t->v_char; rotate_tics = R_AXIS.tic_rotate; if (rotate_tics == 0) tic_hjust = CENTRE; else if ((*t->text_angle)(rotate_tics)) tic_hjust = (rotate_tics == TEXT_VERTICAL) ? RIGHT : LEFT; if (R_AXIS.manual_justify) tic_hjust = R_AXIS.label.pos; tic_direction = 1; gen_tics(POLAR_AXIS, xtick2d_callback); (*t->text_angle) (0); } /* Radial lines */ if (polar_grid_angle) { double theta = 0; int ox = map_x(0); int oy = map_y(0); term_apply_lp_properties(&grid_lp); for (theta = 0; theta < 6.29; theta += polar_grid_angle) { int x = map_x(largest_polar_circle * cos(theta)); int y = map_y(largest_polar_circle * sin(theta)); draw_clip_line(ox, oy, x, y); } draw_clip_line(ox, oy, map_x(largest_polar_circle * cos(theta)), map_y(largest_polar_circle * sin(theta))); } } static void place_arrows(int layer) { struct arrow_def *this_arrow; BoundingBox *clip_save = clip_area; /* Allow arrows to run off the plot, so long as they are still on the canvas */ if (term->flags & TERM_CAN_CLIP) clip_area = NULL; else clip_area = &canvas; for (this_arrow = first_arrow; this_arrow != NULL; this_arrow = this_arrow->next) { int sx, sy, ex, ey; if (this_arrow->arrow_properties.layer != layer) continue; get_arrow(this_arrow, &sx, &sy, &ex, &ey); term_apply_lp_properties(&(this_arrow->arrow_properties.lp_properties)); apply_head_properties(&(this_arrow->arrow_properties)); draw_clip_arrow(sx, sy, ex, ey, this_arrow->arrow_properties.head); } term_apply_lp_properties(&border_lp); clip_area = clip_save; } static void place_labels(struct text_label *listhead, int layer, TBOOLEAN clip) { struct text_label *this_label; int x, y; if (term->pointsize) (*term->pointsize)(pointsize); for (this_label = listhead; this_label != NULL; this_label = this_label->next) { if (this_label->layer != layer) continue; if (layer == LAYER_PLOTLABELS) { x = map_x(this_label->place.x); y = map_y(this_label->place.y); } else map_position(&this_label->place, &x, &y, "label"); if (clip) { if (this_label->place.scalex == first_axes) if (!(inrange(this_label->place.x, axis_array[FIRST_X_AXIS].min, axis_array[FIRST_X_AXIS].max))) continue; if (this_label->place.scalex == second_axes) if (!(inrange(this_label->place.x, axis_array[SECOND_X_AXIS].min, axis_array[SECOND_X_AXIS].max))) continue; if (this_label->place.scaley == first_axes) if (!(inrange(this_label->place.y, axis_array[FIRST_Y_AXIS].min, axis_array[FIRST_Y_AXIS].max))) continue; if (this_label->place.scaley == second_axes) if (!(inrange(this_label->place.y, axis_array[SECOND_Y_AXIS].min, axis_array[SECOND_Y_AXIS].max))) continue; } write_label(x, y, this_label); } } #ifdef EAM_OBJECTS void place_objects(struct object *listhead, int layer, int dimensions) { t_object *this_object; double x1, y1; int style; for (this_object = listhead; this_object != NULL; this_object = this_object->next) { struct lp_style_type lpstyle; struct fill_style_type *fillstyle; if (this_object->layer != layer) continue; /* Extract line and fill style, but don't apply it yet */ if (this_object->lp_properties.l_type == LT_DEFAULT && this_object->object_type == OBJ_RECTANGLE) lpstyle = default_rectangle.lp_properties; else lpstyle = this_object->lp_properties; if (this_object->fillstyle.fillstyle == FS_DEFAULT && this_object->object_type == OBJ_RECTANGLE) fillstyle = &default_rectangle.fillstyle; else fillstyle = &this_object->fillstyle; style = style_from_fill(fillstyle); switch (this_object->object_type) { case OBJ_CIRCLE: { t_circle *e = &this_object->o.circle; double radius, junk; BoundingBox *clip_save = clip_area; if (dimensions == 2 || e->center.scalex == screen) { map_position_double(&e->center, &x1, &y1, "rect"); map_position_r(&e->extent, &radius, &junk, "rect"); } else if (splot_map) { int junkw, junkh; map3d_position_double(&e->center, &x1, &y1, "rect"); map3d_position_r(&e->extent, &junkw, &junkh, "rect"); radius = junkw; } else break; term_apply_lp_properties(&lpstyle); if (e->center.scalex == screen && e->center.scaley == screen) clip_area = &canvas; do_arc((int)x1, (int)y1, radius, e->arc_begin, e->arc_end, style); /* Retrace the border if the style requests it */ if (need_fill_border(fillstyle)) do_arc((int)x1, (int)y1, radius, e->arc_begin, e->arc_end, 0); clip_area = clip_save; break; } case OBJ_ELLIPSE: { term_apply_lp_properties(&lpstyle); if (dimensions == 2) do_ellipse(2, &this_object->o.ellipse, style, TRUE); else if (splot_map) do_ellipse(3, &this_object->o.ellipse, style, TRUE); else break; /* Retrace the border if the style requests it */ if (need_fill_border(fillstyle)) do_ellipse(dimensions, &this_object->o.ellipse, 0, TRUE); break; } case OBJ_POLYGON: { term_apply_lp_properties(&lpstyle); do_polygon(dimensions, &this_object->o.polygon, style); /* Retrace the border if the style requests it */ if (need_fill_border(fillstyle)) do_polygon(dimensions, &this_object->o.polygon, 0); break; } case OBJ_RECTANGLE: { do_rectangle(dimensions, this_object, style); break; } default: break; } /* End switch(object_type) */ } } #endif /* * Apply axis range expansions from "set offsets" command */ static void adjust_offsets() { double b = boff.scaley == graph ? fabs(Y_AXIS.max - Y_AXIS.min)*boff.y : boff.y; double t = toff.scaley == graph ? fabs(Y_AXIS.max - Y_AXIS.min)*toff.y : toff.y; double l = loff.scalex == graph ? fabs(X_AXIS.max - X_AXIS.min)*loff.x : loff.x; double r = roff.scalex == graph ? fabs(X_AXIS.max - X_AXIS.min)*roff.x : roff.x; if (Y_AXIS.min < Y_AXIS.max) { Y_AXIS.min -= b; Y_AXIS.max += t; } else { Y_AXIS.max -= b; Y_AXIS.min += t; } if (X_AXIS.min < X_AXIS.max) { X_AXIS.min -= l; X_AXIS.max += r; } else { X_AXIS.max -= l; X_AXIS.min += r; } if (X_AXIS.min == X_AXIS.max) int_error(NO_CARET, "x_min should not equal x_max!"); if (Y_AXIS.min == Y_AXIS.max) int_error(NO_CARET, "y_min should not equal y_max!"); } void do_plot(struct curve_points *plots, int pcount) { struct termentry *t = term; int curve; struct curve_points *this_plot = NULL; int xl = 0, yl = 0; int key_count = 0; TBOOLEAN key_pass = FALSE; legend_key *key = &keyT; int previous_plot_style; x_axis = FIRST_X_AXIS; y_axis = FIRST_Y_AXIS; adjust_offsets(); /* EAM June 2003 - Although the comment below implies that font dimensions * are known after term_initialise(), this is not true at least for the X11 * driver. X11 fonts are not set until an actual display window is * opened, and that happens in term->graphics(), which is called from * term_start_plot(). */ term_initialise(); /* may set xmax/ymax */ term_start_plot(); /* Figure out if we need a colorbox for this plot */ set_plot_with_palette(0, MODE_PLOT); /* EAM FIXME - 1st parameter is a dummy */ /* compute boundary for plot (plot_bounds.xleft, plot_bounds.xright, plot_bounds.ytop, plot_bounds.ybot) * also calculates tics, since xtics depend on plot_bounds.xleft * but plot_bounds.xleft depends on ytics. Boundary calculations depend * on term->v_char etc, so terminal must be initialised first. */ boundary(plots, pcount); /* Make palette */ if (is_plot_with_palette()) make_palette(); /* Give a chance for rectangles to be behind everything else */ place_objects( first_object, -1, 2); screen_ok = FALSE; /* Sync point for epslatex text positioning */ (term->layer)(TERM_LAYER_BACKTEXT); /* DRAW TICS AND GRID */ if (grid_layer == 0 || grid_layer == -1) place_grid(); /* DRAW ZERO AXES */ /* NB: Has the necessary side effect of initializing axis->term_zero */ axis_draw_2d_zeroaxis(FIRST_X_AXIS,FIRST_Y_AXIS); axis_draw_2d_zeroaxis(FIRST_Y_AXIS,FIRST_X_AXIS); axis_draw_2d_zeroaxis(SECOND_X_AXIS,SECOND_Y_AXIS); axis_draw_2d_zeroaxis(SECOND_Y_AXIS,SECOND_X_AXIS); /* DRAW PLOT BORDER */ if (draw_border) plot_border(); /* YLABEL */ if (axis_array[FIRST_Y_AXIS].label.text) { ignore_enhanced(axis_array[FIRST_Y_AXIS].label.noenhanced); apply_pm3dcolor(&(axis_array[FIRST_Y_AXIS].label.textcolor),t); /* we worked out x-posn in boundary() */ if ((*t->text_angle) (axis_array[FIRST_Y_AXIS].label.rotate)) { double tmpx, tmpy; unsigned int x, y; map_position_r(&(axis_array[FIRST_Y_AXIS].label.offset), &tmpx, &tmpy, "doplot"); x = ylabel_x + (t->v_char / 2); y = (plot_bounds.ytop + plot_bounds.ybot) / 2 + tmpy; write_multiline(x, y, axis_array[FIRST_Y_AXIS].label.text, CENTRE, JUST_TOP, axis_array[FIRST_Y_AXIS].label.rotate, axis_array[FIRST_Y_AXIS].label.font); (*t->text_angle) (0); } else { /* really bottom just, but we know number of lines so we need to adjust x-posn by one line */ unsigned int x = ylabel_x; unsigned int y = ylabel_y; write_multiline(x, y, axis_array[FIRST_Y_AXIS].label.text, LEFT, JUST_TOP, 0, axis_array[FIRST_Y_AXIS].label.font); } reset_textcolor(&(axis_array[FIRST_Y_AXIS].label.textcolor),t); ignore_enhanced(FALSE); } /* Y2LABEL */ if (axis_array[SECOND_Y_AXIS].label.text) { ignore_enhanced(axis_array[SECOND_Y_AXIS].label.noenhanced); apply_pm3dcolor(&(axis_array[SECOND_Y_AXIS].label.textcolor),t); /* we worked out coordinates in boundary() */ if ((*t->text_angle) (axis_array[SECOND_Y_AXIS].label.rotate)) { double tmpx, tmpy; unsigned int x, y; map_position_r(&(axis_array[SECOND_Y_AXIS].label.offset), &tmpx, &tmpy, "doplot"); x = y2label_x + (t->v_char / 2) - 1; y = (plot_bounds.ytop + plot_bounds.ybot) / 2 + tmpy; write_multiline(x, y, axis_array[SECOND_Y_AXIS].label.text, CENTRE, JUST_TOP, axis_array[SECOND_Y_AXIS].label.rotate, axis_array[SECOND_Y_AXIS].label.font); (*t->text_angle) (0); } else { /* really bottom just, but we know number of lines */ unsigned int x = y2label_x; unsigned int y = y2label_y; write_multiline(x, y, axis_array[SECOND_Y_AXIS].label.text, RIGHT, JUST_TOP, 0, axis_array[SECOND_Y_AXIS].label.font); } reset_textcolor(&(axis_array[SECOND_Y_AXIS].label.textcolor),t); ignore_enhanced(FALSE); } /* XLABEL */ if (axis_array[FIRST_X_AXIS].label.text) { double tmpx, tmpy; unsigned int x, y; map_position_r(&(axis_array[FIRST_X_AXIS].label.offset), &tmpx, &tmpy, "doplot"); x = (plot_bounds.xright + plot_bounds.xleft) / 2 + tmpx; y = xlabel_y - t->v_char / 2; /* HBB */ ignore_enhanced(axis_array[FIRST_X_AXIS].label.noenhanced); apply_pm3dcolor(&(axis_array[FIRST_X_AXIS].label.textcolor), t); write_multiline(x, y, axis_array[FIRST_X_AXIS].label.text, CENTRE, JUST_TOP, 0, axis_array[FIRST_X_AXIS].label.font); reset_textcolor(&(axis_array[FIRST_X_AXIS].label.textcolor), t); ignore_enhanced(FALSE); } /* PLACE TITLE */ if (title.text) { double tmpx, tmpy; unsigned int x, y; map_position_r(&(title.offset), &tmpx, &tmpy, "doplot"); /* we worked out y-coordinate in boundary() */ x = (plot_bounds.xleft + plot_bounds.xright) / 2 + tmpx; y = title_y - t->v_char / 2; ignore_enhanced(title.noenhanced); apply_pm3dcolor(&(title.textcolor), t); write_multiline(x, y, title.text, CENTRE, JUST_TOP, 0, title.font); reset_textcolor(&(title.textcolor), t); ignore_enhanced(FALSE); } /* X2LABEL */ if (axis_array[SECOND_X_AXIS].label.text) { double tmpx, tmpy; unsigned int x, y; map_position_r(&(axis_array[SECOND_X_AXIS].label.offset), &tmpx, &tmpy, "doplot"); /* we worked out y-coordinate in boundary() */ x = (plot_bounds.xright + plot_bounds.xleft) / 2 + tmpx; y = x2label_y - t->v_char / 2 - 1; ignore_enhanced(axis_array[SECOND_X_AXIS].label.noenhanced); apply_pm3dcolor(&(axis_array[SECOND_X_AXIS].label.textcolor),t); write_multiline(x, y, axis_array[SECOND_X_AXIS].label.text, CENTRE, JUST_TOP, 0, axis_array[SECOND_X_AXIS].label.font); reset_textcolor(&(axis_array[SECOND_X_AXIS].label.textcolor),t); ignore_enhanced(FALSE); } /* PLACE TIMEDATE */ if (timelabel.text) { /* we worked out coordinates in boundary() */ char *str; time_t now; unsigned int x = time_x; unsigned int y = time_y; time(&now); /* there is probably no way to find out in advance how many * chars strftime() writes */ str = gp_alloc(MAX_LINE_LEN + 1, "timelabel.text"); strftime(str, MAX_LINE_LEN, timelabel.text, localtime(&now)); if (timelabel_rotate && (*t->text_angle) (TEXT_VERTICAL)) { x += t->v_char / 2; /* HBB */ if (timelabel_bottom) write_multiline(x, y, str, LEFT, JUST_TOP, TEXT_VERTICAL, timelabel.font); else write_multiline(x, y, str, RIGHT, JUST_TOP, TEXT_VERTICAL, timelabel.font); (*t->text_angle) (0); } else { y -= t->v_char / 2; /* HBB */ if (timelabel_bottom) write_multiline(x, y, str, LEFT, JUST_BOT, 0, timelabel.font); else write_multiline(x, y, str, LEFT, JUST_TOP, 0, timelabel.font); } free(str); } /* Add back colorbox if appropriate */ if (is_plot_with_colorbox() && term->set_color && color_box.layer == LAYER_BACK) draw_color_smooth_box(MODE_PLOT); /* And rectangles */ place_objects( first_object, 0, 2); /* PLACE LABELS */ place_labels( first_label, 0, FALSE ); /* PLACE ARROWS */ place_arrows( 0 ); /* Sync point for epslatex text positioning */ (term->layer)(TERM_LAYER_FRONTTEXT); /* Draw the key, or at least reserve space for it (pass 1) */ if (lkey) do_key_layout( key, key_pass, &xl, &yl ); SECOND_KEY_PASS: /* This tells the canvas and svg terminals to restart the plot count */ /* so that the key titles are in sync with the plots they describe. */ (*t->layer)(TERM_LAYER_RESET_PLOTNO); /* DRAW CURVES */ this_plot = plots; previous_plot_style = 0; for (curve = 0; curve < pcount; this_plot = this_plot->next, curve++) { TBOOLEAN localkey = lkey; /* a local copy */ /* Sync point for start of new curve (used by svg, post, ...) */ (term->layer)(TERM_LAYER_BEFORE_PLOT); /* set scaling for this plot's axes */ x_axis = this_plot->x_axis; y_axis = this_plot->y_axis; term_apply_lp_properties(&(this_plot->lp_properties)); /* Why only for histograms? */ if (this_plot->plot_style == HISTOGRAMS) { if (prefer_line_styles) lp_use_properties(&this_plot->lp_properties, this_plot->lp_properties.l_type+1); } /* Skip a line in the key between histogram clusters */ if (this_plot->plot_style == HISTOGRAMS && previous_plot_style == HISTOGRAMS && this_plot->histogram_sequence == 0 && yl != yl_ref) { if (++key_count >= key_rows) { yl = yl_ref; xl += key_col_wth; key_count = 0; } else yl = yl - key_entry_height; } /* Column-stacked histograms store their key titles internally */ if (this_plot->plot_style == HISTOGRAMS && histogram_opts.type == HT_STACKED_IN_TOWERS) { text_label *key_entry; localkey = 0; if (this_plot->labels && (key_pass || !key->front)) { struct lp_style_type save_lp = this_plot->lp_properties; for (key_entry = this_plot->labels->next; key_entry; key_entry = key_entry->next) { int histogram_linetype = key_entry->tag + this_plot->histogram->startcolor; this_plot->lp_properties.l_type = histogram_linetype; this_plot->fill_properties.fillpattern = histogram_linetype; if (key_entry->text) { if (prefer_line_styles) lp_use_properties(&this_plot->lp_properties, histogram_linetype); else load_linetype(&this_plot->lp_properties, histogram_linetype); do_key_sample(this_plot, key, key_entry->text, t, xl, yl); } if (++key_count >= key_rows) { yl = yl_ref; xl += key_col_wth; key_count = 0; } else yl = yl - key_entry_height; } free_labels(this_plot->labels); this_plot->labels = NULL; this_plot->lp_properties = save_lp; } } else if (this_plot->title && !*this_plot->title) { localkey = FALSE; } else if (this_plot->plot_type == NODATA) { localkey = FALSE; } else if (key_pass || !key->front) { ignore_enhanced(this_plot->title_no_enhanced); /* don't write filename or function enhanced */ if (localkey && this_plot->title && !this_plot->title_is_suppressed) { key_count++; if (key->invert) yl = key->bounds.ybot + yl_ref + key_entry_height/2 - yl; do_key_sample(this_plot, key, this_plot->title, t, xl, yl); } ignore_enhanced(FALSE); } /* If any plots have opted out of autoscaling, we need to recheck */ /* whether their points are INRANGE or not. */ if (this_plot->noautoscale && !key_pass) recheck_ranges(this_plot); /* and now the curves, plus any special key requirements */ /* be sure to draw all lines before drawing any points */ /* Skip missing/empty curves */ if (this_plot->plot_type != NODATA && !key_pass) { switch (this_plot->plot_style) { case IMPULSES: plot_impulses(this_plot, X_AXIS.term_zero, Y_AXIS.term_zero); break; case LINES: plot_lines(this_plot); break; case STEPS: case FILLSTEPS: plot_steps(this_plot); break; case FSTEPS: plot_fsteps(this_plot); break; case HISTEPS: plot_histeps(this_plot); break; case POINTSTYLE: plot_points(this_plot); break; case LINESPOINTS: plot_lines(this_plot); plot_points(this_plot); break; case DOTS: plot_dots(this_plot); break; case YERRORLINES: case XERRORLINES: case XYERRORLINES: plot_lines(this_plot); plot_bars(this_plot); plot_points(this_plot); break; case YERRORBARS: case XERRORBARS: case XYERRORBARS: plot_bars(this_plot); plot_points(this_plot); break; case BOXXYERROR: case BOXES: plot_boxes(this_plot, Y_AXIS.term_zero); break; case HISTOGRAMS: if (bar_layer == LAYER_FRONT) plot_boxes(this_plot, Y_AXIS.term_zero); /* Draw the bars first, so that the box will cover the bottom half */ if (histogram_opts.type == HT_ERRORBARS) { (term->linewidth)(histogram_opts.bar_lw); if (!need_fill_border(&default_fillstyle)) (term->linetype)(this_plot->lp_properties.l_type); plot_bars(this_plot); term_apply_lp_properties(&(this_plot->lp_properties)); } if (bar_layer != LAYER_FRONT) plot_boxes(this_plot, Y_AXIS.term_zero); break; case BOXERROR: if (bar_layer != LAYER_FRONT) plot_bars(this_plot); plot_boxes(this_plot, Y_AXIS.term_zero); if (bar_layer == LAYER_FRONT) plot_bars(this_plot); break; case FILLEDCURVES: if (this_plot->filledcurves_options.closeto == FILLEDCURVES_BETWEEN) { plot_betweencurves(this_plot); } else if (this_plot->filledcurves_options.closeto == FILLEDCURVES_ATR) { plot_betweencurves(this_plot); } else { plot_filledcurves(this_plot); if (need_fill_border(&this_plot->fill_properties)) plot_lines(this_plot); } break; case VECTOR: plot_vectors(this_plot); break; case FINANCEBARS: plot_f_bars(this_plot); break; case CANDLESTICKS: plot_c_bars(this_plot); break; case BOXPLOT: plot_boxplot(this_plot); break; case PM3DSURFACE: int_warn(NO_CARET, "Can't use pm3d for 2d plots"); break; case LABELPOINTS: place_labels( this_plot->labels->next, LAYER_PLOTLABELS, TRUE); break; case IMAGE: this_plot->image_properties.type = IC_PALETTE; plot_image_or_update_axes(this_plot, FALSE); break; case RGBIMAGE: this_plot->image_properties.type = IC_RGB; plot_image_or_update_axes(this_plot, FALSE); break; case RGBA_IMAGE: this_plot->image_properties.type = IC_RGBA; plot_image_or_update_axes(this_plot, FALSE); break; #ifdef EAM_OBJECTS case CIRCLES: plot_circles(this_plot); break; case ELLIPSES: plot_ellipses(this_plot); break; #endif } } /* If there are two passes, defer key sample till the second */ if (key->front && !key_pass) ; else if (localkey && this_plot->title && !this_plot->title_is_suppressed) { /* we deferred point sample until now */ if (this_plot->plot_style == LINESPOINTS && this_plot->lp_properties.p_interval < 0) { if (t->set_color) (*t->set_color)(&background_fill); (*t->pointsize)(pointsize * pointintervalbox); (*t->point)(xl + key_point_offset, yl, 6); term_apply_lp_properties(&this_plot->lp_properties); } if (this_plot->plot_style == BOXPLOT) { ; /* Don't draw a sample point in the key */ } else if (this_plot->plot_style == DOTS) { if (on_page(xl + key_point_offset, yl)) (*t->point) (xl + key_point_offset, yl, -1); } else if (this_plot->plot_style & PLOT_STYLE_HAS_POINT) { if (this_plot->lp_properties.p_size == PTSZ_VARIABLE) (*t->pointsize)(pointsize); (t->layer)(TERM_LAYER_BEGIN_KEYSAMPLE); if (on_page(xl + key_point_offset, yl)) (*t->point) (xl + key_point_offset, yl, this_plot->lp_properties.p_type); (t->layer)(TERM_LAYER_END_KEYSAMPLE); } if (key->invert) yl = key->bounds.ybot + yl_ref + key_entry_height/2 - yl; if (key_count >= key_rows) { yl = yl_ref; xl += key_col_wth; key_count = 0; } else yl = yl - key_entry_height; } /* Sync point for end of this curve (used by svg, post, ...) */ (term->layer)(TERM_LAYER_AFTER_PLOT); previous_plot_style = this_plot->plot_style; } /* Go back and draw the legend in a separate pass if necessary */ if (lkey && key->front && !key_pass) { key_pass = TRUE; do_key_layout( key, key_pass, &xl, &yl ); goto SECOND_KEY_PASS; } /* DRAW TICS AND GRID */ if (grid_layer == 1) place_grid(); if (polar && raxis) place_raxis(); /* DRAW ZERO AXES */ /* redraw after front grid so that axis lines are on top */ if (grid_layer == 1) { axis_draw_2d_zeroaxis(FIRST_X_AXIS,FIRST_Y_AXIS); axis_draw_2d_zeroaxis(FIRST_Y_AXIS,FIRST_X_AXIS); axis_draw_2d_zeroaxis(SECOND_X_AXIS,SECOND_Y_AXIS); axis_draw_2d_zeroaxis(SECOND_Y_AXIS,SECOND_X_AXIS); } /* REDRAW PLOT BORDER */ if (draw_border && border_layer == 1) plot_border(); /* Add front colorbox if appropriate */ if (is_plot_with_colorbox() && term->set_color && color_box.layer == LAYER_FRONT) draw_color_smooth_box(MODE_PLOT); /* And rectangles */ place_objects( first_object, 1, 2); /* PLACE LABELS */ place_labels( first_label, 1, FALSE ); /* PLACE HISTOGRAM TITLES */ place_histogram_titles(); /* PLACE ARROWS */ place_arrows( 1 ); /* Release the palette if we have used one (PostScript only?) */ if (is_plot_with_palette() && term->previous_palette) term->previous_palette(); term_end_plot(); } /* * Plots marked "noautoscale" do not yet have INRANGE/OUTRANGE flags set. */ static void recheck_ranges(struct curve_points *plot) { int i; /* point index */ for (i = 0; i < plot->p_count; i++) { if (plot->noautoscale) { plot->points[i].type = INRANGE; if (!inrange(plot->points[i].x, axis_array[plot->x_axis].min, axis_array[plot->x_axis].max)) plot->points[i].type = OUTRANGE; if (!inrange(plot->points[i].y, axis_array[plot->y_axis].min, axis_array[plot->y_axis].max)) plot->points[i].type = OUTRANGE; } } } /* plot_impulses: * Plot the curves in IMPULSES style */ static void plot_impulses(struct curve_points *plot, int yaxis_x, int xaxis_y) { int i; int x, y; for (i = 0; i < plot->p_count; i++) { if (plot->points[i].type == UNDEFINED) continue; if (!polar && !inrange(plot->points[i].x, X_AXIS.min, X_AXIS.max)) continue; x = map_x(plot->points[i].x); y = map_y(plot->points[i].y); check_for_variable_color(plot, &plot->varcolor[i]); if (polar) draw_clip_line(yaxis_x, xaxis_y, x, y); else draw_clip_line(x, xaxis_y, x, y); } } /* plot_lines: * Plot the curves in LINES style */ static void plot_lines(struct curve_points *plot) { int i; /* point index */ int x, y; /* point in terminal coordinates */ struct termentry *t = term; enum coord_type prev = UNDEFINED; /* type of previous point */ double ex, ey; /* an edge point */ double lx[2], ly[2]; /* two edge points */ for (i = 0; i < plot->p_count; i++) { /* rgb variable - color read from data column */ check_for_variable_color(plot, &plot->varcolor[i]); switch (plot->points[i].type) { case INRANGE:{ x = map_x(plot->points[i].x); y = map_y(plot->points[i].y); if (prev == INRANGE) { (*t->vector) (x, y); } else if (prev == OUTRANGE) { /* from outrange to inrange */ if (!clip_lines1) { (*t->move) (x, y); } else { edge_intersect(plot->points, i, &ex, &ey); (*t->move) (map_x(ex), map_y(ey)); (*t->vector) (x, y); } } else { /* prev == UNDEFINED */ (*t->move) (x, y); (*t->vector) (x, y); } break; } case OUTRANGE:{ if (prev == INRANGE) { /* from inrange to outrange */ if (clip_lines1) { edge_intersect(plot->points, i, &ex, &ey); (*t->vector) (map_x(ex), map_y(ey)); } } else if (prev == OUTRANGE) { /* from outrange to outrange */ if (clip_lines2) { if (two_edge_intersect(plot->points, i, lx, ly)) { (*t->move) (map_x(lx[0]), map_y(ly[0])); (*t->vector) (map_x(lx[1]), map_y(ly[1])); } } } break; } default: /* just a safety */ case UNDEFINED:{ break; } } prev = plot->points[i].type; } } /* plot_filledcurves: * Plot FILLED curves. * pm 8.9.2001 (main routine); pm 5.1.2002 (full support for options) */ /* finalize and draw the filled curve */ static void finish_filled_curve( int points, gpiPoint *corners, struct curve_points *plot) { filledcurves_opts *filledcurves_options = &plot->filledcurves_options; long side = 0; int i; if (points <= 0) return; /* add side (closing) points */ switch (filledcurves_options->closeto) { case FILLEDCURVES_CLOSED: break; case FILLEDCURVES_X1: corners[points].x = corners[points-1].x; corners[points+1].x = corners[0].x; corners[points].y = corners[points+1].y = axis_array[FIRST_Y_AXIS].term_lower; points += 2; break; case FILLEDCURVES_X2: corners[points].x = corners[points-1].x; corners[points+1].x = corners[0].x; corners[points].y = corners[points+1].y = axis_array[FIRST_Y_AXIS].term_upper; points += 2; break; case FILLEDCURVES_Y1: corners[points].y = corners[points-1].y; corners[points+1].y = corners[0].y; corners[points].x = corners[points+1].x = axis_array[FIRST_X_AXIS].term_lower; points += 2; break; case FILLEDCURVES_Y2: corners[points].y = corners[points-1].y; corners[points+1].y = corners[0].y; corners[points].x = corners[points+1].x = axis_array[FIRST_X_AXIS].term_upper; points += 2; break; case FILLEDCURVES_ATX1: case FILLEDCURVES_ATX2: corners[points].x = corners[points+1].x = map_x(filledcurves_options->at); /* should be mapping real x1/x2axis/graph/screen => screen */ corners[points].y = corners[points-1].y; corners[points+1].y = corners[0].y; for (i=0; i<points; i++) side += corners[i].x - corners[points].x; points += 2; break; case FILLEDCURVES_ATY1: case FILLEDCURVES_ATY2: corners[points].y = corners[points+1].y = map_y(filledcurves_options->at); /* should be mapping real y1/y2axis/graph/screen => screen */ corners[points].x = corners[points-1].x; corners[points+1].x = corners[0].x; for (i=0; i<points; i++) side += corners[i].y - corners[points].y; points += 2; break; case FILLEDCURVES_ATXY: corners[points].x = map_x(filledcurves_options->at); /* should be mapping real x1axis/graph/screen => screen */ corners[points].y = map_y(filledcurves_options->aty); /* should be mapping real y1axis/graph/screen => screen */ points++; break; case FILLEDCURVES_BETWEEN: case FILLEDCURVES_ATR: side = (corners[points].x > 0) ? 1 : -1; /* Prevent 1-pixel overlap of component rectangles, which */ /* causes vertical stripe artifacts for transparent fill */ if (plot->fill_properties.fillstyle == FS_TRANSPARENT_SOLID) { int direction = (corners[2].x < corners[0].x) ? -1 : 1; if (points >= 4 && corners[2].x == corners[3].x) { corners[2].x -= direction, corners[3].x -= direction; } else if (points >= 5 && corners[3].x == corners[4].x) { corners[3].x -= direction, corners[4].x -= direction; } } break; default: /* the polygon is closed by default */ break; } #if 0 { /* for debugging purposes */ int i; fprintf(stderr, "List of %i corners:\n", points); for (i=0; i<points; i++) fprintf(stderr, "%2i: %3i,%3i | ", i, corners[i].x, corners[i].y); fprintf(stderr, " side = %ld",side); fprintf(stderr, "\n"); } #endif /* Check for request to fill only on one side of a bounding line */ if (filledcurves_options->oneside > 0 && side < 0) return; if (filledcurves_options->oneside < 0 && side > 0) return; /* EAM Mar 2004 - Apply fill style to filled curves */ corners->style = style_from_fill(&plot->fill_properties); term->filled_polygon(points, corners); } static void plot_filledcurves(struct curve_points *plot) { int i; /* point index */ int x, y; /* point in terminal coordinates */ struct termentry *t = term; enum coord_type prev = UNDEFINED; /* type of previous point */ double ex, ey; /* an edge point */ double lx[2], ly[2]; /* two edge points */ int points = 0; /* how many corners */ static gpiPoint *corners = 0; /* array of corners */ static int corners_allocated = 0; /* how many allocated */ /* This set of variables is for tracking closed curve fill areas */ int exit_edge = 0; /* Which edge did an OUTRANGE point exit via? */ int reentry_edge = 0; /* Where did it reenter? */ int out_updown = 0; /* And where has it been in the meantime? */ int out_leftright = 0; int first_entry = 0; /* If the start point of the curve was OUTRANGE */ if (!t->filled_polygon) { /* filled polygons are not available */ plot_lines(plot); return; } if (!plot->filledcurves_options.opt_given) { /* no explicitly given filledcurves option for the current plot => use the default for data or function, respectively */ if (plot->plot_type == DATA) memcpy(&plot->filledcurves_options, &filledcurves_opts_data, sizeof(filledcurves_opts)); else memcpy(&plot->filledcurves_options, &filledcurves_opts_func, sizeof(filledcurves_opts)); } /* clip the "at" coordinate to the drawing area */ #define MYNOMIN(x,ax) if (x<axis_array[ax].min) x=axis_array[ax].min; #define MYNOMAX(x,ax) if (x>axis_array[ax].max) x=axis_array[ax].max; /* FIXME HBB 20030127: replace by cliptorange()!? */ switch (plot->filledcurves_options.closeto) { case FILLEDCURVES_ATX1: MYNOMIN(plot->filledcurves_options.at,FIRST_X_AXIS); MYNOMAX(plot->filledcurves_options.at,FIRST_X_AXIS); break; case FILLEDCURVES_ATX2: MYNOMIN(plot->filledcurves_options.at,SECOND_X_AXIS); MYNOMAX(plot->filledcurves_options.at,SECOND_X_AXIS); break; case FILLEDCURVES_ATY1: MYNOMIN(plot->filledcurves_options.at,FIRST_Y_AXIS); MYNOMAX(plot->filledcurves_options.at,FIRST_Y_AXIS); break; case FILLEDCURVES_ATY2: MYNOMIN(plot->filledcurves_options.at,SECOND_Y_AXIS); MYNOMAX(plot->filledcurves_options.at,SECOND_Y_AXIS); break; case FILLEDCURVES_ATXY: MYNOMIN(plot->filledcurves_options.at,FIRST_X_AXIS); MYNOMAX(plot->filledcurves_options.at,FIRST_X_AXIS); MYNOMIN(plot->filledcurves_options.aty,FIRST_Y_AXIS); MYNOMAX(plot->filledcurves_options.aty,FIRST_Y_AXIS); break; } #undef MYNOMIN #undef MYNOMAX for (i = 0; i < plot->p_count; i++) { if (points+2 >= corners_allocated) { /* there are 2 side points */ corners_allocated += 128; /* reallocate more corners */ corners = gp_realloc( corners, corners_allocated*sizeof(gpiPoint), "corners for filledcurves"); } switch (plot->points[i].type) { case INRANGE:{ x = map_x(plot->points[i].x); y = map_y(plot->points[i].y); if (prev == INRANGE) { /* Split this segment if it crosses a bounding line */ if (bound_intersect(plot->points, i, &ex, &ey, &plot->filledcurves_options)) { corners[points].x = map_x(ex); corners[points++].y = map_y(ey); finish_filled_curve(points, corners, plot); points = 0; corners[points].x = map_x(ex); corners[points++].y = map_y(ey); } /* vector(x,y) */ corners[points].x = x; corners[points++].y = y; } else if (prev == OUTRANGE) { /* from outrange to inrange */ if (clip_fill) { /* EAM concave bounding curves */ reentry_edge = edge_intersect(plot->points, i, &ex, &ey); if (!exit_edge) /* Curve must have started outside the plot area */ first_entry = reentry_edge; else if (reentry_edge != exit_edge) /* Fill in dummy points at plot corners if the bounding curve */ /* went around the corner while out of range */ fill_missing_corners(corners, &points, exit_edge, reentry_edge, out_updown, out_leftright); /* vector(map_x(ex),map_y(ey)); */ corners[points].x = map_x(ex); corners[points++].y = map_y(ey); /* vector(x,y); */ corners[points].x = x; corners[points++].y = y; } else if (!clip_lines1) { finish_filled_curve(points, corners, plot); points = 0; /* move(x,y) */ corners[points].x = x; corners[points++].y = y; } else { finish_filled_curve(points, corners, plot); points = 0; edge_intersect(plot->points, i, &ex, &ey); /* move(map_x(ex),map_y(ey)); */ corners[points].x = map_x(ex); corners[points++].y = map_y(ey); /* vector(x,y); */ corners[points].x = x; corners[points++].y = y; } } else { /* prev == UNDEFINED */ finish_filled_curve(points, corners, plot); points = 0; /* move(x,y) */ corners[points].x = x; corners[points++].y = y; /* vector(x,y); */ corners[points].x = x; corners[points++].y = y; } break; } case OUTRANGE:{ if (clip_fill) { int where_was_I = clip_point(map_x(plot->points[i].x), map_y(plot->points[i].y)); if (where_was_I & (LEFT_EDGE|RIGHT_EDGE)) out_leftright = where_was_I & (LEFT_EDGE|RIGHT_EDGE); if (where_was_I & (TOP_EDGE|BOTTOM_EDGE)) out_updown = where_was_I & (TOP_EDGE|BOTTOM_EDGE); } if (prev == INRANGE) { /* from inrange to outrange */ if (clip_lines1 || clip_fill) { exit_edge = edge_intersect(plot->points, i, &ex, &ey); /* vector(map_x(ex),map_y(ey)); */ corners[points].x = map_x(ex); corners[points++].y = map_y(ey); } } else if (prev == OUTRANGE) { /* from outrange to outrange */ if (clip_fill) { if (two_edge_intersect(plot->points, i, lx, ly)) { coordinate temp; /* vector(map_x(lx[0]),map_y(ly[0])); */ corners[points].x = map_x(lx[0]); corners[points++].y = map_y(ly[0]); /* Figure out which side we entered by */ temp.x = plot->points[i].x; temp.y = plot->points[i].y; plot->points[i].x = lx[1]; plot->points[i].y = ly[1]; reentry_edge = edge_intersect(plot->points, i, &ex, &ey); plot->points[i].x = temp.x; plot->points[i].y = temp.y; if (!exit_edge) { /* Curve must have started outside the plot area */ first_entry = reentry_edge; } else if (reentry_edge != exit_edge) { fill_missing_corners(corners, &points, exit_edge, reentry_edge, out_updown, out_leftright); } /* vector(map_x(lx[1]),map_y(ly[1])); */ corners[points].x = map_x(lx[1]); corners[points++].y = map_y(ly[1]); /* Figure out which side we left by */ temp.x = plot->points[i-1].x; temp.y = plot->points[i-1].y; plot->points[i-1].x = lx[0]; plot->points[i-1].y = ly[0]; exit_edge = edge_intersect(plot->points, i, &ex, &ey); plot->points[i-1].x = temp.x; plot->points[i-1].y = temp.y; } } else if (clip_lines2) { if (two_edge_intersect(plot->points, i, lx, ly)) { finish_filled_curve(points, corners, plot); points = 0; /* move(map_x(lx[0]),map_y(ly[0])); */ corners[points].x = map_x(lx[0]); corners[points++].y = map_y(ly[0]); /* vector(map_x(lx[1]),map_y(ly[1])); */ corners[points].x = map_x(lx[1]); corners[points++].y = map_y(ly[1]); } } } break; } case UNDEFINED:{ /* UNDEFINED flags a blank line in the input file. * Unfortunately, it can also mean that the point was undefined. * Is there a clean way to detect or handle the latter case? */ if (prev != UNDEFINED) { if (first_entry && first_entry != exit_edge) fill_missing_corners(corners, &points, exit_edge, first_entry, out_updown, out_leftright); finish_filled_curve(points, corners, plot); points = 0; exit_edge = reentry_edge = first_entry = 0; } break; } default: /* just a safety */ break; } prev = plot->points[i].type; } if (clip_fill) { /* Did we finish cleanly, or is there an unresolved corner-crossing? */ if (first_entry && first_entry != exit_edge) { fill_missing_corners(corners, &points, exit_edge, first_entry, out_updown, out_leftright); } } finish_filled_curve(points, corners, plot); } /* * When the bounding curve of a filled area passes through the plot box but * exits through a different edge than it entered by, in order to properly * fill the enclosed area we must add dummy points at the plot corners. */ static void fill_missing_corners(gpiPoint *corners, int *points, int exit, int reentry, int updown, int leftright) { if ((exit | reentry) == (LEFT_EDGE | RIGHT_EDGE)) { corners[(*points)].x = (exit & LEFT_EDGE) ? map_x(X_AXIS.min) : map_x(X_AXIS.max); corners[(*points)++].y = (updown & TOP_EDGE) ? map_y(Y_AXIS.max) : map_y(Y_AXIS.min); corners[(*points)].x = (reentry & LEFT_EDGE) ? map_x(X_AXIS.min) : map_x(X_AXIS.max); corners[(*points)++].y = (updown & TOP_EDGE) ? map_y(Y_AXIS.max) : map_y(Y_AXIS.min); } else if ((exit | reentry) == (BOTTOM_EDGE | TOP_EDGE)) { corners[(*points)].x = (leftright & LEFT_EDGE) ? map_x(X_AXIS.min) : map_x(X_AXIS.max); corners[(*points)++].y = (exit & TOP_EDGE) ? map_y(Y_AXIS.max) : map_y(Y_AXIS.min); corners[(*points)].x = (leftright & LEFT_EDGE) ? map_x(X_AXIS.min) : map_x(X_AXIS.max); corners[(*points)++].y = (reentry & TOP_EDGE) ? map_y(Y_AXIS.max) : map_y(Y_AXIS.min); } else { corners[(*points)].x = (exit | reentry) & LEFT_EDGE ? map_x(X_AXIS.min) : map_x(X_AXIS.max); corners[(*points)++].y = (exit | reentry) & TOP_EDGE ? map_y(Y_AXIS.max) : map_y(Y_AXIS.min); } } /* * Fill the area between two curves */ static void plot_betweencurves(struct curve_points *plot) { double x1, x2, yl1, yu1, yl2, yu2; double xmid, ymid; double xu1, xu2; /* For polar plots */ int i; /* If terminal doesn't support filled polygons, approximate with bars */ if (!term->filled_polygon) { plot_bars(plot); return; } /* * Fill the region one quadrilateral at a time. * Check each interval to see if the curves cross. * If so, split the interval into two parts. */ for (i = 0; i < plot->p_count-1; i++) { /* FIXME: This isn't really testing for undefined points, it */ /* is looking for blank lines. We need to distinguish these. */ /* Anyhow, if there's a blank line then start a new fill area. */ if (plot->points[i].type == UNDEFINED || plot->points[i+1].type == UNDEFINED) continue; x1 = plot->points[i].x; xu1 = plot->points[i].xhigh; yl1 = plot->points[i].y; yu1 = plot->points[i].yhigh; x2 = plot->points[i+1].x; xu2 = plot->points[i+1].xhigh; yl2 = plot->points[i+1].y; yu2 = plot->points[i+1].yhigh; /* EAM 19-July-2007 Special case for polar plots. */ if (polar) { /* Find intersection of the two lines. */ /* Probably could use this code in the general case too. */ double A = (yl2-yl1) / (x2-x1); double C = (yu2-yu1) / (xu2-xu1); double b = yl1 - x1 * A; double d = yu1 - xu1 * C; xmid = (d-b) / (A-C); ymid = A * xmid + b; if ((x1-xmid)*(xmid-x2) > 0) { fill_between(x1,xu1,yl1,yu1, xmid,xmid,ymid,ymid,plot); fill_between(xmid,xmid,ymid,ymid, x2,xu2,yl2,yu2,plot); } else fill_between(x1,xu1,yl1,yu1, x2,xu2,yl2,yu2,plot); } else if ((yu1-yl1)*(yu2-yl2) < 0) { /* Cheap test for intersection in the general case */ xmid = (x1*(yl2-yu2) + x2*(yu1-yl1)) / ((yu1-yl1) + (yl2-yu2)); ymid = yu1 + (yu2-yu1)*(xmid-x1)/(x2-x1); fill_between(x1,xu1,yl1,yu1, xmid,xmid,ymid,ymid,plot); fill_between(xmid,xmid,ymid,ymid, x2,xu2,yl2,yu2,plot); } else fill_between(x1,xu1,yl1,yu1, x2,xu2,yl2,yu2,plot); } } static void fill_between( double x1, double xu1, double yl1, double yu1, double x2, double xu2, double yl2, double yu2, struct curve_points *plot) { double xmin, xmax, ymin, ymax, dx, dy1, dy2; int axis; int ic, iy; gpiPoint box[8]; struct { double x,y; } corners[8]; /* Clip against x-axis range */ /* It would be nice if we could trust xmin to be less than xmax */ axis = plot->x_axis; xmin = GPMIN(axis_array[axis].min, axis_array[axis].max); xmax = GPMAX(axis_array[axis].min, axis_array[axis].max); if (!(inrange(x1, xmin, xmax)) && !(inrange(x2, xmin, xmax))) return; /* Clip end segments. It would be nice to use edge_intersect() here, */ /* but as currently written it cannot handle the second curve. */ dx = x2 - x1; if (x1<xmin) { yl1 += (yl2-yl1) * (xmin - x1) / dx; yu1 += (yu2-yu1) * (xmin - x1) / dx; x1 = xmin; } if (x2>xmax) { yl2 += (yl2-yl1) * (xmax - x2) / dx; yu2 += (yu2-yu1) * (xmax - x2) / dx; x2 = xmax; } if (!polar) { xu1 = x1; xu2 = x2; } dx = x2 - x1; /* Clip against y-axis range */ axis = plot->y_axis; ymin = GPMIN(axis_array[axis].min, axis_array[axis].max); ymax = GPMAX(axis_array[axis].min, axis_array[axis].max); if (yl1<ymin && yu1<ymin && yl2<ymin && yu2<ymin) return; if (yl1>ymax && yu1>ymax && yl2>ymax && yu2>ymax) return; ic = 0; corners[ic].x = map_x(x1); corners[ic++].y = map_y(yl1); corners[ic].x = map_x(xu1); corners[ic++].y = map_y(yu1); #define INTERPOLATE(Y1,Y2,YBOUND) do { \ dy1 = YBOUND - Y1; \ dy2 = YBOUND - Y2; \ if (dy1 != dy2 && dy1*dy2 < 0) { \ corners[ic].y = map_y(YBOUND); \ corners[ic++].x = map_x(x1 + dx * dy1 / (dy1-dy2)); \ } \ } while (0) INTERPOLATE( yu1, yu2, ymin ); INTERPOLATE( yu1, yu2, ymax ); corners[ic].x = map_x(xu2); corners[ic++].y = map_y(yu2); corners[ic].x = map_x(x2); corners[ic++].y = map_y(yl2); INTERPOLATE( yl1, yl2, ymin ); INTERPOLATE( yl1, yl2, ymax ); #undef INTERPOLATE /* Copy the polygon vertices into a gpiPoints structure */ for (iy=0; iy<ic; iy++) { box[iy].x = corners[iy].x; cliptorange(corners[iy].y, map_y(ymin), map_y(ymax)); box[iy].y = corners[iy].y; } /* finish_filled_curve() will handle */ /* current fill style (stored in plot) */ /* above/below (stored in box[ic].x) */ if (polar) { /* "above" or "below" evaluated in terms of radial distance from origin */ /* FIXME: Most of this should be offloaded to a separate subroutine */ double ox = map_x(0); double oy = map_y(0); double plx = map_x(x1); double ply = map_y(yl1); double pux = map_x(xu1); double puy = map_y(yu1); double drl = (plx-ox)*(plx-ox) + (ply-oy)*(ply-oy); double dru = (pux-ox)*(pux-ox) + (puy-oy)*(puy-oy); double dx1 = dru - drl; double dx2; plx = map_x(x2); ply = map_y(yl2); pux = map_x(xu2); puy = map_y(yu2); drl = (plx-ox)*(plx-ox) + (ply-oy)*(ply-oy); dru = (pux-ox)*(pux-ox) + (puy-oy)*(puy-oy); dx2 = dru - drl; box[ic].x = (dx1+dx2 < 0) ? 1 : 0; } else box[ic].x = ((yu1-yl1) + (yu2-yl2) < 0) ? 1 : 0; finish_filled_curve(ic, box, plot); } /* XXX - JG */ /* plot_steps: * Plot the curves in STEPS or FILLSTEPS style */ static void plot_steps(struct curve_points *plot) { int i; /* point index */ int x=0, y=0; /* point in terminal coordinates */ struct termentry *t = term; enum coord_type prev = UNDEFINED; /* type of previous point */ double ex, ey; /* an edge point */ double lx[2], ly[2]; /* two edge points */ int xprev, yprev; /* previous point coordinates */ int y0; /* baseline */ int style = 0; /* EAM April 2011: Default to lines only, but allow filled boxes */ if ((plot->plot_style & PLOT_STYLE_HAS_FILL) && t->fillbox) { style = style_from_fill(&plot->fill_properties); if (Y_AXIS.log) { ey = Y_AXIS.min; } else { ey = 0; cliptorange(ey, Y_AXIS.min, Y_AXIS.max); } y0 = map_y(ey); } for (i = 0; i < plot->p_count; i++) { xprev = x; yprev = y; switch (plot->points[i].type) { case INRANGE: x = map_x(plot->points[i].x); y = map_y(plot->points[i].y); if (prev == INRANGE) { if (style) { if (yprev-y0 < 0) (*t->fillbox)(style, xprev,yprev,(x-xprev),y0-yprev); else (*t->fillbox)(style, xprev,y0,(x-xprev),yprev-y0); } else { (*t->vector) (x, yprev); (*t->vector) (x, y); } } else if (prev == OUTRANGE) { /* from outrange to inrange */ if (clip_lines1) { /* find edge intersection */ edge_intersect_steps(plot->points, i, &ex, &ey); xprev = map_x(ex); yprev = map_y(ey); if (style) { if (yprev-y0 < 0) (*t->fillbox)(style, xprev,yprev,(x-xprev),y0-yprev); else (*t->fillbox)(style, xprev,y0,(x-xprev),yprev-y0); } else { (*t->move) (xprev,yprev); (*t->vector) (x, yprev); (*t->vector) (x, y); } } } /* remaining case (prev == UNDEFINED) do nothing */ (*t->move)(x, y); break; case OUTRANGE: if (prev == INRANGE) { /* from inrange to outrange */ if (clip_lines1) { edge_intersect_steps(plot->points, i, &ex, &ey); x = map_x(ex); y = map_y(ey); if (style) { (*t->fillbox)(style, xprev,y0,(x-xprev),yprev-y0); } else { (*t->vector) (x, yprev); (*t->vector) (x, y); } } } else if (prev == OUTRANGE) { /* from outrange to outrange */ if (clip_lines2) { if (two_edge_intersect_steps(plot->points, i, lx, ly)) { xprev = map_x(lx[0]); yprev = map_y(ly[0]); x = map_x(lx[1]); y = map_y(ly[1]); if (style) { (*t->fillbox)(style, xprev,y0,(x-xprev),yprev-y0); } else { (*t->move) (xprev, yprev); (*t->vector) (x, yprev); (*t->vector) (x, y); } } } } (*t->move)(x, y); break; default: /* just a safety */ case UNDEFINED: break; } prev = plot->points[i].type; } } /* XXX - HOE */ /* plot_fsteps: * Plot the curves in STEPS style by step on forward yvalue */ static void plot_fsteps(struct curve_points *plot) { int i; /* point index */ int x=0, y=0; /* point in terminal coordinates */ struct termentry *t = term; enum coord_type prev = UNDEFINED; /* type of previous point */ double ex, ey; /* an edge point */ double lx[2], ly[2]; /* two edge points */ int xprev, yprev; /* previous point coordinates */ for (i = 0; i < plot->p_count; i++) { xprev = x; yprev = y; switch (plot->points[i].type) { case INRANGE: x = map_x(plot->points[i].x); y = map_y(plot->points[i].y); if (prev == INRANGE) { (*t->vector) (xprev, y); (*t->vector) (x, y); } else if (prev == OUTRANGE) { /* from outrange to inrange */ if (clip_lines1) { /* find edge intersection */ edge_intersect_fsteps(plot->points, i, &ex, &ey); xprev = map_x(ex); yprev = map_y(ey); (*t->move) (xprev, yprev); (*t->vector) (xprev, y); (*t->vector) (x, y); } } /* remaining case (prev == UNDEFINED) do nothing */ (*t->move)(x, y); break; case OUTRANGE: if (prev == INRANGE) { /* from inrange to outrange */ if (clip_lines1) { edge_intersect_fsteps(plot->points, i, &ex, &ey); x = map_x(ex); y = map_y(ey); (*t->vector) (xprev, y); (*t->vector) (x, y); } } else if (prev == OUTRANGE) { /* from outrange to outrange */ if (clip_lines2) { if (two_edge_intersect_fsteps(plot->points, i, lx, ly)) { xprev = map_x(lx[0]); yprev = map_y(ly[0]); x = map_x(lx[1]); y = map_y(ly[1]); (*t->move) (xprev, yprev); (*t->vector) (xprev, y); (*t->vector) (x, y); } } } (*t->move)(x, y); break; default: /* just a safety */ case UNDEFINED: break; } prev = plot->points[i].type; } } /* HBB 20010625: replaced homegrown bubblesort in plot_histeps() by * call of standard routine qsort(). Need to tell the compare function * about the plotted dataset via this file scope variable: */ static struct curve_points *histeps_current_plot; /* NOTE: I'd have made the comp.function 'static', but the HP-sUX gcc * bug seems to forbid that :-( */ int histeps_compare(SORTFUNC_ARGS p1, SORTFUNC_ARGS p2) { double x1=histeps_current_plot->points[*(int *)p1].x; double x2=histeps_current_plot->points[*(int *)p2].x; if (x1 < x2) return -1; else return (x1 > x2); } /* CAC */ /* plot_histeps: * Plot the curves in HISTEPS style */ static void plot_histeps(struct curve_points *plot) { int i; /* point index */ int xl, yl; /* cursor position in terminal coordinates */ struct termentry *t = term; double x, y, xn, yn; /* point position */ double y_null; /* y coordinate of histogram baseline */ int *gl, goodcount; /* array to hold list of valid points */ /* preliminary count of points inside array */ goodcount = 0; for (i = 0; i < plot->p_count; i++) if (plot->points[i].type == INRANGE || plot->points[i].type == OUTRANGE) ++goodcount; if (goodcount < 2) return; /* cannot plot less than 2 points */ gl = gp_alloc(goodcount * sizeof(int), "histeps valid point mapping"); /* fill gl array with indexes of valid (non-undefined) points. */ goodcount = 0; for (i = 0; i < plot->p_count; i++) if (plot->points[i].type == INRANGE || plot->points[i].type == OUTRANGE) { gl[goodcount] = i; ++goodcount; } /* sort the data --- tell histeps_compare about the plot * datastructure to look at, then call qsort() */ histeps_current_plot = plot; qsort(gl, goodcount, sizeof(*gl), histeps_compare); /* play it safe: invalidate the static pointer after usage */ histeps_current_plot = NULL; /* HBB 20010625: log y axis must treat 0.0 as -infinity. * Define the correct y position for the histogram's baseline. */ if (Y_AXIS.log) y_null = GPMIN(Y_AXIS.min, Y_AXIS.max); else y_null = 0.0; x = (3.0 * plot->points[gl[0]].x - plot->points[gl[1]].x) / 2.0; y = y_null; xl = map_x(x); yl = map_y(y); if (!clip_point(xl,yl)) (*t->move) (xl, yl); for (i = 0; i < goodcount - 1; i++) { /* loop over all points except last */ yn = plot->points[gl[i]].y; if ((Y_AXIS.log) && yn < y_null) yn = y_null; xn = (plot->points[gl[i]].x + plot->points[gl[i + 1]].x) / 2.0; histeps_vertical(&xl, &yl, x, y, yn); histeps_horizontal(&xl, &yl, x, xn, yn); x = xn; y = yn; } yn = plot->points[gl[i]].y; xn = (3.0 * plot->points[gl[i]].x - plot->points[gl[i - 1]].x) / 2.0; histeps_vertical(&xl, &yl, x, y, yn); histeps_horizontal(&xl, &yl, x, xn, yn); histeps_vertical(&xl, &yl, xn, yn, y_null); free(gl); } /* CAC * Draw vertical line for the histeps routine. * Performs clipping. */ static void histeps_vertical( int *cur_x, int *cur_y, /* keeps track of "cursor" position */ double x, double y1, double y2) /* coordinates of vertical line */ { struct termentry *t = term; int xm, y1m, y2m; xm = map_x(x); y1m = map_y(y1); y2m = map_y(y2); if (clip_line(&xm, &y1m, &xm, &y2m)) { (*t->move)(xm, y1m); (*t->vector)(xm, y2m); *cur_x = xm; *cur_y = y2m; } return; } /* CAC * Draw horizontal line for the histeps routine. * Performs clipping. */ static void histeps_horizontal( int *cur_x, int *cur_y, /* keeps track of "cursor" position */ double x1, double x2, double y) /* coordinates of vertical line */ { struct termentry *t = term; int x1m, x2m, ym; x1m = map_x(x1); x2m = map_x(x2); ym = map_y(y); if (clip_line(&x1m, &ym, &x2m, &ym)) { (*t->move)(x1m, ym); (*t->vector)(x2m, ym); *cur_x = x2m; *cur_y = ym; } return; } /* plot_bars: * Plot the curves in ERRORBARS style * we just plot the bars; the points are plotted in plot_points */ static void plot_bars(struct curve_points *plot) { int i; /* point index */ struct termentry *t = term; double x, y; /* position of the bar */ double ylow, yhigh; /* the ends of the bars */ double xlow, xhigh; double x1, y1, x2, y2, slope; /* parameters for polar error bars */ unsigned int xM, ylowM, yhighM; /* the mapped version of above */ unsigned int yM, xlowM, xhighM; unsigned int ylowO, yhighO; /* unclipped */ TBOOLEAN low_inrange, high_inrange; int tic = ERRORBARTIC; double halfwidth = 0; /* Used to calculate full box width */ /* Limitation: no boxes with x errorbars */ if ((plot->plot_style == YERRORBARS) || (plot->plot_style == XYERRORBARS) || (plot->plot_style == BOXERROR) || (plot->plot_style == YERRORLINES) || (plot->plot_style == XYERRORLINES) || (plot->plot_style == HISTOGRAMS) || (plot->plot_style == FILLEDCURVES) /* Only if term has no filled_polygon! */ ) { /* Draw the vertical part of the bar */ for (i = 0; i < plot->p_count; i++) { /* undefined points don't count */ if (plot->points[i].type == UNDEFINED) continue; /* check to see if in xrange */ x = plot->points[i].x; if (plot->plot_style == HISTOGRAMS) { /* Shrink each cluster to fit within one unit along X axis, */ /* centered about the integer representing the cluster number */ /* 'start' is reset to 0 at the top of eval_plots(), and then */ /* incremented if 'plot new histogram' is encountered. */ int clustersize = plot->histogram->clustersize + histogram_opts.gap; x += (i-1) * (clustersize - 1) + plot->histogram_sequence; x += histogram_opts.gap/2; x /= clustersize; x += plot->histogram->start + 0.5; /* Calculate width also */ halfwidth = (plot->points[i].xhigh - plot->points[i].xlow) / (2. * clustersize); } if (!inrange(x, X_AXIS.min, X_AXIS.max)) continue; xM = map_x(x); /* check to see if in yrange */ y = plot->points[i].y; if (!inrange(y, Y_AXIS.min, Y_AXIS.max)) continue; yM = map_y(y); /* find low and high points of bar, and check yrange */ yhigh = plot->points[i].yhigh; ylow = plot->points[i].ylow; high_inrange = inrange(yhigh, Y_AXIS.min, Y_AXIS.max); low_inrange = inrange(ylow, Y_AXIS.min, Y_AXIS.max); /* compute the plot position of yhigh */ yhighO = map_y(yhigh); if (high_inrange) yhighM = map_y(yhigh); else if (samesign(yhigh - Y_AXIS.max, Y_AXIS.max - Y_AXIS.min)) yhighM = map_y(Y_AXIS.max); else yhighM = map_y(Y_AXIS.min); /* compute the plot position of ylow */ ylowO = map_y(ylow); if (low_inrange) ylowM = map_y(ylow); else if (samesign(ylow - Y_AXIS.max, Y_AXIS.max - Y_AXIS.min)) ylowM = map_y(Y_AXIS.max); else ylowM = map_y(Y_AXIS.min); if (!high_inrange && !low_inrange && ylowM == yhighM) /* both out of range on the same side */ continue; /* find low and high points of bar, and check xrange */ xhigh = plot->points[i].xhigh; xlow = plot->points[i].xlow; if (plot->plot_style == HISTOGRAMS) { xlowM = map_x(x-halfwidth); xhighM = map_x(x+halfwidth); } else { high_inrange = inrange(xhigh, X_AXIS.min, X_AXIS.max); low_inrange = inrange(xlow, X_AXIS.min, X_AXIS.max); /* compute the plot position of xhigh */ if (high_inrange) xhighM = map_x(xhigh); else if (samesign(xhigh - X_AXIS.max, X_AXIS.max - X_AXIS.min)) xhighM = map_x(X_AXIS.max); else xhighM = map_x(X_AXIS.min); /* compute the plot position of xlow */ if (low_inrange) xlowM = map_x(xlow); else if (samesign(xlow - X_AXIS.max, X_AXIS.max - X_AXIS.min)) xlowM = map_x(X_AXIS.max); else xlowM = map_x(X_AXIS.min); if (!high_inrange && !low_inrange && xlowM == xhighM) /* both out of range on the same side */ continue; } /* Check for variable color - June 2010 */ if ((plot->plot_style != HISTOGRAMS) && (plot->plot_style != FILLEDCURVES) ) { check_for_variable_color(plot, &plot->varcolor[i]); } /* Error bars should be drawn in the border color for filled boxes * but only if there *is* a border color. */ if ((plot->plot_style == BOXERROR) && t->fillbox) (void) need_fill_border(&plot->fill_properties); /* by here everything has been mapped */ if (!polar) { /* HBB 981130: use Igor's routine *only* for polar errorbars */ (*t->move) (xM, ylowM); /* draw the main bar */ (*t->vector) (xM, yhighM); if (bar_size < 0.0) { /* draw the bottom tic same width as box */ draw_clip_line(xlowM, ylowO, xhighM, ylowO); /* draw the top tic same width as box */ draw_clip_line(xlowM, yhighO, xhighM, yhighO); } else if (bar_size > 0.0) { /* draw the bottom tic */ draw_clip_line((unsigned int)(xM - bar_size * tic), ylowO, (unsigned int)(xM + bar_size * tic), ylowO); /* draw the top tic */ draw_clip_line((unsigned int)(xM - bar_size * tic), yhighO, (unsigned int)(xM + bar_size * tic), yhighO); } } else { /* HBB 981130: see above */ /* The above has been replaced by Igor inorder to get errorbars coming out in polar mode AND to stop the bar from going through the symbol */ if ((xhighM - xlowM) * (xhighM - xlowM) + (yhighM - ylowM) * (yhighM - ylowM) > pointsize * tic * pointsize * tic * 4.5) { /* Only plot the error bar if it is bigger than the * symbol */ /* The factor of 4.5 should strictly be 4.0, but it looks * better to drop the error bar if it is only slightly * bigger than the symbol, Igor. */ if (xlowM == xhighM) { (*t->move) (xM, ylowM); /* draw the main bar to the symbol end */ (*t->vector) (xM, (unsigned int) (yM - pointsize * tic)); (*t->move) (xM, (unsigned int) (yM + pointsize * tic)); /* draw the other part of the main bar */ (*t->vector) (xM, yhighM); } else { (*t->move) (xlowM, ylowM); /* draw the main bar in polar mode. Note that here * the bar is drawn through the symbol. I tried to * fix this, but got into trouble with the two bars * (on either side of symbol) not being perfectly * parallel due to mapping considerations. Igor */ (*t->vector) (xhighM, yhighM); } if (bar_size > 0.0) { /* The following attempts to ensure that the tics * are perpendicular to the error bar, Igor. */ /*perpendicular to the main bar */ slope = (xlowM * 1.0 - xhighM * 1.0) / (yhighM * 1.0 - ylowM * 1.0 + 1e-10); x1 = xlowM + bar_size * tic / sqrt(1.0 + slope * slope); x2 = xlowM - bar_size * tic / sqrt(1.0 + slope * slope); y1 = slope * (x1 - xlowM) + ylowM; y2 = slope * (x2 - xlowM) + ylowM; /* draw the bottom tic */ (*t->move) ((unsigned int) x1, (unsigned int) y1); (*t->vector) ((unsigned int) x2, (unsigned int) y2); x1 = xhighM + bar_size * tic / sqrt(1.0 + slope * slope); x2 = xhighM - bar_size * tic / sqrt(1.0 + slope * slope); y1 = slope * (x1 - xhighM) + yhighM; y2 = slope * (x2 - xhighM) + yhighM; /* draw the top tic */ (*t->move) ((unsigned int) x1, (unsigned int) y1); (*t->vector) ((unsigned int) x2, (unsigned int) y2); } /* if error bar is bigger than symbol */ } } /* HBB 981130: see above */ } /* for loop */ } /* if yerrorbars OR xyerrorbars OR yerrorlines OR xyerrorlines */ if ((plot->plot_style == XERRORBARS) || (plot->plot_style == XYERRORBARS) || (plot->plot_style == XERRORLINES) || (plot->plot_style == XYERRORLINES)) { /* Draw the horizontal part of the bar */ for (i = 0; i < plot->p_count; i++) { /* undefined points don't count */ if (plot->points[i].type == UNDEFINED) continue; /* check to see if in yrange */ y = plot->points[i].y; if (!inrange(y, Y_AXIS.min, Y_AXIS.max)) continue; yM = map_y(y); /* find low and high points of bar, and check xrange */ xhigh = plot->points[i].xhigh; xlow = plot->points[i].xlow; high_inrange = inrange(xhigh, X_AXIS.min, X_AXIS.max); low_inrange = inrange(xlow, X_AXIS.min, X_AXIS.max); /* compute the plot position of xhigh */ if (high_inrange) xhighM = map_x(xhigh); else if (samesign(xhigh - X_AXIS.max, X_AXIS.max - X_AXIS.min)) xhighM = map_x(X_AXIS.max); else xhighM = map_x(X_AXIS.min); /* compute the plot position of xlow */ if (low_inrange) xlowM = map_x(xlow); else if (samesign(xlow - X_AXIS.max, X_AXIS.max - X_AXIS.min)) xlowM = map_x(X_AXIS.max); else xlowM = map_x(X_AXIS.min); if (!high_inrange && !low_inrange && xlowM == xhighM) /* both out of range on the same side */ continue; /* Check for variable color - June 2010 */ check_for_variable_color(plot, &plot->varcolor[i]); /* by here everything has been mapped */ (*t->move) (xlowM, yM); (*t->vector) (xhighM, yM); /* draw the main bar */ if (bar_size > 0.0) { (*t->move) (xlowM, (unsigned int) (yM - bar_size * tic)); /* draw the left tic */ (*t->vector) (xlowM, (unsigned int) (yM + bar_size * tic)); (*t->move) (xhighM, (unsigned int) (yM - bar_size * tic)); /* draw the right tic */ (*t->vector) (xhighM, (unsigned int) (yM + bar_size * tic)); } } /* for loop */ } /* if xerrorbars OR xyerrorbars OR xerrorlines OR xyerrorlines */ } /* plot_boxes: * EAM Sep 2002 - Consolidate BOXES and FILLEDBOXES */ static void plot_boxes(struct curve_points *plot, int xaxis_y) { int i; /* point index */ int xl, xr, yb, yt; /* point in terminal coordinates */ double dxl, dxr, dyt; struct termentry *t = term; enum coord_type prev = UNDEFINED; /* type of previous point */ double dyb = 0.0; /* The stackheight[] array contains the y coord of the top */ /* of the stack so far for each point. */ if (plot->plot_style == HISTOGRAMS) { int newsize = plot->p_count; if (histogram_opts.type == HT_STACKED_IN_TOWERS) stack_count = 0; if (histogram_opts.type == HT_STACKED_IN_LAYERS && plot->histogram_sequence == 0) stack_count = 0; if (!stackheight) { stackheight = gp_alloc( newsize * sizeof(struct coordinate GPHUGE), "stackheight array"); for (i = 0; i < newsize; i++) { stackheight[i].yhigh = 0; stackheight[i].ylow = 0; } stack_count = newsize; } else if (stack_count < newsize) { stackheight = gp_realloc( stackheight, newsize * sizeof(struct coordinate GPHUGE), "stackheight array"); for (i = stack_count; i < newsize; i++) { stackheight[i].yhigh = 0; stackheight[i].ylow = 0; } stack_count = newsize; } } for (i = 0; i < plot->p_count; i++) { switch (plot->points[i].type) { case OUTRANGE: case INRANGE:{ if (plot->points[i].z < 0.0) { /* need to auto-calc width */ if (prev != UNDEFINED) { if (boxwidth < 0) dxl = (plot->points[i-1].x - plot->points[i].x) / 2.0; else if (! boxwidth_is_absolute) dxl = (plot->points[i-1].x - plot->points[i].x) * boxwidth / 2.0; else /* Hits here on 3 column BOXERRORBARS */ dxl = -boxwidth / 2.0; } else { if (boxwidth > 0 && boxwidth_is_absolute) dxl = -boxwidth / 2.0; else dxl = 0.0; } if (i < plot->p_count - 1) { if (plot->points[i + 1].type != UNDEFINED) { if (boxwidth < 0) dxr = (plot->points[i+1].x - plot->points[i].x) / 2.0; else if (! boxwidth_is_absolute) dxr = (plot->points[i+1].x - plot->points[i].x) * boxwidth / 2.0; else /* Hits here on 3 column BOXERRORBARS */ dxr = boxwidth / 2.0; } else { dxr = -dxl; } } else { dxr = -dxl; } if (prev == UNDEFINED) dxl = -dxr; dxl = plot->points[i].x + dxl; dxr = plot->points[i].x + dxr; } else { /* z >= 0 */ dxr = plot->points[i].xhigh; dxl = plot->points[i].xlow; } if (plot->plot_style == BOXXYERROR) { dyb = plot->points[i].ylow; cliptorange(dyb, Y_AXIS.min, Y_AXIS.max); xaxis_y = map_y(dyb); dyt = plot->points[i].yhigh; } else { dyt = plot->points[i].y; } if (plot->plot_style == HISTOGRAMS) { int ix = plot->points[i].x; int histogram_linetype = i; struct lp_style_type ls; int stack = i; if (plot->histogram->startcolor > 0) histogram_linetype += plot->histogram->startcolor; /* Shrink each cluster to fit within one unit along X axis, */ /* centered about the integer representing the cluster number */ /* 'start' is reset to 0 at the top of eval_plots(), and then */ /* incremented if 'plot new histogram' is encountered. */ if (histogram_opts.type == HT_CLUSTERED || histogram_opts.type == HT_ERRORBARS) { int clustersize = plot->histogram->clustersize + histogram_opts.gap; dxl += (ix-1) * (clustersize - 1) + plot->histogram_sequence; dxr += (ix-1) * (clustersize - 1) + plot->histogram_sequence; dxl += histogram_opts.gap/2; dxr += histogram_opts.gap/2; dxl /= clustersize; dxr /= clustersize; dxl += plot->histogram->start + 0.5; dxr += plot->histogram->start + 0.5; } else if (histogram_opts.type == HT_STACKED_IN_TOWERS) { dxl = plot->histogram->start - boxwidth / 2.0; dxr = plot->histogram->start + boxwidth / 2.0; dxl += plot->histogram_sequence; dxr += plot->histogram_sequence; } else if (histogram_opts.type == HT_STACKED_IN_LAYERS) { dxl += plot->histogram->start; dxr += plot->histogram->start; } switch (histogram_opts.type) { case HT_STACKED_IN_TOWERS: /* columnstacked */ stack = 0; /* Line type (color) must match row number */ if (prefer_line_styles) lp_use_properties(&ls, histogram_linetype); else load_linetype(&ls, histogram_linetype); apply_pm3dcolor(&ls.pm3d_color, term); plot->fill_properties.fillpattern = histogram_linetype; /* Fall through */ case HT_STACKED_IN_LAYERS: /* rowstacked */ if( plot->points[i].y >= 0 ){ dyb = stackheight[stack].yhigh; dyt += stackheight[stack].yhigh; stackheight[stack].yhigh += plot->points[i].y; } else { dyb = stackheight[stack].ylow; dyt += stackheight[stack].ylow; stackheight[stack].ylow += plot->points[i].y; } if ((Y_AXIS.min < Y_AXIS.max && dyb < Y_AXIS.min) || (Y_AXIS.max < Y_AXIS.min && dyb > Y_AXIS.min)) dyb = Y_AXIS.min; if ((Y_AXIS.min < Y_AXIS.max && dyb > Y_AXIS.max) || (Y_AXIS.max < Y_AXIS.min && dyb < Y_AXIS.max)) dyb = Y_AXIS.max; break; case HT_CLUSTERED: case HT_ERRORBARS: break; } } /* clip to border */ cliptorange(dyt, Y_AXIS.min, Y_AXIS.max); cliptorange(dxr, X_AXIS.min, X_AXIS.max); cliptorange(dxl, X_AXIS.min, X_AXIS.max); /* Entire box is out of range on x */ if (dxr == dxl && (dxr == X_AXIS.min || dxr == X_AXIS.max)) break; xl = map_x(dxl); xr = map_x(dxr); yt = map_y(dyt); yb = xaxis_y; /* Entire box is out of range on y */ if (yb == yt && (dyt == Y_AXIS.min || dyt == Y_AXIS.max)) break; if (plot->plot_style == HISTOGRAMS && (histogram_opts.type == HT_STACKED_IN_LAYERS || histogram_opts.type == HT_STACKED_IN_TOWERS)) yb = map_y(dyb); /* Variable color */ if (plot->plot_style == BOXES || plot->plot_style == BOXXYERROR || plot->plot_style == BOXERROR) { check_for_variable_color(plot, &plot->varcolor[i]); } if ((plot->fill_properties.fillstyle != FS_EMPTY) && t->fillbox) { int x, y, w, h; int style; x = xl; y = yb; w = xr - xl + 1; h = yt - yb + 1; /* avoid negative width/height */ if( w <= 0 ) { x = xr; w = xl - xr + 1; } if( h <= 0 ) { y = yt; h = yb - yt + 1; } style = style_from_fill(&plot->fill_properties); (*t->fillbox) (style, x, y, w, h); if (!need_fill_border(&plot->fill_properties)) break; } newpath(); (*t->move) (xl, yb); (*t->vector) (xl, yt); (*t->vector) (xr, yt); (*t->vector) (xr, yb); (*t->vector) (xl, yb); closepath(); if( t->fillbox && plot->fill_properties.border_color.type != TC_DEFAULT) { (*t->linetype)(plot->lp_properties.l_type); if (plot->lp_properties.use_palette) apply_pm3dcolor(&plot->lp_properties.pm3d_color,t); } break; } /* case OUTRANGE, INRANGE */ default: /* just a safety */ case UNDEFINED:{ break; } } /* switch point-type */ prev = plot->points[i].type; } /*loop */ } /* plot_points: * Plot the curves in POINTSTYLE style */ static void plot_points(struct curve_points *plot) { int i; int x, y; int interval = plot->lp_properties.p_interval; struct termentry *t = term; for (i = 0; i < plot->p_count; i++) { if ((plot->plot_style == LINESPOINTS) && (interval) && (i % interval)) { continue; } if (plot->points[i].type == INRANGE) { x = map_x(plot->points[i].x); y = map_y(plot->points[i].y); /* do clipping if necessary */ if (!clip_points || (x >= plot_bounds.xleft + p_width && y >= plot_bounds.ybot + p_height && x <= plot_bounds.xright - p_width && y <= plot_bounds.ytop - p_height)) { if ((plot->plot_style == POINTSTYLE || plot->plot_style == LINESPOINTS) && plot->lp_properties.p_size == PTSZ_VARIABLE) (*t->pointsize)(pointsize * plot->points[i].z); /* A negative interval indicates we should try to blank out the */ /* area behind the point symbol. This could be done better by */ /* implementing a special point type, but that would require */ /* modification to all terminal drivers. It might be worth it. */ /* term_apply_lp_properties will restore the point type and size*/ if (plot->plot_style == LINESPOINTS && interval < 0) { if (t->set_color) (*t->set_color)(&background_fill); (*t->pointsize)(pointsize * pointintervalbox); (*t->point) (x, y, 6); term_apply_lp_properties(&(plot->lp_properties)); } /* rgb variable - color read from data column */ check_for_variable_color(plot, &plot->varcolor[i]); (*t->point) (x, y, plot->lp_properties.p_type); } } } } #ifdef EAM_OBJECTS /* plot_circles: * Plot the curves in CIRCLES style */ static void plot_circles(struct curve_points *plot) { int i; int x, y; double radius, arc_begin, arc_end; struct fill_style_type *fillstyle = &plot->fill_properties; int style = style_from_fill(fillstyle); TBOOLEAN withborder = FALSE; if (fillstyle->border_color.type != TC_LT || fillstyle->border_color.lt != LT_NODRAW) withborder = TRUE; for (i = 0; i < plot->p_count; i++) { if (plot->points[i].type == INRANGE) { x = map_x(plot->points[i].x); y = map_y(plot->points[i].y); radius = x - map_x(plot->points[i].xlow); if (plot->points[i].z == DEFAULT_RADIUS) { double junk; map_position_r( &default_circle.o.circle.extent, &radius, &junk, "radius"); } arc_begin = plot->points[i].ylow; arc_end = plot->points[i].xhigh; /* rgb variable - color read from data column */ if (!check_for_variable_color(plot, &plot->varcolor[i]) && withborder) term_apply_lp_properties(&plot->lp_properties); do_arc(x,y, radius, arc_begin, arc_end, style); if (withborder) { need_fill_border(&plot->fill_properties); do_arc(x,y, radius, arc_begin, arc_end, 0); } } } } /* plot_ellipses: * Plot the curves in ELLIPSES style */ static void plot_ellipses(struct curve_points *plot) { int i; t_ellipse *e = (t_ellipse *) gp_alloc(sizeof(t_ellipse), "ellipse plot"); double tempx, tempy, tempfoo; struct fill_style_type *fillstyle = &plot->fill_properties; int style = style_from_fill(fillstyle); TBOOLEAN withborder = FALSE; if (fillstyle->border_color.type != TC_LT || fillstyle->border_color.lt != LT_NODRAW) withborder = TRUE; e->extent.scalex = (plot->x_axis == SECOND_X_AXIS) ? second_axes : first_axes; e->extent.scaley = (plot->y_axis == SECOND_Y_AXIS) ? second_axes : first_axes; e->type = plot->ellipseaxes_units; for (i = 0; i < plot->p_count; i++) { if (plot->points[i].type == INRANGE) { e->center.x = map_x(plot->points[i].x); e->center.y = map_y(plot->points[i].y); e->extent.x = plot->points[i].xlow; /* major axis */ e->extent.y = plot->points[i].xhigh; /* minor axis */ /* the mapping can be set by the * "set ellipseaxes" setting * both x units, mixed, both y units */ /* clumsy solution */ switch (e->type) { case ELLIPSEAXES_XY: map_position_r(&e->extent, &tempx, &tempy, "ellipse"); e->extent.x = tempx; e->extent.y = tempy; break; case ELLIPSEAXES_XX: map_position_r(&e->extent, &tempx, &tempy, "ellipse"); tempfoo = tempx; e->extent.x = e->extent.y; map_position_r(&e->extent, &tempy, &tempx, "ellipse"); e->extent.x = tempfoo; e->extent.y = tempy; break; case ELLIPSEAXES_YY: map_position_r(&e->extent, &tempx, &tempy, "ellipse"); tempfoo = tempy; e->extent.y = e->extent.x; map_position_r(&e->extent, &tempy, &tempx, "ellipse"); e->extent.x = tempx; e->extent.y = tempfoo; break; } if (plot->points[i].z <= DEFAULT_RADIUS) { /*memcpy(&(e->extent), &default_ellipse.o.ellipse.extent, sizeof(t_position));*/ /*e->extent.x = default_ellipse.o.ellipse.extent.x; e->extent.y = default_ellipse.o.ellipse.extent.y;*/ map_position_r(&default_ellipse.o.ellipse.extent, &e->extent.x, &e->extent.y, "ellipse"); } if (plot->points[i].z == DEFAULT_ELLIPSE) e->orientation = default_ellipse.o.ellipse.orientation; else e->orientation = plot->points[i].ylow; /* rgb variable - color read from data column */ if (!check_for_variable_color(plot, &plot->varcolor[i]) && withborder) term_apply_lp_properties(&plot->lp_properties); do_ellipse(2, e, style, FALSE); if (withborder) { need_fill_border(&plot->fill_properties); do_ellipse(2, e, 0, FALSE); } } } free(e); /* free(willy); */ } #endif /* plot_dots: * Plot the curves in DOTS style */ static void plot_dots(struct curve_points *plot) { int i; int x, y; struct termentry *t = term; for (i = 0; i < plot->p_count; i++) { if (plot->points[i].type == INRANGE) { x = map_x(plot->points[i].x); y = map_y(plot->points[i].y); /* rgb variable - color read from data column */ check_for_variable_color(plot, &plot->varcolor[i]); /* point type -1 is a dot */ (*t->point) (x, y, -1); } } } /* plot_vectors: * Plot the curves in VECTORS style */ static void plot_vectors(struct curve_points *plot) { int i; int x1, y1, x2, y2; struct termentry *t = term; struct coordinate points[2]; double ex, ey; double lx[2], ly[2]; arrow_style_type ap; /* Normally this is only necessary once because all arrows equal */ ap = plot->arrow_properties; term_apply_lp_properties(&ap.lp_properties); apply_head_properties(&ap); for (i = 0; i < plot->p_count; i++) { points[0] = plot->points[i]; if (points[0].type == UNDEFINED) continue; points[1].x = plot->points[i].xhigh; points[1].y = plot->points[i].yhigh; /* variable arrow style read from extra data column */ if (plot->arrow_properties.tag == AS_VARIABLE) { int as = plot->points[i].z; arrow_use_properties(&ap, as); term_apply_lp_properties(&ap.lp_properties); apply_head_properties(&ap); } /* variable color read from extra data column. */ check_for_variable_color(plot, &plot->varcolor[i]); if (inrange(points[1].x, X_AXIS.min, X_AXIS.max) && inrange(points[1].y, Y_AXIS.min, Y_AXIS.max)) { /* to inrange */ points[1].type = INRANGE; x2 = map_x(points[1].x); y2 = map_y(points[1].y); if (points[0].type == INRANGE) { x1 = map_x(points[0].x); y1 = map_y(points[0].y); (*t->arrow) (x1, y1, x2, y2, ap.head); } else if (points[0].type == OUTRANGE) { /* from outrange to inrange */ if (clip_lines1) { edge_intersect(points, 1, &ex, &ey); x1 = map_x(ex); y1 = map_y(ey); if (ap.head & END_HEAD) (*t->arrow) (x1, y1, x2, y2, END_HEAD); else (*t->arrow) (x1, y1, x2, y2, NOHEAD); } } } else { /* to outrange */ points[1].type = OUTRANGE; if (points[0].type == INRANGE) { /* from inrange to outrange */ if (clip_lines1) { x1 = map_x(points[0].x); y1 = map_y(points[0].y); edge_intersect(points, 1, &ex, &ey); x2 = map_x(ex); y2 = map_y(ey); if (ap.head & BACKHEAD) (*t->arrow) (x2, y2, x1, y1, BACKHEAD); else (*t->arrow) (x1, y1, x2, y2, NOHEAD); } } else if (points[0].type == OUTRANGE) { /* from outrange to outrange */ if (clip_lines2) { if (two_edge_intersect(points, 1, lx, ly)) { x1 = map_x(lx[0]); y1 = map_y(ly[0]); x2 = map_x(lx[1]); y2 = map_y(ly[1]); (*t->arrow) (x1, y1, x2, y2, NOHEAD); } } } } } } /* plot_f_bars: * Plot the curves in FINANCEBARS style * EAM Feg 2010 - This routine is also used for BOXPLOT, which * loads a median value into xhigh */ static void plot_f_bars(struct curve_points *plot) { int i; /* point index */ struct termentry *t = term; double x; /* position of the bar */ double ylow, yhigh, yclose, yopen; /* the ends of the bars */ unsigned int xM, ylowM, yhighM; /* the mapped version of above */ TBOOLEAN low_inrange, high_inrange; int tic = GPMAX(ERRORBARTIC/2,1); for (i = 0; i < plot->p_count; i++) { /* undefined points don't count */ if (plot->points[i].type == UNDEFINED) continue; /* check to see if in xrange */ x = plot->points[i].x; if (!inrange(x, X_AXIS.min, X_AXIS.max)) continue; xM = map_x(x); /* find low and high points of bar, and check yrange */ yhigh = plot->points[i].yhigh; ylow = plot->points[i].ylow; yclose = plot->points[i].z; yopen = plot->points[i].y; high_inrange = inrange(yhigh, Y_AXIS.min, Y_AXIS.max); low_inrange = inrange(ylow, Y_AXIS.min, Y_AXIS.max); /* compute the plot position of yhigh */ if (high_inrange) yhighM = map_y(yhigh); else if (samesign(yhigh - Y_AXIS.max, Y_AXIS.max - Y_AXIS.min)) yhighM = map_y(Y_AXIS.max); else yhighM = map_y(Y_AXIS.min); /* compute the plot position of ylow */ if (low_inrange) ylowM = map_y(ylow); else if (samesign(ylow - Y_AXIS.max, Y_AXIS.max - Y_AXIS.min)) ylowM = map_y(Y_AXIS.max); else ylowM = map_y(Y_AXIS.min); if (!high_inrange && !low_inrange && ylowM == yhighM) /* both out of range on the same side */ continue; /* variable color read from extra data column. June 2010 */ check_for_variable_color(plot, &plot->varcolor[i]); /* by here everything has been mapped */ (*t->move) (xM, ylowM); (*t->vector) (xM, yhighM); /* draw the main bar */ /* draw the open tic */ (*t->move) ((unsigned int) (xM - bar_size * tic), map_y(yopen)); (*t->vector) (xM, map_y(yopen)); /* draw the close tic */ (*t->move) ((unsigned int) (xM + bar_size * tic), map_y(yclose)); (*t->vector) (xM, map_y(yclose)); /* Draw a bar at the median (stored in xhigh) */ if (plot->plot_style == BOXPLOT) { unsigned int ymedian = map_y(plot->points[i].xhigh); (*t->move) (xM - bar_size * tic, ymedian); (*t->vector) (xM + bar_size * tic, ymedian); } } } /* plot_c_bars: * Plot the curves in CANDLESTICKS style * EAM Apr 2008 - switch to using empty/fill rather than empty/striped * to distinguish whether (open > close) * EAM Dec 2009 - allow an optional 6th column to specify width * This routine is also used for BOXPLOT, which * loads a median value into xhigh */ static void plot_c_bars(struct curve_points *plot) { struct termentry *t = term; int i; double x; /* position of the bar */ double dxl, dxr, ylow, yhigh, yclose, yopen; /* the ends of the bars */ int xlowM, xhighM, xM, ylowM, yhighM; /* mapped version of above */ int ymin, ymax; /* clipped to plot extent */ enum coord_type prev = UNDEFINED; /* type of previous point */ TBOOLEAN low_inrange, high_inrange; TBOOLEAN open_inrange, close_inrange; int tic = GPMAX(ERRORBARTIC/2,1); for (i = 0; i < plot->p_count; i++) { TBOOLEAN skip_box = FALSE; /* undefined points don't count */ if (plot->points[i].type == UNDEFINED) continue; /* check to see if in xrange */ x = plot->points[i].x; if (!inrange(x, X_AXIS.min, X_AXIS.max)) continue; xM = map_x(x); /* find low and high points of bar, and check yrange */ yhigh = plot->points[i].yhigh; ylow = plot->points[i].ylow; yclose = plot->points[i].z; yopen = plot->points[i].y; /* HBB 20010928: To make code match the documentation, ensure * yhigh is actually higher than ylow */ if (yhigh < ylow) { double temp = ylow; ylow = yhigh; yhigh = temp; } high_inrange = inrange(yhigh, axis_array[y_axis].min, axis_array[y_axis].max); low_inrange = inrange(ylow, axis_array[y_axis].min, axis_array[y_axis].max); /* compute the plot position of yhigh */ if (high_inrange) yhighM = map_y(yhigh); else if (samesign(yhigh - axis_array[y_axis].max, axis_array[y_axis].max - axis_array[y_axis].min)) yhighM = map_y(axis_array[y_axis].max); else yhighM = map_y(axis_array[y_axis].min); /* compute the plot position of ylow */ if (low_inrange) ylowM = map_y(ylow); else if (samesign(ylow - axis_array[y_axis].max, axis_array[y_axis].max - axis_array[y_axis].min)) ylowM = map_y(axis_array[y_axis].max); else ylowM = map_y(axis_array[y_axis].min); if (!high_inrange && !low_inrange && ylowM == yhighM) /* both out of range on the same side */ continue; if (plot->points[i].xlow != plot->points[i].x) { dxl = plot->points[i].xlow; dxr = 2 * x - dxl; cliptorange(dxr, X_AXIS.min, X_AXIS.max); cliptorange(dxl, X_AXIS.min, X_AXIS.max); xlowM = map_x(dxl); xhighM = map_x(dxr); } else if (plot->plot_style == BOXPLOT) { dxr = (boxwidth_is_absolute && boxwidth > 0) ? boxwidth/2. : 0.25; xlowM = map_x(x-dxr); xhighM = map_x(x+dxr); } else if (boxwidth < 0.0) { xlowM = xM - bar_size * tic; xhighM = xM + bar_size * tic; } else { dxl = -boxwidth / 2.0; if (prev != UNDEFINED) if (! boxwidth_is_absolute) dxl = (plot->points[i-1].x - plot->points[i].x) * boxwidth / 2.0; dxr = -dxl; if (i < plot->p_count - 1) { if (plot->points[i + 1].type != UNDEFINED) { if (! boxwidth_is_absolute) dxr = (plot->points[i+1].x - plot->points[i].x) * boxwidth / 2.0; else dxr = boxwidth / 2.0; } } if (prev == UNDEFINED) dxl = -dxr; dxl = x + dxl; dxr = x + dxr; cliptorange(dxr, X_AXIS.min, X_AXIS.max); cliptorange(dxl, X_AXIS.min, X_AXIS.max); xlowM = map_x(dxl); xhighM = map_x(dxr); } /* EAM Feb 2007 Force width to be an odd number of pixels */ /* so that the center bar can be centered perfectly. */ if (((xhighM-xlowM) & 01) != 0) { xhighM++; if (xM-xlowM > xhighM-xM) xM--; if (xM-xlowM < xhighM-xM) xM++; } /* EAM Feb 2006 Clip to plot vertical extent */ open_inrange = inrange(yopen, axis_array[y_axis].min, axis_array[y_axis].max); close_inrange = inrange(yclose, axis_array[y_axis].min, axis_array[y_axis].max); cliptorange(yopen, Y_AXIS.min, Y_AXIS.max); cliptorange(yclose, Y_AXIS.min, Y_AXIS.max); if (map_y(yopen) < map_y(yclose)) { ymin = map_y(yopen); ymax = map_y(yclose); } else { ymax = map_y(yopen); ymin = map_y(yclose); } if (!open_inrange && !close_inrange && ymin == ymax) skip_box = TRUE; /* Reset to original color, if we changed it for the border */ if (plot->fill_properties.border_color.type != TC_DEFAULT && !( plot->fill_properties.border_color.type == TC_LT && plot->fill_properties.border_color.lt == LT_NODRAW)) { (*t->linetype)(plot->lp_properties.l_type); if (plot->lp_properties.use_palette) apply_pm3dcolor(&plot->lp_properties.pm3d_color,t); } /* variable color read from extra data column. June 2010 */ check_for_variable_color(plot, &plot->varcolor[i]); /* Boxes are always filled if an explicit non-empty fillstyle is set. */ /* If the fillstyle is FS_EMPTY, fill to indicate (open > close). */ if (term->fillbox && !skip_box) { int style = style_from_fill(&plot->fill_properties); if ((style != FS_EMPTY) || (yopen > yclose)) { unsigned int x = xlowM; unsigned int y = ymin; unsigned int w = (xhighM-xlowM); unsigned int h = (ymax-ymin); if (style == FS_EMPTY && plot->plot_style != BOXPLOT) style = FS_OPAQUE; (*t->fillbox)(style, x, y, w, h); if (style_from_fill(&plot->fill_properties) != FS_EMPTY) need_fill_border(&plot->fill_properties); } } /* Draw whiskers and an open box */ (*t->move) (xM, ylowM); (*t->vector) (xM, ymin); (*t->move) (xM, ymax); (*t->vector) (xM, yhighM); if (!skip_box) { newpath(); (*t->move) (xlowM, map_y(yopen)); (*t->vector) (xhighM, map_y(yopen)); (*t->vector) (xhighM, map_y(yclose)); (*t->vector) (xlowM, map_y(yclose)); (*t->vector) (xlowM, map_y(yopen)); closepath(); } /* Some users prefer bars at the end of the whiskers */ if (plot->plot_style == BOXPLOT || plot->arrow_properties.head == BOTH_HEADS) { unsigned int d; if (plot->plot_style == BOXPLOT) { if (bar_size < 0) d = 0; else d = (xhighM-xlowM)/2. - (bar_size * term->h_tic); } else { double frac = plot->arrow_properties.head_length; d = (frac <= 0) ? 0 : (xhighM-xlowM)*(1.-frac)/2.; } if (high_inrange) { (*t->move) (xlowM+d, yhighM); (*t->vector) (xhighM-d, yhighM); } if (low_inrange) { (*t->move) (xlowM+d, ylowM); (*t->vector) (xhighM-d, ylowM); } } /* BOXPLOT wants a median line also, which is stored in xhigh */ if (plot->plot_style == BOXPLOT) { int ymedianM = map_y(plot->points[i].xhigh); (*t->move) (xlowM, ymedianM); (*t->vector) (xhighM, ymedianM); } /* Through 4.2 gnuplot would indicate (open > close) by drawing */ /* three vertical bars. Now we use solid fill. But if the current */ /* terminal does not support filled boxes, fall back to the old way */ if ((yopen > yclose) && !(term->fillbox)) { (*t->move) (xM, ymin); (*t->vector) (xM, ymax); (*t->move) ( (xM + xlowM) / 2, ymin); (*t->vector) ( (xM + xlowM) / 2, ymax); (*t->move) ( (xM + xhighM) / 2, ymin); (*t->vector) ( (xM + xhighM) / 2, ymax); } prev = plot->points[i].type; } } /* * Plot the curves in BOXPLOT style */ int compare_ypoints(SORTFUNC_ARGS arg1, SORTFUNC_ARGS arg2) { struct coordinate const *p1 = arg1; struct coordinate const *p2 = arg2; if (p1->y > p2->y) return (1); if (p1->y < p2->y) return (-1); return (0); } int filter_boxplot(struct curve_points *plot) { int i; int N = plot->p_count; /* Force any undefined points to the end of the list */ for (i=0; i<N; i++) if (plot->points[i].type == UNDEFINED) plot->points[i].y = VERYLARGE; /* Sort the points to find median and quartiles */ qsort(plot->points, N, sizeof(struct coordinate), compare_ypoints); /* Remove any undefined points */ while (plot->points[N-1].type == UNDEFINED) N--; plot->p_count = N; return N; } static int filter_boxplot_factor(struct curve_points *plot, int level) { int i, real_level; int N = plot->p_count; /* Do we have to show the boxplots in alphabetical order of factors? */ if (boxplot_opts.sort_factors && plot->boxplot_factor_order) real_level = plot->boxplot_factor_order[level]; else real_level = level; /* If the factor doesn't match, * change the point to undefined and force it to the end of the list */ for (i=0; i<N; i++) { plot->points[i].y = plot->points[i].yhigh; plot->points[i].type = INRANGE; if (plot->points[i].ylow != real_level) { plot->points[i].type = UNDEFINED; plot->points[i].y = VERYLARGE; FPRINTF((stderr, "filter_boxplot_factor: rejecting point: level %d, factor %g, i %d\n", level, plot->points[i].ylow, i)); } } /* Sort the points to find median and quartiles */ qsort(plot->points, N, sizeof(struct coordinate), compare_ypoints); /* Remove any undefined points */ while (plot->points[N-1].type == UNDEFINED) N--; plot->p_count = N; return N; } static void plot_boxplot(struct curve_points *plot) { int N; int saved_p_count; struct coordinate *save_points = plot->points; struct coordinate candle; double median, quartile1, quartile3; double whisker_top = 0, whisker_bot = 0; int level; int levels = plot->boxplot_factors; if (levels == 0) levels = 1; saved_p_count = plot->p_count; for (level=0; level<levels; level++) { /* Sort the points and get rid of any that are undefined */ /* EAM Feb 2011: Move this to boxplot_range_fiddling() */ /* N = filter_boxplot(plot); */ /* but we need filtering to make factored boxplots work: */ if (levels > 1) { plot->p_count = saved_p_count; N = filter_boxplot_factor(plot, level); } else N = plot->p_count; /* Not enough points left to make a boxplot */ if (N < 4) { candle.x = plot->points->x + boxplot_opts.separation * level; candle.yhigh = -VERYLARGE; candle.ylow = VERYLARGE; goto outliers; } if ((N & 0x1) == 0) median = 0.5 * (plot->points[N/2 - 1].y + plot->points[N/2].y); else median = plot->points[(N-1)/2].y; if ((N & 0x3) == 0) quartile1 = 0.5 * (plot->points[N/4 - 1].y + plot->points[N/4].y); else quartile1 = plot->points[(N+3)/4 - 1].y; if ((N & 0x3) == 0) quartile3 = 0.5 * (plot->points[N - N/4].y + plot->points[N - N/4 - 1].y); else quartile3 = plot->points[N - (N+3)/4].y; FPRINTF((stderr,"Boxplot: quartile boundaries for %d points: %g %g %g\n", N, quartile1, median, quartile3)); /* Set the whisker limits based on the user-defined style */ if (boxplot_opts.limit_type == 0) { /* Fraction of interquartile range */ double whisker_len = boxplot_opts.limit_value * (quartile3 - quartile1); int i; whisker_bot = quartile1 - whisker_len; for (i=0; i<N; i++) if (plot->points[i].y >= whisker_bot) { whisker_bot = plot->points[i].y; break; } whisker_top = quartile3 + whisker_len; for (i=N-1; i>= 0; i--) if (plot->points[i].y <= whisker_top) { whisker_top = plot->points[i].y; break; } } else { /* Set limits to include some fraction of the total number of points. */ /* The limits are symmetric about the median, but are truncated to */ /* lie on a point in the data set. */ int top = N-1; int bot = 0; while ((double)(top-bot+1)/(double)(N) >= boxplot_opts.limit_value) { whisker_top = plot->points[top].y; whisker_bot = plot->points[bot].y; if (whisker_top - median >= median - whisker_bot) { top--; while ((top > 0) && (plot->points[top].y == plot->points[top-1].y)) top--; } if (whisker_top - median <= median - whisker_bot) { bot++; while ((bot < top) && (plot->points[bot].y == plot->points[bot+1].y)) bot++; } } } /* Dummy up a single-point candlesticks plot using these limiting values */ candle.type = INRANGE; if (plot->plot_type == FUNC) candle.x = (plot->points[0].x + plot->points[N-1].x) / 2.; else candle.x = plot->points->x + boxplot_opts.separation * level; candle.y = quartile1; candle.z = quartile3; candle.ylow = whisker_bot; candle.yhigh = whisker_top; candle.xlow = plot->points->xlow + boxplot_opts.separation * level; candle.xhigh = median; /* Crazy order of candlestick parameters! */ plot->points = &candle; plot->p_count = 1; if (boxplot_opts.plotstyle == FINANCEBARS) plot_f_bars( plot ); else plot_c_bars( plot ); plot->points = save_points; plot->p_count = N; /* Now draw individual points for the outliers */ outliers: if (boxplot_opts.outliers) { int i,j,x,y; p_width = plot->lp_properties.p_size * term->h_tic; for (i = 0; i < plot->p_count; i++) { if (plot->points[i].y >= candle.ylow && plot->points[i].y <= candle.yhigh) continue; if (plot->points[i].type != INRANGE) continue; x = map_x(candle.x); y = map_y(plot->points[i].y); /* do clipping if necessary */ if (clip_points && (x < plot_bounds.xleft + p_width || y < plot_bounds.ybot + p_height || x > plot_bounds.xright - p_width || y > plot_bounds.ytop - p_height)) { continue; } /* Separate any duplicate outliers */ for (j=1; (i >= j) && (plot->points[i].y == plot->points[i-j].y); j++) x += p_width * ((j & 1) == 0 ? -j : j);; (term->point) (x, y, plot->lp_properties.p_type); } } } } /* FIXME * there are LOADS of == style double comparisons in here! */ /* single edge intersection algorithm */ /* Given two points, one inside and one outside the plot, return * the point where an edge of the plot intersects the line segment defined * by the two points. */ static int edge_intersect( struct coordinate GPHUGE *points, /* the points array */ int i, /* line segment from point i-1 to point i */ double *ex, double *ey) /* the point where it crosses an edge */ { double ix = points[i - 1].x; double iy = points[i - 1].y; double ox = points[i].x; double oy = points[i].y; double x, y; /* possible intersection point */ if (points[i].type == INRANGE) { /* swap points around so that ix/ix/iz are INRANGE and * ox/oy/oz are OUTRANGE */ x = ix; ix = ox; ox = x; y = iy; iy = oy; oy = y; } /* nasty degenerate cases, effectively drawing to an infinity point (?) * cope with them here, so don't process them as a "real" OUTRANGE point * * If more than one coord is -VERYLARGE, then can't ratio the "infinities" * so drop out by returning the INRANGE point. * * Obviously, only need to test the OUTRANGE point (coordinates) */ if (ox == -VERYLARGE || oy == -VERYLARGE) { *ex = ix; *ey = iy; if (ox == -VERYLARGE) { /* can't get a direction to draw line, so simply * return INRANGE point */ if (oy == -VERYLARGE) return LEFT_EDGE|BOTTOM_EDGE; *ex = X_AXIS.min; return LEFT_EDGE; } /* obviously oy is -VERYLARGE and ox != -VERYLARGE */ *ey = Y_AXIS.min; return BOTTOM_EDGE; } /* * Can't have case (ix == ox && iy == oy) as one point * is INRANGE and one point is OUTRANGE. */ if (iy == oy) { /* horizontal line */ /* assume inrange(iy, Y_AXIS.min, Y_AXIS.max) */ *ey = iy; /* == oy */ if (inrange(X_AXIS.max, ix, ox) && X_AXIS.max != ix) { *ex = X_AXIS.max; return RIGHT_EDGE; } if (inrange(X_AXIS.min, ix, ox) && X_AXIS.min != ix) { *ex = X_AXIS.min; return LEFT_EDGE; } } else if (ix == ox) { /* vertical line */ /* assume inrange(ix, X_AXIS.min, X_AXIS.max) */ *ex = ix; /* == ox */ if (inrange(Y_AXIS.max, iy, oy) && Y_AXIS.max != iy) { *ey = Y_AXIS.max; return TOP_EDGE; } if (inrange(Y_AXIS.min, iy, oy) && Y_AXIS.min != iy) { *ey = Y_AXIS.min; return BOTTOM_EDGE; } } else { /* slanted line of some kind */ /* does it intersect Y_AXIS.min edge */ if (inrange(Y_AXIS.min, iy, oy) && Y_AXIS.min != iy && Y_AXIS.min != oy) { x = ix + (Y_AXIS.min - iy) * ((ox - ix) / (oy - iy)); if (inrange(x, X_AXIS.min, X_AXIS.max)) { *ex = x; *ey = Y_AXIS.min; return BOTTOM_EDGE; /* yes */ } } /* does it intersect Y_AXIS.max edge */ if (inrange(Y_AXIS.max, iy, oy) && Y_AXIS.max != iy && Y_AXIS.max != oy) { x = ix + (Y_AXIS.max - iy) * ((ox - ix) / (oy - iy)); if (inrange(x, X_AXIS.min, X_AXIS.max)) { *ex = x; *ey = Y_AXIS.max; return TOP_EDGE; /* yes */ } } /* does it intersect X_AXIS.min edge */ if (inrange(X_AXIS.min, ix, ox) && X_AXIS.min != ix && X_AXIS.min != ox) { y = iy + (X_AXIS.min - ix) * ((oy - iy) / (ox - ix)); if (inrange(y, Y_AXIS.min, Y_AXIS.max)) { *ex = X_AXIS.min; *ey = y; return LEFT_EDGE; } } /* does it intersect X_AXIS.max edge */ if (inrange(X_AXIS.max, ix, ox) && X_AXIS.max != ix && X_AXIS.max != ox) { y = iy + (X_AXIS.max - ix) * ((oy - iy) / (ox - ix)); if (inrange(y, Y_AXIS.min, Y_AXIS.max)) { *ex = X_AXIS.max; *ey = y; return RIGHT_EDGE; } } } /* If we reach here, the inrange point is on the edge, and * the line segment from the outrange point does not cross any * other edges to get there. In this case, we return the inrange * point as the 'edge' intersection point. This will basically draw * line. */ *ex = ix; *ey = iy; return 0; } /* XXX - JG */ /* single edge intersection algorithm for "steps" curves */ /* * Given two points, one inside and one outside the plot, return * the point where an edge of the plot intersects the line segments * forming the step between the two points. * * Recall that if P1 = (x1,y1) and P2 = (x2,y2), the step from * P1 to P2 is drawn as two line segments: (x1,y1)->(x2,y1) and * (x2,y1)->(x2,y2). */ static void edge_intersect_steps( struct coordinate GPHUGE *points, /* the points array */ int i, /* line segment from point i-1 to point i */ double *ex, double *ey) /* the point where it crosses an edge */ { /* global X_AXIS.min, X_AXIS.max, Y_AXIS.min, X_AXIS.max */ double ax = points[i - 1].x; double ay = points[i - 1].y; double bx = points[i].x; double by = points[i].y; if (points[i].type == INRANGE) { /* from OUTRANGE to INRANG */ if (inrange(ay, Y_AXIS.min, Y_AXIS.max)) { *ey = ay; cliptorange(ax, X_AXIS.min, X_AXIS.max); *ex = ax; } else { *ex = bx; cliptorange(ay, Y_AXIS.min, Y_AXIS.max); *ey = ay; } } else { /* from INRANGE to OUTRANGE */ if (inrange(bx, X_AXIS.min, X_AXIS.max)) { *ex = bx; cliptorange(by, Y_AXIS.min, Y_AXIS.max); *ey = by; } else { *ey = ay; cliptorange(bx, X_AXIS.min, X_AXIS.max); *ex = bx; } } return; } /* XXX - HOE */ /* single edge intersection algorithm for "fsteps" curves */ /* fsteps means step on forward y-value. * Given two points, one inside and one outside the plot, return * the point where an edge of the plot intersects the line segments * forming the step between the two points. * * Recall that if P1 = (x1,y1) and P2 = (x2,y2), the step from * P1 to P2 is drawn as two line segments: (x1,y1)->(x1,y2) and * (x1,y2)->(x2,y2). */ static void edge_intersect_fsteps( struct coordinate GPHUGE *points, /* the points array */ int i, /* line segment from point i-1 to point i */ double *ex, double *ey) /* the point where it crosses an edge */ { /* global X_AXIS.min, X_AXIS.max, Y_AXIS.min, X_AXIS.max */ double ax = points[i - 1].x; double ay = points[i - 1].y; double bx = points[i].x; double by = points[i].y; if (points[i].type == INRANGE) { /* from OUTRANGE to INRANG */ if (inrange(ax, X_AXIS.min, X_AXIS.max)) { *ex = ax; cliptorange(ay, Y_AXIS.min, Y_AXIS.max); *ey = ay; } else { *ey = by; cliptorange(bx, X_AXIS.min, X_AXIS.max); *ex = bx; } } else { /* from INRANGE to OUTRANGE */ if (inrange(by, Y_AXIS.min, Y_AXIS.max)) { *ey = by; cliptorange(bx, X_AXIS.min, X_AXIS.max); *ex = bx; } else { *ex = ax; cliptorange(by, Y_AXIS.min, Y_AXIS.max); *ey = by; } } return; } /* XXX - JG */ /* double edge intersection algorithm for "steps" plot */ /* Given two points, both outside the plot, return the points where an * edge of the plot intersects the line segments forming a step * by the two points. There may be zero, one, two, or an infinite number * of intersection points. (One means an intersection at a corner, infinite * means overlaying the edge itself). We return FALSE when there is nothing * to draw (zero intersections), and TRUE when there is something to * draw (the one-point case is a degenerate of the two-point case and we do * not distinguish it - we draw it anyway). * * Recall that if P1 = (x1,y1) and P2 = (x2,y2), the step from * P1 to P2 is drawn as two line segments: (x1,y1)->(x2,y1) and * (x2,y1)->(x2,y2). */ static TBOOLEAN /* any intersection? */ two_edge_intersect_steps( struct coordinate GPHUGE *points, /* the points array */ int i, /* line segment from point i-1 to point i */ double *lx, double *ly) /* lx[2], ly[2]: points where it crosses edges */ { /* global X_AXIS.min, X_AXIS.max, Y_AXIS.min, X_AXIS.max */ double ax = points[i - 1].x; double ay = points[i - 1].y; double bx = points[i].x; double by = points[i].y; if (GPMAX(ax, bx) < X_AXIS.min || GPMIN(ax, bx) > X_AXIS.max || GPMAX(ay, by) < Y_AXIS.min || GPMIN(ay, by) > Y_AXIS.max || (!inrange(ay, Y_AXIS.min, Y_AXIS.max) && !inrange(bx, X_AXIS.min, X_AXIS.max)) ) { return (FALSE); } else if (inrange(ay, Y_AXIS.min, Y_AXIS.max) && inrange(bx, X_AXIS.min, X_AXIS.max)) { /* corner of step inside plotspace */ cliptorange(ax, X_AXIS.min, X_AXIS.max); *lx++ = ax; *ly++ = ay; cliptorange(by, Y_AXIS.min, Y_AXIS.max); *lx = bx; *ly = by; return (TRUE); } else if (inrange(ay, Y_AXIS.min, Y_AXIS.max)) { /* cross plotspace in x-direction */ *lx++ = X_AXIS.min; *ly++ = ay; *lx = X_AXIS.max; *ly = ay; return (TRUE); } else if (inrange(ax, X_AXIS.min, X_AXIS.max)) { /* cross plotspace in y-direction */ *lx++ = bx; *ly++ = Y_AXIS.min; *lx = bx; *ly = Y_AXIS.max; return (TRUE); } else return (FALSE); } /* XXX - HOE */ /* double edge intersection algorithm for "fsteps" plot */ /* Given two points, both outside the plot, return the points where an * edge of the plot intersects the line segments forming a step * by the two points. There may be zero, one, two, or an infinite number * of intersection points. (One means an intersection at a corner, infinite * means overlaying the edge itself). We return FALSE when there is nothing * to draw (zero intersections), and TRUE when there is something to * draw (the one-point case is a degenerate of the two-point case and we do * not distinguish it - we draw it anyway). * * Recall that if P1 = (x1,y1) and P2 = (x2,y2), the step from * P1 to P2 is drawn as two line segments: (x1,y1)->(x1,y2) and * (x1,y2)->(x2,y2). */ static TBOOLEAN /* any intersection? */ two_edge_intersect_fsteps( struct coordinate GPHUGE *points, /* the points array */ int i, /* line segment from point i-1 to point i */ double *lx, double *ly) /* lx[2], ly[2]: points where it crosses edges */ { /* global X_AXIS.min, X_AXIS.max, Y_AXIS.min, X_AXIS.max */ double ax = points[i - 1].x; double ay = points[i - 1].y; double bx = points[i].x; double by = points[i].y; if (GPMAX(ax, bx) < X_AXIS.min || GPMIN(ax, bx) > X_AXIS.max || GPMAX(ay, by) < Y_AXIS.min || GPMIN(ay, by) > Y_AXIS.max || (!inrange(by, Y_AXIS.min, Y_AXIS.max) && !inrange(ax, X_AXIS.min, X_AXIS.max)) ) { return (FALSE); } else if (inrange(by, Y_AXIS.min, Y_AXIS.max) && inrange(ax, X_AXIS.min, X_AXIS.max)) { /* corner of step inside plotspace */ cliptorange(ay, Y_AXIS.min, Y_AXIS.max); *lx++ = ax; *ly++ = ay; cliptorange(bx, X_AXIS.min, X_AXIS.max); *lx = bx; *ly = by; return (TRUE); } else if (inrange(by, Y_AXIS.min, Y_AXIS.max)) { /* cross plotspace in x-direction */ *lx++ = X_AXIS.min; *ly++ = by; *lx = X_AXIS.max; *ly = by; return (TRUE); } else if (inrange(ax, X_AXIS.min, X_AXIS.max)) { /* cross plotspace in y-direction */ *lx++ = ax; *ly++ = Y_AXIS.min; *lx = ax; *ly = Y_AXIS.max; return (TRUE); } else return (FALSE); } /* double edge intersection algorithm */ /* Given two points, both outside the plot, return * the points where an edge of the plot intersects the line segment defined * by the two points. There may be zero, one, two, or an infinite number * of intersection points. (One means an intersection at a corner, infinite * means overlaying the edge itself). We return FALSE when there is nothing * to draw (zero intersections), and TRUE when there is something to * draw (the one-point case is a degenerate of the two-point case and we do * not distinguish it - we draw it anyway). */ static TBOOLEAN /* any intersection? */ two_edge_intersect( struct coordinate GPHUGE *points, /* the points array */ int i, /* line segment from point i-1 to point i */ double *lx, double *ly) /* lx[2], ly[2]: points where it crosses edges */ { /* global X_AXIS.min, X_AXIS.max, Y_AXIS.min, X_AXIS.max */ int count; double ix = points[i - 1].x; double iy = points[i - 1].y; double ox = points[i].x; double oy = points[i].y; double t[4]; double swap; double t_min, t_max; /* nasty degenerate cases, effectively drawing to an infinity * point (?) cope with them here, so don't process them as a * "real" OUTRANGE point * If more than one coord is -VERYLARGE, then can't ratio the * "infinities" so drop out by returning FALSE */ count = 0; if (ix == -VERYLARGE) count++; if (ox == -VERYLARGE) count++; if (iy == -VERYLARGE) count++; if (oy == -VERYLARGE) count++; /* either doesn't pass through graph area *or* can't ratio * infinities to get a direction to draw line, so simply * return(FALSE) */ if (count > 1) { return (FALSE); } if (ox == -VERYLARGE || ix == -VERYLARGE) { /* Horizontal line */ if (ix == -VERYLARGE) { /* swap points so ix/iy don't have a -VERYLARGE component */ swap = ix; ix = ox; ox = swap; swap = iy; iy = oy; oy = swap; } /* check actually passes through the graph area */ if (ix > GPMAX(X_AXIS.max, X_AXIS.min) && inrange(iy, Y_AXIS.min, Y_AXIS.max)) { lx[0] = X_AXIS.min; ly[0] = iy; lx[1] = X_AXIS.max; ly[1] = iy; return (TRUE); } else { return (FALSE); } } if (oy == -VERYLARGE || iy == -VERYLARGE) { /* Vertical line */ if (iy == -VERYLARGE) { /* swap points so ix/iy don't have a -VERYLARGE component */ swap = ix; ix = ox; ox = swap; swap = iy; iy = oy; oy = swap; } /* check actually passes through the graph area */ if (iy > GPMAX(Y_AXIS.min, Y_AXIS.max) && inrange(ix, X_AXIS.min, X_AXIS.max)) { lx[0] = ix; ly[0] = Y_AXIS.min; lx[1] = ix; ly[1] = Y_AXIS.max; return (TRUE); } else { return (FALSE); } } /* * Special horizontal/vertical, etc. cases are checked and remaining * slant lines are checked separately. * * The slant line intersections are solved using the parametric form * of the equation for a line, since if we test x/y min/max planes explicitly * then e.g. a line passing through a corner point (X_AXIS.min,Y_AXIS.min) * actually intersects 2 planes and hence further tests would be required * to anticipate this and similar situations. */ /* * Can have case (ix == ox && iy == oy) as both points OUTRANGE */ if (ix == ox && iy == oy) { /* but as only define single outrange point, can't intersect graph area */ return (FALSE); } if (ix == ox) { /* line parallel to y axis */ /* x coord must be in range, and line must span both Y_AXIS.min and Y_AXIS.max */ /* note that spanning Y_AXIS.min implies spanning Y_AXIS.max, as both points OUTRANGE */ if (!inrange(ix, X_AXIS.min, X_AXIS.max)) { return (FALSE); } if (inrange(Y_AXIS.min, iy, oy)) { lx[0] = ix; ly[0] = Y_AXIS.min; lx[1] = ix; ly[1] = Y_AXIS.max; return (TRUE); } else return (FALSE); } if (iy == oy) { /* already checked case (ix == ox && iy == oy) */ /* line parallel to x axis */ /* y coord must be in range, and line must span both X_AXIS.min and X_AXIS.max */ /* note that spanning X_AXIS.min implies spanning X_AXIS.max, as both points OUTRANGE */ if (!inrange(iy, Y_AXIS.min, Y_AXIS.max)) { return (FALSE); } if (inrange(X_AXIS.min, ix, ox)) { lx[0] = X_AXIS.min; ly[0] = iy; lx[1] = X_AXIS.max; ly[1] = iy; return (TRUE); } else return (FALSE); } /* nasty 2D slanted line in an xy plane */ /* From here on, it's essentially the classical Cyrus-Beck, or * Liang-Barsky algorithm for line clipping to a rectangle */ /* Solve parametric equation (ix, iy) + t (diff_x, diff_y) where 0.0 <= t <= 1.0 and diff_x = (ox - ix); diff_y = (oy - iy); */ t[0] = (X_AXIS.min - ix) / (ox - ix); t[1] = (X_AXIS.max - ix) / (ox - ix); if (t[0] > t[1]) { swap = t[0]; t[0] = t[1]; t[1] = swap; } t[2] = (Y_AXIS.min - iy) / (oy - iy); t[3] = (Y_AXIS.max - iy) / (oy - iy); if (t[2] > t[3]) { swap = t[2]; t[2] = t[3]; t[3] = swap; } t_min = GPMAX(GPMAX(t[0], t[2]), 0.0); t_max = GPMIN(GPMIN(t[1], t[3]), 1.0); if (t_min > t_max) return (FALSE); lx[0] = ix + t_min * (ox - ix); ly[0] = iy + t_min * (oy - iy); lx[1] = ix + t_max * (ox - ix); ly[1] = iy + t_max * (oy - iy); /* * Can only have 0 or 2 intersection points -- only need test one coord */ /* FIXME: this is UGLY. Need an 'almost_inrange()' function */ if (inrange(lx[0], (X_AXIS.min - 1e-5 * (X_AXIS.max - X_AXIS.min)), (X_AXIS.max + 1e-5 * (X_AXIS.max - X_AXIS.min))) && inrange(ly[0], (Y_AXIS.min - 1e-5 * (Y_AXIS.max - Y_AXIS.min)), (Y_AXIS.max + 1e-5 * (Y_AXIS.max - Y_AXIS.min)))) { return (TRUE); } return (FALSE); } /* EAM April 2004 - If the line segment crosses a bounding line we will * interpolate an extra corner and split the filled polygon into two. */ static TBOOLEAN bound_intersect( struct coordinate GPHUGE *points, int i, /* line segment from point i-1 to point i */ double *ex, double *ey, /* the point where it crosses a boundary */ filledcurves_opts *filledcurves_options) { double dx1, dx2, dy1, dy2; /* If there are no bounding lines in effect, don't bother */ if (!filledcurves_options->oneside) return FALSE; switch (filledcurves_options->closeto) { case FILLEDCURVES_ATX1: case FILLEDCURVES_ATX2: dx1 = filledcurves_options->at - points[i-1].x; dx2 = filledcurves_options->at - points[i].x; dy1 = points[i].y - points[i-1].y; if (dx1*dx2 < 0) { *ex = filledcurves_options->at; *ey = points[i-1].y + dy1 * dx1 / (dx1-dx2); return TRUE; } break; case FILLEDCURVES_ATY1: case FILLEDCURVES_ATY2: dy1 = filledcurves_options->at - points[i-1].y; dy2 = filledcurves_options->at - points[i].y; dx1 = points[i].x - points[i-1].x; if (dy1*dy2 < 0) { *ex = points[i-1].x + dx1 * dy1 / (dy1-dy2); *ey = filledcurves_options->at; return TRUE; } break; case FILLEDCURVES_ATXY: default: break; } return FALSE; } /* HBB 20010118: all the *_callback() functions made non-static. This * is necessary to work around a bug in HP's assembler shipped with * HP-UX 10 and higher, if GCC tries to use it */ /* display a x-axis ticmark - called by gen_ticks */ /* also uses global tic_start, tic_direction, tic_text and tic_just */ void xtick2d_callback( AXIS_INDEX axis, double place, char *text, struct lp_style_type grid, /* grid.l_type == LT_NODRAW means no grid */ struct ticmark *userlabels) /* User-specified tic labels */ { struct termentry *t = term; /* minitick if text is NULL - beware - h_tic is unsigned */ int ticsize = tic_direction * (int) t->v_tic * (text ? axis_array[axis].ticscale : axis_array[axis].miniticscale); int x = map_x(place); (void) axis; /* avoid "unused parameter" warning */ /* Skip label if we've already written a user-specified one here */ # define MINIMUM_SEPARATION 2 while (userlabels) { int here = map_x(AXIS_LOG_VALUE(axis,userlabels->position)); if (abs(here-x) <= MINIMUM_SEPARATION) { text = NULL; break; } userlabels = userlabels->next; } # undef MINIMUM_SEPARATION if (grid.l_type > LT_NODRAW) { (t->layer)(TERM_LAYER_BEGIN_GRID); term_apply_lp_properties(&grid); if (polar_grid_angle) { double x = place, y = 0, s = sin(0.1), c = cos(0.1); int i; int ogx = map_x(x); int ogy = map_y(0); int gx, gy; if (place > largest_polar_circle) largest_polar_circle = place; else if (-place > largest_polar_circle) largest_polar_circle = -place; for (i = 1; i <= 63 /* 2pi/0.1 */ ; ++i) { { /* cos(t+dt) = cos(t)cos(dt)-sin(t)cos(dt) */ double tx = x * c - y * s; /* sin(t+dt) = sin(t)cos(dt)+cos(t)sin(dt) */ y = y * c + x * s; x = tx; } gx = map_x(x); gy = map_y(y); draw_clip_line(ogx, ogy, gx, gy); ogx = gx; ogy = gy; } } else { legend_key *key = &keyT; if (lkey && x < key->bounds.xright && x > key->bounds.xleft && key->bounds.ytop > plot_bounds.ybot && key->bounds.ybot < plot_bounds.ytop) { if (key->bounds.ybot > plot_bounds.ybot) { (*t->move) (x, plot_bounds.ybot); (*t->vector) (x, key->bounds.ybot); } if (key->bounds.ytop < plot_bounds.ytop) { (*t->move) (x, key->bounds.ytop); (*t->vector) (x, plot_bounds.ytop); } } else { (*t->move) (x, plot_bounds.ybot); (*t->vector) (x, plot_bounds.ytop); } } term_apply_lp_properties(&border_lp); /* border linetype */ (t->layer)(TERM_LAYER_END_GRID); } /* End of grid code */ /* we precomputed tic posn and text posn in global vars */ (*t->move) (x, tic_start); (*t->vector) (x, tic_start + ticsize); if (tic_mirror >= 0) { (*t->move) (x, tic_mirror); (*t->vector) (x, tic_mirror - ticsize); } if (text) { /* get offset */ double offsetx_d, offsety_d; map_position_r(&(axis_array[axis].ticdef.offset), &offsetx_d, &offsety_d, "xtics"); /* User-specified different color for the tics text */ if (axis_array[axis].ticdef.textcolor.type != TC_DEFAULT) apply_pm3dcolor(&(axis_array[axis].ticdef.textcolor), t); write_multiline(x+(int)offsetx_d, tic_text+(int)offsety_d, text, tic_hjust, tic_vjust, rotate_tics, axis_array[axis].ticdef.font); term_apply_lp_properties(&border_lp); /* reset to border linetype */ } } /* display a y-axis ticmark - called by gen_ticks */ /* also uses global tic_start, tic_direction, tic_text and tic_just */ void ytick2d_callback( AXIS_INDEX axis, double place, char *text, struct lp_style_type grid, /* grid.l_type == LT_NODRAW means no grid */ struct ticmark *userlabels) /* User-specified tic labels */ { struct termentry *t = term; /* minitick if text is NULL - v_tic is unsigned */ int ticsize = tic_direction * (int) t->h_tic * (text ? axis_array[axis].ticscale : axis_array[axis].miniticscale); int y = map_y(place); (void) axis; /* avoid "unused parameter" warning */ /* Skip label if we've already written a user-specified one here */ # define MINIMUM_SEPARATION 2 while (userlabels) { int here = map_y(AXIS_LOG_VALUE(axis,userlabels->position)); if (abs(here-y) <= MINIMUM_SEPARATION) { text = NULL; break; } userlabels = userlabels->next; } # undef MINIMUM_SEPARATION if (grid.l_type > LT_NODRAW) { (t->layer)(TERM_LAYER_BEGIN_GRID); term_apply_lp_properties(&grid); if (polar_grid_angle) { double x = 0, y = place, s = sin(0.1), c = cos(0.1); int i; if (place > largest_polar_circle) largest_polar_circle = place; else if (-place > largest_polar_circle) largest_polar_circle = -place; clip_move(map_x(x), map_y(y)); for (i = 1; i <= 63 /* 2pi/0.1 */ ; ++i) { { /* cos(t+dt) = cos(t)cos(dt)-sin(t)cos(dt) */ double tx = x * c - y * s; /* sin(t+dt) = sin(t)cos(dt)+cos(t)sin(dt) */ y = y * c + x * s; x = tx; } clip_vector(map_x(x), map_y(y)); } } else { /* Make the grid avoid the key box */ legend_key *key = &keyT; if (lkey && y < key->bounds.ytop && y > key->bounds.ybot && key->bounds.xleft < plot_bounds.xright && key->bounds.xright > plot_bounds.xleft) { if (key->bounds.xleft > plot_bounds.xleft) { (*t->move) (plot_bounds.xleft, y); (*t->vector) (key->bounds.xleft, y); } if (key->bounds.xright < plot_bounds.xright) { (*t->move) (key->bounds.xright, y); (*t->vector) (plot_bounds.xright, y); } } else { (*t->move) (plot_bounds.xleft, y); (*t->vector) (plot_bounds.xright, y); } } term_apply_lp_properties(&border_lp); /* border linetype */ (t->layer)(TERM_LAYER_END_GRID); } /* we precomputed tic posn and text posn */ (*t->move) (tic_start, y); (*t->vector) (tic_start + ticsize, y); if (tic_mirror >= 0) { (*t->move) (tic_mirror, y); (*t->vector) (tic_mirror - ticsize, y); } if (text) { /* get offset */ double offsetx_d, offsety_d; map_position_r(&(axis_array[axis].ticdef.offset), &offsetx_d, &offsety_d, "ytics"); /* User-specified different color for the tics text */ if (axis_array[axis].ticdef.textcolor.type != TC_DEFAULT) apply_pm3dcolor(&(axis_array[axis].ticdef.textcolor), t); write_multiline(tic_text+(int)offsetx_d, y+(int)offsety_d, text, tic_hjust, tic_vjust, rotate_tics, axis_array[axis].ticdef.font); term_apply_lp_properties(&border_lp); /* reset to border linetype */ } } /* STR points to a label string, possibly with several lines separated by \n. Return the number of characters in the longest line. If LINES is not NULL, set *LINES to the number of lines in the label. */ int label_width(const char *str, int *lines) { char *lab = NULL, *s, *e; int mlen, len, l; if (!str || *str == '\0') { if (lines) *lines = 0; return (0); } l = mlen = len = 0; lab = gp_alloc(strlen(str) + 2, "in label_width"); strcpy(lab, str); strcat(lab, "\n"); s = lab; while ((e = (char *) strchr(s, '\n')) != NULL) { *e = '\0'; len = estimate_strlen(s); /* = e-s ? */ if (len > mlen) mlen = len; if (len || l || *str == '\n') l++; s = ++e; } /* lines = NULL => not interested - div */ if (lines) *lines = l; free(lab); return (mlen); } /*{{{ map_position, wrapper, which maps double to int */ void map_position( struct position *pos, int *x, int *y, const char *what) { double xx, yy; map_position_double(pos, &xx, &yy, what); *x = xx; *y = yy; } /*}}} */ /*{{{ map_position_double */ static void map_position_double( struct position *pos, double *x, double *y, const char *what) { switch (pos->scalex) { case first_axes: { double xx = axis_log_value_checked(FIRST_X_AXIS, pos->x, what); *x = AXIS_MAP(FIRST_X_AXIS, xx); break; } case second_axes: { double xx = axis_log_value_checked(SECOND_X_AXIS, pos->x, what); *x = AXIS_MAP(SECOND_X_AXIS, xx); break; } case graph: { *x = plot_bounds.xleft + pos->x * (plot_bounds.xright - plot_bounds.xleft); break; } case screen: { struct termentry *t = term; *x = pos->x * (t->xmax - 1); break; } case character: { register struct termentry *t = term; *x = pos->x * t->h_char; break; } } switch (pos->scaley) { case first_axes: { double yy = axis_log_value_checked(FIRST_Y_AXIS, pos->y, what); *y = AXIS_MAP(FIRST_Y_AXIS, yy); break; } case second_axes: { double yy = axis_log_value_checked(SECOND_Y_AXIS, pos->y, what); *y = AXIS_MAP(SECOND_Y_AXIS, yy); break; } case graph: { *y = plot_bounds.ybot + pos->y * (plot_bounds.ytop - plot_bounds.ybot); break; } case screen: { struct termentry *t = term; *y = pos->y * (t->ymax -1); break; } case character: { register struct termentry *t = term; *y = pos->y * t->v_char; break; } } *x += 0.5; *y += 0.5; } /*}}} */ /*{{{ map_position_r */ void map_position_r( struct position *pos, double *x, double *y, const char *what) { switch (pos->scalex) { case first_axes: { double xx = axis_log_value_checked(FIRST_X_AXIS, pos->x, what); *x = xx * axis_array[FIRST_X_AXIS].term_scale; break; } case second_axes: { double xx = axis_log_value_checked(SECOND_X_AXIS, pos->x, what); *x = xx * axis_array[SECOND_X_AXIS].term_scale; break; } case graph: { *x = pos->x * (plot_bounds.xright - plot_bounds.xleft); break; } case screen: { struct termentry *t = term; *x = pos->x * (t->xmax - 1); break; } case character: { register struct termentry *t = term; *x = pos->x * t->h_char; break; } } switch (pos->scaley) { case first_axes: { double yy = axis_log_value_checked(FIRST_Y_AXIS, pos->y, what); *y = yy * axis_array[FIRST_Y_AXIS].term_scale; return; } case second_axes: { double yy = axis_log_value_checked(SECOND_Y_AXIS, pos->y, what); *y = yy * axis_array[SECOND_Y_AXIS].term_scale; return; } case graph: { *y = pos->y * (plot_bounds.ytop - plot_bounds.ybot); return; } case screen: { struct termentry *t = term; *y = pos->y * (t->ymax -1); return; } case character: { register struct termentry *t = term; *y = pos->y * t->v_char; break; } } } /*}}} */ static void plot_border() { int min, max; term_apply_lp_properties(&border_lp); /* border linetype */ if (border_complete) newpath(); (*term->move) (plot_bounds.xleft, plot_bounds.ytop); if (border_west && axis_array[FIRST_Y_AXIS].ticdef.rangelimited) { max = AXIS_MAP(FIRST_Y_AXIS,axis_array[FIRST_Y_AXIS].data_max); min = AXIS_MAP(FIRST_Y_AXIS,axis_array[FIRST_Y_AXIS].data_min); (*term->move) (plot_bounds.xleft, max); (*term->vector) (plot_bounds.xleft, min); (*term->move) (plot_bounds.xleft, plot_bounds.ybot); } else if (border_west) { (*term->vector) (plot_bounds.xleft, plot_bounds.ybot); } else { (*term->move) (plot_bounds.xleft, plot_bounds.ybot); } if (border_south && axis_array[FIRST_X_AXIS].ticdef.rangelimited) { max = AXIS_MAP(FIRST_X_AXIS,axis_array[FIRST_X_AXIS].data_max); min = AXIS_MAP(FIRST_X_AXIS,axis_array[FIRST_X_AXIS].data_min); (*term->move) (min, plot_bounds.ybot); (*term->vector) (max, plot_bounds.ybot); (*term->move) (plot_bounds.xright, plot_bounds.ybot); } else if (border_south) { (*term->vector) (plot_bounds.xright, plot_bounds.ybot); } else { (*term->move) (plot_bounds.xright, plot_bounds.ybot); } if (border_east && axis_array[SECOND_Y_AXIS].ticdef.rangelimited) { max = AXIS_MAP(SECOND_Y_AXIS,axis_array[SECOND_Y_AXIS].data_max); min = AXIS_MAP(SECOND_Y_AXIS,axis_array[SECOND_Y_AXIS].data_min); (*term->move) (plot_bounds.xright, max); (*term->vector) (plot_bounds.xright, min); (*term->move) (plot_bounds.xright, plot_bounds.ybot); } else if (border_east) { (*term->vector) (plot_bounds.xright, plot_bounds.ytop); } else { (*term->move) (plot_bounds.xright, plot_bounds.ytop); } if (border_north && axis_array[SECOND_X_AXIS].ticdef.rangelimited) { max = AXIS_MAP(SECOND_X_AXIS,axis_array[SECOND_X_AXIS].data_max); min = AXIS_MAP(SECOND_X_AXIS,axis_array[SECOND_X_AXIS].data_min); (*term->move) (min, plot_bounds.ytop); (*term->vector) (max, plot_bounds.ytop); (*term->move) (plot_bounds.xright, plot_bounds.ytop); } else if (border_north) { (*term->vector) (plot_bounds.xleft, plot_bounds.ytop); } else { (*term->move) (plot_bounds.xleft, plot_bounds.ytop); } if (border_complete) closepath(); } void init_histogram(struct histogram_style *histogram, char *title) { if (stackheight) free(stackheight); stackheight = NULL; if (histogram) { memcpy(histogram,&histogram_opts,sizeof(histogram_opts)); memset(&(histogram->title), 0, sizeof(text_label)); /* Insert in linked list */ histogram_opts.next = histogram; histogram->title.text = title; } } void free_histlist(struct histogram_style *hist) { if (!hist) return; if (hist->title.text) free(hist->title.text); if (hist->next) { free_histlist(hist->next); free(hist->next); hist->next = NULL; } } static void place_histogram_titles() { histogram_style *hist = &histogram_opts; unsigned int x, y; while ((hist = hist->next)) { if (hist->title.text && *(hist->title.text)) { double xoffset_d, yoffset_d; map_position_r(&(histogram_opts.title.offset), &xoffset_d, &yoffset_d, "histogram"); x = map_x((hist->start + hist->end) / 2.); y = xlabel_y; x += (int)xoffset_d; y += (int)yoffset_d + 0.25 * term->v_char; apply_pm3dcolor(&hist->title.textcolor,term); write_multiline(x, y, hist->title.text, CENTRE, JUST_BOT, 0, hist->title.font); reset_textcolor(&hist->title.textcolor,term); } } } /* * Draw a solid line for the polar axis. * If the center of the polar plot is not at zero (rmin != 0) * indicate this by drawing an open circle. */ static void place_raxis() { #ifdef EAM_OBJECTS t_object raxis_circle = { NULL, 1, 1, OBJ_CIRCLE, /* link, tag, layer (front), object_type */ {FS_SOLID, 100, 0, BLACK_COLORSPEC}, {0, LT_BACKGROUND, 0, 0, 0.2, 0.0, FALSE, BACKGROUND_COLORSPEC}, {.circle = {1, {0,0,0,0.,0.,0.}, {graph,0,0,0.02,0.,0.}, 0., 360. }} }; #endif int x0,y0, xend,yend; double rightend; x0 = map_x(0); y0 = map_y(0); rightend = (R_AXIS.autoscale & AUTOSCALE_MAX) ? R_AXIS.max : R_AXIS.set_max; xend = map_x( AXIS_LOG_VALUE(POLAR_AXIS,rightend) - AXIS_LOG_VALUE(POLAR_AXIS,R_AXIS.set_min)); yend = y0; term_apply_lp_properties(&border_lp); draw_clip_line(x0,y0,xend,yend); #ifdef EAM_OBJECTS if (!(R_AXIS.autoscale & AUTOSCALE_MIN) && R_AXIS.set_min != 0) place_objects( &raxis_circle, 1, 2); #endif } /* * Make this code a subroutine, rather than in-line, so that it can * eventually be shared by other callers. It would be nice to share it * with the 3d code also, but as of now the two code sections are not * very parallel. EAM Nov 2003 */ static void do_key_sample( struct curve_points *this_plot, legend_key *key, char *title, struct termentry *t, int xl, int yl) { /* Clip key box against canvas */ BoundingBox *clip_save = clip_area; if (term->flags & TERM_CAN_CLIP) clip_area = NULL; else clip_area = &canvas; (*t->layer)(TERM_LAYER_BEGIN_KEYSAMPLE); if (key->textcolor.type == TC_VARIABLE) /* Draw key text in same color as plot */ ; else if (key->textcolor.type != TC_DEFAULT) /* Draw key text in same color as key title */ apply_pm3dcolor(&key->textcolor, t); else /* Draw key text in black */ (*t->linetype)(LT_BLACK); if (key->just == GPKEY_LEFT) { write_multiline(xl + key_text_left, yl, title, LEFT, JUST_TOP, 0, key->font); } else { if ((*t->justify_text) (RIGHT)) { write_multiline(xl + key_text_right, yl, title, RIGHT, JUST_TOP, 0, key->font); } else { int x = xl + key_text_right - t->h_char * estimate_strlen(title); if (key->region == GPKEY_AUTO_EXTERIOR_LRTBC || /* HBB 990327 */ key->region == GPKEY_AUTO_EXTERIOR_MARGIN || i_inrange(x, plot_bounds.xleft, plot_bounds.xright)) write_multiline(x, yl, title, LEFT, JUST_TOP, 0, key->font); } } /* Draw sample in same style and color as the corresponding plot */ (*t->linetype)(this_plot->lp_properties.l_type); if (this_plot->lp_properties.use_palette) apply_pm3dcolor(&this_plot->lp_properties.pm3d_color,t); /* draw sample depending on bits set in plot_style */ if (this_plot->plot_style & PLOT_STYLE_HAS_FILL && t->fillbox) { struct fill_style_type *fs = &this_plot->fill_properties; int style = style_from_fill(fs); unsigned int x = xl + key_sample_left; unsigned int y = yl - key_entry_height/4; unsigned int w = key_sample_right - key_sample_left; unsigned int h = key_entry_height/2; #ifdef EAM_OBJECTS if (this_plot->plot_style == CIRCLES && w > 0) { do_arc(xl + key_point_offset, yl, key_entry_height/4, 0., 360., style); } else if (this_plot->plot_style == ELLIPSES && w > 0) { t_ellipse *key_ellipse = (t_ellipse *) gp_alloc(sizeof(t_ellipse), "cute little ellipse for the key sample"); key_ellipse->center.x = xl + key_point_offset; key_ellipse->center.y = yl; key_ellipse->extent.x = w * 2/3; key_ellipse->extent.y = h; key_ellipse->orientation = 0.0; /* already in term coords, no need to map */ do_ellipse(2, key_ellipse, style, FALSE); free(key_ellipse); } else #endif if (w > 0) { /* All other plot types with fill */ if (style != FS_EMPTY) (*t->fillbox)(style,x,y,w,h); /* need_fill_border will set the border linetype, but candlesticks don't want it */ if ((this_plot->plot_style == CANDLESTICKS && fs->border_color.type == TC_LT && fs->border_color.lt == LT_NODRAW) || style == FS_EMPTY || need_fill_border(fs)) { newpath(); draw_clip_line( xl + key_sample_left, yl - key_entry_height/4, xl + key_sample_right, yl - key_entry_height/4); draw_clip_line( xl + key_sample_right, yl - key_entry_height/4, xl + key_sample_right, yl + key_entry_height/4); draw_clip_line( xl + key_sample_right, yl + key_entry_height/4, xl + key_sample_left, yl + key_entry_height/4); draw_clip_line( xl + key_sample_left, yl + key_entry_height/4, xl + key_sample_left, yl - key_entry_height/4); closepath(); } if (fs->fillstyle != FS_EMPTY && fs->fillstyle != FS_DEFAULT && !(fs->border_color.type == TC_LT && fs->border_color.lt == LT_NODRAW)) { (*t->linetype)(this_plot->lp_properties.l_type); if (this_plot->lp_properties.use_palette) apply_pm3dcolor(&this_plot->lp_properties.pm3d_color,t); } } } else if (this_plot->plot_style == VECTOR && t->arrow) { apply_head_properties(&(this_plot->arrow_properties)); curr_arrow_headlength = -1; draw_clip_arrow(xl + key_sample_left, yl, xl + key_sample_right, yl, this_plot->arrow_properties.head); } else if ((this_plot->plot_style & PLOT_STYLE_HAS_LINE) || ((this_plot->plot_style & PLOT_STYLE_HAS_ERRORBAR) && this_plot->plot_type == DATA)) { /* errors for data plots only */ draw_clip_line(xl + key_sample_left, yl, xl + key_sample_right, yl); } if ((this_plot->plot_type == DATA) && (this_plot->plot_style & PLOT_STYLE_HAS_ERRORBAR) && (this_plot->plot_style != CANDLESTICKS) && (bar_size > 0.0)) { draw_clip_line( xl + key_sample_left, yl + ERRORBARTIC, xl + key_sample_left, yl - ERRORBARTIC); draw_clip_line( xl + key_sample_right, yl + ERRORBARTIC, xl + key_sample_right, yl - ERRORBARTIC); } /* oops - doing the point sample now would break the postscript * terminal for example, which changes current line style * when drawing a point, but does not restore it. We must wait then draw the point sample at the end of do_plot (line 2058) */ (*t->layer)(TERM_LAYER_END_KEYSAMPLE); /* Restore previous clipping area */ clip_area = clip_save; } #ifdef EAM_OBJECTS void do_rectangle( int dimensions, t_object *this_object, int style ) { double x1, y1, x2, y2; int x, y; unsigned int w, h; TBOOLEAN clip_x = FALSE; TBOOLEAN clip_y = FALSE; struct lp_style_type lpstyle; struct fill_style_type *fillstyle; t_rectangle *this_rect = &this_object->o.rectangle; if (this_rect->type == 1) { /* specified as center + size */ double width, height; if (dimensions == 2 || this_rect->center.scalex == screen) { map_position_double(&this_rect->center, &x1, &y1, "rect"); map_position_r(&this_rect->extent, &width, &height, "rect"); } else if (splot_map) { int junkw, junkh; map3d_position_double(&this_rect->center, &x1, &y1, "rect"); map3d_position_r(&this_rect->extent, &junkw, &junkh, "rect"); width = junkw; height = junkh; } else return; x1 -= width/2; y1 -= height/2; x2 = x1 + width; y2 = y1 + height; w = width; h = height; if (this_rect->extent.scalex == first_axes || this_rect->extent.scalex == second_axes) clip_x = TRUE; if (this_rect->extent.scaley == first_axes || this_rect->extent.scaley == second_axes) clip_y = TRUE; } else { if ((dimensions == 2) || (this_rect->bl.scalex == screen && this_rect->tr.scalex == screen)) { map_position_double(&this_rect->bl, &x1, &y1, "rect"); map_position_double(&this_rect->tr, &x2, &y2, "rect"); } else if (splot_map) { map3d_position_double(&this_rect->bl, &x1, &y1, "rect"); map3d_position_double(&this_rect->tr, &x2, &y2, "rect"); } else return; if (x1 > x2) {double t=x1; x1=x2; x2=t;} if (y1 > y2) {double t=y1; y1=y2; y2=t;} if (this_rect->bl.scalex != screen && this_rect->tr.scalex != screen) clip_x = TRUE; if (this_rect->bl.scaley != screen && this_rect->tr.scaley != screen) clip_y = TRUE; } /* FIXME - Should there be a generic clip_rectangle() routine? */ /* Clip to the graph boundaries, but only if the rectangle */ /* itself was specified in plot coords. */ if (clip_area) { if (clip_x && x1 < clip_area->xleft) x1 = clip_area->xleft; if (clip_x && x2 > clip_area->xright) x2 = clip_area->xright; if (clip_y && y1 < clip_area->ybot) y1 = clip_area->ybot; if (clip_y && y2 > clip_area->ytop) y2 = clip_area->ytop; if (x1 > x2 || y1 > y2) return; } w = x2 - x1; h = y2 - y1; x = x1; y = y1; if (w == 0 || h == 0) return; if (this_object->lp_properties.l_type == LT_DEFAULT) lpstyle = default_rectangle.lp_properties; else lpstyle = this_object->lp_properties; if (lpstyle.l_width > 0) lpstyle.l_width = this_object->lp_properties.l_width; if (this_object->fillstyle.fillstyle == FS_DEFAULT) fillstyle = &default_rectangle.fillstyle; else fillstyle = &this_object->fillstyle; term_apply_lp_properties(&lpstyle); style = style_from_fill(fillstyle); if (style != FS_EMPTY && term->fillbox) (*term->fillbox) (style, x, y, w, h); if (need_fill_border(fillstyle)) { (*term->move) (x, y); (*term->vector) (x, y+h); (*term->vector) (x+w, y+h); (*term->vector) (x+w, y); (*term->vector) (x, y); } return; } void do_ellipse( int dimensions, t_ellipse *e, int style, TBOOLEAN do_own_mapping ) { gpiPoint vertex[120]; int i; double angle; double cx, cy; double xoff, yoff; double junkfoo; int junkw, junkh; double cosO = cos(DEG2RAD * e->orientation); double sinO = sin(DEG2RAD * e->orientation); double A = e->extent.x / 2.0; /* Major axis radius */ double B = e->extent.y / 2.0; /* Minor axis radius */ struct position pos = e->extent; /* working copy with axis info attached */ double aspect = (double)term->v_tic / (double)term->h_tic; /* Choose how many segments to draw for this ellipse */ int segments = 72; double ang_inc = M_PI / 36.; /* Find the center of the ellipse */ /* If this ellipse is part of a plot - as opposed to an object - * then the caller plot_ellipses function already did the mapping for us. * Else we do it here. The 'ellipses' plot style is 2D only, but objects * can apparently be placed on splot maps too, so we do 3D mapping if needed. */ if (!do_own_mapping) { cx = e->center.x; cy = e->center.y; } else if (dimensions == 2) map_position_double(&e->center, &cx, &cy, "ellipse"); else map3d_position_double(&e->center, &cx, &cy, "ellipse"); /* Calculate the vertices */ vertex[0].style = style; for (i=0, angle = 0.0; i<=segments; i++, angle += ang_inc) { /* Given that the (co)sines of same sequence of angles * are calculated every time - shouldn't they be precomputed * and put into a table? */ pos.x = A * cosO * cos(angle) - B * sinO * sin(angle); pos.y = A * sinO * cos(angle) + B * cosO * sin(angle); if (!do_own_mapping) { xoff = pos.x; yoff = pos.y; } else if (dimensions == 2) { switch (e->type) { case ELLIPSEAXES_XY: map_position_r(&pos, &xoff, &yoff, "ellipse"); break; case ELLIPSEAXES_XX: map_position_r(&pos, &xoff, &junkfoo, "ellipse"); pos.x = pos.y; map_position_r(&pos, &yoff, &junkfoo, "ellipse"); break; case ELLIPSEAXES_YY: map_position_r(&pos, &junkfoo, &yoff, "ellipse"); pos.y = pos.x; map_position_r(&pos, &junkfoo, &xoff, "ellipse"); break; } /* switch */ } else { switch (e->type) { case ELLIPSEAXES_XY: map3d_position_r(&pos, &junkw, &junkh, "ellipse"); xoff = junkw; yoff = junkh; break; case ELLIPSEAXES_XX: map3d_position_r(&pos, &junkw, &junkh, "ellipse"); xoff = junkw; pos.x = pos.y; map3d_position_r(&pos, &junkh, &junkw, "ellipse"); yoff = junkh; break; case ELLIPSEAXES_YY: map3d_position_r(&pos, &junkw, &junkh, "ellipse"); yoff = junkh; pos.y = pos.x; map3d_position_r(&pos, &junkh, &junkw, "ellipse"); xoff = junkw; break; } /* switch */ } /* if */ vertex[i].x = cx + xoff; if (!do_own_mapping) vertex[i].y = cy + yoff * aspect; else vertex[i].y = cy + yoff; /* clip_line has int* arguments, so transform properly: */ { int cx_to_pass = (int)cx; int cy_to_pass = (int)cy; clip_line(&cx_to_pass, &cy_to_pass, &vertex[i].x, &vertex[i].y); /* and since clip_line is entitled to modify its arguments, make * sure they make it back into cx and cy: */ cx = cx_to_pass; cy = cy_to_pass; } } if (style) { /* Fill in the center */ if (term->filled_polygon) term->filled_polygon(segments, vertex); } else { /* Draw the arc */ for (i=0; i<segments; i++) draw_clip_line( vertex[i].x, vertex[i].y, vertex[i+1].x, vertex[i+1].y ); } } void do_polygon( int dimensions, t_polygon *p, int style ) { static gpiPoint *corners = NULL; static gpiPoint *clpcorn = NULL; BoundingBox *clip_save = clip_area; TBOOLEAN noclip = FALSE; int nv; if (!p->vertex || p->type < 2) return; corners = gp_realloc(corners, p->type * sizeof(gpiPoint), "polygon"); clpcorn = gp_realloc(clpcorn, 2 * p->type * sizeof(gpiPoint), "polygon"); for (nv = 0; nv < p->type; nv++) { if (dimensions == 3) map3d_position(&p->vertex[nv], &corners[nv].x, &corners[nv].y, "pvert"); else map_position(&p->vertex[nv], &corners[nv].x, &corners[nv].y, "pvert"); /* Any vertex not given in plot coords will disable clipping */ if (p->vertex[nv].scalex == screen || p->vertex[nv].scaley == screen) noclip = TRUE; if (p->vertex[nv].scalex == graph || p->vertex[nv].scaley == graph) noclip = TRUE; } if (noclip) clip_area = &canvas; if (term->filled_polygon && style) { int i,o; int clipped = 1; gpiPoint temp; for (i=0,o=0; i<nv-1; i++) { clpcorn[o] = corners[i]; temp = corners[i+1]; clipped = clip_line(&corners[i].x, &corners[i].y, &corners[i+1].x, &corners[i+1].y); if (clipped == 0) continue; /* both ends out of range */ if (clipped > 0) o++; /* both ends in range */ if (clipped < 0) { /* clipped to range */ clpcorn[o++] = corners[i]; clpcorn[o++] = corners[i+1]; corners[i+1] = temp; } } if (clipped == 1) clpcorn[o++] = corners[i]; clpcorn[0].style = style; term->filled_polygon(o, clpcorn); } else { /* Just draw the outline? */ int i; newpath(); for (i=0; i<nv-1; i++) draw_clip_line( corners[i].x, corners[i].y, corners[i+1].x, corners[i+1].y ); if (corners[i].x != corners[0].x || corners[i].y != corners[0].y) draw_clip_line( corners[i].x, corners[i].y, corners[0].x, corners[0].y ); closepath(); } clip_area = clip_save; } #endif static TBOOLEAN check_for_variable_color(struct curve_points *plot, double *colorvalue) { if (!plot->varcolor) return FALSE; if ((plot->lp_properties.pm3d_color.value < 0.0) && (plot->lp_properties.pm3d_color.type == TC_RGB)) { set_rgbcolor(*colorvalue); return TRUE; } else if (plot->lp_properties.pm3d_color.type == TC_Z) { set_color( cb2gray(*colorvalue) ); return TRUE; } else if (plot->lp_properties.l_type == LT_COLORFROMCOLUMN) { lp_style_type lptmp; /* lc variable will only pick up line _style_ as opposed to _type_ */ /* in the case of "set style increment user". THIS IS A CHANGE. */ if (prefer_line_styles) lp_use_properties(&lptmp, (int)(*colorvalue)); else load_linetype(&lptmp, (int)(*colorvalue)); apply_pm3dcolor(&(lptmp.pm3d_color), term); return TRUE; } else return FALSE; } /* Similar to HBB's comment above, this routine is shared with * graph3d.c, so it shouldn't be in this module (graphics.c). * However, I feel that 2d and 3d graphing routines should be * made as much in common as possible. They seem to be * bifurcating a bit too much. (Dan Sebald) */ #include "util3d.h" /* hyperplane_between_points: * Compute the hyperplane representation of a line passing * between two points. */ void hyperplane_between_points(double *p1, double *p2, double *w, double *b) { w[0] = p1[1] - p2[1]; w[1] = p2[0] - p1[0]; *b = -(w[0]*p1[0] + w[1]*p1[1]); } /* plot_image_or_update_axes: * Plot the coordinates similar to the points option except use * pixels. Check if the data forms a valid image array, i.e., * one for which points are spaced equidistant along two non- * coincidence vectors. If the two directions are orthogonal * within some tolerance and they are aligned with the view * box x and y directions, then use the image feature of the * terminal if it has one. Otherwise, use parallelograms via * the polynomial function. If it is only necessary to update * the axis ranges for `set autoscale`, do so and then return. */ void plot_image_or_update_axes(void *plot, TBOOLEAN update_axes) { struct coordinate GPHUGE *points; int p_count; int i; double w_hyp[2], b_hyp; /* Hyperlane vector and constant */ double p_start_corner[2], p_end_corner[2]; /* Points used for computing hyperplane. */ int K = 0, L = 0; /* Dimensions of image grid. K = <scan line length>, L = <number of scan lines>. */ double p_mid_corner[2]; /* Point representing first corner found, i.e. p(K-1) */ double delta_x_grid[2] = {0, 0}; /* Spacings between points, two non-orthogonal directions. */ double delta_y_grid[2] = {0, 0}; int grid_corner[4] = {-1, -1, -1, -1}; /* The corner pixels of the image. */ double view_port_x[2]; /* Viewable portion of the image. */ double view_port_y[2]; double view_port_z[2] = {0,0}; t_imagecolor pixel_planes; TBOOLEAN project_points = FALSE; /* True if 3D plot */ if ((((struct surface_points *)plot)->plot_type == DATA3D) || (((struct surface_points *)plot)->plot_type == FUNC3D)) project_points = TRUE; if (project_points) { points = ((struct surface_points *)plot)->iso_crvs->points; p_count = ((struct surface_points *)plot)->iso_crvs->p_count; pixel_planes = ((struct surface_points *)plot)->image_properties.type; } else { points = ((struct curve_points *)plot)->points; p_count = ((struct curve_points *)plot)->p_count; pixel_planes = ((struct curve_points *)plot)->image_properties.type; } if (p_count < 1) { int_warn(NO_CARET, "No points (visible or invisible) to plot.\n\n"); return; } if (p_count < 4) { int_warn(NO_CARET, "Image grid must be at least 4 points (2 x 2).\n\n"); return; } if (project_points && (X_AXIS.log || Y_AXIS.log || Z_AXIS.log)) { int_warn(NO_CARET, "Log scaling of 3D image plots is not supported"); return; } /* Check if the pixel data forms a valid rectangular grid for potential image * matrix support. A general grid orientation is considered. If the grid * points are orthogonal and oriented along the x/y dimensions the terminal * function for images will be used. Otherwise, the terminal function for * filled polygons are used to construct parallelograms for the pixel elements. */ #define GRIDX(X) AXIS_DE_LOG_VALUE(((struct curve_points *)plot)->x_axis,points[X].x) #define GRIDY(Y) AXIS_DE_LOG_VALUE(((struct curve_points *)plot)->y_axis,points[Y].y) #define GRIDZ(Z) AXIS_DE_LOG_VALUE(((struct curve_points *)plot)->z_axis,points[Z].z) /* Compute the hyperplane representation of the cross diagonal from * the very first point of the scan to the very last point of the * scan. */ if (project_points) { map3d_xy_double(points[0].x, points[0].y, points[0].z, &p_start_corner[0], &p_start_corner[1]); map3d_xy_double(points[p_count-1].x, points[p_count-1].y, points[p_count-1].z, &p_end_corner[0], &p_end_corner[1]); } else if (X_AXIS.log || Y_AXIS.log) { p_start_corner[0] = GRIDX(0); p_start_corner[1] = GRIDY(0); p_end_corner[0] = GRIDX(p_count-1); p_end_corner[1] = GRIDY(p_count-1); } else { p_start_corner[0] = points[0].x; p_start_corner[1] = points[0].y; p_end_corner[0] = points[p_count-1].x; p_end_corner[1] = points[p_count-1].y; } hyperplane_between_points(p_start_corner, p_end_corner, w_hyp, &b_hyp); for (K = p_count, i=1; i < p_count; i++) { double p[2]; if (project_points) { map3d_xy_double(points[i].x, points[i].y, points[i].z, &p[0], &p[1]); } else if (X_AXIS.log || Y_AXIS.log) { p[0] = GRIDX(i); p[1] = GRIDY(i); } else { p[0] = points[i].x; p[1] = points[i].y; } if (i == 1) { /* Determine what side (sign) of the hyperplane the second point is on. * If the second point is on the negative side of the plane, change * the sign of hyperplane variables. Then any remaining points on the * first line will test positive in the hyperplane formula. The first * point on the second line will test negative. */ if ((w_hyp[0]*p[0] + w_hyp[1]*p[1] + b_hyp) < 0) { w_hyp[0] = -w_hyp[0]; w_hyp[1] = -w_hyp[1]; b_hyp = -b_hyp; } } else { /* The first point on the opposite side of the hyperplane is the * candidate for the first point of the second scan line. */ if ((w_hyp[0]*p[0] + w_hyp[1]*p[1] + b_hyp) < 0) { K = i; break; } } } if (K == p_count) { int_warn(NO_CARET, "Image grid must be at least 2 x 2.\n\n"); /* return; */ } L = p_count/K; if (((double)L) != ((double)p_count/K)) { int_warn(NO_CARET, "Number of pixels cannot be factored into integers matching grid. N = %d K = %d", p_count, K); return; } grid_corner[0] = 0; grid_corner[1] = K-1; grid_corner[3] = p_count - 1; grid_corner[2] = p_count - K; if (project_points) { map3d_xy_double(points[K-1].x, points[K-1].y, points[K-1].z, &p_mid_corner[0], &p_mid_corner[1]); } else if (X_AXIS.log || Y_AXIS.log) { p_mid_corner[0] = GRIDX(K-1); p_mid_corner[1] = GRIDY(K-1); } else { p_mid_corner[0] = points[K-1].x; p_mid_corner[1] = points[K-1].y; } /* The grid spacing in one direction. */ delta_x_grid[0] = (p_mid_corner[0] - p_start_corner[0])/(K-1); delta_y_grid[0] = (p_mid_corner[1] - p_start_corner[1])/(K-1); /* The grid spacing in the second direction. */ delta_x_grid[1] = (p_end_corner[0] - p_mid_corner[0])/(L-1); delta_y_grid[1] = (p_end_corner[1] - p_mid_corner[1])/(L-1); if (update_axes) { for (i=0; i < 4; i++) { coord_type dummy_type; double x,y; if (X_AXIS.log || Y_AXIS.log) { x = GRIDX(i); y = GRIDY(i); x -= (GRIDX((5-i)%4) - GRIDX(i)) / (2*(K-1)); y -= (GRIDY((5-i)%4) - GRIDY(i)) / (2*(K-1)); x -= (GRIDX((i+2)%4) - GRIDX(i)) / (2*(L-1)); y -= (GRIDY((i+2)%4) - GRIDY(i)) / (2*(L-1)); } else { x = points[grid_corner[i]].x; y = points[grid_corner[i]].y; x -= (points[grid_corner[(5-i)%4]].x - points[grid_corner[i]].x)/(2*(K-1)); y -= (points[grid_corner[(5-i)%4]].y - points[grid_corner[i]].y)/(2*(K-1)); x -= (points[grid_corner[(i+2)%4]].x - points[grid_corner[i]].x)/(2*(L-1)); y -= (points[grid_corner[(i+2)%4]].y - points[grid_corner[i]].y)/(2*(L-1)); } /* Update range and store value back into itself. */ dummy_type = INRANGE; STORE_WITH_LOG_AND_UPDATE_RANGE(x, x, dummy_type, ((struct curve_points *)plot)->x_axis, ((struct curve_points *)plot)->noautoscale, NOOP, x = -VERYLARGE); dummy_type = INRANGE; STORE_WITH_LOG_AND_UPDATE_RANGE(y, y, dummy_type, ((struct curve_points *)plot)->y_axis, ((struct curve_points *)plot)->noautoscale, NOOP, y = -VERYLARGE); } return; } /* Check if the pixel grid is orthogonal and oriented with axes. * If so, then can use efficient terminal image routines. */ { TBOOLEAN rectangular_image = FALSE; TBOOLEAN fallback = FALSE; #define SHIFT_TOLERANCE 0.01 if ( ( (fabs(delta_x_grid[0]) < SHIFT_TOLERANCE*fabs(delta_x_grid[1])) || (fabs(delta_x_grid[1]) < SHIFT_TOLERANCE*fabs(delta_x_grid[0])) ) && ( (fabs(delta_y_grid[0]) < SHIFT_TOLERANCE*fabs(delta_y_grid[1])) || (fabs(delta_y_grid[1]) < SHIFT_TOLERANCE*fabs(delta_y_grid[0])) ) ) { rectangular_image = TRUE; /* If the terminal does not have image support then fall back to * using polygons to construct pixels. */ if (project_points) fallback = !splot_map || ((struct surface_points *)plot)->image_properties.fallback; else fallback = ((struct curve_points *)plot)->image_properties.fallback; } if (pixel_planes == IC_PALETTE && make_palette()) { /* int_warn(NO_CARET, "This terminal does not support palette-based images.\n\n"); */ return; } if ((pixel_planes == IC_RGB || pixel_planes == IC_RGBA) && !term->set_color) { /* int_warn(NO_CARET, "This terminal does not support rgb images.\n\n"); */ return; } /* Use generic code to handle alpha channel if the terminal can't */ if (pixel_planes == IC_RGBA && !(term->flags & TERM_ALPHA_CHANNEL)) fallback = TRUE; /* Also use generic code if the pixels are of unequal size, e.g. log scale */ if (X_AXIS.log || Y_AXIS.log) fallback = TRUE; view_port_x[0] = (X_AXIS.set_autoscale & AUTOSCALE_MIN) ? X_AXIS.min : X_AXIS.set_min; view_port_x[1] = (X_AXIS.set_autoscale & AUTOSCALE_MAX) ? X_AXIS.max : X_AXIS.set_max; view_port_y[0] = (Y_AXIS.set_autoscale & AUTOSCALE_MIN) ? Y_AXIS.min : Y_AXIS.set_min; view_port_y[1] = (Y_AXIS.set_autoscale & AUTOSCALE_MAX) ? Y_AXIS.max : Y_AXIS.set_max; if (project_points) { view_port_z[0] = (Z_AXIS.set_autoscale & AUTOSCALE_MIN) ? Z_AXIS.min : Z_AXIS.set_min; view_port_z[1] = (Z_AXIS.set_autoscale & AUTOSCALE_MAX) ? Z_AXIS.max : Z_AXIS.set_max; } if (rectangular_image && term->image && !fallback) { /* There are eight ways that a valid pixel grid can be entered. Use table * lookup instead of if() statements. (Draw the various array combinations * on a sheet of paper, or see the README file.) */ int line_length, i_delta_pixel, i_delta_line, i_start; int pixel_1_1, pixel_M_N; coordval *image; int array_size; float xsts, ysts; if (!project_points) { /* Determine axis direction according to the sign of the terminal scale. */ xsts = (axis_array[x_axis].term_scale > 0 ? +1 : -1); ysts = (axis_array[y_axis].term_scale > 0 ? +1 : -1); } else { /* 3D plots do not use the term_scale mechanism AXIS_SETSCALE(). */ xsts = 1; ysts = 1; } /* Set up parameters for indexing through the image matrix to transfer data. * These formulas were derived for a terminal image routine which uses the * upper left corner as pixel (1,1). */ if (fabs(delta_x_grid[0]) > fabs(delta_x_grid[1])) { line_length = K; i_start = (delta_y_grid[1]*ysts > 0 ? L : 1) * K - (delta_x_grid[0]*xsts > 0 ? K : 1); i_delta_pixel = (delta_x_grid[0]*xsts > 0 ? +1 : -1); i_delta_line = (delta_x_grid[0]*xsts > 0 ? -K : +K) + (delta_y_grid[1]*ysts > 0 ? -K : +K); } else { line_length = L; i_start = (delta_x_grid[1]*xsts > 0 ? 1 : L) * K - (delta_y_grid[0]*ysts > 0 ? 1 : K); i_delta_pixel = (delta_x_grid[1]*xsts > 0 ? +K : -K); i_delta_line = K*L*(delta_x_grid[1]*xsts > 0 ? -1 : +1) + (delta_y_grid[0]*ysts > 0 ? -1 : +1); } /* Assign enough memory for the maximum image size. */ array_size = K*L; /* If doing color, multiply size by three for RGB triples. */ if (pixel_planes == IC_RGB) array_size *= 3; else if (pixel_planes == IC_RGBA) array_size *= 4; image = (coordval *) gp_alloc(array_size*sizeof(image[0]),"image"); /* Place points into image array based upon the arrangement of point indices and * the visibility of pixels. */ if (image != NULL) { int j; gpiPoint corners[4]; int M = 0, N = 0; /* M = number of columns, N = number of rows. (K and L don't * have a set direction, but M and N do.) */ int i_image, i_sub_image = 0; double d_x_o_2, d_y_o_2, d_z_o_2; int line_pixel_count = 0; d_x_o_2 = ( (points[grid_corner[0]].x - points[grid_corner[1]].x)/(K-1) + (points[grid_corner[0]].x - points[grid_corner[2]].x)/(L-1) ) / 2; d_y_o_2 = ( (points[grid_corner[0]].y - points[grid_corner[1]].y)/(K-1) + (points[grid_corner[0]].y - points[grid_corner[2]].y)/(L-1) ) / 2; d_z_o_2 = ( (points[grid_corner[0]].z - points[grid_corner[1]].z)/(K-1) + (points[grid_corner[0]].z - points[grid_corner[2]].z)/(L-1) ) / 2; pixel_1_1 = -1; pixel_M_N = -1; /* Step through the points placing them in the proper spot in the matrix array. */ for (i=0, j=line_length, i_image=i_start; i < p_count; i++) { TBOOLEAN visible; double x, y, z, x_low, x_high, y_low, y_high, z_low, z_high; x = points[i_image].x; y = points[i_image].y; z = points[i_image].z; x_low = x - d_x_o_2; x_high = x + d_x_o_2; y_low = y - d_y_o_2; y_high = y + d_y_o_2; z_low = z - d_z_o_2; z_high = z + d_z_o_2; /* Check if a portion of this pixel will be visible. Do not use the * points[i].type == INRANGE test because a portion of a pixel can * extend into view and the INRANGE type doesn't account for this. * * This series of tests is designed for speed. If one of the corners * of the pixel in question falls in the view port range then the pixel * will be visible. Do this test first because it is the more likely * of situations. It could also happen that the view port is smaller * than a pixel. In that case, if one of the view port corners lands * inside the pixel then the pixel in question will be visible. This * won't be as common, so do those tests last. Set up the if structure * in such a way that as soon as one of the tests is true, the conditional * tests stop. */ if ( ( inrange(x_low, view_port_x[0], view_port_x[1]) || inrange(x_high, view_port_x[0], view_port_x[1]) ) && ( inrange(y_low, view_port_y[0], view_port_y[1]) || inrange(y_high, view_port_y[0], view_port_y[1]) ) && ( !project_points || inrange(z_low, view_port_z[0], view_port_z[1]) || inrange(z_high, view_port_z[0], view_port_z[1]) ) ) visible = TRUE; else if ( ( inrange(view_port_x[0], x_low, x_high) || inrange(view_port_x[1], x_low, x_high) ) && ( inrange(view_port_y[0], y_low, y_high) || inrange(view_port_y[1], y_low, y_high) ) && ( !project_points || inrange(view_port_z[0], z_low, z_high) || inrange(view_port_z[1], z_low, z_high) ) ) visible = TRUE; else visible = FALSE; if (visible) { if (pixel_1_1 < 0) { /* First visible point. */ pixel_1_1 = i_image; M = 0; N = 1; line_pixel_count = 1; } else { if (line_pixel_count == 0) N += 1; line_pixel_count++; if ( (N != 1) && (line_pixel_count > M) ) { int_warn(NO_CARET, "Visible pixel grid has a scan line longer than previous scan lines."); return; } } pixel_M_N = i_image; if (pixel_planes == IC_PALETTE) { image[i_sub_image++] = cb2gray( points[i_image].CRD_COLOR ); } else { image[i_sub_image++] = cb2gray( points[i_image].CRD_R ); image[i_sub_image++] = cb2gray( points[i_image].CRD_G ); image[i_sub_image++] = cb2gray( points[i_image].CRD_B ); if (pixel_planes == IC_RGBA) image[i_sub_image++] = points[i_image].CRD_A; } } i_image += i_delta_pixel; j--; if (j == 0) { if (M == 0) M = line_pixel_count; else if ((line_pixel_count > 0) && (line_pixel_count != M)) { int_warn(NO_CARET, "Visible pixel grid has a scan line shorter than previous scan lines."); return; } line_pixel_count = 0; i_image += i_delta_line; j = line_length; } } if ( (M > 0) && (N > 0) ) { /* The information collected to this point is: * * M = <number of columns> * N = <number of rows> * image[] = M x N array of pixel data. * pixel_1_1 = position in points[] associated with pixel (1,1) * pixel_M_N = position in points[] associated with pixel (M,N) */ /* One of the delta values in each direction is zero, so add. */ if (project_points) { double x, y; map3d_xy_double(points[pixel_1_1].x, points[pixel_1_1].y, points[pixel_1_1].z, &x, &y); corners[0].x = x - fabs(delta_x_grid[0]+delta_x_grid[1])/2; corners[0].y = y + fabs(delta_y_grid[0]+delta_y_grid[1])/2; map3d_xy_double(points[pixel_M_N].x, points[pixel_M_N].y, points[pixel_M_N].z, &x, &y); corners[1].x = x + fabs(delta_x_grid[0]+delta_x_grid[1])/2; corners[1].y = y - fabs(delta_y_grid[0]+delta_y_grid[1])/2; map3d_xy_double(view_port_x[0], view_port_y[0], view_port_z[0], &x, &y); corners[2].x = x; corners[2].y = y; map3d_xy_double(view_port_x[1], view_port_y[1], view_port_z[1], &x, &y); corners[3].x = x; corners[3].y = y; } else { corners[0].x = map_x(points[pixel_1_1].x - xsts*fabs(d_x_o_2)); corners[0].y = map_y(points[pixel_1_1].y + ysts*fabs(d_y_o_2)); corners[1].x = map_x(points[pixel_M_N].x + xsts*fabs(d_x_o_2)); corners[1].y = map_y(points[pixel_M_N].y - ysts*fabs(d_y_o_2)); corners[2].x = map_x(view_port_x[0]); corners[2].y = map_y(view_port_y[1]); corners[3].x = map_x(view_port_x[1]); corners[3].y = map_y(view_port_y[0]); } (*term->image) (M, N, image, corners, pixel_planes); } free ((void *)image); } else { int_warn(NO_CARET, "Could not allocate memory for image."); return; } } else { /* no term->image or "with image failsafe" */ /* Use sum of vectors to compute the pixel corners with respect to its center. */ struct {double x; double y; double z;} delta_grid[2], delta_pixel[2]; int j, i_image; TBOOLEAN log_axes = (X_AXIS.log || Y_AXIS.log); if (!term->filled_polygon) int_error(NO_CARET, "This terminal does not support filled polygons"); /* Grid spacing in 3D space. */ if (log_axes) { delta_grid[0].x = (GRIDX(grid_corner[1]) - GRIDX(grid_corner[0])) / (K-1); delta_grid[0].y = (GRIDY(grid_corner[1]) - GRIDY(grid_corner[0])) / (K-1); delta_grid[0].z = (GRIDZ(grid_corner[1]) - GRIDZ(grid_corner[0])) / (K-1); delta_grid[1].x = (GRIDX(grid_corner[2]) - GRIDX(grid_corner[0])) / (L-1); delta_grid[1].y = (GRIDY(grid_corner[2]) - GRIDY(grid_corner[0])) / (L-1); delta_grid[1].z = (GRIDZ(grid_corner[2]) - GRIDZ(grid_corner[0])) / (L-1); } else { delta_grid[0].x = (points[grid_corner[1]].x - points[grid_corner[0]].x)/(K-1); delta_grid[0].y = (points[grid_corner[1]].y - points[grid_corner[0]].y)/(K-1); delta_grid[0].z = (points[grid_corner[1]].z - points[grid_corner[0]].z)/(K-1); delta_grid[1].x = (points[grid_corner[2]].x - points[grid_corner[0]].x)/(L-1); delta_grid[1].y = (points[grid_corner[2]].y - points[grid_corner[0]].y)/(L-1); delta_grid[1].z = (points[grid_corner[2]].z - points[grid_corner[0]].z)/(L-1); } /* Pixel dimensions in the 3D space. */ delta_pixel[0].x = (delta_grid[0].x + delta_grid[1].x) / 2; delta_pixel[0].y = (delta_grid[0].y + delta_grid[1].y) / 2; delta_pixel[0].z = (delta_grid[0].z + delta_grid[1].z) / 2; delta_pixel[1].x = (delta_grid[0].x - delta_grid[1].x) / 2; delta_pixel[1].y = (delta_grid[0].y - delta_grid[1].y) / 2; delta_pixel[1].z = (delta_grid[0].z - delta_grid[1].z) / 2; i_image = 0; for (j=0; j < L; j++) { double x_line_start, y_line_start, z_line_start; if (log_axes) { x_line_start = GRIDX(grid_corner[0]) + j * delta_grid[1].x; y_line_start = GRIDY(grid_corner[0]) + j * delta_grid[1].y; z_line_start = GRIDZ(grid_corner[0]) + j * delta_grid[1].z; } else { x_line_start = points[grid_corner[0]].x + j * delta_grid[1].x; y_line_start = points[grid_corner[0]].y + j * delta_grid[1].y; z_line_start = points[grid_corner[0]].z + j * delta_grid[1].z; } for (i=0; i < K; i++) { double x, y, z; TBOOLEAN view_in_pixel = FALSE; int corners_in_view = 0; struct {double x; double y; double z;} p_corners[4]; /* Parallelogram corners. */ int k; /* If terminal can't handle alpha, treat it as all-or-none. */ if (pixel_planes == IC_RGBA) { if ((points[i_image].CRD_A == 0) || (points[i_image].CRD_A < 128 && !(term->flags & TERM_ALPHA_CHANNEL))) { i_image++; continue; } } x = x_line_start + i * delta_grid[0].x; y = y_line_start + i * delta_grid[0].y; z = z_line_start + i * delta_grid[0].z; p_corners[0].x = x + delta_pixel[0].x; p_corners[0].y = y + delta_pixel[0].y; p_corners[0].z = z + delta_pixel[0].z; p_corners[1].x = x + delta_pixel[1].x; p_corners[1].y = y + delta_pixel[1].y; p_corners[1].z = z + delta_pixel[1].z; p_corners[2].x = x - delta_pixel[0].x; p_corners[2].y = y - delta_pixel[0].y; p_corners[2].z = z - delta_pixel[0].z; p_corners[3].x = x - delta_pixel[1].x; p_corners[3].y = y - delta_pixel[1].y; p_corners[3].z = z - delta_pixel[1].z; /* Check if any of the corners are viewable */ for (k=0; k < 4; k++) { if ( inrange(p_corners[k].x, view_port_x[0], view_port_x[1]) && inrange(p_corners[k].y, view_port_y[0], view_port_y[1]) && (inrange(p_corners[k].z, view_port_z[0], view_port_z[1]) || !project_points || splot_map)) corners_in_view++; } if (corners_in_view > 0 || view_in_pixel) { int N_corners = 0; /* Number of corners. */ gpiPoint corners[5]; /* At most 5 corners. */ corners[0].style = FS_DEFAULT; if (corners_in_view > 0) { int i_corners; N_corners = 4; for (i_corners=0; i_corners < N_corners; i_corners++) { if (project_points) { map3d_xy_double(p_corners[i_corners].x, p_corners[i_corners].y, p_corners[i_corners].z, &x, &y); corners[i_corners].x = x; corners[i_corners].y = y; } else { if (log_axes) { corners[i_corners].x = map_x(AXIS_LOG_VALUE(x_axis,p_corners[i_corners].x)); corners[i_corners].y = map_y(AXIS_LOG_VALUE(y_axis,p_corners[i_corners].y)); } else { corners[i_corners].x = map_x(p_corners[i_corners].x); corners[i_corners].y = map_y(p_corners[i_corners].y); } } /* Clip rectangle if necessary */ if (rectangular_image && term->fillbox && corners_in_view < 4) { if (corners[i_corners].x < clip_area->xleft) corners[i_corners].x = clip_area->xleft; if (corners[i_corners].x > clip_area->xright) corners[i_corners].x = clip_area->xright; if (corners[i_corners].y > clip_area->ytop) corners[i_corners].y = clip_area->ytop; if (corners[i_corners].y < clip_area->ybot) corners[i_corners].y = clip_area->ybot; } } } else { /* DJS FIXME: * Could still be visible if any of the four corners of the view port are * within the parallelogram formed by the pixel. This is tricky geometry. */ } if (N_corners > 0) { if (pixel_planes == IC_PALETTE) { if ((points[i_image].type == UNDEFINED) || isnan(points[i_image].CRD_COLOR)) goto skip_pixel; set_color( cb2gray(points[i_image].CRD_COLOR) ); } else { int r = cb2gray(points[i_image].CRD_R) * 255. + 0.5; int g = cb2gray(points[i_image].CRD_G) * 255. + 0.5; int b = cb2gray(points[i_image].CRD_B) * 255. + 0.5; int rgblt = (r << 16) + (g << 8) + b; set_rgbcolor(rgblt); } if (pixel_planes == IC_RGBA) { int alpha = points[i_image].CRD_A * 100./255.; if (alpha == 0) goto skip_pixel; if (term->flags & TERM_ALPHA_CHANNEL) corners[0].style = FS_TRANSPARENT_SOLID + (alpha<<4); } if (rectangular_image && term->fillbox) { /* Some terminals (canvas) can do filled rectangles */ /* more efficiently than filled polygons. */ (*term->fillbox)( corners[0].style, GPMIN(corners[0].x, corners[2].x), GPMIN(corners[0].y, corners[2].y), abs(corners[2].x - corners[0].x), abs(corners[2].y - corners[0].y)); } else { (*term->filled_polygon) (N_corners, corners); } } } skip_pixel: i_image++; } } } } } /* Graph legend is now optionally done in two passes. The first pass calculates */ /* and reserves the necessary space. Next the individual plots in the graph */ /* are drawn. Then the reserved space for the legend is blanked out, and */ /* finally the second pass through this code draws the legend. */ static void do_key_layout(legend_key *key, TBOOLEAN key_pass, int *xinkey, int *yinkey) { struct termentry *t = term; int xl = key->bounds.xleft + key_size_left; int yl = key->bounds.ytop; /* In two-pass mode, we blank out the key area after the graph */ /* is drawn and then redo the key in the blank area. */ if (key_pass && t->fillbox) { double extra_height = 0.0; int adjusted_key_bot = key->bounds.ybot; if (*key->title) { if ((t->flags & TERM_ENHANCED_TEXT) && strchr(key->title,'^')) extra_height += 0.51; if ((t->flags & TERM_ENHANCED_TEXT) && strchr(key->title,'_')) extra_height += 0.3; adjusted_key_bot -= extra_height * t->v_char; } if (t->set_color) { (*t->set_color)(&background_fill); (*t->fillbox)(FS_OPAQUE, key->bounds.xleft, adjusted_key_bot, key->bounds.xright - key->bounds.xleft, key->bounds.ytop - adjusted_key_bot); } } if (*key->title) { int center = (key->bounds.xleft + key->bounds.xright) / 2; double extra_height = 0.0; if ((t->flags & TERM_ENHANCED_TEXT) && strchr(key->title,'^')) extra_height += 0.51; /* Only draw the title once */ if (key_pass || !key->front) { if (key->textcolor.type == TC_RGB && key->textcolor.value < 0) apply_pm3dcolor(&(key->box.pm3d_color), t); else apply_pm3dcolor(&(key->textcolor), t); write_multiline(center, yl - (0.5 + extra_height/2.0) * t->v_char, key->title, CENTRE, JUST_TOP, 0, key->font); (*t->linetype)(LT_BLACK); } if ((t->flags & TERM_ENHANCED_TEXT) && strchr(key->title,'_')) extra_height += 0.3; ktitl_lines += extra_height; key->bounds.ybot -= extra_height * t->v_char; yl -= t->v_char * ktitl_lines; } yl -= (int)(0.5 * key->height_fix * t->v_char); yl_ref = yl -= key_entry_height / 2; /* centralise the keys */ if (key->box.l_type > LT_NODRAW) { BoundingBox *clip_save = clip_area; if (term->flags & TERM_CAN_CLIP) clip_area = NULL; else clip_area = &canvas; term_apply_lp_properties(&key->box); newpath(); draw_clip_line(key->bounds.xleft, key->bounds.ybot, key->bounds.xleft, key->bounds.ytop); draw_clip_line(key->bounds.xleft, key->bounds.ytop, key->bounds.xright, key->bounds.ytop); draw_clip_line(key->bounds.xright, key->bounds.ytop, key->bounds.xright, key->bounds.ybot); draw_clip_line(key->bounds.xright, key->bounds.ybot, key->bounds.xleft, key->bounds.ybot); closepath(); /* draw a horizontal line between key title and first entry */ if (*key->title) draw_clip_line( key->bounds.xleft, key->bounds.ytop - (ktitl_lines) * t->v_char, key->bounds.xright, key->bounds.ytop - (ktitl_lines) * t->v_char); clip_area = clip_save; } *xinkey = xl; *yinkey = yl; } ����������������������������������������������������������������������������������gnuplot-4.6.4/src/gadgets.h�������������������������������������������������������������������������0000644�0004711�0000144�00000044274�11644660320�012524� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * gadgets.h,v 1.1.3.1 2000/05/03 21:47:15 hbb Exp */ /* GNUPLOT - gadgets.h */ /*[ * Copyright 2000, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_GADGETS_H # define GNUPLOT_GADGETS_H #include "syscfg.h" #include "term_api.h" /* Types and variables concerning graphical plot elements that are not * *terminal-specific, are used by both* 2D and 3D plots, and are not * *assignable to any particular * axis. I.e. they belong to neither * *term_api, graphics, graph3d, nor * axis .h files. */ /* #if... / #include / #define collection: */ /* Default point size is taken from the global "pointsize" variable */ #define PTSZ_DEFAULT (-2) #define PTSZ_VARIABLE (-3) #define AS_VARIABLE (-3) /* Type definitions */ /* Coordinate system specifications: x1/y1, x2/y2, graph-box relative * or screen relative coordinate systems */ typedef enum position_type { first_axes, second_axes, graph, screen, character } position_type; /* A full 3D position, with all 3 coordinates of possible using different axes. * Used for 'set label', 'set arrow' positions and various offsets. */ typedef struct position { enum position_type scalex,scaley,scalez; double x,y,z; } t_position; /* Linked list of structures storing 'set label' information */ typedef struct text_label { struct text_label *next; /* pointer to next label in linked list */ int tag; /* identifies the label */ t_position place; enum JUSTIFY pos; int rotate; int layer; char *text; char *font; /* Entry font added by DJL */ struct t_colorspec textcolor; struct lp_style_type lp_properties; struct position offset; TBOOLEAN noenhanced; } text_label; /* This is the default state for the axis, timestamp, and plot title labels * indicated by tag = -2 */ #define NONROTATABLE_LABEL_TAG -2 #define ROTATE_IN_3D_LABEL_TAG -3 #define EMPTY_LABELSTRUCT \ {NULL, NONROTATABLE_LABEL_TAG, \ {character, character, character, 0.0, 0.0, 0.0}, CENTRE, 0, 0, \ NULL, NULL, {TC_LT, -2, 0.0}, DEFAULT_LP_STYLE_TYPE, \ {character, character, character, 0.0, 0.0, 0.0}, FALSE } /* Datastructure for implementing 'set arrow' */ typedef struct arrow_def { struct arrow_def *next; /* pointer to next arrow in linked list */ int tag; /* identifies the arrow */ t_position start; t_position end; TBOOLEAN relative; /* second coordinate is relative to first */ struct arrow_style_type arrow_properties; } arrow_def; #ifdef EAM_OBJECTS /* The object types supported so far are OBJ_RECTANGLE, OBJ_CIRCLE, and OBJ_ELLIPSE */ typedef struct rectangle { int type; /* 0 = corners; 1 = center + size */ t_position center; /* center */ t_position extent; /* width and height */ t_position bl; /* bottom left */ t_position tr; /* top right */ } t_rectangle; #define DEFAULT_RADIUS (-1.0) #define DEFAULT_ELLIPSE (-2.0) typedef struct circle { int type; /* not used */ t_position center; /* center */ t_position extent; /* radius */ double arc_begin; double arc_end; } t_circle; #define ELLIPSEAXES_XY (0) #define ELLIPSEAXES_XX (1) #define ELLIPSEAXES_YY (2) typedef struct ellipse { int type; /* mapping of axes: ELLIPSEAXES_XY, ELLIPSEAXES_XX or ELLIPSEAXES_YY */ t_position center; /* center */ t_position extent; /* major and minor axes */ double orientation; /* angle of first axis to horizontal */ } t_ellipse; typedef struct polygon { int type; /* Number of vertices */ t_position *vertex; /* Array of vertices */ } t_polygon; /* Datastructure for 'set object' */ typedef struct object { struct object *next; int tag; int layer; /* behind or back or front */ int object_type; /* OBJ_RECTANGLE */ fill_style_type fillstyle; lp_style_type lp_properties; union o {t_rectangle rectangle; t_circle circle; t_ellipse ellipse; t_polygon polygon;} o; } t_object; #define OBJ_RECTANGLE (1) #define OBJ_CIRCLE (2) #define OBJ_ELLIPSE (3) #define OBJ_POLYGON (4) #endif /* Datastructure implementing 'set style line' */ struct linestyle_def { struct linestyle_def *next; /* pointer to next linestyle in linked list */ int tag; /* identifies the linestyle */ struct lp_style_type lp_properties; }; /* Datastructure implementing 'set style arrow' */ struct arrowstyle_def { struct arrowstyle_def *next;/* pointer to next arrowstyle in linked list */ int tag; /* identifies the arrowstyle */ struct arrow_style_type arrow_properties; }; /* The stacking direction of the key box: (vertical, horizontal) */ typedef enum en_key_stack_direction { GPKEY_VERTICAL, GPKEY_HORIZONTAL } t_key_stack_direction; /* The region, with respect to the border, key is located: (inside, outside) */ typedef enum en_key_region { GPKEY_AUTO_INTERIOR_LRTBC, /* Auto placement, left/right/top/bottom/center */ GPKEY_AUTO_EXTERIOR_LRTBC, /* Auto placement, left/right/top/bottom/center */ GPKEY_AUTO_EXTERIOR_MARGIN, /* Auto placement, margin plus lrc or tbc */ GPKEY_USER_PLACEMENT /* User specified placement */ } t_key_region; /* If exterior, there are 12 possible auto placements. Since left/right/center with top/bottom/center can only define 9 locations, further subdivide the exterior region into four subregions for which left/right/center (TMARGIN/BMARGIN) and top/bottom/center (LMARGIN/RMARGIN) creates 12 locations. */ typedef enum en_key_ext_region { GPKEY_TMARGIN, GPKEY_BMARGIN, GPKEY_LMARGIN, GPKEY_RMARGIN } t_key_ext_region; /* Key sample to the left or the right of the plot title? */ typedef enum en_key_sample_positioning { GPKEY_LEFT, GPKEY_RIGHT } t_key_sample_positioning; typedef struct { int opt_given; /* option given / not given (otherwise default) */ int closeto; /* from list FILLEDCURVES_CLOSED, ... */ double at; /* value for FILLEDCURVES_AT... */ double aty; /* the other value for FILLEDCURVES_ATXY */ int oneside; /* -1 if fill below bound only; +1 if fill above bound only */ } filledcurves_opts; #define EMPTY_FILLEDCURVES_OPTS { 0, 0, 0.0, 0.0, 0 } typedef struct histogram_style { int type; /* enum t_histogram_type */ int gap; /* set style hist gap <n> (space between clusters) */ int clustersize; /* number of datasets in this histogram */ double start; /* X-coord of first histogram entry */ double end; /* X-coord of last histogram entry */ int startcolor; /* LT_UNDEFINED or explicit color for first entry */ int startpattern; /* LT_UNDEFINED or explicit pattern for first entry */ double bar_lw; /* linewidth for error bars */ struct histogram_style *next; struct text_label title; } histogram_style; typedef enum histogram_type { HT_NONE, HT_STACKED_IN_LAYERS, HT_STACKED_IN_TOWERS, HT_CLUSTERED, HT_ERRORBARS } t_histogram_type; #define DEFAULT_HISTOGRAM_STYLE { HT_NONE, 2, 1, 0.0, 0.0, LT_UNDEFINED, LT_UNDEFINED, 0, NULL, EMPTY_LABELSTRUCT } typedef enum en_boxplot_factor_labels { BOXPLOT_FACTOR_LABELS_OFF, BOXPLOT_FACTOR_LABELS_AUTO, BOXPLOT_FACTOR_LABELS_X, BOXPLOT_FACTOR_LABELS_X2 } t_boxplot_factor_labels; typedef struct boxplot_style { int limit_type; /* 0 = multiple of interquartile 1 = fraction of points */ double limit_value; TBOOLEAN outliers; int pointtype; int plotstyle; /* CANDLESTICKS or FINANCEBARS */ double separation; /* of boxplots if there are more than one factors */ t_boxplot_factor_labels labels; /* Which axis to put the tic labels if there are factors */ TBOOLEAN sort_factors; /* Sort factors in alphabetical order? */ } boxplot_style; extern boxplot_style boxplot_opts; #define DEFAULT_BOXPLOT_STYLE { 0, 1.5, TRUE, 6, CANDLESTICKS, 1.0, BOXPLOT_FACTOR_LABELS_AUTO, FALSE } /***********************************************************/ /* Variables defined by gadgets.c needed by other modules. */ /***********************************************************/ /* bounding box position, in terminal coordinates */ typedef struct { int xleft; int xright; int ybot; int ytop; } BoundingBox; /* EAM Feb 2003 - Move all global variables related to key into a */ /* single structure. Eventually this will allow multiple keys. */ typedef enum keytitle_type { NOAUTO_KEYTITLES, FILENAME_KEYTITLES, COLUMNHEAD_KEYTITLES } keytitle_type; typedef struct { TBOOLEAN visible; /* Do we show this key at all? */ t_key_region region; /* if so: where? */ t_key_ext_region margin; /* if exterior: where outside? */ struct position user_pos; /* if user specified position, this is it */ VERT_JUSTIFY vpos; /* otherwise these guide auto-positioning */ JUSTIFY hpos; t_key_sample_positioning just; t_key_stack_direction stack_dir; double swidth; /* 'width' of the linestyle sample line in the key */ double vert_factor; /* user specified vertical spacing multiplier */ double width_fix; /* user specified additional (+/-) width of key titles */ double height_fix; keytitle_type auto_titles; /* auto title curves unless plotted 'with notitle' */ TBOOLEAN front; /* draw key in a second pass after the rest of the graph */ TBOOLEAN reverse; /* key back to front */ TBOOLEAN invert; /* key top to bottom */ TBOOLEAN enhanced; /* enable/disable enhanced text of key titles */ struct lp_style_type box; /* linetype of box around key: */ char title[MAX_LINE_LEN+1]; /* title line for the key as a whole */ char *font; /* Will be used for both key title and plot titles */ struct t_colorspec textcolor; /* Will be used for both key title and plot titles */ BoundingBox bounds; int maxcols; /* maximum no of columns for horizontal keys */ int maxrows; /* maximum no of rows for vertical keys */ } legend_key; extern legend_key keyT; #define DEFAULT_KEYBOX_LP {0, LT_NODRAW, 0, 0, 1.0, PTSZ_DEFAULT, FALSE, DEFAULT_COLORSPEC} #define DEFAULT_KEY_POSITION { graph, graph, graph, 0.9, 0.9, 0. } #define DEFAULT_KEY_PROPS \ { TRUE, \ GPKEY_AUTO_INTERIOR_LRTBC, GPKEY_RMARGIN, \ DEFAULT_KEY_POSITION, \ JUST_TOP, RIGHT, \ GPKEY_RIGHT, GPKEY_VERTICAL, \ 4.0, 1.0, 0.0, 0.0, \ FILENAME_KEYTITLES, \ FALSE, FALSE, FALSE, TRUE, \ DEFAULT_KEYBOX_LP, \ "", \ NULL, {TC_LT, LT_BLACK, 0.0}, \ {0,0,0,0}, 0, 0 } /* * EAM Jan 2006 - Move colorbox structure definition to here from color.h * in order to be able to use struct position */ #define SMCOLOR_BOX_NO 'n' #define SMCOLOR_BOX_DEFAULT 'd' #define SMCOLOR_BOX_USER 'u' typedef struct { char where; /* where SMCOLOR_BOX_NO .. do not draw the colour box SMCOLOR_BOX_DEFAULT .. draw it at default position and size SMCOLOR_BOX_USER .. draw it at the position given by user */ char rotation; /* 'v' or 'h' vertical or horizontal box */ char border; /* if non-null, a border will be drawn around the box (default) */ int border_lt_tag; int layer; /* front or back */ int xoffset; /* To adjust left or right, e.g. for y2tics */ struct position origin; struct position size; BoundingBox bounds; } color_box_struct; extern color_box_struct color_box; extern color_box_struct default_color_box; extern BoundingBox plot_bounds; /* Plot Boundary */ extern BoundingBox canvas; /* Writable area on terminal */ extern BoundingBox *clip_area; /* Current clipping box */ extern float xsize; /* x scale factor for size */ extern float ysize; /* y scale factor for size */ extern float zsize; /* z scale factor for size */ extern float xoffset; /* x origin setting */ extern float yoffset; /* y origin setting */ extern float aspect_ratio; /* 1.0 for square */ extern int aspect_ratio_3D; /* 2 for equal scaling of x and y; 3 for z also */ /* plot border autosizing overrides, in characters (-1: autosize) */ extern t_position lmargin, bmargin, rmargin, tmargin; #define DEFAULT_MARGIN_POSITION {character, character, character, -1, -1, -1} extern FILE *table_outfile; extern TBOOLEAN table_mode; extern struct arrow_def *first_arrow; extern struct text_label *first_label; extern struct linestyle_def *first_linestyle; extern struct linestyle_def *first_perm_linestyle; extern struct arrowstyle_def *first_arrowstyle; #ifdef EAM_OBJECTS extern struct object *first_object; #endif extern text_label title; extern text_label timelabel; #ifndef DEFAULT_TIMESTAMP_FORMAT /* asctime() format */ # define DEFAULT_TIMESTAMP_FORMAT "%a %b %d %H:%M:%S %Y" #endif extern int timelabel_rotate; extern int timelabel_bottom; extern TBOOLEAN polar; #define ZERO 1e-8 /* default for 'zero' set option */ extern double zero; /* zero threshold, not 0! */ extern double pointsize; extern double pointintervalbox; #define SOUTH 1 /* 0th bit */ #define WEST 2 /* 1th bit */ #define NORTH 4 /* 2th bit */ #define EAST 8 /* 3th bit */ #define border_east (draw_border & EAST) #define border_west (draw_border & WEST) #define border_south (draw_border & SOUTH) #define border_north (draw_border & NORTH) #define border_complete ((draw_border & 15) == 15) extern int draw_border; extern int user_border; extern int border_layer; extern struct lp_style_type border_lp; extern const struct lp_style_type background_lp; extern const struct lp_style_type default_border_lp; extern TBOOLEAN clip_lines1; extern TBOOLEAN clip_lines2; extern TBOOLEAN clip_points; #define SAMPLES 100 /* default number of samples for a plot */ extern int samples_1; extern int samples_2; extern double ang2rad; /* 1 or pi/180 */ extern enum PLOT_STYLE data_style; extern enum PLOT_STYLE func_style; extern TBOOLEAN parametric; /* If last plot was a 3d one. */ extern TBOOLEAN is_3d_plot; /* A macro to check whether 2D functionality is allowed in the last plot: either the plot is a 2D plot, or it is a suitably oriented 3D plot (e.g. map). */ #define ALMOST2D \ ( !is_3d_plot || \ ( fabs(fmod(surface_rot_z,90.0))<0.1 \ && fabs(fmod(surface_rot_x,180.0))<0.1 ) ) #ifdef VOLATILE_REFRESH extern int refresh_ok; /* 0 = no; 2 = 2D ok; 3 = 3D ok */ extern int refresh_nplots; #else #define refresh_ok FALSE #endif extern TBOOLEAN volatile_data; /* WINDOWID to be filled by terminals running on X11 (x11, wxt, qt, ...) */ extern int current_x11_windowid; /* Plot layer definitions are collected here. */ /* Someday they might actually be used. */ #define LAYER_BEHIND -1 #define LAYER_BACK 0 #define LAYER_FRONT 1 #define LAYER_PLOTLABELS 99 /* Functions exported by gadgets.c */ /* moved here from util3d: */ void draw_clip_line __PROTO((int, int, int, int)); void draw_clip_arrow __PROTO((int, int, int, int, int)); int clip_line __PROTO((int *, int *, int *, int *)); int clip_point __PROTO((unsigned int, unsigned int)); void clip_put_text __PROTO((unsigned int, unsigned int, char *)); /* moved here from graph3d: */ void clip_move __PROTO((unsigned int x, unsigned int y)); void clip_vector __PROTO((unsigned int x, unsigned int y)); /* Common routines for setting line or text color from t_colorspec */ void apply_pm3dcolor __PROTO((struct t_colorspec *tc, const struct termentry *t)); void reset_textcolor __PROTO((const struct t_colorspec *tc, const struct termentry *t)); extern fill_style_type default_fillstyle; #ifdef EAM_OBJECTS /* Warning: C89 does not like the union initializers */ extern struct object default_rectangle; #define DEFAULT_RECTANGLE_STYLE { NULL, -1, 0, OBJ_RECTANGLE, \ {FS_SOLID, 100, 0, BLACK_COLORSPEC}, \ {0, LT_BACKGROUND, 0, 0, 1.0, 0.0, FALSE, BACKGROUND_COLORSPEC}, \ {.rectangle = {0, {0,0,0,0.,0.,0.}, {0,0,0,0.,0.,0.}, {0,0,0,0.,0.,0.}, {0,0,0,0.,0.,0.}}} } extern struct object default_circle; #define DEFAULT_CIRCLE_STYLE { NULL, -1, 0, OBJ_CIRCLE, \ {FS_SOLID, 100, 0, BLACK_COLORSPEC}, \ {0, LT_BACKGROUND, 0, 0, 1.0, 0.0, FALSE, BACKGROUND_COLORSPEC}, \ {.circle = {1, {0,0,0,0.,0.,0.}, {graph,0,0,0.02,0.,0.}, 0., 360. }} } extern struct object default_ellipse; #define DEFAULT_ELLIPSE_STYLE { NULL, -1, 0, OBJ_ELLIPSE, \ {FS_SOLID, 100, 0, BLACK_COLORSPEC}, \ {0, LT_BACKGROUND, 0, 0, 1.0, 0.0, FALSE, BACKGROUND_COLORSPEC}, \ {.ellipse = {ELLIPSEAXES_XY, {0,0,0,0.,0.,0.}, {graph,graph,0,0.05,0.03,0.}, 0. }} } #define DEFAULT_POLYGON_STYLE { NULL, -1, 0, OBJ_POLYGON, \ {FS_SOLID, 100, 0, BLACK_COLORSPEC}, \ {0, LT_BLACK, 0, 0, 1.0, 0.0, FALSE, BLACK_COLORSPEC}, \ {.polygon = {0, NULL} } } #endif /* filledcurves style options set by 'set style [data|func] filledcurves opts' */ extern filledcurves_opts filledcurves_opts_data; extern filledcurves_opts filledcurves_opts_func; /* Prefer line styles over plain line types */ extern TBOOLEAN prefer_line_styles; extern histogram_style histogram_opts; void default_arrow_style __PROTO((struct arrow_style_type *arrow)); void free_labels __PROTO((struct text_label *tl)); void get_offsets __PROTO((struct text_label *this_label, struct termentry *t, int *htic, int *vtic)); void write_label __PROTO((unsigned int x, unsigned int y, struct text_label *label)); #endif /* GNUPLOT_GADGETS_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/makefile.all����������������������������������������������������������������������0000644�0004711�0000144�00000003211�11655463570�013200� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# makefile.all generated automatically by GNU make # List of core object files except version.$(O) COREOBJS = alloc.$(O) axis.$(O) binary.$(O) bitmap.$(O) breaders.$(O) \ color.$(O) command.$(O) contour.$(O) datafile.$(O) dynarray.$(O) eval.$(O) \ fit.$(O) gadgets.$(O) getcolor.$(O) graph3d.$(O) graphics.$(O) help.$(O) \ hidden3d.$(O) history.$(O) internal.$(O) interpol.$(O) matrix.$(O) \ misc.$(O) mouse.$(O) parse.$(O) plot.$(O) plot2d.$(O) plot3d.$(O) \ pm3d.$(O) readline.$(O) save.$(O) scanner.$(O) set.$(O) show.$(O) \ specfun.$(O) standard.$(O) stats.$(O) stdfn.$(O) tables.$(O) tabulate.$(O) \ term.$(O) time.$(O) unset.$(O) util.$(O) util3d.$(O) variable.$(O) # List of terminal driver sources CORETERM = $(T)aed.trm $(T)ai.trm $(T)aquaterm.trm $(T)be.trm \ $(T)cairo.trm $(T)canvas.trm $(T)cgi.trm $(T)cgm.trm $(T)context.trm \ $(T)corel.trm $(T)debug.trm $(T)djsvga.trm $(T)dumb.trm $(T)dxf.trm \ $(T)dxy.trm $(T)eepic.trm $(T)emf.trm $(T)emxvga.trm $(T)epson.trm \ $(T)estimate.trm $(T)excl.trm $(T)fig.trm $(T)gd.trm $(T)ggi.trm \ $(T)gpic.trm $(T)grass.trm $(T)hp2648.trm $(T)hp26.trm $(T)hp500c.trm \ $(T)hpgl.trm $(T)hpljii.trm $(T)hppj.trm $(T)imagen.trm $(T)kyo.trm \ $(T)latex.trm $(T)linux.trm $(T)lua.trm $(T)mac.trm $(T)metafont.trm \ $(T)metapost.trm $(T)mif.trm $(T)next.trm $(T)openstep.trm $(T)pbm.trm \ $(T)pc.trm $(T)pdf.trm $(T)pm.trm $(T)post.trm $(T)pslatex.trm \ $(T)pstricks.trm $(T)qms.trm $(T)qt.trm $(T)regis.trm $(T)sun.trm \ $(T)svg.trm $(T)t410x.trm $(T)tek.trm $(T)texdraw.trm $(T)tgif.trm \ $(T)tkcanvas.trm $(T)tpic.trm $(T)unixpc.trm $(T)v384.trm $(T)vgagl.trm \ $(T)vws.trm $(T)win.trm $(T)wxt.trm $(T)x11.trm $(T)xlib.trm ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/�����������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�011522� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/smaller.tiff�����������������������������������������������������������������0000644�0004711�0000144�00000000564�06677167143�014075� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������MM�*��� � *�*��� ���*��* � � �����������������������������������������T�������������\������d������l�������(�������R�����������������]���U���U� ��'� ��'��������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/gnuviewController.h����������������������������������������������������������0000644�0004711�0000144�00000000514�06677167140�015455� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� #import <appkit/appkit.h> @interface gnuviewController:Object { id window; id gnuView; id activateButton; id controller; } - window; - windowWillClose:sender; - windowDidBecomeMain:sender; - gnuView; - activatePushed:sender; - deactivate:sender; - GVactivate:sender; - largerPushed:sender; - smallerPushed:sender; @end ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/gnuviewController.m����������������������������������������������������������0000644�0004711�0000144�00000002413�10071042561�015440� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#import "gnuviewController.h" #import "Controller.h" @implementation gnuviewController - window { return window; } - gnuView { return gnuView; } - windowWillClose:sender { [sender setDelegate: nil]; [controller termWillClose:self]; return self; } - windowDidBecomeMain:sender { [controller setKeyTerm:self]; return self; } - activatePushed:sender { if ([sender state] == 1) { [controller setActiveTerm: self]; [sender setTitle:"--- ACTIVE ---"]; } else { [controller setActiveTerm:nil]; [sender setTitle:"Activate"]; } return self; } - deactivate:sender { [activateButton setState:0]; [activateButton setTitle:"Activate"]; return self; } - GVactivate:sender { [activateButton setState:1]; [activateButton setTitle:"--- ACTIVE ---"]; return self; } - largerPushed:sender { NXRect oldFrame; double factor; [[window contentView] getFrame:&oldFrame]; factor = 1.3; [window sizeWindow:oldFrame.size.width*factor:oldFrame.size.height*factor]; [[window contentView] display]; return self; } - smallerPushed:sender { NXRect oldFrame; double factor; [[window contentView] getFrame:&oldFrame]; factor = 1.3; [window sizeWindow:oldFrame.size.width/factor:oldFrame.size.height/factor]; [[window contentView] display]; return self; } @end �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/GnuView.h��������������������������������������������������������������������0000644�0004711�0000144�00000000470�06677167120�013310� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#import <appkit/appkit.h> /* This is the coordinate system defined in next.trm. */ #define NEXT_XMAX 640 #define NEXT_YMAX 480 @interface GnuView:View { char *PSstring; } - drawSelf:(const NXRect *) rects : (int) rectCount; - initFrame: (NXRect *)rects; - executePS:(char *)PStext; - free; @end ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/GnuView.m��������������������������������������������������������������������0000644�0004711�0000144�00000004117�10071042561�013277� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#import "GnuView.h" @implementation GnuView static NXCoord xsize= NEXT_XMAX; static NXCoord ysize= NEXT_YMAX; static int printing; static void setprintsize(); - initFrame: (NXRect *)rects { [super initFrame:rects]; PSstring = NULL; [self display]; return self; } /* This is here to fix NeXT bug # 21973: failure to free D.O. memory */ /* Note: personally I don't think this fixes it. */ - free { if (PSstring) free(PSstring); [super free]; return self; } - executePS:(char *) PStext { if (PSstring) free(PSstring); PSstring = PStext; [window makeKeyAndOrderFront:self]; [self display]; return self; } - drawSelf:(const NXRect *) rects : (int) rectCount { DPSContext d; d = DPSGetCurrentContext(); if (!printing) { /* Clear Screen */ PSsetgray(NX_WHITE); NXRectFill(&bounds); /* scale to gnuplot coords */ [self setDrawSize:xsize:ysize]; } else { setprintsize(); } if (PSstring) DPSWritePostScript(d, PSstring, strlen(PSstring)); DPSFlushContext(d); return self; } - printPSCode: sender { printing = 1; [super printPSCode:sender]; printing = 0; return self; } static void setprintsize() { DPSContext d; NXRect *paperRect; float width, height; id prInfo; float xscale, yscale; d = DPSGetCurrentContext(); prInfo = [NXApp printInfo]; paperRect = (NXRect *) [prInfo paperRect]; width = paperRect->size.width; height = paperRect->size.height; /* Leave margins on paper */ DPSPrintf(d, "grestore\ngrestore\ngrestore\n"); if ([prInfo orientation] == NX_LANDSCAPE) { DPSPrintf(d, "-90 rotate\n"); DPSPrintf(d, "%g 0 translate\n", -1 * paperRect->size.width); DPSPrintf(d, "0 %g translate\n", paperRect->size.height/100); xscale = width/NEXT_XMAX*0.95; yscale = height/NEXT_YMAX*0.9; DPSPrintf(d, "%g %g scale\n", xscale, yscale); } else { xscale = width/NEXT_XMAX*0.95; yscale = height/NEXT_YMAX*0.95; DPSPrintf(d, "%g %g scale\n", xscale, yscale); DPSPrintf(d, "0 %g translate\n", paperRect->size.height/100); } DPSPrintf(d, "gsave\ngsave\n"); DPSFlushContext(d); return; } @end �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/Makefile.postamble�����������������������������������������������������������0000644�0004711�0000144�00000011200�06677167125�015176� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������############################################################################### # NeXT Makefile.postamble Template # Copyright 1993, NeXT Computer, Inc. # # This Makefile is used for configuring the standard app makefiles associated # with ProjectBuilder. # # Use this template to set attributes for a project, sub-project, bundle, or # palette. Each node in the project's tree of sub-projects and bundles # should have it's own Makefile.preamble and Makefile.postamble. Additional # rules (e.g., after_install) that are defined by the developer should be # defined in this file. # ############################################################################### # # Here are the variables exported by the common "app" makefiles that can be # used in any customizations you make to the template below: # # PRODUCT_ROOT - Name of top-level app-wrapper (e.g., Webster.app) # OFILE_DIR - Directory into which .o object files are generated. # (Note that this name is calculated based on the target # architectures specified in Project Builder). # DERIVED_SRC_DIR - Directory used for all other derived files # ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations # # NAME - name of application, bundle, subproject, palette, etc. # LANGUAGE - langage in which the project is written (default "English") # ENGLISH - boolean flag set iff $(LANGUAGE) = "English" # JAPANESE - boolean flag set iff $(LANGUAGE) = "Japanese" # LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project # GLOBAL_RESOURCES - non-localized resources of project # PROJECTVERSION - version of ProjectBuilder that output Makefile # APPICON - application icon file # DOCICONS - dock icon files # ICONSECTIONS - Specifies icon sections when linking executable # # CLASSES - Class implementation files in project. # HFILES - Header files in project. # MFILES - Other Objective-C source files in project. # CFILES - Other C source files in project. # PSWFILES - .psw files in the project # PSWMFILES - .pswm files in the project # SUBPROJECTS - Subprojects of this project # BUNDLES - Bundle subprojects of this project # OTHERSRCS - Other miscellaneous sources of this project # OTHERLINKED - Source files not matching a standard source extention # # LIBS - Libraries to link with when making app target # DEBUG_LIBS - Libraries to link with when making debug target # PROF_LIBS - Libraries to link with when making profile target # OTHERLINKEDOFILES - Other relocatable files to (always) link in. # # APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles # MAKEFILEDIR - Directory in which to find $(MAKEFILE) # MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make) # INSTALLDIR - Directory app will be installed into by 'install' target # Change defaults assumed by the standard app makefiles here. Edit the # following default values as appropriate. (Note that if no Makefile.postamble # exists, these values will have defaults set in common.make). # Add Makefile.preamble, Makefile.postamble, and Makefile.dependencies here if # you would like changes to them to invalidate previous builds. The project # depends on $(MAKEFILES) so that changes to Makefiles will trigger a re-build. #MAKEFILES = Makefile # Optimization flag passed to compiler: #OPTIMIZATION_CFLAG = -O # Flags passed to compiler in normal 'app' compiles: #NORMAL_CFLAGS = -g $(OPTIMIZATION_CFLAG) -Wall # Flags passed to compiler in 'debug' compiles: #DEBUG_CFLAGS = -g -Wall -DDEBUG # Flags passed to compiler in 'profile' compiles #PROFILE_CFLAGS = -g -pg $(OPTIMIZATION_CFLAG) -Wall -DPROFILE # Ownership and permissions of files installed by 'install' target #INSTALL_AS_USER = root # User to chown app to #INSTALL_AS_GROUP = wheel # Group to chgrp app to #INSTALL_PERMISSIONS = # If set, 'install' chmod's executable to this # Options to strip for bundles, apps with bundles, and apps without bundles, # respectively. #RELOCATABLE_STRIP_OPTS = -x -u #DYLD_APP_STRIP_OPTS = -A -n #APP_STRIP_OPTS = #TOOL_STRIP_OPTS = # (Note: APP_STRIP_OPTS and TOOL_STRIP_OPTS default to empty, but # developers doing their own dynamic loading should set this to # $(DYLD_APP_STRIP_OPTS)). ######################################################################### # Put rules to extend the behavior of the standard Makefiles here. Typical # user-defined rules are before_install and after_install (please don't # redefine things like install or app, as they are owned by the top-level # Makefile API), which are rules that get invoked before and after the install # target runs. Such rules should be specified with the '::' syntax rather than # a single colon. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/README.rtf�������������������������������������������������������������������0000644�0004711�0000144�00000002322�06677167134�013230� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;\f2\fmodern Ohlfs;} \paperw13040 \paperh10200 \margl120 \margr120 \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b0\i0\ulnone\fs24\fc0\cf0 Hi.\ \ This directory contains the source code for my cool new NeXTstep\ gnuplot filter. For more details about the usage of the filter,\ please see the GnuTerm distribution.\ \ This document describes how to compile the distribution.\ \ Because the terminal works via NeXTstep distributed objects, the\ source code contains two parts, modifications to the gnuplot \ source distribution and the source for GnuTerm.app itself.\ \ Here's how I recommend building it:\ \ \ \ \b\ul\fs32 Building GnuTerm.app\ \ \b0\ulnone\fs24 Fire up /NextDeveloper/Apps/ProjectBuilder.app\ Open /YourGnuplotSourceDirectory/NeXT/PB.Project from ProjectBuilder's File->Open menu.\ Select your desired fatness from the options panel.\ Click on BUILD.\ \ This will build GnuTerm.app in /YourGnuplotSourceDirectory/NeXT.\ You will probably then want to move GnuTerm.app to /LocalApps or ~/Apps.\ \ \ If you have any suggestions or uncover bugs please address all correspondance to me at robert@amo.mit.edu\ \ Robert Lutwak\ June 29, 1996\ \ } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/Makefile���������������������������������������������������������������������0000644�0004711�0000144�00000001667�06677167123�013227� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Generated by the NeXT Project Builder. # # NOTE: Do NOT change this file -- Project Builder maintains it. # # Put all of your customizations in files called Makefile.preamble # and Makefile.postamble (both optional), and Makefile will include them. # NAME = GnuTerm PROJECTVERSION = 1.1 LANGUAGE = English APPICON = GnuTerm.tiff LOCAL_RESOURCES = GnuTerm.nib gnuview.nib CLASSES = Controller.m GnuView.m gnuviewController.m HFILES = Controller.h GnuView.h gnuviewController.h MFILES = GnuTerm_main.m OTHERSRCS = Makefile.preamble Makefile Makefile.postamble MAKEFILEDIR = /NextDeveloper/Makefiles/app MAKEFILE = app.make INSTALLDIR = $(HOME)/Apps INSTALLFLAGS = -c -s -m 755 SOURCEMODE = 444 ICONSECTIONS = -sectcreate __ICON app GnuTerm.tiff LIBS = -lMedia_s -lNeXT_s DEBUG_LIBS = $(LIBS) PROF_LIBS = $(LIBS) -include Makefile.preamble include $(MAKEFILEDIR)/$(MAKEFILE) -include Makefile.postamble -include Makefile.dependencies �������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/GnuTerm.iconheader�����������������������������������������������������������0000644�0004711�0000144�00000000060�06677167113�015154� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������F GnuTerm.app GnuTerm app F GnuTerm GnuTerm app ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/bigger.tiff������������������������������������������������������������������0000644�0004711�0000144�00000000404�06677167136�013670� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������MM�*���^* � �� �� � � *�� ���������������������������������������������������������U���������������������(������������ ��'� ��'������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/English.lproj/���������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�014240� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/English.lproj/gnuview.nib/���������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�016473� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/English.lproj/gnuview.nib/smaller.tiff���������������������������������������0000644�0004711�0000144�00000000564�06677167376�021056� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������MM�*��� � *�*��� ���*��* � � �����������������������������������������T�������������\������d������l�������(�������R�����������������]���U���U� ��'� ��'��������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/English.lproj/gnuview.nib/data.classes���������������������������������������0000644�0004711�0000144�00000001150�06677167375�021024� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������GnuView = { ACTIONS = { }; OUTLETS = { prInfo; }; SUPERCLASS = View; }; gnuviewController = { ACTIONS = { largerPushed:; GVactivate:; deactivate:; smallerPushed:; windowDidBecomeMain:; windowWillClose:; activatePushed:; }; OUTLETS = { gnuView; window; activateButton; controller; }; SUPERCLASS = Object; }; FirstResponder = { ACTIONS = { }; SUPERCLASS = Object; }; Controller = { ACTIONS = { setKeyTitle:; appDidInit:; printPScodeInKey:; newGnuView:; }; OUTLETS = { NameField; activeTerm; keyTerm; }; SUPERCLASS = Object; }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/English.lproj/gnuview.nib/bigger.tiff����������������������������������������0000644�0004711�0000144�00000000404�06677167375�020646� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������MM�*���^* � �� �? � � *�� ���������������������������������������������������������U���������������������(������������ ��'� ��'������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/English.lproj/gnuview.nib/data.nib�������������������������������������������0000644�0004711�0000144�00000002320�06677167375�020137� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� typedstream@ IBObjectData�Object�@i CustomObject�*@ Controller @@WindowTemplateffff�A iiii***@s@����ViewWindow� Responder�f� ��@ss@Listi[3@]Box�����[1@]� �� ����ff@@sCell*@ssFont%fss Helvetica ���� CustomView���w��w�H�GnuView�P�����������Button�Control��1p��p��i@s� ButtonCell ActionCell--- ACTIVE ---��i:�ss��@f�������� �����NXImages*@bbigger������� �����@bsmaller�������Title����� xc�Z gnuviewController@* File's OwnerƄ� [9@]IBOutletConnector� IBConnector�@@*ƘwindowƘƄdelegateƫgnuViewƕ controllerƕƄ activeTermƲactivateButtonIBControlConnector�ƲƄactivatePushed:ƹƄ largerPushed:ƿƄsmallerPushed:����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/English.lproj/GnuTerm.nib/���������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�016370� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/English.lproj/GnuTerm.nib/data.classes���������������������������������������0000644�0004711�0000144�00000001313�06677167345�020717� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������GnuView = { ACTIONS = { }; OUTLETS = { }; SUPERCLASS = View; }; gnuviewController = { ACTIONS = { activate:; activatePushed:; windowWillClose:; windowDidBecomeMain:; deactivate:; }; OUTLETS = { gnuView; window; activateButton; controller; }; SUPERCLASS = Object; }; FirstResponder = { ACTIONS = { }; SUPERCLASS = Object; }; Controller = { ACTIONS = { setDefaultGTSize:; printPScodeInKey:; miniaturizeAll:; setKeyTitle:; setUseBuffered:; newGnuTerm:; closeAll:; appDidInit:; termWillClose:; }; OUTLETS = { DefaultSize; useKeyButton; useBufferedSwitch; gvList; NameField; activeTerm; keyTerm; }; SUPERCLASS = Object; }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/English.lproj/GnuTerm.nib/data.nib�������������������������������������������0000644�0004711�0000144�00000010065�06677167345�020036� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� typedstream@ IBObjectData�Object�@i CustomObject�*@ Application.@@Box�View� Responder�f�ffff>���>�@ss@Listi[5@] TextField�Control��{:��: ��i@s� TextFieldCell ActionCellCell*@ssGnuTerm gnuplot Terminal ServerFont%fssTimes-BoldItalic���i:�ff�c�:� C,3��,3 ���dby Robert Lutwak Atomic Resonance and Spectroscopy Laboratory Massachusetts Institute of Technology �������"��" ���LPlease send all comments, suggestions, and bug reports to robert@amo.mit.edu Times-Roman��������G��G ��� Version 1.1 Times-Italic ����?*>�@��8���8�[1@]�(���(�����@@s� Helvetica ���� Controller� �{���{[2@]�7�D���D��2���2[3@]FormMatrix�Z-��Z-����@:@iiiiFormCell4000��f@-Width:�ǩ3000�-Height:�Zff@@#::sǩ0��-Field:��Button��s V��V��� ButtonCell Set to Key ���ss��@f���R-8��-8 ���}Helvetica-Narrow0������������Default Window Size���Ԓ�-!�������֩Use Buffered Windows���́�(�NXImages*pNXswitchӁp NXswitchH�@�WindowTemplate�́-�{ iiii***@s@���GnuTerm PreferencesWindowx��瞁% >���InfoPanel`x��땙 MenuTemplate𒅯 *@*@cccGnuTermĒ��mx��mx����[6@]MenuCell֩ڄ ���w݄ڄĒ��j(��j(���� Info Panel...���́���Preferences...���́���j���Menu����submenuAction:́��Ӂp NXmenuArrowWIndows���́��ﱅPage Layout...���́�P��Print...���́�p��Hide���́�h��Quit���́�q��m������w݄Ē������������[7@]New���́�n�� Set Title���́�T��Arrange in Front���́���Miniaturize Window���́�m��Miniaturize All���́�M�͹� Close Window���́�c�� Close All���́�C�͹�������Ԓ�/��/"�����" ���Terminal Name: Times-Bold������"�|����" ���gnuplot output0����!@��p 8��8"���֩OK���́� �Ӂp NXreturnSign�"󙄖 FontManager教޼"瞁/��Set Terminal Name"`x��™ 1("™$"  @* 愄 Preferences File's Owner1 setTitlePanel MainMenu넄 InfoPanel/ Font Manager�[24@]IBControlConnector� IBConnector�@@* hide:@ terminate:IBOutletConnector�Adelegate@performMiniaturize:@ performClose:@arrangeInFront:@runPageLayout:@printPScodeInKey:@1makeKeyAndOrderFront:@(! performClick:F( NameField@! setKeyTitle:@ newGnuTerm:F„ DefaultSize@S@S@˺setDefaultGTSize:@ƺa@ӺaFӄ useKeyButton@޺setUseBuffered:FބuseBufferedSwitch@miniaturizeAll:@ closeAll:/���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/PB.gdbinit�������������������������������������������������������������������0000644�0004711�0000144�00000000166�06677167131�013422� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Generated by the NeXT Project Builder. # # NOTE: Do NOT change this file -- Project Builder maintains it. # view ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/Controller.m�����������������������������������������������������������������0000644�0004711�0000144�00000010677�10071042561�014046� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#import <defaults/defaults.h> #import "Controller.h" #import "gnuviewController.h" #import "GnuView.h" @implementation Controller - (id) activeTerm { return activeTerm; } - appDidInit:sender { id prInfo; NXRect *paperRect; static NXDefaultsVector GnuTermDefaults = { {"Width", "400"}, {"Height", "300"}, {"Backing", "Buffered"}, {NULL} }; activeTerm = keyTerm = nil; myConnection = [NXConnection registerRoot:self withName:"gnuplotServer"]; [myConnection runFromAppKit]; prInfo = [NXApp printInfo]; paperRect = (NXRect *) [prInfo paperRect]; [prInfo setOrientation:NX_LANDSCAPE andAdjust:YES]; [prInfo setHorizCentered:YES]; [prInfo setVertCentered:YES]; /* Get user Preferences */ NXRegisterDefaults("GnuTerm", GnuTermDefaults); [DefaultSize setStringValue:NXGetDefaultValue("GnuTerm","Width") at:0]; [DefaultSize setStringValue:NXGetDefaultValue("GnuTerm","Height") at:1]; if (!strcmp(NXGetDefaultValue("GnuTerm","Backing"), "Buffered")) { backing = NX_BUFFERED; [useBufferedSwitch setState:YES]; } else { backing = NX_RETAINED; [useBufferedSwitch setState:NO]; } gvList = [[List new] initCount:10]; return self; } - newGnuTerm:sender { NXRect frame; if ([gvList indexOf:keyTerm] != NX_NOT_IN_LIST) { [[keyTerm window] getFrame: &frame]; NX_X(&frame) += 24; NX_Y(&frame) -= 24; } else { NX_WIDTH(&frame) = atof(NXGetDefaultValue("GnuTerm","Width")); NX_HEIGHT(&frame) = atof(NXGetDefaultValue("GnuTerm","Height")); NX_X(&frame) = 200; NX_Y(&frame) = 350; } if ([NXApp loadNibSection: "gnuview.nib" owner: self] == nil) { return nil; } // fprintf(stderr,"newGnuTerm: %g x %g\n",NX_WIDTH(&frame),NX_HEIGHT(&frame)); [[activeTerm window] setBackingType:backing]; [[activeTerm window] placeWindowAndDisplay: &frame]; [self setKeyTerm:activeTerm]; [gvList addObject:activeTerm]; ++wcnt; return activeTerm; } - setActiveTerm:(id) newTerm { if (activeTerm != nil) [activeTerm deactivate:self]; activeTerm = newTerm; [activeTerm GVactivate:self]; return self; } - printPScodeInKey:sender { [[keyTerm gnuView] printPSCode:sender]; return self; } - setKeyTerm:newTerm { keyTerm = newTerm; [NameField setStringValue:[[keyTerm window] title]]; [NameField selectText:self]; return self; } - setKeyTitle:sender { [[keyTerm window] setTitle:[NameField stringValue]]; [[NameField window] performClose:self]; return self; } - executePScode:(char *)PSstring termTitle:(char *)title { int i, cnt; id test; char buf[50]; //fprintf(stderr, "Request for window: %s\n", title); if (*title) { /* If the window exists, use it */ cnt = [gvList count]; for (i=0; i < cnt; ++i) { test = [gvList objectAt:i]; if ( !strcmp([[test window] title], title)) { if (test != activeTerm) [self setActiveTerm:test]; break; } } /* O.K., it doesn't exist, what now? */ if (i == cnt) { [self newGnuTerm:self]; [[activeTerm window] setTitle: title]; } } else { if (activeTerm == nil) { [self newGnuTerm:self]; sprintf(buf, "gnuplot %d", wcnt); [[activeTerm window] setTitle: buf]; } } [[activeTerm window] makeKeyAndOrderFront: nil]; [[activeTerm gnuView] executePS:PSstring]; return activeTerm; } - termWillClose:sender { [gvList removeObject:sender]; if (activeTerm == sender) activeTerm =nil; return self; } - setDefaultGTSize:sender { NXRect frame; if (sender == useKeyButton) { fprintf(stderr, "useKey\n"); if ([gvList indexOf:keyTerm] != NX_NOT_IN_LIST) { [[keyTerm window] getFrame: &frame]; [DefaultSize setFloatValue:NX_WIDTH(&frame) at:0]; [DefaultSize setFloatValue:NX_HEIGHT(&frame) at:1]; } } NXWriteDefault("GnuTerm", "Width", [DefaultSize stringValueAt:0]); NXWriteDefault("GnuTerm", "Height", [DefaultSize stringValueAt:1]); fprintf(stderr, "setDefaultGTSize: %s x %s\n", [DefaultSize stringValueAt:0],[DefaultSize stringValueAt:1]); return self; } - setUseBuffered:sender { if ([sender state] == YES) { backing = NX_BUFFERED; NXWriteDefault("GnuTerm", "Backing", "Buffered"); } else { backing = NX_RETAINED; NXWriteDefault("GnuTerm", "Backing", "Retained"); } [[activeTerm window] setBackingType:backing]; return self; } - closeAll:sender { while([gvList count]) [[[gvList objectAt:0] window] performClose:self]; return self; } - miniaturizeAll:sender { int i, cnt; cnt = [gvList count]; for (i=0; i < cnt; ++i) [[[gvList objectAt:i] window] performMiniaturize:self]; return self; } @end �����������������������������������������������������������������gnuplot-4.6.4/src/NeXT/Controller.h�����������������������������������������������������������������0000644�0004711�0000144�00000001123�10071042561�014023� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#import <appkit/appkit.h> @interface Controller:Object { id activeTerm; id keyTerm; id NameField; NXConnection *myConnection; int wcnt; int backing; id gvList; id DefaultSize; /* textfield matrix */ id useKeyButton; id useBufferedSwitch; } - newGnuTerm:sender; - appDidInit:sender; - activeTerm; - setActiveTerm:newView; - setKeyTerm:newTerm; - setKeyTitle:sender; - printPScodeInKey:sender; - executePScode:(char *)PSstring termTitle:(char *)title; - termWillClose:sender; - setDefaultGTSize:sender; - setUseBuffered:sender; - closeAll:sender; - miniaturizeAll:sender; @end ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/PB.project�������������������������������������������������������������������0000644�0004711�0000144�00000001267�06677167133�013455� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������INSTALLDIR = "$(HOME)/Apps"; APPICON = GnuTerm.tiff; GENERATEMAIN = YES; DOCICONFILES = (); FILESTABLE = { OTHER_LIBS = (Media_s, NeXT_s); CLASSES = (Controller.m, GnuView.m, gnuviewController.m); OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble); INTERFACES = (GnuTerm.nib, gnuview.nib); H_FILES = (Controller.h, GnuView.h, gnuviewController.h); IMAGES = (); OTHER_LINKED = (); M_FILES = (GnuTerm_main.m); }; APPCLASS = Application; MAINNIB = GnuTerm; DOCEXTENSIONS = (); PROJECTTYPE = Application; PROJECTVERSION = 1.1; LOCALIZABLE_FILES = { GnuTerm.nib; gnuview.nib; }; PROJECTNAME = GnuTerm; SYSTEMEXTENSIONS = (); LANGUAGE = English; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/GnuTerm_main.m���������������������������������������������������������������0000644�0004711�0000144�00000000501�10071042561�014271� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Generated by the NeXT Project Builder NOTE: Do NOT change this file -- Project Builder maintains it. */ #import <appkit/appkit.h> void main(int argc, char *argv[]) { [Application new]; if ([NXApp loadNibSection:"GnuTerm.nib" owner:NXApp withNames:NO]) [NXApp run]; [NXApp free]; exit(0); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/Makefile.preamble������������������������������������������������������������0000644�0004711�0000144�00000006627�06677167127�015022� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������############################################################################### # NeXT Makefile.preamble Template # Copyright 1993, NeXT Computer, Inc. # # This Makefile is used for configuring the standard app makefiles associated # with ProjectBuilder. # # Use this template to set attributes for a project, sub-project, bundle, or # palette. Each node in the project's tree of sub-projects and bundles # should have it's own Makefile.preamble and Makefile.postamble. # ############################################################################### ## Configure the flags passed to $(CC) here. These flags will also be ## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and ## -L flags here. To change the default flags that get passed to ${CC} ## (e.g. change -O to -O2), see Makefile.postamble. # Flags passed to compiler (in addition to -g, -O, etc) OTHER_CFLAGS = # Flags passed to ld (in addition to -ObjC, etc.) OTHER_LDFLAGS = ## Configure what is linked in at each level here. Libraries are only used in ## the final 'app' linking step. Final 'app' linking is only done via the ## 'app', 'debug', and 'profile' targets when they are invoked for ## the top-level app. # Additional relocatables to be linked in at this level OTHER_OFILES = # Additional libs to link apps against ('app' target) OTHER_LIBS = # Additional libs to link apps against ('debug' target) OTHER_DEBUG_LIBS = # Additional libs to link apps against ('profile' target) OTHER_PROF_LIBS = # More 'app' libraries when $(JAPANESE) = "YES" OTHER_JAPANESE_LIBS = # More 'debug' libraries when $(JAPANESE) = "YES" OTHER_JAPANESE_DEBUG_LIBS = # More 'profile' libs when $(JAPANESE) = "YES" OTHER_JAPANESE_PROF_LIBS = ## Configure how things get built here. Additional dependencies, sourcefiles, ## derived files, and build order should be specified here. # Other dependencies of this project OTHER_PRODUCT_DEPENDS = # Built *before* building subprojects/bundles OTHER_INITIAL_TARGETS = # Other source files maintained by .pre/postamble OTHER_SOURCEFILES = # Additional files to be removed by `make clean' OTHER_GARBAGE = # Precompiled headers to be built before any compilation occurs (e.g., draw.p) PRECOMPS = # Targets to be built before subprojects & bundles OTHER_INITIAL_TARGETS = # A virtual root directory (other than /) to be prepended to the $(INSTALLDIR) # passed from ProjectBuilder. DSTROOT = ## Add more obscure source files here to cause them to be automatically ## processed by the appropriate tool. Note that these files should also be ## added to "Supporting Files" in ProjectBuilder. The desired .o files that ## result from these files should also be added to OTHER_OFILES above so they ## will be linked in. # .msg files that should have msgwrap run on them MSGFILES = # .defs files that should have mig run on them DEFSFILES = # .mig files (no .defs files) that should have mig run on them MIGFILES = ## Add additional Help directories here (add them to the project as "Other ## Resources" in Project Builder) so that they will be compressed into .store ## files and copied into the app wrapper. If the help directories themselves ## need to also be in the app wrapper, then a cp command will need to be added ## in an after_install target. OTHER_HELP_DIRS = # Don't add more rules here unless you want the first one to be the default # target for make! Put all your targets in Makefile.postamble. ���������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/NeXT/GnuTerm.tiff�����������������������������������������������������������������0000644�0004711�0000144�00000022302�06677167115�014010� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������MM�*��$�������������������������������������������������������������������������������������������������������������������������������������������������������UUU������UUU������UUU������UUU������UUU���������UUU������������������UUUUUUUUU���������������������UUU���������UUU���������UUU���������UUU���������UUU������������UUU���UUU���UUU���UUU���UUU���UUU���UUU���UUUUUU���UUU���UUUUUU���UUU���UUUUUU���UUU���UUUUUU���UUU������UUUUUU���UUU���UUUUUU���UUU������UUU���������������������UUU������UUU������UUU���UUU������UUU������UUU���UUU������UUU������������������UUU������UUU������UUU���UUU���������UUU������UUU���UUU������������UUU���UUU���UUU������������������������UUU���UUU���UUUUUU���UUU������������������������UUU���������UUU������UUU������UUU���������UUU������UUU������������UUU���������������������������UUU������������������UUU������������UUU���������������������������������UUU���������UUU������������UUU������������UUU������UUU���������������UUUUUU���UUUUUUUUU���UUUUUUUUU���UUU���UUUUUUUUU���UUUUUU������������������������������UUU������������������UUU������������������UUU������������������UUU������UUU������UUU������UUU������UUU������������������������UUU���������������������������������������������������������������������������������������������������������������������������������������������UUU����UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU� ������0�������0��������$����������������������������������$�������$������$�������(�������R���������������� ��'� ��'������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/genopt.com������������������������������������������������������������������������0000644�0004711�0000144�00000000605�06724270267�012731� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������$! generates options file for vms link $! p1 is filename and mode to open file (filename/write or filename/append) $! p2 is comma-separated list of files $ $ open file 'p1' $ element=0 $loop: $ x=f$element(element,",",'p2') $ if x .eqs. "," then goto out $ y=f$edit(x,"COLLAPSE") ! lose spaces $ if y .nes. "" then write file y $ element=element+1 $ goto loop $ $out: $ close file $ exit ���������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/interpol.h������������������������������������������������������������������������0000644�0004711�0000144�00000004103�10037021056�012715� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: interpol.h,v 1.7 2004/04/13 17:23:58 broeker Exp $ */ /* GNUPLOT - interpol.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_INTERPOL_H # define GNUPLOT_INTERPOL_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "graphics.h" /* Type definitions */ /* Variables of interpol.c needed by other modules: */ /* Prototypes of functions exported by interpol.c */ void gen_interp __PROTO((struct curve_points *plot)); void gen_interp_frequency __PROTO((struct curve_points *plot)); void sort_points __PROTO((struct curve_points *plot)); void cp_implode __PROTO((struct curve_points *cp)); #endif /* GNUPLOT_INTERPOL_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/plot.h����������������������������������������������������������������������������0000644�0004711�0000144�00000005157�11722776214�012070� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: plot.h,v 1.46.2.4 2012/02/25 12:02:07 juhaszp Exp $ */ /* GNUPLOT - plot.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_PLOT_H # define GNUPLOT_PLOT_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "gp_types.h" #ifdef USE_MOUSE # include "mouse.h" #endif /* Type definitions */ /* Variables of plot.c needed by other modules: */ extern TBOOLEAN interactive; extern TBOOLEAN noinputfiles; extern TBOOLEAN persist_cl; extern const char *user_shell; #ifdef OS2 extern TBOOLEAN CallFromRexx; #endif /* Prototypes of functions exported by plot.c */ #if defined(__GNUC__) void bail_to_command_line __PROTO((void)) __attribute__((noreturn)); #else void bail_to_command_line __PROTO((void)); #endif void interrupt_setup __PROTO((void)); void gp_expand_tilde __PROTO((char **)); void get_user_env __PROTO((void)); #ifdef LINUXVGA void drop_privilege __PROTO((void)); void take_privilege __PROTO((void)); #endif /* LINUXVGA */ #ifdef OS2 int ExecuteMacro __PROTO((char *, int)); #endif void restrict_popen __PROTO((void)); #ifdef GNUPLOT_HISTORY void cancel_history __PROTO((void)); #else #define cancel_history() {} #endif #endif /* GNUPLOT_PLOT_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/color.c���������������������������������������������������������������������������0000644�0004711�0000144�00000054540�12117426461�012216� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: color.c,v 1.98.2.3 2013/03/10 18:23:59 broeker Exp $"); } #endif /* GNUPLOT - color.c */ /*[ * * Petr Mikulik, since December 1998 * Copyright: open source as much as possible * * What is here: * - Global variables declared in .h are initialized here * - Palette routines * - Colour box drawing * ]*/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "color.h" #include "getcolor.h" #include "axis.h" #include "gadgets.h" #include "graphics.h" #include "plot.h" #include "graph3d.h" #include "pm3d.h" #include "graphics.h" #include "term_api.h" #include "util3d.h" #include "alloc.h" /* COLOUR MODES - GLOBAL VARIABLES */ t_sm_palette sm_palette; /* initialized in init_color() */ /* Copy of palette previously in use. * Exported so that change_term() can invalidate contents * FIXME: better naming */ static t_sm_palette prev_palette = { -1, -1, -1, -1, -1, -1, -1, -1, (rgb_color *) 0, -1 }; #ifdef EXTENDED_COLOR_SPECS int supply_extended_color_specs = 0; #endif /* Internal prototype declarations: */ static void draw_inside_color_smooth_box_postscript __PROTO((FILE * out)); static void draw_inside_color_smooth_box_bitmap __PROTO((FILE * out)); void cbtick_callback __PROTO((AXIS_INDEX axis, double place, char *text, struct lp_style_type grid, struct ticmark *userlabels)); /* ******************************************************************* ROUTINES */ void init_color() { /* initialize global palette */ sm_palette.colorFormulae = 37; /* const */ sm_palette.formulaR = 7; sm_palette.formulaG = 5; sm_palette.formulaB = 15; sm_palette.positive = SMPAL_POSITIVE; sm_palette.use_maxcolors = 0; sm_palette.colors = 0; sm_palette.color = NULL; sm_palette.ps_allcF = 0; sm_palette.gradient_num = 0; sm_palette.gradient = NULL; sm_palette.cmodel = C_MODEL_RGB; sm_palette.Afunc.at = sm_palette.Bfunc.at = sm_palette.Cfunc.at = NULL; sm_palette.gamma = 1.5; /* initialisation of smooth color box */ color_box = default_color_box; } /* Make the colour palette. Return 0 on success Put number of allocated colours into sm_palette.colors */ int make_palette() { int i; double gray; if (!term->make_palette) { return 1; } /* ask for suitable number of colours in the palette */ i = term->make_palette(NULL); sm_palette.colors = i; if (i == 0) { /* terminal with its own mapping (PostScript, for instance) It will not change palette passed below, but non-NULL has to be passed there to create the header or force its initialization */ if (memcmp(&prev_palette, &sm_palette, sizeof(t_sm_palette))) { term->make_palette(&sm_palette); prev_palette = sm_palette; FPRINTF((stderr,"make_palette: calling term->make_palette for term with ncolors == 0\n")); } else FPRINTF((stderr,"make_palette: skipping duplicate palette for term with ncolors == 0\n")); return 0; } /* set the number of colours to be used (allocated) */ if (sm_palette.use_maxcolors > 0) { if (sm_palette.colorMode == SMPAL_COLOR_MODE_GRADIENT) sm_palette.colors = i; /* EAM Sep 2010 - could this be a constant? */ else if (i > sm_palette.use_maxcolors) sm_palette.colors = sm_palette.use_maxcolors; } if (prev_palette.colorFormulae < 0 || sm_palette.colorFormulae != prev_palette.colorFormulae || sm_palette.colorMode != prev_palette.colorMode || sm_palette.formulaR != prev_palette.formulaR || sm_palette.formulaG != prev_palette.formulaG || sm_palette.formulaB != prev_palette.formulaB || sm_palette.positive != prev_palette.positive || sm_palette.colors != prev_palette.colors) { /* print the message only if colors have changed */ if (interactive) fprintf(stderr, "smooth palette in %s: using %i of %i available color positions\n", term->name, sm_palette.colors, i); } prev_palette = sm_palette; if (sm_palette.color != NULL) { free(sm_palette.color); sm_palette.color = NULL; } sm_palette.color = gp_alloc( sm_palette.colors * sizeof(rgb_color), "pm3d palette color"); /* fill sm_palette.color[] */ for (i = 0; i < sm_palette.colors; i++) { gray = (double) i / (sm_palette.colors - 1); /* rescale to [0;1] */ rgb1_from_gray( gray, &(sm_palette.color[i]) ); } /* let the terminal make the palette from the supplied RGB triplets */ term->make_palette(&sm_palette); return 0; } /* * Force a mismatch between the current palette and whatever is sent next, * so that the new one will always be loaded */ void invalidate_palette() { prev_palette.colors = -1; } /* Set the colour on the terminal Currently, each terminal takes care of remembering the current colour, so there is not much to do here. */ void set_color(double gray) { t_colorspec color; if (!(term->set_color)) return; color.type = TC_FRAC; color.value = gray; color.lt = 0; term->set_color(&color); } void set_rgbcolor(int rgblt) { t_colorspec color; if (!(term->set_color)) return; color.type = TC_RGB; color.lt = rgblt; color.value = 0; term->set_color(&color); } void ifilled_quadrangle(gpiPoint* icorners) { if (default_fillstyle.fillstyle == FS_EMPTY) icorners->style = FS_OPAQUE; else icorners->style = style_from_fill(&default_fillstyle); term->filled_polygon(4, icorners); if (pm3d.hidden3d_tag) { int i; /* It should be sufficient to set only the color, but for some */ /* reason this causes the svg terminal to lose the fill type. */ term_apply_lp_properties(&pm3d_border_lp); term->move(icorners[0].x, icorners[0].y); for (i = 3; i >= 0; i--) { term->vector(icorners[i].x, icorners[i].y); } } } /* The routine above for 4 points explicitly. * This is the only routine which supportes extended * color specs currently. */ #ifdef EXTENDED_COLOR_SPECS void filled_quadrangle(gpdPoint * corners, gpiPoint * icorners) #else void filled_quadrangle(gpdPoint * corners) #endif { int i; double x, y; #ifndef EXTENDED_COLOR_SPECS gpiPoint icorners[4]; #endif for (i = 0; i < 4; i++) { map3d_xy_double(corners[i].x, corners[i].y, corners[i].z, &x, &y); icorners[i].x = x; icorners[i].y = y; } ifilled_quadrangle(icorners); } /* Makes mapping from real 3D coordinates, passed as coords array, to 2D terminal coordinates, then draws filled polygon */ void filled_polygon_3dcoords(int points, struct coordinate GPHUGE * coords) { int i; double x, y; gpiPoint *icorners; icorners = gp_alloc(points * sizeof(gpiPoint), "filled_polygon3d corners"); for (i = 0; i < points; i++) { map3d_xy_double(coords[i].x, coords[i].y, coords[i].z, &x, &y); icorners[i].x = x; icorners[i].y = y; } #ifdef EXTENDED_COLOR_SPECS if (supply_extended_color_specs) { icorners[0].spec.gray = -1; /* force solid color */ } #endif if (default_fillstyle.fillstyle == FS_EMPTY) icorners->style = FS_OPAQUE; else icorners->style = style_from_fill(&default_fillstyle); term->filled_polygon(points, icorners); free(icorners); } /* Makes mapping from real 3D coordinates, passed as coords array, but at z coordinate fixed (base_z, for instance) to 2D terminal coordinates, then draws filled polygon */ void filled_polygon_3dcoords_zfixed(int points, struct coordinate GPHUGE * coords, double z) { int i; double x, y; gpiPoint *icorners; icorners = gp_alloc(points * sizeof(gpiPoint), "filled_polygon_zfix corners"); for (i = 0; i < points; i++) { map3d_xy_double(coords[i].x, coords[i].y, z, &x, &y); icorners[i].x = x; icorners[i].y = y; } #ifdef EXTENDED_COLOR_SPECS if (supply_extended_color_specs) { icorners[0].spec.gray = -1; /* force solid color */ } #endif if (default_fillstyle.fillstyle == FS_EMPTY) icorners->style = FS_OPAQUE; else icorners->style = style_from_fill(&default_fillstyle); term->filled_polygon(points, icorners); free(icorners); } /* Draw colour smooth box Firstly two helper routines for plotting inside of the box for postscript and for other terminals, finally the main routine */ /* plot the colour smooth box for from terminal's integer coordinates This routine is for postscript files --- actually, it writes a small PS routine. */ static void draw_inside_color_smooth_box_postscript(FILE * out) { int scale_x = (color_box.bounds.xright - color_box.bounds.xleft), scale_y = (color_box.bounds.ytop - color_box.bounds.ybot); fputs("stroke gsave\t%% draw gray scale smooth box\n" "maxcolors 0 gt {/imax maxcolors def} {/imax 1024 def} ifelse\n", out); /* nb. of discrete steps (counted in the loop) */ fprintf(out, "%i %i translate %i %i scale 0 setlinewidth\n", color_box.bounds.xleft, color_box.bounds.ybot, scale_x, scale_y); /* define left bottom corner and scale of the box so that all coordinates of the box are from [0,0] up to [1,1]. Further, this normalization makes it possible to pass y from [0,1] as parameter to setgray */ fprintf(out, "/ystep 1 imax div def /y0 0 def /ii 0 def\n"); /* local variables; y-step, current y position and counter ii; */ if (sm_palette.positive == SMPAL_NEGATIVE) /* inverted gray for negative figure */ fputs("{ 0.99999 y0 sub g ", out); /* 1 > x > 1-1.0/1024 */ else fputs("{ y0 g ", out); if (color_box.rotation == 'v') fputs("0 y0 N 1 0 V 0 ystep V -1 0 f\n", out); else fputs("y0 0 N 0 1 V ystep 0 V 0 -1 f\n", out); fputs("/y0 y0 ystep add def /ii ii 1 add def\n" "ii imax ge {exit} if } loop\n" "grestore 0 setgray\n", out); } /* plot a colour smooth box bounded by the terminal's integer coordinates [x_from,y_from] to [x_to,y_to]. This routine is for non-postscript files, as it does an explicit loop over all thin rectangles */ static void draw_inside_color_smooth_box_bitmap(FILE * out) { int steps = 128; /* I think that nobody can distinguish more colours drawn in the palette */ int i, j, xy, xy2, xy_from, xy_to; int jmin = 0; double xy_step, gray, range; gpiPoint corners[4]; (void) out; /* to avoid "unused parameter" warning */ if (color_box.rotation == 'v') { corners[0].x = corners[3].x = color_box.bounds.xleft; corners[1].x = corners[2].x = color_box.bounds.xright; xy_from = color_box.bounds.ybot; xy_to = color_box.bounds.ytop; xy_step = (color_box.bounds.ytop - color_box.bounds.ybot) / (double)steps; } else { corners[0].y = corners[1].y = color_box.bounds.ybot; corners[2].y = corners[3].y = color_box.bounds.ytop; xy_from = color_box.bounds.xleft; xy_to = color_box.bounds.xright; xy_step = (color_box.bounds.xright - color_box.bounds.xleft) / (double)steps; } range = (xy_to - xy_from); for (i = 0, xy2 = xy_from; i < steps; i++) { /* Start from one pixel beyond the previous box */ xy = xy2; xy2 = xy_from + (int) (xy_step * (i + 1)); /* Set the colour for the next range increment */ /* FIXME - The "1 +" seems wrong, yet it improves the placement in gd */ gray = (double)(1 + xy - xy_from) / range; if (sm_palette.positive == SMPAL_NEGATIVE) gray = 1 - gray; set_color(gray); /* If this is a defined palette, make sure that the range increment */ /* does not straddle a palette segment boundary. If it does, split */ /* it into two parts. */ if (sm_palette.colorMode == SMPAL_COLOR_MODE_GRADIENT) for (j=jmin; j<sm_palette.gradient_num; j++) { int boundary = xy_from + (int)(sm_palette.gradient[j].pos * range); if (xy >= boundary) { jmin = j; } else { if (xy2 > boundary) { xy2 = boundary; i--; break; } } if (xy2 < boundary) break; } if (color_box.rotation == 'v') { corners[0].y = corners[1].y = xy; corners[2].y = corners[3].y = GPMIN(xy_to,xy2+1); } else { corners[0].x = corners[3].x = xy; corners[1].x = corners[2].x = GPMIN(xy_to,xy2+1); } #ifdef EXTENDED_COLOR_SPECS if (supply_extended_color_specs) corners[0].spec.gray = -1; /* force solid color */ #endif /* print the rectangle with the given colour */ if (default_fillstyle.fillstyle == FS_EMPTY) corners->style = FS_OPAQUE; else corners->style = style_from_fill(&default_fillstyle); term->filled_polygon(4, corners); } } /* Notice HBB 20010720: would be static, but HP-UX gcc bug forbids * this, for now */ void cbtick_callback( AXIS_INDEX axis, double place, char *text, struct lp_style_type grid, /* linetype or -2 for no grid */ struct ticmark *userlabels) { int len = (text ? CB_AXIS.ticscale : CB_AXIS.miniticscale) * (CB_AXIS.tic_in ? -1 : 1) * (term->h_tic); double cb_place = (place - CB_AXIS.min) / (CB_AXIS.max - CB_AXIS.min); /* relative z position along the colorbox axis */ unsigned int x1, y1, x2, y2; /* calculate tic position */ if (color_box.rotation == 'h') { x1 = x2 = color_box.bounds.xleft + cb_place * (color_box.bounds.xright - color_box.bounds.xleft); y1 = color_box.bounds.ybot; y2 = color_box.bounds.ybot - len; } else { x1 = color_box.bounds.xright; x2 = color_box.bounds.xright + len; y1 = y2 = color_box.bounds.ybot + cb_place * (color_box.bounds.ytop - color_box.bounds.ybot); } /* draw grid line */ if (grid.l_type > LT_NODRAW) { term_apply_lp_properties(&grid); /* grid linetype */ if (color_box.rotation == 'h') { (*term->move) (x1, color_box.bounds.ybot); (*term->vector) (x1, color_box.bounds.ytop); } else { (*term->move) (color_box.bounds.xleft, y1); (*term->vector) (color_box.bounds.xright, y1); } term_apply_lp_properties(&border_lp); /* border linetype */ } /* draw tic */ (*term->move) (x1, y1); (*term->vector) (x2, y2); /* draw label */ if (text) { int just; int offsetx, offsety; /* Skip label if we've already written a user-specified one here */ # define MINIMUM_SEPARATION 0.001 while (userlabels) { if (fabs((place - userlabels->position) / (CB_AXIS.max - CB_AXIS.min)) <= MINIMUM_SEPARATION) { text = NULL; break; } userlabels = userlabels->next; } # undef MINIMUM_SEPARATION /* get offset */ map3d_position_r(&(axis_array[axis].ticdef.offset), &offsetx, &offsety, "cbtics"); /* User-specified different color for the tics text */ if (axis_array[axis].ticdef.textcolor.type != TC_DEFAULT) apply_pm3dcolor(&(axis_array[axis].ticdef.textcolor), term); if (color_box.rotation == 'h') { int y3 = color_box.bounds.ybot - (term->v_char); int hrotate = 0; if (axis_array[axis].tic_rotate && (*term->text_angle)(axis_array[axis].tic_rotate)) hrotate = axis_array[axis].tic_rotate; if (len > 0) y3 -= len; /* add outer tics len */ if (y3<0) y3 = 0; just = hrotate ? LEFT : CENTRE; if (axis_array[axis].manual_justify) just = axis_array[axis].label.pos; write_multiline(x2+offsetx, y3+offsety, text, just, JUST_CENTRE, hrotate, axis_array[axis].ticdef.font); if (hrotate) (*term->text_angle)(0); } else { unsigned int x3 = color_box.bounds.xright + (term->h_char); if (len > 0) x3 += len; /* add outer tics len */ just = LEFT; if (axis_array[axis].manual_justify) just = axis_array[axis].label.pos; write_multiline(x3+offsetx, y2+offsety, text, just, JUST_CENTRE, 0.0, axis_array[axis].ticdef.font); } term_apply_lp_properties(&border_lp); /* border linetype */ } /* draw tic on the mirror side */ if (CB_AXIS.ticmode & TICS_MIRROR) { if (color_box.rotation == 'h') { y1 = color_box.bounds.ytop; y2 = color_box.bounds.ytop + len; } else { x1 = color_box.bounds.xleft; x2 = color_box.bounds.xleft - len; } (*term->move) (x1, y1); (*term->vector) (x2, y2); } } /* Finally the main colour smooth box drawing routine */ void draw_color_smooth_box(int plot_mode) { double tmp; FILE *out = gppsfile; /* either gpoutfile or PSLATEX_auxfile */ if (color_box.where == SMCOLOR_BOX_NO) return; if (!term->filled_polygon) return; /* firstly, choose some good position of the color box user's position like that (?): else { x_from = color_box.xlow; x_to = color_box.xhigh; } */ if (color_box.where == SMCOLOR_BOX_USER) { if (!is_3d_plot) { double xtemp, ytemp; map_position(&color_box.origin, &color_box.bounds.xleft, &color_box.bounds.ybot, "cbox"); map_position_r(&color_box.size, &xtemp, &ytemp, "cbox"); color_box.bounds.xright = xtemp; color_box.bounds.ytop = ytemp; } else if (splot_map && is_3d_plot) { /* In map view mode we allow any coordinate system for placement */ double xtemp, ytemp; map3d_position_double(&color_box.origin, &xtemp, &ytemp, "cbox"); color_box.bounds.xleft = xtemp; color_box.bounds.ybot = ytemp; map3d_position_r(&color_box.size, &color_box.bounds.xright, &color_box.bounds.ytop, "cbox"); } else { /* But in full 3D mode we only allow screen coordinates */ color_box.bounds.xleft = color_box.origin.x * (term->xmax) + 0.5; color_box.bounds.ybot = color_box.origin.y * (term->ymax) + 0.5; color_box.bounds.xright = color_box.size.x * (term->xmax-1) + 0.5; color_box.bounds.ytop = color_box.size.y * (term->ymax-1) + 0.5; } color_box.bounds.xright += color_box.bounds.xleft; color_box.bounds.ytop += color_box.bounds.ybot; } else { /* color_box.where == SMCOLOR_BOX_DEFAULT */ if (plot_mode == MODE_SPLOT && !splot_map) { /* HBB 20031215: new code. Constants fixed to what the result * of the old code in default view (set view 60,30,1,1) * happened to be. Somebody fix them if they're not right! */ color_box.bounds.xleft = xmiddle + 0.709 * xscaler; color_box.bounds.xright = xmiddle + 0.778 * xscaler; color_box.bounds.ybot = ymiddle - 0.147 * yscaler; color_box.bounds.ytop = ymiddle + 0.497 * yscaler; } else if (is_3d_plot) { /* MWS 09-Dec-05, make color box full size for splot maps. */ double dx = (X_AXIS.max - X_AXIS.min); map3d_xy(X_AXIS.max + dx * 0.025, Y_AXIS.min, base_z, &color_box.bounds.xleft, &color_box.bounds.ybot); map3d_xy(X_AXIS.max + dx * 0.075, Y_AXIS.max, ceiling_z, &color_box.bounds.xright, &color_box.bounds.ytop); } else { /* 2D plot */ struct position default_origin = {graph,graph,graph, 1.025, 0, 0}; struct position default_size = {graph,graph,graph, 0.05, 1.0, 0}; double xtemp, ytemp; map_position(&default_origin, &color_box.bounds.xleft, &color_box.bounds.ybot, "cbox"); color_box.bounds.xleft += color_box.xoffset; map_position_r(&default_size, &xtemp, &ytemp, "cbox"); color_box.bounds.xright = xtemp + color_box.bounds.xleft; color_box.bounds.ytop = ytemp + color_box.bounds.ybot; } /* now corrections for outer tics */ if (color_box.rotation == 'v') { int cblen = (CB_AXIS.tic_in ? -1 : 1) * CB_AXIS.ticscale * (term->h_tic); /* positive for outer tics */ int ylen = (Y_AXIS.tic_in ? -1 : 1) * Y_AXIS.ticscale * (term->h_tic); /* positive for outer tics */ if ((cblen > 0) && (CB_AXIS.ticmode & TICS_MIRROR)) { color_box.bounds.xleft += cblen; color_box.bounds.xright += cblen; } if ((ylen > 0) && (axis_array[FIRST_Y_AXIS].ticmode & TICS_MIRROR)) { color_box.bounds.xleft += ylen; color_box.bounds.xright += ylen; } } } if (color_box.bounds.ybot > color_box.bounds.ytop) { /* switch them */ tmp = color_box.bounds.ytop; color_box.bounds.ytop = color_box.bounds.ybot; color_box.bounds.ybot = tmp; } /* Optimized version of the smooth colour box in postscript. Advantage: only few lines of code is written into the output file. */ if ((term->flags & TERM_IS_POSTSCRIPT) != 0) draw_inside_color_smooth_box_postscript(out); else draw_inside_color_smooth_box_bitmap(out); if (color_box.border) { /* now make boundary around the colour box */ if (color_box.border_lt_tag >= 0) { /* user specified line type */ struct lp_style_type lp = border_lp; lp_use_properties(&lp, color_box.border_lt_tag); term_apply_lp_properties(&lp); } else { /* black solid colour should be chosen, so it's border linetype */ term_apply_lp_properties(&border_lp); } newpath(); (term->move) (color_box.bounds.xleft, color_box.bounds.ybot); (term->vector) (color_box.bounds.xright, color_box.bounds.ybot); (term->vector) (color_box.bounds.xright, color_box.bounds.ytop); (term->vector) (color_box.bounds.xleft, color_box.bounds.ytop); (term->vector) (color_box.bounds.xleft, color_box.bounds.ybot); closepath(); /* Set line properties to some value, this also draws lines in postscript terminals. */ term_apply_lp_properties(&border_lp); } /* draw tics */ if (axis_array[COLOR_AXIS].ticmode) { term_apply_lp_properties(&border_lp); /* border linetype */ gen_tics(COLOR_AXIS, cbtick_callback ); } /* write the colour box label */ if (CB_AXIS.label.text) { int x, y; apply_pm3dcolor(&(CB_AXIS.label.textcolor),term); if (color_box.rotation == 'h') { int len = CB_AXIS.ticscale * (CB_AXIS.tic_in ? 1 : -1) * (term->v_tic); map3d_position_r(&(CB_AXIS.label.offset), &x, &y, "smooth_box"); x += (color_box.bounds.xleft + color_box.bounds.xright) / 2; #define DEFAULT_Y_DISTANCE 1.0 y += color_box.bounds.ybot + (- DEFAULT_Y_DISTANCE - 1.7) * term->v_char; #undef DEFAULT_Y_DISTANCE if (len < 0) y += len; if (x<0) x = 0; if (y<0) y = 0; write_multiline(x, y, CB_AXIS.label.text, CENTRE, JUST_CENTRE, 0, CB_AXIS.label.font); } else { int len = CB_AXIS.ticscale * (CB_AXIS.tic_in ? -1 : 1) * (term->h_tic); /* calculate max length of cb-tics labels */ widest_tic_strlen = 0; if (CB_AXIS.ticmode & TICS_ON_BORDER) { widest_tic_strlen = 0; /* reset the global variable */ gen_tics(COLOR_AXIS, /* 0, */ widest_tic_callback); } map3d_position_r(&(CB_AXIS.label.offset), &x, &y, "smooth_box"); #define DEFAULT_X_DISTANCE 0.0 x += color_box.bounds.xright + (widest_tic_strlen + DEFAULT_X_DISTANCE + 1.5) * term->h_char; #undef DEFAULT_X_DISTANCE if (len > 0) x += len; y += (color_box.bounds.ybot + color_box.bounds.ytop) / 2; if (x<0) x = 0; if (y<0) y = 0; if ((*term->text_angle)(CB_AXIS.label.rotate)) { write_multiline(x, y, CB_AXIS.label.text, CENTRE, JUST_TOP, CB_AXIS.label.rotate, CB_AXIS.label.font); (*term->text_angle)(0); } else { write_multiline(x, y, CB_AXIS.label.text, LEFT, JUST_TOP, 0, CB_AXIS.label.font); } } reset_textcolor(&(CB_AXIS.label.textcolor),term); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/�������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�012441� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/GnuView.h����������������������������������������������������������������0000644�0004711�0000144�00000000367�06736403574�014236� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#import <AppKit/AppKit.h> #define NEXT_XMAX 7200 #define NEXT_YMAX 5040 @interface GnuView:NSView { NSString *PSstring; } - (void) drawRect:(NSRect)rect; - initWithFrame:(NSRect)rects; - executePS:(NSString *) PStext; - (void) dealloc; @end �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/GnuView.m����������������������������������������������������������������0000644�0004711�0000144�00000004113�10071042561�014212� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#import "GnuView.h" @implementation GnuView static float xsize= NEXT_XMAX/10+50; static float ysize= NEXT_YMAX/10+50; static int printing; static void setprintsize(); - initWithFrame:(NSRect)rects { [super initWithFrame:rects]; PSstring = @""; [self display]; return self; } /* This is here to fix NeXT bug # 21973: failure to free D.O. memory */ /* Note: personally I don't think this fixes it. */ - (void)dealloc { [super dealloc]; [PSstring release]; } - executePS:(NSString *) PStext { if (PSstring) [PSstring release]; PSstring = PStext; [PSstring retain]; [[self window] makeKeyAndOrderFront:self]; [self display]; return self; } - (void) drawRect:(NSRect) rect { DPSContext d; d = DPSGetCurrentContext(); if (!printing) { /* Clear Screen */ PSsetgray(NSWhite); NSRectFill([self bounds]); [self setBoundsSize:NSMakeSize(xsize, ysize)]; /* scale to gnuplot coords */ } else { setprintsize(); } DPSWritePostScript(d, [PSstring cString], [PSstring length]); DPSFlushContext(d); } - (void)print:(id)sender { printing = 1; [super print:sender]; printing = 0; } static void setprintsize() { DPSContext d; NSSize paperSize; id prInfo; d = DPSGetCurrentContext(); #warning PrintingConversion: The current PrintInfo object now depends on context. '[NSPrintInfo sharedPrintInfo]' used to be '[NSApp printInfo]'. This might want to be [[NSPrintOperation currentOperation] printInfo] or possibly [[PageLayout new] printInfo]. prInfo = [NSPrintInfo sharedPrintInfo]; paperSize = [prInfo paperSize]; DPSPrintf(d, "grestore\ngrestore\ngrestore\n"); if ([prInfo orientation] == NSLandscapeOrientation) { DPSPrintf(d, "-90 rotate\n"); DPSPrintf(d, "%g 0 translate\n", -1.0 * paperSize.width); DPSPrintf(d, "0 %g translate\n", paperSize.height/20); } else { DPSPrintf(d, "%g %g scale\n", paperSize.width/paperSize.height, paperSize.height/paperSize.width); } DPSPrintf(d, "gsave\ngsave\n"); DPSFlushContext(d); return; } @end �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/Makefile.postamble�������������������������������������������������������0000644�0004711�0000144�00000011200�06736403577�016115� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������############################################################################### # NeXT Makefile.postamble Template # Copyright 1993, NeXT Computer, Inc. # # This Makefile is used for configuring the standard app makefiles associated # with ProjectBuilder. # # Use this template to set attributes for a project, sub-project, bundle, or # palette. Each node in the project's tree of sub-projects and bundles # should have it's own Makefile.preamble and Makefile.postamble. Additional # rules (e.g., after_install) that are defined by the developer should be # defined in this file. # ############################################################################### # # Here are the variables exported by the common "app" makefiles that can be # used in any customizations you make to the template below: # # PRODUCT_ROOT - Name of top-level app-wrapper (e.g., Webster.app) # OFILE_DIR - Directory into which .o object files are generated. # (Note that this name is calculated based on the target # architectures specified in Project Builder). # DERIVED_SRC_DIR - Directory used for all other derived files # ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations # # NAME - name of application, bundle, subproject, palette, etc. # LANGUAGE - langage in which the project is written (default "English") # ENGLISH - boolean flag set iff $(LANGUAGE) = "English" # JAPANESE - boolean flag set iff $(LANGUAGE) = "Japanese" # LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project # GLOBAL_RESOURCES - non-localized resources of project # PROJECTVERSION - version of ProjectBuilder that output Makefile # APPICON - application icon file # DOCICONS - dock icon files # ICONSECTIONS - Specifies icon sections when linking executable # # CLASSES - Class implementation files in project. # HFILES - Header files in project. # MFILES - Other Objective-C source files in project. # CFILES - Other C source files in project. # PSWFILES - .psw files in the project # PSWMFILES - .pswm files in the project # SUBPROJECTS - Subprojects of this project # BUNDLES - Bundle subprojects of this project # OTHERSRCS - Other miscellaneous sources of this project # OTHERLINKED - Source files not matching a standard source extention # # LIBS - Libraries to link with when making app target # DEBUG_LIBS - Libraries to link with when making debug target # PROF_LIBS - Libraries to link with when making profile target # OTHERLINKEDOFILES - Other relocatable files to (always) link in. # # APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles # MAKEFILEDIR - Directory in which to find $(MAKEFILE) # MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make) # INSTALLDIR - Directory app will be installed into by 'install' target # Change defaults assumed by the standard app makefiles here. Edit the # following default values as appropriate. (Note that if no Makefile.postamble # exists, these values will have defaults set in common.make). # Add Makefile.preamble, Makefile.postamble, and Makefile.dependencies here if # you would like changes to them to invalidate previous builds. The project # depends on $(MAKEFILES) so that changes to Makefiles will trigger a re-build. #MAKEFILES = Makefile # Optimization flag passed to compiler: #OPTIMIZATION_CFLAG = -O # Flags passed to compiler in normal 'app' compiles: #NORMAL_CFLAGS = -g $(OPTIMIZATION_CFLAG) -Wall # Flags passed to compiler in 'debug' compiles: #DEBUG_CFLAGS = -g -Wall -DDEBUG # Flags passed to compiler in 'profile' compiles #PROFILE_CFLAGS = -g -pg $(OPTIMIZATION_CFLAG) -Wall -DPROFILE # Ownership and permissions of files installed by 'install' target #INSTALL_AS_USER = root # User to chown app to #INSTALL_AS_GROUP = wheel # Group to chgrp app to #INSTALL_PERMISSIONS = # If set, 'install' chmod's executable to this # Options to strip for bundles, apps with bundles, and apps without bundles, # respectively. #RELOCATABLE_STRIP_OPTS = -x -u #DYLD_APP_STRIP_OPTS = -A -n #APP_STRIP_OPTS = #TOOL_STRIP_OPTS = # (Note: APP_STRIP_OPTS and TOOL_STRIP_OPTS default to empty, but # developers doing their own dynamic loading should set this to # $(DYLD_APP_STRIP_OPTS)). ######################################################################### # Put rules to extend the behavior of the standard Makefiles here. Typical # user-defined rules are before_install and after_install (please don't # redefine things like install or app, as they are owned by the top-level # Makefile API), which are rules that get invoked before and after the install # target runs. Such rules should be specified with the '::' syntax rather than # a single colon. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/Makefile�����������������������������������������������������������������0000644�0004711�0000144�00000002630�06736403576�014136� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Generated by the NeXT Project Builder. # # NOTE: Do NOT change this file -- Project Builder maintains it. # # Put all of your customizations in files called Makefile.preamble # and Makefile.postamble (both optional), and Makefile will include them. # NAME = GnuTerm PROJECTVERSION = 2.8 PROJECT_TYPE = Application NEXTSTEP_APPICON = GnuTerm.tiff ICONSECTIONS = -sectcreate __ICON app GnuTerm.tiff English_RESOURCES = GnuTerm.nib gnuview.nib LANGUAGES = English CLASSES = Controller.m GnuView.m GnuViewController.m HFILES = Controller.h GnuView.h GnuViewController.h MFILES = GnuTerm_main.m OTHERSRCS = Makefile.preamble Makefile Makefile.postamble MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles CODE_GEN_STYLE = DYNAMIC MAKEFILE = app.make NEXTSTEP_INSTALLDIR = $(HOME)/Apps WINDOWS_INSTALLDIR = $(HOME)/Apps PDO_UNIX_INSTALLDIR = $(HOME)/Apps LIBS = DEBUG_LIBS = $(LIBS) PROF_LIBS = $(LIBS) FRAMEWORK_PATHS = -F/System/Library/Frameworks FRAMEWORKS = -framework AppKit -framework Foundation NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc NEXTSTEP_JAVA_COMPILER = /usr/bin/javac WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac include $(MAKEFILEDIR)/platform.make -include Makefile.preamble include $(MAKEFILEDIR)/$(MAKEFILE) -include Makefile.postamble -include Makefile.dependencies ��������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/GnuTerm.iconheader�������������������������������������������������������0000644�0004711�0000144�00000000060�06736403574�016073� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������F GnuTerm.app GnuTerm app F GnuTerm GnuTerm app ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/derived_src/�������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�014732� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/English.lproj/�����������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�015157� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/English.lproj/gnuview.nib/�����������������������������������������������0000755�0004711�0000144�00000000000�12223340020�017412� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/English.lproj/gnuview.nib/objects.nib������������������������������������0000644�0004711�0000144�00000002173�06736403601�021561� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� streamtyped@NSIBObjectDataNSObjectNSCustomObject)@@NSString+ ControlleriNSWindowTemplate) iiffffi@@@@@c@x0gnuplot OutputNSWindowViewNSView) NSResponder @@@@ffffffffNSMutableArrayNSArrayNSBox)"< < HHff@@cccNSCell<ii@@@@BoxNSFont[20c] Helveticaf c NSCustomView)@@GnuViewNSButton NSControl)!ppicc@ NSButtonCell9 NSActionCell--- ACTIVE ---i: ssIi@@@@@@ @@ffffffZ GnuViewControllerWindowgnuviewController File's Owner NSMutableSetNSSetINSIBOutletConnector NSIBConnector@@@windowùdelegateù activeTermùactivateButtonNSIBControlConnectorĹactivatePushed:ù controllerùgnuView@i   �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/English.lproj/gnuview.nib/data.classes�����������������������������������0000644�0004711�0000144�00000001647�06736403600�021732� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������"Controller" = { ACTIONS = { "appDidInit:" = id; "newGnuView:" = id; "printPScodeInKey:" = id; "setKeyTitle:" = id; }; OUTLETS = {NameField = id; activeTerm = id; keyTerm = id; }; SUPERCLASS = Object; }; "FirstResponder" = {ACTIONS = {}; OUTLETS = {}; SUPERCLASS = NSObject; }; "GnuView" = {ACTIONS = {}; OUTLETS = {prInfo = id; }; SUPERCLASS = NSView; }; "GnuViewController" = { ACTIONS = {"activatePushed:" = id; "deactivate:" = id; }; OUTLETS = {activateButton = id; controller = id; gnuView = id; window = id; }; SUPERCLASS = NSObject; }; "gnuviewController" = { ACTIONS = { "activate:" = id; "activatePushed:" = id; "deactivate:" = id; "windowDidBecomeMain:" = id; "windowWillClose:" = id; }; OUTLETS = {activateButton = id; controller = id; gnuView = id; window = id; }; SUPERCLASS = Object; }; �����������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/English.lproj/GnuTerm.nib/�����������������������������������������������0000755�0004711�0000144�00000000000�12223340020�017307� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/English.lproj/GnuTerm.nib/objects.nib������������������������������������0000644�0004711�0000144�00000007673�06736403600�021467� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� typedstream@NSIBObjectData߄NSObjectNSCustomObject)@@NSString+ NSApplicationi,NSMenu̔i@@@GnuTermNSMutableArrayNSArray NSMenuItemA i@@IIi@@@@:i@NSCustomResource)NSImageNSAppleMenuImageNSMenuCheckmarkNSMenuMixedStatesubmenuAction:Info About GnuTerm _NSAppleMenuPlot New Plot Windown@CloseSaves Save As...SRevert@ Page Setup...PPrint...p@QuitqWindow΄ϟ Set Title...Tϟ@ϟ Close Windowwϟ Zoom WindowϟMinimize Windowmϟ@ϟArrange in Front_NSWindowsMenuServicesServices_NSServicesMenu _NSMainMenu NSTextField NSControl)NSView) NSResponder뒅 @@@@ffffffffNSBox)홦55EE풅ff@@cccNSCell>ii@@@@NSFont[28c]Helveticaf c홦::풅icc@NSTextFieldCell= NSActionCellGnuTerm gnuplot Terminal Server,[44c]"Times-BoldItalici:c@@NSColor@@@SystemtextBackgroundColorffcontrolTextColor:홦 ,3,3풅dby Robert Lutwak Atomic Resonance and Spectroscopy Laboratory Massachusetts Institute of Technology ,"Times-BoldItalic蒄홦 GG풅 Version 1.2$[36c]Times-Italic   controlColor?*>홦H,3,3풅bOpenStep Conversion by Leigh M. Smith Computer Science Department University of Western Australia JJ 33풅cPlease send all comments, suggestions, and bug reports to robert@amo.mit.edu or leigh@cs.uwa.edu.au [32c]Times-Roman턄NSWindowTemplate) iiffffi@@@@@ćJ`xInfoNSPanelViewffffR뒅Terminal Name: Times-Bold|agnuplot output"NSButtonp 88 NSButtonCell>OK% ssii@@@@@@ //U/`xSet Terminal NameViewR NSFontManager͖Ʋ͙ϖᙖϖ Controller+ϖ²ᖴ%ϖϖ ϖʲ"ɲϖò  InfoPanelMainMenu݄1 File's Owner+ setTitlePanel0 Controllerء1. Font Manager NSMutableSetNSSetINSNibOutletConnectorτNSNibConnector0delegateNSNibControlConnector@"% performClick:?0" NameFieldC%0 setKeyTitle:CmakeKeyAndOrderFront:Cʅ terminate:Cƅprint:CÅrunPageLayout:C0 newGnuTerm:C؅ performZoom:CڅperformMiniaturize:CՅ performClose:CޅarrangeInFront:C+makeKeyAndOrderFront:.;@i>"MȰ@Pș %Qȟ7>ȸFBC+0EI:Ȫ8WVȲ<STȷ;"[ȭ9QLKI\NG,OKB) Y[ZXDRȴA5Ⱥ?MJSȽGȕUUYW.OHE*]���������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/English.lproj/GnuTerm.nib/classes.nib������������������������������������0000644�0004711�0000144�00000001773�06736403600�021466� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ IBClasses = ( { ACTIONS = {appDidInit = id; newGnuTerm = id; printPScodeInKey = id; setKeyTitle = id; }; CLASS = Controller; LANGUAGE = ObjC; OUTLETS = {NameField = id; activeTerm = id; keyTerm = id; }; SUPERCLASS = Object; }, {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, { ACTIONS = {resize = id; }; CLASS = GnuView; LANGUAGE = ObjC; SUPERCLASS = NSView; }, { ACTIONS = { activate = id; activatePushed = id; deactivate = id; windowDidBecomeMain = id; windowWillClose = id; }; CLASS = gnuviewController; LANGUAGE = ObjC; OUTLETS = {activateButton = id; controller = id; gnuView = id; window = id; }; SUPERCLASS = Object; } ); IBVersion = 1; }�����gnuplot-4.6.4/src/OpenStep/PBUserInfo/��������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�014415� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/PBUserInfo/PBUserInfo_leigh.plist����������������������������������������0000644�0004711�0000144�00000000356�06736403601�020643� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ NSMACHOperatingSystem = { Archs = "18 "; LauncherSelectedExec = ( "$[PBProject projectName].app/$[PBProject projectName]$[PBProjectType executableExtension]" ); Target = app; }; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/Controller.m�������������������������������������������������������������0000644�0004711�0000144�00000006731�10071042561�014761� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#import "Controller.h" #import "GnuViewController.h" #import "GnuView.h" @implementation Controller - (id) activeTerm { return activeTerm; } - (void) applicationDidFinishLaunching:(NSNotification *) notification { // NSApplication *theApplication = [notification object]; NSDictionary *gnutermDefaults; NSPrintInfo *prInfo; #if 0 gnutermDefaults = [NSDictionary dictionaryWithObjectsAndKeys: @"400", @"Width", @"300", @"Height", @"Buffered", @"Backing", NULL]; #endif activeTerm = keyTerm = [self newGnuTerm:self]; myConnection = [NSConnection defaultConnection]; [myConnection retain]; [myConnection setRootObject:self]; if([myConnection registerName:@"gnuplotServer"] == NO) { NSLog(@"Error registering %s\n", "gnuplotServer"); } #warning PrintingConversion: The current PrintInfo object now depends on context. '[NSPrintInfo sharedPrintInfo]' used to be '[NSApp printInfo]'. This might want to be [[NSPrintOperation currentOperation] printInfo] or possibly [[PageLayout new] printInfo]. prInfo = [NSPrintInfo sharedPrintInfo]; // prInfo = [[NSPrintOperation currentOperation] printInfo]; #warning PrintingConversion: May be able to remove some of the [prInfo setXXXXMargin:] calls [prInfo setLeftMargin:0]; [prInfo setRightMargin:0]; [prInfo setTopMargin:0]; [prInfo setBottomMargin:50]; [prInfo setOrientation:NSLandscapeOrientation]; [prInfo setHorizontallyCentered:YES]; [prInfo setVerticallyCentered:YES]; #if 0 /* Get user Preferences */ [[NSUserDefaults standardUserDefaults] registerDefaults: gnutermDefaults]; // TODO this may override existing values [[DefaultSize cellAtIndex:0] setStringValue:[[NSUserDefaults standardUserDefaults] objectForKey:@"Width"]]; [[DefaultSize cellAtIndex:1] setStringValue:[[NSUserDefaults standardUserDefaults] objectForKey:@"Height"]]; if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"Backing"] isEqualToString:@"Buffered"]) { backing = NSBackingStoreBuffered; [useBufferedSwitch setState:YES]; } else { backing = NSBackingStoreRetained; [useBufferedSwitch setState:NO]; } gvList = [NSMutableArray array]; [gvList retain]; #endif } - newGnuTerm:sender { NSWindow *win; NSRect frame; if ([NSBundle loadNibNamed:@"gnuview.nib" owner:self] == NO) { return nil; } if (win = [activeTerm window]) { frame = [win frame]; (&frame)->origin.x += offset; (&frame)->origin.y -= offset; if ( (offset += 24.0) > 100.0) offset = 0.0; [win setTitle:[NSString stringWithFormat: @"gnuplot %d", ++gnuviewNum]]; [win setFrame:frame display:YES]; [win makeKeyAndOrderFront:nil]; return activeTerm; } return nil; } - (void) setActiveTerm:(id) newTerm { if (activeTerm != nil) [activeTerm deactivate:self]; activeTerm = newTerm; } - (void) printPScodeInKey:sender { [[keyTerm gnuView] print:sender]; } - (void) setKeyTerm: (id) newTerm { keyTerm = newTerm; [NameField setStringValue:[[keyTerm window] title]]; [NameField selectText:self]; } - (void) setKeyTitle:sender { [[keyTerm window] setTitle:[NameField stringValue]]; [[NameField window] performClose:self]; } - (void) executePScode:(NSString *) PSstring termTitle:(NSString *) title; { NSLog(@"Request for window: %@\n", title); if (activeTerm == nil) [self newGnuTerm:self]; [[activeTerm gnuView] executePS:PSstring]; } @end ���������������������������������������gnuplot-4.6.4/src/OpenStep/TODO���������������������������������������������������������������������0000644�0004711�0000144�00000000444�06736403577�013170� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������TODO: Make faster Multiple window support of latest gnuplot Better colour support - setting defaults from Colour wheel and dropping into colour wells. Make README's into Help HTML files Add a cursor to produce a coordinate measurement so we can check points on a graph in graph coordinates. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/Controller.h�������������������������������������������������������������0000644�0004711�0000144�00000000742�10071042561�014750� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#import <AppKit/AppKit.h> @interface Controller:NSObject { id activeTerm; id keyTerm; id NameField; NSConnection *myConnection; float offset; int gnuviewNum; } - newGnuTerm:sender; - (void) applicationDidFinishLaunching:(NSNotification *) notification; - activeTerm; - (void) setActiveTerm:newView; - (void) setKeyTerm:newTerm; - (void) setKeyTitle:sender; - (void) printPScodeInKey:sender; - (void) executePScode:(NSString *) PSstring termTitle:(NSString *) title; @end ������������������������������gnuplot-4.6.4/src/OpenStep/GnuViewController.h������������������������������������������������������0000644�0004711�0000144�00000001304�06736403576�016274� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#import <AppKit/AppKit.h> #import "Controller.h" #import "GnuView.h" @interface GnuViewController:NSObject { id window; id gnuView; // GnuView instance id activateButton; id controller; // Controller instance } - init; - window; - (BOOL)windowShouldClose:(id)sender; #warning OK - NotificationConversion: windowDidBecomeMain:(NSNotification *)notification is an NSWindow notification method (used to be a delegate method); delegates of NSWindow are automatically set to observe this notification; subclasses of NSWindow do not automatically receive this notification - (void)windowDidBecomeMain:(NSNotification *)notification; - gnuView; - activatePushed:sender; - deactivate:sender; @end ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/PB.project���������������������������������������������������������������0000644�0004711�0000144�00000003053�06736403577�014370� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ APPCLASS = NSApplication; FILESTABLE = { CLASSES = (Controller.m, GnuView.m, GnuViewController.m); English_INTERFACES = (GnuTerm.nib, gnuview.nib); FRAMEWORKS = (AppKit.framework, Foundation.framework); FRAMEWORKSEARCH = (/System/Library/Frameworks); HEADERSEARCH = (); H_FILES = (Controller.h, GnuView.h, GnuViewController.h); IMAGES = (); INTERFACES = (); M_FILES = (); OTHER_LIBS = (); OTHER_LINKED = (GnuTerm_main.m); OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble); PRECOMPILED_HEADERS = (); PROJECT_HEADERS = (); PUBLIC_HEADERS = (); }; GENERATEMAIN = YES; LANGUAGE = English; MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles"; NEXTSTEP_APPICON = GnuTerm.tiff; NEXTSTEP_BUILDTOOL = /bin/gnumake; NEXTSTEP_DOCUMENTEXTENSIONS = (); NEXTSTEP_INSTALLDIR = "$(HOME)/Apps"; NEXTSTEP_JAVA_COMPILER = /usr/bin/javac; NEXTSTEP_MAINNIB = GnuTerm; NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc; PDO_UNIX_INSTALLDIR = "$(HOME)/Apps"; PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac"; PDO_UNIX_MAINNIB = GnuTerm; PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc"; PROJECTNAME = GnuTerm; PROJECTTYPE = Application; PROJECTVERSION = 2.8; SYSTEMEXTENSIONS = (); WINDOWS_INSTALLDIR = "$(HOME)/Apps"; WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe"; WINDOWS_MAINNIB = GnuTerm; WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc"; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/GnuTerm_main.m�����������������������������������������������������������0000644�0004711�0000144�00000000511�10071042561�015211� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Generated by the NeXT Project Builder NOTE: Do NOT change this file -- Project Builder maintains it. */ #import <AppKit/AppKit.h> void main(int argc, char *argv[]) { [NSApplication sharedApplication]; if ([NSBundle loadNibNamed:@"GnuTerm.nib" owner:NSApp]) [NSApp run]; [NSApp release]; exit(0); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/Makefile.preamble��������������������������������������������������������0000644�0004711�0000144�00000006627�06736403577�015737� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������############################################################################### # NeXT Makefile.preamble Template # Copyright 1993, NeXT Computer, Inc. # # This Makefile is used for configuring the standard app makefiles associated # with ProjectBuilder. # # Use this template to set attributes for a project, sub-project, bundle, or # palette. Each node in the project's tree of sub-projects and bundles # should have it's own Makefile.preamble and Makefile.postamble. # ############################################################################### ## Configure the flags passed to $(CC) here. These flags will also be ## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and ## -L flags here. To change the default flags that get passed to ${CC} ## (e.g. change -O to -O2), see Makefile.postamble. # Flags passed to compiler (in addition to -g, -O, etc) OTHER_CFLAGS = # Flags passed to ld (in addition to -ObjC, etc.) OTHER_LDFLAGS = ## Configure what is linked in at each level here. Libraries are only used in ## the final 'app' linking step. Final 'app' linking is only done via the ## 'app', 'debug', and 'profile' targets when they are invoked for ## the top-level app. # Additional relocatables to be linked in at this level OTHER_OFILES = # Additional libs to link apps against ('app' target) OTHER_LIBS = # Additional libs to link apps against ('debug' target) OTHER_DEBUG_LIBS = # Additional libs to link apps against ('profile' target) OTHER_PROF_LIBS = # More 'app' libraries when $(JAPANESE) = "YES" OTHER_JAPANESE_LIBS = # More 'debug' libraries when $(JAPANESE) = "YES" OTHER_JAPANESE_DEBUG_LIBS = # More 'profile' libs when $(JAPANESE) = "YES" OTHER_JAPANESE_PROF_LIBS = ## Configure how things get built here. Additional dependencies, sourcefiles, ## derived files, and build order should be specified here. # Other dependencies of this project OTHER_PRODUCT_DEPENDS = # Built *before* building subprojects/bundles OTHER_INITIAL_TARGETS = # Other source files maintained by .pre/postamble OTHER_SOURCEFILES = # Additional files to be removed by `make clean' OTHER_GARBAGE = # Precompiled headers to be built before any compilation occurs (e.g., draw.p) PRECOMPS = # Targets to be built before subprojects & bundles OTHER_INITIAL_TARGETS = # A virtual root directory (other than /) to be prepended to the $(INSTALLDIR) # passed from ProjectBuilder. DSTROOT = ## Add more obscure source files here to cause them to be automatically ## processed by the appropriate tool. Note that these files should also be ## added to "Supporting Files" in ProjectBuilder. The desired .o files that ## result from these files should also be added to OTHER_OFILES above so they ## will be linked in. # .msg files that should have msgwrap run on them MSGFILES = # .defs files that should have mig run on them DEFSFILES = # .mig files (no .defs files) that should have mig run on them MIGFILES = ## Add additional Help directories here (add them to the project as "Other ## Resources" in Project Builder) so that they will be compressed into .store ## files and copied into the app wrapper. If the help directories themselves ## need to also be in the app wrapper, then a cp command will need to be added ## in an after_install target. OTHER_HELP_DIRS = # Don't add more rules here unless you want the first one to be the default # target for make! Put all your targets in Makefile.postamble. ���������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/GnuTerm.tiff�������������������������������������������������������������0000644�0004711�0000144�00000022302�06677167115�014727� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������MM�*��$�������������������������������������������������������������������������������������������������������������������������������������������������������UUU������UUU������UUU������UUU������UUU���������UUU������������������UUUUUUUUU���������������������UUU���������UUU���������UUU���������UUU���������UUU������������UUU���UUU���UUU���UUU���UUU���UUU���UUU���UUUUUU���UUU���UUUUUU���UUU���UUUUUU���UUU���UUUUUU���UUU������UUUUUU���UUU���UUUUUU���UUU������UUU���������������������UUU������UUU������UUU���UUU������UUU������UUU���UUU������UUU������������������UUU������UUU������UUU���UUU���������UUU������UUU���UUU������������UUU���UUU���UUU������������������������UUU���UUU���UUUUUU���UUU������������������������UUU���������UUU������UUU������UUU���������UUU������UUU������������UUU���������������������������UUU������������������UUU������������UUU���������������������������������UUU���������UUU������������UUU������������UUU������UUU���������������UUUUUU���UUUUUUUUU���UUUUUUUUU���UUU���UUUUUUUUU���UUUUUU������������������������������UUU������������������UUU������������������UUU������������������UUU������UUU������UUU������UUU������UUU������������������������UUU���������������������������������������������������������������������������������������������������������������������������������������������UUU����UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU� ������0�������0��������$����������������������������������$�������$������$�������(�������R���������������� ��'� ��'������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/OpenStep/GnuViewController.m������������������������������������������������������0000644�0004711�0000144�00000002247�10071042561�016264� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#import "GnuViewController.h" #import "Controller.h" @implementation GnuViewController - init { [activateButton setState:1]; [activateButton setTitle:@"--- ACTIVE ---"]; return self; } - window { return window; } - gnuView { return gnuView; } - (BOOL)windowShouldClose:(id)sender { [sender setDelegate:nil]; if ([controller activeTerm] == self) { [controller setActiveTerm:nil]; } return YES; } #warning OK - check delegate NotificationConversion: windowDidBecomeMain:(NSNotification *)notification is an NSWindow notification method (used to be a delegate method); delegates of NSWindow are automatically set to observe this notification; subclasses of NSWindow do not automatically receive this notification - (void)windowDidBecomeMain:(NSNotification *)notification { [controller setKeyTerm:self]; } - activatePushed:sender { if ([sender state] == 1) { [controller setActiveTerm: self]; [sender setTitle:@"--- ACTIVE ---"]; } else { [controller setActiveTerm:nil]; [sender setTitle:@"Activate"]; } return self; } - deactivate:sender { [activateButton setState:0]; [activateButton setTitle:@"Activate"]; return self; } @end ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/mouse.c���������������������������������������������������������������������������0000644�0004711�0000144�00000232077�12043621616�012230� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: mouse.c,v 1.133.2.3 2012/10/27 02:24:37 sfeam Exp $"); } #endif /* GNUPLOT - mouse.c */ /* driver independent mouse part. */ /*[ * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Original Software (October 1999 - January 2000): * Pieter-Tjerk de Boer <ptdeboer@cs.utwente.nl> * Petr Mikulik <mikulik@physics.muni.cz> * Johannes Zellner <johannes@zellner.org> */ #include "syscfg.h" #include "stdfn.h" #include "gp_types.h" #define _MOUSE_C /* FIXME HBB 20010207: violates Codestyle */ #ifdef USE_MOUSE /* comment out whole file, otherwise... */ #include "mouse.h" #include "pm3d.h" #include "alloc.h" #include "axis.h" #include "command.h" #include "datafile.h" #include "gadgets.h" #include "gp_time.h" #include "graphics.h" #include "graph3d.h" #include "plot3d.h" #include "readline.h" #include "term_api.h" #include "util3d.h" #include "hidden3d.h" #ifdef _Windows # include "win/winmain.h" #endif #ifdef OS2 #include <os2.h> #include "os2/pm_msgs.h" #endif /********************** variables ***********************************************************/ char mouse_fmt_default[] = "% #g"; mouse_setting_t mouse_setting = { #ifdef OS2 0 /* don't start with mouse on default -- clashes with arrow keys on command line */, #else 1 /* start with mouse on by default */, #endif 300 /* ms */, 1, 0, 0, 0, 0, mouse_fmt_default, NULL }; /* "usual well-known" keycodes, i.e. those not listed in special_keys in mouse.h */ static const struct gen_table usual_special_keys[] = { { "BackSpace", GP_BackSpace}, { "Tab", GP_Tab}, { "KP_Enter", GP_KP_Enter}, { "Return", GP_Return}, { "Escape", GP_Escape}, { "Delete", GP_Delete}, { NULL, 0} }; /* the status of the shift, ctrl and alt keys */ static int modifier_mask = 0; /* Structure for the ruler: on/off, position,... */ static struct { TBOOLEAN on; double x, y, x2, y2; /* ruler position in real units of the graph */ long px, py; /* ruler position in the viewport units */ } ruler = { FALSE, 0, 0, 0, 0, 0, 0 }; /* the coordinates of the mouse cursor in gnuplot's internal coordinate system */ static int mouse_x = -1, mouse_y = -1; /* the "real" coordinates of the mouse cursor, i.e., in the user's coordinate * system(s) */ static double real_x, real_y, real_x2, real_y2; /* mouse_polar_distance is set to TRUE if user wants to see the * distance between the ruler and mouse pointer in polar coordinates * too (otherwise, distance in cartesian coordinates only is shown) */ /* int mouse_polar_distance = FALSE; */ /* moved to the struct mouse_setting_t (joze) */ /* status of buttons; button i corresponds to bit (1<<i) of this variable */ static int button = 0; /* variables for setting the zoom region: */ /* flag, TRUE while user is outlining the zoom region */ static TBOOLEAN setting_zoom_region = FALSE; /* coordinates of the first corner of the zoom region, in the internal * coordinate system */ static int setting_zoom_x, setting_zoom_y; /* variables for changing the 3D view: */ /* do we allow motion to result in a replot right now? */ TBOOLEAN allowmotion = TRUE; /* used by pm.trm, too */ /* did we already postpone a replot because allowmotion was FALSE ? */ static TBOOLEAN needreplot = FALSE; /* mouse position when dragging started */ static int start_x, start_y; /* ButtonPress sets this to 0, ButtonMotion to 1 */ static int motion = 0; /* values for rot_x and rot_z corresponding to zero position of mouse */ static float zero_rot_x, zero_rot_z; /* bind related stuff */ typedef struct bind_t { struct bind_t *prev; int key; char modifier; char *command; char *(*builtin) (struct gp_event_t * ge); TBOOLEAN allwindows; struct bind_t *next; } bind_t; static bind_t *bindings = (bind_t *) 0; static const int NO_KEY = -1; static TBOOLEAN trap_release = FALSE; /* forward declarations */ static void alert __PROTO((void)); static void MousePosToGraphPosReal __PROTO((int xx, int yy, double *x, double *y, double *x2, double *y2)); static char *xy_format __PROTO((void)); static char *zoombox_format __PROTO((void)); static char *GetAnnotateString __PROTO((char *s, double x, double y, int mode, char *fmt)); static char *xDateTimeFormat __PROTO((double x, char *b, int mode)); static void GetRulerString __PROTO((char *p, double x, double y)); static void apply_zoom __PROTO((struct t_zoom * z)); static void do_zoom __PROTO((double xmin, double ymin, double x2min, double y2min, double xmax, double ymax, double x2max, double y2max)); static void ZoomNext __PROTO((void)); static void ZoomPrevious __PROTO((void)); static void ZoomUnzoom __PROTO((void)); static void incr_mousemode __PROTO((const int amount)); static void incr_clipboardmode __PROTO((const int amount)); static void UpdateStatuslineWithMouseSetting __PROTO((mouse_setting_t * ms)); static void event_keypress __PROTO((struct gp_event_t * ge, TBOOLEAN current)); static void ChangeView __PROTO((int x, int z)); static void event_buttonpress __PROTO((struct gp_event_t * ge)); static void event_buttonrelease __PROTO((struct gp_event_t * ge)); static void event_motion __PROTO((struct gp_event_t * ge)); static void event_modifier __PROTO((struct gp_event_t * ge)); static void do_save_3dplot __PROTO((struct surface_points *, int, int)); static void load_mouse_variables __PROTO((double, double, TBOOLEAN, int)); /* builtins */ static char *builtin_autoscale __PROTO((struct gp_event_t * ge)); static char *builtin_toggle_border __PROTO((struct gp_event_t * ge)); static char *builtin_replot __PROTO((struct gp_event_t * ge)); static char *builtin_toggle_grid __PROTO((struct gp_event_t * ge)); static char *builtin_help __PROTO((struct gp_event_t * ge)); static char *builtin_toggle_log __PROTO((struct gp_event_t * ge)); static char *builtin_nearest_log __PROTO((struct gp_event_t * ge)); static char *builtin_toggle_mouse __PROTO((struct gp_event_t * ge)); static char *builtin_toggle_ruler __PROTO((struct gp_event_t * ge)); static char *builtin_decrement_mousemode __PROTO((struct gp_event_t * ge)); static char *builtin_increment_mousemode __PROTO((struct gp_event_t * ge)); static char *builtin_decrement_clipboardmode __PROTO((struct gp_event_t * ge)); static char *builtin_increment_clipboardmode __PROTO((struct gp_event_t * ge)); static char *builtin_toggle_polardistance __PROTO((struct gp_event_t * ge)); static char *builtin_toggle_verbose __PROTO((struct gp_event_t * ge)); static char *builtin_toggle_ratio __PROTO((struct gp_event_t * ge)); static char *builtin_zoom_next __PROTO((struct gp_event_t * ge)); static char *builtin_zoom_previous __PROTO((struct gp_event_t * ge)); static char *builtin_unzoom __PROTO((struct gp_event_t * ge)); static char *builtin_rotate_right __PROTO((struct gp_event_t * ge)); static char *builtin_rotate_up __PROTO((struct gp_event_t * ge)); static char *builtin_rotate_left __PROTO((struct gp_event_t * ge)); static char *builtin_rotate_down __PROTO((struct gp_event_t * ge)); static char *builtin_cancel_zoom __PROTO((struct gp_event_t * ge)); /* prototypes for bind stuff * which are used only here. */ static void bind_install_default_bindings __PROTO((void)); static void bind_clear __PROTO((bind_t * b)); static int lookup_key __PROTO((char *ptr, int *len)); static int bind_scan_lhs __PROTO((bind_t * out, const char *in)); static char *bind_fmt_lhs __PROTO((const bind_t * in)); static int bind_matches __PROTO((const bind_t * a, const bind_t * b)); static void bind_display_one __PROTO((bind_t * ptr)); static void bind_display __PROTO((char *lhs)); static void bind_all __PROTO((char *lhs)); static void bind_remove __PROTO((bind_t * b)); static void bind_append __PROTO((char *lhs, char *rhs, char *(*builtin) (struct gp_event_t * ge))); static void recalc_ruler_pos __PROTO((void)); static void turn_ruler_off __PROTO((void)); static int nearest_label_tag __PROTO((int x, int y, struct termentry * t)); static void remove_label __PROTO((int x, int y)); static void put_label __PROTO((char *label, double x, double y)); /********* functions ********************************************/ /* produce a beep */ static void alert() { # ifdef OS2 DosBeep(444, 111); # else # ifdef HAVE_LIBREADLINE # if !defined(MISSING_RL_DING) rl_ding(); # endif fflush(rl_outstream); # else fprintf(stderr, "\a"); # endif # endif } /* always include the prototype. The prototype might even not be * declared if the system supports stpcpy(). E.g. on Linux I would * have to define __USE_GNU before including string.h to get the * prototype (joze) */ /* HBB 20001109: *BUT* if a prototype is there, this one may easily * conflict with it... */ char *stpcpy __PROTO((char *s, const char *p)); # ifndef HAVE_STPCPY /* handy function for composing strings; note: some platforms may * already provide it, how should we handle that? autoconf? -- ptdb */ char * stpcpy(char *s, const char *p) { strcpy(s, p); return s + strlen(p); } # endif /* main job of transformation, which is not device dependent */ static void MousePosToGraphPosReal(int xx, int yy, double *x, double *y, double *x2, double *y2) { if (!is_3d_plot) { FPRINTF((stderr, "POS: plot_bounds.xleft=%i, plot_bounds.xright=%i, plot_bounds.ybot=%i, plot_bounds.ytop=%i\n", plot_bounds.xleft, plot_bounds.xright, plot_bounds.ybot, plot_bounds.ytop)); if (plot_bounds.xright == plot_bounds.xleft) *x = *x2 = VERYLARGE; /* protection */ else { *x = AXIS_MAPBACK(FIRST_X_AXIS, xx); *x2 = AXIS_MAPBACK(SECOND_X_AXIS, xx); } if (plot_bounds.ytop == plot_bounds.ybot) *y = *y2 = VERYLARGE; /* protection */ else { *y = AXIS_MAPBACK(FIRST_Y_AXIS, yy); *y2 = AXIS_MAPBACK(SECOND_Y_AXIS, yy); } FPRINTF((stderr, "POS: xx=%i, yy=%i => x=%g y=%g\n", xx, yy, *x, *y)); } else { /* for 3D plots, we treat the mouse position as if it is * in the bottom plane, i.e., the plane of the x and y axis */ /* note: at present, this projection is only correct if * surface_rot_z is a multiple of 90 degrees! */ /* HBB 20010522: added protection against division by zero * for cases like 'set view 90,0' */ xx -= axis3d_o_x; yy -= axis3d_o_y; if (abs(axis3d_x_dx) > abs(axis3d_x_dy)) { *x = axis_array[FIRST_X_AXIS].min + ((double) xx) / axis3d_x_dx * (axis_array[FIRST_X_AXIS].max - axis_array[FIRST_X_AXIS].min); } else if (axis3d_x_dy != 0) { *x = axis_array[FIRST_X_AXIS].min + ((double) yy) / axis3d_x_dy * (axis_array[FIRST_X_AXIS].max - axis_array[FIRST_X_AXIS].min); } else { /* both diffs are zero (x axis points into the screen */ *x = VERYLARGE; } if (abs(axis3d_y_dx) > abs(axis3d_y_dy)) { *y = axis_array[FIRST_Y_AXIS].min + ((double) xx) / axis3d_y_dx * (axis_array[FIRST_Y_AXIS].max - axis_array[FIRST_Y_AXIS].min); } else if (axis3d_y_dy != 0) { *y = axis_array[FIRST_Y_AXIS].min + ((double) yy) / axis3d_y_dy * (axis_array[FIRST_Y_AXIS].max - axis_array[FIRST_Y_AXIS].min); } else { /* both diffs are zero (y axis points into the screen */ *y = VERYLARGE; } *x2 = *y2 = VERYLARGE; /* protection */ } /* Note: there is plot_bounds.xleft+0.5 in "#define map_x" in graphics.c, which makes no major impact here. It seems that the mistake of the real coordinate is at about 0.5%, which corresponds to the screen resolution. It would be better to round the distance to this resolution, and thus *x = xmin + rounded-to-screen-resolution (xdistance) */ /* Now take into account possible log scales of x and y axes */ *x = AXIS_DE_LOG_VALUE(FIRST_X_AXIS, *x); *y = AXIS_DE_LOG_VALUE(FIRST_Y_AXIS, *y); if (!is_3d_plot) { *x2 = AXIS_DE_LOG_VALUE(SECOND_X_AXIS, *x2); *y2 = AXIS_DE_LOG_VALUE(SECOND_Y_AXIS, *y2); } } static char * xy_format() { static char format[64]; format[0] = NUL; strncat(format, mouse_setting.fmt, 30); strncat(format, ", ", 2); strncat(format, mouse_setting.fmt, 30); return format; } static char * zoombox_format() { static char format[64]; format[0] = NUL; strncat(format, mouse_setting.fmt, 30); strncat(format, "\r", 2); strncat(format, mouse_setting.fmt, 30); return format; } /* formats the information for an annotation (middle mouse button clicked) */ static char * GetAnnotateString(char *s, double x, double y, int mode, char *fmt) { if (mode == MOUSE_COORDINATES_XDATE || mode == MOUSE_COORDINATES_XTIME || mode == MOUSE_COORDINATES_XDATETIME || mode == MOUSE_COORDINATES_TIMEFMT) { /* time is on the x axis */ char buf[0xff]; char format[0xff] = "[%s, "; strcat(format, mouse_setting.fmt); strcat(format, "]"); sprintf(s, format, xDateTimeFormat(x, buf, mode), y); } else if (mode == MOUSE_COORDINATES_FRACTIONAL) { double xrange = axis_array[FIRST_X_AXIS].max - axis_array[FIRST_X_AXIS].min; double yrange = axis_array[FIRST_Y_AXIS].max - axis_array[FIRST_Y_AXIS].min; /* calculate fractional coordinates. * prevent division by zero */ if (xrange) { char format[0xff] = "/"; strcat(format, mouse_setting.fmt); sprintf(s, format, (x - axis_array[FIRST_X_AXIS].min) / xrange); } else { sprintf(s, "/(undefined)"); } s += strlen(s); if (yrange) { char format[0xff] = ", "; strcat(format, mouse_setting.fmt); strcat(format, "/"); sprintf(s, format, (y - axis_array[FIRST_Y_AXIS].min) / yrange); } else { sprintf(s, ", (undefined)/"); } } else if (mode == MOUSE_COORDINATES_REAL1) { sprintf(s, xy_format(), x, y); /* w/o brackets */ } else if (mode == MOUSE_COORDINATES_ALT && (fmt || polar)) { if (polar) { double phi, r; double rmin = (R_AXIS.autoscale & AUTOSCALE_MIN) ? 0.0 : R_AXIS.set_min; phi = atan2(y,x); if (R_AXIS.log) r = AXIS_UNDO_LOG(POLAR_AXIS, x/cos(phi) + AXIS_DO_LOG(POLAR_AXIS, rmin)); else r = x/cos(phi) + rmin; if (fmt) sprintf(s, fmt, phi/ang2rad, r); else { sprintf(s, "polar: "); s += strlen(s); sprintf(s, xy_format(), phi/ang2rad, r); } } else { sprintf(s, fmt, x, y); /* user defined format */ } } else { sprintf(s, xy_format(), x, y); /* usual x,y values */ } return s + strlen(s); } /* Format x according to the date/time mouse mode. Uses and returns b as a buffer */ static char * xDateTimeFormat(double x, char *b, int mode) { # ifndef SEC_OFFS_SYS # define SEC_OFFS_SYS 946684800 # endif time_t xtime_position = SEC_OFFS_SYS + x; struct tm *pxtime_position = gmtime(&xtime_position); switch (mode) { case MOUSE_COORDINATES_XDATE: sprintf(b, "%d. %d. %04d", pxtime_position->tm_mday, (pxtime_position->tm_mon) + 1, # if 1 (pxtime_position->tm_year) + ((pxtime_position->tm_year <= 68) ? 2000 : 1900) # else ((pxtime_position->tm_year) < 100) ? (pxtime_position->tm_year) : (pxtime_position->tm_year) - 100 /* (pxtime_position->tm_year)+1900 */ # endif ); break; case MOUSE_COORDINATES_XTIME: sprintf(b, "%d:%02d", pxtime_position->tm_hour, pxtime_position->tm_min); break; case MOUSE_COORDINATES_XDATETIME: sprintf(b, "%d. %d. %04d %d:%02d", pxtime_position->tm_mday, (pxtime_position->tm_mon) + 1, # if 1 (pxtime_position->tm_year) + ((pxtime_position->tm_year <= 68) ? 2000 : 1900), # else ((pxtime_position->tm_year) < 100) ? (pxtime_position->tm_year) : (pxtime_position->tm_year) - 100, /* (pxtime_position->tm_year)+1900, */ # endif pxtime_position->tm_hour, pxtime_position->tm_min); break; case MOUSE_COORDINATES_TIMEFMT: /* FIXME HBB 20000507: timefmt is for *reading* timedata, not * for writing them! */ gstrftime(b, 0xff, axis_array[FIRST_X_AXIS].timefmt, x); break; default: sprintf(b, mouse_setting.fmt, x); } return b; } /* HBB 20000507: fixed a construction error. Was using the 'timefmt' * string (which is for reading, not writing time data) to output the * value. Code is now closer to what setup_tics does. */ #define MKSTR(sp,x,axis) \ do { \ if (x >= VERYLARGE) break; \ if (axis_array[axis].datatype == DT_TIMEDATE) { \ char *format = copy_or_invent_formatstring(axis); \ while (strchr(format,'\n')) \ *(strchr(format,'\n')) = ' '; \ gstrftime(sp, 40, format, x); \ } else { \ sprintf(sp, mouse_setting.fmt ,x); \ } \ sp += strlen(sp); \ } while (0) /* ratio for log, distance for linear */ # define DIST(x,rx,axis) \ (axis_array[axis].log) \ ? ( (rx==0) ? 99999 : x / rx ) \ : (x - rx) /* formats the ruler information (position, distance,...) into string p (it must be sufficiently long) x, y is the current mouse position in real coords (for the calculation of distance) */ static void GetRulerString(char *p, double x, double y) { double dx, dy; char format[0xff] = " ruler: ["; strcat(format, mouse_setting.fmt); strcat(format, ", "); strcat(format, mouse_setting.fmt); strcat(format, "] distance: "); strcat(format, mouse_setting.fmt); strcat(format, ", "); strcat(format, mouse_setting.fmt); dx = DIST(x, ruler.x, FIRST_X_AXIS); dy = DIST(y, ruler.y, FIRST_Y_AXIS); sprintf(p, format, ruler.x, ruler.y, dx, dy); /* Previously, the following "if" let the polar coordinates to be shown only for lin-lin plots: if (mouse_setting.polardistance && !axis_array[FIRST_X_AXIS].log && !axis_array[FIRST_Y_AXIS].log) ... Now, let us support also semilog and log-log plots. Values of mouse_setting.polardistance are: 0 (no polar coordinates), 1 (polar coordinates), 2 (tangent instead of angle). */ if (mouse_setting.polardistance) { double rho, phi, rx, ry; char ptmp[69]; x = AXIS_LOG_VALUE(FIRST_X_AXIS, x); y = AXIS_LOG_VALUE(FIRST_Y_AXIS, y); rx = AXIS_LOG_VALUE(FIRST_X_AXIS, ruler.x); ry = AXIS_LOG_VALUE(FIRST_Y_AXIS, ruler.y); format[0] = '\0'; strcat(format, " ("); strcat(format, mouse_setting.fmt); rho = sqrt((x - rx) * (x - rx) + (y - ry) * (y - ry)); /* distance */ if (mouse_setting.polardistance == 1) { /* (distance, angle) */ phi = (180 / M_PI) * atan2(y - ry, x - rx); # ifdef OS2 strcat(format, ";% #.4g)"); # else strcat(format, ", % #.4gdeg)"); # endif } else { /* mouse_setting.polardistance==2: (distance, tangent) */ phi = x - rx; phi = (phi == 0) ? ((y-ry>0) ? VERYLARGE : -VERYLARGE) : (y - ry)/phi; sprintf(format+strlen(format), ", tangent=%s)", mouse_setting.fmt); } sprintf(ptmp, format, rho, phi); strcat(p, ptmp); } } static struct t_zoom *zoom_head = NULL, *zoom_now = NULL; static AXIS axis_array_copy[AXIS_ARRAY_SIZE]; /* Applies the zoom rectangle of z by sending the appropriate command to gnuplot */ static void apply_zoom(struct t_zoom *z) { char s[1024]; /* HBB 20011005: made larger */ int is_splot_map = (is_3d_plot && (splot_map == TRUE)); int flip = 0; if (zoom_now != NULL) { /* remember the current zoom */ zoom_now->xmin = axis_array[FIRST_X_AXIS].set_min; zoom_now->xmax = axis_array[FIRST_X_AXIS].set_max; zoom_now->x2min = axis_array[SECOND_X_AXIS].set_min; zoom_now->x2max = axis_array[SECOND_X_AXIS].set_max; zoom_now->was_splot_map = is_splot_map; if (!is_splot_map) { /* 2D plot */ zoom_now->ymin = axis_array[FIRST_Y_AXIS].set_min; zoom_now->ymax = axis_array[FIRST_Y_AXIS].set_max; zoom_now->y2min = axis_array[SECOND_Y_AXIS].set_min; zoom_now->y2max = axis_array[SECOND_Y_AXIS].set_max; } else { /* the opposite, i.e. case 'set view map' */ zoom_now->ymin = axis_array[FIRST_Y_AXIS].set_max; zoom_now->ymax = axis_array[FIRST_Y_AXIS].set_min; zoom_now->y2min = axis_array[SECOND_Y_AXIS].set_max; zoom_now->y2max = axis_array[SECOND_Y_AXIS].set_min; } } /* EAM DEBUG - The autoscale save/restore was too complicated, and * broke refresh. Just save the complete axis state and have done with it. */ if (zoom_now == zoom_head && z != zoom_head) { memcpy(axis_array_copy, axis_array, sizeof(axis_array)); } /* If we are zooming, we don't want to autoscale the range. * This wasn't necessary before we introduced "refresh". Why? */ if (zoom_now == zoom_head && z != zoom_head) { axis_array[FIRST_X_AXIS].autoscale = AUTOSCALE_NONE; axis_array[FIRST_Y_AXIS].autoscale = AUTOSCALE_NONE; axis_array[SECOND_X_AXIS].autoscale = AUTOSCALE_NONE; axis_array[SECOND_Y_AXIS].autoscale = AUTOSCALE_NONE; } zoom_now = z; if (zoom_now == NULL) { alert(); return; } /* Now we're committed. Notify the terminal the the next replot is a zoom */ (*term->layer)(TERM_LAYER_BEFORE_ZOOM); flip = (is_splot_map && zoom_now->was_splot_map); sprintf(s, "set xr[%.12g:%.12g]; set yr[%.12g:%.12g]", zoom_now->xmin, zoom_now->xmax, (flip) ? zoom_now->ymax : zoom_now->ymin, (flip) ? zoom_now->ymin : zoom_now->ymax); if (!is_3d_plot) { sprintf(s + strlen(s), "; set x2r[% #g:% #g]; set y2r[% #g:% #g]", zoom_now->x2min, zoom_now->x2max, zoom_now->y2min, zoom_now->y2max); } /* EAM Jun 2007 - The autoscale save/restore was too complicated, and broke * refresh. Just save/restore the complete axis state and have done with it. * Well, not _quite_ the complete state. The labels are maintained dynamically. */ if (zoom_now == zoom_head) { int i; for (i=0; i<AXIS_ARRAY_SIZE; i++) { axis_array_copy[i].label = axis_array[i].label; axis_array_copy[i].ticdef.def.user = axis_array[i].ticdef.def.user; axis_array_copy[i].ticdef.font = axis_array[i].ticdef.font; } memcpy(axis_array, axis_array_copy, sizeof(axis_array)); s[0] = '\0'; /* FIXME: Is this better than calling replotrequest()? */ #ifdef VOLATILE_REFRESH /* Falling through to do_string_replot() does not work! */ if (volatile_data) { if (refresh_ok == 2) { refresh_request(); return; } if (is_splot_map && refresh_ok == 3) { refresh_request(); return; } } #endif } else { inside_zoom = TRUE; } do_string_replot(s); inside_zoom = FALSE; } /* makes a zoom: update zoom history, call gnuplot to set ranges + replot */ static void do_zoom(double xmin, double ymin, double x2min, double y2min, double xmax, double ymax, double x2max, double y2max) { struct t_zoom *z; if (zoom_head == NULL) { /* queue not yet created, thus make its head */ zoom_head = gp_alloc(sizeof(struct t_zoom), "mouse zoom history head"); zoom_head->prev = NULL; zoom_head->next = NULL; } if (zoom_now == NULL) zoom_now = zoom_head; if (zoom_now->next == NULL) { /* allocate new item */ z = gp_alloc(sizeof(struct t_zoom), "mouse zoom history element"); z->prev = zoom_now; z->next = NULL; zoom_now->next = z; z->prev = zoom_now; } else /* overwrite next item */ z = zoom_now->next; z->xmin = xmin; z->ymin = ymin; z->x2min = x2min; z->y2min = y2min; z->xmax = xmax; z->ymax = ymax; z->x2max = x2max; z->y2max = y2max; z->was_splot_map = (is_3d_plot && (splot_map == TRUE)); /* see is_splot_map in apply_zoom() */ apply_zoom(z); } static void ZoomNext() { if (zoom_now == NULL || zoom_now->next == NULL) alert(); else apply_zoom(zoom_now->next); if (display_ipc_commands()) { fprintf(stderr, "next zoom.\n"); } } static void ZoomPrevious() { if (zoom_now == NULL || zoom_now->prev == NULL) alert(); else apply_zoom(zoom_now->prev); if (display_ipc_commands()) { fprintf(stderr, "previous zoom.\n"); } } static void ZoomUnzoom() { if (zoom_head == NULL || zoom_now == zoom_head) alert(); else apply_zoom(zoom_head); if (display_ipc_commands()) { fprintf(stderr, "unzoom.\n"); } } static void incr_mousemode(const int amount) { long int old = mouse_mode; mouse_mode += amount; if (MOUSE_COORDINATES_ALT == mouse_mode && !(mouse_alt_string || polar)) mouse_mode += amount; /* stepping over */ if (mouse_mode > MOUSE_COORDINATES_ALT) { mouse_mode = MOUSE_COORDINATES_REAL1; } else if (mouse_mode <= MOUSE_COORDINATES_REAL) { mouse_mode = MOUSE_COORDINATES_ALT; if (!(mouse_alt_string || polar)) mouse_mode--; /* stepping over */ } UpdateStatusline(); if (display_ipc_commands()) fprintf(stderr, "switched mouse format from %ld to %ld\n", old, mouse_mode); } static void incr_clipboardmode(const int amount) { long int old = clipboard_mode; clipboard_mode += amount; if (MOUSE_COORDINATES_ALT == clipboard_mode && !clipboard_alt_string) { clipboard_mode += amount; /* stepping over */ } if (clipboard_mode > MOUSE_COORDINATES_ALT) { clipboard_mode = MOUSE_COORDINATES_REAL; } else if (clipboard_mode < MOUSE_COORDINATES_REAL) { clipboard_mode = MOUSE_COORDINATES_ALT; if (MOUSE_COORDINATES_ALT == clipboard_mode && !clipboard_alt_string) { clipboard_mode--; /* stepping over */ } } if (display_ipc_commands()) { fprintf(stderr, "switched clipboard format from %ld to %ld\n", old, clipboard_mode); } } # define TICS_ON(ti) (((ti)&TICS_MASK)!=NO_TICS) void UpdateStatusline() { UpdateStatuslineWithMouseSetting(&mouse_setting); } static void UpdateStatuslineWithMouseSetting(mouse_setting_t * ms) { char s0[256], *sp; if (!term_initialised) return; if (!ms->on) { s0[0] = 0; } else if (!ALMOST2D) { char format[0xff]; format[0] = '\0'; strcat(format, "view: "); strcat(format, ms->fmt); strcat(format, ", "); strcat(format, ms->fmt); strcat(format, " scale: "); strcat(format, ms->fmt); strcat(format, ", "); strcat(format, ms->fmt); sprintf(s0, format, surface_rot_x, surface_rot_z, surface_scale, surface_zscale); } else if (!TICS_ON(axis_array[SECOND_X_AXIS].ticmode) && !TICS_ON(axis_array[SECOND_Y_AXIS].ticmode)) { /* only first X and Y axis are in use */ sp = GetAnnotateString(s0, real_x, real_y, mouse_mode, mouse_alt_string); if (ruler.on) { GetRulerString(sp, real_x, real_y); } } else { /* X2 and/or Y2 are in use: use more verbose format */ sp = s0; if (TICS_ON(axis_array[FIRST_X_AXIS].ticmode)) { sp = stpcpy(sp, "x="); MKSTR(sp, real_x, FIRST_X_AXIS); *sp++ = ' '; } if (TICS_ON(axis_array[FIRST_Y_AXIS].ticmode)) { sp = stpcpy(sp, "y="); MKSTR(sp, real_y, FIRST_Y_AXIS); *sp++ = ' '; } if (TICS_ON(axis_array[SECOND_X_AXIS].ticmode)) { sp = stpcpy(sp, "x2="); MKSTR(sp, real_x2, SECOND_X_AXIS); *sp++ = ' '; } if (TICS_ON(axis_array[SECOND_Y_AXIS].ticmode)) { sp = stpcpy(sp, "y2="); MKSTR(sp, real_y2, SECOND_Y_AXIS); *sp++ = ' '; } if (ruler.on) { /* ruler on? then also print distances to ruler */ if (TICS_ON(axis_array[FIRST_X_AXIS].ticmode)) { stpcpy(sp,"dx="); sprintf(sp+3, mouse_setting.fmt, DIST(real_x, ruler.x, FIRST_X_AXIS)); sp += strlen(sp); } if (TICS_ON(axis_array[FIRST_Y_AXIS].ticmode)) { stpcpy(sp,"dy="); sprintf(sp+3, mouse_setting.fmt, DIST(real_y, ruler.y, FIRST_Y_AXIS)); sp += strlen(sp); } if (TICS_ON(axis_array[SECOND_X_AXIS].ticmode)) { stpcpy(sp,"dx2="); sprintf(sp+4, mouse_setting.fmt, DIST(real_x2, ruler.x2, SECOND_X_AXIS)); sp += strlen(sp); } if (TICS_ON(axis_array[SECOND_Y_AXIS].ticmode)) { stpcpy(sp,"dy2="); sprintf(sp+4, mouse_setting.fmt, DIST(real_y2, ruler.y2, SECOND_Y_AXIS)); sp += strlen(sp); } } *--sp = 0; /* delete trailing space */ } if (term->put_tmptext) { (term->put_tmptext) (0, s0); } } #undef MKSTR void recalc_statusline() { MousePosToGraphPosReal(mouse_x, mouse_y, &real_x, &real_y, &real_x2, &real_y2); UpdateStatusline(); } /****************** handlers for user's actions ******************/ static char * builtin_autoscale(struct gp_event_t *ge) { if (!ge) { return "`builtin-autoscale` (set autoscale keepfix; replot)"; } do_string_replot("set autoscale keepfix"); return (char *) 0; } static char * builtin_toggle_border(struct gp_event_t *ge) { if (!ge) return "`builtin-toggle-border`"; /* EAM July 2009 Cycle through border settings * - no border * - last border requested by the user * - default border * - (3D only) full border */ if (draw_border == 0 && draw_border != user_border) draw_border = user_border; else if (draw_border == user_border && draw_border != 31) draw_border = 31; else if (is_3d_plot && draw_border == 31) draw_border = 4095; else draw_border = 0; do_string_replot(""); return (char *) 0; } static char * builtin_replot(struct gp_event_t *ge) { if (!ge) { return "`builtin-replot`"; } do_string_replot(""); return (char *) 0; } static char * builtin_toggle_grid(struct gp_event_t *ge) { if (!ge) { return "`builtin-toggle-grid`"; } if (! some_grid_selected()) do_string_replot("set grid"); else do_string_replot("unset grid"); return (char *) 0; } static char * builtin_help(struct gp_event_t *ge) { if (!ge) { return "`builtin-help`"; } fprintf(stderr, "\n"); bind_display((char *) 0); /* display all bindings */ restore_prompt(); return (char *) 0; } static char * builtin_toggle_log(struct gp_event_t *ge) { if (!ge) return "`builtin-toggle-log` y logscale for plots, z and cb for splots"; if (volatile_data) int_warn(NO_CARET, "Cannot toggle log scale for volatile data"); else if ((color_box.bounds.xleft < mouse_x && mouse_x < color_box.bounds.xright) && (color_box.bounds.ybot < mouse_y && mouse_y < color_box.bounds.ytop)) do_string_replot( CB_AXIS.log ? "unset log cb" : "set log cb"); else if (is_3d_plot && !splot_map) do_string_replot( Z_AXIS.log ? "unset log z" : "set log z"); else do_string_replot( axis_array[FIRST_Y_AXIS].log ? "unset log y" : "set log y"); return (char *) 0; } static char * builtin_nearest_log(struct gp_event_t *ge) { if (!ge) return "`builtin-nearest-log` toggle logscale of axis nearest cursor"; if ((color_box.bounds.xleft < mouse_x && mouse_x < color_box.bounds.xright) && (color_box.bounds.ybot < mouse_y && mouse_y < color_box.bounds.ytop)) { do_string_replot( CB_AXIS.log ? "unset log cb" : "set log cb"); } else if (is_3d_plot && !splot_map) { do_string_replot( Z_AXIS.log ? "unset log z" : "set log z"); } else { /* 2D-plot: figure out which axis/axes is/are * close to the mouse cursor, and toggle those lin/log */ /* note: here it is assumed that the x axis is at * the bottom, x2 at top, y left and y2 right; it * would be better to derive that from the ..tics settings */ TBOOLEAN change_x1 = FALSE; TBOOLEAN change_y1 = FALSE; TBOOLEAN change_x2 = FALSE; TBOOLEAN change_y2 = FALSE; if (mouse_y < plot_bounds.ybot + (plot_bounds.ytop - plot_bounds.ybot) / 4 && mouse_x > plot_bounds.xleft && mouse_x < plot_bounds.xright) change_x1 = TRUE; if (mouse_x < plot_bounds.xleft + (plot_bounds.xright - plot_bounds.xleft) / 4 && mouse_y > plot_bounds.ybot && mouse_y < plot_bounds.ytop) change_y1 = TRUE; if (mouse_y > plot_bounds.ytop - (plot_bounds.ytop - plot_bounds.ybot) / 4 && mouse_x > plot_bounds.xleft && mouse_x < plot_bounds.xright) change_x2 = TRUE; if (mouse_x > plot_bounds.xright - (plot_bounds.xright - plot_bounds.xleft) / 4 && mouse_y > plot_bounds.ybot && mouse_y < plot_bounds.ytop) change_y2 = TRUE; if (change_x1) do_string(axis_array[FIRST_X_AXIS].log ? "unset log x" : "set log x"); if (change_y1) do_string(axis_array[FIRST_Y_AXIS].log ? "unset log y" : "set log y"); if (change_x2 && !splot_map) do_string(axis_array[SECOND_X_AXIS].log ? "unset log x2" : "set log x2"); if (change_y2 && !splot_map) do_string(axis_array[SECOND_Y_AXIS].log ? "unset log y2" : "set log y2"); if (!change_x1 && !change_y1 && splot_map) do_string_replot( Z_AXIS.log ? "unset log z" : "set log z"); if (change_x1 || change_y1 || change_x2 || change_y2) do_string_replot(""); } return (char *) 0; } static char * builtin_toggle_mouse(struct gp_event_t *ge) { if (!ge) { return "`builtin-toggle-mouse`"; } if (!mouse_setting.on) { mouse_setting.on = 1; if (display_ipc_commands()) { fprintf(stderr, "turning mouse on.\n"); } } else { mouse_setting.on = 0; if (display_ipc_commands()) { fprintf(stderr, "turning mouse off.\n"); } # if 0 if (ruler.on) { ruler.on = FALSE; (*term->set_ruler) (-1, -1); } # endif } # ifdef OS2 PM_update_menu_items(); # endif UpdateStatusline(); return (char *) 0; } static char * builtin_toggle_ruler(struct gp_event_t *ge) { if (!ge) { return "`builtin-toggle-ruler`"; } if (!term->set_ruler) return (char *) 0; if (ruler.on) { turn_ruler_off(); if (display_ipc_commands()) fprintf(stderr, "turning ruler off.\n"); } else if (ALMOST2D) { /* only allow ruler, if the plot * is 2d or a 3d `map' */ struct udvt_entry *u; ruler.on = TRUE; ruler.px = ge->mx; ruler.py = ge->my; MousePosToGraphPosReal(ruler.px, ruler.py, &ruler.x, &ruler.y, &ruler.x2, &ruler.y2); (*term->set_ruler) (ruler.px, ruler.py); if ((u = add_udv_by_name("MOUSE_RULER_X"))) { u->udv_undef = FALSE; Gcomplex(&u->udv_value,ruler.x,0); } if ((u = add_udv_by_name("MOUSE_RULER_Y"))) { u->udv_undef = FALSE; Gcomplex(&u->udv_value,ruler.y,0); } if (display_ipc_commands()) { fprintf(stderr, "turning ruler on.\n"); } } UpdateStatusline(); return (char *) 0; } static char * builtin_decrement_mousemode(struct gp_event_t *ge) { if (!ge) { return "`builtin-previous-mouse-format`"; } incr_mousemode(-1); return (char *) 0; } static char * builtin_increment_mousemode(struct gp_event_t *ge) { if (!ge) { return "`builtin-next-mouse-format`"; } incr_mousemode(1); return (char *) 0; } static char * builtin_decrement_clipboardmode(struct gp_event_t *ge) { if (!ge) { return "`builtin-decrement-clipboardmode`"; } incr_clipboardmode(-1); return (char *) 0; } static char * builtin_increment_clipboardmode(struct gp_event_t *ge) { if (!ge) { return "`builtin-increment-clipboardmode`"; } incr_clipboardmode(1); return (char *) 0; } static char * builtin_toggle_polardistance(struct gp_event_t *ge) { if (!ge) { return "`builtin-toggle-polardistance`"; } if (++mouse_setting.polardistance > 2) mouse_setting.polardistance = 0; /* values: 0 (no polar coordinates), 1 (polar coordinates), 2 (tangent instead of angle) */ term->set_cursor((mouse_setting.polardistance ? -3:-4), ge->mx, ge->my); /* change cursor type */ # ifdef OS2 PM_update_menu_items(); # endif UpdateStatusline(); if (display_ipc_commands()) { fprintf(stderr, "distance to ruler will %s be shown in polar coordinates.\n", mouse_setting.polardistance ? "" : "not"); } return (char *) 0; } static char * builtin_toggle_verbose(struct gp_event_t *ge) { if (!ge) { return "`builtin-toggle-verbose`"; } /* this is tricky as the command itself modifies * the state of display_ipc_commands() */ if (display_ipc_commands()) { fprintf(stderr, "echoing of communication commands is turned off.\n"); } toggle_display_of_ipc_commands(); if (display_ipc_commands()) { fprintf(stderr, "communication commands will be echoed.\n"); } return (char *) 0; } static char * builtin_toggle_ratio(struct gp_event_t *ge) { if (!ge) { return "`builtin-toggle-ratio`"; } if (aspect_ratio == 0) do_string_replot("set size ratio -1"); else if (aspect_ratio == 1) do_string_replot("set size nosquare"); else do_string_replot("set size square"); return (char *) 0; } static char * builtin_zoom_next(struct gp_event_t *ge) { if (!ge) { return "`builtin-zoom-next` go to next zoom in the zoom stack"; } ZoomNext(); return (char *) 0; } static char * builtin_zoom_previous(struct gp_event_t *ge) { if (!ge) { return "`builtin-zoom-previous` go to previous zoom in the zoom stack"; } ZoomPrevious(); return (char *) 0; } static char * builtin_unzoom(struct gp_event_t *ge) { if (!ge) { return "`builtin-unzoom`"; } ZoomUnzoom(); return (char *) 0; } static char * builtin_rotate_right(struct gp_event_t *ge) { if (!ge) { return "`builtin-rotate-right` only for splots; <shift> increases amount"; } if (is_3d_plot) ChangeView(0, -1); return (char *) 0; } static char * builtin_rotate_left(struct gp_event_t *ge) { if (!ge) { return "`builtin-rotate-left` only for splots; <shift> increases amount"; } if (is_3d_plot) ChangeView(0, 1); return (char *) 0; } static char * builtin_rotate_up(struct gp_event_t *ge) { if (!ge) { return "`builtin-rotate-up` only for splots; <shift> increases amount"; } if (is_3d_plot) ChangeView(1, 0); return (char *) 0; } static char * builtin_rotate_down(struct gp_event_t *ge) { if (!ge) { return "`builtin-rotate-down` only for splots; <shift> increases amount"; } if (is_3d_plot) ChangeView(-1, 0); return (char *) 0; } static char * builtin_cancel_zoom(struct gp_event_t *ge) { if (!ge) { return "`builtin-cancel-zoom` cancel zoom region"; } if (!setting_zoom_region) return (char *) 0; if (term->set_cursor) term->set_cursor(0, 0, 0); setting_zoom_region = FALSE; if (display_ipc_commands()) { fprintf(stderr, "zooming cancelled.\n"); } return (char *) 0; } static void event_keypress(struct gp_event_t *ge, TBOOLEAN current) { int x, y; int c, par2; bind_t *ptr; bind_t keypress; c = ge->par1; par2 = ge->par2; x = ge->mx; y = ge->my; if (!bindings) { bind_install_default_bindings(); } if ((modifier_mask & Mod_Shift) && ((c & 0xff) == 0)) { c = toupper(c); } bind_clear(&keypress); keypress.key = c; keypress.modifier = modifier_mask; /* * On 'pause mouse keypress' in active window export current keypress * and mouse coords to user variables. A key with 'bind all' terminates * a pause even from non-active windows. * Ignore NULL keypress. * * If we are paused for a keystroke, this takes precendence over normal * key bindings. Otherwise, for example typing 'm' would turn off mousing, * which is a bad thing if you are in the middle of a mousing operation. */ #ifdef _Windows if (paused_for_mouse & PAUSE_KEYSTROKE) kill_pending_Pause_dialog(); #endif if ((paused_for_mouse & PAUSE_KEYSTROKE) && (c > '\0') && current) { load_mouse_variables(x, y, FALSE, c); return; } for (ptr = bindings; ptr; ptr = ptr->next) { if (bind_matches(&keypress, ptr)) { struct udvt_entry *keywin; if ((keywin = add_udv_by_name("MOUSE_KEY_WINDOW"))) { keywin->udv_undef = FALSE; Ginteger(&keywin->udv_value, ge->winid); } /* Always honor keys set with "bind all" */ if (ptr->allwindows && ptr->command) { if (current) load_mouse_variables(x, y, FALSE, c); else /* FIXME - Better to clear MOUSE_[XY] than to set it wrongly. */ /* This may be worth a separate subroutine. */ load_mouse_variables(0, 0, FALSE, c); do_string(ptr->command); /* Treat as a current event after we return to x11.trm */ ge->type = GE_keypress; break; /* But otherwise ignore inactive windows */ } else if (!current) { break; /* Let user defined bindings overwrite the builtin bindings */ } else if ((par2 & 1) == 0 && ptr->command) { do_string(ptr->command); break; } else if (ptr->builtin) { ptr->builtin(ge); } else { fprintf(stderr, "%s:%d protocol error\n", __FILE__, __LINE__); } } } } static void ChangeView(int x, int z) { if (modifier_mask & Mod_Shift) { x *= 10; z *= 10; } if (x) { surface_rot_x += x; if (surface_rot_x < 0) surface_rot_x += 360; if (surface_rot_x > 360) surface_rot_x -= 360; } if (z) { surface_rot_z += z; if (surface_rot_z < 0) surface_rot_z += 360; if (surface_rot_z > 360) surface_rot_z -= 360; } if (x || z) { fill_gpval_float("GPVAL_VIEW_ROT_X", surface_rot_x); fill_gpval_float("GPVAL_VIEW_ROT_Z", surface_rot_z); } if (display_ipc_commands()) { fprintf(stderr, "changing view to %f, %f.\n", surface_rot_x, surface_rot_z); } do_save_3dplot(first_3dplot, plot3d_num, 0 /* not quick */ ); if (ALMOST2D) { /* 2D plot, or suitably aligned 3D plot: update statusline */ if (!term->put_tmptext) return; recalc_statusline(); } } /* Return a new (upper or lower) axis limit that is a linear combination of the current limits. */ static double rescale(int AXIS, double w1, double w2) { double logval, val; logval = w1*axis_array[AXIS].min+w2*axis_array[AXIS].max; val = AXIS_DE_LOG_VALUE(AXIS,logval); return val; } static void event_buttonpress(struct gp_event_t *ge) { int b; motion = 0; b = ge->par1; mouse_x = ge->mx; mouse_y = ge->my; button |= (1 << b); FPRINTF((stderr, "(event_buttonpress) mouse_x = %d\tmouse_y = %d\n", mouse_x, mouse_y)); MousePosToGraphPosReal(mouse_x, mouse_y, &real_x, &real_y, &real_x2, &real_y2); if ((b == 4 || b == 6) && /* 4 - wheel up, 6 - wheel left */ (!replot_disabled || refresh_ok) /* Use refresh if available */ && !(paused_for_mouse & PAUSE_BUTTON3)) { double xmin, ymin, x2min, y2min; double xmax, ymax, x2max, y2max; if ((b == 4) && (modifier_mask & Mod_Ctrl)) { if (modifier_mask & Mod_Shift) { /* zoom in (X axis only) */ double w1=23./25.; double w2= 2./25.; xmin = rescale(FIRST_X_AXIS, w1, w2); ymin = rescale(FIRST_Y_AXIS, 1., 0.); x2min = rescale(SECOND_X_AXIS, w1, w2); y2min = rescale(SECOND_Y_AXIS, 1., 0.); xmax = rescale(FIRST_X_AXIS, w2,w1); ymax = rescale(FIRST_Y_AXIS, 0., 1.); x2max = rescale(SECOND_X_AXIS, w2, w1); y2max = rescale(SECOND_Y_AXIS, 0., 1.); do_zoom(xmin, ymin, x2min, y2min, xmax, ymax, x2max, y2max); if (display_ipc_commands()) { fprintf(stderr, "zoom in X.\n"); } } else { /* zoom in (factor of approximatly 2^(.25), so four steps gives 2x larger) */ double w1=23./25.; double w2= 2./25.; xmin = rescale(FIRST_X_AXIS, w1, w2); ymin = rescale(FIRST_Y_AXIS, w1, w2); x2min = rescale(SECOND_X_AXIS, w1, w2); y2min = rescale(SECOND_Y_AXIS, w1, w2); xmax = rescale(FIRST_X_AXIS, w2, w1); ymax = rescale(FIRST_Y_AXIS, w2, w1); x2max = rescale(SECOND_X_AXIS, w2, w1); y2max = rescale(SECOND_Y_AXIS, w2, w1); do_zoom(xmin, ymin, x2min, y2min, xmax, ymax, x2max, y2max); if (display_ipc_commands()) { fprintf(stderr, "zoom in.\n"); } } } else { #if DO_ZOOM_AND_APPLY_ZOOM_FIXED_TO_HANDLE_Z_AXIS if ((b == 4) && (modifier_mask & Mod_Alt)) { /* scroll in +Z direction */ xmin = rescale(FIRST_X_AXIS, 1., 0.); ymin = rescale(FIRST_Y_AXIS, 1., 0.); x2min = rescale(SECOND_X_AXIS, 1., 0.); y2min = rescale(SECOND_Y_AXIS, 1., 0.); zmin = rescale(FIRST_Z_AXIS, .9, .1); xmax = rescale(FIRST_X_AXIS, 0., 1.); ymax = rescale(FIRST_Y_AXIS, 0., 1.); x2max = rescale(SECOND_X_AXIS, 0., 1.); y2max = rescale(SECOND_Y_AXIS, 0., 1.); zmax = rescale(FIRST_Z_AXIS, 1.1, -.1); do_zoom(xmin, ymin, x2min, y2min, zmin, xmax, ymax, x2max, y2max, zmax); if (display_ipc_commands()) { fprintf(stderr, "scroll left.\n"); } } else #endif if (((b == 4) && (modifier_mask & Mod_Shift)) || (b == 6)) { /* scroll left */ xmin = rescale(FIRST_X_AXIS, 1.1, -.1); ymin = rescale(FIRST_Y_AXIS, 1., 0.); x2min = rescale(SECOND_X_AXIS, 1.1, -.1); y2min = rescale(SECOND_Y_AXIS, 1., 0.); xmax = rescale(FIRST_X_AXIS, .1, .9); ymax = rescale(FIRST_Y_AXIS, 0., 1.); x2max = rescale(SECOND_X_AXIS, .1, .9); y2max = rescale(SECOND_Y_AXIS, 0., 1.); do_zoom(xmin, ymin, x2min, y2min, xmax, ymax, x2max, y2max); if (display_ipc_commands()) { fprintf(stderr, "scroll left.\n"); } } else { /* scroll up */ xmin = rescale(FIRST_X_AXIS, 1., 0.); ymin = rescale(FIRST_Y_AXIS, .9,.1); x2min = rescale(SECOND_X_AXIS, 1.,0.); y2min = rescale(SECOND_Y_AXIS, .9, .1); xmax = rescale(FIRST_X_AXIS, 0., 1.); ymax = rescale(FIRST_Y_AXIS, -.1,1.1); x2max = rescale(SECOND_X_AXIS, 0., 1.); y2max = rescale(SECOND_Y_AXIS, -.1, 1.1); do_zoom(xmin, ymin, x2min, y2min, xmax, ymax, x2max, y2max); if (display_ipc_commands()) { fprintf(stderr, "scroll up.\n"); } } } } else if (((b == 5) || (b == 7)) && /* 5 - wheel down, 7 - wheel right */ (!replot_disabled || refresh_ok) /* Use refresh if available */ && !(paused_for_mouse & PAUSE_BUTTON3)) { double xmin, ymin, x2min, y2min; double xmax, ymax, x2max, y2max; if ((b == 5) && (modifier_mask & Mod_Ctrl)) { if (modifier_mask & Mod_Shift) { /* zoom out (X axis only) */ double w1= 23./21.; double w2=-2./21.; xmin = rescale(FIRST_X_AXIS, w1, w2); ymin = rescale(FIRST_Y_AXIS, 1., 0.); x2min = rescale(SECOND_X_AXIS, w1, w2); y2min = rescale(SECOND_Y_AXIS, 1., 0.); xmax = rescale(FIRST_X_AXIS, w2, w1); ymax = rescale(FIRST_Y_AXIS, 0., 1.); x2max = rescale(SECOND_X_AXIS, w2, w1); y2max = rescale(SECOND_Y_AXIS, 0., 1.); do_zoom(xmin, ymin, x2min, y2min, xmax, ymax, x2max, y2max); if (display_ipc_commands()) { fprintf(stderr, "zoom out X.\n"); } } else { /* zoom out (exactly undo a zoom in step) */ double w1= 23./21.; double w2=-2./21.; xmin = rescale(FIRST_X_AXIS, w1, w2); ymin = rescale(FIRST_Y_AXIS, w1, w2); x2min = rescale(SECOND_X_AXIS, w1, w2); y2min = rescale(SECOND_Y_AXIS, w1, w2); xmax = rescale(FIRST_X_AXIS, w2, w1); ymax = rescale(FIRST_Y_AXIS, w2, w1); x2max = rescale(SECOND_X_AXIS, w2, w1); y2max = rescale(SECOND_Y_AXIS, w2, w1); do_zoom(xmin, ymin, x2min, y2min, xmax, ymax, x2max, y2max); if (display_ipc_commands()) { fprintf(stderr, "zoom out.\n"); } } } else { if (((b == 5) && (modifier_mask & Mod_Shift)) || (b == 7)) { /* scroll right */ xmin = rescale(FIRST_X_AXIS, .9, .1); ymin = rescale(FIRST_Y_AXIS, 1., 0.); x2min = rescale(SECOND_X_AXIS, .9, .1); y2min = rescale(SECOND_Y_AXIS, 1., 0.); xmax = rescale(FIRST_X_AXIS, -.1, 1.1); ymax = rescale(FIRST_Y_AXIS, 0., 1.); x2max = rescale(SECOND_X_AXIS, -.1, 1.1); y2max = rescale(SECOND_Y_AXIS, 0., 1.); do_zoom(xmin, ymin, x2min, y2min, xmax, ymax, x2max, y2max); if (display_ipc_commands()) { fprintf(stderr, "scroll right.\n"); } } else { /* scroll down */ xmin = rescale(FIRST_X_AXIS, 1., 0.); ymin = rescale(FIRST_Y_AXIS, 1.1, -.1); x2min = rescale(SECOND_X_AXIS, 1., 0.); y2min = rescale(SECOND_Y_AXIS, 1.1, -.1); xmax = rescale(FIRST_X_AXIS, 0., 1.); ymax = rescale(FIRST_Y_AXIS, .1, .9); x2max = rescale(SECOND_X_AXIS, 0., 1.); y2max = rescale(SECOND_Y_AXIS, .1, .9); rescale(FIRST_Y_AXIS, 1.1,-.1); rescale(FIRST_Y_AXIS, .1,.9); do_zoom(xmin, ymin, x2min, y2min, xmax, ymax, x2max, y2max); if (display_ipc_commands()) { fprintf(stderr, "scroll down.\n"); } } } } else if (ALMOST2D) { if (!setting_zoom_region) { if (1 == b) { /* not bound in 2d graphs */ } else if (2 == b) { /* not bound in 2d graphs */ } else if (3 == b && (!replot_disabled || refresh_ok) /* Use refresh if available */ && !(paused_for_mouse & PAUSE_BUTTON3)) { /* start zoom; but ignore it when * - replot is disabled, e.g. with inline data, or * - during 'pause mouse' * allow zooming during 'pause mouse key' */ setting_zoom_x = mouse_x; setting_zoom_y = mouse_y; setting_zoom_region = TRUE; if (term->set_cursor) { int mv_mouse_x, mv_mouse_y; if (mouse_setting.annotate_zoom_box && term->put_tmptext) { double real_x, real_y, real_x2, real_y2; char s[64]; /* tell driver annotations */ MousePosToGraphPosReal(mouse_x, mouse_y, &real_x, &real_y, &real_x2, &real_y2); sprintf(s, zoombox_format(), real_x, real_y); term->put_tmptext(1, s); term->put_tmptext(2, s); } /* displace mouse in order not to start with an empty zoom box */ mv_mouse_x = term->xmax / 20; mv_mouse_y = (term->xmax == term->ymax) ? mv_mouse_x : (int) ((mv_mouse_x * (double) term->ymax) / term->xmax); mv_mouse_x += mouse_x; mv_mouse_y += mouse_y; /* change cursor type */ term->set_cursor(3, 0, 0); /* warp pointer */ if (mouse_setting.warp_pointer) term->set_cursor(-2, mv_mouse_x, mv_mouse_y); /* turn on the zoom box */ term->set_cursor(-1, setting_zoom_x, setting_zoom_y); } if (display_ipc_commands()) { fprintf(stderr, "starting zoom region.\n"); } } } else { /* complete zoom (any button * finishes zooming.) */ /* the following variables are used to check, * if the box is big enough to be considered * as zoom box. */ int dist_x = setting_zoom_x - mouse_x; int dist_y = setting_zoom_y - mouse_y; int dist = sqrt((double)(dist_x * dist_x + dist_y * dist_y)); if (1 == b || 2 == b) { /* zoom region is finished by the `wrong' button. * `trap' the next button-release event so that * it won't trigger the actions which are bound * to these events. */ trap_release = TRUE; } if (term->set_cursor) { term->set_cursor(0, 0, 0); if (mouse_setting.annotate_zoom_box && term->put_tmptext) { term->put_tmptext(1, ""); term->put_tmptext(2, ""); } } if (dist > 10 /* more ore less arbitrary */ ) { double xmin, ymin, x2min, y2min; double xmax, ymax, x2max, y2max; MousePosToGraphPosReal(setting_zoom_x, setting_zoom_y, &xmin, &ymin, &x2min, &y2min); xmax = real_x; x2max = real_x2; ymax = real_y; y2max = real_y2; /* keep the axes (no)reversed as they are now */ #define sgn(x) (x==0 ? 0 : (x>0 ? 1 : -1)) #define rev(a1,a2,A) if (sgn(a2-a1) != sgn(axis_array[A].max-axis_array[A].min)) \ { double tmp = a1; a1 = a2; a2 = tmp; } rev(xmin, xmax, FIRST_X_AXIS); rev(ymin, ymax, FIRST_Y_AXIS); rev(x2min, x2max, SECOND_X_AXIS); rev(y2min, y2max, SECOND_Y_AXIS); #undef rev #undef sgn do_zoom(xmin, ymin, x2min, y2min, xmax, ymax, x2max, y2max); if (display_ipc_commands()) { fprintf(stderr, "zoom region finished.\n"); } } else { /* silently ignore a tiny zoom box. This might * happen, if the user starts and finishes the * zoom box at the same position. */ } setting_zoom_region = FALSE; } } else { if (term->set_cursor) { if (button & (1 << 1)) term->set_cursor(1, 0, 0); else if (button & (1 << 2)) term->set_cursor(2, 0, 0); } } start_x = mouse_x; start_y = mouse_y; zero_rot_z = surface_rot_z + 360.0 * mouse_x / term->xmax; /* zero_rot_x = surface_rot_x - 180.0 * mouse_y / term->ymax; */ zero_rot_x = surface_rot_x - 360.0 * mouse_y / term->ymax; } static void event_buttonrelease(struct gp_event_t *ge) { int b, doubleclick; b = ge->par1; mouse_x = ge->mx; mouse_y = ge->my; doubleclick = ge->par2; button &= ~(1 << b); /* remove button */ if (setting_zoom_region) { return; } if (TRUE == trap_release) { trap_release = FALSE; return; } MousePosToGraphPosReal(mouse_x, mouse_y, &real_x, &real_y, &real_x2, &real_y2); FPRINTF((stderr, "MOUSE.C: doublclick=%i, set=%i, motion=%i, ALMOST2D=%i\n", (int) doubleclick, (int) mouse_setting.doubleclick, (int) motion, (int) ALMOST2D)); if (ALMOST2D) { char s0[256]; if (b == 1 && term->set_clipboard && ((doubleclick <= mouse_setting.doubleclick) || !mouse_setting.doubleclick)) { /* put coordinates to clipboard. For 3d plots this takes * only place, if the user didn't drag (rotate) the plot */ if (!is_3d_plot || !motion) { GetAnnotateString(s0, real_x, real_y, clipboard_mode, clipboard_alt_string); term->set_clipboard(s0); if (display_ipc_commands()) { fprintf(stderr, "put `%s' to clipboard.\n", s0); } } } if (b == 2) { /* draw temporary annotation or label. For 3d plots this takes * only place, if the user didn't drag (scale) the plot */ if (!is_3d_plot || !motion) { GetAnnotateString(s0, real_x, real_y, mouse_mode, mouse_alt_string); if (mouse_setting.label) { if (modifier_mask & Mod_Ctrl) { remove_label(mouse_x, mouse_y); } else { put_label(s0, real_x, real_y); } } else { int dx, dy; int x = mouse_x; int y = mouse_y; dx = term->h_tic; dy = term->v_tic; (term->linewidth) (border_lp.l_width); (term->linetype) (border_lp.l_type); (term->move) (x - dx, y); (term->vector) (x + dx, y); (term->move) (x, y - dy); (term->vector) (x, y + dy); (term->justify_text) (LEFT); (term->put_text) (x + dx / 2, y + dy / 2 + term->v_char / 3, s0); (term->text) (); } } } } if (is_3d_plot && (b == 1 || b == 2)) { if (!!(modifier_mask & Mod_Ctrl) && !needreplot) { /* redraw the 3d plot if its last redraw was 'quick' * (only axes) because modifier key was pressed */ do_save_3dplot(first_3dplot, plot3d_num, 0); } if (term->set_cursor) term->set_cursor(0, 0, 0); } /* Export current mouse coords to user-accessible variables also */ load_mouse_variables(mouse_x, mouse_y, TRUE, b); UpdateStatusline(); /* In 2D mouse button 1 is available for "bind" commands */ if (!is_3d_plot && (b == 1)) { ge->par1 = GP_Button1; ge->par2 = 0; event_keypress(ge, TRUE); } #ifdef _Windows if (paused_for_mouse & PAUSE_CLICK) { /* remove pause message box after 'pause mouse' */ #ifndef WGP_CONSOLE paused_for_mouse = 0; #endif kill_pending_Pause_dialog(); } #endif } static void event_motion(struct gp_event_t *ge) { motion = 1; mouse_x = ge->mx; mouse_y = ge->my; if (is_3d_plot && (splot_map == FALSE) /* Rotate the surface if it is 3D graph but not "set view map". */ ) { TBOOLEAN redraw = FALSE; if (button & (1 << 1)) { /* dragging with button 1 -> rotate */ /*surface_rot_x = floor(0.5 + zero_rot_x + 180.0 * mouse_y / term->ymax);*/ surface_rot_x = floor(0.5 + fmod(zero_rot_x + 360.0 * mouse_y / term->ymax, 360)); if (surface_rot_x < 0) surface_rot_x += 360; if (surface_rot_x > 360) surface_rot_x -= 360; surface_rot_z = floor(0.5 + fmod(zero_rot_z - 360.0 * mouse_x / term->xmax, 360)); if (surface_rot_z < 0) surface_rot_z += 360; redraw = TRUE; } else if (button & (1 << 2)) { /* dragging with button 2 -> scale or changing ticslevel. * we compare the movement in x and y direction, and * change either scale or zscale */ double relx, rely; relx = fabs(mouse_x - start_x) / term->h_tic; rely = fabs(mouse_y - start_y) / term->v_tic; # if 0 /* threshold: motion should be at least 3 pixels. * We've to experiment with this. */ if (relx < 3 && rely < 3) return; # endif if (modifier_mask & Mod_Shift) { xyplane.z += (1 + fabs(xyplane.z)) * (mouse_y - start_y) * 2.0 / term->ymax; } else { if (relx > rely) { surface_lscale += (mouse_x - start_x) * 2.0 / term->xmax; surface_scale = exp(surface_lscale); if (surface_scale < 0) surface_scale = 0; } else { if (disable_mouse_z && (mouse_y-start_y > 0)) ; else { surface_zscale += (mouse_y - start_y) * 2.0 / term->ymax; disable_mouse_z = FALSE; } if (surface_zscale < 0) surface_zscale = 0; } } /* reset the start values */ start_x = mouse_x; start_y = mouse_y; redraw = TRUE; } /* if (mousebutton 2 is down) */ if (!ALMOST2D) { turn_ruler_off(); } if (redraw) { if (allowmotion) { /* is processing of motions allowed right now? * then replot while * disabling further replots until it completes */ allowmotion = FALSE; do_save_3dplot(first_3dplot, plot3d_num, !!(modifier_mask & Mod_Ctrl)); fill_gpval_float("GPVAL_VIEW_ROT_X", surface_rot_x); fill_gpval_float("GPVAL_VIEW_ROT_Z", surface_rot_z); fill_gpval_float("GPVAL_VIEW_SCALE", surface_scale); fill_gpval_float("GPVAL_VIEW_ZSCALE", surface_zscale); } else { /* postpone the replotting */ needreplot = TRUE; } } } /* if (3D plot) */ if (ALMOST2D) { /* 2D plot, or suitably aligned 3D plot: update * statusline and possibly the zoombox annotation */ if (!term->put_tmptext) return; MousePosToGraphPosReal(mouse_x, mouse_y, &real_x, &real_y, &real_x2, &real_y2); UpdateStatusline(); if (setting_zoom_region && mouse_setting.annotate_zoom_box) { double real_x, real_y, real_x2, real_y2; char s[64]; MousePosToGraphPosReal(mouse_x, mouse_y, &real_x, &real_y, &real_x2, &real_y2); sprintf(s, zoombox_format(), real_x, real_y); term->put_tmptext(2, s); } } } static void event_modifier(struct gp_event_t *ge) { modifier_mask = ge->par1; if (modifier_mask == 0 && is_3d_plot && (button & ((1 << 1) | (1 << 2))) && !needreplot) { /* redraw the 3d plot if modifier key released */ do_save_3dplot(first_3dplot, plot3d_num, 0); } } void event_plotdone() { if (needreplot) { needreplot = FALSE; do_save_3dplot(first_3dplot, plot3d_num, !!(modifier_mask & Mod_Ctrl)); } else { allowmotion = TRUE; } } void event_reset(struct gp_event_t *ge) { modifier_mask = 0; button = 0; builtin_cancel_zoom(ge); if (term && term->set_cursor) { term->set_cursor(0, 0, 0); if (mouse_setting.annotate_zoom_box && term->put_tmptext) { term->put_tmptext(1, ""); term->put_tmptext(2, ""); } } if (paused_for_mouse) { paused_for_mouse = 0; #ifdef _Windows /* remove pause message box after 'pause mouse' */ kill_pending_Pause_dialog(); #endif /* This hack is necessary on some systems in order to prevent one */ /* character of input from being swallowed when the plot window is */ /* closed. But which systems, exactly? */ if (term && (!strncmp("x11",term->name,3) || !strncmp("wxt",term->name,3))) ungetc('\n',stdin); } /* Dummy up a keystroke event so that we can conveniently check for a */ /* binding to "Close". We only get these for the current window. */ if (ge != (void *)1) { ge->par1 = GP_Cancel; /* Dummy keystroke */ ge->par2 = 0; /* Not used; could pass window id here? */ event_keypress(ge, TRUE); } } void do_event(struct gp_event_t *ge) { if (!term) return; if (multiplot && ge->type != GE_fontprops) /* only informational event processing for multiplot */ return; /* disable `replot` when some data were sent through stdin */ replot_disabled = plotted_data_from_stdin; if (ge->type) { FPRINTF((stderr, "(do_event) type = %d\n", ge->type)); FPRINTF((stderr, " mx, my = %d, %d\n", ge->mx, ge->my)); FPRINTF((stderr, " par1, par2 = %d, %d\n", ge->par1, ge->par2)); } switch (ge->type) { case GE_plotdone: event_plotdone(); if (ge->winid) { current_x11_windowid = ge->winid; update_gpval_variables(6); /* fill GPVAL_TERM_WINDOWID */ } break; case GE_keypress: event_keypress(ge, TRUE); break; case GE_keypress_old: event_keypress(ge, FALSE); break; case GE_modifier: event_modifier(ge); break; case GE_motion: if (!mouse_setting.on) break; event_motion(ge); break; case GE_buttonpress: if (!mouse_setting.on) break; event_buttonpress(ge); break; case GE_buttonrelease: if (!mouse_setting.on) break; event_buttonrelease(ge); break; case GE_replot: /* used only by ggi.trm */ do_string("replot"); break; case GE_reset: event_reset(ge); break; case GE_fontprops: term->h_char = ge->par1; term->v_char = ge->par2; /* Update aspect ratio based on current window size */ term->v_tic = term->h_tic * (double)ge->mx / (double)ge->my; /* EAM FIXME - We could also update term->xmax and term->ymax here, */ /* but the existing code doesn't expect it to change. */ FPRINTF((stderr, "mouse do_event: window size %d X %d, font hchar %d vchar %d\n", ge->mx, ge->my, ge->par1,ge->par2)); break; case GE_buttonpress_old: case GE_buttonrelease_old: /* ignore */ break; default: fprintf(stderr, "%s:%d protocol error\n", __FILE__, __LINE__); break; } replot_disabled = FALSE; /* enable replot again */ } static void do_save_3dplot(struct surface_points *plots, int pcount, int quick) { #define M_TEST_AXIS(A) \ (A.log && ((!(A.set_autoscale & AUTOSCALE_MIN) && A.set_min <= 0) || \ (!(A.set_autoscale & AUTOSCALE_MAX) && A.set_max <= 0))) if (!plots || !refresh_ok) { /* !plots might happen after the `reset' command for example * (reported by Franz Bakan). * !refresh_ok can happen for example if log scaling is reset (EAM). * replotrequest() should set up everything again in either case. */ replotrequest(); } else { if (M_TEST_AXIS(X_AXIS) || M_TEST_AXIS(Y_AXIS) || M_TEST_AXIS(Z_AXIS) || M_TEST_AXIS(CB_AXIS) ) { graph_error("axis ranges must be above 0 for log scale!"); return; } do_3dplot(plots, pcount, quick); } #undef M_TEST_AXIS } /* * bind related functions */ static void bind_install_default_bindings() { bind_remove_all(); bind_append("a", (char *) 0, builtin_autoscale); bind_append("b", (char *) 0, builtin_toggle_border); bind_append("e", (char *) 0, builtin_replot); bind_append("g", (char *) 0, builtin_toggle_grid); bind_append("h", (char *) 0, builtin_help); bind_append("l", (char *) 0, builtin_toggle_log); bind_append("L", (char *) 0, builtin_nearest_log); bind_append("m", (char *) 0, builtin_toggle_mouse); bind_append("r", (char *) 0, builtin_toggle_ruler); bind_append("1", (char *) 0, builtin_decrement_mousemode); bind_append("2", (char *) 0, builtin_increment_mousemode); bind_append("3", (char *) 0, builtin_decrement_clipboardmode); bind_append("4", (char *) 0, builtin_increment_clipboardmode); bind_append("5", (char *) 0, builtin_toggle_polardistance); bind_append("6", (char *) 0, builtin_toggle_verbose); bind_append("7", (char *) 0, builtin_toggle_ratio); bind_append("n", (char *) 0, builtin_zoom_next); bind_append("p", (char *) 0, builtin_zoom_previous); bind_append("u", (char *) 0, builtin_unzoom); bind_append("Right", (char *) 0, builtin_rotate_right); bind_append("Up", (char *) 0, builtin_rotate_up); bind_append("Left", (char *) 0, builtin_rotate_left); bind_append("Down", (char *) 0, builtin_rotate_down); bind_append("Escape", (char *) 0, builtin_cancel_zoom); } static void bind_clear(bind_t * b) { b->key = NO_KEY; b->modifier = 0; b->command = (char *) 0; b->builtin = 0; b->prev = (struct bind_t *) 0; b->next = (struct bind_t *) 0; } /* returns the enum which corresponds to the * string (ptr) or NO_KEY if ptr matches not * any of special_keys. */ static int lookup_key(char *ptr, int *len) { char **keyptr; /* first, search in the table of "usual well-known" keys */ int what = lookup_table_nth(usual_special_keys, ptr); if (what >= 0) { *len = strlen(usual_special_keys[what].key); return usual_special_keys[what].value; } /* second, search in the table of other keys */ for (keyptr = special_keys; *keyptr; ++keyptr) { if (!strcmp(ptr, *keyptr)) { *len = strlen(ptr); return keyptr - special_keys + GP_FIRST_KEY; } } return NO_KEY; } /* returns 1 on success, else 0. */ static int bind_scan_lhs(bind_t * out, const char *in) { static const char DELIM = '-'; int itmp = NO_KEY; char *ptr; int len; bind_clear(out); if (!in) { return 0; } for (ptr = (char *) in; ptr && *ptr; /* EMPTY */ ) { if (!strncasecmp(ptr, "alt-", 4)) { out->modifier |= Mod_Alt; ptr += 4; } else if (!strncasecmp(ptr, "ctrl-", 5)) { out->modifier |= Mod_Ctrl; ptr += 5; } else if (NO_KEY != (itmp = lookup_key(ptr, &len))) { out->key = itmp; ptr += len; } else if ((out->key = *ptr++) && *ptr && *ptr != DELIM) { fprintf(stderr, "bind: cannot parse %s\n", in); return 0; } } if (NO_KEY == out->key) return 0; /* failed */ else return 1; /* success */ } /* note, that this returns a pointer * to the static char* `out' which is * modified on subsequent calls. */ static char * bind_fmt_lhs(const bind_t * in) { static char out[0x40]; out[0] = '\0'; /* empty string */ if (!in) return out; if (in->modifier & Mod_Ctrl) { sprintf(out, "Ctrl-"); } if (in->modifier & Mod_Alt) { strcat(out, "%sAlt-"); } if (in->key > GP_FIRST_KEY && in->key < GP_LAST_KEY) { strcat(out,special_keys[in->key - GP_FIRST_KEY]); } else { int k = 0; for ( ; usual_special_keys[k].value > 0; k++) { if (usual_special_keys[k].value == in->key) { strcat(out, usual_special_keys[k].key); k = -1; break; } } if (k >= 0) { char foo[2] = {'\0','\0'}; foo[0] = in->key; strcat(out,foo); } } return out; } static int bind_matches(const bind_t * a, const bind_t * b) { /* discard Shift modifier */ int a_mod = a->modifier & (Mod_Ctrl | Mod_Alt); int b_mod = b->modifier & (Mod_Ctrl | Mod_Alt); if (a->key == b->key && a_mod == b_mod) return 1; else return 0; } static void bind_display_one(bind_t * ptr) { fprintf(stderr, " %-12s ", bind_fmt_lhs(ptr)); fprintf(stderr, "%c ", ptr->allwindows ? '*' : ' '); if (ptr->command) { fprintf(stderr, "`%s'\n", ptr->command); } else if (ptr->builtin) { fprintf(stderr, "%s\n", ptr->builtin(0)); } else { fprintf(stderr, "`%s:%d oops.'\n", __FILE__, __LINE__); } } static void bind_display(char *lhs) { bind_t *ptr; bind_t lhs_scanned; if (!bindings) { bind_install_default_bindings(); } if (!lhs) { /* display all bindings */ char fmt[] = " %-17s %s\n"; fprintf(stderr, "\n"); /* mouse buttons */ fprintf(stderr, fmt, "2x<B1>", "print coordinates to clipboard using `clipboardformat`\n (see keys '3', '4')"); fprintf(stderr, fmt, "<B2>", "annotate the graph using `mouseformat` (see keys '1', '2')"); fprintf(stderr, fmt, "", "or draw labels if `set mouse labels is on`"); fprintf(stderr, fmt, "<Ctrl-B2>", "remove label close to pointer if `set mouse labels` is on"); fprintf(stderr, fmt, "<B3>", "mark zoom region (only for 2d-plots and maps)."); fprintf(stderr, fmt, "<B1-Motion>", "change view (rotation). Use <ctrl> to rotate the axes only."); fprintf(stderr, fmt, "<B2-Motion>", "change view (scaling). Use <ctrl> to scale the axes only."); fprintf(stderr, fmt, "<Shift-B2-Motion>", "vertical motion -- change xyplane"); /* mouse wheel */ fprintf(stderr, fmt, "<wheel-up>", "scroll up (in +Y direction)."); fprintf(stderr, fmt, "<wheel-down>", "scroll down."); fprintf(stderr, fmt, "<shift-wheel-up>", "scroll left (in -X direction)."); fprintf(stderr, fmt, "<shift-wheel-down>", "scroll right."); fprintf(stderr, fmt, "<control-wheel-up>", "zoom in toward the center of the plot."); fprintf(stderr, fmt, "<control-wheel-down>", " zoom out."); fprintf(stderr, fmt, "<shift-control-wheel-up>", "zoom in only the X axis."); fprintf(stderr, fmt, "<shift-control-wheel-down>", "zoom out only the X axis."); fprintf(stderr, "\n"); /* keystrokes */ #ifndef DISABLE_SPACE_RAISES_CONSOLE fprintf(stderr, " %-12s %s\n", "Space", "raise gnuplot console window"); #endif fprintf(stderr, " %-12s * %s\n", "q", "close this plot window"); fprintf(stderr, "\n"); for (ptr = bindings; ptr; ptr = ptr->next) { bind_display_one(ptr); } fprintf(stderr, "\n"); fprintf(stderr, " * indicates this key is active from all plot windows\n"); fprintf(stderr, "\n"); return; } if (!bind_scan_lhs(&lhs_scanned, lhs)) { return; } for (ptr = bindings; ptr; ptr = ptr->next) { if (bind_matches(&lhs_scanned, ptr)) { bind_display_one(ptr); break; /* only one match */ } } } static void bind_remove(bind_t * b) { if (!b) { return; } else if (b->builtin) { /* don't remove builtins, just remove the overriding command */ if (b->command) { free(b->command); b->command = (char *) 0; } return; } if (b->prev) b->prev->next = b->next; if (b->next) b->next->prev = b->prev; else bindings->prev = b->prev; if (b->command) { free(b->command); b->command = (char *) 0; } if (b == bindings) { bindings = b->next; if (bindings && bindings->prev) { bindings->prev->next = (bind_t *) 0; } } free(b); } static void bind_append(char *lhs, char *rhs, char *(*builtin) (struct gp_event_t * ge)) { bind_t *new = (bind_t *) gp_alloc(sizeof(bind_t), "bind_append->new"); if (!bind_scan_lhs(new, lhs)) { free(new); return; } if (!bindings) { /* first binding */ bindings = new; } else { bind_t *ptr; for (ptr = bindings; ptr; ptr = ptr->next) { if (bind_matches(new, ptr)) { /* overwriting existing binding */ if (!rhs) { ptr->builtin = builtin; } else if (*rhs) { if (ptr->command) { free(ptr->command); ptr->command = (char *) 0; } ptr->command = rhs; } else { /* rhs is an empty string, so remove the binding */ bind_remove(ptr); } free(new); /* don't need it any more */ return; } } /* if we're here, the binding does not exist yet */ /* append binding ... */ bindings->prev->next = new; new->prev = bindings->prev; } bindings->prev = new; new->next = (struct bind_t *) 0; new->allwindows = FALSE; /* Can be explicitly set later */ if (!rhs) { new->builtin = builtin; } else if (*rhs) { new->command = rhs; /* was allocated in command.c */ } else { bind_remove(new); } } void bind_process(char *lhs, char *rhs, TBOOLEAN allwindows) { if (!bindings) { bind_install_default_bindings(); } if (!rhs) { bind_display(lhs); } else { bind_append(lhs, rhs, 0); if (allwindows) bind_all(lhs); } if (lhs) free(lhs); } void bind_all(char *lhs) { bind_t *ptr; bind_t keypress; if (!bind_scan_lhs(&keypress, lhs)) return; for (ptr = bindings; ptr; ptr = ptr->next) { if (bind_matches(&keypress, ptr)) ptr->allwindows = TRUE; } } void bind_remove_all() { bind_t *ptr; bind_t *safe; for (ptr = bindings; ptr; safe = ptr, ptr = ptr->next, free(safe)) { if (ptr->command) { free(ptr->command); ptr->command = (char *) 0; } } bindings = (bind_t *) 0; } /* Ruler is on, thus recalc its (px,py) from (x,y) for the current zoom and log axes. */ static void recalc_ruler_pos() { double P, dummy; if (is_3d_plot) { /* To be exact, it is 'set view map' splot. */ int ppx, ppy; dummy = 1.0; /* dummy value, but not 0.0 for the fear of log z-axis */ map3d_xy(ruler.x, ruler.y, dummy, &ppx, &ppy); ruler.px = ppx; ruler.py = ppy; return; } /* It is 2D plot. */ if (axis_array[FIRST_X_AXIS].log && ruler.x < 0) ruler.px = -1; else { P = AXIS_LOG_VALUE(FIRST_X_AXIS, ruler.x); ruler.px = AXIS_MAP(FIRST_X_AXIS, P); } if (axis_array[FIRST_Y_AXIS].log && ruler.y < 0) ruler.py = -1; else { P = AXIS_LOG_VALUE(FIRST_Y_AXIS, ruler.y); ruler.py = AXIS_MAP(FIRST_Y_AXIS, P); } MousePosToGraphPosReal(ruler.px, ruler.py, &dummy, &dummy, &ruler.x2, &ruler.y2); } /* Recalculate and replot the ruler after a '(re)plot'. Called from term.c. */ void update_ruler() { if (!term->set_ruler || !ruler.on) return; (*term->set_ruler) (-1, -1); recalc_ruler_pos(); (*term->set_ruler) (ruler.px, ruler.py); } /* Set ruler on/off, and set its position. Called from set.c for 'set mouse ruler ...' command. */ void set_ruler(TBOOLEAN on, int mx, int my) { struct gp_event_t ge; if (ruler.on == FALSE && on == FALSE) return; if (ruler.on == TRUE && on == TRUE && (mx < 0 || my < 0)) return; if (ruler.on == TRUE) /* ruler is on => switch it off */ builtin_toggle_ruler(&ge); /* now the ruler is off */ if (on == FALSE) /* want ruler off */ return; if (mx>=0 && my>=0) { /* change ruler position */ ge.mx = mx; ge.my = my; } else { /* don't change ruler position */ ge.mx = ruler.px; ge.my = ruler.py; } builtin_toggle_ruler(&ge); } /* for checking if we change from plot to splot (or vice versa) */ int plot_mode(int set) { static int mode = MODE_PLOT; if (MODE_PLOT == set || MODE_SPLOT == set) { if (mode != set) { turn_ruler_off(); } mode = set; } return mode; } static void turn_ruler_off() { if (ruler.on) { struct udvt_entry *u; ruler.on = FALSE; if (term && term->set_ruler) { (*term->set_ruler) (-1, -1); } if ((u = add_udv_by_name("MOUSE_RULER_X"))) u->udv_undef = TRUE; if ((u = add_udv_by_name("MOUSE_RULER_Y"))) u->udv_undef = TRUE; if (display_ipc_commands()) { fprintf(stderr, "turning ruler off.\n"); } } } static int nearest_label_tag(int xref, int yref, struct termentry *t) { double min = -1; int min_tag = -1; double diff_squared; int x, y; struct text_label *this_label; int xd; int yd; for (this_label = first_label; this_label != NULL; this_label = this_label->next) { if (is_3d_plot) { map3d_position(&this_label->place, &xd, &yd, "label"); xd -= xref; yd -= yref; } else { map_position(&this_label->place, &x, &y, "label"); xd = x - xref; yd = y - yref; } diff_squared = xd * xd + yd * yd; if (-1 == min || min > diff_squared) { /* now we check if we're within a certain * threshold around the label */ double tic_diff_squared; int htic, vtic; get_offsets(this_label, t, &htic, &vtic); tic_diff_squared = htic * htic + vtic * vtic; if (diff_squared < tic_diff_squared) { min = diff_squared; min_tag = this_label->tag; } } } return min_tag; } static void remove_label(int x, int y) { int tag = nearest_label_tag(x, y, term); if (-1 != tag) { char cmd[0x40]; sprintf(cmd, "unset label %d", tag); do_string_replot(cmd); } } static void put_label(char *label, double x, double y) { char cmd[0xff]; sprintf(cmd, "set label \"%s\" at %g,%g %s", label, x, y, mouse_setting.labelopts ? mouse_setting.labelopts : "point pt 1"); do_string_replot(cmd); } #ifdef OS2 /* routine required by pm.trm: fill in information needed for (un)checking menu items in the Presentation Manager terminal */ void PM_set_gpPMmenu __PROTO((struct t_gpPMmenu * gpPMmenu)) { gpPMmenu->use_mouse = mouse_setting.on; if (zoom_now == NULL) gpPMmenu->where_zoom_queue = 0; else { gpPMmenu->where_zoom_queue = (zoom_now == zoom_head) ? 0 : 1; if (zoom_now->prev != NULL) gpPMmenu->where_zoom_queue |= 2; if (zoom_now->next != NULL) gpPMmenu->where_zoom_queue |= 4; } gpPMmenu->polar_distance = mouse_setting.polardistance; } #endif /* Save current mouse position to user-accessible variables. * Save the keypress or mouse button that triggered this in MOUSE_KEY, * and define MOUSE_BUTTON if it was a button click. */ static void load_mouse_variables(double x, double y, TBOOLEAN button, int c) { struct udvt_entry *current; MousePosToGraphPosReal(x, y, &real_x, &real_y, &real_x2, &real_y2); if ((current = add_udv_by_name("MOUSE_BUTTON"))) { current->udv_undef = !button; Ginteger(¤t->udv_value, button?c:-1); } if ((current = add_udv_by_name("MOUSE_KEY"))) { current->udv_undef = FALSE; Ginteger(¤t->udv_value,c); } if ((current = add_udv_by_name("MOUSE_CHAR"))) { char *keychar = gp_alloc(2,"key_char"); keychar[0] = c; keychar[1] = '\0'; if (!current->udv_undef) gpfree_string(¤t->udv_value); current->udv_undef = FALSE; Gstring(¤t->udv_value,keychar); } if ((current = add_udv_by_name("MOUSE_X"))) { current->udv_undef = FALSE; Gcomplex(¤t->udv_value,real_x,0); } if ((current = add_udv_by_name("MOUSE_Y"))) { current->udv_undef = FALSE; Gcomplex(¤t->udv_value,real_y,0); } if ((current = add_udv_by_name("MOUSE_X2"))) { current->udv_undef = FALSE; Gcomplex(¤t->udv_value,real_x2,0); } if ((current = add_udv_by_name("MOUSE_Y2"))) { current->udv_undef = FALSE; Gcomplex(¤t->udv_value,real_y2,0); } if ((current = add_udv_by_name("MOUSE_SHIFT"))) { current->udv_undef = FALSE; Ginteger(¤t->udv_value, modifier_mask & Mod_Shift); } if ((current = add_udv_by_name("MOUSE_ALT"))) { current->udv_undef = FALSE; Ginteger(¤t->udv_value, modifier_mask & Mod_Alt); } if ((current = add_udv_by_name("MOUSE_CTRL"))) { current->udv_undef = FALSE; Ginteger(¤t->udv_value, modifier_mask & Mod_Ctrl); } return; } #endif /* USE_MOUSE */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/bf_test.c�������������������������������������������������������������������������0000644�0004711�0000144�00000007705�10700505621�012517� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: bf_test.c,v 1.10 2007/10/02 18:18:57 sfeam Exp $"); } #endif /* * Test routines for binary files * cc bf_test.c -o bf_test binary_files.o -lm * * Copyright (c) 1992 Robert K. Cunningham, MIT Lincoln Laboratory * */ /* Note that this file is not compiled into gnuplot, and so * its more-restrictive copyright need not apply to gnuplot * as a whole. (I think.) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define GPFAR /**/ #include "syscfg.h" #include "stdfn.h" #include "binary.h" /* we declare these here instead of including more header files */ void int_error __PROTO((int, const char *)); void FreeHelp __PROTO((void)); /* static functions */ static float function __PROTO((int p, double x, double y)); typedef struct { float xmin, xmax; float ymin, ymax; } range; #define NUM_PLOTS 2 static range TheRange[] = {{-3,3,-2,2}, {-3,3,-3,3}, {-3,3,-3,3}}; /* Sampling rate causes this to go from -3:6*/ /*---- Stubs to make this work without including huge libraries ----*/ void int_error(int dummy, const char *error_text) { (void) dummy; /* avoid -Wunused warning */ fprintf(stderr, "Fatal error..\n%s\n...now exiting to system ...\n", error_text); exit(EXIT_FAILURE); } void FreeHelp() { } /*---- End of stubs ----*/ static float function(int p, double x, double y) { float t = 0; /* HBB 990828: initialize */ switch (p) { case 0: t = 1.0 / (x * x + y * y + 1.0); break; case 1: t = sin(x * x + y * y) / (x * x + y * y); if (t > 1.0) t = 1.0; break; case 2: t = sin(x * x + y * y) / (x * x + y * y); /* sinc modulated sinc */ t *= sin(4. * (x * x + y * y)) / (4. * (x * x + y * y)); if (t > 1.0) t = 1.0; break; default: fprintf(stderr, "Unknown function\n"); break; } return t; } #define ISOSAMPLES 5.0 int main(void) { int plot; int i, j; float x, y; float *rt, *ct; float **m; int xsize, ysize; char buf[256]; FILE *fout; /* Create a few standard test interfaces */ for (plot = 0; plot < NUM_PLOTS; plot++) { xsize = (TheRange[plot].xmax - TheRange[plot].xmin) * ISOSAMPLES + 1; ysize = (TheRange[plot].ymax - TheRange[plot].ymin) * ISOSAMPLES + 1; rt = alloc_vector(0, xsize - 1); ct = alloc_vector(0, ysize - 1); m = matrix(0, xsize - 1, 0, ysize - 1); for (y = TheRange[plot].ymin, j = 0; j < ysize; j++, y += 1.0 / (double) ISOSAMPLES) { ct[j] = y; } for (x = TheRange[plot].xmin, i = 0; i < xsize; i++, x += 1.0 / (double) ISOSAMPLES) { rt[i] = x; for (y = TheRange[plot].ymin, j = 0; j < ysize; j++, y += 1.0 / (double) ISOSAMPLES) { m[i][j] = function(plot, x, y); } } sprintf(buf, "binary%d", plot + 1); if (!(fout = fopen(buf, "wb"))) int_error(0, "Could not open file"); else { fwrite_matrix(fout, m, 0, xsize - 1, 0, ysize - 1, rt, ct); } free_vector(rt, 0); free_vector(ct, 0); free_matrix(m, 0, xsize - 1, 0); } /* Show that it's ok to vary sampling rate, as long as x1<x2, y1<y2... */ xsize = (TheRange[plot].xmax - TheRange[plot].xmin) * ISOSAMPLES + 1; ysize = (TheRange[plot].ymax - TheRange[plot].ymin) * ISOSAMPLES + 1; rt = alloc_vector(0, xsize - 1); ct = alloc_vector(0, ysize - 1); m = matrix(0, xsize - 1, 0, ysize - 1); for (y = TheRange[plot].ymin, j = 0; j < ysize; j++, y += 1.0 / (double) ISOSAMPLES) { ct[j] = y > 0 ? 2 * y : y; } for (x = TheRange[plot].xmin, i = 0; i < xsize; i++, x += 1.0 / (double) ISOSAMPLES) { rt[i] = x > 0 ? 2 * x : x; for (y = TheRange[plot].ymin, j = 0; j < ysize; j++, y += 1.0 / (double) ISOSAMPLES) { m[i][j] = function(plot, x, y); } } sprintf(buf, "binary%d", plot + 1); if (!(fout = fopen(buf, "wb"))) int_error(0, "Could not open file"); else { fwrite_matrix(fout, m, 0, xsize - 1, 0, ysize - 1, rt, ct); } free_vector(rt, 0); free_vector(ct, 0); free_matrix(m, 0, xsize - 1, 0); return EXIT_SUCCESS; } �����������������������������������������������������������gnuplot-4.6.4/src/axis.h����������������������������������������������������������������������������0000644�0004711�0000144�00000063451�12221150203�012032� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: axis.h,v 1.67.2.2 2013/09/27 00:25:39 sfeam Exp $ * */ /*[ * Copyright 2000, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_AXIS_H #define GNUPLOT_AXIS_H #include "gp_types.h" /* for TBOOLEAN */ #include "gadgets.h" #include "parse.h" /* for const_*() */ #include "tables.h" /* for the axis name parse table */ #include "term_api.h" /* for lp_style_type */ #include "util.h" /* for int_error() */ /* typedefs / #defines */ /* give some names to some array elements used in command.c and grap*.c * maybe one day the relevant items in setshow will also be stored * in arrays. * * Always keep the following conditions alive: * SECOND_X_AXIS = FIRST_X_AXIS + SECOND_AXES * FIRST_X_AXIS & SECOND_AXES == 0 */ typedef enum AXIS_INDEX { #define FIRST_AXES 0 FIRST_Z_AXIS, FIRST_Y_AXIS, FIRST_X_AXIS, COLOR_AXIS, /* fill gap */ #define SECOND_AXES 4 SECOND_Z_AXIS, /* not used, yet */ SECOND_Y_AXIS, SECOND_X_AXIS, POLAR_AXIS, T_AXIS, U_AXIS, /* never used? */ V_AXIS /* ditto */ #define NO_AXIS 99 } AXIS_INDEX; # define AXIS_ARRAY_SIZE 11 # define LAST_REAL_AXIS POLAR_AXIS /* What kind of ticmarking is wanted? */ typedef enum en_ticseries_type { TIC_COMPUTED=1, /* default; gnuplot figures them */ TIC_SERIES, /* user-defined series */ TIC_USER, /* user-defined points */ TIC_MONTH, /* print out month names ((mo-1)%12)+1 */ TIC_DAY /* print out day of week */ } t_ticseries_type; typedef enum { DT_NORMAL=0, /* default; treat values as pure numeric */ DT_TIMEDATE, /* old datatype */ DT_DMS /* degrees minutes seconds */ } td_type; /* Defines one ticmark for TIC_USER style. * If label==NULL, the value is printed with the usual format string. * else, it is used as the format string (note that it may be a constant * string, like "high" or "low"). */ typedef struct ticmark { double position; /* where on axis is this */ char *label; /* optional (format) string label */ int level; /* 0=major tic, 1=minor tic */ struct ticmark *next; /* linked list */ } ticmark; /* Tic-mark labelling definition; see set xtics */ typedef struct ticdef { t_ticseries_type type; char *font; struct t_colorspec textcolor; struct { struct ticmark *user; /* for TIC_USER */ struct { /* for TIC_SERIES */ double start, incr; double end; /* ymax, if VERYLARGE */ } series; TBOOLEAN mix; /* TRUE to use both the above */ } def; struct position offset; TBOOLEAN rangelimited; /* Limit tics to data range */ } t_ticdef; /* we want two auto modes for minitics - default where minitics are * auto for log/time and off for linear, and auto where auto for all * graphs I've done them in this order so that logscale-mode can * simply test bit 0 to see if it must do the minitics automatically. * similarly, conventional plot can test bit 1 to see if minitics are * required */ enum en_minitics_status { MINI_OFF, MINI_DEFAULT, MINI_USER, MINI_AUTO }; /* Function pointer type for callback functions doing operations for a * single ticmark */ typedef void (*tic_callback) __PROTO((AXIS_INDEX, double, char *, struct lp_style_type, struct ticmark *)); /* Values to put in the axis_tics[] variables that decides where the * ticmarks should be drawn: not at all, on one or both plot borders, * or the zeroaxes. These look like a series of values, but TICS_MASK * shows that they're actually bit masks --> don't turn into an enum * */ #define NO_TICS 0 #define TICS_ON_BORDER 1 #define TICS_ON_AXIS 2 #define TICS_MASK 3 #define TICS_MIRROR 4 #if 0 /* HBB 20010806 --- move GRID flags into axis struct */ /* Need to allow user to choose grid at first and/or second axes tics. * Also want to let user choose circles at x or y tics for polar grid. * Also want to allow user rectangular grid for polar plot or polar * grid for parametric plot. So just go for full configurability. * These are bitmasks */ #define GRID_OFF 0 #define GRID_X (1<<0) #define GRID_Y (1<<1) #define GRID_Z (1<<2) #define GRID_X2 (1<<3) #define GRID_Y2 (1<<4) #define GRID_MX (1<<5) #define GRID_MY (1<<6) #define GRID_MZ (1<<7) #define GRID_MX2 (1<<8) #define GRID_MY2 (1<<9) #define GRID_CB (1<<10) #define GRID_MCB (1<<11) #endif /* 0 */ /* HBB 20010610: new type for storing autoscale activity. Effectively * two booleans (bits) in a single variable, so I'm using an enum with * all 4 possible bit masks given readable names. */ typedef enum e_autoscale { AUTOSCALE_NONE = 0, AUTOSCALE_MIN = 1<<0, AUTOSCALE_MAX = 1<<1, AUTOSCALE_BOTH = (1<<0 | 1 << 1), AUTOSCALE_FIXMIN = 1<<2, AUTOSCALE_FIXMAX = 1<<3 } t_autoscale; typedef enum e_constraint { CONSTRAINT_NONE = 0, CONSTRAINT_LOWER = 1<<0, CONSTRAINT_UPPER = 1<<1, CONSTRAINT_BOTH = (1<<0 | 1<<1) } t_constraint; /* FIXME 20000725: collect some of those various TBOOLEAN fields into * a larger int (or -- shudder -- a bitfield?) */ typedef struct axis { /* range of this axis */ t_autoscale autoscale; /* Which end(s) are autoscaled? */ t_autoscale set_autoscale; /* what does 'set' think autoscale to be? */ int range_flags; /* flag bits about autoscale/writeback: */ /* write auto-ed ranges back to variables for autoscale */ #define RANGE_WRITEBACK 1 /* allow auto and reversed ranges */ #define RANGE_REVERSE 2 TBOOLEAN range_is_reverted; /* range [high:low] silently reverted? */ double min; /* 'transient' axis extremal values */ double max; double set_min; /* set/show 'permanent' values */ double set_max; double writeback_min; /* ULIG's writeback implementation */ double writeback_max; double data_min; /* Not necessarily the same as axis min */ double data_max; /* range constraints */ t_constraint min_constraint; t_constraint max_constraint; double min_lb, min_ub; /* min lower- and upper-bound */ double max_lb, max_ub; /* min lower- and upper-bound */ /* output-related quantities */ int term_lower; /* low and high end of the axis on output, */ int term_upper; /* ... (in terminal coordinates)*/ double term_scale; /* scale factor: plot --> term coords */ unsigned int term_zero; /* position of zero axis */ /* log axis control */ TBOOLEAN log; /* log axis stuff: flag "islog?" */ double base; /* logarithm base value */ double log_base; /* ln(base), for easier computations */ /* time/date axis control */ td_type datatype; /* DT_NORMAL | DT_TIMEDATE | DT_DMS */ TBOOLEAN format_is_numeric; /* format string looks like numeric??? */ char timefmt[MAX_ID_LEN+1]; /* format string for input */ char formatstring[MAX_ID_LEN+1]; /* the format string for output */ /* ticmark control variables */ int ticmode; /* tics on border/axis? mirrored? */ struct ticdef ticdef; /* tic series definition */ int tic_rotate; /* ticmarks rotated by this angle */ TBOOLEAN gridmajor; /* Grid lines wanted on major tics? */ TBOOLEAN gridminor; /* Grid lines for minor tics? */ int minitics; /* minor tic mode (none/auto/user)? */ double mtic_freq; /* minitic stepsize */ double ticscale; /* scale factor for tic marks (was (0..1])*/ double miniticscale; /* and for minitics */ TBOOLEAN tic_in; /* tics to be drawn inward? */ /* other miscellaneous fields */ text_label label; /* label string and position offsets */ TBOOLEAN manual_justify; /* override automatic justification */ lp_style_type zeroaxis; /* drawing style for zeroaxis, if any */ } AXIS; #define DEFAULT_AXIS_TICDEF {TIC_COMPUTED, NULL, {TC_DEFAULT, 0, 0.0}, {NULL, {0.,0.,0.}, FALSE}, { character, character, character, 0., 0., 0. }, FALSE } #define DEFAULT_AXIS_ZEROAXIS {0, LT_NODRAW, 0, 0, 1.0, PTSZ_DEFAULT, FALSE, DEFAULT_COLORSPEC} #define DEFAULT_AXIS_STRUCT { \ AUTOSCALE_BOTH, AUTOSCALE_BOTH, /* auto, set_auto */ \ 0, FALSE, /* range_flags, rev_range */ \ -10.0, 10.0, /* 3 pairs of min/max for axis itself */ \ -10.0, 10.0, \ -10.0, 10.0, \ 0.0, 0.0, /* and another min/max for the data */ \ CONSTRAINT_NONE, CONSTRAINT_NONE, /* min and max constraints */ \ 0., 0., 0., 0., /* lower and upper bound for min and max */ \ 0, 0, /* terminal lower and upper coords */ \ 0., /* terminal scale */ \ 0, /* zero axis position */ \ FALSE, 0.0, 0.0, /* log, base, log(base) */ \ DT_NORMAL, TRUE, /* datatype, format_numeric */ \ TIMEFMT, DEF_FORMAT, /* timefmt, output format */ \ NO_TICS, /* tic output positions (border, mirror) */ \ DEFAULT_AXIS_TICDEF, /* tic series definition */ \ 0, FALSE, FALSE, /* tic_rotate, grid{major,minor} */ \ MINI_DEFAULT, 10., /* minitics, mtic_freq */ \ 1.0, 0.5, TRUE, /* ticscale, miniticscale, tic_in */ \ EMPTY_LABELSTRUCT, /* axis label */ \ FALSE, /* override automatic justification */ \ DEFAULT_AXIS_ZEROAXIS /* zeroaxis line style */ \ } /* Table of default behaviours --- a subset of the struct above. Only * those fields are present that differ from axis to axis. */ typedef struct axis_defaults { double min; /* default axis endpoints */ double max; char name[4]; /* axis name, like in "x2" or "t" */ int ticmode; /* tics on border/axis? mirrored? */ } AXIS_DEFAULTS; /* global variables in axis.c */ extern AXIS axis_array[AXIS_ARRAY_SIZE]; extern const AXIS_DEFAULTS axis_defaults[AXIS_ARRAY_SIZE]; /* A parsing table for mapping axis names into axis indices. For use * by the set/show machinery, mainly */ extern const struct gen_table axisname_tbl[AXIS_ARRAY_SIZE+1]; extern const struct ticdef default_axis_ticdef; /* default format for tic mark labels */ #define DEF_FORMAT "% g" /* default parse timedata string */ #define TIMEFMT "%d/%m/%y,%H:%M" /* axis labels */ extern const text_label default_axis_label; /* zeroaxis linetype (flag type==-3 if none wanted) */ extern const lp_style_type default_axis_zeroaxis; /* default grid linetype, to be used by 'unset grid' and 'reset' */ extern const struct lp_style_type default_grid_lp; /* grid layer: -1 default, 0 back, 1 front */ extern int grid_layer; /* Whether or not to draw a separate polar axis in polar mode */ extern TBOOLEAN raxis; /* global variables for communication with the tic callback functions */ /* FIXME HBB 20010806: had better be collected into a struct that's * passed to the callback */ extern int tic_start, tic_direction, tic_mirror; /* These are for passing on to write_multiline(): */ extern int tic_text, rotate_tics, tic_hjust, tic_vjust; /* The remaining ones are for grid drawing; controlled by 'set grid': */ /* extern int grid_selection; --- comm'ed out, HBB 20010806 */ extern struct lp_style_type grid_lp; /* linestyle for major grid lines */ extern struct lp_style_type mgrid_lp; /* linestyle for minor grid lines */ extern double polar_grid_angle; /* angle step in polar grid in radians */ /* Length of the longest tics label, set by widest_tic_callback(): */ extern int widest_tic_strlen; /* flag to indicate that in-line axis ranges should be ignored */ extern TBOOLEAN inside_zoom; /* axes being used by the current plot */ extern AXIS_INDEX x_axis, y_axis, z_axis; /* macros to reduce code clutter caused by the array notation, mainly * in graphics.c and fit.c */ #define X_AXIS axis_array[x_axis] #define Y_AXIS axis_array[y_axis] #define Z_AXIS axis_array[z_axis] #define R_AXIS axis_array[POLAR_AXIS] #define CB_AXIS axis_array[COLOR_AXIS] /* -------- macros using these variables: */ /* Macros to map from user to terminal coordinates and back */ #define AXIS_MAP(axis, variable) \ (int) ((axis_array[axis].term_lower) \ + ((variable) - axis_array[axis].min) \ * axis_array[axis].term_scale + 0.5) #define AXIS_MAPBACK(axis, pos) \ (((double)(pos)-axis_array[axis].term_lower)/axis_array[axis].term_scale \ + axis_array[axis].min) /* these are the old names for these: */ #define map_x(x) AXIS_MAP(x_axis, x) #define map_y(y) AXIS_MAP(y_axis, y) #define AXIS_SETSCALE(axis, out_low, out_high) \ axis_array[axis].term_scale = ((out_high) - (out_low)) \ / (axis_array[axis].max - axis_array[axis].min) /* write current min/max_array contents into the set/show status * variables */ #define AXIS_WRITEBACK(axis) \ do { \ AXIS *this = axis_array + axis; \ \ if (this->range_flags & RANGE_WRITEBACK) { \ if (this->autoscale & AUTOSCALE_MIN) \ this->set_min = this->min; \ if (this->autoscale & AUTOSCALE_MAX) \ this->set_max = this->max; \ } \ } while(0) /* HBB 20000430: New macros, logarithmize a value into a stored * coordinate*/ #define AXIS_DO_LOG(axis,value) (log(value) / axis_array[axis].log_base) #define AXIS_UNDO_LOG(axis,value) exp((value) * axis_array[axis].log_base) /* HBB 20000430: same, but these test if the axis is log, first: */ #define AXIS_LOG_VALUE(axis,value) \ (axis_array[axis].log ? AXIS_DO_LOG(axis,value) : (value)) #define AXIS_DE_LOG_VALUE(axis,coordinate) \ (axis_array[axis].log ? AXIS_UNDO_LOG(axis,coordinate): (coordinate)) /* copy scalar data to arrays. The difference between 3D and 2D * versions is: dont know we have to support ranges [10:-10] - lets * reverse it for now, then fix it at the end. */ /* FIXME HBB 20000426: unknown if this distinction makes any sense... */ #define AXIS_INIT3D(axis, islog_override, infinite) \ do { \ AXIS *this = axis_array + axis; \ \ this->autoscale = this->set_autoscale; \ if ((this->autoscale & AUTOSCALE_BOTH) == AUTOSCALE_NONE \ && this->set_max < this->set_min) { \ this->min = this->set_max; \ this->max = this->set_min; \ /* we will fix later */ \ } else { \ this->min = (infinite && (this->set_autoscale & AUTOSCALE_MIN)) \ ? VERYLARGE : this->set_min; \ this->max = (infinite && (this->set_autoscale & AUTOSCALE_MAX)) \ ? -VERYLARGE : this->set_max; \ } \ if (islog_override) { \ this->log = 0; \ this->base = 1; \ this->log_base = 0; \ } else { \ this->log_base = this->log ? log(this->base) : 0; \ } \ this->data_min = VERYLARGE; \ this->data_max = -VERYLARGE; \ } while(0) #define AXIS_INIT2D(axis, infinite) \ do { \ AXIS *this = axis_array + axis; \ \ this->autoscale = this->set_autoscale; \ this->min = (infinite && (this->set_autoscale & AUTOSCALE_MIN)) \ ? VERYLARGE : this->set_min; \ this->max = (infinite && (this->set_autoscale & AUTOSCALE_MAX)) \ ? -VERYLARGE : this->set_max; \ this->data_min = VERYLARGE; \ this->data_max = -VERYLARGE; \ } while(0) #ifdef VOLATILE_REFRESH #define AXIS_INIT2D_REFRESH(axis, infinite) \ do { \ AXIS *this = axis_array + axis; \ \ this->autoscale = this->set_autoscale; \ this->min = (infinite && (this->set_autoscale & AUTOSCALE_MIN)) \ ? VERYLARGE*1e-3 : AXIS_LOG_VALUE(axis, this->set_min); \ this->max = (infinite && (this->set_autoscale & AUTOSCALE_MAX)) \ ? -VERYLARGE*1e-3 : AXIS_LOG_VALUE(axis, this->set_max); \ this->log_base = this->log ? log(this->base) : 0; \ } while(0) /* why multiply by 1e-3: if an already VERYLARGE x2 and y2 ranges are calculated after zoom-out by mouse, then they would become even larger */ #define AXIS_UPDATE2D_REFRESH(axis) \ do { \ AXIS *this_axis = axis_array + axis; \ if ((this_axis->set_autoscale & AUTOSCALE_MIN) == 0) \ this_axis->min = AXIS_LOG_VALUE(axis, this_axis->set_min); \ if ((this_axis->set_autoscale & AUTOSCALE_MAX) == 0) \ this_axis->max = AXIS_LOG_VALUE(axis, this_axis->set_max); \ } while (0) #endif /* HBB NEW 20050316: macros to always access the actual minimum, even * if 'set view map' or something else flipped things around behind * our back */ #define AXIS_ACTUAL_MIN(axis) \ (axis_array[axis].range_flags & RANGE_REVERSE \ ? axis_array[axis].max : axis_array[axis].min) #define AXIS_ACTUAL_MAX(axis) \ (axis_array[axis].range_flags & RANGE_REVERSE \ ? axis_array[axis].min : axis_array[axis].max) /* parse a position of the form * [coords] x, [coords] y {,[coords] z} * where coords is one of first,second.graph,screen,character * if first or second, we need to take axis.datatype into account */ #define GET_NUMBER_OR_TIME(store,axes,axis) \ do { \ if (((axes) >= 0) && (axis_array[(axes)+(axis)].datatype == DT_TIMEDATE) \ && isstringvalue(c_token)) { \ struct tm tm; \ double usec; \ char *ss = try_to_get_string(); \ if (gstrptime(ss,axis_array[axis].timefmt,&tm,&usec)) \ (store) = (double) gtimegm(&tm) + usec; \ free(ss); \ } else { \ (store) = real_expression(); \ } \ } while(0) /* This is one is very similar to GET_NUMBER_OR_TIME, but has slightly * different usage: it writes out '0' in case of inparsable time data, * and it's used when the target axis is fixed without a 'first' or * 'second' keyword in front of it. */ #define GET_NUM_OR_TIME(store,axis) \ do { \ (store) = 0; \ GET_NUMBER_OR_TIME(store, FIRST_AXES, axis); \ } while (0); /* store VALUE or log(VALUE) in STORE, set TYPE as appropriate * Do OUT_ACTION or UNDEF_ACTION as appropriate * adjust range provided type is INRANGE (ie dont adjust y if x is outrange * VALUE must not be same as STORE * NOAUTOSCALE is per-plot property, whereas AUTOSCALE_XXX is per-axis. * Note: see the particular implementation for COLOR AXIS below. */ #define STORE_WITH_LOG_AND_UPDATE_RANGE(STORE, VALUE, TYPE, AXIS, \ NOAUTOSCALE, OUT_ACTION, UNDEF_ACTION) \ do { \ if (AXIS == NO_AXIS) \ break; \ /* HBB 20040304: new check to avoid storing infinities and NaNs */ \ if (! (VALUE > -VERYLARGE && VALUE < VERYLARGE)) { \ TYPE = UNDEFINED; \ UNDEF_ACTION; \ break; \ } \ if (axis_array[AXIS].log) { \ if (VALUE<0.0) { \ TYPE = UNDEFINED; \ UNDEF_ACTION; \ break; \ } else if (VALUE == 0.0) { \ STORE = -VERYLARGE; \ TYPE = OUTRANGE; \ OUT_ACTION; \ break; \ } else { \ STORE = AXIS_DO_LOG(AXIS,VALUE); \ } \ } else \ STORE = VALUE; \ if (NOAUTOSCALE) \ break; /* this plot is not being used for autoscaling */ \ if (TYPE != INRANGE) \ break; /* don't set y range if x is outrange, for example */ \ if ((int)AXIS < 0) \ break; /* HBB 20000507: don't check range if not a coordinate */ \ if ( VALUE<axis_array[AXIS].data_min ) \ axis_array[AXIS].data_min = VALUE; \ if ( VALUE<axis_array[AXIS].min ) { \ if (axis_array[AXIS].autoscale & AUTOSCALE_MIN) { \ if (axis_array[AXIS].min_constraint & CONSTRAINT_LOWER) { \ if (axis_array[AXIS].min_lb <= VALUE) { \ axis_array[AXIS].min = VALUE; \ } else { \ axis_array[AXIS].min = axis_array[AXIS].min_lb; \ TYPE = OUTRANGE; \ OUT_ACTION; \ break; \ } \ } else { \ axis_array[AXIS].min = VALUE; \ } \ } else { \ TYPE = OUTRANGE; \ OUT_ACTION; \ break; \ } \ } \ if ( VALUE>axis_array[AXIS].data_max ) \ axis_array[AXIS].data_max = VALUE; \ if ( VALUE>axis_array[AXIS].max ) { \ if (axis_array[AXIS].autoscale & AUTOSCALE_MAX) { \ if (axis_array[AXIS].max_constraint & CONSTRAINT_UPPER) { \ if (axis_array[AXIS].max_ub >= VALUE) { \ axis_array[AXIS].max = VALUE; \ } else { \ axis_array[AXIS].max = axis_array[AXIS].max_ub; \ TYPE =OUTRANGE; \ OUT_ACTION; \ break; \ } \ } else { \ axis_array[AXIS].max = VALUE; \ } \ } else { \ TYPE = OUTRANGE; \ OUT_ACTION; \ } \ } \ } while(0) /* Implementation of the above for the color axis. It should not change * the type of the point (out-of-range color is plotted with the color * of the min or max color value). */ #define COLOR_STORE_WITH_LOG_AND_UPDATE_RANGE(STORE, VALUE, TYPE, AXIS, \ NOAUTOSCALE, OUT_ACTION, UNDEF_ACTION) \ { \ coord_type c_type_tmp = TYPE; \ STORE_WITH_LOG_AND_UPDATE_RANGE(STORE, VALUE, c_type_tmp, AXIS, \ NOAUTOSCALE, OUT_ACTION, UNDEF_ACTION); \ } /* Empty macro arguments triggered NeXT cpp bug */ /* #define NOOP (0) caused many warnings from gcc 3.2 */ /* Now trying ((void)0) */ #define NOOP ((void)0) /* HBB 20000506: new macro to automatically build intializer lists * for arrays of AXIS_ARRAY_SIZE equal elements */ #define AXIS_ARRAY_INITIALIZER(value) { \ value, value, value, value, value, \ value, value, value, value, value, value } /* used by set.c */ #define SET_DEFFORMAT(axis, flag_array) \ if (flag_array[axis]) { \ (void) strcpy(axis_array[axis].formatstring,DEF_FORMAT); \ axis_array[axis].format_is_numeric = 1; \ } /* 'roundoff' check tolerance: less than one hundredth of a tic mark */ #define SIGNIF (0.01) /* (DFK) Watch for cancellation error near zero on axes labels */ /* FIXME HBB 20000521: these seem not to be used much, anywhere... */ #define CheckZero(x,tic) (fabs(x) < ((tic) * SIGNIF) ? 0.0 : (x)) /* ------------ functions exported by axis.c */ t_autoscale load_range __PROTO((AXIS_INDEX, double *, double *, t_autoscale)); void axis_unlog_interval __PROTO((AXIS_INDEX, double *, double *, TBOOLEAN)); void axis_revert_and_unlog_range __PROTO((AXIS_INDEX)); double axis_log_value_checked __PROTO((AXIS_INDEX, double, const char *)); void axis_checked_extend_empty_range __PROTO((AXIS_INDEX, const char *mesg)); char * copy_or_invent_formatstring __PROTO((AXIS_INDEX)); double quantize_normal_tics __PROTO((double, int)); void setup_tics __PROTO((AXIS_INDEX, int)); void gen_tics __PROTO((AXIS_INDEX, /* int, */ tic_callback)); void axis_output_tics __PROTO((AXIS_INDEX, int *, AXIS_INDEX, tic_callback)); void axis_set_graphical_range __PROTO((AXIS_INDEX, unsigned int lower, unsigned int upper)); void axis_draw_2d_zeroaxis __PROTO((AXIS_INDEX, AXIS_INDEX)); TBOOLEAN some_grid_selected __PROTO((void)); void add_tic_user __PROTO((AXIS_INDEX, char *, double, int)); double get_writeback_min __PROTO((AXIS_INDEX)); double get_writeback_max __PROTO((AXIS_INDEX)); void set_writeback_min __PROTO((AXIS_INDEX)); void set_writeback_max __PROTO((AXIS_INDEX)); void save_writeback_all_axes __PROTO((void)); void parse_range __PROTO((AXIS_INDEX axis)); int parse_named_range __PROTO((AXIS_INDEX axis, int token)); void parse_skip_range __PROTO((void)); void check_axis_reversed __PROTO((AXIS_INDEX axis)); /* set widest_tic_label: length of the longest tics label */ void widest_tic_callback __PROTO((AXIS_INDEX, double place, char *text, struct lp_style_type grid, struct ticmark *)); void get_position __PROTO((struct position *pos)); void get_position_default __PROTO((struct position *pos, enum position_type default_type)); /* ------------ autoscaling of the color axis */ #define NEED_PALETTE(plot) \ (PM3DSURFACE == (plot)->plot_style \ || PM3D_IMPLICIT == pm3d.implicit \ || 1 == (plot)->lp_properties.use_palette) int set_cbminmax __PROTO((void)); #endif /* GNUPLOT_AXIS_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/binary.c��������������������������������������������������������������������������0000644�0004711�0000144�00000026416�10700505621�012355� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: binary.c,v 1.13 2007/10/02 18:18:57 sfeam Exp $"); } #endif /* * The addition of gnubin and binary, along with a small patch * to command.c, will permit gnuplot to plot binary files. * gnubin - contains the code that relies on gnuplot include files * and other definitions * binary - contains those things that are independent of those * definitions and files * * With these routines, hidden line removal of your binary data is possible! * * Last update: 3/29/92 memory allocation bugs fixed. jvdwoude@hut.nl * 3/09/92 spelling errors, general cleanup, use alloc with no * nasty fatal errors * 3/03/92 for Gnuplot 3.24. * Created from code for written by RKC for gnuplot 2.0b. * * Copyright (c) 1991,1992 Robert K. Cunningham, MIT Lincoln Laboratory * */ /* NOTE: a significant fraction of these routines is not called from * anywhere in gnuplot. They're provided as a utility library for * people wanting to write binary files usable by gnuplot, as the * bf_test.c demo does it. */ #include "binary.h" #include "alloc.h" #include "util.h" /* This routine scans the first block of the file to see if the file * is a binary file. A file is considered binary if 10% of the * characters in it are not in the ascii character set. (values < * 128), or if a NUL is found. I hope this doesn't break when used on * the bizzare PC's. */ int is_binary_file(FILE *fp) { int i, len; int odd; /* Contains a count of the odd characters */ long where; unsigned char *c; unsigned char buffer[512]; if ((where = ftell(fp)) == -1) { /* Find out where we start */ fprintf(stderr, "Notice: Assuming unseekable data is not binary\n"); return (FALSE); } else { rewind(fp); len = fread(buffer, sizeof(char), 512, fp); if (len <= 0) /* Empty file is declared ascii */ return (FALSE); c = buffer; /* now scan buffer to look for odd characters */ odd = 0; for (i = 0; i < len; i++, c++) { if (!*c) { /* NUL _never_ allowed in text */ odd += len; break; } else if ((*c & 128) || /* Meta-characters--we hope it's not formatting */ (*c == 127) || /* DEL */ (*c < 32 && *c != '\n' && *c != '\r' && *c != '\b' && *c != '\t' && *c != '\f' && *c != 27 /*ESC */ )) odd++; } fseek(fp, where, 0); /* Go back to where we started */ if (odd * 10 > len) /* allow 10% of the characters to be odd */ return (TRUE); else return (FALSE); } } /*========================= I/O Routines ================================ These may be useful for situations other than just gnuplot. Note that I have included the reading _and_ the writing routines, so others can create the file as well as read the file. */ #define START_ROWS 100 /* Each of these must be at least 1 */ #define ADD_ROWS 50 /* This function reads a matrix from a stream * * This routine never returns anything other than vectors and arrays * that range from 0 to some number. */ int fread_matrix( FILE *fin, float GPFAR * GPFAR * GPFAR * ret_matrix, int *nr, int *nc, float GPFAR * GPFAR * row_title, float GPFAR * GPFAR * column_title) { float GPFAR * GPFAR * m, GPFAR * rt, GPFAR * ct; int num_rows = START_ROWS; size_t num_cols; int current_row = 0; float GPFAR * GPFAR * temp_array; float fdummy; if (fread(&fdummy, sizeof(fdummy), 1, fin) != 1) return FALSE; num_cols = (size_t) fdummy; /* Choose a reasonable number of rows, allocate space for it and * continue until this space runs out, then extend the matrix as * necessary. */ ct = alloc_vector(0, num_cols - 1); fread(ct, sizeof(*ct), num_cols, fin); rt = alloc_vector(0, num_rows - 1); m = matrix(0, num_rows - 1, 0, num_cols - 1); while (fread(&rt[current_row], sizeof(rt[current_row]), 1, fin) == 1) { /* We've got another row */ if (fread(m[current_row], sizeof(*(m[current_row])), num_cols, fin) != num_cols) return (FALSE); /* Not a True matrix */ current_row++; if (current_row >= num_rows) { /* We've got to make a bigger rowsize */ temp_array = extend_matrix(m, 0, num_rows - 1, 0, num_cols - 1, num_rows + ADD_ROWS - 1, num_cols - 1); rt = extend_vector(rt, 0, num_rows + ADD_ROWS - 1); num_rows += ADD_ROWS; m = temp_array; } } /* finally we force the matrix to be the correct row size */ /* bug fixed. procedure called with incorrect 6th argument. * jvdwoude@hut.nl */ temp_array = retract_matrix(m, 0, num_rows - 1, 0, num_cols - 1, current_row - 1, num_cols - 1); /* Now save the things that change */ *ret_matrix = temp_array; *row_title = retract_vector(rt, 0, current_row - 1); *column_title = ct; *nr = current_row; /* Really the total number of rows */ *nc = num_cols; return (TRUE); } /* This writes a matrix to a stream * * Note that our ranges are inclusive ranges--and we can specify * subsets. This behaves similarly to the xrange and yrange operators * in gnuplot that we all are familiar with. */ int fwrite_matrix( FILE *fout, float GPFAR * GPFAR *m, int nrl, int nrh, int ncl, int nch, float GPFAR *row_title, float GPFAR *column_title) { int j; float length; int col_length; int status; float GPFAR *title = NULL; length = (float) (col_length = nch - ncl + 1); if ((status = fwrite((char *) &length, sizeof(float), 1, fout)) != 1) { fprintf(stderr, "fwrite 1 returned %d\n", status); return (FALSE); } if (!column_title) { column_title = title = alloc_vector(ncl, nch); for (j = ncl; j <= nch; j++) title[j] = (float) j; } fwrite((char *) column_title, sizeof(float), col_length, fout); if (title) { free_vector(title, ncl); title = NULL; } if (!row_title) { row_title = title = alloc_vector(nrl, nrh); for (j = nrl; j <= nrh; j++) title[j] = (float) j; } for (j = nrl; j <= nrh; j++) { fwrite((char *) &row_title[j], sizeof(float), 1, fout); fwrite((char *) (m[j] + ncl), sizeof(float), col_length, fout); } if (title) free_vector(title, nrl); return (TRUE); } /*===================== Support routines ==============================*/ /* ******************************* VECTOR ******************************* * The following routines interact with vectors. * * If there is an error we don't really return - int_error breaks us out. * * This subroutine based on a subroutine listed in "Numerical Recipies in C", * by Press, Flannery, Teukoilsky and Vetterling (1988). * */ float GPFAR * alloc_vector(int nl, int nh) { float GPFAR *vec; if (! (vec = gp_alloc((nh - nl + 1) * sizeof(float), NULL))) { int_error(NO_CARET, "not enough memory to create vector"); return NULL; /* Not reached */ } return (vec - nl); } /* * Free a vector allocated above * * This subroutine based on a subroutine listed in "Numerical Recipies in C", * by Press, Flannery, Teukoilsky and Vetterling (1988). * */ void free_vector(float GPFAR *vec, int nl) { free(vec + nl); } /************ Routines to modify the length of a vector ****************/ float GPFAR * extend_vector(float GPFAR *vec, int old_nl, int new_nh) { float GPFAR *new_v = gp_realloc((vec + old_nl), (new_nh - old_nl + 1) * sizeof(new_v[0]), "extend/retract vector"); return new_v - old_nl; } float GPFAR * retract_vector(float GPFAR *v, int old_nl, int new_nh) { return extend_vector(v, old_nl, new_nh); } /* **************************** MATRIX ************************ * * The following routines work with matricies * * I always get confused with this, so here I write it down: * for nrl<= nri <=nrh and * for ncl<= ncj <=nch * * This matrix is accessed as: * * matrix[nri][ncj]; * where nri is the offset to the pointer to a vector where the * ncjth element lies. * * If there is an error we don't really return - int_error breaks us out. * * This subroutine based on a subroutine listed in "Numerical Recipies in C", * by Press, Flannery, Teukoilsky and Vetterling (1988). * */ float GPFAR * GPFAR * matrix(int nrl, int nrh, int ncl, int nch) { int i; float GPFAR * GPFAR * m; m = gp_alloc((nrh - nrl + 1) * sizeof(m[0]), "matrix rows"); m -= nrl; for (i = nrl; i <= nrh; i++) { if (!(m[i] = gp_alloc((nch - ncl + 1) * sizeof(m[i][0]), NULL))) { free_matrix(m, nrl, i - 1, ncl); int_error(NO_CARET, "not enough memory to create matrix"); return NULL; } m[i] -= ncl; } return m; } /* * Free a matrix allocated above * * * This subroutine based on a subroutine listed in "Numerical Recipies in C", * by Press, Flannery, Teukoilsky and Vetterling (1988). * */ void free_matrix( float GPFAR * GPFAR * m, int nrl, int nrh, int ncl) { int i; for (i = nrl; i <= nrh; i++) free(m[i] + ncl); free(m + nrl); } /* This routine takes a sub matrix and extends the number of rows and * columns for a new matrix */ float GPFAR * GPFAR * extend_matrix( float GPFAR * GPFAR * a, int nrl, int nrh, int ncl, int nch, int srh, int sch) { int i; float GPFAR * GPFAR * m; m = gp_realloc(a + nrl, (srh - nrl + 1) * sizeof(m[0]), "extend matrix"); m -= nrl; if (sch != nch) { for (i = nrl; i <= nrh; i++) { /* Copy and extend rows */ if (!(m[i] = extend_vector(m[i], ncl, sch))) { free_matrix(m, nrl, nrh, ncl); int_error(NO_CARET, "not enough memory to extend matrix"); return NULL; } } } for (i = nrh + 1; i <= srh; i++) { if (!(m[i] = gp_alloc((nch - ncl + 1) * sizeof(m[i][0]), NULL))) { free_matrix(m, nrl, i - 1, nrl); int_error(NO_CARET, "not enough memory to extend matrix"); return NULL; } m[i] -= ncl; } return m; } /* this routine carves a large matrix down to size */ float GPFAR * GPFAR * retract_matrix( float GPFAR * GPFAR * a, int nrl, int nrh, int ncl, int nch, int srh, int sch) { int i; float GPFAR * GPFAR * m; for (i = srh + 1; i <= nrh; i++) { free_vector(a[i], ncl); } m = gp_realloc(a + nrl, (srh - nrl + 1) * sizeof(m[0]), "retract matrix"); m -= nrl; if (sch != nch) { for (i = nrl; i <= srh; i++) if (!(m[i] = retract_vector(m[i], ncl, sch))) { /* Shrink rows */ free_matrix(m, nrl, srh, ncl); int_error(NO_CARET, "not enough memory to retract matrix"); return NULL; } } return m; } /* allocate a float matrix m[nrl...nrh][ncl...nch] that points to the matrix declared in the standard C manner as a[nrow][ncol], where nrow=nrh-nrl+1, ncol=nch-ncl+1. The routine should be called with the address &a[0][0] as the first argument. This routine does not free the memory used by the original array a but merely assigns pointers to the rows. */ float GPFAR * GPFAR * convert_matrix( float GPFAR *a, int nrl, int nrh, int ncl, int nch) { int i, j, ncol, nrow; float GPFAR * GPFAR * m; nrow = nrh - nrl + 1; ncol = nch - ncl + 1; m = gp_alloc((nrh - nrl + 1) * sizeof(m[0]), "convert_matrix"); m -= nrl; m[nrl] = a - ncl; for (i = 1, j = nrl + 1; i <= nrow - 1; i++, j++) m[j] = m[j - 1] + ncol; return m; } void free_convert_matrix(float GPFAR * GPFAR * b, int nrl) { free(b + nrl); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/term.c����������������������������������������������������������������������������0000644�0004711�0000144�00000252102�12206707271�012041� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: term.c,v 1.225.2.16 2013/08/23 09:50:36 mikulik Exp $"); } #endif /* GNUPLOT - term.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* This module is responsible for looking after the terminal * drivers at the lowest level. Only this module (should) * know about all the various rules about interpreting * the terminal capabilities exported by the terminal * drivers in the table. * * Note that, as far as this module is concerned, a * terminal session lasts only until _either_ terminal * or output file changes. Before either is changed, * the terminal is shut down. * * Entry points : (see also term/README) * * term_set_output() : called when set output invoked * * term_initialise() : optional. Prepare the terminal for first * use. It protects itself against subsequent calls. * * term_start_plot() : called at start of graph output. Calls term_init * if necessary * * term_apply_lp_properties() : apply linewidth settings * * term_end_plot() : called at the end of a plot * * term_reset() : called during int_error handling, to shut * terminal down cleanly * * term_start_multiplot() : called by set multiplot * * term_end_multiplot() : called by set nomultiplot * * term_check_multiplot_okay() : called just before an interactive * prompt is issued while in multiplot mode, * to allow terminal to suspend if necessary, * Raises an error if interactive multiplot * is not supported. */ #include "term_api.h" #include "alloc.h" #include "axis.h" #ifndef NO_BITMAP_SUPPORT #include "bitmap.h" #endif #include "command.h" #include "driver.h" #include "graphics.h" #include "help.h" #include "plot.h" #include "tables.h" #include "getcolor.h" #include "term.h" #include "util.h" #include "version.h" #include "misc.h" #ifdef USE_MOUSE #include "mouse.h" #else /* Some terminals (svg canvas) can provide mousing information */ /* even if the interactive gnuplot session itself cannot. */ long mouse_mode = 0; char* mouse_alt_string = NULL; #endif #ifdef _Windows FILE *open_printer __PROTO((void)); /* in wprinter.c */ void close_printer __PROTO((FILE * outfile)); # ifdef __MSC__ # include <malloc.h> # include <io.h> # else # include <alloc.h> # endif /* MSC */ #endif /* _Windows */ static int termcomp __PROTO((const generic * a, const generic * b)); /* Externally visible variables */ /* the central instance: the current terminal's interface structure */ struct termentry *term = NULL; /* unknown */ /* ... and its options string */ char term_options[MAX_LINE_LEN+1] = ""; /* the 'output' file name and handle */ char *outstr = NULL; /* means "STDOUT" */ FILE *gpoutfile; /* Output file where the PostScript output goes to. See term_api.h for more details. */ FILE *gppsfile = 0; char *PS_psdir = NULL; /* true if terminal has been initialized */ TBOOLEAN term_initialised; /* The qt and wxt terminals cannot be used in the same session. */ /* Whichever one is used first to plot, this locks out the other. */ void *term_interlock = NULL; /* true if in multiplot mode */ TBOOLEAN multiplot = FALSE; /* text output encoding, for terminals that support it */ enum set_encoding_id encoding; /* table of encoding names, for output of the setting */ const char *encoding_names[] = { "default", "iso_8859_1", "iso_8859_2", "iso_8859_9", "iso_8859_15", "cp437", "cp850", "cp852", "cp950", "cp1250", "cp1251", "cp1254", "koi8r", "koi8u", "sjis", "utf8", NULL }; /* 'set encoding' options */ const struct gen_table set_encoding_tbl[] = { { "def$ault", S_ENC_DEFAULT }, { "utf$8", S_ENC_UTF8 }, { "iso$_8859_1", S_ENC_ISO8859_1 }, { "iso_8859_2", S_ENC_ISO8859_2 }, { "iso_8859_9", S_ENC_ISO8859_9 }, { "iso_8859_15", S_ENC_ISO8859_15 }, { "cp4$37", S_ENC_CP437 }, { "cp850", S_ENC_CP850 }, { "cp852", S_ENC_CP852 }, { "cp950", S_ENC_CP950 }, { "cp1250", S_ENC_CP1250 }, { "cp1251", S_ENC_CP1251 }, { "cp1254", S_ENC_CP1254 }, { "koi8$r", S_ENC_KOI8_R }, { "koi8$u", S_ENC_KOI8_U }, { "sj$is", S_ENC_SJIS }, { NULL, S_ENC_INVALID } }; const char *arrow_head_names[4] = {"nohead", "head", "backhead", "heads"}; /* HBB 20020225: moved here, from ipc.h, where it never should have * been. */ #ifdef PIPE_IPC /* HBB 20020225: currently not used anywhere outside term.c --> make * it static */ static SELECT_TYPE_ARG1 ipc_back_fd = IPC_BACK_CLOSED; #endif /* resolution in dpi for converting pixels to size units */ int gp_resolution = 72; /* Support for enhanced text mode. Declared extern in term_api.h */ char enhanced_text[MAX_LINE_LEN+1] = ""; char *enhanced_cur_text = NULL; double enhanced_fontscale = 1.0; char enhanced_escape_format[16] = ""; double enhanced_max_height = 0.0, enhanced_min_height = 0.0; /* flag variable to disable enhanced output of filenames, mainly. */ TBOOLEAN ignore_enhanced_text = FALSE; /* Recycle count for user-defined linetypes */ int linetype_recycle_count = 0; /* Internal variables */ /* true if terminal is in graphics mode */ static TBOOLEAN term_graphics = FALSE; /* we have suspended the driver, in multiplot mode */ static TBOOLEAN term_suspended = FALSE; /* true if? */ static TBOOLEAN opened_binary = FALSE; /* true if require terminal to be initialized */ static TBOOLEAN term_force_init = FALSE; /* internal pointsize for do_point */ static double term_pointsize=1; /* Internal prototypes: */ static void term_suspend __PROTO((void)); static void term_close_output __PROTO((void)); static void null_linewidth __PROTO((double)); static void do_point __PROTO((unsigned int x, unsigned int y, int number)); static void do_pointsize __PROTO((double size)); static void line_and_point __PROTO((unsigned int x, unsigned int y, int number)); static void do_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, int head)); static int null_text_angle __PROTO((int ang)); static int null_justify_text __PROTO((enum JUSTIFY just)); static int null_scale __PROTO((double x, double y)); static void null_layer __PROTO((t_termlayer layer)); static void options_null __PROTO((void)); static void UNKNOWN_null __PROTO((void)); static void MOVE_null __PROTO((unsigned int, unsigned int)); static void LINETYPE_null __PROTO((int)); static void PUTTEXT_null __PROTO((unsigned int, unsigned int, const char *)); static int strlen_tex __PROTO((const char *)); /* Used by terminals and by shared routine parse_term_size() */ typedef enum { PIXELS, INCHES, CM } size_units; static size_units parse_term_size __PROTO((float *xsize, float *ysize, size_units def_units)); /* * Bookkeeping and support routine for 'set multiplot layout <rows>, <cols>' * July 2004 * Volker Dobler <v.dobler@web.de> */ static void mp_layout_size_and_offset __PROTO((void)); enum set_multiplot_id { S_MULTIPLOT_LAYOUT, S_MULTIPLOT_COLUMNSFIRST, S_MULTIPLOT_ROWSFIRST, S_MULTIPLOT_SCALE, S_MULTIPLOT_DOWNWARDS, S_MULTIPLOT_UPWARDS, S_MULTIPLOT_OFFSET, S_MULTIPLOT_TITLE, S_MULTIPLOT_INVALID }; static const struct gen_table set_multiplot_tbl[] = { { "lay$out", S_MULTIPLOT_LAYOUT }, { "col$umnsfirst", S_MULTIPLOT_COLUMNSFIRST }, { "row$sfirst", S_MULTIPLOT_ROWSFIRST }, { "down$wards", S_MULTIPLOT_DOWNWARDS }, { "up$wards", S_MULTIPLOT_UPWARDS }, { "sca$le", S_MULTIPLOT_SCALE }, { "off$set", S_MULTIPLOT_OFFSET }, { "ti$tle", S_MULTIPLOT_TITLE }, { NULL, S_MULTIPLOT_INVALID } }; # define MP_LAYOUT_DEFAULT { \ FALSE, /* auto_layout */ \ 0, /* current_panel */ \ 0, 0, /* num_rows, num_cols */ \ FALSE, /* row_major */ \ TRUE, /* downwards */ \ 0, 0, /* act_row, act_col */ \ 1, 1, /* xscale, yscale */ \ 0, 0, /* xoffset, yoffset */ \ 0,0,0,0, /* prev_ sizes and offsets */ \ EMPTY_LABELSTRUCT, 0.0 \ } static struct { TBOOLEAN auto_layout; /* automatic layout if true */ int current_panel; /* initialized to 0, incremented after each plot */ int num_rows; /* number of rows in layout */ int num_cols; /* number of columns in layout */ TBOOLEAN row_major; /* row major mode if true, column major else */ TBOOLEAN downwards; /* prefer downwards or upwards direction */ int act_row; /* actual row in layout */ int act_col; /* actual column in layout */ double xscale; /* factor for horizontal scaling */ double yscale; /* factor for vertical scaling */ double xoffset; /* horizontal shift */ double yoffset; /* horizontal shift */ double prev_xsize, prev_ysize, prev_xoffset, prev_yoffset; /* values before 'set multiplot layout' */ text_label title; /* goes above complete set of plots */ double title_height; /* fractional height reserved for title */ } mp_layout = MP_LAYOUT_DEFAULT; #ifdef VMS char *vms_init(); void vms_reset(); void term_mode_tek(); void term_mode_native(); void term_pasthru(); void term_nopasthru(); void fflush_binary(); # define FOPEN_BINARY(file) fopen(file, "wb", "rfm=fix", "bls=512", "mrs=512") #else /* !VMS */ # define FOPEN_BINARY(file) fopen(file, "wb") #endif /* !VMS */ #if defined(MSDOS) || defined(WIN32) # if defined(__DJGPP__) # include <io.h> # endif # include <fcntl.h> # ifndef O_BINARY # ifdef _O_BINARY # define O_BINARY _O_BINARY # else # define O_BINARY O_BINARY_is_not_defined # endif # endif #endif #ifdef __EMX__ #include <io.h> #include <fcntl.h> #endif #if defined(__WATCOMC__) || defined(__MSC__) # include <io.h> /* for setmode() */ #endif #define NICE_LINE 0 #define POINT_TYPES 6 #ifndef DEFAULTTERM # define DEFAULTTERM NULL #endif /* interface to the rest of gnuplot - the rules are getting * too complex for the rest of gnuplot to be allowed in */ #if defined(PIPES) static TBOOLEAN output_pipe_open = FALSE; #endif /* PIPES */ static void term_close_output() { FPRINTF((stderr, "term_close_output\n")); opened_binary = FALSE; if (!outstr) /* ie using stdout */ return; #if defined(PIPES) if (output_pipe_open) { (void) pclose(gpoutfile); output_pipe_open = FALSE; } else #endif /* PIPES */ #ifdef _Windows if (stricmp(outstr, "PRN") == 0) close_printer(gpoutfile); else #endif if (gpoutfile != gppsfile) fclose(gpoutfile); gpoutfile = stdout; /* Don't dup... */ free(outstr); outstr = NULL; if (gppsfile) fclose(gppsfile); gppsfile = NULL; } #ifdef OS2 # define POPEN_MODE ("wb") #else # define POPEN_MODE ("w") #endif /* assigns dest to outstr, so it must be allocated or NULL * and it must not be outstr itself ! */ void term_set_output(char *dest) { FILE *f = NULL; FPRINTF((stderr, "term_set_output\n")); assert(dest == NULL || dest != outstr); if (multiplot) { fputs("In multiplot mode you can't change the output\n", stderr); return; } if (term && term_initialised) { (*term->reset) (); term_initialised = FALSE; /* switch off output to special postscript file (if used) */ gppsfile = NULL; } if (dest == NULL) { /* stdout */ term_close_output(); } else { #if defined(PIPES) if (*dest == '|') { restrict_popen(); if ((f = popen(dest + 1, POPEN_MODE)) == (FILE *) NULL) os_error(c_token, "cannot create pipe; output not changed"); else output_pipe_open = TRUE; } else { #endif /* PIPES */ #ifdef _Windows if (outstr && stricmp(outstr, "PRN") == 0) { /* we can't call open_printer() while printer is open, so */ close_printer(gpoutfile); /* close printer immediately if open */ gpoutfile = stdout; /* and reset output to stdout */ free(outstr); outstr = NULL; } if (stricmp(dest, "PRN") == 0) { if ((f = open_printer()) == (FILE *) NULL) os_error(c_token, "cannot open printer temporary file; output may have changed"); } else #endif { #if defined (MSDOS) if (outstr && (0 == stricmp(outstr, dest))) { /* On MSDOS, you cannot open the same file twice and * then close the first-opened one and keep the second * open, it seems. If you do, you get lost clusters * (connection to the first version of the file is * lost, it seems). */ /* FIXME: this is not yet safe enough. You can fool it by * specifying the same output file in two different ways * (relative vs. absolute path to file, e.g.) */ term_close_output(); } #endif if (term && (term->flags & TERM_BINARY)) f = FOPEN_BINARY(dest); else f = fopen(dest, "w"); if (f == (FILE *) NULL) os_error(c_token, "cannot open file; output not changed"); } #if defined(PIPES) } #endif term_close_output(); gpoutfile = f; outstr = dest; opened_binary = (term && (term->flags & TERM_BINARY)); } } void term_initialise() { FPRINTF((stderr, "term_initialise()\n")); if (!term) int_error(NO_CARET, "No terminal defined"); /* check if we have opened the output file in the wrong mode * (text/binary), if set term comes after set output * This was originally done in change_term, but that * resulted in output files being truncated */ if (outstr && (term->flags & TERM_NO_OUTPUTFILE)) { if (interactive) fprintf(stderr,"Closing %s\n",outstr); term_close_output(); } if (outstr && (((term->flags & TERM_BINARY) && !opened_binary) || ((!(term->flags & TERM_BINARY) && opened_binary)))) { /* this is nasty - we cannot just term_set_output(outstr) * since term_set_output will first free outstr and we * end up with an invalid pointer. I think I would * prefer to defer opening output file until first plot. */ char *temp = gp_alloc(strlen(outstr) + 1, "temp file string"); if (temp) { FPRINTF((stderr, "term_initialise: reopening \"%s\" as %s\n", outstr, term->flags & TERM_BINARY ? "binary" : "text")); strcpy(temp, outstr); term_set_output(temp); /* will free outstr */ if (temp != outstr) { if (temp) free(temp); temp = outstr; } } else fputs("Cannot reopen output file in binary", stderr); /* and carry on, hoping for the best ! */ } #if defined(MSDOS) || defined (_Windows) || defined(OS2) # ifdef _Windows else if (!outstr && (term->flags & TERM_BINARY)) # else else if (!outstr && !interactive && (term->flags & TERM_BINARY)) # endif { /* binary to stdout in non-interactive session... */ fflush(stdout); setmode(fileno(stdout), O_BINARY); } #endif if (!term_initialised || term_force_init) { FPRINTF((stderr, "- calling term->init()\n")); (*term->init) (); term_initialised = TRUE; } } void term_start_plot() { FPRINTF((stderr, "term_start_plot()\n")); if (!term_initialised) term_initialise(); if (!term_graphics) { FPRINTF((stderr, "- calling term->graphics()\n")); (*term->graphics) (); term_graphics = TRUE; } else if (multiplot && term_suspended) { if (term->resume) { FPRINTF((stderr, "- calling term->resume()\n")); (*term->resume) (); } term_suspended = FALSE; } /* Sync point for epslatex text positioning */ (*term->layer)(TERM_LAYER_RESET); /* Because PostScript plots may be viewed out of order, make sure */ /* Each new plot makes no assumption about the previous palette. */ if (term->flags & TERM_IS_POSTSCRIPT) invalidate_palette(); /* Set canvas size to full range of current terminal coordinates */ canvas.xleft = 0; canvas.xright = term->xmax - 1; canvas.ybot = 0; canvas.ytop = term->ymax - 1; } void term_end_plot() { FPRINTF((stderr, "term_end_plot()\n")); if (!term_initialised) return; /* Sync point for epslatex text positioning */ (*term->layer)(TERM_LAYER_END_TEXT); if (!multiplot) { FPRINTF((stderr, "- calling term->text()\n")); (*term->text) (); term_graphics = FALSE; } else { mp_layout.current_panel++; if (mp_layout.auto_layout) { if (mp_layout.row_major) { mp_layout.act_row++; if (mp_layout.act_row == mp_layout.num_rows ) { mp_layout.act_row = 0; mp_layout.act_col++; if (mp_layout.act_col == mp_layout.num_cols ) { /* int_warn(NO_CARET,"will overplot first plot"); */ mp_layout.act_col = 0; } } } else { /* column-major */ mp_layout.act_col++; if (mp_layout.act_col == mp_layout.num_cols ) { mp_layout.act_col = 0; mp_layout.act_row++; if (mp_layout.act_row == mp_layout.num_rows ) { /* int_warn(NO_CARET,"will overplot first plot"); */ mp_layout.act_col = 0; } } } mp_layout_size_and_offset(); } } #ifdef VMS if (opened_binary) fflush_binary(); else #endif /* VMS */ (void) fflush(gpoutfile); #ifdef USE_MOUSE recalc_statusline(); update_ruler(); #endif } void term_start_multiplot() { FPRINTF((stderr, "term_start_multiplot()\n")); c_token++; if (multiplot) term_end_multiplot(); term_start_plot(); /* FIXME: more options should be reset/initialized each time */ mp_layout.auto_layout = FALSE; mp_layout.current_panel = 0; mp_layout.title.noenhanced = FALSE; /* Parse options */ while (!END_OF_COMMAND) { char *s; if (almost_equals(c_token, "ti$tle")) { c_token++; if ((s = try_to_get_string())) { free(mp_layout.title.text); mp_layout.title.text = s; } continue; } if (equals(c_token, "font")) { c_token++; if ((s = try_to_get_string())) { free(mp_layout.title.font); mp_layout.title.font = s; } continue; } if (almost_equals(c_token,"enh$anced")) { mp_layout.title.noenhanced = FALSE; c_token++; continue; } if (almost_equals(c_token,"noenh$anced")) { mp_layout.title.noenhanced = TRUE; c_token++; continue; } if (almost_equals(c_token, "lay$out")) { if (mp_layout.auto_layout) int_error(c_token, "too many layout commands"); else mp_layout.auto_layout = TRUE; c_token++; if (END_OF_COMMAND) { int_error(c_token,"expecting '<num_cols>,<num_rows>'"); } /* read row,col */ mp_layout.num_rows = int_expression(); if (END_OF_COMMAND || !equals(c_token,",") ) int_error(c_token, "expecting ', <num_cols>'"); c_token++; if (END_OF_COMMAND) int_error(c_token, "expecting <num_cols>"); mp_layout.num_cols = int_expression(); /* remember current values of the plot size */ mp_layout.prev_xsize = xsize; mp_layout.prev_ysize = ysize; mp_layout.prev_xoffset = xoffset; mp_layout.prev_yoffset = yoffset; mp_layout.act_row = 0; mp_layout.act_col = 0; continue; } /* The remaining options are only valid for auto-layout mode */ if (!mp_layout.auto_layout) int_error(c_token, "only valid as part of an auto-layout command"); switch(lookup_table(&set_multiplot_tbl[0],c_token)) { case S_MULTIPLOT_COLUMNSFIRST: mp_layout.row_major = TRUE; c_token++; break; case S_MULTIPLOT_ROWSFIRST: mp_layout.row_major = FALSE; c_token++; break; case S_MULTIPLOT_DOWNWARDS: mp_layout.downwards = TRUE; c_token++; break; case S_MULTIPLOT_UPWARDS: mp_layout.downwards = FALSE; c_token++; break; case S_MULTIPLOT_SCALE: c_token++; mp_layout.xscale = real_expression(); mp_layout.yscale = mp_layout.xscale; if (!END_OF_COMMAND && equals(c_token,",") ) { c_token++; if (END_OF_COMMAND) { int_error(c_token, "expecting <yscale>"); } mp_layout.yscale = real_expression(); } break; case S_MULTIPLOT_OFFSET: c_token++; mp_layout.xoffset = real_expression(); mp_layout.yoffset = mp_layout.xoffset; if (!END_OF_COMMAND && equals(c_token,",") ) { c_token++; if (END_OF_COMMAND) { int_error(c_token, "expecting <yoffset>"); } mp_layout.yoffset = real_expression(); } break; default: int_error(c_token,"invalid or duplicate option"); break; } } /* If we reach here, then the command has been successfully parsed */ multiplot = TRUE; fill_gpval_integer("GPVAL_MULTIPLOT", 1); /* Place overall title before doing anything else */ if (mp_layout.title.text) { double tmpx, tmpy; unsigned int x, y; char *p = mp_layout.title.text; map_position_r(&(mp_layout.title.offset), &tmpx, &tmpy, "mp title"); x = term->xmax / 2 + tmpx; y = term->ymax - term->v_char + tmpy;; ignore_enhanced(mp_layout.title.noenhanced); apply_pm3dcolor(&(mp_layout.title.textcolor), term); write_multiline(x, y, mp_layout.title.text, CENTRE, JUST_TOP, 0, mp_layout.title.font); reset_textcolor(&(mp_layout.title.textcolor), term); ignore_enhanced(FALSE); /* Calculate fractional height of title compared to entire page */ /* If it would fill the whole page, forget it! */ for (y=1; *p; p++) if (*p == '\n') y++; /* Oct 2012 - v_char depends on the font used */ if (mp_layout.title.font && *mp_layout.title.font && term->set_font) term->set_font(mp_layout.title.font); mp_layout.title_height = (double)(y * term->v_char) / (double)term->ymax; if (mp_layout.title.font && *mp_layout.title.font && term->set_font) term->set_font(""); if (mp_layout.title_height > 0.9) mp_layout.title_height = 0.05; } else { mp_layout.title_height = 0.0; } mp_layout_size_and_offset(); #ifdef USE_MOUSE UpdateStatusline(); #endif } void term_end_multiplot() { FPRINTF((stderr, "term_end_multiplot()\n")); if (!multiplot) return; if (term_suspended) { if (term->resume) (*term->resume) (); term_suspended = FALSE; } multiplot = FALSE; fill_gpval_integer("GPVAL_MULTIPLOT", 0); /* reset plot size and origin to values before 'set multiplot layout' */ if (mp_layout.auto_layout) { xsize = mp_layout.prev_xsize; ysize = mp_layout.prev_ysize; xoffset = mp_layout.prev_xoffset; yoffset = mp_layout.prev_yoffset; } /* reset automatic multiplot layout */ mp_layout.auto_layout = FALSE; mp_layout.xscale = mp_layout.yscale = 1.0; mp_layout.xoffset = mp_layout.yoffset = 0.0; if (mp_layout.title.text) { free(mp_layout.title.text); mp_layout.title.text = NULL; } term_end_plot(); #ifdef USE_MOUSE UpdateStatusline(); #endif } static void term_suspend() { FPRINTF((stderr, "term_suspend()\n")); if (term_initialised && !term_suspended && term->suspend) { FPRINTF((stderr, "- calling term->suspend()\n")); (*term->suspend) (); term_suspended = TRUE; } } void term_reset() { FPRINTF((stderr, "term_reset()\n")); #ifdef USE_MOUSE /* Make sure that ^C will break out of a wait for 'pause mouse' */ paused_for_mouse = 0; #endif if (!term_initialised) return; if (term_suspended) { if (term->resume) { FPRINTF((stderr, "- calling term->resume()\n")); (*term->resume) (); } term_suspended = FALSE; } if (term_graphics) { (*term->text) (); term_graphics = FALSE; } if (term_initialised) { (*term->reset) (); term_initialised = FALSE; /* switch off output to special postscript file (if used) */ gppsfile = NULL; } } void term_apply_lp_properties(struct lp_style_type *lp) { /* This function passes all the line and point properties to the * terminal driver and issues the corresponding commands. * * Alas, sometimes it might be necessary to give some help to * this function by explicitly issuing additional '(*term)(...)' * commands. */ t_colorspec colorspec = lp->pm3d_color; int lt = lp->l_type; if (lp->pointflag) { /* change points, too * Currently, there is no 'pointtype' function. For points * there is a special function also dealing with (x,y) co- * ordinates. */ if (lp->p_size < 0) (*term->pointsize) (pointsize); else (*term->pointsize) (lp->p_size); } /* _first_ set the line width, _then_ set the line type ! * The linetype might depend on the linewidth in some terminals. */ (*term->linewidth) (lp->l_width); /* Apply "linetype", which can include both color and dot/dash */ if (lt <= LT_COLORFROMCOLUMN) /* The color will be picked up in a moment, but we first need */ /* to set a reasonable line type. */ (*term->linetype) (LT_BLACK); else (*term->linetype) (lt); /* Possibly override the linetype color with a fancier colorspec */ if (!lp->use_palette) { if ((term->flags & TERM_MONOCHROME) != 0) return; colorspec.type = TC_LT; colorspec.lt = lt; } apply_pm3dcolor(&colorspec, term); } void term_check_multiplot_okay(TBOOLEAN f_interactive) { FPRINTF((stderr, "term_multiplot_okay(%d)\n", f_interactive)); if (!term_initialised) return; /* they've not started yet */ /* make sure that it is safe to issue an interactive prompt * it is safe if * it is not an interactive read, or * the terminal supports interactive multiplot, or * we are not writing to stdout and terminal doesn't * refuse multiplot outright */ if (!f_interactive || (term->flags & TERM_CAN_MULTIPLOT) || ((gpoutfile != stdout) && !(term->flags & TERM_CANNOT_MULTIPLOT)) ) { /* it's okay to use multiplot here, but suspend first */ term_suspend(); return; } /* uh oh: they're not allowed to be in multiplot here */ term_end_multiplot(); /* at this point we know that it is interactive and that the * terminal can either only do multiplot when writing to * to a file, or it does not do multiplot at all */ if (term->flags & TERM_CANNOT_MULTIPLOT) int_error(NO_CARET, "This terminal does not support multiplot"); else int_error(NO_CARET, "Must set output to a file or put all multiplot commands on one input line"); } void write_multiline( unsigned int x, unsigned int y, char *text, JUSTIFY hor, /* horizontal ... */ VERT_JUSTIFY vert, /* ... and vertical just - text in hor direction despite angle */ int angle, /* assume term has already been set for this */ const char *font) /* NULL or "" means use default */ { struct termentry *t = term; char *p = text; if (!p) return; /* EAM 9-Feb-2003 - Set font before calculating sizes */ if (font && *font && t->set_font) (*t->set_font) (font); if (vert != JUST_TOP) { /* count lines and adjust y */ int lines = 0; /* number of linefeeds - one fewer than lines */ while (*p) { if (*p++ == '\n') ++lines; } if (angle) x -= (vert * lines * t->v_char) / 2; else y += (vert * lines * t->v_char) / 2; } for (;;) { /* we will explicitly break out */ if ((text != NULL) && (p = strchr(text, '\n')) != NULL) *p = 0; /* terminate the string */ if ((*t->justify_text) (hor)) { if (on_page(x, y)) (*t->put_text) (x, y, text); } else { int fix = hor * t->h_char * estimate_strlen(text) / 2; if (angle) { if (on_page(x, y - fix)) (*t->put_text) (x, y - fix, text); } else { if (on_page(x - fix, y)) (*t->put_text) (x - fix, y, text); } } if (angle == 90 || angle == TEXT_VERTICAL) x += t->v_char; else if (angle == -90 || angle == -TEXT_VERTICAL) x -= t->v_char; else y -= t->v_char; if (!p) break; else { /* put it back */ *p = '\n'; } text = p + 1; } /* unconditional branch back to the for(;;) - just a goto ! */ if (font && *font && t->set_font) (*t->set_font) (""); } static void do_point(unsigned int x, unsigned int y, int number) { int htic, vtic; struct termentry *t = term; if (number < 0) { /* do dot */ (*t->move) (x, y); (*t->vector) (x, y); return; } number %= POINT_TYPES; /* should be in term_tbl[] in later version */ htic = (term_pointsize * t->h_tic / 2); vtic = (term_pointsize * t->v_tic / 2); /* point types 1..4 are same as in postscript, png and x11 point types 5..6 are "similar" (note that (number) equals (pointtype-1) */ switch (number) { case 4: /* do diamond */ (*t->move) (x - htic, y); (*t->vector) (x, y - vtic); (*t->vector) (x + htic, y); (*t->vector) (x, y + vtic); (*t->vector) (x - htic, y); (*t->move) (x, y); (*t->vector) (x, y); break; case 0: /* do plus */ (*t->move) (x - htic, y); (*t->vector) (x - htic, y); (*t->vector) (x + htic, y); (*t->move) (x, y - vtic); (*t->vector) (x, y - vtic); (*t->vector) (x, y + vtic); break; case 3: /* do box */ (*t->move) (x - htic, y - vtic); (*t->vector) (x - htic, y - vtic); (*t->vector) (x + htic, y - vtic); (*t->vector) (x + htic, y + vtic); (*t->vector) (x - htic, y + vtic); (*t->vector) (x - htic, y - vtic); (*t->move) (x, y); (*t->vector) (x, y); break; case 1: /* do X */ (*t->move) (x - htic, y - vtic); (*t->vector) (x - htic, y - vtic); (*t->vector) (x + htic, y + vtic); (*t->move) (x - htic, y + vtic); (*t->vector) (x - htic, y + vtic); (*t->vector) (x + htic, y - vtic); break; case 5: /* do triangle */ (*t->move) (x, y + (4 * vtic / 3)); (*t->vector) (x - (4 * htic / 3), y - (2 * vtic / 3)); (*t->vector) (x + (4 * htic / 3), y - (2 * vtic / 3)); (*t->vector) (x, y + (4 * vtic / 3)); (*t->move) (x, y); (*t->vector) (x, y); break; case 2: /* do star */ (*t->move) (x - htic, y); (*t->vector) (x - htic, y); (*t->vector) (x + htic, y); (*t->move) (x, y - vtic); (*t->vector) (x, y - vtic); (*t->vector) (x, y + vtic); (*t->move) (x - htic, y - vtic); (*t->vector) (x - htic, y - vtic); (*t->vector) (x + htic, y + vtic); (*t->move) (x - htic, y + vtic); (*t->vector) (x - htic, y + vtic); (*t->vector) (x + htic, y - vtic); break; } } static void do_pointsize(double size) { term_pointsize = (size >= 0 ? size : 1); } /* * general point routine */ static void line_and_point(unsigned int x, unsigned int y, int number) { /* temporary(?) kludge to allow terminals with bad linetypes to make nice marks */ (*term->linetype) (NICE_LINE); do_point(x, y, number); } /* * general arrow routine * * I set the angle between the arrowhead and the line 15 degree. * The length of arrowhead varies depending on the line length * within the the range [0.3*(the-tic-length), 2*(the-tic-length)]. * No head is printed if the arrow length is zero. * * Yasu-hiro Yamazaki(hiro@rainbow.physics.utoronto.ca) * Jul 1, 1993 */ #define COS15 (0.96593) /* cos of 15 degree */ #define SIN15 (0.25882) /* sin of 15 degree */ #define HEAD_LONG_LIMIT (2.0) /* long limit of arrowhead length */ #define HEAD_SHORT_LIMIT (0.3) /* short limit of arrowhead length */ /* their units are the "tic" length */ #define HEAD_COEFF (0.3) /* default value of head/line length ratio */ int curr_arrow_headlength; /* access head length + angle without changing API */ double curr_arrow_headangle; /* angle in degrees */ double curr_arrow_headbackangle; /* angle in degrees */ int curr_arrow_headfilled; /* arrow head filled or not */ static void do_arrow( unsigned int usx, unsigned int usy, /* start point */ unsigned int uex, unsigned int uey, /* end point (point of arrowhead) */ int headstyle) { /* Clipping and angle calculations do not work if coords are unsigned! */ int sx = (int)usx; int sy = (int)usy; int ex = (int)uex; int ey = (int)uey; struct termentry *t = term; float len_tic = ((double) (t->h_tic + t->v_tic)) / 2.0; /* average of tic sizes */ /* (dx,dy) : vector from end to start */ double dx = sx - ex; double dy = sy - ey; double len_arrow = sqrt(dx * dx + dy * dy); gpiPoint filledhead[5]; int xm = 0, ym = 0; BoundingBox *clip_save; t_arrow_head head = (t_arrow_head)((headstyle < 0) ? -headstyle : headstyle); /* negative headstyle means draw heads only, no shaft */ /* FIXME: The plan is to migrate calling routines to call via */ /* draw_clip_arrow() in which case we would not need to clip again here. */ clip_save = clip_area; if (term->flags & TERM_CAN_CLIP) clip_area = NULL; else clip_area = &canvas; /* Calculate and draw arrow heads. * Draw no head for arrows with length = 0, or, to be more specific, * length < DBL_EPSILON, because len_arrow will almost always be != 0. */ if ((head != NOHEAD) && fabs(len_arrow) >= DBL_EPSILON) { int x1, y1, x2, y2; if (curr_arrow_headlength <= 0) { /* An arrow head with the default size and angles */ double coeff_shortest = len_tic * HEAD_SHORT_LIMIT / len_arrow; double coeff_longest = len_tic * HEAD_LONG_LIMIT / len_arrow; double head_coeff = GPMAX(coeff_shortest, GPMIN(HEAD_COEFF, coeff_longest)); /* we put the arrowhead marks at 15 degrees to line */ x1 = (int) ((COS15 * dx - SIN15 * dy) * head_coeff); y1 = (int) ((SIN15 * dx + COS15 * dy) * head_coeff); x2 = (int) ((COS15 * dx + SIN15 * dy) * head_coeff); y2 = (int) ((-SIN15 * dx + COS15 * dy) * head_coeff); /* backangle defaults to 90 deg */ xm = (int) ((x1 + x2)/2); ym = (int) ((y1 + y2)/2); } else { /* An arrow head with the length + angle specified explicitly. */ /* Assume that if the arrow is shorter than the arrowhead, this is */ /* because of foreshortening in a 3D plot. */ double alpha = curr_arrow_headangle * DEG2RAD; double beta = curr_arrow_headbackangle * DEG2RAD; double phi = atan2(-dy,-dx); /* azimuthal angle of the vector */ double backlen, effective_length; double dx2, dy2; effective_length = curr_arrow_headlength; if (curr_arrow_headlength > len_arrow/2.) { effective_length = len_arrow/2.; alpha = atan(tan(alpha)*((double)curr_arrow_headlength/effective_length)); beta = atan(tan(beta)*((double)curr_arrow_headlength/effective_length)); } backlen = sin(alpha) / sin(beta); /* anticlock-wise head segment */ x1 = -(int)(effective_length * cos( alpha - phi )); y1 = (int)(effective_length * sin( alpha - phi )); /* clock-wise head segment */ dx2 = -effective_length * cos( phi + alpha ); dy2 = -effective_length * sin( phi + alpha ); x2 = (int) (dx2); y2 = (int) (dy2); /* back point */ xm = (int) (dx2 + backlen*effective_length * cos( phi + beta )); ym = (int) (dy2 + backlen*effective_length * sin( phi + beta )); } if (head & END_HEAD) { if (curr_arrow_headfilled==2 && !clip_point(ex,ey)) { /* draw filled forward arrow head */ filledhead[0].x = ex + xm; filledhead[0].y = ey + ym; filledhead[1].x = ex + x1; filledhead[1].y = ey + y1; filledhead[2].x = ex; filledhead[2].y = ey; filledhead[3].x = ex + x2; filledhead[3].y = ey + y2; filledhead[4].x = ex + xm; filledhead[4].y = ey + ym; filledhead->style = FS_OPAQUE; if (t->filled_polygon) (*t->filled_polygon) (5, filledhead); } /* draw outline of forward arrow head */ if (clip_point(ex,ey)) ; else if (curr_arrow_headfilled!=0) { draw_clip_line(ex+xm, ey+ym, ex+x1, ey+y1); draw_clip_line(ex+x1, ey+y1, ex, ey); draw_clip_line(ex, ey, ex+x2, ey+y2); draw_clip_line(ex+x2, ey+y2, ex+xm, ey+ym); } else { draw_clip_line(ex+x1, ey+y1, ex, ey); draw_clip_line(ex, ey, ex+x2, ey+y2); } } /* backward arrow head */ if ((head & BACKHEAD) && !clip_point(sx,sy)) { if (curr_arrow_headfilled==2) { /* draw filled backward arrow head */ filledhead[0].x = sx - xm; filledhead[0].y = sy - ym; filledhead[1].x = sx - x1; filledhead[1].y = sy - y1; filledhead[2].x = sx; filledhead[2].y = sy; filledhead[3].x = sx - x2; filledhead[3].y = sy - y2; filledhead[4].x = sx - xm; filledhead[4].y = sy - ym; filledhead->style = FS_OPAQUE; if (t->filled_polygon) (*t->filled_polygon) (5, filledhead); } /* draw outline of backward arrow head */ if (curr_arrow_headfilled!=0) { draw_clip_line(sx-xm, sy-ym, sx-x2, sy-y2); draw_clip_line(sx-x2, sy-y2, sx, sy); draw_clip_line(sx, sy, sx-x1, sy-y1); draw_clip_line(sx-x1, sy-y1, sx-xm, sy-ym); } else { draw_clip_line(sx-x2, sy-y2, sx, sy); draw_clip_line(sx, sy, sx-x1, sy-y1); } } } /* Draw the line for the arrow. */ if (headstyle >= 0) { if ((head & BACKHEAD) && (fabs(len_arrow) >= DBL_EPSILON) && (curr_arrow_headfilled!=0) ) { sx -= xm; sy -= ym; } if ((head & END_HEAD) && (fabs(len_arrow) >= DBL_EPSILON) && (curr_arrow_headfilled!=0) ) { ex += xm; ey += ym; } draw_clip_line(sx, sy, ex, ey); } /* Restore previous clipping box */ clip_area = clip_save; } #ifdef EAM_OBJECTS /* Generic routine for drawing circles or circular arcs. */ /* If this feature proves useful, we can add a new terminal entry */ /* point term->arc() to the API and let terminals either provide */ /* a private implemenation or use this generic one. */ void do_arc( unsigned int cx, unsigned int cy, /* Center */ double radius, /* Radius */ double arc_start, double arc_end, /* Limits of arc in degress */ int style) { gpiPoint vertex[250]; /* changed this - JP */ int i, segments; double aspect; int in, xcen, ycen; /* Protect against out-of-range values */ while (arc_start < 0) arc_start += 360.; while (arc_end > 360.) arc_end -= 360.; /* Always draw counterclockwise */ while (arc_end < arc_start) arc_end += 360.; /* Choose how finely to divide this arc into segments */ /* FIXME: INC=2 causes problems for gnuplot_x11 */ # define INC 3. segments = (arc_end - arc_start) / INC; if (segments < 1) segments = 1; /* Calculate the vertices */ aspect = (double)term->v_tic / (double)term->h_tic; vertex[0].style = style; for (i=0, in=0; i<segments; i++) { vertex[in].x = cx + cos(DEG2RAD * (arc_start + i*INC)) * radius; vertex[in].y = cy + sin(DEG2RAD * (arc_start + i*INC)) * radius * aspect; xcen = cx; ycen = cy; if (clip_line(&xcen, &ycen, &vertex[in].x, &vertex[in].y)) in++; } # undef INC vertex[in].x = cx + cos(DEG2RAD * arc_end) * radius; vertex[in].y = cy + sin(DEG2RAD * arc_end) * radius * aspect; if (!clip_line(&xcen, &ycen, &vertex[in].x, &vertex[in].y)) in--; if (fabs(arc_end - arc_start) > .1 && fabs(arc_end - arc_start) < 359.9) { vertex[++in].x = cx; vertex[in].y = cy; vertex[++in].x = vertex[0].x; vertex[in].y = vertex[0].y; } if (style) { /* Fill in the center */ if (term->filled_polygon) term->filled_polygon(in+1, vertex); } else { /* Draw the arc */ for (i=0; i<in; i++) draw_clip_line( vertex[i].x, vertex[i].y, vertex[i+1].x, vertex[i+1].y ); } } #endif /* EAM_OBJECTS */ #define TERM_PROTO #define TERM_BODY #define TERM_PUBLIC static #include "term.h" #undef TERM_PROTO #undef TERM_BODY #undef TERM_PUBLIC /* Dummy functions for unavailable features */ /* return success if they asked for default - this simplifies code * where param is passed as a param. Client can first pass it here, * and only if it fails do they have to see what was trying to be done */ /* change angle of text. 0 is horizontal left to right. * 1 is vertical bottom to top (90 deg rotate) */ static int null_text_angle(int ang) { return (ang == 0); } /* change justification of text. * modes are LEFT (flush left), CENTRE (centred), RIGHT (flush right) */ static int null_justify_text(enum JUSTIFY just) { return (just == LEFT); } /* Change scale of plot. * Parameters are x,y scaling factors for this plot. * Some terminals (eg latex) need to do scaling themselves. */ static int null_scale(double x, double y) { (void) x; /* avoid -Wunused warning */ (void) y; return FALSE; /* can't be done */ } static void null_layer(t_termlayer layer) { (void) layer; /* avoid -Wunused warning */ } static void options_null() { term_options[0] = '\0'; /* we have no options */ } static void UNKNOWN_null() { } static void MOVE_null(unsigned int x, unsigned int y) { (void) x; /* avoid -Wunused warning */ (void) y; } static void LINETYPE_null(int t) { (void) t; /* avoid -Wunused warning */ } static void PUTTEXT_null(unsigned int x, unsigned int y, const char *s) { (void) s; /* avoid -Wunused warning */ (void) x; (void) y; } static void null_linewidth(double s) { (void) s; /* avoid -Wunused warning */ } /* setup the magic macros to compile in the right parts of the * terminal drivers included by term.h */ #define TERM_TABLE #define TERM_TABLE_START(x) ,{ #define TERM_TABLE_END(x) } /* * term_tbl[] contains an entry for each terminal. "unknown" must be the * first, since term is initialized to 0. */ static struct termentry term_tbl[] = { {"unknown", "Unknown terminal type - not a plotting device", 100, 100, 1, 1, 1, 1, options_null, UNKNOWN_null, UNKNOWN_null, UNKNOWN_null, null_scale, UNKNOWN_null, MOVE_null, MOVE_null, LINETYPE_null, PUTTEXT_null} #include "term.h" }; #define TERMCOUNT (sizeof(term_tbl) / sizeof(term_tbl[0])) void list_terms() { int i; char *line_buffer = gp_alloc(BUFSIZ, "list_terms"); int sort_idxs[TERMCOUNT]; /* sort terminal types alphabetically */ for( i = 0; i < TERMCOUNT; i++ ) sort_idxs[i] = i; qsort( sort_idxs, TERMCOUNT, sizeof(int), termcomp ); /* now sort_idxs[] contains the sorted indices */ StartOutput(); strcpy(line_buffer, "\nAvailable terminal types:\n"); OutLine(line_buffer); for (i = 0; i < TERMCOUNT; i++) { sprintf(line_buffer, " %15s %s\n", term_tbl[sort_idxs[i]].name, term_tbl[sort_idxs[i]].description); OutLine(line_buffer); } EndOutput(); free(line_buffer); } /* Return string with all terminal names. Note: caller must free the returned names after use. */ char* get_terminals_names() { int i; char *buf = gp_alloc(TERMCOUNT*15, "all_term_names"); /* max 15 chars per name */ char *names; int sort_idxs[TERMCOUNT]; /* sort terminal types alphabetically */ for( i = 0; i < TERMCOUNT; i++ ) sort_idxs[i] = i; qsort( sort_idxs, TERMCOUNT, sizeof(int), termcomp ); /* now sort_idxs[] contains the sorted indices */ strcpy(buf, " "); /* let the string have leading and trailing " " in order to search via strstrt(GPVAL_TERMINALS, " png "); */ for (i = 0; i < TERMCOUNT; i++) sprintf(buf+strlen(buf), "%s ", term_tbl[sort_idxs[i]].name); names = gp_alloc(strlen(buf)+1, "all_term_names2"); strcpy(names, buf); free(buf); return names; } static int termcomp(const generic *arga, const generic *argb) { const int *a = arga; const int *b = argb; return( strcasecmp( term_tbl[*a].name, term_tbl[*b].name ) ); } /* set_term: get terminal number from name on command line * will change 'term' variable if successful */ struct termentry * set_term() { struct termentry *t = NULL; char *input_name = NULL; if (!END_OF_COMMAND) { input_name = gp_input_line + token[c_token].start_index; t = change_term(input_name, token[c_token].length); if (!t && isstringvalue(c_token)) { input_name = try_to_get_string(); /* Cannot fail if isstringvalue succeeded */ t = change_term(input_name, strlen(input_name)); free(input_name); } else { c_token++; } } if (!t) { change_term("unknown", 7); int_error(c_token-1, "unknown or ambiguous terminal type; type just 'set terminal' for a list"); } /* otherwise the type was changed */ return (t); } /* change_term: get terminal number from name and set terminal type * * returns NULL for unknown or ambiguous, otherwise is terminal * driver pointer */ struct termentry * change_term(const char *origname, int length) { int i; struct termentry *t = NULL; TBOOLEAN ambiguous = FALSE; /* For backwards compatibility only */ char *name = (char *)origname; if (!strncmp(origname,"X11",length)) { name = "x11"; length = 3; } #ifdef HAVE_CAIROPDF /* To allow "set term eps" as short for "set term epscairo" */ if (!strncmp(origname,"eps",length)) { name = "epscairo"; length = 8; } #endif for (i = 0; i < TERMCOUNT; i++) { if (!strncmp(name, term_tbl[i].name, length)) { if (t) ambiguous = TRUE; t = term_tbl + i; /* Exact match is always accepted */ if (length == strlen(term_tbl[i].name)) { ambiguous = FALSE; break; } } } if (!t || ambiguous) return (NULL); /* Success: set terminal type now */ term = t; term_initialised = FALSE; if (term->scale != null_scale) fputs("Warning: scale interface is not null_scale - may not work with multiplot\n", stderr); /* check that optional fields are initialised to something */ if (term->text_angle == 0) term->text_angle = null_text_angle; if (term->justify_text == 0) term->justify_text = null_justify_text; if (term->point == 0) term->point = do_point; if (term->arrow == 0) term->arrow = do_arrow; if (term->pointsize == 0) term->pointsize = do_pointsize; if (term->linewidth == 0) term->linewidth = null_linewidth; if (term->layer == 0) term->layer = null_layer; if (term->tscale <= 0) term->tscale = 1.0; if (interactive) fprintf(stderr, "Terminal type set to '%s'\n", term->name); /* Invalidate any terminal-specific structures that may be active */ invalidate_palette(); return (t); } /* * Routine to detect what terminal is being used (or do anything else * that would be nice). One anticipated (or allowed for) side effect * is that the global ``term'' may be set. * The environment variable GNUTERM is checked first; if that does * not exist, then the terminal hardware is checked, if possible, * and finally, we can check $TERM for some kinds of terminals. * A default can be set with -DDEFAULTTERM=myterm in the Makefile * or #define DEFAULTTERM myterm in term.h */ /* thanks to osupyr!alden (Dave Alden) for the original GNUTERM code */ void init_terminal() { char *term_name = DEFAULTTERM; #if (defined(MSDOS) && !defined(_Windows)) || defined(NEXT) || defined(SUN) || defined(X11) char *env_term = NULL; /* from TERM environment var */ #endif #ifdef X11 char *display = NULL; #endif char *gnuterm = NULL; /* GNUTERM environment variable is primary */ gnuterm = getenv("GNUTERM"); if (gnuterm != (char *) NULL) { term_name = gnuterm; } else { #ifdef VMS term_name = vms_init(); #endif /* VMS */ #ifdef NEXT env_term = getenv("TERM"); if (term_name == (char *) NULL && env_term != (char *) NULL && strcmp(env_term, "next") == 0) term_name = "next"; #endif /* NeXT */ #ifdef __BEOS__ env_term = getenv("TERM"); if (term_name == (char *) NULL && env_term != (char *) NULL && strcmp(env_term, "beterm") == 0) term_name = "be"; #endif /* BeOS */ #ifdef SUN env_term = getenv("TERM"); /* try $TERM */ if (term_name == (char *) NULL && env_term != (char *) NULL && strcmp(env_term, "sun") == 0) term_name = "sun"; #endif /* SUN */ #ifdef QTTERM if (term_name == (char *) NULL) term_name = "qt"; #endif #ifdef WXWIDGETS if (term_name == (char *) NULL) term_name = "wxt"; #endif #ifdef _Windows /* let the wxWidgets terminal be the default when available */ if (term_name == (char *) NULL) term_name = "win"; #endif /* _Windows */ #if defined(__APPLE__) && defined(__MACH__) && defined(HAVE_LIBAQUATERM) /* Mac OS X with AquaTerm installed */ term_name = "aqua"; #endif #ifdef X11 env_term = getenv("TERM"); /* try $TERM */ if (term_name == (char *) NULL && env_term != (char *) NULL && strcmp(env_term, "xterm") == 0) term_name = "x11"; display = getenv("DISPLAY"); if (term_name == (char *) NULL && display != (char *) NULL) term_name = "x11"; if (X11_Display) term_name = "x11"; #endif /* x11 */ #ifdef UNIXPC if (iswind() == 0) { term_name = "unixpc"; } #endif /* unixpc */ #ifdef CGI if (getenv("CGIDISP") || getenv("CGIPRNT")) term_name = "cgi"; #endif /*CGI */ #ifdef DJGPP term_name = "svga"; #endif #ifdef GRASS term_name = "grass"; #endif #ifdef OS2 /* amai: Note that we do some checks above and now overwrite any results. Perhaps we may disable checks above!? */ #ifdef X11 /* WINDOWID is set in sessions like xterm, etc. DISPLAY is also mandatory. */ env_term = getenv("WINDOWID"); display = getenv("DISPLAY"); if ((env_term != (char *) NULL) && (display != (char *) NULL)) term_name = "x11"; else #endif /* X11 */ term_name = "pm"; #endif /*OS2 */ /* set linux terminal only if LINUX_setup was successfull, if we are on X11 LINUX_setup has failed, also if we are logged in by network */ #ifdef LINUXVGA if (LINUX_graphics_allowed) #if defined(VGAGL) && defined (THREEDKIT) term_name = "vgagl"; #else term_name = "linux"; #endif #endif /* LINUXVGA */ } /* We have a name, try to set term type */ if (term_name != NULL && *term_name != '\0') { int namelength = strlen(term_name); struct udvt_entry *name = add_udv_by_name("GNUTERM"); Gstring(&name->udv_value, gp_strdup(term_name)); name->udv_undef = FALSE; if (strchr(term_name,' ')) namelength = strchr(term_name,' ') - term_name; /* Force the terminal to initialize default fonts, etc. This prevents */ /* segfaults and other strangeness if you set GNUTERM to "post" or */ /* "png" for example. However, calling X11_options() is expensive due */ /* to the fork+execute of gnuplot_x11 and x11 can tolerate not being */ /* initialized until later. */ /* Note that gp_input_line[] is blank at this point. */ if (change_term(term_name, namelength)) { if (strcmp(term->name,"x11")) term->options(); return; } fprintf(stderr, "Unknown or ambiguous terminal name '%s'\n", term_name); } change_term("unknown", 7); } /* test terminal by drawing border and text */ /* called from command test */ void test_term() { struct termentry *t = term; const char *str; int x, y, xl, yl, i; unsigned int xmax_t, ymax_t, x0, y0; char label[MAX_ID_LEN]; int key_entry_height; int p_width; TBOOLEAN already_in_enhanced_text_mode; already_in_enhanced_text_mode = t->flags & TERM_ENHANCED_TEXT; if (!already_in_enhanced_text_mode) do_string("set termopt enh"); term_start_plot(); screen_ok = FALSE; xmax_t = (unsigned int) (t->xmax * xsize); ymax_t = (unsigned int) (t->ymax * ysize); x0 = (unsigned int) (xoffset * t->xmax); y0 = (unsigned int) (yoffset * t->ymax); p_width = pointsize * t->h_tic; key_entry_height = pointsize * t->v_tic * 1.25; if (key_entry_height < t->v_char) key_entry_height = t->v_char; /* Sync point for epslatex text positioning */ (*t->layer)(TERM_LAYER_FRONTTEXT); /* border linetype */ (*t->linewidth) (1.0); (*t->linetype) (LT_BLACK); (*t->move) (x0, y0); (*t->vector) (x0 + xmax_t - 1, y0); (*t->vector) (x0 + xmax_t - 1, y0 + ymax_t - 1); (*t->vector) (x0, y0 + ymax_t - 1); (*t->vector) (x0, y0); (*t->linetype)(0); /* Echo back the current terminal type */ if (!strcmp(term->name,"unknown")) int_error(NO_CARET, "terminal type is unknown"); else { char tbuf[64]; strcpy(tbuf,term->name); strcat(tbuf," terminal test"); (void) (*t->justify_text) (LEFT); (*t->put_text) (x0 + t->h_char * 2, y0 + ymax_t - t->v_char * 0.5, tbuf); } #ifdef USE_MOUSE if (t->set_ruler) { (*t->put_text) (x0 + t->h_char * 5, y0 + ymax_t - t->v_char * 3, "Mouse and hotkeys are supported, hit: h r m 6"); } #endif (*t->linetype)(LT_BLACK); (*t->linetype) (LT_AXIS); (*t->move) (x0 + xmax_t / 2, y0); (*t->vector) (x0 + xmax_t / 2, y0 + ymax_t - 1); (*t->move) (x0, y0 + ymax_t / 2); (*t->vector) (x0 + xmax_t - 1, y0 + ymax_t / 2); /* test width and height of characters */ (*t->linetype) (3); (*t->move) (x0 + xmax_t / 2 - t->h_char * 10, y0 + ymax_t / 2 + t->v_char / 2); (*t->vector) (x0 + xmax_t / 2 + t->h_char * 10, y0 + ymax_t / 2 + t->v_char / 2); (*t->vector) (x0 + xmax_t / 2 + t->h_char * 10, y0 + ymax_t / 2 - t->v_char / 2); (*t->vector) (x0 + xmax_t / 2 - t->h_char * 10, y0 + ymax_t / 2 - t->v_char / 2); (*t->vector) (x0 + xmax_t / 2 - t->h_char * 10, y0 + ymax_t / 2 + t->v_char / 2); (*t->put_text) (x0 + xmax_t / 2 - t->h_char * 10, y0 + ymax_t / 2, "12345678901234567890"); (*t->put_text) (x0 + xmax_t / 2 - t->h_char * 10, y0 + ymax_t / 2 + t->v_char * 1.4, "test of character width:"); (*t->linetype) (LT_BLACK); /* Test for enhanced text */ if (t->flags & TERM_ENHANCED_TEXT) { char *tmptext = gp_strdup("Enhanced text: {x@_{0}^{n+1}}"); (*t->put_text) (x0 + xmax_t * 0.5, y0 + ymax_t * 0.40, tmptext); free(tmptext); if (!already_in_enhanced_text_mode) do_string("set termopt noenh"); } /* test justification */ (void) (*t->justify_text) (LEFT); (*t->put_text) (x0 + xmax_t / 2, y0 + ymax_t / 2 + t->v_char * 6, "left justified"); str = "centre+d text"; if ((*t->justify_text) (CENTRE)) (*t->put_text) (x0 + xmax_t / 2, y0 + ymax_t / 2 + t->v_char * 5, str); else (*t->put_text) (x0 + xmax_t / 2 - strlen(str) * t->h_char / 2, y0 + ymax_t / 2 + t->v_char * 5, str); str = "right justified"; if ((*t->justify_text) (RIGHT)) (*t->put_text) (x0 + xmax_t / 2, y0 + ymax_t / 2 + t->v_char * 4, str); else (*t->put_text) (x0 + xmax_t / 2 - strlen(str) * t->h_char, y0 + ymax_t / 2 + t->v_char * 4, str); /* test text angle */ (*t->linetype)(1); str = "rotated ce+ntred text"; if ((*t->text_angle) (TEXT_VERTICAL)) { if ((*t->justify_text) (CENTRE)) (*t->put_text) (x0 + t->v_char, y0 + ymax_t / 2, str); else (*t->put_text) (x0 + t->v_char, y0 + ymax_t / 2 - strlen(str) * t->h_char / 2, str); (*t->justify_text) (LEFT); str = " rotated by +45 deg"; (*t->text_angle)(45); (*t->put_text)(x0 + t->v_char * 3, y0 + ymax_t / 2, str); (*t->justify_text) (LEFT); str = " rotated by -45 deg"; (*t->text_angle)(-45); (*t->put_text)(x0 + t->v_char * 2, y0 + ymax_t / 2, str); } else { (void) (*t->justify_text) (LEFT); (*t->put_text) (x0 + t->h_char * 2, y0 + ymax_t / 2 - t->v_char * 2, "can't rotate text"); } (void) (*t->justify_text) (LEFT); (void) (*t->text_angle) (0); (*t->linetype)(LT_BLACK); /* test tic size */ (*t->linetype)(4); (*t->move) ((unsigned int) (x0 + xmax_t / 2 + t->h_tic * (1 + axis_array[FIRST_X_AXIS].ticscale)), y0 + (unsigned int) ymax_t - 1); (*t->vector) ((unsigned int) (x0 + xmax_t / 2 + t->h_tic * (1 + axis_array[FIRST_X_AXIS].ticscale)), (unsigned int) (y0 + ymax_t - axis_array[FIRST_X_AXIS].ticscale * t->v_tic)); (*t->move) ((unsigned int) (x0 + xmax_t / 2), y0 + (unsigned int) (ymax_t - t->v_tic * (1 + axis_array[FIRST_X_AXIS].ticscale))); (*t->vector) ((unsigned int) (x0 + xmax_t / 2 + axis_array[FIRST_X_AXIS].ticscale * t->h_tic), (unsigned int) (y0 + ymax_t - t->v_tic * (1 + axis_array[FIRST_X_AXIS].ticscale))); /* HBB 19990530: changed this to use right-justification, if possible... */ str = "show ticscale"; if ((*t->justify_text) (RIGHT)) (*t->put_text) (x0 + (unsigned int) (xmax_t / 2 - 1* t->h_char), y0 + (unsigned int) (ymax_t - (t->v_tic * 2 + t->v_char / 2)), str); else (*t->put_text) (x0 + (unsigned int) (xmax_t / 2 - (strlen(str)+1) * t->h_char), y0 + (unsigned int) (ymax_t - (t->v_tic * 2 + t->v_char / 2)), str); (void) (*t->justify_text) (LEFT); (*t->linetype)(LT_BLACK); /* test line and point types */ x = x0 + xmax_t - t->h_char * 6 - p_width; y = y0 + ymax_t - key_entry_height; (*t->pointsize) (pointsize); for (i = -2; y > y0 + key_entry_height; i++) { struct lp_style_type ls = DEFAULT_LP_STYLE_TYPE; ls.l_width = 1; load_linetype(&ls,i+1); term_apply_lp_properties(&ls); (void) sprintf(label, "%d", i + 1); if ((*t->justify_text) (RIGHT)) (*t->put_text) (x, y, label); else (*t->put_text) (x - strlen(label) * t->h_char, y, label); (*t->move) (x + t->h_char, y); (*t->vector) (x + t->h_char * 4, y); if (i >= -1) (*t->point) (x + t->h_char * 5 + p_width / 2, y, i); y -= key_entry_height; } /* test some arrows */ (*t->linewidth) (1.0); (*t->linetype) (0); x = x0 + xmax_t * .375; y = y0 + ymax_t * .250; xl = t->h_tic * 7; yl = t->v_tic * 7; i = curr_arrow_headfilled; curr_arrow_headfilled = 0; (*t->arrow) (x, y, x + xl, y, END_HEAD); curr_arrow_headfilled = 1; (*t->arrow) (x, y, x - xl, y, END_HEAD); curr_arrow_headfilled = 2; (*t->arrow) (x, y, x, y + yl, END_HEAD); curr_arrow_headfilled = 1; /* Was 3, but no terminals implement it */ (*t->arrow) (x, y, x, y - yl, END_HEAD); curr_arrow_headfilled = i; xl = t->h_tic * 5; yl = t->v_tic * 5; (*t->arrow) (x - xl, y - yl, x + xl, y + yl, END_HEAD | BACKHEAD); (*t->arrow) (x - xl, y + yl, x, y, NOHEAD); curr_arrow_headfilled = 1; /* Was 3, but no terminals implement it */ (*t->arrow) (x, y, x + xl, y - yl, BACKHEAD); /* test line widths */ (void) (*t->justify_text) (LEFT); xl = xmax_t / 10; yl = ymax_t / 25; x = x0 + xmax_t * .075; y = y0 + yl; for (i=1; i<7; i++) { (*t->linewidth) ((float)(i)); (*t->linetype)(LT_BLACK); (*t->move) (x, y); (*t->vector) (x+xl, y); sprintf(label," lw %1d%c",i,0); (*t->put_text) (x+xl, y, label); y += yl; } (*t->put_text) (x, y, "linewidth"); /* test fill patterns */ x = x0 + xmax_t * 0.5; y = y0; xl = xmax_t / 40; yl = ymax_t / 8; (*t->linewidth) ((float)(1)); (*t->linetype)(LT_BLACK); (*t->justify_text) (CENTRE); (*t->put_text)(x+xl*7, y + yl+t->v_char*1.5, "pattern fill"); for (i=0; i<10; i++) { int style = ((i<<4) + FS_PATTERN); if (t->fillbox) (*t->fillbox) ( style, x, y, xl, yl ); (*t->move) (x,y); (*t->vector)(x,y+yl); (*t->vector)(x+xl,y+yl); (*t->vector)(x+xl,y); (*t->vector)(x,y); sprintf(label,"%2d",i); (*t->put_text)(x+xl/2, y+yl+t->v_char*0.5, label); x += xl * 1.5; } { int cen_x = x0 + (int)(0.70 * xmax_t); int cen_y = y0 + (int)(0.83 * ymax_t); int radius = xmax_t / 20; /* test pm3d -- filled_polygon(), but not set_color() */ if (t->filled_polygon) { int i, j; #define NUMBER_OF_VERTICES 6 int n = NUMBER_OF_VERTICES; gpiPoint corners[NUMBER_OF_VERTICES+1]; #undef NUMBER_OF_VERTICES for (j=0; j<=1; j++) { int ix = cen_x + j*radius; int iy = cen_y - j*radius/2; for (i = 0; i < n; i++) { corners[i].x = ix + radius * cos(2*M_PI*i/n); corners[i].y = iy + radius * sin(2*M_PI*i/n); } corners[n].x = corners[0].x; corners[n].y = corners[0].y; if (j == 0) { (*t->linetype)(2); corners->style = FS_OPAQUE; } else { (*t->linetype)(1); corners->style = FS_TRANSPARENT_SOLID + (50<<4); } term->filled_polygon(n+1, corners); } str = "filled polygons:"; } else str = "No filled polygons"; (*t->linetype)(LT_BLACK); i = ((*t->justify_text) (CENTRE)) ? 0 : t->h_char * strlen(str) / 2; (*t->put_text) (cen_x + i, cen_y + radius + t->v_char * 0.5, str); } term_end_plot(); } #ifdef VMS /* these are needed to modify terminal characteristics */ # ifndef VWS_XMAX /* avoid duplicate warning; VWS includes these */ # include <descrip.h> # include <ssdef.h> # endif /* !VWS_MAX */ # include <iodef.h> # include <ttdef.h> # include <tt2def.h> # include <dcdef.h> # include <stat.h> # include <fab.h> /* If you use WATCOM C or a very strict ANSI compiler, you may have to * delete or comment out the following 3 lines: */ # ifndef TT2$M_DECCRT3 /* VT300 not defined as of VAXC v2.4 */ # define TT2$M_DECCRT3 0X80000000 # endif static unsigned short chan; static int old_char_buf[3], cur_char_buf[3]; $DESCRIPTOR(sysoutput_desc, "SYS$OUTPUT"); /* Look first for decw$display (decterms do regis). Determine if we * have a regis terminal and save terminal characteristics */ char * vms_init() { /* Save terminal characteristics in old_char_buf and initialise cur_char_buf to current settings. */ int i; if (getenv("DECW$DISPLAY")) return ("x11"); atexit(vms_reset); sys$assign(&sysoutput_desc, &chan, 0, 0); sys$qiow(0, chan, IO$_SENSEMODE, 0, 0, 0, old_char_buf, 12, 0, 0, 0, 0); for (i = 0; i < 3; ++i) cur_char_buf[i] = old_char_buf[i]; sys$dassgn(chan); /* Test if terminal is regis */ if ((cur_char_buf[2] & TT2$M_REGIS) == TT2$M_REGIS) return ("regis"); return (NULL); } /* set terminal to original state */ void vms_reset() { int i; sys$assign(&sysoutput_desc, &chan, 0, 0); sys$qiow(0, chan, IO$_SETMODE, 0, 0, 0, old_char_buf, 12, 0, 0, 0, 0); for (i = 0; i < 3; ++i) cur_char_buf[i] = old_char_buf[i]; sys$dassgn(chan); } /* set terminal mode to tektronix */ void term_mode_tek() { long status; if (gpoutfile != stdout) return; /* don't modify if not stdout */ sys$assign(&sysoutput_desc, &chan, 0, 0); cur_char_buf[0] = 0x004A0000 | DC$_TERM | (TT$_TEK401X << 8); cur_char_buf[1] = (cur_char_buf[1] & 0x00FFFFFF) | 0x18000000; cur_char_buf[1] &= ~TT$M_CRFILL; cur_char_buf[1] &= ~TT$M_ESCAPE; cur_char_buf[1] &= ~TT$M_HALFDUP; cur_char_buf[1] &= ~TT$M_LFFILL; cur_char_buf[1] &= ~TT$M_MECHFORM; cur_char_buf[1] &= ~TT$M_NOBRDCST; cur_char_buf[1] &= ~TT$M_NOECHO; cur_char_buf[1] &= ~TT$M_READSYNC; cur_char_buf[1] &= ~TT$M_REMOTE; cur_char_buf[1] |= TT$M_LOWER; cur_char_buf[1] |= TT$M_TTSYNC; cur_char_buf[1] |= TT$M_WRAP; cur_char_buf[1] &= ~TT$M_EIGHTBIT; cur_char_buf[1] &= ~TT$M_MECHTAB; cur_char_buf[1] &= ~TT$M_SCOPE; cur_char_buf[1] |= TT$M_HOSTSYNC; cur_char_buf[2] &= ~TT2$M_APP_KEYPAD; cur_char_buf[2] &= ~TT2$M_BLOCK; cur_char_buf[2] &= ~TT2$M_DECCRT3; cur_char_buf[2] &= ~TT2$M_LOCALECHO; cur_char_buf[2] &= ~TT2$M_PASTHRU; cur_char_buf[2] &= ~TT2$M_REGIS; cur_char_buf[2] &= ~TT2$M_SIXEL; cur_char_buf[2] |= TT2$M_BRDCSTMBX; cur_char_buf[2] |= TT2$M_EDITING; cur_char_buf[2] |= TT2$M_INSERT; cur_char_buf[2] |= TT2$M_PRINTER; cur_char_buf[2] &= ~TT2$M_ANSICRT; cur_char_buf[2] &= ~TT2$M_AVO; cur_char_buf[2] &= ~TT2$M_DECCRT; cur_char_buf[2] &= ~TT2$M_DECCRT2; cur_char_buf[2] &= ~TT2$M_DRCS; cur_char_buf[2] &= ~TT2$M_EDIT; cur_char_buf[2] |= TT2$M_FALLBACK; status = sys$qiow(0, chan, IO$_SETMODE, 0, 0, 0, cur_char_buf, 12, 0, 0, 0, 0); if (status == SS$_BADPARAM) { /* terminal fallback utility not installed on system */ cur_char_buf[2] &= ~TT2$M_FALLBACK; sys$qiow(0, chan, IO$_SETMODE, 0, 0, 0, cur_char_buf, 12, 0, 0, 0, 0); } else { if (status != SS$_NORMAL) lib$signal(status, 0, 0); } sys$dassgn(chan); } /* set terminal mode back to native */ void term_mode_native() { int i; if (gpoutfile != stdout) return; /* don't modify if not stdout */ sys$assign(&sysoutput_desc, &chan, 0, 0); sys$qiow(0, chan, IO$_SETMODE, 0, 0, 0, old_char_buf, 12, 0, 0, 0, 0); for (i = 0; i < 3; ++i) cur_char_buf[i] = old_char_buf[i]; sys$dassgn(chan); } /* set terminal mode pasthru */ void term_pasthru() { if (gpoutfile != stdout) return; /* don't modify if not stdout */ sys$assign(&sysoutput_desc, &chan, 0, 0); cur_char_buf[2] |= TT2$M_PASTHRU; sys$qiow(0, chan, IO$_SETMODE, 0, 0, 0, cur_char_buf, 12, 0, 0, 0, 0); sys$dassgn(chan); } /* set terminal mode nopasthru */ void term_nopasthru() { if (gpoutfile != stdout) return; /* don't modify if not stdout */ sys$assign(&sysoutput_desc, &chan, 0, 0); cur_char_buf[2] &= ~TT2$M_PASTHRU; sys$qiow(0, chan, IO$_SETMODE, 0, 0, 0, cur_char_buf, 12, 0, 0, 0, 0); sys$dassgn(chan); } void fflush_binary() { typedef short int INT16; /* signed 16-bit integers */ INT16 k; /* loop index */ if (gpoutfile != stdout) { /* Stupid VMS fflush() raises error and loses last data block unless it is full for a fixed-length record binary file. Pad it here with NULL characters. */ for (k = (INT16) ((*gpoutfile)->_cnt); k > 0; --k) putc('\0', gpoutfile); fflush(gpoutfile); } } #endif /* VMS */ /* * This is an abstraction of the enhanced text mode originally written * for the postscript terminal driver by David Denholm and Matt Heffron. * I have split out a terminal-independent recursive syntax-parser * routine that can be shared by all drivers that want to add support * for enhanced text mode. * * A driver that wants to make use of this common framework must provide * three new entries in TERM_TABLE: * void *enhanced_open (char *fontname, double fontsize, double base, * TBOOLEAN widthflag, TBOOLEAN showflag, * int overprint) * void *enhanced_writec (char c) * void *enhanced_flush () * * Each driver also has a separate ENHXX_put_text() routine that replaces * the normal (term->put_text) routine while in enhanced mode. * This routine must initialize the following globals used by the shared code: * enhanced_fontscale converts font size to device resolution units * enhanced_escape_format used to process octal escape characters \xyz * * I bent over backwards to make the output of the revised code identical * to the output of the original postscript version. That means there is * some cruft left in here (enhanced_max_height for one thing) that is * probably irrelevant to any new drivers using the code. * * Ethan A Merritt - November 2003 */ #ifdef DEBUG_ENH #define ENH_DEBUG(x) printf x; #else #define ENH_DEBUG(x) #endif void do_enh_writec(int c) { /* note: c is meant to hold a char, but is actually an int, for * the same reasons applying to putc() and friends */ *enhanced_cur_text++ = c; } /* * Process a bit of string, and return the last character used. * p is start of string * brace is TRUE to keep processing to }, FALSE to do one character only * fontname & fontsize are obvious * base is the current baseline * widthflag is TRUE if the width of this should count, * FALSE for zero width boxes * showflag is TRUE if this should be shown, * FALSE if it should not be shown (like TeX \phantom) * overprint is 0 for normal operation, * 1 for the underprinted text (included in width calculation), * 2 for the overprinted text (not included in width calc) * (overprinted text is centered horizontally on underprinted text */ char * enhanced_recursion( char *p, TBOOLEAN brace, char *fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { ENH_DEBUG(("RECURSE WITH [%p] \"%s\", %d %s %.1f %.1f %d %d %d\n", p, p, brace, fontname, fontsize, base, widthflag, showflag, overprint)); /* Start each recursion with a clean string */ (term->enhanced_flush)(); if (base + fontsize > enhanced_max_height) { enhanced_max_height = base + fontsize; ENH_DEBUG(("Setting max height to %.1f\n", enhanced_max_height)); } if (base < enhanced_min_height) { enhanced_min_height = base; ENH_DEBUG(("Setting min height to %.1f\n", enhanced_min_height)); } while (*p) { float shift; /* * EAM Jun 2009 - treating bytes one at a time does not work for multibyte * encodings, including utf-8. If we hit a byte with the high bit set, test * whether it starts a legal UTF-8 sequence and if so copy the whole thing. * Other multibyte encodings are still a problem. * Gnuplot's other defined encodings are all single-byte; for those we * really do want to treat one byte at a time. */ if ((*p & 0x80) && (encoding == S_ENC_DEFAULT || encoding == S_ENC_UTF8)) { unsigned long utf8char; const char *nextchar = p; (term->enhanced_open)(fontname, fontsize, base, widthflag, showflag, overprint); if (utf8toulong(&utf8char, &nextchar)) { /* Legal UTF8 sequence */ while (p < nextchar) (term->enhanced_writec)(*p++); p--; } else { /* Some other multibyte encoding? */ (term->enhanced_writec)(*p); } /* shige : for Shift_JIS */ } else if ((*p & 0x80) && (encoding == S_ENC_SJIS)) { (term->enhanced_open)(fontname, fontsize, base, widthflag, showflag, overprint); (term->enhanced_writec)(*(p++)); (term->enhanced_writec)(*p); } else switch (*p) { case '}' : /*{{{ deal with it*/ if (brace) return (p); int_warn(NO_CARET, "enhanced text parser - spurious }"); break; /*}}}*/ case '_' : case '^' : /*{{{ deal with super/sub script*/ shift = (*p == '^') ? 0.5 : -0.3; (term->enhanced_flush)(); p = enhanced_recursion(p + 1, FALSE, fontname, fontsize * 0.8, base + shift * fontsize, widthflag, showflag, overprint); break; /*}}}*/ case '{' : { char *savepos = NULL, save = 0; char *localfontname = fontname, ch; float f = fontsize, ovp; /*{{{ recurse (possibly with a new font) */ ENH_DEBUG(("Dealing with {\n")); /* get vertical offset (if present) for overprinted text */ while (*++p == ' '); if (overprint == 2) { ovp = (float)strtod(p,&p); if (term->flags & TERM_IS_POSTSCRIPT) base = ovp*f; else base += ovp*f; } --p; /* HBB 20001021: bug fix: 10^{2} broken */ if (*++p == '/') { /* then parse a fontname, optional fontsize */ while (*++p == ' ') ; /* do nothing */ if (*p=='-') { while (*++p == ' ') ; /* do nothing */ } localfontname = p; while ((ch = *p) > ' ' && ch != '=' && ch != '*' && ch != '}') ++p; save = *(savepos=p); if (ch == '=') { *p++ = '\0'; /*{{{ get optional font size*/ ENH_DEBUG(("Calling strtod(\"%s\") ...", p)); f = (float)strtod(p, &p); ENH_DEBUG(("Returned %.1f and \"%s\"\n", f, p)); if (f == 0) f = fontsize; else f *= enhanced_fontscale; /* remember the scaling */ ENH_DEBUG(("Font size %.1f\n", f)); /*}}}*/ } else if (ch == '*') { *p++ = '\0'; /*{{{ get optional font size scale factor*/ ENH_DEBUG(("Calling strtod(\"%s\") ...", p)); f = (float)strtod(p, &p); ENH_DEBUG(("Returned %.1f and \"%s\"\n", f, p)); if (f) f *= fontsize; /* apply the scale factor */ else f = fontsize; ENH_DEBUG(("Font size %.1f\n", f)); /*}}}*/ } else if (ch == '}') { int_warn(NO_CARET,"bad syntax in enhanced text string"); *p++ = '\0'; } else { *p++ = '\0'; f = fontsize; } while (*p == ' ') ++p; if (! *localfontname) localfontname = fontname; } /*}}}*/ ENH_DEBUG(("Before recursing, we are at [%p] \"%s\"\n", p, p)); p = enhanced_recursion(p, TRUE, localfontname, f, base, widthflag, showflag, overprint); ENH_DEBUG(("BACK WITH \"%s\"\n", p)); (term->enhanced_flush)(); if (savepos) /* restore overwritten character */ *savepos = save; break; } /* case '{' */ case '@' : /*{{{ phantom box - prints next 'char', then restores currentpoint */ (term->enhanced_flush)(); (term->enhanced_open)(fontname, fontsize, base, widthflag, showflag, 3); p = enhanced_recursion(++p, FALSE, fontname, fontsize, base, widthflag, showflag, overprint); (term->enhanced_open)(fontname, fontsize, base, widthflag, showflag, 4); break; /*}}}*/ case '&' : /*{{{ character skip - skips space equal to length of character(s) */ (term->enhanced_flush)(); p = enhanced_recursion(++p, FALSE, fontname, fontsize, base, widthflag, FALSE, overprint); break; /*}}}*/ case '~' : /*{{{ overprinted text */ /* the second string is overwritten on the first, centered * horizontally on the first and (optionally) vertically * shifted by an amount specified (as a fraction of the * current fontsize) at the beginning of the second string * Note that in this implementation neither the under- nor * overprinted string can contain syntax that would result * in additional recursions -- no subscripts, * superscripts, or anything else, with the exception of a * font definition at the beginning of the text */ (term->enhanced_flush)(); p = enhanced_recursion(++p, FALSE, fontname, fontsize, base, widthflag, showflag, 1); (term->enhanced_flush)(); if (!*p) break; p = enhanced_recursion(++p, FALSE, fontname, fontsize, base, FALSE, showflag, 2); overprint = 0; /* may not be necessary, but just in case . . . */ break; /*}}}*/ case '(' : case ')' : /*{{{ an escape and print it */ /* special cases */ (term->enhanced_open)(fontname, fontsize, base, widthflag, showflag, overprint); if (term->flags & TERM_IS_POSTSCRIPT) (term->enhanced_writec)('\\'); (term->enhanced_writec)(*p); break; /*}}}*/ case '\\' : /*{{{ Enhanced mode always uses \xyz as an octal character representation but each terminal type must give us the actual output format wanted. pdf.trm wants the raw character code, which is why we use strtol(); most other terminal types want some variant of "\\%o". */ if (p[1] >= '0' && p[1] <= '7') { char *e, escape[16], octal[4] = {'\0','\0','\0','\0'}; (term->enhanced_open)(fontname, fontsize, base, widthflag, showflag, overprint); octal[0] = *(++p); if (p[1] >= '0' && p[1] <= '7') { octal[1] = *(++p); if (p[1] >= '0' && p[1] <= '7') octal[2] = *(++p); } sprintf(escape, enhanced_escape_format, strtol(octal,NULL,8)); for (e=escape; *e; e++) { (term->enhanced_writec)(*e); } break; /* This was the original (prior to version 4) enhanced text code specific */ /* to the reserved characters of PostScript. Some of it was mis-applied */ /* to other terminal types until fixed in Mar 2012. */ } else if (term->flags & TERM_IS_POSTSCRIPT) { if (p[1]=='\\' || p[1]=='(' || p[1]==')') { (term->enhanced_open)(fontname, fontsize, base, widthflag, showflag, overprint); (term->enhanced_writec)('\\'); } else if (strchr("^_@&~{}",p[1]) == NULL) { (term->enhanced_open)(fontname, fontsize, base, widthflag, showflag, overprint); (term->enhanced_writec)('\\'); (term->enhanced_writec)('\\'); break; } } ++p; /* HBB 20030122: Avoid broken output if there's a \ * exactly at the end of the line */ if (*p == '\0') { int_warn(NO_CARET, "enhanced text parser -- spurious backslash"); break; } /* SVG requires an escaped '&' to be passed as something else */ /* FIXME: terminal-dependent code does not belong here */ if (*p == '&' && encoding == S_ENC_DEFAULT && !strcmp(term->name, "svg")) { (term->enhanced_open)(fontname, fontsize, base, widthflag, showflag, overprint); (term->enhanced_writec)('\376'); break; } /* just go and print it (fall into the 'default' case) */ /*}}}*/ default: /*{{{ print it */ (term->enhanced_open)(fontname, fontsize, base, widthflag, showflag, overprint); (term->enhanced_writec)(*p); /*}}}*/ } /* switch (*p) */ /* like TeX, we only do one character in a recursion, unless it's * in braces */ if (!brace) { (term->enhanced_flush)(); return(p); /* the ++p in the outer copy will increment us */ } if (*p) /* only not true if { not terminated, I think */ ++p; } /* while (*p) */ (term->enhanced_flush)(); return p; } /* Called after the end of recursion to check for errors */ void enh_err_check(const char *str) { if (*str == '}') int_warn(NO_CARET, "enhanced text mode parser - ignoring spurious }"); else int_warn(NO_CARET, "enhanced text mode parsing error"); } /* Helper function for multiplot auto layout to issue size and offset cmds */ static void mp_layout_size_and_offset(void) { if (!mp_layout.auto_layout) return; /* fprintf(stderr,"col==%d row==%d\n",mp_layout.act_col,mp_layout.act_row); */ /* the 'set size' command */ xsize = mp_layout.xscale / mp_layout.num_cols; ysize = mp_layout.yscale / mp_layout.num_rows; /* the 'set origin' command */ xoffset = (double)(mp_layout.act_col) / mp_layout.num_cols; if (mp_layout.downwards) yoffset = 1.0 - (double)(mp_layout.act_row+1) / mp_layout.num_rows; else yoffset = (double)(mp_layout.act_row) / mp_layout.num_rows; /* fprintf(stderr,"xoffset==%g yoffset==%g\n", xoffset,yoffset); */ /* Allow a little space at the top for a title */ if (mp_layout.title.text) { ysize *= (1.0 - mp_layout.title_height); yoffset *= (1.0 - mp_layout.title_height); } /* corrected for x/y-scaling factors and user defined offsets */ xoffset -= (mp_layout.xscale-1)/(2*mp_layout.num_cols); yoffset -= (mp_layout.yscale-1)/(2*mp_layout.num_rows); /* fprintf(stderr," xoffset==%g yoffset==%g\n", xoffset,yoffset); */ xoffset += mp_layout.xoffset; yoffset += mp_layout.yoffset; /* fprintf(stderr," xoffset==%g yoffset==%g\n", xoffset,yoffset); */ } /* * Text strings containing control information for enhanced text mode * contain more characters than will actually appear in the output. * This makes it hard to estimate how much horizontal space on the plot * (e.g. in the key box) must be reserved to hold them. To approximate * the eventual length we switch briefly to the dummy terminal driver * "estimate.trm" and then switch back to the current terminal. * If better, perhaps terminal-specific methods of estimation are * developed later they can be slotted into this one call site. */ int estimate_strlen(char *text) { int len; if ((term->flags & TERM_IS_LATEX)) len = strlen_tex(text); else #ifdef GP_ENH_EST if (strchr(text,'\n') || (term->flags & TERM_ENHANCED_TEXT)) { struct termentry *tsave = term; term = &ENHest; term->put_text(0,0,text); len = term->xmax; FPRINTF((stderr,"Estimating length %d height %g for enhanced text string \"%s\"\n", len, (double)(term->ymax)/10., text)); term = tsave; } else if (encoding == S_ENC_UTF8) len = strwidth_utf8(text); else #endif len = strlen(text); return len; } void ignore_enhanced(TBOOLEAN flag) { /* Force a return to the default font */ if (flag && !ignore_enhanced_text) { ignore_enhanced_text = TRUE; if (term->set_font) term->set_font(""); } ignore_enhanced_text = flag; } /* Simple-minded test for whether the point (x,y) is in bounds for the current terminal. * Some terminals can do their own clipping, and can clip partial objects. * If the flag TERM_CAN_CLIP is set, we skip this relative crude test and let the * driver or the hardware handle clipping. */ TBOOLEAN on_page(int x, int y) { if (term->flags & TERM_CAN_CLIP) return TRUE; if ((0 < x && x < term->xmax) && (0 < y && y < term->ymax)) return TRUE; return FALSE; } /* Utility routine for drivers to accept an explicit size for the * output image. */ size_units parse_term_size( float *xsize, float *ysize, size_units default_units ) { size_units units = default_units; if (END_OF_COMMAND) int_error(c_token, "size requires two numbers: xsize, ysize"); *xsize = real_expression(); if (almost_equals(c_token,"in$ches")) { c_token++; units = INCHES; } else if (equals(c_token,"cm")) { c_token++; units = CM; } switch (units) { case INCHES: *xsize *= gp_resolution; break; case CM: *xsize *= (float)gp_resolution / 2.54; break; case PIXELS: default: break; } if (!equals(c_token++,",")) int_error(c_token, "size requires two numbers: xsize, ysize"); *ysize = real_expression(); if (almost_equals(c_token,"in$ches")) { c_token++; units = INCHES; } else if (equals(c_token,"cm")) { c_token++; units = CM; } switch (units) { case INCHES: *ysize *= gp_resolution; break; case CM: *ysize *= (float)gp_resolution / 2.54; break; case PIXELS: default: break; } if (*xsize < 1 || *ysize < 1) int_error(c_token, "size: out of range"); return units; } /* * Wrappers for newpath and closepath */ void newpath() { if (term->path) (*term->path)(0); } void closepath() { if (term->path) (*term->path)(1); } /* Squeeze all fill information into the old style parameter. * The terminal drivers know how to extract the information. * We assume that the style (int) has only 16 bit, therefore we take * 4 bits for the style and allow 12 bits for the corresponding fill parameter. * This limits the number of styles to 16 and the fill parameter's * values to the range 0...4095, which seems acceptable. */ int style_from_fill(struct fill_style_type *fs) { int fillpar, style; switch( fs->fillstyle ) { case FS_SOLID: case FS_TRANSPARENT_SOLID: fillpar = fs->filldensity; style = ((fillpar & 0xfff) << 4) + fs->fillstyle; break; case FS_PATTERN: case FS_TRANSPARENT_PATTERN: fillpar = fs->fillpattern; style = ((fillpar & 0xfff) << 4) + fs->fillstyle; break; case FS_EMPTY: default: /* solid fill with background color */ style = FS_EMPTY; break; } return style; } void lp_use_properties(struct lp_style_type *lp, int tag) { /* This function looks for a linestyle defined by 'tag' and copies * its data into the structure 'lp'. */ struct linestyle_def *this; int save_pointflag = lp->pointflag; this = first_linestyle; while (this != NULL) { if (this->tag == tag) { *lp = this->lp_properties; lp->pointflag = save_pointflag; /* FIXME - It would be nicer if this were always true already */ if (!lp->use_palette) { if (lp->pm3d_color.type != TC_LT || lp->pm3d_color.lt != lp->l_type) FPRINTF((stderr,"lp_use_properties: uninitialized linetype %d\n", lp->l_type)); lp->pm3d_color.type = TC_LT; lp->pm3d_color.lt = lp->l_type; } return; } else { this = this->next; } } /* No user-defined style with this tag; fall back to default line type. */ load_linetype(lp, tag); } /* * Load lp with the properties of a user-defined linetype */ void load_linetype(struct lp_style_type *lp, int tag) { struct linestyle_def *this; int save_pointflag = lp->pointflag; recycle: this = first_perm_linestyle; while (this != NULL) { if (this->tag == tag) { *lp = this->lp_properties; lp->pointflag = save_pointflag; if (term->flags & TERM_MONOCHROME) { lp->l_type = tag; lp->use_palette = FALSE; return; } /* FIXME - It would be nicer if this were always true already */ if (!lp->use_palette) { FPRINTF((stderr,"load_linetype: uninitialized linetype\n")); lp->pm3d_color.type = TC_LT; lp->pm3d_color.lt = lp->l_type; } return; } else { this = this->next; } } /* This linetype wasn't defined explicitly. */ /* Should we recycle one of the first N linetypes? */ if (tag > linetype_recycle_count && linetype_recycle_count > 0) { tag = (tag-1) % linetype_recycle_count + 1; goto recycle; } /* No user-defined linetype with this tag; fall back to default line type. */ /* NB: We assume that the remaining fields of lp have been initialized. */ lp->l_type = tag - 1; lp->pm3d_color.type = TC_LT; lp->pm3d_color.lt = lp->l_type; lp->p_type = tag - 1; } /* * Totally bogus estimate of TeX string lengths. * Basically * - don't count anything inside square braces * - count regexp \[a-zA-z]* as a single character * - ignore characters {}$^_ */ int strlen_tex(const char *str) { const char *s = str; int len = 0; if (!strpbrk(s, "{}$[]\\")) { len = strlen(s); FPRINTF((stderr,"strlen_tex(\"%s\") = %d\n",s,len)); return len; } while (*s) { switch (*s) { case '[': while (*s && *s != ']') s++; s++; break; case '\\': s++; while (*s && isalpha(*s)) s++; len++; break; case '{': case '}': case '$': case '_': case '^': s++; break; default: s++; len++; } } FPRINTF((stderr,"strlen_tex(\"%s\") = %d\n",str,len)); return len; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/version.c�������������������������������������������������������������������������0000644�0004711�0000144�00000004217�12223337663�012564� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: version.c,v 1.100.2.8 2013/09/05 19:10:58 sfeam Exp $"); } #endif /* GNUPLOT - version.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "version.h" #include "syscfg.h" /* for FAQ_LOCATION */ const char gnuplot_version[] = "4.6"; const char gnuplot_patchlevel[] = "4"; const char gnuplot_date[] = "2013-10-02 "; const char gnuplot_copyright[] = "Copyright (C) 1986-1993, 1998, 2004, 2007-2013"; const char faq_location[] = FAQ_LOCATION; char *compile_options = (void *)0; /* Will be loaded at runtime */ const char bug_email[] = "gnuplot-beta@lists.sourceforge.net"; const char help_email[] = "gnuplot-beta@lists.sourceforge.net"; char os_name[32]; char os_rel[32]; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/readline.h������������������������������������������������������������������������0000644�0004711�0000144�00000004614�11120551105�012650� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: readline.h,v 1.11 2008/12/12 21:06:13 sfeam Exp $ */ /* GNUPLOT - readline.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_READLINE_H # define GNUPLOT_READLINE_H /* #if... / #include / #define collection: */ #include "syscfg.h" /* Type definitions */ /* Variables of readline.c needed by other modules: */ /* Prototypes of functions exported by readline.c */ #if defined(HAVE_LIBREADLINE) # include "stdfn.h" /* <readline/readline.h> needs stdio.h... */ # include <readline/readline.h> #endif #if defined(HAVE_LIBEDITLINE) # include <editline/readline.h> #endif #if defined(HAVE_LIBEDITLINE) int getc_wrapper __PROTO((FILE* fp)); #endif #if defined(READLINE) && !defined(HAVE_LIBREADLINE) && !defined(HAVE_LIBEDITLINE) char *readline __PROTO((const char *)); #endif /* * The following 'readline_ipc' routine is usual 'readline' for OS2_IPC, * and a special one for IPC communication. */ char *readline_ipc __PROTO((const char*)); #endif /* GNUPLOT_READLINE_H */ ��������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/lineproc.mac����������������������������������������������������������������������0000644�0004711�0000144�00000003674�06677000240�013230� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������; lineproc.mac ; MASM macro definition for Bresenham line-drawing routine ; Colin Kelley ; January 13, 1987 INCAX equ 40h ; for Self-Modifying Code INCBX equ 43h DECAX equ 48h DECBX equ 4bh ; usage: ; lineproc linename, pixelname ; ; where linemane is the name you want for the proc, and pixelname is the ; name of the routine that linename is to call to set pixels ; lineproc macro linename, pixelname beginproc linename push bp mov bp,sp push si push di mov ax,[bp+X] ; x1 mov bx,[bp+X+2] ; y1 mov cx,[bp+X+4] ; x2 mov si,[bp+X+6] ; y2 cmp ax,cx ; x1,x2 jne i19 cmp bx,si ; y1,y2 jne i19 call pixelname jmp i28 i19: mov dx,ax ; dx,x1 sub dx,cx ; x2 jnc noabsx neg dx noabsx: mov di,bx ; dy,y1 sub di,si ; y2 jnc noabsy neg di ; dy noabsy: cmp dx,di ; dx,dy jb i21 ; go iterate y's ; ; iterate x's ; cmp bx,si ; y1,y2 jb forwardy mov byte ptr cs:yinc1,DECBX jmp short i22 forwardy: mov byte ptr cs:yinc1,INCBX i22: cmp ax,cx ; x1,x2 jae l20004 mov byte ptr cs:xinc1,INCAX jmp short l20005 l20004: mov byte ptr cs:xinc1,DECAX l20005: mov bp,dx ; sum,dx shr bp,1 ; sum d23: cmp ax,cx ; x1,x2 je i28 ; done xinc1: inc ax ; may become inc or dec add bp,di ; sum,dy cmp bp,dx jb i27 sub bp,dx ; sum,dx yinc1: inc bx ; may become inc or dec i27: call pixelname jmp short d23 ; ; else iterate y's ; i21: cmp ax,cx ; x1,x2 jae l20006 mov byte ptr cs:xinc2,INCAX jmp short l20007 l20006: mov byte ptr cs:xinc2,DECAX l20007: cmp bx,si ; y1,y2 jb forwardy2 mov byte ptr cs:yinc2,DECBX jmp short i29 forwardy2: mov byte ptr cs:yinc2,INCBX i29: mov bp,di ; sum,dy shr bp,1 ; sum,1 d30: cmp bx,si ; y1,y2 je i28 yinc2: inc bx ; may become inc or dec add bp,dx ; sum,dx cmp bp,di ; sum,dy jb i34 sub bp,di ; sum,dy xinc2: inc ax ; may become inc or dec i34: call near ptr pixelname jmp short d30 ; ; clean up and exit ; i28: pop di pop si pop bp ret linename endp endm ��������������������������������������������������������������������gnuplot-4.6.4/src/save.h����������������������������������������������������������������������������0000644�0004711�0000144�00000005012�11005771217�012026� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: save.h,v 1.15 2008/04/30 04:16:15 sfeam Exp $ */ /* GNUPLOT - save.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_SAVE_H # define GNUPLOT_SAVE_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "stdfn.h" #include "axis.h" /* Type definitions */ /* Variables of save.c needed by other modules: */ /* Prototypes of functions exported by save.c */ void save_functions __PROTO((FILE *fp)); void save_variables __PROTO((FILE *fp)); void save_set __PROTO((FILE *fp)); void save_term __PROTO((FILE *fp)); void save_all __PROTO((FILE *fp)); void save_range __PROTO((FILE *, AXIS_INDEX)); void save_textcolor __PROTO((FILE *, const struct t_colorspec *)); void save_pm3dcolor __PROTO((FILE *, const struct t_colorspec *)); void save_fillstyle __PROTO((FILE *, const struct fill_style_type *)); void save_offsets __PROTO((FILE *, char *)); #ifdef EAM_OBJECTS void save_object __PROTO((FILE *, int)); #endif void save_data_func_style __PROTO((FILE *, const char *, enum PLOT_STYLE)); void save_linetype __PROTO((FILE *, lp_style_type *, TBOOLEAN)); #endif /* GNUPLOT_SAVE_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/unset.c���������������������������������������������������������������������������0000644�0004711�0000144�00000116114�12214177376�012240� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: unset.c,v 1.149.2.3 2013/09/11 23:38:38 sfeam Exp $"); } #endif /* GNUPLOT - unset.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "setshow.h" #include "axis.h" #include "command.h" #include "contour.h" #include "datafile.h" #include "fit.h" #include "gadgets.h" #include "gp_hist.h" #include "hidden3d.h" #include "misc.h" #include "parse.h" #include "plot.h" #include "plot2d.h" #include "plot3d.h" #include "tables.h" #include "term_api.h" #include "util.h" #include "variable.h" #include "pm3d.h" static void unset_angles __PROTO((void)); static void unset_arrow __PROTO((void)); static void unset_arrowstyles __PROTO((void)); static void free_arrowstyle __PROTO((struct arrowstyle_def *)); static void delete_arrow __PROTO((struct arrow_def *, struct arrow_def *)); static void unset_autoscale __PROTO((void)); static void unset_bars __PROTO((void)); static void unset_border __PROTO((void)); static void unset_boxplot __PROTO((void)); static void unset_boxwidth __PROTO((void)); static void unset_fillstyle __PROTO((void)); static void unset_clabel __PROTO((void)); static void unset_clip __PROTO((void)); static void unset_cntrparam __PROTO((void)); static void unset_contour __PROTO((void)); static void unset_dgrid3d __PROTO((void)); static void unset_dummy __PROTO((void)); static void unset_encoding __PROTO((void)); static void unset_decimalsign __PROTO((void)); static void unset_fit __PROTO((void)); static void unset_format __PROTO((void)); static void unset_grid __PROTO((void)); static void unset_hidden3d __PROTO((void)); static void unset_histogram __PROTO((void)); static void unset_historysize __PROTO((void)); static void unset_isosamples __PROTO((void)); static void unset_key __PROTO((void)); static void unset_keytitle __PROTO((void)); static void unset_label __PROTO((void)); static void delete_label __PROTO((struct text_label * prev, struct text_label * this)); static void unset_linestyle __PROTO((struct linestyle_def **head)); static void unset_linetype __PROTO((void)); #ifdef EAM_OBJECTS static void unset_object __PROTO((void)); static void delete_object __PROTO((struct object * prev, struct object * this)); static void unset_style_rectangle __PROTO(()); static void unset_style_circle __PROTO(()); static void unset_style_ellipse __PROTO(()); #endif static void unset_loadpath __PROTO((void)); static void unset_locale __PROTO((void)); static void reset_logscale __PROTO((AXIS_INDEX)); static void unset_logscale __PROTO((void)); #ifdef GP_MACROS static void unset_macros __PROTO((void)); #endif static void unset_mapping __PROTO((void)); static void unset_margin __PROTO((t_position *)); static void unset_missing __PROTO((void)); #ifdef USE_MOUSE static void unset_mouse __PROTO((void)); #endif static void unset_month_day_tics __PROTO((AXIS_INDEX)); static void unset_minitics __PROTO((AXIS_INDEX)); static void unset_offsets __PROTO((void)); static void unset_origin __PROTO((void)); static void unset_output __PROTO((void)); static void unset_parametric __PROTO((void)); static void unset_pm3d __PROTO((void)); static void unset_palette __PROTO((void)); static void reset_colorbox __PROTO((void)); static void unset_colorbox __PROTO((void)); static void unset_pointsize __PROTO((void)); static void unset_pointintervalbox __PROTO((void)); static void unset_polar __PROTO((void)); static void unset_print __PROTO((void)); static void unset_psdir __PROTO((void)); static void unset_samples __PROTO((void)); static void unset_size __PROTO((void)); static void unset_style __PROTO((void)); static void unset_surface __PROTO((void)); static void unset_table __PROTO((void)); static void unset_terminal __PROTO((void)); static void unset_tics __PROTO((AXIS_INDEX)); static void unset_ticscale __PROTO((void)); static void unset_ticslevel __PROTO((void)); static void unset_timefmt __PROTO((void)); static void unset_timestamp __PROTO((void)); static void unset_view __PROTO((void)); static void unset_zero __PROTO((void)); static void unset_timedata __PROTO((AXIS_INDEX)); static void unset_range __PROTO((AXIS_INDEX)); static void unset_zeroaxis __PROTO((AXIS_INDEX)); static void unset_all_zeroaxes __PROTO((void)); static void unset_axislabel_or_title __PROTO((text_label *)); static void unset_axislabel __PROTO((AXIS_INDEX)); /******** The 'unset' command ********/ void unset_command() { int found_token; int save_token; c_token++; set_iterator = check_for_iteration(); found_token = lookup_table(&set_tbl[0],c_token); /* HBB 20000506: rationalize occurences of c_token++ ... */ if (found_token != S_INVALID) c_token++; save_token = c_token; ITERATE: switch(found_token) { case S_ANGLES: unset_angles(); break; case S_ARROW: unset_arrow(); break; case S_AUTOSCALE: unset_autoscale(); break; case S_BARS: unset_bars(); break; case S_BORDER: unset_border(); break; case S_BOXWIDTH: unset_boxwidth(); break; case S_CLABEL: unset_clabel(); break; case S_CLIP: unset_clip(); break; case S_CNTRPARAM: unset_cntrparam(); break; case S_CONTOUR: unset_contour(); break; case S_DGRID3D: unset_dgrid3d(); break; case S_DUMMY: unset_dummy(); break; case S_ENCODING: unset_encoding(); break; case S_DECIMALSIGN: unset_decimalsign(); break; case S_FIT: unset_fit(); break; case S_FORMAT: unset_format(); break; case S_GRID: unset_grid(); break; case S_HIDDEN3D: unset_hidden3d(); break; case S_HISTORYSIZE: unset_historysize(); break; case S_ISOSAMPLES: unset_isosamples(); break; case S_KEY: unset_key(); break; case S_KEYTITLE: unset_keytitle(); break; case S_LABEL: unset_label(); break; case S_LINETYPE: unset_linetype(); break; case S_LOADPATH: unset_loadpath(); break; case S_LOCALE: unset_locale(); break; case S_LOGSCALE: unset_logscale(); break; #ifdef GP_MACROS case S_MACROS: unset_macros(); break; #endif case S_MAPPING: unset_mapping(); break; case S_BMARGIN: unset_margin(&bmargin); break; case S_LMARGIN: unset_margin(&lmargin); break; case S_RMARGIN: unset_margin(&rmargin); break; case S_TMARGIN: unset_margin(&tmargin); break; case S_DATAFILE: if (almost_equals(c_token,"fort$ran")) { df_fortran_constants = FALSE; c_token++; break; } df_fortran_constants = FALSE; unset_missing(); df_separator = '\0'; free(df_commentschars); df_commentschars = gp_strdup(DEFAULT_COMMENTS_CHARS); df_unset_datafile_binary(); break; #ifdef USE_MOUSE case S_MOUSE: unset_mouse(); break; #endif case S_MULTIPLOT: term_end_multiplot(); break; case S_OFFSETS: unset_offsets(); break; case S_ORIGIN: unset_origin(); break; case SET_OUTPUT: unset_output(); break; case S_PARAMETRIC: unset_parametric(); break; case S_PM3D: unset_pm3d(); break; case S_PALETTE: unset_palette(); break; case S_COLORBOX: unset_colorbox(); break; case S_POINTINTERVALBOX: unset_pointintervalbox(); break; case S_POINTSIZE: unset_pointsize(); break; case S_POLAR: unset_polar(); break; case S_PRINT: unset_print(); break; case S_PSDIR: unset_psdir(); break; #ifdef EAM_OBJECTS case S_OBJECT: unset_object(); break; #endif case S_RTICS: unset_tics(POLAR_AXIS); break; case S_SAMPLES: unset_samples(); break; case S_SIZE: unset_size(); break; case S_STYLE: unset_style(); break; case S_SURFACE: unset_surface(); break; case S_TABLE: unset_table(); break; case S_TERMINAL: unset_terminal(); break; case S_TICS: unset_tics(AXIS_ARRAY_SIZE); break; case S_TICSCALE: unset_ticscale(); break; case S_TICSLEVEL: case S_XYPLANE: unset_ticslevel(); break; case S_TIMEFMT: unset_timefmt(); break; case S_TIMESTAMP: unset_timestamp(); break; case S_TITLE: unset_axislabel_or_title(&title); break; case S_VIEW: unset_view(); break; case S_ZERO: unset_zero(); break; /* FIXME - are the tics correct? */ case S_MXTICS: unset_minitics(FIRST_X_AXIS); break; case S_XTICS: unset_tics(FIRST_X_AXIS); break; case S_XDTICS: case S_XMTICS: unset_month_day_tics(FIRST_X_AXIS); break; case S_MYTICS: unset_minitics(FIRST_Y_AXIS); break; case S_YTICS: unset_tics(FIRST_Y_AXIS); break; case S_YDTICS: case S_YMTICS: unset_month_day_tics(FIRST_X_AXIS); break; case S_MX2TICS: unset_minitics(SECOND_X_AXIS); break; case S_X2TICS: unset_tics(SECOND_X_AXIS); break; case S_X2DTICS: case S_X2MTICS: unset_month_day_tics(FIRST_X_AXIS); break; case S_MY2TICS: unset_minitics(SECOND_Y_AXIS); break; case S_Y2TICS: unset_tics(SECOND_Y_AXIS); break; case S_Y2DTICS: case S_Y2MTICS: unset_month_day_tics(FIRST_X_AXIS); break; case S_MZTICS: unset_minitics(FIRST_Z_AXIS); break; case S_ZTICS: unset_tics(FIRST_Z_AXIS); break; case S_ZDTICS: case S_ZMTICS: unset_month_day_tics(FIRST_X_AXIS); break; case S_MCBTICS: unset_minitics(COLOR_AXIS); break; case S_CBTICS: unset_tics(COLOR_AXIS); break; case S_CBDTICS: case S_CBMTICS: unset_month_day_tics(FIRST_X_AXIS); break; case S_XDATA: unset_timedata(FIRST_X_AXIS); break; case S_YDATA: unset_timedata(FIRST_Y_AXIS); break; case S_ZDATA: unset_timedata(FIRST_Z_AXIS); break; case S_CBDATA: unset_timedata(COLOR_AXIS); break; case S_X2DATA: unset_timedata(SECOND_X_AXIS); break; case S_Y2DATA: unset_timedata(SECOND_Y_AXIS); break; case S_XLABEL: unset_axislabel(FIRST_X_AXIS); break; case S_YLABEL: unset_axislabel(FIRST_Y_AXIS); break; case S_ZLABEL: unset_axislabel(FIRST_Z_AXIS); break; case S_CBLABEL: unset_axislabel(COLOR_AXIS); break; case S_X2LABEL: unset_axislabel(SECOND_X_AXIS); break; case S_Y2LABEL: unset_axislabel(SECOND_Y_AXIS); break; case S_XRANGE: unset_range(FIRST_X_AXIS); break; case S_X2RANGE: unset_range(SECOND_X_AXIS); break; case S_YRANGE: unset_range(FIRST_Y_AXIS); break; case S_Y2RANGE: unset_range(SECOND_Y_AXIS); break; case S_ZRANGE: unset_range(FIRST_Z_AXIS); break; case S_CBRANGE: unset_range(COLOR_AXIS); break; case S_RRANGE: unset_range(POLAR_AXIS); break; case S_TRANGE: unset_range(T_AXIS); break; case S_URANGE: unset_range(U_AXIS); break; case S_VRANGE: unset_range(V_AXIS); break; case S_RAXIS: raxis = FALSE; c_token++; break; case S_XZEROAXIS: unset_zeroaxis(FIRST_X_AXIS); break; case S_YZEROAXIS: unset_zeroaxis(FIRST_Y_AXIS); break; case S_ZZEROAXIS: unset_zeroaxis(FIRST_Z_AXIS); break; case S_X2ZEROAXIS: unset_zeroaxis(SECOND_X_AXIS); break; case S_Y2ZEROAXIS: unset_zeroaxis(SECOND_Y_AXIS); break; case S_ZEROAXIS: unset_all_zeroaxes(); break; case S_INVALID: default: int_error(c_token, "Unrecognized option. See 'help unset'."); break; } if (next_iteration(set_iterator)) { c_token = save_token; goto ITERATE; } update_gpval_variables(0); set_iterator = cleanup_iteration(set_iterator); } /* process 'unset angles' command */ static void unset_angles() { ang2rad = 1.0; } /* process 'unset arrow' command */ static void unset_arrow() { struct arrow_def *this_arrow; struct arrow_def *prev_arrow; int tag; if (END_OF_COMMAND) { /* delete all arrows */ while (first_arrow != NULL) delete_arrow((struct arrow_def *) NULL, first_arrow); } else { /* get tag */ tag = int_expression(); if (!END_OF_COMMAND) int_error(c_token, "extraneous arguments to unset arrow"); for (this_arrow = first_arrow, prev_arrow = NULL; this_arrow != NULL; prev_arrow = this_arrow, this_arrow = this_arrow->next) { if (this_arrow->tag == tag) { delete_arrow(prev_arrow, this_arrow); return; /* exit, our job is done */ } } int_error(c_token, "arrow not found"); } } /* delete arrow from linked list started by first_arrow. * called with pointers to the previous arrow (prev) and the * arrow to delete (this). * If there is no previous arrow (the arrow to delete is * first_arrow) then call with prev = NULL. */ static void delete_arrow(struct arrow_def *prev, struct arrow_def *this) { if (this != NULL) { /* there really is something to delete */ if (prev != NULL) /* there is a previous arrow */ prev->next = this->next; else /* this = first_arrow so change first_arrow */ first_arrow = this->next; free(this); } } /* delete the whole list of arrow styles */ static void unset_arrowstyles() { free_arrowstyle(first_arrowstyle); first_arrowstyle = NULL; } static void free_arrowstyle(struct arrowstyle_def *arrowstyle) { if (arrowstyle) { free_arrowstyle(arrowstyle->next); free(arrowstyle); } } /* process 'unset autoscale' command */ static void unset_autoscale() { if (END_OF_COMMAND) { int axis; for (axis=0; axis<AXIS_ARRAY_SIZE; axis++) axis_array[axis].set_autoscale = FALSE; } else if (equals(c_token, "xy") || equals(c_token, "tyx")) { axis_array[FIRST_X_AXIS].set_autoscale = axis_array[FIRST_Y_AXIS].set_autoscale = AUTOSCALE_NONE; c_token++; } else { /* HBB 20000506: parse axis name, and unset the right element * of the array: */ int axis = lookup_table(axisname_tbl, c_token); if (axis >= 0) { axis_array[axis].set_autoscale = AUTOSCALE_NONE; c_token++; } } } /* process 'unset bars' command */ static void unset_bars() { bar_size = 0.0; } /* process 'unset border' command */ static void unset_border() { /* this is not the effect as with reset, as the border is enabled, * by default */ draw_border = 0; } /* process 'unset style boxplot' command */ static void unset_boxplot() { boxplot_style defstyle = DEFAULT_BOXPLOT_STYLE; boxplot_opts = defstyle; } /* process 'unset boxwidth' command */ static void unset_boxwidth() { boxwidth = -1.0; boxwidth_is_absolute = TRUE; } /* process 'unset fill' command */ static void unset_fillstyle() { default_fillstyle.fillstyle = FS_EMPTY; default_fillstyle.filldensity = 100; default_fillstyle.fillpattern = 0; default_fillstyle.border_color.type = TC_DEFAULT; } /* process 'unset clabel' command */ static void unset_clabel() { /* FIXME? reset_command() uses TRUE */ label_contours = FALSE; } /* process 'unset clip' command */ static void unset_clip() { if (END_OF_COMMAND) { /* same as all three */ clip_points = FALSE; clip_lines1 = FALSE; clip_lines2 = FALSE; } else if (almost_equals(c_token, "p$oints")) clip_points = FALSE; else if (almost_equals(c_token, "o$ne")) clip_lines1 = FALSE; else if (almost_equals(c_token, "t$wo")) clip_lines2 = FALSE; else int_error(c_token, "expecting 'points', 'one', or 'two'"); c_token++; } /* process 'unset cntrparam' command */ static void unset_cntrparam() { contour_pts = DEFAULT_NUM_APPROX_PTS; contour_kind = CONTOUR_KIND_LINEAR; contour_order = DEFAULT_CONTOUR_ORDER; contour_levels = DEFAULT_CONTOUR_LEVELS; contour_levels_kind = LEVELS_AUTO; } /* process 'unset contour' command */ static void unset_contour() { draw_contour = CONTOUR_NONE; } /* process 'unset dgrid3d' command */ static void unset_dgrid3d() { dgrid3d_row_fineness = 10; dgrid3d_col_fineness = 10; dgrid3d_norm_value = 1; dgrid3d_mode = DGRID3D_QNORM; dgrid3d_x_scale = 1.0; dgrid3d_y_scale = 1.0; dgrid3d = FALSE; } /* process 'unset dummy' command */ static void unset_dummy() { strcpy(set_dummy_var[0], "x"); strcpy(set_dummy_var[1], "y"); } /* process 'unset encoding' command */ static void unset_encoding() { encoding = S_ENC_DEFAULT; } /* process 'unset decimalsign' command */ static void unset_decimalsign() { if (decimalsign != NULL) free(decimalsign); decimalsign = NULL; free(numeric_locale); numeric_locale = NULL; } /* process 'unset fit' command */ static void unset_fit() { if (fitlogfile != NULL) free(fitlogfile); fitlogfile = NULL; fit_errorvariables = FALSE; } /* process 'unset format' command */ /* FIXME: compare and merge with set.c::set_format */ static void unset_format() { TBOOLEAN set_for_axis[AXIS_ARRAY_SIZE] = AXIS_ARRAY_INITIALIZER(FALSE); int axis; if ((axis = lookup_table(axisname_tbl, c_token)) >= 0) { set_for_axis[axis] = TRUE; } else if (equals(c_token,"xy") || equals(c_token,"yx")) { set_for_axis[FIRST_X_AXIS] = set_for_axis[FIRST_Y_AXIS] = TRUE; c_token++; } else if (isstring(c_token) || END_OF_COMMAND) { /* Assume he wants all */ for (axis = 0; axis < AXIS_ARRAY_SIZE; axis++) set_for_axis[axis] = TRUE; } if (END_OF_COMMAND) { SET_DEFFORMAT(FIRST_X_AXIS , set_for_axis); SET_DEFFORMAT(FIRST_Y_AXIS , set_for_axis); SET_DEFFORMAT(FIRST_Z_AXIS , set_for_axis); SET_DEFFORMAT(SECOND_X_AXIS, set_for_axis); SET_DEFFORMAT(SECOND_Y_AXIS, set_for_axis); SET_DEFFORMAT(COLOR_AXIS , set_for_axis); SET_DEFFORMAT(POLAR_AXIS , set_for_axis); } } /* process 'unset grid' command */ static void unset_grid() { /* FIXME HBB 20000506: there is no command to explicitly reset the * linetypes for major and minor gridlines. This function should * do that, maybe... */ AXIS_INDEX i = 0; /* grid_selection = GRID_OFF; */ for (; i < AXIS_ARRAY_SIZE; i++) { axis_array[i].gridmajor = FALSE; axis_array[i].gridminor = FALSE; } } /* process 'unset hidden3d' command */ static void unset_hidden3d() { hidden3d = FALSE; } static void unset_histogram() { histogram_opts.type = HT_CLUSTERED; histogram_opts.gap = 2; } /* process 'unset historysize' command */ static void unset_historysize() { #ifdef GNUPLOT_HISTORY gnuplot_history_size = -1; /* don't ever truncate the history. */ #else int_error(c_token, "Command 'unset historysize' requires history support."); #endif } /* process 'unset isosamples' command */ static void unset_isosamples() { /* HBB 20000506: was freeing 2D data structures although * isosamples are only used by 3D plots. */ sp_free(first_3dplot); first_3dplot = NULL; iso_samples_1 = ISO_SAMPLES; iso_samples_2 = ISO_SAMPLES; } void reset_key() { legend_key temp_key = DEFAULT_KEY_PROPS; memcpy(&keyT, &temp_key, sizeof(keyT)); } /* process 'unset key' command */ static void unset_key() { legend_key *key = &keyT; key->visible = FALSE; } /* process 'unset keytitle' command */ static void unset_keytitle() { legend_key *key = &keyT; key->title[0] = '\0'; /* empty string */ } /* process 'unset label' command */ static void unset_label() { struct text_label *this_label; struct text_label *prev_label; int tag; if (END_OF_COMMAND) { /* delete all labels */ while (first_label != NULL) delete_label((struct text_label *) NULL, first_label); } else { /* get tag */ tag = int_expression(); if (!END_OF_COMMAND) int_error(c_token, "extraneous arguments to unset label"); for (this_label = first_label, prev_label = NULL; this_label != NULL; prev_label = this_label, this_label = this_label->next) { if (this_label->tag == tag) { delete_label(prev_label, this_label); return; /* exit, our job is done */ } } /* int_warn(c_token, "label not found"); */ } } /* delete label from linked list started by first_label. * called with pointers to the previous label (prev) and the * label to delete (this). * If there is no previous label (the label to delete is * first_label) then call with prev = NULL. */ static void delete_label(struct text_label *prev, struct text_label *this) { if (this != NULL) { /* there really is something to delete */ if (prev != NULL) /* there is a previous label */ prev->next = this->next; else /* this = first_label so change first_label */ first_label = this->next; if (this->text) free (this->text); if (this->font) free (this->font); free (this); } } static void unset_linestyle(struct linestyle_def **head) { int tag = int_expression(); struct linestyle_def *this, *prev; for (this = *head, prev = NULL; this != NULL; prev = this, this = this->next) { if (this->tag == tag) { delete_linestyle(head, prev, this); break; } } } static void unset_linetype() { if (equals(c_token,"cycle")) { linetype_recycle_count = 0; c_token++; } else if (!END_OF_COMMAND) unset_linestyle(&first_perm_linestyle); } #ifdef EAM_OBJECTS /* process 'unset rectangle' command */ static void unset_object() { struct object *this_object; struct object *prev_object; int tag; if (END_OF_COMMAND) { /* delete all objects */ while (first_object != NULL) delete_object((struct object *) NULL, first_object); } else { /* get tag */ tag = int_expression(); if (!END_OF_COMMAND) int_error(c_token, "extraneous arguments to unset rectangle"); for (this_object = first_object, prev_object = NULL; this_object != NULL; prev_object = this_object, this_object = this_object->next) { if (this_object->tag == tag) { delete_object(prev_object, this_object); return; /* exit, our job is done */ } } /* int_warn(c_token, "object %d not found", tag); */ } } /* delete object from linked list started by first_object. * called with pointers to the previous object (prev) and the * object to delete (this). * If there is no previous object (the object to delete is * first_object) then call with prev = NULL. */ static void delete_object(struct object *prev, struct object *this) { if (this != NULL) { /* there really is something to delete */ if (prev != NULL) /* there is a previous rectangle */ prev->next = this->next; else /* this = first_object so change first_object */ first_object = this->next; /* NOTE: Must free contents as well */ if (this->object_type == OBJ_POLYGON) free(this->o.polygon.vertex); free (this); } } #endif /* process 'unset loadpath' command */ static void unset_loadpath() { clear_loadpath(); } /* process 'unset locale' command */ static void unset_locale() { init_locale(); } static void reset_logscale(AXIS_INDEX axis) { TBOOLEAN undo_rlog = (axis == POLAR_AXIS && R_AXIS.log); axis_array[axis].log = FALSE; axis_array[axis].base = 0.0; if (undo_rlog) rrange_to_xy(); } /* process 'unset logscale' command */ static void unset_logscale() { int axis; if (END_OF_COMMAND) { /* clean all the islog flags. This will hit some currently * unused ones, too, but that's actually a good thing, IMHO */ for(axis = 0; axis < AXIS_ARRAY_SIZE; axis++) reset_logscale(axis); } else { int i = 0; /* do reverse search because of "x", "x1", "x2" sequence in * axisname_tbl */ while (i < token[c_token].length) { axis = lookup_table_nth_reverse(axisname_tbl, LAST_REAL_AXIS+1, gp_input_line + token[c_token].start_index + i); if (axis < 0) { token[c_token].start_index += i; int_error(c_token, "invalid axis"); } reset_logscale(axisname_tbl[axis].value); i += strlen(axisname_tbl[axis].key); } ++c_token; } #ifdef VOLATILE_REFRESH /* Because the log scaling is applied during data input, a quick refresh */ /* using existing stored data will not work if the log setting changes. */ refresh_ok = 0; #endif } #ifdef GP_MACROS /* process 'unset macros' command */ static void unset_macros() { expand_macros = FALSE; } #endif /* process 'unset mapping3d' command */ static void unset_mapping() { /* assuming same as points */ mapping3d = MAP3D_CARTESIAN; } /* process 'unset {blrt}margin' command */ static void unset_margin(t_position *margin) { margin->scalex = character; margin->x = -1; } /* process 'unset datafile' command */ static void unset_missing() { free(missing_val); missing_val = NULL; } #ifdef USE_MOUSE /* process 'unset mouse' command */ static void unset_mouse() { mouse_setting.on = 0; #ifdef OS2 PM_update_menu_items(); #endif UpdateStatusline(); /* wipe status line */ } #endif /* process 'unset mxtics' command */ static void unset_minitics(AXIS_INDEX axis) { axis_array[axis].minitics = MINI_OFF; axis_array[axis].mtic_freq = 10.0; } /*process 'unset {x|y|x2|y2|z}tics' command */ static void unset_tics(AXIS_INDEX axis) { struct position tics_nooffset = { character, character, character, 0., 0., 0.}; unsigned int istart = 0; unsigned int iend = AXIS_ARRAY_SIZE; unsigned int i; if (axis < AXIS_ARRAY_SIZE) { istart = axis; iend = axis + 1; } for (i = istart; i < iend; ++i) { axis_array[i].ticmode = NO_TICS; if (axis_array[i].ticdef.font) { free(axis_array[i].ticdef.font); axis_array[i].ticdef.font = NULL; } axis_array[i].ticdef.textcolor.type = TC_DEFAULT; axis_array[i].ticdef.textcolor.lt = 0; axis_array[i].ticdef.textcolor.value = 0; axis_array[i].ticdef.offset = tics_nooffset; axis_array[i].ticdef.rangelimited = FALSE; axis_array[i].tic_rotate = 0; axis_array[i].ticscale = 1.0; axis_array[i].miniticscale = 0.5; axis_array[i].tic_in = TRUE; axis_array[i].manual_justify = FALSE; free_marklist(axis_array[i].ticdef.def.user); axis_array[i].ticdef.def.user = NULL; } } static void unset_month_day_tics(AXIS_INDEX axis) { axis_array[axis].ticdef.type = TIC_COMPUTED; } /* process 'unset offsets' command */ static void unset_offsets() { loff.x = roff.x = 0.0; toff.y = boff.y = 0.0; } /* process 'unset origin' command */ static void unset_origin() { xoffset = 0.0; yoffset = 0.0; } /* process 'unset output' command */ static void unset_output() { if (multiplot) { int_error(c_token, "you can't change the output in multiplot mode"); return; } term_set_output(NULL); if (outstr) { free(outstr); outstr = NULL; /* means STDOUT */ } } /* process 'unset print' command */ static void unset_print() { print_set_output(NULL, FALSE); } /* process 'unset psdir' command */ static void unset_psdir() { free(PS_psdir); PS_psdir = NULL; } /* process 'unset parametric' command */ static void unset_parametric() { if (parametric) { parametric = FALSE; if (!polar) { /* keep t for polar */ unset_dummy(); if (interactive) (void) fprintf(stderr,"\n\tdummy variable is x for curves, x/y for surfaces\n"); } } } /* process 'unset palette' command */ static void unset_palette() { c_token++; fprintf(stderr, "you can't unset the palette.\n"); } /* reset colorbox to default settings */ static void reset_colorbox() { color_box = default_color_box; } /* process 'unset colorbox' command: reset to default settings and then * switch it off */ static void unset_colorbox() { reset_colorbox(); color_box.where = SMCOLOR_BOX_NO; } /* process 'unset pm3d' command */ static void unset_pm3d() { pm3d.implicit = PM3D_EXPLICIT; /* reset styles, required to 'plot something' after e.g. 'set pm3d map' */ if (data_style == PM3DSURFACE) data_style = POINTSTYLE; if (func_style == PM3DSURFACE) func_style = LINES; } /* process 'unset pointintervalbox' command */ static void unset_pointintervalbox() { pointintervalbox = 1.0; } /* process 'unset pointsize' command */ static void unset_pointsize() { pointsize = 1.0; } /* process 'unset polar' command */ static void unset_polar() { if (polar) { polar = FALSE; if (parametric && axis_array[T_AXIS].set_autoscale) { /* only if user has not set an explicit range */ axis_array[T_AXIS].set_min = axis_defaults[T_AXIS].min; axis_array[T_AXIS].set_max = axis_defaults[T_AXIS].min; } if (!parametric) { strcpy (set_dummy_var[0], "x"); if (interactive) (void) fprintf(stderr,"\n\tdummy variable is x for curves\n"); } } } /* process 'unset samples' command */ static void unset_samples() { /* HBB 20000506: unlike unset_isosamples(), this one *has* to * clear 2D data structues! */ cp_free(first_plot); first_plot = NULL; sp_free(first_3dplot); first_3dplot = NULL; samples_1 = SAMPLES; samples_2 = SAMPLES; } /* process 'unset size' command */ static void unset_size() { xsize = 1.0; ysize = 1.0; zsize = 1.0; } /* process 'unset style' command */ static void unset_style() { if (END_OF_COMMAND) { data_style = POINTSTYLE; func_style = LINES; while (first_linestyle != NULL) delete_linestyle(&first_linestyle, NULL, first_linestyle); unset_fillstyle(); #ifdef EAM_OBJECTS unset_style_rectangle(); unset_style_circle(); unset_style_ellipse(); #endif unset_histogram(); unset_boxplot(); c_token++; return; } switch(lookup_table(show_style_tbl, c_token)){ case SHOW_STYLE_DATA: data_style = POINTSTYLE; c_token++; break; case SHOW_STYLE_FUNCTION: func_style = LINES; c_token++; break; case SHOW_STYLE_LINE: c_token++; if (END_OF_COMMAND) { while (first_linestyle != NULL) delete_linestyle(&first_linestyle, NULL, first_linestyle); } else { unset_linestyle(&first_linestyle); } break; case SHOW_STYLE_FILLING: unset_fillstyle(); c_token++; break; case SHOW_STYLE_HISTOGRAM: unset_histogram(); c_token++; break; case SHOW_STYLE_ARROW: unset_arrowstyles(); c_token++; break; #ifdef EAM_OBJECTS case SHOW_STYLE_RECTANGLE: unset_style_rectangle(); c_token++; break; case SHOW_STYLE_CIRCLE: unset_style_circle(); c_token++; break; case SHOW_STYLE_ELLIPSE: unset_style_ellipse(); c_token++; break; #endif case SHOW_STYLE_BOXPLOT: unset_boxplot(); c_token++; break; default: int_error(c_token, "expecting 'data', 'function', 'line', 'fill' or 'arrow'"); } } /* process 'unset surface' command */ static void unset_surface() { draw_surface = FALSE; } /* process 'unset table' command */ static void unset_table() { if (table_outfile) fclose(table_outfile); table_outfile = NULL; table_mode = FALSE; } /* process 'unset terminal' comamnd */ /* Aug 2012: restore original terminal type */ static void unset_terminal() { struct udvt_entry *original_terminal = get_udv_by_name("GNUTERM"); if (multiplot) term_end_multiplot(); term_reset(); if (original_terminal) { char *termname = original_terminal->udv_value.v.string_val; term = change_term(termname, strlen(termname)); } screen_ok = FALSE; } /* process 'unset ticscale' command */ static void unset_ticscale() { unsigned int i; int_warn(c_token, "Deprecated syntax - please use 'set tics scale default'"); for (i = 0; i < AXIS_ARRAY_SIZE; ++i) { axis_array[i].ticscale = 1.0; axis_array[i].miniticscale = 0.5; } } /* process 'unset ticslevel' command */ static void unset_ticslevel() { xyplane.z = 0.5; xyplane.absolute = FALSE; } /* Process 'unset timefmt' command */ static void unset_timefmt() { int axis; if (END_OF_COMMAND) for (axis=0; axis < AXIS_ARRAY_SIZE; axis++) strcpy(axis_array[axis].timefmt,TIMEFMT); else if ((axis=lookup_table(axisname_tbl, c_token)) >= 0) { strcpy(axis_array[axis].timefmt, TIMEFMT); c_token++; } else /* int_error() from inside 'reset' would cause problems */ int_warn(c_token, "expected optional axis name"); } /* process 'unset timestamp' command */ static void unset_timestamp() { unset_axislabel_or_title(&timelabel); timelabel_rotate = 0; timelabel_bottom = TRUE; } /* process 'unset view' command */ static void unset_view() { splot_map_deactivate(); splot_map = FALSE; aspect_ratio_3D = 0; surface_rot_z = 30.0; surface_rot_x = 60.0; surface_scale = 1.0; surface_lscale = 0.0; surface_zscale = 1.0; } /* process 'unset zero' command */ static void unset_zero() { zero = ZERO; } /* process 'unset {x|y|z|x2|y2}data' command */ static void unset_timedata(AXIS_INDEX axis) { axis_array[axis].datatype = DT_NORMAL; } /* process 'unset {x|y|z|x2|y2|t|u|v|r}range' command */ static void unset_range(AXIS_INDEX axis) { /* FIXME HBB 20000506: do we want to reset the axis autoscale and * min/max, too? */ axis_array[axis].range_flags = 0; } /* process 'unset {x|y|x2|y2|z}zeroaxis' command */ static void unset_zeroaxis(AXIS_INDEX axis) { axis_array[axis].zeroaxis = default_axis_zeroaxis; } /* process 'unset zeroaxis' command */ static void unset_all_zeroaxes() { AXIS_INDEX axis; for(axis = 0; axis < AXIS_ARRAY_SIZE; axis++) unset_zeroaxis(axis); } /* process 'unset [xyz]{2}label command */ static void unset_axislabel_or_title(text_label *label) { struct position default_offset = { character, character, character, 0., 0., 0. }; if (label) { free(label->text); label->text = NULL; free(label->font); label->font = NULL; label->offset = default_offset; label->textcolor.type = TC_DEFAULT; } } static void unset_axislabel(AXIS_INDEX axis) { unset_axislabel_or_title(&axis_array[axis].label); axis_array[axis].label = default_axis_label; if (axis == FIRST_Y_AXIS || axis == SECOND_Y_AXIS || axis == COLOR_AXIS) axis_array[axis].label.rotate = TEXT_VERTICAL; } /******** The 'reset' command ********/ /* HBB 20000506: I moved this here, from set.c, because 'reset' really * is more like a big lot of 'unset' commands, rather than a bunch of * 'set's. The benefit is that it can make use of many of the * unset_something() contained in this module, i.e. you now have one * place less to keep in sync if the semantics or defaults of any * option is changed. This is only true for options for which 'unset' * state is the default, however, e.g. not for 'surface', 'bars' and * some others. */ void reset_command() { AXIS_INDEX axis; TBOOLEAN save_interactive = interactive; static TBOOLEAN set_for_axis[AXIS_ARRAY_SIZE] = AXIS_ARRAY_INITIALIZER(TRUE); c_token++; /* Reset error state (only?) */ update_gpval_variables(4); if (almost_equals(c_token,"err$orstate")) { c_token++; return; } #ifdef USE_MOUSE /* Reset key bindings only */ if (equals(c_token, "bind")) { bind_remove_all(); c_token++; return; } #endif /* Kludge alert, HBB 20000506: set to noninteractive mode, to * suppress some of the commentary output by the individual * unset_...() routines. */ interactive = FALSE; unset_samples(); unset_isosamples(); /* delete arrows */ while (first_arrow != NULL) delete_arrow((struct arrow_def *) NULL, first_arrow); unset_arrowstyles(); /* delete labels */ while (first_label != NULL) delete_label((struct text_label *) NULL, first_label); /* delete linestyles */ while (first_linestyle != NULL) delete_linestyle(&first_linestyle, NULL, first_linestyle); #ifdef EAM_OBJECTS /* delete objects */ while (first_object != NULL) delete_object((struct object *) NULL, first_object); unset_style_rectangle(); unset_style_circle(); unset_style_ellipse(); #endif /* 'polar', 'parametric' and 'dummy' are interdependent, so be * sure to keep the order intact */ unset_polar(); unset_parametric(); unset_dummy(); unset_axislabel_or_title(&title); reset_key(); unset_keytitle(); unset_timefmt(); unset_view(); /* has to be called in advance to reset reversed yrange if splot_map_active */ for (axis=0; axis<AXIS_ARRAY_SIZE; axis++) { SET_DEFFORMAT(axis, set_for_axis); unset_timedata(axis); unset_zeroaxis(axis); unset_range(axis); unset_axislabel(axis); axis_array[axis].set_autoscale = AUTOSCALE_BOTH; axis_array[axis].writeback_min = axis_array[axis].set_min = axis_defaults[axis].min; axis_array[axis].writeback_max = axis_array[axis].set_max = axis_defaults[axis].max; axis_array[axis].min_constraint = CONSTRAINT_NONE; axis_array[axis].max_constraint = CONSTRAINT_NONE; /* 'tics' default is on for some, off for the other axes: */ unset_tics(axis); axis_array[axis].ticmode = axis_defaults[axis].ticmode; unset_minitics(axis); axis_array[axis].ticdef = default_axis_ticdef; axis_array[axis].minitics = MINI_DEFAULT; reset_logscale(axis); } raxis = TRUE; unset_boxplot(); unset_boxwidth(); clip_points = FALSE; clip_lines1 = TRUE; clip_lines2 = FALSE; border_lp = default_border_lp; draw_border = 31; draw_surface = TRUE; data_style = POINTSTYLE; func_style = LINES; /* Reset individual plot style options to the default */ filledcurves_opts_data.closeto = FILLEDCURVES_CLOSED; filledcurves_opts_func.closeto = FILLEDCURVES_CLOSED; bar_size = 1.0; bar_layer = LAYER_FRONT; unset_grid(); grid_lp = default_grid_lp; mgrid_lp = default_grid_lp; polar_grid_angle = 0; grid_layer = -1; #ifdef VOLATILE_REFRESH refresh_ok = 0; #endif prefer_line_styles = FALSE; reset_hidden3doptions(); hidden3d = FALSE; label_contours = TRUE; strcpy(contour_format, "%8.3g"); unset_angles(); unset_mapping(); unset_size(); aspect_ratio = 0.0; /* don't force it */ unset_origin(); unset_timestamp(); unset_offsets(); unset_contour(); unset_cntrparam(); unset_zero(); unset_dgrid3d(); unset_ticslevel(); unset_margin(&bmargin); unset_margin(&lmargin); unset_margin(&rmargin); unset_margin(&tmargin); unset_pointsize(); unset_pointintervalbox(); pm3d_reset(); reset_colorbox(); reset_palette(); df_unset_datafile_binary(); unset_fillstyle(); unset_histogram(); unset_missing(); df_separator = '\0'; free(df_commentschars); df_commentschars = gp_strdup(DEFAULT_COMMENTS_CHARS); unset_fit(); update_gpval_variables(0); /* update GPVAL_ inner variables */ /* HBB 20000506: set 'interactive' back to its real value: */ interactive = save_interactive; } #ifdef EAM_OBJECTS static void unset_style_rectangle() { struct object foo = DEFAULT_RECTANGLE_STYLE; default_rectangle = foo; return; } static void unset_style_circle() { struct object foo = DEFAULT_CIRCLE_STYLE; default_circle = foo; return; } static void unset_style_ellipse() { struct object foo = DEFAULT_ELLIPSE_STYLE; default_ellipse = foo; return; } #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/alloc.h���������������������������������������������������������������������������0000644�0004711�0000144�00000005524�11630656061�012175� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: alloc.h,v 1.12 2011/09/04 11:08:33 markisch Exp $ */ /* GNUPLOT - alloc.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_ALLOC_H # define GNUPLOT_ALLOC_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "stdfn.h" /* prototypes from "alloc.c". This file figures out if the free hack is needed * and redefines free if necessary. */ generic *gp_alloc __PROTO((size_t size, const char *message)); generic *gp_realloc __PROTO((generic *p, size_t size, const char *message)); /* dont define CHECK_HEAP_USE on a FARALLOC machine ! */ #ifdef CHECK_HEAP_USE /* all allocated blocks have guards at front and back. * CHECK_POINTER checks guards on block, and checks that p is in range * START_LEAK_CHECK and END_LEAK_CHECK allow assert that no net memory * is allocated within enclosed block */ void checked_free(void *p); void check_pointer_in_block(void *block, void *p, int size, char *file, int line); void start_leak_check(char *file,int line); void end_leak_check(char *file,int line); # define free(x) checked_free(x) # define CHECK_POINTER(block, p) check_pointer_in_block(block, p, sizeof(*p), __FILE__, __LINE__) # define START_LEAK_CHECK() start_leak_check(__FILE__, __LINE__) # define END_LEAK_CHECK() end_leak_check(__FILE__, __LINE__) #else # define CHECK_POINTER(block, p) /*nowt*/ # define START_LEAK_CHECK() /*nowt*/ # define END_LEAK_CHECK() /*nowt*/ #endif #endif /* GNUPLOT_ALLOC_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/scanner.c�������������������������������������������������������������������������0000644�0004711�0000144�00000027207�12212543127�012524� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: scanner.c,v 1.31.2.3 2013/09/07 05:07:32 sfeam Exp $"); } #endif /* GNUPLOT - scanner.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "scanner.h" #include "alloc.h" #include "command.h" #include "util.h" int curly_brace_count; static int get_num __PROTO((char str[])); static void substitute __PROTO((char **strp, size_t *str_lenp, int current)); #ifdef VMS #include <descrip.h> #define MAILBOX "PLOT$MAILBOX" #define pclose(f) fclose(f) #ifdef __DECC #include <lib$routines.h> /* avoid some IMPLICITFNC warnings */ #include <starlet.h> #endif /* __DECC */ #endif /* VMS */ #define isident(c) (isalnum((unsigned char)c) || (c) == '_') #define LBRACE '{' #define RBRACE '}' #define APPEND_TOKEN {token[t_num].length++; current++;} #define SCAN_IDENTIFIER while (isident(expression[current + 1]))\ APPEND_TOKEN static int t_num; /* number of token I'm working on */ TBOOLEAN legal_identifier(char *p) { if (!p || !(*p) || isdigit(*p)) return FALSE; while (*p) { if (!isident(*p)) return FALSE; p++; } return TRUE; } /* * scanner() breaks expression[] into lexical units, storing them in token[]. * The total number of tokens found is returned as the function * value. Scanning will stop when '\0' is found in expression[], or * when token[] is full. extend_input_line() is called to extend * expression array if needed. * * Scanning is performed by following rules: * * Current char token should contain * ------------- ----------------------- * 1. alpha,_ all following alpha-numerics * 2. digit 0 or more following digits, 0 or 1 decimal point, * 0 or more digits, 0 or 1 'e' or 'E', * 0 or more digits. * 3. ^,+,-,/ only current char * %,~,(,) * [,],;,:, * ?,comma * $ for using patch (div) * 4. &,|,=,* current char; also next if next is same * 5. !,<,> current char; also next if next is = * 6. ", ' all chars up until matching quote * 7. # this token cuts off scanning of the line (DFK). * 8. ` (command substitution: all characters through the * matching backtic are replaced by the output of * the contained command, then scanning is restarted.) * EAM Jan 2010: Bugfix. No rule covered an initial period. This caused * string concatenation to fail for variables whose first * character is 'E' or 'e'. Now we add a 9th rule: * 9. . A period may be a token by itself (string concatenation) * or the start of a decimal number continuing with a digit * * white space between tokens is ignored */ int scanner(char **expressionp, size_t *expressionlenp) { int current; /* index of current char in expression[] */ char *expression = *expressionp; int quote; char brace; curly_brace_count = 0; for (current = t_num = 0; expression[current] != NUL; current++) { if (t_num + 1 >= token_table_size) { /* leave space for dummy end token */ extend_token_table(); } if (isspace((unsigned char) expression[current])) continue; /* skip the whitespace */ token[t_num].start_index = current; token[t_num].length = 1; token[t_num].is_token = TRUE; /* to start with... */ if (expression[current] == '`') { substitute(expressionp, expressionlenp, current); expression = *expressionp; /* expression might have moved */ current--; continue; } /* allow _ to be the first character of an identifier */ if (isalpha((unsigned char) expression[current]) || expression[current] == '_') { SCAN_IDENTIFIER; } else if (isdigit((unsigned char) expression[current])) { token[t_num].is_token = FALSE; token[t_num].length = get_num(&expression[current]); current += (token[t_num].length - 1); } else if (expression[current] == '.') { /* Rule 9 */ if (isdigit(expression[current+1])) { token[t_num].is_token = FALSE; token[t_num].length = get_num(&expression[current]); current += (token[t_num].length - 1); } /* do nothing if the . is a token by itself */ } else if (expression[current] == LBRACE) { int partial; token[t_num].is_token = FALSE; token[t_num].l_val.type = CMPLX; partial = sscanf(&expression[++current], "%lf , %lf %c", &token[t_num].l_val.v.cmplx_val.real, &token[t_num].l_val.v.cmplx_val.imag, &brace); if (partial <= 0) { curly_brace_count++; token[t_num++].is_token = TRUE; current--; continue; } if (partial != 3 || brace != RBRACE) int_error(t_num, "invalid complex constant"); token[t_num].length += 2; while (expression[++current] != RBRACE) { token[t_num].length++; if (expression[current] == NUL) /* { for vi % */ int_error(t_num, "no matching '}'"); } } else if (expression[current] == '\'' || expression[current] == '\"') { token[t_num].length++; quote = expression[current]; while (expression[++current] != quote) { if (!expression[current]) { expression[current] = quote; expression[current + 1] = NUL; break; } else if (quote == '\"' && expression[current] == '\\' && expression[current + 1]) { current++; token[t_num].length += 2; } else if (quote == '\"' && expression[current] == '`') { substitute(expressionp, expressionlenp, current); expression = *expressionp; /* it might have moved */ current--; } else if (quote == '\'' && expression[current+1] == '\'' && expression[current+2] == '\'') { /* look ahead: two subsequent single quotes * -> take them in */ current += 2; token[t_num].length += 3; } else token[t_num].length++; } } else switch (expression[current]) { case '#': /* FIXME: This ugly exception handles the documented syntatic */ /* entity $# (number of arguments in "call" statement), which */ /* otherwise would be treated as introducing a comment. */ if ((t_num == 0) || (gp_input_line[token[t_num-1].start_index] != '$')) goto endline; /* ignore the rest of the line */ case '^': case '+': case '-': case '/': case '%': case '~': case '(': case ')': case '[': case ']': case ';': case ':': case '?': case ',': case '$': /* div */ break; case '}': /* complex constants will not end up here */ curly_brace_count--; break; case '&': case '|': case '=': case '*': if (expression[current] == expression[current + 1]) APPEND_TOKEN; break; case '!': case '<': case '>': if (expression[current + 1] == '=') APPEND_TOKEN; break; default: int_error(t_num, "invalid character %c",expression[current]); } ++t_num; /* next token if not white space */ } endline: /* comments jump here to ignore line */ /* Now kludge an extra token which points to '\0' at end of expression[]. This is useful so printerror() looks nice even if we've fallen off the line. */ token[t_num].start_index = current; token[t_num].length = 0; /* print 3+4 then print 3+ is accepted without * this, since string is ignored if it is not * a token */ token[t_num].is_token = TRUE; return (t_num); } static int get_num(char str[]) { int count = 0; token[t_num].is_token = FALSE; token[t_num].l_val.type = INTGR; /* assume unless . or E found */ while (isdigit((unsigned char) str[count])) count++; if (str[count] == '.') { token[t_num].l_val.type = CMPLX; /* swallow up digits until non-digit */ while (isdigit((unsigned char) str[++count])); /* now str[count] is other than a digit */ } if (str[count] == 'e' || str[count] == 'E') { token[t_num].l_val.type = CMPLX; count++; if (str[count] == '-' || str[count] == '+') count++; if (!isdigit((unsigned char) str[count])) { token[t_num].start_index += count; int_error(t_num, "expecting exponent"); } while (isdigit((unsigned char) str[++count])); } if (token[t_num].l_val.type == INTGR) { long lval; char *endptr; errno = 0; lval = strtol(str, &endptr, 0); if (!errno && ((token[t_num].l_val.v.int_val = lval) == lval)) return(endptr-str); int_warn(t_num, "integer overflow; changing to floating point"); token[t_num].l_val.type = CMPLX; /* Fall through */ } token[t_num].l_val.v.cmplx_val.imag = 0.0; token[t_num].l_val.v.cmplx_val.real = atof(str); return (count); } /* substitute output from ` ` * *strp points to the input string. (*strp)[current] is expected to * be the initial back tic. Characters through the following back tic * are replaced by the output of the command. extend_input_line() * is called to extend *strp array if needed. */ static void substitute(char **strp, size_t *str_lenp, int current) { char *last; char c; char *str, *pgm, *rest = NULL; char *output; size_t pgm_len, rest_len = 0; int output_pos; /* forgive missing closing backquote at end of line */ str = *strp + current; last = str; while (*++last) { if (*last == '`') break; } pgm_len = last - str; pgm = gp_alloc(pgm_len, "command string"); safe_strncpy(pgm, str + 1, pgm_len); /* omit ` to leave room for NUL */ /* save rest of line, if any */ if (*last) { last++; /* advance past ` */ rest_len = strlen(last) + 1; if (rest_len > 1) { rest = gp_alloc(rest_len, "input line copy"); strcpy(rest, last); } } /* do system call */ (void) do_system_func(pgm, &output); free(pgm); /* now replace ` ` with output */ output_pos = 0; while ((c = output[output_pos++])) { if (c != '\n' && c != '\r') (*strp)[current++] = c; if (current == *str_lenp) extend_input_line(); } (*strp)[current] = 0; free(output); /* tack on rest of line to output */ if (rest) { while (current + rest_len > *str_lenp) extend_input_line(); strcpy(*strp + current, rest); free(rest); } screen_ok = FALSE; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/bitmap.h��������������������������������������������������������������������������0000644�0004711�0000144�00000010066�11107622516�012351� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: bitmap.h,v 1.14 2008/11/15 19:38:54 sfeam Exp $ */ /* GNUPLOT - bitmap.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_BITMAP_H # define GNUPLOT_BITMAP_H #include "syscfg.h" /* allow up to 16 bit width for character array */ typedef unsigned int char_row; typedef char_row const GPFAR * GPFAR char_box; #define FNT_CHARS 96 /* Number of characters in the font set */ #define FNT5X9 0 #define FNT5X9_VCHAR 11 /* vertical spacing between characters */ #define FNT5X9_VBITS 9 /* actual number of rows of bits per char */ #define FNT5X9_HCHAR 7 /* horizontal spacing between characters */ #define FNT5X9_HBITS 5 /* actual number of bits per row per char */ extern const char_row GPFAR fnt5x9[FNT_CHARS][FNT5X9_VBITS]; #define FNT9X17 1 #define FNT9X17_VCHAR 21 /* vertical spacing between characters */ #define FNT9X17_VBITS 17 /* actual number of rows of bits per char */ #define FNT9X17_HCHAR 13 /* horizontal spacing between characters */ #define FNT9X17_HBITS 9 /* actual number of bits per row per char */ extern const char_row GPFAR fnt9x17[FNT_CHARS][FNT9X17_VBITS]; #define FNT13X25 2 #define FNT13X25_VCHAR 31 /* vertical spacing between characters */ #define FNT13X25_VBITS 25 /* actual number of rows of bits per char */ #define FNT13X25_HCHAR 19 /* horizontal spacing between characters */ #define FNT13X25_HBITS 13 /* actual number of bits per row per char */ extern const char_row GPFAR fnt13x25[FNT_CHARS][FNT13X25_VBITS]; typedef unsigned char pixels; /* the type of one set of 8 pixels in bitmap */ typedef pixels *bitmap[]; /* the bitmap */ extern bitmap *b_p; /* global pointer to bitmap */ extern unsigned int b_xsize, b_ysize; /* the size of the bitmap */ extern unsigned int b_planes; /* number of color planes */ extern unsigned int b_psize; /* size of each plane */ extern unsigned int b_rastermode; /* raster mode rotates -90deg */ extern unsigned int b_linemask; /* 16 bit mask for dotted lines */ extern unsigned int b_angle; /* rotation of text */ extern int b_maskcount; /* Prototypes from file "bitmap.c" */ unsigned int b_getpixel __PROTO((unsigned int, unsigned int)); void b_makebitmap __PROTO((unsigned int, unsigned int, unsigned int)); void b_freebitmap __PROTO((void)); void b_charsize __PROTO((unsigned int)); void b_setvalue __PROTO((unsigned int)); void b_setlinetype __PROTO((int)); void b_move __PROTO((unsigned int, unsigned int)); void b_vector __PROTO((unsigned int, unsigned int)); void b_put_text __PROTO((unsigned int, unsigned int, const char *)); int b_text_angle __PROTO((int)); void b_boxfill __PROTO((int, unsigned int, unsigned int, unsigned int, unsigned int)); #endif /* GNUPLOT_BITMAP_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/internal.h������������������������������������������������������������������������0000644�0004711�0000144�00000007413�11615433057�012717� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: internal.h,v 1.23 2011/08/01 05:14:23 sfeam Exp $ */ /* GNUPLOT - internal.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_INTERNAL_H # define GNUPLOT_INTERNAL_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "gp_types.h" #include "eval.h" /* Prototypes from file "internal.c" */ void eval_reset_after_error __PROTO((void)); /* the basic operators of our stack machine for function evaluation: */ void f_push __PROTO((union argument *x)); void f_pushc __PROTO((union argument *x)); void f_pushd1 __PROTO((union argument *x)); void f_pushd2 __PROTO((union argument *x)); void f_pushd __PROTO((union argument *x)); void f_pop __PROTO((union argument *x)); void f_call __PROTO((union argument *x)); void f_calln __PROTO((union argument *x)); void f_sum __PROTO((union argument *x)); void f_lnot __PROTO((union argument *x)); void f_bnot __PROTO((union argument *x)); void f_lor __PROTO((union argument *x)); void f_land __PROTO((union argument *x)); void f_bor __PROTO((union argument *x)); void f_xor __PROTO((union argument *x)); void f_band __PROTO((union argument *x)); void f_uminus __PROTO((union argument *x)); void f_eq __PROTO((union argument *x)); void f_ne __PROTO((union argument *x)); void f_gt __PROTO((union argument *x)); void f_lt __PROTO((union argument *x)); void f_ge __PROTO((union argument *x)); void f_le __PROTO((union argument *x)); void f_plus __PROTO((union argument *x)); void f_minus __PROTO((union argument *x)); void f_mult __PROTO((union argument *x)); void f_div __PROTO((union argument *x)); void f_mod __PROTO((union argument *x)); void f_power __PROTO((union argument *x)); void f_factorial __PROTO((union argument *x)); void f_concatenate __PROTO((union argument *x)); void f_eqs __PROTO((union argument *x)); void f_nes __PROTO((union argument *x)); void f_gprintf __PROTO((union argument *x)); void f_range __PROTO((union argument *x)); void f_sprintf __PROTO((union argument *x)); void f_strlen __PROTO((union argument *x)); void f_strstrt __PROTO((union argument *x)); void f_system __PROTO((union argument *x)); void f_words __PROTO((union argument *x)); void f_strftime __PROTO((union argument *x)); void f_strptime __PROTO((union argument *x)); void f_time __PROTO((union argument *x)); void f_assign __PROTO((union argument *x)); void f_value __PROTO((union argument *x)); #endif /* GNUPLOT_INTERNAL_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/lasergnu��������������������������������������������������������������������������0000644�0004711�0000144�00000015066�06677000236�012501� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/csh -f # # $Id: lasergnu,v 1.1 1999/03/26 21:48:14 lhecking Exp $ # # Print gnuplot output on an Imagen or Postscript laser printer. set print_banner = on # Print a banner page unless told otherwise. set input_files = () # the plot input command files set lpr_opts = () # options to lpr # Default printer set by shell variable PRINTER. if (! $?PRINTER) then if ($?LASER) then set PRINTER=$LASER else set PRINTER="lw0" endif endif set printer = (-P$PRINTER) # File for plot commands, and for plot output set TMP=/tmp/plot$$ set outfile=$TMP.out # the output file onintr cleanup # default is Imagen mode for Imagen printer; see -p option set setterm="set terminal imagen" set LANG="-Limpress" # Loop through the command-line arguments. top: if ($#argv > 0) then switch ("$argv[1]") case -b*: # Do not print a banner page. case -J*: # Compatible with imprint. set print_banner = off set lpr_opts=($lpr_opts -h) shift argv goto top case -f?*: # Specify file containing plot commands set input_files = ($input_files `echo $argv[1] | sed 's/^-f//'`) shift argv goto top case -f: # Specify file containing plot commands shift argv if ($#argv > 0) then set input_files = ($input_files $argv[1]) shift argv else echo "Usage: -f file ..." echo "Type lasergnu -help for help." exit (1) endif goto top case -F?*: # Specify font set fontsize = `echo $argv[1] | sed 's/^-F//'`) shift argv goto top case -F: # Specify font shift argv if ($#argv > 0) then set font = $argv[1] shift argv else echo "Usage: -F font" echo "Type lasergnu -help for help." exit (1) endif goto top case -t?*: # Specify title of plot echo set title \""`echo $argv[1] | sed 's/^-t//'`"\" >> $TMP shift argv goto top case -t: # Specify title of plot shift argv if ($#argv > 0) then echo set title \""$1"\" >> $TMP shift argv else echo "Usage: -t title ..." echo "Type lasergnu -help for help." exit (1) endif goto top case -help: goto usage case -P?*: # Set the printer, exactly as by itroff. set printer = $argv[1] shift argv goto top case -P: # Set the printer, exactly as by itroff. shift argv if ($#argv > 0) then set printer = (-P$argv[1]) shift argv else echo "Usage: -P printer ..." echo "Type lasergnu -help for help." exit (1) endif goto top # use impress case -I: echo Imagen is the default mode now shift argv goto top # use postscript instead of impress language case -p: set setterm="set term postscript" set LANG="-Lpostscript" shift argv goto top case -s?*: # Specify scale of plot echo set size `echo $argv[1] | sed 's/^-s//'` >> $TMP shift argv goto top case -s: # Specify scale of plot shift argv if ($#argv > 0) then echo set size "$1" >> $TMP shift argv else echo "Usage: -s xscale,yscale" echo "Type lasergnu -help for help." exit (1) endif goto top case -w?*: # Specify split page in multiplot (horiz,vertical) set windows=`echo "$argv[1]\]" | sed 's/^-s/[/'` shift argv goto top case -w: # Specify split page shift argv if ($#argv > 0) then set windows="[$argv[1]]" shift argv else echo "Usage: -w horiz,vertical" echo "Type lasergnu -help for help." exit (1) endif goto top case -O: set orientation="portrait" shift argv goto top case -?*: echo "I do not recognize option $argv[1]." goto usage default: echo "$argv[1]" >> $TMP shift argv goto top endsw endif # try to devine the printer type if ($printer =~ -Plw*) then set setterm="set term postscript" set LANG="-Lpostscript" endif if ($printer =~ -Pim*) then set setterm="set term imagen $windows $orientation $font" set LANG="-Limpress" endif # Set up input file echo "$setterm" > $TMP.plt echo set output \"$outfile\" >> $TMP.plt if (-e $TMP) cat $TMP >> $TMP.plt grep -v "set te" $input_files | grep -v "set o" >> $TMP.plt echo "quit" >> $TMP.plt # If input file is specified AND command line contains plot commands, then # do command line args first, then plot commands in input file. gnuplot $TMP.plt < /dev/null #gnuplot $TMP.plt $input_files if ($status == 0 && -e $outfile && ! -z $outfile) then # The printer is whatever printer was last specified, # or the default printer if none was specified. # Imagen terminal driver support the page header if ($LANG == -Limpress) then /usr/local/bin/ipr $LANG $printer \ -D"jobheader $print_banner" \ -D"pagereversal on" \ -D"program lasergnu" $outfile else if ($LANG == -Lpostscript) then lpr $lpr_opts $printer $outfile endif else echo "lasergnu: error in plotting or empty plot; nothing printed." endif cleanup: rm -f $TMP* $outfile exit usage: echo "usage: lasergnu [-Pprinter] [-F font] [-w nx,ny ] [-s xscale,yscale][-b] [-O] [-p] [-t title] [-f file] ['plot command']...." echo " -O : Orientation Portrait (default is Landscape)" echo " -F font : fontsize in points for imagen" echo " -w nx,ny : split page (nx and ny: no. plots horizontal and vertical)" echo " -s xscale,yscale : scaling in horiz, vertical direction" echo " -P printer : Printer to send the plot" echo " -p : set gnuplot driver to postscript (default is Imagen)" echo " -I : set gnuplot terminal driver to imagen (default)" echo " -b : don't print jobheader page" echo "" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/getcolor.h������������������������������������������������������������������������0000644�0004711�0000144�00000003446�11452740246�012723� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: getcolor.h,v 1.10 2010/10/06 00:19:50 sfeam Exp $ */ /* GNUPLOT - getcolor.h */ /* Routines + constants for mapping interval [0,1] into another [0,1] to be * used to get RGB triplets from gray (palette of smooth colours). * * Note: The code in getcolor.h,.c cannot be inside color.h,.c since gplt_x11.c * compiles with getcolor.o, so it cannot load the other huge staff. * */ /*[ * * Petr Mikulik, since December 1998 * Copyright: open source as much as possible * ]*/ #ifndef GETCOLOR_H #define GETCOLOR_H #include "syscfg.h" #include "color.h" enum color_models_id { C_MODEL_RGB = 'r', C_MODEL_HSV = 'h', C_MODEL_CMY = 'c', C_MODEL_YIQ = 'y', C_MODEL_XYZ = 'x' }; /* main gray --> rgb color mapping */ void rgb1_from_gray __PROTO(( double gray, rgb_color *color )); void rgb255_from_rgb1 __PROTO(( rgb_color rgb1, rgb255_color *rgb255 )); /* main gray --> rgb color mapping as above, with take care of palette maxcolors */ void rgb1maxcolors_from_gray __PROTO(( double gray, rgb_color *color )); void rgb255maxcolors_from_gray __PROTO(( double gray, rgb255_color *rgb255 )); double quantize_gray __PROTO(( double gray )); /* used to (de-)serialize color/gradient information */ char *gradient_entry_to_str __PROTO(( gradient_struct *gs )); void str_to_gradient_entry __PROTO(( char *s, gradient_struct *gs )); /* check if two palettes p1 and p2 differ */ int palettes_differ __PROTO(( t_sm_palette *p1, t_sm_palette *p2 )); /* construct minimal gradient to approximate palette */ gradient_struct *approximate_palette __PROTO(( t_sm_palette *palette, int maxsamples, double allowed_deviation, int *gradient_num )); double GetColorValueFromFormula __PROTO((int formula, double x)); extern const char *ps_math_color_formulae[]; #endif /* GETCOLOR_H */ /* eof getcolor.h */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/corplot.c�������������������������������������������������������������������������0000644�0004711�0000144�00000004732�10773604272�012564� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: corplot.c,v 1.7 2008/03/30 03:27:54 sfeam Exp $"); } #endif /* GNUPLOT - corplot.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include <stdio.h> #include <process.h> #include <dos.h> #define BOUNDARY 32768 #define segment(addr) (FP_SEG(m) + ((FP_OFF(m)+15) >> 4)); #define round(value,boundary) (((value) + (boundary) - 1) & ~((boundary) - 1)) char *malloc(), *realloc(); char prog[] = "gnuplot"; char corscreen[] = "CORSCREEN=0"; int main() { unsigned int segm, start; char *m; if (!(m = malloc(BOUNDARY))) { printf("malloc() failed\n"); exit(1); } segm = segment(m); start = round(segm, BOUNDARY / 16); if (realloc(m, BOUNDARY + (start - segm) * 16) != m) { printf("can't realloc() memory\n"); exit(2); } if ((segm = start >> 11) >= 8) { printf("not enough room in first 256K\n"); exit(3); } corscreen[sizeof(corscreen) - 2] = '0' + segm; if (putenv(corscreen)) perror("putenv"); if (spawnlp(P_WAIT, prog, prog, NULL)) perror("spawnlp"); } ��������������������������������������gnuplot-4.6.4/src/gp_hist.h�������������������������������������������������������������������������0000644�0004711�0000144�00000005641�11530415311�012526� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: gp_hist.h,v 1.11 2011/02/21 07:56:57 markisch Exp $ */ /* GNUPLOT - gp_hist.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_HISTORY_H # define GNUPLOT_HISTORY_H #include "syscfg.h" /* Type and struct definitions */ struct hist { char *line; struct hist *prev; struct hist *next; }; /* Variables of history.c needed by other modules: */ extern struct hist *history; extern struct hist *cur_entry; #ifdef GNUPLOT_HISTORY extern long int gnuplot_history_size; #endif /* Prototypes of functions exported by history.c */ /* GNU readline * Only required by two files directly, * so I don't put this into a header file. -lh */ #ifdef HAVE_LIBREADLINE # include <readline/history.h> #endif /* NetBSD editline * (almost) compatible readline replacement */ #if defined(HAVE_LIBEDITLINE) # include <editline/readline.h> #endif #if defined(READLINE) && !defined(HAVE_LIBREADLINE) && !defined(HAVE_LIBEDITLINE) void add_history __PROTO((char *line)); void write_history_n __PROTO((const int, const char *, const char *)); void write_history __PROTO((char *)); void read_history __PROTO((char *)); const char *history_find __PROTO((char *)); int history_find_all __PROTO((char *)); #elif defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) void write_history_n __PROTO((const int, const char *, const char *)); const char *history_find __PROTO((char *)); int history_find_all __PROTO((char *)); #endif /* READLINE && !HAVE_LIBREADLINE && !HAVE_LIBEDITLINE */ #endif /* GNUPLOT_HISTORY_H */ �����������������������������������������������������������������������������������������������gnuplot-4.6.4/src/eval.c����������������������������������������������������������������������������0000644�0004711�0000144�00000063516�12202541145�012022� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: eval.c,v 1.96.2.5 2013/08/13 23:33:57 sfeam Exp $"); } #endif /* GNUPLOT - eval.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* HBB 20010724: I moved several variables and functions from parse.c * to here, because they're involved with *evaluating* functions, not * with parsing them: evaluate_at(), fpe(), and fpe_env */ #include "eval.h" #include "syscfg.h" #include "alloc.h" #include "datafile.h" #include "internal.h" #include "specfun.h" #include "standard.h" #include "util.h" #include "version.h" #include <signal.h> #include <setjmp.h> /* Internal prototypes */ static RETSIGTYPE fpe __PROTO((int an_int)); /* Global variables exported by this module */ struct udvt_entry udv_pi = { NULL, "pi", FALSE, {INTGR, {0} } }; struct udvt_entry *udv_NaN; /* first in linked list */ struct udvt_entry *first_udv = &udv_pi; struct udft_entry *first_udf = NULL; TBOOLEAN undefined; /* The stack this operates on */ static struct value stack[STACK_DEPTH]; static int s_p = -1; /* stack pointer */ #define top_of_stack stack[s_p] static int jump_offset; /* to be modified by 'jump' operators */ /* The table of built-in functions */ /* HBB 20010725: I've removed all the casts to type (FUNC_PTR) --- * According to ANSI/ISO C Standards it causes undefined behaviour if * you cast a function pointer to any other type, including a function * pointer with a different set of arguments, and then call the * function. Instead, I made all these functions adhere to the common * type, directly */ const struct ft_entry GPFAR ft[] = { /* internal functions: */ {"push", f_push}, {"pushc", f_pushc}, {"pushd1", f_pushd1}, {"pushd2", f_pushd2}, {"pushd", f_pushd}, {"pop", f_pop}, {"call", f_call}, {"calln", f_calln}, {"sum", f_sum}, {"lnot", f_lnot}, {"bnot", f_bnot}, {"uminus", f_uminus}, {"lor", f_lor}, {"land", f_land}, {"bor", f_bor}, {"xor", f_xor}, {"band", f_band}, {"eq", f_eq}, {"ne", f_ne}, {"gt", f_gt}, {"lt", f_lt}, {"ge", f_ge}, {"le", f_le}, {"plus", f_plus}, {"minus", f_minus}, {"mult", f_mult}, {"div", f_div}, {"mod", f_mod}, {"power", f_power}, {"factorial", f_factorial}, {"bool", f_bool}, {"dollars", f_dollars}, /* for usespec */ {"concatenate", f_concatenate}, /* for string variables only */ {"eqs", f_eqs}, /* for string variables only */ {"nes", f_nes}, /* for string variables only */ {"[]", f_range}, /* for string variables only */ {"assign", f_assign}, /* assignment operator '=' */ {"jump", f_jump}, {"jumpz", f_jumpz}, {"jumpnz", f_jumpnz}, {"jtern", f_jtern}, /* Placeholder for FS_START */ {"", NULL}, /* legal in using spec only */ {"column", f_column}, {"stringcolumn", f_stringcolumn}, /* for using specs */ {"strcol", f_stringcolumn}, /* shorthand form */ {"columnhead", f_columnhead}, {"valid", f_valid}, {"timecolumn", f_timecolumn}, /* standard functions: */ {"real", f_real}, {"imag", f_imag}, {"arg", f_arg}, {"conjg", f_conjg}, {"sin", f_sin}, {"cos", f_cos}, {"tan", f_tan}, {"asin", f_asin}, {"acos", f_acos}, {"atan", f_atan}, {"atan2", f_atan2}, {"sinh", f_sinh}, {"cosh", f_cosh}, {"tanh", f_tanh}, {"EllipticK", f_ellip_first}, {"EllipticE", f_ellip_second}, {"EllipticPi", f_ellip_third}, {"int", f_int}, {"abs", f_abs}, {"sgn", f_sgn}, {"sqrt", f_sqrt}, {"exp", f_exp}, {"log10", f_log10}, {"log", f_log}, {"besj0", f_besj0}, {"besj1", f_besj1}, {"besy0", f_besy0}, {"besy1", f_besy1}, {"erf", f_erf}, {"erfc", f_erfc}, {"gamma", f_gamma}, {"lgamma", f_lgamma}, {"ibeta", f_ibeta}, {"voigt", f_voigt}, {"igamma", f_igamma}, {"rand", f_rand}, {"floor", f_floor}, {"ceil", f_ceil}, #ifdef BACKWARDS_COMPATIBLE {"defined", f_exists}, /* deprecated syntax defined(foo) */ #endif {"norm", f_normal}, /* XXX-JG */ {"inverf", f_inverse_erf}, /* XXX-JG */ {"invnorm", f_inverse_normal}, /* XXX-JG */ {"asinh", f_asinh}, {"acosh", f_acosh}, {"atanh", f_atanh}, {"lambertw", f_lambertw}, /* HBB, from G.Kuhnle 20001107 */ {"airy", f_airy}, /* janert, 20090905 */ {"expint", f_expint}, /* Jim Van Zandt, 20101010 */ {"tm_sec", f_tmsec}, /* for timeseries */ {"tm_min", f_tmmin}, /* for timeseries */ {"tm_hour", f_tmhour}, /* for timeseries */ {"tm_mday", f_tmmday}, /* for timeseries */ {"tm_mon", f_tmmon}, /* for timeseries */ {"tm_year", f_tmyear}, /* for timeseries */ {"tm_wday", f_tmwday}, /* for timeseries */ {"tm_yday", f_tmyday}, /* for timeseries */ {"sprintf", f_sprintf}, /* for string variables only */ {"gprintf", f_gprintf}, /* for string variables only */ {"strlen", f_strlen}, /* for string variables only */ {"strstrt", f_strstrt}, /* for string variables only */ {"substr", f_range}, /* for string variables only */ {"word", f_words}, /* for string variables only */ {"words", f_words}, /* implemented as word(s,-1) */ {"strftime", f_strftime}, /* time to string */ {"strptime", f_strptime}, /* string to time */ {"time", f_time}, /* get current time */ {"system", f_system}, /* "dynamic backtics" */ {"exist", f_exists}, /* exists("foo") replaces defined(foo) */ {"exists", f_exists}, /* exists("foo") replaces defined(foo) */ {"value", f_value}, /* retrieve value of variable known by name */ {NULL, NULL} }; /* Module-local variables: */ static JMP_BUF fpe_env; /* Internal helper functions: */ static RETSIGTYPE fpe(int an_int) { #if defined(MSDOS) && !defined(__EMX__) && !defined(DJGPP) && !defined(_Windows) /* thanks to lotto@wjh12.UUCP for telling us about this */ _fpreset(); #endif (void) an_int; /* avoid -Wunused warning */ (void) signal(SIGFPE, (sigfunc) fpe); undefined = TRUE; LONGJMP(fpe_env, TRUE); } /* Exported functions */ /* First, some functions that help other modules use 'struct value' --- * these might justify a separate module, but I'll stick with this, * for now */ /* returns the real part of val */ double real(struct value *val) { switch (val->type) { case INTGR: return ((double) val->v.int_val); case CMPLX: return (val->v.cmplx_val.real); case STRING: /* is this ever used? */ return (atof(val->v.string_val)); default: int_error(NO_CARET, "unknown type in real()"); } /* NOTREACHED */ return ((double) 0.0); } /* returns the imag part of val */ double imag(struct value *val) { switch (val->type) { case INTGR: return (0.0); case CMPLX: return (val->v.cmplx_val.imag); case STRING: /* This is where we end up if the user tries: */ /* x = 2; plot sprintf(format,x) */ int_warn(NO_CARET, "encountered a string when expecting a number"); int_error(NO_CARET, "Did you try to generate a file name using dummy variable x or y?"); default: int_error(NO_CARET, "unknown type in imag()"); } /* NOTREACHED */ return ((double) 0.0); } /* returns the magnitude of val */ double magnitude(struct value *val) { switch (val->type) { case INTGR: return ((double) abs(val->v.int_val)); case CMPLX: { /* The straightforward implementation sqrt(r*r+i*i) * over-/underflows if either r or i is very large or very * small. This implementation avoids over-/underflows from * squaring large/small numbers whenever possible. It * only over-/underflows if the correct result would, too. * CAVEAT: sqrt(1+x*x) can still have accuracy * problems. */ double abs_r = fabs(val->v.cmplx_val.real); double abs_i = fabs(val->v.cmplx_val.imag); double quotient; if (abs_i == 0) return abs_r; if (abs_r > abs_i) { quotient = abs_i / abs_r; return abs_r * sqrt(1 + quotient*quotient); } else { quotient = abs_r / abs_i; return abs_i * sqrt(1 + quotient*quotient); } } default: int_error(NO_CARET, "unknown type in magnitude()"); } /* NOTREACHED */ return ((double) 0.0); } /* returns the angle of val */ double angle(struct value *val) { switch (val->type) { case INTGR: return ((val->v.int_val >= 0) ? 0.0 : M_PI); case CMPLX: if (val->v.cmplx_val.imag == 0.0) { if (val->v.cmplx_val.real >= 0.0) return (0.0); else return (M_PI); } return (atan2(val->v.cmplx_val.imag, val->v.cmplx_val.real)); default: int_error(NO_CARET, "unknown type in angle()"); } /* NOTREACHED */ return ((double) 0.0); } struct value * Gcomplex(struct value *a, double realpart, double imagpart) { a->type = CMPLX; a->v.cmplx_val.real = realpart; a->v.cmplx_val.imag = imagpart; return (a); } struct value * Ginteger(struct value *a, int i) { a->type = INTGR; a->v.int_val = i; return (a); } struct value * Gstring(struct value *a, char *s) { a->type = STRING; a->v.string_val = s; return (a); } /* It is always safe to call gpfree_string with a->type is INTGR or CMPLX. * However it would be fatal to call it with a->type = STRING if a->string_val * was not obtained by a previous call to gp_alloc(), or has already been freed. * Thus 'a->type' is set to INTGR afterwards to make subsequent calls safe. */ struct value * gpfree_string(struct value *a) { if (a->type == STRING) { free(a->v.string_val); /* I would have set it to INVALID if such a type existed */ a->type = INTGR; } return a; } /* some machines have trouble with exp(-x) for large x * if E_MINEXP is defined at compile time, use gp_exp(x) instead, * which returns 0 for exp(x) with x < E_MINEXP * exp(x) will already have been defined as gp_exp(x) in plot.h */ double gp_exp(double x) { #ifdef E_MINEXP return (x < (E_MINEXP)) ? 0.0 : exp(x); #else /* E_MINEXP */ int old_errno = errno; double result = exp(x); /* exp(-large) quite uselessly raises ERANGE --- stop that */ if (result == 0.0) errno = old_errno; return result; #endif /* E_MINEXP */ } void reset_stack() { s_p = -1; } void check_stack() { /* make sure stack's empty */ if (s_p != -1) fprintf(stderr, "\n\ warning: internal error--stack not empty!\n\ (function called with too many parameters?)\n"); } TBOOLEAN more_on_stack() { return (s_p >= 0); } struct value * pop(struct value *x) { if (s_p < 0) int_error(NO_CARET, "stack underflow (function call with missing parameters?)"); *x = stack[s_p--]; return (x); } /* * Allow autoconversion of string variables to floats if they * are dereferenced in a numeric context. */ struct value * pop_or_convert_from_string(struct value *v) { (void) pop(v); if (v->type == STRING) { char *eov; if (strspn(v->v.string_val,"0123456789 ") == strlen(v->v.string_val)) { int i = atoi(v->v.string_val); gpfree_string(v); Ginteger(v, i); } else { double d = strtod(v->v.string_val,&eov); if (v->v.string_val == eov) { gpfree_string(v); int_error(NO_CARET,"Non-numeric string found where a numeric expression was expected"); } gpfree_string(v); Gcomplex(v, d, 0.); FPRINTF((stderr,"converted string to CMPLX value %g\n",real(v))); } } return(v); } void push(struct value *x) { if (s_p == STACK_DEPTH - 1) int_error(NO_CARET, "stack overflow"); stack[++s_p] = *x; /* WARNING - This is a memory leak if the string is not later freed */ if (x->type == STRING && x->v.string_val) stack[s_p].v.string_val = gp_strdup(x->v.string_val); } void int_check(struct value *v) { if (v->type != INTGR) int_error(NO_CARET, "non-integer passed to boolean operator"); } /* Internal operators of the stack-machine, not directly represented * by any user-visible operator, or using private status variables * directly */ /* converts top-of-stack to boolean */ void f_bool(union argument *x) { (void) x; /* avoid -Wunused warning */ int_check(&top_of_stack); top_of_stack.v.int_val = !!top_of_stack.v.int_val; } void f_jump(union argument *x) { (void) x; /* avoid -Wunused warning */ jump_offset = x->j_arg; } void f_jumpz(union argument *x) { struct value a; (void) x; /* avoid -Wunused warning */ int_check(&top_of_stack); if (top_of_stack.v.int_val) { /* non-zero --> no jump*/ (void) pop(&a); } else jump_offset = x->j_arg; /* leave the argument on TOS */ } void f_jumpnz(union argument *x) { struct value a; (void) x; /* avoid -Wunused warning */ int_check(&top_of_stack); if (top_of_stack.v.int_val) /* non-zero */ jump_offset = x->j_arg; /* leave the argument on TOS */ else { (void) pop(&a); } } void f_jtern(union argument *x) { struct value a; (void) x; /* avoid -Wunused warning */ int_check(pop(&a)); if (! a.v.int_val) jump_offset = x->j_arg; /* go jump to FALSE code */ } /* This is the heart of the expression evaluation module: the stack program execution loop. 'ft' is a table containing C functions within this program. An 'action_table' contains pointers to these functions and arguments to be passed to them. at_ptr is a pointer to the action table which must be executed (evaluated). so the iterated line executes the function indexed by the at_ptr and passes the address of the argument which is pointed to by the arg_ptr */ void execute_at(struct at_type *at_ptr) { int instruction_index, operator, count; int saved_jump_offset = jump_offset; count = at_ptr->a_count; for (instruction_index = 0; instruction_index < count;) { operator = (int) at_ptr->actions[instruction_index].index; jump_offset = 1; /* jump operators can modify this */ (*ft[operator].func) (&(at_ptr->actions[instruction_index].arg)); assert(is_jump(operator) || (jump_offset == 1)); instruction_index += jump_offset; } jump_offset = saved_jump_offset; } /* 20010724: moved here from parse.c, where it didn't belong */ void evaluate_at(struct at_type *at_ptr, struct value *val_ptr) { double temp = 0; undefined = FALSE; errno = 0; reset_stack(); if (!evaluate_inside_using || !df_nofpe_trap) { if (SETJMP(fpe_env, 1)) return; (void) signal(SIGFPE, (sigfunc) fpe); } execute_at(at_ptr); if (!evaluate_inside_using || !df_nofpe_trap) { (void) signal(SIGFPE, SIG_DFL); } if (errno == EDOM || errno == ERANGE) { undefined = TRUE; } else if (!undefined) { /* undefined (but not errno) may have been set by matherr */ (void) pop(val_ptr); check_stack(); /* At least one machine (ATT 3b1) computes Inf without a SIGFPE */ if (val_ptr->type != STRING) temp = real(val_ptr); if (temp > VERYLARGE || temp < -VERYLARGE) { undefined = TRUE; } } #if defined(NeXT) || defined(ultrix) /* * linux was able to fit curves which NeXT gave up on -- traced it to * silently returning NaN for the undefined cases and plowing ahead * I can force that behavior this way. (0.0/0.0 generates NaN) */ if (undefined && (errno == EDOM || errno == ERANGE)) { /* corey@cac */ undefined = FALSE; errno = 0; Gcomplex(val_ptr, 0.0 / 0.0, 0.0 / 0.0); } #endif /* NeXT || ultrix */ } void free_at(struct at_type *at_ptr) { int i; /* All string constants belonging to this action table have to be * freed before destruction. */ if (!at_ptr) return; for(i=0; i<at_ptr->a_count; i++) { struct at_entry *a = &(at_ptr->actions[i]); /* if union a->arg is used as a->arg.v_arg free potential string */ if ( a->index == PUSHC || a->index == DOLLARS ) gpfree_string(&(a->arg.v_arg)); /* a summation contains its own action table wrapped in a private udf */ if (a->index == SUM) { free_at(a->arg.udf_arg->at); free(a->arg.udf_arg); } } free(at_ptr); } /* EAM July 2003 - Return pointer to udv with this name; if the key does not * match any existing udv names, create a new one and return a pointer to it. */ struct udvt_entry * add_udv_by_name(char *key) { struct udvt_entry **udv_ptr = &first_udv; /* check if it's already in the table... */ while (*udv_ptr) { if (!strcmp(key, (*udv_ptr)->udv_name)) return (*udv_ptr); udv_ptr = &((*udv_ptr)->next_udv); } *udv_ptr = (struct udvt_entry *) gp_alloc(sizeof(struct udvt_entry), "value"); (*udv_ptr)->next_udv = NULL; (*udv_ptr)->udv_name = gp_strdup(key); (*udv_ptr)->udv_undef = TRUE; (*udv_ptr)->udv_value.type = 0; return (*udv_ptr); } struct udvt_entry * get_udv_by_name(char *key) { struct udvt_entry *udv = first_udv; while (udv) { if (!strcmp(key, udv->udv_name)) return udv; udv = udv->next_udv; } return NULL; } void del_udv_by_name( char *key, TBOOLEAN wildcard ) { struct udvt_entry *udv_ptr = first_udv; while (udv_ptr) { /* exact match */ if (!wildcard && !strcmp(key, udv_ptr->udv_name)) { udv_ptr->udv_undef = TRUE; gpfree_string(&(udv_ptr->udv_value)); break; } /* wildcard match: prefix matches */ if ( wildcard && !strncmp(key, udv_ptr->udv_name, strlen(key)) ) { udv_ptr->udv_undef = TRUE; gpfree_string(&(udv_ptr->udv_value)); /* no break - keep looking! */ } udv_ptr = udv_ptr->next_udv; } } static void update_plot_bounds __PROTO((void)); static void fill_gpval_axis __PROTO((AXIS_INDEX axis)); static void set_gpval_axis_sth_double __PROTO((const char *prefix, AXIS_INDEX axis, const char *suffix, double value, int is_int)); static void set_gpval_axis_sth_double(const char *prefix, AXIS_INDEX axis, const char *suffix, double value, int is_int) { struct udvt_entry *v; char *cc, s[24]; sprintf(s, "%s_%s_%s", prefix, axis_defaults[axis].name, suffix); for (cc=s; *cc; cc++) *cc = toupper(*cc); /* make the name uppercase */ v = add_udv_by_name(s); if (!v) return; /* should not happen */ v->udv_undef = FALSE; if (is_int) Ginteger(&v->udv_value, (int)(value+0.5)); else Gcomplex(&v->udv_value, value, 0); } static void fill_gpval_axis(AXIS_INDEX axis) { const char *prefix = "GPVAL"; AXIS *ap = &axis_array[axis]; double a = AXIS_DE_LOG_VALUE(axis, ap->min); double b = AXIS_DE_LOG_VALUE(axis, ap->max); if ((ap->range_flags & RANGE_REVERSE) && (a > b)) { double tmp = a; a = b; b = tmp; } set_gpval_axis_sth_double(prefix, axis, "MIN", a, 0); set_gpval_axis_sth_double(prefix, axis, "MAX", b, 0); set_gpval_axis_sth_double(prefix, axis, "LOG", ap->base, 0); if (axis < POLAR_AXIS) { set_gpval_axis_sth_double("GPVAL_DATA", axis, "MIN", AXIS_DE_LOG_VALUE(axis, ap->data_min), 0); set_gpval_axis_sth_double("GPVAL_DATA", axis, "MAX", AXIS_DE_LOG_VALUE(axis, ap->data_max), 0); } } /* Fill variable "var" visible by "show var" or "show var all" ("GPVAL_*") * by the given value (string, integer, float, complex). */ void fill_gpval_string(char *var, const char *stringvalue) { struct udvt_entry *v = add_udv_by_name(var); if (!v) return; if (v->udv_undef == FALSE && !strcmp(v->udv_value.v.string_val, stringvalue)) return; if (v->udv_undef) v->udv_undef = FALSE; else gpfree_string(&v->udv_value); Gstring(&v->udv_value, gp_strdup(stringvalue)); } void fill_gpval_integer(char *var, int value) { struct udvt_entry *v = add_udv_by_name(var); if (!v) return; v->udv_undef = FALSE; Ginteger(&v->udv_value, value); } void fill_gpval_float(char *var, double value) { struct udvt_entry *v = add_udv_by_name(var); if (!v) return; v->udv_undef = FALSE; Gcomplex(&v->udv_value, value, 0); } void fill_gpval_complex(char *var, double areal, double aimag) { struct udvt_entry *v = add_udv_by_name(var); if (!v) return; v->udv_undef = FALSE; Gcomplex(&v->udv_value, areal, aimag); } /* * Export axis bounds in terminal coordinates from previous plot. * This allows offline mapping of pixel coordinates onto plot coordinates. */ static void update_plot_bounds(void) { fill_gpval_integer("GPVAL_TERM_XMIN", axis_array[FIRST_X_AXIS].term_lower / term->tscale); fill_gpval_integer("GPVAL_TERM_XMAX", axis_array[FIRST_X_AXIS].term_upper / term->tscale); fill_gpval_integer("GPVAL_TERM_YMIN", axis_array[FIRST_Y_AXIS].term_lower / term->tscale); fill_gpval_integer("GPVAL_TERM_YMAX", axis_array[FIRST_Y_AXIS].term_upper / term->tscale); fill_gpval_integer("GPVAL_TERM_XSIZE", canvas.xright+1); fill_gpval_integer("GPVAL_TERM_YSIZE", canvas.ytop+1); } /* * Put all the handling for GPVAL_* variables in this one routine. * We call it from one of several contexts: * 0: following a successful set/unset command * 1: following a successful plot/splot * 2: following an unsuccessful command (int_error) * 3: program entry * 4: explicit reset of error status * 5: directory changed * 6: X11 Window ID changed */ void update_gpval_variables(int context) { /* These values may change during a plot command due to auto range */ if (context == 1) { fill_gpval_axis(FIRST_X_AXIS); fill_gpval_axis(FIRST_Y_AXIS); fill_gpval_axis(SECOND_X_AXIS); fill_gpval_axis(SECOND_Y_AXIS); fill_gpval_axis(FIRST_Z_AXIS); fill_gpval_axis(COLOR_AXIS); fill_gpval_axis(T_AXIS); fill_gpval_axis(U_AXIS); fill_gpval_axis(V_AXIS); fill_gpval_float("GPVAL_R_MIN", R_AXIS.min); fill_gpval_float("GPVAL_R_MAX", R_AXIS.max); fill_gpval_float("GPVAL_R_LOG", R_AXIS.base); update_plot_bounds(); fill_gpval_integer("GPVAL_PLOT", is_3d_plot ? 0:1); fill_gpval_integer("GPVAL_SPLOT", is_3d_plot ? 1:0); fill_gpval_integer("GPVAL_VIEW_MAP", splot_map ? 1:0); fill_gpval_float("GPVAL_VIEW_ROT_X", surface_rot_x); fill_gpval_float("GPVAL_VIEW_ROT_Z", surface_rot_z); fill_gpval_float("GPVAL_VIEW_SCALE", surface_scale); fill_gpval_float("GPVAL_VIEW_ZSCALE", surface_zscale); return; } /* These are set after every "set" command, which is kind of silly */ /* because they only change after 'set term' 'set output' ... */ if (context == 0 || context == 2 || context == 3) { /* This prevents a segfault if term==NULL, which can */ /* happen if set_terminal() exits via int_error(). */ if (!term) fill_gpval_string("GPVAL_TERM", "unknown"); else fill_gpval_string("GPVAL_TERM", (char *)(term->name)); fill_gpval_string("GPVAL_TERMOPTIONS", term_options); fill_gpval_string("GPVAL_OUTPUT", (outstr) ? outstr : ""); fill_gpval_string("GPVAL_ENCODING", encoding_names[encoding]); } /* If we are called from int_error() then set the error state */ if (context == 2) fill_gpval_integer("GPVAL_ERRNO", 1); /* These initializations need only be done once, on program entry */ if (context == 3) { struct udvt_entry *v = add_udv_by_name("GPVAL_VERSION"); char *tmp; if (v && v->udv_undef == TRUE) { v->udv_undef = FALSE; Gcomplex(&v->udv_value, atof(gnuplot_version), 0); } v = add_udv_by_name("GPVAL_PATCHLEVEL"); if (v && v->udv_undef == TRUE) fill_gpval_string("GPVAL_PATCHLEVEL", gnuplot_patchlevel); v = add_udv_by_name("GPVAL_COMPILE_OPTIONS"); if (v && v->udv_undef == TRUE) fill_gpval_string("GPVAL_COMPILE_OPTIONS", compile_options); /* Start-up values */ fill_gpval_integer("GPVAL_MULTIPLOT", 0); fill_gpval_integer("GPVAL_PLOT", 0); fill_gpval_integer("GPVAL_SPLOT", 0); tmp = get_terminals_names(); fill_gpval_string("GPVAL_TERMINALS", tmp); free(tmp); fill_gpval_string("GPVAL_ENCODING", encoding_names[encoding]); /* Permanent copy of user-clobberable variables pi and NaN */ fill_gpval_float("GPVAL_pi", M_PI); fill_gpval_float("GPVAL_NaN", not_a_number()); } if (context == 3 || context == 4) { fill_gpval_integer("GPVAL_ERRNO", 0); fill_gpval_string("GPVAL_ERRMSG",""); } if (context == 3 || context == 5) { char *save_file = NULL; save_file = (char *) gp_alloc(PATH_MAX, "filling GPVAL_PWD"); if (save_file) { GP_GETCWD(save_file, PATH_MAX); fill_gpval_string("GPVAL_PWD", save_file); free(save_file); } } if (context == 6) { fill_gpval_integer("GPVAL_TERM_WINDOWID", current_x11_windowid); } } /* Callable wrapper for the words() internal function */ int gp_words(char *string) { struct value a; push(Gstring(&a,string)); push(Ginteger(&a,-1)); f_words((union argument *)NULL); pop(&a); return a.v.int_val; } /* Callable wrapper for the word() internal function */ char * gp_word(char *string, int i) { struct value a; push(Gstring(&a,string)); push(Ginteger(&a,i)); f_words((union argument *)NULL); pop(&a); return a.v.string_val; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/plot2d.c��������������������������������������������������������������������������0000644�0004711�0000144�00000311727�12223164573�012310� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: plot2d.c,v 1.255.2.22 2013/10/03 03:11:20 sfeam Exp $"); } #endif /* GNUPLOT - plot2d.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "gp_types.h" #include "plot2d.h" #include "alloc.h" #include "axis.h" #include "binary.h" #include "command.h" #include "datafile.h" #include "eval.h" #include "fit.h" #include "graphics.h" #include "interpol.h" #include "misc.h" #include "parse.h" #include "setshow.h" #include "tables.h" #include "tabulate.h" #include "term_api.h" #include "util.h" #include "variable.h" /* For locale handling */ #ifndef _Windows # include "help.h" #endif /* minimum size of points[] in curve_points */ #define MIN_CRV_POINTS 100 /* static prototypes */ static struct curve_points * cp_alloc __PROTO((int num)); static int get_data __PROTO((struct curve_points *)); static void store2d_point __PROTO((struct curve_points *, int i, double x, double y, double xlow, double xhigh, double ylow, double yhigh, double width)); static void eval_plots __PROTO((void)); static void parametric_fixup __PROTO((struct curve_points * start_plot, int *plot_num)); static void box_range_fiddling __PROTO((struct curve_points *plot)); static void boxplot_range_fiddling __PROTO((struct curve_points *plot)); static void histogram_range_fiddling __PROTO((struct curve_points *plot)); static int check_or_add_boxplot_factor __PROTO((struct curve_points *plot, char* string, double x)); static void add_tics_boxplot_factors __PROTO((struct curve_points *plot)); static void sort_boxplot_factors __PROTO((struct curve_points *plot)); static int compare_boxplot_factors __PROTO((SORTFUNC_ARGS arg1, SORTFUNC_ARGS arg2)); /* internal and external variables */ /* the curves/surfaces of the plot */ struct curve_points *first_plot = NULL; static struct udft_entry plot_func; /* box width (automatic) */ double boxwidth = -1.0; /* whether box width is absolute (default) or relative */ TBOOLEAN boxwidth_is_absolute = TRUE; static double histogram_rightmost = 0.0; /* Highest x-coord of histogram so far */ static char *histogram_title = NULL; /* Subtitle for this histogram */ static struct coordinate GPHUGE *stackheight = NULL; /* Scratch space for y autoscale */ static int stack_count = 0; /* counter for stackheight */ /* function implementations */ /* HBB 20000508: moved cp_alloc() &friends to the main module using them, and * made cp_alloc 'static'. */ /* * cp_alloc() allocates a curve_points structure that can hold 'num' * points. Initialize all fields to NULL. */ static struct curve_points * cp_alloc(int num) { struct curve_points *cp; struct lp_style_type default_lp_properties = DEFAULT_LP_STYLE_TYPE; cp = (struct curve_points *) gp_alloc(sizeof(struct curve_points), "curve"); memset(cp,0,sizeof(struct curve_points)); cp->p_max = (num >= 0 ? num : 0); if (num > 0) cp->points = (struct coordinate GPHUGE *) gp_alloc(num * sizeof(struct coordinate), "curve points"); /* Initialize various fields */ cp->lp_properties = default_lp_properties; default_arrow_style(&(cp->arrow_properties)); cp->fill_properties = default_fillstyle; return (cp); } /* * cp_extend() reallocates a curve_points structure to hold "num" * points. This will either expand or shrink the storage. */ void cp_extend(struct curve_points *cp, int num) { if (num == cp->p_max) return; if (num > 0) { if (cp->points == NULL) { cp->points = gp_alloc(num * sizeof(cp->points[0]), "curve points"); } else { cp->points = gp_realloc(cp->points, num * sizeof(cp->points[0]), "expanding curve points"); if (cp->varcolor) cp->varcolor = gp_realloc(cp->varcolor, num * sizeof(double), "expanding curve variable colors"); } cp->p_max = num; } else { free(cp->points); cp->points = NULL; cp->p_max = 0; free(cp->varcolor); cp->varcolor = NULL; } } /* * cp_free() releases any memory which was previously malloc()'d to hold * curve points (and recursively down the linked list). */ /* HBB 20000506: instead of risking stack havoc by recursion, operate * iteratively */ void cp_free(struct curve_points *cp) { while (cp) { struct curve_points *next = cp->next; free(cp->title); cp->title = NULL; free(cp->points); cp->points = NULL; free(cp->varcolor); cp->varcolor = NULL; if (cp->labels) free_labels(cp->labels); cp->labels = NULL; free(cp->boxplot_factor_order); cp->boxplot_factor_order = NULL; free(cp); cp = next; } } /* * In the parametric case we can say plot [a= -4:4] [-2:2] [-1:1] sin(a),a**2 * while in the non-parametric case we would say only plot [b= -2:2] [-1:1] * sin(b) */ void plotrequest() { int dummy_token = -1; int t_axis; if (!term) /* unknown */ int_error(c_token, "use 'set term' to set terminal type first"); is_3d_plot = FALSE; /* Deactivate if 'set view map' is still running after the previous 'splot': */ splot_map_deactivate(); if (parametric && strcmp(set_dummy_var[0], "u") == 0) strcpy(set_dummy_var[0], "t"); /* initialise the arrays from the 'set' scalars */ AXIS_INIT2D(FIRST_X_AXIS, 0); AXIS_INIT2D(FIRST_Y_AXIS, 1); AXIS_INIT2D(SECOND_X_AXIS, 0); AXIS_INIT2D(SECOND_Y_AXIS, 1); AXIS_INIT2D(T_AXIS, 0); AXIS_INIT2D(POLAR_AXIS, 1); AXIS_INIT2D(COLOR_AXIS, 1); /* If we are called from a mouse zoom operation we should ignore */ /* any range limitations because otherwise the zoom won't zoom. */ if (inside_zoom) { while (equals(c_token,"[")) parse_skip_range(); } t_axis = (parametric || polar) ? T_AXIS : FIRST_X_AXIS; dummy_token = parse_named_range(t_axis, dummy_token); if (parametric || polar) /* set optional x ranges */ parse_range(FIRST_X_AXIS); /* possible reversal of x range *does* matter, even in parametric * or polar mode */ check_axis_reversed(FIRST_X_AXIS); parse_range(FIRST_Y_AXIS); check_axis_reversed(FIRST_Y_AXIS); parse_range(SECOND_X_AXIS); check_axis_reversed(SECOND_X_AXIS); parse_range(SECOND_Y_AXIS); check_axis_reversed(SECOND_Y_AXIS); /* Clear out any tick labels read from data files in previous plot */ for (t_axis=0; t_axis<AXIS_ARRAY_SIZE; t_axis++) { struct ticdef *ticdef = &axis_array[t_axis].ticdef; if (ticdef->def.user) ticdef->def.user = prune_dataticks(ticdef->def.user); if (!ticdef->def.user && ticdef->type == TIC_USER) ticdef->type = TIC_COMPUTED; } /* use the default dummy variable unless changed */ if (dummy_token >= 0) copy_str(c_dummy_var[0], dummy_token, MAX_ID_LEN); else (void) strcpy(c_dummy_var[0], set_dummy_var[0]); eval_plots(); } #ifdef VOLATILE_REFRESH /* Helper function for refresh command. Reexamine each data point and update the * flags for INRANGE/OUTRANGE/UNDEFINED based on the current limits for that axis. * Normally the axis limits are already known at this point. But if the user has * forced "set autoscale" since the previous plot or refresh, we need to reset the * axis limits and try to approximate the full auto-scaling behaviour. */ void refresh_bounds(struct curve_points *first_plot, int nplots) { struct curve_points *this_plot = first_plot; int iplot; /* plot index */ for (iplot = 0; iplot < nplots; iplot++, this_plot = this_plot->next) { int i; /* point index */ struct axis *x_axis = &axis_array[this_plot->x_axis]; struct axis *y_axis = &axis_array[this_plot->y_axis]; /* IMAGE clipping is done elsewhere, so we don't need INRANGE/OUTRANGE * checks. */ if (this_plot->plot_style == IMAGE || this_plot->plot_style == RGBIMAGE) { if (x_axis->set_autoscale || y_axis->set_autoscale) plot_image_or_update_axes(this_plot,TRUE); continue; } for (i=0; i<this_plot->p_count; i++) { struct coordinate GPHUGE *point = &this_plot->points[i]; if (point->type == UNDEFINED) continue; else point->type = INRANGE; /* If the state has been set to autoscale since the last plot, * mark everything INRANGE and re-evaluate the axis limits now. * Otherwise test INRANGE/OUTRANGE against previous axis limits. */ /* This autoscaling logic is identical to that in * refresh_3dbounds() in plot3d.c */ if (!this_plot->noautoscale) { if (x_axis->set_autoscale & AUTOSCALE_MIN && point->x < x_axis->min) x_axis->min = point->x; if (x_axis->set_autoscale & AUTOSCALE_MAX && point->x > x_axis->max) x_axis->max = point->x; } if (!inrange(point->x, x_axis->min, x_axis->max)) { point->type = OUTRANGE; continue; } if (!this_plot->noautoscale) { if (y_axis->set_autoscale & AUTOSCALE_MIN && point->y < y_axis->min) y_axis->min = point->y; if (y_axis->set_autoscale & AUTOSCALE_MAX && point->y > y_axis->max) y_axis->max = point->y; } if (!inrange(point->y, y_axis->min, y_axis->max)) { point->type = OUTRANGE; continue; } } } /* Make sure the bounds are reasonable, and tweak them if they aren't */ this_plot = first_plot; for (iplot = 0; iplot < nplots; iplot++, this_plot = this_plot->next) { axis_checked_extend_empty_range(this_plot->x_axis, NULL); axis_checked_extend_empty_range(this_plot->y_axis, NULL); } } #endif /* A quick note about boxes style. For boxwidth auto, we cannot * calculate widths yet, since it may be sorted, etc. But if * width is set, we must do it now, before logs of xmin/xmax * are taken. * We store -1 in point->z as a marker to mean width needs to be * calculated, or 0 to mean that xmin/xmax are set correctly */ /* current_plot->token is after datafile spec, for error reporting * it will later be moved passed title/with/linetype/pointtype */ static int get_data(struct curve_points *current_plot) { int i /* num. points ! */ , j; int ngood; int max_cols, min_cols; /* allowed range of column numbers */ double v[MAXDATACOLS]; int storetoken = current_plot->token; struct coordinate GPHUGE *cp; if (current_plot->varcolor == NULL) { TBOOLEAN variable_color = FALSE; if ((current_plot->lp_properties.pm3d_color.type == TC_RGB) && (current_plot->lp_properties.pm3d_color.value < 0)) variable_color = TRUE; if (current_plot->lp_properties.pm3d_color.type == TC_Z) variable_color = TRUE; if (current_plot->lp_properties.l_type == LT_COLORFROMCOLUMN) variable_color = TRUE; if (current_plot->plot_smooth != SMOOTH_NONE) { /* FIXME: It would be possible to support smooth cspline lc palette */ /* but it would require expanding and interpolating plot->varcolor */ /* in parallel with the y values. */ variable_color = FALSE; } if (variable_color) current_plot->varcolor = gp_alloc(current_plot->p_max * sizeof(double), "varcolor array"); } /* eval_plots has already opened file */ /* HBB 2000504: For most 2D plot styles the 'z' coordinate is unused. * Set it to NO_AXIS to account for that. For styles that use * the z coordinate as a real coordinate (i.e. not a width or * 'delta' component, change the setting inside the switch: */ current_plot->z_axis = NO_AXIS; /* HBB NEW 20060427: if there's only one, explicit using column, * it's y data. df_axis[] has to reflect that, so df_readline() * will expect time/date input. */ if (df_no_use_specs == 1) df_axis[0] = df_axis[1]; switch (current_plot->plot_style) { /* set maximum columns to scan */ case XYERRORLINES: case XYERRORBARS: case BOXXYERROR: min_cols = 4; max_cols = 7; if (df_no_use_specs >= 6) { /* HBB 20060427: signal 3rd and 4th column are absolute x * data --- needed so time/date parsing works */ df_axis[2] = df_axis[3] = df_axis[0]; /* and 5th and 6th are absolute y data */ df_axis[4] = df_axis[5] = df_axis[1]; } break; case FINANCEBARS: /* HBB 20000504: use 'z' coordinate for y-axis quantity */ current_plot->z_axis = current_plot->y_axis; min_cols = 5; max_cols = 6; /* HBB 20060427: signal 3rd and 4th column are absolute y data * --- needed so time/date parsing works */ df_axis[2] = df_axis[3] = df_axis[4] = df_axis[1]; break; case BOXPLOT: min_cols = 2; /* fixed x, lots of y data points */ max_cols = 4; /* optional width, optional factor */ expect_string( 4 ); break; case CANDLESTICKS: current_plot->z_axis = current_plot->y_axis; min_cols = 5; max_cols = 7; df_axis[2] = df_axis[3] = df_axis[4] = df_axis[1]; break; case BOXERROR: min_cols = 3; max_cols = 6; /* There are four possible cases: */ /* 3 cols --> (x,y,dy), auto dx */ /* 4 cols, boxwidth==-2 --> (x,y,ylow,yhigh), auto dx */ /* 4 cols, boxwidth!=-2 --> (x,y,dy,dx) */ /* 5 cols --> (x,y,ylow,yhigh,dx) */ /* In each case an additional column may hold variable color */ if ((df_no_use_specs == 4 && boxwidth == -2) || df_no_use_specs >= 5) /* HBB 20060427: signal 3rd and 4th column are absolute y * data --- needed so time/date parsing works */ df_axis[2] = df_axis[3] = df_axis[1]; break; case VECTOR: /* x, y, dx, dy, variable color or arrow style */ min_cols = 4; max_cols = 5; break; case XERRORLINES: case XERRORBARS: min_cols = 3; max_cols = 5; if (df_no_use_specs >= 4) /* HBB 20060427: signal 3rd and 4th column are absolute x * data --- needed so time/date parsing works */ df_axis[2] = df_axis[3] = df_axis[0]; break; case YERRORLINES: case YERRORBARS: min_cols = 2; max_cols = 5; if (df_no_use_specs >= 4) /* HBB 20060427: signal 3rd and 4th column are absolute y * data --- needed so time/date parsing works */ df_axis[2] = df_axis[3] = df_axis[1]; break; case HISTOGRAMS: min_cols = 1; max_cols = 3; break; case BOXES: min_cols = 1; max_cols = 4; break; case FILLEDCURVES: min_cols = 1; max_cols = 3; df_axis[2] = df_axis[1]; /* Both curves use same y axis */ break; case IMPULSES: /* 2 + possible variable color */ case LINES: case DOTS: min_cols = 1; max_cols = 3; break; case LABELPOINTS: /* 3 column data: X Y Label */ /* 4th column allows rgb variable */ min_cols = 3; max_cols = 4; expect_string( 3 ); break; case IMAGE: min_cols = 3; max_cols = 3; break; case RGBIMAGE: min_cols = 5; max_cols = 6; break; case RGBA_IMAGE: min_cols = 6; max_cols = 6; break; #ifdef EAM_OBJECTS case CIRCLES: /* 3 + possible variable color, or 5 + possible variable color */ min_cols = 2; max_cols = 6; break; case ELLIPSES: min_cols = 2; /* x, y, major axis, minor axis */ max_cols = 6; /* + optional angle, possible variable color */ break; #endif case POINTSTYLE: case LINESPOINTS: /* Allow 3rd column because of 'pointsize variable' */ /* Allow 4th column because of 'lc rgb variable' */ min_cols = 1; max_cols = 4; break; default: min_cols = 1; max_cols = 2; break; } if (current_plot->plot_smooth == SMOOTH_ACSPLINES) { max_cols = 3; current_plot->z_axis = FIRST_Z_AXIS; df_axis[2] = FIRST_Z_AXIS; } /* EXPERIMENTAL May 2013 - Treating timedata columns as strings allows */ /* functions column(N) and column("HEADER") to work on time data. */ if (axis_array[current_plot->x_axis].datatype == DT_TIMEDATE) expect_string(1); if (axis_array[current_plot->y_axis].datatype == DT_TIMEDATE) expect_string(2); if (df_no_use_specs > max_cols) int_error(NO_CARET, "Too many using specs for this style"); if (df_no_use_specs > 0 && df_no_use_specs < min_cols) int_error(NO_CARET, "Not enough columns for this style"); i = 0; ngood = 0; /* If the user has set an explicit locale for numeric input, apply it */ /* here so that it affects data fields read from the input file. */ set_numeric_locale(); /* Initial state */ df_warn_on_missing_columnheader = TRUE; while ((j = df_readline(v, max_cols)) != DF_EOF) { /* j <= max_cols */ if (i >= current_plot->p_max) { /* overflow about to occur. Extend size of points[] * array. Double the size, and add 1000 points, to avoid * needlessly small steps. */ cp_extend(current_plot, i + i + 1000); } if (j > 0) { ngood++; /* June 2010 - New mechanism for variable color */ /* If variable color is requested, take the color value from the */ /* final column of input and decrement the column count by one. */ if (current_plot->varcolor) { static char *errmsg = "Not enough columns for variable color"; switch (current_plot->plot_style) { case CANDLESTICKS: case FINANCEBARS: if (j < 6) int_error(NO_CARET,errmsg); break; case XYERRORLINES: case XYERRORBARS: case BOXXYERROR: if (j != 7 && j != 5) int_error(NO_CARET,errmsg); break; case VECTOR: if (j < 5) int_error(NO_CARET,errmsg); break; case LABELPOINTS: case BOXERROR: case XERRORLINES: case XERRORBARS: case YERRORLINES: case YERRORBARS: if (j < 4) int_error(NO_CARET,errmsg); break; #ifdef EAM_OBJECTS case CIRCLES: if (j == 5 || j < 3) int_error(NO_CARET,errmsg); break; case ELLIPSES: #endif case BOXES: case POINTSTYLE: case LINESPOINTS: case IMPULSES: case LINES: case DOTS: if (j < 3) int_error(NO_CARET,errmsg); break; default: break; } current_plot->varcolor[i] = v[--j]; } } switch (j) { default: { df_close(); int_error(c_token, "internal error : df_readline returned %d : datafile line %d", j, df_line_number); } case DF_MISSING: /* Plot type specific handling of missing points goes here. */ if (current_plot->plot_style == HISTOGRAMS) { current_plot->points[i].type = UNDEFINED; i++; continue; } /* Jun 2006 - Return to behavior of 3.7 and current docs: * do not interrupt plotted line because of missing data */ FPRINTF((stderr,"Missing datum %d\n", i)); continue; case DF_UNDEFINED: /* NaN or bad result from extended using expression */ current_plot->points[i].type = UNDEFINED; i++; continue; case DF_FIRST_BLANK: /* The binary input routines generate DF_FIRST_BLANK at the end * of scan lines, so that the data may be used for the isometric * splots. Rather than turning that off inside the binary * reading routine based upon the plot mode, DF_FIRST_BLANK is * ignored for certain plot types requiring 3D coordinates in * MODE_PLOT. */ if (current_plot->plot_style == IMAGE || current_plot->plot_style == RGBIMAGE || current_plot->plot_style == RGBA_IMAGE) continue; /* make type of next point undefined, but recognizable */ current_plot->points[i] = blank_data_line; i++; continue; case DF_SECOND_BLANK: /* second blank line. We dont do anything * (we did everything when we got FIRST one) */ continue; case DF_FOUND_KEY_TITLE: df_set_key_title(current_plot); continue; case DF_KEY_TITLE_MISSING: fprintf(stderr,"get_data: key title not found in requested column\n"); continue; case DF_COLUMN_HEADERS: continue; case 0: /* not blank line, but df_readline couldn't parse it */ { df_close(); int_error(current_plot->token, "Bad data on line %d of file %s", df_line_number, df_filename ? df_filename : ""); } case 1: { /* only one number */ /* x is index, assign number to y */ v[1] = v[0]; v[0] = df_datum; /* nobreak */ } case 2: H_ERR_BARS: if (current_plot->plot_style == HISTOGRAMS) { if (histogram_opts.type == HT_ERRORBARS) { /* The code is a tangle, but we can get here with j = 1, 2, or 3 */ if (j == 1) int_error(c_token, "Not enough columns in using specification"); else if (j == 2) { v[3] = v[0] + v[1]; v[2] = v[0] - v[1]; } else { v[3] = v[2]; v[2] = v[1]; } v[1] = v[0]; v[0] = df_datum; } else if (j >= 2) int_error(c_token, "Too many columns in using specification"); else v[2] = v[3] = v[1]; if (histogram_opts.type == HT_STACKED_IN_TOWERS) { histogram_rightmost = current_plot->histogram_sequence + current_plot->histogram->start; current_plot->histogram->end = histogram_rightmost; } else if (v[0] + current_plot->histogram->start > histogram_rightmost) { histogram_rightmost = v[0] + current_plot->histogram->start; current_plot->histogram->end = histogram_rightmost; } /* Histogram boxwidths are always absolute */ if (boxwidth > 0) store2d_point(current_plot, i++, v[0], v[1], v[0] - boxwidth / 2, v[0] + boxwidth / 2, v[2], v[3], 0.0); else store2d_point(current_plot, i++, v[0], v[1], v[0] - 0.5, v[0] + 0.5, v[2], v[3], 0.0); /* x, y */ /* ylow and yhigh are same as y */ } else if ( (current_plot->plot_style == BOXES) && boxwidth > 0 && boxwidth_is_absolute) { /* calculate width now */ if (axis_array[current_plot->x_axis].log) { double base = axis_array[current_plot->x_axis].base; store2d_point(current_plot, i++, v[0], v[1], v[0] * pow(base, -boxwidth/2.), v[0] * pow(base, boxwidth/2.), v[1], v[1], 0.0); } else store2d_point(current_plot, i++, v[0], v[1], v[0] - boxwidth / 2, v[0] + boxwidth / 2, v[1], v[1], 0.0); #ifdef EAM_OBJECTS } else if (current_plot->plot_style == CIRCLES) { /* x, y, default radius, full circle */ store2d_point(current_plot, i++, v[0], v[1], v[0], v[0], 0., 360., DEFAULT_RADIUS); } else if (current_plot->plot_style == ELLIPSES) { /* x, y, major axis = minor axis = default, default orientation */ store2d_point(current_plot, i++, v[0], v[1], 0.0, 0.0, 0.0, 0.0, DEFAULT_ELLIPSE); #endif } else if (current_plot->plot_style == YERRORBARS) { /* x is index, assign number to y */ v[2] = v[1]; v[1] = v[0]; v[0] = df_datum; store2d_point(current_plot, i++, v[0], v[1], v[0], v[0], v[1] - v[2], v[1] + v[2], -1.0); } else { if (current_plot->plot_style == CANDLESTICKS || current_plot->plot_style == FINANCEBARS) { int_warn(storetoken, "This plot style does not work with 1 or 2 cols. Setting to points"); current_plot->plot_style = POINTSTYLE; } /* xlow and xhigh are same as x */ /* auto width if boxes, else ignored */ store2d_point(current_plot, i++, v[0], v[1], v[0], v[0], v[1], v[1], -1.0); } break; case 3: /* x, y, ydelta OR x, y, xdelta OR x, y, width */ if (current_plot->plot_smooth == SMOOTH_ACSPLINES) store2d_point(current_plot, i++, v[0], v[1], v[0], v[0], v[1], v[1], v[2]); else switch (current_plot->plot_style) { case HISTOGRAMS: if (histogram_opts.type == HT_ERRORBARS) goto H_ERR_BARS; else /* fall through */ default: int_warn(storetoken, "This plot style does not work with 3 cols. Setting to yerrorbars"); current_plot->plot_style = YERRORBARS; /* fall through */ case FILLEDCURVES: current_plot->filledcurves_options.closeto = FILLEDCURVES_BETWEEN; store2d_point(current_plot, i++, v[0], v[1], v[0], v[0], v[1], v[2], -1.0); break; case YERRORLINES: case YERRORBARS: case BOXERROR: /* x, y, dy */ /* auto width if boxes, else ignored */ store2d_point(current_plot, i++, v[0], v[1], v[0], v[0], v[1] - v[2], v[1] + v[2], -1.0); break; case XERRORLINES: case XERRORBARS: store2d_point(current_plot, i++, v[0], v[1], v[0] - v[2], v[0] + v[2], v[1], v[1], 0.0); break; case BOXES: /* calculate xmin and xmax here, so that logs are taken if if necessary */ store2d_point(current_plot, i++, v[0], v[1], v[0] - v[2] / 2, v[0] + v[2] / 2, v[1], v[1], 0.0); break; case LABELPOINTS: /* Load the coords just as we would have for a point plot */ store2d_point(current_plot, i, v[0], v[1], v[0], v[0], v[1], v[1], -1.0); /* Allocate and fill in a text_label structure to match it */ if (current_plot->points[i].type != UNDEFINED) store_label(current_plot->labels, &(current_plot->points[i]), i, df_tokens[2], current_plot->varcolor ? current_plot->varcolor[i] : 0.0); i++; break; case IMAGE: /* x_center y_center color_value */ store2d_point(current_plot, i, v[0], v[1], v[0], v[0], v[1], v[1], v[2]); cp = &(current_plot->points[i]); COLOR_STORE_WITH_LOG_AND_UPDATE_RANGE(cp->CRD_COLOR, v[2], cp->type, COLOR_AXIS, current_plot->noautoscale, NOOP, cp->CRD_COLOR=v[2]); i++; break; case POINTSTYLE: /* x, y, variable point size */ case LINESPOINTS: case IMPULSES: case LINES: case DOTS: store2d_point(current_plot, i++, v[0], v[1], v[0], v[0], v[1], v[1], v[2]); break; case BOXPLOT: /* x, y, width */ store2d_point(current_plot, i++, v[0], v[1], v[0]-v[2]/2., v[0]+v[2]/2., v[1], v[1], v[2]); break; #ifdef EAM_OBJECTS case CIRCLES: /* x, y, radius */ /* by default a full circle is drawn */ /* negative radius means default radius -> set flag in width */ store2d_point(current_plot, i++, v[0], v[1], v[0]-v[2], v[0]+v[2], 0.0, 360.0, (v[2] >= 0) ? 0.0 : DEFAULT_RADIUS); break; case ELLIPSES: /* x, y, major axis = minor axis, 0 as orientation */ store2d_point(current_plot, i++, v[0], v[1], fabs(v[2]), fabs(v[2]), 0.0, v[2], (v[2] >= 0) ? 0.0 : DEFAULT_RADIUS); break; #endif } /*inner switch */ break; case 4: /* x, y, ylow, yhigh OR * x, y, xlow, xhigh OR * x, y, xdelta, ydelta OR * x, y, ydelta, width */ switch (current_plot->plot_style) { default: int_warn(storetoken, "This plot style does not work with 4 cols. Setting to yerrorbars"); current_plot->plot_style = YERRORBARS; /* fall through */ case YERRORLINES: case YERRORBARS: store2d_point(current_plot, i++, v[0], v[1], v[0], v[0], v[2], v[3], -1.0); break; case BOXXYERROR: /* x, y, dx, dy */ case XYERRORLINES: case XYERRORBARS: store2d_point(current_plot, i++, v[0], v[1], v[0] - v[2], v[0] + v[2], v[1] - v[3], v[1] + v[3], 0.0); break; case BOXES: /* x, y, xmin, xmax */ store2d_point(current_plot, i++, v[0], v[1], v[2], v[3], v[1], v[1], 0.0); break; case XERRORLINES: case XERRORBARS: /* x, y, xmin, xmax */ store2d_point(current_plot, i++, v[0], v[1], v[2], v[3], v[1], v[1], 0.0); break; case BOXERROR: if (boxwidth == -2) /* x,y, ylow, yhigh --- width automatic */ store2d_point(current_plot, i++, v[0], v[1], v[0], v[0], v[2], v[3], -1.0); else /* x, y, dy, width */ store2d_point(current_plot, i++, v[0], v[1], v[0] - v[3] / 2, v[0] + v[3] / 2, v[1] - v[2], v[1] + v[2], 0.0); break; case BOXPLOT: /* x, y, width, factor */ /* Load the coords just as we would have for 3-argument boxplot, * index of factor in ylow , yhigh is the same as y */ store2d_point(current_plot, i++, v[0], v[1], v[0]-v[2]/2., v[0]+v[2]/2., check_or_add_boxplot_factor(current_plot, df_tokens[3], v[0]), v[1], v[2]); break; case VECTOR: /* x,y,dx,dy */ store2d_point(current_plot, i++, v[0], v[1], v[0], v[0] + v[2], v[1], v[1] + v[3], 0.); break; case POINTSTYLE: case LINESPOINTS: case LABELPOINTS: /* These are here only to catch the case where no using spec */ /* is given and there are more than 3 columns in the data file */ store2d_point(current_plot, i++, v[0], v[1], v[0], v[0], v[1], v[1], v[2]); break; #ifdef EAM_OBJECTS case ELLIPSES: /* x, y, major axis, minor axis, 0 as orientation */ store2d_point(current_plot, i++, v[0], v[1], fabs(v[2]), fabs(v[3]), 0.0, v[2], ((v[2] >= 0) && (v[3] >= 0)) ? 0.0 : DEFAULT_RADIUS); break; #endif } /*inner switch */ break; case 5: { /* x, y, ylow, yhigh, width or x open low high close */ switch (current_plot->plot_style) { default: int_warn(storetoken, "Unrecognized 5 column plot style; resetting to boxerrorbars"); current_plot->plot_style = BOXERROR; /*fall through */ case BOXERROR: /* x, y, ylow, yhigh, width */ store2d_point(current_plot, i++, v[0], v[1], v[0] - v[4] / 2, v[0] + v[4] / 2, v[2], v[3], 0.0); break; case FINANCEBARS: /* x yopen ylow yhigh yclose */ case CANDLESTICKS: store2d_point(current_plot, i++, v[0], v[1], v[0], v[0], v[2], v[3], v[4]); break; case VECTOR: /* x,y,dx,dy, variable arrowstyle */ store2d_point(current_plot, i++, v[0], v[1], v[0], v[0] + v[2], v[1], v[1] + v[3], v[4]); break; #ifdef EAM_OBJECTS case CIRCLES: /* x, y, radius, arc begin, arc end */ /* negative radius means default radius -> set flag in width */ store2d_point(current_plot, i++, v[0], v[1], v[0]-v[2], v[0]+v[2], v[3], v[4], (v[2] >= 0) ? 0.0 : DEFAULT_RADIUS); break; case ELLIPSES: /* x, y, major axis, minor axis, orientation */ store2d_point(current_plot, i++, v[0], v[1], fabs(v[2]), fabs(v[3]), v[4], v[2], ((v[2] >= 0) && (v[3] >= 0)) ? 0.0 : DEFAULT_RADIUS); break; #endif case RGBIMAGE: /* x_center y_center r_value g_value b_value (rgb) */ goto images; } /* inner switch */ break; } case 7: /* same as six columns. Width ignored */ /* eh ? - fall through */ case 6: /* x, y, xlow, xhigh, ylow, yhigh */ switch (current_plot->plot_style) { default: int_warn(storetoken, "This plot style does not work with 6 cols. Setting to xyerrorbars"); current_plot->plot_style = XYERRORBARS; /*fall through */ case XYERRORLINES: case XYERRORBARS: case BOXXYERROR: store2d_point(current_plot, i++, v[0], v[1], v[2], v[3], v[4], v[5], 0.0); break; case CANDLESTICKS: store2d_point(current_plot, i++, v[0], v[1], v[5] > 0 ? v[0]-v[5]/2. : v[0], v[0], v[2], v[3], v[4]); break; images: case RGBA_IMAGE: /* x_cent y_cent red green blue alpha */ case RGBIMAGE: /* x_cent y_cent red green blue */ store2d_point(current_plot, i, v[0], v[1], v[0], v[0], v[1], v[1], v[2]); /* We will autoscale the RGB components to a total range [0:255] * so we don't need to do any fancy scaling here. */ cp = &(current_plot->points[i]); cp->CRD_R = v[2]; cp->CRD_G = v[3]; cp->CRD_B = v[4]; cp->CRD_A = v[5]; /* Alpha channel */ i++; break; } } /*switch */ } /*while */ /* This removes extra point caused by blank lines after data. */ if (i>0 && current_plot->points[i-1].type == UNDEFINED) i--; current_plot->p_count = i; cp_extend(current_plot, i); /* shrink to fit */ /* Last chance to substitute input values for placeholders in plot title */ df_set_key_title(current_plot); df_close(); /* We are finished reading user input; return to C locale for internal use */ reset_numeric_locale(); return ngood; /* 0 indicates an 'empty' file */ } /* called by get_data for each point */ static void store2d_point( struct curve_points *current_plot, int i, /* point number */ double x, double y, double xlow, double xhigh, double ylow, double yhigh, double width) /* BOXES widths: -1 -> autocalc, 0 -> use xlow/xhigh */ { struct coordinate GPHUGE *cp = &(current_plot->points[i]); coord_type dummy_type = INRANGE; /* sometimes we dont care about outranging */ /* jev -- pass data values thru user-defined function */ /* div -- y is dummy variable 2 - copy value there */ if (ydata_func.at) { struct value val; (void) Gcomplex(&ydata_func.dummy_values[0], y, 0.0); ydata_func.dummy_values[2] = ydata_func.dummy_values[0]; evaluate_at(ydata_func.at, &val); y = undefined ? 0.0 : real(&val); /* EAM FIXME - filtering ylow and yhigh is nonsense for many plot styles */ (void) Gcomplex(&ydata_func.dummy_values[0], ylow, 0.0); ydata_func.dummy_values[2] = ydata_func.dummy_values[0]; evaluate_at(ydata_func.at, &val); ylow = undefined ? 0 : real(&val); (void) Gcomplex(&ydata_func.dummy_values[0], yhigh, 0.0); ydata_func.dummy_values[2] = ydata_func.dummy_values[0]; evaluate_at(ydata_func.at, &val); yhigh = undefined ? 0 : real(&val); } dummy_type = cp->type = INRANGE; if (polar) { double newx, newy; if (y < R_AXIS.data_min) R_AXIS.data_min = y; if (y < R_AXIS.min) { if (R_AXIS.autoscale & AUTOSCALE_MIN) R_AXIS.min = (y>0) ? 0 : y; } if (y > R_AXIS.data_max) R_AXIS.data_max = y; if (y > R_AXIS.max) { if (R_AXIS.autoscale & AUTOSCALE_MAX) { if (R_AXIS.max_constraint & CONSTRAINT_UPPER) { if (R_AXIS.max_ub >= y) R_AXIS.max = y; else R_AXIS.max = R_AXIS.max_ub; } else { R_AXIS.max = y; } } else { cp->type = OUTRANGE; } } if (R_AXIS.log) { if (R_AXIS.min <= 0 || R_AXIS.autoscale & AUTOSCALE_MIN) int_error(NO_CARET,"In log mode rrange must not include 0"); y = AXIS_DO_LOG(POLAR_AXIS,y) - AXIS_DO_LOG(POLAR_AXIS,R_AXIS.min); } else if (!(R_AXIS.autoscale & AUTOSCALE_MIN)) /* we store internally as if plotting r(t)-rmin */ y -= R_AXIS.min; newx = y * cos(x * ang2rad); newy = y * sin(x * ang2rad); y = newy; x = newx; /* Some plot styles use xhigh and yhigh for other quantities, */ /* which polar mode transforms would break */ if (current_plot->plot_style == CIRCLES) { double radius = (xhigh - xlow)/2.0; xlow = x - radius; xhigh = x + radius; } else { if (!(R_AXIS.autoscale & AUTOSCALE_MAX) && yhigh > R_AXIS.max) { cp->type = OUTRANGE; } if (R_AXIS.log) { yhigh = AXIS_DO_LOG(POLAR_AXIS,yhigh) - AXIS_DO_LOG(POLAR_AXIS,R_AXIS.min); } else if (!(R_AXIS.autoscale & AUTOSCALE_MIN)) { /* we store internally as if plotting r(t)-rmin */ yhigh -= R_AXIS.min; } newx = yhigh * cos(xhigh * ang2rad); newy = yhigh * sin(xhigh * ang2rad); yhigh = newy; xhigh = newx; if (!(R_AXIS.autoscale & AUTOSCALE_MAX) && ylow > R_AXIS.max) { cp->type = OUTRANGE; } if (R_AXIS.log) { ylow = AXIS_DO_LOG(POLAR_AXIS,ylow) - AXIS_DO_LOG(POLAR_AXIS,R_AXIS.min); } else if (!(R_AXIS.autoscale & AUTOSCALE_MIN)) { /* we store internally as if plotting r(t)-rmin */ ylow -= R_AXIS.min; } newx = ylow * cos(xlow * ang2rad); newy = ylow * sin(xlow * ang2rad); ylow = newy; xlow = newx; } } /* return immediately if x or y are undefined * we dont care if outrange for high/low. * BUT if high/low undefined (ie log( < 0 ), no number is stored. */ STORE_WITH_LOG_AND_UPDATE_RANGE(cp->x, x, cp->type, current_plot->x_axis, current_plot->noautoscale, NOOP, return); STORE_WITH_LOG_AND_UPDATE_RANGE(cp->y, y, cp->type, current_plot->y_axis, current_plot->noautoscale, NOOP, return); switch (current_plot->plot_style) { case POINTSTYLE: /* Only x and y are relevant to axis scaling */ case LINES: case LINESPOINTS: case LABELPOINTS: case DOTS: case IMPULSES: case STEPS: case FSTEPS: case HISTEPS: cp->xlow = xlow; cp->xhigh = xhigh; cp->ylow = ylow; cp->yhigh = yhigh; break; case BOXES: /* auto-scale to xlow xhigh */ cp->ylow = ylow; cp->yhigh = yhigh; STORE_WITH_LOG_AND_UPDATE_RANGE(cp->xlow, xlow, dummy_type, current_plot->x_axis, current_plot->noautoscale, NOOP, cp->xlow = -VERYLARGE); STORE_WITH_LOG_AND_UPDATE_RANGE(cp->xhigh, xhigh, dummy_type, current_plot->x_axis, current_plot->noautoscale, NOOP, cp->xhigh = -VERYLARGE); break; case BOXPLOT: /* auto-scale to xlow xhigh, yhigh = y needed for factors */ cp->ylow = ylow; STORE_WITH_LOG_AND_UPDATE_RANGE(cp->yhigh, yhigh, dummy_type, current_plot->y_axis, current_plot->noautoscale, NOOP, cp->yhigh = -VERYLARGE); STORE_WITH_LOG_AND_UPDATE_RANGE(cp->xlow, xlow, dummy_type, current_plot->x_axis, current_plot->noautoscale, NOOP, cp->xlow = -VERYLARGE); STORE_WITH_LOG_AND_UPDATE_RANGE(cp->xhigh, xhigh, dummy_type, current_plot->x_axis, current_plot->noautoscale, NOOP, cp->xhigh = -VERYLARGE); break; #ifdef EAM_OBJECTS case CIRCLES: cp->yhigh = yhigh; STORE_WITH_LOG_AND_UPDATE_RANGE(cp->xlow, xlow, dummy_type, current_plot->x_axis, current_plot->noautoscale, NOOP, cp->xlow = -VERYLARGE); STORE_WITH_LOG_AND_UPDATE_RANGE(cp->xhigh, xhigh, dummy_type, current_plot->x_axis, current_plot->noautoscale, NOOP, cp->xhigh = -VERYLARGE); cp->ylow = ylow; /* arc begin */ cp->xhigh = yhigh; /* arc end */ if (fabs(ylow) > 1000. || fabs(yhigh) > 1000.) /* safety check for insane arc angles */ cp->type = UNDEFINED; break; case ELLIPSES: /* We want to pass the parameters to the ellipse drawing routine as they are, * so we have to calculate the extent of the ellipses for autoscaling here. * Properly calculating the correct extent of a rotated ellipse, respecting * axis scales and all would be very hard. * So we just use the larger of the two axes, multiplied by some empirical factors * to ensure^Whope that all parts of the ellipses will be in the auto-scaled area. */ /* xlow = major axis, xhigh = minor axis, ylow = orientation */ #define YRANGE_FACTOR ((current_plot->ellipseaxes_units == ELLIPSEAXES_YY) ? 1.0 : 1.4) #define XRANGE_FACTOR ((current_plot->ellipseaxes_units == ELLIPSEAXES_XX) ? 1.1 : 1.0) STORE_WITH_LOG_AND_UPDATE_RANGE(cp->xlow, x-0.5*GPMAX(xlow, xhigh)*XRANGE_FACTOR, dummy_type, current_plot->x_axis, current_plot->noautoscale, NOOP, cp->xlow = -VERYLARGE); STORE_WITH_LOG_AND_UPDATE_RANGE(cp->xhigh, x+0.5*GPMAX(xlow, xhigh)*XRANGE_FACTOR, dummy_type, current_plot->x_axis, current_plot->noautoscale, NOOP, cp->xhigh = -VERYLARGE); STORE_WITH_LOG_AND_UPDATE_RANGE(cp->ylow, y-0.5*GPMAX(xlow, xhigh)*YRANGE_FACTOR, dummy_type, current_plot->y_axis, current_plot->noautoscale, NOOP, cp->ylow = -VERYLARGE); STORE_WITH_LOG_AND_UPDATE_RANGE(cp->yhigh, y+0.5*GPMAX(xlow, xhigh)*YRANGE_FACTOR, dummy_type, current_plot->y_axis, current_plot->noautoscale, NOOP, cp->yhigh = -VERYLARGE); /* So after updating the axes we re-store the parameters */ cp->xlow = xlow; /* major axis */ cp->xhigh = xhigh; /* minor axis */ cp->ylow = ylow; /* orientation */ break; #endif default: /* auto-scale to xlow xhigh ylow yhigh */ STORE_WITH_LOG_AND_UPDATE_RANGE(cp->xlow, xlow, dummy_type, current_plot->x_axis, current_plot->noautoscale, NOOP, cp->xlow = -VERYLARGE); STORE_WITH_LOG_AND_UPDATE_RANGE(cp->xhigh, xhigh, dummy_type, current_plot->x_axis, current_plot->noautoscale, NOOP, cp->xhigh = -VERYLARGE); STORE_WITH_LOG_AND_UPDATE_RANGE(cp->ylow, ylow, dummy_type, current_plot->y_axis, current_plot->noautoscale, NOOP, cp->ylow = -VERYLARGE); STORE_WITH_LOG_AND_UPDATE_RANGE(cp->yhigh, yhigh, dummy_type, current_plot->y_axis, current_plot->noautoscale, NOOP, cp->yhigh = -VERYLARGE); break; } /* HBB 20010214: if z is not used for some actual value, just * store 'width' to that axis and be done with it */ if ((int)current_plot->z_axis != NO_AXIS) STORE_WITH_LOG_AND_UPDATE_RANGE(cp->z, width, dummy_type, current_plot->z_axis, current_plot->noautoscale, NOOP, cp->z = -VERYLARGE); else cp->z = width; /* If we have variable color corresponding to a z-axis value, use it to autoscale */ /* June 2010 - New mechanism for variable color */ if (current_plot->lp_properties.pm3d_color.type == TC_Z && current_plot->varcolor) { STORE_WITH_LOG_AND_UPDATE_RANGE(current_plot->varcolor[i], current_plot->varcolor[i], dummy_type, COLOR_AXIS, current_plot->noautoscale, NOOP, NOOP); } } /* store2d_point */ /* Check if <string> is already among the known factors, if not, add it to the list */ static int check_or_add_boxplot_factor(struct curve_points *plot, char* string, double x) { int levels = plot->boxplot_factors; int len; char * trimmed_string; /* We abuse the labels structure to store the factors in their string forms */ struct text_label *label = plot->labels; /* This can happen if the user specifies a non-existent column: * fall back to single-boxplot mode */ if (!string) return 0; /* Remove the trailing garbage, quotes etc. from the string */ trimmed_string = df_parse_string_field(string); len = strlen(trimmed_string); while (label) { /* check if string is the same as the i-th factor */ if (label->text && !strncmp(trimmed_string, label->text, len)) { free(trimmed_string); return label->tag; /* found it, we return its index */ } label = label->next; } /* not found, so we add it now */ plot->boxplot_factors = levels + 1; store_label(plot->labels, &(plot->points[0]), levels, trimmed_string, 0.0); free(trimmed_string); return levels; } /* Add tic labels to the boxplots, * showing which level of the factor variable they represent */ static void add_tics_boxplot_factors(struct curve_points *plot) { AXIS_INDEX boxplot_labels_axis; text_label *this_label; int i = 0; boxplot_labels_axis = boxplot_opts.labels == BOXPLOT_FACTOR_LABELS_X ? FIRST_X_AXIS : boxplot_opts.labels == BOXPLOT_FACTOR_LABELS_X2 ? SECOND_X_AXIS : x_axis; this_label = plot->labels->next; if (!this_label) return; while (this_label) { add_tic_user( boxplot_labels_axis, this_label->text, plot->points->x + i * boxplot_opts.separation, -1); i++; this_label = this_label->next; } } /* Comparison function for alphabetical sorting of boxplot string factors below */ static int compare_boxplot_factors(SORTFUNC_ARGS arg1, SORTFUNC_ARGS arg2) { struct text_label * const *p1 = arg1; struct text_label * const *p2 = arg2; return strncmp((*p1)->text, (*p2)->text, 64); } /* Sort boxplot factors */ /* This is tricky. The discrete levels of the factor variable were assigned integers * in the order they were found in the file, and these numbers were written into the * plot->points structure. To change the order in which they will be plotted, * we have to sort the factor strings (which are stored in plot->labels), then * fill plot->boxplot_factor_order with the order we've found. This is essentially * a permutation of the sequence 0:N-1 where N is the number of levels the factor * variable has (plot->boxplot_factors). */ static void sort_boxplot_factors(struct curve_points *plot) { /* temporary array that holds the pointers for the nodes of the labels list */ text_label **temp_labels, *this_label; /* array that will hold the permutation of the levels */ int *permutation; int i; if (plot->boxplot_factors < 2 || !plot->labels || !plot->labels->next) return; temp_labels = gp_alloc(plot->boxplot_factors * sizeof(temp_labels), "boxplot labels array"); permutation = gp_alloc(plot->boxplot_factors * sizeof(int), "boxplot permutations array"); /* fill pointer array by walking the linked list */ /* the list should have exactly plot->boxplot_factors nodes, * plus the listhead which we leave alone. */ this_label = plot->labels->next; for (i=0; i<plot->boxplot_factors; i++) { temp_labels[i] = this_label; this_label = this_label->next; } /* sort pointer array */ qsort(temp_labels, plot->boxplot_factors, sizeof(text_label *), compare_boxplot_factors); /* read out the tags from the text_labels from the - now sorted - pointer array, * and write them into the permutation array in order */ for (i=0; i<plot->boxplot_factors; i++) { permutation[i] = temp_labels[i]->tag; } /* and also re-link the list in sorted order for the tics */ this_label = plot->labels->next = temp_labels[0]; for (i=0; i<plot->boxplot_factors-1; i++) { this_label->next = temp_labels[i+1]; this_label = this_label->next; } this_label->next = NULL; free(temp_labels); plot->boxplot_factor_order = permutation; } /* Autoscaling of box plots cuts off half of the box on each end. */ /* Add a half-boxwidth to the range in this case. EAM Aug 2007 */ static void box_range_fiddling(struct curve_points *plot) { double xlow, xhigh; int i = plot->p_count - 1; if (i == 0) return; if (axis_array[plot->x_axis].autoscale & AUTOSCALE_MIN) { if (plot->points[0].type != UNDEFINED && plot->points[1].type != UNDEFINED) { xlow = plot->points[0].x - (plot->points[1].x - plot->points[0].x) / 2.; xlow = AXIS_DE_LOG_VALUE(plot->x_axis, xlow); if (axis_array[plot->x_axis].min > xlow) axis_array[plot->x_axis].min = xlow; } } if (axis_array[plot->x_axis].autoscale & AUTOSCALE_MAX) { if (plot->points[i].type != UNDEFINED && plot->points[i-1].type != UNDEFINED) { xhigh = plot->points[i].x + (plot->points[i].x - plot->points[i-1].x) / 2.; xhigh = AXIS_DE_LOG_VALUE(plot->x_axis, xhigh); if (axis_array[plot->x_axis].max < xhigh) axis_array[plot->x_axis].max = xhigh; } } } /* Autoscaling of boxplots with no explicit width cuts off the outer edges of the box */ static void boxplot_range_fiddling(struct curve_points *plot) { double extra_width; /* Sort the points and removed any that are undefined */ int N = filter_boxplot(plot); if (plot->points[0].type == UNDEFINED) int_error(NO_CARET,"boxplot has undefined x coordinate"); extra_width = plot->points[0].xhigh - plot->points[0].xlow; if (extra_width == 0) extra_width = (boxwidth > 0 && boxwidth_is_absolute) ? boxwidth : 0.5; if (extra_width < 0) extra_width = -extra_width; if (axis_array[plot->x_axis].autoscale & AUTOSCALE_MIN) { if (axis_array[plot->x_axis].min >= plot->points[0].x) axis_array[plot->x_axis].min -= 1.5 * extra_width; else if (axis_array[plot->x_axis].min >= plot->points[0].x - extra_width) axis_array[plot->x_axis].min -= 1 * extra_width; } if (axis_array[plot->x_axis].autoscale & AUTOSCALE_MAX) { if (axis_array[plot->x_axis].max <= plot->points[N-1].x) axis_array[plot->x_axis].max += 1.5 * extra_width; else if (axis_array[plot->x_axis].max <= plot->points[N-1].x + extra_width) axis_array[plot->x_axis].max += 1 * extra_width; if (plot->boxplot_factors > 1) { axis_array[plot->x_axis].max += (plot->boxplot_factors - 1) * boxplot_opts.separation; } } } /* Since the stored x values for histogrammed data do not correspond exactly */ /* to the eventual x coordinates, we need to modify the x axis range bounds. */ /* Also the two stacked histogram modes need adjustment of the y axis bounds.*/ static void histogram_range_fiddling(struct curve_points *plot) { double xlow, xhigh; int i; /* * EAM FIXME - HT_STACKED_IN_TOWERS forcibly resets xmin, which is only * correct if no other plot came first. */ switch (histogram_opts.type) { case HT_STACKED_IN_LAYERS: if (axis_array[plot->y_axis].autoscale & AUTOSCALE_MAX) { if (plot->histogram_sequence == 0) { if (stackheight) free(stackheight); stackheight = gp_alloc( plot->p_count * sizeof(struct coordinate GPHUGE), "stackheight array"); for (stack_count=0; stack_count < plot->p_count; stack_count++) { stackheight[stack_count].yhigh = 0; stackheight[stack_count].ylow = 0; } } else if (plot->p_count > stack_count) { stackheight = gp_realloc( stackheight, plot->p_count * sizeof(struct coordinate GPHUGE), "stackheight array"); for ( ; stack_count < plot->p_count; stack_count++) { stackheight[stack_count].yhigh = 0; stackheight[stack_count].ylow = 0; } } for (i=0; i<stack_count; i++) { if (plot->points[i].type == UNDEFINED) continue; if (plot->points[i].y >= 0) stackheight[i].yhigh += plot->points[i].y; else stackheight[i].ylow += plot->points[i].y; if (axis_array[plot->y_axis].max < stackheight[i].yhigh) axis_array[plot->y_axis].max = stackheight[i].yhigh; if (axis_array[plot->y_axis].min > stackheight[i].ylow) axis_array[plot->y_axis].min = stackheight[i].ylow; } } /* fall through to checks on x range */ case HT_CLUSTERED: case HT_ERRORBARS: if (!axis_array[FIRST_X_AXIS].autoscale) break; if (axis_array[FIRST_X_AXIS].autoscale & AUTOSCALE_MIN) { xlow = plot->histogram->start - 1.0; if (axis_array[FIRST_X_AXIS].min > xlow) axis_array[FIRST_X_AXIS].min = xlow; } if (axis_array[FIRST_X_AXIS].autoscale & AUTOSCALE_MAX) { /* FIXME - why did we increment p_count on UNDEFINED points? */ while (plot->points[plot->p_count-1].type == UNDEFINED) { plot->p_count--; if (!plot->p_count) int_error(NO_CARET,"All points in histogram UNDEFINED"); } xhigh = plot->points[plot->p_count-1].x; xhigh += plot->histogram->start + 1.0; if (axis_array[FIRST_X_AXIS].max < xhigh) axis_array[FIRST_X_AXIS].max = xhigh; } break; case HT_STACKED_IN_TOWERS: /* FIXME: Rather than trying to reproduce the layout along X */ /* we should just track the actual xmin/xmax as we go. */ if (axis_array[FIRST_X_AXIS].set_autoscale) { xlow = -1.0; xhigh = plot->histogram_sequence; xhigh += plot->histogram->start + 1.0; if (axis_array[FIRST_X_AXIS].min > xlow) axis_array[FIRST_X_AXIS].min = xlow; if (axis_array[FIRST_X_AXIS].max != xhigh) axis_array[FIRST_X_AXIS].max = xhigh; } if (axis_array[FIRST_Y_AXIS].set_autoscale) { double ylow, yhigh; for (i=0, yhigh=ylow=0.0; i<plot->p_count; i++) if (plot->points[i].type != UNDEFINED) { if (plot->points[i].y >= 0) yhigh += plot->points[i].y; else ylow += plot->points[i].y; } if (axis_array[FIRST_Y_AXIS].set_autoscale & AUTOSCALE_MAX) if (axis_array[plot->y_axis].max < yhigh) axis_array[plot->y_axis].max = yhigh; if (axis_array[FIRST_Y_AXIS].set_autoscale & AUTOSCALE_MIN) if (axis_array[plot->y_axis].min > ylow) axis_array[plot->y_axis].min = ylow; } break; } } /* If the plot is in polar coordinates and the r axis range is autoscaled, * we need to apply the maximum radius found to both x and y. * Otherwise the autoscaling with be done separately for x and y and the * resulting plot will not be centered at the origin. */ void polar_range_fiddling(struct curve_points *plot) { if (axis_array[POLAR_AXIS].set_autoscale & AUTOSCALE_MAX) { double plotmax = GPMAX(axis_array[plot->x_axis].max, -axis_array[plot->x_axis].min); if ((axis_array[plot->x_axis].set_autoscale & AUTOSCALE_BOTH) == AUTOSCALE_BOTH) { axis_array[plot->x_axis].max = plotmax; axis_array[plot->x_axis].min = -plotmax; } if ((axis_array[plot->y_axis].set_autoscale & AUTOSCALE_BOTH) == AUTOSCALE_BOTH) { axis_array[plot->y_axis].max = plotmax; axis_array[plot->y_axis].min = -plotmax; } } } /* store_label() is called by get_data for each point */ /* This routine is exported so it can be shared by plot3d */ void store_label( struct text_label *listhead, struct coordinate *cp, int i, /* point number */ char *string, /* start of label string */ double colorval) /* used if text color derived from palette */ { struct text_label *tl = listhead; int textlen; /* Walk through list to get to the end. Yes I know this is inefficient */ /* but is anyone really going to plot so many labels that it matters? */ if (!tl) int_error(NO_CARET,"text_label list was not initialized"); while (tl->next) tl = tl->next; /* Allocate a new label structure and fill it in */ tl->next = gp_alloc(sizeof(struct text_label),"labelpoint label"); memcpy(tl->next,tl,sizeof(text_label)); tl = tl->next; tl->next = (text_label *)NULL; tl->tag = i; tl->place.x = cp->x; tl->place.y = cp->y; tl->place.z = cp->z; /* Check for optional (textcolor palette ...) */ if (tl->textcolor.type == TC_Z) tl->textcolor.value = colorval; /* Check for optional (textcolor rgb variable) */ else if (listhead->textcolor.type == TC_RGB && listhead->textcolor.value < 0) tl->textcolor.lt = colorval; /* Check for optional (textcolor variable) */ else if (listhead->textcolor.type == TC_VARIABLE) { struct lp_style_type lptmp; if (prefer_line_styles) lp_use_properties(&lptmp, (int)colorval); else load_linetype(&lptmp, (int)colorval); tl->textcolor = lptmp.pm3d_color; } if (listhead->lp_properties.pointflag > 0) { /* Check for optional (point linecolor palette ...) */ if (tl->lp_properties.pm3d_color.type == TC_Z) tl->lp_properties.pm3d_color.value = colorval; /* Check for optional (point linecolor rgb variable) */ else if (listhead->lp_properties.pm3d_color.type == TC_RGB && listhead->lp_properties.pm3d_color.value < 0) tl->lp_properties.pm3d_color.lt = colorval; /* Check for optional (point linecolor variable) */ else if (listhead->lp_properties.l_type == LT_COLORFROMCOLUMN) { struct lp_style_type lptmp; if (prefer_line_styles) lp_use_properties(&lptmp, (int)colorval); else load_linetype(&lptmp, (int)colorval); tl->lp_properties.pm3d_color = lptmp.pm3d_color; } } /* Check for null string (no label) */ if (!string) string = ""; textlen = 0; /* FIXME EAM - this code is ugly but seems to work */ /* We need to handle quoted separators and quoted quotes */ if (df_separator) { TBOOLEAN in_quote = FALSE; while (string[textlen]) { if (string[textlen] == '"') in_quote = !in_quote; else if (string[textlen] == df_separator && !in_quote) break; textlen++; } while (textlen > 0 && isspace(string[textlen-1])) textlen--; } else { /* This is the normal case (no special separator character) */ if (*string == '"') { for (textlen=1; string[textlen] && string[textlen] != '"'; textlen++); } while (string[textlen] && !isspace(string[textlen])) textlen++; } /* Strip double quote from both ends */ if (string[0] == '"' && string[textlen-1] == '"') textlen -= 2, string++; tl->text = gp_alloc(textlen+1,"labelpoint text"); strncpy( tl->text, string, textlen ); tl->text[textlen] = '\0'; parse_esc(tl->text); FPRINTF((stderr,"LABELPOINT %f %f \"%s\" \n", tl->place.x, tl->place.y, tl->text)); } /* HBB 20010610: mnemonic names for the bits stored in 'uses_axis' */ typedef enum e_uses_axis { USES_AXIS_FOR_DATA = 1, USES_AXIS_FOR_FUNC = 2 } t_uses_axis; /* * This parses the plot command after any range specifications. To support * autoscaling on the x axis, we want any data files to define the x range, * then to plot any functions using that range. We thus parse the input * twice, once to pick up the data files, and again to pick up the functions. * Definitions are processed twice, but that won't hurt. * div - okay, it doesn't hurt, but every time an option as added for * datafiles, code to parse it has to be added here. Change so that * we store starting-token in the plot structure. */ static void eval_plots() { int i; struct curve_points *this_plot, **tp_ptr; t_uses_axis uses_axis[AXIS_ARRAY_SIZE]; int some_functions = 0; int plot_num, line_num, point_num; TBOOLEAN in_parametric = FALSE; TBOOLEAN was_definition = FALSE; int pattern_num; char *xtitle = NULL; int begin_token = c_token; /* so we can rewind for second pass */ int start_token=0, end_token; legend_key *key = &keyT; double newhist_start = 0.0; int histogram_sequence = -1; int newhist_color = 1; int newhist_pattern = LT_UNDEFINED; histogram_rightmost = 0.0; free_histlist(&histogram_opts); init_histogram(NULL,NULL); uses_axis[FIRST_X_AXIS] = uses_axis[FIRST_Y_AXIS] = uses_axis[SECOND_X_AXIS] = uses_axis[SECOND_Y_AXIS] = 0; /* Original Comment follows: */ /* Reset first_plot. This is usually done at the end of this function. * If there is an error within this function, the memory is left allocated, * since we cannot call cp_free if the list is incomplete. Making sure that * the list structure is always valid requires some rewriting */ /* EAM Apr 2007 - but we need to keep the previous structures around in * order to be able to refresh/zoom them without re-reading all the data. */ if (first_plot) cp_free(first_plot); first_plot = NULL; tp_ptr = &(first_plot); plot_num = 0; line_num = 0; /* default line type */ point_num = 0; /* default point type */ pattern_num = default_fillstyle.fillpattern; /* default fill pattern */ xtitle = NULL; /* Assume that the input data can be re-read later */ volatile_data = FALSE; /* ** First Pass: Read through data files *** * This pass serves to set the xrange and to parse the command, as well * as filling in every thing except the function data. That is done after * the xrange is defined. */ plot_iterator = check_for_iteration(); while (TRUE) { /* Forgive trailing comma on a multi-element plot command */ if (END_OF_COMMAND) { if (plot_num == 0) int_error(c_token, "function to plot expected"); break; } this_plot = NULL; if (!in_parametric && !was_definition) start_token = c_token; if (almost_equals(c_token,"newhist$ogram")) { struct lp_style_type lp = DEFAULT_LP_STYLE_TYPE; struct fill_style_type fs; int previous_token; c_token++; histogram_sequence = -1; free(histogram_title); histogram_title = NULL; if (histogram_rightmost > 0) newhist_start = histogram_rightmost + 2; lp.l_type = line_num; newhist_color = lp.l_type + 1; fs.fillpattern = LT_UNDEFINED; do { previous_token = c_token; if (equals(c_token,"at")) { c_token++; newhist_start = real_expression(); } /* Store title in temporary variable and then copy into the */ /* new histogram structure when it is allocated. */ if (!histogram_title && isstringvalue(c_token)) histogram_title = try_to_get_string(); /* Allow explicit starting color or pattern for this histogram */ if (equals(c_token,"lt") || almost_equals(c_token,"linet$ype")) { c_token++; newhist_color = int_expression(); } parse_fillstyle(&fs, FS_SOLID, 100, fs.fillpattern, default_fillstyle.border_color); } while (c_token != previous_token); newhist_pattern = fs.fillpattern; if (!equals(c_token,",")) int_error(c_token,"syntax error"); } else if (is_definition(c_token)) { define(); if (!equals(c_token,",")) { was_definition = TRUE; continue; } } else { int specs = 0; /* for datafile plot, record datafile spec for title */ char* name_str; TBOOLEAN duplication = FALSE; TBOOLEAN set_smooth = FALSE, set_axes = FALSE, set_title = FALSE; TBOOLEAN set_with = FALSE, set_lpstyle = FALSE; TBOOLEAN set_fillstyle = FALSE; TBOOLEAN set_labelstyle = FALSE; #ifdef EAM_OBJECTS TBOOLEAN set_ellipseaxes_units = FALSE; #endif plot_num++; was_definition = FALSE; dummy_func = &plot_func; /* should this be saved in "this_plot"? */ name_str = string_or_express(NULL); dummy_func = NULL; if (name_str) { /* data file to plot */ if (parametric && in_parametric) int_error(c_token, "previous parametric function not fully specified"); if (*tp_ptr) this_plot = *tp_ptr; else { /* no memory malloc()'d there yet */ this_plot = cp_alloc(MIN_CRV_POINTS); *tp_ptr = this_plot; } this_plot->plot_type = DATA; this_plot->plot_style = data_style; this_plot->plot_smooth = SMOOTH_NONE; this_plot->filledcurves_options.opt_given = 0; /* default no palette */ this_plot->lp_properties.use_palette = 0; /* up to MAXDATACOLS cols */ df_set_plot_mode(MODE_PLOT); /* Needed for binary datafiles */ specs = df_open(name_str, MAXDATACOLS, this_plot); /* include modifiers in default title */ this_plot->token = end_token = c_token - 1; } else { /* function to plot */ some_functions = 1; if (parametric) /* working on x parametric function */ in_parametric = !in_parametric; if (*tp_ptr) { this_plot = *tp_ptr; cp_extend(this_plot, samples_1 + 1); } else { /* no memory malloc()'d there yet */ this_plot = cp_alloc(samples_1 + 1); *tp_ptr = this_plot; } this_plot->plot_type = FUNC; this_plot->plot_style = func_style; this_plot->filledcurves_options.opt_given = 0; /* default no palette */ this_plot->lp_properties.use_palette = 0; end_token = c_token - 1; } /* end of IS THIS A FILE OR A FUNC block */ /* axis defaults */ x_axis = FIRST_X_AXIS; y_axis = FIRST_Y_AXIS; /* pm 25.11.2001 allow any order of options */ while (!END_OF_COMMAND) { /* deal with smooth */ if (almost_equals(c_token, "s$mooth")) { int found_token; if (set_smooth) { duplication=TRUE; break; } found_token = lookup_table(plot_smooth_tbl, ++c_token); switch(found_token) { case SMOOTH_ACSPLINES: case SMOOTH_BEZIER: case SMOOTH_CSPLINES: case SMOOTH_SBEZIER: case SMOOTH_UNIQUE: case SMOOTH_FREQUENCY: case SMOOTH_CUMULATIVE: case SMOOTH_KDENSITY: case SMOOTH_CUMULATIVE_NORMALISED: this_plot->plot_smooth = found_token; break; case SMOOTH_NONE: default: int_error(c_token, "expecting 'unique', 'frequency', 'cumulative', 'cnormal', 'kdensity', 'acsplines', 'csplines', 'bezier' or 'sbezier'"); break; } this_plot->plot_style = LINES; c_token++; /* skip format */ set_smooth = TRUE; continue; } /* look for axes/axis */ if (almost_equals(c_token, "ax$es") || almost_equals(c_token, "ax$is")) { if (set_axes) { duplication=TRUE; break; } if (parametric && in_parametric) int_error(c_token, "previous parametric function not fully specified"); c_token++; switch(lookup_table(&plot_axes_tbl[0],c_token)) { case AXES_X1Y1: x_axis = FIRST_X_AXIS; y_axis = FIRST_Y_AXIS; ++c_token; break; case AXES_X2Y2: x_axis = SECOND_X_AXIS; y_axis = SECOND_Y_AXIS; ++c_token; break; case AXES_X1Y2: x_axis = FIRST_X_AXIS; y_axis = SECOND_Y_AXIS; ++c_token; break; case AXES_X2Y1: x_axis = SECOND_X_AXIS; y_axis = FIRST_Y_AXIS; ++c_token; break; case AXES_NONE: default: int_error(c_token, "axes must be x1y1, x1y2, x2y1 or x2y2"); break; } set_axes = TRUE; continue; } /* deal with title */ if (almost_equals(c_token, "t$itle")) { if (set_title) { duplication=TRUE; break; } this_plot->title_no_enhanced = !key->enhanced; /* title can be enhanced if not explicitly disabled */ if (parametric) { if (in_parametric) int_error(c_token, "\"title\" allowed only after parametric function fully specified"); else if (xtitle != NULL) xtitle[0] = '\0'; /* Remove default title . */ } c_token++; /* This ugliness is because columnheader can be either a keyword */ /* or a function name. Yes, the design could have been better. */ if (almost_equals(c_token,"col$umnheader") && !(equals(c_token,"columnhead") && equals(c_token+1,"(")) ) { df_set_key_title_columnhead(this_plot); } else { evaluate_inside_using = TRUE; if (!(this_plot->title = try_to_get_string())) int_error(c_token, "expecting \"title\" for plot"); evaluate_inside_using = FALSE; } set_title = TRUE; continue; } if (almost_equals(c_token, "not$itle")) { if (set_title) { duplication=TRUE; break; } c_token++; if (isstringvalue(c_token)) try_to_get_string(); /* ignore optionally given title string */ this_plot->title_is_suppressed = TRUE; if (xtitle != NULL) xtitle[0] = '\0'; set_title = TRUE; continue; } /* deal with style */ if (almost_equals(c_token, "w$ith")) { if (set_with) { duplication=TRUE; break; } if (parametric && in_parametric) int_error(c_token, "\"with\" allowed only after parametric function fully specified"); this_plot->plot_style = get_style(); 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_style == IMAGE || this_plot->plot_style == RGBIMAGE || this_plot->plot_style == RGBA_IMAGE) get_image_options(&this_plot->image_properties); if ((this_plot->plot_type == FUNC) && ((this_plot->plot_style & PLOT_STYLE_HAS_ERRORBAR) || (this_plot->plot_style == LABELPOINTS) )) { int_warn(c_token, "This plot style is only for datafiles, reverting to \"points\""); this_plot->plot_style = POINTSTYLE; } set_with = TRUE; continue; } /* pick up line/point specs and other style-specific keywords * - point spec allowed if style uses points, ie style&2 != 0 * - keywords for lt and pt are optional */ if (this_plot->plot_style == CANDLESTICKS) { if (almost_equals(c_token,"whisker$bars")) { this_plot->arrow_properties.head = BOTH_HEADS; c_token++; if (isanumber(c_token) || type_udv(c_token) == INTGR || type_udv(c_token) == CMPLX) this_plot->arrow_properties.head_length = real_expression(); } } if (this_plot->plot_style == VECTOR) { int stored_token = c_token; if (!set_lpstyle) { default_arrow_style(&(this_plot->arrow_properties)); if (prefer_line_styles) lp_use_properties(&(this_plot->arrow_properties.lp_properties), line_num+1); else load_linetype(&(this_plot->arrow_properties.lp_properties), line_num+1); } arrow_parse(&(this_plot->arrow_properties), TRUE); if (stored_token != c_token) { if (set_lpstyle) { duplication=TRUE; break; } else { set_lpstyle = TRUE; continue; } } } #ifdef EAM_OBJECTS /* pick up the special 'units' keyword the 'ellipses' style allows */ if (this_plot->plot_style == ELLIPSES) { int stored_token = c_token; if (!set_ellipseaxes_units) this_plot->ellipseaxes_units = default_ellipse.o.ellipse.type; if (almost_equals(c_token,"unit$s")) { c_token++; if (equals(c_token,"xy")) { this_plot->ellipseaxes_units = ELLIPSEAXES_XY; } else if (equals(c_token,"xx")) { this_plot->ellipseaxes_units = ELLIPSEAXES_XX; } else if (equals(c_token,"yy")) { this_plot->ellipseaxes_units = ELLIPSEAXES_YY; } else { int_error(c_token, "expecting 'xy', 'xx' or 'yy'" ); } c_token++; } if (stored_token != c_token) { if (set_ellipseaxes_units) { duplication=TRUE; break; } else { set_ellipseaxes_units = TRUE; continue; } } } #endif /* Labels can have font and text property info as plot options */ /* In any case we must allocate one instance of the text style */ /* that all labels in the plot will share. */ if (this_plot->plot_style == LABELPOINTS) { int stored_token = c_token; if (this_plot->labels == NULL) { this_plot->labels = new_text_label(-1); this_plot->labels->pos = CENTRE; this_plot->labels->layer = LAYER_PLOTLABELS; } parse_label_options(this_plot->labels); if (stored_token != c_token) { if (set_labelstyle) { duplication = TRUE; break; } else { set_labelstyle = TRUE; continue; } } } else { int stored_token = c_token; struct lp_style_type lp = DEFAULT_LP_STYLE_TYPE; lp.l_type = line_num; lp.p_type = point_num; /* user may prefer explicit line styles */ if (prefer_line_styles) lp_use_properties(&lp, line_num+1); else load_linetype(&lp, line_num+1); if (this_plot->plot_style == BOXPLOT) lp.p_type = boxplot_opts.pointtype; lp_parse(&lp, TRUE, this_plot->plot_style & PLOT_STYLE_HAS_POINT); if (stored_token != c_token) { if (set_lpstyle) { duplication=TRUE; break; } else { this_plot->lp_properties = lp; set_lpstyle = TRUE; continue; } } } /* Some plots have a fill style as well */ if (this_plot->plot_style & PLOT_STYLE_HAS_FILL){ int stored_token = c_token; if (equals(c_token,"fs") || almost_equals(c_token,"fill$style")) { parse_fillstyle(&this_plot->fill_properties, default_fillstyle.fillstyle, default_fillstyle.filldensity, pattern_num, default_fillstyle.border_color); if (this_plot->plot_style == FILLEDCURVES && this_plot->fill_properties.fillstyle == FS_EMPTY) this_plot->fill_properties.fillstyle = FS_SOLID; set_fillstyle = TRUE; } if (equals(c_token,"fc") || almost_equals(c_token,"fillc$olor")) { struct lp_style_type lptmp; lp_parse(&lptmp, FALSE, FALSE); this_plot->lp_properties.pm3d_color = lptmp.pm3d_color; this_plot->lp_properties.use_palette = TRUE; set_lpstyle = TRUE; } if (stored_token != c_token) continue; } break; /* unknown option */ } /* while (!END_OF_COMMAND) */ if (duplication) int_error(c_token, "duplicated or contradicting arguments in plot options"); /* set default values for title if this has not been specified */ this_plot->title_is_filename = FALSE; if (!set_title) { this_plot->title_no_enhanced = TRUE; /* filename or function cannot be enhanced */ if (key->auto_titles == FILENAME_KEYTITLES) { m_capture(&(this_plot->title), start_token, end_token); if (in_parametric) xtitle = this_plot->title; this_plot->title_is_filename = TRUE; } else if (xtitle != NULL) xtitle[0] = '\0'; } /* Vectors will be drawn using linetype from arrow style, so we * copy this to overall plot linetype so that the key sample matches */ if (this_plot->plot_style == VECTOR) { if (!set_lpstyle) { if (prefer_line_styles) lp_use_properties(&(this_plot->arrow_properties.lp_properties), line_num+1); else load_linetype(&(this_plot->arrow_properties.lp_properties), line_num+1); arrow_parse(&this_plot->arrow_properties, TRUE); } this_plot->lp_properties = this_plot->arrow_properties.lp_properties; set_lpstyle = TRUE; } /* No line/point style given. As lp_parse also supplies * the defaults for linewidth and pointsize, call it now * to define them. */ if (! set_lpstyle) { this_plot->lp_properties.l_type = line_num; this_plot->lp_properties.l_width = 1.0; this_plot->lp_properties.p_type = point_num; this_plot->lp_properties.p_size = pointsize; this_plot->lp_properties.use_palette = 0; /* user may prefer explicit line styles */ if (prefer_line_styles) lp_use_properties(&this_plot->lp_properties, line_num+1); else load_linetype(&this_plot->lp_properties, line_num+1); if (this_plot->plot_style == BOXPLOT) this_plot->lp_properties.p_type = boxplot_opts.pointtype; lp_parse(&this_plot->lp_properties, TRUE, this_plot->plot_style & PLOT_STYLE_HAS_POINT); #ifdef BACKWARDS_COMPATIBLE /* allow old-style syntax - ignore case lt 3 4 for example */ if (!END_OF_COMMAND && isanumber(c_token)) { this_plot->lp_properties.l_type = this_plot->lp_properties.p_type = int_expression() - 1; if (isanumber(c_token)) this_plot->lp_properties.p_type = int_expression() - 1; } #endif /* BACKWARDS_COMPATIBLE */ } /* Some low-level routines expect to find the pointflag attribute */ /* in lp_properties (they don't have access to the full header. */ if (this_plot->plot_style & PLOT_STYLE_HAS_POINT) this_plot->lp_properties.pointflag = TRUE; /* Rule out incompatible line/point/style options */ if (this_plot->plot_type == FUNC) { if ((this_plot->plot_style & PLOT_STYLE_HAS_POINT) && (this_plot->lp_properties.p_size == PTSZ_VARIABLE)) this_plot->lp_properties.p_size = 1; } if (polar) switch (this_plot->plot_style) { case LINES: case POINTSTYLE: case IMPULSES: case LINESPOINTS: case DOTS: case VECTOR: case FILLEDCURVES: case LABELPOINTS: case CIRCLES: case YERRORBARS: case YERRORLINES: break; default: int_error(NO_CARET, "This plot style is not available in polar mode"); } /* If we got this far without initializing the fill style, do it now */ if (this_plot->plot_style & PLOT_STYLE_HAS_FILL) { if (!set_fillstyle) parse_fillstyle(&this_plot->fill_properties, default_fillstyle.fillstyle, default_fillstyle.filldensity, pattern_num, default_fillstyle.border_color); if ((this_plot->fill_properties.fillstyle == FS_PATTERN) ||(this_plot->fill_properties.fillstyle == FS_TRANSPARENT_PATTERN)) pattern_num = this_plot->fill_properties.fillpattern + 1; if (this_plot->plot_style == FILLEDCURVES && this_plot->fill_properties.fillstyle == FS_EMPTY) this_plot->fill_properties.fillstyle = FS_SOLID; } this_plot->x_axis = x_axis; this_plot->y_axis = y_axis; /* If we got this far without initializing the label list, do it now */ if (this_plot->plot_style == LABELPOINTS) { if (this_plot->labels == NULL) { this_plot->labels = new_text_label(-1); this_plot->labels->pos = CENTRE; this_plot->labels->layer = LAYER_PLOTLABELS; } this_plot->labels->place.scalex = (x_axis == SECOND_X_AXIS) ? second_axes : first_axes; this_plot->labels->place.scaley = (y_axis == SECOND_Y_AXIS) ? second_axes : first_axes; /* Needed for variable color - June 2010 */ this_plot->lp_properties.pm3d_color = this_plot->labels->textcolor; if (this_plot->labels->textcolor.type == TC_VARIABLE) this_plot->lp_properties.l_type = LT_COLORFROMCOLUMN; /* We want to trigger the variable color mechanism even if * there was no 'textcolor variable/palette/rgb var' , * but there was a 'point linecolor variable/palette/rgb var'. */ if (this_plot->labels->lp_properties.pointflag > 0 && this_plot->labels->textcolor.type != TC_Z && this_plot->labels->textcolor.type != TC_VARIABLE && (this_plot->labels->textcolor.type != TC_RGB || this_plot->labels->textcolor.value >= 0)) { if ((this_plot->labels->lp_properties.pm3d_color.type == TC_RGB) && (this_plot->labels->lp_properties.pm3d_color.value < 0)) { this_plot->lp_properties.pm3d_color = this_plot->labels->lp_properties.pm3d_color; } if (this_plot->labels->lp_properties.pm3d_color.type == TC_Z) this_plot->lp_properties.pm3d_color.type = TC_Z; if (this_plot->labels->lp_properties.l_type == LT_COLORFROMCOLUMN) this_plot->lp_properties.l_type = LT_COLORFROMCOLUMN; } } /* Initialize the label list in case the BOXPLOT style needs it to store factors */ if (this_plot->plot_style == BOXPLOT) { if (this_plot->labels == NULL) this_plot->labels = new_text_label(-1); /* We only use the list to store strings, so this is all we need here. */ } /* Initialize histogram data structure */ if (this_plot->plot_style == HISTOGRAMS) { if (axis_array[x_axis].log) int_error(c_token, "Log scale on X is incompatible with histogram plots\n"); if ((histogram_opts.type == HT_STACKED_IN_LAYERS || histogram_opts.type == HT_STACKED_IN_TOWERS) && axis_array[y_axis].log) int_error(c_token, "Log scale on Y is incompatible with stacked histogram plot\n"); this_plot->histogram_sequence = ++histogram_sequence; /* Current histogram always goes at the front of the list */ if (this_plot->histogram_sequence == 0) { this_plot->histogram = gp_alloc(sizeof(struct histogram_style), "New histogram"); init_histogram(this_plot->histogram,histogram_title); histogram_title = NULL; this_plot->histogram->start = newhist_start; this_plot->histogram->startcolor = newhist_color; this_plot->histogram->startpattern = newhist_pattern; } else { this_plot->histogram = histogram_opts.next; this_plot->histogram->clustersize++; } /* Normally each histogram gets a new set of colors, but in */ /* 'newhistogram' you can force a starting color instead. */ if (!set_lpstyle && this_plot->histogram->startcolor != LT_UNDEFINED) load_linetype(&this_plot->lp_properties, this_plot->histogram_sequence + this_plot->histogram->startcolor); if (this_plot->histogram->startpattern != LT_UNDEFINED) this_plot->fill_properties.fillpattern = this_plot->histogram_sequence + this_plot->histogram->startpattern; } /* Styles that use palette */ if (this_plot->plot_style == IMAGE) this_plot->lp_properties.use_palette = 1; /* we can now do some checks that we deferred earlier */ if (this_plot->plot_type == DATA) { if (specs < 0) { /* Error check to handle missing or unreadable file */ if (this_plot->plot_style & PLOT_STYLE_HAS_POINT) ++point_num; ++line_num; this_plot->plot_type = NODATA; goto SKIPPED_EMPTY_FILE; } if (! (uses_axis[x_axis] & USES_AXIS_FOR_DATA) && X_AXIS.autoscale) { if (X_AXIS.autoscale & AUTOSCALE_MIN) X_AXIS.min = VERYLARGE; if (X_AXIS.autoscale & AUTOSCALE_MAX) X_AXIS.max = -VERYLARGE; } if (X_AXIS.datatype == DT_TIMEDATE) { if (specs < 2) int_error(c_token, "Need full using spec for x time data"); } if (Y_AXIS.datatype == DT_TIMEDATE) { if (specs < 1) int_error(c_token, "Need using spec for y time data"); } /* need other cols, but I'm lazy */ df_axis[0] = x_axis; df_axis[1] = y_axis; /* separate record of datafile and func */ uses_axis[x_axis] |= USES_AXIS_FOR_DATA; uses_axis[y_axis] |= USES_AXIS_FOR_DATA; } else if (!parametric || !in_parametric) { /* for x part of a parametric function, axes are * possibly wrong */ /* separate record of data and func */ uses_axis[x_axis] |= USES_AXIS_FOR_FUNC; uses_axis[y_axis] |= USES_AXIS_FOR_FUNC; } if (!in_parametric && this_plot->plot_style != IMAGE && this_plot->plot_style != RGBIMAGE && this_plot->plot_style != RGBA_IMAGE /* don't increment the default line/point properties if * this_plot is an image */ ) { if (this_plot->plot_style & PLOT_STYLE_HAS_POINT) ++point_num; ++line_num; } if (this_plot->plot_type == DATA) { /* actually get the data now */ if (get_data(this_plot) == 0) { int_warn(NO_CARET,"Skipping data file with no valid points"); this_plot->plot_type = NODATA; goto SKIPPED_EMPTY_FILE; } /* Fiddle the auto-scaling data for specific plot styles */ if (this_plot->plot_style == HISTOGRAMS) histogram_range_fiddling(this_plot); if (this_plot->plot_style == BOXES) box_range_fiddling(this_plot); if (this_plot->plot_style == BOXPLOT) boxplot_range_fiddling(this_plot); if (this_plot->plot_style == RGBIMAGE || this_plot->plot_style == RGBA_IMAGE) { if (CB_AXIS.autoscale & AUTOSCALE_MIN) CB_AXIS.min = 0; if (CB_AXIS.autoscale & AUTOSCALE_MAX) CB_AXIS.max = 255; } if (polar) { polar_range_fiddling(this_plot); } /* if needed, sort boxplot factors and assign tic labels to them */ if (this_plot->plot_style == BOXPLOT && this_plot->boxplot_factors > 0) { if (boxplot_opts.sort_factors) sort_boxplot_factors(this_plot); if (boxplot_opts.labels != BOXPLOT_FACTOR_LABELS_OFF) add_tics_boxplot_factors(this_plot); } /* sort */ switch (this_plot->plot_smooth) { /* sort and average, if the style requires */ case SMOOTH_UNIQUE: case SMOOTH_FREQUENCY: case SMOOTH_CUMULATIVE: case SMOOTH_CUMULATIVE_NORMALISED: case SMOOTH_CSPLINES: case SMOOTH_ACSPLINES: case SMOOTH_SBEZIER: sort_points(this_plot); cp_implode(this_plot); case SMOOTH_NONE: case SMOOTH_BEZIER: case SMOOTH_KDENSITY: default: break; } switch (this_plot->plot_smooth) { /* create new data set by evaluation of * interpolation routines */ case SMOOTH_FREQUENCY: case SMOOTH_CUMULATIVE: case SMOOTH_CUMULATIVE_NORMALISED: gen_interp_frequency(this_plot); break; case SMOOTH_CSPLINES: case SMOOTH_ACSPLINES: case SMOOTH_BEZIER: case SMOOTH_SBEZIER: case SMOOTH_KDENSITY: gen_interp(this_plot); case SMOOTH_NONE: case SMOOTH_UNIQUE: default: break; } /* now that we know the plot style, adjust the x- and yrange */ /* adjust_range(this_plot); no longer needed */ /* Images are defined by a grid representing centers of pixels. * Compensate for extent of the image so `set autoscale fix` * uses outer edges of outer pixels in axes adjustment. */ if ((this_plot->plot_style == IMAGE || this_plot->plot_style == RGBIMAGE || this_plot->plot_style == RGBA_IMAGE)) { this_plot->image_properties.type = IC_PALETTE; plot_image_or_update_axes(this_plot, TRUE); } } SKIPPED_EMPTY_FILE: /* Note position in command line for second pass */ this_plot->token = c_token; tp_ptr = &(this_plot->next); } /* !is_defn */ if (in_parametric) { if (equals(c_token, ",")) { c_token++; continue; } else break; } /* Iterate-over-plot mechanism */ if (empty_iteration(plot_iterator) && this_plot) { this_plot->plot_type = NODATA; } else if (next_iteration(plot_iterator)) { c_token = start_token; continue; } plot_iterator = cleanup_iteration(plot_iterator); if (equals(c_token, ",")) { c_token++; plot_iterator = check_for_iteration(); } else break; } if (parametric && in_parametric) int_error(NO_CARET, "parametric function not fully specified"); /*** Second Pass: Evaluate the functions ***/ /* * Everything is defined now, except the function data. We expect * no syntax errors, etc, since the above parsed it all. This * makes the code below simpler. If y is autoscaled, the yrange * may still change. we stored last token of each plot, so we * dont need to do everything again */ /* parametric or polar fns can still affect x ranges */ if (!parametric && !polar) { /* If we were expecting to autoscale on X but found no usable * points in the data files, then the axis limits are still sitting * at +/- VERYLARGE. The default range for bare functions is [-10:10]. * Or we could give up and fall through to "x range invalid". */ if (some_functions && uses_axis[FIRST_X_AXIS]) if (axis_array[FIRST_X_AXIS].max == -VERYLARGE || axis_array[FIRST_X_AXIS].min == VERYLARGE) { axis_array[FIRST_X_AXIS].min = -10; axis_array[FIRST_X_AXIS].max = 10; } /* check that xmin -> xmax is not too small */ axis_checked_extend_empty_range(FIRST_X_AXIS, "x range is invalid"); if (uses_axis[SECOND_X_AXIS] & USES_AXIS_FOR_DATA) { /* check that x2min -> x2max is not too small */ axis_checked_extend_empty_range(SECOND_X_AXIS, "x2 range is invalid"); } else if (axis_array[SECOND_X_AXIS].autoscale) { /* copy x1's range */ if (axis_array[SECOND_X_AXIS].autoscale & AUTOSCALE_MIN) axis_array[SECOND_X_AXIS].min = axis_array[FIRST_X_AXIS].min; if (axis_array[SECOND_X_AXIS].autoscale & AUTOSCALE_MAX) axis_array[SECOND_X_AXIS].max = axis_array[FIRST_X_AXIS].max; } } if (some_functions) { /* call the controlled variable t, since x_min can also mean * smallest x */ double t_min = 0., t_max = 0., t_step = 0.; if (parametric || polar) { if (! (uses_axis[FIRST_X_AXIS] & USES_AXIS_FOR_DATA)) { /* these have not yet been set to full width */ if (axis_array[FIRST_X_AXIS].autoscale & AUTOSCALE_MIN) axis_array[FIRST_X_AXIS].min = VERYLARGE; if (axis_array[FIRST_X_AXIS].autoscale & AUTOSCALE_MAX) axis_array[FIRST_X_AXIS].max = -VERYLARGE; } if (! (uses_axis[SECOND_X_AXIS] & USES_AXIS_FOR_DATA)) { if (axis_array[SECOND_X_AXIS].autoscale & AUTOSCALE_MIN) axis_array[SECOND_X_AXIS].min = VERYLARGE; if (axis_array[SECOND_X_AXIS].autoscale & AUTOSCALE_MAX) axis_array[SECOND_X_AXIS].max = -VERYLARGE; } } /* FIXME HBB 20000430: here and elsewhere, the code explicitly * assumes that the dummy variables (t, u, v) cannot possibly * be logscaled in parametric or polar mode. Does this * *really* hold? */ if (parametric || polar) { t_min = axis_array[T_AXIS].min; t_max = axis_array[T_AXIS].max; t_step = (t_max - t_min) / (samples_1 - 1); } /* else we'll do it on each plot (see below) */ tp_ptr = &(first_plot); plot_num = 0; this_plot = first_plot; c_token = begin_token; /* start over */ plot_iterator = check_for_iteration(); /* Read through functions */ while (TRUE) { if (!in_parametric && !was_definition) start_token = c_token; if (is_definition(c_token)) { define(); if (!equals(c_token,",")) { was_definition = TRUE; continue; } } else { struct at_type *at_ptr; char *name_str; was_definition = FALSE; /* Forgive trailing comma on a multi-element plot command */ if (END_OF_COMMAND || this_plot == NULL) { int_warn(c_token, "ignoring trailing comma in plot command"); break; } /* HBB 20000820: now globals in 'axis.c' */ x_axis = this_plot->x_axis; y_axis = this_plot->y_axis; plot_num++; dummy_func = &plot_func; if (almost_equals(c_token, "newhist$ogram")) { /* Make sure this isn't interpreted as a function */ name_str = ""; } else /* WARNING: do NOT free name_str */ /* FIXME: should this be saved in "this_plot"? */ name_str = string_or_express(&at_ptr); if (!name_str) { /* function to plot */ if (parametric) { /* toggle parametric axes */ in_parametric = !in_parametric; } plot_func.at = at_ptr; if (!parametric && !polar) { t_min = X_AXIS.min; t_max = X_AXIS.max; axis_unlog_interval(x_axis, &t_min, &t_max, 1); t_step = (t_max - t_min) / (samples_1 - 1); } for (i = 0; i < samples_1; i++) { double x, temp; struct value a; double t = t_min + i * t_step; /* Zero is often a special point in a function domain. */ /* Make sure we don't miss it due to round-off error. */ if ((fabs(t) < 1.e-9) && (fabs(t_step) > 1.e-6)) t = 0.0; /* parametric/polar => NOT a log quantity */ x = (!parametric && !polar) ? AXIS_DE_LOG_VALUE(x_axis, t) : t; (void) Gcomplex(&plot_func.dummy_values[0], x, 0.0); evaluate_at(plot_func.at, &a); if (undefined || (fabs(imag(&a)) > zero)) { this_plot->points[i].type = UNDEFINED; continue; } else { /* Jan 2010 - initialize all fields! */ memset(&this_plot->points[i], 0, sizeof(struct coordinate)); } temp = real(&a); /* width of box not specified */ this_plot->points[i].z = -1.0; /* for the moment */ this_plot->points[i].type = INRANGE; if (parametric) { /* we cannot do range-checking now, since for * the x function we did not know which axes * we were using * DO NOT TAKE LOGS YET - do it in parametric_fixup */ /* ignored, actually... */ this_plot->points[i].x = t; this_plot->points[i].y = temp; if (boxwidth >= 0 && boxwidth_is_absolute ) this_plot->points[i].z = 0; } else if (polar) { double y; double phi = x; if (temp > R_AXIS.max) { if (R_AXIS.autoscale & AUTOSCALE_MAX) R_AXIS.max = temp; else this_plot->points[i].type = OUTRANGE; } if (temp < R_AXIS.min) { /* FIXME: could do this outside the loop */ if (R_AXIS.autoscale & AUTOSCALE_MIN) R_AXIS.min = 0; } if (R_AXIS.log) { temp = AXIS_DO_LOG(POLAR_AXIS,temp) - AXIS_DO_LOG(POLAR_AXIS,R_AXIS.min); } else if (!(R_AXIS.autoscale & AUTOSCALE_MIN)) temp -= R_AXIS.min; y = temp * sin(phi * ang2rad); x = temp * cos(phi * ang2rad); if ((this_plot->plot_style == FILLEDCURVES) && (this_plot->filledcurves_options.closeto == FILLEDCURVES_ATR)) { double xhigh, yhigh; double temp = this_plot->filledcurves_options.at; temp = AXIS_LOG_VALUE(POLAR_AXIS,temp) - AXIS_LOG_VALUE(POLAR_AXIS,R_AXIS.min); yhigh = temp * sin(phi * ang2rad); xhigh = temp * cos(phi * ang2rad); STORE_WITH_LOG_AND_UPDATE_RANGE( this_plot->points[i].xhigh, xhigh, this_plot->points[i].type, x_axis, this_plot->noautoscale, NOOP, goto come_here_if_undefined); STORE_WITH_LOG_AND_UPDATE_RANGE( this_plot->points[i].yhigh, yhigh, this_plot->points[i].type, y_axis, this_plot->noautoscale, NOOP, goto come_here_if_undefined); } STORE_WITH_LOG_AND_UPDATE_RANGE( this_plot->points[i].x, x, this_plot->points[i].type, x_axis, this_plot->noautoscale, NOOP, goto come_here_if_undefined); STORE_WITH_LOG_AND_UPDATE_RANGE( this_plot->points[i].y, y, this_plot->points[i].type, y_axis, this_plot->noautoscale, NOOP, goto come_here_if_undefined); } else { /* neither parametric or polar */ /* If non-para, it must be INRANGE */ /* logscale ? log(x) : x */ this_plot->points[i].x = t; /* For boxes [only] check use of boxwidth */ if ((this_plot->plot_style == BOXES) && (boxwidth >= 0 && boxwidth_is_absolute)) { double xlow, xhigh; int dmy_type = INRANGE; this_plot->points[i].z = 0; if (axis_array[this_plot->x_axis].log) { double base = axis_array[this_plot->x_axis].base; xlow = x * pow(base, -boxwidth/2.); xhigh = x * pow(base, boxwidth/2.); } else { xlow = x - boxwidth/2; xhigh = x + boxwidth/2; } STORE_WITH_LOG_AND_UPDATE_RANGE( this_plot->points[i].xlow, xlow, dmy_type, x_axis, this_plot->noautoscale, NOOP, NOOP ); dmy_type = INRANGE; STORE_WITH_LOG_AND_UPDATE_RANGE( this_plot->points[i].xhigh, xhigh, dmy_type, x_axis, this_plot->noautoscale, NOOP, NOOP ); } /* Fill in additional fields needed to draw a circle */ #ifdef EAM_OBJECTS if (this_plot->plot_style == CIRCLES) { this_plot->points[i].z = DEFAULT_RADIUS; this_plot->points[i].ylow = 0; this_plot->points[i].xhigh = 360; } else if (this_plot->plot_style == ELLIPSES) { this_plot->points[i].z = DEFAULT_RADIUS; this_plot->points[i].ylow = default_ellipse.o.ellipse.orientation; } #endif STORE_WITH_LOG_AND_UPDATE_RANGE(this_plot->points[i].y, temp, this_plot->points[i].type, in_parametric ? x_axis : y_axis, this_plot->noautoscale, NOOP, goto come_here_if_undefined); /* could not use a continue in this case */ come_here_if_undefined: ; /* ansi requires a statement after a label */ } } /* loop over samples_1 */ this_plot->p_count = i; /* samples_1 */ } /* skip all modifers func / whole of data plots */ c_token = this_plot->token; /* used below */ tp_ptr = &(this_plot->next); this_plot = this_plot->next; } /* Iterate-over-plot mechanism */ if (!in_parametric && next_iteration(plot_iterator)) { c_token = start_token; continue; } plot_iterator = cleanup_iteration(plot_iterator); if (equals(c_token, ",")) { c_token++; if (!in_parametric) plot_iterator = check_for_iteration(); } else break; } /* when step debugging, set breakpoint here to get through * the 'read function' loop above quickly */ if (parametric) { /* Now actually fix the plot pairs to be single plots * also fixes up polar&¶metric fn plots */ parametric_fixup(first_plot, &plot_num); /* we omitted earlier check for range too small */ axis_checked_extend_empty_range(FIRST_X_AXIS, NULL); if (uses_axis[SECOND_X_AXIS]) { axis_checked_extend_empty_range(SECOND_X_AXIS, NULL); } } } /* some_functions */ /* if first_plot is NULL, we have no functions or data at all. This can * happen, if you type "plot x=5", since x=5 is a variable assignment */ if (plot_num == 0 || first_plot == NULL) { int_error(c_token, "no functions or data to plot"); } if (!uses_axis[FIRST_X_AXIS] && !uses_axis[SECOND_X_AXIS]) if (first_plot->plot_type == NODATA) int_error(NO_CARET,"No data in plot"); if (uses_axis[FIRST_X_AXIS]) { if (axis_array[FIRST_X_AXIS].max == -VERYLARGE || axis_array[FIRST_X_AXIS].min == VERYLARGE) int_error(NO_CARET, "all points undefined!"); axis_revert_and_unlog_range(FIRST_X_AXIS); } if (uses_axis[SECOND_X_AXIS]) { if (axis_array[SECOND_X_AXIS].max == -VERYLARGE || axis_array[SECOND_X_AXIS].min == VERYLARGE) int_error(NO_CARET, "all points undefined!"); axis_revert_and_unlog_range(SECOND_X_AXIS); } else { assert(uses_axis[FIRST_X_AXIS]); if (axis_array[SECOND_X_AXIS].autoscale & AUTOSCALE_MIN) axis_array[SECOND_X_AXIS].min = axis_array[FIRST_X_AXIS].min; if (axis_array[SECOND_X_AXIS].autoscale & AUTOSCALE_MAX) axis_array[SECOND_X_AXIS].max = axis_array[FIRST_X_AXIS].max; if (! axis_array[SECOND_X_AXIS].autoscale) axis_revert_and_unlog_range(SECOND_X_AXIS); } if (! uses_axis[FIRST_X_AXIS]) { assert(uses_axis[SECOND_X_AXIS]); if (axis_array[FIRST_X_AXIS].autoscale & AUTOSCALE_MIN) axis_array[FIRST_X_AXIS].min = axis_array[SECOND_X_AXIS].min; if (axis_array[FIRST_X_AXIS].autoscale & AUTOSCALE_MAX) axis_array[FIRST_X_AXIS].max = axis_array[SECOND_X_AXIS].max; } if (uses_axis[FIRST_Y_AXIS]) { axis_checked_extend_empty_range(FIRST_Y_AXIS, "all points y value undefined!"); axis_revert_and_unlog_range(FIRST_Y_AXIS); } if (uses_axis[SECOND_Y_AXIS]) { axis_checked_extend_empty_range(SECOND_Y_AXIS, "all points y2 value undefined!"); axis_revert_and_unlog_range(SECOND_Y_AXIS); } else { /* else we want to copy y2 range */ assert(uses_axis[FIRST_Y_AXIS]); if (axis_array[SECOND_Y_AXIS].autoscale & AUTOSCALE_MIN) axis_array[SECOND_Y_AXIS].min = axis_array[FIRST_Y_AXIS].min; if (axis_array[SECOND_Y_AXIS].autoscale & AUTOSCALE_MAX) axis_array[SECOND_Y_AXIS].max = axis_array[FIRST_Y_AXIS].max; /* Log() fixup is only necessary if the range was *not* copied from * the (already logarithmized) yrange */ if (! axis_array[SECOND_Y_AXIS].autoscale) axis_revert_and_unlog_range(SECOND_Y_AXIS); } if (! uses_axis[FIRST_Y_AXIS]) { assert(uses_axis[SECOND_Y_AXIS]); if (axis_array[FIRST_Y_AXIS].autoscale & AUTOSCALE_MIN) axis_array[FIRST_Y_AXIS].min = axis_array[SECOND_Y_AXIS].min; if (axis_array[FIRST_Y_AXIS].autoscale & AUTOSCALE_MAX) axis_array[FIRST_Y_AXIS].max = axis_array[SECOND_Y_AXIS].max; } /* the following ~5 lines were moved from the end of the * function to here, as do_plot calles term->text, which * itself might process input events in mouse enhanced * terminals. For redrawing to work, line capturing and * setting the plot_num must already be done before * entering do_plot(). Thu Jan 27 23:56:24 2000 (joze) */ /* if we get here, all went well, so record this line for replot */ if (plot_token != -1) { /* note that m_capture also frees the old replot_line */ m_capture(&replot_line, plot_token, c_token - 1); plot_token = -1; fill_gpval_string("GPVAL_LAST_PLOT", replot_line); } if (table_mode) { print_table(first_plot, plot_num); } else { /* do_plot now uses axis_array[] */ do_plot(first_plot, plot_num); /* after do_plot(), axis_array[].min and .max * contain the plotting range actually used (rounded * to tic marks, not only the min/max data values) * --> save them now for writeback if requested */ save_writeback_all_axes(); #ifdef VOLATILE_REFRESH /* Mark these plots as safe for quick refresh */ refresh_nplots = plot_num; refresh_ok = 2; #endif } /* update GPVAL_ variables available to user */ update_gpval_variables(1); } /* eval_plots */ /* * The hardest part of this routine is collapsing the FUNC plot types in the * list (which are garanteed to occur in (x,y) pairs while preserving the * non-FUNC type plots intact. This means we have to work our way through * various lists. Examples (hand checked): start_plot:F1->F2->NULL ==> * F2->NULL start_plot:F1->F2->F3->F4->F5->F6->NULL ==> F2->F4->F6->NULL * start_plot:F1->F2->D1->D2->F3->F4->D3->NULL ==> F2->D1->D2->F4->D3->NULL * */ static void parametric_fixup(struct curve_points *start_plot, int *plot_num) { struct curve_points *xp, *new_list = NULL, *free_list = NULL; struct curve_points **last_pointer = &new_list; int i, curve; /* * Ok, go through all the plots and move FUNC types together. Note: this * originally was written to look for a NULL next pointer, but gnuplot * wants to be sticky in grabbing memory and the right number of items in * the plot list is controlled by the plot_num variable. * * Since gnuplot wants to do this sticky business, a free_list of * curve_points is kept and then tagged onto the end of the plot list as * this seems more in the spirit of the original memory behavior than * simply freeing the memory. I'm personally not convinced this sort of * concern is worth it since the time spent computing points seems to * dominate any garbage collecting that might be saved here... */ new_list = xp = start_plot; curve = 0; while (++curve <= *plot_num) { if (xp->plot_type == FUNC) { /* Here's a FUNC parametric function defined as two parts. */ struct curve_points *yp = xp->next; --(*plot_num); assert(xp->p_count == yp->p_count); /* because syntax is plot x(t), y(t) axes ..., only * the y function axes are correct */ /* * Go through all the points assigning the y's from xp to be * the x's for yp. In polar mode, we need to check max's and * min's as we go. */ for (i = 0; i < yp->p_count; ++i) { if (polar) { double r = yp->points[i].y; double t = xp->points[i].y * ang2rad; double x, y; if (!(R_AXIS.autoscale & AUTOSCALE_MAX) && r > R_AXIS.max) yp->points[i].type = OUTRANGE; if (!(R_AXIS.autoscale & AUTOSCALE_MIN)) { /* store internally as if plotting r(t)-rmin */ r -= R_AXIS.min; } x = r * cos(t); y = r * sin(t); if (boxwidth >= 0 && boxwidth_is_absolute) { int dmy_type = INRANGE; STORE_WITH_LOG_AND_UPDATE_RANGE( yp->points[i].xlow, x - boxwidth/2, dmy_type, xp->x_axis, xp->noautoscale, NOOP, NOOP ); dmy_type = INRANGE; STORE_WITH_LOG_AND_UPDATE_RANGE( yp->points[i].xhigh, x + boxwidth/2, dmy_type, xp->x_axis, xp->noautoscale, NOOP, NOOP ); } /* we hadn't done logs when we stored earlier */ STORE_WITH_LOG_AND_UPDATE_RANGE(yp->points[i].x, x, yp->points[i].type, xp->x_axis, xp->noautoscale, NOOP, NOOP); STORE_WITH_LOG_AND_UPDATE_RANGE(yp->points[i].y, y, yp->points[i].type, xp->y_axis, xp->noautoscale, NOOP, NOOP); } else { double x = xp->points[i].y; double y = yp->points[i].y; if (boxwidth >= 0 && boxwidth_is_absolute) { int dmy_type = INRANGE; STORE_WITH_LOG_AND_UPDATE_RANGE( yp->points[i].xlow, x - boxwidth/2, dmy_type, yp->x_axis, xp->noautoscale, NOOP, NOOP ); dmy_type = INRANGE; STORE_WITH_LOG_AND_UPDATE_RANGE( yp->points[i].xhigh, x + boxwidth/2, dmy_type, yp->x_axis, xp->noautoscale, NOOP, NOOP ); } STORE_WITH_LOG_AND_UPDATE_RANGE(yp->points[i].x, x, yp->points[i].type, yp->x_axis, xp->noautoscale, NOOP, NOOP); STORE_WITH_LOG_AND_UPDATE_RANGE(yp->points[i].y, y, yp->points[i].type, yp->y_axis, xp->noautoscale, NOOP, NOOP); } } /* move xp to head of free list */ xp->next = free_list; free_list = xp; /* append yp to new_list */ *last_pointer = yp; last_pointer = &(yp->next); xp = yp->next; } else { /* data plot */ assert(*last_pointer == xp); last_pointer = &(xp->next); xp = xp->next; } } /* loop over plots */ first_plot = new_list; /* Ok, stick the free list at the end of the curve_points plot list. */ *last_pointer = free_list; } �����������������������������������������gnuplot-4.6.4/src/header.mac������������������������������������������������������������������������0000644�0004711�0000144�00000001626�06677000223�012641� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������if1 LARGE equ 1 ; define your memory model here ifdef SMALL ; default, so do nothing else ifdef MEDIUM LARGE_CODE equ 1 else ifdef COMPACT LARGE_DATA equ 1 else ifdef LARGE LARGE_DATA equ 1 LARGE_CODE equ 1 else %out No memory model defined--assuming SMALL endif ; LARGE endif ; COMPACT endif ; MEDIUM endif ; SMALL beginproc macro procname ifdef LARGE_CODE procname proc far else procname proc near endif ; LARGE_CODE endm ; beginproc endif ; if1 _TEXT SEGMENT BYTE PUBLIC 'CODE' _TEXT ENDS _DATA SEGMENT WORD PUBLIC 'DATA' _DATA ENDS CONST SEGMENT WORD PUBLIC 'CONST' CONST ENDS _BSS SEGMENT WORD PUBLIC 'BSS' _BSS ENDS DGROUP GROUP CONST, _BSS, _DATA assume cs:_text, ds:dgroup, ss:dgroup, es:dgroup ; define X as the offset of first argument on stack frame ifdef LARGE_CODE X equ 6 ; return offset and segment + old BP else X equ 4 ; return offset + old BP endif ; LARGE_CODE ����������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/alloc.c���������������������������������������������������������������������������0000644�0004711�0000144�00000021560�11630656061�012166� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: alloc.c,v 1.17 2011/09/04 11:08:33 markisch Exp $"); } #endif /* GNUPLOT - alloc.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Alexander Lehmann (collected functions from misc.c and binary.c) * */ #include "alloc.h" #ifndef NO_GIH # include "help.h" #endif #include "util.h" #ifndef GP_FARMALLOC # ifdef FARALLOC # define GP_FARMALLOC(size) farmalloc ((size)) # define GP_FARREALLOC(p,size) farrealloc ((p), (size)) # else # ifdef MALLOC_ZERO_RETURNS_ZERO # define GP_FARMALLOC(size) malloc ((size_t)((size==0)?1:size)) # else # define GP_FARMALLOC(size) malloc ((size_t)(size)) # endif # define GP_FARREALLOC(p,size) realloc ((p), (size_t)(size)) # endif #endif /* uncomment if you want to trace all allocs */ #define TRACE_ALLOC(x) /*printf x */ #ifdef CHECK_HEAP_USE /* This is in no way supported, and in particular it breaks the * online help. But it is useful to leave it in in case any * heap-corruption bugs turn up. Wont work with FARALLOC */ struct frame_struct { char *use; int requested_size; int pad; /* preserve 8-byte alignment */ int checksum; }; struct leak_struct { char *file; int line; int allocated; }; static struct leak_struct leak_stack[40]; /* up to 40 nested leak checks */ static struct leak_struct *leak_frame = leak_stack; static long bytes_allocated = 0; #define RESERVED_SIZE sizeof(struct frame_struct) #define CHECKSUM_INT 0xcaac5e1f #define CHECKSUM_FREE 0xf3eed222 #define CHECKSUM_CHAR 0xc5 static void mark(struct frame_struct *p, unsigned long size, char *usage) { p->use = usage; p->requested_size = size; p->checksum = (CHECKSUM_INT ^ (int) (p->use) ^ size); ((unsigned char *) (p + 1))[size] = CHECKSUM_CHAR; } #define mark_free(p) ( ((struct frame_struct *)p)[-1].checksum = CHECKSUM_FREE) static void validate(generic *x) { struct frame_struct *p = (struct frame_struct *) x - 1; if (p->checksum != (CHECKSUM_INT ^ (int) (p->use) ^ p->requested_size)) { fprintf(stderr, "Heap corruption at start of block for %s\n", p->use); if (p->checksum == CHECKSUM_FREE) fprintf(stderr, "Looks like it has already been freed ?\n"); abort(); } if (((unsigned char *) (p + 1))[p->requested_size] != CHECKSUM_CHAR) { fprintf(stderr, "Heap corruption at end of block for %-60s\n", p->use); int_error(NO_CARET, "Argh !"); } } /* used to confirm that a pointer is inside an allocated region via * macro CHECK_POINTER. Nowhere near as good as using a bounds-checking * compiler (such as gcc-with-bounds-checking), but when we do * come across problems, we can add these guards to the code until * we find the problem, and then leave the guards in (as CHECK_POINTER * macros which expand to nothing, until we need to re-enable them) */ void check_pointer_in_block(generic *block, generic *p, int size, char *file, int line) { struct frame_struct *f = (struct frame_struct *) block - 1; validate(block); if (p < block || p >= (block + f->requested_size)) { fprintf(stderr, "argh - pointer %p outside block %p->%p for %s at %s:%d\n", p, block, (char *) block + f->requested_size, f->use, file, line); int_error(NO_CARET, "argh - pointer misuse !"); } } generic * gp_alloc(size_t size, const char *usage) { struct frame_struct *p; size_t total_size = size + RESERVED_SIZE + 1; TRACE_ALLOC(("gp_alloc %d for %s\n", (int) size, usage ? usage : "<unknown>")); p = malloc(total_size); if (!p) int_error(NO_CARET, "Out of memory"); bytes_allocated += size; mark(p, size, usage); /* Cast possibly needed for K&R compilers */ return (generic *) (p + 1); } generic * gp_realloc(generic *old, size_t size, const char *usage) { if (!old) return gp_alloc(size, usage); validate(old); /* if block gets moved, old block is marked free. If not, we'll * remark it later */ mark_free(old); { struct frame_struct *p = (struct frame_struct *) old - 1; size_t total = size + RESERVED_SIZE + 1; p = realloc(p, total); if (!p) int_error(NO_CARET, "Out of memory"); TRACE_ALLOC(("gp_realloc %d for %s (was %d)\n", (int) size, usage ? usage : "<unknown>", p->requested_size)); bytes_allocated += size - p->requested_size; mark(p, size, usage); return (generic *) (p + 1); } } #undef free void checked_free(generic *p) { struct frame_struct *frame; validate(p); mark_free(p); /* trap attempts to free twice */ frame = (struct frame_struct *) p - 1; TRACE_ALLOC(("free %d for %s\n", frame->requested_size, (frame->use ? frame->use : "(NULL)"))); bytes_allocated -= frame->requested_size; free(frame); } /* this leak checking stuff will be broken by first int_error or interrupt */ void start_leak_check(char *file, int line) { if (leak_frame >= leak_stack + 40) { fprintf(stderr, "too many nested memory-leak checks - %s:%d\n", file, line); return; } leak_frame->file = file; leak_frame->line = line; leak_frame->allocated = bytes_allocated; ++leak_frame; } void end_leak_check(char *file, int line) { if (--leak_frame < leak_stack) { fprintf(stderr, "memory-leak stack underflow at %s:%d\n", file, line); return; } if (leak_frame->allocated != bytes_allocated) { fprintf(stderr, "net change of %+d heap bytes between %s:%d and %s:%d\n", (int) (bytes_allocated - leak_frame->allocated), leak_frame->file, leak_frame->line, file, line); } } #else /* CHECK_HEAP_USE */ /* gp_alloc: * allocate memory * This is a protected version of malloc. It causes an int_error * if there is not enough memory, but first it tries FreeHelp() * to make some room, and tries again. If message is NULL, we * allow NULL return. Otherwise, we handle the error, using the * message to create the int_error string. Note cp/sp_extend uses realloc, * so it depends on this using malloc(). */ generic * gp_alloc(size_t size, const char *message) { char *p; /* the new allocation */ #ifndef NO_GIH p = GP_FARMALLOC(size); if (p == (char *) NULL) { FreeHelp(); /* out of memory, try to make some room */ #endif /* NO_GIH */ p = GP_FARMALLOC(size); /* try again */ if (p == NULL) { /* really out of memory */ if (message != NULL) { int_error(NO_CARET, "out of memory for %s", message); /* NOTREACHED */ } /* else we return NULL */ } #ifndef NO_GIH } #endif return (p); } /* * note gp_realloc assumes that failed realloc calls leave the original mem * block allocated. If this is not the case with any C compiler, a substitue * realloc function has to be used. */ generic * gp_realloc(generic *p, size_t size, const char *message) { char *res; /* the new allocation */ /* realloc(NULL,x) is meant to do malloc(x), but doesn't always */ if (!p) return gp_alloc(size, message); #ifndef NO_GIH res = GP_FARREALLOC(p, size); if (res == (char *) NULL) { FreeHelp(); /* out of memory, try to make some room */ #endif /* NO_GIH */ res = GP_FARREALLOC(p, size); /* try again */ if (res == (char *) NULL) { /* really out of memory */ if (message != NULL) { int_error(NO_CARET, "out of memory for %s", message); /* NOTREACHED */ } /* else we return NULL */ } #ifndef NO_GIH } #endif return (res); } #endif /* CHECK_HEAP_USE */ #ifdef FARALLOC void gpfree(generic *p) { #ifdef _Windows HGLOBAL hGlobal = GlobalHandle(p); GlobalUnlock(hGlobal); GlobalFree(hGlobal); #else farfree(p); #endif } #endif ������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/help.h����������������������������������������������������������������������������0000644�0004711�0000144�00000004103�10037021054�012007� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: help.h,v 1.8 2004/04/13 17:23:56 broeker Exp $ */ /* GNUPLOT - help.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_HELP_H # define GNUPLOT_HELP_H #include "gp_types.h" /* Exit status returned by help() */ #define H_FOUND 0 /* found the keyword */ #define H_NOTFOUND 1 /* didn't find the keyword */ #define H_ERROR (-1) /* didn't find the help file */ /* Prototypes from file "help.c" */ int help __PROTO((char *keyword, char *path, TBOOLEAN *subtopics)); void FreeHelp __PROTO((void)); void StartOutput __PROTO((void)); void OutLine __PROTO((const char *line)); void EndOutput __PROTO((void)); #endif /* GNUPLOT_HELP_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/fit.c�����������������������������������������������������������������������������0000644�0004711�0000144�00000146752�12205204450�011657� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: fit.c,v 1.78.2.7 2013/08/21 18:38:32 sfeam Exp $"); } #endif /* NOTICE: Change of Copyright Status * * The author of this module, Carsten Grammes, has expressed in * personal email that he has no more interest in this code, and * doesn't claim any copyright. He has agreed to put this module * into the public domain. * * Lars Hecking 15-02-1999 */ /* * Nonlinear least squares fit according to the * Marquardt-Levenberg-algorithm * * added as Patch to Gnuplot (v3.2 and higher) * by Carsten Grammes * * 930726: Recoding of the Unix-like raw console I/O routines by: * Michele Marziani (marziani@ferrara.infn.it) * drd: start unitialised variables at 1 rather than NEARLY_ZERO * (fit is more likely to converge if started from 1 than 1e-30 ?) * * HBB (broeker@physik.rwth-aachen.de) : fit didn't calculate the errors * in the 'physically correct' (:-) way, if a third data column containing * the errors (or 'uncertainties') of the input data was given. I think * I've fixed that, but I'm not sure I really understood the M-L-algo well * enough to get it right. I deduced my change from the final steps of the * equivalent algorithm for the linear case, which is much easier to * understand. (I also made some minor, mostly cosmetic changes) * * HBB (again): added error checking for negative covar[i][i] values and * for too many parameters being specified. * * drd: allow 3d fitting. Data value is now called fit_z internally, * ie a 2d fit is z vs x, and a 3d fit is z vs x and y. * * Lars Hecking : review update command, for VMS in particular, where * it is not necessary to rename the old file. * * HBB, 971023: lifted fixed limit on number of datapoints, and number * of parameters. * * Jim Van Zandt, 090201: allow fitting functions with up to five * independent variables. */ #include "fit.h" #include <signal.h> #include "alloc.h" #include "axis.h" #include "command.h" #include "datafile.h" #include "eval.h" #include "gp_time.h" #include "matrix.h" #include "plot.h" #include "misc.h" #include "util.h" #include "variable.h" /* For locale handling */ /* Just temporary */ #if defined(VA_START) && defined(STDC_HEADERS) static void Dblfn __PROTO((const char *fmt, ...)); #else static void Dblfn __PROTO(()); #endif #define Dblf Dblfn #define Dblf2 Dblfn #define Dblf3 Dblfn #define Dblf5 Dblfn #define Dblf6 Dblfn #if defined(MSDOS) /* non-blocking IO stuff */ # include <io.h> # include <conio.h> # include <dos.h> #else /* !(MSDOS) */ # ifndef VMS # include <fcntl.h> # endif /* !VMS */ #endif /* !(MSDOS) */ #ifdef WIN32 # include "win/winmain.h" #endif enum marq_res { OK, ML_ERROR, BETTER, WORSE }; typedef enum marq_res marq_res_t; #ifdef INFINITY # undef INFINITY #endif #define INFINITY 1e30 #define NEARLY_ZERO 1e-30 /* create new variables with this value (was NEARLY_ZERO) */ #define INITIAL_VALUE 1.0 /* Relative change for derivatives */ #define DELTA 0.001 #define MAX_DATA 2048 #define MAX_PARAMS 32 #define MAX_LAMBDA 1e20 #define MIN_LAMBDA 1e-20 #define LAMBDA_UP_FACTOR 10 #define LAMBDA_DOWN_FACTOR 10 #if defined(MSDOS) || defined(OS2) # define PLUSMINUS "\xF1" /* plusminus sign */ #else # define PLUSMINUS "+/-" #endif #define LASTFITCMDLENGTH 511 /* externally visible variables: */ /* log-file for fit command */ char *fitlogfile = NULL; TBOOLEAN fit_errorvariables = FALSE; TBOOLEAN fit_quiet = FALSE; TBOOLEAN ctrlc_flag = FALSE; char fitbuf[256]; /* for Eex and error_ex */ /* private variables: */ static int max_data; static int max_params; static double epsilon = DEF_FIT_LIMIT; /* convergence limit */ static int maxiter = 0; static char *fit_script = NULL; /* HBB/H.Harders 20020927: log file name now changeable from inside * gnuplot */ static const char fitlogfile_default[] = "fit.log"; static const char GNUFITLOG[] = "FIT_LOG"; static const char *GP_FIXED = "# FIXED"; static const char *FITLIMIT = "FIT_LIMIT"; static const char *FITSTARTLAMBDA = "FIT_START_LAMBDA"; static const char *FITLAMBDAFACTOR = "FIT_LAMBDA_FACTOR"; static const char *FITMAXITER = "FIT_MAXITER"; /* HBB 970304: maxiter patch */ static const char *FITSCRIPT = "FIT_SCRIPT"; static const char *DEFAULT_CMD = "replot"; /* if no fitscript spec. */ static char last_fit_command[LASTFITCMDLENGTH+1] = ""; static FILE *log_f = NULL; static int num_data, num_params; static int num_indep; /* # independent variables in fit function */ static int columns; /* # values read from data file for each point */ static double *fit_x = 0; /* all independent variable values, e.g. value of the ith variable from the jth data point is in fit_x[j*num_indep+i] */ static double *fit_z = 0; /* dependent data values */ static double *err_data = 0; /* standard deviations of dependent data */ static double *a = 0; /* array of fitting parameters */ static TBOOLEAN user_stop = FALSE; static struct udft_entry func; typedef char fixstr[MAX_ID_LEN+1]; static fixstr *par_name; static double startup_lambda = 0, lambda_down_factor = LAMBDA_DOWN_FACTOR, lambda_up_factor = LAMBDA_UP_FACTOR; /***************************************************************** internal Prototypes *****************************************************************/ #if !defined(WIN32) || defined(WGP_CONSOLE) static RETSIGTYPE ctrlc_handle __PROTO((int an_int)); #endif static void ctrlc_setup __PROTO((void)); static marq_res_t marquardt __PROTO((double a[], double **alpha, double *chisq, double *lambda)); static TBOOLEAN analyze __PROTO((double a[], double **alpha, double beta[], double *chisq)); static void calculate __PROTO((double *zfunc, double **dzda, double a[])); static void call_gnuplot __PROTO((double *par, double *data)); static TBOOLEAN fit_interrupt __PROTO((void)); static TBOOLEAN regress __PROTO((double a[])); static void show_fit __PROTO((int i, double chisq, double last_chisq, double *a, double lambda, FILE * device)); static void log_axis_restriction __PROTO((FILE *log_f, AXIS_INDEX axis, char *name)); static TBOOLEAN is_empty __PROTO((char *s)); static TBOOLEAN is_variable __PROTO((char *s)); static double getdvar __PROTO((const char *varname)); static int getivar __PROTO((const char *varname)); static void setvar __PROTO((char *varname, struct value data)); static char *get_next_word __PROTO((char **s, char *subst)); static double createdvar __PROTO((char *varname, double value)); static void splitpath __PROTO((char *s, char *p, char *f)); static void backup_file __PROTO((char *, const char *)); static void setvarerr __PROTO((char *varname, double value)); /***************************************************************** Small function to write the last fit command into a file Arg: Pointer to the file; if NULL, nothing is written, but only the size of the string is returned. *****************************************************************/ size_t wri_to_fil_last_fit_cmd(FILE *fp) { if (fp == NULL) return strlen(last_fit_command); else return (size_t) fputs(last_fit_command, fp); } /***************************************************************** This is called when a SIGINT occurs during fit *****************************************************************/ #if !defined(WIN32) || defined(WGP_CONSOLE) static RETSIGTYPE ctrlc_handle(int an_int) { (void) an_int; /* avoid -Wunused warning */ /* reinstall signal handler (necessary on SysV) */ (void) signal(SIGINT, (sigfunc) ctrlc_handle); ctrlc_flag = TRUE; } #endif /***************************************************************** setup the ctrl_c signal handler *****************************************************************/ static void ctrlc_setup() { /* * MSDOS defines signal(SIGINT) but doesn't handle it through * real interrupts. So there remain cases in which a ctrl-c may * be uncaught by signal. We must use kbhit() instead that really * serves the keyboard interrupt (or write an own interrupt func * which also generates #ifdefs) * * I hope that other OSes do it better, if not... add #ifdefs :-( */ #if (defined(__EMX__) || !defined(MSDOS)) && (!defined(WIN32) || defined(WGP_CONSOLE)) (void) signal(SIGINT, (sigfunc) ctrlc_handle); #endif } /***************************************************************** getch that handles also function keys etc. *****************************************************************/ #if defined(MSDOS) /* HBB 980317: added a prototype... */ int getchx __PROTO((void)); int getchx() { int c = getch(); if (!c || c == 0xE0) { c <<= 8; c |= getch(); } return c; } #endif /***************************************************************** in case of fatal errors *****************************************************************/ void error_ex() { char *sp; memcpy(fitbuf, " ", 9); /* start after GNUPLOT> */ sp = strchr(fitbuf, NUL); while (*--sp == '\n'); strcpy(sp + 1, "\n"); fputs(fitbuf, STANDARD); strcpy(sp + 2, "\n"); /* terminate with exactly 2 newlines */ if (log_f) { fprintf(log_f, "BREAK: %s", fitbuf); (void) fclose(log_f); log_f = NULL; } if (func.at) { free_at(func.at); /* release perm. action table */ func.at = (struct at_type *) NULL; } /* restore original SIGINT function */ interrupt_setup(); /* exit via int_error() so that it can clean up state variables */ int_error(NO_CARET, "error during fit"); } /* HBB 990829: removed the debug print routines */ /***************************************************************** Marquardt's nonlinear least squares fit *****************************************************************/ static marq_res_t marquardt(double a[], double **C, double *chisq, double *lambda) { int i, j; static double *da = 0, /* delta-step of the parameter */ *temp_a = 0, /* temptative new params set */ *d = 0, *tmp_d = 0, **tmp_C = 0, *residues = 0; double tmp_chisq; /* Initialization when lambda == -1 */ if (*lambda == -1) { /* Get first chi-square check */ TBOOLEAN analyze_ret; temp_a = vec(num_params); d = vec(num_data + num_params); tmp_d = vec(num_data + num_params); da = vec(num_params); residues = vec(num_data + num_params); tmp_C = matr(num_data + num_params, num_params); analyze_ret = analyze(a, C, d, chisq); /* Calculate a useful startup value for lambda, as given by Schwarz */ /* FIXME: this is doesn't turn out to be much better, really... */ if (startup_lambda != 0) *lambda = startup_lambda; else { *lambda = 0; for (i = 0; i < num_data; i++) for (j = 0; j < num_params; j++) *lambda += C[i][j] * C[i][j]; *lambda = sqrt(*lambda / num_data / num_params); } /* Fill in the lower square part of C (the diagonal is filled in on each iteration, see below) */ for (i = 0; i < num_params; i++) for (j = 0; j < i; j++) C[num_data + i][j] = 0, C[num_data + j][i] = 0; return analyze_ret ? OK : ML_ERROR; } /* once converged, free dynamic allocated vars */ if (*lambda == -2) { free(d); free(tmp_d); free(da); free(temp_a); free(residues); free_matr(tmp_C); return OK; } /* Givens calculates in-place, so make working copies of C and d */ for (j = 0; j < num_data + num_params; j++) memcpy(tmp_C[j], C[j], num_params * sizeof(double)); memcpy(tmp_d, d, num_data * sizeof(double)); /* fill in additional parts of tmp_C, tmp_d */ for (i = 0; i < num_params; i++) { /* fill in low diag. of tmp_C ... */ tmp_C[num_data + i][i] = *lambda; /* ... and low part of tmp_d */ tmp_d[num_data + i] = 0; } /* FIXME: residues[] isn't used at all. Why? Should it be used? */ Givens(tmp_C, tmp_d, da, residues, num_params + num_data, num_params, 1); /* check if trial did ameliorate sum of squares */ for (j = 0; j < num_params; j++) temp_a[j] = a[j] + da[j]; if (!analyze(temp_a, tmp_C, tmp_d, &tmp_chisq)) { /* FIXME: will never be reached: always returns TRUE */ return ML_ERROR; } if (tmp_chisq < *chisq) { /* Success, accept new solution */ if (*lambda > MIN_LAMBDA) { if (!fit_quiet) (void) putc('/', stderr); *lambda /= lambda_down_factor; } *chisq = tmp_chisq; for (j = 0; j < num_data; j++) { memcpy(C[j], tmp_C[j], num_params * sizeof(double)); d[j] = tmp_d[j]; } for (j = 0; j < num_params; j++) a[j] = temp_a[j]; return BETTER; } else { /* failure, increase lambda and return */ if (!fit_quiet) (void) putc('*', stderr); *lambda *= lambda_up_factor; return WORSE; } } /***************************************************************** compute chi-square and numeric derivations *****************************************************************/ /* used by marquardt to evaluate the linearized fitting matrix C and * vector d, fills in only the top part of C and d I don't use a * temporary array zfunc[] any more. Just use d[] instead. */ /* FIXME: in the new code, this function doesn't really do enough to * be useful. Maybe it ought to be deleted, i.e. integrated with * calculate() ? */ static TBOOLEAN analyze(double a[], double **C, double d[], double *chisq) { int i, j; *chisq = 0; calculate(d, C, a); for (i = 0; i < num_data; i++) { /* note: order reversed, as used by Schwarz */ d[i] = (d[i] - fit_z[i]) / err_data[i]; *chisq += d[i] * d[i]; for (j = 0; j < num_params; j++) C[i][j] /= err_data[i]; } /* FIXME: why return a value that is always TRUE ? */ return TRUE; } /* To use the more exact, but slower two-side formula, activate the following line: */ /*#define TWO_SIDE_DIFFERENTIATION */ /***************************************************************** compute function values and partial derivatives of chi-square *****************************************************************/ static void calculate(double *zfunc, double **dzda, double a[]) { int k, p; double tmp_a; double *tmp_high, *tmp_pars; #ifdef TWO_SIDE_DIFFERENTIATION double *tmp_low; #endif tmp_high = vec(num_data); /* numeric derivations */ #ifdef TWO_SIDE_DIFFERENTIATION tmp_low = vec(num_data); #endif tmp_pars = vec(num_params); /* first function values */ call_gnuplot(a, zfunc); /* then derivatives */ for (p = 0; p < num_params; p++) tmp_pars[p] = a[p]; for (p = 0; p < num_params; p++) { tmp_a = fabs(a[p]) < NEARLY_ZERO ? NEARLY_ZERO : a[p]; tmp_pars[p] = tmp_a * (1 + DELTA); call_gnuplot(tmp_pars, tmp_high); #ifdef TWO_SIDE_DIFFERENTIATION tmp_pars[p] = tmp_a * (1 - DELTA); call_gnuplot(tmp_pars, tmp_low); #endif for (k = 0; k < num_data; k++) #ifdef TWO_SIDE_DIFFERENTIATION dzda[k][p] = (tmp_high[k] - tmp_low[k]) / (2 * tmp_a * DELTA); #else dzda[k][p] = (tmp_high[k] - zfunc[k]) / (tmp_a * DELTA); #endif tmp_pars[p] = a[p]; } #ifdef TWO_SIDE_DIFFERENTIATION free(tmp_low); #endif free(tmp_high); free(tmp_pars); } /***************************************************************** call internal gnuplot functions *****************************************************************/ static void call_gnuplot(double *par, double *data) { int i, j; struct value v; /* set parameters first */ for (i = 0; i < num_params; i++) { (void) Gcomplex(&v, par[i], 0.0); setvar(par_name[i], v); } for (i = 0; i < num_data; i++) { /* calculate fit-function value */ /* initialize extra dummy variables from the corresponding actual variables, if any. */ for (j=0; j<5; j++) { struct udvt_entry *udv = add_udv_by_name(c_dummy_var[j]); (void) Gcomplex(&func.dummy_values[j], udv->udv_undef ? 0 : getdvar(c_dummy_var[j]), 0.0); } /* set actual dummy variables from file data */ for (j=0; j<num_indep; j++) (void) Gcomplex(&func.dummy_values[j], fit_x[i*num_indep+j], 0.0); evaluate_at(func.at, &v); if (undefined) Eex("Undefined value during function evaluation"); data[i] = real(&v); } } /***************************************************************** handle user interrupts during fit *****************************************************************/ static TBOOLEAN fit_interrupt() { while (TRUE) { fputs("\n\n(S)top fit, (C)ontinue, (E)xecute FIT_SCRIPT: ", STANDARD); #ifdef WIN32 WinRaiseConsole(); #endif switch (getchar()) { case EOF: case 's': case 'S': fputs("Stop.\n", STANDARD); user_stop = TRUE; return FALSE; case 'c': case 'C': fputs("Continue.\n", STANDARD); return TRUE; case 'e': case 'E':{ int i; struct value v; const char *tmp; tmp = fit_script ? fit_script : DEFAULT_CMD; fprintf(STANDARD, "executing: %s", tmp); /* set parameters visible to gnuplot */ for (i = 0; i < num_params; i++) { (void) Gcomplex(&v, a[i], 0.0); setvar(par_name[i], v); } do_string(tmp); } } } return TRUE; } /***************************************************************** frame routine for the marquardt-fit *****************************************************************/ static TBOOLEAN regress(double a[]) { double **covar, *dpar, **C, chisq, last_chisq, lambda; int iter, i, j; marq_res_t res; struct udvt_entry *v; /* For exporting results to the user */ chisq = last_chisq = INFINITY; C = matr(num_data + num_params, num_params); lambda = -1; /* use sign as flag */ iter = 0; /* iteration counter */ /* ctrlc now serves as Hotkey */ ctrlc_setup(); /* Initialize internal variables and 1st chi-square check */ if ((res = marquardt(a, C, &chisq, &lambda)) == ML_ERROR) Eex("FIT: error occurred during fit"); res = BETTER; if (!fit_quiet) show_fit(iter, chisq, chisq, a, lambda, STANDARD); show_fit(iter, chisq, chisq, a, lambda, log_f); /* Reset flag describing fit result status */ v = add_udv_by_name("FIT_CONVERGED"); v->udv_undef = FALSE; Ginteger(&v->udv_value, 0); /* MAIN FIT LOOP: do the regression iteration */ /* HBB 981118: initialize new variable 'user_break' */ user_stop = FALSE; /* FIXME: This really should not be necessary, but it is not properly initialised in wgnuplot otherwise. */ ctrlc_flag = FALSE; do { /* * MSDOS defines signal(SIGINT) but doesn't handle it through * real interrupts. So there remain cases in which a ctrl-c may * be uncaught by signal. We must use kbhit() instead that really * serves the keyboard interrupt (or write an own interrupt func * which also generates #ifdefs) * * I hope that other OSes do it better, if not... add #ifdefs :-( * EMX does not have kbhit. * * HBB: I think this can be enabled for DJGPP V2. SIGINT is actually * handled there, AFAIK. */ #if (defined(MSDOS) && !defined(__EMX__)) if (kbhit()) { do { getchx(); } while (kbhit()); ctrlc_flag = TRUE; } #endif #ifdef WIN32 /* This call makes the Windows GUI functional during fits. Pressing Ctrl-Break now finally has an effect. */ WinMessageLoop(); #endif if (ctrlc_flag) { show_fit(iter, chisq, last_chisq, a, lambda, STANDARD); ctrlc_flag = FALSE; if (!fit_interrupt()) /* handle keys */ break; } if (res == BETTER) { iter++; last_chisq = chisq; } if ((res = marquardt(a, C, &chisq, &lambda)) == BETTER) if (!fit_quiet) show_fit(iter, chisq, last_chisq, a, lambda, STANDARD); } while ((res != ML_ERROR) && (lambda < MAX_LAMBDA) && ((maxiter == 0) || (iter <= maxiter)) && (res == WORSE || ((chisq > NEARLY_ZERO) ? ((last_chisq - chisq) / chisq) : (last_chisq - chisq)) > epsilon ) ); /* fit done */ /* restore original SIGINT function */ interrupt_setup(); /* HBB 970304: the maxiter patch: */ if ((maxiter > 0) && (iter > maxiter)) { Dblf2("\nMaximum iteration count (%d) reached. Fit stopped.\n", maxiter); } else if (user_stop) { Dblf2("\nThe fit was stopped by the user after %d iterations.\n", iter); } else if (lambda >= MAX_LAMBDA) { Dblf2("\nThe maximum lambda = %e was exceeded. Fit stopped.\n", MAX_LAMBDA); } else { Dblf2("\nAfter %d iterations the fit converged.\n", iter); v = add_udv_by_name("FIT_CONVERGED"); v->udv_undef = FALSE; Ginteger(&v->udv_value, 1); } Dblf2("final sum of squares of residuals : %g\n", chisq); if (chisq > NEARLY_ZERO) { Dblf2("rel. change during last iteration : %g\n\n", (chisq - last_chisq) / chisq); } else { Dblf2("abs. change during last iteration : %g\n\n", (chisq - last_chisq)); } if (res == ML_ERROR) Eex("FIT: error occurred during fit"); /* compute errors in the parameters */ if (fit_errorvariables) /* Set error variable to zero before doing this */ /* Thus making sure they are created */ for (i = 0; i < num_params; i++) setvarerr(par_name[i], 0.0); if (num_data == num_params) { int k; Dblf("\nExactly as many data points as there are parameters.\n"); Dblf("In this degenerate case, all errors are zero by definition.\n\n"); Dblf("Final set of parameters \n"); Dblf("======================= \n\n"); for (k = 0; k < num_params; k++) Dblf3("%-15.15s = %-15g\n", par_name[k], a[k]); } else if (chisq < NEARLY_ZERO) { int k; Dblf("\nHmmmm.... Sum of squared residuals is zero. Can't compute errors.\n\n"); Dblf("Final set of parameters \n"); Dblf("======================= \n\n"); for (k = 0; k < num_params; k++) Dblf3("%-15.15s = %-15g\n", par_name[k], a[k]); } else { int ndf = num_data - num_params; double stdfit = sqrt(chisq/ndf); Dblf2("degrees of freedom (FIT_NDF) : %d\n", ndf); Dblf2("rms of residuals (FIT_STDFIT) = sqrt(WSSR/ndf) : %g\n", stdfit); Dblf2("variance of residuals (reduced chisquare) = WSSR/ndf : %g\n\n", chisq/ndf); /* Export these to user-accessible variables */ v = add_udv_by_name("FIT_NDF"); v->udv_undef = FALSE; Ginteger(&v->udv_value, ndf); v = add_udv_by_name("FIT_STDFIT"); v->udv_undef = FALSE; Gcomplex(&v->udv_value, stdfit, 0); v = add_udv_by_name("FIT_WSSR"); v->udv_undef = FALSE; Gcomplex(&v->udv_value, chisq, 0); /* get covariance-, Correlations- and Kurvature-Matrix */ /* and errors in the parameters */ /* compute covar[][] directly from C */ Givens(C, 0, 0, 0, num_data, num_params, 0); /* Use lower square of C for covar */ covar = C + num_data; Invert_RtR(C, covar, num_params); /* calculate unscaled parameter errors in dpar[]: */ dpar = vec(num_params); for (i = 0; i < num_params; i++) { /* FIXME: can this still happen ? */ if (covar[i][i] <= 0.0) /* HBB: prevent floating point exception later on */ Eex("Calculation error: non-positive diagonal element in covar. matrix"); dpar[i] = sqrt(covar[i][i]); } /* transform covariances into correlations */ for (i = 0; i < num_params; i++) { /* only lower triangle needs to be handled */ for (j = 0; j <= i; j++) covar[i][j] /= dpar[i] * dpar[j]; } /* scale parameter errors based on chisq */ for (i = 0; i < num_params; i++) dpar[i] *= stdfit; Dblf("Final set of parameters Asymptotic Standard Error\n"); Dblf("======================= ==========================\n\n"); for (i = 0; i < num_params; i++) { double temp = (fabs(a[i]) < NEARLY_ZERO) ? 0.0 : fabs(100.0 * dpar[i] / a[i]); Dblf6("%-15.15s = %-15g %-3.3s %-12.4g (%.4g%%)\n", par_name[i], a[i], PLUSMINUS, dpar[i], temp); if (fit_errorvariables) setvarerr(par_name[i], dpar[i]); } Dblf("\n\ncorrelation matrix of the fit parameters:\n\n"); Dblf(" "); for (j = 0; j < num_params; j++) Dblf2("%-6.6s ", par_name[j]); Dblf("\n"); for (i = 0; i < num_params; i++) { Dblf2("%-15.15s", par_name[i]); for (j = 0; j <= i; j++) { /* Only print lower triangle of symmetric matrix */ Dblf2("%6.3f ", covar[i][j]); } Dblf("\n"); } free(dpar); } /* HBB 990220: re-imported this snippet from older versions. Finally, * some user noticed that it *is* necessary, after all. Not even * Carsten Grammes himself remembered what it was for... :-( * The thing is: the value of the last parameter is not reset to * its original one after the derivatives have been calculated */ /* restore last parameter's value (not done by calculate) */ { struct value val; Gcomplex(&val, a[num_params - 1], 0.0); setvar(par_name[num_params - 1], val); } /* call destructor for allocated vars */ lambda = -2; /* flag value, meaning 'destruct!' */ (void) marquardt(a, C, &chisq, &lambda); free_matr(C); return TRUE; } /***************************************************************** display actual state of the fit *****************************************************************/ static void show_fit( int i, double chisq, double last_chisq, double *a, double lambda, FILE *device) { int k; fprintf(device, "\n\n\ Iteration %d\n\ WSSR : %-15g delta(WSSR)/WSSR : %g\n\ delta(WSSR) : %-15g limit for stopping : %g\n\ lambda : %g\n\n%s parameter values\n\n", i, chisq, chisq > NEARLY_ZERO ? (chisq - last_chisq) / chisq : 0.0, chisq - last_chisq, epsilon, lambda, (i > 0 ? "resultant" : "initial set of free")); for (k = 0; k < num_params; k++) fprintf(device, "%-15.15s = %g\n", par_name[k], a[k]); } /***************************************************************** is_empty: check for valid string entries *****************************************************************/ static TBOOLEAN is_empty(char *s) { while (*s == ' ' || *s == '\t' || *s == '\n') s++; return (TBOOLEAN) (*s == '#' || *s == '\0'); } /***************************************************************** get next word of a multi-word string, advance pointer *****************************************************************/ static char * get_next_word(char **s, char *subst) { char *tmp = *s; while (*tmp == ' ' || *tmp == '\t' || *tmp == '=') tmp++; if (*tmp == '\n' || *tmp == '\0') /* not found */ return NULL; if ((*s = strpbrk(tmp, " =\t\n")) == NULL) *s = tmp + strlen(tmp); *subst = **s; *(*s)++ = '\0'; return tmp; } /***************************************************************** check for variable identifiers *****************************************************************/ static TBOOLEAN is_variable(char *s) { while (*s != '\0') { if (!isalnum((unsigned char) *s) && *s != '_') return FALSE; s++; } return TRUE; } /***************************************************************** first time settings *****************************************************************/ void init_fit() { func.at = (struct at_type *) NULL; /* need to parse 1 time */ } /***************************************************************** Set a GNUPLOT user-defined variable ******************************************************************/ static void setvar(char *varname, struct value data) { struct udvt_entry *udv_ptr = add_udv_by_name(varname); udv_ptr->udv_value = data; udv_ptr->udv_undef = FALSE; } /***************************************************************** Set a GNUPLOT user-defined variable for an error variable: so take the parameter name, turn it into an error parameter name (e.g. a to a_err) and then set it. ******************************************************************/ static void setvarerr(char *varname, double value) { struct value errval; /* This will hold the gnuplot value created from value*/ char* pErrValName; /* The name of the (new) error variable */ /* Create the variable name by appending _err */ pErrValName = gp_alloc(strlen(varname)+sizeof(char)+4, ""); sprintf(pErrValName,"%s_err",varname); Gcomplex(&errval, value, 0.0); setvar(pErrValName, errval); free(pErrValName); } /***************************************************************** Read INTGR Variable value, return 0 if undefined or wrong type *****************************************************************/ static int getivar(const char *varname) { struct udvt_entry *udv_ptr = first_udv; while (udv_ptr) { if (!strcmp(varname, udv_ptr->udv_name)) return udv_ptr->udv_value.type == INTGR ? udv_ptr->udv_value.v.int_val /* valid */ : 0; /* wrong type */ udv_ptr = udv_ptr->next_udv; } return 0; /* not in table */ } /***************************************************************** Read DOUBLE Variable value, return 0 if undefined or wrong type I don't think it's a problem that it's an integer - div *****************************************************************/ static double getdvar(const char *varname) { struct udvt_entry *udv_ptr = first_udv; for (; udv_ptr; udv_ptr = udv_ptr->next_udv) if (strcmp(varname, udv_ptr->udv_name) == 0) return real(&(udv_ptr->udv_value)); /* get here => not found */ return 0; } /***************************************************************** like getdvar, but - convert it from integer to real if necessary - create it with value INITIAL_VALUE if not found or undefined *****************************************************************/ static double createdvar(char *varname, double value) { struct udvt_entry *udv_ptr = first_udv; for (; udv_ptr; udv_ptr = udv_ptr->next_udv) if (strcmp(varname, udv_ptr->udv_name) == 0) { if (udv_ptr->udv_undef) { udv_ptr->udv_undef = 0; (void) Gcomplex(&udv_ptr->udv_value, value, 0.0); } else if (udv_ptr->udv_value.type == INTGR) { (void) Gcomplex(&udv_ptr->udv_value, (double) udv_ptr->udv_value.v.int_val, 0.0); } return real(&(udv_ptr->udv_value)); } /* get here => not found */ { struct value tempval; (void) Gcomplex(&tempval, value, 0.0); setvar(varname, tempval); } return value; } /***************************************************************** Split Identifier into path and filename *****************************************************************/ static void splitpath(char *s, char *p, char *f) { char *tmp = s + strlen(s) - 1; while (tmp >= s && *tmp != '\\' && *tmp != '/' && *tmp != ':') tmp--; /* FIXME HBB 20010121: unsafe! Sizes of 'f' and 'p' are not known. * May write past buffer end. */ strcpy(f, tmp + 1); memcpy(p, s, (size_t) (tmp - s + 1)); p[tmp - s + 1] = NUL; } /* argument: char *fn */ #define VALID_FILENAME(fn) ((fn) != NULL && (*fn) != '\0') /***************************************************************** write the actual parameters to start parameter file *****************************************************************/ void update(char *pfile, char *npfile) { char fnam[256], path[256], sstr[256], pname[64], tail[127], *s = sstr, *tmp, c; char ifilename[256], *ofilename; FILE *of, *nf; double pval; /* update pfile npfile: if npfile is a valid file name, take pfile as input file and npfile as output file */ if (VALID_FILENAME(npfile)) { safe_strncpy(ifilename, pfile, sizeof(ifilename)); ofilename = npfile; } else { #ifdef BACKUP_FILESYSTEM /* filesystem will keep original as previous version */ safe_strncpy(ifilename, pfile, sizeof(ifilename)); #else backup_file(ifilename, pfile); /* will Eex if it fails */ #endif ofilename = pfile; } /* split into path and filename */ splitpath(ifilename, path, fnam); if (!(of = loadpath_fopen(ifilename, "r"))) Eex2("parameter file %s could not be read", ifilename); if (!(nf = fopen(ofilename, "w"))) Eex2("new parameter file %s could not be created", ofilename); while (fgets(s = sstr, sizeof(sstr), of) != NULL) { if (is_empty(s)) { fputs(s, nf); /* preserve comments */ continue; } if ((tmp = strchr(s, '#')) != NULL) { safe_strncpy(tail, tmp, sizeof(tail)); *tmp = NUL; } else strcpy(tail, "\n"); tmp = get_next_word(&s, &c); if (!is_variable(tmp) || strlen(tmp) > MAX_ID_LEN) { (void) fclose(nf); (void) fclose(of); Eex2("syntax error in parameter file %s", fnam); } safe_strncpy(pname, tmp, sizeof(pname)); /* next must be '=' */ if (c != '=') { tmp = strchr(s, '='); if (tmp == NULL) { (void) fclose(nf); (void) fclose(of); Eex2("syntax error in parameter file %s", fnam); } s = tmp + 1; } tmp = get_next_word(&s, &c); if (!sscanf(tmp, "%lf", &pval)) { (void) fclose(nf); (void) fclose(of); Eex2("syntax error in parameter file %s", fnam); } if ((tmp = get_next_word(&s, &c)) != NULL) { (void) fclose(nf); (void) fclose(of); Eex2("syntax error in parameter file %s", fnam); } /* now modify */ if ((pval = getdvar(pname)) == 0) pval = (double) getivar(pname); sprintf(sstr, "%g", pval); if (!strchr(sstr, '.') && !strchr(sstr, 'e')) strcat(sstr, ".0"); /* assure CMPLX-type */ fprintf(nf, "%-15.15s = %-15.15s %s", pname, sstr, tail); } if (fclose(nf) || fclose(of)) Eex("I/O error during update"); } /***************************************************************** Backup a file by renaming it to something useful. Return the new name in tofile *****************************************************************/ /* tofile must point to a char array[] or allocated data. See update() */ static void backup_file(char *tofile, const char *fromfile) { #if defined(MSDOS) || defined(VMS) char *tmpn; #endif /* first attempt, for all o/s other than MSDOS */ #ifndef MSDOS strcpy(tofile, fromfile); #ifdef VMS /* replace all dots with _, since we will be adding the only * dot allowed in VMS names */ while ((tmpn = strchr(tofile, '.')) != NULL) *tmpn = '_'; #endif /*VMS */ strcat(tofile, BACKUP_SUFFIX); if (rename(fromfile, tofile) == 0) return; /* hurrah */ if (existfile(tofile)) Eex2("The backup file %s already exists and will not be overwritten.", tofile); #endif #ifdef MSDOS /* first attempt for msdos. */ /* Copy only the first 8 characters of the filename, to comply * with the restrictions of FAT filesystems. */ safe_strncpy(tofile, fromfile, 8 + 1); while ((tmpn = strchr(tofile, '.')) != NULL) *tmpn = '_'; strcat(tofile, BACKUP_SUFFIX); if (rename(fromfile, tofile) == 0) return; /* success */ #endif /* MSDOS */ /* get here => rename failed. */ Eex3("Could not rename file %s to %s", fromfile, tofile); } /* A modified copy of save.c:save_range(), but this one reports * _current_ values, not the 'set' ones, by default */ static void log_axis_restriction(FILE *log_f, AXIS_INDEX axis, char *name) { char s[80]; AXIS *this_axis = axis_array + axis; fprintf(log_f, " %s range restricted to [", name); if (this_axis->autoscale & AUTOSCALE_MIN) { putc('*', log_f); } else if (this_axis->datatype == DT_TIMEDATE) { putc('"', log_f); gstrftime(s, 80, this_axis->timefmt, this_axis->min); fputs(s, log_f); putc('"', log_f); } else { fprintf(log_f, "%#g", this_axis->min); } fputs(" : ", log_f); if (this_axis->autoscale & AUTOSCALE_MAX) { putc('*', log_f); } else if (this_axis->datatype == DT_TIMEDATE) { putc('"', log_f); gstrftime(s, 80, this_axis->timefmt, this_axis->max); fputs(s, log_f); putc('"', log_f); } else { fprintf(log_f, "%#g", this_axis->max); } fputs("]\n", log_f); } /***************************************************************** Interface to the classic gnuplot-software *****************************************************************/ void fit_command() { /* HBB 20000430: revised this completely, to make it more similar to * what plot3drequest() does */ int num_ranges=0; /* # range specs */ static int var_order[]={FIRST_X_AXIS, FIRST_Y_AXIS, T_AXIS, U_AXIS, V_AXIS, FIRST_Z_AXIS}; static char dummy_default[MAX_NUM_VAR][MAX_ID_LEN+1]={"x","y","t","u","v","z"}; int dummy_token[7] = {-1,-1,-1,-1,-1,-1,-1}; int num_points=0; /* number of data points read from file */ int skipped[12]; /* num points out of range */ int zrange_token = -1; int i, j; double v[7]; double tmpd; time_t timer; int token1, token2, token3; char *tmp, *file_name; AXIS saved_axis; c_token++; /* first look for a restricted x fit range... */ /* put stuff into arrays to simplify access */ AXIS_INIT3D(FIRST_X_AXIS, 0, 0); AXIS_INIT3D(FIRST_Y_AXIS, 0, 0); AXIS_INIT3D(T_AXIS, 0, 0); AXIS_INIT3D(U_AXIS, 0, 0); AXIS_INIT3D(V_AXIS, 0, 0); AXIS_INIT3D(FIRST_Z_AXIS, 0, 1); /* use global default indices in axis.c to simplify access to * per-axis variables */ x_axis = FIRST_X_AXIS; y_axis = FIRST_Y_AXIS; z_axis = FIRST_Z_AXIS; /* JRV 20090201: Parsing the range specs would be much simpler if * we knew how many independent variables we had, but we won't * know that until parsing the using specs. Assume we have one * independent variable to start with (x), and adjust later * if needed. */ while (equals(c_token, "[")) { int i; if (num_ranges > 5) int_error(c_token, "only 6 range specs are permitted"); i=var_order[num_ranges]; /* Store the Z axis dummy variable and range (if any) in the axis * for the next independent variable. Save the current values to be * restored later if there are fewer than 5 independent variables. */ saved_axis = axis_array[i]; dummy_token[6] = dummy_token[i]; dummy_token[num_ranges] = -1; dummy_token[num_ranges] = parse_named_range(i, dummy_token[num_ranges]); zrange_token = c_token; num_ranges++; } /* now compile the function */ token1 = c_token; if (func.at) { free_at(func.at); func.at = NULL; /* in case perm_at() does int_error */ } dummy_func = &func; /* set all five dummy variable names, even if we're using fewer */ strcpy(dummy_default[0], set_dummy_var[0]); strcpy(dummy_default[1], set_dummy_var[1]); for (i=0; i<5; i++){ if (dummy_token[i] >= 0) copy_str(c_dummy_var[i], dummy_token[i], MAX_ID_LEN); else strcpy(c_dummy_var[i], dummy_default[i]); } func.at = perm_at(); /* parse expression and save action table */ dummy_func = NULL; token2 = c_token; /* get filename */ file_name = try_to_get_string(); if (!file_name) int_error(c_token, "missing filename"); /* use datafile module to parse the datafile and qualifiers */ df_set_plot_mode(MODE_QUERY); /* Does nothing except for binary datafiles */ columns = df_open(file_name, 7, NULL); /* up to 7 using specs allowed */ free(file_name); if (columns < 0) int_error(NO_CARET,"Can't read data file"); if (columns == 1) int_error(c_token, "Need 2 to 7 using specs"); num_indep = (columns < 3) ? 1 : columns - 2; /* The following patch was made by Remko Scharroo, 25-Mar-1999 * We need to check if one of the columns is time data, like * in plot2d and plot3d */ if (X_AXIS.datatype == DT_TIMEDATE) { if (columns < 2) int_error(c_token, "Need full using spec for x time data"); } if (Y_AXIS.datatype == DT_TIMEDATE) { if (columns < 1) int_error(c_token, "Need using spec for y time data"); } /* No need for a time data check for the remaining axes. Those * axes are only used iff columns>3, i.e. there are using specs * for all the columns, already. */ for (i=0; i<num_indep; i++) df_axis[i] = var_order[i]; df_axis[i++] = FIRST_Z_AXIS; /* don't parse sigma_z as times */ df_axis[i] = NO_AXIS; /* HBB 980401: if this is a single-variable fit, we shouldn't have * allowed a variable name specifier for 'y': */ if ((dummy_token[1] >= 0) && (num_indep==1)) int_error(dummy_token[1], "Can't re-name 'y' in a one-variable fit"); /* depending on number of independent variables, the last range * spec may be for the Z axis */ if (num_ranges > num_indep+1) int_error(zrange_token, "Too many range-specs for a %d-variable fit", num_indep); else if (num_ranges == num_indep+1 && num_indep < 5) { /* last range spec is for the Z axis */ int i = var_order[num_ranges-1]; /* index for the last range spec */ Z_AXIS.autoscale = axis_array[i].autoscale; if (!(axis_array[i].autoscale & AUTOSCALE_MIN)) Z_AXIS.min = axis_array[i].min; if (!(axis_array[i].autoscale & AUTOSCALE_MAX)) Z_AXIS.max = axis_array[i].max; /* restore former values */ axis_array[i] = saved_axis; dummy_token[num_ranges-1] = dummy_token[6]; } /* defer actually reading the data until we have parsed the rest * of the line */ token3 = c_token; tmpd = getdvar(FITLIMIT); /* get epsilon if given explicitly */ if (tmpd < 1.0 && tmpd > 0.0) epsilon = tmpd; else epsilon = DEF_FIT_LIMIT; FPRINTF((STANDARD, "epsilon=%e\n", epsilon)); /* HBB 970304: maxiter patch */ maxiter = getivar(FITMAXITER); if (maxiter < 0) maxiter = 0; FPRINTF((STANDARD, "maxiter=%i\n", maxiter)); /* get startup value for lambda, if given */ tmpd = getdvar(FITSTARTLAMBDA); if (tmpd > 0.0) { startup_lambda = tmpd; Dblf2("lambda start value set: %g\n", startup_lambda); } else { startup_lambda = 0.0; } /* get lambda up/down factor, if given */ tmpd = getdvar(FITLAMBDAFACTOR); if (tmpd > 0.0) { lambda_up_factor = lambda_down_factor = tmpd; Dblf2("lambda scaling factors reset: %g\n", lambda_up_factor); } else { lambda_down_factor = LAMBDA_DOWN_FACTOR; lambda_up_factor = LAMBDA_UP_FACTOR; } free(fit_script); fit_script = NULL; if ((tmp = getenv(FITSCRIPT)) != NULL) { fit_script = gp_strdup(tmp); } { char *logfile = getfitlogfile(); if ((logfile != NULL) && !log_f && !(log_f = fopen(logfile, "a"))) Eex2("could not open log-file %s", logfile); FPRINTF((STANDARD, "log-file=%s\n", logfile)); free(logfile); } fputs("\n\n*******************************************************************************\n", log_f); (void) time(&timer); fprintf(log_f, "%s\n\n", ctime(&timer)); { char *line = NULL; m_capture(&line, token2, token3 - 1); fprintf(log_f, "FIT: data read from %s\n", line); fprintf(log_f, " format = "); free(line); for (i = 0; (i < num_indep) && (i < columns - 1); i++) fprintf(log_f, "%s:", c_dummy_var[i]); fprintf(log_f, (columns <= 2) ? "z\n" : "z:s\n"); } /* report all range specs */ j = FIRST_Z_AXIS; /* check Z axis first */ for (i = 0; i <= num_indep; i++) { if ((axis_array[j].autoscale & AUTOSCALE_BOTH) != AUTOSCALE_BOTH) log_axis_restriction(log_f, j, (i != 0) ? c_dummy_var[i-1] : "z"); j = var_order[i]; } max_data = MAX_DATA; fit_x = vec(max_data * num_indep); /* start with max. value */ fit_z = vec(max_data); err_data = vec(max_data); num_data = 0; for (i=0; i<sizeof(skipped)/sizeof(int); i++) skipped[i] = 0; /* first read in experimental data */ /* If the user has set an explicit locale for numeric input, apply it */ /* here so that it affects data fields read from the input file. */ set_numeric_locale(); while ((i = df_readline(v, 7)) != DF_EOF) { if (num_data >= max_data) { /* increase max_data by factor of 1.5 */ max_data = (max_data * 3) / 2; if (0 || !redim_vec(&fit_x, max_data*num_indep) || !redim_vec(&fit_z, max_data) || !redim_vec(&err_data, max_data) ) { /* Some of the reallocations went bad: */ df_close(); Eex2("Out of memory in fit: too many datapoints (%d)?", max_data); } else { /* Just so we know that the routine is at work: */ fprintf(STANDARD, "Max. number of data points scaled up to: %d\n", max_data); } } /* if (need to extend storage space) */ switch (i) { case DF_MISSING: case DF_UNDEFINED: case DF_FIRST_BLANK: case DF_SECOND_BLANK: continue; case 0: Eex2("bad data on line %d of datafile", df_line_number); break; case 1: /* only z provided */ v[1] = v[0]; v[0] = (double) df_datum; break; case 2: /* x, z */ case 3: /* x, z, error */ case 4: /* x, y, z, error */ case 5: /* x, y, t, z, error */ case 6: /* x, y, t, u, z, error */ case 7: /* x, y, t, u, v, z, error */ break; } num_points++; /* skip this point if it is out of range */ for (i=0; i<num_indep; i++){ int j = var_order[i]; AXIS *this = axis_array + j; if (!(this->autoscale & AUTOSCALE_MIN) && (v[i] < this->min)) { skipped[j]++; goto out_of_range; } if (!(this->autoscale & AUTOSCALE_MAX) && (v[i] > this->max)) { skipped[j]++; goto out_of_range; } fit_x[num_data*num_indep+i] = v[i]; /* save independent variable data */ } /* check Z value too */ { AXIS *this = axis_array + FIRST_Z_AXIS; if (!(this->autoscale & AUTOSCALE_MIN) && (v[i] < this->min)) { skipped[FIRST_Z_AXIS]++; goto out_of_range; } if (!(this->autoscale & AUTOSCALE_MAX) && (v[i] > this->max)) { skipped[FIRST_Z_AXIS]++; goto out_of_range; } fit_z[num_data] = v[i++]; /* save dependent variable data */ } /* only use error from data file if _explicitly_ asked for by * a using spec */ err_data[num_data++] = (columns > 2) ? v[i] : 1; out_of_range: ; } df_close(); /* We are finished reading user input; return to C locale for internal use */ reset_numeric_locale(); if (num_data <= 1) { /* no data! Try to explain why. */ printf(" Read %d points\n", num_points); for (i=0; i<6; i++) { int j = var_order[i]; AXIS *this = axis_array + j; if (skipped[j]){ printf(" Skipped %d points outside range [%s=", skipped[j], i<5 ? c_dummy_var[i] : "z"); if (this->autoscale&AUTOSCALE_MIN) printf("*:"); else printf("%g:",this->min); if (this->autoscale&AUTOSCALE_MAX) printf("*]\n"); else printf("%g]\n",this->max); } } Eex("No data to fit "); } /* now resize fields to actual length: */ redim_vec(&fit_x, num_data*num_indep); redim_vec(&fit_z, num_data); redim_vec(&err_data, num_data); fprintf(log_f, " #datapoints = %d\n", num_data); if (columns < 3) fputs(" residuals are weighted equally (unit weight)\n\n", log_f); { char *line = NULL; m_capture(&line, token1, token2 - 1); fprintf(log_f, "function used for fitting: %s\n", line); free(line); } /* read in parameters */ max_params = MAX_PARAMS; /* HBB 971023: make this resizeable */ if (!equals(c_token++, "via")) int_error(c_token, "Need via and either parameter list or file"); a = vec(max_params); par_name = (fixstr *) gp_alloc((max_params + 1) * sizeof(fixstr), "fit param"); num_params = 0; if (isstringvalue(c_token)) { /* It's a parameter *file* */ TBOOLEAN fixed; double tmp_par; char c, *s; char sstr[MAX_LINE_LEN + 1]; FILE *f; static char *viafile = NULL; free(viafile); /* Free previous name, if any */ viafile = try_to_get_string(); /* Cannot fail since isstringvalue succeeded */ fprintf(log_f, "fitted parameters and initial values from file: %s\n\n", viafile); if (!(f = loadpath_fopen(viafile, "r"))) Eex2("could not read parameter-file \"%s\"", viafile); /* get parameters and values out of file and ignore fixed ones */ while (TRUE) { if (!fgets(s = sstr, sizeof(sstr), f)) /* EOF found */ break; if ((tmp = strstr(s, GP_FIXED)) != NULL) { /* ignore fixed params */ *tmp = NUL; fprintf(log_f, "FIXED: %s\n", s); fixed = TRUE; } else fixed = FALSE; if ((tmp = strchr(s, '#')) != NULL) *tmp = NUL; if (is_empty(s)) continue; tmp = get_next_word(&s, &c); if (!is_variable(tmp) || strlen(tmp) > MAX_ID_LEN) { (void) fclose(f); Eex("syntax error in parameter file"); } safe_strncpy(par_name[num_params], tmp, sizeof(fixstr)); /* next must be '=' */ if (c != '=') { tmp = strchr(s, '='); if (tmp == NULL) { (void) fclose(f); Eex("syntax error in parameter file"); } s = tmp + 1; } tmp = get_next_word(&s, &c); if (sscanf(tmp, "%lf", &tmp_par) != 1) { (void) fclose(f); Eex("syntax error in parameter file"); } /* make fixed params visible to GNUPLOT */ if (fixed) { struct value tempval; (void) Gcomplex(&tempval, tmp_par, 0.0); /* use parname as temp */ setvar(par_name[num_params], tempval); } else { if (num_params >= max_params) { max_params = (max_params * 3) / 2; if (0 || !redim_vec(&a, max_params) || !(par_name = gp_realloc(par_name, (max_params + 1) * sizeof(fixstr), "fit param resize")) ) { (void) fclose(f); Eex("Out of memory in fit: too many parameters?"); } } a[num_params++] = tmp_par; } if ((tmp = get_next_word(&s, &c)) != NULL) { (void) fclose(f); Eex("syntax error in parameter file"); } } (void) fclose(f); } else { /* not a string after via: it's a variable listing */ fputs("fitted parameters initialized with current variable values\n\n", log_f); do { if (!isletter(c_token)) Eex("no parameter specified"); capture(par_name[num_params], c_token, c_token, (int) sizeof(par_name[0])); if (num_params >= max_params) { max_params = (max_params * 3) / 2; if (0 || !redim_vec(&a, max_params) || !(par_name = gp_realloc(par_name, (max_params + 1) * sizeof(fixstr), "fit param resize")) ) { Eex("Out of memory in fit: too many parameters?"); } } /* create variable if it doesn't exist */ a[num_params] = createdvar(par_name[num_params], INITIAL_VALUE); ++num_params; } while (equals(++c_token, ",") && ++c_token); } redim_vec(&a, num_params); par_name = (fixstr *) gp_realloc(par_name, (num_params + 1) * sizeof(fixstr), "fit param"); if (num_data < num_params) Eex("Number of data points smaller than number of parameters"); /* avoid parameters being equal to zero */ for (i = 0; i < num_params; i++) if (a[i] == 0) a[i] = NEARLY_ZERO; if (num_params == 0) int_warn(NO_CARET, "No fittable parameters!\n"); else (void) regress(a); /* fit */ (void) fclose(log_f); log_f = NULL; free(fit_x); free(fit_z); free(err_data); free(a); free(par_name); if (func.at) { free_at(func.at); /* release perm. action table */ func.at = (struct at_type *) NULL; } safe_strncpy(last_fit_command, gp_input_line, sizeof(last_fit_command)); } /* * Print message to stderr and log file */ #if defined(VA_START) && defined(STDC_HEADERS) static void Dblfn(const char *fmt, ...) #else static void Dblfn(const char *fmt, va_dcl) #endif { #ifdef VA_START va_list args; VA_START(args, fmt); # if defined(HAVE_VFPRINTF) || _LIBC if (!fit_quiet) vfprintf(STANDARD, fmt, args); va_end(args); VA_START(args, fmt); vfprintf(log_f, fmt, args); # else if (!fit_quiet) _doprnt(fmt, args, STANDARD); _doprnt(fmt, args, log_f); # endif va_end(args); #else if (!fit_quiet) fprintf(STANDARD, fmt, a1, a2, a3, a4, a5, a6, a7, a8); fprintf(log_f, fmt, a1, a2, a3, a4, a5, a6, a7, a8); #endif /* VA_START */ } /* HBB/H.Harders NEW 20020927: make fit log filename exchangeable at * run-time, not only by setting an environment variable. */ char * getfitlogfile() { char *logfile = NULL; if (fitlogfile == NULL) { char *tmp = getenv(GNUFITLOG); /* open logfile */ if (tmp != NULL && *tmp != '\0') { char *tmp2 = tmp + (strlen(tmp) - 1); /* if given log file name ends in path separator, treat it * as a directory to store the default "fit.log" in */ if (*tmp2 == '/' || *tmp2 == '\\') { logfile = gp_alloc(strlen(tmp) + strlen(fitlogfile_default) + 1, "logfile"); strcpy(logfile, tmp); strcat(logfile, fitlogfile_default); } else { logfile = gp_strdup(tmp); } } else { logfile = gp_strdup(fitlogfile_default); } } else { logfile = gp_strdup(fitlogfile); } return logfile; } ����������������������gnuplot-4.6.4/src/breaders.c������������������������������������������������������������������������0000644�0004711�0000144�00000030133�11764433653�012667� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: breaders.c,v 1.10.2.2 2012/06/08 17:32:55 sfeam Exp $"); } #endif /* GNUPLOT - breaders.c */ /*[ * Copyright 2004 Petr Mikulik * * As part of the program Gnuplot, which is * * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* AUTHOR : Petr Mikulik */ /* * Readers to set up binary data file information for particular formats. */ #include "breaders.h" #include "datafile.h" #include "alloc.h" #include "misc.h" /* * Reader for the ESRF Header File format files (EDF / EHF). */ /* Inside datafile.c, but kept hidden. */ extern int df_no_bin_cols; /* cols to read */ extern df_endianess_type df_bin_file_endianess; extern TBOOLEAN df_matrix_file, df_binary_file; extern void *df_pixeldata; /* Reader for the ESRF Header File format files (EDF / EHF). */ /* gen_table4 */ struct gen_table4 { const char *key; int value; short signum; /* 0..unsigned, 1..signed, 2..float or double */ short sajzof; /* sizeof on 32bit architecture */ }; /* Exactly like lookup_table_nth from tables.c, but for gen_table4 instead * of gen_table. */ static int lookup_table4_nth(const struct gen_table4 *tbl, const char *search_str) { int k = -1; while (tbl[++k].key) if (tbl[k].key && !strncmp(search_str, tbl[k].key, strlen(tbl[k].key))) return k; return -1; /* not found */ } static const struct gen_table4 edf_datatype_table[] = { { "UnsignedByte", DF_UCHAR, 0, 1 }, { "SignedByte", DF_CHAR, 1, 1 }, { "UnsignedShort", DF_USHORT, 0, 2 }, { "SignedShort", DF_SHORT, 1, 2 }, { "UnsignedInteger",DF_UINT, 0, 4 }, { "SignedInteger", DF_INT, 1, 4 }, { "UnsignedLong", DF_ULONG, 0, 8 }, { "SignedLong", DF_LONG, 1, 8 }, { "FloatValue", DF_FLOAT, 2, 4 }, { "DoubleValue", DF_DOUBLE, 2, 8 }, { "Float", DF_FLOAT, 2, 4 }, /* Float and FloatValue are synonyms */ { "Double", DF_DOUBLE, 2, 8 }, /* Double and DoubleValue are synonyms */ { NULL, -1, -1, -1 } }; static const struct gen_table edf_byteorder_table[] = { { "LowByteFirst", DF_LITTLE_ENDIAN }, /* little endian */ { "HighByteFirst", DF_BIG_ENDIAN }, /* big endian */ { NULL, -1 } }; /* Orientation of axes of the raster, as the binary matrix is saved in * the file. */ enum EdfRasterAxes { EDF_RASTER_AXES_XrightYdown, /* matricial format: rows, columns */ EDF_RASTER_AXES_XrightYup /* cartesian coordinate system */ /* other 6 combinations not available (not needed until now) */ }; static const struct gen_table edf_rasteraxes_table[] = { { "XrightYdown", EDF_RASTER_AXES_XrightYdown }, { "XrightYup", EDF_RASTER_AXES_XrightYup }, { NULL, -1 } }; /* Find value_ptr as pointer to the parameter of the given key in the header. * Returns NULL on success. */ static char* edf_findInHeader ( const char* header, const char* key ) { char *value_ptr = strstr( header, key ); if (!value_ptr) return NULL; /* an edf line is "key = value ;" */ value_ptr = 1 + strchr( value_ptr + strlen(key), '=' ); while (isspace(*value_ptr)) value_ptr++; return value_ptr; } void edf_filetype_function(void) { FILE *fp; char *header = NULL; int header_size = 0; char *p; int k; /* open (header) file */ fp = loadpath_fopen(df_filename, "rb"); if (!fp) os_error(NO_CARET, "Can't open data file \"%s\"", df_filename); /* read header: it is a multiple of 512 B ending by "}\n" */ while (header_size == 0 || strncmp(&header[header_size-2],"}\n",2)) { int header_size_prev = header_size; header_size += 512; if (!header) header = gp_alloc(header_size+1, "EDF header"); else header = gp_realloc(header, header_size+1, "EDF header"); header[header_size_prev] = 0; /* protection against empty file */ k = fread(header+header_size_prev, 512, 1, fp); if (k == 0) { /* protection against indefinite loop */ free(header); os_error(NO_CARET, "Damaged EDF header of %s: not multiple of 512 B.\n", df_filename); } header[header_size] = 0; /* end of string: protection against strstr later on */ } fclose(fp); /* make sure there is a binary record structure for each image */ if (df_num_bin_records < 1) df_add_binary_records(1-df_num_bin_records, DF_CURRENT_RECORDS); /* otherwise put here: number of images (records) from this file */ if ((p = edf_findInHeader(header, "EDF_BinaryFileName"))) { int plen = strcspn(p, " ;\n"); df_filename = gp_realloc(df_filename, plen+1, "datafile name"); strncpy(df_filename, p, plen); df_filename[plen] = '\0'; if ((p = edf_findInHeader(header, "EDF_BinaryFilePosition"))) df_bin_record[0].scan_skip[0] = atoi(p); else df_bin_record[0].scan_skip[0] = 0; } else df_bin_record[0].scan_skip[0] = header_size; /* skip header */ /* set default values */ df_bin_record[0].scan_dir[0] = 1; df_bin_record[0].scan_dir[1] = -1; df_bin_record[0].scan_generate_coord = TRUE; df_bin_record[0].cart_scan[0] = DF_SCAN_POINT; df_bin_record[0].cart_scan[1] = DF_SCAN_LINE; df_extend_binary_columns(1); df_set_skip_before(1,0); df_set_skip_after(1,0); df_no_use_specs = 1; use_spec[0].column = 1; /* now parse the header */ if ((p = edf_findInHeader(header, "Dim_1"))) df_bin_record[0].scan_dim[0] = atoi(p); if ((p = edf_findInHeader(header, "Dim_2"))) df_bin_record[0].scan_dim[1] = atoi(p); if ((p = edf_findInHeader(header, "DataType"))) { k = lookup_table4_nth(edf_datatype_table, p); if (k >= 0) { /* known EDF DataType */ int s = edf_datatype_table[k].sajzof; switch (edf_datatype_table[k].signum) { case 0: df_set_read_type(1,SIGNED_TEST(s)); break; case 1: df_set_read_type(1,UNSIGNED_TEST(s)); break; case 2: df_set_read_type(1,FLOAT_TEST(s)); break; } } } if ((p = edf_findInHeader(header, "ByteOrder"))) { k = lookup_table_nth(edf_byteorder_table, p); if (k >= 0) df_bin_file_endianess = edf_byteorder_table[k].value; } /* Origin vs center: EDF specs allows only Center, but it does not hurt if Origin is supported as well; however, Center rules if both specified. */ if ((p = edf_findInHeader(header, "Origin_1"))) { df_bin_record[0].scan_cen_or_ori[0] = atof(p); df_bin_record[0].scan_trans = DF_TRANSLATE_VIA_ORIGIN; } if ((p = edf_findInHeader(header, "Origin_2"))) { df_bin_record[0].scan_cen_or_ori[1] = atof(p); df_bin_record[0].scan_trans = DF_TRANSLATE_VIA_ORIGIN; } if ((p = edf_findInHeader(header, "Center_1"))) { df_bin_record[0].scan_cen_or_ori[0] = atof(p); df_bin_record[0].scan_trans = DF_TRANSLATE_VIA_CENTER; } if ((p = edf_findInHeader(header, "Center_2"))) { df_bin_record[0].scan_cen_or_ori[1] = atof(p); df_bin_record[0].scan_trans = DF_TRANSLATE_VIA_CENTER; } /* now pixel sizes and raster orientation */ if ((p = edf_findInHeader(header, "PSize_1"))) df_bin_record[0].scan_delta[0] = atof(p); if ((p = edf_findInHeader(header, "PSize_2"))) df_bin_record[0].scan_delta[1] = atof(p); if ((p = edf_findInHeader(header, "RasterAxes"))) { k = lookup_table_nth(edf_rasteraxes_table, p); switch (k) { case EDF_RASTER_AXES_XrightYup: df_bin_record[0].scan_dir[0] = 1; df_bin_record[0].scan_dir[1] = 1; df_bin_record[0].cart_scan[0] = DF_SCAN_POINT; df_bin_record[0].cart_scan[1] = DF_SCAN_LINE; break; default: /* also EDF_RASTER_AXES_XrightYdown */ df_bin_record[0].scan_dir[0] = 1; df_bin_record[0].scan_dir[1] = -1; df_bin_record[0].cart_scan[0] = DF_SCAN_POINT; df_bin_record[0].cart_scan[1] = DF_SCAN_LINE; } } free(header); } /* * Use libgd for input of binary images in PNG GIF JPEG formats * Ethan A Merritt - August 2009 */ #define GD_PNG 1 #define GD_GIF 2 #define GD_JPEG 3 void gd_filetype_function __PROTO((int filetype)); void png_filetype_function(void) { gd_filetype_function(GD_PNG); } void gif_filetype_function(void) { gd_filetype_function(GD_GIF); } void jpeg_filetype_function(void) { gd_filetype_function(GD_JPEG); } #ifndef HAVE_GD_PNG void gd_filetype_function(int type) { int_error(NO_CARET, "This copy of gnuplot cannot read png/gif/jpeg images"); } int df_libgd_get_pixel(int i, int j, int component) { return 0; } #else #include <gd.h> static gdImagePtr im = NULL; void gd_filetype_function(int filetype) { FILE *fp; unsigned int M, N; /* free previous image, if any */ if (im) { gdImageDestroy(im); im = NULL; } /* read image into memory */ fp = loadpath_fopen(df_filename, "rb"); if (!fp) int_error(NO_CARET, "Can't open data file \"%s\"", df_filename); switch(filetype) { case GD_PNG: im = gdImageCreateFromPng(fp); break; case GD_GIF: #ifdef HAVE_GD_GIF im = gdImageCreateFromGif(fp); #endif break; case GD_JPEG: #ifdef HAVE_GD_JPEG im = gdImageCreateFromJpeg(fp); #endif default: break; } fclose(fp); if (!im) int_error(NO_CARET, "libgd doesn't recognize the format of \"%s\"", df_filename); /* check on image properties and complain if we can't handle them */ M = im->sx; N = im->sy; FPRINTF((stderr,"This is a %u X %u %s image\n",M,N, im->trueColor ? "TrueColor" : "palette")); df_pixeldata = im->trueColor ? (void *)im->tpixels : (void *)im->pixels; df_matrix_file = FALSE; df_binary_file = TRUE; df_bin_record[0].scan_skip[0] = 0; df_bin_record[0].scan_dim[0] = M; df_bin_record[0].scan_dim[1] = N; df_bin_record[0].scan_dir[0] = 1; df_bin_record[0].scan_dir[1] = -1; df_bin_record[0].scan_generate_coord = TRUE; df_bin_record[0].cart_scan[0] = DF_SCAN_POINT; df_bin_record[0].cart_scan[1] = DF_SCAN_LINE; df_extend_binary_columns(4); df_set_read_type(1, DF_UCHAR); df_set_read_type(2, DF_UCHAR); df_set_read_type(3, DF_UCHAR); df_set_read_type(4, DF_UCHAR); df_set_skip_before(1,0); df_no_use_specs = 4; use_spec[0].column = 1; use_spec[1].column = 2; use_spec[2].column = 3; use_spec[3].column = 4; } int df_libgd_get_pixel(int i, int j, int component) { static int pixel; int alpha; switch(component) { case 0: pixel = gdImageGetTrueColorPixel(im, i,j); return gdTrueColorGetRed(pixel); case 1: return gdTrueColorGetGreen(pixel); case 2: return gdTrueColorGetBlue(pixel); case 3: /* FIXME? Supposedly runs from 0-127 rather than 0-255 */ alpha = 2 * gdTrueColorGetAlpha(pixel); return (255-alpha); default: return 0; /* shouldn't happen */ } } #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/plot3d.h��������������������������������������������������������������������������0000644�0004711�0000144�00000004564�11465350175�012316� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: plot3d.h,v 1.19 2010/11/06 22:02:37 juhaszp Exp $ */ /* GNUPLOT - plot3d.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_PLOT3D_H # define GNUPLOT_PLOT3D_H #include "syscfg.h" /* typedefs of plot3d.c */ typedef enum en_data_mapping { MAP3D_CARTESIAN, MAP3D_SPHERICAL, MAP3D_CYLINDRICAL } t_data_mapping; /* Variables of plot3d.c needed by other modules: */ extern struct surface_points *first_3dplot; extern int plot3d_num; extern t_data_mapping mapping3d; extern int dgrid3d_row_fineness; extern int dgrid3d_col_fineness; extern int dgrid3d_norm_value; extern int dgrid3d_mode; extern double dgrid3d_x_scale; extern double dgrid3d_y_scale; extern TBOOLEAN dgrid3d; extern TBOOLEAN dgrid3d_kdensity; /* prototypes from plot3d.c */ void plot3drequest __PROTO((void)); void refresh_3dbounds __PROTO((struct surface_points *first_plot, int nplots)); void sp_free __PROTO((struct surface_points *sp)); #endif /* GNUPLOT_PLOT3D_H */ ��������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/graph3d.c�������������������������������������������������������������������������0000644�0004711�0000144�00000312302�12165047315�012421� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: graph3d.c,v 1.253.2.14 2013/07/03 16:18:21 sfeam Exp $"); } #endif /* GNUPLOT - graph3d.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Original Software: * Gershon Elber and many others. * * 19 September 1992 Lawrence Crowl (crowl@cs.orst.edu) * Added user-specified bases for log scaling. * * 3.6 - split graph3d.c into graph3d.c (graph), * util3d.c (intersections, etc) * hidden3d.c (hidden-line removal code) * */ #include "graph3d.h" #include "alloc.h" #include "axis.h" #include "gadgets.h" #include "hidden3d.h" #include "misc.h" #include "term_api.h" #include "util3d.h" #include "util.h" #include "pm3d.h" #include "plot3d.h" #include "color.h" #include "plot.h" /* HBB NEW 20040311: PM3D did already split up grid drawing into two * parts, one before, the other after drawing the main surfaces, as a * poor-man's depth-sorting algorithm. Make this independent of * PM3D. Turn the new option on by default. */ #define USE_GRID_LAYERS 1 static int p_height; static int p_width; /* pointsize * t->h_tic */ static int key_entry_height; /* bigger of t->v_size, pointsize*t->v_tick */ /* is contouring wanted ? */ t_contour_placement draw_contour = CONTOUR_NONE; /* different linestyles are used for contours when set */ TBOOLEAN label_contours = TRUE; /* Want to draw surfaces? FALSE mainly useful in contouring mode */ TBOOLEAN draw_surface = TRUE; /* Was hidden3d display selected by user? */ TBOOLEAN hidden3d = FALSE; int hidden3d_layer = LAYER_BACK; /* Rotation and scale of the 3d view, as controlled by 'set view': */ float surface_rot_z = 30.0; float surface_rot_x = 60.0; float surface_scale = 1.0; float surface_zscale = 1.0; float surface_lscale = 0.0; /* Set by 'set view map': */ int splot_map = FALSE; /* position of the base plane, as given by 'set ticslevel' or 'set xyplane' */ t_xyplane xyplane = { 0.5, FALSE }; /* 'set isosamples' settings */ int iso_samples_1 = ISO_SAMPLES; int iso_samples_2 = ISO_SAMPLES; double xscale3d, yscale3d, zscale3d; double xcenter3d = 0.0; double ycenter3d = 0.0; double zcenter3d = 0.0; typedef enum { ALLGRID, FRONTGRID, BACKGRID, BORDERONLY } WHICHGRID; static void plot3d_impulses __PROTO((struct surface_points * plot)); static void plot3d_lines __PROTO((struct surface_points * plot)); static void plot3d_points __PROTO((struct surface_points * plot, /* FIXME PM3D: */ int p_type)); static void plot3d_vectors __PROTO((struct surface_points * plot)); /* no pm3d for impulses */ static void plot3d_lines_pm3d __PROTO((struct surface_points * plot)); static void get_surface_cbminmax __PROTO((struct surface_points *plot, double *cbmin, double *cbmax)); static void cntr3d_impulses __PROTO((struct gnuplot_contours * cntr, struct lp_style_type * lp)); static void cntr3d_lines __PROTO((struct gnuplot_contours * cntr, struct lp_style_type * lp)); /* HBB UNUSED 20031219 */ /* static void cntr3d_linespoints __PROTO((struct gnuplot_contours * cntr, */ /* struct lp_style_type * lp)); */ static void cntr3d_points __PROTO((struct gnuplot_contours * cntr, struct lp_style_type * lp)); static void check_corner_height __PROTO((struct coordinate GPHUGE * point, double height[2][2], double depth[2][2])); static void setup_3d_box_corners __PROTO((void)); static void draw_3d_graphbox __PROTO((struct surface_points * plot, int plot_count, WHICHGRID whichgrid, int current_layer)); /* HBB 20010118: these should be static, but can't --- HP-UX assembler bug */ void xtick_callback __PROTO((AXIS_INDEX, double place, char *text, struct lp_style_type grid, struct ticmark *userlabels)); void ytick_callback __PROTO((AXIS_INDEX, double place, char *text, struct lp_style_type grid, struct ticmark *userlabels)); void ztick_callback __PROTO((AXIS_INDEX, double place, char *text, struct lp_style_type grid, struct ticmark *userlabels)); static int find_maxl_cntr __PROTO((struct gnuplot_contours * contours, int *count)); static int find_maxl_keys3d __PROTO((struct surface_points *plots, int count, int *kcnt)); static void boundary3d __PROTO((struct surface_points * plots, int count)); /* put entries in the key */ static void key_sample_line __PROTO((int xl, int yl)); static void key_sample_point __PROTO((int xl, int yl, int pointtype)); static void key_sample_line_pm3d __PROTO((struct surface_points *plot, int xl, int yl)); static void key_sample_point_pm3d __PROTO((struct surface_points *plot, int xl, int yl, int pointtype)); static TBOOLEAN can_pm3d = FALSE; static void key_text __PROTO((int xl, int yl, char *text)); static void check_for_variable_color __PROTO((struct surface_points *plot, struct coordinate *point)); static TBOOLEAN get_arrow3d __PROTO((struct arrow_def*, int*, int*, int*, int*)); static void place_arrows3d __PROTO((int)); static void place_labels3d __PROTO((struct text_label * listhead, int layer)); static int map3d_getposition __PROTO((struct position* pos, const char* what, double* xpos, double* ypos, double* zpos)); # define f_max(a,b) GPMAX((a),(b)) # define f_min(a,b) GPMIN((a),(b)) # define i_inrange(z,a,b) inrange((z),(a),(b)) #define apx_eq(x,y) (fabs(x-y) < 0.001) #define ABS(x) ((x) >= 0 ? (x) : -(x)) #define SQR(x) ((x) * (x)) /* Define the boundary of the plot * These are computed at each call to do_plot, and are constant over * the period of one do_plot. They actually only change when the term * type changes and when the 'set size' factors change. */ int xmiddle, ymiddle, xscaler, yscaler; static int ptitl_cnt; static int max_ptitl_len; static int titlelin; static int key_sample_width, key_rows, key_cols, key_col_wth, yl_ref; static double ktitle_lines = 0; /* Boundary and scale factors, in user coordinates */ /* There are several z's to take into account - I hope I get these * right ! * * ceiling_z is the highest z in use * floor_z is the lowest z in use * base_z is the z of the base * min3d_z is the lowest z of the graph area * max3d_z is the highest z of the graph area * * ceiling_z is either max3d_z or base_z, and similarly for floor_z * There should be no part of graph drawn outside * min3d_z:max3d_z - apart from arrows, perhaps */ double floor_z; double ceiling_z, base_z; /* made exportable for PM3D */ transform_matrix trans_mat; /* x and y input range endpoints where the three axes are to be * displayed (left, front-left, and front-right edges of the cube) */ static double xaxis_y, yaxis_x, zaxis_x, zaxis_y; /* ... and the same for the back, right, and front corners */ static double back_x, back_y; static double right_x, right_y; static double front_x, front_y; #ifdef USE_MOUSE int axis3d_o_x, axis3d_o_y, axis3d_x_dx, axis3d_x_dy, axis3d_y_dx, axis3d_y_dy; #endif /* the penalty for convenience of using tic_gen to make callbacks * to tick routines is that we cannot pass parameters very easily. * We communicate with the tick_callbacks using static variables */ /* unit vector (terminal coords) */ static double tic_unitx, tic_unity, tic_unitz; /* calculate the number and max-width of the keys for an splot. * Note that a blank line is issued after each set of contours */ static int find_maxl_keys3d(struct surface_points *plots, int count, int *kcnt) { int mlen, len, surf, cnt; struct surface_points *this_plot; mlen = cnt = 0; this_plot = plots; for (surf = 0; surf < count; this_plot = this_plot->next_sp, surf++) { /* we draw a main entry if there is one, and we are * drawing either surface, or unlabelled contours */ if (this_plot->title && *this_plot->title && !this_plot->title_is_suppressed) { ++cnt; len = estimate_strlen(this_plot->title); if (len > mlen) mlen = len; } if (draw_contour && label_contours && this_plot->contours != NULL) { len = find_maxl_cntr(this_plot->contours, &cnt); if (len > mlen) mlen = len; } } if (kcnt != NULL) *kcnt = cnt; return (mlen); } static int find_maxl_cntr(struct gnuplot_contours *contours, int *count) { int cnt; int mlen, len; struct gnuplot_contours *cntrs = contours; mlen = cnt = 0; while (cntrs) { if (label_contours && cntrs->isNewLevel) { len = estimate_strlen(cntrs->label) - strspn(cntrs->label," "); if (len) cnt++; if (len > mlen) mlen = len; } cntrs = cntrs->next; } *count += cnt; return (mlen); } /* borders of plotting area */ /* computed once on every call to do_plot */ static void boundary3d(struct surface_points *plots, int count) { legend_key *key = &keyT; struct termentry *t = term; int ytlen, i; titlelin = 0; p_height = pointsize * t->v_tic; p_width = pointsize * t->h_tic; if (key->swidth >= 0) key_sample_width = key->swidth * t->h_char + pointsize * t->h_tic; else key_sample_width = 0; key_entry_height = pointsize * t->v_tic * 1.25 * key->vert_factor; if (key_entry_height < t->v_char) { /* is this reasonable ? */ key_entry_height = t->v_char * key->vert_factor; } /* count max_len key and number keys (plot-titles and contour labels) with len > 0 */ max_ptitl_len = find_maxl_keys3d(plots, count, &ptitl_cnt); ytlen = label_width(key->title, &i) - (key->swidth + 2); ktitle_lines = i; if (ytlen > max_ptitl_len) max_ptitl_len = ytlen; key_col_wth = (max_ptitl_len + 4) * t->h_char + key_sample_width; if (lmargin.scalex == screen) plot_bounds.xleft = lmargin.x * (float)t->xmax + 0.5; else if (lmargin.x >= 0) plot_bounds.xleft = lmargin.x * (float)t->h_char + 0.5; else plot_bounds.xleft = t->h_char * 2 + t->h_tic; if (rmargin.scalex == screen) plot_bounds.xright = rmargin.x * (float)t->xmax + 0.5; else /* No tic label on the right side, so ignore rmargin */ plot_bounds.xright = xsize * t->xmax - t->h_char * 2 - t->h_tic; key_rows = ptitl_cnt; key_cols = 1; if (key_rows > key->maxrows && key->maxrows > 0) { key_rows = key->maxrows; key_cols = (ptitl_cnt - 1)/key_rows + 1; } if (key->visible) if ((key->region == GPKEY_AUTO_EXTERIOR_MARGIN || key->region == GPKEY_AUTO_EXTERIOR_LRTBC) && key->margin == GPKEY_BMARGIN) { if (ptitl_cnt > 0) { /* calculate max no cols, limited by label-length */ key_cols = (int) (plot_bounds.xright - plot_bounds.xleft) / ((max_ptitl_len + 4) * t->h_char + key_sample_width); /* HBB 991019: fix division by zero problem */ if (key_cols == 0) key_cols = 1; key_rows = (int) ((ptitl_cnt - 1)/ key_cols) + 1; /* Limit the number of rows if requested by user */ if (key_rows > key->maxrows && key->maxrows > 0) key_rows = key->maxrows; /* now calculate actual no cols depending on no rows */ key_cols = (int) ((ptitl_cnt - 1)/ key_rows) + 1; key_col_wth = (int) (plot_bounds.xright - plot_bounds.xleft) / key_cols; } else { key_rows = key_cols = key_col_wth = 0; } } /* this should also consider the view and number of lines in * xformat || yformat || xlabel || ylabel */ if (bmargin.scalex == screen) plot_bounds.ybot = bmargin.x * (float)t->ymax + 0.5; else if (splot_map && bmargin.x >= 0) plot_bounds.ybot = (float)t->v_char * bmargin.x; else plot_bounds.ybot = t->v_char * 2.5 + 1; if (key->visible) if (key_rows && (key->region == GPKEY_AUTO_EXTERIOR_MARGIN || key->region == GPKEY_AUTO_EXTERIOR_LRTBC) && key->margin == GPKEY_BMARGIN) plot_bounds.ybot += key_rows * key_entry_height + ktitle_lines * t->v_char; if (title.text) { titlelin++; for (i = 0; i < strlen(title.text); i++) { if (title.text[i] == '\\') titlelin++; } } if (tmargin.scalex == screen) plot_bounds.ytop = tmargin.x * (float)t->ymax + 0.5; else /* FIXME: Why no provision for tmargin in terms of character height? */ plot_bounds.ytop = ysize * t->ymax - t->v_char * (titlelin + 1.5) - 1; if (key->visible) if (key->region == GPKEY_AUTO_INTERIOR_LRTBC || ((key->region == GPKEY_AUTO_EXTERIOR_LRTBC || key->region == GPKEY_AUTO_EXTERIOR_MARGIN) && key->margin == GPKEY_RMARGIN)) { /* calculate max no rows, limited by plot_bounds.ytop-plot_bounds.ybot */ i = (int) (plot_bounds.ytop - plot_bounds.ybot) / t->v_char - 1 - ktitle_lines; if (i > key->maxrows && key->maxrows > 0) i = key->maxrows; /* HBB 20030321: div by 0 fix like above */ if (i == 0) i = 1; if (ptitl_cnt > i) { key_cols = (int) ((ptitl_cnt - 1)/ i) + 1; /* now calculate actual no rows depending on no cols */ key_rows = (int) ((ptitl_cnt - 1) / key_cols) + 1; } } if (key->visible) if ((key->region == GPKEY_AUTO_EXTERIOR_LRTBC || key->region == GPKEY_AUTO_EXTERIOR_MARGIN) && key->margin == GPKEY_RMARGIN) { int key_width = key_col_wth * (key_cols - 1) + key_col_wth - 2 * t->h_char; if (rmargin.scalex != screen) plot_bounds.xright -= key_width; } if (key->visible) if ((key->region == GPKEY_AUTO_EXTERIOR_LRTBC || key->region == GPKEY_AUTO_EXTERIOR_MARGIN) && key->margin == GPKEY_LMARGIN) { int key_width = key_col_wth * (key_cols - 1) + key_col_wth - 2 * t->h_char; if (lmargin.scalex != screen) plot_bounds.xleft += key_width; } if (!splot_map && aspect_ratio_3D > 0) { int height = (plot_bounds.ytop - plot_bounds.ybot); int width = (plot_bounds.xright - plot_bounds.xleft); if (height > width) { plot_bounds.ybot += (height-width)/2; plot_bounds.ytop -= (height-width)/2; } else { plot_bounds.xleft += (width-height)/2; plot_bounds.xright -= (width-height)/2; } } if (lmargin.scalex != screen) plot_bounds.xleft += t->xmax * xoffset; if (rmargin.scalex != screen) plot_bounds.xright += t->xmax * xoffset; if (tmargin.scalex != screen) plot_bounds.ytop += t->ymax * yoffset; if (bmargin.scalex != screen) plot_bounds.ybot += t->ymax * yoffset; xmiddle = (plot_bounds.xright + plot_bounds.xleft) / 2; ymiddle = (plot_bounds.ytop + plot_bounds.ybot) / 2; /* HBB: Magic number alert! */ xscaler = ((plot_bounds.xright - plot_bounds.xleft) * 4L) / 7L; yscaler = ((plot_bounds.ytop - plot_bounds.ybot) * 4L) / 7L; /* EAM Aug 2006 - Allow explicit control via set {}margin screen */ if (tmargin.scalex == screen || bmargin.scalex == screen) yscaler = (plot_bounds.ytop - plot_bounds.ybot) / surface_scale; if (rmargin.scalex == screen || lmargin.scalex == screen) xscaler = (plot_bounds.xright - plot_bounds.xleft) / surface_scale; /* EAM Jul 2010 - prevent infinite loop or divide-by-zero if scaling is bad */ if (yscaler == 0) yscaler = 1; if (xscaler == 0) xscaler = 1; /* HBB 20011011: 'set size {square|ratio}' for splots */ if (splot_map && aspect_ratio != 0.0) { double current_aspect_ratio; if (aspect_ratio < 0 && (X_AXIS.max - X_AXIS.min) != 0.0) { current_aspect_ratio = - aspect_ratio * fabs((Y_AXIS.max - Y_AXIS.min) / (X_AXIS.max - X_AXIS.min)); } else current_aspect_ratio = aspect_ratio; /*{{{ set aspect ratio if valid and sensible */ if (current_aspect_ratio >= 0.01 && current_aspect_ratio <= 100.0) { double current = (double)yscaler / xscaler ; double required = current_aspect_ratio * t->v_tic / t->h_tic; if (current > required) /* too tall */ yscaler = xscaler * required; else /* too wide */ xscaler = yscaler / required; } } /* Set default clipping */ if (splot_map) clip_area = &plot_bounds; else if (term->flags & TERM_CAN_CLIP) clip_area = NULL; else clip_area = &canvas; } static TBOOLEAN get_arrow3d( struct arrow_def* arrow, int* sx, int* sy, int* ex, int* ey) { map3d_position(&(arrow->start), sx, sy, "arrow"); if (arrow->relative) { map3d_position_r(&(arrow->end), ex, ey, "arrow"); *ex += *sx; *ey += *sy; } else { map3d_position(&(arrow->end), ex, ey, "arrow"); } return TRUE; } static void place_labels3d(struct text_label *listhead, int layer) { struct text_label *this_label; int x, y; if (term->pointsize) (*term->pointsize)(pointsize); for (this_label = listhead; this_label != NULL; this_label = this_label->next) { if (this_label->layer != layer) continue; /* HBB FIXME 20050428: conflicting types for &x,&y in these * two routines. One takes pointers to unsigned, the other to * signed ints. */ if (layer == LAYER_PLOTLABELS) { double xx, yy; map3d_xy_double(this_label->place.x, this_label->place.y, this_label->place.z, &xx, &yy); x = xx; y = yy; /* Only clip in 2D. EAM - why? */ if (splot_map && clip_point(x, y)) continue; } else map3d_position(&this_label->place, &x, &y, "label"); write_label(x, y, this_label); } } static void place_arrows3d(int layer) { struct arrow_def *this_arrow; BoundingBox *clip_save = clip_area; /* Allow arrows to run off the plot, so long as they are still on the canvas */ if (term->flags & TERM_CAN_CLIP) clip_area = NULL; else clip_area = &canvas; for (this_arrow = first_arrow; this_arrow != NULL; this_arrow = this_arrow->next) { int sx, sy, ex, ey; if (this_arrow->arrow_properties.layer != layer) continue; if (get_arrow3d(this_arrow, &sx, &sy, &ex, &ey)) { term_apply_lp_properties(&(this_arrow->arrow_properties.lp_properties)); apply_3dhead_properties(&(this_arrow->arrow_properties)); draw_clip_arrow(sx, sy, ex, ey, this_arrow->arrow_properties.head); } else { FPRINTF((stderr,"place_arrows3d: skipping out-of-bounds arrow\n")); } } clip_area = clip_save; } /* we precalculate features of the key, to save lots of nested * ifs in code - x,y = user supplied or computed position of key * taken to be inner edge of a line sample */ static int key_sample_left; /* offset from x for left of line sample */ static int key_sample_right; /* offset from x for right of line sample */ static int key_point_offset; /* offset from x for point sample */ static int key_text_left; /* offset from x for left-justified text */ static int key_text_right; /* offset from x for right-justified text */ static int key_size_left; /* distance from x to left edge of box */ static int key_size_right; /* distance from x to right edge of box */ void do_3dplot( struct surface_points *plots, int pcount, /* count of plots in linked list */ int quick) /* !=0 means plot only axes etc., for quick rotation */ { struct termentry *t = term; int surface; struct surface_points *this_plot = NULL; int xl, yl; transform_matrix mat; int key_count; legend_key *key = &keyT; TBOOLEAN pm3d_order_depth = 0; /* Initiate transformation matrix using the global view variables. */ mat_rot_z(surface_rot_z, trans_mat); mat_rot_x(surface_rot_x, mat); mat_mult(trans_mat, trans_mat, mat); mat_scale(surface_scale / 2.0, surface_scale / 2.0, surface_scale / 2.0, mat); mat_mult(trans_mat, trans_mat, mat); /* The extrema need to be set even when a surface is not being * drawn. Without this, gnuplot used to assume that the X and * Y axis started at zero. -RKC */ if (polar) graph_error("Cannot splot in polar coordinate system."); /* done in plot3d.c * if (z_min3d == VERYLARGE || z_max3d == -VERYLARGE || * x_min3d == VERYLARGE || x_max3d == -VERYLARGE || * y_min3d == VERYLARGE || y_max3d == -VERYLARGE) * graph_error("all points undefined!"); */ /* absolute or relative placement of xyplane along z */ if (xyplane.absolute) base_z = AXIS_LOG_VALUE(0, xyplane.z); else base_z = Z_AXIS.min - (Z_AXIS.max - Z_AXIS.min) * xyplane.z; /* If we are to draw the bottom grid make sure zmin is updated properly. */ if (X_AXIS.ticmode || Y_AXIS.ticmode || some_grid_selected()) { if (Z_AXIS.range_flags & RANGE_REVERSE) { floor_z = GPMAX(Z_AXIS.min, base_z); ceiling_z = GPMIN(Z_AXIS.max, base_z); } else { floor_z = GPMIN(Z_AXIS.min, base_z); ceiling_z = GPMAX(Z_AXIS.max, base_z); } } else { floor_z = Z_AXIS.min; ceiling_z = Z_AXIS.max; } /* see comment accompanying similar tests of x_min/x_max and y_min/y_max * in graphics.c:do_plot(), for history/rationale of these tests */ if (X_AXIS.min == X_AXIS.max) graph_error("x_min3d should not equal x_max3d!"); if (Y_AXIS.min == Y_AXIS.max) graph_error("y_min3d should not equal y_max3d!"); if (Z_AXIS.min == Z_AXIS.max) graph_error("z_min3d should not equal z_max3d!"); term_start_plot(); screen_ok = FALSE; /* Sync point for epslatex text positioning */ (term->layer)(TERM_LAYER_BACKTEXT); /* now compute boundary for plot */ boundary3d(plots, pcount); axis_set_graphical_range(FIRST_X_AXIS, plot_bounds.xleft, plot_bounds.xright); axis_set_graphical_range(FIRST_Y_AXIS, plot_bounds.ybot, plot_bounds.ytop); axis_set_graphical_range(FIRST_Z_AXIS, floor_z, ceiling_z); /* SCALE FACTORS */ zscale3d = 2.0 / (ceiling_z - floor_z) * surface_zscale; yscale3d = 2.0 / (Y_AXIS.max - Y_AXIS.min); xscale3d = 2.0 / (X_AXIS.max - X_AXIS.min); /* Allow 'set view equal xy' to adjust rendered length of the X and/or Y axes. */ /* FIXME EAM - This only works correctly if the coordinate system of the */ /* terminal itself is isotropic. E.g. x11 does not work because the x and y */ /* coordinates always run from 0-4095 regardless of the shape of the window. */ xcenter3d = ycenter3d = zcenter3d = 0.0; if (aspect_ratio_3D >= 2) { if (yscale3d > xscale3d) { ycenter3d = 1.0 - xscale3d/yscale3d; yscale3d = xscale3d; } else if (xscale3d > yscale3d) { xcenter3d = 1.0 - yscale3d/xscale3d; xscale3d = yscale3d; } if (aspect_ratio_3D >= 3) zscale3d = xscale3d; } /* Without this the rotation center would be located at */ /* the bottom of the plot. This places it in the middle.*/ zcenter3d = -(ceiling_z - floor_z) / 2.0 * zscale3d + 1; /* Needed for mousing by outboard terminal drivers */ if (splot_map) { AXIS *X = &axis_array[FIRST_X_AXIS]; AXIS *Y = &axis_array[FIRST_Y_AXIS]; int xl, xr, yb, yt; map3d_xy(X->min, Y->min, 0.0, &xl, &yb); map3d_xy(X->max, Y->max, 0.0, &xr, &yt); AXIS_SETSCALE(FIRST_X_AXIS, xl, xr); AXIS_SETSCALE(FIRST_Y_AXIS, yb, yt); axis_set_graphical_range(FIRST_X_AXIS, xl, xr); axis_set_graphical_range(FIRST_Y_AXIS, yb, yt); } /* Initialize palette */ if (!quick) { can_pm3d = is_plot_with_palette() && !make_palette() && term->set_color; } /* Give a chance for rectangles to be behind everything else */ place_objects( first_object, -1, 3); term_apply_lp_properties(&border_lp); /* border linetype */ /* must come before using draw_3d_graphbox() the first time */ setup_3d_box_corners(); /* DRAW GRID AND BORDER */ /* Original behaviour: draw entire grid in back, if 'set grid back': */ /* HBB 20040331: but not if in hidden3d mode */ if (!hidden3d && grid_layer == 0) draw_3d_graphbox(plots, pcount, ALLGRID, LAYER_BACK); else if (splot_map && border_layer == 0) draw_3d_graphbox(plots, pcount, BORDERONLY, LAYER_BACK); #ifdef USE_GRID_LAYERS if (!hidden3d && (grid_layer == -1)) /* Default layering mode. Draw the back part now, but not if * hidden3d is in use, because that relies on all isolated * lines being output after all surfaces have been defined. */ draw_3d_graphbox(plots, pcount, BACKGRID, LAYER_BACK); #endif /* USE_GRID_LAYERS */ /* Clipping in 'set view map' mode should be like 2D clipping */ if (splot_map) { int map_x1, map_y1, map_x2, map_y2; map3d_xy(X_AXIS.min, Y_AXIS.min, base_z, &map_x1, &map_y1); map3d_xy(X_AXIS.max, Y_AXIS.max, base_z, &map_x2, &map_y2); plot_bounds.xleft = map_x1; plot_bounds.xright = map_x2; plot_bounds.ybot = map_y2; plot_bounds.ytop = map_y1; } /* Mar 2009 - This is a change! * Define the clipping area in 3D to lie between the left-most and * right-most graph box edges. This is introduced for the benefit of * zooming in the canvas terminal. It may or may not make any practical * difference for other terminals. If it causes problems, then we will need * a separate BoundingBox structure to track the actual 3D graph box. */ else { int xl, xb, xr, xf, yl, yb, yr, yf; map3d_xy(zaxis_x, zaxis_y, base_z, &xl, &yl); map3d_xy(back_x , back_y , base_z, &xb, &yb); map3d_xy(right_x, right_y, base_z, &xr, &yr); map3d_xy(front_x, front_y, base_z, &xf, &yf); plot_bounds.xleft = GPMIN(xl, xb); /* Always xl? */ plot_bounds.xright = GPMAX(xb, xr); /* Always xr? */ } /* PLACE TITLE */ if (title.text != 0) { unsigned int x, y; int tmpx, tmpy; if (splot_map) { /* case 'set view map' */ int map_x1, map_y1, map_x2, map_y2; int tics_len = 0; if (X_AXIS.ticmode & TICS_MIRROR) { tics_len = (int)(X_AXIS.ticscale * (X_AXIS.tic_in ? -1 : 1) * (term->v_tic)); if (tics_len < 0) tics_len = 0; /* take care only about upward tics */ } map3d_xy(X_AXIS.min, Y_AXIS.min, base_z, &map_x1, &map_y1); map3d_xy(X_AXIS.max, Y_AXIS.max, base_z, &map_x2, &map_y2); /* Distance between the title base line and graph top line or the upper part of tics is as given by character height: */ map3d_position_r(&(title.offset), &tmpx, &tmpy, "3dplot"); #define DEFAULT_Y_DISTANCE 1.0 x = (unsigned int) ((map_x1 + map_x2) / 2 + tmpx); y = (unsigned int) (map_y1 + tics_len + tmpy + (DEFAULT_Y_DISTANCE + titlelin - 0.5) * (t->v_char)); #undef DEFAULT_Y_DISTANCE } else { /* usual 3d set view ... */ map3d_position_r(&(title.offset), &tmpx, &tmpy, "3dplot"); x = (unsigned int) ((plot_bounds.xleft + plot_bounds.xright) / 2 + tmpx); y = (unsigned int) (plot_bounds.ytop + tmpy + titlelin * (t->h_char)); } ignore_enhanced(title.noenhanced); apply_pm3dcolor(&(title.textcolor),t); /* PM: why there is JUST_TOP and not JUST_BOT? We should draw above baseline! * But which terminal understands that? It seems vertical justification does * not work... */ write_multiline(x, y, title.text, CENTRE, JUST_TOP, 0, title.font); reset_textcolor(&(title.textcolor),t); ignore_enhanced(FALSE); } /* PLACE TIMEDATE */ if (timelabel.text) { char str[MAX_LINE_LEN+1]; time_t now; int tmpx, tmpy; unsigned int x, y; map3d_position_r(&(timelabel.offset), &tmpx, &tmpy, "3dplot"); x = t->v_char + tmpx; y = timelabel_bottom ? yoffset * Y_AXIS.max + tmpy + t->v_char : plot_bounds.ytop + tmpy - t->v_char; time(&now); strftime(str, MAX_LINE_LEN, timelabel.text, localtime(&now)); if (timelabel_rotate && (*t->text_angle) (TEXT_VERTICAL)) { if (timelabel_bottom) write_multiline(x, y, str, LEFT, JUST_TOP, TEXT_VERTICAL, timelabel.font); else write_multiline(x, y, str, RIGHT, JUST_TOP, TEXT_VERTICAL, timelabel.font); (*t->text_angle) (0); } else { if (timelabel_bottom) write_multiline(x, y, str, LEFT, JUST_BOT, 0, timelabel.font); else write_multiline(x, y, str, LEFT, JUST_TOP, 0, timelabel.font); } } /* Add 'back' color box */ if (!quick && can_pm3d && is_plot_with_colorbox() && color_box.layer == LAYER_BACK) draw_color_smooth_box(MODE_SPLOT); /* Add 'back' rectangles */ place_objects(first_object, 0, 3); /* PLACE LABELS */ place_labels3d(first_label, 0); /* PLACE ARROWS */ place_arrows3d(0); /* Sync point for epslatex text positioning */ (term->layer)(TERM_LAYER_FRONTTEXT); if (hidden3d && draw_surface && !quick) { init_hidden_line_removal(); reset_hidden_line_removal(); } /* WORK OUT KEY SETTINGS AND DO KEY TITLE / BOX */ if (key->reverse) { key_sample_left = -key_sample_width; key_sample_right = 0; key_text_left = t->h_char; key_text_right = t->h_char * (max_ptitl_len + 1); key_size_right = t->h_char * (max_ptitl_len + 2 + key->width_fix); key_size_left = t->h_char + key_sample_width; } else { key_sample_left = 0; key_sample_right = key_sample_width; key_text_left = -(int) (t->h_char * (max_ptitl_len + 1)); key_text_right = -(int) t->h_char; key_size_left = t->h_char * (max_ptitl_len + 2 + key->width_fix); key_size_right = t->h_char + key_sample_width; } key_point_offset = (key_sample_left + key_sample_right) / 2; xl = key_size_left; /* FIXME: not correct, but otherwise some code paths fail to initialize it! */ if (key->visible && (key->region != GPKEY_USER_PLACEMENT)) { if (key->region != GPKEY_AUTO_INTERIOR_LRTBC && key->margin == GPKEY_BMARGIN) { /* HBB 19990608: why calculate these again? boundary3d has already * done it... */ if (ptitl_cnt > 0) { /* maximise no cols, limited by label-length */ key_cols = (int) (plot_bounds.xright - plot_bounds.xleft) / key_col_wth; if (key_cols < 1) key_cols = 1; key_rows = (int) (ptitl_cnt + key_cols - 1) / key_cols; if (key_rows > key->maxrows && key->maxrows > 0) key_rows = key->maxrows; /* now calculate actual no cols depending on no rows */ key_cols = (int) (ptitl_cnt + key_rows - 1) / key_rows; key_col_wth = (int) (plot_bounds.xright - plot_bounds.xleft) / key_cols; /* we divide into columns, then centre in column by considering * ratio of key_left_size to key_right_size * key_size_left/(key_size_left+key_size_right) * * (plot_bounds.xright-plot_bounds.xleft)/key_cols * do one integer division to maximise accuracy (hope we dont * overflow !) */ xl = plot_bounds.xleft + ((plot_bounds.xright - plot_bounds.xleft) * key_size_left) / (key_cols * (key_size_left + key_size_right)); yl = yoffset * t->ymax + (key_rows) * key_entry_height + (ktitle_lines + 2) * t->v_char; } } else { if (key->vpos == JUST_TOP) { yl = plot_bounds.ytop - t->v_tic - t->v_char; } else { yl = plot_bounds.ybot + t->v_tic + key_entry_height * key_rows + ktitle_lines * t->v_char; } if (key->region != GPKEY_AUTO_INTERIOR_LRTBC && key->margin == GPKEY_RMARGIN) { /* keys outside plot border (right) */ xl = plot_bounds.xright + t->h_tic + key_size_left; } else if (key->region != GPKEY_AUTO_INTERIOR_LRTBC && key->margin == GPKEY_LMARGIN) { /* keys outside plot border (left) */ xl = key_size_left + 2 * t->h_char; } else if (key->hpos == LEFT) { xl = plot_bounds.xleft + t->h_tic + key_size_left; } else if (rmargin.scalex == screen && (key->region == GPKEY_AUTO_EXTERIOR_LRTBC || key->region == GPKEY_AUTO_EXTERIOR_MARGIN)) { xl = plot_bounds.xright - key_size_right + key_col_wth - 2 * t->h_char; } else { xl = plot_bounds.xright - key_size_right - key_col_wth * (key_cols - 1); } } yl_ref = yl - ktitle_lines * t->v_char; } if (key->region == GPKEY_USER_PLACEMENT) { map3d_position(&key->user_pos, &xl, &yl, "key"); } /* Key bounds */ key->bounds.xright = xl + key_col_wth * (key_cols - 1) + key_size_right; key->bounds.xleft = xl - key_size_left; key->bounds.ytop = yl + t->v_char * ktitle_lines; key->bounds.ybot = yl - key_entry_height * key_rows; if (key->bounds.xleft < 0) key->bounds.xleft = 0; /* Key title */ if (key->visible && (*key->title)) { int center = (key->bounds.xright + key->bounds.xleft) / 2; double extra_height = 0.0; if (key->textcolor.type == TC_RGB && key->textcolor.value < 0) apply_pm3dcolor(&(key->box.pm3d_color), t); else apply_pm3dcolor(&(key->textcolor), t); if ((t->flags & TERM_ENHANCED_TEXT) && strchr(key->title,'^')) extra_height += 0.51; write_multiline(center, key->bounds.ytop - (0.5 + extra_height/2.0) * t->v_char, key->title, CENTRE, JUST_TOP, 0, key->font); if ((t->flags & TERM_ENHANCED_TEXT) && strchr(key->title,'_')) extra_height += 0.3; ktitle_lines += extra_height; yl -= t->v_char * extra_height; key->bounds.ybot -= t->v_char * extra_height; (*t->linetype)(LT_BLACK); } /* Key box */ if (key->visible && key->box.l_type > LT_NODRAW && key->bounds.ytop != key->bounds.ybot) { int tmp = (int)(0.5 * key->height_fix * t->v_char); key->bounds.ybot -= 2*tmp; yl -= tmp; term_apply_lp_properties(&key->box); newpath(); (*t->move) (key->bounds.xleft, key->bounds.ybot); (*t->vector) (key->bounds.xleft, key->bounds.ytop); (*t->vector) (key->bounds.xright, key->bounds.ytop); (*t->vector) (key->bounds.xright, key->bounds.ybot); (*t->vector) (key->bounds.xleft, key->bounds.ybot); closepath(); /* draw a horizontal line between key title and first entry JFi */ (*t->move) (key->bounds.xleft, key->bounds.ytop - (ktitle_lines) * t->v_char); (*t->vector) (key->bounds.xright, key->bounds.ytop - (ktitle_lines) * t->v_char); } /* DRAW SURFACES AND CONTOURS */ if (hidden3d && (hidden3d_layer == LAYER_BACK) && draw_surface && !quick) { (term->layer)(TERM_LAYER_BEFORE_PLOT); plot3d_hidden(plots, pcount); (term->layer)(TERM_LAYER_AFTER_PLOT); } /* Set up bookkeeping for the individual key titles */ #define NEXT_KEY_LINE() \ do { \ if ( ++key_count >= key_rows ) { \ yl = yl_ref; xl += key_col_wth; key_count = 0; \ } else \ yl -= key_entry_height; \ } while (0) key_count = 0; yl_ref = yl -= key_entry_height / 2; /* centralise the keys */ /* PM January 2005: The mistake of missing blank lines in the data file is * so frequently made (see questions at comp.graphics.apps.gnuplot) that it * really deserves this warning. But don't show it too often --- only if it * is a single surface in the plot. */ if (pcount == 1 && plots->num_iso_read == 1 && can_pm3d && (plots->plot_style == PM3DSURFACE || PM3D_IMPLICIT == pm3d.implicit)) fprintf(stderr, " Warning: Single isoline (scan) is not enough for a pm3d plot.\n\t Hint: Missing blank lines in the data file? See 'help pm3d' and FAQ.\n"); pm3d_order_depth = (can_pm3d && !draw_contour && pm3d.direction == PM3D_DEPTH); if (pm3d_order_depth) { pm3d_depth_queue_clear(); } this_plot = plots; if (!quick) for (surface = 0; surface < pcount; this_plot = this_plot->next_sp, surface++) { /* just an abbreviation */ TBOOLEAN use_palette = can_pm3d && this_plot->lp_properties.use_palette; TBOOLEAN lkey; /* Skip over abortive data structures */ if (this_plot->plot_type == NODATA) continue; /* Sync point for start of new curve (used by svg, post, ...) */ (term->layer)(TERM_LAYER_BEFORE_PLOT); if (can_pm3d && PM3D_IMPLICIT == pm3d.implicit) pm3d_draw_one(this_plot); lkey = (key->visible && this_plot->title && this_plot->title[0] && !this_plot->title_is_suppressed); if (lkey) { if (key->textcolor.type != TC_DEFAULT) /* Draw key text in same color as key title */ apply_pm3dcolor(&key->textcolor, t); else /* Draw key text in black */ (*t->linetype)(LT_BLACK); ignore_enhanced(this_plot->title_no_enhanced); key_text(xl, yl, this_plot->title); ignore_enhanced(FALSE); } term_apply_lp_properties(&(this_plot->lp_properties)); switch (this_plot->plot_style) { case BOXES: /* can't do boxes in 3d yet so use impulses */ case FILLEDCURVES: case IMPULSES: { if (lkey) { key_sample_line(xl, yl); } if (!(hidden3d && draw_surface && !this_plot->opt_out_of_surface)) plot3d_impulses(this_plot); break; } case STEPS: /* HBB: I think these should be here */ case FILLSTEPS: case FSTEPS: case HISTEPS: case LINES: if (draw_surface && !this_plot->opt_out_of_surface) { if (lkey) { if (this_plot->lp_properties.use_palette) key_sample_line_pm3d(this_plot, xl, yl); else key_sample_line(xl, yl); } if (!hidden3d || this_plot->opt_out_of_hidden3d) { if (use_palette) plot3d_lines_pm3d(this_plot); else plot3d_lines(this_plot); } } break; case YERRORLINES: /* ignored; treat like points */ case XERRORLINES: /* ignored; treat like points */ case XYERRORLINES: /* ignored; treat like points */ case YERRORBARS: /* ignored; treat like points */ case XERRORBARS: /* ignored; treat like points */ case XYERRORBARS: /* ignored; treat like points */ case BOXXYERROR: /* HBB: ignore these as well */ case BOXERROR: case CANDLESTICKS: /* HBB: ditto */ case BOXPLOT: case FINANCEBARS: #ifdef EAM_OBJECTS case CIRCLES: case ELLIPSES: #endif case POINTSTYLE: if (draw_surface && !this_plot->opt_out_of_surface) { if (lkey) { if (this_plot->lp_properties.use_palette) key_sample_point_pm3d(this_plot, xl, yl, this_plot->lp_properties.p_type); else key_sample_point(xl, yl, this_plot->lp_properties.p_type); } if (!hidden3d || this_plot->opt_out_of_hidden3d) plot3d_points(this_plot, this_plot->lp_properties.p_type); } break; case LINESPOINTS: if (draw_surface && !this_plot->opt_out_of_surface) { /* put lines */ if (lkey) { if (this_plot->lp_properties.use_palette) key_sample_line_pm3d(this_plot, xl, yl); else key_sample_line(xl, yl); } if (!hidden3d || this_plot->opt_out_of_hidden3d) { if (use_palette) plot3d_lines_pm3d(this_plot); else plot3d_lines(this_plot); } /* put points */ if (lkey) { if (this_plot->lp_properties.use_palette) key_sample_point_pm3d(this_plot, xl, yl, this_plot->lp_properties.p_type); else key_sample_point(xl, yl, this_plot->lp_properties.p_type); } if (!hidden3d || this_plot->opt_out_of_hidden3d) plot3d_points(this_plot, this_plot->lp_properties.p_type); } break; case DOTS: if (draw_surface && !this_plot->opt_out_of_surface) { this_plot->lp_properties.p_type = -1; this_plot->lp_properties.pointflag = TRUE; if (lkey) { if (this_plot->lp_properties.use_palette) key_sample_point_pm3d(this_plot, xl, yl, -1); else key_sample_point(xl, yl, -1); } if (!hidden3d || this_plot->opt_out_of_hidden3d) plot3d_points(this_plot, -1); } break; case VECTOR: if (lkey) { if (this_plot->lp_properties.use_palette) key_sample_line_pm3d(this_plot, xl, yl); else key_sample_line(xl, yl); } if (!hidden3d || this_plot->opt_out_of_hidden3d) plot3d_vectors(this_plot); break; case PM3DSURFACE: if (draw_surface && !this_plot->opt_out_of_surface) { if (can_pm3d && PM3D_IMPLICIT != pm3d.implicit) { pm3d_draw_one(this_plot); if (!pm3d_order_depth) pm3d_depth_queue_flush(); /* draw plot immediately */ } } break; case LABELPOINTS: if (!hidden3d || this_plot->opt_out_of_hidden3d) place_labels3d(this_plot->labels->next, LAYER_PLOTLABELS); break; case HISTOGRAMS: /* Cannot happen */ break; case IMAGE: /* Plot image using projection of 3D plot coordinates to 2D viewing coordinates. */ this_plot->image_properties.type = IC_PALETTE; plot_image_or_update_axes(this_plot, FALSE); break; case RGBIMAGE: /* Plot image using projection of 3D plot coordinates to 2D viewing coordinates. */ this_plot->image_properties.type = IC_RGB; plot_image_or_update_axes(this_plot, FALSE); break; case RGBA_IMAGE: this_plot->image_properties.type = IC_RGBA; plot_image_or_update_axes(this_plot, FALSE); break; } /* switch(plot-style) */ /* move key on a line */ if (lkey) NEXT_KEY_LINE(); if (draw_contour && this_plot->contours != NULL) { struct gnuplot_contours *cntrs = this_plot->contours; struct lp_style_type thiscontour_lp_properties = this_plot->lp_properties; thiscontour_lp_properties.l_type += (hidden3d ? 1 : 0); term_apply_lp_properties(&(thiscontour_lp_properties)); if (key->visible && this_plot->title && this_plot->title[0] && !this_plot->title_is_suppressed && !draw_surface && !label_contours) { /* unlabelled contours but no surface : put key entry in now */ /* EAM - force key text to black, then restore */ (*t->linetype)(LT_BLACK); key_text(xl, yl, this_plot->title); term_apply_lp_properties(&(thiscontour_lp_properties)); switch (this_plot->plot_style) { case IMPULSES: case LINES: case BOXES: /* HBB: I think these should be here... */ case FILLEDCURVES: case VECTOR: case STEPS: case FSTEPS: case HISTEPS: key_sample_line(xl, yl); break; case YERRORLINES: /* ignored; treat like points */ case XERRORLINES: /* ignored; treat like points */ case XYERRORLINES: /* ignored; treat like points */ case YERRORBARS: /* ignored; treat like points */ case XERRORBARS: /* ignored; treat like points */ case XYERRORBARS: /* ignored; treat like points */ case BOXERROR: /* HBB: ignore these as well */ case BOXXYERROR: case CANDLESTICKS: /* HBB: ditto */ case BOXPLOT: case FINANCEBARS: #ifdef EAM_OBJECTS case CIRCLES: case ELLIPSES: #endif case POINTSTYLE: key_sample_point(xl, yl, this_plot->lp_properties.p_type); break; case LINESPOINTS: key_sample_line(xl, yl); break; case DOTS: key_sample_point(xl, yl, -1); break; default: break; } NEXT_KEY_LINE(); } while (cntrs) { if (label_contours && cntrs->isNewLevel) { if (key->visible && !this_plot->title_is_suppressed) { (*t->linetype)(LT_BLACK); key_text(xl, yl, cntrs->label); } if (use_palette && thiscontour_lp_properties.pm3d_color.type == TC_Z) set_color( cb2gray( z2cb(cntrs->z) ) ); else { struct lp_style_type ls = thiscontour_lp_properties; if (thiscontour_lp_properties.l_type == LT_COLORFROMCOLUMN) { thiscontour_lp_properties.l_type = 0; thiscontour_lp_properties.use_palette = TRUE; } if (prefer_line_styles && label_contours) lp_use_properties(&ls, ++thiscontour_lp_properties.l_type+1); else load_linetype(&ls, ++thiscontour_lp_properties.l_type+1); thiscontour_lp_properties.pm3d_color = ls.pm3d_color; term_apply_lp_properties(&thiscontour_lp_properties); } if (key->visible && !this_plot->title_is_suppressed) { switch (this_plot->plot_style) { case IMPULSES: case LINES: case LINESPOINTS: case BOXES: /* HBB: these should be treated as well... */ case FILLEDCURVES: case VECTOR: case STEPS: case FSTEPS: case HISTEPS: case PM3DSURFACE: key_sample_line(xl, yl); break; case YERRORLINES: /* ignored; treat like points */ case XERRORLINES: /* ignored; treat like points */ case XYERRORLINES: /* ignored; treat like points */ case YERRORBARS: /* ignored; treat like points */ case XERRORBARS: /* ignored; treat like points */ case XYERRORBARS: /* ignored; treat like points */ case BOXERROR: /* HBB: treat these likewise */ case BOXXYERROR: case CANDLESTICKS: /* HBB: ditto */ case BOXPLOT: case FINANCEBARS: #ifdef EAM_OBJECTS case CIRCLES: case ELLIPSES: #endif case POINTSTYLE: key_sample_point(xl, yl, this_plot->lp_properties.p_type); break; case DOTS: key_sample_point(xl, yl, -1); break; default: break; } /* switch */ NEXT_KEY_LINE(); } /* key */ } /* label_contours */ /* now draw the contour */ switch (this_plot->plot_style) { /* treat boxes like impulses: */ case BOXES: case FILLEDCURVES: case VECTOR: case IMPULSES: cntr3d_impulses(cntrs, &thiscontour_lp_properties); break; case STEPS: case FSTEPS: case HISTEPS: /* treat all the above like 'lines' */ case LINES: case PM3DSURFACE: cntr3d_lines(cntrs, &thiscontour_lp_properties); break; case LINESPOINTS: cntr3d_lines(cntrs, &thiscontour_lp_properties); /* FALLTHROUGH to draw the points */ case YERRORLINES: case XERRORLINES: case XYERRORLINES: case YERRORBARS: case XERRORBARS: case XYERRORBARS: case BOXERROR: case BOXXYERROR: case CANDLESTICKS: case FINANCEBARS: #ifdef EAM_OBJECTS case CIRCLES: case ELLIPSES: #endif /* treat all the above like points */ case DOTS: case POINTSTYLE: cntr3d_points(cntrs, &thiscontour_lp_properties); break; default: break; } /*switch */ cntrs = cntrs->next; } /* loop over contours */ } /* draw contours */ /* Sync point for end of this curve (used by svg, post, ...) */ (term->layer)(TERM_LAYER_AFTER_PLOT); } /* loop over surfaces */ if (pm3d_order_depth) { pm3d_depth_queue_flush(); /* draw pending plots */ } if (hidden3d && (hidden3d_layer == LAYER_FRONT) && draw_surface && !quick) { (term->layer)(TERM_LAYER_BEFORE_PLOT); plot3d_hidden(plots, pcount); (term->layer)(TERM_LAYER_AFTER_PLOT); } /* DRAW GRID AND BORDER */ #ifndef USE_GRID_LAYERS /* Old behaviour: draw entire grid now, unless it was requested to * be in the back. */ if (grid_layer != 0) draw_3d_graphbox(plots, pcount, ALLGRID, LAYER_FRONT); #else /* HBB NEW 20040311: do front part now, after surfaces have been * output. If "set grid front", or hidden3d is active, must output * the whole shebang now, otherwise only the front part. */ if (hidden3d || grid_layer == 1) draw_3d_graphbox(plots, pcount, ALLGRID, LAYER_FRONT); else if (grid_layer == -1) draw_3d_graphbox(plots, pcount, FRONTGRID, LAYER_FRONT); if (splot_map && (border_layer == 1)) draw_3d_graphbox(plots, pcount, BORDERONLY, LAYER_FRONT); #endif /* USE_GRID_LAYERS */ /* Add 'front' color box */ if (!quick && can_pm3d && is_plot_with_colorbox() && color_box.layer == LAYER_FRONT) draw_color_smooth_box(MODE_SPLOT); /* Add 'front' rectangles */ place_objects(first_object, 1, 3); /* PLACE LABELS */ place_labels3d(first_label, 1); /* PLACE ARROWS */ place_arrows3d(1); #ifdef USE_MOUSE /* finally, store the 2d projection of the x and y axis, to enable zooming by mouse */ { int x,y; map3d_xy(X_AXIS.min, Y_AXIS.min, base_z, &axis3d_o_x, &axis3d_o_y); map3d_xy(X_AXIS.max, Y_AXIS.min, base_z, &x, &y); axis3d_x_dx = x - axis3d_o_x; axis3d_x_dy = y - axis3d_o_y; map3d_xy(X_AXIS.min, Y_AXIS.max, base_z, &x, &y); axis3d_y_dx = x - axis3d_o_x; axis3d_y_dy = y - axis3d_o_y; } #endif /* Release the palette if we have used one (PostScript only?) */ if (is_plot_with_palette() && term->previous_palette) term->previous_palette(); term_end_plot(); if (hidden3d && draw_surface) { term_hidden_line_removal(); } } /* plot3d_impulses: * Plot the surfaces in IMPULSES style */ static void plot3d_impulses(struct surface_points *plot) { int i; /* point index */ int x, y, xx0, yy0; /* point in terminal coordinates */ struct iso_curve *icrvs = plot->iso_crvs; int colortype = plot->lp_properties.pm3d_color.type; TBOOLEAN rgb_from_column = can_pm3d && plot->pm3d_color_from_column && plot->lp_properties.pm3d_color.value < 0.0; if (colortype == TC_RGB && !rgb_from_column) set_rgbcolor(plot->lp_properties.pm3d_color.lt); while (icrvs) { struct coordinate GPHUGE *points = icrvs->points; for (i = 0; i < icrvs->p_count; i++) { check_for_variable_color(plot, &points[i]); switch (points[i].type) { case INRANGE: { map3d_xy(points[i].x, points[i].y, points[i].z, &x, &y); if (inrange(0.0, Z_AXIS.min, Z_AXIS.max)) { map3d_xy(points[i].x, points[i].y, 0.0, &xx0, &yy0); } else if (inrange(Z_AXIS.min, 0.0, points[i].z)) { map3d_xy(points[i].x, points[i].y, Z_AXIS.min, &xx0, &yy0); } else { map3d_xy(points[i].x, points[i].y, Z_AXIS.max, &xx0, &yy0); } clip_move(xx0, yy0); clip_vector(x, y); break; } case OUTRANGE: { if (!inrange(points[i].x, X_AXIS.min, X_AXIS.max) || !inrange(points[i].y, Y_AXIS.min, Y_AXIS.max)) break; if (inrange(0.0, Z_AXIS.min, Z_AXIS.max)) { /* zero point is INRANGE */ map3d_xy(points[i].x, points[i].y, 0.0, &xx0, &yy0); /* must cross z = Z_AXIS.min or Z_AXIS.max limits */ if (inrange(Z_AXIS.min, 0.0, points[i].z) && Z_AXIS.min != 0.0 && Z_AXIS.min != points[i].z) { map3d_xy(points[i].x, points[i].y, Z_AXIS.min, &x, &y); } else { map3d_xy(points[i].x, points[i].y, Z_AXIS.max, &x, &y); } } else { /* zero point is also OUTRANGE */ if (inrange(Z_AXIS.min, 0.0, points[i].z) && inrange(Z_AXIS.max, 0.0, points[i].z)) { /* crosses z = Z_AXIS.min or Z_AXIS.max limits */ map3d_xy(points[i].x, points[i].y, Z_AXIS.max, &x, &y); map3d_xy(points[i].x, points[i].y, Z_AXIS.min, &xx0, &yy0); } else { /* doesn't cross z = Z_AXIS.min or Z_AXIS.max limits */ break; } } clip_move(xx0, yy0); clip_vector(x, y); break; } default: /* just a safety */ case UNDEFINED:{ break; } } } icrvs = icrvs->next; } } /* plot3d_lines: * Plot the surfaces in LINES style */ /* We want to always draw the lines in the same direction, otherwise when we draw an adjacent box we might get the line drawn a little differently and we get splotches. */ static void plot3d_lines(struct surface_points *plot) { int i; int x, y, xx0, yy0; /* point in terminal coordinates */ double clip_x, clip_y, clip_z; struct iso_curve *icrvs = plot->iso_crvs; struct coordinate GPHUGE *points; double lx[2], ly[2], lz[2]; /* two edge points */ TBOOLEAN rgb_from_column; /* These are handled elsewhere. */ if (plot->has_grid_topology && hidden3d) return; rgb_from_column = plot->pm3d_color_from_column && plot->lp_properties.pm3d_color.type == TC_RGB && plot->lp_properties.pm3d_color.value < 0.0; while (icrvs) { enum coord_type prev = UNDEFINED; /* type of previous plot */ for (i = 0, points = icrvs->points; i < icrvs->p_count; i++) { if (rgb_from_column) set_rgbcolor((int)points[i].CRD_COLOR); else if (plot->lp_properties.pm3d_color.type == TC_LINESTYLE) { plot->lp_properties.pm3d_color.lt = (int)(points[i].CRD_COLOR); apply_pm3dcolor(&(plot->lp_properties.pm3d_color), term); } switch (points[i].type) { case INRANGE:{ map3d_xy(points[i].x, points[i].y, points[i].z, &x, &y); if (prev == INRANGE) { clip_vector(x, y); } else { if (prev == OUTRANGE) { /* from outrange to inrange */ if (!clip_lines1) { clip_move(x, y); } else { /* * Calculate intersection point and draw * vector from there */ edge3d_intersect(points, i-1, i, &clip_x, &clip_y, &clip_z); map3d_xy(clip_x, clip_y, clip_z, &xx0, &yy0); clip_move(xx0, yy0); clip_vector(x, y); } } else { clip_move(x, y); } } break; } case OUTRANGE:{ if (prev == INRANGE) { /* from inrange to outrange */ if (clip_lines1) { /* * Calculate intersection point and draw * vector to it */ edge3d_intersect(points, i-1, i, &clip_x, &clip_y, &clip_z); map3d_xy(clip_x, clip_y, clip_z, &xx0, &yy0); clip_vector(xx0, yy0); } } else if (prev == OUTRANGE) { /* from outrange to outrange */ if (clip_lines2) { /* * Calculate the two 3D intersection points * if present */ if (two_edge3d_intersect(points, i-1, i, lx, ly, lz)) { map3d_xy(lx[0], ly[0], lz[0], &x, &y); map3d_xy(lx[1], ly[1], lz[1], &xx0, &yy0); clip_move(x, y); clip_vector(xx0, yy0); } } } break; } case UNDEFINED:{ break; } default: graph_error("Unknown point type in plot3d_lines"); } prev = points[i].type; } icrvs = icrvs->next; } } /* this is basically the same function as above, but: * - it splits the bunch of scans in two sets corresponding to * the two scan directions. * - reorders the two sets -- from behind to front * - checks if inside on scan of a set the order should be inverted */ static void plot3d_lines_pm3d(struct surface_points *plot) { struct iso_curve** icrvs_pair[2]; int invert[2] = {0,0}; int n[2] = {0,0}; int i, set, scan; int x, y, xx0, yy0; /* point in terminal coordinates */ double clip_x, clip_y, clip_z; struct coordinate GPHUGE *points; enum coord_type prev = UNDEFINED; double lx[2], ly[2], lz[2]; /* two edge points */ double z; /* just a shortcut */ TBOOLEAN color_from_column = plot->pm3d_color_from_column; /* If plot really uses RGB rather than pm3d colors, let plot3d_lines take over */ if (plot->lp_properties.pm3d_color.type == TC_RGB) { apply_pm3dcolor(&(plot->lp_properties.pm3d_color), term); plot3d_lines(plot); return; } else if (plot->lp_properties.pm3d_color.type == TC_LINESTYLE) { plot3d_lines(plot); return; } /* These are handled elsewhere. */ if (plot->has_grid_topology && hidden3d) return; /* split the bunch of scans in two sets in * which the scans are already depth ordered */ pm3d_rearrange_scan_array(plot, icrvs_pair, &n[0], &invert[0], icrvs_pair + 1, &n[1], &invert[1]); for (set = 0; set < 2; set++) { int begin = 0; int step; if (invert[set]) { /* begin is set below to the length of the scan - 1 */ step = -1; } else { step = 1; } for (scan = 0; scan < n[set] && icrvs_pair[set]; scan++) { int cnt; struct iso_curve *icrvs = icrvs_pair[set][scan]; if (invert[set]) { begin = icrvs->p_count - 1; } prev = UNDEFINED; /* type of previous plot */ for (cnt = 0, i = begin, points = icrvs->points; cnt < icrvs->p_count; cnt++, i += step) { switch (points[i].type) { case INRANGE: map3d_xy(points[i].x, points[i].y, points[i].z, &x, &y); if (prev == INRANGE) { if (color_from_column) z = (points[i - step].CRD_COLOR + points[i].CRD_COLOR) * 0.5; else z = (z2cb(points[i - step].z) + z2cb(points[i].z)) * 0.5; set_color( cb2gray(z) ); clip_vector(x, y); } else { if (prev == OUTRANGE) { /* from outrange to inrange */ if (!clip_lines1) { clip_move(x, y); } else { /* * Calculate intersection point and draw * vector from there */ edge3d_intersect(points, i-step, i, &clip_x, &clip_y, &clip_z); map3d_xy(clip_x, clip_y, clip_z, &xx0, &yy0); clip_move(xx0, yy0); if (color_from_column) z = (points[i - step].CRD_COLOR + points[i].CRD_COLOR) * 0.5; else z = (z2cb(points[i - step].z) + z2cb(points[i].z)) * 0.5; set_color( cb2gray(z) ); clip_vector(x, y); } } else { clip_move(x, y); } } break; case OUTRANGE: if (prev == INRANGE) { /* from inrange to outrange */ if (clip_lines1) { /* * Calculate intersection point and draw * vector to it */ edge3d_intersect(points, i-step, i, &clip_x, &clip_y, &clip_z); map3d_xy(clip_x, clip_y, clip_z, &xx0, &yy0); if (color_from_column) z = (points[i - step].CRD_COLOR + points[i].CRD_COLOR) * 0.5; else z = (z2cb(points[i - step].z) + z2cb(points[i].z)) * 0.5; set_color( cb2gray(z)); clip_vector(xx0, yy0); } } else if (prev == OUTRANGE) { /* from outrange to outrange */ if (clip_lines2) { /* * Calculate the two 3D intersection points * if present */ if (two_edge3d_intersect(points, i-step, i, lx, ly, lz)) { map3d_xy(lx[0], ly[0], lz[0], &x, &y); map3d_xy(lx[1], ly[1], lz[1], &xx0, &yy0); clip_move(x, y); if (color_from_column) z = (points[i - step].CRD_COLOR + points[i].CRD_COLOR) * 0.5; else z = (z2cb(points[i - step].z) + z2cb(points[i].z)) * 0.5; set_color( cb2gray(z) ); clip_vector(xx0, yy0); } } } break; case UNDEFINED: break; default: graph_error("Unknown point type in plot3d_lines"); } prev = points[i].type; } /* one scan */ } /* while (icrvs) */ } /* for (scan = 0; scan < 2; scan++) */ if (icrvs_pair[0]) free(icrvs_pair[0]); if (icrvs_pair[1]) free(icrvs_pair[1]); } /* plot3d_points: * Plot the surfaces in POINTSTYLE style */ static void plot3d_points(struct surface_points *plot, int p_type) { int i; int x, y; struct termentry *t = term; struct iso_curve *icrvs = plot->iso_crvs; while (icrvs) { struct coordinate GPHUGE *point; int colortype = plot->lp_properties.pm3d_color.type; TBOOLEAN rgb_from_column = plot->pm3d_color_from_column && colortype == TC_RGB && plot->lp_properties.pm3d_color.value < 0.0; /* Apply constant color outside of the loop */ if (colortype == TC_RGB && !rgb_from_column) set_rgbcolor( plot->lp_properties.pm3d_color.lt ); for (i = 0; i < icrvs->p_count; i++) { point = &(icrvs->points[i]); if (point->type == INRANGE) { map3d_xy(point->x, point->y, point->z, &x, &y); if (!clip_point(x, y)) { check_for_variable_color(plot, point); if ((plot->plot_style == POINTSTYLE || plot->plot_style == LINESPOINTS) && plot->lp_properties.p_size == PTSZ_VARIABLE) (*t->pointsize)(pointsize * point->CRD_PTSIZE); (*t->point) (x, y, p_type); } } } icrvs = icrvs->next; } } /* cntr3d_impulses: * Plot a surface contour in IMPULSES style */ static void cntr3d_impulses(struct gnuplot_contours *cntr, struct lp_style_type *lp) { int i; /* point index */ vertex vertex_on_surface, vertex_on_base; if (draw_contour & CONTOUR_SRF) { for (i = 0; i < cntr->num_pts; i++) { map3d_xyz(cntr->coords[i].x, cntr->coords[i].y, cntr->coords[i].z, &vertex_on_surface); map3d_xyz(cntr->coords[i].x, cntr->coords[i].y, 0.0, &vertex_on_base); /* HBB 20010822: Provide correct color-coding for * "linetype palette" PM3D mode */ vertex_on_base.real_z = cntr->coords[i].z; draw3d_line(&vertex_on_surface, &vertex_on_base, lp); } } else { /* Must be on base grid, so do points. */ cntr3d_points(cntr, lp); } } /* cntr3d_lines: Plot a surface contour in LINES style */ /* HBB NEW 20031218: changed to use move/vector() style polyline * drawing. Gets rid of variable "previous_vertex" */ static void cntr3d_lines(struct gnuplot_contours *cntr, struct lp_style_type *lp) { int i; /* point index */ vertex this_vertex; /* In the case of "set view map" (only) clip the contour lines to the graph */ BoundingBox *clip_save = clip_area; if (splot_map) clip_area = &plot_bounds; if (draw_contour & CONTOUR_SRF) { map3d_xyz(cntr->coords[0].x, cntr->coords[0].y, cntr->coords[0].z, &this_vertex); /* move slightly frontward, to make sure the contours are * visible in front of the the triangles they're in, if this * is a hidden3d plot */ if (hidden3d && !VERTEX_IS_UNDEFINED(this_vertex)) this_vertex.z += 1e-2; polyline3d_start(&this_vertex); for (i = 1; i < cntr->num_pts; i++) { map3d_xyz(cntr->coords[i].x, cntr->coords[i].y, cntr->coords[i].z, &this_vertex); /* move slightly frontward, to make sure the contours are * visible in front of the the triangles they're in, if this * is a hidden3d plot */ if (hidden3d && !VERTEX_IS_UNDEFINED(this_vertex)) this_vertex.z += 1e-2; polyline3d_next(&this_vertex, lp); } } if (draw_contour & CONTOUR_BASE) { map3d_xyz(cntr->coords[0].x, cntr->coords[0].y, base_z, &this_vertex); this_vertex.real_z = cntr->coords[0].z; polyline3d_start(&this_vertex); for (i = 1; i < cntr->num_pts; i++) { map3d_xyz(cntr->coords[i].x, cntr->coords[i].y, base_z, &this_vertex); this_vertex.real_z = cntr->coords[i].z; polyline3d_next(&this_vertex, lp); } } if (splot_map) clip_area = clip_save; } /* cntr3d_points: * Plot a surface contour in POINTSTYLE style */ static void cntr3d_points(struct gnuplot_contours *cntr, struct lp_style_type *lp) { int i; vertex v; if (draw_contour & CONTOUR_SRF) { for (i = 0; i < cntr->num_pts; i++) { map3d_xyz(cntr->coords[i].x, cntr->coords[i].y, cntr->coords[i].z, &v); /* move slightly frontward, to make sure the contours and * points are visible in front of the triangles they're * in, if this is a hidden3d plot */ if (hidden3d && !VERTEX_IS_UNDEFINED(v)) v.z += 1e-2; draw3d_point(&v, lp); } } if (draw_contour & CONTOUR_BASE) { for (i = 0; i < cntr->num_pts; i++) { map3d_xyz(cntr->coords[i].x, cntr->coords[i].y, base_z, &v); /* HBB 20010822: see above */ v.real_z = cntr->coords[i].z; draw3d_point(&v, lp); } } } /* map xmin | xmax to 0 | 1 and same for y * 0.1 avoids any rounding errors */ #define MAP_HEIGHT_X(x) ( (int) (((x)-X_AXIS.min)/(X_AXIS.max-X_AXIS.min)+0.1) ) #define MAP_HEIGHT_Y(y) ( (int) (((y)-Y_AXIS.min)/(Y_AXIS.max-Y_AXIS.min)+0.1) ) /* if point is at corner, update height[][] and depth[][] * we are still assuming that extremes of surfaces are at corners, * but we are not assuming order of corners */ static void check_corner_height( struct coordinate GPHUGE *p, double height[2][2], double depth[2][2]) { if (p->type != INRANGE) return; /* FIXME HBB 20010121: don't compare 'zero' to data values in * absolute terms. */ if ((fabs(p->x - X_AXIS.min) < zero || fabs(p->x - X_AXIS.max) < zero) && (fabs(p->y - Y_AXIS.min) < zero || fabs(p->y - Y_AXIS.max) < zero)) { unsigned int x = MAP_HEIGHT_X(p->x); unsigned int y = MAP_HEIGHT_Y(p->y); if (height[x][y] < p->z) height[x][y] = p->z; if (depth[x][y] > p->z) depth[x][y] = p->z; } } /* work out where the axes and tics are drawn */ static void setup_3d_box_corners() { int quadrant = surface_rot_z / 90; if ((quadrant + 1) & 2) { zaxis_x = X_AXIS.max; right_x = X_AXIS.min; back_y = Y_AXIS.min; front_y = Y_AXIS.max; } else { zaxis_x = X_AXIS.min; right_x = X_AXIS.max; back_y = Y_AXIS.max; front_y = Y_AXIS.min; } if (quadrant & 2) { zaxis_y = Y_AXIS.max; right_y = Y_AXIS.min; back_x = X_AXIS.max; front_x = X_AXIS.min; } else { zaxis_y = Y_AXIS.min; right_y = Y_AXIS.max; back_x = X_AXIS.min; front_x = X_AXIS.max; } if (surface_rot_x > 90) { /* labels on the back axes */ yaxis_x = back_x; xaxis_y = back_y; } else { yaxis_x = front_x; xaxis_y = front_y; } } /* Draw all elements of the 3d graph box, including borders, zeroaxes, * tics, gridlines, ticmarks, axis labels and the base plane. */ static void draw_3d_graphbox(struct surface_points *plot, int plot_num, WHICHGRID whichgrid, int current_layer) { int x, y; /* point in terminal coordinates */ struct termentry *t = term; BoundingBox *clip_save = clip_area; if (draw_border && splot_map) { if (border_layer == current_layer) { term_apply_lp_properties(&border_lp); if ((draw_border & 15) == 15) newpath(); map3d_xy(zaxis_x, zaxis_y, base_z, &x, &y); term->move(x, y); map3d_xy(back_x , back_y , base_z, &x, &y); if (draw_border & 2) term->vector(x, y); else term->move(x, y); map3d_xy(right_x, right_y, base_z, &x, &y); if (draw_border & 8) term->vector(x, y); else term->move(x, y); map3d_xy(front_x, front_y, base_z, &x, &y); if (draw_border & 4) term->vector(x, y); else term->move(x, y); map3d_xy(zaxis_x, zaxis_y, base_z, &x, &y); if (draw_border & 1) term->vector(x, y); else term->move(x, y); if ((draw_border & 15) == 15) closepath(); } } else if (draw_border) { /* the four corners of the base plane, in normalized view * coordinates (-1..1) on all three axes. */ vertex bl, bb, br, bf; /* map to normalized view coordinates the corners of the * baseplane: left, back, right and front, in that order: */ map3d_xyz(zaxis_x, zaxis_y, base_z, &bl); map3d_xyz(back_x , back_y , base_z, &bb); map3d_xyz(right_x, right_y, base_z, &br); map3d_xyz(front_x, front_y, base_z, &bf); #ifdef USE_GRID_LAYERS if (BACKGRID != whichgrid) #endif { /* Draw front part of base grid, right to front corner: */ if (draw_border & 4) draw3d_line(&br, &bf, &border_lp); /* ... and left to front: */ if (draw_border & 1) draw3d_line(&bl, &bf, &border_lp); } #ifdef USE_GRID_LAYERS if (FRONTGRID != whichgrid) #endif { /* Draw back part of base grid: left to back corner: */ if (draw_border & 2) draw3d_line(&bl, &bb, &border_lp); /* ... and right to back: */ if (draw_border & 8) draw3d_line(&br, &bb, &border_lp); } /* if surface is drawn, draw the rest of the graph box, too: */ if (draw_surface || (draw_contour & CONTOUR_SRF) || (pm3d.implicit == PM3D_IMPLICIT && strpbrk(pm3d.where,"st") != NULL) ) { vertex fl, fb, fr, ff; /* floor left/back/right/front corners */ vertex tl, tb, tr, tf; /* top left/back/right/front corners */ map3d_xyz(zaxis_x, zaxis_y, floor_z, &fl); map3d_xyz(back_x , back_y , floor_z, &fb); map3d_xyz(right_x, right_y, floor_z, &fr); map3d_xyz(front_x, front_y, floor_z, &ff); map3d_xyz(zaxis_x, zaxis_y, ceiling_z, &tl); map3d_xyz(back_x , back_y , ceiling_z, &tb); map3d_xyz(right_x, right_y, ceiling_z, &tr); map3d_xyz(front_x, front_y, ceiling_z, &tf); if ((draw_border & 0xf0) == 0xf0) { /* all four verticals are drawn - save some time by * drawing them to the full height, regardless of * where the surface lies */ #ifdef USE_GRID_LAYERS if (FRONTGRID != whichgrid) { #endif /* Draw the back verticals floor-to-ceiling, left: */ draw3d_line(&fl, &tl, &border_lp); /* ... back: */ draw3d_line(&fb, &tb, &border_lp); /* ... and right */ draw3d_line(&fr, &tr, &border_lp); #ifdef USE_GRID_LAYERS } if (BACKGRID != whichgrid) #endif /* Draw the front vertical: floor-to-ceiling, front: */ draw3d_line(&ff, &tf, &border_lp); } else { /* find heights of surfaces at the corners of the xy * rectangle */ double height[2][2]; double depth[2][2]; unsigned int zaxis_i = MAP_HEIGHT_X(zaxis_x); unsigned int zaxis_j = MAP_HEIGHT_Y(zaxis_y); unsigned int back_i = MAP_HEIGHT_X(back_x); unsigned int back_j = MAP_HEIGHT_Y(back_y); height[0][0] = height[0][1] = height[1][0] = height[1][1] = base_z; depth[0][0] = depth[0][1] = depth[1][0] = depth[1][1] = base_z; /* FIXME HBB 20000617: this method contains the * assumption that the topological corners of the * surface mesh(es) are also the geometrical ones of * their xy projections. This is only true for * 'explicit' surface datasets, i.e. z(x,y) */ for (; --plot_num >= 0; plot = plot->next_sp) { struct iso_curve *curve = plot->iso_crvs; int count; int iso; if (plot->plot_type == NODATA) continue; if (plot->plot_type == DATA3D) { if (!plot->has_grid_topology) continue; iso = plot->num_iso_read; } else iso = iso_samples_2; count = curve->p_count; check_corner_height(curve->points, height, depth); check_corner_height(curve->points + count - 1, height, depth); while (--iso) curve = curve->next; check_corner_height(curve->points, height, depth); check_corner_height(curve->points + count - 1, height, depth); } #define VERTICAL(mask,x,y,i,j,bottom,top) \ if (draw_border&mask) { \ draw3d_line(bottom,top, &border_lp); \ } else if (height[i][j] != depth[i][j]) { \ vertex a, b; \ map3d_xyz(x,y,depth[i][j],&a); \ map3d_xyz(x,y,height[i][j],&b); \ draw3d_line(&a, &b, &border_lp); \ } #ifdef USE_GRID_LAYERS if (FRONTGRID != whichgrid) { #endif /* Draw back verticals: floor-to-ceiling left: */ VERTICAL(0x10, zaxis_x, zaxis_y, zaxis_i, zaxis_j, &fl, &tl); /* ... back: */ VERTICAL(0x20, back_x, back_y, back_i, back_j, &fb, &tb); /* ... and right: */ VERTICAL(0x40, right_x, right_y, 1 - zaxis_i, 1 - zaxis_j, &fr, &tr); #ifdef USE_GRID_LAYERS } if (BACKGRID != whichgrid) { #endif /* Draw front verticals: floor-to-ceiling front */ VERTICAL(0x80, front_x, front_y, 1 - back_i, 1 - back_j, &ff, &tf); #ifdef USE_GRID_LAYERS } #endif #undef VERTICAL } /* else (all 4 verticals drawn?) */ /* now border lines on top */ #ifdef USE_GRID_LAYERS if (FRONTGRID != whichgrid) #endif { /* Draw back part of top of box: top left to back corner: */ if (draw_border & 0x100) draw3d_line(&tl, &tb, &border_lp); /* ... and top right to back: */ if (draw_border & 0x200) draw3d_line(&tr, &tb, &border_lp); } #ifdef USE_GRID_LAYERS if (BACKGRID != whichgrid) #endif { /* Draw front part of top of box: top left to front corner: */ if (draw_border & 0x400) draw3d_line(&tl, &tf, &border_lp); /* ... and top right to front: */ if (draw_border & 0x800) draw3d_line(&tr, &tf, &border_lp); } } /* else (surface is drawn) */ } /* if (draw_border) */ /* In 'set view map' mode, treat grid as in 2D plots */ if (splot_map && current_layer != abs(grid_layer)) return; if (whichgrid == BORDERONLY) return; if (splot_map) clip_area = NULL; /* Draw ticlabels and axis labels. x axis, first:*/ if (X_AXIS.ticmode || X_AXIS.label.text) { vertex v0, v1; double other_end = Y_AXIS.min + Y_AXIS.max - xaxis_y; double mid_x = (X_AXIS.max + X_AXIS.min) / 2; map3d_xyz(mid_x, xaxis_y, base_z, &v0); map3d_xyz(mid_x, other_end, base_z, &v1); tic_unitx = (v1.x - v0.x) / (double)yscaler; tic_unity = (v1.y - v0.y) / (double)yscaler; tic_unitz = (v1.z - v0.z) / (double)yscaler; #ifdef USE_GRID_LAYERS /* Don't output tics and grids if this is the front part of a * two-part grid drawing process: */ if ((surface_rot_x <= 90 && FRONTGRID != whichgrid) || (surface_rot_x > 90 && BACKGRID != whichgrid)) #endif if (X_AXIS.ticmode) { gen_tics(FIRST_X_AXIS, xtick_callback); } if (X_AXIS.label.text) { int angle = 0; /* label at xaxis_y + 1/4 of (xaxis_y-other_y) */ #ifdef USE_GRID_LAYERS /* FIXME: still needed??? what for? */ if ((surface_rot_x <= 90 && BACKGRID != whichgrid) || (surface_rot_x > 90 && FRONTGRID != whichgrid) || splot_map) { #endif unsigned int x1, y1; int tmpx, tmpy; if (splot_map) { /* case 'set view map' */ /* copied from xtick_callback(): baseline of tics labels */ vertex v1, v2; map3d_xyz(mid_x, xaxis_y, base_z, &v1); v2.x = v1.x; v2.y = v1.y - tic_unity * t->v_char * 1; if (!X_AXIS.tic_in) { /* FIXME * This code and its source in xtick_callback() is wrong --- tics * can be "in" but ticscale <0 ! To be corrected in both places! */ v2.y -= tic_unity * t->v_tic * X_AXIS.ticscale; } #if 0 /* PM: correct implementation for map should probably be like this: */ if (X_AXIS.ticmode) { int tics_len = (int)(X_AXIS.ticscale * (X_AXIS.tic_in ? -1 : 1) * (term->v_tic)); if (tics_len < 0) tics_len = 0; /* take care only about upward tics */ v2.y += tics_len; } #endif TERMCOORD(&v2, x1, y1); /* DEFAULT_Y_DISTANCE is with respect to baseline of tics labels */ #define DEFAULT_Y_DISTANCE 0.5 y1 -= (unsigned int) ((1 + DEFAULT_Y_DISTANCE) * t->v_char); #undef DEFAULT_Y_DISTANCE angle = X_AXIS.label.rotate; } else { /* usual 3d set view ... */ double step = (xaxis_y - other_end) / 4; /* The only angle that makes sense is running parallel to the axis */ if (X_AXIS.label.tag == ROTATE_IN_3D_LABEL_TAG) { double ang, angx0, angx1, angy0, angy1; map3d_xy_double(X_AXIS.min, xaxis_y, base_z, &angx0, &angy0); map3d_xy_double(X_AXIS.max, xaxis_y, base_z, &angx1, &angy1); ang = atan2(angy1-angy0, angx1-angx0) / DEG2RAD; angle = (ang > 0) ? floor(ang + 0.5) : floor(ang - 0.5); if (angle < -90) angle += 180; if (angle > 90) angle -= 180; step /= 2; } if (X_AXIS.ticmode & TICS_ON_AXIS) { map3d_xyz(mid_x, (X_AXIS.tic_in ? step : -step)/2., base_z, &v1); } else { map3d_xyz(mid_x, xaxis_y + step, base_z, &v1); } if (!X_AXIS.tic_in) { v1.x -= tic_unitx * X_AXIS.ticscale * t->v_tic; v1.y -= tic_unity * X_AXIS.ticscale * t->v_tic; } TERMCOORD(&v1, x1, y1); } map3d_position_r(&(X_AXIS.label.offset), &tmpx, &tmpy, "graphbox"); x1 += tmpx; /* user-defined label offset */ y1 += tmpy; ignore_enhanced(X_AXIS.label.noenhanced); apply_pm3dcolor(&(X_AXIS.label.textcolor),t); if (angle != 0 && (term->text_angle)(angle)) { write_multiline(x1, y1, X_AXIS.label.text, CENTRE, JUST_TOP, angle, X_AXIS.label.font); (term->text_angle)(0); } else { write_multiline(x1, y1, X_AXIS.label.text, CENTRE, JUST_TOP, 0, X_AXIS.label.font); } reset_textcolor(&(X_AXIS.label.textcolor),t); ignore_enhanced(FALSE); #ifdef USE_GRID_LAYERS } #endif } } /* y axis: */ if (Y_AXIS.ticmode || Y_AXIS.label.text) { vertex v0, v1; double other_end = X_AXIS.min + X_AXIS.max - yaxis_x; double mid_y = (Y_AXIS.max + Y_AXIS.min) / 2; map3d_xyz(yaxis_x, mid_y, base_z, &v0); map3d_xyz(other_end, mid_y, base_z, &v1); tic_unitx = (v1.x - v0.x) / (double)xscaler; tic_unity = (v1.y - v0.y) / (double)xscaler; tic_unitz = (v1.z - v0.z) / (double)xscaler; #ifdef USE_GRID_LAYERS /* Don't output tics and grids if this is the front part of a * two-part grid drawing process: */ if ((surface_rot_x <= 90 && FRONTGRID != whichgrid) || (surface_rot_x > 90 && BACKGRID != whichgrid)) #endif if (Y_AXIS.ticmode) { gen_tics(FIRST_Y_AXIS, ytick_callback); } if (Y_AXIS.label.text) { #ifdef USE_GRID_LAYERS if ((surface_rot_x <= 90 && BACKGRID != whichgrid) || (surface_rot_x > 90 && FRONTGRID != whichgrid) || splot_map) { #endif unsigned int x1, y1; int tmpx, tmpy; int h_just, v_just; int angle = 0; if (splot_map) { /* case 'set view map' */ /* copied from ytick_callback(): baseline of tics labels */ vertex v1, v2; map3d_xyz(yaxis_x, mid_y, base_z, &v1); if (Y_AXIS.ticmode & TICS_ON_AXIS && !X_AXIS.log && inrange (0.0, X_AXIS.min, X_AXIS.max) ) { map3d_xyz(0.0, yaxis_x, base_z, &v1); } v2.x = v1.x - tic_unitx * t->h_char * 1; v2.y = v1.y; if (!X_AXIS.tic_in) v2.x -= tic_unitx * t->h_tic * X_AXIS.ticscale; TERMCOORD(&v2, x1, y1); /* calculate max length of y-tics labels */ widest_tic_strlen = 0; if (Y_AXIS.ticmode & TICS_ON_BORDER) { widest_tic_strlen = 0; /* reset the global variable */ gen_tics(FIRST_Y_AXIS, widest_tic_callback); } /* DEFAULT_Y_DISTANCE is with respect to baseline of tics labels */ #define DEFAULT_X_DISTANCE 0. x1 -= (unsigned int) ((DEFAULT_X_DISTANCE + 0.5 + widest_tic_strlen) * t->h_char); #undef DEFAULT_X_DISTANCE #if 0 /* another method ... but not compatible */ unsigned int map_y1, map_x2, map_y2; int tics_len = 0; if (Y_AXIS.ticmode) { tics_len = (int)(X_AXIS.ticscale * (X_AXIS.tic_in ? 1 : -1) * (term->v_tic)); if (tics_len > 0) tics_len = 0; /* take care only about left tics */ } map3d_xy(X_AXIS.min, Y_AXIS.min, base_z, &x1, &map_y1); map3d_xy(X_AXIS.max, Y_AXIS.max, base_z, &map_x2, &map_y2); y1 = (unsigned int)((map_y1 + map_y2) * 0.5); /* Distance between the title base line and graph top line or the upper part of tics is as given by character height: */ #define DEFAULT_X_DISTANCE 0 x1 += (unsigned int) (tics_len + (-0.5 + Y_AXIS.label.xoffset) * t->h_char); y1 += (unsigned int) ((DEFAULT_X_DISTANCE + Y_AXIS.label.yoffset) * t->v_char); #undef DEFAULT_X_DISTANCE #endif h_just = CENTRE; /* vertical justification for rotated text */ v_just = JUST_BOT; /* horizontal -- does not work for rotated text? */ angle = Y_AXIS.label.rotate; } else { /* usual 3d set view ... */ double step = (other_end - yaxis_x) / 4; /* The only angle that makes sense is running parallel to the axis */ if (Y_AXIS.label.tag == ROTATE_IN_3D_LABEL_TAG) { double ang, angx0, angx1, angy0, angy1; map3d_xy_double(yaxis_x, Y_AXIS.min, base_z, &angx0, &angy0); map3d_xy_double(yaxis_x, Y_AXIS.max, base_z, &angx1, &angy1); ang = atan2(angy1-angy0, angx1-angx0) / DEG2RAD; angle = (ang > 0) ? floor(ang + 0.5) : floor(ang - 0.5); if (angle < -90) angle += 180; if (angle > 90) angle -= 180; step /= 2; } if (Y_AXIS.ticmode & TICS_ON_AXIS) { map3d_xyz((X_AXIS.tic_in ? -step : step)/2., mid_y, base_z, &v1); } else { map3d_xyz(yaxis_x - step, mid_y, base_z, &v1); } if (!X_AXIS.tic_in) { v1.x -= tic_unitx * X_AXIS.ticscale * t->h_tic; v1.y -= tic_unity * X_AXIS.ticscale * t->h_tic; } TERMCOORD(&v1, x1, y1); h_just = CENTRE; v_just = JUST_TOP; } map3d_position_r(&(Y_AXIS.label.offset), &tmpx, &tmpy, "graphbox"); x1 += tmpx; /* user-defined label offset */ y1 += tmpy; /* write_multiline mods it */ ignore_enhanced(Y_AXIS.label.noenhanced); apply_pm3dcolor(&(Y_AXIS.label.textcolor),t); if (angle != 0 && (term->text_angle)(angle)) { write_multiline(x1, y1, Y_AXIS.label.text, h_just, v_just, angle, Y_AXIS.label.font); (term->text_angle)(0); } else { write_multiline(x1, y1, Y_AXIS.label.text, h_just, v_just, 0, Y_AXIS.label.font); } reset_textcolor(&(Y_AXIS.label.textcolor),t); ignore_enhanced(FALSE); #ifdef USE_GRID_LAYERS } #endif } } /* do z tics */ if (Z_AXIS.ticmode #ifdef USE_GRID_LAYERS /* Don't output tics and grids if this is the front part of a * two-part grid drawing process: */ && (FRONTGRID != whichgrid) #endif && (splot_map == FALSE) && (draw_surface || (draw_contour & CONTOUR_SRF) || strchr(pm3d.where,'s') != NULL ) ) { gen_tics(FIRST_Z_AXIS, ztick_callback); } if ((Y_AXIS.zeroaxis.l_type > LT_NODRAW) && !X_AXIS.log && inrange(0, X_AXIS.min, X_AXIS.max) ) { vertex v1, v2; /* line through x=0 */ map3d_xyz(0.0, Y_AXIS.min, base_z, &v1); map3d_xyz(0.0, Y_AXIS.max, base_z, &v2); draw3d_line(&v1, &v2, &Y_AXIS.zeroaxis); } if ((Z_AXIS.zeroaxis.l_type > LT_NODRAW) && !X_AXIS.log && inrange(0, X_AXIS.min, X_AXIS.max) ) { vertex v1, v2; /* line through x=0 y=0 */ map3d_xyz(0.0, 0.0, Z_AXIS.min, &v1); map3d_xyz(0.0, 0.0, Z_AXIS.max, &v2); draw3d_line(&v1, &v2, &Z_AXIS.zeroaxis); } if ((X_AXIS.zeroaxis.l_type > LT_NODRAW) && !Y_AXIS.log && inrange(0, Y_AXIS.min, Y_AXIS.max) ) { vertex v1, v2; term_apply_lp_properties(&X_AXIS.zeroaxis); /* line through y=0 */ map3d_xyz(X_AXIS.min, 0.0, base_z, &v1); map3d_xyz(X_AXIS.max, 0.0, base_z, &v2); draw3d_line(&v1, &v2, &X_AXIS.zeroaxis); } /* PLACE ZLABEL - along the middle grid Z axis - eh ? */ if (Z_AXIS.label.text && (splot_map == FALSE) && (draw_surface || (draw_contour & CONTOUR_SRF) || strpbrk(pm3d.where,"st") != NULL ) ) { int tmpx, tmpy; vertex v1; int h_just = CENTRE; int v_just = JUST_TOP; double mid_z = (Z_AXIS.max + Z_AXIS.min) / 2.; if (Z_AXIS.ticmode & TICS_ON_AXIS) { map3d_xyz(0, 0, mid_z, &v1); TERMCOORD(&v1, x, y); x -= 5 * t->h_char; h_just = RIGHT; } else { /* December 2011 - This caused the separation between the axis and the * label to vary as the view angle changes (Bug #2879916). Why??? * It seems better to use a constant default separation. * double other_end = X_AXIS.min + X_AXIS.max - zaxis_x; * map3d_xyz(zaxis_x - (other_end - zaxis_x) / 4., zaxis_y, mid_z, &v1); */ map3d_xyz(zaxis_x, zaxis_y, mid_z, &v1); TERMCOORD(&v1, x, y); x -= 7 * t->h_char; h_just = CENTRE; } map3d_position_r(&(Z_AXIS.label.offset), &tmpx, &tmpy, "graphbox"); x += tmpx; y += tmpy; ignore_enhanced(Z_AXIS.label.noenhanced); apply_pm3dcolor(&(Z_AXIS.label.textcolor),t); if (Z_AXIS.label.tag == ROTATE_IN_3D_LABEL_TAG) Z_AXIS.label.rotate = TEXT_VERTICAL; if (Z_AXIS.label.rotate != 0 && (term->text_angle)(Z_AXIS.label.rotate)) { write_multiline(x, y, Z_AXIS.label.text, h_just, v_just, Z_AXIS.label.rotate, Z_AXIS.label.font); (term->text_angle)(0); } else { write_multiline(x, y, Z_AXIS.label.text, h_just, v_just, 0, Z_AXIS.label.font); } reset_textcolor(&(Z_AXIS.label.textcolor),t); ignore_enhanced(FALSE); } if (splot_map) clip_area = clip_save; } /* HBB 20010118: all the *_callback() functions made non-static. This * is necessary to work around a bug in HP's assembler shipped with * HP-UX 10 and higher, if GCC tries to use it */ void xtick_callback( AXIS_INDEX axis, double place, char *text, struct lp_style_type grid, /* linetype or -2 for none */ struct ticmark *userlabels) /* currently ignored in 3D plots */ { vertex v1, v2; double scale = (text ? axis_array[axis].ticscale : axis_array[axis].miniticscale) * (axis_array[axis].tic_in ? 1 : -1); double other_end = Y_AXIS.min + Y_AXIS.max - xaxis_y; struct termentry *t = term; (void) axis; /* avoid -Wunused warning */ map3d_xyz(place, xaxis_y, base_z, &v1); if (grid.l_type > LT_NODRAW) { (t->layer)(TERM_LAYER_BEGIN_GRID); /* to save mapping twice, map non-axis y */ map3d_xyz(place, other_end, base_z, &v2); draw3d_line(&v1, &v2, &grid); (t->layer)(TERM_LAYER_END_GRID); } if ((X_AXIS.ticmode & TICS_ON_AXIS) && !Y_AXIS.log && inrange (0.0, Y_AXIS.min, Y_AXIS.max) ) { map3d_xyz(place, 0.0, base_z, &v1); } v2.x = v1.x + tic_unitx * scale * t->v_tic ; v2.y = v1.y + tic_unity * scale * t->v_tic ; v2.z = v1.z + tic_unitz * scale * t->v_tic ; v2.real_z = v1.real_z; draw3d_line(&v1, &v2, &border_lp); term_apply_lp_properties(&border_lp); if (text) { int just; unsigned int x2, y2; int angle; int offsetx, offsety; /* Skip label if we've already written a user-specified one here */ # define MINIMUM_SEPARATION 0.001 while (userlabels) { if (fabs((place - userlabels->position) / (X_AXIS.max - X_AXIS.min)) <= MINIMUM_SEPARATION) { text = NULL; break; } userlabels = userlabels->next; } # undef MINIMUM_SEPARATION /* get offset */ map3d_position_r(&(axis_array[axis].ticdef.offset), &offsetx, &offsety, "xtics"); if (tic_unitx * xscaler < -0.9) just = LEFT; else if (tic_unitx * xscaler < 0.9) just = CENTRE; else just = RIGHT; /* allow manual justification of tick labels, but only for "set view map" */ if (splot_map && axis_array[axis].manual_justify) just = axis_array[axis].label.pos; v2.x = v1.x - tic_unitx * t->h_char * 1; v2.y = v1.y - tic_unity * t->v_char * 1; if (!axis_array[axis].tic_in) { v2.x -= tic_unitx * t->v_tic * axis_array[axis].ticscale; v2.y -= tic_unity * t->v_tic * axis_array[axis].ticscale; } TERMCOORD(&v2, x2, y2); /* User-specified different color for the tics text */ if (axis_array[axis].ticdef.textcolor.type != TC_DEFAULT) apply_pm3dcolor(&(axis_array[axis].ticdef.textcolor), t); angle = axis_array[axis].tic_rotate; if (!(splot_map && angle && term->text_angle(angle))) angle = 0; write_multiline(x2+offsetx, y2+offsety, text, just, JUST_TOP, angle, axis_array[axis].ticdef.font); term->text_angle(0); term_apply_lp_properties(&border_lp); } if (X_AXIS.ticmode & TICS_MIRROR) { map3d_xyz(place, other_end, base_z, &v1); v2.x = v1.x - tic_unitx * scale * t->v_tic; v2.y = v1.y - tic_unity * scale * t->v_tic; v2.z = v1.z - tic_unitz * scale * t->v_tic; v2.real_z = v1.real_z; draw3d_line(&v1, &v2, &border_lp); } } void ytick_callback( AXIS_INDEX axis, double place, char *text, struct lp_style_type grid, struct ticmark *userlabels) /* currently ignored in 3D plots */ { vertex v1, v2; double scale = (text ? axis_array[axis].ticscale : axis_array[axis].miniticscale) * (axis_array[axis].tic_in ? 1 : -1); double other_end = X_AXIS.min + X_AXIS.max - yaxis_x; struct termentry *t = term; (void) axis; /* avoid -Wunused warning */ map3d_xyz(yaxis_x, place, base_z, &v1); if (grid.l_type > LT_NODRAW) { (t->layer)(TERM_LAYER_BEGIN_GRID); map3d_xyz(other_end, place, base_z, &v2); draw3d_line(&v1, &v2, &grid); (t->layer)(TERM_LAYER_END_GRID); } if (Y_AXIS.ticmode & TICS_ON_AXIS && !X_AXIS.log && inrange (0.0, X_AXIS.min, X_AXIS.max) ) { map3d_xyz(0.0, place, base_z, &v1); } v2.x = v1.x + tic_unitx * scale * t->h_tic; v2.y = v1.y + tic_unity * scale * t->h_tic; v2.z = v1.z + tic_unitz * scale * t->h_tic; v2.real_z = v1.real_z; draw3d_line(&v1, &v2, &border_lp); if (text) { int just; unsigned int x2, y2; int angle; int offsetx, offsety; /* Skip label if we've already written a user-specified one here */ # define MINIMUM_SEPARATION 0.001 while (userlabels) { if (fabs((place - userlabels->position) / (Y_AXIS.max - Y_AXIS.min)) <= MINIMUM_SEPARATION) { text = NULL; break; } userlabels = userlabels->next; } # undef MINIMUM_SEPARATION /* get offset */ map3d_position_r(&(axis_array[axis].ticdef.offset), &offsetx, &offsety, "ytics"); if (tic_unitx * xscaler < -0.9) just = LEFT; else if (tic_unitx * xscaler < 0.9) just = CENTRE; else just = RIGHT; /* allow manual justification of tick labels, but only for "set view map" */ if (splot_map && axis_array[axis].manual_justify) just = axis_array[axis].label.pos; v2.x = v1.x - tic_unitx * t->h_char * 1; v2.y = v1.y - tic_unity * t->v_char * 1; if (!axis_array[axis].tic_in) { v2.x -= tic_unitx * t->h_tic * axis_array[axis].ticscale; v2.y -= tic_unity * t->v_tic * axis_array[axis].ticscale; } /* User-specified different color for the tics text */ if (axis_array[axis].ticdef.textcolor.type != TC_DEFAULT) apply_pm3dcolor(&(axis_array[axis].ticdef.textcolor), t); TERMCOORD(&v2, x2, y2); angle = axis_array[axis].tic_rotate; if (!(splot_map && angle && term->text_angle(angle))) angle = 0; write_multiline(x2+offsetx, y2+offsety, text, just, JUST_TOP, angle, axis_array[axis].ticdef.font); term->text_angle(0); term_apply_lp_properties(&border_lp); } if (Y_AXIS.ticmode & TICS_MIRROR) { map3d_xyz(other_end, place, base_z, &v1); v2.x = v1.x - tic_unitx * scale * t->h_tic; v2.y = v1.y - tic_unity * scale * t->h_tic; v2.z = v1.z - tic_unitz * scale * t->h_tic; v2.real_z = v1.real_z; draw3d_line(&v1, &v2, &border_lp); } } void ztick_callback( AXIS_INDEX axis, double place, char *text, struct lp_style_type grid, struct ticmark *userlabels) /* currently ignored in 3D plots */ { /* HBB: inserted some ()'s to shut up gcc -Wall, here and below */ int len = (text ? axis_array[axis].ticscale : axis_array[axis].miniticscale) * (axis_array[axis].tic_in ? 1 : -1) * (term->h_tic); vertex v1, v2, v3; struct termentry *t = term; (void) axis; /* avoid -Wunused warning */ if (axis_array[axis].ticmode & TICS_ON_AXIS) map3d_xyz(0., 0., place, &v1); else map3d_xyz(zaxis_x, zaxis_y, place, &v1); if (grid.l_type > LT_NODRAW) { (t->layer)(TERM_LAYER_BEGIN_GRID); map3d_xyz(back_x, back_y, place, &v2); map3d_xyz(right_x, right_y, place, &v3); draw3d_line(&v1, &v2, &grid); draw3d_line(&v2, &v3, &grid); (t->layer)(TERM_LAYER_END_GRID); } v2.x = v1.x + len / (double)xscaler; v2.y = v1.y; v2.z = v1.z; v2.real_z = v1.real_z; draw3d_line(&v1, &v2, &border_lp); if (text) { unsigned int x1, y1; int offsetx, offsety; /* Skip label if we've already written a user-specified one here */ # define MINIMUM_SEPARATION 0.001 while (userlabels) { if (fabs((place - userlabels->position) / (Z_AXIS.max - Z_AXIS.min)) <= MINIMUM_SEPARATION) { text = NULL; break; } userlabels = userlabels->next; } # undef MINIMUM_SEPARATION /* get offset */ map3d_position_r(&(axis_array[axis].ticdef.offset), &offsetx, &offsety, "ztics"); TERMCOORD(&v1, x1, y1); x1 -= (term->h_tic) * 2; if (!axis_array[axis].tic_in) x1 -= (term->h_tic) * axis_array[axis].ticscale; /* User-specified different color for the tics text */ if (axis_array[axis].ticdef.textcolor.type == TC_Z) axis_array[axis].ticdef.textcolor.value = place; if (axis_array[axis].ticdef.textcolor.type != TC_DEFAULT) apply_pm3dcolor(&(axis_array[axis].ticdef.textcolor), term); write_multiline(x1+offsetx, y1+offsety, text, RIGHT, JUST_CENTRE, 0, axis_array[axis].ticdef.font); term_apply_lp_properties(&border_lp); } if (Z_AXIS.ticmode & TICS_MIRROR) { map3d_xyz(right_x, right_y, place, &v1); v2.x = v1.x - len / (double)xscaler; v2.y = v1.y; v2.z = v1.z; v2.real_z = v1.real_z; draw3d_line(&v1, &v2, &border_lp); } } static int map3d_getposition( struct position *pos, const char *what, double *xpos, double *ypos, double *zpos) { TBOOLEAN screen_coords = FALSE; TBOOLEAN char_coords = FALSE; TBOOLEAN plot_coords = FALSE; switch (pos->scalex) { case first_axes: case second_axes: *xpos = axis_log_value_checked(FIRST_X_AXIS, *xpos, what); plot_coords = TRUE; break; case graph: *xpos = X_AXIS.min + *xpos * (X_AXIS.max - X_AXIS.min); plot_coords = TRUE; break; case screen: *xpos = *xpos * (term->xmax -1) + 0.5; screen_coords = TRUE; break; case character: *xpos = *xpos * term->h_char + 0.5; char_coords = TRUE; break; } switch (pos->scaley) { case first_axes: case second_axes: *ypos = axis_log_value_checked(FIRST_Y_AXIS, *ypos, what); plot_coords = TRUE; break; case graph: if (splot_map) *ypos = Y_AXIS.max - *ypos * (Y_AXIS.max - Y_AXIS.min); else *ypos = Y_AXIS.min + *ypos * (Y_AXIS.max - Y_AXIS.min); plot_coords = TRUE; break; case screen: *ypos = *ypos * (term->ymax -1) + 0.5; screen_coords = TRUE; break; case character: *ypos = *ypos * term->v_char + 0.5; char_coords = TRUE; break; } switch (pos->scalez) { case first_axes: case second_axes: *zpos = axis_log_value_checked(FIRST_Z_AXIS, *zpos, what); plot_coords = TRUE; break; case graph: *zpos = Z_AXIS.min + *zpos * (Z_AXIS.max - Z_AXIS.min); plot_coords = TRUE; break; case screen: screen_coords = TRUE; break; case character: char_coords = TRUE; break; } if (plot_coords && (screen_coords || char_coords)) graph_error("Cannot mix screen or character coords with plot coords"); return (screen_coords || char_coords); } /* * map3d_position() wrapper for map3d_position_double */ void map3d_position( struct position *pos, int *x, int *y, const char *what) { double xx, yy; map3d_position_double(pos, &xx, &yy, what); *x = xx; *y = yy; } void map3d_position_double( struct position *pos, double *x, double *y, const char *what) { double xpos = pos->x; double ypos = pos->y; double zpos = pos->z; if (map3d_getposition(pos, what, &xpos, &ypos, &zpos) == 0) { map3d_xy_double(xpos, ypos, zpos, x, y); } else { /* Screen or character coordinates */ *x = xpos; *y = ypos; } } void map3d_position_r( struct position *pos, int *x, int *y, const char *what) { double xpos = pos->x; double ypos = pos->y; double zpos = pos->z; /* startpoint in graph coordinates */ if (map3d_getposition(pos, what, &xpos, &ypos, &zpos) == 0) { int xoriginlocal, yoriginlocal; double xx, yy; map3d_xy_double(xpos, ypos, zpos, &xx, &yy); *x = xx; *y = yy; if (pos->scalex == graph) xpos = X_AXIS.min; else xpos = 0; if (pos->scaley == graph) ypos = (splot_map) ? Y_AXIS.max : Y_AXIS.min; else ypos = (splot_map) ? Y_AXIS.max : 0; if (pos->scalez == graph) zpos = Z_AXIS.min; else zpos = 0; map3d_xy(xpos, ypos, zpos, &xoriginlocal, &yoriginlocal); *x -= xoriginlocal; *y -= yoriginlocal; } else { /* endpoint `screen' or 'character' coordinates */ *x = xpos; *y = ypos; } return; } /* * these code blocks were moved to functions, to make the code simpler */ static void key_text(int xl, int yl, char *text) { legend_key *key = &keyT; (term->layer)(TERM_LAYER_BEGIN_KEYSAMPLE); if (key->just == GPKEY_LEFT && key->region != GPKEY_USER_PLACEMENT) { (*term->justify_text) (LEFT); (*term->put_text) (xl + key_text_left, yl, text); } else { if ((*term->justify_text) (RIGHT)) { (*term->put_text) (xl + key_text_right, yl, text); } else { int x = xl + key_text_right - (term->h_char) * estimate_strlen(text); (*term->put_text) (x, yl, text); } } (term->layer)(TERM_LAYER_END_KEYSAMPLE); } static void key_sample_line(int xl, int yl) { BoundingBox *clip_save = clip_area; /* Clip against canvas */ if (term->flags & TERM_CAN_CLIP) clip_area = NULL; else clip_area = &canvas; (term->layer)(TERM_LAYER_BEGIN_KEYSAMPLE); draw_clip_line(xl + key_sample_left, yl, xl + key_sample_right, yl); (term->layer)(TERM_LAYER_END_KEYSAMPLE); clip_area = clip_save; } static void key_sample_point(int xl, int yl, int pointtype) { BoundingBox *clip_save = clip_area; /* Clip against canvas */ if (term->flags & TERM_CAN_CLIP) clip_area = NULL; else clip_area = &canvas; (term->layer)(TERM_LAYER_BEGIN_KEYSAMPLE); if (!clip_point(xl + key_point_offset, yl)) (*term->point) (xl + key_point_offset, yl, pointtype); (term->layer)(TERM_LAYER_END_KEYSAMPLE); clip_area = clip_save; } /* * returns minimal and maximal values of the cb-range (or z-range if taking the * color from the z value) of the given surface */ static void get_surface_cbminmax(struct surface_points *plot, double *cbmin, double *cbmax) { int i, curve = 0; TBOOLEAN color_from_column = plot->pm3d_color_from_column; /* just a shortcut */ coordval cb; struct iso_curve *icrvs = plot->iso_crvs; struct coordinate GPHUGE *points; *cbmin = VERYLARGE; *cbmax = -VERYLARGE; while (icrvs && curve < plot->num_iso_read) { /* fprintf(stderr,"**** NEW ISOCURVE - nb of pts: %i ****\n", icrvs->p_count); */ for (i = 0, points = icrvs->points; i < icrvs->p_count; i++) { /* fprintf(stderr," point i=%i => x=%4g y=%4g z=%4lg cb=%4lg\n",i, points[i].x,points[i].y,points[i].z,points[i].CRD_COLOR); */ if (points[i].type == INRANGE) { /* ?? if (!clip_point(x, y)) ... */ cb = color_from_column ? points[i].CRD_COLOR : points[i].z; if (cb < *cbmin) *cbmin = cb; if (cb > *cbmax) *cbmax = cb; } } /* points on one scan */ icrvs = icrvs->next; curve++; } /* surface */ } /* * Draw a gradient color line for a key (legend). */ static void key_sample_line_pm3d(struct surface_points *plot, int xl, int yl) { legend_key *key = &keyT; int steps = GPMIN(24, abs(key_sample_right - key_sample_left)); /* don't multiply by key->swidth --- could be >> palette.maxcolors */ int x_to = xl + key_sample_right; double step = ((double)(key_sample_right - key_sample_left)) / steps; int i = 1, x1 = xl + key_sample_left, x2; double cbmin, cbmax; double gray, gray_from, gray_to, gray_step; int colortype = plot->lp_properties.pm3d_color.type; /* If plot uses a constant color, set it here and then let simpler routine take over */ if ((colortype == TC_RGB && plot->lp_properties.pm3d_color.value >= 0.0) || (colortype == TC_LT) || (colortype == TC_LINESTYLE && plot->lp_properties.l_type != LT_COLORFROMCOLUMN)) { apply_pm3dcolor(&(plot->lp_properties.pm3d_color), term); key_sample_line(xl,yl); return; } /* color gradient only over the cb-values of the surface, if smaller than the * cb-axis range (the latter are gray values [0:1]) */ get_surface_cbminmax(plot, &cbmin, &cbmax); if (cbmin > cbmax) return; /* splot 1/0, for example */ cbmin = GPMAX(cbmin, CB_AXIS.min); cbmax = GPMIN(cbmax, CB_AXIS.max); gray_from = cb2gray(cbmin); gray_to = cb2gray(cbmax); gray_step = (gray_to - gray_from)/steps; if (key->region != GPKEY_USER_PLACEMENT) (*term->move) (x1, yl); else clip_move(x1, yl); x2 = x1; while (i <= steps) { /* if (i>1) set_color( i==steps ? 1 : (i-0.5)/steps ); ... range [0:1] */ gray = (i==steps) ? gray_to : gray_from+i*gray_step; set_color(gray); (*term->move) (x2, yl); x2 = (i==steps) ? x_to : x1 + (int)(i*step+0.5); if (key->region != GPKEY_USER_PLACEMENT) (*term->vector) (x2, yl); else clip_vector(x2, yl); i++; } } /* * Draw a sequence of points with gradient color a key (legend). */ static void key_sample_point_pm3d( struct surface_points *plot, int xl, int yl, int pointtype) { BoundingBox *clip_save = clip_area; int x_to = xl + key_sample_right; int i = 0, x1 = xl + key_sample_left, x2; double cbmin, cbmax; double gray, gray_from, gray_to, gray_step; int colortype = plot->lp_properties.pm3d_color.type; /* rule for number of steps: 3*char_width*pointsize or char_width for dots, * but at least 3 points */ double step = term->h_char * (pointtype == -1 ? 1 : 3*(1+(pointsize-1)/2)); int steps = (int)(((double)(key_sample_right - key_sample_left)) / step + 0.5); if (steps < 2) steps = 2; step = ((double)(key_sample_right - key_sample_left)) / steps; /* If plot uses a constant color, set it here and then let simpler routine take over */ if ((colortype == TC_RGB && plot->lp_properties.pm3d_color.value >= 0.0) || (colortype == TC_LT) || (colortype == TC_LINESTYLE && plot->lp_properties.l_type != LT_COLORFROMCOLUMN)) { apply_pm3dcolor(&(plot->lp_properties.pm3d_color), term); key_sample_point(xl,yl,pointtype); return; } /* color gradient only over the cb-values of the surface, if smaller than the * cb-axis range (the latter are gray values [0:1]) */ get_surface_cbminmax(plot, &cbmin, &cbmax); if (cbmin > cbmax) return; /* splot 1/0, for example */ cbmin = GPMAX(cbmin, CB_AXIS.min); cbmax = GPMIN(cbmax, CB_AXIS.max); gray_from = cb2gray(cbmin); gray_to = cb2gray(cbmax); gray_step = (gray_to - gray_from)/steps; #if 0 fprintf(stderr,"POINT_pm3D: cbmin=%g cbmax=%g\n",cbmin, cbmax); fprintf(stderr,"steps=%i gray_from=%g gray_to=%g gray_step=%g\n",steps,gray_from,gray_to,gray_step); #endif /* Clip to canvas */ if (term->flags & TERM_CAN_CLIP) clip_area = NULL; else clip_area = &canvas; while (i <= steps) { /* if (i>0) set_color( i==steps ? gray_to : (i-0.5)/steps ); ... range [0:1] */ gray = (i==steps) ? gray_to : gray_from+i*gray_step; set_color(gray); x2 = i==0 ? x1 : (i==steps ? x_to : x1 + (int)(i*step+0.5)); /* x2 += key_point_offset; ... that's if there is only 1 point */ if (!clip_point(x2, yl)) (*term->point) (x2, yl, pointtype); i++; } clip_area = clip_save; } /* plot_vectors: * Plot the curves in VECTORS style */ static void plot3d_vectors(struct surface_points *plot) { int i; double x1, y1, x2, y2; arrow_style_type ap; struct coordinate GPHUGE *heads = plot->iso_crvs->points; struct coordinate GPHUGE *tails = plot->iso_crvs->next->points; /* Only necessary once, unless variable arrow style */ ap = plot->arrow_properties; term_apply_lp_properties(&ap.lp_properties); apply_3dhead_properties(&ap); for (i = 0; i < plot->iso_crvs->p_count; i++) { if (heads[i].type == UNDEFINED || tails[i].type == UNDEFINED) continue; /* variable arrow style read from extra data column */ if (plot->arrow_properties.tag == AS_VARIABLE) { int as= heads[i].CRD_COLOR; arrow_use_properties(&ap, as); term_apply_lp_properties(&ap.lp_properties); apply_head_properties(&ap); } else { check_for_variable_color(plot, &heads[i]); } if (heads[i].type == INRANGE && tails[i].type == INRANGE) { map3d_xy_double(heads[i].x, heads[i].y, heads[i].z, &x1, &y1); map3d_xy_double(tails[i].x, tails[i].y, tails[i].z, &x2, &y2); draw_clip_arrow((int)x1, (int)y1, (int)x2, (int)y2, ap.head); } } } static void check_for_variable_color(struct surface_points *plot, struct coordinate *point) { int colortype = plot->lp_properties.pm3d_color.type; switch( colortype ) { case TC_RGB: if (plot->pm3d_color_from_column) set_rgbcolor( (int)point->CRD_COLOR ); break; case TC_Z: case TC_DEFAULT: /* pm3d mode assumes this is default */ if (can_pm3d && plot->lp_properties.use_palette) { if (plot->pm3d_color_from_column) set_color( cb2gray(point->CRD_COLOR) ); else set_color( cb2gray( z2cb(point->z) ) ); } break; case TC_LINESTYLE: /* color from linestyle in data column */ plot->lp_properties.pm3d_color.lt = (int)(point->CRD_COLOR); apply_pm3dcolor(&(plot->lp_properties.pm3d_color), term); break; default: /* The other cases were taken care of already */ break; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/internal.c������������������������������������������������������������������������0000644�0004711�0000144�00000115654�12215401451�012707� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: internal.c,v 1.67.2.2 2013/09/14 20:24:45 sfeam Exp $"); } #endif /* GNUPLOT - internal.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "internal.h" #include "stdfn.h" #include "alloc.h" #include "util.h" /* for int_error() */ #include "gp_time.h" /* for str(p|f)time */ #include "command.h" /* for do_system_func */ #include "variable.h" /* For locale handling */ #include <math.h> /* * Excerpt from the Solaris man page for matherr(): * * The The System V Interface Definition, Third Edition (SVID3) * specifies that certain libm functions call matherr() when * exceptions are detected. Users may define their own mechan- * isms for handling exceptions, by including a function named * matherr() in their programs. */ static enum DATA_TYPES sprintf_specifier __PROTO((const char *format)); int GP_MATHERR( STRUCT_EXCEPTION_P_X ) { return (undefined = TRUE); /* don't print error message */ } #define BAD_DEFAULT default: int_error(NO_CARET, "internal error : type neither INT or CMPLX"); return; static int recursion_depth = 0; void eval_reset_after_error() { recursion_depth = 0; } void f_push(union argument *x) { struct udvt_entry *udv; udv = x->udv_arg; if (udv->udv_undef) { /* undefined */ int_error(NO_CARET, "undefined variable: %s", udv->udv_name); } push(&(udv->udv_value)); } void f_pushc(union argument *x) { push(&(x->v_arg)); } void f_pushd1(union argument *x) { push(&(x->udf_arg->dummy_values[0])); } void f_pop(union argument *x) { struct value dummy; pop(&dummy); gpfree_string(&dummy); } void f_pushd2(union argument *x) { push(&(x->udf_arg->dummy_values[1])); } void f_pushd(union argument *x) { struct value param; (void) pop(¶m); push(&(x->udf_arg->dummy_values[param.v.int_val])); } /* execute a udf */ void f_call(union argument *x) { struct udft_entry *udf; struct value save_dummy; udf = x->udf_arg; if (!udf->at) int_error(NO_CARET, "undefined function: %s", udf->udf_name); save_dummy = udf->dummy_values[0]; (void) pop(&(udf->dummy_values[0])); if (udf->dummy_num != 1) int_error(NO_CARET, "function %s requires %d variables", udf->udf_name, udf->dummy_num); if (recursion_depth++ > STACK_DEPTH) int_error(NO_CARET, "recursion depth limit exceeded"); execute_at(udf->at); gpfree_string(&udf->dummy_values[0]); udf->dummy_values[0] = save_dummy; recursion_depth--; } /* execute a udf of n variables */ void f_calln(union argument *x) { struct udft_entry *udf; struct value save_dummy[MAX_NUM_VAR]; int i; int num_pop; struct value num_params; udf = x->udf_arg; if (!udf->at) /* undefined */ int_error(NO_CARET, "undefined function: %s", udf->udf_name); for (i = 0; i < MAX_NUM_VAR; i++) save_dummy[i] = udf->dummy_values[i]; (void) pop(&num_params); if (num_params.v.int_val != udf->dummy_num) int_error(NO_CARET, "function %s requires %d variable%c", udf->udf_name, udf->dummy_num, (udf->dummy_num == 1)?'\0':'s'); /* if there are more parameters than the function is expecting */ /* simply ignore the excess */ if (num_params.v.int_val > MAX_NUM_VAR) { /* pop and discard the dummies that there is no room for */ num_pop = num_params.v.int_val - MAX_NUM_VAR; for (i = 0; i < num_pop; i++) (void) pop(&(udf->dummy_values[0])); num_pop = MAX_NUM_VAR; } else { num_pop = num_params.v.int_val; } /* pop parameters we can use */ for (i = num_pop - 1; i >= 0; i--) (void) pop(&(udf->dummy_values[i])); if (recursion_depth++ > STACK_DEPTH) int_error(NO_CARET, "recursion depth limit exceeded"); execute_at(udf->at); recursion_depth--; for (i = 0; i < MAX_NUM_VAR; i++) { gpfree_string(&udf->dummy_values[i]); udf->dummy_values[i] = save_dummy[i]; } } void f_sum(union argument *arg) { struct value beg, end, varname; /* [<var> = <start>:<end>] */ udft_entry *udf; /* function to evaluate */ udvt_entry *udv; /* iteration variable */ struct value ret; /* result */ struct value z; int i; (void) pop(&end); (void) pop(&beg); (void) pop(&varname); if (beg.type != INTGR || end.type != INTGR) int_error(NO_CARET, "range specifiers of sum must have integer values"); if (varname.type != STRING) int_error(NO_CARET, "internal error: f_sum expects argument (varname) of type string."); udv = get_udv_by_name(varname.v.string_val); if (!udv) int_error(NO_CARET, "internal error: f_sum could not access iteration variable."); udv->udv_undef = false; udf = arg->udf_arg; if (!udf) int_error(NO_CARET, "internal error: f_sum could not access summation coefficient function"); Gcomplex(&ret, 0, 0); for (i=beg.v.int_val; i<=end.v.int_val; ++i) { double x, y; /* calculate f_i = f() with user defined variable i */ Ginteger(&udv->udv_value, i); execute_at(udf->at); pop(&z); x = real(&ret) + real(&z); y = imag(&ret) + imag(&z); Gcomplex(&ret, x, y); } gpfree_string(&varname); push(Gcomplex(&z, real(&ret), imag(&ret))); } void f_lnot(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ int_check(pop(&a)); push(Ginteger(&a, !a.v.int_val)); } void f_bnot(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ int_check(pop(&a)); push(Ginteger(&a, ~a.v.int_val)); } void f_lor(union argument *arg) { struct value a, b; (void) arg; /* avoid -Wunused warning */ int_check(pop(&b)); int_check(pop(&a)); push(Ginteger(&a, a.v.int_val || b.v.int_val)); } void f_land(union argument *arg) { struct value a, b; (void) arg; /* avoid -Wunused warning */ int_check(pop(&b)); int_check(pop(&a)); push(Ginteger(&a, a.v.int_val && b.v.int_val)); } void f_bor(union argument *arg) { struct value a, b; (void) arg; /* avoid -Wunused warning */ int_check(pop(&b)); int_check(pop(&a)); push(Ginteger(&a, a.v.int_val | b.v.int_val)); } void f_xor(union argument *arg) { struct value a, b; (void) arg; /* avoid -Wunused warning */ int_check(pop(&b)); int_check(pop(&a)); push(Ginteger(&a, a.v.int_val ^ b.v.int_val)); } void f_band(union argument *arg) { struct value a, b; (void) arg; /* avoid -Wunused warning */ int_check(pop(&b)); int_check(pop(&a)); push(Ginteger(&a, a.v.int_val & b.v.int_val)); } /* * Make all the following internal routines perform autoconversion * from string to numeric value. */ #define pop(x) pop_or_convert_from_string(x) void f_uminus(union argument *arg) { struct value a; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); switch (a.type) { case INTGR: a.v.int_val = -a.v.int_val; break; case CMPLX: a.v.cmplx_val.real = -a.v.cmplx_val.real; a.v.cmplx_val.imag = -a.v.cmplx_val.imag; break; BAD_DEFAULT } push(&a); } void f_eq(union argument *arg) { /* note: floating point equality is rare because of roundoff error! */ struct value a, b; int result = 0; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); switch (a.type) { case INTGR: switch (b.type) { case INTGR: result = (a.v.int_val == b.v.int_val); break; case CMPLX: result = (a.v.int_val == b.v.cmplx_val.real && b.v.cmplx_val.imag == 0.0); break; BAD_DEFAULT } break; case CMPLX: switch (b.type) { case INTGR: result = (b.v.int_val == a.v.cmplx_val.real && a.v.cmplx_val.imag == 0.0); break; case CMPLX: result = (a.v.cmplx_val.real == b.v.cmplx_val.real && a.v.cmplx_val.imag == b.v.cmplx_val.imag); break; BAD_DEFAULT } break; BAD_DEFAULT } push(Ginteger(&a, result)); } void f_ne(union argument *arg) { struct value a, b; int result = 0; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); switch (a.type) { case INTGR: switch (b.type) { case INTGR: result = (a.v.int_val != b.v.int_val); break; case CMPLX: result = (a.v.int_val != b.v.cmplx_val.real || b.v.cmplx_val.imag != 0.0); break; BAD_DEFAULT } break; case CMPLX: switch (b.type) { case INTGR: result = (b.v.int_val != a.v.cmplx_val.real || a.v.cmplx_val.imag != 0.0); break; case CMPLX: result = (a.v.cmplx_val.real != b.v.cmplx_val.real || a.v.cmplx_val.imag != b.v.cmplx_val.imag); break; BAD_DEFAULT } break; BAD_DEFAULT } push(Ginteger(&a, result)); } void f_gt(union argument *arg) { struct value a, b; int result = 0; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); switch (a.type) { case INTGR: switch (b.type) { case INTGR: result = (a.v.int_val > b.v.int_val); break; case CMPLX: result = (a.v.int_val > b.v.cmplx_val.real); break; BAD_DEFAULT } break; case CMPLX: switch (b.type) { case INTGR: result = (a.v.cmplx_val.real > b.v.int_val); break; case CMPLX: result = (a.v.cmplx_val.real > b.v.cmplx_val.real); break; BAD_DEFAULT } break; BAD_DEFAULT } push(Ginteger(&a, result)); } void f_lt(union argument *arg) { struct value a, b; int result = 0; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); switch (a.type) { case INTGR: switch (b.type) { case INTGR: result = (a.v.int_val < b.v.int_val); break; case CMPLX: result = (a.v.int_val < b.v.cmplx_val.real); break; BAD_DEFAULT } break; case CMPLX: switch (b.type) { case INTGR: result = (a.v.cmplx_val.real < b.v.int_val); break; case CMPLX: result = (a.v.cmplx_val.real < b.v.cmplx_val.real); break; BAD_DEFAULT } break; BAD_DEFAULT } push(Ginteger(&a, result)); } void f_ge(union argument *arg) { struct value a, b; int result = 0; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); switch (a.type) { case INTGR: switch (b.type) { case INTGR: result = (a.v.int_val >= b.v.int_val); break; case CMPLX: result = (a.v.int_val >= b.v.cmplx_val.real); break; BAD_DEFAULT } break; case CMPLX: switch (b.type) { case INTGR: result = (a.v.cmplx_val.real >= b.v.int_val); break; case CMPLX: result = (a.v.cmplx_val.real >= b.v.cmplx_val.real); break; BAD_DEFAULT } break; BAD_DEFAULT } push(Ginteger(&a, result)); } void f_le(union argument *arg) { struct value a, b; int result = 0; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); switch (a.type) { case INTGR: switch (b.type) { case INTGR: result = (a.v.int_val <= b.v.int_val); break; case CMPLX: result = (a.v.int_val <= b.v.cmplx_val.real); break; BAD_DEFAULT } break; case CMPLX: switch (b.type) { case INTGR: result = (a.v.cmplx_val.real <= b.v.int_val); break; case CMPLX: result = (a.v.cmplx_val.real <= b.v.cmplx_val.real); break; BAD_DEFAULT } break; BAD_DEFAULT } push(Ginteger(&a, result)); } void f_plus(union argument *arg) { struct value a, b, result; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); switch (a.type) { case INTGR: switch (b.type) { case INTGR: (void) Ginteger(&result, a.v.int_val + b.v.int_val); break; case CMPLX: (void) Gcomplex(&result, a.v.int_val + b.v.cmplx_val.real, b.v.cmplx_val.imag); break; BAD_DEFAULT } break; case CMPLX: switch (b.type) { case INTGR: (void) Gcomplex(&result, b.v.int_val + a.v.cmplx_val.real, a.v.cmplx_val.imag); break; case CMPLX: (void) Gcomplex(&result, a.v.cmplx_val.real + b.v.cmplx_val.real, a.v.cmplx_val.imag + b.v.cmplx_val.imag); break; BAD_DEFAULT } break; BAD_DEFAULT } push(&result); } void f_minus(union argument *arg) { struct value a, b, result; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); /* now do a - b */ switch (a.type) { case INTGR: switch (b.type) { case INTGR: (void) Ginteger(&result, a.v.int_val - b.v.int_val); break; case CMPLX: (void) Gcomplex(&result, a.v.int_val - b.v.cmplx_val.real, -b.v.cmplx_val.imag); break; BAD_DEFAULT } break; case CMPLX: switch (b.type) { case INTGR: (void) Gcomplex(&result, a.v.cmplx_val.real - b.v.int_val, a.v.cmplx_val.imag); break; case CMPLX: (void) Gcomplex(&result, a.v.cmplx_val.real - b.v.cmplx_val.real, a.v.cmplx_val.imag - b.v.cmplx_val.imag); break; BAD_DEFAULT } break; BAD_DEFAULT } push(&result); } void f_mult(union argument *arg) { struct value a, b, result; double product; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); /* now do a*b */ switch (a.type) { case INTGR: switch (b.type) { case INTGR: product = (double)a.v.int_val * (double)b.v.int_val; if (fabs(product) >= (double)INT_MAX) (void) Gcomplex(&result, product, 0.0); else (void) Ginteger(&result, a.v.int_val * b.v.int_val); break; case CMPLX: (void) Gcomplex(&result, a.v.int_val * b.v.cmplx_val.real, a.v.int_val * b.v.cmplx_val.imag); break; BAD_DEFAULT } break; case CMPLX: switch (b.type) { case INTGR: (void) Gcomplex(&result, b.v.int_val * a.v.cmplx_val.real, b.v.int_val * a.v.cmplx_val.imag); break; case CMPLX: (void) Gcomplex(&result, a.v.cmplx_val.real * b.v.cmplx_val.real - a.v.cmplx_val.imag * b.v.cmplx_val.imag, a.v.cmplx_val.real * b.v.cmplx_val.imag + a.v.cmplx_val.imag * b.v.cmplx_val.real); break; BAD_DEFAULT } break; BAD_DEFAULT } push(&result); } void f_div(union argument *arg) { struct value a, b, result; double square; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); /* now do a/b */ switch (a.type) { case INTGR: switch (b.type) { case INTGR: if (b.v.int_val) (void) Ginteger(&result, a.v.int_val / b.v.int_val); else { (void) Ginteger(&result, 0); undefined = TRUE; } break; case CMPLX: square = b.v.cmplx_val.real * b.v.cmplx_val.real + b.v.cmplx_val.imag * b.v.cmplx_val.imag; if (square) (void) Gcomplex(&result, a.v.int_val * b.v.cmplx_val.real / square, -a.v.int_val * b.v.cmplx_val.imag / square); else { (void) Gcomplex(&result, 0.0, 0.0); undefined = TRUE; } break; BAD_DEFAULT } break; case CMPLX: switch (b.type) { case INTGR: if (b.v.int_val) (void) Gcomplex(&result, a.v.cmplx_val.real / b.v.int_val, a.v.cmplx_val.imag / b.v.int_val); else { (void) Gcomplex(&result, 0.0, 0.0); undefined = TRUE; } break; case CMPLX: square = b.v.cmplx_val.real * b.v.cmplx_val.real + b.v.cmplx_val.imag * b.v.cmplx_val.imag; if (square) (void) Gcomplex(&result, (a.v.cmplx_val.real * b.v.cmplx_val.real + a.v.cmplx_val.imag * b.v.cmplx_val.imag) / square, (a.v.cmplx_val.imag * b.v.cmplx_val.real - a.v.cmplx_val.real * b.v.cmplx_val.imag) / square); else { (void) Gcomplex(&result, 0.0, 0.0); undefined = TRUE; } break; BAD_DEFAULT } break; BAD_DEFAULT } push(&result); } void f_mod(union argument *arg) { struct value a, b; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); /* now do a%b */ if (a.type != INTGR || b.type != INTGR) int_error(NO_CARET, "non-integer operand for %%"); if (b.v.int_val) push(Ginteger(&a, a.v.int_val % b.v.int_val)); else { push(Ginteger(&a, 0)); undefined = TRUE; } } void f_power(union argument *arg) { struct value a, b, result; int i, t; double mag, ang; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); /* now find a**b */ switch (a.type) { case INTGR: switch (b.type) { case INTGR: if (a.v.int_val == 0) { if (b.v.int_val < 0) undefined = TRUE; (void) Ginteger(&result, b.v.int_val == 0 ? 1 : 0); break; } /* EAM Oct 2009 - avoid integer overflow by switching to double */ mag = pow((double)a.v.int_val,(double)b.v.int_val); if (mag > (double)INT_MAX || b.v.int_val < 0) { (void) Gcomplex(&result, mag, 0.0); break; } t = 1; /* this ought to use bit-masks and squares, etc */ for (i = 0; i < b.v.int_val; i++) t *= a.v.int_val; (void) Ginteger(&result, t); break; case CMPLX: if (a.v.int_val == 0) { if (b.v.cmplx_val.imag != 0 || b.v.cmplx_val.real < 0) { undefined = TRUE; } /* return 1.0 for 0**0 */ Gcomplex(&result, b.v.cmplx_val.real == 0 ? 1.0 : 0.0, 0.0); } else { mag = pow(magnitude(&a), fabs(b.v.cmplx_val.real)); if (b.v.cmplx_val.real < 0.0) { if (mag != 0.0) mag = 1.0 / mag; else undefined = TRUE; } mag *= gp_exp(-b.v.cmplx_val.imag * angle(&a)); ang = b.v.cmplx_val.real * angle(&a) + b.v.cmplx_val.imag * log(magnitude(&a)); (void) Gcomplex(&result, mag * cos(ang), mag * sin(ang)); } break; BAD_DEFAULT } break; case CMPLX: switch (b.type) { case INTGR: if (a.v.cmplx_val.imag == 0.0) { mag = pow(a.v.cmplx_val.real, (double) abs(b.v.int_val)); if (b.v.int_val < 0) { if (mag != 0.0) mag = 1.0 / mag; else undefined = TRUE; } (void) Gcomplex(&result, mag, 0.0); } else { /* not so good, but...! */ mag = pow(magnitude(&a), (double) abs(b.v.int_val)); if (b.v.int_val < 0) { if (mag != 0.0) mag = 1.0 / mag; else undefined = TRUE; } ang = angle(&a) * b.v.int_val; (void) Gcomplex(&result, mag * cos(ang), mag * sin(ang)); } break; case CMPLX: if (a.v.cmplx_val.real == 0 && a.v.cmplx_val.imag == 0) { if (b.v.cmplx_val.imag != 0 || b.v.cmplx_val.real < 0) { undefined = TRUE; } /* return 1.0 for 0**0 */ Gcomplex(&result, b.v.cmplx_val.real == 0 ? 1.0 : 0.0, 0.0); } else { mag = pow(magnitude(&a), fabs(b.v.cmplx_val.real)); if (b.v.cmplx_val.real < 0.0) { if (mag != 0.0) mag = 1.0 / mag; else undefined = TRUE; } mag *= gp_exp(-b.v.cmplx_val.imag * angle(&a)); ang = b.v.cmplx_val.real * angle(&a) + b.v.cmplx_val.imag * log(magnitude(&a)); (void) Gcomplex(&result, mag * cos(ang), mag * sin(ang)); } break; BAD_DEFAULT } break; BAD_DEFAULT } push(&result); } void f_factorial(union argument *arg) { struct value a; int i; double val = 0.0; (void) arg; /* avoid -Wunused warning */ (void) pop(&a); /* find a! (factorial) */ switch (a.type) { case INTGR: val = 1.0; for (i = a.v.int_val; i > 1; i--) /*fpe's should catch overflows */ val *= i; break; default: int_error(NO_CARET, "factorial (!) argument must be an integer"); return; /* avoid gcc -Wall warning about val */ } push(Gcomplex(&a, val, 0.0)); } /* * Terminate the autoconversion from string to numeric values */ #undef pop void f_concatenate(union argument *arg) { struct value a, b, result; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); if (b.type == INTGR) { int i = b.v.int_val; b.type = STRING; b.v.string_val = (char *)gp_alloc(32,"str_const"); #ifdef HAVE_SNPRINTF snprintf(b.v.string_val,32,"%d",i); #else sprintf(b.v.string_val,"%d",i); #endif } if (a.type != STRING || b.type != STRING) int_error(NO_CARET, "internal error : STRING operator applied to non-STRING type"); (void) Gstring(&result, gp_stradd(a.v.string_val, b.v.string_val)); gpfree_string(&a); gpfree_string(&b); push(&result); gpfree_string(&result); /* free string allocated within gp_stradd() */ } void f_eqs(union argument *arg) { struct value a, b, result; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); if(a.type != STRING || b.type != STRING) int_error(NO_CARET, "internal error : STRING operator applied to non-STRING type"); (void) Ginteger(&result, !strcmp(a.v.string_val, b.v.string_val)); gpfree_string(&a); gpfree_string(&b); push(&result); } void f_nes(union argument *arg) { struct value a, b, result; (void) arg; /* avoid -Wunused warning */ (void) pop(&b); (void) pop(&a); if(a.type != STRING || b.type != STRING) int_error(NO_CARET, "internal error : STRING operator applied to non-STRING type"); (void) Ginteger(&result, (int)(strcmp(a.v.string_val, b.v.string_val)!=0)); gpfree_string(&a); gpfree_string(&b); push(&result); } void f_strlen(union argument *arg) { struct value a, result; (void) arg; (void) pop(&a); if (a.type != STRING) int_error(NO_CARET, "internal error : strlen of non-STRING argument"); (void) Ginteger(&result, (int)gp_strlen(a.v.string_val)); gpfree_string(&a); push(&result); } void f_strstrt(union argument *arg) { struct value needle, haystack, result; char *start; (void) arg; (void) pop(&needle); (void) pop(&haystack); if (needle.type != STRING || haystack.type != STRING) int_error(NO_CARET, "internal error : non-STRING argument to strstrt"); start = strstr(haystack.v.string_val, needle.v.string_val); (void) Ginteger(&result, (int)(start ? (start-haystack.v.string_val)+1 : 0)); gpfree_string(&needle); gpfree_string(&haystack); push(&result); } /* * f_range() handles both explicit calls to substr(string, beg, end) * and the short form string[beg:end]. The calls to gp_strlen() and * gp_strchrn() allow it to handle utf8 strings. */ void f_range(union argument *arg) { struct value beg, end, full; struct value substr; (void) arg; /* avoid -Wunused warning */ (void) pop(&end); (void) pop(&beg); (void) pop(&full); if (end.type != INTGR || beg.type != INTGR) int_error(NO_CARET, "internal error: substring range specifiers must have integer values"); if (full.type != STRING) int_error(NO_CARET, "internal error: substring range operator applied to non-STRING type"); FPRINTF((stderr,"f_range( \"%s\", %d, %d)\n", full.v.string_val, beg.v.int_val, end.v.int_val)); if (end.v.int_val > gp_strlen(full.v.string_val)) end.v.int_val = gp_strlen(full.v.string_val); if (beg.v.int_val < 1) beg.v.int_val = 1; if (beg.v.int_val > end.v.int_val) { push(Gstring(&substr, "")); } else { char *begp = gp_strchrn(full.v.string_val,beg.v.int_val-1); char *endp = gp_strchrn(full.v.string_val,end.v.int_val); *endp = '\0'; push(Gstring(&substr, begp)); } gpfree_string(&full); } void f_words(union argument *arg) { struct value a, b, result; int nwords = 0; int ntarget; char *s; (void) arg; if (pop(&b)->type != INTGR) int_error(NO_CARET, "internal error : non-INTGR argument"); ntarget = b.v.int_val; if (pop(&a)->type != STRING) int_error(NO_CARET, "internal error : non-STRING argument"); s = a.v.string_val; Gstring(&result, ""); while (*s) { while (isspace(*s)) s++; if (!*s) break; nwords++; if (nwords == ntarget) { /* Found the one we wanted */ Gstring(&result,s); s = result.v.string_val; } while (*s && !isspace(*s)) s++; if (nwords == ntarget) { /* Terminate this word cleanly */ *s = '\0'; break; } } if (ntarget < 0) /* words(s) = word(s,-1) = # of words in string */ Ginteger(&result, nwords); push(&result); gpfree_string(&a); } /* EAM July 2004 (revised to dynamic buffer July 2005) * There are probably an infinite number of things that can * go wrong if the user mis-matches arguments and format strings * in the call to sprintf, but I hope none will do worse than * result in a garbage output string. */ void f_sprintf(union argument *arg) { struct value a[10], *args; struct value num_params; struct value result; char *buffer; int bufsize; char *next_start, *outpos, tempchar; int next_length; char *prev_start; int prev_pos; int i, remaining; int nargs = 0; int save_errno; enum DATA_TYPES spec_type; /* Retrieve number of parameters from top of stack */ pop(&num_params); nargs = num_params.v.int_val; if (nargs > 10) { /* Fall back to slow but sure allocation */ args = gp_alloc(sizeof(struct value)*nargs, "sprintf args"); } else args = a; for (i=0; i<nargs; i++) pop(&args[i]); /* pop next argument */ /* Make sure we got a format string of some sort */ if (args[nargs-1].type != STRING) int_error(NO_CARET,"First parameter to sprintf must be a format string"); /* Allocate space for the output string. If this isn't */ /* long enough we can reallocate a larger space later. */ bufsize = 80 + strlen(args[nargs-1].v.string_val); buffer = gp_alloc(bufsize, "f_sprintf"); /* Copy leading fragment of format into output buffer */ outpos = buffer; next_start = args[nargs-1].v.string_val; next_length = strcspn(next_start,"%"); strncpy(outpos, next_start, next_length); next_start += next_length; outpos += next_length; /* Format the remaining sprintf() parameters one by one */ prev_start = next_start; prev_pos = next_length; remaining = nargs - 1; /* If the user has set an explicit LC_NUMERIC locale, apply it */ /* to sprintf calls during expression evaluation. */ set_numeric_locale(); /* Each time we start this loop we are pointing to a % character */ while (remaining-->0 && next_start[0] && next_start[1]) { struct value *next_param = &args[remaining]; /* Check for %%; print as literal and don't consume a parameter */ if (!strncmp(next_start,"%%",2)) { next_start++; do { *outpos++ = *next_start++; } while(*next_start && *next_start != '%'); remaining++; continue; } next_length = strcspn(next_start+1,"%") + 1; tempchar = next_start[next_length]; next_start[next_length] = '\0'; spec_type = sprintf_specifier(next_start); /* string value <-> numerical value check */ if ( spec_type == STRING && next_param->type != STRING ) int_error(NO_CARET,"f_sprintf: attempt to print numeric value with string format"); if ( spec_type != STRING && next_param->type == STRING ) int_error(NO_CARET,"f_sprintf: attempt to print string value with numeric format"); #ifdef HAVE_SNPRINTF /* Use the format to print next arg */ save_errno = errno; switch(spec_type) { case INTGR: snprintf(outpos,bufsize-(outpos-buffer), next_start, (int)real(next_param)); break; case CMPLX: snprintf(outpos,bufsize-(outpos-buffer), next_start, real(next_param)); break; case STRING: snprintf(outpos,bufsize-(outpos-buffer), next_start, next_param->v.string_val); break; default: int_error(NO_CARET,"internal error: invalid spec_type"); } #if _MSC_VER buffer[bufsize-1] = '\0'; /* VC++ is not ANSI-compliant */ if (errno == ERANGE) errno = save_errno; #endif #else /* FIXME - this is bad; we should dummy up an snprintf equivalent */ switch(spec_type) { case INTGR: sprintf(outpos, next_start, (int)real(next_param)); break; case CMPLX: sprintf(outpos, next_start, real(next_param)); break; case STRING: sprintf(outpos, next_start, next_param->v.string_val); break; default: int_error(NO_CARET,"internal error: invalid spec_type"); } #endif next_start[next_length] = tempchar; next_start += next_length; outpos = &buffer[strlen(buffer)]; /* Check whether previous parameter output hit the end of the buffer */ /* If so, reallocate a larger buffer, go back and try it again. */ if (strlen(buffer) >= bufsize-2) { bufsize *= 2; buffer = gp_realloc(buffer, bufsize, "f_sprintf"); next_start = prev_start; outpos = buffer + prev_pos; remaining++; continue; } else { prev_start = next_start; prev_pos = outpos - buffer; } } /* Copy the trailing portion of the format, if any */ /* We could just call snprintf(), but it doesn't check for */ /* whether there really are more variables to handle. */ i = bufsize - (outpos-buffer); while (*next_start && --i > 0) { if (*next_start == '%' && *(next_start+1) == '%') next_start++; *outpos++ = *next_start++; } *outpos = '\0'; FPRINTF((stderr," snprintf result = \"%s\"\n",buffer)); push(Gstring(&result, buffer)); free(buffer); /* Free any strings from parameters we have now used */ for (i=0; i<nargs; i++) gpfree_string(&args[i]); if (args != a) free(args); /* Return to C locale for internal use */ reset_numeric_locale(); } /* EAM July 2004 - Gnuplot's own string formatting conventions. * Currently this routine assumes base 10 representation, because * it is not clear where it could be specified to be anything else. */ void f_gprintf(union argument *arg) { struct value fmt, val, result; char *buffer; int length; double base = 10.; /* Retrieve parameters from top of stack */ pop(&val); pop(&fmt); #ifdef DEBUG fprintf(stderr,"----------\nGot gprintf parameters\nfmt: "); disp_value(stderr, &fmt, TRUE); fprintf(stderr,"\nval: "); disp_value(stderr, &val, TRUE); fprintf(stderr,"\n----------\n"); #endif /* Make sure parameters are of the correct type */ if (fmt.type != STRING) int_error(NO_CARET,"First parameter to gprintf must be a format string"); /* Make sure we have at least as much space in the output as the format itself */ length = 80 + strlen(fmt.v.string_val); buffer = gp_alloc(length, "f_gprintf"); /* Call the old internal routine */ gprintf(buffer, length, fmt.v.string_val, base, real(&val)); FPRINTF((stderr," gprintf result = \"%s\"\n",buffer)); push(Gstring(&result, buffer)); gpfree_string(&fmt); free(buffer); } /* Output time given in seconds from year 2000 into string */ void f_strftime(union argument *arg) { struct value fmt, val; char *fmtstr, *buffer; int fmtlen, buflen, length; (void) arg; /* Avoid compiler warnings */ /* Retrieve parameters from top of stack */ pop(&val); pop(&fmt); if ( fmt.type != STRING ) int_error(NO_CARET, "First parameter to strftime must be a format string"); /* Prepare format string. * Make sure the resulting string not empty by adding a space. * Otherwise, the return value of gstrftime doesn't give enough * information. */ fmtlen = strlen(fmt.v.string_val) + 1; fmtstr = gp_alloc(fmtlen + 1, "f_strftime: fmt"); strncpy(fmtstr, fmt.v.string_val, fmtlen); strncat(fmtstr, " ", fmtlen); buflen = 80 + 2*fmtlen; buffer = gp_alloc(buflen, "f_strftime: buffer"); /* Get time_str */ length = gstrftime(buffer, buflen, fmtstr, real(&val)); if (length == 0 || length >= buflen) int_error(NO_CARET, "Resulting string is too long"); /* Remove trailing space */ assert(buffer[length-1] == ' '); buffer[length-1] = NUL; gpfree_string(&val); gpfree_string(&fmt); free(fmtstr); push(Gstring(&val, buffer)); free(buffer); } /* Convert string into seconds from year 2000 */ void f_strptime(union argument *arg) { struct value fmt, val; struct tm time_tm; double usec = 0.0; double result; (void) arg; /* Avoid compiler warnings */ pop(&val); pop(&fmt); if ( fmt.type != STRING || val.type != STRING ) int_error(NO_CARET, "Both parameters to strptime must be strings"); if ( !fmt.v.string_val || !val.v.string_val ) int_error(NO_CARET, "Internal error: string not allocated"); /* string -> time_tm plus extra fractional second */ gstrptime(val.v.string_val, fmt.v.string_val, &time_tm, &usec); /* time_tm -> result */ result = gtimegm(&time_tm); FPRINTF((stderr," strptime result = %g seconds \n", result)); /* Add back any extra fractional second */ result += usec; gpfree_string(&val); gpfree_string(&fmt); push(Gcomplex(&val, result, 0.0)); } /* Get current system time in seconds since 2000 * The type of the value popped from the stack * determines what is returned. * If integer, the result is also an integer. * If real (complex), the result is also real, * with microsecond precision (if available). * If string, it is assumed to be a format string, * and it is passed to strftime to get a formatted time string. */ void f_time(union argument *arg) { struct value val, val2; double time_now; #ifdef HAVE_SYS_TIME_H struct timeval tp; gettimeofday(&tp, NULL); tp.tv_sec -= SEC_OFFS_SYS; time_now = tp.tv_sec + (tp.tv_usec/1000000.0); #else time_now = (double) time(NULL); time_now -= SEC_OFFS_SYS; #endif (void) arg; /* Avoid compiler warnings */ pop(&val); switch(val.type) { case INTGR: push(Ginteger(&val, (int) time_now)); break; case CMPLX: push(Gcomplex(&val, time_now, 0.0)); break; case STRING: push(&val); /* format string */ push(Gcomplex(&val2, time_now, 0.0)); f_strftime(arg); break; default: int_error(NO_CARET,"internal error: invalid argument type"); } } /* Return which argument type sprintf will need for this format string: * char* STRING * int INTGR * double CMPLX * Should call int_err for any other type. * format is expected to start with '%' */ static enum DATA_TYPES sprintf_specifier(const char* format) { const char string_spec[] = "s"; const char real_spec[] = "aAeEfFgG"; const char int_spec[] = "cdiouxX"; /* The following characters are used for use of invalid types */ const char illegal_spec[] = "hlLqjzZtCSpn"; int string_pos, real_pos, int_pos, illegal_pos; /* check if really format specifier */ if (format[0] != '%') int_error(NO_CARET, "internal error: sprintf_specifier called without '%'\n"); string_pos = strcspn(format, string_spec); real_pos = strcspn(format, real_spec); int_pos = strcspn(format, int_spec); illegal_pos = strcspn(format, illegal_spec); if ( illegal_pos < int_pos && illegal_pos < real_pos && illegal_pos < string_pos ) int_error(NO_CARET, "sprintf_specifier: used with invalid format specifier\n"); else if ( string_pos < real_pos && string_pos < int_pos ) return STRING; else if ( real_pos < int_pos ) return CMPLX; else if ( int_pos < strlen(format) ) return INTGR; else int_error(NO_CARET, "sprintf_specifier: no format specifier\n"); return INTGR; /* Can't happen, but the compiler doesn't realize that */ } /* execute a system call and return stream from STDOUT */ void f_system(union argument *arg) { struct value val, result; struct udvt_entry *errno_var; char *output; int output_len, ierr; /* Retrieve parameters from top of stack */ pop(&val); /* Make sure parameters are of the correct type */ if (val.type != STRING) int_error(NO_CARET, "non-string argument to system()"); FPRINTF((stderr," f_system input = \"%s\"\n", val.v.string_val)); ierr = do_system_func(val.v.string_val, &output); if ((errno_var = add_udv_by_name("ERRNO"))) { errno_var->udv_undef = FALSE; Ginteger(&errno_var->udv_value, ierr); } output_len = strlen(output); /* chomp result */ if ( output_len > 0 && output[output_len-1] == '\n' ) output[output_len-1] = NUL; FPRINTF((stderr," f_system result = \"%s\"\n", output)); push(Gstring(&result, output)); gpfree_string(&result); /* free output */ gpfree_string(&val); /* free command string */ } /* Variable assignment operator */ void f_assign(union argument *arg) { struct value a, b; (void) arg; (void) pop(&b); /* new value */ (void) pop(&a); /* name of variable */ if (a.type == STRING) { struct udvt_entry *udv; if (!strncmp(a.v.string_val,"GPVAL_",6) || !strncmp(a.v.string_val,"MOUSE_",6)) int_error(NO_CARET,"Attempt to assign to a read-only variable"); udv = add_udv_by_name(a.v.string_val); gpfree_string(&a); if (!udv->udv_undef) gpfree_string(&(udv->udv_value)); udv->udv_value = b; udv->udv_undef = FALSE; push(&b); } else { int_error(NO_CARET, "attempt to assign to something other than a named variable"); } } /* * Retrieve the current value of a user-defined variable whose name is known. * B = value("A") has the same result as B = A. */ void f_value(union argument *arg) { struct udvt_entry *p = first_udv; struct value a; struct value result; (void) arg; (void) pop(&a); if (a.type != STRING) { /* int_warn(NO_CARET,"non-string value passed to value()"); */ push(&a); return; } while (p) { if (!strcmp(p->udv_name, a.v.string_val)) { result = p->udv_value; if (p->udv_undef) p = NULL; else if (result.type == STRING) result.v.string_val = gp_strdup(result.v.string_val); break; } p = p->next_udv; } gpfree_string(&a); if (!p) { /* int_warn(NO_CARET,"undefined variable name passed to value()"); */ result.type = CMPLX; result.v.cmplx_val.real = not_a_number(); } push(&result); } ������������������������������������������������������������������������������������gnuplot-4.6.4/src/color.h���������������������������������������������������������������������������0000644�0004711�0000144�00000020215�11643712115�012210� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: color.h,v 1.35 2011/10/08 00:07:41 sfeam Exp $ */ /* GNUPLOT - color.h */ /* invert the gray for negative figure (default is positive) */ /*[ * * Petr Mikulik, December 1998 -- June 1999 * Copyright: open source as much as possible * ]*/ /* In general, this file deals with colours, and in the current gnuplot source layout it would correspond to structures and routines found in driver.h, term.h and term.c. Here we define structures which are required for the communication of palettes between terminals and making palette routines. */ #ifndef COLOR_H #define COLOR_H #ifdef HAVE_CONFIG_H # include "config.h" #endif /* Generalized pm3d-compatible color specifier * Supplements basic linetype choice */ typedef struct t_colorspec { int type; /* TC_<type> definitions below */ int lt; /* used for TC_LT, TC_LINESTYLE and TC_RGB */ double value; /* used for TC_CB and TC_FRAC */ } t_colorspec; #define TC_DEFAULT 0 /* Use default color, set separately */ #define TC_LT 1 /* Use the color of linetype <n> */ #define TC_LINESTYLE 2 /* Use the color of line style <n> */ #define TC_RGB 3 /* Explicit RGB triple provided by user */ #define TC_CB 4 /* "palette cb <value>" */ #define TC_FRAC 5 /* "palette frac <value> */ #define TC_Z 6 /* "palette z" */ #define TC_VARIABLE 7 /* only used for "tc", never "lc" */ #define DEFAULT_COLORSPEC {TC_DEFAULT, 0, 0.0} #define BLACK_COLORSPEC {TC_LT, LT_BLACK, 0.0} #define BACKGROUND_COLORSPEC {TC_LT, LT_BACKGROUND, 0.0} #ifdef EXTENDED_COLOR_SPECS typedef struct { double gray; /* to be extended */ } colorspec_t; #endif /* EAM July 2004 - Disentangle polygon support and PM3D support */ /* a point (with integer coordinates) for use in polygon drawing */ typedef struct { int x, y; #ifdef EXTENDED_COLOR_SPECS double z; colorspec_t spec; #endif int style; } gpiPoint; #include "gp_types.h" #include "eval.h" /* * color modes */ typedef enum { SMPAL_COLOR_MODE_NONE = '0', SMPAL_COLOR_MODE_GRAY = 'g', /* grayscale only */ SMPAL_COLOR_MODE_RGB = 'r', /* one of several fixed transforms */ SMPAL_COLOR_MODE_FUNCTIONS = 'f', /* user defined transforms */ SMPAL_COLOR_MODE_GRADIENT = 'd', /* interpolated table: * explicitly defined or read from file */ SMPAL_COLOR_MODE_CUBEHELIX = 'c' } palette_color_mode; /* Contains a colour in RGB scheme. Values of r, g and b are all in range [0;1] */ typedef struct { double r, g, b; } rgb_color; /* Contains a colour in RGB scheme. Values of r, g and b are uchars in range [0;255] */ typedef struct { unsigned char r, g, b; } rgb255_color; /* a point (with double coordinates) for use in polygon drawing */ /* the "c" field is used only inside the routine pm3d_plot() */ typedef struct { double x, y, z, c; } gpdPoint; /* to build up gradients: whether it is really red, green and blue or maybe * hue saturation and value in col depends on cmodel */ typedef struct { double pos; rgb_color col; } gradient_struct; /* inverting the colour for negative picture (default is positive picture) (for pm3d.positive) */ #define SMPAL_NEGATIVE 'n' #define SMPAL_POSITIVE 'p' /* Declaration of smooth palette, i.e. palette for smooth colours */ typedef struct { /** Constants: **/ /* (Fixed) number of formulae implemented for gray index to RGB * mapping in color.c. Usage: somewhere in `set' command to check * that each of the below-given formula R,G,B are lower than this * value. */ int colorFormulae; /** Values that can be changed by `set' and shown by `show' commands: **/ /* can be SMPAL_COLOR_MODE_GRAY or SMPAL_COLOR_MODE_RGB */ palette_color_mode colorMode; /* mapping formulae for SMPAL_COLOR_MODE_RGB */ int formulaR, formulaG, formulaB; char positive; /* positive or negative figure */ /* Now the variables that contain the discrete approximation of the * desired palette of smooth colours as created by make_palette in * pm3d.c. This is then passed into terminal's make_palette, who * transforms this [0;1] into whatever it supports. */ /* Only this number of colour positions will be used even though * there are some more available in the discrete palette of the * terminal. Useful for multiplot. Max. number of colours is taken * if this value equals 0. Unused by: PostScript */ int use_maxcolors; /* Number of colours used for the discrete palette. Equals to the * result from term->make_palette(NULL), or restricted by * use_maxcolor. Used by: pm, gif. Unused by: PostScript */ int colors; /* Table of RGB triplets resulted from applying the formulae. Used * in the 2nd call to term->make_palette for a terminal with * discrete colours. Unused by PostScript which calculates them * analytically. */ rgb_color *color; /** Variables used by some terminals **/ /* Option unique for output to PostScript file. By default, * ps_allcF=0 and only the 3 selected rgb color formulae are written * into the header preceding pm3d map in the file. If ps_allcF is * non-zero, then print there all color formulae, so that it is easy * to play with choosing manually any color scheme in the PS file * (see the definition of "/g"). Like that you can get the * Rosenbrock multiplot figure on my gnuplot.html#pm3d demo page. * Note: this option is used by all terminals of the postscript * family, i.e. postscript, pslatex, epslatex, so it will not be * comfortable to move it to the particular .trm files. */ char ps_allcF; /* These variables are used to define interpolated color palettes: * gradient is an array if (gray,color) pairs. This array is * gradient_num entries big. * Interpolated tables are used if colorMode==SMPAL_COLOR_MODE_GRADIENT */ int gradient_num; gradient_struct *gradient; /* the used color model: RGB, HSV, XYZ, etc. */ int cmodel; /* Three mapping function for gray->RGB/HSV/XYZ/etc. mapping * used if colorMode == SMPAL_COLOR_MODE_FUNCTIONS */ struct udft_entry Afunc; /* R for RGB, H for HSV, C for CMY, ... */ struct udft_entry Bfunc; /* G for RGB, S for HSV, M for CMY, ... */ struct udft_entry Cfunc; /* B for RGB, V for HSV, Y for CMY, ... */ /* gamma for gray scale and cubehelix palettes only */ double gamma; /* control parameters for the cubehelix palette scheme */ double cubehelix_start; /* offset (radians) from colorwheel 0 */ double cubehelix_cycles; /* number of times round the colorwheel */ double cubehelix_saturation; /* color saturation */ } t_sm_palette; /* GLOBAL VARIABLES */ extern t_sm_palette sm_palette; #ifdef EXTENDED_COLOR_SPECS extern int supply_extended_color_specs; #endif /* ROUTINES */ void init_color __PROTO((void)); /* call once to initialize variables */ /* Make the colour palette. Return 0 on success Put number of allocated colours into sm_palette.colors */ int make_palette __PROTO((void)); void invalidate_palette __PROTO((void)); /* Set the colour on the terminal Currently, each terminal takes care of remembering the current colour, so there is not much to do here---well, except for reversing the gray according to sm_palette.positive == SMPAL_POSITIVE or SMPAL_NEGATIVE */ void set_color __PROTO(( double gray )); void set_rgbcolor __PROTO(( int rgblt )); void ifilled_quadrangle __PROTO((gpiPoint* icorners)); /* The routine above for 4 points explicitly */ #ifdef EXTENDED_COLOR_SPECS void filled_quadrangle __PROTO((gpdPoint *corners, gpiPoint* icorners)); #else void filled_quadrangle __PROTO((gpdPoint *corners)); #endif /* Makes mapping from real 3D coordinates, passed as coords array, to 2D terminal coordinates, then draws filled polygon */ /* HBB 20010216: added 'GPHUGE' attribute */ void filled_polygon_3dcoords __PROTO((int points, struct coordinate GPHUGE *coords)); /* Makes mapping from real 3D coordinates, passed as coords array, but at z coordinate fixed (base_z, for instance) to 2D terminal coordinates, then draws filled polygon */ void filled_polygon_3dcoords_zfixed __PROTO((int points, struct coordinate GPHUGE *coords, double z)); /* Draw colour smooth box */ void draw_color_smooth_box __PROTO((int plot_mode)); #endif /* COLOR_H */ /* eof color.h */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/tables.h��������������������������������������������������������������������������0000644�0004711�0000144�00000021074�11643712115�012350� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: tables.h,v 1.80 2011/10/08 00:07:41 sfeam Exp $ */ /* GNUPLOT - tables.h */ /*[ * Copyright 1999, 2004 Lars Hecking * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_TABLES_H #define GNUPLOT_TABLES_H #include "syscfg.h" typedef void (*parsefuncp_t) __PROTO((void)); struct gen_ftable { const char *key; parsefuncp_t value; }; /* The basic structure */ struct gen_table { const char *key; int value; }; /* options for plot/splot */ enum plot_id { P_INVALID, P_AXES, P_BINARY, P_EVERY, P_INDEX, P_MATRIX, P_SMOOTH, P_THRU, P_TITLE, P_NOTITLE, P_USING, P_WITH }; /* options for plot ax[ei]s */ enum plot_axes_id { AXES_X1Y1, AXES_X2Y2, AXES_X1Y2, AXES_X2Y1, AXES_NONE }; /* plot smooth parameters in plot.h */ /* options for 'save' command */ enum save_id { SAVE_INVALID, SAVE_FUNCS, SAVE_TERMINAL, SAVE_SET, SAVE_VARS }; /* options for 'show' and 'set' commands * this is rather big, we might be better off with a hash table */ enum set_id { S_INVALID, S_ACTIONTABLE, S_ALL, S_ANGLES, S_ARROW, S_AUTOSCALE, S_BARS, S_BIND, S_BORDER, S_BOXWIDTH, S_CLABEL, S_CLIP, S_CNTRPARAM, S_CONTOUR, S_DATA, S_DATAFILE, S_FUNCTIONS, S_DGRID3D, S_DUMMY, S_ENCODING, S_DECIMALSIGN, S_FIT, S_FONTPATH, S_FORMAT, S_GRID, S_HIDDEN3D, S_HISTORYSIZE, S_ISOSAMPLES, S_KEY, S_KEYTITLE, S_LABEL, S_LINESTYLE, S_LINETYPE, S_LOADPATH, S_LOCALE, S_LOGSCALE, S_MACROS, S_MAPPING, S_MARGIN, S_LMARGIN, S_RMARGIN, S_TMARGIN, S_BMARGIN, S_MISSING, #ifdef USE_MOUSE S_MOUSE, #endif S_MULTIPLOT, S_MX2TICS, S_NOMX2TICS, S_MXTICS, S_NOMXTICS, S_MY2TICS, S_NOMY2TICS, S_MYTICS, S_NOMYTICS, S_MZTICS, S_NOMZTICS, S_OFFSETS, S_ORIGIN, SET_OUTPUT, S_PARAMETRIC, S_PALETTE, S_PM3D, S_COLORBOX, S_COLORNAMES, S_CBLABEL, S_CBRANGE, S_CBTICS, S_NOCBTICS, S_MCBTICS, S_NOMCBTICS, S_CBDATA, S_CBDTICS, S_NOCBDTICS, S_CBMTICS, S_NOCBMTICS, S_OBJECT, S_PLOT, S_POINTINTERVALBOX, S_POINTSIZE, S_POLAR, S_PRINT, S_PSDIR, S_SAMPLES, S_SIZE, S_SURFACE, S_STYLE, S_TABLE, S_TERMINAL, S_TERMOPTIONS, S_TICS, S_TICSCALE, S_TICSLEVEL, S_TIMEFMT, S_TIMESTAMP, S_TITLE, S_TRANGE, S_URANGE, S_VARIABLES, S_VERSION, S_VIEW, S_VRANGE, S_X2DATA, S_X2DTICS, S_NOX2DTICS, S_X2LABEL, S_X2MTICS, S_NOX2MTICS, S_X2RANGE, S_X2TICS, S_NOX2TICS, S_XDATA, S_XDTICS, S_NOXDTICS, S_XLABEL, S_XMTICS, S_NOXMTICS, S_XRANGE, S_XTICS, S_NOXTICS, S_XYPLANE, S_Y2DATA, S_Y2DTICS, S_NOY2DTICS, S_Y2LABEL, S_Y2MTICS, S_NOY2MTICS, S_Y2RANGE, S_Y2TICS, S_NOY2TICS, S_YDATA, S_YDTICS, S_NOYDTICS, S_YLABEL, S_YMTICS, S_NOYMTICS, S_YRANGE, S_YTICS, S_NOYTICS, S_ZDATA, S_ZDTICS, S_NOZDTICS, S_ZLABEL, S_ZMTICS, S_NOZMTICS, S_ZRANGE, S_ZTICS, S_NOZTICS, S_RTICS, S_NORTICS, S_RRANGE, S_RAXIS, S_ZERO, S_ZEROAXIS, S_XZEROAXIS, S_X2ZEROAXIS, S_YZEROAXIS, S_Y2ZEROAXIS, S_ZZEROAXIS }; enum set_hidden3d_id { S_HI_INVALID, S_HI_DEFAULTS, S_HI_OFFSET, S_HI_NOOFFSET, S_HI_TRIANGLEPATTERN, S_HI_UNDEFINED, S_HI_NOUNDEFINED, S_HI_ALTDIAGONAL, S_HI_NOALTDIAGONAL, S_HI_BENTOVER, S_HI_NOBENTOVER, S_HI_FRONT, S_HI_BACK }; enum set_key_id { S_KEY_INVALID, S_KEY_TOP, S_KEY_BOTTOM, S_KEY_LEFT, S_KEY_RIGHT, S_KEY_CENTER, S_KEY_VERTICAL, S_KEY_HORIZONTAL, S_KEY_OVER, S_KEY_UNDER, S_KEY_MANUAL, S_KEY_INSIDE, S_KEY_OUTSIDE, S_KEY_ABOVE, S_KEY_BELOW, S_KEY_TMARGIN, S_KEY_BMARGIN, S_KEY_LMARGIN, S_KEY_RMARGIN, S_KEY_LLEFT, S_KEY_RRIGHT, S_KEY_REVERSE, S_KEY_NOREVERSE, S_KEY_INVERT, S_KEY_NOINVERT, S_KEY_ENHANCED, S_KEY_NOENHANCED, S_KEY_BOX, S_KEY_NOBOX, S_KEY_SAMPLEN, S_KEY_SPACING, S_KEY_WIDTH, S_KEY_HEIGHT, S_KEY_TITLE, S_KEY_NOTITLE, S_KEY_FONT, S_KEY_TEXTCOLOR, S_KEY_AUTOTITLES, S_KEY_NOAUTOTITLES, S_KEY_DEFAULT, S_KEY_ON, S_KEY_OFF, S_KEY_MAXCOLS, S_KEY_MAXROWS, S_KEY_FRONT, S_KEY_NOFRONT }; enum set_colorbox_id { S_COLORBOX_INVALID, S_COLORBOX_VERTICAL, S_COLORBOX_HORIZONTAL, S_COLORBOX_DEFAULT, S_COLORBOX_USER, S_COLORBOX_BORDER, S_COLORBOX_BDEFAULT, S_COLORBOX_NOBORDER, S_COLORBOX_ORIGIN, S_COLORBOX_SIZE, S_COLORBOX_FRONT, S_COLORBOX_BACK }; enum set_palette_id { S_PALETTE_INVALID, S_PALETTE_POSITIVE, S_PALETTE_NEGATIVE, S_PALETTE_GRAY, S_PALETTE_COLOR, S_PALETTE_RGBFORMULAE, S_PALETTE_NOPS_ALLCF, S_PALETTE_PS_ALLCF, S_PALETTE_MAXCOLORS, S_PALETTE_DEFINED, S_PALETTE_FILE, S_PALETTE_FUNCTIONS, S_PALETTE_MODEL, S_PALETTE_GAMMA, S_PALETTE_CUBEHELIX }; enum set_pm3d_id { S_PM3D_INVALID, S_PM3D_AT, S_PM3D_INTERPOLATE, S_PM3D_SCANSFORWARD, S_PM3D_SCANSBACKWARD, S_PM3D_SCANS_AUTOMATIC, S_PM3D_DEPTH, S_PM3D_FLUSH, S_PM3D_FTRIANGLES, S_PM3D_NOFTRIANGLES, S_PM3D_CLIP_1IN, S_PM3D_CLIP_4IN, S_PM3D_MAP, S_PM3D_HIDDEN, S_PM3D_NOHIDDEN, S_PM3D_SOLID, S_PM3D_NOTRANSPARENT, S_PM3D_NOSOLID, S_PM3D_TRANSPARENT, S_PM3D_IMPLICIT, S_PM3D_NOEXPLICIT, S_PM3D_NOIMPLICIT, S_PM3D_EXPLICIT, S_PM3D_WHICH_CORNER }; enum test_id { TEST_INVALID, TEST_TERMINAL, TEST_PALETTE, TEST_TIME }; enum show_style_id { SHOW_STYLE_INVALID, SHOW_STYLE_DATA, SHOW_STYLE_FUNCTION, SHOW_STYLE_LINE, SHOW_STYLE_FILLING, SHOW_STYLE_ARROW, SHOW_STYLE_CIRCLE, SHOW_STYLE_ELLIPSE, SHOW_STYLE_RECTANGLE, SHOW_STYLE_INCREMENT, SHOW_STYLE_HISTOGRAM, SHOW_STYLE_BOXPLOT }; enum filledcurves_opts_id { FILLEDCURVES_CLOSED, FILLEDCURVES_X1, FILLEDCURVES_Y1, FILLEDCURVES_X2, FILLEDCURVES_Y2, /* requirement: FILLEDCURVES_ATX1 = FILLEDCURVES_X1+4 */ FILLEDCURVES_ATX1, FILLEDCURVES_ATY1, FILLEDCURVES_ATX2, FILLEDCURVES_ATY2, FILLEDCURVES_ATXY, FILLEDCURVES_ATR, FILLEDCURVES_ABOVE, FILLEDCURVES_BELOW, FILLEDCURVES_BETWEEN }; extern const struct gen_table command_tbl[]; extern const struct gen_table plot_axes_tbl[]; extern const struct gen_table plot_smooth_tbl[]; extern const struct gen_table dgrid3d_mode_tbl[]; extern const struct gen_table save_tbl[]; extern const struct gen_table set_tbl[]; extern const struct gen_table test_tbl[]; extern const struct gen_table set_key_tbl[]; extern const struct gen_table set_colorbox_tbl[]; extern const struct gen_table set_palette_tbl[]; extern const struct gen_table set_pm3d_tbl[]; extern const struct gen_table color_model_tbl[]; extern const struct gen_table set_hidden3d_tbl[]; extern const struct gen_table show_style_tbl[]; extern const struct gen_table plotstyle_tbl[]; /* EAM Nov 2008 - this is now dynamic, so we can add colors on the fly */ extern struct gen_table *user_color_names_tbl; extern struct gen_table *pm3d_color_names_tbl; extern const int num_predefined_colors; extern int num_userdefined_colors; extern const struct gen_ftable command_ftbl[]; extern const struct gen_table filledcurves_opts_tbl[]; /* Function prototypes */ int lookup_table __PROTO((const struct gen_table *, int)); parsefuncp_t lookup_ftable __PROTO((const struct gen_ftable *, int)); int lookup_table_entry __PROTO((const struct gen_table *tbl, const char *search_str)); int lookup_table_nth __PROTO((const struct gen_table *tbl, const char *search_str)); int lookup_table_nth_reverse __PROTO((const struct gen_table *tbl, int table_len, const char *search_str)); const char * reverse_table_lookup __PROTO((const struct gen_table *tbl, int entry)); #endif /* GNUPLT_TABLES_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/fit.h�����������������������������������������������������������������������������0000644�0004711�0000144�00000004354�12160133407�011656� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: fit.h,v 1.14.2.2 2013/06/11 21:18:50 markisch Exp $ */ /* GNUPLOT - fit.h */ /* NOTICE: Change of Copyright Status * * The author of this module, Carsten Grammes, has expressed in * personal email that he has no more interest in this code, and * doesn't claim any copyright. He has agreed to put this module * into the public domain. * * Lars Hecking 15-02-1999 */ /* * Header file: public functions in fit.c * * * Previous copyright of this module: Carsten Grammes, 1993 * Experimental Physics, University of Saarbruecken, Germany * * Internet address: cagr@rz.uni-sb.de * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * This software is provided "as is" without express or implied warranty. */ #ifndef GNUPLOT_FIT_H /* avoid multiple inclusions */ #define GNUPLOT_FIT_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "stdfn.h" /* defaults */ #define DEF_FIT_LIMIT 1e-5 /* compatible with gnuplot philosophy */ #define STANDARD stderr /* Suffix of a backup file */ #define BACKUP_SUFFIX ".old" /***************************************************************** Useful macros We avoid any use of varargs/stdargs (not good style but portable) *****************************************************************/ #define Eex(a) {sprintf (fitbuf+9, (a)); error_ex ();} #define Eex2(a,b) {sprintf (fitbuf+9, (a),(b)); error_ex ();} #define Eex3(a,b,c) {sprintf (fitbuf+9, (a),(b),(c)); error_ex ();} /* Type definitions */ /* Exported Variables of fit.c */ extern char fitbuf[]; extern char *fitlogfile; extern TBOOLEAN fit_errorvariables; extern TBOOLEAN fit_quiet; extern TBOOLEAN ctrlc_flag; /* Prototypes of functions exported by fit.c */ void error_ex __PROTO((void)); void init_fit __PROTO((void)); void update __PROTO((char *pfile, char *npfile)); void fit_command __PROTO((void)); size_t wri_to_fil_last_fit_cmd __PROTO((FILE *fp)); char *getfitlogfile __PROTO((void)); #endif /* GNUPLOT_FIT_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/specfun.h�������������������������������������������������������������������������0000644�0004711�0000144�00000005013�11460220370�012526� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: specfun.h,v 1.11 2010/10/22 05:28:24 sfeam Exp $ */ /* GNUPLOT - specfun.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_SPECFUN_H # define GNUPLOT_SPECFUN_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "eval.h" /* Type definitions */ /* Variables of specfun.c needed by other modules: */ /* Prototypes of functions exported by specfun.c */ /* These are the more 'special' function built into the stack machine */ void f_erf __PROTO((union argument *x)); void f_erfc __PROTO((union argument *x)); void f_ibeta __PROTO((union argument *x)); void f_voigt __PROTO((union argument *x)); void f_igamma __PROTO((union argument *x)); void f_gamma __PROTO((union argument *x)); void f_lgamma __PROTO((union argument *x)); void f_rand __PROTO((union argument *x)); void f_normal __PROTO((union argument *x)); void f_inverse_normal __PROTO((union argument *x)); void f_inverse_erf __PROTO((union argument *x)); void f_lambertw __PROTO((union argument *x)); void f_airy __PROTO((union argument *x)); void f_expint __PROTO((union argument *x)); #endif /* GNUPLOT_SPECFUN_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/help.c����������������������������������������������������������������������������0000644�0004711�0000144�00000050744�11676710605�012037� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: help.c,v 1.26.2.1 2011/12/28 19:30:43 sfeam Exp $"); } #endif /* GNUPLOT - help.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "help.h" #ifdef NO_GIH #include <stdio.h> void EndOutput(){} void StartOutput(){} void OutLine(const char *M){fputs(M,stderr);} #else #include "alloc.h" #include "plot.h" #include "util.h" /* ** help -- help subsystem that understands defined keywords ** ** Looks for the desired keyword in the help file at runtime, so you ** can give extra help or supply local customizations by merely editing ** the help file. ** ** The original (single-file) idea and algorithm is by John D. Johnson, ** Hewlett-Packard Company. Thanx and a tip of the Hatlo hat! ** ** Much extension by David Kotz for use in gnutex, and then in gnuplot. ** Added output paging support, both unix and builtin. Rewrote completely ** to read helpfile into memory, avoiding reread of help file. 12/89. ** ** The help file looks like this (the question marks are really in column 1): ** ** ?topic ** This line is printed when the user wants help on "topic". ** ?keyword ** ?Keyword ** ?KEYWORD ** These lines will be printed on the screen if the user wanted ** help on "keyword", "Keyword", or "KEYWORD". No casefolding is ** done on the keywords. ** ?subject ** ?alias ** This line is printed for help on "subject" and "alias". ** ? ** ?? ** Since there is a null keyword for this line, this section ** is printed when the user wants general help (when a help ** keyword isn't given). A command summary is usually here. ** Notice that the null keyword is equivalent to a "?" keyword ** here, because of the '?' and '??' topic lines above. ** If multiple keywords are given, the first is considered the ** 'primary' keyword. This affects a listing of available topics. ** ?last-subject ** Note that help sections are terminated by the start of the next ** '?' entry or by EOF. So you can't have a leading '?' on a line ** of any help section. You can re-define the magic character to ** recognize in column 1, though, if '?' is too useful. (Try ^A.) */ #define KEYFLAG '?' /* leading char in help file topic lines */ /* ** Calling sequence: ** int result; # 0 == success ** char *keyword; # topic to give help on ** char *pathname; # path of help file ** int subtopics; # set to TRUE if only subtopics to be listed ** # returns TRUE if subtopics were found ** result = help(keyword, pathname, &subtopics); ** Sample: ** cmd = "search\n"; ** helpfile = "/usr/local/lib/program/program.help"; ** subtopics = FALSE; ** if (help(cmd, helpfile, &subtopics) != H_FOUND) ** printf("Sorry, no help for %s", cmd); ** ** ** Speed this up by replacing the stdio calls with open/close/read/write. */ #ifdef WDLEN # define PATHSIZE WDLEN #else # define PATHSIZE BUFSIZ #endif typedef struct line_s LINEBUF; struct line_s { char *line; /* the text of this line */ LINEBUF *next; /* the next line */ }; typedef struct linkey_s LINKEY; struct linkey_s { char *key; /* the name of this key */ long pos; /* ftell position */ LINEBUF *text; /* the text for this key */ TBOOLEAN primary; /* TRUE -> is a primary name for a text block */ LINKEY *next; /* the next key in linked list */ }; typedef struct key_s KEY; struct key_s { char *key; /* the name of this key */ long pos; /* ftell position */ LINEBUF *text; /* the text for this key */ TBOOLEAN primary; /* TRUE -> is a primary name for a text block */ }; static LINKEY *keylist = NULL; /* linked list of keys */ static KEY *keys = NULL; /* array of keys */ static int keycount = 0; /* number of keys */ static FILE *helpfp = NULL; static KEY empty_key = {NULL, 0, NULL, 0}; static int LoadHelp __PROTO((char *path)); static void sortkeys __PROTO((void)); int keycomp __PROTO((SORTFUNC_ARGS a, SORTFUNC_ARGS b)); static LINEBUF *storeline __PROTO((char *text)); static LINKEY *storekey __PROTO((char *key)); static KEY *FindHelp __PROTO((char *keyword)); static TBOOLEAN Ambiguous __PROTO((struct key_s * key, size_t len)); /* Help output */ static void PrintHelp __PROTO((struct key_s * key, TBOOLEAN *subtopics)); static void ShowSubtopics __PROTO((struct key_s * key, TBOOLEAN *subtopics)); static void OutLine_InternalPager __PROTO((const char *line)); #if defined(PIPES) static FILE *outfile; /* for unix pager, if any */ #endif static int pagelines; /* count for builtin pager */ static int screensize; /* lines on screen (got with env var) */ #define SCREENSIZE 24 /* lines on screen (most have at least 24) */ /* help: * print a help message * also print available subtopics, if subtopics is TRUE */ int help( char *keyword, /* on this topic */ char *path, /* from this file */ TBOOLEAN *subtopics) /* (in) - subtopics only? */ /* (out) - are there subtopics? */ { static char oldpath[PATHSIZE] = ""; /* previous help file */ int status; /* result of LoadHelp */ KEY *key; /* key that matches keyword */ /* ** Load the help file if necessary (say, first time we enter this routine, ** or if the help file changes from the last time we were called). ** Also may occur if in-memory copy was freed. ** Calling routine may access errno to determine cause of H_ERROR. */ errno = 0; if (strncmp(oldpath, path, PATHSIZE) != 0) FreeHelp(); if (keys == NULL) { status = LoadHelp(path); if (status == H_ERROR) return (status); /* save the new path in oldpath */ safe_strncpy(oldpath, path, PATHSIZE); } /* look for the keyword in the help file */ key = FindHelp(keyword); if (key != NULL) { /* found the keyword: if help exists, print and return */ if (key->text) PrintHelp(key, subtopics); status = H_FOUND; } else { status = H_NOTFOUND; } return (status); } /* we only read the file into memory once */ static int LoadHelp(char *path) { LINKEY *key = 0; /* this key */ long pos = 0; /* ftell location within help file */ char buf[BUFSIZ]; /* line from help file */ LINEBUF *head; /* head of text list */ LINEBUF *firsthead = NULL; TBOOLEAN primary; /* first ? line of a set is primary */ TBOOLEAN flag; if ((helpfp = fopen(path, "r")) == NULL) { /* can't open help file, so error exit */ return (H_ERROR); } /* ** The help file is open. Look in there for the keyword. */ if (!fgets(buf, BUFSIZ - 1, helpfp) || *buf != KEYFLAG) return (H_ERROR); /* it is probably not the .gih file */ while (!feof(helpfp)) { /* ** Make an entry for each synonym keyword */ primary = TRUE; while (buf[0] == KEYFLAG) { key = storekey(buf + 1); /* store this key */ key->primary = primary; key->text = NULL; /* fill in with real value later */ key->pos = 0; /* fill in with real value later */ primary = FALSE; pos = ftell(helpfp); if (fgets(buf, BUFSIZ - 1, helpfp) == (char *) NULL) break; } /* ** Now store the text for this entry. ** buf already contains the first line of text. */ firsthead = storeline(buf); head = firsthead; while ((fgets(buf, BUFSIZ - 1, helpfp) != (char *) NULL) && (buf[0] != KEYFLAG)) { /* save text line */ head->next = storeline(buf); head = head->next; } /* make each synonym key point to the same text */ do { key->pos = pos; key->text = firsthead; flag = key->primary; key = key->next; } while (flag != TRUE && key != NULL); } (void) fclose(helpfp); /* we sort the keys so we can use binary search later */ sortkeys(); return (H_FOUND); /* ok */ } /* make a new line buffer and save this string there */ static LINEBUF * storeline(char *text) { LINEBUF *new; new = (LINEBUF *) gp_alloc(sizeof(LINEBUF), "new line buffer"); if (text) new->line = gp_strdup(text); else new->line = NULL; new->next = NULL; return (new); } /* Add this keyword to the keys list, with the given text */ static LINKEY * storekey(char *key) { LINKEY *new; key[strlen(key) - 1] = NUL; /* cut off \n */ new = (LINKEY *) gp_alloc(sizeof(LINKEY), "new key list"); if (key) new->key = gp_strdup(key); /* add to front of list */ new->next = keylist; keylist = new; keycount++; return (new); } /* we sort the keys so we can use binary search later */ /* We have a linked list of keys and the number. * to sort them we need an array, so we reform them into an array, * and then throw away the list. */ static void sortkeys() { LINKEY *p, *n; /* pointers to linked list */ int i; /* index into key array */ /* allocate the array */ keys = (KEY *) gp_alloc((keycount + 1) * sizeof(KEY), "key array"); /* copy info from list to array, freeing list */ for (p = keylist, i = 0; p != NULL; p = n, i++) { keys[i].key = p->key; keys[i].pos = p->pos; keys[i].text = p->text; keys[i].primary = p->primary; n = p->next; free((char *) p); } /* a null entry to terminate subtopic searches */ keys[keycount].key = NULL; keys[keycount].pos = 0; keys[keycount].text = NULL; /* sort the array */ /* note that it only moves objects of size (two pointers + long + int) */ /* it moves no strings */ /* HBB 20010720: removed superfluous, potentially dangerous casts */ qsort(keys, keycount, sizeof(KEY), keycomp); } /* HBB 20010720: changed to make this match the prototype qsort() * really expects. Casting function pointers, as we did before, is * illegal! */ /* HBB 20010720: removed 'static' to avoid HP-sUX gcc bug */ int keycomp(SORTFUNC_ARGS arg1, SORTFUNC_ARGS arg2) { const KEY *a = arg1; const KEY *b = arg2; return (strcmp(a->key, b->key)); } /* Free the help file from memory. */ /* May be called externally if space is needed */ void FreeHelp() { int i; /* index into keys[] */ LINEBUF *t, *next; if (keys == NULL) return; for (i = 0; i < keycount; i++) { free((char *) keys[i].key); if (keys[i].primary) /* only try to release text once! */ for (t = keys[i].text; t != NULL; t = next) { free((char *) t->line); next = t->next; free((char *) t); } } free((char *) keys); keys = NULL; keycount = 0; } /* FindHelp: * Find the key that matches the keyword. * The keys[] array is sorted by key. * We could use a binary search, but a linear search will aid our * attempt to allow abbreviations. We search for the first thing that * matches all the text we're given. If not an exact match, then * it is an abbreviated match, and there must be no other abbreviated * matches -- for if there are, the abbreviation is ambiguous. * We print the ambiguous matches in that case, and return not found. */ static KEY * /* NULL if not found */ FindHelp(char *keyword) /* string we look for */ { KEY *key; size_t len = strcspn(keyword, " "); for (key = keys; key->key != NULL; key++) { if (!strncmp(keyword, key->key, len)) { /* we have a match! */ if (!Ambiguous(key, len)) { size_t key_len = strlen(key->key); size_t keyword_len = strlen(keyword); if (key_len != len) { /* Expand front portion of keyword */ int i, shift = key_len - len; for (i=keyword_len+shift; i >= len; i--) keyword[i] = keyword[i-shift]; strncpy(keyword, key->key, key_len); /* give back the full spelling */ len = key_len; keyword_len += shift; } /* Check for another subword */ if (keyword[len] == ' ') { len = len + 1 + strcspn(keyword + len + 1, " "); key--; /* start with current key */ } else return (key); /* found!! non-ambiguous abbreviation */ } else return (&empty_key); } } /* not found */ return (NULL); } /* Ambiguous: * Check the key for ambiguity up to the given length. * It is ambiguous if it is not a complete string and there are other * keys following it with the same leading substring. */ static TBOOLEAN Ambiguous(KEY *key, size_t len) { char *first; char *prev; TBOOLEAN status = FALSE; /* assume not ambiguous */ int compare; size_t sublen; if (key->key[len] == NUL) return (FALSE); for (prev = first = key->key, compare = 0, key++; key->key != NULL && compare == 0; key++) { compare = strncmp(first, key->key, len); if (compare == 0) { /* So this key matches the first one, up to len. * But is it different enough from the previous one * to bother printing it as a separate choice? */ sublen = strcspn(prev + len, " "); if (strncmp(key->key, prev, len + sublen) != 0) { /* yup, this is different up to the next space */ if (!status) { /* first one we have printed is special */ fprintf(stderr, "Ambiguous request '%.*s'; possible matches:\n", (int)len, first); fprintf(stderr, "\t%s\n", prev); status = TRUE; } fprintf(stderr, "\t%s\n", key->key); prev = key->key; } } } return (status); } /* PrintHelp: * print the text for key */ static void PrintHelp( KEY *key, TBOOLEAN *subtopics) /* (in) - subtopics only? */ /* (out) - are there subtopics? */ { LINEBUF *t; StartOutput(); if (subtopics == NULL || !*subtopics) { for (t = key->text; t != NULL; t = t->next) OutLine(t->line); /* print text line */ } ShowSubtopics(key, subtopics); OutLine_InternalPager("\n"); EndOutput(); } /* ShowSubtopics: * Print a list of subtopic names */ /* The maximum number of subtopics per line */ #define PER_LINE 4 static void ShowSubtopics( KEY *key, /* the topic */ TBOOLEAN *subtopics) /* (out) are there any subtopics */ { int subt = 0; /* printed any subtopics yet? */ KEY *subkey; /* subtopic key */ size_t len; /* length of key name */ char line[BUFSIZ]; /* subtopic output line */ char *start; /* position of subname in key name */ size_t sublen; /* length of subname */ char *prev = NULL; /* the last thing we put on the list */ #define MAXSTARTS 256 int stopics = 0; /* count of (and index to next) subtopic name */ char *starts[MAXSTARTS]; /* saved positions of subnames */ *line = NUL; len = strlen(key->key); for (subkey = key + 1; subkey->key != NULL; subkey++) { if (strncmp(subkey->key, key->key, len) == 0) { /* find this subtopic name */ start = subkey->key + len; if (len > 0) { if (*start == ' ') start++; /* skip space */ else break; /* not the same topic after all */ } else { /* here we are looking for main topics */ if (!subkey->primary) continue; /* not a main topic */ } sublen = strcspn(start, " "); if (prev == NULL || strncmp(start, prev, sublen) != 0) { if (subt == 0) { subt++; if (len) { strcpy(line, "\nSubtopics available for "); strncat(line, key->key, BUFSIZ - 25 - 2 - 1); strcat(line, ":\n"); } else strcpy(line, "\nHelp topics available:\n"); OutLine_InternalPager(line); *line = NUL; } starts[stopics++] = start; prev = start; } } else { /* new topic */ break; } } /* The number of the first column for subtopic entries */ #define FIRSTCOL 4 /* Length of a subtopic entry; if COLLENGTH is exceeded, * the next column is skipped */ #define COLLENGTH 18 #ifndef COLUMN_HELP { /* sort subtopics by row - default */ int subtopic; int spacelen = 0, ispacelen; int pos = 0; for (subtopic = 0; subtopic < stopics; subtopic++) { start = starts[subtopic]; sublen = strcspn(start, " "); if (pos == 0) spacelen = FIRSTCOL; /* adapted by DvdSchaaf */ for (ispacelen = 0; ispacelen < spacelen; ispacelen++) (void) strcat(line, " "); (void) strncat(line, start, sublen); spacelen = COLLENGTH - sublen; while (spacelen <= 0) { spacelen += COLLENGTH; pos++; } pos++; if (pos >= PER_LINE) { (void) strcat(line, "\n"); OutLine_InternalPager(line); *line = NUL; pos = 0; } } /* put out the last line */ if (subt > 0 && pos > 0) { (void) strcat(line, "\n"); OutLine_InternalPager(line); } } #else /* COLUMN_HELP */ { /* sort subtopics by column */ int subtopic, sublen; int spacelen = 0, ispacelen; int row, col; int rows = (int) (stopics / PER_LINE) + 1; for (row = 0; row < rows; row++) { *line = NUL; for (ispacelen = 0; ispacelen < FIRSTCOL; ispacelen++) (void) strcat(line, " "); for (col = 0; col < PER_LINE; col++) { subtopic = row + rows * col; if (subtopic >= stopics) { break; } else { start = starts[subtopic]; sublen = strcspn(start, " "); (void) strncat(line, start, sublen); spacelen = COLLENGTH - sublen; if (spacelen <= 0) spacelen = 1; for (ispacelen = 0; ispacelen < spacelen; ispacelen++) (void) strcat(line, " "); } } (void) strcat(line, "\n"); OutLine_InternalPager(line); } } #endif /* COLUMN_HELP */ if (subtopics) *subtopics = (subt != 0); } /* StartOutput: * Open a file pointer to a pipe to user's $PAGER, if there is one, * otherwise use our own pager. */ void StartOutput() { char *line_count = NULL; #if defined(PIPES) char *pager_name = getenv("PAGER"); if (pager_name != NULL && *pager_name != NUL) { restrict_popen(); if ((outfile = popen(pager_name, "w")) != (FILE *) NULL) return; /* success */ } outfile = stderr; /* fall through to built-in pager */ #endif /* buit-in dumb pager: use the line count provided by the terminal */ line_count = getenv("LINES"); if (line_count != NULL) screensize = (int) strtol(line_count, NULL, 0); if (line_count == NULL || screensize < 3) screensize = SCREENSIZE; /* built-in pager */ pagelines = 0; } /* write a line of help output */ /* line should contain only one \n, at the end */ void OutLine(const char *line) { int c; /* dummy input char */ #if defined(PIPES) if (outfile != stderr) { fputs(line, outfile); return; } #endif /* built-in dumb pager */ /* leave room for prompt line */ if (pagelines >= screensize - 2) { fputs("Press return for more: ", stderr); do c = getchar(); while (c != EOF && c != '\n'); pagelines = 0; } fputs(line, stderr); pagelines++; } /* Same as Outline, but does not go through the external pager. * Used for the list of available subtopics because if it would be passed to * 'less' (for example), the list would not be displayed anymore after 'less' * has exited and the user is asked for a subtopic */ void OutLine_InternalPager(const char *line) { int c; /* dummy input char */ #if defined(PIPES) if (outfile != stderr) { /* do not go through external pager */ fputs(line, stderr); return; } #endif /* PIPES */ /* built-in dumb pager */ /* leave room for prompt line */ if (pagelines >= screensize - 2) { fputs("Press return for more: ", stderr); do c = getchar(); while (c != EOF && c != '\n'); pagelines = 0; } fputs(line, stderr); pagelines++; } void EndOutput() { #if defined(PIPES) if (outfile != stderr) (void) pclose(outfile); #endif } #endif /* #ifdef NO_GIH */ ����������������������������gnuplot-4.6.4/src/datafile.h������������������������������������������������������������������������0000644�0004711�0000144�00000024616�12120423661�012650� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: datafile.h,v 1.35.2.3 2013/03/14 19:40:33 sfeam Exp $ */ /* GNUPLOT - datafile.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_DATAFILE_H # define GNUPLOT_DATAFILE_H /* #if... / #include / #define collection: */ #include "axis.h" #include "graph3d.h" #include "graphics.h" /* returns from DF_READLINE in datafile.c */ /* +ve is number of columns read */ #define DF_EOF (-1) #define DF_UNDEFINED (-2) #define DF_FIRST_BLANK (-3) #define DF_SECOND_BLANK (-4) #define DF_MISSING (-5) #define DF_FOUND_KEY_TITLE (-6) #define DF_KEY_TITLE_MISSING (-7) #define DF_STRINGDATA (-8) #define DF_COLUMN_HEADERS (-9) #ifndef MAXINT /* should there be one already defined ? */ # ifdef INT_MAX /* in limits.h ? */ # define MAXINT INT_MAX # else # define MAXINT ((~0)>>1) # endif #endif /* Variables of datafile.c needed by other modules: */ /* how many using columns were specified, and max possible */ extern int df_no_use_specs; #define MAXDATACOLS 7 /* suggested x value if none given */ extern int df_datum; /* is this a matrix splot? */ extern TBOOLEAN df_matrix; /* is this a binary file? */ extern TBOOLEAN df_binary; extern char *df_filename; extern int df_line_number; extern AXIS_INDEX df_axis[]; extern struct udft_entry ydata_func; /* HBB 990829: moved from command.h */ /* Returned to caller by df_readline() */ extern char *df_tokens[]; /* string representing missing values, ascii datafiles */ extern char *missing_val; /* input field separator, NUL if whitespace is the separator */ extern char df_separator; /* comments chars */ extern char *df_commentschars; /* flag if any 'inline' data are in use, for the current plot */ extern TBOOLEAN plotted_data_from_stdin; /* Setting this allows the parser to recognize Fortran D or Q */ /* format constants in the input file. But it slows things down */ extern TBOOLEAN df_fortran_constants; /* Setting this disables initialization of the floating point exception */ /* handler before every expression evaluation in a using specifier. */ /* This can speed data input significantly, but assumes valid input. */ extern TBOOLEAN df_nofpe_trap; extern TBOOLEAN evaluate_inside_using; extern TBOOLEAN df_warn_on_missing_columnheader; /* Prototypes of functions exported by datafile.c */ int df_open __PROTO((const char *, int, struct curve_points *)); int df_readline __PROTO((double [], int)); void df_close __PROTO((void)); void df_showdata __PROTO((void)); int df_2dbinary __PROTO((struct curve_points *)); int df_3dmatrix __PROTO((struct surface_points *, int)); void df_set_key_title __PROTO((struct curve_points *)); void df_set_key_title_columnhead __PROTO((struct curve_points *)); char * df_parse_string_field __PROTO((char *)); int expect_string __PROTO((const char column )); void df_reset_after_error __PROTO((void)); void f_dollars __PROTO((union argument *x)); void f_column __PROTO((union argument *x)); void f_columnhead __PROTO((union argument *x)); void f_valid __PROTO((union argument *x)); void f_timecolumn __PROTO((union argument *x)); void f_stringcolumn __PROTO((union argument *x)); struct use_spec_s { int column; int expected_type; struct at_type *at; }; /* Details about the records contained in a binary data file. */ typedef enum df_translation_type { DF_TRANSLATE_DEFAULT, /* Gnuplot will position in first quadrant at origin. */ DF_TRANSLATE_VIA_ORIGIN, DF_TRANSLATE_VIA_CENTER } df_translation_type; typedef enum df_sample_scan_type { DF_SCAN_POINT = -3, /* fastest */ DF_SCAN_LINE = -4, DF_SCAN_PLANE = -5 /* slowest */ } df_sample_scan_type; /* To generate a swap, take the bit-wise complement of the lowest two bits. */ typedef enum df_endianess_type { DF_LITTLE_ENDIAN, DF_PDP_ENDIAN, DF_DPD_ENDIAN, DF_BIG_ENDIAN, DF_ENDIAN_TYPE_LENGTH /* Must be last */ } df_endianess_type; /* The various types of numerical types that can be read from a data file. */ typedef enum df_data_type { DF_CHAR, DF_UCHAR, DF_SHORT, DF_USHORT, DF_INT, DF_UINT, DF_LONG, DF_ULONG, DF_FLOAT, DF_DOUBLE, DF_LONGLONG, DF_ULONGLONG, DF_BAD_TYPE } df_data_type; #define DF_DEFAULT_TYPE DF_FLOAT /* Some macros for making the compiler figure out what function * the "machine independent" names should execute to read the * appropriately sized variable from a data file. */ #define SIGNED_TEST(val) ((val)==sizeof(long) ? DF_LONG : \ ((val)==sizeof(long long) ? DF_LONGLONG : \ ((val)==sizeof(int) ? DF_INT : \ ((val)==sizeof(short) ? DF_SHORT : \ ((val)==sizeof(char) ? DF_CHAR : DF_BAD_TYPE))))) #define UNSIGNED_TEST(val) ((val)==sizeof(unsigned long) ? DF_ULONG : \ ((val)==sizeof(unsigned long long) ? DF_ULONGLONG : \ ((val)==sizeof(unsigned int) ? DF_UINT : \ ((val)==sizeof(unsigned short) ? DF_USHORT : \ ((val)==sizeof(unsigned char) ? DF_UCHAR : DF_BAD_TYPE))))) #define FLOAT_TEST(val) ((val)==sizeof(float) ? DF_FLOAT : \ ((val)==sizeof(double) ? DF_DOUBLE : DF_BAD_TYPE)) typedef enum df_records_type { DF_CURRENT_RECORDS, DF_DEFAULT_RECORDS } df_records_type; typedef struct df_binary_type_struct { df_data_type read_type; unsigned short read_size; } df_binary_type_struct; typedef struct df_column_bininfo_struct { long skip_bytes; df_binary_type_struct column; } df_column_bininfo_struct; /* NOTE TO THOSE WRITING FILE TYPE FUNCTIONS * * "cart" means Cartesian, i.e., the (x,y,z) [or (r,t,z)] coordinate * system of the plot. "scan" refers to the scanning method of the * file in question, i.e., first points, then lines, then planes. * The important variables for a file type function to fill in are * those beginning with "scan". There is a tricky set of rules * related to the "scan_cart" mapping, the file-specified variables, * the default variables, and the command-line variables. Basically, * command line overrides data file which overrides default. (Yes, * like a confusing version of rock, paper, scissors.) So, from the * file type function perspective, it is better to leave those * variables which are not specifically known from file data or * otherwise (e.g., sample periods "scan_delta") unaltered in case * the user has issued "set datafile" to define defaults. */ typedef struct df_binary_file_record_struct { int cart_dim[3]; /* dimension array size, x/y/z */ int cart_dir[3]; /* 1 scan in positive direction, -1 negative, x/y/z */ double cart_delta[3]; /* spacing between array points, x/y/z */ df_translation_type cart_trans; /* translate via origin, center or default */ double cart_cen_or_ori[3]; /* vector representing center or origin, x/y/z */ double cart_alpha; /* 2D rotation angle (rotate) */ double cart_p[3]; /* 3D rotation normal vector (perpendicular) */ df_sample_scan_type cart_scan[3]; /* how to assign the dimensions read from file when generating coordinates */ TBOOLEAN scan_generate_coord; /* whether or not Gnuplot should generate coordinates. */ int scan_skip[3]; /* skip bytes before the record, line, plane */ /* Not controllable by the user, only by file type functions. * These are all points/lines/planes format. */ int scan_dim[3]; /* number of points, lines, planes */ int scan_dir[3]; /* 1 scan in positive direction wrt Cartesian coordinate system, -1 negative */ double scan_delta[3]; /* sample period along points, lines, planes */ df_translation_type scan_trans; /* translate via origin, center or default */ double scan_cen_or_ori[3]; /* vector representing center or origin, x/y/z */ /* *** Do not modify outside of datafile.c!!! *** */ char GPFAR *memory_data; } df_binary_file_record_struct; extern df_binary_file_record_struct *df_bin_record; extern int df_num_bin_records; extern struct coordinate blank_data_line; extern struct use_spec_s use_spec[]; /* Prototypes of functions exported by datafile.c */ void df_show_binary __PROTO((FILE *fp)); void df_show_datasizes __PROTO((FILE *fp)); void df_show_filetypes __PROTO((FILE *fp)); void df_set_datafile_binary __PROTO((void)); void df_unset_datafile_binary __PROTO((void)); void df_add_binary_records __PROTO((int, df_records_type)); void df_extend_binary_columns __PROTO((int)); void df_set_skip_before __PROTO((int col, int bytes)); /* Number of bytes to skip before a binary column. */ #define df_set_skip_after(col,bytes) df_set_skip_before(col+1,bytes) /* Number of bytes to skip after a binary column. */ void df_set_read_type __PROTO((int col, df_data_type type)); /* Type of data in the binary column. */ df_data_type df_get_read_type __PROTO((int col)); /* Type of data in the binary column. */ int df_get_read_size __PROTO((int col)); /* Size of data in the binary column. */ int df_get_num_matrix_cols __PROTO((void)); void df_set_plot_mode __PROTO((int)); #endif /* GNUPLOT_DATAFILE_H */ ������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/gadgets.c�������������������������������������������������������������������������0000644�0004711�0000144�00000040624�12200514533�012503� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: gadgets.c,v 1.80.2.1 2013/08/07 16:57:15 sfeam Exp $"); } #endif /* GNUPLOT - gadgets.c */ /*[ * Copyright 2000, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "gadgets.h" #include "command.h" #include "graph3d.h" /* for map3d_position_r() */ #include "graphics.h" #include "plot3d.h" /* For is_plot_with_palette() */ #include "pm3d.h" /* This file contains mainly a collection of global variables that * used to be in 'set.c', where they didn't really belong. They * describe the status of several parts of the gnuplot plotting engine * that are used by both 2D and 3D plots, and thus belong neither to * graphics.c nor graph3d.c, alone. This is not a very clean solution, * but better than mixing internal status and the user interface as we * used to have it, in set.c and setshow.h */ legend_key keyT = DEFAULT_KEY_PROPS; /* Description of the color box associated with CB_AXIS */ color_box_struct color_box; /* initialized in init_color() */ color_box_struct default_color_box = {SMCOLOR_BOX_DEFAULT, 'v', 1, LT_BLACK, LAYER_FRONT, 0, {screen, screen, screen, 0.90, 0.2, 0.0}, {screen, screen, screen, 0.05, 0.6, 0.0}, {0,0,0,0} }; /* The graph box, in terminal coordinates, as calculated by boundary() * or boundary3d(): */ BoundingBox plot_bounds; /* The bounding box for the entire drawable area of current terminal */ BoundingBox canvas; /* The bounding box against which clipping is to be done */ BoundingBox *clip_area = &plot_bounds; /* 'set size', 'set origin' setttings */ float xsize = 1.0; /* scale factor for size */ float ysize = 1.0; /* scale factor for size */ float zsize = 1.0; /* scale factor for size */ float xoffset = 0.0; /* x origin */ float yoffset = 0.0; /* y origin */ float aspect_ratio = 0.0; /* don't attempt to force it */ int aspect_ratio_3D = 0; /* 2 will put x and y on same scale, 3 for z also */ /* EAM Augest 2006 - redefine margin as t_position so that absolute placement is possible */ /* space between left edge and plot_bounds.xleft in chars (-1: computed) */ t_position lmargin = DEFAULT_MARGIN_POSITION; /* space between bottom and plot_bounds.ybot in chars (-1: computed) */ t_position bmargin = DEFAULT_MARGIN_POSITION; /* space between right egde and plot_bounds.xright in chars (-1: computed) */ t_position rmargin = DEFAULT_MARGIN_POSITION; /* space between top egde and plot_bounds.ytop in chars (-1: computed) */ t_position tmargin = DEFAULT_MARGIN_POSITION; /* File descriptor for output during 'set table' mode */ FILE *table_outfile = NULL; TBOOLEAN table_mode = FALSE; /* Pointer to the start of the linked list of 'set label' definitions */ struct text_label *first_label = NULL; /* Pointer to first 'set linestyle' definition in linked list */ struct linestyle_def *first_linestyle = NULL; struct linestyle_def *first_perm_linestyle = NULL; /* Pointer to first 'set style arrow' definition in linked list */ struct arrowstyle_def *first_arrowstyle = NULL; /* set arrow */ struct arrow_def *first_arrow = NULL; #ifdef EAM_OBJECTS /* Pointer to first object instance in linked list */ struct object *first_object = NULL; #endif /* 'set title' status */ text_label title = EMPTY_LABELSTRUCT; /* 'set timelabel' status */ text_label timelabel = EMPTY_LABELSTRUCT; int timelabel_rotate = FALSE; int timelabel_bottom = TRUE; /* flag for polar mode */ TBOOLEAN polar = FALSE; /* zero threshold, may _not_ be 0! */ double zero = ZERO; /* Status of 'set pointsize' and 'set pointintervalbox' commands */ double pointsize = 1.0; double pointintervalbox = 1.0; /* set border */ int draw_border = 31; /* The current settings */ int user_border = 31; /* What the user last set explicitly */ int border_layer = 1; # define DEFAULT_BORDER_LP { 0, LT_BLACK, 0, 0, 1.0, 1.0, FALSE, BLACK_COLORSPEC } struct lp_style_type border_lp = DEFAULT_BORDER_LP; const struct lp_style_type default_border_lp = DEFAULT_BORDER_LP; const struct lp_style_type background_lp = {0, LT_BACKGROUND, 0, 0, 1.0, 0.0, FALSE, BACKGROUND_COLORSPEC}; /* set clip */ TBOOLEAN clip_lines1 = TRUE; TBOOLEAN clip_lines2 = FALSE; TBOOLEAN clip_points = FALSE; /* set samples */ int samples_1 = SAMPLES; int samples_2 = SAMPLES; /* set angles */ double ang2rad = 1.0; /* 1 or pi/180, tracking angles_format */ enum PLOT_STYLE data_style = POINTSTYLE; enum PLOT_STYLE func_style = LINES; TBOOLEAN parametric = FALSE; /* If last plot was a 3d one. */ TBOOLEAN is_3d_plot = FALSE; #ifdef VOLATILE_REFRESH /* Flag to signal that the existing data is valid for a quick refresh */ int refresh_ok = 0; /* 0 = no; 2 = 2D ok; 3 = 3D ok */ /* FIXME: do_plot should be able to figure this out on its own! */ int refresh_nplots = 0; #endif /* Flag to show that volatile input data is present */ TBOOLEAN volatile_data = FALSE; fill_style_type default_fillstyle = { FS_EMPTY, 100, 0, DEFAULT_COLORSPEC } ; #ifdef EAM_OBJECTS /* Default rectangle style - background fill, black border */ struct object default_rectangle = DEFAULT_RECTANGLE_STYLE; struct object default_circle = DEFAULT_CIRCLE_STYLE; struct object default_ellipse = DEFAULT_ELLIPSE_STYLE; #endif /* filledcurves style options */ filledcurves_opts filledcurves_opts_data = EMPTY_FILLEDCURVES_OPTS; filledcurves_opts filledcurves_opts_func = EMPTY_FILLEDCURVES_OPTS; /* Prefer line styles over plain line types */ TBOOLEAN prefer_line_styles = FALSE; histogram_style histogram_opts = DEFAULT_HISTOGRAM_STYLE; boxplot_style boxplot_opts = DEFAULT_BOXPLOT_STYLE; /* WINDOWID to be filled by terminals running on X11 (x11, wxt, qt, ...) */ int current_x11_windowid = 0; /*****************************************************************/ /* Routines that deal with global objects defined in this module */ /*****************************************************************/ /* Clipping to the bounding box: */ /* Test a single point to be within the BoundingBox. * Sets the returned integers 4 l.s.b. as follows: * bit 0 if to the left of xleft. * bit 1 if to the right of xright. * bit 2 if below of ybot. * bit 3 if above of ytop. * 0 is returned if inside. */ int clip_point(unsigned int x, unsigned int y) { int ret_val = 0; if (!clip_area) return 0; if ((int)x < clip_area->xleft) ret_val |= 0x01; if ((int)x > clip_area->xright) ret_val |= 0x02; if ((int)y < clip_area->ybot) ret_val |= 0x04; if ((int)y > clip_area->ytop) ret_val |= 0x08; return ret_val; } /* Clip the given line to drawing coords defined by BoundingBox. * This routine uses the cohen & sutherland bit mapping for fast clipping - * see "Principles of Interactive Computer Graphics" Newman & Sproull page 65. */ void draw_clip_line(int x1, int y1, int x2, int y2) { struct termentry *t = term; if (!clip_line(&x1, &y1, &x2, &y2)) /* clip_line() returns zero --> segment completely outside * bounding box */ return; (*t->move) (x1, y1); (*t->vector) (x2, y2); } void draw_clip_arrow( int sx, int sy, int ex, int ey, int head) { struct termentry *t = term; /* Don't draw head if the arrow itself is clipped */ if (clip_point(sx,sy)) head &= ~BACKHEAD; if (clip_point(ex,ey)) head &= ~END_HEAD; clip_line(&sx, &sy, &ex, &ey); /* Call terminal routine to draw the clipped arrow */ (*t->arrow)((unsigned int)sx, (unsigned int)sy, (unsigned int)ex, (unsigned int)ey, head); } /* Clip the given line to drawing coords defined by BoundingBox. * This routine uses the cohen & sutherland bit mapping for fast clipping - * see "Principles of Interactive Computer Graphics" Newman & Sproull page 65. * Return 0: entire line segment is outside bounding box * 1: entire line segment is inside bounding box * -1: line segment has been clipped to bounding box */ int clip_line(int *x1, int *y1, int *x2, int *y2) { int x, y, dx, dy, x_intr[4], y_intr[4], count, pos1, pos2; int x_max, x_min, y_max, y_min; pos1 = clip_point(*x1, *y1); pos2 = clip_point(*x2, *y2); if (!pos1 && !pos2) return 1; /* segment is totally in */ if (pos1 & pos2) return 0; /* segment is totally out. */ /* Here part of the segment MAY be inside. test the intersection * of this segment with the 4 boundaries for hopefully 2 intersections * in. If none are found segment is totaly out. * Under rare circumstances there may be up to 4 intersections (e.g. * when the line passes directly through at least one corner). In * this case it is sufficient to take any 2 intersections (e.g. the * first two found). */ count = 0; dx = *x2 - *x1; dy = *y2 - *y1; /* Find intersections with the x parallel bbox lines: */ if (dy != 0) { x = (clip_area->ybot - *y2) * dx / dy + *x2; /* Test for clip_area->ybot boundary. */ if (x >= clip_area->xleft && x <= clip_area->xright) { x_intr[count] = x; y_intr[count++] = clip_area->ybot; } x = (clip_area->ytop - *y2) * dx / dy + *x2; /* Test for clip_area->ytop boundary. */ if (x >= clip_area->xleft && x <= clip_area->xright) { x_intr[count] = x; y_intr[count++] = clip_area->ytop; } } /* Find intersections with the y parallel bbox lines: */ if (dx != 0) { y = (clip_area->xleft - *x2) * dy / dx + *y2; /* Test for clip_area->xleft boundary. */ if (y >= clip_area->ybot && y <= clip_area->ytop) { x_intr[count] = clip_area->xleft; y_intr[count++] = y; } y = (clip_area->xright - *x2) * dy / dx + *y2; /* Test for clip_area->xright boundary. */ if (y >= clip_area->ybot && y <= clip_area->ytop) { x_intr[count] = clip_area->xright; y_intr[count++] = y; } } if (count < 2) return 0; if (*x1 < *x2) { x_min = *x1; x_max = *x2; } else { x_min = *x2; x_max = *x1; } if (*y1 < *y2) { y_min = *y1; y_max = *y2; } else { y_min = *y2; y_max = *y1; } if (pos1 && pos2) { /* Both were out - update both */ /* EAM Sep 2008 - preserve direction of line segment */ if ((dx*(x_intr[1]-x_intr[0]) < 0) || (dy*(y_intr[1]-y_intr[0]) < 0)) { *x1 = x_intr[1]; *y1 = y_intr[1]; *x2 = x_intr[0]; *y2 = y_intr[0]; } else { *x1 = x_intr[0]; *y1 = y_intr[0]; *x2 = x_intr[1]; *y2 = y_intr[1]; } } else if (pos1) { /* Only x1/y1 was out - update only it */ /* Nov 2010: When clip_line() and draw_clip_line() were consolidated in */ /* 2000, the test below was the only point of difference between them. */ /* Unfortunately, the wrong version was kept. Now I change it back. */ /* The effect of the wrong version (>= rather than >) was that a line */ /* from ymin to ymax+eps was clipped to ymin,ymin rather than ymin,ymax */ if (dx * (*x2 - x_intr[0]) + dy * (*y2 - y_intr[0]) > 0) { *x1 = x_intr[0]; *y1 = y_intr[0]; } else { *x1 = x_intr[1]; *y1 = y_intr[1]; } } else { /* Only x2/y2 was out - update only it */ /* Same difference here, again */ if (dx * (x_intr[0] - *x1) + dy * (y_intr[0] - *y1) > 0) { *x2 = x_intr[0]; *y2 = y_intr[0]; } else { *x2 = x_intr[1]; *y2 = y_intr[1]; } } if (*x1 < x_min || *x1 > x_max || *x2 < x_min || *x2 > x_max || *y1 < y_min || *y1 > y_max || *y2 < y_min || *y2 > y_max) return 0; return -1; } /* Two routines to emulate move/vector sequence using line drawing routine. */ static unsigned int move_pos_x, move_pos_y; void clip_move(unsigned int x, unsigned int y) { move_pos_x = x; move_pos_y = y; } void clip_vector(unsigned int x, unsigned int y) { draw_clip_line(move_pos_x, move_pos_y, x, y); move_pos_x = x; move_pos_y = y; } /* Common routines for setting text or line color from t_colorspec */ void apply_pm3dcolor(struct t_colorspec *tc, const struct termentry *t) { /* Replace colorspec with that of the requested line style */ struct lp_style_type style; if (tc->type == TC_LINESTYLE) { lp_use_properties(&style, tc->lt); tc = &style.pm3d_color; } if (tc->type == TC_DEFAULT) { (*t->linetype)(LT_BLACK); return; } if (tc->type == TC_LT) { if (t->set_color) t->set_color(tc); else (*t->linetype)(tc->lt); return; } if (tc->type == TC_RGB && t->set_color) { t->set_color(tc); return; } if (!is_plot_with_palette() || !t->set_color) { (*t->linetype)(LT_BLACK); return; } switch (tc->type) { case TC_Z: set_color(cb2gray(z2cb(tc->value))); break; case TC_CB: set_color(cb2gray(tc->value)); break; case TC_FRAC: set_color(sm_palette.positive == SMPAL_POSITIVE ? tc->value : 1-tc->value); break; } } void reset_textcolor(const struct t_colorspec *tc, const struct termentry *t) { if (tc->type != TC_DEFAULT) (*t->linetype)(LT_BLACK); } void default_arrow_style(struct arrow_style_type *arrow) { static const struct lp_style_type tmp_lp_style = DEFAULT_LP_STYLE_TYPE; arrow->tag = -1; arrow->layer = 0; arrow->lp_properties = tmp_lp_style; arrow->head = 1; arrow->head_length = 0.0; arrow->head_lengthunit = first_axes; arrow->head_angle = 15.0; arrow->head_backangle = 90.0; arrow->head_filled = 0; } void free_labels(struct text_label *label) { struct text_label *temp; char *master_font = label->font; /* Labels generated by 'plot with labels' all use the same font */ if (master_font) free(master_font); while (label) { if (label->text) free(label->text); if (label->font && label->font != master_font) free(label->font); temp=label->next; free(label); label = temp; } } void get_offsets( struct text_label *this_label, struct termentry *t, int *htic, int *vtic) { if (this_label->lp_properties.pointflag) { *htic = (pointsize * t->h_tic * 0.5); *vtic = (pointsize * t->v_tic * 0.5); } else { *htic = 0; *vtic = 0; } if (is_3d_plot) { int htic2, vtic2; map3d_position_r(&(this_label->offset), &htic2, &vtic2, "get_offsets"); *htic += htic2; *vtic += vtic2; } else { double htic2, vtic2; map_position_r(&(this_label->offset), &htic2, &vtic2, "get_offsets"); *htic += (int)htic2; *vtic += (int)vtic2; } } /* * Write one label, with all the trimmings. * This routine is used for both 2D and 3D plots. */ void write_label(unsigned int x, unsigned int y, struct text_label *this_label) { int htic, vtic; int justify = JUST_TOP; /* This was the 2D default; 3D had CENTRE */ apply_pm3dcolor(&(this_label->textcolor),term); ignore_enhanced(this_label->noenhanced); get_offsets(this_label, term, &htic, &vtic); if (this_label->rotate && (*term->text_angle) (this_label->rotate)) { write_multiline(x + htic, y + vtic, this_label->text, this_label->pos, justify, this_label->rotate, this_label->font); (*term->text_angle) (0); } else { write_multiline(x + htic, y + vtic, this_label->text, this_label->pos, justify, 0, this_label->font); } /* write_multiline() clips text to on_page; do the same for any point */ if (this_label->lp_properties.pointflag && on_page(x,y)) { term_apply_lp_properties(&this_label->lp_properties); (*term->point) (x, y, this_label->lp_properties.p_type); /* the default label color is that of border */ term_apply_lp_properties(&border_lp); } ignore_enhanced(FALSE); } ������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/gnuplot.opt�����������������������������������������������������������������������0000644�0004711�0000144�00000000753�10720406154�013140� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������alloc.obj axis.obj binary.obj bitmap.obj breaders.obj color.obj command.obj contour.obj datafile.obj dynarray.obj eval.obj fit.obj gadgets.obj getcolor.obj graphics.obj graph3d.obj help.obj hidden3d.obj history.obj internal.obj interpol.obj matrix.obj misc.obj mouse.obj parse.obj plot.obj plot2d.obj plot3d.obj pm3d.obj save.obj scanner.obj set.obj show.obj specfun.obj standard.obj stdfn.obj tables.obj tabulate.obj term.obj time.obj unset.obj util.obj util3d.obj variable.obj version.obj ���������������������gnuplot-4.6.4/src/gplt_x11.c������������������������������������������������������������������������0000644�0004711�0000144�00000610565�12206707271�012544� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: gplt_x11.c,v 1.210.2.6 2013/08/24 22:46:46 sfeam Exp $"); } #endif #define X11_POLYLINE 1 #define MOUSE_ALL_WINDOWS 1 /* GNUPLOT - gplt_x11.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* lph changes: * (a) make EXPORT_SELECTION the default and specify NOEXPORT to undefine * (b) append X11 terminal number to resource name * (c) change cursor for active terminal */ /*----------------------------------------------------------------------------- * gnuplot_x11 - X11 outboard terminal driver for gnuplot 3.3 * * Requires installation of companion inboard x11 driver in gnuplot/term.c * * Acknowledgements: * Chris Peterson (MIT) * Dana Chee (Bellcore) * Arthur Smith (Cornell) * Hendri Hondorp (University of Twente, The Netherlands) * Bill Kucharski (Solbourne) * Charlie Kline (University of Illinois) * Yehavi Bourvine (Hebrew University of Jerusalem, Israel) * Russell Lang (Monash University, Australia) * O'Reilly & Associates: X Window System - Volumes 1 & 2 * * This code is provided as is and with no warranties of any kind. * * drd: change to allow multiple windows to be maintained independently * *---------------------------------------------------------------------------*/ /* drd : export the graph via ICCCM primary selection. well... not quite * ICCCM since we dont support full list of targets, but this * is a start. define EXPORT_SELECTION if you want this feature */ /*lph: add a "feature" to undefine EXPORT_SELECTION The following makes EXPORT_SELECTION the default and defining NOEXPORT over-rides the default */ /* Petr Mikulik and Johannes Zellner: added mouse support (October 1999) * Implementation and functionality is based on os2/gclient.c; see mousing.c * Pieter-Tjerk de Boer <ptdeboer@cs.utwente.nl>: merged two versions * of mouse patches. (November 1999) (See also mouse.[ch]). */ /* X11 support for Petr Mikulik's pm3d * by Johannes Zellner <johannes@zellner.org> * (November 1999 - January 2000, Oct. 2000) */ /* Polyline support May 2003 * Ethan Merritt <merritt@u.washington.edu> */ /* Dynamically created windows July 2003 * Across-pipe title text and close command October 2003 * Dan Sebald <daniel.sebald@ieee.org> */ /* Daniel Sebald: added X11 support for images. (27 February 2003) */ /* Shigeharu Takeno <shige@iee.niit.ac.jp> February 2005 * Support for multi-byte fonts based, with permission, on the "gnuplot+" * patches by Masahito Yamaga <ma@yama-ga.com> */ #include <X11/Xos.h> #include <X11/Xlib.h> #include <X11/Xresource.h> #include <X11/Xutil.h> #include <X11/Xatom.h> #include <X11/keysym.h> #ifdef USE_X11_MULTIBYTE # include <X11/Xlocale.h> #endif #include <assert.h> #include "syscfg.h" #include "stdfn.h" #include "gp_types.h" #include "term_api.h" #include "gplt_x11.h" #include "version.h" #ifdef EXPORT_SELECTION # undef EXPORT_SELECTION #endif /* EXPORT SELECTION */ #ifndef NOEXPORT # define EXPORT_SELECTION XA_PRIMARY #endif /* NOEXPORT */ #if !(defined(VMS) || defined(CRIPPLED_SELECT)) # define DEFAULT_X11 #endif #if defined(VMS) && defined(CRIPPLED_SELECT) Error. Incompatible options. #endif #include <math.h> #include "getcolor.h" #ifdef USE_MOUSE # include <X11/cursorfont.h> #else # define XC_crosshair 34 #endif #include <signal.h> #ifdef HAVE_SYS_BSDTYPES_H # include <sys/bsdtypes.h> #endif #if defined(HAVE_SYS_SYSTEMINFO_H) && defined(HAVE_SYSINFO) # include <sys/systeminfo.h> # define SYSINFO_METHOD "sysinfo" # define GP_SYSTEMINFO(host) sysinfo (SI_HOSTNAME, (host), MAXHOSTNAMELEN) #else # define SYSINFO_METHOD "gethostname" # define GP_SYSTEMINFO(host) gethostname ((host), MAXHOSTNAMELEN) #endif /* HAVE_SYS_SYSTEMINFO_H && HAVE_SYSINFO */ #ifdef USE_MOUSE # ifdef OS2_IPC # define INCL_DOSPROCESS # define INCL_DOSSEMAPHORES # include <os2.h> # endif # include "gpexecute.h" # include "mouse.h" # include <unistd.h> # include <fcntl.h> # include <errno.h> #ifdef MOUSE_ALL_WINDOWS # include "axis.h" /* Just to pick up FIRST_X_AXIS enums */ typedef struct axis_scale_t { int term_lower; double term_scale; double min; double logbase; } axis_scale_t; #endif #endif /* USE_MOUSE */ #ifdef __EMX__ /* for gethostname ... */ # include <netdb.h> /* for __XOS2RedirRoot */ #include <X11/Xlibint.h> #endif #ifdef VMS # ifdef __DECC # include <starlet.h> # endif # define EXIT(status) sys$delprc(0, 0) /* VMS does not drop itself */ #else /* !VMS */ # ifdef PIPE_IPC # define EXIT(status) \ do { \ gp_exec_event(GE_pending, 0, 0, 0, 0, 0); \ close(1); \ close(0); \ exit(status); \ } while (0) # else # define EXIT(status) exit(status) # endif /* PIPE_IPC */ #endif /* !VMS */ #define Ncolors 13 typedef struct cmap_t { struct cmap_t *prev_cmap; /* Linked list pointers and number */ struct cmap_t *next_cmap; Colormap colormap; unsigned long colors[Ncolors]; /* line colors as pixel values */ unsigned long rgbcolors[Ncolors]; /* line colors in rgb format */ unsigned long xorpixel; /* line colors */ int total; int allocated; unsigned long *pixels; /* pm3d colors */ } cmap_t; /* always allocate a default colormap (done in preset()) */ static cmap_t default_cmap; /* In order to get multiple palettes on a plot, i.e., multiplot mode, we must keep track of all color maps on a plot so that a needed color map is not discarded prematurely. */ typedef struct cmap_struct { cmap_t *cmap; struct cmap_struct *next_cmap_struct; } cmap_struct; /* information about one window/plot */ typedef struct plot_struct { Window window; #ifdef EXTERNAL_X11_WINDOW Window external_container; #endif Pixmap pixmap; unsigned int posn_flags; int x, y; unsigned int width, height; /* window size */ unsigned int gheight; /* height of the part of the window that * contains the graph (i.e., excluding the * status line at the bottom if mouse is * enabled) */ unsigned int px, py; int ncommands, max_commands; char **commands; char *titlestring; #ifdef USE_MOUSE int button; /* buttons which are currently pressed */ char str[0xff]; /* last displayed string */ #endif Time time; /* time stamp of previous event */ int lwidth; /* this and the following 6 lines declare */ int type; /* variables used during drawing in exec_cmd() */ int user_width; enum JUSTIFY jmode; double angle; /* Text rotation angle in degrees */ int lt; #ifdef USE_MOUSE TBOOLEAN mouse_on; /* is mouse bar on? */ TBOOLEAN ruler_on; /* is ruler on? */ TBOOLEAN ruler_lineto_on; /* is line between ruler and mouse cursor on? */ int ruler_x, ruler_y; /* coordinates of ruler */ int ruler_lineto_x, ruler_lineto_y; /* draw line from ruler to current mouse pos */ TBOOLEAN zoombox_on; /* is zoombox on? */ int zoombox_x1, zoombox_y1, zoombox_x2, zoombox_y2; /* coordinates of zoombox as last drawn */ char zoombox_str1a[64], zoombox_str1b[64], zoombox_str2a[64], zoombox_str2b[64]; /* strings to be drawn at corners of zoombox ; 1/2 indicate corner; a/b indicate above/below */ TBOOLEAN resizing; /* TRUE while waiting for an acknowledgement of resize */ #endif /* points to the cmap which is currently used for drawing. * This is always the default colormap, if not in pm3d. */ cmap_t *cmap; cmap_struct *first_cmap_struct; #if defined(USE_MOUSE) && defined(MOUSE_ALL_WINDOWS) /* This array holds per-axis scaling information sufficient to reconstruct * plot coordinates of a mouse click. It is a snapshot of the contents of * gnuplot's axis_array structure at the time the plot was drawn. */ int almost2d; int axis_mask; /* Bits set to show which axes are active */ axis_scale_t axis_scale[2*SECOND_AXES]; #endif /* Last text position - used by enhanced text mode */ int xLast, yLast; /* Saved text position - used by enhanced text mode */ int xSave, ySave; /* Last rgb color that was set */ unsigned long current_rgb; struct plot_struct *prev_plot; /* Linked list pointers and number */ struct plot_struct *next_plot; int plot_number; } plot_struct; static plot_struct *Add_Plot_To_Linked_List __PROTO((int)); static void Remove_Plot_From_Linked_List __PROTO((Window)); static plot_struct *Find_Plot_In_Linked_List_By_Number __PROTO((int)); static plot_struct *Find_Plot_In_Linked_List_By_Window __PROTO((Window)); static plot_struct *Find_Plot_In_Linked_List_By_CMap __PROTO((cmap_t *)); static struct plot_struct *current_plot = NULL; static int most_recent_plot_number = 0; static struct plot_struct *plot_list_start = NULL; static void x11_setfill __PROTO((GC *gc, int style)); /* information about window/plot to be removed */ typedef struct plot_remove_struct { Window plot_window_to_remove; struct plot_remove_struct *next_remove; int processed; } plot_remove_struct; static void Add_Plot_To_Remove_FIFO_Queue __PROTO((Window)); static void Process_Remove_FIFO_Queue __PROTO((void)); static struct plot_remove_struct *remove_fifo_queue_start = NULL; static int process_remove_fifo_queue = 0; static cmap_t *Add_CMap_To_Linked_List __PROTO((void)); static void Remove_CMap_From_Linked_List __PROTO((cmap_t *)); static cmap_t *Find_CMap_In_Linked_List __PROTO((cmap_t *)); static int cmaps_differ __PROTO((cmap_t *, cmap_t *)); /* current_cmap always points to a valid colormap. At start up * it is the default colormap. When a palette command comes * across the pipe, the current_cmap is set to point at the * resulting colormap which ends up in the linked list of colormaps. * The current_cmap should never be removed from the linked list * even if all windows are deleted, because that colormap will be * used for the next plot. */ static struct cmap_t *current_cmap = NULL; static struct cmap_t *cmap_list_start = NULL; /* These might work better as fuctions, but defines will do for now. */ #define ERROR_NOTICE(str) "\nGNUPLOT (gplt_x11): " str #define ERROR_NOTICE_NEWLINE(str) "\n " str enum { NOT_AVAILABLE = -1 }; #define SEL_LEN 0xff static char selection[SEL_LEN] = ""; #ifdef USE_MOUSE # define GRAPH_HEIGHT(plot) ((plot)->gheight) # define PIXMAP_HEIGHT(plot) ((plot)->gheight + vchar) /* note: PIXMAP_HEIGHT is the height of the plot including the status line, even if the latter is not enabled right now */ #else # define GRAPH_HEIGHT(plot) ((plot)->height) # define PIXMAP_HEIGHT(plot) ((plot)->height) #endif static void CmapClear __PROTO((cmap_t *)); static void RecolorWindow __PROTO((plot_struct *)); static void FreeColormapList __PROTO((plot_struct *plot)); static void FreeColors __PROTO((cmap_t *)); static void ReleaseColormap __PROTO((cmap_t *)); static unsigned long *ReallocColors __PROTO((cmap_t *, int)); static void PaletteMake __PROTO((t_sm_palette *)); static void PaletteSetColor __PROTO((plot_struct *, double)); static int GetVisual __PROTO((int, Visual **, int *)); static void scan_palette_from_buf __PROTO((void)); static unsigned short BitMaskDetails __PROTO((unsigned long mask, unsigned short *left_shift, unsigned short *right_shift)); TBOOLEAN swap_endian = 0; /* For binary data. */ /* Petr's byte swapping routine. */ static inline void byteswap(char* data, int datalen) { char tmp, *dest = data + datalen - 1; if (datalen < 2) return; while (dest > data) { tmp = *dest; *dest-- = *data; *data++ = tmp; } } /* Additional macros that should be more efficient when data size is known. */ char byteswap_char; #define byteswap1(x) #define byteswap2(x) \ byteswap_char = ((char *)x)[0]; \ ((char *)x)[0] = ((char *)x)[1]; \ ((char *)x)[1] = byteswap_char; #define byteswap4(x) \ byteswap_char = ((char *)x)[0]; \ ((char *)x)[0] = ((char *)x)[3]; \ ((char *)x)[3] = byteswap_char; \ byteswap_char = ((char *)x)[1]; \ ((char *)x)[1] = ((char *)x)[2]; \ ((char *)x)[2] = byteswap_char static void store_command __PROTO((char *, plot_struct *)); static void prepare_plot __PROTO((plot_struct *)); static void delete_plot __PROTO((plot_struct *)); static int record __PROTO((void)); static void process_event __PROTO((XEvent *)); /* from Xserver */ static void process_configure_notify_event __PROTO((XEvent *event)); static void mainloop __PROTO((void)); static void display __PROTO((plot_struct *)); static void UpdateWindow __PROTO((plot_struct *)); #ifdef USE_MOUSE static void gp_execute_GE_plotdone __PROTO((int windowid)); static int ErrorHandler __PROTO((Display *, XErrorEvent *)); static void DrawRuler __PROTO((plot_struct *)); static void EventuallyDrawMouseAddOns __PROTO((plot_struct *)); static void DrawBox __PROTO((plot_struct *)); static void DrawLineToRuler __PROTO((plot_struct *)); static void AnnotatePoint __PROTO((plot_struct *, int, int, const char[], const char[])); static long int SetTime __PROTO((plot_struct *, Time)); static unsigned long AllocateXorPixel __PROTO((cmap_t *)); static void GetGCXor __PROTO((plot_struct *, GC *)); static void GetGCXorDashed __PROTO((plot_struct *, GC *)); static void EraseCoords __PROTO((plot_struct *)); static void DrawCoords __PROTO((plot_struct *, const char *)); static void DisplayCoords __PROTO((plot_struct *, const char *)); static TBOOLEAN is_meta __PROTO((KeySym)); #ifndef DISABLE_SPACE_RAISES_CONSOLE static unsigned long gnuplotXID = 0; /* WINDOWID of gnuplot */ static char* getMultiTabConsoleSwitchCommand __PROTO((unsigned long *)); #endif /* DISABLE_SPACE_RAISES_CONSOLE */ #endif /* USE_MOUSE */ static void DrawRotated __PROTO((plot_struct *, Display *, GC, int, int, const char *, int)); static int DrawRotatedErrorHandler __PROTO((Display *, XErrorEvent *)); static void exec_cmd __PROTO((plot_struct *, char *)); static void reset_cursor __PROTO((void)); static void preset __PROTO((int, char **)); static char *pr_GetR __PROTO((XrmDatabase, char *)); static void pr_color __PROTO((cmap_t *)); static void pr_dashes __PROTO((void)); static void pr_encoding __PROTO((void)); static void pr_font __PROTO((char *)); static void pr_geometry __PROTO((char *)); static void pr_pointsize __PROTO((void)); static void pr_width __PROTO((void)); static void pr_window __PROTO((plot_struct *)); static void pr_raise __PROTO((void)); static void pr_persist __PROTO((void)); static void pr_feedback __PROTO((void)); static void pr_ctrlq __PROTO((void)); static void pr_fastrotate __PROTO((void)); #ifdef EXPORT_SELECTION static void export_graph __PROTO((plot_struct *)); static void handle_selection_event __PROTO((XEvent *)); static void pr_exportselection __PROTO((void)); #endif #if defined(USE_MOUSE) && defined(MOUSE_ALL_WINDOWS) static void mouse_to_coords __PROTO((plot_struct *, XEvent *, double *, double *, double *, double *)); static double mouse_to_axis __PROTO((int, axis_scale_t *)); #endif static char *FallbackFont = "fixed"; #ifdef USE_X11_MULTIBYTE static char *FallbackFontMB = "mbfont:*-medium-r-normal--14-*;*-medium-r-normal--16-*"; # define FontSetSep ';' static int usemultibyte = 0; static int multibyte_fonts_usable=1; static int fontset_transsep __PROTO((char *, char *, int)); #endif /* USE_X11_MULTIBYTE */ static int gpXTextWidth __PROTO((XFontStruct *, const char *, int)); static int gpXTextHeight __PROTO((XFontStruct *)); static void gpXSetFont __PROTO((Display *, GC, Font)); static void gpXDrawImageString __PROTO((Display *, Drawable, GC, int, int, const char *, int)); static void gpXDrawString __PROTO((Display *, Drawable, GC, int, int, const char *, int)); static void gpXFreeFont __PROTO((Display *, XFontStruct *)); static XFontStruct *gpXLoadQueryFont __PROTO((Display *, char *)); static char *gpFallbackFont __PROTO((void)); static int gpXGetFontascent __PROTO((XFontStruct *cfont)); enum set_encoding_id encoding = S_ENC_DEFAULT; /* EAM - mirrored from core code by 'QE' */ static char default_font[64] = { '\0' }; static char default_encoding[16] = { '\0' }; #define Nwidths 10 static unsigned int widths[Nwidths] = { 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; #define Ndashes 10 static char dashes[Ndashes][5]; t_sm_palette sm_palette = { -1, /* colorFormulae */ SMPAL_COLOR_MODE_NONE, /* colorMode */ 0, 0, 0, /* formula[RGB] */ 0, /* positive */ 0, /* use_maxcolors */ -1, /* colors */ (rgb_color *) 0, /* color */ 0, /* ps_allcF */ 0, /* gradient_num */ (gradient_struct *) 0 /* gradient */ /* Afunc, Bfunc and Cfunc can't be initialised here */ }; static int have_pm3d = 1; static int num_colormaps = 0; static unsigned int maximal_possible_colors = 0x100; static unsigned int minimal_possible_colors; /* the following visual names must match the * definitions in X.h in this order ! I hope * this is standard (joze) */ static char *visual_name[] = { "StaticGray", "GrayScale", "StaticColor", "PseudoColor", "TrueColor", "DirectColor", (char *) 0 }; static Display *dpy; static int scr; static Window root; static Visual *vis = (Visual *) 0; static GC gc = (GC) 0; static GC *current_gc = (GC *) 0; static GC gc_xor = (GC) 0; static GC gc_xor_dashed = (GC) 0; static GC fill_gc = (GC) 0; static XFontStruct *font = NULL; #ifdef USE_X11_MULTIBYTE static XFontSet mbfont = NULL; #endif static int do_raise = yes, persist = no; static TBOOLEAN fast_rotate = TRUE; static int feedback = yes; static int ctrlq = no; static int dashedlines = no; #ifdef EXPORT_SELECTION static TBOOLEAN exportselection = TRUE; #endif static Cursor cursor; static Cursor cursor_default; #ifdef USE_MOUSE static Cursor cursor_exchange; static Cursor cursor_sizing; static Cursor cursor_zooming; #ifndef TITLE_BAR_DRAWING_MSG static Cursor cursor_waiting; static Cursor cursor_save; static int button_pressed = 0; #endif #endif static int windows_open = 0; static int gX = 100, gY = 100; static unsigned int gW = 640, gH = 450; static unsigned int gFlags = PSize; static unsigned int BorderWidth = 2; static unsigned int dep; /* depth */ static long max_request_size; static Bool Mono = 0, Gray = 0, Rv = 0, Clear = 0; static char X_Name[64] = "gnuplot"; static char X_Class[64] = "Gnuplot"; static int cx = 0, cy = 0; /* Font characteristics held locally but sent back via pipe to x11.trm */ static int vchar, hchar; /* Speficy negative values as indicator of uninitialized state */ static double xscale = -1.; static double yscale = -1.; double pointsize = -1.; /* Avoid a crash upon using uninitialized variables from above and avoid unnecessary calls to display(). Probably this is not the best fix ... */ #define Call_display(plot) if (xscale<0.) display(plot); #define X(x) (int) ((x) * xscale) #define Y(y) (int) ((4095-(y)) * yscale) #define RevX(x) (((x)+0.5)/xscale) #define RevY(y) (4095-((y)+0.5)/yscale) /* note: the 0.5 term in RevX(x) and RevY(y) compensates for the round-off in X(x) and Y(y) */ static char buf[X11_COMMAND_BUFFER_LENGTH]; static int buffered_input_available = 0; static FILE *X11_ipc; /* when using an ICCCM-compliant window manager, we can ask it * to send us an event when user chooses 'close window'. We do this * by setting WM_DELETE_WINDOW atom in property WM_PROTOCOLS */ static Atom WM_PROTOCOLS, WM_DELETE_WINDOW; static XPoint Diamond[5], Triangle[4]; static XSegment Plus[2], Cross[2], Star[4]; /* pixmaps used for filled boxes (ULIG) */ /* FIXME EAM - These data structures are a duplicate of the ones in bitmap.c */ /* pattern stipples for pattern fillstyle */ #define stipple_pattern_width 8 #define stipple_pattern_height 8 #define stipple_pattern_num 8 static const char stipple_pattern_bits[stipple_pattern_num][8] = { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } /* no fill */ , { 0x81, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x41 } /* cross-hatch (1) */ , { 0x88, 0x55, 0x22, 0x55, 0x88, 0x55, 0x22, 0x55 } /* double crosshatch(2) */ , { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } /* solid fill (3) */ , { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 } /* diagonal stripes (4) */ , { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 } /* diagonal stripes (5) */ , { 0x11, 0x11, 0x22, 0x22, 0x44, 0x44, 0x88, 0x88 } /* diagonal stripes (6) */ , { 0x88, 0x88, 0x44, 0x44, 0x22, 0x22, 0x11, 0x11 } /* diagonal stripes (7) */ }; static Pixmap stipple_pattern[stipple_pattern_num]; static int stipple_initialized = 0; #ifdef X11_POLYLINE static XPoint *polyline = NULL; static int polyline_space = 0; static int polyline_size = 0; #endif /* * Main program */ int main(int argc, char *argv[]) { #ifdef PIPE_IPC int getfl; #endif #ifdef __EMX__ /* close open file handles */ fcloseall(); #endif #ifdef USE_X11_MULTIBYTE if (setlocale(LC_ALL, "")==NULL || XSupportsLocale()==False) multibyte_fonts_usable=0; setlocale(LC_NUMERIC, "C"); /* HBB 20050525 */ #endif /* USE_X11_MULTIBYTE */ preset(argc, argv); /* set up the alternative cursor */ cursor_default = XCreateFontCursor(dpy, XC_crosshair); cursor = cursor_default; #ifdef USE_MOUSE /* create cursors for the splot actions */ cursor_exchange = XCreateFontCursor(dpy, XC_exchange); cursor_sizing = XCreateFontCursor(dpy, XC_sizing); /* arrow, top_left_arrow, left_ptr, sb_left_arrow, sb_right_arrow, * plus, pencil, draft_large, right_ptr, draft_small */ cursor_zooming = XCreateFontCursor(dpy, XC_draft_small); #ifndef TITLE_BAR_DRAWING_MSG cursor_waiting = XCreateFontCursor(dpy, XC_watch); cursor_save = (Cursor)0; #endif #endif #ifdef PIPE_IPC if (!pipe_died) { /* set up nonblocking stdout */ getfl = fcntl(1, F_GETFL); /* get current flags */ fcntl(1, F_SETFL, getfl | O_NONBLOCK); signal(SIGPIPE, pipe_died_handler); } # endif #ifdef X11_POLYLINE polyline_space = 100; polyline = calloc(polyline_space, sizeof(XPoint)); if (!polyline) fprintf(stderr, "Panic: cannot allocate polyline\n"); #endif mainloop(); if (persist) { FPRINTF((stderr, "waiting for %d windows\n", windows_open)); #ifndef DEBUG /* HBB 20030519: Some programs executing gnuplot -persist may * be waiting for all default handles to be closed before they * consider the sub-process finished. Emacs, e.g., does. So, * unless this is a DEBUG build, drop our connection to stderr * now. Using Freopen() ensures that debug fprintf()s won't * crash. */ freopen("/dev/null", "w", stderr); #endif /* read x events until all windows have been quit */ while (windows_open > 0) { XEvent event; XNextEvent(dpy, &event); process_event(&event); } } XCloseDisplay(dpy); FPRINTF((stderr, "exiting\n")); EXIT(0); } /*----------------------------------------------------------------------------- * mainloop processing - process X events and input from gnuplot * * Three different versions of main loop processing are provided to support * three different platforms. * * DEFAULT_X11: use select() for both X events and input on stdin * from gnuplot inboard driver * * CRIPPLED_SELECT: use select() to service X events and check during * select timeout for temporary plot file created * by inboard driver * * VMS: use XNextEvent to service X events and AST to * service input from gnuplot inboard driver on stdin *---------------------------------------------------------------------------*/ #ifdef DEFAULT_X11 /* * DEFAULT_X11 mainloop */ static void mainloop() { int nf, cn = ConnectionNumber(dpy), in; SELECT_TYPE_ARG1 nfds; struct timeval timeout, *timer = (struct timeval *) 0; fd_set tset; #ifdef PIPE_IPC int usleep_count = 0; int out; out = fileno(stdout); #endif X11_ipc = stdin; in = fileno(X11_ipc); #ifdef PIPE_IPC if (out > in) nfds = ((cn > out) ? cn : out) + 1; else #endif nfds = ((cn > in) ? cn : in) + 1; #ifdef ISC22 /* Added by Robert Eckardt, RobertE@beta.TP2.Ruhr-Uni-Bochum.de */ timeout.tv_sec = 0; /* select() in ISC2.2 needs timeout */ timeout.tv_usec = 300000; /* otherwise input from gnuplot is */ timer = &timeout; /* suspended til next X event. */ #endif /* ISC22 (0.3s are short enough not to be noticed */ while (1) { /* XNextEvent does an XFlush() before waiting. But here. * we must ensure that the queue is flushed, since we * dont call XNextEvent until an event arrives. (I have * twice wasted quite some time over this issue, so now * I am making sure of it ! */ XFlush(dpy); FD_ZERO(&tset); FD_SET(cn, &tset); /* Don't wait for events if we know that input is * already sitting in a buffer. Also don't wait for * input to become available. */ if (buffered_input_available) { timeout.tv_sec = 0; timeout.tv_usec = 0; timer = &timeout; } else { timer = (struct timeval *) 0; FD_SET(in, &tset); } #ifdef PIPE_IPC if (buffered_output_pending && !pipe_died) { /* check, if stdout becomes writable */ FD_SET(out, &tset); } #ifdef HAVE_USLEEP /* Make sure this loop does not monopolize CPU if the pipe is jammed */ if (++usleep_count > 10) { usleep(100); usleep_count = 0; } #endif #endif nf = select(nfds, SELECT_TYPE_ARG234 &tset, 0, 0, SELECT_TYPE_ARG5 timer); if (nf < 0) { if (errno == EINTR) continue; perror("gnuplot_x11: select failed"); EXIT(1); } if (nf > 0) XNoOp(dpy); if (XPending(dpy)) { /* used to use CheckMaskEvent() but that cannot receive * maskable events such as ClientMessage. So now we do * one event, then return to the select. * And that almost works, except that under some Xservers * running without a window manager (e.g. Hummingbird Exceed under Win95) * a bogus ConfigureNotify is sent followed by a valid ConfigureNotify * when the window is maximized. The two events are queued, apparently * in a single I/O because select() above doesn't see the second, valid * event. This little loop fixes the problem by flushing the * event queue completely. */ XEvent xe; do { XNextEvent(dpy, &xe); process_event(&xe); } while (XPending(dpy)); } if (FD_ISSET(in, &tset) || buffered_input_available) { if (!record()) /* end of input */ return; } #ifdef PIPE_IPC if (!pipe_died && (FD_ISSET(out, &tset) || buffered_output_pending)) { gp_exec_event(GE_pending, 0, 0, 0, 0, 0); } #endif /* A method in which the ErrorHandler can queue plots to be removed from the linked list. This prevents the situation that could arise if the ErrorHandler directly removed plots and some other part of the program were utilizing a pointer to a plot that was destroyed. */ if (process_remove_fifo_queue) { Process_Remove_FIFO_Queue(); } } } #elif defined(CRIPPLED_SELECT) char X11_ipcpath[32]; /* * CRIPPLED_SELECT mainloop */ static void mainloop() { SELECT_TYPE_ARG1 nf, nfds, cn = ConnectionNumber(dpy); struct timeval timeout, *timer; fd_set tset; unsigned long all = (unsigned long) (-1L); XEvent xe; timeout.tv_sec = 1; timeout.tv_usec = 0; timer = &timeout; sprintf(X11_ipcpath, "/tmp/Gnuplot_%d", getppid()); nfds = cn + 1; while (1) { XFlush(dpy); /* see above */ FD_ZERO(&tset); FD_SET(cn, &tset); /* Don't wait for events if we know that input is * already sitting in a buffer. Also don't wait for * input to become available. */ if (buffered_input_available) { timeout.tv_sec = 0; timeout.tv_usec = 0; timer = &timeout; } else { timer = (struct timeval *) 0; FD_SET(in, &tset); } nfds = (cn > in) ? cn + 1 : in + 1; nf = select(nfds, SELECT_TYPE_ARG234 &tset, 0, 0, SELECT_TYPE_ARG5 timer); if (nf < 0) { if (errno == EINTR) continue; perror("gnuplot_x11: select failed"); EXIT(1); } if (nf > 0) XNoOp(dpy); if (FD_ISSET(cn, &tset)) { while (XCheckMaskEvent(dpy, all, &xe)) { process_event(&xe); } } if ((X11_ipc = fopen(X11_ipcpath, "r"))) { unlink(X11_ipcpath); record(); fclose(X11_ipc); } } } #elif defined(VMS) /*----------------------------------------------------------------------------- * VMS mainloop - Yehavi Bourvine - YEHAVI@VMS.HUJI.AC.IL *---------------------------------------------------------------------------*/ /* In VMS there is no decent Select(). hence, we have to loop inside * XGetNextEvent for getting the next X window event. In order to get input * from the master we assign a channel to SYS$INPUT and use AST's in order to * receive data. In order to exit the mainloop, we need to somehow make * XNextEvent return from within the ast. We do this with a XSendEvent() to * ourselves ! * This needs a window to send the message to, so we create an unmapped window * for this purpose. Event type XClientMessage is perfect for this, but it * appears that such messages come from elsewhere (motif window manager, * perhaps ?) So we need to check fairly carefully that it is the ast event * that has been received. */ #include <iodef.h> char STDIIN[] = "SYS$INPUT:"; short STDIINchannel, STDIINiosb[4]; struct { short size, type; char *address; } STDIINdesc; char STDIINbuffer[64]; int status; ast() { int status = sys$qio(0, STDIINchannel, IO$_READVBLK, STDIINiosb, record, 0, STDIINbuffer, sizeof(STDIINbuffer) - 1, 0, 0, 0, 0); if ((status & 0x1) == 0) EXIT(status); } Window message_window; static void mainloop() { /* dummy unmapped window for receiving internally-generated terminate * messages */ message_window = XCreateSimpleWindow(dpy, root, 0, 0, 1, 1, 1, 0, 0); STDIINdesc.size = strlen(STDIIN); STDIINdesc.type = 0; STDIINdesc.address = STDIIN; status = sys$assign(&STDIINdesc, &STDIINchannel, 0, 0, 0); if ((status & 0x1) == 0) EXIT(status); ast(); for (;;) { XEvent xe; XNextEvent(dpy, &xe); if (xe.type == ClientMessage && xe.xclient.window == message_window) { if (xe.xclient.message_type == None && xe.xclient.format == 8 && strcmp(xe.xclient.data.b, "die gnuplot die") == 0) { FPRINTF((stderr, "quit message from ast\n")); return; } else { FPRINTF((stderr, "Bogus XClientMessage event from window manager ?\n")); } } process_event(&xe); } } #else /* !(DEFAULT_X11 || CRIPPLED_SELECT || VMS */ # error You lose. No mainloop. #endif /* !(DEFAULT_X11 || CRIPPLED_SELECT || VMS */ /* delete a window / plot */ static void delete_plot(plot_struct *plot) { int i; FPRINTF((stderr, "Delete plot %d\n", plot->plot_number)); for (i = 0; i < plot->ncommands; ++i) free(plot->commands[i]); plot->ncommands = 0; if (plot->commands) free(plot->commands); plot->commands = NULL; plot->max_commands = 0; /* Free up memory for window title. */ if (plot->titlestring) { free(plot->titlestring); plot->titlestring = 0; } if (plot->window) { FPRINTF((stderr, "Destroy window 0x%x\n", plot->window)); XDestroyWindow(dpy, plot->window); plot->window = None; --windows_open; } if (stipple_initialized) { /* ULIG */ int i; for (i = 0; i < stipple_pattern_num; i++) XFreePixmap(dpy, stipple_pattern[i]); stipple_initialized = 0; } if (plot->pixmap) { XFreePixmap(dpy, plot->pixmap); plot->pixmap = None; } /* Release the colormaps here to free color resources. */ FreeColormapList(plot); } /* prepare the plot structure */ static void prepare_plot(plot_struct *plot) { int i; for (i = 0; i < plot->ncommands; ++i) free(plot->commands[i]); plot->ncommands = 0; if (!plot->posn_flags) { /* first time this window has been used - use default or -geometry * settings */ plot->posn_flags = gFlags; plot->x = gX; plot->y = gY; plot->width = gW; plot->height = gH; plot->window = None; plot->pixmap = None; #ifdef USE_MOUSE plot->gheight = gH; plot->resizing = FALSE; plot->str[0] = '\0'; plot->zoombox_on = FALSE; #endif plot->first_cmap_struct = NULL; } if (plot->window == None) { plot->cmap = current_cmap; /* color space */ pr_window(plot); #ifdef USE_MOUSE /* * set all mouse parameters * to a well-defined state. */ plot->button = 0; plot->mouse_on = TRUE; plot->x = NOT_AVAILABLE; plot->y = NOT_AVAILABLE; if (plot->str[0] != '\0') { /* if string was non-empty last time, initialize it as * almost empty one space, to prevent window resize */ plot->str[0] = ' '; plot->str[1] = '\0'; } plot->time = 0; /* XXX how should we initialize this ? XXX */ #endif } /* Release the colormaps here to free color resources. */ FreeColormapList(plot); /* Make the current colormap the first colormap in the plot. */ plot->cmap = current_cmap; /* color space */ /* We don't know that it is the same window as before, so we reset the * cursors for all windows and then define the cursor for the active * window */ plot->angle = 0; /* default is horizontal */ reset_cursor(); XDefineCursor(dpy, plot->window, cursor); } /* store a command in a plot structure */ static void store_command(char *buffer, plot_struct *plot) { char *p; if (plot->ncommands >= plot->max_commands) { plot->max_commands = plot->max_commands * 2 + 1; plot->commands = (plot->commands) ? (char **) realloc(plot->commands, plot->max_commands * sizeof(char *)) : (char **) malloc(sizeof(char *)); } p = (char *) malloc(strlen(buffer) + 1); if (!plot->commands || !p) { fputs("gnuplot: can't get memory. X11 aborted.\n", stderr); EXIT(1); } plot->commands[plot->ncommands++] = strcpy(p, buffer); } #ifndef VMS static int read_input __PROTO((void)); /* * Handle input. Use read instead of fgets because stdio buffering * causes trouble when combined with calls to select. */ static int read_input() { static int rdbuf_size = 10 * X11_COMMAND_BUFFER_LENGTH; static char rdbuf[10 * X11_COMMAND_BUFFER_LENGTH]; static int total_chars; static int rdbuf_offset; static int buf_offset; static int partial_read = 0; int fd = fileno(X11_ipc); if (!partial_read) buf_offset = 0; if (!buffered_input_available) { total_chars = read(fd, rdbuf, rdbuf_size); buffered_input_available = 1; partial_read = 0; rdbuf_offset = 0; if (total_chars == 0) return -2; if (total_chars < 0) return -1; } if (rdbuf_offset < total_chars) { while (rdbuf_offset < total_chars && buf_offset < X11_COMMAND_BUFFER_LENGTH) { char c = rdbuf[rdbuf_offset++]; buf[buf_offset++] = c; if (c == '\n') break; } if (buf_offset == X11_COMMAND_BUFFER_LENGTH) { fputs("\ngplt_x11.c: buffer overflow in read_input!\n" " X11 aborted.\n", stderr); EXIT(1); } else buf[buf_offset] = NUL; } if (rdbuf_offset == total_chars) { buffered_input_available = 0; if (buf[buf_offset - 1] != '\n') partial_read = 1; } return partial_read; } static void read_input_line __PROTO((void)); /* * Handle a whole input line, issuing an error message if a complete * read does not appear after a few tries. */ static void read_input_line() { int i_read; for (i_read = 1; read_input() == 1; i_read++) { if (i_read == 5) fprintf(stderr, "\ngplt_x11.c: A complete buffer instruction is not appearing across\n" " link. Check for system overload or driver error.\n"); }; } /* * This function builds back a palette from what x11.trm has written * into the pipe. It cheats: SMPAL_COLOR_MODE_FUNCTIONS for user defined * formulaes to transform gray into the three color components is not * implemented. If this had to be done, one would have to include all * the code for evaluating functions here too, and, even worse: how to * transmit all function definition from gnuplot to here! * To avoid this, the following is done: For grayscale, and rgbformulae * everything is easy. Gradients are more difficult: Each gradient point * is encoded in a 8-byte string (which does not include any '\n' and * transmitted here. Here the gradient is rebuilt. * Form user defined formulae x11.trm builds a special gradient: The gray * values are equally spaced and are not transmitted, only the 6 bytes for * the rgbcolor are sent. These are assembled into a gradient which is * than used in the palette. * * This function belongs completely into record(), but is quiet large so it * became a function of its own. */ static void scan_palette_from_buf(void) { t_sm_palette tpal; char cm, pos, mod; if (4 != sscanf( buf+2, "%c %c %c %d", &cm, &pos, &mod, &(tpal.use_maxcolors) ) ) { fprintf( stderr, "%s:%d error in setting palette.\n", __FILE__, __LINE__); return; } tpal.colorMode = cm; tpal.positive = pos; tpal.cmodel = mod; tpal.gradient = NULL; /* function palettes are transmitted as approximated gradients: */ if (tpal.colorMode == SMPAL_COLOR_MODE_FUNCTIONS) tpal.colorMode = SMPAL_COLOR_MODE_GRADIENT; if (tpal.colorMode == SMPAL_COLOR_MODE_CUBEHELIX) tpal.colorMode = SMPAL_COLOR_MODE_GRADIENT; switch( tpal.colorMode ) { case SMPAL_COLOR_MODE_GRAY: read_input_line(); if (1 != sscanf( buf, "%lf", &(tpal.gamma) )) { fprintf( stderr, "%s:%d error in setting palette.\n", __FILE__, __LINE__); return; } break; case SMPAL_COLOR_MODE_RGB: read_input_line(); if (3 != sscanf( buf, "%d %d %d", &(tpal.formulaR), &(tpal.formulaG), &(tpal.formulaB) )) { fprintf( stderr, "%s:%d error in setting palette.\n", __FILE__, __LINE__); return; } break; case SMPAL_COLOR_MODE_GRADIENT: { static char frac[8] = {0,0,0,0,0,0,0,0}; int i=0; read_input_line(); if (1 != sscanf( buf, "%d", &(tpal.gradient_num) )) { fprintf( stderr, "%s:%d error in setting palette.\n", __FILE__, __LINE__); return; } tpal.gradient = (gradient_struct*) malloc( tpal.gradient_num * sizeof(gradient_struct) ); assert(tpal.gradient); for( i=0; i<tpal.gradient_num; i++ ) { char *b = &(buf[12*(i%50)]); unsigned int rgb_component; /* this %50 *must* match the corresponding line in x11.trm! */ if (i%50 == 0) read_input_line(); /* Read gradient entry as 0.1234RRGGBB */ memcpy(frac, b, 6); tpal.gradient[i].pos = atof(frac); sscanf(b+6,"%2x",&rgb_component); tpal.gradient[i].col.r = (double)(rgb_component) / 255.; sscanf(b+8,"%2x",&rgb_component); tpal.gradient[i].col.g = (double)(rgb_component) / 255.; sscanf(b+10,"%2x",&rgb_component); tpal.gradient[i].col.b = (double)(rgb_component) / 255.; } break; } case SMPAL_COLOR_MODE_FUNCTIONS: fprintf( stderr, "%s:%d ooops: No function palettes for x11!\n", __FILE__, __LINE__ ); break; default: fprintf( stderr, "%s:%d ooops: Unknown colorMode '%c'.\n", __FILE__, __LINE__, (char)(tpal.colorMode) ); tpal.colorMode = SMPAL_COLOR_MODE_GRAY; break; } PaletteMake(&tpal); if (tpal.gradient) free(tpal.gradient); } /* * record - record new plot from gnuplot inboard X11 driver (Unix) */ /* Would like to change "plot" in this function to "current_plot". * "plot" is somewhat general, as though it were a local variable. * However, do a redefinition for now. */ #define plot current_plot static int record() { while (1) { int status = read_input(); if (status == -2) return 0; if (status != 0) return status; switch (*buf) { case 'G': /* enter graphics mode */ { #ifndef DISABLE_SPACE_RAISES_CONSOLE #ifdef USE_MOUSE #ifdef OS2_IPC sscanf(buf, "G%lu %li", &gnuplotXID, &ppidGnu); #else sscanf(buf, "G%lu", &gnuplotXID); #endif #endif #endif /* DISABLE_SPACE_RAISES_CONSOLE */ if (!current_plot) current_plot = Add_Plot_To_Linked_List(most_recent_plot_number); if (current_plot) prepare_plot(current_plot); #ifdef OS2_IPC if (!input_from_PM_Terminal) { /* get shared memory */ sprintf(mouseShareMemName, "\\SHAREMEM\\GP%i_Mouse_Input", (int) ppidGnu); if (DosGetNamedSharedMem(&input_from_PM_Terminal, mouseShareMemName, PAG_WRITE)) DosBeep(1440L, 1000L); /* indicates error */ semInputReady = 0; } #endif #ifdef USE_MOUSE #ifdef TITLE_BAR_DRAWING_MSG /* show a message in the wm's title bar that the * graph will be redrawn. This might be useful * for slow redrawing (large plots). The title * string is reset to the default at the end of * display(). We should make this configurable! */ if (plot && plot->window) { char *msg; char *added_text = " drawing ..."; int orig_len = (plot->titlestring ? strlen(plot->titlestring) : 0); if (msg = (char *) malloc(orig_len + strlen(added_text) + 1)) { strcpy(msg, plot->titlestring); strcat(msg, added_text); XStoreName(dpy, plot->window, msg); free(msg); } else XStoreName(dpy, plot->window, added_text + 1); } #else if (!button_pressed) { cursor_save = cursor; cursor = cursor_waiting; if (plot) XDefineCursor(dpy, plot->window, cursor); } #endif #endif /* continue; */ /* return 1; To do: Should a "return" be here? Gnuplot usually sends 'G' followed by other commands. So perhaps not needed. DJS */ } break; case 'N': /* just update the plot number */ { int itmp; if (strcspn(buf+1, " \n") && sscanf(buf, "N%d", &itmp)) { if (itmp >= 0) { most_recent_plot_number = itmp; current_plot = Add_Plot_To_Linked_List(itmp); } } return 1; } break; #ifdef EXTERNAL_X11_WINDOW case X11_GR_SET_WINDOW_ID: /* X11 window ID */ { unsigned long ultmp; if (strcspn(buf+1," \n") && sscanf(buf+1, "%lx", &ultmp)) { Window window_id = (Window) ultmp; plot_struct *tmpplot = Find_Plot_In_Linked_List_By_Window(window_id); if (tmpplot) { current_plot = tmpplot; most_recent_plot_number = tmpplot->plot_number; } else { current_plot = Add_Plot_To_Linked_List(-1); /* Use invalid plot number. */ if (current_plot) { current_plot->external_container = window_id; prepare_plot(current_plot); } } } return 1; } break; #endif case 'C': /* close the plot with given number */ { int itmp; if (strcspn(buf+1, " \n") && sscanf(buf, "C%d", &itmp)) { plot_struct *psp; if ((psp = Find_Plot_In_Linked_List_By_Number(itmp))) Remove_Plot_From_Linked_List(psp->window); } else if (current_plot) { Remove_Plot_From_Linked_List(current_plot->window); } return 1; } break; case '^': /* raise the plot with given number or the whole group */ { int itmp; if (strcspn(buf+1," \n") && sscanf(buf, "^%d", &itmp)) { plot_struct *psp; if ((psp = Find_Plot_In_Linked_List_By_Number(itmp))) { XRaiseWindow(dpy, psp->window); } } else { /* Find end of list, i.e., first created. */ plot_struct *psp = plot_list_start; while (psp != NULL) { if (psp->next_plot == NULL) break; psp = psp->next_plot; } while (psp != NULL) { XRaiseWindow(dpy, psp->window); psp = psp->prev_plot; } } return 1; } break; case 'v': /* lower the plot with given number or the whole group */ { int itmp; if (strcspn(buf+1," \n") && sscanf(buf, "v%d", &itmp)) { plot_struct *psp; if ((psp = Find_Plot_In_Linked_List_By_Number(itmp))) { XLowerWindow(dpy, psp->window); } } else if (current_plot) { plot_struct *psp = plot_list_start; while (psp != NULL) { XLowerWindow(dpy, psp->window); psp = psp->next_plot; } } return 1; } break; case 'n': /* update the plot name (title) */ { if (!current_plot) current_plot = Add_Plot_To_Linked_List(most_recent_plot_number); if (current_plot) { char *cp; if (current_plot->titlestring) free(current_plot->titlestring); if ((current_plot->titlestring = (char *) malloc(strlen(buf+1) + 1) )) { strcpy(current_plot->titlestring, buf+1); cp = current_plot->titlestring; } else cp = "<lost name>"; if (current_plot->window) XStoreName(dpy, current_plot->window, cp); } return 1; } break; case 'E': /* leave graphics mode / suspend */ if (plot) display(plot); #ifdef USE_MOUSE if (current_plot) gp_execute_GE_plotdone(plot->window); /* notify main program */ #endif return 1; case 'R': /* leave x11 mode */ reset_cursor(); return 0; case X11_GR_MAKE_PALETTE: if (have_pm3d) { char cmapidx[6] = "e"; int cm_index; cmap_struct *csp; /* Get and process palette */ scan_palette_from_buf(); /* Compute and store the resulting colormap index as a command * so that a palette change can be made on the same plot. */ csp = plot->first_cmap_struct; for (cm_index=0; csp; cm_index++) { if (csp->cmap == current_cmap) break; csp = csp->next_cmap_struct; } sprintf(cmapidx+1, "%3u%c", cm_index, '\0'); store_command(cmapidx, plot); } return 1; case X11_GR_CHECK_ENDIANESS: { /* Initialize variable in case short happens to be longer than two bytes. */ unsigned short tmp = (unsigned short) ENDIAN_VALUE; ((char *)&tmp)[0] = buf[1]; ((char *)&tmp)[1] = buf[2]; if (tmp == (unsigned short) ENDIAN_VALUE) swap_endian = 0; else swap_endian = 1; } return 1; case 'X': /* tell the driver about do_raise / persist */ { int tmp_do_raise = UNSET, tmp_persist = UNSET; int tmp_dashed = UNSET, tmp_ctrlq = UNSET; sscanf(buf, "X%d%d%d%d", &tmp_do_raise, &tmp_persist, &tmp_dashed, &tmp_ctrlq); if (UNSET != tmp_do_raise) do_raise = tmp_do_raise; if (UNSET != tmp_persist) persist = tmp_persist; if (UNSET != tmp_dashed) dashedlines = tmp_dashed; if (UNSET != tmp_ctrlq) ctrlq = tmp_ctrlq; } return 1; case 's': /* set window geometry */ { char strtmp[256]; sscanf(&buf[2], "%s", strtmp); pr_geometry(strtmp); } return 1; #ifdef USE_MOUSE case 'u': #ifdef PIPE_IPC if (!pipe_died) #endif { /* `set cursor' */ int c, x, y; sscanf(buf, "u%4d%4d%4d", &c, &x, &y); if (plot) { switch (c) { case -4: /* switch off line between ruler and mouse cursor */ DrawLineToRuler(plot); plot->ruler_lineto_on = FALSE; break; case -3: /* switch on line between ruler and mouse cursor */ if (plot->ruler_on && plot->ruler_lineto_on) break; plot->ruler_lineto_x = X(x); plot->ruler_lineto_y = Y(y); plot->ruler_lineto_on = TRUE; DrawLineToRuler(plot); break; case -2: /* warp pointer */ XWarpPointer(dpy, None /* src_w */ , plot->window /* dest_w */ , 0, 0, 0, 0, X(x), Y(y)); case -1: /* zoombox */ plot->zoombox_x1 = plot->zoombox_x2 = X(x); plot->zoombox_y1 = plot->zoombox_y2 = Y(y); plot->zoombox_on = TRUE; DrawBox(plot); break; case 0: /* standard cross-hair cursor */ cursor = cursor_default; XDefineCursor(dpy, plot->window, cursor); break; case 1: /* cursor during rotation */ cursor = cursor_exchange; XDefineCursor(dpy, plot->window, cursor); break; case 2: /* cursor during scaling */ cursor = cursor_sizing; XDefineCursor(dpy, plot->window, cursor); break; case 3: /* cursor during zooming */ cursor = cursor_zooming; XDefineCursor(dpy, plot->window, cursor); break; } if (c >= 0 && plot->zoombox_on) { /* erase zoom box */ DrawBox(plot); plot->zoombox_on = FALSE; } if (c >= 0 && plot->ruler_lineto_on) { /* erase line from ruler to cursor */ DrawLineToRuler(plot); plot->ruler_lineto_on = FALSE; } } } return 1; case 't': #ifdef PIPE_IPC if (!pipe_died) #endif { int where; char *second; if (sscanf(buf, "t%4d", &where) != 1) return 1; buf[strlen(buf) - 1] = 0; /* remove trailing \n */ if (plot) { switch (where) { case 0: DisplayCoords(plot, buf + 5); break; case 1: second = strchr(buf + 5, '\r'); if (second == NULL) { *(plot->zoombox_str1a) = '\0'; *(plot->zoombox_str1b) = '\0'; break; } *second = 0; second++; if (plot->zoombox_on) DrawBox(plot); strcpy(plot->zoombox_str1a, buf + 5); strcpy(plot->zoombox_str1b, second); if (plot->zoombox_on) DrawBox(plot); break; case 2: second = strchr(buf + 5, '\r'); if (second == NULL) { *(plot->zoombox_str2a) = '\0'; *(plot->zoombox_str2b) = '\0'; break; } *second = 0; second++; if (plot->zoombox_on) DrawBox(plot); strcpy(plot->zoombox_str2a, buf + 5); strcpy(plot->zoombox_str2b, second); if (plot->zoombox_on) DrawBox(plot); break; } } } return 1; case 'r': #ifdef PIPE_IPC if (!pipe_died) #endif { if (plot) { int x, y; DrawRuler(plot); /* erase previous ruler */ sscanf(buf, "r%4d%4d", &x, &y); if (x < 0) { DrawLineToRuler(plot); plot->ruler_on = FALSE; } else { plot->ruler_on = TRUE; plot->ruler_x = x; plot->ruler_y = y; plot->ruler_lineto_x = X(x); plot->ruler_lineto_y = Y(y); DrawLineToRuler(plot); } DrawRuler(plot); /* draw new one */ } } return 1; case 'z': #ifdef PIPE_IPC if (!pipe_died) #endif { int len = strlen(buf + 1) - 1; /* discard newline '\n' */ memcpy(selection, buf + 1, len < SEL_LEN ? len : SEL_LEN); /* terminate */ selection[len + 1 < SEL_LEN ? len + 1 : SEL_LEN - 1] = '\0'; XStoreBytes(dpy, buf + 1, len); XFlush(dpy); #ifdef EXPORT_SELECTION if (plot && exportselection) export_graph(plot); #endif } return 1; #endif #ifdef USE_MOUSE case 'Q': /* Set default font immediately and return size info through pipe */ if (buf[1] == 'G') { int scaled_hchar, scaled_vchar; char *c = &(buf[strlen(buf)-1]); while (*c <= ' ') *c-- = '\0'; strncpy(default_font, &buf[2], strlen(&buf[2])+1); pr_font(NULL); if (plot) { /* EAM FIXME - this is all out of order; initialization doesnt */ /* happen until term->graphics() is called. */ xscale = (plot->width > 0) ? plot->width / 4096. : gW / 4096.; yscale = (plot->height > 0) ? plot->height / 4096. : gH / 4096.; scaled_hchar = (1.0/xscale) * hchar; scaled_vchar = (1.0/yscale) * vchar; FPRINTF((stderr, "gplt_x11: preset default font to %s hchar = %d vchar = %d \n", default_font, scaled_hchar, scaled_vchar)); gp_exec_event(GE_fontprops, plot->width, plot->height, scaled_hchar, scaled_vchar, 0); } return 1; } /* fall through */ #endif default: if (plot) store_command(buf, plot); continue; } } if (feof(X11_ipc) || ferror(X11_ipc)) return 0; else return 1; } #undef plot #else /* VMS */ /* * record - record new plot from gnuplot inboard X11 driver (VMS) */ static struct plot_struct *plot = NULL; record() { int status; if ((STDIINiosb[0] & 0x1) == 0) EXIT(STDIINiosb[0]); STDIINbuffer[STDIINiosb[1]] = '\0'; strcpy(buf, STDIINbuffer); switch (*buf) { case 'G': /* enter graphics mode */ { if (!plot) plot = Add_Plot_To_Linked_List(most_recent_plot_number); if (plot) prepare_plot(plot); current_plot = plot; break; } case 'E': /* leave graphics mode */ if (plot) display(plot); break; case 'R': /* exit x11 mode */ FPRINTF((stderr, "received R - sending ClientMessage\n")); reset_cursor(); sys$cancel(STDIINchannel); /* this is ridiculous - cook up an event to ourselves, * in order to get the mainloop() out of the XNextEvent() call * it seems that window manager can also send clientmessages, * so put a checksum into the message */ { XClientMessageEvent event; event.type = ClientMessage; event.send_event = True; event.display = dpy; event.window = message_window; event.message_type = None; event.format = 8; strcpy(event.data.b, "die gnuplot die"); XSendEvent(dpy, message_window, False, 0, (XEvent *) & event); XFlush(dpy); } return; /* no ast */ default: if (plot) store_command(buf, plot); break; } ast(); } #endif /* VMS */ static int DrawRotatedErrorHandler(Display * display, XErrorEvent * error_event) { return 0; /* do nothing */ } static void DrawRotated(plot_struct *plot, Display *dpy, GC gc, int xdest, int ydest, const char *str, int len) { Window w = plot->window; Drawable d = plot->pixmap; double angle = plot->angle; enum JUSTIFY just = plot->jmode; int x, y; double src_x, src_y; double dest_x, dest_y; int width = gpXTextWidth(font, str, len); int height = vchar; double src_cen_x = (double)width * 0.5; double src_cen_y = (double)height * 0.5; static const double deg2rad = .01745329251994329576; /* atan2(1, 1) / 45.0; */ double sa = sin(angle * deg2rad); double ca = cos(angle * deg2rad); int dest_width = (double)height * fabs(sa) + (double)width * fabs(ca) + 2; int dest_height = (double)width * fabs(sa) + (double)height * fabs(ca) + 2; double dest_cen_x = (double)dest_width * 0.5; double dest_cen_y = (double)dest_height * 0.5; char* data = (char*) malloc(dest_width * dest_height * sizeof(char)); Pixmap pixmap_src = XCreatePixmap(dpy, root, (unsigned int)width, (unsigned int)height, 1); XImage *image_src; XImage *image_dest; XImage *image_scr; unsigned long fgpixel = 0; unsigned long bgpixel = 0; XWindowAttributes win_attrib; int xscr, yscr, xoff, yoff; unsigned int scr_width, scr_height; XErrorHandler prevErrorHandler; unsigned long gcFunctionMask = GCFunction; XGCValues gcValues; int gcCurrentFunction = 0; Status s; /* bitmapGC is static, so that is has to be initialized only once */ static GC bitmapGC = (GC) 0; /* eventually initialize bitmapGC */ if ((GC)0 == bitmapGC) { bitmapGC = XCreateGC(dpy, pixmap_src, 0, (XGCValues *) 0); XSetForeground(dpy, bitmapGC, 1); XSetBackground(dpy, bitmapGC, 0); } s = XGetGCValues(dpy, gc, gcFunctionMask|GCForeground|GCBackground, &gcValues); if (s) { /* success */ fgpixel = gcValues.foreground; bgpixel = gcValues.background; gcCurrentFunction = gcValues.function; /* save current function */ } /* set font for the bitmap GC */ if (font) gpXSetFont(dpy, bitmapGC, font->fid); /* draw string to the source bitmap */ gpXDrawImageString(dpy, pixmap_src, bitmapGC, 0, gpXGetFontascent(font), str, len); /* create XImage's of depth 1 */ /* source from pixmap */ image_src = XGetImage(dpy, pixmap_src, 0, 0, (unsigned int)width, (unsigned int)height, 1, XYPixmap /* ZPixmap, XYBitmap */ ); /* empty dest */ assert(data); memset((void*)data, 0, (size_t)dest_width * dest_height); image_dest = XCreateImage(dpy, vis, 1, XYBitmap, 0, data, (unsigned int)dest_width, (unsigned int)dest_height, 8, 0); #define RotateX(_x, _y) (( (_x) * ca + (_y) * sa + dest_cen_x)) #define RotateY(_x, _y) ((-(_x) * sa + (_y) * ca + dest_cen_y)) /* copy & rotate from source --> dest */ for (y = 0, src_y = -src_cen_y; y < height; y++, src_y++) { for (x = 0, src_x = -src_cen_x; x < width; x++, src_x++) { /* TODO: move some operations outside the inner loop (joze) */ dest_x = rint(RotateX(src_x, src_y)); dest_y = rint(RotateY(src_x, src_y)); if (dest_x >= 0 && dest_x < dest_width && dest_y >= 0 && dest_y < dest_height) XPutPixel(image_dest, (int)dest_x, (int)dest_y, XGetPixel(image_src, x, y)); } } src_cen_y = 0; /* EAM 29-Sep-2002 - vertical justification has already been done */ switch (just) { case LEFT: default: xdest -= RotateX(-src_cen_x, src_cen_y); ydest -= RotateY(-src_cen_x, src_cen_y); break; case CENTRE: xdest -= RotateX(0, src_cen_y); ydest -= RotateY(0, src_cen_y); break; case RIGHT: xdest -= RotateX(src_cen_x, src_cen_y); ydest -= RotateY(src_cen_x, src_cen_y); break; } #undef RotateX #undef RotateY if (fast_rotate) { /* This default method is a lot faster, but may corrupt the colors * underneath the rotated text if the X display Visual is PseudoColor. * EAM - August 2005 */ assert(s); /* Previous success in reading XGetGCValues() */ /* Force pixels of new text to black, background unchanged */ gcValues.function = GXand; gcValues.background = WhitePixel(dpy, scr); gcValues.foreground = BlackPixel(dpy, scr); XChangeGC(dpy, gc, gcFunctionMask|GCBackground|GCForeground, &gcValues); XPutImage(dpy, d, gc, image_dest, 0, 0, xdest, ydest, dest_width, dest_height); /* Force pixels of new text to color, background unchanged */ gcValues.function = GXor; gcValues.background = BlackPixel(dpy, scr); gcValues.foreground = fgpixel; XChangeGC(dpy, gc, gcFunctionMask|GCBackground|GCForeground, &gcValues); XPutImage(dpy, d, gc, image_dest, 0, 0, xdest, ydest, dest_width, dest_height); } else { /* Slow but sure version - grab the current screen area where the new * text will go and substitute in the pixels of the new text one by one. * NB: selected by X Resource * gnuplot*fastrotate: off */ assert(s); /* Previous success in reading XGetGCValues() */ gcValues.function = GXcopy; XChangeGC(dpy, gc, gcFunctionMask, &gcValues); s = XGetWindowAttributes(dpy, w, &win_attrib); /* compute screen coords that are within the current window */ xscr = (xdest<0)? 0 : xdest; yscr = (ydest<0)? 0 : ydest;; scr_width = dest_width; scr_height = dest_height; if (xscr + dest_width > win_attrib.width) scr_width = win_attrib.width - xscr; if (yscr + dest_height > win_attrib.height) scr_height = win_attrib.height - yscr; xoff = xscr - xdest; yoff = yscr - ydest; scr_width -= xoff; scr_height -= yoff; prevErrorHandler = XSetErrorHandler(DrawRotatedErrorHandler); image_scr = XGetImage(dpy, d, xscr, yscr, scr_width, scr_height, AllPlanes, XYPixmap); if (image_scr != 0){ /* copy from 1 bit bitmap image of text to the full depth image of screen*/ for (y = 0; y < scr_height; y++){ for (x = 0; x < scr_width; x++){ if (XGetPixel(image_dest, x + xoff, y + yoff)){ XPutPixel(image_scr, x, y, fgpixel); } } } /* copy the rotated image to the drawable d */ XPutImage(dpy, d, gc, image_scr, 0, 0, xscr, yscr, scr_width, scr_height); XDestroyImage(image_scr); } XSetErrorHandler(prevErrorHandler); } /* End slow rotatation code */ /* free resources */ XFreePixmap(dpy, pixmap_src); XDestroyImage(image_src); XDestroyImage(image_dest); if (s) { /* restore original state of gc */ gcValues.function = gcCurrentFunction; gcValues.background = bgpixel; XChangeGC(dpy, gc, gcFunctionMask|GCBackground, &gcValues); } } /* * exec_cmd - execute drawing command from inboard driver */ static void exec_cmd(plot_struct *plot, char *command) { int x, y, sw, sl, sj; char *buffer, *str; buffer = command; #ifdef X11_POLYLINE /* X11_vector(x, y) - draw vector */ if (*buffer == 'V') { sscanf(buffer, "V%4d%4d", &x, &y); if (polyline_size == 0) { polyline[polyline_size].x = X(cx); polyline[polyline_size].y = Y(cy); } if (++polyline_size >= polyline_space) { polyline_space += 100; polyline = realloc(polyline, polyline_space * sizeof(XPoint)); if (!polyline) fprintf(stderr, "Panic: cannot realloc polyline\n"); } polyline[polyline_size].x = X(x); polyline[polyline_size].y = Y(y); cx = x; cy = y; /* Limit the number of vertices in any single polyline */ if (polyline_size > max_request_size) { FPRINTF((stderr, "(display) dumping polyline size %d\n", polyline_size)); XDrawLines(dpy, plot->pixmap, *current_gc, polyline, polyline_size+1, CoordModeOrigin); polyline_size = 0; } return; } else if (polyline_size > 0) { FPRINTF((stderr, "(display) dumping polyline size %d\n", polyline_size)); XDrawLines(dpy, plot->pixmap, *current_gc, polyline, polyline_size+1, CoordModeOrigin); polyline_size = 0; } #else /* X11_vector(x, y) - draw vector */ if (*buffer == 'V') { sscanf(buffer, "V%4d%4d", &x, &y); XDrawLine(dpy, plot->pixmap, *current_gc, X(cx), Y(cy), X(x), Y(y)); cx = x; cy = y; } else #endif /* X11_move(x, y) - move */ if (*buffer == 'M') sscanf(buffer, "M%4d%4d", &cx, &cy); /* change default font (QD) encoding (QE) or current font (QF) */ else if (*buffer == 'Q') { char *c; switch (buffer[1]) { case 'F': /* Strip out just the font name */ c = &(buffer[strlen(buffer)-1]); while (*c <= ' ') *c-- = '\0'; pr_font(&buffer[2]); if (font) gpXSetFont(dpy, gc, font->fid); break; case 'E': /* Save the requested font encoding */ { int tmp; sscanf(buffer, "QE%d", &tmp); encoding = (enum set_encoding_id)tmp; } FPRINTF((stderr, "gnuplot_x11: changing encoding to %d\n", encoding)); break; case 'D': /* Save the request default font */ c = &(buffer[strlen(buffer)-1]); while (*c <= ' ') *c-- = '\0'; strncpy(default_font, &buffer[2], strlen(&buffer[2])+1); FPRINTF((stderr, "gnuplot_x11: exec_cmd() set default_font to \"%s\"\n", default_font)); break; } } /* X11_put_text(x, y, str) - draw text */ else if (*buffer == 'T') { /* Enhanced text mode added November 2003 - Ethan A Merritt */ int x_offset=0, y_offset=0, v_offset=0; switch (buffer[1]) { case 'j': /* Set start for right-justified enhanced text */ sscanf(buffer+2, "%4d%4d", &x_offset, &y_offset); plot->xLast = x_offset - (plot->xLast - x_offset); plot->yLast = y_offset - (vchar/3) / yscale; return; case 'k': /* Set start for center-justified enhanced text */ sscanf(buffer+2, "%4d%4d", &x_offset, &y_offset); plot->xLast = x_offset - 0.5*(plot->xLast - x_offset); plot->yLast = y_offset - (vchar/3) / yscale; return; case 'l': /* Set start for left-justified enhanced text */ sscanf(buffer+2, "%4d%4d", &x_offset, &y_offset); plot->xLast = x_offset; plot->yLast = y_offset - (vchar/3) / yscale; return; case 'o': /* Enhanced mode print with no update */ case 'c': /* Enhanced mode print with update to center */ case 'u': /* Enhanced mode print with update */ case 's': /* Enhanced mode update with no print */ sscanf(buffer+2, "%4d%4d", &x_offset, &y_offset); /* EAM FIXME - This code has only been tested for x_offset == 0 */ if (plot->angle != 0) { int xtmp=0, ytmp=0; xtmp += x_offset * cos((double)(plot->angle) * 0.01745); xtmp -= y_offset * sin((double)(plot->angle) * 0.01745) * yscale/xscale; ytmp += x_offset * sin((double)(plot->angle) * 0.01745) * xscale/yscale; ytmp += y_offset * cos((double)(plot->angle) * 0.01745); x_offset = xtmp; y_offset = ytmp; } x = plot->xLast + x_offset; y = plot->yLast + y_offset; str = buffer + 10; break; case 'p': /* Push (Save) position for later use */ plot->xSave = plot->xLast; plot->ySave = plot->yLast; return; case 'r': /* Pop (Restore) saved position */ plot->xLast = plot->xSave; plot->yLast = plot->ySave; return; default: sscanf(buffer, "T%4d%4d", &x, &y); v_offset = vchar/3; /* Why is this??? */ str = buffer + 9; break; } sl = strlen(str) - 1; sw = gpXTextWidth(font, str, sl); /* EAM - May 2002 Modify to allow colored text. * 1) do not force foreground of gc to be black * 2) write text to (*current_gc), rather than to gc, so that text color can be set * using pm3d mappings. */ switch (plot->jmode) { default: case LEFT: sj = 0; break; case CENTRE: sj = -sw / 2; break; case RIGHT: sj = -sw; break; } if (sl == 0) /* Pointless to draw empty string */ ; else if (buffer[1] == 's') /* Enhanced text mode reserve space only */ ; else if (plot->angle != 0) { /* rotated text */ DrawRotated(plot, dpy, *current_gc, X(x), Y(y), str, sl); } else { /* horizontal text */ gpXDrawString(dpy, plot->pixmap, *current_gc, X(x) + sj, Y(y) + v_offset, str, sl); } /* Update current text position */ if (buffer[1] == 'c') { plot->xLast = RevX(X(x) + sj + sw/2) - x_offset; plot->yLast = y - y_offset; } else if (buffer[1] != 'o') { plot->xLast = RevX(X(x) + sj + sw) - x_offset; plot->yLast = y - y_offset; if (plot->angle != 0) { /* This correction is not perfect */ plot->yLast += RevX(sw) * sin((plot->angle) * 0.01745) * xscale/yscale; plot->xLast -= RevX(sw) * (1.0 - cos((plot->angle) * 0.01745)); } } } else if (*buffer == 'F') { /* fill box */ int style, xtmp, ytmp, w, h; if (sscanf(buffer + 1, "%4d%4d%4d%4d%4d", &style, &xtmp, &ytmp, &w, &h) == 5) { /* Load selected pattern or fill into a separate gc */ if (!fill_gc) fill_gc = XCreateGC(dpy, plot->window, 0, 0); XCopyGC(dpy, *current_gc, ~0, fill_gc); x11_setfill(&fill_gc, style); /* gnuplot has origin at bottom left, but X uses top left * There may be an off-by-one (or more) error here. */ ytmp += h; /* top left corner of rectangle to be filled */ w *= xscale; h *= yscale; XFillRectangle(dpy, plot->pixmap, fill_gc, X(xtmp), Y(ytmp), w + 1, h + 1); } } /* X11_justify_text(mode) - set text justification mode */ else if (*buffer == 'J') sscanf(buffer, "J%4d", (int *) &plot->jmode); else if (*buffer == 'A') sscanf(buffer + 1, "%lf", &plot->angle); /* X11_linewidth(plot->lwidth) - set line width */ else if (*buffer == 'W') sscanf(buffer + 1, "%4d", &plot->user_width); /* X11_linetype(plot->type) - set line type */ else if (*buffer == 'L') { sscanf(buffer, "L%4d", &plot->lt); plot->lt = (plot->lt % 8) + 2; /* Fixme: no mechanism to hold width or dashstyle for LT_BACKGROUND */ if (plot->lt < 0) { /* LT_NODRAW, LT_BACKGROUND, LT_UNDEFINED */ plot->lt = -3; plot->lwidth = plot->user_width; } else { /* default width is 0 {which X treats as 1} */ plot->lwidth = widths[plot->lt] ? plot->user_width * widths[plot->lt] : plot->user_width; if ((dashedlines && dashes[plot->lt][0]) || (plot->lt == LT_AXIS+2 && dashes[LT_AXIS+2][0])) { plot->type = LineOnOffDash; XSetDashes(dpy, gc, 0, dashes[plot->lt], strlen(dashes[plot->lt])); } else { plot->type = LineSolid; } } XSetForeground(dpy, gc, plot->cmap->colors[plot->lt + 3]); XSetLineAttributes(dpy, gc, plot->lwidth, plot->type, CapButt, JoinBevel); plot->current_rgb = plot->cmap->rgbcolors[plot->lt + 3]; current_gc = &gc; } /* X11_point(number) - draw a point */ else if (*buffer == 'P') { int point; sscanf(buffer + 1, "%d %d %d", &point, &x, &y); if (point == -2) { /* set point size */ plot->px = (int) (x * xscale * pointsize); plot->py = (int) (y * yscale * pointsize); } else if (point == -1) { /* dot */ XDrawPoint(dpy, plot->pixmap, *current_gc, X(x), Y(y)); } else { unsigned char fill = 0; unsigned char upside_down_fill = 0; short upside_down_sign = 1; int delta = (plot->px + plot->py + 1)/2; /* Force line type to solid, with round ends */ XSetLineAttributes(dpy, *current_gc, plot->lwidth, LineSolid, CapRound, JoinRound); switch (point % 13) { case 0: /* do plus */ Plus[0].x1 = (short) X(x) - delta; Plus[0].y1 = (short) Y(y); Plus[0].x2 = (short) X(x) + delta; Plus[0].y2 = (short) Y(y); Plus[1].x1 = (short) X(x); Plus[1].y1 = (short) Y(y) - delta; Plus[1].x2 = (short) X(x); Plus[1].y2 = (short) Y(y) + delta; XDrawSegments(dpy, plot->pixmap, *current_gc, Plus, 2); break; case 1: /* do X */ Cross[0].x1 = (short) X(x) - delta; Cross[0].y1 = (short) Y(y) - delta; Cross[0].x2 = (short) X(x) + delta; Cross[0].y2 = (short) Y(y) + delta; Cross[1].x1 = (short) X(x) - delta; Cross[1].y1 = (short) Y(y) + delta; Cross[1].x2 = (short) X(x) + delta; Cross[1].y2 = (short) Y(y) - delta; XDrawSegments(dpy, plot->pixmap, *current_gc, Cross, 2); break; case 2: /* do star */ Star[0].x1 = (short) X(x) - delta; Star[0].y1 = (short) Y(y); Star[0].x2 = (short) X(x) + delta; Star[0].y2 = (short) Y(y); Star[1].x1 = (short) X(x); Star[1].y1 = (short) Y(y) - delta; Star[1].x2 = (short) X(x); Star[1].y2 = (short) Y(y) + delta; Star[2].x1 = (short) X(x) - delta; Star[2].y1 = (short) Y(y) - delta; Star[2].x2 = (short) X(x) + delta; Star[2].y2 = (short) Y(y) + delta; Star[3].x1 = (short) X(x) - delta; Star[3].y1 = (short) Y(y) + delta; Star[3].x2 = (short) X(x) + delta; Star[3].y2 = (short) Y(y) - delta; XDrawSegments(dpy, plot->pixmap, *current_gc, Star, 4); break; case 3: /* do box */ XDrawRectangle(dpy, plot->pixmap, *current_gc, X(x) - delta, Y(y) - delta, (delta + delta), (delta + delta)); XDrawPoint(dpy, plot->pixmap, *current_gc, X(x), Y(y)); break; case 4: /* filled box */ XFillRectangle(dpy, plot->pixmap, *current_gc, X(x) - delta, Y(y) - delta, (delta + delta), (delta + delta)); break; case 5: /* circle */ XDrawArc(dpy, plot->pixmap, *current_gc, X(x) - delta, Y(y) - delta, 2 * delta, 2 * delta, 0, 23040 /* 360 * 64 */); XDrawPoint(dpy, plot->pixmap, *current_gc, X(x), Y(y)); break; case 6: /* filled circle */ XFillArc(dpy, plot->pixmap, *current_gc, X(x) - delta, Y(y) - delta, 2 * delta, 2 * delta, 0, 23040 /* 360 * 64 */); break; case 10: /* filled upside-down triangle */ upside_down_fill = 1; /* FALLTHRU */ case 9: /* do upside-down triangle */ upside_down_sign = (short)-1; case 8: /* filled triangle */ fill = 1; /* FALLTHRU */ case 7: /* do triangle */ { short temp_x, temp_y; temp_x = (short) (1.33 * (double) delta + 0.5); temp_y = (short) (1.33 * (double) delta + 0.5); Triangle[0].x = (short) X(x); Triangle[0].y = (short) Y(y) - upside_down_sign * temp_y; Triangle[1].x = (short) temp_x; Triangle[1].y = (short) upside_down_sign * 2 * delta; Triangle[2].x = (short) -(2 * temp_x); Triangle[2].y = (short) 0; Triangle[3].x = (short) temp_x; Triangle[3].y = (short) -(upside_down_sign * 2 * delta); if ((upside_down_sign == 1 && fill) || upside_down_fill) { XFillPolygon(dpy, plot->pixmap, *current_gc, Triangle, 4, Convex, CoordModePrevious); } else { XDrawLines(dpy, plot->pixmap, *current_gc, Triangle, 4, CoordModePrevious); XDrawPoint(dpy, plot->pixmap, *current_gc, X(x), Y(y)); } } break; case 12: /* filled diamond */ fill = 1; /* FALLTHRU */ case 11: /* do diamond */ Diamond[0].x = (short) X(x) - delta; Diamond[0].y = (short) Y(y); Diamond[1].x = (short) delta; Diamond[1].y = (short) -delta; Diamond[2].x = (short) delta; Diamond[2].y = (short) delta; Diamond[3].x = (short) -delta; Diamond[3].y = (short) delta; Diamond[4].x = (short) -delta; Diamond[4].y = (short) -delta; /* * Should really do a check with XMaxRequestSize() */ if (fill) { XFillPolygon(dpy, plot->pixmap, *current_gc, Diamond, 5, Convex, CoordModePrevious); } else { XDrawLines(dpy, plot->pixmap, *current_gc, Diamond, 5, CoordModePrevious); XDrawPoint(dpy, plot->pixmap, *current_gc, X(x), Y(y)); } break; } /* Restore original line style */ XSetLineAttributes(dpy, *current_gc, plot->lwidth, plot->type, CapButt, JoinBevel); } } else if (*buffer == X11_GR_SET_LINECOLOR) { int lt; sscanf(buffer + 1, "%4d", <); lt = (lt % 8) + 2; if (lt < 0) /* LT_NODRAW, LT_BACKGROUND, LT_UNDEFINED */ lt = -3; XSetForeground(dpy, gc, plot->cmap->colors[lt + 3]); plot->current_rgb = plot->cmap->rgbcolors[lt + 3]; current_gc = &gc; } else if (*buffer == X11_GR_SET_RGBCOLOR) { int rgb255color; XColor xcolor; sscanf(buffer + 1, "%x", &rgb255color); xcolor.red = (double)(0xffff) * (double)((rgb255color >> 16) & 0xff) /255.; xcolor.green = (double)(0xffff) * (double)((rgb255color >> 8) & 0xff) /255.; xcolor.blue = (double)(0xffff) * (double)(rgb255color & 0xff) /255.; FPRINTF((stderr, "gplt_x11: got request for color %d %d %d\n", xcolor.red, xcolor.green, xcolor.blue)); if (XAllocColor(dpy, plot->cmap->colormap, &xcolor)) { XSetForeground(dpy, gc, xcolor.pixel); plot->current_rgb = rgb255color; } else { FPRINTF((stderr, " failed to allocate color\n")); } current_gc = &gc; } else if (*buffer == X11_GR_SET_COLOR) { /* set color */ if (have_pm3d) { /* ignore, if your X server is not supported */ double gray; sscanf(buffer + 1, "%lf", &gray); PaletteSetColor(plot, gray); current_gc = &gc; } } else if (*buffer == X11_GR_BINARY_COLOR) { /* set color */ if (have_pm3d) { /* ignore, if your X server is not supported */ /* This command will fit within a single buffer so it doesn't * need to be so elaborate. */ unsigned char *iptr; float gray; unsigned int i_remaining; char *bptr; TBOOLEAN code_detected = 0; iptr = (unsigned char *) &gray; i_remaining = sizeof(gray); /* Decode and reconstruct the data. */ for (bptr = buffer + 1; i_remaining; ) { unsigned char uctmp = *bptr++; if (code_detected) { code_detected = 0; *iptr++ = uctmp - 1 + SET_COLOR_TRANSLATION_CHAR; i_remaining--; } else { if ( uctmp == SET_COLOR_CODE_CHAR ) { code_detected = 1; } else { *iptr++ = uctmp + SET_COLOR_TRANSLATION_CHAR; i_remaining--; } } } if (swap_endian) { byteswap((char *)&gray, sizeof(gray)); } PaletteSetColor(plot, (double)gray); current_gc = &gc; } } else if (*buffer == X11_GR_FILLED_POLYGON) { /* filled polygon */ if (have_pm3d) { /* ignore, if your X server is not supported */ static XPoint *points = NULL; static int st_npoints = 0; static int saved_npoints = -1, saved_i = -1; /* HBB 20010919 */ int i, npoints, style; char *ptr = buffer + 1; sscanf(ptr, "%4d", &npoints); if (npoints > 0) { ptr += 4; sscanf(ptr, "%4d", &style); } /* HBB 20010919: Implement buffer overflow protection by * breaking up long lines */ if (npoints == -1) { /* This is a continuation line. */ if (saved_npoints < 100) { fprintf(stderr, "gnuplot_x11: filled_polygon() protocol error\n"); EXIT(1); } /* Continue filling at end of previous list: */ i = saved_i; npoints = saved_npoints; } else { saved_npoints = npoints; i = 0; } ptr += 4; if (npoints > st_npoints) { XPoint *new_points = realloc(points, sizeof(XPoint) * npoints); st_npoints = npoints; if (!new_points) { perror("gnuplot_x11: exec_cmd()->points"); EXIT(1); } points = new_points; } while (*ptr != 'x' && i < npoints) { /* not end-of-line marker */ sscanf(ptr, "%4d%4d", &x, &y); ptr += 8; points[i].x = X(x); points[i].y = Y(y); i++; } if (i >= npoints) { /* Load selected pattern or fill into a separate gc */ if (!fill_gc) fill_gc = XCreateGC(dpy, plot->window, 0, 0); XCopyGC(dpy, *current_gc, ~0, fill_gc); x11_setfill(&fill_gc, style); XFillPolygon(dpy, plot->pixmap, fill_gc, points, npoints, Nonconvex, CoordModeOrigin); /* Flag this continuation line as closed */ saved_npoints = saved_i = -1; } else { /* Store how far we got: */ saved_i = i; } } } else if (*buffer == X11_GR_BINARY_POLYGON) { /* filled polygon */ if (have_pm3d) { /* ignore, if your X server is not supported */ static TBOOLEAN transferring = 0; static unsigned char *iptr; static int int_cache[2]; static unsigned int i_remaining; unsigned short i_buffer; char *bptr; static TBOOLEAN code_detected = 0; static XPoint *points = NULL; static int st_npoints = 0; static int npoints = 0, style = 0; /* The first value read will be the number of points or the number of * points followed by style. Set up parameters to point to npoints. */ if (!transferring) { iptr = (unsigned char *) int_cache; i_remaining = sizeof(int_cache); } i_buffer = BINARY_MAX_CHAR_PER_TRANSFER; /* Decode and reconstruct the data. */ for (bptr = &buffer[1]; i_buffer && i_remaining; i_buffer--) { unsigned char uctmp = *bptr++; if (code_detected) { code_detected = 0; *iptr++ = uctmp - 1 + FILLED_POLYGON_TRANSLATION_CHAR; i_remaining--; } else { if ( uctmp == FILLED_POLYGON_CODE_CHAR ) { code_detected = 1; } else { *iptr++ = uctmp + FILLED_POLYGON_TRANSLATION_CHAR; i_remaining--; } } if(!i_remaining && !transferring) { /* The number of points was just read. Now set up points array and continue. */ if (swap_endian) { byteswap((char *)&int_cache[0], sizeof(int)); byteswap((char *)&int_cache[1], sizeof(int)); } npoints = int_cache[0]; style = int_cache[1]; if (npoints > st_npoints) { XPoint *new_points = realloc(points, npoints*2*sizeof(int)); st_npoints = npoints; if (!new_points) { perror("gnuplot_x11: exec_cmd()->points"); EXIT(1); } points = new_points; } i_remaining = npoints*2*sizeof(int); iptr = (unsigned char *) points; transferring = 1; } } if (!i_remaining) { int i; transferring = 0; /* If the byte order needs to be swapped, do so. */ if (swap_endian) { i = 2*npoints; for (i--; i >= 0; i--) { byteswap((char *)&((int *)points)[i], sizeof(int)); } } /* Convert the ints to XPoint format. This looks like it tramples * on itself, but the XPoint x and y are smaller than an int. */ for (i=0; i < npoints; i++) { points[i].x = X( ((int *)points)[2*i] ); points[i].y = Y( ((int *)points)[2*i+1] ); } /* Load selected pattern or fill into a separate gc */ if (!fill_gc) fill_gc = XCreateGC(dpy, plot->window, 0, 0); XCopyGC(dpy, *current_gc, ~0, fill_gc); x11_setfill(&fill_gc, style); XFillPolygon(dpy, plot->pixmap, fill_gc, points, npoints, Nonconvex, CoordModeOrigin); } } } else if (*buffer == X11_GR_IMAGE) { /* image */ static unsigned char *iptr; static TBOOLEAN transferring = 0; static unsigned short *image; static int M, N; static int pixel_1_1_x, pixel_1_1_y, pixel_M_N_x, pixel_M_N_y; static int visual_1_1_x, visual_1_1_y, visual_M_N_x, visual_M_N_y; static int color_mode; static unsigned int i_remaining; /* ignore, if your X server is not supported */ if (!have_pm3d) return; /* These might work better as fuctions, but defines will do for now. */ #define ERROR_NOTICE(str) "\nGNUPLOT (gplt_x11): " str #define ERROR_NOTICE_NEWLINE(str) "\n " str if (!transferring) { /* Get variables. */ if (11 != sscanf( &buffer[1], "%x %x %x %x %x %x %x %x %x %x %x", &M, &N, &pixel_1_1_x, &pixel_1_1_y, &pixel_M_N_x, &pixel_M_N_y, &visual_1_1_x, &visual_1_1_y, &visual_M_N_x, &visual_M_N_y, &color_mode)) { fprintf(stderr, ERROR_NOTICE("Couldn't read image parameters correctly.\n\n")); } else { /* Number of symbols depends upon whether it is color or palette lookup. */ i_remaining = M*N*sizeof(image[0]); if (color_mode == IC_RGB) i_remaining *= 3; else if (color_mode == IC_RGBA) i_remaining *= 4; if (!i_remaining) { fprintf(stderr, ERROR_NOTICE("Image of size zero.\n\n")); } else { image = (unsigned short *) malloc(i_remaining); if (image) { iptr = (unsigned char *) image; transferring = 1; } else { fprintf(stderr, ERROR_NOTICE("Cannot allocate memory for image.\n\n")); } } } } else { unsigned short i_buffer; char *bptr; static TBOOLEAN code_detected = 0; i_buffer = BINARY_MAX_CHAR_PER_TRANSFER; /* Decode and reconstruct the data. */ for (bptr = &buffer[1]; i_buffer && i_remaining; i_buffer--) { unsigned char uctmp = *bptr++; if (code_detected) { code_detected = 0; *iptr++ = uctmp - 1 + IMAGE_TRANSLATION_CHAR; i_remaining--; } else { if (uctmp == IMAGE_CODE_CHAR) { code_detected = 1; } else { *iptr++ = uctmp + IMAGE_TRANSLATION_CHAR; i_remaining--; } } } if (!i_remaining) { /* Expand or contract the image into a new image and place this on the screen. */ static unsigned short R_msb_mask=0, R_rshift, R_lshift; static unsigned short G_msb_mask, G_rshift, G_lshift; static unsigned short B_msb_mask, B_rshift, B_lshift; static unsigned long prev_red_mask, prev_green_mask, prev_blue_mask; #define LET_XPUTPIXEL_SWAP_BYTES 1 #if !LET_XPUTPIXEL_SWAP_BYTES static TBOOLEAN swap_image_bytes = FALSE; #endif TBOOLEAN create_image = FALSE; #define SINGLE_PALETTE_BIT_SHIFT 0 /* Discard over time, 16aug2004 */ #if SINGLE_PALETTE_BIT_SHIFT static int prev_allocated=0; static short palette_bit_shift=0; #endif transferring = 0; /* If the byte order needs to be swapped, do so. */ if (swap_endian) { int i = M*N; if (color_mode == IC_RGB) i *= 3; else if (color_mode == IC_RGBA) i *= 4; for (i--; i >= 0; i--) { /* The assumption is that image data through the pipe is 16 bits. */ byteswap2(&image[i]); } } if (color_mode == IC_PALETTE) { #if SINGLE_PALETTE_BIT_SHIFT /* If the palette size is 2 to some power then a single bit shift would work. * The multiply/shift method doesn't seem noticably slower and generally works * with any size pallete. Keep this around for the time being in case some * use for it comes up. */ /* Initialize the palette shift, or if the palette size changes then update the shift. */ if (!palette_bit_shift || (plot->cmap->allocated != prev_allocated)) { short i_bits, n_colors; prev_allocated = plot->cmap->allocated; for (palette_bit_shift = 16, n_colors = 1; palette_bit_shift > 0; palette_bit_shift--) { if (n_colors >= plot->cmap->allocated) {break;} n_colors <<= 1; } } #endif create_image = TRUE; } else { switch( vis->class ) { static char *display_error_text_after = " display class cannot use component" ERROR_NOTICE_NEWLINE("data. Try palette mode.\n\n"); case TrueColor: /* This algorithm for construction of pixel values from the RGB components * doesn't look to be the most portable. However, it tries to be. It * gets the red/green/blue masks from the X11 information and generates * appropriate shifts and masks from that. The X11 documentation mentions * something about using the masks in some odd way to generate an index * for a color table. It all seemed like a bother for no benefit however. * Certainly we don't want to have only a few bits of color, and we don't * want to have some huge color table. My feeling on the matter is to * just pack bits according to the masks that X11 indicates. If someone * finds they have a peculiar display type that doesn't work, that can be * considered when and if it happens. */ /* Get the color mask information and compute the proper bit shifts, but only upon * first call or if the masks change. I'm not sure if it is necessary to check if * the masks changed, but I left it in as a safeguard in case there is some strange * system out there somewhere. */ if (!R_msb_mask || (vis->red_mask != prev_red_mask) || (vis->green_mask != prev_green_mask) || (vis->blue_mask != prev_blue_mask)) { short R_bits, G_bits, B_bits, min_bits; prev_red_mask = vis->red_mask; prev_green_mask = vis->green_mask; prev_blue_mask = vis->blue_mask; R_msb_mask = BitMaskDetails(vis->red_mask, &R_rshift, &R_lshift); G_msb_mask = BitMaskDetails(vis->green_mask, &G_rshift, &G_lshift); B_msb_mask = BitMaskDetails(vis->blue_mask, &B_rshift, &B_lshift); /* Graphics info in case strange behavior occurs in a particular system. */ FPRINTF((stderr, "\n\nvis->visualid: 0x%x vis->class: %d vis->bits_per_rgb: %d\n", (int)vis->visualid, vis->class, vis->bits_per_rgb)); FPRINTF((stderr, "vis->red_mask: %lx vis->green_mask: %lx vis->blue_mask: %lx\n", vis->red_mask, vis->green_mask, vis->blue_mask)); FPRINTF((stderr, "ImageByteOrder: %d\n\n", ImageByteOrder(dpy))); R_bits = 32-R_rshift-R_lshift; G_bits = 32-G_rshift-G_lshift; B_bits = 32-B_rshift-B_lshift; min_bits = GPMIN(GPMIN(R_bits, G_bits), B_bits); if (R_bits > min_bits) { R_msb_mask >>= (R_bits-min_bits); R_lshift += (R_bits-min_bits); R_bits = min_bits; } if (G_bits > min_bits) { G_msb_mask >>= (G_bits-min_bits); G_lshift += (G_bits-min_bits); G_bits = min_bits; } if (B_bits > min_bits) { B_msb_mask >>= (B_bits-min_bits); B_lshift += (B_bits-min_bits); B_bits = min_bits; } R_rshift = 16-R_bits; G_rshift = 16-G_bits; B_rshift = 16-B_bits; #if !LET_XPUTPIXEL_SWAP_BYTES /* Now deal with the byte order issue. */ if (ImageByteOrder(dpy)) { /* If the bit field for each channel is 8 bits, the masks can be rearranged instead * of having to actually perform a byte order swap on the image data. */ if ((R_bits == 8) && (G_bits == 8) && (B_bits == 8)) { R_lshift = 24 - R_lshift; G_lshift = 24 - G_lshift; B_lshift = 24 - B_lshift; swap_image_bytes = FALSE; } else { swap_image_bytes = TRUE; } } else { swap_image_bytes = FALSE; } #endif } create_image = TRUE; break; case PseudoColor: fprintf(stderr, ERROR_NOTICE("PseudoColor")); fputs(display_error_text_after,stderr); break; case GrayScale: fprintf(stderr, ERROR_NOTICE("GrayScale")); fputs(display_error_text_after,stderr); break; case StaticColor: fprintf(stderr, ERROR_NOTICE("StaticColor")); fputs(display_error_text_after,stderr); break; case StaticGray: fprintf(stderr, ERROR_NOTICE("StaticGray")); fputs(display_error_text_after,stderr); break; case DirectColor: fprintf(stderr, ERROR_NOTICE("DirectColor display class currently") ERROR_NOTICE_NEWLINE("not supported.\n\n")); break; default: fprintf(stderr, ERROR_NOTICE("Unknown X11 display class.\n\n")); break; } } if (create_image) { int M_pixel, N_pixel; int M_view, N_view; int pixel_1_1_x_plot, pixel_1_1_y_plot, pixel_M_N_x_plot, pixel_M_N_y_plot; int view_1_1_x_plot, view_1_1_y_plot, view_M_N_x_plot, view_M_N_y_plot; int final_1_1_x_plot, final_1_1_y_plot; int i_start, j_start; int itmp; /* Compute the image extent with sanity check. */ pixel_1_1_x_plot = X(pixel_1_1_x); pixel_M_N_x_plot = X(pixel_M_N_x); M_pixel = pixel_M_N_x_plot - pixel_1_1_x_plot; if (M_pixel < 0) { M_pixel = -M_pixel; itmp = pixel_1_1_x_plot; pixel_1_1_x_plot = pixel_M_N_x_plot; pixel_M_N_x_plot = itmp; } pixel_1_1_y_plot = Y(pixel_1_1_y); pixel_M_N_y_plot = Y(pixel_M_N_y); N_pixel = pixel_M_N_y_plot - pixel_1_1_y_plot; if (N_pixel < 0) { N_pixel = -N_pixel; itmp = pixel_1_1_y_plot; pixel_1_1_y_plot = pixel_M_N_y_plot; pixel_M_N_y_plot = itmp; } /* Compute the visual extent of the plot with sanity check. */ view_1_1_x_plot = X(visual_1_1_x); view_M_N_x_plot = X(visual_M_N_x); if (view_M_N_x_plot < view_1_1_x_plot) { itmp = view_1_1_x_plot; view_1_1_x_plot = view_M_N_x_plot; view_M_N_x_plot = itmp; } view_1_1_y_plot = Y(visual_1_1_y); view_M_N_y_plot = Y(visual_M_N_y); if (view_M_N_y_plot < view_1_1_y_plot) { itmp = view_1_1_y_plot; view_1_1_y_plot = view_M_N_y_plot; view_M_N_y_plot = itmp; } /* Determine parameters for the image that will be built and put on screen. */ itmp = view_1_1_x_plot - pixel_1_1_x_plot; if (itmp > 0) { i_start = itmp; final_1_1_x_plot = view_1_1_x_plot; } else { i_start = 0; final_1_1_x_plot = pixel_1_1_x_plot; } itmp = pixel_M_N_x_plot - view_M_N_x_plot; if (itmp > 0) { M_view = M_pixel - itmp - i_start; } else { M_view = M_pixel - i_start; } itmp = view_1_1_y_plot - pixel_1_1_y_plot; if (itmp > 0) { j_start = itmp; final_1_1_y_plot = view_1_1_y_plot; } else { j_start = 0; final_1_1_y_plot = pixel_1_1_y_plot; } itmp = pixel_M_N_y_plot - view_M_N_y_plot; if (itmp > 0) { N_view = N_pixel - itmp - j_start; } else { N_view = N_pixel - j_start; } if ((M_view > 0) && (N_view > 0)) { char *sample_data; short sample_data_size; int i_view, j_view; /* Determine if 2 bytes is sufficient or 4 bytes are necessary for color image data. */ sample_data_size = (dep > 16) ? 4 : 2; /* Expand or compress the original image to the pixels it will occupy on the screen. */ sample_data = (char *) malloc(M_view*N_view*sample_data_size); if (sample_data) { XImage *image_src = NULL; XImage *image_dest; /* Create an initialized image object. */ image_dest = XCreateImage(dpy, vis, dep, ZPixmap, 0, sample_data, M_view, N_view, 8*sample_data_size, M_view*sample_data_size); if (!image_dest) { fputs("gnuplot_x11: can't get memory for image object.\n", stderr); EXIT(1); } /* Get the drawable image if using alpha blending. */ if (color_mode == IC_RGBA) image_src = XGetImage(dpy, plot->pixmap, final_1_1_x_plot, final_1_1_y_plot, M_view, N_view, AllPlanes, ZPixmap); /* Fill in the output image data by decimating or repeating the input image data. */ for (j_view=0; j_view < N_view; j_view++) { int j = ((j_view+j_start) * N) / N_pixel; int row_start = j*M; for (i_view=0; i_view < M_view; i_view++) { int i = ((i_view+i_start) * M) / M_pixel; if (color_mode == IC_PALETTE) { #if SINGLE_PALETTE_BIT_SHIFT /* If the palette size is 2 to some power then a single bit shift would work. * The multiply/shift method doesn't seem noticably slower and generally works * with any size pallete. Keep this around for the time being in case some * use for it comes up. */ unsigned long pixel = plot->cmap->pixels[image[row_start + i]>>palette_bit_shift]; #else /* The methods below avoid using floating point. The basic idea is to multiply * the palette size by the "normalized" data coming across the pipe. (I think * some DSP people call this Q1 or Q0 format, or something like that.) Following * this multiplication by division by 2^16 gives the final answer. Most moderately * advanced CPUs have bit shifting. The first method uses this. However, a bit * shift isn't necessary because we can just take the top word of a two word * number and we've effectively divided by 2^16. The second method uses this. * However, my guess is that C compilers more effeciently translate the first * method with the bit shift than the second method which pulls out the top word. * (There is one instruction less for the shift version than the word selection * version on gcc for x86.) */ #if 1 unsigned long pixel; unsigned short index = (plot->cmap->allocated * (unsigned long) image[row_start + i]) >> 16; pixel = plot->cmap->pixels[index]; #else unsigned long index; unsigned long pixel; index = plot->cmap->allocated * (unsigned long) image[row_start + i]; pixel = plot->cmap->pixels[((unsigned short *)&index)[1]]; #endif #endif XPutPixel(image_dest, i_view, j_view, pixel); } else if (color_mode == IC_RGB) { int index3 = 3*(row_start + i); unsigned long pixel = ((unsigned int)((image[index3++]>>R_rshift)&R_msb_mask)) << R_lshift; pixel |= ((unsigned int)((image[index3++]>>G_rshift)&G_msb_mask)) << G_lshift; pixel |= ((unsigned int)((image[index3]>>B_rshift)&B_msb_mask)) << B_lshift; XPutPixel(image_dest, i_view, j_view, pixel); } else { /* EAM - I'm confused as to where the scaling happens, but by the time * we arrive here, RGB components run 0-0xffff but A runs 0-0xff */ int index4 = 4*(row_start + i); double alpha = (double)(image[index4 + 3] & 0xff) / 255.; /* Decompose existing pixel, i.e., reverse process. */ unsigned long pixel = XGetPixel(image_src, i_view, j_view); unsigned int red = ((pixel>>R_lshift)&R_msb_mask) << R_rshift; unsigned int green = ((pixel>>G_lshift)&G_msb_mask) << G_rshift; unsigned int blue = ((pixel>>B_lshift)&B_msb_mask) << B_rshift; /* Apply alpha blending. */ red = (alpha * image[index4++] + (1.-alpha) * red); green = (alpha * image[index4++] + (1.-alpha) * green); blue = (alpha * image[index4] + (1.-alpha) * blue); pixel = ((unsigned int)((red>>R_rshift)&R_msb_mask)) << R_lshift; pixel |= ((unsigned int)((green>>G_rshift)&G_msb_mask)) << G_lshift; pixel |= ((unsigned int)((blue>>B_rshift)&B_msb_mask)) << B_lshift; XPutPixel(image_dest, i_view, j_view, pixel); } } } #if !LET_XPUTPIXEL_SWAP_BYTES /* Swap the image byte order if necessary. */ if (swap_image_bytes) { int i_swap = M_view*N_view - 1; if (sample_data_size == 2) { for (; i_swap >= 0; i_swap--) { byteswap2(&(((unsigned short *)sample_data)[i_swap])); } } else { for (; i_swap >= 0; i_swap--) { byteswap4(&(((unsigned int *)sample_data)[i_swap])); } } } #endif /* Copy the image to the drawable d. */ XPutImage(dpy, plot->pixmap, gc, image_dest, 0, 0, final_1_1_x_plot, final_1_1_y_plot, M_view, N_view); /* Free resources. */ XDestroyImage(image_dest); if (color_mode == IC_RGBA) XDestroyImage(image_src); /* XDestroyImage frees the sample_data memory, so no "free" here. */ } else { fprintf(stderr, ERROR_NOTICE("Could not allocate memory for image.\n\n")); } } } /* image was not used as part of X resource, so must "free" here. */ free(image); } } } #if defined(USE_MOUSE) && defined(MOUSE_ALL_WINDOWS) /* Axis scaling information to save for later mouse clicks */ else if (*buffer == 'S') { int axis, axis_mask; sscanf(&buffer[1], "%d %d", &axis, &axis_mask); if (axis == -2) { plot->almost2d = axis_mask; } else if (axis < 0) { plot->axis_mask = axis_mask; } else if (axis < 2*SECOND_AXES) { sscanf(&buffer[1], "%d %lg %d %lg %lg", &axis, &(plot->axis_scale[axis].min), &(plot->axis_scale[axis].term_lower), &(plot->axis_scale[axis].term_scale), &(plot->axis_scale[axis].logbase)); FPRINTF((stderr, "gnuplot_x11: axis %d scaling %16.6lg %14d %16.6lg %16.6lg\n", axis, plot->axis_scale[axis].min, plot->axis_scale[axis].term_lower, plot->axis_scale[axis].term_scale, plot->axis_scale[axis].logbase)); } } #endif /* Switch to a different color map */ else if (*buffer == 'e') { if (have_pm3d) { /* Get colormap index and choose find the appropriate cmap */ int cm_index, i; cmap_struct *csp; sscanf(&buffer[1], "%u", &cm_index); csp = plot->first_cmap_struct; for (i=0; i < cm_index; i++) csp = csp->next_cmap_struct; plot->cmap = csp->cmap; } } else { fprintf(stderr, "gnuplot_x11: unknown command <%s>\n", buffer); } } /* * display - display a stored plot */ static void display(plot_struct *plot) { int n; FPRINTF((stderr, "Display %d ; %d commands\n", plot->plot_number, plot->ncommands)); if (plot->ncommands == 0) return; /* set scaling factor between internal driver & window geometry */ xscale = plot->width / 4096.0; yscale = GRAPH_HEIGHT(plot) / 4096.0; /* initial point sizes, until overridden with P7xxxxyyyy */ plot->px = (int) (xscale * pointsize); plot->py = (int) (yscale * pointsize); /* create new pixmap & GC */ if (plot->pixmap == None) { FPRINTF((stderr, "Create pixmap %d : %dx%dx%d\n", plot->plot_number, plot->width, PIXMAP_HEIGHT(plot), dep)); plot->pixmap = XCreatePixmap(dpy, root, plot->width, PIXMAP_HEIGHT(plot), dep); } if (gc) XFreeGC(dpy, gc); gc = XCreateGC(dpy, plot->pixmap, 0, (XGCValues *) 0); if (font) gpXSetFont(dpy, gc, font->fid); XSetFillStyle(dpy, gc, FillSolid); /* initialize stipple for filled boxes (ULIG) */ if (!stipple_initialized) { int i; for (i = 0; i < stipple_pattern_num; i++) stipple_pattern[i] = XCreateBitmapFromData(dpy, plot->pixmap, stipple_pattern_bits[i], stipple_pattern_width, stipple_pattern_height); stipple_initialized = 1; } /* set pixmap background */ XSetForeground(dpy, gc, plot->cmap->colors[0]); XFillRectangle(dpy, plot->pixmap, gc, 0, 0, plot->width, PIXMAP_HEIGHT(plot) + vchar); XSetBackground(dpy, gc, plot->cmap->colors[0]); if (plot->window == None) pr_window(plot); /* top the window but don't put keyboard or mouse focus into it. */ if (do_raise) XMapRaised(dpy, plot->window); /* momentarily clear the window first if requested */ if (Clear) { XClearWindow(dpy, plot->window); XFlush(dpy); } /* loop over accumulated commands from inboard driver */ for (n = 0; n < plot->ncommands; n++) { exec_cmd(plot, plot->commands[n]); } #ifdef EXPORT_SELECTION if (exportselection) export_graph(plot); #endif UpdateWindow(plot); #ifdef USE_MOUSE #ifdef TITLE_BAR_DRAWING_MSG if (plot->window) { /* restore default window title */ char *cp = plot->titlestring; if (!cp) cp = ""; XStoreName(dpy, plot->window, cp); } #else if (!button_pressed) { cursor = cursor_save ? cursor_save : cursor_default; cursor_save = (Cursor)0; XDefineCursor(dpy, plot->window, cursor); } #endif #endif } static void UpdateWindow(plot_struct * plot) { #ifdef USE_MOUSE XEvent event; #endif /* CRUFT CHECK 17jul2006. I added a "None == plot->pixmap" * to this test because I believe it may not be necessary * to do anything if there is no Pixmap yet. */ if (None == plot->window || None == plot->pixmap) { return; } XSetWindowBackgroundPixmap(dpy, plot->window, plot->pixmap); XClearWindow(dpy, plot->window); #ifdef USE_MOUSE EventuallyDrawMouseAddOns(plot); XFlush(dpy); /* XXX discard expose events. This is a kludge for * preventing the event dispatcher calling UpdateWindow() * and the latter again generating expose events, which * again would trigger the event dispatcher ... (joze) XXX */ while (XCheckWindowEvent(dpy, plot->window, ExposureMask, &event)) /* EMPTY */ ; #endif } static void CmapClear(cmap_t * cmap_ptr) { cmap_ptr->total = (int) 0; cmap_ptr->allocated = (int) 0; cmap_ptr->pixels = (unsigned long *) 0; } static void RecolorWindow(plot_struct * plot) { cmap_struct **cspp = &plot->first_cmap_struct; cmap_struct *csp = plot->first_cmap_struct; while (csp) { if (csp->cmap == plot->cmap) break; cspp = &(csp->next_cmap_struct); csp = csp->next_cmap_struct; } if (!csp) { /* This colormap is not in the list, add it. */ *cspp = (cmap_struct *) malloc(sizeof(cmap_struct)); if (*cspp) { /* Initialize structure variables. */ memset((void*)*cspp, 0, sizeof(cmap_struct)); (*cspp)->cmap = plot->cmap; } else { fprintf(stderr, ERROR_NOTICE("Could not allocate memory for cmap_struct.\n\n")); return; } } if (None != plot->window) { XSetWindowColormap(dpy, plot->window, plot->cmap->colormap); XSetWindowBackground(dpy, plot->window, plot->cmap->colors[0]); XSetWindowBorder(dpy, plot->window, plot->cmap->colors[1]); #ifdef USE_MOUSE if (gc_xor) { XFreeGC(dpy, gc_xor); gc_xor = (GC) 0; GetGCXor(plot, &gc_xor); /* recreate gc_xor */ } #endif } } static void FreeColormapList(plot_struct *plot) { while (plot->first_cmap_struct != NULL) { cmap_struct *freethis = plot->first_cmap_struct; /* Release the colormap here to free color resources, but only * if this plot is using a colormap not used by another plot * and is not using the current colormap. */ if (plot->first_cmap_struct->cmap != current_cmap && !Find_Plot_In_Linked_List_By_CMap(plot->first_cmap_struct->cmap)) Remove_CMap_From_Linked_List(plot->first_cmap_struct->cmap); plot->first_cmap_struct = plot->first_cmap_struct->next_cmap_struct; free(freethis); } } /* * free all *pm3d* colors (*not* the line colors cmap->colors) * of a plot_struct's colormap. This could be either a private * or the default colormap. Note, that the line colors are not * free'd nor even touched. */ static void FreeColors(cmap_t *cmp) { if (cmp->total && cmp->pixels) { if (cmp->allocated) { FPRINTF((stderr, "freeing palette colors\n")); XFreeColors(dpy, cmp->colormap, cmp->pixels, cmp->allocated, 0 /* XXX ??? XXX */ ); } free(cmp->pixels); } CmapClear(cmp); } /* * free pm3d colors and eventually a private colormap. * set the plot_struct's colormap to the default colormap * and the line `colors' to the line colors of the default * colormap. */ static void ReleaseColormap(cmap_t *cmp) { if (cmp && cmp != current_cmap) { FreeColors(cmp); FPRINTF((stderr, "releasing private colormap\n")); if (cmp->colormap && cmp->colormap != current_cmap->colormap) { XFreeColormap(dpy, cmp->colormap); } free((char *) cmp); } } static unsigned long * ReallocColors(cmap_t *cmap, int n) { FreeColors(cmap); cmap->total = n; cmap->pixels = (unsigned long *) malloc(sizeof(unsigned long) * cmap->total); return cmap->pixels; } /* * check if the display supports the visual of type `class'. * * If multiple visuals of `class' are supported, try to get * the one with the highest depth. * * If visual class and depth are equal to the default visual * class and depth, the latter is preferred. * * modifies: best, depth * * returns 1 if a visual which matches the request * could be found else 0. */ static int GetVisual(int class, Visual ** visual, int *depth) { XVisualInfo *visualsavailable; int nvisuals = 0; long vinfo_mask = VisualClassMask; XVisualInfo vinfo; vinfo.class = class; *depth = 0; *visual = 0; visualsavailable = XGetVisualInfo(dpy, vinfo_mask, &vinfo, &nvisuals); if (visualsavailable && nvisuals > 0) { int i; for (i = 0; i < nvisuals; i++) { if (visualsavailable[i].depth > *depth) { *visual = visualsavailable[i].visual; *depth = visualsavailable[i].depth; } } XFree(visualsavailable); if (*visual && (*visual)->class == (DefaultVisual(dpy, scr))->class && *depth == DefaultDepth(dpy, scr)) { /* prefer the default visual */ *visual = DefaultVisual(dpy, scr); } } return nvisuals > 0; } static void PaletteMake(t_sm_palette * tpal) { int max_colors; int min_colors; #ifdef TITLE_BAR_DRAWING_MSG char *save_title = (char *) 0; #endif /* The information retained in a linked list is the cmap_t structure. * That colormap structure doesn't contain the palette specifications * t_sm_palette used to generate the colormap. Therefore, the making * of the colormap must be carried all the way through before we can * determine if it is unique from the other colormaps in the linked list. * * Rather than create and initialize a colormap outside of the list, we'll * just put a new one in the list, and if it isn't unique remove it later. */ cmap_t *new_cmap = Add_CMap_To_Linked_List(); /* Continue until valid palette is built. May require multiple passes. */ while (1) { if (tpal) { if (tpal->use_maxcolors > 0) { max_colors = tpal->use_maxcolors; } else { max_colors = maximal_possible_colors; } FPRINTF((stderr, "(PaletteMake) tpal->use_maxcolors = %d\n", tpal->use_maxcolors)); /* free old gradient table */ if (sm_palette.gradient) { free( sm_palette.gradient ); sm_palette.gradient = NULL; sm_palette.gradient_num = 0; } sm_palette.colorMode = tpal->colorMode; sm_palette.positive = tpal->positive; sm_palette.use_maxcolors = tpal->use_maxcolors; sm_palette.cmodel = tpal->cmodel; switch( sm_palette.colorMode ) { case SMPAL_COLOR_MODE_GRAY: sm_palette.gamma = tpal->gamma; break; case SMPAL_COLOR_MODE_RGB: sm_palette.formulaR = tpal->formulaR; sm_palette.formulaG = tpal->formulaG; sm_palette.formulaB = tpal->formulaB; break; case SMPAL_COLOR_MODE_FUNCTIONS: fprintf( stderr, "Ooops: no SMPAL_COLOR_MODE_FUNCTIONS here!\n" ); break; case SMPAL_COLOR_MODE_GRADIENT: sm_palette.gradient_num = tpal->gradient_num; /* Take over the memory from tpal. */ sm_palette.gradient = tpal->gradient; tpal->gradient = NULL; break; default: fprintf(stderr,"%s:%d ooops: Unknown color mode '%c'.\n", __FILE__, __LINE__, (char)(sm_palette.colorMode) ); } } else { max_colors = maximal_possible_colors; FPRINTF((stderr, "(PaletteMake) tpal=NULL\n")); } if (minimal_possible_colors < max_colors) min_colors = minimal_possible_colors; else min_colors = max_colors / (num_colormaps > 1 ? 2 : 8); if (current_plot) { #ifdef TITLE_BAR_DRAWING_MSG if (current_plot->window) { char *msg; char *added_text = " allocating colors ..."; int orig_len = (current_plot->titlestring ? strlen(current_plot->titlestring) : 0); XFetchName(dpy, current_plot->window, &save_title); if ((msg = (char *) malloc(orig_len + strlen(added_text) + 1))) { if (current_plot->titlestring) strcpy(msg, current_plot->titlestring); else msg[0] = '\0'; strcat(msg, added_text); XStoreName(dpy, current_plot->window, msg); free(msg); } } #endif if (!num_colormaps) { XFree(XListInstalledColormaps(dpy, current_plot->window, &num_colormaps)); FPRINTF((stderr, "(PaletteMake) num_colormaps = %d\n", num_colormaps)); } } /* TODO */ /* EventuallyChangeVisual(plot); */ /* * start with trying to allocate max_colors. This should * always succeed with TrueColor visuals >= 16bit. If it * fails (for example for a PseudoColor visual of depth 8), * try it with half of the colors. Proceed until min_colors * is reached. If this fails we should probably install a * private colormap. * Note that I make no difference for different * visual types here. (joze) */ for ( /* EMPTY */ ; max_colors >= min_colors; max_colors /= 2) { XColor xcolor; double fact = 1.0 / (double)(max_colors-1); if (current_plot) ReallocColors(new_cmap, max_colors); for (new_cmap->allocated = 0; new_cmap->allocated < max_colors; new_cmap->allocated++) { double gray = (double) new_cmap->allocated * fact; rgb_color color; rgb1_from_gray( gray, &color ); xcolor.red = 0xffff * color.r + 0.5; xcolor.green = 0xffff * color.g + 0.5; xcolor.blue = 0xffff * color.b + 0.5; if (XAllocColor(dpy, new_cmap->colormap, &xcolor)) { new_cmap->pixels[new_cmap->allocated] = xcolor.pixel; } else { FPRINTF((stderr, "failed at color %d\n", new_cmap->allocated)); break; } } if (new_cmap->allocated == max_colors) { break; /* success! */ } /* reduce the number of max_colors to at * least less than new_cmap->allocated */ while (max_colors > new_cmap->allocated && max_colors >= min_colors) { max_colors /= 2; } } FPRINTF((stderr, "(PaletteMake) allocated = %d\n", new_cmap->allocated)); FPRINTF((stderr, "(PaletteMake) max_colors = %d\n", max_colors)); FPRINTF((stderr, "(PaletteMake) min_colors = %d\n", min_colors)); if (new_cmap->allocated < min_colors && tpal) { /* create a private colormap on second pass. */ FPRINTF((stderr, "switching to private colormap\n")); tpal = 0; } else { break; } } /* Now check the uniqueness of the new colormap against all the other * colormaps in the linked list. */ { cmap_t *cmp = cmap_list_start; while (cmp != NULL) { if ((cmp != new_cmap) && !cmaps_differ(cmp, new_cmap)) break; cmp = cmp->next_cmap; } if (cmp != NULL) { /* Found a match. Discard the newly created colormap. (Could * have simply discarded the old one and combined parts of * code similar to these if statements, but we'll avoid removing * old blocks of memory so that it is more likely that heap * memory will remain more tidy. */ Remove_CMap_From_Linked_List(new_cmap); if (current_plot) { current_plot->cmap = cmp; RecolorWindow(current_plot); } current_cmap = cmp; } else { /* Unique and truely new colormap. Make it the current map. */ if (current_plot) { current_plot->cmap = new_cmap; RecolorWindow(current_plot); } /* If no other plots using colormap, then can be removed. */ if (!Find_Plot_In_Linked_List_By_CMap(current_cmap)) Remove_CMap_From_Linked_List(current_cmap); current_cmap = new_cmap; } } #ifdef TITLE_BAR_DRAWING_MSG if (save_title) { /* Restore window title (current_plot and current_plot->window are * valid, otherwise would not have been able to get save_title. */ XStoreName(dpy, current_plot->window, save_title); XFree(save_title); } #endif } static void PaletteSetColor(plot_struct * plot, double gray) { if (plot->cmap->allocated) { int index; /* FIXME - I don't understand why sm_palette is not always in sync */ /* with plot->cmap->allocated, but in practice they can be different. */ if (sm_palette.use_maxcolors == plot->cmap->allocated) { gray = quantize_gray(gray); FPRINTF((stderr," %d",plot->cmap->allocated)); } else gray = floor(gray * plot->cmap->allocated) / (plot->cmap->allocated - 1); index = gray * (plot->cmap->allocated - 1); if (index >= plot->cmap->allocated) index = plot->cmap->allocated -1; XSetForeground(dpy, gc, plot->cmap->pixels[index]); plot->current_rgb = plot->cmap->pixels[index]; } } #ifdef USE_MOUSE /* Notify main program, send windowid for GPVAL_TERM_WINDOWID if it has been changed. */ static void gp_execute_GE_plotdone (int windowid) { static int last_window_id = -1; if (windowid == last_window_id) gp_exec_event(GE_plotdone, 0, 0, 0, 0, 0); else { gp_exec_event(GE_plotdone, 0, 0, 0, 0, windowid); last_window_id = windowid; } } static int ErrorHandler(Display * display, XErrorEvent * error_event) { /* Don't remove directly. Main program might be using the memory. */ (void) display; /* avoid -Wunused warnings */ Add_Plot_To_Remove_FIFO_Queue((Window) error_event->resourceid); gp_exec_event(GE_reset, 0, 0, 0, 0, 0); return 0; } static void DrawRuler(plot_struct * plot) { if (plot->ruler_on) { int x = X(plot->ruler_x); int y = Y(plot->ruler_y); if (!gc_xor) { /* create a gc for `rubberbanding' (well ...) */ GetGCXor(plot, &gc_xor); } /* vertical line */ XDrawLine(dpy, plot->window, gc_xor, x, 0, x, GRAPH_HEIGHT(plot)); /* horizontal line */ XDrawLine(dpy, plot->window, gc_xor, 0, y, plot->width, y); } } static void EventuallyDrawMouseAddOns(plot_struct * plot) { DrawRuler(plot); DrawLineToRuler(plot); if (plot->zoombox_on) DrawBox(plot); DrawCoords(plot, plot->str); /* TODO more ... */ } /* * draw a line using the gc with the GXxor function. * This can be used to turn on *and off* a line between * the current mouse pointer and the ruler. */ static void DrawLineToRuler(plot_struct * plot) { if (plot->ruler_on == FALSE || plot->ruler_lineto_on == FALSE) return; if (plot->ruler_lineto_x < 0) return; if (!gc_xor) { GetGCXor(plot, &gc_xor); } XDrawLine(dpy, plot->window, gc_xor, X(plot->ruler_x), Y(plot->ruler_y), plot->ruler_lineto_x, plot->ruler_lineto_y); } /* * draw a box using the gc with the GXxor function. * This can be used to turn on *and off* a box. The * corners of the box are annotated with the strings * stored in the plot structure. */ static void DrawBox(plot_struct * plot) { int width; int height; int X0 = plot->zoombox_x1; int Y0 = plot->zoombox_y1; int X1 = plot->zoombox_x2; int Y1 = plot->zoombox_y2; if (!gc_xor_dashed) { GetGCXorDashed(plot, &gc_xor_dashed); } if (X1 < X0) { int tmp = X1; X1 = X0; X0 = tmp; } if (Y1 < Y0) { int tmp = Y1; Y1 = Y0; Y0 = tmp; } width = X1 - X0; height = Y1 - Y0; XDrawRectangle(dpy, plot->window, gc_xor_dashed, X0, Y0, width, height); if (plot->zoombox_str1a[0] || plot->zoombox_str1b[0]) AnnotatePoint(plot, plot->zoombox_x1, plot->zoombox_y1, plot->zoombox_str1a, plot->zoombox_str1b); if (plot->zoombox_str2a[0] || plot->zoombox_str2b[0]) AnnotatePoint(plot, plot->zoombox_x2, plot->zoombox_y2, plot->zoombox_str2a, plot->zoombox_str2b); } /* * draw the strings xstr and ystr centered horizontally * and vertically at the point x, y. Use the GXxor * as usually, so that we can also remove the coords * later. */ static void AnnotatePoint(plot_struct * plot, int x, int y, const char xstr[], const char ystr[]) { int ylen, xlen; int xwidth, ywidth; xlen = strlen(xstr); xwidth = gpXTextWidth(font, xstr, xlen); ylen = strlen(ystr); ywidth = gpXTextWidth(font, ystr, ylen); /* horizontal centering disabled (joze) */ if (!gc_xor) { GetGCXor(plot, &gc_xor); } gpXDrawString(dpy, plot->window, gc_xor, x, y - 3, xstr, xlen); gpXDrawString(dpy, plot->window, gc_xor, x, y + vchar, ystr, ylen); } /* returns the time difference to the last click in milliseconds */ static long int SetTime(plot_struct *plot, Time t) { long int diff = t - plot->time; FPRINTF((stderr, "(SetTime) difftime = %ld\n", diff)); plot->time = t; return diff > 0 ? diff : 0; } static unsigned long AllocateXorPixel(cmap_t *cmap_ptr) { unsigned long pixel; XColor xcolor; xcolor.pixel = cmap_ptr->colors[0]; /* background color */ XQueryColor(dpy, cmap_ptr->colormap, &xcolor); if (xcolor.red + xcolor.green + xcolor.blue < 0xffff) { /* it is admittedly somehow arbitrary to call * everything with a gray value < 0xffff a * dark background. Try to use the background's * complement for drawing which will always * result in white when using xor. */ xcolor.red = ~xcolor.red; xcolor.green = ~xcolor.green; xcolor.blue = ~xcolor.blue; if (XAllocColor(dpy, cmap_ptr->colormap, &xcolor)) { /* use white foreground for dark backgrounds */ pixel = xcolor.pixel; } else { /* simple xor if we've run out of colors. */ pixel = WhitePixel(dpy, scr); } } else { /* use the background itself for drawing. * xoring two same colors will always result * in black. This color is already allocated. */ pixel = xcolor.pixel; } cmap_ptr->xorpixel = pixel; return pixel; } static void GetGCXor(plot_struct * plot, GC * ret) { XGCValues values; unsigned long mask = 0; values.foreground = AllocateXorPixel(plot->cmap); #ifdef USE_X11_MULTIBYTE if (usemultibyte) { mask = GCForeground | GCFunction; values.function = GXxor; } else #endif { mask = GCForeground | GCFunction | GCFont; values.function = GXxor; values.font = font->fid; } *ret = XCreateGC(dpy, plot->window, mask, &values); } static void GetGCXorDashed(plot_struct * plot, GC * gc) { GetGCXor(plot, gc); XSetLineAttributes(dpy, *gc, 0, /* line width, X11 treats 0 as a `thin' line */ LineOnOffDash, /* also: LineDoubleDash */ CapNotLast, /* also: CapButt, CapRound, CapProjecting */ JoinMiter /* also: JoinRound, JoinBevel */ ); } /* erase the last displayed position string */ static void EraseCoords(plot_struct * plot) { DrawCoords(plot, plot->str); } static void DrawCoords(plot_struct * plot, const char *str) { if (!gc_xor) { GetGCXor(plot, &gc_xor); } if (str[0] != 0) gpXDrawString(dpy, plot->window, gc_xor, 1, plot->gheight + vchar - 1, str, strlen(str)); } /* display text (e.g. mouse position) in the lower left corner of the window. */ static void DisplayCoords(plot_struct * plot, const char *s) { /* first, erase old text */ EraseCoords(plot); if (s[0] == 0) { /* no new text? */ if (plot->height > plot->gheight) { /* and window has space for text? then make it smaller, unless we're already doing a resize: */ if (!plot->resizing) { #ifdef EXTERNAL_X11_WINDOW if (plot->external_container != None) { plot->gheight = plot->height; display(plot); } else #endif XResizeWindow(dpy, plot->window, plot->width, plot->gheight); plot->resizing = TRUE; } } } else { /* so we do have new text */ if (plot->height == plot->gheight) { /* window not large enough? then make it larger, unless we're already doing a resize: */ if (!plot->resizing) { #ifdef EXTERNAL_X11_WINDOW if (plot->external_container != None) { plot->gheight = plot->height - vchar; display(plot); } else #endif XResizeWindow(dpy, plot->window, plot->width, plot->gheight + vchar); plot->resizing = TRUE; } } } /* finally, draw the new text: */ DrawCoords(plot, s); /* and save it, for later erasing: */ strcpy(plot->str, s); } static TBOOLEAN is_meta(KeySym mod) { /* CJK keyboards may have these meta keys */ if (0xFF20 <= mod && mod <= 0xFF3F) return TRUE; /* Everyone else may have these meta keys */ switch (mod) { case XK_Multi_key: case XK_Shift_L: case XK_Shift_R: case XK_Control_L: case XK_Control_R: case XK_Meta_L: case XK_Meta_R: case XK_Alt_L: case XK_Alt_R: return TRUE; default: return FALSE; } } #ifndef DISABLE_SPACE_RAISES_CONSOLE /* It returns NULL if we are not running in any known (=implemented) multitab * console. * Otherwise it returns a command to be executed in order to switch to the * appropriate tab of a multitab console. * In addition, it may return non-zero newGnuplotXID in order to overwrite zero * value of gnuplotXID (because Konsole's in KDE <3.2 don't set WINDOWID contrary * to all other xterm's). * Currently implemented for: * - KDE3 Konsole. * Note: if the returned command is !NULL, then it must be free()'d by the caller. */ static char* getMultiTabConsoleSwitchCommand(unsigned long *newGnuplotXID) { /* NOTE: This code uses the DCOP mechanism from KDE3, which went away in KDE4 */ #ifdef HAVE_STRDUP /* We assume that any machine missing strdup is too old for KDE */ char *cmd = NULL; /* result */ char *ptr = getenv("KONSOLE_DCOP_SESSION"); /* Try KDE's Konsole first. */ *newGnuplotXID = 0; if (ptr) { /* We are in KDE's Konsole, or in a terminal window detached from a Konsole. * In order to active a tab: * 1. get environmental variable KONSOLE_DCOP_SESSION: it includes konsole id and session name * 2. if * $WINDOWID is defined and it equals * `dcop konsole-3152 konsole-mainwindow#1 getWinID` * (KDE 3.2) or when $WINDOWID is undefined (KDE 3.1), then run commands * dcop konsole-3152 konsole activateSession session-2; \ * dcop konsole-3152 konsole-mainwindow#1 raise * Note: by $WINDOWID we mean gnuplot's text console WINDOWID. * Missing: focus is not transferred unless $WINDOWID is defined (should be fixed in KDE 3.2). * * Implementation and tests on KDE 3.1.4: Petr Mikulik. */ char *konsole_name = NULL; *newGnuplotXID = 0; /* don't change gnuplotXID by default */ /* use 'while' instead of 'if' to easily break out (aka catch exception) */ while (1) { char *konsole_tab; unsigned long w; FILE *p; ptr = strchr(ptr, '('); /* the string for tab nb 4 looks like 'DCOPRef(konsole-2866, session-4)' */ if (!ptr) return NULL; konsole_name = strdup(ptr+1); konsole_tab = strchr(konsole_name, ','); if (!konsole_tab) break; *konsole_tab++ = 0; ptr = strchr(konsole_tab, ')'); if (ptr) *ptr = 0; /* Not necessary to define DCOP_RAISE: returning newly known * newGnuplotXID instead is sufficient. */ /* #define DCOP_RAISE */ #ifdef DCOP_RAISE cmd = malloc(2*strlen(konsole_name) + strlen(konsole_tab) + 128); #else cmd = malloc(strlen(konsole_name) + strlen(konsole_tab) + 64); #endif sprintf(cmd, "dcop %s konsole-mainwindow#1 getWinID 2>/dev/null", konsole_name); /* is 2>/dev/null portable among various shells? */ p = popen(cmd, "r"); if (p) { fscanf(p, "%lu", &w); pclose(p); } if (gnuplotXID) { /* $WINDOWID is known */ if (w != gnuplotXID) break; /* `dcop getWinID`==$WINDOWID thus we are running in a window detached from Konsole */ } else { *newGnuplotXID = w; /* $WINDOWID has not been known (KDE 3.1), thus set it up */ } #ifdef DCOP_RAISE /* not necessary: returning newly known newGnuplotXID instead is sufficient */ sprintf(cmd, "dcop %s konsole-mainwindow#1 raise;", konsole_name); sprintf(cmd+strlen(cmd), "dcop %s konsole activateSession %s", konsole_name, konsole_tab); #else sprintf(cmd, "dcop %s konsole activateSession %s", konsole_name, konsole_tab); #endif free(konsole_name); return cmd; } free(konsole_name); free(cmd); return NULL; } /* now test for GNOME multitab console */ /* ... if somebody bothers to implement it ... */ #endif /* HAVE_STRDUP */ /* NOTE: End of DCOP/KDE3 code (no longer works in KDE4) */ /* we are not running in any known (implemented) multitab console */ return NULL; } #endif #endif /* DISABLE_SPACE_RAISES_CONSOLE */ /*--------------------------------------------------------------------------- * reset all cursors (since we dont have a record of the previous terminal #) *---------------------------------------------------------------------------*/ static void reset_cursor() { plot_struct *plot = plot_list_start; while (plot) { if (plot->window) { FPRINTF((stderr, "Window for plot %d exists\n", plot->plot_number)); XUndefineCursor(dpy, plot->window); } plot = plot->next_plot; } FPRINTF((stderr, "Cursors reset\n")); return; } /*----------------------------------------------------------------------------- * resize - rescale last plot if window resized *---------------------------------------------------------------------------*/ #ifdef USE_MOUSE /* the status of the shift, ctrl and alt keys */ static int modifier_mask = 0; static void update_modifiers __PROTO((unsigned int)); static void update_modifiers(unsigned int state) { int old_mod_mask; old_mod_mask = modifier_mask; modifier_mask = ((state & ShiftMask) ? Mod_Shift : 0) | ((state & ControlMask) ? Mod_Ctrl : 0) | ((state & Mod1Mask) ? Mod_Alt : 0); if (old_mod_mask != modifier_mask) { gp_exec_event(GE_modifier, 0, 0, modifier_mask, 0, 0); } } #endif static void process_configure_notify_event(XEvent *event) { plot_struct *plot; int force_redraw = 0; /* Filter down to the last ConfigureNotify event */ XSync(dpy, False); while (XCheckTypedWindowEvent(dpy, event->xany.window, ConfigureNotify, event)) ; plot = Find_Plot_In_Linked_List_By_Window(event->xconfigure.window); if (plot) { int w = event->xconfigure.width, h = event->xconfigure.height; /* store settings in case window is closed then recreated */ /* but: don't do this if both x and y are 0, since some * (all?) systems set these to zero when only resizing * (not moving) the window. This does mean that a move to * (0, 0) won't be registered: can we solve that? */ if (event->xconfigure.x != 0 || event->xconfigure.y != 0) { plot->x = event->xconfigure.x; plot->y = event->xconfigure.y; plot->posn_flags = (plot->posn_flags & ~PPosition) | USPosition; } #ifdef USE_MOUSE /* first, check whether we were waiting for completion of a resize */ if (plot->resizing) { /* it seems to be impossible to distinguish between a * resize caused by our call to XResizeWindow(), and a * resize started by the user/windowmanager; but we can * make a good guess which can only fail if the user * resizes the window while we're also resizing it * ourselves: */ if (w == plot->width && (h == plot->gheight || h == plot->gheight + vchar)) { /* most likely, it's a resize for showing/hiding the status line. * Test whether the height is now correct; if not, start another resize. */ plot->resizing = FALSE; if (w == plot->width && h == plot->gheight + (plot->str[0] ? vchar : 0)) { /* Was successful, status line can be drawn without rescaling plot. */ plot->height = h; return; } else { /* Possibly, a resize attempt _failed_ because window manager denied it. Resizing again goes into a vicious endless loop! (Seen with fluxbox-1.0.0 and a tab group of gnuplot windows.) */ /* Instead of just appending the status line, redraw/scale the plot. */ force_redraw = TRUE; } } } #endif if (w > 1 && h > 1 && (force_redraw || w != plot->width || h != plot->height)) { plot->width = w; plot->height = h; #ifdef USE_MOUSE /* Make sure that unsigned number doesn't underflow. */ if (plot->str[0]) plot->gheight = (vchar > plot->height) ? 0 : plot->height - vchar; else plot->gheight = plot->height; #endif plot->posn_flags = (plot->posn_flags & ~PSize) | USSize; if (stipple_initialized) { int i; for (i = 0; i < stipple_pattern_num; i++) XFreePixmap(dpy, stipple_pattern[i]); stipple_initialized = 0; } if (plot->pixmap) { /* it is the wrong size now */ FPRINTF((stderr, "Free pixmap %d\n", 0)); XFreePixmap(dpy, plot->pixmap); plot->pixmap = None; } #ifdef EXTERNAL_X11_WINDOW if (plot->external_container != None) { /* Resize so that all parts of plot remain visible * when the plot is expanded. */ XResizeWindow(dpy, plot->window, plot->width, plot->height); /* This may be redundant because the application might * handle resizing the external window. However, this * probably isn't necessarily true, so resize the * external window as well. */ XResizeWindow(dpy, plot->external_container, plot->width, plot->height); } #endif display(plot); } } } static void process_event(XEvent *event) { plot_struct *plot; KeySym keysym; char key_sequence[8]; FPRINTF((stderr, "Event 0x%x\n", event->type)); switch (event->type) { case ConfigureNotify: process_configure_notify_event(event); break; case KeyPress: plot = Find_Plot_In_Linked_List_By_Window(event->xkey.window); /* Unlike XKeycodeToKeysym, XLookupString applies the current */ /* shift, ctrl, alt, and meta modifiers to yield a character. */ /* keysym = XKeycodeToKeysym(dpy, event->xkey.keycode, 0); */ XLookupString((XKeyEvent *)event, key_sequence, sizeof(key_sequence), &keysym, NULL); #ifdef USE_MOUSE update_modifiers(event->xkey.state); #endif switch (keysym) { #ifdef USE_MOUSE #ifndef DISABLE_SPACE_RAISES_CONSOLE case ' ': { static int cmd_tried = 0; static char *cmd = NULL; static unsigned long newGnuplotXID = 0; /* If the "-ctrlq" resource is set, ignore ' ' unless control key is also pressed */ if (ctrlq && !(modifier_mask & Mod_Ctrl)) break; if (!cmd_tried) { cmd = getMultiTabConsoleSwitchCommand(&newGnuplotXID); cmd_tried = 1; } /* overwrite gnuplotXID (re)set after x11.trm:X11_options() */ if (newGnuplotXID) gnuplotXID = newGnuplotXID; if (cmd) system(cmd); } if (gnuplotXID) { XMapRaised(dpy, gnuplotXID); XSetInputFocus(dpy, gnuplotXID, 0 /*revert */ , CurrentTime); XFlush(dpy); } return; #endif /* DISABLE_SPACE_RAISES_CONSOLE */ case 'm': /* Toggle mouse display, but only if we control the window here */ if (((plot != current_plot) && (!modifier_mask)) #ifdef PIPE_IPC || pipe_died #endif ) { plot->mouse_on = !(plot->mouse_on); DisplayCoords(plot, plot->mouse_on ? " " : ""); } break; #endif case 'q': #ifdef USE_MOUSE /* If the "-ctrlq" resource is set, ignore q unless control key is also pressed */ if (ctrlq && !(modifier_mask & Mod_Ctrl)) { FPRINTF((stderr, "ignoring q, modifier_mask = %o\n", modifier_mask)); break; } #endif /* close X window */ Remove_Plot_From_Linked_List(event->xkey.window); return; default: break; } /* switch (keysym) */ #ifdef USE_MOUSE if (is_meta(keysym)) return; switch (keysym) { #define KNOWN_KEYSYMS(gp_keysym) \ if (plot == current_plot) { \ gp_exec_event(GE_keypress, \ (int)RevX(event->xkey.x), (int)RevY(event->xkey.y), \ gp_keysym, 0, plot->plot_number); \ } else { \ gp_exec_event(GE_keypress_old, \ (int)RevX(event->xkey.x), (int)RevY(event->xkey.y), \ gp_keysym, 0, plot->plot_number); \ } \ return; /* Prevent hysteresis if redraw cannot keep up with rate of keystrokes */ #define DRAIN_KEYSTROKES(key) \ if (plot == current_plot) { \ while (XCheckTypedWindowEvent(dpy, \ event->xany.window, KeyPress, event)); \ } case XK_BackSpace: KNOWN_KEYSYMS(GP_BackSpace); case XK_Tab: KNOWN_KEYSYMS(GP_Tab); case XK_Linefeed: KNOWN_KEYSYMS(GP_Linefeed); case XK_Clear: KNOWN_KEYSYMS(GP_Clear); case XK_Return: KNOWN_KEYSYMS(GP_Return); case XK_Pause: KNOWN_KEYSYMS(GP_Pause); case XK_Scroll_Lock: KNOWN_KEYSYMS(GP_Scroll_Lock); #ifdef XK_Sys_Req case XK_Sys_Req: KNOWN_KEYSYMS(GP_Sys_Req); #endif case XK_Escape: KNOWN_KEYSYMS(GP_Escape); case XK_Insert: KNOWN_KEYSYMS(GP_Insert); case XK_Delete: KNOWN_KEYSYMS(GP_Delete); case XK_Home: KNOWN_KEYSYMS(GP_Home); case XK_Left: DRAIN_KEYSTROKES(XK_Left); KNOWN_KEYSYMS(GP_Left); case XK_Up: DRAIN_KEYSTROKES(XK_Up); KNOWN_KEYSYMS(GP_Up); case XK_Right: DRAIN_KEYSTROKES(XK_Right); KNOWN_KEYSYMS(GP_Right); case XK_Down: DRAIN_KEYSTROKES(XK_Down); KNOWN_KEYSYMS(GP_Down); case XK_Prior: /* XXX */ KNOWN_KEYSYMS(GP_PageUp); case XK_Next: /* XXX */ KNOWN_KEYSYMS(GP_PageDown); case XK_End: KNOWN_KEYSYMS(GP_End); case XK_Begin: KNOWN_KEYSYMS(GP_Begin); case XK_KP_Space: KNOWN_KEYSYMS(GP_KP_Space); case XK_KP_Tab: KNOWN_KEYSYMS(GP_KP_Tab); case XK_KP_Enter: KNOWN_KEYSYMS(GP_KP_Enter); case XK_KP_F1: KNOWN_KEYSYMS(GP_KP_F1); case XK_KP_F2: KNOWN_KEYSYMS(GP_KP_F2); case XK_KP_F3: KNOWN_KEYSYMS(GP_KP_F3); case XK_KP_F4: KNOWN_KEYSYMS(GP_KP_F4); #ifdef XK_KP_Home case XK_KP_Home: KNOWN_KEYSYMS(GP_KP_Home); #endif #ifdef XK_KP_Left case XK_KP_Left: KNOWN_KEYSYMS(GP_KP_Left); #endif #ifdef XK_KP_Up case XK_KP_Up: KNOWN_KEYSYMS(GP_KP_Up); #endif #ifdef XK_KP_Right case XK_KP_Right: KNOWN_KEYSYMS(GP_KP_Right); #endif #ifdef XK_KP_Down case XK_KP_Down: KNOWN_KEYSYMS(GP_KP_Down); #endif #ifdef XK_KP_Page_Up case XK_KP_Page_Up: KNOWN_KEYSYMS(GP_KP_Page_Up); #endif #ifdef XK_KP_Page_Down case XK_KP_Page_Down: KNOWN_KEYSYMS(GP_KP_Page_Down); #endif #ifdef XK_KP_End case XK_KP_End: KNOWN_KEYSYMS(GP_KP_End); #endif #ifdef XK_KP_Begin case XK_KP_Begin: KNOWN_KEYSYMS(GP_KP_Begin); #endif #ifdef XK_KP_Insert case XK_KP_Insert: KNOWN_KEYSYMS(GP_KP_Insert); #endif #ifdef XK_KP_Delete case XK_KP_Delete: KNOWN_KEYSYMS(GP_KP_Delete); #endif case XK_KP_Equal: KNOWN_KEYSYMS(GP_KP_Equal); case XK_KP_Multiply: KNOWN_KEYSYMS(GP_KP_Multiply); case XK_KP_Add: KNOWN_KEYSYMS(GP_KP_Add); case XK_KP_Separator: KNOWN_KEYSYMS(GP_KP_Separator); case XK_KP_Subtract: KNOWN_KEYSYMS(GP_KP_Subtract); case XK_KP_Decimal: KNOWN_KEYSYMS(GP_KP_Decimal); case XK_KP_Divide: KNOWN_KEYSYMS(GP_KP_Divide); case XK_KP_0: KNOWN_KEYSYMS(GP_KP_0); case XK_KP_1: KNOWN_KEYSYMS(GP_KP_1); case XK_KP_2: KNOWN_KEYSYMS(GP_KP_2); case XK_KP_3: KNOWN_KEYSYMS(GP_KP_3); case XK_KP_4: KNOWN_KEYSYMS(GP_KP_4); case XK_KP_5: KNOWN_KEYSYMS(GP_KP_5); case XK_KP_6: KNOWN_KEYSYMS(GP_KP_6); case XK_KP_7: KNOWN_KEYSYMS(GP_KP_7); case XK_KP_8: KNOWN_KEYSYMS(GP_KP_8); case XK_KP_9: KNOWN_KEYSYMS(GP_KP_9); case XK_F1: KNOWN_KEYSYMS(GP_F1); case XK_F2: KNOWN_KEYSYMS(GP_F2); case XK_F3: KNOWN_KEYSYMS(GP_F3); case XK_F4: KNOWN_KEYSYMS(GP_F4); case XK_F5: KNOWN_KEYSYMS(GP_F5); case XK_F6: KNOWN_KEYSYMS(GP_F6); case XK_F7: KNOWN_KEYSYMS(GP_F7); case XK_F8: KNOWN_KEYSYMS(GP_F8); case XK_F9: KNOWN_KEYSYMS(GP_F9); case XK_F10: KNOWN_KEYSYMS(GP_F10); case XK_F11: KNOWN_KEYSYMS(GP_F11); case XK_F12: KNOWN_KEYSYMS(GP_F12); default: KNOWN_KEYSYMS((int) keysym); break; } #endif break; case KeyRelease: #ifdef USE_MOUSE update_modifiers(event->xkey.state); keysym = XKeycodeToKeysym(dpy, event->xkey.keycode, 0); if (is_meta(keysym)) { plot = Find_Plot_In_Linked_List_By_Window(event->xkey.window); cursor = cursor_default; if (plot) XDefineCursor(dpy, plot->window, cursor); } #endif break; case ClientMessage: if (event->xclient.message_type == WM_PROTOCOLS && event->xclient.format == 32 && event->xclient.data.l[0] == WM_DELETE_WINDOW) { Remove_Plot_From_Linked_List(event->xclient.window); /* EAM FIXME - may have to generate GE_reset event here also */ } break; #ifdef USE_MOUSE case DestroyNotify: plot = Find_Plot_In_Linked_List_By_Window(event->xconfigure.window); if (plot == current_plot) { gp_exec_event(GE_reset, 0, 0, 0, 0, 0); } break; case Expose: /* * we need to handle expose events here, because * there might stuff like rulers which has to * be redrawn. Well. It's not really hard to handle * this. Note that the x and y fields are not used * to update the pointer pos because the pointer * might be on another window which generates the * expose events. (joze) */ /* Check for any ConfigureNotify events further down in the X11 * event queue. If one is found, handle it first and let the * expose event that is generated be handled later. * Jay Painter Nov 2003. */ if (XCheckTypedWindowEvent(dpy, event->xany.window, ConfigureNotify, event)) { process_configure_notify_event(event); break; } while (XCheckTypedWindowEvent(dpy, event->xany.window, Expose, event)); plot = Find_Plot_In_Linked_List_By_Window(event->xexpose.window); if (plot) UpdateWindow(plot); break; case EnterNotify: plot = Find_Plot_In_Linked_List_By_Window(event->xcrossing.window); if (!plot) break; if (plot == current_plot) { Call_display(plot); gp_exec_event(GE_motion, (int) RevX(event->xcrossing.x), (int) RevY(event->xcrossing.y), 0, 0, 0); } if (plot->zoombox_on) { DrawBox(plot); plot->zoombox_x2 = event->xcrossing.x; plot->zoombox_y2 = event->xcrossing.y; DrawBox(plot); } if (plot->ruler_on) { DrawLineToRuler(plot); plot->ruler_lineto_x = event->xcrossing.x; plot->ruler_lineto_y = event->xcrossing.y; DrawLineToRuler(plot); } break; case MotionNotify: update_modifiers(event->xmotion.state); plot = Find_Plot_In_Linked_List_By_Window(event->xmotion.window); if (!plot) break; { Window root, child; int root_x, root_y, pos_x, pos_y; unsigned int keys_buttons; if (!XQueryPointer(dpy, event->xmotion.window, &root, &child, &root_x, &root_y, &pos_x, &pos_y, &keys_buttons)) break; if (plot == current_plot #ifdef PIPE_IPC && !pipe_died #endif ) { Call_display(plot); gp_exec_event(GE_motion, (int) RevX(pos_x), (int) RevY(pos_y), 0, 0, 0); #if defined(USE_MOUSE) && defined(MOUSE_ALL_WINDOWS) } else if (plot->axis_mask && plot->mouse_on && plot->almost2d) { /* This is not the active plot window, but we can still update the mouse coords */ char mouse_format[60]; char *m = mouse_format; double x, y, x2, y2; *m = '\0'; mouse_to_coords(plot, event, &x, &y, &x2, &y2); if (plot->axis_mask & (1<<FIRST_X_AXIS)) { sprintf(m, "x= %10g %c", x, '\0'); m += 15; } if (plot->axis_mask & (1<<SECOND_X_AXIS)) { sprintf(m, "x2= %10g %c", x2, '\0'); m += 15; } if (plot->axis_mask & (1<<FIRST_Y_AXIS)) { sprintf(m, "y= %10g %c", y, '\0'); m += 15; } if (plot->axis_mask & (1<<SECOND_Y_AXIS)) { sprintf(m, "y2= %10g %c", y2, '\0'); m += 15; } DisplayCoords(plot, mouse_format); } else if (!plot->mouse_on) { DisplayCoords(plot, ""); #endif } if (plot->zoombox_on) { DrawBox(plot); plot->zoombox_x2 = pos_x; plot->zoombox_y2 = pos_y; DrawBox(plot); } if (plot->ruler_on && plot->ruler_lineto_on) { DrawLineToRuler(plot); plot->ruler_lineto_x = event->xcrossing.x; plot->ruler_lineto_y = event->xcrossing.y; DrawLineToRuler(plot); } } break; case ButtonPress: update_modifiers(event->xbutton.state); #ifndef TITLE_BAR_DRAWING_MSG button_pressed |= (1 << event->xbutton.button); #endif plot = Find_Plot_In_Linked_List_By_Window(event->xbutton.window); if (!plot) break; { if (plot == current_plot) { Call_display(plot); gp_exec_event(GE_buttonpress, (int) RevX(event->xbutton.x), (int) RevY(event->xbutton.y), event->xbutton.button, 0, 0); } } break; case ButtonRelease: #ifndef TITLE_BAR_DRAWING_MSG button_pressed &= ~(1 << event->xbutton.button); #endif plot = Find_Plot_In_Linked_List_By_Window(event->xbutton.window); if (!plot) break; if (plot == current_plot) { long int doubleclick = SetTime(plot, event->xbutton.time); update_modifiers(event->xbutton.state); Call_display(plot); gp_exec_event(GE_buttonrelease, (int) RevX(event->xbutton.x), (int) RevY(event->xbutton.y), event->xbutton.button, (int) doubleclick, 0); } #ifdef DEBUG #if defined(USE_MOUSE) && defined(MOUSE_ALL_WINDOWS) /* This causes gnuplot_x11 to pass mouse clicks back from all plot windows, * not just the current plot. But who should we notify that a click has * happened, and how? The fprintf to stderr is just for debugging. */ else if (plot->axis_mask) { double x, y, x2, y2; mouse_to_coords(plot, event, &x, &y, &x2, &y2); fprintf(stderr, "gnuplot_x11 %d: mouse button %1d from window %d at %g %g\n", __LINE__, event->xbutton.button, (plot ? plot->plot_number : 0), x, y); } #endif #endif break; #endif /* USE_MOUSE */ #ifdef EXPORT_SELECTION case SelectionNotify: break; case SelectionRequest: if (exportselection) handle_selection_event(event); break; #endif } } /*----------------------------------------------------------------------------- * preset - determine options, open display, create window *---------------------------------------------------------------------------*/ /* #define On(v) ( !strcmp(v, "on") || !strcmp(v, "true") || \ !strcmp(v, "On") || !strcmp(v, "True") || \ !strcmp(v, "ON") || !strcmp(v, "TRUE") ) */ #define On(v) ( !strncasecmp(v, "on", 2) || !strncasecmp(v, "true", 4) ) #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif static XrmDatabase dbCmd, dbApp, dbDef, dbEnv, db = (XrmDatabase) 0; static char *type[20]; static XrmValue value; static XrmOptionDescRec options[] = { {"-mono", ".mono", XrmoptionNoArg, (XPointer) "on"}, {"-gray", ".gray", XrmoptionNoArg, (XPointer) "on"}, {"-clear", ".clear", XrmoptionNoArg, (XPointer) "on"}, {"-tvtwm", ".tvtwm", XrmoptionNoArg, (XPointer) "on"}, {"-pointsize", ".pointsize", XrmoptionSepArg, (XPointer) NULL}, {"-display", ".display", XrmoptionSepArg, (XPointer) NULL}, {"-name", ".name", XrmoptionSepArg, (XPointer) NULL}, {"-geometry", "*geometry", XrmoptionSepArg, (XPointer) NULL}, {"-background", "*background", XrmoptionSepArg, (XPointer) NULL}, {"-bg", "*background", XrmoptionSepArg, (XPointer) NULL}, {"-foreground", "*foreground", XrmoptionSepArg, (XPointer) NULL}, {"-fg", "*foreground", XrmoptionSepArg, (XPointer) NULL}, {"-bordercolor", "*bordercolor", XrmoptionSepArg, (XPointer) NULL}, {"-bd", "*bordercolor", XrmoptionSepArg, (XPointer) NULL}, {"-borderwidth", ".borderWidth", XrmoptionSepArg, (XPointer) NULL}, {"-bw", ".borderWidth", XrmoptionSepArg, (XPointer) NULL}, {"-font", "*font", XrmoptionSepArg, (XPointer) NULL}, {"-fn", "*font", XrmoptionSepArg, (XPointer) NULL}, {"-reverse", "*reverseVideo", XrmoptionNoArg, (XPointer) "on"}, {"-rv", "*reverseVideo", XrmoptionNoArg, (XPointer) "on"}, {"+rv", "*reverseVideo", XrmoptionNoArg, (XPointer) "off"}, {"-iconic", "*iconic", XrmoptionNoArg, (XPointer) "on"}, {"-synchronous", "*synchronous", XrmoptionNoArg, (XPointer) "on"}, {"-xnllanguage", "*xnllanguage", XrmoptionSepArg, (XPointer) NULL}, {"-selectionTimeout", "*selectionTimeout", XrmoptionSepArg, (XPointer) NULL}, {"-title", ".title", XrmoptionSepArg, (XPointer) NULL}, {"-xrm", NULL, XrmoptionResArg, (XPointer) NULL}, {"-raise", "*raise", XrmoptionNoArg, (XPointer) "on"}, {"-noraise", "*raise", XrmoptionNoArg, (XPointer) "off"}, {"-feedback", "*feedback", XrmoptionNoArg, (XPointer) "on"}, {"-nofeedback", "*feedback", XrmoptionNoArg, (XPointer) "off"}, {"-ctrlq", "*ctrlq", XrmoptionNoArg, (XPointer) "on"}, {"-dashed", "*dashed", XrmoptionNoArg, (XPointer) "on"}, {"-solid", "*dashed", XrmoptionNoArg, (XPointer) "off"}, {"-persist", "*persist", XrmoptionNoArg, (XPointer) "on"} }; #define Nopt (sizeof(options) / sizeof(options[0])) static void preset(int argc, char *argv[]) { int Argc = argc; char **Argv = argv; #ifdef VMS char *ldisplay = (char *) 0; #else char *ldisplay = getenv("DISPLAY"); #endif char *home = getenv("HOME"); char *server_defaults, *env, buffer[256]; #if 0 Visual *TrueColor_vis, *PseudoColor_vis, *StaticGray_vis, *GrayScale_vis; int TrueColor_depth, PseudoColor_depth, StaticGray_depth, GrayScale_depth; #endif char *db_string; FPRINTF((stderr, "(preset) \n")); /* avoid bus error when env vars are not set */ if (ldisplay == NULL) ldisplay = ""; if (home == NULL) home = ""; /*---set to ignore ^C and ^Z----------------------------------------------*/ signal(SIGINT, SIG_IGN); #ifdef SIGTSTP signal(SIGTSTP, SIG_IGN); #endif /*---prescan arguments for "-name" or "--version" ----------------------*/ while (++Argv, --Argc > 0) { if (!strcmp(*Argv, "-name") && Argc > 1) { strncpy(X_Name, Argv[1], sizeof(X_Name) - 1); strncpy(X_Class, Argv[1], sizeof(X_Class) - 1); /* just in case */ X_Name[sizeof(X_Name) - 1] = NUL; X_Class[sizeof(X_Class) - 1] = NUL; if (X_Class[0] >= 'a' && X_Class[0] <= 'z') X_Class[0] -= 0x20; } if (!strcmp(*Argv, "--version")) { printf("gnuplot %s patchlevel %s\n", gnuplot_version, gnuplot_patchlevel); exit(1); } } Argc = argc; Argv = argv; /*---parse command line---------------------------------------------------*/ XrmInitialize(); XrmParseCommand(&dbCmd, options, Nopt, X_Name, &Argc, Argv); if (Argc > 1) { #ifdef PIPE_IPC if (!strcmp(Argv[1], "-noevents")) { pipe_died = 1; } else { #endif fprintf(stderr, "\n\ gnuplot: bad option: %s\n\ gnuplot: X11 aborted.\n", Argv[1]); EXIT(1); #ifdef PIPE_IPC } #endif } if (pr_GetR(dbCmd, ".display")) ldisplay = (char *) value.addr; /*---open display---------------------------------------------------------*/ #ifdef USE_MOUSE XSetErrorHandler(ErrorHandler); #endif dpy = XOpenDisplay(ldisplay); if (!dpy) { fprintf(stderr, "\n\ gnuplot: unable to open display '%s'\n\ gnuplot: X11 aborted.\n", ldisplay); EXIT(1); } scr = DefaultScreen(dpy); root = DefaultRootWindow(dpy); server_defaults = XResourceManagerString(dpy); vis = DefaultVisual(dpy, scr); dep = DefaultDepth(dpy, scr); default_cmap.colormap = DefaultColormap(dpy, scr); current_cmap = &default_cmap; max_request_size = XMaxRequestSize(dpy) / 2; /**** atoms we will need later ****/ WM_PROTOCOLS = XInternAtom(dpy, "WM_PROTOCOLS", False); WM_DELETE_WINDOW = XInternAtom(dpy, "WM_DELETE_WINDOW", False); /*---get application defaults--(subset of Xt processing)------------------*/ #ifdef VMS strcpy(buffer, "DECW$USER_DEFAULTS:GNUPLOT_X11.INI"); #elif defined OS2 /* for XFree86 ... */ { char appdefdir[MAXPATHLEN]; strncpy(appdefdir, __XOS2RedirRoot("/XFree86/lib/X11/app-defaults"), sizeof(appdefdir)); sprintf(buffer, "%s/%s", appdefdir, "Gnuplot"); } #else /* !OS/2 */ { char *appdefdir; if ((appdefdir = getenv("XAPPLRESDIR")) == NULL) { #ifdef XAPPLRESDIR strcpy(buffer, XAPPLRESDIR); strcat(buffer, "/"); strcat(buffer, "Gnuplot"); #else *buffer = '\0'; #endif } else { strcpy(buffer, appdefdir); strcat(buffer, "/"); strcat(buffer, "Gnuplot"); } } #endif /* !VMS */ dbApp = XrmGetFileDatabase(buffer); XrmMergeDatabases(dbApp, &db); /*---get server or ~/.Xdefaults-------------------------------------------*/ if (server_defaults) dbDef = XrmGetStringDatabase(server_defaults); else { #ifdef VMS strcpy(buffer, "DECW$USER_DEFAULTS:DECW$XDEFAULTS.DAT"); #else strcpy(buffer, home); strcat(buffer, "/.Xdefaults"); #endif dbDef = XrmGetFileDatabase(buffer); } XrmMergeDatabases(dbDef, &db); /*---get XENVIRONMENT or ~/.Xdefaults-hostname---------------------------*/ #ifndef VMS if ((env = getenv("XENVIRONMENT")) != NULL) dbEnv = XrmGetFileDatabase(env); else { char *p = NULL, host[MAXHOSTNAMELEN]; if (GP_SYSTEMINFO(host) < 0) { fprintf(stderr, "gnuplot: %s failed. X11 aborted.\n", SYSINFO_METHOD); EXIT(1); } if ((p = strchr(host, '.')) != NULL) *p = '\0'; strcpy(buffer, home); strcat(buffer, "/.Xdefaults-"); strcat(buffer, host); dbEnv = XrmGetFileDatabase(buffer); } XrmMergeDatabases(dbEnv, &db); #endif /* not VMS */ /*---merge command line options-------------------------------------------*/ XrmMergeDatabases(dbCmd, &db); /*---set geometry, font, colors, line widths, dash styles, point size-----*/ /* a specific visual can be forced by the X resource visual */ db_string = pr_GetR(db, ".visual") ? (char *) value.addr : (char *) 0; if (db_string) { Visual *visual = (Visual *) 0; int depth = (int) 0; char **ptr = visual_name; int i; for (i = 0; *ptr; i++, ptr++) { if (!strcmp(db_string, *ptr)) { #if 0 if (DirectColor == i) { fprintf(stderr, "DirectColor not supported by pm3d, using default.\n"); } else #endif if (GetVisual(i, &visual, &depth)) { vis = visual; dep = depth; if (vis != DefaultVisual(dpy, scr)) { /* this will be the default colormap */ default_cmap.colormap = XCreateColormap(dpy, root, vis, AllocNone); } } else { fprintf(stderr, "%s not supported by %s, using default.\n", *ptr, ldisplay); } break; } } } #if 0 if (DirectColor == vis->class) { have_pm3d = 0; } #endif CmapClear(&default_cmap); /* set default of maximal_possible_colors */ if (dep > 12) { maximal_possible_colors = 0x200; } else if (dep > 8) { maximal_possible_colors = 0x100; } else { /* will be something like PseudoColor * 8 */ maximal_possible_colors = 240; /* leave 16 for line colors */ } /* check database for maxcolors */ db_string = pr_GetR(db, ".maxcolors") ? (char *) value.addr : (char *) 0; if (db_string) { int itmp; if (sscanf(db_string, "%d", &itmp)) { if (itmp <= 0) { fprintf(stderr, "\nmaxcolors must be strictly positive.\n"); } else if (itmp > pow((double) 2, (double) dep)) { fprintf(stderr, "\noops, cannot use this many colors on a %d bit deep display.\n", dep); } else { maximal_possible_colors = itmp; } } else { fprintf(stderr, "\nunable to parse '%s' as integer\n", db_string); } } /* setting a default for minimal_possible_colors */ minimal_possible_colors = maximal_possible_colors / (num_colormaps > 1 ? 2 : 8); /* 0x20 / 30 */ /* check database for mincolors */ db_string = pr_GetR(db, ".mincolors") ? (char *) value.addr : (char *) 0; if (db_string) { int itmp; if (sscanf(db_string, "%d", &itmp)) { if (itmp <= 0) { fprintf(stderr, "\nmincolors must be strictly positive.\n"); } else if (itmp > pow((double) 2, (double) dep)) { fprintf(stderr, "\noops, cannot use this many colors on a %d bit deep display.\n", dep); } else if (itmp > maximal_possible_colors) { fprintf(stderr, "\nmincolors must be <= %d\n", maximal_possible_colors); } else { minimal_possible_colors = itmp; } } else { fprintf(stderr, "\nunable to parse '%s' as integer\n", db_string); } } pr_geometry(NULL); pr_encoding(); /* check for global default encoding */ pr_font(NULL); /* set current font to default font */ pr_color(&default_cmap); /* set colors for default colormap */ pr_width(); pr_dashes(); pr_pointsize(); pr_raise(); pr_persist(); pr_feedback(); pr_ctrlq(); pr_fastrotate(); #ifdef EXPORT_SELECTION pr_exportselection(); #endif } /*----------------------------------------------------------------------------- * pr_GetR - get resource from database using "-name" option (if any) *---------------------------------------------------------------------------*/ static char * pr_GetR(XrmDatabase xrdb, char *resource) { char name[128], class[128], *rc; strcpy(name, X_Name); strcat(name, resource); strcpy(class, X_Class); strcat(class, resource); rc = XrmGetResource(xrdb, name, class, type, &value) ? (char *) value.addr : (char *) 0; return (rc); } /*----------------------------------------------------------------------------- * pr_color - determine color values *---------------------------------------------------------------------------*/ static const char color_keys[Ncolors][30] = { "background", "bordercolor", "text", "border", "axis", "line1", "line2", "line3", "line4", "line5", "line6", "line7", "line8" }; static char color_values[Ncolors][30] = { "white", "black", "black", "black", "black", "red", "green", "blue", "magenta", "cyan", "sienna", "orange", "coral" }; static char color_values_rv[Ncolors][30] = { "black", "white", "white", "white", "white", "red", "green", "blue", "magenta", "cyan", "sienna", "orange", "coral" }; static char gray_values[Ncolors][30] = { "black", "white", "white", "gray50", "gray50", "gray100", "gray60", "gray80", "gray40", "gray90", "gray50", "gray70", "gray30" }; static void pr_color(cmap_t * cmap_ptr) { unsigned long black = BlackPixel(dpy, scr), white = WhitePixel(dpy, scr); char option[20], color[30], *v, *ctype; XColor xcolor; double intensity = -1; int n; if (pr_GetR(db, ".mono") && On(value.addr)) Mono++; if (pr_GetR(db, ".gray") && On(value.addr)) Gray++; if (pr_GetR(db, ".reverseVideo") && On(value.addr)) Rv++; if (!Gray && (vis->class == GrayScale || vis->class == StaticGray)) Mono++; if (!Mono) { ctype = (Gray) ? "Gray" : "Color"; if (current_cmap != cmap_ptr) { /* for private colormaps: make sure * that pixel 0 gets black (joze) */ xcolor.red = 0; xcolor.green = 0; xcolor.blue = 0; XAllocColor(dpy, cmap_ptr->colormap, &xcolor); } for (n = 0; n < Ncolors; n++) { strcpy(option, "."); strcat(option, color_keys[n]); if (n > 1) strcat(option, ctype); v = pr_GetR(db, option) ? (char *) value.addr : ((Gray) ? gray_values[n] : (Rv ? color_values_rv[n] : color_values[n])); if (sscanf(v, "%30[^, ], %lf", color, &intensity) == 2) { if (intensity < 0 || intensity > 1) { fprintf(stderr, "\ngnuplot: invalid color intensity in '%s'\n", color); intensity = 1; } } else { strcpy(color, v); intensity = 1; } if (!XParseColor(dpy, cmap_ptr->colormap, color, &xcolor)) { fprintf(stderr, "\ngnuplot: unable to parse '%s'. Using black.\n", color); cmap_ptr->colors[n] = black; } else { xcolor.red *= intensity; xcolor.green *= intensity; xcolor.blue *= intensity; if (XAllocColor(dpy, cmap_ptr->colormap, &xcolor)) { cmap_ptr->colors[n] = xcolor.pixel; cmap_ptr->rgbcolors[n] = ((xcolor.red>>8 & 0xff) << 16) + ((xcolor.green>>8 & 0xff) << 8) + (xcolor.blue>>8); } else { fprintf(stderr, "\ngnuplot: can't allocate '%s'. Using black.\n", v); cmap_ptr->colors[n] = black; } } } } else { cmap_ptr->colors[0] = (Rv) ? black : white; for (n = 1; n < Ncolors; n++) cmap_ptr->colors[n] = (Rv) ? white : black; } #ifdef USE_MOUSE { /* create the xor GC just for allocating the xor value * before a palette is created. This way the xor foreground * will be available. */ AllocateXorPixel(cmap_ptr); } #endif } /*----------------------------------------------------------------------------- * pr_dashes - determine line dash styles *---------------------------------------------------------------------------*/ static const char dash_keys[Ndashes][10] = { "border", "axis", "line1", "line2", "line3", "line4", "line5", "line6", "line7", "line8" }; static char dash_mono[Ndashes][10] = { "0", "16", "0", "42", "13", "44", "15", "4441", "42", "13" }; static char dash_color[Ndashes][10] = { "0", "16", "0", "0", "0", "0", "0", "0", "0", "0" }; static void pr_dashes() { int n, j, l, ok; char option[20], *v; if (pr_GetR(db, ".dashed")) { dashedlines = (!strncasecmp(value.addr, "on", 2) || !strncasecmp(value.addr, "true", 4)); } for (n = 0; n < Ndashes; n++) { strcpy(option, "."); strcat(option, dash_keys[n]); strcat(option, "Dashes"); v = pr_GetR(db, option) ? (char *) value.addr : ((Mono) ? dash_mono[n] : dash_color[n]); l = strlen(v); if (l == 1 && *v == '0') { dashes[n][0] = (unsigned char) 0; continue; } for (ok = 0, j = 0; j < l; j++) { if (v[j] >= '1' && v[j] <= '9') ok++; } if (ok != l || (ok != 2 && ok != 4)) { fprintf(stderr, "gnuplot: illegal dashes value %s:%s\n", option, v); dashes[n][0] = (unsigned char) 0; continue; } for (j = 0; j < l; j++) { dashes[n][j] = (unsigned char) (v[j] - '0'); } dashes[n][l] = (unsigned char) 0; } } /*----------------------------------------------------------------------------- * pr_font - determine font *---------------------------------------------------------------------------*/ /* wrapper functions */ int gpXTextWidth (XFontStruct *cfont, const char *str, int count) { #ifdef USE_X11_MULTIBYTE if (usemultibyte) return XmbTextEscapement(mbfont, str, count); #endif return XTextWidth(cfont, str, count); } int gpXTextHeight (XFontStruct *cfont) { #ifdef USE_X11_MULTIBYTE static XFontSetExtents *extents; if (usemultibyte) { extents = XExtentsOfFontSet(mbfont); return extents->max_logical_extent.height; } else #endif return cfont->ascent + cfont->descent; } void gpXSetFont (Display *disp, GC gc, Font fontid) { #ifdef USE_X11_MULTIBYTE if (!usemultibyte) #endif XSetFont(disp, gc, fontid); } void gpXDrawImageString (Display *disp, Drawable d, GC gc, int x, int y, const char *str, int len) { #ifdef USE_X11_MULTIBYTE if (usemultibyte) { XmbDrawImageString(disp, d, mbfont, gc, x, y, str, len); return; } #endif XDrawImageString(disp, d, gc, x, y, str, len); } void gpXDrawString (Display *disp, Drawable d, GC gc, int x, int y, const char *str, int len) { #ifdef USE_X11_MULTIBYTE if (usemultibyte) { XmbDrawString(disp, d, mbfont, gc, x, y, str, len); return; } #endif XDrawString(disp, d, gc, x, y, str, len); } void gpXFreeFont(Display *disp, XFontStruct *cfont) { #ifndef USE_X11_MULTIBYTE if (cfont) XFreeFont(disp, cfont); #else if (font) { XFreeFont(disp, font); font=NULL; } if (mbfont) { XFreeFontSet(disp, mbfont); mbfont=NULL; } #endif } XFontStruct *gpXLoadQueryFont (Display *disp, char *fontname) { #ifndef USE_X11_MULTIBYTE return XLoadQueryFont(disp, fontname); #else static char **miss, *def; static TBOOLEAN first_time = TRUE; int n_miss; char tmpfname[256]; if (!usemultibyte) return XLoadQueryFont(disp, fontname); else { fontset_transsep(tmpfname, fontname, 256-1); mbfont = XCreateFontSet(disp, tmpfname, &miss, &n_miss, &def); /* This test seemed to make sense for Japanese locales, which only */ /* claim to require a small number of character sets. But it is */ /* highly likely to fail for more generic locales like en_US.UTF-8 */ /* that claim to "require" about 2 dozen obscure character sets. */ /* EAM - do not fail the request; just continue after a warning. */ if (n_miss>0) { #if (0) if (mbfont) { XFreeFontSet(disp, mbfont); mbfont=NULL; } #else if (first_time) { fprintf(stderr,"gnuplot_x11: Some character sets not available\n"); first_time = FALSE; } while (n_miss-- > 0) FPRINTF((stderr,"Missing charset: %s\n", miss[n_miss])); #endif XFreeStringList(miss); } return NULL; } #endif } char *gpFallbackFont(void) { #ifdef USE_X11_MULTIBYTE if (usemultibyte) return FallbackFontMB; #endif return FallbackFont; } int gpXGetFontascent(XFontStruct *cfont) { #ifndef USE_X11_MULTIBYTE return cfont->ascent; #else static XFontStruct **eachfonts; char **fontnames; int max_ascent = 0; int i, n_fonts; if(!usemultibyte) return font->ascent; n_fonts = XFontsOfFontSet(mbfont, &eachfonts, &fontnames); for (i = 0; i < n_fonts; i++) { if (eachfonts[i]->ascent > max_ascent) max_ascent = eachfonts[i]->ascent; } return max_ascent; #endif } #ifdef USE_X11_MULTIBYTE int fontset_transsep(char *nfname, char *ofname, int n) { char *s; strncpy(nfname, ofname, n); if (nfname[n-1]!='\0') nfname[n]='\0'; if (strchr(nfname, ',')) return 1; s = nfname; while ((s = strchr(nfname, FontSetSep)) != NULL){ *s = ','; nfname = s; } return 0; } #endif static void pr_encoding() { char *encoding; if ((encoding = pr_GetR(db, ".encoding"))) { strncpy(default_encoding, encoding, sizeof(default_encoding)-1); } } static void pr_font( fontname ) char *fontname; { static char previous_font_name[128]; char fontspec[128]; int fontsize = 0; #ifdef USE_X11_MULTIBYTE char *orgfontname = NULL; #endif if (!fontname || !(*fontname)) { fontname = default_font; *previous_font_name = '\0'; } if (!fontname || !(*fontname)) { if ((fontname = pr_GetR(db, ".font"))) strncpy(default_font, fontname, sizeof(default_font)-1); FPRINTF((stderr, "gnuplot_x11: setting default font %s from Xresource\n", fontname)); } #ifdef USE_X11_MULTIBYTE if (fontname && strncmp(fontname, "mbfont:", 7) == 0) { if (multibyte_fonts_usable) { usemultibyte = 1; orgfontname = fontname; fontname = &fontname[7]; } else { usemultibyte=0; fontname=NULL; } } else usemultibyte=0; #endif if (!fontname) fontname = gpFallbackFont(); /* EAM DEBUG - Free previous font before searching for a new one. */ /* This doesn't seem right, since we will probably need it again */ /* very soon. But if we don't free it, we gradually leak memory. */ gpXFreeFont(dpy, font); font = gpXLoadQueryFont(dpy, fontname); #ifndef USE_X11_MULTIBYTE if (!font) { #else if (!font && !mbfont && !strchr(fontname, FontSetSep)) { #endif /* EAM 19-Aug-2002 Try to construct a plausible X11 full font spec */ /* We are passed "font<, size><, slant>" */ char shortname[64], *fontencoding, slant, *weight; int sep; #ifdef USE_X11_MULTIBYTE int backfont = 0; #endif /* Enhanced font processing wants a method of requesting a new size */ /* for whatever the previously selected font was, so we have to save */ /* and reuse the previous font name to construct the new spec. */ if (!strncmp(fontname, "DEFAULT", 7)) { sscanf(&fontname[8], "%d", &fontsize); fontname = default_font; *previous_font_name = '\0'; #ifdef USE_X11_MULTIBYTE backfont = 1; #endif } else if (*fontname == ',') { sscanf(&fontname[1], "%d", &fontsize); fontname = previous_font_name; #ifdef USE_X11_MULTIBYTE backfont = 1; #endif } #ifdef USE_X11_MULTIBYTE if (backfont && fontname && strncmp(fontname, "mbfont:", 7) == 0 && multibyte_fonts_usable) { usemultibyte = 1; orgfontname = fontname; fontname = &fontname[7]; } #endif sep = strcspn(fontname, ","); if (sep >= sizeof(shortname)) sep = sizeof(shortname) - 1; strncpy(shortname, fontname, sep); shortname[sep] = '\0'; if (!fontsize) sscanf( &(fontname[sep+1]), "%d", &fontsize); if (fontsize > 99 || fontsize < 1) fontsize = 12; slant = strstr(&fontname[sep+1], "italic") ? 'i' : strstr(&fontname[sep+1], "oblique") ? 'o' : 'r' ; weight = strstr(&fontname[sep+1], "bold") ? "bold" : strstr(&fontname[sep+1], "medium") ? "medium" : "*" ; if (!strncmp("Symbol", shortname, 6) || !strncmp("symbol", shortname, 6)) fontencoding = "*-*"; #ifdef USE_X11_MULTIBYTE else if (usemultibyte) fontencoding = "*-*"; #endif else fontencoding = ( encoding == S_ENC_CP437 ? "dosencoding-cp437" : encoding == S_ENC_CP850 ? "dosencoding-cp850" : encoding == S_ENC_ISO8859_1 ? "iso8859-1" : encoding == S_ENC_ISO8859_2 ? "iso8859-2" : encoding == S_ENC_ISO8859_15 ? "iso8859-15" : encoding == S_ENC_KOI8_R ? "koi8-r" : encoding == S_ENC_KOI8_U ? "koi8-u" : encoding == S_ENC_UTF8 ? "iso10646-1" : default_encoding[0] ? default_encoding : #if (0) "*-*" ) ; /* EAM 2011 - This used to work but, alas, no longer. */ #else "iso8859-1" ) ; /* biased to English, but since the wildcard doesn't work ... */ #endif sprintf(fontspec, "-*-%s-%s-%c-*-*-%d-*-*-*-*-*-%s", shortname, weight, slant, fontsize, fontencoding ); font = gpXLoadQueryFont(dpy, fontspec); #ifndef USE_X11_MULTIBYTE if (!font) { #else if (!font && !mbfont) { #endif /* Try to decode some common PostScript font names */ if (!strcmp("Times-Bold", shortname) || !strcmp("times-bold", shortname)) { sprintf(fontspec, "-*-times-bold-r-*-*-%d-*-*-*-*-*-%s", fontsize, fontencoding); } else if (!strcmp("Times-Roman", shortname) || !strcmp("times-roman", shortname)) { sprintf(fontspec, "-*-times-medium-r-*-*-%d-*-*-*-*-*-%s", fontsize, fontencoding); } else if (!strcmp("Times-Italic", shortname) || !strcmp("times-italic", shortname)) { sprintf(fontspec, "-*-times-medium-i-*-*-%d-*-*-*-*-*-%s", fontsize, fontencoding); } else if (!strcmp("Times-BoldItalic", shortname) || !strcmp("times-bolditalic", shortname)) { sprintf(fontspec, "-*-times-bold-i-*-*-%d-*-*-*-*-*-%s", fontsize, fontencoding); } else if (!strcmp("Helvetica-Bold", shortname) || !strcmp("helvetica-bold", shortname)) { sprintf(fontspec, "-*-helvetica-bold-r-*-*-%d-*-*-*-*-*-%s", fontsize, fontencoding); } else if (!strcmp("Helvetica-Oblique", shortname) || !strcmp("helvetica-oblique", shortname)) { sprintf(fontspec, "-*-helvetica-medium-o-*-*-%d-*-*-*-*-*-%s", fontsize, fontencoding); } else if (!strcmp("Helvetica-BoldOblique", shortname) || !strcmp("helvetica-boldoblique", shortname)) { sprintf(fontspec, "-*-helvetica-bold-o-*-*-%d-*-*-*-*-*-%s", fontsize, fontencoding); } else if (!strcmp("Helvetica-Narrow-Bold", shortname) || !strcmp("helvetica-narrow-bold", shortname)) { sprintf(fontspec, "-*-arial narrow-bold-r-*-*-%d-*-*-*-*-*-%s", fontsize, fontencoding); } #ifdef USE_X11_MULTIBYTE /* Japanese standard PostScript font names (adviced from * N.Matsuda). */ else if (multibyte_fonts_usable && (!strncmp("Ryumin-Light", shortname, strlen("Ryumin-Light")) || !strncmp("ryumin-light", shortname, strlen("ryumin-light")))) { if (!usemultibyte) { usemultibyte = 1; orgfontname = fontname; } sprintf(fontspec, "-*-mincho-medium-%c-*--%d-*", slant, fontsize); } else if (multibyte_fonts_usable && (!strncmp("GothicBBB-Medium", shortname, strlen("GothicBBB-Medium")) || !strncmp("gothicbbb-medium", shortname, strlen("gothicbbb-medium")))) { if (!usemultibyte) { usemultibyte = 1; orgfontname = fontname; } /* FIXME: Doesn't work on most non-japanese setups, because */ /* many purely Western fonts are gothic-bold. */ sprintf(fontspec, "-*-gothic-bold-%c-*--%d-*", slant, fontsize); } #endif /* USE_X11_MULTIBYTE */ font = gpXLoadQueryFont(dpy, fontspec); #ifdef USE_X11_MULTIBYTE if (usemultibyte && !mbfont) { /* But (mincho|gothic) X fonts are not provided * on some X servers even in Japan */ sprintf(fontspec, "*-%s-%c-*--%d-*", weight, slant, fontsize); font = gpXLoadQueryFont(dpy, fontspec); } #endif /* USE_X11_MULTIBYTE */ } } #ifndef USE_X11_MULTIBYTE if (font) { #else if (font || mbfont) { if (usemultibyte && orgfontname) fontname = orgfontname; #endif strncpy(previous_font_name, fontname, sizeof(previous_font_name)-1); FPRINTF((stderr, "gnuplot_x11:saving current font name \"%s\"\n", previous_font_name)); } /* By now we have tried everything we can to honor the specific request. */ /* Try some common scaleable fonts before falling back to a last resort */ /* fixed font. */ #ifndef USE_X11_MULTIBYTE if (!font) { #else if (!usemultibyte && !font) { #endif sprintf(fontspec, "-*-bitstream vera sans-bold-r-*-*-%d-*-*-*-*-*-*-*", fontsize); font = gpXLoadQueryFont(dpy, fontspec); fontname = fontspec; if (!font) { sprintf(fontspec, "-*-arial-medium-r-*-*-%d-*-*-*-*-*-*-*", fontsize); font = gpXLoadQueryFont(dpy, fontspec); } if (!font) { sprintf(fontspec, "-*-helvetica-medium-r-*-*-%d-*-*-*-*-*-*", fontsize); font = gpXLoadQueryFont(dpy, fontspec); } if (!font) { font = gpXLoadQueryFont(dpy, gpFallbackFont()); fontname = gpFallbackFont(); } if (!font) { fprintf(stderr, "\ngnuplot_x11: can't find usable font - X11 aborted.\n"); EXIT(1); } FPRINTF((stderr, "\ngnuplot_x11: requested font not found, using '%s' instead.\n", fontname)); } #ifdef USE_X11_MULTIBYTE if (usemultibyte && !mbfont) { /* multibyte font setting */ font = gpXLoadQueryFont(dpy, gpFallbackFont()); if (!mbfont) { usemultibyte=0; font = gpXLoadQueryFont(dpy, gpFallbackFont()); if (!font) { fprintf(stderr, "\ngnuplot_x11: can't find usable font - X11 aborted.\n"); EXIT(1); } } fontname = gpFallbackFont(); } #endif /* USE_X11_MULTIBYTE */ vchar = gpXTextHeight(font); hchar = gpXTextWidth(font, "0123456789", 10) / 10; FPRINTF((stderr, "gnuplot_x11: pr_font() set font %s, vchar %d hchar %d\n", fontname, vchar, hchar)); } /*----------------------------------------------------------------------------- * pr_geometry - determine window geometry *---------------------------------------------------------------------------*/ static void pr_geometry(char *instr) { char *geometry = (instr != NULL)? instr : pr_GetR(db, ".geometry"); int x, y, flags; unsigned int w, h; if (geometry) { flags = XParseGeometry(geometry, &x, &y, &w, &h); if (flags & WidthValue) gW = w; if (flags & HeightValue) gH = h; if (flags & (WidthValue | HeightValue)) gFlags = (gFlags & ~PSize) | USSize; if (flags & XValue) gX = (flags & XNegative) ? x + DisplayWidth(dpy, scr) - gW - BorderWidth * 2 : x; if (flags & YValue) gY = (flags & YNegative) ? y + DisplayHeight(dpy, scr) - gH - BorderWidth * 2 : y; if (flags & (XValue | YValue)) gFlags = (gFlags & ~PPosition) | USPosition; } } /*----------------------------------------------------------------------------- * pr_pointsize - determine size of points for 'points' plotting style *---------------------------------------------------------------------------*/ static void pr_pointsize() { if (pr_GetR(db, ".pointsize")) { if (sscanf((char *) value.addr, "%lf", &pointsize) == 1) { if (pointsize <= 0 || pointsize > 10) { fprintf(stderr, "\ngnuplot: invalid pointsize '%s'\n", value.addr); pointsize = 1; } } else { fprintf(stderr, "\ngnuplot: invalid pointsize '%s'\n", value.addr); pointsize = 1; } } else { pointsize = 1; } } /*----------------------------------------------------------------------------- * pr_width - determine line width values *---------------------------------------------------------------------------*/ static const char width_keys[Nwidths][30] = { "border", "axis", "line1", "line2", "line3", "line4", "line5", "line6", "line7", "line8" }; static void pr_width() { int n; char option[20], *v; for (n = 0; n < Nwidths; n++) { strcpy(option, "."); strcat(option, width_keys[n]); strcat(option, "Width"); if ((v = pr_GetR(db, option)) != NULL) { if (*v < '0' || *v > '9' || strlen(v) > 1) fprintf(stderr, "gnuplot: illegal width value %s:%s\n", option, v); else widths[n] = (unsigned int) atoi(v); } } } /*----------------------------------------------------------------------------- * pr_window - create window *---------------------------------------------------------------------------*/ static void pr_window(plot_struct *plot) { char *title = pr_GetR(db, ".title"); static XSizeHints hints; static XClassHint class_hint; int Tvtwm = 0; long event_mask = KeyPressMask | KeyReleaseMask | StructureNotifyMask | PointerMotionMask | PointerMotionHintMask | ButtonPressMask | ButtonReleaseMask | ExposureMask | EnterWindowMask; FPRINTF((stderr, "(pr_window) \n")); #ifdef EXTERNAL_X11_WINDOW if (plot->external_container != None) { XWindowAttributes gattr; XGetWindowAttributes(dpy, plot->external_container, &gattr); plot->x = 0; plot->y = 0; plot->width = gattr.width; plot->height = gattr.height; plot->gheight = gattr.height; if (!plot->window) { plot->window = XCreateWindow(dpy, plot->external_container, plot->x, plot->y, plot->width, plot->height, 0, dep, InputOutput, vis, 0, NULL); gp_execute_GE_plotdone(plot->window); /* notify main program, send WINDOWID */ } } #endif /* EXTERNAL_X11_WINDOW */ if (have_pm3d) { XSetWindowAttributes attr; unsigned long mask = CWBackPixel | CWBorderPixel | CWColormap; attr.background_pixel = plot->cmap->colors[0]; attr.border_pixel = plot->cmap->colors[1]; attr.colormap = plot->cmap->colormap; if (!plot->window) { plot->window = XCreateWindow(dpy, root, plot->x, plot->y, plot->width, plot->height, BorderWidth, dep, InputOutput, vis, mask, &attr); gp_execute_GE_plotdone(plot->window); /* notify main program, send WINDOWID */ } else XChangeWindowAttributes(dpy, plot->window, mask, &attr); } else #ifdef EXTERNAL_X11_WINDOW if (!plot->window) #endif { plot->window = XCreateSimpleWindow(dpy, root, plot->x, plot->y, plot->width, plot->height, BorderWidth, plot->cmap->colors[1], plot->cmap->colors[0]); gp_execute_GE_plotdone(plot->window); /* notify main program, send WINDOWID */ } /* Return if something wrong. */ if (plot->window == None) return; /* ask ICCCM-compliant window manager to tell us when close window * has been chosen, rather than just killing us */ XChangeProperty(dpy, plot->window, WM_PROTOCOLS, XA_ATOM, 32, PropModeReplace, (unsigned char *) &WM_DELETE_WINDOW, 1); if (pr_GetR(db, ".clear") && On(value.addr)) Clear++; if (pr_GetR(db, ".tvtwm") && On(value.addr)) Tvtwm++; if (!Tvtwm) { hints.flags = plot->posn_flags; } else { hints.flags = (plot->posn_flags & ~USPosition) | PPosition; /* ? */ } hints.x = gX; hints.y = gY; hints.width = plot->width; hints.height = plot->height; XSetNormalHints(dpy, plot->window, &hints); /* set WM_CLASS for interaction with gnome-shell */ class_hint.res_name = "gnuplot"; class_hint.res_class = "Gnuplot"; XSetClassHint(dpy, plot->window, &class_hint); if (pr_GetR(db, ".iconic") && On(value.addr)) { XWMHints wmh; wmh.flags = StateHint; wmh.initial_state = IconicState; XSetWMHints(dpy, plot->window, &wmh); } #if 0 /* 1 clear, 0 do not clear */ if (plot->titlestring) { free(plot->titlestring); plot->titlestring = 0; } #endif /* Set up the events to process */ XSelectInput(dpy, plot->window, event_mask); #ifdef EXTERNAL_X11_WINDOW /* Two clients of an X window cannot share ButtonPress events at the same time. * The outside application may still have ButtonPress selected, and that is the * reason for using the external window as a container. */ if (plot->external_container != None) XSelectInput(dpy, plot->external_container, event_mask & (~(ButtonPressMask|ButtonReleaseMask))); #endif XSync(dpy, 0); /* If title doesn't exist, create one. */ #if 1 #define ICON_TEXT "gplt" #define TEMP_NUM_LEN 16 { /* append the X11 terminal number (if greater than zero) */ char numstr[sizeof(ICON_TEXT)+TEMP_NUM_LEN+1]; /* space for text, number and terminating \0 */ if (plot->plot_number > 0) sprintf(numstr, "%s%d%c", ICON_TEXT, plot->plot_number, '\0'); else sprintf(numstr, "%s%c", ICON_TEXT, '\0'); FPRINTF((stderr, "term_number is %d", plot->plot_number)); XSetIconName(dpy, plot->window, numstr); #undef TEMP_NUM_LEN if (!plot->titlestring) { int orig_len; if (!title) title = X_Class; orig_len = strlen(title); /* memory for text, white space, number and terminating \0 */ if ((plot->titlestring = (char *) malloc(orig_len + ((orig_len && (plot->plot_number > 0)) ? 1 : 0) + strlen(numstr) - strlen(ICON_TEXT) + 1))) { strcpy(plot->titlestring, title); if (orig_len && (plot->plot_number > 0)) plot->titlestring[orig_len++] = ' '; strcpy(plot->titlestring + orig_len, numstr + strlen(ICON_TEXT)); XStoreName(dpy, plot->window, plot->titlestring); } else XStoreName(dpy, plot->window, title); } else { XStoreName(dpy, plot->window, plot->titlestring); } } #undef ICON_TEXT #endif XMapWindow(dpy, plot->window); #ifdef EXTERNAL_X11_WINDOW if (plot->external_container != None) XMapWindow(dpy, plot->external_container); #endif windows_open++; } /***** pr_raise ***/ static void pr_raise() { if (pr_GetR(db, ".raise")) do_raise = (On(value.addr)); } static void pr_persist() { if (pr_GetR(db, ".persist")) persist = (On(value.addr)); } static void pr_feedback() { if (pr_GetR(db, ".feedback")) feedback = !(!strncasecmp(value.addr, "off", 3) || !strncasecmp(value.addr, "false", 5)); FPRINTF((stderr, "gplt_x11: set feedback to %d (%s)\n", feedback, value.addr)); } static void pr_ctrlq() { if (pr_GetR(db, ".ctrlq")) { ctrlq = (!strncasecmp(value.addr, "on", 2) || !strncasecmp(value.addr, "true", 4)); FPRINTF((stderr, "gplt_x11: require <ctrl>q and <ctrl><space>\n")); } } static void pr_fastrotate() { if (pr_GetR(db, ".fastrotate")) { fast_rotate = (!strncasecmp(value.addr, "on", 2) || !strncasecmp(value.addr, "true", 4)); FPRINTF((stderr, "gplt_x11: Use fast but imperfect text rotation\n")); } } #ifdef EXPORT_SELECTION static void pr_exportselection() { /* Allow export selection to be turned on or off using X resource *exportselection */ if (pr_GetR(db, ".exportselection")) { if (!strncmp((char *)value.addr, "off", 3) || !strncmp((char *)value.addr, "false", 5)) { exportselection = FALSE; FPRINTF((stderr, "gnuplot_x11: exportselection is disabled\n")); } } } #endif /************ code to handle selection export *********************/ #ifdef EXPORT_SELECTION /* bit of a bodge, but ... */ static struct plot_struct *exported_plot; static Time export_time; static void export_graph(struct plot_struct *plot) { FPRINTF((stderr, "export_graph(0x%x)\n", plot)); XSetSelectionOwner(dpy, EXPORT_SELECTION, plot->window, CurrentTime); /* to check we have selection, we would have to do a * GetSelectionOwner(), but if it failed, it failed - no big deal */ if (! *selection) { exported_plot = plot; export_time = (!plot || !(plot->time)) ? 1 : plot->time; } } static void handle_selection_event(XEvent *event) { switch (event->type) { case SelectionRequest: { XEvent reply; static Atom XA_TARGETS = (Atom) 0; static Atom XA_TIMESTAMP = (Atom) 0; if (XA_TARGETS == 0) XA_TARGETS = XInternAtom(dpy, "TARGETS", False); if (XA_TIMESTAMP == 0) XA_TIMESTAMP = XInternAtom(dpy, "TIMESTAMP", False); reply.type = SelectionNotify; reply.xselection.send_event = True; reply.xselection.display = event->xselectionrequest.display; reply.xselection.requestor = event->xselectionrequest.requestor; reply.xselection.selection = event->xselectionrequest.selection; reply.xselection.target = event->xselectionrequest.target; reply.xselection.property = event->xselectionrequest.property; reply.xselection.time = event->xselectionrequest.time; if (reply.xselection.target == XA_TARGETS) { static Atom targets[] = { XA_PIXMAP, XA_COLORMAP }; static Atom mousecoord[] = { XA_STRING }; FPRINTF((stderr, "Targets request from %d\n", reply.xselection.requestor)); if (*selection) XChangeProperty(dpy, reply.xselection.requestor, reply.xselection.property, reply.xselection.target, 32, PropModeReplace, (unsigned char *) (mousecoord), 1); else if (exported_plot) XChangeProperty(dpy, reply.xselection.requestor, reply.xselection.property, reply.xselection.target, 32, PropModeReplace, (unsigned char *) targets, 2); } else if (reply.xselection.target == XA_COLORMAP) { FPRINTF((stderr, "colormap request from %d\n", reply.xselection.requestor)); XChangeProperty(dpy, reply.xselection.requestor, reply.xselection.property, reply.xselection.target, 32, PropModeReplace, (unsigned char *) &(default_cmap.colormap), 1); } else if (reply.xselection.target == XA_PIXMAP && exported_plot) { FPRINTF((stderr, "pixmap request from %d\n", reply.xselection.requestor)); XChangeProperty(dpy, reply.xselection.requestor, reply.xselection.property, reply.xselection.target, 32, PropModeReplace, (unsigned char *) &(exported_plot->pixmap), 1); exported_plot = NULL; } else if (reply.xselection.target == XA_TIMESTAMP) { FPRINTF((stderr, "timestamp request from %d : %ld\n", reply.xselection.requestor, export_time)); XChangeProperty(dpy, reply.xselection.requestor, reply.xselection.property, reply.xselection.target, 32, PropModeReplace, (unsigned char *) &(export_time), 1); #ifdef PIPE_IPC } else if (reply.xselection.target == XA_STRING && *selection) { FPRINTF((stderr, "XA_STRING request\n")); XChangeProperty(dpy, reply.xselection.requestor, reply.xselection.property, reply.xselection.target, 8, PropModeReplace, (unsigned char *) selection, strlen(selection)); *selection = '\0'; #endif } else { FPRINTF((stderr, "selection request target: %d\n", reply.xselection.target)); reply.xselection.property = None; if (!exported_plot && ! *selection) /* We have now satisfied the select request. Say goodbye */ XSetSelectionOwner(dpy, EXPORT_SELECTION, None, CurrentTime); } XSendEvent(dpy, reply.xselection.requestor, False, 0L, &reply); /* we never block on XNextEvent(), so must flush manually * (took me *ages* to find this out !) */ XFlush(dpy); } break; } } #endif /* EXPORT_SELECTION */ #if defined(USE_MOUSE) && defined(MOUSE_ALL_WINDOWS) /* Convert X-window mouse coordinates to coordinate system of plot axes */ static void mouse_to_coords(plot_struct *plot, XEvent *event, double *x, double *y, double *x2, double *y2) { int xx = 4096. * (event->xbutton.x + 0.5)/ plot->width; int yy = 4095. - 4096. * (event->xbutton.y + 0.5)/ plot->gheight; FPRINTF((stderr, "gnuplot_x11 %d: mouse at %d %d\t", __LINE__, xx, yy)); *x = mouse_to_axis(xx, &(plot->axis_scale[FIRST_X_AXIS])); *y = mouse_to_axis(yy, &(plot->axis_scale[FIRST_Y_AXIS])); *x2 = mouse_to_axis(xx, &(plot->axis_scale[SECOND_X_AXIS])); *y2 = mouse_to_axis(yy, &(plot->axis_scale[SECOND_Y_AXIS])); FPRINTF((stderr, "mouse x y %10g %10g x2 y2 %10g %10g\n", *x, *y, *x2, *y2 )); } static double mouse_to_axis(int mouse_coord, axis_scale_t *axis) { double axis_coord; if (axis->term_scale == 0.0) return 0.; axis_coord = ((double)(mouse_coord - axis->term_lower)) / axis->term_scale + axis->min; if (axis->logbase > 0.0) axis_coord = exp(axis_coord * axis->logbase); return axis_coord; } #endif /*----------------------------------------------------------------------------- * Add_Plot_To_Linked_List - Create space for plot and put in linked list. *---------------------------------------------------------------------------*/ static plot_struct * Add_Plot_To_Linked_List(int plot_number) { plot_struct *psp; if (plot_number >= 0) /* Make sure plot does not already exist in the list. */ psp = Find_Plot_In_Linked_List_By_Number(plot_number); else psp = NULL; if (psp == NULL) { psp = (plot_struct *) malloc(sizeof(plot_struct)); if (psp) { /* Initialize structure variables. */ memset((void*)psp, 0, sizeof(plot_struct)); psp->plot_number = plot_number; #if EXTERNAL_X11_WINDOW /* Number and container methods are mutually exclusive. */ if (plot_number >= 0) psp->external_container = None; #endif /* Add link to beginning of the list. */ psp->prev_plot = NULL; if (plot_list_start != NULL) { plot_list_start->prev_plot = psp; psp->next_plot = plot_list_start; } else psp->next_plot = NULL; plot_list_start = psp; } else { psp = NULL; fprintf(stderr, ERROR_NOTICE("Could not allocate memory for plot.\n\n")); } } return psp; } /*----------------------------------------------------------------------------- * Remove_Plot_From_Linked_List - Remove from linked list and free memory. *---------------------------------------------------------------------------*/ static void Remove_Plot_From_Linked_List(Window plot_window) { /* Make sure plot exists in the list. */ plot_struct *psp = Find_Plot_In_Linked_List_By_Window(plot_window); if (psp != NULL) { /* Remove link from the list. */ if (psp->next_plot != NULL) psp->next_plot->prev_plot = psp->prev_plot; if (psp->prev_plot != NULL) { psp->prev_plot->next_plot = psp->next_plot; } else { plot_list_start = psp->next_plot; } /* If global pointers point at this plot, reassign them. */ if (current_plot == psp) { #if 0 /* Make some other plot current. */ if (psp->prev_plot != NULL) current_plot = psp->prev_plot; else current_plot = psp->next_plot; #else /* No current plot. */ current_plot = NULL; #endif } /* Deallocate memory. Make sure plot removed from list first. */ delete_plot(psp); free(psp); } } /*----------------------------------------------------------------------------- * Find_Plot_In_Linked_List_By_Number - Search for the plot in the linked list. *---------------------------------------------------------------------------*/ static plot_struct * Find_Plot_In_Linked_List_By_Number(int plot_number) { plot_struct *psp = plot_list_start; while (psp != NULL) { if (psp->plot_number == plot_number) break; psp = psp->next_plot; } return psp; } /*----------------------------------------------------------------------------- * Find_Plot_In_Linked_List_By_Window - Search for the plot in the linked list. *---------------------------------------------------------------------------*/ static plot_struct * Find_Plot_In_Linked_List_By_Window(Window window) { plot_struct *psp = plot_list_start; while (psp != NULL) { if (psp->window == window) break; psp = psp->next_plot; } #ifdef EXTERNAL_X11_WINDOW if (psp != NULL) return psp; /* Search through the containers, but do so as a separate loop to not * effect performance for normal numbered plot window searches. */ psp = plot_list_start; while (psp != NULL) { if (psp->external_container != None && psp->external_container == window) break; psp = psp->next_plot; } #endif return psp; } /*----------------------------------------------------------------------------- * Find_Plot_In_Linked_List_By_CMap - Search for the plot in the linked list. *---------------------------------------------------------------------------*/ static plot_struct * Find_Plot_In_Linked_List_By_CMap(cmap_t *cmp) { plot_struct *psp = plot_list_start; while (psp != NULL) { cmap_struct *csp = psp->first_cmap_struct; while (csp != NULL) { if (csp->cmap == cmp) break; csp = csp->next_cmap_struct; } if (csp != NULL) break; psp = psp->next_plot; } return psp; } /* NOTE: The removing of plots via the ErrorHandler routine is rather tricky. The error events can happen at any time during execution of the program, very similar to an interrupt. The consequence is that the error handling routine can't remove plots from the linked list directly. Instead we use a queuing system in which the main code eventually removes the plots. Furthermore, to be safe, only the error handling routine should create and delete elements in the FIFO. Otherwise, the possibility of bogus pointers can arise if error events happen at the exact wrong time. (Requires a lot of thought.) The scheme here is for the error handler to put elements in the queue marked as "processed = 0" and then indicate that the main code should process elements in the queue. The main code then copies the information about the plot to remove and sets the value "processed = 1". Afterward the main code removes the plot. */ /*----------------------------------------------------------------------------- * Add_Plot_To_Remove_FIFO_Queue - Method for error handler to destroy plot. *---------------------------------------------------------------------------*/ static void Add_Plot_To_Remove_FIFO_Queue(Window plot_window) { /* Clean up any processed links. */ plot_remove_struct *prsp = remove_fifo_queue_start; FPRINTF((stderr, "Add plot to remove FIFO queue called.\n")); while (prsp != NULL) { if (prsp->processed) { remove_fifo_queue_start = prsp->next_remove; free(prsp); prsp = remove_fifo_queue_start; FPRINTF((stderr, " -> Removed a processed element from FIFO queue.\n")); } else { break; } } /* Go to end of list while checking if this window is already in list. */ while (prsp != NULL) { if (prsp->plot_window_to_remove == plot_window) { /* Discard this request because the same window is yet to be processed. X11 could be stuck sending the same error message again and again while the main program is not responding for some reason. This would lead to the FIFO queue growing indefinitely. */ return; } if (prsp->next_remove == NULL) break; else prsp = prsp->next_remove; } /* Create link and add to end of queue. */ {plot_remove_struct *prsp_new = (plot_remove_struct *) malloc(sizeof(plot_remove_struct)); if (prsp_new) { /* Initialize structure variables. */ prsp_new->next_remove = NULL; prsp_new->plot_window_to_remove = plot_window; prsp_new->processed = 0; if (remove_fifo_queue_start) prsp->next_remove = prsp_new; else remove_fifo_queue_start = prsp_new; process_remove_fifo_queue = 1; /* Indicate to main loop that there is a plot to remove. */ FPRINTF((stderr, " -> Added an element to FIFO queue.\n")); } else { fprintf(stderr, ERROR_NOTICE("Could not allocate memory for plot remove queue.\n\n")); }} } /*----------------------------------------------------------------------------- * Process_Remove_FIFO_Queue - Remove plots queued by error handler. *---------------------------------------------------------------------------*/ static void Process_Remove_FIFO_Queue() { plot_remove_struct *prsp = remove_fifo_queue_start; /* Clear flag before processing so that if an ErrorHandler event * comes along while running the remainder of this routine, any new * error events that were missed because of timing issues will be * processed next time through the main loop. */ process_remove_fifo_queue = 0; /* Go through the list and process any unprocessed queue request. * No clean up is done here because having two asynchronous routines * modifying the queue would be too dodgy. The ErrorHandler creates * and removes links in the queue based upon the processed flag. */ while (prsp != NULL) { /* Make a copy of the remove information structure before changing flag. * Otherwise, there would be the possibility of the error handler routine * removing the associated link upon seeing the "processed" flag set. From * this side of things, the pointer becomes invalid once that flag is set. */ plot_remove_struct prs; prs.plot_window_to_remove = prsp->plot_window_to_remove; prs.next_remove = prsp->next_remove; prs.processed = prsp->processed; /* Set processed flag before processing the event. This is so * that the FIFO queue does not have to repeat window entries. * If the error handler were to break in right before the * "processed" flag is set to 1 and not put another link in * the FIFO because it sees the window in question is already * in the FIFO, we're OK. The reason is that the window in * question is still to be processed. On the other hand, if * we were to process then set the flag, an entry in the queue * could potentially be lost. */ prsp->processed = 1; FPRINTF((stderr, "Processed element in remove FIFO queue.\n")); /* NOW process the plot to remove. */ if (!prs.processed) Remove_Plot_From_Linked_List(prs.plot_window_to_remove); prsp = prs.next_remove; } /* Issue an X11 error so that error handler cleans up queue? * Really, this isn't super important. Without issuing a bogus * error, the processed queue elements will be deleted the * next time there is an error. Until another error comes * along it means there is maybe ten or so words of memory * reserved on the heap for the FIFO queue. In some sense, * the extra code is hardly worth the effort, especially * when X11 documentation is so sparse on the matter of errors. */ } /* Extract details about the extent of a bit mask by doing a * single bit shift up and then down (left shift) and down * and then up (right shift). When the pre- and post-shift * numbers are not equal, a bit was lost so that is the * extent of the mask. */ static unsigned short BitMaskDetails(unsigned long mask, unsigned short *left_shift, unsigned short *right_shift) { unsigned short i; unsigned long m = mask; if (mask == 0) { *left_shift = 0; *right_shift = 0; return 0; } for (i=0; i < 32; i++) { if ( (((m << 1)&0xffffffff) >> 1) != m ) break; else m <<= 1; } *left_shift = i; m = mask; for (i=0; i < 32 ; i++) { if ( ((m >> 1) << 1) != m ) break; else m >>= 1; } *right_shift = i; return (unsigned short) m; } /*----------------------------------------------------------------------------- * Add_CMap_To_Linked_List - Create space for colormap and put in linked list. *---------------------------------------------------------------------------*/ static cmap_t * Add_CMap_To_Linked_List(void) { cmap_t *cmp = (cmap_t *) malloc(sizeof(cmap_t)); if (cmp) { /* Add link to beginning of the list. */ cmp->prev_cmap = NULL; if (cmap_list_start != NULL) { cmap_list_start->prev_cmap = cmp; cmp->next_cmap = cmap_list_start; } else cmp->next_cmap = NULL; cmap_list_start = cmp; } else { cmp = NULL; fprintf(stderr, ERROR_NOTICE("Could not allocate memory for color map.\n\n")); } /* Initialize structure variables. */ CmapClear(cmp); cmp->colormap = XCreateColormap(dpy, root, vis, AllocNone); assert(cmp->colormap); pr_color(cmp); /* set default colors for lines */ return cmp; } /*----------------------------------------------------------------------------- * Remove_CMap_From_Linked_List - Remove from linked list and free memory. *---------------------------------------------------------------------------*/ static void Remove_CMap_From_Linked_List(cmap_t *cmp) { /* Make sure colormap exists in the list. */ cmp = Find_CMap_In_Linked_List(cmp); if (cmp != NULL) { /* Remove link from the list. */ if (cmp->next_cmap != NULL) cmp->next_cmap->prev_cmap = cmp->prev_cmap; if (cmp->prev_cmap != NULL) { cmp->prev_cmap->next_cmap = cmp->next_cmap; } else { cmap_list_start = cmp->next_cmap; } /* If global pointers point at this plot, reassign them. */ if (current_cmap == cmp) { #if 0 /* Make some other cmap current. */ if (cmp->prev_cmap != NULL) current_cmap = cmp->prev_cmap; else current_cmap = psp->next_cmap; #else /* No current cmap. */ current_cmap = &default_cmap; #endif } /* Remove any memory for pixels and memory for colormap structure. */ ReleaseColormap(cmp); } } /*----------------------------------------------------------------------------- * Find_CMap_In_Linked_List - Search for the color map in the linked list. *---------------------------------------------------------------------------*/ static cmap_t * Find_CMap_In_Linked_List(cmap_t *colormap) { cmap_t *cmp = cmap_list_start; while (cmp != NULL) { if (cmp == colormap) break; cmp = cmp->next_cmap; } return cmp; } /*----------------------------------------------------------------------------- * cmaps_differ - Compare two colormaps, return 1 if differ. *---------------------------------------------------------------------------*/ static int cmaps_differ(cmap_t *cmap1, cmap_t *cmap2) { /* First compare non-pointer elements. */ if ( memcmp(&(cmap1->colors[0]), &(cmap2->colors[0]), (long)&(cmap1->pixels)-(long)&(cmap1->colors[0])) ) return 1; /* Now compare pointer elements. */ if (cmap1->allocated) { if (cmap1->pixels && cmap2->pixels) { if ( memcmp(cmap1->pixels, cmap2->pixels, cmap1->allocated*sizeof(cmap1->pixels[0])) ) return 1; } else return 1; } return 0; /* They are the same. */ } /* * Shared code for setting fill style */ #define plot current_plot static void x11_setfill(GC *gc, int style) { int fillpar = style >> 4; XColor xcolor, bgnd; float dim; int idx; style = style & 0xf; switch (style) { case FS_SOLID: case FS_TRANSPARENT_SOLID: /* filldensity is from 0..100 percent */ if (fillpar >= 100) break; dim = (double)(fillpar)/100.; /* use halftone fill pattern according to filldensity */ xcolor.red = (double)(0xffff) * (double)((plot->current_rgb >> 16) & 0xff) /255.; xcolor.green = (double)(0xffff) * (double)((plot->current_rgb >> 8) & 0xff) /255.; xcolor.blue = (double)(0xffff) * (double)(plot->current_rgb & 0xff) /255.; bgnd.red = (double)(0xffff) * (double)((plot->cmap->rgbcolors[0] >> 16) & 0xff) /255.; bgnd.green = (double)(0xffff) * (double)((plot->cmap->rgbcolors[0] >> 8) & 0xff) /255.; bgnd.blue = (double)(0xffff) * (double)(plot->cmap->rgbcolors[0] & 0xff) /255.; xcolor.red = dim*xcolor.red + (1.-dim)*bgnd.red; xcolor.green = dim*xcolor.green + (1.-dim)*bgnd.green; xcolor.blue = dim*xcolor.blue + (1.-dim)*bgnd.blue; FPRINTF((stderr,"Dimming poly color %.6x by %.2f to %2d %2d %2d\n", (unsigned long)(plot->current_rgb), dim, xcolor.red, xcolor.green, xcolor.blue)); if (XAllocColor(dpy, plot->cmap->colormap, &xcolor)) XSetForeground(dpy, *gc, xcolor.pixel); break; case FS_PATTERN: case FS_TRANSPARENT_PATTERN: /* use fill pattern according to fillpattern */ idx = (int) fillpar; /* fillpattern is enumerated */ if (idx < 0) idx = 0; idx = idx % stipple_pattern_num; XSetStipple(dpy, *gc, stipple_pattern[idx]); if (style == FS_TRANSPARENT_PATTERN) XSetFillStyle(dpy, *gc, FillStippled); else XSetFillStyle(dpy, *gc, FillOpaqueStippled); XSetBackground(dpy, *gc, plot->cmap->colors[0]); break; case FS_EMPTY: /* fill with background color */ XSetFillStyle(dpy, *gc, FillSolid); XSetForeground(dpy, *gc, plot->cmap->colors[0]); break; default: /* fill with current color */ XSetFillStyle(dpy, *gc, FillSolid); break; } } #undef plot �������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/ansichek.h������������������������������������������������������������������������0000644�0004711�0000144�00000005753�11630656061�012674� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: ansichek.h,v 1.8 2011/09/04 11:08:33 markisch Exp $ */ /* GNUPLOT - ansichek.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* figure out if we can handle ANSI prototypes * We invent and use ANSI_C rather than using __STDC__ directly * because some compilers (eg MS VC++ 4.1) switch off __STDC__ * when extensions are enabled, but if extensions are disabled, * the standard headers cause compile errors. We can -DANSI_C * but -D__STDC__ might confuse headers */ #ifndef ANSI_CHECK_H # define ANSI_CHECK_H # if defined(__STDC__) && __STDC__ # ifndef ANSI_C # define ANSI_C # endif # endif /* __STDC__ */ # ifndef HAVE_CONFIG_H /* Only relevant for systems which don't run configure */ /* are all these compiler tests necessary ? - can the makefiles not * just set ANSI_C ? */ # if defined(ANSI_C) || defined (_MSC_VER) # ifndef PROTOTYPES # define PROTOTYPES # endif # ifndef HAVE_STRINGIZE # ifndef VAXC /* not quite ANSI_C */ # define HAVE_STRINGIZE # endif # endif # endif /* ANSI_C ... */ # ifndef ANSI_C # define const # endif # endif /* !HAVE_CONFIG_H */ /* used to be __P but it was just too difficult to guess whether * standard headers define it. It's not as if the defn is * particularly difficult to do ourselves... */ # ifdef PROTOTYPES # define __PROTO(proto) proto # else # define __PROTO(proto) () # endif /* generic pointer type. For old compilers this has to be changed to char *, * but I don't know if there are any CC's that support void and not void * */ # define generic void #endif /* ANSI_CHECK_H */ ���������������������gnuplot-4.6.4/src/tabulate.c������������������������������������������������������������������������0000644�0004711�0000144�00000031053�12051247157�012673� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: tabulate.c,v 1.13.2.3 2012/11/15 03:54:49 sfeam Exp $"); } #endif /* GNUPLOT - tabulate.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * EAM - April 2007 * Collect the routines for tablular output into a separate file, and * extend support to newer plot styles (labels, vectors, ...). * These routines used to masquerade as a terminal type "set term table", * but since version 4.2 they are controlled by "set table <foo>" independent * of terminal settings. */ #include "alloc.h" #include "axis.h" #include "datafile.h" #include "gp_time.h" #include "graphics.h" #include "graph3d.h" #include "plot.h" #include "plot3d.h" #include "tabulate.h" static char *expand_newline __PROTO((const char *in)); static FILE *outfile; /* This routine got longer than is reasonable for a macro */ #define OUTPUT_NUMBER(x,y) output_number(x,y,buffer) #define BUFFERSIZE 150 static void output_number(double coord, int axis, char *buffer) { /* treat timedata and "%s" output format as a special case: * return a number. * "%s" in combination with any other character is treated * like a normal time format specifier and handled in time.c */ if (axis_array[axis].datatype == DT_TIMEDATE && strcmp(axis_array[axis].formatstring, "%s") == 0) { gprintf(buffer, BUFFERSIZE, "%.0f", 1.0, coord); } else if (axis_array[axis].datatype == DT_TIMEDATE) { buffer[0] = '"'; gstrftime(buffer+1, BUFFERSIZE-1, axis_array[axis].formatstring, coord); while (strchr(buffer,'\n')) {*(strchr(buffer,'\n')) = ' ';} strcat(buffer,"\""); } else if (axis_array[axis].log) { double x = pow(axis_array[axis].base, coord); gprintf(buffer, BUFFERSIZE, axis_array[axis].formatstring, 1.0, x); } else gprintf(buffer, BUFFERSIZE, axis_array[axis].formatstring, 1.0, coord); fputs(buffer, outfile); fputc(' ', outfile); } void print_table(struct curve_points *current_plot, int plot_num) { int i, curve; char *buffer = gp_alloc(BUFFERSIZE, "print_table: output buffer"); outfile = (table_outfile) ? table_outfile : gpoutfile; for (curve = 0; curve < plot_num; curve++, current_plot = current_plot->next) { struct coordinate GPHUGE *point = NULL; /* two blank lines between tabulated plots by prepending \n here */ fprintf(outfile, "\n# Curve %d of %d, %d points", curve, plot_num, current_plot->p_count); if ((current_plot->title) && (*current_plot->title)) { char *title = expand_newline(current_plot->title); fprintf(outfile, "\n# Curve title: \"%s\"", title); free(title); } fprintf(outfile, "\n# x y"); switch (current_plot->plot_style) { case BOXES: case XERRORBARS: fputs(" xlow xhigh", outfile); break; case BOXERROR: case YERRORBARS: fputs(" ylow yhigh", outfile); break; case BOXXYERROR: case XYERRORBARS: fputs(" xlow xhigh ylow yhigh", outfile); break; case FILLEDCURVES: fputs("1 y2", outfile); break; case FINANCEBARS: fputs(" open ylow yhigh yclose", outfile); break; case CANDLESTICKS: fputs(" open ylow yhigh yclose width", outfile); break; case LABELPOINTS: fputs(" label",outfile); break; case VECTOR: fputs(" delta_x delta_y",outfile); break; case LINES: case POINTSTYLE: case LINESPOINTS: case DOTS: case IMPULSES: case STEPS: case FSTEPS: case HISTEPS: break; case IMAGE: fputs(" pixel", outfile); break; case RGBIMAGE: case RGBA_IMAGE: fputs(" red green blue alpha", outfile); break; default: if (interactive) fprintf(stderr, "Tabular output of %s plot style not fully implemented\n", current_plot->plot_style == HISTOGRAMS ? "histograms" : "this"); break; } if (current_plot->varcolor) fputs(" color", outfile); fputs(" type\n", outfile); if (current_plot->plot_style == LABELPOINTS) { struct text_label *this_label; for (this_label = current_plot->labels->next; this_label != NULL; this_label = this_label->next) { char *label = expand_newline(this_label->text); OUTPUT_NUMBER(this_label->place.x, current_plot->x_axis); OUTPUT_NUMBER(this_label->place.y, current_plot->y_axis); fprintf(outfile, " \"%s\"\n", label); free(label); } } else { int plotstyle = current_plot->plot_style; if (plotstyle == HISTOGRAMS && current_plot->histogram->type == HT_ERRORBARS) plotstyle = YERRORBARS; for (i = 0, point = current_plot->points; i < current_plot->p_count; i++, point++) { /* Reproduce blank lines read from original input file, if any */ if (!memcmp(point, &blank_data_line, sizeof(struct coordinate))) { fprintf(outfile, "\n"); continue; } /* FIXME HBB 20020405: had better use the real x/x2 axes of this plot */ OUTPUT_NUMBER(point->x, current_plot->x_axis); OUTPUT_NUMBER(point->y, current_plot->y_axis); switch (plotstyle) { case BOXES: case XERRORBARS: OUTPUT_NUMBER(point->xlow, current_plot->x_axis); OUTPUT_NUMBER(point->xhigh, current_plot->x_axis); /* Hmmm... shouldn't this write out width field of box * plots, too, if stored? */ break; case BOXXYERROR: case XYERRORBARS: OUTPUT_NUMBER(point->xlow, current_plot->x_axis); OUTPUT_NUMBER(point->xhigh, current_plot->x_axis); /* FALLTHROUGH */ case BOXERROR: case YERRORBARS: OUTPUT_NUMBER(point->ylow, current_plot->y_axis); OUTPUT_NUMBER(point->yhigh, current_plot->y_axis); break; case IMAGE: fprintf(outfile,"%g ",point->z); break; case RGBIMAGE: case RGBA_IMAGE: fprintf(outfile,"%4d ",(int)point->CRD_R); fprintf(outfile,"%4d ",(int)point->CRD_G); fprintf(outfile,"%4d ",(int)point->CRD_B); fprintf(outfile,"%4d ",(int)point->CRD_A); break; case FILLEDCURVES: OUTPUT_NUMBER(point->yhigh, current_plot->y_axis); break; case FINANCEBARS: OUTPUT_NUMBER(point->ylow, current_plot->y_axis); OUTPUT_NUMBER(point->yhigh, current_plot->y_axis); OUTPUT_NUMBER(point->z, current_plot->y_axis); break; case CANDLESTICKS: OUTPUT_NUMBER(point->ylow, current_plot->y_axis); OUTPUT_NUMBER(point->yhigh, current_plot->y_axis); OUTPUT_NUMBER(point->z, current_plot->y_axis); OUTPUT_NUMBER(2. * (point->x - point->xlow), current_plot->x_axis); break; case VECTOR: OUTPUT_NUMBER((point->xhigh - point->x), current_plot->x_axis); OUTPUT_NUMBER((point->yhigh - point->y), current_plot->y_axis); break; case LINES: case POINTSTYLE: case LINESPOINTS: case DOTS: case IMPULSES: case STEPS: case FSTEPS: case HISTEPS: break; default: /* ? */ break; } /* switch(plot type) */ if (current_plot->varcolor) { double colorval = current_plot->varcolor[i]; if ((current_plot->lp_properties.pm3d_color.value < 0.0) && (current_plot->lp_properties.pm3d_color.type == TC_RGB)) { fprintf(outfile, "0x%06x", (unsigned int)(colorval)); } else if (current_plot->lp_properties.pm3d_color.type == TC_Z) { OUTPUT_NUMBER(colorval, COLOR_AXIS); } else if (current_plot->lp_properties.l_type == LT_COLORFROMCOLUMN) { OUTPUT_NUMBER(colorval, COLOR_AXIS); } } fprintf(outfile, " %c\n", current_plot->points[i].type == INRANGE ? 'i' : current_plot->points[i].type == OUTRANGE ? 'o' : 'u'); } /* for(point i) */ } putc('\n', outfile); } /* for(curve) */ fflush(outfile); free(buffer); } void print_3dtable(int pcount) { struct surface_points *this_plot; int i, surface; struct coordinate GPHUGE *point; struct coordinate GPHUGE *tail; char *buffer = gp_alloc(BUFFERSIZE, "print_3dtable output buffer"); outfile = (table_outfile) ? table_outfile : gpoutfile; for (surface = 0, this_plot = first_3dplot; surface < pcount; this_plot = this_plot->next_sp, surface++) { fprintf(outfile, "\n# Surface %d of %d surfaces\n", surface, pcount); if ((this_plot->title) && (*this_plot->title)) { char *title = expand_newline(this_plot->title); fprintf(outfile, "\n# Curve title: \"%s\"", title); free(title); } switch (this_plot->plot_style) { case LABELPOINTS: { struct text_label *this_label; for (this_label = this_plot->labels->next; this_label != NULL; this_label = this_label->next) { char *label = expand_newline(this_label->text); OUTPUT_NUMBER(this_label->place.x, FIRST_X_AXIS); OUTPUT_NUMBER(this_label->place.y, FIRST_Y_AXIS); OUTPUT_NUMBER(this_label->place.z, FIRST_Z_AXIS); fprintf(outfile, " \"%s\"\n", label); free(label); } } continue; case LINES: case POINTSTYLE: case IMPULSES: case DOTS: case VECTOR: case IMAGE: break; default: fprintf(stderr, "Tabular output of this 3D plot style not implemented\n"); continue; } if (draw_surface) { struct iso_curve *icrvs; int curve; /* only the curves in one direction */ for (curve = 0, icrvs = this_plot->iso_crvs; icrvs && curve < this_plot->num_iso_read; icrvs = icrvs->next, curve++) { fprintf(outfile, "\n# IsoCurve %d, %d points\n# x y z", curve, icrvs->p_count); if (this_plot->plot_style == VECTOR) { tail = icrvs->next->points; fprintf(outfile, " delta_x delta_y delta_z"); } else tail = NULL; /* Just to shut up a compiler warning */ fprintf(outfile, " type\n"); for (i = 0, point = icrvs->points; i < icrvs->p_count; i++, point++) { OUTPUT_NUMBER(point->x, FIRST_X_AXIS); OUTPUT_NUMBER(point->y, FIRST_Y_AXIS); OUTPUT_NUMBER(point->z, FIRST_Z_AXIS); if (this_plot->plot_style == VECTOR) { OUTPUT_NUMBER((tail->x - point->x), FIRST_X_AXIS); OUTPUT_NUMBER((tail->y - point->y), FIRST_Y_AXIS); OUTPUT_NUMBER((tail->z - point->z), FIRST_Z_AXIS); tail++; } else if (this_plot->plot_style == IMAGE) { fprintf(outfile,"%g ",point->CRD_COLOR); } fprintf(outfile, "%c\n", point->type == INRANGE ? 'i' : point->type == OUTRANGE ? 'o' : 'u'); } /* for(point) */ } /* for(icrvs) */ putc('\n', outfile); } /* if(draw_surface) */ if (draw_contour) { int number = 0; struct gnuplot_contours *c = this_plot->contours; while (c) { int count = c->num_pts; struct coordinate GPHUGE *point = c->coords; if (c->isNewLevel) /* don't display count - contour split across chunks */ /* put # in case user wants to use it for a plot */ /* double blank line to allow plot ... index ... */ fprintf(outfile, "\n# Contour %d, label: %s\n", number++, c->label); for (; --count >= 0; ++point) { OUTPUT_NUMBER(point->x, FIRST_X_AXIS); OUTPUT_NUMBER(point->y, FIRST_Y_AXIS); OUTPUT_NUMBER(point->z, FIRST_Z_AXIS); putc('\n', outfile); } /* blank line between segments of same contour */ putc('\n', outfile); c = c->next; } /* while (contour) */ } /* if (draw_contour) */ } /* for(surface) */ fflush(outfile); free(buffer); } static char * expand_newline(const char *in) { char *tmpstr = gp_alloc(2*strlen(in),"enl"); const char *s = in; char *t = tmpstr; do { if (*s == '\n') { *t++ = '\\'; *t++ = 'n'; } else *t++ = *s; } while (*s++); return tmpstr; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/linkopt.vms�����������������������������������������������������������������������0000644�0004711�0000144�00000000032�06677000242�013125� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sys$library:vaxcrtl/share ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/axis.c����������������������������������������������������������������������������0000644�0004711�0000144�00000171031�12202541070�012024� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: axis.c,v 1.97.2.5 2013/08/08 06:45:31 sfeam Exp $"); } #endif /* GNUPLOT - axis.c */ /*[ * Copyright 2000, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "axis.h" #include "stdfn.h" #include "alloc.h" #include "command.h" #include "gadgets.h" #include "gp_time.h" #include "graphics.h" /* For label_width() */ /* #include "setshow.h" */ #include "term_api.h" #include "variable.h" /* HBB 20000416: this is the start of my try to centralize everything * related to axes, once and for all. It'll probably end up as a * global array of OO-style 'axis' objects, when it's done */ /* HBB 20000725: gather all per-axis variables into a struct, and set * up a single large array of such structs. Next step might be to use * isolated AXIS structs, instead of an array. At least for *some* of * the axes... */ AXIS axis_array[AXIS_ARRAY_SIZE] = AXIS_ARRAY_INITIALIZER(DEFAULT_AXIS_STRUCT); /* Keep defaults varying by axis in their own array, to ease initialization * of the main array */ const AXIS_DEFAULTS axis_defaults[AXIS_ARRAY_SIZE] = { { -10, 10, "z" , TICS_ON_BORDER, }, { -10, 10, "y" , TICS_ON_BORDER | TICS_MIRROR, }, { -10, 10, "x" , TICS_ON_BORDER | TICS_MIRROR, }, { -10, 10, "cb", TICS_ON_BORDER | TICS_MIRROR, }, { -10, 10, "z2", NO_TICS, }, { -10, 10, "y2", NO_TICS, }, { -10, 10, "x2", NO_TICS, }, { - 0, 10, "r" , TICS_ON_AXIS, }, { - 5, 5, "t" , NO_TICS, }, { - 5, 5, "u" , NO_TICS, }, { - 5, 5, "v" , NO_TICS, }, }; /* either the 'set format <axis>' or an automatically invented time * format string */ static char ticfmt[AXIS_ARRAY_SIZE][MAX_ID_LEN+1]; /* HBB 20010831: new enum typedef, to make code using this more * self-explanatory */ /* The unit the tics of a given time/date axis are to interpreted in */ /* HBB 20040318: start at one, to avoid undershoot */ typedef enum e_timelevel { TIMELEVEL_SECONDS = 1, TIMELEVEL_MINUTES, TIMELEVEL_HOURS, TIMELEVEL_DAYS, TIMELEVEL_WEEKS, TIMELEVEL_MONTHS, TIMELEVEL_YEARS } t_timelevel; static t_timelevel timelevel[AXIS_ARRAY_SIZE]; /* The <increment> given in a 'set {x|y|...}tics', or an automatically * generated one, if automatic tic placement is active */ static double ticstep[AXIS_ARRAY_SIZE]; /* HBB 20000506 new variable: parsing table for use with the table * module, to help generalizing set/show/unset/save, where possible */ const struct gen_table axisname_tbl[AXIS_ARRAY_SIZE + 1] = { { "z", FIRST_Z_AXIS}, { "y", FIRST_Y_AXIS}, { "x", FIRST_X_AXIS}, { "cb",COLOR_AXIS}, { "z2",SECOND_Z_AXIS}, { "y2",SECOND_Y_AXIS}, { "x2",SECOND_X_AXIS}, { "r", POLAR_AXIS}, { "t", T_AXIS}, { "u", U_AXIS}, { "v", V_AXIS}, { NULL, -1} }; /* penalty for doing tics by callback in gen_tics is need for global * variables to communicate with the tic routines. Dont need to be * arrays for this */ /* HBB 20000416: they may not need to be array[]ed, but it'd sure * make coding easier, in some places... */ /* HBB 20000416: for the testing, these are global... */ /* static */ int tic_start, tic_direction, tic_text, rotate_tics, tic_hjust, tic_vjust, tic_mirror; /* These are declare volatile in order to fool the compiler into not */ /* optimizing out intermediate values, thus hiding loss of precision.*/ volatile double vol_this_tic; volatile double vol_previous_tic; const struct ticdef default_axis_ticdef = DEFAULT_AXIS_TICDEF; /* axis labels */ const text_label default_axis_label = EMPTY_LABELSTRUCT; /* zeroaxis drawing */ const lp_style_type default_axis_zeroaxis = DEFAULT_AXIS_ZEROAXIS; /* grid drawing */ /* int grid_selection = GRID_OFF; */ #define DEFAULT_GRID_LP {0, LT_AXIS, 0, 0, 1.0, 0.0, FALSE, DEFAULT_COLORSPEC} const struct lp_style_type default_grid_lp = DEFAULT_GRID_LP; struct lp_style_type grid_lp = DEFAULT_GRID_LP; struct lp_style_type mgrid_lp = DEFAULT_GRID_LP; int grid_layer = -1; double polar_grid_angle = 0; /* nonzero means a polar grid */ TBOOLEAN raxis = TRUE; /* Length of the longest tics label, set by widest_tic_callback(): */ int widest_tic_strlen; /* flag to indicate that in-line axis ranges should be ignored */ TBOOLEAN inside_zoom; /* axes being used by the current plot */ /* These are mainly convenience variables, replacing separate copies of * such variables originally found in the 2D and 3D plotting code */ AXIS_INDEX x_axis = FIRST_X_AXIS; AXIS_INDEX y_axis = FIRST_Y_AXIS; AXIS_INDEX z_axis = FIRST_Z_AXIS; /* --------- internal prototypes ------------------------- */ static double make_auto_time_minitics __PROTO((t_timelevel, double)); static double make_tics __PROTO((AXIS_INDEX, int)); static double quantize_time_tics __PROTO((AXIS_INDEX, double, double, int)); static double time_tic_just __PROTO((t_timelevel, double)); static double round_outward __PROTO((AXIS_INDEX, TBOOLEAN, double)); static TBOOLEAN axis_position_zeroaxis __PROTO((AXIS_INDEX)); static double quantize_duodecimal_tics __PROTO((double, int)); static void get_position_type __PROTO((enum position_type * type, int *axes)); /* ---------------------- routines ----------------------- */ /* check range and take logs of min and max if logscale * this also restores min and max for ranges like [10:-10] */ #define LOG_MSG(x) x " range must be greater than 0 for scale" /* {{{ axis_unlog_interval() */ /* this is used in a few places all over the code: undo logscaling of * a given range if necessary. If checkrange is TRUE, will int_error() if * range is invalid */ void axis_unlog_interval(AXIS_INDEX axis, double *min, double *max, TBOOLEAN checkrange) { if (axis_array[axis].log) { if (checkrange && (*min<= 0.0 || *max <= 0.0)) int_error(NO_CARET, "%s range must be greater than 0 for log scale", axis_defaults[axis].name); *min = (*min<=0) ? -VERYLARGE : AXIS_DO_LOG(axis,*min); *max = (*max<=0) ? -VERYLARGE : AXIS_DO_LOG(axis,*max); } } /* }}} */ /* {{{ axis_revert_and_unlog_range() */ void axis_revert_and_unlog_range(AXIS_INDEX axis) { if (axis_array[axis].range_is_reverted) { double temp = axis_array[axis].min; axis_array[axis].min = axis_array[axis].max; axis_array[axis].max = temp; } axis_unlog_interval(axis, &axis_array[axis].min, &axis_array[axis].max, 1); } /* }}} */ /* {{{ axis_log_value_checked() */ double axis_log_value_checked(AXIS_INDEX axis, double coord, const char *what) { if (axis_array[axis].log) { if (coord <= 0.0) { graph_error("%s has %s coord of %g; must be above 0 for log scale!", what, axis_defaults[axis].name, coord); } else return (AXIS_DO_LOG(axis,coord)); } return (coord); } /* }}} */ /* {{{ axis_checked_extend_empty_range() */ /* * === SYNOPSIS === * * This function checks whether the data and/or plot range in a given axis * is too small (which would cause divide-by-zero and/or infinite-loop * problems later on). If so, * - if autoscaling is in effect for this axis, we widen the range * - otherwise, we abort with a call to int_error() (which prints out * a suitable error message, then (hopefully) aborts this command and * returns to the command prompt or whatever). * * * === HISTORY AND DESIGN NOTES === * * 1998 Oct 4, Jonathan Thornburg <jthorn@galileo.thp.univie.ac.at> * * This function used to be a (long) macro FIXUP_RANGE(AXIS, WHICH) * which was (identically!) defined in plot2d.c and plot3d.c . As * well as now being a function instead of a macro, the logic is also * changed: The "too small" range test no longer depends on 'set zero' * and is now properly scaled relative to the data magnitude. * * The key question in designing this function is the policy for just how * much to widen the data range by, as a function of the data magnitude. * This is to some extent a matter of taste. IMHO the key criterion is * that (at least) all of the following should (a) not infinite-loop, and * (b) give correct plots, regardless of the 'set zero' setting: * plot 6.02e23 # a huge number >> 1 / FP roundoff level * plot 3 # a "reasonable-sized" number * plot 1.23e-12 # a small number still > FP roundoff level * plot 1.23e-12 * sin(x) # a small function still > FP roundoff level * plot 1.23e-45 # a tiny number << FP roundoff level * plot 1.23e-45 * sin(x) # a tiny function << FP roundoff level * plot 0 # or (more commonly) a data file of all zeros * That is, IMHO gnuplot should *never* infinite-loop, and it should *never* * producing an incorrect or misleading plot. In contrast, the old code * would infinite-loop on most of these examples with 'set zero 0.0' in * effect, or would plot the small-amplitude sine waves as the zero function * with 'zero' set larger than the sine waves' amplitude. * * The current code plots all the above examples correctly and without * infinite looping. * * HBB 2000/05/01: added an additional up-front test, active only if * the new 'mesg' parameter is non-NULL. * * === USAGE === * * Arguments: * axis = (in) An integer specifying which axis (x1, x2, y1, y2, z, etc) * we should do our stuff for. We use this argument as an * index into the global arrays {min,max,auto}_array . In * practice this argument will typically be one of the constants * {FIRST,SECOND}_{X,Y,Z}_AXIS defined in plot.h. * mesg = (in) if non-NULL, will check if the axis range is valid (min * not +VERYLARGE, max not -VERYLARGE), and int_error() out * if it isn't. * * Global Variables: * auto_array, min_array, max_array (in out) (defined in axis.[ch]): * variables describing the status of autoscaling and range ends, for * each of the possible axes. * * c_token = (in) (defined in plot.h) Used in formatting an error message. * */ void axis_checked_extend_empty_range(AXIS_INDEX axis, const char *mesg) { /* These two macro definitions set the range-widening policy: */ /* widen [0:0] by +/- this absolute amount */ #define FIXUP_RANGE__WIDEN_ZERO_ABS 1.0 /* widen [nonzero:nonzero] by -/+ this relative amount */ #define FIXUP_RANGE__WIDEN_NONZERO_REL 0.01 double dmin = axis_array[axis].min; double dmax = axis_array[axis].max; /* HBB 20000501: this same action was taken just before most of * the invocations of this function, so I moved it into here. * Only do this if 'mesg' is non-NULL --> pass NULL if you don't * want the test */ if (mesg && (axis_array[axis].min == VERYLARGE || axis_array[axis].max == -VERYLARGE)) int_error(c_token, mesg); if (dmax - dmin == 0.0) { /* empty range */ if (axis_array[axis].autoscale) { /* range came from autoscaling ==> widen it */ double widen = (dmax == 0.0) ? FIXUP_RANGE__WIDEN_ZERO_ABS : FIXUP_RANGE__WIDEN_NONZERO_REL * fabs(dmax); if (!(axis == FIRST_Z_AXIS && !mesg)) /* set view map */ fprintf(stderr, "Warning: empty %s range [%g:%g], ", axis_defaults[axis].name, dmin, dmax); /* HBB 20010525: correctly handle single-ended * autoscaling, too: */ if (axis_array[axis].autoscale & AUTOSCALE_MIN) axis_array[axis].min -= widen; if (axis_array[axis].autoscale & AUTOSCALE_MAX) axis_array[axis].max += widen; if (!(axis == FIRST_Z_AXIS && !mesg)) /* set view map */ fprintf(stderr, "adjusting to [%g:%g]\n", axis_array[axis].min, axis_array[axis].max); } else { /* user has explicitly set the range (to something empty) ==> we're in trouble */ int_error(NO_CARET, "Can't plot with an empty %s range!", axis_defaults[axis].name); } } } /* }}} */ /* {{{ make smalltics for time-axis */ static double make_auto_time_minitics(t_timelevel tlevel, double incr) { double tinc = 0.0; if ((int)tlevel < TIMELEVEL_SECONDS) tlevel = TIMELEVEL_SECONDS; switch (tlevel) { case TIMELEVEL_SECONDS: case TIMELEVEL_MINUTES: if (incr >= 5) tinc = 1; if (incr >= 10) tinc = 5; if (incr >= 20) tinc = 10; if (incr >= 60) tinc = 20; if (incr >= 2 * 60) tinc = 60; if (incr >= 6 * 60) tinc = 2 * 60; if (incr >= 12 * 60) tinc = 3 * 60; if (incr >= 24 * 60) tinc = 6 * 60; break; case TIMELEVEL_HOURS: if (incr >= 20 * 60) tinc = 10 * 60; if (incr >= 3600) tinc = 30 * 60; if (incr >= 2 * 3600) tinc = 3600; if (incr >= 6 * 3600) tinc = 2 * 3600; if (incr >= 12 * 3600) tinc = 3 * 3600; if (incr >= 24 * 3600) tinc = 6 * 3600; break; case TIMELEVEL_DAYS: if (incr > 2 * 3600) tinc = 3600; if (incr > 4 * 3600) tinc = 2 * 3600; if (incr > 7 * 3600) tinc = 3 * 3600; if (incr > 13 * 3600) tinc = 6 * 3600; if (incr > DAY_SEC) tinc = 12 * 3600; if (incr > 2 * DAY_SEC) tinc = DAY_SEC; break; case TIMELEVEL_WEEKS: if (incr > 2 * DAY_SEC) tinc = DAY_SEC; if (incr > 7 * DAY_SEC) tinc = 7 * DAY_SEC; break; case TIMELEVEL_MONTHS: if (incr > 2 * DAY_SEC) tinc = DAY_SEC; if (incr > 15 * DAY_SEC) tinc = 10 * DAY_SEC; if (incr > 2 * MON_SEC) tinc = MON_SEC; if (incr > 6 * MON_SEC) tinc = 3 * MON_SEC; if (incr > 2 * YEAR_SEC) tinc = YEAR_SEC; break; case TIMELEVEL_YEARS: if (incr > 2 * MON_SEC) tinc = MON_SEC; if (incr > 6 * MON_SEC) tinc = 3 * MON_SEC; if (incr > 2 * YEAR_SEC) tinc = YEAR_SEC; if (incr > 10 * YEAR_SEC) tinc = 5 * YEAR_SEC; if (incr > 50 * YEAR_SEC) tinc = 10 * YEAR_SEC; if (incr > 100 * YEAR_SEC) tinc = 20 * YEAR_SEC; if (incr > 200 * YEAR_SEC) tinc = 50 * YEAR_SEC; if (incr > 300 * YEAR_SEC) tinc = 100 * YEAR_SEC; break; } return (tinc); } /* }}} */ /* {{{ copy_or_invent_formatstring() */ /* Either copies the axis formatstring over to the ticfmt[] array, or * in case that's not applicable because the format hasn't been * specified correctly, invents a time/date output format by looking * at the range of values. Considers time/date fields that don't * change across the range to be unimportant */ /* HBB 20010803: removed two arguments, and renamed function */ char * copy_or_invent_formatstring(AXIS_INDEX axis) { struct tm t_min, t_max; /* HBB 20010803: moved this here ... was done whenever this was called, * anyway */ if ( axis_array[axis].datatype != DT_TIMEDATE || !axis_array[axis].format_is_numeric) { /* The simple case: formatstring is usable, so use it! */ strcpy(ticfmt[axis], axis_array[axis].formatstring); /* Ensure enough precision to distinguish tics */ if (!strcmp(ticfmt[axis], DEF_FORMAT)) { double axmin = AXIS_DE_LOG_VALUE(axis,axis_array[axis].min); double axmax = AXIS_DE_LOG_VALUE(axis,axis_array[axis].max); int precision = (ceil(-log10(fabs(axmax-axmin)))); if ((axmin*axmax > 0) && precision > 4) sprintf(ticfmt[axis],"%%.%df", (precision>14) ? 14 : precision); } return ticfmt[axis]; } /* Else, have to invent an output format string. */ *ticfmt[axis] = 0; /* make sure we strcat to empty string */ ggmtime(&t_min, time_tic_just(timelevel[axis], axis_array[axis].min)); ggmtime(&t_max, time_tic_just(timelevel[axis], axis_array[axis].max)); if (t_max.tm_year == t_min.tm_year && t_max.tm_yday == t_min.tm_yday) { /* same day, skip date */ if (t_max.tm_hour != t_min.tm_hour) { strcpy(ticfmt[axis], "%H"); } if (timelevel[axis] < TIMELEVEL_DAYS) { if (ticfmt[axis][0]) strcat(ticfmt[axis], ":"); strcat(ticfmt[axis], "%M"); } if (timelevel[axis] < TIMELEVEL_HOURS) { strcat(ticfmt[axis], ":%S"); } } else { if (t_max.tm_year != t_min.tm_year) { /* different years, include year in ticlabel */ /* check convention, day/month or month/day */ if (strchr(axis_array[axis].timefmt, 'm') < strchr(axis_array[axis].timefmt, 'd')) { strcpy(ticfmt[axis], "%m/%d/%"); } else { strcpy(ticfmt[axis], "%d/%m/%"); } if (((int) (t_max.tm_year / 100)) != ((int) (t_min.tm_year / 100))) { strcat(ticfmt[axis], "Y"); } else { strcat(ticfmt[axis], "y"); } } else { /* Copy day/month order over from input format */ if (strchr(axis_array[axis].timefmt, 'm') < strchr(axis_array[axis].timefmt, 'd')) { strcpy(ticfmt[axis], "%m/%d"); } else { strcpy(ticfmt[axis], "%d/%m"); } } if (timelevel[axis] < TIMELEVEL_WEEKS) { /* Note: seconds can't be useful if there's more than 1 * day's worth of data... */ strcat(ticfmt[axis], "\n%H:%M"); } } return ticfmt[axis]; } /* }}} */ /* {{{ quantize_normal_tics() */ /* the guide parameter was intended to allow the number of tics * to depend on the relative sizes of the plot and the font. * It is the approximate upper limit on number of tics allowed. * But it did not go down well with the users. * A value of 20 gives the same behaviour as 3.5, so that is * hardwired into the calls to here. Maybe we will restore it * to the automatic calculation one day */ /* HBB 20020220: Changed to use value itself as first argument, not * log10(value). Done to allow changing the calculation method * to avoid numerical problems */ double quantize_normal_tics(double arg, int guide) { /* order of magnitude of argument: */ double power = pow(10.0, floor(log10(arg))); double xnorm = arg / power; /* approx number of decades */ /* we expect 1 <= xnorm <= 10 */ double posns = guide / xnorm; /* approx number of tic posns per decade */ /* with guide=20, we expect 2 <= posns <= 20 */ double tics; /* FIXME HBB 20020220: Looking at these, I would normally expect * to see posns*tics to be always about the same size. But we * rather suddenly drop from 2.0 to 1.0 at tic step 0.5. Why? */ /* JRV 20021117: fixed this by changing next to last threshold from 1 to 2. However, with guide=20, this doesn't matter. */ if (posns > 40) tics = 0.05; /* eg 0, .05, .10, ... */ else if (posns > 20) tics = 0.1; /* eg 0, .1, .2, ... */ else if (posns > 10) tics = 0.2; /* eg 0,0.2,0.4,... */ else if (posns > 4) tics = 0.5; /* 0,0.5,1, */ else if (posns > 2) tics = 1; /* 0,1,2,.... */ else if (posns > 0.5) tics = 2; /* 0, 2, 4, 6 */ else /* getting desperate... the ceil is to make sure we * go over rather than under - eg plot [-10:10] x*x * gives a range of about 99.999 - tics=xnorm gives * tics at 0, 99.99 and 109.98 - BAD ! * This way, inaccuracy the other way will round * up (eg 0->100.0001 => tics at 0 and 101 * I think latter is better than former */ tics = ceil(xnorm); return (tics * power); } /* }}} */ /* {{{ make_tics() */ /* Implement TIC_COMPUTED case, i.e. automatically choose a usable * ticking interval for the given axis. For the meaning of the guide * parameter, see the comment on quantize_normal_tics() */ static double make_tics(AXIS_INDEX axis, int guide) { double xr, tic; xr = fabs(axis_array[axis].min - axis_array[axis].max); if (xr == 0) return 1; /* Anything will do, since we'll never use it */ if (xr >= VERYLARGE) int_error(NO_CARET,"%s axis range undefined or overflow", axis_defaults[axis].name); tic = quantize_normal_tics(xr, guide); /* FIXME HBB 20010831: disabling this might allow short log axis * to receive better ticking... */ if (axis_array[axis].log && tic < 1.0) tic = 1.0; if (axis_array[axis].datatype == DT_TIMEDATE) return quantize_time_tics(axis, tic, xr, guide); else return tic; } /* }}} */ /* {{{ quantize_duodecimal_tics */ /* HBB 20020220: New function, to be used to properly tic axes with a * duodecimal reference, as used in times (60 seconds, 60 minuts, 24 * hours, 12 months). Derived from quantize_normal_tics(). The default * guide is assumed to be 12, here, not 20 */ static double quantize_duodecimal_tics(double arg, int guide) { /* order of magnitude of argument: */ double power = pow(12.0, floor(log(arg)/log(12.0))); double xnorm = arg / power; /* approx number of decades */ double posns = guide / xnorm; /* approx number of tic posns per decade */ if (posns > 24) return power / 24; /* half a smaller unit --- shouldn't happen */ else if (posns > 12) return power / 12; /* one smaller unit */ else if (posns > 6) return power / 6; /* 2 smaller units = one-6th of a unit */ else if (posns > 4) return power / 4; /* 3 smaller units = quarter unit */ else if (posns > 2) return power / 2; /* 6 smaller units = half a unit */ else if (posns > 1) return power; /* 0, 1, 2, ..., 11 */ else if (posns > 0.5) return power * 2; /* 0, 2, 4, ..., 10 */ else if (posns > 1.0/3) return power * 3; /* 0, 3, 6, 9 */ else /* getting desperate... the ceil is to make sure we * go over rather than under - eg plot [-10:10] x*x * gives a range of about 99.999 - tics=xnorm gives * tics at 0, 99.99 and 109.98 - BAD ! * This way, inaccuracy the other way will round * up (eg 0->100.0001 => tics at 0 and 101 * I think latter is better than former */ return power * ceil(xnorm); } /* }}} */ /* {{{ quantize_time_tics */ /* HBB 20010831: newly isolated subfunction. Used to be part of * make_tics() */ /* Look at the tic interval given, and round it to a nice figure * suitable for time/data axes, i.e. a small integer number of * seconds, minutes, hours, days, weeks or months. As a side effec, * this routine also modifies the static timelevel[axis] to indicate * the units these tics are calculated in. */ static double quantize_time_tics(AXIS_INDEX axis, double tic, double xr, int guide) { int guide12 = guide * 3 / 5; /* --> 12 for default of 20 */ timelevel[axis] = TIMELEVEL_SECONDS; if (tic > 5) { /* turn tic into units of minutes */ tic = quantize_duodecimal_tics(xr / 60.0, guide12) * 60; if (tic >= 60) timelevel[axis] = TIMELEVEL_MINUTES; } if (tic > 5 * 60) { /* turn tic into units of hours */ tic = quantize_duodecimal_tics(xr / 3600.0, guide12) * 3600; if (tic >= 3600) timelevel[axis] = TIMELEVEL_HOURS; } if (tic > 3600) { /* turn tic into units of days */ tic = quantize_duodecimal_tics(xr / DAY_SEC, guide12) * DAY_SEC; if (tic >= DAY_SEC) timelevel[axis] = TIMELEVEL_DAYS; } if (tic > 2 * DAY_SEC) { /* turn tic into units of weeks */ tic = quantize_normal_tics(xr / WEEK_SEC, guide) * WEEK_SEC; if (tic < WEEK_SEC) { /* force */ tic = WEEK_SEC; } if (tic >= WEEK_SEC) timelevel[axis] = TIMELEVEL_WEEKS; } if (tic > 3 * WEEK_SEC) { /* turn tic into units of month */ tic = quantize_normal_tics(xr / MON_SEC, guide) * MON_SEC; if (tic < MON_SEC) { /* force */ tic = MON_SEC; } if (tic >= MON_SEC) timelevel[axis] = TIMELEVEL_MONTHS; } if (tic > MON_SEC) { /* turn tic into units of years */ tic = quantize_duodecimal_tics(xr / YEAR_SEC, guide12) * YEAR_SEC; if (tic >= YEAR_SEC) timelevel[axis] = TIMELEVEL_YEARS; } return (tic); } /* }}} */ /* {{{ round_outward */ /* HBB 20011204: new function (repeated code ripped out of setup_tics) * that rounds an axis endpoint outward. If the axis is a time/date * one, take care to round towards the next whole time unit, not just * a multiple of the (averaged) tic size */ static double round_outward( AXIS_INDEX axis, /* Axis to work on */ TBOOLEAN upwards, /* extend upwards or downwards? */ double input) /* the current endpoint */ { double tic = ticstep[axis]; double result = tic * (upwards ? ceil(input / tic) : floor(input / tic)); if (axis_array[axis].datatype == DT_TIMEDATE) { double ontime = time_tic_just(timelevel[axis], result); /* FIXME: how certain is it that we don't want to *always* * return 'ontime'? */ if ((upwards && (ontime > result)) || (!upwards && (ontime <result))) return ontime; } return result; } /* }}} */ /* {{{ setup_tics */ /* setup_tics allows max number of tics to be specified but users dont * like it to change with size and font, so we use value of 20, which * is 3.5 behaviour. Note also that if format is '', yticlin = 0, so * this gives division by zero. */ void setup_tics(AXIS_INDEX axis, int max) { double tic = 0; AXIS *this = axis_array + axis; struct ticdef *ticdef = &(this->ticdef); /* HBB 20010703: New: allow _not_ to autoextend the axis endpoints * to an integer multiple of the ticstep, for autoscaled axes with * automatic tics */ TBOOLEAN autoextend_min = (this->autoscale & AUTOSCALE_MIN) && ! (this->autoscale & AUTOSCALE_FIXMIN); TBOOLEAN autoextend_max = (this->autoscale & AUTOSCALE_MAX) && ! (this->autoscale & AUTOSCALE_FIXMAX); /* Apply constraints on autoscaled axis if requested: * The range is _expanded_ here only. Limiting the range is done * in the macro STORE_WITH_LOG_AND_UPDATE_RANGE() of axis.h */ if (this->autoscale & AUTOSCALE_MIN) { if (this->min_constraint & CONSTRAINT_UPPER) { if (this->min > this->min_ub) this->min = this->min_ub; } } if (this->autoscale & AUTOSCALE_MAX) { if (this->max_constraint & CONSTRAINT_LOWER) { if (this->max < this->max_lb) this->max = this->max_lb; } } /* HBB 20000506: if no tics required for this axis, do * nothing. This used to be done exactly before each call of * setup_tics, anyway... */ if (! this->ticmode) return; if (ticdef->type == TIC_SERIES) { ticstep[axis] = tic = ticdef->def.series.incr; autoextend_min = autoextend_min && (ticdef->def.series.start == -VERYLARGE); autoextend_max = autoextend_max && (ticdef->def.series.end == VERYLARGE); } else if (ticdef->type == TIC_COMPUTED) { ticstep[axis] = tic = make_tics(axis, max); } else { /* user-defined, day or month */ autoextend_min = autoextend_max = FALSE; } /* If an explicit stepsize was set, timelevel[axis] wasn't defined, * leading to strange misbehaviours of minor tics on time axes. * We used to call quantize_time_tics, but that also caused strangeness. */ if (this->datatype == DT_TIMEDATE && ticdef->type == TIC_SERIES) { if (tic >= 365*24*60*60.) timelevel[axis] = TIMELEVEL_YEARS; else if (tic >= 28*24*60*60.) timelevel[axis] = TIMELEVEL_MONTHS; else if (tic >= 7*24*60*60.) timelevel[axis] = TIMELEVEL_WEEKS; else if (tic >= 24*60*60.) timelevel[axis] = TIMELEVEL_DAYS; else if (tic >= 60*60.) timelevel[axis] = TIMELEVEL_HOURS; else if (tic >= 60.) timelevel[axis] = TIMELEVEL_MINUTES; else timelevel[axis] = TIMELEVEL_SECONDS; } if (autoextend_min) { this->min = round_outward(axis, ! (this->min < this->max), this->min); if (this->min_constraint & CONSTRAINT_LOWER && this->min < this->min_lb) this->min = this->min_lb; } if (autoextend_max) { this->max = round_outward(axis, this->min < this->max, this->max); if (this->max_constraint & CONSTRAINT_UPPER && this->max > this->max_ub) this->max = this->max_ub; } /* Set up ticfmt[axis] correctly. If necessary (time axis, but not * time/date output format), make up a formatstring that suits the * range of data */ copy_or_invent_formatstring(axis); } /* }}} */ /* {{{ gen_tics */ /* uses global arrays ticstep[], ticfmt[], axis_array[], * we use any of GRID_X/Y/X2/Y2 and _MX/_MX2/etc - caller is expected * to clear the irrelevent fields from global grid bitmask * note this is also called from graph3d, so we need GRID_Z too */ void gen_tics(AXIS_INDEX axis, tic_callback callback) { struct ticdef *def = &axis_array[axis].ticdef; int minitics = axis_array[axis].minitics; /* off/default/auto/explicit */ double minifreq = axis_array[axis].mtic_freq; /* minitic frequency */ struct lp_style_type lgrd = grid_lp; struct lp_style_type mgrd = mgrid_lp; if (! axis_array[axis].gridmajor) lgrd.l_type = LT_NODRAW; if (! axis_array[axis].gridminor) mgrd.l_type = LT_NODRAW; if (def->def.user) { /* user-defined tic entries */ struct ticmark *mark = def->def.user; double uncertain = (axis_array[axis].max - axis_array[axis].min) / 10; double internal_min = axis_array[axis].min - SIGNIF * uncertain; double internal_max = axis_array[axis].max + SIGNIF * uncertain; double log10_base = axis_array[axis].log ? log10(axis_array[axis].base) : 1.0; double polar_shift = 0; /* polar labels always +ve, and if rmin has been set, they are * relative to rmin. */ if (polar) { if (!(R_AXIS.autoscale & AUTOSCALE_MIN)) polar_shift = R_AXIS.min; internal_min = X_AXIS.min - SIGNIF * uncertain; internal_max = X_AXIS.max + SIGNIF * uncertain; } for (mark = def->def.user; mark; mark = mark->next) { char label[MAX_ID_LEN]; char *ticlabel; double internal; /* This condition is only possible if we are in polar mode */ if (axis == POLAR_AXIS) internal = AXIS_LOG_VALUE(POLAR_AXIS,mark->position) - AXIS_LOG_VALUE(POLAR_AXIS,polar_shift); else internal = AXIS_LOG_VALUE(axis,mark->position) - polar_shift; if (!inrange(internal, internal_min, internal_max)) continue; if (mark->level < 0) { /* label read from data file */ ticlabel = mark->label; } else if (mark->label && !strchr(mark->label, '%')) { /* string constant that contains no format keys */ ticlabel = mark->label; } else if (axis_array[axis].datatype == DT_TIMEDATE) { gstrftime(label, MAX_ID_LEN-1, mark->label ? mark->label : ticfmt[axis], mark->position); ticlabel = label; } else { gprintf(label, sizeof(label), mark->label ? mark->label : ticfmt[axis], log10_base, mark->position); ticlabel = label; } /* use NULL instead of label for minitic */ (*callback) (axis, internal, (mark->level>0)?NULL:ticlabel, (mark->level>0)?mgrd:lgrd, NULL); /* Polar axis tics are mirrored across the origin */ if (axis == POLAR_AXIS && (R_AXIS.ticmode & TICS_MIRROR)) { int save_gridline = lgrd.l_type; lgrd.l_type = LT_NODRAW; (*callback) (axis, -internal, (mark->level>0)?NULL:ticlabel, (mark->level>0)?mgrd:lgrd, NULL); lgrd.l_type = save_gridline; } } if (def->type == TIC_USER) return; } /* series-tics * need to distinguish user co-ords from internal co-ords. * - for logscale, internal = log(user), else internal = user * * The minitics are a bit of a drag - we need to distinuish * the cases step>1 from step == 1. * If step = 1, we are looking at 1,10,100,1000 for example, so * minitics are 2,5,8, ... - done in user co-ordinates * If step>1, we are looking at 1,1e6,1e12 for example, so * minitics are 10,100,1000,... - done in internal co-ords */ { double tic; /* loop counter */ double internal; /* in internal co-ords */ double user; /* in user co-ords */ double start, step, end; double lmin = axis_array[axis].min, lmax = axis_array[axis].max; double internal_min, internal_max; /* to allow for rounding errors */ double ministart = 0, ministep = 1, miniend = 1; /* internal or user - depends on step */ /* gprintf uses log10() of base - log_base_array is log() */ double log10_base = axis_array[axis].log ? log10(axis_array[axis].base) : 1.0; if (lmax < lmin) { /* hmm - they have set reversed range for some reason */ double temp = lmin; lmin = lmax; lmax = temp; } /* {{{ choose start, step and end */ switch (def->type) { case TIC_SERIES: if (axis_array[axis].log && axis != POLAR_AXIS) { /* we can tolerate start <= 0 if step and end > 0 */ if (def->def.series.end <= 0 || def->def.series.incr <= 0) return; /* just quietly ignore */ step = AXIS_DO_LOG(axis, def->def.series.incr); if (def->def.series.start <= 0) /* includes case 'undefined, i.e. -VERYLARGE */ start = step * floor(lmin / step); else start = AXIS_DO_LOG(axis, def->def.series.start); if (def->def.series.end == VERYLARGE) end = step * ceil(lmax / step); else end = AXIS_DO_LOG(axis, def->def.series.end); } else { start = def->def.series.start; step = def->def.series.incr; end = def->def.series.end; if (start == -VERYLARGE) start = step * floor(lmin / step); if (end == VERYLARGE) end = step * ceil(lmax / step); } break; case TIC_COMPUTED: /* round to multiple of step */ start = ticstep[axis] * floor(lmin / ticstep[axis]); step = ticstep[axis]; end = ticstep[axis] * ceil(lmax / ticstep[axis]); break; case TIC_MONTH: start = floor(lmin); end = ceil(lmax); step = floor((end - start) / 12); if (step < 1) step = 1; break; case TIC_DAY: start = floor(lmin); end = ceil(lmax); step = floor((end - start) / 14); if (step < 1) step = 1; break; default: graph_error("Internal error : unknown tic type"); return; /* avoid gcc -Wall warning about start */ } /* }}} */ /* {{{ ensure ascending order */ if (end < start) { double temp; temp = end; end = start; start = temp; } step = fabs(step); /* }}} */ if (minitics && axis_array[axis].miniticscale != 0) { /* {{{ figure out ministart, ministep, miniend */ if (minitics == MINI_USER) { /* they have said what they want */ if (minifreq <= 0) minitics = 0; /* not much else we can do */ else if (axis_array[axis].log) { ministart = ministep = step / minifreq * axis_array[axis].base; miniend = step * axis_array[axis].base; } else { ministart = ministep = step / minifreq; miniend = step; } } else if (axis_array[axis].log) { if (step > 1.5) { /* beware rounding errors */ /* {{{ 10,100,1000 case */ /* no more than five minitics */ if (step < 65535) /* should be MAXINT */ ministart = ministep = (int)(0.2 * step); else ministart = ministep = 0.2 * step; if (ministep < 1) ministart = ministep = 1; miniend = step; /* }}} */ } else { /* {{{ 2,5,8 case */ miniend = axis_array[axis].base; if (end - start >= 10) minitics = 0; /* none */ else if (end - start >= 5) { ministart = 2; ministep = 3; } else { ministart = 2; ministep = 1; } /* }}} */ } } else if (axis_array[axis].datatype == DT_TIMEDATE) { ministart = ministep = make_auto_time_minitics(timelevel[axis], step); miniend = step * 0.9; } else if (minitics == MINI_AUTO) { int k = fabs(step)/pow(10.,floor(log10(fabs(step)))); /* so that step == k times some power of 10 */ ministart = ministep = (k==2 ? 0.5 : 0.2) * step; miniend = step; } else minitics = 0; if (ministep <= 0) minitics = 0; /* dont get stuck in infinite loop */ /* }}} */ } /* {{{ a few tweaks and checks */ /* watch rounding errors */ end += SIGNIF * step; /* HBB 20011002: adjusting the endpoints doesn't make sense if * some oversmart user used a ticstep (much) larger than the * yrange itself */ if (step < (fabs(lmax) + fabs(lmin))) { internal_max = lmax + step * SIGNIF; internal_min = lmin - step * SIGNIF; } else { internal_max = lmax; internal_min = lmin; } if (step == 0) return; /* just quietly ignore them ! */ /* }}} */ /* This protects against user error, not precision errors */ if ( (internal_max-internal_min)/step > term->xmax) { int_warn(NO_CARET,"Too many axis ticks requested (>%.0g)", (internal_max-internal_min)/step); return; } /* This protects against infinite loops if the separation between */ /* two ticks is less than the precision of the control variables. */ /* The for(...) loop here must be identical to the true loop below. */ /* Furthermore, compiler optimization can muck up this test, so we */ /* tell the compiler that the control variables are volatile. */ if (1) /* (some-test-for-range-and-or-step-size) */ { vol_previous_tic = start-step; for (vol_this_tic = start; vol_this_tic <= end; vol_this_tic += step) { if (fabs(vol_this_tic - vol_previous_tic) < (step/4.)) { step = end - start; int_warn(NO_CARET, "tick interval too small for machine precision"); break; } vol_previous_tic = vol_this_tic; } } for (tic = start; tic <= end; tic += step) { /* {{{ calc internal and user co-ords */ if (axis == POLAR_AXIS) { /* Defer translation until after limit check */ internal = tic; } else if (!axis_array[axis].log) { internal = (axis_array[axis].datatype == DT_TIMEDATE) ? time_tic_just(timelevel[axis], tic) : tic; user = CheckZero(internal, step); } else { /* log scale => dont need to worry about zero ? */ internal = tic; user = AXIS_UNDO_LOG(axis, internal); } /* }}} */ if (internal > internal_max) break; /* gone too far - end of series = VERYLARGE perhaps */ if (internal >= internal_min) { /* {{{ draw tick via callback */ switch (def->type) { case TIC_DAY:{ int d = (long) floor(user + 0.5) % 7; if (d < 0) d += 7; (*callback) (axis, internal, abbrev_day_names[d], lgrd, def->def.user); break; } case TIC_MONTH:{ int m = (long) floor(user - 1) % 12; if (m < 0) m += 12; (*callback) (axis, internal, abbrev_month_names[m], lgrd, def->def.user); break; } default:{ /* comp or series */ char label[MAX_ID_LEN]; /* Leave room for enhanced text markup */ if (axis_array[axis].datatype == DT_TIMEDATE) { /* If they are doing polar time plot, good luck to them */ gstrftime(label, MAX_ID_LEN-1, ticfmt[axis], (double) user); } else if (polar) { double min = (R_AXIS.autoscale & AUTOSCALE_MIN) ? 0 : R_AXIS.min; double r = fabs(user) + min; /* POLAR_AXIS is the only sane axis, where the actual value */ /* is stored and we shift its position just before plotting.*/ if (axis == POLAR_AXIS) { internal = AXIS_LOG_VALUE(axis, tic) - AXIS_LOG_VALUE(axis, R_AXIS.min); r = tic; } gprintf(label, sizeof(label), ticfmt[axis], log10_base, r); } else { gprintf(label, sizeof(label), ticfmt[axis], log10_base, user); } /* Range-limited tic placement */ if (def->rangelimited && !inrange(internal,axis_array[axis].data_min,axis_array[axis].data_max)) continue; (*callback) (axis, internal, label, lgrd, def->def.user); /* Polar axis tics are mirrored across the origin */ if (axis == POLAR_AXIS && (R_AXIS.ticmode & TICS_MIRROR)) { int save_gridline = lgrd.l_type; lgrd.l_type = LT_NODRAW; (*callback) (axis, -internal, label, lgrd, def->def.user); lgrd.l_type = save_gridline; } } } /* }}} */ } if (minitics && axis_array[axis].miniticscale != 0) { /* {{{ process minitics */ double mplace, mtic; for (mplace = ministart; mplace < miniend; mplace += ministep) { if (axis_array[axis].datatype == DT_TIMEDATE) mtic = time_tic_just(timelevel[axis] - 1, internal + mplace); else mtic = internal + (axis_array[axis].log && step <= 1.5 ? AXIS_DO_LOG(axis,mplace) : mplace); if (inrange(mtic, internal_min, internal_max) && inrange(mtic, start - step * SIGNIF, end + step * SIGNIF)) (*callback) (axis, mtic, NULL, mgrd, NULL); } /* }}} */ } } } } /* }}} */ /* {{{ time_tic_just() */ /* justify ticplace to a proper date-time value */ static double time_tic_just(t_timelevel level, double ticplace) { struct tm tm; if (level <= TIMELEVEL_SECONDS) { return (ticplace); } ggmtime(&tm, ticplace); if (level >= TIMELEVEL_MINUTES) { /* units of minutes */ if (tm.tm_sec > 55) tm.tm_min++; tm.tm_sec = 0; } if (level >= TIMELEVEL_HOURS) { /* units of hours */ if (tm.tm_min > 55) tm.tm_hour++; tm.tm_min = 0; } if (level >= TIMELEVEL_DAYS) { /* units of days */ if (tm.tm_hour > 22) { tm.tm_hour = 0; tm.tm_mday = 0; tm.tm_yday++; ggmtime(&tm, gtimegm(&tm)); } } /* skip it, I have not bothered with weekday so far */ if (level >= TIMELEVEL_MONTHS) {/* units of month */ if (tm.tm_mday > 25) { tm.tm_mon++; if (tm.tm_mon > 11) { tm.tm_year++; tm.tm_mon = 0; } } tm.tm_mday = 1; } ticplace = gtimegm(&tm); return (ticplace); } /* }}} */ /* {{{ axis_output_tics() */ /* HBB 20000416: new routine. Code like this appeared 4 times, once * per 2D axis, in graphics.c. Always slightly different, of course, * but generally, it's always the same. I distinguish two coordinate * directions, here. One is the direction of the axis itself (the one * it's "running" along). I refer to the one orthogonal to it as * "non-running", below. */ void axis_output_tics( AXIS_INDEX axis, /* axis number we're dealing with */ int *ticlabel_position, /* 'non-running' coordinate */ AXIS_INDEX zeroaxis_basis, /* axis to base 'non-running' position of * zeroaxis on */ tic_callback callback) /* tic-drawing callback function */ { struct termentry *t = term; TBOOLEAN axis_is_vertical = ((axis % SECOND_AXES) == FIRST_Y_AXIS); TBOOLEAN axis_is_second = ((axis / SECOND_AXES) == 1); int axis_position; /* 'non-running' coordinate */ int mirror_position; /* 'non-running' coordinate, 'other' side */ if (zeroaxis_basis / SECOND_AXES) { axis_position = axis_array[zeroaxis_basis].term_upper; mirror_position = axis_array[zeroaxis_basis].term_lower; } else { axis_position = axis_array[zeroaxis_basis].term_lower; mirror_position = axis_array[zeroaxis_basis].term_upper; } if (axis_array[axis].ticmode) { /* set the globals needed by the _callback() function */ if (axis_array[axis].tic_rotate == TEXT_VERTICAL && (*t->text_angle)(TEXT_VERTICAL)) { tic_hjust = axis_is_vertical ? CENTRE : (axis_is_second ? LEFT : RIGHT); tic_vjust = axis_is_vertical ? (axis_is_second ? JUST_TOP : JUST_BOT) : JUST_CENTRE; rotate_tics = TEXT_VERTICAL; /* FIXME HBB 20000501: why would we want this? */ if (axis == FIRST_Y_AXIS) (*ticlabel_position) += t->v_char / 2; /* EAM - allow rotation by arbitrary angle in degrees */ /* Justification of ytic labels is a problem since */ /* the position is already [mis]corrected for length */ } else if (axis_array[axis].tic_rotate && (*t->text_angle)(axis_array[axis].tic_rotate)) { switch (axis) { case FIRST_Y_AXIS: /* EAM Purely empirical shift - is there a better? */ *ticlabel_position += t->h_char * 2.5; tic_hjust = RIGHT; break; case SECOND_Y_AXIS: tic_hjust = LEFT; break; case FIRST_X_AXIS: tic_hjust = LEFT; break; case SECOND_X_AXIS: tic_hjust = LEFT; break; default: tic_hjust = LEFT; break; } tic_vjust = JUST_CENTRE; rotate_tics = axis_array[axis].tic_rotate; } else { tic_hjust = axis_is_vertical ? (axis_is_second ? LEFT : RIGHT) : CENTRE; tic_vjust = axis_is_vertical ? JUST_CENTRE : (axis_is_second ? JUST_BOT : JUST_TOP); rotate_tics = 0; } if (axis_array[axis].manual_justify) tic_hjust = axis_array[axis].label.pos; else axis_array[axis].label.pos = tic_hjust; if (axis_array[axis].ticmode & TICS_MIRROR) tic_mirror = mirror_position; else tic_mirror = -1; /* no thank you */ if ((axis_array[axis].ticmode & TICS_ON_AXIS) && !axis_array[zeroaxis_basis].log && inrange(0.0, axis_array[zeroaxis_basis].min, axis_array[zeroaxis_basis].max) ) { tic_start = AXIS_MAP(zeroaxis_basis, 0.0); tic_direction = axis_is_second ? 1 : -1; if (axis_array[axis].ticmode & TICS_MIRROR) tic_mirror = tic_start; /* put text at boundary if axis is close to boundary and the * corresponding boundary is switched on */ if (axis_is_vertical) { if (((axis_is_second ? -1 : 1) * (tic_start - axis_position) > (3 * t->h_char)) || (!axis_is_second && (!(draw_border & 2))) || (axis_is_second && (!(draw_border & 8)))) tic_text = tic_start; else tic_text = axis_position; tic_text += (axis_is_second ? 1 : -1) * t->h_char; } else { if (((axis_is_second ? -1 : 1) * (tic_start - axis_position) > (2 * t->v_char)) || (!axis_is_second && (!(draw_border & 1))) || (axis_is_second && (!(draw_border & 4)))) tic_text = tic_start + (axis_is_second ? 0 : - axis_array[axis].ticscale * t->v_tic); else tic_text = axis_position; tic_text -= t->v_char; } } else { /* tics not on axis --> on border */ tic_start = axis_position; tic_direction = (axis_array[axis].tic_in ? 1 : -1) * (axis_is_second ? -1 : 1); tic_text = (*ticlabel_position); } /* go for it */ gen_tics(axis, callback); (*t->text_angle) (0); /* reset rotation angle */ } } /* }}} */ /* {{{ axis_set_graphical_range() */ void axis_set_graphical_range(AXIS_INDEX axis, unsigned int lower, unsigned int upper) { axis_array[axis].term_lower = lower; axis_array[axis].term_upper = upper; } /* }}} */ /* {{{ axis_position_zeroaxis */ static TBOOLEAN axis_position_zeroaxis(AXIS_INDEX axis) { TBOOLEAN is_inside = FALSE; AXIS *this = axis_array + axis; /* NB: This is the only place that axis->term_zero is set. */ /* So it is important to reach here before plotting. */ if ((this->min > 0.0 && this->max > 0.0) || this->log) { this->term_zero = (this->max < this->min) ? this->term_upper : this->term_lower; } else if (this->min < 0.0 && this->max < 0.0) { this->term_zero = (this->max < this->min) ? this->term_lower : this->term_upper; } else { this->term_zero = AXIS_MAP(axis, 0.0); is_inside = TRUE; } return is_inside; } /* }}} */ /* {{{ axis_draw_2d_zeroaxis() */ void axis_draw_2d_zeroaxis(AXIS_INDEX axis, AXIS_INDEX crossaxis) { AXIS *this = axis_array + axis; if (axis_position_zeroaxis(crossaxis) && (this->zeroaxis.l_type > LT_NODRAW)) { term_apply_lp_properties(&this->zeroaxis); if ((axis % SECOND_AXES) == FIRST_X_AXIS) { (*term->move) (this->term_lower, axis_array[crossaxis].term_zero); (*term->vector) (this->term_upper, axis_array[crossaxis].term_zero); } else { (*term->move) (axis_array[crossaxis].term_zero, this->term_lower); (*term->vector) (axis_array[crossaxis].term_zero, this->term_upper); } } } /* }}} */ void load_one_range(AXIS_INDEX axis, double *a, t_autoscale *autoscale, t_autoscale which ) { double number; assert( which==AUTOSCALE_MIN || which==AUTOSCALE_MAX ); if (equals(c_token, "*")) { /* easy: do autoscaling! */ *autoscale |= which; if (which==AUTOSCALE_MIN) { axis_array[axis].min_constraint &= ~CONSTRAINT_LOWER; axis_array[axis].min_lb = 0; /* dummy entry */ } else { axis_array[axis].max_constraint &= ~CONSTRAINT_LOWER; axis_array[axis].max_lb = 0; /* dummy entry */ } c_token++; } else { /* this _might_ be autoscaling with constraint or fixed value */ /* The syntax of '0 < *...' confuses the parser as he will try to include the '<' as a comparison operator in the expression. Setting scanning_range_in_progress will stop the parser from trying to build an action table if he finds '<' followed by '*' (which would normaly trigger a 'invalid expression'), */ scanning_range_in_progress = TRUE; GET_NUM_OR_TIME(number, axis); scanning_range_in_progress = FALSE; if (END_OF_COMMAND) int_error(c_token, "unfinished range"); if (equals(c_token, "<")) { /* this _seems_ to be autoscaling with lower bound */ c_token++; if (END_OF_COMMAND) { int_error(c_token, "unfinished range with constraint"); } else if (equals(c_token, "*")) { /* okay: this _is_ autoscaling with lower bound! */ *autoscale |= which; if (which==AUTOSCALE_MIN) { axis_array[axis].min_constraint |= CONSTRAINT_LOWER; axis_array[axis].min_lb = number; } else { axis_array[axis].max_constraint |= CONSTRAINT_LOWER; axis_array[axis].max_lb = number; } c_token++; } else { int_error(c_token, "malformed range with constarint"); } } else if (equals(c_token, ">")) { int_error(c_token, "malformed range with constraint (use '<' only)"); } else { /* no autoscaling-with-lower-bound but simple fixed value only */ *autoscale &= ~which; if (which==AUTOSCALE_MIN) { axis_array[axis].min_constraint = CONSTRAINT_NONE; axis_array[axis].min_ub = 0; /* dummy entry */ } else { axis_array[axis].max_constraint = CONSTRAINT_NONE; axis_array[axis].max_ub = 0; /* dummy entry */ } *a = number; } } if (*autoscale & which) { /* check for upper bound only if autoscaling is on */ if (END_OF_COMMAND) int_error(c_token, "unfinished range"); if (equals(c_token, "<")) { /* looks like upper bound up to now... */ c_token++; if (END_OF_COMMAND) int_error(c_token, "unfinished range with constraint"); GET_NUM_OR_TIME(number, axis); /* this autoscaling has an upper bound: */ if (which==AUTOSCALE_MIN) { axis_array[axis].min_constraint |= CONSTRAINT_UPPER; axis_array[axis].min_ub = number; } else { axis_array[axis].max_constraint |= CONSTRAINT_UPPER; axis_array[axis].max_ub = number; } } else if (equals(c_token, ">")) { int_error(c_token, "malformed range with constraint (use '<' only)"); } else { /* there is _no_ upper bound on this autoscaling */ if (which==AUTOSCALE_MIN) { axis_array[axis].min_constraint &= ~CONSTRAINT_UPPER; axis_array[axis].min_ub = 0; /* dummy entry */ } else { axis_array[axis].max_constraint &= ~CONSTRAINT_UPPER; axis_array[axis].max_ub = 0; /* dummy entry */ } } } else if (!END_OF_COMMAND){ /* no autoscaling = fixed value --> complain about constraints */ if (equals(c_token, "<") || equals(c_token, ">") ) { int_error(c_token, "no upper bound constraint allowed if not autoscaling"); } } /* Consitency check */ if (*autoscale & which) { if (which==AUTOSCALE_MIN && axis_array[axis].min_constraint==CONSTRAINT_BOTH) { if (axis_array[axis].min_ub < axis_array[axis].min_lb ) { int_warn(c_token,"Upper bound of constraint < lower bound: Turning of constraints."); axis_array[axis].min_constraint = CONSTRAINT_NONE; } } if (which==AUTOSCALE_MAX && axis_array[axis].max_constraint==CONSTRAINT_BOTH) { if (axis_array[axis].max_ub < axis_array[axis].max_lb ) { int_warn(c_token,"Upper bound of constraint < lower bound: Turning of constraints."); axis_array[axis].max_constraint = CONSTRAINT_NONE; } } } } /* {{{ load_range() */ /* loads a range specification from the input line into variables 'a' * and 'b' */ t_autoscale load_range(AXIS_INDEX axis, double *a, double *b, t_autoscale autoscale) { if (equals(c_token, "]")) { axis_array[axis].min_constraint = CONSTRAINT_NONE; axis_array[axis].max_constraint = CONSTRAINT_NONE; return (autoscale); } if (END_OF_COMMAND) { int_error(c_token, "starting range value or ':' or 'to' expected"); } else if (!equals(c_token, "to") && !equals(c_token, ":")) { load_one_range(axis, a, &autoscale, AUTOSCALE_MIN ); } if (!equals(c_token, "to") && !equals(c_token, ":")) int_error(c_token, "':' or keyword 'to' expected"); c_token++; if (!equals(c_token, "]")) { load_one_range(axis, b, &autoscale, AUTOSCALE_MAX ); } /* HBB 20030127: If range input backwards, automatically turn on the "reverse" option, too. */ if ((autoscale & AUTOSCALE_BOTH) == AUTOSCALE_NONE) { if (*b < *a) { double temp = *a; *a = *b; *b = temp; axis_array[axis].range_flags |= RANGE_REVERSE; } } return (autoscale); } /* }}} */ /* we determine length of the widest tick label by getting gen_ticks to * call this routine with every label */ void widest_tic_callback(AXIS_INDEX axis, double place, char *text, struct lp_style_type grid, struct ticmark *userlabels) { (void) axis; /* avoid "unused parameter" warnings */ (void) place; (void) grid; if (text) { /* minitics have no text at all */ int len = label_width(text, NULL); if (len > widest_tic_strlen) widest_tic_strlen = len; } } /* * get and set routines for range writeback * ULIG * */ double get_writeback_min(AXIS_INDEX axis) { /* printf("get min(%d)=%g\n",axis,axis_array[axis].writeback_min); */ return axis_array[axis].writeback_min; } double get_writeback_max(AXIS_INDEX axis) { /* printf("get max(%d)=%g\n",axis,axis_array[axis].writeback_min); */ return axis_array[axis].writeback_max; } void set_writeback_min(AXIS_INDEX axis) { double val = AXIS_DE_LOG_VALUE(axis,axis_array[axis].min); /* printf("set min(%d)=%g\n",axis,val); */ axis_array[axis].writeback_min = val; } void set_writeback_max(AXIS_INDEX axis) { double val = AXIS_DE_LOG_VALUE(axis,axis_array[axis].max); /* printf("set max(%d)=%g\n",axis,val); */ axis_array[axis].writeback_max = val; } void save_writeback_all_axes() { AXIS_INDEX axis; for (axis = 0; axis < AXIS_ARRAY_SIZE; axis++) if (axis_array[axis].range_flags & RANGE_WRITEBACK) { set_writeback_min(axis); set_writeback_max(axis); } } void check_axis_reversed( AXIS_INDEX axis ) { AXIS *this = axis_array + axis; if (((this->autoscale & AUTOSCALE_BOTH) == AUTOSCALE_NONE) && (this->max < this->min)) { double temp = this->min; this->min = this->max; this->max = temp; this->range_is_reverted = 1; } else { this->range_is_reverted = (this->range_flags & RANGE_REVERSE); } } TBOOLEAN some_grid_selected() { AXIS_INDEX i; for (i = 0; i <= LAST_REAL_AXIS; i++) if (axis_array[i].gridmajor || axis_array[i].gridminor) return TRUE; return FALSE; } /* Check and set the cb-range for use by pm3d or other palette using styles. Return 0 on wrong range, otherwise 1. */ int set_cbminmax() { if (CB_AXIS.set_autoscale & AUTOSCALE_MIN) { /* -VERYLARGE according to AXIS_INI3D */ if (CB_AXIS.min >= VERYLARGE) CB_AXIS.min = AXIS_DE_LOG_VALUE(FIRST_Z_AXIS,Z_AXIS.min); } CB_AXIS.min = axis_log_value_checked(COLOR_AXIS, CB_AXIS.min, "color axis"); if (CB_AXIS.set_autoscale & AUTOSCALE_MAX) { /* -VERYLARGE according to AXIS_INI3D */ if (CB_AXIS.max <= -VERYLARGE) CB_AXIS.max = AXIS_DE_LOG_VALUE(FIRST_Z_AXIS,Z_AXIS.max); } CB_AXIS.max = axis_log_value_checked(COLOR_AXIS, CB_AXIS.max, "color axis"); if (CB_AXIS.min > CB_AXIS.max) { /* exchange min and max values */ double tmp = CB_AXIS.max; CB_AXIS.max = CB_AXIS.min; CB_AXIS.min = tmp; } return 1; } static void get_position_type(enum position_type *type, int *axes) { if (almost_equals(c_token, "fir$st")) { ++c_token; *type = first_axes; } else if (almost_equals(c_token, "sec$ond")) { ++c_token; *type = second_axes; } else if (almost_equals(c_token, "gr$aph")) { ++c_token; *type = graph; } else if (almost_equals(c_token, "sc$reen")) { ++c_token; *type = screen; } else if (almost_equals(c_token, "char$acter")) { ++c_token; *type = character; } switch (*type) { case first_axes: *axes = FIRST_AXES; return; case second_axes: *axes = SECOND_AXES; return; default: *axes = (-1); return; } } /* get_position() - reads a position for label,arrow,key,... */ void get_position(struct position *pos) { get_position_default(pos,first_axes); } /* get_position() - reads a position for label,arrow,key,... * with given default coordinate system */ void get_position_default(struct position *pos, enum position_type default_type) { int axes; enum position_type type = default_type; memset(pos, 0, sizeof(struct position)); get_position_type(&type, &axes); pos->scalex = type; GET_NUMBER_OR_TIME(pos->x, axes, FIRST_X_AXIS); if (equals(c_token, ",")) { ++c_token; get_position_type(&type, &axes); pos->scaley = type; GET_NUMBER_OR_TIME(pos->y, axes, FIRST_Y_AXIS); } else { pos->y = 0; pos->scaley = type; } /* z is not really allowed for a screen co-ordinate, but keep it simple ! */ if (equals(c_token, ",") /* Partial fix for ambiguous syntax when trailing comma ends a plot command */ && !(isstringvalue(c_token+1)) && !(almost_equals(c_token+1,"newhist$ogram")) && !(almost_equals(c_token+1,"for")) ) { ++c_token; get_position_type(&type, &axes); pos->scalez = type; GET_NUMBER_OR_TIME(pos->z, axes, FIRST_Z_AXIS); } else { pos->z = 0; pos->scalez = type; /* same as y */ } } /* * Add a single tic mark, with label, to the list for this axis. * To avoid duplications and overprints, sort the list and allow * only one label per position. * EAM - called from set.c during `set xtics` (level = 0 or 1) * called from datafile.c during `plot using ::xtic()` (level = -1) */ void add_tic_user(AXIS_INDEX axis, char *label, double position, int level) { struct ticmark *tic, *newtic; struct ticmark listhead; if (!label && level < 0) return; /* Mark this axis as user-generated ticmarks only, unless the */ /* mix flag indicates that both user- and auto- tics are OK. */ if (!axis_array[axis].ticdef.def.mix) axis_array[axis].ticdef.type = TIC_USER; /* Walk along list to sorted positional order */ listhead.next = axis_array[axis].ticdef.def.user; listhead.position = -DBL_MAX; for (tic = &listhead; tic->next && (position > tic->next->position); tic = tic->next) { } if ((tic->next == NULL) || (position < tic->next->position)) { /* Make a new ticmark */ newtic = (struct ticmark *) gp_alloc(sizeof(struct ticmark), (char *) NULL); newtic->position = position; newtic->level = level; /* Insert it in the list */ newtic->next = tic->next; tic->next = newtic; } else { /* The new tic must duplicate position of tic->next */ if (position != tic->next->position) int_warn(NO_CARET,"add_tic_user: list sort error"); newtic = tic->next; /* Don't over-write a major tic with a minor tic */ if (newtic->level < level) return; if (newtic->label) { free(newtic->label); newtic->label = NULL; } } if (label) newtic->label = gp_strdup(label); else newtic->label = NULL; /* Make sure the listhead is kept */ axis_array[axis].ticdef.def.user = listhead.next; } /* * EAM Oct 2011 * These routines used to be macros PARSE_RANGE, PARSE_NAMED_RANGE * Since they take only normal parameters, it saves code/space to make * them subroutines instead. */ /* get optional [min:max] */ void parse_range(AXIS_INDEX axis) { if (equals(c_token, "[")) { c_token++; axis_array[axis].autoscale = load_range(axis, &axis_array[axis].min, &axis_array[axis].max, axis_array[axis].autoscale); if (!equals(c_token, "]")) int_error(c_token, "']' expected"); c_token++; } } /* like parse_range, but for named ranges as in 'plot [phi=3.5:7] sin(phi)' */ int parse_named_range(AXIS_INDEX axis, int dummy) { int dummy_token = dummy; if (equals(c_token, "[")) { c_token++; if (isletter(c_token)) { if (equals(c_token + 1, "=")) { dummy_token = c_token; c_token += 2; } /* oops; probably an expression with a variable: act * as if no variable name had been seen, by * fallthrough */ } axis_array[axis].autoscale = load_range(axis, &axis_array[axis].min, &axis_array[axis].max, axis_array[axis].autoscale); if (!equals(c_token, "]")) int_error(c_token, "']' expected"); c_token++; } /* first '[' */ return dummy_token; } /* Called if an in-line range is encountered while inside a zoom command */ void parse_skip_range() { while (!equals(c_token++,"]")) if (END_OF_COMMAND) break; return; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/util3d.c��������������������������������������������������������������������������0000644�0004711�0000144�00000067533�11703417137�012312� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: util3d.c,v 1.44.2.1 2012/01/11 23:42:23 sfeam Exp $"); } #endif /* GNUPLOT - util3d.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * 19 September 1992 Lawrence Crowl (crowl@cs.orst.edu) * Added user-specified bases for log scaling. * * 3.6 - split graph3d.c into graph3d.c (graph), * util3d.c (intersections, etc) * hidden3d.c (hidden-line removal code) * */ #include "util3d.h" #include "axis.h" #include "hidden3d.h" #include "pm3d.h" #include "term_api.h" /* HBB 990826: all that stuff referenced from other modules is now * exported in graph3d.h, instead of being listed here */ /* Prototypes for local functions */ static void mat_unit __PROTO((transform_matrix mat)); static GP_INLINE void draw3d_point_unconditional __PROTO((p_vertex, struct lp_style_type *)); static void mat_unit(transform_matrix mat) { int i, j; for (i = 0; i < 4; i++) for (j = 0; j < 4; j++) if (i == j) mat[i][j] = 1.0; else mat[i][j] = 0.0; } #if 0 /* HBB 990829: unused --> commented out */ void mat_trans(double tx, double ty, double tz, transform_matrix mat) { mat_unit(mat); /* Make it unit matrix. */ mat[3][0] = tx; mat[3][1] = ty; mat[3][2] = tz; } #endif /* commented out */ void mat_scale(double sx, double sy, double sz, transform_matrix mat) { mat_unit(mat); /* Make it unit matrix. */ mat[0][0] = sx; mat[1][1] = sy; mat[2][2] = sz; } void mat_rot_x(double teta, transform_matrix mat) { double cos_teta, sin_teta; teta *= DEG2RAD; cos_teta = cos(teta); sin_teta = sin(teta); mat_unit(mat); /* Make it unit matrix. */ mat[1][1] = cos_teta; mat[1][2] = -sin_teta; mat[2][1] = sin_teta; mat[2][2] = cos_teta; } #if 0 /* HBB 990829: unused --> commented out */ void mat_rot_y(double teta, transform_matrix mat) { double cos_teta, sin_teta; teta *= DEG2RAD; cos_teta = cos(teta); sin_teta = sin(teta); mat_unit(mat); /* Make it unit matrix. */ mat[0][0] = cos_teta; mat[0][2] = -sin_teta; mat[2][0] = sin_teta; mat[2][2] = cos_teta; } #endif /* commented out */ void mat_rot_z(double teta, transform_matrix mat) { double cos_teta, sin_teta; teta *= DEG2RAD; cos_teta = cos(teta); sin_teta = sin(teta); mat_unit(mat); /* Make it unit matrix. */ mat[0][0] = cos_teta; mat[0][1] = -sin_teta; mat[1][0] = sin_teta; mat[1][1] = cos_teta; } /* Multiply two transform_matrix. Result can be one of two operands. */ void mat_mult( transform_matrix mat_res, transform_matrix mat1, transform_matrix mat2) { int i, j, k; transform_matrix mat_res_temp; for (i = 0; i < 4; i++) for (j = 0; j < 4; j++) { mat_res_temp[i][j] = 0; for (k = 0; k < 4; k++) mat_res_temp[i][j] += mat1[i][k] * mat2[k][j]; } for (i = 0; i < 4; i++) for (j = 0; j < 4; j++) mat_res[i][j] = mat_res_temp[i][j]; } #define IN_AXIS_RANGE(val, axis) \ inrange((val), axis_array[axis].min, axis_array[axis].max) /* single edge intersection algorithm */ /* Given two points, one inside and one outside the plot, return * the point where an edge of the plot intersects the line segment defined * by the two points. */ void edge3d_intersect( struct coordinate GPHUGE *points, /* the points array */ int i0, int i1, double *ex, double *ey, double *ez) /* the point where it crosses an edge */ { int count; double ix = points[i0].x; double iy = points[i0].y; double iz = points[i0].z; double ox = points[i1].x; double oy = points[i1].y; double oz = points[i1].z; double x, y, z; /* possible intersection point */ if (points[i0].type == INRANGE) { /* swap points around so that ix/ix/iz are INRANGE and ox/oy/oz are OUTRANGE */ x = ix; ix = ox; ox = x; y = iy; iy = oy; oy = y; z = iz; iz = oz; oz = z; } /* nasty degenerate cases, effectively drawing to an infinity point (?) cope with them here, so don't process them as a "real" OUTRANGE point If more than one coord is -VERYLARGE, then can't ratio the "infinities" so drop out by returning FALSE */ count = 0; if (ox == -VERYLARGE) count++; if (oy == -VERYLARGE) count++; if (oz == -VERYLARGE) count++; /* either doesn't pass through 3D volume *or* can't ratio infinities to get a direction to draw line, so return the INRANGE point */ if (count > 1) { *ex = ix; *ey = iy; *ez = iz; return; } if (count == 1) { *ex = ix; *ey = iy; *ez = iz; if (ox == -VERYLARGE) { *ex = AXIS_ACTUAL_MIN(FIRST_X_AXIS); return; } if (oy == -VERYLARGE) { *ey = AXIS_ACTUAL_MIN(FIRST_Y_AXIS); return; } /* obviously oz is -VERYLARGE and (ox != -VERYLARGE && oy != -VERYLARGE) */ *ez = AXIS_ACTUAL_MIN(FIRST_Z_AXIS); return; } /* * Can't have case (ix == ox && iy == oy && iz == oz) as one point * is INRANGE and one point is OUTRANGE. */ if (ix == ox) { if (iy == oy) { /* line parallel to z axis */ /* assume iy in yrange, && ix in xrange */ *ex = ix; /* == ox */ *ey = iy; /* == oy */ if (inrange(AXIS_ACTUAL_MAX(FIRST_Z_AXIS), iz, oz)) *ez = AXIS_ACTUAL_MAX(FIRST_Z_AXIS); else if (inrange(AXIS_ACTUAL_MIN(FIRST_Z_AXIS), iz, oz)) *ez = AXIS_ACTUAL_MIN(FIRST_Z_AXIS); else { graph_error("error in edge3d_intersect"); } return; } if (iz == oz) { /* line parallel to y axis */ /* assume iz in zrange && ix in xrange */ *ex = ix; /* == ox */ *ez = iz; /* == oz */ if (inrange(AXIS_ACTUAL_MAX(FIRST_Y_AXIS), iy, oy)) *ey = AXIS_ACTUAL_MAX(FIRST_Y_AXIS); else if (inrange(AXIS_ACTUAL_MIN(FIRST_Y_AXIS), iy, oy)) *ey = AXIS_ACTUAL_MIN(FIRST_Y_AXIS); else { graph_error("error in edge3d_intersect"); } return; } /* nasty 2D slanted line in a yz plane */ #define INTERSECT_PLANE(cut, axis, eff, eff_axis, res_x, res_y, res_z) \ do { \ if (inrange(cut, i##axis, o##axis) \ && cut != i##axis \ && cut != o##axis) { \ eff = (cut - i##axis) \ * ((o##eff - i##eff) / (o##axis - i##axis)) \ + i##eff; \ if (IN_AXIS_RANGE(eff, eff_axis)) { \ *ex = res_x; \ *ey = res_y; \ *ez = res_z; \ return; \ } \ } \ } while (0) INTERSECT_PLANE(AXIS_ACTUAL_MIN(FIRST_Y_AXIS), y, z, FIRST_Z_AXIS, ix, AXIS_ACTUAL_MIN(FIRST_Y_AXIS), z); INTERSECT_PLANE(AXIS_ACTUAL_MAX(FIRST_Y_AXIS), y, z, FIRST_Z_AXIS, ix, AXIS_ACTUAL_MAX(FIRST_Y_AXIS), z); INTERSECT_PLANE(AXIS_ACTUAL_MIN(FIRST_Z_AXIS), z, y, FIRST_Y_AXIS, ix, y, AXIS_ACTUAL_MIN(FIRST_Z_AXIS)); INTERSECT_PLANE(AXIS_ACTUAL_MAX(FIRST_Z_AXIS), z, y, FIRST_Y_AXIS, ix, y, AXIS_ACTUAL_MAX(FIRST_Z_AXIS)); } /* if (ix == ox) */ if (iy == oy) { /* already checked case (ix == ox && iy == oy) */ if (oz == iz) { /* line parallel to x axis */ /* assume inrange(iz) && inrange(iy) */ *ey = iy; /* == oy */ *ez = iz; /* == oz */ if (inrange(AXIS_ACTUAL_MAX(FIRST_X_AXIS), ix, ox)) *ex = AXIS_ACTUAL_MAX(FIRST_X_AXIS); else if (inrange(AXIS_ACTUAL_MIN(FIRST_X_AXIS), ix, ox)) *ex = AXIS_ACTUAL_MIN(FIRST_X_AXIS); else { graph_error("error in edge3d_intersect"); } return; } /* nasty 2D slanted line in an xz plane */ INTERSECT_PLANE(AXIS_ACTUAL_MIN(FIRST_X_AXIS), x, z, FIRST_Z_AXIS, AXIS_ACTUAL_MIN(FIRST_X_AXIS), iy, z); INTERSECT_PLANE(AXIS_ACTUAL_MAX(FIRST_X_AXIS), x, z, FIRST_Z_AXIS, AXIS_ACTUAL_MAX(FIRST_X_AXIS), iy, z); INTERSECT_PLANE(AXIS_ACTUAL_MIN(FIRST_Z_AXIS), z, x, FIRST_X_AXIS, x, iy, AXIS_ACTUAL_MIN(FIRST_Z_AXIS)); INTERSECT_PLANE(AXIS_ACTUAL_MAX(FIRST_Z_AXIS), z, x, FIRST_X_AXIS, x, iy, AXIS_ACTUAL_MAX(FIRST_Z_AXIS)); } /* if(iy==oy) */ if (iz == oz) { /* already checked cases (ix == ox && iz == oz) and (iy == oy && iz == oz) */ /* 2D slanted line in an xy plane */ /* assume inrange(oz) */ INTERSECT_PLANE(AXIS_ACTUAL_MIN(FIRST_X_AXIS), x, y, FIRST_Y_AXIS, AXIS_ACTUAL_MIN(FIRST_X_AXIS), y, iz); INTERSECT_PLANE(AXIS_ACTUAL_MAX(FIRST_X_AXIS), x, y, FIRST_Y_AXIS, AXIS_ACTUAL_MAX(FIRST_X_AXIS), y, iz); INTERSECT_PLANE(AXIS_ACTUAL_MIN(FIRST_Y_AXIS), y, x, FIRST_X_AXIS, x, AXIS_ACTUAL_MIN(FIRST_Y_AXIS), iz); INTERSECT_PLANE(AXIS_ACTUAL_MAX(FIRST_Y_AXIS), y, x, FIRST_X_AXIS, x, AXIS_ACTUAL_MAX(FIRST_Y_AXIS), iz); } /* if(iz==oz) */ #undef INTERSECT_PLANE /* really nasty general slanted 3D case */ #define INTERSECT_DIAG(cut, axis, eff, eff_axis, eff2, eff2_axis, \ res_x, res_y, res_z) \ do { \ if (inrange(cut, i##axis, o##axis) \ && cut != i##axis \ && cut != o##axis) { \ eff = (cut - i##axis) \ * ((o##eff - i##eff) / (o##axis - i##axis)) \ + i##eff; \ eff2 = (cut - i##axis) \ * ((o##eff2 - i##eff2) / (o##axis - i##axis)) \ + i##eff2; \ if (IN_AXIS_RANGE(eff, eff_axis) \ && IN_AXIS_RANGE(eff2, eff2_axis)) { \ *ex = res_x; \ *ey = res_y; \ *ez = res_z; \ return; \ } \ } \ } while (0) INTERSECT_DIAG(AXIS_ACTUAL_MIN(FIRST_X_AXIS), x, y, FIRST_Y_AXIS, z, FIRST_Z_AXIS, AXIS_ACTUAL_MIN(FIRST_X_AXIS), y, z); INTERSECT_DIAG(AXIS_ACTUAL_MAX(FIRST_X_AXIS), x, y, FIRST_Y_AXIS, z, FIRST_Z_AXIS, AXIS_ACTUAL_MAX(FIRST_X_AXIS), y, z); INTERSECT_DIAG(AXIS_ACTUAL_MIN(FIRST_Y_AXIS), y, x, FIRST_X_AXIS, z, FIRST_Z_AXIS, x, AXIS_ACTUAL_MIN(FIRST_Y_AXIS), z); INTERSECT_DIAG(AXIS_ACTUAL_MAX(FIRST_Y_AXIS), y, x, FIRST_X_AXIS, z, FIRST_Z_AXIS, x, AXIS_ACTUAL_MAX(FIRST_Y_AXIS), z); INTERSECT_DIAG(AXIS_ACTUAL_MIN(FIRST_Z_AXIS), z, x, FIRST_X_AXIS, y, FIRST_Y_AXIS, x, y, AXIS_ACTUAL_MIN(FIRST_Z_AXIS)); INTERSECT_DIAG(AXIS_ACTUAL_MAX(FIRST_Z_AXIS), z, x, FIRST_X_AXIS, y, FIRST_Y_AXIS, x, y, AXIS_ACTUAL_MAX(FIRST_Z_AXIS)); #undef INTERSECT_DIAG /* If we reach here, the inrange point is on the edge, and * the line segment from the outrange point does not cross any * other edges to get there. In this case, we return the inrange * point as the 'edge' intersection point. This will basically draw * line. */ *ex = ix; *ey = iy; *ez = iz; return; } /* double edge intersection algorithm */ /* Given two points, both outside the plot, return * the points where an edge of the plot intersects the line segment defined * by the two points. There may be zero, one, two, or an infinite number * of intersection points. (One means an intersection at a corner, infinite * means overlaying the edge itself). We return FALSE when there is nothing * to draw (zero intersections), and TRUE when there is something to * draw (the one-point case is a degenerate of the two-point case and we do * not distinguish it - we draw it anyway). */ TBOOLEAN /* any intersection? */ two_edge3d_intersect( struct coordinate GPHUGE *points, /* the points array */ int i0, int i1, double *lx, double *ly, double *lz) /* lx[2], ly[2], lz[2]: points where it crosses edges */ { int count; /* global axis_array[FIRST_{X,Y,Z}_AXIS].{min,max} */ double ix = points[i0].x; double iy = points[i0].y; double iz = points[i0].z; double ox = points[i1].x; double oy = points[i1].y; double oz = points[i1].z; double t[6]; double swap; double x, y, z; /* possible intersection point */ double t_min, t_max; /* nasty degenerate cases, effectively drawing to an infinity point (?) cope with them here, so don't process them as a "real" OUTRANGE point If more than one coord is -VERYLARGE, then can't ratio the "infinities" so drop out by returning FALSE */ count = 0; if (ix == -VERYLARGE) count++; if (ox == -VERYLARGE) count++; if (iy == -VERYLARGE) count++; if (oy == -VERYLARGE) count++; if (iz == -VERYLARGE) count++; if (oz == -VERYLARGE) count++; /* either doesn't pass through 3D volume *or* can't ratio infinities to get a direction to draw line, so simply return(FALSE) */ if (count > 1) { return (FALSE); } if (ox == -VERYLARGE || ix == -VERYLARGE) { if (ix == -VERYLARGE) { /* swap points so ix/iy/iz don't have a -VERYLARGE component */ x = ix; ix = ox; ox = x; y = iy; iy = oy; oy = y; z = iz; iz = oz; oz = z; } /* check actually passes through the 3D graph volume */ if (ix > axis_array[FIRST_X_AXIS].max && IN_AXIS_RANGE(iy, FIRST_Y_AXIS) && IN_AXIS_RANGE(iz, FIRST_Z_AXIS)) { lx[0] = axis_array[FIRST_X_AXIS].min; ly[0] = iy; lz[0] = iz; lx[1] = axis_array[FIRST_X_AXIS].max; ly[1] = iy; lz[1] = iz; return (TRUE); } else { return (FALSE); } } if (oy == -VERYLARGE || iy == -VERYLARGE) { if (iy == -VERYLARGE) { /* swap points so ix/iy/iz don't have a -VERYLARGE component */ x = ix; ix = ox; ox = x; y = iy; iy = oy; oy = y; z = iz; iz = oz; oz = z; } /* check actually passes through the 3D graph volume */ if (iy > axis_array[FIRST_Y_AXIS].max && IN_AXIS_RANGE(ix, FIRST_X_AXIS) && IN_AXIS_RANGE(iz, FIRST_Z_AXIS)) { lx[0] = ix; ly[0] = axis_array[FIRST_Y_AXIS].min; lz[0] = iz; lx[1] = ix; ly[1] = axis_array[FIRST_Y_AXIS].max; lz[1] = iz; return (TRUE); } else { return (FALSE); } } if (oz == -VERYLARGE || iz == -VERYLARGE) { if (iz == -VERYLARGE) { /* swap points so ix/iy/iz don't have a -VERYLARGE component */ x = ix; ix = ox; ox = x; y = iy; iy = oy; oy = y; z = iz; iz = oz; oz = z; } /* check actually passes through the 3D graph volume */ if (iz > axis_array[FIRST_Z_AXIS].max && IN_AXIS_RANGE(ix, FIRST_X_AXIS) && IN_AXIS_RANGE(iy, FIRST_Y_AXIS)) { lx[0] = ix; ly[0] = iy; lz[0] = axis_array[FIRST_Z_AXIS].min; lx[1] = ix; ly[1] = iy; lz[1] = axis_array[FIRST_Z_AXIS].max; return (TRUE); } else { return (FALSE); } } /* * Quick outcode tests on the 3d graph volume */ /* test z coord first --- most surface OUTRANGE points generated * between axis_array[FIRST_Z_AXIS].min and baseplane (i.e. when * ticslevel is non-zero) */ if (GPMAX(iz, oz) < axis_array[FIRST_Z_AXIS].min || GPMIN(iz, oz) > axis_array[FIRST_Z_AXIS].max) return (FALSE); if (GPMAX(ix, ox) < axis_array[FIRST_X_AXIS].min || GPMIN(ix, ox) > axis_array[FIRST_X_AXIS].max) return (FALSE); if (GPMAX(iy, oy) < axis_array[FIRST_Y_AXIS].min || GPMIN(iy, oy) > axis_array[FIRST_Y_AXIS].max) return (FALSE); /* Special horizontal/vertical, etc. cases are checked and * remaining slant lines are checked separately. * * The slant line intersections are solved using the parametric * form of the equation for a line, since if we test x/y/z min/max * planes explicitly then e.g. a line passing through a corner * point (x_min,y_min,z_min) actually intersects all 3 planes and * hence further tests would be required to anticipate this and * similar situations. */ /* Can have case (ix == ox && iy == oy && iz == oz) as both points * OUTRANGE */ if (ix == ox && iy == oy && iz == oz) { /* but as only define single outrange point, can't intersect * 3D graph volume */ return (FALSE); } if (ix == ox) { if (iy == oy) { /* line parallel to z axis */ /* x and y coords must be in range, and line must span * both FIRST_Z_AXIS->min and ->max. * * note that spanning FIRST_Z_AXIS->min implies spanning * ->max as both points OUTRANGE */ if (!IN_AXIS_RANGE(ix, FIRST_X_AXIS) || !IN_AXIS_RANGE(iy, FIRST_Y_AXIS)) { return (FALSE); } if (inrange(axis_array[FIRST_Z_AXIS].min, iz, oz)) { lx[0] = ix; ly[0] = iy; lz[0] = axis_array[FIRST_Z_AXIS].min; lx[1] = ix; ly[1] = iy; lz[1] = axis_array[FIRST_Z_AXIS].max; return (TRUE); } else return (FALSE); } if (iz == oz) { /* line parallel to y axis */ if (!IN_AXIS_RANGE(ix, FIRST_X_AXIS) || !IN_AXIS_RANGE(iz, FIRST_Z_AXIS)) { return (FALSE); } if (inrange(axis_array[FIRST_Y_AXIS].min, iy, oy)) { lx[0] = ix; ly[0] = axis_array[FIRST_Y_AXIS].min; lz[0] = iz; lx[1] = ix; ly[1] = axis_array[FIRST_Y_AXIS].max; lz[1] = iz; return (TRUE); } else return (FALSE); } /* nasty 2D slanted line in a yz plane */ if (!IN_AXIS_RANGE(ox, FIRST_X_AXIS)) return (FALSE); t[0] = (axis_array[FIRST_Y_AXIS].min - iy) / (oy - iy); t[1] = (axis_array[FIRST_Y_AXIS].max - iy) / (oy - iy); if (t[0] > t[1]) { swap = t[0]; t[0] = t[1]; t[1] = swap; } t[2] = (axis_array[FIRST_Z_AXIS].min - iz) / (oz - iz); t[3] = (axis_array[FIRST_Z_AXIS].max - iz) / (oz - iz); if (t[2] > t[3]) { swap = t[2]; t[2] = t[3]; t[3] = swap; } t_min = GPMAX(GPMAX(t[0], t[2]), 0.0); t_max = GPMIN(GPMIN(t[1], t[3]), 1.0); if (t_min > t_max) return (FALSE); lx[0] = ix; ly[0] = iy + t_min * (oy - iy); lz[0] = iz + t_min * (oz - iz); lx[1] = ix; ly[1] = iy + t_max * (oy - iy); lz[1] = iz + t_max * (oz - iz); /* Can only have 0 or 2 intersection points -- only need test * one coord */ if (IN_AXIS_RANGE(ly[0], FIRST_Y_AXIS) && IN_AXIS_RANGE(lz[0], FIRST_Z_AXIS)) { return (TRUE); } return (FALSE); } if (iy == oy) { /* already checked case (ix == ox && iy == oy) */ if (oz == iz) { /* line parallel to x axis */ if (!IN_AXIS_RANGE(iy, FIRST_Y_AXIS) || !IN_AXIS_RANGE(iz, FIRST_Z_AXIS)) { return (FALSE); } if (inrange(axis_array[FIRST_X_AXIS].min, ix, ox)) { lx[0] = axis_array[FIRST_X_AXIS].min; ly[0] = iy; lz[0] = iz; lx[1] = axis_array[FIRST_X_AXIS].max; ly[1] = iy; lz[1] = iz; return (TRUE); } else return (FALSE); } /* nasty 2D slanted line in an xz plane */ if (!IN_AXIS_RANGE(oy, FIRST_Y_AXIS)) return (FALSE); t[0] = (axis_array[FIRST_X_AXIS].min - ix) / (ox - ix); t[1] = (axis_array[FIRST_X_AXIS].max - ix) / (ox - ix); if (t[0] > t[1]) { swap = t[0]; t[0] = t[1]; t[1] = swap; } t[2] = (axis_array[FIRST_Z_AXIS].min - iz) / (oz - iz); t[3] = (axis_array[FIRST_Z_AXIS].max - iz) / (oz - iz); if (t[2] > t[3]) { swap = t[2]; t[2] = t[3]; t[3] = swap; } t_min = GPMAX(GPMAX(t[0], t[2]), 0.0); t_max = GPMIN(GPMIN(t[1], t[3]), 1.0); if (t_min > t_max) return (FALSE); lx[0] = ix + t_min * (ox - ix); ly[0] = iy; lz[0] = iz + t_min * (oz - iz); lx[1] = ix + t_max * (ox - ix); ly[1] = iy; lz[1] = iz + t_max * (oz - iz); /* * Can only have 0 or 2 intersection points -- only need test one coord */ if (IN_AXIS_RANGE(lx[0], FIRST_X_AXIS) && IN_AXIS_RANGE(lz[0], FIRST_Z_AXIS)) { return (TRUE); } return (FALSE); } if (iz == oz) { /* already checked cases (ix == ox && iz == oz) and (iy == oy && iz == oz) */ /* nasty 2D slanted line in an xy plane */ if (!IN_AXIS_RANGE(oz, FIRST_Z_AXIS)) return (FALSE); t[0] = (axis_array[FIRST_X_AXIS].min - ix) / (ox - ix); t[1] = (axis_array[FIRST_X_AXIS].max - ix) / (ox - ix); if (t[0] > t[1]) { swap = t[0]; t[0] = t[1]; t[1] = swap; } t[2] = (axis_array[FIRST_Y_AXIS].min - iy) / (oy - iy); t[3] = (axis_array[FIRST_Y_AXIS].max - iy) / (oy - iy); if (t[2] > t[3]) { swap = t[2]; t[2] = t[3]; t[3] = swap; } t_min = GPMAX(GPMAX(t[0], t[2]), 0.0); t_max = GPMIN(GPMIN(t[1], t[3]), 1.0); if (t_min > t_max) return (FALSE); lx[0] = ix + t_min * (ox - ix); ly[0] = iy + t_min * (oy - iy); lz[0] = iz; lx[1] = ix + t_max * (ox - ix); ly[1] = iy + t_max * (oy - iy); lz[1] = iz; /* * Can only have 0 or 2 intersection points -- only need test one coord */ if (IN_AXIS_RANGE(lx[0], FIRST_X_AXIS) && IN_AXIS_RANGE(ly[0], FIRST_Y_AXIS)) { return (TRUE); } return (FALSE); } /* really nasty general slanted 3D case */ /* Solve parametric equation (ix, iy, iz) + t (diff_x, diff_y, diff_z) where 0.0 <= t <= 1.0 and diff_x = (ox - ix); diff_y = (oy - iy); diff_z = (oz - iz); */ t[0] = (axis_array[FIRST_X_AXIS].min - ix) / (ox - ix); t[1] = (axis_array[FIRST_X_AXIS].max - ix) / (ox - ix); if (t[0] > t[1]) { swap = t[0]; t[0] = t[1]; t[1] = swap; } t[2] = (axis_array[FIRST_Y_AXIS].min - iy) / (oy - iy); t[3] = (axis_array[FIRST_Y_AXIS].max - iy) / (oy - iy); if (t[2] > t[3]) { swap = t[2]; t[2] = t[3]; t[3] = swap; } t[4] = (iz == oz) ? 0.0 : (axis_array[FIRST_Z_AXIS].min - iz) / (oz - iz); t[5] = (iz == oz) ? 1.0 : (axis_array[FIRST_Z_AXIS].max - iz) / (oz - iz); if (t[4] > t[5]) { swap = t[4]; t[4] = t[5]; t[5] = swap; } t_min = GPMAX(GPMAX(t[0], t[2]), GPMAX(t[4], 0.0)); t_max = GPMIN(GPMIN(t[1], t[3]), GPMIN(t[5], 1.0)); if (t_min > t_max) return (FALSE); lx[0] = ix + t_min * (ox - ix); ly[0] = iy + t_min * (oy - iy); lz[0] = iz + t_min * (oz - iz); lx[1] = ix + t_max * (ox - ix); ly[1] = iy + t_max * (oy - iy); lz[1] = iz + t_max * (oz - iz); /* * Can only have 0 or 2 intersection points -- only need test one coord */ if (IN_AXIS_RANGE(lx[0], FIRST_X_AXIS) && IN_AXIS_RANGE(ly[0], FIRST_Y_AXIS) && IN_AXIS_RANGE(lz[0], FIRST_Z_AXIS)) { return (TRUE); } return (FALSE); } /* Performs transformation from 'user coordinates' to a normalized * vector in 'graph coordinates' (-1..1 in all three directions). */ void map3d_xyz( double x, double y, double z, /* user coordinates */ p_vertex out) { int i, j; double V[4], Res[4]; /* Homogeneous coords. vectors. */ /* Normalize object space to -1..1 */ V[0] = map_x3d(x); V[1] = map_y3d(y); V[2] = map_z3d(z); V[3] = 1.0; /* Res[] = V[] * trans_mat[][] (uses row-vectors) */ for (i = 0; i < 4; i++) { Res[i] = trans_mat[3][i]; /* V[3] is 1. anyway */ for (j = 0; j < 3; j++) Res[i] += V[j] * trans_mat[j][i]; } if (Res[3] == 0) Res[3] = 1.0e-5; out->x = Res[0] / Res[3]; out->y = Res[1] / Res[3]; out->z = Res[2] / Res[3]; /* store z for later color calculation */ out->real_z = z; out->label = NULL; } /* Function to map from user 3D space to normalized 'camera' view * space, and from there directly to terminal coordinates */ void map3d_xy( double x, double y, double z, int *xt, int *yt) { double xtd, ytd; map3d_xy_double(x, y, z, &xtd, &ytd); *xt = xtd; *yt = ytd; } void map3d_xy_double( double x, double y, double z, double *xt, double *yt) { vertex v; map3d_xyz(x, y, z, &v); TERMCOORD(&v, *xt, *yt); } /* HBB 20020313: New routine, broken out of draw3d_point, to be used * to output a single point without any checks for hidden3d */ static GP_INLINE void draw3d_point_unconditional(p_vertex v, struct lp_style_type *lp) { unsigned int x, y; TERMCOORD(v, x, y); /* Jul 2010 EAM - is it safe to overwrite like this? Make a copy instead? */ lp->pm3d_color.value = v->real_z; term_apply_lp_properties(lp); if (!clip_point(x, y)) (term->point) (x, y, lp->p_type); } /* Moved this upward, to make optional inlining in draw3d_line easier * for compilers */ /* HBB 20021128: removed GP_INLINE qualifier to avoid MSVC++ silliness */ void draw3d_line_unconditional( p_vertex v1, p_vertex v2, struct lp_style_type *lp, t_colorspec color) { unsigned int x1, y1, x2, y2; struct lp_style_type ls = *lp; /* HBB 20020312: v2 can be NULL, if this call is coming from draw_line_hidden. --> redirect to point drawing routine */ if (! v2) { draw3d_point_unconditional(v1, lp); return; } TERMCOORD(v1, x1, y1); TERMCOORD(v2, x2, y2); /* Replace original color with the one passed in */ ls.pm3d_color = color; /* Color by Z value */ if (ls.pm3d_color.type == TC_Z) ls.pm3d_color.value = (v1->real_z + v2->real_z) * 0.5; term_apply_lp_properties(&ls); /* Support for hidden3d VECTOR mode with arrowheads */ if (lp->p_type == PT_ARROWHEAD) draw_clip_arrow(x1,y1,x2,y2,END_HEAD); else if (lp->p_type == PT_BACKARROW) draw_clip_arrow(x1,y1,x2,y2,BACKHEAD); else draw_clip_line(x1,y1,x2,y2); } void draw3d_line (p_vertex v1, p_vertex v2, struct lp_style_type *lp) { /* hidden3d routine can't work if no surface was drawn at all */ if (hidden3d && draw_surface) { draw_line_hidden(v1, v2, lp); return; } draw3d_line_unconditional(v1, v2, lp, lp->pm3d_color); } /* HBB 20000621: new routine, to allow for hiding point symbols behind * the surface */ void draw3d_point(p_vertex v, struct lp_style_type *lp) { /* hidden3d routine can't work if no surface was drawn at all */ if (hidden3d && draw_surface) { /* Draw vertex as a zero-length edge */ draw_line_hidden(v, NULL, lp); return; } draw3d_point_unconditional(v, lp); } /* HBB NEW 20031218: tools for drawing polylines in 3D with a semantic * like term->move() and term->vector() */ /* Previous points 3D position */ static vertex polyline3d_previous_vertex; void polyline3d_start(p_vertex v1) { unsigned int x1, y1; polyline3d_previous_vertex = *v1; if (hidden3d && draw_surface) return; /* EAM - This may now be unneeded. But I'm not sure. */ /* Perhaps the hidden3d code needs the move. */ TERMCOORD(v1, x1, y1); term->move(x1, y1); } void polyline3d_next(p_vertex v2, struct lp_style_type *lp) { unsigned int x1, y1; unsigned int x2, y2; /* Copied from draw3d_line(): */ /* FIXME HBB 20031218: hidden3d mode will still create isolated * edges! */ if (hidden3d && draw_surface) { draw_line_hidden(&polyline3d_previous_vertex, v2, lp); polyline3d_previous_vertex = *v2; return; } /* Copied from draw3d_line_unconditional: */ /* If use_palette is active, polylines can't be used --> * revert back to old method */ if (lp->use_palette) { draw3d_line_unconditional(&polyline3d_previous_vertex, v2, lp, lp->pm3d_color); polyline3d_previous_vertex = *v2; return; } TERMCOORD(&polyline3d_previous_vertex, x1, y1); TERMCOORD(v2, x2, y2); draw_clip_line(x1,y1,x2,y2); polyline3d_previous_vertex = *v2; } /* * Dummy up an x-axis scale so that we can share the 2D arrowhead routine. */ void apply_3dhead_properties(struct arrow_style_type *arrow_properties) { X_AXIS.term_scale = (plot_bounds.xright - plot_bounds.xleft) / (X_AXIS.max - X_AXIS.min); apply_head_properties(arrow_properties); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/dynarray.h������������������������������������������������������������������������0000644�0004711�0000144�00000004527�10037021051�012717� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: dynarray.h,v 1.7 2004/04/13 17:23:53 broeker Exp $ */ /* GNUPLOT - dynarray.h */ /*[ * Copyright 1999, 2004 Hans-Bernhard Broeker * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef DYNARRAY__H # define DYNARRAY__H # include "syscfg.h" # include "stdfn.h" typedef struct dynarray { long size; /* alloced size of the array */ long end; /* index of first unused entry */ long increment; /* amount to increment size by, on realloc */ size_t entry_size; /* size of the entries in this array */ void GPHUGE *v; /* the vector itself */ } dynarray; /* Prototypes */ void init_dynarray __PROTO((dynarray * array, size_t element, long size, long increment)); void free_dynarray __PROTO((dynarray * array)); void extend_dynarray __PROTO((dynarray * array, long increment)); void resize_dynarray __PROTO((dynarray * array, long newsize)); void GPHUGE *nextfrom_dynarray __PROTO((dynarray * array)); void droplast_dynarray __PROTO((dynarray * array)); #endif /* DYNARRAY_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/�����������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340010�013063� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotApplication.h�������������������������������������������������0000644�0004711�0000144�00000005425�11706050702�017376� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotApplication.h */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #ifndef QTGNUPLOTAPPLICATION_H #define QTGNUPLOTAPPLICATION_H #include "QtGnuplotEvent.h" #include <QApplication> #include <QMap> class QtGnuplotWindow; class QtGnuplotApplication : public QApplication, public QtGnuplotEventReceiver { Q_OBJECT public: QtGnuplotApplication(int& argc, char** argv); ~QtGnuplotApplication(); public slots: void windowDestroyed(QObject* object = 0); void enterPersistMode(); void exitPersistMode(); public: void processEvent(QtGnuplotEventType type, QDataStream& in); private: QMap<int, QtGnuplotWindow*> m_windows; QtGnuplotWindow* m_currentWindow; int m_lastId; }; #endif // QTGNUPLOTAPPLICATION_H �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotEvent.cpp�����������������������������������������������������0000644�0004711�0000144�00000013243�11706050702�016544� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotEvent.cpp */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #include "QtGnuplotEvent.h" #include <QtNetwork> QString QtGnuplotEventReceiver::serverName() { if (m_eventHandler) return m_eventHandler->serverName(); return QString(); } QtGnuplotEventHandler::QtGnuplotEventHandler(QObject* parent, const QString& socket) : QObject(parent) { m_blockSize = 0; m_socket = 0; m_server = new QLocalServer(this); if (!m_server->listen(socket)) qDebug() << "QtGnuplotApplication error : cannot open server"; connect(m_server, SIGNAL(newConnection()), this, SLOT(newConnection())); } QString QtGnuplotEventHandler::serverName() { return m_server->serverName(); } void QtGnuplotEventHandler::newConnection() { m_socket = m_server->nextPendingConnection(); connect(m_socket, SIGNAL(readyRead()), this, SLOT(readEvent())); connect(m_socket, SIGNAL(disconnected()), this, SLOT(connectionClosed())); emit(connected()); } void QtGnuplotEventHandler::connectionClosed() { emit(disconnected()); } void QtGnuplotEventHandler::readEvent() { QDataStream in(m_socket); in.setVersion(QDataStream::Qt_4_4); QtGnuplotEventReceiver* receiver = dynamic_cast<QtGnuplotEventReceiver*>(parent()); if (!receiver) { qDebug() << "QtGnuplotEventHandler::readEvent -- No receiver !"; return; } while(!in.atEnd()) { // Extract the message length if (m_blockSize == 0) { if (m_socket->bytesAvailable() < (int)sizeof(qint32)) return; in >> m_blockSize; } // Break if the message is not entirely received yet if (m_socket->bytesAvailable() < m_blockSize) return; // Process the message int remaining = m_socket->bytesAvailable() - m_blockSize; while (m_socket->bytesAvailable() > remaining) { int type; in >> type; if ((type < 1000) || (type > GEDone)) { // FIXME EAM - At this point the program cannot recover and // if we try to continue it will eventually become a zombie. // Better to just exit explicitly right now. qDebug() << "############### WRONG readEvent " << type << m_socket->bytesAvailable(); exit(0); // return; } receiver->processEvent(QtGnuplotEventType(type), in); } m_blockSize = 0; } } bool QtGnuplotEventHandler::postTermEvent(int type, int mx, int my, int par1, int par2, int winid) { /// @todo catch events if not the active window if ((m_socket == 0) || (m_socket->state() != QLocalSocket::ConnectedState)) return false; gp_event_t event; event.type = type; event.mx = mx; event.my = my; event.par1 = par1; event.par2 = par2; event.winid = winid; m_socket->write((char*) &event, sizeof(gp_event_t)); return true; } // Catch events for which the receiver is not active void QtGnuplotEventReceiver::swallowEvent(QtGnuplotEventType type, QDataStream& in) { QString string; int i; bool b; if (type == GESetCurrentWindow) in >> i; // 1000 else if (type == GEInitWindow) ; // 1001 else if (type == GECloseWindow) in >> i; // 1002 else if (type == GEExit) ; // 1003 else if (type == GEPersist) ; // 1004 else if (type == GEStatusText) in >> string; // 1005 else if (type == GETitle) in >> string; // 1006 else if (type == GESetCtrl) in >> b; // 1007 else if (type == GECursor) in >> i; // 1009 else if (type == GEZoomStart) in >> string; // 1022 else if (type == GEZoomStop) in >> string; // 1023 else if (type == GERaise) ; // 1034 else if (type == GEDesactivate) ; // 1038 else qDebug() << "Event not swallowed !" << type; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/embed_example.h��������������������������������������������������������0000644�0004711�0000144�00000005170�11236062134�016041� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - embed_example.h */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #ifndef EMBED_EXAMPLE_H #define EMBED_EXAMPLE_H #include "QtGnuplotInstance.h" #include <QtCore> #include <QtGui> class QtGnuplotWidget; class QPlainTextEdit; class GnuplotWidget : public QWidget { Q_OBJECT public: GnuplotWidget(); public slots: void tick(); void plot(); void statusText(const QString& status); void gnuplotOutput(const QString& output); private: QtGnuplotInstance gp; QTimer timer; double phi; QtGnuplotWidget* widgets[4]; QPlainTextEdit* outputFrame; }; #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplot.pro����������������������������������������������������������0000644�0004711�0000144�00000000517�11233555355�015571� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This qmake project file is used for internationalization tools. # run lupdate to update ts files, linguist to edit the translations # and lrelease to generate the qm files SOURCES = QtGnuplotWidget.cpp QtGnuplotWindow.cpp FORMS = QtGnuplotSettings.ui TRANSLATIONS = po/qtgnuplot_fr.ts \ po/qtgnuplot_ja.ts���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotWidget.cpp����������������������������������������������������0000644�0004711�0000144�00000024047�12044555342�016720� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotWidget.cpp */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #include "QtGnuplotWidget.h" #include "QtGnuplotEvent.h" #include "QtGnuplotScene.h" #include "QtGnuplotItems.h" #include <QtGui> #include <QSvgGenerator> int QtGnuplotWidget::m_widgetUid = 1; QtGnuplotWidget::QtGnuplotWidget(int id, QtGnuplotEventHandler* eventHandler, QWidget* parent) : QWidget(parent) { m_id = id; m_active = false; m_lastSizeRequest = QSize(-1, -1); m_eventHandler = eventHandler; // Register as the main event receiver if not already created if (m_eventHandler == 0) m_eventHandler = new QtGnuplotEventHandler(this,"qtgnuplot" + QString::number(QCoreApplication::applicationPid()) + "-" + QString::number(m_widgetUid++)); // Construct GUI elements m_scene = new QtGnuplotScene(m_eventHandler, this); m_view = new QGraphicsView(m_scene); m_view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); QVBoxLayout* layout = new QVBoxLayout(); layout->setContentsMargins(0, 0, 0, 0); layout->addWidget(m_view); setLayout(layout); setViewMatrix(); loadSettings(); } void QtGnuplotWidget::setStatusText(const QString& status) { emit statusTextChanged(status); } bool QtGnuplotWidget::isActive() const { return m_active; } QSize QtGnuplotWidget::plotAreaSize() const { return m_view->viewport()->size(); } void QtGnuplotWidget::setViewMatrix() { m_view->resetMatrix(); } void QtGnuplotWidget::processEvent(QtGnuplotEventType type, QDataStream& in) { if (type == GESetWidgetSize) { QSize s; in >> s; // qDebug() << "Size request" << s << " / viewport" << m_view->maximumViewportSize(); m_lastSizeRequest = s; m_view->resetMatrix(); QWidget* viewport = m_view->viewport(); if (s != viewport->size()) { // qDebug() << " -> resizing"; QMainWindow* parent = dynamic_cast<QMainWindow*>(parentWidget()); if (parent) parent->resize(s + parent->size() - viewport->size()); viewport->resize(s); } } else if (type == GEStatusText) { QString status; in >> status; setStatusText(status); } else if (type == GECopyClipboard) { QString text; in >> text; QApplication::clipboard()->setText(text); } else if (type == GECursor) { int cursorType; in >> cursorType; m_view->setCursor(Qt::CursorShape(cursorType)); } else if (type == GEWrapCursor) { QPoint point; in >> point; QCursor::setPos(mapToGlobal(point)); } else if (type == GEActivate) m_active = true; else if (type == GEDesactivate) m_active = false; // Forward the event to the scene else m_scene->processEvent(type, in); } void QtGnuplotWidget::resizeEvent(QResizeEvent* event) { QWidget* viewport = m_view->viewport(); // qDebug() << "QtGnuplotWidget::resizeEvent" << "W" << size() << "V" << m_view->size() << "P" << viewport->size(); // We only inform gnuplot of a new size, and not of the first resize event if ((viewport->size() != m_lastSizeRequest) && (m_lastSizeRequest != QSize(-1, -1))) { m_eventHandler->postTermEvent(GE_fontprops,viewport->size().width(), viewport->size().height(), 9, 9, 0); /// @todo m_id if (m_replotOnResize && m_active) m_eventHandler->postTermEvent(GE_keypress, 0, 0, 'e', 0, 0); // ask for replot else m_view->fitInView(m_scene->sceneRect(), Qt::KeepAspectRatio); } QWidget::resizeEvent(event); } QPainter::RenderHints QtGnuplotWidget::renderHints() const { QPainter::RenderHints hint = QPainter::TextAntialiasing; if (m_antialias) hint |= QPainter::Antialiasing; return hint; } ///////////////////////////////////////////////// // Slots QPixmap QtGnuplotWidget::createPixmap() { QPixmap pixmap(m_scene->width(), m_scene->height()); pixmap.fill(); QPainter painter(&pixmap); painter.translate(0.5, 0.5); painter.setRenderHints(renderHints()); m_scene->render(&painter); painter.end(); return pixmap; } void QtGnuplotWidget::copyToClipboard() { QApplication::clipboard()->setPixmap(createPixmap()); } void QtGnuplotWidget::print() { QPrinter printer; if (QPrintDialog(&printer).exec() == QDialog::Accepted) { QPainter painter(&printer); painter.setRenderHints(renderHints()); m_scene->render(&painter); } } void QtGnuplotWidget::exportToPdf() { QString fileName = QFileDialog::getSaveFileName(this, tr("Export to PDF"), "", tr("PDF files (*.pdf)")); if (fileName.isEmpty()) return; if (!fileName.endsWith(".pdf", Qt::CaseInsensitive)) fileName += ".pdf"; QPrinter printer; printer.setOutputFormat(QPrinter::PdfFormat); printer.setOutputFileName(fileName); printer.setPaperSize(QSizeF(m_scene->width(), m_scene->height()), QPrinter::Point); printer.setPageMargins(0, 0, 0, 0, QPrinter::Point); QPainter painter(&printer); painter.setRenderHints(renderHints()); m_scene->render(&painter); } void QtGnuplotWidget::exportToEps() { /// @todo } void QtGnuplotWidget::exportToImage() { /// @todo other image formats supported by Qt QString fileName = QFileDialog::getSaveFileName(this, tr("Export to Image"), "", tr("Image files (*.png *.bmp)")); if (fileName.isEmpty()) return; if (!fileName.endsWith(".png", Qt::CaseInsensitive) && !fileName.endsWith(".bmp", Qt::CaseInsensitive)) fileName += ".png"; createPixmap().save(fileName); } void QtGnuplotWidget::exportToSvg() { QString fileName = QFileDialog::getSaveFileName(this, tr("Export to SVG"), "", tr("SVG files (*.svg)")); if (fileName.isEmpty()) return; if (!fileName.endsWith(".svg", Qt::CaseInsensitive)) fileName += ".svg"; QSvgGenerator svg; svg.setFileName(fileName); svg.setSize(QSize(m_view->width(), m_view->height())); svg.setViewBox(QRect(0, 0, m_view->width(), m_view->height())); QPainter painter(&svg); m_scene->render(&painter); painter.end(); } ///////////////////////////////////////////////// // Settings void QtGnuplotWidget::loadSettings() { QSettings settings("gnuplot", "qtterminal"); m_antialias = settings.value("view/antialias", true).toBool(); m_rounded = settings.value("view/rounded", true).toBool(); m_backgroundColor = settings.value("view/backgroundColor", Qt::white).value<QColor>(); m_replotOnResize = settings.value("view/replotOnResize", true).toBool(); applySettings(); } void QtGnuplotWidget::applySettings() { m_view->setRenderHints(renderHints()); m_view->setBackgroundBrush(m_backgroundColor); } void QtGnuplotWidget::saveSettings() { QSettings settings("gnuplot", "qtterminal"); settings.setValue("view/antialias", m_antialias); settings.setValue("view/rounded", m_rounded); settings.setValue("view/backgroundColor", m_backgroundColor); settings.setValue("view/replotOnResize", m_replotOnResize); } #include "ui_QtGnuplotSettings.h" void QtGnuplotWidget::showSettingsDialog() { QDialog* settingsDialog = new QDialog(this); m_ui = new Ui_settingsDialog(); m_ui->setupUi(settingsDialog); m_ui->antialiasCheckBox->setCheckState(m_antialias ? Qt::Checked : Qt::Unchecked); m_ui->roundedCheckBox->setCheckState(m_rounded ? Qt::Checked : Qt::Unchecked); m_ui->replotOnResizeCheckBox->setCheckState(m_replotOnResize ? Qt::Checked : Qt::Unchecked); QPixmap samplePixmap(m_ui->sampleColorLabel->size()); samplePixmap.fill(m_backgroundColor); m_ui->sampleColorLabel->setPixmap(samplePixmap); m_chosenBackgroundColor = m_backgroundColor; connect(m_ui->backgroundButton, SIGNAL(clicked()), this, SLOT(settingsSelectBackgroundColor())); settingsDialog->exec(); if (settingsDialog->result() == QDialog::Accepted) { m_backgroundColor = m_chosenBackgroundColor; m_antialias = (m_ui->antialiasCheckBox->checkState() == Qt::Checked); m_rounded = (m_ui->roundedCheckBox->checkState() == Qt::Checked); m_replotOnResize = (m_ui->replotOnResizeCheckBox->checkState() == Qt::Checked); applySettings(); saveSettings(); } } void QtGnuplotWidget::settingsSelectBackgroundColor() { m_chosenBackgroundColor = QColorDialog::getColor(m_chosenBackgroundColor, this); QPixmap samplePixmap(m_ui->sampleColorLabel->size()); samplePixmap.fill(m_chosenBackgroundColor); m_ui->sampleColorLabel->setPixmap(samplePixmap); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/po/��������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�013502� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/po/qtgnuplot_fr.ts�����������������������������������������������������0000644�0004711�0000144�00000012035�11233277675�016630� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="fr_FR"> <context> <name>QtGnuplotWidget</name> <message> <location filename="../QtGnuplotWidget.cpp" line="205"/> <source>Export to PDF</source> <translation>Exporter en PDF</translation> </message> <message> <location filename="../QtGnuplotWidget.cpp" line="205"/> <source>PDF files (*.pdf)</source> <translation>Fichiers PDF (*.pdf)</translation> </message> <message> <location filename="../QtGnuplotWidget.cpp" line="227"/> <source>Export to Image</source> <translation>Exporter en image</translation> </message> <message> <location filename="../QtGnuplotWidget.cpp" line="228"/> <source>Image files (*.png *.bmp)</source> <translation>Fichiers image (*.png *.bmp)</translation> </message> <message> <location filename="../QtGnuplotWidget.cpp" line="240"/> <source>Export to SVG</source> <translation>Exporter en SVG</translation> </message> <message> <location filename="../QtGnuplotWidget.cpp" line="240"/> <source>SVG files (*.svg)</source> <translation>Fichiers SVG (*.svg)</translation> </message> </context> <context> <name>QtGnuplotWindow</name> <message> <location filename="../QtGnuplotWindow.cpp" line="71"/> <source>Qt frontend for gnuplot</source> <translation>Terminal Qt pour gnuplot</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="74"/> <source>Copy to clipboard</source> <translation>Copier dans le presse papier</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="75"/> <source>Print</source> <translation>Imprimer</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="76"/> <source>Export</source> <translation>Exporter</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="77"/> <source>Export to PDF</source> <translation>Exporter en PDF</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="78"/> <source>Export to EPS</source> <translation>Exporter en EPS</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="79"/> <source>Export to SVG</source> <translation>Exporter en SVG</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="80"/> <source>Export to image</source> <translation>Exporter en image</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="81"/> <source>Settings</source> <translation>Préférences</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="98"/> <source>Replot</source> <translation>Redessiner</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="99"/> <source>Show grid</source> <translation>Montrer la grille</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="100"/> <source>Previous zoom</source> <translation>Zoom précédent</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="101"/> <source>Next zoom</source> <translation>Zoom suivant</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="102"/> <source>Autoscale</source> <translation>Échelle automatique</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="132"/> <source>Gnuplot window </source> <translation type="unfinished">Fenêtre gnuplot </translation> </message> </context> <context> <name>settingsDialog</name> <message> <location filename="../QtGnuplotSettings.ui" line="14"/> <source>Terminal configuration</source> <translation>Configuration du terminal</translation> </message> <message> <location filename="../QtGnuplotSettings.ui" line="28"/> <source>Select background color</source> <translation>Sélectrionner la couleur d'arrière plan</translation> </message> <message> <location filename="../QtGnuplotSettings.ui" line="48"/> <source>Sample</source> <translation>Échantillon</translation> </message> <message> <location filename="../QtGnuplotSettings.ui" line="57"/> <source>Antialias</source> <translation>Antialias</translation> </message> <message> <location filename="../QtGnuplotSettings.ui" line="64"/> <source>Replot on resize</source> <translation>Redessiner après changement de taille</translation> </message> </context> </TS> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/po/qtgnuplot_ja.ts�����������������������������������������������������0000644�0004711�0000144�00000012224�11233555355�016605� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="ja_JP"> <context> <name>QtGnuplotWidget</name> <message> <location filename="../QtGnuplotWidget.cpp" line="205"/> <source>Export to PDF</source> <translation>PDF形式でエクスポート</translation> </message> <message> <location filename="../QtGnuplotWidget.cpp" line="205"/> <source>PDF files (*.pdf)</source> <translation>PDF (*.pdf)</translation> </message> <message> <location filename="../QtGnuplotWidget.cpp" line="227"/> <source>Export to Image</source> <translation>画像としてエクスポート</translation> </message> <message> <location filename="../QtGnuplotWidget.cpp" line="228"/> <source>Image files (*.png *.bmp)</source> <translation>画像 (*.png *.bmp)</translation> </message> <message> <location filename="../QtGnuplotWidget.cpp" line="240"/> <source>Export to SVG</source> <translation>SVG形式でエクスポート</translation> </message> <message> <location filename="../QtGnuplotWidget.cpp" line="240"/> <source>SVG files (*.svg)</source> <translation>SVG (*.svg)</translation> </message> </context> <context> <name>QtGnuplotWindow</name> <message> <location filename="../QtGnuplotWindow.cpp" line="71"/> <source>Qt frontend for gnuplot</source> <translation>gnuplotのためのQtフロントエンド</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="74"/> <source>Copy to clipboard</source> <translation>クリップボードにコピー</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="75"/> <source>Print</source> <translation>印刷</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="76"/> <source>Export</source> <translation>エクスポート</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="77"/> <source>Export to PDF</source> <translation>PDF形式でエクスポート</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="78"/> <source>Export to EPS</source> <translation>EPS形式でエクスポート</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="79"/> <source>Export to SVG</source> <translation>SVG形式でエクスポート</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="80"/> <source>Export to image</source> <translation>画像としてエクスポート</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="81"/> <source>Settings</source> <translation>設定</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="98"/> <source>Replot</source> <translation>再描画</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="99"/> <source>Show grid</source> <translation>グリッド線を表示</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="100"/> <source>Previous zoom</source> <translation>前のズーム設定</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="101"/> <source>Next zoom</source> <translation>次のズーム設定</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="102"/> <source>Autoscale</source> <translation>自動でスケーリング</translation> </message> <message> <location filename="../QtGnuplotWindow.cpp" line="132"/> <source>Gnuplot window </source> <translation type="unfinished">Gnuplotウィンドウ </translation> </message> </context> <context> <name>settingsDialog</name> <message> <location filename="../QtGnuplotSettings.ui" line="14"/> <source>Terminal configuration</source> <translation>ターミナルの設定</translation> </message> <message> <location filename="../QtGnuplotSettings.ui" line="28"/> <source>Select background color</source> <translation>背景色を選択</translation> </message> <message> <location filename="../QtGnuplotSettings.ui" line="48"/> <source>Sample</source> <translation>サンプル</translation> </message> <message> <location filename="../QtGnuplotSettings.ui" line="57"/> <source>Antialias</source> <translation>アンチエイリアス</translation> </message> <message> <location filename="../QtGnuplotSettings.ui" line="64"/> <source>Replot on resize</source> <translation>リサイズ時に再描画する</translation> </message> </context> </TS> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/qt_term_mac.m����������������������������������������������������������0000644�0004711�0000144�00000000706�12022547343�015556� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <Cocoa/Cocoa.h> void removeDockIcon() { #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 // Don't display this application in the MAC OS X dock // kProcessTransformToBackgroundApplication only works on Mac OS X 10.7 and later ProcessSerialNumber psn; if (GetCurrentProcess(&psn) == noErr) TransformProcessType(&psn, kProcessTransformToBackgroundApplication); #endif #endif } ����������������������������������������������������������gnuplot-4.6.4/src/qtterminal/README.Qt��������������������������������������������������������������0000644�0004711�0000144�00000002635�11700652272�014353� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������The Gnuplot Qt terminal comprises the following components: - QtGnuplotApplication : a QApplication that manages Gnuplot windows - QtGnuplotWindow : a QMainWindow that embeds a tool bar, a status bar and a Gnuplot widget - QtGnuplotWidget : a QWidget comprising a QGraphicsView that displays a plot rendered by a QGraphicsScene - QtGnuplotScene : a QGraphicsScene that does the actual rendering - QtGnupotItem : most of the plot is rendered using standard items, except for points and enhanced text which have their custom items qt_term.cpp defines the interface between Gnuplot and the GUI. It starts the QApplication in a separate process and communicates with it through a QLocalSocket Translation howto ================= 1/ Edit QtGnuplot.pro and add a TRANSLATION entry corresponding to your language 2/ run 'lupdate QtGnuplot.pro'. This will generate a .ts file in the po directory 3/ run linguist to edit the .ts file 4/ add an entry for a qm file in src/Makefile.am, section TRANSLATIONS Known issues ============ - export to EPS - image clipping not implemented - mouse coordinate readout is not handling UTF-8 correctly - no support for toggling graphs on/off - "opengl" not accepted as a rendering mode (at least under linux) - wxt/Qt terminals must not be active within the same gnuplot session ���������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotWidget.h������������������������������������������������������0000644�0004711�0000144�00000007073�12023736552�016366� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotWidget.h */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #ifndef QTGNUPLOTWIDGET_H #define QTGNUPLOTWIDGET_H #include "QtGnuplotEvent.h" #include <QWidget> #include <QPainter> class QtGnuplotScene; class QGraphicsView; class Ui_settingsDialog; class QtGnuplotWidget : public QWidget, public QtGnuplotEventReceiver { Q_OBJECT public: QtGnuplotWidget(int id = 0, QtGnuplotEventHandler* eventHandler = 0, QWidget* parent = 0); public: bool isActive() const; void setStatusText(const QString& status); QSize plotAreaSize() const; // these can be set from the tool widget or from the command line bool m_rounded; QColor m_backgroundColor; signals: void statusTextChanged(const QString& status); public: void processEvent(QtGnuplotEventType type, QDataStream& in); public slots: void copyToClipboard(); void print(); void exportToPdf(); void exportToEps(); void exportToImage(); void exportToSvg(); void showSettingsDialog(); void settingsSelectBackgroundColor(); // Qt functions protected: virtual void resizeEvent(QResizeEvent* event); private: void setViewMatrix(); QPixmap createPixmap(); void loadSettings(); void applySettings(); void saveSettings(); QPainter::RenderHints renderHints() const; private: int m_id; bool m_active; QtGnuplotScene* m_scene; QGraphicsView* m_view; QSize m_lastSizeRequest; static int m_widgetUid; // Settings Ui_settingsDialog* m_ui; QColor m_chosenBackgroundColor; bool m_antialias; bool m_replotOnResize; }; #endif // QTGNUPLOTWIDGET_H ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/embed_example.cpp������������������������������������������������������0000644�0004711�0000144�00000010303�11236062134�016366� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - embed_example.h */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #include "embed_example.h" #include "QtGnuplotWidget.h" QMainWindow* mainWindow; GnuplotWidget::GnuplotWidget() : QWidget() { QGridLayout* gridLayout = new QGridLayout(); for (int i = 0; i < 4; i++) { widgets[i] = new QtGnuplotWidget(); connect(widgets[i], SIGNAL(statusTextChanged(const QString&)), this, SLOT(statusText(const QString&))); widgets[i]->setFixedSize(400,250); gridLayout->addWidget(widgets[i], i/2, i%2); } QVBoxLayout* layout = new QVBoxLayout(this); layout->addLayout(gridLayout); outputFrame = new QPlainTextEdit(this); outputFrame->setReadOnly(true); /* QFont font = outputFrame->document().defaultFont(); font.setFamiliy("Mono"); outputFrame->document().setDefaultFont(font);*/ layout->addWidget(outputFrame); setLayout(layout); connect(&gp, SIGNAL(gnuplotOutput(const QString&)), this, SLOT(gnuplotOutput(const QString&))); } void GnuplotWidget::plot() { gp.setWidget(widgets[0]); gp << "plot x w l lt 3\n"; gp << "print pi\n"; gp.setWidget(widgets[1]); gp << "set grid; plot x**2 w l lt 2 lw 4\n"; gp.setWidget(widgets[2]); QVector<QPointF> points; srand(time(NULL)); for (int i = 0; i < 100; i++) points << QPointF(double(rand())/double(RAND_MAX), double(rand())/double(RAND_MAX)); gp << "plot '-'\n"; gp << points; gp.setWidget(widgets[3]); gp << "unset grid\n"; phi = 0.; connect(&timer, SIGNAL(timeout()), this, SLOT(tick())); timer.start(1000); } void GnuplotWidget::tick() { gp << "plot sin(x + " + QString::number(phi) + ")\n"; gp << "print pi, " + QString::number(phi) + "\n"; phi += 0.3; } void GnuplotWidget::statusText(const QString& status) { mainWindow->statusBar()->showMessage(status); } void GnuplotWidget::gnuplotOutput(const QString& output) { outputFrame->appendPlainText(output); } int main(int argc, char* argv[]) { QApplication app(argc, argv); mainWindow = new QMainWindow; GnuplotWidget* widget = new GnuplotWidget(); mainWindow->setCentralWidget(widget); mainWindow->statusBar()->showMessage("Qt Gnuplot widgets embedding example"); mainWindow->show(); widget->plot(); app.exec(); return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotWindow.cpp����������������������������������������������������0000644�0004711�0000144�00000014501�11235013661�016730� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotWindow.cpp */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #include "QtGnuplotWindow.h" #include "QtGnuplotWidget.h" #include "QtGnuplotEvent.h" #include <QtGui> QtGnuplotWindow::QtGnuplotWindow(int id, QtGnuplotEventHandler* eventHandler, QWidget* parent) : QMainWindow(parent) { m_ctrl = false; m_eventHandler = eventHandler; m_id = id; setAttribute(Qt::WA_DeleteOnClose); setWindowIcon(QIcon(":/images/gnuplot")); // Register as the main event receiver if not already created if (m_eventHandler == 0) m_eventHandler = new QtGnuplotEventHandler(this, "qtgnuplot" + QString::number(QCoreApplication::applicationPid())); // Central widget m_widget = new QtGnuplotWidget(m_id, m_eventHandler, this); connect(m_widget, SIGNAL(statusTextChanged(const QString&)), this, SLOT(on_setStatusText(const QString&))); setCentralWidget(m_widget); // Bars m_toolBar = new QToolBar(this); addToolBar(m_toolBar); statusBar()->showMessage(tr("Qt frontend for gnuplot")); // Actions QAction* copyToClipboardAction = new QAction(QIcon(":/images/clipboard" ), tr("Copy to clipboard"), this); QAction* printAction = new QAction(QIcon(":/images/print" ), tr("Print" ), this); QAction* exportAction = new QAction(QIcon(":/images/export" ), tr("Export" ), this); QAction* exportPdfAction = new QAction(QIcon(":/images/exportPDF" ), tr("Export to PDF" ), this); QAction* exportEpsAction = new QAction(QIcon(":/images/exportVector"), tr("Export to EPS" ), this); QAction* exportSvgAction = new QAction(QIcon(":/images/exportVector"), tr("Export to SVG" ), this); QAction* exportPngAction = new QAction(QIcon(":/images/exportRaster"), tr("Export to image" ), this); QAction* settingsAction = new QAction(QIcon(":/images/settings" ), tr("Settings" ), this); connect(copyToClipboardAction, SIGNAL(triggered()), m_widget, SLOT(copyToClipboard())); connect(printAction, SIGNAL(triggered()), m_widget, SLOT(print())); connect(exportPdfAction, SIGNAL(triggered()), m_widget, SLOT(exportToPdf())); connect(exportEpsAction, SIGNAL(triggered()), m_widget, SLOT(exportToEps())); connect(exportSvgAction, SIGNAL(triggered()), m_widget, SLOT(exportToSvg())); connect(exportPngAction, SIGNAL(triggered()), m_widget, SLOT(exportToImage())); connect(settingsAction, SIGNAL(triggered()), m_widget, SLOT(showSettingsDialog())); QMenu* exportMenu = new QMenu(this); exportMenu->addAction(copyToClipboardAction); exportMenu->addAction(printAction); exportMenu->addAction(exportPdfAction); // exportMenu->addAction(exportEpsAction); exportMenu->addAction(exportSvgAction); exportMenu->addAction(exportPngAction); exportAction->setMenu(exportMenu); m_toolBar->addAction(exportAction); createAction(tr("Replot") , 'e', ":/images/replot"); createAction(tr("Show grid") , 'g', ":/images/grid"); createAction(tr("Previous zoom"), 'p', ":/images/zoomPrevious"); createAction(tr("Next zoom") , 'n', ":/images/zoomNext"); createAction(tr("Autoscale") , 'a', ":/images/autoscale"); m_toolBar->addAction(settingsAction); } void QtGnuplotWindow::createAction(const QString& name, int key, const QString& icon) { QAction* action = new QAction(QIcon(icon), name, this); connect(action, SIGNAL(triggered()), this, SLOT(on_keyAction())); action->setData(key); m_toolBar->addAction(action); } void QtGnuplotWindow::on_setStatusText(const QString& status) { statusBar()->showMessage(status); } void QtGnuplotWindow::on_keyAction() { QAction* action = qobject_cast<QAction *>(sender()); m_eventHandler->postTermEvent(GE_keypress, 0, 0, action->data().toInt(), 0, m_id); } void QtGnuplotWindow::processEvent(QtGnuplotEventType type, QDataStream& in) { if (type == GETitle) { QString title; in >> title; if (title.isEmpty()) title = tr("Gnuplot window ") + QString::number(m_id); setWindowTitle(title); } else if (type == GERaise) raise(); else if (type == GESetCtrl) in >> m_ctrl; else m_widget->processEvent(type, in); } void QtGnuplotWindow::keyPressEvent(QKeyEvent* event) { if ((event->key() == 'Q') && ( !m_ctrl || (QApplication::keyboardModifiers() & Qt::ControlModifier) )) close(); QMainWindow::keyPressEvent(event); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotApplication.cpp�����������������������������������������������0000644�0004711�0000144�00000010700�12023736552�017730� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotApplication.cpp */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #include "QtGnuplotApplication.h" #include "QtGnuplotWindow.h" #include "QtGnuplotEvent.h" #include <QDebug> QtGnuplotApplication::QtGnuplotApplication(int& argc, char** argv) : QApplication(argc, argv) { setQuitOnLastWindowClosed(false); setWindowIcon(QIcon(":/images/gnuplot")); m_currentWindow = NULL; m_lastId = 0; m_eventHandler = new QtGnuplotEventHandler(this, "qtgnuplot" + QString::number(applicationPid())); connect(m_eventHandler, SIGNAL(connected()), this, SLOT(exitPersistMode())); connect(m_eventHandler, SIGNAL(disconnected()), this, SLOT(enterPersistMode())); } QtGnuplotApplication::~QtGnuplotApplication() { } void QtGnuplotApplication::windowDestroyed(QObject* object) { // A window has been closed. Unregister it. int id = m_windows.key((QtGnuplotWindow*)(object)); if (m_windows.take(id) == m_currentWindow) m_currentWindow = 0; } void QtGnuplotApplication::enterPersistMode() { setQuitOnLastWindowClosed(true); // But if the plot window was already closed, this is our last chance to exit if (m_windows.isEmpty()) quit(); // Some programs executing gnuplot -persist may be waiting for all default // handles to be closed before they consider the sub-process finished. // Using freopen() ensures that debug fprintf()s won't crash. freopen("/dev/null","w",stdout); freopen("/dev/null","w",stderr); } void QtGnuplotApplication::exitPersistMode() { setQuitOnLastWindowClosed(false); } void QtGnuplotApplication::processEvent(QtGnuplotEventType type, QDataStream& in) { if (type == GESetCurrentWindow) // Select window { in >> m_lastId; m_currentWindow = m_windows[m_lastId]; } else if ((type == GEInitWindow) && (!m_currentWindow)) // Create the window if necessary { m_currentWindow = new QtGnuplotWindow(m_lastId, m_eventHandler); connect(m_currentWindow, SIGNAL(destroyed(QObject*)), this, SLOT(windowDestroyed(QObject*))); m_windows.insert(m_lastId, m_currentWindow); m_currentWindow->show(); } else if (type == GECloseWindow) { int id; in >> id; QtGnuplotWindow* closeWindow = m_windows.take(id); if (closeWindow) closeWindow->close(); } else if (type == GEExit) quit(); else if (type == GEPersist) enterPersistMode(); else if (m_currentWindow) // Dispatch gnuplot events to widgets m_currentWindow->processEvent(type, in); else swallowEvent(type, in); } ����������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/qt_conversion.cpp������������������������������������������������������0000644�0004711�0000144�00000036577�11232414140�016507� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - qt_conversion.cpp */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ static QColor qt_colorList[12] = { Qt::white, Qt::black, Qt::gray, Qt::red, Qt::green, Qt::blue, Qt::magenta, Qt::cyan, Qt::yellow, Qt::black, QColor(255, 76, 0), // Orange Qt::gray }; QTextCodec* qt_encodingToCodec(set_encoding_id encoding) { switch (encoding) { case S_ENC_DEFAULT : return QTextCodec::codecForLocale(); case S_ENC_ISO8859_1 : return QTextCodec::codecForMib( 4); case S_ENC_ISO8859_2 : return QTextCodec::codecForMib( 5); case S_ENC_ISO8859_9 : return QTextCodec::codecForMib( 12); case S_ENC_ISO8859_15 : return QTextCodec::codecForMib( 111); case S_ENC_CP437 : return QTextCodec::codecForMib(2011); case S_ENC_CP850 : return QTextCodec::codecForMib(2009); case S_ENC_CP852 : return QTextCodec::codecForMib(2010); case S_ENC_CP1250 : return QTextCodec::codecForMib(2250); case S_ENC_CP1254 : return QTextCodec::codecForMib(2254); case S_ENC_KOI8_R : return QTextCodec::codecForMib(2084); case S_ENC_KOI8_U : return QTextCodec::codecForMib(2088); case S_ENC_UTF8 : return QTextCodec::codecForMib( 106); default : return QTextCodec::codecForLocale(); } } QImage qt_imageToQImage(int M, int N, coordval* image, t_imagecolor color_mode) { QImage qimage(QSize(M, N), QImage::Format_ARGB32_Premultiplied); rgb_color rgb1; rgb255_color rgb255; // TrueColor 24-bit color mode if (color_mode == IC_RGB) for (int n = 0; n < N; n++) { QRgb* line = (QRgb*)(qimage.scanLine(n)); for (int m = 0; m < M; m++) { rgb1.r = *image++; rgb1.g = *image++; rgb1.b = *image++; rgb255_from_rgb1(rgb1, &rgb255); *line++ = qRgb(rgb255.r, rgb255.g, rgb255.b); } } else if (color_mode == IC_RGBA) for (int n = 0; n < N; n++) { QRgb* line = (QRgb*)(qimage.scanLine(n)); for (int m = 0; m < M; m++) { unsigned char alpha255 = *(image + 3); float alpha1 = float(alpha255 / 255.); rgb1.r = alpha1 * (*image++); rgb1.g = alpha1 * (*image++); rgb1.b = alpha1 * (*image++); image++; rgb255_from_rgb1(rgb1, &rgb255); *line++ = qRgba(rgb255.r, rgb255.g, rgb255.b, alpha255); } } // Palette color lookup from gray value else for (int n = 0; n < N; n++) { QRgb* line = (QRgb*)(qimage.scanLine(n)); for (int m = 0; m < M; m++) { if (isnan(*image)) { image++; *line++ = 0x00000000; } else { rgb255maxcolors_from_gray(*image++, &rgb255); *line++ = qRgb(rgb255.r, rgb255.g, rgb255.b); } } } return qimage; } // Generated from http://unicode.org/Public/MAPPINGS/VENDORS/ADOBE/symbol.txt QChar qt_symbolToUnicode(int c) { switch (c) { case 0x22: return QChar(0x2200); // FOR ALL // universal case 0x24: return QChar(0x2203); // THERE EXISTS // existential case 0x27: return QChar(0x220B); // CONTAINS AS MEMBER // suchthat case 0x2A: return QChar(0x2217); // ASTERISK OPERATOR // asteriskmath case 0x2D: return QChar(0x2212); // MINUS SIGN // minus case 0x40: return QChar(0x2245); // APPROXIMATELY EQUAL TO // congruent case 0x41: return QChar(0x0391); // GREEK CAPITAL LETTER ALPHA // Alpha case 0x42: return QChar(0x0392); // GREEK CAPITAL LETTER BETA // Beta case 0x43: return QChar(0x03A7); // GREEK CAPITAL LETTER CHI // Chi case 0x44: return QChar(0x0394); // GREEK CAPITAL LETTER DELTA // Delta case 0x45: return QChar(0x0395); // GREEK CAPITAL LETTER EPSILON // Epsilon case 0x46: return QChar(0x03A6); // GREEK CAPITAL LETTER PHI // Phi case 0x47: return QChar(0x0393); // GREEK CAPITAL LETTER GAMMA // Gamma case 0x48: return QChar(0x0397); // GREEK CAPITAL LETTER ETA // Eta case 0x49: return QChar(0x0399); // GREEK CAPITAL LETTER IOTA // Iota case 0x4A: return QChar(0x03D1); // GREEK THETA SYMBOL // theta1 case 0x4B: return QChar(0x039A); // GREEK CAPITAL LETTER KAPPA // Kappa case 0x4C: return QChar(0x039B); // GREEK CAPITAL LETTER LAMDA // Lambda case 0x4D: return QChar(0x039C); // GREEK CAPITAL LETTER MU // Mu case 0x4E: return QChar(0x039D); // GREEK CAPITAL LETTER NU // Nu case 0x4F: return QChar(0x039F); // GREEK CAPITAL LETTER OMICRON // Omicron case 0x50: return QChar(0x03A0); // GREEK CAPITAL LETTER PI // Pi case 0x51: return QChar(0x0398); // GREEK CAPITAL LETTER THETA // Theta case 0x52: return QChar(0x03A1); // GREEK CAPITAL LETTER RHO // Rho case 0x53: return QChar(0x03A3); // GREEK CAPITAL LETTER SIGMA // Sigma case 0x54: return QChar(0x03A4); // GREEK CAPITAL LETTER TAU // Tau case 0x55: return QChar(0x03A5); // GREEK CAPITAL LETTER UPSILON // Upsilon case 0x56: return QChar(0x03C2); // GREEK SMALL LETTER FINAL SIGMA // sigma1 case 0x57: return QChar(0x03A9); // GREEK CAPITAL LETTER OMEGA // Omega case 0x58: return QChar(0x039E); // GREEK CAPITAL LETTER XI // Xi case 0x59: return QChar(0x03A8); // GREEK CAPITAL LETTER PSI // Psi case 0x5A: return QChar(0x0396); // GREEK CAPITAL LETTER ZETA // Zeta case 0x5C: return QChar(0x2234); // THEREFORE // therefore case 0x5E: return QChar(0x22A5); // UP TACK // perpendicular case 0x60: return QChar(0xF8E5); // RADICAL EXTENDER // radicalex (CUS) case 0x61: return QChar(0x03B1); // GREEK SMALL LETTER ALPHA // alpha case 0x62: return QChar(0x03B2); // GREEK SMALL LETTER BETA // beta case 0x63: return QChar(0x03C7); // GREEK SMALL LETTER CHI // chi case 0x64: return QChar(0x03B4); // GREEK SMALL LETTER DELTA // delta case 0x65: return QChar(0x03B5); // GREEK SMALL LETTER EPSILON // epsilon case 0x66: return QChar(0x03C6); // GREEK SMALL LETTER PHI // phi case 0x67: return QChar(0x03B3); // GREEK SMALL LETTER GAMMA // gamma case 0x68: return QChar(0x03B7); // GREEK SMALL LETTER ETA // eta case 0x69: return QChar(0x03B9); // GREEK SMALL LETTER IOTA // iota case 0x6A: return QChar(0x03D5); // GREEK PHI SYMBOL // phi1 case 0x6B: return QChar(0x03BA); // GREEK SMALL LETTER KAPPA // kappa case 0x6C: return QChar(0x03BB); // GREEK SMALL LETTER LAMDA // lambda case 0x6D: return QChar(0x03BC); // GREEK SMALL LETTER MU // mu case 0x6E: return QChar(0x03BD); // GREEK SMALL LETTER NU // nu case 0x6F: return QChar(0x03BF); // GREEK SMALL LETTER OMICRON // omicron case 0x70: return QChar(0x03C0); // GREEK SMALL LETTER PI // pi case 0x71: return QChar(0x03B8); // GREEK SMALL LETTER THETA // theta case 0x72: return QChar(0x03C1); // GREEK SMALL LETTER RHO // rho case 0x73: return QChar(0x03C3); // GREEK SMALL LETTER SIGMA // sigma case 0x74: return QChar(0x03C4); // GREEK SMALL LETTER TAU // tau case 0x75: return QChar(0x03C5); // GREEK SMALL LETTER UPSILON // upsilon case 0x76: return QChar(0x03D6); // GREEK PI SYMBOL // omega1 case 0x77: return QChar(0x03C9); // GREEK SMALL LETTER OMEGA // omega case 0x78: return QChar(0x03BE); // GREEK SMALL LETTER XI // xi case 0x79: return QChar(0x03C8); // GREEK SMALL LETTER PSI // psi case 0x7A: return QChar(0x03B6); // GREEK SMALL LETTER ZETA // zeta case 0x7E: return QChar(0x223C); // TILDE OPERATOR // similar case 0xA0: return QChar(0x20AC); // EURO SIGN // Euro case 0xA1: return QChar(0x03D2); // GREEK UPSILON WITH HOOK SYMBOL // Upsilon1 case 0xA2: return QChar(0x2032); // PRIME // minute case 0xA3: return QChar(0x2264); // LESS-THAN OR EQUAL TO // lessequal case 0xA4: return QChar(0x2044); // FRACTION SLASH // fraction case 0xA5: return QChar(0x221E); // INFINITY // infinity case 0xA6: return QChar(0x0192); // LATIN SMALL LETTER F WITH HOOK // florin case 0xA7: return QChar(0x2663); // BLACK CLUB SUIT // club case 0xA8: return QChar(0x2666); // BLACK DIAMOND SUIT // diamond case 0xA9: return QChar(0x2665); // BLACK HEART SUIT // heart case 0xAA: return QChar(0x2660); // BLACK SPADE SUIT // spade case 0xAB: return QChar(0x2194); // LEFT RIGHT ARROW // arrowboth case 0xAC: return QChar(0x2190); // LEFTWARDS ARROW // arrowleft case 0xAD: return QChar(0x2191); // UPWARDS ARROW // arrowup case 0xAE: return QChar(0x2192); // RIGHTWARDS ARROW // arrowright case 0xAF: return QChar(0x2193); // DOWNWARDS ARROW // arrowdown case 0xB2: return QChar(0x2033); // DOUBLE PRIME // second case 0xB3: return QChar(0x2265); // GREATER-THAN OR EQUAL TO // greaterequal case 0xB4: return QChar(0x00D7); // MULTIPLICATION SIGN // multiply case 0xB5: return QChar(0x221D); // PROPORTIONAL TO // proportional case 0xB6: return QChar(0x2202); // PARTIAL DIFFERENTIAL // partialdiff case 0xB7: return QChar(0x2022); // BULLET // bullet case 0xB8: return QChar(0x00F7); // DIVISION SIGN // divide case 0xB9: return QChar(0x2260); // NOT EQUAL TO // notequal case 0xBA: return QChar(0x2261); // IDENTICAL TO // equivalence case 0xBB: return QChar(0x2248); // ALMOST EQUAL TO // approxequal case 0xBC: return QChar(0x2026); // HORIZONTAL ELLIPSIS // ellipsis case 0xBD: return QChar(0xF8E6); // VERTICAL ARROW EXTENDER // arrowvertex (CUS) case 0xBE: return QChar(0xF8E7); // HORIZONTAL ARROW EXTENDER // arrowhorizex (CUS) case 0xBF: return QChar(0x21B5); // DOWNWARDS ARROW WITH CORNER LEFTWARDS // carriagereturn case 0xC0: return QChar(0x2135); // ALEF SYMBOL // aleph case 0xC1: return QChar(0x2111); // BLACK-LETTER CAPITAL I // Ifraktur case 0xC2: return QChar(0x211C); // BLACK-LETTER CAPITAL R // Rfraktur case 0xC3: return QChar(0x2118); // SCRIPT CAPITAL P // weierstrass case 0xC4: return QChar(0x2297); // CIRCLED TIMES // circlemultiply case 0xC5: return QChar(0x2295); // CIRCLED PLUS // circleplus case 0xC6: return QChar(0x2205); // EMPTY SET // emptyset case 0xC7: return QChar(0x2229); // INTERSECTION // intersection case 0xC8: return QChar(0x222A); // UNION // union case 0xC9: return QChar(0x2283); // SUPERSET OF // propersuperset case 0xCA: return QChar(0x2287); // SUPERSET OF OR EQUAL TO // reflexsuperset case 0xCB: return QChar(0x2284); // NOT A SUBSET OF // notsubset case 0xCC: return QChar(0x2282); // SUBSET OF // propersubset case 0xCD: return QChar(0x2286); // SUBSET OF OR EQUAL TO // reflexsubset case 0xCE: return QChar(0x2208); // ELEMENT OF // element case 0xCF: return QChar(0x2209); // NOT AN ELEMENT OF // notelement case 0xD0: return QChar(0x2220); // ANGLE // angle case 0xD1: return QChar(0x2207); // NABLA // gradient case 0xD2: return QChar(0xF6DA); // REGISTERED SIGN SERIF // registerserif (CUS) case 0xD3: return QChar(0xF6D9); // COPYRIGHT SIGN SERIF // copyrightserif (CUS) case 0xD4: return QChar(0xF6DB); // TRADE MARK SIGN SERIF // trademarkserif (CUS) case 0xD5: return QChar(0x220F); // N-ARY PRODUCT // product case 0xD6: return QChar(0x221A); // SQUARE ROOT // radical case 0xD7: return QChar(0x22C5); // DOT OPERATOR // dotmath case 0xD8: return QChar(0x00AC); // NOT SIGN // logicalnot case 0xD9: return QChar(0x2227); // LOGICAL AND // logicaland case 0xDA: return QChar(0x2228); // LOGICAL OR // logicalor case 0xDB: return QChar(0x21D4); // LEFT RIGHT DOUBLE ARROW // arrowdblboth case 0xDC: return QChar(0x21D0); // LEFTWARDS DOUBLE ARROW // arrowdblleft case 0xDD: return QChar(0x21D1); // UPWARDS DOUBLE ARROW // arrowdblup case 0xDE: return QChar(0x21D2); // RIGHTWARDS DOUBLE ARROW // arrowdblright case 0xDF: return QChar(0x21D3); // DOWNWARDS DOUBLE ARROW // arrowdbldown case 0xE0: return QChar(0x25CA); // LOZENGE // lozenge case 0xE1: return QChar(0x2329); // LEFT-POINTING ANGLE BRACKET // angleleft case 0xE2: return QChar(0xF8E8); // REGISTERED SIGN SANS SERIF // registersans (CUS) case 0xE3: return QChar(0xF8E9); // COPYRIGHT SIGN SANS SERIF // copyrightsans (CUS) case 0xE4: return QChar(0xF8EA); // TRADE MARK SIGN SANS SERIF // trademarksans (CUS) case 0xE5: return QChar(0x2211); // N-ARY SUMMATION // summation case 0xE6: return QChar(0xF8EB); // LEFT PAREN TOP // parenlefttp (CUS) case 0xE7: return QChar(0xF8EC); // LEFT PAREN EXTENDER // parenleftex (CUS) case 0xE8: return QChar(0xF8ED); // LEFT PAREN BOTTOM // parenleftbt (CUS) case 0xE9: return QChar(0xF8EE); // LEFT SQUARE BRACKET TOP // bracketlefttp (CUS) case 0xEA: return QChar(0xF8EF); // LEFT SQUARE BRACKET EXTENDER // bracketleftex (CUS) case 0xEB: return QChar(0xF8F0); // LEFT SQUARE BRACKET BOTTOM // bracketleftbt (CUS) case 0xEC: return QChar(0xF8F1); // LEFT CURLY BRACKET TOP // bracelefttp (CUS) case 0xED: return QChar(0xF8F2); // LEFT CURLY BRACKET MID // braceleftmid (CUS) case 0xEE: return QChar(0xF8F3); // LEFT CURLY BRACKET BOTTOM // braceleftbt (CUS) case 0xEF: return QChar(0xF8F4); // CURLY BRACKET EXTENDER // braceex (CUS) case 0xF1: return QChar(0x232A); // RIGHT-POINTING ANGLE BRACKET // angleright case 0xF2: return QChar(0x222B); // INTEGRAL // integral case 0xF3: return QChar(0x2320); // TOP HALF INTEGRAL // integraltp case 0xF4: return QChar(0xF8F5); // INTEGRAL EXTENDER // integralex (CUS) case 0xF5: return QChar(0x2321); // BOTTOM HALF INTEGRAL // integralbt case 0xF6: return QChar(0xF8F6); // RIGHT PAREN TOP // parenrighttp (CUS) case 0xF7: return QChar(0xF8F7); // RIGHT PAREN EXTENDER // parenrightex (CUS) case 0xF8: return QChar(0xF8F8); // RIGHT PAREN BOTTOM // parenrightbt (CUS) case 0xF9: return QChar(0xF8F9); // RIGHT SQUARE BRACKET TOP // bracketrighttp (CUS) case 0xFA: return QChar(0xF8FA); // RIGHT SQUARE BRACKET EXTENDER // bracketrightex (CUS) case 0xFB: return QChar(0xF8FB); // RIGHT SQUARE BRACKET BOTTOM // bracketrightbt (CUS) case 0xFC: return QChar(0xF8FC); // RIGHT CURLY BRACKET TOP // bracerighttp (CUS) case 0xFD: return QChar(0xF8FD); // RIGHT CURLY BRACKET MID // bracerightmid (CUS) case 0xFE: return QChar(0xF8FE); // RIGHT CURLY BRACKET BOTTOM // bracerightbt (CUS) default : return QChar(c); } } ���������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotInstance.cpp��������������������������������������������������0000644�0004711�0000144�00000007650�11236062134�017234� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotInstance.h */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #include "QtGnuplotInstance.h" #include "QtGnuplotWidget.h" #include <QtCore> #include <iostream> QtGnuplotInstance::QtGnuplotInstance(QtGnuplotWidget* widget, QString gnuplotPath) { m_gnuplot.setProcessChannelMode(QProcess::MergedChannels); m_gnuplot.start(gnuplotPath); m_gnuplot.waitForStarted(); connect(&m_gnuplot, SIGNAL(readyReadStandardOutput()), this, SLOT(gnuplotDataReady())); if (m_gnuplot.state() == QProcess::NotRunning) qDebug() << "Error starting gnuplot" << m_gnuplot.error(); setWidget(widget); } QtGnuplotInstance::~QtGnuplotInstance() { m_gnuplot.close(); } void QtGnuplotInstance::setWidget(QtGnuplotWidget* widget) { m_widget = widget; if (m_widget) { QByteArray command; command.append("set term qt widget \"" + m_widget->serverName() + "\" size " + QString::number(m_widget->plotAreaSize().width()) + "," + QString::number(m_widget->plotAreaSize().height()) + "\n"); exec(command); } } QtGnuplotWidget* QtGnuplotInstance::widget() { return m_widget; } void QtGnuplotInstance::gnuplotDataReady() { QByteArray result = m_gnuplot.readAllStandardOutput(); emit(gnuplotOutput(result.constData())); } void QtGnuplotInstance::exec(const QByteArray& command) { if (m_gnuplot.state() == QProcess::Running) m_gnuplot.write(command); else qDebug() << "Not running"; } QtGnuplotInstance& operator<<(QtGnuplotInstance& instance, const QString& command) { QByteArray array; array.append(command); instance.exec(array); return instance; } QtGnuplotInstance& operator<<(QtGnuplotInstance& instance, const QVector<QPointF>& points) { QByteArray array; foreach (QPointF point, points) array += QByteArray::number(point.x()) + " " + QByteArray::number(point.y()) + "\n"; array += "e\n"; instance.exec(array); return instance; } ����������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/Makefile.in������������������������������������������������������������0000644�0004711�0000144�00000027432�12223337636�015164� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/qtterminal DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alpha.m4 \ $(top_srcdir)/m4/apple.m4 $(top_srcdir)/m4/beos.m4 \ $(top_srcdir)/m4/msdos.m4 $(top_srcdir)/m4/next.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROEPS_CFLAGS = @CAIROEPS_CFLAGS@ CAIROEPS_LIBS = @CAIROEPS_LIBS@ CAIROPANGO_CFLAGS = @CAIROPANGO_CFLAGS@ CAIROPANGO_LIBS = @CAIROPANGO_LIBS@ CAIROPDF_CFLAGS = @CAIROPDF_CFLAGS@ CAIROPDF_LIBS = @CAIROPDF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIST_CONTACT = @DIST_CONTACT@ DVIPS = @DVIPS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ GDLIB_CONFIG = @GDLIB_CONFIG@ GIHDIR = @GIHDIR@ GREP = @GREP@ GTK28_CFLAGS = @GTK28_CFLAGS@ GTK28_LIBS = @GTK28_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEXPAND = @KPSEXPAND@ LASERGNU = @LASERGNU@ LATEX = @LATEX@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARIES_FOR_X = @LIBRARIES_FOR_X@ LIBS = @LIBS@ LINUXSUID = @LINUXSUID@ LISPDIR = @LISPDIR@ LN_S = @LN_S@ LRELEASE = @LRELEASE@ LTLIBOBJS = @LTLIBOBJS@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGO_1_10_2_CFLAGS = @PANGO_1_10_2_CFLAGS@ PANGO_1_10_2_LIBS = @PANGO_1_10_2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PDFLIB_CONFIG = @PDFLIB_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ PLAINTEX = @PLAINTEX@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RCC = @RCC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMLIBS = @TERMLIBS@ TERMXLIBS = @TERMXLIBS@ TEXDIR = @TEXDIR@ TEXHASH = @TEXHASH@ TROFF = @TROFF@ TUTORIAL = @TUTORIAL@ UIC = @UIC@ VERSION = @VERSION@ VERSION_MAJOR = @VERSION_MAJOR@ WX_CONFIG = @WX_CONFIG@ WX_LIBS = @WX_LIBS@ X11_APPDEFAULTS_DIR = @X11_APPDEFAULTS_DIR@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_OBJC = @ac_ct_OBJC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign # here are listed all the qtterminal files that go to the distribution EXTRA_DIST = qt_term.h qt_conversion.cpp QtGnuplot.pro QtGnuplotWindow.h \ QtGnuplotApplication.h QtGnuplotWidget.h QtGnuplotScene.h QtGnuplotEvent.h \ QtGnuplotItems.h QtGnuplotSettings.ui QtGnuplotResource.qrc \ QtGnuplotInstance.cpp QtGnuplotInstance.h gnuplot_qt.cpp \ README.Qt embed_example.cpp embed_example.h \ images po all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/qtterminal/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/qtterminal/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/gnuplot_qt.cpp���������������������������������������������������������0000644�0004711�0000144�00000006356�11706053144�016013� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - gnuplot_qt.cpp */ /*[ * Copyright 2011 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #include "QtGnuplotApplication.h" #include <QtCore> #include <signal.h> int main(int argc, char* argv[]) { signal(SIGINT, SIG_IGN); // Do not listen to SIGINT signals anymore #if QT_VERSION < 0x040700 /* * FIXME: EAM Nov 2011 * It is better to use environmental variable * QT_GRAPHICSSYSTEM but this requires qt >= 4.7 * "raster" is ~5x faster than "native" (default). * Unfortunately "opengl" isn't recognized on my test systems :-( */ // This makes a huge difference to the speed of polygon rendering. // Alternatives are "native", "raster", "opengl" QApplication::setGraphicsSystem("raster"); #endif QtGnuplotApplication application(argc, argv); // Load translations for the qt library QTranslator qtTranslator; qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); application.installTranslator(&qtTranslator); // Load translations for the qt terminal QTranslator translator; translator.load("qtgnuplot_" + QLocale::system().name(), QTGNUPLOT_DATA_DIR); application.installTranslator(&translator); // Start application.exec(); return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/����������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�014331� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/zoom-in.png�����������������������������������������������������0000644�0004711�0000144�00000003517�11230721617�016451� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���szz��� pHYs����^���tIME �W���bKGD�����IDATxŖ{PSwݮ3δSG-:.S ȣ"H1 %@(OD<^! $@x(@"@bjxDPE� (慹wL;sfslǎ;w@P[-Gǯ,hN><ݐG6Ǐ{|'޾}tnD(<.B_~K0~I0K zDa>+bF;;ަCge-0H; uG2r>_C"!!d}=OXh<ⓧO㊥+4jNj; _/W=YDt jwOl*ݻ�~,6zfk%>P̑_XV,g_)/r.5@X,a2@tttct<O=$POJFE]kFY?h|q+gbbbLͿ-%%EYng}Q]J~uuZ3qZ|#J ViH\o.Vڕ5~}a cjZZe 222YCߗ?+c]}k-4o0֬UW*L;<WT"-#^�| ድ1g%.-+[.0G�30g'_ \7Ao݅p7UujSռ<2 Dp4_%w6y59Ձ"Q38QEd|\lsǓ-r<qƖP(e go^ I;&)bsMuԇ/0fJ:\Ĕ.ڸ Ul'UN&W/S�>.侳 W|eoH]yCkr#AR6*Cb 0x`~zid) @̌>8K.IBD!r'G6\G 2EVVV8WZݶuLfd)NEVڸ9 t==89 WW3=S$_] !R#qZgoc_>EsĿ57@͇3 ΋.e 2=rwy-MGSKIu됮TTVY  ??7^^^CSmYTncZ*c>TVQ{{D5pkkrqn^ZZZ]f ,m< !B|)4vvu 5 򬳳_hZRR D([&eǟp>}#b $''w^Ԗť8$$�|�̩`||| P^[ܿ A4.̼RR`0ǎ3rKWWtx񠴴<� CV߶{챀!n޼7"h@>2 <k0?G {K$ANNP[[r}׬, {D@V#m*pl9Į]P8EPTt:'/ ^)@*cccmQBp(**p8D"F099 B�Cĉ6\=ኀ JE>>cR8 wa3ԇ3gΜI׿K8 qG����IENDB`���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/application-pdf.png���������������������������������������������0000644�0004711�0000144�00000003001�11230721617�020117� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���szz���sBIT|d��� pHYs��v��v}Ղ���tEXtSoftware�www.inkscape.org<��~IDATxڵ[hgUZToJ&A5A( EM| Dˣ- ^@7HLc`4udݝ^fw\vc=0L,H3;|4IӘfSI_!59jf&30!J!N# 34!V6m|^/D6G bGF f2C*`,X<x"DB0޺?1 ӄIbY+Crd $Jg pI˒^:+&q$N&x$%IT* f4@�7\Zt.X"ىի<[Gs @GQu y /Ҩי3REcc{.JK# ,DB!<jnF\BgBLx2KDff3<w.zF=ʕju崍SԊEfy >ݶS۷؈77·s't]s@N@%or}r7<ĝ$~_fFM3G.iRx XMN*J́mJ~& Ey}s`:ٽ?…Ȝ8\< õJ͛Q~M߽͛ ]g,>#m{^f:*u+41κrK"J+\먔JjBe^skh ^^ sP?|Hk@M pb<!qsׯGVK`"VB`jop_̱5۩PUFX% nzg6@IWT|<J^ƌBGyGmH\;d2{ h@z^{'mZ^6xCV$n%k{ވh[uW_g֬A7heѺwY*X#B2U}*cn؀,Yą 3Z#2 FZ &}6 N2\{B,&mѨH$JIS= T?n؁̛7<N7~twwo߾cxBy^AHK 75N$dy獨d :< _ "gvԵkH< w?t$_$P(Ǐӽ`I[bܲ�Wt3bS Z%ݷm@fq1(VAʻa GGGA24Ӏc6 OEƾ}(X��~ c y@+S#I-1lsԵ^[ZGiˀpL8~n|����IENDB`�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/zoom-out.png����������������������������������������������������0000644�0004711�0000144�00000003512�11230721617�016645� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���szz��� pHYs����^���tIME �+(���bKGD�����IDATx͗mh[ǟݖ%ےe[eKNl[MI7-l O[-lc_~ZXc&dM[ .fSd/u<ώ_//rӹs./X,Ƙ"uuNI zu.y�1vY6<y2*$I3p e}L,Uc9<~&T;]x^GSՎ�~[?>3b!waƌ(*\fJܕ|󍱓BP7nwt<>%ᾐV#!bzTk6"6VƱ̈́y ѣG�v{sktY rυJ] ,m+D!RՈ(Z?ZkIއtZ>Q]ڭug,6Y E2 voh*�Qe>;<eZ'p8O,hor,i "YaJƌ)H09Ҷ$ΗQ�NpJ- ;K8.T,jDX`HL7ĜŚ6ջTSKr@EWUs;eɧCCb"Z BFT B;]j&:)�Ϫ'ED H4 ¬4 TGM.!<!ح :&j!XV Fo՛56Q pNW!L f*T i?3BiB5q8|PX6x5!:eJ2$9$S81s2T)ˌC]G*e2j�([[[~0䊙T Vwcbn.9�ObTI*;zZ.?iحDbkܾBFL*e<W!$*JTTe{i5Ҁ}/UuED3Ɗ+g|?W 9f5Ť#3W2Q%[.)J+nrl?} CXQJd5Dը@6t6j{_F΂-J˗C/E"a`qqQ;.@Ud.Kvy^Bv}aa6buS|p8}MMmH_b?33S:?޽A E`JGP\̴2~wϿ{͟,..܅ zZr_jnmEgt47_}099K  XUbH( ښ 7^Ep7ڼ}KS0e_P俋A!!bxCeYVG`x//-aՊ:CP555󻻻`c�S �RI\XX aDc@?NS8R>'P]+++\EQ7=^q\zXi p\.G5M{Q |6FuzW\}ii88edЉIDOOe茸H Éϝ{f esssf<@|bXG&Ɍ{z{z۟ޟ.>' ,O~ ksv mnn*_� &D!<qGOAXl<1^^Pa,̣x<K&w�dw###_?_eexz%����IENDB`��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/zoom-original.png�����������������������������������������������0000644�0004711�0000144�00000003531�11230721617�017643� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���szz��� pHYs����^���tIME 9"q���bKGD�����IDATxŖ{PSWݮ3δS-2Z,XT^J+"ŀRZ�&$`y$ @4AI*F#呐@ٛ3Aoι~9~ g~SSSccc#begw˜_)w<zҾ-WYc>immcݻ׀c/E!1:K =텇4[ DLf\:-4o$އlР(u[!L&$U}3Imw%kmtd*T+t@p\eptG;0Sexf~^ .y@xvޙJd�*-(ov~ tKVGW1܁ќѥ%BUBԺ<oaX?:m?WobPnnCouA#oTȤ/vz\"U�\*wd;Ә\]HYbC &@{DbKlҽm3Է:še|L\K$ޢ &Tjt(+ʗ|9~Ԓu^�-11qzxGB'2FdS)'/\m)37?Xx4N;>xc_ $):/}�>MNNy*[LMSP7· UjPc̪pYrMvݿvǽ} w,Kմ4HQ* RTText,}_mD )C&aU ԓ)JhKOW%j;|ߕ7N^!\ 5&hB? 27 ,]Ş2lOi/ +ZR+:/}�>Jl[;2< 7$wa(;%`~;*~ZRݾܻխغ'-,ۥחfBnegX/]l QA\` ye�3zv-9Ù'яUjQG&&&A.`7l}U'pHҷv's֏,vIg'V:d Hu㫤j:jZd0iiFSf60odvqXB5VVVFֆ;Dn%OSح}p0]WdrGtb~5]/٬ohE%`jv KJJ>nϡBX`BBm涌U:EJNYG*N̂f??vagq?sך-ZAPr-ӽutt Dx#9 aaaa ?1vG?8{(22`陈beiii�~]<ܠ.=ȑ#&0ڠ PဉIdL&ԩSannn�wm4 a077+$.=q!#"2&&F D`0k\.t!,,, 6HIIρB8pC>|�>Kd2$%%SueڂB>u >qFfffLb4""> a( x`ddt!ޗz9py+6t:>eooI~~رc-[[ۃ...p5����IENDB`�����������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/image-bmp.png���������������������������������������������������0000644�0004711�0000144�00000003032�11230721617�016707� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���szz���sBIT|d��� pHYs��v��v}Ղ���tEXtSoftware�www.inkscape.org<��IDATx[lWg^]o:%qPG&*R! MSP} /P!T!x@B$xCp*M;έNv׻ޝ+R_6ЗFjf~wΜq�"OϺq: l�<XPD8s)7wFUUt]W?|vt(7f6fQZ[ex] 8,H$dt 4~xXo Ymh30r�q�Hy.{Ivr}Ҳ`dH,;_QXUa,vLU ̲8cS>=�w=~rg1@<M5}!O'A� >o}s}>K|31}EUjJ%G/[_f%IjqLiSW^Ww^pwJw}M9PgZrkM+ECLq4zUOu⵩oӐڍM0?6+Md| �wvd٫e_iX@@Uxe;ttt1~xc+}LH҆�$b%އL>bQϧExv=0W}iα{3hik 6PUSߤܰ cukUsx^M6e 0",..rd2Jl_GPB"xNmp~*ju&�5M/ƛ# T<b%6NYIUj�I?N4+./Fxul<ŖYQQدtG;,x<8=] evS|f,9rRjREoq޸=9g0*6V1k,-XW&qK.s01aM*v C@TK8�rClj˭?c~}6coq=l vW}ߪ/_tŋ-%!>.7w RPZk+С8/=4gggR-&=OFױ4~#\[ uxGW8OٚAuKse?{m3#6d+y/A`‘._s˄M іT>KW1>q<f'9v177{7U>ĦMM&KEo.Gk=88xfhhhy]j5\1OP4\3ϝ;70??_d`�rAT|Ps88N ˲mJ]~}OgVB DV`O0h0O:Up?}s| !$#[y|uo;����IENDB`������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/view-refresh.png������������������������������������������������0000644�0004711�0000144�00000004206�11230721617�017463� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���szz���sBIT|d��� pHYs��v��v}Ղ���tEXtSoftware�www.inkscape.org<��IDATxŗ{Wǿy}߽w(`Dj"?4!&H4 b J4!XRbe7sg̜s;eY|ɽ}{~wNH)񿈀;m5|*o\[X\R\nKBػ7"?_5n �dIg;/^^ѻNX0%Jc8<^>r=d^d;ݷ9k箽{<yK�G|ckdM"R)qCѲT?eOnuRn`vTg={5(7pu*^z W6-m(?YRXk˪>5uM}eU>UJpqGJ'ؼn qĖnq} U j 9+6c_�[`0$7:Ѕs-g&nun^яTq((1048(d s,vb^<XG@,hw;3 9f'uΞ `m&VFϜ̐F5r�H`=P$7=zUԜZ$ _ $$ m ?U]9}=*S' L<``�иFD kx ;epḸBOs#Y;YdVMjDoj`ĉpx:8ysѮY >aJ2u-8Hծs%\K(Gw(\fѕB,11 l23WT!0I(vd7/OE-&mKN xK'�XNʬ8PoQcC: 6:[0M] 9q <|@J22 ?Ly[ S =3b@d?n;/&t A^cwFj^N+qeFz'�369005EpT9(`sdΫo9f$ h$FPlP zbӑr9}ЬjƍGP QU@҃FXr/G}8jء"�hG6j$-H,nCa):D*q�ƢC;C"₰'@4f�m( i,d>)ja2:NA M ^$5 6}�Dm]?-x賔V G(6` F.0O6q,EvLyUNiW9Lnpld;n9*3+~%s{"wEng*iR~[NbD@Hj Hb< V(` hӸV)G8�ԻVP #efXFB!\!!ՀZj+Ca`x$Tl_M<6)0JSCP)wilrs_7^l6PIl_mVZPՅf\$()BD,YAUbp 'RZ^ VvTiQr 1MҤ!n })@6a\\T\aBD\2I }0!ߩY>)'9 RF)Pc 둥!Q].�ndnIEh.ڟ 9m .-| yL\Y ^/tl~#ƋSS#0B]3DKk`R M󯗤#ɧ790r23�-)oq-: B2tAyVO,R|NQ`3 @v)I0JbE#�M; &4a٘�- KCŋ͈<Dh_,z׬ƈ;.%"a2{Q`9^ұξ=z7 m$*TlMm 6K̝ԁ7/]r}S'^r D?:q!hD(#~9?3*����IENDB`������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/document-export.png���������������������������������������������0000644�0004711�0000144�00000002413�11230721617�020210� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���D���sBITO��� pHYs��v��v}Ղ���tEXtSoftware�www.inkscape.org<�� PLTE���������������������������������������������������������������������������������������������������������������������������~~~~~~~~~TYY\`^X]]Z^_[``\a`agfbggrrr~~~֦zDه���PtRNS�� !"$%&')+,-13569<>BDFIJNRYj{{|^��IDATxmMkQsMTD)BW]_.nT-P| TmkjI!M2s3w&Y$Cys,1`D` " PUH"\\D=3Eu[vp&+~s|B UbhҺQyRVyX)Z�ָVyUS"0(Un.sxrbM"R\x:w遧,\sͬ3#evڠc"@ʻi; \ Af^g|ြQfhC"dY{g`ND9ȯqY )ruyhAPC=&94�r^8 M"?%mqȭ9tn2Y.y;^IDdeg_LE3hև$b9v٠|čt!FV:8 !ش]q(Rr/er;3tc6�49c/kR+,=S dd3|l����IENDB`�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/icon32x32.xpm���������������������������������������������������0000644�0004711�0000144�00000015077�11230722164�016535� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* XPM */ static const char * icon32x32_xpm[] = { "32 32 280 2", " c None", ". c #2D2D2D", "+ c #181818", "@ c #252525", "# c #161616", "$ c #000000", "% c #0E0E0E", "& c #D2D2D2", "* c #E7E7E7", "= c #B2B2B2", "- c #8ABC98", "; c #01E03E", "> c #04E040", ", c #C5E6CE", "' c #A8A8A8", ") c #E9E9E9", "! c #FFFFFF", "~ c #C5C5C5", "{ c #BEC7C1", "] c #22EF5A", "^ c #00F844", "/ c #74FB99", "( c #BABABA", "_ c #B4B4B4", ": c #51E379", "< c #1FF058", "[ c #BEC7C0", "} c #7DD796", "| c #06F648", "1 c #A0CEAD", "2 c #CCFED9", "3 c #09F84B", "4 c #77D992", "5 c #E4FEEB", "6 c #1BF958", "7 c #4FE478", "8 c #F2FFF5", "9 c #30F967", "0 c #40FA73", "a c #C1C6C2", "b c #E9BDBE", "c c #F9FFFB", "d c #46FA77", "e c #27F961", "f c #EDFEF1", "g c #E94648", "h c #FFD9DA", "i c #FDFFFD", "j c #58FA84", "k c #17F955", "l c #DEFEE7", "m c #E94043", "n c #FF6366", "o c #FFF9F9", "p c #C4C5C5", "q c #68FB90", "r c #0FF84F", "s c #CEFEDB", "t c #E95457", "u c #FF4649", "v c #FFA4A6", "w c #58E17E", "x c #C0FDD1", "y c #E9BBBC", "z c #FF4E51", "A c #FFEDED", "B c #5BE080", "C c #06F849", "D c #B6FDCA", "E c #FEFEFF", "F c #BFC0FF", "G c #8284FF", "H c #7E80FF", "I c #8688E1", "J c #BBBBC9", "K c #EC6F71", "L c #E77B7C", "M c #5AE17F", "N c #04F747", "O c #88D59D", "P c #B8B8CB", "Q c #6265F0", "R c #4145FF", "S c #4E51F9", "T c #AFB0CE", "U c #A4A5C4", "V c #CEB1B1", "W c #FE474A", "X c #FE494C", "Y c #1E0809", "Z c #C4C5C4", "` c #54E27B", " . c #87D59C", ".. c #B0B1CE", "+. c #5053F8", "@. c #8D8FDD", "#. c #9899D9", "$. c #6064F1", "%. c #5659F6", "&. c #C1C1C7", "*. c #B5B5CC", "=. c #4A4DEC", "-. c #FF888A", ";. c #97292B", ">. c #FAFFFC", ",. c #5DFA88", "'. c #08F84A", "). c #8BD49F", "!. c #AFAFCF", "~. c #5154FF", "{. c #6E71FF", "]. c #EFEFFF", "^. c #C0C0C7", "/. c #575AF5", "(. c #A5A7FF", "_. c #EDEDFF", ":. c #5559F6", "<. c #3D41F1", "[. c #E8E9E8", "}. c #FFE2E3", "|. c #FF484B", "1. c #F84447", "2. c #1C150C", "3. c #46FA78", "4. c #0DF84D", "5. c #BDFDCE", "6. c #B3B4CD", "7. c #4E52F9", "8. c #787AFF", "9. c #F8F8FF", "0. c #A3A4D4", "a. c #484CFF", "b. c #C6C7FF", "c. c #E3E4FF", "d. c #B6B8FF", "e. c #5659FF", "f. c #5255E8", "g. c #93E6AA", "h. c #FF8688", "i. c #DB5F48", "j. c #24D843", "k. c #CBFED9", "l. c #F0F1FF", "m. c #5558F6", "n. c #7376FF", "o. c #F9F9FF", "p. c #8E90FF", "q. c #6063F1", "r. c #B0B0BF", "s. c #05E242", "t. c #86FCA6", "u. c #D4FEDF", "v. c #98E79F", "w. c #0EEF44", "x. c #2BF964", "y. c #FBFBFF", "z. c #6F72FF", "A. c #5B5EF4", "B. c #F6F6FF", "C. c #FFEAEB", "D. c #EC7072", "E. c #FC4C4F", "F. c #FD4E53", "G. c #A5469F", "H. c #6353ED", "I. c #5B5EFF", "J. c #777AFF", "K. c #B8BAFF", "L. c #C3C4C6", "M. c #00E23E", "N. c #57BB46", "O. c #F29C95", "P. c #8C8EFF", "Q. c #5053F9", "R. c #FFEFEF", "S. c #FF5D5F", "T. c #FF5356", "U. c #FFD7D8", "V. c #A3E7B6", "W. c #53FA81", "X. c #28F961", "Y. c #36F96B", "Z. c #1D5B1F", "`. c #FC4548", " + c #FF4A4D", ".+ c #B29DE9", "++ c #ABACD0", "@+ c #FF8486", "#+ c #F26264", "$+ c #CBB7B8", "%+ c #FFE8E9", "&+ c #FF7D7F", "*+ c #FF5255", "=+ c #FFE3E3", "-+ c #9F2C2D", ";+ c #D8466E", ">+ c #4645FA", ",+ c #BBBDFF", "'+ c #CBB7B7", ")+ c #FFFCFC", "!+ c #FF8183", "~+ c #FF6669", "{+ c #210C18", "]+ c #5B45E6", "^+ c #928BF6", "/+ c #FF7F81", "(+ c #FF9C9E", "_+ c #FFF7F7", ":+ c #FF6365", "<+ c #FF9D9F", "[+ c #242424", "}+ c #272727", "|+ c #2C2EAC", "1+ c #6745DA", "2+ c #E54B53", "3+ c #332A2B", "4+ c #1E1E1E", "5+ c #5B3536", "6+ c #FF474A", "7+ c #F54346", "8+ c #332324", "9+ c #4B2424", "0+ c #46292A", "a+ c #1D1D1D", "b+ c #1B1C69", "c+ c #3D41F0", "d+ c #BB3A55", "e+ c #A62E30", "f+ c #010000", "g+ c #060202", "h+ c #CA373A", "i+ c #892527", "j+ c #992A2C", "k+ c #AF3032", "l+ c #D8D8D8", "m+ c #B9BAD8", "n+ c #3F42F5", "o+ c #B1B3F1", "p+ c #E9CBCB", "q+ c #FF5053", "r+ c #D25A5C", "s+ c #AC999A", "t+ c #D8BABB", "u+ c #E26062", "v+ c #FF5C5F", "w+ c #E0D6D6", "x+ c #A7A7A7", "y+ c #E2D1D1", "z+ c #FE4649", "A+ c #A98484", "B+ c #FAFAFF", "C+ c #6568FF", "D+ c #282B9E", "E+ c #FFCFD0", "F+ c #FF4F51", "G+ c #FFDBDC", "H+ c #FF9C9D", "I+ c #E16466", "J+ c #9B9DFF", "K+ c #383BDB", "L+ c #03030C", "M+ c #FFE1E2", "N+ c #ED6D6F", "O+ c #FB4E51", "P+ c #FF595C", "Q+ c #FF8D8F", "R+ c #FFE9E9", "S+ c #FFEDEE", "T+ c #FD4A4D", "U+ c #F14245", "V+ c #DADADA", "W+ c #CCCDF0", "X+ c #3F43F0", "Y+ c #3E42F0", "Z+ c #0F1039", "`+ c #F0F0F0", " @ c #B9B9B9", ".@ c #DB6E70", "+@ c #E23E41", "@@ c #0F0F0F", ". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ ", "# $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % ", "# $ & * * * $ $ * * * * = = * * * * * * = - ; > , * * * = ' $ % ", "# $ ) ! ! ! $ $ ! ! ! ! ~ ~ ! ! ! ! ! ! { ] ^ / ! ! ! ! ~ ( $ % ", "# $ _ ~ ~ ~ $ $ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ : ^ < [ ~ ~ ~ ~ ~ ( $ % ", "# $ _ ~ ~ ~ $ $ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ } ^ | 1 ~ ~ ~ ~ ~ ~ ( $ % ", "# $ ) ! ! ! $ $ ! ! ! ! ~ ~ ! ! ! ! 2 3 ^ 4 ! ! ! ! ! ! ~ ( $ % ", "# $ ) ! ! ! $ $ ! ! ! ! ~ ~ ! ! ! 5 6 ^ 7 ~ ! ! ! ! ! ! ~ ( $ % ", "# $ ) ! ! ! $ $ ! ! ! ! ~ ~ ! ! 8 9 ^ 0 a ~ ! ! ! ! ! ! ~ ( $ % ", "# $ b ! ! ! $ $ ! ! ! ! ~ ~ ! c d ^ e f ~ ~ ! ! ! ! ! ! ~ ( $ % ", "# $ g h ! ! $ $ ! ! ! ! ~ ~ i j ^ k l ! ~ ~ ! ! ! ! ! ! ~ ( $ % ", "# $ m n o ! $ $ ! ! ! ! ~ p q ^ r s ! ! ~ ~ ! ! ! ! ! ! ~ ( $ % ", "# $ t u v ! $ $ ! ! ! ! ~ w ^ 3 x ! ! ! ~ ~ ! ! ! ! ! ! ~ ( $ % ", "# $ y u z A $ $ ! ! ! ! B ^ C D E F G H I J ! ! ! ! ! ! ~ ( $ % ", "# $ _ K u L $ $ ~ ~ ~ M ^ N O P Q R R R R S T ~ ~ ~ ~ ~ ~ U $ % ", "# $ _ V W X Y $ ~ Z ` ^ N ...+.R S @.#.$.R %.&.~ ~ ~ ~ *.=.$ % ", "# $ ) ! -.u ;.$ >.,.^ '.).!.~.R {.].! ! ^./.R (.! ! ! _.:.<.$ % ", "# $ [.! }.|.1.2.3.^ 4.5.6.7.R 8.9.! ! ! ~ 0.R a.b.c.d.e.R f.$ % ", "# $ g.! ! h.i.j.^ k k.l.m.R n.o.! ! ! ! ~ ~ p.R R R R R q.r.$ % ", "# $ s.t.u.v.w.^ x.l y.z.R A.B.! ! ! ! C.D.E.F.G.H.I.J.K.L.( $ % ", "# $ M.^ ^ ^ ^ N.O.! P.R Q.P ! ! ! ! R.S.u u u u T.U.! ! ~ ( $ % ", "# $ V.W.X.Y.Z.`. +.+R a.++~ ! ! ! ! @+u #+$+%+&+u *+=+! ~ ( $ % ", "# $ ) ! ! ! $ -+;+>+R ,+~ ~ ! ! ! h u z '+~ ! )+!+u ~+o ~ ( $ % ", "# $ ) ! ! ! $ {+]+R ^+! ~ ~ ! ! ! /+u (+~ ~ ! ! _+:+u <+~ ( $ % ", "# $ [+}+}+}+$ |+R 1+2+3+4+4+}+}+5+6+7+8+4+4+}+}+}+9+`.X 0+a+$ % ", "# $ $ $ $ $ b+R c+d+u e+f+$ $ g+h+u i+$ $ $ $ $ $ $ j+u k+$ $ % ", "# $ ~ l+l+m+n+R o+p+q+u r+s+t+u+u v+w+l+x+x+l+l+l+l+y+z z+A+$ % ", "# $ ) ! B+C+R D+! ! E+F+u u u u T.G+! ! ~ ~ ! ! ! ! ! H+u I+$ % ", "# $ ) ! J+R K+L+! ! ! M+N+O+P+Q+R+! ! ! ~ ~ ! ! ! ! ! S+T+U+$ % ", "# $ V+W+X+Y+Z+$ `+`+`+`+ @ @`+`+`+`+`+`+ @ @`+`+`+`+`+`+.@+@$ % ", "# $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % ", "[+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a+"}; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/image-x-eps.png�������������������������������������������������0000644�0004711�0000144�00000002425�11230721617�017172� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���szz���sBIT|d��� pHYs��v��v}Ղ���tEXtSoftware�www.inkscape.org<��IDATxڵkUMd7IS$MIV*Q0DDՊՋ" *^^"XA EV`mmvn23;,'CFox93}K)E(+`&TpoL @Z`q$VhW' eLlCÃY`- W8n%E1 nUuD`ik 1V1%q�Z&\t-ׄm*1%-�(ݨ02k5l{mYe 7 ?prq!ㇳxkx+A>Y䇙[tibc 6 pQ_>8=G>( FGQeNg|ze9}ُm7{!Am|tZ.~>6R�6҉mK:r] /@+V=%T0xtK'Y&'mKs%[k)*_ !Q8oPR1HO&fO^wo=MFE7Wʮ~6#_h?'m$[^.?Wꏚ' \;-$6{ n-;haS2f.ҝ !r[jY}0]-4ܨ='m׻7Pq=ikbpT5sIP R*t `Ξ4F/Knšry^Z@tx+KRຮ8b0$, lct)?�,c�1q hZpȵࣨag,υ OskHb0kQsi%‚>>R[[Q /wHeŕn1eIC.1<<LTb~~�>Lp'K-ڻݯtѻY8 e<K:L(Vd>˫ߡT;zKBA/AKK KGy.r&/4:H.ӵ=[,/a kݫ O�PJ0@%cAF ^*L� S)s@l`�3RH "sO p<mSO����IENDB`�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/configure.png���������������������������������������������������0000644�0004711�0000144�00000003107�11230721617�017035� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���szz���sRGB����bKGD������ pHYs����^���tIME)%FU��IDATXõmPϾ, xv7`L't|)m1m^<'PtH[dS2PjaFd$DH\%[`a}|љr,SsuC ݦ?~y!!!#UU hKʼ}^qE{o'vxA,R}nkvkEn#nk֮V&MxF�cPXyu%@8 ɀ~CSo? ʀ&!HJJJGgQJ 9#s@IR04lkeF ( 93/o.Ah?kw>w;#�!p\z<ል޳dʃG QӔtpKnO5ūWƆ.mmmLfBB j)++k,! ߧEfLN65t:eV$Ikjj@%O>HK$͙Zbc%&R'Ujf2QT\,7?v}jH$j|C[ y̑`c縊5Kc—/[1EQ[^ÍuVݲy500pӇZ{7n kO:3U""*ZPPPuτ)f;+_D~p1!C̙;W8jv6@Ⱥ?~{cs+'SqcEr|f4$GJΆq8a*Ćo_~ u }_w477�EQx O^fPw岹T>dO++l6zIݖxnW^�/]<b19V}ل֫q.ZzHYƂ mYף@¤I_ٹѾ=�iv8E_WUFt:FB3&}T~j9/s3}h֮{*::j˗, ۇ*TSb]'O t%9 ^4C8Nc0th$ V8謭[]s9,'PC(FBQ|x:_bZмhJպ }EZZ*Δ} 8z#v#�M믽dZqx}Gxi tww3eʝw-M8u92"2o7h :Dٛ=>o04l@<xnMr`ɾ s6^ZJ֯L:ِ:Z.SJg;kG欙srTQ޾v|QssKPH#G47{<O!,\2Tg����IENDB`���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/document-print.png����������������������������������������������0000644�0004711�0000144�00000002347�11230721617�020031� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���szz���sBIT|d��� pHYs��v��v}Ղ���tEXtSoftware�www.inkscape.org<��dIDATxWOW]{B@D $J#9 P/9p)K#9RJ%˯Rb|OoeeDz#},}͛7lxGfƗԂl"ZkET &1u#Z}Rk]㔚Z &&46]fճU/Ϟ}m:qr9/R>v{{B#Jm77&eY0B& � ڥrU�SېD"�lpkWs9mEEy%vt @4Vx/�G$\XXb,V֦A+H[�:mcK"w;Y]]E4;;;7pW]:??gQFŹ$")8<G簞<C_s-jR` 8m@v!`r,CQsGvH s1bdeq"!"$2ot X\\ ?|)@%X= ِ۫ǀ iPr9yRYɁIp:\!%$)>mll$tw5"(a0خ8z[ '�131QSSS4?? E7W^ر(˔Jz5}\ىؕdv* t1LPMW\N-H;6O1á/~�pW_]]{AhP ϩnF�UqYb (gQ5ϊxJP>=;w:�վ@܈[Շ S{{+ڱd> m֓"nCO<L& .飆$7$7$.#nC+`VVVX@Pq^0%!{_2vw@פl=3͗46<̈ƍaa=Cȷ.2ĻFQo?k����IENDB`�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/edit-paste.png��������������������������������������������������0000644�0004711�0000144�00000001651�11230721617�017115� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���szz���sBIT|d��� pHYs��v��v}Ղ���tEXtSoftware�www.inkscape.org<��&IDATxڥWKkQ>Լ@ Zlt}@ܺP(kXJj hCBnٝuҮ-Xɫ;9w8vr/\Ν{ι37eYi6 c/8Jarrrhn:t@0\y`ii7r{-L XXXDt5pyt:ijߪ2̻!F�|>P C8a{~\|ݎvvvkLL˯l6 `'g>66vMLB"}jM*vm~ j#/۵1BZ? b1hZZ4VQ\Vyw"uS ζjU\.?#U4{gzAe3X*X,0 j I߅ 8s+u&Dkp O�' 8 px gY'rc�!ȵ )):oyqYť6!&1d3Rt1}I.BLu?єi؀9l;R,Rhbgc }\q.2:t2߇p( WH&ZY^Nu3 Z=>;pp`‹gVⰺ!Nm6n6o;VzPt?%\{ fc� o߃ϟPwEMtݥS r+ݤnGdjD,/K@ݱVo?Ew[p;QBR$N^2E,-K J%ׅ����IENDB`���������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/images/grid.png��������������������������������������������������������0000644�0004711�0000144�00000000230�11230721617�015773� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���szz��� pHYs����^���JIDATX픱 � t Lm5USKNc 0.^oR"/@ �CJ\?5:����IENDB`������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotItems.cpp�����������������������������������������������������0000644�0004711�0000144�00000014437�11716067146�016565� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotItems.cpp */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #include "QtGnuplotItems.h" #include <QtGui> ///////////////////////////// // QtGnuplotEnhanced void QtGnuplotEnhanced::addText(const QString& fontName, double fontSize, double base, bool widthFlag, bool showFlag, int overprint, const QString& text, QColor color) { if ((overprint == 1) && !(m_overprintMark)) // Underprint { m_overprintPos = m_currentPos.x(); m_overprintMark = true; } if (overprint == 3) // Save position m_savedPos = m_currentPos; else if (overprint == 4) // Recall saved position m_currentPos = m_savedPos; QFont font(fontName, fontSize); QtGnuplotEnhancedFragment* item = new QtGnuplotEnhancedFragment(font, text, this); item->setPos(m_currentPos + QPointF(0., -base)); if (showFlag) item->setPen(color); else item->setPen(Qt::NoPen); if (overprint == 2) // Overprint { item->setPos(QPointF((m_overprintPos + m_currentPos.x())/2. - (item->boundingRect().right() + item->boundingRect().left())/2., -base)); m_overprintMark = false; } if (widthFlag && (overprint != 2)) m_currentPos += QPointF(item->boundingRect().right(), 0.); } void QtGnuplotEnhanced::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) { Q_UNUSED(painter); Q_UNUSED(option); Q_UNUSED(widget); } QtGnuplotEnhancedFragment::QtGnuplotEnhancedFragment(const QFont& font, const QString& text, QGraphicsItem * parent) : QAbstractGraphicsShapeItem(parent) { m_font = font; m_text = text; } QRectF QtGnuplotEnhancedFragment::boundingRect() const { QFontMetricsF metrics(m_font); return metrics.boundingRect(m_text); } void QtGnuplotEnhancedFragment::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) { Q_UNUSED(option); Q_UNUSED(widget); painter->setPen(pen()); painter->setFont(m_font); painter->drawText(QPointF(0.,0.), m_text); } ///////////////////////////// // QtGnuplotPoint QtGnuplotPoint::QtGnuplotPoint(int style, double size, QColor color, QGraphicsItem * parent) : QGraphicsItem(parent) { m_color = color; m_style = style; m_size = 3.*size; } QRectF QtGnuplotPoint::boundingRect() const { return QRectF(QPointF(-m_size, -m_size), QPointF(m_size, m_size)); } void QtGnuplotPoint::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) { Q_UNUSED(option); Q_UNUSED(widget); int style = m_style % 13; painter->setPen(m_color); if ((style % 2 == 0) && (style > 3)) // Filled points painter->setBrush(m_color); painter->drawPoint(0, 0); if ((style == 0) || (style == 2)) // plus or star { painter->drawLine(QPointF(0., -m_size), QPointF(0., m_size)); painter->drawLine(QPointF(-m_size, 0.), QPointF(m_size, 0.)); } if ((style == 1) || (style == 2)) // cross or star { painter->drawLine(QPointF(-m_size, -m_size), QPointF(m_size, m_size)); painter->drawLine(QPointF(-m_size, m_size), QPointF(m_size, -m_size)); } else if ((style == 3) || (style == 4)) // box painter->drawRect(boundingRect()); else if ((style == 5) || (style == 6)) // circle painter->drawEllipse(boundingRect()); else if ((style == 7) || (style == 8)) // triangle { const QPointF p[3] = { QPointF(0., -m_size), QPointF(.866*m_size, .5*m_size), QPointF(-.866*m_size, .5*m_size)}; painter->drawPolygon(p, 3); } else if ((style == 9) || (style == 10)) // upside down triangle { const QPointF p[3] = { QPointF(0., m_size), QPointF(.866*m_size, -.5*m_size), QPointF(-.866*m_size, -.5*m_size)}; painter->drawPolygon(p, 3); } else if ((style == 11) || (style == 12)) // diamond { const QPointF p[4] = { QPointF(0., m_size), QPointF(m_size, 0.), QPointF(0., -m_size), QPointF(-m_size, 0.)}; painter->drawPolygon(p, 4); } } /* * EAM - support for toggling plots by clicking on a key sample */ QtGnuplotKeybox::QtGnuplotKeybox(const QRectF& rect) : QRectF(rect) { m_hidden = false; } bool QtGnuplotKeybox::ishidden() const { return m_hidden; } void QtGnuplotKeybox::setHidden(bool state) { m_hidden = state; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotResource.qrc��������������������������������������������������0000644�0004711�0000144�00000001526�11230722164�017256� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE RCC><RCC version="1.0"> <qresource> <file alias="images/gnuplot">images/icon32x32.xpm</file> <file alias="images/clipboard">images/edit-paste.png</file> <file alias="images/print">images/document-print.png</file> <file alias="images/export">images/document-export.png</file> <file alias="images/exportPDF">images/application-pdf.png</file> <file alias="images/exportVector">images/image-x-eps.png</file> <file alias="images/exportRaster">images/image-bmp.png</file> <file alias="images/replot">images/view-refresh.png</file> <file alias="images/grid">images/grid.png</file> <file alias="images/zoomPrevious">images/zoom-out.png</file> <file alias="images/zoomNext">images/zoom-in.png</file> <file alias="images/autoscale">images/zoom-original.png</file> <file alias="images/settings">images/configure.png</file> </qresource> </RCC>��������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotItems.h�������������������������������������������������������0000644�0004711�0000144�00000007314�11716067146�016226� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotItems.h */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #ifndef QTGNUPLOTITEMS_H #define QTGNUPLOTITEMS_H #include <QGraphicsItem> #include <QFont> class QtGnuplotPoint : public QGraphicsItem { public: QtGnuplotPoint(int style, double size, QColor color, QGraphicsItem * parent = 0); public: virtual QRectF boundingRect() const; virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); private: QColor m_color; int m_style; double m_size; }; class QtGnuplotEnhancedFragment : public QAbstractGraphicsShapeItem { public: QtGnuplotEnhancedFragment(const QFont& font, const QString& text, QGraphicsItem * parent = 0); public: virtual QRectF boundingRect() const; virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); private: QFont m_font; QString m_text; }; class QtGnuplotEnhanced : public QGraphicsItem { public: QtGnuplotEnhanced(QGraphicsItem * parent = 0) : QGraphicsItem(parent) { m_overprintMark = false;} public: virtual QRectF boundingRect() const { return childrenBoundingRect(); } virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); public: void addText(const QString& fontName, double fontSize, double base, bool widthFlag, bool showFlag, int overprint, const QString& text, QColor color); private: QPointF m_currentPos, m_savedPos; bool m_overprintMark; double m_overprintPos; }; class QtGnuplotKeybox : public QRectF { public: QtGnuplotKeybox(const QRectF& rect); void setHidden(bool state); bool ishidden() const; private: bool m_hidden; }; #endif // QTGNUPLOTITEMS_H ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotScene.cpp�����������������������������������������������������0000644�0004711�0000144�00000057366�12220061727�016537� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotScene.cpp */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #include "QtGnuplotWidget.h" #include "QtGnuplotScene.h" #include "QtGnuplotEvent.h" #include "QtGnuplotItems.h" #include <QtGui> #include <QDebug> QtGnuplotScene::QtGnuplotScene(QtGnuplotEventHandler* eventHandler, QObject* parent) : QGraphicsScene(parent) { m_widget = dynamic_cast<QtGnuplotWidget*>(parent); m_eventHandler = eventHandler; m_lastModifierMask = 0; m_textAngle = 0.; m_textAlignment = Qt::AlignLeft; m_currentZ = 1.; m_currentPointSize = 1.; m_enhanced = 0; m_currentPlotNumber = 0; m_inKeySample = false; m_preserve_visibility = false; m_currentGroup.clear(); resetItems(); } ///////////////////////////////////////////////// // Gnuplot events // Vertical and horizontal lines do not render well with antialiasing // Clip then to the nearest integer pixel QPolygonF& QtGnuplotScene::clipPolygon(QPolygonF& polygon, bool checkDiag) const { if (checkDiag) for (int i = 1; i < polygon.size(); i++) if ((polygon[i].x() != polygon[i-1].x()) && (polygon[i].y() != polygon[i-1].y())) return polygon; for (int i = 0; i < polygon.size(); i++) { polygon[i].setX(qRound(polygon[i].x() + 0.5) - 0.5); polygon[i].setY(qRound(polygon[i].y() + 0.5) - 0.5); } return polygon; } QPointF& QtGnuplotScene::clipPoint(QPointF& point) const { point.setX(qRound(point.x() + 0.5) - 0.5); point.setY(qRound(point.y() + 0.5) - 0.5); return point; } QRectF& QtGnuplotScene::clipRect(QRectF& rect) const { rect.setTop (qRound(rect.top () + 0.5) - 0.5); rect.setBottom(qRound(rect.bottom() + 0.5) - 0.5); rect.setLeft (qRound(rect.left () + 0.5) - 0.5); rect.setRight (qRound(rect.right () + 0.5) - 0.5); return rect; } // A succession of move and vector is gathered in a single polygon // to make drawing faster void QtGnuplotScene::flushCurrentPolygon() { if (m_currentPolygon.size() < 2) { m_currentPolygon.clear(); return; } clipPolygon(m_currentPolygon); QPainterPath path; path.addPolygon(m_currentPolygon); QGraphicsPathItem *pathItem; pathItem = addPath(path, m_currentPen, Qt::NoBrush); pathItem->setZValue(m_currentZ++); m_currentPolygon.clear(); if (!m_inKeySample) m_currentGroup.append(pathItem); } void QtGnuplotScene::update_key_box(const QRectF rect) { if (m_currentPlotNumber > m_key_boxes.count()) { m_key_boxes.insert(m_currentPlotNumber, QtGnuplotKeybox(rect)); } else if (m_key_boxes[m_currentPlotNumber-1].isEmpty()) { // Retain the visible/hidden flag when re-initializing the Keybox bool tmp = m_key_boxes[m_currentPlotNumber-1].ishidden(); m_key_boxes[m_currentPlotNumber-1] = QtGnuplotKeybox(rect); m_key_boxes[m_currentPlotNumber-1].setHidden(tmp); } else { m_key_boxes[m_currentPlotNumber-1] |= rect; } } void QtGnuplotScene::processEvent(QtGnuplotEventType type, QDataStream& in) { if ((type != GEMove) && (type != GEVector) && !m_currentPolygon.empty()) { QPointF point = m_currentPolygon.last(); flushCurrentPolygon(); m_currentPolygon << point; } if (type == GEClear) { resetItems(); m_preserve_visibility = false; } else if (type == GELineWidth) { double width; in >> width; m_currentPen.setWidthF(width); } else if (type == GEMove) { QPointF point; in >> point; if (!m_currentPolygon.empty() && (m_currentPolygon.last() != point)) { flushCurrentPolygon(); m_currentPolygon.clear(); } m_currentPolygon << point; } else if (type == GEVector) { QPointF point; in >> point; m_currentPolygon << point; if (m_inKeySample) update_key_box( QRectF(point, QSize(0,1)) ); } else if (type == GEPenColor) { QColor color; in >> color; m_currentPen.setColor(color); } else if (type == GEBackgroundColor) { m_currentPen.setColor(m_widget->m_backgroundColor); } else if (type == GEPenStyle) { int style; in >> style; m_currentPen.setStyle(Qt::PenStyle(style)); if (m_widget->m_rounded) { m_currentPen.setJoinStyle(Qt::RoundJoin); m_currentPen.setCapStyle(Qt::RoundCap); } else { m_currentPen.setJoinStyle(Qt::MiterJoin); m_currentPen.setCapStyle(Qt::FlatCap); } } else if (type == GEPointSize) in >> m_currentPointSize; else if (type == GETextAngle) in >> m_textAngle; else if (type == GETextAlignment) { int alignment; in >> alignment; m_textAlignment = Qt::Alignment(alignment); } else if (type == GEFillBox) { QRect rect; in >> rect; QGraphicsRectItem *rectItem; rectItem = addRect(rect, Qt::NoPen, m_currentBrush); rectItem->setZValue(m_currentZ++); if (m_inKeySample) update_key_box(rect); else m_currentGroup.append(rectItem); } else if (type == GEFilledPolygon) { QPolygonF polygon; in >> polygon; QPen pen = Qt::NoPen; if (m_currentBrush.style() == Qt::SolidPattern) pen = m_currentBrush.color(); clipPolygon(polygon, false); QGraphicsPolygonItem *path; path = addPolygon(polygon, pen, m_currentBrush); path->setZValue(m_currentZ++); if (!m_inKeySample) m_currentGroup.append(path); } else if (type == GEBrushStyle) { int style; in >> style; setBrushStyle(style); } else if (type == GERuler) { QPoint point; in >> point; updateRuler(point); } else if (type == GESetFont) { QString fontName; in >> fontName; int size ; in >> size; m_font.setFamily(fontName); m_font.setPointSize(size); } else if (type == GEPoint) { QPointF point; in >> point; int style ; in >> style; QtGnuplotPoint* pointItem = new QtGnuplotPoint(style, m_currentPointSize, m_currentPen.color()); pointItem->setPos(clipPoint(point)); pointItem->setZValue(m_currentZ++); addItem(pointItem); if (m_inKeySample) update_key_box( QRectF(point, QSize(2,2)) ); else m_currentGroup.append(pointItem); } else if (type == GEPutText) { QPoint point; in >> point; QString text; in >> text; QGraphicsTextItem* textItem = addText(text, m_font); textItem->setDefaultTextColor(m_currentPen.color()); positionText(textItem, point); if (m_inKeySample) { QRectF rect = textItem->boundingRect(); qreal fullheight = rect.height(); if (m_textAlignment == Qt::AlignRight) rect.moveBottomRight(point); else rect.moveBottomLeft(point); rect.adjust(0, fullheight/1.8, 0, fullheight/4); update_key_box(rect); } else { m_currentGroup.append(textItem); } } else if (type == GEEnhancedFlush) { QString fontName; in >> fontName; double fontSize ; in >> fontSize; double base ; in >> base; bool widthFlag ; in >> widthFlag; bool showFlag ; in >> showFlag; int overprint ; in >> overprint; QString text ; in >> text; if (m_enhanced == 0) m_enhanced = new QtGnuplotEnhanced(); m_enhanced->addText(fontName, fontSize, base, widthFlag, showFlag, overprint, text, m_currentPen.color()); } else if (type == GEEnhancedFinish) { QPoint point; in >> point; positionText(m_enhanced, point); m_enhanced->setZValue(m_currentZ++); addItem(m_enhanced); if (m_inKeySample) { QRectF rect = m_enhanced->boundingRect(); qreal fullheight = rect.height(); if (m_textAlignment == Qt::AlignRight) rect.moveBottomRight(point); else rect.moveBottomLeft(point); rect.adjust(0, fullheight/1.8, 0, fullheight/4); update_key_box(rect); } else { m_currentGroup.append(m_enhanced); } m_enhanced = 0; } else if (type == GEImage) { QPoint p0; in >> p0; QPoint p1; in >> p1; QPoint p2; in >> p2; QPoint p3; in >> p3; QImage image; in >> image; QPixmap pixmap = QPixmap::fromImage(image); QGraphicsPixmapItem* item = addPixmap(pixmap); item->setZValue(m_currentZ++); item->setPos(p0); QPointF size = p1 - p0; item->scale(size.x()/pixmap.width(), size.y()/pixmap.height()); m_currentGroup.append(item); /// @todo clipping } else if (type == GEZoomStart) { QString text; in >> text; m_zoomBoxCorner = m_lastMousePos; m_zoomRect->setRect(QRectF()); m_zoomRect->setVisible(true); m_zoomStartText->setVisible(true); m_zoomStartText->setPlainText(text); /// @todo font QSizeF size = m_zoomStartText->boundingRect().size(); m_zoomStartText->setPos(m_zoomBoxCorner - QPoint(size.width(), size.height())); } else if (type == GEZoomStop) { QString text; in >> text; if (text.isEmpty()) { m_zoomRect->setVisible(false); m_zoomStartText->setVisible(false); m_zoomStopText->setVisible(false); } else { m_zoomStopText->setVisible(true); m_zoomStopText->setPlainText(text); /// @todo font m_zoomStopText->setPos(m_lastMousePos); m_zoomRect->setRect(QRectF(m_zoomBoxCorner + QPointF(0.5, 0.5), m_lastMousePos + QPointF(0.5, 0.5)).normalized()); m_zoomRect->setZValue(32767); // make sure guide box is on top } } else if (type == GELineTo) { bool visible; in >> visible; m_lineTo->setVisible(visible); if (visible) { QLineF line = m_lineTo->line(); line.setP2(m_lastMousePos); m_lineTo->setLine(line); } } else if (type == GESetSceneSize) { QSize size; in >> size; setSceneRect(QRect(QPoint(0, 0), size)); } else if (type == GEScale) { for (int i = 0; i < 4; i++) in >> m_axisValid[i] >> m_axisMin[i] >> m_axisLower[i] >> m_axisScale[i] >> m_axisLog[i]; } else if (type == GEPlotNumber) { int newPlotNumber; in >> newPlotNumber; if (newPlotNumber == 0 && m_currentPlotNumber > 0) { // End of previous plot, create group holding the accumulated elements QGraphicsItemGroup *newgroup; newgroup = createItemGroup(m_currentGroup); newgroup->setZValue(m_currentZ++); // Copy the visible/hidden status from the previous plot/replot if (0 < m_currentPlotNumber && m_currentPlotNumber <= m_key_boxes.count()) newgroup->setVisible( !(m_key_boxes[m_currentPlotNumber-1].ishidden()) ); // Store it in an ordered list so we can toggle it by index if (m_currentPlotNumber >= m_plot_group.count()) m_plot_group.insert(m_currentPlotNumber, newgroup); else m_plot_group.replace(m_currentPlotNumber-1, newgroup); } else { // Initialize list of elements for next group m_currentGroup.clear(); } m_currentPlotNumber = newPlotNumber; } else if (type == GELayer) { int layer; in >> layer; if (layer == QTLAYER_BEGIN_KEYSAMPLE) m_inKeySample = true; if (layer == QTLAYER_END_KEYSAMPLE) m_inKeySample = false; if (layer == QTLAYER_BEFORE_ZOOM) m_preserve_visibility = true; } else if (type == GEDone) m_eventHandler->postTermEvent(GE_plotdone, 0, 0, 0, 0, 0); /// @todo m_id;//qDebug() << "Done !" << items().size(); else swallowEvent(type, in); } void QtGnuplotScene::resetItems() { clear(); m_currentZ = 1.; m_zoomRect = addRect(QRect(), QPen(QColor(0, 0, 0, 200)), QBrush(QColor(0, 0, 255, 40))); m_zoomRect->setVisible(false); m_zoomStartText = addText(""); m_zoomStopText = addText(""); m_zoomStartText->setVisible(false); m_zoomStopText->setVisible(false); m_horizontalRuler = addLine(QLine(0, 0, width(), 0) , QPen(QColor(0, 0, 0, 200))); m_verticalRuler = addLine(QLine(0, 0, 0, height()), QPen(QColor(0, 0, 0, 200))); m_lineTo = addLine(QLine() , QPen(QColor(0, 0, 0, 200))); m_horizontalRuler->setVisible(false); m_verticalRuler->setVisible(false); m_lineTo->setVisible(false); int i = m_key_boxes.count(); while (i-- > 0) { m_key_boxes[i].setSize( QSizeF(0,0) ); if (!m_preserve_visibility) m_key_boxes[i].setHidden(false); } m_plot_group.clear(); // Memory leak? Destroy groups first? } namespace QtGnuplot { const Qt::BrushStyle brushes[8] = { Qt::NoBrush, Qt::DiagCrossPattern, Qt::Dense3Pattern, Qt::SolidPattern, Qt::FDiagPattern, Qt::BDiagPattern, Qt::Dense4Pattern, Qt::Dense5Pattern}; } void QtGnuplotScene::setBrushStyle(int style) { int fillpar = style >> 4; int fillstyle = style & 0xf; m_currentBrush.setStyle(Qt::SolidPattern); QColor color = m_currentPen.color(); if ((fillstyle == FS_TRANSPARENT_SOLID) || ((fillstyle == FS_SOLID) && (fillpar == 100))) color.setAlphaF(double(fillpar)/100.); else if (fillstyle == FS_SOLID) { double fact = double(100 - fillpar)/100.; double factc = 1. - fact; if ((fact >= 0.) && (factc >= 0.)) { color.setRedF (color.redF() *factc + fact); color.setGreenF(color.greenF()*factc + fact); color.setBlueF (color.blueF() *factc + fact); } } else if ((fillstyle == FS_TRANSPARENT_PATTERN) || (fillstyle == FS_PATTERN)) /// @todo color & transparent. See other terms m_currentBrush.setStyle(QtGnuplot::brushes[abs(fillpar) % 8]); else if (fillstyle == FS_EMPTY) // fill with background plot->color color = m_widget->m_backgroundColor; m_currentBrush.setColor(color); } void QtGnuplotScene::positionText(QGraphicsItem* item, const QPoint& point) { item->setZValue(m_currentZ++); double cx = 0.; double cy = (item->boundingRect().bottom() + item->boundingRect().top())/2.; if (m_textAlignment == Qt::AlignLeft) cx = item->boundingRect().left(); else if (m_textAlignment == Qt::AlignRight) cx = item->boundingRect().right(); else if (m_textAlignment == Qt::AlignCenter) cx = (item->boundingRect().right() + item->boundingRect().left())/2.; item->translate(cx, cy); item->rotate(-m_textAngle); item->translate(-cx, -cy); item->setPos(point.x() - cx, point.y() - cy); } void QtGnuplotScene::updateRuler(const QPoint& point) { if (point.x() < 0) { m_horizontalRuler->setVisible(false); m_verticalRuler->setVisible(false); m_lineTo->setVisible(false); return; } QPointF pointF = QPointF(point) + QPointF(0.5, 0.5); m_horizontalRuler->setVisible(true); m_verticalRuler->setVisible(true); m_horizontalRuler->setPos(0, pointF.y()); m_verticalRuler->setPos(pointF.x(), 0); QLineF line = m_lineTo->line(); line.setP1(pointF); m_lineTo->setLine(line); } ///////////////////////////////////////////////// // User events void QtGnuplotScene::updateModifiers() { const int modifierMask = (QApplication::keyboardModifiers() >> 25); if (modifierMask != m_lastModifierMask) { m_lastModifierMask = modifierMask; m_eventHandler->postTermEvent(GE_modifier, 0, 0, modifierMask, 0, 0); /// @todo m_id } } void QtGnuplotScene::mousePressEvent(QGraphicsSceneMouseEvent* event) { m_lastMousePos = event->scenePos(); updateModifiers(); int button = 0; if (event->button()== Qt::LeftButton) button = 1; else if (event->button()== Qt::MidButton) button = 2; else if (event->button()== Qt::RightButton) button = 3; m_eventHandler->postTermEvent(GE_buttonpress, int(event->scenePos().x()), int(event->scenePos().y()), button, 0, 0); /// @todo m_id QGraphicsScene::mousePressEvent(event); } void QtGnuplotScene::mouseMoveEvent(QGraphicsSceneMouseEvent* event) { // Mousing for inactive widgets if (!m_widget->isActive()) { m_lineTo->hide(); QString status; if (m_axisValid[0]) status += QString("x = ") + QString::number(sceneToGraph(0,event->scenePos().x())); if (m_axisValid[1]) status += QString(" y = ") + QString::number(sceneToGraph(1,event->scenePos().y())); if (m_axisValid[2]) status += QString(" x2 = ") + QString::number(sceneToGraph(2,event->scenePos().x())); if (m_axisValid[3]) status += QString(" y2 = ") + QString::number(sceneToGraph(3,event->scenePos().y())); m_widget->setStatusText(status); QGraphicsScene::mouseMoveEvent(event); return; } m_lastMousePos = event->scenePos(); updateModifiers(); if (m_lineTo->isVisible()) { QLineF line = m_lineTo->line(); line.setP2(event->scenePos()); m_lineTo->setLine(line); } m_eventHandler->postTermEvent(GE_motion, int(event->scenePos().x()), int(event->scenePos().y()), 0, 0, 0); /// @todo m_id QGraphicsScene::mouseMoveEvent(event); } void QtGnuplotScene::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) { m_lastMousePos = event->scenePos(); updateModifiers(); int button = 0; if (event->button()== Qt::LeftButton) button = 1; else if (event->button()== Qt::MidButton) button = 2; else if (event->button()== Qt::RightButton) button = 3; // EAM FIXME - If the press/release events get out of order or if we see // a very fast double-click then the following call causes the program // to error out during event processing. Also note that I can't find // where the timers are initialized on entry - maybe a problem there? // Finally, why do we need or want a timer at all? int time = m_watches[button].elapsed(); if (time > 300) // purely empical work-around if (m_eventHandler->postTermEvent(GE_buttonrelease, int(event->scenePos().x()), int(event->scenePos().y()), button, time, 0)) m_watches[button].start(); /* Check for click in one of the keysample boxes */ int i = m_key_boxes.count(); while (i-- > 0) { if (m_key_boxes[i].contains(m_lastMousePos)) { if (m_plot_group[i]->isVisible()) { m_plot_group[i]->setVisible(false); m_key_boxes[i].setHidden(true); } else { m_plot_group[i]->setVisible(true); m_key_boxes[i].setHidden(false); } break; } } QGraphicsScene::mouseReleaseEvent(event); } /* http://developer.qt.nokia.com/doc/qt-4.8/qgraphicsscenewheelevent.html */ void QtGnuplotScene::wheelEvent(QGraphicsSceneWheelEvent* event) { updateModifiers(); if (event->orientation() == Qt::Horizontal) { // 6 = scroll left, 7 = scroll right m_eventHandler->postTermEvent(GE_buttonpress, int(event->scenePos().x()), int(event->scenePos().y()), event->delta() > 0 ? 6 : 7, 0, 0); } else { /* if (event->orientation() == Qt::Vertical) */ // 4 = scroll up, 5 = scroll down m_eventHandler->postTermEvent(GE_buttonpress, int(event->scenePos().x()), int(event->scenePos().y()), event->delta() > 0 ? 4 : 5, 0, 0); } } void QtGnuplotScene::keyPressEvent(QKeyEvent* event) { updateModifiers(); int key = -1; /// @todo quit on 'q' or Ctrl+'q' // Keypad keys if (event->modifiers() & Qt::KeypadModifier) switch (event->key()) { case Qt::Key_Space : key = GP_KP_Space ; break; case Qt::Key_Tab : key = GP_KP_Tab ; break; case Qt::Key_Enter : key = GP_KP_Enter ; break; case Qt::Key_F1 : key = GP_KP_F1 ; break; case Qt::Key_F2 : key = GP_KP_F2 ; break; case Qt::Key_F3 : key = GP_KP_F3 ; break; case Qt::Key_F4 : key = GP_KP_F4 ; break; case Qt::Key_Insert : key = GP_KP_Insert ; break; case Qt::Key_End : key = GP_KP_End ; break; case Qt::Key_Down : key = GP_KP_Down ; break; case Qt::Key_PageDown : key = GP_KP_Page_Down; break; case Qt::Key_Left : key = GP_KP_Left ; break; case Qt::Key_Right : key = GP_KP_Right ; break; case Qt::Key_Home : key = GP_KP_Home ; break; case Qt::Key_Up : key = GP_KP_Up ; break; case Qt::Key_PageUp : key = GP_KP_Page_Up ; break; case Qt::Key_Delete : key = GP_KP_Delete ; break; case Qt::Key_Equal : key = GP_KP_Equal ; break; case Qt::Key_Asterisk : key = GP_KP_Multiply ; break; case Qt::Key_Plus : key = GP_KP_Add ; break; case Qt::Key_Comma : key = GP_KP_Separator; break; case Qt::Key_Minus : key = GP_KP_Subtract ; break; case Qt::Key_Period : key = GP_KP_Decimal ; break; case Qt::Key_Slash : key = GP_KP_Divide ; break; case Qt::Key_0 : key = GP_KP_0 ; break; case Qt::Key_1 : key = GP_KP_1 ; break; case Qt::Key_2 : key = GP_KP_2 ; break; case Qt::Key_3 : key = GP_KP_3 ; break; case Qt::Key_4 : key = GP_KP_4 ; break; case Qt::Key_5 : key = GP_KP_5 ; break; case Qt::Key_6 : key = GP_KP_6 ; break; case Qt::Key_7 : key = GP_KP_7 ; break; case Qt::Key_8 : key = GP_KP_8 ; break; case Qt::Key_9 : key = GP_KP_9 ; break; } // ASCII keys else if ((event->key() <= 0xff) && (!event->text().isEmpty())) // event->key() does not respect the case key = event->text()[0].toAscii(); // Special keys else switch (event->key()) { case Qt::Key_Backspace : key = GP_BackSpace ; break; case Qt::Key_Tab : key = GP_Tab ; break; case Qt::Key_Return : key = GP_Return ; break; case Qt::Key_Escape : key = GP_Escape ; break; case Qt::Key_Delete : key = GP_Delete ; break; case Qt::Key_Pause : key = GP_Pause ; break; case Qt::Key_ScrollLock : key = GP_Scroll_Lock; break; case Qt::Key_Insert : key = GP_Insert ; break; case Qt::Key_Home : key = GP_Home ; break; case Qt::Key_Left : key = GP_Left ; break; case Qt::Key_Up : key = GP_Up ; break; case Qt::Key_Right : key = GP_Right ; break; case Qt::Key_Down : key = GP_Down ; break; case Qt::Key_PageUp : key = GP_PageUp ; break; case Qt::Key_PageDown : key = GP_PageDown ; break; case Qt::Key_End : key = GP_End ; break; case Qt::Key_Enter : key = GP_KP_Enter ; break; case Qt::Key_F1 : key = GP_F1 ; break; case Qt::Key_F2 : key = GP_F2 ; break; case Qt::Key_F3 : key = GP_F3 ; break; case Qt::Key_F4 : key = GP_F4 ; break; case Qt::Key_F5 : key = GP_F5 ; break; case Qt::Key_F6 : key = GP_F6 ; break; case Qt::Key_F7 : key = GP_F7 ; break; case Qt::Key_F8 : key = GP_F8 ; break; case Qt::Key_F9 : key = GP_F9 ; break; case Qt::Key_F10 : key = GP_F10 ; break; case Qt::Key_F11 : key = GP_F11 ; break; case Qt::Key_F12 : key = GP_F12 ; break; } if (key >= 0) m_eventHandler->postTermEvent(GE_keypress, int(m_lastMousePos.x()), int(m_lastMousePos.y()), key, 0, 0); /// @todo m_id QGraphicsScene::keyPressEvent(event); } double QtGnuplotScene::sceneToGraph(int axis, double coord) const { if (m_axisScale[axis] == 0.) return 0; double result = m_axisMin[axis] + (coord - m_axisLower[axis])/m_axisScale[axis]; if (m_axisLog[axis] > 0.) result = exp(result * m_axisLog[axis]); return result; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/qt_term.h��������������������������������������������������������������0000644�0004711�0000144�00000007516�11700652272�014737� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - qt_term.h */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ /* ------------------------------------------------------ * Declarations of the C++ functions * used in qt.trm and defined in qt_gui.cpp * ------------------------------------------------------*/ #ifndef GNUPLOT_QT_TERM_H #define GNUPLOT_QT_TERM_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ void qt_options(void); void qt_init(void); void qt_reset(void); void qt_text_wrapper(void); void qt_graphics(void); void qt_move(unsigned int x, unsigned int y); void qt_vector(unsigned int x, unsigned int y); void qt_linetype(int linetype); void qt_put_text(unsigned int x, unsigned int y, const char *str); int qt_text_angle(int ang); int qt_justify_text(enum JUSTIFY mode); void qt_point(unsigned int x, unsigned int y, int pointstyle); int qt_set_font(const char *font); void qt_pointsize(double ptsize); void qt_text(void); void qt_fillbox(int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height); void qt_linewidth(double linewidth); # ifdef USE_MOUSE int qt_waitforinput(void); void qt_put_tmptext(int, const char str[]); void qt_set_ruler(int x, int y); void qt_set_cursor(int, int, int); void qt_set_clipboard(const char s[]); # endif /* USE_MOUSE */ int qt_make_palette(t_sm_palette *palette); void qt_set_color(t_colorspec *colorspec); void qt_filled_polygon(int n, gpiPoint * corners); void qt_image(unsigned int M, unsigned int N, coordval * image, gpiPoint * corner, t_imagecolor color_mode); void qt_enhanced_open(char* fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint); void qt_enhanced_flush(); void qt_enhanced_writec(int c); void qt_layer(t_termlayer layer); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /* GNUPLOT_QT_TERM_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotScene.h�������������������������������������������������������0000644�0004711�0000144�00000010672�11700652272�016174� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotScene.h */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #ifndef QTGNUPLOTSCENE_H #define QTGNUPLOTSCENE_H #include "QtGnuplotEvent.h" #include "QtGnuplotItems.h" #include <QGraphicsScene> #include <QGraphicsItemGroup> #include <QTime> class QtGnuplotEnhanced; class QtGnuplotWidget; class QtGnuplotScene : public QGraphicsScene, public QtGnuplotEventReceiver { Q_OBJECT public: QtGnuplotScene(QtGnuplotEventHandler* eventHandler, QObject* parent = 0); public: virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event); virtual void mousePressEvent(QGraphicsSceneMouseEvent* event); virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); virtual void wheelEvent(QGraphicsSceneWheelEvent* event); virtual void keyPressEvent(QKeyEvent* event); void processEvent(QtGnuplotEventType type, QDataStream& in); private: void resetItems(); void updateModifiers(); void positionText(QGraphicsItem* item, const QPoint& point); void setBrushStyle(int style); void updateRuler(const QPoint& point); void flushCurrentPolygon(); QPolygonF& clipPolygon(QPolygonF& polygon, bool checkDiag = true) const; QPointF& clipPoint(QPointF& point) const; QRectF& clipRect(QRectF& point) const; double sceneToGraph(int axis, double coord) const; void update_key_box(const QRectF rect); private: QtGnuplotWidget* m_widget; QList <QGraphicsItemGroup*> m_plot_group; // State variables Qt::Alignment m_textAlignment; QPolygonF m_currentPolygon; QPen m_currentPen; QBrush m_currentBrush; QFont m_font; QPointF m_currentPosition; QPointF m_zoomBoxCorner; double m_currentPointSize; double m_textAngle; double m_currentZ; QTime m_watches[4]; int m_currentPlotNumber; bool m_inKeySample; bool m_preserve_visibility; QList<QGraphicsItem*> m_currentGroup; // User events data QPointF m_lastMousePos; int m_lastModifierMask; // Special items QGraphicsLineItem* m_horizontalRuler; QGraphicsLineItem* m_verticalRuler; QGraphicsLineItem* m_lineTo; // Line from ruler to cursor QGraphicsRectItem* m_zoomRect; QGraphicsTextItem* m_zoomStartText; QGraphicsTextItem* m_zoomStopText; QtGnuplotEnhanced* m_enhanced; // Current enhanced text block QList<QtGnuplotKeybox> m_key_boxes; // Axis scales bool m_axisValid[4]; double m_axisMin [4]; double m_axisLower[4]; double m_axisScale[4]; double m_axisLog [4]; }; #endif // QTGNUPLOTSCENE_H ����������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotInstance.h����������������������������������������������������0000644�0004711�0000144�00000006245�11236062134�016700� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotInstance.h */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #ifndef QTGNUPLOTINSTANCE_H #define QTGNUPLOTINSTANCE_H #include <QtCore> class QtGnuplotWidget; class QtGnuplotInstance : public QObject { Q_OBJECT public: QtGnuplotInstance(QtGnuplotWidget* widget = 0, QString gnuplotPath = "gnuplot"); ~QtGnuplotInstance(); public: /// Redirect the instance plotting to widget @p widget void setWidget(QtGnuplotWidget* widget); /// Returns the widget to which the instance plots QtGnuplotWidget* widget(); /// Send the given command to gnuplot void exec(const QByteArray& command); signals: /// Emitted when gnuplot sends data through it standards outputs void gnuplotOutput(const QString& output); private slots: void gnuplotDataReady(); private: QtGnuplotWidget* m_widget; QProcess m_gnuplot; }; /// Overloaded from QtGnuplotInstance::exec QtGnuplotInstance& operator<<(QtGnuplotInstance& instance, const QString& command); /// Overloaded from QtGnuplotInstance::exec QtGnuplotInstance& operator<<(QtGnuplotInstance& instance, const QVector<QPointF>& points); #endif // QTGNUPLOTINSTANCE_H �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/qt_term.cpp������������������������������������������������������������0000644�0004711�0000144�00000071523�12044555342�015273� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - qt_term.cpp */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #include <QtCore> #include <QtGui> #include <QtNetwork> extern "C" { #include "plot.h" // for interactive #include "term_api.h" // for stdfn.h, JUSTIFY, encoding, *term definition, color.h term_interlock #include "mouse.h" // for do_event declaration #include "getcolor.h" // for rgb functions #include "command.h" // for paused_for_mouse, PAUSE_BUTTON1 and friends #include "util.h" // for int_error #include "alloc.h" // for gp_alloc #include "parse.h" // for real_expression #include "axis.h" #include <signal.h> double removeDockIcon(); } #include "qt_term.h" #include "QtGnuplotEvent.h" #include "qt_conversion.cpp" void qt_atexit(); /*------------------------------------------------------- * Terminal options with default values *-------------------------------------------------------*/ /// @todo per-window options int qt_optionWindowId = 0; bool qt_optionEnhanced = false; bool qt_optionPersist = false; bool qt_optionRaise = true; bool qt_optionCtrl = false; bool qt_optionDash = false; int qt_optionWidth = 640; int qt_optionHeight = 480; int qt_optionFontSize = 9; QString qt_optionFontName = "Sans"; QString qt_optionTitle; QString qt_optionWidget; static const int qt_oversampling = 10; static const double qt_oversamplingF = double(qt_oversampling); /*------------------------------------------------------- * State variables *-------------------------------------------------------*/ bool qt_initialized = false; bool qt_gnuplot_qtStarted = false; bool qt_setSize = true; int qt_setWidth = qt_optionWidth; int qt_setHeight = qt_optionHeight; int qt_currentFontSize; QString qt_currentFontName; QString qt_localServerName; QTextCodec* qt_codec = QTextCodec::codecForLocale(); /* ------------------------------------------------------ * Helpers * ------------------------------------------------------*/ // Convert gnuplot coordinates into floating point term coordinates QPointF qt_termCoordF(unsigned int x, unsigned int y) { return QPointF(double(x)/qt_oversamplingF, double(term->ymax - y)/qt_oversamplingF); } // The same, but with coordinates clipped to the nearest pixel QPoint qt_termCoord(unsigned int x, unsigned int y) { return QPoint(qRound(double(x)/qt_oversamplingF), qRound(double(term->ymax - y)/qt_oversamplingF)); } // Start the GUI application void execGnuplotQt() { // Fork the GUI and exec the gnuplot_qt program in the child process pid_t pid = fork(); if (pid < 0) fprintf(stderr, "Forking error\n"); else if (pid == 0) // Child: start the GUI { // Make sure the forked copy doesn't trash the history file cancel_history(); // Start the gnuplot_qt program QString filename = getenv("GNUPLOT_DRIVER_DIR"); if (filename.isEmpty()) filename = QT_DRIVER_DIR; filename += "/gnuplot_qt"; execlp(filename.toAscii().data(), "gnuplot_qt", (char*)NULL); fprintf(stderr, "Expected Qt driver: %s\n", filename.toAscii().data()); perror("Exec failed"); exit(EXIT_FAILURE); } qt_localServerName = "qtgnuplot" + QString::number(pid); qt_gnuplot_qtStarted = true; } /*------------------------------------------------------- * Communication gnuplot -> terminal *-------------------------------------------------------*/ // Events coming from gnuplot are processed by this file // and send to the GUI by a QDataStream writing on a // QByteArray sent trough a QLocalSocket (a cross-platform IPC protocol) QLocalSocket qt_socket; QByteArray qt_outBuffer; QDataStream qt_out(&qt_outBuffer, QIODevice::WriteOnly); void qt_flushOutBuffer() { if (!qt_initialized) return; // Write the block size at the beginning of the bock QDataStream sizeStream(&qt_socket); sizeStream << (quint32)(qt_outBuffer.size()); // Write the block to the QLocalSocket qt_socket.write(qt_outBuffer); // waitForBytesWritten(-1) is supposed implement this loop, but it does not seem to work ! // update: seems to work with Qt 4.5 while (qt_socket.bytesToWrite() > 0) { qt_socket.flush(); qt_socket.waitForBytesWritten(-1); } // Reset the buffer qt_out.device()->seek(0); qt_outBuffer.clear(); } // Helper function called by qt_connectToServer() void qt_connectToServer(const QString& server, bool retry = true) { bool connectToWidget = (server != qt_localServerName); // The QLocalSocket::waitForConnected does not respect the time out argument when the // gnuplot_qt application is not yet started. To wait for it, we need to implement the timeout ourselves QDateTime timeout = QDateTime::currentDateTime().addMSecs(1000); do { qt_socket.connectToServer(server); qt_socket.waitForConnected(200); // TODO: yield CPU ? } while((qt_socket.state() != QLocalSocket::ConnectedState) && (QDateTime::currentDateTime() < timeout)); // Still not connected... if ((qt_socket.state() != QLocalSocket::ConnectedState) && retry) { // The widget could not be reached: start a gnuplot_qt program which will create a QtGnuplotApplication if (connectToWidget) { qDebug() << "Could not connect to widget" << qt_optionWidget << ". Starting a QtGnuplotApplication"; qt_optionWidget = QString(); qt_connectToServer(qt_localServerName); } // The gnuplot_qt program could not be reached: try to start a new one else { qDebug() << "Could not connect gnuplot_qt" << qt_optionWidget << ". Starting a new one"; execGnuplotQt(); qt_connectToServer(qt_localServerName, false); } } } // Called before a plot to connect to the terminal window, if needed void qt_connectToServer() { if (!qt_initialized) return; // Determine to which server we should connect bool connectToWidget = !qt_optionWidget.isEmpty(); QString server = connectToWidget ? qt_optionWidget : qt_localServerName; if (qt_socket.state() == QLocalSocket::ConnectedState) { // Check if we are already connected to the correct server if (qt_socket.serverName() == server) return; // Otherwise disconnect qt_socket.disconnectFromServer(); while (qt_socket.state() == QLocalSocket::ConnectedState) qt_socket.waitForDisconnected(1000); } // Start the gnuplot_qt helper program if not already started if (!connectToWidget && !qt_gnuplot_qtStarted) execGnuplotQt(); // Connect to the server, or local server if not available. qt_connectToServer(server); } /*------------------------------------------------------- * Communication terminal -> gnuplot *-------------------------------------------------------*/ bool qt_processTermEvent(gp_event_t* event) { // Intercepts resize event if (event->type == GE_fontprops) { qt_setSize = true; qt_setWidth = event->mx; qt_setHeight = event->my; } // Scale mouse events else { event->mx *= qt_oversampling; event->my = (qt_setHeight - event->my)*qt_oversampling; } // Send the event to gnuplot core do_event(event); // Process pause_for_mouse if ((event->type == GE_buttonrelease) && (paused_for_mouse & PAUSE_CLICK)) { int button = event->par1; if (((button == 1) && (paused_for_mouse & PAUSE_BUTTON1)) || ((button == 2) && (paused_for_mouse & PAUSE_BUTTON2)) || ((button == 3) && (paused_for_mouse & PAUSE_BUTTON3))) paused_for_mouse = 0; if (paused_for_mouse == 0) return true; } if ((event->type == GE_keypress) && (paused_for_mouse & PAUSE_KEYSTROKE) && (event->par1 > '\0')) { paused_for_mouse = 0; return true; } return false; } /* ------------------------------------------------------ * Functions called by gnuplot * ------------------------------------------------------*/ // Called before first plot after a set term command. void qt_init() { if (qt_initialized) return; // If we are not connecting to an existing QtGnuplotWidget, start a QtGnuplotApplication if (qt_optionWidget.isEmpty()) execGnuplotQt(); // Create a QApplication without event loop for QObject's that need it, namely font handling // A better strategy would be to transfer the font handling to the QtGnuplotWidget, but it would require // some synchronization between the widget and the gnuplot process. int argc = 0; QApplication* application = new QApplication(argc, (char**)( NULL)); #ifdef Q_WS_MAC // Don't display this application in the MAC OS X dock removeDockIcon(); #endif // The creation of a QApplication mangled our locale settings #ifdef HAVE_LOCALE_H setlocale(LC_NUMERIC, "C"); setlocale(LC_TIME, current_locale); #endif qt_out.setVersion(QDataStream::Qt_4_4); qt_initialized = true; term_interlock = (void *)qt_init; GP_ATEXIT(qt_atexit); } // Called just before a plot is going to be displayed. void qt_graphics() { qt_out << GEDesactivate; qt_flushOutBuffer(); qt_connectToServer(); // Set text encoding if (!(qt_codec = qt_encodingToCodec(encoding))) qt_codec = QTextCodec::codecForLocale(); // Set font qt_currentFontSize = qt_optionFontSize; qt_currentFontName = qt_optionFontName; // Set plot metrics QFontMetrics metrics(QFont(qt_currentFontName, qt_currentFontSize)); term->v_char = qt_oversampling * (metrics.ascent() + metrics.descent()); term->h_char = qt_oversampling * metrics.width("0123456789")/10.; term->v_tic = (unsigned int) (term->v_char/2.5); term->h_tic = (unsigned int) (term->v_char/2.5); if (qt_setSize) { term->xmax = qt_oversampling*qt_setWidth; term->ymax = qt_oversampling*qt_setHeight; qt_setSize = false; } // Initialize window qt_out << GESetCurrentWindow << qt_optionWindowId; qt_out << GEInitWindow; qt_out << GEActivate; qt_out << GETitle << qt_optionTitle; qt_out << GESetCtrl << qt_optionCtrl; qt_out << GESetWidgetSize << QSize(term->xmax, term->ymax)/qt_oversampling; // Initialize the scene qt_out << GESetSceneSize << QSize(term->xmax, term->ymax)/qt_oversampling; qt_out << GEClear; // Initialize the font qt_out << GESetFont << qt_currentFontName << qt_currentFontSize; } // Called after plotting is done void qt_text() { if (qt_optionRaise) qt_out << GERaise; qt_out << GEDone; qt_flushOutBuffer(); } void qt_text_wrapper() { // Remember scale to update the status bar while the plot is inactive qt_out << GEScale; const int axis_order[4] = {FIRST_X_AXIS, FIRST_Y_AXIS, SECOND_X_AXIS, SECOND_Y_AXIS}; for (int i = 0; i < 4; i++) { qt_out << (axis_array[axis_order[i]].ticmode != NO_TICS); // Axis active or not qt_out << axis_array[axis_order[i]].min; double lower = double(axis_array[axis_order[i]].term_lower); double scale = double(axis_array[axis_order[i]].term_scale); // Reverse the y axis if (i % 2) { lower = term->ymax - lower; scale *= -1; } qt_out << lower/qt_oversamplingF << scale/qt_oversamplingF; qt_out << (axis_array[axis_order[i]].log ? axis_array[axis_order[i]].log_base : 0.); } qt_text(); } void qt_reset() { /// @todo } void qt_move(unsigned int x, unsigned int y) { qt_out << GEMove << qt_termCoordF(x, y); } void qt_vector(unsigned int x, unsigned int y) { qt_out << GEVector << qt_termCoordF(x, y); } bool qt_enhancedSymbol = false; QString qt_enhancedFontName; double qt_enhancedFontSize; double qt_enhancedBase; bool qt_enhancedWidthFlag; bool qt_enhancedShowFlag; int qt_enhancedOverprint; QByteArray qt_enhancedText; void qt_enhanced_flush() { qt_out << GEEnhancedFlush << qt_enhancedFontName << qt_enhancedFontSize << qt_enhancedBase << qt_enhancedWidthFlag << qt_enhancedShowFlag << qt_enhancedOverprint << qt_codec->toUnicode(qt_enhancedText); qt_enhancedText.clear(); } void qt_enhanced_writec(int c) { if (qt_enhancedSymbol) qt_enhancedText.append(qt_codec->fromUnicode(qt_symbolToUnicode(c))); else qt_enhancedText.append(char(c)); } void qt_enhanced_open(char* fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { qt_enhancedFontName = fontname; if (qt_enhancedFontName.toLower() == "symbol") { qt_enhancedSymbol = true; qt_enhancedFontName = "Sans"; } else qt_enhancedSymbol = false; qt_enhancedFontSize = fontsize; qt_enhancedBase = base; qt_enhancedWidthFlag = widthflag; qt_enhancedShowFlag = showflag; qt_enhancedOverprint = overprint; } void qt_put_text(unsigned int x, unsigned int y, const char* string) { // if ignore_enhanced_text is set, draw with the normal routine. // This is meant to avoid enhanced syntax when the enhanced mode is on if (!qt_optionEnhanced || ignore_enhanced_text) { /// @todo Symbol font to unicode /// @todo bold, italic qt_out << GEPutText << qt_termCoord(x, y) << qt_codec->toUnicode(string); return; } // Uses enhanced_recursion() to analyse the string to print. // enhanced_recursion() calls _enhanced_open() to initialize the text drawing, // then it calls _enhanced_writec() which buffers the characters to draw, // and finally _enhanced_flush() to draw the buffer with the correct justification. // set up the global variables needed by enhanced_recursion() enhanced_fontscale = 1.0; strncpy(enhanced_escape_format, "%c", sizeof(enhanced_escape_format)); // Set the recursion going. We say to keep going until a closing brace, but // we don't really expect to find one. If the return value is not the nul- // terminator of the string, that can only mean that we did find an unmatched // closing brace in the string. We increment past it (else we get stuck // in an infinite loop) and try again. while (*(string = enhanced_recursion((char*)string, TRUE, qt_currentFontName.toUtf8().data(), qt_currentFontSize, 0.0, TRUE, TRUE, 0))) { qt_enhanced_flush(); enh_err_check(string); // we can only get here if *str == '}' if (!*++string) break; // end of string // else carry on and process the rest of the string } qt_out << GEEnhancedFinish << qt_termCoord(x, y); } void qt_linetype(int lt) { if (lt <= LT_NODRAW) lt = LT_NODRAW; // background color if (lt == -1) qt_out << GEPenStyle << Qt::DotLine; else if (qt_optionDash && lt > 0) { Qt::PenStyle style; style = (lt%4 == 1) ? Qt::DashLine : (lt%4 == 2) ? Qt::DashDotLine : (lt%4 == 3) ? Qt::DashDotDotLine : Qt::SolidLine ; qt_out << GEPenStyle << style; } else qt_out << GEPenStyle << Qt::SolidLine; if ((lt-1) == LT_BACKGROUND) { /* FIXME: Add parameter to this API to set the background color from the gnuplot end */ qt_out << GEBackgroundColor; } else qt_out << GEPenColor << qt_colorList[lt % 9 + 3]; } int qt_set_font (const char* font) { int qt_previousFontSize = qt_currentFontSize; QString qt_previousFontName = qt_currentFontName; if (font && (*font)) { QStringList list = QString(font).split(','); if (list.size() > 0) qt_currentFontName = list[0]; if (list.size() > 1) qt_currentFontSize = list[1].toInt(); } else { qt_currentFontSize = qt_optionFontSize; qt_currentFontName = qt_optionFontName; } if (qt_currentFontName.isEmpty()) qt_currentFontName = qt_optionFontName; if (qt_currentFontSize <= 0) qt_currentFontSize = qt_optionFontSize; /* Optimize by leaving early if there is no change */ if (qt_currentFontSize == qt_previousFontSize && qt_currentFontName == qt_currentFontName) { return 1; } qt_out << GESetFont << qt_currentFontName << qt_currentFontSize; /* Update the font size as seen by the core gnuplot code */ QFontMetrics metrics(QFont(qt_currentFontName, qt_currentFontSize)); term->v_char = qt_oversampling * (metrics.ascent() + metrics.descent()); term->h_char = qt_oversampling * metrics.width("0123456789")/10.; return 1; } int qt_justify_text(enum JUSTIFY mode) { if (mode == LEFT) qt_out << GETextAlignment << Qt::AlignLeft; else if (mode == RIGHT) qt_out << GETextAlignment << Qt::AlignRight; else if (mode == CENTRE) qt_out << GETextAlignment << Qt::AlignCenter; return 1; // We can justify } void qt_point(unsigned int x, unsigned int y, int pointstyle) { qt_out << GEPoint << qt_termCoordF(x, y) << pointstyle; } void qt_pointsize(double ptsize) { if (ptsize < 0.) ptsize = 1.; // same behaviour as x11 terminal qt_out << GEPointSize << ptsize; } void qt_linewidth(double lw) { qt_out << GELineWidth << lw; } int qt_text_angle(int angle) { qt_out << GETextAngle << double(angle); return 1; // 1 means we can rotate } void qt_fillbox(int style, unsigned int x, unsigned int y, unsigned int width, unsigned int height) { qt_out << GEBrushStyle << style; qt_out << GEFillBox << QRect(qt_termCoord(x, y + height), QSize(width, height)/qt_oversampling); } int qt_make_palette(t_sm_palette* palette) { return 0; // We can do continuous colors } void qt_set_color(t_colorspec* colorspec) { if (colorspec->type == TC_LT) qt_linetype(colorspec->lt); else if (colorspec->type == TC_FRAC) { rgb_color rgb; rgb1maxcolors_from_gray(colorspec->value, &rgb); QColor color; color.setRgbF(rgb.r, rgb.g, rgb.b); qt_out << GEPenColor << color; } else if (colorspec->type == TC_RGB) qt_out << GEPenColor << QColor(QRgb(colorspec->lt)); } void qt_filled_polygon(int n, gpiPoint *corners) { QPolygonF polygon; for (int i = 0; i < n; i++) polygon << qt_termCoordF(corners[i].x, corners[i].y); qt_out << GEBrushStyle << corners->style; qt_out << GEFilledPolygon << polygon; } void qt_image(unsigned int M, unsigned int N, coordval* image, gpiPoint* corner, t_imagecolor color_mode) { QImage qimage = qt_imageToQImage(M, N, image, color_mode); qt_out << GEImage; for (int i = 0; i < 4; i++) qt_out << qt_termCoord(corner[i].x, corner[i].y); qt_out << qimage; } #ifdef USE_MOUSE // Display temporary text, after // erasing any temporary text displayed previously at this location. // The int determines where: 0=statusline, 1,2: at corners of zoom // box, with \r separating text above and below the point. void qt_put_tmptext(int n, const char str[]) { if (n == 0) qt_out << GEStatusText << QString(str); else if (n == 1) qt_out << GEZoomStart << QString(str); else if (n == 2) qt_out << GEZoomStop << QString(str); qt_flushOutBuffer(); } void qt_set_cursor(int c, int x, int y) { // Cancel zoombox when Echap is pressed if (c == 0) qt_out << GEZoomStop << QString(); if (c == -4) qt_out << GELineTo << false; else if (c == -3) qt_out << GELineTo << true; else if (c == -2) // warp the pointer to the given position qt_out << GEWrapCursor << qt_termCoord(x, y); else if (c == -1) // start zooming qt_out << GECursor << Qt::SizeFDiagCursor; else if (c == 1) // Rotation qt_out << GECursor << Qt::ClosedHandCursor; else if (c == 2) // Rescale qt_out << GECursor << Qt::SizeAllCursor; else if (c == 3) // Zoom qt_out << GECursor << Qt::SizeFDiagCursor; else qt_out << GECursor << Qt::CrossCursor; qt_flushOutBuffer(); } void qt_set_ruler(int x, int y) { qt_out << GERuler << qt_termCoord(x, y); qt_flushOutBuffer(); } void qt_set_clipboard(const char s[]) { qt_out << GECopyClipboard << s; qt_flushOutBuffer(); } #endif // USE_MOUSE int qt_waitforinput(void) { #ifdef USE_MOUSE fd_set read_fds; int stdin_fd = fileno(stdin); int socket_fd = qt_socket.socketDescriptor(); if (!qt_initialized || (socket_fd < 0) || (qt_socket.state() != QLocalSocket::ConnectedState)) return getchar(); // Gnuplot event loop do { // Watch file descriptors FD_ZERO(&read_fds); FD_SET(socket_fd, &read_fds); if (!paused_for_mouse) FD_SET(stdin_fd, &read_fds); // Wait for input if (select(socket_fd+1, &read_fds, NULL, NULL, NULL) < 0) { // Display the error message except when Ctrl + C is pressed if (errno != 4) fprintf(stderr, "Qt terminal communication error: select() error %i %s\n", errno, strerror(errno)); break; } // Terminal event coming if (FD_ISSET(socket_fd, &read_fds)) { qt_socket.waitForReadyRead(-1); // Temporary event for mouse move events. If several consecutive move events // are received, only transmit the last one. gp_event_t tempEvent; tempEvent.type = -1; while (qt_socket.bytesAvailable() >= sizeof(gp_event_t)) { struct gp_event_t event; qt_socket.read((char*) &event, sizeof(gp_event_t)); // Delay move events if (event.type == GE_motion) tempEvent = event; // Other events. Replay the last move event if present else { if (tempEvent.type == GE_motion) { qt_processTermEvent(&tempEvent); tempEvent.type = -1; } if (qt_processTermEvent(&event)) return '\0'; // exit from paused_for_mouse } } // Replay move event if (tempEvent.type == GE_motion) qt_processTermEvent(&tempEvent); } } while (paused_for_mouse || (!paused_for_mouse && !FD_ISSET(stdin_fd, &read_fds))); #endif return getchar(); } /*------------------------------------------------------- * Misc *-------------------------------------------------------*/ void qt_atexit() { if (qt_optionPersist || persist_cl) { qt_out << GEDesactivate; qt_out << GEPersist; } else qt_out << GEExit; qt_flushOutBuffer(); qt_initialized = false; } /*------------------------------------------------------- * Term options *-------------------------------------------------------*/ enum QT_id { QT_WIDGET, QT_FONT, QT_ENHANCED, QT_NOENHANCED, QT_SIZE, QT_PERSIST, QT_NOPERSIST, QT_RAISE, QT_NORAISE, QT_CTRL, QT_NOCTRL, QT_TITLE, QT_CLOSE, QT_DASH, QT_SOLID, QT_OTHER }; static struct gen_table qt_opts[] = { {"$widget", QT_WIDGET}, {"font", QT_FONT}, {"enh$anced", QT_ENHANCED}, {"noenh$anced", QT_NOENHANCED}, {"s$ize", QT_SIZE}, {"per$sist", QT_PERSIST}, {"noper$sist", QT_NOPERSIST}, {"rai$se", QT_RAISE}, {"norai$se", QT_NORAISE}, {"ct$rlq", QT_CTRL}, {"noct$rlq", QT_NOCTRL}, {"ti$tle", QT_TITLE}, {"cl$ose", QT_CLOSE}, {"dash$ed", QT_DASH}, {"solid", QT_SOLID}, {NULL, QT_OTHER} }; // Called when terminal type is selected. // This procedure should parse options on the command line. // A list of the currently selected options should be stored in term_options[], // in a form suitable for use with the set term command. // term_options[] is used by the save command. Use options_null() if no options are available." * void qt_options() { char *s = NULL; QString fontSettings; bool duplication = false; bool set_enhanced = false, set_font = false; bool set_persist = false, set_number = false; bool set_raise = false, set_ctrl = false; bool set_title = false, set_close = false; bool set_size = false; bool set_widget = false; bool set_dash = false; if (term_interlock != NULL && term_interlock != (void *)qt_init) { term = NULL; int_error(NO_CARET, "The qt terminal cannot be used in a wxt session"); } #define SETCHECKDUP(x) { c_token++; if (x) duplication = true; x = true; } while (!END_OF_COMMAND) { FPRINTF((stderr, "processing token\n")); switch (lookup_table(&qt_opts[0], c_token)) { case QT_WIDGET: SETCHECKDUP(set_widget); if (!(s = try_to_get_string())) int_error(c_token, "widget: expecting string"); if (*s) qt_optionWidget = QString(s); free(s); break; case QT_FONT: SETCHECKDUP(set_font); if (!(s = try_to_get_string())) int_error(c_token, "font: expecting string"); if (*s) { fontSettings = QString(s); QStringList list = fontSettings.split(','); if ((list.size() > 0) && !list[0].isEmpty()) qt_optionFontName = list[0]; if ((list.size() > 1) && (list[1].toInt() > 0)) qt_optionFontSize = list[1].toInt(); } free(s); break; case QT_ENHANCED: SETCHECKDUP(set_enhanced); qt_optionEnhanced = true; term->flags |= TERM_ENHANCED_TEXT; break; case QT_NOENHANCED: SETCHECKDUP(set_enhanced); qt_optionEnhanced = false; term->flags &= ~TERM_ENHANCED_TEXT; break; case QT_SIZE: SETCHECKDUP(set_size); if (END_OF_COMMAND) int_error(c_token, "size requires 'width,heigth'"); qt_optionWidth = real_expression(); if (!equals(c_token++, ",")) int_error(c_token, "size requires 'width,heigth'"); qt_optionHeight = real_expression(); if (qt_optionWidth < 1 || qt_optionHeight < 1) int_error(c_token, "size is out of range"); break; case QT_PERSIST: SETCHECKDUP(set_persist); qt_optionPersist = true; break; case QT_NOPERSIST: SETCHECKDUP(set_persist); qt_optionPersist = false; break; case QT_RAISE: SETCHECKDUP(set_raise); qt_optionRaise = true; break; case QT_NORAISE: SETCHECKDUP(set_raise); qt_optionRaise = false; break; case QT_CTRL: SETCHECKDUP(set_ctrl); qt_optionCtrl = true; break; case QT_NOCTRL: SETCHECKDUP(set_ctrl); qt_optionCtrl = false; break; case QT_TITLE: SETCHECKDUP(set_title); if (!(s = try_to_get_string())) int_error(c_token, "title: expecting string"); if (*s) qt_optionTitle = qt_codec->toUnicode(s); free(s); break; case QT_CLOSE: SETCHECKDUP(set_close); break; case QT_DASH: SETCHECKDUP(set_dash); qt_optionDash = true; break; case QT_SOLID: SETCHECKDUP(set_dash); qt_optionDash = false; break; case QT_OTHER: default: qt_optionWindowId = int_expression(); qt_optionWidget = ""; if (set_number) duplication = true; set_number = true; break; } if (duplication) int_error(c_token-1, "Duplicated or contradicting arguments in qt term options."); } // Save options back into options string in normalized format QString termOptions = QString::number(qt_optionWindowId); /* Initialize user-visible font setting */ fontSettings = qt_optionFontName + "," + QString::number(qt_optionFontSize); if (set_title) { termOptions += " title \"" + qt_optionTitle + '"'; if (qt_initialized) qt_out << GETitle << qt_optionTitle; } if (set_size) { termOptions += " size " + QString::number(qt_optionWidth) + ", " + QString::number(qt_optionHeight); qt_setSize = true; qt_setWidth = qt_optionWidth; qt_setHeight = qt_optionHeight; } if (set_enhanced) termOptions += qt_optionEnhanced ? " enhanced" : " noenhanced"; termOptions += " font \"" + fontSettings + '"'; if (set_dash) termOptions += qt_optionDash ? " dashed" : " solid"; if (set_widget) termOptions += " widget \"" + qt_optionWidget + '"'; if (set_persist) termOptions += qt_optionPersist ? " persist" : " nopersist"; if (set_raise) termOptions += qt_optionRaise ? " raise" : " noraise"; if (set_ctrl) termOptions += qt_optionCtrl ? " ctrl" : " noctrl"; if (set_close && qt_initialized) qt_out << GECloseWindow << qt_optionWindowId; /// @bug change Utf8 to local encoding strncpy(term_options, termOptions.toUtf8().data(), MAX_LINE_LEN); } void qt_layer( t_termlayer syncpoint ) { static int current_plotno = 0; /* We must ignore all syncpoints that we don't recognize */ switch (syncpoint) { case TERM_LAYER_BEFORE_PLOT: current_plotno++; qt_out << GEPlotNumber << current_plotno; break; case TERM_LAYER_AFTER_PLOT: qt_out << GEPlotNumber << 0; break; case TERM_LAYER_RESET: case TERM_LAYER_RESET_PLOTNO: if (!multiplot) current_plotno = 0; break; case TERM_LAYER_BEGIN_KEYSAMPLE: qt_out << GELayer << QTLAYER_BEGIN_KEYSAMPLE; break; case TERM_LAYER_END_KEYSAMPLE: qt_out << GELayer << QTLAYER_END_KEYSAMPLE; break; case TERM_LAYER_BEFORE_ZOOM: qt_out << GELayer << QTLAYER_BEFORE_ZOOM; break; default: break; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotSettings.ui���������������������������������������������������0000644�0004711�0000144�00000006155�11700652272�017126� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>settingsDialog</class> <widget class="QDialog" name="settingsDialog"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>271</width> <height>97</height> </rect> </property> <property name="windowTitle"> <string>Terminal configuration</string> </property> <property name="windowIcon"> <iconset resource="QtGnuplotResource.qrc"> <normaloff>:/images/settings</normaloff>:/images/settings</iconset> </property> <layout class="QVBoxLayout" name="verticalLayout_2"> <item> <layout class="QVBoxLayout" name="verticalLayout"> <item> <layout class="QHBoxLayout" name="horizontalLayout"> <item> <widget class="QPushButton" name="backgroundButton"> <property name="text"> <string>Select background color</string> </property> </widget> </item> <item> <spacer name="horizontalSpacer"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> <item> <widget class="QLabel" name="sampleColorLabel"> <property name="text"> <string>Sample</string> </property> </widget> </item> </layout> </item> <item> <widget class="QCheckBox" name="antialiasCheckBox"> <property name="text"> <string>Antialias</string> </property> </widget> </item> <item> <widget class="QCheckBox" name="replotOnResizeCheckBox"> <property name="text"> <string>Replot on resize</string> </property> </widget> </item> <item> <widget class="QCheckBox" name="roundedCheckBox"> <property name="text"> <string>Rounded line ends</string> </property> </widget> </item> </layout> </item> <item> <widget class="QDialogButtonBox" name="buttonBox"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> <property name="standardButtons"> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> </property> </widget> </item> </layout> </widget> <resources> <include location="QtGnuplotResource.qrc"/> </resources> <connections> <connection> <sender>buttonBox</sender> <signal>accepted()</signal> <receiver>settingsDialog</receiver> <slot>accept()</slot> <hints> <hint type="sourcelabel"> <x>248</x> <y>254</y> </hint> <hint type="destinationlabel"> <x>157</x> <y>274</y> </hint> </hints> </connection> <connection> <sender>buttonBox</sender> <signal>rejected()</signal> <receiver>settingsDialog</receiver> <slot>reject()</slot> <hints> <hint type="sourcelabel"> <x>316</x> <y>260</y> </hint> <hint type="destinationlabel"> <x>286</x> <y>274</y> </hint> </hints> </connection> </connections> </ui> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/QtGnuplotWindow.h������������������������������������������������������0000644�0004711�0000144�00000005540�11235013661�016400� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotWindow.h */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #ifndef QTGNUPLOTWINDOW_H #define QTGNUPLOTWINDOW_H #include "QtGnuplotEvent.h" #include <QMainWindow> class QToolBar; class QtGnuplotWidget; class QtGnuplotWindow : public QMainWindow, public QtGnuplotEventReceiver { Q_OBJECT public: QtGnuplotWindow(int id, QtGnuplotEventHandler* eventHandler = 0, QWidget* parent = 0); public: virtual void keyPressEvent(QKeyEvent* event); void processEvent(QtGnuplotEventType type, QDataStream& in); public slots: void on_setStatusText(const QString& status); void on_keyAction(); private: void createAction(const QString& name, int key, const QString& icon); private: bool m_ctrl; int m_id; QToolBar* m_toolBar; QtGnuplotWidget* m_widget; }; #endif // QTGNUPLOTWINDOW_H ����������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/qtterminal/Makefile.am������������������������������������������������������������0000644�0004711�0000144�00000000765�11752300770�015146� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign # here are listed all the qtterminal files that go to the distribution EXTRA_DIST = qt_term.h qt_conversion.cpp QtGnuplot.pro QtGnuplotWindow.h \ QtGnuplotApplication.h QtGnuplotWidget.h QtGnuplotScene.h QtGnuplotEvent.h \ QtGnuplotItems.h QtGnuplotSettings.ui QtGnuplotResource.qrc \ QtGnuplotInstance.cpp QtGnuplotInstance.h gnuplot_qt.cpp \ README.Qt embed_example.cpp embed_example.h \ images po �����������gnuplot-4.6.4/src/qtterminal/QtGnuplotEvent.h�������������������������������������������������������0000644�0004711�0000144�00000011634�11706050702�016213� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - QtGnuplotEvent.h */ /*[ * Copyright 2009 Jérôme Lodewyck * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. * * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish to allow * use of your version of this file only under the terms of the GPL and not * to allow others to use your version of this file under the above gnuplot * license, indicate your decision by deleting the provisions above and replace * them with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the GPL or the gnuplot license. ]*/ #ifndef QTGNUPLOTEVENT_H #define QTGNUPLOTEVENT_H #include <QObject> extern "C" { #include "../mousecmn.h" #ifndef GNUPLOT_TERM_API_H typedef enum t_fillstyle { FS_EMPTY, FS_SOLID, FS_PATTERN, FS_DEFAULT, FS_TRANSPARENT_SOLID, FS_TRANSPARENT_PATTERN } t_fillstyle; #endif } // Defines events used to communicate from qt_term.cpp to the GUI elements enum QtGnuplotEventType { // Events for QtGnuplotApplication GESetCurrentWindow = 1000, GEInitWindow, GECloseWindow, GEExit, GEPersist, // Events for QtGnuplotWindow GEStatusText, GETitle, GESetCtrl, // Events for QtGnuplotWidget GESetWidgetSize, GECursor, // Events for QtGnuplotScene GEPenColor, GEBackgroundColor, GEBrushStyle, GEPenStyle, GEPointSize, GELineWidth, GEFillBox, GEPutText, GEFilledPolygon, GETextAngle, GETextAlignment, GEPoint, GEClear, GEZoomStart, GEZoomStop, GERuler, GECopyClipboard, GEMove, GEVector, GELineTo, GESetFont, GEEnhancedFlush, GEEnhancedFinish, GEImage, GESetSceneSize, GERaise, GEWrapCursor, GEScale, GEActivate, GEDesactivate, GELayer, GEPlotNumber, GEDone }; enum QtGnuplotLayer { QTLAYER_BEGIN_KEYSAMPLE, QTLAYER_END_KEYSAMPLE, QTLAYER_BEFORE_ZOOM }; class QLocalServer; class QLocalSocket; class QtGnuplotEventHandler; /** * A GUI object that wishes to receive gnuplot events has to inherit from * this class and implement the processEvent function. The object is * registered as the main receiver upon creation of a QtGnuplotEventHandler object * For a given communication channel, only one QtGnuplotEventHandler should * be created, hence only one main receiver should be registered. */ class QtGnuplotEventReceiver { public: virtual void processEvent(QtGnuplotEventType type, QDataStream& in) = 0; void swallowEvent(QtGnuplotEventType type, QDataStream& in); QString serverName(); virtual ~QtGnuplotEventReceiver() {} protected: QtGnuplotEventHandler* m_eventHandler; }; /** * The QtGnuplotEventHandler is responsible for passing message between * Gnuplot and the GUI. It is shared between GUI objects. Its parent is * the main GUI object that processes events and distribute them to other objects. * Events are passed through a QLocalSocket (a crossplatform pipe-like IPC mechanism) * between Gnuplot core and the event handler. */ class QtGnuplotEventHandler : public QObject { Q_OBJECT public: QtGnuplotEventHandler(QObject* parent, const QString& socket); public: /// Send an event from the GUI elements to gnuplot core bool postTermEvent(int type, int mx, int my, int par1, int par2, int winid); QString serverName(); signals: void connected(); void disconnected(); private slots: void newConnection(); void readEvent(); void connectionClosed(); private: void init(const QString& inSocket); private: QLocalServer* m_server; QLocalSocket* m_socket; quint32 m_blockSize; }; #endif // QTGNUPLOTEVENT_H ����������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/template.h������������������������������������������������������������������������0000644�0004711�0000144�00000003467�10037021062�012705� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: template.h,v 1.4 2004/04/13 17:24:02 broeker Exp $ */ /* GNUPLOT - template.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_TEMPLATE_H # define GNUPLOT_TEMPLATE_H /* #if... / #include / #define collection: */ /* Type definitions */ /* Variables of template.c needed by other modules: */ /* Prototypes of functions exported by template.c */ #endif /* GNUPLOT_TEMPLATE_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/gplt_x11.h������������������������������������������������������������������������0000644�0004711�0000144�00000007131�11162550412�012527� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GNUPLOT - gplt_x11.h */ /*[ * Copyright 2000 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_GPLT_X11_H #define GNUPLOT_GPLT_X11_H #if defined(HAVE_SYS_SELECT_H) && !defined(VMS) # include <sys/select.h> #endif #ifndef FD_SET # define FD_SET(n, p) ((p)->fds_bits[0] |= (1 << ((n) % 32))) # define FD_CLR(n, p) ((p)->fds_bits[0] &= ~(1 << ((n) % 32))) # define FD_ISSET(n, p) ((p)->fds_bits[0] & (1 << ((n) % 32))) # define FD_ZERO(p) memset((char *)(p), '\0', sizeof(*(p))) #endif /* not FD_SET */ #define X11_COMMAND_BUFFER_LENGTH 1024 /* The endian value sent across the pipe can't have '\n' or '\0' within. */ #define ENDIAN_VALUE 0x50515253 #define X11_GR_CHECK_ENDIANESS 'B' #define X11_GR_MAKE_PALETTE 'p' #define X11_GR_RELEASE_PALETTE 'e' #define X11_GR_SET_COLOR 'k' #define X11_GR_BINARY_COLOR 'c' #define X11_GR_SET_RGBCOLOR 'g' #define X11_GR_SET_LINECOLOR 'l' #define X11_GR_FILLED_POLYGON 'I' #define X11_GR_BINARY_POLYGON 'f' #define X11_GR_IMAGE 'i' #ifdef EXTERNAL_X11_WINDOW #define X11_GR_SET_WINDOW_ID 'w' #endif /* One character for function code, and perhaps one or two for the core * routine to do something strange with end of buffer. So shorten by a * few by trial and error. */ #define BINARY_MAX_CHAR_PER_TRANSFER (X11_COMMAND_BUFFER_LENGTH-3) /* Encoding character for removing '\n' and '\0' from data stream. * The strategy is as follows, we pick a character half way between * '\0' and '\n'. Then the encoded characters occupy a range * of 10. Next, by observing statistics of the occurrances * of the encoded characters in the binary data, the translation * character is chosen so that these encoded characters are moved * to locations having the least occurances of bytes. */ #define SET_COLOR_CODE_CHAR 5 #define FILLED_POLYGON_CODE_CHAR 5 #define IMAGE_CODE_CHAR 1 /* Translation value for making '\0', '\n' and the CODE_CHAR * less prevalent in the encoded data. */ #define SET_COLOR_TRANSLATION_CHAR 3 #define FILLED_POLYGON_TRANSLATION_CHAR -13 #define IMAGE_TRANSLATION_CHAR 45 /* Maximum image plane value of data transfer. */ #define IMAGE_PALETTE_VALUE_MAX USHRT_MAX #endif /* GNUPLOT_GPLT_X11_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/hidden3d.h������������������������������������������������������������������������0000644�0004711�0000144�00000004651�11417511023�012554� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: hidden3d.h,v 1.12 2010/07/15 04:44:03 sfeam Exp $ */ /* GNUPLOT - hidden3d.h */ /*[ * Copyright 1999, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_HIDDEN3D_H # define GNUPLOT_HIDDEN3D_H /* #if... / #include / #define collection: */ #include "syscfg.h" #include "stdfn.h" #include "graph3d.h" #include "util3d.h" /* Type definitions */ #define PT_ARROWHEAD -10 #define PT_BACKARROW -11 /* Variables of hidden3d.c needed by other modules: */ extern TBOOLEAN disable_mouse_z; /* Prototypes of functions exported by hidden3d.c */ void set_hidden3doptions __PROTO((void)); void show_hidden3doptions __PROTO((void)); void reset_hidden3doptions __PROTO((void)); void save_hidden3doptions __PROTO((FILE *fp)); void init_hidden_line_removal __PROTO((void)); void reset_hidden_line_removal __PROTO((void)); void term_hidden_line_removal __PROTO((void)); void plot3d_hidden __PROTO((struct surface_points *plots, int pcount)); void draw_line_hidden __PROTO((p_vertex, p_vertex, lp_style_type *)); #endif /* GNUPLOT_HIDDEN3D_H */ ���������������������������������������������������������������������������������������gnuplot-4.6.4/src/os9.c�����������������������������������������������������������������������������0000644�0004711�0000144�00000011505�10100723235�011571� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* $Id: os9.c,v 1.4 2004/07/25 12:25:01 broeker Exp $ */ /* GNUPLOT - os9.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * Some Unix like functions that gnuplot uses. * Original sources from the blars lib. */ #include <stdio.h> #include <modes.h> #include <direct.h> #include <sgstat.h> #ifdef PIPES /* Original version by Robert A. Larson */ /* Adapted by M.N. Schipper */ #include <string.h> #include <module.h> extern char *_environ; extern int os9fork(); extern mh_com *modlink(); extern mh_com *modloadp(); static int proc[_NFILE]; static mh_com *loadmods[_NFILE]; FILE * popen(char *command, char *mode) { int temp, fd; FILE *pipe; char *argv[4]; char *cp; mh_com *mod; int linked = 0; if(mode[1]!='\0' || (*mode!='r' && *mode!='w')) return (FILE *)NULL; fd = (*mode=='r'); if((temp = dup(fd)) <= 0) return (FILE *)NULL; if((pipe = fopen("/pipe", "r+")) == NULL) { close(temp); return (FILE *)NULL; } close(fd); dup(fileno(pipe)); if (strrchr (command, '/') == NULL) mod = modlink (command, 0); else mod = (mh_com *) -1; if (mod == (mh_com *) -1) loadmods[fileno(pipe)] = mod = modloadp (command, 0, NULL); else { linked = 1; loadmods[fileno(pipe)] = (mh_com *) -1; } argv[0] = "shell"; if (mod != (mh_com *) -1) { argv[1] = "ex"; argv[2] = command; argv[3] = (char *)NULL; } else { argv[1] = command; argv[2] = (char *)NULL; } if((proc[fileno(pipe)] = os9exec(os9fork, argv[0], argv, _environ, 0, 0)) < 0) { fclose(pipe); pipe = NULL; } close(fd); dup(temp); close(temp); if (linked && mod != (mh_com *) -1) munlink (mod); return pipe; } int pclose(FILE *pipe) { int p, stat, w; if((p = proc[fileno(pipe)]) <= 0) return -1; proc[fileno(pipe)] = 0; fflush(pipe); if (loadmods[fileno(pipe)] != (mh_com *) -1) munlink (loadmods[fileno(pipe)]); fclose(pipe); while((w=wait(&stat)) != -1 && w!=p) ; /* do nothing */ return w==-1 ? -1 : stat; } #endif /* PIPES */ int isatty(int f) { struct sgbuf sgbuf; if(_gs_opt(f, &sgbuf) < 0) return -1; return sgbuf.sg_class == 0; } char * getwd(char *p) { char *cp; struct dirent *dp; int l, olddot = 0, i, d, dot, dotdot; struct dirent db[8]; char buf[1024]; cp = &buf[1024-1]; *cp = '\0'; for(;;) { if((d = open(".", S_IREAD | S_IFDIR)) < 0) { if(*cp) chdir(cp+1); return NULL; } if((i = read(d, (char *)db, sizeof(db))) == 0) { if(*cp) chdir(cp+1); close(d); return NULL; } dotdot = db[0].dir_addr; dot = db[1].dir_addr; if(olddot) { i -= 2 * sizeof(struct dirent); dp = &db[2]; for(;;) { if(i <= 0) { if((i = read(d, (char *) db, sizeof(db))) == 0) { if(*cp) chdir(cp+1); close(d); return NULL; } dp = &db[0]; } if(olddot == dp->dir_addr) { l = strlen(dp->dir_name); /* last character has parity bit set... */ *--cp = dp->dir_name[--l] & 0x7f; while(l) *--cp = dp->dir_name[--l]; *--cp = '/'; break; } i -= sizeof(struct dirent); dp++; } } if(dot==dotdot) { if(*cp) chdir(cp+1); *p = '/'; if(_gs_devn(d, p+1) < 0) { close(d); return NULL; } close(d); strcat(p, cp); return p; } close(d); if(chdir("..") != 0) { if(*cp) chdir(cp+1); return NULL; } olddot = dot; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/bitmap.c��������������������������������������������������������������������������0000644�0004711�0000144�00000157157�11107622516�012361� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: bitmap.c,v 1.26 2008/11/15 19:38:54 sfeam Exp $"); } #endif /* GNUPLOT - bitmap.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Original Software: * Jyrki Yli-Nokari <jty@intrin.UUCP> * Ronald J. Hartranft <rjh2@ns.cc.lehigh.edu> * Russell Lang <rjl@monu1.cc.monash.edu.au> */ /* ** General raster plotting routines. ** Raster routines written and copyrighted 1987 by ** Jyrki Yli-Nokari (jty@intrin.UUCP) ** Intrinsic, Ltd. ** ** You may use this code for anything you like as long as ** you are not selling it and the credit is given and ** this message retained. ** */ /* Bitmap plotting routines derived from above raster plotting routines * Russell Lang, 1990 */ #include "bitmap.h" #include "alloc.h" #include "util.h" #include "term_api.h" /* EAM - to pick up fillstyle definitions */ /* global variables */ bitmap *b_p = (bitmap *) NULL; /* global pointer to bitmap */ unsigned int b_xsize, b_ysize; /* the size of the bitmap */ unsigned int b_planes; /* number of color planes */ unsigned int b_psize; /* size of each plane */ unsigned int b_rastermode; /* raster mode rotates -90deg */ unsigned int b_linemask = 0xffff; /* 16 bit mask for dotted lines */ unsigned int b_angle; /* rotation of text */ int b_maskcount = 0; /* Local prototypes */ static void b_putc __PROTO((unsigned int, unsigned int, int, unsigned int)); static GP_INLINE void b_setpixel __PROTO((unsigned int x, unsigned int y, unsigned int value)); static GP_INLINE void b_setmaskpixel __PROTO((unsigned int x, unsigned int y, unsigned int value)); static void b_line __PROTO((unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2)); /* file-scope variables */ static unsigned int b_value = 1; /* colour of lines */ static unsigned int b_currx, b_curry; /* the current coordinates */ static unsigned int b_hchar; /* width of characters */ static unsigned int b_hbits; /* actual bits in char horizontally */ static unsigned int b_vchar; /* height of characters */ static unsigned int b_vbits; /* actual bits in char vertically */ static char_box b_font[FNT_CHARS]; /* the current font */ static unsigned int b_pattern[] = { 0xffff, 0x1111, 0xffff, 0x5555, 0x3333, 0x7777, 0x3f3f, 0x0f0f, 0x5f5f }; static unsigned int b_lastx; static unsigned int b_lasty; /* last pixel set - used by b_line */ /* 5x9 font, bottom row first, left pixel in lsb */ const char_row GPFAR fnt5x9[FNT_CHARS][FNT5X9_VBITS] = { /* */ {000000,000000,000000,000000,000000,000000,000000,000000,000000}, /*!*/ {000000,000000,0x0004,000000,0x0004,0x0004,0x0004,0x0004,0x0004}, /*"*/ {000000,000000,000000,000000,000000,000000,0x000a,0x000a,0x000a}, /*#*/ {000000,000000,0x000a,0x000a,0x001f,0x000a,0x001f,0x000a,0x000a}, /*$*/ {000000,000000,0x0004,0x000f,0x0014,0x000e,0x0005,0x001e,0x0004}, /*%*/ {000000,000000,0x0018,0x0019,0x0002,0x0004,0x0008,0x0013,0x0003}, /*&*/ {000000,000000,0x0016,0x0009,0x0015,0x0002,0x0005,0x0005,0x0002}, /*'*/ {000000,000000,000000,000000,000000,0x0002,0x0004,0x0006,0x0006}, /*(*/ {000000,000000,0x0008,0x0004,0x0002,0x0002,0x0002,0x0004,0x0008}, /*)*/ {000000,000000,0x0002,0x0004,0x0008,0x0008,0x0008,0x0004,0x0002}, /***/ {000000,000000,0x0004,0x0015,0x000e,0x001f,0x000e,0x0015,0x0004}, /*+*/ {000000,000000,000000,0x0004,0x0004,0x001f,0x0004,0x0004,000000}, /*,*/ {000000,0x0002,0x0004,0x0006,0x0006,000000,000000,000000,000000}, /*-*/ {000000,000000,000000,000000,000000,0x001f,000000,000000,000000}, /*.*/ {000000,000000,0x0006,0x0006,000000,000000,000000,000000,000000}, /*-/-*/{000000,000000,000000,0x0001,0x0002,0x0004,0x0008,0x0010,000000}, /*0*/ {000000,000000,0x000e,0x0011,0x0013,0x0015,0x0019,0x0011,0x000e}, /*1*/ {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0006,0x0004}, /*2*/ {000000,000000,0x001f,0x0001,0x0001,0x000e,0x0010,0x0011,0x000e}, /*3*/ {000000,000000,0x000e,0x0011,0x0010,0x000c,0x0010,0x0011,0x000e}, /*4*/ {000000,000000,0x0008,0x0008,0x001f,0x0009,0x000a,0x000c,0x0008}, /*5*/ {000000,000000,0x000e,0x0011,0x0010,0x0010,0x000f,0x0001,0x001f}, /*6*/ {000000,000000,0x000e,0x0011,0x0011,0x000f,0x0001,0x0002,0x000c}, /*7*/ {000000,000000,0x0001,0x0001,0x0002,0x0004,0x0008,0x0010,0x001f}, /*8*/ {000000,000000,0x000e,0x0011,0x0011,0x000e,0x0011,0x0011,0x000e}, /*9*/ {000000,000000,0x0006,0x0008,0x0010,0x001e,0x0011,0x0011,0x000e}, /*:*/ {000000,000000,000000,0x0006,0x0006,000000,0x0006,0x0006,000000}, /*;*/ {000000,0x0001,0x0002,0x0006,0x0006,000000,0x0006,0x0006,000000}, /*<*/ {000000,000000,0x0008,0x0004,0x0002,0x0001,0x0002,0x0004,0x0008}, /*=*/ {000000,000000,000000,000000,0x001f,000000,0x001f,000000,000000}, /*>*/ {000000,000000,0x0002,0x0004,0x0008,0x0010,0x0008,0x0004,0x0002}, /*?*/ {000000,000000,0x0004,000000,0x0004,0x0008,0x0010,0x0011,0x000e}, /*@*/ {000000,000000,0x000e,0x0015,0x0015,0x0016,0x0010,0x0011,0x000e}, /*A*/ {000000,000000,0x0011,0x0011,0x001f,0x0011,0x0011,0x000a,0x0004}, /*B*/ {000000,000000,0x000f,0x0012,0x0012,0x000e,0x0012,0x0012,0x000f}, /*C*/ {000000,000000,0x000e,0x0011,0x0001,0x0001,0x0001,0x0011,0x000e}, /*D*/ {000000,000000,0x000f,0x0012,0x0012,0x0012,0x0012,0x0012,0x000f}, /*E*/ {000000,000000,0x001f,0x0001,0x0001,0x0007,0x0001,0x0001,0x001f}, /*F*/ {000000,000000,0x0001,0x0001,0x0001,0x0007,0x0001,0x0001,0x001f}, /*G*/ {000000,000000,0x001e,0x0011,0x0011,0x0019,0x0001,0x0001,0x001e}, /*H*/ {000000,000000,0x0011,0x0011,0x0011,0x001f,0x0011,0x0011,0x0011}, /*I*/ {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0004,0x000e}, /*J*/ {000000,000000,0x000e,0x0011,0x0010,0x0010,0x0010,0x0010,0x0010}, /*K*/ {000000,000000,0x0011,0x0009,0x0005,0x0003,0x0005,0x0009,0x0011}, /*L*/ {000000,000000,0x001f,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001}, /*M*/ {000000,000000,0x0011,0x0011,0x0011,0x0015,0x0015,0x001b,0x0011}, /*N*/ {000000,000000,0x0011,0x0011,0x0011,0x0019,0x0015,0x0013,0x0011}, /*O*/ {000000,000000,0x000e,0x0011,0x0011,0x0011,0x0011,0x0011,0x000e}, /*P*/ {000000,000000,0x0001,0x0001,0x0001,0x000f,0x0011,0x0011,0x000f}, /*Q*/ {000000,0x0018,0x000e,0x0015,0x0011,0x0011,0x0011,0x0011,0x000e}, /*R*/ {000000,000000,0x0011,0x0009,0x0005,0x000f,0x0011,0x0011,0x000f}, /*S*/ {000000,000000,0x000e,0x0011,0x0010,0x000e,0x0001,0x0011,0x000e}, /*T*/ {000000,000000,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x001f}, /*U*/ {000000,000000,0x000e,0x0011,0x0011,0x0011,0x0011,0x0011,0x0011}, /*V*/ {000000,000000,0x0004,0x0004,0x000a,0x000a,0x0011,0x0011,0x0011}, /*W*/ {000000,000000,0x0011,0x001b,0x0015,0x0011,0x0011,0x0011,0x0011}, /*X*/ {000000,000000,0x0011,0x0011,0x000a,0x0004,0x000a,0x0011,0x0011}, /*Y*/ {000000,000000,0x0004,0x0004,0x0004,0x0004,0x000a,0x0011,0x0011}, /*Z*/ {000000,000000,0x001f,0x0001,0x0002,0x0004,0x0008,0x0010,0x001f}, /*[*/ {000000,000000,0x000e,0x0002,0x0002,0x0002,0x0002,0x0002,0x000e}, /*\ */ {000000,000000,000000,0x0010,0x0008,0x0004,0x0002,0x0001,000000}, /*]*/ {000000,000000,0x000e,0x0008,0x0008,0x0008,0x0008,0x0008,0x000e}, /*^*/ {000000,000000,000000,000000,000000,000000,0x0011,0x000a,0x0004}, /*_*/ {000000,000000,0x001f,000000,000000,000000,000000,000000,000000}, /*`*/ {000000,000000,000000,000000,000000,0x0008,0x0004,0x000c,0x000c}, /*a*/ {000000,000000,0x001e,0x0011,0x001e,0x0010,0x000e,000000,000000}, /*b*/ {000000,000000,0x000d,0x0013,0x0011,0x0013,0x000d,0x0001,0x0001}, /*c*/ {000000,000000,0x000e,0x0011,0x0001,0x0011,0x000e,000000,000000}, /*d*/ {000000,000000,0x0016,0x0019,0x0011,0x0019,0x0016,0x0010,0x0010}, /*e*/ {000000,000000,0x000e,0x0001,0x001f,0x0011,0x000e,000000,000000}, /*f*/ {000000,000000,0x0004,0x0004,0x0004,0x000e,0x0004,0x0014,0x0008}, /*g*/ {0x000e,0x0011,0x0016,0x0019,0x0011,0x0019,0x0016,000000,000000}, /*h*/ {000000,000000,0x0011,0x0011,0x0011,0x0013,0x000d,0x0001,0x0001}, /*i*/ {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0006,000000,0x0004}, /*j*/ {0x0006,0x0009,0x0008,0x0008,0x0008,0x0008,0x000c,000000,0x0008}, /*k*/ {000000,000000,0x0009,0x0005,0x0003,0x0005,0x0009,0x0001,0x0001}, /*l*/ {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0004,0x0006}, /*m*/ {000000,000000,0x0015,0x0015,0x0015,0x0015,0x000b,000000,000000}, /*n*/ {000000,000000,0x0011,0x0011,0x0011,0x0013,0x000d,000000,000000}, /*o*/ {000000,000000,0x000e,0x0011,0x0011,0x0011,0x000e,000000,000000}, /*p*/ {0x0001,0x0001,0x000d,0x0013,0x0011,0x0013,0x000d,000000,000000}, /*q*/ {0x0010,0x0010,0x0016,0x0019,0x0011,0x0019,0x0016,000000,000000}, /*r*/ {000000,000000,0x0001,0x0001,0x0001,0x0013,0x000d,000000,000000}, /*s*/ {000000,000000,0x000f,0x0010,0x000e,0x0001,0x001e,000000,000000}, /*t*/ {000000,000000,0x0008,0x0014,0x0004,0x0004,0x001f,0x0004,0x0004}, /*u*/ {000000,000000,0x0016,0x0019,0x0011,0x0011,0x0011,000000,000000}, /*v*/ {000000,000000,0x0004,0x000a,0x0011,0x0011,0x0011,000000,000000}, /*w*/ {000000,000000,0x000a,0x0015,0x0015,0x0011,0x0011,000000,000000}, /*x*/ {000000,000000,0x0011,0x000a,0x0004,0x000a,0x0011,000000,000000}, /*y*/ {0x000e,0x0010,0x001e,0x0011,0x0011,0x0011,0x0011,000000,000000}, /*z*/ {000000,000000,0x001f,0x0002,0x0004,0x0008,0x001f,000000,000000}, /*{*/ {000000,000000,0x0008,0x0004,0x0004,0x0002,0x0004,0x0004,0x0008}, /*|*/ {000000,000000,0x0004,0x0004,0x0004,000000,0x0004,0x0004,0x0004}, /*}*/ {000000,000000,0x0002,0x0004,0x0004,0x0008,0x0004,0x0004,0x0002}, /*~*/ {000000,000000,000000,000000,000000,000000,0x0008,0x0015,0x0002}, /*DEL*/{000000,000000,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f}, }; /* 9x17 font, bottom row first, left pixel in lsb */ const char_row GPFAR fnt9x17[FNT_CHARS][FNT9X17_VBITS] = { /* */ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,000000,000000,000000,000000,000000}, /*!*/ {000000,000000,000000,000000,0x0010,000000,000000,000000,0x0010, 0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010}, /*"*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,0x0044,0x0044,0x0044,0x0044,0x0044}, /*#*/ {000000,000000,000000,000000,0x0044,0x0044,0x0044,0x0044,0x01ff, 0x0044,0x0044,0x0044,0x01ff,0x0044,0x0044,0x0044,0x0044}, /*$*/ {000000,000000,000000,000000,0x0010,0x0010,0x007e,0x0091,0x0110, 0x0090,0x007c,0x0012,0x0011,0x0112,0x00fc,0x0010,0x0010}, /*%*/ {000000,000000,000000,000000,0x0080,0x0141,0x0081,0x0002,0x0004, 0x0008,0x0010,0x0020,0x0040,0x0080,0x0102,0x0105,0x0002}, /*&*/ {000000,000000,000000,000000,0x011c,0x00a2,0x0041,0x00c1,0x0141, 0x0022,0x001c,0x0014,0x0022,0x0022,0x001c,000000,000000}, /*'*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,0x0004,0x0008,0x0010,0x0030,0x0038,0x0010}, /*(*/ {000000,000000,000000,000000,0x0040,0x0020,0x0010,0x0008,0x0008, 0x0004,0x0004,0x0004,0x0008,0x0008,0x0010,0x0020,0x0040}, /*)*/ {000000,000000,000000,000000,0x0004,0x0008,0x0010,0x0020,0x0020, 0x0040,0x0040,0x0040,0x0020,0x0020,0x0010,0x0008,0x0004}, /***/ {000000,000000,000000,000000,0x0010,0x0010,0x0111,0x0092,0x0054, 0x0038,0x01ff,0x0038,0x0054,0x0092,0x0111,0x0010,0x0010}, /*+*/ {000000,000000,000000,000000,000000,000000,0x0010,0x0010,0x0010, 0x0010,0x01ff,0x0010,0x0010,0x0010,0x0010,000000,000000}, /*,*/ {000000,000000,0x0004,0x0008,0x0010,0x0030,0x0038,0x0010,000000, 000000,000000,000000,000000,000000,000000,000000,000000}, /*-*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,0x01ff,000000,000000,000000,000000,000000,000000}, /*.*/ {000000,000000,000000,000000,0x0010,0x0038,0x0010,000000,000000, 000000,000000,000000,000000,000000,000000,000000,000000}, /*-/-*/{000000,000000,000000,000000,000000,000000,0x0001,0x0002,0x0004, 0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,000000,000000}, /*0*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0103,0x0105, 0x0109,0x0111,0x0121,0x0141,0x0181,0x0101,0x0082,0x007c}, /*1*/ {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010, 0x0010,0x0010,0x0010,0x0010,0x0010,0x001c,0x0018,0x0010}, /*2*/ {000000,000000,000000,000000,0x01ff,0x0001,0x0001,0x0001,0x0001, 0x0002,0x007c,0x0080,0x0100,0x0100,0x0101,0x0082,0x007c}, /*3*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100, 0x0080,0x0078,0x0080,0x0100,0x0100,0x0101,0x0082,0x007c}, /*4*/ {000000,000000,000000,000000,0x0040,0x0040,0x0040,0x0040,0x0040, 0x01ff,0x0041,0x0042,0x0044,0x0048,0x0050,0x0060,0x0040}, /*5*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100, 0x0100,0x0080,0x007f,0x0001,0x0001,0x0001,0x0001,0x01ff}, /*6*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101, 0x0081,0x007f,0x0001,0x0001,0x0001,0x0002,0x0084,0x0078}, /*7*/ {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0002,0x0004, 0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0100,0x01ff}, /*8*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101, 0x0082,0x007c,0x0082,0x0101,0x0101,0x0101,0x0082,0x007c}, /*9*/ {000000,000000,000000,000000,0x001c,0x0022,0x0040,0x0080,0x0100, 0x0100,0x01fc,0x0102,0x0101,0x0101,0x0101,0x0082,0x007c}, /*:*/ {000000,000000,000000,000000,000000,000000,0x0010,0x0038,0x0010, 000000,000000,000000,0x0010,0x0038,0x0010,000000,000000}, /*;*/ {000000,000000,000000,0x0004,0x0008,0x0010,0x0030,0x0038,0x0010, 000000,000000,000000,0x0010,0x0038,0x0010,000000,000000}, /*<*/ {000000,000000,000000,000000,0x0040,0x0020,0x0010,0x0008,0x0004, 0x0002,0x0001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040}, /*=*/ {000000,000000,000000,000000,000000,000000,000000,000000,0x01ff, 000000,000000,000000,0x01ff,000000,000000,000000,000000}, /*>*/ {000000,000000,000000,000000,0x0004,0x0008,0x0010,0x0020,0x0040, 0x0080,0x0100,0x0080,0x0040,0x0020,0x0010,0x0008,0x0004}, /*?*/ {000000,000000,000000,0x0010,0x0038,0x0010,000000,0x0010,0x0010, 0x0020,0x0040,0x0080,0x0100,0x0100,0x0101,0x0082,0x007c}, /*@*/ {000000,000000,000000,000000,0x007c,0x0002,0x0001,0x01f9,0x0145, 0x0145,0x0145,0x0179,0x0101,0x0101,0x0101,0x0082,0x007c}, /*A*/ {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x01ff, 0x0101,0x0082,0x0082,0x0044,0x0044,0x0028,0x0028,0x0010}, /*B*/ {000000,000000,000000,000000,0x007f,0x0084,0x0104,0x0104,0x0104, 0x0084,0x007c,0x0084,0x0104,0x0104,0x0104,0x0084,0x007f}, /*C*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0001,0x0001, 0x0001,0x0001,0x0001,0x0001,0x0001,0x0101,0x0082,0x007c}, /*D*/ {000000,000000,000000,000000,0x007f,0x0084,0x0104,0x0104,0x0104, 0x0104,0x0104,0x0104,0x0104,0x0104,0x0104,0x0084,0x007f}, /*E*/ {000000,000000,000000,000000,0x01ff,0x0001,0x0001,0x0001,0x0001, 0x0001,0x001f,0x0001,0x0001,0x0001,0x0001,0x0001,0x01ff}, /*F*/ {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0001,0x0001, 0x0001,0x001f,0x0001,0x0001,0x0001,0x0001,0x0001,0x01ff}, /*G*/ {000000,000000,000000,000000,0x00fc,0x0102,0x0101,0x0101,0x0101, 0x0101,0x01c1,0x0001,0x0001,0x0001,0x0001,0x0102,0x00fc}, /*H*/ {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101, 0x0101,0x01ff,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101}, /*I*/ {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010, 0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x007c}, /*J*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100, 0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x0180}, /*K*/ {000000,000000,000000,000000,0x0101,0x0081,0x0041,0x0021,0x0011, 0x0009,0x0005,0x000b,0x0011,0x0021,0x0041,0x0081,0x0101}, /*L*/ {000000,000000,000000,000000,0x01ff,0x0101,0x0001,0x0001,0x0001, 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001}, /*M*/ {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101, 0x0101,0x0111,0x0111,0x0129,0x0145,0x0145,0x0183,0x0101}, /*N*/ {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0181,0x0141, 0x0141,0x0121,0x0111,0x0109,0x0105,0x0105,0x0103,0x0101}, /*O*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101, 0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0082,0x007c}, /*P*/ {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0001,0x0001, 0x0001,0x007f,0x0081,0x0101,0x0101,0x0101,0x0081,0x007f}, /*Q*/ {000000,000000,0x0180,0x0040,0x007c,0x0092,0x0101,0x0101,0x0101, 0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0082,0x007c}, /*R*/ {000000,000000,000000,000000,0x0101,0x0081,0x0041,0x0021,0x0011, 0x0009,0x007f,0x0081,0x0101,0x0101,0x0101,0x0081,0x007f}, /*S*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100, 0x0080,0x007c,0x0002,0x0001,0x0001,0x0101,0x0082,0x007c}, /*T*/ {000000,000000,000000,000000,0x0038,0x0010,0x0010,0x0010,0x0010, 0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0111,0x01ff}, /*U*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101, 0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101}, /*V*/ {000000,000000,000000,000000,0x0010,0x0010,0x0028,0x0028,0x0044, 0x0044,0x0082,0x0082,0x0101,0x0101,0x0101,0x0101,0x0101}, /*W*/ {000000,000000,000000,000000,0x0101,0x0183,0x0145,0x0145,0x0129, 0x0111,0x0111,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101}, /*X*/ {000000,000000,000000,000000,0x0101,0x0101,0x0082,0x0082,0x0044, 0x0028,0x0010,0x0028,0x0044,0x0082,0x0082,0x0101,0x0101}, /*Y*/ {000000,000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010, 0x0010,0x0010,0x0028,0x0044,0x0082,0x0082,0x0101,0x0101}, /*Z*/ {000000,000000,000000,000000,0x01ff,0x0001,0x0002,0x0002,0x0004, 0x0008,0x0010,0x0020,0x0040,0x0080,0x0080,0x0100,0x01ff}, /*[*/ {000000,000000,000000,000000,0x007c,0x0004,0x0004,0x0004,0x0004, 0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x007c}, /*\ */ {000000,000000,000000,000000,000000,000000,0x0100,0x0080,0x0040, 0x0020,0x0010,0x0008,0x0004,0x0002,0x0001,000000,000000}, /*]*/ {000000,000000,000000,000000,0x007c,0x0040,0x0040,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x007c}, /*^*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,0x0101,0x0082,0x0044,0x0028,0x0010}, /*_*/ {000000,000000,000000,000000,0x01ff,000000,000000,000000,000000, 000000,000000,000000,000000,000000,000000,000000,000000}, /*`*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,0x0020,0x0010,0x0008,0x000c,0x001c,0x0008}, /*a*/ {000000,000000,000000,000000,0x03fc,0x0102,0x0101,0x0102,0x01fc, 0x0100,0x0100,0x0080,0x007c,000000,000000,000000,000000}, /*b*/ {000000,000000,000000,000000,0x007d,0x0083,0x0101,0x0101,0x0101, 0x0101,0x0101,0x0083,0x007d,0x0001,0x0001,0x0001,0x0001}, /*c*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0001,0x0001, 0x0001,0x0101,0x0082,0x007c,000000,000000,000000,000000}, /*d*/ {000000,000000,000000,000000,0x017c,0x0182,0x0101,0x0101,0x0101, 0x0101,0x0101,0x0182,0x017c,0x0100,0x0100,0x0100,0x0100}, /*e*/ {000000,000000,000000,000000,0x007c,0x0002,0x0001,0x0001,0x01ff, 0x0101,0x0101,0x0082,0x007c,000000,000000,000000,000000}, /*f*/ {000000,000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010, 0x0010,0x007c,0x0010,0x0010,0x0010,0x0110,0x00a0,0x0040}, /*g*/ {0x007c,0x0082,0x0101,0x0100,0x017c,0x0182,0x0101,0x0101,0x0101, 0x0101,0x0101,0x0182,0x017c,000000,000000,000000,000000}, /*h*/ {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101, 0x0103,0x0103,0x0085,0x0079,0x0001,0x0001,0x0001,0x0001}, /*i*/ {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010, 0x0010,0x0010,0x0018,000000,000000,0x0018,0x0018,000000}, /*j*/ {0x003c,0x0042,0x0081,0x0080,0x0080,0x0080,0x0080,0x0080,0x0080, 0x0080,0x0080,0x00c0,000000,000000,0x00c0,0x00c0,000000}, /*k*/ {000000,000000,000000,000000,0x0082,0x0042,0x0022,0x0012,0x000a, 0x0016,0x0022,0x0042,0x0002,0x0002,0x0002,0x0002,0x0002}, /*l*/ {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010, 0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x001c}, /*m*/ {000000,000000,000000,000000,0x0111,0x0111,0x0111,0x0111,0x0111, 0x0111,0x0111,0x00ab,0x0045,000000,000000,000000,000000}, /*n*/ {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101, 0x0101,0x0101,0x0083,0x007d,000000,000000,000000,000000}, /*o*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101, 0x0101,0x0101,0x0082,0x007c,000000,000000,000000,000000}, /*p*/ {0x0001,0x0001,0x0001,0x0001,0x007d,0x0003,0x0081,0x0101,0x0101, 0x0101,0x0101,0x0083,0x007d,000000,000000,000000,000000}, /*q*/ {0x0100,0x0100,0x0100,0x0100,0x017c,0x0182,0x0101,0x0101,0x0101, 0x0101,0x0101,0x0182,0x017c,000000,000000,000000,000000}, /*r*/ {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0001,0x0001, 0x0001,0x0103,0x0085,0x0079,000000,000000,000000,000000}, /*s*/ {000000,000000,000000,000000,0x007e,0x0081,0x0100,0x0080,0x007c, 0x0002,0x0001,0x0102,0x00fc,000000,000000,000000,000000}, /*t*/ {000000,000000,000000,000000,0x0040,0x00a0,0x0110,0x0010,0x0010, 0x0010,0x0010,0x0010,0x00fe,0x0010,0x0010,0x0010,0x0010}, /*u*/ {000000,000000,000000,000000,0x013c,0x0142,0x0181,0x0101,0x0101, 0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000}, /*v*/ {000000,000000,000000,000000,0x0010,0x0028,0x0044,0x0082,0x0101, 0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000}, /*w*/ {000000,000000,000000,000000,0x0044,0x00aa,0x0111,0x0111,0x0101, 0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000}, /*x*/ {000000,000000,000000,000000,0x0101,0x0082,0x0044,0x0028,0x0010, 0x0028,0x0044,0x0082,0x0101,000000,000000,000000,000000}, /*y*/ {0x007c,0x0082,0x0101,0x0100,0x0100,0x01fc,0x0102,0x0101,0x0101, 0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000}, /*z*/ {000000,000000,000000,000000,0x01ff,0x0002,0x0004,0x0008,0x0010, 0x0020,0x0040,0x0080,0x01ff,000000,000000,000000,000000}, /*{*/ {000000,000000,000000,000000,0x00c0,0x0020,0x0010,0x0010,0x0010, 0x0008,0x0004,0x0008,0x0010,0x0010,0x0010,0x0020,0x00c0}, /*|*/ {000000,000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010, 000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010}, /*}*/ {000000,000000,000000,000000,0x0006,0x0008,0x0010,0x0010,0x0010, 0x0020,0x0040,0x0020,0x0010,0x0010,0x0010,0x0008,0x0006}, /*~*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,0x0040,0x00a0,0x0111,0x000a,0x0004}, /*DEL*/{000000,000000,000000,000000,0x0155,000000,0x0155,000000,0x0155, 000000,0x0155,000000,0x0155,000000,0x0155,000000,0x0155}, }; /* 13x25 font, bottom row first, left pixel in lsb */ const char_row GPFAR fnt13x25[FNT_CHARS][FNT13X25_VBITS] = { /* */ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,000000,000000,000000,000000}, /*!*/ {000000,000000,000000,000000,000000,0x00e0,0x00e0,0x00e0,000000, 000000,000000,0x0040,0x0040,0x0040,0x0040,0x0040,0x00e0,0x00e0, 0x00e0,0x00e0,0x00e0,0x00e0,0x00e0,0x00e0,0x0040}, /*"*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,000000,000000,000000,000000,000000,000000, 0x0208,0x0208,0x0208,0x0208,0x0208,0x0208,0x0208}, /*#*/ {000000,000000,000000,000000,000000,000000,0x0208,0x0208,0x0208, 0x0208,0x0208,0x0208,0x1fff,0x0208,0x0208,0x0208,0x0208,0x0208, 0x1fff,0x0208,0x0208,0x0208,0x0208,0x0208,0x0208}, /*$*/ {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040, 0x03f8,0x0444,0x0842,0x0840,0x0840,0x0440,0x03f8,0x0044,0x0042, 0x0042,0x0842,0x0444,0x03f8,0x0040,0x0040,0x0040}, /*%*/ {000000,000000,000000,000000,000000,000000,0x0c00,0x1200,0x1201, 0x0c01,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100, 0x0200,0x0400,0x0800,0x1006,0x1009,0x0009,0x0006}, /*&*/ {000000,000000,000000,000000,000000,000000,0x1078,0x1084,0x0902, 0x0601,0x0601,0x0901,0x1081,0x0042,0x0024,0x0018,0x0018,0x0024, 0x0042,0x0042,0x0042,0x0042,0x0024,0x0018,000000}, /*'*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,000000,000000,0x0001,0x0002,0x0004,0x0008, 0x0010,0x0030,0x0078,0x0078,0x0078,0x0030,000000}, /*(*/ {000000,000000,000000,000000,000000,000000,0x0080,0x0040,0x0020, 0x0020,0x0010,0x0008,0x0008,0x0004,0x0004,0x0004,0x0004,0x0004, 0x0008,0x0008,0x0010,0x0020,0x0020,0x0040,0x0080}, /*)*/ {000000,000000,000000,000000,000000,000000,0x0020,0x0040,0x0080, 0x0080,0x0100,0x0200,0x0200,0x0400,0x0400,0x0400,0x0400,0x0400, 0x0200,0x0200,0x0100,0x0080,0x0080,0x0040,0x0020}, /***/ {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040, 0x1041,0x0842,0x0444,0x0248,0x0150,0x00e0,0x1fff,0x00e0,0x0150, 0x0248,0x0444,0x0842,0x1041,0x0040,0x0040,0x0040}, /*+*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x1fff,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0040,000000,000000,000000}, /*,*/ {000000,000000,0x0001,0x0002,0x0004,0x0008,0x0010,0x0030,0x0078, 0x0078,0x0078,0x0030,000000,000000,000000,000000,000000,000000, 000000,000000,000000,000000,000000,000000,000000}, /*-*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,000000,000000,000000,0x1fff,000000,000000, 000000,000000,000000,000000,000000,000000,000000}, /*.*/ {000000,000000,000000,000000,000000,000000,000000,0x0038,0x007c, 0x007c,0x007c,0x0038,000000,000000,000000,000000,000000,000000, 000000,000000,000000,000000,000000,000000,000000}, /*-/-*/{000000,000000,000000,000000,000000,000000,000000,000000,0x0001, 0x0001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100, 0x0200,0x0400,0x0800,0x1000,0x1000,000000,000000}, /*0*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, 0x1001,0x1003,0x1005,0x1009,0x1011,0x1021,0x1041,0x1081,0x1101, 0x1201,0x1401,0x1801,0x1001,0x0802,0x0404,0x03f8}, /*1*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0048,0x0070,0x0060,0x0040}, /*2*/ {000000,000000,000000,000000,000000,000000,0x1fff,0x0001,0x0001, 0x0001,0x0001,0x0001,0x0001,0x0002,0x03fc,0x0400,0x0800,0x1000, 0x1000,0x1000,0x1000,0x1001,0x0802,0x0404,0x03f8}, /*3*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, 0x1001,0x1000,0x1000,0x1000,0x0800,0x0400,0x03e0,0x0400,0x0800, 0x1000,0x1000,0x1000,0x1001,0x0802,0x0404,0x03f8}, /*4*/ {000000,000000,000000,000000,000000,000000,0x0200,0x0200,0x0200, 0x0200,0x0200,0x0200,0x0200,0x1fff,0x0201,0x0201,0x0202,0x0204, 0x0208,0x0210,0x0220,0x0240,0x0280,0x0300,0x0200}, /*5*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, 0x1001,0x1000,0x1000,0x1000,0x1000,0x1000,0x0800,0x0400,0x03ff, 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1fff}, /*6*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, 0x1001,0x1001,0x1001,0x1001,0x0801,0x0401,0x03ff,0x0001,0x0001, 0x0001,0x0001,0x0002,0x0004,0x0808,0x0410,0x03e0}, /*7*/ {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001, 0x0002,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100, 0x0200,0x0400,0x0800,0x0800,0x1000,0x1000,0x1fff}, /*8*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, 0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8,0x0404,0x0802, 0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8}, /*9*/ {000000,000000,000000,000000,000000,000000,0x00f8,0x0104,0x0202, 0x0400,0x0800,0x1000,0x1000,0x1000,0x1000,0x1ff8,0x1004,0x1002, 0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8}, /*:*/ {000000,000000,000000,000000,000000,000000,000000,000000,0x0030, 0x0078,0x0078,0x0030,000000,000000,000000,000000,000000,000000, 0x0030,0x0078,0x0078,0x0030,000000,000000,000000}, /*;*/ {000000,000000,0x0001,0x0002,0x0004,0x0008,0x0010,0x0030,0x0078, 0x0078,0x0078,0x0030,000000,000000,000000,000000,000000,000000, 0x0030,0x0078,0x0078,0x0030,000000,000000,000000}, /*<*/ {000000,000000,000000,000000,000000,000000,0x0200,0x0100,0x0080, 0x0040,0x0020,0x0010,0x0008,0x0004,0x0002,0x0001,0x0002,0x0004, 0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0200}, /*=*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,0x1fff,000000,000000,000000,000000,000000, 0x1fff,000000,000000,000000,000000,000000,000000}, /*>*/ {000000,000000,000000,000000,000000,000000,0x0008,0x0010,0x0020, 0x0040,0x0080,0x0100,0x0200,0x0400,0x0800,0x1000,0x0800,0x0400, 0x0200,0x0100,0x0080,0x0040,0x0020,0x0010,0x0008}, /*?*/ {000000,000000,000000,000000,000000,0x0040,0x00e0,0x0040,000000, 000000,000000,0x0040,0x0040,0x0080,0x0100,0x0200,0x0400,0x0800, 0x1000,0x1000,0x1001,0x1001,0x0802,0x0404,0x03f8}, /*@*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0002, 0x0001,0x0001,0x0ee1,0x1111,0x1111,0x1111,0x1111,0x1111,0x12e1, 0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8}, /*A*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, 0x1001,0x1001,0x1001,0x1fff,0x1001,0x1001,0x1001,0x1001,0x0802, 0x0802,0x0404,0x0208,0x0110,0x00a0,0x00a0,0x0040}, /*B*/ {000000,000000,000000,000000,000000,000000,0x03ff,0x0408,0x0808, 0x1008,0x1008,0x1008,0x1008,0x0808,0x0408,0x03f8,0x0408,0x0808, 0x1008,0x1008,0x1008,0x1008,0x0808,0x0408,0x03ff}, /*C*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, 0x1001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001, 0x0001,0x0001,0x0001,0x1001,0x0802,0x0404,0x03f8}, /*D*/ {000000,000000,000000,000000,000000,000000,0x03ff,0x0408,0x0808, 0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008, 0x1008,0x1008,0x1008,0x1008,0x0808,0x0408,0x03ff}, /*E*/ {000000,000000,000000,000000,000000,000000,0x1fff,0x0001,0x0001, 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x007f,0x0001,0x0001, 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1fff}, /*F*/ {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001, 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x007f,0x0001,0x0001, 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1fff}, /*G*/ {000000,000000,000000,000000,000000,000000,0x0ff8,0x1004,0x1002, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1f01,0x0001,0x0001, 0x0001,0x0001,0x0001,0x0001,0x0002,0x1004,0x0ff8}, /*H*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1fff,0x1001,0x1001, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001}, /*I*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x03f8}, /*J*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, 0x1001,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1e00}, /*K*/ {000000,000000,000000,000000,000000,000000,0x1001,0x0801,0x0401, 0x0201,0x0101,0x0081,0x0041,0x0021,0x0011,0x000f,0x0009,0x0011, 0x0021,0x0041,0x0081,0x0101,0x0201,0x0401,0x0801}, /*L*/ {000000,000000,000000,000000,000000,000000,0x1fff,0x1001,0x1001, 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001, 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001}, /*M*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1041,0x1041,0x10a1, 0x10a1,0x1111,0x1209,0x1209,0x1405,0x1803,0x1001}, /*N*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, 0x1001,0x1801,0x1401,0x1201,0x1201,0x1101,0x1081,0x1041,0x1041, 0x1021,0x1011,0x1009,0x1009,0x1005,0x1003,0x1001}, /*O*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001, 0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8}, /*P*/ {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001, 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x03ff,0x0401,0x0801, 0x1001,0x1001,0x1001,0x1001,0x0801,0x0401,0x03ff}, /*Q*/ {000000,000000,000000,000000,0x0c00,0x0200,0x03f8,0x0494,0x0862, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001, 0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8}, /*R*/ {000000,000000,000000,000000,000000,000000,0x1001,0x0801,0x0401, 0x0201,0x0101,0x0081,0x0041,0x0021,0x0011,0x03ff,0x0401,0x0801, 0x1001,0x1001,0x1001,0x1001,0x0801,0x0401,0x03ff}, /*S*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, 0x1001,0x1000,0x1000,0x1000,0x0800,0x0400,0x03f8,0x0004,0x0002, 0x0001,0x0001,0x0001,0x1001,0x0802,0x0404,0x03f8}, /*T*/ {000000,000000,000000,000000,000000,000000,0x00e0,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0040,0x0040,0x1041,0x1fff}, /*U*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001}, /*V*/ {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x00a0, 0x00a0,0x0110,0x0110,0x0208,0x0208,0x0404,0x0404,0x0802,0x0802, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001}, /*W*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1803, 0x1405,0x1405,0x1209,0x1209,0x1111,0x1111,0x10a1,0x1041,0x1001, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001}, /*X*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, 0x0802,0x0802,0x0404,0x0208,0x0110,0x00a0,0x0040,0x00a0,0x0110, 0x0208,0x0404,0x0802,0x0802,0x1001,0x1001,0x1001}, /*Y*/ {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x00a0,0x0110,0x0208, 0x0404,0x0802,0x0802,0x1001,0x1001,0x1001,0x1001}, /*Z*/ {000000,000000,000000,000000,000000,000000,0x1fff,0x0001,0x0001, 0x0002,0x0004,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100, 0x0200,0x0400,0x0400,0x0800,0x1000,0x1000,0x1fff}, /*[*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0008,0x0008, 0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008, 0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x03f8}, /*\ */ {000000,000000,000000,000000,000000,000000,000000,000000,0x1000, 0x1000,0x0800,0x0400,0x0200,0x0100,0x0080,0x0040,0x0020,0x0010, 0x0008,0x0004,0x0002,0x0001,0x0001,000000,000000}, /*]*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0200,0x0200, 0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200, 0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x03f8}, /*^*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,000000,000000,000000,000000,000000,000000, 0x1001,0x0802,0x0404,0x0208,0x0110,0x00a0,0x0040}, /*_*/ {000000,000000,000000,000000,000000,000000,0x1fff,000000,000000, 000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,000000,000000,000000,000000}, /*`*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,000000,000000,0x0400,0x0200,0x0100,0x0080, 0x0040,0x0060,0x00f0,0x00f0,0x00f0,0x0060,000000}, /*a*/ {000000,000000,000000,000000,000000,000000,0x17f8,0x0804,0x0802, 0x0802,0x0802,0x0804,0x0ff8,0x0800,0x0800,0x0800,0x0800,0x0404, 0x03f8,000000,000000,000000,000000,000000,000000}, /*b*/ {000000,000000,000000,000000,000000,000000,0x03f9,0x0405,0x0803, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405, 0x03f9,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001}, /*c*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, 0x1001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1001,0x0802,0x0404, 0x03f8,000000,000000,000000,000000,000000,000000}, /*d*/ {000000,000000,000000,000000,000000,000000,0x13f8,0x1404,0x1802, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1802,0x1404, 0x13f8,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000}, /*e*/ {000000,000000,000000,000000,000000,000000,0x0ff8,0x0004,0x0002, 0x0001,0x0001,0x0001,0x1fff,0x1001,0x1001,0x1001,0x0802,0x0404, 0x03f8,000000,000000,000000,000000,000000,000000}, /*f*/ {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x03f8,0x0040,0x0040, 0x0040,0x0040,0x0040,0x1040,0x0880,0x0500,0x0200}, /*g*/ {0x03f8,0x0404,0x0802,0x1001,0x1000,0x1000,0x13f8,0x1404,0x1802, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1802,0x1404, 0x13f8,000000,000000,000000,000000,000000,000000}, /*h*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405, 0x03f9,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001}, /*i*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0070, 000000,000000,000000,0x00e0,0x00e0,0x00e0,000000}, /*j*/ {0x00f0,0x0108,0x0204,0x0402,0x0400,0x0400,0x0400,0x0400,0x0400, 0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0700, 000000,000000,000000,0x0700,0x0700,0x0700,000000}, /*k*/ {000000,000000,000000,000000,000000,000000,0x0804,0x0404,0x0204, 0x0104,0x0084,0x0044,0x0024,0x0014,0x002c,0x0044,0x0084,0x0104, 0x0204,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004}, /*l*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0070}, /*m*/ {000000,000000,000000,000000,000000,000000,0x1041,0x1041,0x1041, 0x1041,0x1041,0x1041,0x1041,0x1041,0x1041,0x1041,0x08a3,0x0515, 0x0209,000000,000000,000000,000000,000000,000000}, /*n*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405, 0x03f9,000000,000000,000000,000000,000000,000000}, /*o*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0802,0x0404, 0x03f8,000000,000000,000000,000000,000000,000000}, /*p*/ {0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x03f9,0x0405,0x0803, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405, 0x03f9,000000,000000,000000,000000,000000,000000}, /*q*/ {0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x13f8,0x1404,0x1802, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1802,0x1404, 0x13f8,000000,000000,000000,000000,000000,000000}, /*r*/ {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001, 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1001,0x0803,0x0405, 0x03f9,000000,000000,000000,000000,000000,000000}, /*s*/ {000000,000000,000000,000000,000000,000000,0x03fc,0x0402,0x0800, 0x0800,0x0800,0x0400,0x03f8,0x0004,0x0002,0x0002,0x0002,0x0804, 0x07f8,000000,000000,000000,000000,000000,000000}, /*t*/ {000000,000000,000000,000000,000000,000000,0x0200,0x0500,0x0880, 0x1040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040, 0x07fc,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040}, /*u*/ {000000,000000,000000,000000,000000,000000,0x13f8,0x1404,0x1802, 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001, 0x1001,000000,000000,000000,000000,000000,000000}, /*v*/ {000000,000000,000000,000000,000000,000000,0x0040,0x00a0,0x0110, 0x0208,0x0404,0x0802,0x0802,0x1001,0x1001,0x1001,0x1001,0x1001, 0x1001,000000,000000,000000,000000,000000,000000}, /*w*/ {000000,000000,000000,000000,000000,000000,0x0208,0x0514,0x08a2, 0x08a2,0x1041,0x1041,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001, 0x1001,000000,000000,000000,000000,000000,000000}, /*x*/ {000000,000000,000000,000000,000000,000000,0x1001,0x0802,0x0404, 0x0208,0x0110,0x00a0,0x0040,0x00a0,0x0110,0x0208,0x0404,0x0802, 0x1001,000000,000000,000000,000000,000000,000000}, /*y*/ {0x03f8,0x0404,0x0802,0x1001,0x1000,0x1000,0x1000,0x1000,0x1ff8, 0x1004,0x1002,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001, 0x1001,000000,000000,000000,000000,000000,000000}, /*z*/ {000000,000000,000000,000000,000000,000000,0x1fff,0x0002,0x0004, 0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0200,0x0400,0x0800, 0x1fff,000000,000000,000000,000000,000000,000000}, /*{*/ {000000,000000,000000,000000,000000,000000,0x0600,0x0100,0x0080, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0020,0x0010,0x0020,0x0040, 0x0040,0x0040,0x0040,0x0040,0x0080,0x0100,0x0600}, /*|*/ {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040, 0x0040,0x0040,0x0040,0x0040,000000,000000,000000,000000,000000, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040}, /*}*/ {000000,000000,000000,000000,000000,000000,0x000c,0x0010,0x0020, 0x0040,0x0040,0x0040,0x0040,0x0040,0x0080,0x0100,0x0080,0x0040, 0x0040,0x0040,0x0040,0x0040,0x0020,0x0010,0x000c}, /*~*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, 000000,000000,000000,000000,000000,000000,000000,000000,000000, 0x0600,0x0900,0x1080,0x1041,0x0021,0x0012,0x000c}, /*DEL*/{000000,000000,000000,000000,000000,000000,0x1249,000000,000000, 0x1249,000000,000000,0x1249,000000,000000,0x1249,000000,000000, 0x1249,000000,000000,0x1249,000000,000000,0x1249}, }; /* ** The plotting area is defined as a huge bitmap. ** The bitmap is stored in a dynamically allocated pixel array b_p ** ** The bitmap is allocated (and initialized to zero) with ** b_makebitmap(xsize, ysize, planes) ** and freed with b_freebitmap() ** xsize and ysize will be rounded up to a multiple of 8. ** ** Valid (int) coordinates range from zero to (xsize-1,ysize-1) ** ** Plotting is done via b_move(x, y) and b_vector(x, y) functions, ** where the point (x,y) is the target to go from the current point ** To set the color use b_setvalue(value) where value is the value ** (0 or 1 or a color number) to be stored in every pixel. ** To get dotted line styles, use b_setlinetype(linetype). ** ** Internally all plotting goes through b_setpixel(x, y, value). */ /* bitmaps used for filled boxes style (ULIG) */ #define fill_bitmap_width 8 #define fill_bitmap_height 8 #define fill_halftone_num 5 static unsigned char fill_halftone_bitmaps[fill_halftone_num][8] ={ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* no fill */ { 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44 }, /* 25% pattern */ { 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa }, /* 50% pattern */ { 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd }, /* 75% pattern */ { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } /* solid pattern */ }; #define fill_pattern_num 8 static unsigned char fill_pattern_bitmaps[fill_pattern_num][8] ={ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } /* no fill */ ,{ 0x82, 0x44, 0x28, 0x10, 0x28, 0x44, 0x82, 0x01 } /* cross-hatch (1) */ ,{ 0x88, 0x55, 0x22, 0x55, 0x88, 0x55, 0x22, 0x55 } /* double crosshatch(2) */ ,{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } /* solid fill (3) */ ,{ 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 } /* diagonal stripes (4) */ ,{ 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 } /* diagonal stripes (5) */ ,{ 0x11, 0x11, 0x22, 0x22, 0x44, 0x44, 0x88, 0x88 } /* diagonal stripes (6) */ ,{ 0x88, 0x88, 0x44, 0x44, 0x22, 0x22, 0x11, 0x11 } /* diagonal stripes (7) */ #if (0) ,{ 0x03, 0x0C, 0x30, 0xC0, 0x03, 0x0C, 0x30, 0xC0 } /* diagonal stripes (8) */ ,{ 0xC0, 0x30, 0x0C, 0x03, 0xC0, 0x30, 0x0C, 0x03 } /* diagonal stripes (9) */ #endif }; /* * set pixel (x, y, value) to value value (this can be 1/0 or a color number). */ static GP_INLINE void b_setpixel(unsigned int x, unsigned int y, unsigned int value) { unsigned int row; unsigned char mask; unsigned int i; if (b_rastermode) { /* interchange so that new (x,y) is old (y,b_ysize-1-x) */ row = x; /* temp storage */ x = y; y = b_ysize - 1 - row; } if ((x < b_xsize) && (y < b_ysize)) { row = y / 8; mask = 1 << (y % 8); for (i = 0; i < b_planes; i++) { if (value & 1) *((*b_p)[row] + x) |= mask; else *((*b_p)[row] + x) &= ~mask; row += b_psize; value >>= 1; } } #ifdef BITMAPDEBUG else { if (b_rastermode) fprintf(stderr, "Warning: setpixel(%d, %d, %d) out of bounds\n", b_ysize - 1 - y, x, value); else fprintf(stderr, "Warning: setpixel(%d, %d, %d) out of bounds\n", x, y, value); } #endif } /* * get pixel (x,y) value */ unsigned int b_getpixel(unsigned int x, unsigned int y) { unsigned int row; unsigned char mask; unsigned short value=0; /* HBB 991123: initialize! */ int i; if (b_rastermode) { row = x; x = y; y = b_ysize-1-row; } if ((x < b_xsize) && (y < b_ysize)) { row = y/8 + (b_planes-1)*b_psize; mask = 1<<(y%8); for (i=0; i<b_planes; i++) { if ( *((*b_p)[row]+x) & mask ) value |= 1; row -= b_psize; value <<= 1; } /* HBB 991123: the missing '>>1' was the 'every second color' problem * with PNG in 3.8a...*/ return(value>>1); } else { #ifdef BITMAPDEBUG if (b_rastermode) fprintf(stderr, "Warning: getpixel(%d,%d) out of bounds\n", b_ysize-1-y, x); else fprintf(stderr, "Warning: getpixel(%d,%d) out of bounds\n", x, y); #endif return(0); } } /* * allocate the bitmap */ void b_makebitmap(unsigned int x, unsigned int y, unsigned int planes) { unsigned int j; unsigned int rows; x = 8 * (unsigned int) (x / 8.0 + 0.9); /* round up to multiple of 8 */ y = 8 * (unsigned int) (y / 8.0 + 0.9); /* round up to multiple of 8 */ b_psize = y / 8; /* size of each plane */ rows = b_psize * planes; /* total number of rows of 8 pixels high */ b_xsize = x; b_ysize = y; b_currx = b_curry = 0; b_planes = planes; b_value = 1; b_angle = 0; b_rastermode = 0; /* allocate row pointers */ b_p = (bitmap *) gp_alloc(rows * sizeof(pixels *), "bitmap row buffer"); memset(b_p, 0, rows * sizeof(pixels *)); for (j = 0; j < rows; j++) { /* allocate bitmap buffers */ (*b_p)[j] = (pixels *) gp_alloc(x * sizeof(pixels), (char *) NULL); if ((*b_p)[j] == (pixels *) NULL) { b_freebitmap(); /* free what we have already allocated */ int_error(NO_CARET, "out of memory for bitmap buffer"); } memset((*b_p)[j], 0, x * sizeof(pixels)); } } /* * free the allocated bitmap */ void b_freebitmap() { unsigned int j, rows; rows = b_psize * b_planes; /* total number of rows of 8 pixels high */ for (j = 0; j < rows; j++) { (void) free((char *) (*b_p)[j]); } (void) free((char *) b_p); b_p = (bitmap *) (NULL); } /* * set pixel at (x,y) with color b_value and dotted mask b_linemask. */ static GP_INLINE void b_setmaskpixel(unsigned int x, unsigned int y, unsigned int value) { /* dotted line generator */ if ((b_linemask >> b_maskcount) & (unsigned int) (1)) { b_setpixel(x, y, value); } b_maskcount = (b_maskcount + 1) % 16; b_lastx = x; /* last pixel set with mask */ b_lasty = y; } /* * draw a line from (x1,y1) to (x2,y2) * with color b_value and dotted mask b_linemask. */ static void b_line(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2) { int runcount; int dx, dy; int xinc, yinc; unsigned int xplot, yplot; runcount = 0; dx = abs((int) (x1) - (int) (x2)); if (x2 > x1) xinc = 1; else if (x2 == x1) xinc = 0; else xinc = -1; dy = abs((int) (y1) - (int) (y2)); if (y2 > y1) yinc = 1; else if (y2 == y1) yinc = 0; else yinc = -1; xplot = x1; yplot = y1; if (dx > dy) { /* iterate x */ if ((b_linemask == 0xffff) || ((xplot != b_lastx) && (yplot != b_lasty))) b_setmaskpixel(xplot, yplot, b_value); while (xplot != x2) { xplot += xinc; runcount += dy; if (runcount >= (dx - runcount)) { yplot += yinc; runcount -= dx; } b_setmaskpixel(xplot, yplot, b_value); } } else { /* iterate y */ if ((b_linemask == 0xffff) || ((xplot != b_lastx) && (yplot != b_lasty))) b_setmaskpixel(xplot, yplot, b_value); while (yplot != y2) { yplot += yinc; runcount += dx; if (runcount >= (dy - runcount)) { xplot += xinc; runcount -= dy; } b_setmaskpixel(xplot, yplot, b_value); } } } /* * set character size */ void b_charsize(unsigned int size) { int j; switch (size) { case FNT5X9: b_hchar = FNT5X9_HCHAR; b_hbits = FNT5X9_HBITS; b_vchar = FNT5X9_VCHAR; b_vbits = FNT5X9_VBITS; for (j = 0; j < FNT_CHARS; j++) b_font[j] = fnt5x9[j]; break; case FNT9X17: b_hchar = FNT9X17_HCHAR; b_hbits = FNT9X17_HBITS; b_vchar = FNT9X17_VCHAR; b_vbits = FNT9X17_VBITS; for (j = 0; j < FNT_CHARS; j++) b_font[j] = fnt9x17[j]; break; case FNT13X25: b_hchar = FNT13X25_HCHAR; b_hbits = FNT13X25_HBITS; b_vchar = FNT13X25_VCHAR; b_vbits = FNT13X25_VBITS; for (j = 0; j < FNT_CHARS; j++) b_font[j] = fnt13x25[j]; break; default: int_error(NO_CARET, "Unknown character size"); } } /* * put characater c at (x,y) rotated by angle with color b_value. */ static void b_putc(unsigned int x, unsigned int y, int c, unsigned int c_angle) { unsigned int i, j, k; char_row fc; j = c - ' '; if (j >= FNT_CHARS) return; /* unknown (top-bit-set ?) character */ for (i = 0; i < b_vbits; i++) { fc = b_font[j][i]; if (c == '_') { /* treat underline specially */ if (fc) { /* this this the underline row ? */ /* draw the under line for the full h_char width */ for (k = (b_hbits - b_hchar) / 2; k < (b_hbits + b_hchar) / 2; k++) { switch (c_angle) { case 0: b_setpixel(x + k + 1, y + i, b_value); break; case 1: b_setpixel(x - i, y + k + 1, b_value); break; } } } } else { /* draw character */ for (k = 0; k < b_hbits; k++) { if ((fc >> k) & 1) { switch (c_angle) { case 0: b_setpixel(x + k + 1, y + i, b_value); break; case 1: b_setpixel(x - i, y + k + 1, b_value); break; } } } } } } /* ** set b_linemask to b_pattern[linetype] */ void b_setlinetype(int linetype) { if (linetype >= 7) linetype %= 7; b_linemask = b_pattern[linetype + 2]; b_maskcount = 0; } /* * set b_value to value */ void b_setvalue(unsigned int value) { b_value = value; } /* * move to (x,y) */ void b_move(unsigned int x, unsigned int y) { b_currx = x; b_curry = y; } /* * draw to (x,y) with color b_value */ void b_vector(unsigned int x, unsigned int y) { /* We can't clip properly, but we can refuse to draw out of bounds */ if (x < term->xmax && y < term->ymax && b_currx < term->xmax && b_curry < term->ymax) b_line(b_currx, b_curry, x, y); b_currx = x; b_curry = y; } /* * put text str at (x,y) with color b_value and rotation b_angle */ void b_put_text(unsigned int x, unsigned int y, const char *str) { if (b_angle == 1) x += b_vchar / 2; else y -= b_vchar / 2; switch (b_angle) { case 0: for (; *str; ++str, x += b_hchar) b_putc(x, y, *str, b_angle); break; case 1: for (; *str; ++str, y += b_hchar) b_putc(x, y, *str, b_angle); break; } } int b_text_angle(int ang) { b_angle = (unsigned int) (ang ? 1 : 0); return TRUE; } /* New function by ULIG */ void b_boxfill( int style, unsigned int x, unsigned int y, unsigned int w, unsigned int h) { unsigned int ix, iy; int pixcolor, actpix, pat, mask, idx, bitoffs, shiftcnt; unsigned char *fillbitmap; switch( style & 0xf ) { case FS_SOLID: /* use halftone fill pattern according to filldensity */ /* filldensity is from 0..100 percent */ idx = (int) ((style >> 4) * (fill_halftone_num - 1) / 100 ); if( idx < 0 ) idx = 0; if( idx >= fill_halftone_num ) idx = fill_halftone_num-1; fillbitmap = fill_halftone_bitmaps[idx]; pixcolor = b_value; break; case FS_PATTERN: /* use fill pattern according to fillpattern */ idx = (style >> 4); /* fillpattern is enumerated */ if( idx < 0 ) idx = 0; idx %= fill_pattern_num; fillbitmap = fill_pattern_bitmaps[idx]; pixcolor = b_value; break; case FS_EMPTY: default: /* fill with background color */ fillbitmap = fill_halftone_bitmaps[0]; pixcolor = 0; } /* this implements a primitive raster generator, which plots the */ /* bitmaps point by point calling b_setpixel(). Perhaps someone */ /* will implement a more efficient solution */ bitoffs=0; for( iy = y; iy < y+h; iy ++ ) { /* box height */ pat = fillbitmap[bitoffs % fill_bitmap_width]; bitoffs++; mask = 1 << (fill_bitmap_width - 1); shiftcnt = 0; for(ix = x; ix < x+w; ix ++) { /* box width */ /* actual pixel = 0 or color, according to pattern */ actpix = (pat & mask) ? pixcolor : 0; mask >>= 1; if( mask == 0 ) { mask = 1 << (fill_bitmap_width - 1); } b_setpixel(ix, iy, actpix); } } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/national.h������������������������������������������������������������������������0000644�0004711�0000144�00000011276�10037021056�012677� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: national.h,v 1.5 2004/04/13 17:23:58 broeker Exp $ */ /* GNUPLOT - national.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef GNUPLOT_NATIONAL_H # define GNUPLOT_NATIONAL_H /* if setlocale is available, these strings will be overridden * by strftime, or they may not be used at all if the run-time * system provides global variables with these strings */ #ifdef NORWEGIAN /* MONTH-names */ #define AMON01 "Jan" #define AMON02 "Feb" #define AMON03 "Mar" #define AMON04 "Apr" #define AMON05 "Mai" #define AMON06 "Jun" #define AMON07 "Jul" #define AMON08 "Aug" #define AMON09 "Sep" #define AMON10 "Okt" #define AMON11 "Nov" #define AMON12 "Des" /* sorry, I dont know the full names */ #define FMON01 "January" #define FMON02 "February" #define FMON03 "March" #define FMON04 "April" #define FMON05 "May" #define FMON06 "June" #define FMON07 "July" #define FMON08 "August" #define FMON09 "September" #define FMON10 "October" #define FMON11 "November" #define FMON12 "December" /* DAY names */ #define ADAY0 "Sxn" #define ADAY1 "Man" #define ADAY2 "Tir" #define ADAY3 "Ons" #define ADAY4 "Tor" #define ADAY5 "Fre" #define ADAY6 "Lxr" #define FDAY0 "Sunday" #define FDAY1 "Monday" #define FDAY2 "Tuesday" #define FDAY3 "Wednesday" #define FDAY4 "Thursday" #define FDAY5 "Friday" #define FDAY6 "Saturday" #elif defined(HUNGARIAN) #define AMON01 "jan" #define AMON02 "febr" #define AMON03 "márc" #define AMON04 "ápr" #define AMON05 "máj" #define AMON06 "jún" #define AMON07 "júl" #define AMON08 "aug" #define AMON09 "szept" #define AMON10 "okt" #define AMON11 "nov" #define AMON12 "dec" #define FMON01 "január" #define FMON02 "február" #define FMON03 "március" #define FMON04 "április" #define FMON05 "május" #define FMON06 "június" #define FMON07 "július" #define FMON08 "augusztus" #define FMON09 "szeptember" #define FMON10 "október" #define FMON11 "november" #define FMON12 "december" /* DAY names */ #define ADAY0 "vas" #define ADAY1 "hét" #define ADAY2 "kedd" #define ADAY3 "sze" #define ADAY4 "csüt" #define ADAY5 "pén" #define ADAY6 "szo" #define FDAY0 "vasárnap" #define FDAY1 "hétfõ" #define FDAY2 "kedd" #define FDAY3 "szerda" #define FDAY4 "csútörtök" #define FDAY5 "péntek" #define FDAY6 "szombat" #else /* MONTH-names */ #define AMON01 "Jan" #define AMON02 "Feb" #define AMON03 "Mar" #define AMON04 "Apr" #define AMON05 "May" #define AMON06 "Jun" #define AMON07 "Jul" #define AMON08 "Aug" #define AMON09 "Sep" #define AMON10 "Oct" #define AMON11 "Nov" #define AMON12 "Dec" #define FMON01 "January" #define FMON02 "February" #define FMON03 "March" #define FMON04 "April" #define FMON05 "May" #define FMON06 "June" #define FMON07 "July" #define FMON08 "August" #define FMON09 "September" #define FMON10 "October" #define FMON11 "November" #define FMON12 "December" /* DAY names */ #define ADAY0 "Sun" #define ADAY1 "Mon" #define ADAY2 "Tue" #define ADAY3 "Wed" #define ADAY4 "Thu" #define ADAY5 "Fri" #define ADAY6 "Sat" #define FDAY0 "Sunday" #define FDAY1 "Monday" #define FDAY2 "Tuesday" #define FDAY3 "Wednesday" #define FDAY4 "Thursday" #define FDAY5 "Friday" #define FDAY6 "Saturday" #endif /* language */ #endif /* GNUPLOT_NATIONAL_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/plot3d.c��������������������������������������������������������������������������0000644�0004711�0000144�00000215312�12120423661�012272� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: plot3d.c,v 1.191.2.6 2013/03/14 19:40:33 sfeam Exp $"); } #endif /* GNUPLOT - plot3d.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "plot3d.h" #include "gp_types.h" #include "alloc.h" #include "axis.h" #include "binary.h" #include "command.h" #include "contour.h" #include "datafile.h" #include "eval.h" #include "graph3d.h" #include "misc.h" #include "parse.h" #include "pm3d.h" #include "setshow.h" #include "term_api.h" #include "tabulate.h" #include "util.h" #include "variable.h" /* For locale handling */ #include "plot2d.h" /* Only for store_label() */ #include "matrix.h" /* Used by thin-plate-splines in dgrid3d */ #ifndef _Windows # include "help.h" #endif /* global variables exported by this module */ t_data_mapping mapping3d = MAP3D_CARTESIAN; int dgrid3d_row_fineness = 10; int dgrid3d_col_fineness = 10; int dgrid3d_norm_value = 1; int dgrid3d_mode = DGRID3D_QNORM; double dgrid3d_x_scale = 1.0; double dgrid3d_y_scale = 1.0; TBOOLEAN dgrid3d = FALSE; TBOOLEAN dgrid3d_kdensity = FALSE; /* static prototypes */ static void calculate_set_of_isolines __PROTO((AXIS_INDEX value_axis, TBOOLEAN cross, struct iso_curve **this_iso, AXIS_INDEX iso_axis, double iso_min, double iso_step, int num_iso_to_use, AXIS_INDEX sam_axis, double sam_min, double sam_step, int num_sam_to_use, TBOOLEAN need_palette)); static int get_3ddata __PROTO((struct surface_points * this_plot)); static void eval_3dplots __PROTO((void)); static void grid_nongrid_data __PROTO((struct surface_points * this_plot)); static void parametric_3dfixup __PROTO((struct surface_points * start_plot, int *plot_num)); static struct surface_points * sp_alloc __PROTO((int num_samp_1, int num_iso_1, int num_samp_2, int num_iso_2)); static void sp_replace __PROTO((struct surface_points *sp, int num_samp_1, int num_iso_1, int num_samp_2, int num_iso_2)); /* helper functions for grid_nongrid_data() */ static double splines_kernel __PROTO((double h)); static void thin_plate_splines_setup __PROTO(( struct iso_curve *old_iso_crvs, double **p_xx, int *p_numpoints )); static double qnorm __PROTO(( double dist_x, double dist_y, int q )); static double pythag __PROTO(( double dx, double dy )); /* the curves/surfaces of the plot */ struct surface_points *first_3dplot = NULL; static struct udft_entry plot_func; int plot3d_num=0; /* HBB 20000508: moved these functions to the only module that uses them * so they can be turned 'static' */ /* * sp_alloc() allocates a surface_points structure that can hold 'num_iso_1' * iso-curves with 'num_samp_2' samples and 'num_iso_2' iso-curves with * 'num_samp_1' samples. * If, however num_iso_2 or num_samp_1 is zero no iso curves are allocated. */ static struct surface_points * sp_alloc(int num_samp_1, int num_iso_1, int num_samp_2, int num_iso_2) { struct lp_style_type default_lp_properties = DEFAULT_LP_STYLE_TYPE; struct surface_points *sp = gp_alloc(sizeof(*sp), "surface"); memset(sp,0,sizeof(struct surface_points)); /* Initialize various fields */ sp->lp_properties = default_lp_properties; default_arrow_style(&(sp->arrow_properties)); if (num_iso_2 > 0 && num_samp_1 > 0) { int i; struct iso_curve *icrv; for (i = 0; i < num_iso_1; i++) { icrv = iso_alloc(num_samp_2); icrv->next = sp->iso_crvs; sp->iso_crvs = icrv; } for (i = 0; i < num_iso_2; i++) { icrv = iso_alloc(num_samp_1); icrv->next = sp->iso_crvs; sp->iso_crvs = icrv; } } return (sp); } /* * sp_replace() updates a surface_points structure so it can hold 'num_iso_1' * iso-curves with 'num_samp_2' samples and 'num_iso_2' iso-curves with * 'num_samp_1' samples. * If, however num_iso_2 or num_samp_1 is zero no iso curves are allocated. */ static void sp_replace( struct surface_points *sp, int num_samp_1, int num_iso_1, int num_samp_2, int num_iso_2) { int i; struct iso_curve *icrv, *icrvs = sp->iso_crvs; while (icrvs) { icrv = icrvs; icrvs = icrvs->next; iso_free(icrv); } sp->iso_crvs = NULL; if (num_iso_2 > 0 && num_samp_1 > 0) { for (i = 0; i < num_iso_1; i++) { icrv = iso_alloc(num_samp_2); icrv->next = sp->iso_crvs; sp->iso_crvs = icrv; } for (i = 0; i < num_iso_2; i++) { icrv = iso_alloc(num_samp_1); icrv->next = sp->iso_crvs; sp->iso_crvs = icrv; } } else sp->iso_crvs = NULL; } /* * sp_free() releases any memory which was previously malloc()'d to hold * surface points. */ /* HBB 20000506: don't risk stack havoc by recursion, use iterative list * cleanup unstead */ void sp_free(struct surface_points *sp) { while (sp) { struct surface_points *next = sp->next_sp; if (sp->title) free(sp->title); while (sp->contours) { struct gnuplot_contours *next_cntrs = sp->contours->next; free(sp->contours->coords); free(sp->contours); sp->contours = next_cntrs; } while (sp->iso_crvs) { struct iso_curve *next_icrvs = sp->iso_crvs->next; iso_free(sp->iso_crvs); sp->iso_crvs = next_icrvs; } if (sp->labels) { free_labels(sp->labels); sp->labels = (struct text_label *)NULL; } free(sp); sp = next; } } /* support for dynamic size of input line */ void plot3drequest() /* * in the parametric case we would say splot [u= -Pi:Pi] [v= 0:2*Pi] [-1:1] * [-1:1] [-1:1] sin(v)*cos(u),sin(v)*cos(u),sin(u) in the non-parametric * case we would say only splot [x= -2:2] [y= -5:5] sin(x)*cos(y) * */ { int dummy_token0 = -1, dummy_token1 = -1; AXIS_INDEX u_axis, v_axis; is_3d_plot = TRUE; /* change view to become map if requested by 'set view map' */ if (splot_map == TRUE) splot_map_activate(); if (parametric && strcmp(set_dummy_var[0], "t") == 0) { strcpy(set_dummy_var[0], "u"); strcpy(set_dummy_var[1], "v"); } /* put stuff into arrays to simplify access */ AXIS_INIT3D(FIRST_X_AXIS, 0, 0); AXIS_INIT3D(FIRST_Y_AXIS, 0, 0); AXIS_INIT3D(FIRST_Z_AXIS, 0, 1); AXIS_INIT3D(U_AXIS, 1, 0); AXIS_INIT3D(V_AXIS, 1, 0); AXIS_INIT3D(COLOR_AXIS, 0, 1); if (!term) /* unknown */ int_error(c_token, "use 'set term' to set terminal type first"); u_axis = (parametric ? U_AXIS : FIRST_X_AXIS); v_axis = (parametric ? V_AXIS : FIRST_Y_AXIS); dummy_token0 = parse_named_range(u_axis, dummy_token0); if (splot_map == TRUE && !parametric) /* v_axis==FIRST_Y_AXIS */ splot_map_deactivate(); dummy_token1 = parse_named_range(v_axis, dummy_token1); if (splot_map == TRUE && !parametric) /* v_axis==FIRST_Y_AXIS */ splot_map_activate(); if (parametric) { parse_range(FIRST_X_AXIS); if (splot_map == TRUE) splot_map_deactivate(); parse_range(FIRST_Y_AXIS); if (splot_map == TRUE) splot_map_activate(); } /* parametric */ parse_range(FIRST_Z_AXIS); check_axis_reversed(FIRST_X_AXIS); check_axis_reversed(FIRST_Y_AXIS); check_axis_reversed(FIRST_Z_AXIS); /* Clear out any tick labels read from data files in previous plot */ for (u_axis=0; u_axis<AXIS_ARRAY_SIZE; u_axis++) { struct ticdef *ticdef = &axis_array[u_axis].ticdef; if (ticdef->def.user) ticdef->def.user = prune_dataticks(ticdef->def.user); if (!ticdef->def.user && ticdef->type == TIC_USER) ticdef->type = TIC_COMPUTED; } /* use the default dummy variable unless changed */ if (dummy_token0 >= 0) copy_str(c_dummy_var[0], dummy_token0, MAX_ID_LEN); else (void) strcpy(c_dummy_var[0], set_dummy_var[0]); if (dummy_token1 >= 0) copy_str(c_dummy_var[1], dummy_token1, MAX_ID_LEN); else (void) strcpy(c_dummy_var[1], set_dummy_var[1]); eval_3dplots(); } #ifdef VOLATILE_REFRESH /* Helper function for refresh command. Reexamine each data point and update the * flags for INRANGE/OUTRANGE/UNDEFINED based on the current limits for that axis. * Normally the axis limits are already known at this point. But if the user has * forced "set autoscale" since the previous plot or refresh, we need to reset the * axis limits and try to approximate the full auto-scaling behaviour. */ void refresh_3dbounds(struct surface_points *first_plot, int nplots) { struct surface_points *this_plot = first_plot; int iplot; /* plot index */ for (iplot = 0; iplot < nplots; iplot++, this_plot = this_plot->next_sp) { int i; /* point index */ struct axis *x_axis = &axis_array[FIRST_X_AXIS]; struct axis *y_axis = &axis_array[FIRST_Y_AXIS]; struct axis *z_axis = &axis_array[FIRST_Z_AXIS]; struct iso_curve *this_curve; /* IMAGE clipping is done elsewhere, so we don't need INRANGE/OUTRANGE * checks. */ if (this_plot->plot_style == IMAGE || this_plot->plot_style == RGBIMAGE || this_plot->plot_style == RGBA_IMAGE) { if (x_axis->set_autoscale) plot_image_or_update_axes(this_plot,TRUE); continue; } for ( this_curve = this_plot->iso_crvs; this_curve; this_curve = this_curve->next) { for (i=0; i<this_curve->p_count; i++) { struct coordinate GPHUGE *point = &this_curve->points[i]; if (point->type == UNDEFINED) continue; else point->type = INRANGE; /* If the state has been set to autoscale since the last plot, * mark everything INRANGE and re-evaluate the axis limits now. * Otherwise test INRANGE/OUTRANGE against previous axis limits. */ /* This autoscaling logic is identical to that in * refresh_bounds() in plot2d.c */ if (!this_plot->noautoscale) { if (x_axis->set_autoscale & AUTOSCALE_MIN && point->x < x_axis->min) x_axis->min = point->x; if (x_axis->set_autoscale & AUTOSCALE_MAX && point->x > x_axis->max) x_axis->max = point->x; } if (!inrange(point->x, x_axis->min, x_axis->max)) { point->type = OUTRANGE; continue; } if (!this_plot->noautoscale) { if (y_axis->set_autoscale & AUTOSCALE_MIN && point->y < y_axis->min) y_axis->min = point->y; if (y_axis->set_autoscale & AUTOSCALE_MAX && point->y > y_axis->max) y_axis->max = point->y; } if (!inrange(point->y, y_axis->min, y_axis->max)) { point->type = OUTRANGE; continue; } if (!this_plot->noautoscale) { if (z_axis->set_autoscale & AUTOSCALE_MIN && point->z < z_axis->min) z_axis->min = point->z; if (z_axis->set_autoscale & AUTOSCALE_MAX && point->z > z_axis->max) z_axis->max = point->z; } if (!inrange(point->z, z_axis->min, z_axis->max)) { point->type = OUTRANGE; continue; } } /* End of this curve */ } /* End of this plot */ } /* Make sure the bounds are reasonable, and tweak them if they aren't */ axis_checked_extend_empty_range(FIRST_X_AXIS, NULL); axis_checked_extend_empty_range(FIRST_Y_AXIS, NULL); axis_checked_extend_empty_range(FIRST_Z_AXIS, NULL); } #endif static double splines_kernel(double h) { if (h > 0.0) { return h * h * log(h); } return 0.0; } /* PKJ: This function has been hived off out of the original grid_nongrid_data(). No changes have been made, but variables only needed locally have moved out of grid_nongrid_data() into this functin. */ static void thin_plate_splines_setup( struct iso_curve *old_iso_crvs, double **p_xx, int *p_numpoints ) { int i, j, k; double *xx, *yy, *zz, *b, **K, d; int numpoints, *indx; struct iso_curve *oicrv; numpoints = 0; for (oicrv = old_iso_crvs; oicrv != NULL; oicrv = oicrv->next) { numpoints += oicrv->p_count; } xx = gp_alloc(sizeof(xx[0]) * (numpoints + 3) * (numpoints + 8), "thin plate splines in dgrid3d"); /* the memory needed is not really (n+3)*(n+8) for now, but might be if I take into account errors ... */ K = gp_alloc(sizeof(K[0]) * (numpoints + 3), "matrix : thin plate splines 2d"); yy = xx + numpoints; zz = yy + numpoints; b = zz + numpoints; /* HBB 20010424: Count actual input points without the UNDEFINED * ones, as we copy them */ numpoints = 0; for (oicrv = old_iso_crvs; oicrv != NULL; oicrv = oicrv->next) { struct coordinate GPHUGE *opoints = oicrv->points; for (k = 0; k < oicrv->p_count; k++, opoints++) { /* HBB 20010424: avoid crashing for undefined input */ if (opoints->type == UNDEFINED) continue; xx[numpoints] = opoints->x; yy[numpoints] = opoints->y; zz[numpoints] = opoints->z; numpoints++; } } for (i = 0; i < numpoints + 3; i++) { K[i] = b + (numpoints + 3) * (i + 1); } for (i = 0; i < numpoints; i++) { for (j = i + 1; j < numpoints; j++) { double dx = xx[i] - xx[j], dy = yy[i] - yy[j]; K[i][j] = K[j][i] = -splines_kernel(sqrt(dx * dx + dy * dy)); } K[i][i] = 0.0; /* here will come the weights for errors */ b[i] = zz[i]; } for (i = 0; i < numpoints; i++) { K[i][numpoints] = K[numpoints][i] = 1.0; K[i][numpoints + 1] = K[numpoints + 1][i] = xx[i]; K[i][numpoints + 2] = K[numpoints + 2][i] = yy[i]; } b[numpoints] = 0.0; b[numpoints + 1] = 0.0; b[numpoints + 2] = 0.0; K[numpoints][numpoints] = 0.0; K[numpoints][numpoints + 1] = 0.0; K[numpoints][numpoints + 2] = 0.0; K[numpoints + 1][numpoints] = 0.0; K[numpoints + 1][numpoints + 1] = 0.0; K[numpoints + 1][numpoints + 2] = 0.0; K[numpoints + 2][numpoints] = 0.0; K[numpoints + 2][numpoints + 1] = 0.0; K[numpoints + 2][numpoints + 2] = 0.0; indx = gp_alloc(sizeof(indx[0]) * (numpoints + 3), "indexes lu"); /* actually, K is *not* positive definite, but has only non zero real eigenvalues -> we can use an lu_decomp safely */ lu_decomp(K, numpoints + 3, indx, &d); lu_backsubst(K, numpoints + 3, indx, b); free( K ); free( indx ); *p_xx = xx; *p_numpoints = numpoints; } static double qnorm( double dist_x, double dist_y, int q ) { double dist = 0.0; switch (q) { case 1: dist = dist_x + dist_y; break; case 2: dist = dist_x * dist_x + dist_y * dist_y; break; case 4: dist = dist_x * dist_x + dist_y * dist_y; dist *= dist; break; case 8: dist = dist_x * dist_x + dist_y * dist_y; dist *= dist; dist *= dist; break; case 16: dist = dist_x * dist_x + dist_y * dist_y; dist *= dist; dist *= dist; dist *= dist; break; default: dist = pow(dist_x, (double)q ) + pow(dist_y, (double)q ); break; } return dist; } /* This is from Numerical Recipes in C, 2nd ed, p70 */ static double pythag( double dx, double dy ) { double x, y; x = fabs(dx); y = fabs(dy); if( x > y ) { return x*sqrt(1.0 + (y*y)/(x*x)); } if( y==0.0 ) { return 0.0; } return y*sqrt(1.0 + (x*x)/(y*y)); } static void grid_nongrid_data(struct surface_points *this_plot) { int i, j, k; double x, y, z, w, dx, dy, xmin, xmax, ymin, ymax; struct iso_curve *old_iso_crvs = this_plot->iso_crvs; struct iso_curve *icrv, *oicrv, *oicrvs; /* these are only needed for thin_plate_splines */ double *xx, *yy, *zz, *b; int numpoints; xx = NULL; /* save to call free() on NULL if xx has never been used */ /* Compute XY bounding box on the original data. */ /* FIXME HBB 20010424: Does this make any sense? Shouldn't we just * use whatever the x and y ranges have been found to be, and * that's that? The largest difference this is going to make is if * we plot a datafile that doesn't span the whole x/y range * used. Do we want a dgrid3d over the actual data rectangle, or * over the xrange/yrange area? */ xmin = xmax = old_iso_crvs->points[0].x; ymin = ymax = old_iso_crvs->points[0].y; for (icrv = old_iso_crvs; icrv != NULL; icrv = icrv->next) { struct coordinate GPHUGE *points = icrv->points; for (i = 0; i < icrv->p_count; i++, points++) { /* HBB 20010424: avoid crashing for undefined input */ if (points->type == UNDEFINED) continue; if (xmin > points->x) xmin = points->x; if (xmax < points->x) xmax = points->x; if (ymin > points->y) ymin = points->y; if (ymax < points->y) ymax = points->y; } } dx = (xmax - xmin) / (dgrid3d_col_fineness - 1); dy = (ymax - ymin) / (dgrid3d_row_fineness - 1); /* Create the new grid structure, and compute the low pass filtering from * non grid to grid structure. */ this_plot->iso_crvs = NULL; this_plot->num_iso_read = dgrid3d_col_fineness; this_plot->has_grid_topology = TRUE; if( dgrid3d_mode == DGRID3D_SPLINES ) { thin_plate_splines_setup( old_iso_crvs, &xx, &numpoints ); yy = xx + numpoints; zz = yy + numpoints; b = zz + numpoints; } for (i = 0, x = xmin; i < dgrid3d_col_fineness; i++, x += dx) { struct coordinate GPHUGE *points; icrv = iso_alloc(dgrid3d_row_fineness + 1); icrv->p_count = dgrid3d_row_fineness; icrv->next = this_plot->iso_crvs; this_plot->iso_crvs = icrv; points = icrv->points; for(j=0, y=ymin; j<dgrid3d_row_fineness; j++, y+=dy, points++) { z = w = 0.0; /* as soon as ->type is changed to UNDEFINED, break out of * two inner loops! */ points->type = INRANGE; if( dgrid3d_mode == DGRID3D_SPLINES ) { z = b[numpoints]; for (k = 0; k < numpoints; k++) { double dx = xx[k] - x, dy = yy[k] - y; z = z - b[k] * splines_kernel(sqrt(dx * dx + dy * dy)); } z = z + b[numpoints + 1] * x + b[numpoints + 2] * y; } else { /* everything, except splines */ for(oicrv = old_iso_crvs; oicrv != NULL; oicrv = oicrv->next) { struct coordinate GPHUGE *opoints = oicrv->points; for (k = 0; k < oicrv->p_count; k++, opoints++) { if( dgrid3d_mode == DGRID3D_QNORM ) { double dist = qnorm( fabs(opoints->x - x), fabs(opoints->y - y), dgrid3d_norm_value ); if( dist == 0.0 ) { /* HBB 981209: revised flagging as undefined */ /* Supporting all those infinities on various * platforms becomes tiresome, * to say the least :-( * Let's just return the first z where this * happens unchanged, and be done with this, * period. */ points->type = UNDEFINED; z = opoints->z; w = 1.0; break; /* out of inner loop */ } else { z += opoints->z / dist; w += 1.0/dist; } } else { /* ALL else: not spline, not qnorm! */ double weight = 0.0; double dist=pythag((opoints->x-x)/dgrid3d_x_scale, (opoints->y-y)/dgrid3d_y_scale); if( dgrid3d_mode == DGRID3D_GAUSS ) { weight = exp( -dist*dist ); } else if( dgrid3d_mode == DGRID3D_CAUCHY ) { weight = 1.0/(1.0 + dist*dist ); } else if( dgrid3d_mode == DGRID3D_EXP ) { weight = exp( -dist ); } else if( dgrid3d_mode == DGRID3D_BOX ) { weight = (dist<1.0) ? 1.0 : 0.0; } else if( dgrid3d_mode == DGRID3D_HANN ) { if( dist < 1.0 ) { weight = 0.5*(1-cos(2.0*M_PI*dist)); } } z += opoints->z * weight; w += weight; } } /* PKJ: I think this is only relevant for qnorm */ if (points->type != INRANGE) break; /* out of the second-inner loop as well ... */ } } /* endif( dgrid3d_mode == DGRID3D_SPLINES ) */ /* Now that we've escaped the loops safely, we know that we * do have a good value in z and w, so we can proceed just as * if nothing had happened at all. Nice, isn't it? */ points->type = INRANGE; /* HBB 20010424: if log x or log y axis, we don't want to * log() the value again --> just store it, and trust that * it's always inrange */ points->x = x; points->y = y; /* Honor requested x and y limits */ /* FIXME: This code section was not in 4.2. It imperfectly */ /* restores the clipping behaviour of version 3.7 and earlier. */ if ((x < axis_array[x_axis].min && !(axis_array[x_axis].autoscale & AUTOSCALE_MIN)) || (x > axis_array[x_axis].max && !(axis_array[x_axis].autoscale & AUTOSCALE_MAX)) || (y < axis_array[y_axis].min && !(axis_array[y_axis].autoscale & AUTOSCALE_MIN)) || (y > axis_array[y_axis].max && !(axis_array[y_axis].autoscale & AUTOSCALE_MAX))) points->type = OUTRANGE; if (dgrid3d_mode != DGRID3D_SPLINES && !dgrid3d_kdensity) z = z / w; STORE_WITH_LOG_AND_UPDATE_RANGE(points->z, z, points->type, z_axis, this_plot->noautoscale, NOOP, continue); if (this_plot->pm3d_color_from_column) int_error(NO_CARET, "Gridding of the color column is not implemented"); else { COLOR_STORE_WITH_LOG_AND_UPDATE_RANGE(points->CRD_COLOR, z, points->type, COLOR_AXIS, this_plot->noautoscale, NOOP, continue); } } } free(xx); /* save to call free on NULL pointer if splines not used */ /* Delete the old non grid data. */ for (oicrvs = old_iso_crvs; oicrvs != NULL;) { oicrv = oicrvs; oicrvs = oicrvs->next; iso_free(oicrv); } } /* Get 3D data from file, and store into this_plot data * structure. Takes care of 'set mapping' and 'set dgrid3d'. * * Notice: this_plot->token is end of datafile spec, before title etc * will be moved past title etc after we return */ static int get_3ddata(struct surface_points *this_plot) { int xdatum = 0; int ydatum = 0; int j; double v[MAXDATACOLS]; int pt_in_iso_crv = 0; struct iso_curve *this_iso; int retval = 0; if (mapping3d == MAP3D_CARTESIAN) { /* do this check only, if we have PM3D / PM3D-COLUMN not compiled in */ if (df_no_use_specs == 2) int_error(this_plot->token, "Need 1 or 3 columns for cartesian data"); /* HBB NEW 20060427: if there's only one, explicit using * column, it's z data. df_axis[] has to reflect that, so * df_readline() will expect time/date input. */ if (df_no_use_specs == 1) df_axis[0] = FIRST_Z_AXIS; } else { if (df_no_use_specs == 1) int_error(this_plot->token, "Need 2 or 3 columns for polar data"); } this_plot->num_iso_read = 0; this_plot->has_grid_topology = TRUE; this_plot->pm3d_color_from_column = FALSE; /* we ought to keep old memory - most likely case * is a replot, so it will probably exactly fit into * memory already allocated ? */ if (this_plot->iso_crvs != NULL) { struct iso_curve *icrv, *icrvs = this_plot->iso_crvs; while (icrvs) { icrv = icrvs; icrvs = icrvs->next; iso_free(icrv); } this_plot->iso_crvs = NULL; } /* data file is already open */ if (df_matrix) this_plot->has_grid_topology = TRUE; { /*{{{ read surface from text file */ struct iso_curve *local_this_iso = iso_alloc(samples_1); struct coordinate GPHUGE *cp; struct coordinate GPHUGE *cptail = NULL; /* Only for VECTOR plots */ double x, y, z; double xtail, ytail, ztail; double color = VERYLARGE; int pm3d_color_from_column = FALSE; #define color_from_column(x) pm3d_color_from_column = x if (this_plot->plot_style == LABELPOINTS) expect_string( 4 ); if (this_plot->plot_style == VECTOR) { local_this_iso->next = iso_alloc(samples_1); local_this_iso->next->p_count = 0; } /* If the user has set an explicit locale for numeric input, apply it */ /* here so that it affects data fields read from the input file. */ set_numeric_locale(); /* Initial state */ df_warn_on_missing_columnheader = TRUE; while ((retval = df_readline(v,MAXDATACOLS)) != DF_EOF) { j = retval; if (j == 0) /* not blank line, but df_readline couldn't parse it */ int_warn(NO_CARET, "Bad data on line %d of file %s", df_line_number, df_filename ? df_filename : ""); if (j == DF_SECOND_BLANK) break; /* two blank lines */ if (j == DF_FIRST_BLANK) { /* Images are in a sense similar to isocurves. * However, the routine for images is written to * compute the two dimensions of coordinates by * examining the data alone. That way it can be used * in the 2D plots, for which there is no isoline * record. So, toss out isoline information for * images. */ if ((this_plot->plot_style == IMAGE) || (this_plot->plot_style == RGBIMAGE) || (this_plot->plot_style == RGBA_IMAGE)) continue; if (this_plot->plot_style == VECTOR) continue; /* one blank line */ if (pt_in_iso_crv == 0) { if (xdatum == 0) continue; pt_in_iso_crv = xdatum; } if (xdatum > 0) { local_this_iso->p_count = xdatum; local_this_iso->next = this_plot->iso_crvs; this_plot->iso_crvs = local_this_iso; this_plot->num_iso_read++; if (xdatum != pt_in_iso_crv) this_plot->has_grid_topology = FALSE; local_this_iso = iso_alloc(pt_in_iso_crv); xdatum = 0; ydatum++; } continue; } else if (j == DF_FOUND_KEY_TITLE){ /* only the shared part of the 2D and 3D headers is used */ df_set_key_title((struct curve_points *)this_plot); continue; } else if (j == DF_KEY_TITLE_MISSING){ fprintf(stderr, "get_data: key title not found in requested column\n" ); continue; } else if (j == DF_COLUMN_HEADERS) { continue; } /* its a data point or undefined */ if (xdatum >= local_this_iso->p_max) { /* overflow about to occur. Extend size of points[] * array. Double the size, and add 1000 points, to * avoid needlessly small steps. */ iso_extend(local_this_iso, xdatum + xdatum + 1000); if (this_plot->plot_style == VECTOR) { iso_extend(local_this_iso->next, xdatum + xdatum + 1000); local_this_iso->next->p_count = 0; } } cp = local_this_iso->points + xdatum; if (this_plot->plot_style == VECTOR) { if (j < 6) { cp->type = UNDEFINED; continue; } cptail = local_this_iso->next->points + xdatum; } if (j == DF_UNDEFINED || j == DF_MISSING) { cp->type = UNDEFINED; goto come_here_if_undefined; } cp->type = INRANGE; /* unless we find out different */ /* EAM Oct 2004 - Substantially rework this section */ /* now that there are many more plot types. */ x = y = z = 0.0; xtail = ytail = ztail = 0.0; /* The x, y, z coordinates depend on the mapping type */ switch (mapping3d) { case MAP3D_CARTESIAN: if (j == 1) { x = xdatum; y = ydatum; z = v[0]; j = 3; break; } if (j == 2) { if (PM3DSURFACE != this_plot->plot_style) int_error(this_plot->token, "2 columns only possible with explicit pm3d style (line %d)", df_line_number); x = xdatum; y = ydatum; z = v[0]; color_from_column(TRUE); color = v[1]; j = 3; break; } /* Assume everybody agrees that x,y,z are the first three specs */ if (j >= 3) { x = v[0]; y = v[1]; z = v[2]; break; } break; case MAP3D_SPHERICAL: if (j < 2) int_error(this_plot->token, "Need 2 or 3 columns"); if (j < 3) { v[2] = 1; /* default radius */ j = 3; } /* Convert to radians. */ v[0] *= ang2rad; v[1] *= ang2rad; x = v[2] * cos(v[0]) * cos(v[1]); y = v[2] * sin(v[0]) * cos(v[1]); z = v[2] * sin(v[1]); break; case MAP3D_CYLINDRICAL: if (j < 2) int_error(this_plot->token, "Need 2 or 3 columns"); if (j < 3) { v[2] = 1; /* default radius */ j = 3; } /* Convert to radians. */ v[0] *= ang2rad; x = v[2] * cos(v[0]); y = v[2] * sin(v[0]); z = v[1]; break; default: int_error(NO_CARET, "Internal error: Unknown mapping type"); return retval; } if (j < df_no_use_specs) int_error(this_plot->token, "Wrong number of columns in input data - line %d", df_line_number); /* FIXME: Work-around for hidden3d, which otherwise would use */ /* the color of the vector midpoint rather than the endpoint. */ if (this_plot->plot_style == IMPULSES) { if (this_plot->lp_properties.pm3d_color.type == TC_Z) { color = z; color_from_column(TRUE); } } /* After the first three columns it gets messy because */ /* different plot styles assume different contents in the columns */ if (j >= 4) { if (( this_plot->plot_style == POINTSTYLE || this_plot->plot_style == LINESPOINTS) && this_plot->lp_properties.p_size == PTSZ_VARIABLE) { cp->CRD_PTSIZE = v[3]; color = z; color_from_column(FALSE); } else if (this_plot->plot_style == LABELPOINTS) { /* 4th column holds label text rather than color */ /* text = df_tokens[3]; */ color = z; color_from_column(FALSE); } else { color = v[3]; color_from_column(TRUE); } } if (j >= 5) { if ((this_plot->plot_style == POINTSTYLE || this_plot->plot_style == LINESPOINTS) && this_plot->lp_properties.p_size == PTSZ_VARIABLE) { color = v[4]; color_from_column(TRUE); } if (this_plot->plot_style == LABELPOINTS) { /* take color from an explicitly given 5th column */ color = v[4]; color_from_column(TRUE); } } if (j >= 6) { if (this_plot->plot_style == VECTOR) { xtail = x + v[3]; ytail = y + v[4]; ztail = z + v[5]; if (j >= 7) { color = v[6]; color_from_column(TRUE); } else { color = z; color_from_column(FALSE); } } } #undef color_from_column /* Adjust for logscales. Set min/max and point types. Store in cp. * The macro cannot use continue, as it is wrapped in a loop. * I regard this as correct goto use */ cp->type = INRANGE; STORE_WITH_LOG_AND_UPDATE_RANGE(cp->x, x, cp->type, x_axis, this_plot->noautoscale, NOOP, goto come_here_if_undefined); STORE_WITH_LOG_AND_UPDATE_RANGE(cp->y, y, cp->type, y_axis, this_plot->noautoscale, NOOP, goto come_here_if_undefined); if (this_plot->plot_style == VECTOR) { cptail->type = INRANGE; STORE_WITH_LOG_AND_UPDATE_RANGE(cptail->x, xtail, cp->type, x_axis, this_plot->noautoscale, NOOP, goto come_here_if_undefined); STORE_WITH_LOG_AND_UPDATE_RANGE(cptail->y, ytail, cp->type, y_axis, this_plot->noautoscale, NOOP, goto come_here_if_undefined); } if (dgrid3d) { /* HBB 20010424: in dgrid3d mode, delay log() taking * and scaling until after the dgrid process. Only for * z, not for x and y, so we can layout the newly * created created grid more easily. */ cp->z = z; if (this_plot->plot_style == VECTOR) cptail->z = ztail; } else { /* EAM Sep 2008 - Otherwise z=Nan or z=Inf or DF_MISSING fails */ /* to set CRD_COLOR at all, since the z test bails to a goto. */ if (this_plot->plot_style == IMAGE) { cp->CRD_COLOR = z; } STORE_WITH_LOG_AND_UPDATE_RANGE(cp->z, z, cp->type, z_axis, this_plot->noautoscale, NOOP, goto come_here_if_undefined); if (this_plot->plot_style == VECTOR) STORE_WITH_LOG_AND_UPDATE_RANGE(cptail->z, ztail, cp->type, z_axis, this_plot->noautoscale, NOOP, goto come_here_if_undefined); if (this_plot->lp_properties.l_type == LT_COLORFROMCOLUMN) cp->CRD_COLOR = color; if (NEED_PALETTE(this_plot)) { if (pm3d_color_from_column) { COLOR_STORE_WITH_LOG_AND_UPDATE_RANGE(cp->CRD_COLOR, color, cp->type, COLOR_AXIS, this_plot->noautoscale, NOOP, goto come_here_if_undefined); } else { COLOR_STORE_WITH_LOG_AND_UPDATE_RANGE(cp->CRD_COLOR, z, cp->type, COLOR_AXIS, this_plot->noautoscale, NOOP, goto come_here_if_undefined); } } } /* At this point we have stored the point coordinates. Now we need to copy */ /* x,y,z into the text_label structure and add the actual text string. */ if (this_plot->plot_style == LABELPOINTS) store_label(this_plot->labels, cp, xdatum, df_tokens[3], color); if (this_plot->plot_style == RGBIMAGE || this_plot->plot_style == RGBA_IMAGE) { /* We will autoscale the RGB components to a total range [0:255] * so we don't need to do any fancy scaling here. */ cp->CRD_R = v[3]; cp->CRD_G = v[4]; cp->CRD_B = v[5]; cp->CRD_A = v[6]; /* Alpha channel */ } come_here_if_undefined: /* some may complain, but I regard this as the correct use of goto */ ++xdatum; } /* end of whileloop - end of surface */ /* We are finished reading user input; return to C locale for internal use */ reset_numeric_locale(); if (pm3d_color_from_column) { this_plot->pm3d_color_from_column = pm3d_color_from_column; } if (xdatum > 0) { this_plot->num_iso_read++; /* Update last iso. */ local_this_iso->p_count = xdatum; /* If this is a VECTOR plot then iso->next is already */ /* occupied by the vector tail coordinates. */ if (this_plot->plot_style != VECTOR) local_this_iso->next = this_plot->iso_crvs; this_plot->iso_crvs = local_this_iso; if (xdatum != pt_in_iso_crv) this_plot->has_grid_topology = FALSE; } else { /* Free last allocation */ if (this_plot->plot_style == VECTOR) iso_free(local_this_iso->next); iso_free(local_this_iso); } /*}}} */ } if (dgrid3d && this_plot->num_iso_read > 0) grid_nongrid_data(this_plot); /* This check used to be done in graph3d */ if (X_AXIS.min == VERYLARGE || X_AXIS.max == -VERYLARGE || Y_AXIS.min == VERYLARGE || Y_AXIS.max == -VERYLARGE || Z_AXIS.min == VERYLARGE || Z_AXIS.max == -VERYLARGE) { /* FIXME: Should we set plot type to NODATA? */ /* But in the case of 'set view map' we may not care about Z */ int_warn(NO_CARET, "No usable data in this plot to auto-scale axis range"); } if (this_plot->num_iso_read <= 1) this_plot->has_grid_topology = FALSE; if (this_plot->has_grid_topology && !hidden3d) { struct iso_curve *new_icrvs = NULL; int num_new_iso = this_plot->iso_crvs->p_count; int len_new_iso = this_plot->num_iso_read; int i; /* Now we need to set the other direction (pseudo) isolines. */ for (i = 0; i < num_new_iso; i++) { struct iso_curve *new_icrv = iso_alloc(len_new_iso); new_icrv->p_count = len_new_iso; for (j = 0, this_iso = this_plot->iso_crvs; this_iso != NULL; j++, this_iso = this_iso->next) { /* copy whole point struct to get type too. * wasteful for windows, with padding */ /* more efficient would be extra pointer to same struct */ new_icrv->points[j] = this_iso->points[i]; } new_icrv->next = new_icrvs; new_icrvs = new_icrv; } /* Append the new iso curves after the read ones. */ for (this_iso = this_plot->iso_crvs; this_iso->next != NULL; this_iso = this_iso->next); this_iso->next = new_icrvs; } return retval; } /* HBB 20000501: code isolated from eval_3dplots(), where practically * identical code occured twice, for direct and crossing isolines, * respectively. The latter only are done for in non-hidden3d * mode. */ static void calculate_set_of_isolines( AXIS_INDEX value_axis, TBOOLEAN cross, struct iso_curve **this_iso, AXIS_INDEX iso_axis, double iso_min, double iso_step, int num_iso_to_use, AXIS_INDEX sam_axis, double sam_min, double sam_step, int num_sam_to_use, TBOOLEAN need_palette) { int i, j; struct coordinate GPHUGE *points = (*this_iso)->points; int do_update_color = need_palette && (!parametric || (parametric && value_axis == FIRST_Z_AXIS)); for (j = 0; j < num_iso_to_use; j++) { double iso = iso_min + j * iso_step; /* HBB 20000501: with the new code, it should * be safe to rely on the actual 'v' axis not * to be improperly logscaled... */ (void) Gcomplex(&plot_func.dummy_values[cross ? 0 : 1], AXIS_DE_LOG_VALUE(iso_axis, iso), 0.0); for (i = 0; i < num_sam_to_use; i++) { double sam = sam_min + i * sam_step; struct value a; double temp; (void) Gcomplex(&plot_func.dummy_values[cross ? 1 : 0], AXIS_DE_LOG_VALUE(sam_axis, sam), 0.0); if (cross) { points[i].x = iso; points[i].y = sam; } else { points[i].x = sam; points[i].y = iso; } evaluate_at(plot_func.at, &a); if (undefined || (fabs(imag(&a)) > zero)) { points[i].type = UNDEFINED; continue; } temp = real(&a); points[i].type = INRANGE; STORE_WITH_LOG_AND_UPDATE_RANGE(points[i].z, temp, points[i].type, value_axis, FALSE, NOOP, NOOP); if (do_update_color) { COLOR_STORE_WITH_LOG_AND_UPDATE_RANGE(points[i].CRD_COLOR, temp, points[i].type, COLOR_AXIS, FALSE, NOOP, NOOP); } } (*this_iso)->p_count = num_sam_to_use; *this_iso = (*this_iso)->next; points = (*this_iso) ? (*this_iso)->points : NULL; } } /* * This parses the splot command after any range specifications. To support * autoscaling on the x/z axis, we want any data files to define the x/y * range, then to plot any functions using that range. We thus parse the * input twice, once to pick up the data files, and again to pick up the * functions. Definitions are processed twice, but that won't hurt. * div - okay, it doesn't hurt, but every time an option as added for * datafiles, code to parse it has to be added here. Change so that * we store starting-token in the plot structure. */ static void eval_3dplots() { int i; struct surface_points **tp_3d_ptr; int start_token=0, end_token; int begin_token; TBOOLEAN some_data_files = FALSE, some_functions = FALSE; TBOOLEAN was_definition = FALSE; int df_return = 0; int plot_num, line_num, point_num; /* part number of parametric function triplet: 0 = z, 1 = y, 2 = x */ int crnt_param = 0; char *xtitle; char *ytitle; legend_key *key = &keyT; /* Free memory from previous splot. * If there is an error within this function, the memory is left allocated, * since we cannot call sp_free if the list is incomplete */ if (first_3dplot && plot3d_num>0) sp_free(first_3dplot); plot3d_num=0; first_3dplot = NULL; x_axis = FIRST_X_AXIS; y_axis = FIRST_Y_AXIS; z_axis = FIRST_Z_AXIS; tp_3d_ptr = &(first_3dplot); plot_num = 0; line_num = 0; /* default line type */ point_num = 0; /* default point type */ /* Assume that the input data can be re-read later */ volatile_data = FALSE; xtitle = NULL; ytitle = NULL; begin_token = c_token; /*** First Pass: Read through data files ***/ /* * This pass serves to set the x/yranges and to parse the command, as * well as filling in every thing except the function data. That is done * after the x/yrange is defined. */ plot_iterator = check_for_iteration(); while (TRUE) { /* Forgive trailing comma on a multi-element plot command */ if (END_OF_COMMAND) { if (plot_num == 0) int_error(c_token, "function to plot expected"); break; } if (crnt_param == 0 && !was_definition) start_token = c_token; if (is_definition(c_token)) { define(); if (!equals(c_token,",")) { was_definition = TRUE; continue; } } else { int specs = -1; struct surface_points *this_plot; char *name_str; TBOOLEAN duplication = FALSE; TBOOLEAN set_title = FALSE, set_with = FALSE; TBOOLEAN set_lpstyle = FALSE; TBOOLEAN checked_once = FALSE; TBOOLEAN set_labelstyle = FALSE; if (!was_definition && (!parametric || crnt_param == 0)) start_token = c_token; was_definition = FALSE; dummy_func = &plot_func; /* WARNING: do NOT free name_str */ /* FIXME: could also be saved in this_plot */ name_str = string_or_express(NULL); dummy_func = NULL; if (name_str) { /*{{{ data file to plot */ if (parametric && crnt_param != 0) int_error(c_token, "previous parametric function not fully specified"); if (!some_data_files) { if (axis_array[FIRST_X_AXIS].autoscale & AUTOSCALE_MIN) { axis_array[FIRST_X_AXIS].min = VERYLARGE; } if (axis_array[FIRST_X_AXIS].autoscale & AUTOSCALE_MAX) { axis_array[FIRST_X_AXIS].max = -VERYLARGE; } if (axis_array[FIRST_Y_AXIS].autoscale & AUTOSCALE_MIN) { axis_array[FIRST_Y_AXIS].min = VERYLARGE; } if (axis_array[FIRST_Y_AXIS].autoscale & AUTOSCALE_MAX) { axis_array[FIRST_Y_AXIS].max = -VERYLARGE; } some_data_files = TRUE; } if (*tp_3d_ptr) this_plot = *tp_3d_ptr; else { /* no memory malloc()'d there yet */ /* Allocate enough isosamples and samples */ this_plot = sp_alloc(0, 0, 0, 0); *tp_3d_ptr = this_plot; } this_plot->plot_type = DATA3D; this_plot->plot_style = data_style; df_set_plot_mode(MODE_SPLOT); specs = df_open(name_str, MAXDATACOLS, (struct curve_points *)this_plot); if (df_matrix) this_plot->has_grid_topology = TRUE; /* parses all datafile-specific modifiers */ /* we will load the data after parsing title,with,... */ /* for capture to key */ this_plot->token = end_token = c_token - 1; /* FIXME: Is this really needed? */ this_plot->iteration = plot_iterator ? plot_iterator->iteration : 0; /* this_plot->token is temporary, for errors in get_3ddata() */ if (specs < 3) { if (axis_array[FIRST_X_AXIS].datatype == DT_TIMEDATE) { int_error(c_token, "Need full using spec for x time data"); } if (axis_array[FIRST_Y_AXIS].datatype == DT_TIMEDATE) { int_error(c_token, "Need full using spec for y time data"); } } df_axis[0] = FIRST_X_AXIS; df_axis[1] = FIRST_Y_AXIS; df_axis[2] = FIRST_Z_AXIS; /*}}} */ } else { /* function to plot */ /*{{{ function */ ++plot_num; if (parametric) { /* Rotate between x/y/z axes */ /* +2 same as -1, but beats -ve problem */ crnt_param = (crnt_param + 2) % 3; } if (*tp_3d_ptr) { this_plot = *tp_3d_ptr; if (!hidden3d) sp_replace(this_plot, samples_1, iso_samples_1, samples_2, iso_samples_2); else sp_replace(this_plot, iso_samples_1, 0, 0, iso_samples_2); } else { /* no memory malloc()'d there yet */ /* Allocate enough isosamples and samples */ if (!hidden3d) this_plot = sp_alloc(samples_1, iso_samples_1, samples_2, iso_samples_2); else this_plot = sp_alloc(iso_samples_1, 0, 0, iso_samples_2); *tp_3d_ptr = this_plot; } this_plot->plot_type = FUNC3D; this_plot->has_grid_topology = TRUE; this_plot->plot_style = func_style; this_plot->num_iso_read = iso_samples_2; /* ignore it for now */ some_functions = TRUE; end_token = c_token - 1; /*}}} */ } /* end of IS THIS A FILE OR A FUNC block */ /* clear current title, if exist */ if (this_plot->title) { free(this_plot->title); this_plot->title = NULL; } /* default line and point types, no palette */ this_plot->lp_properties.use_palette = 0; this_plot->lp_properties.l_type = line_num; this_plot->lp_properties.p_type = point_num; /* user may prefer explicit line styles */ this_plot->hidden3d_top_linetype = line_num; if (prefer_line_styles) lp_use_properties(&this_plot->lp_properties, line_num+1); else load_linetype(&this_plot->lp_properties, line_num+1); /* pm 25.11.2001 allow any order of options */ while (!END_OF_COMMAND || !checked_once) { /* deal with title */ if (almost_equals(c_token, "t$itle")) { if (set_title) { duplication=TRUE; break; } this_plot->title_no_enhanced = !key->enhanced; /* title can be enhanced if not explicitly disabled */ if (parametric) { if (crnt_param != 0) int_error(c_token, "\"title\" allowed only after parametric function fully specified"); else { if (xtitle != NULL) xtitle[0] = NUL; /* Remove default title . */ if (ytitle != NULL) ytitle[0] = NUL; /* Remove default title . */ } } c_token++; if (almost_equals(c_token,"col$umnheader")) { df_set_key_title_columnhead((struct curve_points *)this_plot); } else #ifdef BACKWARDS_COMPATIBLE /* Annoying backwards-compatibility hack - deprecate! */ if (isanumber(c_token)) { c_token--; df_set_key_title_columnhead((struct curve_points *)this_plot); } else #endif if (!(this_plot->title = try_to_get_string())) int_error(c_token, "expecting \"title\" for plot"); set_title = TRUE; continue; } if (almost_equals(c_token, "not$itle")) { if (set_title) { duplication=TRUE; break; } c_token++; if (isstringvalue(c_token)) try_to_get_string(); /* ignore optionally given title string */ this_plot->title_is_suppressed = TRUE; if (xtitle != NULL) xtitle[0] = '\0'; if (ytitle != NULL) ytitle[0] = '\0'; set_title = TRUE; continue; } /* deal with style */ if (almost_equals(c_token, "w$ith")) { if (set_with) { duplication=TRUE; break; } this_plot->plot_style = get_style(); if ((this_plot->plot_type == FUNC3D) && ((this_plot->plot_style & PLOT_STYLE_HAS_ERRORBAR) || (this_plot->plot_style == LABELPOINTS))) { int_warn(c_token, "This plot style is only for datafiles , reverting to \"points\""); this_plot->plot_style = POINTSTYLE; } if ((this_plot->plot_style | data_style) & PM3DSURFACE) { if (equals(c_token, "at")) { /* option 'with pm3d [at ...]' is explicitly specified */ c_token++; if (get_pm3d_at_option(&this_plot->pm3d_where[0])) return; /* error */ } } if (this_plot->plot_style == IMAGE || this_plot->plot_style == RGBA_IMAGE || this_plot->plot_style == RGBIMAGE) get_image_options(&this_plot->image_properties); set_with = TRUE; continue; } /* Hidden3D code by default includes points, labels and vectors */ /* in the hidden3d processing. Check here if this particular */ /* plot wants to be excluded. */ if (almost_equals(c_token, "nohidden$3d")) { c_token++; this_plot->opt_out_of_hidden3d = TRUE; continue; } /* "set contour" is global. Allow individual plots to opt out */ if (almost_equals(c_token, "nocon$tours")) { c_token++; this_plot->opt_out_of_contours = TRUE; continue; } /* "set surface" is global. Allow individual plots to opt out */ if (almost_equals(c_token, "nosur$face")) { c_token++; this_plot->opt_out_of_surface = TRUE; continue; } /* Labels can have font and text property info as plot options */ /* In any case we must allocate one instance of the text style */ /* that all labels in the plot will share. */ if (this_plot->plot_style == LABELPOINTS) { int stored_token = c_token; if (this_plot->labels == NULL) { this_plot->labels = new_text_label(-1); this_plot->labels->pos = CENTRE; this_plot->labels->layer = LAYER_PLOTLABELS; } parse_label_options(this_plot->labels); checked_once = TRUE; if (stored_token != c_token) { if (set_labelstyle) { duplication = TRUE; break; } else { set_labelstyle = TRUE; continue; } } } /* pick up line/point specs * - point spec allowed if style uses points, ie style&2 != 0 * - keywords are optional */ if (this_plot->plot_style == VECTOR) { int stored_token = c_token; if (!checked_once) { default_arrow_style(&this_plot->arrow_properties); load_linetype(&(this_plot->arrow_properties.lp_properties), line_num+1); checked_once = TRUE; } arrow_parse(&this_plot->arrow_properties, TRUE); if (stored_token != c_token) { if (set_lpstyle) { duplication = TRUE; break; } else { set_lpstyle = TRUE; this_plot->lp_properties = this_plot->arrow_properties.lp_properties; continue; } } } else { int stored_token = c_token; struct lp_style_type lp = DEFAULT_LP_STYLE_TYPE; int new_lt = 0; lp.l_type = line_num; lp.p_type = point_num; /* user may prefer explicit line styles */ if (prefer_line_styles) lp_use_properties(&lp, line_num+1); else load_linetype(&lp, line_num+1); new_lt = lp_parse(&lp, TRUE, this_plot->plot_style & PLOT_STYLE_HAS_POINT); checked_once = TRUE; if (stored_token != c_token) { if (set_lpstyle) { duplication=TRUE; break; } else { this_plot->lp_properties = lp; set_lpstyle = TRUE; if (new_lt) this_plot->hidden3d_top_linetype = new_lt - 1; continue; } } } break; /* unknown option */ } /* while (!END_OF_COMMAND)*/ if (duplication) int_error(c_token, "duplicated or contradicting arguments in plot options"); /* set default values for title if this has not been specified */ this_plot->title_is_filename = FALSE; if (!set_title) { this_plot->title_no_enhanced = TRUE; /* filename or function cannot be enhanced */ if (key->auto_titles == FILENAME_KEYTITLES) { m_capture(&(this_plot->title), start_token, end_token); if (crnt_param == 2) xtitle = this_plot->title; else if (crnt_param == 1) ytitle = this_plot->title; this_plot->title_is_filename = TRUE; } else { if (xtitle != NULL) xtitle[0] = '\0'; if (ytitle != NULL) ytitle[0] = '\0'; /* this_plot->title = NULL; */ } } /* No line/point style given. As lp_parse also supplies * the defaults for linewidth and pointsize, call it now * to define them. */ if (! set_lpstyle) { if (this_plot->plot_style == VECTOR) { this_plot->arrow_properties.lp_properties.l_type = line_num; arrow_parse(&this_plot->arrow_properties, TRUE); this_plot->lp_properties = this_plot->arrow_properties.lp_properties; } else { int new_lt = 0; this_plot->lp_properties.l_type = line_num; this_plot->lp_properties.l_width = 1.0; this_plot->lp_properties.p_type = point_num; this_plot->lp_properties.p_size = pointsize; this_plot->lp_properties.use_palette = 0; /* user may prefer explicit line styles */ if (prefer_line_styles) lp_use_properties(&this_plot->lp_properties, line_num+1); else load_linetype(&this_plot->lp_properties, line_num+1); new_lt = lp_parse(&this_plot->lp_properties, TRUE, this_plot->plot_style & PLOT_STYLE_HAS_POINT); if (new_lt) this_plot->hidden3d_top_linetype = new_lt - 1; else this_plot->hidden3d_top_linetype = line_num; } #ifdef BACKWARDS_COMPATIBLE /* allow old-style syntax - ignore case lt 3 4 for example */ if (!END_OF_COMMAND && isanumber(c_token)) { this_plot->lp_properties.l_type = this_plot->lp_properties.p_type = int_expression() - 1; if (isanumber(c_token)) this_plot->lp_properties.p_type = int_expression() - 1; } #endif } /* Some low-level routines expect to find the pointflag attribute */ /* in lp_properties (they don't have access to the full header). */ if (this_plot->plot_style & PLOT_STYLE_HAS_POINT) this_plot->lp_properties.pointflag = TRUE; /* Rule out incompatible line/point/style options */ if (this_plot->plot_type == FUNC3D) { if ((this_plot->plot_style & PLOT_STYLE_HAS_POINT) && (this_plot->lp_properties.p_size == PTSZ_VARIABLE)) this_plot->lp_properties.p_size = 1; } if (this_plot->plot_style == LINES) { this_plot->opt_out_of_hidden3d = FALSE; } if (crnt_param == 0 && this_plot->plot_style != PM3DSURFACE /* don't increment the default line/point properties if * this_plot is an EXPLICIT pm3d surface plot */ && this_plot->plot_style != IMAGE && this_plot->plot_style != RGBIMAGE && this_plot->plot_style != RGBA_IMAGE /* same as above, for an (rgb)image plot */ ) { if (this_plot->plot_style & PLOT_STYLE_HAS_POINT) point_num += 1 + (draw_contour != 0) + (hidden3d != 0); line_num += 1 + (draw_contour != 0) + (hidden3d != 0); } if (this_plot->plot_style == IMAGE) this_plot->lp_properties.use_palette = 1; if (this_plot->plot_style == RGBIMAGE || this_plot->plot_style == RGBA_IMAGE) { if (CB_AXIS.autoscale & AUTOSCALE_MIN) CB_AXIS.min = 0; if (CB_AXIS.autoscale & AUTOSCALE_MAX) CB_AXIS.max = 255; } /* now get the data... having to think hard here... * first time through, we fill in this_plot. For second * surface in file, we have to allocate another surface * struct. BUT we may allocate this store only to * find that it is merely some blank lines at end of file * tp_3d_ptr is still pointing at next field of prev. plot, * before : prev_or_first -> this_plot -> possible_preallocated_store * tp_3d_ptr--^ * after : prev_or_first -> first -> second -> last -> possibly_more_store * tp_3d_ptr ----^ * if file is empty, tp_3d_ptr is not moved. this_plot continues * to point at allocated storage, but that will be reused later */ assert(this_plot == *tp_3d_ptr); if (this_plot->plot_type == DATA3D) { /*{{{ read data */ /* pointer to the plot of the first dataset (surface) in the file */ struct surface_points *first_dataset = this_plot; int this_token = this_plot->token; do { this_plot = *tp_3d_ptr; assert(this_plot != NULL); /* dont move tp_3d_ptr until we are sure we * have read a surface */ /* used by get_3ddata() */ this_plot->token = this_token; df_return = get_3ddata(this_plot); /* for second pass */ this_plot->token = c_token; this_plot->iteration = plot_iterator ? plot_iterator->iteration : 0; if (this_plot->num_iso_read == 0) this_plot->plot_type = NODATA; if (this_plot != first_dataset) /* copy (explicit) "with pm3d at ..." option from the first dataset in the file */ strcpy(this_plot->pm3d_where, first_dataset->pm3d_where); /* okay, we have read a surface */ ++plot_num; tp_3d_ptr = &(this_plot->next_sp); if (df_return == DF_EOF) break; /* there might be another surface so allocate * and prepare another surface structure * This does no harm if in fact there are * no more surfaces to read */ if ((this_plot = *tp_3d_ptr) != NULL) { if (this_plot->title) { free(this_plot->title); this_plot->title = NULL; } } else { /* Allocate enough isosamples and samples */ this_plot = *tp_3d_ptr = sp_alloc(0, 0, 0, 0); } this_plot->plot_type = DATA3D; this_plot->iteration = plot_iterator ? plot_iterator->iteration : 0; this_plot->plot_style = first_dataset->plot_style; this_plot->lp_properties = first_dataset->lp_properties; if (this_plot->plot_style == LABELPOINTS) { this_plot->labels = new_text_label(-1); *(this_plot->labels) = *(first_dataset->labels); this_plot->labels->next = NULL; } } while (df_return != DF_EOF); df_close(); /*}}} */ } else { /* not a data file */ tp_3d_ptr = &(this_plot->next_sp); this_plot->token = c_token; /* store for second pass */ this_plot->iteration = plot_iterator ? plot_iterator->iteration : 0; } if (empty_iteration(plot_iterator)) this_plot->plot_type = NODATA; } /* !is_definition() : end of scope of this_plot */ if (crnt_param != 0) { if (equals(c_token, ",")) { c_token++; continue; } else break; } /* Iterate-over-plot mechanisms */ if (next_iteration(plot_iterator)) { c_token = start_token; continue; } plot_iterator = cleanup_iteration(plot_iterator); if (equals(c_token, ",")) { c_token++; plot_iterator = check_for_iteration(); } else break; } /* while(TRUE), ie first pass */ if (parametric && crnt_param != 0) int_error(NO_CARET, "parametric function not fully specified"); /*** Second Pass: Evaluate the functions ***/ /* * Everything is defined now, except the function data. We expect no * syntax errors, etc, since the above parsed it all. This makes the code * below simpler. If axis_array[FIRST_Y_AXIS].autoscale, the yrange may still change. * - eh ? - z can still change. x/y/z can change if we are parametric ?? */ if (some_functions) { /* I've changed the controlled variable in fn plots to u_min etc since * it's easier for me to think parametric - 'normal' plot is after all * a special case. I was confused about x_min being both minimum of * x values found, and starting value for fn plots. */ double u_min, u_max, u_step, v_min, v_max, v_step; double u_isostep, v_isostep; AXIS_INDEX u_axis, v_axis; struct surface_points *this_plot; /* Make these point out the right 'u' and 'v' axis. In * non-parametric mode, x is used as u, and y as v */ u_axis = parametric ? U_AXIS : FIRST_X_AXIS; v_axis = parametric ? V_AXIS : FIRST_Y_AXIS; if (!parametric) { /*{{{ check ranges */ /* give error if xrange badly set from missing datafile error * parametric fn can still set ranges * if there are no fns, we'll report it later as 'nothing to plot' */ /* check that xmin -> xmax is not too small */ axis_checked_extend_empty_range(FIRST_X_AXIS, "x range is invalid"); axis_checked_extend_empty_range(FIRST_Y_AXIS, "y range is invalid"); /*}}} */ } if (parametric && !some_data_files) { /*{{{ set ranges */ /* parametric fn can still change x/y range */ if (axis_array[FIRST_X_AXIS].autoscale & AUTOSCALE_MIN) axis_array[FIRST_X_AXIS].min = VERYLARGE; if (axis_array[FIRST_X_AXIS].autoscale & AUTOSCALE_MAX) axis_array[FIRST_X_AXIS].max = -VERYLARGE; if (axis_array[FIRST_Y_AXIS].autoscale & AUTOSCALE_MIN) axis_array[FIRST_Y_AXIS].min = VERYLARGE; if (axis_array[FIRST_Y_AXIS].autoscale & AUTOSCALE_MAX) axis_array[FIRST_Y_AXIS].max = -VERYLARGE; /*}}} */ } /*{{{ figure ranges, taking logs etc into account */ u_min = axis_log_value_checked(u_axis, axis_array[u_axis].min, "x range"); u_max = axis_log_value_checked(u_axis, axis_array[u_axis].max, "x range"); v_min = axis_log_value_checked(v_axis, axis_array[v_axis].min, "y range"); v_max = axis_log_value_checked(v_axis, axis_array[v_axis].max, "y range"); /*}}} */ if (samples_1 < 2 || samples_2 < 2 || iso_samples_1 < 2 || iso_samples_2 < 2) { int_error(NO_CARET, "samples or iso_samples < 2. Must be at least 2."); } /* start over */ this_plot = first_3dplot; c_token = begin_token; plot_iterator = check_for_iteration(); /* why do attributes of this_plot matter ? */ /* FIXME HBB 20000501: I think they don't, actually. I'm * taking out references to has_grid_topology in this part of * the code. It only deals with function, which always is * gridded */ if (hidden3d) { u_step = (u_max - u_min) / (iso_samples_1 - 1); v_step = (v_max - v_min) / (iso_samples_2 - 1); } else { u_step = (u_max - u_min) / (samples_1 - 1); v_step = (v_max - v_min) / (samples_2 - 1); } u_isostep = (u_max - u_min) / (iso_samples_1 - 1); v_isostep = (v_max - v_min) / (iso_samples_2 - 1); /* Read through functions */ while (TRUE) { if (crnt_param == 0 && !was_definition) start_token = c_token; if (is_definition(c_token)) { define(); if (!equals(c_token,",")) { was_definition = TRUE; continue; } } else { struct at_type *at_ptr; char *name_str; was_definition = FALSE; /* Forgive trailing comma on a multi-element plot command */ if (END_OF_COMMAND || this_plot == NULL) { int_warn(c_token, "ignoring trailing comma in plot command"); break; } dummy_func = &plot_func; name_str = string_or_express(&at_ptr); if (!name_str) { /* func to plot */ /*{{{ evaluate function */ struct iso_curve *this_iso = this_plot->iso_crvs; int num_sam_to_use, num_iso_to_use; /* crnt_param is used as the axis number. As the * axis array indices are ordered z, y, x, we have * to count *backwards*, starting starting at 2, * to properly store away contents to x, y and * z. The following little gimmick does that. */ if (parametric) crnt_param = (crnt_param + 2) % 3; plot_func.at = at_ptr; num_iso_to_use = iso_samples_2; num_sam_to_use = hidden3d ? iso_samples_1 : samples_1; calculate_set_of_isolines(crnt_param, FALSE, &this_iso, v_axis, v_min, v_isostep, num_iso_to_use, u_axis, u_min, u_step, num_sam_to_use, NEED_PALETTE(this_plot)); if (!hidden3d) { num_iso_to_use = iso_samples_1; num_sam_to_use = samples_2; calculate_set_of_isolines(crnt_param, TRUE, &this_iso, u_axis, u_min, u_isostep, num_iso_to_use, v_axis, v_min, v_step, num_sam_to_use, NEED_PALETTE(this_plot)); } /*}}} */ } /* end of ITS A FUNCTION TO PLOT */ /* we saved it from first pass */ c_token = this_plot->token; /* we may have seen this one data file in multiple iterations */ i = this_plot->iteration; do { this_plot = this_plot->next_sp; } while (this_plot && this_plot->token == c_token && this_plot->iteration == i ); } /* !is_definition */ /* Iterate-over-plot mechanism */ if (crnt_param == 0 && next_iteration(plot_iterator)) { c_token = start_token; continue; } if (crnt_param == 0) plot_iterator = cleanup_iteration(plot_iterator); if (equals(c_token, ",")) { c_token++; if (crnt_param == 0) plot_iterator = check_for_iteration(); } else break; } /* while(TRUE) */ if (parametric) { /* Now actually fix the plot triplets to be single plots. */ parametric_3dfixup(first_3dplot, &plot_num); } } /* some functions */ /* if first_3dplot is NULL, we have no functions or data at all. * This can happen, if you type "splot x=5", since x=5 is a * variable assignment */ if (plot_num == 0 || first_3dplot == NULL) { int_error(c_token, "no functions or data to plot"); } axis_checked_extend_empty_range(FIRST_X_AXIS, "All points x value undefined"); axis_revert_and_unlog_range(FIRST_X_AXIS); axis_checked_extend_empty_range(FIRST_Y_AXIS, "All points y value undefined"); axis_revert_and_unlog_range(FIRST_Y_AXIS); if (splot_map) axis_checked_extend_empty_range(FIRST_Z_AXIS, NULL); /* Suppress warning message */ else axis_checked_extend_empty_range(FIRST_Z_AXIS, "All points z value undefined"); axis_revert_and_unlog_range(FIRST_Z_AXIS); setup_tics(FIRST_X_AXIS, 20); setup_tics(FIRST_Y_AXIS, 20); setup_tics(FIRST_Z_AXIS, 20); set_plot_with_palette(plot_num, MODE_SPLOT); if (is_plot_with_palette()) { set_cbminmax(); axis_checked_extend_empty_range(COLOR_AXIS, "All points of colorbox value undefined"); setup_tics(COLOR_AXIS, 20); /* axis_revert_and_unlog_range(COLOR_AXIS); */ /* fprintf(stderr,"plot3d.c: CB_AXIS.min=%g\tCB_AXIS.max=%g\n",CB_AXIS.min,CB_AXIS.max); */ } AXIS_WRITEBACK(FIRST_X_AXIS); if (plot_num == 0 || first_3dplot == NULL) { int_error(c_token, "no functions or data to plot"); } /* Creates contours if contours are to be plotted as well. */ if (draw_contour) { struct surface_points *this_plot; for (this_plot = first_3dplot, i = 0; i < plot_num; this_plot = this_plot->next_sp, i++) { if (this_plot->contours) { struct gnuplot_contours *cntrs = this_plot->contours; while (cntrs) { struct gnuplot_contours *cntr = cntrs; cntrs = cntrs->next; free(cntr->coords); free(cntr); } this_plot->contours = NULL; } /* Make sure this one can be contoured. */ if (this_plot->plot_style == LABELPOINTS || this_plot->plot_style == VECTOR || this_plot->plot_style == IMAGE || this_plot->plot_style == RGBIMAGE || this_plot->plot_style == RGBA_IMAGE) continue; /* Allow individual surfaces to opt out of contouring */ if (this_plot->opt_out_of_contours) continue; if (!this_plot->has_grid_topology) { int_warn(NO_CARET,"Cannot contour non grid data. Please use \"set dgrid3d\"."); } else if (this_plot->plot_type == DATA3D) { this_plot->contours = contour(this_plot->num_iso_read, this_plot->iso_crvs); } else { this_plot->contours = contour(iso_samples_2, this_plot->iso_crvs); } } } /* draw_contour */ /* the following ~9 lines were moved from the end of the * function to here, as do_3dplot calles term->text, which * itself might process input events in mouse enhanced * terminals. For redrawing to work, line capturing and * setting the plot3d_num must already be done before * entering do_3dplot(). Thu Jan 27 23:54:49 2000 (joze) */ /* if we get here, all went well, so record the line for replot */ if (plot_token != -1) { /* note that m_capture also frees the old replot_line */ m_capture(&replot_line, plot_token, c_token - 1); plot_token = -1; fill_gpval_string("GPVAL_LAST_PLOT", replot_line); } /* record that all went well */ plot3d_num=plot_num; /* perform the plot */ if (table_mode) print_3dtable(plot_num); else { do_3dplot(first_3dplot, plot_num, 0); /* after do_3dplot(), axis_array[] and max_array[].min * contain the plotting range actually used (rounded * to tic marks, not only the min/max data values) * --> save them now for writeback if requested */ save_writeback_all_axes(); /* update GPVAL_ variables available to user */ update_gpval_variables(1); #ifdef VOLATILE_REFRESH /* Mark these plots as safe for quick refresh */ refresh_nplots = plot_num; refresh_ok = 3; #endif } } /* * The hardest part of this routine is collapsing the FUNC plot types in the * list (which are gauranteed to occur in (x,y,z) triplets while preserving * the non-FUNC type plots intact. This means we have to work our way * through various lists. Examples (hand checked): * start_plot:F1->F2->F3->NULL ==> F3->NULL * start_plot:F1->F2->F3->F4->F5->F6->NULL ==> F3->F6->NULL * start_plot:F1->F2->F3->D1->D2->F4->F5->F6->D3->NULL ==> * F3->D1->D2->F6->D3->NULL * * x and y ranges now fixed in eval_3dplots */ static void parametric_3dfixup(struct surface_points *start_plot, int *plot_num) { struct surface_points *xp, *new_list, *free_list = NULL; struct surface_points **last_pointer = &new_list; int i, surface; /* * Ok, go through all the plots and move FUNC3D types together. Note: * this originally was written to look for a NULL next pointer, but * gnuplot wants to be sticky in grabbing memory and the right number of * items in the plot list is controlled by the plot_num variable. * * Since gnuplot wants to do this sticky business, a free_list of * surface_points is kept and then tagged onto the end of the plot list * as this seems more in the spirit of the original memory behavior than * simply freeing the memory. I'm personally not convinced this sort of * concern is worth it since the time spent computing points seems to * dominate any garbage collecting that might be saved here... */ new_list = xp = start_plot; for (surface = 0; surface < *plot_num; surface++) { if (xp->plot_type == FUNC3D) { struct surface_points *yp = xp->next_sp; struct surface_points *zp = yp->next_sp; /* Here's a FUNC3D parametric function defined as three parts. * Go through all the points and assign the x's and y's from xp and * yp to zp. min/max already done */ struct iso_curve *xicrvs = xp->iso_crvs; struct iso_curve *yicrvs = yp->iso_crvs; struct iso_curve *zicrvs = zp->iso_crvs; (*plot_num) -= 2; assert(INRANGE < OUTRANGE && OUTRANGE < UNDEFINED); while (zicrvs) { struct coordinate GPHUGE *xpoints = xicrvs->points; struct coordinate GPHUGE *ypoints = yicrvs->points; struct coordinate GPHUGE *zpoints = zicrvs->points; for (i = 0; i < zicrvs->p_count; ++i) { zpoints[i].x = xpoints[i].z; zpoints[i].y = ypoints[i].z; if (zpoints[i].type < xpoints[i].type) zpoints[i].type = xpoints[i].type; if (zpoints[i].type < ypoints[i].type) zpoints[i].type = ypoints[i].type; } xicrvs = xicrvs->next; yicrvs = yicrvs->next; zicrvs = zicrvs->next; } /* add xp and yp to head of free list */ assert(xp->next_sp == yp); yp->next_sp = free_list; free_list = xp; /* add zp to tail of new_list */ *last_pointer = zp; last_pointer = &(zp->next_sp); xp = zp->next_sp; } else { /* its a data plot */ assert(*last_pointer == xp); /* think this is true ! */ last_pointer = &(xp->next_sp); xp = xp->next_sp; } } /* Ok, append free list and write first_plot */ *last_pointer = free_list; first_3dplot = new_list; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/Makefile.am�����������������������������������������������������������������������0000644�0004711�0000144�00000013445�12023736552�012770� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign # in the spirit of automake ... pkglibexecdir = $(libexecdir)/@PACKAGE@/@VERSION_MAJOR@ # Where to send email about bugs and comments (locally) EMAIL = gnuplot-bugs@lists.sourceforge.net # Default help file location HELPFILE=@GIHDIR@/gnuplot.gih # Location of X11 app defaults XAPPLRESDIR=@X11_APPDEFAULTS_DIR@ # Default X11 driver location X11_DRIVER_DIR=$(pkglibexecdir) # Default Qt driver location QT_DRIVER_DIR=$(pkglibexecdir) # Default lua driver location GNUPLOT_LUA_DIR=$(pkgdatadir)/$(VERSION_MAJOR)/lua # Default javascript location GNUPLOT_JS_DIR=$(pkgdatadir)/$(VERSION_MAJOR)/js # Default Postscript prologues location GNUPLOT_PS_DIR=$(pkgdatadir)/$(VERSION_MAJOR)/PostScript # System-wide initialization file GNUPLOT_SHARE_DIR=$(pkgdatadir)/$(VERSION_MAJOR) # There is probably no need to edit anything below this line bin_PROGRAMS = gnuplot noinst_PROGRAMS = bf_test binonly: $(bin_PROGRAMS) transform = @program_transform_name@ GNUPLOT_X11 = `echo gnuplot_x11 | sed '$(transform)'`$(EXEEXT) AM_CPPFLAGS = -I../term -I$(top_srcdir)/term -DBINDIR=\"$(bindir)\" -DX11_DRIVER_DIR=\"$(X11_DRIVER_DIR)\" -DQT_DRIVER_DIR=\"$(QT_DRIVER_DIR)\" -DGNUPLOT_SHARE_DIR=\"$(GNUPLOT_SHARE_DIR)\" -DGNUPLOT_PS_DIR=\"$(GNUPLOT_PS_DIR)\" -DGNUPLOT_JS_DIR=\"$(GNUPLOT_JS_DIR)\" -DGNUPLOT_LUA_DIR=\"$(GNUPLOT_LUA_DIR)\" -DCONTACT=\"$(EMAIL)\" -DHELPFILE=\"$(HELPFILE)\" -DGNUPLOT_X11=\"$(GNUPLOT_X11)\" -DXAPPLRESDIR=\"$(XAPPLRESDIR)\" gnuplot_SOURCES = alloc.c alloc.h ansichek.h axis.c axis.h binary.c \ breaders.c breaders.h bitmap.h color.c color.h command.c \ command.h contour.c contour.h datafile.c datafile.h dynarray.c dynarray.h \ eval.c eval.h fit.c fit.h gadgets.c gadgets.h getcolor.c getcolor.h gp_hist.h \ gp_time.h gp_types.h gplt_x11.h graph3d.c graph3d.h graphics.c graphics.h \ help.c help.h hidden3d.c hidden3d.h history.c internal.c internal.h \ interpol.c interpol.h matrix.c matrix.h misc.c misc.h mouse.c mouse.h \ mousecmn.h national.h parse.c parse.h plot.c plot.h plot2d.c plot2d.h \ plot3d.c plot3d.h pm3d.c pm3d.h readline.c readline.h save.c \ save.h scanner.c scanner.h set.c setshow.h show.c specfun.c specfun.h \ standard.c standard.h stats.h stats.c stdfn.c stdfn.h syscfg.h tables.c tables.h \ tabulate.c tabulate.h \ template.h term_api.h term.c term.h time.c unset.c util.c util.h \ util3d.c util3d.h variable.c variable.h version.c version.h gnuplot_LDADD = $(TERMLIBS) $(TERMXLIBS) $(WX_LIBS) $(QT_LIBS) pkglibexec_PROGRAMS = if BUILD_GNUPLOT_X11 pkglibexec_PROGRAMS += gnuplot_x11 gnuplot_x11_SOURCES = gplt_x11.c gplt_x11.h gpexecute.c gpexecute.h mousecmn.h version.c version.h XLIBS = @LIBRARIES_FOR_X@ gnuplot_x11_LDADD = getcolor_x11.o $(XLIBS) endif getcolor_x11.o: getcolor.c $(COMPILE) -c -DGPLT_X11_MODE -o getcolor_x11.o $(srcdir)/getcolor.c bf_test_SOURCES = bf_test.c binary.c binary.h alloc.c if BUILD_SRC_BEOS_SUBDIR d_beos = beos endif SUBDIRS = $(d_beos) wxterminal qtterminal EXTRA_gnuplot_SOURCES = corplot.c os9.c strftime.c vms.c EXTRA_DIST = GNUmakefile Makefile.maint NeXT OpenStep README \ corgraph.asm genopt.com gnuplot.opt header.mac \ hrcgraph.asm intergra.x11 lasergnu lineproc.mac linkopt.vms \ makefile.all makefile.awc os2 pcgraph.asm win x11.opt \ $(EXTRA_gnuplot_SOURCES) if BUILD_WXWIDGETS gnuplot_SOURCES += wxterminal/wxt_gui.cpp endif if BUILD_GPCAIRO gnuplot_SOURCES += wxterminal/gp_cairo.c wxterminal/gp_cairo_helpers.c endif if BUILD_BITMAP gnuplot_SOURCES += bitmap.c endif if BUILD_QT # Call the moc preprocessor moc_%.cpp : qtterminal/%.h $(MOC) -o $@ $< # Call the Qt resource compiler qrc_%.cpp: qtterminal/%.qrc $(RCC) -name QtGnuplotResource -o $@ $< # Call the Qt ui compiler ui_%.h: qtterminal/%.ui $(UIC) -o $@ $< if HAVE_LRELEASE # Generate translation files %.qm: qtterminal/po/%.ts $(LRELEASE) $< -qm $@ # List of compiles translation files TRANSLATIONS = qtgnuplot_fr.qm qtgnuplot_ja.qm # Install translation files qtgnuplotdir = $(pkgdatadir)/$(VERSION_MAJOR)/qt qtgnuplot_DATA = $(TRANSLATIONS) AM_CPPFLAGS += -DQTGNUPLOT_DATA_DIR=\"$(qtgnuplotdir)\" endif # HAVE_LRELEASE # Clean moc & qrc files clean-qt-extra: rm -vf moc_*.cpp qrc_*.cpp qrc_*.o ui_*.h qtgnuplot*.qm # Clean transform gnuplot_x11 for demo clean-demo: rm -f $(GNUPLOT_X11) clean-local: clean-qt-extra clean-demo # Qt terminal sources gnuplot_SOURCES += qtterminal/qt_term.cpp if BUILD_ON_APPLE gnuplot_SOURCES += qtterminal/qt_term_mac.m endif pkglibexec_PROGRAMS += gnuplot_qt $(gnuplot_qt_OBJECTS) : ui_QtGnuplotSettings.h nodist_gnuplot_qt_SOURCES = moc_QtGnuplotWindow.cpp moc_QtGnuplotApplication.cpp \ moc_QtGnuplotWidget.cpp moc_QtGnuplotScene.cpp \ moc_QtGnuplotEvent.cpp qrc_QtGnuplotResource.cpp gnuplot_qt_SOURCES = qtterminal/gnuplot_qt.cpp qtterminal/QtGnuplotWindow.cpp \ qtterminal/QtGnuplotApplication.cpp qtterminal/QtGnuplotWidget.cpp \ qtterminal/QtGnuplotScene.cpp qtterminal/QtGnuplotItems.cpp \ qtterminal/QtGnuplotEvent.cpp gnuplot_qt_LDADD = $(QT_LIBS) # embed example (uncomment to build it) # bin_PROGRAMS += embed_example # # nodist_embed_example_SOURCES = moc_embed_example.cpp moc_QtGnuplotInstance.cpp \ # moc_QtGnuplotWidget.cpp moc_QtGnuplotScene.cpp \ # moc_QtGnuplotEvent.cpp qrc_QtGnuplotResource.cpp # # embed_example_SOURCES = qtterminal/embed_example.cpp \ # qtterminal/QtGnuplotWidget.cpp qtterminal/QtGnuplotEvent.cpp \ # qtterminal/QtGnuplotScene.cpp qtterminal/QtGnuplotItems.cpp \ # qtterminal/QtGnuplotInstance.cpp # # embed_example_LDADD = $(QT_LIBS) endif # build_qt ## we don't need COREOBJS, but CORETERM ## for the term.o dependencies O=o T=$(top_srcdir)/term/ # begin makefile.all include makefile.all # end makefile.all term$U.o: $(CORETERM) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/gpexecute.c�����������������������������������������������������������������������0000644�0004711�0000144�00000017052�11537220461�013063� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: gpexecute.c,v 1.18 2011/03/13 19:55:29 markisch Exp $"); } #endif /* GNUPLOT - gpexecute.c */ /*[ * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * Original Software (October 1999 - January 2000): * Pieter-Tjerk de Boer <ptdeboer@cs.utwente.nl> * Petr Mikulik <mikulik@physics.muni.cz> * Johannes Zellner <johannes@zellner.org> */ #include "gpexecute.h" #include "stdfn.h" #ifdef OS2_IPC # include <stdio.h> #endif #ifdef PIPE_IPC # include <unistd.h> /* open(), write() */ # include <stdlib.h> # include <assert.h> # include <errno.h> int pipe_died = 0; #endif /* PIPE_IPC */ #ifdef WIN_IPC # include <stdlib.h> # include <assert.h> # include "mouse.h" /* do_event() */ #endif #if defined(PIPE_IPC) /* || defined(WIN_IPC) */ static gpe_fifo_t *gpe_init __PROTO((void)); static void gpe_push __PROTO((gpe_fifo_t ** base, struct gp_event_t * ge)); static struct gp_event_t *gpe_front __PROTO((gpe_fifo_t ** base)); static int gpe_pop __PROTO((gpe_fifo_t ** base)); #endif /* PIPE_IPC || WIN_IPC */ /* * gp_execute functions */ #ifdef OS2_IPC char mouseShareMemName[40]; PVOID input_from_PM_Terminal; /* pointer to shared memory for storing the command to be executed */ HEV semInputReady = 0; /* handle to event semaphore (post an event to gnuplot that the shared memory contains a command to be executed) */ int pausing = 0; /* avoid passing data back to gnuplot in `pause' mode */ /* gplt_x11.c */ ULONG ppidGnu = 0; /* * Let the command in the shared memory be executed. */ void gp_post_shared_mem() { APIRET rc; if (semInputReady == 0) { /* but it must be open for the first time */ char semInputReadyName[40]; sprintf(semInputReadyName, "\\SEM32\\GP%i_Input_Ready", (int) ppidGnu); DosOpenEventSem(semInputReadyName, &semInputReady); } rc = DosPostEventSem(semInputReady); DosSleep(10); /* dirty trick: wait a little bit; otherwise problems to * distinguish mouse button down and up, for instance * (info sent to shared memory was too fast; maybe a blocking * semaphore would help, but no fun to implement it...) &*/ } /* Copy the command (given by the input string) to the shared memory * and let gnuplot execute it. * If this routine is called during a 'pause', then the command is * ignored (shared memory is cleared). Needed for actions launched by a * hotkey. * Firstly, the command is copied from shared memory to clipboard * if this option is set on. * Secondly, gnuplot is informed that shared memory contains a command * by posting semInputReady event semaphore. * * OS/2 specific: if (!s), then the command has been already sprintf'ed to * the shared memory. */ void gp_execute(char *s) { if (input_from_PM_Terminal == NULL) return; if (s) /* copy the command to shared memory */ strcpy(input_from_PM_Terminal, s); if (((char *) input_from_PM_Terminal)[0] == 0) return; if (pausing) { /* no communication during pause */ /* DosBeep(440,111); */ ((char *) input_from_PM_Terminal)[0] = 0; return; } gp_post_shared_mem(); } #endif /* OS2_IPC */ #if defined(PIPE_IPC) /* || defined(WIN_IPC) */ int buffered_output_pending = 0; static gpe_fifo_t * gpe_init() { gpe_fifo_t *base = malloc(sizeof(gpe_fifo_t)); /* fprintf(stderr, "(gpe_init) \n"); */ assert(base); base->next = (gpe_fifo_t *) 0; base->prev = (gpe_fifo_t *) 0; return base; } static void gpe_push(gpe_fifo_t ** base, struct gp_event_t *ge) { buffered_output_pending++; if ((*base)->prev) { gpe_fifo_t *new = malloc(sizeof(gpe_fifo_t)); /* fprintf(stderr, "(gpe_push) \n"); */ assert(new); (*base)->prev->next = new; new->prev = (*base)->prev; (*base)->prev = new; new->next = (gpe_fifo_t *) 0; } else { /* first element, this is the case, if the pipe isn't clogged */ (*base)->next = (gpe_fifo_t *) 0; /* tail */ (*base)->prev = (*base); /* points to itself */ } (*base)->prev->ge = *ge; } static struct gp_event_t * gpe_front(gpe_fifo_t ** base) { return &((*base)->ge); } static int gpe_pop(gpe_fifo_t ** base) { buffered_output_pending--; if ((*base)->prev == (*base)) { (*base)->prev = (gpe_fifo_t *) 0; return 0; } else { gpe_fifo_t *save = *base; /* fprintf(stderr, "(gpe_pop) \n"); */ (*base)->next->prev = (*base)->prev; (*base) = (*base)->next; free(save); return 1; } } #endif /* PIPE_IPC || WIN_IPC */ #ifdef PIPE_IPC RETSIGTYPE pipe_died_handler(int signum) { (void) signum; /* avoid -Wunused warning. */ /* fprintf(stderr, "\n*******(pipe_died_handler)*******\n"); */ close(1); pipe_died = 1; } #endif /* PIPE_IPC */ void gp_exec_event(char type, int mx, int my, int par1, int par2, int winid) { struct gp_event_t ge; #if defined(PIPE_IPC) /* || defined(WIN_IPC) */ static struct gpe_fifo_t *base = (gpe_fifo_t *) 0; #endif ge.type = type; ge.mx = mx; ge.my = my; ge.par1 = par1; ge.par2 = par2; ge.winid = winid; #ifdef PIPE_IPC if (pipe_died) return; #endif /* HBB 20010218: commented this out for WIN_IPC. We don't actually use the stack, * there */ #if defined(PIPE_IPC) /* || defined(WIN_IPC) */ if (!base) { base = gpe_init(); } if (GE_pending != type) { gpe_push(&base, &ge); } else if (!buffered_output_pending) { return; } #endif #ifdef WIN_IPC do_event(&ge); return; #endif #ifdef PIPE_IPC do { int status = write(1, gpe_front(&base), sizeof(ge)); if (-1 == status) { switch (errno) { case EAGAIN: /* do nothing */ FPRINTF((stderr, "(gp_exec_event) EAGAIN\n")); break; default: FPRINTF((stderr, "(gp_exec_event) errno = %d\n", errno)); break; } break; } } while (gpe_pop(&base)); #endif /* PIPE_IPC */ #ifdef OS2_IPC /* OS/2 communication via shared memory; coded according to gp_execute() */ if (input_from_PM_Terminal == NULL) return; ((char *) input_from_PM_Terminal)[0] = '%'; /* flag that passing gp_event_t */ memcpy(((char *) input_from_PM_Terminal) + 1, &ge, sizeof(ge)); /* copy the command to shared memory */ if (pausing) { /* no communication during pause */ /* DosBeep(440,111); */ ((char *) input_from_PM_Terminal)[0] = 0; return; } gp_post_shared_mem(); #endif } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/src/util.c����������������������������������������������������������������������������0000644�0004711�0000144�00000100717�12162200516�012042� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: util.c,v 1.99.2.7 2013/06/23 22:13:35 markisch Exp $"); } #endif /* GNUPLOT - util.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #include "util.h" #include "alloc.h" #include "command.h" #include "datafile.h" /* for df_showdata and df_reset_after_error */ #include "internal.h" /* for eval_reset_after_error */ #include "misc.h" #include "plot.h" #include "term_api.h" /* for term_end_plot() used by graph_error() */ #include "variable.h" /* For locale handling */ #if defined(HAVE_DIRENT_H) # include <sys/types.h> # include <dirent.h> #elif defined(_Windows) # include <windows.h> #endif #ifdef __MSC__ # include <io.h> #endif /* Exported (set-table) variables */ /* decimal sign */ char *decimalsign = NULL; /* degree sign. Defaults to UTF-8 but will be changed to match encoding */ char degree_sign[8] = "°"; /* Holds the name of the current LC_NUMERIC as set by "set decimal locale" */ char *numeric_locale = NULL; /* Holds the name of the current LC_TIME as set by "set locale" */ char *current_locale = NULL; const char *current_prompt = NULL; /* to be set by read_line() */ /* internal prototypes */ static void mant_exp __PROTO((double, double, TBOOLEAN, double *, int *, const char *)); static void parse_sq __PROTO((char *)); /* * equals() compares string value of token number t_num with str[], and * returns TRUE if they are identical. */ int equals(int t_num, const char *str) { int i; if (t_num >= num_tokens) /* safer to test here than to trust all callers */ return (FALSE); if (!token[t_num].is_token) return (FALSE); /* must be a value--can't be equal */ for (i = 0; i < token[t_num].length; i++) { if (gp_input_line[token[t_num].start_index + i] != str[i]) return (FALSE); } /* now return TRUE if at end of str[], FALSE if not */ return (str[i] == NUL); } /* * almost_equals() compares string value of token number t_num with str[], and * returns TRUE if they are identical up to the first $ in str[]. */ int almost_equals(int t_num, const char *str) { int i; int after = 0; int start = token[t_num].start_index; int length = token[t_num].length; if (!str) return FALSE; if (!token[t_num].is_token) return FALSE; /* must be a value--can't be equal */ for (i = 0; i < length + after; i++) { if (str[i] != gp_input_line[start + i]) { if (str[i] != '$') return (FALSE); else { after = 1; start--; /* back up token ptr */ } } } /* i now beyond end of token string */ return (after || str[i] == '$' || str[i] == NUL); } int isstring(int t_num) { return (token[t_num].is_token && (gp_input_line[token[t_num].start_index] == '\'' || gp_input_line[token[t_num].start_index] == '"')); } /* Test for the existence of a variable without triggering errors. * Return values: * 0 variable does not exist or is not defined * >0 type of variable: INTGR, CMPLX, STRING */ int type_udv(int t_num) { struct udvt_entry **udv_ptr = &first_udv; while (*udv_ptr) { if (equals(t_num, (*udv_ptr)->udv_name)) { if ((*udv_ptr)->udv_undef) return 0; else return (*udv_ptr)->udv_value.type; } udv_ptr = &((*udv_ptr)->next_udv); } return 0; } int isanumber(int t_num) { return (!token[t_num].is_token); } int isletter(int t_num) { return (token[t_num].is_token && ((isalpha((unsigned char) gp_input_line[token[t_num].start_index])) || (gp_input_line[token[t_num].start_index] == '_'))); } /* * is_definition() returns TRUE if the next tokens are of the form * identifier = * -or- * identifier ( identifer {,identifier} ) = */ int is_definition(int t_num) { /* variable? */ if (isletter(t_num) && equals(t_num + 1, "=")) return 1; /* function? */ /* look for dummy variables */ if (isletter(t_num) && equals(t_num + 1, "(") && isletter(t_num + 2)) { t_num += 3; /* point past first dummy */ while (equals(t_num, ",")) { if (!isletter(++t_num)) return 0; t_num += 1; } return (equals(t_num, ")") && equals(t_num + 1, "=")); } /* neither */ return 0; } /* * copy_str() copies the string in token number t_num into str, appending * a null. No more than max chars are copied (including \0). */ void copy_str(char *str, int t_num, int max) { int i = 0; int start = token[t_num].start_index; int count = token[t_num].length; if (count >= max) { count = max - 1; FPRINTF((stderr, "str buffer overflow in copy_str")); } do { str[i++] = gp_input_line[start++]; } while (i != count); str[i] = NUL; } /* length of token string */ size_t token_len(int t_num) { return (size_t)(token[t_num].length); } /* * quote_str() does the same thing as copy_str, except it ignores the * quotes at both ends. This seems redundant, but is done for * efficency. */ void quote_str(char *str, int t_num, int max) { int i = 0; int start = token[t_num].start_index + 1; int count; if ((count = token[t_num].length - 2) >= max) { count = max - 1; FPRINTF((stderr, "str buffer overflow in quote_str")); } if (count > 0) { do { str[i++] = gp_input_line[start++]; } while (i != count); } str[i] = NUL; /* convert \t and \nnn (octal) to char if in double quotes */ if (gp_input_line[token[t_num].start_index] == '"') parse_esc(str); else parse_sq(str); } /* * capture() copies into str[] the part of gp_input_line[] which lies between * the begining of token[start] and end of token[end]. */ void capture(char *str, int start, int end, int max) { int i, e; e = token[end].start_index + token[end].length; if (e - token[start].start_index >= max) { e = token[start].start_index + max - 1; FPRINTF((stderr, "str buffer overflow in capture")); } for (i = token[start].start_index; i < e && gp_input_line[i] != NUL; i++) *str++ = gp_input_line[i]; *str = NUL; } /* * m_capture() is similar to capture(), but it mallocs storage for the * string. */ void m_capture(char **str, int start, int end) { int i, e; char *s; e = token[end].start_index + token[end].length; *str = gp_realloc(*str, (e - token[start].start_index + 1), "string"); s = *str; for (i = token[start].start_index; i < e && gp_input_line[i] != NUL; i++) *s++ = gp_input_line[i]; *s = NUL; } /* * m_quote_capture() is similar to m_capture(), but it removes * quotes from either end of the string. */ void m_quote_capture(char **str, int start, int end) { int i, e; char *s; e = token[end].start_index + token[end].length - 1; *str = gp_realloc(*str, (e - token[start].start_index + 1), "string"); s = *str; for (i = token[start].start_index + 1; i < e && gp_input_line[i] != NUL; i++) *s++ = gp_input_line[i]; *s = NUL; if (gp_input_line[token[start].start_index] == '"') parse_esc(*str); else parse_sq(*str); } /* * Wrapper for isstring + m_quote_capture that can be used with * or without GP_STRING_VARS enabled. * EAM Aug 2004 */ char * try_to_get_string() { char *newstring = NULL; struct value a; int save_token = c_token; if (END_OF_COMMAND) return NULL; const_string_express(&a); if (a.type == STRING) newstring = a.v.string_val; else c_token = save_token; return newstring; } /* Our own version of strdup() * Make copy of string into gp_alloc'd memory * As with all conforming str*() functions, * it is the caller's responsibility to pass * valid parameters! */ char * gp_strdup(const char *s) { char *d; if (!s) return NULL; #ifndef HAVE_STRDUP d = gp_alloc(strlen(s) + 1, "gp_strdup"); if (d) memcpy (d, s, strlen(s) + 1); #else d = strdup(s); #endif return d; } /* * Allocate a new string and initialize it by concatenating two * existing strings. */ char * gp_stradd(const char *a, const char *b) { char *new = gp_alloc(strlen(a)+strlen(b)+1,"gp_stradd"); strcpy(new,a); strcat(new,b); return new; } /* HBB 20020405: moved these functions here from axis.c, where they no * longer truly belong. */ /*{{{ mant_exp - split into mantissa and/or exponent */ /* HBB 20010121: added code that attempts to fix rounding-induced * off-by-one errors in 10^%T and similar output formats */ static void mant_exp( double log10_base, double x, TBOOLEAN scientific, /* round to power of 3 */ double *m, /* results */ int *p, const char *format) /* format string for fixup */ { int sign = 1; double l10; int power; double mantissa; /*{{{ check 0 */ if (x == 0) { if (m) *m = 0; if (p) *p = 0; return; } /*}}} */ /*{{{ check -ve */ if (x < 0) { sign = (-1); x = (-x); } /*}}} */ l10 = log10(x) / log10_base; power = floor(l10); mantissa = pow(10.0, log10_base * (l10 - power)); /* round power to an integer multiple of 3, to get what's * sometimes called 'scientific' or 'engineering' notation. Also * useful for handling metric unit prefixes like 'kilo' or 'micro' * */ if (scientific) { /* Scientific mode makes no sense whatsoever if the base of * the logarithmic axis is anything but 10.0 */ assert(log10_base == 1.0); /* HBB FIXED 20040701: negative modulo positive may yield * negative result. But we always want an effectively * positive modulus --> adjust input by one step */ switch (power % 3) { case -1: power -= 3; case 2: mantissa *= 100; break; case -2: power -= 3; case 1: mantissa *= 10; break; case 0: break; default: int_error (NO_CARET, "Internal error in scientific number formatting"); } power -= (power % 3); } /* HBB 20010121: new code for decimal mantissa fixups. Looks at * format string to see how many decimals will be put there. Iff * the number is so close to an exact power of 10 that it will be * rounded up to 10.0e??? by an sprintf() with that many digits of * precision, increase the power by 1 to get a mantissa in the * region of 1.0. If this handling is not wanted, pass NULL as * the format string */ /* HBB 20040521: extended to also work for bases other than 10.0 */ if (format) { double actual_base = (scientific ? 1000 : pow(10.0, log10_base)); int precision = 0; double tolerance; format = strchr (format, '.'); if (format != NULL) /* a decimal point was found in the format, so use that * precision. */ precision = strtol(format + 1, NULL, 10); /* See if mantissa would be right on the border. The * condition to watch out for is that the mantissa is within * one printing precision of the next power of the logarithm * base. So add the 0.5*10^-precision to the mantissa, and * see if it's now larger than the base of the scale */ tolerance = pow(10.0, -precision) / 2; if (mantissa + tolerance >= actual_base) { mantissa /= actual_base; power += (scientific ? 3 : 1); } } if (m) *m = sign * mantissa; if (p) *p = power; } /*}}} */ #ifndef HAVE_SNPRINTF # define snprintf(str,len,fmt,arg) sprintf(str,fmt,arg) #endif /*{{{ gprintf */ /* extended s(n)printf */ /* HBB 20010121: added code to maintain consistency between mantissa * and exponent across sprintf() calls. The problem: format string * '%t*10^%T' will display 9.99 as '10.0*10^0', but 10.01 as * '1.0*10^1'. This causes problems for people using the %T part, * only, with logscaled axes, in combination with the occasional * round-off error. */ /* EAM Nov 2012: * Unbelievably, the count parameter has been silently ignored or * improperly applied ever since this routine was introduced back * in version 3.7. Now fixed to prevent buffer overflow. */ void gprintf( char *outstring, size_t count, char *format, double log10_base, double x) { char tempdest[MAX_LINE_LEN + 1]; char temp[MAX_LINE_LEN + 1]; char *t; TBOOLEAN seen_mantissa = FALSE; /* remember if mantissa was already output */ double stored_power_base = 0; /* base for the last mantissa output*/ int stored_power = 0; /* power matching the mantissa output earlier */ TBOOLEAN got_hash = FALSE; char *dest = &tempdest[0]; char *limit = &tempdest[MAX_LINE_LEN]; #define remaining_space (size_t)(limit-dest) *dest = '\0'; set_numeric_locale(); for (;;) { /*{{{ copy to dest until % */ while (*format != '%') if (!(*dest++ = *format++) || (remaining_space == 0)) { safe_strncpy(outstring,tempdest,count); reset_numeric_locale(); return; /* end of format */ } /*}}} */ /*{{{ check for %% */ if (format[1] == '%') { *dest++ = '%'; format += 2; continue; } /*}}} */ /*{{{ copy format part to temp, excluding conversion character */ t = temp; *t++ = '%'; if (format[1] == '#') { *t++ = '#'; format++; got_hash = TRUE; } /* dont put isdigit first since sideeffect in macro is bad */ while (*++format == '.' || isdigit((unsigned char) *format) || *format == '-' || *format == '+' || *format == ' ' || *format == '\'') *t++ = *format; /*}}} */ /*{{{ convert conversion character */ switch (*format) { /*{{{ x and o */ case 'x': case 'X': case 'o': case 'O': if (fabs(x) >= (double)INT_MAX) { t[0] = 'l'; t[1] = 'l'; t[2] = *format; t[3] = '\0'; snprintf(dest, remaining_space, temp, (long long) x); } else { t[0] = *format; t[1] = '\0'; snprintf(dest, remaining_space, temp, (int) x); } break; /*}}} */ /*{{{ e, f and g */ case 'e': case 'E': case 'f': case 'F': case 'g': case 'G': t[0] = *format; t[1] = 0; snprintf(dest, remaining_space, temp, x); break; /*}}} */ /*{{{ l --- mantissa to current log base */ case 'l': { double mantissa; t[0] = 'f'; t[1] = 0; stored_power_base = log10_base; mant_exp(stored_power_base, x, FALSE, &mantissa, &stored_power, temp); seen_mantissa = TRUE; snprintf(dest, remaining_space, temp, mantissa); break; } /*}}} */ /*{{{ t --- base-10 mantissa */ case 't': { double mantissa; t[0] = 'f'; t[1] = 0; stored_power_base = 1.0; mant_exp(stored_power_base, x, FALSE, &mantissa, &stored_power, temp); seen_mantissa = TRUE; snprintf(dest, remaining_space, temp, mantissa); break; } /*}}} */ /*{{{ s --- base-1000 / 'scientific' mantissa */ case 's': { double mantissa; t[0] = 'f'; t[1] = 0; stored_power_base = 1.0; mant_exp(stored_power_base, x, TRUE, &mantissa, &stored_power, temp); seen_mantissa = TRUE; snprintf(dest, remaining_space, temp, mantissa); break; } /*}}} */ /*{{{ b --- base-1024 mantissa */ case 'b': { double mantissa; t[0] = 'f'; t[1] = 0; stored_power_base = log10(1024); mant_exp(stored_power_base, x, FALSE, &mantissa, &stored_power, temp); seen_mantissa = TRUE; snprintf(dest, remaining_space, temp, mantissa); break; } /*}}} */ /*{{{ L --- power to current log base */ case 'L': { int power; t[0] = 'd'; t[1] = 0; if (seen_mantissa) if (stored_power_base == log10_base) power = stored_power; else int_error(NO_CARET, "Format character mismatch: %%L is only valid with %%l"); else stored_power_base = log10_base; mant_exp(log10_base, x, FALSE, NULL, &power, "%.0f"); snprintf(dest, remaining_space, temp, power); break; } /*}}} */ /*{{{ T --- power of ten */ case 'T': { int power; t[0] = 'd'; t[1] = 0; if (seen_mantissa) if (stored_power_base == 1.0) power = stored_power; else int_error(NO_CARET, "Format character mismatch: %%T is only valid with %%t"); else mant_exp(1.0, x, FALSE, NULL, &power, "%.0f"); snprintf(dest, remaining_space, temp, power); break; } /*}}} */ /*{{{ S --- power of 1000 / 'scientific' */ case 'S': { int power; t[0] = 'd'; t[1] = 0; if (seen_mantissa) if (stored_power_base == 1.0) power = stored_power; else int_error(NO_CARET, "Format character mismatch: %%S is only valid with %%s"); else mant_exp(1.0, x, TRUE, NULL, &power, "%.0f"); snprintf(dest, remaining_space, temp, power); break; } /*}}} */ /*{{{ c --- ISO decimal unit prefix letters */ case 'c': { int power; t[0] = 'c'; t[1] = 0; if (seen_mantissa) if (stored_power_base == 1.0) power = stored_power; else int_error(NO_CARET, "Format character mismatch: %%c is only valid with %%s"); else mant_exp(1.0, x, TRUE, NULL, &power, "%.0f"); if (power >= -24 && power <= 24) { /* -18 -> 0, 0 -> 6, +18 -> 12, ... */ /* HBB 20010121: avoid division of -ve ints! */ power = (power + 24) / 3; snprintf(dest, remaining_space, temp, "yzafpnum kMGTPEZY"[power]); } else { /* please extend the range ! */ /* name power name power ------------------------- yocto -24 yotta 24 zepto -21 zetta 21 atto -18 Exa 18 femto -15 Peta 15 pico -12 Tera 12 nano -9 Giga 9 micro -6 Mega 6 milli -3 kilo 3 */ /* fall back to simple exponential */ snprintf(dest, remaining_space, "e%+02d", power); } break; } /*}}} */ /*{{{ B --- IEC 60027-2 A.2 / ISO/IEC 80000 binary unit prefix letters */ case 'B': { int power; t[0] = 'c'; t[1] = 'i'; t[2] = 0; if (seen_mantissa) if (stored_power_base == log10(1024)) power = stored_power; else int_error(NO_CARET, "Format character mismatch: %%B is only valid with %%b"); else mant_exp(log10(1024), x, FALSE, NULL, &power, "%.0f"); if (power > 0 && power <= 8) { /* name power ----------- Yobi 8 Zebi 7 Exbi 9 Pebi 5 Tebi 4 Gibi 3 Mebi 2 kibi 1 */ snprintf(dest, remaining_space, temp, " kMGTPEZY"[power]); } else if (power > 8) { /* for the larger values, print x2^{10}Gi for example */ snprintf(dest, remaining_space, "x2^{%d}Yi", power-8); } else if (power < 0) { snprintf(dest, remaining_space, "x2^{%d}", power*10); } break; } /*}}} */ /*{{{ P --- multiple of pi */ case 'P': { t[0] = 'f'; t[1] = 0; snprintf(dest, remaining_space, temp, x / M_PI); break; } /*}}} */ default: reset_numeric_locale(); int_error(NO_CARET, "Bad format character"); } /* switch */ /*}}} */ if (got_hash && (format != strpbrk(format,"oeEfFgG"))) { reset_numeric_locale(); int_error(NO_CARET, "Bad format character"); } /* change decimal `.' to the actual entry in decimalsign */ if (decimalsign != NULL) { char *dotpos1 = dest, *dotpos2; size_t newlength = strlen(decimalsign); int dot; /* dot is the default decimalsign we will be replacing */ dot = *get_decimal_locale(); /* replace every dot by the contents of decimalsign */ while ((dotpos2 = strchr(dotpos1,dot)) != NULL) { size_t taillength = strlen(dotpos2); dotpos1 = dotpos2 + newlength; /* test if the new value for dest would be too long */ if (dotpos1 - dest + taillength > count) int_error(NO_CARET, "format too long due to long decimalsign string"); /* move tail end of string out of the way */ memmove(dotpos1, dotpos2 + 1, taillength); /* insert decimalsign */ memcpy(dotpos2, decimalsign, newlength); } /* clear temporary variables for safety */ dotpos1=NULL; dotpos2=NULL; } /* this was at the end of every single case, before: */ dest += strlen(dest); ++format; } /* for ever */ /* Copy as much as fits */ safe_strncpy(outstring, tempdest, count); reset_numeric_locale(); } /*}}} */ #ifndef HAVE_SNPRINTF # undef snprintf #endif /* some macros for the error and warning functions below * may turn this into a utility function later */ #define PRINT_MESSAGE_TO_STDERR \ do { \ fprintf(stderr, "\n%s%s\n", \ current_prompt ? current_prompt : "", \ gp_input_line); \ } while (0) #define PRINT_SPACES_UNDER_PROMPT \ do { \ const char *p; \ \ if (!current_prompt) \ break; \ for (p = current_prompt; *p != '\0'; p++) \ (void) fputc(' ', stderr); \ } while (0) #define PRINT_SPACES_UPTO_TOKEN \ do { \ int i; \ \ for (i = 0; i < token[t_num].start_index; i++) \ (void) fputc((gp_input_line[i] == '\t') ? '\t' : ' ', stderr); \ } while(0) #define PRINT_CARET fputs("^\n",stderr); #define PRINT_FILE_AND_LINE \ if (!interactive) { \ if (lf_head && lf_head->name) \ fprintf(stderr, "\"%s\", line %d: ", lf_head->name, inline_num);\ else fprintf(stderr, "line %d: ", inline_num); \ } /* TRUE if command just typed; becomes FALSE whenever we * send some other output to screen. If FALSE, the command line * will be echoed to the screen before the ^ error message. */ TBOOLEAN screen_ok; #if defined(VA_START) && defined(STDC_HEADERS) void os_error(int t_num, const char *str,...) #else void os_error(int t_num, const char *str, va_dcl) #endif { #ifdef VA_START va_list args; #endif #ifdef VMS static status[2] = { 1, 0 }; /* 1 is count of error msgs */ #endif /* VMS */ /* reprint line if screen has been written to */ if (t_num == DATAFILE) { df_showdata(); } else if (t_num != NO_CARET) { /* put caret under error */ if (!screen_ok) PRINT_MESSAGE_TO_STDERR; PRINT_SPACES_UNDER_PROMPT; PRINT_SPACES_UPTO_TOKEN; PRINT_CARET; } PRINT_SPACES_UNDER_PROMPT; #ifdef VA_START VA_START(args, str); # if defined(HAVE_VFPRINTF) || _LIBC vfprintf(stderr, str, args); # else _doprnt(str, args, stderr); # endif va_end(args); #else fprintf(stderr, str, a1, a2, a3, a4, a5, a6, a7, a8); #endif putc('\n', stderr); PRINT_SPACES_UNDER_PROMPT; PRINT_FILE_AND_LINE; #ifdef VMS status[1] = vaxc$errno; sys$putmsg(status); (void) putc('\n', stderr); #else /* VMS */ perror("util.c"); putc('\n', stderr); #endif /* VMS */ scanning_range_in_progress = FALSE; bail_to_command_line(); } #if defined(VA_START) && defined(STDC_HEADERS) void int_error(int t_num, const char *str,...) #else void int_error(int t_num, const char str[], va_dcl) #endif { #ifdef VA_START va_list args; #endif char error_message[128] = {'\0'}; /* reprint line if screen has been written to */ if (t_num == DATAFILE) { df_showdata(); } else if (t_num != NO_CARET) { /* put caret under error */ if (!screen_ok) PRINT_MESSAGE_TO_STDERR; PRINT_SPACES_UNDER_PROMPT; PRINT_SPACES_UPTO_TOKEN; PRINT_CARET; } PRINT_SPACES_UNDER_PROMPT; PRINT_FILE_AND_LINE; #ifdef VA_START VA_START(args, str); # if defined(HAVE_VFPRINTF) || _LIBC vsnprintf(error_message, sizeof(error_message), str, args); fprintf(stderr,"%.120s",error_message); # else _doprnt(str, args, stderr); # endif va_end(args); #else fprintf(stderr, str, a1, a2, a3, a4, a5, a6, a7, a8); #ifdef HAVE_SNPRINTF snprintf(error_message, sizeof(error_message), str, a1, a2, a3, a4, a5, a6, a7, a8); #else sprintf(error_message, str, a1, a2, a3, a4, a5, a6, a7, a8); #endif #endif fputs("\n\n", stderr); /* We are bailing out of nested context without ever reaching */ /* the normal cleanup code. Reset any flags before bailing. */ df_reset_after_error(); eval_reset_after_error(); clause_reset_after_error(); parse_reset_after_error(); scanning_range_in_progress = FALSE; inside_zoom = FALSE; /* Load error state variables */ update_gpval_variables(2); fill_gpval_string("GPVAL_ERRMSG", error_message); bail_to_command_line(); } /* Warn without bailing out to command line. Not a user error */ #if defined(VA_START) && defined(STDC_HEADERS) void int_warn(int t_num, const char *str,...) #else void int_warn(int t_num, const char str[], va_dcl) #endif { #ifdef VA_START va_list args; #endif /* reprint line if screen has been written to */ if (t_num == DATAFILE) { df_showdata(); } else if (t_num != NO_CARET) { /* put caret under error */ if (!screen_ok) PRINT_MESSAGE_TO_STDERR; PRINT_SPACES_UNDER_PROMPT; PRINT_SPACES_UPTO_TOKEN; PRINT_CARET; } PRINT_SPACES_UNDER_PROMPT; PRINT_FILE_AND_LINE; fputs("warning: ", stderr); #ifdef VA_START VA_START(args, str); # if defined(HAVE_VFPRINTF) || _LIBC vfprintf(stderr, str, args); # else _doprnt(str, args, stderr); # endif va_end(args); #else /* VA_START */ fprintf(stderr, str, a1, a2, a3, a4, a5, a6, a7, a8); #endif /* VA_START */ putc('\n', stderr); } /*{{{ graph_error() */ /* handle errors during graph-plot in a consistent way */ /* HBB 20000430: move here, from graphics.c */ #if defined(VA_START) && defined(STDC_HEADERS) void graph_error(const char *fmt, ...) #else void graph_error(const char *fmt, va_dcl) #endif { #ifdef VA_START va_list args; #endif multiplot = FALSE; term_end_plot(); #ifdef VA_START VA_START(args, fmt); /* HBB 20001120: instead, copy the core code from int_error() to * here: */ PRINT_SPACES_UNDER_PROMPT; PRINT_FILE_AND_LINE; # if defined(HAVE_VFPRINTF) || _LIBC vfprintf(stderr, fmt, args); # else _doprnt(fmt, args, stderr); # endif va_end(args); fputs("\n\n", stderr); bail_to_command_line(); va_end(args); #else int_error(NO_CARET, fmt, a1, a2, a3, a4, a5, a6, a7, a8); #endif } /*}}} */ /* Squash spaces in the given string (DFK) */ /* That is, reduce all multiple white-space chars to single spaces */ /* Done in place. Currently used only by help_command() */ void squash_spaces(char *s) { char *r = s; /* reading point */ char *w = s; /* writing point */ TBOOLEAN space = FALSE; /* TRUE if we've already copied a space */ for (w = r = s; *r != NUL; r++) { if (isspace((unsigned char) *r)) { /* white space; only copy if we haven't just copied a space */ if (!space) { space = TRUE; *w++ = ' '; } /* else ignore multiple spaces */ } else { /* non-space character; copy it and clear flag */ *w++ = *r; space = FALSE; } } *w = NUL; /* null terminate string */ } /* postprocess single quoted strings: replace "''" by "'" */ void parse_sq(char *instr) { char *s = instr, *t = instr; /* the string will always get shorter, so we can do the * conversion in situ */ while (*s != NUL) { if (*s == '\'' && *(s+1) == '\'') s++; *t++ = *s++; } *t = NUL; } void parse_esc(char *instr) { char *s = instr, *t = instr; /* the string will always get shorter, so we can do the * conversion in situ */ while (*s != NUL) { if (*s == '\\') { s++; if (*s == '\\') { *t++ = '\\'; s++; } else if (*s == 'n') { *t++ = '\n'; s++; } else if (*s == 'r') { *t++ = '\r'; s++; } else if (*s == 't') { *t++ = '\t'; s++; } else if (*s == '\"') { *t++ = '\"'; s++; } else if (*s >= '0' && *s <= '7') { int i, n; char *octal = (*s == '0' ? "%4o%n" : "%3o%n"); if (sscanf(s, octal, &i, &n) > 0) { *t++ = i; s += n; } else { /* int_error("illegal octal number ", c_token); */ *t++ = '\\'; *t++ = *s++; } } } else if (df_separator && *s == '\"' && *(s+1) == '\"') { /* EAM Mar 2003 - For parsing CSV strings with quoted quotes */ *t++ = *s++; s++; } else { *t++ = *s++; } } *t = NUL; } /* FIXME HH 20020915: This function does nothing if dirent.h and windows.h * not available. */ TBOOLEAN existdir (const char *name) { #ifdef HAVE_DIRENT_H DIR *dp; if (! (dp = opendir(name) ) ) return FALSE; closedir(dp); return TRUE; #elif defined(_Windows) HANDLE FileHandle; WIN32_FIND_DATA finddata; FileHandle = FindFirstFile(name, &finddata); if (FileHandle != INVALID_HANDLE_VALUE) { if (finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) return TRUE; } return FALSE; #elif defined(VMS) return FALSE; #else int_warn(NO_CARET, "Test on directory existence not supported\n\t('%s!')", name); return FALSE; #endif } TBOOLEAN existfile(const char *name) { #ifdef __MSC__ return (_access(name, 0) == 0); #else return (access(name, F_OK) == 0); #endif } char * getusername () { char *username = NULL; username=getenv("USER"); if (!username) username=getenv("USERNAME"); return gp_strdup(username); } TBOOLEAN contains8bit(const char *s) { while (*s) { if ((*s++ & 0x80)) return TRUE; } return FALSE; } #define INVALID_UTF8 0xfffful /* Read from second byte to end of UTF-8 sequence. used by utf8toulong() */ TBOOLEAN utf8_getmore (unsigned long * wch, const char **str, int nbytes) { int i; unsigned char c; unsigned long minvalue[] = {0x80, 0x800, 0x10000, 0x200000, 0x4000000}; for (i = 0; i < nbytes; i++) { c = (unsigned char) **str; if ((c & 0xc0) != 0x80) { *wch = INVALID_UTF8; return FALSE; } *wch = (*wch << 6) | (c & 0x3f); (*str)++; } /* check for overlong UTF-8 sequences */ if (*wch < minvalue[nbytes-1]) { *wch = INVALID_UTF8; return FALSE; } return TRUE; } /* Convert UTF-8 multibyte sequence from string to unsigned long character. Returns TRUE on success. */ TBOOLEAN utf8toulong (unsigned long * wch, const char ** str) { unsigned char c; c = (unsigned char) *(*str)++; if ((c & 0x80) == 0) { *wch = (unsigned long) c; return TRUE; } if ((c & 0xe0) == 0xc0) { *wch = c & 0x1f; return utf8_getmore(wch, str, 1); } if ((c & 0xf0) == 0xe0) { *wch = c & 0x0f; return utf8_getmore(wch, str, 2); } if ((c & 0xf8) == 0xf0) { *wch = c & 0x07; return utf8_getmore(wch, str, 3); } if ((c & 0xfc) == 0xf8) { *wch = c & 0x03; return utf8_getmore(wch, str, 4); } if ((c & 0xfe) == 0xfc) { *wch = c & 0x01; return utf8_getmore(wch, str, 5); } *wch = INVALID_UTF8; return FALSE; } /* * Returns number of (possibly multi-byte) characters in a UTF-8 string */ size_t strlen_utf8(const char *s) { int i = 0, j = 0; while (s[i]) { if ((s[i] & 0xc0) != 0x80) j++; i++; } return j; } size_t gp_strlen(const char *s) { if (encoding == S_ENC_UTF8) return strlen_utf8(s); else return strlen(s); } /* * Returns a pointer to the Nth character of s * or a pointer to the trailing \0 if N is too large */ char * utf8_strchrn(const char *s, int N) { int i = 0, j = 0; if (N <= 0) return (char *)s; while (s[i]) { if ((s[i] & 0xc0) != 0x80) { if (j++ == N) return (char *)&s[i]; } i++; } return (char *)&s[i]; } char * gp_strchrn(const char *s, int N) { if (encoding == S_ENC_UTF8) return utf8_strchrn(s,N); else return (char *)&s[N]; } /* TRUE if strings a and b are identical save for leading or trailing whitespace */ TBOOLEAN streq(const char *a, const char *b) { int enda, endb; while (isspace(*a)) a++; while (isspace(*b)) b++; enda = strlen(a) - 1; endb = strlen(b) - 1; while (isspace(a[enda])) enda--; while (isspace(b[endb])) endb--; return (enda == endb) ? !strncmp(a,b,++enda) : FALSE; } �������������������������������������������������gnuplot-4.6.4/src/stats.c���������������������������������������������������������������������������0000644�0004711�0000144�00000071562�12132041265�012231� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: stats.c,v 1.3.2.4 2013/04/12 17:21:57 sfeam Exp $"); } #endif /* GNUPLOT - stats.c */ /* * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. */ #include "gp_types.h" #ifdef USE_STATS /* Only compile this if configured with --enable-stats */ #include "alloc.h" #include "axis.h" #include "command.h" #include "datafile.h" #include "gadgets.h" /* For polar and parametric flags */ #include "matrix.h" /* For vector allocation */ #include "scanner.h" /* To check for legal prefixes */ #include "variable.h" /* For locale handling */ #include "stats.h" #define INITIAL_DATA_SIZE (4096) /* initial size of data arrays */ static int comparator __PROTO(( const void *a, const void *b )); static struct file_stats analyze_file __PROTO(( long n, int outofrange, int invalid, int blank, int dblblank )); static struct sgl_column_stats analyze_sgl_column __PROTO(( double *data, long n, long nr )); static struct two_column_stats analyze_two_columns __PROTO(( double *x, double *y, struct sgl_column_stats res_x, struct sgl_column_stats res_y, long n )); static void ensure_output __PROTO((void)); static char* fmt __PROTO(( char *buf, double val )); static void sgl_column_output_nonformat __PROTO(( struct sgl_column_stats s, char *x )); static void file_output __PROTO(( struct file_stats s )); static void sgl_column_output __PROTO(( struct sgl_column_stats s, long n )); static void two_column_output __PROTO(( struct sgl_column_stats x, struct sgl_column_stats y, struct two_column_stats xy, long n)); static void create_and_set_var __PROTO(( double val, char *prefix, char *base, char *suffix )); static void sgl_column_variables __PROTO(( struct sgl_column_stats res, char *prefix, char *postfix )); static TBOOLEAN validate_data __PROTO((double v, AXIS_INDEX ax)); void statsrequest __PROTO((void)); /* ================================================================= Data Structures ================================================================= */ /* Keeps info on a value and its index in the file */ struct pair { double val; long index; }; /* Collect results from analysis */ struct file_stats { long records; long blanks; long invalid; long outofrange; long blocks; /* blocks are separated by double blank lines */ }; struct sgl_column_stats { /* Matrix dimensions */ int sx; int sy; double mean; double stddev; double sum; /* sum x */ double sum_sq; /* sum x**2 */ struct pair min; struct pair max; double median; double lower_quartile; double upper_quartile; double cog_x; /* centre of gravity */ double cog_y; /* info on data points out of bounds? */ }; struct two_column_stats { double sum_xy; double slope; /* linear regression */ double intercept; double slope_err; double intercept_err; double correlation; double pos_min_y; /* x coordinate of min y */ double pos_max_y; /* x coordinate of max y */ }; /* ================================================================= Analysis and Output ================================================================= */ /* Needed by qsort() when we sort the data points to find the median. */ /* FIXME: I am dubious that keeping the original index gains anything. */ /* It makes no sense at all for quartiles, and even the min/max are not */ /* guaranteed to be unique. */ static int comparator( const void *a, const void *b ) { struct pair *x = (struct pair *)a; struct pair *y = (struct pair *)b; if ( x->val < y->val ) return -1; if ( x->val > y->val ) return 1; return 0; } static struct file_stats analyze_file( long n, int outofrange, int invalid, int blank, int dblblank ) { struct file_stats res; res.records = n; res.invalid = invalid; res.blanks = blank; res.blocks = dblblank + 1; /* blocks are separated by dbl blank lines */ res.outofrange = outofrange; return res; } static struct sgl_column_stats analyze_sgl_column( double *data, long n, long nr ) { struct sgl_column_stats res; long i; double s = 0.0; double s2 = 0.0; double cx = 0.0; double cy = 0.0; struct pair *tmp = (struct pair *)gp_alloc( n*sizeof(struct pair), "analyze_sgl_column" ); if ( nr > 0 ) { res.sx = nr; res.sy = n / nr; } else { res.sx = 0; res.sy = n; } /* Mean and Std Dev and centre of gravity */ for( i=0; i<n; i++ ) { s += data[i]; s2 += data[i]*data[i]; if ( nr > 0 ) { cx += data[i]*(i % res.sx); cy += data[i]*(i / res.sx); } } res.mean = s/(double)n; res.stddev = sqrt( s2/(double)n - res.mean*res.mean ); res.sum = s; res.sum_sq = s2; for( i=0; i<n; i++ ) { tmp[i].val = data[i]; tmp[i].index = i; } qsort( tmp, n, sizeof(struct pair), comparator ); res.min = tmp[0]; res.max = tmp[n-1]; /* * This uses the same quartile definitions as the boxplot code in graphics.c */ if ((n & 0x1) == 0) res.median = 0.5 * (tmp[n/2 - 1].val + tmp[n/2].val); else res.median = tmp[(n-1)/2].val; if ((n & 0x3) == 0) res.lower_quartile = 0.5 * (tmp[n/4 - 1].val + tmp[n/4].val); else res.lower_quartile = tmp[(n+3)/4 - 1].val; if ((n & 0x3) == 0) res.upper_quartile = 0.5 * (tmp[n - n/4].val + tmp[n - n/4 - 1].val); else res.upper_quartile = tmp[n - (n+3)/4].val; /* Note: the centre of gravity makes sense for positive value matrices only */ if ( cx == 0.0 && cy == 0.0) { res.cog_x = 0.0; res.cog_y = 0.0; } else { res.cog_x = cx / s; res.cog_y = cy / s; } free(tmp); return res; } static struct two_column_stats analyze_two_columns( double *x, double *y, struct sgl_column_stats res_x, struct sgl_column_stats res_y, long n ) { struct two_column_stats res; long i; double s = 0; for( i=0; i<n; i++ ) { s += x[i]*y[i]; } res.sum_xy = s; res.slope = res.sum_xy - res_x.sum*res_y.sum/n; res.slope /= res_x.sum_sq - (res_x.sum)*(res_x.sum)/n; res.intercept = res_y.mean - res.slope * res_x.mean; res.correlation = res.slope * res_x.stddev/res_y.stddev; res.pos_min_y = x[res_y.min.index]; res.pos_max_y = x[res_y.max.index]; return res; } /* ================================================================= Output ================================================================= */ /* Output */ /* Note: print_out is a FILE ptr, set by the "set print" command */ static void ensure_output() { if (!print_out) print_out = stderr; } static char* fmt( char *buf, double val ) { if ( fabs(val) < 1e-14 ) sprintf( buf, "%11.4f", 0.0 ); else if ( fabs(log10(fabs(val))) < 6 ) sprintf( buf, "%11.4f", val ); else sprintf( buf, "%11.5e", val ); return buf; } static void file_output( struct file_stats s ) { int width = 3; /* Assuming that records is the largest number of the four... */ if ( s.records > 0 ) width = 1 + (int)( log10((double)s.records) ); ensure_output(); /* Non-formatted to disk */ if ( print_out != stdout && print_out != stderr ) { fprintf( print_out, "%s\t%ld\n", "records", s.records ); fprintf( print_out, "%s\t%ld\n", "invalid", s.invalid ); fprintf( print_out, "%s\t%ld\n", "blanks", s.blanks ); fprintf( print_out, "%s\t%ld\n", "blocks", s.blocks ); fprintf( print_out, "%s\t%ld\n", "outofrange", s.outofrange ); return; } /* Formatted to screen */ fprintf( print_out, "\n" ); fprintf( print_out, "* FILE: \n" ); fprintf( print_out, " Records: %*ld\n", width, s.records ); fprintf( print_out, " Out of range: %*ld\n", width, s.outofrange ); fprintf( print_out, " Invalid: %*ld\n", width, s.invalid ); fprintf( print_out, " Blank: %*ld\n", width, s.blanks ); fprintf( print_out, " Data Blocks: %*ld\n", width, s.blocks ); } static void sgl_column_output_nonformat( struct sgl_column_stats s, char *x ) { fprintf( print_out, "%s%s\t%f\n", "mean", x, s.mean ); fprintf( print_out, "%s%s\t%f\n", "stddev", x, s.stddev ); fprintf( print_out, "%s%s\t%f\n", "sum", x, s.sum ); fprintf( print_out, "%s%s\t%f\n", "sum_sq", x, s.sum_sq ); fprintf( print_out, "%s%s\t%f\n", "min", x, s.min.val ); if ( s.sx == 0 ) { fprintf( print_out, "%s%s\t%f\n", "lo_quartile", x, s.lower_quartile ); fprintf( print_out, "%s%s\t%f\n", "median", x, s.median ); fprintf( print_out, "%s%s\t%f\n", "up_quartile", x, s.upper_quartile ); } fprintf( print_out, "%s%s\t%f\n", "max", x, s.max.val ); /* If data set is matrix */ if ( s.sx > 0 ) { fprintf( print_out, "%s%s\t%ld\n","index_min_x", x, (s.min.index) / s.sx ); fprintf( print_out, "%s%s\t%ld\n","index_min_y", x, (s.min.index) % s.sx ); fprintf( print_out, "%s%s\t%ld\n","index_max_x", x, (s.max.index) / s.sx ); fprintf( print_out, "%s%s\t%ld\n","index_max_y", x, (s.max.index) % s.sx ); fprintf( print_out, "%s%s\t%f\n","cog_x", x, s.cog_x ); fprintf( print_out, "%s%s\t%f\n","cog_y", x, s.cog_y ); } else { fprintf( print_out, "%s%s\t%ld\n","min_index", x, s.min.index ); fprintf( print_out, "%s%s\t%ld\n","max_index", x, s.max.index ); } } static void sgl_column_output( struct sgl_column_stats s, long n ) { int width = 1; char buf[32]; char buf2[32]; if ( n > 0 ) width = 1 + (int)( log10( (double)n ) ); ensure_output(); /* Non-formatted to disk */ if ( print_out != stdout && print_out != stderr ) { sgl_column_output_nonformat( s, "_y" ); return; } /* Formatted to screen */ fprintf( print_out, "\n" ); /* First, we check whether the data file was a matrix */ if ( s.sx > 0) fprintf( print_out, "* MATRIX: [%d X %d] \n", s.sx, s.sy ); else fprintf( print_out, "* COLUMN: \n" ); fprintf( print_out, " Mean: %s\n", fmt( buf, s.mean ) ); fprintf( print_out, " Std Dev: %s\n", fmt( buf, s.stddev ) ); fprintf( print_out, " Sum: %s\n", fmt( buf, s.sum ) ); fprintf( print_out, " Sum Sq.: %s\n", fmt( buf, s.sum_sq ) ); fprintf( print_out, "\n" ); /* For matrices, the quartiles and the median do not make too much sense */ if ( s.sx > 0 ) { fprintf( print_out, " Minimum: %s [%*ld %ld ]\n", fmt(buf, s.min.val), width, (s.min.index) / s.sx, (s.min.index) % s.sx); fprintf( print_out, " Maximum: %s [%*ld %ld ]\n", fmt(buf, s.max.val), width, (s.max.index) / s.sx, (s.max.index) % s.sx); fprintf( print_out, " COG: %s %s\n", fmt(buf, s.cog_x), fmt(buf2, s.cog_y) ); } else { /* FIXME: The "position" are randomly selected from a non-unique set. Bad! */ fprintf( print_out, " Minimum: %s [%*ld]\n", fmt(buf, s.min.val), width, s.min.index ); fprintf( print_out, " Maximum: %s [%*ld]\n", fmt(buf, s.max.val), width, s.max.index ); fprintf( print_out, " Quartile: %s \n", fmt(buf, s.lower_quartile) ); fprintf( print_out, " Median: %s \n", fmt(buf, s.median) ); fprintf( print_out, " Quartile: %s \n", fmt(buf, s.upper_quartile) ); fprintf( print_out, "\n" ); } } static void two_column_output( struct sgl_column_stats x, struct sgl_column_stats y, struct two_column_stats xy, long n ) { int width = 1; char bfx[32]; char bfy[32]; char blank[32]; if ( n > 0 ) width = 1 + (int)( log10( (double)n ) ); /* Non-formatted to disk */ if ( print_out != stdout && print_out != stderr ) { sgl_column_output_nonformat( x, "_x" ); sgl_column_output_nonformat( y, "_y" ); fprintf( print_out, "%s\t%f\n", "slope", xy.slope ); fprintf( print_out, "%s\t%f\n", "intercept", xy.intercept ); fprintf( print_out, "%s\t%f\n", "correlation", xy.correlation ); fprintf( print_out, "%s\t%f\n", "sumxy", xy.sum_xy ); return; } /* Create a string of blanks of the required length */ strncpy( blank, " ", width+4 ); blank[width+4] = '\0'; ensure_output(); fprintf( print_out, "\n" ); fprintf( print_out, "* COLUMNS:\n" ); fprintf( print_out, " Mean: %s %s %s\n", fmt(bfx, x.mean), blank, fmt(bfy, y.mean) ); fprintf( print_out, " Std Dev: %s %s %s\n", fmt(bfx, x.stddev), blank, fmt(bfy, y.stddev ) ); fprintf( print_out, " Sum: %s %s %s\n", fmt(bfx, x.sum), blank, fmt(bfy, y.sum) ); fprintf( print_out, " Sum Sq.: %s %s %s\n", fmt(bfx, x.sum_sq), blank, fmt(bfy, y.sum_sq ) ); fprintf( print_out, "\n" ); /* FIXME: The "positions" are randomly selected from a non-unique set. Bad! */ fprintf( print_out, " Minimum: %s [%*ld] %s [%*ld]\n", fmt(bfx, x.min.val), width, x.min.index, fmt(bfy, y.min.val), width, y.min.index ); fprintf( print_out, " Maximum: %s [%*ld] %s [%*ld]\n", fmt(bfx, x.max.val), width, x.max.index, fmt(bfy, y.max.val), width, y.max.index ); fprintf( print_out, " Quartile: %s %s %s\n", fmt(bfx, x.lower_quartile), blank, fmt(bfy, y.lower_quartile) ); fprintf( print_out, " Median: %s %s %s\n", fmt(bfx, x.median), blank, fmt(bfy, y.median) ); fprintf( print_out, " Quartile: %s %s %s\n", fmt(bfx, x.upper_quartile), blank, fmt(bfy, y.upper_quartile) ); fprintf( print_out, "\n" ); /* Simpler below - don't care about alignment */ if ( xy.intercept < 0.0 ) fprintf( print_out, " Linear Model: y = %.4g x - %.4g\n", xy.slope, -xy.intercept ); else fprintf( print_out, " Linear Model: y = %.4g x + %.4g\n", xy.slope, xy.intercept ); fprintf( print_out, " Correlation: r = %.4g\n", xy.correlation ); fprintf( print_out, " Sum xy: %.4g\n", xy.sum_xy ); fprintf( print_out, "\n" ); } /* ================================================================= Variable Handling ================================================================= */ static void create_and_set_var( double val, char *prefix, char *base, char *suffix ) { int len; char *varname; struct udvt_entry *udv_ptr; t_value data; Gcomplex( &data, val, 0.0 ); /* data is complex, real=val, imag=0.0 */ /* In case prefix (or suffix) is NULL - make them empty strings */ prefix = prefix ? prefix : ""; suffix = suffix ? suffix : ""; len = strlen(prefix) + strlen(base) + strlen(suffix) + 1; varname = (char *)gp_alloc( len, "create_and_set_var" ); sprintf( varname, "%s%s%s", prefix, base, suffix ); /* Note that add_udv_by_name() checks if the name already exists, and * returns the existing ptr if found. It also allocates memory for * its own copy of the varname. */ udv_ptr = add_udv_by_name(varname); udv_ptr->udv_value = data; udv_ptr->udv_undef = FALSE; free( varname ); } static void file_variables( struct file_stats s, char *prefix ) { /* Suffix does not make sense here! */ create_and_set_var( s.records, prefix, "records", "" ); create_and_set_var( s.invalid, prefix, "invalid", "" ); create_and_set_var( s.blanks, prefix, "blank", "" ); create_and_set_var( s.blocks, prefix, "blocks", "" ); create_and_set_var( s.outofrange, prefix, "outofrange", "" ); } static void sgl_column_variables( struct sgl_column_stats s, char *prefix, char *suffix ) { create_and_set_var( s.mean, prefix, "mean", suffix ); create_and_set_var( s.stddev, prefix, "stddev", suffix ); create_and_set_var( s.sum, prefix, "sum", suffix ); create_and_set_var( s.sum_sq, prefix, "sumsq", suffix ); create_and_set_var( s.min.val, prefix, "min", suffix ); create_and_set_var( s.max.val, prefix, "max", suffix ); /* If data set is matrix */ if ( s.sx > 0 ) { create_and_set_var( (s.min.index) / s.sx, prefix, "index_min_x", suffix ); create_and_set_var( (s.min.index) % s.sx, prefix, "index_min_y", suffix ); create_and_set_var( (s.max.index) / s.sx, prefix, "index_max_x", suffix ); create_and_set_var( (s.max.index) % s.sx, prefix, "index_max_y", suffix ); } else { create_and_set_var( s.median, prefix, "median", suffix ); create_and_set_var( s.lower_quartile, prefix, "lo_quartile", suffix ); create_and_set_var( s.upper_quartile, prefix, "up_quartile", suffix ); create_and_set_var( s.min.index, prefix, "index_min", suffix ); create_and_set_var( s.max.index, prefix, "index_max", suffix ); } } static void two_column_variables( struct two_column_stats s, char *prefix) { /* Suffix does not make sense here! */ create_and_set_var( s.slope, prefix, "slope", "" ); create_and_set_var( s.intercept, prefix, "intercept", "" ); create_and_set_var( s.correlation, prefix, "correlation", "" ); create_and_set_var( s.sum_xy, prefix, "sumxy", "" ); create_and_set_var( s.pos_min_y, prefix, "pos_min_y", "" ); create_and_set_var( s.pos_max_y, prefix, "pos_max_y", "" ); } /* ================================================================= Range Handling ================================================================= */ /* We validate our data here: discard everything that is outside * the specified range. However, we have to be a bit careful here, * because if no range is specified, we keep everything */ static TBOOLEAN validate_data(double v, AXIS_INDEX ax) { /* These are flag bits, not constants!!! */ if ((axis_array[ax].autoscale & AUTOSCALE_BOTH) == AUTOSCALE_BOTH) return TRUE; if (((axis_array[ax].autoscale & AUTOSCALE_BOTH) == AUTOSCALE_MIN) && (v <= axis_array[ax].max)) return TRUE; if (((axis_array[ax].autoscale & AUTOSCALE_BOTH) == AUTOSCALE_MAX) && (v >= axis_array[ax].min)) return TRUE; if (((axis_array[ax].autoscale & AUTOSCALE_BOTH) == AUTOSCALE_NONE) && ((v <= axis_array[ax].max) && (v >= axis_array[ax].min))) return(TRUE); return(FALSE); } /* ================================================================= Parse Command Line and Process ================================================================= */ void statsrequest(void) { int i; int columns; int columnsread; double v[2]; static char *file_name = NULL; /* Vars to hold data and results */ long n; /* number of records retained */ long max_n; static double *data_x = NULL; static double *data_y = NULL; /* values read from file */ long invalid; /* number of missing/invalid records */ long blanks; /* number of blank lines */ long doubleblanks; /* number of repeated blank lines */ long out_of_range; /* number pts rejected, because out of range */ struct file_stats res_file; struct sgl_column_stats res_x, res_y; struct two_column_stats res_xy; float *matrix; /* matrix data. This must be float. */ int nc, nr; /* matrix dimensions. */ int index; /* Vars for variable handling */ static char *prefix = NULL; /* prefix for user-defined vars names */ /* Vars that control output */ TBOOLEAN do_output = TRUE; /* Generate formatted output */ c_token++; /* Parse ranges */ AXIS_INIT2D(FIRST_X_AXIS, 0); AXIS_INIT2D(FIRST_Y_AXIS, 0); parse_range(FIRST_X_AXIS); parse_range(FIRST_Y_AXIS); /* Initialize */ columnsread = 2; invalid = 0; /* number of missing/invalid records */ blanks = 0; /* number of blank lines */ doubleblanks = 0; /* number of repeated blank lines */ out_of_range = 0; /* number pts rejected, because out of range */ n = 0; /* number of records retained */ nr = 0; /* Matrix dimensions */ nc = 0; max_n = INITIAL_DATA_SIZE; free(data_x); free(data_y); data_x = vec(max_n); /* start with max. value */ data_y = vec(max_n); if ( !data_x || !data_y ) int_error( NO_CARET, "Internal error: out of memory in stats" ); n = invalid = blanks = doubleblanks = out_of_range = nr = 0; /* Get filename */ free ( file_name ); file_name = try_to_get_string(); if ( !file_name ) int_error(c_token, "missing filename"); /* =========================================================== v923z: insertion for treating matrices EAM: only handles ascii matrix with uniform grid, and fails to apply any input data transforms =========================================================== */ if ( almost_equals(c_token, "mat$rix") ) { df_open(file_name, 3, NULL); index = df_num_bin_records - 1; /* We take these values as set by df_determine_matrix_info See line 1996 in datafile.c */ nc = df_bin_record[index].scan_dim[0]; nr = df_bin_record[index].scan_dim[1]; n = nc * nr; matrix = (float *)df_bin_record[index].memory_data; /* Fill up a vector, so that we can use the existing code. */ /* FIXME: matrix code does not actually use data_x */ if ( !redim_vec(&data_x, n) || !redim_vec(&data_y, n)) { int_error( NO_CARET, "Out of memory in stats: too many datapoints (%d)?", n ); } for( i=0; i < n; i++ ) { data_y[i] = (double)matrix[i]; } /* We can close the file here, there is nothing else to do */ df_close(); /* We will invoke single column statistics for the matrix */ columns = 1; } else { /* Not a matrix */ columns = df_open(file_name, 2, NULL); /* up to 2 using specs allowed */ if (columns < 0) int_error(NO_CARET, "Can't read data file"); if (columns > 2 ) int_error(c_token, "Need 0 to 2 using specs for stats command"); /* If the user has set an explicit locale for numeric input, apply it here so that it affects data fields read from the input file. */ /* v923z: where exactly should this be? here or before the matrix case? * I think, we should move everything here to before trying to open the file. * There is no point in trying to read anything, if the axis is logarithmic, e.g. */ set_numeric_locale(); /* For all these below: we could save the state, switch off, then restore */ if ( axis_array[FIRST_X_AXIS].log || axis_array[FIRST_Y_AXIS].log ) int_error( NO_CARET, "Stats command not available with logscale active"); if ( axis_array[FIRST_X_AXIS].datatype == DT_TIMEDATE || axis_array[FIRST_Y_AXIS].datatype == DT_TIMEDATE ) int_error( NO_CARET, "Stats command not available in timedata mode"); if ( polar ) int_error( NO_CARET, "Stats command not available in polar mode" ); if ( parametric ) int_error( NO_CARET, "Stats command not available in parametric mode" ); /* The way readline and friends work is as follows: - df_open will return the number of columns requested in the using spec so that "columns" will be 0, 1, or 2 (no using, using 1, using 1:2) - readline always returns the same number of columns (for us: 1 or 2) - using 1:2 = return two columns, skipping lines w/ bad data - using 1 = return sgl column (supply zeros (0) for the second col) - no using = return two columns (first two), fail on bad data We need to know how many columns to process. If columns==1 or ==2 (that is, if there was a using spec), all is clear and we use the value of columns. But: if columns is 0, then we need to figure out the number of cols read from the return value of readline. If readline ever returns 1, we take that; only if it always returns 2 do we assume two cols. */ while( (i = df_readline(v, 2)) != DF_EOF ) { columnsread = ( i > columnsread ? i : columnsread ); if ( n >= max_n ) { max_n = (max_n * 3) / 2; /* increase max_n by factor of 1.5 */ /* Some of the reallocations went bad: */ if ( 0 || !redim_vec(&data_x, max_n) || !redim_vec(&data_y, max_n) ) { df_close(); int_error( NO_CARET, "Out of memory in stats: too many datapoints (%d)?", max_n ); } } /* if (need to extend storage space) */ switch (i) { case DF_MISSING: case DF_UNDEFINED: /* Invalids are only recognized if the syntax is like this: stats "file" using ($1):($2) If the syntax is simply: stats "file" using 1:2 then df_readline simply skips invalid records (does not return anything!) Status: 2009-11-02 */ invalid += 1; continue; case DF_FIRST_BLANK: blanks += 1; continue; case DF_SECOND_BLANK: blanks += 1; doubleblanks += 1; continue; case 0: int_error( NO_CARET, "bad data on line %d of file %s", df_line_number, df_filename ? df_filename : "" ); break; case 1: /* Read single column successfully */ if ( validate_data(v[0], FIRST_Y_AXIS) ) { data_y[n] = v[0]; n++; } else { out_of_range++; } break; case 2: /* Read two columns successfully */ if ( validate_data(v[0], FIRST_X_AXIS) && validate_data(v[1], FIRST_Y_AXIS) ) { data_x[n] = v[0]; data_y[n] = v[1]; n++; } else { out_of_range++; } break; } } /* end-while : done reading file */ df_close(); /* now resize fields to actual length: */ redim_vec(&data_x, n); redim_vec(&data_y, n); /* figure out how many columns where really read... */ if ( columns == 0 ) columns = columnsread; } /* end of case when the data file is not a matrix */ /* Now finished reading user input; return to C locale for internal use*/ reset_numeric_locale(); /* PKJ - TODO: similar for logscale, polar/parametric, timedata */ /* No data! Try to explain why. */ if ( n == 0 ) { if ( out_of_range > 0 ) int_error( NO_CARET, "All points out of range" ); else int_error( NO_CARET, "No valid data points found in file" ); } /* Parse the remainder of the command line: 0 to 2 tokens possible */ while( !(END_OF_COMMAND) ) { if ( almost_equals( c_token, "out$put" ) ) { do_output = TRUE; c_token++; } else if ( almost_equals( c_token, "noout$put" ) ) { do_output = FALSE; c_token++; } else if ( almost_equals(c_token, "pre$fix") || equals(c_token, "name")) { c_token++; free ( prefix ); prefix = try_to_get_string(); if (!legal_identifier(prefix) || !strcmp ("GPVAL_", prefix)) int_error( --c_token, "illegal prefix" ); } else { int_error( c_token, "Expecting [no]output or prefix"); } } /* Set defaults if not explicitly set by user */ if (!prefix) prefix = gp_strdup("STATS_"); i = strlen(prefix); if (prefix[i-1] != '_') { prefix = gp_realloc(prefix, i+2, "prefix"); strcat(prefix,"_"); } /* Do the actual analysis */ res_file = analyze_file( n, out_of_range, invalid, blanks, doubleblanks ); if ( columns == 1 ) { res_y = analyze_sgl_column( data_y, n, nr ); } if ( columns == 2 ) { /* If there are two columns, then the data file is not a matrix */ res_x = analyze_sgl_column( data_x, n, 0 ); res_y = analyze_sgl_column( data_y, n, 0 ); res_xy = analyze_two_columns( data_x, data_y, res_x, res_y, n ); } /* Store results in user-accessible variables */ /* Clear out any previous use of these variables */ del_udv_by_name( prefix, TRUE ); file_variables( res_file, prefix ); if ( columns == 1 ) { sgl_column_variables( res_y, prefix, "" ); } if ( columns == 2 ) { sgl_column_variables( res_x, prefix, "_x" ); sgl_column_variables( res_y, prefix, "_y" ); two_column_variables( res_xy, prefix ); } /* Output */ if ( do_output ) { file_output( res_file ); if ( columns == 1 ) sgl_column_output( res_y, res_file.records ); else two_column_output( res_x, res_y, res_xy, res_file.records ); } /* Cleanup */ free(data_x); free(data_y); data_x = NULL; data_y = NULL; free( file_name ); file_name = NULL; free( prefix ); prefix = NULL; } #endif /* The whole file is conditional on USE_STATS */ ����������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/�������������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340007�011367� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/config.os2���������������������������������������������������������������������0000644�0004711�0000144�00000037741�11670437273�013316� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* config.h for makefile.os2 * * Prepared according to config.h from ./configure and by means of * config_strip.sh as of gnuplot 4.3 in February 2008. */ /* Define to allow use of deprecated syntax and terminal behaviour. */ #define BACKWARDS_COMPATIBLE 1 /* Define if you want to support files in binary format. */ #define BINARY_DATA_FILE 1 /* Define if you want to use the CGI terminal under SCO. */ /* #undef CGI */ /* Define if you want online help and subtopic tables sorted by column. */ /* #undef COLUMN_HELP */ /* Define if you want to use libgrx20 with MSDOS/djgpp. */ /* #undef DJSVGA */ /* Define if this system uses a 32-bit DOS extender (djgpp/emx). */ /* #undef DOS32 */ /* Define to allow placement of rectangles and other objects */ #define EAM_OBJECTS 1 /* Define if color information should be passed for each vertex. */ /* #undef EXTENDED_COLOR_SPECS */ /* Define if you want to supply pre-existing X11 windows. */ #define EXTERNAL_X11_WINDOW 1 /* Define if <errno.h> declares errno. */ /* #undef EXTERN_ERRNO */ /* Define if libgd supports animated gifs. */ /* #undef GIF_ANIMATION */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define if you want to use a gnuplot history file. */ /* #undef GNUPLOT_HISTORY */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define to allow command line macros. EXPERIMENTAL */ #define GP_MACROS 1 /* Define if you want to use a newer version of libgrx under MSDOS/djgpp. */ /* #undef GRX21 */ /* Define to 1 if you have the <3dkit.h> header file. */ /* #undef HAVE_3DKIT_H */ /* Define to 1 if you have the `atexit' function. */ #define HAVE_ATEXIT 1 /* Define to 1 if you have the `bcopy' function. */ #define HAVE_BCOPY 1 /* Define to 1 if you have the `bzero' function. */ #define HAVE_BZERO 1 /* Define if you want the cairo-based terminals. */ /* #undef HAVE_CAIROPDF */ /* Define to 1 if you have the declaration of `signgam', and to 0 if you don't. */ /* #undef HAVE_DECL_SIGNGAM */ /* Define to 1 if you have the <dirent.h> header file. */ #define HAVE_DIRENT_H 1 /* Define to 1 if you have the `doprnt' function. */ /* #undef HAVE_DOPRNT */ /* Define to 1 if you have the `erf' function. */ /* #undef HAVE_ERF */ /* Define to 1 if you have the `erfc' function. */ /* #undef HAVE_ERFC */ /* Define to 1 if you have the <errno.h> header file. */ #define HAVE_ERRNO_H 1 /* Define to 1 if you have the <float.h> header file. */ #define HAVE_FLOAT_H 1 /* Define to 1 if you have the `fork' function. */ #define HAVE_FORK 1 /* Define to 1 if you have the `gamma' function. */ /* #undef HAVE_GAMMA */ /* Define if libgd supports gif. */ /* #undef HAVE_GD_GIF */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define to 1 if you have the <gd.h> header file. */ /* #undef HAVE_GD_H */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define if libgd supports jpeg. */ /* #undef HAVE_GD_JPEG */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define if libgd supports png. */ /* #undef HAVE_GD_PNG */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define if libgd supports TrueType fonts through libfreetype. */ /* #undef HAVE_GD_TTF */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 /* Define to 1 if you have the <ggi/wmh.h> header file. */ /* #undef HAVE_GGI_WMH_H */ /* Define to 1 if you have the <ggi/xmi.h> header file. */ /* #undef HAVE_GGI_XMI_H */ /* Define to use gtk/gdk tweaks */ /* #undef HAVE_GTK */ /* Define to use gtk+ functions to handle cairo */ /* #undef HAVE_GTK28 */ /* Define to 1 if you have the `index' function. */ #define HAVE_INDEX 1 /* Define to 1 if you have the <inttypes.h> header file. */ /* #undef HAVE_INTTYPES_H */ /* Define to 1 if you have the `isnan' function. */ #define HAVE_ISNAN 1 /* Define if you use have kpsexpand (TeX). */ /* #undef HAVE_KPSEXPAND */ /* Define to 1 if you have the `lgamma' function. */ /* #undef HAVE_LGAMMA */ /* Define to 1 if you're using the aquaterm library on Mac OS X */ /* #undef HAVE_LIBAQUATERM */ /* Define to 1 if you have the <libc.h> header file. */ /* #undef HAVE_LIBC_H */ /* Define if you have gd library. */ /* #undef HAVE_LIBGD */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define to 1 if you have the `m' library (-lm). */ /* #undef HAVE_LIBM */ /* Define to 1 if you have the `pdf' library (-lpdf). */ /* #undef HAVE_LIBPDF */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define if your pdf library is too old to use PDF_begin_document. */ /* #undef HAVE_LIBPDF_OPEN_FILE */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define if you are using the GNU readline library. */ /* #undef HAVE_LIBREADLINE */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define if you have zlib. */ /* #undef HAVE_LIBZ */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define to 1 if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the <locale.h> header file. */ #define HAVE_LOCALE_H 1 /* Define to 1 if you have the <malloc.h> header file. */ #define HAVE_MALLOC_H 1 /* Define to 1 if you have the <math.h> header file. */ #define HAVE_MATH_H 1 /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define if your pdf library doesn't support dash patterns. */ /* #undef HAVE_NODASH_LIBPDF */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define if your pdf library is too old to support patterns. */ /* #undef HAVE_OLD_LIBPDF */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ /* Define to 1 if you have the `pclose' function. */ #define HAVE_PCLOSE 1 /* Define to 1 if you have the <pdflib.h> header file. */ /* #undef HAVE_PDFLIB_H */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define to 1 if you have the `poll' function. */ /* #undef HAVE_POLL */ /* Define to 1 if you have the <poll.h> header file. */ /* #undef HAVE_POLL_H */ /* Define to 1 if you have the `popen' function. */ #define HAVE_POPEN 1 /* Define to 1 if you have the <readline/history.h> header file. */ /* #undef HAVE_READLINE_HISTORY_H */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define to 1 if you have the <readline/readline.h> header file. */ /* #undef HAVE_READLINE_READLINE_H */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define to 1 if you have the <readline/tilde.h> header file. */ /* #undef HAVE_READLINE_TILDE_H */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define to 1 if you have the `rindex' function. */ #define HAVE_RINDEX 1 /* Define to 1 if you have the `select' function. */ #define HAVE_SELECT 1 /* Define to 1 if you have the `setvbuf' function. */ #define HAVE_SETVBUF 1 /* Define to 1 if you have the <sgtty.h> header file. */ /* #undef HAVE_SGTTY_H */ /* This file is just a stub in EMX */ /* Define if we have sigsetjmp(). */ #define HAVE_SIGSETJMP 1 /* Define to 1 if you have the `sleep' function. */ #define HAVE_SLEEP 1 /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define to 1 if stdbool.h conforms to C99. */ /* #undef HAVE_STDBOOL_H */ /* Define to 1 if you have the <stdint.h> header file. */ /* #undef HAVE_STDINT_H */ /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `stpcpy' function. */ /* #undef HAVE_STPCPY */ /* Define to 1 if you have the `strcasecmp' function. */ /* #undef HAVE_STRCASECMP */ /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strcspn' function. */ #define HAVE_STRCSPN 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* Define to 1 if you have the `stricmp' function. */ #define HAVE_STRICMP 1 /* Define to 1 if cpp supports the ANSI # stringizing operator. */ #define HAVE_STRINGIZE 1 /* Define to 1 if you have the <strings.h> header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strncasecmp' function. */ /* #undef HAVE_STRNCASECMP */ /* Define to 1 if you have the `strnicmp' function. */ #define HAVE_STRNICMP 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define if math.h declares struct exception for matherr(). */ /* #undef HAVE_STRUCT_EXCEPTION_IN_MATH_H */ /* Define to 1 if you have the `sysinfo' function. */ /* #undef HAVE_SYSINFO */ /* Define to 1 if you have the <sys/bsdtypes.h> header file. */ /* #undef HAVE_SYS_BSDTYPES_H */ /* Define to 1 if you have the <sys/ioctl.h> header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the <sys/param.h> header file. */ #define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the <sys/select.h> header file. */ #define HAVE_SYS_SELECT_H 1 /* Define to 1 if you have the <sys/socket.h> header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/systeminfo.h> header file. */ /* #undef HAVE_SYS_SYSTEMINFO_H */ /* Define to 1 if you have the <sys/timeb.h> header file. */ #define HAVE_SYS_TIMEB_H 1 /* Define to 1 if you have the <sys/time.h> header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <sys/utsname.h> header file. */ #define HAVE_SYS_UTSNAME_H 1 /* Define to 1 if you have the `tcgetattr' function. */ /* #undef HAVE_TCGETATTR */ /* Define to 1 if you have the <termios.h> header file. */ /* #undef HAVE_TERMIOS_H */ /* Define to 1 if you have the <time.h> header file. */ #define HAVE_TIME_H 1 /* Define if time_t is declared in time.h. */ #define HAVE_TIME_T_IN_TIME_H 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `usleep' function. */ /* #undef HAVE_USLEEP */ /* Define to 1 if you have the <values.h> header file. */ /* #undef HAVE_VALUES_H */ /* Define to 1 if you have the `vfork' function. */ /* #undef HAVE_VFORK */ /* Define to 1 if you have the <vfork.h> header file. */ /* #undef HAVE_VFORK_H */ /* Define to 1 if you have the `vfprintf' function. */ #define HAVE_VFPRINTF 1 /* Define to 1 if you have the <vgagl.h> header file. */ /* #undef HAVE_VGAGL_H */ /* Define to 1 if `fork' works. */ #define HAVE_WORKING_FORK 1 /* Define to 1 if `vfork' works. */ /* #undef HAVE_WORKING_VFORK */ /* Define to 1 if the system has the type `_Bool'. */ /* #undef HAVE__BOOL */ /* Define to enable gridbox optimization in hidden3d code. */ /* #undef HIDDEN3D_GRIDBOX */ /* Define to enable quadtree optimization in hidden3d code. */ #define HIDDEN3D_QUADTREE 1 /* Define to enable handling point size in hidden3d code. */ #define HIDDEN3D_VAR_PTSIZE 1 /* Define if this is a Linux system with SuperVGA library. */ /* #undef LINUXVGA */ /* Define if this is an MSDOS system. */ /* #undef MSDOS */ /* Define if you want to read .gnuplot from current directory (SECURITY RISK!). */ /* #undef USE_CWDRC */ /* Name of package */ /* #undef PACKAGE */ /* Define to the address where bug reports for this package should be sent. */ /* #undef PACKAGE_BUGREPORT */ /* Define to the full name of this package. */ /* #undef PACKAGE_NAME */ /* Define to the full name and version of this package. */ /* #undef PACKAGE_STRING */ /* Define to the one symbol short name of this package. */ /* #undef PACKAGE_TARNAME */ /* Define to the version of this package. */ /* #undef PACKAGE_VERSION */ /* Define if you do have the popen and pclose functions. */ #define PIPES 1 /* Unix-type of Interprocess Communication is required for mouse support. */ /* #undef PIPE_IPC */ /* Define to 1 if the C compiler supports function prototypes. */ #define PROTOTYPES 1 /* Define if you want to use the included readline function. */ /* I think it must be defined in order the mousing and OS2_IPC work. */ #define READLINE 1 /* Define as the return type of signal handlers (`int' or `void'). */ /* #undef RETSIGTYPE */ /* Define to the type of arg 1 for `select'. */ #define SELECT_TYPE_ARG1 int /* Define to the type of args 2, 3 and 4 for `select'. */ #define SELECT_TYPE_ARG234 (struct _fd_set *) /* Define to the type of arg 5 for `select'. */ #define SELECT_TYPE_ARG5 (struct timeval *) /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */ /* #undef STAT_MACROS_BROKEN */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if you want to use the sunview terminal (sun). */ /* #undef SUN */ /* Define to use thin plate spines. */ /* #undef THIN_PLATE_SPLINES_GRID */ /* Define if the 3dkit libray is present. */ /* #undef THREEDKIT */ /* Define if you want to use the experimental ggi driver. */ /* #undef USE_GGI_DRIVER */ /* Define if you want to have mouse support in interactive terminals. */ /* #undef USE_MOUSE */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define to enable multi-byte font support for x11 */ /* #undef USE_X11_MULTIBYTE */ /* Version number of package */ /* #undef VERSION */ /* Define if the vgagl libray is present. */ /* #undef VGAGL */ /* Define to allow zooming or refresh of volatile data. EXPERIMENTAL */ #define VOLATILE_REFRESH 1 /* Define if you want the wxwidgets terminal. */ /* #undef WXWIDGETS */ /* Define if you are using the X11 window system. */ /* #undef X11 */ /* Don't change it here -- this define is set in config/makefile.os2. */ /* Define to 1 if the X Window System is missing or not being used. */ /* #undef X_DISPLAY_MISSING */ /* Define like PROTOTYPES; this can be used by system headers. */ /* #undef __PROTOTYPES */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* libgd versions < 1.8.4 need gdImageStringTTF rather than gdImageStringFT */ /* #undef gdImageStringFT */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif /* Define to `int' if <sys/types.h> does not define. */ /* #define pid_t int */ /* Define to `unsigned' if <sys/types.h> does not define. */ /* #undef size_t */ /* Define as `fork' if `vfork' does not work. */ /* #undef vfork */ /* * ================================================== * Stuff not provided by config.hin (aka ./configure) * ================================================== */ /* OS/2 Interprocess Communication is required for mouse support. */ #ifdef USE_MOUSE # define OS2_IPC 1 #endif /* From the introduction of enhanced text support into gnuplot, there were native implementations for postscript and PM terminals. This has been replaced by a generic approach (a terminal API) in 2004. As there exist applications which use gnupmdrv.exe directly we still keep the old implementation and binary interface. */ #define PM_KEEP_OLD_ENHANCED_TEXT 1 /* As the new generic approach for enhanced text for the PM terminal is still considered somewhat experimental, the old code will be used if this is defined. (Please note that this option will be removed in the near future.) */ /* #undef PM_OLD_ENHANCED_TEXT */ #if defined(PM_OLD_ENHANCED_TEXT) && !defined(PM_KEEP_OLD_ENHANCED_TEXT) #define PM_KEEP_OLD_ENHANCED_TEXT 1 #endif �������������������������������gnuplot-4.6.4/config/config.wc����������������������������������������������������������������������0000644�0004711�0000144�00000003555�11367363351�013216� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* config.h for makefile.wc */ /* gnuplot feature enablers */ #define BINARY_DATA_FILE 1 #define GP_ENH_EST 1 #define GP_ISVAR 1 #define GP_MACROS 1 #define HIDDEN3D_QUADTREE 1 #define USE_ULIG_FILLEDBOXES 1 #define USE_ULIG_RELATIVE_BOXWIDTH 1 #undef NO_GIH #define READLINE #define GP_INLINE __inline #define NEAR near #define PROTOTYPES 1 #define RETSIGTYPE void #undef STAT_MACROS_BROKEN #define STDC_HEADERS 1 #undef HAVE_DIRENT_H #define HAVE_ERRNO_H 1 #define HAVE_FLOAT_H 1 #define HAVE_LIMITS_H 1 #define HAVE_LOCALE_H 1 #define HAVE_MALLOC_H 1 #define HAVE_MATH_H 1 #undef HAVE_POLL_H #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #undef HAVE_SYS_PARAM_H #undef HAVE_SYS_SELECT_H #undef HAVE_SYS_SOCKET_H #define HAVE_SYS_STAT_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_TIMEB_H 1 #define HAVE_SYS_TYPES_H 1 #undef HAVE_TERMIOS_H #define HAVE_TIME_H 1 #define HAVE_VALUES_H 1 #define HAVE_STRINGIZE 1 #define HAVE_ATEXIT 1 #define HAVE_GETCWD 1 #define HAVE_MEMCPY 1 #define HAVE_MEMMOVE 1 #define HAVE_MEMSET 1 #define HAVE_PCLOSE 1 #define HAVE_POPEN 1 #define HAVE_SETVBUF 1 #define HAVE_SLEEP 1 #undef HAVE_STRCASECMP #define HAVE_STRCHR 1 #define HAVE_STRCSPN 1 #define HAVE_STRDUP 1 #define HAVE_STRERROR 1 #define HAVE_STRICMP 1 #undef HAVE_STRNCASECMP #define HAVE_STRNICMP 1 #define HAVE_STRRCHR 1 #define HAVE_STRSTR 1 #define HAVE_TIME_T_IN_TIME_H 1 #define HAVE_VFPRINTF 1 /* Define to enable parsing of deprecated syntax */ #define BACKWARDS_COMPATIBLE 1 ���������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/makefile.vms�������������������������������������������������������������������0000644�0004711�0000144�00000011634�11642360320�013704� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: makefile.vms,v 1.14 2011/10/03 16:20:32 sfeam Exp $ # # GNUPLOT Makefile for VMS # # use with the MAKE that was posted by Tony Ivanov (tony@gvgpvd.GVG.TEK.COM) # in comp.os.vms on 5 December 1988 # # Modified 23 June 1999 to work with MMK; it should also work with MMS. # John.Hasstedt@sunysb.edu. # # You can define a macro on the command line to specify the compiler, either # VAXC or GNUC; if you do not specify either, it uses DECC. If you are # compiling on Alpha, you should also define __ALPHA__ (MMK does this for you, # for MMS, use MMS/DESCRIP=MAKEFILE.VMS/MACRO=__ALPHA__). ########### COMPILE OPTIONS ########### .IFDEF VAXC CC=CC WHICHRTL=VAXCRTL CRTL_SHARE=,sys$$disk:[]linkopt.vms/opt PREFIXALL= CRTL_SHARE= EXTRADEFS= EXTRAOBJ= EXTRALIB= .ELSE .IFDEF GNUC CC=GCC WHICHRTL=VAXCRTL CRTL_SHARE=,sys$$disk:[]linkopt.vms/opt PREFIXALL= CRTL_SHARE= EXTRADEFS= EXTRAOBJ= EXTRALIB=,gnu_cc:[000000]gcclib/lib .ELSE # DECC CC=CC WHICHRTL=DECCRTL PREFIXALL=/prefix=all CRTL_SHARE= .IFDEF __ALPHA__ EXTRADEFS=,HAVE_SLEEP,HAVE_GETCWD,HAVE_LGAMMA,HAVE_UNISTD_H .ELSE EXTRADEFS=,HAVE_SLEEP,HAVE_GETCWD,HAVE_UNISTD_H EXTRAOBJ= EXTRALIB= .ENDIF .ENDIF #maybe ABJ and AXE if that's your local convention for alpha #(that's how I build vax and axp programs in same directory) O=OBJ X=EXE # NOOP NO Optimiser # take out X11 if you dont want windows support # pipes compiles with popen emulation (from VMS perl-5 port) CFLAGS = /define=(NO_GIH,X11,PIPES$(EXTRADEFS),$(WHICHRTL)) $(PREFIXALL) TERMFLAGS = /include=[-.term] ############## okay, that's enough fiddling ############### OBJS1 = alloc.$(O),binary.$(O),bitmap.$(O),command.$(O),contour.$(O),datafile.$(O),dynarray.$(O),eval.$(O), OBJS2 = fit.$(O),graphics.$(O),graph3d.$(O),help.$(O),hidden3d.$(O),internal.$(O),interpol.$(O), stats.$(O), OBJS3 = matrix.$(O),misc.$(O),parse.$(O),plot.$(O),plot2d.$(O),plot3d.$(O),scanner.$(O),set.$(O),history.$(O), OBJS4 = show.$(O),specfun.$(O),standard.$(O),stdfn.$(O),term.$(O),time.$(O),util.$(O),util3d.$(O),version.$(O),vms.$(O),variable.$(O),save.$(O),tables.$(O),unset.$(O) OBJS = $(OBJS1)$(OBJS2)$(OBJS3)$(OBJS4)$(EXTRAOBJ) CSOURCE1 = command.c set.c show.c variable.c CSOURCE2 = help.c graphics.c graph3d.c internal.c CSOURCE3 = misc.c eval.c parse.c plot.c plot2d.c plot3d.c scanner.c standard.c stdfn.c CSOURCE4 = bitmap.c term.c time.c util.c version.c interpol.c fit.c matrix.c stats.c CSOURCE5 = [-.term]aed.trm [-.term]cgi.trm [-.term]dumb.trm [-.term]dxf.trm [-.term]dxy.trm \ [-.term]eepic.trm [-.term]epson.trm [-.term]fig.trm [-.term]hp26.trm \ [-.term]hp2648.trm [-.term]hpgl.trm [-.term]hpljii.trm CSOURCE6 = [-.term]impcodes.h [-.term]imagen.trm [-.term]object.h \ [-.term]kyo.trm [-.term]latex.trm [-.term]pbm.trm \ [-.term]pc.trm CSOURCE7 = [-.term]post.trm [-.term]qms.trm [-.term]regis.trm [-.term]sun.trm \ [-.term]t410x.trm [-.term]tek.trm [-.term]unixpc.trm \ [-.term]v384.trm [-.term]x11.trm gplt_x11.c CSOURCE8 = contour.c specfun.c interpol.c vms.c dynarray.c all : gnuplot.$(X) gnuplot_x11.$(X) gnuplot.hlp gnuplot.hlb \ [-.demo]binary1. [-.demo]binary2. [-.demo]binary3. @ ! a no-op to suppress a MMS warning gnuplot.$(X) : $(OBJS) $(EXTRAOBJ) link /exe=gnuplot.$(X) vms.$(O),gnuplot.opt/opt$(EXTRAOBJ)$(EXTRALIB)$(CRTL_SHARE) gnuplot_x11.$(X) : gplt_x11.$(O) stdfn.$(O) link /exe=gnuplot_x11.$(X) gplt_x11.$(O),stdfn.$(O),x11.opt/option$(CRTL_SHARE) gplt_x11.o : gplt_x11.c $(CC) $(CFLAGS) $(X11FLAGS) [-.demo]binary1. [-.demo]binary2. [-.demo]binary3. : bf_test.$(X) set default [-.demo] run [-.src]bf_test.$(X) set default [-.src] bf_test.$(X) : bf_test.$(O) binary.$(O) alloc.$(O) link /exe=bf_test.exe bf_test.$(O),binary.$(O),alloc.$(O) gnuplot.hlb : gnuplot.hlp library/create/help gnuplot.hlb gnuplot.hlp .IFDEF OLD_HLP gnuplot.hlp : doc2hlp.$(X) [-.docs]gnuplot.doc define/user sys$input [-.docs]gnuplot.doc define/user sys$output []gnuplot.hlp run doc2hlp doc2hlp.$(X) : [-.docs]doc2hlp.c [-.docs]termdoc.c $(CC) /include=([-.docs],[],[-.term]) [-.docs]doc2hlp.c,[-.docs]termdoc.c link /exe=doc2hlp.$(X) doc2hlp,termdoc$(CRTL_SHARE) .ELSE gnuplot.hlp : [-.docs]gnuplot.rnh RUNOFF $< /OUTPUT=$@ [-.docs]gnuplot.rnh : [-.docs]doc2rnh.$(X) [-.docs]gnuplot.doc MCR $< [-.docs]gnuplot.doc $@ [-.docs]doc2rnh.$(X) : [-.docs]doc2rnh.$(O) [-.docs]termdoc.$(O) link /exe=$@ $+ $(CRTL_SHARE) [-.docs]doc2rnh.$(O) [-.docs]termdoc.$(O) : [-.docs]termdoc.c ![-.docs]allterm.h $(CC) /OBJ=$@ $(CFLAGS) /INCLUDE=([],[-.TERM]) $*.c .ENDIF term.$(O) : term.h term.c $(CSOURCE5) $(CSOURCE6) $(CSOURCE7) $(CC) $(CFLAGS) $(TERMFLAGS) term.c /object=term.$(O) $(OBJS) : plot.h command.$(O) help.$(O) misc.$(O) : help.h command.$(O) graphics.$(O) graph3d.$(O) misc.$(O) plot.$(O) set.$(O) show.$(O) term.O interpol.$(O) : setshow.h command.$(O) fit.$(O) matrix.$(O) : fit.h fit.$(O) matrix.$(O) : matrix.h bitmap.$(O) term.$(O) : bitmap.h clean : purge/log delete/log *.$(O);* delete/log [-.demo]binary1.;*,binary2.;*,binary3.;* ����������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/MacOSX/������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�012454� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/MacOSX/PkgResources/�����������������������������������������������������������0000755�0004711�0000144�00000000000�12223340020�015070� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/MacOSX/PkgResources/License.rtf������������������������������������������������0000644�0004711�0000144�00000003617�10137424027�017212� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������{\rtf1\mac\ansicpg10000\cocoartf102 {\fonttbl\f0\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;} \paperw11900\paperh16840\margl1440\margr1440\vieww9040\viewh13600\viewkind0 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural \f0\fs24 \cf0 Copyright \'a9 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley\ \ Permission to use, copy, and distribute this software and its documentation for any purpose with or without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.\ \ Permission to modify the software is granted, but not the right to distribute the complete modified source code. Modifications are to be distributed as patches to the released version. Permission to distribute binaries produced by compiling modified sources is granted, provided you\ \pard\tx673\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li680\fi-380\ql\qnatural \cf0 1. distribute the corresponding source modifications from the released version in the form of a patch file along with the binaries,\ 2. add special version identification to distinguish your version in addition to the base release version number,\ 3. provide your name and address as the primary contact for the support of your modified version, and\ 4. retain our contact information in regard to use of the base software.\ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural \cf0 \ Permission to distribute the released version of the source code along with corresponding source modifications in the form of a patch file is granted with same provisions 2 through 4 for binary distributions.\ \ This software is provided "as is" without express or implied warranty to the extent permitted by applicable law.\ }�����������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/MacOSX/PkgResources/English.lproj/���������������������������������������������0000755�0004711�0000144�00000000000�12223340020�017606� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/MacOSX/PkgResources/English.lproj/InstallationCheck.strings��������������������0000644�0004711�0000144�00000001545�10137424027�024641� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������"16" = "AquaTerm 1.0 or later is required to install this version of gnuplot. Download it from http://aquaterm.sourceforge.net If you do have AquaTerm installed, please file a bug report at http://gnuplot.sourceforge.net"; "17" = "X11 is required to install this version of gnuplot. Install it from your Mac OS 10.3 install CD. If you are running 10.0 - 10.2.8, get X11 from e.g. http://www.xfree86.org If you do have X11 installed, please file a bug report at http://gnuplot.sourceforge.net"; "18" = "AquaTerm 1.0 or later and X11 are required to install this version of gnuplot. Download AquaTerm from http://aquaterm.sourceforge.net and install X11 from your Mac OS 10.3 install CD. If you are running 10.0 - 10.2.8, get X11 from e.g. http://www.xfree86.org If you do have AquaTerm and X11 installed, please file a bug report at http://gnuplot.sourceforge.net" �����������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/MacOSX/PkgResources/InstallationCheck������������������������������������������0000755�0004711�0000144�00000000364�10137424027�020434� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh let retval=0 if [ ! -f /usr/local/lib/libaquaterm.1.?.?.dylib ]; then let retval=$retval+1 fi if [ ! -f /usr/X11R6/bin/xinit ]; then let retval=$retval+2 fi if [ $retval -gt 0 ]; then let retval=$retval+47 fi exit $retval����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/MacOSX/PkgResources/postinstall������������������������������������������������0000755�0004711�0000144�00000000106�10137424027�017403� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh install-info --info-dir=$2/info $2/info/gnuplot.info exit 0����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/MacOSX/ReadMe.rtf��������������������������������������������������������������0000644�0004711�0000144�00000003234�10271376662�014356� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf100 {\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;\red202\green17\blue20;} \paperw11904\paperh16836\margl1440\margr1440\vieww9600\viewh8940\viewkind0 \pard\tx565\tx1133\tx1700\tx2266\tx2833\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural \f0\b\fs28 \cf0 Gnuplot 4.0.0 for Mac OS X \f1\b0\fs24 \ \ This distribution contains the following:\ \pard\tx565\tx1133\tx1700\tx2266\tx2833\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\li440\fi-160\ql\qnatural \cf0 \'a5 a standard double-clickable installer (gnuplot.pkg) that will install gnuplot 4.0.0 and supporting files in /usr/local\ \'a5 documentation in PDF-format and an FAQ, a README file and copyright information in the folder Docs \'d1 drag the folder/files to a location of your choice\ \'a5 demo files in the folder Demo \'d1 drag the folder/files to a location of your choice\ \pard\tx565\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural \cf0 \ This version of gnuplot requires that you have AquaTerm and X11 installed. The installer \cf2 will continue with the installation \cf0 even if the requirements aren't satisfied. Gnuplot will however fail to run until the dependencies are resolved.\ \ Get AquaTerm 1.0 from http://aquaterm.sourceforge.net\ Install X11 from your Mac OS X install CD, or see http://www.apple.com/macosx for more info.\ \ To make AquaTerm the default, set the environment variable GNUTERM to aqua, e.g.:\ 1) in bash: export GNUTERM=aqua\ 2) in tcsh: setenv GNUTERM aqua\ \ Please report any problems to http://gnuplot.sourceforge.net\ }��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/MacOSX/gnuplot.packproj��������������������������������������������������������0000644�0004711�0000144�00000074444�10271376572�015742� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Hierarchy</key> <dict> <key>Attributes</key> <dict> <key>Documents</key> <dict> <key>Background Image</key> <dict> <key>IFPkgFlagBackgroundAlignment</key> <integer>4</integer> <key>IFPkgFlagBackgroundScaling</key> <integer>1</integer> <key>Mode</key> <integer>0</integer> <key>Path</key> <string></string> <key>Path Type</key> <integer>2</integer> </dict> <key>License</key> <dict> <key>International</key> <dict> <key>Mode</key> <integer>1</integer> <key>Path</key> <string>PkgResources/License.rtf</string> <key>Path Type</key> <integer>2</integer> </dict> </dict> <key>ReadMe</key> <dict> <key>International</key> <dict> <key>Mode</key> <integer>1</integer> <key>Path</key> <string>ReadMe.rtf</string> <key>Path Type</key> <integer>2</integer> </dict> </dict> <key>Welcome</key> <dict> <key>International</key> <dict> <key>Mode</key> <integer>0</integer> <key>Path</key> <string></string> <key>Path Type</key> <integer>2</integer> </dict> </dict> </dict> <key>Files</key> <dict> <key>Compress</key> <true/> <key>Hierarchy</key> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array/> <key>GID</key> <integer>80</integer> <key>Path</key> <string>Utilities</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>509</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>80</integer> <key>Path</key> <string>Applications</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>509</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>bin</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array/> <key>GID</key> <integer>80</integer> <key>Path</key> <string>Application Support</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>509</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>80</integer> <key>Path</key> <string>Documentation</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>509</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>80</integer> <key>Path</key> <string>Filesystems</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>509</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>80</integer> <key>Path</key> <string>Frameworks</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>509</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>80</integer> <key>Path</key> <string>Internet Plug-ins</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>509</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>80</integer> <key>Path</key> <string>PreferencePanes</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>509</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>80</integer> <key>Path</key> <string>Printers</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>509</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>80</integer> <key>Path</key> <string>Screen Savers</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>509</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>80</integer> <key>Path</key> <string>Scripts</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>509</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>80</integer> <key>Path</key> <string>Library</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>509</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>etc</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>var</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>private</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>sbin</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>Extensions</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>Library</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>System</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>bin</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>include</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>lib</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>libexec</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>build/products/usr/local/bin/gnuplot</string> <key>Path Type</key> <integer>2</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>3</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>bin</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>2</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>build/products/usr/local/info/gnuplot.info</string> <key>Path Type</key> <integer>2</integer> <key>Privileges</key> <integer>420</integer> <key>Type</key> <integer>3</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>info</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>2</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>build/products/usr/local/libexec/gnuplot/4.0/gnuplot_x11</string> <key>Path Type</key> <integer>2</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>3</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>4.0</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>2</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>gnuplot</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>2</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>libexec</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>2</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>build/products/usr/local/man/man1/gnuplot.1</string> <key>Path Type</key> <integer>2</integer> <key>Privileges</key> <integer>420</integer> <key>Type</key> <integer>3</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>man1</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>2</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>man</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>2</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>build/products/usr/local/share/emacs/site-lisp/gnuplot-gui.el</string> <key>Path Type</key> <integer>2</integer> <key>Privileges</key> <integer>420</integer> <key>Type</key> <integer>3</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>build/products/usr/local/share/emacs/site-lisp/gnuplot-gui.elc</string> <key>Path Type</key> <integer>2</integer> <key>Privileges</key> <integer>420</integer> <key>Type</key> <integer>3</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>build/products/usr/local/share/emacs/site-lisp/gnuplot.el</string> <key>Path Type</key> <integer>2</integer> <key>Privileges</key> <integer>420</integer> <key>Type</key> <integer>3</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>build/products/usr/local/share/emacs/site-lisp/gnuplot.elc</string> <key>Path Type</key> <integer>2</integer> <key>Privileges</key> <integer>420</integer> <key>Type</key> <integer>3</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>build/products/usr/local/share/emacs/site-lisp/info-look.20.2.el</string> <key>Path Type</key> <integer>2</integer> <key>Privileges</key> <integer>420</integer> <key>Type</key> <integer>3</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>build/products/usr/local/share/emacs/site-lisp/info-look.20.3.el</string> <key>Path Type</key> <integer>2</integer> <key>Privileges</key> <integer>420</integer> <key>Type</key> <integer>3</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>site-lisp</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>2</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>emacs</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>2</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>build/products/usr/local/share/gnuplot/4.0/gnuplot.gih</string> <key>Path Type</key> <integer>2</integer> <key>Privileges</key> <integer>420</integer> <key>Type</key> <integer>3</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>4.0</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>2</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>gnuplot</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>2</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>share</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>2</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>local</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>sbin</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>share</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <dict> <key>Children</key> <array/> <key>GID</key> <integer>0</integer> <key>Path</key> <string>standalone</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>0</integer> <key>Path</key> <string>usr</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>493</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> </array> <key>GID</key> <integer>80</integer> <key>Path</key> <string>/</string> <key>Path Type</key> <integer>1</integer> <key>Privileges</key> <integer>1021</integer> <key>Type</key> <integer>1</integer> <key>UID</key> <integer>0</integer> </dict> <key>IFPkgFlagDefaultLocation</key> <string>/usr/local</string> <key>Imported Package</key> <false/> <key>Package Path</key> <string></string> <key>Split Forks</key> <false/> </dict> <key>Scripts</key> <dict> <key>Additional Resources</key> <dict> <key>International</key> <array> <dict> <key>Path</key> <string>PkgResources/English.lproj</string> <key>Path Type</key> <integer>2</integer> <key>Status</key> <false/> </dict> <dict> <key>Path</key> <string>PkgResources/InstallationCheck</string> <key>Path Type</key> <integer>2</integer> <key>Status</key> <false/> </dict> </array> </dict> <key>Installation Scripts</key> <dict> <key>IFInstallationScriptsPostflight</key> <dict> <key>Path</key> <string></string> <key>Path Type</key> <integer>2</integer> <key>Status</key> <false/> </dict> <key>IFInstallationScriptsPostinstall</key> <dict> <key>Path</key> <string>PkgResources/postinstall</string> <key>Path Type</key> <integer>2</integer> <key>Status</key> <true/> </dict> <key>IFInstallationScriptsPostupgrade</key> <dict> <key>Path</key> <string></string> <key>Path Type</key> <integer>2</integer> <key>Status</key> <false/> </dict> <key>IFInstallationScriptsPreflight</key> <dict> <key>Path</key> <string></string> <key>Path Type</key> <integer>2</integer> <key>Status</key> <false/> </dict> <key>IFInstallationScriptsPreinstall</key> <dict> <key>Path</key> <string></string> <key>Path Type</key> <integer>2</integer> <key>Status</key> <false/> </dict> <key>IFInstallationScriptsPreupgrade</key> <dict> <key>Path</key> <string></string> <key>Path Type</key> <integer>2</integer> <key>Status</key> <false/> </dict> </dict> <key>Requirements</key> <array/> </dict> <key>Settings</key> <dict> <key>Description</key> <dict> <key>International</key> <dict> <key>IFPkgDescriptionDeleteWarning</key> <string></string> <key>IFPkgDescriptionDescription</key> <string></string> <key>IFPkgDescriptionTitle</key> <string>gnuplot</string> <key>IFPkgDescriptionVersion</key> <string>4.0.0</string> </dict> </dict> <key>Display Information</key> <dict> <key>CFBundleGetInfoString</key> <string>Copyright © 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley and many others</string> <key>CFBundleIconFile</key> <string></string> <key>CFBundleIconFile Path Type</key> <integer>2</integer> <key>CFBundleIdentifier</key> <string>net.sourceforge.gnuplot</string> <key>CFBundleName</key> <string>gnuplot</string> <key>CFBundleShortVersionString</key> <string>4.0.0</string> </dict> <key>Options</key> <dict> <key>IFPkgFlagAllowBackRev</key> <false/> <key>IFPkgFlagAuthorizationAction</key> <integer>2</integer> <key>IFPkgFlagFollowLinks</key> <true/> <key>IFPkgFlagInstallFat</key> <false/> <key>IFPkgFlagIsRequired</key> <true/> <key>IFPkgFlagOverwritePermissions</key> <true/> <key>IFPkgFlagRelocatable</key> <false/> <key>IFPkgFlagRestartAction</key> <integer>0</integer> <key>IFPkgFlagRootVolumeOnly</key> <true/> <key>IFPkgFlagUpdateInstalledLanguages</key> <false/> </dict> <key>Version</key> <dict> <key>IFMajorVersion</key> <integer>4</integer> <key>IFMinorVersion</key> <integer>0</integer> </dict> </dict> </dict> <key>IFPkgFlagPackageSelection</key> <integer>0</integer> <key>Name</key> <string>gnuplot</string> <key>Status</key> <integer>1</integer> <key>Type</key> <integer>1</integer> </dict> <key>Name</key> <string>Project</string> <key>Settings</key> <dict> <key>10.1 Compatibility</key> <true/> <key>Build Path</key> <string>build/dmg_root</string> <key>Build Path Type</key> <integer>2</integer> <key>Comment</key> <string></string> <key>Remove .DS_Store</key> <true/> <key>Remove .pbdevelopment</key> <true/> </dict> </dict> </plist> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/MacOSX/createdist.sh�����������������������������������������������������������0000644�0004711�0000144�00000006311�10137424027�015154� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## createdist.sh ## This is a shell script to automatically create a gnuplot distribution ## for Mac OS X. It will download and build a source tarball and create ## a disk image with a standard GUI installer and folders with supporting ## files (ReadMe, docs in PDF and demos). ## ## The utility "freeze" from the application Iceberg is required, see ## http://s.sudre.free.fr/Software/Iceberg.html ## ## 2004-10-21 Per Persson, persquare@users.sf.net ## Change as needed VERSION="4.0.0" SHORTVER="4.0" BETA= DISTRO_DIR=`pwd` ## No changes needed below this line echo "==== Creating distro of gnuplot $VERSION$BETA" TARBALL="gnuplot-$VERSION.tar.gz" WORK_DIR="$DISTRO_DIR/work" SRC_DIR="$WORK_DIR/gnuplot-$VERSION" BUILD_DIR="$DISTRO_DIR/build" PRODUCTS_DIR="$BUILD_DIR/products" DMG_ROOT="$BUILD_DIR/dmg_root" ## Always remove product rm -rf $BUILD_DIR/Gnuplot-$VERSION$BETA.dmg if [ "$1" = "pack" ]; then echo "*** Warning skipping build" else echo "Setting up directories" rm -rf build.log rm -rf $BUILD_DIR mkdir $BUILD_DIR if [ ! -d $WORK_DIR ]; then mkdir $WORK_DIR else (cd $WORK_DIR; rm -rf $SRC_DIR) fi mkdir $PRODUCTS_DIR mkdir $DMG_ROOT mkdir $DMG_ROOT/Demo mkdir $DMG_ROOT/Docs echo "Fetching tarball to $WORK_DIR" if [ ! -f $WORK_DIR/$TARBALL ]; then curl -o $WORK_DIR/$TARBALL http://heanet.dl.sourceforge.net/sourceforge/gnuplot/$TARBALL fi ( cd $WORK_DIR gnutar xvzf $TARBALL ) echo "Configuring in $SRC_DIR" ( cd $SRC_DIR ./configure --prefix=/usr/local \ --without-gd --without-png ) echo "#undef'ing HAVE_STPCPY which didn't exist prior to 10.3" ( cd $SRC_DIR cp config.h config_10_3.h sed "s/#define HAVE_STPCPY 1/\/\* #undef HAVE_STPCPY \*\//g" < config.h > config_10_2.h cp config_10_2.h config.h ) echo "Building in $SRC_DIR" ( cd $SRC_DIR make ) echo "Installing in $PRODUCTS_DIR" ( cd $SRC_DIR make install DESTDIR=$PRODUCTS_DIR ) echo "Copying demo files to $DMGROOT/Demo" cp $SRC_DIR/demo/* $DMG_ROOT/Demo/. rm -f $DMG_ROOT/demo/Make* rm -f $DMG_ROOT/demo/webify.pl echo "Building docs" ( cd $SRC_DIR/docs make pdf make gpcard.ps dvipdfm -p a4 -x 1.25in gpcard.dvi # cd psdocs # make pdf ) ( cd $SRC_DIR/tutorial make pdf ) echo "Copying docs to $DMGROOT/Docs" cp $SRC_DIR/docs/{gnuplot,gpcard}.pdf $DMG_ROOT/Docs/. cp $SRC_DIR/tutorial/tutorial.pdf $DMG_ROOT/Docs/gnuplot_LateX_tutorial.pdf cp $SRC_DIR/{FAQ,README,Copyright} $DMG_ROOT/Docs/. fi ## skip build echo "==== Making distro ====" echo "gnuplot $VERSION$BETA for Mac OS X binary distribution" > build.log echo "Dependencies" >> build.log otool -L $PRODUCTS_DIR/usr/local/bin/gnuplot | tee -a build.log otool -L $PRODUCTS_DIR/usr/local/libexec/gnuplot/$SHORTVER/gnuplot_x11 | tee -a build.log echo "Installer contents" >> build.log lsbom $DMG_ROOT/gnuplot.pkg/Contents/Archive.bom | tee -a build.log echo "---- Packing up ----" freeze gnuplot.packproj echo "---- Creating DMG ----" cp $DISTRO_DIR/ReadMe.rtf $DMG_ROOT/. hdiutil create -volname Gnuplot-$VERSION -fs HFS+ -srcfolder $DMG_ROOT $BUILD_DIR/Gnuplot-$VERSION$BETA.dmg echo "---- Done ----"�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/make_vms.com�������������������������������������������������������������������0000644�0004711�0000144�00000002740�06775136322�013716� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������$! $! GNUPLOT make program for VMS, Vers. 1.2, 1996/07/03 $! (Rolf Niepraschk, niepraschk@ptb.de) $! $! This command procedure compiles and links GNUPLOT with MMS or MMK or $! invokes the dcl procedure BUILDVMS.COM $! $! Usage: @MAKE_VMS P1 [P2] $! P1 = compiler ("DECC" or "VAXC" or "GNUC" or special make file if P2 = "") $! default is "DECC" $! P2 = special make file (eg. for testing), default is "DESCRIP.MMS" $! $ SAY = "WRITE SYS$OUTPUT" $ AXP = 0 $ IF F$GETSYI("ARCH_TYPE") .NE. 1 THEN AXP = 1 $! $ P1 = F$EDIT(P1,"UPCASE") $ IF P2 .NES. "" $ THEN D_FILE = P2 $ ELSE D_FILE = "MAKEFILE.VMS" $ ENDIF $! $ COMPILER = "" $ IF P1 .EQS. "DECC" .OR. P1 .EQS. "" $ THEN $ DECC = 1 $ COMPILER = "DECC" $ ELSE $ IF P1 .EQS. "VAXC" $ THEN $ VAXC = 1 $ COMPILER = "VAXC" $ ELSE $ IF P1 .EQS. "GNUC" $ THEN $ GNUC = 1 $ COMPILER = "GNUC" $ ENDIF $ ENDIF $ ENDIF $ IF COMPILER .EQS. "" $ THEN $ DECC = 1 $ COMPILER = "DECC" $ D_FILE = P1 $ ENDIF $! $ DCL_PROC = "BUILDVMS.COM" $ COMMAND = "" $ IF F$TYPE(MMK) .NES. "" $ THEN COMMAND = "MMK" $ ELSE $ IF F$SEARCH("SYS$SYSTEM:MMS.EXE") .NES. "" THEN COMMAND = "MMS" $ ENDIF $! $ MACRO = "" $ IF AXP THEN MACRO = "/MACRO=__ALPHA__=1" $ IF COMMAND .NES. "" $ THEN $ SAY "Make Gnuplot with ''COMMAND' and ''COMPILER'." $ SAY "" $ 'COMMAND' /DESCRIPTION='D_FILE' 'MACRO' /IGNORE=WARNING $ ELSE $ SAY "Make Gnuplot with DCL procedure ''DCL_PROC'." $ SAY "" $ @'DCL_PROC' $ ENDIF $ EXIT ��������������������������������gnuplot-4.6.4/config/mingw/�������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340010�012502� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/mingw/Makefile�����������������������������������������������������������������0000644�0004711�0000144�00000061540�12134305471�014165� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Hello, emacs: this is a -*- Makefile -*- # $Id: Makefile,v 1.14.2.12 2013/04/12 16:33:14 markisch Exp $ # # GNUPLOT Makefile for MinGW/MSYS on Windows # This assumes usual installation of the MinGW32 toolkit, the free # GNU gcc. See www.mingw.org for more details. # To compile gnuplot for Windows: # - Change the configuration section in 'config/mingw/Makfile' to # match your setup. # - On the MSYS prompt, change directory to 'config/mingw' and issue the commands # make all # make install # # This makefile was tested with MSYS, MingW32 and Microsoft Help # Workshop 4.03 / Microsoft HTML Help 1.4 SDK. # # ************** Begin of Configuration section ************************ # # Comment out the definition lines to disable the according features: # Define this only if doing a release build RELEASE=1 # Use more modern HTML help instead of no longer supported Windows help system # Please update the HHWPATH below if necessary. HTML_HELP=1 # GIF, PNG, JPEG device drivers # Requires gd library. There are two possibilities how to configure these # drivers for use in gnuplot, depending on the gd version. See README.1ST for # more details. # # You should compile gnuplot with GD library v2.0 or newer. # This library writes PNG, GIF and JPEG images. # If libgd has been compiled with TrueType font support, then you can use # scaled TrueType fonts. If not, then uncomment FREETYPE. # Requires GD, PNG and Z libraries, optionally libfreetype. # In some cases, libfreetype can depend on additional libraries such as # fontconfig or iconv; then, uncomment GDAUTOCONFIGLIBS so that all of the # libraries needed for linking will be taken by running 'gdlib-config'. # Uncomment BGD if you want to use the binary DLL version of libgd. #NEWGD=1 #JPEG=1 #FREETYPE=1 #GDAUTOCONFIGLIBS=1 #BGD=1 # PDF device driver # Requires PNG and Z libraries based on particular PDF library used, and # optionally also TIFF library according to # 1. defined PDF_NOTIFF: # 'Light' pdf library (produces wgnuplot.exe only 200 KB larger!) # You can get this pdf library by compiling it without PNG, GD and TIFF # support: change pdflib/p_intern.h and recompile the pdf library. # Gnuplot does not use the tiff routines, and gd/png are elsewhere. # 2. undefined PDF_NOTIFF: # Full pdf library (produces wgnuplot.exe 500 KB larger!) #PDF=1 #PDF_NOTIFF=1 # DEBUGging support # creates binaries suitable for debugging. Some bugs may come and go # as opposed to a production build since we lower the optimization level #DEBUG=1 # MOUSE support for the windows terminal MOUSE=1 # Cairo/Pango terminals # Uncomment the following lines to select the pngcairo and pdfcairo # terminals #CAIROTERMS=1 #CAIROLIBS=1 # WXWIDGETS interactive terminal # Requires wxWidgets, Cairo, Pango, and their respective dependencies. # Uncomment the following lines to compile it. #WXT=1 #CAIROLIBS=1 # Uncomment the following line to select the lua/tikz terminal #LUA=lua5.1 # Uncomment if you have libiconv ICONV=1 # Below you can adapt paths according to your software setup: # Where to place the helpfile: ifdef HTML_HELP HELPFILE = wgnuplot.chm HELPFILEJA = wgnuplot-ja.chm else HELPFILE = wgnuplot.hlp endif # Where to install the PostScript prologue files, relatively to the executable # wgnuplot.exe GNUPLOT_PS_DIR = share/PostScript # Similarly for javascript files for the canvas terminal: GNUPLOT_JS_DIR = share/js # Similarly for scripts used by the lua terminal GNUPLOT_LUA_DIR = share/lua # Install will put TeX files here: GNUPLOT_TEX_DIR = share/texmf/tex # gnuplot will look for gnuplotrc here: GNUPLOT_SHARE_DIR = share # Destination directory, used in 'make install': #DESTDIR = /local/opt/gnuplot-4.5 DESTDIR = "$(PROGRAMFILES)/gnuplot" # give here the path to MinGW compiler unless it is already in PATH #GCCPATH = g:/mingw32/bin/ #GCCPATH = c:/apps/mingw/bin/ # Do you want some special optimization? # -mpentium means optimise for Pentium processor # -mpentiumpro means optimize for Pentium II and Pro procesors #CFLAGS += ifdef HTML_HELP # To compile the .chm file you need the Microsoft HTML Help 1.4 SDK # It can be obtained here: # http://go.microsoft.com/fwlink/?LinkId=154968 # We need to explicitly set the correct path here since we also need # adjust the include and linrary paths. HHWPATH = "$(PROGRAMFILES)/HTML Help Workshop/" HHC = $(HHWPATH)hhc else # To compile the .hlp file you need hcw either out of Microsoft SDK or MS Help # Workshop. The latter can be obtained from either of # ftp://ftp.microsoft.com/softlib/mslfiles/hcwsetup.exe # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=34D35502-4DE9-4676-952C-34CC7F64F098 # Put the path to hcw here unless it is already in PATH: HCWPATH = "$(PROGRAMFILES)/Help\ Workshop/" HCW = $(HCWPATH)hcw # Switches are for HCW 4.03: HCWFLAG = endif # Choose which windres/rc do you want to use (GNU windres or MS RC): GNU_RC = 1 ifndef GNU_RC # If uncommented GNU_RC above and rc.exe not in PATH, then set: MSSDK = c:/mssdk endif # GNU sort GNUSORT = /bin/sort # Inno Setup Compiler # get it from: http://www.jrsoftware.org/isdl.php ISCC = "$(PROGRAMFILES)/Inno Setup 5/iscc" # Directory that might contain extra files to be shipped with the installer. # This should include dependencies like DLLs, but also fontconfig configuration files. #EXTRADIST = /d/Software/gnuplot-misc/gp-dist # # *************** End of Configuration section ************************* # # There shouldn't be anything to be changed below this line # ********************************************************************** # # Choose target to compile: # 1. wgnuplot.exe: The usual Windows GUI for input commands. # 2. wgnuplot_pipes.exe: The usual Windows GUI with support of pipes, so # that e.g. plot '<awk -f preprocess.awk my.dat') or x=system('ls -1') # can work. Drawback: wgnuplot_pipes.exe keeps attached to a console (DOS) # window it was launched from, or it opens a new one. # 3. gnuplot.exe: Console mode instead of GUI for the text input. # # Comment for programs using gnuplot as their plotting engine: # Both wgnuplot*.exe compile also pgnuplot.exe. This small helper program was # used when gnuplot.exe was not available on Windows. Nowadays, pgnuplot.exe # is deprecated -- please use gnuplot.exe instead. # PIPES: define if you would prefer support of pipes undef Windows (e.g. # plot '<awk -f preprocess.awk my.dat'). Drawback: wgnuplot_pipes.exe keeps # attached to a console=DOS window it was launched from, or it opens a new one. # Note: Maybe it does not work properly with pgnuplot (not tested recently). # CONSOLE: define if you would prefer the console (non-GUI) version of the # text command window. ifndef TARGET TARGET=wgnuplot.exe #TARGET=wgnuplot_pipes.exe #TARGET=gnuplot.exe endif # Set PGNUPLOT, PIPES and CONSOLE according to the target ifeq ($(TARGET),wgnuplot.exe) PGNUPLOT=pgnuplot.exe MENUFILE=wgnuplot.mnu O=o endif ifeq ($(TARGET),wgnuplot_pipes.exe) MENUFILE=wgnuplot.mnu PIPES=1 O=po endif ifeq ($(TARGET),gnuplot.exe) PIPES=1 CONSOLE=1 O=co endif CC = $(GCCPATH)gcc LD = $(CC) CXX = $(GCCPATH)g++ LDX = $(CXX) RM = rm -f CP = cp -p ifdef DEBUG CFLAGS += -g -Wall LDFLAGS += -g else CFLAGS += -O2 LDFLAGS += -s endif LDFLAGS2 = -mwindows ifdef PIPES OPTS += -DPIPES LDFLAGS2 = -mconsole endif ifdef CONSOLE OPTS += -DWGP_CONSOLE -DCONSOLE_SWITCH_CP LDFLAGS2 = -mconsole endif TOP = ../.. # macros for makefile.all #O has been defined above already #O=o S=$(TOP)/src W=$(S)/win T=$(TOP)/term/ D=$(TOP)/docs/ M=$(TOP)/demo/ VPATH = $(S):$(W):$(S)/wxterminal TERMFLAGS = -DGNUPLOT_PS_DIR=\"$(GNUPLOT_PS_DIR)\" -DGNUPLOT_JS_DIR=\"$(GNUPLOT_JS_DIR)\" TERMFLAGS += -I$(TOP)/term TERMLIBS = CFLAGS += -I. -I$(S) -D_Windows -DHAVE_CONFIG_H $(OPTS) CFLAGS += -DGNUPLOT_SHARE_DIR=\"$(GNUPLOT_SHARE_DIR)\" ifndef RELEASE CFLAGS += -DDEVELOPMENT_VERSION endif ifdef MOUSE CFLAGS += -DUSE_MOUSE=1 -DWIN_IPC endif ifdef HTML_HELP CFLAGS += -DWITH_HTML_HELP -I$(HHWPATH)include BUILDHELPFILE = $(D)windows/$(HELPFILE) else BUILDHELPFILE = $(HELPFILE) endif ifdef NEWGD GD=1 PNG=1 endif ifdef GD CFLAGS += -DHAVE_LIBGD ifndef BGD TERMLIBS += -lgd else TERMLIBS += -lbgd endif endif ifdef PNG CFLAGS += -DHAVE_LIBPNG ifndef BGD ifndef GDAUTOCONFIGLIBS TERMLIBS += -lpng -lz endif endif endif ifdef NEWGD CFLAGS += -DHAVE_LIBGD -DHAVE_GD_H -DHAVE_GD_GIF -DGIF_ANIMATION -DHAVE_GD_PNG ifdef JPEG CFLAGS += -DHAVE_GD_JPEG ifndef BGD ifndef GDAUTOCONFIGLIBS TERMLIBS += -ljpeg endif endif endif ifdef FREETYPE CFLAGS += -DHAVE_GD_TTF ifndef BGD ifndef GDAUTOCONFIGLIBS TERMLIBS += -lfreetype endif endif endif ifdef GDAUTOCONFIGLIBS TERMLIBS += $(shell gdlib-config --libs) endif endif ifdef PDF CFLAGS += -DHAVE_LIBPDF ifdef PDF_NOTIFF TERMLIBS += -lpdf_notiff else TERMLIBS += -lpdf -ltiff # TERMLIBS += -lpdf-w -ltiff-w endif ifndef PNG NEED_PNG_W = 1 else ifndef NEWGD NEED_PNG_W = 1 endif endif ifdef NEED_PNG_W CFLAGS += -DHAVE_LIBPNG TERMLIBS += -lpng-w -lz-w endif endif ifdef CAIROLIBS CAIRO_CFLAGS := $(shell pkg-config --cflags cairo | sed s_-Ic:_-I/c_g) PANGOCAIRO_CFLAGS := $(shell pkg-config --cflags pangocairo cairo | sed s_-Ic:_-I/c_g) PANGOCAIRO_LIBS := $(shell pkg-config --libs pangocairo cairo | sed s_-Lc:_-L/c_g) CAIRO_OBJS := gp_cairo.$(O) gp_cairo_helpers.$(O) TERMFLAGS += $(PANGOCAIRO_CFLAGS) endif ifdef CAIROTERMS CFLAGS += -DHAVE_CAIROPDF TERMFLAGS += -DHAVE_CAIROEPS endif ifdef WXT CFLAGS += -DWXWIDGETS WXT_CXXFLAGS := $(shell wx-config --cxxflags) CXXFLAGS += $(WXT_CXXFLAGS) WX_LIBS := $(shell wx-config --libs | sed -e "s+-Wl,--subsystem,windows++g" -e "s+-mwindows++g") WX_OBJS = wxt_gui.$(O) endif ifdef LUA CFLAGS += -DHAVE_LUA TERMLIBS += -l$(LUA) TERMFLAGS += -DGNUPLOT_LUA_DIR=\"$(GNUPLOT_LUA_DIR)\" LUATARGETS += gnuplot-lua-tikz.sty endif ifdef ICONV CFLAGS += -DHAVE_ICONV TERMLIBS += -liconv endif ifdef GNU_RC # RC = d:/cygnus/cygwin-b20/H-i586-cygwin32/bin/windres RC = $(GCCPATH)windres RCFLAGS = --include-dir=$(W) \ --define __WIN32__ --define __WIN95__ --define MSRC \ --define __GNUWIN32__ --use-temp-file RCOUT = wgplt_res.$(O) RES2COFF = echo wgplt_res.$(O) else RC = $(MSSDK)/bin/rc RCFLAGS = -v -i$(MSSDK)/include -i$(W) -dWIN32 -dMSRC RCOUT = -fowgnuplot.res RES2COFF = res2coff -i wgnuplot.res -o wgplt_res.$(O) endif default: $(TARGET) $(MENUFILE) support console: $(MAKE) TARGET=gnuplot.exe gnuplot.exe windows: $(MENUFILE) $(MAKE) TARGET=wgnuplot.exe wgnuplot.exe pipes: $(MAKE) TARGET=wgnuplot_pipes.exe wgnuplot_pipes.exe docs: $(MAKE) TARGET=gnuplot.exe gnuplot.pdf gpcard.pdf tutorial.pdf \ ps_symbols.pdf ps_fontfile_doc.pdf ps_guide.pdf support: $(HELPFILE) $(M)bf_test.exe $(PGNUPLOT) $(LUATARGETS) $(HELPFILEJA) ja: $(HELPFILEJA) all: $(S)/version.c console windows pipes support docs # include the 'core makefile template' include $(S)/makefile.all OBJS = $(COREOBJS) version.$(O) gpexecute.$(O) $(WX_OBJS) $(CAIRO_OBJS) WINOBJS = winmain.$(O) wgnuplib.$(O) wgraph.$(O) wprinter.$(O) wtext.$(O) \ wpause.$(O) wmenu.$(O) screenbuf.$(O) wgdiplus.$(O) # default rules .SUFFIXES: .exe .$(O) .c .c.$(O): $(CC) -c $(CFLAGS) $(CFLAGSEXTRA) -MMD -MT '$*.$$(O)' -MF $*.d -o $@ $< LDLIBS = -lkernel32 -lgdi32 -lwinspool -lcomdlg32 -lcomctl32 -ladvapi32 -lshell32 -lmsimg32 -lgdiplus ifdef HTML_HELP LDLIBS += -lhtmlhelp LDFLAGS2 += -L$(HHWPATH)lib endif $(TARGET): $(OBJS) $(WINOBJS) wgplt_res.$(O) texticon.ico grpicon.ico $(LDX) $(LDFLAGS) $(LDFLAGS2) -o $@ $(OBJS) $(WINOBJS) wgplt_res.$(O) $(LDLIBS)\ $(TERMLIBS) $(WX_LIBS) $(PANGOCAIRO_LIBS) $(PGNUPLOT): $(W)/pgnuplot.c version.$(O) $(CC) -O2 -DHAVE_STDBOOL_H -s -o $@ $^ -I$(W) -I$(S) -luser32 # pull in dependency info for existing object files ifndef NODEPS -include $(OBJS:.$(O)=.d) -include $(WINOBJS:.$(O)=.d) endif # explicit rules wgplt_res.$(O): $(W)/wgnuplot.rc $(W)/wgnuplib.rc $(W)/wresourc.h texticon.ico grpicon.ico $(RC) $(RCFLAGS) $< $(RCOUT) $(RES2COFF) show.$(O): show.c plot.h setshow.h $(CC) -c $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" -DBINDIR=\"$(bindir)\" -DGNUPLOT_PS_DIR=\"$(GNUPLOT_PS_DIR)\" -MMD -MT '$*.$$(O)' -MF $*.d -o $@ $< term.$(O): term.c term.h plot.h setshow.h bitmap.h $(CORETERM) $(CC) -c $(CFLAGS) $(TERMFLAGS) -MMD -MT '$*.$$(O)' -MF $*.d -o $@ $< version.$(O): $(S)/version.c ifndef RELEASE $(S)/version.c: $(TOP)/VERSION $(TOP)/PATCHLEVEL $(TOP)/ChangeLog $(S)/Makefile.maint $(MAKE) -C $(S) -f Makefile.maint version.c endif WINDEPS = $(W)/wgnuplib.h $(W)/wcommon.h $(W)/wresourc.h $(W)/screenbuf.h $(W)/wgdiplus.h winmain.$(O): $(W)/winmain.c $(W)/wgnuplib.h $(W)/wtext.h plot.h $(CC) -c $(CFLAGS) -MMD -MT '$*.$$(O)' -MF $*.d -o $@ -DHELPFILE=\"$(HELPFILE)\" $< wgdiplus.$(O): $(W)/wgdiplus.cpp $(WINDEPS) $(CXX) -c $(CXXFLAGS) -MMD -MT '$*.$$(O)' -MF $*.d -o $@ $< wgnuplot.mnu: $(W)/wgnuplot.mnu $(CP) $^ $@ wxt_gui.$(O): $(S)/wxterminal/wxt_gui.cpp $(S)/wxterminal/wxt_gui.h $(CXX) -c $(CFLAGS) $(CXXFLAGS) $(CAIRO_CFLAGS) -MMD -MT '$*.$$(O)' -MF $*.d -o $@ $< gp_cairo.$(O): $(S)/wxterminal/gp_cairo.c $(S)/wxterminal/gp_cairo.h $(CC) -c $(CFLAGS) $(CXXFLAGS) $(PANGOCAIRO_CFLAGS) -MMD -MT '$*.$$(O)' -MF $*.d -o $@ $< # extract icons from wgnuplot.rc texticon.ico: grpicon.ico grpicon.ico: geticon.exe $(W)/wgnuplot.rc ./geticon $(W)/wgnuplot.rc geticon.exe: $(W)/geticon.c $(LD) $(LDFLAGS) -o $@ $< ifdef HTML_HELP # convert gnuplot.doc to windows/wgnuplot.html $(BUILDHELPFILE): doc2html.exe $(D)gnuplot.doc $(D)windows/wgnuplot.hhp $(D)windows/wgnuplot.hhk \ $(D)windows/wgnuplot.stp $(D)plotstyles.gnu $(CORETERM) ./doc2html $(D)gnuplot.doc $(D)windows/ -$(TARGET) -e "winhelp=1; cd '$(D)'" plotstyles.gnu -$(HHC) $(D)windows/wgnuplot.hhp $(HELPFILE): $(BUILDHELPFILE) $(CP) $^ $@ else # convert gnuplot.doc to gnuplot.rtf $(HELPFILE): doc2rtf.exe $(D)gnuplot.doc win/wgnuplot.hpj ./doc2rtf $(D)gnuplot.doc win/gnuplot.rtf $(HCW) -c -e win/wgnuplot.hpj endif # Working directory for patched Japanese sources JA = ja/ JAD = $(JA)docs/ JADW = $(JAD)windows/ # Random file which receives patches by term-ja.diff to get dependencies right JASRC = $(JA)term/cairo.trm $(JASRC): $(D)gnuplot-ja.doc $(D)term-ja.diff $(CORETERM) # Create a local copy of relevant sources -mkdir $(JA) -mkdir $(JA)term -mkdir $(JAD) -mkdir $(JA)demo cp -r $(TOP)/term/* $(JA)term/ cp -r $(TOP)/docs/* $(JA)docs/ cp $(M)*.dat $(M)*.png $(M)*.rgb $(JA)demo/ # Apply patch for Japanese docs -rm $(JAD)tex2ja.awk $(JAD)sjisenc.c -(cd $(JA) ; patch -p0 -i docs/term-ja.diff) wgnuplot-ja.chm: $(JASRC) doc2html-ja.exe \ $(D)windows/wgnuplot.hhp $(D)windows/wgnuplot.hhk \ $(D)windows/wgnuplot.stp $(D)plotstyles.gnu # Create Japanese html source in EUC-JP encoding ./doc2html-ja $(JAD)gnuplot-ja.doc $(JADW) # Change character encoding from EUC-JP to SHIFT-JIS -iconv -c -s -f EUC-JP -t SHIFT-JIS $(JADW)wgnuplot.html > $(JADW)wgnuplot-ja.html -iconv -c -s -f EUC-JP -t SHIFT-JIS $(JADW)wgnuplot.hhc > $(JADW)wgnuplot-ja.hhc cp $(JADW)wgnuplot-ja.html $(JADW)wgnuplot.html cp $(JADW)wgnuplot-ja.hhc $(JADW)wgnuplot.hhc # Adjust Encoding and Language information sed -i -e "s/charset=utf-8/charset=shift-jis/" $(JADW)wgnuplot.html sed -i -e "s/charset=utf-8/charset=shift-jis/" $(JADW)wgnuplot.hhc sed -i -e "s/Language=0x409 Englisch (USA)/Language=0x411 Japanisch (Japan)/" $(JADW)/wgnuplot.hhp # Build help file -$(TARGET) -e "winhelp=1; cd '$(JAD)'" plotstyles.gnu -$(HHC) $(JADW)wgnuplot.hhp cp $(JADW)wgnuplot.chm $(HELPFILEJA) doc2html.exe: $(D)windows/doc2html.c $(D)termdoc.c $(D)xref.c version.$(O) $(LD) $(LDFLAGS) -o $@ -DWINDOWS_NO_GUI $(CFLAGS) -I. -I$(D:/=) -I$(T:/=) $^ doc2html-ja.exe: $(JASRC) $(D)windows/doc2html.c $(D)termdoc.c $(D)xref.c version.$(O) $(LD) $(LDFLAGS) -o $@ -DWINDOWS_NO_GUI -DJAPANESE_DOC $(CFLAGS) -I. -I$(JAD) -I$(JA)/term $(D)windows/doc2html.c $(D)termdoc.c $(D)xref.c version.$(O) doc2rtf.exe: $(D)doc2rtf.c $(D)termdoc.c $(D)xref.c $(LD) $(LDFLAGS) -o $@ -DWINDOWS_NO_GUI $(CFLAGS) -I$(S) -I$(D) -I$(T) $^ #make binary demo files $(M)bf_test.exe : bf_test.c dbinary.$(O) alloc.$(O) $(LD) $(LDFLAGS) $(CFLAGS) -U_Windows -o $@ $^ (cd $(M) ; ./bf_test.exe ) # _Windows causes wtext.h to define fread() etc dbinary.$(O): binary.c $(CC) -c $(CFLAGS) -U_Windows -o $@ $< # # Create config.h # $(OBJS) $(WINOBJS) dbinary.$(O): config.h config.h: $(TOP)/config/config.mgw cp -p $< $@ # generate LUA TeX support files ifdef LUA gnuplot-lua-tikz.sty: $(T)/lua/gnuplot-tikz.lua $(LUA) $(T)/lua/gnuplot-tikz.lua style endif # Create documentation in various formats # ALL_TERMINALS_DOC=1 ifdef ALL_TERMINALS_DOC # Generate TeX documentation with the complete list of all terminals # (gnuplot.tex should be the same on all platforms): SORT_TERMINALS=1 ifdef SORT_TERMINALS # sort alphabetically all terminals (note: req. GNU sort, not from MS) allterm.h: $(CORETERM) @echo "Building allterm.h" @for e in `egrep "^[ ]*START_HELP" $(CORETERM) |\ $(GNUSORT) -f -t':' -k2` ; do \ f=`echo $$e |cut -d\: -f1` ; s=`echo $$e | cut -d\: -f2` ;\ sed -n "/^[ ]*$$s/,/^[ ]*END_HELP/p" $$f ; \ done >$@ else # sequence of terminals according to "ls term/*.trm": allterm.h: $(CORETERM) @echo "Building allterm.h" @cat $(T)*.trm > allterm.c $(CPP) $(CFLAGS) -I$(T) -DTERM_DRIVER_H -DTERM_HELP allterm.c | \ sed '/^ *$$/d;/^#/d' > allterm.h @rm -f allterm.c endif doc2tex.exe: $(D)doc2tex.c $(D)termdoc.c allterm.h $(CORETERM) $(LD) $(LDFLAGS) -o $@ -DWINDOWS_NO_GUI -DALL_TERM_DOC $(CFLAGS) \ -I. -I$(D) -I$(T) $(D)doc2tex.c $(D)termdoc.c else # Old version: generate documentation with only currently used terminals: doc2tex.exe: $(D)doc2tex.c $(D)termdoc.c $(LD) $(LDFLAGS) -o $@ -DWINDOWS_NO_GUI $(CFLAGS) -I. -I$(D) -I$(T) $^ endif gnuplot.tex: $(D)gnuplot.doc doc2tex.exe doc2tex $(D)gnuplot.doc gnuplot.tex gnuplot-figures.tex: $(D)gnuplot.doc doc2tex.exe GNUPLOT_LIB=$(M) $(TARGET) $(D)plotstyles.gnu doc2tex -figures $(D)gnuplot.doc gnuplot-figures.tex gnuplot.dvi: gnuplot.tex $(TOP)/VERSION $(D)toc_entr.sty $(D)titlepag.tex cp gnuplot.tex gp_tex2.tex cp $(TOP)/VERSION . cp -p $(D)toc_entr.sty . cp -p $(D)titlepag.tex . echo "" > pdffigures.tex # Call LaTeX three times to get the toc right. latex gp_tex2.tex && latex gp_tex2.tex && latex gp_tex2.tex mv gp_tex2.dvi gnuplot.dvi rm -f gp_tex2.* gnuplot.ps: gnuplot.dvi dvips -o gnuplot.ps gnuplot.dvi gnuplot.pdf: gnuplot-figures.tex $(TOP)/VERSION $(D)toc_entr.sty $(D)titlepag.tex cp gnuplot-figures.tex gp_tex2.tex echo "\usepackage{graphicx}" > pdffigures.tex echo "\usepackage{picins}" >> pdffigures.tex # Call LaTeX three times to get the toc right. TEXINPUTS=.:$(TOP):$(D):${TEXINPUTS}: pdflatex gp_tex2.tex TEXINPUTS=.:$(TOP):$(D):${TEXINPUTS}: pdflatex gp_tex2.tex TEXINPUTS=.:$(TOP):$(D):${TEXINPUTS}: pdflatex gp_tex2.tex # now include index makeindex gp_tex2 TEXINPUTS=.:$(TOP):$(D):${TEXINPUTS}: pdflatex gp_tex2.tex mv gp_tex2.pdf gnuplot.pdf rm -f gp_tex2.* TUT = $(TOP)/tutorial tutorial.pdf: $(TUT)/eg1.plt $(TUT)/eg2.plt $(TUT)/eg3.plt $(TUT)/eg4.plt \ $(TUT)/eg5.plt $(TUT)/eg6.plt $(TUT)/eg7.plt $(TUT)/linepoin.plt \ $(TUT)/test.plt $(TUT)/test_tikz.plt $(TUT)/tutorial.tex GNUPLOT_LIB=$(TUT) gnuplot eg1.plt GNUPLOT_LIB=$(TUT) gnuplot eg2.plt GNUPLOT_LIB=$(TUT) gnuplot eg3.plt GNUPLOT_LIB=$(TUT) gnuplot eg4.plt GNUPLOT_LIB=$(TUT) gnuplot eg5.plt GNUPLOT_LIB=$(TUT) gnuplot eg6.plt GNUPLOT_LIB=$(TUT) GNUPLOT_PS_DIR=$(T)PostScript gnuplot eg7.plt GNUPLOT_LIB=$(TUT) gnuplot linepoin.plt GNUPLOT_LIB=$(TUT) gnuplot test.plt GNUPLOT_LIB=$(TUT) GNUPLOT_LUA_DIR=$(T)lua gnuplot test_tikz.plt # run latex twice to get refernces right TEXINPUTS=.:$(TUT) latex tutorial.tex TEXINPUTS=.:$(TUT) latex tutorial.tex dvipdfm tutorial.dvi gpcard.pdf: $(D)gpcard.tex TEXINPUTS=$(TOP):$(D):${TEXINPUTS}: tex gpcard.tex dvipdfm gpcard.dvi ps_symbols.pdf: $(D)psdoc/ps_symbols.gpi GNUPLOT_LIB=$(D)psdoc GNUPLOT_PS_DIR=$(T)PostScript $(TARGET) ps_symbols.gpi ps2pdf ps_symbols.ps ps_fontfile_doc.ps: $(D)psdoc/ps_fontfile_doc.tex TEXINPUTS=$(D)psdoc:${TEXINPUTS}: latex ps_fontfile_doc TEXINPUTS=$(D)psdoc:${TEXINPUTS}: latex ps_fontfile_doc dvips -j0 ps_fontfile_doc ps_fontfile_doc.pdf: $(D)psdoc/ps_fontfile_doc.tex TEXINPUTS=$(D)psdoc:${TEXINPUTS}: pdflatex ps_fontfile_doc TEXINPUTS=$(D)psdoc:${TEXINPUTS}: pdflatex ps_fontfile_doc ps_guide.pdf: $(D)psdoc/ps_guide.ps ps2pdf $(D)psdoc/ps_guide.ps ps_guide.pdf # clean up temporary files clean: $(RM) config.h wgnuplot.map wgnuplot.res $(W)/gnuplot.rtf $(RM) *.$(O) *.po *.o *.co *.d $(RM) doc2*.exe $(W)/wgnuplib.res wgnuplib.map wgnuplot.lib $(RM) $(M)bf_test.exe *.ico geticon.exe allterm.h allterm.c $(RM) *.aux *.log *.dvi *.toc $(RM) gnuplot.tex gnuplot-figures.tex pdffigures.tex figure_*.pdf $(RM) titlepag.tex toc_entr.sty VERSION $(RM) eg?.tex eg?.eps linepoin.tex test.tex test_tikz.tex $(RM) $(D)windows/wgnuplot.log $(D)windows/wgnuplot.hhc $(RM) $(D)windows/*.png $(D)windows/wgnuplot.html -$(RM) -rf ./dist/ ./gnuplot/ -$(RM) -rf $(JA) realclean: veryclean veryclean: clean $(RM) wgnuplot.exe wgnuplot_pipes.exe gnuplot.exe pgnuplot.exe $(RM) $(HELPFILE) $(HELPFILEJA) wgnuplot.chw wgnuplot.gid wgnuplot.mnu $(RM) gnuplot.ps gnuplot.pdf $(RM) gpcard.pdf tutorial.pdf $(RM) ps_fontfile_doc.pdf ps_fontfile_doc.ps ps_guide.pdf $(RM) ps_symbols.ps ps_symbols.pdf $(RM) $(M)binary[123] $(M)fit.log $(M)soundfit.par $(RM) gnuplot-lua-tikz.sty gnuplot-lua-tikz.tex $(RM) gnuplot-lua-tikz-common.tex t-gnuplot-lua-tikz.tex # now move the whole stuff to its destination install: mkdir -p $(DESTDIR) # binaries go to /bin mkdir -p $(DESTDIR)/bin cp -p gnuplot.exe $(DESTDIR)/bin/ cp -p wgnuplot.exe $(DESTDIR)/bin/ cp -p wgnuplot_pipes.exe $(DESTDIR)/bin/ cp -p pgnuplot.exe $(DESTDIR)/bin/ cp -p $(W)/wgnuplot.mnu $(DESTDIR)/bin/ cp -p $(W)/wgnuplot-ja.mnu $(DESTDIR)/bin/ cp -p $(HELPFILE) $(DESTDIR)/bin/ ifdef HELPFILEJA cp -p $(HELPFILEJA) $(DESTDIR)/bin/ endif # configuration files mkdir -p $(DESTDIR)/$(GNUPLOT_SHARE_DIR) cp -p $(TOP)/share/gnuplotrc $(DESTDIR)/$(GNUPLOT_SHARE_DIR) cp -p $(TOP)/share/*.gp $(DESTDIR)/$(GNUPLOT_SHARE_DIR) # terminal support files mkdir -p $(DESTDIR)/$(GNUPLOT_PS_DIR) cp -p $(TOP)/term/PostScript/*.ps $(DESTDIR)/$(GNUPLOT_PS_DIR)/ cp -p $(TOP)/term/PostScript/*.txt $(DESTDIR)/$(GNUPLOT_PS_DIR)/ mkdir -p $(DESTDIR)/$(GNUPLOT_JS_DIR) cp -p $(TOP)/term/js/*.* $(DESTDIR)/$(GNUPLOT_JS_DIR)/ cp -p $(TOP)/term/js/README $(DESTDIR)/$(GNUPLOT_JS_DIR)/ mkdir -p $(DESTDIR)/$(GNUPLOT_TEX_DIR)/generic/gnuplot mkdir -p $(DESTDIR)/$(GNUPLOT_TEX_DIR)/plain/gnuplot mkdir -p $(DESTDIR)/$(GNUPLOT_TEX_DIR)/latex/gnuplot mkdir -p $(DESTDIR)/$(GNUPLOT_TEX_DIR)/context/gnuplot cp -p $(TOP)/share/LaTeX/README $(DESTDIR)/$(GNUPLOT_TEX_DIR)/latex/gnuplot/ cp -p $(TOP)/share/LaTeX/gnuplot.cfg $(DESTDIR)/$(GNUPLOT_TEX_DIR)/latex/gnuplot/ ifdef LUA mkdir -p $(DESTDIR)/$(GNUPLOT_LUA_DIR) cp -p $(TOP)/term/lua/README $(DESTDIR)/$(GNUPLOT_LUA_DIR)/ cp -p $(TOP)/term/lua/NEWS $(DESTDIR)/$(GNUPLOT_LUA_DIR)/ cp -p $(TOP)/term/lua/TODO $(DESTDIR)/$(GNUPLOT_LUA_DIR)/ cp -p $(TOP)/term/lua/gnuplot-tikz.lua $(DESTDIR)/$(GNUPLOT_LUA_DIR)/ cp -p gnuplot-lua-tikz.sty $(DESTDIR)/$(GNUPLOT_TEX_DIR)/latex/gnuplot/ cp -p gnuplot-lua-tikz.tex $(DESTDIR)/$(GNUPLOT_TEX_DIR)/plain/gnuplot/ cp -p t-gnuplot-lua-tikz.tex $(DESTDIR)/$(GNUPLOT_TEX_DIR)/context/gnuplot/ cp -p gnuplot-lua-tikz-common.tex $(DESTDIR)/$(GNUPLOT_TEX_DIR)/generic/gnuplot/ endif # README etc cp -p $(TOP)/Copyright $(DESTDIR)/ cp -p $(TOP)/win/Copyright-ja.txt $(DESTDIR)/ cp -p $(TOP)/README $(DESTDIR)/ cp -p $(TOP)/NEWS $(DESTDIR)/ cp -p $(TOP)/ChangeLog $(DESTDIR)/ cp -p $(TOP)/BUGS $(DESTDIR)/ cp -p $(TOP)/win/README-Windows.txt $(DESTDIR)/ cp -p $(TOP)/win/README-Windows-ja.txt $(DESTDIR)/ # demo and contrib mkdir -p $(DESTDIR)/demo -cp -p $(M)* $(DESTDIR)/demo/ mkdir -p $(DESTDIR)/contrib/pm3d/ -cp -p $(TOP)/pm3d/contrib/* $(DESTDIR)/contrib/pm3d/ # docs mkdir -p $(DESTDIR)/docs -cp -p gnuplot.pdf $(DESTDIR)/docs/ cp -p $(TOP)/FAQ.pdf $(DESTDIR)/docs/ -cp -p gpcard.pdf $(DESTDIR)/docs/ -cp -p tutorial.pdf $(DESTDIR)/docs/ mkdir -p $(DESTDIR)/docs/psdoc cp -p $(D)psdoc/ps_file.doc $(DESTDIR)/docs/psdoc/ps_file_doc.txt cp -p $(D)psdoc/ps_guide.ps $(DESTDIR)/docs/psdoc/ -cp -p ps_guide.pdf $(DESTDIR)/docs/psdoc/ -cp -p ps_symbols.ps $(DESTDIR)/docs/psdoc/ -cp -p ps_symbols.pdf $(DESTDIR)/docs/psdoc/ -cp -p ps_fontfile_doc.pdf $(DESTDIR)/docs/psdoc/ # runtime libraries, configuration files etc. ifdef EXTRADIST cp -pR $(EXTRADIST)/* $(DESTDIR)/ endif installer: $(MAKE) DESTDIR=./dist install cp -p grpicon.ico ./dist/bin/ cp -p $(TOP)/win/*.iss ./dist (cd ./dist; $(ISCC) gnuplot.iss) ifdef RELEASE mv ./dist/gp*-setup.exe gp46`cat $(TOP)/PATCHLEVEL`-win32-setup.exe else mv ./dist/gp*-setup.exe gp46`cat $(TOP)/PATCHLEVEL`-`date +%Y%m%d`-win32-mingw.exe endif zip: $(MAKE) DESTDIR=./gnuplot install ifdef RELEASE zip -mro9 gp46`cat $(TOP)/PATCHLEVEL`-win32-mingw.zip gnuplot else zip -mro9 gp46`cat $(TOP)/PATCHLEVEL`-`date +%Y%m%d`-win32-mingw.zip gnuplot endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/config.nt����������������������������������������������������������������������0000644�0004711�0000144�00000042440�11676710605�013223� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* config.h for msvc/Makefile * * Prepared according to config.h from ./configure and by means of * config_strip.sh as of gnuplot 4.5 in November 2011. */ /* Define to allow use of deprecated syntax and terminal behaviour. */ /* #undef BACKWARDS_COMPATIBLE */ /* Define if you want to use the CGI terminal under SCO. */ /* #undef CGI */ /* Define if you want online help and subtopic tables sorted by column. */ /* #undef COLUMN_HELP */ /* Define to treat spacebar like any other keystroke. */ /* #undef DISABLE_SPACE_RAISES_CONSOLE */ /* Contact address for modified and binary distributed gnuplot versions */ /* #undef DIST_CONTACT */ /* Define if you want to use libgrx20 with MSDOS/djgpp. */ /* #undef DJSVGA */ /* Define if this system uses a 32-bit DOS extender (djgpp/emx). */ /* #undef DOS32 */ /* Define to allow placement of rectangles and other objects */ /* undef EAM_OBJECTS */ /* Define if color information should be passed for each vertex. */ /* #undef EXTENDED_COLOR_SPECS */ /* Define if you want to supply pre-existing X11 windows. */ /* #undef EXTERNAL_X11_WINDOW */ /* Define if <errno.h> declares errno. */ /* #undef EXTERN_ERRNO */ /* Define if libgd supports animated gifs. */ /* #undef GIF_ANIMATION */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define if you want to use a gnuplot history file. */ #define GNUPLOT_HISTORY 1 /* Define to allow command line macros. */ #define GP_MACROS 1 /* Define if you want to use a newer version of libgrx under MSDOS/djgpp. */ /* #undef GRX21 */ /* Define to 1 if you have the <3dkit.h> header file. */ /* #undef HAVE_3DKIT_H */ /* Define to 1 if you have the `atexit' function. */ #define HAVE_ATEXIT 1 /* Define to 1 if you have the `bcopy' function. */ /* #undef HAVE_BCOPY */ /* Define to 1 if you have the `bzero' function. */ /* #undef HAVE_BZERO */ /* libcairo support for eps (cairo >= 1.6) */ /* #undef HAVE_CAIROEPS */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define if you want the cairo-based terminals. */ /* #undef HAVE_CAIROPDF */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define to 1 if you have the declaration of `signgam', and to 0 if you don't. */ /* #undef HAVE_DECL_SIGNGAM */ /* Define to 1 if you have the <dirent.h> header file. */ /* #undef HAVE_DIRENT_H */ /* Define to 1 if you have the `doprnt' function. */ /* #undef HAVE_DOPRNT */ /* Define to 1 if you have the <editline/readline.h> header file. */ /* #undef HAVE_EDITLINE_READLINE_H */ /* Define to 1 if you have the `erf' function. */ /* #undef HAVE_ERF */ /* Define to 1 if you have the `erfc' function. */ /* #undef HAVE_ERFC */ /* Define to 1 if you have the <errno.h> header file. */ #define HAVE_ERRNO_H 1 /* Define to 1 if you have the <float.h> header file. */ #define HAVE_FLOAT_H 1 /* Define to 1 if you have the `fork' function. */ /* #undef HAVE_FORK */ /* Define to 1 if you have the `gamma' function. */ /* #undef HAVE_GAMMA */ /* Define if libgd supports gif. */ /* #undef HAVE_GD_GIF */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define to 1 if you have the <gd.h> header file. */ /* #undef HAVE_GD_H */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define if libgd supports jpeg. */ /* #undef HAVE_GD_JPEG */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define if libgd supports png. */ /* #undef HAVE_GD_PNG */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define if libgd supports TrueType fonts through libfreetype. */ /* #undef HAVE_GD_TTF */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 /* Define to 1 if you have the <ggi/wmh.h> header file. */ /* #undef HAVE_GGI_WMH_H */ /* Define to 1 if you have the <ggi/xmi.h> header file. */ /* #undef HAVE_GGI_XMI_H */ /* Define to use gtk/gdk tweaks */ /* #undef HAVE_GTK */ /* Define to use gtk+ functions to handle cairo */ /* #undef HAVE_GTK28 */ /* define if you have libiconv and iconv.h */ /* #undef HAVE_ICONV */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define to 1 if you have the `index' function. */ /* #undef HAVE_INDEX */ /* Define to 1 if you have the <inttypes.h> header file. */ /* #undef HAVE_INTTYPES_H */ /* Define if you use have kpsexpand (TeX). */ /* #undef HAVE_KPSEXPAND */ /* Define to 1 if you have the <langinfo.h> header file. */ /* #undef HAVE_LANGINFO_H */ /* Define to 1 if you have the `lgamma' function. */ /* #undef HAVE_LGAMMA */ /* Define to 1 if you're using the aquaterm library on Mac OS X */ /* #undef HAVE_LIBAQUATERM */ /* Define to 1 if you have the <libc.h> header file. */ /* #undef HAVE_LIBC_H */ /* Define if you are using the BSD editline library. */ /* #undef HAVE_LIBEDITLINE */ /* Define if you have gd library. */ /* #undef HAVE_LIBGD */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define to 1 if you have the `m' library (-lm). */ /* #undef HAVE_LIBM */ /* Define to 1 if you have the `pdf' library (-lpdf). */ /* #undef HAVE_LIBPDF */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define if your pdf library is too old to use PDF_begin_document. */ /* #undef HAVE_LIBPDF_OPEN_FILE */ /* Define if you are using the GNU readline library. */ /* #undef HAVE_LIBREADLINE */ /* Define if you have zlib. */ /* #undef HAVE_LIBZ */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define to 1 if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the <locale.h> header file. */ #define HAVE_LOCALE_H 1 /* Define if you want the lua/TikZ terminal. */ /* #undef HAVE_LUA */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define to 1 if you have the <lua.h> header file. */ /* #undef HAVE_LUA_H */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define to 1 if you have the <malloc.h> header file. */ #define HAVE_MALLOC_H 1 /* Define to 1 if you have the <math.h> header file. */ #define HAVE_MATH_H 1 /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define if your pdf library doesn't support dash patterns. */ /* #undef HAVE_NODASH_LIBPDF */ /* Define if your pdf library is too old to support patterns. */ /* #undef HAVE_OLD_LIBPDF */ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ /* Define to 1 if you have the `pclose' function. */ /* #define HAVE_PCLOSE 1 */ /* Define to 1 if you have the <pdflib.h> header file. */ /* #undef HAVE_PDFLIB_H */ /* Define to 1 if you have the `poll' function. */ /* #undef HAVE_POLL */ /* Define to 1 if you have the <poll.h> header file. */ /* #define HAVE_POLL_H 1 */ /* Define to 1 if you have the `popen' function. */ /* #define HAVE_POPEN 1 */ /* Define to 1 if you have the <readline/history.h> header file. */ /* #undef HAVE_READLINE_HISTORY_H */ /* Define to 1 if you have the <readline/readline.h> header file. */ /* #undef HAVE_READLINE_READLINE_H */ /* Define to 1 if you have the <readline/tilde.h> header file. */ /* #undef HAVE_READLINE_TILDE_H */ /* Define to 1 if you have the `rindex' function. */ /* #undef HAVE_RINDEX */ /* Define to 1 if you have the `select' function. */ /* #undef HAVE_SELECT */ /* Define to 1 if you have the `setvbuf' function. */ /* #define HAVE_SETVBUF 1 */ /* it is defined, but setvbuf(stdout) does not work for Windows GUI redirected stdout */ /* Define to 1 if you have the <sgtty.h> header file. */ /* #undef HAVE_SGTTY_H */ /* Define if we have sigsetjmp(). */ /* #undef HAVE_SIGSETJMP */ /* Define to 1 if you have the `sleep' function. */ /* #undef HAVE_SLEEP */ /* Comment: well, actually it is there, but stdlib.h says it is `obsolete' */ /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define to 1 if stdbool.h conforms to C99. */ /* #undef HAVE_STDBOOL_H */ /* Define to 1 if you have the <stdint.h> header file. */ /* #undef HAVE_STDINT_H */ /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `stpcpy' function. */ /* #undef HAVE_STPCPY */ /* Define to 1 if you have the `strcasecmp' function. */ /* #undef HAVE_STRCASECMP */ /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strcspn' function. */ #define HAVE_STRCSPN 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* Define to 1 if you have the `stricmp' function. */ #define HAVE_STRICMP 1 /* Define to 1 if cpp supports the ANSI # stringizing operator. */ #define HAVE_STRINGIZE 1 /* Define to 1 if you have the <strings.h> header file. */ /* #undef HAVE_STRINGS_H */ /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strncasecmp' function. */ /* #undef HAVE_STRNCASECMP */ /* Define to 1 if you have the `strndup' function. */ /* #undef HAVE_STRNDUP */ /* Define to 1 if you have the `strnicmp' function. */ #define HAVE_STRNICMP 1 /* Define to 1 if you have the `strnlen' function. */ #define HAVE_STRNLEN 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define if math.h declares struct exception for matherr(). */ #define HAVE_STRUCT_EXCEPTION_IN_MATH_H 1 /* Define to 1 if you have the `sysinfo' function. */ /* #undef HAVE_SYSINFO */ /* Define to 1 if you have the <sys/bsdtypes.h> header file. */ /* #undef HAVE_SYS_BSDTYPES_H */ /* Define to 1 if you have the <sys/ioctl.h> header file. */ /* #undef HAVE_SYS_IOCTL_H */ /* Define to 1 if you have the <sys/param.h> header file. */ /* #undef HAVE_SYS_PARAM_H */ /* Define to 1 if you have the <sys/select.h> header file. */ /* #undef HAVE_SYS_SELECT_H */ /* Define to 1 if you have the <sys/socket.h> header file. */ /* #undef HAVE_SYS_SOCKET_H */ /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/systeminfo.h> header file. */ /* #undef HAVE_SYS_SYSTEMINFO_H */ /* Define to 1 if you have the <sys/timeb.h> header file. */ #define HAVE_SYS_TIMEB_H 1 /* Define to 1 if you have the <sys/time.h> header file. */ /* #undef HAVE_SYS_TIME_H */ /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <sys/utsname.h> header file. */ /* #undef HAVE_SYS_UTSNAME_H */ /* Define to 1 if you have the `tcgetattr' function. */ /* #undef HAVE_TCGETATTR */ /* Define to 1 if you have the <termios.h> header file. */ /* #undef HAVE_TERMIOS_H */ /* Define to 1 if you have the <time.h> header file. */ #define HAVE_TIME_H 1 /* Define if time_t is declared in time.h. */ #define HAVE_TIME_T_IN_TIME_H 1 /* Define to 1 if you have the <unistd.h> header file. */ /* #undef HAVE_UNISTD_H */ /* Define to 1 if you have the `usleep' function. */ /* #undef HAVE_USLEEP */ /* Define to 1 if you have the <values.h> header file. */ /* #undef HAVE_VALUES_H */ /* Define to 1 if you have the `vfork' function. */ /* #undef HAVE_VFORK */ /* Define to 1 if you have the <vfork.h> header file. */ /* #undef HAVE_VFORK_H */ /* Define to 1 if you have the `vfprintf' function. */ #define HAVE_VFPRINTF 1 /* Define to 1 if you have the <vgagl.h> header file. */ /* #undef HAVE_VGAGL_H */ /* Define to 1 if you have the <wchar.h> header file. */ #define HAVE_WCHAR_H 1 /* Define to 1 if you have the `wcwidth' function. */ /* #undef HAVE_WCWIDTH */ /* Define to 1 if `fork' works. */ /* #undef HAVE_WORKING_FORK */ /* Define to 1 if `vfork' works. */ /* #undef HAVE_WORKING_VFORK */ /* Define to 1 if the system has the type `_Bool'. */ /* #undef HAVE__BOOL */ /* Define to enable gridbox optimization in hidden3d code. */ /* #undef HIDDEN3D_GRIDBOX */ /* Define to enable quadtree optimization in hidden3d code. */ #define HIDDEN3D_QUADTREE 1 /* Define to enable handling point size in hidden3d code. */ #define HIDDEN3D_VAR_PTSIZE 1 /* Define if this is a Linux system with SuperVGA library. */ /* #undef LINUXVGA */ /* Define to 1 if malloc(0)==0 */ /* #undef MALLOC_ZERO_RETURNS_ZERO */ /* Define if your libreadline has no rl_ding */ /* #undef MISSING_RL_DING */ /* Define if your libreadline has no rl_force_update_display */ /* #undef MISSING_RL_FORCED_UPDATE_DISPLAY */ /* Define if your libreadline has no rl_complete_with_tilde_expansion */ /* #undef MISSING_RL_TILDE_EXPANSION */ /* Define if this is an MSDOS system. */ /* #undef MSDOS */ /* Define if you want to read .gnuplot from current directory (SECURITY RISK!). */ /* #undef USE_CWDRC */ /* Define to disable terminals that depend on code in bitmap.c */ /* #undef NO_BITMAP_SUPPORT */ /* Name of package */ /* #undef PACKAGE */ /* Define to the address where bug reports for this package should be sent. */ /* #undef PACKAGE_BUGREPORT */ /* Define to the full name of this package. */ /* #undef PACKAGE_NAME */ /* Define to the full name and version of this package. */ /* #undef PACKAGE_STRING */ /* Define to the one symbol short name of this package. */ /* #undef PACKAGE_TARNAME */ /* Define to the version of this package. */ /* #undef PACKAGE_VERSION */ /* Define if you do have the popen and pclose functions. */ /* #undef PIPES */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Unix-type of Interprocess Communication is required for mouse support. */ /* #undef PIPE_IPC */ /* Define to 1 if the C compiler supports function prototypes. */ #define PROTOTYPES 1 /* Define if you want the Qt terminal. */ /* #undef QTTERM */ /* Define if you want to use the included readline function. */ #define READLINE 1 /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void /* Define to the type of arg 1 for `select'. */ /* #undef SELECT_TYPE_ARG1 */ /* Define to the type of args 2, 3 and 4 for `select'. */ /* #undef SELECT_TYPE_ARG234 */ /* Define to the type of arg 5 for `select'. */ /* #undef SELECT_TYPE_ARG5 */ /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */ #define STAT_MACROS_BROKEN 1 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if you want to use the sunview terminal (sun). */ /* #undef SUN */ /* Define to use thin plate spines. */ /* #undef THIN_PLATE_SPLINES_GRID */ /* Define if the 3dkit libray is present. */ /* #undef THREEDKIT */ /* Define if you want to use the experimental ggi driver. */ /* #undef USE_GGI_DRIVER */ /* Define if you want to have mouse support in interactive terminals. */ /* #undef USE_MOUSE */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define to add support for generating a statistical summary of data */ #define USE_STATS 1 /* Define to enable multi-byte font support for x11 */ /* #undef USE_X11_MULTIBYTE */ /* Version number of package */ /* #undef VERSION */ /* Define if the vgagl libray is present. */ /* #undef VGAGL */ /* Define to allow zooming or refresh of volatile data. EXPERIMENTAL */ #define VOLATILE_REFRESH 1 /* Define if you want the wxwidgets terminal. */ /* #undef WXWIDGETS */ /* Don't change it here -- this define is set in config/msvc/Makefile. */ /* Define if you are using the X11 window system. */ /* #undef X11 */ /* Define to 1 if the X Window System is missing or not being used. */ /* #undef X_DISPLAY_MISSING */ /* Define like PROTOTYPES; this can be used by system headers. */ /* #undef __PROTOTYPES */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* libgd versions < 1.8.4 need gdImageStringTTF rather than gdImageStringFT */ /* #undef gdImageStringFT */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif /* Define to `int' if <sys/types.h> does not define. */ /* #undef pid_t */ /* Define to `unsigned' if <sys/types.h> does not define. */ /* #undef size_t */ /* Define as `fork' if `vfork' does not work. */ /* #undef vfork */ /* * ================================================== * Stuff not provided by config.hin (aka ./configure) * ================================================== */ #ifndef WIN32 # define WIN32 #endif /* Windows Interprocess Communication is required for mouse support. */ #ifdef USE_MOUSE # define WIN_IPC 1 #endif #define HAVE_GDIPLUS #define GP_INLINE __inline #define GP_EXCEPTION_NAME _exception #define GP_MATHERR _matherr #define snprintf _snprintf /*#define vsnprintf _vsnprintf*/ #define isnan _isnan #define ftruncate _chsize #ifdef PIPES # define popen _popen # define pclose _pclose #endif /* gnuplot.gih is not used by wgnuplot */ #define NO_GIH 1 /* The Microsoft visual C++ compiler spews about 1000 warnings during */ /* compilation of gnuplot. The following lines disable most of them. */ #pragma warning(disable: 4018 4056 4113 4244 4305 4761 4756 4996) #define _CRT_SECURE_NO_WARNINGS ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/makefile.dj2�������������������������������������������������������������������0000644�0004711�0000144�00000015056�11571332644�013571� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Hello, emacs: this is a -*- Makefile -*- # $Id: makefile.dj2,v 1.19 2011/06/01 03:44:36 sfeam Exp $ # # GNUPLOT Makefile for DJGPP version 2 on DOS # # Usage: # from the main gnuplot directory, do: # make -C src -f ../config/makefile.dj2 # # # AUTHORS : several ... including Edzer Pebesma <pebesma@metoor.frw.uva.nl> # last mod. by Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> # DATE of last mod: $Date: 2011/06/01 03:44:36 $ # # # removed atari reference and added binary demo bf_test # cleaned up the building of doc and binary test files # gnuplot.gih will be built now inside the docs directory like under # UNIX. The problem is that DOS does not recognize sub-shells like # (cd dir ; do things) inside the makefile. # solution -> assume everything is done inside gnuplot main dir, under # a single DOS command process # # install target added : will copy the executable + helpfile in a given # directory ; customize it, see FINALDEST # # # here customize where you put gnuplot executable for make install # for simplicity the helpfile will be copied in the same dir. # convention used here : no trailing \ for directory names FINALDEST=c:\bin # here customize the name of the executable # exe file will be gnuplot.exe: EXENAME = gnuplot # where to place gnuplot.gih helpfile upon MAKE # note it will be built inside gnuplot\$(HELPDEST) # and eventually copied to FINALDEST when install HELPDEST =. # name of the helpfile HELPFILE =gnuplot.gih # Where to install the PostScript prologue files, relatively to the executable # gnuplot.exe GNUPLOT_PS_DIR = share/PostScript # Similarly for javascript files for the canvas terminal: GNUPLOT_JS_DIR = share/js # Similarly for lua scripts used by the lua terminal GNUPLOT_LUA_DIR = share/lua # compiler CC = gcc # include directory INCLUDE = -I. # for svga term driver # HBB NEW 20050715: you can disable the DJSVGA driver by -DDJSVGA=0 TERMFLAGS = -DDJSVGA=1 -Ic:/djgpp/contrib/grx246/include \ -DGNUPLOT_PS_DIR=\"$(GNUPLOT_PS_DIR)\" \ -DGNUPLOT_LUA_DIR=\"$(GNUPLOT_LUA_DIR)\" TERMLIBS = -Lc:/djgpp/contrib/grx246/lib/dj2 -lgrx20 # -lgd # HBB : added $(OPTS) so user can # change CFLAGS easily, without having to change makefile CFLAGS = -DHAVE_CONFIG_H \ -O2 -g $(OPTS) LINKOPT = $(LDFLAGS) $(TERMLIBS) -lm -lpc # abbreviations for relative directory names (NB: target 'clean' will # still need manual change if this is changed...) T=../term/ D=../docs/ M=../demo/ O=o CSOURCE5 = $(T)ai.trm $(T)aed.trm \ $(T)cgi.trm $(T)djsvga.trm $(T)dumb.trm \ $(T)dxf.trm $(T)dxy.trm \ $(T)debug.trm $(T)eepic.trm $(T)epson.trm $(T)fig.trm \ $(T)hp26.trm $(T)hp2648.trm $(T)hpgl.trm \ $(T)hpljii.trm $(T)metafont.trm\ $(T)hppj.trm CSOURCE6 = $(T)impcodes.h $(T)imagen.trm $(T)next.trm $(T)object.h \ $(T)kyo.trm $(T)latex.trm $(T)mif.trm \ $(T)pbm.trm $(T)pc.trm CSOURCE7 = $(T)post.trm $(T)qms.trm $(T)regis.trm $(T)sun.trm \ $(T)t410x.trm $(T)tek.trm $(T)texdraw.trm $(T)unixpc.trm \ $(T)v384.trm $(T)vws.trm $(T)x11.trm $(T)xlib.trm #OBJ1 = bitmap.o command.o contour.o eval.o graphics.o graph3d.o hidden3d.o util3d.o #OBJ2 = help.o internal.o misc.o parse.o plot.o plot2d.o plot3d.o readline.o #OBJ3 = scanner.o set.o show.o specfun.o standard.o stdfn.o term.o time.o util.o #OBJ4 = version.o binary.o interpol.o fit.o matrix.o datafile.o alloc.o variable.o CSOURCES = $(CSOURCE5) $(CSOURCE6) $(CSOURCE7) #OBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) # use makefile.all, instead: include makefile.all OBJS = $(COREOBJS) version.$(O) .c.o: $(CC) -c $(CFLAGS) $(INCLUDE) $< %:: RCS/% $(patsubst $@-noexist,$(CO) $(COFLAGS) $< $@, \ $(filter-out $@,$(firstword $(wildcard $@) $@-noexist))) all: $(EXENAME).exe $(HELPDEST)/$(HELPFILE) $(M)binary? # -s performs the coff2exe step implicitly (?) # HBB: that's plain wrong: -s means 'strip executable', # and stubify (formerly called stubify) is now always done # automatically in the link step. I changed this so you # get a debuggable gnuplot, but a stripped gnuplot.exe $(EXENAME).exe : $(OBJS) $(CC) -o $(EXENAME) $(OBJS) $(LINKOPT) objcopy --strip-all $(EXENAME) $(EXENAME).exe stubify $(EXENAME).exe config.h: ../config/config.dj2 copy ..\config\config.dj2 config.h command.o: command.c plot.h setshow.h help.h $(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" command.c show.o: show.c plot.h setshow.h $(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" $< term.o: term.c term.h plot.h set.c show.c bitmap.h $(CSOURCES) $(CC) -c $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -I$(T) term.c $(OBJS): plot.h config.h command.o help.o misc.o: help.h command.o graphics.o graph3d.o hidden3d.o util3d.o misc.o plot.o set.o show.o term.o interpol.o: setshow.h command.o fit.o matrix.o: fit.h fit.o matrix.o: matrix.h bitmap.o term.o: bitmap.h variable.o: variable.c plot.h variable.h EMAIL=gnuplot-info@lists.sourceforge.net version.o: version.c $(CC) -c -DCONTACT=\"$(EMAIL)\" $(CFLAGS) $(INCLUDE) version.c # convert gnuplot.doc to gnuplot.gih $(HELPDEST)/$(HELPFILE): doc2gih.exe $(D)gnuplot.doc ./doc2gih.exe $(D)gnuplot.doc > $@ doc2gih.exe: $(D)doc2gih.c $(D)termdoc.c $(CSOURCES) $(CC) $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -I$(T) -o $@ $(D)doc2gih.c $(D)termdoc.c # now for the demo bin $(M)binary?: bf_test.exe ./bf_test.exe copy binary? ..\demo del binary? bf_test.o: $(CC) $(CFLAGS) -c bf_test.c bf_test.exe: bf_test.o binary.o alloc.o $(CC) $(CFLAGS) bf_test.o binary.o alloc.o -lm -o $@ # now install things and create a .bat file to make things easier install: all copy $(EXENAME).exe $(FINALDEST) copy $(HELPDEST)\$(HELPFILE) $(FINALDEST) #HBB: if at all, this batch-file should only be generated by a #separate target, like 'install-bat'. Besides, it doesn't work, #as is, because DOS always executes foo.exe before even looking for #a foo.bat # del $(EXENAME).bat # echo @echo off > $(EXENAME).bat # echo SET GNUHELP= $(FINALDEST)\$(HELPFILE) >> $(EXENAME).bat # echo SET GNUPLOT= $(FINALDEST) >> $(EXENAME).bat # echo $(FINALDEST)\$(EXENAME).exe %1 %2 %3 %4 %5 %6 >> $(EXENAME).bat # echo SET GNUHELP= >> $(EXENAME).bat # echo SET GNUPLOT= >> $(EXENAME).bat # copy $(EXENAME).bat $(FINALDEST) # clean target - remove all temp files, but leave executable intact clean: del *.o rem del config.h del $(EXENAME) del doc2gih del doc2gih.exe del bf_test del bf_test.exe # realclean target - remove all files created by the makefile realclean: clean del $(EXENAME).exe del $(HELPDEST)\$(HELPFILE) del ..\demo\binary1 del ..\demo\binary2 del ..\demo\binary3 del ..\demo\fit.log del ..\demo\soundfit.par ##### ## END OF GNUPLOT MAKEFILE FOR DJGPP V2 ##### ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/config.dj2���������������������������������������������������������������������0000644�0004711�0000144�00000034727�11670437273�013273� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* config.h for makefile.dj2 * * Prepared according to config.h from ./configure and by means of * config_strip.sh as of gnuplot 4.3 in February 2008. */ /* Define to allow use of deprecated syntax and terminal behaviour. */ #define BACKWARDS_COMPATIBLE 1 /* Define if you want to support files in binary format. */ #define BINARY_DATA_FILE 1 /* Define if you want to use the CGI terminal under SCO. */ /* #undef CGI */ /* Define if you want online help and subtopic tables sorted by column. */ /* #undef COLUMN_HELP */ /* Define if you want to use libgrx20 with MSDOS/djgpp. */ #define DJSVGA 1 /* Define if this system uses a 32-bit DOS extender (djgpp/emx). */ #define DOS32 1 /* Define to allow placement of rectangles and other objects */ #define EAM_OBJECTS 1 /* Define if color information should be passed for each vertex. */ /* #undef EXTENDED_COLOR_SPECS */ /* Define if you want to supply pre-existing X11 windows. */ /* #undef EXTERNAL_X11_WINDOW */ /* Define if <errno.h> declares errno. */ #define EXTERN_ERRNO 1 /* Define if libgd supports animated gifs. */ /* #undef GIF_ANIMATION */ /* Don't change it here -- this define is set in config/makefile.dj2. */ /* Define if you want to use a gnuplot history file. */ #define GNUPLOT_HISTORY 1 /* Define to allow command line macros. EXPERIMENTAL */ #define GP_MACROS 1 /* Define if you want to use a newer version of libgrx under MSDOS/djgpp. */ #define GRX21 1 /* Define to 1 if you have the <3dkit.h> header file. */ /* #undef HAVE_3DKIT_H */ /* Define to 1 if you have the `atexit' function. */ #define HAVE_ATEXIT 1 /* Define to 1 if you have the `bcopy' function. */ #define HAVE_BCOPY 1 /* Define to 1 if you have the `bzero' function. */ #define HAVE_BZERO 1 /* Define if you want the cairo-based terminals. */ /* #undef HAVE_CAIROPDF */ /* Define to 1 if you have the declaration of `signgam', and to 0 if you don't. */ /* #undef HAVE_DECL_SIGNGAM */ /* Define to 1 if you have the <dirent.h> header file. */ #define HAVE_DIRENT_H 1 /* Define to 1 if you have the `doprnt' function. */ #define HAVE_DOPRNT 1 /* Define to 1 if you have the `erf' function. */ #if __GNUC__ >= 3 # define HAVE_ERF 1 #endif /* Define to 1 if you have the `erfc' function. */ #if __GNUC__ >= 3 # define HAVE_ERFC 1 #endif /* Define to 1 if you have the <errno.h> header file. */ #define HAVE_ERRNO_H 1 /* Define to 1 if you have the <float.h> header file. */ #define HAVE_FLOAT_H 1 /* Define to 1 if you have the `fork' function. */ /* #undef HAVE_FORK */ /* Define to 1 if you have the `gamma' function. */ #define HAVE_GAMMA 1 /* Define if libgd supports gif. */ /* #undef HAVE_GD_GIF */ /* Don't change it here -- this define is set in config/makefile.dj2. */ /* Define to 1 if you have the <gd.h> header file. */ /* #undef HAVE_GD_H */ /* Don't change it here -- this define is set in config/makefile.dj2. */ /* Define if libgd supports jpeg. */ /* #undef HAVE_GD_JPEG */ /* Don't change it here -- this define is set in config/makefile.dj2. */ /* Define if libgd supports png. */ /* #undef HAVE_GD_PNG */ /* Don't change it here -- this define is set in config/makefile.dj2. */ /* Define if libgd supports TrueType fonts through libfreetype. */ /* #undef HAVE_GD_TTF */ /* Don't change it here -- this define is set in config/makefile.dj2. */ /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 /* Define to 1 if you have the <ggi/wmh.h> header file. */ /* #undef HAVE_GGI_WMH_H */ /* Define to 1 if you have the <ggi/xmi.h> header file. */ /* #undef HAVE_GGI_XMI_H */ /* Define to use gtk/gdk tweaks */ /* #undef HAVE_GTK */ /* Define to use gtk+ functions to handle cairo */ /* #undef HAVE_GTK28 */ /* Define to 1 if you have the `index' function. */ #define HAVE_INDEX 1 /* Define to 1 if you have the <inttypes.h> header file. */ #if __GNUC__ >= 3 # define HAVE_INTTYPES_H 1 #endif /* Define to 1 if you have the `isnan' function. */ /* #undef HAVE_ISNAN */ /* Define if you use have kpsexpand (TeX). */ /* #undef HAVE_KPSEXPAND */ /* Define to 1 if you have the `lgamma' function. */ #define HAVE_LGAMMA 1 /* Define to 1 if you're using the aquaterm library on Mac OS X */ /* #undef HAVE_LIBAQUATERM */ /* Define to 1 if you have the <libc.h> header file. */ /* #undef HAVE_LIBC_H */ /* Define if you have gd library. */ /* #undef HAVE_LIBGD */ /* Don't change it here -- this define is set in config/makefile.dj2. */ /* Define to 1 if you have the `m' library (-lm). */ /* #undef HAVE_LIBM */ /* Define to 1 if you have the `pdf' library (-lpdf). */ /* #undef HAVE_LIBPDF */ /* Don't change it here -- this define is set in config/makefile.dj2. */ /* Define if your pdf library is too old to use PDF_begin_document. */ /* #undef HAVE_LIBPDF_OPEN_FILE */ /* Define if you are using the GNU readline library. */ /* #undef HAVE_LIBREADLINE */ /* Don't change it here -- this define is set in config/makefile.dj2. */ /* Define if you have zlib. */ /* #undef HAVE_LIBZ */ /* Don't change it here -- this define is set in config/makefile.dj2. */ /* Define to 1 if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the <locale.h> header file. */ #define HAVE_LOCALE_H 1 /* Define to 1 if you have the <malloc.h> header file. */ #define HAVE_MALLOC_H 1 /* Define to 1 if you have the <math.h> header file. */ #define HAVE_MATH_H 1 /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define if your pdf library doesn't support dash patterns. */ /* #undef HAVE_NODASH_LIBPDF */ /* Define if your pdf library is too old to support patterns. */ /* #undef HAVE_OLD_LIBPDF */ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ /* Define to 1 if you have the `pclose' function. */ #define HAVE_PCLOSE 1 /* Define to 1 if you have the <pdflib.h> header file. */ /* #undef HAVE_PDFLIB_H */ /* Define to 1 if you have the `poll' function. */ /* #undef HAVE_POLL */ /* Define to 1 if you have the <poll.h> header file. */ #define HAVE_POLL_H 1 /* Define to 1 if you have the `popen' function. */ #define HAVE_POPEN 1 /* Define to 1 if you have the <readline/history.h> header file. */ /* #undef HAVE_READLINE_HISTORY_H */ /* Define to 1 if you have the <readline/readline.h> header file. */ /* #undef HAVE_READLINE_READLINE_H */ /* Define to 1 if you have the <readline/tilde.h> header file. */ /* #undef HAVE_READLINE_TILDE_H */ /* Define to 1 if you have the `rindex' function. */ #define HAVE_RINDEX 1 /* Define to 1 if you have the `select' function. */ #define HAVE_SELECT 1 /* Define to 1 if you have the `setvbuf' function. */ #define HAVE_SETVBUF 1 /* Define to 1 if you have the <sgtty.h> header file. */ /* #undef HAVE_SGTTY_H */ /* Define if we have sigsetjmp(). */ #define HAVE_SIGSETJMP 1 /* Define to 1 if you have the `sleep' function. */ #define HAVE_SLEEP 1 /* Define to 1 if you have the `snprintf' function. */ /* #undef HAVE_SNPRINTF */ /* Define to 1 if stdbool.h conforms to C99. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the <stdint.h> header file. */ #if __GNUC__ >= 3 # define HAVE_STDINT_H 1 #endif /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `stpcpy' function. */ #define HAVE_STPCPY 1 /* Define to 1 if you have the `strcasecmp' function. */ #define HAVE_STRCASECMP 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strcspn' function. */ #define HAVE_STRCSPN 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* Define to 1 if you have the `stricmp' function. */ #define HAVE_STRICMP 1 /* Define to 1 if cpp supports the ANSI # stringizing operator. */ #define HAVE_STRINGIZE 1 /* Define to 1 if you have the <strings.h> header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strnicmp' function. */ #define HAVE_STRNICMP 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define if math.h declares struct exception for matherr(). */ #define HAVE_STRUCT_EXCEPTION_IN_MATH_H 1 /* Define to 1 if you have the `sysinfo' function. */ /* #undef HAVE_SYSINFO */ /* Define to 1 if you have the <sys/bsdtypes.h> header file. */ /* #undef HAVE_SYS_BSDTYPES_H */ /* Define to 1 if you have the <sys/ioctl.h> header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the <sys/param.h> header file. */ #if __GNUC__ >= 3 # define HAVE_SYS_PARAM_H 1 #endif /* Define to 1 if you have the <sys/select.h> header file. */ /* #undef HAVE_SYS_SELECT_H */ /* Define to 1 if you have the <sys/socket.h> header file. */ /* #undef HAVE_SYS_SOCKET_H */ /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/systeminfo.h> header file. */ /* #undef HAVE_SYS_SYSTEMINFO_H */ /* Define to 1 if you have the <sys/timeb.h> header file. */ #define HAVE_SYS_TIMEB_H 1 /* Define to 1 if you have the <sys/time.h> header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <sys/utsname.h> header file. */ #define HAVE_SYS_UTSNAME_H 1 /* Define to 1 if you have the `tcgetattr' function. */ #define HAVE_TCGETATTR 1 /* Define to 1 if you have the <termios.h> header file. */ #define HAVE_TERMIOS_H 1 /* Define to 1 if you have the <time.h> header file. */ #define HAVE_TIME_H 1 /* Define if time_t is declared in time.h. */ #define HAVE_TIME_T_IN_TIME_H 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `usleep' function. */ #define HAVE_USLEEP 1 /* Define to 1 if you have the <values.h> header file. */ #define HAVE_VALUES_H 1 /* Define to 1 if you have the `vfork' function. */ /* #undef HAVE_VFORK */ /* Define to 1 if you have the <vfork.h> header file. */ /* #undef HAVE_VFORK_H */ /* Define to 1 if you have the `vfprintf' function. */ /* #undef HAVE_VFPRINTF */ /* Comment: djgpp has vprintf(), but gnuplot uses vsnprintf(). */ /* Define to 1 if you have the <vgagl.h> header file. */ /* #undef HAVE_VGAGL_H */ /* Define to 1 if `fork' works. */ /* #undef HAVE_WORKING_FORK */ /* Define to 1 if `vfork' works. */ /* #undef HAVE_WORKING_VFORK */ /* Define to 1 if the system has the type `_Bool'. */ /* #undef HAVE__BOOL */ /* Define to enable gridbox optimization in hidden3d code. */ /* #undef HIDDEN3D_GRIDBOX */ /* Define to enable quadtree optimization in hidden3d code. */ /* #undef HIDDEN3D_QUADTREE */ /* Define to enable handling point size in hidden3d code. */ #define HIDDEN3D_VAR_PTSIZE 1 /* Define if this is a Linux system with SuperVGA library. */ /* #undef LINUXVGA */ /* Define if this is an MSDOS system. */ #define MSDOS 1 /* Define if you want to read .gnuplot from current directory (SECURITY RISK!). */ /* #undef USE_CWDRC */ /* Name of package */ /* #undef PACKAGE */ /* Define to the address where bug reports for this package should be sent. */ /* #undef PACKAGE_BUGREPORT */ /* Define to the full name of this package. */ /* #undef PACKAGE_NAME */ /* Define to the full name and version of this package. */ /* #undef PACKAGE_STRING */ /* Define to the one symbol short name of this package. */ /* #undef PACKAGE_TARNAME */ /* Define to the version of this package. */ /* #undef PACKAGE_VERSION */ /* Define if you do have the popen and pclose functions. */ #define PIPES 1 /* Unix-type of Interprocess Communication is required for mouse support. */ /* #undef PIPE_IPC */ /* Define to 1 if the C compiler supports function prototypes. */ #define PROTOTYPES 1 /* Define if you want to use the included readline function. */ #define READLINE 1 /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void /* Define to the type of arg 1 for `select'. */ #define SELECT_TYPE_ARG1 int /* Define to the type of args 2, 3 and 4 for `select'. */ #define SELECT_TYPE_ARG234 (struct fd_set *) /* Define to the type of arg 5 for `select'. */ #define SELECT_TYPE_ARG5 (struct timeval *) /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */ /* #undef STAT_MACROS_BROKEN */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if you want to use the sunview terminal (sun). */ /* #undef SUN */ /* Define to use thin plate spines. */ /* #undef THIN_PLATE_SPLINES_GRID */ /* Define if the 3dkit libray is present. */ /* #undef THREEDKIT */ /* Define if you want to use the experimental ggi driver. */ /* #undef USE_GGI_DRIVER */ /* Define if you want to have mouse support in interactive terminals. */ /* #undef USE_MOUSE */ /* Define to enable multi-byte font support for x11 */ /* #undef USE_X11_MULTIBYTE */ /* Version number of package */ /* #undef VERSION */ /* Define if the vgagl libray is present. */ /* #undef VGAGL */ /* Define to allow zooming or refresh of volatile data. EXPERIMENTAL */ #define VOLATILE_REFRESH 1 /* Define if you want the wxwidgets terminal. */ /* #undef WXWIDGETS */ /* Define if you are using the X11 window system. */ /* #undef X11 */ /* Define to 1 if the X Window System is missing or not being used. */ #define X_DISPLAY_MISSING 1 /* Define like PROTOTYPES; this can be used by system headers. */ /* #undef __PROTOTYPES */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* libgd versions < 1.8.4 need gdImageStringTTF rather than gdImageStringFT */ /* #undef gdImageStringFT */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ /* #undef inline */ /* Define to `int' if <sys/types.h> does not define. */ /* #undef pid_t */ /* Define to `unsigned' if <sys/types.h> does not define. */ /* #undef size_t */ /* Define as `fork' if `vfork' does not work. */ /* #undef vfork */ /* * ================================================== * Stuff not provided by config.hin (aka ./configure) * ================================================== */ #define GP_INLINE inline #define NEAR �����������������������������������������gnuplot-4.6.4/config/config.oww���������������������������������������������������������������������0000644�0004711�0000144�00000040500�11670437273�013412� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Config.h for watcom/Makefile * * Prepared according to config.h from ./configure and by means of * config_strip.sh as of gnuplot 4.5 in Mai 2011. */ /* Define to allow use of deprecated syntax and terminal behaviour. */ /* #undef BACKWARDS_COMPATIBLE */ /* Define if you want to use the CGI terminal under SCO. */ /* #undef CGI */ /* Define if you want online help and subtopic tables sorted by column. */ /* #undef COLUMN_HELP */ /* Define to treat spacebar like any other keystroke. */ /* #undef DISABLE_SPACE_RAISES_CONSOLE */ /* Contact address for modified and binary distributed gnuplot versions */ /* #undef DIST_CONTACT */ /* Define if you want to use libgrx20 with MSDOS/djgpp. */ /* #undef DJSVGA */ /* Define if this system uses a 32-bit DOS extender (djgpp/emx). */ /* #undef DOS32 */ /* Define to allow placement of rectangles and other objects */ #define EAM_OBJECTS 1 /* Define if color information should be passed for each vertex. */ /* #undef EXTENDED_COLOR_SPECS */ /* Define if you want to supply pre-existing X11 windows. */ /* #undef EXTERNAL_X11_WINDOW */ /* Define if <errno.h> declares errno. */ #define EXTERN_ERRNO 1 /* Define if libgd supports animated gifs. */ /* #undef GIF_ANIMATION */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Define if you want to use a gnuplot history file. */ #define GNUPLOT_HISTORY 1 /* Define to allow command line macros. */ #define GP_MACROS 1 /* Define if you want to use a newer version of libgrx under MSDOS/djgpp. */ /* #undef GRX21 */ /* Define to 1 if you have the <3dkit.h> header file. */ /* #undef HAVE_3DKIT_H */ /* Define to 1 if you have the `atexit' function. */ #define HAVE_ATEXIT 1 /* Define to 1 if you have the `bcopy' function. */ /* #undef HAVE_BCOPY */ /* Define to 1 if you have the `bzero' function. */ /* #undef HAVE_BZERO */ /* Define if you want the cairo-based terminals. */ /* #undef HAVE_CAIROPDF */ /* Define to 1 if you have the declaration of `signgam', and to 0 if you don't. */ #define HAVE_DECL_SIGNGAM 1 /* Define to 1 if you have the <dirent.h> header file. */ /* #undef HAVE_DIRENT_H */ /* Define to 1 if you have the `doprnt' function. */ /* #undef HAVE_DOPRNT */ /* Define to 1 if you have the <editline/readline.h> header file. */ /* #undef HAVE_EDITLINE_READLINE_H */ /* Define to 1 if you have the `erf' function. */ /* #undef HAVE_ERF */ /* Define to 1 if you have the `erfc' function. */ /* #undef HAVE_ERFC */ /* Define to 1 if you have the <errno.h> header file. */ #define HAVE_ERRNO_H 1 /* Define to 1 if you have the <float.h> header file. */ #define HAVE_FLOAT_H 1 /* Define to 1 if you have the `fork' function. */ /* #undef HAVE_FORK */ /* Define to 1 if you have the `gamma' function. */ /* #undef HAVE_GAMMA */ /* Define if libgd supports gif. */ /* #undef HAVE_GD_GIF */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Define to 1 if you have the <gd.h> header file. */ /* #undef HAVE_GD_H */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Define if libgd supports jpeg. */ /* #undef HAVE_GD_JPEG */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Define if libgd supports png. */ /* #undef HAVE_GD_PNG */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Define if libgd supports TrueType fonts through libfreetype. */ /* #undef HAVE_GD_TTF */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 /* Define to 1 if you have the <ggi/wmh.h> header file. */ /* #undef HAVE_GGI_WMH_H */ /* Define to 1 if you have the <ggi/xmi.h> header file. */ /* #undef HAVE_GGI_XMI_H */ /* Define to use gtk/gdk tweaks */ /* #undef HAVE_GTK */ /* Define to use gtk+ functions to handle cairo */ /* #undef HAVE_GTK28 */ /* Define to 1 if you have the `index' function. */ /* #undef HAVE_INDEX */ /* Define to 1 if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H 1 /* Define if you use have kpsexpand (TeX). */ /* #undef HAVE_KPSEXPAND */ /* Define to 1 if you have the `lgamma' function. */ /* #undef HAVE_LGAMMA */ /* Define to 1 if you're using the aquaterm library on Mac OS X */ /* #undef HAVE_LIBAQUATERM */ /* Define to 1 if you have the <libc.h> header file. */ /* #undef HAVE_LIBC_H */ /* Define if you are using the BSD editline library. */ /* #undef HAVE_LIBEDITLINE */ /* Define if you have gd library. */ /* #undef HAVE_LIBGD */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Define to 1 if you have the `m' library (-lm). */ /* #undef HAVE_LIBM */ /* Define to 1 if you have the `pdf' library (-lpdf). */ /* #undef HAVE_LIBPDF */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Define if your pdf library is too old to use PDF_begin_document. */ /* #undef HAVE_LIBPDF_OPEN_FILE */ /* Define if you are using the GNU readline library. */ /* #undef HAVE_LIBREADLINE */ /* Define if you have zlib. */ /* #undef HAVE_LIBZ */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Define to 1 if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the <locale.h> header file. */ #define HAVE_LOCALE_H 1 /* Define if you want the lua/TikZ terminal. */ /* #undef HAVE_LUA */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Define to 1 if you have the <lua.h> header file. */ /* #undef HAVE_LUA_H */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Define to 1 if you have the <malloc.h> header file. */ #define HAVE_MALLOC_H 1 /* Define to 1 if you have the <math.h> header file. */ #define HAVE_MATH_H 1 /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the <memory.h> header file. */ /* #undef HAVE_MEMORY_H */ /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define if your pdf library doesn't support dash patterns. */ /* #undef HAVE_NODASH_LIBPDF */ /* Define if your pdf library is too old to support patterns. */ /* #undef HAVE_OLD_LIBPDF */ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ /* Define to 1 if you have the `pclose' function. */ #define HAVE_PCLOSE 1 #define pclose _pclose /* Define to 1 if you have the <pdflib.h> header file. */ /* #undef HAVE_PDFLIB_H */ /* Define to 1 if you have the `poll' function. */ /* #undef HAVE_POLL */ /* Define to 1 if you have the <poll.h> header file. */ #define HAVE_POLL_H 1 /* Define to 1 if you have the `popen' function. */ #define HAVE_POPEN 1 /* Define to 1 if you have the <readline/history.h> header file. */ /* #undef HAVE_READLINE_HISTORY_H */ /* Define to 1 if you have the <readline/readline.h> header file. */ /* #undef HAVE_READLINE_READLINE_H */ /* Define if your libreadline has rl_reset_after_signal */ /* #undef HAVE_READLINE_RESET */ /* Define to 1 if you have the `rindex' function. */ /* #undef HAVE_RINDEX */ /* Define to 1 if you have the `select' function. */ /* #undef HAVE_SELECT */ /* Define to 1 if you have the `setvbuf' function. */ #define HAVE_SETVBUF 1 /* Define to 1 if you have the <sgtty.h> header file. */ /* #undef HAVE_SGTTY_H */ /* Define if we have sigsetjmp(). */ /* #undef HAVE_SIGSETJMP */ /* Define to 1 if you have the `sleep' function. */ #define HAVE_SLEEP 1 /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define to 1 if stdbool.h conforms to C99. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `stpcpy' function. */ /* #undef HAVE_STPCPY */ /* Define to 1 if you have the `strcasecmp' function. */ #define HAVE_STRCASECMP 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strcspn' function. */ #define HAVE_STRCSPN 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* Define to 1 if you have the `stricmp' function. */ #define HAVE_STRICMP 1 /* Define to 1 if cpp supports the ANSI # stringizing operator. */ #define HAVE_STRINGIZE 1 /* Define to 1 if you have the <strings.h> header file. */ /* #undef HAVE_STRINGS_H */ /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strndup' function. */ /* #undef HAVE_STRNDUP */ /* Define to 1 if you have the `strnicmp' function. */ #define HAVE_STRNICMP 1 /* Define to 1 if you have the `strnlen' function. */ #define HAVE_STRNLEN 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define if math.h declares struct exception for matherr(). */ #define HAVE_STRUCT_EXCEPTION_IN_MATH_H 1 /* Define to 1 if you have the `sysinfo' function. */ /* #undef HAVE_SYSINFO */ /* Define to 1 if you have the <sys/bsdtypes.h> header file. */ /* #undef HAVE_SYS_BSDTYPES_H */ /* Define to 1 if you have the <sys/ioctl.h> header file. */ /* #undef HAVE_SYS_IOCTL_H */ /* Define to 1 if you have the <sys/param.h> header file. */ /* #undef HAVE_SYS_PARAM_H */ /* Define to 1 if you have the <sys/select.h> header file. */ #define HAVE_SYS_SELECT_H 1 /* Define to 1 if you have the <sys/socket.h> header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/systeminfo.h> header file. */ /* #undef HAVE_SYS_SYSTEMINFO_H */ /* Define to 1 if you have the <sys/timeb.h> header file. */ #define HAVE_SYS_TIMEB_H 1 /* Define to 1 if you have the <sys/time.h> header file. */ /* #undef HAVE_SYS_TIME_H */ /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <sys/utsname.h> header file. */ /* #undef HAVE_SYS_UTSNAME_H */ /* Define to 1 if you have the `tcgetattr' function. */ /* #undef HAVE_TCGETATTR */ /* Define to 1 if you have the <termios.h> header file. */ /* #undef HAVE_TERMIOS_H */ /* Define to 1 if you have the <time.h> header file. */ #define HAVE_TIME_H 1 /* Define if time_t is declared in time.h. */ #define HAVE_TIME_T_IN_TIME_H 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `usleep' function. */ /* #undef HAVE_USLEEP */ /* Define to 1 if you have the <values.h> header file. */ #define HAVE_VALUES_H 1 /* Define to 1 if you have the `vfork' function. */ /* #undef HAVE_VFORK */ /* Define to 1 if you have the <vfork.h> header file. */ /* #undef HAVE_VFORK_H */ /* Define to 1 if you have the `vfprintf' function. */ #define HAVE_VFPRINTF 1 /* Define to 1 if you have the <vgagl.h> header file. */ /* #undef HAVE_VGAGL_H */ /* Define to 1 if you have the <wchar.h> header file. */ #define HAVE_WCHAR_H 1 /* Define to 1 if you have the `wcwidth' function. */ /* #undef HAVE_WCWIDTH */ /* Define to 1 if `fork' works. */ /* #undef HAVE_WORKING_FORK */ /* Define to 1 if `vfork' works. */ /* #undef HAVE_WORKING_VFORK */ /* Define to 1 if the system has the type `_Bool'. */ #define HAVE__BOOL 1 /* Define to enable gridbox optimization in hidden3d code. */ /* #undef HIDDEN3D_GRIDBOX */ /* Define to enable quadtree optimization in hidden3d code. */ #define HIDDEN3D_QUADTREE 1 /* Define to enable handling point size in hidden3d code. */ #define HIDDEN3D_VAR_PTSIZE 1 /* Define if this is a Linux system with SuperVGA library. */ /* #undef LINUXVGA */ /* Define to 1 if malloc(0)==0 */ /* #undef MALLOC_ZERO_RETURNS_ZERO */ /* Define if your libreadline has no rl_ding */ /* #undef MISSING_RL_DING */ /* Define if your libreadline has no rl_force_update_display */ /* #undef MISSING_RL_FORCED_UPDATE_DISPLAY */ /* Define if your libreadline has no rl_complete_with_tilde_expansion */ /* #undef MISSING_RL_TILDE_EXPANSION */ /* Define if this is an MSDOS system. */ /* #undef MSDOS */ /* Define if you want to read .gnuplot from current directory (SECURITY RISK!). */ /* #undef USE_CWDRC */ /* Define to disable terminals that depend on code in bitmap.c */ /* #undef NO_BITMAP_SUPPORT */ /* Name of package */ /* #undef PACKAGE */ /* Define to the address where bug reports for this package should be sent. */ /* #undef PACKAGE_BUGREPORT */ /* Define to the full name of this package. */ /* #undef PACKAGE_NAME */ /* Define to the full name and version of this package. */ /* #undef PACKAGE_STRING */ /* Define to the one symbol short name of this package. */ /* #undef PACKAGE_TARNAME */ /* Define to the version of this package. */ /* #undef PACKAGE_VERSION */ /* Define if you do have the popen and pclose functions. */ /* #undef PIPES */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Unix-type of Interprocess Communication is required for mouse support. */ /* #undef PIPE_IPC */ /* Define to 1 if the C compiler supports function prototypes. */ #define PROTOTYPES 1 /* Define if you want the Qt terminal. */ /* #undef QTTERM */ /* Define if you want to use the included readline function. */ #define READLINE 1 /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void /* Define to the type of arg 1 for `select'. */ /* #undef SELECT_TYPE_ARG1 */ /* Define to the type of args 2, 3 and 4 for `select'. */ /* #undef SELECT_TYPE_ARG234 */ /* Define to the type of arg 5 for `select'. */ /* #undef SELECT_TYPE_ARG5 */ /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */ #define STAT_MACROS_BROKEN 1 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if you want to use the sunview terminal (sun). */ /* #undef SUN */ /* Define to use thin plate spines. */ /* #undef THIN_PLATE_SPLINES_GRID */ /* Define if the 3dkit libray is present. */ /* #undef THREEDKIT */ /* Define if you want to use the experimental ggi driver. */ /* #undef USE_GGI_DRIVER */ /* Define if you want to have mouse support in interactive terminals. */ /* #undef USE_MOUSE */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Define to add support for generating a statistical summary of data */ #define USE_STATS 1 /* Define to enable multi-byte font support for x11 */ /* #undef USE_X11_MULTIBYTE */ /* Version number of package */ /* #undef VERSION */ /* Define if the vgagl libray is present. */ /* #undef VGAGL */ /* Define to allow zooming or refresh of volatile data. EXPERIMENTAL */ #define VOLATILE_REFRESH 1 /* Define if you want the wxwidgets terminal. */ /* #undef WXWIDGETS */ /* Don't change it here -- this define is set in config/watcom/Makefile. */ /* Define if you are using the X11 window system. */ /* #undef X11 */ /* Define to 1 if the X Window System is missing or not being used. */ /* #undef X_DISPLAY_MISSING */ /* Define like PROTOTYPES; this can be used by system headers. */ /* #undef __PROTOTYPES */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* libgd versions < 1.8.4 need gdImageStringTTF rather than gdImageStringFT */ /* #undef gdImageStringFT */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif /* Define to `int' if <sys/types.h> does not define. */ /* #undef pid_t */ /* Define to `unsigned' if <sys/types.h> does not define. */ /* #undef size_t */ /* Define as `fork' if `vfork' does not work. */ /* #undef vfork */ /* * ================================================== * Stuff not provided by config.hin (aka ./configure) * ================================================== */ #ifndef WIN32 # define WIN32 #endif /* Windows Interprocess Communication is required for mouse support. */ #ifdef USE_MOUSE # define WIN_IPC 1 #endif #define GP_INLINE _inline #define popen _popen #define strnlen strnlen_s /* gnuplot.gih is not used by wgnuplot */ #define NO_GIH 1 #ifdef WITH_HTML_HELP # define HELPFILE "wgnuplot.chm" #else # define HELPFILE "wgnuplot.hlp" #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/djconfig.sh��������������������������������������������������������������������0000755�0004711�0000144�00000002117�07200537256�013527� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # # This script configure GNUPLOT-3.7 for building with DJGPP # (You need bash and many other packages installed for that. # for novices it's recommended to use Makefile.dj2 instead) # # You need also libgd.a, libpng.a and libz.a installed with # corresponding include files (otherwise GIF and PNG terminals # support may not be available) # # After running this script simply type # make # to build GNUPLOT # Finally copy gnuplot.exe and docs/gnuplot.gih to one directory on # DOS path and enjoy (You can strip gnuplot.exe before) #------------------------------------------------------------------- # where are the sources? If you use (like I) to have the sources # in a separate directory and the objects in an other, then set # here the full path to the source directory and run this script # in the directory where you want to build gnuplot!! srcdir=.. # # give now the configure script some hints # export PATH_SEPARATOR=: export CC=gcc export LD=ld export ac_cv_path_install="ginstall -c" export CONFIG_SHELL=bash # $srcdir/configure --srcdir=$srcdir --without-x --with-gd --with-png �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/makefile.g���������������������������������������������������������������������0000644�0004711�0000144�00000007401�10720376530�013330� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: makefile.g,v 1.7 2007/11/19 21:17:12 sfeam Exp $ # # GNUPLOT Makefile for GRASS, a geographic information system. # # To compile, make modifications below (if necessary) then # % gmake4.1 # % MAKELINKS # # NOTE: this creates a binary called 'g.gnuplot' and is located in # $GISBASE/bin. # A help file is installed in $(GISBASE)/man/help/g.gnuplot # # GRASS driver written by: # James Darrell McCauley Department of Ag Engr, Purdue Univ # mccauley@ecn.purdue.edu West Lafayette, Indiana 47907-1146 # # Last modified: 05 Apr 1995 # # Modification History: # <15 Jun 1992> First version created with GNUPLOT 3.2 # <15 Feb 1993> Modified to work with frames # <16 Feb 1993> Added point types triangle (filled and unfilled), # inverted-triangle (filled and unfilled), # circle (filled and unfilled), and filled box. # Graph is no longer erased after g.gnuplot is finished. # <01 Mar 1993> Modified to work with 3.3b9 # <26 Jun 1993> Fixed up this file to automatically install the # binary and help. # <05 Apr 1995> Re-worked Gmakefile for version 3.6 # Cleaned up grass.trm, adding explicit function declarations, # so that it compiles cleanly with 'gcc -Wall' # <14 Apr 1995> adapted for new terminal layout, added font selection # ############################################################################# # # Change REGULAR_FLAGS to be those determined by 'configure' when # you compiled the plain (non-GRASS) version of gnuplot. # # the following is what I use for Solaris 2.3 REGULAR_FLAGS=-DREADLINE=1 -DNOCWDRC=1 -DPROTOTYPES=1 -DHAVE_STRINGIZE=1 \ -DX11=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMIOS_H=1 -DSTDC_HEADERS=1 \ -DRETSIGTYPE=void -DGAMMA=lgamma -DHAVE_GETCWD=1 -DHAVE_STRNCASECMP=1 \ -DXPG3_LOCALE=1 -DHAVE_SYS_SYSTEMINFO_H=1 -DHAVE_SYSINFO=1 \ -DHAVE_TCGETATTR=1 -I/opt/x11r5/include -g -O ################### Don't touch anything below this line ################### HELPDEST=$(GISBASE)/man/help/g.gnuplot # Where to send email about bugs and comments EMAIL="mccauley@ecn.purdue.edu\\n\tor grassp-list@moon.cecer.army.mil [info.grass.programmer]" # Where to ask questions about general usage HELPMAIL="grassu-list@moon.cecer.army.mil\\n\t[info.grass.user] or gnuplot-info@lists.sourceforge.net [comp.graphics.gnuplot]" # This causes grass.trm to be included in term.h GTERMFLAGS = -DGISBASE -I. -I./term EXTRA_CFLAGS=$(GTERMFLAGS) $(REGULAR_FLAGS) -DCONTACT=\"$(EMAIL)\" \ -DHELPMAIL=\"$(HELPMAIL)\" -DHELPFILE=\"$(HELPDEST)\" # List of object files (including version.o) OBJS = alloc.o binary.o bitmap.o command.o contour.o datafile.o dynarray.o \ eval.o fit.o graphics.o graph3d.o help.o hidden3d.o history.o \ internal.o interpol.o matrix.o misc.o parse.o plot.o plot2d.o \ plot3d.o readline.o save.o scanner.o set.o show.o specfun.o \ standard.o tabulate.o term.o time.o unset.o util.o util3d.o variable.o version.o all: $(BIN_MAIN_CMD)/g.gnuplot $(GISBASE)/man/help/g.gnuplot $(BIN_MAIN_CMD)/g.gnuplot: $(OBJS) $(DISPLAYLIB) $(RASTERLIB) $(GISLIB) #g.gnuplot: $(OBJS) $(DISPLAYLIB) $(RASTERLIB) $(GISLIB) $(CC) $(LDFLAGS) -o $@ $(OBJS) $(DISPLAYLIB) $(RASTERLIB) $(GISLIB) $(TERMLIB) $(MATHLIB) $(GISBASE)/man/help/g.gnuplot: /bin/cp docs/gnuplot.gih $(HELPDEST) ################################################################ # Dependencies term.o: term.h term.c $(OBJS): plot.h command.o: command.c fit.h command.o help.o misc.o: help.h command.o graphics.o graph3d.o misc.o plot.o set.o show.o term.o: setshow.h fit.o: fit.c fit.h matrix.h plot.h matrix.o: matrix.c matrix.h fit.h bitmap.o term.o: bitmap.h variable.o: variable.c plot.h variable.h ################################################################ $(RASTERLIB): # $(DISPLAYLIB): # $(GISLIB): # ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/watcom/������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340007�012661� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/watcom/config.h����������������������������������������������������������������0000644�0004711�0000144�00000000031�11501776656�014316� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include "../config.oww" �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/watcom/Makefile����������������������������������������������������������������0000644�0004711�0000144�00000021520�11552634624�014340� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Hello, emacs: this is a -*- Makefile -*- # $Id: Makefile,v 1.8 2011/04/17 19:03:48 broeker Exp $ # # GNUPLOT Makefile OpenWatcom 1.3 on Win32 # To compile: # Either, from ..\src: # wmake -f ..\config\makefile.oww # or copy this file to ..\src, edit it to your liking, then # from ..\src: # wmake -f makefile.oww # # History of this file: # 2004-02-23: Created by massive editing of makefile.nt (and config.nt) # 2004-04-25: Removed all remaining MS-isms (by peeking at how OW's # MS namesake replacement tools generate their command lines) # # enable exactly one of these: VARIANT = PLAIN #VARIANT = PIPES #VARIANT = CONSOLE TOP = ..\.. # activate one of these to choose which of the help file formats you want: # old-fashioned WinHelp ... # HELP_EXT=hlp # ... or HTML help HELP_EXT=chm # Programs: # The Microsoft Help compiler: HCW = "c:\program files\help workshop\hcw.exe" # ... and the HTML help compiler HHC_DIR = c:\Program Files\HTML Help Workshop HHC = "$(HHC_DIR)\hhc.exe" # OpenWatcom programs: WCL = wcl386 WCC = wcc386 WLD = wlink WRC = wrc # Speed up compilation a bit by running the compiler as a DLL from # inside wmake: !ifdef __LOADDLL__ ! loaddll wcc wccd ! loaddll wccaxp wccdaxp ! loaddll wcc386 wccd386 ! loaddll wpp wppdi86 ! loaddll wppaxp wppdaxp ! loaddll wpp386 wppd386 ! loaddll wlink wlinkd ! loaddll wlib wlibd !endif # Where to install the PostScript prologue files, relatively to the executable # wgnuplot.exe GNUPLOT_PS_DIR = share/PostScript # paths for external libs added here... LDLIBS = # Macros for makefile.all O=obj T=$(TOP)\term\ D=$(TOP)\docs\ M=$(TOP)\demo\ S=$(TOP)\src W=$(S)\win BINARYFILES=$(M)binary1 $(M)binary2 $(M)binary3 # compiler flags: # # Defines CPPFLAGS = -DHAVE_CONFIG_H -D_Windows -DHAVE_CONFIG_H -DUSE_MOUSE -DEAM_OBJECTS # library-dependent ones may have to be added, like: # -DHAVE_LIBPNG -DHAVE_LIBPDF HELPFILE = wgnuplot.$(HELP_EXT) DEFAULT_TARGETS = $(BINARYFILES) $(HELPFILE) TARGETS_PLAIN=wgnuplot.exe wgnuplot.mnu pgnuplot.exe EXTRA_CPPFLAGS_PLAIN = TARGETS_PIPES=wgnuplot_pipes.exe wgnuplot.mnu pgnuplot.exe EXTRA_CPPFLAGS_PIPES = -DPIPES=1 TARGETS_CONSOLE=gnuplot.exe EXTRA_CPPFLAGS_CONSOLE = -DPIPES=1 -DWGP_CONSOLE ALL_TARGETS = $(DEFAULT_TARGETS) $(TARGETS_PLAIN) $(TARGETS_PIPES) $(TARGETS_CONSOLE) DEFAULT_TARGETS += $(TARGETS_$(VARIANT)) !ifeq HELP_EXT chm CPPFLAGS += -DWITH_HTML_HELP LDLIBS += LIBRARY htmlhelp.lib !endif # compiler flags, determined from MS ones by OW's "cl /showwopts" # -c : don't link # -I : add directory to include search path # -zq : don't show a version banner message # -5r : P5-optimized, 386-compatible code, register calling convention # -zm : put each function in its own section to improve dead code elimination # -bm : target multi-threaded environment # -sg : grow the stack if needed # -zlf: store library usage in .obj files # -ei : force sizeof(enum) >= sizeof(int) # -o : optimization options: # r: reorder for pipelining # i: inline intrinsics # l: loop optimizations # t: optimize for speed # -j : char is signed # -aa : allow non-const initializers for locals # -d2 : debug information WCFLAGS = -zlf -ei -zq -I$(S);$(W) -zm -bm -5r -sg -orilt -j -aa -d2 $(CPPFLAGS) $(OPTS) # removed: -za99 # ...and here. # see other terminal defines in term.h TERMFLAGS = -DGNUPLOT_PS_DIR="$(GNUPLOT_PS_DIR)" -I$(T) # Note: like makefile.wc, this need the special Watcom-style version of # makefile.all, because line continuation in WMake is different... !INCLUDE $(S)\makefile.awc default: $(DEFAULT_TARGETS) .SYMBOLIC all: $(ALL_TARGETS) .SYMBOLIC WINOBJS = winmain.$(O) wgnuplib.$(O) wgraph.$(O) wprinter.$(O) wtext.$(O) & wpause.$(O) wmenu.$(O) gpexecute.$(O) screenbuf.$(O) OBJS = $(COREOBJS) version.$(O) $(WINOBJS) O=cobj CONSOLE_OBJS = $+ $(OBJS) $- O=pobj PIPE_OBJS = $+ $(OBJS) $- O=obj WIN_EXTRA_INPUTS = wgnuplot.res texticon.ico grpicon.ico # extensions: .EXTENSIONS: .EXTENSIONS: .exe .cobj .pobj .obj .asm .pas .c .cpp .for .c: $(S);$(W) # default rule .c.obj: .AUTODEPEND $(WCC) $(WCFLAGS) $[@ .c.cobj: .AUTODEPEND $(WCC) $(EXTRA_CPPFLAGS_CONSOLE) $(WCFLAGS) $[@ -fo=$^@ .c.pobj: .AUTODEPEND $(WCC) $(EXTRA_CPPFLAGS_PIPES) $(WCFLAGS) $[@ -fo=$^@ # file-specific rules wgnuplot.exe: $(OBJS) $(WIN_EXTRA_INPUTS) $(WLD) @<<linkopt1.oww $(LDLIBS) RUNTIME windows=4.0 SYSTEM nt_win DEBUG ALL OPTION quiet FILE { $(OBJS) } LIBRARY kernel32.lib,user32.lib,gdi32.lib,winspool.lib,comdlg32.lib LIBRARY comctl32.lib,advapi32.lib,shell32.lib LIBRARY msimg32.lib OPTION map OPTION SYMFILE NAME $^& OPTION stack=1M OPTION resource=wgnuplot.res OPTION ELIMINATE REFERENCE _wstart_ OPTION START=_wstart_ << wgnuplot_pipes.exe: $(PIPE_OBJS) $(WIN_EXTRA_INPUTS) $(WLD) @<<linkopt1.oww $(LDLIBS) RUNTIME windows=4.0 SYSTEM nt_win DEBUG ALL OPTION quiet FILE { $(PIPE_OBJS) } LIBRARY kernel32.lib,user32.lib,gdi32.lib,winspool.lib,comdlg32.lib LIBRARY advapi32.lib,shell32.lib LIBRARY msimg32.lib OPTION map OPTION SYMFILE NAME $^& OPTION stack=1M OPTION resource=wgnuplot.res OPTION ELIMINATE REFERENCE _wstart_ OPTION START=_wstart_ << gnuplot.exe: $(CONSOLE_OBJS) $(WIN_EXTRA_INPUTS) $(WLD) @<<linkopt1.oww $(LDLIBS) RUNTIME console=4.0 SYSTEM nt DEBUG ALL OPTION quiet FILE { $(CONSOLE_OBJS) } LIBRARY kernel32.lib,user32.lib,gdi32.lib,winspool.lib,comdlg32.lib LIBRARY advapi32.lib,shell32.lib LIBRARY msimg32.lib OPTION map OPTION SYMFILE NAME gnuplot.exe OPTION stack=1M OPTION resource=wgnuplot.res OPTION ELIMINATE #REFERENCE _wstart_ #OPTION START=_wstart_ <<keep # NOTE: Unknown what /l 0x409 does in MS RC call --- seems to work without, though wgnuplot.res : $(W)\wgnuplot.rc $(W)\wgnuplib.rc & $(W)\wresourc.h texticon.ico grpicon.ico $(WRC) -r -q -bt=nt -fowgnuplot.res -i=$(W) & -d_WIN32 -dNDEBUG -dWIN32 -dMSRC $(W)\wgnuplot.rc term.obj: $(S)\term.c $(CORETERM) .AUTODEPEND $(WCC) $(WCFLAGS) $(TERMFLAGS) $[@ term.cobj: $(S)\term.c $(CORETERM) .AUTODEPEND $(WCC) $(EXTRA_CPPFLAGS_CONSOLE) $(WCFLAGS) $(TERMFLAGS) $[@ -fo=$^@ term.pobj: $(S)\term.c $(CORETERM) .AUTODEPEND $(WCC) $(EXTRA_CPPFLAGS_PIPES) $(WCFLAGS) $(TERMFLAGS) $[@ -fo=$^@ wgnuplot.mnu: $(W)\wgnuplot.mnu copy $(W)\wgnuplot.mnu wgnuplot.mnu pgnuplot.exe: $(W)\pgnuplot.c version.$(O) .AUTODEPEND $(WCL) -5r -zq -d2 -fm $(W)\pgnuplot.c -fe=pgnuplot.exe -I$(S) & version.$(O) user32.lib # extract icons from wgnuplot.rc texticon.ico: geticon.exe $(W)\wgnuplot.rc geticon $(W)\wgnuplot.rc grpicon.ico: geticon.exe $(W)\wgnuplot.rc geticon $(W)\wgnuplot.rc geticon.exe: $(W)\geticon.c $(WCL) -bcl=nt -fd -fe=geticon.exe $[@ # convert gnuplot.doc to gnuplot.rtf wgnuplot.hlp: doc2rtf.exe $(D)gnuplot.doc $(W)\wgnuplot.hpj doc2rtf $(D)gnuplot.doc $(W)\gnuplot.rtf $(HCW) /c /e $(W)\wgnuplot.hpj if exist $(W)\wgnuplot.hlp copy $(W)\wgnuplot.hlp . doc2rtf.exe: $(D)doc2rtf.c $(D)termdoc.c $(D)xref.c .AUTODEPEND $(WCL) $(WCFLAGS) -w1 -DWINDOWS_NO_GUI -I$(D);$(T) -fe$^@ $(D)doc2rtf.c $(D)termdoc.c $(D)xref.c WD=$(D)windows\ HHP_PROJ=$(WD)wgnuplot.hhp HHP_CONTENT=$(WD)wgnuplot.hhc HHP_INPUT=$(WD)wgnuplot.html HHP_OUTPUT=$(WD)wgnuplot.chm wgnuplot.chm: $(HHP_OUTPUT) copy $(HHP_OUTPUT) . $(HHP_OUTPUT): $(HHP_PROJ) $(HHP_INPUT) $(HHP_CONTENT) -$(HHC) $(HHP_PROJ) $(HHP_INPUT) $(HHP_CONTENT): doc2html.exe $(D)gnuplot.doc doc2html $(D)gnuplot.doc $(WD) doc2html.exe: $(WD)doc2html.c $(D)termdoc.c $(D)xref.c version.$(O) .AUTODEPEND $(WCL) $(WCFLAGS) -w1 -DWINDOWS_NO_GUI -I$(D);$(T) -fe$^@ $(WD)doc2html.c $(D)termdoc.c $(D)xref.c version.$(O) gnuplot.gih: doc2gih.exe $(D)gnuplot.doc doc2gih $(D)gnuplot.doc $^@ doc2gih.exe: $(D)doc2gih.c $(D)termdoc.c $(D)xref.c .AUTODEPEND $(WCL) $(EXTRA_CPPFLAGS_CONSOLE) $(WCFLAGS) -w1 -I$(D);$(T) -fe$^@ $(D)doc2gih.c $(D)termdoc.c $(D)xref.c #make binary demo files bf_test.exe : bf_test.c dbinary.$(O) alloc.$(O) .AUTODEPEND $(WCL) $(WCFLAGS) -w1 -DWINDOWS_NO_GUI -fe$^@ $(S)\bf_test.c dbinary.$(O) alloc.$(O) $(BINARYFILES): bf_test.exe .\bf_test move binary? $(M). # _Windows causes wtext.h to define fread() etc dbinary.$(O): $(S)\binary.c $(WCC) $(WCFLAGS) /U_Windows -w1 -fodbinary.$(O) $[@ # clean up temporary files clean: .SYMBOLIC rm -f *.obj *.cobj *.pobj *.err *.ico rm -f wgnuplot.res $(W)\gnuplot.rtf $(W)\wgnuplot.hlp rm -f bf_test.exe linkopt1.oww doc2rtf.exe doc2html.exe geticon.exe rm -f doc2gih.exe gnuplot.gih rm -f *.map *.sym wgnuplot.gid realclean: clean .SYMBOLIC rm -f wgnuplot.exe wgnuplot.mnu pgnuplot.exe gnuplot.exe wgnuplot_pipes.exe rm -f $(HHP_CONTENT) $(HHP_INPUT) $(HHP_OUTPUT) $(WD)wgnuplot.log rm -f wgnuplot.hlp wgnuplot.chm wgnuplot.chw rm -f $(D)binary[123] $(D)fit.log $(D)soundfit.par ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/makefile.os2�������������������������������������������������������������������0000644�0004711�0000144�00000035541�11724576644�013630� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: makefile.os2,v 1.53.2.1 2012/03/03 15:31:52 mikulik Exp $ # # GNUPLOT Makefile for use on OS/2 2.x (and above) # using emx 0.9 (and above) and GNU make # # To compile gnuplot, run the following command in directory gnuplot\src: # make -f ..\config\makefile.os2 # # The following tools and libraries are recommended/required to use this # makefile out of the box: # - GNU make, e.g. http://hobbes.nmsu.edu/pub/os2/dev/util/make-3.81beta3-r2-bin.zip # - IPFC included in the OS/2 developer kit # - emtex is only required for some parts of the documentation # # - GD library, http://hobbes.nmsu.edu/pub/os2/util/gd-2-0-33.zip # - GNU readline, http://os2ports.com/ftp/pub/os2/unix/devtools/readline/readline4.1-os2.zip # - PDFlib Lite 6.0 or later compiled for emx (available as source from http://www.pdflib.com/ ) # - XFree86 libraries, ftp://ftp.netlabs.org/pub/xfree86/4.5.0 # We depend on using cmd.exe (or a compatible one) and the # standard OS/2 tool set. (additionally we use 'cat') SHELL=cmd.exe # # ***************** Begin of Configuration section *************************** # # # Comment out the definition lines to disable the according features: # # X11 driver # requires installed XFree86 X11=1 # GIF, PNG, JPEG device drivers # Requires gd library (not part of gnuplot) # # You can use the following set of options for GD library v2.0 something # or newer. This library writes PNG, JPEG and GIF images. # If libgd has been compiled with TrueType font support, then you can use # scaled TrueType fonts in PNG images. If not, then uncomment FREETYPE. # The pre-compiled GD library by Ilya Zakharevich available at # http://hobbes.nmsu.edu/pub/os2/util/gd-2-0-33.zip # is strongly recommended. This packages already includes the required # GD, JPEG and Z and freetype libraries. GD=1 PNG=1 GIF=1 JPEG=1 FREETYPE=1 # PDF device driver # requires PDFlib (not part of gnuplot) PDF=1 # VESAkit support # requires SVGA- and VESA Kit (not part of gnuplot) # VESA=1 # GNU_ReadLine support # requires GNU readline library (static or DLL; not part of gnuplot) # GNU_RL=1 # saving of history (no longer requires GNU readline) HISTORY=1 # DEBUGging support # creates binaries suitable for debugging. Some bugs may come and go # as opposed to a production build since we lower the optimization level # DEBUG=1 # MOUSE support for PM and X11 terminals MOUSE=1 # # ****************** End of Configuration section **************************** # # # Miscellaneous setup # .PHONY: all runtime alldocs demo binaries infomin clean veryclean .SUFFIXES: .c .trm .o .obj .exe .rc .res .dll # A reasonable default default: runtime # A basic help screen help: @echo " Usage: $(MAKE) -f makefile.os2 target" @echo " where target is one of:" @echo " all runtime alldocs demo binaries infomin help clean veryclean" # # Definitions of flags and symbols used by makefile.all and makefile.os2 # # these definitions are used by makefile.all T=../term/ D=../docs/ L=$(D)latextut/ M=../demo/ # # Definitions valid for all targets on OS/2 # OS2DIR = os2 DOCDIR = ..\docs DEMODIR = ..\demo TERMDIR = ..\term # where to place gnuplot.gih helpfile HELPFILE = $(DOCDIR)\gnuplot.gih # Where to install the PostScript prologue files, relatively to the executable # gnuplot.exe GNUPLOT_PS_DIR = share/PostScript # Similarly for javascript files for the canvas terminal: GNUPLOT_JS_DIR = share/js # Similarly for scripts used by the lua terminal GNUPLOT_LUA_DIR = share/lua # # 3 sets of variables are defined and used to create # 1: gnuplot.exe, and utilities # 2: gnupmdrv.exe (the PM-driver executable) # CC = gcc CC2 = gcc O = o O2 = obj # Flags for compiler and linker under OS/2 OS2FLAGS = -DOS2 # Flags for compiling with EMX/GCC # Special note: -ffloat-store is necessary to avoid some strange behaviour # of this code: # reset; set key; set xlabel "Year"; set xdata time; set timefmt "%y%m%d" # set format x "%y"; set xrange ["900621" : "950126"]; # plot '-' using 1:2 title 'Fitted IO' with lines 1 # 900621 20 # 950126 55 # e # Confirmed for gcc 2.7.x/2.8.x; graphics.c used to be the culprit, but as # of today (20010918) it isn't any more ... # EMXSPECIFIC = -DHAVE_CONFIG_H -ffloat-store LIBS = # # Choose flags suitable for a debugging or for a production build # ifdef DEBUG CFLAGS = -g $(OS2FLAGS) $(EMXSPECIFIC) -Wall -Wno-comment -O0 -Zmt LDFLAGS = -g -Zmt -Zcrtdll -Zbsd-signals CFLAGS2 = -g $(OS2FLAGS) $(EMXSPECIFIC) -Wall -O0 -Zmt -Zomf LDFLAGS2 = -g -Zmt -Zcrtdll -Zbsd-signals -Zomf else CFLAGS = $(OS2FLAGS) $(EMXSPECIFIC) -O4 -mpentium -Wall -Wno-unused -Wno-comment -Zmt LDFLAGS = -s -Zmt -Zcrtdll -Zbsd-signals CFLAGS2 = $(OS2FLAGS) $(EMXSPECIFIC) -O4 -mpentium -Wall -Wno-unused -Zmt -Zomf LDFLAGS2 = -s -Zmt -Zcrtdll -Zbsd-signals -Zomf endif # # Settings for the terminals to be included # TERMFLAGS = -DGNUPLOT_PS_DIR=\"$(GNUPLOT_PS_DIR)\" -DGNUPLOT_JS_DIR=\"$(GNUPLOT_JS_DIR)\" TERMFLAGS += -DGNUPLOT_LUA_DIR=\"$(GNUPLOT_LUA_DIR)\" -I. -I.. -I$(T) ifdef GD CFLAGS += -DHAVE_LIBGD -DHAVE_GD_H TERMLIBS += -lgd ifdef FREETYPE CFLAGS += -DHAVE_GD_TTF endif ifdef PNG CFLAGS += -DHAVE_GD_PNG endif ifdef GIF CFLAGS += -DHAVE_GD_GIF -DGIF_ANIMATION endif ifdef JPEG CFLAGS += -DHAVE_GD_JPEG endif endif ifdef PDF TERMFLAGS += -DHAVE_LIBPDF -DHAVE_PDFLIB_H TERMLIBS += -lpdflib endif # SVGA-/VESAkit support ifdef VESA TERMFLAGS += -DEMXVESA TERMLIBS += -ljmgraph -lvesa endif # X11 support ifdef X11 TERMFLAGS += -DX11 -DX11_DRIVER_DIR=\".\" endif # MOUSE support ifdef MOUSE TERMFLAGS += -DUSE_MOUSE # the interprocess communication flag OS2_IPC is #defined in config.(os2,h) endif # GNU readline support ifdef GNU_RL CFLAGS += -DHAVE_LIBREADLINE LIBS += -lreadline -ltermcap endif # saving history (independent of GNU readline) ifdef HISTORY CFLAGS += -DGNUPLOT_HISTORY endif # TOOLS CPP = cpp # Do not name this variable "IPFC"!! This won't work out... IPF_C = ipfc.exe # Tools for buildings the docs DVIPS = dvips LATEX = latex PDFLATEX = vlatex PLAINTEX = tex # # Default Rules # .c.$(O): $(CC) $(CFLAGS) $(TERMFLAGS) -o $*.$(O) -c $*.c .c.obj: $(CC2) $(CFLAGS2) $(TERMFLAGS) -o $*.obj -c $*.c # # Include dependencies valid for all platforms from makefile.all # include makefile.all # # Pre-defined sets of targets: # all: runtime demo alldocs: $(DOCDIR)\gnuplot.gih $(DOCDIR)\gnuplot.inf $(DOCDIR)\gnuplot.html \ $(DOCDIR)\gnuplot.info $(DOCDIR)\gnuplot.ps \ $(DOCDIR)\gnuplot.pdf runtime: config.h binaries infomin $(DOCDIR)\gnuplot.inf infomin: gnupmdrv.hlp $(DOCDIR)\gnuplot.gih demo: $(M)binary1 $(M)binary2 $(M)binary3 ifdef X11 binaries: gnuplot.exe gnupmdrv.exe gnuplot_x11.exe else binaries: gnuplot.exe gnupmdrv.exe endif OBJS = $(COREOBJS) version.$(O) $(OBJS): config.h term.$(O): $(CORETERM) term.h config.h $(OS2DIR)\pm_msgs.h gnuplot.exe: $(OBJS) $(CC) $(LDFLAGS) -o $@ $(OBJS) $(TERMLIBS) $(LIBS) # # Build the PM outboard driver # $(OS2DIR)\gnupmdrv.$(O2): $(OS2DIR)\gnupmdrv.c $(OS2DIR)\gnupmdrv.h config.h $(OS2DIR)\gclient.$(O2): $(OS2DIR)\gclient.c $(OS2DIR)\gnupmdrv.h config.h $(OS2DIR)\pm_msgs.h mouse.h $(OS2DIR)\dialogs.$(O2): $(OS2DIR)\dialogs.c $(OS2DIR)\gnupmdrv.h config.h $(OS2DIR)\dialogs.h $(OS2DIR)\print.$(O2): $(OS2DIR)\print.c $(OS2DIR)\gnupmdrv.h config.h $(OS2DIR)\gpexecute.$(O2): gpexecute.c gpexecute.h $(OS2DIR)\gnupmdrv.res : $(OS2DIR)\gnupmdrv.rc $(OS2DIR)\gnuplot.ico $(OS2DIR)\dialogs.h cd $(OS2DIR) && rc -r gnupmdrv.rc & cd .. OS2OBJ = $(OS2DIR)\gnupmdrv.$(O2) $(OS2DIR)\gclient.$(O2) $(OS2DIR)\print.$(O2) \ $(OS2DIR)\dialogs.$(O2) gpexecute.$(O2) gnupmdrv.exe: $(OS2OBJ) $(OS2DIR)\gnupmdrv.res $(OS2DIR)\gnupmdrv.def $(CC2) $(LDFLAGS2) -o $@ $(OS2OBJ) $(OS2DIR)\gnupmdrv.res $(OS2DIR)\gnupmdrv.def gnupmdrv.hlp: $(OS2DIR)\gnupmdrv.ipf # Cannot use the command # $(IPF_C) $< $@ # because IPFC 2.1 does not support this syntax. Use instead: copy $< . && $(IPF_C) gnupmdrv.ipf && del gnupmdrv.ipf # # Build the X11 outboard driver # # X11 libraries X11LIBS = -L$(X11ROOT)/XFree86/lib -lX11 -lsocket -Zbsd-signals -Zcrtdll # X11 includes X11INCLUDES = -I$(X11ROOT)/XFree86/include X11FLAGS= -Zmt -D__UNIXOS2__ -DI_NEED_OS2_H ifdef MOUSE X11FLAGS += -DUSE_MOUSE endif gnuplot_x11.exe: gplt_x11.o gpexecute.o getcolor_x11.o version.o $(CC) $(LDFLAGS) $(X11FLAGS) $(EMXSPECIFIC) -o $@ -DGPLT_X11_MODE $^ $(X11LIBS) gplt_x11.o: gplt_x11.c mouse.h gpexecute.h config.h $(CC) $(CFLAGS) $(X11FLAGS) $(EMXSPECIFIC) $(X11INCLUDES) -c -o $@ $< getcolor_x11.o: getcolor.c $(CC) $(CFLAGS) $(X11FLAGS) $(EMXSPECIFIC) -DGPLT_X11_MODE -c -o $@ $< # # Create config.h # This file is preferable over having explicit gcc command longer than 10 lines: # gcc ... -DHAVE_ -DHAVE_ ... -DHAVE_ -DHAVE_ ... myfile.c # config.h: ..\config\config.os2 if exist $@ del $@ copy $< $@ # # Create documentation in various formats # # The idea behind the renaming business is that we may want to # use various LaTeX systems which may choke if they find existing # intermediate files from other systems. # Call LaTeX three times to get the toc right. $(DOCDIR)\gnuplot.dvi: $(DOCDIR)\gnuplot.tex copy $(DOCDIR)\gnuplot.tex $(DOCDIR)\gnuplot_2.tex cd $(DOCDIR) && $(LATEX) gnuplot_2.tex && $(LATEX) gnuplot_2.tex && $(LATEX) gnuplot_2.tex if exist $(DOCDIR)\gnuplot.dvi del $(DOCDIR)\gnuplot.dvi move $(DOCDIR)\gnuplot_2.dvi $(DOCDIR)\gnuplot.dvi del $(DOCDIR)\gnuplot_2.* $(DOCDIR)\gnuplot.ps: $(DOCDIR)\gnuplot.dvi $(DVIPS) -o $@ $(DOCDIR)\gnuplot.dvi $(DOCDIR)\gnuplot.pdf: $(DOCDIR)\gnuplot.tex copy $(DOCDIR)\gnuplot.tex $(DOCDIR)\gnuplot_3.tex copy $(DOCDIR)\..\VERSION $(DOCDIR) cd $(DOCDIR) && $(PDFLATEX) gnuplot_3.tex && $(PDFLATEX) gnuplot_3.tex && $(PDFLATEX) gnuplot_3.tex if exist $(DOCDIR)\gnuplot.pdf del $(DOCDIR)\gnuplot.pdf move $(DOCDIR)\gnuplot_3.pdf $(DOCDIR)\gnuplot.pdf del $(DOCDIR)\gnuplot_3.* $(DOCDIR)\gnuplot.tex: $(DOCDIR)\gnuplot.doc $(DOCDIR)\doc2tex.exe $(DOCDIR)\doc2tex.exe $(DOCDIR)\gnuplot.doc $@ $(DOCDIR)\gnuplot.inf: $(DOCDIR)\gnuplot.ipf # Cannot use the command # $(IPF_C) /INF $< $@ # because IPFC 2.1 does not support this syntax. Use instead: cd $(DOCDIR) && $(IPF_C) /INF gnuplot.ipf $(DOCDIR)\gnuplot.gih: $(DOCDIR)\gnuplot.doc $(DOCDIR)\doc2gih.exe $(DOCDIR)\doc2gih.exe $(DOCDIR)\gnuplot.doc $@ $(DOCDIR)\gnuplot.html: $(DOCDIR)\gnuplot.texi $(DOCDIR)\gnuplot.doc $(MAKEINFO) --html -I$(DOCDIR) $(DOCDIR)\gnuplot.texi --no-split --output=$@ $(DOCDIR)\gnuplot.info: $(DOCDIR)\gnuplot.texi $@ $(MAKEINFO) -I$(DOCDIR) $(DOCDIR)\gnuplot.texi --no-split --output=$@ # $(DOCDIR)\gnuplot.texi: $(DOCDIR)\gnuplot.doc $(DOCDIR)\doc2texi.pl # perl $(DOCDIR)\doc2texi.pl $(DOCDIR)\gnuplot.doc >$@ $(DOCDIR)\gnuplot.rtf: $(DOCDIR)\gnuplot.doc $(DOCDIR)\doc2rtf.exe $(DOCDIR)\doc2rtf.exe $(DOCDIR)\gnuplot.doc $@ $(DOCDIR)\gnuplot.ms: $(DOCDIR)\gnuplot.doc $(DOCDIR)\doc2ms.exe $(DOCDIR)\doc2ms.exe $(DOCDIR)\gnuplot.doc $@ $(DOCDIR)\gnuplot.ipf: $(DOCDIR)\gnuplot.doc $(DOCDIR)\doc2ipf.exe $(DOCDIR)\doc2ipf.exe $(DOCDIR)\gnuplot.doc $@ # Assume we need A4 format $(DOCDIR)\gpcard.ps: $(DOCDIR)\gpcard.dvi cd $(DOCDIR) && $(DVIPS) -o gpcard_letter.ps $< cd $(DOCDIR) && psresize -pletter -Pa4 gpcard_letter.ps $@ $(DOCDIR)\gpcard.dvi: $(DOCDIR)\gpcard.tex cd $(DOCDIR) && $(PLAINTEX) gpcard.tex && $(PLAINTEX) gpcard.tex # # Tools for converting the documentation from docs\gnuplot.doc # in various formats # # Some dependencies - no rule! $(DOCDIR)\doc2gih.exe $(DOCDIR)\doc2ipf.exe $(DOCDIR)\doc2info.exe \ $(DOCDIR)\doc2tex.exe $(DOCDIR)\doc2rtf.exe: \ $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c $(DOCDIR)\allterm.h ..\src\config.h SORT_TERMINALS=1 ifdef SORT_TERMINALS # sort alphabetically all terminals $(DOCDIR)\allterm.h: $(CORETERM) @echo "Building allterm.h" @..\src\os2\4allterm.cmd sort else # SORT_TERMINALS==0, then sequence of terminals according to "ls term/*.trm": $(DOCDIR)\allterm.h: $(CORETERM) @echo "Building allterm.h" @..\src\os2\4allterm.cmd nosort endif $(DOCDIR)\doc2gih.exe: $(DOCDIR)\doc2gih.c $(DOCDIR)\termdoc.c $(OS2TERM) $(CC) $(CFLAGS) $(TERMFLAGS) -DALL_TERM_DOC -o $@ $(DOCDIR)\doc2gih.c $(DOCDIR)\termdoc.c $(DOCDIR)\doc2ipf.exe: $(DOCDIR)\doc2ipf.c $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c $(OS2TERM) $(CC) $(CFLAGS) $(TERMFLAGS) -DALL_TERM_DOC -o $@ $(DOCDIR)\doc2ipf.c $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c $(DOCDIR)\doc2tex.exe: $(DOCDIR)\doc2tex.c $(DOCDIR)\termdoc.c $(OS2TERM) $(DOCDIR)\allterm.h $(CC) $(CFLAGS) $(TERMFLAGS) -DALL_TERM_DOC -o $@ $(DOCDIR)\doc2tex.c $(DOCDIR)\termdoc.c $(DOCDIR)\doc2rtf.exe: $(DOCDIR)\doc2rtf.c $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c $(OS2TERM) $(CC) $(CFLAGS) $(TERMFLAGS) -DALL_TERM_DOC -o $@ $(DOCDIR)\doc2rtf.c $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c $(DOCDIR)\doc2ms.exe: $(DOCDIR)\doc2ms.c $(DOCDIR)\termdoc.c $(OS2TERM) $(CC) $(CFLAGS) $(TERMFLAGS) -DALL_TERM_DOC -o $@ $(DOCDIR)\doc2ms.c $(DOCDIR)\termdoc.c # # Create binary demo files # $(M)binary1 $(M)binary2 $(M)binary3: $(M)bf_test.exe cd $(DEMODIR) && bf_test.exe $(M)bf_test.exe : bf_test.c binary.$(O) alloc.$(O) $(CC) $(CFLAGS) -o $@ bf_test.c binary.$(O) alloc.$(O) # # Clean up # # Clean up all files temporary used clean: if exist config.h del config.h if exist *.$(O) del *.$(O) if exist *.$(O2) del *.$(O2) cd $(OS2DIR) && if exist *.$(O2) del *.$(O2) if exist $(OS2DIR)\gnupmdrv.res del $(OS2DIR)\gnupmdrv.res if exist $(DEMODIR)\bf_test.exe del $(DEMODIR)\bf_test.exe if exist $(DOCDIR)\doc2*.exe del $(DOCDIR)\doc2*.exe if exist $(DOCDIR)\gnuplot.ipf del $(DOCDIR)\gnuplot.ipf if exist $(DOCDIR)\gnuplot_2* del $(DOCDIR)\gnuplot_2* if exist $(DOCDIR)\gnuplot_3* del $(DOCDIR)\gnuplot_3* if exist core del core if exist $(DOCDIR)\allterm.? del $(DOCDIR)\allterm.? # Clean up ALL files that were not part of the source distribution veryclean: clean if exist *.exe del *.exe if exist $(DOCDIR)\gnuplot.dvi del $(DOCDIR)\gnuplot.dvi if exist $(DOCDIR)\gnuplot.gih del $(DOCDIR)\gnuplot.gih if exist $(DOCDIR)\gnupmdrv.hlp del $(DOCDIR)\gnupmdrv.hlp if exist $(DOCDIR)\gnuplot.html del $(DOCDIR)\gnuplot.html if exist $(DOCDIR)\gnuplot.inf del $(DOCDIR)\gnuplot.inf if exist $(DOCDIR)\gnuplot.info del $(DOCDIR)\gnuplot.info if exist $(DOCDIR)\gnuplot.ms del $(DOCDIR)\gnuplot.ms if exist $(DOCDIR)\gnuplot.ps del $(DOCDIR)\gnuplot.ps if exist $(DOCDIR)\gnuplot.pdf del $(DOCDIR)\gnuplot.pdf if exist $(DOCDIR)\gnuplot.rtf del $(DOCDIR)\gnuplot.rtf if exist $(DOCDIR)\gnuplot.tex del $(DOCDIR)\gnuplot.tex if exist $(DOCDIR)\gpcard*.ps del $(DOCDIR)\gpcard*.ps if exist $(DOCDIR)\*.dvi del $(DOCDIR)\*.dvi if exist $(DOCDIR)\*.log del $(DOCDIR)\*.log if exist $(DOCDIR)\*.aux del $(DOCDIR)\*.aux if exist $(DOCDIR)\*.toc del $(DOCDIR)\*.toc if exist $(DEMODIR)\binary? del $(DEMODIR)\binary? ���������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/Makefile.in��������������������������������������������������������������������0000644�0004711�0000144�00000030264�12223337636�013457� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = config DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alpha.m4 \ $(top_srcdir)/m4/apple.m4 $(top_srcdir)/m4/beos.m4 \ $(top_srcdir)/m4/msdos.m4 $(top_srcdir)/m4/next.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIROEPS_CFLAGS = @CAIROEPS_CFLAGS@ CAIROEPS_LIBS = @CAIROEPS_LIBS@ CAIROPANGO_CFLAGS = @CAIROPANGO_CFLAGS@ CAIROPANGO_LIBS = @CAIROPANGO_LIBS@ CAIROPDF_CFLAGS = @CAIROPDF_CFLAGS@ CAIROPDF_LIBS = @CAIROPDF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIST_CONTACT = @DIST_CONTACT@ DVIPS = @DVIPS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ GDLIB_CONFIG = @GDLIB_CONFIG@ GIHDIR = @GIHDIR@ GREP = @GREP@ GTK28_CFLAGS = @GTK28_CFLAGS@ GTK28_LIBS = @GTK28_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEXPAND = @KPSEXPAND@ LASERGNU = @LASERGNU@ LATEX = @LATEX@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARIES_FOR_X = @LIBRARIES_FOR_X@ LIBS = @LIBS@ LINUXSUID = @LINUXSUID@ LISPDIR = @LISPDIR@ LN_S = @LN_S@ LRELEASE = @LRELEASE@ LTLIBOBJS = @LTLIBOBJS@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGO_1_10_2_CFLAGS = @PANGO_1_10_2_CFLAGS@ PANGO_1_10_2_LIBS = @PANGO_1_10_2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PDFLIB_CONFIG = @PDFLIB_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ PLAINTEX = @PLAINTEX@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RCC = @RCC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMLIBS = @TERMLIBS@ TERMXLIBS = @TERMXLIBS@ TEXDIR = @TEXDIR@ TEXHASH = @TEXHASH@ TROFF = @TROFF@ TUTORIAL = @TUTORIAL@ UIC = @UIC@ VERSION = @VERSION@ VERSION_MAJOR = @VERSION_MAJOR@ WX_CONFIG = @WX_CONFIG@ WX_LIBS = @WX_LIBS@ X11_APPDEFAULTS_DIR = @X11_APPDEFAULTS_DIR@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_OBJC = @ac_ct_OBJC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign EXTRA_DIST = README MacOSX Makefile.am.in buildvms.com config.cyg \ config.dj2 config.mgw config.nt config.os2 config.oww config.wc \ djconfig.sh make_vms.com makefile.cyg makefile.dj2 makefile.emx makefile.g \ makefile.os2 makefile.unx makefile.vms makefile.wc watcom/Makefile \ watcom/config.h cygwin/Makefile mingw/Makefile msvc/Makefile all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign config/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign config/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am # empty all: Makefile.am: Makefile.am.in rm -f $@ $@t sed -n '1,/^##m4-files-begin/p' Makefile.am.in > $@t echo EXTRA_DIST = README MacOSX Makefile.am.in buildvms.com \ config.* djconfig.sh make_vms.com makefile.* watcom/Makefile \ watcom/config.h cygwin/Makefile mingw/Makefile msvc/Makefile \ | fmt \ | (tr '\012' @; echo) \ | sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012 ' >> $@t sed -n '/^##m4-files-end/,$$p' $< >> $@t chmod og-w $@t mv $@t $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/README�������������������������������������������������������������������������0000644�0004711�0000144�00000001430�11561257112�012255� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Notes: - EAM Oct 2007: give up on Atari platforms - EAM Mar 2010: give up on Amiga and 16-bit DOS, WIN List of files: cygwin/Makefile: Makefile for Cygwin on Windows mingw/Makefile: Makefile for MinGW/MSYS and GNU make on Windows msvc/Makefile: Makefile for Microsoft Visual C++ 2005 or later and nmake on Windows watcom/Makefile: Makefile for OpenWatcom C++ on Windows buildvms.com: Shell script on VMS make_vms.com: Shell script on VMS makefile.unx: Generic makefile for unixes makefile.dj2: Makefile for DJGPP version 2 on DOS makefile.emx: Makefile for use with emx-0.8f/gcc and ndmake 4.5 on DOS makefile.g: Makefile on GRASS (a geographic information system) makefile.os2: Makefile for gcc/emx on OS/2 makefile.vms: Makefile on VMS makefile.wc: Makefile for Watcom C 9.5a on DOS ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/makefile.emx�������������������������������������������������������������������0000644�0004711�0000144�00000010650�11571332644�013676� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: makefile.emx,v 1.8 2011/06/01 03:44:36 sfeam Exp $ # # GNUPLOT Makefile for use with emx-0.8f/gcc and ndmake 4.5 on MS-DOS # # This version has had very little testing. EMXPATH = c:/emx # uncomment the following two lines if you have # Johannes Martin's SVGA/VESA extensions # A VESA 1.2 compatible display, and the vesa_emx.com TSR are required. # "set term vgal" needs vesa_ibm.com with svgakit/vesa_emx version 1.2. # VESA = -DEMXVESA # VESALIB = -lvesa # where to place gnuplot.gih helpfile HELPFILE = gnuplot.gih CFLAGS = -c -O2 -DMSDOS -DDOS32 -DPROTOTYPES -DHAVE_STRINGIZE -DREADLINE -DHAVE_STRNICMP # see other terminal defines in term.h TERMFLAGS = -DEMXVGA $(VESA) OBJS = alloc.o binary.o bitmap.o command.o contour.o datafile.o dynarray.o \ eval.o fit.o graphics.o graph3d.o help.o hidden3d.o history.o \ internal.o interpol.o matrix.o misc.o parse.o plot.o plot2d.o \ plot3d.o readline.o save.o specfun.o scanner.o set.o show.o \ standard.o stdfn.o tables.o tabulate.o term.o time.o unset.o util.o util3d.o \ variable.o version.o CSOURCE5 = term\aed.trm term\cgi.trm term/dumb.trm term/dxf.trm term\dxy.trm \ term\eepic.trm term\epson.trm term\fig.trm term\hp26.trm \ term\hp2648.trm term\hpgl.trm term\hpljii.trm CSOURCE6 = term\impcodes.h term\imagen.trm term\object.h \ term\kyo.trm term\latex.trm term/pbm.trm term\pm.trm CSOURCE7 = term\post.trm term\qms.trm term\regis.trm term\sun.trm \ term\t410x.trm term\tek.trm term\unixpc.trm \ term\v384.trm term\x11.trm term\emxvga.trm CSOURCE8 = contour.c all: gnuplotx.exe $(HELPFILE) # default rules CCC = gcc $(CFLAGS) -o $*.o $*.c gnuplotx.exe: $(OBJS) emxlink.rsp gcc -o gnuplot @emxlink.rsp -lm -lgraph $(VESALIB) emxbind $(EMXPATH)/bin/emx.exe gnuplot gnuplotx.exe -p -acmi emxlink.rsp: makefile.emx echo bitmap.o> emxlink.rsp echo command.o>> emxlink.rsp echo contour.o>> emxlink.rsp echo eval.o>> emxlink.rsp echo graphics.o>> emxlink.rsp echo graph3d.o>> emxlink.rsp echo help.o>> emxlink.rsp echo hidden3d.o>> emxlink.rsp echo history.o>> emxlink.rsp echo internal.o>> emxlink.rsp echo misc.o>> emxlink.rsp echo parse.o>> emxlink.rsp echo plot.o>> emxlink.rsp echo plot2d.o>> emxlink.rsp echo plot3d.o>> emxlink.rsp echo readline.o>> emxlink.rsp echo specfun.o>> emxlink.rsp echo interpol.o>> emxlink.rsp echo scanner.o>> emxlink.rsp echo set.o>> emxlink.rsp echo show.o>> emxlink.rsp echo standard.o>> emxlink.rsp echo stdfn.o>> emxlink.rsp echo tabulate.o>> emxlink.rsp echo term.o>> emxlink.rsp echo time.o>> emxlink.rsp echo util.o>> emxlink.rsp echo variable.o>> emxlink.rsp echo version.o>> emxlink.rsp echo binary.o>> emxlink.rsp echo fit.o>> emxlink.rsp echo matrix.o>> emxlink.rsp echo datafile.o>> emxlink.rsp echo alloc.o>> emxlink.rsp bitmap.o: bitmap.c bitmap.h plot.h $(CCC) binary.o: binary.c plot.h $(CCC) command.o: command.c plot.h setshow.h help.h fit.h $(CCC) -DHELPFILE=\"$(HELPFILE)\" contour.o: contour.c plot.h $(CCC) eval.o: eval.c plot.h $(CCC) graphics.o: graphics.c plot.h setshow.h $(CCC) graph3d.o: graph3d.c plot.h setshow.h $(CCC) fit.o: fit.c fit.h matrix.h plot.h $(CCC) matrix.o: matrix.c matrix.h fit.h $(CCC) help.o: help.c plot.h help.h $(CCC) internal.o: internal.c plot.h $(CCC) misc.o: misc.c plot.h setshow.h $(CCC) parse.o: parse.c plot.h $(CCC) plot.o: plot.c plot.h setshow.h $(CCC) plot2d.o: plot2d.c plot.h $(CCC) plot3d.o: plot3d.c plot.h $(CCC) readline.o: readline.c $(CCC) scanner.o: scanner.c plot.h $(CCC) set.o: set.c plot.h setshow.h $(CCC) show.o: show.c plot.h setshow.h $(CCC) -DHELPFILE=\"$(HELPFILE)\" specfun.o: specfun.c plot.h $(CCC) interpol.o: interpol.c plot.h setshow.h $(CCC) standard.o: standard.c plot.h $(CCC) stdfn.o: stdfn.c stdfn.h $(CCC) term.o: term.c term.h plot.h setshow.h bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7) $(CCC) $(TERMFLAGS) -Iterm -I. time.o : time.c $(CCC) util.o: util.c plot.h $(CCC) variable.o: variable.c plot.h variable.h $(CCC) version.o: version.c $(CCC) # convert gnuplot.doc to gnuplot.gih doc2gih.exe: docs\doc2gih.c docs\termdoc.c gcc -o doc2gih -I. docs/doc2gih.c docs/termdoc.c emxbind $(EMXPATH)/bin/emx.exe doc2gih doc2gih.exe $(HELPFILE): doc2gih.exe docs\gnuplot.doc doc2gih docs\gnuplot.doc $(HELPFILE) clean: del *.o del emxlink.rsp del gnuplot del doc2gih # veryclean target - remove all files created by the makefile veryclean: clean del gnuplot.exe del doc2gih.exe del gnuplot.gih ����������������������������������������������������������������������������������������gnuplot-4.6.4/config/makefile.wc��������������������������������������������������������������������0000644�0004711�0000144�00000007715�11347102605�013517� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: makefile.wc,v 1.8 2010/03/14 06:43:17 sfeam Exp $ # # GNUPLOT Makefile for Watcom C # # Modified from the TurboC makefile by Aurel Gabris # Heavily modified and updated for OpenWatcom 1.2 by HBB # # the makefile does longer depends on a linker options file. # this file will be created as needed. (AL 07/17/92) # where to place gnuplot.gih helpfile HELPFILE = gnuplot.gih # names of C compiler & tools CC = wcc386 CL = wcl386 LINK = wlink !ifdef __LOADDLL__ ! loaddll wcc wccd ! loaddll wccaxp wccdaxp ! loaddll wcc386 wccd386 ! loaddll wpp wppdi86 ! loaddll wppaxp wppdaxp ! loaddll wpp386 wppd386 ! loaddll wlink wlink ! loaddll wlib wlibd !endif # the memory model to use (f = flat) MODEL = f # definitions used by makefile.all (and elsewhere) T=..\term\ D=..\docs\ O=obj M=..\demo\ !include makefile.awc # -DHAVE_CONFIG_H: do the configuration #defines the (now) usual way # -DREADLINE to use the history/line editing capability. If you want this # capability add -DREADLINE to CFLAGS CPPFLAGS=-DHAVE_CONFIG_H -UMSDOS -DDOS386 -DDOS386 -DDOS32 -DPC # -w0 means ignore warnings and do not report them # -d1{+} means include line numbers for debugger # -d2 means full symbolic debug info # -fpi means inline 80x87 instructions with emulation # -fpi87 means inline 80x87 instructions # -zq avoids all the version banners being printed # -zm puts each function in a separate section to allow dead code elimination # -o{x} controls optimization # a -> relax aliasing constraints # f -> generate traceable stack frames as needed # The selection of the optimization flags include some wizardry. # Thus omiting any flags from the above two, may result in run-time # errors. # m -> generate inline 80x87 code for math functions # d -> disable all optimizations (Watch out!) # option {stack=n} sets stack size to n CFLAGS = -zq -m$(MODEL) -d2 -zm -omaf -fpi -fp3 -I. $(CPPFLAGS) DOC2XXX_FLAGS = -I$(D) -I$(T) $(CFLAGS) TERMFLAGS = OBJS = $(COREOBJS) version.$(O) BINFILES = $(M)binary1 $(M)binary2 $(M)binary3 all: gnuplot.exe $(HELPFILE) $(BINFILES) .SYMBOLIC @%null # use linkopt.wc to avoid command-line overflow gnuplot.exe: config.h $(OBJS) .PRECIOUS $(LINK) @<<linkopt.wc system dos4g OPTION stack=100000 DEBUG WATCOM ALL OPTION SYMFILE OPTION MAP OPTION ELIMINATE OPTION QUIET NAME gnuplot file { $(OBJS) } << # default rules .c.obj: .AUTODEPEND $(CC) $^& $(CFLAGS) $(OBJS): config.h .AUTODEPEND config.h: ..\config\config.wc copy $< $^@ makefile.wc: ..\config\makefile.wc copy $< $^@ term.obj: term.c term.h plot.h bitmap.h $(CORETERM) .AUTODEPEND $(CC) $(CFLAGS) $(TERMFLAGS) -DDEFAULTTERM="dospc" -I$(T) term.c # convert gnuplot.doc to gnuplot.gih $(HELPFILE): doc2gih.exe $(D)gnuplot.doc doc2gih $(D)gnuplot.doc $(HELPFILE) doc2gih.exe: $(D)doc2gih.c $(D)termdoc.c .AUTODEPEND $(CL) $(DOC2XXX_FLAGS) -fe=$^@ $< doc2tex.exe: $(D)doc2tex.c $(D)termdoc.c .AUTODEPEND $(CL) -w0 -m$(MODEL) $(DOC2XXX_FLAGS) -DALL_TERM_DOC -fe=$^@ $< bf_test.exe: bf_test.c binary.obj alloc.obj .AUTODEPEND $(CC) $(CPPFLAGS) -m$(MODEL) bf_test.c $(LINK) system dos4g name bf_test file {bf_test binary alloc} $(BINFILES): bf_test.exe .\bf_test move binary? ..\demo # clean target - remove all temp files, but leave executable intact # needed when changing configuration (model or overlaying) clean: .SYMBOLIC if exist *.obj del *.obj if exist *.err del *.err if exist linkopt.wc del linkopt.wc if exist doc2gih.exe del doc2gih.exe if exist doc2tex.exe del doc2tex.exe if exist bf_test.exe del bf_test.exe if exist gnuplot.map del gnuplot.map if exist gnuplot.sym del gnuplot.sym # realclean target - remove all files created by the makefile realclean: clean .SYMBOLIC if exist gnuplot.exe del gnuplot.exe if exist gnuplot.gih del gnuplot.gih if exist $(M)binary? del $(M)binary? if exist config.h del config.h if exist makefile.wc del makefile.wc ���������������������������������������������������gnuplot-4.6.4/config/Makefile.am.in�����������������������������������������������������������������0000644�0004711�0000144�00000001154�11752300767�014050� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign # empty all: ##m4-files-begin ##m4-files-end Makefile.am: Makefile.am.in rm -f $@ $@t sed -n '1,/^##m4-files-begin/p' Makefile.am.in > $@t echo EXTRA_DIST = README MacOSX Makefile.am.in buildvms.com \ config.* djconfig.sh make_vms.com makefile.* watcom/Makefile \ watcom/config.h cygwin/Makefile mingw/Makefile msvc/Makefile \ | fmt \ | (tr '\012' @; echo) \ | sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012 ' >> $@t sed -n '/^##m4-files-end/,$$p' $< >> $@t chmod og-w $@t mv $@t $@ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/msvc/��������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340010�012331� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/msvc/Makefile������������������������������������������������������������������0000644�0004711�0000144�00000031273�12025537044�014016� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: Makefile,v 1.2.2.4 2012/09/16 18:38:14 markisch Exp $ # # GNUPLOT Makefile Microsoft Visual C++ 2005 or newer # John Bollinger bbands@yahoo.com, 4 March 2002: # Added png support with zlib and libpng as subs of .\src # libpng and zlib can be downloaded from ftp://ftp.uu.net/graphics/png # Added pdf support with pdflib as a sub of .\src # pdflib can be downloaded from http://www.pdflib.com # Added MSC multi-thread support for compatibility with pdflib # Bastian Maerkisch bmaerkisch@web.de: # Added support for binary version of the GD library (bgd.dll) # gdlib can be downloaded from http://www.libgd.org/ # Development of libgd seems to have stalled: # Latest binary build can be found at http://www.libgd.org/releases/gd-latest-win32.zip # As of March 2011 this is version 2.0.34. # Removed zlib and libpng again as they're already included in bgd.dll # Hans-Bernhard Broeker: # updated to current version of MSVC # undid silly name change for pgnuplot.exe, call console version gnuplot.exe instead # removed remainder of wgnuplot_pipes.exe support # isolated more configuration-dependent parts (gd, pdf, wx) to lines of their own, # so they can be turned on/off more easily. # Bastian Maerkisch bmaerkisch@web.de: # Out of tree version. Moved to config\msvc # # # To compile with Visual C: # Optionally download gdlib to config\msvc\gdwin32 # Optionally download pdflib to config\msvc\pdflib and compile it if you choose the source # # Start the Microsoft Visual C++ command shell (e.g. via link installed setup) # change to the gnuplot\config\msvc directory # Edit the Makefile to match your setup. (If you don't have the optional libraries, # you will probably have to disable some parts.) # Now run: # nmake # # Compilation options, disable by setting to zero # Is libgd available? (required by terminal png/jpeg/gif)? GDLIB = 1 # Is pdflib available? (required by terminal pdf) PDFLIB = 0 # Build wxt terminal? (required GTK, wxWidgets, cairo and pango libraries) # See http://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide # http://wiki.wxwidgets.org/Visual_Studio_2008_%289.0%29 WXT = 0 # Build the lua/tikz terminal? LUA = 1 # Choose help format: # for HTML help (.chm) this should be 1, for (.hlp) it should be 0 HTML_HELP = 1 # Location of additional libraries GDDIR = gdwin32 LUADIR = lua PDFDIR = pdflib # installation directory DESTDIR = "$(PROGRAMFILES)\gnuplot" TOP = ..\\.. # directory for PostScript prolog and associated files GNUPLOT_PS_DIR = share\\PostScript # Similarly for javascript files for the canvas terminal: GNUPLOT_JS_DIR = share\\js # Similarly for scripts used by the lua terminal GNUPLOT_LUA_DIR = share\\lua # gnuplot will look for gnuplotrc here: GNUPLOT_SHARE_DIR = share #CC = cl LD = link # compiler flags # /I means extra include directory # /Fm means produce link map # /Od means suppress optimizations (esp. for debug) # /O2 mans optimize for speed # /Zi means prepare for codeview # /MD means include multi-thread support (DLL) CBASEFLAGS = /EHsc /GR /MD /O2 /nologo CFLAGS = $(CBASEFLAGS) /I. /I$(TOP) /I$(S) /D_Windows /DWIN32 /DHAVE_CONFIG_H /D__MSC__ /DHELPFILE=\"$(HELPFILE)\" $(OPTIONS) CFLAGS = $(CFLAGS) /DGNUPLOT_SHARE_DIR=\"$(GNUPLOT_SHARE_DIR)\" CONSOLE_CFLAGS = /DWGP_CONSOLE /DCONSOLE_SWITCH_CP /DPIPES OPTIONS = /DUSE_MOUSE OPTIONS = $(OPTIONS) /DGNUPLOT_HISTORY # flags for terminals # see other terminal defines in term.h TERMFLAGS = /I$(T) /DGNUPLOT_PS_DIR=\"$(GNUPLOT_PS_DIR)\" /DGNUPLOT_JS_DIR=\"$(GNUPLOT_JS_DIR)\" # linker flags, append paths for external libs later LDFLAGS = /nologo /MACHINE:$(MACHINE) /MANIFEST LDFLAGS = $(LDFLAGS) /MANIFESTDEPENDENCY:"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" COMMONLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib \ comdlg32.lib comctl32.lib advapi32.lib shell32.lib \ msimg32.lib gdiplus.lib CONSOLELIBS = ole32.lib oleaut32.lib comctl32.lib !IF "$(GDLIB)" == "1" OPTIONS = $(OPTIONS) /DHAVE_LIBGD /DHAVE_GD_H /DHAVE_GD_GIF /DGIF_ANIMATION /DHAVE_GD_PNG /DHAVE_GD_JPEG /DHAVE_GD_TTF OPTIONS = $(OPTIONS) /I$(GDDIR)\include LDFLAGS = $(LDFLAGS) /libpath:$(GDDIR)\lib !ENDIF !IF "$(PDFLIB)" == "1" OPTIONS = $(OPTIONS) /DHAVE_LIBPDF LDFLAGS = $(LDFLAGS) /libpath:$(PDFDIR)\pdflib TERMFLAGS = $(TERMFLAGS) /I$(PDFDIR)\pdflib !ENDIF !IF "$(WXT)" == "1" WXTLIBS = glib-2.0.lib gobject-2.0.lib gmodule-2.0.lib \ cairo.lib pango-1.0.lib pangocairo-1.0.lib \ wxmsw28.lib wxtiff.lib CFLAGS = $(CFLAGS) -DWXWIDGETS !ENDIF !IF "$(LUA)" == "1" OPTIONS = $(OPTIONS) /DHAVE_LUA OPTIONS = $(OPTIONS) /I$(LUADIR)/include LDFLAGS = $(LDFLAGS) /libpath:$(LUADIR) TERMFLAGS = $(TERMFLAGS) /DGNUPLOT_LUA_DIR=\"$(GNUPLOT_LUA_DIR)\" LUALIBS = lua51.lib !ENDIF !IF "$(HTML_HELP)" == "1" HELPFILE = wgnuplot.chm OPTIONS = $(OPTIONS) /DWITH_HTML_HELP HHWPATH=$(PROGRAMFILES)\HTML Help Workshop\\ !ELSE HELPFILE = wgnuplot.hlp HCWPATH=$(PROGRAMFILES)\help workshop\\ !ENDIF !IF "$(PROCESSOR_ARCHITECTURE)" == "ALPHA" MACHINE = $(PROCESSOR_ARCHITECTURE) !ELSE MACHINE = IX86 !ENDIF # macros for makefile.all O=obj S=$(TOP)\\src W=$(S)\\win\\ T=$(TOP)\\term\\ D=$(TOP)\\docs\\ M=$(TOP)\\demo\\ default: wgnuplot.exe $(HELPFILE) wgnuplot.mnu $(M)bf_test.exe pgnuplot.exe gnuplot.exe !INCLUDE $(S)\\makefile.all OBJS = $(COREOBJS) version.obj WINOBJS = winmain.obj wgnuplib.obj wgraph.obj wprinter.obj wtext.obj \ screenbuf.obj wpause.obj wmenu.obj gpexecute.obj wgdiplus.obj ALL_CONSOLE_OBJS = $(OBJS:.obj=.cobj) $(WINOBJS:.obj=.cobj) # default rules {$(S)}.c.obj: $(CC) /c $(CFLAGS) $(S)\\$*.c {$(S)}.c.cobj: $(CC) /c $(CFLAGS) $(CONSOLE_CFLAGS) $(S)\\$*.c /Fo$@ {$(W)}.c.obj: $(CC) /c $(CFLAGS) $(W)$*.c /Fo$@ {$(W)}.c.cobj: $(CC) /c $(CFLAGS) $(CONSOLE_CFLAGS) $(W)$*.c /Fo$@ {$(W)}.cpp.obj: $(CC) /c $(CFLAGS) $(W)$*.cpp /Fo$@ {$(W)}.cpp.cobj: $(CC) /c $(CFLAGS) $(CONSOLE_CFLAGS) $(W)$*.cpp /Fo$@ {$(S)}.c{$(M)}.exe: $(CC) /c $(CFLAGS) $(W)$*.c /Fo$@ $(OBJS): config.h config.h: $(TOP)\config\config.nt copy $(TOP)\config\config.nt config.h wgnuplot.exe: $(OBJS) $(WINOBJS) wgnuplot.res linkopt-w.msw texticon.ico grpicon.ico $(LD) /subsystem:windows $(LDFLAGS) /map:wgnuplot.map /out:$@ @linkopt-w.msw !IF "$(GDLIB)" == "1" copy $(GDDIR)\bin\*.dll . !ENDIF !IF "$(LUA)" == "1" copy $(LUADIR)\*.dll . !ENDIF gnuplot.exe: $(ALL_CONSOLE_OBJS) wgnuplot.res linkopt-c.msw texticon.ico grpicon.ico $(LD) /subsystem:console $(LDFLAGS) /map:wgnuplot.map /out:$@ @linkopt-c.msw !IF "$(GDLIB)" == "1" copy $(GDDIR)\bin\*.dll . !ENDIF !IF "$(LUA)" == "1" copy $(LUADIR)\*.dll . !ENDIF pgnuplot.exe: $(W)pgnuplot.c $(CC) $(CBASEFLAGS) /I. /I$(TOP) /I$(S) $(W)pgnuplot.c /Fe$@ /link version.obj user32.lib linkopt-w.msw: Makefile echo $(OBJS) > linkopt-w.msw echo $(WINOBJS) >> linkopt-w.msw echo $(COMMONLIBS) >> linkopt-w.msw echo wgnuplot.res >> linkopt-w.msw !IF "$(HTML_HELP)" == "1" echo htmlhelp.lib >> linkopt-w.msw !ENDIF !IF "$(GDLIB)" == "1" echo bgd.lib >> linkopt-w.msw !ENDIF !IF "$(PDFLIB)" == "1" echo pdflib.lib >> linkopt-w.msw !ENDIF !IF "$(WXT)" == "1" echo $(WXTLIBS) >> linkopt-w.msw !ENDIF !IF "$(LUA)" == "1" echo $(LUALIBS) >> linkopt-w.msw !ENDIF linkopt-c.msw: Makefile echo $(ALL_CONSOLE_OBJS) > linkopt-c.msw echo $(COMMONLIBS) >> linkopt-c.msw echo $(CONSOLELIBS) >> linkopt-c.msw echo wgnuplot.res >> linkopt-c.msw !IF "$(HTML_HELP)" == "1" echo htmlhelp.lib >> linkopt-c.msw !ENDIF !IF "$(GDLIB)" == "1" echo bgd.lib >> linkopt-c.msw !ENDIF !IF "$(PDFLIB)" == "1" echo pdflib.lib >> linkopt-c.msw !ENDIF !IF "$(WXT)" == "1" echo $(WXTLIBS) >> linkopt-c.msw !ENDIF !IF "$(LUA)" == "1" echo $(LUALIBS) >> linkopt-c.msw !ENDIF # rules term.obj: $(S)\term.c $(S)\term.h $(S)\plot.h $(S)\setshow.h $(S)\bitmap.h $(CORETERM) $(CC) /c $(CFLAGS) $(TERMFLAGS) $(S)\$(*B).c /Fo$@ term.cobj: $(S)\term.c $(S)\term.h $(S)\plot.h $(S)\setshow.h $(S)\bitmap.h $(CORETERM) $(CC) /c $(CFLAGS) $(CONSOLE_CFLAGS) $(TERMFLAGS) $(S)\$(*B).c /Fo$@ winmain.obj: $(W)winmain.c $(W)wgnuplib.h $(W)wtext.h $(S)\plot.h $(CC) /c $(CFLAGS) $(W)$(*B).c /Fo$@ winmain.cobj: $(W)winmain.c $(W)wgnuplib.h $(W)wtext.h $(S)\plot.h $(CC) /c $(CFLAGS) $(CONSOLE_CFLAGS) $(W)winmain.c /Fo$@ # resources wgnuplot.mnu: $(W)wgnuplot.mnu copy $(W)wgnuplot.mnu wgnuplot.mnu wgnuplot.res : $(W)wgnuplot.rc $(W)wgnuplib.rc $(W)wresourc.h texticon.ico grpicon.ico $(RC) /l 0x409 /fowgnuplot.res /I $(W) /d "NDEBUG" /d WIN32 /d MSRC /d NO_MANIFEST $(W)wgnuplot.rc # extract icons from wgnuplot.rc texticon.ico: grpicon.ico grpicon.ico: geticon.exe $(W)wgnuplot.rc geticon $(W)wgnuplot.rc geticon.exe: $(W)geticon.c $(CC) /DMSDOS /F 5000 /W1 $(W)geticon.c # build windows help file !IF "$(HTML_HELP)" == "1" $(HELPFILE): doc2html.exe $(D)gnuplot.doc gnuplot.exe doc2html $(D)gnuplot.doc $(D)windows\\ cd $(D) -"..\\config\\msvc\\gnuplot" -e "winhelp=1" plotstyles.gnu -"$(HHWPATH)hhc" windows\wgnuplot.hhp cd ..\\config\\msvc if exist $(D)windows\wgnuplot.chm copy $(D)windows\wgnuplot.chm . !ELSE # convert gnuplot.doc to gnuplot.rtf $(HELPFILE): doc2rtf.exe $(D)gnuplot.doc $(W)wgnuplot.hpj doc2rtf $(D)gnuplot.doc $(W)gnuplot.rtf "$(HCWPATH)hcw" /c /e $(W)wgnuplot.hpj if exist $(W)wgnuplot.hlp copy $(W)wgnuplot.hlp . !ENDIF doc2html.exe: $(D)windows\doc2html.c $(D)termdoc.c $(D)xref.c version.obj $(CC) $(CFLAGS) /F 5000 /W1 /I. /DWINDOWS_NO_GUI /I$(D) /I$(T) -Fedoc2html.exe $(D)windows\doc2html.c $(D)termdoc.c $(D)xref.c version.obj doc2rtf.exe: $(D)doc2rtf.c $(D)termdoc.c $(D)xref.c $(CC) $(CFLAGS) /F 5000 /W1 /I. /DWINDOWS_NO_GUI /I$(D) /I$(T) -Fedoc2rtf.exe $(D)doc2rtf.c $(D)termdoc.c $(D)xref.c # make binary demo files $(M)bf_test.exe : $(S)\\bf_test.c dbinary.obj alloc.obj $(CC) $(CFLAGS) /F 5000 /W1 /DWINDOWS_NO_GUI /Fe$(M)bf_test.exe $(S)\\bf_test.c dbinary.obj alloc.obj cd $(M) bf_test cd ..\\config\\msvc # _Windows causes wtext.h to define fread() etc dbinary.obj: $(S)\\binary.c $(CC) /c $(CFLAGS) /U_Windows /F 5000 /W1 /Fodbinary.obj $(S)\\binary.c # clean up temporary files clean: if exist *.obj del *.obj if exist *.cobj del *.cobj if exist *.ico del *.ico if exist wgnuplot.res del wgnuplot.res if exist gnuplot.rtf del gnuplot.rtf if exist $(M)bf_test.exe del $(M)bf_test.exe if exist linkopt-w.msw del linkopt-w.msw if exist linkopt-c.msw del linkopt-c.msw if exist doc2html.exe del doc2html.exe if exist doc2rtf.exe del doc2rtf.exe if exist geticon.exe del geticon.exe if exist gnuplot rmdir /s /q gnuplot veryclean: clean if exist wgnuplot.exe del wgnuplot.exe if exist wgnuplot.chm del wgnuplot.chm if exist wgnuplot.hlp del wgnuplot.hlp if exist wgnuplot.mnu del wgnuplot.mnu if exist pgnuplot.exe del pgnuplot.exe if exist gnuplot.exe del gnuplot.exe if exist $(M)binary1 del $(M)binary1 if exist $(M)binary2 del $(M)binary2 if exist $(M)binary3 del $(M)binary3 if exist $(M)fit.log del $(M)fit.log if exist $(M)soundfit.par del $(M)soundfit.par if exist config.h del config.h install: if not exist $(DESTDIR) mkdir $(DESTDIR) if not exist $(DESTDIR)\bin mkdir $(DESTDIR)\bin copy /Y wgnuplot.exe $(DESTDIR)\bin copy /Y pgnuplot.exe $(DESTDIR)\bin copy /Y gnuplot.exe $(DESTDIR)\bin copy /Y *gnuplot.exe.manifest $(DESTDIR)\bin copy /Y $(W)wgnuplot.mnu $(DESTDIR)\bin copy /Y $(W)wgnuplot-ja.mnu $(DESTDIR)\bin if exist wgnuplot.chm copy /Y wgnuplot.chm $(DESTDIR)\bin if exist wgnuplot-ja.chm copy /Y wgnuplot-ja.chm $(DESTDIR)\bin if exist wgnuplot.hlp copy /Y wgnuplot.hlp $(DESTDIR)\bin copy /Y *.dll $(DESTDIR)\bin if not exist $(DESTDIR)\$(GNUPLOT_PS_DIR) mkdir $(DESTDIR)\$(GNUPLOT_PS_DIR) xcopy /Y $(T)PostScript\*.ps $(DESTDIR)\$(GNUPLOT_PS_DIR) if not exist $(DESTDIR)\$(GNUPLOT_JS_DIR) mkdir $(DESTDIR)\$(GNUPLOT_JS_DIR) xcopy /Y $(T)js\*.* $(DESTDIR)\$(GNUPLOT_JS_DIR) if not exist $(DESTDIR)\$(GNUPLOT_LUA_DIR) mkdir $(DESTDIR)\$(GNUPLOT_LUA_DIR) xcopy /Y $(T)lua\*.* $(DESTDIR)\$(GNUPLOT_LUA_DIR) if not exist $(DESTDIR)\$(GNUPLOT_SHARE_DIR) mkdir $(DESTDIR)\$(GNUPLOT_SHARE_DIR) copy /Y $(TOP)\share\gnuplotrc $(DESTDIR)\$(GNUPLOT_SHARE_DIR) copy /Y $(TOP)\share\*.gp $(DESTDIR)\$(GNUPLOT_SHARE_DIR) if not exist $(DESTDIR)\share\LaTeX mkdir $(DESTDIR)\share\LaTeX copy /Y $(TOP)\share\LaTeX\README $(DESTDIR)\share\LaTeX copy /Y $(TOP)\share\LaTeX\gnuplot.cfg $(DESTDIR)\share\LaTeX for %f in (BUGS README Copyright NEWS ChangeLog) do copy $(TOP)\%f $(DESTDIR)\%f if exist $(TOP)\win\README.Windows copy /Y $(TOP)\win\README.Windows $(DESTDIR) copy /Y $(TOP)\src\win\README.win-ja $(DESTDIR) if not exist $(DESTDIR)\demo mkdir $(DESTDIR)\demo xcopy /Y $(TOP)\demo $(DESTDIR)\demo if not exist $(DESTDIR)\contrib\pm3d mkdir $(DESTDIR)\contrib\pm3d xcopy /Y $(TOP)\pm3d\contrib\*.* $(DESTDIR)\contrib\pm3d zip: $(MAKE) DESTDIR=.\gnuplot install zip -mro9 gp461-msvc-win32.zip gnuplot �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/config.cyg���������������������������������������������������������������������0000644�0004711�0000144�00000035466�11670437273�013377� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* config.h for makefile.cyg * * Prepared according to config.h from ./configure and by means of * config_strip.sh as of gnuplot 4.3 in February 2008. */ /* Define to allow use of deprecated syntax and terminal behaviour. */ #define BACKWARDS_COMPATIBLE 1 /* Define if you want to support files in binary format. */ #define BINARY_DATA_FILE 1 /* Define if you want to use the CGI terminal under SCO. */ /* #undef CGI */ /* Define if you want online help and subtopic tables sorted by column. */ /* #undef COLUMN_HELP */ /* Define if you want to use libgrx20 with MSDOS/djgpp. */ /* #undef DJSVGA */ /* Define if this system uses a 32-bit DOS extender (djgpp/emx). */ /* #undef DOS32 */ /* Define to allow placement of rectangles and other objects */ #define EAM_OBJECTS 1 /* Define if color information should be passed for each vertex. */ /* #undef EXTENDED_COLOR_SPECS */ /* Define if you want to supply pre-existing X11 windows. */ /* #undef EXTERNAL_X11_WINDOW */ /* Define if <errno.h> declares errno. */ /* #undef EXTERN_ERRNO */ /* Define if libgd supports animated gifs. */ /* #undef GIF_ANIMATION */ /* Don't change it here -- this define is set in config/makefile.cyg. */ /* Define if you want to use a gnuplot history file. */ #define GNUPLOT_HISTORY 1 /* Define to allow command line macros. EXPERIMENTAL */ #define GP_MACROS 1 /* Define if you want to use a newer version of libgrx under MSDOS/djgpp. */ /* #undef GRX21 */ /* Define to 1 if you have the <3dkit.h> header file. */ /* #undef HAVE_3DKIT_H */ /* Define to 1 if you have the `atexit' function. */ #define HAVE_ATEXIT 1 /* Define to 1 if you have the `bcopy' function. */ /* #undef HAVE_BCOPY */ /* Define to 1 if you have the `bzero' function. */ /* #undef HAVE_BZERO */ /* Define if you want the cairo-based terminals. */ /* #undef HAVE_CAIROPDF */ /* Define to 1 if you have the declaration of `signgam', and to 0 if you don't. */ #define HAVE_DECL_SIGNGAM 1 /* Define to 1 if you have the <dirent.h> header file. */ #define HAVE_DIRENT_H 1 /* Define to 1 if you have the `doprnt' function. */ /* #undef HAVE_DOPRNT */ /* Define to 1 if you have the `erf' function. */ #define HAVE_ERF 1 /* Define to 1 if you have the `erfc' function. */ #define HAVE_ERFC 1 /* Define to 1 if you have the <errno.h> header file. */ #define HAVE_ERRNO_H 1 /* Define to 1 if you have the <float.h> header file. */ #define HAVE_FLOAT_H 1 /* Define to 1 if you have the `fork' function. */ /* #undef HAVE_FORK */ /* Define to 1 if you have the `gamma' function. */ /* #undef HAVE_GAMMA */ /* Define if libgd supports gif. */ /* #undef HAVE_GD_GIF */ /* Don't change it here -- this define is set in config/makefile.cyg. */ /* Define to 1 if you have the <gd.h> header file. */ /* #undef HAVE_GD_H */ /* Don't change it here -- this define is set in config/makefile.cyg. */ /* Define if libgd supports jpeg. */ /* #undef HAVE_GD_JPEG */ /* Don't change it here -- this define is set in config/makefile.cyg. */ /* Define if libgd supports png. */ /* #undef HAVE_GD_PNG */ /* Don't change it here -- this define is set in config/makefile.cyg. */ /* Define if libgd supports TrueType fonts through libfreetype. */ /* #undef HAVE_GD_TTF */ /* Don't change it here -- this define is set in config/makefile.cyg. */ /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 /* Define to 1 if you have the <ggi/wmh.h> header file. */ /* #undef HAVE_GGI_WMH_H */ /* Define to 1 if you have the <ggi/xmi.h> header file. */ /* #undef HAVE_GGI_XMI_H */ /* Define to use gtk/gdk tweaks */ /* #undef HAVE_GTK */ /* Define to use gtk+ functions to handle cairo */ /* #undef HAVE_GTK28 */ /* Define to 1 if you have the `index' function. */ /* #undef HAVE_INDEX */ /* Define to 1 if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `isnan' function. */ #define HAVE_ISNAN 1 /* Define if you use have kpsexpand (TeX). */ /* #undef HAVE_KPSEXPAND */ /* Define to 1 if you have the `lgamma' function. */ /* #undef HAVE_LGAMMA */ /* Define to 1 if you're using the aquaterm library on Mac OS X */ /* #undef HAVE_LIBAQUATERM */ /* Define to 1 if you have the <libc.h> header file. */ /* #undef HAVE_LIBC_H */ /* Define if you have gd library. */ /* #undef HAVE_LIBGD */ /* Don't change it here -- this define is set in config/makefile.cyg. */ /* Define to 1 if you have the `m' library (-lm). */ /* #undef HAVE_LIBM */ /* Define to 1 if you have the `pdf' library (-lpdf). */ /* #undef HAVE_LIBPDF */ /* Don't change it here -- this define is set in config/makefile.cyg. */ /* Define if your pdf library is too old to use PDF_begin_document. */ /* #undef HAVE_LIBPDF_OPEN_FILE */ /* Define if you are using the GNU readline library. */ /* #undef HAVE_LIBREADLINE */ /* Don't change it here -- this define is set in config/makefile.cyg. */ /* Define if you have zlib. */ /* #undef HAVE_LIBZ */ /* Don't change it here -- this define is set in config/makefile.cyg. */ /* Define to 1 if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the <locale.h> header file. */ #define HAVE_LOCALE_H 1 /* Define to 1 if you have the <malloc.h> header file. */ #define HAVE_MALLOC_H 1 /* Define to 1 if you have the <math.h> header file. */ #define HAVE_MATH_H 1 /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define if your pdf library doesn't support dash patterns. */ /* #undef HAVE_NODASH_LIBPDF */ /* Define if your pdf library is too old to support patterns. */ /* #undef HAVE_OLD_LIBPDF */ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ /* Define to 1 if you have the `pclose' function. */ #define HAVE_PCLOSE 1 /* Define to 1 if you have the <pdflib.h> header file. */ /* #undef HAVE_PDFLIB_H */ /* Define to 1 if you have the `poll' function. */ /* #undef HAVE_POLL */ /* Define to 1 if you have the <poll.h> header file. */ #define HAVE_POLL_H 1 /* Define to 1 if you have the `popen' function. */ #define HAVE_POPEN 1 /* Define to 1 if you have the <readline/history.h> header file. */ /* #undef HAVE_READLINE_HISTORY_H */ /* Define to 1 if you have the <readline/readline.h> header file. */ /* #undef HAVE_READLINE_READLINE_H */ /* Define to 1 if you have the <readline/tilde.h> header file. */ /* #undef HAVE_READLINE_TILDE_H */ /* Define to 1 if you have the `rindex' function. */ /* #undef HAVE_RINDEX */ /* Define to 1 if you have the `select' function. */ /* #undef HAVE_SELECT */ /* Define to 1 if you have the `setvbuf' function. */ #define HAVE_SETVBUF 1 /* Define to 1 if you have the <sgtty.h> header file. */ /* #undef HAVE_SGTTY_H */ /* Define if we have sigsetjmp(). */ /* #undef HAVE_SIGSETJMP */ /* Define to 1 if you have the `sleep' function. */ /* #undef HAVE_SLEEP */ /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define to 1 if stdbool.h conforms to C99. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `stpcpy' function. */ /* #undef HAVE_STPCPY */ /* Define to 1 if you have the `strcasecmp' function. */ #define HAVE_STRCASECMP 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strcspn' function. */ #define HAVE_STRCSPN 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* Define to 1 if you have the `stricmp' function. */ #define HAVE_STRICMP 1 /* Define to 1 if cpp supports the ANSI # stringizing operator. */ #define HAVE_STRINGIZE 1 /* Define to 1 if you have the <strings.h> header file. */ /* #undef HAVE_STRINGS_H */ /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strnicmp' function. */ #define HAVE_STRNICMP 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define if math.h declares struct exception for matherr(). */ /* #undef HAVE_STRUCT_EXCEPTION_IN_MATH_H */ /* Define to 1 if you have the `sysinfo' function. */ /* #undef HAVE_SYSINFO */ /* Define to 1 if you have the <sys/bsdtypes.h> header file. */ /* #undef HAVE_SYS_BSDTYPES_H */ /* Define to 1 if you have the <sys/ioctl.h> header file. */ /* #undef HAVE_SYS_IOCTL_H */ /* Define to 1 if you have the <sys/param.h> header file. */ #define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the <sys/select.h> header file. */ #define HAVE_SYS_SELECT_H 1 /* Define to 1 if you have the <sys/socket.h> header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/systeminfo.h> header file. */ /* #undef HAVE_SYS_SYSTEMINFO_H */ /* Define to 1 if you have the <sys/timeb.h> header file. */ #define HAVE_SYS_TIMEB_H 1 /* Define to 1 if you have the <sys/time.h> header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <sys/utsname.h> header file. */ /* #undef HAVE_SYS_UTSNAME_H */ /* Define to 1 if you have the `tcgetattr' function. */ /* #undef HAVE_TCGETATTR */ /* Define to 1 if you have the <termios.h> header file. */ #define HAVE_TERMIOS_H 1 /* Define to 1 if you have the <time.h> header file. */ #define HAVE_TIME_H 1 /* Define if time_t is declared in time.h. */ #define HAVE_TIME_T_IN_TIME_H 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `usleep' function. */ /* #undef HAVE_USLEEP */ /* Define to 1 if you have the <values.h> header file. */ #define HAVE_VALUES_H 1 /* Define to 1 if you have the `vfork' function. */ /* #undef HAVE_VFORK */ /* Define to 1 if you have the <vfork.h> header file. */ /* #undef HAVE_VFORK_H */ /* Define to 1 if you have the `vfprintf' function. */ #define HAVE_VFPRINTF 1 /* Define to 1 if you have the <vgagl.h> header file. */ /* #undef HAVE_VGAGL_H */ /* Define to 1 if `fork' works. */ /* #undef HAVE_WORKING_FORK */ /* Define to 1 if `vfork' works. */ /* #undef HAVE_WORKING_VFORK */ /* Define to 1 if the system has the type `_Bool'. */ #define HAVE__BOOL 1 /* Define to enable gridbox optimization in hidden3d code. */ /* #undef HIDDEN3D_GRIDBOX */ /* Define to enable quadtree optimization in hidden3d code. */ #define HIDDEN3D_QUADTREE 1 /* Define to enable handling point size in hidden3d code. */ #define HIDDEN3D_VAR_PTSIZE 1 /* Define if this is a Linux system with SuperVGA library. */ /* #undef LINUXVGA */ /* Define if this is an MSDOS system. */ /* #undef MSDOS */ /* Define if you want to read .gnuplot from current directory (SECURITY RISK!). */ /* #undef USE_CWDRC */ /* Name of package */ /* #undef PACKAGE */ /* Define to the address where bug reports for this package should be sent. */ /* #undef PACKAGE_BUGREPORT */ /* Define to the full name of this package. */ /* #undef PACKAGE_NAME */ /* Define to the full name and version of this package. */ /* #undef PACKAGE_STRING */ /* Define to the one symbol short name of this package. */ /* #undef PACKAGE_TARNAME */ /* Define to the version of this package. */ /* #undef PACKAGE_VERSION */ /* Define if you do have the popen and pclose functions. */ /* #undef PIPES */ /* Don't change it here -- this define is set in config/makefile.cyg. */ /* Unix-type of Interprocess Communication is required for mouse support. */ /* #undef PIPE_IPC */ /* Define to 1 if the C compiler supports function prototypes. */ #define PROTOTYPES 1 /* Define if you want to use the included readline function. */ #define READLINE 1 /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void /* Define to the type of arg 1 for `select'. */ /* #undef SELECT_TYPE_ARG1 */ /* Define to the type of args 2, 3 and 4 for `select'. */ /* #undef SELECT_TYPE_ARG234 */ /* Define to the type of arg 5 for `select'. */ /* #undef SELECT_TYPE_ARG5 */ /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */ #define STAT_MACROS_BROKEN 1 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if you want to use the sunview terminal (sun). */ /* #undef SUN */ /* Define to use thin plate spines. */ /* #undef THIN_PLATE_SPLINES_GRID */ /* Define if the 3dkit libray is present. */ /* #undef THREEDKIT */ /* Define if you want to use the experimental ggi driver. */ /* #undef USE_GGI_DRIVER */ /* Define if you want to have mouse support in interactive terminals. */ /* #undef USE_MOUSE */ /* Don't change it here -- this define is set in config/makefile.cyg. */ /* Define to add support for generating a statistical summary of data */ #define USE_STATS 1 /* Define to enable multi-byte font support for x11 */ /* #undef USE_X11_MULTIBYTE */ /* Version number of package */ /* #undef VERSION */ /* Define if the vgagl libray is present. */ /* #undef VGAGL */ /* Define to allow zooming or refresh of volatile data. EXPERIMENTAL */ #define VOLATILE_REFRESH 1 /* Define if you want the wxwidgets terminal. */ /* #undef WXWIDGETS */ /* Define if you are using the X11 window system. */ /* #undef X11 */ /* Define to 1 if the X Window System is missing or not being used. */ /* #undef X_DISPLAY_MISSING */ /* Define like PROTOTYPES; this can be used by system headers. */ /* #undef __PROTOTYPES */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* libgd versions < 1.8.4 need gdImageStringTTF rather than gdImageStringFT */ /* #undef gdImageStringFT */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ /* #undef inline */ /* Define to `int' if <sys/types.h> does not define. */ /* #define pid_t 1 */ /* Define to `unsigned' if <sys/types.h> does not define. */ /* #undef size_t */ /* Define as `fork' if `vfork' does not work. */ /* #undef vfork */ /* * ================================================== * Stuff not provided by config.hin (aka ./configure) * ================================================== */ #ifndef __WIN32__ # define __WIN32__ #endif #ifndef WIN32 # define WIN32 #endif /* Windows Interprocess Communication is required for mouse support. */ /* Both USE_MOUSE and WIN_IPC must be defined together in the Makefile. */ #define GP_INLINE inline #define NEAR /* gnuplot.gih is not used by wgnuplot */ #define NO_GIH 1 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/buildvms.com�������������������������������������������������������������������0000644�0004711�0000144�00000014115�10720376530�013730� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������$ ! for batch operation, set default to the gnuplot directory $ ! $ ! buildvms.com $ ! Command file to compile/link gnuplot, gnuplot_x11, and make gnuplot.hlb $ ! $ ! lph: modified for compatibility with VMS 4.x (which lacks 'if ... endif'), $ ! but made the default DECC $ ! $! set noon $ ON ERROR THEN GOTO FINISH $! $! detect compiler - drd $! if DECC is around, assume that, else gcc is preferred. Finally vaxc $ its_decc = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "") $ its_gnuc = 0 ! comment out the next line to use VAXC if gcc is also present $ its_gnuc = .not.its_decc .and. (f$trnlnm("gnu_cc").nes."") $ its_vaxc = .not. (its_decc .or. its_gnuc) $ its_decw = (f$trnlnm("DECW$INCLUDE") .nes. "") $! $! configure $ $ pfix = "/prefix=all" $ rtl = "DECCRTL" $ if .NOT. its_decc then pfix = "/nolist" $ if .NOT. its_decc then rtl = "VAXCRTL" $! $ x11 = "" $ if its_decw then x11 = "X11," $! $!----------------------------------------------------------------- $!----------------------------------------------------------------- $! customize CFLAGS for version of VMS, CRTL, and C compiler. $!----------------------------------------------------------------- $ IF F$GETSYI("ARCH_TYPE") .EQ. 1 $ THEN $! these defines work for OpenVMS VAX v6.2 and DEC C v5.7 $ CFLAGS = "/define=(PROTOTYPES,HAVE_UNISTD_H,HAVE_GETCWD,"- +"HAVE_SLEEP,''x11'NO_GIH,PIPES,DECCRTL)''pfix'" $ ELSE $! these defines work for OpenVMS Alpha v6.2 and DEC C v5.3 $ CFLAGS = "/define=(PROTOTYPES,HAVE_LGAMMA,HAVE_ERF,HAVE_UNISTD_H,HAVE_GETCWD,"- +"HAVE_SLEEP,''x11'NO_GIH,PIPES,DECCRTL)''pfix'" $ ENDIF $! $!----------------------------------------------------------------- $! $! A generic starting point $!----------------------------------------------------------------- $! $!$ CFLAGS = "/NOWARN/NOOP/DEFINE=(''x11'NO_GIH,PIPES,''rtl')''pfix'" $! $! ---------------------------------------------------------------- $! $! For VMS 4.7 and VAX C v2.4 $! ("Compiler abort - virtual memory limits exceeded" if attempt $! to include all applicable terminals, but otherwise builds OK. $! Runtime problem: an exit handler error, also w/ gcc build; $! a VAXCRTL atexit bug?) $! $! Note: VAX uses D_FLOAT, maximum exponent ca 10e +/- 38; $! will cause problems with some of the demos $! $!$ CFLAGS = "/NOOP/DEFINE=(HAVE_GETCWD, HAVE_SLEEP, "- $! +"SHORT_TERMLIST, NO_GIH,PIPES, ''rtl')" $!$! $! $!----------------------------------------------------------------- $! $! This will build with gcc v1.42 on VMS 4.7 $! (no virtual memory limit problem) $! $! gcc v1.42 string.h can prefix str routines w/ gnu_ (ifdef GCC_STRINGS) $! but the routines in GCCLIB are not prefixed w/ gcc_ :-( $! link with GCCLIB, then ignore the link warnings about multiple $! definitions of STR... in C$STRINGS $! $! GCC v1.42 has a locale.h, but neither gcc nor VMS v4.7 VAXCRTL has $! the setlocale function $! $! $! Note: _assert.c defines assert_gcc, if ndef NDEBUG, but $! cgm.trm undefines NDEBUG, so we always compile/link _assert.c $! $!$ CFLAGS = "/NOOP/DEFINE=(''x11', HAVE_GETCWD,"- $! +" HAVE_SLEEP, NO_GIH, PIPES, ''rtl')" $! $!----------------------------------------------------------------- $!----------------------------------------------------------------- $! $ TERMFLAGS = "/INCLUDE=([],[.-term])" $ $ EXTRALIB = "" $ if its_gnuc then cc := GCC/NOCASE $ if its_gnuc then EXTRALIB = ",[]_assert,GNU_CC:[000000]GCCLIB/LIB" $ $ $ CFLAGS="''cflags'" + "''pfix'" $ LINKOPT="" $! $ if .NOT. its_decc then - LINKOPT=",sys$disk:[]linkopt.vms/opt" $! $! $ if its_decw then DEFINE/NOLOG X11 DECW$INCLUDE $ if its_decw then DEFINE/NOLOG SYS SYS$LIBRARY $! $ set verify $ cc 'CFLAGS' alloc.c $ cc 'CFLAGS' binary.c $ cc 'CFLAGS' bitmap.c $ cc 'CFLAGS' command.c $ cc 'CFLAGS' contour.c $ cc 'CFLAGS' datafile.c $ cc 'CFLAGS' dynarray.c $ cc 'CFLAGS' eval.c $ cc 'CFLAGS' fit.c $ cc 'CFLAGS' graph3d.c $ cc 'CFLAGS' graphics.c $ cc 'CFLAGS' help.c $ cc 'CFLAGS' hidden3d.c $ cc 'CFLAGS' history.c $ cc 'CFLAGS' internal.c $ cc 'CFLAGS' interpol.c $ cc 'CFLAGS' matrix.c $ cc 'cflags' misc.c $ cc 'CFLAGS' parse.c $ cc 'CFLAGS' plot.c $ cc 'CFLAGS' plot2d.c $ cc 'CFLAGS' plot3d.c $ cc 'CFLAGS' save.c $ cc 'CFLAGS' scanner.c $ cc 'CFLAGS' set.c $ cc 'CFLAGS' show.c $ cc 'CFLAGS' specfun.c $ cc 'CFLAGS' standard.c $ cc 'CFLAGS' stdfn.c $ cc 'CFLAGS' tables.c $ cc 'cflags' 'TERMFLAGS' term.c $ cc 'cflags' time.c $ cc 'CFLAGS' unset.c $ cc 'CFLAGS' util.c $ cc 'CFLAGS' util3d.c $ cc 'CFLAGS' variable.c $ cc 'CFLAGS' vms.c $ cc 'CFLAGS' version.c $ if its_gnuc then cc 'CFLAGS' GNU_CC_INCLUDE:[000000]_assert.c $! $ link/exe=gnuplot.exe - alloc.obj,binary.obj,bitmap.obj,command.obj,contour.obj,dynarray.obj,- datafile.obj,eval.obj,fit.obj,graphics.obj,graph3d.obj,help.obj,hidden3d.obj,- history.obj,internal.obj,interpol.obj,matrix.obj,misc.obj,parse.obj,plot.obj,- plot2d.obj,plot3d.obj,save.obj,scanner.obj,set.obj,show.obj,specfun.obj,- standard.obj,stdfn.obj,tables.obj,tabulate.obj,term.obj,time.obj,util.obj,util3d.obj,- unset.obj,variable.obj,version.obj,vms.obj'extralib''LINKOPT' $! $ cc 'CFLAGS' bf_test.c $ link /exe=bf_test bf_test,binary,alloc 'extralib''LINKOPT' $ cd [-.demo] $ run [-.src]bf_test.exe $ cd [-.src] $ if .NOT. its_decw then goto do_docs $! $ CC 'CFLAGS' GPLT_X11 $ CC 'CFLAGS' stdfn.c $ LINK /exe=GNUPLOT_X11 gplt_x11 'extralib''LINKOPT',SYS$INPUT:/OPT SYS$SHARE:DECW$XLIBSHR/SHARE $! $DO_DOCS: $ SET DEF [-.DOCS] $ if f$locate("ALL_TERM_DOC",CFLAGS).ne.f$length(CFLAGS) then - copy /concatenate [-.term]*.trm []allterm.h $ cc 'CFLAGS' /OBJ=doc2rnh.obj/include=([],[-],[-.term],[-.src]) doc2rnh.c $ cc 'CFLAGS' /OBJ=termdoc.obj/include=([],[-],[-.term],[-.src]) termdoc.c $ SET DEF [-.src] ! LINKOPT is defined as being in [] $ link [-.docs]doc2rnh.obj,termdoc.obj /exe=[-.docs]doc2rnh 'extralib''LINKOPT' $ doc2rnh := $sys$disk:[-.docs]doc2rnh $ doc2rnh [-.docs]gnuplot.doc [-.docs]gnuplot.rnh $ RUNOFF [-.docs]gnuplot.rnh $ library/create/help sys$disk:[]gnuplot.hlb gnuplot.hlp $! $ if its_decw then - write sys$output "%define GNUPLOT_X11 :== $Disk:[directory]GNUPLOT_X11" $! $FINISH: $ set noverify $ if its_decw then deassign x11 $ exit ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/makefile.cyg�������������������������������������������������������������������0000644�0004711�0000144�00000030051�11552535527�013670� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Hey, Emacs, this is a -*- Makefile -*- # # $Id: makefile.cyg,v 1.35 2011/04/17 10:05:11 markisch Exp $ # # # GNUPLOT Makefile for Cygwin on WinNT and Win95/98/2000 # # To compile gnuplot for WinXX: # # - check the beginning of this file settings you may want to change # You'll have to tell it where to find the Help Compiler, among other # things. # - compile the package: go to directory 'gnuplot' and issue the commands # make -C src -f ../config/makefile.cyg # make install -C src -f ../config/makefile.cyg # - resource compiler used is windres.exe in Cygwin # - note pdf, png, and gif libraries if used have to be build for Cygwin # with -mno-cygwin option # - -static used for static linking to libz-w.a and libpng-w.a # # # ************** Begin of Configuration section ************************ # # Choose target to compile: # 1. wgnuplot.exe: The usual Windows GUI for input commands. # 2. wgnuplot_pipes.exe: The usual Windows GUI with support of pipes, so # that e.g. plot '<awk -f preprocess.awk my.dat') or x=system('ls -1') # can work. Drawback: wgnuplot_pipes.exe keeps attached to a console (DOS) # window it was launched from, or it opens a new one. # 3. gnuplot.exe: Console mode instead of GUI for the text input. # # Comment for programs using gnuplot as their plotting engine: # Both wgnuplot*.exe compile also pgnuplot.exe. This small helper program was # used when gnuplot.exe was not available on Windows. Nowadays, pgnuplot.exe # is deprecated -- plese use gnuplot.exe instead. TARGET=wgnuplot.exe #TARGET=wgnuplot_pipes.exe #TARGET=gnuplot.exe # Comment out the definition lines to disable the according features: # GIF, PNG, JPEG device drivers # Requires gd library. There are two possibilities how to configure these # drivers for use in gnuplot, depending on the gd version. See README.1ST for # more details. # # You should compile gnuplot with GD library v2.0 or newer. # This library writes PNG, GIF and JPEG images. # If libgd has been compiled with TrueType font support, then you can use # scaled TrueType fonts in png images. If not, then uncomment FREETYPE. # Requires GD, PNG and Z libraries, optionally libfreetype. # NEWGD=1 JPEG=1 FREETYPE=1 # PDF device driver # requires PNG and Z libraries based on particular PDF library used #PDF=1 # DEBUGging support # creates binaries suitable for debugging. Some bugs may come and go # as opposed to a production build since we lower the optimization level #DEBUG=1 # MOUSE support for the windows terminal MOUSE=1 # Below you can adapt paths according to your software setup: # Where to place gnuplot.gih helpfile: HELPFILE = wgnuplot.hlp # Where to install the PostScript prologue files, relatively to the executable # wgnuplot.exe GNUPLOT_PS_DIR = share/PostScript # Similarly for javascript files for the canvas terminal: GNUPLOT_JS_DIR = share/js # Similarly for lua scripts used by the lua terminal GNUPLOT_LUA_DIR = share/lua # Destination directory, used in 'make install': DESTDIR = /cygdrive/c/Apps/gnuplot # give here the path to Gygwin GCC compiler unless it is already in PATH #GCCPATH = /bin/ #GCCPATH = # Do you want some special optimization? CFLAGS = # To compile the .hlp file you need hcw either out of Microsoft SDK or MS Help # Workshop. The latter can be obtained at www.helpmaster.com/help/devaids.htm. # Put the path to hcw here unless it is already in PATH: HCWPATH = /cygdrive/c/Program\ Files/Help\ Workshop/ HCW = $(HCWPATH)hcw # Switches are for HCW 4.03: HCWFLAG = # Choose which windres/rc do you want to use (GNU windres or MS RC): GNU_RC = 1 ifndef GNU_RC # If uncommented GNU_RC above and rc.exe not in PATH, then set: MSSDK = c:/mssdk endif # GNU sort #GNUSORT = gsort.exe GNUSORT = /usr/bin/sort # # *************** End of Configuration section ************************* # # There shouldn't be anything to be changed below this line # ********************************************************************** # # PIPES: define if you would prefer support of pipes undef Windows (e.g. # plot '<awk -f preprocess.awk my.dat'). Drawback: wgnuplot_pipes.exe keeps # attached to a console=DOS window it was launched from, or it opens a new one. # Note: Maybe it does not work properly with pgnuplot (not tested recently). # CONSOLE: define if you would prefer the console (non-GUI) version of the # text command window. # Set PGNUPLOT, PIPES and CONSOLE according to the target ifeq ($(TARGET),wgnuplot.exe) PGNUPLOT=pgnuplot.exe endif ifeq ($(TARGET),wgnuplot_pipes.exe) PGNUPLOT=pgnuplot.exe PIPES=1 endif ifeq ($(TARGET),gnuplot.exe) PIPES=1 CONSOLE=1 endif CC = $(GCCPATH)gcc LD = $(GCCPATH)gcc RM = rm -f CP = cp -p ifdef DEBUG CFLAGS += -g LDFLAGS += -g else CFLAGS += -O2 LDFLAGS += -s endif ifdef PIPES OPTS += -DPIPES LDFLAGS2 = -mconsole endif ifdef CONSOLE OPTS += -DWGP_CONSOLE LDFLAGS2 = -mconsole endif TOP = .. TERMFLAGS = -DGNUPLOT_PS_DIR=\"$(GNUPLOT_PS_DIR)\" -DGNUPLOT_JS_DIR=\"$(GNUPLOT_JS_DIR)\" TERMFLAGS += -DGNUPLOT_LUA_DIR=\"$(GNUPLOT_LUA_DIR)\" -I$(TOP)/term TERMLIBS = CFLAGS += -I. -D_Windows -DCYGWIN -mno-cygwin -DHAVE_CONFIG_H\ $(OPTS) # -I/usr/local/include ifdef MOUSE CFLAGS += -DUSE_MOUSE=1 -DWIN_IPC endif ifdef NEWGD GD=1 PNG=1 endif ifdef GD CFLAGS += -DHAVE_LIBGD TERMLIBS += -lgd endif ifdef PNG CFLAGS += -DHAVE_LIBPNG TERMLIBS += -lpng -lz endif ifdef NEWGD CFLAGS += -DHAVE_GD_GIF -DGIF_ANIMATION -DHAVE_GD_PNG ifdef JPEG CFLAGS += -DHAVE_GD_JPEG TERMLIBS += -ljpeg endif ifdef FREETYPE CFLAGS += -DHAVE_GD_TTF TERMLIBS += -lfreetype endif endif ifdef PDF CFLAGS += -DHAVE_LIBPDF TERMLIBS += -lpdf-w -ltiff-w ifndef PNG NEED_PNG_W = 1 else ifndef NEWGD NEED_PNG_W = 1 endif endif ifdef NEED_PNG_W CFLAGS += -DHAVE_LIBPNG TERMLIBS += -lpng-w -lz-w endif endif ifdef GNU_RC # RC = /bin/windres RC = $(GCCPATH)windres RCFLAGS = --include-dir win \ --define __WIN32__ --define __WIN95__ --define MSRC \ --define __GNUWIN32__ --define WIN32 RCOUT = wgplt_res.$(O) RES2COFF = echo wgplt_res.$(O) else RC = $(MSSDK)/bin/rc RCFLAGS = -v -i$(MSSDK)/include -iwin \ -dWIN32 -dMSRC RCOUT = -fowgnuplot.res RES2COFF = res2coff -i wgnuplot.res -o wgplt_res.$(O) endif # macros for makefile.all O=o T=../term/ D=../docs/ L=docs/latex/ M=../demo/ default: $(TARGET) $(HELPFILE) wgnuplot.mnu $(M)bf_test.exe $(PGNUPLOT) all: default gnuplot.ps gnuplot.pdf # include the 'core makefile template' include makefile.all OBJS = $(COREOBJS) version.$(O) gpexecute.$(O) WINOBJS = winmain.$(O) wgnuplib.$(O) wgraph.$(O) wprinter.$(O) wtext.$(O) \ wpause.$(O) wmenu.$(O) WINDOWS = makefile.win makefile.nt README.win win/wcommon.h \ win/wgnuplib.c win/wgnuplib.h win/wgnuplib.rc \ win/wgnuplot.hpj win/wgnuplot.mnu win/wgraph.c \ win/winmain.c win/wmenu.c win/wpause.c win/wprinter.c \ win/wresourc.h win/wtext.c win/wtext.h win/geticon.c \ $(D)doc2rtf.c $(T)win.trm win/grpicon.ico win/texticon.ico # default rules .SUFFIXES: .exe .o .c .c.o: $(CC) -c $(CFLAGS) $*.c LDLIBS = -L/usr/local/lib -lkernel32 -lgdi32 $(TARGET): $(OBJS) $(WINOBJS) wgplt_res.$(O) texticon.ico grpicon.ico $(LD) $(LDFLAGS) $(LDFLAGS2) -mwindows -mno-cygwin -o $@ \ $(OBJS) $(WINOBJS) wgplt_res.$(O) $(LDLIBS) $(TERMLIBS) $(PGNUPLOT): win/pgnuplot.c version.$(O) gcc -O2 -s -mno-cygwin -DHAVE_STDBOOL_H -o $@ \ win/pgnuplot.c version.$(O) -I. -luser32 # Rules: wgplt_res.$(O): win/wgnuplot.rc win/wgnuplib.rc win/wresourc.h texticon.ico grpicon.ico $(RC) $(RCFLAGS) win/wgnuplot.rc $(RCOUT) --include-dir=win $(RES2COFF) show.$(O): show.c plot.h setshow.h $(CC) -c $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" -DBINDIR=\"$(bindir)\" $< term.$(O): term.c term.h plot.h setshow.h bitmap.h $(CORETERM) $(CC) -c $(CFLAGS) $(TERMFLAGS) $< version.$(O): version.c WINDEPS = win/wgnuplib.h win/wcommon.h win/wresourc.h winmain.$(O): win/winmain.c win/wgnuplib.h win/wtext.h plot.h $(CC) -c $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" win/winmain.c wgnuplib.$(O): win/wgnuplib.c $(WINDEPS) $(CC) -c $(CFLAGS) win/wgnuplib.c wmenu.$(O): win/wmenu.c $(WINDEPS) $(CC) -c $(CFLAGS) win/wmenu.c wtext.$(O): win/wtext.c $(WINDEPS) $(CC) -c $(CFLAGS) win/wtext.c wpause.$(O): win/wpause.c $(WINDEPS) $(CC) -c $(CFLAGS) win/wpause.c wprinter.$(O): win/wprinter.c $(WINDEPS) $(CC) -c $(CFLAGS) win/wprinter.c wgraph.$(O): win/wgraph.c $(WINDEPS) $(CC) -c $(CFLAGS) win/wgraph.c wgnuplot.mnu: win/wgnuplot.mnu $(CP) $^ $@ # extract icons from wgnuplot.rc texticon.ico: grpicon.ico grpicon.ico: geticon.exe win/wgnuplot.rc ./geticon win/wgnuplot.rc geticon.exe: win/geticon.c $(LD) $(LDFLAGS) -o $@ win/geticon.c # convert gnuplot.doc to gnuplot.rtf $(HELPFILE): doc2rtf.exe $(D)gnuplot.doc win/wgnuplot.hpj ./doc2rtf $(D)gnuplot.doc win/gnuplot.rtf $(HCW) /c /e win/wgnuplot.hpj doc2rtf.exe: $(D)doc2rtf.c $(D)termdoc.c $(D)xref.c $(LD) $(LDFLAGS) -o $@ -DWINDOWS_NO_GUI $(CFLAGS) -I. -I$(D) -I$(T) $^ #make binary demo files $(M)bf_test.exe : bf_test.c dbinary.$(O) alloc.$(O) $(LD) $(LDFLAGS) $(CFLAGS) -U_Windows -o $@ $^ (cd ../demo ; ./bf_test.exe ) # _Windows causes wtext.h to define fread() etc dbinary.$(O): binary.c $(CC) -c $(CFLAGS) -U_Windows -o $@ $< # # Create config.h # $(OBJS) $(WINOBJS) dbinary.$(O): config.h config.h: ../config/config.cyg cp -p $< $@ # Create documentation in various formats # ALL_TERMINALS_DOC=1 ifdef ALL_TERMINALS_DOC # Generate TeX documentation with the complete list of all terminals # (gnuplot.tex should be the same on all platforms): SORT_TERMINALS=1 ifdef SORT_TERMINALS # sort alphabetically all terminals (note: req. GNU sort, not from MS) allterm.h: $(CORETERM) @echo "Building allterm.h" @for e in `egrep "^[ ]*START_HELP" $(CORETERM) |\ $(GNUSORT) -f -t':' -k2` ; do \ f=`echo $$e |cut -d\: -f1` ; s=`echo $$e | cut -d\: -f2` ;\ sed -n "/^[ ]*$$s/,/^[ ]*END_HELP/p" $$f ; \ done >$@ else # sequence of terminals according to "ls term/*.trm": allterm.h: $(CORETERM) @echo "Building allterm.h" @cat ../term/*.trm > allterm.c $(CPP) $(CFLAGS) -I$../term -DTERM_DRIVER_H -DTERM_HELP allterm.c | \ sed '/^ *$$/d;/^#/d' > allterm.h @rm -f allterm.c endif doc2tex.exe: $(D)doc2tex.c $(D)termdoc.c allterm.h $(LD) $(LDFLAGS) -o $@ -DWINDOWS_NO_GUI -DALL_TERM_DOC $(CFLAGS) -I. -I$(D) -I../term -I$(T) $(D)doc2tex.c $(D)termdoc.c else # Old version: generate documentation with only currently used terminals: doc2tex.exe: $(D)doc2tex.c $(D)termdoc.c $(LD) $(LDFLAGS) -o $@ -DWINDOWS_NO_GUI $(CFLAGS) -I. -I$(D) -I$(T) $^ endif gnuplot.tex: $(D)gnuplot.doc doc2tex.exe doc2tex $(D)gnuplot.doc gnuplot.tex # Call LaTeX three times to get the toc right. gnuplot.dvi: gnuplot.tex $(D)titlepag.tex cp gnuplot.tex $(D)gp_tex2.tex cp $(D)../VERSION $(D) cd $(D) && latex gp_tex2.tex && latex gp_tex2.tex && latex gp_tex2.tex mv $(D)gp_tex2.dvi gnuplot.dvi rm -f $(D)gp_tex2.* gnuplot.ps: gnuplot.dvi dvips -o gnuplot.ps gnuplot.dvi gnuplot.pdf: gnuplot.tex $(D)titlepag.tex cp gnuplot.tex $(D)gp_tex2.tex cp $(D)../VERSION $(D) cd $(D) && pdflatex gp_tex2.tex && pdflatex gp_tex2.tex \ && pdflatex gp_tex2.tex mv $(D)gp_tex2.pdf gnuplot.pdf rm -f $(D)gp_tex2.* # clean up temporary files clean: $(RM) config.h *.$(O) wgnuplot.map wgnuplot.res win/gnuplot.rtf $(RM) doc2rtf.exe win/wgnuplib.res wgnuplib.map wgnuplot.lib $(RM) $(M)bf_test.exe *.ico geticon.exe allterm.h allterm.c $(RM) gnuplot.tex gnuplot.dvi gnuplot.ps gnuplot.pdf realclean: veryclean veryclean: clean $(RM) wgnuplot.exe wgnuplot_pipes.exe gnuplot.exe pgnuplot.exe $(RM) wgnuplot.hlp wgnuplot.gid $(RM) $(M)binary[123] $(M)fit.log $(M)soundfit.par # now move the whole stuff to its destination install: default mkdir -p $(DESTDIR) cp gnuplot.exe $(DESTDIR)/gnuplot.exe cp wgnuplot.exe $(DESTDIR)/wgnuplot.exe cp wgnuplot_pipes.exe $(DESTDIR)/wgnuplot_pipes.exe cp pgnuplot.exe $(DESTDIR)/pgnuplot.exe cp win/wgnuplot.mnu $(DESTDIR)/wgnuplot.mnu cp wgnuplot.hlp $(DESTDIR)/wgnuplot.hlp mkdir -p $(DESTDIR)/$(GNUPLOT_PS_DIR) cp ../term/PostScript/*.ps $(DESTDIR)/$(GNUPLOT_PS_DIR) mkdir -p $(DESTDIR)/$(GNUPLOT_LUA_DIR) cp ../term/lua/* $(DESTDIR)/$(GNUPLOT_LUA_DIR) mkdir -p $(DESTDIR)/$(GNUPLOT_JS_DIR) cp ../term/js/* $(DESTDIR)/$(GNUPLOT_JS_DIR) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/cygwin/������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340010�012661� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/cygwin/Makefile����������������������������������������������������������������0000644�0004711�0000144�00000030421�11552535527�014350� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Hey, Emacs, this is a -*- Makefile -*- # # $Id: Makefile,v 1.4 2011/04/17 10:05:11 markisch Exp $ # # # GNUPLOT Makefile for Cygwin on WinNT and Win95/98/2000 # # To compile gnuplot for WinXX: # # - check the beginning of this file settings you may want to change # You'll have to tell it where to find the Help Compiler, among other # things. # - compile the package: go to directory 'gnuplot' and issue the commands # make -C config/cygwin # make install -C config/cygwin # - resource compiler used is windres.exe in Cygwin # - note pdf, png, and gif libraries if used have to be build for Cygwin # with -mno-cygwin option # - -static used for static linking to libz-w.a and libpng-w.a # # # ************** Begin of Configuration section ************************ # # Choose target to compile: # 1. wgnuplot.exe: The usual Windows GUI for input commands. # 2. wgnuplot_pipes.exe: The usual Windows GUI with support of pipes, so # that e.g. plot '<awk -f preprocess.awk my.dat') or x=system('ls -1') # can work. Drawback: wgnuplot_pipes.exe keeps attached to a console (DOS) # window it was launched from, or it opens a new one. # 3. gnuplot.exe: Console mode instead of GUI for the text input. # # Comment for programs using gnuplot as their plotting engine: # Both wgnuplot*.exe compile also pgnuplot.exe. This small helper program was # used when gnuplot.exe was not available on Windows. Nowadays, pgnuplot.exe # is deprecated -- plese use gnuplot.exe instead. TARGET=wgnuplot.exe #TARGET=wgnuplot_pipes.exe #TARGET=gnuplot.exe # Comment out the definition lines to disable the according features: # GIF, PNG, JPEG device drivers # Requires gd library. There are two possibilities how to configure these # drivers for use in gnuplot, depending on the gd version. See README.1ST for # more details. # # You should compile gnuplot with GD library v2.0 or newer. # This library writes PNG, GIF and JPEG images. # If libgd has been compiled with TrueType font support, then you can use # scaled TrueType fonts in png images. If not, then uncomment FREETYPE. # Requires GD, PNG and Z libraries, optionally libfreetype. # #NEWGD=1 #JPEG=1 #FREETYPE=1 # PDF device driver # requires PNG and Z libraries based on particular PDF library used #PDF=1 # DEBUGging support # creates binaries suitable for debugging. Some bugs may come and go # as opposed to a production build since we lower the optimization level #DEBUG=1 # MOUSE support for the windows terminal MOUSE=1 # Below you can adapt paths according to your software setup: # Where to place gnuplot.gih helpfile: HELPFILE = wgnuplot.hlp # Where to install the PostScript prologue files, relatively to the executable # wgnuplot.exe GNUPLOT_PS_DIR = share/PostScript # Similarly for javascript files for the canvas terminal: GNUPLOT_JS_DIR = share/js # Similarly for lua scripts used by the lua terminal GNUPLOT_LUA_DIR = share/lua # Destination directory, used in 'make install': DESTDIR = /cygdrive/c/Apps/gnuplot # give here the path to Gygwin GCC compiler unless it is already in PATH #GCCPATH = /bin/ #GCCPATH = # Do you want some special optimization? CFLAGS = # To compile the .hlp file you need hcw either out of Microsoft SDK or MS Help # Workshop. The latter can be obtained at www.helpmaster.com/help/devaids.htm. # Put the path to hcw here unless it is already in PATH: HCWPATH = /cygdrive/c/Program\ Files/Help\ Workshop/ HCW = $(HCWPATH)hcw # Switches are for HCW 4.03: HCWFLAG = # Choose which windres/rc do you want to use (GNU windres or MS RC): GNU_RC = 1 ifndef GNU_RC # If uncommented GNU_RC above and rc.exe not in PATH, then set: MSSDK = c:/mssdk endif # GNU sort #GNUSORT = gsort.exe GNUSORT = /usr/bin/sort # # *************** End of Configuration section ************************* # # There shouldn't be anything to be changed below this line # ********************************************************************** # # PIPES: define if you would prefer support of pipes undef Windows (e.g. # plot '<awk -f preprocess.awk my.dat'). Drawback: wgnuplot_pipes.exe keeps # attached to a console=DOS window it was launched from, or it opens a new one. # Note: Maybe it does not work properly with pgnuplot (not tested recently). # CONSOLE: define if you would prefer the console (non-GUI) version of the # text command window. # Set PGNUPLOT, PIPES and CONSOLE according to the target ifeq ($(TARGET),wgnuplot.exe) PGNUPLOT=pgnuplot.exe endif ifeq ($(TARGET),wgnuplot_pipes.exe) PGNUPLOT=pgnuplot.exe PIPES=1 endif ifeq ($(TARGET),gnuplot.exe) PIPES=1 CONSOLE=1 endif CC = $(GCCPATH)gcc-3 LD = $(CC) RM = rm -f CP = cp -p ifdef DEBUG CFLAGS += -g LDFLAGS += -g else CFLAGS += -O2 LDFLAGS += -s endif ifdef PIPES OPTS += -DPIPES LDFLAGS2 = -mconsole endif ifdef CONSOLE OPTS += -DWGP_CONSOLE LDFLAGS2 = -mconsole endif TOP = ../.. # macros for makefile.all O=o S=$(TOP)/src W=$(S)/win T=$(TOP)/term/ D=$(TOP)/docs/ L=docs/latex/ M=$(TOP)/demo/ VPATH = $(S) TERMFLAGS = -DGNUPLOT_PS_DIR=\"$(GNUPLOT_PS_DIR)\" -DGNUPLOT_JS_DIR=\"$(GNUPLOT_JS_DIR)\" TERMFLAGS += -DGNUPLOT_LUA_DIR=\"$(GNUPLOT_LUA_DIR)\" -I$(TOP)/term TERMLIBS = CFLAGS += -I. -I$(S) -D_Windows -DCYGWIN -mno-cygwin -DHAVE_CONFIG_H\ $(OPTS) # -I/usr/local/include ifdef MOUSE CFLAGS += -DUSE_MOUSE=1 -DWIN_IPC endif ifdef NEWGD GD=1 PNG=1 endif ifdef GD CFLAGS += -DHAVE_LIBGD TERMLIBS += -lgd endif ifdef PNG CFLAGS += -DHAVE_LIBPNG TERMLIBS += -lpng -lz endif ifdef NEWGD CFLAGS += -DHAVE_GD_GIF -DGIF_ANIMATION -DHAVE_GD_PNG ifdef JPEG CFLAGS += -DHAVE_GD_JPEG TERMLIBS += -ljpeg endif ifdef FREETYPE CFLAGS += -DHAVE_GD_TTF TERMLIBS += -lfreetype endif endif ifdef PDF CFLAGS += -DHAVE_LIBPDF TERMLIBS += -lpdf-w -ltiff-w ifndef PNG NEED_PNG_W = 1 else ifndef NEWGD NEED_PNG_W = 1 endif endif ifdef NEED_PNG_W CFLAGS += -DHAVE_LIBPNG TERMLIBS += -lpng-w -lz-w endif endif ifdef GNU_RC # RC = /bin/windres RC = $(GCCPATH)windres RCFLAGS = --include-dir win \ --define __WIN32__ --define __WIN95__ --define MSRC \ --define __GNUWIN32__ --define WIN32 RCOUT = wgplt_res.$(O) RES2COFF = echo wgplt_res.$(O) else RC = $(MSSDK)/bin/rc RCFLAGS = -v -i$(MSSDK)/include -iwin \ -dWIN32 -dMSRC RCOUT = -fowgnuplot.res RES2COFF = res2coff -i wgnuplot.res -o wgplt_res.$(O) endif default: $(TARGET) $(HELPFILE) wgnuplot.mnu $(M)bf_test.exe $(PGNUPLOT) all: default gnuplot.ps gnuplot.pdf # include the 'core makefile template' include $(S)/makefile.all OBJS = $(COREOBJS) version.$(O) gpexecute.$(O) WINOBJS = winmain.$(O) wgnuplib.$(O) wgraph.$(O) wprinter.$(O) wtext.$(O) \ wpause.$(O) wmenu.$(O) screenbuf.$(O) WINDOWS = makefile.win makefile.nt README.win $(W)/wcommon.h \ $(W)/wgnuplib.c $(W)/wgnuplib.h $(W)/wgnuplib.rc \ $(W)/wgnuplot.hpj $(W)/wgnuplot.mnu $(W)/wgraph.c \ $(W)/winmain.c $(W)/wmenu.c $(W)/wpause.c $(W)/wprinter.c \ $(W)/wresourc.h $(W)/wtext.c $(W)/wtext.h $(W)/geticon.c \ $(W)/screenbuf.c $(W)/screenbuf.h \ $(D)doc2rtf.c $(T)win.trm $(W)/grpicon.ico $(W)/texticon.ico # default rules .SUFFIXES: .exe .o .c .c.o: $(CC) -c $(CFLAGS) $< LDLIBS = -L/usr/local/lib -lkernel32 -lgdi32 -lmsimg32 -lcomctl32 $(TARGET): $(OBJS) $(WINOBJS) wgplt_res.$(O) texticon.ico grpicon.ico $(LD) $(LDFLAGS) $(LDFLAGS2) -mwindows -mno-cygwin -o $@ \ $(OBJS) $(WINOBJS) wgplt_res.$(O) $(LDLIBS) $(TERMLIBS) $(PGNUPLOT): $(W)/pgnuplot.c version.$(O) $(CC) -O2 -s -mno-cygwin -DHAVE_STDBOOL_H -o $@ \ $(W)/pgnuplot.c version.$(O) -I$(W) -I$(S) -luser32 # Rules: wgplt_res.$(O): $(W)/wgnuplot.rc $(W)/wgnuplib.rc $(W)/wresourc.h texticon.ico grpicon.ico $(RC) $(RCFLAGS) $(W)/wgnuplot.rc $(RCOUT) --include-dir=win $(RES2COFF) show.$(O): show.c plot.h setshow.h $(CC) -c $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" -DBINDIR=\"$(bindir)\" $< term.$(O): term.c term.h plot.h setshow.h bitmap.h $(CORETERM) $(CC) -c $(CFLAGS) $(TERMFLAGS) $< version.$(O): version.c WINDEPS = $(W)/wgnuplib.h $(W)/wcommon.h $(W)/wresourc.h winmain.$(O): $(W)/winmain.c $(W)/wgnuplib.h $(W)/wtext.h plot.h $(CC) -c $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" $(W)/winmain.c wgnuplib.$(O): $(W)/wgnuplib.c $(WINDEPS) $(CC) -c $(CFLAGS) $(W)/wgnuplib.c wmenu.$(O): $(W)/wmenu.c $(WINDEPS) $(CC) -c $(CFLAGS) $(W)/wmenu.c wtext.$(O): $(W)/wtext.c $(WINDEPS) $(CC) -c $(CFLAGS) $(W)/wtext.c wpause.$(O): $(W)/wpause.c $(WINDEPS) $(CC) -c $(CFLAGS) $(W)/wpause.c wprinter.$(O): $(W)/wprinter.c $(WINDEPS) $(CC) -c $(CFLAGS) $(W)/wprinter.c wgraph.$(O): $(W)/wgraph.c $(WINDEPS) $(CC) -c $(CFLAGS) $(W)/wgraph.c screenbuf.$(O): $(W)/screenbuf.c $(WINDEPS) $(CC) -c $(CFLAGS) $(W)/screenbuf.c wgnuplot.mnu: $(W)/wgnuplot.mnu $(CP) $^ $@ # extract icons from wgnuplot.rc texticon.ico: grpicon.ico grpicon.ico: geticon.exe $(W)/wgnuplot.rc ./geticon $(W)/wgnuplot.rc geticon.exe: $(W)/geticon.c $(LD) $(LDFLAGS) -o $@ $(W)/geticon.c # convert gnuplot.doc to gnuplot.rtf $(HELPFILE): doc2rtf.exe $(D)gnuplot.doc $(W)/wgnuplot.hpj ./doc2rtf $(D)gnuplot.doc $(W)/gnuplot.rtf $(HCW) /c /e $(W)/wgnuplot.hpj doc2rtf.exe: $(D)doc2rtf.c $(D)termdoc.c $(D)xref.c $(LD) $(LDFLAGS) -o $@ -DWINDOWS_NO_GUI $(CFLAGS) -I$(S) -I$(D) -I$(T) $^ #make binary demo files $(M)bf_test.exe : bf_test.c dbinary.$(O) alloc.$(O) $(LD) $(LDFLAGS) $(CFLAGS) -U_Windows -o $@ $^ (cd $(M) ; ./bf_test.exe ) # _Windows causes wtext.h to define fread() etc dbinary.$(O): binary.c $(CC) -c $(CFLAGS) -U_Windows -o $@ $< # # Create config.h # $(OBJS) $(WINOBJS) dbinary.$(O): config.h config.h: $(TOP)/config/config.cyg cp -p $< $@ # Create documentation in various formats # ALL_TERMINALS_DOC=1 ifdef ALL_TERMINALS_DOC # Generate TeX documentation with the complete list of all terminals # (gnuplot.tex should be the same on all platforms): SORT_TERMINALS=1 ifdef SORT_TERMINALS # sort alphabetically all terminals (note: req. GNU sort, not from MS) allterm.h: $(CORETERM) @echo "Building allterm.h" @for e in `egrep "^[ ]*START_HELP" $(CORETERM) |\ $(GNUSORT) -f -t':' -k2` ; do \ f=`echo $$e |cut -d\: -f1` ; s=`echo $$e | cut -d\: -f2` ;\ sed -n "/^[ ]*$$s/,/^[ ]*END_HELP/p" $$f ; \ done >$@ else # sequence of terminals according to "ls term/*.trm": allterm.h: $(CORETERM) @echo "Building allterm.h" @cat $(T)*.trm > allterm.c $(CPP) $(CFLAGS) -I$(T) -DTERM_DRIVER_H -DTERM_HELP allterm.c | \ sed '/^ *$$/d;/^#/d' > allterm.h @rm -f allterm.c endif doc2tex.exe: $(D)doc2tex.c $(D)termdoc.c allterm.h $(LD) $(LDFLAGS) -o $@ -DWINDOWS_NO_GUI -DALL_TERM_DOC $(CFLAGS) -I. -I$(D) -I$(T) $(D)doc2tex.c $(D)termdoc.c else # Old version: generate documentation with only currently used terminals: doc2tex.exe: $(D)doc2tex.c $(D)termdoc.c $(LD) $(LDFLAGS) -o $@ -DWINDOWS_NO_GUI $(CFLAGS) -I. -I$(D) -I$(T) $^ endif gnuplot.tex: $(D)gnuplot.doc doc2tex.exe doc2tex $(D)gnuplot.doc gnuplot.tex # Call LaTeX three times to get the toc right. gnuplot.dvi: gnuplot.tex $(D)titlepag.tex cp gnuplot.tex $(D)gp_tex2.tex cp $(TOP)/VERSION $(D) cd $(D) && latex gp_tex2.tex && latex gp_tex2.tex && latex gp_tex2.tex mv $(D)gp_tex2.dvi gnuplot.dvi rm -f $(D)gp_tex2.* gnuplot.ps: gnuplot.dvi dvips -o gnuplot.ps gnuplot.dvi gnuplot.pdf: gnuplot.tex $(D)titlepag.tex cp gnuplot.tex $(D)gp_tex2.tex cp $(TOP)/VERSION $(D) cd $(D) && pdflatex gp_tex2.tex && pdflatex gp_tex2.tex \ && pdflatex gp_tex2.tex mv $(D)gp_tex2.pdf gnuplot.pdf rm -f $(D)gp_tex2.* # clean up temporary files clean: $(RM) config.h *.$(O) wgnuplot.map wgnuplot.res $(W)/gnuplot.rtf $(RM) doc2rtf.exe $(W)/wgnuplib.res wgnuplib.map wgnuplot.lib $(RM) $(M)bf_test.exe *.ico geticon.exe allterm.h allterm.c $(RM) gnuplot.tex gnuplot.dvi gnuplot.ps gnuplot.pdf realclean: veryclean veryclean: clean $(RM) wgnuplot.exe wgnuplot_pipes.exe gnuplot.exe pgnuplot.exe $(RM) wgnuplot.hlp wgnuplot.gid wgnuplot.mnu $(RM) $(M)binary[123] $(M)fit.log $(M)soundfit.par # now move the whole stuff to its destination install: default mkdir -p $(DESTDIR) cp gnuplot.exe $(DESTDIR)/gnuplot.exe cp wgnuplot.exe $(DESTDIR)/wgnuplot.exe cp wgnuplot_pipes.exe $(DESTDIR)/wgnuplot_pipes.exe cp pgnuplot.exe $(DESTDIR)/pgnuplot.exe cp $(W)/wgnuplot.mnu $(DESTDIR)/wgnuplot.mnu cp wgnuplot.hlp $(DESTDIR)/wgnuplot.hlp mkdir -p $(DESTDIR)/$(GNUPLOT_PS_DIR) cp $(T)PostScript/*.ps $(DESTDIR)/$(GNUPLOT_PS_DIR) mkdir -p $(DESTDIR)/$(GNUPLOT_LUA_DIR) cp $(T)lua/* $(DESTDIR)/$(GNUPLOT_LUA_DIR) mkdir -p $(DESTDIR)/$(GNUPLOT_JS_DIR) cp $(T)js/* $(DESTDIR)/$(GNUPLOT_JS_DIR) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/config.mgw���������������������������������������������������������������������0000644�0004711�0000144�00000042617�11705316753�013401� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* config.h for mingw/Makefile * * Prepared according to config.h from ./configure and by means of * config_strip.sh as of gnuplot 4.6 in January 2012. */ /* Define to allow use of deprecated syntax and terminal behaviour. */ /* #undef BACKWARDS_COMPATIBLE */ /* Define if you want to use the CGI terminal under SCO. */ /* #undef CGI */ /* Define if you want online help and subtopic tables sorted by column. */ /* #undef COLUMN_HELP */ /* Define to treat spacebar like any other keystroke. */ /* #undef DISABLE_SPACE_RAISES_CONSOLE */ /* Contact address for modified and binary distributed gnuplot versions */ /* #undef DIST_CONTACT */ /* Define if you want to use libgrx20 with MSDOS/djgpp. */ /* #undef DJSVGA */ /* Define if this system uses a 32-bit DOS extender (djgpp/emx). */ /* #undef DOS32 */ /* Define to allow placement of rectangles and other objects */ #define EAM_OBJECTS 1 /* Define if color information should be passed for each vertex. */ /* #undef EXTENDED_COLOR_SPECS */ /* Define if you want to supply pre-existing X11 windows. */ #define EXTERNAL_X11_WINDOW 1 /* Define if <errno.h> declares errno. */ /* #undef EXTERN_ERRNO */ /* Define if libgd supports animated gifs. */ /* #undef GIF_ANIMATION */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define if you want to use a gnuplot history file. */ #define GNUPLOT_HISTORY 1 /* Define to allow command line macros. */ #define GP_MACROS 1 /* Define if you want to use a newer version of libgrx under MSDOS/djgpp. */ /* #undef GRX21 */ /* Define to 1 if you have the <3dkit.h> header file. */ /* #undef HAVE_3DKIT_H */ /* Define to 1 if you have the `atexit' function. */ #define HAVE_ATEXIT 1 /* Define to 1 if you have the `bcopy' function. */ /* #undef HAVE_BCOPY */ /* Define to 1 if you have the `bzero' function. */ /* #undef HAVE_BZERO */ /* libcairo support for eps (cairo >= 1.6) */ /* #undef HAVE_CAIROEPS */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define if you want the cairo-based terminals. */ /* #undef HAVE_CAIROPDF */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define to 1 if you have the declaration of `signgam', and to 0 if you don't. */ #define HAVE_DECL_SIGNGAM 0 /* Define to 1 if you have the <dirent.h> header file. */ #define HAVE_DIRENT_H 1 /* Define to 1 if you have the `doprnt' function. */ /* #undef HAVE_DOPRNT */ /* Define to 1 if you have the <editline/readline.h> header file. */ /* #undef HAVE_EDITLINE_READLINE_H */ /* Define to 1 if you have the `erf' function. */ #if __GNUC__ >= 3 # define HAVE_ERF 1 #endif /* Define to 1 if you have the `erfc' function. */ #if __GNUC__ >= 3 # define HAVE_ERFC 1 #endif /* Define to 1 if you have the <errno.h> header file. */ #define HAVE_ERRNO_H 1 /* Define to 1 if you have the <float.h> header file. */ #define HAVE_FLOAT_H 1 /* Define to 1 if you have the `fork' function. */ /* #undef HAVE_FORK */ /* Define to 1 if you have the `gamma' function. */ /* #undef HAVE_GAMMA */ /* Define if libgd supports gif. */ /* #undef HAVE_GD_GIF */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define to 1 if you have the <gd.h> header file. */ /* #undef HAVE_GD_H */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define if libgd supports jpeg. */ /* #undef HAVE_GD_JPEG */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define if libgd supports png. */ /* #undef HAVE_GD_PNG */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define if libgd supports TrueType fonts through libfreetype. */ /* #undef HAVE_GD_TTF */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 /* Define to 1 if you have the <ggi/wmh.h> header file. */ /* #undef HAVE_GGI_WMH_H */ /* Define to 1 if you have the <ggi/xmi.h> header file. */ /* #undef HAVE_GGI_XMI_H */ /* Define to use gtk/gdk tweaks */ /* #undef HAVE_GTK */ /* Define to use gtk+ functions to handle cairo */ /* #undef HAVE_GTK28 */ /* define if you have libiconv and iconv.h */ /* #undef HAVE_ICONV */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define to 1 if you have the `index' function. */ /* #undef HAVE_INDEX */ /* Define to 1 if you have the <inttypes.h> header file. */ #if __GNUC__ >= 3 # define HAVE_INTTYPES_H 1 #endif /* Define if you want to use kpsexpand (TeX). */ /* #undef HAVE_KPSEXPAND */ /* Define to 1 if you have the <langinfo.h> header file. */ /* #undef HAVE_LANGINFO_H */ /* Define to 1 if you have the `lgamma' function. */ #if __GNUC__ >= 3 /* #define HAVE_LGAMMA 1 */ /* Comment: lgamma() is available in MingW 3.4.4, but without signgam required by f_gamma() */ #endif /* Define to 1 if you're using the aquaterm library on Mac OS X */ /* #undef HAVE_LIBAQUATERM */ /* Define to 1 if you have the <libc.h> header file. */ /* #undef HAVE_LIBC_H */ /* Define if you are using the BSD editline library. */ /* #undef HAVE_LIBEDITLINE */ /* Define if you have gd library. */ /* #undef HAVE_LIBGD */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define to 1 if you have the `m' library (-lm). */ /* #undef HAVE_LIBM */ /* Define to 1 if you have the `pdf' library (-lpdf). */ /* #undef HAVE_LIBPDF */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define if your pdf library is too old to use PDF_begin_document. */ /* #undef HAVE_LIBPDF_OPEN_FILE */ /* Define if you are using the GNU readline library. */ /* #undef HAVE_LIBREADLINE */ /* Define if you have zlib. */ /* #undef HAVE_LIBZ */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define to 1 if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the <locale.h> header file. */ #define HAVE_LOCALE_H 1 /* Define if you want the lua/TikZ terminal. */ /* #undef HAVE_LUA */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define to 1 if you have the <lua.h> header file. */ /* #undef HAVE_LUA_H */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define to 1 if you have the <malloc.h> header file. */ #define HAVE_MALLOC_H 1 /* Define to 1 if you have the <math.h> header file. */ #define HAVE_MATH_H 1 /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define if your pdf library doesn't support dash patterns. */ /* #undef HAVE_NODASH_LIBPDF */ /* Define if your pdf library is too old to support patterns. */ /* #undef HAVE_OLD_LIBPDF */ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ /* Define to 1 if you have the `pclose' function. */ #define HAVE_PCLOSE 1 /* Define to 1 if you have the <pdflib.h> header file. */ /* #undef HAVE_PDFLIB_H */ /* Define to 1 if you have the `poll' function. */ /* #undef HAVE_POLL */ /* Define to 1 if you have the <poll.h> header file. */ #define HAVE_POLL_H 1 /* Define to 1 if you have the `popen' function. */ #define HAVE_POPEN 1 /* Qt version at least 4.7 */ /* #undef HAVE_QT_47 */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define to 1 if you have the <readline/history.h> header file. */ /* #undef HAVE_READLINE_HISTORY_H */ /* Define to 1 if you have the <readline/readline.h> header file. */ /* #undef HAVE_READLINE_READLINE_H */ /* Define if your libreadline has rl_reset_after_signal */ /* #undef HAVE_READLINE_RESET */ /* Define to 1 if you have the `rindex' function. */ /* #undef HAVE_RINDEX */ /* Define to 1 if you have the `select' function. */ /* #undef HAVE_SELECT */ /* Define to 1 if you have the `setvbuf' function. */ /* #define HAVE_SETVBUF 1 */ /* it is defined, but setvbuf(stdout) does not work for MS Windows GUI redirected stdout */ /* Define to 1 if you have the <sgtty.h> header file. */ /* #undef HAVE_SGTTY_H */ /* Define if we have sigsetjmp(). */ /* #undef HAVE_SIGSETJMP */ /* Define to 1 if you have the `sleep' function. */ /* #undef HAVE_SLEEP */ /* Define to 1 if you have the `snprintf' function. */ #if __GNUC__ >= 3 # define HAVE_SNPRINTF 1 #endif /* Define to 1 if stdbool.h conforms to C99. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the <stdint.h> header file. */ #if __GNUC__ >= 3 # define HAVE_STDINT_H 1 #endif /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `stpcpy' function. */ /* #undef HAVE_STPCPY */ /* Define to 1 if you have the `strcasecmp' function. */ #define HAVE_STRCASECMP 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strcspn' function. */ #define HAVE_STRCSPN 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* Define to 1 if you have the `stricmp' function. */ #define HAVE_STRICMP 1 /* Define to 1 if cpp supports the ANSI # stringizing operator. */ #define HAVE_STRINGIZE 1 /* Define to 1 if you have the <strings.h> header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strndup' function. */ /* #undef HAVE_STRNDUP */ /* Define to 1 if you have the `strnicmp' function. */ #define HAVE_STRNICMP 1 /* Define to 1 if you have the `strnlen' function. */ /* #undef HAVE_STRNLEN */ /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define if math.h declares struct exception for matherr(). */ /* #undef HAVE_STRUCT_EXCEPTION_IN_MATH_H */ /* Define to 1 if you have the `sysinfo' function. */ /* #undef HAVE_SYSINFO */ /* Define to 1 if you have the <sys/bsdtypes.h> header file. */ /* #undef HAVE_SYS_BSDTYPES_H */ /* Define to 1 if you have the <sys/ioctl.h> header file. */ /* #undef HAVE_SYS_IOCTL_H */ /* Define to 1 if you have the <sys/param.h> header file. */ #if __GNUC__ >= 3 # define HAVE_SYS_PARAM_H 1 #endif /* Define to 1 if you have the <sys/select.h> header file. */ /* #undef HAVE_SYS_SELECT_H */ /* Define to 1 if you have the <sys/socket.h> header file. */ /* #undef HAVE_SYS_SOCKET_H */ /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/systeminfo.h> header file. */ /* #undef HAVE_SYS_SYSTEMINFO_H */ /* Define to 1 if you have the <sys/timeb.h> header file. */ #define HAVE_SYS_TIMEB_H 1 /* Define to 1 if you have the <sys/time.h> header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <sys/utsname.h> header file. */ /* #undef HAVE_SYS_UTSNAME_H */ /* Define to 1 if you have the `tcgetattr' function. */ /* #undef HAVE_TCGETATTR */ /* Define to 1 if you have the <termios.h> header file. */ /* #undef HAVE_TERMIOS_H */ /* Define to 1 if you have the <time.h> header file. */ #define HAVE_TIME_H 1 /* Define if time_t is declared in time.h. */ #define HAVE_TIME_T_IN_TIME_H 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `usleep' function. */ /* #undef HAVE_USLEEP */ /* Define to 1 if you have the <values.h> header file. */ #define HAVE_VALUES_H 1 /* Define to 1 if you have the `vfork' function. */ /* #undef HAVE_VFORK */ /* Define to 1 if you have the <vfork.h> header file. */ /* #undef HAVE_VFORK_H */ /* Define to 1 if you have the `vfprintf' function. */ #define HAVE_VFPRINTF 1 /* Define to 1 if you have the <vgagl.h> header file. */ /* #undef HAVE_VGAGL_H */ /* Define to 1 if you have the <wchar.h> header file. */ #define HAVE_WCHAR_H 1 /* Define to 1 if you have the `wcwidth' function. */ /* #undef HAVE_WCWIDTH */ /* Define to 1 if `fork' works. */ /* #undef HAVE_WORKING_FORK */ /* Define to 1 if `vfork' works. */ /* #undef HAVE_WORKING_VFORK */ /* Define to 1 if the system has the type `_Bool'. */ #define HAVE__BOOL 1 /* Define to enable gridbox optimization in hidden3d code. */ /* #undef HIDDEN3D_GRIDBOX */ /* Define to enable quadtree optimization in hidden3d code. */ #define HIDDEN3D_QUADTREE 1 /* Define to enable handling point size in hidden3d code. */ #define HIDDEN3D_VAR_PTSIZE 1 /* Define if this is a Linux system with SuperVGA library. */ /* #undef LINUXVGA */ /* Define to 1 if malloc(0)==0 */ /* #undef MALLOC_ZERO_RETURNS_ZERO */ /* Define if your libreadline has no rl_ding */ /* #undef MISSING_RL_DING */ /* Define if your libreadline has no rl_force_update_display */ /* #undef MISSING_RL_FORCED_UPDATE_DISPLAY */ /* Define if your libreadline has no rl_complete_with_tilde_expansion */ /* #undef MISSING_RL_TILDE_EXPANSION */ /* Define if this is an MSDOS system. */ /* #undef MSDOS */ /* Define to disable terminals that depend on code in bitmap.c */ #define NO_BITMAP_SUPPORT 1 /* Name of package */ /* #undef PACKAGE */ /* Define to the address where bug reports for this package should be sent. */ /* #undef PACKAGE_BUGREPORT */ /* Define to the full name of this package. */ /* #undef PACKAGE_NAME */ /* Define to the full name and version of this package. */ /* #undef PACKAGE_STRING */ /* Define to the one symbol short name of this package. */ /* #undef PACKAGE_TARNAME */ /* Define to the home page for this package. */ /* #undef PACKAGE_URL */ /* Define to the version of this package. */ /* #undef PACKAGE_VERSION */ /* Define if you do have the popen and pclose functions. */ /* #undef PIPES */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Unix-type of Interprocess Communication is required for mouse support. */ /* #undef PIPE_IPC */ /* Define to 1 if the C compiler supports function prototypes. */ #define PROTOTYPES 1 /* Define if you want the Qt terminal. */ /* #undef QTTERM */ /* Define if you want to use the included readline function. */ #define READLINE 1 /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void /* Define to the type of arg 1 for `select'. */ /* #undef SELECT_TYPE_ARG1 */ /* Define to the type of args 2, 3 and 4 for `select'. */ /* #undef SELECT_TYPE_ARG234 */ /* Define to the type of arg 5 for `select'. */ /* #undef SELECT_TYPE_ARG5 */ /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */ /* #undef STAT_MACROS_BROKEN */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if you want to use the sunview terminal (sun). */ /* #undef SUN */ /* Define to use thin plate spines. */ /* #undef THIN_PLATE_SPLINES_GRID */ /* Define if the 3dkit libray is present. */ /* #undef THREEDKIT */ /* Define if you want to read .gnuplot from current directory (SECURITY RISK!). */ /* #undef USE_CWDRC */ /* Define if you want to use the experimental ggi driver. */ /* #undef USE_GGI_DRIVER */ /* Define if you want to have mouse support in interactive terminals. */ /* #undef USE_MOUSE */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define to add support for generating a statistical summary of data */ #define USE_STATS 1 /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif /* Define to enable multi-byte font support for x11 */ /* #undef USE_X11_MULTIBYTE */ /* Version number of package */ /* #undef VERSION */ /* Define if the vgagl libray is present. */ /* #undef VGAGL */ /* Define to allow zooming or refresh of volatile data. */ #define VOLATILE_REFRESH 1 /* Define if you want the wxwidgets terminal. */ /* #undef WXWIDGETS */ /* Don't change it here -- this define is set in config/mingw/Makefile. */ /* Define if you are using the X11 window system. */ /* #undef X11 */ /* Define to 1 if the X Window System is missing or not being used. */ /* #undef X_DISPLAY_MISSING */ /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif /* Define like PROTOTYPES; this can be used by system headers. */ #define __PROTOTYPES 1 /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* libgd versions < 1.8.4 need gdImageStringTTF rather than gdImageStringFT */ /* #undef gdImageStringFT */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif /* Define to `int' if <sys/types.h> does not define. */ /* #undef pid_t */ /* Define to `unsigned int' if <sys/types.h> does not define. */ /* #undef size_t */ /* Define as `fork' if `vfork' does not work. */ /* #undef vfork */ /* * ================================================== * Stuff not provided by config.hin (aka ./configure) * ================================================== */ #ifndef WIN32 # define WIN32 #endif #define HAVE_GDIPLUS /* Windows Interprocess Communication is required for mouse support. */ /* Both USE_MOUSE and WIN_IPC must be defined together in the Makefile. */ #define GP_INLINE inline /* gnuplot.gih is not used by wgnuplot */ #define NO_GIH 1 �����������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/makefile.unx�������������������������������������������������������������������0000644�0004711�0000144�00000100336�11670437273�013724� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: makefile.unx,v 1.19.2.1 2011/12/09 07:05:35 sfeam Exp $ # # ############################################################ # # GNUPLOT 3.0 Makefile (Unix X11 support) for # Apollo/Sun/Dec5000/IBM-RS6000/HP9000/SGI/3B1/386IX/Cray # # Original version by: # oliveria@caen.engin.umich.edu (ROQUE DONIZETE DE OLIVEIRA) # Wed, 3 Jul 91 14:31:37 -0400 # #>>> Customizing: You must customize part of this makefile for your site. #>>> Then type 'make' for further instructions. #>>> Customization instructions look like these lines do (#>>>). # .NOEXPORT: TARGET = All# What to make by default ############################################################ #>>> Decide where the binaries and manuals will go. # directory where to install executables on 'make install' DEST=/usr/local/bin # directory for installing man page on 'make man_install'. MANDEST=/usr/local/man/man1 # where to install help file gnuplot.gih (note: this doesn't include gnuplot.gih) HELPDEST=/usr/local/lib #HELPDEST=docs # Where to send email about bugs and comments (locally) EMAIL=gnuplot-bugs@lists.sourceforge.net ############################################################ #>>> Some machines may need MAKE to be defined explicitly MAKE = make #>>> Choose your C compiler and basic compiler flags. # the C compiler CC = cc # -O if you trust your compiler's optimizer COPTS = # default loading command LD = $(CC) $(CFLAGS) NPROC = 2 # default installion command. On some systems, this doesn't exist or is # incompatible. In this case just use cp. This should be handeled by the # system specific make commands below. Please report systems that need this, # so this can be added as default. (I think most SysV systems need this, but # I'm not sure) INSTALL=install #INSTALL=cp # ############################################################ #>>> Choose some optional features. #>>> At this point there are only two optional features: # READLINE: # If READLINE is defined, then command-line editing is supported. # Otherwise, your normal terminal editing is all you get. # Some machines will not support this, and they will turn this # option off. # Note: problems with gnuplot prompts have been noted when this feature # is selected on IBM RS/6000 AIX, and compile errors are encountered on # Sequent Dynix 3 and Convex OS 9.0. If seems to work with ConvexOS 10.1. # HAVE_LIBREADLINE # If you want to use the more complex gnu version of readline, you can # define HAVE_LIBREADLINE instead of READLINE and add the appropriate library # file(s) to LIBS below. # USE_CWDRC: # If USE_CWDRC is defined, then any .gnuplot in the current directory # is read on startup. This is a security consideration # especially for root users ( we recommend you do not define this ). OPTIONS = -DREADLINE #>>> Optionally install the lasergnu script. # Lasergnu is a handy shell script for creating a plot from the # command line and sending it directly to the printer. It currently # supports PostScript and imagen printers, and probably would need # tailoring to your site. # Use lasergnu_install to install lasergnu. # Use lasergnu_noinstall to not install lasergnu (default). LASERGNU = lasergnu_noinstall ############################################################ # X11 support # #>>> List your X11 libraries X11LIBS = -lX11 #>>> List where the X11 include directory is found (if other than /usr/include) X11INCLUDES = #>>> List additional CFLAGS for X11 compilation # -DBSD_TYPES if your system defines FD_* macros for select in # <sys/bsdtypes.h> # -ISC22 to circumvent missing plots past the first on ISC 2.2 X11FLAGS = #>>> You shouldn't have to change these, since they are controlled by #>>> Machine dependent definitions below. # Compile option for plot.c and TERMFLAGS, to include X11 support PLOTXFLAG = -DX11 # make gnuplot_x11 by default GNUPLOT_X11 = gnuplot_x11 # install gnuplot_x11 by default X11INSTALL = x11_install ############################################################ #>>> Okay, you've changed enough. Now type 'make'. ############################################################ # This is used to pass many of the above definitions to make # subprocesses. Don't change this. MY_FLAGS = CC="$(CC)" COPTS="$(COPTS)" DEST="$(DEST)" \ MANDEST="$(MANDEST)" HELPDEST="$(HELPDEST)" \ EMAIL="$(EMAIL)" LASERGNU="$(LASERGNU)" ############################################################ # Explanations of CFLAGS definitions. # These should not need to be changed by you. # They are set correctly for each machine below. If your machine # doesn't fit the one of the patterns, override on the make command # line or make a new target for it and a new _FLAGS definition. # -DHAVE_COPY if you have bcopy() and no memcpy() # -DHAVE_STRNICMP if you have strnicmp() # -DHAVE_STRNCASECMP if you have strncasecmp() (GNU Libc, bsd) # -DGAMMA=foo if your gamma function is called foo(). # Linux has lgamma(3m). The default is -DGAMMA=gamma. # -DHAVE_GETCWD if your unix uses getcwd() instead of getwd() # this is needed by HP-UX and Cray Unicos systems. # -DHAVE_GETWD if you have getwd() # -DULTRIX_KLUDGE if you run X windows on Ultrix and experience the # "every other plot" problem. # -DCRIPPLED_SELECT if "select errors" are encountered with X. This # option is needed on SVR3 platforms with incomplete support for # the BSD select() system call # -DXPG3_LOCALE if your system uses the 'setlocale' function to # support foreign charactersets (currently only ISO8859-1). # -Dunix is required to explicitly define "unix" for SCO and IBM # RS/6000 running AIX 3.2 # -DHAVE_UNISTD_H if you have unistd.h # -DHAVE_LIBC_H if you have libc.h (NeXT) # -fswitch if you are compiling on a Sun3 (or even -f68881) # (but -fswitch is buggy on some systems, so watch out) # -DRETSIGTYPE=int if the argument to signal is an int function # -DSIGFUNC_NO_INT_ARG if the signal function may not have an int argument # Defaults in case the user types 'make All' directly # Should match X11_FLAGS's CFLAGS definition CFLAGS = $(COPTS) $(OPTIONS) ############################################################ # Terminal (device) support # # All devices available to a given machine are compiled in by default. # This documents the flags available in TERMFLAGS, although TERMFLAGS # is usually controlled by the machine-dependent definitions below. # See other terminal defines in term.h. # Define ULTRIX_KLUDGE if you have the every-other plot problem in Ultrix X11. # # -DCGI SCO CGI # -DSUN Sun Microsystems Workstation # -DLINUXVGA Linux PC with SuperVGA library # -DUNIXPC unixpc (ATT 3b1 or ATT 7300) # -DX11 X11 Window System (This is $(PLOTXFLAG)) TERMFLAGS = -I. -Iterm $(PLOTXFLAG) ############################################################ # Library explanations. # You shouldn't need to adjust this; again, it is handled by the # machine-dependent definitions below. # # -lsuntool -lsunwindow -lpixrect if you have -DSUN in TERMFLAGS # -lccgi if -DCGI in TERMFLAGS # -lvga if -DLINUXVGA in TERMFLAGS # -lreadline (or -Lsomewhere libreadline.a) if you use the gnu version # -ltermcap might be necessary after -lreadline LIBS = -lm # -lplot is no longer shipped on SUNs #################################################################### # List of object files except version.o OBJS = bitmap.o command.o contour.o eval.o graphics.o graph3d.o help.o \ internal.o misc.o parse.o plot.o plot2d.o plot3d.o readline.o \ scanner.o set.o show.o specfun.o standard.o stdfn.o term.o time.o \ util.o binary.o interpol.o fit.o matrix.o datafile.o alloc.o \ util3d.o hidden3d.o variable.o stats.o NEXTOBJS = epsviewe.o ############################################################ # Machine-dependent settings. # X11_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS)" \ LIBS="$(LIBS)" X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \ X11LIBS="$(X11LIBS)" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \ X11INSTALL="$(X11INSTALL)" \ TERMFLAGS="$(TERMFLAGS)" DEC_OSF_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -I/usr/sys/include -I/usr/sys/BINARY -DANSI -DGAMMA=lgamma -D_XOPEN_SOURCE" \ LIBS="$(LIBS) -ldnet_stub" \ X11FLAGS="$(X11FLAGS) -DMOTIF -D_NO_PROTO -D_OSF_SOURCE" \ X11INCLUDES="$(X11INCLUDES) -I/usr/include/Xm" \ X11LIBS="$(X11LIBS) -ldnet_stub" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \ X11INSTALL="$(X11INSTALL)" \ TERMFLAGS="$(TERMFLAGS) " DEC_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS)" \ LIBS="-lplot $(LIBS)" X11FLAGS="$(X11FLAGS)" \ X11INCLUDES="$(X11INCLUDES)" \ X11LIBS="$(X11LIBS)" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \ X11INSTALL="$(X11INSTALL)" \ TERMFLAGS="$(TERMFLAGS) -DULTRIX_KLUDGE" HP8_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD" \ LIBS=$(LIBS) X11FLAGS="$(X11FLAGS)" \ X11INCLUDES="-I/usr/include/X11R4" \ X11LIBS="-L/usr/lib/X11R4 -lX11" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \ X11INSTALL="$(X11INSTALL)" \ TERMFLAGS="-I. -Iterm -DX11" HP9_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -Ae -DHAVE_GETCWD" \ LIBS=$(LIBS) X11FLAGS="$(X11FLAGS)" \ X11INCLUDES="-I/usr/include/X11R5" \ X11LIBS="-L/usr/lib/X11R5 -lX11" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \ X11INSTALL="$(X11INSTALL)" \ TERMFLAGS="-I. -Iterm -DX11" \ MFLAGS="CFLAGS=\"-Ae -I.. -I../term\"" SOLARIS_X11_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_UNISTD_H -DHAVE_GETCWD -DHAVE_SYS_SYSTEMINFO_H -DHAVE_SYSINFO" \ X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \ X11LIBS="$(X11LIBS) -lsocket" \ X11INCLUDES="-I$$OPENWINHOME/include $(X11INCLUDES)" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \ X11INSTALL="$(X11INSTALL)" \ TERMFLAGS="$(TERMFLAGS) -DHAVE_SYS_SYSTEMINFO_H -DHAVE_SYSINFO" SUN_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DSUN" \ LIBS="-lsuntool -lsunwindow -lpixrect $(LIBS)" \ X11FLAGS=" " X11INCLUDES=" " \ X11LIBS=" " \ PLOTXFLAG=" " GNUPLOT_X11=" " X11INSTALL=x11_noinstall \ TERMFLAGS="-I. -Iterm" SUN_X11_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS)" \ LIBS="-L$$OPENWINHOME/lib $(LIBS)" \ X11FLAGS="$(X11FLAGS)" \ X11INCLUDES="-I$$OPENWINHOME/include $(X11INCLUDES)" \ X11LIBS="$(X11LIBS)" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \ X11INSTALL="$(X11INSTALL)" \ TERMFLAGS="$(TERMFLAGS)" CGI_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -Dunix" \ LIBS="-lccgi $(LIBS)" X11FLAGS=" " X11INCLUDES=" " \ X11LIBS=" " PLOTXFLAG=" " GNUPLOT_X11=" " X11INSTALL=x11_noinstall \ TERMFLAGS="-I. -Iterm -DCGI" 3B1_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD" \ LIBS="$(LIBS)" X11FLAGS=" " X11INCLUDES=" " \ X11LIBS=" " \ PLOTXFLAG=" " GNUPLOT_X11=" " X11INSTALL=x11_noinstall \ LD="ld /lib/crt0s.o /lib/shlib.ifile" \ TERMFLAGS="-I. -Iterm -DUNIXPC" 3B2_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD" \ X11FLAGS=" " X11INCLUDES=" " \ X11LIBS=" " \ PLOTXFLAG=" " GNUPLOT_X11=" " X11INSTALL=x11_noinstall \ TERMFLAGS="-I. -Iterm" LIBS="$(LIBS) -lplot" 386IX_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD -DTCSETSW -DTCGETS" \ LIBS="$(LIBS) -lcposix" X11FLAGS=" " X11INCLUDES=" " \ X11LIBS=" " PLOTXFLAG=" " GNUPLOT_X11=" " \ X11INSTALL=x11_noinstall \ TERMFLAGS="-I. -Iterm" 386IX_X11_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD -DTCSETSW -DTCGETS" \ LIBS="$(LIBS) -lcposix" X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \ X11LIBS="$(X11LIBS)" PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11="$(GNUPLOT_X11)" \ X11INSTALL= "$(X11INSTALL)" \ TERMFLAGS="-I. -Iterm -DX11" ISC22_X11_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD -DISC22" \ LIBS="$(LIBS) -lplot -lcposix" X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \ X11LIBS="$(X11LIBS) -linet -lpt -lcposix" PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11="$(GNUPLOT_X11)" \ X11INSTALL= "$(X11INSTALL)" \ TERMFLAGS="-I. -Iterm -DX11" AIX_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DERF -DGAMMA=gamma -DXPG3_LOCALE -Dunix" \ LIBS="$(LIBS) -lbsd" X11FLAGS="$(X11FLAGS)" \ X11INCLUDES="$(X11INCLUDES)" \ X11LIBS="$(X11LIBS)" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \ X11INSTALL="$(X11INSTALL)" \ TERMFLAGS="$(TERMFLAGS) -qmaxmem=9000" AIXO_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DGAMMA=gamma -DXPG3_LOCALE -Dunix" \ LIBS="$(LIBS) -lbsd" X11FLAGS="$(X11FLAGS)" \ X11INCLUDES="$(X11INCLUDES)" \ X11LIBS="$(X11LIBS)" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \ X11INSTALL="$(X11INSTALL)" \ TERMFLAGS="$(TERMFLAGS)" NEXT_FLAGS = \ CFLAGS="$(COPTS) -DGAMMA=lgamma -DNEXT -DREADLINE -DHAVE_SGTTY_H -DHAVE_STRNCASECMP -DHAVE_LIBC_H $(OPTIONS)" \ LIBS="-lNeXT_s -lsys_s $(LIBS)" \ X11FLAGS="$(X11FLAGS)" \ X11INCLUDES=" " X11LIBS=" " PLOTXFLAG=" " \ GNUPLOT_X11=" " X11INSTALL=x11_noinstall \ TERMFLAGS="-I. -Iterm -ObjC -DANSI" OBJS=" $(OBJS) $(NEXTOBJS)" NEXT_X11_FLAGS = \ CFLAGS="$(COPTS) -DGAMMA=lgamma -DNEXT -DREADLINE -DHAVE_SGTTY_H -DHAVE_STRNCASECMP -DX_NOT_POSIX -DHAVE_LIBC_H $(OPTIONS)" \ LIBS="-lNeXT_s -lsys_s $(LIBS)" \ X11LIBS="-L/usr/lib/X11 -lX11" \ X11INCLUDES="$(X11INCLUDES)" X11FLAGS="$(X11FLAGS)" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \ X11INSTALL="$(X11INSTALL)" \ TERMFLAGS="-I. -Iterm -DX11 -ObjC -DANSI" OBJS=" $(OBJS) $(NEXTOBJS)" CRAY_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD" \ LIBS="$(LIBS)" X11FLAGS=" " \ X11INCLUDES=" " \ X11LIBS=" " \ PLOTXFLAG=" " GNUPLOT_X11=" " \ X11INSTALL=x11_noinstall \ TERMFLAGS="-I. -Iterm" CRAY_X11_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD" \ LIBS="$(LIBS)" X11FLAGS="$(X11FLAGS)" \ X11INCLUDES="$(X11INCLUDES)" \ X11LIBS="$(X11LIBS)" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11="$(GNUPLOT_X11)" \ X11INSTALL=$(X11INSTALL) \ TERMFLAGS="-I. -Iterm -DX11" PTX_X11_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD -DCRIPPLED_SELECT" \ LIBS="$(LIBS) -lplot" X11FLAGS="$(X11FLAGS)" \ X11INCLUDES="$(X11INCLUDES)" \ X11LIBS="-lX11 -lseq -lsocket -linet -lnsl" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11="$(GNUPLOT_X11)" \ X11INSTALL=$(X11INSTALL) \ TERMFLAGS="$(TERMFLAGS)" SEQUENT_X11_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_SGTTY_H -DCRIPPLED_SELECT" \ LIBS="$(LIBS) -lplot" X11FLAGS="$(X11FLAGS) -DX_WCHAR" \ X11INCLUDES="$(X11INCLUDES)" \ X11LIBS="-lX11 -lseq " \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11="$(GNUPLOT_X11)" \ X11INSTALL=$(X11INSTALL) \ TERMFLAGS="$(TERMFLAGS)" # Convex X11 uses -O1 for scalar optimization only CONVEX_X11_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DHUGE=8.9e307 -O1" \ LIBS="$(LIBS)" X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \ X11LIBS="$(X11LIBS)" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \ X11INSTALL="$(X11INSTALL)" \ TERMFLAGS="$(TERMFLAGS)" OSF_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -I/usr/sys/include -I/usr/sys/BINARY -DANSI -D_XOPEN_SOURCE -D__osf__" \ LIBS="$(LIBS)" \ X11FLAGS="$(X11FLAGS) -DMOTIF -D_NO_PROTO -D_OSF_SOURCE" \ X11INCLUDES="$(X11INCLUDES) -I/usr/include/Xm" \ X11LIBS="$(X11LIBS)" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \ X11INSTALL="$(X11INSTALL)" \ TERMFLAGS="$(TERMFLAGS) " LINUX_FLAGS = \ CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_STRNCASECMP -DGAMMA=lgamma -DHAVE_UNISTD_H -DLINUXVGA -D PROTOTYPE__P" \ LIBS="-lvga $(LIBS)" \ X11FLAGS="$(X11FLAGS)" \ X11INCLUDES="-I/usr/X386/include $(X11INCLUDES)" \ X11LIBS="-L/usr/X386/lib $(X11LIBS)" \ PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \ X11INSTALL="$(X11INSTALL)" \ TERMFLAGS="$(TERMFLAGS) -DX11" #################################################################### # List of source files # Used for making shar files, lint, and some dependencies. DIRS = term demo docs docs/latextut CSOURCE1 = bf_test.c binary.c command.c set.c show.c CSOURCE2 = help.c graphics.c graph3d.c internal.c CSOURCE3 = misc.c eval.c parse.c plot.c plot2d.o plot3d.o readline.c scanner.c standard.c stdfn.c CSOURCE4 = bitmap.c term.c time.c util.c version.c fit.c matrix.c variable.c tabulate.c stats.c CSOURCE5 = term/ai.trm term/aed.trm \ term/cgi.trm term/corel.trm \ term/djsvga.trm term/dumb.trm \ term/dxf.trm term/dxy.trm term/debug.trm \ term/emxvga.trm term/eepic.trm term/epson.trm term/excl.trm \ term/fig.trm term/grass.trm term/hp26.trm term/hp2648.trm term/hpgl.trm \ term/hp500c.trm term/hpljii.trm term/metafont.trm\ term/hppj.trm CSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \ term/kyo.trm term/latex.trm term/mif.trm \ term/pbm.trm term/pslatex.trm term/gpic.trm CSOURCE7 = term/post.trm term/pstricks.trm term/qms.trm term/regis.trm \ term/sun.trm\ term/t410x.trm term/tek.trm term/texdraw.trm \ term/tgif.trm term/tpic.trm \ term/unixpc.trm \ term/v384.trm term/vws.trm term/x11.trm term/xlib.trm term/linux.trm CSOURCE8 = contour.c specfun.c gplt_x11.c interpol.c CONFIGURE = configure configure.in Makefile.in docs/Makefile.in\ docs/latextut/Makefile.in NEXTSRC = epsviewe.m epsviewe.h # not C code, but still needed DEMOS = demo/1.dat demo/2.dat demo/3.dat demo/contours.dem \ demo/controls.dem demo/electron.dem demo/glass.dat demo/param.dem \ demo/polar.dem demo/simple.dem demo/surface1.dem \ demo/surface2.dem demo/using.dat demo/using.dem demo/world.cor \ demo/world.dat demo/world.dem \ demo/err.dat demo/poldat.dem demo/errorbar.dem \ demo/all.dem demo/animate.dem demo/bivariat.dem \ demo/prob.dem demo/stat.inc demo/prob2.dem demo/random.dem \ demo/discrete.dem demo/hidden.dem demo/airfoil.dem demo/gnuplot.rot\ demo/binary.dem demo/spline.dem demo/steps.dem demo/steps.dat \ demo/multimsh.dem demo/whale.dat demo/hemisphr.dat \ demo/scatter.dem demo/scatter2.dat demo/singulr.dem demo/klein.dat ETC = Copyright 0README README.gnu makefile.unx makefile.vms \ linkopt.amg makefile.amg linkopt.vms buildvms.com \ lasergnu makefile.r makefile.nt makefile.g 0FAQ 0BUGS\ term/README History gnuplot.el intergra.x11 0INSTALL README.3p1\ README.3p2 README.3p3 README.3p4 README.pro README.nex README.x11 \ README.3d README.mf README.win README.iso README.3p5 README.pic \ README.xli $(CONFIGURE) #BETA files (not standard distribution files) BETA = # PC-specific files PC = corgraph.asm corplot.c header.mac hrcgraph.asm lineproc.mac \ makefile.djg pcgraph.asm makefile.emx term/pc.trm WINDOWS = makefile.win makefile.msw README.win win/wcommon.h \ win/wgnuplib.c win/wgnuplib.h win/wgnuplib.rc \ win/wgnuplot.hpj win/wgnuplot.mnu win/wgnuplot.rc \ win/wgraph.c win/winmain.c win/wmenu.c win/wpause.c \ win/wprinter.c win/wresourc.h win/wtext.c win/wtext.h \ win/geticon.c docs/doc2rtf.c term/win.trm OS2 = makefile.os2 os2/makefile os2/dialogs.c os2/dialogs.h os2/gclient.c \ os2/gnuicon.uue os2/gnupmdrv.c os2/gnupmdrv.def os2/gnupmdrv.h \ os2/gnupmdrv.itl os2/gnupmdrv.rc os2/print.c docs/doc2ipf.c \ README.os2 term/pm.trm # Documentation and help files DOCS1 = docs/makefile docs/README docs/checkdoc.c docs/doc2gih.c \ docs/doc2hlp.c docs/doc2hlp.vms docs/doc2ms.c docs/doc2tex.c \ docs/gnuplot.1 docs/lasergnu.1 docs/toc_entr.sty docs/doc2info.pl \ docs/titlepag.ms docs/titlepag.tex \ docs/doc2rtf.c DOCS2 = docs/gnuplot.doc docs/gpcard.tex DOCS3 = docs/latextut/makefile docs/latextut/eg1.plt \ docs/latextut/eg2.plt docs/latextut/eg3.dat docs/latextut/eg3.plt \ docs/latextut/eg4.plt docs/latextut/eg5.plt docs/latextut/eg6.plt \ docs/latextut/header.tex docs/latextut/tutorial.tex \ docs/latextut/linepoin.plt ######################################################################### # Default target (informational) info: @echo "Please do a 'make <MACHINE>' where <MACHINE> is one of the following:" @echo @echo "dec_osf for Dec3100/5000 running DEC OSF/1 v1.0" @echo "dec for Dec3100/5000 running Ultrix 3.1d with MIT's X11" @echo "hp8 for HP/9000 700 series running HP/UX 8.0 with MIT's X11R4" @echo "hp for HP/9000 700 series running HP/UX 9.01 with MIT's X11R5" @echo "sun for Sun sparcstation running SunOS 4.1 with suntools (no X11) " @echo "sun_x11 for Sun sparcstation running SunOS 4.1 with suntools and X11 " @echo "solaris_x11 for Sun Sparcstation running Solaris 2 with X11 " @echo "next for NeXT Cube and Slab running NeXTOS 2.0+ (no X11)" @echo "next_x11 for NeXT Cube and Slab running NeXTOS 2.0+ with X11" @echo "3b1 for ATT 3b1 machines (no X11) " @echo "3b2 for ATT 3b2 machines (no X11) " @echo "386ix for 386 machines running 386/ix (no X11)" @echo "386ix_x11 for 386 machines running 386/ix with T.Roell X386" @echo "isc22_x11 for 386 machines running ISC 2.2 with T.Roell X386" @echo "aix32 for IBM RS/6000 running AIX 3.2 with xlc 1.2" @echo "aix32o for IBM RS/6000 running AIX 3.2 with xlc 1.1" @echo "x11 for a generic machine (like a sun or dec) with MIT's X11" @echo "cray for Cray Y-MP or Cray-2 running Unicos 6.0 or 6.1 (no X11)" @echo "cray_x11 for Cray Y-MP or Cray-2 running Unicos 6.0 or 6.1 with X11" @echo "ptx_x11 for Sequent Dynix/PTX with MIT X11" @echo "sequent_x11 for Sequent Symmetry (DYNIX 3) with X11" @echo "convex_x11 for Convex 9.0 or up with MIT X11" @echo "osf for KSR1 running DEC OSF/1 v1.0 (use make -j 16)" @echo "linux for LINUX with XFree86 or vgalib" @echo @echo "Examples:" @echo @echo " make x11" @echo " make dec" @echo " make hp" @echo " make next" @echo " make solaris_x11" @echo " make sun HELPDEST='/usr/um/misc/lib' " @echo " make sun X11INCLUDES='-I/usr/local/include' " @echo " make sun_x11" @echo " make sgi" @echo " make 3b1" @echo " make 386ix" @echo " make 386ix_x11" @echo " make isc22_x11" @echo " make aix32 MANDEST='/usr/um/misc/man/man1' COPTS='-O' " @echo " make cray" @echo " make cray_x11" @echo @echo "If you just type 'make All' , it will build gnuplot for Unix X11" @echo "and the following variables will be used as default:" @echo @echo " DEST " $(DEST) @echo " MANDEST " $(MANDEST) @echo " HELPDEST " $(HELPDEST) @echo " EMAIL " $(EMAIL) @echo " CC " $(CC) @echo " COPTS " $(COPTS) @echo " OPTIONS " $(OPTIONS) @echo " CFLAGS " $(CFLAGS) @echo " LIBS " $(LIBS) @echo " X11FLAGS " $(X11FLAGS) @echo " X11LIBS " $(X11LIBS) @echo " X11INCLUDES " $(X11INCLUDES) @echo " TERMFLAGS " $(TERMFLAGS) @echo " LASERGNU " $(LASERGNU) @echo @echo "If you are not familiar with makefiles or just want to know what" @echo " 'make <MACHINE>' would do without actually doing anything, then type" @echo " 'make <MACHINE> -n' " @echo ############################################################### # Targets for each machine x11: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(X11_FLAGS) $(TARGET) dec_osf: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(DEC_OSF_FLAGS) $(TARGET) dec: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(DEC_FLAGS) $(TARGET) hp8: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(HP8_FLAGS) $(TARGET) hp: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(HP9_FLAGS) $(TARGET) next: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(NEXT_FLAGS) $(TARGET) next_x11: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(NEXT_X11_FLAGS) $(TARGET) solaris_x11: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SOLARIS_X11_FLAGS) $(TARGET) sun: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SUN_FLAGS) $(TARGET) sun_x11: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SUN_X11_FLAGS) $(TARGET) sgi: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SGI_FLAGS) $(TARGET) sgix11: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SGIX11_FLAGS) $(TARGET) cgi: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(CGI_FLAGS) $(TARGET) 3b1: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(3B1_FLAGS) $(TARGET) 3b2: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(3B2_FLAGS) $(TARGET) 386ix: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(386IX_FLAGS) $(TARGET) 386ix_x11: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(386IX_X11_FLAGS) $(TARGET) isc22_x11: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(ISC22_X11_FLAGS) $(TARGET) aix32: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(AIX_FLAGS) $(TARGET) aix32o: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(AIXO_FLAGS) $(TARGET) cray: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(CRAY_FLAGS) $(TARGET) cray_x11: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(CRAY_X11_FLAGS) $(TARGET) ptx_x11: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(PTX_X11_FLAGS) $(TARGET) sequent_x11: make $(MFLAGS) $(MY_FLAGS) $(SEQUENT_X11_FLAGS) $(TARGET) convex_x11: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(CONVEX_X11_FLAGS) $(TARGET) osf: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(OSF_FLAGS) $(TARGET) linux: $(MAKE) $(MFLAGS) $(MY_FLAGS) $(LINUX_FLAGS) $(TARGET) ############################################################# # Targets that really do something all: @echo "Please just type 'make' in order to get some information on " @echo "how to build gnuplot under Unix and the X Window System." All: gnuplot $(GNUPLOT_X11) doc demo/binary1 gnuplot: $(OBJS) version.o $(LD) -o gnuplot $(OBJS) version.o $(LIBS) doc: ( cd docs; $(MAKE) $(MFLAGS) $(MY_FLAGS) gnuplot.gih ) gnuplot_x11: gplt_x11.c stdfn.c $(CC) $(CFLAGS) $(X11FLAGS) $(X11INCLUDES) -o gnuplot_x11 \ stdfn.c gplt_x11.c $(X11LIBS) demo/binary1 demo/binary2 demo/binary3: bf_test ( cd demo; ../bf_test ) bf_test: bf_test.o binary.o alloc.o $(CC) $(CFLAGS) bf_test.o binary.o alloc.o -lm -o bf_test ################################################################ # Installation instructions install: @echo @echo "Please do a 'make <MACHINE> TARGET=Install' where <MACHINE> is one of the following:" @echo @echo "dec, hp, sun, sun_x11, sgi, sgix11, cgi," @echo "next, next_x11, 3b1, 386ix, 386ix_x11, aix32, aix32o," @echo "x11, cray, cray_x11, ptx_x11, sequent_x11, convex_x11" @echo @echo "Examples:" @echo @echo " make x11 TARGET=Install " @echo " make dec TARGET=Install " @echo " make hp TARGET=Install " @echo " make sun TARGET=Install HELPDEST='/usr/um/misc/lib BINDIR='/usr/um/misc/bin' " @echo " make aix32 TARGET=Install MANDEST='/usr/um/misc/man/man1' COPTS='-O' " @echo ################################################################ # Installation targets Install: All man_install $(X11INSTALL) $(LASERGNU) cp gnuplot $(DEST) strip $(DEST)/gnuplot ( cd docs; $(MAKE) $(MFLAGS) $(MY_FLAGS) install-unix HELPDEST=$(HELPDEST) INSTALL="$(INSTALL)") x11_install: gnuplot_x11 cp gnuplot_x11 $(DEST) strip $(DEST)/gnuplot_x11 x11_noinstall: @echo "X11 not requested, so gnuplot_x11 program not installed" man_install: docs/gnuplot.1 cp docs/gnuplot.1 $(MANDEST) lasergnu_install: lasergnu docs/lasergnu.1 cp lasergnu $(DEST) chmod 755 $(DEST)/lasergnu cp docs/lasergnu.1 $(MANDEST) lasergnu_noinstall: @echo @echo "Lasergnu will not be installed by default." @echo "If you think you need the lasergnu script to print" @echo " files on the imagen or PostScript printers, then" @echo " type" @echo " 'make <MACHINE> TARGET=Install LASERGNU='lasergnu_install' " @echo @echo "Lasergnu is really not needed since within gnuplot you can" @echo " can create files (in impress or PostScript language) and" @echo " print them through your favorite print command (lpr, lp, prf, ipr)." @echo ################################################################ # Dependencies plot.o: plot.c $(CC) $(CFLAGS) $(PLOTXFLAG) -c plot.c term.o: term.h term.c $(CSOURCE5) $(CSOURCE6) $(CSOURCE7) $(CC) $(CFLAGS) $(TERMFLAGS) -c term.c version.o: version.c $(CC) $(CFLAGS) -DCONTACT=\"$(EMAIL)\" -c version.c epsviewe.o : epsviewe.h epsviewe.m $(CC) -ObjC -c epsviewe.m $(OBJS): plot.h command.o: command.c binary.h fit.h plot.h $(CC) $(CFLAGS) -c command.c -DHELPFILE=\"$(HELPDEST)/gnuplot.gih\" show.o: show.c plot.h setshow.h $(CC) $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" -DBINDIR=\"$(DEST)\" -c $< command.o help.o misc.o parse.o: help.h command.o graphics.o graph3d.o misc.o plot.o set.o show.o term.o: setshow.h fit.o: fit.c fit.h matrix.h plot.h matrix.o: matrix.c matrix.h fit.h bitmap.o term.o: bitmap.h variable.o: variable.c plot.h variable.h ################################################################ # Miscellaneous targets SOURCES=plot.h help.h setshow.h bitmap.h term.h variable.h $(CSOURCE1) \ $(CSOURCE2) $(CSOURCE3) $(CSOURCE4) $(CSOURCE5) $(CSOURCE6) \ $(CSOURCE7) $(CSOURCE8) $(NEXTSRC) $(WINDOWS) $(OS2) DOCS = $(DOCS1) $(DOCS2) $(DOCS3) lint: lint -hx $(SOURCES) clean: rm -f *.o *.orig *.rej *~ *.bak term/*~ term/*.orig term/*.bak ( cd docs; $(MAKE) $(MFLAGS) clean ) ( cd docs/latextut; $(MAKE) $(MFLAGS) clean ) spotless: rm -f *.o *~ *.orig *.rej *.bak term/*~ term/*.orig term/*.bak \ TAGS gnuplot gnuplot_x11 bf_test demo/binary[1-3] \ demo/temp.set demo/defaults.ini ( cd docs; $(MAKE) $(MFLAGS) clean ) ( cd docs/latextut; $(MAKE) $(MFLAGS) spotless ) ################################################################ # Making shar files for mailing gnuplot shar: gnuplot.sh00 gnuplot.sh01 gnuplot.sh02 gnuplot.sh03 gnuplot.sh04 \ gnuplot.sh05 gnuplot.sh06 gnuplot.sh07 gnuplot.sh08 \ gnuplot.sh09 gnuplot.sh10 gnuplot.sh11 gnuplot.sh12 \ gnuplot.sh13 gnuplot.sh14 gnuplot.sh15 gnuplot.sh16 gnuplot.sh00: echo '#!/bin/sh' > gnuplot.sh00 echo '# This is a shell file to make directories' >> gnuplot.sh00 echo mkdir $(DIRS) >> gnuplot.sh00 gnuplot.sh01: $(ETC) shar $(ETC) > gnuplot.sh01 gnuplot.sh02: $(DOCS1) shar $(DOCS1) > gnuplot.sh02 gnuplot.sh03: $(DOCS2) shar $(DOCS2) > gnuplot.sh03 gnuplot.sh04: $(DOCS3) shar $(DOCS3) > gnuplot.sh04 gnuplot.sh05: $(CSOURCE1) shar $(CSOURCE1) > gnuplot.sh05 gnuplot.sh06: $(CSOURCE2) shar $(CSOURCE2) > gnuplot.sh06 gnuplot.sh07: $(CSOURCE3) shar $(CSOURCE3) > gnuplot.sh07 gnuplot.sh08: $(CSOURCE4) shar $(CSOURCE4) > gnuplot.sh08 gnuplot.sh09: $(CSOURCE5) shar $(CSOURCE5) > gnuplot.sh09 gnuplot.sh10: $(CSOURCE6) shar $(CSOURCE6) > gnuplot.sh10 gnuplot.sh11: $(CSOURCE7) shar $(CSOURCE7) > gnuplot.sh11 gnuplot.sh12: $(PC) shar $(PC) > gnuplot.sh12 gnuplot.sh13: $(CSOURCE8) shar $(CSOURCE8) > gnuplot.sh13 gnuplot.sh14: $(DEMOS) shar $(DEMOS) > gnuplot.sh14 gnuplot.sh15: $(WINDOWS) shar $(WINDOWS) > gnuplot.sh15 gnuplot.sh16: $(BETA) shar $(BETA) > gnuplot.sh16 tar: $(ETC) $(SOURCES) $(PC) $(DEMOS) $(BETA) $(DOCS) $(TAR) cvf /tmp/gnuplot.tar $(ETC) $(SOURCES) $(PC)\ $(DEMOS) $(BETA) $(DOCS) # # the following uses Rick Saltz's makekit shar generation tools # kit: $(ETC) $(SOURCES) $(PC) $(DEMOS) $(BETA) $(DOCS) makekit -s135k -k30 $(ETC) $(SOURCES) $(PC)\ $(DEMOS) $(BETA) $(DOCS) branch: rcs rcsdoc rcsdemo rcs: rcs -b$(RCSVER) $(ETC) $(SOURCES) $(PC) rcsdoc: rcs -b$(RCSVER) $(DOCS) rcsdemo: rcs -b$(RCSVER) $(DEMOS) ciall: ci cidoc cidemo ci: ci -l$(RCSVER) -m$(RCSCOM) -t-$(RCSCOM) $(SOURCES) $(PC) $(ETC) cidoc: ci -l$(RCSVER) -m$(RCSCOM) -t-$(RCSCOM) $(DOCS) cidemo: ci -l$(RCSVER) -m$(RCSCOM) -t-$(RCSCOM) $(DEMOS) ciforce: ci -f$(RCSVER) -m$(RCSCOM) -t-$(RCSCOM) $(SOURCES) $(ETC) $(DOCS) $(DEMOS) $(PC) coall: co codoc codemo co: co -l -r$(RCSVER) $(ETC) $(SOURCES) $(PC) codoc: co -l -r$(RCSVER) $(DOCS) codemo: co -l -r$(RCSVER) $(DEMOS) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/config/Makefile.am��������������������������������������������������������������������0000644�0004711�0000144�00000001702�12223337633�013436� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign # empty all: ##m4-files-begin EXTRA_DIST = README MacOSX Makefile.am.in buildvms.com config.cyg \ config.dj2 config.mgw config.nt config.os2 config.oww config.wc \ djconfig.sh make_vms.com makefile.cyg makefile.dj2 makefile.emx makefile.g \ makefile.os2 makefile.unx makefile.vms makefile.wc watcom/Makefile \ watcom/config.h cygwin/Makefile mingw/Makefile msvc/Makefile ##m4-files-end Makefile.am: Makefile.am.in rm -f $@ $@t sed -n '1,/^##m4-files-begin/p' Makefile.am.in > $@t echo EXTRA_DIST = README MacOSX Makefile.am.in buildvms.com \ config.* djconfig.sh make_vms.com makefile.* watcom/Makefile \ watcom/config.h cygwin/Makefile mingw/Makefile msvc/Makefile \ | fmt \ | (tr '\012' @; echo) \ | sed 's/@$$/%/;s/@/ \\@/g' \ | tr @% '\012 ' >> $@t sed -n '/^##m4-files-end/,$$p' $< >> $@t chmod og-w $@t mv $@t $@ ��������������������������������������������������������������gnuplot-4.6.4/Copyright�����������������������������������������������������������������������������0000644�0004711�0000144�00000002727�10037021021�012016� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ �����������������������������������������gnuplot-4.6.4/BUGS����������������������������������������������������������������������������������0000644�0004711�0000144�00000000203�10445161644�010614� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Please see and use http://sourceforge.net/tracker/?atid=102055&group_id=2055&func=browse for an up-to-date bug tracking system. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/install-sh����������������������������������������������������������������������������0000755�0004711�0000144�00000022021�10307602606�012132� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # install - install a program, script, or datafile scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit 0 } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/VERSION�������������������������������������������������������������������������������0000644�0004711�0000144�00000000004�11663102023�011165� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������4.6 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/NEWS����������������������������������������������������������������������������������0000644�0004711�0000144�00000113060�12223164572�010635� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������New features, changes and fixes since gnuplot version 4.6.3 =========================================================== * NEW Ctrl-Break interrupts fitting run in wgnuplot * CHANGE treat empty fields in a csv file as "missing" rather than "bad" * CHANGE allow reference to more than one column header in 'using' or 'title' * CHANGE install-info is no longer a default "make install" target * CHANGE if a polar plot is autoscaled, try to place the origin at the center * FIX svg and canvas terminal mousing of inverted axis coordinates * FIX emf failed to initialize font correctly on some systems * FIX timedata columns can now be referred to via column(N) and column("HEAD") * FIX qt terminal toggling of enhanced text elements in plot with labels * FIX color/pattern generated for key entries of columnstacked histograms * FIX hitting ^C twice forces temination of wxt session hung by lost X-server * FIX win terminal failed to properly adjust plot border after window resize * FIX several conditions in which macros were not expanded during command input * FIX promote a string containing only digits to INTGR rather than CMPLX * FIX 'set grid front' caused failure to initialize location of axis zero point * FIX very poor precision in mouse coords reported by x11 in -persist mode * FIX parsing of $# (the number of arguments in a "call"). It's not a comment! * FIX memory leak of cropped images using pngcairo terminal * FIX "lc variable" now iterates over linetype colors (not styles) as documented * FIX rtics were sometimes drawn with length 0 New features, changes and fixes in gnuplot version 4.6.3 ======================================================== * NEW space raises console for console mode gnuplot on Windows * CHANGE -persist mode does not open text window of wgnuplot * FIX -persist mode broken on Windows * FIX -persist mode results in zombie process if using wxt terminal on Windows * FIX suppression of color in linetypes after "set term ... mono" * FIX synchronization of graphics and text color transitions in latex terminals * FIX memory allocation of stats command applied to a large matrix New features, changes and fixes in gnuplot version 4.6.2 ======================================================== * NEW Allow the "bind" command to attach a user command to mouse button 1 * NEW hidden3d can handle occlusion by pm3d surfaces (as in hidden2.dem) * NEW -d option from command line skips ~/.gnuplot initialization file * NEW plot '<&N' plots from file descriptor N opened during shell invocation * CHANGE "unset term" restores original default terminal (GNUTERM) * CHANGE ignore extraneous trailing comma in a plot command * CHANGE special case code for faster input of uniform binary matrix data * CHANGE test for whether the session should be interactive or non-interactive * CHANGE draw zeroaxis lines in the same layer as the grid and border * CHANGE allow 2-column-only variant of yerrorbars (implicit x coord) * CHANGE using "COLUMNHEADER" requires an exact string match * FIX aquaterm rendering of rgbimage plot type * FIX gd terminal fontsize change requested by set_font(",newsize") * FIX qt terminal font metrics * FIX qt terminal mouse tracking and resize events for persistent plots * FIX x11 terminal sometimes failed to reset the line width * FIX -persist option broken if configured without x11 * FIX -persist mode continued mousing of 3D "set view map" plots * FIX reset parsing state after error in parsing string input * FIX buffer overflow from very long tic label formats * FIX broken handling of formatted input via 'using 1:2 "<format>"' * FIX exit current command file from inside bracketed clause * FIX estimation of space required for rotated x-axis tic labels * FIX partial axis ranges (e.g. xrange [*:MAX]) when refreshing volatile data New features, changes and fixes in gnuplot version 4.6.1 =========================================================== * NEW syntax hints inside Emacs gnuplot-mode * NEW support tabulation (set table) of pixel values from image plot styles * NEW support tabulation of variable color column * CHANGE emf output modified for better compatibility with MS Office programs * CHANGE canvas terminal loads appropriate font file for UTF-8 encoding * CHANGE skip execution of empty iteration loops in set and do commands * CHANGE build scripts modified to accommodate automake 1.12 * CHANGE new policy: objects given in screen coords are not clipped to graph * CHANGE Draw the z-axis label at a fixed distance to the left of the z-axis * CHANGE "unset object N" succeeds even if there is currently no object N * CHANGE gnuplot.el: catch up with 10 year old syntax change in emacs/elisp * FIX margin space required for rotated axis tic labels * FIX check for NaN values in binary input * FIX backslash handling in enhanced text strings * FIX cairo terminals sometimes lost the line segment before a polygon * FIX interactive toggle of multiplots in svg * FIX failure to balance {} if an input file did not end with a newline * FIX strlen() and substring operators correctly handle UTF-8 * FIX initialization of history when configured --with-readline=bsd * FIX set term cairolatex pdf mono * FIX palette-related corruption in some cairolatex output * FIX preserve number of active call arguments across a nested call command * FIX wxt terminal mutex protecting execution of the command list * FIX apply clipping to the interior fill of circles and ellipses * FIX corruption of weights used for plotting with smooth acsplines * FIX skip columnheader line when applying "every" filter * FIX handle out-of-range pm3d values when cb axis is set to log scale * FIX top/bottom color distinction in hidden3d when not using palette/RGB colors * FIX allow toggling on/off of more than 10 plots in windows terminal * FIX color printing from windows terminal * FIX set term win font ",<size>" * FIX incorrect return for acos(x) when imag(x) > 0 (bug present since v3.7) incorrect return for asin(x) when imag(x) > 0 (bug in 4.4.4, 4.6.0) incorrect asinh(x) when real(x) < 0 && imag(x) == 0 (bug in 4.4.4, 4.6.0) * FIX keep sufficient precision in canvas and svg coords to report time in msec * FIX the input buffer was not always extended correctly inside a { clause } * FIX some cairolatex set_color requests were being ignored * FIX calculated value of kernel density mean and sigma * FIX emf terminal dashed line support * FIX qt terminal build/installation procedure on OSX * FIX array overflow while processing rowstacked histograms * FIX boxes containing transparent patterns in PostScript output New features, changes and fixes in gnuplot version 4.6 ====================================================== * NEW individual plots can be toggled on/off by clicking on the key sample (wxt, svg, canvas, qt, win) * NEW syntax allowing column selection by matching a string in the first line * NEW syntax supporting multi-line blocks of code delimited by curly braces if (<cond>) { ... } else { ... } do for [...] { ... } while (<cond>) { ... } * NEW summation expression: sum [<var> = <beg> : <end>] <something> * NEW nested iteration e.g. "plot for [i=1:5] for [j=1:5]" * NEW explicit justification for tic labels, e.g. "set xtics right" * NEW time formats can handle fractional seconds (microsecond precision) * NEW time() function returns current time * NEW hidden3d supports "with impulses" * NEW hidden3d supports arrow style parameters for "with vectors" * NEW user-definable linetypes * NEW plot style "with boxplot" * NEW plot style "with circles" allows start/end angles for each arc * NEW plot style "with ellipses" * NEW plot style "with fillsteps" * NEW qt terminal driver * NEW epscairo terminal driver * NEW context terminal driver * NEW cairolatex terminal driver * NEW variable (per-data point) color for additional plot styles * NEW "set key opaque" produces a key with an opaque background * NEW ISO-IEC-80000 prefixes (ki Mi Gi etc) available as gprintf formats %b %B * NEW encodings cp950 cp1251 * NEW option "set fit quiet" * NEW option "kdensity2d" for two-dimensional kernel density plots * NEW configuration option --without-bitmap-terminals (see note in INSTALL) * NEW polar mode raxis, rtics, rrange, log-scaling, bounded filledcurves * NEW Shift-JIS encoding recognized by postscript, gd, svg, and win terminals * NEW windows terminal supports encodings * NEW mouse tracking for SVG terminal * NEW tab-completion for builtin readline * NEW windows terminal can save graph as EMF file * NEW cubehelix scheme for color palettes * NEW localisation support for Windows help and menu file * NEW Windows installer * NEW shared initialization file $GNUPLOT_SHARE_DIR/gnuplotrc * FIX length estimation of UTF-8 strings * FIX accurate placement of color boundaries in the colorbar * FIX Built-in readline handles UTF-8 encoding * FIX asin(sin(z)) == z for complex z * FIX default configuration does not initialize from ./.gnuplot * CHANGE 3D zoom using middle mouse button is now a logarithmic response * CHANGE 3D impulses are now always drawn from z=0 * CHANGE remove vestigial code supporting Amiga, Apollo, and 16-bit MSDOS/WIN * CHANGE remove obsolete drivers unixplot and gnugraph * CHANGE extend formats x/X/o/O to 64 bits if necessary to represent the value * CHANGE "set palette maxcolors" no longer fights with "set palette defined" * CHANGE javascript support for HTML5 canvas does not use global variables * CHANGE Built-in readline DEL recognized as forward-delete (system-dependent) * CHANGE Built-in readline ^W deletes previous full or partial word * CHANGE wgnuplot text window supports wrapping of long lines * CHANGE new Windows help file format (chm) * CHANGE copy graph to clipboard as enhanced metafile in windows terminal * CHANGE improved windows terminal driver * CHANGE hidden3d top/bottom surface colors taken from linetype, not line style New features, changes and fixes in gnuplot version 4.4 ====================================================== * NEW CANDLESTICKS accept an option 6th input column specifying width * NEW point property 'pointinterval' * NEW gnuplot.exe is a full-featured console mode gnuplot executable for Windows * NEW plot style "with circles" * NEW object types circle, ellipse, and polygon * NEW options front and back to "set colorbox" * NEW x11 can plot into a window opened and managed by an external application * NEW gd terminal can use fonts through fontconfig (libgd version > 2.0.35) * NEW optional 3 columns of data to generate histogram errorbars * NEW 'volatile' data, including inline data, can be replotted without rereading * NEW 'refresh' command replots without rereading data if possible * NEW rgbimage style now works in 2D and 3D for all terminals that support RGB * NEW plot style rgbalpha * NEW transparent fill styles * NEW iteration within a plot command; e.g. plot for [i=1:10] foo(i) * NEW iteration with set/unset commands * NEW operators '=' and ',' in expression syntax * NEW terminal lua generates commands for interpretation by external lua script * NEW terminal tikz uses a lua script to generate output for latex TikZ package * NEW terminal canvas for HTML 5 canvas element * NEW terminal pdfcairo based on cairo and pango * NEW terminal pngcairo based on cairo and pango * NEW terminal dpu414 - Seiko DPU-414 thermal printer * NEW error status variables GPVAL_ERRNO and GPVAL_ERRMSG * NEW variables GPVAL_LAST_PLOT, GPVAL_{S}PLOT, GPVAL_MULTIPLOT * NEW variables GPVAL_VIEW_{MAP|ROT_X|ROT_Z|SCALE|ZSCALE}, GPVAL_TERMINALS * NEW variables GPVAL_PWD * NEW per-plot export of information needed for external mousing scripts * NEW support for dashed linetypes in additional terminals * NEW the 'bind' command accepts non-keyboard triggers, e.g. 'close' * NEW commands 'show bind' and 'reset bind' * NEW individual plots can be omitted from autoscaling of axis ranges * NEW more smoothing options: new kernels (for dgrid3d) and 'smooth cumulative' * NEW command 'evaluate' executes commands from a string variable * NEW z-axis tic labels can be colored by Z value * NEW command 'set view equal {xy|xyz}' forces axes in a 3D plot to the same scale * NEW 'set pm3d interpolate m,n' supports also non-positive m,n as nbs of points * FIX domain restrictions on ibeta() * FIX remove the limit of 64 characters read as string data from a data file * FIX remainder of command line is not lost after a "load" command * FIX more complete support for locale internationalization, UTF-8 encoding * FIX various font-handling problems in postscript terminal driver * FIX avoid infinite loop on resizing x11 plot window under ion, fluxbox * FIX handle addition plot styles in mode 'set table' * FIX purge tick labels read from a datafile at the end of each plot * FIX 2nd colour in the colour box for negative palette in postscript * FIX interpolatation for pm3d surfaces given by both z and colour coordinates * FIX 'set datafile binary format=...' was documented, but not implemented * FIX enhanced text mode treatment of UTF-8 characters * CHANGE A number that begins with a . must continue with a digit * CHANGE syntax of 'set datafile binary' array= and record= options * CHANGE 'reset' does not affect locale, encoding, decimalsign settings * CHANGE 'set key textcolor rgb variable' will use plot colors for key entries * CHANGE Remove obsolete IRIS4D terminal type * CHANGE Remove obsolete atari terminal types (atariaes atarivdi multitos) * CHANGE Use empty/solid fill for candlesticks rather than empty/striped * CHANGE 'l' and 'L' hotkeys toggle colorbar logscale iff mouse is in colorbar Features, changes and fixes in gnuplot version 4.2 ================================================== Below you find a list of news, changes and fixes in gnuplot version 4.2. Please see also section "What is New in Version 4.2" in gnuplot documentation (files gnuplot.gih, gnuplot.hlp, gnuplot.inf, etc.) available by the command gnuplot> help new from gnuplot 4.2. You may find it also in files gnuplot.pdf, gnuplot.html or gnuplot.info optionally available in your distribution, or online at http://www.gnuplot.info/docs/gnuplot.html#What_is_New_in_Version_4.2 * NEW autogenerated read-only variables prefixed GPVAL_ and "show variables all" * NEW Japanese language documentation - FAQ and User Manual * NEW multi-platform and interactive wxWidgets terminal * NEW windows terminal supports enhanced text mode * NEW support for placement of individual rectangles within plot or canvas * NEW command "set style increment user" allows customization of default lines * NEW commands raise and lower * NEW y and y2 axis label rotation can be explicitly controlled (2D plots only) * NEW {no}enhanced flag can be applied to individual labels * NEW suboption 'set pm3d interpolate' for bilinear interpolation of surfaces * NEW 3D plots can read RGB color triples as part of input data * NEW write command history file also for gnuplot's readline * NEW more versatile key placement and arrangement * NEW 'splot x*y with pm3d' no longer requires prior 'set pm3d' * NEW store a sequence of plots to an animated gif (requires libgd > 2.0.28) * NEW multi-byte font support in x11, controlled by the locale setting LC_CTYPE * NEW control decimal sign conventions using locale setting LC_NUMERIC * NEW pstex, pslatex and epslatex terminals share functionality with postscript * NEW suboptions "set pm3d corners2color min|max" * NEW suboption "set pm3d depthorder" does hidden-surface removal (sort of) * NEW linetype colors via "lt {palette {frac <val> | cb <val>}}" * NEW linetype colors via "lt {rgbcolor {"name" | "#RRGGBB"}}" * NEW palette and rgb linetype colors apply to all 2D and 3D plot elements * NEW user defined variables can contain strings * NEW expression evaluation can manipulate and return strings * NEW built-in string functions sprintf, gprintf, substr, strstrt, word, words * NEW built-in string function system("shell command") * NEW command line macro expansion @<stringvariablename> * NEW automatic variable $# expanded to number of arguments after "call" * NEW reading of (almost) arbitrary image binary files * NEW plot styles "with image" and "with rgbimage" * NEW plot style "with labels" reads text data along with X/Y/Z coordinates * NEW plot style "with histograms" creates clustered or stacked histograms * NEW auto-layout of multiplot using "set multiplot layout <rows>, <cols>" * NEW variant of plot "with filledcurves" that fills the area between two curves * NEW variant of "with filledcurves" that fills only above or below the curve * NEW using options {x|y|z}ticlabels(<col>) * NEW option to read plot title from data file: set key autotitle columnheader * NEW command 'set termoption <foo>' changes single property of current terminal * NEW png driver supports antialiasing and TrueColor images * NEW encoding koi8-u * NEW plot style "with vectors" applies to both 2D and 3D plots * NEW plot style "with points" can read variable point size from input file * NEW "set tics" can change most settings for {x|y|z|cb}tics at once * NEW tic scale can be set per axis using "set {x|y|z|cb}tics scale" * CHANGE history file is written by default * CHANGE PostScript prolog and character encoding files now maintained separately * CHANGE Placement of z-axis label in 3D plots is now equivalent to x and y axes * CHANGE "set ticsscale" is deprecated, use "set tics scale" instead * CHANGE gnuplot on x11 has mousing always enabled on startup * CHANGE 'set datafile fortran' is now required in order to read D or Q constants * CHANGE let the string in '{s}plot ... notitle "string"' be silently ignored * CHANGE libgd versions 2.0.28+ support GIF images as well as PNG/JPEG * CHANGE remove old (non-libgd) GIF and PNG drivers * CHANGE X-resource gnuplot*ctrlq:on requires <ctrl>q to kill plot window * CHANGE X-resource gnuplot*exportselection:off disables plot->clipboard export * CHANGE prefer use of offset keyword in 'set [xyz]label "foo" offset -1,-1' * CHANGE 'set table "outfile"; ...; unset table' replaces 'set term table' * CHANGE 'defined(foo)' is deprecated; new syntax is 'exists("foo")' * FIXED empty datafiles are not a fatal error * FIXED setenv GNUTERM now works for png, jpeg, and gif drivers * FIXED PostScript output can be restricted to Level 1 compatible features * FIXED emf output is compatible with MSWin XP SP 2 * FIXED limit size of X11 requests to half the maximum allowed by the X display * FIXED arrowheads drawn in solid lines even if the shaft is dotted (PostScript) * FIXED estimate true effective length of strings in enhanced text mode * FIXED clipping of filled curves Changes between gnuplot versions 3.7.2 and 4.0 ============================================== Below you find list of news, changes and fixes in gnuplot version 4.0 and older. Please see also section "What is New in Version 4.0" in gnuplot documentation (files gnuplot.gih, gnuplot.hlp, gnuplot.inf, etc.) available by the command gnuplot> help new from gnuplot 4.0. You may find it also in files gnuplot.pdf, gnuplot.html or gnuplot.info optionally available in your distribution, or online at http://www.gnuplot.info/docs/gnuplot.html#What_is_New_in_Version_4.0 Mouse and hotkey support in screen terminals The pm, x11, ggi and windows terminals support interactive work with mouse and hotkeys. The usage of the mouse is mainly self-explanatory. Just type 'h' in the graph window (hereafter we mean either PM, X11, ... terminal window) and a short overview of commands will pop up. The mouse is turned on and off with the hotkey 'm'. See 'help mouse' and 'help bind' for more details. The coordinates of mouse clicks are exported to variables MOUSE_X, MOUSE_Y, MOUSE_X2, MOUSE_Y2, and MOUSE_BUTTON accessible from the gnuplot command line. This allows gnuplot scripts to alter their behaviour based on interactive mouse input. See 'help mouse variables' and 'help pause mouse', and the example script demo/mousevariables.dem. Further it allows interaction of a gnuplot mouseable terminal and external programs in C, Python, Octave, etc. using gnuplot as their graph engine. This is demonstrated on gnuplot web page in section "Programming interfaces - bidirectional interaction". Brief list of news in gnuplot 4.0: * CHANGE sample calculated "smooth csplines" only in actual xrange * CHANGE 'set term gif' compile-time option to write PNG format instead * CHANGE pattern fill styles are uniform across all supporting terminals * CHANGE X-window plot and font size is used to adjust plot layout * CHANGE 'set key {on|off|default}' is preferred method for controlling key * CHANGE mouse position is tracked in all X windows (not just current one) * NEW enhanced text mode for additional terminal types * NEW built-in function 'defined(<variablename>)' * NEW mouse input information is exported to user-accessible variables * NEW 'set term png' and 'set term jpeg' using modern GD library * NEW set size ratio now works for splots, too * NEW grid options: {layerdefault | front | back} * NEW plot option "smooth frequency" * NEW terminal names now sorted alphabetically * NEW "with palette" also for points * NEW plotstyle "with filledcurves" * NEW 'set style fill' applies to boxes, boxxyerror, boxerror, candlesticks * NEW "set boxwidth <number> relative" * NEW options to FIG terminal driver * NEW parse errors in datafile reading now show the culprit * NEW labels can be printed attached to a point * FIXED interaction of "set xtics <incr>" with time/date axes * FIXED candlesticks now ignore order of high/low entries * FIXED keeping old arrow options if new "set" command modifies it * FIXED undoing a mouse zoom that started from autoscaled axis * FIXED contour line colours in pm3d's "with palette" mode * FIXED PostScript stack pollution caused by "Symbol Oblique" patch * FIXED warnings from perl -w in tkcanvas terminal output * FIXED dgrid3d floating point exception * FIXED logscaled colorbox axis * FIXED pgnuplot for Windows NT/2K/XP Time-organized list of news until gnuplot 4.0: [3.8k] * NEW let gnuplot on windows support -persist option * NEW encoding koi8-r * NEW 'set term x11 title "title"' and 'set term x11 close' * NEW 'test palette' * NEW 'set palette palette <n>' options {float|int} and output to that of 'set print' * NEW enhanced text mode for x11 gd pdf and dumb terminals * UPDATED aquaterm terminal driver (Mac OS X). Requires AquaTerm 1.0 or later. [3.8j] * NEW 'show palette fit2rgbformulae' * NEW 'set datafile commentschars {"<chars>"}' * NEW 'set datafile separator {whitespace | "<char>"}' * CHANGE terminal provided by openstep is called "openstep", not "next" * CHANGE terminal provided by gnugraph is called "gnugraph", not "unixplot" * NEW pm3d option corners2color * NEW PM3D support for pstricks terminal * NEW configure option --with-gihdir to specify location of .gih file * NEW aquaterm terminal driver, for MacOS X [3.8i] * NEW 'set style arrow' and back angles for arrow heads. * NEW option 'set view map' * NEW encapsulate PFA, PFB, TTF font file definitions into postscript files: option `set terminal postscript ... fontfile` * NEW command 'set fontfile' * NEW color modes for pm3d, see `help palette` * NEW option `set terminal postscript ... palfuncparam` * NEW set key {no}autotitles * NEW arbitrary text rotations; 'set label ... [no]rotate [by] ...' * NEW set arrow ... filled | nofilled ... * NEW set title ... textcolor ... * NEW set [x|y|z|cb|...]label ... textcolor ... * NEW set label ... textcolor ... * NEW show plot add2history * NEW explicit coloring of splots ... with lines|points palette according to the 4th column in the data file * NEW pm3d option {no}ftriangles * NEW splot ... with pm3d {at option} * CHANGE pause supports subsecond time resolution (on systems supporting it) * CHANGE "configure --with-x11-driver" and "set term x11 driver" removed. * CHANGE gnuplot_x11 now goes to $pkglibdir/$version, not $bindir * NEW environment variable GNUPLOT_DRIVER_DIR to override that path * NEW set log cb - since now, z and cb axes are completely independent * NEW set decimalsign * NEW set key {no}enhanced * NEW pm3d splots support independent z and color coordinates according to an optional 4th column of using * NEW X11 can rotate text [3.8h] * NEW set key height <height> [3.8g] * CHANGE set label with any line type (colour), point type and point size * CHANGE use either two or five minitic steps, never 4 (in logscale) * CHANGE reject candlesticks/financebars plots of to few colums --- warn and then plot with "points", instead * NEW Hotkeys to access clipboard in MS Windows version * NEW set style [data | function] filledcurves {options} plot ... with filledcurves {options} * NEW autoscale options: `fix`, `keepfix` * NEW some more fancy 3D demo plots * NEW mouse support and PM3D are now enabled by default * NEW more point symbol types in Windows terminal * FIXED PostScript font reencoding for non-default fonts * FIXED dgrid for logscaled axes * FIXED tic generation for axes that have |min/max| very close to 1 * FIXED several "impossible" parse erros in "show" command. * FIXED bounding box of PSLatex generated .eps files * (attempted) FIX: X11 deadlocks caused by stdio buffering vs. select() * FIXED baseline of "histeps" plots with logscaled or shifted y axis. * FIXED document spherical coordinates by reference to latitude/longitude * FIXED warn about missing HOME directory only in interactive mode * FIXED tpic terminal coordinate handling [3.8f] * NEW pipes under Windows (if compiled by MingW) * NEW PDF terminal driver --- needs PDFlib * NEW SVG terminal driver * NEW epslatex & EMF terminal drivers now always built in * NEW PM3D support for CGM, GGI and tgif terminals * NEW PM3D "set palette maxcolors" support for X11 and PostScript * NEW special maths function lambertw() * NEW axis for the color box * NEW encodings ISO-8859-2 and CP-852 for PostScript terminal * NEW PM terminal uses codepage 912 for iso_8859_2 encoding * NEW "index" option for "matrix" type datafiles * NEW commands 'set term push' and 'set term pop' * NEW much extended EEPIC terminal driver * NEW implement "clear" for Windows and OS/2 * NEW option "picsize" for PNG terminal * NEW mouse support for MS Windows * FIXED endless loop if both 'set timefmt' & 'set xtics <incr>' * FIXED detection of too new gd library without GIF support * FIXED interaction of autoscaling and "set size ratio" * FIXED PM3D allocated too many colors for multiplots * FIXED key sample line types in contour plots * FIXED timefmt parsing of "01Dec2000" vs. Fortran doubles * FIXED MS Windows pause box eating 100% CPU * FIXED ooold problem with HP-UX GCC breaking tic positioning * FIXED positioning of multiplots * FIXED correct rounding of exponents for %[SLT] --- needs %s to come first * FIXED ticmarks for very short axes (max - min < DBL_EPS) * FIXED "show ticslevel" and "show ticscale" * FIXED parse errors after "set xdata time" * FIXED MSDOS file corruption if re-opening same "set output" * FIXED reject many-column plot styles when plotting a function [3.8e] * NEW Major new feature "pm3d" for color plotting (formerly a branch version) * NEW set label can print numbers into the label text * NEW hidden3d allows non-grid datasets to be part of the plot * NEW hidden3d works with contour lines * NEW overprinting feature for PostScript revised * NEW Windows terminal now has linewidth support from inside gnuplot * NEW table terminal will output additional colums some plot styles * FIXED hidden3d display of tics and axes [3.8d] * NEW <Space> in Windows graph window beams focus to text window * NEW point sample and offset options for "set label" * NEW relative endpoints and choosable head shapes for "set arrow" * NEW interactive inline data input now has a prompt * NEW terminal driver epslatex --- like pslatex * NEW terminal driver GGI * NEW experimental driver for Enhanced Metafile Format (EMF) * NEW %s timefmt for reading seconds since the epoch * FIXED Pslatex actually changes the fontsize * FIXED PSTRICKS and EEPIC bounding box * FIXED output of filenames in enhanced-text terminals * FIXED reading of ~/.Xdefaults * FIXED block mouse-generated replot if inline data in use * FIXED 3D clipping of "key below" or "outside" samples * FIXED zeroaxes bug introduced by vector clipping * FIXED bug with "smooth unique" inrange/outrange conditions * FIXED autoscale writeback bug (see BUGS entry 3) * FIXED png parser bug * FIXED buggy `show m[xyz][2]tics' command * FIXED bug in `show key' if key is boxed * FIXED building on VMS * FIXED bug in 3d plot introduced by mouse code * terminal-dependent configuration of GNU readline * updated FIG terminal driver to new file format version CGM terminal mods: * NEW: files are now compliant with MIL-D-28003A. * NEW: Standard font table now includes the standard WebCGM fonts and the Hershey fonts. Gnuplot knows the widths of the standard fonts. Default font is now "Helvetica Bold". New fonts can be added to the table without deleting the standard ones. * NEW: open markers. yellow removed due to poor visibility. Orange and gray added. User can specify new line colors. * UPDATE: "winword6" option is now just a deprecated synonym for "nofontlist". * FIXED: Font height handling (e.g. crowded keys) * FIXED: "solid" option. * FIXED: linewidth changes were sometimes applied to the wrong lines. [3.8c] * NEW mouse support for OS/2 and X11 - --enable-mouse option - --with-X11-driver option - new commands "bind", "set historysize", "set mouse", and "set label [no]pointstyle". * NEW configure.vms script for VMS * NEW oblique symbol font for ps driver * NEW introduce pipe for load command gnuplot> load "< ...". * FIXED typo in save xrange * FIXED defunct 'unset [xyz]tics' commands * FIXED segfault in pslatex driver * FIXED crash in OS/2 REXX code * FIXED crash in fit code * FIXED bug in 3d plot size after setting nokey * FIXED bug in postscript epsf option * don't put pslatex's postscript code into preamble, as this will only use the settings for the last picture if several pictures are present * the results of unset border and unset clabel are different from reset [3.8b] * retain backwards compatibility for old syntax * ongoing work: modularisation * NEW, improved version of hidden3d code * --enable-history configure option renamed to --enable-history-file to avoid mixup with new 'history' command * fix to find gethostbyname(3) on LynxOS * added new implementation of hidden3d code * FIXED png driver now shares web-friendly palette with gif driver; also new transparency option and user defined colour specs * FIXED data format for table driver * FIXED monochrome plots with Windows driver * FIXED bug in contour handling * FIXED clipping of contour input points outside fixed ranges * FIXED bug in coordinates saving * history command now works with GNU readline * implemented vector style clipping for 2D plots * UPDATED gnugraph driver now requires plotutils 2.2+ * UPDATED platform makefileS * UPDATED hpgl driver * UPDATED FAQ [3.8a] * doc2texi.el, gnuplot.texi added; remove doc2info.c, doc2html.c, doc2texi.pl, and fixinfo.el; the info and html files are now created with makeinfo, the latter requires makeinfo (GNU texinfo) 4.0 * FIXED the 'set ?range' commands now use a decimal point to prevent integer overflow on 16 bit platforms * FIXED 'save'd files are now consistent with the new syntax [3.7.0.10 - internal only] * removed DJGPP version 1 support * improved version of stdin wrapper for Win32 * ongoing work: rewrite of input parser * gnuplot now passes the correct return value back to the environment * FIXED buffering bug in gnuplot_x11 * FIXED crash in 16bit Windows * FAQ updated * FIXED some inconsistencies in error messages and the manual * INCOMPATIBLE CHANGE: the 'set data style', 'set function style' and 'set linestyle' commands have been removed. They have been replaced with 'set style data|function|line'. The 'set nolinestyle' command, however, is still available for the time being. * NEW 'system', 'unset' command * INCOMPATIBLE CHANGE: all 'set noVariable' commands have been replaced with the new 'unset Variable' command. * NEW 'save term' option * FIXED building on NeXT * NEW 'history' command, by Petr Mikulik. Currently works only without GNU readline. * FIXED gnuplot now checks for minimum and maximum of required columns in data plots * UPDATED VMS build procedures * gnuplot-mode updated to 0.5j * FIXED reversed 'set {x|y}zeroaxis' behaviour * FIXED plotting of test page before line properties are specified completely * UPDATED metapost driver * better modularisation [3.7.0.9] * moved some declarations to new header files * more static arrays removed or replaced with malloc'd storage * duplicate functions removed * driver for OpenStep/MacOS X server now complete * FIXED bug in plot positioning with multiplot * FIXED bug in J. Pepin's layers patch * FIXED bug in M. Gardner's help formatting patch * FIXED definition of ANSI_C on autoconf platforms * FIXED argument passing to gnuplot_x11 on VMS * NEW `save' command now accepts "-" as filename, "saving" to stdout * INCOMPATIBLE CHANGE: "%y" date specifiers are now interpreted according the recommendations of The Open Group. When a century is not otherwise specified, values in the range 69-99 refer to the twentieth century and values in the range 00-68 refer to the twenty-first century. [3.7.0.8] * embedding document font is now default font in latex output * static limits for user defined function and variable names removed * 'make check' now passes GNUTERM from the command line to gnuplot. * FIXED off-by-one error in gif driver y-scaling * gnuplot-mode updated to 0.5g * FIXED errors in 'set view <z_scale>'. Related demos have been updated too. * src directory now uses automake Makefile * #error and #warning directives have been removed. * more efficient way of building docs/allterm.h * FIXED auxiliary ps filename generation in pslatex driver [3.7.0.7] * FIXED timestamp positioning problem in X11 terminal * FIXED exit/quit in batch files now works as documented * FIXED 'replot' with no args does not discard rest of ';' separated command line anymore * no more fixed limit to the number of contour levels, now allocated dynamically * improvements in the OS/2 mouse driver * backtic command substitution now works inside quoted strings * NEW driver for metapost output * NEW driver for openstep/MacOS X Server * NEW perltk driver integrated into tkcanvas driver * NEW loadpath feature, uses GNUPLOT_LIB env var see 'help environment' and 'help loadpath' * updated to version 0.5f of gnuplot-mode * CHANGE in command line substitution: Newlines in the output produced by the spawned command are stripped. They are NOT replaced with blanks anymore. This is a possible source of incompatibility. * CHANGE gnuplot's error and warning functions now accept a variable number of arguments. On platforms without vfprintf or doprnt, the number of format-dependent arguments is limited to 8. [3.7.0.6] * Petr Mikulik's OS/2 mouse patch integrated * 'make check' now runs demos non-interactively * Linux SVGA driver: don't drop root priviledge until VGA is initialised * LaTeX tutorial updated for LaTeX2e * gnuplot-mode updated to 0.5e * old patches for postscript driver integrated: different colours for key text and sample (blacktext), linewidth, dashlength options * extensions to tkcanvas driver * fixes in fig and metafont drivers * bugfixes related to secondary axes (show/nologscale) * new '--without-lisp-files' and '--without-tutorial' configure options * new targets to build documentation with groff * quoting bug fixed * new files VERSION, PATCHLEVEL, README.exp [3.7.0.5] * another off-by-one error fixed in pstricks driver * updated to latest version of gnuplot-mode * added tilde-expansion of filenames * win/pgnuplot.c added, stdin redirection for gnuplot under Windows * extended interactive Tk/Tcl capabilities * only read from stdin if the complete filename is "-" * added fitting of time format data * workaround for the bug that made 'set key below' sometimes lack some of the key texts * build lisp files, LaTeX tutorial only if emacs, latex, resp. are found * moved CVS repository to new dir structure * gnuplot can now be compiled with GNU libplot 2.2 * docs/doc2hlp.com renamed to docs/doc2hlp.vms pending better solution [3.7.0.4] * switched to new directory structure! * fix to plot all lines in multiline labels within plot borders * hardwire terminal sources into docs/Makefile.in * better docs for 'set missing' * hopefully complete fix for off-by-one error in pslatex driver * fix core dump in alloc.c (only relevant for memory debugging) [3.7.0.3] (released as patch only) * brush up the various platform makefiles * typo in plot.c free() statement fixed * some fixes in the Be driver [3.7.0.2] * add pgp keys * NEW driver for BeOS * X11 driver now uses ececvp() instead of execl() to eliminate intermediate shell process * NEW gnuplot-mode.el for X/Emacs * update to OS/2 REXX interface * more drivers enabled by default under OS/2 * Bezier interpolation rewritten to prevent overflow * Windows linestyle fixed * introduce layers (front, back) for labels and arrows * tiny and giant fonts added to gif driver * tilde expansion; (does not work for "cd" and "set output") * GNU readline related: new syntax for --with-readline option in configure no more duplicate history entries use gnuplot history file * SECURITY: --with-linux-vga=no is now default * SECURITY: better control when Linux executable with SVGAlib access actually runs as root * SECURITY: potential risk fixed in iris4d terminal * EXPERIMENTAL: new --enable-thin-splines option in configure to enable thin plate splines in plot3d.c * configuration: --enable-apollo, --enable-gpr and --enable-unixpc options removed, related code is now in syscfg.h. --enable-cgi and --enable-sun options removed, now automatically detected at configure time. --enable-system-time option removed. [3.7.0.1] * bug fix for negative aspect ratio * bug fixes in the cgm, eepic, png, and pslatex driver * bug fix in the data fitting code * bug fixes for HP-UX, NEXT, and Windows * bug fixes for save and set lmargin commands * better makefile for Amiga SAS/c ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/���������������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340017�011053� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/doc2ms.c�������������������������������������������������������������������������0000644�0004711�0000144�00000017155�10707513067�012433� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: doc2ms.c,v 1.19 2007/10/24 00:47:51 sfeam Exp $"); } #endif /* GNUPLOT - doc2ms.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * doc2ms.c -- program to convert Gnuplot .DOC format to *roff -ms document * From hlp2ms by Thomas Williams * * Modified by Russell Lang, 2nd October 1989 * to make vms help level 1 and 2 create the same ms section level. * * Modified to become doc2ms by David Kotz (David.Kotz@Dartmouth.edu) 12/89 * Added table and backquote support. * * usage: doc2ms [file.doc [file.ms]] * * where file.doc is a VMS .DOC file, and file.ms will be a [nt]roff * document suitable for printing with nroff -ms or troff -ms * * typical usage for GNUPLOT: * * doc2ms gnuplot.doc | tbl | eqn | troff -ms * * or * * doc2ms gnuplot.doc | groff -ms -et >gnuplot.ps */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "syscfg.h" #include "stdfn.h" #include "doc2x.h" #define LINE_SKIP 3 void init __PROTO((FILE *)); void convert __PROTO((FILE *, FILE *)); void process_line __PROTO((char *, FILE *)); void section __PROTO((char *, FILE *)); void putms __PROTO((char *, FILE *)); void putms_verb __PROTO((char *, FILE *)); void finish __PROTO((FILE *)); static TBOOLEAN intable = FALSE; int main (int argc, char **argv) { FILE *infile; FILE *outfile; infile = stdin; outfile = stdout; if (argc > 3) { fprintf(stderr, "Usage: %s [infile [outfile]]\n", argv[0]); exit(EXIT_FAILURE); } if (argc >= 2) { if ((infile = fopen(argv[1], "r")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for reading\n", argv[0], argv[1]); exit(EXIT_FAILURE); } } if (argc == 3) { if ((outfile = fopen(argv[2], "w")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for writing\n", argv[0], argv[2]); exit(EXIT_FAILURE); } } init(outfile); convert(infile, outfile); finish(outfile); return EXIT_SUCCESS; } void init(FILE *b) { /* in nroff, increase line length by 8 and don't adjust lines */ (void) fputs(".if n \\{.nr LL +8m\n.na \\}\n\ .nr PO +0.3i\n\ .so titlepag.ms\n\ .pn 1\n\ .bp\n\ .ta 1.5i 3.0i 4.5i 6.0i 7.5i\n\ \\&\n.sp 3\n.PP\n", b); /* following line commented out by rjl (void) fputs(".so intro\n",b); */ } void convert( FILE *a, FILE *b) { static char line[MAX_LINE_LEN+1]; while (get_line(line, sizeof(line), a)) { process_line(line, b); } } void process_line( char *line, FILE *b) { switch (line[0]) { /* control character */ case '?':{ /* interactive help entry */ break; /* ignore */ } case '@':{ /* start/end table */ if (intable) { (void) fputs(".TE\n.KE\n", b); (void) fputs(".EQ\ndelim off\n.EN\n\n", b); intable = FALSE; } else { (void) fputs("\n.EQ\ndelim $$\n.EN\n", b); (void) fputs(".KS\n.TS\ncenter box tab (@) ;\n", b); /* moved to gnuplot.doc by RCC (void) fputs("c c l .\n", b); */ intable = TRUE; } /* ignore rest of line */ break; } case '^':{ /* html table entry */ break; /* ignore */ } case '=': /* latex index entry */ case 'F': /* latex embedded figure */ case '#':{ /* latex table entry */ break; /* ignore */ } case '%':{ /* troff table entry */ if (intable) (void) fputs(line + 1, b); /* copy directly */ else fprintf(stderr, "error: %% line found outside of table\n"); break; } case '\n': /* empty text line */ case ' ':{ /* normal text line */ if (intable) break; /* ignore while in table */ switch (line[1]) { case ' ':{ /* verbatim mode */ fputs(".br\n", b); putms_verb(line + 1, b); fputs(".br\n", b); break; } case '\'':{ fputs("\\&", b); putms(line + 1, b); break; } case '.':{ /* hide leading . from ms */ fputs("\\&", b); putms(line + 1, b); break; } default:{ if (line[0] == '\n') putms(line, b); /* handle totally blank line */ else putms(line + 1, b); break; } break; } break; } default:{ if (isdigit((int)line[0])) { /* start of section */ if (!intable) /* ignore while in table */ section(line, b); } else fprintf(stderr, "unknown control code '%c' in column 1\n", line[0]); break; } } } /* process a line with a digit control char */ /* starts a new [sub]section */ void section( char *line, FILE *b) { static char string[MAX_LINE_LEN+1]; int sh_i; static int old = 1; (void) sscanf(line, "%d %[^\n]s", &sh_i, string); (void) fprintf(b, ".sp %d\n", (sh_i == 1) ? LINE_SKIP : LINE_SKIP - 1); if (sh_i > old) { do if (old != 1) /* this line added by rjl */ (void) fputs(".RS\n.IP\n", b); while (++old < sh_i); } else if (sh_i < old) { do if (sh_i != 1) /* this line added by rjl */ (void) fputs(".RE\n.br\n", b); while (--old > sh_i); } /* added by dfk to capitalize section headers */ if (islower((int)string[0])) string[0] = toupper(string[0]); /* next 3 lines added by rjl */ if (sh_i != 1) (void) fprintf(b, ".NH %d\n%s\n.sp 1\n.LP\n", sh_i - 1, string); else (void) fprintf(b, ".NH %d\n%s\n.sp 1\n.LP\n", sh_i, string); old = sh_i; (void) fputs(".XS\n", b); (void) fputs(string, b); (void) fputs("\n.XE\n", b); } void putms( char *s, FILE *file) { static TBOOLEAN inquote = FALSE; while (*s != NUL) { switch (*s) { case '`':{ /* backquote -> boldface */ if (inquote) { fputs("\\fR", file); inquote = FALSE; } else { fputs("\\fB", file); inquote = TRUE; } break; } case '\\':{ /* backslash */ fputs("\\\\", file); break; } case '\'':{ /* single quote */ fputs("\\&'", file); break; } default:{ fputc(*s, file); break; } } s++; } } /* * convert a verbatim line to troff input style, i.e. convert "\" to "\\" * (added by Alexander Lehmann 01/30/93) */ void putms_verb( char *s, FILE *file) { while (*s != '\0') { if (*s == '\\') { fputc('\\', file); } fputc(*s, file); s++; } } /* spit out table of contents */ void finish(FILE *b) { fputs("\ .pn 1\n\ .ds RH %\n\ .af % i\n\ .bp\n.PX\n", b); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/doc2ipf.c������������������������������������������������������������������������0000644�0004711�0000144�00000036232�11724576715�012600� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: doc2ipf.c,v 1.21.4.1 2012/03/03 16:20:59 mikulik Exp $"); } #endif /* GNUPLOT - doc2ipf.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * doc2ipf.c -- program to convert Gnuplot .DOC format to OS/2 * ipfc (.inf/.hlp) format. * * Modified by Roger Fearick from doc2rtf by M Castro * * usage: doc2ipf gnuplot.doc gnuplot.ipf * */ /* note that tables must begin in at least the second column to */ /* be formatted correctly and tabs are forbidden */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "syscfg.h" #include "stdfn.h" #define MAX_LINE_LEN 1023 #include "doc2x.h" #include "xref.h" #define MAX_COL 6 /* From xref.c */ extern void *xmalloc __PROTO((size_t)); void convert __PROTO((FILE *, FILE *)); void process_line __PROTO((char *, FILE *)); /* malloc's are not being checked ! */ struct TABENTRY { /* may have MAX_COL column tables */ struct TABENTRY *next; char col[MAX_COL][256]; }; struct TABENTRY table; struct TABENTRY *tableins = &table; int tablecols = 0; int tablewidth[MAX_COL] = {0, 0, 0, 0, 0, 0}; /* there must be the correct number of zeroes here */ int tablelines = 0; #define TmpFileName "doc2ipf.tmp" static TBOOLEAN debug = FALSE; int main (int argc, char **argv) { FILE *infile; FILE *outfile; if (argc == 4 && argv[3][0] == '-' && argv[3][1] == 'd') debug = TRUE; if (argc != 3 && !debug) { fprintf(stderr, "Usage: %s infile outfile\n", argv[0]); exit(EXIT_FAILURE); } if ((infile = fopen(argv[1], "r")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for reading\n", argv[0], argv[1]); exit(EXIT_FAILURE); } if ((outfile = fopen(argv[2], "w")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for writing\n", argv[0], argv[2]); fclose(infile); exit(EXIT_FAILURE); } parse(infile); convert(infile, outfile); return EXIT_SUCCESS; } void convert(FILE *a, FILE *b) { static char line[MAX_LINE_LEN+1]; /* generate ipf header */ fprintf(b, ":userdoc.\n:prolog.\n"); fprintf(b, ":title.GNUPLOT\n"); fprintf(b, ":docprof toc=123456.\n:eprolog.\n"); /* process each line of the file */ while (get_line(line, sizeof(line), a)) { process_line(line, b); } /* close final page and generate trailer */ fprintf(b, "\n:euserdoc.\n"); list_free(); } void process_line(char *line, FILE *b) { static int line_count = 0; static char line2[MAX_LINE_LEN+1]; static int last_line; char hyplink1[64]; char *pt, *tablerow; int i; int j; static int startpage = 1; char str[MAX_LINE_LEN+1]; char topic[MAX_LINE_LEN+1]; int k, l; static int tabl = 0; static int para = 0; static int inquote = FALSE; static int inref = FALSE; static int intable = FALSE; static int intablebut = FALSE; static int introffheader = FALSE; static char tablechar = '@'; static FILE *bo = NULL, *bt = NULL; static char tabledelim[4] = "%@\n"; static int nblanks = 0; struct LIST *klist; line_count++; if (debug && introffheader) { fprintf(stderr, "%s\n", line); } if (bo == NULL) bo = b; i = 0; j = 0; nblanks = 0; while (line[nblanks] == ' ') ++nblanks; while (line[i] != NUL) { if (introffheader) { if (line[i] != '\n') line2[j] = line[i]; else line2[j] = NUL; } else switch (line[i]) { case '$': /* FIXME: this fails for '$' entry in 'unitary operators' */ if (intable && (tablechar != '$') && (line[0] == '%')) { if (line[++i] == NUL || line[i+1] == NUL) break; if (line[i + 1] == '$' || line[i] == 'x' || line[i] == '|') { while (line[i] && line[i] != '$') line2[j++] = line[i++]; --j; } else { while (line[i] != '$' && line[i+1] != NUL) i++; if (line[i + 1] == ',') i++; if (line[i + 1] == ' ') i++; line2[j] = line[++i]; } } else line2[j] = line[i]; break; case ':': strcpy(&line2[j], "&colon."); j += strlen("&colon.") - 1; break; case '&': /* real hack to solve \&_ in postscript doc tables */ /* (which are a special case hack anyway. */ if (j > 0 && line2[j - 1] == '\\') { j -= 2; break; } strcpy(&line2[j], "&."); j += strlen("&.") - 1; break; case '\r': case '\n': break; case '`': /* backquotes mean boldface or link */ if (nblanks > 7) { line2[j] = line[i]; break; } if ((!inref) && (!inquote)) { k = i + 1; /* index into current string */ l = 0; /* index into topic string */ while ((line[k] != '`') && (line[k] != 0)) { topic[l] = line[k]; k++; l++; } topic[l] = 0; klist = lookup(topic); if (klist != NULL && (k = klist->line) > 0) { sprintf(hyplink1, ":link reftype=hd res=%d.", k); strcpy(line2 + j, hyplink1); j += strlen(hyplink1) - 1; inref = k; } else { if (debug) fprintf(stderr, "Can't make link for \042%s\042 on line %d\n", topic, line_count); strcpy(line2 + j, ":hp2."); j += 4; inquote = TRUE; } } else { if (inquote && inref) fprintf(stderr, "Warning: Reference Quote conflict line %d\n", line_count); if (inquote) { strcpy(line2 + j, ":ehp2."); j += 5; inquote = FALSE; } if (inref) { /* must be inref */ strcpy(line2 + j, ":elink."); j += 6; inref = FALSE; } } break; case '.': /* Makes code less readable but fixes warnings like <..\docs\gnuplot.ipf:6546> Warning 204: Invalid macro [.gnuplot_iris4d] which is triggered by a '.' character in the first column */ if (i==1) { strcpy(line2+j, "&per."); j += 4; } else line2[j] = line[i]; break; default: line2[j] = line[i]; } i++; j++; if ((j >= sizeof(line2))) { fprintf(stderr, "MAX_LINE_LEN exceeded\n"); if (inref || inquote) fprintf(stderr, "Possible missing link character (`) near above line number\n"); abort(); } line2[j] = NUL; } i = 1; switch (line[0]) { /* control character */ case '?':{ /* interactive help entry */ if (line[1] != '\n') /* skip empty index entries */ fprintf(b, ":i1.%s", line+1); if (intable) intablebut = TRUE; break; } case '@':{ /* start/end table */ intable = !intable; if (intable) { tablechar = '@'; introffheader = TRUE; intablebut = FALSE; tablelines = 0; tablecols = 0; tableins = &table; for (j = 0; j < MAX_COL; j++) tablewidth[j] = 0; } else { /* dump table */ int header = 0; introffheader = FALSE; /* position is no longer in a troff header */ intablebut = FALSE; tableins = &table; fprintf(b, ":table frame=none rules=vert cols=\'"); for (j = 0; j < MAX_COL; j++) if (tablewidth[j] > 0) fprintf(b, " %d", tablewidth[j]); fprintf(b, "\'.\n"); tableins = tableins->next; if (tableins->next != NULL) header = (tableins->next->col[0][1] == '_'); if (header) tableins->next = tableins->next->next; while (tableins != NULL) { fprintf(b, ":row.\n"); for (j = 0; j < tablecols; j++) if (header) fprintf(b, ":c.:hp9.%s:ehp9.\n", tableins->col[j]); else fprintf(b, ":c.%s\n", tableins->col[j]); tableins = tableins->next; /* skip troff 'horizontal rule' command */ if (tableins) if (tableins->col[0][1] == '_') tableins = tableins->next; header = 0; } fprintf(b, ":etable.\n"); if (bt != NULL) { rewind(bt); while (get_line(str, sizeof(str), bt)) fputs(str, b); fclose(bt); remove(TmpFileName); bt = NULL; bo = b; } } break; } case '=':{ /* index entry */ fprintf(b, ":i1.%s", line+1); break; } case 'F':{ /* latex embedded figure */ break; /* ignore */ } case '#':{ /* latex table entry */ break; /* ignore */ } case '%':{ /* troff table entry */ if (intable) { if (introffheader) { if (debug) { fprintf(stderr, ">%s\n", line2); fprintf(stderr, "tablechar: %c\n", tablechar); } if ((line[1] == '.') && (strchr(line2, tablechar) == NULL)) /* ignore troff commands */ break; pt = strchr(line2, '('); if (pt != NULL) tablechar = *(pt + 1); if (debug) { fprintf(stderr, "tablechar: %c\n", tablechar); } pt = strchr(line2 + 2, '.'); if (pt != NULL) introffheader = FALSE; break; } if ((line[1] == '.') && (strchr(line+2, tablechar) == NULL)) { /* ignore troff commands */ introffheader = TRUE; break; } tablerow = line2; tableins->next = xmalloc(sizeof(struct TABENTRY)); tableins = tableins->next; tableins->next = NULL; j = 0; tabledelim[1] = tablechar; line2[0] = tablechar; while ((pt = strtok(tablerow, tabledelim + 1)) != NULL) { if (*pt != NUL) { /* ignore null columns */ char *tagend, *tagstart; /* this fails on format line */ if (j >= MAX_COL) { fprintf(stderr,"j >= MAX_COL\n"); exit(EXIT_FAILURE); } while (*pt==' ') pt++; /* strip spaces */ strcpy(tableins->col[j], " "); strcat(tableins->col[j], pt); k = strlen(pt); while (pt[k-1]==' ') k--; /* strip spaces */ /* length calculation is not correct if we have ipf tag replacements! */ if (debug) { if (((strchr(pt, ':')!=NULL) && (strchr(pt, '.')!=NULL)) || ((strchr(pt, '&')!=NULL) && (strchr(pt, '.')!=NULL))) fprintf(stderr, "Warning: likely overestimating table width (%s)\n", pt); } /* crudely filter out ipf tags: "&tag." and ":tag." are recognized, (works since all '&' and ':' characters have already been replaced) */ for (tagend = tagstart = pt; tagstart; ) { tagstart = strchr(tagend, '&'); if (!tagstart) tagstart = strchr(tagend, ':'); if (tagstart) { tagend = strchr(tagstart, '.'); if (tagend) k -= tagend - tagstart; } } k += 2; /* add some space */ if (k > tablewidth[j]) tablewidth[j] = k; ++j; tablerow = NULL; if (j > tablecols) tablecols = j; } } while (j < MAX_COL) tableins->col[j++][0] = NUL; } break; /* ignore */ } case '\n': /* empty text line */ /* previously this used to emit ":p." to start a new paragraph, now we just note the end of a paragraph or table */ para = 0; tabl = 0; break; case ' ':{ /* normal text line */ if (intable && !intablebut) break; if (intablebut) { /* indexed items in table, copy to file after table by saving in a temp file meantime */ if (bt == NULL) { fflush(bo); bt = fopen(TmpFileName, "w+"); if (bt == NULL) { fprintf(stderr, "Can't open %s\n", TmpFileName); } else bo = bt; } } if (intablebut && (bt == NULL)) break; if ((line2[1] == 0) || (line2[1] == '\n')) { fprintf(bo, ":p."); para = 0; } if (line2[1] == ' ') { /* start table in a new paragraph */ if (!tabl) { fprintf(bo, ":p.%s\n", &line2[1]); tabl = 1; /* not in table so start one */ para = 0; } else { fprintf(bo, ".br\n%s\n", &line2[1]); } } else { if (!para) { fprintf(bo, ":p."); para = 1; /* not in para so start one */ tabl = 0; } fprintf(bo, "%s \n", &line2[1]); } fflush(bo); break; } case '^': break; /* ignore */ default:{ TBOOLEAN leaf; if (isdigit((int)line[0])) { /* start of section */ if (intable) { intablebut = TRUE; if (bt == NULL) { fflush(bo); bt = fopen(TmpFileName, "w+"); if (bt == NULL) { fprintf(stderr, "Can't open %s\n", TmpFileName); } else bo = bt; } } #if 0 /* disabled by BM: this doesn't do anything? */ if (startpage) /* use new level 0 item */ refs(0, bo, NULL, NULL, NULL); else refs(last_line, bo, NULL, NULL, NULL); #endif if (debug) { fprintf(stderr, "%d: %s\n", line_count, &line2[1]); } klist = lookup(&line2[2]); if (klist != NULL) k = klist->line; /* end all sections in an empty paragraph to prevent empty sections */ /* we therefore do no longer have to start sections with an empty paragraph */ if (!startpage) fprintf(bo, ":p.\n"); /*if( k<0 ) fprintf(bo,":h%c.", line[0]=='1'?line[0]:line[0]-1); else */ #ifdef IPF_MENU_SECTIONS /* To make navigation with the old IBM online help viewer (View) easier, the following code creates additional panels which contain references to sub-sections. These are not really needed for Aaron Lawrence's NewView and are therefore disabled by default. */ /* is this section a leaf ? */ leaf = TRUE: if (klist) if (klist->next) leaf = (klist->next->level <= klist->level); /* if not create a reference panel */ if (!leaf) { fprintf(bo, ":h%c res=%d x=left y=top width=20%% height=100%% group=1.%s\n", line[0], line_count, line2+1); fprintf(bo, ":link auto reftype=hd res=%d.\n", line_count+20000); fprintf(bo, ":hp2.%s:ehp2.\n.br\n", line2+1); refs(line_count, bo, NULL, NULL, ":link reftype=hd res=%d.%s:elink.\n.br\n"); fprintf(bo, ":h%c res=%d x=right y=top width=80%% height=100%% group=2 hide.", line[0]+1, line_count+20000); } else { fprintf(bo, ":h%c res=%d x=right y=top width=80%% height=100%% group=2.", line[0], line_count); } #else fprintf(bo, ":h%c res=%d.", line[0], line_count); #endif fprintf(bo, "%s\n", line2+1); /* title */ /* add title page */ if (startpage) fprintf(bo, ".im titlepag.ipf\n"); para = 0; /* not in a paragraph */ tabl = 0; /* not in a table */ last_line = line_count; startpage = 0; } else fprintf(stderr, "unknown control code '%c' in column 1, line %d\n", line[0], line_count); } break; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/faq-ja.tex�����������������������������������������������������������������������0000644�0004711�0000144�00000340242�11756524321�012755� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������%% Don't forget to change the paper format in the next line % % $Id: faq-ja.tex,v 1.5.4.1 2012/05/16 22:10:48 markisch Exp $ % translated to Japanese by Shigeharu TAKENO % Original: Id: faq.tex,v 1.48 2012/03/02 17:50:40 sfeam Exp % % : gnuplot-4.6 ˤϡ1.48 (2012/03/02) FAQ.pdf Ʊ ? % %%% \documentclass[a4paper,11pt]{article} \documentclass[a4paper,11pt]{jarticle} %% end Japanese \usepackage[margin=2cm]{geometry} \usepackage[T1]{fontenc} %\usepackage[hyphens,T1]{url} \usepackage[hyphens]{url} \ifx\pdfoutput\undefined % latex or latex2html output \usepackage{times,mathptmx} \usepackage[ hypertex, hyperindex, bookmarks, bookmarksnumbered=true, pdftitle={gnuplot faq}, pdfauthor={gnuplot}, pdfsubject={see www.gnuplot.info} % , pdfcreator={} % , pdfkeywords={...} ]{hyperref} \else % *** pdflatex output \usepackage{times,mathptmx} \usepackage[ % pdftex, hyperindex, bookmarks, bookmarksnumbered=true, pdftitle={gnuplot faq}, pdfauthor={gnuplot}, pdfsubject={see www.gnuplot.info} % , pdfcreator={} % , pdfkeywords={...} ]{hyperref} \fi % There may be incompatibilities between different versions of % url.sty, html.sty and hyperref.sty -- it seems there are machines which % cannot combine them together with simultaneous output to dvi, pdf, html. % Thus do it this way: \ifx\html\undefined % Not running this file by latex2html: \def\http#1{\href{http://#1}{\url{#1}}} \def\mailto#1{\href{mailto://#1}{\url{#1}}} \def\news#1{\href{news://#1}{\url{#1}}} %%% \def\ftp#1#2{\href{ftp://#1#2}{\url{#1} in \url{#2}}} \def\ftp#1#2{\href{ftp://#1#2}{\url{#1} \url{#2}}} %% end Japanese \else % Running this file by latex2html: \usepackage{html} % \html{ \newcommand{\news}[1]% {\def~{\~{}}\htmladdnormallink{\latex{\url{#1}}\html{\texttt{#1}}}% {news:#1}% } \newcommand{\ftp}[2]% %%% {\htmladdnormallink{\latex{\url{#1}{} in \url{#2}}% %%% \html{\texttt{#1} in \texttt{#2}}}% {\htmladdnormallink{\latex{\url{#1}{} \url{#2}}% \html{\texttt{#1} \texttt{#2}}}% %% end Japanese {ftp://#1#2}% } \newcommand{\mailto}[1]% {\htmladdnormallink{\latex{\url{<#1>}}\html{\texttt{#1}}}% {mailto:#1}% } \newcommand{\http}[1]% {\htmladdnormallink{\latex{\url{http://#1}}% \html{\texttt{http://#1}}}% {http://#1}% } % } \fi % comments and discussions: % version 1.4 dated 99/10/07 % am: comment out obviously outdated stuff and wait for complaints % jvh: re: I accept % hbb: need expires and posting-frequency headers % jvh: re: expires is ok, but I still post it manually so % I've got to see how I could get the posting frequency header % am: shouldn't we have document release and date in the title % jvh: re: I guess it would overload the title. I would % accept the inclusion into 0.1. I still hope that % the FAQ will experience a slightly lower release % cycle in the near future :) % \newcommand{\gnuplot}{\textbf{gnuplot}} \newcommand{\Gnuplot}{\textbf{Gnuplot}} \begin{document} \title{\gnuplot{} FAQ} \author{} \date{} \maketitle % This document deals with \gnuplot{} version 4.4 which is the % latest official release as of \today. References to bug-fix % versions or (recent) beta versions are explicitly marked. \noindent %%% This document deals with \gnuplot{} version 4.6 which is the %%% latest official release as of March 2012. ʸǤϡ2012 ǯ 3 ˥꡼줿 \gnuplot{} ǿǤǤ % version 4.6 갷äƤޤ %% end Japanese \\ %%% Its version is %%% \verb+Revision: 1.48 +, dated %%% \verb+Date: 2012/03/02 17:50:40 +. % <== \verb++ ¦ $ ĤƤ ʸΥС % \verb+$+\verb+Revision: 1.48 $+, \verb+$+\verb+Date: 2012/03/02 17:50:40 $+ Ǥ % ٹ򤷤ʤ RCS ˽񤭴Ƥޤ \tableofcontents \setcounter{section}{-1} %%% \section{Meta -- Questions} \section{᥿ʼ} %%% \subsection{Where do I get this document?} \subsection{ΥɥȤϤɤǼޤ} %%% The newest version of this document is on the web at %%% \http{www.gnuplot.info/faq/}. ΥɥȤκǿǤ % \http{www.gnuplot.info/faq/} % Web ˤޤ %%% %This document was/is posted sometimes to the newsgroups %%% %\news{comp.graphics.apps.gnuplot}. %ʸϡ˥塼롼 % %\news{comp.graphics.apps.gnuplot} ˤƤƤޤ/ޤ %%% \subsection{Where do I send comments about this document?} \subsection{ΥɥȤ˴ؤ륳ȤϤɤɤǤ} %%% Send comments, suggestions etc via email to the developer mailing list %%% \mailto{gnuplot-beta@lists.sourceforge.net}. %%% Please contribute your suggestions with respect to the file \verb+faq.tex+ %%% available from %%% \http{gnuplot.cvs.sourceforge.net/viewvc/gnuplot/faq/}. ȡŻҥ᡼dzȯԸ᡼󥰥ꥹ % \mailto{gnuplot-beta@lists.sourceforge.net} äƤ \verb+faq.tex+ ˴ؤƤ򤪴󤻤Υե % \http{gnuplot.cvs.sourceforge.net/viewvc/gnuplot/faq/} % ˤޤ %%% \section{General Information} \section{Ūʼ} %%% \subsection{What is \gnuplot?} \subsection{\gnuplot{} ȤϲǤ} %%% \gnuplot{} is a command-driven interactive function plotting %%% program. It can be used to plot functions and data points in %%% both two- and three-dimensional plots in many different %%% formats. It is designed primarily for the visual display of %%% scientific data. \gnuplot{} ϥޥɶư÷ؿץǤؿ衢 ӥǡ 2 3 ξǡ ͡ʰۤʤ񼰤ǹԤȤǤޤ ϼ˲ʳŪʥǡɽΤȤ߷פƤޤ %% end Japanese %%% \gnuplot{} is copyrighted, but freely distributable; %%% you don't have to pay for it. \gnuplot{} ݸƤޤͳۤǤ ʧɬפϤޤ %%% \subsection{How did it come about and why is it called \gnuplot?} \subsection{ϤɤơƤʤ \gnuplot{} ȸƤФƤΤǤ} %%% The authors of \gnuplot{} are: %%% Thomas Williams, Colin Kelley, Russell Lang, Dave Kotz, John %%% Campbell, Gershon Elber, Alexander Woo and many others. \gnuplot{} κԤ Thomas Williams, Colin Kelley, Russell Lang, Dave Kotz, John Campbell, Gershon Elber, Alexander Woo ¿ζϼԤǤ %%% The following quote comes from Thomas Williams: ʲ Thomas Williams ˤޤ: %% end Japanese \begin{quote} %%% I was taking a differential equation class and Colin was taking %%% Electromagnetics, we both thought it'd be helpful to visualize the %%% mathematics behind them. We were both working as sys admin for an %%% EE VLSI lab, so we had the graphics terminals and the time to do %%% some coding. The posting was better received than we expected, and %%% prompted us to add some, albeit lame, support for file data. ʬιֵ򡢤 Colin żؤιֵäƤơ 2 ͤȤ⤽˴ؤؤвǤФʤȹͤƤޤ ãϤ EE (Engineering Electronics) VLSI ƥԤȤƯƤơơ եåüȥǥ󥰤Ԥʤ֤ޤ Ƥϲ桹δ԰ʾɤ졢ơԴǤ եǡ˴ؤ뤤ĤΥݡȤ˲桹ΩƤޤ %%% Any reference to GNUplot is incorrect. The real name of the program %%% is "\gnuplot". You see people use "\Gnuplot" quite a bit because many %%% of us have an aversion to starting a sentence with a lower case %%% letter, even in the case of proper nouns and titles. \gnuplot{} is not %%% related to the GNU project or the FSF in any but the most %%% peripheral sense. Our software was designed completely %%% independently and the name "\gnuplot" was actually a compromise. I %%% wanted to call it "llamaplot" and Colin wanted to call it "nplot." %%% We agreed that "newplot" was acceptable but, we then discovered %%% that there was an absolutely ghastly pascal program of that name %%% that the Computer Science Dept.\ occasionally used. I decided that %%% "\gnuplot" would make a nice pun and after a fashion Colin agreed. GNUplot ȤҲϤɤʤΤϤޤ Υץ̾ "\gnuplot" Ǥ ֤ "\Gnuplot" Ƚ񤫤ƤΤ򸫤Ǥ礦 ϲ桹Ⱦͭ̾䥿ȥǤäƤ⡢ ʸϤʸdzϤ뤳Ȥ˷äƤ뤫Ǥ \gnuplot{} GNU ץȤ FSF Ȥϡ ˤ鷺ΰ̣оطޤ 桹ΥեȥϴΩ˥ǥ󤵤줿Τǡ "\gnuplot" Ȥ̾ϼ¤ŶˤΤǤ "llamaplot" ȸƤӤä Colin "nplot" ȸƤӤäΤǤ ơ桹 "newplot" ȤȤǹդޤ ΤȤ̾ġŪˤޤ Pascal Υץ ׻ʳǤޤ˻ȤäƤ뤳ȤΤޤ ǻ "\gnuplot" 碌ˤʤȤơ Colin ⤽ƱդΤǤ %% end Japanese \end{quote} %%% \subsection{What does \gnuplot{} offer?} \subsection{\gnuplot{} ϲ󶡤Ƥޤ} \begin{itemize} %%% \item Plotting two-dimensional functions and data points in many %%% different styles (points, lines, error bars) %%% \item Plotting three-dimensional data points and surfaces in %%% many different styles (contour plot, mesh) %%% \item Algebraic computation in integer, float and complex arithmetic %%% \item User-defined functions and hot-keys %%% \item Support for a large number of operating systems, graphics %%% file formats and output devices %%% \item Extensive on-line help %%% \item \TeX{}-like text formatting for labels, titles, axes, data points %%% \item Interactive command line editing and history (most platforms) \item 2 ǤδؿǡΡΥ (ޤɽ) % ˤ \item 3 ǤΥǡ̤ΤΥ (衢֤) % ˤ \item ¿ʣǿǤ黻 \item ؿۥåȥǽ \item ¿Υڥ졼ƥ󥰥ƥࡢ¿Υեåեϡ ¿ν֤Υݡ \item ϰϤˤ錄륪饤إ \item ٥롢ȥ롢ǡؤ \TeX{} 饤ʽ񼰤ˤ븫Фդ \item ÷ϷΥǥåȵǽȥҥȥ () ǽΥݡ % (¿Υץåȥۡ) %% end Japanese \end{itemize} %%% \subsection{Is \gnuplot{} suitable for scripting?} \subsection{\gnuplot{} ϥץȤŬƤޤ} %%% Yes. Gnuplot can read in files containing additional commands during %%% an interactive session, or it can be run in batch mode by piping a %%% pre-existing file or a stream of commands to stdin. Gnuplot is used %%% as a back-end graphics driver by such higher-level mathematical %%% packages as Octave, and can easily be wrapped in a cgi script for %%% use as a web-driven plot generator. gnuplot ÷¹ ɲåޥɤޤեɤ߹ळȤǤޤ ¸ߤեɸϤΥޥ ѥפȤäƥХå⡼ɤǤ뤳ȤǤޤ gnuplot ϡOctave Τ褦ʹʿإѥåظǼ¹Ԥ եåɥ饤ФȤƻȤƤޤ cgi ץȤǥåפ뤳Ȥ ưפ Web ưġȤƻȤȤǤޤ %%% \subsection{Can I run \gnuplot{} on my computer?} \subsection{\gnuplot{} ϻΥԥ塼ưȤǤޤ} %%% \Gnuplot{} is in widespread use on many platforms, including %%% MS Windows, linux, unix, and OSX. The current source code retains %%% supports for older systems as well, including VMS, Ultrix, OS/2, %%% MS-DOS, BeOS, and Macintosh. %%% Versions since 4.0 have not been extensively tested on legacy platforms. \gnuplot{} ϡMS Windows, linux, unix, OSX ʤɤ ¿ΥץåȥۡǡѤǤޤ ߤΥɤϡVMS, Ultrix, OS/2, % MS-DOS, BeOS, Macintosh ʤɤ ŤƥΥݡȤݻƤޤ С 4.0 ʹߤǤϸŤץåȥۡǤ ŰŪʥƥȤϹԤƤޤ %%% Please notify the FAQ-maintainer of any further ports you %%% might be aware of. ¾ΥץåȥۡǤưȤΤäƤ顢 FAQ Υƥʤ˶Ƥ %%% You should be able to compile the \gnuplot{} source more or %%% less out of the box on any reasonable standard (ANSI/ISO C, POSIX) %%% environment. \gnuplot{} ΥϡɸŪ (ANSI/ISO C, POSIX ) ʴĶ ¿줿ΤξǤ⥳ѥǤǤ礦 %%% \subsection{Legalities} \subsection{饤󥹤ˤĤ} %%% \Gnuplot{} is freeware authored by a collection of volunteers, who cannot %%% make any legal statement about the compliance or non-compliance of %%% \gnuplot{} or its uses. There is also no warranty whatsoever. Use at your %%% own risk. \gnuplot{} ϥܥƥνĤˤäƺ줿ե꡼Ǥ \gnuplotӤλѤεġ ԵĤ˴ؤˡŪʸǤޤ󡣤ޤݾڤ⤢ޤ ʬȤǤǻѤƤ %%% Citing from the README of a mathematical subroutine package by R. Freund: ʲϡR. Freund ˤشؿΥ֥롼ѥå README % ΰѤǤ: \begin{quote} %%% For all intent and purpose, any description of what the codes are doing %%% should be construed as being a note of what we thought the codes did on %%% our machine on a particular Tuesday of last year. If you're really %%% lucky, they might do the same for you someday. Then again, do you %%% really feel *that* lucky? ƤΰտޡŪ˴ؤơΥɤ뤳ȤФǤդεҤ Υɤ桹ΥޥξǺǯΤˤޤ޹Ԥʤä ȤФƲ桹ͤȡȲᤵ٤Ǥ⤷ĤƤ ΥɤϵФƤ⤢ƱȤ򤹤Ǥ礦֤ ֤פĤƤ˻פޤ ? %% end Japanese \end{quote} %%% \subsection{Does \gnuplot{} have anything to do with the FSF and the GNU %%% project?} \subsection{\gnuplot{} FSF GNU ץȤȲطΤǤ} %%% \Gnuplot{} is neither written nor maintained by the FSF\@. It is not %%% covered by the General Public License, either. It used to be distributed %%% by the FSF, however, due to licensing issues it is no longer. \gnuplot{} FSF äΤǤ FSF ƥʥ󥹤ƤΤǤ⤢ޤ GNU GPL (General Public License) ݸƤ⤤ޤ Ǥ FSF ۤƤ⤤ޤ ǸΤǤϤޤ %%% \Gnuplot{} is freeware in the sense that you don't have to pay %%% for it. However it is not freeware in the sense that you would be %%% allowed to distribute a modified version of your \gnuplot{} freely. %%% Please read and accept the \texttt{Copyright} file in your distribution. \gnuplot{} ϡ̵Ǥȸ̣ǥե꡼Ǥ ʤѤΤͳۤ뤳Ȥǧ뤫 ȤȤ˴ؤƤϥե꡼ǤϤޤ ʪ˴ޤޤ \texttt{Copyright} Ȥեɤ ǧƤ %%% \subsection{Where do I get further information?} \subsection{ʤϤɤǼޤ} %%% See the main gnuplot web page \http{www.gnuplot.info}. gnuplot Web ڡ \http{www.gnuplot.info} 򸫤Ƥ %%% Some documentation and tutorials are available in other languages %%% than English. %%% See \http{gnuplot.sourceforge.net/help.html}, section "Localized %%% learning pages %%% about gnuplot", for the most up-to-date list. Ѹʳ¾θǤʸ⤢ޤ ǿΥꥹȤˤĤƤϡ\http{gnuplot.sourceforge.net/help.html} % "Localized learning pages about gnuplot" %%% \section{Setting it up} \section{󥹥ȡ} %%% \subsection{What is the current version of \gnuplot?} \subsection{\gnuplot{} κǿС ?} %%% The current released version of \gnuplot{} is 4.6. %%% The current patchlevel is 4.6.0 (March 2012). \gnuplot{} κǿ꡼Ǥ 4.6 Ǥ ǿΥѥå٥ 4.6.0 Ǥ (2012 ǯ 3 ) % The current development series consists of a series of snapshots % with version labels 4.5-<date> %%% \subsection{Where can I get \gnuplot?} \subsection{\gnuplot{} ϤɤǼޤ} %% end Japanese \label{where-get-gnuplot} %%% The best place to start is \http{www.gnuplot.info}. From there %%% you find various pointers to other sites, including the project %%% development site on SourceForge \http{sourceforge.net/projects/gnuplot}. Ϥ˺ǤŬڤʾ \http{www.gnuplot.info} Ǥ 顢㤨 SourceForge γȯץȥ % \http{sourceforge.net/projects/gnuplot} ʤɤΡ ʥȤξ򸫤ĤǤ礦 %%% The source distribution ("gnuplot-4.6.0.tar.gz" or a similar name) is %%% available from the official distribution site %%% \http{sourceforge.net/projects/gnuplot}. ʪ ("gnuplot-4.6.0.tar.gz" ޤƱͤ̾) % ϸۥ \http{sourceforge.net/projects/gnuplot} ˤޤ %%%% % Older versions of the \gnuplot{} distribution is mirrored %%%% % at the Comprehensive TeX Archive Network (CTAN) in the %%%% % \texttt{graphics/gnuplot} directory. See % ŤǤ \gnuplot{} ʪ CTAN % (the Comprehensive TeX Archive Network) \\ % \texttt{graphics/gnuplot} % % ǥ쥯ȥǥߥ顼󥰤Ƥޤ % ʲ򻲾ȤƤ % %% end Japanese % \begin{itemize} %%% % \item \http{www.ctan.org/}. % \item \http{www.ctan.org/} % %% end Japanese % \end{itemize} %%% \subsection{Where can I get current development version of \gnuplot?} \subsection{\gnuplot{} κǿγȯǤϤɤǼޤ} %%% The development version of gnuplot is availble as a cvs source %%% tree online for %%% direct browsing from \http{sourceforge.net/projects/gnuplot/}, section %%% "CVS". You can download all current sources according to the documentation %%% therein; for example by a sequence of commands like gnuplot γȯǤϡcvs ĥ꡼ηǡ饤ľ % \http{sourceforge.net/projects/gnuplot/} % "CVS" 󤫤黲ȤǤޤ ˴ޤޤƤɥȤ˽äơ 㤨СʲΤ褦ʥޥˤä ǿΥ򤹤٤ƥɤ뤳ȤǤޤ %% end Japanese \begin{verbatim} cvs -d:pserver:anonymous@gnuplot.cvs.sourceforge.net:/cvsroot/gnuplot login cvs -z3 -d:pserver:anonymous@gnuplot.cvs.sourceforge.net:/cvsroot/gnuplot co -P gnuplot \end{verbatim} %%% or (in bash) ޤ (bash Ǥ) %% end Japanese \begin{verbatim} export CVSROOT=:pserver:anonymous@gnuplot.cvs.sourceforge.net:/cvsroot/gnuplot cvs login cvs -z3 checkout gnuplot \end{verbatim} %%% Hit \verb+<return>+ when asked for a password. ѥɤʹ줿 \verb+<return>+ Ǥޤ %%% Further, before the \texttt{./configure} command of gnuplot %%% compilation phase, %%% you have to execute \texttt{./prepare} to create the up-to-date %%% configure files. θ塢gnuplot Υѥʳ \texttt{./configure} ˡ \texttt{./prepare} ¹Ԥ ǿ configure ѤΥեɬפޤ %%% There are no official preliminary binary releases of gnuplot: you have to %%% compile it yourself. However, you may find unofficial binary %%% releases for some %%% platforms, like OS/2, Windows or Macintosh. gnuplot γȯǤλŪʥХʥ꡼ϤޤΤǡ ʬȤǥѥ뤹ɬפޤ OS/2, Windows, Macintosh ʤɤΤĤΥץåȥեѤ ʥХʥǤϤɤ˸Ĥ뤫Τޤ %%% Important note: questions related to the development version should go to %%% \mailto{gnuplot-beta@lists.sourceforge.net}. פ: ȯǤФɬ % \mailto{gnuplot-beta@lists.sourceforge.net} äƤ %%% \subsection{How do I get \gnuplot{} to compile on my system?} \subsection{\gnuplot{} ϻΥƥǤϤɤѥ뤹ɤǤ} %%% As you would any other installation. Read the files \texttt{README.1ST}, %%% \texttt{README}, and \texttt{INSTALL}. ¾ΥեȤΥ󥹥ȡƱͤǤ\texttt{README.1ST}, \texttt{README}, \texttt{INSTALL} եɤǤ \begin{itemize} \item %%% For Unix, use \texttt{./configure} (or \texttt{./configure %%% {-}{-}prefix=\$HOME/usr} %%% for an installation for a single user), \texttt{make} and finally %%% \texttt{make install} or \texttt{make install-strip}, the latter for smaller %%% executables without debugging information. If you want to make a RPM package, %%% then replace the latest step by \texttt{checkinstall} or \texttt{checkinstall %%% make install-strip}, supposing the package \texttt{checkinstall} on your %%% machine. Unix Ǥϡ\texttt{./configure} (ñ桼Υ󥹥ȡʤ \\ \texttt{./configure {-}{-}prefix=\$HOME/usr}) % Ȥ\texttt{make} ¹Ԥ Ǹ \texttt{make install} ޤ \texttt{make install-strip} Ȥޤ ԤϥǥХå꾮ʼ¹ԥե򥤥󥹥ȡ뤷ޤ RPM ѥåꤿʤ顢ǸΥƥåפ % \texttt{checkinstall} ޤ \texttt{checkinstall make install-strip} % ֤ޤ ʤΥޥ \texttt{checkinstall} ѥå ݡȤƤɬפޤ %% end Japanese \item %%% On Windows, makefiles can be found in \texttt{config/mingw}, %%% \texttt{config/msvc}, %%% \texttt{config/watcom}, and \texttt{config/cygwin}. Update the options %%% in the %%% makefile's header and run the appropriate \texttt{make} tool in the same %%% directory %%% as the makefile. Additional instructions can be found in the makefiles. Windows Ǥϡmakefile \texttt{config/mingw}, \texttt{config/msvc}, \texttt{config/watcom}, \texttt{config/cygwin} ˤޤ makefile Ƭ˽񤫤Ƥ륪ץ makefile ֤ƤΤƱǥ쥯ȥ Ŭ \texttt{make} ġ¹ԤƤ ɲ⡢makefile ˽񤫤Ƥޤ %% end Japanese \item %%% For DOS, if you are using bash and DJGPP, you can just run %%% \texttt{djconfig.sh}. DOS Ǥϡbash DJGPP ȤäƤʤ \texttt{djconfig.sh} % ¹ԤǤ %% end Japanese \item %%% For other platforms, copy the relevant makefile (e.g. %%% \texttt{makefile.os2} for %%% OS/2) from \texttt{config/} to \texttt{src/}, optionally update options %%% in the %%% makefile's header, then change directory to \texttt{src} and run %%% \texttt{make}. ¾ΥץåȥեǤϡŬڤ makefile (㤨 OS/2 ʤ \texttt{makefile.os2}) % \texttt{config/} ǥ쥯ȥ꤫ \texttt{src/} ˥ԡơ \texttt{make} ¹ԤƤ %% end Japanese \end{itemize} %%% \subsection{What documentation is there, and how do I get it?} \subsection{ɥȤϤɤǤƤɤޤ} %%% The documentation is included in the source distribution. Look %%% at the docs subdirectory, where you'll find files to produce ɥȤϥʪ˴ޤޤƤޤ֥ǥ쥯ȥ docs % 򸫤ƤˤϰʲΤΤե뤬ޤ \begin{itemize} %%% \item a PDF version of the user manual %%% \item a Unix man page, which says how to start \gnuplot{} %%% \item a tutorial on using \gnuplot{} with \LaTeX{} %%% \item a quick reference summary sheet for \TeX{} only \item PDF ǤΥ桼ޥ˥奢 \item Unix man ڡ (\gnuplot{} ɤư񤤤Ƥ) \item \gnuplot{} λȤ塼ȥꥢ (\LaTeX{} ǵ) \item \gnuplot{} λȤḫɽ (åե; \TeX{} ǵ) %% end Japanese \end{itemize} %%% The documentation is built during installation if you have \LaTeX{} %%% installed on your system, look in the %%% directories \texttt{docs} and \texttt{tutorial}. ⤷ʤΥƥ \LaTeX{} 󥹥ȡ뤵ƤС ɥȤϥ󥹥ȡ˼ưŪޤ \texttt{docs} \texttt{tutorial} ǥ쥯ȥ򸫤Ƥ %% end Japanese %%% \texttt{make pdf} in the docs subdirectory %%% will make a \texttt{gnuplot.pdf} hypertext file ready for browsing %%% or printing. ֥ǥ쥯ȥ docs \texttt{make pdf} Ȥ뤳Ȥǡ /뤿Υϥѡƥȥե \texttt{gnuplot.pdf} % Ѱդޤ %%% Online gnuplot documentation is available at %%% \http{gnuplot.sourceforge.net/documentation.html}. \http{gnuplot.sourceforge.net/documentation.html} ˡ gnuplot Υ饤ɥȤޤ %%% \subsection{Worked examples} \subsection{ư륵ץ} %%% There is a directory of worked examples in the the source distribution. %%% These examples, and the resulting plots, may also be found at %%% \http{gnuplot.sourceforge.net/demo/}. ʪˤư륵ץΥǥ쥯ȥ꤬ޤޤƤޤ 饵ץ롢Ӥη̤襰դ % \http{gnuplot.sourceforge.net/demo/} Ǥ⸫뤳ȤǤޤ %%% \subsection{How do I modify \gnuplot, and apply patches?} \subsection{ɤ \gnuplot{} ޤϥѥåƤޤ} %%% For this, you will need to recompile \gnuplot. Τˤ \gnuplot{} 򥳥ѥ뤷ľɬפޤ %%% Modifications people make are either done by replacing files, %%% such as terminal drivers, or by patching. If a file is a %%% replacement, it will probably tell you in its README or in the %%% lines at the beginning. ͡ʿ͡äϡ ϥɥ饤ФΤ褦ʥե֤뤳ȤǹԤʤ ޤϥѥåƤǹԤʤޤ ե֤ξ硢Ѥ README ե롢 ޤϤΥեκǽιԤ˲󤬤뤫Τޤ %%% To patch a file, you need the \texttt{patch} utility, and possibly %%% also the \texttt{automake} and \texttt{autoconf} tools. %%% A typical command for applying a patch is %%% \verb+patch -p0 <newfunctionality.diff+. ѥåƤϡ\texttt{patch} 桼ƥƥɬפǡ ⤷ \texttt{automake}, \texttt{autoconf} Ȥġ ɬפ⤷ޤ󡣥ѥåŬѤŵŪʤ % \verb+patch -p0 <newfunctionality.diff+ Ǥ %%% There is repository of contributed patches in the "Patches" section %%% on gnuplot's %%% sourceforge site \http{sourceforge.net/tracker/?group_id=2055&atid=302055}. Ƥ줿ѥå֤ gnuplot sourceforge % \http{sourceforge.net/tracker/?group_id=2055&atid=302055} % "Patches" ˤޤ %%% \subsection{How do I determine which options are compiled into \gnuplot?} \subsection{ɤΥץ \gnuplot ˥ѥ뤵Ƥ뤫Τˤ} %%% Given that you have a compiled version of \gnuplot, you can use the %%% \verb+show+ command to display the list of compile options (a.k.a. %%% compilation options, or build options) that were used to build your %%% copy. ѥѤߤ \gnuplot ͿƤ硢\verb+show+ ޥɤǡ 줬ѥ뤵줿Ȥ˻Ѥ줿ѥ륪ץ % (̾ѥ쥤󥪥ץ󡢥ӥɥץ) ΰɽǤޤ \begin{verbatim} gnuplot> show version long \end{verbatim} %%% \section{Working with it.} \section{ư (Working with it)} %%% \subsection{How do I get help?} \subsection{إפϤɤäƼޤ} %%% Read this document. ΥɥȤɤǤ %%% Give the \verb+help+ command at the initial prompt. After that, keep %%% looking through the keywords. Good starting points are \verb+plot+ %%% and \verb+set+. ץץȤ \verb+help+ ޥɤ¹ԤƤ θ奭ɤ򤿤ɤäƤäƤ \verb+plot+ \verb+set+ ϤΤǤ礦 %%% Read the manual, if you have it. ⤷äƤʤޥ˥奢ɤǤ %%% Look through the demo subdirectory; it should give you some ideas. demo ֥ǥ쥯ȥ򸫤ƤҥȤͿƤǤ礦 %%% Ask your colleagues, the system administrator or the person who %%% set up \gnuplot. ƥԡޤ \gnuplot{} ꤷƱν˿ҤͤƤ %%% If all these fail, please upgrade to the newest version of \gnuplot{} %%% or urge your system-administrator to do so. Then %%% post a question to \news{comp.graphics.apps.gnuplot} or send mail %%% to the gatewayed mailing list \mailto{gnuplot-info@lists.sourceforge.net}. %%% Please note that, due to the overwhelming amount of spam it would %%% otherwise receive, %%% you have to subscribe before you can post to it. Subscription %%% instructions are in %%% the main gnuplot manual. %%% Do not forget to cite the version number and the operating system. %%% If you want to subscribe to the mailing list, visit the URL %%% \http{lists.sourceforge.net/lists/listinfo/gnuplot-info}. %%% But please don't use the mailing list if you can read %%% \news{comp.graphics.apps.gnuplot} directly. If you post a %%% question there, it is considered good form to solicit e-mail %%% replies and post a summary. Ƥ˼Ԥ顢\gnuplot{} κǿǤ˹롢 뤤Ϲ褦ƥԤ˰Ϥ򤫤Ƥ Ƽ˥塼롼 \news{comp.graphics.apps.gnuplot} % 񤹤뤫ޤϥ᡼󥰥ꥹ % \mailto{gnuplot-info@lists.sourceforge.net} ˥᡼äƤ Υ᡼󥰥ꥹȤ̤˼ƤޤŪ spam 򤱤뤿ᡢ ƤˤΥ᡼󥰥ꥹȤ˻ (subscribe) ʤФޤ äˡϡgnuplot Υޥ˥奢ʸˤޤ ᡼ݤϡСֹȥڥ졼ƥ󥰥ƥʻ뤳Ȥ ˺ʤǤ Υ᡼󥰥ꥹȤɤʤСURL % \http{lists.sourceforge.net/lists/listinfo/gnuplot-info} 򻲾ȤƤ ˥塼롼 \news{comp.graphics.apps.gnuplot} % ľɤʤСʤǤ 򤽤Υ˥塼롼פƤС ϥ᡼Ǥֻ᤹롢 뤤Ƥɤȸʤޤ %%% \subsection{How do I print out my graphs?} \subsection{ɤä饰դץȥȤǤޤ} %%% The kind of output produced is determined by the \verb+set terminal+ %%% command; for example, \verb+set terminal postscript+ will produce %%% the graph in PostScript format. Output can be redirected using %%% the \verb+set output+ command. Ϥμ \verb+set terminal+ ޥɤޤ 㤨 \\ \verb+set terminal postscript+ դ PostScript ǽϤޤ Ϥ \verb+set output+ ޥɤǥ쥯ȤǤޤ %%% As an example, the following prints out a graph of sin(x) on a %%% Unix machine running the X-Window System. X-Windows System ưƤ Unix ޥ % sin(x) ΥդץȥȤޤ %%% \begin{verbatim} %%% gnuplot> plot [-6:6] sin(x) %%% gnuplot> set terminal postscript %%% Terminal type set to 'postscript' %%% Options are 'landscape monochrome "Courier" 14' %%% gnuplot> set output "sin.ps" %%% gnuplot> replot %%% gnuplot> set output # set output back to default %%% gnuplot> set terminal x11 # ditto for terminal type %%% gnuplot> ! lp -ops sin.ps # print PS File (site dependent) %%% request id is lprint-3433 (standard input) %%% lp: printed file sin.ps on fg20.rz.uni-karlsruhe.de (5068 Byte) %%% ! %%% gnuplot> %%% \end{verbatim} \begin{verbatim} gnuplot> plot [-6:6] sin(x) gnuplot> set terminal postscript Terminal type set to 'postscript' Options are 'landscape monochrome "Courier" 14' gnuplot> set output "sin.ps" gnuplot> replot gnuplot> set output # ǥեȤ᤹ gnuplot> set terminal x11 # ϷǥեȤ᤹ gnuplot> ! lp -ops sin.ps # PS եץȥ (͏) request id is lprint-3433 (standard input) lp: printed file sin.ps on fg20.rz.uni-karlsruhe.de (5068 Byte) ! gnuplot> \end{verbatim} %%% Using the platform-independent way of restoring terminal by \texttt{set term %%% push/pop} commands, do it by ץåȥե˰¸ʤϷϡ ޥ \texttt{set term push/pop} ˤäưʲΤ褦˹Ԥʤޤ %% end Japanese \begin{verbatim} gnuplot> set terminal postscript eps color lw 15 "Helvetica" 20 gnuplot> set out 'a.eps' gnuplot> replot gnuplot> set term pop \end{verbatim} %%% The command \texttt{set term pop} without a previous %%% corresponding \texttt{set %%% term push} switches the terminal back to the startup terminal, %%% e.g. x11, pm or %%% win. \texttt{set term pop} ޥɤϡ б \texttt{set term push} ¹ԤƤʤϡ ưνϷ㤨 x11, pm, win ޤ %%% Using the \texttt{windows} terminal, you can print your graph by clicking %%% on the %%% printer icon on the terminals toolbar, or by issuing \texttt{screendump} %%% on the %%% command line. \texttt{windows} ϷǤϡΥġСξΥץ󥿥 å롢뤤ϥޥɥ饤 \texttt{screendump} ¹Ԥ뤳Ȥ դץȥȤǤޤ %%% \subsection{How do I include my graphs in <word processor>?} \subsection{ɤä饰դץեȤ˼ޤ} %%% Basically, you save your plot to a file in a format your word %%% processor can understand (using \verb+set term+ and \verb+set output+, %%% see above), and then you read in the plot from your word processor. Vector %%% formats (PostScript, emf, svg, pdf, \TeX{}, \LaTeX{}, etc) %%% should be preferred, %%% as you can scale your graph later to the right size. Ūˡդ򤽤ΥץեȤǤΥե¸ % (\verb+set term+ \verb+set output+ Ȥޤ򸫤Ƥ) % ΥץեȤɤ߹ळȤǤǤ礦 ѴǤȤ ٥ȥΥեޥå % (PostScript, emf, svg, pdf, \TeX{}, \LaTeX{} ʤ) Ǥ礦 %%% Details depend on which word processor you use; use \verb+set term+ to get a %%% list of available file formats. ٤ȤϤΥץեȤ˰¸ޤ \verb+set term+ ȤƻѤǤեΥꥹȤ򸫤Ƥ %%% Many word processors can use Encapsulated PostScript for graphs. %%% This can be generated by the %%% \verb+set terminal postscript eps [color]+ %%% command. ¿ΥץեȤ Encapsulated PostScript (EPS) Υդޤ \\ \verb+set terminal postscript eps [color]+ % ȤޥɤǤޤ %% end Japanese %%% Note that it is a good idea to check and correct the bounding box of the %%% graphs in the eps files (manually or by the fixbb script from gnuplot %%% webpage), as you have to correct this box for any eps figure produced by %%% whichever program. դƤޤEPS եΥդ bounding box Ĵ١ ȤǤ礦 % (ư뤤 gnuplot Web ڡˤ fixbb ץȤˤä) %% end Japanese %%% Some (most?) word processors do not preview the actual image in the eps %%% file, and you have to add the preview image yourself. You can use the GSView %%% viewer for this (available for OS/2, Windows and X11), or some Unix ps %%% tool. Note that the preview image increases size of the eps file; the %%% smallest increase you may get by choosing Tiff 6 Packbits. Ĥ ( ?) ץեȤϡ EPS ե˴ޤޤºݤβɽޤΤǡ ɽ᡼򤢤ʤȤɲäɬפޤ ŪΤˤϡGSView ӥ塼 % (OS/2, Windows, X11 Ѥޤ) 뤤ϤĤ Unix ps ġ뤬Ȥޤ դƤޤɽѤβ EPS եΥ礵ޤ Tiff 6 ѥåӥåȤ򤹤кǤ⤽ä򲡤뤳ȤǤޤ %%% Some Windows office applications, including OpenOffice.org, can handle %%% vector images in EMF format. These can be either produced by the emf %%% terminal, or by selecting 'Save as EMF...' from the toolbar of the graph %%% window of the windows terminal. OpenOffice.org Windows Υեץꥱˤϡ EMF Υ٥ȥǤΤޤ Τ褦ʲե emf ϷǤޤ windows ϷΥեɥΥġС % 'Save as EMF...' 򤹤뤳ȤǤޤ %%% OpenOffice.org can also read SVG, as well as AutoCAD's dxf format. OpenOffice.org SVG ⡢AutoCAD dxf ɤߤळȤǤޤ %%% There are many ways to use gnuplot to produce graphs for inclusion in a %%% \TeX\ or \LaTeX\ document. %%% Some terminals produce *.tex fragments for direct inclusion; others %%% produce *.eps, *.pdf, *.png output to be included using the \\includgraphics %%% command. The epslatex and cairolatex terminals produce both a graphics %%% file (*.eps or *.pdf) and a *.tex document file that refers to it. %%% Gnuplot version 4.6 has a tikz terminal type that produces full text and %%% graphics when the output is processed with pdflatex. gnuplot Ȥä \TeX\ \LaTeX\ ʸ˼िΥդˡ ̤⤢ޤ *.tex եҤľϷ⤢ޤ \\includegraphics ޥɤȤäƼि *.eps, *.pdf, *.png Ϥ Τ⤢ޤ epslatex cairolatex Ϸϡե (*.eps *.pdf) 򻲾Ȥ *.tex ʸեξޤ gnuplot 4.6 ˤ tikz ϷꡢϤ pdflatex ǽ ǥƥȤȥǤޤ %%% Most word processors can import bitmap images (png, pbm, etc). %%% The disadvantage of this approach is that the resolution of your %%% plot is limited by the size of the plot at the time it is generated %%% by gnuplot, which is generally a much lower resolution than the %%% document will eventually be printed in. ΥץեȤϥӥåȥޥåײ (png, pbm ) % ळȤǤޤ ˡûϡ Υդ gnuplot ˤä줿ȤΥˤä β٤¤ƤޤȤǤ ̤ˡʸ񤬺ǽŪ˥ץȥȤ٤ β٤Ϥʤ㤯ʤޤ %%% The mif terminal type produces output for FrameMaker. mif Ϸ FrameMaker ѤνϤޤ %%% \subsection{How do I edit or post-process a \gnuplot{} graph?} \subsection{ɤä \gnuplot{} ΥդԽǤޤ} %%% This depends on the terminal type you use. ϤʤȤϷ˰¸ޤ \begin{itemize} %%% \item X11 toolkits: You can use the terminal type fig %%% and use the \textbf{xfig} drawing program to edit the %%% plot afterwards. You can obtain the xfig program from its web site %%% \http{www.xfig.org}. More information about the text-format used %%% for fig can be found in the fig-package. \item X11 ġ륭å: fig ϷȤäơθǤԽ뤿ץ % \textbf{xfig} ȤФǤ礦 xfig ץϤ Web \http{www.xfig.org} Ǥޤ fig ˻ȤƥȥեޥåȤ˴ؤ롢 ܤˤĤƤϤ fig ѥå˴ޤޤƤޤ %%% You may use the tgif terminal, which creates output suitable for %%% reading within \texttt{tgif} (\http{http://bourbon.usc.edu/tgif/}), %%% an interactive 2-D drawing tool under X11. tgif ϷȤȤǤޤ X11 ư÷ 2 ġ \texttt{tgif} (\http{http://bourbon.usc.edu/tgif/}) % ɤޤΤŬϤޤ %%% \item You may use the svg terminal (scalable vector graphics), which can %%% be further edited by a svg editor, e.g. %%% \textbf{Inkscape} (\http{www.inkscape.org}), %%% \textbf{Skencil} (\http{www.skencil.org}) or %%% \textbf{Dia} (\http{projects.gnome.org/dia/}), or loaded %%% into \textbf{OpenOffice.org} with an on-fly conversion into OO.o Draw %%% primitives. \item svg Ϸ (scalable vector graphics) ȤȤǤޤ % \textbf{Inkscape} (\http{www.inkscape.org}), \textbf{Skencil} (\http{www.skencil.org}), \textbf{Dia} (\http{projects.gnome.org/dia/}), % Τ褦 svg ǥǹʤԽԤʤޤ \textbf{OpenOffice.org} (OO.o Draw ץߥƥ֤ؤѴˤä) % ˼ळȤǤޤ %%% \item PostScript or PDF output can be edited directly by tools such %%% as Adobe Illustrator or Acrobat, or can be converted to a variety %%% of other editable vector formats by the \textbf{pstoedit} package. %%% Pstoedit is available at \http{www.pstoedit.net}. \item PostScript PDF ϤϡAdobe Illustrator Acrobat % Τ褦ʥġľԽǤޤ \textbf{pstoedit} ѥå¾οԽǽʥ٥ȥ Ѵ뤳ȤǽǤ pstoedit \http{www.pstoedit.net} ˤޤ %%% \item The mif terminal type produces an editable FrameMaker document. \item mif Ϸ FrameMaker ԽǤʸޤ %%% \item The DXF format is the AutoCAD's format, editable by several %%% other applications. \item DXF Ϸ AutoCAD ν񼰤ǡ¾ΤĤΥץꥱǤ ԽǤޤ %%% \item Bitmapped graphics (e.g. png, jpeg, pbm) can be edited using %%% tools such as ImageMagick or Gimp. \item ӥåȥޥå׷β (png, jpeg, pbm ) ImageMagick % Gimp ͤʥġԽ뤳ȤǤޤ %% end Japanese %%% In general, you should use a vector graphics program to post-process %%% vector graphic formats, and a pixel-based editing program %%% to post-process pixel graphics. ̤ˡ٥ȥ륰եåθԤʤˤ ٥ȥ륰եåץ (ɥϥġ) ԥˤϥԥϤΥץ (ڥȷϥġ) % Ȥɬפޤ \end{itemize} %%% \subsection{How do I change symbol size, line thickness and the like?} \subsection{ɤä鵭礭ʤɤѹǤޤ} %%% Gnuplot offers a variety of commands to set line and point properties, %%% including color, thickness, point shape, etc. The command \verb+test+ will %%% display a test page for the currently selected terminal type showing %%% the available pre-defined combinations of color, size, shape, etc. %%% The \verb+set style+ command can be used to define additional combinations. gnuplot ϡ㤨пηʤɤΡ ο°ꤹ뤿͡ʥޥɤ󶡤Ƥޤ ޥ \verb+test+ ϡ򤵤ƤϷѤΡ ѲǽѤߤοʤɤȹ礻򼨤 ƥȥڡϤޤ %%% \subsection{Can I animate my graphs?} \subsection{դ򥢥˥᡼󲽤Ǥޤ} %%% First have a look at animate.dem in the demo directory %%% of \gnuplot. Basically, animated graphs are a sequence of %%% plots in a suitable format. ǽˡ\gnuplot{} demo ǥ쥯ȥˤ animate.dem 򸫤Ƥ Ū˥դΥ˥᡼ϡ ŬʥեޥåȤʣɽޤ %%% If your installation of \gnuplot{} is linked with gd 2.0.29 or newer (see %%% previous entry), the gif terminal can generate directly an animated GIF. ʤ \gnuplot{} gd 2.0.29 ʹ (ľι໲) % 󥯤ƺ줿ΤǤС gif Ϸľܥ˥᡼ GIF Ǥޤ %%% Otherwise, have a look at the tool whirlgif 3.04. It reads run-length %%% encoded GIF files and packs them into a minimal animation. %%% On the web-pages you will find a manual and an example. ǤʤСwhirlgif 3.04 ȤġꤷƤ ϥ󥰥̤줿ʣ GIF եɤǡ ǾΥ˥᡼եˤޤȤޤ ޥ˥奢ϡ Web ڡǻȤǤޤ %%% You can also write a small script to get \gnuplot{} to output a family %%% of GIF files, then have it execute some animator such as gifsicle: %%% \http{www.lcdf.org/~eddietwo/gifsicle} %%% or gifmerge %%% \http{the-labs.com/GIFMerge}. ޤʥץȤ񤤤 % \gnuplot{} ʣ GIF ե뤳ȤǤޤ gifsicle (\http{www.lcdf.org/~eddietwo/gifsicle}) % gifmerge (\http{the-labs.com/GIFMerge}) Τ褦 ¾Υ˥᡼ġȤȤǤޤ %%% mpeg\_encode will encode a sequence of images into an mpeg format movie. mpeg\_encode Ȥ % mpeg եޥåȤưˤޤȤ뤳ȤǤǤ礦 %%% \subsection{How do I plot implicit defined graphs?} \subsection{ɤä鱢ؿΥդ񤱤ޤ} %%% Implicit graphs or curves cannot be plotted directly in \gnuplot. %%% However there is a workaround. \gnuplot{} ǤϱؿΥդľܤǤޤ κϤޤ %% end Japanese %%% \begin{verbatim} %%% gnuplot> # An example. Place your definition in the following line: %%% gnuplot> f(x,y) = y - x**2 / tan(y) %%% gnuplot> set contour base %%% gnuplot> set cntrparam levels discrete 0.0 %%% gnuplot> unset surface %%% gnuplot> set table 'curve.dat' %%% gnuplot> splot f(x,y) %%% gnuplot> unset table %%% gnuplot> plot 'curve.dat' w l %%% \end{verbatim} \begin{verbatim} gnuplot> # : ιԤŬ֤Ƥ gnuplot> f(x,y) = y - x**2 / tan(y) gnuplot> set contour base gnuplot> set cntrparam levels discrete 0.0 gnuplot> unset surface gnuplot> set table 'curve.dat' gnuplot> splot f(x,y) gnuplot> unset table gnuplot> plot 'curve.dat' w l \end{verbatim} %% end Japanese %%% The trick is to draw the single contour line z=0 of the surface %%% z=f(x,y), and store the resulting contour curve to a \gnuplot{} datafile. λųݤϡ z=f(x,y) 1 ܤ z=0 Υǡե˥֤뤳Ȥˤޤ %%% \subsection{How to fill an area between two curves} \subsection{2 Ĥζ֤ΰɤĤ֤ˤ} %%% A plot with filled area between two given curves can be easily obtained using %%% the pseudo file '+' with \texttt{filledcurves closed}. The example below %%% demonstrates this for two curves f(x) and g(x): 2 ĤͿ줿δ֤ɤĤ֤ϡ ե '+' \verb+filledcurves closed+ ȤдñˤǤޤ ʲϡ2 Ĥζ f(x) g(x) ФǥǤ: %% end Japanese \begin{verbatim} f(x)=cos(x) g(x)=sin(x) xmax=pi/4 set xrange [0:xmax] plot '+' using 1:(f($1)):(g($1)) with filledcurves closed \end{verbatim} %%% Note that the above code fills area between the two curves, not %%% area satisfying %%% inequality g(x)<f(x). If you want the latter, you should use the ternary %%% operator in \texttt{using} statement to return an undefined value (0/0) %%% if the %%% inequality is not satisfied. դƤ餤ΤǤ 2 Ĥζδ֤ΰɤĤ֤ΤǤäơ g(x)<f(x) ΰɤĤ֤ΤǤϤޤ ⤷ԤԤʤʤ顢 \verb+using+ ʬ 3 黻ҤȤäơ ʤ̤ (0/0) % ֤褦ˤɬפޤ %%% See the documentation for \texttt{help filledcurves}, %%% \texttt{help special-filenames}, and \texttt{help ternary} and see %%% \texttt{fillbetween.dem} in the \texttt{demos} directory. texttt{help filledcurves}, \texttt{help special-filenames}, \texttt{help ternary} ˴ؤɥȤ򻲾ȤƤ \texttt{demos} ǥ쥯ȥ \texttt{fillbetween.dem} ⻲ȤƤ %%% \subsection{Pm3d splot from a datafile does not draw anything} \subsection{pm3d ˤǡե splot Dzɽޤ} %% end Japanese \label{blank1} %%% You do \verb+set pm3d; splot 'a.dat'+ and no plot but colorbox appears. %%% Perhaps there is no blank line in between two subsequent %%% scans (isolines) in %%% the data file? Add blank lines! If you are curious what this means, %%% then don't %%% hesitate to look to files like \verb+demo/glass.dat+ or %%% \verb+demo/triangle.dat+ %%% in the gnuplot demo directory. \verb+set pm3d; splot 'a.dat'+ ȤäƤ⡢ 顼ܥåɽΤΥդɽʤȤ顢 ⤷ 2 ĤΤĤʤäƤ (Ω) ʬΥԤ ʤΤǤ ? Ԥʤ ! % 줬̣Τ˶̣ʤ顢 gnuplot demo ǥ쥯ȥˤ \verb+demo/glass.dat+ % \verb+demo/triangle.dat+ ʤɤΥե򤸤ä긫Ƥ %%% You can find useful the following awk script (call it e.g. %%% \verb+addblanks.awk+) %%% which adds blank lines to a data file whenever number in the first column %%% changes: ʲ awk ץ % (㤨 \verb+addblanks.awk+ ȸƤ֤Ȥˤޤ) % ͭѤǡǡեˡ 1 ܤοѹȤ˶ԤɲäƤޤ %% end Japanese %%% \begin{verbatim} %%% /^[[:blank:]]*#/ {next} # ignore comments (lines starting with #) %%% NF < 3 {next} # ignore lines which don't have at least 3 columns %%% $1 != prev {printf "\n"; prev=$1} # print blank line %%% {print} # print the line %%% \end{verbatim} \begin{verbatim} /^[[:blank:]]*#/ {next} # ȹ (# ǻϤޤ) ̵ NF < 3 {next} # 3 ̤ʤԤ̵ $1 != prev {printf "\n"; prev=$1} # Ԥ {print} # ιԼΤ \end{verbatim} %% end Japanese %%% Then, either preprocess your data file by command %%% \verb+awk -f addblanks.awk <a.dat+ or plot the datafile under a %%% unixish platform %%% by \verb+gnuplot> splot "<awk -f addblanks.awk a.dat"+. ˤꡢǡե򥳥ޥ \verb+awk -f addblanks.awk <a.dat+ % ˤä뤫 unix ߴΥץåȥեǥǡե % \verb+gnuplot> splot "<awk -f addblanks.awk a.dat"+ Τ褦褹뤫 Τɤ餫ԤäƤ %%% \subsection{Drawing a (color) map, i.e. 2D projection of 3D data} \subsection{() Ͽޥաʤ 3 ǡ 2 ͱƤ褹ˤ} %%% Use \texttt{set view map; unset surface} or \texttt{set pm3d map} rather than %%% \texttt{set view 180,0}. The latter facilitates drawing matrices %%% or data files %%% as maps, even without the necessity for matrix-like data organization %%% (gridding). It is possible to decrease the output postscript file size by %%% postprocessing it by \texttt{pm3dCompress.awk} or %%% \texttt{pm3dConvertToImage.awk}. \texttt{set view 180,0} Ȥ⡢ष % \texttt{set view map; unset surface} \texttt{set pm3d map} ȤäƤ ԤϹǡեϿޥդڤˤƤޤ ⡢ǡι (ʻҲ) ɬפ⤢ޤ \texttt{pm3dCompress.awk} \texttt{pm3dConvertToImage.awk} % ˤˤäơ postscript եΥ򾮤뤳ȤǽǤ %%% There are also plotting styles \verb+with image+ and \verb+with rgbimage+ %%% for plotting 2D color images. 2 Υ顼Ѥˤϡ襹 \verb+with image+ % \verb+with rgbimage+ ʤɤѰդƤޤ %%% \subsection{How to overlay dots/points scatter plot onto a pm3d map/surface} \subsection{pm3d Ͽ/̾ dots/points λۿޤŤͤˤ} %%% Use the explicit (see also implicit) switch of the pm3d style: pm3d explicit å (implicit ⻲ȤΤ) ȤäƤ: %% end Japanese \begin{verbatim} gnuplot> set pm3d explicit gnuplot> splot x with pm3d, x*y with points \end{verbatim} %%% \subsection{How to draw black contour plot, and contours with labels} \subsection{衢ޤϥ٥Ĥ褹ˤ} %%% Well, it is very simple even though it is hard to discover: %%% \verb+unset clabel+. äȡĤΤ񤷤⤷ޤ󤬡ϼ¤˴ñ: \verb+unset clabel+ %% end Japanese \begin{verbatim} set contour both; set cntr levels 100 unset clabel unset surface splot x*y with line lt -1 pause -1 splot x*y with line palette \end{verbatim} %%% Another solution requires to write contours into a temporary file using %%% \verb+set table+. ¾ΤȤƤϡ\verb+set table+ Ѥ ե˽񤭽Ф꤬ޤ: %% end Japanese \begin{verbatim} set contour base; set cntrparam levels 15; unset surface; set view map splot x*x+y*y; pause -1 set table 'contour.dat' replot unset table \end{verbatim} %%% Now, for drawing it in 2D, do θǡ2 褹ˤϼΤ褦ˤޤ %% end Japanese \begin{verbatim} reset plot 'contour.dat' with line -1 \end{verbatim} %%% and for contours in 3D do 3 褹ϼΤ褦ˤޤ %% end Japanese %%% \begin{verbatim} %%% reset %%% # Change single blank lines to double blank lines %%% !awk "NF<2{printf\"\n\"}{print}" <contour.dat >contour1.dat %%% splot 'contour1.dat' with line -1 %%% \end{verbatim} \begin{verbatim} reset # 1 ԤζԤ 2 ԤζԤѴ !awk "NF<2{printf\"\n\"}{print}" <contour.dat >contour1.dat splot 'contour1.dat' with line -1 \end{verbatim} %% end Japanese %%% See also the following question "How to overlay contour plot over %%% pm3d map/surface". "pm3d Ͽ/̥դŤͤˤ" ⻲ȤƤ %%% Labelling contours by their z-value can be achieved by a suitable script %%% generating automatically the appropriate \verb+set label+ commands; %%% you can find %%% one at gnuplot scripts page %%% \http{gnuplot.sourceforge.net/scripts/index.html\#tricks-here}. z ͤˤΥ٥ϡ Ŭ \verb+set label+ ޥɤ ưŪƤŬʥץȤǼ¸ǤǤ礦 Τ褦ʰĤ gnuplot ץȤΥڡ % \http{gnuplot.sourceforge.net/scripts/index.html\#tricks-here} % ˤޤ %%% \subsection{How to overlay contour plot over pm3d map/surface} \subsection{pm3d Ͽ/̥դŤͤˤ} %%% This requires you to write contours into a temporary file %%% using the table %%% terminal, and then use this file in the final drawing without set contours. %%% The following example demonstrates this for a map; for surface, remove %%% \verb+set pm3d map+ and put \verb+set ticslevel 0+. ϡ table ϷѤưե˽񤭽Ф Ƥ set contours Ȥ鷺褹ɬפޤ ϿϿޥդΥǥǤ ̥դξ % \verb+set pm3d map+ \verb+set ticslevel 0+ ޤ %% end Japanese %%% \begin{verbatim} %%% # Write contours of function x*x-y*y to a (temporary) file %%% set contour base; set cntrparam level 20 %%% unset surface %%% set table 'contour.dat' %%% splot x*x-y*y %%% unset table %%% %%% # Change single blank lines to double blank lines %%% !awk "NF<2{printf\"\n\"}{print}" <contour.dat >contour1.dat %%% %%% # Draw the plot %%% reset %%% set palette gray %%% set palette gamma 2.5 %%% set pm3d map %%% set pm3d explicit %%% splot x*x+y*y with pm3d, 'contour1.dat' with line lt -1 %%% !rm contour.dat contour1.dat %%% \end{verbatim} %% begin Japanese \begin{verbatim} # ؿ x*x-y*y ե˽񤭽Ф set contour base; set cntrparam level 20 unset surface set table 'contour.dat' splot x*x-y*y unset table # 1 ԤζԤ 2 ԤζԤѴ !awk "NF<2{printf\"\n\"}{print}" <contour.dat >contour1.dat # դ reset set palette gray set palette gamma 2.5 set pm3d map set pm3d explicit splot x*x+y*y with pm3d, 'contour1.dat' with line lt -1 !rm contour.dat contour1.dat \end{verbatim} %% end Japanese %%% The last command deletes the two temporary files. ǸΥޥɤ 2 Ĥΰեޤ %%% \subsection{Color facets with pm3d} \subsection{pm3d ˤ뿧Ĥ¿} %%% It is possible to draw colors facets of a 3D objects, organized in %%% such a file: 3 ʪΤ̤˿Ĥ褹ˤϡ եʲΤ褦ʷǺвǽǤ %%% \begin{verbatim} %%% # triangle 1 %%% x0 y0 z0 <c0> %%% x1 y1 z1 <c1> %%% %%% x2 y2 z2 <c2> %%% x2 y2 z2 <c2> %%% %%% %%% # triangle 2 %%% x y z %%% ... %%% \end{verbatim} %% begin Japanese \begin{verbatim} # ѷ 1 x0 y0 z0 <c0> x1 y1 z1 <c1> x2 y2 z2 <c2> x2 y2 z2 <c2> # ѷ 2 x y z ... \end{verbatim} %% end Japanese %%% Notice the positioning single and double blank line. \texttt{<c>} %%% is an optional %%% color. 1 ԤζԤ 2 ԤζԤΰ֤դƤ \texttt{<c>} ϥץοǤ %%% Then plot it by (either of splot's): ʲΤ褦ˤ褷ޤ (ɤ餫 splot ): %% end Japanese \begin{verbatim} set pm3d set style data pm3d splot 'facets.dat' splot 'facets_with_color.dat' using 1:2:3:4 \end{verbatim} %%% Note that you avoid surface lines by \texttt{set style data pm3d} or %%% \texttt{splot ... with pm3d}. ̤ϡ \texttt{set style data pm3d} \texttt{splot ... with pm3d} % ̵ˤǤ뤳ȤդƤ %%% In the above example, pm3d displays triangles as independent surfaces. %%% They are plotted one surface after another, as found in the data file. %%% Parts overlapping in 2D projection are overdrawn. Ǥϡpm3d ϻѷ򤽤줾Ωʶ̤Ȥ褷ޤ ϡǡե¾ΤΤĤäȤ θǰĤζ̤ޤ Ťʤʬ 2 ͱƤǤϽŤʤä褵Ƥޤޤ %%% Gnuplot is not 3D modeling program. Its hidden routines apply for points and %%% lines, but not for faces. %%% Without handling the data as a collection of faces, there would be no surface %%% anything could be hidden behind. The 'hidden3d' algorithm works by using the %%% input data in two ways: first, to set up a collection of triangles %%% (made from a %%% mesh of quadrangles) that form the surface, second as a collection of %%% edges. It %%% then goes through all those edges, checking what parts of them are not hidden %%% behind any faces, and draws those. gnuplot 3 ǥ󥰥ץǤϤʤ 롼ˤŬѤޤ̤ˤŬѤޤ ̤νޤȤƤΥǡνʤˤϡ Ƥ˱̤뤳ȤϤǤޤ 'hidden3d' 르ꥺϡϥǡ 2 ĤˡǻȤäƼ¹ԤƤޤ: % Ĥϡ̤뻰ѷ (ʻλͳѷ) % νޤ򥻥åȥåפ뤳ȡ ⤦ĤüνޤǤ ƤΤ٤ƤüФơ ɤʬ¾̤θ˱ʤΤå Ƥ褷Ƥޤ %%% Consequently, gnuplot won't draw your surface or 3D object as %%% a virtual reality. %%% It works OK for \texttt{set pm3d map} but for true 3D you would %%% be probably more %%% happy writing a convertor of your facets into a VRML file. ̤Ȥơ gnuplot ϶̤ 3 ʪΤ۸¤ȤƤ褷ޤ \texttt{set pm3d map} ФƤϤƯޤ 3 ˤʤ顢 ¿Υǡ VRML եѴ륽եȤ⤷ޤ %%% \subsection{Palette for printing my color map on color as well %%% as black\&white %%% printer?} \subsection{ϿޤΥΥץ󥿤ǤȰ褦ʥѥåȤ} %%% Try \texttt{set palette cubehelix}. \texttt{set palette cubehelix} Ƥ %%% \section{Wanted features} \section{ߤǽ (Wanted features)} %%% \subsection{What's new in \gnuplot{} 4.2, 4.4 etc?} \subsection{\gnuplot{} 4.2, 4.4 ǿʤäȤ} %%% Too many things to be named here. %%% Please refer to the \texttt{NEWS} file in the source distribution, or the %%% "New features" section in the gnuplot documentation. ˵ˤ¿ޤ ʪ˴ޤޤե \texttt{NEWS} 뤤 gnuplot ΥإץɥȤ "New features" Υ ȤƤ %%% \subsection{Does \gnuplot{} support a driver for <graphics format>?} \subsection{\gnuplot{} ϲեޥåѤΥɥ饤Ф򥵥ݡȤƤޤ} %%% To see a list of the available graphic drivers for your installation of %%% \gnuplot{}, type \verb+set term+. 󥹥ȡѤ \gnuplot{} ѤǤ륰եåɥ饤Фΰ򸫤ˤϡ \verb+set term+ ȥפƤ %%% Some graphics drivers are included in the normal distribution, %%% but are not built by default. If you want to use them, you'll %%% have to change file \verb+gnuplot/src/term.h+, and recompile. ̾ʪˤϴޤޤƤƤ⡢ ǥեȤǤϻȤʤ褦ˤʤäƤ륰եåɥ饤Ф⤢ޤ 餬ȤС\verb+gnuplot/src/term.h+ ѥ뤷ľɬפޤ %%% \subsection{Does \gnuplot{} have hidden line removal?} \subsection{\gnuplot{} ϱǤޤ} %%% Yes. %%% \subsection{Does \gnuplot{} support bar-charts/histograms/boxes?} \subsection{\gnuplot{} /ҥȥ/Ȣդ񤱤ޤ} %%% Various clustered and stacked histogram styles are supported in \gnuplot\ %%% version 4.2 and later as separate style types. \gnuplot\ version 4.2 ʹߤǤϡ¤ӷ (clustered) % Ѥ߾夲 (stacked) Υҥȥॹ뤬 ̡Υ뷿ȤƥݡȤƤޤ %%% \subsection{Does \gnuplot{} support pie charts?} \subsection{\gnuplot{} ϱߥդ񤱤ޤ} %%% It's sort of difficult in \gnuplot, see %%% \http{http://gnuplot-tricks.blogspot.com/2009/08/pie-charts-entirely-in-gnuplot.html}, %%% or have a look at %%% \http{www.usf.uni-osnabrueck.de/~breiter/tools/piechart/piecharts.en.html}. \gnuplot ǤϤäݤǤʲ򸫤Ƥ \http{http://gnuplot-tricks.blogspot.com/2009/08/pie-charts-entirely-in-gnuplot.html} ޤϡʲ򻲾ȤƤ \http{www.usf.uni-osnabrueck.de/~breiter/tools/piechart/piecharts.en.html} %%% \subsection{Does \gnuplot{} quarterly time charts?} \subsection{\gnuplot{} ϻȾ㡼Ȥ񤱤ޤ} %%% It's not possible in \gnuplot, but have a look at %%% \http{ricardo.ecn.wfu.edu/~cottrell/qplot}. The corresponding %%% file \verb+qplot.zip+ can be obtained from the contrib directory %%% on any \gnuplot{} server. \gnuplot{} ǤϤϤǤޤ󡣤ʲ򸫤Ƥ \http{ricardo.ecn.wfu.edu/~cottrell/qplot} % Υե \verb+qplot.zip+ \gnuplot{} ۥȤ % contrib ǥ쥯ȥ꤫Ǥޤ %%% \subsection{Can I put multiple pages on one page?} \subsection{ĤΥڡʣΥդ񤱤ޤ} %%% Yes. \verb+set multiplot+. Ϥ\verb+set multiplot+ ȤƤ %%% \subsection{Does \gnuplot{} support multiple y-axes on a single plot?} \subsection{\gnuplot{} ϰĤΥդʣ y Ȥޤ} %%% Yes. You can have 2 x- and 2 y-axes per plot. The additional axes are called %%% x2 and y2. See \verb+help plot+. Ϥ1 ĤФ 2 Ĥ x 2 Ĥ y Ȥޤ Τ줾 2 ܤμ x2, y2 ȸƤФޤ \verb+help plot+ 򻲾ȤƤ %%% \subsection{Can I put both commands and data into a single file?} \subsection{ĤΥե gnuplot Υޥɤȥǡξ񤱤ޤ} %%% This is possible by the new \verb+plot "-"+ possibility. The %%% \verb+plot "-"+ command allows to read the data to be plot from %%% standard input or the current batch job. \verb+plot "-"+ ȤǽȤвǽǤ \verb+plot "-"+ ޥɤ褹ǡɸϡ ޤϸߤΥХå֤ɤ߹ߤޤ \begin{verbatim} gnuplot> plot "-" 1 1 2 4 3 9 e \end{verbatim} %%% \subsection{Can I put Greek letters and super/subscripts into my labels?} \subsection{٥˥ꥷʸ/դʸȤޤ} %%% Most terminal types (output device drivers) support an "enhanced text" mode. %%% This lets you use sub- and superscripts. It also allows to use Greek %%% letters and math symbols to the extent that these are supported by the fonts %%% installed on your system. ¿νϷ (ϥǥХɥ饤) ǡֳĥʸץ⡼ % ("enhanced text" ⡼) ݡȤƤơ Ǿդդʸޤ ξ硢ʤΥƥ˥󥹥ȡ뤵ƤեȤ ݡȤϰǡꥷʸ䡢صʸⰷޤ %%% You might try using the \LaTeX{} terminal type and putting text %%% like \verb+"\\alpha_{3}"+ or \verb+'\alpha_{3}'+ . \LaTeX{} ϤԤʤϷȤä \verb+"\\alpha_{3}"+ % \verb+'\alpha_{3}'+ Τ褦ˤƤߤƤ %% end Japanese %%% If you include your \gnuplot-graphs into a \LaTeX{} document %%% you can use the \LaTeX{}-package psfrag to typeset any characters %%% into your graphs. \gnuplot{} Υդ \LaTeX{} ʸĥˤϡ \LaTeX{} ѥå psfrag Ȥ ǤդʸȤȤǤޤ %%% One more possibility is to use the MetaPost terminal. It supports \TeX{} %%% syntax and is converted onto encapsulated PostScript by mpost. ⤦Ĥβǽ MetaPost ϤǤ \TeX{} ɽˡ򥵥ݡȤ mpost ˤä encapsulated PostScript (EPS) Ѵޤ %%% \subsection{How do I include accented characters} \subsection{ɤ饢դʸϤǤޤ} %% end Japanese % \subsection{Can I type labels in Czech, French, Hungarian, Russian...} %%% To obtain accented characters like \"u or \^n in your labels you should use %%% 8bit character codes together with the appropriate encoding option. %%% See the following example: \"u (u 饦; u ξ 2 ĤΥ) % \^n Τ褦ʸ٥˴ޤˤϡ Ŭڤʥ󥳡ɥץꤷ 8bit ʸɤѤʤФޤ 㤨мΤ褦ˤޤ \begin{verbatim} gnuplot> set encoding iso_8859_1 gnuplot> set title "M\374nchner Bierverbrauch \374ber die Jahre" gnuplot> plot "bier.dat" u 1:2 \end{verbatim} %%% Consequently, you can type labels in Czech, French, Hungarian, Russian... by %%% means of an appropriate \texttt{set encoding}. However, you cannot mix two %%% encodings in one file (e.g. accents for west and east latin encodings). ˤꡢŬڤ \texttt{set encoding} ˤꡢ 졢ʩ졢ϥ󥬥꡼졢ϪʤɤΥ٥ǤФȤǤޤ 2 Υ󥳡 (㤨ƥ󥨥󥳡ɤƥ󥨥󥳡) % ĤΥե˺뤳ȤϤǤޤ %%% A more general solution is to use UTF-8 encoded fonts, and type the %%% UTF-8 characters directly into gnuplot. This works for many terminal types %%% but not, unfortunately, PostScript. Update: Version 4.4 contains %%% more complete support for UTF-8, including PostScript. UTF-8 󥳡ǥ󥰥եȤȤΤŪʤϡ \gnuplot{} ľ UTF-8 ʸϤ뤳ȤǤ ¿νϷưޤǰʤ PostScript ǤϤǤ : С 4.4 gnuplot ǤϡPostScript ޤ괰 % UTF-8 ΥݡȤʤƤޤ %%% \subsection{Can I do 1:1 scaling of axes?} \subsection{ĤȲμ 1:1 ˤǤޤ} %%% Try \verb+set size square+ %%% or \verb+set view equal xy+. \verb+set size square+ % \verb+set view equal xy+ ȤƤߤƤ %%% \subsection{Can I put different text sizes into my plots?} \subsection{ۤʤ륵ΥƥȤĤΥդǽϤǤޤ} %%% Some terminals can, others can't. Some allow you to choose %%% a font size for the %%% entire plot. Terminals supporting the "enhanced text" mode %%% allow you to change fonts and text sizes within a plot. Look at %%% the help for these terminals. ǽʽϷ⤢ޤǤʤΤ⤢ޤ ΤΥեȥǤ褦ʤΤ⤢ޤ "enhanced text" ⡼ɤ򥵥ݡȤƤϷǤ ǥƥȥȥեȤѹԤʤޤ 줾νϷΥإפ򻲾ȤƤ %%% \subsection{How do I skip data points?} \subsection{ɤǡ򥹥åפǤޤ} %%% By specifying \texttt{?} as a data value, as in ʲΤ褦˥ǡͤȤ \texttt{?} ꤹФǤޤ %% end Japanese \begin{verbatim} 1 2 2 3 3 ? 4 5 \end{verbatim} %%% See also \texttt{set missing}. %%% See also \texttt{set datafile commentschars} for specifying comment %%% characters in %%% data files. \texttt{set missing} ⻲ȤƤ ǡեΥʸꤹˤϡ \texttt{set datafile commentschars} 򻲾ȤƤ %%% \subsection{How do I plot every nth point?} \subsection{ɤ n ˥ǡ򰷤ޤ} %%% This can be specified with various options for the command \verb+plot+, %%% for example \verb+plot 'a.dat' every 2+. If you want to draw a line %%% through every point but only draw a point symbol at every nth point, %%% then try \verb+plot 'a.dat' with linespoints pointinterval n+. ϡ㤨 \verb+plot 'a.dat' every 2+ Τ褦ˡ \verb+plot+ ޥɤ˿ʥץꤹ뤳ȤǤǤޤ ٤Ƥ̤ε n ˽񤭤ϡ \verb+plot 'a.dat' with linespoints pointinterval n+ ȤƤߤƤ %%% \subsection{How do I plot a vertical line?} \subsection{ɤľ񤱤ޤ} %%% Depending on context, the main methods are: ˤޤˡϰʲ̤Ǥ: %% end Japanese \begin{itemize} %%% \item \verb+set arrow .... .... nohead+ where you have to compute %%% explicitly the start and the end of the arrow. %%% \item generate (inlined) datapoints and plot them %%% \item switch to parametric mode \item \verb+set arrow .... .... nohead+ ξ硢 ΤʳȽλΰ֤׻Ƥɬפޤ \item ǡä (饤Ǥλ) \item ѥ᡼⡼ɤˤ %% end Japanese \end{itemize} %%% \subsection{How do I plot data files} \subsection{ɤǡեǤޤ} %%% Easily: by a command \texttt{plot 'a.dat'}. In 3D, use %%% \texttt{splot 'a.dat'} -- %%% but don't forget to put a blank line in between two subsequent %%% scans (isolines), %%% otherwise you will get an error that the data is not gridded; %%% see also question %%% \ref{blank1}. If your data are not gridded, then use %%% \texttt{set dgrid3d \{many %%% options\}}. ñǤޥ \texttt{plot 'a.dat'} ǤǤޤ 3 ξ \texttt{splot 'a.dat'} Ǥ 2 ĤΤĤʤäƤ (Ω) ʬΥΤ ԤϤΤ˺ʤǤ ʤȡǡʻҾ (grid) ǤʤȤ顼Ф뤫Τޤ \ref{blank1} ⻲ȤƤ ǡʻҾǤʤϡ \texttt{set dgrid3d \{ʥץ\}} ѤƤ %%% \subsection{How do I replot multiplot drawing} \subsection{ɤ multiplot replot Ǥޤ} %%% You cannot directly: gnuplot supports \verb+replot+ command, not %%% \verb+remultiplot+. You have to write the complete sequence of commands since %%% \verb+set multiplot+ till \verb+unset multiplot+ into a script file. Then %%% you can \verb+load+ the script into gnuplot as many times as you need for %%% replotting the drawing to different terminals or output files. ľܤϤǤޤ: gnuplot \verb+replot+ ޥɤϥݡȤƤޤ \verb+remultiplot+ ޥɤϤޤ äơץȥե % \verb+set multiplot+ \verb+unset multiplot+ % ޤǤΤ٤ƤΥޥɬפޤ ΥץȤ gnuplot \verb+load+ ƤС ɬפʲۤʤϷۤʤϥե replot Ǥޤ %%% \section{Miscellaneous} \section{¾} %%% \subsection{I've found a bug, what do I do?} \subsection{Х򸫤ĤΤǤɤɤǤ} %%% First, try to see whether it actually is a bug, or whether it %%% is a feature which may be turned off by some obscure set--command. ǽˡ줬˥ХʤΤ Ȥ⤢ set--command ݤȤǤħʤΤ򸫶ˤƤ %%% Next, see whether you have an old version of \gnuplot{}; if you do, %%% chances are the bug has been fixed in a newer release. ˡʤȤäƤ \gnuplot{} ŤǤǤϤʤΤƤ ⤷ʤ顢 꿷ǤǤϤοХϼƤǽޤ %%% The {CVS} development version may already contain fixes for bugs reported %%% since the release of the current version. %%% Before submitting a bug report, please check whether the bug in question %%% has already been fixed. {CVS} ȯǤϡߤΥ꡼ǰʸ𤵤줿Хν ˻äƤǽޤݡȤˡ ΥХ˽ƤʤåƤߤƤ %%% If, after checking these things, you still are convinced that there is a %%% bug, proceed as follows. If you have a fairly general sort of bug %%% report, posting to \news{comp.graphics.apps.gnuplot} is probably %%% the way to go. If you have investigated a problem in detail, especially %%% if you can provide a simple script that reproduces the error, please %%% upload it to the bug-tracker at %%% \http{sourceforge.net/tracker/?group_id=2055&atid=102055}. åǤʤ줬ХǤȳοʤ顢 ʲ˿ʤǤ ⤷ʤŪʼΥХݡȤäʤС ¿ʬ˥塼롼 \news{comp.graphics.apps.gnuplot} % ؤƤ٤ƻǤ礦 ⤷ξܺ٤Ĵ̤ʤС äˤΥ顼ݸ¤ñʥץȤ󶡤ǤʤС \http{sourceforge.net/tracker/?group_id=2055&atid=102055} bug-tracker ˥åץɤƤ %%% The tracker on sourceforge is for reporting bugs and collecting bug fixes %%% that will appear in a subsequent release. %%% The \news{comp.graphics.apps.gnuplot} newsgroup will be more help for %%% finding work arounds or actually solving \gnuplot{} related problems. If %%% you do send in a bug report, be sure and include the version of \gnuplot{} %%% (including patchlevel) as shown by the command \verb+show version long+, %%% terminal driver, operating system, an exact description of the bug and %%% input which can reproduce the bug. Failure to indicate these details can %%% render a solution to your problem almost impossible. Also, any context %%% diffs should be referenced against the latest official version of %%% \gnuplot{} if at all possible. souceforge tracker ϡХΥݡȡ Υ꡼ȿǤ뤿ΥХνμΤΤΤǤ ˥塼롼 \news{comp.graphics.apps.gnuplot} % \gnuplot{} ˴ؤФ򸫤Ĥ롢 뤤Ϥºݤ˲褹ΤΤΤǤ ⤷ХݡȤȤϡ\verb+show version long+ ޥɤǸ % \gnuplot{} ΥС (ѥå٥ޤ) ϷΥɥ饤̾ (terminal driver)ڥ졼ƥ󥰥ƥࡢ ХΤʵҤȥХƸ뤿ϡ ǧݡȤƤ ξܺ٤ƤʤС βͿ뤳ȤϤۤȤԲǽǤ ơǿθǤ \gnuplot{} ФƤʬ (context diff) ⡢ ǽʤФ٤ưѤ٤Ǥ %%% \subsection{Can I use \gnuplot{} routines for my own programs?} \subsection{Υץ \gnuplot{} Υ롼ѤǤޤ} %%% On systems supporting pipes, you can pipe commands to \gnuplot{} from other %%% programs. Many applications with gnuplot as the graphics engine, like Octave %%% (\http{www.octave.org}), uses this method. This also works from a %%% cgi script to %%% drive \gnuplot{} from a forms-based web page. ѥפ򥵥ݡȤƤ륷ƥǤϡ ¾Υץफѥ׷ͳ \gnuplot{} ˥ޥɤϤȤǤޤ Octave (\http{www.octave.org}) Τ褦ˡ gnuplot 򥰥եå󥸥ȤƻѤƤ¿Υץꥱ ˡѤƤޤ ϡform ١ Web ڡ \gnuplot{} ư cgi ץȤǤ ѤǤޤ %%% John Campbell (\mailto{jdc@nauvax.ucc.nau.edu}) modified a much earlier %%% version of \gnuplot{} (3.5) to be a library of C subroutines callable %%% from a C program. Gnuplot itself has changed radically since then, %%% and we are not aware of any plans to create a similar library based on %%% the current version. John Campbell (\mailto{jdc@nauvax.ucc.nau.edu}) ϡ ʤ (3.5) \gnuplot{} ɤơ C ץफƤӽФ C Υ֥롼饤֥˺夲ޤ gnuplot ϤθŪѲޤ ߤǤ˴ŤƱͤΥ饤֥褦ʷײϲ桹Τޤ %%% \subsection{What extensions have people made to \gnuplot? Where can I get %%% them?} \subsection{ɤɲäĥʤƤޤϤɤޤ} %%% Many extensions or patches are available on the "Patches" page of the %%% gnuplot development site %%% \http{sourceforge.net/tracker/?group_id=2055&atid=302055}. %%% The current development version will generally include some of these %%% being debugged for inclusion in a later official release of gnuplot. γĥѥågnuplot γȯ % \http{sourceforge.net/tracker/?group_id=2055&atid=302055} % "Patches" ڡˤޤ ǿγȯǤϡ gnuplot κ꡼˴ޤޤ뤿ΥǥХå򤷤ʤ顢 ΤĤޤǤޤ %%% Older extensions, which may or may not work with the current version, %%% are available from \ftp{ftp.ucc.ie}{/pub/gnuplot/contrib/}. ߤǤǤưɤʬޤ󤬡 Ťĥ \ftp{ftp.ucc.ie}{/pub/gnuplot/contrib/} ˤޤ % (: (03/14 2005) ϤˤϤʤ褦Ǥ) %%% Some extensions available: ߰ʲΤ褦ʳĥʤƤޤ: %% end Japanese \begin{itemize} %%% \item \texttt{date-errorbar}: allows dates in the hi/lo fields for %%% errorbars. %%% \item \texttt{perltk}: A perl/tk canvas widget. %%% \item \texttt{Gnuplot.py}: A python package to create graphs from %%% within python. More information at %%% \http{gnuplot-py.sourceforge.net}. \item \texttt{date-errorbar}: 顼Сξ岼ξեǡȤ \item \texttt{perltk}: perl/tk Хѥå \item \texttt{Gnuplot.py}: Python ǥդ뤿 % Python ѥåܤϰʲ򻲾: \http{gnuplot-py.sourceforge.net}. %% end Japanese \end{itemize} %%% \subsection{I need an integration, fft, iir-filter,...!} \subsection{ʬ FFT IIR ե륿ʤɤߤΤǤ} %%% \Gnuplot{} has been and is a plotting program, not a data %%% processing or mathematical program suite. Therefore \gnuplot{} %%% can't do that. Look into the demo file "bivariat.dem" for a basic %%% implementation of an integration. \gnuplot{} ϺޤǤ⡢ƸߤץǤꡢǡ ץǤϤޤ󡣤äƤΤ褦ʤȤϤǤޤʬ ŪʼˤĤƤ demo "bivariat.dem" 򸫤Ƥ %%% For more sophisticated data-processing read the next section. ʥǡˤĤƤϼΥɤǤ %%% \subsection{Can I do heavy-duty data processing with \gnuplot? or %%% What is beyond \gnuplot?} \subsection{"heavy-duty" ǡ \gnuplot{} ǻȤޤ ޤ \gnuplot{} ѤΤϤʤǤ} %%% \gnuplot{} alone is not suited very well for this. One thing you might try %%% is \texttt{fudgit}, an interactive multi-purpose fitting program written by %%% Martin-D. Lacasse. It can use \gnuplot{} as its graphics back end. \gnuplot{} ñȤǤϤޤꤽˤŬƤޤ \texttt{fudgit} ƤߤȤǤ礦 Martin-D.Lacasse ˤä 񤫤줿÷¿ŪƤϤץǤ ظǥեåϤΤ \gnuplot{} Ѥޤ %%% Michael Courtney has written a program called lsqrft, which uses the %%% Levenberg-Marquardt - algorithm for fitting data to a function. It is %%% available from %%% \ftp{hobbes.nmsu.edu}{/pub/os2/apps/analysis/lsqrft15.zip}; %%% sources, which should compile on Unix, and executables for MS-DOS and %%% OS/2 are available. There is an interface to the OS/2 presentation %%% manager. Michael Courtney lsqrft ȸƤФץ񤭤ޤ ϥǡؿƤϤΤ Levenberg-Marquardt % 르ꥺѤޤ Unix ǥѥǽʥ MS-DOS, OS/2 Ѥμ¹ԥХʥ % \ftp{hobbes.nmsu.edu}{/pub/os2/apps/analysis/lsqrft15.zip} ˤޤ OS/2 ץ쥼ơޥ͡Ф륤󥿡ե⤢ޤ %%% You might also want to look at the applications developed by %%% the Software Tools Group (STG) at the National Center for %%% Supercomputing Applications. Ftp to ftp.ncsa.uiuc.edu %%% and get the file README.BROCHURE for more information. NCSA (National Center for Supercomputing Applications) STG (Software Tools Group) ˤäƳȯ줿ץꥱ󤬸С ܺ٤ ftp.ncsa.uiuc.edu ftp ơREADME.BROCHURE Ƥ %%% You can also try pgperl, an integration of the PGPLOT plotting %%% package with Perl 5. Information can be found at %%% \http{www.ast.cam.ac.uk/AAO/local/www/kgb/pgperl}, the source is %%% available from \ftp{ftp.ast.cam.ac.uk}{/pub/kgb/pgperl/} or %%% \ftp{linux.nrao.edu}{/pub/packages/pgperl/}. pgperl Ƥ⤤Ǥ礦 Perl 5 ˤä PGPLOT ץåȥѥå礷ΤǤ ˴ؤ % \http{www.ast.cam.ac.uk/AAO/local/www/kgb/pgperl} ǸĤޤ \ftp{ftp.ast.cam.ac.uk}{/pub/kgb/pgperl/} ޤ \ftp{linux.nrao.edu}{/pub/packages/pgperl/} ˤޤ %%% Another possibility is \textbf{Octave}. To quote from its README: Octave is a %%% high-level language, primarily intended for numerical computations. Octave is %%% licensed under GPL, and in principle, it is a free Matlab clone. %%% It provides a %%% convenient command line interface for solving linear and nonlinear problems %%% numerically. The latest released version of Octave is always available from %%% \http{www.octave.org}. By the way, octave uses \gnuplot{} as its plotting %%% engine, so you get a data-processing program on top of \gnuplot{}. ¾ˡȤ Octave ޤREADME Ѥޤ: Octave Ϲǡ˿ͷ׻ѤǤ Octave GPL 饤󥹤˽§Ū˥ե꡼ Matlab Ǥ Ū˲򤯤Τ ޥɥ饤󥤥󥿡եƤޤ Octave κǿǤϾ \http{www.octave.org} ˤޤ Ȥǡoctave \gnuplot{} 襨󥸥ȤƻȤޤΤǡ \gnuplot{} ɲäǡץ뤳Ȥˤʤޤ %%% Finally, there is \texttt{scilab} at \http{www.scilab.org} %%% doing about the same as matlab. It is free but copyrighted software. Ǹˡ\texttt{scilab} \http{www.scilab.org} ˤޤ matlab ȤۤƱͤưޤ ե꡼ǤƤʤ (GPL ǤϤʤ) եȥǤ %%% \subsection{Mouse in my interactive terminal does not work} \subsection{÷ߥʥǤϥޥޤ} %%% If your mouse is not working, try to hit 'm' in the interactive terminal to %%% switch mousing on/off. See below for the list of supported interactive %%% terminals. ޥʤ硢÷ߥʥ 'm' ǤäƤߤƤ ϥޥǽ On/Off Ԥʤޤ ݡȤƤ÷ߥʥΰˤĤƤϰʲ򻲾ȤƤ %%% If it still does not run, then either gnuplot has not been configured or %%% compiled with mouse support, or you have not properly installed it, %%% or running %%% an older version of gnuplot (check your \texttt{PATH}). Ǥޤưʤ硢 gnuplot ޥǽ򥵥ݡȤ褦 configure ʤä ѥ뤵ʤä ȥ󥹥ȡ뤷ʤä 뤤 gnuplot θŤСȤäƤ뤫 % (ʤ \texttt{PATH} åƤߤƤ) Ǥ礦 %%% If your gnuplot is running as the plotting engine of Octave under X11, then %%% please put \texttt{set mouse} into your \texttt{\$HOME/.gnuplot} (preferred %%% than putting \texttt{gset mouse} into \texttt{\$HOME/.octaverc}). This is %%% needed only for gnuplot 4.0: according to its \texttt{help x11\_mouse}, %%% gnuplot 4.0 under x11 running through a pipe needs \texttt{set mouse} to be %%% executed before launching the x11 plot window. gnuplot X11 Octave 襨󥸥ȤưƤϡ ʤ \texttt{\$HOME/.gnuplot} % \texttt{set mouse} Ƥ % (\texttt{\$HOME/.octaverc} \texttt{gset mouse} % ȤꤤǤ礦) ʲ gnuplot 4.0 ˤΤߴؤ뤳ȤǤ \texttt{help x11\_mouse} % ˤСx11 ǥѥפ̤ gnuplot ưƤ % x11 襦ɥư \texttt{set mouse} % ¹Ԥɬפ褦Ǥ %%% \subsection{How to use hotkeys in my interactive terminals} \subsection{÷ߥʥǤɤΤ褦˥ۥåȥȤФǤ} %%% There are several hotkeys available in interactive terminals. %%% Currently the following interactive terminals support hotkeys and mousing: %%% OS/2 Presentation Manager, X11, Windows, WX, and GGI. Hit 'h' %%% in the terminal %%% to get list of hotkeys. ÷ߥʥǤϤĤΥۥåȥͭˤʤäƤޤ ߤϼ÷ߥʥ뤬ۥåȥȥޥǽ򥵥ݡȤƤޤ: OS/2 ץ쥼ơޥ͡ (pm), X11, Windows, WX, GGI 'h' 򤽤ΥߥʥǤĤȡۥåȥΰɽޤ %% end Japanese %%% See \texttt{help new-features} or the \textbf{Features introduced %%% in version 4.0} %%% section in the docs for a brief guide over mousing and hotkeys. %%% Further, you may read \texttt{help mouse} and \texttt{help bind} for more %%% information. ޥǽۥåȥ˴ؤ복פϡ \texttt{help new-features} ɥȤ % \textbf{Features introduced in version 4.0} 򻲾ȤƤ ˡ \texttt{help mouse} \texttt{help bind} Ǥ礦 %%% \subsection{I have ported \gnuplot{} to another system, or patched it. What %%% do I do?} \subsection{\gnuplot{} ¾Υƥ˰ܿޤϥѥåޤ ɤ餤Ǥ} %%% The preferred way of submitting, commenting and upgrading patches is %%% via 'Patches' section on %%% \http{sourceforge.net/tracker/?group_id=2055&atid=302055}. %%% You may want to send a note to \mailto{gnuplot-beta@lists.sourceforge.net} %%% for %%% more lively discussion. Ƥष \http{sourceforge.net/tracker/?group_id=2055&atid=302055} % 'Patches' ̤ƥȤ뤫 ѥå򹹿˾ޤǤ \mailto{gnuplot-beta@lists.sourceforge.net} ϡ ȯʵΤäĺȤ꤬Ǥ %%% \subsection{I want to help in developing the next version of \gnuplot. %%% What can I do?} \subsection{\gnuplot{} μСγȯˤĤΤꤿΤǤ ɤ餤Ǥ} %%% Join the \gnuplot{} beta test mailing list by sending a mail %%% containing the line %%% \verb+subscribe gnuplot-beta+ %%% in the body (not the subject) of the mail to %%% \mailto{Majordomo@lists.sourceforge.net}. \gnuplot{} Υ١ƥȥ᡼󥰥ꥹȤäƤ ᡼ʸ (᡼륿ȥǤϤʤ) \verb+subscribe gnuplot-beta+ % Ƚ񤤤ƥ᡼ % \mailto{Majordomo@lists.sourceforge.net} äƤ %%% \subsection{Open questions for inclusion into the FAQ?} \subsection{FAQ ˴ޤޤ褦̤μ ?} % \mailto{gnuplot-beta@lists.sourceforge.net}. %%% Please submit your questions (along with the answer) to %%% \mailto{gnuplot-beta@lists.sourceforge.net}. μ (Ȱ) \mailto{gnuplot-beta@lists.sourceforge.net} äƤ %%% \section{Making life easier} \section{ޤˤ (Making life easier)} %%% \subsection{How do I plot two functions in non-overlapping regions?} \subsection{ɤ 2 ĤδؿŤʤʤ褦˽񤱤ޤ} %%% Use a parametric plot. An example: ѥ᡼ (parametric) Ѥ褹ФǤ礦: %% end Japanese \begin{verbatim} gnuplot> set parametric gnuplot> a=1 gnuplot> b=3 gnuplot> c=2 gnuplot> d=4 gnuplot> x1(t) = a+(b-a)*t gnuplot> x2(t) = c+(d-c)*t gnuplot> f1(x) = sin(x) gnuplot> f2(x) = x**2/8 gnuplot> plot [t=0:1] x1(t),f1(x1(t)) title "f1", x2(t), f2(x2(t)) title "f2" \end{verbatim} %%% You can also use \gnuplot's ability to ignore mathematically undefined %%% expressions: the expression \verb+1/0+ is silently ignored, thus a %%% construction like \gnuplot{} ΡŪʤ̵뤹뵡ǽȤȤǤޤ \verb+1/0+ Ȥۤä̵뤷ޤΤǡ㤨 %% end Japanese \begin{verbatim} gnuplot> set xran [-10:10] gnuplot> plot (abs(x)>0.5?1/0: x**2) \end{verbatim} %%% plots a quadratic function only for \verb+|x| < 0.5+. Τ褦ˤ 2 δؿ \verb+|x| < 0.5+ ϰϤǤΤ褷ޤ %%% \subsection{How do I run my data through a filter before plotting?} \subsection{ɤ˥ǡ˥ե륿򤫤ޤ} %%% If your system supports the popen() function, as Unix does, you %%% should be able to run the output through another process, for %%% example a short awk program, such as ΥƥबUnix Τ褦 popen() ؿ򥵥ݡȤƤʤ顢 ¾ΥץνϤȤäƼ¹Ԥ뤳ȤǽǤ 㤨СΤ褦 awk ûץबȤޤ: \begin{verbatim} gnuplot> plot "< awk ' { print $1, $3/$2 } ' file.in" \end{verbatim} %$ %%% The plot command is very powerful and is able to do some %%% arithmetic on datafiles. See \verb+help plot+. plot ޥɤϤȤƤ⶯Ϥǡ ǡեФ뤢ǽǤ \verb+help plot+ 򻲾ȤƤ %%% The above filtering works seamlessly under Unixes and OS/2. On Windows, this %%% is only supported by the console version \texttt{gnuplot} or the GUI version %%% \texttt{wgnuplot\_pipes}, which has an additional text console attached. The %%% Cygwin version of gnuplot naturally supports pipes as well. Υե륿ϡUnix 䤽θߴ OSOS/2 Ǥϥࡼưޤ Windows Ǥϡϥ󥽡Ǥ \texttt{gnuplot} ƥȥ󥽡뤬ɲä줿 GUI Ǥ \texttt{wgnuplot\_pipes} % ΤߤݡȤޤ Cygwin Ǥ gnuplot ⡢ѥפݡȤƤޤ %%% \subsection{How do I make it easier to use \gnuplot{} with \LaTeX{}?} \subsection{ɤ \gnuplot{} βڤ \LaTeX{} ǰޤ} %%% There is a set of \LaTeX{} macros and shell scripts that are meant %%% to make your life easier when using \gnuplot{} with \LaTeX{}. This %%% package can be found on \ftp{ftp.dartmouth.edu}{pub/gnuplot/latex.shar}, %%% by David Kotz. %%% For example, the program "plotskel" can turn a gnuplot-output %%% file plot.tex into a skeleton file skel.tex, that has the same %%% size as the original plot but contains no graph. With the right %%% macros, the skeleton can be used for preliminary \LaTeX{} passes, %%% reserving the full graph for later passes, saving tremendous %%% amounts of time. \LaTeX{} ȤȤ \gnuplot{} Ȥ硢 ڤˤƤ褦 % \LaTeX{} Υޥȥ륹ץȤΥåȤޤ Υѥå David Kotz ˤΤǡ \ftp{ftp.dartmouth.edu}{pub/gnuplot/latex.shar} ˤޤ (: (03/14 2005) ϤˤϤʤ褦Ǥ archie gnuplot-latex.shar ȤեõƤߤƤ) % 㤨 "plotskel" \gnuplot{} νϤե plot.tex % ȤߤΥե skel.tex ޤ ϸΥդƱǤʬޤ ιȤߤŬڤʥޥȶ \LaTeX{} ѥΥƥȤǻȤȤǤ ϸ˹ԤʤդȴޤѥνΩ 襳ѥˤ¿λ֤󤷤Ƥޤ %%% \subsection{How do I save and restore my settings?} \subsection{ɤ¸/ѤǤޤ} %%% Use the \verb+save+ and \verb+load+ commands for this; see \verb+help save+ %%% and \verb+help load+ for details. ˤ\verb+save+ \verb+load+ ΥޥɤȤäƤ ܺ٤\verb+help save+ \verb+help load+ 򻲾ȤƤ %%% You can save the current terminal and restore it later without touching the %%% filesystem by \texttt{set term push} and \texttt{set term pop}, respectively. \texttt{set term push} \texttt{set term pop} ȤС ե륷ƥ򿨤뤳Ȥʤ 줾츽ߤνϷ¸ȤθǤޤ %%% \subsection{How do I plot lines (not grids) using splot?} \subsection{ɤ splot Ƕ (ʻҤǤʤ) 񤱤ޤ} %%% If the data in a data file for splot is arranged in such a way %%% that each one has the same number of data points (using blank %%% lines as delimiters, as usual), splot will plot the data with a %%% grid. If you want to plot just lines, use a different number of %%% data entries (you can do this by doubling the last data point, %%% for example). splot ΥǡեΥǡƱΥǡĤ褦 % (ڤϤĤΤ褦˶Ԥ) ·Ƥ硢 splot ϥǡʻҤ褷ޤ ñ˶ǽ񤭤ʤСǡȥθĿۤʤ褦 % (㤨кǸƱΤ 2 ĤĤȤ) Ƥ %%% \subsection{How do I plot a function f(x,y) that is bounded by other %%% functions in the x-y plane?} \subsection{ɤ x-y ʿ̾¾δؿ¤Ƥ f(x,y) դ񤱤ޤ} %%% An example: : %% end Japanese \begin{verbatim} gnuplot> f(x,y) = x**2 + y **2 gnuplot> x(u) = 3*u gnuplot> yu(x) = x**2 gnuplot> yl(x) = -x**2 gnuplot> set parametric gnuplot> set cont gnuplot> splot [0:1] [0:1] u,yl(x(u))+(yu(x(u)) - yl(x(u)))*v,\ > f(x(u), (yu(x(u)) - yl(x(u)))*v) \end{verbatim} %%% \subsection{How do I turn off <feature> in a plot?} \subsection{ɤ̵ˤǤޤ} %%% Most gnuplot features are controlled by a corresponding set/unset command. %%% If a feature is enabled by default, or by using \verb+set <feature>+, %%% then you %%% should be able to turn it by using \verb+set no<feature>+. However, %%% the preferred %%% syntax since version 4.0 is \verb+unset <feature>+. Ƥ gnuplot εǽϡб set/unset ޥɤǤޤ ǥեȤͭˤʤäƤ뵡ǽ 뤤 \verb+set <feature>+ ͭˤǽϡ \verb+set no<feature>+ ̵ˤǤޤ version 4.0 Ϥν񼰤Ϥष \verb+unset <feature>+ % Ȥ٤Ǥ %%% \subsection{How do I call \gnuplot{} from my own programs?} \subsection{ɤץफ \gnuplot{} ƤӽФޤ} %%% On unix-like systems, commands to gnuplot can be piped via stdin. %%% Output from \gnuplot{}'s \verb+print+ command can be read via a named pipe. unix ߴƥʤСgnuplot ؤΥޥɤɸ (stdin) % ѥפϤޤ \gnuplot{} \verb+print+ ޥɤϡ ̾Ĥѥפɤ߽ФȤǤޤ %% end Japanese %%% On Windows, due to the lacking standard input (stdin) in GUI programs, %%% you either need to use the console version \texttt{gnuplot} (recommended), %%% or use \texttt{wgnuplot\_pipes}, which has an additional console window %%% attached. The old helper program \texttt{pgnuplot} is still included %%% in the distribution package. Windows ǤϡGUI ץɸ (stdin) Ȥʤᡢ 󥽡Ǥ \texttt{gnuplot} (侩) ƥȥ󥽡뤬ɲä줿 GUI Ǥ \texttt{wgnuplot\_pipes} % Τ줫Ȥɬפޤ Ť \texttt{pgnuplot} Ȥإѡץ ޤեå˴ޤޤƤޤ %%% \subsection{What if I need h-bar (Planck's constant)?} \subsection{Planck (h ˲) ɬפʤȤϤɤ餤Ǥ} %%% The most straightforward way is to use a UTF-8 font, and type in the %%% $\hbar$ character (Unicode code point \#x210F) directly. Ǥ⼫ˡϡUTF-8 եȤȤʸ $\hbar$ (Unicode ݥ \#x210F) ľϤ뤳ȤǤ %%% This does not work in PostScript, however, so you must use approximations %%% like %%% \verb+ @{/=56 -} {/=24 h}+ or %%% \verb+ {/=8 @{/Symbol=24 -} _{/=14 h}}+ %%% In the latter, the "-" (a long one in /Symbol) is non-spacing and 24-pt. %%% The 14-pt "h" is offset by an 8-pt space (which is the space preceding %%% the "\_") but smaller, since it's written as a subscript. %%% But these don't look too much like the hbar we're used to, since the bar %%% is horizontal instead of sloped. I don't see a way to get that. I %%% tried using an accent (character 264 in iso-latin-1 encoding), %%% but I haven't found a %%% way to scale and position the pieces correctly. %%% One more possibility would be \verb+{/=14 @^{/Symbol=10 -}{/=14 h}}+. PostScript ǤϤޤޤΤǡ㤨мΤ褦 κѤɬפޤ: \verb+ @{/=56 -} {/=24 h}+ ޤ \verb+{/=8 @{/Symbol=24 -} _{/=14 h}}+ % ԤǤ 24pt (ݥ) "-" (/Symbol եȤĹϥե) ڡʤǻȤޤ 14pt "h" 8pt Υڡ ("\_" ˤ륹ڡ) % 餵֤ޤ ϲդʸȤƽ񤫤ΤǾʸˤʤޤ ̾桹ѤץεȤϰäƤơ ϼǤϤʤʿˤʤޤ ȵʤɤȤäƤߤޤ % (iso-latin-1 󥳡ǥ󥰤ʸ 264 ʤ) 礭Ȱ֤ˡ򸫤Ĥ뤳ȤϤǤޤǤ ⤦Ĥˡ \verb+{/=14 @^{/Symbol=10 -}{/=14 h}}+ Ȥ뤳ȤǤ %%% The reduced Planck's constant can be set very easily by using the %%% AMS-LaTeX PostScript fonts which are available from %%% \http{www.ams.org/tex/amsfonts.html} (also included in many LaTeX %%% distributions). \Gnuplot{} (see \verb+help fontpath+) and the %%% PostScript interpreter (usually Ghostscript) have to know where the %%% file \verb+ msbm10.pfb+ (or \verb+ msbm10.pfa+) resides. Use %%% \verb+ {/MSBM10 \175}+ to produce \verb+ \hslash+ which is a "h" %%% superimposed by a sloped bar. The standard \verb+ \hbar+ (horizontal %%% bar) has the octal code 176. Please note that h-bar exists only as an %%% italic type. AMS-LaTeX PostScript ե% (\http{www.ams.org/tex/amsfonts.html} ˤꡢ ¿ LaTeX ۤˤޤޤƤޤ) ȤС ȤƤñ˾ Planck 򥻥åȤ뤳ȤǤޤ% \gnuplot{} (\verb+help fontpath+ 򻲾) ȡ PostScript 󥿡ץ꥿ (̾ Ghostscript) ե \verb+ msbm10.pfb+ (ޤ \verb+ msbm10.pfa+) ɤˤ뤫Τɬפޤ% "h" ˷ФΤĤŤͤ \verb+ \hslash+ ˤ% \verb+ {/MSBM10 \175}+ ȤäƤ ̾ \verb+ \hbar+ (ʿβ) 8 ʿ 176 Ǥ ʿβϥåΤȤƤ¸ߤʤȤդƤ %%% \subsection{What if I need the Solar math symbol?} \subsection{ۤΤ褦ʿص (ݤ) ɬפʤȤϤɤ餤Ǥ} %%% As with Planck's constant, the most straightforward way is to use a %%% UTF-8 font, and type in the $\odot$ character (Unicode code point %%% \#x2299 ; "circled dot operator") directly. %%% The very similar glyph at code point \#x2609 ; "sun" may be even %%% better, but not many fonts have it. Planck Ʊ͡Ǥ⼫ˡ UTF-8 եȤȤʸ $\odot$ % (Unicode ɥݥ \#2299; "circled dot operator") % ľϤ뤳ȤǤ ˤ褯դɥݥ \#x2609 ˤ⤢ޤ "sun" ǡꤤ⤷ޤ󤬡 ĥեȤ¿Ϥޤ %%% \subsection{How do I produce blank output page?} \subsection{ʤڡϤˤ} %%% Well, you probably don't want a blank page, but page with a just a title %%% (overprinting title in another graph in multiplot page): ¿ʬϤʤ櫓ǤϤʤơ ȥΤΤϤʤǤ礦 % (multiplot Υڡ¾Υդ˽Ťͤ褦): \begin{verbatim} reset; unset xtics; unset ytics unset border; unset key set title 'Title on an empty page' plot [][0:1] 2 \end{verbatim} %%% \subsection{How do I produce graph of an exact border size?} \subsection{ΰ֤٤˹碌ƥդˤ} %%% Specify the position of the top, bottom, left, and right borders in %%% terms of their fractional position within the page: 塢ζ֤򡢥ڡΰ֤Ȥƾñ̤ǻꤷƤ: \begin{verbatim} set lmargin at screen 0.05 set bmargin at screen 0.05 set rmargin at screen 0.95 set tmargin at screen 0.95 \end{verbatim} %%% \section{Common problems} \section{̤} %%% \subsection{Help! None of my fonts work.} \subsection{! ΥեȤȤʤ} %%% Gnuplot does not do font handling by itself; it must necessarily leave %%% that to the individual device support libraries. Unfortunately, this %%% means that different terminal types need different help in finding %%% fonts. Here are some quick hints. For more detailed information please %%% see the gnuplot documentation for the specific terminal type you are %%% having problems with. gnuplot ϡ켫ȤǤϥեȽԤޤΤǡ ɬŪ˸ġΥǥХ򥵥ݡȤ饤֥Ǥ뤳Ȥˤʤޤ ǰʤ餳ϡեȤθФˤƤϡۤʤϷˤ ۤʤɬפȤȤ̣ޤΤǡ ǤϡñʥҥȤ򤤤Ĥ夲Ƥޤ ܤˤĤƤϡʤˤƤϷѤ % gnuplot ΥɥȤ򻲾ȤƤ \begin{description} %%% \item [{png/jpeg/gif}] These terminal types use the libgd support %%% library, which %%% searches for fonts in the directories given in the environmental variable %%% GDFONTPATH. Once you get libgd fontpaths sorted out, you will probably %%% want to set a default font for gnuplot. %%% For example: \verb+setenv GNUPLOT_DEFAULT_GDFONT verdana+ \item [{png/jpeg/gif}] νϷϡlibgd Ȥݡȥ饤֥Ѥ ϴĶѿ GDFONTPATH Ϳǥ쥯ȥ˥եȤõޤ Τ褦 libgd Υեȥѥꤹȡ ٤ gnuplot ΥǥեȥեȤꤷ⤷ޤ : \verb+setenv GNUPLOT_DEFAULT_GDFONT verdana+ %% end Japanese %%% \item [{pdf}] The libpdf support library should have come with an associated %%% font configuration file, usually installed as /usr/local/share/pdflib.upr. %%% The environmental variable PDFLIBRESOURCE should point to this file. \item [{pdf}] Υݡȥ饤֥ libpdf ϡϢեե򻲾Ȥޤ ̾綠 /usr/local/share/pdflib.upr Ȥƥ󥹥ȡ뤵ޤ Ķѿ PDFLIBRESOURCE ϡΥեΰ֤򼨤ޤ %% end Japanese %%% \item [{post}] PostScript font names are not resolved until the document %%% is printed. Gnuplot does not know what fonts are available to your %%% printer, so it will accept any font name you give it. However, it %%% is possible to bundle a font with the gnuplot output; please see the %%% instructions given by gnuplot's internal command {}``help set term %%% post fontfile''. \item [{post}] PostScript ե̾ϡʸ񤬰ޤǻȤޤ󤫤顢 ʤΥץ󥿤ǤɤΥեȤͭǤ뤫 gnuplot Τޤ äơɤʥե̾Ǥꤹ뤳ȤǤޤ gnuplot νϤ˥եȤळȤϲǽǤˤĤƤϡ gnuplot ޥ ``help set term post fontfile'' ؼ򻲾ȤƤ %% end Japanese %%% \item [{svg}] Font handling is viewer-dependent. \item [{svg}] եȽϡӥ塼¸Ǥ %% end Japanese %%% \item [{x11}] The x11 terminal uses the normal x11 font server mechanism. %%% The only tricky bit is that in order to use multi-byte fonts you must %%% explicitly say so: \item [{x11}] x11 Ϸϡ̾ x11 եȥеѤޤ ȥåꡢޥХȥեȤѤ뤿ˤϡ Ū˰ʲΤ褦˻ꤹɬפޤ: %% end Japanese \begin{verbatim} set term x11 font "mbfont:sazanami mincho,vera,20" \end{verbatim} %%% \item [{win}] Select "Choose font..." from the "Options" pull-down menu %%% in the toolbar. \item [{win}] ġС "Options" Υץ˥塼 "Choose font..." 򤷤ޤ %% end Japanese %%% \item [{wxt}] On linux systems, the wxt terminal can find fonts indexed %%% by the fontconfig utility. \item [{wxt}] Linux ƥǤϡwxt Ϸ fontconfig ǴƤեȤ Ĥ뤳ȤǤޤ %% end Japanese \end{description} %%% \subsection{\Gnuplot{} is not plotting any points under X11! How come?} \subsection{X11 \gnuplot{} ɤ褷ޤ󡣤ɤ餤Ǥ} %% end Japanese %%%% %%%%Very probably, you still are using an old version of %%%%gnuplot\_x11. Remove that, then do a full installation. %%%% %%% On VMS, you need to make several symbols: VMS ǤϤĤεʤФޤ: \begin{verbatim} $ gnuplot_x11 :== $disk:[directory]gnuplot_x11 $ gnuplot :== $disk:[directory]gnuplot.exe $ def/job GNUPLOT$HELP disk:[directory]gnuplot.hlb \end{verbatim} %%% Then run \gnuplot{} from your command line, and use %%% \verb+set term x11+. \gnuplot{} 򥳥ޥɥ饤󤫤鵯ư \verb+set term x11+ ȤƤ %%% If you run \gnuplot{} on Unix systems, be sure that the newest %%% \verb+gnuplot_x11+ is the first in your search path. %%% Command \verb+which gnuplot_x11+ will help you. Unix \gnuplot{} ưϡ ǿ \verb+gnuplot_x11+ ѥκǽ˸Ƥ뤫ǧƤ ޥ \verb+which gnuplot_x11+ ͤˤʤǤ礦 %%% \subsection{Why does \gnuplot{} ignore my very small numbers?} \subsection{ʤ \gnuplot{} ϤȤƤ⾮Υǡ̵뤹ΤǤ} %%% \Gnuplot{} treats all numbers less than 1e-08 as zero, by default. %%% Thus, if you are trying to plot a collection of very small %%% numbers, they may be plotted as zero. Worse, if you're plotting %%% on a log scale, they will be off scale. Or, if the whole set of %%% numbers is "zero", your range may be considered empty: \gnuplot{} ϥǥեȤǤ 1e-08 꾮Ƥο 0 Ȥưޤ äƤȤƤ⾮νޤ褷褦Ȥ 0 Ȥ褵Ƥޤޤ п褹ϡ äȤҤɤȤˤ꤫ϤƤޤޤ ޤƤο "0" Ǥ硢 ϰϤ϶ǤȤߤʤޤ (: \gnuplot{} 3.6 λ): \begin{verbatim} gnuplot> plot 'test1' Warning: empty y range [4.047e-19:3e-11], adjusting to [-1:1] gnuplot> set yrange [4e-19:3e-11] gnuplot> plot 'test1' ^ y range is less than `zero` \end{verbatim} %%% The solution is to change \gnuplot's idea of "zero": к \gnuplot{} "zero" γǰѹ뤳ȤǤ %% end Japanese \begin{verbatim} gnuplot> set zero 1e-20 \end{verbatim} %%% For more information, type \verb+help set zero+. ܤˤĤƤ \verb+help set zero+ 򻲾ȤƤ %%% \subsection{\Gnuplot{} is not plotting on the screen when run from command %%% line via '\texttt{gnuplot filename.gp}'} \subsection{ޥɥ饤󤫤 '\texttt{gnuplot filename.gp}' ȤƤ ɽƤޤ} %%% Obviously, it draws (unless there is an error in the script file), %%% but the plot %%% dissappears immediately when the script is completed. ϤƤǤ % (ץȥե˥顼ʤ) ץȤλȤ褬˾äƤ롢 ȤȤǤ %%% Solution 1: Put a \verb+pause -1+ after the plot command in the file, %%% or at the %%% file end. 1: եΡplot ޥɤβ pause -1 ɲäƤ %%% Solution 2: Use command \verb+gnuplot filename.gp -+ (yes, dash is the last %%% parameter) to stay in the interactive regime when the script completes. 2: \verb+gnuplot filename.gp -+ (åǸΰˤޤ) ȤäƤ ˤꡢץȤλ÷⡼ɤ˰ܹԤޤ %%% Solution 3A: On an X-Window System system, you can also use the %%% \verb+-persist+ %%% option, the X11 window is then not closed. Close the X11 window by typing "q" %%% when the focus is on it. 3A: X-Window System ʤС gnuplot \verb+-persist+ ץȤȤǤޤ ξ硢X11 襦ɥϳޤޤˤʤޤ ΥɥĤˤϤξ˥եäƹԤä % "q" 򥿥פƤ %%% Solution 3B: On M\$ Windows, you can also use either \verb+-persist+ or %%% \verb+/noend+. 3B: M\$ Windows Ǥϡ\verb+-persist+ ץ 뤤 \verb+/noend+ ץ󤬻Ȥޤ %%% Solution 4: For OS/2 PM terminal, use \verb+set term pm persist+ or %%% \verb+set term pm server+. For X11 terminal, use \verb+set term x11 persist+. 4: OS/2 PM ϷǤϡ\verb+set term pm persist+ ޤ \verb+set term pm server+ ѤƤ X11 ϷǤ \verb+set term x11 persist+ ȤƤߤƤ %%% \subsection{My formulas (like 1/3) are giving me nonsense results! %%% What's going on?} \subsection{񤤤 (1/3 ʤ) ̣Τʤ̤ϤƤޤޤ} %%% \Gnuplot{} does integer, and not floating point, arithmetic on %%% integer expressions. For example, the expression 1/3 evaluates %%% to zero. If you want floating point expressions, supply %%% trailing dots for your floating point numbers. Example: \gnuplot{} μξ硢¿黻ǤϤʤ黻Ԥʤޤ 㤨м 1/3 0 ɾޤ ⤷¿ͤߤʤСοθ˥ɥå "." ĤƤ : \begin{verbatim} gnuplot> print 1/3 0 gnuplot> print 1./3. 0.333333 \end{verbatim} %%% This way of evaluating integer expressions is shared by both C and Fortran. μ򤳤Τ褦ˤɾ % C Fortran ǤԤʤƤޤ %%% \subsection{My output files are incomplete!} \subsection{νϤԴǤ!} %%% You may need to flush the output with a closing \verb+set output+. %%% Some output formats (postscript, pdf, latex, svg, ...) can include several %%% pages of plots in a single output file. For these output modes, gnuplot %%% leaves the file open after each plot so that you can add additional plots %%% to it. The file is not completed and made available to external applications %%% until you explicitly close it (\verb+set output+ or \verb+unset output+), %%% or select a different terminal type (\verb+set term+) or exit gnuplot. %%% Output formats that contain only a single 'page' (png, svg, emf, ...) %%% should not suffer from this problem. \verb+set output+ ˤäƽϤ򥯥ơ ޤäƤϤǤФɬפ뤫Τޤ ϷˤäƤϡĤνϥեʣΥڡޤޤƤޤ % (postscript, pdf, latex, svg, ...) νϥ⡼ɤǤϡgnuplot ϤʤɲäǤ褦 ˥ե򥪡ץ󤷤ޤޤˤƤޤ äƤʤŪˤ򥯥 (\verb+set output+ ޤ % \verb+unset output+) ۤʤϷ򤹤 (\verb+set term+) ޤ gnuplot λޤǤϡΥեϴǤϤʤ ΥץꥱǤϻѤǤ褦ˤϤʤäƤޤ ñ 'ڡ' ΤߤĽϷ (png, emf, ...) Ǥ Τ褦Ǻޤ뤳ȤϤʤǤ礦 %%% \subsection{When using the \LaTeX--terminal, there is an error during %%% the \LaTeX--run!} \subsection{\LaTeX--terminal νϤ \LaTeX{} μ¹Ԥǥ顼Фޤ} %%% The \LaTeX 2e-core no longer includes the commands %%% "$\backslash$Diamond" and "$\backslash$Box"; they are included in %%% the latexsym package. %%% Other symbols are taken from the amssymb package. %%% Both of these are part of the base distribution and thus part of any LaTeX %%% implementation. Please remember to include these packages in your %%% LaTeX document. %% for LaTeX, html (but make image) % \LaTeX 2$\epsilon$ Ϻϥޥ % %"$\backslash$Diamond" "$\backslash$Box" äƤ餺 %% for latex2html \LaTeXe{} Ϻϥޥ % "\textbackslash{}Diamond" "\textbackslash{}Box" äƤ餺 Ϻ latexsym ѥåäƤޤ ޤamssymb ѥå¾εȤޤ Ϥ \LaTeX{} δʪˤϴޤޤƤơ äǤդ \LaTeX{} ƥˤϴޤޤƤޤ Υѥå򤢤ʤʸ뤳Ȥ˺ʤǤ %%% \subsection{Calling \gnuplot{} in a pipe or with a \gnuplot-script %%% doesn't produce a plot!} \subsection{ѥפ \gnuplot{} ƤӽФ \gnuplot{} ץȤȤä դ񤱤ޤ} %%% You can call \gnuplot{} by using a short Perl-script like the %%% following: Τ褦û Perl ץȤȤä \gnuplot{} ƤӽФޤ: %% end Japanese \begin{verbatim} #!/usr/local/bin/perl -w open (GP, "|/usr/local/bin/gnuplot -persist") or die "no gnuplot"; # force buffer to flush after each write use FileHandle; GP->autoflush(1); print GP,"set term x11;plot '/tmp/data.dat' with lines\n"; close GP \end{verbatim} %%% \Gnuplot{} closes its plot window on exit. The \verb+close GP+ %%% command is executed, and the plot window is closed even before you have %%% a chance to look at it. \gnuplot{} Ͻλˤ襦ɥĤޤ \verb+close GP+ ޥɤ¹Ԥȡ 襦ɥܤˤǤĤƤޤޤ %%% There are three solutions to this: first, use the \verb+pause -1+ %%% command in \gnuplot{} before closing the pipe. Second, close the pipe %%% only if you are sure that you don't need \gnuplot{} and its plot window %%% anymore. Last, you can use the command line option \verb+-persist+: this %%% option leaves the X-Window System plot window open. Фн 3 Ĥޤ: 1 ܤϡgnuplot \verb+pause -1+ ޥɤ ѥפĤ˻Ѥ뤳ȡ 2 ܤϡ\gnuplot{} 襦ɥפˤʤäȤˤΤ ѥפĤ褦ˤ뤳ȡ 3 ܤϥޥɥ饤󥪥ץ \verb+-persist+ ȤȤǤ Υץ X-Window System 襦ɥ򳫤ޤ޻Ĥޤ %%% \section{Credits} \section{°} %%% \Gnuplot{} 3.7's main contributors are (in alphabetical order) \gnuplot{} 3.7 μʴͿԤ (ե٥åȽ) %% end Japanese Hans-Bernhard Broeker, John Campbell, Robert Cunningham, David Denholm, Gershon Elber, Roger Fearick, Carsten Grammes, Lucas Hart, Lars Hecking, Thomas Koenig, David Kotz, Ed Kubaitis, Russell Lang, Alexander Lehmann, Alexander Mai, Carsten Steger, Tom Tkacik, Jos Van der Woude, James R. %%% Van Zandt, and Alex Woo. Additional substantial contributors to version 4.0 %%% include Ethan Merritt, Petr Mikul\'{\i}k and Johannes Zellner. %%% Version 4.2, 4.4 and 4.6 releases was coordinated by Ethan Merritt. Van Zandt, Alex Woo Ǥ version 4.0 ؤνפʴͿԤȤơ include Ethan Merritt, Petr Mikul\'{\i}k, Johannes Zellner ޤ version 4.2, 4.4, 4.6 Υ꡼ Ethan Merritt ޤȤޤ %%% This list was initially compiled by John Fletcher with contributions %%% from Russell Lang, John Campbell, David Kotz, Rob Cunningham, Daniel %%% Lewart and Alex Woo. Reworked by Thomas Koenig from a draft %%% by Alex Woo, with corrections and additions from Alex Woo, John %%% Campbell, Russell Lang, David Kotz and many corrections from Daniel %%% Lewart. ΥꥹȤ % Russell Lang, John Campbell, David Kotz, Rob Cunningham, Daniel Lewart, Alex Woo % δͿ John Fletcher ǽˤޤȤ᤿ΤǤ ơAlex Woo Ƥˤꡢ Alex Woo, John Campbell, Russell Lang, David Kotz νɲá Daniel Lewart ˤ¿ν Thomas Koenig ˤޤȤľޤ %% end Japanese %%% Again reworked for \gnuplot{} 3.7 by Alexander Mai and Juergen v.Hagen %%% with corrections by Lars Hecking, Hans-Bernhard Broecker and other %%% people. ơ\gnuplot{} 3.7 Ѥ˺Ƥ % Lars Hecking, Hans-Bernhard Broecker Ӥ¾ο͡ˤ뽤 % Alexander Mai Juergen v.Hagen ˤޤȤľޤ %% end Japanese %%% Revised for \gnuplot{} 4.0 release by Petr Mikul\'{\i}k and Ethan Merritt. \gnuplot{} 4.0 Ѥνϡ Petr Mikul\'{\i}k Ethan Merritt ˤԤʤޤ %% end Japanese %%% Revised for \gnuplot{} 4.2 release by Petr Mikul\'{\i}k and Ethan Merritt. \gnuplot{} 4.2 Ѥνϡ Petr Mikul\'{\i}k Ethan Merritt ˤԤʤޤ %% end Japanese %%% Revised for \gnuplot{} 4.4 release by Ethan Merritt. \gnuplot{} 4.4 Ѥνϡ Ethan Merritt ˤԤʤޤ %%% (: ܸ Shigeharu TAKENO (\mailto{shige@iee.niit.ac.jp}) ˤ Ԥʤޤ) %% end Japanese \end{document} ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/doc2hlp.c������������������������������������������������������������������������0000644�0004711�0000144�00000007704�10707513067�012576� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: doc2hlp.c,v 1.17 2007/10/24 00:47:51 sfeam Exp $"); } #endif /* GNUPLOT - doc2hlp.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * doc2hlp.c -- program to convert Gnuplot .DOC format to * VMS help (.HLP) format. * * This involves stripping all lines with a leading ?, * @, #, or %. * Modified by Russell Lang from hlp2ms.c by Thomas Williams * * usage: doc2hlp [file.doc [file.hlp]] * * Original version by David Kotz used the following one line script! * sed '/^[?@#%]/d' file.doc > file.hlp */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "syscfg.h" #include "stdfn.h" #include "doc2x.h" extern TBOOLEAN single_top_level; void convert __PROTO((FILE *, FILE *)); void process_line __PROTO((char *, FILE *)); int main (int argc, char **argv) { FILE *infile; FILE *outfile; infile = stdin; outfile = stdout; single_top_level = TRUE; if (argc > 3) { fprintf(stderr, "Usage: %s [infile [outfile]]\n", argv[0]); exit(EXIT_FAILURE); } if (argc >= 2) { if ((infile = fopen(argv[1], "r")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for reading\n", argv[0], argv[1]); exit(EXIT_FAILURE); } } if (argc == 3) { if ((outfile = fopen(argv[2], "w")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for writing\n", argv[0], argv[2]); exit(EXIT_FAILURE); } } convert(infile, outfile); return EXIT_SUCCESS; } void convert (FILE *inf, FILE *outf) { static char line[MAX_LINE_LEN+1]; while (get_line(line, sizeof(line), inf)) process_line(line, outf); } void process_line (char *line, FILE *b) { static int line_count = 0; line_count++; switch (line[0]) { /* control character */ case '?':{ /* interactive help entry */ break; /* ignore */ } case '@':{ /* start/end table */ break; /* ignore */ } case '=': /* latex index entry */ case 'F': /* latex embedded figure */ case '#':{ /* latex table entry */ break; /* ignore */ } case '%':{ /* troff table entry */ break; /* ignore */ } case '^':{ /* html entry */ break; /* ignore */ } case '\n': /* empty text line */ case ' ':{ /* normal text line */ (void) fputs(line, b); break; } default:{ if (isdigit((int)line[0])) { /* start of section */ (void) fputs(line, b); } else fprintf(stderr, "unknown control code '%c' in column 1, line %d\n", line[0], line_count); break; } } } ������������������������������������������������������������gnuplot-4.6.4/docs/titlepag.tex���������������������������������������������������������������������0000644�0004711�0000144�00000010145�12212153502�013406� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������% % $Id: titlepag.tex,v 1.32.2.4 2013/09/05 19:10:58 sfeam Exp $ % \ifx\LaTeXe\undefined % old LaTeX version % add `,a4' to `toc_entry' to load settings for A4-paper % see below if you add 11pt or 12pt \documentstyle[toc_entr]{article} \else % LaTeX2e version % add `[a4paper]' before `{article}' to load settings for A4-paper % see below if you add 11pt or 12pt \documentclass[twoside]{article} \usepackage{toc_entr} \usepackage[utf8]{inputenc} \usepackage[ % We've given up trying to understand pdftex vs. normal latex. % It'll just have to sort itself out. If it doesn't, add your % own local hyperref options HERE. hyperindex, bookmarks, bookmarksnumbered=true, pdftitle={gnuplot documentation}, pdfauthor={gnuplot}, pdfsubject={see www.gnuplot.info} % ,pdfcreator={} % ,pdfkeywords={...} ]{hyperref} \usepackage{fancyhdr} \usepackage{makeidx} \makeindex \usepackage{longtable} % This is only needed if you want to embed figures \include{pdffigures} \fi % The following statements should adjust the default values for % different papersizes, mainly required for verbatim output % 30pt are a bit more than really needed %\addtolength{\textwidth}{30pt} %\addtolength{\oddsidemargin}{-15pt} %\addtolength{\evensidemargin}{-15pt} % Approximately keep the same ratio of width/height %\addtolength{\textheight}{48pt} %\addtolength{\topmargin}{-24pt} % \setlength{\oddsidemargin}{0.5cm} \setlength{\oddsidemargin}{0.0cm} \setlength{\evensidemargin}{0.0cm} \setlength{\topmargin}{-0.5in} \setlength{\textwidth}{6.50in} \setlength{\textheight}{9.5in} \setlength{\parskip}{1ex} \setlength{\parindent}{0pt} % For 11pt/12pt options change `\normalsize' to `\small' in % preverbatim % every verbatim environment is surrounded by the commands \newcommand{\preverbatim}{\normalsize\vspace{-2.2ex}} \newcommand{\postverbatim}{\normalsize\vspace{-0.5ex}} \adjustarticle \setcounter{secnumdepth}{5} \setcounter{tocdepth}{5} % Read the gnuplot version into macro \gnuplotVersion \newread\fileGpVersion \openin\fileGpVersion VERSION \ifeof\fileGpVersion\openin\fileGpVersion VERSION. \ifeof\fileGpVersion\error FATAL: Cannot read file "VERSION" \fi\fi \read\fileGpVersion to \gpVersion \closein\fileGpVersion \newbox\GpVersion \setbox\GpVersion=\hbox{\gpVersion} \def\gnuplotVersion{\usebox\GpVersion} % Layout setup of fancy headings: \pagestyle{fancy} \headsep=5.5mm \addtolength{\headheight}{7mm} %\setlength{\headrulewidth}{0.4pt} \chead{\hyperlink{TableOfContents}{gnuplot \usebox\GpVersion}} \cfoot{} \rhead[\leftmark]{\thepage} \lhead[\thepage]{\leftmark} \begin{document} \sloppy \thispagestyle{empty} \rule{0in}{1.0in} \begin{center} {\huge\bf {gnuplot \gpVersion}}\\ \vspace{3ex} {\Large An Interactive Plotting Program}\\ \vspace{2ex} \large Thomas Williams \& Colin Kelley\\ \vspace{2ex} Version \gnuplotVersion organized by: Hans-Bernhard Bröker, Ethan A Merritt, and others\\ \vspace{2ex} Major contributors (alphabetic order):\\ Hans-Bernhard Bröker, John Campbell,\\ Robert Cunningham, David Denholm,\\ Gershon Elber, Roger Fearick,\\ Carsten Grammes, Lucas Hart, \\ Lars Hecking, Péter Juhász, \\ Thomas Koenig, David Kotz,\\ Ed Kubaitis, Russell Lang,\\ Timothée Lecomte, Alexander Lehmann,\\ Alexander Mai, Bastian Märkisch, \\ Ethan A Merritt, Petr Mikulík,\\ Carsten Steger, Shigeharu Takeno,\\ Tom Tkacik, Jos Van der Woude,\\ James R. Van Zandt, Alex Woo, Johannes Zellner\\ Copyright {\copyright} 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley\\ Copyright {\copyright} 2004 - 2012 various authors\\ \vspace{2ex} Mailing list for comments: \verb+gnuplot-info@lists.sourceforge.net+\\ Mailing list for bug reports: \verb+gnuplot-bugs@lists.sourceforge.net+\\ Web access (preferred): \verb+http://sourceforge.net/projects/gnuplot+ \vfill This manual was originally prepared by Dick Crawford. \\ \vspace{2ex} % 14 February 2012 Version 4.6 2013 Version 4.6.4 \end{center} \newpage \hypertarget{TableOfContents}{} \tableofcontents \newpage ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/pdffigures.tex�������������������������������������������������������������������0000644�0004711�0000144�00000000001�12223340017�013722� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/titlepag.ipf���������������������������������������������������������������������0000644�0004711�0000144�00000001615�11626741057�013406� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������:lines align=center. :hp2.GNUPLOT:ehp2. An Interactive Plotting Program Thomas Williams &. Colin Kelley Version 4.4 organized by: Hans-Bernhard Broeker, Ethan A Merritt, and others Copyright (C) 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley Copyright (C) 2004 - 2011 various authors Mailing list for comments: gnuplot-info@lists.sourceforge.net Mailing list for bug reports: gnuplot-bugs@lists.sourceforge.net :p. Major contributors (alphabetic order): Hans-Bernhard Broeker John Campbell Robert Cunningham David Denholm Gershon Elber Roger Fearick Carsten Grammes Lucas Hart Lars Hecking Thomas Koenig David Kotz Ed Kubaitis Russell Lang Alexander Lehmann Alexander Mai Ethan Merritt Petr Mikulik Carsten Steger Tom Tkacik Jos Van der Woude Alex Woo James R. Van Zandt Johannes Zellner :elines. �������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/plotstyles.gnu�������������������������������������������������������������������0000644�0004711�0000144�00000026736�12215647347�014047� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Generate a set of figures to illustrate the various plot styles # EAM - July 2007 # # if (strstrt(GPVAL_TERMINALS, " windows ") == 0) { fontspec = "Times,12" } else { fontspec = "Times New Roman,12" } if (!exists("winhelp")) winhelp = 0 if (winhelp == 0) { set term pdfcairo mono font fontspec size 3.5,2.0 dashlength 0.2 out = "./" } else { # prefer pngcairo over gd based png if (strstrt(GPVAL_TERMINALS, " pngcairo ") > 0) { set term pngcairo font fontspec size 448,225 dashlength 0.2 } else { set term png font fontspec size 448,225 dashlength 0.2 } out = "./windows/" } demo = "../demo/" if (GPVAL_TERM eq "pngcairo" || GPVAL_TERM eq "png") ext=".png" if (GPVAL_TERM eq "pdfcairo" || GPVAL_TERM eq "pdf") ext=".pdf" # # Line and point type plots (same data plotted) # ============================================== # set output out . 'figure_lines' . ext set xrange [270:370] unset xtics unset ytics set offset 10,10,4,2 set xzeroaxis set lmargin screen 0.05 set rmargin screen 0.95 set bmargin screen 0.05 set tmargin screen 0.95 plot demo . 'silver.dat' u 1:($2-10.) title 'with lines' with lines # set output out . 'figure_points' . ext plot demo . 'silver.dat' u 1:($2-10.):(1+rand(0)) title 'with points ps variable' \ with points ps variable pt 6 # set output out . 'figure_linespoints' . ext f(x) = 8 + 8*sin(x/20) plot demo . 'silver.dat' u 1:($2-10.) title 'with linespoints' \ with linespoints pt 6 ps 1, \ '' u 1:($2) title 'pointinterval -2' with lp pt 4 ps 1 pi -2 # set output out . 'figure_fsteps' . ext plot demo . 'silver.dat' u 1:($2-10.) title 'with fsteps' with fsteps # set output out . 'figure_steps' . ext set style fill solid 0.25 noborder plot demo . 'silver.dat' u 1:($2-10.) title 'with fillsteps' with fillsteps, \ '' u 1:($2-10.) title 'with steps' with steps lw 4 # set output out . 'figure_histeps' . ext plot demo . 'silver.dat' u 1:($2-10.) title 'with histeps' with histeps # # Simple bar charts (same data plotted) # ====================================== # set output out . 'figure_boxes' . ext set xzeroaxis set boxwidth 0.8 relative plot demo . 'silver.dat' u 1:($2-10.) with boxes title 'with boxes' fs solid 0.5 # set output out . 'figure_boxerrorbars' . ext set boxwidth 0.8 relative plot demo . 'silver.dat' u 1:($2-10.):(3*rand(0)) with boxerrorbars title 'with boxerrorbars' fs empty # set output out . 'figure_impulses' . ext set bmargin at screen .2 plot demo . 'silver.dat' u 1:($2-10.) with impulses title 'with impulses' set bmargin at screen .05 # # Error bars and whisker plots # ============================ # set xrange [0:11] set yrange [0:10] set boxwidth 0.2 unset xzeroaxis unset offset # set output out . 'figure_candlesticks' . ext plot demo . 'candlesticks.dat' using 1:3:2:6:5 title 'with candlesticks' with candlesticks whiskerbar fs empty # set output out . 'figure_financebars' . ext set bars 4 plot demo . 'candlesticks.dat' using 1:3:2:6:5 title 'with financebars' with financebars set bars 1 # set output out . 'figure_yerrorbars' . ext plot demo . 'candlesticks.dat' using 1:4:3:5 with yerrorbars title 'with yerrorbars' # set output out . 'figure_yerrorlines' . ext plot demo . 'candlesticks.dat' using 1:4:3:5 with yerrorlines title 'with yerrorlines' # set output out . 'figure_boxxyerrorbars' . ext plot demo . 'candlesticks.dat' using 1:4:($1-sin($1)/2.):($1+sin($1)/2.):3:5 \ with boxxyerrorbars title 'with boxxyerrorbars' fs empty # set output out . 'figure_xyerrorbars' . ext plot demo . 'candlesticks.dat' using 1:4:($1-sin($1)/2.):($1+sin($1)/2.):3:5 \ with xyerrorbars title 'with xyerrorbars' # set output out . 'figure_xyerrorlines' . ext plot demo . 'candlesticks.dat' using 1:4:($1-sin($1)/2.):($1+sin($1)/2.):3:5 \ with xyerrorlines title 'with xyerrorlines' # set output out . 'figure_xerrorbars' . ext plot demo . 'candlesticks.dat' using 1:4:($1-sin($1)/2.):($1+sin($1)/2.) \ with xerrorbars title 'with xerrorbars' # set output out . 'figure_xerrorlines' . ext plot demo . 'candlesticks.dat' using 1:4:($1-sin($1)/2.):($1+sin($1)/2.) \ with xerrorlines title 'with xerrorlines' # # Filled curves # ============= # set output out . 'figure_filledcurves' . ext set style fill solid 1.0 border -1 set xrange [250:500] set auto y set key box title "with filledcurves" plot demo . 'silver.dat' u 1:2:($3+$1/50.) w filledcurves above title 'above' lc rgb "grey10", \ '' u 1:2:($3+$1/50.) w filledcurves below title 'below' lc rgb "grey75", \ '' u 1:2 w lines lt -1 lw 1 title 'curve 1', \ '' u 1:($3+$1/50.) w lines lt -1 lw 3 title 'curve 2' # # Boxplot # ======= # set output out . 'figure_boxplot' . ext reset set style fill solid 0.25 border -1 set yrange [-15:165] set xrange [0.5:2.0] set xtics ("A" 1, "B" 1.5) scale 0 set ytics nomirror set border 2 set lmargin at screen 0.3 unset key set style data boxplot plot demo . 'silver.dat' using (1):2:(.25) ps 0.3, \ '' using (1.5):(5*$3):(.25) ps 0.3 # # Dots # ==== # set output out . 'figure_dots' . ext reset set parametric set samples 500 set isosamples 2,2 # Smallest possible set view map set lmargin screen 0.05 set rmargin screen 0.95 set tmargin screen 0.95 set bmargin screen 0.05 unset xtics unset ytics set xrange [-3:3] set yrange [-4:4] splot invnorm(rand(0)),invnorm(rand(0)),invnorm(rand(0)) with dots notitle # # Histograms # ========== # reset set style data histogram set boxwidth 0.9 rel set key auto column invert set yrange [0:*] set offset 0,0,2,0 unset xtics set tmargin 1 # set output out . 'figure_histclust' . ext set style histogram clustered plot demo . 'histopt.dat' using 1 fs solid 0.5, '' using 2 fs empty # set output out . 'figure_histerrorbar' . ext set title "Histogram with error bars" offset 0,-1 set style fill solid border -1 set style histogram errorbars lw 2 plot demo . 'histerror.dat' using 2:3 fs solid 0.5 ti 'A', '' using 4:5 fs empty ti 'B' # set output out . 'figure_histrows' . ext set style histogram rows set title "Rowstacked" offset 0,-1 plot demo . 'histopt.dat' using 1 fs solid 0.5, '' using 2 fs empty # set output out . 'figure_newhist' . ext set style histogram cluster set style data histogram unset title set key auto column noinvert set xtics 1 offset character 0,0.3 plot newhistogram "Set A", \ demo . 'histopt.dat' u 1 t col, '' u 2 t col fs empty, \ newhistogram "Set B" at 8, \ demo . 'histopt.dat' u 1 t col, '' u 2 t col fs empty # set output out . 'figure_histcols' . ext set style histogram columns set title "Columnstacked" offset 0,-1 set boxwidth 0.8 rel set xtics set style line 1 lt rgb "gray0" set style line 2 lt rgb "white" set style line 3 lt rgb "gray40" set style line 4 lt rgb "gray70" set style increment user set style fill solid 1.0 border -1 plot demo . 'histopt.dat' using 1 ti col lt 1, '' using 2 ti col fs solid lt 1 set style increment default # # Circles # reset set output out . 'figure_circles' . ext #set title "Circles of Uncertainty" unset key set size ratio -1 set xrange [-2.5:1.5] set yrange [-1:2.5] set xtics font "Times,10" format "%.1f" scale 0.5 set ytics font "Times,10" format "%.1f" scale 0.5 plot demo . 'optimize.dat' with circles lc rgb "gray" fs transparent solid 0.2 nobo,\ demo . 'optimize.dat' u 1:2 with linespoints lw 2 pt 7 ps 0.3 lc rgb "black" # # Ellipses # reset set output out . 'figure_ellipses' . ext unset xtics; unset ytics plot demo . 'ellipses.dat' u 1:2:3:4:5 with ellipses units xy title "with ellipses",\ '' u 1:2:3:4:5 with ellipses units xx notitle,\ '' u 1:2:3:4:5 with ellipses units yy notitle # # 2D heat map from an array of in-line data # reset set output out . 'figure_heatmap' . ext set title "2D Heat map from in-line array of values" offset 0,-1 unset key set bmargin 1 set tmargin 3 set tics scale 0 unset cbtics unset xtics set xrange [-0.5:4.5] set x2range [-0.5:4.5] set yrange [-0.5:3.5] reverse set x2tics 0,1 set ytics 0,1 set palette rgbformula -3,-3,-3 plot '-' matrix with image 5 4 3 1 0 2 2 0 0 1 0 0 0 1 0 0 1 2 4 3 e e # # 3D Plot styles # ============== # reset set view 75, 33, 1.0, 0.82 set bmargin screen 0.40 unset key set samples 20, 20 set isosamples 21, 21 set xlabel "X axis" rotate parallel offset 0,-1 set ylabel "Y axis" rotate parallel offset 0,-1 set zlabel "Z axis" set zlabel offset 2,0 rotate by -90 unset xtics unset ytics unset ztics set border lw 2.0 set xrange [-3:3] set yrange [-3:3] set zrange [-1.5:1] set hidden3d offset 1 set title "3D surface plot with hidden line removal" offset 0,1 set output out . 'figure_surface' . ext splot sin(x) * cos(y) with lines lt -1 set contour base set cntrparam levels auto 9 unset key set title "3D surface with projected contours" set output out . 'figure_surface+contours' . ext splot sin(x) * cos(y) with lines lt -1 unset view set view map unset surface unset grid set bmargin screen 0.15 set xlabel "X axis" offset 0,2 set tmargin set rmargin set lmargin set title "projected contours using 'set view map'" offset 0,-1 set output out . 'figure_mapcontours' . ext splot sin(x) * cos(y) reset set output out . 'figure_rgb3D' . ext set title "RGB image mapped onto a plane in 3D" offset 0,1 set xrange [ -10 : 137 ] set yrange [ -10 : 137 ] set zrange [ -1 : 1 ] set xyplane at -1 set bmargin at screen 0.25 set xtics offset 0,0 font "Times,10" set ytics offset 0,0 font "Times,10" set view 45, 25, 1.0, 1.35 set grid unset key set format z "%.1f" splot demo . 'blutux.rgb' binary array=128x128 flip=y format='%uchar%uchar%uchar' with rgbimage reset set output out . 'figure_scaled_image' . ext set title "Rescaled image used as plot element" set xrange [ -10 : 150 ] set yrange [ 0 : 200 ] set y2range[ 0 : 200 ] set y2tics set grid y set key title "Building Heights\nby Neighborhood" set key box set xtics ("NE" 72.0, "S" 42.0, "Downtown" 12.0, "Suburbs" 122.0) scale 0.0 plot demo . 'bldg.png' binary filetype=png origin=(0,0) dx=0.5 dy=1.5 with rgbimage notitle, \ demo . 'bldg.png' binary filetype=png origin=(60,0) dx=0.5 dy=1 with rgbimage notitle, \ demo . 'bldg.png' binary filetype=png origin=(30,0) dx=0.5 dy=0.7 with rgbimage notitle, \ demo . 'bldg.png' binary filetype=png origin=(110,0) dx=0.5 dy=0.35 with rgbimage notitle # # # Demonstrates how to pull font size from a data file column # reset Scale(size) = 0.25*sqrt(sqrt(column(size))) CityName(String,Size) = sprintf("{/=%d %s}", Scale(Size), stringcolumn(String)) set termoption enhanced set output out . 'figure_labels' . ext unset xtics unset ytics unset key set border 0 set size square set datafile separator "\t" plot demo . 'cities.dat' using 5:4:($3 < 5000 ? "-" : CityName(1,3)) with labels # reset set output out . 'figure_polar' . ext unset border set style fill solid 0.50 border set grid polar 0.523599 lt 0 lw 1 set key title "bounding radius 2.5" set key at screen 0.95, screen 0.95 set key noinvert samplen 0.7 set polar set size ratio 1 1,1 set noxtics set noytics set rrange [ 0.100000 : 4.00000 ] butterfly(x)=exp(cos(x))-2*cos(4*x)+sin(x/12)**5 GPFUN_butterfly = "butterfly(x)=exp(cos(x))-2*cos(4*x)+sin(x/12)**5" plot 3.+sin(t)*cos(5*t) with filledcurve above r=2.5 notitle, \ 3.+sin(t)*cos(5*t) with line reset # # New syntax features # set output out . 'figure_newsyntax' . ext unset xtics unset ytics unset border set yrange [-0.3:1.3] set multiplot layout 2,2 fourier(k, x) = sin(3./2*k)/k * 2./3*cos(k*x) do for [power = 0:3] { TERMS = 10**power set xlabel sprintf("%g term Fourier series",TERMS) plot 0.5 + sum [k=1:TERMS] fourier(k,x) notitle } unset multiplot # close last file unset outp reset ����������������������������������gnuplot-4.6.4/docs/gnuplot.texi���������������������������������������������������������������������0000644�0004711�0000144�00002675436�12223337762�013502� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������\input texinfo @c -*-texinfo-*- @c %**start of header @setfilename gnuplot.info @settitle Gnuplot: An Interactive Plotting Program @setchapternewpage odd @c %**end of header @c define the command and options indeces @defindex cm @defindex op @defindex tm @dircategory Math @direntry * GNUPLOT: (gnuplot). An Interactive Plotting Program @end direntry @ifnottex @node Top, gnuplot, (dir), (dir) @top Master Menu @end ifnottex @example GNUPLOT An Interactive Plotting Program Thomas Williams & Colin Kelley Version 4.6 organized by: Hans-Bernhard Broeker, Ethan A Merritt, and others Copyright (C) 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley Copyright (C) 2004 - 2011 various authors Mailing list for comments: gnuplot-info@@lists.sourceforge.net Mailing list for bug reports: gnuplot-bugs@@lists.sourceforge.net This manual was originally prepared by Dick Crawford Version 4.6 - December 2011 Major contributors (alphabetic order): @end example @menu * gnuplot:: * plotting_styles:: * Commands:: * Terminal_types:: * Bugs:: * Concept_Index:: * Command_Index:: * Options_Index:: * Function_Index:: * Terminal_Index:: @end menu @node gnuplot, plotting_styles, Top, Top @chapter gnuplot @cindex gnuplot @c ^<h2 align="center"> An Interactive Plotting Program </h2> @c ^<p align="center"> Thomas Williams & Colin Kelley</p> @c ^<p align="center"> Version 4.6 organized by Ethan A Merritt and others</p> @c ^<p align="center">Major contributors (alphabetic order):<br> @c ^<br> @c ^ Hans-Bernhard Broeker, John Campbell,<br> @c ^ Robert Cunningham, David Denholm,<br> @c ^ Gershon Elber, Roger Fearick,<br> @c ^ Carsten Grammes, Lucas Hart,<br> @c ^ Lars Hecking, Péter Juhász,<br> @c ^ Thomas Koenig, David Kotz,<br> @c ^ Ed Kubaitis, Russell Lang,<br> @c ^ Timothée Lecomte, Alexander Lehmann,<br> @c ^ Alexander Mai, Bastian Märkisch,<br> @c ^ Ethan A Merritt, Petr Mikulík,<br> @c ^ Carsten Steger, Shigeharu Takeno,<br> @c ^ Tom Tkacik, Jos Van der Woude,<br> @c ^ James R. Van Zandt, Alex Woo, Johannes Zellner<br> @c ^</p> @c ^<p align="center"> Copyright (C) 1986 - 1993, 1998 - 2004 Thomas Williams, Colin Kelley<br> @c ^ Copyright (C) 2004 - 2011 various authors</p> @c ^<p align="center"> Mailing list for comments: <tt>gnuplot-info@@lists.sourceforge.net</tt><br> @c ^ Mailing list for bug reports: <tt>gnuplot-bugs@@lists.sourceforge.net</tt><br> @c ^ Web access (preferred): <tt>http://sourceforge.net/projects/gnuplot</tt></p> @c ^<p align="center"> This manual was originally prepared by Dick Crawford</p> @menu * Copyright:: * Introduction:: * Seeking-assistance:: * New_features:: * Backwards_compatibility:: * Batch/Interactive_Operation:: * Canvas_size:: * Command-line-editing:: * Comments:: * Coordinates:: * Datastrings:: * Enhanced_text_mode:: * Environment:: * Expressions:: * Fonts:: * Glossary:: * linetypes:: * mouse_input:: * Plotting:: * Start-up_(initialization):: * String_constants_and_string_variables:: * Substitution_and_Command_line_macros:: * Syntax:: * Time/Date_data:: @end menu @node Copyright, Introduction, gnuplot, gnuplot @section Copyright @cindex copyright @cindex license @example Copyright (C) 1986 - 1993, 1998, 2004, 2007 Thomas Williams, Colin Kelley @end example Permission to use, copy, and distribute this software and its documentation for any purpose with or without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Permission to modify the software is granted, but not the right to distribute the complete modified source code. Modifications are to be distributed as patches to the released version. Permission to distribute binaries produced by compiling modified sources is granted, provided you @example 1. distribute the corresponding source modifications from the released version in the form of a patch file along with the binaries, 2. add special version identification to distinguish your version in addition to the base release version number, 3. provide your name and address as the primary contact for the support of your modified version, and 4. retain our contact information in regard to use of the base software. @end example Permission to distribute the released version of the source code along with corresponding source modifications in the form of a patch file is granted with same provisions 2 through 4 for binary distributions. This software is provided "as is" without express or implied warranty to the extent permitted by applicable law. @example AUTHORS @end example @example Original Software: Thomas Williams, Colin Kelley. @end example @example Gnuplot 2.0 additions: Russell Lang, Dave Kotz, John Campbell. @end example @example Gnuplot 3.0 additions: Gershon Elber and many others. @end example @example Gnuplot 4.0 additions: See list of contributors at head of this document. @end example @node Introduction, Seeking-assistance, Copyright, gnuplot @section Introduction @cindex introduction @c ? `Gnuplot` is a portable command-line driven graphing utility for Linux, OS/2, MS Windows, OSX, VMS, and many other platforms. The source code is copyrighted but freely distributed (i.e., you don't have to pay for it). It was originally created to allow scientists and students to visualize mathematical functions and data interactively, but has grown to support many non-interactive uses such as web scripting. It is also used as a plotting engine by third-party applications like Octave. Gnuplot has been supported and under active development since 1986. Gnuplot supports many types of plots in either 2D and 3D. It can draw using lines, points, boxes, contours, vector fields, surfaces, and various associated text. It also supports various specialized plot types. Gnuplot supports many different types of output: interactive screen terminals (with mouse and hotkey input), direct output to pen plotters or modern printers, and output to many file formats (eps, emf, fig, jpeg, LaTeX, pdf, png, postscript, ...). Gnuplot is easily extensible to include new output modes. Recent additions include interactive terminals based on wxWidgets (usable on multiple platforms), and Qt. Mouseable plots embedded in web pages can be generated using the svg or HTML5 canvas terminal drivers. The command language of `gnuplot` is case sensitive, i.e. commands and function names written in lowercase are not the same as those written in capitals. All command names may be abbreviated as long as the abbreviation is not ambiguous. Any number of commands may appear on a line, separated by semicolons (;). Strings may be set off by either single or double quotes, although there are some subtle differences. See `syntax` and `quotes` for more details. Examples: @example load "filename" cd 'dir' @end example Commands may extend over several input lines by ending each line but the last with a backslash (\). The backslash must be the _last_ character on each line. The effect is as if the backslash and newline were not there. That is, no white space is implied, nor is a comment terminated. Therefore, commenting out a continued line comments out the entire command (see `comments`). But note that if an error occurs somewhere on a multi-line command, the parser may not be able to locate precisely where the error is and in that case will not necessarily point to the correct line. In this document, curly braces (@{@}) denote optional arguments and a vertical bar (|) separates mutually exclusive choices. `Gnuplot` keywords or @ref{help} topics are indicated by backquotes or `boldface` (where available). Angle brackets (<>) are used to mark replaceable tokens. In many cases, a default value of the token will be taken for optional arguments if the token is omitted, but these cases are not always denoted with braces around the angle brackets. For built-in help on any topic, type @ref{help} followed by the name of the topic or `help ?` to get a menu of available topics. The new `gnuplot` user should begin by reading about `plotting` (if in an interactive session, type `help plotting`). See the simple.dem demo, also available together with other demos on the web page @uref{http://www.gnuplot.info/demo/,http://www.gnuplot.info/demo/ } `Gnuplot` can be started from a command line or from an icon according to the desktop environment. Running it from command line can take the syntax @example gnuplot @{OPTIONS@} file1 file2 ... @end example where file1, file2, etc. are input file as in the `load` command. On X11-based systems, you can use @example gnuplot @{X11OPTIONS@} @{OPTIONS@} file1 file2 ... @end example see your X11 documentation and `x11` in this document. Options interpreted by gnuplot may come anywhere on the line. Files are executed in the order specified, as are commands supplied by the -e option, for example @example gnuplot file1.in -e "reset" file2.in @end example The special filename "-" is used to force reading from stdin. `Gnuplot` exits after the last file is processed. If no load files are named, `Gnuplot` takes interactive input from stdin. See help `batch/interactive` for more details. The options specific to gnuplot can be listed by typing @example gnuplot --help @end example See `command line options` for more details. In sessions with an interactive plot window you can hit 'h' anywhere on the plot for help about `hotkeys` and `mousing` features. Section `seeking-assistance` will help you to find further information, help and FAQ. @node Seeking-assistance, New_features, Introduction, gnuplot @section Seeking-assistance @cindex help-desk @cindex seeking-assistance @cindex faq @cindex FAQ The canonical gnuplot web page can be found at @uref{http://www.gnuplot.info,http://www.gnuplot.info } Before seeking help, please check file FAQ.pdf or the above website for @uref{http://www.gnuplot.info/faq/,FAQ (Frequently Asked Questions) list. } If you need help as a gnuplot user, please use the newsgroup @example comp.graphics.apps.gnuplot @end example We prefer that you read the messages through the newsgroup rather than subscribing to the mailing list which is also available and carries the same set of messages. Instructions for subscribing to gnuplot mailing lists may be found via the gnuplot development website on SourceForge @uref{http://sourceforge.net/projects/gnuplot,http://sourceforge.net/projects/gnuplot } The address for mailing to list members is: @example gnuplot-info@@lists.sourceforge.net @end example Bug reports and code contributions should be uploaded to the trackers at @example http://sourceforge.net/projects/gnuplot/support @end example Please check previous bug reports if the bug you want to report has not been already fixed in a newer version of gnuplot. A mailing list for those interested in development version of gnuplot is: @example gnuplot-beta@@lists.sourceforge.net @end example When posting a question, please include full details of the gnuplot version, the terminal type, and the operating system you are using. A _small_ script demonstrating the problem may be useful. Function plots are preferable to datafile plots. @node New_features, Backwards_compatibility, Seeking-assistance, gnuplot @section New features @cindex new-features This section lists major additions since version 4.4. For a more exhaustive list, see the NEWS file. @menu * New_syntax:: * Local_customization_of_linetypes:: * New_plot_styles:: * Revised_polar_axes:: * New_smoothing_algorithms:: * New_time/date_handling:: * Statistical_summary_of_data:: * New_or_revised_terminal_drivers:: @end menu @node New_syntax, Local_customization_of_linetypes, New_features, New_features @subsection New syntax This version of gnuplot introduces command iteration and block-structured if/else/while/do constructs. See `if`, `while`, and `do`. Simple iteration is possible inside `plot` or `set` commands. See @ref{iteration}. General iteration spanning multiple commands is possible using a block construct as shown below. For a related new feature, see the `summation` expression type. Here is an example using several of these new syntax features: @example set multiplot layout 2,2 fourier(k, x) = sin(3./2*k)/k * 2./3*cos(k*x) do for [power = 0:3] @{ TERMS = 10**power set title sprintf("%g term Fourier series",TERMS) plot 0.5 + sum [k=1:TERMS] fourier(k,x) notitle @} unset multiplot @end example It is now possible to select a column of data from a data file by matching a label in the first row of the file. See @ref{columnhead}. For example @example plot for [crop in "Oats Peas Beans"] 'data' using "Year":crop @end example @node Local_customization_of_linetypes, New_plot_styles, New_syntax, New_features @subsection Local customization of linetypes You can now customize properties (color, linewidth, point type) of the default sequence of linetypes used in plotting. See `set linetype`. This is normally done in an initialization file, either the system-wide file `gnuplotrc` or a private file `~/.gnuplot`. See `initialization`. Most terminals now allow you to set an explicit background color for the plot. The special linetype `bgnd` can be used to draw in this color. See `bgnd`. @node New_plot_styles, Revised_polar_axes, Local_customization_of_linetypes, New_features @subsection New plot styles See documentation for plot styles @ref{boxplot}, @ref{circles}, @ref{ellipses}, and @ref{fillsteps}. @node Revised_polar_axes, New_smoothing_algorithms, New_plot_styles, New_features @subsection Revised polar axes Polar plot mode has been reworked to support additional plot styles. The polar axes can now be drawn and labeled independent of the x and y axes. See `set polar` and @ref{rrange}. @node New_smoothing_algorithms, New_time/date_handling, Revised_polar_axes, New_features @subsection New smoothing algorithms @cindex kdensity @cindex cumulative New smoothing algorithms have been added for both 2- and 3-dimensional plots. `smooth kdensity` and `smooth cumulative` can be used with `plot` to draw smooth histograms and cumulative distribution functions. Several new smoothing kernels have been added to @ref{dgrid3d} for use with `splot`. See @ref{smooth} @ref{dgrid3d}. @node New_time/date_handling, Statistical_summary_of_data, New_smoothing_algorithms, New_features @subsection New time/date handling @cindex time @findex time Gnuplot now tracks time to millisecond precision. Time formats have been modified to match this. The new built-in function time() returns the current time of day according to the system clock. Example: print the current time to msec precision @example print strftime("%H:%M:%.3S %d-%b-%Y",time(0.0)) 18:15:04.253 16-Apr-2011 @end example @node Statistical_summary_of_data, New_or_revised_terminal_drivers, New_time/date_handling, New_features @subsection Statistical summary of data The new `stats` command reads data from a file using the same syntax as the `plot` or `splot` commands. Rather than drawing a graph, it prints out a statistical summary of the data contained in the column[s] requested. The resulting statistics min, max, mean, standard deviation, correlation, etc. are also stored in named variables that can be used to compose or modify subsequent plotting commands. See `stats`. @node New_or_revised_terminal_drivers, , Statistical_summary_of_data, New_features @subsection New or revised terminal drivers The `qt` driver implements an interactive terminal on top of the Qt graphics layer. It can function either as a window in a full-featured desktop enviroment or as a full-screen application on a Qt-based embedded device. The `qt` terminal is new and may still have some rough edges. Two terminal types support web-based interactive display. The HTML5 `canvas` terminal was introduced in version 4.4. The `svg` terminal has been extensively revised to include support for mousing and better incorporation of svg plots from gnuplot into larger svg/xml documents. The `canvas` terminal driver produces javascript output that draws onto the HTML canvas element of a web page. It can produce either a complete web page containing a single plot, or a script that can be embedded as part of an externally generated HTML document that perhaps contains multiple plots. The embedded plots support browser-side mousing, including zoom/unzoom. The `lua` terminal driver creates data intended to be further processed by a script in the lua programming language. At this point only one such lua script, gnuplot-tikz.lua, is available. It produces a TeX document suitable for use with the latex TikZ package. Other lua scripts could be written to process the gnuplot output for use with other TeX packages, or with other non-TeX tools. `set term tikz` is shorthand for `set term lua tikz`. As decribed above, it uses the generic lua terminal and an external lua script to produce a latex document. The `context` terminal driver creates output to be further processed by the ConTeXt TeX macro package. To process its output, you additionally require the gnuplot module for ConTeXt available at @uref{http://ctan.org/pkg/context-gnuplot,http://ctan.org/pkg/context-gnuplot } The `epscairo` terminal uses the cairo and pango libraries to create encapsulated postscript (eps) ouput. It is an alternative to the `postscript` terminal driver for those who would like to have their eps files look equal to e.g. screen output by the `wxt` terminal. The `cairolatex` terminal uses the cairo backend of the `pdfcairo` or `epscairo` terminal to produce graphs for inclusion in LaTeX documents. It creates pdf or eps graphics but transfers texts to LaTeX in the same way as the `epslatex` terminal. The `windows` terminal driver has been revised to suport transparency, antialiasing, buffered output, multiple graph windows and copying to clipboard and saving of graphs as emf files. It has many new options and a revised user interface. Additionaly, the code of the text console has been largely rewritten to support wrapping of long lines. Help is now provided via HTML. @node Backwards_compatibility, Batch/Interactive_Operation, New_features, gnuplot @section Backwards compatibility @c ?backwards compatibility @cindex compatibility Gnuplot version 4.0 deprecated certain syntax used in earlier versions, but continued to recognize it. This is now under the control of a configuration option, and can be enabled as follows: @example ./configure --enable-backwards-compatibility @end example Notice: Deprecated syntax items may be removed entirely in some future version of gnuplot. One major difference is the introduction of keywords to disambiguate complex commands, particularly commands containing string variables. A notable issue was the use of bare numbers to specify offsets, line and point types. Illustrative examples: Deprecated: @example set title "Old" 0,-1 set data linespoints plot 1 2 4 # horizontal line at y=1 @end example New: @example TITLE = "New" set title TITLE offset char 0, char -1 set style data linespoints plot 1 linetype 2 pointtype 4 @end example @node Batch/Interactive_Operation, Canvas_size, Backwards_compatibility, gnuplot @section Batch/Interactive Operation @cindex batch/interactive @c ?command line options `Gnuplot` may be executed in either batch or interactive modes, and the two may even be mixed together on many systems. Any command-line arguments are assumed to be either program options (first character is -) or names of files containing `gnuplot` commands. The option -e "command" may be used to force execution of a gnuplot command. Each file or command string will be executed in the order specified. The special filename "-" is indicates that commands are to be read from stdin. `Gnuplot` exits after the last file is processed. If no load files and no command strings are specified, `gnuplot` accepts interactive input from stdin. Both the @ref{exit} and @ref{quit} commands terminate the current command file and `load` the next one, until all have been processed. Examples: To launch an interactive session: @example gnuplot @end example To launch a batch session using two command files "input1" and "input2": @example gnuplot input1 input2 @end example To launch an interactive session after an initialization file "header" and followed by another command file "trailer": @example gnuplot header - trailer @end example To give `gnuplot` commands directly in the command line, using the "-persist" option so that the plot remains on the screen afterwards: @example gnuplot -persist -e "set title 'Sine curve'; plot sin(x)" @end example To set user-defined variables a and s prior to executing commands from a file: @example gnuplot -e "a=2; s='file.png'" input.gpl @end example @node Canvas_size, Command-line-editing, Batch/Interactive_Operation, gnuplot @section Canvas size @c ?canvas size @cindex canvas @c ?set term size In earlier versions of gnuplot, some terminal types used the values from @ref{size} to control also the size of the output canvas; others did not. The use of 'set size' for this purpose was deprecated in version 4.2. Since version 4.4 almost all terminals now behave as follows: `set term <terminal_type> size <XX>, <YY>` controls the size of the output file, or "canvas". Please see individual terminal documentation for allowed values of the size parameters. By default, the plot will fill this canvas. `set size <XX>, <YY>` scales the plot itself relative to the size of the canvas. Scale values less than 1 will cause the plot to not fill the entire canvas. Scale values larger than 1 will cause only a portion of the plot to fit on the canvas. Please be aware that setting scale values larger than 1 may cause problems on some terminal types. The major exception to this convention is the PostScript driver, which by default continues to act as it has in earlier versions. Be warned that the next version of gnuplot may change the default behaviour of the PostScript driver as well. Example: @example set size 0.5, 0.5 set term png size 600, 400 set output "figure.png" plot "data" with lines @end example These commands will produce an output file "figure.png" that is 600 pixels wide and 400 pixels tall. The plot will fill the lower left quarter of this canvas. This is consistent with the way multiplot mode has always worked. @node Command-line-editing, Comments, Canvas_size, gnuplot @section Command-line-editing @cindex line-editing @cindex editing @cindex command-line-editing Command-line editing and command history are supported using either an external gnu readline library, an external BSD libedit library, or a built-in equivalent. This choice is a configuration option at the time gnuplot is built. The editing commands of the built-in version are given below. Please note that the action of the DEL key is system-dependent. The gnu readline and BSD libedit libraries have their own documentation. @example `Line-editing`: @end example @example ^B moves back a single character. ^F moves forward a single character. ^A moves to the beginning of the line. ^E moves to the end of the line. ^H deletes the previous character. DEL deletes the current character. ^D deletes current character, sends EOF if the line is empty. ^K deletes from current position to the end of line. ^L,^R redraws line in case it gets trashed. ^U deletes the entire line. ^W deletes previous word. @end example @example `History`: @end example @example ^P moves back through history. ^N moves forward through history. @end example @c ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> @c ^<colgroup> @c ^ <col align="center"> @c ^ <col align="left"> @c ^</colgroup> @c ^<thead> @c ^<tr> <th>Character</th> <th>Function</th></tr> @c ^</thead> @c ^<tbody> @c ^<tr> <td></td> <th>Line Editing</th></tr> @c ^<tr> <td><tt>^B</tt></td> <td>move back a single character.</td></tr> @c ^<tr> <td><tt>^F</tt></td> <td>move forward a single character.</td></tr> @c ^<tr> <td><tt>^A</tt></td> <td>move to the beginning of the line.</td></tr> @c ^<tr> <td><tt>^E</tt></td> <td>move to the end of the line.</td></tr> @c ^<tr> <td><tt>^H</tt></td> <td>delete the previous character.</td></tr> @c ^<tr> <td><tt>DEL</tt></td> <td>delete the current character.</td></tr> @c ^<tr> <td><tt>^D</tt></td> <td>delete current character. EOF if line is empty</td></tr> @c ^<tr> <td><tt>^K</tt></td> <td>delete from current position to the end of line.</td></tr> @c ^<tr> <td><tt>^L, ^R</tt></td> <td>redraw line in case it gets trashed.</td></tr> @c ^<tr> <td><tt>^U</tt></td> <td>delete the entire line.</td></tr> @c ^<tr> <td><tt>^W</tt></td> <td>delete previous word.</td></tr> @c ^</tbody> @c ^<tbody> @c ^<tr> <th></th> <th>History</th></tr> @c ^<tr> <td><tt>^P</tt></td> <td>move back through history.</td></tr> @c ^<tr> <td><tt>^N</tt></td> <td>move forward through history.</td></tr> @c ^</tbody> @c ^</table> @node Comments, Coordinates, Command-line-editing, gnuplot @section Comments @cindex comments Comments are supported as follows: a `#` may appear in most places in a line and `gnuplot` will ignore the rest of the line. It will not have this effect inside quotes, inside numbers (including complex numbers), inside command substitutions, etc. In short, it works anywhere it makes sense to work. See also `set datafile commentschars` for specifying comment characters in data files. Note that if a comment line ends in '\' then the subsequent line is also treated as a comment. @node Coordinates, Datastrings, Comments, gnuplot @section Coordinates @cindex coordinates @cindex axes The commands @ref{arrow}, `set key`, `set label` and @ref{object} allow you to draw something at an arbitrary position on the graph. This position is specified by the syntax: @example @{<system>@} <x>, @{<system>@} <y> @{,@{<system>@} <z>@} @end example Each <system> can either be `first`, `second`, `graph`, `screen`, or `character`. `first` places the x, y, or z coordinate in the system defined by the left and bottom axes; `second` places it in the system defined by the second axes (top and right); `graph` specifies the area within the axes---0,0 is bottom left and 1,1 is top right (for splot, 0,0,0 is bottom left of plotting area; use negative z to get to the base---see @ref{xyplane}); `screen` specifies the screen area (the entire area---not just the portion selected by @ref{size}), with 0,0 at bottom left and 1,1 at top right; and `character` gives the position in character widths and heights from the bottom left of the screen area (screen 0,0), `character` coordinates depend on the chosen font size. If the coordinate system for x is not specified, `first` is used. If the system for y is not specified, the one used for x is adopted. In some cases, the given coordinate is not an absolute position but a relative value (e.g., the second position in @ref{arrow} ... `rto`). In most cases, the given value serves as difference to the first position. If the given coordinate resides in a logarithmic axis the value is interpreted as factor. For example, @example set logscale x set arrow 100,5 rto 10,2 @end example plots an arrow from position 100,5 to position 1000,7 since the x axis is logarithmic while the y axis is linear. If one (or more) axis is timeseries, the appropriate coordinate should be given as a quoted time string according to the @ref{timefmt} format string. See @ref{xdata} and @ref{timefmt}. `Gnuplot` will also accept an integer expression, which will be interpreted as seconds from 1 January 2000. @node Datastrings, Enhanced_text_mode, Coordinates, gnuplot @section Datastrings @cindex datastrings Data files may contain string data consisting of either an arbitrary string of printable characters containing no whitespace or an arbitrary string of characters, possibly including whitespace, delimited by double quotes. The following sample line from a datafile is interpreted to contain four columns, with a text field in column 3: @example 1.000 2.000 "Third column is all of this text" 4.00 @end example Text fields can be positioned within a 2-D or 3-D plot using the commands: @example plot 'datafile' using 1:2:4 with labels splot 'datafile' using 1:2:3:4 with labels @end example A column of text data can also be used to label the ticmarks along one or more of the plot axes. The example below plots a line through a series of points with (X,Y) coordinates taken from columns 3 and 4 of the input datafile. However, rather than generating regularly spaced tics along the x axis labeled numerically, gnuplot will position a tic mark along the x axis at the X coordinate of each point and label the tic mark with text taken from column 1 of the input datafile. @example set xtics plot 'datafile' using 3:4:xticlabels(1) with linespoints @end example @cindex columnheader There is also an option that will interpret the first entry in a column of input data (i.e. the column heading) as a text field, and use it as the key title for data plotted from that column. The example given below will use the first entry in column 2 to generate a title in the key box, while processing the remainder of columns 2 and 4 to draw the required line: @example plot 'datafile' using 1:(f($2)/$4) with lines title columnhead(2) @end example Another example: @example plot for [i=2:6] 'datafile' using i title "Results for ".columnhead(i) @end example See @ref{labels}, `using xticlabels`, @ref{title}, @ref{using}. @node Enhanced_text_mode, Environment, Datastrings, gnuplot @section Enhanced text mode @c ?enhanced text @cindex enhanced Many terminal types support an enhanced text mode in which additional formatting information is embedded in the text string. For example, "x^2" will write x-squared as we are used to seeing it, with a superscript 2. This mode is normally selected when you set the terminal, e.g. "set term png enhanced", but may also be toggled afterward using "set termoption enhanced", or by marking individual strings as in "set label 'x_2' noenhanced". @example Control Examples Explanation ^ a^x superscript _ a_x subscript @@ @@x or a@@^b_@{cd@} phantom box (occupies no width) & &@{space@} inserts space of specified length ~ ~a@{.8-@} overprints '-' on 'a', raised by .8 times the current fontsize @end example @c ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> @c ^<colgroup> @c ^ <col align="center"> @c ^ <col align="center"> @c ^ <col align="left"> @c ^</colgroup> @c ^<thead> @c ^<tr> <th>Control</th> <th>Examples</th> <th>Explanation</th></tr> @c ^</thead> @c ^<tbody> @c ^<tr> <td><tt> ^ </tt></td> <td><tt>a^x</tt></td> <td>superscript</td></tr> @c ^<tr> <td><tt> _ </tt></td> <td><tt>a_x</tt></td> <td>subscript</td></tr> @c ^<tr> <td><tt> @@ </tt></td> <td><tt> @@x</tt> or <tt>a@@^b_@{cd@}</tt></td> <td>phantom box (occupies no width)</td></tr> @c ^<tr> <td><tt> &</tt></td> <td><tt> &@{space@}</tt></td> <td>inserts space of specified length</td></tr> @c ^<tr> <td><tt> ~ </tt></td> <td><tt> ~a@{.8-@}</tt></td> <td>overprints '-' on 'a', raised by .8<br>times the current fontsize</td></tr> @c ^</tbody> @c ^</table> Braces can be used to place multiple-character text where a single character is expected (e.g., 2^@{10@}). To change the font and/or size, use the full form: @{/[fontname][=fontsize | *fontscale] text@}. Thus @{/Symbol=20 G@} is a 20 pt GAMMA and @{/*0.75 K@} is a K at three-quarters of whatever fontsize is currently in effect. (The '/' character MUST be the first character after the '@{'.) The phantom box is useful for a@@^b_c to align superscripts and subscripts but does not work well for overwriting an accent on a letter. For the latter, it is much better to use an encoding (e.g. iso_8859_1 or utf8) that contains a large variety of letters with accents or other diacritical marks. See @ref{encoding}. Since the box is non-spacing, it is sensible to put the shorter of the subscript or superscript in the box (that is, after the @@). Space equal in length to a string can be inserted using the '&' character. Thus @example 'abc&@{def@}ghi' @end example would produce @example 'abc ghi'. @end example The '~' character causes the next character or bracketed text to be overprinted by the following character or bracketed text. The second text will be horizontally centered on the first. Thus '~a/' will result in an 'a' with a slash through it. You can also shift the second text vertically by preceding the second text with a number, which will define the fraction of the current fontsize by which the text will be raised or lowered. In this case the number and text must be enclosed in brackets because more than one character is necessary. If the overprinted text begins with a number, put a space between the vertical offset and the text ('~@{abc@}@{.5 000@}'); otherwise no space is needed ('~@{abc@}@{.5---@}'). You can change the font for one or both strings ('~a@{.5 /*.2 o@}'---an 'a' with a one-fifth-size 'o' on top---and the space between the number and the slash is necessary), but you can't change it after the beginning of the string. Neither can you use any other special syntax within either string. You can, of course, use control characters by escaping them (see below), such as '~a@{\^@}' You can access special symbols numerically by specifying \character-code (in octal), e.g., @{/Symbol \245@} is the symbol for infinity. This does not work for multibyte encodings like UTF-8, however. In a UTF-8 environment, you should be able to enter multibyte sequences implicitly by typing or otherwise selecting the character you want. You can escape control characters using \, e.g., \\, \@{, and so on. But be aware that strings in double-quotes are parsed differently than those enclosed in single-quotes. The major difference is that backslashes may need to be doubled when in double-quoted strings. Examples (these are hard to describe in words---try them!): @example set xlabel 'Time (10^6 @{/Symbol m@}s)' set title '@{/Symbol=18 \\362@@_@{/=9.6 0@}^@{/=12 x@}@} \\ @{/Helvetica e^@{-@{/Symbol m@}^2/2@} d@}@{/Symbol m@}' @end example The file "ps_guide.ps" in the /docs/psdoc subdirectory of the gnuplot source distribution contains more examples of the enhanced syntax. @node Environment, Expressions, Enhanced_text_mode, gnuplot @section Environment @cindex environment A number of shell environment variables are understood by `gnuplot`. None of these are required, but may be useful. If GNUTERM is defined, it is used as the name of the terminal type to be used. This overrides any terminal type sensed by `gnuplot` on start-up, but is itself overridden by the .gnuplot (or equivalent) start-up file (see `startup`) and, of course, by later explicit changes. GNUHELP may be defined to be the pathname of the HELP file (gnuplot.gih). On VMS, the logical name GNUPLOT$HELP should be defined as the name of the help library for `gnuplot`. The `gnuplot` help can be put inside any system help library, allowing access to help from both within and outside `gnuplot` if desired. On Unix, HOME is used as the name of a directory to search for a .gnuplot file if none is found in the current directory. On MS-DOS, Windows and OS/2, GNUPLOT is used. On Windows, the NT-specific variable USERPROFILE is also tried. VMS, SYS$LOGIN: is used. Type `help startup`. On Unix, PAGER is used as an output filter for help messages. On Unix, SHELL is used for the @ref{shell} command. On MS-DOS and OS/2, COMSPEC is used for the @ref{shell} command. FIT_SCRIPT may be used to specify a `gnuplot` command to be executed when a fit is interrupted---see @ref{fit}. FIT_LOG specifies the default filename of the logfile maintained by fit. GNUPLOT_LIB may be used to define additional search directories for data and command files. The variable may contain a single directory name, or a list of directories separated by a platform-specific path separator, eg. ':' on Unix, or ';' on DOS/Windows/OS/2 platforms. The contents of GNUPLOT_LIB are appended to the @ref{loadpath} variable, but not saved with the @ref{save} and `save set` commands. Several gnuplot terminal drivers access TrueType fonts via the gd library. For these drivers the font search path is controlled by the environmental variable GDFONTPATH. Furthermore, a default font for these drivers may be set via the environmental variable GNUPLOT_DEFAULT_GDFONT. The postscript terminal uses its own font search path. It is controlled by the environmental variable GNUPLOT_FONTPATH. The format is the same as for GNUPLOT_LIB. The contents of GNUPLOT_FONTPATH are appended to the @ref{fontpath} variable, but not saved with the @ref{save} and `save set` commands. GNUPLOT_PS_DIR is used by the postscript driver to search for external prologue files. Depending on the build process, gnuplot contains either a built-in copy of those files or a default hardcoded path. You can use this variable have the postscript terminal use custom prologue files rather than the default files. See `postscript prologue`. @node Expressions, Fonts, Environment, gnuplot @section Expressions @cindex expressions In general, any mathematical expression accepted by C, FORTRAN, Pascal, or BASIC is valid. The precedence of these operators is determined by the specifications of the C programming language. White space (spaces and tabs) is ignored inside expressions. Complex constants are expressed as @{<real>,<imag>@}, where <real> and <imag> must be numerical constants. For example, @{3,2@} represents 3 + 2i; @{0,1@} represents 'i' itself. The curly braces are explicitly required here. @cindex division Note that gnuplot uses both "real" and "integer" arithmetic, like FORTRAN and C. Integers are entered as "1", "-10", etc; reals as "1.0", "-10.0", "1e1", 3.5e-1, etc. The most important difference between the two forms is in division: division of integers truncates: 5/2 = 2; division of reals does not: 5.0/2.0 = 2.5. In mixed expressions, integers are "promoted" to reals before evaluation: 5/2e0 = 2.5. The result of division of a negative integer by a positive one may vary among compilers. Try a test like "print -5/2" to determine if your system chooses -2 or -3 as the answer. The integer expression "1/0" may be used to generate an "undefined" flag, which causes a point to ignored. Or you can use the pre-defined variable NaN to achieve the same result. See @ref{using} for an example. @cindex NaN The real and imaginary parts of complex expressions are always real, whatever the form in which they are entered: in @{3,2@} the "3" and "2" are reals, not integers. Gnuplot can also perform simple operations on strings and string variables. For example, the expression ("A" . "B" eq "AB") evaluates as true, illustrating the string concatenation operator and the string equality operator. A string which contains a numerical value is promoted to the corresponding integer or real value if used in a numerical expression. Thus ("3" + "4" == 7) and (6.78 == "6.78") both evaluate to true. An integer, but not a real or complex value, is promoted to a string if used in string concatenation. A typical case is the use of integers to construct file names or other strings; e.g. ("file" . 4 eq "file4") is true. Substrings can be specified using a postfixed range descriptor [beg:end]. For example, "ABCDEF"[3:4] == "CD" and "ABCDEF"[4:*] == "DEF" The syntax "string"[beg:end] is exactly equivalent to calling the built-in string-valued function substr("string",beg,end), except that you cannot omit either beg or end from the function call. @menu * Functions:: * Operators:: * Summation:: * Gnuplot-defined_variables:: * User-defined_variables_and_functions:: @end menu @node Functions, Operators, Expressions, Expressions @subsection Functions @c ?expressions functions The math functions in `gnuplot` are the same as the corresponding functions in the Unix math library, except that all functions accept integer, real, and complex arguments unless otherwise noted. Functions that accept or return angles (e.g. sin(x), cos(x), arg(z)) treat angle values as radians, but this may be changed to degrees using the command @ref{angles}. @c ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3" width="90%"> @c ^<colgroup> @c ^ <col align="center"> @c ^ <col align="center"> @c ^ <col align="left"> @c ^</colgroup> @c ^<thead> @c ^<tr> <th colspan="3"> Math library functions </th></tr> @c ^<tr> <th>Function</th> <th>Arguments</th> <th>Returns</th></tr> @c ^</thead> @c ^<tbody> @c ^<tr> <td>abs(x)</td> <td>any</td> <td>|<i>x</i>|, absolute value of <i>x</i>; same type</td></tr> @c ^<tr> <td>abs(x)</td> <td>complex</td> <td>length of <i>x</i>, √( Re(<i>x</i>)<sup>2</sup> + Im(<i>x</i>)<sup>2</sup> )</td></tr> @c ^<tr> <td>acos(x)</td> <td>any</td> <td>cos<sup>-1</sup> <i>x</i> (inverse cosine)</td></tr> @c ^<tr> <td>acosh(x)</td> <td>any</td> <td>cosh<sup>-1</sup> <i>x</i> (inverse hyperbolic cosine) in radians</td></tr> @c ^<tr> <td>airy(x)</td> <td>any</td> <td>Airy function Ai(<i>x</i>)</td></tr> @c ^<tr> <td>arg(x)</td> <td>complex</td> <td>the phase of <i>x</i></td></tr> @c ^<tr> <td>asin(x)</td> <td>any</td> <td>sin<sup>-1</sup> <i>x</i> (inverse sin)</td></tr> @c ^<tr> <td>asinh(x)</td> <td>any</td> <td>sinh<sup>-1</sup> <i>x</i> (inverse hyperbolic sin) in radians</td></tr> @c ^<tr> <td>atan(x)</td> <td>any</td> <td>tan<sup>-1</sup> <i>x</i> (inverse tangent)</td></tr> @c ^<tr> <td>atan2(y,x)</td> <td>int or real</td> <td>tan<sup>-1</sup>(<i>y/x</i>) (inverse tangent)</td></tr> @c ^<tr> <td>atanh(x)</td> <td>any</td> <td>tanh<sup>-1</sup> <i>x</i> (inverse hyperbolic tangent) in radians</td></tr> @c ^<tr> <td>EllipticK(k)</td> <td>real k in (-1:1)</td> <td><i>K(k)</i> complete elliptic integral of the first kind</td></tr> @c ^<tr> <td>EllipticE(k)</td> <td>real k in [-1:1]</td> <td><i>E(k)</i> complete elliptic integral of the second kind</td></tr> @c ^<tr> <td>EllipticPi(n,k)</td> <td> real n<1, real k in (-1:1)</td> <td> Π(<i>n,k</i>) complete elliptic integral of the third kind</td></tr> @c ^<tr> <td>besj0(x)</td> <td>int or real</td> <td><i>j</i><sub>0</sub> Bessel function of <i>x</i>, in radians</td></tr> @c ^<tr> <td>besj1(x)</td> <td>int or real</td> <td><i>j</i><sub>1</sub> Bessel function of <i>x</i>, in radians</td></tr> @c ^<tr> <td>besy0(x)</td> <td>int or real</td> <td><i>y</i><sub>0</sub> Bessel function of <i>x</i>, in radians</td></tr> @c ^<tr> <td>besy1(x)</td> <td>int or real</td> <td><i>y</i><sub>1</sub> Bessel function of <i>x</i>, in radians</td></tr> @c ^<tr> <td>ceil(x)</td> <td>any</td> <td>⌈<i>x</i>⌉, smallest integer not less than <i>x</i> (real part)</td></tr> @c ^<tr> <td>cos(x)</td> <td>radians</td> <td>cos <i>x</i>, cosine of <i>x</i></td></tr> @c ^<tr> <td>cosh(x)</td> <td>any</td> <td>cosh <i>x</i>, hyperbolic cosine of <i>x</i> in radians</td></tr> @c ^<tr> <td>erf(x)</td> <td>any</td> <td>erf(Re(<i>x</i>)), error function of real(<i>x</i>)</td></tr> @c ^<tr> <td>erfc(x)</td> <td>any</td> <td>erfc(Re(<i>x</i>)), 1.0 - error function of real(<i>x</i>)</td></tr> @c ^<tr> <td>exp(x)</td> <td>any</td> <td><i>e<sup>x</sup></i>, exponential function of <i>x</i></td></tr> @c ^<tr> <td>expint(n,x)</td> <td>any</td> <td><i>E<sub>n</sub></i>(<i>x</i>), exponential integral function of <i>x</i></td></tr> @c ^<tr> <td>floor(x)</td> <td>any</td> <td>⌊<i>x</i>⌋, largest integer not greater than <i>x</i> (real part)</td></tr> @c ^<tr> <td>gamma(x)</td> <td>any</td> <td>Γ(Re(<i>x</i>)), gamma function of real(<i>x</i>)</td></tr> @c ^<tr> <td>ibeta(p,q,x)</td> <td>any</td> <td>ibeta(Re(<i>p,q,x</i>)), ibeta function of real(<i>p</i>,<i>q</i>,<i>x</i>)</td></tr> @c ^<tr> <td>inverf(x)</td> <td>any</td> <td>inverse error function real(<i>x</i>)</td></tr> @c ^<tr> <td>igamma(a,x)</td> <td>any</td> <td>igamma(Re(<i>a,x</i>)), igamma function of real(<a>a</a>,<i>x</i>)</td></tr> @c ^<tr> <td>imag(x)</td> <td>complex</td> <td>Im(<i>x</i>), imaginary part of <i>x</i> as a real number</td></tr> @c ^<tr> <td>invnorm(x)</td> <td>any</td> <td>inverse normal distribution function real(<i>x</i>)</td></tr> @c ^<tr> <td>int(x)</td> <td>real</td> <td>integer part of <i>x</i>, truncated toward zero</td></tr> @c ^<tr> <td>lambertw(x)</td> <td>real</td> <td>Lambert W function</td></tr> @c ^<tr> <td>lgamma(x)</td> <td>any</td> <td>lgamma(Re(<i>x</i>)), lgamma function of real(<i>x</i>)</td></tr> @c ^<tr> <td>log(x)</td> <td>any</td> <td>ln <i>x</i>, natural logarithm (base <i>e</i>) of <i>x</i></td></tr> @c ^<tr> <td>log10(x)</td> <td>any</td> <td>log<sub>10</sub> <i>x</i>, logarithm (base 10) of <i>x</i></td></tr> @c ^<tr> <td>norm(x)</td> <td>any</td> <td>norm(<i>x</i>), normal distribution function of real(<i>x</i>)</td></tr> @c ^<tr> <td>rand(x)</td> <td>int</td> <td>pseudo random number in the interval [0:1]</td></tr> @c ^<tr> <td>real(x)</td> <td>any</td> <td>Re(<i>x</i>), real part of <i>x</i></td></tr> @c ^<tr> <td>sgn(x)</td> <td>any</td> <td>1 if <i>x</i> > 0, -1 if <i>x</i> < 0, 0 if <i>x</i> = 0. ℑ(<i>x</i>) ignored</td></tr> @c ^<tr> <td>sin(x)</td> <td>any</td> <td>sin <i>x</i>, sine of <i>x</i></td></tr> @c ^<tr> <td>sinh(x)</td> <td>any</td> <td>sinh <i>x</i>, hyperbolic sine of <i>x</i> in radians</td></tr> @c ^<tr> <td>sqrt(x)</td> <td>any</td> <td>√<i>x</i>, square root of <i>x</i></td></tr> @c ^<tr> <td>tan(x)</td> <td>any</td> <td>tan <i>x</i>, tangent of <i>x</i></td></tr> @c ^<tr> <td>tanh(x)</td> <td>any</td> <td>tanh <i>x</i>, hyperbolic tangent of <i>x</i> in radians</td></tr> @c ^<tr> <td>voigt(x,y)</td> <td>real</td> <td>convolution of Gaussian and Lorentzian</td></tr> @c ^</tbody> @c ^</table> @c ^<p> </p> @c ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3" width="90%"> @c ^<colgroup> @c ^ <col align="center"> @c ^ <col align="center"> @c ^ <col align="left"> @c ^</colgroup> @c ^<thead> @c ^<tr> <th colspan="3"> String functions </th></tr> @c ^<tr> <th>Function</th> <th>Arguments</th> <th>Returns</th></tr> @c ^</thead> @c ^<tbody> @c ^<tr> <td>gprintf("format",x,...)</td> <td>any</td> <td>string result from applying gnuplot's format parser</td></tr> @c ^<tr> <td>sprintf("format",x,...)</td> <td>multiple</td> <td>string result from C-language sprintf</td></tr> @c ^<tr> <td>strlen("string")</td> <td>string</td> <td>int length of string in bytes</td></tr> @c ^<tr> <td>strstrt("string","key")</td> <td>strings</td> <td>int index of first character of substring "key"</td></tr> @c ^<tr> <td>substr("string",beg,end)</td> <td>multiple</td> <td>string "string"[beg:end]</td></tr> @c ^<tr> <td>strftime("timeformat",t)</td> <td>any</td> <td>string result from applying gnuplot's time parser</td></tr> @c ^<tr> <td>strptime("timeformat",s)</td> <td>string</td> <td>seconds since year 2000 as given in string s</td></tr> @c ^<tr> <td>system("command")</td> <td>string</td> <td>string containing output stream of shell command</td></tr> @c ^<tr> <td>word("string",n)</td> <td>string, int</td> <td>returns the nth word in "string"</td></tr> @c ^<tr> <td>words("string")</td> <td>string</td> <td>returns the number of words in "string"</td></tr> @c ^</tbody> @c ^</table> @c ^<p> </p> @c ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3" width="90%"> @c ^<colgroup> @c ^ <col align="center"> @c ^ <col align="center"> @c ^ <col align="left"> @c ^</colgroup> @c ^<thead> @c ^<tr> <th colspan="3"> other gnuplot functions </th></tr> @c ^<tr> <th>Function</th> <th>Arguments</th> <th>Returns</th></tr> @c ^</thead> @c ^<tbody> @c ^<tr> <td>column(x)</td> <td>int or string</td> <td> contents of column <i>x</i> during data input.</td></tr> @c ^<tr> <td>columnhead(x)</td> <td>int</td> <td> string containing first entry of column <i>x</i> in datafile.</td></tr> @c ^<tr> <td>defined(X)</td> <td>variable name</td> <td> [DEPRECATED] returns 1 if X is defined, 0 otherwise.</td></tr> @c ^<tr> <td>exists("X")</td> <td>string</td> <td> returns 1 if a variable named X is defined, 0 otherwise.</td></tr> @c ^<tr> <td>stringcolumn(x)</td> <td>int</td> <td> content column <i>x</i> as a string.</td></tr> @c ^<tr> <td>timecolumn(x)</td> <td>int</td> <td> timecolumn <i>x</i> during datafile manipulation.</td></tr> @c ^<tr> <td>tm_hour(x)</td> <td>int</td> <td>the hour</td></tr> @c ^<tr> <td>tm_mday(x)</td> <td>int</td> <td>the day of the month</td></tr> @c ^<tr> <td>tm_min(x)</td> <td>int</td> <td>the minute</td></tr> @c ^<tr> <td>tm_mon(x)</td> <td>int</td> <td>the month</td></tr> @c ^<tr> <td>tm_sec(x)</td> <td>int</td> <td>the second</td></tr> @c ^<tr> <td>tm_wday(x)</td> <td>int</td> <td>the day of the week</td></tr> @c ^<tr> <td>tm_yday(x)</td> <td>int</td> <td>the day of the year</td></tr> @c ^<tr> <td>tm_year(x)</td> <td>int</td> <td>the year</td></tr> @c ^<tr> <td>time(x)</td> <td>any</td> <td>the current system time</td></tr> @c ^<tr> <td>valid(x)</td> <td>int</td> <td> test validity of column(<i>x</i>) during datafile manip.</td></tr> @c ^<tr> <td>value("name")</td> <td>string</td> <td> returns the current value of the named variable.</td></tr> @c ^</tbody> @c ^</table> @c ^<!-- INCLUDE_NEXT_TABLE --> @menu * abs:: * acos:: * acosh:: * airy:: * arg:: * asin:: * asinh:: * atan:: * atan2:: * atanh:: * EllipticK:: * EllipticE:: * EllipticPi:: * besj0:: * besj1:: * besy0:: * besy1:: * ceil:: * cos:: * cosh:: * erf:: * erfc:: * exp:: * expint:: * floor:: * gamma:: * ibeta:: * inverf:: * igamma:: * imag:: * invnorm:: * int:: * lambertw:: * lgamma:: * log:: * log10:: * norm:: * rand:: * real:: * sgn:: * sin:: * sinh:: * sqrt:: * tan:: * tanh:: * voigt:: * gprintf:: * sprintf:: * strlen:: * strstrt:: * substr:: * strftime:: * strptime:: * system:: * word:: * words:: * column:: * columnhead:: * defined:: * exists:: * stringcolumn:: * timecolumn:: * tm_hour:: * tm_mday:: * tm_min:: * tm_mon:: * tm_sec:: * tm_wday:: * tm_yday:: * tm_year:: * time:: * valid:: * elliptic_integrals:: * Random_number_generator:: * value:: @end menu @node abs, acos, Functions, Functions @subsubsection abs @c ?expressions functions abs @cindex abs @findex abs The `abs(x)` function returns the absolute value of its argument. The returned value is of the same type as the argument. For complex arguments, abs(x) is defined as the length of x in the complex plane [i.e., sqrt(real(x)**2 + imag(x)**2) ]. @node acos, acosh, abs, Functions @subsubsection acos @c ?expressions functions acos @cindex acos @findex acos The `acos(x)` function returns the arc cosine (inverse cosine) of its argument. `acos` returns its argument in radians or degrees, as selected by @ref{angles}. @node acosh, airy, acos, Functions @subsubsection acosh @c ?expressions functions acosh @cindex acosh @findex acosh The `acosh(x)` function returns the inverse hyperbolic cosine of its argument in radians. @node airy, arg, acosh, Functions @subsubsection airy @c ?expressions functions airy @cindex airy @findex airy The `airy(x)` function returns the value of the Airy function Ai(x) of its argument. The function Ai(x) is that solution of the equation y'' - x y = 0 which is everywhere finite. If the argument is complex, its imaginary part is ignored. @node arg, asin, airy, Functions @subsubsection arg @c ?expressions functions arg @cindex arg @findex arg The `arg(x)` function returns the phase of a complex number in radians or degrees, as selected by @ref{angles}. @node asin, asinh, arg, Functions @subsubsection asin @c ?expressions functions asin @cindex asin @findex asin The `asin(x)` function returns the arc sin (inverse sin) of its argument. `asin` returns its argument in radians or degrees, as selected by @ref{angles}. @node asinh, atan, asin, Functions @subsubsection asinh @c ?expressions functions asinh @cindex asinh @findex asinh The `asinh(x)` function returns the inverse hyperbolic sin of its argument in radians. @node atan, atan2, asinh, Functions @subsubsection atan @c ?expressions functions atan @cindex atan @findex atan The `atan(x)` function returns the arc tangent (inverse tangent) of its argument. `atan` returns its argument in radians or degrees, as selected by @ref{angles}. @node atan2, atanh, atan, Functions @subsubsection atan2 @c ?expressions functions atan2 @cindex atan2 @findex atan2 The `atan2(y,x)` function returns the arc tangent (inverse tangent) of the ratio of the real parts of its arguments. @ref{atan2} returns its argument in radians or degrees, as selected by @ref{angles}, in the correct quadrant. @node atanh, EllipticK, atan2, Functions @subsubsection atanh @c ?expressions functions atanh @cindex atanh @findex atanh The `atanh(x)` function returns the inverse hyperbolic tangent of its argument in radians. @node EllipticK, EllipticE, atanh, Functions @subsubsection EllipticK See `elliptic integrals`. @node EllipticE, EllipticPi, EllipticK, Functions @subsubsection EllipticE See `elliptic integrals`. @node EllipticPi, besj0, EllipticE, Functions @subsubsection EllipticPi See `elliptic integrals`. @node besj0, besj1, EllipticPi, Functions @subsubsection besj0 @c ?expressions functions besj0 @cindex besj0 @findex besj0 The `besj0(x)` function returns the j0th Bessel function of its argument. @ref{besj0} expects its argument to be in radians. @node besj1, besy0, besj0, Functions @subsubsection besj1 @c ?expressions functions besj1 @cindex besj1 @findex besj1 The `besj1(x)` function returns the j1st Bessel function of its argument. @ref{besj1} expects its argument to be in radians. @node besy0, besy1, besj1, Functions @subsubsection besy0 @c ?expressions functions besy0 @cindex besy0 @findex besy0 The `besy0(x)` function returns the y0th Bessel function of its argument. @ref{besy0} expects its argument to be in radians. @node besy1, ceil, besy0, Functions @subsubsection besy1 @c ?expressions functions besy1 @cindex besy1 @findex besy1 The `besy1(x)` function returns the y1st Bessel function of its argument. @ref{besy1} expects its argument to be in radians. @node ceil, cos, besy1, Functions @subsubsection ceil @c ?expressions functions ceil @cindex ceil @findex ceil The `ceil(x)` function returns the smallest integer that is not less than its argument. For complex numbers, @ref{ceil} returns the smallest integer not less than the real part of its argument. @node cos, cosh, ceil, Functions @subsubsection cos @c ?expressions functions cos @cindex cos @findex cos The `cos(x)` function returns the cosine of its argument. `cos` accepts its argument in radians or degrees, as selected by @ref{angles}. @node cosh, erf, cos, Functions @subsubsection cosh @c ?expressions functions cosh @cindex cosh @findex cosh The `cosh(x)` function returns the hyperbolic cosine of its argument. @ref{cosh} expects its argument to be in radians. @node erf, erfc, cosh, Functions @subsubsection erf @c ?expressions functions erf @cindex erf @findex erf The `erf(x)` function returns the error function of the real part of its argument. If the argument is a complex value, the imaginary component is ignored. See @ref{erfc}, @ref{inverf}, and @ref{norm}. @node erfc, exp, erf, Functions @subsubsection erfc @c ?expressions functions erfc @cindex erfc @findex erfc The `erfc(x)` function returns 1.0 - the error function of the real part of its argument. If the argument is a complex value, the imaginary component is ignored. See `erf`, @ref{inverf}, and @ref{norm}. @node exp, expint, erfc, Functions @subsubsection exp @c ?expressions functions exp @cindex exp @findex exp The `exp(x)` function returns the exponential function of its argument (`e` raised to the power of its argument). On some implementations (notably suns), exp(-x) returns undefined for very large x. A user-defined function like safe(x) = x<-100 ? 0 : exp(x) might prove useful in these cases. @node expint, floor, exp, Functions @subsubsection expint @c ?expressions functions expint @cindex expint @findex expint The `expint(n,x)` function returns the exponential integral of the real part of its argument: integral from 1 to infinity of t^(-n) e^(-tx) dt. n must be a nonnegative integer, x>=0, and either x>0 or n>1. @node floor, gamma, expint, Functions @subsubsection floor @c ?expressions functions floor @cindex floor @findex floor The `floor(x)` function returns the largest integer not greater than its argument. For complex numbers, @ref{floor} returns the largest integer not greater than the real part of its argument. @node gamma, ibeta, floor, Functions @subsubsection gamma @c ?expressions functions gamma @cindex gamma @findex gamma The `gamma(x)` function returns the gamma function of the real part of its argument. For integer n, gamma(n+1) = n!. If the argument is a complex value, the imaginary component is ignored. @node ibeta, inverf, gamma, Functions @subsubsection ibeta @c ?expressions functions ibeta @cindex ibeta @findex ibeta The `ibeta(p,q,x)` function returns the incomplete beta function of the real parts of its arguments. p, q > 0 and x in [0:1]. If the arguments are complex, the imaginary components are ignored. The function is approximated by the method of continued fractions (Abramowitz and Stegun, 1964). The approximation is only accurate in the region x < (p-1)/(p+q-2). @node inverf, igamma, ibeta, Functions @subsubsection inverf @c ?expressions functions inverf @cindex inverf @findex inverf The `inverf(x)` function returns the inverse error function of the real part of its argument. See `erf` and @ref{invnorm}. @node igamma, imag, inverf, Functions @subsubsection igamma @c ?expressions functions igamma @cindex igamma @findex igamma The `igamma(a,x)` function returns the normalized incomplete gamma function of the real parts of its arguments, where a > 0 and x >= 0. The standard notation is P(a,x), e.g. Abramowitz and Stegun (6.5.1), with limiting value of 1 as x approaches infinity. If the arguments are complex, the imaginary components are ignored. @node imag, invnorm, igamma, Functions @subsubsection imag @c ?expressions functions imag @cindex imag @findex imag The `imag(x)` function returns the imaginary part of its argument as a real number. @node invnorm, int, imag, Functions @subsubsection invnorm @c ?expressions functions invnorm @cindex invnorm @findex invnorm The `invnorm(x)` function returns the inverse cumulative normal (Gaussian) distribution function of the real part of its argument. See @ref{norm}. @node int, lambertw, invnorm, Functions @subsubsection int @c ?expressions functions int @cindex int @findex int The `int(x)` function returns the integer part of its argument, truncated toward zero. @node lambertw, lgamma, int, Functions @subsubsection lambertw @c ?expressions functions lambertw @cindex lambertw @findex lambertw The lambertw function returns the value of the principal branch of Lambert's W function, which is defined by the equation (W(z)*exp(W(z))=z. z must be a real number with z >= -exp(-1). @node lgamma, log, lambertw, Functions @subsubsection lgamma @c ?expressions functions lgamma @cindex lgamma @findex lgamma The `lgamma(x)` function returns the natural logarithm of the gamma function of the real part of its argument. If the argument is a complex value, the imaginary component is ignored. @node log, log10, lgamma, Functions @subsubsection log @c ?expressions functions log @cindex log @findex log The `log(x)` function returns the natural logarithm (base `e`) of its argument. See @ref{log10}. @node log10, norm, log, Functions @subsubsection log10 @c ?expressions functions log10 @cindex log10 @findex log10 The `log10(x)` function returns the logarithm (base 10) of its argument. @node norm, rand, log10, Functions @subsubsection norm @c ?expressions functions norm @cindex norm @findex norm The `norm(x)` function returns the cumulative normal (Gaussian) distribution function of the real part of its argument. See @ref{invnorm}, `erf` and @ref{erfc}. @node rand, real, norm, Functions @subsubsection rand @c ?expressions functions rand @cindex rand @findex rand `rand(0)` returns a pseudo random number in the interval [0:1]. See `random` for more details. @node real, sgn, rand, Functions @subsubsection real @c ?expressions functions real @cindex real @findex real The `real(x)` function returns the real part of its argument. @node sgn, sin, real, Functions @subsubsection sgn @c ?expressions functions sgn @cindex sgn @findex sgn The `sgn(x)` function returns 1 if its argument is positive, -1 if its argument is negative, and 0 if its argument is 0. If the argument is a complex value, the imaginary component is ignored. @node sin, sinh, sgn, Functions @subsubsection sin @c ?expressions functions sin @cindex sin @findex sin The `sin(x)` function returns the sine of its argument. `sin` expects its argument to be in radians or degrees, as selected by @ref{angles}. @node sinh, sqrt, sin, Functions @subsubsection sinh @c ?expressions functions sinh @cindex sinh @findex sinh The `sinh(x)` function returns the hyperbolic sine of its argument. @ref{sinh} expects its argument to be in radians. @node sqrt, tan, sinh, Functions @subsubsection sqrt @c ?expressions functions sqrt @cindex sqrt @findex sqrt The `sqrt(x)` function returns the square root of its argument. @node tan, tanh, sqrt, Functions @subsubsection tan @c ?expressions functions tan @cindex tan @findex tan The `tan(x)` function returns the tangent of its argument. `tan` expects its argument to be in radians or degrees, as selected by @ref{angles}. @node tanh, voigt, tan, Functions @subsubsection tanh @c ?expressions functions tanh @cindex tanh @findex tanh The `tanh(x)` function returns the hyperbolic tangent of its argument. @ref{tanh} expects its argument to be in radians. @node voigt, gprintf, tanh, Functions @subsubsection voigt @c ?expressions functions voigt @cindex voigt @findex voigt The function `voigt(x,y)` returns an approximation to the Voigt/Faddeeva function used in spectral analysis. The approximation is accurate to one part in 10^4. @c ^<!-- INCLUDE_NEXT_TABLE --> @node gprintf, sprintf, voigt, Functions @subsubsection gprintf @c ?expressions functions gprintf `gprintf("format",x)` applies gnuplot's own format specifiers to the single variable x and returns the resulting string. If you want standard C-language format specifiers, you must instead use `sprintf("format",x)`. See `format specifiers`. @node sprintf, strlen, gprintf, Functions @subsubsection sprintf @c ?expressions functions sprintf @cindex sprintf @findex sprintf `sprintf("format",var1,var2,...)` applies standard C-language format specifiers to multiple arguments and returns the resulting string. If you want to use gnuplot's own format specifiers, you must instead call `gprintf()`. For information on sprintf format specifiers, please see standard C-language documentation or the unix sprintf man page. @node strlen, strstrt, sprintf, Functions @subsubsection strlen @c ?expressions functions strlen @cindex strlen @findex strlen `strlen("string")` returns the length of the string in bytes. If the current encoding supports multibyte characters, this may be larger than the number of characters in the string. @node strstrt, substr, strlen, Functions @subsubsection strstrt @c ?expressions functions strstrt @cindex strstrt @findex strstrt `strstrt("string","key")` searches for the character string "key" in "string" and returns the index to the first character of "key". If "key" is not found, returns 0. Similar to C library function strstr except that it returns an index rather than a string pointer. strstrt("hayneedlestack","needle") = 4. @node substr, strftime, strstrt, Functions @subsubsection substr @c ?expressions functions substr @cindex substr @findex substr @cindex substring `substr("string",beg,end)` returns the substring consisting of characters beg through end of the original string. This is exactly equivalent to the expression "string"[beg:end] except that you do not have the option of omitting beg or end. @node strftime, strptime, substr, Functions @subsubsection strftime @c ?expressions functions strftime @cindex strftime @findex strftime `strftime("timeformat",t)` applies the timeformat specifiers to the time t given in seconds since the year 2000. See `time_specifiers` and @ref{strptime}. @node strptime, system, strftime, Functions @subsubsection strptime @c ?expressions functions strptime @cindex strptime @findex strptime `strptime("timeformat",s)` reads the time from the string s using the timeformat specifiers and converts it into seconds since the year 2000. See `time_specifiers` and @ref{strftime}. @node system, word, strptime, Functions @subsubsection system @c ?expressions functions system @cindex system @cmindex system `system("command")` executes "command" using the standard shell and returns the resulting character stream from stdout as string variable. One optional trailing newline is ignored. This can be used to import external functions into gnuplot scripts using 'f(x) = real(system(sprintf("somecommand %f", x)))'. @node word, words, system, Functions @subsubsection word @c ?expressions functions word @cindex word @findex word @cindex word @findex word `word("string",n)` returns the nth word in string. For example, `word("one two three",2)` returns the string "two". @node words, column, word, Functions @subsubsection words @c ?expressions functions words @cindex words @findex words @cindex words @findex words `words("string")` returns the number of words in string. For example, `words(" a b c d")` returns 4. @c ^<!-- INCLUDE_NEXT_TABLE --> @node column, columnhead, words, Functions @subsubsection column @c ?expressions functions column @cindex column @findex column `column(x)` may be used only in expressions as part of @ref{using} manipulations to fits or datafile plots. It evaluates to the numerical value of the contents of column x. See @ref{using}. @node columnhead, defined, column, Functions @subsubsection columnhead @c ?expressions functions columnhead @cindex columnhead @findex columnhead `columnhead(x)` may only be used in expressions as part of @ref{using} manipulations to fits or datafile plots. It evaluates to a string containing the contents of column x in the first line of data. See @ref{using}. @node defined, exists, columnhead, Functions @subsubsection defined @c ?expressions functions defined @cindex defined @findex defined `defined(X)` [DEPRECATED] returns 1 if a variable named X has been defined, otherwise it returns 0. Please use `exists("X")` instead. @node exists, stringcolumn, defined, Functions @subsubsection exists @c ?expressions functions exists @cindex exists @findex exists The argument to exists() is a string constant or a string variable; if the string contains the name of a defined variable, the function returns 1. Otherwise the function returns 0. @node stringcolumn, timecolumn, exists, Functions @subsubsection stringcolumn @c ?expressions functions stringcolumn @cindex stringcolumn @findex stringcolumn @c ?expressions functions strcol @cindex strcol `stringcolumn(x)` may be used only in expressions as part of @ref{using} manipulations to fits or datafile plots. It returns the content of column x as a string variable. See @ref{using}. @node timecolumn, tm_hour, stringcolumn, Functions @subsubsection timecolumn @c ?expressions functions timecolumn @cindex timecolumn @findex timecolumn `timecolumn(x)` may be used only in expressions as part of @ref{using} manipulations to fits or datafile plots. See @ref{using}. It reads the data starting at that column as a time/date value and returns its value in gnuplot's internal time representation of "seconds since the millennium". To find the right @ref{timefmt} string to use, @ref{timecolumn} searches for a @ref{using} specification with the same column number as its argument. If one is found, @ref{timefmt} pattern of the target axis for this specifier is used. Otherwise, @ref{timecolumn} chooses the x axis @ref{timefmt} per default. @node tm_hour, tm_mday, timecolumn, Functions @subsubsection tm_hour @c ?expressions tm_hour @cindex tm_hour @findex tm_hour The @ref{tm_hour} function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the hour (an integer in the range 0--23) as a real. @node tm_mday, tm_min, tm_hour, Functions @subsubsection tm_mday @c ?expressions tm_mday @cindex tm_mday @findex tm_mday The @ref{tm_mday} function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the day of the month (an integer in the range 1--31) as a real. @node tm_min, tm_mon, tm_mday, Functions @subsubsection tm_min @c ?expressions tm_min @cindex tm_min @findex tm_min The @ref{tm_min} function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the minute (an integer in the range 0--59) as a real. @node tm_mon, tm_sec, tm_min, Functions @subsubsection tm_mon @c ?expressions tm_mon @cindex tm_mon @findex tm_mon The @ref{tm_mon} function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the month (an integer in the range 0--11) as a real. @node tm_sec, tm_wday, tm_mon, Functions @subsubsection tm_sec @c ?expressions tm_sec @cindex tm_sec @findex tm_sec The @ref{tm_sec} function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the second (an integer in the range 0--59) as a real. @node tm_wday, tm_yday, tm_sec, Functions @subsubsection tm_wday @c ?expressions tm_wday @cindex tm_wday @findex tm_wday The @ref{tm_wday} function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the day of the week (an integer in the range 0--6) as a real. @node tm_yday, tm_year, tm_wday, Functions @subsubsection tm_yday @c ?expressions tm_yday @cindex tm_yday @findex tm_yday The @ref{tm_yday} function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the day of the year (an integer in the range 1--366) as a real. @node tm_year, time, tm_yday, Functions @subsubsection tm_year @c ?expressions tm_year @cindex tm_year @findex tm_year The @ref{tm_year} function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the year (an integer) as a real. @node time, valid, tm_year, Functions @subsubsection time @c ?expressions time @cindex time @findex time The `time` function returns the current system time. This value can be converted to a date string with the @ref{strftime} function, or it can be used in conjunction with @ref{timecolumn} to generate relative time/date plots. The type of the argument determines what is returned. If the argument is an integer, time() returns the current time as an integer, in seconds from 1 Jan 2000. If the argument is real (or complex), the result is real as well. If the argument is a string, it is assumed to be a format string, and it is passed to @ref{strftime} to provide a formatted time string. @node valid, elliptic_integrals, time, Functions @subsubsection valid @c ?expressions functions valid @cindex valid @findex valid `valid(x)` may be used only in expressions as part of @ref{using} manipulations to fits or datafile plots. See @ref{using}. @node elliptic_integrals, Random_number_generator, valid, Functions @subsubsection elliptic integrals @c ?expressions functions elliptic integrals @c ?elliptic integrals @cindex elliptic integrals @findex elliptic integrals The `EllipticK(k)` function returns the complete elliptic integral of the first kind, i.e. the definite integral between 0 and pi/2 of the function `(1-(k*sin(p))**2)**(-0.5)`. The domain of `k` is -1 to 1 (exclusive). The `EllipticE(k)` function returns the complete elliptic integral of the second kind, i.e. the definite integral between 0 and pi/2 of the function `(1-(k*sin(p))**2)**0.5`. The domain of `k` is -1 to 1 (inclusive). The `EllipticPi(n,k)` function returns the complete elliptic integral of the third kind, i.e. the definite integral between 0 and pi/2 of the function `(1-(k*sin(p))**2)**(-0.5)/(1-n*sin(p)**2)`. The parameter `n` must be less than 1, while `k` must lie between -1 and 1 (exclusive). Note that by definition EllipticPi(0,k) == EllipticK(k) for all possible values of `k`. @node Random_number_generator, value, elliptic_integrals, Functions @subsubsection Random number generator @c ?expressions random @cindex random @cindex rand @findex rand The function `rand()` produces a sequence of pseudo-random numbers between 0 and 1 using an algorithm from P. L'Ecuyer and S. Cote, "Implementing a random number package with splitting facilities", ACM Transactions on Mathematical Software, 17:98-111 (1991). @example rand(0) returns a pseudo random number in the interval [0:1] generated from the current value of two internal 32-bit seeds. rand(-1) resets both seeds to a standard value. rand(x) for integer 0 < x < 2^31-1 sets both internal seeds to x. rand(@{x,y@}) for integer 0 < x,y < 2^31-1 sets seed1 to x and seed2 to y. @end example @node value, , Random_number_generator, Functions @subsubsection value @c ?expressions functions value @cindex value @findex value B = value("A") is effectively the same as B = A, where A is the name of a user-defined variable. This is useful when the name of the variable is itself held in a string variable. See @ref{variables}. It also allows you to read the name of a variable from a data file. If the argument is a numerical expression, value() returns the value of that expression. If the argument is a string that does not correspond to a currently defined variable, value() returns NaN. @node Operators, Summation, Functions, Expressions @subsection Operators @c ?expressions operators @cindex operators The operators in `gnuplot` are the same as the corresponding operators in the C programming language, except that all operators accept integer, real, and complex arguments, unless otherwise noted. The ** operator (exponentiation) is supported, as in FORTRAN. Parentheses may be used to change order of evaluation. @menu * Unary:: * Binary:: * Ternary:: @end menu @node Unary, Binary, Operators, Operators @subsubsection Unary @c ?expressions operators unary @c ?operators unary @cindex unary The following is a list of all the unary operators and their usages: @example Symbol Example Explanation - -a unary minus + +a unary plus (no-operation) ~ ~a * one's complement ! !a * logical negation ! a! * factorial $ $3 * call arg/column during @ref{using} manipulation @end example @cindex factorial @cindex negation @cindex one's complement @cindex operator precedence @c ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> @c ^<colgroup> @c ^ <col align="center"> @c ^ <col align="center"> @c ^ <col align="left"> @c ^</colgroup> @c ^<thead> @c ^<tr> <th>Symbol</th> <th>Example</th> <th>Explanation</th></tr> @c ^</thead> @c ^<tbody> @c ^<tr> <td><tt>-</tt></td> <td><tt>-a</tt></td> <td>unary minus</td></tr> @c ^<tr> <td><tt>+</tt></td> <td><tt>+a</tt></td> <td>unary plus (no-operation)</td></tr> @c ^<tr> <td><tt>~</tt></td> <td><tt>~a</tt></td> <td>* one's complement</td></tr> @c ^<tr> <td><tt>!</tt></td> <td><tt>!a</tt></td> <td>* logical negation</td></tr> @c ^<tr> <td><tt>!</tt></td> <td><tt>a!</tt></td> <td>* factorial</td></tr> @c ^<tr> <td><tt>$</tt></td> <td><tt>$3</tt></td> <td>* call arg/column during @ref{using} manipulation</td></tr> @c ^</tbody> @c ^</table> (*) Starred explanations indicate that the operator requires an integer argument. Operator precedence is the same as in Fortran and C. As in those languages, parentheses may be used to change the order of operation. Thus -2**2 = -4, but (-2)**2 = 4. The factorial operator returns a real number to allow a greater range. @node Binary, Ternary, Unary, Operators @subsubsection Binary @c ?expressions operators binary @c ?operators binary The following is a list of all the binary operators and their usages: @example Symbol Example Explanation ** a**b exponentiation * a*b multiplication / a/b division % a%b * modulo + a+b addition - a-b subtraction == a==b equality != a!=b inequality < a<b less than <= a<=b less than or equal to > a>b greater than >= a>=b greater than or equal to & a&b * bitwise AND ^ a^b * bitwise exclusive OR | a|b * bitwise inclusive OR && a&&b * logical AND || a||b * logical OR = a = b assignment , (a,b) serial evaluation . A.B string concatenation eq A eq B string equality ne A ne B string inequality @end example @cindex bitwise operators @cindex string operators @cindex modulo @cindex exponentiation @c ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> @c ^<colgroup> @c ^ <col align="center"> @c ^ <col align="center"> @c ^ <col align="left"> @c ^</colgroup> @c ^<thead> @c ^<tr> <th>Symbol</th> <th>Example</th> <th>Explanation</th></tr> @c ^</thead> @c ^<tbody> @c ^<tr> <td><tt>**</tt></td> <td><tt>a**b</tt></td> <td>exponentiation</td></tr> @c ^<tr> <td><tt>*</tt></td> <td><tt>a*b</tt></td> <td>multiplication</td></tr> @c ^<tr> <td><tt>/</tt></td> <td><tt>a/b</tt></td> <td>division</td></tr> @c ^<tr> <td><tt>%</tt></td> <td><tt>a%b</tt></td> <td>* modulo</td></tr> @c ^<tr> <td><tt>+</tt></td> <td><tt>a+b</tt></td> <td>addition</td></tr> @c ^<tr> <td><tt>-</tt></td> <td><tt>a-b</tt></td> <td>subtraction</td></tr> @c ^<tr> <td><tt>==</tt></td> <td><tt>a==b</tt></td> <td>equality</td></tr> @c ^<tr> <td><tt>!=</tt></td> <td><tt>a!=b</tt></td> <td>inequality</td></tr> @c ^<tr> <td><tt><</tt></td> <td><tt>a<b</tt></td> <td>less than</td></tr> @c ^<tr> <td><tt><=</tt></td> <td><tt>a<=b</tt></td> <td>less than or equal to</td></tr> @c ^<tr> <td><tt>></tt></td> <td><tt>a>b</tt></td> <td>greater than</td></tr> @c ^<tr> <td><tt>>=</tt></td> <td><tt>a>=b</tt></td> <td>greater than or equal to</td></tr> @c ^<tr> <td><tt>&</tt></td> <td><tt>a&b</tt></td> <td>* bitwise AND</td></tr> @c ^<tr> <td><tt>^</tt></td> <td><tt>a^b</tt></td> <td>* bitwise exclusive OR</td></tr> @c ^<tr> <td><tt>|</tt></td> <td><tt>a|b</tt></td> <td>* bitwise inclusive OR</td></tr> @c ^<tr> <td><tt>&&</tt></td> <td><tt>a&&b</tt></td> <td>* logical AND</td></tr> @c ^<tr> <td><tt>||</tt></td> <td><tt>a||b</tt></td> <td>* logical OR</td></tr> @c ^<tr> <td><tt>=</tt></td> <td><tt>a = b</tt></td> <td>assignment</td></tr> @c ^<tr> <td><tt>,</tt></td> <td><tt>(a,b)</tt></td> <td>serial evaluation</td></tr> @c ^<tr> <td><tt>.</tt></td> <td><tt>a.b</tt></td> <td>string concatenation</td></tr> @c ^<tr> <td><tt>eq</tt></td> <td><tt>A eq B</tt></td> <td>string equality</td></tr> @c ^<tr> <td><tt>ne</tt></td> <td><tt>A ne B</tt></td> <td>string inequality</td></tr> @c ^</tbody> @c ^</table> (*) Starred explanations indicate that the operator requires integer arguments. Capital letters A and B indicate that the operator requires string arguments. Logical AND (&&) and OR (||) short-circuit the way they do in C. That is, the second `&&` operand is not evaluated if the first is false; the second `||` operand is not evaluated if the first is true. Serial evaluation occurs only in parentheses and is guaranteed to proceed in left to right order. The value of the rightmost subexpression is returned. @node Ternary, , Binary, Operators @subsubsection Ternary @c ?expressions operators ternary @c ?operators ternary @cindex ternary There is a single ternary operator: @example Symbol Example Explanation ?: a?b:c ternary operation @end example @c ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> @c ^<colgroup> @c ^ <col align="center"> @c ^ <col align="center"> @c ^ <col align="left"> @c ^</colgroup> @c ^<thead> @c ^<tr> <th>Symbol</th> <th>Example</th> <th>Explanation</th></tr> @c ^</thead> @c ^<tbody> @c ^<tr> <td><tt>?:</tt></td> <td><tt>a?b:c</tt></td> <td>* ternary operation</td></tr> @c ^</tbody> @c ^</table> The ternary operator behaves as it does in C. The first argument (a), which must be an integer, is evaluated. If it is true (non-zero), the second argument (b) is evaluated and returned; otherwise the third argument (c) is evaluated and returned. The ternary operator is very useful both in constructing piecewise functions and in plotting points only when certain conditions are met. Examples: Plot a function that is to equal sin(x) for 0 <= x < 1, 1/x for 1 <= x < 2, and undefined elsewhere: @example f(x) = 0<=x && x<1 ? sin(x) : 1<=x && x<2 ? 1/x : 1/0 plot f(x) @end example Note that `gnuplot` quietly ignores undefined values, so the final branch of the function (1/0) will produce no plottable points. Note also that f(x) will be plotted as a continuous function across the discontinuity if a line style is used. To plot it discontinuously, create separate functions for the two pieces. (Parametric functions are also useful for this purpose.) For data in a file, plot the average of the data in columns 2 and 3 against the datum in column 1, but only if the datum in column 4 is non-negative: @example plot 'file' using 1:( $4<0 ? 1/0 : ($2+$3)/2 ) @end example For an explanation of the @ref{using} syntax, please see @ref{using}. @node Summation, Gnuplot-defined_variables, Operators, Expressions @subsection Summation @c ?expressions operators summation @c ?operators summation @cindex summation A summation expression has the form @example sum [<var> = <start> : <end>] <expression> @end example <var> is treated as an integer variable that takes on successive integral values from <start> to <end>. For each of these, the current value of <expression> is added to a running total whose final value becomes the value of the summation expression. Examples: @example print sum [i=1:10] i 55. # Equivalent to plot 'data' using 1:($2+$3+$4+$5+$6+...) plot 'data' using 1 : (sum [col=2:MAXCOL] column(col)) @end example It is not necessary that <expression> contain the variable <var>. Although <start> and <end> can be specified as variables or expressions, their value cannot be changed dynamically as a side-effect of carrying out the summation. If <end> is less than <start> then the value of the summation is zero. @node Gnuplot-defined_variables, User-defined_variables_and_functions, Summation, Expressions @subsection Gnuplot-defined variables @c ?expressions gnuplot-defined @cindex gnuplot-defined @c ?gnuplot-defined variables @cindex GPVAL @cindex gpval Gnuplot maintains a number of read-only variables that reflect the current internal state of the program and the most recent plot. These variables begin with the prefix "GPVAL_". Examples include GPVAL_TERM, GPVAL_X_MIN, GPVAL_X_MAX, GPVAL_Y_MIN. Type `show variables all` to display the complete list and current values. Values related to axes parameters (ranges, log base) are values used during the last plot, not those currently `set`. Example: To calculate the fractional screen coordinates of the point [X,Y] @example GRAPH_X = (X - GPVAL_X_MIN) / (GPVAL_X_MAX - GPVAL_X_MIN) GRAPH_Y = (Y - GPVAL_Y_MIN) / (GPVAL_Y_MAX - GPVAL_Y_MIN) SCREEN_X = GPVAL_TERM_XMIN + GRAPH_X * (GPVAL_TERM_XMAX - GPVAL_TERM_XMIN) SCREEN_Y = GPVAL_TERM_YMIN + GRAPH_Y * (GPVAL_TERM_YMAX - GPVAL_TERM_YMIN) FRAC_X = SCREEN_X / GPVAL_TERM_XSIZE FRAC_Y = SCREEN_Y / GPVAL_TERM_YSIZE @end example @cindex errors @cindex error state The read-only variable GPVAL_ERRNO is set to a non-zero value if any gnuplot command terminates early due to an error. The most recent error message is stored in the string variable GPVAL_ERRMSG. Both GPVAL_ERRNO and GPVAL_ERRMSG can be cleared using the command `reset errors`. Interactive terminals with `mouse` functionality maintain read-only variables with the prefix "MOUSE_". See @ref{variables} for details. The @ref{fit} mechanism uses several variables with names that begin "FIT_". It is safest to avoid using such names. "FIT_LIMIT", however, is one that you may wish to redefine. Under `set fit errorvariables`, the error for each fitted parameter will be stored in a variable named like the parameter, but with "_err" appended. See the documentation on @ref{fit} for details. See @ref{variables}, `reset errors`, @ref{variables}, and @ref{fit}. @node User-defined_variables_and_functions, , Gnuplot-defined_variables, Expressions @subsection User-defined variables and functions @c ?expressions user-defined @c ?user-defined variables @cindex user-defined @cindex variables @opindex variables New user-defined variables and functions of one through twelve variables may be declared and used anywhere, including on the `plot` command itself. User-defined function syntax: @example <func-name>( <dummy1> @{,<dummy2>@} ... @{,<dummy12>@} ) = <expression> @end example where <expression> is defined in terms of <dummy1> through <dummy12>. User-defined variable syntax: @example <variable-name> = <constant-expression> @end example Examples: @example w = 2 q = floor(tan(pi/2 - 0.1)) f(x) = sin(w*x) sinc(x) = sin(pi*x)/(pi*x) delta(t) = (t == 0) ramp(t) = (t > 0) ? t : 0 min(a,b) = (a < b) ? a : b comb(n,k) = n!/(k!*(n-k)!) len3d(x,y,z) = sqrt(x*x+y*y+z*z) plot f(x) = sin(x*a), a = 0.2, f(x), a = 0.4, f(x) @end example @example file = "mydata.inp" file(n) = sprintf("run_%d.dat",n) @end example The final two examples illustrate a user-defined string variable and a user-defined string function. @cindex NaN @cindex pi Note that the variables `pi` (3.14159...) and `NaN` (IEEE "Not a Number") are already defined. You can redefine these to something else if you really need to. The original values can be recovered by setting: @example NaN = GPVAL_NaN pi = GPVAL_pi @end example Other variables may be defined under various gnuplot operations like mousing in interactive terminals or fitting; see @ref{variables} for details. You can check for existence of a given variable V by the exists("V") expression. For example @example a = 10 if (exists("a")) print "a is defined" if (!exists("b")) print "b is not defined" @end example Valid names are the same as in most programming languages: they must begin with a letter, but subsequent characters may be letters, digits, or "_". Each function definition is made available as a special string-valued variable with the prefix 'GPFUN_'. Example: @example set label GPFUN_sinc at graph .05,.95 @end example See @ref{functions}, @ref{functions}, @ref{variables}, @ref{macros}, @ref{value}. @node Fonts, Glossary, Expressions, gnuplot @section Fonts @cindex fonts Gnuplot does not provide any fonts of its own. It relies on external font handling, the details of which unfortunately vary from one terminal type to another. Brief documentation of font mechanisms that apply to more than one terminal type is given here. For information on font use by other individual terminals, see the documentation for that terminal. @menu * cairo_(pdfcairo:: * gd_(png:: * postscript__(also_encapsulated_postscript_*.eps):: @end menu @node cairo_(pdfcairo, gd_(png, Fonts, Fonts @subsection cairo (pdfcairo, pngcairo, epscairo, wxt terminals) @c ?fonts cairo @cindex fonts @cindex pdf @tmindex pdf @cindex png @tmindex png @cindex wxt @tmindex wxt Sorry, this section is under construction. These terminals find and access fonts using the external fontconfig tool set. Please see the @uref{http://fontconfig.org/fontconfig-user.html,fontconfig user manual. } It is usually sufficient in gnuplot to request a font by a generic name and size, letting fontconfig substitute a similar font if necessary. The following will probably all work: @example set term pdfcairo font "sans,12" set term pdfcairo font "Times,12" set term pdfcairo font "Times-New-Roman,12" @end example @node gd_(png, postscript__(also_encapsulated_postscript_*.eps), cairo_(pdfcairo, Fonts @subsection gd (png, gif, jpeg terminals) @cindex gd @c ?fonts gd @cindex fonts @cindex png @tmindex png @cindex jpeg @cindex gif Font handling for the png, gif, and jpeg terminals is done by the external library libgd. Five basic fonts are provided directly by libgd. These are `tiny` (5x8 pixels), `small` (6x12 pixels), `medium`, (7x13 Bold), `large` (8x16) or `giant` (9x15 pixels). These fonts cannot be scaled or rotated. Use one of these keywords instead of the `font` keyword. E.g. @example set term png tiny @end example On most systems libgd also provides access to Adobe Type 1 fonts (*.pfa) and TrueType fonts (*.ttf). You must give the name of the font file, not the name of the font inside it, in the form "<face> @{,<pointsize>@}". <face> is either the full pathname to the font file, or the first part of a filename in one of the directories listed in the GDFONTPATH environmental variable. That is, 'set term png font "Face"' will look for a font file named either <somedirectory>/Face.ttf or <somedirectory>/Face.pfa. For example, if GDFONTPATH contains `/usr/local/fonts/ttf:/usr/local/fonts/pfa` then the following pairs of commands are equivalent @example set term png font "arial" set term png font "/usr/local/fonts/ttf/arial.ttf" set term png font "Helvetica" set term png font "/usr/local/fonts/pfa/Helvetica.pfa" @end example To request a default font size at the same time: @example set term png font "arial,11" @end example Both TrueType and Adobe Type 1 fonts are fully scalable and rotatable. If no specific font is requested in the "set term" command, gnuplot checks the environmental variable GNUPLOT_DEFAULT_GDFONT to see if there is a preferred default font. @node postscript__(also_encapsulated_postscript_*.eps), , gd_(png, Fonts @subsection postscript (also encapsulated postscript *.eps) @c ?fonts postscript @cindex fonts @cindex postscript @cindex eps PostScript font handling is done by the printer or viewing program. Gnuplot can create valid PostScript or encapsulated PostScript (*.eps) even if no fonts at all are installed on your computer. Gnuplot simply refers to the font by name in the output file, and assumes that the printer or viewing program will know how to find or approximate a font by that name. All PostScript printers or viewers should know about the standard set of Adobe fonts `Times-Roman`, `Helvetica`, `Courier`, and `Symbol`. It is likely that many additional fonts are also available, but the specific set depends on your system or printer configuration. Gnuplot does not know or care about this; the output *.ps or *.eps files that it creates will simply refer to whatever font names you request. Thus @example set term postscript eps font "Times-Roman,12" @end example will produce output that is suitable for all printers and viewers. On the other hand @example set term postscript eps font "Garamond-Premier-Pro-Italic" @end example will produce an output file that contains valid PostScript, but since it refers to a specialized font, only some printers or viewers will be able to display the specific font that was requested. Most will substitute a different font. However, it is possible to embed a specific font in the output file so that all printers will be able to use it. This requires that the a suitable font description file is available on your system. Note that some font files require specific licensing if they are to be embedded in this way. See `postscript fontfile` for more detailed description and examples. @node Glossary, linetypes, Fonts, gnuplot @section Glossary @cindex glossary Throughout this document an attempt has been made to maintain consistency of nomenclature. This cannot be wholly successful because as `gnuplot` has evolved over time, certain command and keyword names have been adopted that preclude such perfection. This section contains explanations of the way some of these terms are used. A "page" or "screen" or "canvas" is the entire area addressable by `gnuplot`. On a desktop it is a full window; on a plotter, it is a single sheet of paper; in svga mode it is the full monitor screen. A screen may contain one or more "plots". A plot is defined by an abscissa and an ordinate, although these need not actually appear on it, as well as the margins and any text written therein. A plot contains one "graph". A graph is defined by an abscissa and an ordinate, although these need not actually appear on it. A graph may contain one or more "lines". A line is a single function or data set. "Line" is also a plotting style. The word will also be used in sense "a line of text". Presumably the context will remove any ambiguity. The lines on a graph may have individual names. These may be listed together with a sample of the plotting style used to represent them in the "key", sometimes also called the "legend". The word "title" occurs with multiple meanings in `gnuplot`. In this document, it will always be preceded by the adjective "plot", "line", or "key" to differentiate among them. A 2D graph may have up to four labelled @ref{axes}. The names of the four axes are "x" for the axis along the bottom border of the plot, "y" for the axis along the left border, "x2" for the top border, and "y2" for the right border. See @ref{axes}. A 3D graph may have up to three labelled @ref{axes} -- "x", "y" and "z". It is not possible to say where on the graph any particular axis will fall because you can change the direction from which the graph is seen with @ref{view}. When discussing data files, the term "record" will be resurrected and used to denote a single line of text in the file, that is, the characters between newline or end-of-record characters. A "point" is the datum extracted from a single record. A "datablock" is a set of points from consecutive records, delimited by blank records. A line, when referred to in the context of a data file, is a subset of a datablock. @node linetypes, mouse_input, Glossary, gnuplot @section linetypes, colors, and styles @cindex linetypes @cindex colors Each gnuplot terminal type provides a set of distinct "linetypes". These may differ in color, in thickness, in dot/dash pattern, or in some combination of color and dot/dash. The default linetypes for a particular terminal can be previewed by issuing the @ref{test} command after setting the terminal type. The pre-defined colors and dot/dash patterns are not guaranteed to be consistent for all terminal types, but all terminals use the special linetype -1 to mean a solid line in the primary foreground color (normally black). Most terminals also recognize the special linetype "bgnd" to mean a solid line in the background color. You can redefine the default linetype properties either interactively or via an initialization file. This allows you to customize the colors and other properties of the lines used by all gnuplot plotting commands. See `set linetype`. By default, successive functions or datafiles plotted by a single command will be assigned successive linetypes. You can override this default sequence by specifying a particular linetype for any function, datafile, or plot element. Examples: @example plot "foo", "bar" # plot two files using linetypes 1, 2 plot sin(x) linetype 4 # terminal-specific linetype color 4 plot sin(x) lt -1 # black @end example @cindex colors For many terminal types it is also possible to assign user-defined colors using explicit rgb (red, green, blue) values, named colors, or color values that refer to the current pm3d palette. Examples: @example plot sin(x) lt rgb "violet" # one of gnuplot's named colors plot sin(x) lt rgb "#FF00FF" # explicit RGB triple in hexadecimal plot sin(x) lt palette cb -45 # whatever color corresponds to -45 # in the current cbrange of the palette plot sin(x) lt palette frac 0.3 # fractional value along the palette @end example See @ref{colornames}, @ref{palette}, @ref{cbrange}. For terminals that support dot/dash patterns, each default linetype has both a dot-dash pattern and a default color. Gnuplot does not currently provide a mechanism for changing the dot-dash pattern, so if you want both a particular dash pattern and a particular color you must first choose a linetype that has the required dash pattern, then override the default color using the keyword `linecolor`, abbreviated `lc`. For example, the postscript terminal provides a dashed blue line as linetype 3. The plot commands below use this same dash pattern for three plots, one in blue (the default), another in red (the default for linetype 1), and a third in gold. Example: @example set term postscript dashed color plot 'foo' lt 3, 'baz' lt 3 linecolor 1, 'bar' lt 3 lc rgb 'gold' @end example @menu * colorspec:: * linestyles_vs_linetypes:: @end menu @node colorspec, linestyles_vs_linetypes, linetypes, linetypes @subsection colorspec @cindex colorspec @cindex rgbcolor @cindex colors @cindex lc @cindex linecolor @cindex tc @cindex textcolor Many commands allow you to specify a linetype with an explicit color. Terminal-independent color choice is only possible for terminals that support RGB color or pm3d palettes. Syntax: @example ... @{linecolor | lc@} @{<colorspec> | <n>@} ... @{textcolor | tc@} @{<colorspec> | @{linetype | lt@} <n>@} @end example where <colorspec> has one of the following forms: @example rgbcolor "colorname" rgbcolor "#RRGGBB" rgbcolor variable # color is read from input file palette frac <val> # <val> runs from 0 to 1 palette cb <value> # <val> lies within cbrange palette z variable # color index is read from input file @end example The "<n>" is the linetype number the color of which is used, see @ref{test}. "colorname" refers to one of the color names built in to gnuplot. For a list of the available names, see @ref{colornames}. "#RRGGBB" is a hexadecimal constant preceded by the "#" symbol. The RRGGBB represents the red, green, and blue components of the color, each on a scale from 0 - 255. For example, magenta = full-scale red + full-scale blue would be represented by #FF00FF, which is the hexadecimal representation of (255 << 16) + (0 << 8) + (255). The color palette is a linear gradient of colors that smoothly maps a single numerical value onto a particular color. Two such mappings are always in effect. `palette frac` maps a fractional value between 0 and 1 onto the full range of the color palette. `palette cb` maps the range of the color axis onto the same palette. See @ref{cbrange}. See also `set colorbox`. You can use either of these to select a constant color from the current palette. "palette z" maps the z value of each plot segment or plot element into the cbrange mapping of the palette. This allows smoothly-varying color along a 3d line or surface. It also allows coloring 2D plots by palette values read from an extra column of data (not all 2D plot styles allow an extra column). @menu * background_color:: * linecolor_variable:: * rgbcolor_variable:: @end menu @node background_color, linecolor_variable, colorspec, colorspec @subsubsection background color @cindex background @cindex bgnd Most terminals now allow you to set an explicit background color for the plot. The special linetype `bgnd` will draw in this color, and `bgnd` is also recognized as a color. Examples: @example # This will erase a section of the canvas by writing over it in the # background color set term wxt background rgb "gray75" set object 1 rectangle from x0,y0 to x1,y1 fillstyle solid fillcolor bgnd # This will draw an "invisible" line along the x axis plot 0 lt bgnd @end example @node linecolor_variable, rgbcolor_variable, background_color, colorspec @subsubsection linecolor variable @c ?linecolor variable @c ?lc variable @c ?textcolor variable @c ?tc variable `lc variable` tells the program to use the value read from one column of the input data as a linetype index, and use the color belonging to that linetype. This requires a corresponding additional column in the @ref{using} specifier. Text colors can be set similarly using `tc variable`. Examples: @example # Use the third column of data to assign colors to individual points plot 'data' using 1:2:3 with points lc variable @end example @example # A single data file may contain multiple sets of data, separated by two # blank lines. Each data set is assigned as index value (see @ref{index}) # that can be retrieved via the @ref{using} specifier `column(-2)`. # See `pseudocolumns`. This example uses to value in column -2 to # draw each data set in a different line color. plot 'data' using 1:2:(column(-2)) with lines lc variable @end example @node rgbcolor_variable, , linecolor_variable, colorspec @subsubsection rgbcolor variable @c ?rgbcolor variable @c ?lc rgbcolor variable @c ?tc rgbcolor variable You can assign a separate color for each data point, line segment, or label in your plot. `lc rgbcolor variable` tells the program to read RGB color information for each line in the data file. This requires a corresponding additional column in the @ref{using} specifier. The extra column is interpreted as a 24-bit packed RGB triple. If the value is provided directly in the data file it is easiest to give it as a hexidecimal value (see `rgbcolor`). Alternatively, the @ref{using} specifier can contain an expression that evaluates to a 24-bit RGB color as in the example below. Text colors are similarly set using `tc rgbcolor variable`. Example: @example # Place colored points in 3D at the x,y,z coordinates corresponding to # their red, green, and blue components rgb(r,g,b) = 65536 * int(r) + 256 * int(g) + int(b) splot "data" using 1:2:3:(rgb($1,$2,$3)) with points lc rgb variable @end example @node linestyles_vs_linetypes, , colorspec, linetypes @subsection linestyles vs linetypes @c ? linestyles vs linetypes Lines can have additional properties such as linewidth. You can associate these various properties, as well as equivalent properties for point symbols, into user-defined "linestyles" using the command `set style line`. Once you have defined a linestyle, you can use it in a plot command to control the appearance of one or more plot elements. Whereas `linetypes` are permanent (they last until you explicitly redefine them), `linestyles` are temporary. They only last until the next reset of the graphics state. Examples: @example # define a new line style with terminal-independent color cyan, # linewidth 3, and associated point type 6 (a circle with a dot in it). set style line 5 lt rgb "cyan" lw 3 pt 6 plot sin(x) with linespoints ls 5 # user-defined line style 5 @end example @node mouse_input, Plotting, linetypes, gnuplot @section mouse input @c ?mouse input Many terminals allow interaction with the current plot using the mouse. Some also support the definition of hotkeys to activate pre-defined functions by hitting a single key while the mouse focus is in the active plot window. It is even possible to combine mouse input with `batch` command scripts, by invoking the command `pause mouse` and then using the mouse variables returned by mouse clicking as parameters for subsequent scripted actions. See `bind` and @ref{variables}. See also the command `set mouse`. @menu * bind:: * Mouse_variables:: @end menu @node bind, Mouse_variables, mouse_input, mouse_input @subsection bind @c ?commands bind @cindex hotkey @cindex hotkeys @cindex bind @opindex bind Syntax: @example bind @{allwindows@} [<key-sequence>] ["<gnuplot commands>"] bind <key-sequence> "" reset bind @end example The `bind` allows defining or redefining a hotkey, i.e. a sequence of gnuplot commands which will be executed when a certain key or key sequence is pressed while the driver's window has the input focus. Note that `bind` is only available if gnuplot was compiled with `mouse` support and it is used by all mouse-capable terminals. A user-specified binding supersedes any builtin bindings, except that <space> and 'q' cannot normally be rebound. For an exception, see `bind space`. Only mouse button 1 can be bound, and only for 2D plots. You get the list of all hotkeys by typing `show bind` or `bind` or by typing the hotkey 'h' in the graph window. Key bindings are restored to their default state by `reset bind`. Note that multikey-bindings with modifiers must be given in quotes. Normally hotkeys are only recognized when the currently active plot window has focus. `bind allwindows <key> ...` (short form: `bind all <key> ...`) causes the binding for <key> to apply to all gnuplot plot windows, active or not. In this case gnuplot variable MOUSE_KEY_WINDOW is set to the ID of the originating window, and may be used by the bound command. Examples: - set bindings: @example bind a "replot" bind "ctrl-a" "plot x*x" bind "ctrl-alt-a" 'print "great"' bind Home "set view 60,30; replot" bind all Home 'print "This is window ",MOUSE_KEY_WINDOW' @end example - show bindings: @example bind "ctrl-a" # shows the binding for ctrl-a bind # shows all bindings show bind # show all bindings @end example - remove bindings: @example bind "ctrl-alt-a" "" # removes binding for ctrl-alt-a (note that builtins cannot be removed) reset bind # installs default (builtin) bindings bind! # deprecated form of "reset bind" @end example - bind a key to toggle something: @example v=0 bind "ctrl-r" "v=v+1;if(v%2)set term x11 noraise; else set term x11 raise" @end example Modifiers (ctrl / alt) are case insensitive, keys not: @example ctrl-alt-a == CtRl-alT-a ctrl-alt-a != ctrl-alt-A @end example List of modifiers (alt == meta): @example ctrl, alt @end example List of supported special keys: @example "BackSpace", "Tab", "Linefeed", "Clear", "Return", "Pause", "Scroll_Lock", "Sys_Req", "Escape", "Delete", "Home", "Left", "Up", "Right", "Down", "PageUp", "PageDown", "End", "Begin", @end example @example "KP_Space", "KP_Tab", "KP_Enter", "KP_F1", "KP_F2", "KP_F3", "KP_F4", "KP_Home", "KP_Left", "KP_Up", "KP_Right", "KP_Down", "KP_PageUp", "KP_PageDown", "KP_End", "KP_Begin", "KP_Insert", "KP_Delete", "KP_Equal", "KP_Multiply", "KP_Add", "KP_Separator", "KP_Subtract", "KP_Decimal", "KP_Divide", @end example @example "KP_1" - "KP_9", "F1" - "F12" @end example The following are window events rather than actual keys @example "Button1" "Close" @end example See also help for `mouse`. @menu * bind_space:: @end menu @node bind_space, , bind, bind @subsubsection bind space @c ?commands bind space @c ?bind space If gnuplot was built with configuration option --enable-raise-console, then typing <space> in the plot window raises gnuplot's command window. This hotkey can be changed to ctrl-space by starting gnuplot as 'gnuplot -ctrlq', or by setting the XResource 'gnuplot*ctrlq'. See `x11 command-line-options`. @node Mouse_variables, , bind, mouse_input @subsection Mouse variables @c ?mouse variables When `mousing` is active, clicking in the active window will set several user variables that can be accessed from the gnuplot command line. The coordinates of the mouse at the time of the click are stored in MOUSE_X MOUSE_Y MOUSE_X2 and MOUSE_Y2. The mouse button clicked, and any meta-keys active at that time, are stored in MOUSE_BUTTON MOUSE_SHIFT MOUSE_ALT and MOUSE_CTRL. These variables are set to undefined at the start of every plot, and only become defined in the event of a mouse click in the active plot window. To determine from a script if the mouse has been clicked in the active plot window, it is sufficient to test for any one of these variables being defined. @example plot 'something' pause mouse if (defined(MOUSE_BUTTON)) call 'something_else'; \ else print "No mouse click." @end example It is also possible to track keystrokes in the plot window using the mousing code. @example plot 'something' pause mouse keypress print "Keystroke ", MOUSE_KEY, " at ", MOUSE_X, " ", MOUSE_Y @end example When `pause mouse keypress` is terminated by a keypress, then MOUSE_KEY will contain the ascii character value of the key that was pressed. MOUSE_CHAR will contain the character itself as a string variable. If the pause command is terminated abnormally (e.g. by ctrl-C or by externally closing the plot window) then MOUSE_KEY will equal -1. Note that after a zoom by mouse, you can read the new ranges as GPVAL_X_MIN, GPVAL_X_MAX, GPVAL_Y_MIN, and GPVAL_Y_MAX, see @ref{variables}. @node Plotting, Start-up_(initialization), mouse_input, gnuplot @section Plotting @cindex plotting There are three `gnuplot` commands which actually create a plot: `plot`, `splot` and @ref{replot}. `plot` generates 2D plots, `splot` generates 3D plots (actually 2D projections, of course), and @ref{replot} appends its arguments to the previous `plot` or `splot` and executes the modified command. Much of the general information about plotting can be found in the discussion of `plot`; information specific to 3D can be found in the `splot` section. `plot` operates in either rectangular or polar coordinates -- see `set polar` for details of the latter. `splot` operates only in rectangular coordinates, but the @ref{mapping} command allows for a few other coordinate systems to be treated. In addition, the @ref{using} option allows both `plot` and `splot` to treat almost any coordinate system you'd care to define. @cindex axes `plot` also lets you use each of the four borders -- x (bottom), x2 (top), y (left) and y2 (right) -- as an independent axis. The @ref{axes} option lets you choose which pair of axes a given function or data set is plotted against. A full complement of `set` commands exists to give you complete control over the scales and labelling of each axis. Some commands have the name of an axis built into their names, such as @ref{xlabel}. Other commands have one or more axis names as options, such as `set logscale xy`. Commands and options controlling the z axis have no effect on 2D graphs. `splot` can plot surfaces and contours in addition to points and/or lines. See @ref{isosamples} for information about defining the grid for a 3D function. See @ref{datafile} for information about the requisite file structure for 3D data values, @ref{contour} and @ref{cntrparam} for information about contours. In `splot`, control over the scales and labels of the axes are the same as with `plot`, except that commands and options controlling the x2 and y2 axes have no effect whereas of course those controlling the z axis do take effect. @node Start-up_(initialization), String_constants_and_string_variables, Plotting, gnuplot @section Start-up (initialization) @cindex startup @cindex start @cindex start-up @cindex initialization @cindex .gnuplot When gnuplot is run, it first looks for a system-wide initialization file named `gnuplotrc`. The location of this file is determined when the program is built and is reported by @ref{loadpath}. The program then looks in the user's HOME directory for a file called `.gnuplot` on Unix-like systems or `GNUPLOT.INI` on other systems. (Windows and OS/2 will look for it in the directory named in the environment variable `GNUPLOT`; Windows will use `USERPROFILE` if GNUPLOT is not defined). Note: The program can be configured to look first in the current directory, but this is not recommended because it is bad security practice. @node String_constants_and_string_variables, Substitution_and_Command_line_macros, Start-up_(initialization), gnuplot @section String constants and string variables @cindex strings @c ?string variables In addition to string constants, most gnuplot commands also accept a string variable, a string expression, or a function that returns a string. For example, the following four methods of creating a plot all result in the same plot title: @example four = "4" graph4 = "Title for plot #4" graph(n) = sprintf("Title for plot #%d",n) @end example @example plot 'data.4' title "Title for plot #4" plot 'data.4' title graph4 plot 'data.4' title "Title for plot #".four plot 'data.4' title graph(4) @end example Since integers are promoted to strings when operated on by the string concatenation operator, the following method also works: @example N = 4 plot 'data.'.N title "Title for plot #".N @end example In general, elements on the command line will only be evaluated as possible string variables if they are not otherwise recognizable as part of the normal gnuplot syntax. So the following sequence of commands is legal, although probably should be avoided so as not to cause confusion: @example plot = "my_datafile.dat" title = "My Title" plot plot title title @end example There are three binary operators that require string operands: the string concatenation operator ".", the string equality operator "eq" and the string inequality operator "ne". The following example will print TRUE. @example if ("A"."B" eq "AB") print "TRUE" @end example See also the two string formatting functions @ref{gprintf} and @ref{sprintf}. @cindex substring Substrings can be specified by appending a range specifier to any string, string variable, or string-valued function. The range specifier has the form [begin:end], where begin is the index of the first character of the substring and end is the index of the last character of the substring. The first character has index 1. The begin or end fields may be empty, or contain '*', to indicate the true start or end of the original string. E.g. str[:] and str[*:*] both describe the full string str. @node Substitution_and_Command_line_macros, Syntax, String_constants_and_string_variables, gnuplot @section Substitution and Command line macros @cindex substitution When a command line to gnuplot is first read, i.e. before it is interpreted or executed, two forms of lexical substitution are performed. These are triggered by the presence of text in backquotes (ascii character 96) or preceded by @@ (ascii character 64). @menu * Substitution_of_system_commands_in_backquotes:: * Substitution_of_string_variables_as_macros:: * String_variables:: @end menu @node Substitution_of_system_commands_in_backquotes, Substitution_of_string_variables_as_macros, Substitution_and_Command_line_macros, Substitution_and_Command_line_macros @subsection Substitution of system commands in backquotes @c ?substitution backquotes @cindex backquotes @c ?shell commands Command-line substitution is specified by a system command enclosed in backquotes. This command is spawned and the output it produces replaces the backquoted text on the command line. Some implementations also support pipes; see @ref{special-filenames}. Command-line substitution can be used anywhere on the `gnuplot` command line, except inside strings delimited by single quotes. Example: This will run the program `leastsq` and replace `leastsq` (including backquotes) on the command line with its output: @example f(x) = `leastsq` @end example or, in VMS @example f(x) = `run leastsq` @end example These will generate labels with the current time and userid: @example set label "generated on `date +%Y-%m-%d` by `whoami`" at 1,1 set timestamp "generated on %Y-%m-%d by `whoami`" @end example @node Substitution_of_string_variables_as_macros, String_variables, Substitution_of_system_commands_in_backquotes, Substitution_and_Command_line_macros @subsection Substitution of string variables as macros @c ?substitution macros @cindex macros @opindex macros @cindex exists @findex exists Substitution of command line macros is disabled by default, but may be enabled using the @ref{macros} command. If macro substitution is enabled, the character @@ is used to trigger substitution of the current value of a string variable into the command line. The text in the string variable may contain any number of lexical elements. This allows string variables to be used as command line macros. Only string constants may be expanded using this mechanism, not string-valued expressions. For example: @example set macros style1 = "lines lt 4 lw 2" style2 = "points lt 3 pt 5 ps 2" range1 = "using 1:3" range2 = "using 1:5" plot "foo" @@range1 with @@style1, "bar" @@range2 with @@style2 @end example The line containing @@ symbols is expanded on input, so that by the time it is executed the effect is identical to having typed in full @example plot "foo" using 1:3 with lines lt 4 lw 2, \ "bar" using 1:5 with points lt 3 pt 5 ps 2 @end example The function exists() may be useful in connection with macro evaluation. The following example checks that C can safely be expanded as the name of a user-defined variable: @example C = "pi" if (exists(C)) print C," = ", @@C @end example Macro expansion does not occur inside either single or double quotes. However macro expansion does occur inside backquotes. Macro expansion is handled as the very first thing the interpreter does when looking at a new line of commands and is only done once. Therefore, code like the following will execute correctly: @example A = "c=1" @@A @end example but this line will not, since the macro is defined on the same line and will not be expanded in time @example A = "c=1"; @@A # will not expand to c=1 @end example For execution of complete commands the @ref{evaluate} command may also be handy. @node String_variables, , Substitution_of_string_variables_as_macros, Substitution_and_Command_line_macros @subsection String variables, macros, and command line substitution @cindex mixing_macros_backquotes @c ?substitution mixing_macros_backquotes The interaction of string variables, backquotes and macro substitution is somewhat complicated. Backquotes do not block macro substitution, so @example filename = "mydata.inp" lines = ` wc --lines @@filename | sed "s/ .*//" ` @end example results in the number of lines in mydata.inp being stored in the integer variable lines. And double quotes do not block backquote substitution, so @example mycomputer = "`uname -n`" @end example results in the string returned by the system command `uname -n` being stored in the string variable mycomputer. However, macro substitution is not performed inside double quotes, so you cannot define a system command as a macro and then use both macro and backquote substitution at the same time. @example machine_id = "uname -n" mycomputer = "`@@machine_id`" # doesn't work!! @end example This fails because the double quotes prevent @@machine_id from being interpreted as a macro. To store a system command as a macro and execute it later you must instead include the backquotes as part of the macro itself. This is accomplished by defining the macro as shown below. Notice that the sprintf format nests all three types of quotes. @example machine_id = sprintf('"`uname -n`"') mycomputer = @@machine_id @end example @node Syntax, Time/Date_data, Substitution_and_Command_line_macros, gnuplot @section Syntax @cindex syntax @cindex specify @cindex punctuation Options and any accompanying parameters are separated by spaces whereas lists and coordinates are separated by commas. Ranges are separated by colons and enclosed in brackets [], text and file names are enclosed in quotes, and a few miscellaneous things are enclosed in parentheses. Commas are used to separate coordinates on the `set` commands @ref{arrow}, `key`, and `label`; the list of variables being fitted (the list after the `via` keyword on the @ref{fit} command); lists of discrete contours or the loop parameters which specify them on the @ref{cntrparam} command; the arguments of the `set` commands @ref{dgrid3d}, @ref{dummy}, @ref{isosamples}, @ref{offsets}, @ref{origin}, @ref{samples}, @ref{size}, `time`, and @ref{view}; lists of tics or the loop parameters which specify them; the offsets for titles and axis labels; parametric functions to be used to calculate the x, y, and z coordinates on the `plot`, @ref{replot} and `splot` commands; and the complete sets of keywords specifying individual plots (data sets or functions) on the `plot`, @ref{replot} and `splot` commands. Parentheses are used to delimit sets of explicit tics (as opposed to loop parameters) and to indicate computations in the @ref{using} filter of the @ref{fit}, `plot`, @ref{replot} and `splot` commands. (Parentheses and commas are also used as usual in function notation.) Square brackets are used to delimit ranges given in `set`, `plot` or `splot` commands. Colons are used to separate extrema in `range` specifications (whether they are given on `set`, `plot` or `splot` commands) and to separate entries in the @ref{using} filter of the `plot`, @ref{replot}, `splot` and @ref{fit} commands. Semicolons are used to separate commands given on a single command line. Curly braces are used in the syntax for enhanced text mode and to delimit blocks in if/then/else statements. They are also used to denote complex numbers: @{3,2@} = 3 + 2i. The EEPIC, Imagen, Uniplex, LaTeX, and TPIC drivers allow a newline to be specified by \\ in a single-quoted string or \\\\ in a double-quoted string. @menu * Quote_Marks:: @end menu @node Quote_Marks, , Syntax, Syntax @subsection Quote Marks @cindex quotes @c ?syntax quotes Gnuplot uses three forms of quote marks for delimiting text strings, double-quote (ascii 34), single-quote (ascii 39), and backquote (ascii 96). Filenames may be entered with either single- or double-quotes. In this manual the command examples generally single-quote filenames and double-quote other string tokens for clarity. String constants and text strings used for labels, titles, or other plot elements may be enclosed in either single quotes or double quotes. Further processing of the quoted text depends on the choice of quote marks. Backslash processing of special characters like \n (newline) and \345 (octal character code) is performed for double-quoted strings. In single-quoted strings, backslashes are just ordinary characters. To get a single-quote (ascii 39) in a single-quoted string, it has to be doubled. Thus the strings "d\" s' b\\" and 'd" s'' b\' are completely equivalent. Text justification is the same for each line of a multi-line string. Thus the center-justified string @example "This is the first line of text.\nThis is the second line." @end example will produce @example This is the first line of text. This is the second line. @end example but @example 'This is the first line of text.\nThis is the second line.' @end example will produce @example This is the first line of text.\nThis is the second line. @end example Enhanced text processing is performed for both double-quoted text and single-quoted text, but only by terminals supporting this mode. See `enhanced text`. Back-quotes are used to enclose system commands for substitution into the command line. See `substitution`. @node Time/Date_data, , Syntax, gnuplot @section Time/Date data @cindex time/date `gnuplot` supports the use of time and/or date information as input data. This feature is activated by the commands `set xdata time`, `set ydata time`, etc. Internally all times and dates are converted to the number of seconds from the year 2000. The command @ref{timefmt} defines the format for all inputs: data files, ranges, tics, label positions---in short, anything that accepts a data value must receive it in this format. Since only one input format can be in force at a given time, all time/date quantities being input at the same time must be presented in the same format. Thus if both x and y data in a file are time/date, they must be in the same format. The conversion to and from seconds assumes Universal Time (which is the same as Greenwich Standard Time). There is no provision for changing the time zone or for daylight savings. If all your data refer to the same time zone (and are all either daylight or standard) you don't need to worry about these things. But if the absolute time is crucial for your application, you'll need to convert to UT yourself. Commands like @ref{xrange} will re-interpret the integer according to @ref{timefmt}. If you change @ref{timefmt}, and then `show` the quantity again, it will be displayed in the new @ref{timefmt}. For that matter, if you give the deactivation command (like @ref{xdata}), the quantity will be shown in its numerical form. The commands `set format` or `set tics format` define the format that will be used for tic labels, whether or not the specified axis is time/date. If time/date information is to be plotted from a file, the @ref{using} option _must_ be used on the `plot` or `splot` command. These commands simply use white space to separate columns, but white space may be embedded within the time/date string. If you use tabs as a separator, some trial-and-error may be necessary to discover how your system treats them. The `time` function can be used to get the current system time. This value can be converted to a date string with the @ref{strftime} function, or it can be used in conjunction with @ref{timecolumn} to generate relative time/date plots. The type of the argument determines what is returned. If the argument is an integer, `time` returns the current time as an integer, in seconds from 1 Jan 2000. If the argument is real (or complex), the result is real as well. The precision of the fractional (sub-second) part depends on your operating system. If the argument is a string, it is assumed to be a format string, and it is passed to @ref{strftime} to provide a formatted time/date string. The following example demonstrates time/date plotting. Suppose the file "data" contains records like @example 03/21/95 10:00 6.02e23 @end example This file can be plotted by @example set xdata time set timefmt "%m/%d/%y" set xrange ["03/21/95":"03/22/95"] set format x "%m/%d" set timefmt "%m/%d/%y %H:%M" plot "data" using 1:3 @end example which will produce xtic labels that look like "03/21". See `time_specifiers`. @node plotting_styles, Commands, gnuplot, Top @chapter plotting styles @c ?plotting styles There are many plotting styles available in gnuplot. They are listed alphabetically below. The commands `set style data` and `set style function` change the default plotting style for subsequent `plot` and `splot` commands. You also have the option to specify the plot style explicitly as part of the `plot` or `splot` command. If you want to mix plot styles within a single plot, you must specify the plot style for each component. Example: @example plot 'data' with boxes, sin(x) with lines @end example Each plot style has its own expected set of data entries in a data file. For example by default the `lines` style expects either a single column of y values (with implicit x ordering) or a pair of columns with x in the first and y in the second. For more information on how to fine-tune how columns in a file are interpreted as plot data, see @ref{using}. @menu * boxerrorbars:: * boxes:: * boxplot:: * boxxyerrorbars:: * candlesticks:: * circles:: * ellipses:: * dots:: * filledcurves:: * financebars:: * fsteps:: * fillsteps:: * histeps:: * histograms:: * image:: * impulses:: * labels:: * lines:: * linespoints:: * points:: * polar:: * steps:: * rgbalpha:: * rgbimage:: * vectors:: * xerrorbars:: * xyerrorbars:: * yerrorbars:: * xerrorlines:: * xyerrorlines:: * yerrorlines:: * 3D_(surface)_plots:: @end menu @node boxerrorbars, boxes, plotting_styles, plotting_styles @section boxerrorbars @c ?commands set style boxerrorbars @c ?set style boxerrorbars @c ?plotting styles boxerrorbars @c ?style boxerrorbars @cindex boxerrorbars The @ref{boxerrorbars} style is only relevant to 2D data plotting. It is a combination of the @ref{boxes} and @ref{yerrorbars} styles. It uses 3, 4, or 5 columns of data: @example 3 columns: x y ydelta 4 columns: x y ydelta xdelta # boxwidth != -2 4 columns: x y ylow yhigh # boxwidth == -2 5 columns: x y ylow yhigh xdelta @end example The boxwidth will come from the fourth column if the y errors are given as "ydelta" and the boxwidth was not previously set to -2.0 (`set boxwidth -2.0`) or from the fifth column if the y errors are in the form of "ylow yhigh". The special case `boxwidth = -2.0` is for four-column data with y errors in the form "ylow yhigh". In this case the boxwidth will be calculated so that each box touches the adjacent boxes. The width will also be calculated in cases where three-column data are used. An additional (4th, 5th or 6th) input column may be used to provide variable (per-datapoint) color information (see `linecolor` and `rgbcolor variable`). The error bar will be drawn in the same color as the border of the box. The box height is determined from the y error in the same way as it is for the @ref{yerrorbars} style---either from y-ydelta to y+ydelta or from ylow to yhigh, depending on how many data columns are provided. See also @uref{http://www.gnuplot.info/demo/mgr.html,errorbar demo. } @node boxes, boxplot, boxerrorbars, plotting_styles @section boxes @c ?commands set style boxes @c ?set style boxes @c ?plotting styles boxes @c ?style boxes @cindex boxes The @ref{boxes} style is only relevant to 2D plotting. It draws a box centered about the given x coordinate that extends from the x axis (not from the graph border) to the given y coordinate. It uses 2 or 3 columns of basic data. Additional input columns may be used to provide information such as variable line or fill color (see `rgbcolor variable`). @example 2 columns: x y 3 columns: x y x_width @end example The width of the box is obtained in one of three ways. If the input data has a third column, this will be used to set the width of the box. If not, if a width has been set using the @ref{boxwidth} command, this will be used. If neither of these is available, the width of each box will be calculated automatically so that it touches the adjacent boxes. The interior of the boxes is drawn according to the current fillstyle. See `set style fill` for details. Alternatively a new fillstyle may be specified in the plot command. For fillstyle `empty` the box is not filled. For fillstyle `solid` the box is filled with a solid rectangle of the current drawing color. There is an optional parameter <density> that controls the fill density; it runs from 0 (background color) to 1 (current drawing color). For fillstyle `pattern` the box is filled in the current drawing color with a pattern, if supported by the terminal driver. Examples: To plot a data file with solid filled boxes with a small vertical space separating them (bargraph): @example set boxwidth 0.9 relative set style fill solid 1.0 plot 'file.dat' with boxes @end example To plot a sine and a cosine curve in pattern-filled boxes style: @example set style fill pattern plot sin(x) with boxes, cos(x) with boxes @end example The sin plot will use pattern 0; the cos plot will use pattern 1. Any additional plots would cycle through the patterns supported by the terminal driver. To specify explicit fillstyles for each dataset: @example plot 'file1' with boxes fs solid 0.25, \ 'file2' with boxes fs solid 0.50, \ 'file3' with boxes fs solid 0.75, \ 'file4' with boxes fill pattern 1, \ 'file5' with boxes fill empty @end example @node boxplot, boxxyerrorbars, boxes, plotting_styles @section boxplot @c ?plotting styles boxplot @c ?style boxplot @cindex boxplot Boxplots are a common way to represent a statistical distribution of values. Quartile boundaries are determined such that 1/4 of the points have a value equal or less than the first quartile boundary, 1/2 of the points have a value equal or less than the second quartile (median) value, etc. A box is drawn around the region between the first and third quartiles, with a horizontal line at the median value. Whiskers extend from the box to user-specified limits. Points that lie outside these limits are drawn individually. Examples @example # Place a boxplot at x coordinate 1.0 representing the y values in column 5 plot 'data' using (1.0):5 @end example @example # Same plot but suppress outliers and force the width of the boxplot to 0.3 set style boxplot nooutliers plot 'data' using (1.0):5:(0.3) @end example By default only one boxplot is produced that represents all y values from the second column of the using specification. However, an additional (fourth) colunm can be added to the specification. If present, the values of that column will be interpreted as the discrete levels of a factor variable. As many boxplots will be drawn as there are levels in the factor variable. The separation between these boxplots is 1.0 by default, but it can be changed by `set style boxplot separation`. By default, the value of the factor variable is shown as a tic label below (or above) each boxplot. Example @example # Suppose that column 2 of 'data' contains either "control" or "treatment" # The following example produces two boxplots, one for each level of the # factor plot 'data' using (1.0):5:(0):2 @end example The default width of the box can be set via `set boxwidth <width>` or may be specified as an optional 3rd column in the @ref{using} clause of the plot command. The first and third columns (x coordinate and width) are normally provided as constants rather than as data columns. By default the whiskers extend from the ends of the box to the most distant point whose y value lies within 1.5 times the interquartile range. By default outliers are drawn as circles (point type 7). The width of the bars at the end of the whiskers may be controlled using @ref{bars}. These default properties may be changed using the @ref{boxplot} command. See @ref{boxplot}, @ref{bars}, @ref{boxwidth}, `fillstyle`, @ref{candlesticks}. @node boxxyerrorbars, candlesticks, boxplot, plotting_styles @section boxxyerrorbars @c ?commands set style boxxyerrorbars @c ?set style boxxyerrorbars @c ?plotting styles boxxyerrorbars @c ?style boxxyerrorbars @cindex boxxyerrorbars The @ref{boxxyerrorbars} style is only relevant to 2D data plotting. It is similar to the @ref{xyerrorbars} style except that it draws rectangular areas rather than simple crosses. It uses either 4 or 6 basic columns of input data. Additional input columns may be used to provide information such as variable line or fill color (see `rgbcolor variable`). @example 4 columns: x y xdelta ydelta 6 columns: x y xlow xhigh ylow yhigh @end example The box width and height are determined from the x and y errors in the same way as they are for the @ref{xyerrorbars} style---either from xlow to xhigh and from ylow to yhigh, or from x-xdelta to x+xdelta and from y-ydelta to y+ydelta, depending on how many data columns are provided. An additional (5th or 7th) input column may be used to provide variable (per-datapoint) color information (see `linecolor` and `rgbcolor variable`). The interior of the boxes is drawn according to the current fillstyle. See `set style fill` and @ref{boxes} for details. Alternatively a new fillstyle may be specified in the plot command. @node candlesticks, circles, boxxyerrorbars, plotting_styles @section candlesticks @c ?commands set style candlesticks @c ?set style candlesticks @c ?plotting styles candlesticks @c ?style candlesticks @cindex candlesticks The @ref{candlesticks} style can be used for 2D data plotting of financial data or for generating box-and-whisker plots of statistical data. The symbol is a rectangular box, centered horizontally at the x coordinate and limited vertically by the opening and closing prices. A vertical line segment at the x coordinate extends up from the top of the rectangle to the high price and another down to the low. The vertical line will be unchanged if the low and high prices are interchanged. Five columns of basic data are required: @example financial data: date open low high close whisker plot: x box_min whisker_min whisker_high box_high @end example The width of the rectangle can be controlled by the @ref{boxwidth} command. For backwards compatibility with earlier gnuplot versions, when the boxwidth parameter has not been set then the width of the candlestick rectangle is controlled by `set bars <width>`. Alternatively, an explicit width for each box-and-whiskers grouping may be specified in an optional 6th column of data. The width must be given in the same units as the x coordinate. An additional (6th, or 7th if the 6th column is used for width data) input column may be used to provide variable (per-datapoint) color information (see `linecolor` and `rgbcolor variable`). By default the vertical line segments have no crossbars at the top and bottom. If you want crossbars, which are typically used for box-and-whisker plots, then add the keyword `whiskerbars` to the plot command. By default these whiskerbars extend the full horizontal width of the candlestick, but you can modify this by specifying a fraction of the full width. The usual convention for financial data is that the rectangle is empty if (open < close) and solid fill if (close < open). This is the behavior you will get if the current fillstyle is set to "empty". See `fillstyle`. If you set the fillstyle to solid or pattern, then this will be used for all boxes independent of open and close values. See also @ref{bars} and @ref{financebars}. See also the @uref{http://www.gnuplot.info/demo/candlesticks.html,candlestick } and @uref{http://www.gnuplot.info/demo/finance.html,finance } demos. Note: To place additional symbols, such as the median value, on a box-and-whisker plot requires additional plot commands as in this example: @example # Data columns:X Min 1stQuartile Median 3rdQuartile Max set bars 4.0 set style fill empty plot 'stat.dat' using 1:3:2:6:5 with candlesticks title 'Quartiles', \ '' using 1:4:4:4:4 with candlesticks lt -1 notitle @end example @example # Plot with crossbars on the whiskers, crossbars are 50% of full width plot 'stat.dat' using 1:3:2:6:5 with candlesticks whiskerbars 0.5 @end example See @ref{boxwidth}, @ref{bars}, `set style fill`, and @ref{boxplot}. @node circles, ellipses, candlesticks, plotting_styles @section circles @c ?commands set style circles @c ?set style circles @c ?plotting styles circles @c ?style circles @cindex circles The @ref{circles} style plots a circle with an explicit radius at each data point. If three columns of data are present, they are interpreted as x, y, radius. The radius is always interpreted in the units of the plot's horizontal axis (x or x2). The scale on y and the aspect ratio of the plot are both ignored. If only two columns are present, the radius is taken from `set style circle`. In this case the radius may be given in graph or screen coordinates. By default a full circle will be drawn. It is possible to plot arc segments instead of full circles by specifying a start and end angle in the 4th and 5th columns. An optional 4th or 6th column can specify per-circle color. The start and end angles of the circle segments must be specified in degrees. Examples: @example # draws circles whose area is proportional to the value in column 3 set style fill transparent solid 0.2 noborder plot 'data' using 1:2:(sqrt($3)) with circles, \ 'data' using 1:2 with linespoints @end example @example # draws Pac-men instead of circles plot 'data' using 1:2:(10):(40):(320) with circles @end example @example # draw a pie chart with inline data set xrange [-15:15] set style fill transparent solid 0.9 noborder plot '-' using 1:2:3:4:5:6 with circles lc var 0 0 5 0 30 1 0 0 5 30 70 2 0 0 5 70 120 3 0 0 5 120 230 4 0 0 5 230 360 5 e @end example The result is similar to using a `points` plot with variable size points and pointstyle 7, except that the circles will scale with the x axis range. See also `set object circle` and `fillstyle`. @node ellipses, dots, circles, plotting_styles @section ellipses @c ?plotting styles ellipses @c ?style ellipses @cindex ellipses The @ref{ellipses} style plots an ellipse at each data point. This style is only relevant for 2D plotting. Each ellipse is described in terms of its center, major and minor diameters, and the angle between its major diameter and the x axis. @example 2 columns: x y 3 columns: x y major_diam 4 columns: x y major_diam minor_diam 5 columns: x y major_diam minor_diam angle @end example If only two input columns are present, they are taken as the coordinates of the centers, and the ellipses will be drawn with the default extent (see `set style ellipse`). The orientation of the ellipse, which is defined as the angle between the major diameter and the plot's x axis, is taken from the default ellipse style (see `set style ellipse`). If three input columns are provided, the third column is used for both diameters. The orientation angle defaults to zero. If four columns are present, they are interpreted as x, y, major diameter, minor diameter. Note that these are diameters, not radii. An optional 5th column may be used to specify the orientation angle in degrees. The ellipses will also be drawn with their default extent if either of the supplied diameters in the 3-4-5 column form is negative. In all of the above cases, optional variable color data may be given in an additional last (3th, 4th, 5th or 6th) column. See @ref{colorspec} for further information. By default, the major diameter is interpreted in the units of the plot's horizontal axis (x or x2) while the minor diameter in that of the vertical (y or y2). This implies that if the x and y axis scales are not equal, then the major/minor diameter ratio will no longer be correct after rotation. This behavior can be changed with the `units` keyword, however. There are three alternatives: if `units xy` is included in the plot specification, the axes will be scaled as described above. `units xx` ensures that both diameters are interpreted in units of the x axis, while `units yy` means that both diameters are interpreted in units of the y axis. In the latter two cases the ellipses will have the correct aspect ratio, even if the plot is resized. If `units` is omitted, the default setting will be used, which is equivalent to `units xy`. This can be redefined by `set style ellipse`. Example (draws ellipses, cycling through the available line types): @example plot 'data' using 1:2:3:4:(0):0 with ellipses @end example See also `set object ellipse`, `set style ellipse` and `fillstyle`. @node dots, filledcurves, ellipses, plotting_styles @section dots @c ?commands set style dots @c ?set style dots @c ?plotting styles dots @c ?style dots @cindex dots The @ref{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. @example 1 column y # x is row number 2 columns: x y 3 columns: x y z # 3D only (splot) @end example @node filledcurves, financebars, dots, plotting_styles @section filledcurves @c ?commands set style filledcurves @c ?set style filledcurves @c ?plotting styles filledcurves @c ?style filledcurves @cindex filledcurves The @ref{filledcurves} style is only relevant to 2D plotting. Three variants are possible. The first two variants require either a function or two columns of input data, and may be further modified by the options listed below. Syntax: @example plot ... with filledcurves [option] @end example where the option can be one of the following @example [closed | @{above | below@} @{x1 | x2 | y1 | y2 | r@}[=<a>] | xy=<x>,<y>] @end example The first variant, `closed`, treats the curve itself as a closed polygon. This is the default if there are two columns of input data. The second variant is to fill the area between the curve and a given axis, a horizontal or vertical line, or a point. @example filledcurves closed ... just filled closed curve, filledcurves x1 ... x1 axis, filledcurves x2 ... x2 axis, etc for y1 and y2 axes, filledcurves y1=0 ... line y=0 (at y1 axis) ie parallel to x1 axis, filledcurves y2=42 ... line y=42 (at y2 axis) ie parallel to x2, etc, filledcurves xy=10,20 ... point 10,20 of x1,y1 axes (arc-like shape). filledcurves above r=1.5 the area of a polar plot outside radius 1.5 @end example The third variant requires three columns of input data: the x coordinate and two y coordinates corresponding to two curves sampled at the same set of x coordinates; the area between the two curves is filled. This is the default if there are three or more columns of input data. @example 3 columns: x y1 y2 @end example Example of filling the area between two input curves. @uref{http://www.gnuplot.info/demo/fillbetween.html,fill between curves demo. } @example plot 'data' using 1:2:3 with filledcurves @end example The `above` and `below` options apply both to commands of the form @example ... filledcurves above @{x1|x2|y1|y2|r@}=<val> @end example and to commands of the form @example ... using 1:2:3 with filledcurves below @end example In either case the option limits the filled area to one side of the bounding line or curve. Note: Not all terminal types support this plotting mode. Zooming a filled curve drawn from a datafile may produce empty or incorrect areas because gnuplot is clipping points and lines, and not areas. If the values of <a>, <x>, <y> are out of the drawing boundary, then they are moved to the graph boundary. Then the actually filled area in the case of option xy=<x>,<y> will depend on xrange and yrange. @node financebars, fsteps, filledcurves, plotting_styles @section financebars @c ?commands set style financebars @c ?set style financebars @c ?plotting styles financebars @c ?style financebars @cindex financebars The @ref{financebars} style is only relevant for 2D data plotting of financial data. It requires 1 x coordinate (usually a date) and 4 y values (prices). @example 5 columns: date open low high close @end example An additional (6th) input column may be used to provide variable (per-record) color information (see `linecolor` and `rgbcolor variable`). The symbol is a vertical line segment, located horizontally at the x coordinate and limited vertically by the high and low prices. A horizontal tic on the left marks the opening price and one on the right marks the closing price. The length of these tics may be changed by @ref{bars}. The symbol will be unchanged if the high and low prices are interchanged. See @ref{bars} and @ref{candlesticks}, and also the @uref{http://www.gnuplot.info/demo/finance.html,finance demo. } @node fsteps, fillsteps, financebars, plotting_styles @section fsteps @c ?commands set style fsteps @c ?set style fsteps @c ?plotting styles fsteps @c ?style fsteps @cindex fsteps The @ref{fsteps} style is only relevant to 2D plotting. It connects consecutive points with two line segments: the first from (x1,y1) to (x1,y2) and the second from (x1,y2) to (x2,y2). The input column requires are the same as for plot styles `lines` and `points`. The difference between @ref{fsteps} and @ref{steps} is that @ref{fsteps} traces first the change in y and then the change in x. @ref{steps} traces first the change in x and then the change in y. See also @uref{http://www.gnuplot.info/demo/steps.html,steps demo. } @node fillsteps, histeps, fsteps, plotting_styles @section fillsteps @c ?commands set style fillsteps @c ?set style fillsteps @c ?style fillsteps @cindex fillsteps The @ref{fillsteps} style is exactly like @ref{steps} except that the area between the curve and y=0 is filled in the current fill style. See @ref{steps}. @node histeps, histograms, fillsteps, plotting_styles @section histeps @c ?commands set style histeps @c ?set style histeps @c ?plotting styles histeps @c ?style histeps @cindex histeps The @ref{histeps} style is only relevant to 2D plotting. It is intended for plotting histograms. Y-values are assumed to be centered at the x-values; the point at x1 is represented as a horizontal line from ((x0+x1)/2,y1) to ((x1+x2)/2,y1). The lines representing the end points are extended so that the step is centered on at x. Adjacent points are connected by a vertical line at their average x, that is, from ((x1+x2)/2,y1) to ((x1+x2)/2,y2). The input column requires are the same as for plot styles `lines` and `points`. If @ref{autoscale} is in effect, it selects the xrange from the data rather than the steps, so the end points will appear only half as wide as the others. See also @uref{http://www.gnuplot.info/demo/steps.html,steps demo. } @ref{histeps} is only a plotting style; `gnuplot` does not have the ability to create bins and determine their population from some data set. @node histograms, image, histeps, plotting_styles @section histograms @c ?commands set style histogram @c ?set style histogram @c ?style histograms @c ?plotting styles histograms @cindex histograms The @ref{histograms} style is only relevant to 2D plotting. It produces a bar chart from a sequence of parallel data columns. Each element of the `plot` command must specify a single input data source (e.g. one column of the input file), possibly with associated tic values or key titles. Four styles of histogram layout are currently supported. @example set style histogram clustered @{gap <gapsize>@} set style histogram errorbars @{gap <gapsize>@} @{<linewidth>@} set style histogram rowstacked set style histogram columnstacked @end example The default style corresponds to `set style histogram clustered gap 2`. In this style, each set of parallel data values is collected into a group of boxes clustered at the x-axis coordinate corresponding to their sequential position (row #) in the selected datafile columns. Thus if <n> datacolumns are selected, the first cluster is centered about x=1, and contains <n> boxes whose heights are taken from the first entry in the corresponding <n> data columns. This is followed by a gap and then a second cluster of boxes centered about x=2 corresponding to the second entry in the respective data columns, and so on. The default gap width of 2 indicates that the empty space between clusters is equivalent to the width of 2 boxes. All boxes derived from any one column are given the same fill color and/or pattern (see `set style fill`). Each cluster of boxes is derived from a single row of the input data file. It is common in such input files that the first element of each row is a label. Labels from this column may be placed along the x-axis underneath the appropriate cluster of boxes with the `xticlabels` option to @ref{using}. The @ref{errorbars} style is very similar to the `clustered` style, except that it requires additional columns of input for each entry. The first column holds the height (y value) of that box, exactly as for the `clustered` style. @example 2 columns: y yerr bar extends from y-yerr to y+err 3 columns: y ymin yman bar extends from ymin to ymax @end example The appearance of the error bars is controlled by the current value of @ref{bars} and by the optional <linewidth> specification. Two styles of stacked histogram are supported, chosen by the command `set style histogram @{rowstacked|columnstacked@}`. In these styles the data values from the selected columns are collected into stacks of boxes. Positive values stack upwards from y=0; negative values stack downwards. Mixed positive and negative values will produce both an upward stack and a downward stack. The default stacking mode is `rowstacked`. The `rowstacked` style places a box resting on the x-axis for each data value in the first selected column; the first data value results in a box a x=1, the second at x=2, and so on. Boxes corresponding to the second and subsequent data columns are layered on top of these, resulting in a stack of boxes at x=1 representing the first data value from each column, a stack of boxes at x=2 representing the second data value from each column, and so on. All boxes derived from any one column are given the same fill color and/or pattern (see `set style fill`). The `columnstacked` style is similar, except that each stack of boxes is built up from a single data column. Each data value from the first specified column yields a box in the stack at x=1, each data value from the second specified column yields a box in the stack at x=2, and so on. In this style the color of each box is taken from the row number, rather than the column number, of the corresponding data field. Box widths may be modified using the @ref{boxwidth} command. Box fill styles may be set using the `set style fill` command. Histograms always use the x1 axis, but may use either y1 or y2. If a plot contains both histograms and other plot styles, the non-histogram plot elements may use either the x1 or the x2 axis. Examples: Suppose that the input file contains data values in columns 2, 4, 6, ... and error estimates in columns 3, 5, 7, ... This example plots the values in columns 2 and 4 as a histogram of clustered boxes (the default style). Because we use iteration in the plot command, any number of data columns can be handled in a single command. See @ref{iteration}. @example set boxwidth 0.9 relative set style data histograms set style histogram cluster set style fill solid 1.0 border lt -1 plot for [COL=2:4:2] 'file.dat' using COL @end example This will produce a plot with clusters of two boxes (vertical bars) centered at each integral value on the x axis. If the first column of the input file contains labels, they may be placed along the x-axis using the variant command @example plot for [COL=2:4:2] 'file.dat' using COL:xticlabels(1) @end example If the file contains both magnitude and range information for each value, then error bars can be added to the plot. The following commands will add error bars extending from (y-<error>) to (y+<error>), capped by horizontal bar ends drawn the same width as the box itself. The error bars and bar ends are drawn with linewidth 2, using the border linetype from the current fill style. @example set bars fullwidth set style fill solid 1 border lt -1 set style histogram errorbars gap 2 lw 2 plot for [COL=2:4:2] 'file.dat' using COL:COL+1 @end example To plot the same data as a rowstacked histogram. Just to be different, this example lists the separate columns explicitly rather than using iteration. @example set style histogram rowstacked plot 'file.dat' using 2, '' using 4:xtic(1) @end example This will produce a plot in which each vertical bar corresponds to one row of data. Each vertical bar contains a stack of two segments, corresponding in height to the values found in columns 2 and 4 of the datafile. Finally, the commands @example set style histogram columnstacked plot 'file.dat' using 2, '' using 4 @end example will produce two vertical stacks, one for each column of data. The stack at x=1 will contain a box for each entry in column 2 of the datafile. The stack at x=2 will contain a box for each parallel entry in column 4 of the datafile. Because this interchanges gnuplot's usual interpretation of input rows and columns, the specification of key titles and x-axis tic labels must also be modified accordingly. See the comments given below. @example set style histogram columnstacked plot '' u 5:key(1) # uses first column to generate key titles plot '' u 5 title columnhead # uses first row to generate xtic labels @end example Note that the two examples just given present exactly the same data values, but in different formats. @menu * newhistogram:: * automated_iteration_over_multiple_columns:: @end menu @node newhistogram, automated_iteration_over_multiple_columns, histograms, histograms @subsection newhistogram @cindex newhistogram @c ?histograms newhistogram @c ?plotting style histograms newhistogram Syntax: @example newhistogram @{"<title>"@} @{lt <linetype>@} @{fs <fillstyle>@} @{at <x-coord>@} @end example More than one set of histograms can appear in a single plot. In this case you can force a gap between them, and a separate label for each set, by using the @ref{newhistogram} command. For example @example set style histogram cluster plot newhistogram "Set A", 'a' using 1, '' using 2, '' using 3, \ newhistogram "Set B", 'b' using 1, '' using 2, '' using 3 @end example The labels "Set A" and "Set B" will appear beneath the respective sets of histograms, under the overall x axis label. The newhistogram command can also be used to force histogram coloring to begin with a specific color (linetype). By default colors will continue to increment successively even across histogram boundaries. Here is an example using the same coloring for multiple histograms @example plot newhistogram "Set A" lt 4, 'a' using 1, '' using 2, '' using 3, \ newhistogram "Set B" lt 4, 'b' using 1, '' using 2, '' using 3 @end example Similarly you can force the next histogram to begin with a specified fillstyle. If the fillstyle is set to `pattern`, then the pattern used for filling will be incremented automatically. The `at <x-coord>` option sets the x coordinate position of the following histogram to <x-coord>. For example @example set style histogram cluster set style data histogram set style fill solid 1.0 border -1 set xtic 1 offset character 0,0.3 plot newhistogram "Set A", \ 'file.dat' u 1 t 1, '' u 2 t 2, \ newhistogram "Set B" at 8, \ 'file.dat' u 2 t 2, '' u 2 t 2 @end example will position the second histogram to start at x=8. @node automated_iteration_over_multiple_columns, , newhistogram, histograms @subsection automated iteration over multiple columns @cindex automated @c ?histograms automated @c ?styles histograms automated @c ?plotting styles histograms automated If you want to create a histogram from many columns of data in a single file, it is very convenient to use the plot iteration feature. See @ref{iteration}. For example, to create stacked histograms of the data in columns 3 through 8 @example set style histogram columnstacked plot for [i=3:8] "datafile" using i title columnhead @end example @node image, impulses, histograms, plotting_styles @section image @c ?commands set style image @c ?set style image @c ?plotting styles image @c ?style image @cindex image @cindex rgbimage @cindex rgbalpha The `image`, @ref{rgbimage}, and @ref{rgbalpha} plotting styles all project a uniformly sampled grid of data values onto a plane in either 2D or 3D. The input data may be an actual bitmapped image, perhaps converted from a standard format such as PNG, or a simple array of numerical values. @cindex heatmap This figure illustrates generation of a heat map from an array of scalar values. The current palette is used to map each value onto the color assigned to the corresponding pixel. @example plot '-' matrix with image 5 4 3 1 0 2 2 0 0 1 0 0 0 1 0 0 1 2 4 3 e e @end example Each pixel (data point) of the input 2D image will become a rectangle or parallelipiped in the plot. The coordinates of each data point will determine the center of the parallelipiped. That is, an M x N set of data will form an image with M x N pixels. This is different from the pm3d plotting style, where an M x N set of data will form a surface of (M-1) x (N-1) elements. The scan directions for a binary image data grid can be further controlled by additional keywords. See `binary keywords flipx`, `keywords center`, and `keywords rotate`. Image data can be scaled to fill a particular rectangle within a 2D plot coordinate system by specifying the x and y extent of each pixel. See `binary keywords dx` and `dy`. To generate the figure at the right, the same input image was placed multiple times, each with a specified dx, dy, and origin. The input PNG image of a building is 50x128 pixels. The tall building was drawn by mapping this using `dx=0.5 dy=1.5`. The short building used a mapping `dx=0.5 dy=0.35`. The `image` style handles input pixels containing a grayscale or color palette value. Thus 2D plots (`plot` command) require 3 columns of data (x,y,value), while 3D plots (`splot` command) require 4 columns of data (x,y,z,value). The @ref{rgbimage} style handles input pixels that are described by three separate values for the red, green, and blue components. Thus 5D data (x,y,r,g,b) is needed for `plot` and 6D data (x,y,z,r,g,b) for `splot`. The individual red, green, and blue components are assumed to lie in the range [0:255]. The @ref{rgbalpha} style handles input pixels that contain alpha channel (transparency) information in addition to the red, green, and blue components. Thus 6D data (x,y,r,g,b,a) is needed for `plot` and 7D data (x,y,z,r,g,b,a) for `splot`. The r, g, b, and alpha components are assumed to lie in the range [0:255]. @menu * transparency:: * image_failsafe:: @end menu @node transparency, image_failsafe, image, image @subsection transparency @c ?image transparency @cindex transparency @c ?alpha channel The @ref{rgbalpha} plotting style assumes that each pixel of input data contains an alpha value in the range [0:255]. A pixel with alpha = 0 is purely transparent and does not alter the underlying contents of the plot. A pixel with alpha = 255 is purely opaque. All terminal types can handle these two extreme cases. A pixel with 0 < alpha < 255 is partially transparent. Only a few terminal types can handle this correctly; other terminals will approximate this by treating alpha as being either 0 or 255. @node image_failsafe, , transparency, image @subsection image failsafe @c ?commands set style image failsafe @c ?set style image failsafe @c ?plotting styles image failsafe @c ?style image failsafe @c ?image failsafe @cindex failsafe Some terminal drivers provide code to optimize rendering of image data within a rectangular 2D area. However this code is known to be imperfect. This optimized code may be disabled by using the keyword `failsafe`. E.g. @example plot 'data' with image failsafe @end example @node impulses, labels, image, plotting_styles @section impulses @c ?commands set style impulses @c ?set style impulses @c ?plotting styles impulses @c ?style impulses @cindex impulses The @ref{impulses} style displays a vertical line from y=0 to the y value of each point (2D) or from z=0 to the z value of each point (3D). Note that the y or z values may be negative. Data from additional columns can be used to control the color of each impulse. To use this style effectively in 3D plots, it is useful to choose thick lines (linewidth > 1). This approximates a 3D bar chart. @example 1 column: y 2 columns: x y # line from [x,0] to [x,y] (2D) 3 columns: x y z # line from [x,y,0] to [x,y,z] (3D) @end example @node labels, lines, impulses, plotting_styles @section labels @c ?commands set style labels @c ?set style labels @c ?plotting styles labels @c ?style labels @cindex labels The @ref{labels} style reads coordinates and text from a data file and places the text string at the corresponding 2D or 3D position. 3 or 4 input columns of basic data are required. Additional input columns may be used to provide information such as variable font size or text color (see `rgbcolor variable`). @example 3 columns: x y string # 2D version 4 columns: x y z string # 3D version @end example The font, color, rotation angle and other properties of the printed text may be specified as additional command options (see `set label`). The example below generates a 2D plot with text labels constructed from the city whose name is taken from column 1 of the input file, and whose geographic coordinates are in columns 4 and 5. The font size is calculated from the value in column 3, in this case the population. @example CityName(String,Size) = sprintf("@{/=%d %s@}", Scale(Size), String) plot 'cities.dat' using 5:4:(CityName(stringcolumn(1),$3)) with labels @end example If we did not want to adjust the font to a different size for each city, the command would be much simpler: @example plot 'cities.dat' using 5:4:1 with labels font "Times,8" @end example The @ref{labels} style can also be used in 3D plots. In this case four input column specifiers are required, corresponding to X Y Z and text. @example splot 'datafile' using 1:2:3:4 with labels @end example See also `datastrings`, `set style data`. @node lines, linespoints, labels, plotting_styles @section lines @c ?commands set style lines @c ?set style lines @c ?plotting styles lines @c ?style lines @cindex lines The `lines` style connects adjacent points with straight line segments. It may be used in either 2D or 3D plots. The basic form requires 1, 2, or 3 columns of input data. Additional input columns may be used to provide information such as variable line color (see `rgbcolor variable`). 2D form @example 1 column: y # implicit x from row number 2 columns: x y @end example 3D form @example 1 column: z # implicit x from row, y from index 3 columns: x y z @end example See also `linetype`, `linewidth`, and `linestyle`. @node linespoints, points, lines, plotting_styles @section linespoints @c ?commands set style linespoints @c ?commands set style lp @c ?set style linespoints @c ?plotting styles linespoints @c ?set style lp @c ?style linespoints @c ?style lp @cindex linespoints @cindex lp @cindex pointinterval The @ref{linespoints} style connects adjacent points with straight line segments and then goes back to draw a small symbol at each point. The command @ref{pointsize} may be used to change the default size of the points. 1 or 2 columns of basic input data are required in 2D plots; 1 or 3 columns are required if 3D plots. See `style lines`. Additional input columns may be used to provide information such as variable point size or line color. The `pointinterval` (short form `pi`) property of the linetype can be used to control whether or not every point in the plot is given a symbol. For example, 'with lp pi 3' will draw line segments through every data point, but will only place a symbol on every 3rd point. A negative value for `pointinterval` will erase the portion of line segment that passes underneath the symbol. The size of the erased portion is controlled by @ref{pointintervalbox}. @ref{linespoints} may be abbreviated `lp`. @node points, polar, linespoints, plotting_styles @section points @c ?commands set style points @c ?set style points @c ?plotting styles points @c ?style points @cindex points The `points` style displays a small symbol at each point. The command @ref{pointsize} may be used to change the default size of the points. 1 or 2 columns of basic input data are required in 2D plots; 1 or 3 columns are required in 3D plots. See `style lines`. Additional input columns may be used to provide information such as variable point size or variable point color. @node polar, steps, points, plotting_styles @section polar Polar plots are not really a separate plot style but are listed here for completeness. The option `set polar` tells gnuplot to interpret input 2D coordinates as <angle>,<radius> rather than <x>,<y>. Many, but not all, 2D plotting styles work in polar mode. The figure shows a combination of plot styles `lines` and @ref{filledcurves}. See `set polar`, @ref{rrange}, `set size square`. @node steps, rgbalpha, polar, plotting_styles @section steps @c ?commands set style steps @c ?set style steps @c ?plotting styles steps @c ?style steps @cindex steps The @ref{steps} style is only relevant to 2D plotting. It connects consecutive points with two line segments: the first from (x1,y1) to (x2,y1) and the second from (x2,y1) to (x2,y2). The input column requires are the same as for plot styles `lines` and `points`. The difference between @ref{fsteps} and @ref{steps} is that @ref{fsteps} traces first the change in y and then the change in x. @ref{steps} traces first the change in x and then the change in y. To fill the area between the curve and the baseline at y=0, use @ref{fillsteps}. See also @uref{http://www.gnuplot.info/demo/steps.html,steps demo. } @node rgbalpha, rgbimage, steps, plotting_styles @section rgbalpha @c ?commands set style rgbalpha @c ?set style rgbalpha @c ?plotting styles rgbalpha @c ?style rgbalpha See `image`. @node rgbimage, vectors, rgbalpha, plotting_styles @section rgbimage @c ?commands set style rgbimage @c ?set style rgbimage @c ?plotting styles rgbimage @c ?style rgbimage See `image`. @node vectors, xerrorbars, rgbimage, plotting_styles @section vectors @c ?commands set style vectors @c ?set style vectors @c ?plotting styles vectors @c ?style vectors @cindex vectors The 2D @ref{vectors} style draws a vector from (x,y) to (x+xdelta,y+ydelta). The 3D @ref{vectors} style is similar, but requires six columns of basic data. A small arrowhead is drawn at the end of each vector. @example 4 columns: x y xdelta ydelta 6 columns: x y z xdelta ydelta zdelta @end example In both cases, an additional input column (5th in 2D, 7th in 3D) may be used to provide variable (per-datapoint) color information. (see `linecolor` and `rgbcolor variable`). splot with vectors is supported only for `set mapping cartesian`. The keywords "with vectors" may be followed by an in-line arrow style specifications, a reference to a predefined arrow style, or a request to read the index of the desired arrow style for each vector from a separate column. Note: If you choose "arrowstyle variable" it will fill in all arrow properties at the time the corresponding vector is drawn; you cannot mix this keyword with other line or arrow style qualifiers in the plot command. @example plot ... with vectors filled heads plot ... with vectors arrowstyle 3 plot ... using 1:2:3:4:5 with vectors arrowstyle variable @end example See `arrowstyle` for more details. Example: @example plot 'file.dat' using 1:2:3:4 with vectors head filled lt 2 splot 'file.dat' using 1:2:3:(1):(1):(1) with vectors filled head lw 2 @end example `set clip one` and `set clip two` affect vectors drawn in 2D. Please see `set clip` and `arrowstyle`. @node xerrorbars, xyerrorbars, vectors, plotting_styles @section xerrorbars @c ?commands set style xerrorbars @c ?set style xerrorbars @c ?plotting styles xerrorbars @c ?style xerrorbars @cindex xerrorbars The @ref{xerrorbars} style is only relevant to 2D data plots. @ref{xerrorbars} is like `points`, except that a horizontal error bar is also drawn. At each point (x,y), a line is drawn from (xlow,y) to (xhigh,y) or from (x-xdelta,y) to (x+xdelta,y), depending on how many data columns are provided. A tic mark is placed at the ends of the error bar (unless @ref{bars} is used---see @ref{bars} for details). The basic style requires either 3 or 4 columns: @example 3 columns: x y xdelta 4 columns: x y xlow xhigh @end example An additional input column (4th or 5th) may be used to provide information such as variable point color. @node xyerrorbars, yerrorbars, xerrorbars, plotting_styles @section xyerrorbars @c ?commands set style xyerrorbars @c ?set style xyerrorbars @c ?plotting styles xyerrorbars @c ?style xyerrorbars @cindex xyerrorbars The @ref{xyerrorbars} style is only relevant to 2D data plots. @ref{xyerrorbars} is like `points`, except that horizontal and vertical error bars are also drawn. At each point (x,y), lines are drawn from (x,y-ydelta) to (x,y+ydelta) and from (x-xdelta,y) to (x+xdelta,y) or from (x,ylow) to (x,yhigh) and from (xlow,y) to (xhigh,y), depending upon the number of data columns provided. A tic mark is placed at the ends of the error bar (unless @ref{bars} is used---see @ref{bars} for details). Either 4 or 6 input columns are required. @example 4 columns: x y xdelta ydelta 6 columns: x y xlow xhigh ylow yhigh @end example If data are provided in an unsupported mixed form, the @ref{using} filter on the `plot` command should be used to set up the appropriate form. For example, if the data are of the form (x,y,xdelta,ylow,yhigh), then you can use @example plot 'data' using 1:2:($1-$3):($1+$3):4:5 with xyerrorbars @end example An additional input column (5th or 7th) may be used to provide variable (per-datapoint) color information. @node yerrorbars, xerrorlines, xyerrorbars, plotting_styles @section yerrorbars @c ?commands set style yerrorbars @c ?commands set style errorbars @c ?plotting styles yerrorbars @c ?plotting styles errorbars @c ?set style yerrorbars @c ?set style errorbars @c ?style yerrorbars @c ?style errorbars @cindex yerrorbars The @ref{yerrorbars} (or @ref{errorbars}) style is only relevant to 2D data plots. @ref{yerrorbars} is like `points`, except that a vertical error bar is also drawn. At each point (x,y), a line is drawn from (x,y-ydelta) to (x,y+ydelta) or from (x,ylow) to (x,yhigh), depending on how many data columns are provided. A tic mark is placed at the ends of the error bar (unless @ref{bars} is used---see @ref{bars} for details). Either 3 or 4 input columns are required. @example 3 columns: x y ydelta 4 columns: x y ylow yhigh @end example An additional input column (4th or 5th) may be used to provide information such as variable point color. See also @uref{http://www.gnuplot.info/demo/mgr.html,errorbar demo. } @node xerrorlines, xyerrorlines, yerrorbars, plotting_styles @section xerrorlines @c ?commands set style xerrorlines @c ?set style xerrorlines @c ?plotting styles xerrorlines @c ?style xerrorlines @cindex xerrorlines The @ref{xerrorlines} style is only relevant to 2D data plots. @ref{xerrorlines} is like @ref{linespoints}, except that a horizontal error line is also drawn. At each point (x,y), a line is drawn from (xlow,y) to (xhigh,y) or from (x-xdelta,y) to (x+xdelta,y), depending on how many data columns are provided. A tic mark is placed at the ends of the error bar (unless @ref{bars} is used---see @ref{bars} for details). The basic style requires either 3 or 4 columns: @example 3 columns: x y xdelta 4 columns: x y xlow xhigh @end example An additional input column (4th or 5th) may be used to provide information such as variable point color. @node xyerrorlines, yerrorlines, xerrorlines, plotting_styles @section xyerrorlines @c ?commands set style xyerrorlines @c ?set style xyerrorlines @c ?plotting styles xyerrorlines @c ?style xyerrorlines @cindex xyerrorlines The @ref{xyerrorlines} style is only relevant to 2D data plots. @ref{xyerrorlines} is like @ref{linespoints}, except that horizontal and vertical error bars are also drawn. At each point (x,y), lines are drawn from (x,y-ydelta) to (x,y+ydelta) and from (x-xdelta,y) to (x+xdelta,y) or from (x,ylow) to (x,yhigh) and from (xlow,y) to (xhigh,y), depending upon the number of data columns provided. A tic mark is placed at the ends of the error bar (unless @ref{bars} is used---see @ref{bars} for details). Either 4 or 6 input columns are required. @example 4 columns: x y xdelta ydelta 6 columns: x y xlow xhigh ylow yhigh @end example If data are provided in an unsupported mixed form, the @ref{using} filter on the `plot` command should be used to set up the appropriate form. For example, if the data are of the form (x,y,xdelta,ylow,yhigh), then you can use @example plot 'data' using 1:2:($1-$3):($1+$3):4:5 with xyerrorlines @end example An additional input column (5th or 7th) may be used to provide variable (per-datapoint) color information. @node yerrorlines, 3D_(surface)_plots, xyerrorlines, plotting_styles @section yerrorlines @c ?commands set style yerrorlines @c ?commands set style errorlines @c ?plotting styles yerrorlines @c ?plotting styles errorlines @c ?set style yerrorlines @c ?set style errorlines @c ?style yerrorlines @c ?style errorlines @cindex yerrorlines The @ref{yerrorlines} (or @ref{errorlines}) style is only relevant to 2D data plots. @ref{yerrorlines} is like @ref{linespoints}, except that a vertical error line is also drawn. At each point (x,y), a line is drawn from (x,y-ydelta) to (x,y+ydelta) or from (x,ylow) to (x,yhigh), depending on how many data columns are provided. A tic mark is placed at the ends of the error bar (see @ref{bars} for details). Either 3 or 4 input columns are required. @example 3 columns: x y ydelta 4 columns: x y ylow yhigh @end example An additional input column (4th or 5th) may be used to provide information such as variable point color. See also @uref{http://www.gnuplot.info/demo/mgr.html,errorbar demo. } @node 3D_(surface)_plots, , yerrorlines, plotting_styles @section 3D (surface) plots @c ?3D (surface) plots @c ?plotting styles 3d (surface) plots @cindex 3D @cindex surface @opindex surface Surface plots are generated using the `splot` command rather than the `plot` command. The style `with lines` draws a surface made from a grid of lines. Solid surfaces can be drawn using the style @ref{pm3d}. Usually the surface is displayed at some arbitrary viewing angle, such that it clearly represents a 3D surface. In this case the X, Y, and Z axes are all visible in the plot. The illusion of 3D is enhanced by choosing hidden line removal or depth-sorted surface elements. See @ref{hidden3d} and `pm3d depthorder`. The `splot` command can also calculate and draw contour lines corresponding to constant Z values. These contour lines may be drawn onto the surface itself, or projected onto the XY plane. See @ref{contour}. @menu * 2D_projection_(set_view_map):: @end menu @node 2D_projection_(set_view_map), , 3D_(surface)_plots, 3D_(surface)_plots @subsection 2D projection (set view map) @c ?2D projection (set view map) @cindex projection An important special case of the `splot` command is to map the Z coordinate onto a 2D surface by projecting the plot along the Z axis. See `set view map`. This plot mode can be used to generate contour plots and heat maps. @node Commands, Terminal_types, plotting_styles, Top @chapter Commands @cindex commands This section lists the commands acceptable to `gnuplot` in alphabetical order. Printed versions of this document contain all commands; the text available interactively may not be complete. Indeed, on some systems there may be no commands at all listed under this heading. Note that in most cases unambiguous abbreviations for command names and their options are permissible, i.e., "`p f(x) w li`" instead of "`plot f(x) with lines`". In the syntax descriptions, braces (@{@}) denote optional arguments and a vertical bar (|) separates mutually exclusive choices. @menu * cd:: * call:: * clear:: * Do:: * evaluate:: * exit:: * fit:: * help:: * history:: * if:: * iteration:: * load:: * lower:: * pause:: * plot:: * print:: * pwd:: * quit:: * raise:: * refresh:: * replot:: * reread:: * reset:: * save:: * set-show:: * shell:: * splot:: * stats_(Statistical_Summary):: * system_:: * test:: * undefine:: * unset:: * update:: * While:: @end menu @node cd, call, Commands, Commands @section cd @c ?commands cd @cindex cd @cmindex cd The @ref{cd} command changes the working directory. Syntax: @example cd '<directory-name>' @end example The directory name must be enclosed in quotes. Examples: @example cd 'subdir' cd ".." @end example It is recommended that Windows users use single-quotes, because backslash [\] has special significance inside double-quotes and has to be escaped. For example, @example cd "c:\newdata" @end example fails, but @example cd 'c:\newdata' cd "c:\\newdata" @end example work as expected. @node call, clear, cd, Commands @section call @c ?commands call @cindex call @cmindex call The @ref{call} command is identical to the load command with one exception: you can have up to ten additional parameters to the command (delimited according to the standard parser rules) which can be substituted into the lines read from the file. As each line is read from the @ref{call}ed input file, it is scanned for the sequence `$` (dollar-sign) followed by a digit (0--9). If found, the sequence is replaced by the corresponding parameter from the @ref{call} command line. If the parameter was specified as a string in the @ref{call} line, it is substituted without its enclosing quotes. Sequence `$#` is replaced by the number of passed parameters. `$` followed by any character will be that character; e.g. use `$$` to get a single `$`. Providing more than ten parameters on the @ref{call} command line will cause an error. A parameter that was not provided substitutes as nothing. Files being @ref{call}ed may themselves contain @ref{call} or `load` commands. Syntax: @example call "<input-file>" <parameter-0> <parm-1> ... <parm-9> @end example The name of the input file must be enclosed in quotes, and it is recommended that parameters are similarly enclosed in quotes (future versions of gnuplot may treat quoted and unquoted arguments differently). Example: If the file 'calltest.gp' contains the line: @example print "argc=$# p0=$0 p1=$1 p2=$2 p3=$3 p4=$4 p5=$5 p6=$6 p7=x$7x" @end example entering the command: @example call 'calltest.gp' "abcd" 1.2 + "'quoted'" -- "$2" @end example will display: @example argc=7 p0=abcd p1=1.2 p2=+ p3='quoted' p4=- p5=- p6=$2 p7=xx @end example NOTE: there is a clash in syntax with the datafile @ref{using} callback operator. Use `$$n` or `column(n)` to access column n from a datafile inside a @ref{call}ed datafile plot. @node clear, Do, call, Commands @section clear @c ?commands clear @cindex clear @cmindex clear The @ref{clear} command erases the current screen or output device as specified by @ref{output}. This usually generates a formfeed on hardcopy devices. Use @ref{terminal} to set the device type. For some terminals @ref{clear} erases only the portion of the plotting surface defined by @ref{size}, so for these it can be used in conjunction with @ref{multiplot} to create an inset. Example: @example set multiplot plot sin(x) set origin 0.5,0.5 set size 0.4,0.4 clear plot cos(x) unset multiplot @end example Please see @ref{multiplot}, @ref{size}, and @ref{origin} for details of these commands. @node Do, evaluate, clear, Commands @section Do @c ?commands do @cindex do Syntax: @example do for <iteration-spec> @{ <commands> <commands> @} @end example Execute a sequence of commands multiple times. The commands must be enclosed in curly brackets, and the opening "@{" must be on the same line as the `do` keyword. This command cannot be used with old-style (un-bracketed) if/else statements. See `if`. For examples of iteration specifiers, see @ref{iteration}. Example: @example set multiplot layout 2,2 do for [name in "A B C D"] @{ filename = name . ".dat" set title sprintf("Condition %s",name) plot filename title name @} unset multiplot @end example @node evaluate, exit, Do, Commands @section evaluate @c ?commands evaluate @cindex evaluate @cmindex evaluate The @ref{evaluate} command executes the commands given as an argument string. Newline characters are not allowed within the string. Syntax: @example eval <string expression> @end example This is especially useful for a repetition of similar commands. Example: @example set_label(x, y, text) \ = sprintf("set label '%s' at %f, %f point pt 5", text, x, y) eval set_label(1., 1., 'one/one') eval set_label(2., 1., 'two/one') eval set_label(1., 2., 'one/two') @end example Please see @ref{macros} for another way to execute commands from a string. @node exit, fit, evaluate, Commands @section exit @c ?commands exit @cindex exit @cmindex exit The commands @ref{exit} and @ref{quit}, as well as the END-OF-FILE character (usually Ctrl-D) terminate input from the current input stream: terminal session, pipe, and file input (pipe). If input streams are nested (inherited `load` scripts), then reading will continue in the parent stream. When the top level stream is closed, the program itself will exit. The command `exit gnuplot` will immediately and unconditionally cause gnuplot to exit even if the input stream is multiply nested. In this case any open output files may not be completed cleanly. Example of use: @example bind "ctrl-x" "unset output; exit gnuplot" @end example See help for `batch/interactive` for more details. @node fit, help, exit, Commands @section fit @c ?commands fit @cindex fit @cmindex fit @cindex least-squares @cindex Marquardt The @ref{fit} command can fit a user-supplied expression to a set of data points (x,z) or (x,y,z), using an implementation of the nonlinear least-squares (NLLS) Marquardt-Levenberg algorithm. Any user-defined variable occurring in the expression may serve as a fit parameter, but the return type of the expression must be real. Syntax: @example fit @{<ranges>@} <expression> '<datafile>' @{datafile-modifiers@} via '<parameter file>' | <var1>@{,<var2>,...@} @end example Ranges may be specified to temporarily limit the data which is to be fitted; any out-of-range data points are ignored. The syntax is @example [@{dummy_variable=@}@{<min>@}@{:<max>@}], @end example analogous to `plot`; see @ref{ranges}. <expression> is any valid `gnuplot` expression, although it is usual to use a previously user-defined function of the form f(x) or f(x,y). <datafile> is treated as in the `plot` command. All the @ref{datafile} modifiers (@ref{using}, @ref{every},...) except @ref{smooth} and the deprecated @ref{thru} are applicable to @ref{fit}. See @ref{datafile}. The default data formats for fitting functions with a single independent variable, z=f(x), are z or x:z. That is, if there is only a single column then it is the dependent variable and the line numbers is the independent variable. If there are two columns, the first is the independent variable and the second is the dependent variable. Those formats can be changed with the datafile @ref{using} qualifier, for example to take the z value from a different column or to calculate it from several columns. A third @ref{using} qualifier (a column number or an expression), if present, is interpreted as the standard deviation of the corresponding z value and is used to compute a weight for the datum, 1/s**2. Otherwise, all data points are weighted equally, with a weight of one. Note that if you don't specify a @ref{using} option at all, no z standard deviations are read from the datafile even if it does have a third column, so you'll always get unit weights. To fit a function with two independent variables, z=f(x,y), the required format is @ref{using} with four items, x:y:z:s. The complete format must be given---no default columns are assumed for a missing token. Weights for each data point are evaluated from 's' as above. If error estimates are not available, a constant value can be specified as a constant expression (see @ref{using}), e.g., `using 1:2:3:(1)`. The fit function may have up to five independent variables. There must be two more @ref{using} qualifiers than there are independent variables, unless there is only one variable. The allowed formats, and the default dummy variable names, are as follows: @example z x:z x:z:s x:y:z:s x:y:t:z:s x:y:t:u:z:s x:y:t:u:v:z:s @end example The dummy variable names may be changed with ranges as noted above. The first range corresponds to the first @ref{using} spec, etc. A range may also be given for z (the dependent variable), but that name cannot be changed. Multiple datasets may be simultaneously fit with functions of one independent variable by making y a 'pseudo-variable', e.g., the dataline number, and fitting as two independent variables. See @ref{multi-branch}. The `via` qualifier specifies which parameters are to be adjusted, either directly, or by referencing a parameter file. Examples: @example f(x) = a*x**2 + b*x + c g(x,y) = a*x**2 + b*y**2 + c*x*y FIT_LIMIT = 1e-6 fit f(x) 'measured.dat' via 'start.par' fit f(x) 'measured.dat' using 3:($7-5) via 'start.par' fit f(x) './data/trash.dat' using 1:2:3 via a, b, c fit g(x,y) 'surface.dat' using 1:2:3:(1) via a, b, c fit a0 + a1*x/(1 + a2*x/(1 + a3*x)) 'measured.dat' via a0,a1,a2,a3 fit a*x + b*y 'surface.dat' using 1:2:3:(1) via a,b fit [*:*][yaks=*:*] a*x+b*yaks 'surface.dat' u 1:2:3:(1) via a,b fit a*x + b*y + c*t 'foo.dat' using 1:2:3:4:(1) via a,b,c h(x,y,t,u,v) = a*x + b*y + c*t + d*u + e*v fit h(x,y,t,u,v) 'foo.dat' using 1:2:3:4:5:6:(1) via a,b,c,d,e @end example After each iteration step, detailed information about the current state of the fit is written to the display. The same information about the initial and final states is written to a log file, "fit.log". This file is always appended to, so as to not lose any previous fit history; it should be deleted or renamed as desired. By using the command `set fit logfile`, the name of the log file can be changed. If gnuplot was built with this option, and you activated it using `set fit errorvariables`, the error for each fitted parameter will be stored in a variable named like the parameter, but with "_err" appended. Thus the errors can be used as input for further computations. The fit may be interrupted by pressing Ctrl-C. After the current iteration completes, you have the option to (1) stop the fit and accept the current parameter values, (2) continue the fit, (3) execute a `gnuplot` command as specified by the environment variable FIT_SCRIPT. The default for FIT_SCRIPT is @ref{replot}, so if you had previously plotted both the data and the fitting function in one graph, you can display the current state of the fit. Once @ref{fit} has finished, the @ref{update} command may be used to store final values in a file for subsequent use as a parameter file. See @ref{update} for details. @menu * adjustable_parameters:: * short_introduction:: * error_estimates:: * control:: * multi-branch:: * starting_values:: * tips:: @end menu @node adjustable_parameters, short_introduction, fit, fit @subsection adjustable parameters @c ?commands fit parameters @c ?fit parameters @c ?commands fit adjustable_parameters @c ?fit adjustable_parameters @cindex fit_parameters There are two ways that `via` can specify the parameters to be adjusted, either directly on the command line or indirectly, by referencing a parameter file. The two use different means to set initial values. Adjustable parameters can be specified by a comma-separated list of variable names after the `via` keyword. Any variable that is not already defined is created with an initial value of 1.0. However, the fit is more likely to converge rapidly if the variables have been previously declared with more appropriate starting values. In a parameter file, each parameter to be varied and a corresponding initial value are specified, one per line, in the form @example varname = value @end example Comments, marked by '#', and blank lines are permissible. The special form @example varname = value # FIXED @end example means that the variable is treated as a 'fixed parameter', initialized by the parameter file, but not adjusted by @ref{fit}. For clarity, it may be useful to designate variables as fixed parameters so that their values are reported by @ref{fit}. The keyword `# FIXED` has to appear in exactly this form. @node short_introduction, error_estimates, adjustable_parameters, fit @subsection short introduction @c ?commands fit beginners_guide @c ?fit beginners_guide @c ?fit guide @cindex fitting @ref{fit} is used to find a set of parameters that 'best' fits your data to your user-defined function. The fit is judged on the basis of the sum of the squared differences or 'residuals' (SSR) between the input data points and the function values, evaluated at the same places. This quantity is often called 'chisquare' (i.e., the Greek letter chi, to the power of 2). The algorithm attempts to minimize SSR, or more precisely, WSSR, as the residuals are 'weighted' by the input data errors (or 1.0) before being squared; see `fit error_estimates` for details. That's why it is called 'least-squares fitting'. Let's look at an example to see what is meant by 'non-linear', but first we had better go over some terms. Here it is convenient to use z as the dependent variable for user-defined functions of either one independent variable, z=f(x), or two independent variables, z=f(x,y). A parameter is a user-defined variable that @ref{fit} will adjust, i.e., an unknown quantity in the function declaration. Linearity/non-linearity refers to the relationship of the dependent variable, z, to the parameters which @ref{fit} is adjusting, not of z to the independent variables, x and/or y. (To be technical, the second @{and higher@} derivatives of the fitting function with respect to the parameters are zero for a linear least-squares problem). For linear least-squares (LLS), the user-defined function will be a sum of simple functions, not involving any parameters, each multiplied by one parameter. NLLS handles more complicated functions in which parameters can be used in a large number of ways. An example that illustrates the difference between linear and nonlinear least-squares is the Fourier series. One member may be written as @example z=a*sin(c*x) + b*cos(c*x). @end example If a and b are the unknown parameters and c is constant, then estimating values of the parameters is a linear least-squares problem. However, if c is an unknown parameter, the problem is nonlinear. In the linear case, parameter values can be determined by comparatively simple linear algebra, in one direct step. However LLS is a special case which is also solved along with more general NLLS problems by the iterative procedure that `gnuplot` uses. @ref{fit} attempts to find the minimum by doing a search. Each step (iteration) calculates WSSR with a new set of parameter values. The Marquardt-Levenberg algorithm selects the parameter values for the next iteration. The process continues until a preset criterion is met, either (1) the fit has "converged" (the relative change in WSSR is less than FIT_LIMIT), or (2) it reaches a preset iteration count limit, FIT_MAXITER (see @ref{variables}). The fit may also be interrupted and subsequently halted from the keyboard (see @ref{fit}). The user variable FIT_CONVERGED contains 1 if the previous fit command terminated due to convergence; it contains 0 if the previous fit terminated for any other reason. Often the function to be fitted will be based on a model (or theory) that attempts to describe or predict the behaviour of the data. Then @ref{fit} can be used to find values for the free parameters of the model, to determine how well the data fits the model, and to estimate an error range for each parameter. See `fit error_estimates`. Alternatively, in curve-fitting, functions are selected independent of a model (on the basis of experience as to which are likely to describe the trend of the data with the desired resolution and a minimum number of parameters*functions.) The @ref{fit} solution then provides an analytic representation of the curve. However, if all you really want is a smooth curve through your data points, the @ref{smooth} option to `plot` may be what you've been looking for rather than @ref{fit}. @node error_estimates, control, short_introduction, fit @subsection error estimates @c ?commands fit error_estimates @c ?fit error_estimates @c ?fit errors In @ref{fit}, the term "error" is used in two different contexts, data error estimates and parameter error estimates. Data error estimates are used to calculate the relative weight of each data point when determining the weighted sum of squared residuals, WSSR or chisquare. They can affect the parameter estimates, since they determine how much influence the deviation of each data point from the fitted function has on the final values. Some of the @ref{fit} output information, including the parameter error estimates, is more meaningful if accurate data error estimates have been provided. The 'statistical overview' describes some of the @ref{fit} output and gives some background for the 'practical guidelines'. @menu * statistical_overview:: * practical_guidelines:: @end menu @node statistical_overview, practical_guidelines, error_estimates, error_estimates @subsubsection statistical overview @c ?commands fit error statistical_overview @c ?fit error statistical_overview @cindex statistical_overview The theory of non-linear least-squares (NLLS) is generally described in terms of a normal distribution of errors, that is, the input data is assumed to be a sample from a population having a given mean and a Gaussian (normal) distribution about the mean with a given standard deviation. For a sample of sufficiently large size, and knowing the population standard deviation, one can use the statistics of the chisquare distribution to describe a "goodness of fit" by looking at the variable often called "chisquare". Here, it is sufficient to say that a reduced chisquare (chisquare/degrees of freedom, where degrees of freedom is the number of datapoints less the number of parameters being fitted) of 1.0 is an indication that the weighted sum of squared deviations between the fitted function and the data points is the same as that expected for a random sample from a population characterized by the function with the current value of the parameters and the given standard deviations. If the standard deviation for the population is not constant, as in counting statistics where variance = counts, then each point should be individually weighted when comparing the observed sum of deviations and the expected sum of deviations. At the conclusion @ref{fit} reports 'stdfit', the standard deviation of the fit, which is the rms of the residuals, and the variance of the residuals, also called 'reduced chisquare' when the data points are weighted. The number of degrees of freedom (the number of data points minus the number of fitted parameters) is used in these estimates because the parameters used in calculating the residuals of the datapoints were obtained from the same data. These values are exported to the variables @example FIT_NDF = Number of degrees of freedom FIT_WSSR = Weighted sum-of-squares residual FIT_STDFIT = sqrt(WSSR/NDF) @end example To estimate confidence levels for the parameters, one can use the minimum chisquare obtained from the fit and chisquare statistics to determine the value of chisquare corresponding to the desired confidence level, but considerably more calculation is required to determine the combinations of parameters which produce such values. Rather than determine confidence intervals, @ref{fit} reports parameter error estimates which are readily obtained from the variance-covariance matrix after the final iteration. By convention, these estimates are called "standard errors" or "asymptotic standard errors", since they are calculated in the same way as the standard errors (standard deviation of each parameter) of a linear least-squares problem, even though the statistical conditions for designating the quantity calculated to be a standard deviation are not generally valid for the NLLS problem. The asymptotic standard errors are generally over-optimistic and should not be used for determining confidence levels, but are useful for qualitative purposes. The final solution also produces a correlation matrix indicating correlation of parameters in the region of the solution; The main diagonal elements, autocorrelation, are always 1; if all parameters were independent, the off-diagonal elements would be nearly 0. Two variables which completely compensate each other would have an off-diagonal element of unit magnitude, with a sign depending on whether the relation is proportional or inversely proportional. The smaller the magnitudes of the off-diagonal elements, the closer the estimates of the standard deviation of each parameter would be to the asymptotic standard error. @node practical_guidelines, , statistical_overview, error_estimates @subsubsection practical guidelines @c ?commands fit error practical_guidelines @c ?fit error practical_guidelines @cindex practical_guidelines @cindex guidelines If you have a basis for assigning weights to each data point, doing so lets you make use of additional knowledge about your measurements, e.g., take into account that some points may be more reliable than others. That may affect the final values of the parameters. Weighting the data provides a basis for interpreting the additional @ref{fit} output after the last iteration. Even if you weight each point equally, estimating an average standard deviation rather than using a weight of 1 makes WSSR a dimensionless variable, as chisquare is by definition. Each fit iteration will display information which can be used to evaluate the progress of the fit. (An '*' indicates that it did not find a smaller WSSR and is trying again.) The 'sum of squares of residuals', also called 'chisquare', is the WSSR between the data and your fitted function; @ref{fit} has minimized that. At this stage, with weighted data, chisquare is expected to approach the number of degrees of freedom (data points minus parameters). The WSSR can be used to calculate the reduced chisquare (WSSR/ndf) or stdfit, the standard deviation of the fit, sqrt(WSSR/ndf). Both of these are reported for the final WSSR. If the data are unweighted, stdfit is the rms value of the deviation of the data from the fitted function, in user units. If you supplied valid data errors, the number of data points is large enough, and the model is correct, the reduced chisquare should be about unity. (For details, look up the 'chi-squared distribution' in your favourite statistics reference.) If so, there are additional tests, beyond the scope of this overview, for determining how well the model fits the data. A reduced chisquare much larger than 1.0 may be due to incorrect data error estimates, data errors not normally distributed, systematic measurement errors, 'outliers', or an incorrect model function. A plot of the residuals, e.g., `plot 'datafile' using 1:($2-f($1))`, may help to show any systematic trends. Plotting both the data points and the function may help to suggest another model. Similarly, a reduced chisquare less than 1.0 indicates WSSR is less than that expected for a random sample from the function with normally distributed errors. The data error estimates may be too large, the statistical assumptions may not be justified, or the model function may be too general, fitting fluctuations in a particular sample in addition to the underlying trends. In the latter case, a simpler function may be more appropriate. You'll have to get used to both @ref{fit} and the kind of problems you apply it to before you can relate the standard errors to some more practical estimates of parameter uncertainties or evaluate the significance of the correlation matrix. Note that @ref{fit}, in common with most NLLS implementations, minimizes the weighted sum of squared distances (y-f(x))**2. It does not provide any means to account for "errors" in the values of x, only in y. Also, any "outliers" (data points outside the normal distribution of the model) will have an exaggerated effect on the solution. @node control, multi-branch, error_estimates, fit @subsection control @c ?commands fit control @c ?fit control There are a number of `gnuplot` variables that can be defined to affect @ref{fit}. Those which can be defined once `gnuplot` is running are listed under 'control_variables' while those defined before starting `gnuplot` are listed under 'environment_variables'. @menu * control_variables:: * environment_variables:: @end menu @node control_variables, environment_variables, control, control @subsubsection control variables @c ?commands fit control variables @c ?fit control variables The default epsilon limit (1e-5) may be changed by declaring a value for @example FIT_LIMIT @end example When the sum of squared residuals changes between two iteration steps by a factor less than this number (epsilon), the fit is considered to have 'converged'. The maximum number of iterations may be limited by declaring a value for @example FIT_MAXITER @end example A value of 0 (or not defining it at all) means that there is no limit. If you need even more control about the algorithm, and know the Marquardt-Levenberg algorithm well, there are some more variables to influence it. The startup value of `lambda` is normally calculated automatically from the ML-matrix, but if you want to, you may provide your own one with @example FIT_START_LAMBDA @end example Specifying FIT_START_LAMBDA as zero or less will re-enable the automatic selection. The variable @example FIT_LAMBDA_FACTOR @end example gives the factor by which `lambda` is increased or decreased whenever the chi-squared target function increased or decreased significantly. Setting FIT_LAMBDA_FACTOR to zero re-enables the default factor of 10.0. Other variables with the FIT_ prefix may be added to @ref{fit}, so it is safer not to use that prefix for user-defined variables. The variables FIT_SKIP and FIT_INDEX were used by earlier releases of `gnuplot` with a 'fit' patch called `gnufit` and are no longer available. The datafile @ref{every} modifier provides the functionality of FIT_SKIP. FIT_INDEX was used for multi-branch fitting, but multi-branch fitting of one independent variable is now done as a pseudo-3D fit in which the second independent variable and @ref{using} are used to specify the branch. See @ref{multi-branch}. @node environment_variables, , control_variables, control @subsubsection environment variables @c ?commands fit control environment @c ?fit control environment The environment variables must be defined before `gnuplot` is executed; how to do so depends on your operating system. @example FIT_LOG @end example changes the name (and/or path) of the file to which the fit log will be written from the default of "fit.log" in the working directory. The default value can be overwritten using the command `set fit logfile`. @example FIT_SCRIPT @end example specifies a command that may be executed after an user interrupt. The default is @ref{replot}, but a `plot` or `load` command may be useful to display a plot customized to highlight the progress of the fit. @node multi-branch, starting_values, control, fit @subsection multi-branch @c ?commands fit multi-branch @c ?fit multi-branch @cindex multi-branch @cindex branch In multi-branch fitting, multiple data sets can be simultaneously fit with functions of one independent variable having common parameters by minimizing the total WSSR. The function and parameters (branch) for each data set are selected by using a 'pseudo-variable', e.g., either the dataline number (a 'column' index of -1) or the datafile index (-2), as the second independent variable. Example: Given two exponential decays of the form, z=f(x), each describing a different data set but having a common decay time, estimate the values of the parameters. If the datafile has the format x:z:s, then @example f(x,y) = (y==0) ? a*exp(-x/tau) : b*exp(-x/tau) fit f(x,y) 'datafile' using 1:-2:2:3 via a, b, tau @end example For a more complicated example, see the file "hexa.fnc" used by the "fit.dem" demo. Appropriate weighting may be required since unit weights may cause one branch to predominate if there is a difference in the scale of the dependent variable. Fitting each branch separately, using the multi-branch solution as initial values, may give an indication as to the relative effect of each branch on the joint solution. @node starting_values, tips, multi-branch, fit @subsection starting values @c ?commands fit starting_values @c ?fit starting_values @cindex starting_values Nonlinear fitting is not guaranteed to converge to the global optimum (the solution with the smallest sum of squared residuals, SSR), and can get stuck at a local minimum. The routine has no way to determine that; it is up to you to judge whether this has happened. @ref{fit} may, and often will get "lost" if started far from a solution, where SSR is large and changing slowly as the parameters are varied, or it may reach a numerically unstable region (e.g., too large a number causing a floating point overflow) which results in an "undefined value" message or `gnuplot` halting. To improve the chances of finding the global optimum, you should set the starting values at least roughly in the vicinity of the solution, e.g., within an order of magnitude, if possible. The closer your starting values are to the solution, the less chance of stopping at another minimum. One way to find starting values is to plot data and the fitting function on the same graph and change parameter values and @ref{replot} until reasonable similarity is reached. The same plot is also useful to check whether the fit stopped at a minimum with a poor fit. Of course, a reasonably good fit is not proof there is not a "better" fit (in either a statistical sense, characterized by an improved goodness-of-fit criterion, or a physical sense, with a solution more consistent with the model.) Depending on the problem, it may be desirable to @ref{fit} with various sets of starting values, covering a reasonable range for each parameter. @node tips, , starting_values, fit @subsection tips @c ?commands fit tips @c ?fit tips @cindex tips Here are some tips to keep in mind to get the most out of @ref{fit}. They're not very organized, so you'll have to read them several times until their essence has sunk in. The two forms of the `via` argument to @ref{fit} serve two largely distinct purposes. The `via "file"` form is best used for (possibly unattended) batch operation, where you just supply the startup values in a file and can later use @ref{update} to copy the results back into another (or the same) parameter file. The `via var1, var2, ...` form is best used interactively, where the command history mechanism may be used to edit the list of parameters to be fitted or to supply new startup values for the next try. This is particularly useful for hard problems, where a direct fit to all parameters at once won't work without good starting values. To find such, you can iterate several times, fitting only some of the parameters, until the values are close enough to the goal that the final fit to all parameters at once will work. Make sure that there is no mutual dependency among parameters of the function you are fitting. For example, don't try to fit a*exp(x+b), because a*exp(x+b)=a*exp(b)*exp(x). Instead, fit either a*exp(x) or exp(x+b). A technical issue: the parameters must not be too different in magnitude. The larger the ratio of the largest and the smallest absolute parameter values, the slower the fit will converge. If the ratio is close to or above the inverse of the machine floating point precision, it may take next to forever to converge, or refuse to converge at all. You will have to adapt your function to avoid this, e.g., replace 'parameter' by '1e9*parameter' in the function definition, and divide the starting value by 1e9. If you can write your function as a linear combination of simple functions weighted by the parameters to be fitted, by all means do so. That helps a lot, because the problem is no longer nonlinear and should converge with only a small number of iterations, perhaps just one. Some prescriptions for analysing data, given in practical experimentation courses, may have you first fit some functions to your data, perhaps in a multi-step process of accounting for several aspects of the underlying theory one by one, and then extract the information you really wanted from the fitting parameters of those functions. With @ref{fit}, this may often be done in one step by writing the model function directly in terms of the desired parameters. Transforming data can also quite often be avoided, though sometimes at the cost of a more difficult fit problem. If you think this contradicts the previous paragraph about simplifying the fit function, you are correct. A "singular matrix" message indicates that this implementation of the Marquardt-Levenberg algorithm can't calculate parameter values for the next iteration. Try different starting values, writing the function in another form, or a simpler function. Finally, a nice quote from the manual of another fitting package (fudgit), that kind of summarizes all these issues: "Nonlinear fitting is an art!" @node help, history, fit, Commands @section help @c ?commands help @cindex help @cmindex help The @ref{help} command displays built-in help. To specify information on a particular topic use the syntax: @example help @{<topic>@} @end example If <topic> is not specified, a short message is printed about `gnuplot`. After help for the requested topic is given, a menu of subtopics is given; help for a subtopic may be requested by typing its name, extending the help request. After that subtopic has been printed, the request may be extended again or you may go back one level to the previous topic. Eventually, the `gnuplot` command line will return. If a question mark (?) is given as the topic, the list of topics currently available is printed on the screen. @node history, if, help, Commands @section history @c ?commands history @cindex history @cmindex history `history` command lists or saves previous entries in the history of the command line editing, or executes an entry. Here you find 'usage by examples': @example history # show the complete history history 5 # show last 5 entries in the history history quiet 5 # show last 5 entries without entry numbers history "hist.gp" # write the complete history to file hist.gp history "hist.gp" append # append the complete history to file hist.gp history 10 "hist.gp" # write last 10 commands to file hist.gp history 10 "|head -5 >>diary.gp" # write 5 history commands using pipe history ?load # show all history entries starting with "load" history ?"set c" # like above, several words enclosed in quotes hi !reread # execute last entry starting with "reread" hist !"set xr" # like above, several words enclosed in quotes hi !hi # guess yourself :-)) @end example On systems which support a popen function (Unix), the output of history can be piped through an external program by starting the file name with a '|', as one of the above examples demonstrates. @node if, iteration, history, Commands @section if @c ?commands if @cindex if @cmindex if New syntax: @example if (<condition>) @{ <command>; <command> <commands> <commands> @} else @{ <commands> @} @end example Old syntax: @example if (<condition>) <command-line> [; else if (<condition>) ...; else ...] @end example This version of gnuplot supports block-structured if/else statements. If the keyword `if` or `else` is immediately followed by an opening "@{", then conditional execution applies to all statements, possibly on multiple input lines, until a matching "@}" terminates the block. If commands may be nested. The old single-line if/else syntax is still supported, but can not be mixed with the new block-structured syntax. See @ref{if-old}. @menu * if-old:: @end menu @node if-old, , if, if @subsection if-old @c ?if if-old @cindex if-old Through gnuplot version 4.4, the scope of the if/else commands was limited to a single input line. This has been replaced by allowing a multi-line clause to be enclosed in curly brackets. The old syntax is still honored by itself but cannot be used inside a bracketed clause. If no opening "@{" follows the `if` keyword, the command(s) in <command-line> will be executed if <condition> is true (non-zero) or skipped if <condition> is false (zero). Either case will consume commands on the input line until the end of the line or an occurrence of `else`. Note that use of `;` to allow multiple commands on the same line will _not_ end the conditionalized commands. Examples: @example pi=3 if (pi!=acos(-1)) print "?Fixing pi!"; pi=acos(-1); print pi @end example will display: @example ?Fixing pi! 3.14159265358979 @end example but @example if (1==2) print "Never see this"; print "Or this either" @end example will not display anything. else: @example v=0 v=v+1; if (v%2) print "2" ; else if (v%3) print "3"; else print "fred" @end example (repeat the last line repeatedly!) See @ref{reread} for an example of using if and reread together to perform a loop. @node iteration, load, if, Commands @section iteration @cindex iteration @cmindex iteration @cindex iterate The `plot`, `splot`, `set` and @ref{unset} commands may optionally contain an iteration clause. This has the effect of executing the basic command multiple times, each time re-evaluating any expressions that make use of the iteration control variable. Iteration of arbitrary command sequences can be requested using the `do` command. Two forms of iteration clause are currently supported: @example for [intvar = start:end@{:increment@}] for [stringvar in "A B C D"] @end example Examples: @example plot for [filename in "A.dat B.dat C.dat"] filename using 1:2 with lines plot for [basename in "A B C"] basename.".dat" using 1:2 with lines set for [i = 1:10] style line i lc rgb "blue" unset for [tag = 100:200] label tag @end example Nested iteration is supported: @example set for [i=1:9] for [j=1:9] label i*10+j sprintf("%d",i*10+j) at i,j @end example See additional documentation for @ref{iteration}, `do`. @node load, lower, iteration, Commands @section load @c ?commands load @cindex load @cmindex load The `load` command executes each line of the specified input file as if it had been typed in interactively. Files created by the @ref{save} command can later be `load`ed. Any text file containing valid commands can be created and then executed by the `load` command. Files being `load`ed may themselves contain `load` or @ref{call} commands. See `comments` for information about comments in commands. To `load` with arguments, see @ref{call}. Syntax: @example load "<input-file>" @end example The name of the input file must be enclosed in quotes. The special filename "-" may be used to `load` commands from standard input. This allows a `gnuplot` command file to accept some commands from standard input. Please see help for `batch/interactive` for more details. On some systems which support a popen function (Unix), the load file can be read from a pipe by starting the file name with a '<'. Examples: @example load 'work.gnu' load "func.dat" load "< loadfile_generator.sh" @end example The `load` command is performed implicitly on any file names given as arguments to `gnuplot`. These are loaded in the order specified, and then `gnuplot` exits. @node lower, pause, load, Commands @section lower @c ?commands lower @cindex lower @cmindex lower Syntax: @example lower @{plot_window_nb@} @end example The @ref{lower} command lowers (opposite to @ref{raise}) plot window(s) associated with the interactive terminal of your gnuplot session, i.e. `pm`, `win`, `wxt` or `x11`. It puts the plot window to bottom in the z-order windows stack of the window manager of your desktop. As `x11` and `wxt` support multiple plot windows, then by default they lower these windows in descending order of most recently created on top to the least recently created on bottom. If a plot number is supplied as an optional parameter, only the associated plot window will be lowered if it exists. The optional parameter is ignored for single plot-window terminals, i.e. `pm` and `win`. @node pause, plot, lower, Commands @section pause @c ?commands pause @cindex pause @cmindex pause @c ?pause mouse The @ref{pause} command displays any text associated with the command and then waits a specified amount of time or until the carriage return is pressed. @ref{pause} is especially useful in conjunction with `load` files. Syntax: @example pause <time> @{"<string>"@} pause mouse @{<endcondition>@}@{, <endcondition>@} @{"<string>"@} @end example <time> may be any constant or expression. Choosing -1 will wait until a carriage return is hit, zero (0) won't pause at all, and a positive number will wait the specified number of seconds. The time is rounded to an integer number of seconds if subsecond time resolution is not supported by the given platform. `pause 0` is synonymous with @ref{print}. If the current terminal supports `mousing`, then `pause mouse` will terminate on either a mouse click or on ctrl-C. For all other terminals, or if mousing is not active, `pause mouse` is equivalent to `pause -1`. If one or more end conditions are given after `pause mouse`, then any one of the conditions will terminate the pause. The possible end conditions are `keypress`, `button1`, `button2`, `button3`, `close`, and `any`. If the pause terminates on a keypress, then the ascii value of the key pressed is returned in MOUSE_KEY. The character itself is returned as a one character string in MOUSE_CHAR. Hotkeys (bind command) are disabled if keypress is one of the end conditions. Zooming is disabled if button3 is one of the end conditions. In all cases the coordinates of the mouse are returned in variables MOUSE_X, MOUSE_Y, MOUSE_X2, MOUSE_Y2. See @ref{variables}. Note: Since @ref{pause} communicates with the operating system rather than the graphics, it may behave differently with different device drivers (depending upon how text and graphics are mixed). Examples: @example pause -1 # Wait until a carriage return is hit pause 3 # Wait three seconds pause -1 "Hit return to continue" pause 10 "Isn't this pretty? It's a cubic spline." pause mouse "Click any mouse button on selected data point" pause mouse keypress "Type a letter from A-F in the active window" pause mouse button1,keypress pause mouse any "Any key or button will terminate" @end example The variant "pause mouse key" will resume after any keypress in the active plot window. If you want to wait for a particular key to be pressed, you can use a reread loop such as: @example print "I will resume after you hit the Tab key in the plot window" load "wait_for_tab" @end example File "wait_for_tab" contains the lines @example pause mouse key if (MOUSE_KEY != 9) reread @end example @node plot, print, pause, Commands @section plot @c ?commands plot @cindex plot @cmindex plot `plot` is the primary command for drawing plots with `gnuplot`. It creates plots of functions and data in many, many ways. `plot` is used to draw 2D functions and data; `splot` draws 2D projections of 3D surfaces and data. `plot` and `splot` offer many features in common; see `splot` for differences. Note specifically that although the `binary <binary list>` variation does work for both `plot` and `splot`, there are small differences between them. Syntax: @example plot @{<ranges>@} @{<iteration>@} @{<function> | @{"<datafile>" @{datafile-modifiers@}@}@} @{axes <axes>@} @{<title-spec>@} @{with <style>@} @{, @{definitions@{,@}@} <function> ...@} @end example where either a <function> or the name of a data file enclosed in quotes is supplied. A function is a mathematical expression or a pair of mathematical expressions in parametric mode. Functions may be builtin, user-defined, or provided in the plot command itself. Multiple datafiles and/or functions may be plotted in a single command, separated by commas. See `data`, @ref{functions}. Examples: @example plot sin(x) plot sin(x), cos(x) plot f(x) = sin(x*a), a = .2, f(x), a = .4, f(x) plot "datafile.1" with lines, "datafile.2" with points plot [t=1:10] [-pi:pi*2] tan(t), \ "data.1" using (tan($2)):($3/$4) smooth csplines \ axes x1y2 notitle with lines 5 plot for [datafile in "spinach.dat broccoli.dat"] datafile @end example See also `show plot`. @menu * axes:: * binary:: * data:: * errorbars:: * errorlines:: * functions:: * parametric:: * ranges:: * iteration_:: * title:: * with:: @end menu @node axes, binary, plot, plot @subsection axes @c ?commands plot axes @c ?plot axes @cindex axes There are four possible sets of axes available; the keyword <axes> is used to select the axes for which a particular line should be scaled. `x1y1` refers to the axes on the bottom and left; `x2y2` to those on the top and right; `x1y2` to those on the bottom and right; and `x2y1` to those on the top and left. Ranges specified on the `plot` command apply only to the first set of axes (bottom left). @node binary, data, axes, plot @subsection binary @cindex binary @c ?data binary @c ?datafile binary @c ?plot data binary BINARY DATA FILES: Some earlier versions of `gnuplot` automatically detected binary data files. It is now necessary to provide the keyword @ref{binary} after the filename. Adequate details of the file format must be given on the command line or extracted from the file itself for a supported binary @ref{filetype}. In particular, there are two structures for binary files, binary matrix format and binary general format. The @ref{matrix} format contains a two dimensional array of 32 bit IEEE float values with an additional column and row of coordinate values. As with ASCII matrix, in the @ref{using} list, enumeration of the coordinate row constitutes column 1, enumeration of the coordinate column constitutes column 2, and the array of values constitutes column 3. The @ref{general} format contains an arbitrary number of columns for which information must be specified at the command line. For example, @ref{array}, @ref{record}, `format` and @ref{using} can indicate the size, format and dimension of data. There are a variety of useful commands for skipping file headers and changing endianess. There are a set of commands for positioning and translating data since often coordinates are not part of the file when uniform sampling is inherent in the data. Different from matrix binary or ASCII, general binary does not treat the generated columns as 1, 2 or 3 in the @ref{using} list. Rather, column 1 begins with column 1 of the file, or as specified in the `format` list. There are global default settings for the various binary options which may be set using the same syntax as the options when used as part of the `(s)plot <filename> binary ...` command. This syntax is `set datafile binary ...`. The general rule is that common command-line specified parameters override file-extracted parameters which override default parameters. @ref{matrix} is the default binary format when no keywords specific to @ref{general} are given, i.e., @ref{array}, @ref{record}, `format`, @ref{filetype}. General binary data can be entered at the command line via the special file name '-'. However, this is intended for use through a pipe where programs can exchange binary data, not for keyboards. There is no "end of record" character for binary data. Gnuplot continues reading from a pipe until it has read the number of points declared in the @ref{array} qualifier. See @ref{matrix} or @ref{general} for more details. The @ref{index} keyword is not supported, since the file format allows only one surface per file. The @ref{every} and @ref{using} filters are supported. @ref{using} operates as if the data were read in the above triplet form. @uref{http://www.gnuplot.info/demo/binary.html,Binary File Splot Demo. } @menu * general:: * array:: * record:: * skip:: * format:: * endian:: * filetype:: * keywords:: @end menu @node general, array, binary, binary @subsubsection general @c ?commands plot binary general @c ?commands splot binary general @c ?plot binary general @c ?splot binary general @c ?datafile binary general @c ?data binary general @c ?binary general General binary data in which format information is not necessarily part of the file can be read by giving further details about the file format at the command line. Although the syntax is slightly arcane to the casual user, general binary is particularly useful for application programs using gnuplot and sending large amounts of data. Syntax: @example plot '<file_name>' @{binary <binary list>@} ... splot '<file_name>' @{binary <binary list>@} ... @end example General binary format is activated by keywords in <binary list> pertaining to information about file structure, i.e., @ref{array}, @ref{record}, `format` or @ref{filetype}. Otherwise, matrix binary format is assumed. (See @ref{matrix} for more details.) There are some standard file types that may be read for which details about the binary format may be extracted automatically. (Type @ref{binary} at the command line for a list.) Otherwise, details must be specified at the command line or set in the defaults. Keywords are described below. The keyword @ref{filetype} in <binary list> controls the routine used to read the file, i.e., the format of the data. For a list of the supported file types, type `show datafile binary filetypes`. If no file type is given, the rule is that traditional gnuplot binary is assumed for `splot` if the @ref{binary} keyword stands alone. In all other circumstances, for `plot` or when one of the <binary list> keywords appears, a raw binary file is assumed whereby the keywords specify the binary format. General binary data files fall into two basic classes, and some files may be of both classes depending upon how they are treated. There is that class for which uniform sampling is assumed and point coordinates must be generated. This is the class for which full control via the <binary list> keywords applies. For this class, the settings precedence is that command line parameters override in-file parameters, which override default settings. The other class is that set of files for which coordinate information is contained within the file or there is possibly a non-uniform sampling such as gnuplot binary. Other than for the unique data files such as gnuplot binary, one should think of binary data as conceptually the same as ASCII data. Each point has columns of information which are selected via the `<using list>` associated with @ref{using}. When no `format` string is specified, gnuplot will retrieve a number of binary variables equal to the largest column given in the `<using list>`. For example, `using 1:3` will result in three columns being read, of which the second will be ignored. There are default using lists based upon the typical number of parameters associated with a certain plot type. For example, `with image` has a default of `using 1`, while @ref{rgbimage} has a default of `using 1:2:3`. Note that the special characters for @ref{using} representing point/line/index generally should not be used for binary data. There are keywords in <binary list> that control this. @node array, record, general, binary @subsubsection array @c ?binary array Describes the sampling array dimensions associated with the binary file. The coordinates will be generated by gnuplot. A number must be specified for each dimension of the array. For example, `array=(10,20)` means the underlying sampling structure is two-dimensional with 10 points along the first (x) dimension and 20 points along the second (y) dimension. A negative number indicates that data should be read until the end of file. If there is only one dimension, the parentheses may be omitted. A colon can be used to separate the dimensions for multiple records. For example, `array=25:35` indicates there are two one-dimensional records in the file. @example Note: Gnuplot version 4.2 used the syntax array=128x128 rather than array=(128,128). The older syntax is now deprecated, but may still work if your copy of gnuplot was built to support backwards compatibility. @end example @node record, skip, array, binary @subsubsection record @c ?binary record This keyword serves the same function as @ref{array}, having the same syntax. However, @ref{record} causes gnuplot to not generate coordinate information. This is for the case where such information may be included in one of the columns of the binary data file. @node skip, format, record, binary @subsubsection skip @c ?binary skip This keyword allows you to skip sections of a binary file. For instance, if the file contains a 1024 byte header before the start of the data region you would probably want to use @example plot '<file_name>' binary skip=1024 ... @end example If there are multiple records in the file, you may specify a leading offset for each. For example, to skip 512 bytes before the 1st record and 256 bytes before the second and third records @example plot '<file_name> binary record=356:356:356 skip=512:256:256 ... @end example @node format, endian, skip, binary @subsubsection format @c ?binary format The default binary format is a float. For more flexibility, the format can include details about variable sizes. For example, `format="%uchar%int%float"` associates an unsigned character with the first using column, an int with the second column and a float with the third column. If the number of size specifications is less than the greatest column number, the size is implicitly taken to be similar to the last given variable size. Furthermore, similar to the @ref{using} specification, the format can include discarded columns via the `*` character and have implicit repetition via a numerical repeat-field. For example, `format="%*2int%3float"` causes gnuplot to discard two ints before reading three floats. To list variable sizes, type `show datafile binary datasizes`. There are a group of names that are machine dependent along with their sizes in bytes for the particular compilation. There is also a group of names which attempt to be machine independent. @node endian, filetype, format, binary @subsubsection endian @c ?binary endian Often the endianess of binary data in the file does not agree with the endianess used by the platform on which gnuplot is running. Several words can direct gnuplot how to arrange bytes. For example `endian=little` means treat the binary file as having byte significance from least to greatest. The options are @example little: least significant to greatest significance big: greatest significance to least significance default: assume file endianess is the same as compiler swap (swab): Interchange the significance. (If things don't look right, try this.) @end example Gnuplot can support "middle" ("pdp") endian if it is compiled with that option. @node filetype, keywords, endian, binary @subsubsection filetype @c ?binary filetype @cindex filetype For some standard binary file formats gnuplot can extract all the necessary information from the file in question. As an example, "format=edf" will read ESRF Header File format files. For a list of the currently supported file formats, type `show datafile binary filetypes`. There is a special file type called `auto` for which gnuplot will check if the binary file's extension is a quasi-standard extension for a supported format. Command line keywords may be used to override settings extracted from the file. The settings from the file override any defaults. (See @ref{binary} for details.) @noindent --- AVS --- @c ?binary filetype avs @c ?filetype avs @cindex avs `avs` is one of the automatically recognized binary file types for images. AVS is an extremely simple format, suitable mostly for streaming between applications. It consists of 2 longs (xwidth, ywidth) followed by a stream of pixels, each with four bytes of information alpha/red/green/blue. @noindent --- EDF --- @c ?binary filetype edf @c ?filetype edf @cindex edf @c ?filetype ehf @cindex ehf `edf` is one of the automatically recognized binary file types for images. EDF stands for ESRF Data Format, and it supports both edf and ehf formats (the latter means ESRF Header Format). More information on specifications can be found at @example http://www.edfplus.info/specs @end example @noindent --- PNG --- @c ?binary filetype png @c ?binary filetype gif @c ?binary filetype jpeg @c ?filetype png @c ?filetype gif @c ?filetype jpeg If gnuplot was configured to use the libgd library for png/gif/jpeg output, then it can also be used to read these same image types as binary files. You can use an explicit command @example plot 'file.png' binary filetype=png @end example Or the file type will be recognized automatically from the extension if you have previously requested @example set datafile binary filetype=auto @end example @node keywords, , filetype, binary @subsubsection keywords @c ?binary keywords The following keywords apply only when generating coordinates from binary data files. That is, the control mapping the individual elements of a binary array, matrix, or image to specific x/y/z positions. @noindent --- SCAN --- @c ?binary keywords scan A great deal of confusion can arise concerning the relationship between how gnuplot scans a binary file and the dimensions seen on the plot. To lessen the confusion, conceptually think of gnuplot _always_ scanning the binary file point/line/plane or fast/medium/slow. Then this keyword is used to tell gnuplot how to map this scanning convention to the Cartesian convention shown in plots, i.e., x/y/z. The qualifier for scan is a two or three letter code representing where point is assigned (first letter), line is assigned (second letter), and plane is assigned (third letter). For example, `scan=yx` means the fastest, point-by-point, increment should be mapped along the Cartesian y dimension and the middle, line-by-line, increment should be mapped along the x dimension. When the plotting mode is `plot`, the qualifier code can include the two letters x and y. For `splot`, it can include the three letters x, y and z. There is nothing restricting the inherent mapping from point/line/plane to apply only to Cartesian coordinates. For this reason there are cylindrical coordinate synonyms for the qualifier codes where t (theta), r and z are analogous to the x, y and z of Cartesian coordinates. @noindent --- TRANSPOSE --- @c ?binary keywords transpose Shorthand notation for `scan=yx` or `scan=yxz`. @noindent --- DX, DY, DZ --- @c ?binary keywords dx @c ?binary keywords dy @cindex dx @cindex dy When gnuplot generates coordinates, it uses the spacing described by these keywords. For example `dx=10 dy=20` would mean space samples along the x dimension by 10 and space samples along the y dimension by 20. `dy` cannot appear if `dx` does not appear. Similarly, `dz` cannot appear if `dy` does not appear. If the underlying dimensions are greater than the keywords specified, the spacing of the highest dimension given is extended to the other dimensions. For example, if an image is being read from a file and only `dx=3.5` is given gnuplot uses a delta x and delta y of 3.5. The following keywords also apply only when generating coordinates. However they may also be used with matrix binary files. @noindent --- FLIPX, FLIPY, FLIPZ --- @c ?binary keywords flipx Sometimes the scanning directions in a binary datafile are not consistent with that assumed by gnuplot. These keywords can flip the scanning direction along dimensions x, y, z. @noindent --- ORIGIN --- @c ?binary keywords origin When gnuplot generates coordinates based upon transposition and flip, it attempts to always position the lower left point in the array at the origin, i.e., the data lies in the first quadrant of a Cartesian system after transpose and flip. To position the array somewhere else on the graph, the @ref{origin} keyword directs gnuplot to position the lower left point of the array at a point specified by a tuple. The tuple should be a double for `plot` and a triple for `splot`. For example, `origin=(100,100):(100,200)` is for two records in the file and intended for plotting in two dimensions. A second example, `origin=(0,0,3.5)`, is for plotting in three dimensions. @noindent --- CENTER --- @c ?binary keywords center @c ?keywords center Similar to @ref{origin}, this keyword will position the array such that its center lies at the point given by the tuple. For example, `center=(0,0)`. Center does not apply when the size of the array is `Inf`. @noindent --- ROTATE --- @c ?binary keywords rotate @c ?keywords rotate The transpose and flip commands provide some flexibility in generating and orienting coordinates. However, for full degrees of freedom, it is possible to apply a rotational vector described by a rotational angle in two dimensions. The `rotate` keyword applies to the two-dimensional plane, whether it be `plot` or `splot`. The rotation is done with respect to the positive angle of the Cartesian plane. The angle can be expressed in radians, radians as a multiple of pi, or degrees. For example, `rotate=1.5708`, `rotate=0.5pi` and `rotate=90deg` are equivalent. If @ref{origin} is specified, the rotation is done about the lower left sample point before translation. Otherwise, the rotation is done about the array `center`. @noindent --- PERPENDICULAR --- @c ?binary keywords perpendicular For `splot`, the concept of a rotational vector is implemented by a triple representing the vector to be oriented normal to the two-dimensional x-y plane. Naturally, the default is (0,0,1). Thus specifying both rotate and perpendicular together can orient data myriad ways in three-space. The two-dimensional rotation is done first, followed by the three-dimensional rotation. That is, if R' is the rotational 2 x 2 matrix described by an angle, and P is the 3 x 3 matrix projecting (0,0,1) to (xp,yp,zp), let R be constructed from R' at the upper left sub-matrix, 1 at element 3,3 and zeros elsewhere. Then the matrix formula for translating data is v' = P R v, where v is the 3 x 1 vector of data extracted from the data file. In cases where the data of the file is inherently not three-dimensional, logical rules are used to place the data in three-space. (E.g., usually setting the z-dimension value to zero and placing 2D data in the x-y plane.) @node data, errorbars, binary, plot @subsection data @c ?commands plot datafile @c ?plot datafile @cindex data-file @cindex datafile @opindex datafile @cindex data @cindex file Discrete data contained in a file can be displayed by specifying the name of the data file (enclosed in single or double quotes) on the `plot` command line. Syntax: @example plot '<file_name>' @{binary <binary list>@} @{@{nonuniform@} matrix@} @{index <index list> | index "<name>"@} @{every <every list>@} @{thru <thru expression>@} @{using <using list>@} @{smooth <option>@} @{volatile@} @{noautoscale@} @end example The modifiers @ref{binary}, @ref{index}, @ref{every}, @ref{thru}, @ref{using}, and @ref{smooth} are discussed separately. In brief, @ref{binary} allows data entry from a binary file (default is ASCII), @ref{index} selects which data sets in a multi-data-set file are to be plotted, @ref{every} specifies which points within a single data set are to be plotted, @ref{using} determines how the columns within a single record are to be interpreted (@ref{thru} is a special case of @ref{using}), and @ref{smooth} allows for simple interpolation and approximation. (`splot` has a similar syntax, but does not support the @ref{smooth} and @ref{thru} options.) The `noautoscale` keyword means that the points making up this plot will be ignored when automatically determining axis range limits. ASCII DATA FILES: Data files should contain at least one data point per record (@ref{using} can select one data point from the record). Records beginning with `#` (and also with `!` on VMS) will be treated as comments and ignored. Each data point represents an (x,y) pair. For `plot`s with error bars or error bars with lines (see @ref{errorbars} or @ref{errorlines}), each data point is (x,y,ydelta), (x,y,ylow,yhigh), (x,y,xdelta), (x,y,xlow,xhigh), or (x,y,xlow,xhigh,ylow,yhigh). In all cases, the numbers of each record of a data file must be separated by white space (one or more blanks or tabs) unless a format specifier is provided by the @ref{using} option. This white space divides each record into columns. However, whitespace inside a pair of double quotes is ignored when counting columns, so the following datafile line has three columns: @example 1.0 "second column" 3.0 @end example Data may be written in exponential format with the exponent preceded by the letter e or E. The fortran exponential specifiers d, D, q, and Q may also be used if the command `set datafile fortran` is in effect. Only one column (the y value) need be provided. If x is omitted, `gnuplot` provides integer values starting at 0. In datafiles, blank records (records with no characters other than blanks and a newline and/or carriage return) are significant. Single blank records designate discontinuities in a `plot`; no line will join points separated by a blank records (if they are plotted with a line style). Two blank records in a row indicate a break between separate data sets. See @ref{index}. If autoscaling has been enabled (@ref{autoscale}), the axes are automatically extended to include all datapoints, with a whole number of tic marks if tics are being drawn. This has two consequences: i) For `splot`, the corner of the surface may not coincide with the corner of the base. In this case, no vertical line is drawn. ii) When plotting data with the same x range on a dual-axis graph, the x coordinates may not coincide if the x2tics are not being drawn. This is because the x axis has been autoextended to a whole number of tics, but the x2 axis has not. The following example illustrates the problem: @example reset; plot '-', '-' axes x2y1 1 1 19 19 e 1 1 19 19 e @end example To avoid this, you can use the `fixmin`/`fixmax` feature of the @ref{autoscale} command, which turns off the automatic extension of the axis range up to the next tic mark. Label coordinates and text can also be read from a data file (see @ref{labels}). @menu * every:: * example_datafile:: * index:: * smooth:: * special-filenames:: * thru:: * using:: * volatile:: @end menu @node every, example_datafile, data, data @subsubsection every @c ?commands plot datafile every @c ?plot datafile every @c ?plot every @c ?data-file every @c ?datafile every @cindex every The @ref{every} keyword allows a periodic sampling of a data set to be plotted. In the discussion a "point" is a datum defined by a single record in the file; "block" here will mean the same thing as "datablock" (see `glossary`). Syntax: @example plot 'file' every @{<point_incr>@} @{:@{<block_incr>@} @{:@{<start_point>@} @{:@{<start_block>@} @{:@{<end_point>@} @{:<end_block>@}@}@}@}@} @end example The data points to be plotted are selected according to a loop from <`start_point`> to <`end_point`> with increment <`point_incr`> and the blocks according to a loop from <`start_block`> to <`end_block`> with increment <`block_incr`>. The first datum in each block is numbered '0', as is the first block in the file. Note that records containing unplottable information are counted. Any of the numbers can be omitted; the increments default to unity, the start values to the first point or block, and the end values to the last point or block. ':' at the end of the @ref{every} option is not permitted. If @ref{every} is not specified, all points in all lines are plotted. Examples: @example every :::3::3 # selects just the fourth block ('0' is first) every :::::9 # selects the first 10 blocks every 2:2 # selects every other point in every other block every ::5::15 # selects points 5 through 15 in each block @end example See @uref{http://www.gnuplot.info/demo/simple.html,simple plot demos (simple.dem) } , @uref{http://www.gnuplot.info/demo/surface1.html,Non-parametric splot demos } , and @uref{http://www.gnuplot.info/demo/surface2.html,Parametric splot demos } . @node example_datafile, index, every, data @subsubsection example datafile @c ?commands plot datafile example @c ?plot datafile example @c ?plot example @c ?datafile example @c ?data-file example @cindex example This example plots the data in the file "population.dat" and a theoretical curve: @example pop(x) = 103*exp((1965-x)/10) set xrange [1960:1990] plot 'population.dat', pop(x) @end example The file "population.dat" might contain: @example # Gnu population in Antarctica since 1965 1965 103 1970 55 1975 34 1980 24 1985 10 @end example @cindex skip Binary examples: @example # Selects two float values (second one implicit) with a float value # discarded between them for an indefinite length of 1D data. plot '<file_name>' binary format="%float%*float" using 1:2 with lines @end example @example # The data file header contains all details necessary for creating # coordinates from an EDF file. plot '<file_name>' binary filetype=edf with image plot '<file_name>.edf' binary filetype=auto with image @end example @example # Selects three unsigned characters for components of a raw RGB image # and flips the y-dimension so that typical image orientation (start # at top left corner) translates to the Cartesian plane. Pixel # spacing is given and there are two images in the file. One of them # is translated via origin. plot '<file_name>' binary array=(512,1024):(1024,512) format='%uchar' \ dx=2:1 dy=1:2 origin=(0,0):(1024,1024) flipy u 1:2:3 w rgbimage @end example @example # Four separate records in which the coordinates are part of the # data file. The file was created with a endianess different from # the system on which gnuplot is running. splot '<file_name>' binary record=30:30:29:26 endian=swap u 1:2:3 @end example @example # Same input file, but this time we skip the 1st and 3rd records splot '<file_name>' binary record=30:26 skip=360:348 endian=swap u 1:2:3 @end example See also @ref{matrix}. @node index, smooth, example_datafile, data @subsubsection index @c ?commands plot datafile index @c ?plot datafile index @c ?plot index @c ?data-file index @c ?datafile index @cindex index The @ref{index} keyword allows you to select specific data sets in a multi-data-set file for plotting. Syntax: @example plot 'file' index @{ <m>@{:<n>@{:<p>@}@} | "<name>" @} @end example Data sets are separated by pairs of blank records. `index <m>` selects only set <m>; `index <m>:<n>` selects sets in the range <m> to <n>; and `index <m>:<n>:<p>` selects indices <m>, <m>+<p>, <m>+2<p>, etc., but stopping at <n>. Following C indexing, the index 0 is assigned to the first data set in the file. Specifying too large an index results in an error message. If <p> is specified but <n> is left blank then every <p>-th dataset is read until the end of the file. If @ref{index} is not specified, the entire file is plotted as a single data set. Example: @example plot 'file' index 4:5 @end example For each point in the file, the index value of the data set it appears in is available via the pseudo-column `column(-2)`. This leads to an alternative way of distinguishing individual data sets within a file as shown below. This is more awkward than the @ref{index} command if all you are doing is selecting one data set for plotting, but is very useful if you want to assign different properties to each data set. See `pseudocolumns`, `lc variable`. Example: @example plot 'file' using 1:(column(-2)==4 ? $2 : NaN) # very awkward plot 'file' using 1:2:(column(-2)) linecolor variable # very useful! @end example `index '<name>'` selects the data set with name '<name>'. Names are assigned to data sets in comment lines. The comment character and leading white space are removed from the comment line. If the resulting line starts with <name>, the following data set is now named <name> and can be selected. Example: @example plot 'file' index 'Population' @end example Please note that every comment that starts with <name> will name the following data set. To avoid problems it may be useful to choose a naming scheme like '== Population ==' or '[Population]'. @c ^ <p>See also web page @uref{http://www.gnuplot.info/demo/multimsh.html, splot with indices demo. }</p> @node smooth, special-filenames, index, data @subsubsection smooth @c ?commands plot datafile smooth @c ?plot datafile smooth @c ?plot smooth @c ?data-file smooth @c ?datafile smooth @cindex smooth `gnuplot` includes a few general-purpose routines for interpolation and approximation of data; these are grouped under the @ref{smooth} option. More sophisticated data processing may be performed by preprocessing the data externally or by using @ref{fit} with an appropriate model. Syntax: @example smooth @{unique | frequency | cumulative | cnormal | kdensity | csplines | acsplines | bezier | sbezier@} @end example `unique`, `frequency`, `cumulative` and `cnormal` plot the data after making them monotonic. Each of the other routines uses the data to determine the coefficients of a continuous curve between the endpoints of the data. This curve is then plotted in the same manner as a function, that is, by finding its value at uniform intervals along the abscissa (see @ref{samples}) and connecting these points with straight line segments (if a line style is chosen). If @ref{autoscale} is in effect, the ranges will be computed such that the plotted curve lies within the borders of the graph. If @ref{autoscale} is not in effect, and the smooth option is either `acspline` or `cspline`, the sampling of the generated curve is done across the intersection of the x range covered by the input data and the fixed abscissa range as defined by @ref{xrange}. If too few points are available to allow the selected option to be applied, an error message is produced. The minimum number is one for `unique` and `frequency`, four for `acsplines`, and three for the others. The @ref{smooth} options have no effect on function plots. @noindent --- ACSPLINES --- @c ?commands plot datafile smooth acsplines @c ?plot datafile smooth acsplines @c ?data-file smooth acsplines @c ?datafile smooth acsplines @c ?plot smooth acsplines @c ?plot acsplines @c ?smooth acsplines @cindex acsplines The `acsplines` option approximates the data with a "natural smoothing spline". After the data are made monotonic in x (see `smooth unique`), a curve is piecewise constructed from segments of cubic polynomials whose coefficients are found by the weighting the data points; the weights are taken from the third column in the data file. That default can be modified by the third entry in the @ref{using} list, e.g., @example plot 'data-file' using 1:2:(1.0) smooth acsplines @end example Qualitatively, the absolute magnitude of the weights determines the number of segments used to construct the curve. If the weights are large, the effect of each datum is large and the curve approaches that produced by connecting consecutive points with natural cubic splines. If the weights are small, the curve is composed of fewer segments and thus is smoother; the limiting case is the single segment produced by a weighted linear least squares fit to all the data. The smoothing weight can be expressed in terms of errors as a statistical weight for a point divided by a "smoothing factor" for the curve so that (standard) errors in the file can be used as smoothing weights. Example: @example sw(x,S)=1/(x*x*S) plot 'data_file' using 1:2:(sw($3,100)) smooth acsplines @end example @noindent --- BEZIER --- @c ?commands plot datafile smooth bezier @c ?plot datafile smooth bezier @c ?plot smooth bezier @c ?data-file smooth bezier @c ?datafile smooth bezier @c ?plot bezier @c ?smooth bezier @cindex bezier The `bezier` option approximates the data with a Bezier curve of degree n (the number of data points) that connects the endpoints. @noindent --- CSPLINES --- @c ?commands plot datafile smooth csplines @c ?plot datafile smooth csplines @c ?plot smooth csplines @c ?data-file smooth csplines @c ?datafile smooth csplines @c ?plot csplines @c ?smooth csplines @cindex csplines The `csplines` option connects consecutive points by natural cubic splines after rendering the data monotonic (see `smooth unique`). @noindent --- SBEZIER --- @c ?commands plot datafile smooth sbezier @c ?plot datafile smooth sbezier @c ?plot smooth sbezier @c ?data-file smooth sbezier @c ?datafile smooth sbezier @c ?plot sbezier @c ?smooth sbezier @cindex sbezier The `sbezier` option first renders the data monotonic (`unique`) and then applies the `bezier` algorithm. @noindent --- UNIQUE --- @c ?commands plot datafile smooth unique @c ?plot datafile smooth unique @c ?plot smooth unique @c ?data-file smooth unique @c ?datafile smooth unique @c ?plot unique @c ?smooth unique @cindex unique The `unique` option makes the data monotonic in x; points with the same x-value are replaced by a single point having the average y-value. The resulting points are then connected by straight line segments. @noindent --- FREQUENCY --- @c ?commands plot datafile smooth frequency @c ?plot datafile smooth frequency @c ?plot smooth frequency @c ?data-file smooth frequency @c ?datafile smooth frequency @c ?plot frequency @c ?smooth frequency @cindex frequency The `frequency` option makes the data monotonic in x; points with the same x-value are replaced by a single point having the summed y-values. The resulting points are then connected by straight line segments. See also @uref{http://www.gnuplot.info/demo/smooth.html,smooth.dem } @noindent --- CUMULATIVE --- @c ?commands plot datafile smooth cumulative @c ?plot datafile smooth cumulative @c ?plot smooth cumulative @c ?data-file smooth cumulative @c ?datafile smooth cumulative @c ?plot cumulative @c ?smooth cumulative @cindex cumulative The `cumulative` option makes the data monotonic in x; points with the same x-value are replaced by a single point containing the cumulative sum of y-values of all data points with lower x-values (i.e. to the left of the current data point). This can be used to obtain a cumulative distribution function from data. See also @uref{http://www.gnuplot.info/demo/smooth.html,smooth.dem } @noindent --- CNORMAL --- @c ?commands plot datafile smooth cnormal @c ?plot datafile smooth cnormal @c ?plot smooth cnormal @c ?data-file smooth cnormal @c ?datafile smooth cnormal @c ?plot cnormal @c ?smooth cnormal @cindex cnormal The `cnormal` option makes the data monotonic in x and normalises the y-values onto the range [0:1]. Points with the same x-value are replaced by a single point containing the cumulative sum of y-values of all data points with lower x-values (i.e. to the left of the current data point) divided by the total sum of all y-values. This can be used to obtain a normalised cumulative distribution function from data (useful when comparing sets of samples with differing numbers of members). See also @uref{http://www.gnuplot.info/demo/smooth.html,smooth.dem } @noindent --- KDENSITY --- @c ?commands plot datafile smooth kdensity @c ?plot datafile smooth kdensity @c ?plot smooth kdensity @c ?data-file smooth kdensity @c ?datafile smooth kdensity @c ?plot kdensity @c ?smooth kdensity @cindex kdensity The `kdensity` option is a way to plot a kernel density estimate (which is a smooth histogram) for a random collection of points, using Gaussian kernels. A Gaussian is placed at the location of each point in the first column and the sum of all these Gaussians is plotted as a function. The value in the second column is taken as weight of the Gaussian. (To obtain a normalized histogram, this should be 1/number-of-points). The value of the third column, if supplied, is taken as the bandwidth for the kernels. If only two columns have been specified, or if the value of the third column is zero or less, gnuplot calculates the bandwidth which would be optimal if the input data was normally distributed. (This will usually be a very conservative, i.e. broad bandwidth.) @node special-filenames, thru, smooth, data @subsubsection special-filenames @c ?commands plot datafile special-filenames @c ?plot datafile special-filenames @c ?plot special-filenames @c ?datafile special-filenames @cindex special-filenames There are a few filenames that have a special meaning: '', '-', '+' and '++'. The empty filename '' tells gnuplot to re-use the previous input file in the same plot command. So to plot two columns from the same input file: @example plot 'filename' using 1:2, '' using 1:3 @end example The special filenames '+' and '++' are a mechanism to allow the full range of @ref{using} specifiers and plot styles with in-line functions. Normally a function plot can only have a single y (or z) value associated with each sampled point. The pseudo-file '+' treats the sampled points as column 1, and allows additional column values to be specified via a @ref{using} specification, just as for a true input file. The number of samples returned is controlled by @ref{samples}. Example: @example plot '+' using ($1):(sin($1)):(sin($1)**2) with filledcurves @end example Similarly the pseudo-file '++' returns 2 columns of data forming a regular grid of [x,y] coordinates with the number of points along x controlled by @ref{samples} and the number of points along y controlled by @ref{isosamples}. You must set xrange and yrange before plotting '++'. Examples: @example splot '++' using 1:2:(sin($1)*sin($2)) with pm3d plot '++' using 1:2:(sin($1)*sin($2)) with image @end example The special filename `'-'` specifies that the data are inline; i.e., they follow the command. Only the data follow the command; `plot` options like filters, titles, and line styles remain on the `plot` command line. This is similar to << in unix shell script, and $DECK in VMS DCL. The data are entered as though they are being read from a file, one data point per record. The letter "e" at the start of the first column terminates data entry. The @ref{using} option can be applied to these data---using it to filter them through a function might make sense, but selecting columns probably doesn't! `'-'` is intended for situations where it is useful to have data and commands together, e.g., when `gnuplot` is run as a sub-process of some front-end application. Some of the demos, for example, might use this feature. While `plot` options such as @ref{index} and @ref{every} are recognized, their use forces you to enter data that won't be used. For example, while @example plot '-' index 0, '-' index 1 2 4 6 @end example @example 10 12 14 e 2 4 6 @end example @example 10 12 14 e @end example does indeed work, @example plot '-', '-' 2 4 6 e 10 12 14 e @end example is a lot easier to type. If you use `'-'` with @ref{replot}, you may need to enter the data more than once. See @ref{replot}, @ref{refresh}. A blank filename ('') specifies that the previous filename should be reused. This can be useful with things like @example plot 'a/very/long/filename' using 1:2, '' using 1:3, '' using 1:4 @end example (If you use both `'-'` and `''` on the same `plot` command, you'll need to have two sets of inline data, as in the example above.) On systems with a popen function, the datafile can be piped through a shell command by starting the file name with a '<'. For example, @example pop(x) = 103*exp(-x/10) plot "< awk '@{print $1-1965, $2@}' population.dat", pop(x) @end example would plot the same information as the first population example but with years since 1965 as the x axis. If you want to execute this example, you have to delete all comments from the data file above or substitute the following command for the first part of the command above (the part up to the comma): @example plot "< awk '$0 !~ /^#/ @{print $1-1965, $2@}' population.dat" @end example While this approach is most flexible, it is possible to achieve simple filtering with the @ref{using} or @ref{thru} keywords. On systems with an fdopen() function, data can be read from an arbitrary file descriptor attached to either a file or pipe. To read from file descriptor `n` use `'<&n'`. This allows you to easily pipe in several data files in a single call from a POSIX shell: @example $ gnuplot -p -e "plot '<&3', '<&4'" 3<data-3 4<data-4 $ ./gnuplot 5< <(myprogram -with -options) gnuplot> plot '<&5' @end example @node thru, using, special-filenames, data @subsubsection thru @c ?commands plot datafile thru @c ?plot datafile thru @c ?plot thru @c ?data-file thru @c ?datafile thru @cindex thru The @ref{thru} function is provided for backward compatibility. Syntax: @example plot 'file' thru f(x) @end example It is equivalent to: @example plot 'file' using 1:(f($2)) @end example While the latter appears more complex, it is much more flexible. The more natural @example plot 'file' thru f(y) @end example also works (i.e. you can use y as the dummy variable). @ref{thru} is parsed for `splot` and @ref{fit} but has no effect. @node using, volatile, thru, data @subsubsection using @c ?commands plot datafile using @c ?plot datafile using @c ?plot using @c ?data-file using @c ?datafile using @cindex using The most common datafile modifier is @ref{using}. It tells the program which columns of data in the input file are to be plotted. Syntax: @example plot 'file' using <entry> @{:<entry> @{:<entry> ...@}@} @{'format'@} @end example If a format is specified, it is used to read in each datafile record using the C library 'scanf' function. Otherwise the record is interpreted as consisting of columns (fields) of data separated by whitespace (spaces and/or tabs), but see `datafile separator`. Each <entry> may be a simple column number that selects the value from one field of the input file, a string that matches a column label in the first line of a data set, an expression enclosed in parentheses, or a special function not enclosed in parentheses such as xticlabels(2). If the entry is an expression in parentheses, then the function column(N) may be used to indicate the value in column N. That is, column(1) refers to the first item read, column(2) to the second, and so on. The special symbols $1, $2, ... are shorthand for column(1), column(2) ... The function `valid(N)` tests whether the value in the Nth column is a valid number. @cindex column @findex column @cindex columnhead @findex columnhead If each column of data in the input file contains a label in the first row rather than a data value, this label can be used to identify the column on input and/or in the plot legend. The column() function can be used to select an input column by label rather than by column number. For example, if the data file contains @example Height Weight Age val1 val1 val1 ... ... ... @end example then the following plot commands are all equivalent @example plot 'datafile' using 3:1, '' using 3:2 plot 'datafile' using (column("Age")):(column(1)), \ '' using (column("Age")):(column(2)) plot 'datafile' using "Age":"Height", '' using "Age":"Weight" @end example The full string must match. Comparison is case-sensitive. To use the column labels in the plot legend, use @ref{columnhead}. In addition to the actual columns 1...N in the input data file, gnuplot presents data from several "pseudo-columns" that hold bookkeeping information. E.g. $0 or column(0) returns the sequence number of this data record within a dataset. Please see `pseudocolumns`. An empty <entry> will default to its order in the list of entries. For example, `using ::4` is interpreted as `using 1:2:4`. If the @ref{using} list has only a single entry, that <entry> will be used for y and the data point number (pseudo-column $0) is used for x; for example, "`plot 'file' using 1`" is identical to "`plot 'file' using 0:1`". If the @ref{using} list has two entries, these will be used for x and y. See @ref{style} and @ref{fit} for details about plotting styles that make use of data from additional columns of input. 'scanf' accepts several numerical specifications but `gnuplot` requires all inputs to be double-precision floating-point variables, so "%lf" is essentially the only permissible specifier. A format string given by the user must contain at least one such input specifier, and no more than seven of them. 'scanf' expects to see white space---a blank, tab ("\t"), newline ("\n"), or formfeed ("\f")---between numbers; anything else in the input stream must be explicitly skipped. Note that the use of "\t", "\n", or "\f" requires use of double-quotes rather than single-quotes. @noindent --- USING_EXAMPLES --- @cindex examples @c ?commands plot datafile using examples @c ?plot datafile using examples @c ?datafile using examples @c ?using examples This creates a plot of the sum of the 2nd and 3rd data against the first: The format string specifies comma- rather than space-separated columns. The same result could be achieved by specifying `set datafile separator ","`. @example plot 'file' using 1:($2+$3) '%lf,%lf,%lf' @end example In this example the data are read from the file "MyData" using a more complicated format: @example plot 'MyData' using "%*lf%lf%*20[^\n]%lf" @end example The meaning of this format is: @example %*lf ignore a number %lf read a double-precision number (x by default) %*20[^\n] ignore 20 non-newline characters %lf read a double-precision number (y by default) @end example One trick is to use the ternary `?:` operator to filter data: @example plot 'file' using 1:($3>10 ? $2 : 1/0) @end example which plots the datum in column two against that in column one provided the datum in column three exceeds ten. `1/0` is undefined; `gnuplot` quietly ignores undefined points, so unsuitable points are suppressed. Or you can use the pre-defined variable NaN to achieve the same result. @cindex NaN In fact, you can use a constant expression for the column number, provided it doesn't start with an opening parenthesis; constructs like `using 0+(complicated expression)` can be used. The crucial point is that the expression is evaluated once if it doesn't start with a left parenthesis, or once for each data point read if it does. If timeseries data are being used, the time can span multiple columns. The starting column should be specified. Note that the spaces within the time must be included when calculating starting columns for other data. E.g., if the first element on a line is a time with an embedded space, the y value should be specified as column three. It should be noted that `plot 'file'`, `plot 'file' using 1:2`, and `plot 'file' using ($1):($2)` can be subtly different: 1) if `file` has some lines with one column and some with two, the first will invent x values when they are missing, the second will quietly ignore the lines with one column, and the third will store an undefined value for lines with one point (so that in a plot with lines, no line joins points across the bad point); 2) if a line contains text at the first column, the first will abort the plot on an error, but the second and third should quietly skip the garbage. In fact, it is often possible to plot a file with lots of lines of garbage at the top simply by specifying @example plot 'file' using 1:2 @end example However, if you want to leave text in your data files, it is safer to put the comment character (#) in the first column of the text lines. @noindent --- PSEUDOCOLUMNS --- @cindex pseudocolumns @c ?commands plot datafile using pseudocolumns @c ?plot datafile using pseudocolumns @c ?datafile using pseudocolumns @c ?using pseudocolumns Expressions in the @ref{using} clause of a plot statement can refer to additional bookkeeping values in addition to the actual data values contained in the input file. These are contained in "pseudocolumns". @example column(0) The sequential order of each point within a data set. The counter starts at 0 and is reset by two sequential blank records. The shorthand form $0 is available. column(-1) This counter starts at 0 and is reset by a single blank line. This corresponds to the data line in array or grid data. column(-2) The index number of the current data set within a file that contains multiple data sets. See @ref{index}. @end example @noindent --- XTICLABELS --- @cindex xticlabels @c ?using xticlabels @c ?plot using xticlabels Axis tick labels can be generated via a string function, usually taking a data column as an argument. The simplest form uses the data column itself as a string. That is, xticlabels(N) is shorthand for xticlabels(stringcolumn(N)). This example uses the contents of column 3 as x-axis tick labels. @example plot 'datafile' using <xcol>:<ycol>:xticlabels(3) with <plotstyle> @end example Axis tick labels may be generated for any of the plot axes: x x2 y y2 z. The `ticlabels(<labelcol>)` specifiers must come after all of the data coordinate specifiers in the @ref{using} portion of the command. For each data point which has a valid set of X,Y[,Z] coordinates, the string value given to xticlabels() is added to the list of xtic labels at the same X coordinate as the point it belongs to. `xticlabels()` may be shortened to `xtic()` and so on. Example: @example splot "data" using 2:4:6:xtic(1):ytic(3):ztic(6) @end example In this example the x and y axis tic labels are taken from different columns than the x and y coordinate values. The z axis tics, however, are generated from the z coordinate of the corresponding point. Example: @example plot "data" using 1:2:xtic( $3 > 10. ? "A" : "B" ) @end example This example shows the use of a string-valued function to generate x-axis tick labels. Each point in the data file generates a tick mark on x labeled either "A" or "B" depending on the value in column 3. @noindent --- X2TICLABELS --- @c ?using x2ticlabels @c ?plot using x2ticlabels See `plot using xticlabels`. @noindent --- YTICLABELS --- @c ?using yticlabels @c ?plot using yticlabels See `plot using xticlabels`. @noindent --- Y2TICLABELS --- @c ?using y2ticlabels @c ?plot using y2ticlabels See `plot using xticlabels`. @noindent --- ZTICLABELS --- @c ?using zticlabels @c ?plot using zticlabels See `plot using xticlabels`. @node volatile, , using, data @subsubsection volatile @c ?datafile volatile @c ?data volatile @c ?plot datafile volatile @c ?plot volatile @cindex volatile The @ref{volatile} keyword in a plot command indicates that the data previously read from the input stream or file may not be available for re-reading. This tells the program to use @ref{refresh} rather than @ref{replot} commands whenever possible. See @ref{refresh}. @node errorbars, errorlines, data, plot @subsection errorbars @c ?commands plot errorbars @c ?commands splot errorbars @c ?plot errorbars @c ?splot errorbars @cindex errorbars Error bars are supported for 2D data file plots by reading one to four additional columns (or @ref{using} entries); these additional values are used in different ways by the various errorbar styles. In the default situation, `gnuplot` expects to see three, four, or six numbers on each line of the data file---either @example (x, y, ydelta), (x, y, ylow, yhigh), (x, y, xdelta), (x, y, xlow, xhigh), (x, y, xdelta, ydelta), or (x, y, xlow, xhigh, ylow, yhigh). @end example The x coordinate must be specified. The order of the numbers must be exactly as given above, though the @ref{using} qualifier can manipulate the order and provide values for missing columns. For example, @example plot 'file' with errorbars plot 'file' using 1:2:(sqrt($1)) with xerrorbars plot 'file' using 1:2:($1-$3):($1+$3):4:5 with xyerrorbars @end example The last example is for a file containing an unsupported combination of relative x and absolute y errors. The @ref{using} entry generates absolute x min and max from the relative error. The y error bar is a vertical line plotted from (x, ylow) to (x, yhigh). If ydelta is specified instead of ylow and yhigh, ylow = y - ydelta and yhigh = y + ydelta are derived. If there are only two numbers on the record, yhigh and ylow are both set to y. The x error bar is a horizontal line computed in the same fashion. To get lines plotted between the data points, `plot` the data file twice, once with errorbars and once with lines (but remember to use the `notitle` option on one to avoid two entries in the key). Alternately, use the errorlines command (see @ref{errorlines}). The error bars have crossbars at each end unless @ref{bars} is used (see @ref{bars} for details). If autoscaling is on, the ranges will be adjusted to include the error bars. See also @uref{http://www.gnuplot.info/demo/mgr.html,errorbar demos. } See @ref{using}, @ref{with}, and @ref{style} for more information. @node errorlines, functions, errorbars, plot @subsection errorlines @c ?commands plot errorlines @c ?commands splot errorlines @c ?plot errorlines @c ?splot errorlines @cindex errorlines Lines with error bars are supported for 2D data file plots by reading one to four additional columns (or @ref{using} entries); these additional values are used in different ways by the various errorlines styles. In the default situation, `gnuplot` expects to see three, four, or six numbers on each line of the data file---either @example (x, y, ydelta), (x, y, ylow, yhigh), (x, y, xdelta), (x, y, xlow, xhigh), (x, y, xdelta, ydelta), or (x, y, xlow, xhigh, ylow, yhigh). @end example The x coordinate must be specified. The order of the numbers must be exactly as given above, though the @ref{using} qualifier can manipulate the order and provide values for missing columns. For example, @example plot 'file' with errorlines plot 'file' using 1:2:(sqrt($1)) with xerrorlines plot 'file' using 1:2:($1-$3):($1+$3):4:5 with xyerrorlines @end example The last example is for a file containing an unsupported combination of relative x and absolute y errors. The @ref{using} entry generates absolute x min and max from the relative error. The y error bar is a vertical line plotted from (x, ylow) to (x, yhigh). If ydelta is specified instead of ylow and yhigh, ylow = y - ydelta and yhigh = y + ydelta are derived. If there are only two numbers on the record, yhigh and ylow are both set to y. The x error bar is a horizontal line computed in the same fashion. The error bars have crossbars at each end unless @ref{bars} is used (see @ref{bars} for details). If autoscaling is on, the ranges will be adjusted to include the error bars. See @ref{using}, @ref{with}, and @ref{style} for more information. @node functions, parametric, errorlines, plot @subsection functions @c ?commands plot functions @c ?plot functions @cindex functions @opindex functions Built-in or user-defined functions can be displayed by the `plot` and `splot` commands in addition to, or instead of, data read from a file. The requested function is evaluated by sampling at regular intervals spanning the independent axis range[s]. See @ref{samples} and @ref{isosamples}. Example: @example approx(ang) = ang - ang**3 / (3*2) plot sin(x) title "sin(x)", approx(x) title "approximation" @end example To set a default plot style for functions, see `set style function`. For information on built-in functions, see @ref{functions}. For information on defining your own functions, see `user-defined`. @node parametric, ranges, functions, plot @subsection parametric @c ?commands plot parametric @c ?commands splot parametric @c ?plot parametric @c ?splot parametric When in parametric mode (`set parametric`) mathematical expressions must be given in pairs for `plot` and in triplets for `splot`. Examples: @example plot sin(t),t**2 splot cos(u)*cos(v),cos(u)*sin(v),sin(u) @end example Data files are plotted as before, except any preceding parametric function must be fully specified before a data file is given as a plot. In other words, the x parametric function (`sin(t)` above) and the y parametric function (`t**2` above) must not be interrupted with any modifiers or data functions; doing so will generate a syntax error stating that the parametric function is not fully specified. Other modifiers, such as @ref{with} and @ref{title}, may be specified only after the parametric function has been completed: @example plot sin(t),t**2 title 'Parametric example' with linespoints @end example See also @uref{http://www.gnuplot.info/demo/param.html,Parametric Mode Demos. } @node ranges, iteration_, parametric, plot @subsection ranges @c ?commands plot ranges @c ?commands splot ranges @c ?plot ranges @c ?splot ranges @cindex ranges The optional axis ranges at the start of a plot command specify the region of the graph that will be displayed. These override any ranges established by a previous `set range` statement. Syntax: @example [@{<dummy-var>=@}@{@{<min>@}:@{<max>@}@}] [@{@{<min>@}:@{<max>@}@}] @end example The first form applies to the independent variable (@ref{xrange} or @ref{trange}, if in parametric mode). The second form applies to the dependent variable @ref{yrange} (and @ref{xrange}, too, if in parametric mode). <dummy-var> is a new name for the independent variable. (The defaults may be changed with @ref{dummy}.) The optional <min> and <max> terms can be constant expressions or *. In non-parametric mode, the order in which ranges must be given is @ref{xrange} and @ref{yrange}. In parametric mode, the order for the `plot` command is @ref{trange}, @ref{xrange}, and @ref{yrange}. The following `plot` command shows setting the @ref{trange} to [-pi:pi], the @ref{xrange} to [-1.3:1.3] and the @ref{yrange} to [-1:1] for the duration of the graph: @example plot [-pi:pi] [-1.3:1.3] [-1:1] sin(t),t**2 @end example Note that the x2range and y2range cannot be specified here---@ref{x2range} and @ref{y2range} must be used. Ranges are interpreted in the order listed above for the appropriate mode. Once all those needed are specified, no further ones must be listed, but unneeded ones cannot be skipped---use an empty range `[]` as a placeholder. `*` can be used to allow autoscaling of either of min and max. See also @ref{autoscale}. Ranges specified on the `plot` or `splot` command line affect only that graph; use the @ref{xrange}, @ref{yrange}, etc., commands to change the default ranges for future graphs. With time data, you must provide the range (in the same manner as the time appears in the datafile) within quotes. `gnuplot` uses the @ref{timefmt} string to read the value---see @ref{timefmt}. Examples: This uses the current ranges: @example plot cos(x) @end example This sets the x range only: @example plot [-10:30] sin(pi*x)/(pi*x) @end example This is the same, but uses t as the dummy-variable: @example plot [t = -10 :30] sin(pi*t)/(pi*t) @end example This sets both the x and y ranges: @example plot [-pi:pi] [-3:3] tan(x), 1/x @end example This sets only the y range, and turns off autoscaling on both axes: @example plot [ ] [-2:sin(5)*-8] sin(x)**besj0(x) @end example This sets xmax and ymin only: @example plot [:200] [-pi:] exp(sin(x)) @end example This sets the x range for a timeseries: @example set timefmt "%d/%m/%y %H:%M" plot ["1/6/93 12:00":"5/6/93 12:00"] 'timedata.dat' @end example @node iteration_, title, ranges, plot @subsection iteration @c ?commands plot iteration @c ?commands splot iteration @c ?plot iteration @c ?splot iteration @cindex iteration @cmindex iteration If many similar files or functions are to be plotted together, it may be convenient to do so by iterating over a shared plot command. Syntax: @example plot for [<variable> = <start> : <end> @{:<increment>@}] plot for [<variable> in "string of words"] @end example The scope of an iteration ends at the next comma or the end of the command, whichever comes first. Iteration can not be nested. This will plot one curve, sin(3x), because iteration ends at the comma @example plot for [i=1:3] j=i, sin(j*x) @end example This will plot three curves because there is no comma after the definition of j @example plot for [i=1:3] j=i sin(j*x) @end example Example: @example plot for [dataset in "apples bananas"] dataset."dat" title dataset @end example In this example iteration is used both to generate a file name and a corresponding title. Example: @example file(n) = sprintf("dataset_%d.dat",n) splot for [i=1:10] file(i) title sprintf("dataset %d",i) @end example This example defines a string-valued function that generates file names, and plots ten such files together. The iteration variable ('i' in this example) is treated as an integer, and may be used more than once. Example: @example set key left plot for [n=1:4] x**n sprintf("%d",n) @end example This example plots a family of functions. Example: @example list = "apple banana cabbage daikon eggplant" item(n) = word(list,n) plot for [i=1:words(list)] item[i].".dat" title item(i) list = "new stuff" replot @end example This example steps through a list and plots once per item. Because the items are retrieved dynamically, you can change the list and then replot. Example: @example list = "apple banana cabbage daikon eggplant" plot for [i in list] i.".dat" title i list = "new stuff" replot @end example This is example does exactly the same thing as the previous example, but uses the string iterator form of the command rather than an integer iterator. @node title, with, iteration_, plot @subsection title @c ?commands plot title @c ?commands splot title @c ?plot title @c ?splot title @cindex columnheader By default each plot is listed in the key by the corresponding function or file name. You can give an explicit plot title instead using the @ref{title} option. Syntax: @example title <text> | notitle [<ignored text>] title columnheader | title columnheader(N) @end example where <text> is a quoted string or an expression that evaluates to a string. The quotes will not be shown in the key. There is also an option that will interpret the first entry in a column of input data (i.e. the column header) as a text field, and use it as the key title. See `datastrings`. This can be made the default by specifying @ref{columnhead}. The line title and sample can be omitted from the key by using the keyword `notitle`. A null title (`title ''`) is equivalent to `notitle`. If only the sample is wanted, use one or more blanks (`title ' '`). If `notitle` is followed by a string this string is ignored. If `key autotitles` is set (which is the default) and neither @ref{title} nor `notitle` are specified the line title is the function name or the file name as it appears on the `plot` command. If it is a file name, any datafile modifiers specified will be included in the default title. The layout of the key itself (position, title justification, etc.) can be controlled by `set key`. Please see `set key` for details. Examples: This plots y=x with the title 'x': @example plot x @end example This plots x squared with title "x^2" and file "data.1" with title "measured data": @example plot x**2 title "x^2", 'data.1' t "measured data" @end example This puts an untitled circular border around a polar graph: @example set polar; plot my_function(t), 1 notitle @end example Plot multiple columns of data, each of which contains its own title in the file @example plot for [i=1:4] 'data' using i title columnhead @end example @node with, , title, plot @subsection with @c ?commands plot with @c ?commands splot with @c ?commands plot style @c ?commands splot style @c ?plot with @c ?plot style @c ?splot with @c ?splot style @cindex style @opindex style @cindex with Functions and data may be displayed in one of a large number of styles. The @ref{with} keyword provides the means of selection. Syntax: @example with <style> @{ @{linestyle | ls <line_style>@} | @{@{linetype | lt <line_type>@} @{linewidth | lw <line_width>@} @{linecolor | lc <colorspec>@} @{pointtype | pt <point_type>@} @{pointsize | ps <point_size>@} @{fill | fs <fillstyle>@} @{nohidden3d@} @{nocontours@} @{nosurface@} @{palette@}@} @} @end example where <style> is one of @example lines dots steps errorbars xerrorbar xyerrorlines points impulses fsteps errorlines xerrorlines yerrorbars linespoints labels histeps financebars xyerrorbars yerrorlines vectors @end example or @example boxes candlesticks image circles boxerrorbars filledcurves rgbimage ellipses boxxyerrorbars histograms rgbalpha pm3d boxplot @end example The first group of styles have associated line, point, and text properties. The second group of styles also have fill properties. See `fillstyle`. Some styles have further sub-styles. See `plotting styles` for details of each. A default style may be chosen by `set style function` and `set style data`. By default, each function and data file will use a different line type and point type, up to the maximum number of available types. All terminal drivers support at least six different point types, and re-use them, in order, if more are required. To see the complete set of line and point types available for the current terminal, type @ref{test}. If you wish to choose the line or point type for a single plot, <line_type> and <point_type> may be specified. These are positive integer constants (or expressions) that specify the line type and point type to be used for the plot. Use @ref{test} to display the types available for your terminal. You may also scale the line width and point size for a plot by using <line_width> and <point_size>, which are specified relative to the default values for each terminal. The pointsize may also be altered globally---see @ref{pointsize} for details. But note that both <point_size> as set here and as set by @ref{pointsize} multiply the default point size---their effects are not cumulative. That is, `set pointsize 2; plot x w p ps 3` will use points three times default size, not six. It is also possible to specify `pointsize variable` either as part of a line style or for an individual plot. In this case one extra column of input is required, i.e. 3 columns for a 2D plot and 4 columns for a 3D splot. The size of each individual point is determined by multiplying the global pointsize by the value read from the data file. If you have defined specific line type/width and point type/size combinations with `set style line`, one of these may be selected by setting <line_style> to the index of the desired style. If gnuplot was built with @ref{pm3d} support, the special keyword @ref{palette} is allowed for smooth color change of lines, points and dots in `splots`. The color is chosen from a smooth palette which was set previously with the command @ref{palette}. The color value corresponds to the z-value of the point coordinates or to the color coordinate if specified by the 4th parameter in @ref{using}. Both 2D and 3D plots (`plot` and `splot` commands) can use palette colors as specified by either their fractional value or the corresponding value mapped to the colorbox range. A palette color value can also be read from an explicitly specified input column in the @ref{using} specifier. See `colors`, @ref{palette}, `linetype`. The keyword `nohidden3d` applies only to plots made with the `splot` command. Normally the global option @ref{hidden3d} applies to all plots in the graph. You can attach the `nohidden3d` option to any individual plots that you want to exclude from the hidden3d processing. The individual elements other than surfaces (i.e. lines, dots, labels, ...) of a plot marked `nohidden3d` will all be drawn, even if they would normally be obscured by other plot elements. Similarly, the keyword `nocontours` will turn off contouring for an individual plot even if the global property @ref{contour} is active. Similarly, the keyword `nosurface` will turn off the 3D surface for an individual plot even if the global property @ref{surface} is active. The keywords may be abbreviated as indicated. Note that the `linewidth`, @ref{pointsize} and @ref{palette} options are not supported by all terminals. Examples: This plots sin(x) with impulses: @example plot sin(x) with impulses @end example This plots x with points, x**2 with the default: @example plot x w points, x**2 @end example This plots tan(x) with the default function style, file "data.1" with lines: @example plot [ ] [-2:5] tan(x), 'data.1' with l @end example This plots "leastsq.dat" with impulses: @example plot 'leastsq.dat' w i @end example This plots the data file "population" with boxes: @example plot 'population' with boxes @end example This plots "exper.dat" with errorbars and lines connecting the points (errorbars require three or four columns): @example plot 'exper.dat' w lines, 'exper.dat' notitle w errorbars @end example Another way to plot "exper.dat" with errorlines (errorbars require three or four columns): @example plot 'exper.dat' w errorlines @end example This plots sin(x) and cos(x) with linespoints, using the same line type but different point types: @example plot sin(x) with linesp lt 1 pt 3, cos(x) with linesp lt 1 pt 4 @end example This plots file "data" with points of type 3 and twice usual size: @example plot 'data' with points pointtype 3 pointsize 2 @end example This plots file "data" with variable pointsize read from column 4 @example plot 'data' using 1:2:4 with points pt 5 pointsize variable @end example This plots two data sets with lines differing only by weight: @example plot 'd1' t "good" w l lt 2 lw 3, 'd2' t "bad" w l lt 2 lw 1 @end example This plots filled curve of x*x and a color stripe: @example plot x*x with filledcurve closed, 40 with filledcurve y1=10 @end example This plots x*x and a color box: @example plot x*x, (x>=-5 && x<=5 ? 40 : 1/0) with filledcurve y1=10 lt 8 @end example This plots a surface with color lines: @example splot x*x-y*y with line palette @end example This plots two color surfaces at different altitudes: @example splot x*x-y*y with pm3d, x*x+y*y with pm3d at t @end example @node print, pwd, plot, Commands @section print @c ?commands print @cindex print @cmindex print The @ref{print} command prints the value of <expression> to the screen. It is synonymous with `pause 0`. <expression> may be anything that `gnuplot` can evaluate that produces a number, or it can be a string. Syntax: @example print <expression> @{, <expression>, ...@} @end example See `expressions`. The output file can be set with @ref{print}. @node pwd, quit, print, Commands @section pwd @c ?commands pwd @cindex pwd @cmindex pwd The @ref{pwd} command prints the name of the working directory to the screen. Note that if you wish to store the current directory into a string variable or use it in string expressions, then you can use variable GPVAL_PWD, see `show variables all`. @node quit, raise, pwd, Commands @section quit @c ?commands quit @cindex quit @cmindex quit The @ref{exit} and @ref{quit} commands and END-OF-FILE character will exit `gnuplot`. Each of these commands will clear the output device (as does the @ref{clear} command) before exiting. @node raise, refresh, quit, Commands @section raise @c ?commands raise @cindex raise @cmindex raise Syntax: @example raise @{plot_window_nb@} @end example The @ref{raise} command raises (opposite to @ref{lower}) plot window(s) associated with the interactive terminal of your gnuplot session, i.e. `pm`, `win`, `wxt` or `x11`. It puts the plot window to front (top) in the z-order windows stack of the window manager of your desktop. As `x11` and `wxt` support multiple plot windows, then by default they raise these windows in descending order of most recently created on top to the least recently created on bottom. If a plot number is supplied as an optional parameter, only the associated plot window will be raised if it exists. The optional parameter is ignored for single plot-windows terminal, i.e. `pm` and `win`. If the window is not raised under X11, then perhaps the plot window is running in a different X11 session (telnet or ssh session, for example), or perhaps raising is blocked by your window manager policy setting. @node refresh, replot, raise, Commands @section refresh @c ?commands refresh @cindex refresh @cmindex refresh The @ref{refresh} command is similar to @ref{replot}, with two major differences. @ref{refresh} reformats and redraws the current plot using the data already read in. This means that you can use @ref{refresh} for plots with in-line data (pseudo-device '-') and for plots from datafiles whose contents are volatile. You cannot use the @ref{refresh} command to add new data to an existing plot. Mousing operations, in particular zoom and unzoom, will use @ref{refresh} rather than @ref{replot} if appropriate. Example: @example plot 'datafile' volatile with lines, '-' with labels 100 200 "Special point" e # Various mousing operations go here set title "Zoomed in view" set term post set output 'zoom.ps' refresh @end example @node replot, reread, refresh, Commands @section replot @c ?commands replot @cindex replot @cmindex replot The @ref{replot} command without arguments repeats the last `plot` or `splot` command. This can be useful for viewing a plot with different `set` options, or when generating the same plot for several devices. Arguments specified after a @ref{replot} command will be added onto the last `plot` or `splot` command (with an implied ',' separator) before it is repeated. @ref{replot} accepts the same arguments as the `plot` and `splot` commands except that ranges cannot be specified. Thus you can use @ref{replot} to plot a function against the second axes if the previous command was `plot` but not if it was `splot`. N.B.---use of @example plot '-' ; ... ; replot @end example is not recommended, because it will require that you type in the data all over again. In most cases you can use the @ref{refresh} command instead, which will redraw the plot using the data previously read in. Note that @ref{replot} does not work in @ref{multiplot} mode, since it reproduces only the last plot rather than the entire screen. See also `command-line-editing` for ways to edit the last `plot` (`splot`) command. See also `show plot` to show the whole current plotting command, and the possibility to copy it into the `history`. @node reread, reset, replot, Commands @section reread @c ?commands reread @cindex reread @cmindex reread The @ref{reread} command causes the current `gnuplot` command file, as specified by a `load` command or on the command line, to be reset to its starting point before further commands are read from it. This essentially implements an endless loop of the commands from the beginning of the command file to the @ref{reread} command. (But this is not necessarily a disaster---@ref{reread} can be very useful when used in conjunction with `if`.) The @ref{reread} command has no effect if input from standard input. Examples: Suppose the file "looper" contains the commands @example a=a+1 plot sin(x*a) pause -1 if(a<5) reread @end example and from within `gnuplot` you submit the commands @example a=0 load 'looper' @end example The result will be five plots (separated by the @ref{pause} message). Suppose the file "data" contains six columns of numbers with a total yrange from 0 to 10; the first is x and the next are five different functions of x. Suppose also that the file "plotter" contains the commands @example c_p = c_p+1 plot "$0" using 1:c_p with lines linetype c_p if(c_p < n_p) reread @end example and from within `gnuplot` you submit the commands @example n_p=6 c_p=1 unset key set yrange [0:10] set multiplot call 'plotter' 'data' unset multiplot @end example The result is a single graph consisting of five plots. The yrange must be set explicitly to guarantee that the five separate graphs (drawn on top of each other in multiplot mode) will have exactly the same axes. The linetype must be specified; otherwise all the plots would be drawn with the same type. See animate.dem in demo directory for an animated example. @node reset, save, reread, Commands @section reset @c ?commands reset @cindex reset @cmindex reset @c ?reset errors @c ?reset bind The @ref{reset} command causes all graph-related options that can be set with the `set` command to take on their default values. This command is useful, e.g., to restore the default graph settings at the end of a command file, or to return to a defined state after lots of settings have been changed within a command file. Please refer to the `set` command to see the default values that the various options take. The following are _not_ affected by @ref{reset}. @example `set term` @ref{output} @ref{loadpath} @ref{fontpath} `set linetype` @ref{encoding} @ref{decimalsign} @ref{locale} @ref{psdir} @end example @cindex error state `reset errors` clears only the error state variables GPVAL_ERRNO and GPVAL_ERRMSG. @cindex bind @opindex bind `reset bind` restores all hotkey bindings to their default state. @node save, set-show, reset, Commands @section save @c ?commands save @c ?save set @cindex save @cmindex save The @ref{save} command saves user-defined functions, variables, the `set term` status, all `set` options, or all of these, plus the last `plot` (`splot`) command to the specified file. Syntax: @example save @{<option>@} '<filename>' @end example where <option> is @ref{functions}, @ref{variables}, @ref{terminal} or `set`. If no option is used, `gnuplot` saves functions, variables, `set` options and the last `plot` (`splot`) command. @ref{save}d files are written in text format and may be read by the `load` command. For @ref{save} with the `set` option or without any option, the @ref{terminal} choice and the @ref{output} filename are written out as a comment, to get an output file that works in other installations of gnuplot, without changes and without risk of unwillingly overwriting files. @ref{terminal} will write out just the @ref{terminal} status, without the comment marker in front of it. This is mainly useful for switching the @ref{terminal} setting for a short while, and getting back to the previously set terminal, afterwards, by loading the saved @ref{terminal} status. Note that for a single gnuplot session you may rather use the other method of saving and restoring current terminal by the commands `set term push` and `set term pop`, see `set term`. The filename must be enclosed in quotes. The special filename "-" may be used to @ref{save} commands to standard output. On systems which support a popen function (Unix), the output of save can be piped through an external program by starting the file name with a '|'. This provides a consistent interface to `gnuplot`'s internal settings to programs which communicate with `gnuplot` through a pipe. Please see help for `batch/interactive` for more details. Examples: @example save 'work.gnu' save functions 'func.dat' save var 'var.dat' save set 'options.dat' save term 'myterm.gnu' save '-' save '|grep title >t.gp' @end example @node set-show, shell, save, Commands @section set-show @c ?commands set @c ?commands show @cindex set @cindex show @c ?show all The `set` command can be used to set _lots_ of options. No screen is drawn, however, until a `plot`, `splot`, or @ref{replot} command is given. The `show` command shows their settings; `show all` shows all the settings. Options changed using `set` can be returned to the default state by giving the corresponding @ref{unset} command. See also the @ref{reset} command, which returns all settable parameters to default values. If a variable contains time/date data, `show` will display it according to the format currently defined by @ref{timefmt}, even if that was not in effect when the variable was initially defined. @cindex iteration @cmindex iteration The `set` and @ref{unset} commands may optionally contain an iteration clause. See @ref{iteration}. @menu * angles:: * arrow:: * autoscale:: * bars:: * bind_:: * bmargin:: * border:: * boxwidth:: * clabel:: * clip:: * cntrparam:: * color_box:: * colornames:: * contour:: * data_style:: * datafile:: * decimalsign:: * dgrid3d:: * dummy:: * encoding:: * fit_:: * fontpath:: * format_:: * function_style:: * functions_:: * grid:: * hidden3d:: * historysize:: * isosamples:: * key:: * label:: * linetype:: * lmargin:: * loadpath:: * locale:: * logscale:: * macros:: * mapping:: * margin:: * mouse:: * multiplot:: * mx2tics:: * mxtics:: * my2tics:: * mytics:: * mztics:: * object:: * offsets:: * origin:: * output:: * parametric_:: * plot_:: * pm3d:: * palette:: * pointintervalbox:: * pointsize:: * polar_:: * print_:: * psdir:: * raxis:: * rmargin:: * rrange:: * rtics:: * samples:: * size:: * style:: * surface:: * table:: * terminal:: * termoption:: * tics:: * ticslevel:: * ticscale:: * timestamp:: * timefmt:: * title_:: * tmargin:: * trange:: * urange:: * variables:: * version:: * view:: * vrange:: * x2data:: * x2dtics:: * x2label:: * x2mtics:: * x2range:: * x2tics:: * x2zeroaxis:: * xdata:: * xdtics:: * xlabel:: * xmtics:: * xrange:: * xtics:: * xyplane:: * xzeroaxis:: * y2data:: * y2dtics:: * y2label:: * y2mtics:: * y2range:: * y2tics:: * y2zeroaxis:: * ydata:: * ydtics:: * ylabel:: * ymtics:: * yrange:: * ytics:: * yzeroaxis:: * zdata:: * zdtics:: * zzeroaxis:: * cbdata:: * cbdtics:: * zero:: * zeroaxis:: * zlabel:: * zmtics:: * zrange:: * ztics:: * cblabel:: * cbmtics:: * cbrange:: * cbtics:: @end menu @node angles, arrow, set-show, set-show @subsection angles @c ?commands set angles @c ?commands show angles @c ?set angles @c ?show angles @cindex angles @opindex angles @c ?commands set angles degrees @c ?set angles degrees @c ?angles degrees @cindex degrees By default, `gnuplot` assumes the independent variable in polar graphs is in units of radians. If `set angles degrees` is specified before `set polar`, then the default range is [0:360] and the independent variable has units of degrees. This is particularly useful for plots of data files. The angle setting also applies to 3D mapping as set via the @ref{mapping} command. Syntax: @example set angles @{degrees | radians@} show angles @end example The angle specified in `set grid polar` is also read and displayed in the units specified by @ref{angles}. @ref{angles} also affects the arguments of the machine-defined functions sin(x), cos(x) and tan(x), and the outputs of asin(x), acos(x), atan(x), atan2(x), and arg(x). It has no effect on the arguments of hyperbolic functions or Bessel functions. However, the output arguments of inverse hyperbolic functions of complex arguments are affected; if these functions are used, `set angles radians` must be in effect to maintain consistency between input and output arguments. @example x=@{1.0,0.1@} set angles radians y=sinh(x) print y #prints @{1.16933, 0.154051@} print asinh(y) #prints @{1.0, 0.1@} @end example but @example set angles degrees y=sinh(x) print y #prints @{1.16933, 0.154051@} print asinh(y) #prints @{57.29578, 5.729578@} @end example See also @uref{http://www.gnuplot.info/demo/poldat.html,poldat.dem: polar plot using @ref{angles} demo. } @node arrow, autoscale, angles, set-show @subsection arrow @c ?commands set arrow @c ?commands unset arrow @c ?commands show arrow @c ?set arrow @c ?unset arrow @c ?show arrow @cindex arrow @opindex arrow @cindex noarrow Arbitrary arrows can be placed on a plot using the @ref{arrow} command. Syntax: @example set arrow @{<tag>@} @{from <position>@} @{to|rto <position>@} @{ @{arrowstyle | as <arrow_style>@} | @{ @{nohead | head | backhead | heads@} @{size <length>,<angle>@{,<backangle>@}@} @{filled | empty | nofilled@} @{front | back@} @{ @{linestyle | ls <line_style>@} | @{linetype | lt <line_type>@} @{linewidth | lw <line_width@} @} @} @} @end example @example unset arrow @{<tag>@} show arrow @{<tag>@} @end example <tag> is an integer that identifies the arrow. If no tag is given, the lowest unused tag value is assigned automatically. The tag can be used to delete or change a specific arrow. To change any attribute of an existing arrow, use the @ref{arrow} command with the appropriate tag and specify the parts of the arrow to be changed. The <position>s are specified by either x,y or x,y,z, and may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. Unspecified coordinates default to 0. The end points can be specified in one of five coordinate systems---`first` or `second` axes, `graph`, `screen`, or `character`. See `coordinates` for details. A coordinate system specifier does not carry over from the "from" position to the "to" position. Arrows outside the screen boundaries are permitted but may cause device errors. If the end point is specified by "rto" instead of "to" it is drawn relatively to the start point. For linear axes, `graph` and `screen` coordinates, the distance between the start and the end point corresponds to the given relative coordinate. For logarithmic axes, the relative given coordinate corresponds to the factor of the coordinate between start and end point. Thus, a negative relative value or zero are not allowed for logarithmic axes. Specifying `nohead` produces an arrow drawn without a head---a line segment. This gives you yet another way to draw a line segment on the plot. By default, an arrow has a head at its end. Specifying `backhead` draws an arrow head at the start point of the arrow while `heads` draws arrow heads on both ends of the line. Not all terminal types support double-ended arrows. Head size can be controlled by `size <length>,<angle>` or `size <length>,<angle>,<backangle>`, where `<length>` defines length of each branch of the arrow head and `<angle>` the angle (in degrees) they make with the arrow. `<Length>` is in x-axis units; this can be changed by `first`, `second`, `graph`, `screen`, or `character` before the <length>; see `coordinates` for details. `<Backangle>` only takes effect when `filled` or `empty` is also used. Then, `<backangle>` is the angle (in degrees) the back branches make with the arrow (in the same direction as `<angle>`). The `fig` terminal has a restricted backangle function. It supports three different angles. There are two thresholds: Below 70 degrees, the arrow head gets an indented back angle. Above 110 degrees, the arrow head has an acute back angle. Between these thresholds, the back line is straight. Specifying `filled` produces filled arrow heads (if heads are used). Filling is supported on filled-polygon capable terminals, see help of @ref{pm3d} for their list, otherwise the arrow heads are closed but not filled. The same result (closed but not filled arrow head) is reached by specifying `empty`. Further, filling and outline is obviously not supported on terminals drawing arrows by their own specific routines, like `metafont`, `metapost`, `latex` or `tgif`. The line style may be selected from a user-defined list of line styles (see `set style line`) or may be defined here by providing values for <line_type> (an index from the default list of styles) and/or <line_width> (which is a multiplier for the default width). Note, however, that if a user-defined line style has been selected, its properties (type and width) cannot be altered merely by issuing another @ref{arrow} command with the appropriate index and `lt` or `lw`. If `front` is given, the arrow is written on top of the graphed data. If `back` is given (the default), the arrow is written underneath the graphed data. Using `front` will prevent an arrow from being obscured by dense data. Examples: To set an arrow pointing from the origin to (1,2) with user-defined style 5, use: @example set arrow to 1,2 ls 5 @end example To set an arrow from bottom left of plotting area to (-5,5,3), and tag the arrow number 3, use: @example set arrow 3 from graph 0,0 to -5,5,3 @end example To change the preceding arrow to end at 1,1,1, without an arrow head and double its width, use: @example set arrow 3 to 1,1,1 nohead lw 2 @end example To draw a vertical line from the bottom to the top of the graph at x=3, use: @example set arrow from 3, graph 0 to 3, graph 1 nohead @end example To draw a vertical arrow with T-shape ends, use: @example set arrow 3 from 0,-5 to 0,5 heads size screen 0.1,90 @end example To draw an arrow relatively to the start point, where the relative distances are given in graph coordinates, use: @example set arrow from 0,-5 rto graph 0.1,0.1 @end example To draw an arrow with relative end point in logarithmic x axis, use: @example set logscale x set arrow from 100,-5 rto 10,10 @end example This draws an arrow from 100,-5 to 1000,5. For the logarithmic x axis, the relative coordinate 10 means "factor 10" while for the linear y axis, the relative coordinate 10 means "difference 10". To delete arrow number 2, use: @example unset arrow 2 @end example To delete all arrows, use: @example unset arrow @end example To show all arrows (in tag order), use: @example show arrow @end example @uref{http://www.gnuplot.info/demo/arrowstyle.html,arrows demos. } @node autoscale, bars, arrow, set-show @subsection autoscale @c ?commands set autoscale @c ?commands unset autoscale @c ?commands show autoscale @c ?set autoscale @c ?unset autoscale @c ?show autoscale @cindex autoscale @opindex autoscale @cindex noautoscale Autoscaling may be set individually on the x, y or z axis or globally on all axes. The default is to autoscale all axes. If you want to autoscale based on a subset of the plots in the figure, you can mark the other ones with the flag `noautoscale`. See @ref{datafile}. Syntax: @example set autoscale @{<axes>@{|min|max|fixmin|fixmax|fix@} | fix | keepfix@} unset autoscale @{<axes>@} show autoscale @end example where <axes> is either `x`, `y`, `z`, `cb`, `x2`, `y2` or `xy`. A keyword with `min` or `max` appended (this cannot be done with `xy`) tells `gnuplot` to autoscale just the minimum or maximum of that axis. If no keyword is given, all axes are autoscaled. A keyword with `fixmin`, `fixmax` or `fix` appended tells gnuplot to disable extension of the axis range to the next tic mark position, for autoscaled axes using equidistant tics; `set autoscale fix` sets this for all axes. Command `set autoscale keepfix` autoscales all axes while keeping the fix settings. When autoscaling, the axis range is automatically computed and the dependent axis (y for a `plot` and z for `splot`) is scaled to include the range of the function or data being plotted. If autoscaling of the dependent axis (y or z) is not set, the current y or z range is used. Autoscaling the independent variables (x for `plot` and x,y for `splot`) is a request to set the domain to match any data file being plotted. If there are no data files, autoscaling an independent variable has no effect. In other words, in the absence of a data file, functions alone do not affect the x range (or the y range if plotting z = f(x,y)). Please see @ref{xrange} for additional information about ranges. The behavior of autoscaling remains consistent in parametric mode, (see `set parametric`). However, there are more dependent variables and hence more control over x, y, and z axis scales. In parametric mode, the independent or dummy variable is t for `plot`s and u,v for `splot`s. @ref{autoscale} in parametric mode, then, controls all ranges (t, u, v, x, y, and z) and allows x, y, and z to be fully autoscaled. Autoscaling works the same way for polar mode as it does for parametric mode for `plot`, with the extension that in polar mode @ref{dummy} can be used to change the independent variable from t (see @ref{dummy}). When tics are displayed on second axes but no plot has been specified for those axes, x2range and y2range are inherited from xrange and yrange. This is done _before_ xrange and yrange are autoextended to a whole number of tics, which can cause unexpected results. You can use the `fixmin` or `fixmax` options to avoid this. Examples: This sets autoscaling of the y axis (other axes are not affected): @example set autoscale y @end example This sets autoscaling only for the minimum of the y axis (the maximum of the y axis and the other axes are not affected): @example set autoscale ymin @end example This disables extension of the x2 axis tics to the next tic mark, thus keeping the exact range as found in the plotted data and functions: @example set autoscale x2fixmin set autoscale x2fixmax @end example This sets autoscaling of the x and y axes: @example set autoscale xy @end example This sets autoscaling of the x, y, z, x2 and y2 axes: @example set autoscale @end example This disables autoscaling of the x, y, z, x2 and y2 axes: @example unset autoscale @end example This disables autoscaling of the z axis only: @example unset autoscale z @end example @menu * parametric_mode:: * polar_mode:: @end menu @node parametric_mode, polar_mode, autoscale, autoscale @subsubsection parametric mode @c ?commands set autoscale parametric @c ?set autoscale parametric @c ?set autoscale t When in parametric mode (`set parametric`), the xrange is as fully scalable as the y range. In other words, in parametric mode the x axis can be automatically scaled to fit the range of the parametric function that is being plotted. Of course, the y axis can also be automatically scaled just as in the non-parametric case. If autoscaling on the x axis is not set, the current x range is used. Data files are plotted the same in parametric and non-parametric mode. However, there is a difference in mixed function and data plots: in non-parametric mode with autoscaled x, the x range of the datafile controls the x range of the functions; in parametric mode it has no influence. For completeness a last command `set autoscale t` is accepted. However, the effect of this "scaling" is very minor. When `gnuplot` determines that the t range would be empty, it makes a small adjustment if autoscaling is true. Otherwise, `gnuplot` gives an error. Such behavior may, in fact, not be very useful and the command `set autoscale t` is certainly questionable. `splot` extends the above ideas as you would expect. If autoscaling is set, then x, y, and z ranges are computed and each axis scaled to fit the resulting data. @node polar_mode, , parametric_mode, autoscale @subsubsection polar mode @c ?commands set autoscale polar @c ?set autoscale polar When in polar mode (`set polar`), the xrange and the yrange may be left in autoscale mode. If @ref{rrange} is used to limit the extent of the polar axis, then xrange and yrange will adjust to match this automatically. However, explicit xrange and yrange commands can later be used to make further adjustments. See @ref{rrange}. The trange may also be autoscaled. Note that if the trange is contained within one quadrant, autoscaling will produce a polar plot of only that single quadrant. Explicitly setting one or two ranges but not others may lead to unexpected results. See also @uref{http://www.gnuplot.info/demo/poldat.html,polar demos. } @node bars, bind_, autoscale, set-show @subsection bars @c ?commands set bars @c ?commands show bars @c ?set bars @c ?show bars @cindex bars @opindex bars The @ref{bars} command controls the tics at the ends of error bars, and also at the end of the whiskers belonging to a boxplot. Syntax: @example set bars @{small | large | fullwidth | <size>@} @{front | back@} unset bars show bars @end example `small` is a synonym for 0.0, and `large` for 1.0. The default is 1.0 if no size is given. The keyword `fullwidth` is relevant only to boxplots and to histograms with errorbars. It sets the width of the errorbar ends to be the same as the width of the associated box. It does not change the width of the box itself. The `front` and `back` keywords are relevant only to errorbars attached to filled rectangles (boxes, candlesticks, histograms). @node bind_, bmargin, bars, set-show @subsection bind @c ?commands show bind @c ?show bind @cindex bind @opindex bind Show the current state of all hotkey bindings. See `bind`. @node bmargin, border, bind_, set-show @subsection bmargin @c ?commands set bmargin @c ?set bmargin @cindex bmargin @opindex bmargin The command @ref{bmargin} sets the size of the bottom margin. Please see @ref{margin} for details. @node border, boxwidth, bmargin, set-show @subsection border @c ?commands set border @c ?commands unset border @c ?commands show border @c ?set border @c ?unset border @c ?show border @cindex border @opindex border @cindex noborder The @ref{border} and @ref{border} commands control the display of the graph borders for the `plot` and `splot` commands. Note that the borders do not necessarily coincide with the axes; with `plot` they often do, but with `splot` they usually do not. Syntax: @example set border @{<integer>@} @{front | back@} @{linewidth | lw <line_width>@} @{@{linestyle | ls <line_style>@} | @{linetype | lt <line_type>@}@} unset border show border @end example With a `splot` displayed in an arbitrary orientation, like `set view 56,103`, the four corners of the x-y plane can be referred to as "front", "back", "left" and "right". A similar set of four corners exist for the top surface, of course. Thus the border connecting, say, the back and right corners of the x-y plane is the "bottom right back" border, and the border connecting the top and bottom front corners is the "front vertical". (This nomenclature is defined solely to allow the reader to figure out the table that follows.) The borders are encoded in a 12-bit integer: the bottom four bits control the border for `plot` and the sides of the base for `splot`; the next four bits control the verticals in `splot`; the top four bits control the edges on top of the `splot`. In detail, `<integer>` should be the sum of the appropriate entries from the following table: @example Bit plot splot 1 bottom bottom left front 2 left bottom left back 4 top bottom right front 8 right bottom right back 16 no effect left vertical 32 no effect back vertical 64 no effect right vertical 128 no effect front vertical 256 no effect top left back 512 no effect top right back 1024 no effect top left front 2048 no effect top right front @end example @c ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> @c ^<colgroup> @c ^ <col align="right"> @c ^ <col align="center"> @c ^ <col align="center"> @c ^</colgroup> @c ^<thead> @c ^<tr> <th>Bit</th> <th>plot</th> <th>splot</th></tr> @c ^</thead> @c ^<tbody> @c ^<tr> <td>1</td> <td>bottom</td> <td>bottom left front</td></tr> @c ^<tr> <td>2</td> <td>left</td> <td>bottom left back</td></tr> @c ^<tr> <td>4</td> <td>top</td> <td>bottom right front</td></tr> @c ^<tr> <td>8</td> <td>right</td> <td>bottom right back</td></tr> @c ^<tr> <td>16</td> <td>no effect</td> <td>left vertical</td></tr> @c ^<tr> <td>32</td> <td>no effect</td> <td>back vertical</td></tr> @c ^<tr> <td>64</td> <td>no effect</td> <td>right vertical</td></tr> @c ^<tr> <td>128</td> <td>no effect</td> <td>front vertical</td></tr> @c ^<tr> <td>256</td> <td>no effect</td> <td>top left back</td></tr> @c ^<tr> <td>512</td> <td>no effect</td> <td>top right back</td></tr> @c ^<tr> <td>1024</td> <td>no effect</td> <td>top left front</td></tr> @c ^<tr> <td>2048</td> <td>no effect</td> <td>top right front</td></tr> @c ^</tbody> @c ^</table> Various bits or combinations of bits may be added together in the command. The default is 31, which is all four sides for `plot`, and base and z axis for `splot`. In 2D plots the border is normally drawn on top of all plots elements (`front`). If you want the border to be drawn behind the plot elements, use `set border back`. Using the optional <line_style>, <line_type> and <line_width> specifiers, the way the border lines are drawn can be influenced (limited by what the current terminal driver supports). For `plot`, tics may be drawn on edges other than bottom and left by enabling the second axes -- see `set xtics` for details. If a `splot` draws only on the base, as is the case with "`unset surface; set contour base`", then the verticals and the top are not drawn even if they are specified. The `set grid` options 'back', 'front' and 'layerdefault' also control the order in which the border lines are drawn with respect to the output of the plotted data. Examples: Draw default borders: @example set border @end example Draw only the left and bottom (`plot`) or both front and back bottom left (`splot`) borders: @example set border 3 @end example Draw a complete box around a `splot`: @example set border 4095 @end example Draw a topless box around a `splot`, omitting the front vertical: @example set border 127+256+512 # or set border 1023-128 @end example Draw only the top and right borders for a `plot` and label them as axes: @example unset xtics; unset ytics; set x2tics; set y2tics; set border 12 @end example @node boxwidth, clabel, border, set-show @subsection boxwidth @c ?commands set boxwidth @c ?commands show boxwidth @c ?set boxwidth @c ?show boxwidth @cindex boxwidth @opindex boxwidth The @ref{boxwidth} command is used to set the default width of boxes in the @ref{boxes}, @ref{boxerrorbars}, @ref{boxplot}, @ref{candlesticks} and @ref{histograms} styles. Syntax: @example set boxwidth @{<width>@} @{absolute|relative@} show boxwidth @end example By default, adjacent boxes are extended in width until they touch each other. A different default width may be specified using the @ref{boxwidth} command. `Relative` widths are interpreted as being a fraction of this default width. An explicit value for the boxwidth is interpreted as being a number of units along the current x axis (`absolute`) unless the modifier `relative` is given. If the x axis is a log-scale (see `set log`) then the value of boxwidth is truly "absolute" only at x=1; this physical width is maintained everywhere along the axis (i.e. the boxes do not become narrower the value of x increases). If the range spanned by a log scale x axis is far from x=1, some experimentation may be required to find a useful value of boxwidth. The default is superseded by explicit width information taken from an extra data column in styles @ref{boxes} or @ref{boxerrorbars}. In a four-column data set, the fourth column will be interpreted as the box width unless the width is set to -2.0, in which case the width will be calculated automatically. See @ref{boxes} and @ref{boxerrorbars} for more details. To set the box width to automatic use the command @example set boxwidth @end example or, for four-column data, @example set boxwidth -2 @end example The same effect can be achieved with the @ref{using} keyword in `plot`: @example plot 'file' using 1:2:3:4:(-2) @end example To set the box width to half of the automatic size use @example set boxwidth 0.5 relative @end example To set the box width to an absolute value of 2 use @example set boxwidth 2 absolute @end example @node clabel, clip, boxwidth, set-show @subsection clabel @c ?commands set clabel @c ?commands unset clabel @c ?commands show clabel @c ?set clabel @c ?unset clabel @c ?show clabel @cindex clabel @opindex clabel `gnuplot` will vary the linetype used for each contour level when clabel is set. When this option on (the default), a legend labels each linestyle with the z level it represents. It is not possible at present to separate the contour labels from the surface key. Syntax: @example set clabel @{'<format>'@} unset clabel show clabel @end example The default for the format string is %8.3g, which gives three decimal places. This may produce poor label alignment if the key is altered from its default configuration. The first contour linetype, or only contour linetype when clabel is off, is the surface linetype +1; contour points are the same style as surface points. See also @ref{contour}. @node clip, cntrparam, clabel, set-show @subsection clip @c ?commands set clip @c ?commands unset clip @c ?commands show clip @c ?set clip @c ?unset clip @c ?show clip @cindex clip @opindex clip @cindex noclip `gnuplot` can clip data points and lines that are near the boundaries of a graph. Syntax: @example set clip <clip-type> unset clip <clip-type> show clip @end example Three clip types for points and lines are supported by `gnuplot`: `points`, `one`, and `two`. One, two, or all three clip types may be active for a single graph. Note that clipping of color filled quadrangles drawn by @ref{pm3d} maps and surfaces is not controlled by this command, but by `set pm3d clip1in` and `set pm3d clip4in`. The `points` clip type forces `gnuplot` to clip (actually, not plot at all) data points that fall within but too close to the boundaries. This is done so that large symbols used for points will not extend outside the boundary lines. Without clipping points near the boundaries, the plot may look bad. Adjusting the x and y ranges may give similar results. Setting the `one` clip type causes `gnuplot` to draw a line segment which has only one of its two endpoints within the graph. Only the in-range portion of the line is drawn. The alternative is to not draw any portion of the line segment. Some lines may have both endpoints out of range, but pass through the graph. Setting the `two` clip-type allows the visible portion of these lines to be drawn. In no case is a line drawn outside the graph. The defaults are `noclip points`, `clip one`, and `noclip two`. To check the state of all forms of clipping, use @example show clip @end example For backward compatibility with older versions, the following forms are also permitted: @example set clip unset clip @end example `set clip` is synonymous with `set clip points`; `unset clip` turns off all three types of clipping. @node cntrparam, color_box, clip, set-show @subsection cntrparam @c ?commands set cntrparam @c ?commands show cntrparam @c ?set cntrparam @c ?show cntrparam @cindex cntrparam @opindex cntrparam @ref{cntrparam} controls the generation of contours and their smoothness for a contour plot. @ref{contour} displays current settings of @ref{cntrparam} as well as @ref{contour}. Syntax: @example set cntrparam @{ @{ linear | cubicspline | bspline | points <n> | order <n> | levels @{ auto @{<n>@} | <n> | discrete <z1> @{,<z2>@{,<z3>...@}@} | incremental <start>, <incr> @{,<end>@} @} @} @} show contour @end example This command has two functions. First, it sets the values of z for which contour points are to be determined (by linear interpolation between data points or function isosamples.) Second, it controls the way contours are drawn between the points determined to be of equal z. <n> should be an integral constant expression and <z1>, <z2> ... any constant expressions. The parameters are: `linear`, `cubicspline`, `bspline`---Controls type of approximation or interpolation. If `linear`, then straight line segments connect points of equal z magnitude. If `cubicspline`, then piecewise-linear contours are interpolated between the same equal z points to form somewhat smoother contours, but which may undulate. If `bspline`, a guaranteed-smoother curve is drawn, which only approximates the position of the points of equal-z. `points`---Eventually all drawings are done with piecewise-linear strokes. This number controls the number of line segments used to approximate the `bspline` or `cubicspline` curve. Number of cubicspline or bspline segments (strokes) = `points` * number of linear segments. `order`---Order of the bspline approximation to be used. The bigger this order is, the smoother the resulting contour. (Of course, higher order bspline curves will move further away from the original piecewise linear data.) This option is relevant for `bspline` mode only. Allowed values are integers in the range from 2 (linear) to 10. `levels`--- Selection of contour levels, controlled by `auto` (default), `discrete`, `incremental`, and <n>, number of contour levels. For `auto`, <n> specifies a nominal number of levels; the actual number will be adjusted to give simple labels. If the surface is bounded by zmin and zmax, contours will be generated at integer multiples of dz between zmin and zmax, where dz is 1, 2, or 5 times some power of ten (like the step between two tic marks). For `levels discrete`, contours will be generated at z = <z1>, <z2> ... as specified; the number of discrete levels sets the number of contour levels. In `discrete` mode, any `set cntrparam levels <n>` are ignored. For `incremental`, contours are generated at values of z beginning at <start> and increasing by <increment>, until the number of contours is reached. <end> is used to determine the number of contour levels, which will be changed by any subsequent `set cntrparam levels <n>`. If the z axis is logarithmic, <increment> will be interpreted as a factor, just like in @ref{ztics}. If the command @ref{cntrparam} is given without any arguments specified, the defaults are used: linear, 5 points, order 4, 5 auto levels. Examples: @example set cntrparam bspline set cntrparam points 7 set cntrparam order 10 @end example To select levels automatically, 5 if the level increment criteria are met: @example set cntrparam levels auto 5 @end example To specify discrete levels at .1, .37, and .9: @example set cntrparam levels discrete .1,1/exp(1),.9 @end example To specify levels from 0 to 4 with increment 1: @example set cntrparam levels incremental 0,1,4 @end example To set the number of levels to 10 (changing an incremental end or possibly the number of auto levels): @example set cntrparam levels 10 @end example To set the start and increment while retaining the number of levels: @example set cntrparam levels incremental 100,50 @end example See also @ref{contour} for control of where the contours are drawn, and @ref{clabel} for control of the format of the contour labels and linetypes. See also @uref{http://www.gnuplot.info/demo/contours.html,contours demo (contours.dem) } and @uref{http://www.gnuplot.info/demo/discrete.html,contours with user defined levels demo (discrete.dem). } @node color_box, colornames, cntrparam, set-show @subsection color box @c ?commands set colorbox @c ?commands show colorbox @c ?commands unset colorbox @c ?set colorbox @c ?show colorbox @c ?unset colorbox @cindex colorbox The color scheme, i.e. the gradient of the smooth color with min_z and max_z values of @ref{pm3d}'s @ref{palette}, is drawn in a color box unless `unset colorbox`. @example set colorbox set colorbox @{ @{ vertical | horizontal @} @{ default | user @} @{ origin x, y @} @{ size x, y @} @{ front | back @} @{ noborder | bdefault | border [line style] @} @} show colorbox unset colorbox @end example Color box position can be `default` or `user`. If the latter is specified the values as given with the @ref{origin} and @ref{size} subcommands are used. The box can be drawn after (`front`) or before (`back`) the graph or the surface. The orientation of the color gradient can be switched by options `vertical` and `horizontal`. `origin x, y` and `size x, y` are used only in combination with the `user` option. The x and y values are interpreted as screen coordinates by default, and this is the only legal option for 3D plots. 2D plots, including splot with `set view map`, allow any coordinate system to be specified. Try for example: @example set colorbox horiz user origin .1,.02 size .8,.04 @end example which will draw a horizontal gradient somewhere at the bottom of the graph. @ref{border} turns the border on (this is the default). `noborder` turns the border off. If an positive integer argument is given after @ref{border}, it is used as a line style tag which is used for drawing the border, e.g.: @example set style line 2604 linetype -1 linewidth .4 set colorbox border 2604 @end example will use line style `2604`, a thin line with the default border color (-1) for drawing the border. `bdefault` (which is the default) will use the default border line style for drawing the border of the color box. The axis of the color box is called `cb` and it is controlled by means of the usual axes commands, i.e. `set/unset/show` with @ref{cbrange}, `[m]cbtics`, `format cb`, `grid [m]cb`, @ref{cblabel}, and perhaps even @ref{cbdata}, `[no]cbdtics`, `[no]cbmtics`. `set colorbox` without any parameter switches the position to default. `unset colorbox` resets the default parameters for the colorbox and switches the colorbox off. See also help for @ref{pm3d}, @ref{palette}, @ref{pm3d}, and `set style line`. @node colornames, contour, color_box, set-show @subsection colornames @cindex colornames @opindex colornames @c ?show colornames @c ?commands show colornames @c ?show palette colornames Gnuplot knows a limited number of color names. You can use these to define the color range spanned by a pm3d palette, or to assign a terminal-independent color to a particular linetype or linestyle. To see the list of known color names, use the command @ref{colornames}. Example: @example set style line 1 linecolor rgb "sea-green" @end example @node contour, data_style, colornames, set-show @subsection contour @c ?commands set contour @c ?commands unset contour @c ?commands show contour @c ?set contour @c ?unset contour @c ?show contour @cindex contour @opindex contour @cindex nocontour @ref{contour} enables contour drawing for surfaces. This option is available for `splot` only. It requires grid data, see `grid_data` for more details. If contours are desired from non-grid data, @ref{dgrid3d} can be used to create an appropriate grid. Syntax: @example set contour @{base | surface | both@} unset contour show contour @end example The three options specify where to draw the contours: `base` draws the contours on the grid base where the x/ytics are placed, @ref{surface} draws the contours on the surfaces themselves, and `both` draws the contours on both the base and the surface. If no option is provided, the default is `base`. See also @ref{cntrparam} for the parameters that affect the drawing of contours, and @ref{clabel} for control of labelling of the contours. The surface can be switched off (see @ref{surface}), giving a contour-only graph. Though it is possible to use @ref{size} to enlarge the plot to fill the screen, more control over the output format can be obtained by writing the contour information to a file, and rereading it as a 2D datafile plot: @example unset surface set contour set cntrparam ... set table 'filename' splot ... unset table # contour info now in filename set term <whatever> plot 'filename' @end example In order to draw contours, the data should be organized as "grid data". In such a file all the points for a single y-isoline are listed, then all the points for the next y-isoline, and so on. A single blank line (a line containing no characters other than blank spaces and a carriage return and/or a line feed) separates one y-isoline from the next. See also @ref{datafile}. See also @uref{http://www.gnuplot.info/demo/contours.html,contours demo (contours.dem) } and @uref{http://www.gnuplot.info/demo/discrete.html,contours with user defined levels demo (discrete.dem). } @node data_style, datafile, contour, set-show @subsection data style @c ?set data style This form of the command is deprecated. Please see `set style data`. @node datafile, decimalsign, data_style, set-show @subsection datafile @c ?set datafile @c ?show datafile The @ref{datafile} command options control interpretation of fields read from input data files by the `plot`, `splot`, and @ref{fit} commands. Six such options are currently implemented. @menu * set_datafile_fortran:: * set_datafile_nofpe_trap:: * set_datafile_missing:: * set_datafile_separator:: * set_datafile_commentschars:: * set_datafile_binary:: @end menu @node set_datafile_fortran, set_datafile_nofpe_trap, datafile, datafile @subsubsection set datafile fortran @c ?set datafile fortran @c ?show datafile fortran @cindex fortran The `set datafile fortran` command enables a special check for values in the input file expressed as Fortran D or Q constants. This extra check slows down the input process, and should only be selected if you do in fact have datafiles containing Fortran D or Q constants. The option can be disabled again using `unset datafile fortran`. @node set_datafile_nofpe_trap, set_datafile_missing, set_datafile_fortran, datafile @subsubsection set datafile nofpe_trap @c ?set datafile nofpe_trap @cindex fpe_trap @cindex nofpe_trap @cindex floating point exceptions The `set datafile nofpe_trap` command tells gnuplot not to re-initialize a floating point exception handler before every expression evaluation used while reading data from an input file. This can significantly speed data input from very large files at the risk of program termination if a floating-point exception is generated. @node set_datafile_missing, set_datafile_separator, set_datafile_nofpe_trap, datafile @subsubsection set datafile missing @c ?set datafile missing @c ?show datafile missing @c ?set missing @cindex missing The `set datafile missing` command allows you to tell `gnuplot` what character string is used in a data file to denote missing data. Exactly how this missing value will be treated depends on the @ref{using} specifier of the `plot` or `splot` command. Syntax: @example set datafile missing @{"<string>"@} show datafile missing unset datafile @end example Example: @example # Ignore entries containing IEEE NaN ("Not a Number") code set datafile missing "NaN" @end example Example: @example set style data linespoints plot '-' 1 10 2 20 3 ? 4 40 5 50 e set datafile missing "?" plot '-' 1 10 2 20 3 ? 4 40 5 50 e plot '-' using 1:2 1 10 2 20 3 ? 4 40 5 50 e plot '-' using 1:($2) 1 10 2 20 3 ? 4 40 5 50 e @end example The first `plot` will recognize only the first datum in the "3 ?" line. It will use the single-datum-on-a-line convention that the line number is "x" and the datum is "y", so the point will be plotted (in this case erroneously) at (2,3). The second and third `plot` commands will correctly ignore the middle line. The plotted line will connect the points at (2,20) and (4,40). The fourth `plot` will also correctly ignore the middle line, but the plotted line will not connect the points at (2,20) and (4,40). There is no default character for `missing`, but in many cases any non-parsible string of characters found where a numerical value is expected will be treated as missing data. @node set_datafile_separator, set_datafile_commentschars, set_datafile_missing, datafile @subsubsection set datafile separator @c ?set datafile separator @c ?show datafile separator @c ?datafile separator @cindex separator The command `set datafile separator "<char>"` tells `gnuplot` that data fields in subsequent input files are separated by <char> rather than by whitespace. The most common use is to read in csv (comma-separated value) files written by spreadsheet or database programs. By default data fields are separated by whitespace. Syntax: @example set datafile separator @{"<char>" | whitespace@} @end example Examples: @example # Input file contains tab-separated fields set datafile separator "\t" @end example @example # Input file contains comma-separated values fields set datafile separator "," @end example @node set_datafile_commentschars, set_datafile_binary, set_datafile_separator, datafile @subsubsection set datafile commentschars @c ?set datafile commentschars @cindex commentschars The `set datafile commentschars` command allows you to tell `gnuplot` what characters are used in a data file to denote comments. Gnuplot will ignore rest of the line behind the specified characters if either of them is the first non-blank character on the line. Syntax: @example set datafile commentschars @{"<string>"@} show datafile commentschars unset commentschars @end example Default value of the string is "#!" on VMS and "#" otherwise. Then, the following line in a data file is completely ignored @example # 1 2 3 4 @end example but the following @example 1 # 3 4 @end example produces rather unexpected plot unless @example set datafile missing '#' @end example is specified as well. Example: @example set datafile commentschars "#!%" @end example @node set_datafile_binary, , set_datafile_commentschars, datafile @subsubsection set datafile binary @c ?set datafile binary The @ref{binary} command is used to set the defaults when reading binary data files. The syntax matches precisely that used for commands `plot` and `splot`. See @ref{matrix} and @ref{general} for details about the keywords that can be present in <binary list>. Syntax: @example set datafile binary <binary list> show datafile binary show datafile unset datafile @end example Examples: @example set datafile binary filetype=auto set datafile binary array=(512,512) format="%uchar" @end example @c ?show datafile binary @example show datafile binary # list current settings @end example @node decimalsign, dgrid3d, datafile, set-show @subsection decimalsign @c ?commands set decimalsign @c ?commands show decimalsign @c ?commands unset decimalsign @c ?set decimalsign @c ?show decimalsign @c ?unset decimalsign @cindex decimalsign @opindex decimalsign @cindex locale @opindex locale The @ref{decimalsign} command selects a decimal sign for numbers printed into tic labels or `set label` strings. Syntax: @example set decimalsign @{<value> | locale @{"<locale>"@}@} unset decimalsign show decimalsign @end example The argument <value> is a string to be used in place of the usual decimal point. Typical choices include the period, '.', and the comma, ',', but others may be useful, too. If you omit the <value> argument, the decimal separator is not modified from the usual default, which is a period. Unsetting decimalsign has the same effect as omitting <value>. Example: Correct typesetting in most European countries requires: @example set decimalsign ',' @end example Please note: If you set an explicit string, this affects only numbers that are printed using gnuplot's gprintf() formatting routine, include axis tics. It does not affect the format expected for input data, and it does not affect numbers printed with the sprintf() formatting routine. To change the behavior of both input and output formatting, instead use the form @example set decimalsign locale @end example This instructs the program to use both input and output formats in accordance with the current setting of the LC_ALL, LC_NUMERIC, or LANG environmental variables. @example set decimalsign locale "foo" @end example This instructs the program to format all input and output in accordance with locale "foo", which must be installed. If locale "foo" is not found then an error message is printed and the decimal sign setting is unchanged. On linux systems you can get a list of the locales installed on your machine by typing "locale -a". A typical linux locale string is of the form "sl_SI.UTF-8". A typical Windows locale string is of the form "Slovenian_Slovenia.1250" or "slovenian". Please note that interpretation of the locale settings is done by the C library at runtime. Older C libraries may offer only partial support for locale settings such as the thousands grouping separator character. @example set decimalsign locale; set decimalsign "." @end example This sets all input and output to use whatever decimal sign is correct for the current locale, but over-rides this with an explicit '.' in numbers formatted using gnuplot's internal gprintf() function. @node dgrid3d, dummy, decimalsign, set-show @subsection dgrid3d @c ?commands set dgrid3d @c ?commands unset dgrid3d @c ?commands show dgrid3d @c ?set dgrid3d @c ?unset dgrid3d @c ?show dgrid3d @cindex dgrid3d @opindex dgrid3d @cindex nodgrid3d @cindex kdensity2d The @ref{dgrid3d} command enables, and can set parameters for, non-grid to grid data mapping. See `splot grid_data` for more details about the grid data structure. Syntax: @example set dgrid3d @{<rows>@} @{,@{<cols>@}@} @{ splines | qnorm @{<norm>@} | (gauss | cauchy | exp | box | hann) @{kdensity@} @{<dx>@} @{,<dy>@} @} unset dgrid3d show dgrid3d @end example By default @ref{dgrid3d} is disabled. When enabled, 3D data read from a file are always treated as a scattered data set. A grid with dimensions derived from a bounding box of the scattered data and size as specified by the row/col_size parameters is created for plotting and contouring. The grid is equally spaced in x (rows) and in y (columns); the z values are computed as weighted averages or spline interpolations of the scattered points' z values. In other words, a regularly spaced grid is created and the a smooth approximation to the raw data is evaluated for all grid points. This approximation is plotted in place of the raw data. The number of columns defaults to the number of rows, which defaults to 10. Several algorithms are available to calculate the approximation from the raw data. Some of these algorithms can take additional parameters. These interpolations are such the closer the data point is to a grid point, the more effect it has on that grid point. The `splines` algorithm calculates an interpolation based on "thin plate splines". It does not take additional parameters. The `qnorm` algorithm calculates a weighted average of the input data at each grid point. Each data point is weighted inversely by its distance from the grid point raised to the norm power. (Actually, the weights are given by the inverse of dx^norm + dy^norm, where dx and dy are the components of the separation of the grid point from each data point. For some norms that are powers of two, specifically 4, 8, and 16, the computation is optimized by using the Euclidean distance in the weight calculation, (dx^2+dy^2)^norm/2. However, any non-negative integer can be used.) The power of the norm can be specified as a single optional parameter. This algorithm is the default. Finally, several smoothing kernels are available to calculate weighted averages: z = Sum_i w(d_i) * z_i / Sum_i w(d_i), where z_i is the value of the i-th data point and d_i is the distance between the current grid point and the location of the i-th data point. All kernels assign higher weights to data points that are close to the current grid point and lower weights to data points further away. The following kernels are available: @example gauss : w(d) = exp(-d*d) cauchy : w(d) = 1/(1 + d*d) exp : w(d) = exp(-d) box : w(d) = 1 if d<1 = 0 otherwise hann : w(d) = 0.5*(1-cos(2*pi*d)) if d<1 w(d) = 0 otherwise @end example When using one of these five smoothing kernels, up to two additional numerical parameters can be specified: dx and dy. These are used to rescale the coordinate differences when calculating the distance: d_i = sqrt( ((x-x_i)/dx)**2 + ((y-y_i)/dy)**2 ), where x,y are the coordinates of the current grid point and x_i,y_i are the coordinates of the i-th data point. The value of dy defaults to the value of dx, which defaults to 1. The parameters dx and dy make it possible to control the radius over which data points contribute to a grid point IN THE UNITS OF THE DATA ITSELF. The optional keyword `kdensity2d`, which must come after the name of the kernel, but before the (optional) scale parameters, modifies the algorithm so that the values calculated for the grid points are not divided by the sum of the weights ( z = Sum_i w(d_i) * z_i ). If all z_i are constant, this effectively plots a bivariate kernel density estimate: a kernel function (one of the five defined above) is placed at each data point, the sum of these kernels is evaluated at every grid point, and this smooth surface is plotted instead of the original data. This is similar in principle to + what the `smooth kdensity` option does to 1D datasets. (See kdensity2d.dem for usage demo) A slightly different syntax is also supported for reasons of backwards compatibility. If no interpolation algorithm has been explicitly selected, the `qnorm` algorithm is assumed. Up to three comma-separated, optional parameters can be specified, which are interpreted as the the number of rows, the number of columns, and the norm value, respectively. The @ref{dgrid3d} option is a simple scheme which replaces scattered data with weighted averages on a regular grid. More sophisticated approaches to this problem exist and should be used to preprocess the data outside `gnuplot` if this simple solution is found inadequate. See also @uref{http://www.gnuplot.info/demo/dgrid3d.html,dgrid3d.dem: dgrid3d demo. } and @uref{http://www.gnuplot.info/demo/scatter.html,scatter.dem: dgrid3d demo. } @node dummy, encoding, dgrid3d, set-show @subsection dummy @c ?commands set dummy @c ?commands show dummy @c ?set dummy @c ?show dummy @cindex dummy @opindex dummy The @ref{dummy} command changes the default dummy variable names. Syntax: @example set dummy @{<dummy-var>@} @{,<dummy-var>@} show dummy @end example By default, `gnuplot` assumes that the independent, or "dummy", variable for the `plot` command is "t" if in parametric or polar mode, or "x" otherwise. Similarly the independent variables for the `splot` command are "u" and "v" in parametric mode (`splot` cannot be used in polar mode), or "x" and "y" otherwise. It may be more convenient to call a dummy variable by a more physically meaningful or conventional name. For example, when plotting time functions: @example set dummy t plot sin(t), cos(t) @end example At least one dummy variable must be set on the command; @ref{dummy} by itself will generate an error message. Examples: @example set dummy u,v set dummy ,s @end example The second example sets the second variable to s. @node encoding, fit_, dummy, set-show @subsection encoding @c ?commands set encoding @c ?commands show encoding @c ?set encoding @c ?show encoding @cindex encoding @opindex encoding @cindex encodings @cindex UTF-8 @cindex SJIS The @ref{encoding} command selects a character encoding. Syntax: @example set encoding @{<value>@} set encoding locale show encoding @end example Valid values are @example default - tells a terminal to use its default encoding iso_8859_1 - the most common Western European encoding used by many Unix workstations and by MS-Windows. This encoding is known in the PostScript world as 'ISO-Latin1'. iso_8859_15 - a variant of iso_8859_1 that includes the Euro symbol iso_8859_2 - used in Central and Eastern Europe iso_8859_9 - used in Turkey (also known as Latin5) koi8r - popular Unix cyrillic encoding koi8u - ukrainian Unix cyrillic encoding cp437 - codepage for MS-DOS cp850 - codepage for OS/2, Western Europe cp852 - codepage for OS/2, Central and Eastern Europe cp950 - MS version of Big5 (emf terminal only) cp1250 - codepage for MS Windows, Central and Eastern Europe cp1251 - codepage for 8-bit Russian, Serbian, Bulgarian, Macedonian cp1254 - codepage for MS Windows, Turkish (superset of Latin5) sjis - shift-JIS Japanese encoding utf8 - variable-length (multibyte) representation of Unicode entry point for each character @end example The command @ref{locale} is different from the other options. It attempts to determine the current locale from the runtime environment. On most systems this is controlled by the environmental variables LC_ALL, LC_CTYPE, or LANG. This mechanism is necessary, for example, to pass multibyte character encodings such as UTF-8 or EUC_JP to the wxt and cairopdf terminals. This command does not affect the locale-specific representation of dates or numbers. See also @ref{locale} and @ref{decimalsign}. Generally you must set the encoding before setting the terminal type. Note that encoding is not supported by all terminal drivers and that the device must be able to produce the desired non-standard characters. @node fit_, fontpath, encoding, set-show @subsection fit @c ?commands set fit @c ?commands show fit @c ?set fit @c ?show fit The @ref{fit} setting defines where the @ref{fit} command writes its output. Syntax: @example set fit @{logfile @{"<filename>"@}@} @{@{no@}errorvariables@} @{@{no@}quiet@} unset fit show fit @end example The <filename> argument must be enclosed in single or double quotes. If no filename is given or @ref{fit} is used the log file is reset to its default value "fit.log" or the value of the environmental variable `FIT_LOG`. If the given logfile name ends with a / or \, it is interpreted to be a directory name, and the actual filename will be "fit.log" in that directory. If the `errorvariables` option is turned on, the error of each fitted parameter computed by @ref{fit} will be copied to a user-defined variable whose name is formed by appending "_err" to the name of the parameter itself. This is useful mainly to put the parameter and its error onto a plot of the data and the fitted function, for reference, as in: @example set fit errorvariables fit f(x) 'datafile' using 1:2 via a, b print "error of a is:", a_err set label 'a=%6.2f', a, '+/- %6.2f', a_err plot 'datafile' using 1:2, f(x) @end example By default the information written to the log file is also echoed to the terminal session. `set fit quiet` turns off the echo. @node fontpath, format_, fit_, set-show @subsection fontpath @c ?commands set fontpath @c ?commands show fontpath @c ?set fontpath @c ?show fontpath @cindex fontpath @opindex fontpath The @ref{fontpath} setting defines additional locations for font files searched when including font files. Currently only the postscript terminal supports @ref{fontpath}. If a file cannot be found in the current directory, the directories in @ref{fontpath} are tried. Further documentation concerning the supported file formats is included in the `terminal postscript` section of the documentation. Syntax: @example set fontpath @{"pathlist1" @{"pathlist2"...@}@} show fontpath @end example Path names may be entered as single directory names, or as a list of path names separated by a platform-specific path separator, eg. colon (':') on Unix, semicolon (';') on DOS/Windows/OS/2 platforms. The @ref{fontpath}, @ref{save} and `save set` commands replace the platform-specific separator with a space character (' ') for maximum portability. If a directory name ends with an exclamation mark ('!') also the subdirectories of this directory are searched for font files. If the environmental variable GNUPLOT_FONTPATH is set, its contents are appended to @ref{fontpath}. If it is not set, a system dependent default value is used. It is set by testing several directories for existence when using the fontpath the first time. Thus, the first call of @ref{fontpath}, @ref{fontpath}, @ref{fontpath}, `plot`, or `splot` with embedded font files takes a little more time. If you want to save this time you may set the environmental variable GNUPLOT_FONTPATH since probing is switched off, then. You can find out which is the default fontpath by using @ref{fontpath}. @ref{fontpath} prints the contents of the user-defined fontpath and the system fontpath separately. However, the @ref{save} and `save set` commands save only the user-specified parts of @ref{fontpath}. For terminal drivers that access fonts by filename via the gd library, the font search path is controlled by the environmental variable GDFONTPATH. @node format_, function_style, fontpath, set-show @subsection format @c ?commands set format @c ?commands show format @c ?set format @c ?show format @cindex format @opindex format @c ?format cb The format of the tic-mark labels can be set with the `set format` command or with the `set tics format` or individual `set @{axis@}tics format` commands. Syntax: @example set format @{<axes>@} @{"<format-string>"@} set format @{<axes>@} @{'<format-string>'@} show format @end example where <axes> is either `x`, `y`, `xy`, `x2`, `y2`, `z`, `cb` or nothing (which applies the format to all axes). The following two commands are equivalent: @example set format y "%.2f" set ytics format "%.2f" @end example The length of the string is restricted to 100 characters. The default format is "% g", but other formats such as "%.2f" or "%3.0em" are often desirable. The format "$%g$" is often desirable for LaTeX. If no format string is given, the format will be returned to the default. If the empty string "" is given, tics will have no labels, although the tic mark will still be plotted. To eliminate the tic marks, use `unset xtics` or `set tics scale 0`. Newline (\n) and enhanced text markup is accepted in the format string. Use double-quotes rather than single-quotes in this case. See also `syntax`. Characters not preceded by "%" are printed verbatim. Thus you can include spaces and labels in your format string, such as "%g m", which will put " m" after each number. If you want "%" itself, double it: "%g %%". See also `set xtics` for more information about tic labels, and @ref{decimalsign} for how to use non-default decimal separators in numbers printed this way. See also @uref{http://www.gnuplot.info/demo/electron.html,electron demo (electron.dem). } @menu * gprintf_:: * format_specifiers:: * time/date_specifiers:: @end menu @node gprintf_, format_specifiers, format_, format_ @subsubsection gprintf @cindex gprintf @findex gprintf The string function gprintf("format",x) uses gnuplot's own format specifiers, as do the gnuplot commands `set format`, @ref{timestamp}, and others. These format specifiers are not the same as those used by the standard C-language routine sprintf(). gprintf() accepts only a single variable to be formatted. Gnuplot also provides an sprintf("format",x1,x2,...) routine if you prefer. For a list of gnuplot's format options, see `format specifiers`. @node format_specifiers, time/date_specifiers, gprintf_, format_ @subsubsection format specifiers @c ?commands set format specifiers @c ?set format specifiers @c ?format specifiers @cindex format_specifiers The acceptable formats (if not in time/date mode) are: @example Format Explanation %f floating point notation %e or %E exponential notation; an "e" or "E" before the power %g or %G the shorter of %e (or %E) and %f %x or %X hex %o or %O octal %t mantissa to base 10 %l mantissa to base of current logscale %s mantissa to base of current logscale; scientific power %T power to base 10 %L power to base of current logscale %S scientific power %c character replacement for scientific power %b mantissa of ISO/IEC 80000 notation (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) %B prefix of ISO/IEC 80000 notation (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) %P multiple of pi @end example @c ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> @c ^<colgroup> @c ^ <col align="center"> @c ^ <col align="left"> @c ^</colgroup> @c ^<thead> @c ^<tr> <th>Format</th> <th>Explanation</th></tr> @c ^</thead> @c ^<tbody> @c ^<tr> <td><tt>%f</tt></td> <td>floating point notation</td></tr> @c ^<tr> <td><tt>%e</tt> or <tt>%E</tt></td> <td>exponential notation; an "e" or "E" before the power</td></tr> @c ^<tr> <td><tt>%g</tt> or <tt>%G</tt></td> <td>the shorter of <tt>%e</tt> (or <tt>%E</tt>) and <tt>%f</tt></td></tr> @c ^<tr> <td><tt>%x</tt> or <tt>%X</tt></td> <td>hex</td></tr> @c ^<tr> <td><tt>%o</tt> or <tt>%O</tt></td> <td>octal</td></tr> @c ^<tr> <td><tt>%t</tt></td> <td>mantissa to base 10</td></tr> @c ^<tr> <td><tt>%l</tt></td> <td>mantissa to base of current logscale</td></tr> @c ^<tr> <td><tt>%s</tt></td> <td>mantissa to base of current logscale; scientific power</td></tr> @c ^<tr> <td><tt>%T</tt></td> <td>power to base 10</td></tr> @c ^<tr> <td><tt>%L</tt></td> <td>power to base of current logscale</td></tr> @c ^<tr> <td><tt>%S</tt></td> <td>scientific power</td></tr> @c ^<tr> <td><tt>%c</tt></td> <td>character replacement for scientific power</td></tr> @c ^<tr> <td><tt>%b</tt></td> <td>mantissa of ISO/IEC 80000 notation (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi)</td></tr> @c ^<tr> <td><tt>%B</tt></td> <td>prefix of ISO/IEC 80000 notation (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi)</td></tr> @c ^<tr> <td><tt>%P</tt></td> <td>multiple of π</td></tr> @c ^</tbody> @c ^</table> A 'scientific' power is one such that the exponent is a multiple of three. Character replacement of scientific powers (`"%c"`) has been implemented for powers in the range -18 to +18. For numbers outside of this range the format reverts to exponential. Other acceptable modifiers (which come after the "%" but before the format specifier) are "-", which left-justifies the number; "+", which forces all numbers to be explicitly signed; " " (a space), which makes positive numbers have a space in front of them where negative numbers have "-"; "#", which places a decimal point after floats that have only zeroes following the decimal point; a positive integer, which defines the field width; "0" (the digit, not the letter) immediately preceding the field width, which indicates that leading zeroes are to be used instead of leading blanks; and a decimal point followed by a non-negative integer, which defines the precision (the minimum number of digits of an integer, or the number of digits following the decimal point of a float). Some systems may not support all of these modifiers but may also support others; in case of doubt, check the appropriate documentation and then experiment. Examples: @example set format y "%t"; set ytics (5,10) # "5.0" and "1.0" set format y "%s"; set ytics (500,1000) # "500" and "1.0" set format y "%+-12.3f"; set ytics(12345) # "+12345.000 " set format y "%.2t*10^%+03T"; set ytic(12345)# "1.23*10^+04" set format y "%s*10^@{%S@}"; set ytic(12345) # "12.345*10^@{3@}" set format y "%s %cg"; set ytic(12345) # "12.345 kg" set format y "%.0P pi"; set ytic(6.283185) # "2 pi" set format y "%.0f%%"; set ytic(50) # "50%" @end example @example set log y 2; set format y '%l'; set ytics (1,2,3) #displays "1.0", "1.0" and "1.5" (since 3 is 1.5 * 2^1) @end example There are some problem cases that arise when numbers like 9.999 are printed with a format that requires both rounding and a power. If the data type for the axis is time/date, the format string must contain valid codes for the 'strftime' function (outside of `gnuplot`, type "man strftime"). See @ref{timefmt} for a list of the allowed input format codes. @node time/date_specifiers, , format_specifiers, format_ @subsubsection time/date specifiers @c ?commands set format date_specifiers @c ?commands set format time_specifiers @c ?set format date_specifiers @c ?set format time_specifiers @c ?set date_specifiers @c ?set time_specifiers @cindex date_specifiers @cindex time_specifiers In time/date mode, the acceptable formats are: @example Format Explanation %a abbreviated name of day of the week %A full name of day of the week %b or %h abbreviated name of the month %B full name of the month %d day of the month, 01--31 %D shorthand for "%m/%d/%y" (only output) %F shorthand for "%Y-%m-%d" (only output) %k hour, 0--23 (one or two digits) %H hour, 00--23 (always two digits) %l hour, 1--12 (one or two digits) %I hour, 01--12 (always two digits) %j day of the year, 1--366 %m month, 01--12 %M minute, 0--60 %p "am" or "pm" %r shorthand for "%I:%M:%S %p" (only output) %R shorthand for "%H:%M" (only output) %s number of seconds since the start of year 2000 %S second, integer 0--60 on output, (double) on input %T shorthand for "%H:%M:%S" (only output) %U week of the year (week starts on Sunday) %w day of the week, 0--6 (Sunday = 0) %W week of the year (week starts on Monday) %y year, 0-68 for 2000-2068, 69-99 for 1969-1999 %Y year, 4-digit @end example @c ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> @c ^<colgroup> @c ^ <col align="center"> @c ^ <col align="left"> @c ^</colgroup> @c ^<thead> @c ^<tr> <th>Format</th> <th>Explanation</th></tr> @c ^</thead> @c ^<tbody> @c ^<tr> <td><tt>%a</tt></td> <td>abbreviated name of day of the week</td></tr> @c ^<tr> <td><tt>%A</tt></td> <td>full name of day of the week</td></tr> @c ^<tr> <td><tt>%b</tt> or <tt>%h</tt></td> <td>abbreviated name of the month</td></tr> @c ^<tr> <td><tt>%B</tt></td> <td>full name of the month</td></tr> @c ^<tr> <td><tt>%d</tt></td> <td>day of the month, 01–31</td></tr> @c ^<tr> <td><tt>%D</tt></td> <td>shorthand for <tt>%m/%d/%y</tt> (only output)</td></tr> @c ^<tr> <td><tt>%F</tt></td> <td>shorthand for <tt>%Y-%m-%d</tt> (only output)</td></tr> @c ^<tr> <td><tt>%k</tt></td> <td>hour, 0–23 (one or two digits)</td></tr> @c ^<tr> <td><tt>%H</tt></td> <td>hour, 00–23 (always two digits)</td></tr> @c ^<tr> <td><tt>%l</tt></td> <td>hour, 1–12 (one or two digits)</td></tr> @c ^<tr> <td><tt>%I</tt></td> <td>hour, 01–12 (always two digits)</td></tr> @c ^<tr> <td><tt>%j</tt></td> <td>day of the year, 1–366</td></tr> @c ^<tr> <td><tt>%m</tt></td> <td>month, 01–12</td></tr> @c ^<tr> <td><tt>%M</tt></td> <td>minute, 0–60</td></tr> @c ^<tr> <td><tt>%p</tt></td> <td>"am" or "pm"</td></tr> @c ^<tr> <td><tt>%r</tt></td> <td>shorthand for <tt>%I:%M:%S %p</tt> (only output)</td></tr> @c ^<tr> <td><tt>%R</tt></td> <td>shorthand for <tt>%H:%M</tt> (only output)</td></tr> @c ^<tr> <td><tt>%S</tt></td> <td>second, integer 0–60 on output, (double) on input</td></tr> @c ^<tr> <td><tt>%s</tt></td> <td>number of seconds since start of year 2000</td></tr> @c ^<tr> <td><tt>%T</tt></td> <td>shorthand for <tt>%H:%M:%S</tt> (only output)</td></tr> @c ^<tr> <td><tt>%U</tt></td> <td>week of the year (week starts on Sunday)</td></tr> @c ^<tr> <td><tt>%w</tt></td> <td>day of the week, 0–6 (Sunday = 0)</td></tr> @c ^<tr> <td><tt>%W</tt></td> <td>week of the year (week starts on Monday)</td></tr> @c ^<tr> <td><tt>%y</tt></td> <td>year, 0-99 in range 1969-2068</td></tr> @c ^<tr> <td><tt>%Y</tt></td> <td>year, 4-digit</td></tr> @c ^</tbody> @c ^</table> Except for the non-numerical formats, these may be preceded by a "0" ("zero", not "oh") to pad the field length with leading zeroes, and a positive digit, to define the minimum field width (which will be overridden if the specified width is not large enough to contain the number). The %S format also accepts a precision specifier so that fractional seconds can be written. There is a 24-character limit to the length of the printed text; longer strings will be truncated. Examples: Suppose the text is "76/12/25 23:11:11". Then @example set format x # defaults to "12/25/76" \n "23:11" set format x "%A, %d %b %Y" # "Saturday, 25 Dec 1976" set format x "%r %D" # "11:11:11 pm 12/25/76" @end example Suppose the text is "98/07/06 05:04:03.123456". Then @example set format x "%1y/%2m/%3d %01H:%02M:%06.3S" # "98/ 7/ 6 5:04:03.123" @end example @node function_style, functions_, format_, set-show @subsection function style @c ?set function style This form of the command is deprecated. Please see `set style function`. @node functions_, grid, function_style, set-show @subsection functions @c ?commands show functions @c ?show functions The @ref{functions} command lists all user-defined functions and their definitions. Syntax: @example show functions @end example For information about the definition and usage of functions in `gnuplot`, please see `expressions`. See also @uref{http://www.gnuplot.info/demo/spline.html,splines as user defined functions (spline.dem) } and @uref{http://www.gnuplot.info/demo/airfoil.html,use of functions and complex variables for airfoils (airfoil.dem). } @node grid, hidden3d, functions_, set-show @subsection grid @c ?commands set grid @c ?commands unset grid @c ?commands show grid @c ?set grid @c ?unset grid @c ?show grid @cindex grid @opindex grid @cindex nogrid The `set grid` command allows grid lines to be drawn on the plot. Syntax: @example set grid @{@{no@}@{m@}xtics@} @{@{no@}@{m@}ytics@} @{@{no@}@{m@}ztics@} @{@{no@}@{m@}x2tics@} @{@{no@}@{m@}y2tics@} @{@{no@}@{m@}cbtics@} @{polar @{<angle>@}@} @{layerdefault | front | back@} @{ @{linestyle <major_linestyle>@} | @{linetype | lt <major_linetype>@} @{linewidth | lw <major_linewidth>@} @{ , @{linestyle | ls <minor_linestyle>@} | @{linetype | lt <minor_linetype>@} @{linewidth | lw <minor_linewidth>@} @} @} unset grid show grid @end example The grid can be enabled and disabled for the major and/or minor tic marks on any axis, and the linetype and linewidth can be specified for major and minor grid lines, also via a predefined linestyle, as far as the active terminal driver supports this. Additionally, a polar grid can be selected for 2D plots---circles are drawn to intersect the selected tics, and radial lines are drawn at definable intervals. (The interval is given in degrees or radians, depending on the @ref{angles} setting.) Note that a polar grid is no longer automatically generated in polar mode. The pertinent tics must be enabled before `set grid` can draw them; `gnuplot` will quietly ignore instructions to draw grid lines at non-existent tics, but they will appear if the tics are subsequently enabled. If no linetype is specified for the minor gridlines, the same linetype as the major gridlines is used. The default polar angle is 30 degrees. If `front` is given, the grid is drawn on top of the graphed data. If `back` is given, the grid is drawn underneath the graphed data. Using `front` will prevent the grid from being obscured by dense data. The default setup, `layerdefault`, is equivalent to `back` for 2D plots. In 3D plots the default is to split up the grid and the graph box into two layers: one behind, the other in front of the plotted data and functions. Since @ref{hidden3d} mode does its own sorting, it ignores all grid drawing order options and passes the grid lines through the hidden line removal machinery instead. These options actually affect not only the grid, but also the lines output by @ref{border} and the various ticmarks (see `set xtics`). Z grid lines are drawn on the bottom of the plot. This looks better if a partial box is drawn around the plot---see @ref{border}. @node hidden3d, historysize, grid, set-show @subsection hidden3d @c ?commands set hidden3d @c ?commands unset hidden3d @c ?commands show hidden3d @c ?set hidden3d @c ?unset hidden3d @c ?show hidden3d @cindex hidden3d @opindex hidden3d @cindex nohidden3d The @ref{hidden3d} command enables hidden line removal for surface plotting (see `splot`). Some optional features of the underlying algorithm can also be controlled using this command. Syntax: @example set hidden3d @{defaults@} | @{ @{front|back@} @{@{offset <offset>@} | @{nooffset@}@} @{trianglepattern <bitpattern>@} @{@{undefined <level>@} | @{noundefined@}@} @{@{no@}altdiagonal@} @{@{no@}bentover@} @} unset hidden3d show hidden3d @end example In contrast to the usual display in gnuplot, hidden line removal actually treats the given function or data grids as real surfaces that can't be seen through, so plot elements behind the surface will be hidden by it. For this to work, the surface needs to have 'grid structure' (see @ref{datafile} about this), and it has to be drawn `with lines` or @ref{linespoints}. When @ref{hidden3d} is set, both the hidden portion of the surface and possibly its contours drawn on the base (see @ref{contour}) as well as the grid will be hidden. Each surface has its hidden parts removed with respect to itself and to other surfaces, if more than one surface is plotted. Contours drawn on the surface (@ref{surface}) don't work. Labels and arrows are always visible and are unaffected. The key box is never hidden by the surface. As of gnuplot version 4.6, hidden3d also affects 3D plotting styles `points`, @ref{labels}, @ref{vectors}, and @ref{impulses} even if no surface is present in the graph. Individual plots within the graph may be explicitly excluded from this processing by appending the extra option `nohidden3d` to the @ref{with} specifier. Hidden3d does not affect solid surfaces drawn using the pm3d mode. To achieve a similar effect purely for pm3d surfaces, use instead `set pm3d depthorder`. To mix pm3d surfaces with normal @ref{hidden3d} processing, use the option `set hidden3d front` to force all elements included in hidden3d processing to be drawn after any remaining plot elements. Then draw the surface twice, once `with lines lt -2` and a second time @ref{pm3d}. The first instance will include the surface during calculation of occluded elements but will not draw the surface itself. Functions are evaluated at isoline intersections. The algorithm interpolates linearly between function points or data points when determining the visible line segments. This means that the appearance of a function may be different when plotted with @ref{hidden3d} than when plotted with `nohidden3d` because in the latter case functions are evaluated at each sample. Please see @ref{samples} and @ref{isosamples} for discussion of the difference. The algorithm used to remove the hidden parts of the surfaces has some additional features controllable by this command. Specifying `defaults` will set them all to their default settings, as detailed below. If `defaults` is not given, only explicitly specified options will be influenced: all others will keep their previous values, so you can turn on/off hidden line removal via `set @{no@}hidden3d`, without modifying the set of options you chose. The first option, `offset`, influences the linetype used for lines on the 'back' side. Normally, they are drawn in a linetype one index number higher than the one used for the front, to make the two sides of the surface distinguishable. You can specify a different linetype offset to add instead of the default 1, by `offset <offset>`. Option `nooffset` stands for `offset 0`, making the two sides of the surface use the same linetype. Next comes the option `trianglepattern <bitpattern>`. <bitpattern> must be a number between 0 and 7, interpreted as a bit pattern. Each bit determines the visibility of one edge of the triangles each surface is split up into. Bit 0 is for the 'horizontal' edges of the grid, Bit 1 for the 'vertical' ones, and Bit 2 for the diagonals that split each cell of the original grid into two triangles. The default pattern is 3, making all horizontal and vertical lines visible, but not the diagonals. You may want to choose 7 to see those diagonals as well. The `undefined <level>` option lets you decide what the algorithm is to do with data points that are undefined (missing data, or undefined function values), or exceed the given x-, y- or z-ranges. Such points can either be plotted nevertheless, or taken out of the input data set. All surface elements touching a point that is taken out will be taken out as well, thus creating a hole in the surface. If <level> = 3, equivalent to option `noundefined`, no points will be thrown away at all. This may produce all kinds of problems elsewhere, so you should avoid this. <level> = 2 will throw away undefined points, but keep the out-of-range ones. <level> = 1, the default, will get rid of out-of-range points as well. By specifying `noaltdiagonal`, you can override the default handling of a special case can occur if `undefined` is active (i.e. <level> is not 3). Each cell of the grid-structured input surface will be divided in two triangles along one of its diagonals. Normally, all these diagonals have the same orientation relative to the grid. If exactly one of the four cell corners is excluded by the `undefined` handler, and this is on the usual diagonal, both triangles will be excluded. However if the default setting of `altdiagonal` is active, the other diagonal will be chosen for this cell instead, minimizing the size of the hole in the surface. The `bentover` option controls what happens to another special case, this time in conjunction with the `trianglepattern`. For rather crumply surfaces, it can happen that the two triangles a surface cell is divided into are seen from opposite sides (i.e. the original quadrangle is 'bent over'), as illustrated in the following ASCII art: @example C----B original quadrangle: A--B displayed quadrangle: |\ | ("set view 0,0") | /| ("set view 75,75" perhaps) | \ | |/ | | \ | C--D | \| A D @end example If the diagonal edges of the surface cells aren't generally made visible by bit 2 of the <bitpattern> there, the edge CB above wouldn't be drawn at all, normally, making the resulting display hard to understand. Therefore, the default option of `bentover` will turn it visible in this case. If you don't want that, you may choose `nobentover` instead. See also @uref{http://www.gnuplot.info/demo/hidden.html,hidden line removal demo (hidden.dem) } and @uref{http://www.gnuplot.info/demo/singulr.html,complex hidden line demo (singulr.dem). } @node historysize, isosamples, hidden3d, set-show @subsection historysize @c ?commands set historysize @c ?set historysize @c ?unset historysize @cindex historysize @opindex historysize @cindex nohistorysize Note: the command @ref{historysize} is only available when gnuplot has been configured to use the GNU readline library. Syntax: @example set historysize <int> unset historysize @end example When leaving gnuplot, the value of historysize is used for truncating the history to at most that much lines. The default is 500. @ref{historysize} will disable history truncation and thus allow an infinite number of lines to be written to the history file. @node isosamples, key, historysize, set-show @subsection isosamples @c ?commands set isosamples @c ?commands show isosamples @c ?set isosamples @c ?show isosamples @cindex isosamples @opindex isosamples The isoline density (grid) for plotting functions as surfaces may be changed by the @ref{isosamples} command. Syntax: @example set isosamples <iso_1> @{,<iso_2>@} show isosamples @end example Each function surface plot will have <iso_1> iso-u lines and <iso_2> iso-v lines. If you only specify <iso_1>, <iso_2> will be set to the same value as <iso_1>. By default, sampling is set to 10 isolines per u or v axis. A higher sampling rate will produce more accurate plots, but will take longer. These parameters have no effect on data file plotting. An isoline is a curve parameterized by one of the surface parameters while the other surface parameter is fixed. Isolines provide a simple means to display a surface. By fixing the u parameter of surface s(u,v), the iso-u lines of the form c(v) = s(u0,v) are produced, and by fixing the v parameter, the iso-v lines of the form c(u) = s(u,v0) are produced. When a function surface plot is being done without the removal of hidden lines, @ref{samples} controls the number of points sampled along each isoline; see @ref{samples} and @ref{hidden3d}. The contour algorithm assumes that a function sample occurs at each isoline intersection, so change in @ref{samples} as well as @ref{isosamples} may be desired when changing the resolution of a function surface/contour. @node key, label, isosamples, set-show @subsection key @c ?commands set key @c ?commands unset key @c ?commands show key @c ?set key @c ?unset key @c ?show key @cindex key @opindex key @cindex nokey @cindex legend The `set key` command enables a key (or legend) describing plots on a plot. The contents of the key, i.e., the names given to each plotted data set and function and samples of the lines and/or symbols used to represent them, are determined by the @ref{title} and @ref{with} options of the @{`s`@}`plot` command. Please see @ref{title} and @ref{with} for more information. Syntax: @example set key @{on|off@} @{default@} @{@{inside | outside@} | @{lmargin | rmargin | tmargin | bmargin@} | @{at <position>@}@} @{left | right | center@} @{top | bottom | center@} @{vertical | horizontal@} @{Left | Right@} @{@{no@}opaque@} @{@{no@}reverse@} @{@{no@}invert@} @{samplen <sample_length>@} @{spacing <vertical_spacing>@} @{width <width_increment>@} @{height <height_increment>@} @{@{no@}autotitle @{columnheader@}@} @{title "<text>"@} @{@{no@}enhanced@} @{font "<face>,<size>"@} @{textcolor <colorspec>@} @{@{no@}box @{ @{linestyle | ls <line_style>@} | @{linetype | lt <line_type>@} @{linewidth | lw <line_width>@}@}@} @{maxcols @{<max no. of columns> | auto@}@} @{maxrows @{<max no. of rows> | auto@}@} unset key show key @end example The key contains a title and a sample (line, point, box) for each plot in the graph. The key may be turned off by requesting `set key off` or `unset key`. Individual key entries may be turned off by using the `notitle` keyword in the corresponding plot command. Elements within the key are stacked according to `vertical` or `horizontal`. In the case of `vertical`, the key occupies as few columns as possible. That is, elements are aligned in a column until running out of vertical space at which point a new column is started. The vertical space may be limited using 'maxrows'. In the case of `horizontal`, the key occupies as few rows as possible. The horizontal space may be limited using 'maxcols'. By default the key is placed in the upper right inside corner of the graph. The keywords `left`, `right`, `top`, `bottom`, `center`, `inside`, `outside`, @ref{lmargin}, @ref{rmargin}, @ref{tmargin}, @ref{bmargin} (, `above`, `over`, `below` and `under`) may be used to automatically place the key in other positions of the graph. Also an `at <position>` may be given to indicate precisely where the plot should be placed. In this case, the keywords `left`, `right`, `top`, `bottom` and `center` serve an analogous purpose for alignment. For more information, see `key placement`. Justification of the plot titles within the key is controlled by `Left` or `Right` (default). The text and sample can be reversed (`reverse`) and a box can be drawn around the key (`box @{...@}`) in a specified `linetype` and `linewidth`, or a user-defined `linestyle`. By default the key is built up one plot at a time. That is, the key symbol and title are drawn at the same time as the corresponding plot. That means newer plots may sometimes place elements on top of the key. `set key opaque` causes the key to be generated after all the plots. In this case the key area is filled with background color and then the key symbols and titles are written. Therefore the key itself may obscure portions of some plot elements. The default can be restored by `set key noopaque`. By default the first plot label is at the top of the key and successive labels are entered below it. The `invert` option causes the first label to be placed at the bottom of the key, with successive labels entered above it. This option is useful to force the vertical ordering of labels in the key to match the order of box types in a stacked histogram. The <height_increment> is a number of character heights to be added to or subtracted from the height of the key box. This is useful mainly when you are putting a box around the key and want larger borders around the key entries. All plotted curves of `plot`s and `splot`s are titled according to the default option `autotitles`. The automatic generation of titles can be suppressed by `noautotitles`; then only those titles explicitly defined by `(s)plot ... title ...` will be drawn. @cindex columnheader The command `set key autotitle columnheader` causes the first entry in each column of input data to be interpreted as a text string and used as a title for the corresponding plot. If the quantity being plotted is a function of data from several columns, gnuplot may be confused as to which column to draw the title from. In this case it is necessary to specify the column explicitly in the plot command, e.g. @example plot "datafile" using (($2+$3)/$4) title columnhead(3) with lines @end example An overall title can be put on the key (`title "<text>"`)---see also `syntax` for the distinction between text in single- or double-quotes. The key title uses the same justification as do the plot titles. The defaults for `set key` are `on`, `right`, `top`, `vertical`, `Right`, `noreverse`, `noinvert`, `samplen 4`, `spacing 1.25`, `title ""`, and `nobox`. The default <linetype> is the same as that used for the plot borders. Entering `set key default` returns the key to its default configuration. The key is drawn as a sequence of lines, with one plot described on each line. On the right-hand side (or the left-hand side, if `reverse` is selected) of each line is a representation that attempts to mimic the way the curve is plotted. On the other side of each line is the text description (the line title), obtained from the `plot` command. The lines are vertically arranged so that an imaginary straight line divides the left- and right-hand sides of the key. It is the coordinates of the top of this line that are specified with the `set key` command. In a `plot`, only the x and y coordinates are used to specify the line position. For a `splot`, x, y and z are all used as a 3D location mapped using the same mapping as the graph itself to form the required 2D screen position of the imaginary line. When using the TeX or other terminals where formatting information is embedded in the string, `gnuplot` can only estimate the correctly exact width of the string for key positioning. If the key is to be positioned at the left, it may be convenient to use the combination `set key left Left reverse`. If `splot` is being used to draw contours, the contour labels will be listed in the key. If the alignment of these labels is poor or a different number of decimal places is desired, the label format can be specified. See @ref{clabel} for details. Examples: This places the key at the default location: @example set key default @end example This disables the key: @example unset key @end example This places a key at coordinates 2,3.5,2 in the default (first) coordinate system: @example set key at 2,3.5,2 @end example This places the key below the graph: @example set key below @end example This places the key in the bottom left corner, left-justifies the text, gives it a title, and draws a box around it in linetype 3: @example set key left bottom Left title 'Legend' box 3 @end example @menu * key_placement:: * key_samples:: @end menu @node key_placement, key_samples, key, key @subsubsection key placement @c ?commands set key placement @c ?set key placement @c ?key placement To understand positioning, the best concept is to think of a region, i.e., inside/outside, or one of the margins. Along with the region, keywords `left/center/right` (l/c/r) and `top/center/bottom` (t/c/b) control where within the particular region the key should be placed. When in `inside` mode, the keywords `left` (l), `right` (r), `top` (t), `bottom` (b), and `center` (c) push the key out toward the plot boundary as illustrated: @example t/l t/c t/r @end example @example c/l c c/r @end example @example b/l b/c b/r @end example When in `outside` mode, automatic placement is similar to the above illustration, but with respect to the view, rather than the graph boundary. That is, a border is moved inward to make room for the key outside of the plotting area, although this may interfere with other labels and may cause an error on some devices. The particular plot border that is moved depends upon the position described above and the stacking direction. For options centered in one of the dimensions, there is no ambiguity about which border to move. For the corners, when the stack direction is `vertical`, the left or right border is moved inward appropriately. When the stack direction is `horizontal`, the top or bottom border is moved inward appropriately. The margin syntax allows automatic placement of key regardless of stack direction. When one of the margins @ref{lmargin} (lm), @ref{rmargin} (rm), @ref{tmargin} (tm), and @ref{bmargin} (bm) is combined with a single, non-conflicting direction keyword, the following illustrated positions may contain the key: @example l/tm c/tm r/tm @end example @example t/lm t/rm @end example @example c/lm c/rm @end example @example b/lm b/rm @end example @example l/bm c/bm r/bm @end example Keywords `above` and `over` are synonymous with @ref{tmargin}. For version compatibility, `above` or `over` without an additional l/c/r or stack direction keyword uses `center` and `horizontal`. Keywords `below` and `under` are synonymous with @ref{bmargin}. For compatibility, `below` or `under` without an additional l/c/r or stack direction keyword uses `center` and `horizontal`. A further compatibility issue is that `outside` appearing without an additional t/b/c or stack direction keyword uses `top`, `right` and `vertical` (i.e., the same as t/rm above). The <position> can be a simple x,y,z as in previous versions, but these can be preceded by one of five keywords (`first`, `second`, `graph`, `screen`, `character`) which selects the coordinate system in which the position of the first sample line is specified. See `coordinates` for more details. The effect of `left`, `right`, `top`, `bottom`, and `center` when <position> is given is to align the key as though it were text positioned using the label command, i.e., `left` means left align with key to the right of <position>, etc. @node key_samples, , key_placement, key @subsubsection key samples @c ?commands set key samples @c ?set key samples @c ?key samples By default, each plot on the graph generates a corresponding entry in the key. This entry contains a plot title and a sample line/point/box of the same color and fill properties as used in the plot itself. The font and textcolor properties control the appearance of the individual plot titles that appear in the key. Setting the textcolor to "variable" causes the text for each key entry to be the same color as the line or fill color for that plot. This was the default in some earlier versions of gnuplot. The length of the sample line can be controlled by `samplen`. The sample length is computed as the sum of the tic length and <sample_length> times the character width. `samplen` also affects the positions of point samples in the key since these are drawn at the midpoint of the sample line, even if the sample line itself is not drawn. The vertical spacing between lines is controlled by `spacing`. The spacing is set equal to the product of the pointsize, the vertical tic size, and <vertical_spacing>. The program will guarantee that the vertical spacing is no smaller than the character height. The <width_increment> is a number of character widths to be added to or subtracted from the length of the string. This is useful only when you are putting a box around the key and you are using control characters in the text. `gnuplot` simply counts the number of characters in the string when computing the box width; this allows you to correct it. @node label, linetype, key, set-show @subsection label @c ?commands set label @c ?commands unset label @c ?commands show label @c ?set label @c ?unset label @c ?show label @cindex label @opindex label @cindex nolabel Arbitrary labels can be placed on the plot using the `set label` command. Syntax: @example set label @{<tag>@} @{"<label text>"@} @{at <position>@} @{left | center | right@} @{norotate | rotate @{by <degrees>@}@} @{font "<name>@{,<size>@}"@} @{noenhanced@} @{front | back@} @{textcolor <colorspec>@} @{point <pointstyle> | nopoint@} @{offset <offset>@} unset label @{<tag>@} show label @end example The <position> is specified by either x,y or x,y,z, and may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. See `coordinates` for details. The tag is an integer that is used to identify the label. If no <tag> is given, the lowest unused tag value is assigned automatically. The tag can be used to delete or modify a specific label. To change any attribute of an existing label, use the `set label` command with the appropriate tag, and specify the parts of the label to be changed. The <label text> can be a string constant, a string variable, or a string- valued expression. See `strings`, @ref{sprintf}, and @ref{gprintf}. By default, the text is placed flush left against the point x,y,z. To adjust the way the label is positioned with respect to the point x,y,z, add the justification parameter, which may be `left`, `right` or `center`, indicating that the point is to be at the left, right or center of the text. Labels outside the plotted boundaries are permitted but may interfere with axis labels or other text. If `rotate` is given, the label is written vertically (if the terminal can do so, of course). If `rotate by <degrees>` is given, conforming terminals will try to write the text at the specified angle; non-conforming terminals will treat this as vertical text. Font and its size can be chosen explicitly by `font "<name>@{,<size>@}"` if the terminal supports font settings. Otherwise the default font of the terminal will be used. Normally the enhanced text mode string interpretation, if enabled for the current terminal, is applied to all text strings including label text. The `noenhanced` property can be used to exempt a specific label from the enhanced text mode processing. The can be useful if the label contains underscores, for example. See `enhanced text`. If `front` is given, the label is written on top of the graphed data. If `back` is given (the default), the label is written underneath the graphed data. Using `front` will prevent a label from being obscured by dense data. `textcolor <colorspec>` changes the color of the label text. <colorspec> can be a linetype, an rgb color, or a palette mapping. See help for @ref{colorspec} and @ref{palette}. `textcolor` may be abbreviated `tc`. @example `tc default` resets the text color to its default state. `tc lt <n>` sets the text color to that of line type <n>. `tc ls <n>` sets the text color to that of line style <n>. `tc palette z` selects a palette color corresponding to the label z position. `tc palette cb <val>` selects a color corresponding to <val> on the colorbar. `tc palette fraction <val>`, with 0<=val<=1, selects a color corresponding to the mapping [0:1] to grays/colors of the @ref{palette}. `tc rgb "#RRGGBB"` selects an arbitrary 24-bit RGB color. @end example If a <pointstyle> is given, using keywords `lt`, `pt` and `ps`, see @ref{style}, a point with the given style and color of the given line type is plotted at the label position and the text of the label is displaced slightly. This option is used by default for placing labels in `mouse` enhanced terminals. Use `nopoint` to turn off the drawing of a point near the label (this is the default). The displacement defaults to 1,1 in @ref{pointsize} units if a <pointstyle> is given, 0,0 if no <pointstyle> is given. The displacement can be controlled by the optional `offset <offset>` where <offset> is specified by either x,y or x,y,z, and may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. See `coordinates` for details. If one (or more) axis is timeseries, the appropriate coordinate should be given as a quoted time string according to the @ref{timefmt} format string. See @ref{xdata} and @ref{timefmt}. The EEPIC, Imagen, LaTeX, and TPIC drivers allow \\ in a string to specify a newline. Label coordinates and text can also be read from a data file (see @ref{labels}). Examples: To set a label at (1,2) to "y=x", use: @example set label "y=x" at 1,2 @end example To set a Sigma of size 24, from the Symbol font set, at the center of the graph, use: @example set label "S" at graph 0.5,0.5 center font "Symbol,24" @end example To set a label "y=x^2" with the right of the text at (2,3,4), and tag the label as number 3, use: @example set label 3 "y=x^2" at 2,3,4 right @end example To change the preceding label to center justification, use: @example set label 3 center @end example To delete label number 2, use: @example unset label 2 @end example To delete all labels, use: @example unset label @end example To show all labels (in tag order), use: @example show label @end example To set a label on a graph with a timeseries on the x axis, use, for example: @example set timefmt "%d/%m/%y,%H:%M" set label "Harvest" at "25/8/93",1 @end example To display a freshly fitted parameter on the plot with the data and the fitted function, do this after the @ref{fit}, but before the `plot`: @example set label sprintf("a = %3.5g",par_a) at 30,15 bfit = gprintf("b = %s*10^%S",par_b) set label bfit at 30,20 @end example To display a function definition along with its fitted parameters, use: @example f(x)=a+b*x fit f(x) 'datafile' via a,b set label GPFUN_f at graph .05,.95 set label sprintf("a = %g", a) at graph .05,.90 set label sprintf("b = %g", b) at graph .05,.85 @end example To set a label displaced a little bit from a small point: @example set label 'origin' at 0,0 point lt 1 pt 2 ps 3 offset 1,-1 @end example To set a label whose color matches the z value (in this case 5.5) of some point on a 3D splot colored using pm3d: @example set label 'text' at 0,0,5.5 tc palette z @end example @node linetype, lmargin, label, set-show @subsection linetype @c ?commands set linetype @c ?commands unset linetype @c ?commands show linetype @c ?set linetype @c ?unset linetype @c ?show linetype @cindex linetype @opindex 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 @ref{reset}. For example, linetypes one and two default to red and green. If you redefine them like this: @example set linetype 1 lw 2 lc rgb "blue" pointtype 6 set linetype 2 lw 2 lc rgb "forest-green" pointtype 8 @end example everywhere that uses lt 1 will now get a thick blue line rather than a thin red line (the previous default meaning of lt 1). This includes uses such as the definition of a temporary linestyle derived from the base linetype 1. `Note`: This command is new to gnuplot version 4.6. It supersedes a rather cryptic command in version 4.2 "set style increment user". The older command is now deprecated. This mechanism can be used to define a set of personal preferences for the sequence of lines used in gnuplot. The recommended way to do this is to add to the run-time initialization file ~/.gnuplot a sequence of commands like @example if ((GPVAL_VERSION < 4.5) \ || (!strstrt(GPVAL_COMPILE_OPTIONS,"+USER_LINETYPES"))) \ exit set linetype 1 lc rgb "dark-violet" lw 2 pt 0 set linetype 2 lc rgb "sea-green" lw 2 pt 7 set linetype 3 lc rgb "cyan" lw 2 pt 6 pi -1 set linetype 4 lc rgb "dark-red" lw 2 pt 5 pi -1 set linetype 5 lc rgb "blue" lw 2 pt 8 set linetype 6 lc rgb "dark-orange" lw 2 pt 3 set linetype 7 lc rgb "black" lw 2 pt 11 set linetype 8 lc rgb "goldenrod" lw 2 set linetype cycle 8 @end example Every time you run gnuplot the line types will be initialized to these values. You may initialize as many linetypes as you like. If you do not redefine, say, linetype 3 then it will continue to have the default properties (in this case blue, pt 3, lw 1, etc). The first few lines of the example script insure that the commands will be skipped by older versions of gnuplot. Similar script files can be used to define theme-based color choices, or sets of colors optimized for a particular plot type or output device. @cindex cycle The command `set linetype cycle 8` tells gnuplot to re-use these definitions for the color and linewidth of higher-numbered linetypes. That is, linetypes 9-16, 17-24, and so on will use this same sequence of colors and widths. The point properties (pointtype, pointsize, pointinterval) are not affected by this command. `unset linetype cycle` disables this feature. If the line properties of a higher numbered linetype are explicitly defined, this takes precedence over the recycled low-number linetype properties. @node lmargin, loadpath, linetype, set-show @subsection lmargin @c ?commands set lmargin @c ?set lmargin @cindex lmargin @opindex lmargin The command @ref{lmargin} sets the size of the left margin. Please see @ref{margin} for details. @node loadpath, locale, lmargin, set-show @subsection loadpath @c ?commands set loadpath @c ?commands show loadpath @c ?set loadpath @c ?show loadpath @cindex loadpath @opindex loadpath The @ref{loadpath} setting defines additional locations for data and command files searched by the @ref{call}, `load`, `plot` and `splot` commands. If a file cannot be found in the current directory, the directories in @ref{loadpath} are tried. Syntax: @example set loadpath @{"pathlist1" @{"pathlist2"...@}@} show loadpath @end example Path names may be entered as single directory names, or as a list of path names separated by a platform-specific path separator, eg. colon (':') on Unix, semicolon (';') on DOS/Windows/OS/2 platforms. The @ref{loadpath}, @ref{save} and `save set` commands replace the platform-specific separator with a space character (' '). If the environment variable GNUPLOT_LIB is set, its contents are appended to @ref{loadpath}. However, @ref{loadpath} prints the contents of @ref{loadpath} and GNUPLOT_LIB separately. Also, the @ref{save} and `save set` commands ignore the contents of GNUPLOT_LIB. @node locale, logscale, loadpath, set-show @subsection locale @c ?commands set locale @c ?set locale @cindex locale @opindex locale The @ref{locale} setting determines the language with which `@{x,y,z@}@{d,m@}tics` will write the days and months. Syntax: @example set locale @{"<locale>"@} @end example <locale> may be any language designation acceptable to your installation. See your system documentation for the available options. The command `set locale ""` will try to determine the locale from the LC_TIME, LC_ALL, or LANG environment variables. To change the decimal point locale, see @ref{decimalsign}. To change the character encoding to the current locale, see @ref{encoding}. @node logscale, macros, locale, set-show @subsection logscale @c ?commands set logscale @c ?commands unset logscale @c ?commands show logscale @c ?set logscale @c ?unset logscale @c ?show logscale @c ?set log @cindex logscale @opindex logscale @cindex nologscale Syntax: @example set logscale <axes> @{<base>@} unset logscale <axes> show logscale @end example where <axes> may be any combinations of `x`, `x2`, `y`, `y2`, `z`, `cb`, and `r` in any order. <base> is the base of the log scaling (default is base 10). If no axes are specified, the command affects all axes except `r`. The command @ref{logscale} turns off log scaling for all axes. Note that the ticmarks generated for logscaled axes are not uniformly spaced. See `set xtics`. Examples: To enable log scaling in both x and z axes: @example set logscale xz @end example To enable scaling log base 2 of the y axis: @example set logscale y 2 @end example To enable z and color log axes for a pm3d plot: @example set logscale zcb @end example To disable z axis log scaling: @example unset logscale z @end example @node macros, mapping, logscale, set-show @subsection macros @c ?commands set macros @c ?commands show macros @c ?set macros @c ?show macros If command line macro substitution is enabled, then tokens in the command line of the form @@<stringvariablename> will be replaced by the text string contained in <stringvariablename>. See `substitution`. Syntax: @example set macros @end example @node mapping, margin, macros, set-show @subsection mapping @c ?commands set mapping @c ?commands show mapping @c ?set mapping @c ?show mapping @cindex mapping @opindex mapping If data are provided to `splot` in spherical or cylindrical coordinates, the @ref{mapping} command should be used to instruct `gnuplot` how to interpret them. Syntax: @example set mapping @{cartesian | spherical | cylindrical@} @end example A cartesian coordinate system is used by default. For a spherical coordinate system, the data occupy two or three columns (or @ref{using} entries). The first two are interpreted as the azimuthal and polar angles theta and phi (or "longitude" and "latitude"), in the units specified by @ref{angles}. The radius r is taken from the third column if there is one, or is set to unity if there is no third column. The mapping is: @example x = r * cos(theta) * cos(phi) y = r * sin(theta) * cos(phi) z = r * sin(phi) @end example Note that this is a "geographic" spherical system, rather than a "polar" one (that is, phi is measured from the equator, rather than the pole). For a cylindrical coordinate system, the data again occupy two or three columns. The first two are interpreted as theta (in the units specified by @ref{angles}) and z. The radius is either taken from the third column or set to unity, as in the spherical case. The mapping is: @example x = r * cos(theta) y = r * sin(theta) z = z @end example The effects of @ref{mapping} can be duplicated with the @ref{using} filter on the `splot` command, but @ref{mapping} may be more convenient if many data files are to be processed. However even if @ref{mapping} is used, @ref{using} may still be necessary if the data in the file are not in the required order. @ref{mapping} has no effect on `plot`. @c ^ See also @uref{http://www.gnuplot.info/demo/world.html,world.dem: mapping demos. } @node margin, mouse, mapping, set-show @subsection margin @c ?commands set margin @c ?commands show margin @c ?set margin @c ?show margin @cindex margin @opindex margin The @ref{margin} is the distance between the plot border and the outer edge of the canvas. The size of the margin is chosen automatically, but can be overridden by the @ref{margin} commands. @ref{margin} shows the current settings. To alter the distance between the inside of the plot border and the data in the plot itself, see @ref{offsets}. Syntax: @example set bmargin @{@{at screen@} <margin>@} set lmargin @{@{at screen@} <margin>@} set rmargin @{@{at screen@} <margin>@} set tmargin @{@{at screen@} <margin>@} show margin @end example The default units of <margin> are character heights or widths, as appropriate. A positive value defines the absolute size of the margin. A negative value (or none) causes `gnuplot` to revert to the computed value. For 3D plots, only the left margin can be set using character units. The keywords `at screen` indicates that the margin is specified as a fraction of the full drawing area. This can be used to precisely line up the corners of individual 2D and 3D graphs in a multiplot. This placement ignores the current values of @ref{origin} and @ref{size}, and is intended as an alternative method for positioning graphs within a multiplot. Normally the margins of a plot are automatically calculated based on tics, tic labels, axis labels, the plot title, the timestamp and the size of the key if it is outside the borders. If, however, tics are attached to the axes (`set xtics axis`, for example), neither the tics themselves nor their labels will be included in either the margin calculation or the calculation of the positions of other text to be written in the margin. This can lead to tic labels overwriting other text if the axis is very close to the border. @node mouse, multiplot, margin, set-show @subsection mouse @c ?commands set mouse @c ?commands unset mouse @c ?set mouse @c ?unset mouse @cindex mousing @cindex mouse @opindex mouse @cindex nomouse The command `set mouse` enables mouse actions for the current interactive terminal. It is usually enabled by default in interactive mode, but disabled by default if commands are being read from a file. There are two mouse modes. The 2D mode works for `plot` commands and for `splot` maps (i.e. @ref{view} with z-rotation 0, 90, 180, 270 or 360 degrees, including `set view map`). In this mode the mouse position is tracked and you can pan or zoom using the mouse buttons or arrow keys. Some terminals support toggling individual plots on/off by clicking on the corresponding key title or on a separate widget. For 3D graphs `splot`, the view and scaling of the graph can be changed with mouse buttons 1 and 2, respectively. A vertical motion of Button 2 with the shift key held down changes the @ref{xyplane}. If additionally to these buttons the modifier <ctrl> is held down, the coordinate axes are displayed but the data are suppressed. This is useful for large data sets. Mousing is not available inside multiplot mode. When multiplot is completed using @ref{multiplot}, then the mouse will be turned on again but acts only on the most recent plot within the multiplot (like replot does). Syntax: @example set mouse @{doubleclick <ms>@} @{nodoubleclick@} \ @{@{no@}zoomcoordinates@} \ @{noruler | ruler @{at x,y@}@} \ @{polardistance@{deg|tan@} | nopolardistance@} \ @{format <string>@} \ @{clipboardformat <int>/<string>@} \ @{mouseformat <int>/<string>@} \ @{@{no@}labels @{"labeloptions"@}@} \ @{@{no@}zoomjump@} @{@{no@}verbose@} unset mouse @end example The options `noruler` and `ruler` switch the ruler off and on, the latter optionally setting the origin at the given coordinates. While the ruler is on, the distance in user units from the ruler origin to the mouse is displayed continuously. By default, toggling the ruler has the key binding 'r'. The option `polardistance` determines if the distance between the mouse cursor and the ruler is also shown in polar coordinates (distance and angle in degrees or tangent (slope)). This corresponds to the default key binding '5'. @cindex labels Choose the option @ref{labels} to define persistent gnuplot labels using Button 2. The default is `nolabels`, which makes Button 2 draw only a temporary label at the mouse position. Labels are drawn with the current setting of @ref{mouseformat}. The `labeloptions` string is passed to the `set label` command. The default is "point pointstyle 1" which will plot a small plus at the label position. Temporary labels will disappear at the next @ref{replot} or mouse zoom operation. Persistent labels can be removed by holding the Ctrl-Key down while clicking Button 2 on the label's point. The threshold for how close you must be to the label is also determined by the @ref{pointsize}. If the option `verbose` is turned on the communication commands are shown during execution. This option can also be toggled by hitting `6` in the driver's window. `verbose` is off by default. Press 'h' in the driver's window for a short summary of the mouse and key bindings. This will also display user defined bindings or `hotkeys` which can be defined using the `bind` command, see help for `bind`. Note, that user defined `hotkeys` may override the default bindings. See also help for `bind` and `label`. @menu * doubleclick:: * mouseformat:: * scrolling:: * X11_mouse:: * zoom:: @end menu @node doubleclick, mouseformat, mouse, mouse @subsubsection doubleclick @c ?set mouse doubleclick @c ?mouse doubleclick The doubleclick resolution is given in milliseconds and used for Button 1, which copies the current mouse position to the `clipboard`. The default value is 300 ms. Setting the value to 0 ms triggers the copy on a single click. @node mouseformat, scrolling, doubleclick, mouse @subsubsection mouseformat @c ?set mouse format @c ?set mouse mouseformat @c ?mouse format @cindex mouseformat The `set mouse format` command specifies a format string for sprintf() which determines how the mouse cursor [x,y] coordinates are printed to the plot window and to the clipboard. The default is "% #g". `set mouse clipboardformat` and @ref{mouseformat} are used for formatting the text on Button1 and Button2 actions -- copying the coordinates to the clipboard and temporarily annotating the mouse position. An integer argument selects one of the format options in the table below. A string argument is used as a format for sprintf() in option 6 and should contain two float specifiers. Example: @example `set mouse mouseformat "mouse x,y = %5.2g, %10.3f"`. @end example Use `set mouse mouseformat ""` to turn this string off again. The following formats are available: @example 0 default (same as 1) 1 axis coordinates 1.23, 2.45 2 graph coordinates (from 0 to 1) /0.00, 1.00/ 3 x = timefmt y = axis [(as set by @ref{timefmt}), 2.45] 4 x = date y = axis [31. 12. 1999, 2.45] 5 x = time y = axis [23:59, 2.45] 6 x = date time y = axis [31. 12. 1999 23:59, 2.45] 7 format from @ref{mouseformat}, e.g. "mouse x,y = 1.23, 2.450" @end example @node scrolling, X11_mouse, mouseformat, mouse @subsubsection scrolling @c ?set mouse scrolling @c ?mouse scrolling @c ?mouse wheel @cindex scrolling @cindex mousewheel X and Y axis scaling in both 2D and 3D graphs can be adjusted using the mouse wheel. <wheel-up> scrolls up (increases both YMIN and YMAX by ten percent of the Y range, and increases both Y2MIN and Y2MAX likewise), and <wheel down> scrolls down. <shift-wheel-up> scrolls left (decreases both XMIN and XMAX, and both X2MIN and X2MAX), and <shift-wheel-down> scrolls right. <control-wheel-up> zooms in toward the center of the plot, and <control-wheel-down> zooms out. <shift-control-wheel-up> zooms in along the X and X2 axes only, and <shift-control-wheel-down> zooms out along the X and X2 axes only. @node X11_mouse, zoom, scrolling, mouse @subsubsection X11 mouse @c ?mouse x11_mouse @cindex x11_mouse @c ?x11 mouse If multiple X11 plot windows have been opened using the `set term x11 <n>` terminal option, then only the current plot window supports the entire range of mouse commands and hotkeys. The other windows will, however, continue to display mouse coordinates at the lower left. @node zoom, , X11_mouse, mouse @subsubsection zoom @c ?mouse zoom @cindex zoom Zooming is usually accomplished by holding down the left mouse button and dragging the mouse to delineate a zoom region. Some platforms may require using a different mouse button. The original plot can be restored by typing the 'u' hotkey in the plot window. The hotkeys 'p' and 'n' step back and forth through a history of zoom operations. The option `zoomcoordinates` determines if the coordinates of the zoom box are drawn at the edges while zooming. This is on by default. If the option `zoomjump` is on, the mouse pointer will be automatically offset a small distance after starting a zoom region with button 3. This can be useful to avoid a tiny (or even empty) zoom region. `zoomjump` is off by default. @node multiplot, mx2tics, mouse, set-show @subsection multiplot @c ?commands set multiplot @c ?commands unset multiplot @c ?set multiplot @c ?unset multiplot @cindex multiplot @opindex multiplot @cindex nomultiplot The command @ref{multiplot} places `gnuplot` in the multiplot mode, in which several plots are placed on the same page, window, or screen. Syntax: @example set multiplot @{ title <page title> @{font <fontspec>@} @{enhanced|noenhanced@} @} @{ layout <rows>,<cols> @{rowsfirst|columnsfirst@} @{downwards|upwards@} @{scale <xscale>@{,<yscale>@}@} @{offset <xoff>@{,<yoff>@}@} @} unset multiplot @end example For some terminals, no plot is displayed until the command @ref{multiplot} is given, which causes the entire page to be drawn and then returns gnuplot to its normal single-plot mode. For other terminals, each separate `plot` command produces an updated display, either by redrawing all previous ones and the newly added plot, or by just adding the new plot to the existing display. The area to be used by the next plot is not erased before doing the new plot. The @ref{clear} command can be used to do this if wanted, as is typically the case for "inset" plots. Any labels or arrows that have been defined will be drawn for each plot according to the current size and origin (unless their coordinates are defined in the `screen` system). Just about everything else that can be `set` is applied to each plot, too. If you want something to appear only once on the page, for instance a single time stamp, you'll need to put a `set time`/`unset time` pair around one of the `plot`, `splot` or @ref{replot} commands within the @ref{multiplot}/@ref{multiplot} block. The multiplot title is separate from the individual plot titles, if any. Space is reserved for it at the top of the page, spanning the full width of the canvas. The commands @ref{origin} and @ref{size} must be used to correctly position each plot if no layout is specified or if fine tuning is desired. See @ref{origin} and @ref{size} for details of their usage. Example: @example set multiplot set size 0.4,0.4 set origin 0.1,0.1 plot sin(x) set size 0.2,0.2 set origin 0.5,0.5 plot cos(x) unset multiplot @end example This displays a plot of cos(x) stacked above a plot of sin(x). @ref{size} and @ref{origin} refer to the entire plotting area used for each plot. Please also see @ref{size}. If you want to have the axes themselves line up, you can guarantee that the margins are the same size with the @ref{margin} commands. See @ref{margin} for their use. Note that the margin settings are absolute, in character units, so the appearance of the graph in the remaining space will depend on the screen size of the display device, e.g., perhaps quite different on a video display and a printer. With the `layout` option you can generate simple multiplots without having to give the @ref{size} and @ref{origin} commands before each plot: Those are generated automatically, but can be overridden at any time. With `layout` the display will be divided by a grid with <rows> rows and <cols> columns. This grid is filled rows first or columns first depending on whether the corresponding option is given in the multiplot command. The stack of plots can grow `downwards` or `upwards`. Default is `rowsfirst` and `downwards`. Each plot can be scaled by `scale` and shifted with `offset`; if the y-values for scale or offset are omitted, the x-value will be used. @ref{multiplot} will turn off the automatic layout and restore the values of @ref{size} and @ref{origin} as they were before `set multiplot layout`. Example: @example set size 1,1 set origin 0,0 set multiplot layout 3,2 columnsfirst scale 1.1,0.9 [ up to 6 plot commands here ] unset multiplot @end example The above example will produce 6 plots in 2 columns filled top to bottom, left to right. Each plot will have a horizontal size of 1.1/2 and a vertical size of 0.9/3. See also @uref{http://www.gnuplot.info/demo/multiplt.html,multiplot demo (multiplt.dem) } @node mx2tics, mxtics, multiplot, set-show @subsection mx2tics @c ?commands set mx2tics @c ?commands unset mx2tics @c ?commands show mx2tics @c ?set mx2tics @c ?unset mx2tics @c ?show mx2tics @cindex mx2tics @opindex mx2tics @cindex nomx2tics Minor tic marks along the x2 (top) axis are controlled by @ref{mx2tics}. Please see @ref{mxtics}. @node mxtics, my2tics, mx2tics, set-show @subsection mxtics @c ?commands set mxtics @c ?commands unset mxtics @c ?commands show mxtics @c ?set mxtics @c ?unset mxtics @c ?show mxtics @cindex mxtics @opindex mxtics @cindex nomxtics Minor tic marks along the x axis are controlled by @ref{mxtics}. They can be turned off with @ref{mxtics}. Similar commands control minor tics along the other axes. Syntax: @example set mxtics @{<freq> | default@} unset mxtics show mxtics @end example The same syntax applies to @ref{mytics}, @ref{mztics}, @ref{mx2tics}, @ref{my2tics} and `mcbtics`. <freq> is the number of sub-intervals (NOT the number of minor tics) between major tics (the default for a linear axis is either two or five depending on the major tics, so there are one or four minor tics between major tics). Selecting `default` will return the number of minor ticks to its default value. If the axis is logarithmic, the number of sub-intervals will be set to a reasonable number by default (based upon the length of a decade). This will be overridden if <freq> is given. However the usual minor tics (2, 3, ..., 8, 9 between 1 and 10, for example) are obtained by setting <freq> to 10, even though there are but nine sub-intervals. To set minor tics at arbitrary positions, use the ("<label>" <pos> <level>, ...) form of `set @{x|x2|y|y2|z@}tics` with <label> empty and <level> set to 1. The `set m@{x|x2|y|y2|z@}tics` commands work only when there are uniformly spaced major tics. If all major tics were placed explicitly by `set @{x|x2|y|y2|z@}tics`, then minor tic commands are ignored. Implicit major tics and explicit minor tics can be combined using `set @{x|x2|y|y2|z@}tics` and `set @{x|x2|y|y2|z@}tics add`. Examples: @example set xtics 0, 5, 10 set xtics add (7.5) set mxtics 5 @end example Major tics at 0,5,7.5,10, minor tics at 1,2,3,4,6,7,8,9 @example set logscale y set ytics format "" set ytics 1e-6, 10, 1 set ytics add ("1" 1, ".1" 0.1, ".01" 0.01, "10^-3" 0.001, \ "10^-4" 0.0001) set mytics 10 @end example Major tics with special formatting, minor tics at log positions By default, minor tics are off for linear axes and on for logarithmic axes. They inherit the settings for `axis|border` and `@{no@}mirror` specified for the major tics. Please see `set xtics` for information about these. @node my2tics, mytics, mxtics, set-show @subsection my2tics @c ?commands set my2tics @c ?commands unset my2tics @c ?commands show my2tics @c ?set my2tics @c ?unset my2tics @c ?show my2tics @cindex my2tics @opindex my2tics @cindex nomy2tics Minor tic marks along the y2 (right-hand) axis are controlled by @ref{my2tics}. Please see @ref{mxtics}. @node mytics, mztics, my2tics, set-show @subsection mytics @c ?commands set mytics @c ?commands unset mytics @c ?commands show mytics @c ?set mytics @c ?unset mytics @c ?show mytics @cindex mytics @opindex mytics @cindex nomytics Minor tic marks along the y axis are controlled by @ref{mytics}. Please see @ref{mxtics}. @node mztics, object, mytics, set-show @subsection mztics @c ?commands set mztics @c ?commands unset mztics @c ?commands show mztics @c ?set mztics @c ?unset mztics @c ?show mztics @cindex mztics @opindex mztics @cindex nomztics Minor tic marks along the z axis are controlled by @ref{mztics}. Please see @ref{mxtics}. @node object, offsets, mztics, set-show @subsection object @cindex object @opindex object @c ?commands set object @c ?commands show object @c ?set object @c ?show object The @ref{object} command defines a single object which will appear in all subsequent 2D plots. You may define as many objects as you like. Currently the supported object types are @ref{rectangle}, `circle`, `ellipse`, and @ref{polygon}. Rectangles inherit a default set of style properties (fill, color, border) from those set by the command @ref{rectangle}, but each object can also be given individual style properties. Circles, ellipses, and polygons inherit the fill style from `set style fill`. Syntax: @example set object <index> <object-type> <object-properties> @{front|back|behind@} @{fc|fillcolor <colorspec>@} @{fs <fillstyle>@} @{default@} @{lw|linewidth <width>@} @end example <object-type> is either @ref{rectangle}, `ellipse`, `circle`, or @ref{polygon}. Each object type has its own set of characteristic properties. Setting `front` will draw the object in front of all plot elements, but behind any labels that are also marked `front`. Setting `back` will place the object behind all plot curves and labels. Setting `behind` will place the object behind everything including the axes and `back` rectangles, thus @example set object rectangle from screen 0,0 to screen 1,1 behind @end example can be used to provide a colored background for the entire graph or page. The fill color of the object is taken from the <colorspec>. `fillcolor` may be abbreviated `fc`. The fill style is taken from <fillstyle>. See @ref{colorspec} and `fillstyle`. If the keyword `default` is given, these properties are inherited from the default settings at the time a plot is drawn. See @ref{rectangle}. @menu * rectangle:: * ellipse:: * circle:: * polygon:: @end menu @node rectangle, ellipse, object, object @subsubsection rectangle @cindex rectangle @c ?commands set object rectangle @c ?commands show object rectangle @c ?set object rectangle @c ?show object rectangle Syntax: @example set object <index> rectangle @{from <position> @{to|rto@} <position> | center <position> size <w>,<h> | at <position> size <w>,<h>@} @end example The position of the rectangle may be specified by giving the position of two diagonal corners (bottom left and top right) or by giving the position of the center followed by the width and the height. In either case the positions may be given in axis, graph, or screen coordinates. See `coordinates`. The options `at` and `center` are synonyms. Examples: @example # Force the entire area enclosed by the axes to have background color cyan set object 1 rect from graph 0, graph 0 to graph 1, graph 1 back set object 1 rect fc rgb "cyan" fillstyle solid 1.0 @end example @example # Position a red square with lower left at 0,0 and upper right at 2,3 set object 2 rect from 0,0 to 2,3 fc lt 1 @end example @example # Position an empty rectangle (no fill) with a blue border set object 3 rect from 0,0 to 2,3 fs empty border rgb "blue" @end example @example # Return fill and color to the default style but leave vertices unchanged set object 2 rect default @end example Rectangle corners specified in screen coordinates may extend beyond the edge of the current graph. Otherwise the rectangle is clipped to fit in the graph. @node ellipse, circle, rectangle, object @subsubsection ellipse @cindex ellipse @c ?commands set object ellipse @c ?commands show object ellipse @c ?set object ellipse @c ?show object ellipse Syntax: @example set object <index> ellipse @{at|center@} <position> size <w>,<h> @{angle <orientation>@} @{units xy|xx|yy@} @{<other-object-properties>@} @end example The position of the ellipse is specified by giving the center followed by the width and the height (actually the major and minor axes). The keywords `at` and `center` are synonyms. The center position may be given in axis, graph, or screen coordinates. See `coordinates`. The major and minor axis lengths must be given in axis coordinates. The orientation of the ellipse is specified by the angle between the horizontal axis and the major diameter of the ellipse. If no angle is given, the default ellipse orientation will be used instead (see `set style ellipse`). The `units` keyword controls the scaling of the axes of the ellipse. `units xy` means that the major axis is interpreted in terms of units along the x axis, while the minor axis in that of the y axis. `units xx` means that both axes of the ellipses are scaled in the units of the x axis, while `units yy` means that both axes are in units of the y axis. The default is `xy` or whatever `set style ellipse units` was set to. NB: If the x and y axis scales are not equal, (e.g. `units xy` is in effect) then the major/minor axis ratio will no longer be correct after rotation. Note that `set object ellipse size <2r>,<2r>` does not in general produce the same result as `set object circle <r>`. The circle radius is always interpreted in terms of units along the x axis, and will always produce a circle even if the x and y axis scales are different and even if the aspect ratio of your plot is not 1. If `units` is set to `xy`, then 'set object ellipse' interprets the first <2r> in terms of x axis units and the second <2r> in terms of y axis units. This will only produce a circle if the x and y axis scales are identical and the plot aspect ratio is 1. On the other hand, if `units` is set to `xx` or `yy`, then the diameters specified in the 'set object' command will be interpreted in the same units, so the ellipse will have the correct aspect ratio, and it will maintain its aspect ratio even if the plot is resized. @node circle, polygon, ellipse, object @subsubsection circle @cindex circle @c ?commands set object circle @c ?commands show object circle @c ?set object circle @c ?show object circle Syntax: @example set object <index> circle @{at|center@} <position> size <radius> @{arc [<begin>:<end>]@} @{<other-object-properties>@} @end example The position of the circle is specified by giving the position of the center center followed by the radius. The keywords `at` and `center` are synonyms. The position and radius may be given in x-axis, graph, or canvas coordinates. See `coordinates`. In all cases the radius is calculated relative to the horizontal scale of the axis, graph, or canvas. Any disparity between the horizontal and vertical scaling will be corrected for so that the result is always a circle. By default a full circle is drawn. The optional qualifier `arc` specifies a starting angle and ending angle, in degrees, for one arc of the circle. The arc is always drawn counterclockwise. @node polygon, , circle, object @subsubsection polygon @cindex polygon @c ?commands set object polygon @c ?commands show object polygon @c ?set object polygon @c ?show object polygon Syntax: @example set object <index> polygon from <position> to <position> ... @{to <position>@} @end example or @example from <position> rto <position> ... @{rto <position>@} @end example The position of the polygon may be specified by giving the position of a sequence of vertices. These may be given in axis, graph, or screen coordinates. If relative coordinates are used (rto) then the coordinate type must match that of the previous vertex. See `coordinates`. Example: @example set object 1 polygon from 0,0 to 1,1 to 2,0 set object 1 fc rgb "cyan" fillstyle solid 1.0 border lt -1 @end example @node offsets, origin, object, set-show @subsection offsets @c ?commands set offsets @c ?commands unset offsets @c ?commands show offsets @c ?set offsets @c ?unset offsets @c ?show offsets @cindex offsets @opindex offsets @cindex nooffsets Offsets provide a mechanism to put an empty boundary around the data inside an autoscaled graph. The offsets only affect the x1 and y1 axes, and only in 2D `plot` commands. Syntax: @example set offsets <left>, <right>, <top>, <bottom> unset offsets show offsets @end example Each offset may be a constant or an expression. Each defaults to 0. By default, the left and right offsets are given in units of the first x axis, the top and bottom offsets in units of the first y axis. Alternatively, you may specify the offsets as a fraction of the total axis range by using the keyword "graph". A positive offset expands the axis range in the specified direction, e.g., a positive bottom offset makes ymin more negative. Negative offsets, while permitted, can have unexpected interactions with autoscaling and clipping. To prevent the auto-scaling from further adjusting your axis ranges, it is useful to also specify "set auto fix". Example: @example set auto fix set offsets graph 0.05, 0, 2, 2 plot sin(x) @end example This graph of sin(x) will have a y range [-3:3] because the function will be autoscaled to [-1:1] and the vertical offsets are each two. The x range will be [-11:10] because the default is [-10:10] and it has been expanded to the left by 0.05 of that total range. @node origin, output, offsets, set-show @subsection origin @c ?commands set origin @c ?commands show origin @c ?set origin @c ?show origin @cindex origin @opindex origin The @ref{origin} command is used to specify the origin of a plotting surface (i.e., the graph and its margins) on the screen. The coordinates are given in the `screen` coordinate system (see `coordinates` for information about this system). Syntax: @example set origin <x-origin>,<y-origin> @end example @node output, parametric_, origin, set-show @subsection output @c ?commands set output @c ?commands show output @c ?set output @c ?show output @cindex output @opindex output @c ?output file By default, screens are displayed to the standard output. The @ref{output} command redirects the display to the specified file or device. Syntax: @example set output @{"<filename>"@} show output @end example The filename must be enclosed in quotes. If the filename is omitted, any output file opened by a previous invocation of @ref{output} will be closed and new output will be sent to STDOUT. (If you give the command `set output "STDOUT"`, your output may be sent to a file named "STDOUT"! ["May be", not "will be", because some terminals, like `x11` or `wxt`, ignore @ref{output}.]) When both @ref{terminal} and @ref{output} are used together, it is safest to give @ref{terminal} first, because some terminals set a flag which is needed in some operating systems. This would be the case, for example, if the operating system needs to know whether or not a file is to be formatted in order to open it properly. On machines with popen functions (Unix), output can be piped through a shell command if the first non-whitespace character of the filename is '|'. For instance, @example set output "|lpr -Plaser filename" set output "|lp -dlaser filename" @end example On MSDOS machines, `set output "PRN"` will direct the output to the default printer. On VMS, output can be sent directly to any spooled device. It is also possible to send the output to DECnet transparent tasks, which allows some flexibility. @node parametric_, plot_, output, set-show @subsection parametric @c ?commands set parametric @c ?commands unset parametric @c ?commands show parametric @c ?set parametric @c ?unset parametric @c ?show parametric @cindex parametric @opindex parametric @cindex noparametric The `set parametric` command changes the meaning of `plot` (`splot`) from normal functions to parametric functions. The command `unset parametric` restores the plotting style to normal, single-valued expression plotting. Syntax: @example set parametric unset parametric show parametric @end example For 2D plotting, a parametric function is determined by a pair of parametric functions operating on a parameter. An example of a 2D parametric function would be `plot sin(t),cos(t)`, which draws a circle (if the aspect ratio is set correctly---see @ref{size}). `gnuplot` will display an error message if both functions are not provided for a parametric `plot`. For 3D plotting, the surface is described as x=f(u,v), y=g(u,v), z=h(u,v). Therefore a triplet of functions is required. An example of a 3D parametric function would be `cos(u)*cos(v),cos(u)*sin(v),sin(u)`, which draws a sphere. `gnuplot` will display an error message if all three functions are not provided for a parametric `splot`. The total set of possible plots is a superset of the simple f(x) style plots, since the two functions can describe the x and y values to be computed separately. In fact, plots of the type t,f(t) are equivalent to those produced with f(x) because the x values are computed using the identity function. Similarly, 3D plots of the type u,v,f(u,v) are equivalent to f(x,y). Note that the order the parametric functions are specified is xfunction, yfunction (and zfunction) and that each operates over the common parametric domain. Also, the `set parametric` function implies a new range of values. Whereas the normal f(x) and f(x,y) style plotting assume an xrange and yrange (and zrange), the parametric mode additionally specifies a trange, urange, and vrange. These ranges may be set directly with @ref{trange}, @ref{urange}, and @ref{vrange}, or by specifying the range on the `plot` or `splot` commands. Currently the default range for these parametric variables is [-5:5]. Setting the ranges to something more meaningful is expected. @node plot_, pm3d, parametric_, set-show @subsection plot @c ?commands show plot @c ?show plot The `show plot` command shows the current plotting command as it results from the last `plot` and/or `splot` and possible subsequent @ref{replot} commands. In addition, the `show plot add2history` command adds this current plot command into the `history`. It is useful if you have used @ref{replot} to add more curves to the current plot and you want to edit the whole command now. @node pm3d, palette, plot_, set-show @subsection pm3d @c ?commands set pm3d @c ?commands show pm3d @c ?set pm3d @c ?show pm3d @cindex pm3d @opindex pm3d pm3d is an `splot` style for drawing palette-mapped 3d and 4d data as color/gray maps and surfaces. It uses an algorithm that allows plotting gridded as well as non-gridded data without preprocessing, even when the data scans do not have the same number of points. Syntax (the options can be given in any order): @example set pm3d @{ @{ at <position> @} @{ interpolate <steps/points in scan, between scans> @} @{ scansautomatic | scansforward | scansbackward | depthorder @} @{ flush @{ begin | center | end @} @} @{ ftriangles | noftriangles @} @{ clip1in | clip4in @} @{ corners2color @{ mean|geomean|median|min|max|c1|c2|c3|c4 @} @} @{ hidden3d @{<linestyle>@} | nohidden3d @} @{ implicit | explicit @} @{ map @} @} show pm3d unset pm3d @end example A pm3d color surface is drawn if the splot command specifies @ref{pm3d}, if the data or function @ref{style} is set to pm3d globally, or if the pm3d mode is `set pm3d implicit`. In the latter two cases, the pm3d surface is draw in addition to the mesh produced by the style specified in the plot command. E.g. @example splot 'fred.dat' with lines, 'lola.dat' with lines @end example would draw both a mesh of lines and a pm3d surface for each data set. If the option `explicit` is on (or `implicit` is off) only plots specified by the @ref{pm3d} attribute are plotted with a pm3d surface, e.g.: @example splot 'fred.dat' with lines, 'lola.dat' with pm3d @end example would plot 'fred.dat' with lines (only) and 'lola.dat' with a pm3d surface. On gnuplot start-up, the mode is `explicit`. For historical and compatibility reasons, the commands `set pm3d;` (i.e. no options) and `set pm3d at X ...` (i.e. `at` is the first option) change the mode to `implicit`. The command `set pm3d;` sets other options to their default state. If you set the default data or function style to @ref{pm3d}, e.g.: @example set style data pm3d @end example then the options `implicit` and `explicit` have no effect. Note that when plotting several plots, they are plotted in the order given on the command line. This can be of interest especially for filled surfaces which can overwrite and therefore hide part of earlier plots. The pm3d coloring can be drawn at any or all of three different positions, `top`, `bottom`, or @ref{surface}. See @ref{position}. The following command draws three color surfaces at different altitudes: @example set border 4095 set pm3d at s splot 10*x with pm3d at b, x*x-y*y, x*x+y*y with pm3d at t @end example See also help for @ref{palette}, @ref{cbrange}, `set colorbox`, and definitely the demo file `demo/pm3d.dem`. @menu * algorithm:: * position:: * scanorder:: * clipping:: * color_assignment:: * hidden3d_:: * interpolate:: * deprecated_options:: @end menu @node algorithm, position, pm3d, pm3d @subsubsection algorithm @c ?pm3d algorithm Let us first describe how a map/surface is drawn. The input data come from an evaluated function or from an `splot data file`. Each surface consists of a sequence of separate scans (isolines). The pm3d algorithm fills the region between two neighbouring points in one scan with another two points in the next scan by a gray (or color) according to z-values (or according to an additional 'color' column, see help for @ref{using}) of these 4 corners; by default the 4 corner values are averaged, but this can be changed by the option `corners2color`. In order to get a reasonable surface, the neighbouring scans should not cross and the number of points in the neighbouring scans should not differ too much; of course, the best plot is with scans having same number of points. There are no other requirements (e.g. the data need not be gridded). Another advantage is that the pm3d algorithm does not draw anything outside of the input (measured or calculated) region. Surface coloring works with the following input data: 1. splot of function or of data file with one or three data columns: The gray/color scale is obtained by mapping the averaged (or `corners2color`) z-coordinate of the four corners of the above-specified quadrangle into the range [min_color_z,max_color_z] of @ref{zrange} or @ref{cbrange} providing a gray value in the range [0:1]. This value can be used directly as the gray for gray maps. The normalized gray value can be further mapped into a color---see @ref{palette} for the complete description. 2. splot of data file with two or four data columns: The gray/color value is obtained by using the last-column coordinate instead of the z-value, thus allowing the color and the z-coordinate be mutually independent. This can be used for 4d data drawing. Other notes: 1. The term 'scan' referenced above is used more among physicists than the term 'iso_curve' referenced in gnuplot documentation and sources. You measure maps recorded one scan after another scan, that's why. 2. The 'gray' or 'color' scale is a linear mapping of a continuous variable onto a smoothly varying palette of colors. The mapping is shown in a rectangle next to the main plot. This documentation refers to this as a "colorbox", and refers to the indexing variable as lying on the colorbox axis. See `set colorbox`, @ref{cbrange}. 3. To use pm3d coloring to generate a two-dimensional plot rather than a 3D surface, use `set view map` or `set pm3d map`. @node position, scanorder, algorithm, pm3d @subsubsection position @c ?pm3d position Color surface can be drawn at the base or top (then it is a gray/color planar map) or at z-coordinates of surface points (gray/color surface). This is defined by the `at` option with a string of up to 6 combinations of `b`, `t` and `s`. For instance, `at b` plots at bottom only, `at st` plots firstly surface and then top map, while `at bstbst` will never by seriously used. Colored quadrangles are plotted one after another. When plotting surfaces (`at s`), the later quadrangles overlap (overdraw) the previous ones. (Gnuplot is not virtual reality tool to calculate intersections of filled polygon meshes.) You may try to switch between `scansforward` and `scansbackward` to force the first scan of the data to be plotted first or last. The default is `scansautomatic` where gnuplot makes a guess about scans order. On the other hand, the `depthorder` option completely reorders the quadrangles. The rendering is performed after a depth sorting, which allows to visualize even complicated surfaces; see `pm3d depthorder` for more details. @node scanorder, clipping, position, pm3d @subsubsection scanorder @c ?pm3d scanorder @c ?pm3d depthorder @c ?pm3d flush @cindex depthorder @cindex flush @cindex scansforward @cindex scansbackward @cindex scansautomatic @cindex depthorder By default the quadrangles making up a pm3d solid surface are rendered in the order they are encountered along the surface grid points. This order may be controlled by the options `scansautomatic`|`scansforward`|`scansbackward`. These scan options are not in general compatible with hidden-surface removal. If two successive scans do not have same number of points, then it has to be decided whether to start taking points for quadrangles from the beginning of both scans (`flush begin`), from their ends (`flush end`) or to center them (`flush center`). Note, that `flush (center|end)` are incompatible with `scansautomatic`: if you specify `flush center` or `flush end` and `scansautomatic` is set, it is silently switched to `scansforward`. If two subsequent scans do not have the same number of points, the option `ftriangles` specifies whether color triangles are drawn at the scan tail(s) where there are not enough points in either of the scan. This can be used to draw a smooth map boundary. Gnuplot does not do true hidden surface removal for solid surfaces, but often it is sufficient to render the component quadrangles in order from furthest to closest. This mode may be selected using the options @example set pm3d depthorder hidden3d @end example The `depthorder` option orders the solid quadrangles; the @ref{hidden3d} option similarly orders the bounding lines (if drawn). Note that the global option @ref{hidden3d} does not affect pm3d surfaces. @node clipping, color_assignment, scanorder, pm3d @subsubsection clipping @c ?pm3d clipping Clipping with respect to x, y coordinates of quadrangles can be done in two ways. `clip1in`: all 4 points of each quadrangle must be defined and at least 1 point of the quadrangle must lie in the x and y ranges. `clip4in`: all 4 points of each quadrangle must lie in the x and y ranges. @node color_assignment, hidden3d_, clipping, pm3d @subsubsection color_assignment @c ?pm3d color_assignment @cindex mean @cindex geomean @cindex median @cindex min @cindex max `3 columns of data (x,y,z)`: The coloring setup as well as the color box drawing are determined by @ref{palette}. There can be only one palette for the current plot. Drawing of several surfaces with different palettes can be achieved by @ref{multiplot} with fixed @ref{origin} and @ref{size}; don't forget to use `set palette maxcolors` when your terminal is running out of available colors. There is a single gray/color value associated to each drawn pm3d quadrangle (no smooth color change among vertices). The value is calculated from z-coordinates from the surrounding corners according to `corners2color <option>`. The options 'mean' (default), 'geomean' and 'median' produce various kinds of surface color smoothing, while options 'min' and 'max' choose minimal or maximal value, respectively. This may not be desired for pixel images or for maps with sharp and intense peaks, in which case the options 'c1', 'c2', 'c3' or 'c4' can be used instead to assign the quadrangle color based on the z-coordinate of only one corner. Some experimentation may be needed to determine which corner corresponds to 'c1', as the orientation depends on the drawing direction. Because the pm3d algorithm does not extend the colored surface outside the range of the input data points, the 'c<j>' coloring options will result in pixels along two edges of the grid not contributing to the color of any quadrangle. For example, applying the pm3d algorithm to the 4x4 grid of data points in script `demo/pm3d.dem` (please have a look) produces only (4-1)x(4-1)=9 colored rectangles. `4 columns of data (x,y,z,color)`: If a fourth column of data is provided, it is normally interpreted as a separate palette-mapped gray value. The coloring of individual quadrangles works as above, except that the color value is distinct from the z value. As a separate coloring option, the fourth data column may provide instead an RGB color. See `rgbcolor variable`. In this case the plotting command must be @example splot ... using 1:2:3:4 with pm3d lc rgb variable @end example Another drawing algorithm, which would draw quadrangles around a given node by taking corners from averaged (x,y)-coordinates of its surrounding 4 nodes while using node's color, could be implemented in the future. This is already done for drawing images (2D grids) via `image` and @ref{rgbimage} styles. Notice that ranges of z-values and color-values for surfaces are adjustable independently by @ref{zrange}, @ref{cbrange}, as well as `set log` for z or cb. Maps can be adjusted by the cb-axis only; see also `set view map` and `set colorbox`. @node hidden3d_, interpolate, color_assignment, pm3d @subsubsection hidden3d @c ?set pm3d hidden3d @c ?pm3d hidden3d The option @ref{hidden3d} draws the bounding lines of each quadrangle at the same time that the quadrangle itself is drawn. Normally it is used in conjunction with the `depthorder` option to achieve an approximation to true hidden line removal. This is far more efficient than using the command @ref{hidden3d}. The command takes an optional linestyle controlling the appearance of the bounding lines. If the linestyle parameter is negative, or omitted, then the line properties given in the plot command are used. Example of recommended usage: @example set pm3d at s hidden3d depthorder unset hidden3d unset surf splot x*x+y*y linecolor rgb "black" linewidth 0.5 @end example @node interpolate, deprecated_options, hidden3d_, pm3d @subsubsection interpolate @c ?set pm3d interpolate @c ?pm3d interpolate The option `interpolate m,n` will interpolate grid points into a finer mesh, and color each quadrangle appropriately. For data files, this will smoothen the color surface, and enhance spikes in a color surface. For functions, interpolation makes little sense, except to trade off precision for memory. It would usually make more sense to use @ref{samples} and @ref{isosamples} when working with functions. For positive m and n, each quadrangle or triangle is interpolated m-times and n-times in the respective direction. For negative m and n, the interpolation frequency is chosen so that there will be at least |m| and |n| points drawn; you can consider this as a special gridding function. Zeros, i.e. `interpolate 0,0`, will automatically choose an optimal number of interpolated surface points. @node deprecated_options, , interpolate, pm3d @subsubsection deprecated_options @c ?pm3d deprecated_options There used to be an option @{transparent|solid@} to this command. Now you get the same effect from `set grid @{front|layerdefault@}`, respectively. The command `set pm3d map` is equivalent to `set pm3d at b`; `set view map`; @ref{pm3d}; @ref{pm3d};. It is used for backwards compatibility, when `set view map` was not available. Take care that you properly use @ref{zrange} and @ref{cbrange} for input data point filtering and color range scaling, respectively; and also `set (no)surface` seems to have a (side?) effect. @node palette, pointintervalbox, pm3d, set-show @subsection palette @c ?commands set palette @c ?commands show palette @c ?set palette @c ?show palette @cindex palette @opindex palette Palette is a color storage for use by @ref{pm3d}, filled color contours or polygons, color histograms, color gradient background, and whatever it is or it will be implemented... Here it stands for a palette of smooth "continuous" colors or grays, but let's call it just a palette. Color palettes require terminal entries for filled color polygons and palettes of smooth colors, are currently available for terminals listed in help for @ref{pm3d}. The range of color values are adjustable independently by @ref{cbrange} and `set log cb`. The whole color palette is visualized in the `colorbox`. Syntax: @example set palette set palette @{ @{ gray | color @} @{ gamma <gamma> @} @{ rgbformulae <r>,<g>,<b> | defined @{ ( <gray1> <color1> @{, <grayN> <colorN>@}... ) @} | file '<filename>' @{datafile-modifiers@} | functions <R>,<G>,<B> @} @{ cubehelix @{start <val>@} @{cycles <val>@} @{saturation <val>@} @} @{ model @{ RGB | HSV | CMY | YIQ | XYZ @} @} @{ positive | negative @} @{ nops_allcF | ps_allcF @} @{ maxcolors <maxcolors> @} @} show palette show palette palette <n> @{@{float | int@}@} show palette gradient show palette fit2rgbformulae show palette rgbformulae show colornames @end example @ref{palette} (i.e. without options) sets up the default values. Otherwise, the options can be given in any order. @ref{palette} shows the current palette properties. `show palette gradient` displays the gradient defining the palette (if appropriate). @ref{rgbformulae} prints the available fixed gray --> color transformation formulae. @ref{colornames} prints the known color names. `show palette palette <n>` prints to the screen or to the file given by @ref{print} a table of RGB triplets calculated for the current palette settings and a palette having <n> discrete colors. The default wide table can be limited to 3 columns of r,g,b float values [0..1] or integer values [0..255] by options float or int, respectively. This way, the current gnuplot color palette can be loaded into other imaging applications, for example Octave. Additionally to this textual list of RGB table, you can use the @ref{palette} command to plot the R,G,B profiles for the current palette. The following options determine the coloring properties. Figure using this palette can be `gray` or `color`. For instance, in @ref{pm3d} color surfaces the gray of each small spot is obtained by mapping the averaged z-coordinate of the 4 corners of surface quadrangles into the range [min_z,max_z] providing range of grays [0:1]. This value can be used directly as the gray for gray maps. The color map requires a transformation gray --> (R,G,B), i.e. a mapping [0:1] --> ([0:1],[0:1],[0:1]). Basically two different types of mappings can be used: Analytic formulae to convert gray to color, or discrete mapping tables which are interpolated. @ref{rgbformulae} and @ref{functions} use analytic formulae whereas @ref{defined} and `palette file` use interpolated tables. @ref{rgbformulae} reduces the size of postscript output to a minimum. The command `show palette fit2rgbformulae` finds the best matching @ref{rgbformulae} for the current @ref{palette}. Naturally, it makes sense to use it for non-rgbformulae palettes. This command can be found useful mainly for external programs using the same rgbformulae definition of palettes as gnuplot, like zimg ( @uref{http://zimg.sourceforge.net,http://zimg.sourceforge.net } ). `set palette gray` switches to a gray only palette. @ref{rgbformulae}, @ref{defined}, `set palette file` and @ref{functions} switch to a color mapping. `set palette color` is an easy way to switch back from the gray palette to the last color mapping. Automatic gamma correction via `set palette gamma <gamma>` can be done for gray maps (`set palette gray`) and for the @ref{cubehelix} color palette schemes. Gamma = 1 produces a linear ramp of intensity. See @ref{palette}. Many terminals support only discrete number of colors (e.g. 256 colors in gif). After the default gnuplot linetype colors are allocated, the rest of the available colors are by default reserved for pm3d. Thus a multiplot using multiple palettes could fail because the first palette has used all the available color positions. You can mitigate this limitation by using `set palette maxcolors <N>` with a reasonably small value of N. This option causes N discrete colors to be selected from a continuous palette sampled at equally spaced intervals. If you want unequal spacing of N discrete colors, use @ref{defined} instead of a single continuous palette. RGB color space might not be the most useful color space to work in. For that reason you may change the color space with `model` to one of `RGB`, `HSV`, `CMY`, `YIQ` and `XYZ`. Using color names for @ref{defined} tables and a color space other than RGB will result in funny colors. All explanation have been written for RGB color space, so please note, that `R` can be `H`, `C`, `Y`, or `X`, depending on the actual color space (`G` and `B` accordingly). All values for all color spaces are limited to [0,1]. RGB stands for Red, Green and Blue; CMY stands for Cyan, Magenta and Yellow; HSV stands for Hue, Saturation, and Value; YIQ is the color model used by the U.S. Commercial Color Television Broadcasting, it is basically an RGB recoding with downward compatibility for black and white television; XYZ are the three primary colors of the color model defined by the 'Commission Internationale de l'Eclairage' (CIE). For more information on color models see: @uref{http://en.wikipedia.org/wiki/Color_space,http://en.wikipedia.org/wiki/Color_space } @menu * rgbformulae:: * defined_:: * functions__:: * cubehelix:: * file:: * gamma_correction:: * postscript:: @end menu @node rgbformulae, defined_, palette, palette @subsubsection rgbformulae @c ?commands set palette rgbformulae @c ?set palette rgbformulae @c ?palette rgbformulae @cindex rgbformulae @cindex colors For @ref{rgbformulae} three suitable mapping functions have to be chosen. This is done via `rgbformulae <r>,<g>,<b>`. The available mapping functions are listed by @ref{rgbformulae}. Default is `7,5,15`, some other examples are `3,11,6`, `21,23,3` or `3,23,21`. Negative numbers, like `3,-11,-6`, mean inverted color (i.e. 1-gray passed into the formula, see also `positive` and `negative` options below). Some nice schemes in RGB color space @example 7,5,15 ... traditional pm3d (black-blue-red-yellow) 3,11,6 ... green-red-violet 23,28,3 ... ocean (green-blue-white); try also all other permutations 21,22,23 ... hot (black-red-yellow-white) 30,31,32 ... color printable on gray (black-blue-violet-yellow-white) 33,13,10 ... rainbow (blue-green-yellow-red) 34,35,36 ... AFM hot (black-red-yellow-white) @end example A full color palette in HSV color space @example 3,2,2 ... red-yellow-green-cyan-blue-magenta-red @end example Please note that even if called @ref{rgbformulae} the formulas might actually determine the <H>,<S>,<V> or <X>,<Y>,<Z> or ... color components as usual. Use `positive` and `negative` to invert the figure colors. @c ^ <a name="positive"></a> @c ^ <a name="negative"></a> Note that it is possible to find a set of the best matching rgbformulae for any other color scheme by the command @example show palette fit2rgbformulae @end example @node defined_, functions__, rgbformulae, palette @subsubsection defined @c ?commands set palette defined @c ?set palette defined @c ?palette defined @cindex colors Gray-to-rgb mapping can be manually set by use of @ref{defined}: A color gradient is defined and used to give the rgb values. Such a gradient is a piecewise linear mapping from gray values in [0,1] to the RGB space [0,1]x[0,1]x[0,1]. You must specify the gray values and the corresponding RGB values between which linear interpolation will be done. Syntax: @example set palette defined @{ ( <gray1> <color1> @{, <grayN> <colorN>@}... ) @} @end example <grayX> are gray values which are mapped to [0,1] and <colorX> are the corresponding rgb colors. The color can be specified in three different ways: @example <color> := @{ <r> <g> <b> | '<color-name>' | '#rrggbb' @} @end example Either by three numbers (each in [0,1]) for red, green and blue, separated by whitespace, or the name of the color in quotes or X style color specifiers also in quotes. You may freely mix the three types in a gradient definition, but the named color "red" will be something strange if RGB is not selected as color space. Use @ref{colornames} for a list of known color names. Please note, that even if written as <r>, this might actually be the <H> component in HSV color space or <X> in CIE-XYZ space, or ... depending on the selected color model. The <gray> values have to form an ascending sequence of real numbers; the sequence will be automatically rescaled to [0,1]. @ref{defined} (without a gradient definition in braces) switches to RGB color space and uses a preset full-spectrum color gradient. Use `show palette gradient` to display the gradient. Examples: To produce a gray palette (useless but instructive) use: @example set palette model RGB set palette defined ( 0 "black", 1 "white" ) @end example To produce a blue yellow red palette use (all equivalent): @example set palette defined ( 0 "blue", 1 "yellow", 2 "red" ) set palette defined ( 0 0 0 1, 1 1 1 0, 2 1 0 0 ) set palette defined ( 0 "#0000ff", 1 "#ffff00", 2 "#ff0000" ) @end example To produce some rainbow-like palette use: @example set palette defined ( 0 "blue", 3 "green", 6 "yellow", 10 "red" ) @end example Full color spectrum within HSV color space: @example set palette model HSV set palette defined ( 0 0 1 1, 1 1 1 1 ) set palette defined ( 0 0 1 0, 1 0 1 1, 6 0.8333 1 1, 7 0.8333 0 1) @end example Approximate the default palette used by MATLAB: @example set pal defined (1 '#00008f', 8 '#0000ff', 24 '#00ffff', \ 40 '#ffff00', 56 '#ff0000', 64 '#800000') @end example To produce a palette with only a few, equally-spaced colors: @example set palette model RGB maxcolors 4 set palette defined ( 0 "yellow", 1 "red" ) @end example 'Traffic light' palette (non-smooth color jumps at gray = 1/3 and 2/3). @example set palette model RGB set palette defined (0 "dark-green", 1 "green", \ 1 "yellow", 2 "dark-yellow", \ 2 "red", 3 "dark-red" ) @end example @node functions__, cubehelix, defined_, palette @subsubsection functions @c ?commands set palette functions @c ?set palette functions @c ?palette functions Use `set palette functions <Rexpr>, <Gexpr>, <Bexpr>` to define three formulae for the R(gray), G(gray) and B(gray) mapping. The three formulae may depend on the variable `gray` which will take values in [0,1] and should also produce values in [0,1]. Please note that <Rexpr> might be a formula for the H-value if HSV color space has been chosen (same for all other formulae and color spaces). Examples: To produce a full color palette use: @example set palette model HSV functions gray, 1, 1 @end example A nice black to gold palette: @example set palette model XYZ functions gray**0.35, gray**0.5, gray**0.8 @end example A gamma-corrected black and white palette @example gamma = 2.2 color(gray) = gray**(1./gamma) set palette model RGB functions color(gray), color(gray), color(gray) @end example @node cubehelix, file, functions__, palette @subsubsection cubehelix @c ?commands set palette cubehelix @c ?set palette cubehelix @cindex cubehelix The "cubehelix" option defines a family of palettes in which color (hue) varies along the standard color wheel while at the same time the net intensity increases monotonically as the gray value goes from 0 to 1. @example D A Green (2011) http://arxiv.org/abs/1108.5083 @end example `start` defines the starting point along the color wheel in radians. `cycles` defines how many color wheel cycles span the palette range. Larger values of `saturation` produce more saturated color; saturation > 1 may lead to clipping of the individual RGB components and to intensity becoming non-monotonic. The palette is also affected by `set palette gamma`. The default values are @example set palette cubehelix start 0.5 cycles -1.5 saturation 1 set palette gamma 1.5 @end example @node file, gamma_correction, cubehelix, palette @subsubsection file @c ?commands set palette file @c ?set palette file @c ?palette file `set palette file` is basically a `set palette defined (<gradient>)` where <gradient> is read from a datafile. Either 4 columns (gray,R,G,B) or just three columns (R,G,B) have to be selected via the @ref{using} data file modifier. In the three column case, the line number will be used as gray. The gray range is automatically rescaled to [0,1]. The file is read as a normal data file, so all datafile modifiers can be used. Please note, that `R` might actually be e.g. `H` if HSV color space is selected. As usual <filename> may be `'-'` which means that the data follow the command inline and are terminated by a single `e` on a line of its own. Use `show palette gradient` to display the gradient. Examples: Read in a palette of RGB triples each in range [0,255]: @example set palette file 'some-palette' using ($1/255):($2/255):($3/255) @end example Equidistant rainbow (blue-green-yellow-red) palette: @example set palette model RGB file "-" 0 0 1 0 1 0 1 1 0 1 0 0 e @end example Binary palette files are supported as well, see @ref{general}. Example: put 64 triplets of R,G,B doubles into file palette.bin and load it by @example set palette file "palette.bin" binary record=64 using 1:2:3 @end example @node gamma_correction, postscript, file, palette @subsubsection gamma correction @c ?commands set palette gamma-correction @c ?set palette gamma-correction @c ?palette gamma-correction @cindex gamma-correction For gray mappings gamma correction can be turned on by `set palette gamma <gamma>`. <gamma> defaults to 1.5 which is quite suitable for most terminals. The gamma correction is applied to the cubehelix color palette family, but not to other palette coloring schemes. However, you may easily implement gamma correction for explicit color functions. Example: @example set palette model RGB set palette functions gray**0.64, gray**0.67, gray**0.70 @end example To use gamma correction with interpolated gradients specify intermediate gray values with appropriate colors. Instead of @example set palette defined ( 0 0 0 0, 1 1 1 1 ) @end example use e.g. @example set palette defined ( 0 0 0 0, 0.5 .73 .73 .73, 1 1 1 1 ) @end example or even more intermediate points until the linear interpolation fits the "gamma corrected" interpolation well enough. @node postscript, , gamma_correction, palette @subsubsection postscript @c ?commands set palette postscript @c ?set palette postscript In order to reduce the size of postscript files, the gray value and not all three calculated r,g,b values are written to the file. Therefore the analytical formulae are coded directly in the postscript language as a header just before the pm3d drawing, see /g and /cF definitions. Usually, it makes sense to write therein definitions of only the 3 formulae used. But for multiplot or any other reason you may want to manually edit the transformations directly in the postscript file. This is the default option `nops_allcF`. Using the option `ps_allcF` writes postscript definitions of all formulae. This you may find interesting if you want to edit the postscript file in order to have different palettes for different surfaces in one graph. Well, you can achieve this functionality by @ref{multiplot} with fixed @ref{origin} and @ref{size}. If pm3d map has been plotted from gridded or almost regular data with an output to a postscript file, then it is possible to reduce the size of this postscript file up to at about 50% by the enclosed awk script `pm3dCompress.awk`. This you may find interesting if you intend to keep the file for including it into your publication or before downloading a very large file into a slow printer. Usage: @example awk -f pm3dCompress.awk thefile.ps >smallerfile.ps @end example If pm3d map has been plotted from rectangular gridded data with an output to a postscript file, then it is possible to reduce the file size even more by the enclosed awk script `pm3dConvertToImage.awk`. Usage: @example awk -f pm3dConvertToImage.awk <thefile.ps >smallerfile.ps @end example You may manually change the postscript output from gray to color and vice versa and change the definition of <maxcolors>. @node pointintervalbox, pointsize, palette, set-show @subsection pointintervalbox @c ?commands set pointintervalbox @c ?set pointintervalbox @cindex pointintervalbox @opindex pointintervalbox The `pointinterval` property of line types is used in plot style @ref{linespoints}. A negative value of pointinterval, e.g. -N, means that point symbols are drawn only for every Nth point, and that a box (actually circle) behind each point symbol is blanked out by filling with the background color. The command @ref{pointintervalbox} controls the radius of this blanked-out region. It is a multiplier for the default radius, which is equal to the point size. @node pointsize, polar_, pointintervalbox, set-show @subsection pointsize @c ?commands set pointsize @c ?commands show pointsize @c ?set pointsize @c ?show pointsize @cindex pointsize @opindex pointsize The @ref{pointsize} command scales the size of the points used in plots. Syntax: @example set pointsize <multiplier> show pointsize @end example The default is a multiplier of 1.0. Larger pointsizes may be useful to make points more visible in bitmapped graphics. The pointsize of a single plot may be changed on the `plot` command. See @ref{with} for details. Please note that the pointsize setting is not supported by all terminal types. @node polar_, print_, pointsize, set-show @subsection polar @c ?commands set polar @c ?commands unset polar @c ?commands show polar @c ?set polar @c ?unset polar @c ?show polar @cindex polar @opindex polar @cindex nopolar The `set polar` command changes the meaning of the plot from rectangular coordinates to polar coordinates. Syntax: @example set polar unset polar show polar @end example In polar coordinates, the dummy variable (t) is an angle. The default range of t is [0:2*pi], or, if degree units have been selected, to [0:360] (see @ref{angles}). The command `unset polar` changes the meaning of the plot back to the default rectangular coordinate system. The `set polar` command is not supported for `splot`s. See the @ref{mapping} command for similar functionality for `splot`s. While in polar coordinates the meaning of an expression in t is really r = f(t), where t is an angle of rotation. The trange controls the domain (the angle) of the function. The r, x and y ranges control the extent of the graph in the x and y directions. Each of these ranges, as well as the rrange, may be autoscaled or set explicitly. For details, see @ref{rrange} and @ref{xrange}. Example: @example set polar plot t*sin(t) set trange [-2*pi:2*pi] set rrange [0:3] plot t*sin(t) @end example The first `plot` uses the default polar angular domain of 0 to 2*pi. The radius and the size of the graph are scaled automatically. The second `plot` expands the domain, and restricts the size of the graph to the area within 3 units of the origin. This has the effect of limiting x and y to [-3:3]. You may want to `set size square` to have `gnuplot` try to make the aspect ratio equal to unity, so that circles look circular. See also @uref{http://www.gnuplot.info/demo/polar.html,polar demos (polar.dem) } and @uref{http://www.gnuplot.info/demo/poldat.html,polar data plot (poldat.dem). } @node print_, psdir, polar_, set-show @subsection print @c ?commands set print @c ?commands show print @c ?set print @c ?show print The @ref{print} command redirects the output of the @ref{print} command to a file. Syntax: @example set print set print "-" set print "<filename>" set print "<filename>" append set print "|<shell_command>" @end example Without "<filename>", the output file is restored to <STDERR>. The <filename> "-" means <STDOUT>. The `append` flag causes the file to be opened in append mode. A <filename> starting with "|" is opened as a pipe to the <shell_command> on platforms that support piping. @node psdir, raxis, print_, set-show @subsection psdir @c ?commands set psdir @c ?commands show psdir @c ?set psdir @c ?show psdir @cindex psdir @opindex psdir The `set psdir <directory>` command controls the search path used by the postscript terminal to find prologue.ps and character encoding files. You can use this mechanism to switch between different sets of locally-customized prolog files. The search order is @example 1) The directory specified by @ref{psdir}, if any 2) The directory specified by environmental variable GNUPLOT_PS_DIR 3) A built-in header or one from the default system directory 4) Directories set by @ref{loadpath} @end example @node raxis, rmargin, psdir, set-show @subsection raxis @c ?commands set raxis @cindex raxis @opindex raxis The commands @ref{raxis} and @ref{raxis} toggle whether the polar axis is drawn separately from grid lines and the x axis. If the minimum of the current rrange is non-zero (and not autoscaled), then a white circle is drawn at the center of the polar plot to indicate that the plot lines and axes do not reach 0. The axis line is drawn using the same line type as the plot border. See `polar`, @ref{rrange}, @ref{rtics}, `set grid`. @node rmargin, rrange, raxis, set-show @subsection rmargin @c ?commands set rmargin @c ?set rmargin @cindex rmargin @opindex rmargin The command @ref{rmargin} sets the size of the right margin. Please see @ref{margin} for details. @node rrange, rtics, rmargin, set-show @subsection rrange @c ?commands set rrange @c ?commands show rrange @c ?set rrange @c ?show rrange @cindex rrange @opindex rrange The @ref{rrange} command sets the range of the radial coordinate for a graph in polar mode. This has the effect of setting both xrange and yrange as well. The resulting xrange and yrange are both [-(rmax-rmin) : +(rmax-rmin)]. However if you later change the x or y range, for example by zooming, this does not change rrange, so data points continue to be clipped against rrange. Autoscaling of rmin always results in rmin = 0. @node rtics, samples, rrange, set-show @subsection rtics @c ?commands set rtics @c ?commands show rtics @c ?set rtics @c ?show rtics @cindex rtics @opindex rtics The @ref{rtics} command places tics along the polar axis. These will only be shown in polar plot mode. The tics and labels are drawn to the right of the origin. The `mirror` keyword causes them to be drawn also to the left of the origin. See `polar`, and see `set xtics` for discussion of other keywords. @node samples, size, rtics, set-show @subsection samples @c ?commands set samples @c ?commands show samples @c ?set samples @c ?show samples @cindex samples @opindex samples The sampling rate of functions, or for interpolating data, may be changed by the @ref{samples} command. Syntax: @example set samples <samples_1> @{,<samples_2>@} show samples @end example By default, sampling is set to 100 points. A higher sampling rate will produce more accurate plots, but will take longer. This parameter has no effect on data file plotting unless one of the interpolation/approximation options is used. See @ref{smooth} re 2D data and @ref{cntrparam} and @ref{dgrid3d} re 3D data. When a 2D graph is being done, only the value of <samples_1> is relevant. When a surface plot is being done without the removal of hidden lines, the value of samples specifies the number of samples that are to be evaluated for the isolines. Each iso-v line will have <sample_1> samples and each iso-u line will have <sample_2> samples. If you only specify <samples_1>, <samples_2> will be set to the same value as <samples_1>. See also @ref{isosamples}. @node size, style, samples, set-show @subsection size @c ?commands set size @c ?commands show size @c ?set size @c ?show size @cindex size @opindex size @c ?aspect ratio @c ?set size square @c ?set size ratio @cindex ratio Syntax: @example set size @{@{no@}square | ratio <r> | noratio@} @{<xscale>,<yscale>@} show size @end example The <xscale> and <yscale> values are scale factors for the size of the plot, which includes the graph, labels, and margins. Important note: @example In earlier versions of gnuplot, some terminal types used the values from @ref{size} to control also the size of the output canvas; others did not. In version 4.6 almost all terminals now follow the following convention: @end example `set term <terminal_type> size <XX>, <YY>` controls the size of the output file, or `canvas`. Please see individual terminal documentation for allowed values of the size parameters. By default, the plot will fill this canvas. `set size <XX>, <YY>` scales the plot itself relative to the size of the canvas. Scale values less than 1 will cause the plot to not fill the entire canvas. Scale values larger than 1 will cause only a portion of the plot to fit on the canvas. Please be aware that setting scale values larger than 1 may cause problems on some terminal types. `ratio` causes `gnuplot` to try to create a graph with an aspect ratio of <r> (the ratio of the y-axis length to the x-axis length) within the portion of the plot specified by <xscale> and <yscale>. The meaning of a negative value for <r> is different. If <r>=-1, gnuplot tries to set the scales so that the unit has the same length on both the x and y axes. This is equivalent to `set view equal xy`. See `set view equal`. If <r>=-2, the unit on y has twice the length of the unit on x, and so on. The success of `gnuplot` in producing the requested aspect ratio depends on the terminal selected. The graph area will be the largest rectangle of aspect ratio <r> that will fit into the specified portion of the output (leaving adequate margins, of course). `square` is a synonym for `ratio 1`. Both `noratio` and `nosquare` return the graph to the default aspect ratio of the terminal, but do not return <xscale> or <yscale> to their default values (1.0). `ratio` and `square` have no effect on 3D plots, but do affect 3D projections created using `set view map`. See also `set view equal`, which forces the x and y axes of a 3D onto the same scale. Examples: To set the size so that the plot fills the available canvas: @example set size 1,1 @end example To make the graph half size and square use: @example set size square 0.5,0.5 @end example To make the graph twice as high as wide use: @example set size ratio 2 @end example @node style, surface, size, set-show @subsection style @c ?set style @c ?show style @c ?unset style Default plotting styles are chosen with the `set style data` and `set style function` commands. See @ref{with} for information about how to override the default plotting style for individual functions and data sets. See `plotting styles` for a complete list of styles. Syntax: @example set style function <style> set style data <style> show style function show style data @end example Default styles for specific plotting elements may also be set. Syntax: @example set style arrow <n> <arrowstyle> set style fill <fillstyle> set style histogram <histogram style options> set style line <n> <linestyle> @end example If `gnuplot` was built with the support of objects, then the following options are also available: Syntax: @example set style rectangle <object options> <linestyle> <fillstyle> set style circle radius <size> set style ellipse size <size> units @{xy|xx|yy@} @end example @menu * set_style_arrow:: * boxplot_:: * set_style_data:: * set_style_fill:: * set_style_function:: * set_style_increment:: * set_style_line:: * set_style_circle:: * set_style_rectangle:: * set_style_ellipse:: @end menu @node set_style_arrow, boxplot_, style, style @subsubsection set style arrow @c ?commands set style arrow @c ?commands unset style arrow @c ?commands show style arrow @c ?set style arrow @c ?unset style arrow @c ?show style arrow @cindex arrowstyle Each terminal has a default set of arrow and point types, which can be seen by using the command @ref{test}. @ref{arrow} defines a set of arrow types and widths and point types and sizes so that you can refer to them later by an index instead of repeating all the information at each invocation. Syntax: @example set style arrow <index> default set style arrow <index> @{nohead | head | heads@} @{size <length>,<angle>@{,<backangle>@}@} @{filled | empty | nofilled@} @{front | back@} @{ @{linestyle | ls <line_style>@} | @{linetype | lt <line_type>@} @{linewidth | lw <line_width@} @} unset style arrow show style arrow @end example <index> is an integer that identifies the arrowstyle. If `default` is given all arrow style parameters are set to their default values. If the linestyle <index> already exists, only the given parameters are changed while all others are preserved. If not, all undefined values are set to the default values. Specifying `nohead` produces arrows drawn without a head---a line segment. This gives you yet another way to draw a line segment on the plot. By default, arrows have one head. Specifying `heads` draws arrow heads on both ends of the line. Head size can be controlled by `size <length>,<angle>` or `size <length>,<angle>,<backangle>`, where `<length>` defines length of each branch of the arrow head and `<angle>` the angle (in degrees) they make with the arrow. `<Length>` is in x-axis units; this can be changed by `first`, `second`, `graph`, `screen`, or `character` before the <length>; see `coordinates` for details. `<Backangle>` only takes effect when `filled` or `empty` is also used. Then, `<backangle>` is the angle (in degrees) the back branches make with the arrow (in the same direction as `<angle>`). The `fig` terminal has a restricted backangle function. It supports three different angles. There are two thresholds: Below 70 degrees, the arrow head gets an indented back angle. Above 110 degrees, the arrow head has an acute back angle. Between these thresholds, the back line is straight. Specifying `filled` produces filled arrow heads (if heads are used). Filling is supported on filled-polygon capable terminals, see help of @ref{pm3d} for their list, otherwise the arrow heads are closed but not filled. The same result (closed but not filled arrow head) is reached by specifying `empty`. Further, filling and outline is obviously not supported on terminals drawing arrows by their own specific routines, like `metafont`, `metapost`, `latex` or `tgif`. The line style may be selected from a user-defined list of line styles (see `set style line`) or may be defined here by providing values for `<line_type>` (an index from the default list of styles) and/or `<line_width>` (which is a multiplier for the default width). Note, however, that if a user-defined line style has been selected, its properties (type and width) cannot be altered merely by issuing another @ref{arrow} command with the appropriate index and `lt` or `lw`. If `front` is given, the arrows are written on top of the graphed data. If `back` is given (the default), the arrow is written underneath the graphed data. Using `front` will prevent a arrow from being obscured by dense data. Examples: To draw an arrow without an arrow head and double width, use: @example set style arrow 1 nohead lw 2 set arrow arrowstyle 1 @end example See also @ref{arrow} for further examples. @node boxplot_, set_style_data, set_style_arrow, style @subsubsection boxplot @c ?commands set style boxplot @c ?commands unset style boxplot @c ?commands show style boxplot @c ?set style boxplot @c ?unset style boxplot @c ?show style boxplot The @ref{boxplot} command allows you to change the layout of plots created using the @ref{boxplot} plot style. Syntax: @example set style boxplot @{range <r> | fraction <f>@} @{@{no@}outliers@} @{pointtype <p>@} @{candlesticks | financebars@} @{separation <x>@} @{labels off | auto | x | x2@} @{sorted | unsorted@} @end example The box in the boxplot always spans the range of values from the first quartile to the third quartile of the data points. The limit of the whiskers that extend from the box can be controlled in two different ways. By default the whiskers extend from each end of the box for a range equal to 1.5 times the interquartile range (i.e. the vertical height of the box proper). Each whisker is truncated back toward the median so that it terminates at a y value belonging to some point in the data set. Since there may be no point whose value is exactly 1.5 times the interquartile distance, the whisker may be shorter than its nominal range. This default corresponds to @example set style boxplot range 1.5 @end example Alternatively, you can specify the fraction of the total number of points that the whiskers should span. In this case the range is extended symmetrically from the median value until it encompasses the requested fraction of the data set. Here again each whisker is constrained to end at a point in the data set. To span 95% of the points in the set @example set style boxplot fraction 0.95 @end example Any points that lie outside the range of the whiskers are considered outliers. By default these are drawn as individual circles (pointtype 7). The option `nooutliers` disables this. By default boxplots are drawn in a style similar to candlesticks, but you have the option of using instead a style similar to finance bars. If the using specification for a boxplot contains a fourth column, the values in that column will be interpreted as the discrete leveles of a factor variable. In this case more than one boxplots may be drawn, as many as the number of levels of the factor variable. These boxplots will be drawn next to each other, the distance between them is 1.0 by default (in x-axis units). This distance can be changed by the option `separation`. The @ref{labels} option governs how and where these boxplots (each representing a part of the dataset) are labeled. By default the value of the factor is put as a tick label on the horizontal axis -- x or x2, depending on which one is used for the plot itself. This setting corresponds to option `labels auto`. The labels can be forced to use either of the x or x2 axes -- options `labels x` and `labels x2`, respectively --, or they can be turned off altogether with the option `labels off`. By default the boxplots corresponding to different levels of the factor variable are not sorted; they will be drawn in the same order the levels are encountered in the data file. This behavior corresponds to the `unsorted` option. If the `sorted` option is active, the levels are first sorted alphabetically, and the boxplots are drawn in the sorted order. The `separation`, @ref{labels}, `sorted` and `unsorted` option only have an effect if a fourth column is given the plot specification. See @ref{boxplot}, @ref{candlesticks}, @ref{financebars}. @node set_style_data, set_style_fill, boxplot_, style @subsubsection set style data @c ?commands set style data @c ?commands show style data @c ?set style data @c ?show style data @c ?data style The `set style data` command changes the default plotting style for data plots. Syntax: @example set style data <plotting-style> show style data @end example See `plotting styles` for the choices. If no choice is given, the choices are listed. `show style data` shows the current default data plotting style. @node set_style_fill, set_style_function, set_style_data, style @subsubsection set style fill @c ?commands set style fill @c ?commands show style fill @c ?set style fill @c ?show style fill @cindex fillstyle The `set style fill` command is used to set the default style of the plot elements in plots with boxes, histograms, candlesticks and filledcurves. This default can be superseded by fillstyles attached to individual plots. See also 'set style rectangle'. Syntax: @example set style fill @{empty | @{transparent@} solid @{<density>@} | @{transparent@} pattern @{<n>@}@} @{border @{lt@} @{lc <colorspec>@} | noborder@} @end example The default fillstyle is `empty`. The `solid` option causes filling with a solid color, if the terminal supports that. The <density> parameter specifies the intensity of the fill color. At a <density> of 0.0, the box is empty, at <density> of 1.0, the inner area is of the same color as the current linetype. Some terminal types can vary the density continuously; others implement only a few levels of partial fill. If no <density> parameter is given, it defaults to 1. The `pattern` option causes filling to be done with a fill pattern supplied by the terminal driver. The kind and number of available fill patterns depend on the terminal driver. If multiple datasets using filled boxes are plotted, the pattern cycles through all available pattern types, starting from pattern <n>, much as the line type cycles for multiple line plots. The `empty` option causes filled boxes not to be filled. This is the default. By default, @ref{border}, the box is bounded by a solid line of the current linetype. `border <colorspec>` allows you to change the color of the border. `noborder` specifies that no bounding lines are drawn. @noindent --- SET STYLE FILL TRANSPARENT --- @c ?commands set style fill transparent @c ?set style fill transparent @c ?fillstyle transparent @cindex transparent Some terminals support the attribute `transparent` for filled areas. In the case of transparent solid fill areas, the `density` parameter is interpreted as an alpha value; that is, density 0 is fully transparent, density 1 is fully opaque. In the case of transparent pattern fill, the background of the pattern is either fully transparent or fully opaque. @example terminal solid pattern pm3d -------------------------------- gif no yes no jpeg yes no yes pdf yes yes yes png TrueColor index yes post no yes no svg yes no yes win yes yes yes wxt yes yes yes x11 no yes no @end example @c ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> @c ^<colgroup> @c ^ <col align="center"> @c ^ <col align="center"> @c ^ <col align="center"> @c ^ <col align="center"> @c ^</colgroup> @c ^<thead> @c ^<tr> <th>Terminal</th> <th>solid</th> <th>pattern</th> <th>pm3d</th></tr> @c ^</thead> @c ^<tbody> @c ^<tr> <td>gif</td> <td>no</td> <td>yes</td> <td>no</td></tr> @c ^<tr> <td>jpeg</td> <td>yes</td> <td>no</td> <td>yes</td></tr> @c ^<tr> <td>pdf</td> <td>yes</td> <td>yes</td> <td>yes</td></tr> @c ^<tr> <td>png</td> <td>TrueColor</td> <td>index</td> <td>yes</td></tr> @c ^<tr> <td>post</td> <td>no</td> <td>yes</td> <td>no</td></tr> @c ^<tr> <td>svg</td> <td>yes</td> <td>yes</td> <td>yes</td></tr> @c ^<tr> <td>win</td> <td>yes</td> <td>yes</td> <td>yes</td></tr> @c ^<tr> <td>wxt</td> <td>yes</td> <td>yes</td> <td>yes</td></tr> @c ^<tr> <td>x11</td> <td>no</td> <td>yes</td> <td>no</td></tr> @c ^</tbody> @c ^</table> Note that there may be additional limitations on the creation or viewing of graphs containing transparent fill areas. For example, the png terminal can only use transparent fill if the "truecolor" option is set. Some pdf viewers may not correctly display the fill areas even if they are correctly described in the pdf file. Ghostscript/gv does not correctly display pattern-fill areas even though actual PostScript printers generally have no problem. @node set_style_function, set_style_increment, set_style_fill, style @subsubsection set style function @c ?commands set style function @c ?commands show style function @c ?set style function @c ?show style function The `set style function` command changes the default plotting style for function plots (e.g. lines, points, filledcurves). See `plotting styles`. Syntax: @example set style function <plotting-style> show style function @end example @node set_style_increment, set_style_line, set_style_function, style @subsubsection set style increment @c ?commands set style increment @c ?commands show style increment @c ?set style increment @c ?show style increment `Note`: This command has been deprecated. Instead please use the newer command `set linetype`, which redefines the linetypes themselves rather than searching for a suitable temporary line style to substitute. See `set linetype` Syntax: @example set style increment @{default|userstyles@} show style increment @end example By default, successive plots within the same graph will use successive linetypes from the default set for the current terminal type. However, choosing `set style increment user` allows you to step through the user-defined line styles rather than through the default linetypes. Example: @example set style line 1 lw 2 lc rgb "gold" set style line 2 lw 2 lc rgb "purple" set style line 4 lw 1 lc rgb "sea-green" set style increment user @end example @example plot f1(x), f2(x), f3(x), f4(x) @end example should plot functions f1, f2, f4 in your 3 newly defined line styles. If a user-defined line style is not found then the corresponding default linetype is used instead. E.g. in the example above, f3(x) will be plotted using the default linetype 3. @node set_style_line, set_style_circle, set_style_increment, style @subsubsection set style line @c ?commands set style line @c ?commands unset style line @c ?commands show style line @c ?set style line @c ?unset style line @c ?show style line @cindex linestyle @cindex linewidth @cindex linewidth @cindex interval @cindex linespoints @cindex pointinterval Each terminal has a default set of line and point types, which can be seen by using the command @ref{test}. `set style line` defines a set of line types and widths and point types and sizes so that you can refer to them later by an index instead of repeating all the information at each invocation. Syntax: @example set style line <index> default set style line <index> @{@{linetype | lt@} <line_type> | <colorspec>@} @{@{linecolor | lc@} <colorspec>@} @{@{linewidth | lw@} <line_width>@} @{@{pointtype | pt@} <point_type>@} @{@{pointsize | ps@} <point_size>@} @{@{pointinterval | pi@} <interval>@} @{palette@} unset style line show style line @end example `default` sets all line style parameters to those of the linetype with that same index. If the linestyle <index> already exists, only the given parameters are changed while all others are preserved. If not, all undefined values are set to the default values. Line styles created by this mechanism do not replace the default linetype styles; both may be used. Line styles are temporary. They are lost whenever you execute a @ref{reset} command. To redefine the linetype itself, please see `set linetype`. The line and point types default to the index value. The exact symbol that is drawn for that index value may vary from one terminal type to another. The line width and point size are multipliers for the current terminal's default width and size (but note that <point_size> here is unaffected by the multiplier given by the command@ref{pointsize}). The `pointinterval` controls the spacing between points in a plot drawn with style @ref{linespoints}. The default is 0 (every point is drawn). For example, `set style line N pi 3` defines a linestyle that uses pointtype N, pointsize and linewidth equal to the current defaults for the terminal, and will draw every 3rd point in plots using @ref{linespoints}. A negative value for the interval is treated the same as a positive value, except that some terminals will try to interrupt the line where it passes through the point symbol. Not all terminals support the `linewidth` and @ref{pointsize} features; if not supported, the option will be ignored. Terminal-independent colors may be assigned using either `linecolor <colorspec>` or `linetype <colorspec>`, abbreviated `lc` or `lt`. This requires giving a RGB color triple, a known palette color name, a fractional index into the current palette, or a constant value from the current mapping of the palette onto cbrange. See `colors`, @ref{colorspec}, @ref{palette}, @ref{colornames}, @ref{cbrange}. `set style line <n> linetype <lt>` will set both a terminal-dependent dot/dash pattern and color. The commands`set style line <n> linecolor <colorspec>` or `set style line <n> linetype <colorspec>` will set a new line color while leaving the existing dot-dash pattern unchanged. In 3d mode (`splot` command), the special keyword @ref{palette} is allowed as a shorthand for "linetype palette z". The color value corresponds to the z-value (elevation) of the splot, and varies smoothly along a line or surface. Examples: Suppose that the default lines for indices 1, 2, and 3 are red, green, and blue, respectively, and the default point shapes for the same indices are a square, a cross, and a triangle, respectively. Then @example set style line 1 lt 2 lw 2 pt 3 ps 0.5 @end example defines a new linestyle that is green and twice the default width and a new pointstyle that is a half-sized triangle. The commands @example set style function lines plot f(x) lt 3, g(x) ls 1 @end example will create a plot of f(x) using the default blue line and a plot of g(x) using the user-defined wide green line. Similarly the commands @example set style function linespoints plot p(x) lt 1 pt 3, q(x) ls 1 @end example will create a plot of p(x) using the default triangles connected by a red line and q(x) using small triangles connected by a green line. @example splot sin(sqrt(x*x+y*y))/sqrt(x*x+y*y) w l pal @end example creates a surface plot using smooth colors according to @ref{palette}. Note, that this works only on some terminals. See also @ref{palette}, @ref{pm3d}. @example set style line 10 linetype 1 linecolor rgb "cyan" @end example will assign linestyle 10 to be a solid cyan line on any terminal that supports rgb colors. @node set_style_circle, set_style_rectangle, set_style_line, style @subsubsection set style circle @c ?commands set style circle @c ?commands unset style circle @c ?commands show style circle @c ?set style circle @c ?unset style circle @c ?show style circle Syntax: @example set style circle @{radius @{graph|screen@} <R>@} @end example This command sets the default radius used in plot style "with circles". It applies to data plots with only 2 columns of data (x,y) and to function plots. The default is "set style circle radius graph 0.02". @node set_style_rectangle, set_style_ellipse, set_style_circle, style @subsubsection set style rectangle @c ?commands set style rectangle @c ?commands unset style rectangle @c ?commands show style rectangle @c ?set style rectangle @c ?unset style rectangle @c ?show style rectangle Rectangles defined with the @ref{object} command can have individual styles. However, if the object is not assigned a private style then it inherits a default that is taken from the @ref{rectangle} command. Syntax: @example set style rectangle @{front|back@} @{lw|linewidth <lw>@} @{fillcolor <colorspec>@} @{fs <fillstyle>@} @end example See @ref{colorspec} and `fillstyle`. `fillcolor` may be abbreviated as `fc`. Examples: @example set style rectangle back fc rgb "white" fs solid 1.0 border lt -1 set style rectangle fc linsestyle 3 fs pattern 2 noborder @end example The default values correspond to solid fill with the background color and a black border. @node set_style_ellipse, , set_style_rectangle, style @subsubsection set style ellipse @c ?commands set style ellipse @c ?commands show style ellipse @c ?set style ellipse @c ?unset style ellipse @c ?show style ellipse Syntax: @example set style ellipse @{units xx|xy|yy@} @{size @{graph|screen@} <a>, @{@{graph|screen@} <b>@}@} @{angle <angle>@} @end example This command governs whether the diameters of ellipses are interpreted in the same units or not. Default is `xy`, which means that the major diameter (first axis) of ellipses will be interpreted in the same units as the x (or x2) axis, while the minor (second) diameter in those of the y (or y2) axis. In this mode the ratio of the ellipse axes depends on the scales of the plot axes and aspect ratio of the plot. When set to `xx` or `yy`, both axes of all ellipses will be interpreted in the same units. This means that the ratio of the axes of the plotted ellipses will be correct even after rotation, but either their vertical or horizontal extent will not be correct. This is a global setting that affects all ellipses, both those defined as objects and those generated with the `plot` command, however, the value of `units` can also be redefined on a per-plot and per-object basis. It is also possible to set a default size for ellipses with the @ref{size} keyword. This default size applies to data plots with only 2 columns of data (x,y) and to function plots. The two values are interpreted as the major and minor diameters (as opposed to semi-major and semi-minor axes) of the ellipse. The default is "set style ellipse size graph 0.05,0.03". Last, but not least it is possible to set the default orientation with the `angle` keyword. The orientation, which is defined as the angle between the major axis of the ellipse and the plot's x axis, must be given in degrees. For defining ellipse objects, see `set object ellipse`; for the 2D plot style, see @ref{ellipses}. @node surface, table, style, set-show @subsection surface @c ?commands set surface @c ?commands unset surface @c ?commands show surface @c ?set surface @c ?unset surface @c ?show surface @cindex surface @opindex surface @cindex nosurface The command @ref{surface} controls the display of surfaces by `splot`. Syntax: @example set surface unset surface show surface @end example The surface is drawn with the style specified by @ref{with}, or else the appropriate style, data or function. @ref{surface} will cause `splot` to not draw points or lines corresponding to any of the function or data file points. If you want to turn off the surface for an individual function or data file while leaving the others active, use the `nosurface` keyword in the `splot` command. Contours may still be drawn on the surface, depending on the @ref{contour} option. The combination `unset surface; set contour base` is useful for displaying contours on the grid base. See also @ref{contour}. @node table, terminal, surface, set-show @subsection table @c ?commands set table @c ?set table @cindex table @opindex table When @ref{table} mode is enabled, `plot` and `splot` commands print out a multicolumn ASCII table of X Y @{Z@} R values rather than creating an actual plot on the current terminal. The character R takes on one of three values: "i" if the point is in the active range, "o" if it is out-of-range, or "u" if it is undefined. The data format is determined by the format of the axis labels (see `set format`), and the columns are separated by single spaces. This can be useful if you want to generate contours and then save them for further use, perhaps for plotting with `plot`; see @ref{contour} for example. The same method can be used to save interpolated data (see @ref{samples} and @ref{dgrid3d}). Syntax: @example set table @{"outfile"@} plot <whatever> unset table @end example Tabular output is written to the named file, if any, otherwise it is written to the current value of @ref{output}. You must explicitly @ref{table} in order to go back to normal plotting on the current terminal. @node terminal, termoption, table, set-show @subsection terminal @c ?commands set terminal @c ?commands show terminal @c ?set terminal @c ?set term @c ?show terminal @c ?show term @c ?set terminal push @c ?set term push @c ?terminal push @c ?term push @cindex push @c ?set terminal pop @c ?set term pop @c ?terminal pop @c ?term pop @cindex pop `gnuplot` supports many different graphics devices. Use @ref{terminal} to tell `gnuplot` what kind of output to generate. Use @ref{output} to redirect that output to a file or device. Syntax: @example set terminal @{<terminal-type> | push | pop@} show terminal @end example If <terminal-type> is omitted, `gnuplot` will list the available terminal types. <terminal-type> may be abbreviated. If both @ref{terminal} and @ref{output} are used together, it is safest to give @ref{terminal} first, because some terminals set a flag which is needed in some operating systems. Some terminals have many additional options. The options used by a previous invocation `set term <term> <options>` of a given `<term>` are remembered, thus subsequent `set term <term>` does not reset them. This helps in printing, for instance, when switching among different terminals---previous options don't have to be repeated. The command `set term push` remembers the current terminal including its settings while `set term pop` restores it. This is equivalent to `save term` and `load term`, but without accessing the filesystem. Therefore they can be used to achieve platform independent restoring of the terminal after printing, for instance. After gnuplot's startup, the default terminal or that from `startup` file is pushed automatically. Therefore portable scripts can rely that `set term pop` restores the default terminal on a given platform unless another terminal has been pushed explicitly. For more information, see the `complete list of terminals`. @node termoption, tics, terminal, set-show @subsection termoption @c ?commands set termoption @c ?set termoption @cindex termoption @opindex termoption The @ref{termoption} command allows you to change the behaviour of the current terminal without requiring a new @ref{terminal} command. Only one option can be changed per command, and only a small number of options can be changed this way. Currently the only options accepted are @example set termoption @{no@}enhanced set termoption font "<fontname>@{,<fontsize>@}" set termoption fontscale <scale> set termoption @{solid|dashed@} set termoption @{linewidth <lw>@}@{lw <lw>@} @end example @node tics, ticslevel, termoption, set-show @subsection tics @c ?commands set tics @c ?commands unset tics @c ?commands show tics @c ?set tics @c ?unset tics @c ?show tics @cindex tics @opindex tics Control of the major (labelled) tics on all axes at once is possible with the `set tics` command. Fine control of the major (labelled) tics on all axes at once is possible with the `set tics` command. The tics may be turned off with the `unset tics` command, and may be turned on (the default state) with `set tics`. Similar commands (by preceding 'tics' by the axis name) control the major tics on a single axis. Syntax: @example set tics @{axis | border@} @{@{no@}mirror@} @{in | out@} @{scale @{default | <major> @{,<minor>@}@}@} @{@{no@}rotate @{by <ang>@}@} @{offset <offset> | nooffset@} @{left | right | center | autojustify@} @{ format "formatstring" @} @{ font "name@{,<size>@}" @} @{ textcolor <colorspec> @} set tics @{front | back@} unset tics show tics @end example The options in the first set above can be applied individually to any or all axes, i.e., x, y, z, x2, y2, and cb. Set tics `front` or `back` applies to all axes at once, but only for 2D plots (not splot). It controls whether the tics are placed behind or in front of the plot elements, in the case that there is overlap. `axis` or @ref{border} tells `gnuplot` to put the tics (both the tics themselves and the accompanying labels) along the axis or the border, respectively. If the axis is very close to the border, the `axis` option will move the tic labels to outside the border in case the border is printed (see @ref{border}). The relevant margin settings will usually be sized badly by the automatic layout algorithm in this case. `mirror` tells `gnuplot` to put unlabelled tics at the same positions on the opposite border. `nomirror` does what you think it does. `in` and `out` change the tic marks to be drawn inwards or outwards. With `scale`, the size of the tic marks can be adjusted. If <minor> is not specified, it is 0.5*<major>. The default size 1.0 for major tics and 0.5 for minor tics is requested by `scale default`. `rotate` asks `gnuplot` to rotate the text through 90 degrees, which will be done if the terminal driver in use supports text rotation. `norotate` cancels this. `rotate by <ang>` asks for rotation by <ang> degrees, supported by some terminal types. The defaults are `border mirror norotate` for tics on the x and y axes, and `border nomirror norotate` for tics on the x2 and y2 axes. For the z axis, the default is `nomirror`. The <offset> is specified by either x,y or x,y,z, and may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. <offset> is the offset of the tics texts from their default positions, while the default coordinate system is `character`. See `coordinates` for details. `nooffset` switches off the offset. By default, tic labels are justified automatically depending on the axis and rotation angle to produce aesthetically pleasing results. If this is not desired, justification can be overridden with an explicit `left`, `right` or `center` keyword. `autojustify` restores the default behavior. `set tics` with no options restores to place tics inwards. Every other options are retained. See also `set xtics` for more control of major (labelled) tic marks and @ref{mxtics} for control of minor tic marks. These commands provide control at a axis by axis basis. @node ticslevel, ticscale, tics, set-show @subsection ticslevel @c ?commands set ticslevel @c ?commands show ticslevel @c ?set ticslevel @c ?show ticslevel @cindex ticslevel @opindex ticslevel Deprecated. See @ref{xyplane}. @node ticscale, timestamp, ticslevel, set-show @subsection ticscale @c ?commands set ticscale @c ?commands show ticscale @c ?set ticscale @c ?show ticscale @cindex ticscale @opindex ticscale The @ref{ticscale} command is deprecated, use `set tics scale` instead. @node timestamp, timefmt, ticscale, set-show @subsection timestamp @c ?commands set timestamp @c ?commands unset timestamp @c ?commands show timestamp @c ?set timestamp @c ?unset timestamp @c ?show timestamp @cindex timestamp @opindex timestamp @cindex notimestamp The command @ref{timestamp} places the time and date of the plot in the left margin. Syntax: @example set timestamp @{"<format>"@} @{top|bottom@} @{@{no@}rotate@} @{offset <xoff>@{,<yoff>@}@} @{font "<fontspec>"@} unset timestamp show timestamp @end example The format string allows you to choose the format used to write the date and time. Its default value is what asctime() uses: "%a %b %d %H:%M:%S %Y" (weekday, month name, day of the month, hours, minutes, seconds, four-digit year). With `top` or `bottom` you can place the timestamp at the top or bottom of the left margin (default: bottom). `rotate` lets you write the timestamp vertically, if your terminal supports vertical text. The constants <xoff> and <yoff> are offsets that let you adjust the position more finely. <font> is used to specify the font with which the time is to be written. The abbreviation `time` may be used in place of @ref{timestamp}. Example: @example set timestamp "%d/%m/%y %H:%M" offset 80,-2 font "Helvetica" @end example See @ref{timefmt} for more information about time format strings. @node timefmt, title_, timestamp, set-show @subsection timefmt @c ?commands set timefmt @c ?commands show timefmt @c ?set timefmt @c ?show timefmt @cindex timefmt @opindex timefmt This command applies to timeseries where data are composed of dates/times. It has no meaning unless the command `set xdata time` is given also. Syntax: @example set timefmt "<format string>" show timefmt @end example The string argument tells `gnuplot` how to read timedata from the datafile. The valid formats are: @example Format Explanation %d day of the month, 1--31 %m month of the year, 1--12 %y year, 0--99 %Y year, 4-digit %j day of the year, 1--365 %H hour, 0--24 %M minute, 0--60 %s seconds since the Unix epoch (1970-01-01, 00:00 UTC) %S second, integer 0--60 on output, (double) on input %b three-character abbreviation of the name of the month %B name of the month @end example @c ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> @c ^<colgroup> @c ^ <col align="center"> @c ^ <col align="left"> @c ^</colgroup> @c ^<thead> @c ^<tr> <th>Format</th> <th>Explanation</th></tr> @c ^</thead> @c ^<tbody> @c ^<tr> <td><tt>%d</tt></td> <td>day of the month, 1–31</td></tr> @c ^<tr> <td><tt>%m</tt></td> <td>month of the year, 1–12</td></tr> @c ^<tr> <td><tt>%y</tt></td> <td>year, 0–99</td></tr> @c ^<tr> <td><tt>%Y</tt></td> <td>year, 4-digit</td></tr> @c ^<tr> <td><tt>%j</tt></td> <td>day of the year, 1–365</td></tr> @c ^<tr> <td><tt>%H</tt></td> <td>hour, 0–24</td></tr> @c ^<tr> <td><tt>%M</tt></td> <td>minute, 0–60</td></tr> @c ^<tr> <td><tt>%s</tt></td> <td>seconds since the Unix epoch (1970-01-01 00:00 UTC)</td></tr> @c ^<tr> <td><tt>%S</tt></td> <td>second, integer 0–60 on output, (double) on input</td></tr> @c ^<tr> <td><tt>%b</tt></td> <td>three-character abbreviation of the name of the month</td></tr> @c ^<tr> <td><tt>%B</tt></td> <td>name of the month</td></tr> @c ^</tbody> @c ^</table> Any character is allowed in the string, but must match exactly. \t (tab) is recognized. Backslash-octals (\nnn) are converted to char. If there is no separating character between the time/date elements, then %d, %m, %y, %H, %M and %S read two digits each. If a decimal point immediately follows the field read by %S, the decimal and any following digits are interpreted as a fractional second. %Y reads four digits. %j reads three digits. %b requires three characters, and %B requires as many as it needs. Spaces are treated slightly differently. A space in the string stands for zero or more whitespace characters in the file. That is, "%H %M" can be used to read "1220" and "12 20" as well as "12 20". Each set of non-blank characters in the timedata counts as one column in the `using n:n` specification. Thus `11:11 25/12/76 21.0` consists of three columns. To avoid confusion, `gnuplot` requires that you provide a complete @ref{using} specification if your file contains timedata. If the date format includes the day or month in words, the format string must exclude this text. But it can still be printed with the "%a", "%A", "%b", or "%B" specifier. `gnuplot` will determine the proper month and weekday from the numerical values. See `set format` for more details about these and other options for printing time data. When reading two-digit years with %y, values 69-99 refer to the 20th century, while values 00-68 refer to the 21st century. NB: This is in accordance with the UNIX98 spec, but conventions vary widely and two-digit year values are inherently ambiguous. See also @ref{xdata} and `time/date` for more information. Example: @example set timefmt "%d/%m/%Y\t%H:%M" @end example tells `gnuplot` to read date and time separated by tab. (But look closely at your data---what began as a tab may have been converted to spaces somewhere along the line; the format string must match what is actually in the file.) See also @uref{http://www.gnuplot.info/demo/timedat.html,time data demo. } @node title_, tmargin, timefmt, set-show @subsection title @c ?commands set title @c ?commands show title @c ?set title @c ?show title @cindex title @opindex title The @ref{title} command produces a plot title that is centered at the top of the plot. @ref{title} is a special case of `set label`. Syntax: @example set title @{"<title-text>"@} @{offset <offset>@} @{font "<font>@{,<size>@}"@} @{@{textcolor | tc@} @{<colorspec> | default@}@} @{@{no@}enhanced@} show title @end example If <offset> is specified by either x,y or x,y,z the title is moved by the given offset. It may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. See `coordinates` for details. By default, the `character` coordinate system is used. For example, "`set title offset 0,-1`" will change only the y offset of the title, moving the title down by roughly the height of one character. The size of a character depends on both the font and the terminal. <font> is used to specify the font with which the title is to be written; the units of the font <size> depend upon which terminal is used. `textcolor <colorspec>` changes the color of the text. <colorspec> can be a linetype, an rgb color, or a palette mapping. See help for @ref{colorspec} and @ref{palette}. `noenhanced` requests that the title not be processed by the enhanced text mode parser, even if enhanced text mode is currently active. @ref{title} with no parameters clears the title. See `syntax` for details about the processing of backslash sequences and the distinction between single- and double-quotes. @node tmargin, trange, title_, set-show @subsection tmargin @c ?commands set tmargin @c ?set tmargin @cindex tmargin @opindex tmargin The command @ref{tmargin} sets the size of the top margin. Please see @ref{margin} for details. @node trange, urange, tmargin, set-show @subsection trange @c ?commands set trange @c ?commands show trange @c ?set trange @c ?show trange @cindex trange @opindex trange The @ref{trange} command sets the parametric range used to compute x and y values when in parametric or polar modes. Please see @ref{xrange} for details. @node urange, variables, trange, set-show @subsection urange @c ?commands set urange @c ?commands show urange @c ?set urange @c ?show urange @cindex urange @opindex urange The @ref{urange} and @ref{vrange} commands set the parametric ranges used to compute x, y, and z values when in `splot` parametric mode. Please see @ref{xrange} for details. @node variables, version, urange, set-show @subsection variables @c ?commands show variables @c ?show variables all @c ?show variables The @ref{variables} command lists the current value of user-defined and internal variables. Gnuplot internally defines variables whose names begin with GPVAL_, MOUSE_, FIT_, and TERM_. Syntax: @example show variables # show variables that do not begin with GPVAL_ show variables all # show all variables including those beginning GPVAL_ show variables NAME # show only variables beginning with NAME @end example @node version, view, variables, set-show @subsection version @c ?show version The @ref{version} command lists the version of gnuplot being run, its last modification date, the copyright holders, and email addresses for the FAQ, the gnuplot-info mailing list, and reporting bugs--in short, the information listed on the screen when the program is invoked interactively. Syntax: @example show version @{long@} @end example When the `long` option is given, it also lists the operating system, the compilation options used when `gnuplot` was installed, the location of the help file, and (again) the useful email addresses. @node view, vrange, version, set-show @subsection view @c ?commands set view @c ?commands show view @c ?set view @c ?set view map @c ?show view @cindex view @opindex view The @ref{view} command sets the viewing angle for `splot`s. It controls how the 3D coordinates of the plot are mapped into the 2D screen space. It provides controls for both rotation and scaling of the plotted data, but supports orthographic projections only. It supports both 3D projection or orthogonal 2D projection into a 2D plot-like map. Syntax: @example set view <rot_x>@{,@{<rot_z>@}@{,@{<scale>@}@{,<scale_z>@}@}@} set view map set view @{no@}equal @{xy|xyz@} show view @end example where <rot_x> and <rot_z> control the rotation angles (in degrees) in a virtual 3D coordinate system aligned with the screen such that initially (that is, before the rotations are performed) the screen horizontal axis is x, screen vertical axis is y, and the axis perpendicular to the screen is z. The first rotation applied is <rot_x> around the x axis. The second rotation applied is <rot_z> around the new z axis. Command `set view map` is used to represent the drawing as a map. It can be used for @ref{contour} plots, or for color @ref{pm3d} maps. In the latter, take care that you properly use @ref{zrange} and @ref{cbrange} for input data point filtering and color range scaling, respectively. <rot_x> is bounded to the [0:180] range with a default of 60 degrees, while <rot_z> is bounded to the [0:360] range with a default of 30 degrees. <scale> controls the scaling of the entire `splot`, while <scale_z> scales the z axis only. Both scales default to 1.0. Examples: @example set view 60, 30, 1, 1 set view ,,0.5 @end example The first sets all the four default values. The second changes only scale, to 0.5. @menu * equal_axes:: @end menu @node equal_axes, , view, view @subsubsection equal_axes @c ?set view equal_axes @c ?set view equal @c ?view equal_axes @c ?view equal @cindex equal_axes The command `set view equal xy` forces the unit length of the x and y axes to be on the same scale, and chooses that scale so that the plot will fit on the page. The command `set view equal xyz` additionally sets the z axis scale to match the x and y axes; however there is no guarantee that the current z axis range will fit within the plot boundary. By default all three axes are scaled independently to fill the available area. See also @ref{xyplane}. @node vrange, x2data, view, set-show @subsection vrange @c ?commands set vrange @c ?commands show vrange @c ?set vrange @c ?show vrange @cindex vrange @opindex vrange The @ref{urange} and @ref{vrange} commands set the parametric ranges used to compute x, y, and z values when in `splot` parametric mode. Please see @ref{xrange} for details. @node x2data, x2dtics, vrange, set-show @subsection x2data @c ?commands set x2data @c ?commands show x2data @c ?set x2data @c ?show x2data @cindex x2data @opindex x2data The @ref{x2data} command sets data on the x2 (top) axis to timeseries (dates/times). Please see @ref{xdata}. @node x2dtics, x2label, x2data, set-show @subsection x2dtics @c ?commands set x2dtics @c ?commands unset x2dtics @c ?commands show x2dtics @c ?set x2dtics @c ?unset x2dtics @c ?show x2dtics @cindex x2dtics @opindex x2dtics @cindex nox2dtics The @ref{x2dtics} command changes tics on the x2 (top) axis to days of the week. Please see @ref{xdtics} for details. @node x2label, x2mtics, x2dtics, set-show @subsection x2label @c ?commands set x2label @c ?commands show x2label @c ?set x2label @c ?show x2label @cindex x2label @opindex x2label The @ref{x2label} command sets the label for the x2 (top) axis. Please see @ref{xlabel}. @node x2mtics, x2range, x2label, set-show @subsection x2mtics @c ?commands set x2mtics @c ?commands unset x2mtics @c ?commands show x2mtics @c ?set x2mtics @c ?unset x2mtics @c ?show x2mtics @cindex x2mtics @opindex x2mtics @cindex nox2mtics The @ref{x2mtics} command changes tics on the x2 (top) axis to months of the year. Please see @ref{xmtics} for details. @node x2range, x2tics, x2mtics, set-show @subsection x2range @c ?commands set x2range @c ?commands show x2range @c ?set x2range @c ?show x2range @cindex x2range @opindex x2range The @ref{x2range} command sets the horizontal range that will be displayed on the x2 (top) axis. Please see @ref{xrange} for details. @node x2tics, x2zeroaxis, x2range, set-show @subsection x2tics @c ?commands set x2tics @c ?commands unset x2tics @c ?commands show x2tics @c ?set x2tics @c ?unset x2tics @c ?show x2tics @cindex x2tics @opindex x2tics @cindex nox2tics The @ref{x2tics} command controls major (labelled) tics on the x2 (top) axis. Please see `set xtics` for details. @node x2zeroaxis, xdata, x2tics, set-show @subsection x2zeroaxis @c ?commands set x2zeroaxis @c ?commands unset x2zeroaxis @c ?commands show x2zeroaxis @c ?set x2zeroaxis @c ?unset x2zeroaxis @c ?show x2zeroaxis @cindex x2zeroaxis @opindex x2zeroaxis @cindex nox2zeroaxis The @ref{x2zeroaxis} command draws a line at the origin of the x2 (top) axis (y2 = 0). For details, please see @ref{zeroaxis}. @node xdata, xdtics, x2zeroaxis, set-show @subsection xdata @c ?commands set xdata @c ?commands show xdata @c ?set xdata @c ?show xdata @cindex xdata @opindex xdata This command sets the datatype on the x axis to time/date. A similar command does the same thing for each of the other axes. Syntax: @example set xdata @{time@} show xdata @end example The same syntax applies to @ref{ydata}, @ref{zdata}, @ref{x2data}, @ref{y2data} and @ref{cbdata}. The `time` option signals that the datatype is indeed time/date. If the option is not specified, the datatype reverts to normal. See @ref{timefmt} to tell gnuplot how to read date or time data. The time/date is converted to seconds from start of the century. There is currently only one timefmt, which implies that all the time/date columns must conform to this format. Specification of ranges should be supplied as quoted strings according to this format to avoid interpretation of the time/date as an expression. The function 'strftime' (type "man strftime" on unix to look it up) is used to print tic-mark labels. `gnuplot` tries to figure out a reasonable format for this unless the `set format x "string"` has supplied something that does not look like a decimal format (more than one '%' or neither %f nor %g). See also `time/date` for more information. @node xdtics, xlabel, xdata, set-show @subsection xdtics @c ?commands set xdtics @c ?commands unset xdtics @c ?commands show xdtics @c ?set xdtics @c ?unset xdtics @c ?show xdtics @cindex xdtics @opindex xdtics @cindex noxdtics The @ref{xdtics} commands converts the x-axis tic marks to days of the week where 0=Sun and 6=Sat. Overflows are converted modulo 7 to dates. `set noxdtics` returns the labels to their default values. Similar commands do the same things for the other axes. Syntax: @example set xdtics unset xdtics show xdtics @end example The same syntax applies to @ref{ydtics}, @ref{zdtics}, @ref{x2dtics}, @ref{y2dtics} and @ref{cbdtics}. See also the `set format` command. @node xlabel, xmtics, xdtics, set-show @subsection xlabel @c ?commands set xlabel @c ?commands show xlabel @c ?set xlabel @c ?show xlabel @cindex xlabel @opindex xlabel The @ref{xlabel} command sets the x axis label. Similar commands set labels on the other axes. Syntax: @example set xlabel @{"<label>"@} @{offset <offset>@} @{font "<font>@{,<size>@}"@} @{textcolor <colorspec>@} @{@{no@}enhanced@} @{rotate by <degrees> | rotate parallel | norotate@} show xlabel @end example The same syntax applies to @ref{x2label}, @ref{ylabel}, @ref{y2label}, @ref{zlabel} and @ref{cblabel}. If <offset> is specified by either x,y or x,y,z the label is moved by the given offset. It may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. See `coordinates` for details. By default, the `character` coordinate system is used. For example, "`set xlabel offset -1,0`" will change only the x offset of the title, moving the label roughly one character width to the left. The size of a character depends on both the font and the terminal. <font> is used to specify the font in which the label is written; the units of the font <size> depend upon which terminal is used. `noenhanced` requests that the label text not be processed by the enhanced text mode parser, even if enhanced text mode is currently active. To clear a label, put no options on the command line, e.g., "@ref{y2label}". The default positions of the axis labels are as follows: xlabel: The x-axis label is centered below the bottom of the plot. ylabel: The y-axis label is centered to the left of the plot, defaulting to either horizontal or vertical orientation depending on the terminal type. zlabel: The z-axis label is centered along the z axis and placed in the space above the grid level. cblabel: The color box axis label is centered along the box and placed below or to the right according to horizontal or vertical color box gradient. y2label: The y2-axis label is placed to the right of the y2 axis. The position is terminal-dependent in the same manner as is the y-axis label. x2label: The x2-axis label is placed above the plot but below the title. It is also possible to create an x2-axis label by using new-line characters to make a multi-line plot title, e.g., @example set title "This is the title\n\nThis is the x2label" @end example Note that double quotes must be used. The same font will be used for both lines, of course. The orientation (rotation angle) of the x, x2, y and y2 axis labels in 2D plots can be changed by specifying `rotate by <degrees>`. The orientation of the x and y axis labels in 3D plots defaults to horizontal but can be changed to run parallel to the axis by specifying `rotate parallel`. If you are not satisfied with the default position of an axis label, use `set label` instead--that command gives you much more control over where text is placed. Please see `syntax` for further information about backslash processing and the difference between single- and double-quoted strings. @node xmtics, xrange, xlabel, set-show @subsection xmtics @c ?commands set xmtics @c ?commands unset xmtics @c ?commands show xmtics @c ?set xmtics @c ?unset xmtics @c ?show xmtics @cindex xmtics @opindex xmtics @cindex noxmtics The @ref{xmtics} command converts the x-axis tic marks to months of the year where 1=Jan and 12=Dec. Overflows are converted modulo 12 to months. The tics are returned to their default labels by @ref{xmtics}. Similar commands perform the same duties for the other axes. Syntax: @example set xmtics unset xmtics show xmtics @end example The same syntax applies to @ref{x2mtics}, @ref{ymtics}, @ref{y2mtics}, @ref{zmtics} and @ref{cbmtics}. See also the `set format` command. @node xrange, xtics, xmtics, set-show @subsection xrange @c ?commands set xrange @c ?commands show xrange @c ?set xrange @c ?show xrange @cindex writeback @cindex restore @cindex xrange @opindex xrange The @ref{xrange} command sets the horizontal range that will be displayed. A similar command exists for each of the other axes, as well as for the polar radius r and the parametric variables t, u, and v. Syntax: @example set xrange @{ [@{@{<min>@}:@{<max>@}@}] @{@{no@}reverse@} @{@{no@}writeback@} @} | restore show xrange @end example where <min> and <max> terms are constants, expressions or an asterisk to set autoscaling. See below for full autoscaling syntax. If the data are time/date, you must give the range as a quoted string according to the @ref{timefmt} format. Any value omitted will not be changed. The same syntax applies to @ref{yrange}, @ref{zrange}, @ref{x2range}, @ref{y2range}, @ref{cbrange}, @ref{rrange}, @ref{trange}, @ref{urange} and @ref{vrange}. The `reverse` option reverses the direction of the axis, e.g., `set xrange [0:1] reverse` will produce an axis with 1 on the left and 0 on the right. This is identical to the axis produced by `set xrange [1:0]`, of course. `reverse` is intended primarily for use with @ref{autoscale}. Autoscaling: If <min> (the same applies for correspondingly to <max>) is an asterisk "*" autoscaling is turned on. The range in which autoscaling is being performed may be limited by a lower bound <lb> or an upper bound <ub> or both. The syntax is @example @{ <lb> < @} * @{ < <ub> @} @end example For example, @example 0 < * < 200 @end example sets <lb> = 0 and <ub> = 200. With such a setting <min> would be autoscaled, but its final value will be between 0 and 200 (both inclusive despite the '<' sign). If no lower or upper bound is specified, the '<' to also be ommited. If <ub> is lower than <lb> the constraints will be turned off and full autoscaling will happen. This feature is useful to plot measured data with autoscaling but providing a limit on the range, to clip outliers, or to guarantee a minimum range that will be displayed even if the data would not need such a big range. The `writeback` option essentially saves the range found by @ref{autoscale} in the buffers that would be filled by @ref{xrange}. This is useful if you wish to plot several functions together but have the range determined by only some of them. The `writeback` operation is performed during the `plot` execution, so it must be specified before that command. To restore, the last saved horizontal range use `set xrange restore`. For example, @example set xrange [-10:10] set yrange [] writeback plot sin(x) set yrange restore replot x/2 @end example results in a yrange of [-1:1] as found only from the range of sin(x); the [-5:5] range of x/2 is ignored. Executing @ref{yrange} after each command in the above example should help you understand what is going on. In 2D, @ref{xrange} and @ref{yrange} determine the extent of the axes, @ref{trange} determines the range of the parametric variable in parametric mode or the range of the angle in polar mode. Similarly in parametric 3D, @ref{xrange}, @ref{yrange}, and @ref{zrange} govern the axes and @ref{urange} and @ref{vrange} govern the parametric variables. In polar mode, @ref{rrange} determines the radial range plotted. <rmin> acts as an additive constant to the radius, whereas <rmax> acts as a clip to the radius---no point with radius greater than <rmax> will be plotted. @ref{xrange} and @ref{yrange} are affected---the ranges can be set as if the graph was of r(t)-rmin, with rmin added to all the labels. Any range may be partially or totally autoscaled, although it may not make sense to autoscale a parametric variable unless it is plotted with data. Ranges may also be specified on the `plot` command line. A range given on the plot line will be used for that single `plot` command; a range given by a `set` command will be used for all subsequent plots that do not specify their own ranges. The same holds true for `splot`. Examples: To set the xrange to the default: @example set xrange [-10:10] @end example To set the yrange to increase downwards: @example set yrange [10:-10] @end example To change zmax to 10 without affecting zmin (which may still be autoscaled): @example set zrange [:10] @end example To autoscale xmin while leaving xmax unchanged: @example set xrange [*:] @end example To autoscale xmin but keeping xmin positive: @example set xrange [0<*:] @end example To autoscale x but keep minimum range of 10 to 50 (actual might be larger): @example set xrange [*<10:50<*] @end example Autoscaling but limit maximum xrange to -1000 to 1000, i.e. autoscaling within [-1000:1000] @example set xrange [-1000<*:*<1000] @end example Make sure xmin is somewhere between -200 and 100: @example set xrange [-200<*<100:] @end example @node xtics, xyplane, xrange, set-show @subsection xtics @c ?commands set xtics @c ?commands unset xtics @c ?commands show xtics @c ?set xtics @c ?unset xtics @c ?show xtics @cindex xtics @opindex xtics @cindex noxtics Fine control of the major (labelled) tics on the x axis is possible with the `set xtics` command. The tics may be turned off with the `unset xtics` command, and may be turned on (the default state) with `set xtics`. Similar commands control the major tics on the y, z, x2 and y2 axes. Syntax: @example set xtics @{axis | border@} @{@{no@}mirror@} @{in | out@} @{scale @{default | <major> @{,<minor>@}@}@} @{@{no@}rotate @{by <ang>@}@} @{offset <offset> | nooffset@} @{left | right | center | autojustify@} @{add@} @{ autofreq | <incr> | <start>, <incr> @{,<end>@} | (@{"<label>"@} <pos> @{<level>@} @{,@{"<label>"@}...) @} @{ format "formatstring" @} @{ font "name@{,<size>@}" @} @{ rangelimited @} @{ textcolor <colorspec> @} unset xtics show xtics @end example The same syntax applies to @ref{ytics}, @ref{ztics}, @ref{x2tics}, @ref{y2tics} and @ref{cbtics}. `axis` or @ref{border} tells `gnuplot` to put the tics (both the tics themselves and the accompanying labels) along the axis or the border, respectively. If the axis is very close to the border, the `axis` option will move the tic labels to outside the border. The relevant margin settings will usually be sized badly by the automatic layout algorithm in this case. `mirror` tells `gnuplot` to put unlabelled tics at the same positions on the opposite border. `nomirror` does what you think it does. `in` and `out` change the tic marks to be drawn inwards or outwards. With `scale`, the size of the tic marks can be adjusted. If <minor> is not specified, it is 0.5*<major>. The default size 1.0 for major tics and 0.5 for minor tics is requested by `scale default`. `rotate` asks `gnuplot` to rotate the text through 90 degrees, which will be done if the terminal driver in use supports text rotation. `norotate` cancels this. `rotate by <ang>` asks for rotation by <ang> degrees, supported by some terminal types. The defaults are `border mirror norotate` for tics on the x and y axes, and `border nomirror norotate` for tics on the x2 and y2 axes. For the z axis, the `@{axis | border@}` option is not available and the default is `nomirror`. If you do want to mirror the z-axis tics, you might want to create a bit more room for them with @ref{border}. The <offset> is specified by either x,y or x,y,z, and may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. <offset> is the offset of the tics texts from their default positions, while the default coordinate system is `character`. See `coordinates` for details. `nooffset` switches off the offset. Example: Move xtics more closely to the plot. @example set xtics offset 0,graph 0.05 @end example By default, tic labels are justified automatically depending on the axis and rotation angle to produce aesthetically pleasing results. If this is not desired, justification can be overridden with an explicit `left`, `right` or `center` keyword. `autojustify` restores the default behavior. `set xtics` with no options restores the default border or axis if xtics are being displayed; otherwise it has no effect. Any previously specified tic frequency or position @{and labels@} are retained. Positions of the tics are calculated automatically by default or if the `autofreq` option is given; otherwise they may be specified in either of two forms: The implicit <start>, <incr>, <end> form specifies that a series of tics will be plotted on the axis between the values <start> and <end> with an increment of <incr>. If <end> is not given, it is assumed to be infinity. The increment may be negative. If neither <start> nor <end> is given, <start> is assumed to be negative infinity, <end> is assumed to be positive infinity, and the tics will be drawn at integral multiples of <incr>. If the axis is logarithmic, the increment will be used as a multiplicative factor. If you specify to a negative <start> or <incr> after a numerical value (e.g., `rotate by <angle>` or `offset <offset>`), the parser fails because it subtracts <start> or <incr> from that value. As a workaround, specify `0-<start>` resp. `0-<incr>` in that case. Example: @example set xtics border offset 0,0.5 -5,1,5 @end example Fails with 'invalid expression' at the last comma. @example set xtics border offset 0,0.5 0-5,1,5 @end example or @example set xtics offset 0,0.5 border -5,1,5 @end example Sets tics at the border, tics text with an offset of 0,0.5 characters, and sets the start, increment, and end to -5, 1, and 5, as requested. The `set grid` options 'front', 'back' and 'layerdefault' affect the drawing order of the xtics, too. Examples: Make tics at 0, 0.5, 1, 1.5, ..., 9.5, 10. @example set xtics 0,.5,10 @end example Make tics at ..., -10, -5, 0, 5, 10, ... @example set xtics 5 @end example Make tics at 1, 100, 1e4, 1e6, 1e8. @example set logscale x; set xtics 1,100,1e8 @end example The explicit ("<label>" <pos> <level>, ...) form allows arbitrary tic positions or non-numeric tic labels. In this form, the tics do not need to be listed in numerical order. Each tic has a position, optionally with a label. Note that the label is a string enclosed by quotes. It may be a constant string, such as "hello", may contain formatting information for converting the position into its label, such as "%3f clients", or may be empty, "". See `set format` for more information. If no string is given, the default label (numerical) is used. An explicit tic mark has a third parameter, the "level". The default is level 0, a major tic. A level of 1 generates a minor tic. If the level is specified, then the label must also be supplied. Examples: @example set xtics ("low" 0, "medium" 50, "high" 100) set xtics (1,2,4,8,16,32,64,128,256,512,1024) set ytics ("bottom" 0, "" 10, "top" 20) set ytics ("bottom" 0, "" 10 1, "top" 20) @end example In the second example, all tics are labelled. In the third, only the end tics are labelled. In the fourth, the unlabeled tic is a minor tic. Normally if explicit tics are given, they are used instead of auto-generated tics. Conversely if you specify `set xtics auto` or the like it will erase any previously specified explicit tics. You can mix explicit and auto- generated tics by using the keyword `add`, which must appear before the tic style being added. Example: @example set xtics 0,.5,10 set xtics add ("Pi" 3.14159) @end example This will automatically generate tic marks every 0.5 along x, but will also add an explicit labeled tic mark at pi. However they are specified, tics will only be plotted when in range. Format (or omission) of the tic labels is controlled by `set format`, unless the explicit text of a label is included in the `set xtics ("<label>")` form. Minor (unlabelled) tics can be added automatically by the @ref{mxtics} command, or at explicit positions by the `set xtics ("" <pos> 1, ...)` form. @menu * xtics_time_data:: * xtics_rangelimited:: @end menu @node xtics_time_data, xtics_rangelimited, xtics, xtics @subsubsection xtics time_data @c ?set xtics time_axis tics @c ?xtics time_axis tics @c ?time_axis tics In case of timeseries data, axis tic position values must be given as quoted dates or times according to the format @ref{timefmt}. If the <start>, <incr>, <end> form is used, <start> and <end> must be given according to @ref{timefmt}, but <incr> must be in seconds. Times will be written out according to the format given on `set format`, however. Examples: @example set xdata time set timefmt "%d/%m" set xtics format "%b %d" set xrange ["01/12":"06/12"] set xtics "01/12", 172800, "05/12" @end example @example set xdata time set timefmt "%d/%m" set xtics format "%b %d" set xrange ["01/12":"06/12"] set xtics ("01/12", "" "03/12", "05/12") @end example Both of these will produce tics "Dec 1", "Dec 3", and "Dec 5", but in the second example the tic at "Dec 3" will be unlabelled. @node xtics_rangelimited, , xtics_time_data, xtics @subsubsection xtics rangelimited @c ?set xtics rangelimited @c ?xtics rangelimited @cindex rangelimited @cindex range-frame This option limits both the auto-generated axis tic labels and the corresponding plot border to the range of values actually present in the data that has been plotted. Note that this is independent of the current range limits for the plot. For example, suppose that the data in "file.dat" all lies in the range 2 < y < 4. Then the following commands will create a plot for which the left-hand plot border (y axis) is drawn for only this portion of the total y range, and only the axis tics in this region are generated. I.e., the plot will be scaled to the full range on y, but there will be a gap between 0 and 2 on the left border and another gap between 4 and 10. This style is sometimes referred to as a `range-frame` graph. @example set border 3 set yrange [0:10] set ytics nomirror rangelimited plot "file.dat" @end example @node xyplane, xzeroaxis, xtics, set-show @subsection xyplane @c ?commands set xyplane @c ?commands show xyplane @c ?set xyplane @c ?show xyplane @cindex xyplane @opindex xyplane The @ref{xyplane} command adjusts the position at which the xy plane is drawn in a 3D plot. The synonym "set ticslevel" is accepted for backwards compatibility. Syntax: @example set xyplane at <zvalue> set xyplane relative <frac> set ticslevel <frac> # equivalent to set xyplane relative show xyplane @end example The form `set xyplane relative <frac>` places the xy plane below the range in Z, where the distance from the xy plane to Zmin is given as a fraction of the total range in z. The default value is 0.5. Negative values are permitted, but tic labels on the three axes may overlap. The older, deprecated, form @ref{ticslevel} is retained for backwards compatibility. To place the xy-plane at a position 'pos' on the z-axis, @ref{ticslevel} may be set equal to (pos - zmin) / (zmin - zmax). However, this position will change if the z range is changed. The alternative form `set xyplane at <zvalue>` fixes the placement of the xy plane at a specific Z value regardless of the current z range. Thus to force the x, y, and z axes to meet at a common origin one would specify `set xyplane at 0`. See also @ref{view}, and @ref{zeroaxis}. @node xzeroaxis, y2data, xyplane, set-show @subsection xzeroaxis @c ?commands set xzeroaxis @c ?commands unset xzeroaxis @c ?commands show xzeroaxis @c ?set xzeroaxis @c ?unset xzeroaxis @c ?show xzeroaxis @cindex xzeroaxis @opindex xzeroaxis @cindex noxzeroaxis The @ref{xzeroaxis} command draws a line at y = 0. For details, please see @ref{zeroaxis}. @node y2data, y2dtics, xzeroaxis, set-show @subsection y2data @c ?commands set y2data @c ?commands show y2data @c ?set y2data @c ?show y2data @cindex y2data @opindex y2data The @ref{y2data} command sets y2 (right-hand) axis data to timeseries (dates/times). Please see @ref{xdata}. @node y2dtics, y2label, y2data, set-show @subsection y2dtics @c ?commands set y2dtics @c ?commands unset y2dtics @c ?set y2dtics @c ?unset y2dtics @c ?show y2dtics @cindex y2dtics @opindex y2dtics @cindex noy2dtics The @ref{y2dtics} command changes tics on the y2 (right-hand) axis to days of the week. Please see @ref{xdtics} for details. @node y2label, y2mtics, y2dtics, set-show @subsection y2label @c ?commands set y2label @c ?commands show y2label @c ?set y2label @c ?show y2label @cindex y2label @opindex y2label The @ref{y2label} command sets the label for the y2 (right-hand) axis. Please see @ref{xlabel}. @node y2mtics, y2range, y2label, set-show @subsection y2mtics @c ?commands set y2mtics @c ?commands unset y2mtics @c ?commands show y2mtics @c ?set y2mtics @c ?unset y2mtics @c ?show y2mtics @cindex y2mtics @opindex y2mtics @cindex noy2mtics The @ref{y2mtics} command changes tics on the y2 (right-hand) axis to months of the year. Please see @ref{xmtics} for details. @node y2range, y2tics, y2mtics, set-show @subsection y2range @c ?commands set y2range @c ?commands show y2range @c ?set y2range @c ?show y2range @cindex y2range @opindex y2range The @ref{y2range} command sets the vertical range that will be displayed on the y2 (right-hand) axis. Please see @ref{xrange} for details. @node y2tics, y2zeroaxis, y2range, set-show @subsection y2tics @c ?commands set y2tics @c ?commands unset y2tics @c ?commands show y2tics @c ?set y2tics @c ?unset y2tics @c ?show y2tics @cindex y2tics @opindex y2tics @cindex noy2tics The @ref{y2tics} command controls major (labelled) tics on the y2 (right-hand) axis. Please see `set xtics` for details. @node y2zeroaxis, ydata, y2tics, set-show @subsection y2zeroaxis @c ?commands set y2zeroaxis @c ?commands unset y2zeroaxis @c ?commands show y2zeroaxis @c ?set y2zeroaxis @c ?unset y2zeroaxis @c ?show y2zeroaxis @cindex y2zeroaxis @opindex y2zeroaxis @cindex noy2zeroaxis The @ref{y2zeroaxis} command draws a line at the origin of the y2 (right-hand) axis (x2 = 0). For details, please see @ref{zeroaxis}. @node ydata, ydtics, y2zeroaxis, set-show @subsection ydata @c ?commands set ydata @c ?commands show ydata @c ?set ydata @c ?show ydata @cindex ydata @opindex ydata The @ref{ydata} commands sets y-axis data to timeseries (dates/times). Please see @ref{xdata}. @node ydtics, ylabel, ydata, set-show @subsection ydtics @c ?commands set ydtics @c ?commands unset ydtics @c ?commands show ydtics @c ?set ydtics @c ?unset ydtics @c ?show ydtics @cindex ydtics @opindex ydtics @cindex noydtics The @ref{ydtics} command changes tics on the y axis to days of the week. Please see @ref{xdtics} for details. @node ylabel, ymtics, ydtics, set-show @subsection ylabel @c ?commands set ylabel @c ?commands show ylabel @c ?set ylabel @c ?show ylabel @cindex ylabel @opindex ylabel This command sets the label for the y axis. Please see @ref{xlabel}. @node ymtics, yrange, ylabel, set-show @subsection ymtics @c ?commands set ymtics @c ?commands unset ymtics @c ?commands show ymtics @c ?set ymtics @c ?unset ymtics @c ?show ymtics @cindex ymtics @opindex ymtics @cindex noymtics The @ref{ymtics} command changes tics on the y axis to months of the year. Please see @ref{xmtics} for details. @node yrange, ytics, ymtics, set-show @subsection yrange @c ?commands set yrange @c ?commands show yrange @c ?set yrange @c ?show yrange @cindex yrange @opindex yrange The @ref{yrange} command sets the vertical range that will be displayed on the y axis. Please see @ref{xrange} for details. @node ytics, yzeroaxis, yrange, set-show @subsection ytics @c ?commands set ytics @c ?commands unset ytics @c ?commands show ytics @c ?set ytics @c ?unset ytics @c ?show ytics @cindex ytics @opindex ytics @cindex noytics The @ref{ytics} command controls major (labelled) tics on the y axis. Please see `set xtics` for details. @node yzeroaxis, zdata, ytics, set-show @subsection yzeroaxis @c ?commands set yzeroaxis @c ?commands unset yzeroaxis @c ?commands show yzeroaxis @c ?set yzeroaxis @c ?unset yzeroaxis @c ?show yzeroaxis @cindex yzeroaxis @opindex yzeroaxis @cindex noyzeroaxis The @ref{yzeroaxis} command draws a line at x = 0. For details, please see @ref{zeroaxis}. @node zdata, zdtics, yzeroaxis, set-show @subsection zdata @c ?commands set zdata @c ?commands show zdata @c ?set zdata @c ?show zdata @cindex zdata @opindex zdata The @ref{zdata} command sets zaxis data to timeseries (dates/times). Please see @ref{xdata}. @node zdtics, zzeroaxis, zdata, set-show @subsection zdtics @c ?commands set zdtics @c ?commands unset zdtics @c ?commands show zdtics @c ?set zdtics @c ?unset zdtics @c ?show zdtics @cindex zdtics @opindex zdtics @cindex nozdtics The @ref{zdtics} command changes tics on the z axis to days of the week. Please see @ref{xdtics} for details. @node zzeroaxis, cbdata, zdtics, set-show @subsection zzeroaxis @c ?commands set zzeroaxis @c ?commands unset zzeroaxis @c ?commands show zzeroaxis @c ?set zzeroaxis @c ?unset zzeroaxis @c ?show zzeroaxis @cindex zzeroaxis @opindex zzeroaxis @cindex nozzeroaxis The @ref{zzeroaxis} command draws a line through (x=0,y=0). This has no effect on 2D plots, including splot with `set view map`. For details, please see @ref{zeroaxis} and @ref{xyplane}. @node cbdata, cbdtics, zzeroaxis, set-show @subsection cbdata @c ?commands set cbdata @c ?commands show cbdata @c ?set cbdata @c ?show cbdata @cindex cbdata @opindex cbdata Set color box axis data to timeseries (dates/times). Please see @ref{xdata}. @node cbdtics, zero, cbdata, set-show @subsection cbdtics @c ?commands set cbdtics @c ?commands unset cbdtics @c ?commands show cbdtics @c ?set cbdtics @c ?unset cbdtics @c ?show cbdtics @cindex cbdtics @opindex cbdtics @cindex nocbdtics The @ref{cbdtics} command changes tics on the color box axis to days of the week. Please see @ref{xdtics} for details. @node zero, zeroaxis, cbdtics, set-show @subsection zero @c ?commands set zero @c ?commands show zero @c ?set zero @c ?show zero @cindex zero @opindex zero The `zero` value is the default threshold for values approaching 0.0. Syntax: @example set zero <expression> show zero @end example `gnuplot` will not plot a point if its imaginary part is greater in magnitude than the `zero` threshold. This threshold is also used in various other parts of `gnuplot` as a (crude) numerical-error threshold. The default `zero` value is 1e-8. `zero` values larger than 1e-3 (the reciprocal of the number of pixels in a typical bitmap display) should probably be avoided, but it is not unreasonable to set `zero` to 0.0. @node zeroaxis, zlabel, zero, set-show @subsection zeroaxis @c ?commands set zeroaxis @c ?commands unset zeroaxis @c ?commands show zeroaxis @c ?set zeroaxis @c ?unset zeroaxis @c ?show zeroaxis @cindex zeroaxis @opindex zeroaxis The x axis may be drawn by @ref{xzeroaxis} and removed by @ref{xzeroaxis}. Similar commands behave similarly for the y, x2, y2, and z axes. Syntax: @example set @{x|x2|y|y2|z@}zeroaxis @{ @{linestyle | ls <line_style>@} | @{ linetype | lt <line_type>@} @{ linewidth | lw <line_width>@}@} unset @{x|x2|y|y2|z@}zeroaxis show @{x|y|z@}zeroaxis @end example By default, these options are off. The selected zero axis is drawn with a line of type <line_type> and width <line_width> (if supported by the terminal driver currently in use), or a user-defined style <line_style>. If no linetype is specified, any zero axes selected will be drawn using the axis linetype (linetype 0). @ref{zeroaxis} is equivalent to @ref{yzeroaxis}. Note that the z-axis must be set separately using @ref{zzeroaxis}. Examples: To simply have the y=0 axis drawn visibly: @example set xzeroaxis @end example If you want a thick line in a different color or pattern, instead: @example set xzeroaxis linetype 3 linewidth 2.5 @end example @node zlabel, zmtics, zeroaxis, set-show @subsection zlabel @c ?commands set zlabel @c ?commands show zlabel @c ?set zlabel @c ?show zlabel @cindex zlabel @opindex zlabel This command sets the label for the z axis. Please see @ref{xlabel}. @node zmtics, zrange, zlabel, set-show @subsection zmtics @c ?commands set zmtics @c ?commands unset zmtics @c ?commands show zmtics @c ?set zmtics @c ?unset zmtics @c ?show zmtics @cindex zmtics @opindex zmtics @cindex nozmtics The @ref{zmtics} command changes tics on the z axis to months of the year. Please see @ref{xmtics} for details. @node zrange, ztics, zmtics, set-show @subsection zrange @c ?commands set zrange @c ?commands show zrange @c ?set zrange @c ?show zrange @cindex zrange @opindex zrange The @ref{zrange} command sets the range that will be displayed on the z axis. The zrange is used only by `splot` and is ignored by `plot`. Please see @ref{xrange} for details. @node ztics, cblabel, zrange, set-show @subsection ztics @c ?commands set ztics @c ?commands unset ztics @c ?commands show ztics @c ?set ztics @c ?unset ztics @c ?show ztics @cindex ztics @opindex ztics @cindex noztics The @ref{ztics} command controls major (labelled) tics on the z axis. Please see `set xtics` for details. @node cblabel, cbmtics, ztics, set-show @subsection cblabel @c ?commands set cblabel @c ?commands show cblabel @c ?set cblabel @c ?show cblabel @cindex cblabel @opindex cblabel This command sets the label for the color box axis. Please see @ref{xlabel}. @node cbmtics, cbrange, cblabel, set-show @subsection cbmtics @c ?commands set cbmtics @c ?commands unset cbmtics @c ?commands show cbmtics @c ?set cbmtics @c ?unset cbmtics @c ?show cbmtics @cindex cbmtics @opindex cbmtics @cindex nocbmtics The @ref{cbmtics} command changes tics on the color box axis to months of the year. Please see @ref{xmtics} for details. @node cbrange, cbtics, cbmtics, set-show @subsection cbrange @c ?commands set cbrange @c ?commands show cbrange @c ?set cbrange @c ?show cbrange @cindex cbrange @opindex cbrange The @ref{cbrange} command sets the range of values which are colored using the current @ref{palette} by styles @ref{pm3d}, `with image` and @ref{palette}. Values outside of the color range use color of the nearest extreme. If the cb-axis is autoscaled in `splot`, then the colorbox range is taken from @ref{zrange}. Points drawn in `splot ... pm3d|palette` can be filtered by using different @ref{zrange} and @ref{cbrange}. Please see @ref{xrange} for details on @ref{cbrange} syntax. See also @ref{palette} and `set colorbox`. @node cbtics, , cbrange, set-show @subsection cbtics @c ?commands set cbtics @c ?commands unset cbtics @c ?commands show cbtics @c ?set cbtics @c ?unset cbtics @c ?show cbtics @cindex cbtics @opindex cbtics @cindex nocbtics The @ref{cbtics} command controls major (labelled) tics on the color box axis. Please see `set xtics` for details. @node shell, splot, set-show, Commands @section shell @c ?commands shell @cindex shell @cmindex shell The @ref{shell} command spawns an interactive shell. To return to `gnuplot`, type `logout` if using VMS, @ref{exit} or the END-OF-FILE character if using Unix, or @ref{exit} if using MS-DOS or OS/2. There are two ways of spawning a shell command: using @ref{system} command or via `!` ($ if using VMS). The former command takes a string as a parameter and thus it can be used anywhere among other gnuplot commands, while the latter syntax requires to be the only command on the line. Control will return immediately to `gnuplot` after this command is executed. For example, in MS-DOS or OS/2, @example ! dir @end example or @example system "dir" @end example prints a directory listing and then returns to `gnuplot`. Other examples of the former syntax: @example system "date"; set time; plot "a.dat" print=1; if (print) replot; set out; system "lpr x.ps" @end example @node splot, stats_(Statistical_Summary), shell, Commands @section splot @c ?commands splot @cindex splot @cmindex splot `splot` is the command for drawing 3D plots (well, actually projections on a 2D surface, but you knew that). It can create a plot from functions or data read from files in a manner very similar to the `plot` command. `splot` provides only a single x, y, and z axis; there is no equivalent to the x2 and y2 secondary axes provided by `plot`. See the `plot` command for many options available in both 2D and 3D plots. Syntax: @example splot @{<ranges>@} @{<iteration>@} <function> | "<datafile>" @{datafile-modifiers@}@} @{<title-spec>@} @{with <style>@} @{, @{definitions@{,@}@} <function> ...@} @end example where either a <function> or the name of a data file enclosed in quotes is supplied. The function can be a mathematical expression, or a triple of mathematical expressions in parametric mode. By default `splot` draws the xy plane completely below the plotted data. The offset between the lowest ztic and the xy plane can be changed by @ref{xyplane}. The orientation of a `splot` projection is controlled by @ref{view}. See @ref{view} and @ref{xyplane} for more information. The syntax for setting ranges on the `splot` command is the same as for `plot`. In non-parametric mode, the order in which ranges must be given is @ref{xrange}, @ref{yrange}, and @ref{zrange}. In parametric mode, the order is @ref{urange}, @ref{vrange}, @ref{xrange}, @ref{yrange}, and @ref{zrange}. The @ref{title} option is the same as in `plot`. The operation of @ref{with} is also the same as in `plot`, except that the plotting styles available to `splot` are limited to `lines`, `points`, @ref{linespoints}, @ref{dots}, and @ref{impulses}; the error-bar capabilities of `plot` are not available for `splot`. The @ref{datafile} options have more differences. See also `show plot`. @menu * data-file:: * grid_data:: * splot_surfaces:: @end menu @node data-file, grid_data, splot, splot @subsection data-file @c ?commands splot datafile @c ?splot datafile `Splot`, like `plot`, can display from a file. Syntax: @example splot '<file_name>' @{binary <binary list>@} @{@{nonuniform@} matrix@} @{index <index list>@} @{every <every list>@} @{using <using list>@} @end example The special filenames `""` and `"-"` are permitted, as in `plot`. See @ref{special-filenames}. In brief, @ref{binary} and @ref{matrix} indicate that the data are in a special form, @ref{index} selects which data sets in a multi-data-set file are to be plotted, @ref{every} specifies which datalines (subsets) within a single data set are to be plotted, and @ref{using} determines how the columns within a single record are to be interpreted. The options @ref{index} and @ref{every} behave the same way as with `plot`; @ref{using} does so also, except that the @ref{using} list must provide three entries instead of two. The `plot` options @ref{thru} and @ref{smooth} are not available for `splot`, but @ref{cntrparam} and @ref{dgrid3d} provide limited smoothing capabilities. Data file organization is essentially the same as for `plot`, except that each point is an (x,y,z) triple. If only a single value is provided, it will be used for z, the datablock number will be used for y, and the index of the data point in the datablock will be used for x. If two or four values are provided, `gnuplot` uses the last value for calculating the color in pm3d plots. Three values are interpreted as an (x,y,z) triple. Additional values are generally used as errors, which can be used by @ref{fit}. Single blank records separate datablocks in a `splot` datafile; `splot` treats datablocks as the equivalent of function y-isolines. No line will join points separated by a blank record. If all datablocks contain the same number of points, `gnuplot` will draw cross-isolines between datablocks, connecting corresponding points. This is termed "grid data", and is required for drawing a surface, for contouring (@ref{contour}) and hidden-line removal (@ref{hidden3d}). See also `splot grid_data`. It is no longer necessary to specify `parametric` mode for three-column `splot`s. @menu * matrix:: * example_datafile_:: @end menu @node matrix, example_datafile_, data-file, data-file @subsubsection matrix @c ?commands plot datafile matrix @c ?commands splot datafile matrix @c ?plot datafile matrix binary @c ?splot datafile matrix binary @c ?plot binary matrix @c ?splot binary matrix @c ?plot matrix binary @c ?splot matrix binary @c ?matrix binary @c ?binary matrix Gnuplot can interpret matrix input in two different ways. The first of these assumes a uniform grid of x and y coordinates, and assigns each value in the input matrix to one element of this uniform grid. This is the default for ascii data input, but not for binary input. Example commands for plotting uniform matrix data: @example splot 'file' matrix using 1:2:3 # ascii input splot 'file' binary general using 1:2:3 # binary input @end example In a uniform grid matrix the z-values are read in a row at a time, i. e., @example z11 z12 z13 z14 ... z21 z22 z23 z24 ... z31 z32 z33 z34 ... @end example and so forth. For ascii input, a blank line or comment line ends the matrix, and starts a new surface mesh. You can select among the meshes inside a file by the @ref{index} option to the `splot` command, as usual. @cindex nonuniform The second interpretation assumes a non-uniform grid with explicit x and y coordinates. The first row of input data contains the y coordinates; the first column of input data contains the x coordinates. For binary input data, the first element of the first row must contain the number of data columns. (This number is ignored for ascii input). Both the coordinates and the data values in a binary input are treated as single precision floats. Example commands for plotting non-uniform matrix data: @example splot 'file' nonuniform matrix using 1:2:3 # ascii input splot 'file' binary matrix using 1:2:3 # binary input @end example Thus the data organization for non-uniform matrix input is @example <N+1> <y0> <y1> <y2> ... <yN> <x0> <z0,0> <z0,1> <z0,2> ... <z0,N> <x1> <z1,0> <z1,1> <z1,2> ... <z1,N> : : : : ... : @end example which is then converted into triplets: @example <x0> <y0> <z0,0> <x0> <y1> <z0,1> <x0> <y2> <z0,2> : : : <x0> <yN> <z0,N> @end example @example <x1> <y0> <z1,0> <x1> <y1> <z1,1> : : : @end example These triplets are then converted into `gnuplot` iso-curves and then `gnuplot` proceeds in the usual manner to do the rest of the plotting. A collection of matrix and vector manipulation routines (in C) is provided in `binary.c`. The routine to write binary data is @example int fwrite_matrix(file,m,nrl,nrl,ncl,nch,row_title,column_title) @end example An example of using these routines is provided in the file `bf_test.c`, which generates binary files for the demo file `demo/binary.dem`. Usage in `plot`: @example plot `a.dat` matrix plot `a.dat` matrix using 1:3 plot 'a.gpbin' @{matrix@} binary using 1:3 @end example will plot rows of the matrix, while using 2:3 will plot matrix columns, and using 1:2 the point coordinates (rather useless). Applying the @ref{every} option you can specify explicit rows and columns. Example -- rescale axes of a matrix in an ascii file: @example splot `a.dat` matrix using (1+$1):(1+$2*10):3 @end example Example -- plot the 3rd row of a matrix in an ascii file: @example plot 'a.dat' matrix using 1:3 every 1:999:1:2 @end example (rows are enumerated from 0, thus 2 instead of 3). Gnuplot can read matrix binary files by use of the option @ref{binary} appearing without keyword qualifications unique to general binary, i.e., @ref{array}, @ref{record}, `format`, or @ref{filetype}. Other general binary keywords for translation should also apply to matrix binary. (See @ref{general} for more details.) @node example_datafile_, , matrix, data-file @subsubsection example datafile @c ?commands splot datafile example @c ?splot datafile example @c ?splot example A simple example of plotting a 3D data file is @example splot 'datafile.dat' @end example where the file "datafile.dat" might contain: @example # The valley of the Gnu. 0 0 10 0 1 10 0 2 10 @end example @example 1 0 10 1 1 5 1 2 10 @end example @example 2 0 10 2 1 1 2 2 10 @end example @example 3 0 10 3 1 0 3 2 10 @end example Note that "datafile.dat" defines a 4 by 3 grid ( 4 rows of 3 points each ). Rows (datablocks) are separated by blank records. Note also that the x value is held constant within each dataline. If you instead keep y constant, and plot with hidden-line removal enabled, you will find that the surface is drawn 'inside-out'. Actually for grid data it is not necessary to keep the x values constant within a datablock, nor is it necessary to keep the same sequence of y values. `gnuplot` requires only that the number of points be the same for each datablock. However since the surface mesh, from which contours are derived, connects sequentially corresponding points, the effect of an irregular grid on a surface plot is unpredictable and should be examined on a case-by-case basis. @node grid_data, splot_surfaces, data-file, splot @subsection grid data @c ?commands splot grid_data @c ?splot grid_data @cindex grid_data The 3D routines are designed for points in a grid format, with one sample, datapoint, at each mesh intersection; the datapoints may originate from either evaluating a function, see @ref{isosamples}, or reading a datafile, see @ref{datafile}. The term "isoline" is applied to the mesh lines for both functions and data. Note that the mesh need not be rectangular in x and y, as it may be parameterized in u and v, see @ref{isosamples}. However, `gnuplot` does not require that format. In the case of functions, 'samples' need not be equal to 'isosamples', i.e., not every x-isoline sample need intersect a y-isoline. In the case of data files, if there are an equal number of scattered data points in each datablock, then "isolines" will connect the points in a datablock, and "cross-isolines" will connect the corresponding points in each datablock to generate a "surface". In either case, contour and hidden3d modes may give different plots than if the points were in the intended format. Scattered data can be converted to a @{different@} grid format with @ref{dgrid3d}. The contour code tests for z intensity along a line between a point on a y-isoline and the corresponding point in the next y-isoline. Thus a `splot` contour of a surface with samples on the x-isolines that do not coincide with a y-isoline intersection will ignore such samples. Try: @example set xrange [-pi/2:pi/2]; set yrange [-pi/2:pi/2] set style function lp set contour set isosamples 10,10; set samples 10,10; splot cos(x)*cos(y) set samples 4,10; replot set samples 10,4; replot @end example @node splot_surfaces, , grid_data, splot @subsection splot surfaces @c ?commands splot surfaces @c ?splot surfaces `splot` can display a surface as a collection of points, or by connecting those points. As with `plot`, the points may be read from a data file or result from evaluation of a function at specified intervals, see @ref{isosamples}. The surface may be approximated by connecting the points with straight line segments, see @ref{surface}, in which case the surface can be made opaque with `set hidden3d.` The orientation from which the 3d surface is viewed can be changed with @ref{view}. Additionally, for points in a grid format, `splot` can interpolate points having a common amplitude (see @ref{contour}) and can then connect those new points to display contour lines, either directly with straight-line segments or smoothed lines (see @ref{cntrparam}). Functions are already evaluated in a grid format, determined by @ref{isosamples} and @ref{samples}, while file data must either be in a grid format, as described in @ref{data-file}, or be used to generate a grid (see @ref{dgrid3d}). Contour lines may be displayed either on the surface or projected onto the base. The base projections of the contour lines may be written to a file, and then read with `plot`, to take advantage of `plot`'s additional formatting capabilities. @node stats_(Statistical_Summary), system_, splot, Commands @section stats (Statistical Summary) @c ?commands stats @cindex stats @cindex statistics Syntax: @example stats 'filename' [using N[:M]] [name 'prefix'] [[no]output]] @end example This command prepares a statistical summary of the data in one or two columns of a file. The using specifier is interpreted in the same way as for plot commands. See `plot` for details on the @ref{index}, @ref{every}, and @ref{using} directives. Data points are filtered against both xrange and yrange before analysis. See @ref{xrange}. The summary is printed to the screen by default. Output can be redirected to a file by prior use of the command @ref{print}, or suppressed altogether using the `nooutput` option. In addition to printed output, the program stores the individual statistics into three sets of variables. The first set of variables reports how the data is laid out in the file: @example STATS_records # total number of in-range data records STATS_outofrange # number of records filtered out by range limits STATS_invalid # number of invalid/incomplete/missing records STATS_blank # number of blank lines in the file STATS_blocks # number of indexable data blocks in the file @end example The second set reports properties of the in-range data from a single column. If the corresponding axis is autoscaled (x-axis for the 1st column, y-axis for the optional second column) then no range limits are applied. If two columns are being analysed in a single `stats` command, the the suffix "_x" or "_y" is appended to each variable name. I.e. STATS_min_x is the minimum value found in the first column, while STATS_min_y is the minimum value found in the second column. @example STATS_min # minimum value of in-range data points STATS_max # maximum value of in-range data points STATS_index_min # index i for which data[i] == STATS_min STATS_index_max # index i for which data[i] == STATS_max STATS_lo_quartile # value of the lower (1st) quartile boundary STATS_median # median value STATS_up_quartile # value of the upper (3rd) quartile boundary STATS_mean # mean value of in-range data points STATS_stddev # standard deviation of the in-range data points STATS_sum # sum STATS_sumsq # sum of squares @end example The third set of variables is only relevant to analysis of two data columns. @example STATS_correlation # correlation coefficient between x and y values STATS_slope # A corresponding to a linear fit y = Ax + B STATS_intercept # B corresponding to a linear fit y = Ax + B STATS_sumxy # sum of x*y STATS_pos_min_y # x coordinate of a point with minimum y value STATS_pos_max_y # x coordinate of a point with maximum y value @end example It may be convenient to track the statistics from more than one file at the same time. The `name` option causes the default prefix "STATS" to be replaced by a user-specified string. For example, the mean value of column 2 data from two different files could be compared by @example stats "file1.dat" using 2 name "A" stats "file2.dat" using 2 name "B" if (A_mean < B_mean) @{...@} @end example The index reported in STATS_index_xxx corresponds to the value of pseudo-column 0 ($0) in plot commands. I.e. the first point has index 0, the last point has index N-1. Data values are sorted to find the median and quartile boundaries. If the total number of points N is odd, then the median value is taken as the value of data point (N+1)/2. If N is even, then the median is reported as the mean value of points N/2 and (N+2)/2. Equivalent treatment is used for the quartile boundaries. For an example of using the `stats` command to help annotate a subsequent plot, see @uref{http://www.gnuplot.info/demo/stats.html,stats.dem. } The current implementation does not allow analysis if either the X or Y axis is set to log-scaling. This restriction may be removed in a later version. @node system_, test, stats_(Statistical_Summary), Commands @section system @c ?commands system @cindex system @cmindex system `system "command"` executes "command" using the standard shell. See @ref{shell}. If called as a function, `system("command")` returns the resulting character stream from stdout as a string. One optional trailing newline is ignored. This can be used to import external functions into gnuplot scripts: @example f(x) = real(system(sprintf("somecommand %f", x))) @end example @node test, undefine, system_, Commands @section test @c ?commands test @c ?test palette @cindex test @cmindex test This command graphically tests or presents terminal and palette capabilities. Syntax: @example test @{terminal | palette [rgb|rbg|grb|gbr|brg|bgr]@} @end example @ref{test} or @ref{terminal} creates a display of line and point styles and other useful things appropriate for and supported by the @ref{terminal} you are just using. @ref{palette} plots profiles of R(z),G(z),B(z), where 0<=z<=1. These are the RGB components of the current color @ref{palette}. It also plots the apparent net intensity as calculated using NTSC coefficients to map RGB onto a grayscale. The optional parameter, a permutation of letters rgb, determines the sequence in which the r,g,b profiles are drawn. @node undefine, unset, test, Commands @section undefine @c ?commands undefine @cindex undefine @cmindex undefine Clear one or more previously defined user variables. This is useful in order to reset the state of a script containing an initialization test. A variable name can contain the wildcard character `*` as last character. If the wildcard character is found, all variables with names that begin with the prefix preceding the wildcard will be removed. This is useful to remove several variables sharing a common prefix. Note that the wildcard character is only allowed at the end of the variable name! Specifying the wildcard character as sole argument to @ref{undefine} has no effect. Example: @example undefine foo foo1 foo2 if (!exists("foo")) load "initialize.gp" @end example @example bar = 1; bar1 = 2; bar2 = 3 undefine bar* # removes all three variables @end example @node unset, update, undefine, Commands @section unset @c ?commands unset @cindex unset @cmindex unset @cindex iteration @cmindex iteration Options set using the `set` command may be returned to their default state by the corresponding @ref{unset} command. The @ref{unset} command may contain an optional iteration clause. See @ref{iteration}. Examples: @example set xtics mirror rotate by -45 0,10,100 ... unset xtics @end example @example # Unset labels numbered between 100 and 200 unset for [i=100:200] label i @end example @menu * terminal_:: @end menu @node terminal_, , unset, unset @subsection terminal @c ?unset terminal The default terminal that is active at the time of program entry depends on the system platform, gnuplot build options, and the environmental variable GNUTERM. Whatever this default may be, gnuplot saves it in the internal variable GNUTERM. The @ref{terminal} command restores this initial state. It is equivalent to `set terminal GNUTERM`. @node update, While, unset, Commands @section update @c ?commands update @cindex update @cmindex update This command writes the current values of the fit parameters into the given file, formatted as an initial-value file (as described in the @ref{fit}section). This is useful for saving the current values for later use or for restarting a converged or stopped fit. Syntax: @example update <filename> @{<filename>@} @end example If a second filename is supplied, the updated values are written to this file, and the original parameter file is left unmodified. Otherwise, if the file already exists, `gnuplot` first renames it by appending `.old` and then opens a new file. That is, "`update 'fred'`" behaves the same as "`!rename fred fred.old; update 'fred.old' 'fred'`". [On DOS and other systems that use the twelve-character "filename.ext" naming convention, "ext" will be "`old`" and "filename" will be related (hopefully recognizably) to the initial name. Renaming is not done at all on VMS systems, since they use file-versioning.] Please see @ref{fit} for more information. @node While, , update, Commands @section While @cindex while @c ?commands while Syntax: @example while (<expr>) @{ <commands> @} @end example Execute a block of commands repeatedly so long as <expr> evaluates to a non-zero value. This command cannot be mixed with old-style (un-bracketed) if/else statements. See `if`. @node Terminal_types, Bugs, Commands, Top @chapter Terminal types @c ^ <h2> Terminal Types </h2> @menu * complete_list_of_terminals:: @end menu @node complete_list_of_terminals, , Terminal_types, Terminal_types @section complete list of terminals @c ?complete list of terminals @cindex terminal @opindex terminal @cindex term Gnuplot supports a large number of output formats. These are selected by choosing an appropriate terminal type, possibly with additional modifying options. See @ref{terminal}. This document may describe terminal types that are not available to you because they were not configured or installed on your system. To see a list of terminals available on a particular gnuplot installation, type 'set terminal' with no modifiers. @@c <3 -- all terminal stuff is pulled from the .trm files @menu * aed767:: * aifm:: * aqua:: * be:: * epscairo:: * canvas:: * cgi:: * cgm:: * context:: * corel:: * debug:: * svga:: * dumb:: * dxf:: * dxy800a:: * eepic:: * emf:: * emxvga:: * epson_180dpi:: * excl:: * fig:: * png_:: * ggi:: * gpic:: * grass:: * hp2623a:: * hp2648:: * hp500c:: * hpgl:: * hpljii:: * hppj:: * imagen:: * kyo:: * latex:: * linux:: * lua:: * macintosh:: * mf:: * mp:: * mif:: * next:: * Openstep_(next):: * pbm:: * dospc:: * pdf:: * pstricks:: * qms:: * regis:: * sun:: * svg:: * tek410x:: * tek40:: * texdraw:: * tgif:: * tkcanvas:: * tpic:: * unixpc:: * vx384:: * vgagl:: * VWS:: * windows:: * wxt:: * x11:: * xlib:: @end menu @node aed767, aifm, complete_list_of_terminals, complete_list_of_terminals @subsection aed767 @c ?commands set terminal aed767 @c ?set terminal aed767 @c ?set term aed767 @c ?terminal aed767 @c ?term aed767 @cindex aed767 @tmindex aed767 @c ?commands set terminal aed512 @c ?set terminal aed512 @c ?set term aed512 @c ?terminal aed512 @c ?term aed512 @cindex aed512 @tmindex aed512 The `aed512` and `aed767` terminal drivers support AED graphics terminals. The two drivers differ only in their horizontal ranges, which are 512 and 768 pixels, respectively. Their vertical range is 575 pixels. There are no options for these drivers." @node aifm, aqua, aed767, complete_list_of_terminals @subsection aifm @c ?commands set terminal aifm @c ?set terminal aifm @c ?set term aifm @c ?terminal aifm @c ?term aifm @cindex aifm @ref{terminal}, originally written for Adobe Illustrator 3.0+. Since Adobe Illustrator understands PostScript level 1 commands directly, you should use `set terminal post level1` instead. Syntax: @example set terminal aifm @{color|monochrome@} @{"<fontname>"@} @{<fontsize>@} @end example @node aqua, be, aifm, complete_list_of_terminals @subsection aqua @c ?commands set terminal aqua @c ?set terminal aqua @c ?set term aqua @c ?terminal aqua @c ?term aqua @cindex aqua @cindex Aqua This terminal relies on AquaTerm.app for display on Mac OS X. Syntax: @example set terminal aqua @{<n>@} @{title "<wintitle>"@} @{size <x> <y>@} @{font "<fontname>@{,<fontsize>@}"@} @{@{no@}enhanced@} @{solid|dashed@} @{dl <dashlength>@}@} @end example where <n> is the number of the window to draw in (default is 0), <wintitle> is the name shown in the title bar (default "Figure <n>"), <x> <y> is the size of the plot (default is 846x594 pt = 11.75x8.25 in). Use <fontname> to specify the font (default is "Times-Roman"), and <fontsize> to specify the font size (default is 14.0 pt). The aqua terminal supports enhanced text mode (see `enhanced`), except for overprint. Font support is limited to the fonts available on the system. Character encoding can be selected by @ref{encoding} and currently supports iso_latin_1, iso_latin_2, cp1250, and UTF8 (default). Lines can be drawn either solid or dashed, (default is solid) and the dash spacing can be modified by <dashlength> which is a multiplier > 0. @node be, epscairo, aqua, complete_list_of_terminals @subsection be @c ?commands set terminal be @c ?set terminal be @c ?set term be @c ?terminal be @c ?term be @cindex be @cindex BE The `be` terminal type is present if gnuplot is built for the `beos` operating system and for use with X servers. It is selected at program startup if the `DISPLAY` environment variable is set, if the `TERM` environment variable is set to `xterm`, or if the `-display` command line option is used. Syntax: @example set terminal be @{reset@} @{<n>@} @end example Multiple plot windows are supported: `set terminal be <n>` directs the output to plot window number n. If n>0, the terminal number will be appended to the window title and the icon will be labeled `gplt <n>`. The active window may distinguished by a change in cursor (from default to crosshair.) Plot windows remain open even when the `gnuplot` driver is changed to a different device. A plot window can be closed by pressing the letter q while that window has input focus, or by choosing `close` from a window manager menu. All plot windows can be closed by specifying @ref{reset}, which actually terminates the subprocess which maintains the windows (unless `-persist` was specified). Plot windows will automatically be closed at the end of the session unless the `-persist` option was given. The size or aspect ratio of a plot may be changed by resizing the `gnuplot` window. Linewidths and pointsizes may be changed from within `gnuplot` with `set linestyle`. For terminal type `be`, `gnuplot` accepts (when initialized) the standard X Toolkit options and resources such as geometry, font, and name from the command line arguments or a configuration file. See the X(1) man page (or its equivalent) for a description of such options. A number of other `gnuplot` options are available for the `be` terminal. These may be specified either as command-line options when `gnuplot` is invoked or as resources in the configuration file ".Xdefaults". They are set upon initialization and cannot be altered during a `gnuplot` session. @menu * command-line_options:: * monochrome_options:: * color_resources:: * grayscale_resources:: * line_resources:: @end menu @node command-line_options, monochrome_options, be, be @subsubsection command-line_options @c ?commands set terminal be command-line-options @c ?set terminal be command-line-options @c ?set term be command-line-options @c ?be command-line-options In addition to the X Toolkit options, the following options may be specified on the command line when starting `gnuplot` or as resources in your ".Xdefaults" file: @example `-mono` forces monochrome rendering on color displays. `-gray` requests grayscale rendering on grayscale or color displays. (Grayscale displays receive monochrome rendering by default.) `-clear` requests that the window be cleared momentarily before a new plot is displayed. `-raise` raises plot window after each plot `-noraise` does not raise plot window after each plot `-persist` plots windows survive after main gnuplot program exits @end example The options are shown above in their command-line syntax. When entered as resources in ".Xdefaults", they require a different syntax. Example: @example gnuplot*gray: on @end example `gnuplot` also provides a command line option (`-pointsize <v>`) and a resource, `gnuplot*pointsize: <v>`, to control the size of points plotted with the `points` plotting style. The value `v` is a real number (greater than 0 and less than or equal to ten) used as a scaling factor for point sizes. For example, `-pointsize 2` uses points twice the default size, and `-pointsize 0.5` uses points half the normal size. @node monochrome_options, color_resources, command-line_options, be @subsubsection monochrome_options @c ?commands set terminal be monochrome_options @c ?set terminal be monochrome_options @c ?set term be monochrome_options @c ?be monochrome_options For monochrome displays, `gnuplot` does not honor foreground or background colors. The default is black-on-white. `-rv` or `gnuplot*reverseVideo: on` requests white-on-black. @node color_resources, grayscale_resources, monochrome_options, be @subsubsection color_resources @c ?commands set terminal be color_resources @c ?set terminal be color_resources @c ?set term be color_resources @c ?be color_resources For color displays, `gnuplot` honors the following resources (shown here with their default values) or the greyscale resources. The values may be color names as listed in the BE rgb.txt file on your system, hexadecimal RGB color specifications (see BE documentation), or a color name followed by a comma and an `intensity` value from 0 to 1. For example, `blue, 0.5` means a half intensity blue. @example gnuplot*background: white gnuplot*textColor: black gnuplot*borderColor: black gnuplot*axisColor: black gnuplot*line1Color: red gnuplot*line2Color: green gnuplot*line3Color: blue gnuplot*line4Color: magenta gnuplot*line5Color: cyan gnuplot*line6Color: sienna gnuplot*line7Color: orange gnuplot*line8Color: coral @end example The command-line syntax for these is, for example, Example: @example gnuplot -background coral @end example @node grayscale_resources, line_resources, color_resources, be @subsubsection grayscale_resources @c ?commands set terminal be grayscale_resources @c ?set terminal be grayscale_resources @c ?set term be grayscale_resources @c ?be grayscale_resources When `-gray` is selected, `gnuplot` honors the following resources for grayscale or color displays (shown here with their default values). Note that the default background is black. @example gnuplot*background: black gnuplot*textGray: white gnuplot*borderGray: gray50 gnuplot*axisGray: gray50 gnuplot*line1Gray: gray100 gnuplot*line2Gray: gray60 gnuplot*line3Gray: gray80 gnuplot*line4Gray: gray40 gnuplot*line5Gray: gray90 gnuplot*line6Gray: gray50 gnuplot*line7Gray: gray70 gnuplot*line8Gray: gray30 @end example @node line_resources, , grayscale_resources, be @subsubsection line_resources @c ?commands set terminal be line_resources @c ?set terminal be line_resources @c ?set term be line_resources @c ?be line_resources `gnuplot` honors the following resources for setting the width (in pixels) of plot lines (shown here with their default values.) 0 or 1 means a minimal width line of 1 pixel width. A value of 2 or 3 may improve the appearance of some plots. @example gnuplot*borderWidth: 2 gnuplot*axisWidth: 0 gnuplot*line1Width: 0 gnuplot*line2Width: 0 gnuplot*line3Width: 0 gnuplot*line4Width: 0 gnuplot*line5Width: 0 gnuplot*line6Width: 0 gnuplot*line7Width: 0 gnuplot*line8Width: 0 @end example `gnuplot` honors the following resources for setting the dash style used for plotting lines. 0 means a solid line. A two-digit number `jk` (`j` and `k` are >= 1 and <= 9) means a dashed line with a repeated pattern of `j` pixels on followed by `k` pixels off. For example, '16' is a "dotted" line with one pixel on followed by six pixels off. More elaborate on/off patterns can be specified with a four-digit value. For example, '4441' is four on, four off, four on, one off. The default values shown below are for monochrome displays or monochrome rendering on color or grayscale displays. For color displays, the default for each is 0 (solid line) except for `axisDashes` which defaults to a '16' dotted line. @example gnuplot*borderDashes: 0 gnuplot*axisDashes: 16 gnuplot*line1Dashes: 0 gnuplot*line2Dashes: 42 gnuplot*line3Dashes: 13 gnuplot*line4Dashes: 44 gnuplot*line5Dashes: 15 gnuplot*line6Dashes: 4441 gnuplot*line7Dashes: 42 gnuplot*line8Dashes: 13 @end example @node epscairo, canvas, be, complete_list_of_terminals @subsection epscairo @c ?set terminal epscairo @c ?terminal epscairo @c ?set term epscairo @c ?term epscairo @cindex epscairo @tmindex epscairo The `epscairo` terminal device generates encapsulated PostScript (*.eps) using the cairo and pango support libraries. cairo verion >= 1.6 is required. Please read the help for the `pdfcairo` terminal." @node canvas, cgi, epscairo, complete_list_of_terminals @subsection canvas @c ?commands set terminal canvas @c ?set terminal canvas @c ?set term canvas @c ?terminal canvas @c ?term canvas The `canvas` terminal creates a set of javascript commands that draw onto the HTML5 canvas element. Syntax: @example set terminal canvas @{size <xsize>, <ysize>@} @{background <rgb_color>@} @{font @{<fontname>@}@{,<fontsize>@}@} | @{fsize <fontsize>@} @{@{no@}enhanced@} @{linewidth <lw>@} @{rounded | butt@} @{solid | dashed @{dashlength <dl>@}@} @{standalone @{mousing@} | name '<funcname>'@} @{jsdir 'URL/for/javascripts'@} @{title '<some string>'@} @end example where <xsize> and <ysize> set the size of the plot area in pixels. The default size in standalone mode is 600 by 400 pixels. The default font size is 10. NB: Only one font is available, the ascii portion of Hershey simplex Roman provided in the file canvastext.js. You can replace this with the file canvasmath.js, which contains also UTF-8 encoded Hershey simplex Greek and math symbols. For consistency with other terminals, it is also possible to use `font "name,size"`. Currently the font `name` is ignored, but browser support for named fonts is likely to arrive eventually. The default `standalone` mode creates an html page containing javascript code that renders the plot using the HTML 5 canvas element. The html page links to two required javascript files 'canvastext.js' and 'gnuplot_common.js'. An additional file 'gnuplot_dashedlines.js' is needed to support dashed lines. By default these point to local files, on unix-like systems usually in directory /usr/local/share/gnuplot/<version>/js. See installation notes for other platforms. You can change this by using the `jsdir` option to specify either a different local directory or a general URL. The latter is usually appropriate if the plot is exported for viewing on remote client machines. All plots produced by the canvas terminal are mouseable. The additional keyword `mousing` causes the `standalone` mode to add a mouse-tracking box underneath the plot. It also adds a link to a javascript file 'gnuplot_mouse.js' and to a stylesheet for the mouse box 'gnuplot_mouse.css' in the same local or URL directory as 'canvastext.js'. The `name` option creates a file containing only javascript. Both the javascript function it contains and the id of the canvas element that it draws onto are taken from the following string parameter. The commands @example set term canvas name 'fishplot' set output 'fishplot.js' @end example will create a file containing a javascript function fishplot() that will draw onto a canvas with id=fishplot. An html page that invokes this javascript function must also load the canvastext.js function as described above. A minimal html file to wrap the fishplot created above might be: @example <html> <head> <script src="canvastext.js"></script> <script src="gnuplot_common.js"></script> </head> <body onload="fishplot();"> <script src="fishplot.js"></script> <canvas id="fishplot" width=600 height=400> <div id="err_msg">No support for HTML 5 canvas element</div> </canvas> </body> </html> @end example The individual plots drawn on this canvas will have names fishplot_plot_1, fishplot_plot_2, and so on. These can be referenced by external javascript routines, for example gnuplot.toggle_visibility("fishplot_plot_2"). @node cgi, cgm, canvas, complete_list_of_terminals @subsection cgi @c ?commands set terminal cgi @c ?set terminal cgi @c ?set term cgi @c ?terminal cgi @c ?term cgi @cindex cgi @tmindex cgi @c ?commands set terminal hcgi @c ?set terminal hcgi @c ?set term hcgi @c ?terminal hcgi @c ?term hcgi @cindex hcgi @tmindex hcgi The `cgi` and `hcgi` terminal drivers support SCO CGI drivers. `hcgi` is for printers; the environment variable CGIPRNT must be set. `cgi` may be used for either a display or hardcopy; the environment variable CGIDISP is checked, first, then CGIPRNT. These terminals have no options." @node cgm, context, cgi, complete_list_of_terminals @subsection cgm @c ?commands set terminal cgm @c ?set terminal cgm @c ?set term cgm @c ?terminal cgm @c ?term cgm @cindex cgm @tmindex cgm The `cgm` terminal generates a Computer Graphics Metafile, Version 1. This file format is a subset of the ANSI X3.122-1986 standard entitled "Computer Graphics - Metafile for the Storage and Transfer of Picture Description Information". Syntax: @example set terminal cgm @{color | monochrome@} @{solid | dashed@} @{@{no@}rotate@} @{<mode>@} @{width <plot_width>@} @{linewidth <line_width>@} @{font "<fontname>,<fontsize>"@} @{background <rgb_color>@} [deprecated] @{<color0> <color1> <color2> ...@} @end example `solid` draws all curves with solid lines, overriding any dashed patterns; <mode> is `landscape`, `portrait`, or `default`; <plot_width> is the assumed width of the plot in points; <line_width> is the line width in points (default 1); <fontname> is the name of a font (see list of fonts below) <fontsize> is the size of the font in points (default 12). The first six options can be in any order. Selecting `default` sets all options to their default values. The mechanism of setting line colors in the `set term` command is deprecated. Instead you should set the background using a separate keyword and set the line colors using `set linetype`. The deprecated mechanism accepted colors of the form 'xrrggbb', where x is the literal character 'x' and 'rrggbb' are the red, green and blue components in hex. The first color was used for the background, subsequent colors are assigned to successive line types. Examples: @example set terminal cgm landscape color rotate dashed width 432 \\ linewidth 1 'Helvetica Bold' 12 # defaults set terminal cgm linewidth 2 14 # wider lines & larger font set terminal cgm portrait "Times Italic" 12 set terminal cgm color solid # no pesky dashes! @end example @menu * cgm_font:: * cgm_fontsize:: * cgm_linewidth:: * cgm_rotate:: * cgm_solid:: * cgm_size:: * cgm_width:: * cgm_nofontlist:: @end menu @node cgm_font, cgm_fontsize, cgm, cgm @subsubsection cgm font @c ?commands set terminal cgm font @c ?set terminal cgm font @c ?set term cgm font @c ?cgm font The first part of a Computer Graphics Metafile, the metafile description, includes a font table. In the picture body, a font is designated by an index into this table. By default, this terminal generates a table with the following 35 fonts, plus six more with `italic` replaced by `oblique`, or vice-versa (since at least the Microsoft Office and Corel Draw CGM import filters treat `italic` and `oblique` as equivalent): @example Helvetica Helvetica Bold Helvetica Oblique Helvetica Bold Oblique Times Roman Times Bold Times Italic Times Bold Italic Courier Courier Bold Courier Oblique Courier Bold Oblique Symbol Hershey/Cartographic_Roman Hershey/Cartographic_Greek Hershey/Simplex_Roman Hershey/Simplex_Greek Hershey/Simplex_Script Hershey/Complex_Roman Hershey/Complex_Greek Hershey/Complex_Script Hershey/Complex_Italic Hershey/Complex_Cyrillic Hershey/Duplex_Roman Hershey/Triplex_Roman Hershey/Triplex_Italic Hershey/Gothic_German Hershey/Gothic_English Hershey/Gothic_Italian Hershey/Symbol_Set_1 Hershey/Symbol_Set_2 Hershey/Symbol_Math ZapfDingbats Script 15 @end example The first thirteen of these fonts are required for WebCGM. The Microsoft Office CGM import filter implements the 13 standard fonts listed above, and also 'ZapfDingbats' and 'Script'. However, the script font may only be accessed under the name '15'. For more on Microsoft import filter font substitutions, check its help file which you may find here: @example C:\\Program Files\\Microsoft Office\\Office\\Cgmimp32.hlp @end example and/or its configuration file, which you may find here: @example C:\\Program Files\\Common Files\\Microsoft Shared\\Grphflt\\Cgmimp32.cfg @end example In the `set term` command, you may specify a font name which does not appear in the default font table. In that case, a new font table is constructed with the specified font as its first entry. You must ensure that the spelling, capitalization, and spacing of the name are appropriate for the application that will read the CGM file. (Gnuplot and any MIL-D-28003A compliant application ignore case in font names.) If you need to add several new fonts, use several `set term` commands. Example: @example set terminal cgm 'Old English' set terminal cgm 'Tengwar' set terminal cgm 'Arabic' set output 'myfile.cgm' plot ... set output @end example You cannot introduce a new font in a `set label` command. @node cgm_fontsize, cgm_linewidth, cgm_font, cgm @subsubsection cgm fontsize @c ?commands set terminal cgm fontsize @c ?set terminal cgm fontsize @c ?set term cgm fontsize @c ?cgm fontsize Fonts are scaled assuming the page is 6 inches wide. If the @ref{size} command is used to change the aspect ratio of the page or the CGM file is converted to a different width, the resulting font sizes will be scaled up or down accordingly. To change the assumed width, use the `width` option. @node cgm_linewidth, cgm_rotate, cgm_fontsize, cgm @subsubsection cgm linewidth @c ?commands set terminal cgm linewidth @c ?set terminal cgm linewidth @c ?set term cgm linewidth @c ?cgm linewidth The `linewidth` option sets the width of lines in pt. The default width is 1 pt. Scaling is affected by the actual width of the page, as discussed under the `fontsize` and `width` options. @node cgm_rotate, cgm_solid, cgm_linewidth, cgm @subsubsection cgm rotate @c ?commands set terminal cgm rotate @c ?set terminal cgm rotate @c ?set term cgm rotate @c ?cgm rotate The `norotate` option may be used to disable text rotation. For example, the CGM input filter for Word for Windows 6.0c can accept rotated text, but the DRAW editor within Word cannot. If you edit a graph (for example, to label a curve), all rotated text is restored to horizontal. The Y axis label will then extend beyond the clip boundary. With `norotate`, the Y axis label starts in a less attractive location, but the page can be edited without damage. The `rotate` option confirms the default behavior. @node cgm_solid, cgm_size, cgm_rotate, cgm @subsubsection cgm solid @c ?set terminal cgm solid @c ?set term cgm solid @c ?cgm solid The `solid` option may be used to disable dashed line styles in the plots. This is useful when color is enabled and the dashing of the lines detracts from the appearance of the plot. The `dashed` option confirms the default behavior, which gives a different dash pattern to each line type. @node cgm_size, cgm_width, cgm_solid, cgm @subsubsection cgm size @c ?commands set terminal cgm size @c ?set terminal cgm size @c ?set term cgm size @c ?cgm size Default size of a CGM plot is 32599 units wide and 23457 units high for landscape, or 23457 units wide by 32599 units high for portrait. @node cgm_width, cgm_nofontlist, cgm_size, cgm @subsubsection cgm width @c ?commands set terminal cgm width @c ?set terminal cgm width @c ?set term cgm width @c ?cgm width All distances in the CGM file are in abstract units. The application that reads the file determines the size of the final plot. By default, the width of the final plot is assumed to be 6 inches (15.24 cm). This distance is used to calculate the correct font size, and may be changed with the `width` option. The keyword should be followed by the width in points. (Here, a point is 1/72 inch, as in PostScript. This unit is known as a "big point" in TeX.) Gnuplot `expressions` can be used to convert from other units. Example: @example set terminal cgm width 432 # default set terminal cgm width 6*72 # same as above set terminal cgm width 10/2.54*72 # 10 cm wide @end example @node cgm_nofontlist, , cgm_width, cgm @subsubsection cgm nofontlist @c ?commands set terminal cgm nofontlist @c ?set terminal cgm nofontlist @c ?set term cgm nofontlist @c ?cgm nofontlist @c ?set terminal cgm winword6 @c ?set term cgm winword6 @c ?cgm winword6 The default font table includes the fonts recommended for WebCGM, which are compatible with the Computer Graphics Metafile input filter for Microsoft Office and Corel Draw. Another application might use different fonts and/or different font names, which may not be documented. The `nofontlist` (synonym `winword6`) option deletes the font table from the CGM file. In this case, the reading application should use a default table. Gnuplot will still use its own default font table to select font indices. Thus, 'Helvetica' will give you an index of 1, which should get you the first entry in your application's default font table. 'Helvetica Bold' will give you its second entry, etc. @node context, corel, cgm, complete_list_of_terminals @subsection context @c ?commands set terminal context @c ?set terminal context @c ?terminal context @c ?set term context @c ?term context @cindex context @tmindex context ConTeXt is a macro package for TeX, highly integrated with Metapost (for drawing figures) and intended for creation of high-quality PDF documents. The terminal outputs Metafun source, which can be edited manually, but you should be able to configure most things from outside. For an average user of ConTeXt + gnuplot module it's recommended to refer to `Using ConTeXt` rather than reading this page or to read the manual of the gnuplot module for ConTeXt. The `context` terminal supports the following options: Syntax: @example set term context @{default@} @{defaultsize | size <scale> | size <xsize>@{in|cm@}, <ysize>@{in|cm@}@} @{input | standalone@} @{timestamp | notimestamp@} @{noheader | header "<header>"@} @{color | colour | monochrome@} @{rounded | mitered | beveled@} @{round | butt | squared@} @{dashed | solid@} @{dashlength | dl <dl>@} @{linewidth | lw <lw>@} @{fontscale <fontscale>@} @{mppoints | texpoints@} @{inlineimages | externalimages@} @{defaultfont | font "@{<fontname>@}@{,<fontsize>@}"@} @end example In non-standalone (`input`) graphic only parameters @ref{size} to select graphic size, `fontscale` to scale all the labels for a factor <fontscale> and font size, make sense, the rest is silently ignored and should be configured in the .tex file which inputs the graphic. It's highly recommended to set the proper fontsize if document font differs from 12pt, so that gnuplot will know how much space to reserve for labels. `default` resets all the options to their default values. `defaultsize` sets the plot size to 5in,3in. @ref{size} <scale> sets the plot size to <scale> times <default value>. If two arguments are given (separated with ','), the first one sets the horizontal size and the second one the vertical size. Size may be given without units (in which case it means relative to the default value), with inches ('in') or centimeters ('cm'). `input` (default) creates a graphic that can be included into another ConTeXt document. `standalone` adds some lines, so that the document might be compiled as-is. You might also want to add `header` in that case. Use `header` for any additional settings/definitions/macros that you might want to include in a standalone graphic. `noheader` is the default. `notimestamp` prevents printing creation time in comments (if version control is used, one may prefer not to commit new version when only date changes). `color` to make color plots is the default, but `monochrome` doesn't do anything special yet. If you have any good ideas how the behaviour should differ to suit the monochrome printers better, your suggestions are welcome. `rounded` (default), `mitered` and `beveled` control the shape of line joins. `round` (default), `butt` and `squared` control the shape of line caps. See PostScript or PDF Reference Manual for explanation. For wild-behaving functions and thick lines it is better to use `rounded` and `round` to prevent sharp corners in line joins. (Some general support for this should be added to Gnuplot, so that the same options could be set for each line (style) separately). `dashed` (default) uses different dash patterns for different line types, `solid` draws all plots with solid lines. `dashlength` or `dl` scales the length of the dashed-line segments by <dl>. `linewidth` or `lw` scales all linewidths by <lw>. (lw 1 stands for 0.5bp, which is the default line width when drawing with Metapost.) `fontscale` scales text labels for factor <fontscale> relative to default document font. `mppoints` uses predefined point shapes, drawn in Metapost. `texpoints` uses easily configurable set of symbols, defined with ConTeXt in the following way: @example \\defineconversion[my own points][+,@{\\ss x@},\\mathematics@{\\circ@}] \\setupGNUPLOTterminal[context][points=tex,pointset=my own points] @end example `inlineimages` writes binary images to a string and only works in ConTeXt MKIV. `externalimages` writes PNG files to disk and also works with ConTeXt MKII. Gnuplot needs to have support for PNG images built in for this to work. With `font` you can set font name and size in standalone graphics. In non-standalone (`input`) mode only the font size is important to reserve enough space for text labels. The command @example set term context font "myfont,ss,10" @end example will result in @example \\setupbodyfont[myfont,ss,10pt] @end example If you additionaly set `fontscale` to 0.8 for example, then the resulting font will be 8pt big and @example set label ... font "myfont,12" @end example will come out as 9.6pt. It is your own responsibility to provide proper typescripts (and header), otherwise switching the font will have no effect. For a standard font in ConTeXt MKII (pdfTeX) you could use: @example set terminal context standalone header '\\usetypescript[iwona][ec]' \\ font "iwona,ss,11" @end example Please take a look into ConTeXt documentation, wiki or mailing list (archives) for any up-to-date information about font usage. Examples: @example set terminal context size 10cm, 5cm # 10cm, 5cm set terminal context size 4in, 3in # 4in, 3in @end example For standalone (whole-page) plots with labels in UTF-8 encoding: @example set terminal context standalone header '\\enableregime[utf-8]' @end example , /* TODO: LaTeX formatting */ @menu * Requirements:: * Calling_gnuplot_from_ConTeXt:: @end menu @node Requirements, Calling_gnuplot_from_ConTeXt, context, context @subsubsection Requirements You need gnuplot module for ConTeXt @uref{http://ctan.org/pkg/context-gnuplot,http://ctan.org/pkg/context-gnuplot } and a recent version of ConTeXt. If you want to call gnuplot on-the-fly, you also need write18 enabled. In most TeX distributions this can be set with shell_escape=t in texmf.cnf. See @uref{http://wiki.contextgarden.net/Gnuplot,http://wiki.contextgarden.net/Gnuplot } for details about this terminal and for more exhaustive help & examples. @node Calling_gnuplot_from_ConTeXt, , Requirements, context @subsubsection Calling gnuplot from ConTeXt The easiest way to make plots in ConTeXt documents is @example \\usemodule[gnuplot] \\starttext \\title@{How to draw nice plots with @{\\sc gnuplot@}?@} \\startGNUPLOTscript[sin] set format y "%.1f" plot sin(x) t '$\\sin(x)$' \\stopGNUPLOTscript \\useGNUPLOTgraphic[sin] \\stoptext @end example This will run gnuplot automatically and include the resulting figure in the document." @node corel, debug, context, complete_list_of_terminals @subsection corel @c ?commands set terminal corel @c ?set terminal corel @c ?set term corel @c ?terminal corel @c ?term corel @cindex corel @tmindex corel The `corel` terminal driver supports CorelDraw. Syntax: @example set terminal corel @{ default | @{monochrome | color @{"<font>" @{<fontsize> @{<xsize> <ysize> @{<linewidth> @}@}@}@}@} @end example where the fontsize and linewidth are specified in points and the sizes in inches. The defaults are monochrome, "SwitzerlandLight", 22, 8.2, 10 and 1.2." @node debug, svga, corel, complete_list_of_terminals @subsection debug @c ?commands set terminal debug @c ?set terminal debug @c ?set term debug @c ?terminal debug @c ?term debug @cindex debug @tmindex debug This terminal is provided to allow for the debugging of `gnuplot`. It is likely to be of use only for users who are modifying the source code." @node svga, dumb, debug, complete_list_of_terminals @subsection svga @c ?commands set terminal svga @c ?set terminal svga @c ?set term svga @c ?terminal svga @c ?term svga @cindex svga @tmindex svga The `svga` terminal driver supports PCs with SVGA graphics. It can only be used if it is compiled with DJGPP. Its only option is the font. Syntax: @example set terminal svga @{"<fontname>"@}" @end example @node dumb, dxf, svga, complete_list_of_terminals @subsection dumb @c ?commands set terminal dumb @c ?set terminal dumb @c ?set term dumb @c ?terminal dumb @c ?term dumb @cindex dumb @tmindex dumb The `dumb` terminal driver plots into a text block using ascii characters. It has an optional size specification and a trailing linefeed flag. Syntax: @example set terminal dumb @{size <xchars>,<ychars>@} @{[no]feed@} @{[no]enhanced@} @end example where <xchars> and <ychars> set the size of the text block. The default is 79 by 24. The last newline is printed only if `feed` is enabled. Example: @example set term dumb size 60,15 plot [-5:6.5] sin(x) with impulse @end example @example 1 +-------------------------------------------------+ 0.8 +|||++ ++||||++ sin(x) +----+ | 0.6 +|||||+ ++|||||||+ | 0.4 +||||||+ ++|||||||||+ | 0.2 +|||||||+ ++|||||||||||+ +| 0 ++++++++++++++++++++++++++++++++++++++++++++++++++| -0.2 + +|||||||||||+ +|||||||||||+ | -0.4 + +|||||||||+ +|||||||||+ | -0.6 + +|||||||+ +|||||||+ | -0.8 + + ++||||+ + + ++||||+ + | -1 +---+--------+--------+-------+--------+--------+-+ -4 -2 0 2 4 6 " @end example @node dxf, dxy800a, dumb, complete_list_of_terminals @subsection dxf @c ?commands set terminal dxf @c ?set terminal dxf @c ?set term dxf @c ?terminal dxf @c ?term dxf @cindex dxf @tmindex dxf The `dxf` terminal driver creates pictures that can be imported into AutoCad (Release 10.x). It has no options of its own, but some features of its plots may be modified by other means. The default size is 120x80 AutoCad units, which can be changed by @ref{size}. `dxf` uses seven colors (white, red, yellow, green, cyan, blue and magenta), which can be changed only by modifying the source file. If a black-and-white plotting device is used, the colors are mapped to differing line thicknesses. See the description of the AutoCad print/plot command." @node dxy800a, eepic, dxf, complete_list_of_terminals @subsection dxy800a @c ?commands set terminal dxy800a @c ?set terminal dxy800a @c ?set term dxy800a @c ?terminal dxy800a @c ?term dxy800a @cindex dxy800a @tmindex dxy800a This terminal driver supports the Roland DXY800A plotter. It has no options." @node eepic, emf, dxy800a, complete_list_of_terminals @subsection eepic @c ?commands set terminal eepic @c ?set terminal eepic @c ?set term eepic @c ?terminal eepic @c ?term eepic @cindex eepic @tmindex eepic The `eepic` terminal driver supports the extended LaTeX picture environment. It is an alternative to the `latex` driver. The output of this terminal is intended for use with the "eepic.sty" macro package for LaTeX. To use it, you need "eepic.sty", "epic.sty" and a printer driver that supports the "tpic" \\specials. If your printer driver doesn't support those \\specials, "eepicemu.sty" will enable you to use some of them. dvips and dvipdfm do support the "tpic" \\specials. Syntax: @example set terminal eepic @{default@} @{color|dashed@} @{rotate@} @{size XX,YY@} @{small|tiny|<fontsize>@} @end example Options: You can give options in any order you wish. 'color' causes gnuplot to produce \\color@{...@} commands so that the graphs are colored. Using this option, you must include \\usepackage@{color@} in the preambel of your latex document. 'dashed' will allow dashed line types; without this option, only solid lines with varying thickness will be used. 'dashed' and 'color' are mutually exclusive; if 'color' is specified, then 'dashed' will be ignored. 'rotate' will enable true rotated text (by 90 degrees). Otherwise, rotated text will be typeset with letters stacked above each other. If you use this option you must include \\usepackage@{graphicx@} in the preamble. 'small' will use \\scriptsize symbols as point markers (Probably does not work with TeX, only LaTeX2e). Default is to use the default math size. 'tiny' uses \\scriptscriptstyle symbols. 'default' resets all options to their defaults = no color, no dashed lines, pseudo-rotated (stacked) text, large point symbols. <fontsize> is a number which specifies the font size inside the picture environment; the unit is pt (points), i.e., 10 pt equals approx. 3.5 mm. If fontsize is not specified, then all text inside the picture will be set in \\footnotesize. Notes: Remember to escape the # character (or other chars meaningful to (La-)TeX) by \\\\ (2 backslashes). It seems that dashed lines become solid lines when the vertices of a plot are too close. (I do not know if that is a general problem with the tpic specials, or if it is caused by a bug in eepic.sty or dvips/dvipdfm.) The default size of an eepic plot is 5x3 inches. You can change this using the @ref{size} terminal option. Points, among other things, are drawn using the LaTeX commands "\\Diamond", "\\Box", etc. These commands no longer belong to the LaTeX2e core; they are included in the latexsym package, which is part of the base distribution and thus part of any LaTeX implementation. Please do not forget to use this package. Instead of latexsym, you can also include the amssymb package. All drivers for LaTeX offer a special way of controlling text positioning: If any text string begins with '@{', you also need to include a '@}' at the end of the text, and the whole text will be centered both horizontally and vertically. If the text string begins with '[', you need to follow this with a position specification (up to two out of t,b,l,r), ']@{', the text itself, and finally '@}'. The text itself may be anything LaTeX can typeset as an LR-box. '\\rule@{@}@{@}'s may help for best positioning. Examples: set term eepic @example output graphs as eepic macros inside a picture environment; \\input the resulting file in your LaTeX document. @end example set term eepic color tiny rotate 8 @example eepic macros with \\color macros, \\scripscriptsize point markers, true rotated text, and all text set with 8pt. @end example About label positioning: Use gnuplot defaults (mostly sensible, but sometimes not really best): @example set title '\\LaTeX\\ -- $ \\gamma $' @end example Force centering both horizontally and vertically: @example set label '@{\\LaTeX\\ -- $ \\gamma $@}' at 0,0 @end example Specify own positioning (top here): @example set xlabel '[t]@{\\LaTeX\\ -- $ \\gamma $@}' @end example The other label -- account for long ticlabels: @example set ylabel '[r]@{\\LaTeX\\ -- $ \\gamma $\\rule@{7mm@}@{0pt@}@}'" @end example @node emf, emxvga, eepic, complete_list_of_terminals @subsection emf @c ?commands set terminal emf @c ?set terminal emf @c ?set term emf @c ?terminal emf @c ?term emf @cindex emf @tmindex emf The `emf` terminal generates an Enhanced Metafile Format file. This file format is recognized by many Windows applications. Syntax: @example set terminal emf @{color | monochrome@} @{solid | dashed@} @{enhanced @{noproportional@}@} @{rounded | butt@} @{linewidth <LW>@} @{dashlength <DL>@} @{size XX,YY@} @{background <rgb_color>@} @{font "<fontname>@{,<fontsize>@}"@} @{fontscale <scale>@} @end example In `monochrome` mode successive line types cycle through dash patterns. In `color` mode successive line types use successive colors, and only after all 8 default colors are exhausted is the dash pattern incremented. `solid` draws all curves with solid lines, overriding any dashed patterns; `linewidth <factor>` multiplies all line widths by this factor. `dashlength <factor>` is useful for thick lines. <fontname> is the name of a font; and `<fontsize>` is the size of the font in points. The nominal size of the output image defaults to 1024x768 in arbitrary units. You may specify a different nominal size using the @ref{size} option. Enhanced text mode tries to approximate proportional character spacing. If you are using a monospaced font, or don't like the approximation, you can turn off this correction using the `noproportional` option. The default settings are `color solid font "Arial,12" size 1024,768` Selecting `default` sets all options to their default values. Examples: @example set terminal emf 'Times Roman Italic, 12' set terminal emf dashed # otherwise all lines are solid" @end example @node emxvga, epson_180dpi, emf, complete_list_of_terminals @subsection emxvga @c ?commands set terminal emxvga @c ?set terminal emxvga @c ?set term emxvga @c ?terminal emxvga @c ?term emxvga @cindex emxvga @tmindex emxvga @c ?commands set terminal emxvesa @c ?set terminal emxvesa @c ?set term emxvesa @c ?terminal emxvesa @c ?term emxvesa @cindex emxvesa @tmindex emxvesa @c ?commands set terminal vgal @c ?set terminal vgal @c ?set term vgal @c ?terminal vgal @c ?term vgal @cindex vgal @tmindex vgal The `emxvga`, `emxvesa` and `vgal` terminal drivers support PCs with SVGA, vesa SVGA and VGA graphics boards, respectively. They are intended to be compiled with "emx-gcc" under either DOS or OS/2. They also need VESA and SVGAKIT maintained by Johannes Martin (JMARTIN@@GOOFY.ZDV.UNI-MAINZ.DE) with additions by David J. Liu (liu@@phri.nyu.edu). Syntax: @example set terminal emxvga set terminal emxvesa @{vesa-mode@} set terminal vgal @end example The only option is the vesa mode for `emxvesa`, which defaults to G640x480x256." @node epson_180dpi, excl, emxvga, complete_list_of_terminals @subsection epson_180dpi @c ?commands set terminal epson_180dpi @c ?set terminal epson_180dpi @c ?set term epson_180dpi @c ?terminal epson_180dpi @c ?term epson_180dpi @cindex epson_180dpi @c ?commands set terminal epson_60dpi @c ?set terminal epson_60dpi @c ?set term epson_60dpi @c ?terminal epson_60dpi @c ?term epson_60dpi @cindex epson_60dpi @c ?commands set terminal epson_lx800 @c ?set terminal epson_lx800 @c ?set term epson_lx800 @c ?terminal epson_lx800 @c ?term epson_lx800 @cindex epson_lx800 @c ?commands set terminal nec_cp6 @c ?set terminal nec_cp6 @c ?set term nec_cp6 @c ?terminal nec_cp6 @c ?term nec_cp6 @cindex nec_cp6 @c ?commands set terminal okidata @c ?set terminal okidata @c ?set term okidata @c ?terminal okidata @c ?term okidata @cindex okidata @tmindex okidata @c ?commands set terminal starc @c ?set terminal starc @c ?set term starc @c ?terminal starc @c ?term starc @cindex starc @tmindex starc @c ?commands set terminal tandy_60dpi @c ?set terminal tandy_60dpi @c ?set term tandy_60dpi @c ?terminal tandy_60dpi @c ?term tandy_60dpi @cindex tandy_60dpi @c ?commands set terminal dpu414 @c ?set terminal dpu414 @c ?set term dpu414 @c ?terminal dpu414 @c ?term dpu414 @cindex dpu414 @tmindex dpu414 This driver supports a family of Epson printers and derivatives. `epson_180dpi` and `epson_60dpi` are drivers for Epson LQ-style 24-pin printers with resolutions of 180 and 60 dots per inch, respectively. `epson_lx800` is a generic 9-pin driver appropriate for printers like the Epson LX-800, the Star NL-10 and NX-1000, the PROPRINTER, and so forth. `nec_cp6` is generic 24-pin driver that can be used for printers like the NEC CP6 and the Epson LQ-800. The `okidata` driver supports the 9-pin OKIDATA 320/321 Standard printers. The `starc` driver is for the Star Color Printer. The `tandy_60dpi` driver is for the Tandy DMP-130 series of 9-pin, 60-dpi printers. The `dpu414` driver is for the Seiko DPU-414 thermal printer. `nec_cp6` has the options: Syntax: @example set terminal nec_cp6 @{monochrome | colour | draft@} @end example which defaults to monochrome. `dpu414` has the options: Syntax: @example set terminal dpu414 @{small | medium | large@} @{normal | draft@} @end example which defaults to medium (=font size) and normal. Preferred combinations are `medium normal` and `small draft`. With each of these drivers, a binary copy is required on a PC to print. Do not use @ref{print}---use instead `copy file /b lpt1:`. @node excl, fig, epson_180dpi, complete_list_of_terminals @subsection excl @c ?commands set terminal excl @c ?set terminal excl @c ?set term excl @c ?terminal excl @c ?term excl @cindex excl @tmindex excl The `excl` terminal driver supports Talaris printers such as the EXCL Laser printer and the 1590. It has no options." @node fig, png_, excl, complete_list_of_terminals @subsection fig @c ?commands set terminal fig @c ?set terminal fig @c ?set term fig @c ?terminal fig @c ?term fig @cindex fig @cindex xfig The `fig` terminal device generates output in the Fig graphics language. Syntax: @example set terminal fig @{monochrome | color@} @{landscape | portrait@} @{small | big | size <xsize> <ysize>@} @{metric | inches@} @{pointsmax <max_points>@} @{solid | dashed@} @{font "<fontname>@{,<fontsize>@}"@} @{textnormal | @{textspecial texthidden textrigid@}@} @{@{thickness|linewidth@} <units>@} @{depth <layer>@} @{version <number>@} @end example `monochrome` and `color` determine whether the picture is black-and-white or `color`. `small` and `big` produce a 5x3 or 8x5 inch graph in the default `landscape` mode and 3x5 or 5x8 inches in `portrait` mode. @ref{size} sets (overrides) the size of the drawing area to <xsize>*<ysize> in units of inches or centimeters depending on the `inches` or `metric` setting in effect. The latter settings is also used as default units for editing with "xfig". `pointsmax <max_points>` sets the maximum number of points per polyline. `solid` inhibits automatic usage of `dash`ed lines when solid linestyles are used up, which otherwise occurs. `font` sets the text font face to <fontname> and its size to <fontsize> points. `textnormal` resets the text flags and selects postscript fonts, `textspecial` sets the text flags for LaTeX specials, `texthidden` sets the hidden flag and `textrigid` the rigid flag. `depth` sets the default depth layer for all lines and text. The default depth is 10 to leave room for adding material with "xfig" on top of the plot. @ref{version} sets the format version of the generated fig output. Currently only versions 3.1 and 3.2 are supported. `thickness` sets the default line thickness, which is 1 if not specified. Overriding the thickness can be achieved by adding a multiple of 100 to the `linetype` value for a `plot` command. In a similar way the `depth` of plot elements (with respect to the default depth) can be controlled by adding a multiple of 1000 to <linetype>. The depth is then <layer> + <linetype>/1000 and the thickness is (<linetype>%1000)/100 or, if that is zero, the default line thickness. `linewidth` is a synonym for `thickness`. Additional point-plot symbols are also available with the `fig` driver. The symbols can be used through `pointtype` values % 100 above 50, with different fill intensities controlled by <pointtype> % 5 and outlines in black (for <pointtype> % 10 < 5) or in the current color. Available symbols are @example 50 - 59: circles 60 - 69: squares 70 - 79: diamonds 80 - 89: upwards triangles 90 - 99: downwards triangles @end example The size of these symbols is linked to the font size. The depth of symbols is by default one less than the depth for lines to achieve nice error bars. If <pointtype> is above 1000, the depth is <layer> + <pointtype>/1000-1. If <pointtype>%1000 is above 100, the fill color is (<pointtype>%1000)/100-1. Available fill colors are (from 1 to 9): black, blue, green, cyan, red, magenta, yellow, white and dark blue (in monochrome mode: black for 1 to 6 and white for 7 to 9). See @ref{with} for details of <linetype> and <pointtype>. The `big` option is a substitute for the `bfig` terminal in earlier versions, which is no longer supported. Examples: @example set terminal fig monochrome small pointsmax 1000 # defaults @end example @example plot 'file.dat' with points linetype 102 pointtype 759 @end example would produce circles with a blue outline of width 1 and yellow fill color. @example plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 554 @end example would produce errorbars with black lines and circles filled red. These circles are one layer above the lines (at depth 9 by default). To plot the error bars on top of the circles use @example plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 2554" @end example @node png_, ggi, fig, complete_list_of_terminals @subsection png @c ?commands set terminal png @c ?set terminal png @c ?set term png @c ?terminal png @c ?term png @cindex png @tmindex png Syntax: @example set terminal png @{@{no@}enhanced@} @{@{no@}transparent@} @{@{no@}interlace@} @{@{no@}truecolor@} @{rounded|butt@} @{linewidth <lw>@} @{dashlength <dl>@} @{tiny | small | medium | large | giant@} @{font "<face> @{,<pointsize>@}"@} @{fontscale <scale>@} @{size <x>,<y>@} @{@{no@}crop@} @{background <rgb_color>@} @end example PNG, JPEG and GIF images are created using the external library libgd. PNG plots may be viewed interactively by piping the output to the 'display' program from the ImageMagick package as follows: @example set term png set output '| display png:-' @end example You can view the output from successive plot commands interactively by typing <space> in the display window. To save the current plot to a file, left click in the display window and choose @ref{save}. `transparent` instructs the driver to make the background color transparent. Default is `notransparent`. `interlace` instructs the driver to generate interlaced PNGs. Default is `nointerlace`. The `linewidth` and `dashlength` options are scaling factors that affect all lines drawn, i.e. they are multiplied by values requested in various drawing commands. By default output png images use 256 indexed colors. The `truecolor` option instead creates TrueColor images with 24 bits of color information per pixel. Transparent fill styles require the `truecolor` option. See `fillstyle`. A transparent background is possible in either indexed or TrueColor images. `butt` instructs the driver to use a line drawing method that does not overshoot the desired end point of a line. This setting is only applicable for line widths greater than 1. This setting is most useful when drawing horizontal or vertical lines. Default is `rounded`. The details of font selection are complicated. Two equivalent simple examples are given below: @example set term png font arial 11 set term png font "arial,11" @end example For more information please see the separate section under `fonts`. The output plot size <x,y> is given in pixels---it defaults to 640x480. Please see additional information under `canvas` and @ref{size}. Blank space at the edges of the finished plot may be trimmed using the `crop` option, resulting in a smaller final image size. Default is `nocrop`. @menu * examples:: @end menu @node examples, , png_, png_ @subsubsection examples @c ?set term png examples @example set terminal png medium size 640,480 background '#ffffff' @end example Use the medium size built-in non-scaleable, non-rotatable font. Use white (24-bit RGB in hexadecimal) for the non-transparent background. @example set terminal png font arial 14 size 800,600 @end example Searches for a scalable font with face name 'arial' and sets the font size to 14pt. Please see `fonts` for details of how the font search is done. @example set terminal png transparent truecolor enhanced @end example Use 24 bits of color information per pixel, with a transparent background. Use the `enhanced text` mode to control the layout of strings to be printed. @node ggi, gpic, png_, complete_list_of_terminals @subsection ggi @c ?commands set terminal ggi @c ?set terminal ggi @c ?set term ggi @c ?terminal ggi @c ?term ggi @cindex ggi @tmindex ggi The `ggi` driver can run on different targets as X or svgalib. Syntax: @example set terminal ggi [acceleration <integer>] [[mode] @{mode@}] @end example In X the window cannot be resized using window manager handles, but the mode can be given with the mode option, e.g.: @example - V1024x768 - V800x600 - V640x480 - V320x200 @end example Please refer to the ggi documentation for other modes. The 'mode' keyword is optional. It is recommended to select the target by environment variables as explained in the libggi manual page. To get DGA on X, you should for example @example bash> export GGI_DISPLAY=DGA csh> setenv GGI_DISPLAY DGA @end example 'acceleration' is only used for targets which report relative pointer motion events (e.g. DGA) and is a strictly positive integer multiplication factor for the relative distances. The default for acceleration is 7. Examples: @example set term ggi acc 10 set term ggi acc 1 mode V1024x768 set term ggi V1024x768" @end example @node gpic, grass, ggi, complete_list_of_terminals @subsection gpic @c ?commands set terminal gpic @c ?set terminal gpic @c ?set term gpic @c ?terminal gpic @c ?term gpic @cindex gpic @tmindex gpic The `gpic` terminal driver generates GPIC graphs in the Free Software Foundations's "groff" package. The default size is 5 x 3 inches. The only option is the origin, which defaults to (0,0). Syntax: @example set terminal gpic @{<x> <y>@} @end example where `x` and `y` are in inches. A simple graph can be formatted using @example groff -p -mpic -Tps file.pic > file.ps. @end example The output from pic can be pipe-lined into eqn, so it is possible to put complex functions in a graph with the `set label` and `set @{x/y@}label` commands. For instance, @example set ylab '@@space 0 int from 0 to x alpha ( t ) roman d t@@' @end example will label the y axis with a nice integral if formatted with the command: @example gpic filename.pic | geqn -d@@@@ -Tps | groff -m[macro-package] -Tps > filename.ps @end example Figures made this way can be scaled to fit into a document. The pic language is easy to understand, so the graphs can be edited by hand if need be. All co-ordinates in the pic-file produced by `gnuplot` are given as x+gnuplotx and y+gnuploty. By default x and y are given the value 0. If this line is removed with an editor in a number of files, one can put several graphs in one figure like this (default size is 5.0x3.0 inches): @example .PS 8.0 x=0;y=3 copy "figa.pic" x=5;y=3 copy "figb.pic" x=0;y=0 copy "figc.pic" x=5;y=0 copy "figd.pic" .PE @end example This will produce an 8-inch-wide figure with four graphs in two rows on top of each other. One can also achieve the same thing by the command @example set terminal gpic x y @end example for example, using @example .PS 6.0 copy "trig.pic" .PE" @end example @node grass, hp2623a, gpic, complete_list_of_terminals @subsection grass @c ?commands set terminal grass @c ?set terminal grass @c ?set term grass @c ?terminal grass @c ?term grass @cindex grass @tmindex grass The `grass` terminal driver gives `gnuplot` capabilities to users of the GRASS geographic information system. Contact grassp-list@@moon.cecer.army.mil for more information. Pages are written to the current frame of the GRASS Graphics Window. There are no options." @node hp2623a, hp2648, grass, complete_list_of_terminals @subsection hp2623a @c ?commands set terminal hp2623a @c ?set terminal hp2623a @c ?set term hp2623a @c ?terminal hp2623a @c ?term hp2623a @cindex hp2623a @tmindex hp2623a The `hp2623a` terminal driver supports the Hewlett Packard HP2623A. It has no options." @node hp2648, hp500c, hp2623a, complete_list_of_terminals @subsection hp2648 @c ?commands set terminal hp2648 @c ?set terminal hp2648 @c ?set term hp2648 @c ?terminal hp2648 @c ?term hp2648 @cindex hp2648 @tmindex hp2648 The `hp2648` terminal driver supports the Hewlett Packard HP2647 and HP2648. It has no options." @node hp500c, hpgl, hp2648, complete_list_of_terminals @subsection hp500c @c ?commands set terminal hp500c @c ?set terminal hp500c @c ?set term hp500c @c ?terminal hp500c @c ?term hp500c @cindex hp500c @tmindex hp500c The `hp500c` terminal driver supports the Hewlett Packard HP DeskJet 500c. It has options for resolution and compression. Syntax: @example set terminal hp500c @{<res>@} @{<comp>@} @end example where `res` can be 75, 100, 150 or 300 dots per inch and `comp` can be "rle", or "tiff". Any other inputs are replaced by the defaults, which are 75 dpi and no compression. Rasterization at the higher resolutions may require a large amount of memory." @node hpgl, hpljii, hp500c, complete_list_of_terminals @subsection hpgl @c ?commands set terminal hpgl @c ?set terminal hpgl @c ?set term hpgl @c ?terminal hpgl @c ?term hpgl @cindex hpgl @tmindex hpgl @c ?commands set terminal pcl5 @c ?set terminal pcl5 @c ?set term pcl5 @c ?terminal pcl5 @c ?term pcl5 @cindex pcl5 @tmindex pcl5 The `hpgl` driver produces HPGL output for devices like the HP7475A plotter. There are two options which can be set: the number of pens and `eject`, which tells the plotter to eject a page when done. The default is to use 6 pens and not to eject the page when done. The international character sets ISO-8859-1 and CP850 are recognized via `set encoding iso_8859_1` or `set encoding cp850` (see @ref{encoding} for details). Syntax: @example set terminal hpgl @{<number_of_pens>@} @{eject@} @end example The selection @example set terminal hpgl 8 eject @end example is equivalent to the previous `hp7550` terminal, and the selection @example set terminal hpgl 4 @end example is equivalent to the previous `hp7580b` terminal. The `pcl5` driver supports plotters such as the Hewlett-Packard Designjet 750C, the Hewlett-Packard Laserjet III, and the Hewlett-Packard Laserjet IV. It actually uses HPGL-2, but there is a name conflict among the terminal devices. It has several options which must be specified in the order indicated below: Syntax: @example set terminal pcl5 @{mode <mode>@} @{<plotsize>@} @{@{color @{<number_of_pens>@}@} | monochrome@} @{solid | dashed@} @{font <font>@} @{size <fontsize>@} @{pspoints | nopspoints@} @end example <mode> is `landscape` or `portrait`. <plotsize> is the physical plotting size of the plot, which is one of the following: `letter` for standard (8 1/2" X 11") displays, `legal` for (8 1/2" X 14") displays, `noextended` for (36" X 48") displays (a letter size ratio) or, `extended` for (36" X 55") displays (almost a legal size ratio). `color` is for multi-pen (i.e. color) plots, and <number_of_pens> is the number of pens (i.e. colors) used in color plots. `monochrome` is for one (e.g. black) pen plots. `solid` draws all lines as solid lines, or `dashed` will draw lines with different dashed and dotted line patterns. <font> is `stick`, `univers`, `cg_times`, `zapf_dingbats`, `antique_olive`, `arial`, `courier`, `garamond_antigua`, `letter_gothic`, `cg_omega`, `albertus`, `times_new_roman`, `clarendon`, `coronet`, `marigold`, `truetype_symbols`, or `wingdings`. <fontsize> is the font size in points. The point type selection can be the standard default set by specifying `nopspoints`, or the same set of point types found in the postscript terminal by specifying `pspoints`. Note that built-in support of some of these options is printer device dependent. For instance, all the fonts are supposedly supported by the HP Laserjet IV, but only a few (e.g. univers, stick) may be supported by the HP Laserjet III and the Designjet 750C. Also, color obviously won't work on the the laserjets since they are monochrome devices. Defaults: landscape, noextended, color (6 pens), solid, univers, 12 point, @example and nopspoints. @end example With `pcl5` international characters are handled by the printer; you just put the appropriate 8-bit character codes into the text strings. You don't need to bother with @ref{encoding}. HPGL graphics can be imported by many software packages." @node hpljii, hppj, hpgl, complete_list_of_terminals @subsection hpljii @c ?commands set terminal hpljii @c ?set terminal hpljii @c ?set term hpljii @c ?terminal hpljii @c ?term hpljii @cindex hpljii @tmindex hpljii @c ?commands set terminal hpdj @c ?set terminal hpdj @c ?set term hpdj @c ?terminal hpdj @c ?term hpdj @cindex hpdj @tmindex hpdj The `hpljii` terminal driver supports the HP Laserjet Series II printer. The `hpdj` driver supports the HP DeskJet 500 printer. These drivers allow a choice of resolutions. Syntax: @example set terminal hpljii | hpdj @{<res>@} @end example where `res` may be 75, 100, 150 or 300 dots per inch; the default is 75. Rasterization at the higher resolutions may require a large amount of memory. The `hp500c` terminal is similar to `hpdj`; `hp500c` additionally supports color and compression." @node hppj, imagen, hpljii, complete_list_of_terminals @subsection hppj @c ?commands set terminal hppj @c ?set terminal hppj @c ?set term hppj @c ?terminal hppj @c ?term hppj @cindex hppj @tmindex hppj The `hppj` terminal driver supports the HP PaintJet and HP3630 printers. The only option is the choice of font. Syntax: @example set terminal hppj @{FNT5X9 | FNT9X17 | FNT13X25@} @end example with the middle-sized font (FNT9X17) being the default." @node imagen, kyo, hppj, complete_list_of_terminals @subsection imagen @c ?commands set terminal imagen @c ?set terminal imagen @c ?set term imagen @c ?terminal imagen @c ?term imagen @cindex imagen @tmindex imagen The `imagen` terminal driver supports Imagen laser printers. It is capable of placing multiple graphs on a single page. Syntax: @example set terminal imagen @{<fontsize>@} @{portrait | landscape@} @{[<horiz>,<vert>]@} @end example where `fontsize` defaults to 12 points and the layout defaults to `landscape`. `<horiz>` and `<vert>` are the number of graphs in the horizontal and vertical directions; these default to unity. Example: @example set terminal imagen portrait [2,3] @end example puts six graphs on the page in three rows of two in portrait orientation." @node kyo, latex, imagen, complete_list_of_terminals @subsection kyo @c ?commands set terminal kyo @c ?set terminal kyo @c ?set term kyo @c ?terminal kyo @c ?term kyo @cindex kyo @tmindex kyo @c ?commands set terminal prescribe @c ?set terminal prescribe @c ?set term prescribe @c ?terminal prescribe @c ?term prescribe @cindex prescribe @tmindex prescribe The `kyo` and `prescribe` terminal drivers support the Kyocera laser printer. The only difference between the two is that `kyo` uses "Helvetica" whereas `prescribe` uses "Courier". There are no options." @node latex, linux, kyo, complete_list_of_terminals @subsection latex @c ?commands set terminal emtex @c ?set terminal emtex @c ?set term emtex @c ?terminal emtex @c ?term emtex @cindex emtex @tmindex emtex @c ?commands set terminal latex @c ?set terminal latex @c ?set term latex @c ?terminal latex @c ?term latex @cindex latex @tmindex latex Syntax: @example set terminal @{latex | emtex@} @{default | @{courier|roman@} @{<fontsize>@}@} @{size <XX>@{unit@}, <YY>@{unit@}@} @{rotate | norotate@} @end example By default the plot will inherit font settings from the embedding document. You have the option of forcing either Courier (cmtt) or Roman (cmr) fonts instead. In this case you may also specify a fontsize. Unless your driver is capable of building fonts at any size (e.g. dvips), stick to the standard 10, 11 and 12 point sizes. METAFONT users beware: METAFONT does not like odd sizes. All drivers for LaTeX offer a special way of controlling text positioning: If any text string begins with '@{', you also need to include a '@}' at the end of the text, and the whole text will be centered both horizontally and vertically. If the text string begins with '[', you need to follow this with a position specification (up to two out of t,b,l,r), ']@{', the text itself, and finally '@}'. The text itself may be anything LaTeX can typeset as an LR-box. '\\rule@{@}@{@}'s may help for best positioning. Points, among other things, are drawn using the LaTeX commands "\\Diamond" and "\\Box". These commands no longer belong to the LaTeX2e core; they are included in the latexsym package, which is part of the base distribution and thus part of any LaTeX implementation. Please do not forget to use this package. Other point types use symbols from the amssymb package. The default size for the plot is 5 inches by 3 inches. The @ref{size} option changes this to whatever the user requests. By default the X and Y sizes are taken to be in inches, but other units are possible (currently only cm). If 'rotate' is specified, rotated text, especially a rotated y-axis label, is possible (the packages graphics or graphicx are needed). The 'stacked' y-axis label mechanism is then deactivated. Examples: About label positioning: Use gnuplot defaults (mostly sensible, but sometimes not really best): @example set title '\\LaTeX\\ -- $ \\gamma $' @end example Force centering both horizontally and vertically: @example set label '@{\\LaTeX\\ -- $ \\gamma $@}' at 0,0 @end example Specify own positioning (top here): @example set xlabel '[t]@{\\LaTeX\\ -- $ \\gamma $@}' @end example The other label -- account for long ticlabels: @example set ylabel '[r]@{\\LaTeX\\ -- $ \\gamma $\\rule@{7mm@}@{0pt@}@}'" @end example @node linux, lua, latex, complete_list_of_terminals @subsection linux @c ?commands set terminal linux @c ?set terminal linux @c ?set term linux @c ?terminal linux @c ?term linux @cindex linux @tmindex linux The `linux` driver has no additional options to specify. It looks at the environment variable GSVGAMODE for the default mode; if not set, it uses 1024x768x256 as default mode or, if that is not possible, 640x480x16 (standard VGA)." @node lua, macintosh, linux, complete_list_of_terminals @subsection lua @c ?commands set terminal lua @c ?set terminal lua @c ?set term lua @c ?terminal lua @c ?term lua @cindex lua @tmindex lua The `lua` generic terminal driver works in conjunction with an external Lua script to create a target-specific plot file. Currently the only supported target is TikZ -> pdflatex. Information about Lua is available at http://www.lua.org . Syntax: @example set terminal lua <target name> | "<file name>" @{<script_args> ...@} @{help@} @end example A 'target name' or 'file name' (in quotes) for a script is mandatory. If a 'target name' for the script is given, the terminal will look for "gnuplot-<target name>.lua" in the local directory and on failure in the environmental variable GNUPLOT_LUA_DIR. All arguments will be provided to the selected script for further evaluation. E.g. 'set term lua tikz help' will cause the script itself to print additional help on options and choices for the script. @node macintosh, mf, lua, complete_list_of_terminals @subsection macintosh @c ?set terminal macintosh @c ?set term macintosh @c ?terminal macintosh @c ?term macintosh @cindex macintosh @tmindex macintosh Syntax: @example set terminal macintosh @{singlewin | multiwin@} @{vertical | novertical@} @{size <width>, <height> | default@} @end example 'singlewin' limits the output to a single window and is useful for animations. 'multiwin' allows multiple windows. 'vertical' is only valid under the gx option. With this option, rotated text will be drawn vertically. novertical turns this option off. size <width>, <height> overrides the graph size set in the preferences dialog until it is cleared with either 'set term mac size default' or 'set term mac default'. 'set term mac size default' sets the window size settings to those set in the preferences dialog. 'set term mac default' sets all options to their default values. Default values: nogx, multiwin, novertical. If you generate graphs under the multiwin option and then switch to singlewin, the next plot command will cause one more window to be created. This new window will be reused as long as singlewin is in effect. If you switch back to multiwin, generate some graphs, and then switch to singlewin again, the orginal 'singlewin' window will be resused if it is still open. Otherwise a new 'singlewin' window will be created. The 'singlewin' window is not numbered." @node mf, mp, macintosh, complete_list_of_terminals @subsection mf @c ?commands set terminal mf @c ?set terminal mf @c ?set term mf @c ?terminal mf @c ?term mf @cindex mf @cindex metafont The `mf` terminal driver creates an input file to the METAFONT program. Thus a figure may be used in the TeX document in the same way as is a character. To use a picture in a document, the METAFONT program must be run with the output file from `gnuplot` as input. Thus, the user needs a basic knowledge of the font creating process and the procedure for including a new font in a document. However, if the METAFONT program is set up properly at the local site, an unexperienced user could perform the operation without much trouble. The text support is based on a METAFONT character set. Currently the Computer Modern Roman font set is input, but the user is in principal free to choose whatever fonts he or she needs. The METAFONT source files for the chosen font must be available. Each character is stored in a separate picture variable in METAFONT. These variables may be manipulated (rotated, scaled etc.) when characters are needed. The drawback is the interpretation time in the METAFONT program. On some machines (i.e. PC) the limited amount of memory available may also cause problems if too many pictures are stored. The `mf` terminal has no options. @menu * METAFONT_Instructions:: @end menu @node METAFONT_Instructions, , mf, mf @subsubsection METAFONT Instructions @c ?commands set terminal mf detailed @c ?set terminal mf detailed @c ?set term mf detailed @c ?mf detailed @c ?metafont detailed - Set your terminal to METAFONT: @example set terminal mf @end example - Select an output-file, e.g.: @example set output "myfigures.mf" @end example - Create your pictures. Each picture will generate a separate character. Its default size will be 5*3 inches. You can change the size by saying `set size 0.5,0.5` or whatever fraction of the default size you want to have. - Quit `gnuplot`. - Generate a TFM and GF file by running METAFONT on the output of `gnuplot`. Since the picture is quite large (5*3 in), you will have to use a version of METAFONT that has a value of at least 150000 for memmax. On Unix systems these are conventionally installed under the name bigmf. For the following assume that the command virmf stands for a big version of METAFONT. For example: - Invoke METAFONT: @example virmf '&plain' @end example - Select the output device: At the METAFONT prompt ('*') type: @example \\mode:=CanonCX; % or whatever printer you use @end example - Optionally select a magnification: @example mag:=1; % or whatever you wish @end example - Input the `gnuplot`-file: @example input myfigures.mf @end example On a typical Unix machine there will usually be a script called "mf" that executes virmf '&plain', so you probably can substitute mf for virmf &plain. This will generate two files: mfput.tfm and mfput.$$$gf (where $$$ indicates the resolution of your device). The above can be conveniently achieved by typing everything on the command line, e.g.: virmf '&plain' '\\mode:=CanonCX; mag:=1; input myfigures.mf' In this case the output files will be named myfigures.tfm and myfigures.300gf. - Generate a PK file from the GF file using gftopk: @example gftopk myfigures.300gf myfigures.300pk @end example The name of the output file for gftopk depends on the DVI driver you use. Ask your local TeX administrator about the naming conventions. Next, either install the TFM and PK files in the appropriate directories, or set your environment variables properly. Usually this involves setting TEXFONTS to include the current directory and doing the same thing for the environment variable that your DVI driver uses (no standard name here...). This step is necessary so that TeX will find the font metric file and your DVI driver will find the PK file. - To include your pictures in your document you have to tell TeX the font: @example \\font\\gnufigs=myfigures @end example Each picture you made is stored in a single character. The first picture is character 0, the second is character 1, and so on... After doing the above step, you can use the pictures just like any other characters. Therefore, to place pictures 1 and 2 centered in your document, all you have to do is: @example \\centerline@{\\gnufigs\\char0@} \\centerline@{\\gnufigs\\char1@} @end example in plain TeX. For LaTeX you can, of course, use the picture environment and place the picture wherever you wish by using the \\makebox and \\put macros. This conversion saves you a lot of time once you have generated the font; TeX handles the pictures as characters and uses minimal time to place them, and the documents you make change more often than the pictures do. It also saves a lot of TeX memory. One last advantage of using the METAFONT driver is that the DVI file really remains device independent, because no \\special commands are used as in the eepic and tpic drivers." @node mp, mif, mf, complete_list_of_terminals @subsection mp @c ?commands set terminal mpost @c ?set terminal mp @c ?set term mp @c ?terminal mp @c ?term mp @cindex mp @cindex metapost The `mp` driver produces output intended to be input to the Metapost program. Running Metapost on the file creates EPS files containing the plots. By default, Metapost passes all text through TeX. This has the advantage of allowing essentially any TeX symbols in titles and labels. Syntax: @example set term mp @{color | colour | monochrome@} @{solid | dashed@} @{notex | tex | latex@} @{magnification <magsize>@} @{psnfss | psnfss-version7 | nopsnfss@} @{prologues <value>@} @{a4paper@} @{amstex@} @{"<fontname> @{,<fontsize>@}"@} @end example The option `color` causes lines to be drawn in color (on a printer or display that supports it), `monochrome` (or nothing) selects black lines. The option `solid` draws solid lines, while `dashed` (or nothing) selects lines with different patterns of dashes. If `solid` is selected but `color` is not, nearly all lines will be identical. This may occasionally be useful, so it is allowed. The option `notex` bypasses TeX entirely, therefore no TeX code can be used in labels under this option. This is intended for use on old plot files or files that make frequent use of common characters like `$` and `%` that require special handling in TeX. The option `tex` sets the terminal to output its text for TeX to process. The option `latex` sets the terminal to output its text for processing by LaTeX. This allows things like \\frac for fractions which LaTeX knows about but TeX does not. Note that you must set the environment variable TEX to the name of your LaTeX executable (normally latex) if you use this option or use `mpost --tex=<name of LaTeX executable> ...`. Otherwise metapost will try and use TeX to process the text and it won't work. Changing font sizes in TeX has no effect on the size of mathematics, and there is no foolproof way to make such a change, except by globally setting a magnification factor. This is the purpose of the `magnification` option. It must be followed by a scaling factor. All text (NOT the graphs) will be scaled by this factor. Use this if you have math that you want at some size other than the default 10pt. Unfortunately, all math will be the same size, but see the discussion below on editing the MP output. `mag` will also work under `notex` but there seems no point in using it as the font size option (below) works as well. The option `psnfss` uses postscript fonts in combination with LaTeX. Since this option only makes sense, if LaTeX is being used, the `latex` option is selected automatically. This option includes the following packages for LaTeX: inputenc(latin1), fontenc(T1), mathptmx, helvet(scaled=09.2), courier, latexsym and textcomp. The option `psnfss-version7` uses also postscript fonts in LaTeX (option `latex` is also automatically selected), but uses the following packages with LaTeX: inputenc(latin1), fontenc(T1), times, mathptmx, helvet and courier. The option `nopsnfss` is the default and uses the standard font (cmr10 if not otherwise specified). The option `prologues` takes a value as an additional argument and adds the line `prologues:=<value>` to the metapost file. If a value of `2` is specified metapost uses postscript fonts to generate the eps-file, so that the result can be viewed using e.g. ghostscript. Normally the output of metapost uses TeX fonts and therefore has to be included in a (La)TeX file before you can look at it. The option `noprologues` is the default. No additional line specifying the prologue will be added. The option `a4paper` adds a `[a4paper]` to the documentclass. Normally letter paper is used (default). Since this option is only used in case of LaTeX, the `latex` option is selected automatically. The option `amstex` automatically selects the `latex` option and includes the following LaTeX packages: amsfonts, amsmath(intlimits). By default these packages are not included. A name in quotes selects the font that will be used when no explicit font is given in a `set label` or @ref{title}. A name recognized by TeX (a TFM file exists) must be used. The default is "cmr10" unless `notex` is selected, then it is "pcrr8r" (Courier). Even under `notex`, a TFM file is needed by Metapost. The file `pcrr8r.tfm` is the name given to Courier in LaTeX's psnfss package. If you change the font from the `notex` default, choose a font that matches the ASCII encoding at least in the range 32-126. `cmtt10` almost works, but it has a nonblank character in position 32 (space). The size can be any number between 5.0 and 99.99. If it is omitted, 10.0 is used. It is advisable to use `magstep` sizes: 10 times an integer or half-integer power of 1.2, rounded to two decimals, because those are the most available sizes of fonts in TeX systems. All the options are optional. If font information is given, it must be at the end, with size (if present) last. The size is needed to select a size for the font, even if the font name includes size information. For example, `set term mp "cmtt12"` selects cmtt12 shrunk to the default size 10. This is probably not what you want or you would have used cmtt10. The following common ascii characters need special treatment in TeX: @example $, &, #, %, _; |, <, >; ^, ~, \\, @{, and @} @end example The five characters $, #, &, _, and % can simply be escaped, e.g., `\\$`. The three characters <, >, and | can be wrapped in math mode, e.g., `$<$`. The remainder require some TeX work-arounds. Any good book on TeX will give some guidance. If you type your labels inside double quotes, backslashes in TeX code need to be escaped (doubled). Using single quotes will avoid having to do this, but then you cannot use `\\n` for line breaks. As of this writing, version 3.7 of gnuplot processes titles given in a `plot` command differently than in other places, and backslashes in TeX commands need to be doubled regardless of the style of quotes. Metapost pictures are typically used in TeX documents. Metapost deals with fonts pretty much the same way TeX does, which is different from most other document preparation programs. If the picture is included in a LaTeX document using the graphics package, or in a plainTeX document via epsf.tex, and then converted to PostScript with dvips (or other dvi-to-ps converter), the text in the plot will usually be handled correctly. However, the text may not appear if you send the Metapost output as-is to a PostScript interpreter. @menu * Metapost_Instructions:: @end menu @node Metapost_Instructions, , mp, mp @subsubsection Metapost Instructions @c ?commands set terminal mp detailed @c ?set terminal mp detailed @c ?set term mp detailed @c ?mp detailed @c ?metapost detailed - Set your terminal to Metapost, e.g.: @example set terminal mp mono "cmtt12" 12 @end example - Select an output-file, e.g.: @example set output "figure.mp" @end example - Create your pictures. Each plot (or multiplot group) will generate a separate Metapost beginfig...endfig group. Its default size will be 5 by 3 inches. You can change the size by saying `set size 0.5,0.5` or whatever fraction of the default size you want to have. - Quit gnuplot. - Generate EPS files by running Metapost on the output of gnuplot: @example mpost figure.mp OR mp figure.mp @end example The name of the Metapost program depends on the system, typically `mpost` for a Unix machine and `mp` on many others. Metapost will generate one EPS file for each picture. - To include your pictures in your document you can use the graphics package in LaTeX or epsf.tex in plainTeX: @example \\usepackage@{graphics@} % LaTeX \\input epsf.tex % plainTeX @end example If you use a driver other than dvips for converting TeX DVI output to PS, you may need to add the following line in your LaTeX document: @example \\DeclareGraphicsRule@{*@}@{eps@}@{*@}@{@} @end example Each picture you made is in a separate file. The first picture is in, e.g., figure.0, the second in figure.1, and so on.... To place the third picture in your document, for example, all you have to do is: @example \\includegraphics@{figure.2@} % LaTeX \\epsfbox@{figure.2@} % plainTeX @end example The advantage, if any, of the mp terminal over a postscript terminal is editable output. Considerable effort went into making this output as clean as possible. For those knowledgeable in the Metapost language, the default line types and colors can be changed by editing the arrays `lt[]` and `col[]`. The choice of solid vs dashed lines, and color vs black lines can be change by changing the values assigned to the booleans `dashedlines` and `colorlines`. If the default `tex` option was in effect, global changes to the text of labels can be achieved by editing the `vebatimtex...etex` block. In particular, a LaTeX preamble can be added if desired, and then LaTeX's built-in size changing commands can be used for maximum flexibility. Be sure to set the appropriate MP configuration variable to force Metapost to run LaTeX instead of plainTeX." @node mif, next, mp, complete_list_of_terminals @subsection mif @c ?commands set terminal mif @c ?set terminal mif @c ?set term mif @c ?terminal mif @c ?term mif @cindex mif @tmindex mif The `mif` terminal driver produces Frame Maker MIF format version 3.00. It plots in MIF Frames with the size 15*10 cm, and plot primitives with the same pen will be grouped in the same MIF group. Plot primitives in a `gnuplot` page will be plotted in a MIF Frame, and several MIF Frames are collected in one large MIF Frame. The MIF font used for text is "Times". Several options may be set in the MIF 3.00 driver. Syntax: @example set terminal mif @{color | colour | monochrome@} @{polyline | vectors@} @{help | ?@} @end example `colour` plots lines with line types >= 0 in colour (MIF sep. 2--7) and `monochrome` plots all line types in black (MIF sep. 0). `polyline` plots curves as continuous curves and @ref{vectors} plots curves as collections of vectors. @ref{help} and `?` print online help on standard error output---both print a short description of the usage; @ref{help} also lists the options. Examples: @example set term mif colour polylines # defaults set term mif # defaults set term mif vectors set term mif help" @end example @node next, Openstep_(next), mif, complete_list_of_terminals @subsection next @c ?commands set terminal next @c ?set terminal next @c ?set term next @c ?terminal next @c ?term next @cindex next @cindex NeXT Several options may be set in the next driver. Syntax: @example set terminal next @{<mode>@} @{<type> @} @{<color>@} @{<dashed>@} @{"<fontname>"@} @{<fontsize>@} title @{"<newtitle>"@} @end example where <mode> is `default`, which sets all options to their defaults; <type> is either `new` or `old`, where `old` invokes the old single window; <color> is either `color` or `monochrome`; <dashed> is either `solid` or `dashed`; "<fontname>" is the name of a valid PostScript font; <fontsize> is the size of the font in PostScript points; and <title> is the title for the GnuTerm window. Defaults are `new`, `monochrome`, `dashed`, "Helvetica", 14pt. Examples: @example set term next default set term next 22 set term next color "Times-Roman" 14 set term next color "Helvetica" 12 title "MyPlot" set term next old @end example Pointsizes may be changed with `set linestyle`." @node Openstep_(next), pbm, next, complete_list_of_terminals @subsection Openstep (next) @c ?commands set terminal openstep @c ?set terminal openstep @c ?set term openstep @c ?terminal openstep @c ?term openstep @cindex openstep @cindex OpenStep @cindex Openstep /* @cindex next @cindex NeXT */ Several options may be set in the openstep (next) driver. Syntax: @example set terminal openstep @{<mode>@} @{<type> @} @{<color>@} @{<dashed>@} @{"<fontname>"@} @{<fontsize>@} title @{"<newtitle>"@} @end example where <mode> is `default`, which sets all options to their defaults; <type> is either `new` or `old`, where `old` invokes the old single window; <color> is either `color` or `monochrome`; <dashed> is either `solid` or `dashed`; "<fontname>" is the name of a valid PostScript font; <fontsize> is the size of the font in PostScript points; and <title> is the title for the GnuTerm window. Defaults are `new`, `monochrome`, `dashed`, "Helvetica", 14pt. Examples: @example set term openstep default set term openstep 22 set term openstep color "Times-Roman" 14 set term openstep color "Helvetica" 12 title "MyPlot" set term openstep old @end example Pointsizes may be changed with `set linestyle`." @node pbm, dospc, Openstep_(next), complete_list_of_terminals @subsection pbm @c ?commands set terminal pbm @c ?set terminal pbm @c ?set term pbm @c ?terminal pbm @c ?term pbm @cindex pbm @tmindex pbm Syntax: @example set terminal pbm @{<fontsize>@} @{<mode>@} @{size <x>,<y>@} @end example where <fontsize> is `small`, `medium`, or `large` and <mode> is `monochrome`, `gray` or `color`. The default plot size is 640 pixels wide and 480 pixels high. The output size is white-space padded to the nearest multiple of 8 pixels on both x and y. This empty space may be cropped later if needed. The output of the `pbm` driver depends upon <mode>: `monochrome` produces a portable bitmap (one bit per pixel), `gray` a portable graymap (three bits per pixel) and `color` a portable pixmap (color, four bits per pixel). The output of this driver can be used with various image conversion and manipulation utilities provided by NETPBM. Based on Jef Poskanzer's PBMPLUS package, NETPBM provides programs to convert the above PBM formats to GIF, TIFF, MacPaint, Macintosh PICT, PCX, X11 bitmap and many others. Complete information is available at http://netpbm.sourceforge.net/. Examples: @example set terminal pbm small monochrome # defaults set terminal pbm color medium size 800,600 set output '| pnmrotate 45 | pnmtopng > tilted.png' # uses NETPBM" @end example @node dospc, pdf, pbm, complete_list_of_terminals @subsection dospc @c ?commands set terminal dospc @c ?set terminal dospc @c ?set term dospc @c ?terminal dospc @c ?term dospc @cindex dospc @tmindex dospc The `dospc` terminal driver supports PCs with arbitrary graphics boards, which will be automatically detected. It should be used only if you are not using the gcc or Zortec C/C++ compilers." @node pdf, pstricks, dospc, complete_list_of_terminals @subsection pdf @c ?commands set terminal pdf @c ?set terminal pdf @c ?set term pdf @c ?terminal pdf @c ?term pdf @cindex pdf @tmindex pdf This terminal produces files in the Adobe Portable Document Format (PDF), useable for printing or display with tools like Acrobat Reader Syntax: @example set terminal pdf @{monochrome|color|colour@} @{@{no@}enhanced@} @{fname "<font>"@} @{fsize <fontsize>@} @{font "<fontname>@{,<fontsize>@}"@} @{fontscale <scale>@} @{linewidth <lw>@} @{rounded|butt@} @{solid|dashed@} @{dl <dashlength>@}@} @{size <XX>@{unit@},<YY>@{unit@}@} @end example The default is to use a different color for each line type. Selecting `monochome` will use black for all linetypes, in which case you probably want to select `dashed` to distinguish line types. Even in in mono mode you can still use explicit colors for filled areas or linestyles. where <font> is the name of the default font to use (default Helvetica) and <fontsize> is the font size (in points, default 12). For help on which fonts are available or how to install new ones, please see the documentation for your local installation of pdflib. The `enhanced` option enables enhanced text processing features (subscripts, superscripts and mixed fonts). See `enhanced`. The width of all lines in the plot can be increased by the factor <n> specified in `linewidth`. Similarly `dashlength` is a multiplier for the default dash spacing. `rounded` sets line caps and line joins to be rounded; `butt` is the default, butt caps and mitered joins. The default size for PDF output is 5 inches by 3 inches. The @ref{size} option changes this to whatever the user requests. By default the X and Y sizes are taken to be in inches, but other units are possible (currently only cm). * does not work. @node pstricks, qms, pdf, complete_list_of_terminals @subsection pstricks @c ?commands set terminal pstricks @c ?set terminal pstricks @c ?set term pstricks @c ?terminal pstricks @c ?term pstricks @cindex pstricks @tmindex pstricks The `pstricks` driver is intended for use with the "pstricks.sty" macro package for LaTeX. It is an alternative to the `eepic` and `latex` drivers. You need "pstricks.sty", and, of course, a printer that understands PostScript, or a converter such as Ghostscript. PSTricks is available via anonymous ftp from the /pub directory at Princeton.edu. This driver definitely does not come close to using the full capability of the PSTricks package. Syntax: @example set terminal pstricks @{hacktext | nohacktext@} @{unit | nounit@} @end example The first option invokes an ugly hack that gives nicer numbers; the second has to do with plot scaling. The defaults are `hacktext` and `nounit`." @node qms, regis, pstricks, complete_list_of_terminals @subsection qms @c ?commands set terminal qms @c ?set terminal qms @c ?set term qms @c ?terminal qms @c ?term qms @cindex qms @tmindex qms The `qms` terminal driver supports the QMS/QUIC Laser printer, the Talaris 1200 and others. It has no options." @node regis, sun, qms, complete_list_of_terminals @subsection regis @c ?commands set terminal regis @c ?set terminal regis @c ?set term regis @c ?terminal regis @c ?term regis @cindex regis @tmindex regis The `regis` terminal device generates output in the REGIS graphics language. It has the option of using 4 (the default) or 16 colors. Syntax: @example set terminal regis @{4 | 16@}" @end example @node sun, svg, regis, complete_list_of_terminals @subsection sun @c ?commands set terminal sun @c ?set terminal sun @c ?set term sun @c ?terminal sun @c ?term sun @cindex sun @tmindex sun The `sun` terminal driver supports the SunView window system. It has no options." @node svg, tek410x, sun, complete_list_of_terminals @subsection svg @c ?commands set terminal svg @c ?set terminal svg @c ?set term svg @c ?terminal svg @c ?term svg @cindex svg @tmindex svg This terminal produces files in the W3C Scalable Vector Graphics format. Syntax: @example set terminal svg @{size <x>,<y> @{|fixed|dynamic@}@} @{@{no@}enhanced@} @{fname "<font>"@} @{fsize <fontsize>@} @{mouse@} @{standalone | jsdir <dirname>@} @{name <plotname>@} @{font "<fontname>@{,<fontsize>@}"@} @{fontfile <filename>@} @{rounded|butt@} @{solid|dashed@} @{linewidth <lw>@} @{background <rgb_color>@} @end example where <x> and <y> are the size of the SVG plot to generate, `dynamic` allows a svg-viewer to resize plot, whereas the default setting, `fixed`, will request an absolute size. `linewidth <w>` increases the width of all lines used in the figure by a factor of <w>. <font> is the name of the default font to use (default Arial) and <fontsize> is the font size (in points, default 12). SVG viewing programs may substitute other fonts when the file is displayed. The svg terminal supports an enhanced text mode, which allows font and other formatting commands to be embedded in labels and other text strings. The enhanced text mode syntax is shared with other gnuplot terminal types. See `enhanced` for more details. The `mouse` option tells gnuplot to add support for mouse tracking and for toggling individual plots on/off by clicking on the corresponding key entry. By default this is done by including a link that points to a script in a local directory, usually /usr/local/share/gnuplot/<version>/js. You can change this by using the `jsdir` option to specify either a different local directory or a general URL. The latter is usually appropriate if you are embedding the svg into a web page. Alternatively, the `standalone` option embeds the mousing code in the svg document itself rather than linking to an external resource. When an SVG file will be used in conjunction with external files, e.g. if it embeds a PNG image or is referenced by javascript code in a web page or embedding document, then a unique name is required to avoid potential conflicting references to other SVG plots. Use the `name` option to ensure uniqueness. SVG allows you to embed fonts directly into an SVG document, or to provide a hypertext link to the desired font. The `fontfile` option specifies a local file which is copied into the <defs> section of the resulting SVG output file. This file may either itself contain a font, or may contain the records necessary to create a hypertext reference to the desired font. Gnuplot will look for the requested file using the directory list in the GNUPLOT_FONTPATH environmental variable. NB: You must embed an svg font, not a TrueType or PostScript font." @node tek410x, tek40, svg, complete_list_of_terminals @subsection tek410x @c ?commands set terminal tek410x @c ?set terminal tek410x @c ?set term tek410x @c ?terminal tek410x @c ?term tek410x @cindex tek410x @tmindex tek410x The `tek410x` terminal driver supports the 410x and 420x family of Tektronix terminals. It has no options." @node tek40, texdraw, tek410x, complete_list_of_terminals @subsection tek40 @c ?commands set terminal tek40xx @c ?set terminal tek40xx @c ?set term tek40xx @c ?terminal tek40xx @c ?term tek40xx @cindex tek40 @tmindex tek40 @c ?commands set terminal vttek @c ?set terminal vttek @c ?set term vttek @c ?terminal vttek @c ?term vttek @cindex vttek @tmindex vttek @c ?commands set terminal xterm @c ?set terminal xterm @c ?set term xterm @c ?terminal xterm @c ?term xterm @cindex xterm @tmindex xterm @c ?commands set terminal kc-tek40xx @c ?set terminal kc-tek40xx @c ?set term kc-tek40xx @c ?terminal kc-tek40xx @c ?term kc-tek40xx @cindex kc-tek40xx @tmindex kc-tek40xx @c ?commands set terminal km-tek40xx @c ?set terminal km-tek40xx @c ?set term km-tek40xx @c ?terminal km-tek40xx @c ?term km-tek40xx @cindex km-tek40xx @c ?commands set terminal selanar @c ?set terminal selanar @c ?set term selanar @c ?terminal selanar @c ?term selanar @cindex selanar @c ?commands set terminal bitgraph @c ?set terminal bitgraph @c ?set term bitgraph @c ?terminal bitgraph @c ?term bitgraph @cindex bitgraph This family of terminal drivers supports a variety of VT-like terminals. `tek40xx` supports Tektronix 4010 and others as well as most TEK emulators. `vttek` supports VT-like tek40xx terminal emulators. The following are present only if selected when gnuplot is built: `kc-tek40xx` supports MS-DOS Kermit Tek4010 terminal emulators in color; `km-tek40xx` supports them in monochrome. `selanar` supports Selanar graphics. `bitgraph` supports BBN Bitgraph terminals. None have any options." @node texdraw, tgif, tek40, complete_list_of_terminals @subsection texdraw @c ?commands set terminal texdraw @c ?set terminal texdraw @c ?set term texdraw @c ?terminal texdraw @c ?term texdraw @cindex texdraw @tmindex texdraw The `texdraw` terminal driver supports the LaTeX texdraw environment. It is intended for use with "texdraw.sty" and "texdraw.tex" in the texdraw package. Points, among other things, are drawn using the LaTeX commands "\\Diamond" and "\\Box". These commands no longer belong to the LaTeX2e core; they are included in the latexsym package, which is part of the base distribution and thus part of any LaTeX implementation. Please do not forget to use this package. It has no options." @node tgif, tkcanvas, texdraw, complete_list_of_terminals @subsection tgif @c ?commands set terminal tgif @c ?set terminal tgif @c ?set term tgif @c ?terminal tgif @c ?term tgif @cindex tgif @tmindex tgif Tgif is an X11-based drawing tool---it has nothing to do with GIF. The `tgif` driver supports different pointsizes (with @ref{pointsize}), different label fonts and font sizes (e.g. `set label "Hallo" at x,y font "Helvetica,34"`) and multiple graphs on the page. The proportions of the axes are not changed. Syntax: @example set terminal tgif @{portrait | landscape | default@} @{<[x,y]>@} @{monochrome | color@} @{@{linewidth | lw@} <LW>@} @{solid | dashed@} @{font "<fontname>@{,<fontsize>@}"@} @end example where <[x,y]> specifies the number of graphs in the x and y directions on the page, `color` enables color, `linewidth` scales all linewidths by <LW>, "<fontname>" is the name of a valid PostScript font, and <fontsize> specifies the size of the PostScript font. `defaults` sets all options to their defaults: `portrait`, `[1,1]`, `color`, `linwidth 1.0`, `dashed`, `"Helvetica,18"`. The `solid` option is usually prefered if lines are colored, as they often are in the editor. Hardcopy will be black-and-white, so `dashed` should be chosen for that. Multiplot is implemented in two different ways. The first multiplot implementation is the standard gnuplot multiplot feature: @example set terminal tgif set output "file.obj" set multiplot set origin x01,y01 set size xs,ys plot ... ... set origin x02,y02 plot ... unset multiplot @end example See @ref{multiplot} for further information. The second version is the [x,y] option for the driver itself. The advantage of this implementation is that everything is scaled and placed automatically without the need for setting origins and sizes; the graphs keep their natural x/y proportions of 3/2 (or whatever is fixed by @ref{size}). If both multiplot methods are selected, the standard method is chosen and a warning message is given. Examples of single plots (or standard multiplot): @example set terminal tgif # defaults set terminal tgif "Times-Roman,24" set terminal tgif landscape set terminal tgif landscape solid @end example Examples using the built-in multiplot mechanism: @example set terminal tgif portrait [2,4] # portrait; 2 plots in the x- # and 4 in the y-direction set terminal tgif [1,2] # portrait; 1 plot in the x- # and 2 in the y-direction set terminal tgif landscape [3,3] # landscape; 3 plots in both # directions" @end example @node tkcanvas, tpic, tgif, complete_list_of_terminals @subsection tkcanvas @c ?commands set terminal tkcanvas @c ?set terminal tkcanvas @c ?set term tkcanvas @c ?terminal tkcanvas @c ?term tkcanvas @cindex tkcanvas @tmindex tkcanvas This terminal driver generates Tk canvas widget commands based on Tcl/Tk (default) or Perl. To use it, rebuild `gnuplot` (after uncommenting or inserting the appropriate line in "term.h"), then @example gnuplot> set term tkcanvas @{perltk@} @{interactive@} gnuplot> set output 'plot.file' @end example After invoking "wish", execute the following sequence of Tcl/Tk commands: @example % source plot.file % canvas .c % pack .c % gnuplot .c @end example Or, for Perl/Tk use a program like this: @example use Tk; my $top = MainWindow->new; my $c = $top->Canvas->pack; my $gnuplot = do "plot.pl"; $gnuplot->($c); MainLoop; @end example The code generated by `gnuplot` creates a procedure called "gnuplot" that takes the name of a canvas as its argument. When the procedure is called, it clears the canvas, finds the size of the canvas and draws the plot in it, scaled to fit. For 2-dimensional plotting (`plot`) two additional procedures are defined: "gnuplot_plotarea" will return a list containing the borders of the plotting area "xleft, xright, ytop, ybot" in canvas screen coordinates, while the ranges of the two axes "x1min, x1max, y1min, y1max, x2min, x2max, y2min, y2max" in plot coordinates can be obtained calling "gnuplot_axisranges". If the "interactive" option is specified, mouse clicking on a line segment will print the coordinates of its midpoint to stdout. Advanced actions can happen instead if the user supplies a procedure named "user_gnuplot_coordinates", which takes the following arguments: "win id x1s y1s x2s y2s x1e y1e x2e y2e x1m y1m x2m y2m", the name of the canvas and the id of the line segment followed by the coordinates of its start and end point in the two possible axis ranges; the coordinates of the midpoint are only filled for logarithmic axes. The current version of `tkcanvas` supports neither @ref{multiplot} nor @ref{replot}." @node tpic, unixpc, tkcanvas, complete_list_of_terminals @subsection tpic @c ?commands set terminal tpic @c ?set terminal tpic @c ?set term tpic @c ?terminal tpic @c ?term tpic @cindex tpic @tmindex tpic The `tpic` terminal driver supports the LaTeX picture environment with tpic \\specials. It is an alternative to the `latex` and `eepic` terminal drivers. Options are the point size, line width, and dot-dash interval. Syntax: @example set terminal tpic <pointsize> <linewidth> <interval> @end example where @ref{pointsize} and `linewidth` are integers in milli-inches and `interval` is a float in inches. If a non-positive value is specified, the default is chosen: pointsize = 40, linewidth = 6, interval = 0.1. All drivers for LaTeX offer a special way of controlling text positioning: If any text string begins with '@{', you also need to include a '@}' at the end of the text, and the whole text will be centered both horizontally and vertically by LaTeX. --- If the text string begins with '[', you need to continue it with: a position specification (up to two out of t,b,l,r), ']@{', the text itself, and finally, '@}'. The text itself may be anything LaTeX can typeset as an LR-box. \\rule@{@}@{@}'s may help for best positioning. Examples: About label positioning: Use gnuplot defaults (mostly sensible, but sometimes not really best): @example set title '\\LaTeX\\ -- $ \\gamma $' @end example Force centering both horizontally and vertically: @example set label '@{\\LaTeX\\ -- $ \\gamma $@}' at 0,0 @end example Specify own positioning (top here): @example set xlabel '[t]@{\\LaTeX\\ -- $ \\gamma $@}' @end example The other label -- account for long ticlabels: @example set ylabel '[r]@{\\LaTeX\\ -- $ \\gamma $\\rule@{7mm@}@{0pt@}@}'" @end example @node unixpc, vx384, tpic, complete_list_of_terminals @subsection unixpc @c ?commands set terminal unixpc @c ?set terminal unixpc @c ?set term unixpc @c ?terminal unixpc @c ?term unixpc @cindex unixpc @tmindex unixpc The `unixpc` terminal driver supports AT&T 3b1 and AT&T 7300 Unix PC. It has no options." @node vx384, vgagl, unixpc, complete_list_of_terminals @subsection vx384 @c ?commands set terminal vx384 @c ?set terminal vx384 @c ?set term vx384 @c ?terminal vx384 @c ?term vx384 @cindex vx384 @tmindex vx384 The `vx384` terminal driver supports the Vectrix 384 and Tandy color printers. It has no options." @node vgagl, VWS, vx384, complete_list_of_terminals @subsection vgagl @c ?commands set terminal vgagl @c ?set terminal vgagl @c ?set term vgagl @c ?terminal vgagl @c ?term vgagl @cindex vgagl @tmindex vgagl The `vgagl` driver is a fast linux console driver with full mouse and pm3d support. It looks at the environment variable SVGALIB_DEFAULT_MODE for the default mode; if not set, it uses a 256 color mode with the highest available resolution. Syntax: @example set terminal vgagl \\ background [red] [[green] [blue]] \\ [uniform | interpolate] \\ [dump "file"] \\ [mode] @end example The color mode can also be given with the mode option. Both Symbolic names as G1024x768x256 and integers are allowed. The `background` option takes either one or three integers in the range [0, 255]. If only one integers is supplied, it is taken as gray value for the background. If three integers are present, the background gets the corresponding color. The (mutually exclusive) options @ref{interpolate} and `uniform` control if color interpolation is done while drawing triangles (on by default). A `screen dump file` can be specified with the `dump "file"` option. If this option is present, (i.e the dump file name is not empty) pressing the key KP_Delete will write the file. This action cannot and cannot be rebound. The file is written in raw ppm (P6) format. Note that this option is reset each time the `set term` command is issued. To get high resolution modes, you will probably have to modify the configuration file of libvga, usually /etc/vga/libvga.conf. Using the VESA fb is a good choice, but this needs to be compiled in the kernel. The vgagl driver uses the first *available* vga mode from the following list: @example - the driver which was supplied when setting vgagl, e.g. `set term vgagl G1024x768x256` would first check, if the G1024x768x256 mode is available. - the environment variable SVGALIB_DEFAULT_MODE - G1024x768x256 - G800x600x256 - G640x480x256 - G320x200x256 - G1280x1024x256 - G1152x864x256 - G1360x768x256 - G1600x1200x256 @end example @node VWS, windows, vgagl, complete_list_of_terminals @subsection VWS @c ?commands set terminal VWS @c ?set terminal VWS @c ?set term VWS @c ?terminal VWS @c ?term VWS @cindex VWS @tmindex VWS The `VWS` terminal driver supports the VAX Windowing System. It has no options. It will sense the display type (monochrome, gray scale, or color.) All line styles are plotted as solid lines." @node windows, wxt, VWS, complete_list_of_terminals @subsection windows @c ?commands set terminal windows @c ?set terminal windows @c ?set term windows @c ?terminal windows @c ?term windows @cindex windows @tmindex windows The `windows` terminal is a fast interactive terminal driver that uses the Windows GDI to draw and write text. The cross-platform `terminal wxt` is also supported on Windows. Syntax: @example set terminal windows @{<n>@} @{color | monochrome@} @{solid | dashed@} @{enhanced | noenhanced@} @{font <fontspec>@} @{fontscale <scale>@} @{linewdith <scale>@} @{background <rgb color>@} @{title "Plot Window Title"@} @{size <width>,<height>@} @{position <x>,<y>@} @{close@} @end example Multiple plot windows are supported: `set terminal win <n>` directs the output to plot window number n. `color` and `monochrome` select colored or mono output, `dashed` and `solid` select dashed or solid lines. Note that `color` defaults to `solid`, whereas `monochrome` defaults to `dashed`. `enhanced` enables enhanced text mode features (subscripts, superscripts and mixed fonts, see `enhanced text` for more information). `<fontspec>` is in the format "<fontface>,<fontsize>", where "<fontface>" is the name of a valid Windows font, and <fontsize> is the size of the font in points and both components are optional. Note that in previous versions of gnuplot the `font` statement could be left out and <fontsize> could be given as a number without double quotes. This is no longer supported. `linewidth` and `fontscale` can be used to scale the width of lines and the size of text. @ref{title} changes the title of the graph window. @ref{size} defines the width and height of the window in pixel and @ref{position} the origin of the window i.e. the position of the top left corner on the screen (again in pixel). These options override any default settings from the `wgnuplot.ini` file. Other options may be changed using the `graph-menu` or the initialization file `wgnuplot.ini`. The Windows version normally terminates immediately as soon as the end of any files given as command line arguments is reached (i.e. in non-interactive mode), unless you specify `-` as the last command line option. It will also not show the text-window at all, in this mode, only the plot. By giving the optional argument `-persist` (same as for gnuplot under x11; former Windows-only options `/noend` or `-noend` are still accepted as well), will not close gnuplot. Contrary to gnuplot on other operating systems, gnuplot's interactive command line is accessible after the -persist option. The plot window remains open when the gnuplot terminal is changed with a `set term` command. The plot window can be closed with `set term windows close`. `gnuplot` supports different methods to create printed output on Windows, see `windows printing`. The windows terminal supports data exchange with other programs via clipboard and EMF files, see `graph-menu`. You can also use the `terminal emf` to create EMF files. @menu * graph-menu:: * printing:: * text-menu":: * wgnuplot.mnu":: * wgnuplot.ini:: @end menu @node graph-menu, printing, windows, windows @subsubsection graph-menu @c ?commands set terminal windows graph-menu @c ?set terminal windows graph-menu @c ?set term windows graph-menu @c ?windows graph-menu @cindex graph-menu @tmindex graph-menu The `gnuplot graph` window has the following options on a pop-up menu accessed by pressing the right mouse button(*) or selecting `Options` from the system menu: `Copy to Clipboard` copies a bitmap and an enhanced Metafile picture. `Save as EMF...` allows the user to save the current graph window as enhanced metafile `Print...` prints the graphics windows using a Windows printer driver and allows selection of the printer and scaling of the output. The output produced by `Print` is not as good as that from `gnuplot`'s own printer drivers. See also `windows printing`. `Bring to Top` when checked brings the graph window to the top after every plot. `Color` when checked enables color linestyles. When unchecked it forces monochrome linestyles. `Double buffer` activates drawing into a memory buffer before copying the graph to the screen. This avoids flickering e.g. during animation and rotation of 3d graphs. See `mouse` and @ref{scrolling}. `Oversampling` doubles the size of the virtual canvas. It is scaled down again for drawing to the screen. This gives smoother graphics but requires more memory and computing time. It requires `double buffer`. `Antialiasing` selects smoothing of lines and edges. Note that this slows down drawing. `Background...` sets the window background color. `Choose Font...` selects the font used in the graphics window. `Line Styles...` allows customization of the line colors and styles. `Update wgnuplot.ini` saves the current window locations, window sizes, text window font, text window font size, graph window font, graph window font size, background color and linestyles to the initialization file `wgnuplot.ini`. @c ^<HR align="left" width="100"> (*) Note that this menu is only available by pressing the right mouse button with `unset mouse`. @node printing, text-menu", graph-menu, windows @subsubsection printing @c ?commands set terminal windows printing @c ?set terminal windows printing @c ?set term windows printing @c ?windows printing @cindex printing @cindex screendump In order of preference, graphs may be printed in the following ways: `1.` Use the `gnuplot` command @ref{terminal} to select a printer and @ref{output} to redirect output to a file. `2.` Select the `Print...` command from the `gnuplot graph` window. An extra command `screendump` does this from the text window. `3.` If `set output "PRN"` is used, output will go to a temporary file. When you exit from `gnuplot` or when you change the output with another @ref{output} command, a dialog box will appear for you to select a printer port. If you choose OK, the output will be printed on the selected port, passing unmodified through the print manager. It is possible to accidentally (or deliberately) send printer output meant for one printer to an incompatible printer. @node text-menu", wgnuplot.mnu", printing, windows @subsubsection text-menu", /* FIXME: this is not really related to the windows driver, but the windows platform */ @c ?commands set terminal windows text-menu @c ?set terminal windows text-menu @c ?set term windows text-menu @c ?windows text-menu @cindex text-menu @tmindex text-menu The `gnuplot text` window has the following options on a pop-up menu accessed by pressing the right mouse button or selecting `Options` from the system menu: `Copy to Clipboard` copies marked text to the clipboard. `Paste` copies text from the clipboard as if typed by the user. `Choose Font...` selects the font used in the text window. `System Colors` when selected makes the text window honor the System Colors set using the Control Panel. When unselected, text is black or blue on a white background. `Wrap long lines` when selected lines longer than the current window width are wrapped. `Update wgnuplot.ini` saves the current settings to the initialisation file `wgnuplot.ini`, which is located in the user's application data directory. @node wgnuplot.mnu", wgnuplot.ini, text-menu", windows @subsubsection wgnuplot.mnu", /* FIXME: this is not really related to the windows driver, but the windows platform */ @c ?windows wgnuplot.mnu @cindex wgnuplot.mnu @tmindex wgnuplot.mnu If the menu file `wgnuplot.mnu` is found in the same directory as `gnuplot`, then the menu specified in `wgnuplot.mnu` will be loaded. Menu commands: @example [Menu] starts a new menu with the name on the following line. [EndMenu] ends the current menu. [--] inserts a horizontal menu separator. [|] inserts a vertical menu separator. [Button] puts the next macro on a push button instead of a menu. @end example Macros take two lines with the macro name (menu entry) on the first line and the macro on the second line. Leading spaces are ignored. Macro commands: @example [INPUT] Input string with prompt terminated by [EOS] or @{ENTER@} [EOS] End Of String terminator. Generates no output. [OPEN] Get name of a file to open, with the title of the dialog terminated by [EOS], followed by a default filename terminated by [EOS] or @{ENTER@}. [SAVE] Get name of a file to save. Parameters like [OPEN] [DIRECTORY] Get name of a directory, with the title of the dialog terminated by [EOS] or @{ENTER@} @end example Macro character substitutions: @example @{ENTER@} Carriage Return '\\r' @{TAB@} Tab '\\011' @{ESC@} Escape '\\033' @{^A@} '\\001' ... @{^_@} '\\031' @end example Macros are limited to 256 characters after expansion. @node wgnuplot.ini, , wgnuplot.mnu", windows @subsubsection wgnuplot.ini @c ?commands set terminal windows wgnuplot.ini @c ?set terminal windows wgnuplot.ini @c ?set term windows wgnuplot.ini @c ?windows wgnuplot.ini @cindex wgnuplot.ini @tmindex wgnuplot.ini The Windows text window and the `windows` terminal will read some of their options from the `[WGNUPLOT]` section of `wgnuplot.ini`. This file is located in the user's application data directory. Here's a sample `wgnuplot.ini` file: @example [WGNUPLOT] TextOrigin=0 0 TextSize=640 150 TextFont=Terminal,9 TextWrap=1 TextLines=400 SysColors=0 GraphOrigin=0 150 GraphSize=640 330 GraphFont=Arial,10 GraphColor=1 GraphToTop=1 GraphDoublebuffer=1 GraphOversampling=0 GraphAntialiasing=1 GraphBackground=255 255 255 Border=0 0 0 0 0 Axis=192 192 192 2 2 Line1=0 0 255 0 0 Line2=0 255 0 0 1 Line3=255 0 0 0 2 Line4=255 0 255 0 3 Line5=0 0 128 0 4 @end example @c ^ <h3>Text window options</h3> These settings apply to the wgnuplot text-window only." The `TextOrigin` and `TextSize` entries specify the location and size of the text window. The `TextFont` entry specifies the text window font and size. The `TextWrap` entry selects wrapping of long text lines. The `TextLines` entry specifies the number of (unwrapped) lines the internal buffer of the text window can hold. This value currently cannot be changed from within wgnuplot. See `text-menu`. @c ^ <h3>Graph window options</h3> The `GraphFont` entry specifies the font name and size in points. The five numbers given in the `Border`, `Axis` and `Line` entries are the `Red` intensity (0--255), `Green` intensity, `Blue` intensity, `Color Linestyle` and `Mono Linestyle`. `Linestyles` are 0=SOLID, 1=DASH, 2=DOT, 3=DASHDOT, 4=DASHDOTDOT. In the sample `wgnuplot.ini` file above, Line 2 is a green solid line in color mode, or a dashed line in monochrome mode. The default line width is 1 pixel. If `Linestyle` is negative, it specifies the width of a SOLID line in pixels. Line1 and any linestyle used with the `points` style must be SOLID with unit width. See `graph-menu`." @node wxt, x11, windows, complete_list_of_terminals @subsection wxt @c ?set terminal wxt @c ?terminal wxt @c ?set term wxt @c ?term wxt @cindex wxt @tmindex wxt The `wxt` terminal device generates output in a separate window. The window is created by the wxWidgets library, where the 'wxt' comes from. The actual drawing is done via cairo, a 2D graphics library, and pango, a library for laying out and rendering text. Syntax: @example set term wxt @{<n>@} @{size <width>,<height>@} @{background <rgb_color>@} @{@{no@}enhanced@} @{font <font>@} @{fontscale <scale>@} @{title "title"@} @{dashed|solid@} @{dashlength <dl>@} @{@{no@}persist@} @{@{no@}raise@} @{@{no@}ctrl@} @{close@} @end example Multiple plot windows are supported: `set terminal wxt <n>` directs the output to plot window number n. The default window title is based on the window number. This title can also be specified with the keyword "title". Plot windows remain open even when the `gnuplot` driver is changed to a different device. A plot window can be closed by pressing the letter 'q' while that window has input focus, by choosing `close` from a window manager menu, or with `set term wxt <n> close`. The size of the plot area is given in pixels, it defaults to 640x384. In addition to that, the actual size of the window also includes the space reserved for the toolbar and the status bar. When you resize a window, the plot is immediately scaled to fit in the new size of the window. Unlike other interactive terminals, the `wxt` terminal scales the whole plot, including fonts and linewidths, and keeps its global aspect ratio constant, leaving an empty space painted in gray. If you type @ref{replot}, click the @ref{replot} icon in the terminal toolbar or type a new `plot` command, the new plot will completely fit in the window and the font size and the linewidths will be reset to their defaults. The active plot window (the one selected by `set term wxt <n>`) is interactive. Its behaviour is shared with other terminal types. See `mouse` for details. It also has some extra icons, which are supposed to be self-explanatory. This terminal supports an enhanced text mode, which allows font and other formatting commands (subscripts, superscripts, etc.) to be embedded in labels and other text strings. The enhanced text mode syntax is shared with other gnuplot terminal types. See `enhanced` for more details. <font> is in the format "FontFace,FontSize", i.e. the face and the size comma-separated in a single string. FontFace is a usual font face name, such as \'Arial\'. If you do not provide FontFace, the wxt terminal will use \'Sans\'. FontSize is the font size, in points. If you do not provide it, the wxt terminal will use a size of 10 points. @example For example : set term wxt font "Arial,12" set term wxt font "Arial" # to change the font face only set term wxt font ",12" # to change the font size only set term wxt font "" # to reset the font name and size @end example The fonts are retrieved from the usual fonts subsystems. Under Windows, those fonts are to be found and configured in the entry "Fonts" of the control panel. Under UNIX, they are handled by "fontconfig". Pango, the library used to layout the text, is based on utf-8. Thus, the wxt terminal has to convert from your encoding to utf-8. The default input encoding is based on your \'locale\'. If you want to use another encoding, make sure gnuplot knows which one you are using. See @ref{encoding} for more details. Pango may give unexpected results with fonts that do not respect the unicode mapping. With the Symbol font, for example, the wxt terminal will use the map provided by http://www.unicode.org/ to translate character codes to unicode. Pango will do its best to find a font containing this character, looking for your Symbol font, or other fonts with a broad unicode coverage, like the DejaVu fonts. Note that "the Symbol font" is to be understood as the Adobe Symbol font, distributed with Acrobat Reader as "SY______.PFB". Alternatively, the OpenSymbol font, distributed with OpenOffice.org as "opens___.ttf", offers the same characters. Microsoft has distributed a Symbol font ("symbol.ttf"), but it has a different character set with several missing or moved mathematic characters. If you experience problems with your default setup (if the demo enhancedtext.dem is not displayed properly for example), you probably have to install one of the Adobe or OpenOffice Symbol fonts, and remove the Microsoft one. Other non-conform fonts, such as "wingdings" have been observed working. The rendering of the plot can be altered with a dialog available from the toolbar. To obtain the best output possible, the rendering involves three mechanisms : antialiasing, oversampling and hinting. Antialiasing allows to display non-horizontal and non-vertical lines smoother. Oversampling combined with antialiasing provides subpixel accuracy, so that gnuplot can draw a line from non-integer coordinates. This avoids wobbling effects on diagonal lines ('plot x' for example). Hinting avoids the blur on horizontal and vertical lines caused by oversampling. The terminal will snap these lines to integer coordinates so that a one-pixel-wide line will actually be drawn on one and only one pixel. By default, the window is raised to the top of your desktop when a plot is drawn. This can be controlled with the keyword "raise". The keyword "persist" will prevent gnuplot from exiting before you explicitely close all the plot windows. Finally, by default the key <space> raises the gnuplot console window, and 'q' closes the plot window. The keyword "ctrl" allows you to replace those bindings by <ctrl>+<space> and <ctrl>+'q', respectively. These three keywords (raise, persist and ctrl) can also be set and remembered between sessions through the configuration dialog." @node x11, xlib, wxt, complete_list_of_terminals @subsection x11 @c ?commands set terminal x11 @c ?set terminal x11 @c ?set term x11 @c ?terminal x11 @c ?term x11 @cindex x11 @cindex X11 Syntax: @example set terminal x11 @{<n> | window "<string>"@} @{title "<string>"@} @{@{no@}enhanced@} @{font <fontspec>@} @{linewidth LW@} @{solid|dashed@} @{@{no@}persist@} @{@{no@}raise@} @{@{no@}ctrlq@} @{close@} @{size XX,YY@} @{position XX,YY@} set terminal x11 @{reset@} @end example Multiple plot windows are supported: `set terminal x11 <n>` directs the output to plot window number n. If n is not 0, the terminal number will be appended to the window title (unless a title has been supplied manually) and the icon will be labeled `Gnuplot <n>`. The active window may be distinguished by a change in cursor (from default to crosshair). The `x11` terminal can connect to X windows previously created by an outside application via the option `window` followed by a string containing the X ID for the window in hexadecimal format. Gnuplot uses that external X window as a container since X does not allow for multiple clients selecting the ButtonPress event. In this way, gnuplot's mouse features work within the contained plot window. @example set term x11 window "220001e" @end example The x11 terminal supports enhanced text mode (see `enhanced`), subject to the available fonts. In order for font size commands embedded in text to have any effect, the default x11 font must be scalable. Thus the first example below will work as expected, but the second will not. @example set term x11 enhanced font "arial,15" set title '@{/=20 Big@} Medium @{/=5 Small@}' @end example @example set term x11 enhanced font "terminal-14" set title '@{/=20 Big@} Medium @{/=5 Small@}' @end example Plot windows remain open even when the `gnuplot` driver is changed to a different device. A plot window can be closed by pressing the letter q while that window has input focus, or by choosing `close` from a window manager menu. All plot windows can be closed by specifying @ref{reset}, which actually terminates the subprocess which maintains the windows (unless `-persist` was specified). The `close` command can be used to close individual plot windows by number. However, after a @ref{reset}, those plot windows left due to persist cannot be closed with the command `close`. A `close` without a number closes the current active plot window. The gnuplot outboard driver, gnuplot_x11, is searched in a default place chosen when the program is compiled. You can override that by defining the environment variable GNUPLOT_DRIVER_DIR to point to a different location. Plot windows will automatically be closed at the end of the session unless the `-persist` option was given. The options `persist` and @ref{raise} are unset by default, which means that the defaults (persist == no and raise == yes) or the command line options -persist / -raise or the Xresources are taken. If [no]persist or [no]raise are specified, they will override command line options and Xresources. Setting one of these options takes place immediately, so the behaviour of an already running driver can be modified. If the window does not get raised, see discussion in @ref{raise}. The option `title "<title name>"` will supply the title name of the window for the current plot window or plot window <n> if a number is given. Where (or if) this title is shown depends on your X window manager. The size option can be used to set the size of the plot window. The size option will only apply to newly created windows. The position option can be used to set the position of the plot window. The position option will only apply to newly created windows. The size or aspect ratio of a plot may be changed by resizing the `gnuplot` window. Linewidths and pointsizes may be changed from within `gnuplot` with `set linestyle`. For terminal type `x11`, `gnuplot` accepts (when initialized) the standard X Toolkit options and resources such as geometry, font, and name from the command line arguments or a configuration file. See the X(1) man page (or its equivalent) for a description of such options. @cindex X resources A number of other `gnuplot` options are available for the `x11` terminal. These may be specified either as command-line options when `gnuplot` is invoked or as resources in the configuration file ".Xdefaults". They are set upon initialization and cannot be altered during a `gnuplot` session. (except `persist` and @ref{raise}) @menu * x11_fonts:: * command-line_options_:: * monochrome_options_:: * color_resources_:: * grayscale_resources_:: * line_resources_:: * x11_pm3d_resources:: * x11_other_resources:: @end menu @node x11_fonts, command-line_options_, x11, x11 @subsubsection x11_fonts @c ?commands set terminal x11 x11_fonts @c ?set terminal x11 x11_fonts @c ?set term x11 x11_fonts @c ?x11 x11_fonts @cindex x11_fonts @cindex fonts Upon initial startup, the default font is taken from the X11 resources as set in the system or user .Xdefaults file or on the command line. Example: @example gnuplot*font: lucidasans-bold-12 @end example A new default font may be specified to the x11 driver from inside gnuplot using @example `set term x11 font "<fontspec>"` @end example The driver first queries the X-server for a font of the exact name given. If this query fails, then it tries to interpret <fontspec> as "<font>,<size>,<slant>,<weight>" and to construct a full X11 font name of the form @example -*-<font>-<weight>-<s>-*-*-<size>-*-*-*-*-*-<encoding> @end example @example <font> is the base name of the font (e.g. Times or Symbol) <size> is the point size (defaults to 12 if not specified) <s> is `i` if <slant>=="italic" `o` if <slant>=="oblique" `r` otherwise <weight> is `medium` or `bold` if explicitly requested, otherwise `*` <encoding> is set based on the current character set (see @ref{encoding}). @end example So `set term x11 font "arial,15,italic"` will be translated to -*-arial-*-i-*-*-15-*-*-*-*-*-iso8859-1 (assuming default encoding). The <size>, <slant>, and <weight> specifications are all optional. If you do not specify <slant> or <weight> then you will get whatever font variant the font server offers first. You may set a default enconding via the corresponding X11 resource. E.g. @example gnuplot*encoding: iso8859-15 @end example The driver also recognizes some common PostScript font names and replaces them with possible X11 or TrueType equivalents. This same sequence is used to process font requests from `set label`. If your gnuplot was built with configuration option --enable-x11-mbfonts, you can specify multi-byte fonts by using the prefix "mbfont:" on the font name. An additional font may be given, separated by a semicolon. Since multi-byte font encodings are interpreted according to the locale setting, you must make sure that the environmental variable LC_CTYPE is set to some appropriate locale value such as ja_JP.eucJP, ko_KR.EUC, or zh_CN.EUC. Example: @example set term x11 font 'mbfont:kana14;k14' # 'kana14' and 'k14' are Japanese X11 font aliases, and ';' # is the separator of font names. set term x11 font 'mbfont:fixed,16,r,medium' # <font>,<size>,<slant>,<weight> form is also usable. set title '(mb strings)' font 'mbfont:*-fixed-medium-r-normal--14-*' @end example The same syntax applies to the default font in Xresources settings, for example, @example gnuplot*font: \\ mbfont:-misc-fixed-medium-r-normal--14-*-*-*-c-*-jisx0208.1983-0 @end example If gnuplot is built with --enable-x11-mbfonts, you can use two special PostScript font names 'Ryumin-Light-*' and 'GothicBBB-Medium-*' (standard Japanese PS fonts) without the prefix "mbfont:". @node command-line_options_, monochrome_options_, x11_fonts, x11 @subsubsection command-line_options @c ?commands set terminal x11 command-line-options @c ?set terminal x11 command-line-options @c ?set term x11 command-line-options @c ?x11 command-line-options @cindex command-line-options In addition to the X Toolkit options, the following options may be specified on the command line when starting `gnuplot` or as resources in your ".Xdefaults" file (note that @ref{raise} and `persist` can be overridden later by `set term x11 [no]raise [no]persist)`: @example `-mono` forces monochrome rendering on color displays. `-gray` requests grayscale rendering on grayscale or color displays. (Grayscale displays receive monochrome rendering by default.) `-clear` requests that the window be cleared momentarily before a new plot is displayed. `-tvtwm` requests that geometry specifications for position of the window be made relative to the currently displayed portion of the virtual root. `-raise` raises plot window after each plot `-noraise` does not raise plot window after each plot `-noevents` does not process mouse and key events `-ctrlq ` closes window on ctrl-q rather than q `-persist` plot windows survive after main gnuplot program exits @end example @cindex X resources The options are shown above in their command-line syntax. When entered as resources in ".Xdefaults", they require a different syntax. Example: @example gnuplot*gray: on gnuplot*ctrlq: on @end example `gnuplot` also provides a command line option (`-pointsize <v>`) and a resource, `gnuplot*pointsize: <v>`, to control the size of points plotted with the `points` plotting style. The value `v` is a real number (greater than 0 and less than or equal to ten) used as a scaling factor for point sizes. For example, `-pointsize 2` uses points twice the default size, and `-pointsize 0.5` uses points half the normal size. The `-noevents` switch disables all mouse and key event processing (except for `q` and `<space>` for closing the window). This is useful for programs which use the x11 driver independent of the gnuplot main program. The `-ctrlq` switch changes the hot-key that closes a plot window from `q` to `<ctrl>q`. This is useful is you are using the keystroke-capture feature `pause mouse keystroke`, since it allows the character `q` to be captured just as all other alphanumeric characters. The `-ctrlq` switch similarly replaces the <space> hot-key with <ctrl><space> for the same reason. @node monochrome_options_, color_resources_, command-line_options_, x11 @subsubsection monochrome_options @c ?commands set terminal x11 monochrome_options @c ?set terminal x11 monochrome_options @c ?set term x11 monochrome_options @c ?x11 monochrome_options @cindex monochrome_options @cindex X resources For monochrome displays, `gnuplot` does not honor foreground or background colors. The default is black-on-white. `-rv` or `gnuplot*reverseVideo: on` requests white-on-black. @node color_resources_, grayscale_resources_, monochrome_options_, x11 @subsubsection color_resources @c ?commands set terminal x11 color_resources @c ?set terminal x11 color_resources @c ?set term x11 color_resources @c ?x11 color_resources @cindex color_resources @cindex X resources The X11 terminal honors the following resources (shown here with their default values) or the greyscale resources. The values may be color names as listed in the X11 rgb.txt file on your system, hexadecimal RGB color specifications (see X11 documentation), or a color name followed by a comma and an `intensity` value from 0 to 1. For example, `blue, 0.5` means a half intensity blue. @example gnuplot*background: white gnuplot*textColor: black gnuplot*borderColor: black gnuplot*axisColor: black gnuplot*line1Color: red gnuplot*line2Color: green gnuplot*line3Color: blue gnuplot*line4Color: magenta gnuplot*line5Color: cyan gnuplot*line6Color: sienna gnuplot*line7Color: orange gnuplot*line8Color: coral @end example The command-line syntax for these is simple only for background, which maps directly to the usual X11 toolkit option "-bg". All others can only be set on the command line by use of the generic "-xrm" resource override option Examples: @example gnuplot -background coral @end example to change the background color. @example gnuplot -xrm 'gnuplot*line1Color:blue' @end example to override the first linetype color. @node grayscale_resources_, line_resources_, color_resources_, x11 @subsubsection grayscale_resources @c ?commands set terminal x11 grayscale_resources @c ?set terminal x11 grayscale_resources @c ?set term x11 grayscale_resources @c ?x11 grayscale_resources @cindex grayscale_resources @cindex X resources When `-gray` is selected, `gnuplot` honors the following resources for grayscale or color displays (shown here with their default values). Note that the default background is black. @example gnuplot*background: black gnuplot*textGray: white gnuplot*borderGray: gray50 gnuplot*axisGray: gray50 gnuplot*line1Gray: gray100 gnuplot*line2Gray: gray60 gnuplot*line3Gray: gray80 gnuplot*line4Gray: gray40 gnuplot*line5Gray: gray90 gnuplot*line6Gray: gray50 gnuplot*line7Gray: gray70 gnuplot*line8Gray: gray30 @end example @node line_resources_, x11_pm3d_resources, grayscale_resources_, x11 @subsubsection line_resources @c ?commands set terminal x11 line_resources @c ?set terminal x11 line_resources @c ?set term x11 line_resources @c ?x11 line_resources @cindex line_resources @cindex X resources `gnuplot` honors the following resources for setting the width (in pixels) of plot lines (shown here with their default values.) 0 or 1 means a minimal width line of 1 pixel width. A value of 2 or 3 may improve the appearance of some plots. @example gnuplot*borderWidth: 2 gnuplot*axisWidth: 0 gnuplot*line1Width: 0 gnuplot*line2Width: 0 gnuplot*line3Width: 0 gnuplot*line4Width: 0 gnuplot*line5Width: 0 gnuplot*line6Width: 0 gnuplot*line7Width: 0 gnuplot*line8Width: 0 @end example `gnuplot` honors the following resources for setting the dash style used for plotting lines. 0 means a solid line. A two-digit number `jk` (`j` and `k` are >= 1 and <= 9) means a dashed line with a repeated pattern of `j` pixels on followed by `k` pixels off. For example, '16' is a dotted line with one pixel on followed by six pixels off. More elaborate on/off patterns can be specified with a four-digit value. For example, '4441' is four on, four off, four on, one off. The default values shown below are for monochrome displays or monochrome rendering on color or grayscale displays. Color displays default to dashed:off @example gnuplot*dashed: off gnuplot*borderDashes: 0 gnuplot*axisDashes: 16 gnuplot*line1Dashes: 0 gnuplot*line2Dashes: 42 gnuplot*line3Dashes: 13 gnuplot*line4Dashes: 44 gnuplot*line5Dashes: 15 gnuplot*line6Dashes: 4441 gnuplot*line7Dashes: 42 gnuplot*line8Dashes: 13 @end example , " @node x11_pm3d_resources, x11_other_resources, line_resources_, x11 @subsubsection x11 pm3d_resources @c ?commands set terminal x11 pm3d_resources @c ?set terminal x11 pm3d_resources @c ?set term x11 pm3d_resources @c ?x11 pm3d_resources @cindex pm3d_resources @c ?x11 pm3d @cindex X resources Choosing the appropriate visual class and number of colors is a crucial point in X11 applications and a bit awkward, since X11 supports six visual types in different depths. By default `gnuplot` uses the default visual of the screen. The number of colors which can be allocated depends on the visual class chosen. On a visual class with a depth > 12bit, gnuplot starts with a maximal number of 0x200 colors. On a visual class with a depth > 8bit (but <= 12 bit) the maximal number of colors is 0x100, on <= 8bit displays the maximum number of colors is 240 (16 are left for line colors). Gnuplot first starts to allocate the maximal number of colors as stated above. If this fails, the number of colors is reduced by the factor 2 until gnuplot gets all colors which are requested. If dividing `maxcolors` by 2 repeatedly results in a number which is smaller than `mincolors` `gnuplot` tries to install a private colormap. In this case the window manager is responsible for swapping colormaps when the pointer is moved in and out the x11 driver's window. The default for `mincolors` is maxcolors / (num_colormaps > 1 ? 2 : 8), where num_colormaps is the number of colormaps which are currently used by gnuplot (usually 1, if only one x11 window is open). Some systems support multiple (different) visual classes together on one screen. On these systems it might be necessary to force gnuplot to use a specific visual class, e.g. the default visual might be 8bit PseudoColor but the screen would also support 24bit TrueColor which would be the preferred choice. The information about an Xserver's capabilities can be obtained with the program `xdpyinfo`. For the visual names below you can choose one of StaticGray, GrayScale, StaticColor, PseudoColor, TrueColor, DirectColor. If an Xserver supports a requested visual type at different depths, `gnuplot` chooses the visual class with the highest depth (deepest). If the requested visual class matches the default visual and multiple classes of this type are supported, the default visual is preferred. Example: on an 8bit PseudoColor visual you can force a private color map by specifying `gnuplot*maxcolors: 240` and `gnuplot*mincolors: 240`. @example gnuplot*maxcolors: <integer> gnuplot*mincolors: <integer> gnuplot*visual: <visual name> @end example , " @node x11_other_resources, , x11_pm3d_resources, x11 @subsubsection x11 other_resources @c ?commands set terminal x11 other_resources @c ?set terminal x11 other_resources @c ?set term x11 other_resources @c ?x11 other_resources @cindex X resources By default the contents of the current plot window are exported to the X11 clipboard in response to X events in the window. Setting the resource 'gnuplot*exportselection' to 'off' or 'false' will disable this. By default text rotation is done using a method that is fast, but can corrupt nearby colors depending on the background. If this is a problem, you can set the resource 'gnuplot.fastrotate' to 'off' @example gnuplot*exportselection: off gnuplot*fastrotate: on gnuplot*ctrlq: off @end example @node xlib, , x11, complete_list_of_terminals @subsection xlib @c ?commands set terminal xlib @c ?set terminal xlib @c ?set term xlib @c ?terminal xlib @c ?term xlib @cindex xlib @tmindex xlib The `xlib` terminal driver supports the X11 Windows System. It generates gnuplot_x11 commands, but sends them to the output file specified by `set output '<filename>'`. `set term x11` is equivalent to `set output "|gnuplot_x11 -noevents"; set term xlib`. `xlib` takes the same set of options as `x11`." @menu * Bugs:: @end menu @node Bugs, Concept_Index, Terminal_types, Top @chapter Bugs @cindex bugs Please e-mail bug reports to the gnuplot-bugs mailing list or upload the report to the gnuplot web site on SourceForge. Please give complete information on the version of gnuplot you are using and, if possible, a test script that demonstrates the bug. See `seeking-assistance`. @menu * known_limitations:: * External_libraries:: @end menu @node known_limitations, External_libraries, Bugs, Bugs @section known limitations It is not possible to use in-line data (e.g. plot '-' ...) inside the curly brackets of a `do` or `while` loop. The layout and positioning of the plot key is inaccurate whenever superscripts, subscripts, or explicit fonts are used in the key text. (Fixed in 4.7) @cindex gamma @findex gamma @cindex bessel @cindex timefmt @opindex timefmt @cindex nohidden3d @cindex floating point exceptions Floating point exceptions (floating point number too large/small, divide by zero, etc.) may occasionally be generated by user defined functions. Some of the demos in particular may cause numbers to exceed the floating point range. Whether the system ignores such exceptions (in which case `gnuplot` labels the corresponding point as undefined) or aborts `gnuplot` depends on the compiler/runtime environment. The gamma, bessel, and erf functions do not work for complex arguments. Coordinates specified as "time" wrap at 24 hours. The 'nohidden3d' option that is supposed to exempt individual plots from the global property 'set hidden3d' does not work for parametric curves. X11 terminal: It is difficult to select UTF-8 fonts. The program does not track the true aspect ratio of the x11 terminal window. In order for commands such as "set size ratio" to work, the x11 window must itself have equal height and width. Only one color palette at a time is active for any given x11 plot window. This means that multiplots whose constituent plots use different palettes will not display correctly in x11. Qt terminal: If the local qt environment does not support "opengl" as a rendering mode then display of polygons and surfaces can be very slow. @node External_libraries, , known_limitations, Bugs @section External libraries @c ?bugs external_libraries @cindex libgd @cindex svgalib @cindex locale @opindex locale @cindex internationalization @cindex pdf @tmindex pdf External library GD (used by PNG/JPEG/GIF drivers): Versions of libgd through 2.0.33 contain various bugs in mapping the characters of Adobe's Symbol font. Also it is possible to trigger a library segfault if an anti-aliased line crosses an upper corner of the canvas. External library PDFlib (used by PDF driver): Gnuplot can be linked against libpdf versions 4, 5, or 6. However, these versions differ in their handling of piped I/O. Therefore gnuplot scripts using piped output to PDF may work only for some versions of PDFlib. External library svgalib (used by linux and vgagl driver): Requires gnuplot to be suid root (bad!) and has many bugs that are specific to the video card or graphics driver used in X11. Internationalization (locale settings): Gnuplot uses the C runtime library routine setlocale() to control locale-specific formatting of input and output number, times, and date strings. The locales available, and the level of support for locale features such as "thousands' grouping separator", depend on the internationalization support provided by your individual machine. @node Concept_Index, Command_Index, Bugs, Top @unnumbered Concept Index @printindex cp @node Command_Index, Options_Index, Concept_Index, Top @unnumbered Command Index @printindex cm @node Options_Index, Function_Index, Command_Index, Top @unnumbered Options Index @printindex op @node Function_Index, Terminal_Index, Options_Index, Top @unnumbered Function Index @printindex fn @node Terminal_Index, , Function_Index, Top @unnumbered Terminal Index @printindex tm @c @shortcontents @contents @bye ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/checkdoc.c�����������������������������������������������������������������������0000644�0004711�0000144�00000011000�10716362477�012775� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: checkdoc.c,v 1.15 2007/11/13 17:56:15 sfeam Exp $"); } #endif /* GNUPLOT - checkdoc.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * checkdoc -- check a doc file for correctness of first column. * * Prints out lines that have an illegal first character. * First character must be space, digit, or ?, @, #, %, * or line must be empty. * * usage: checkdoc [docfile] * Modified by Russell Lang from hlp2ms.c by Thomas Williams * * Original version by David Kotz used the following one line script! * sed -e '/^$/d' -e '/^[ 0-9?@#%]/d' gnuplot.doc * */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "syscfg.h" #include "stdfn.h" #include "doc2x.h" void convert __PROTO((FILE *, FILE *)); void process_line __PROTO((char *, FILE *)); int main (int argc, char **argv) { FILE *infile; infile = stdin; if (argc > 2) { fprintf(stderr, "Usage: %s [infile]\n", argv[0]); exit(EXIT_FAILURE); } if (argc == 2) if ((infile = fopen(argv[1], "r")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for reading\n", argv[0], argv[1]); exit(EXIT_FAILURE); } convert(infile, stdout); return EXIT_SUCCESS; } void convert(FILE *a, FILE *b) { static char line[MAX_LINE_LEN+1]; while (get_line(line, sizeof(line), a)) { process_line(line, b); } } void process_line(char *line, FILE *b) { /* check matching backticks within a paragraph */ static int count = 0; if (line[0] == ' ') { char *p = line; /* skip/count leading spaces */ while (*++p == ' '); if (*p == '\n') { /* it is not clear if this is an error, but it is an * inconsistency, so flag it */ fprintf(b, "spaces-only line %s:%d\n", termdoc_filename, termdoc_lineno); } else { /* accumulate count of backticks. Do not check odd-ness * until end of paragraph (non-space in column 1) */ for (; *p; ++p) if (*p == '`') ++count; } } else { if (count & 1) { fprintf(b, "mismatching backticks before %s:%d\n", termdoc_filename, termdoc_lineno); } count = 0; } if (strchr(line, '\t')) fprintf(b, "tab character in line %s:%d\n", termdoc_filename, termdoc_lineno); switch (line[0]) { /* control character */ case '?':{ /* interactive help entry */ break; /* ignore */ } case '<':{ /* term docs */ break; /* ignore */ } case '@':{ /* start/end table */ break; /* ignore */ } case '#':{ /* latex table entry */ break; /* ignore */ } case '%':{ /* troff table entry */ break; /* ignore */ } case '^':{ /* html entry */ break; /* ignore */ } case '=':{ /* index entry */ break; /* ignore */ } case 'F':{ /* included figure */ break; /* ignore */ } case '\n': /* empty text line */ case ' ':{ /* normal text line */ break; } default:{ if (isdigit((int)line[0])) { /* start of section */ /* ignore */ } else /* output bad line */ fprintf(b, "%s:%d:%s", termdoc_filename, termdoc_lineno, line); break; } } } gnuplot-4.6.4/docs/doc2tex.c������������������������������������������������������������������������0000644�0004711�0000144�00000034444�11645621707�012617� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: doc2tex.c,v 1.24 2011/10/13 17:45:43 sfeam Exp $"); } #endif /* GNUPLOT - doc2tex.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * doc2tex.c -- program to convert Gnuplot .DOC format to LaTeX document * Also will work for VMS .HLP files. * Modified by Russell Lang from hlp2ms.c by Thomas Williams * Extended by David Kotz to support quotes ("), backquotes, tables. * Extended by Jens Emmerich to handle '_', '---', paired single * quotes. Changed "-handling. Added pre/post-verbatim hooks. * * * usage: doc2tex [file.doc [file.tex]] * * where file.doc is a Gnuplot .DOC file, and file.tex will be an * article document suitable for printing with LaTeX. * * typical usage for GNUPLOT: * * doc2tex gnuplot.doc gnuplot.tex * latex gnuplot.tex ; latex gnuplot.tex */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "syscfg.h" #include "stdfn.h" #include "doc2x.h" void init __PROTO((FILE *)); void convert __PROTO((FILE *, FILE *)); void process_line __PROTO((char *, FILE *)); void section __PROTO((char *, FILE *)); void puttex __PROTO((char *, FILE *)); void finish __PROTO((FILE *)); static TBOOLEAN intable = FALSE; static TBOOLEAN verb = FALSE; static TBOOLEAN see = FALSE; static TBOOLEAN inhref = FALSE; static TBOOLEAN figures = FALSE; int main (int argc, char **argv) { FILE *infile; FILE *outfile; int inarg = 1; infile = stdin; outfile = stdout; if (argc > 1 && !strcmp(argv[1],"-figures")) { figures = TRUE; inarg = 2; } if (argc > (figures ? 4 : 3)) { fprintf(stderr, "Usage: %s [-figures] [infile [outfile]]\n", argv[0]); exit(EXIT_FAILURE); } if (argc > inarg) { if ((infile = fopen(argv[inarg], "r")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for reading\n", argv[0], argv[inarg]); exit(EXIT_FAILURE); } } if (argc == inarg+2) { if ((outfile = fopen(argv[inarg+1], "w")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for writing\n", argv[0], argv[inarg+1]); exit(EXIT_FAILURE); } } init(outfile); convert(infile, outfile); finish(outfile); return EXIT_SUCCESS; } void init(FILE *b) { (void) fputs("\\input{titlepag.tex}\n", b); } void convert(FILE *a, FILE *b) { static char line[MAX_LINE_LEN+1]; while (get_line(line, sizeof(line), a)) process_line(line, b); } void process_line( char *line, FILE *b) { char string[MAX_LINE_LEN+1], c; int i, initlen; char *ind; static TBOOLEAN parsed = FALSE; initlen = strlen(line); switch (line[0]) { /* control character */ case '?': /* interactive help entry */ /* convert '?xxx' to '\label{xxx}' */ line[strlen(line)-1]=NUL; (void) fputs("\\label{",b); fputs(line+1, b); (void) fputs("}\n",b); if (!strpbrk(line+1," ")) { /* Make an index entry also */ (void) fputs("\\index{",b); while ((ind = strpbrk(line+1,"-_"))) *ind = ' '; fputs(line+1, b); (void) fputs("}\n",b); } break; /* ignore */ /* <- don't ignore */ case '=': /* explicit index entry */ line[strlen(line)-1]=NUL; (void) fputs("\\index{",b); while ((ind = strpbrk(line+1,"-_"))) *ind = ' '; fputs(line+1, b); (void) fputs("}\n",b); break; case 'F': /* embedded figure */ if (figures) { line[strlen(line)-1]=NUL; (void) fputs("\\parpic[r][rt]{\\includegraphics[width=3in,keepaspectratio]{",b); fputs(line+1, b); (void) fputs("}}\n",b); } break; case '@':{ /* start/end table */ if (intable) { (void) fputs("\\hline\n\\end{tabular}\n", b); (void) fputs("\\end{center}\n", b); intable = FALSE; } else { if (verb) { (void) fputs("\\end{verbatim}\n", b); (void) fputs("\\postverbatim\n", b); verb = FALSE; } (void) fputs("\n\\begin{center}\n", b); /* moved to gnuplot.doc by RCC (void) fputs("\\begin{tabular}{|ccl|} \\hline\n", b); */ intable = TRUE; } /* ignore rest of line */ break; } case '#':{ /* latex table entry */ if (intable) (void) fputs(line + 1, b); /* copy directly */ else { fprintf(stderr, "warning: # line found outside of table\n"); fprintf(stderr, "%s\n", line + 11); } break; } case '^':{ /* external link escape */ /* internal link escape */ /* convert '^ <a href="xxx">yyy</a>' to '\href{xxx}{yyy}' */ /* convert '^ <a href="#xxx"></a> to '\ref{xxx}' */ /* convert '^ <a name="xxx"></a> to '\label{xxx}' */ switch (line[3]) { case 'a':{ switch (line[5]) { case 'h':{ if (line[11] == '#') { fputs("{\\bf ",b); parsed = 0; for (i = 12; (c = line[i]) != '"'; i++) { string[i-12] = c; } string[i-12]= NUL; i++;i++; for ( ; i < initlen-5; i++) { fputc(line[i],b); } fputs(" (p.~\\pageref{",b); fputs(string,b); fputs("})}} ",b); inhref = FALSE; } else { inhref = TRUE; if (strstr(line,"</a>") == NULL){ fputs("\\par\\hskip2.7em\\href{",b); } else { fputs("\\href{",b); } parsed = 0; for (i = 11; i < initlen-1 ; i++){ c = line[i]; if (c == '"') { ; } else if ( c == '>' && parsed == 0) { fputs("}{\\tt ",b); parsed = 1; } else if ( c == '~') { fputs("\\~",b); } else if ( c == '_' && parsed == 1) { fputs("\\_",b); } else if ( c == '<' && parsed == 1) { fputs("}{\n",b); i += 5; inhref = FALSE; } else { fputc(c,b); } } } break; } case 'n': { fputs("\\label{",b); for (i = 11; (c = *(line +i)) != '"'; i++) { fputc(c,b); } fputs("}\n",b); break; } default: break; } break; } case '/': if ( line[4] == 'a') { fputs("}\n\n",b); inhref = FALSE; } break; default: break; /* ignore */ } break; } case '%':{ /* troff table entry */ break; /* ignore */ } case '\n': /* empty text line */ case ' ':{ /* normal text line */ if (intable) break; /* ignore while in table */ if ( inhref == TRUE){ puttex(line+1,b); break; } if (line[1] == ' ') { /* verbatim mode */ if (!verb) { (void) fputs("\\preverbatim\n", b); (void) fputs("\\begin{verbatim}\n", b); verb = TRUE; } (void) fputs(line + 2, b); } else { if (verb) { (void) fputs("\\end{verbatim}\n", b); (void) fputs("\\postverbatim\n", b); verb = FALSE; } if (line[0] == '\n') puttex(line, b); /* handle totally blank line */ else puttex(line + 1, b); } break; } default:{ if (isdigit((int) line[0])) { /* start of section */ if (!intable) /* ignore while in table */ section(line, b); } else fprintf(stderr, "unknown control code '%c' in column 1\n", line[0]); break; } } } /* process a line with a digit control char */ /* starts a new [sub]section */ void section(char *line, FILE *b) { static char string[MAX_LINE_LEN+1]; int sh_i; if (verb) { (void) fputs("\\end{verbatim}\n", b); (void) fputs("\\postverbatim\n", b); verb = FALSE; } (void) sscanf(line, "%d %[^\n]s", &sh_i, string); switch (sh_i) { case 1: (void) fprintf(b, "\\part{"); break; case 2: (void) fprintf(b, "\\section*{"); break; case 3: (void) fprintf(b, "\\subsection*{"); break; case 4: (void) fprintf(b, "\\subsubsection*{"); break; case 5: (void) fprintf(b, "\\paragraph*{"); break; case 6: (void) fprintf(b, "\\subparagraph{"); break; default: break; } if (islower((int) string[0])) string[0] = toupper(string[0]); puttex(string, b); (void) fprintf(b, "}\n"); switch (sh_i) { case 2: (void) fprintf(b, "\\addcontentsline{toc}{section}{"); puttex(string, b); (void) fprintf(b, "}\n"); break; case 3: (void) fprintf(b, "\\addcontentsline{toc}{subsection}{"); puttex(string, b); (void) fprintf(b, "}\n"); break; case 4: (void) fprintf(b, "\\addcontentsline{toc}{subsubsection}{"); puttex(string, b); (void) fprintf(b, "}\n"); break; case 5: (void) fprintf(b, "\\addcontentsline{toc}{paragraph}{"); puttex(string, b); (void) fprintf(b, "}\n"); break; default: break; } } /* put text in string str to file while buffering special TeX characters */ void puttex( char *str, FILE *file) { register char ch; char string[MAX_LINE_LEN+1], c; static TBOOLEAN inquote = FALSE; int i; while ((ch = *str++) != NUL) { switch (ch) { case '#': case '$': case '%': case '&': case '{': case '}': (void) fputc('\\', file); (void) fputc(ch, file); break; case '\\': (void) fputs("$\\backslash$", file); break; case '~': (void) fputs("\\~{\\ }", file); break; case '^': (void) fputs("\\verb+^+", file); break; case '>': case '<': case '|': (void) fputc('$', file); (void) fputc(ch, file); (void) fputc('$', file); break; case '"': (void) fputs("{\\tt\"}", file); break; case '\'': if (*str == '\'') { (void) fputs("{'\\,'}", file); str++; } else { (void) fputc(ch, file); } break; case '-': if ((*str == '-') && (*(str + 1) == '-')) { (void) fputs(" --- ", file); str += 2; } else { (void) fputc(ch, file); } break; case '`': /* backquotes mean boldface */ if (inquote) { if (see){ char *index = string; char *s; (void) fputs(" (p.~\\pageref{", file); (void) fputs(string, file); (void) fputs("})", file); #ifndef NO_CROSSREFS /* Make the final word an index entry also */ fputs("\\index{",file); #if 0 /* Aug 2006: no need to split index words at - or _ */ if (strrchr(index,'-')) index = strrchr(index,'-')+1; if (strrchr(index,'_')) index = strrchr(index,'_')+1; #endif if (strrchr(index,' ')) index = strrchr(index,' ')+1; while ((s = strchr(index,'_')) != NULL) /* replace _ by space */ *s = ' '; fputs(index,file); fputs("}",file); #endif /* see = FALSE; */ } (void) fputs("}", file); inquote = FALSE; } else { (void) fputs("{\\bf ", file); for (i=0; i<MAX_LINE_LEN && ((c=str[i]) != '`') ; i++){ string[i] = c; } string[i] = NUL; inquote = TRUE; } break; case '_': /* emphasised text ? */ for (i = 0; isalpha((int) (*(str + i))); i++); if ((i > 0) && (*(str + i) == '_') && isspace((int) (*(str + i + 1)))) { (void) fputs("{\\em ", file); for (; *str != '_'; str++) { (void) fputc(*str, file); } str++; (void) fputs("\\/}", file); } else { (void) fputs("\\_", file); } break; case 's': /* find backquote after 'see' {see `} */ case 'S': (void) fputc(ch, file); if ( str[0] == 'e' && str[1] == 'e' && isspace(str[2])){ see = TRUE; } break; case ')': case '.': see = FALSE; default: (void) fputc(ch, file); break; } } } void finish(FILE *b) { (void) fputs("\\part{Index}\n", b); (void) fputs("\\printindex\n", b); (void) fputs("\\end{document}\n", b); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/toc_entr.sty���������������������������������������������������������������������0000644�0004711�0000144�00000005621�06515203635�013450� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������% % $Id: toc_entr.sty,v 1.1.1.1 1998/04/15 19:16:45 lhecking Exp $ % % % % TOC_ENTRY.STY of 13 Dec 90 % written by Stefan Timphus % % Will produce the right space for sectionnumbers in the tableofcontents % Necessary for entries where the number for each kind of section % is greater 10 (e.g. "12.14.18 Sectionname") % When using the original definition the first letter of the sectionname % overwrites the last number of the sectionnumber % % call adjustments with command \adjustSTYLENAME % % article.sty modified by RCC (1 May 96) to add another subsection level \typeout{`toc_entry.sty' 1.0 of 13 Dec 90} % % HERE ARE THE ORIGINAL DEFINITIONS % % article.sty % %\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} %\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} %\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} %\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}} % report.sty and book.sty % %\def\l@section{\@dottedtocline{1}{1.5em}{2.3em}} %\def\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}} %\def\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}} %\def\l@paragraph{\@dottedtocline{4}{10em}{5em}} %\def\l@subparagraph{\@dottedtocline{5}{12em}{6em}} % % MODIFICATIONS % \newlength{\twonum} \settowidth{\twonum}{99.99.} \newlength{\threenum} \settowidth{\threenum}{99.99.99.} \newlength{\fournum} \settowidth{\fournum}{99.99.99.99.} \newlength{\fivenum} \settowidth{\fivenum}{99.99.99.99.99.} \newlength{\sixnum} \settowidth{\sixnum}{99.99.99.99.99.99.} \newcommand{\adjustarticle} {\def\l@subsection{\@dottedtocline{2}{1.5em}{\twonum}} \def\l@subsubsection{\@dottedtocline{3}{4.0em}{\threenum}} \def\l@paragraph{\@dottedtocline{4}{7.8em}{\fournum}} \def\l@subparagraph{\@dottedtocline{5}{10.4em}{\fivenum}}} \newcommand{\adjustreport} {\def\l@section{\@dottedtocline{1}{1.5em}{\twonum}} \def\l@subsection{\@dottedtocline{2}{4.0em}{\threenum}} \def\l@subsubsection{\@dottedtocline{3}{7.8em}{\fournum}} \def\l@paragraph{\@dottedtocline{4}{10.4em}{\fivenum}} \def\l@subparagraph{\@dottedtocline{5}{12.6em}{\sixnum}}} \newcommand{\adjustbook}{\adjustreport} \newcommand{\subsubsubsection}[1]{\paragraph{#1}} % end of TOC_ENTRY.STY % % PROPOSED MODIFICATIONS % % remove: % %\newcommand{\subsubsubsection}[1]{\paragraph{$1}} % % change: % %\newcommand{\adjustarticle} %{\def\l@subsection{\@dottedtocline{2}{1.5em}{\twonum}} %\def\l@subsubsection{\@dottedtocline{3}{4.0em}{\threenum}} %\def\l@subsubsubsection{\@dottedtocline{3}{7.8em}{\fournum}} %\def\l@paragraph{\@dottedtocline{4}{10.4em}{\fivenum}} %\def\l@subparagraph{\@dottedtocline{5}{12.6em}{\sixnum}}} % % add: % %\setcounter{secnumdepth}{5} %\setcounter{tocdepth}{5} % %\def\subsubsubsection{\@startsection{subsubsubsection}{3}{\z@}{-3.25ex plus %-1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}} % %\newcounter {subsubsubsection}[subsubsection] % %\def\thesubsubsubsection {\thesubsubsection .\arabic{subsubsubsection}} % ���������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/xref.c���������������������������������������������������������������������������0000644�0004711�0000144�00000021164�11532704567�012207� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: xref.c,v 1.13 2011/02/28 11:39:35 markisch Exp $"); } #endif /* GNUPLOT - xref.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * this file is used by doc2ipf, doc2html, doc2rtf and doc2info * * MUST be included after termdoc.c (since termdoc.c redefines fgets() ) * * it contains functions needed to handle xrefs, most of them from * doc2rtf (most likely) by Maurice Castro * or doc2ipf by Roger Fearick * or doc2html by Russel Lang * * I have modified the functions a little to make them more flexible * (lookup returns list instead of list->line) or let them work with all * four programs (adding three parameters to refs). * * I switched the search order of lookup. Makes more sense to me * * Stefan Bodewig 1/29/1996 */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #define DOCS_XREF_MAIN #include "syscfg.h" #include "stdfn.h" #include "doc2x.h" #include "xref.h" struct LIST *list = NULL; struct LIST *head = NULL; struct LIST *keylist = NULL; struct LIST *keyhead = NULL; void dump_list __PROTO((void)); int maxlevel = 0; /* how deep are the topics nested? */ int listitems = 0; /* number of topics */ /* for debugging (invoke from gdb !) */ void dump_list() { struct LIST *element = head; while (element) { fprintf(stderr, "%p level %d, line %d, \"%s\"\n", element, element->level, element->line, element->string); element = element->next; } } generic * xmalloc(size_t size) { generic *p = malloc(size); if (!p) { fprintf(stderr, "Malloc failed\n"); exit(EXIT_FAILURE); } return p; } /* scan the file and build a list of line numbers where particular levels are */ void parse(FILE *a) { static char line[MAX_LINE_LEN+1]; char *c; int lineno = 0; int lastline = 0; /* insert a special level 0 listitem * this one is the starting point for the table of contents in the html * version and the Top-Node of the info version. * * Added this to support multiple level 1 items. --SB */ listitems = 1; head = (list = (struct LIST *) xmalloc(sizeof(struct LIST))); list->prev = NULL; list->line = 0; list->level = 0; list->string = (char *) xmalloc(1); list->string[0] = NUL; list->next = NULL; while (get_line(line, sizeof(line), a)) { lineno++; if (isdigit((int)line[0])) { /* start of new section */ listitems++; if (list == NULL) { /* impossible with the new level 0 item */ head = (list = (struct LIST *) xmalloc(sizeof(struct LIST))); list->prev = NULL; } else { list->next = (struct LIST *) xmalloc(sizeof(struct LIST)); list->next->prev = list; list = list->next; list->next = NULL; } list->line = lastline = lineno; list->level = line[0] - '0'; list->string = (char *) xmalloc(strlen(line) + 1); c = strtok(&(line[1]), "\n"); strcpy(list->string, c); list->next = NULL; if (list->level > maxlevel) maxlevel = list->level; } if (line[0] == '?') { /* keywords */ if (keylist == NULL) { keyhead = (keylist = (struct LIST *) xmalloc(sizeof(struct LIST))); keylist->prev = NULL; } else { keylist->next = (struct LIST *) xmalloc(sizeof(struct LIST)); keylist->next->prev = keylist; keylist = keylist->next; } keylist->line = lastline; keylist->level = list->level; c = strtok(&(line[1]), "\n"); if (c == NULL || *c == '\0') c = list->string; keylist->string = (char *) malloc(strlen(c) + 1); strcpy(keylist->string, c); keylist->next = NULL; } } rewind(a); } /* look up a topic in text reference */ /* * Original version from doc2rtf (|| ipf || html) scanned keylist before list. * This way we get a reference to `plot` for the topic `splot` instead * of one to `splot`. Switched the search order -SB. */ struct LIST * lookup(char *s) { char *c; char tokstr[MAX_LINE_LEN+1]; char *match; int l; strcpy(tokstr, s); /* first try titles */ match = strtok(tokstr, " \n\t"); if (match == NULL) { fprintf(stderr, "Error in lookup(\"%s\")\n", s); /* there should a line number, but it is local to parse() */ fprintf(stderr, "Possible missing link character (`) near above line number\n"); exit(3); } l = 0; /* level */ list = head; while (list != NULL) { c = list->string; while (isspace((int)(*c))) c++; if (!strcmp(match, c)) { l = list->level; match = strtok(NULL, "\n\t "); if (match == NULL) { return (list); } } if (l > list->level) break; list = list->next; } /* then try the ? keyword entries */ keylist = keyhead; while (keylist != NULL) { c = keylist->string; while (isspace((int)(*c))) c++; if (!strcmp(s, c)) return (keylist); keylist = keylist->next; } return (NULL); } /* * find title-entry for keyword-entry */ struct LIST * lkup_by_number(int line) { struct LIST *run = head; while (run->next && run->next->line <= line) run = run->next; if (run->next) return run; else return NULL; } /* * free the whole list (I never trust the OS -SB) */ void list_free() { struct LIST *run; for (run = head; run->next; run = run->next) ; /* do nothing */ for (run = run->prev; run; run = run->prev) { free(run->next->string); free(run->next); } free(head->string); free(head); for (run = keyhead; run->next; run = run->next) ; /* do nothing */ for (run = run->prev; run; run = run->prev) { free(run->next->string); free(run->next); } free(keyhead->string); free(keyhead); } /* search through the list to find any references */ /* * writes a menu of all subtopics of the topic located at l * format must contain %s for the title of the subtopic and may contain * a %d for the line number of the subtopic (used by doc2html and doc2rtf * The whole menu is preceeded by start and gets the trailer end */ void refs( int l, FILE *f, char *start, char *end, char *format) { int curlevel, i; char *c; int inlist = FALSE; /* find current line */ list = head; while (list->line != l) list = list->next; curlevel = list->level; list = list->next; /* look at next element before going on */ if ((start != NULL) && (list != NULL) && (list->level > curlevel)) { /* don't write start if there's no menue at all */ inlist = TRUE; fprintf(f, "%s", start); } while (list != NULL) { /* we are onto the next topic so stop */ if (list->level <= curlevel) break; /* these are the next topics down the list */ if (list->level == curlevel + 1) { c = list->string; while (isspace((int)(*c))) c++; /* strip leading whitespace */ if (format != NULL) { for (i = 0; format[i] != '%' && format[i] != '\0'; i++); if (format[i] != '\0') { if (format[i + 1] == 'd') { /* line number has to be printed first */ fprintf(f, format, list->line, c); } else { ++i; for (; format[i] != '%' && format[i] != '\0'; i++); if (format[i] != '\0') /* line number is second */ fprintf(f, format, c, list->line); else /* no line number at all */ fprintf(f, format, c); } } } } list = list->next; } if (inlist && end) /* trailer */ fprintf(f, "%s", end); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/doc2texi.el����������������������������������������������������������������������0000644�0004711�0000144�00000074303�12165071111�013126� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;;; doc2texi.el -- generate a texinfo file from the gnuplot doc file ;; Copyright (C) 1999 Bruce Ravel ;; Author: Bruce Ravel <ravel@phys.washington.edu> ;; Maintainer: Bruce Ravel <ravel@phys.washington.edu> ;; Created: March 23 1999 ;; Updated: May 28 1999 ;; Version: 0.2 ;; Keywords: gnuplot, document, info ;; This file is not part of GNU Emacs. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This lisp script is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ;; ;; Permission is granted to distribute copies of this lisp script ;; provided the copyright notice and this permission are preserved in ;; all copies. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; send bug reports to the author (ravel@phys.washington.edu) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Commentary: ;; ;; I suppose the most immediate question to ask is "Why do this in ;; emacs lisp???" While it is true that the gnuplot.doc file lends ;; itself to processing by a 1 pass filter, there are some aspects of ;; texinfo files that are a bit tricky and would require 2 or perhaps ;; three passes. Specifically, getting all of the cross references ;; made correctly is a lot of work. Fortunately, texinfo-mode has ;; functions for building menus and updating nodes. This saves a lot ;; of sweat and is the principle reason why I decided to write this in ;; emacs lisp. ;; ;; Everything else in gnuplot is written in C for the sake of ;; portability. Emacs lisp, of course, requires that you have emacs. ;; For many gnuplot users, that is not a good assumption. However, ;; the likelihood of needing info files in the absence of emacs is ;; very, very slim. I think it is safe to say that someone who needs ;; info files has emacs installed and thus will be able to use this ;; program. ;; ;; Since this is emacs, I am not treating the gnuplot.doc file as a ;; text stream. It seems much more efficient in this context to treat ;; it as a buffer. All of the work is done by the function ;; `d2t-doc-to-texi'. Each of the conversion chores is handled by an ;; individual function. Each of thse functions is very similar in ;; structure. They start at the top of the buffer, search forward for ;; a line matching the text element being converted, perform the ;; replacement in place, and move on until the end of the buffer. ;; These text manipulations are actually quite speedy. The slow part ;; of the process is using the texinfo-mode function to update the ;; nodes and menus. However, using these slow functions has one ;; advantage -- the texinfo-mode functions for doing menus and nodes ;; are certain to do the job correctly. Although rather slow, this ;; approach doesn't totally suck compared to the time cost of ;; compiling and running a C program. And the output from this is ;; much more useful than the output from the doc2info program. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Use: ;; ;; Customize the variables at the start of the executable code. Then ;; I intend that this be used from the command line or from a Makefile ;; like so: ;; ;; emacs -batch -l doc2texi.el -f d2t-doc-to-texi ;; ;; or ;; ;; emacs -batch -l doc2texi.el -f d2t-doc-to-texi-verbosely ;; ;; This will start emacs in batch mode, load this file, run the ;; converter, then quit. This takes about 30 seconds my 133 MHz ;; Pentium. It also sends a large number of mesages to stderr, so you ;; may want to redirect stderr to /dev/null or to a file. ;; ;; Then you can do ;; ;; makeinfo gnuplot.info ;; ;; You may want to use the --no-split option. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; History: ;; ;; 0.1 Mar 23 1999 <BR> Initial version ;; 0.2 May 28 1999 <BR> ;; 0.3 Jun 2 1999 <BR> Added terminal information, fixed uref problem. ;; 0.4 Feb 23 2012 <jjo> Added generation of gnuplot-eldoc strings file ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Acknowledgements: ;; ;; Lars Hecking asked me to look into the doc -> info problem. Silly ;; me, I said "ok." This is what I came up with. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; To do: ;; ;; -- internal cross-references: these are not perfect due to ;; inconsistencies in the use of `` and case inconsistencies in ;; the text. The latter can be fixed. Also I need a way to not ;; make the @ref if point is currently in that region. ;; -- catch errors gracefully, particularly when looking for files. ;; -- are guesses about OS specific terminal information correct? ;; -- turn the lists in the "What's New" and "xlabel" sections into ;; proper lists. "^\\([0-9]\\)+\." finds the list items. If ;; (match-string 1) is "1" then insert "@enumerate\n@item\n", else ;; insert "@item\n". also use (replace-match ""). need to find ;; the end somehow. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Code: ;;; You may need to customize these variables: (defvar d2t-doc-file-name "gnuplot.doc" "Name of the gnuplot.doc file.") (defvar d2t-terminal-directory (expand-file-name "../term/") "Location of .trm files in gnuplot source tree.") ;;; You should not need to touch anything below here ;;;;;;;;;;;;;;;;;;;;; (require 'cl) (eval-and-compile ; need split-string to do xrefs (if (fboundp 'split-string) () (defun split-string (string &optional pattern) "Return a list of substrings of STRING which are separated by PATTERN. If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." (or pattern (setq pattern "[ \f\t\n\r\v]+")) (let (parts (start 0)) (while (string-match pattern string start) (setq parts (cons (substring string start (match-beginning 0)) parts) start (match-end 0))) (nreverse (cons (substring string start) parts)))) )) (eval-and-compile (and (featurep 'xemacs) ;; XEmacs 21.4 doesn't have replace-regexp-in-string (not (fboundp 'replace-regexp-in-string)) (defun replace-regexp-in-string (regexp rep string) (replace-in-string string regexp rep)))) (defconst d2t-work-buffer-name "*doc2texi*" "Name of scratch buffer where the doc file will be converted into a texi file.") (defconst d2t-scratch-buffer-name "*doc2texi-output*") (defconst d2t-terminal-buffer-name "*doc2texi-terminal*") (defvar d2t-verbose nil) (defconst d2t-texi-filename "gnuplot.texi") (defconst d2t-texi-header "\\input texinfo @c -*-texinfo-*- @c %**start of header @setfilename gnuplot.info @settitle Gnuplot: An Interactive Plotting Program @setchapternewpage odd @c %**end of header @c define the command and options indeces @defindex cm @defindex op @defindex tm @dircategory Math @direntry * GNUPLOT: (gnuplot). An Interactive Plotting Program @end direntry @ifnottex @node Top, gnuplot, (dir), (dir) @top Master Menu @end ifnottex @example GNUPLOT An Interactive Plotting Program Thomas Williams & Colin Kelley Version 4.6 organized by: Hans-Bernhard Broeker, Ethan A Merritt, and others Copyright (C) 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley Copyright (C) 2004 - 2011 various authors Mailing list for comments: gnuplot-info@@lists.sourceforge.net Mailing list for bug reports: gnuplot-bugs@@lists.sourceforge.net This manual was originally prepared by Dick Crawford Version 4.6 - December 2011 Major contributors (alphabetic order): @end example " "Texinfo header.") (defconst d2t-main-menu "@menu @end menu" "Main menu.") (defconst d2t-texi-footer "@node Concept_Index, Command_Index, Bugs, Top @unnumbered Concept Index @printindex cp @node Command_Index, Option_Index, Concept_Index, Top @unnumbered Command Index @printindex cm @node Options_Index, Function_Index, Command_Index, Top @unnumbered Options Index @printindex op @node Function_Index, Terminal_Index, Options_Index, Top @unnumbered Function Index @printindex fn @node Terminal_Index, , Options_Index, Top @unnumbered Terminal Index @printindex tm @c @shortcontents @contents @bye " "Texinfo file terminator.") (defvar d2t-level-1-alist nil "Alist of level 1 tags and markers.") (defvar d2t-level-2-alist nil "Alist of level 2 tags and markers.") (defvar d2t-level-3-alist nil "Alist of level 3 tags and markers.") (defvar d2t-level-4-alist nil "Alist of level 4 tags and markers.") (defvar d2t-level-5-alist nil "Alist of level 5 tags and markers.") (defvar d2t-commands-alist nil "Alist of commands and markers.") (defvar d2t-set-show-alist nil "Alist of options and markers.") (defvar d2t-functions-alist nil "Alist of functions and markers.") (defvar d2t-terminals-alist nil "Alist of terminal types and markers.") (defvar d2t-node-list nil "List of nodes.") (defvar d2t-terminal-list ()) (setq d2t-terminal-list '("aed" "ai" "aquaterm" "be" "cairo" "canvas" "cgi" "cgm" "context" "corel" "debug" "djsvga" "dumb" "dxf" "dxy" "eepic" "emf" "emxvga" "epslatex" "epson" "excl" "fg" "fig" "gd" "ggi" "gif" "gpic" "gpr" "grass" "hp26" "hp2648" "hp500c" "hpgl" "hpljii" "hppj" "imagen" "jpeg" "kyo" "latex" "linux" "lua" "mac" "metafont" "metapost" "mgr" "mif" "next" "openstep" "pbm" "pc" "pdf" "png" "post" "pslatex" "pstricks" "qms" "regis" "sun" "svg" "t410x" "table" "tek" "texdraw" "tgif" "tikz" "tkcanvas" "tpic" "unixpc" "v384" "vgagl" "vws" "win" "wxt" "x11" "xlib")) (defvar d2t-gnuplot-license ";;;; This file is generated automatically from the Gnuplot ;;;; documentation by `doc2texi.el', part of the Gnuplot distribution. ;;;; It is not intended to be edited manually. See docs/gnuplot.doc ;;;; in the gnuplot source tree (available from ;;;; gnuplot.sourcefourge.net) for the original. ;; This file is covered by the Gnuplot licensing terms: ;; Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley ;; ;; Permission to use, copy, and distribute this software and its ;; documentation for any purpose with or without fee is hereby granted, ;; provided that the above copyright notice appear in all copies and ;; that both that copyright notice and this permission notice appear ;; in supporting documentation. ;; ;; Permission to modify the software is granted, but not the right to ;; distribute the complete modified source code. Modifications are to ;; be distributed as patches to the released version. Permission to ;; distribute binaries produced by compiling modified sources is granted, ;; provided you ;; 1. distribute the corresponding source modifications from the ;; released version in the form of a patch file along with the binaries, ;; 2. add special version identification to distinguish your version ;; in addition to the base release version number, ;; 3. provide your name and address as the primary contact for the ;; support of your modified version, and ;; 4. retain our contact information in regard to use of the base ;; software. ;; Permission to distribute the released version of the source code along ;; with corresponding source modifications in the form of a patch file is ;; granted with same provisions 2 through 4 for binary distributions. ;; ;; This software is provided \"as is\" without express or implied warranty ;; to the extent permitted by applicable law." "Gnuplot license for insertion into automatically generated gnuplot-eldoc.el file.") (defun d2t-doc-to-texi-verbosely () "Run `d2t-doc-to-texi' noisily" (interactive) (setq d2t-verbose t) (d2t-doc-to-texi)) (defun d2t-doc-to-texi () "This is the doc to texi converter function. It calls a bunch of other functions, each of which handles one particular conversion chore." (interactive) (setq d2t-level-1-alist nil ;; initialize variables d2t-level-2-alist nil d2t-level-3-alist nil d2t-level-4-alist nil d2t-level-5-alist nil d2t-commands-alist nil d2t-set-show-alist nil d2t-functions-alist nil d2t-terminals-alist nil d2t-node-list nil) ;; open the doc file and get some data about its contents (d2t-prepare-workspace) (message "Inserting help for terminals ...") (d2t-get-terminals) (message "Analyzing doc file ...") (d2t-get-levels) (d2t-get-commands) (d2t-get-set-show) (d2t-get-functions) ;; convert the buffer from doc to texi, one element at a time (message "Converting to texinfo ...") (d2t-braces-atsigns) ;; this must be the first conversion function (d2t-comments) ;; delete comments (d2t-sectioning) ;; chapters, sections, etc (d2t-get-eldoc-strings) (d2t-indexing) ;; index markup (d2t-tables) ;; fix up tables (d2t-handle-html) ;; fix up html markup (d2t-first-column) ;; left justify normal text (d2t-enclose-examples) ;; turn indented text into @examples (message "Menus, nodes, xrefs ...") (d2t-make-refs) ;(d2t-make-menus) ;(d2t-set-nodes) (save-excursion ;; fix a few more things explicitly (goto-char (point-min)) (insert d2t-texi-header) (search-forward "@node") ;; (beginning-of-line) ;; (insert "\n\n" d2t-main-menu "\n\n") (search-forward "@node Bugs") ; `texinfo-all-menus-update' seems (beginning-of-line) ; to miss this one. how odd. (insert "@menu\n* Bugs::\t\t\t\n@end menu\n\n") (goto-char (point-max)) (insert d2t-texi-footer)) (load-library "texinfo") ;; now do the hard stuff with texinfo-mode (texinfo-mode) (let ((message-log-max 0) (standard-output (get-buffer-create d2t-scratch-buffer-name))) (message "Making texinfo nodes ...\n") (texinfo-every-node-update) (message "Making texinfo menus ...\n") (texinfo-all-menus-update)) (write-file d2t-texi-filename) ) ; save it and done! (defun d2t-prepare-workspace () "Create a scratch buffer and populate it with gnuplot.doc." (and d2t-verbose (message " Doing d2t-prepare-workspace ...")) (if (get-buffer d2t-work-buffer-name) (kill-buffer d2t-work-buffer-name)) (if (get-buffer d2t-texi-filename) (kill-buffer d2t-texi-filename)) (if (get-buffer d2t-terminal-buffer-name) (kill-buffer d2t-terminal-buffer-name)) (get-buffer-create d2t-terminal-buffer-name) (set-buffer (get-buffer-create d2t-work-buffer-name)) (insert-file-contents d2t-doc-file-name) (goto-char (point-min))) (defvar d2t-additional-terminals '(("linux" "linux") ("canvas" "canvas") ("lua" "lua" "tikz") ("mac" "mac" "openstep") ("beos" "be") ("dos" "emxvga" "djsvga" "fg" "pc") ("windows" "win") ("next" "next") ("os2" "pm" "emxvga") ("sco" "cgi") ("sun" "sun") ("vms" "vws")) "Additional terminals to add to the converted gnuplot.info file. The CARs of the items are strings to match against `system-configuration', and the CDRs are the elements to add to the end of `d2t-get-terminals'.") (defun d2t-get-terminals () "Insert all appropriate terminal help." (let ((case-fold-search t)) (dolist (rec d2t-additional-terminals) (let ((system (car rec)) (terms (cdr rec))) (when (string-match system system-configuration) (dolist (term terms) (add-to-list 'd2t-terminal-list term))))) (unless (member* system-configuration '("pc" "windows") :test 'string-match) (dolist (term '("x11" "tgif" "gpic" "regis" "t410x" "tex" "xlib")) (add-to-list 'd2t-terminal-list term))) (setq d2t-terminal-list (sort d2t-terminal-list 'string<)) (let ((list d2t-terminal-list) file node marker) (save-excursion (when (re-search-forward "^<3" (point-max) t) (beginning-of-line) (insert "@c ") (forward-line 1) (dolist (elem list) (and d2t-verbose (message " %s ..." elem)) (setq file (concat d2t-terminal-directory elem ".trm")) (when (file-exists-p file) (with-current-buffer d2t-terminal-buffer-name (erase-buffer) (insert-file-contents file) ;; find the terminal help (when (search-forward "START_HELP" (point-max) "to_end") (forward-line 1) (delete-region (point-min) (point-marker)) (search-forward "END_HELP" (point-max) "to_end") (beginning-of-line) (delete-region (point-marker) (point-max)) ;; tidy up the terminal help content (goto-char (point-min)) (while (re-search-forward "\",[ \t]*$" nil t) (replace-match "" nil nil)) (goto-char (point-min)) (while (re-search-forward "^\"" nil t) (replace-match "" nil nil)) (goto-char (point-min)) (while (re-search-forward "\\\\\"" nil t) (replace-match "\"" nil nil)) (goto-char (point-min)) (while (re-search-forward "^1[ \t]+\\(.+\\)$" nil t) (setq node (match-string 1) marker (point-marker)) (replace-match (concat "3 " node) nil nil)) (goto-char (point-min)) (while (re-search-forward "^2" nil t) (replace-match "4 " nil nil)) (goto-char (point-min)) ;; set up terminals index (while (re-search-forward "^\?\\([^ ]+\\)$" nil t) (let ((word (match-string 1))) (unless (string-match "_\\|command-line-options" word) (setq d2t-terminals-alist (append d2t-terminals-alist (list (cons word (point-marker)))))))) ;; and cram it into the doc buffer (with-current-buffer d2t-work-buffer-name (insert-buffer-substring d2t-terminal-buffer-name))))))))))) ;;; functions for obtaining lists of nodes in the document (defun d2t-get-levels () "Find positions of all nodes in the doc." (and d2t-verbose (message " Doing d2t-get-levels ...")) (let ((list '("1" "2" "3" "4" "5")) str) (while list (setq str (concat "d2t-level-" (car list) "-alist")) (and d2t-verbose (message " %s ..." str)) (save-excursion (while (not (eobp)) (when (re-search-forward (concat "^" (car list) " \\(.+\\)$") (point-max) "to_end") (beginning-of-line) (set (intern str) (append (eval (intern str)) (list (cons (match-string 1) (point-marker))))) (forward-line 1)))) (setq list (cdr list))))) (defun d2t-get-commands () "Find all commands in the doc." (and d2t-verbose (message " Doing d2t-get-commands ...")) (save-excursion (let ((alist d2t-level-1-alist) start end) (while alist (if (string= (caar alist) "Commands") (setq start (cdar alist) ;; location of "1 Commands" end (cdadr alist) ;; location of next level 1 heading alist nil) (setq alist (cdr alist)))) ;;(message "%S %S" start end) (goto-char start) (while (< (point) end) (when (re-search-forward "^2 \\(.+\\)$" (point-max) "to_end") (beginning-of-line) (unless (> (point) end) (setq d2t-commands-alist (append d2t-commands-alist (list (cons (match-string 1) (point-marker)))))) (forward-line 1))) ))) (defun d2t-get-set-show () "Find all set-show options in the doc." (and d2t-verbose (message " Doing d2t-get-set-show ...")) (save-excursion (let ((alist d2t-commands-alist) start end) (while alist (if (string= (caar alist) "set-show") (setq start (cdar alist) ;; location of "1 set-show" end (cdadr alist) ;; location of next level 2 heading alist nil) (setq alist (cdr alist)))) ;;(message "%S %S" start end) (goto-char start) (while (< (point) end) (when (re-search-forward "^3 \\(.+\\)$" (point-max) "to_end") (beginning-of-line) (unless (> (point) end) (setq d2t-set-show-alist (append d2t-set-show-alist (list (cons (match-string 1) (point-marker)))))) (forward-line 1))) ))) (defun d2t-get-functions () "Find all functions in the doc." (and d2t-verbose (message " Doing d2t-get-functions ...")) (let (begin end) (save-excursion ; determine bounds of functions (when (re-search-forward "^3 Functions" (point-max) "to_end") (beginning-of-line) (setq begin (point-marker)) (forward-line 1) (when (re-search-forward "^3 " (point-max) "to_end") (beginning-of-line) (setq end (point-marker)))) (goto-char begin) (while (< (point) end) (when (re-search-forward "^4 \\(.+\\)$" (point-max) "to_end") (beginning-of-line) (unless (> (point) end) (setq d2t-functions-alist (append d2t-functions-alist (list (cons (match-string 1) (point-marker)))))) (forward-line 1))) ))) ;; buffer manipulation functions ;; this can probably be made faster using a let-scoped alist rather ;; than the big cons block (defun d2t-sectioning () "Find all lines starting with a number. These are chapters, sections, etc. Delete these lines and insert the appropriate sectioning and @node commands." (and d2t-verbose (message " Doing d2t-sectioning ...")) (save-excursion (while (not (eobp)) (re-search-forward "^\\([1-9]\\) +\\(.+\\)$" (point-max) "to_end") (unless (eobp) (let* ((number (match-string 1)) (word (match-string 2)) (node (substitute ?_ ? word :test 'char-equal)) (eol (save-excursion (end-of-line) (point-marker)))) ;; some node names appear twice. make them unique. (while (member* node d2t-node-list :test 'string=) (setq node (concat node "_"))) (setq d2t-node-list (append d2t-node-list (list node))) (beginning-of-line) (delete-region (point-marker) eol) (if (string-match "[1-4]" number) (insert "\n@node " node "\n")) (cond ((string= number "1") (insert "@chapter " word "\n")) ((string= number "2") (insert "@section " word "\n")) ((string= number "3") (insert "@subsection " word "\n")) ((string= number "4") (insert "@subsubsection " word "\n")) (t (insert "\n\n@noindent --- " (upcase word) " ---\n")) ) ))))) (defun d2t-get-eldoc-strings () "Find all syntax descriptions in the doc for ElDoc alist. Dumps the resulting data into gnuplot-eldoc.el" (and d2t-verbose (message " Doing d2t-get-eldoc-strings ...")) (save-excursion (goto-char (point-min)) (let ((alist '())) (while (re-search-forward "^\\s-Syntax:" nil t) ;; Find the section name (let ((section (save-excursion (re-search-backward "@node *\\([^ ].*\\)$") (match-string 1)))) ;; Skip blank lines (forward-line) (while (looking-at "^\\s-*$") (forward-line)) ;; Grab everything at this level of indentation (let* ((lines '()) (indent (save-excursion (skip-syntax-forward "-"))) (indent-regexp (buffer-substring (point) (+ (point) indent)))) (while (looking-at indent-regexp) (let ((line (replace-regexp-in-string "@\\([@{}]\\)" "\\1" (buffer-substring (+ (point-at-bol) indent) (point-at-eol))))) (push line lines)) (forward-line)) ;; Add to alist (if (= (length lines) 1) (push `(,section ,(car lines)) alist) (setq lines (nreverse lines)) (push `(,section ,(concat (car lines) " [more ...]") ,(mapconcat 'identity lines "\n")) alist))))) ;; Save in "gnuplot-eldoc.el" (with-temp-file "gnuplot-eldoc.el" (let ((print-level nil) (print-length nil)) (insert (format ";;;; Automatically generated by doc2texi.el on %s\n\n" (format-time-string "%a, %d %B %Y"))) (insert d2t-gnuplot-license) (insert (format "\n\n%S\n%S" '(eval-when-compile (defvar gnuplot-eldoc-hash nil)) `(setq gnuplot-eldoc-hash (let ((tbl (make-hash-table :test 'equal)) (alist ',alist)) (while alist (puthash (caar alist) (cdar alist) tbl) (setq alist (cdr alist))) tbl))))))))) (defun d2t-indexing () "Find all lines starting with a question mark. These are index references. Delete these lines and insert the appropriate indexing commands. Only index one word ? entries, comment out the multi-word ? entries." (and d2t-verbose (message " Doing d2t-indexing ...")) (save-excursion (while (not (eobp)) (re-search-forward "^\\(\\\?\\([^ \n]+\\)\\|=\\([^\n]+\\)\\) *$" (point-max) "to_end") (unless (eobp) (let ((word (or (match-string 2) (match-string 3))) (eol (save-excursion (end-of-line) (point-marker)))) (beginning-of-line) (delete-region (point-marker) eol) (insert "@cindex " word "\n") (cond ((assoc word d2t-commands-alist) (insert "@cmindex " word "\n\n")) ((assoc word d2t-set-show-alist) (insert "@opindex " word "\n\n")) ((assoc word d2t-terminals-alist) (insert "@tmindex " word "\n\n")) ((assoc word d2t-functions-alist) (insert "@findex " word "\n\n"))) ))) (goto-char (point-min)) (while (not (eobp)) (re-search-forward "^\\\?" (point-max) "to_end") (unless (eobp) (if (looking-at "functions? \\(tm_\\w+\\)") (progn (beginning-of-line) (insert "@findex " (match-string 1) "\n@c ")) (beginning-of-line) (insert "@c ")))) )) (defun d2t-comments () "Delete comments and lines beginning with # or %. # and % lines are used in converting tables into various formats. Also ignore F lines denoting figures." (and d2t-verbose (message " Doing d2t-comments ...")) (save-excursion (while (not (eobp)) (re-search-forward "^[C#%F]" (point-max) "to_end") (unless (eobp) (let ((eol (save-excursion (end-of-line) (forward-char 1) (point-marker)))) (beginning-of-line) (delete-region (point-marker) eol) ))))) (defun d2t-first-column () "Justify normal text to the 0th column. This must be run before `d2t-enclose-examples'. This is rather slow since there are almost 9000 lines of text." (and d2t-verbose (message " Doing d2t-first-column ...")) (save-excursion (while (not (eobp)) (and (char-equal (char-after (point)) ? ) (delete-char 1)) (forward-line)))) (defun d2t-braces-atsigns () "Prepend @ to @, {, or } everywhere in the doc. This MUST be the first conversion function called in `d2t-doc-to-texi'." (and d2t-verbose (message " Doing d2t-braces-atsigns ...")) (save-excursion (while (not (eobp)) (re-search-forward "[@{}]" (point-max) "to_end") (unless (eobp) (backward-char 1) (insert "@") (forward-char 1))))) (defun d2t-tables () "Remove @start table and @end table tags. These will be made into @example's by `d2t-enclose-examples'. Thus, the plain text formatting already in the doc is used." (and d2t-verbose (message " Doing d2t-tables ...")) (save-excursion (while (not (eobp)) (re-search-forward "^ *@+start table" (point-max) "to_end") (unless (eobp) (let ((eol (save-excursion (end-of-line) (point-marker)))) (beginning-of-line) (delete-region (point-marker) eol)))) ;;(insert "@example") (goto-char (point-min)) (while (not (eobp)) (re-search-forward "^ *@+end table" (point-max) "to_end") (unless (eobp) (let ((eol (save-excursion (end-of-line) (point-marker)))) (beginning-of-line) (delete-region (point-marker) eol)))))) ;;(insert "@end example") (defun d2t-enclose-examples () "Turn indented text in the doc into @examples. This must be run after `d2t-first-column'." (and d2t-verbose (message " Doing d2t-enclose-examples ...")) (save-excursion (while (not (eobp)) (re-search-forward "^ +[^ \n]" (point-max) "to_end") (unless (eobp) (beginning-of-line) (insert "@example\n") (forward-line 1) (re-search-forward "^[^ ]" (point-max) "to_end") (beginning-of-line) (insert "@end example\n\n") )))) (defun d2t-handle-html () "Deal with all of the html markup in the doc." (and d2t-verbose (message " Doing d2t-handle-html ...")) (save-excursion (while (not (eobp)) (let ((rx (concat "^" (regexp-quote "^") " *\\(<?\\)\\([^ \n]+\\)" ))) (re-search-forward rx (point-max) "to_end") (unless (eobp) (let ((bracket (match-string 1)) (tag (match-string 2)) (eol (save-excursion (end-of-line) (point-marker)))) (beginning-of-line) (cond ;; comment out images ((and (string= bracket "<") (string= tag "img")) (insert "@c ")) ;; tyepset anchors ((and (string= bracket "<") (string-match "^/?a" tag)) ;(insert "@c fix me!! ") (beginning-of-line) (if (looking-at (concat "\\^\\s-*<a\\s-+href=" ; opening tag "\"\\([^\"]+\\)\">\\s-*\n*\\s-*" ; url "\\([^<]+\\)" ; text "[ \t]*\\^?</a>" ; closing tag )) (replace-match (concat "@uref{" (match-string 1) "," (remove* ?^ (match-string 2) :test 'char-equal) "}")) (insert "@c "))) ;; translate <ul> </ul> to @itemize environment ((and (string= bracket "<") (string-match "^ul" tag)) (delete-region (point) eol) (insert "\n@itemize @bullet")) ((and (string= bracket "<") (string-match "/ul" tag)) (delete-region (point) eol) (insert "@end itemize\n")) ;; list items ((and (string= bracket "<") (string-match "^li" tag)) (delete-char 5) (delete-horizontal-space) (insert "@item\n")) ;; fix up a few miscellaneous things (t ;;(looking-at ".*Terminal Types") (insert "@c ")) ) (forward-line))) )))) (defvar d2t-dont-make-ref "^fit f\(x\)\\|gnuplot\\|help\\s-+plotting") (defun d2t-make-refs () "Make cross-references in the text." (and d2t-verbose (message " Doing d2t-make-refs ...")) (let ((big-alist (append d2t-level-1-alist d2t-level-2-alist d2t-level-3-alist d2t-level-4-alist))) (save-excursion (while (re-search-forward "\\(`\\([^`]+\\)`\\)" nil t) (let* ((b (match-beginning 1)) (e (match-end 1)) (list (save-match-data (split-string (match-string 2)))) (last (car (reverse list))) (text (concat "@ref{" last "}"))) ;; (message "%s %s" (match-string 1) last) (when (and (equal t (try-completion last big-alist)) (not (string= last "gnuplot"))) (delete-region b e) (insert text))))))) ;;; doc2texi.el ends here �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/makefile.dst���������������������������������������������������������������������0000644�0004711�0000144�00000012067�07042356573�013373� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # $Id: makefile.dst,v 1.2 2000/01/22 16:40:27 lhecking Exp $ # # # Makefile for GNUPLOT documentation # # Note that the top-level file for documentation is gnuplot.doc. # See README. # # To print manual: # make gnuplot.dvi (for latex) # (print or view gnuplot.dvi) # OR # make gnuplot.nroff (for nroff) # (print or view gnuplot.nroff) # or # make "TROFF=itroff" troff (for troff; use your troff here) # usually overridden by ../Makefile HELPDEST = /usr/local/lib # substitute your troff command (and any flags) for this one TROFF=troff # substitute cp if you do not have the install program INSTALL=install # substitute your DVI to PostScript conversion program here DVIPS=dvips # Compiler flags # -DSYSV if att sys V # -DMSDOS if MSDOS PS # -traditional -g -O if gcc (set 'CC = gcc') # no extra flags for BSD # HBB: this gets called from the toplevel Makefile, and gets passed some CFLAGS, # so I changed this to something completely different: DOC_CFLAGS = $(CFLAGS) -s -I../ -I../term/ CC = gcc # Default information help: @echo "Please do a 'make <TARGET>' where <TARGET> is one of" \ "the following:" @echo @echo "check check the gnuplot.doc file" @echo "clean remove all derived files" @echo "dvi DVI files (gnuplot.dvi gpcard.dvi)" @echo "gih Unix and MSDOS help file (gnuplot.gih)" @echo "help make help" @echo "hlp VMS help file (gnuplot.hlp)" @echo "html HyperText Markup language (gnuplot.html)" @echo "info Info documentation (gnuplot.info)" @echo "install-unix Unix and MSDOS install" @echo "install-vms VMS install" @echo "nroff nroff documentation (gnuplot.nroff)" @echo "ps PostScript files (gnuplot.ps gpcard.ps)" @echo "tex LaTeX documentation (gnuplot.tex)" @echo "troff troff documentation" @echo "tutorial LaTeX tutorial (latextut/tutorial.dvi)" @echo @echo "If you are not familiar with makefiles or just want" \ "to know what" @echo "'make <TARGET>' would do without actually doing" \ "anything, then type" @echo " 'make -n <TARGET>'" @echo # default is what is needed for interactive gnuplot default: gnuplot.hlp gnuplot.gih # the converters doc2html : doc2html.c termdoc.c xref.c allterm.h $(CC) $(DOC_CFLAGS) -o doc2html doc2html.c termdoc.c xref.c doc2ms: doc2ms.c termdoc.c allterm.h $(CC) $(DOC_CFLAGS) -DALL_TERM_DOC -o doc2ms doc2ms.c termdoc.c doc2tex: doc2tex.c termdoc.c allterm.h $(CC) $(DOC_CFLAGS) -DALL_TERM_DOC -o doc2tex doc2tex.c termdoc.c doc2hlp: doc2hlp.c termdoc.c $(CC) $(DOC_CFLAGS) -o doc2hlp doc2hlp.c termdoc.c doc2gih: doc2gih.c termdoc.c $(CC) $(DOC_CFLAGS) -o doc2gih doc2gih.c termdoc.c checkdoc: checkdoc.c termdoc.c allterm.h $(CC) $(DOC_CFLAGS) -DALL_TERM_DOC -o checkdoc checkdoc.c termdoc.c allterm.h: @echo Hmm - need to concatenate all .trm files into allterm.h @echo should have been done by main makefile ### [tn]roff documentation troff: gnuplot.ms titlepag.ms tbl gnuplot.ms | eqn | $(TROFF) -ms nroff: gnuplot.nroff gnuplot.nroff: gnuplot.ms titlepag.ms tbl gnuplot.ms | neqn | nroff -ms | col > gnuplot.nroff ms: gnuplot.ms gnuplot.ms: doc2ms gnuplot.doc ./doc2ms gnuplot.doc gnuplot.ms html: gnuplot.html gnuplot.html : doc2html gnuplot.doc allterm.h ./doc2html gnuplot.doc gnuplot.html ### LaTeX documentation tex: gnuplot.tex gnuplot.tex: doc2tex gnuplot.doc ./doc2tex gnuplot.doc gnuplot.tex # this is how to make DVI files dvi: gnuplot.dvi gpcard.dvi gnuplot.dvi: gnuplot.tex titlepag.tex toc_entr.sty latex gnuplot latex gnuplot gpcard.dvi: gpcard.tex tex gpcard # this is how to make PostScript files # if pslatex has been installed, add "times" to titlepage.tex ps: gnuplot.ps gpcard.ps gnuplot.ps: gnuplot.dvi $(DVIPS) gnuplot gpcard.ps: gpcard.dvi $(DVIPS) gpcard # this is how to make gnuplot.hlp hlp: gnuplot.hlp gnuplot.hlp: doc2hlp gnuplot.doc ./doc2hlp gnuplot.doc gnuplot.hlp # this is how to make gnuplot.gih gih: gnuplot.gih gnuplot.gih: doc2gih gnuplot.doc ./doc2gih gnuplot.doc gnuplot.gih # this is how to make Info documentation info: gnuplot.info gnuplot.info: gnuplot.doc perl doc2texi.pl gnuplot.doc > gpltinfo.tex makeinfo +fill-column 80 gpltinfo.tex rm -f gpltinfo.tex tutorial: latextut/tutorial.tex ( cd latextut; $(MAKE) ) # this is how to check the gnuplot.doc file check: checkdoc gnuplot.doc ./checkdoc < gnuplot.doc # For Unix and MSDOS only install-unix: gnuplot.gih $(INSTALL) gnuplot.gih $(HELPDEST) # for VMS only install-vms: gnuplot.hlp $(INSTALL) gnuplot.hlp $(HELPDEST) # remove all derived files clean: rm -f doc2ms gnuplot.nroff gnuplot.ms \ allterm.h \ doc2html gnuplot.html \ doc2tex gnuplot.tex gnuplot.dvi \ gnuplot.aux gnuplot.log gnuplot.toc \ gnuplot.ps gpcard.dvi gpcard.log gpcard.ps \ doc2hlp gnuplot.hlp \ doc2gih gnuplot.gih \ checkdoc *~ *.o core a.out \ gnuplot.info* gpltinfo.tex ( cd latextut; $(MAKE) clean ) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/termdoc.c������������������������������������������������������������������������0000644�0004711�0000144�00000013732�10071042553�012665� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: termdoc.c,v 1.15 2004/07/01 17:10:03 broeker Exp $"); } #endif /* GNUPLOT - termdoc.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * AUTHORS * * David Denholm - 1996 */ /* this file provides a replacement for fgets() which inserts all the * help from the terminal drivers line by line at the < in the * gnuplot.doc file. This way, doc2* dont need to know what's going * on, and think it's all coming from one place. * * Can be compiled as a standalone program to generate the raw * .doc test, when compiled with -DTEST_TERMDOC * * Strips comment lines {so none of doc2* need to bother} * but magic comments beginning C# are used as markers * for line number recording (as c compilers) * We set BEGIN_HELP macro to "C#<driver>" as a special marker. * * Hmm - this is turning more and more into a preprocessor ! * gnuplot.doc now has multiple top-level entries, but * some help systems (eg VMS) cannot tolerate this. * As a complete bodge, conditional on TBOOLEAN single_top_level == TRUE, * we accept only the first 1, and map any subsequent 1's to 2's * At present, this leaves a bogus, empty section called * commands, but that's a small price to pay to get it * working properly */ #include "syscfg.h" #define DOCS_TERMDOC_MAIN #include "stdfn.h" #include "gp_types.h" #include "doc2x.h" /* because we hide details of including terminal drivers, * we provide line numbers and file names */ int termdoc_lineno; char termdoc_filename[80]; TBOOLEAN single_top_level; char * get_line( char *buffer, int max, FILE *fp) { static int line = -1; /* not going yet */ static int level = 0; /* terminals are at level 1 - we add this */ static int save_lineno; /* for saving lineno */ static int seen_a_one = 0; if (line == -1) { /* we are reading from file */ { read_another_line: /* come here if a comment is read */ if (!fgets(buffer, max, fp)) return NULL; /* EOF */ ++termdoc_lineno; if (buffer[0] == 'C') { if (buffer[1] == '#') { /* should not happen in gnuplot.doc, but... */ safe_strncpy(termdoc_filename, buffer + 2, sizeof(termdoc_filename)); termdoc_filename[strlen(termdoc_filename) - 1] = NUL; termdoc_lineno = 0; } goto read_another_line; /* skip comments */ } } if (single_top_level == TRUE) { if (buffer[0] == '1') { if (seen_a_one) { buffer[0] = '2'; } seen_a_one = 1; } } if (buffer[0] != '<') return buffer; /* the simple case */ /* prepare to return text from the terminal drivers */ save_lineno = termdoc_lineno; termdoc_lineno = -1; /* dont count the C# */ level = buffer[1] - '1'; line = 0; } /* we're sending lines from terminal help */ /* process and skip comments. Note that the last line * will invariably be a comment ! */ while (termtext[line][0] == 'C') { if (termtext[line][1] == '#') { safe_strncpy(termdoc_filename, termtext[line] + 2, sizeof(termdoc_filename)); termdoc_lineno = 0; } ++termdoc_lineno; if (!termtext[++line]) { /* end of text : need to return a line from * the file. Recursive call is best way out */ termdoc_lineno = save_lineno; /* we've done the last line, so get next line from file */ line = -1; return get_line(buffer, max, fp); } } /* termtext[line] is the next line of text. * more efficient to return pointer, but we need to modify it */ ++termdoc_lineno; safe_strncpy(buffer, termtext[line], max); /* dodgy; can overrun buffer; lh */ /* strncat(buffer, "\n", max); */ if (strlen(buffer) == (max - 1)) buffer[max-2] = '\n'; else strcat(buffer, "\n"); if (isdigit((int)buffer[0])) buffer[0] += level; if (!termtext[++line]) { /* end of terminal help : return to input file next time * last (pseudo-)line in each terminal should be a comment, * so we shouldn't get here, but... */ termdoc_lineno = save_lineno; /* we've done the last line, so get next line from file */ line = -1; } return buffer; } /* Safe, '\0'-terminated version of strncpy() * safe_strncpy(dest, src, n), where n = sizeof(dest) * This is basically the old fit.c(copy_max) function */ char * safe_strncpy( char *d, const char *s, size_t n) { char *ret; ret = strncpy(d, s, n); if (strlen(s) >= n) d[n-1] = NUL; return ret; } #ifdef TEST_TERMDOC int main() { char line[256]; while (get_line(line, sizeof(line), stdin)) printf("%s:%d:%s", termdoc_filename, termdoc_lineno, line); return 0; } #endif ��������������������������������������gnuplot-4.6.4/docs/xref.h���������������������������������������������������������������������������0000644�0004711�0000144�00000004272�10037021030�012165� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: xref.h,v 1.4 2004/04/13 17:23:36 broeker Exp $ * */ /* GNUPLOT - xref.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef DOCS_XREF_H # define DOCS_XREF_H /* * this file is included from xref.c * */ struct LIST { int level; int line; char *string; struct LIST *next; struct LIST *prev; }; #ifdef DOCS_XREF_MAIN # define EXTERN /* nought */ #else # define EXTERN extern #endif EXTERN void parse __PROTO((FILE * a)); EXTERN struct LIST *lookup __PROTO((char *)); EXTERN struct LIST *lkup_by_number __PROTO((int line)); EXTERN void list_free __PROTO((void)); EXTERN void refs __PROTO((int l, FILE * f, char *start, char *end, char *format)); #ifdef PROTOTYPES void *xmalloc __PROTO((size_t size)); #else #endif #endif /* DOCS_XREF_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/term-ja.diff���������������������������������������������������������������������0000644�0004711�0000144�00001065501�12021675173�013266� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������diff -rc docs/doc2rtf.c.ORG docs/doc2rtf.c *** docs/doc2rtf.c.ORG 2008-01-08 13:03:42.000000000 +0900 --- docs/doc2rtf.c 2008-01-08 13:04:30.000000000 +0900 *************** *** 108,114 **** --- 108,118 ---- fprintf(b, "{\\rtf1\\ansi "); /* vers 1 rtf, ansi char set */ fprintf(b, "\\deff0"); /* default font font 0 */ /* font table: font 0 proportional, font 1 fixed */ + #ifdef JAPANESE_DOC + fprintf(b,"{\\fonttbl{\\f0\\fnil\\fcharset128 \\\'82\\\'6c\\\'82\\\'72\\\'82\\\'6f\\\'83\\\'53\\\'83\\\'56\\\'83\\\'62\\\'83\\\'4e;}{\\f1\\fnil\\fcharset128 \\\'82\\\'6c\\\'82\\\'72\\\'82\\\'6f\\\'83\\\'53\\\'83\\\'56\\\'83\\\'62\\\'83\\\'4e;}{\\f2\\fnil\\fprq2\\fcharset128 System;}{\\f3\\fnil\\fcharset128 \\\'82\\\'6c\\\'82\\\'72\\\'82\\\'6f\\\'83\\\'53\\\'83\\\'56\\\'83\\\'62\\\'83\\\'4e;}}\n"); + #else fprintf(b, "{\\fonttbl{\\f0\\fswiss Arial;}{\\f1\\fmodern Courier New;}}\n"); + #endif /* process each line of the file */ while (get_line(line, sizeof(line), a)) { *************** *** 117,126 **** /* close final page and generate trailer */ fprintf(b, "}{\\plain \\page}\n"); ! /* fprintf(b,"}\n"); */ /* HBB: HACK ALERT: only without this, hc31 works */ list_free(); } void process_line(char *line, FILE *b) { --- 121,142 ---- /* close final page and generate trailer */ fprintf(b, "}{\\plain \\page}\n"); ! #ifndef JAPANESE_DOC ! fprintf(b,"}\n"); /* HBB: HACK ALERT: only without this, hc31 works */ ! #endif list_free(); } + #ifdef JAPANESE_DOC + char filtrated_char(char *str, int nbyte) + { + char c; + c=*(str+nbyte); + if(c&0x80) return (char)0xff; + else return c; + } + #endif + void process_line(char *line, FILE *b) { *************** *** 145,151 **** --- 161,171 ---- i = 0; j = 0; while (line[i] != NUL) { + #ifdef JAPANESE_DOC + switch (filtrated_char(line,i)) { + #else switch (line[i]) { + #endif case '\\': case '{': case '}': *************** *** 157,168 **** --- 177,196 ---- case '\n': break; case '`': /* backquotes mean boldface or link */ + #ifdef JAPANESE_DOC + if (filtrated_char(line,i) == ' ') /* tabular line */ + #else if (line[1] == ' ') /* tabular line */ + #endif line2[j] = line[i]; else if ((!inref) && (!inquote)) { k = i + 1; /* index into current string */ l = 0; /* index into topic string */ + #ifdef JAPANESE_DOC + while ((filtrated_char(line,k) != '`') && (line[k] != NUL)) + #else while ((line[k] != '`') && (line[k] != NUL)) + #endif topic[l++] = line[k++]; topic[l] = NUL; klist = lookup(topic); *************** *** 220,228 **** --- 248,264 ---- i = 1; + #ifdef JAPANESE_DOC + switch (filtrated_char(line, 0)) { /* control character */ + #else switch (line[0]) { /* control character */ + #endif case '?':{ /* interactive help entry */ + #ifdef JAPANESE_DOC + if ((line2[1] != NUL) && (filtrated_char(line2, 1) != ' ')) + #else if ((line2[1] != NUL) && (line2[1] != ' ')) + #endif footnote('K', &(line2[1]), b); break; } *************** *** 247,259 **** --- 283,303 ---- tabl = 0; break; case ' ':{ /* normal text line */ + #ifdef JAPANESE_DOC + if ((line2[1] == NUL) || (filtrated_char(line2, 1) == '\n')) { + #else if ((line2[1] == NUL) || (line2[1] == '\n')) { + #endif fprintf(b, "\\par\n"); llpara = para; para = 0; tabl = 0; } + #ifdef JAPANESE_DOC + if (filtrated_char(line2, 1) == ' ') { + #else if (line2[1] == ' ') { + #endif if (!tabl) { fprintf(b, "\\par\n"); } *************** *** 277,283 **** --- 321,331 ---- break; } default:{ + #ifdef JAPANESE_DOC + if (isdigit((int)filtrated_char(line, 0))) { /* start of section */ + #else if (isdigit((int)line[0])) { /* start of section */ + #endif if (startpage) { /* use new level 0 item */ refs(0, b, "\\par", NULL, "\\par{\\uldb %s}{\\v loc%d}\n"); fprintf(b, "}{\\plain \\page}\n"); diff -rc docs/sjisenc.c.ORG docs/sjisenc.c *** docs/sjisenc.c.ORG 2008-01-11 11:23:00.000000000 +0900 --- docs/sjisenc.c 2008-01-11 11:22:27.000000000 +0900 *************** *** 0 **** --- 1,23 ---- + /* doc2rtf ܸѴѥġ + * sjisenc.c + * shige + * 06/02 2003 + * ñ Shift_JIS code \'aa ͤ encode + */ + #include <stdio.h> + #include <stdlib.h> + + int main(void) + { + int c; + + while((c=getchar())!=EOF && c!=0){ + if(c>=0x80){ + printf("\\'%02x",c); + printf("\\'%02x",getchar()); + } + else putchar(c); + } + if(c==0) putchar(0); + return 0; + } diff -rc docs/tex2ja.awk.ORG docs/tex2ja.awk *** docs/tex2ja.awk.ORG 2008-06-24 19:08:10.000000000 +0900 --- docs/tex2ja.awk 2008-06-24 19:12:09.000000000 +0900 *************** *** 0 **** --- 1,54 ---- + # + # $Id: term-ja.diff,v 1.32.2.2 2012/09/05 05:53:26 sfeam Exp $ + # doc2tex νϤθץ + # tex2ja.awk + # 06/20 2008 + # shige@iee.niit.ac.jp + # + # ְʲ()?: {\bf ...פʬ \pageref{},\index{} 롣 + # + (NF>0 && !/^[\\ ]/ && //){ + s=$0; + while(match(s,//)){ # + if(RSTART>1) printf "%s",substr(s,1,RSTART-1); + s=substr(s,RSTART); + while(match(s,/(|\))/)==0){ # äޤǤĤʤl + getline; + if(NF==0 || /^[\\ ]/){ # ä + print s; + print $0; + next; + } + s = s $0; + } + srest=substr(s,RSTART+RLENGTH); + s=substr(s,1,RSTART+RLENGTH-1); + if(s ~ /ʲ()?:/) process(s); # ֻȡפޤޤ + else printf "%s",s; + s=srest; + } + if(length(s)>0) print s; # Ĥʬ + else print ""; # 줬ʤȹβԤʤʤ롣 + next; + } + {print} + + # ְʲ()?: {\bf ... }פιԤνؿ + function process(s0, s,srest) + { + s=s0; + while(match(s,/{\\bf [^\}]+}/)){ + if(RSTART>1) printf "%s",substr(s,1,RSTART-1); + srest=substr(s,RSTART+RLENGTH); + s=substr(s,RSTART+5,RLENGTH-6); + printf "{\\bf %s",s; + gsub(/\\/,"",s); + printf " (p.~\\pageref{%s})",s; + if(match(s,/ [^ ]+$/)) s=substr(s,RSTART+1); + gsub(/_/," ",s); + printf "\\index{%s}}",s; + s=srest; + } + printf "%s",s; + } + diff -rc term/aed.trm.ORG term/aed.trm *** term/aed.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/aed.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 203,208 **** --- 203,209 ---- #ifdef TERM_HELP START_HELP(aed767) + #ifndef JAPANESE_DOC "1 aed767", "?commands set terminal aed767", "?set terminal aed767", *************** *** 220,224 **** --- 221,244 ---- " The two drivers differ only in their horizontal ranges, which are 512 and", " 768 pixels, respectively. Their vertical range is 575 pixels. There are", " no options for these drivers." + #else /* JAPANESE_DOC */ + "1 aed767", + "?commands set terminal aed767", + "?set terminal aed767", + "?set term aed767", + "?terminal aed767", + "?term aed767", + "?aed767", + "?commands set terminal aed512", + "?set terminal aed512", + "?set term aed512", + "?terminal aed512", + "?term aed512", + "?aed512", + " ϥɥ饤 `aed512` `aed767` AED եåü򥵥ݡȤ", + " ޤ 2 ĤΥɥ饤ФϡʿϰϤΤߤäƤơ줾", + " 512 ԥ 767 ԥǤľϤ 575 ԥǤ", + " Υɥ饤ФˤϥץϤޤ" + #endif /* JAPANESE_DOC */ END_HELP(aed767) #endif diff -rc term/ai.trm.ORG term/ai.trm *** term/ai.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/ai.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 528,533 **** --- 528,534 ---- #ifdef TERM_HELP START_HELP(aifm) + #ifndef JAPANESE_DOC "1 aifm", "?commands set terminal aifm", "?set terminal aifm", *************** *** 543,547 **** --- 544,565 ---- " Syntax:", " set terminal aifm {color|monochrome} {\"<fontname>\"} {<fontsize>}", "" + #else /* JAPANESE_DOC */ + "1 aifm", + "?commands set terminal aifm", + "?set terminal aifm", + "?set term aifm", + "?terminal aifm", + "?term aifm", + "?aifm", + "", + " `: ٤νϷ` Adobe Illustrator 3.0+ ѡAdobe", + " Illustrator ϥ٥ 1 PostScriptեľǧΤǡ", + " `set terminal post level1` Ȥ٤Ǥ礦", + "", + " :", + " set terminal aifm {color|monochrome} {\"<fontname>\"} {<fontsize>}", + "" + #endif /* JAPANESE_DOC */ END_HELP(ai) #endif /* TERM_HELP */ diff -rc term/aquaterm.trm.ORG term/aquaterm.trm *** term/aquaterm.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/aquaterm.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 903,908 **** --- 903,909 ---- #ifdef TERM_HELP START_HELP(aqua) + #ifndef JAPANESE_DOC "1 aqua", "?commands set terminal aqua", "?set terminal aqua", *************** *** 933,938 **** --- 934,972 ---- " Lines can be drawn either solid or dashed, (default is solid) and the dash", " spacing can be modified by <dashlength> which is a multiplier > 0.", "" + #else /* JAPANESE_DOC */ + "1 aqua", + "?commands set terminal aqua", + "?set terminal aqua", + "?set term aqua", + "?terminal aqua", + "?term aqua", + "?aqua", + "?Aqua", + " νϷ Mac OS X ɽ˴ؤ AquaTerm.app ˰¸Ƥޤ", + "", + " :", + " set terminal aqua {<n>} {title \"<wintitle>\"} {size <x> <y>}", + " {font \"<fontname>{,<fontsize>}\"}", + " {{no}enhanced} {solid|dashed} {dl <dashlength>}}", + "", + " <n> 褹륦ɥֹ (ǥեȤǤ 0)", + " <wintitle> ϥȥСɽ̾ (ǥեȤ \"Figure <n>\"),", + " <x> <y> 襵 (ǥեȤ 846x594 pt = 11.75x8.25 ) Ǥ", + "", + " ѤեȤ <fontname> ǻꤷ (ǥեȤ \"Times-Roman\")", + " եȥ <fontsize> ǻꤷޤ (ǥեȤ 14.0 pt)", + "", + " aqua Ϸϡĥʸ⡼ (enhanced text mode; ʲ:", + " `enhanced`) 򡢽Ťͽ񤭰ʳϥݡȤƤޤեȤλѤϥ", + " ͭʥեȤ¤Ƥޤʸ󥳡ǥ󥰤ϡ", + " `set encoding` Ǥޤߤ iso_latin_1, iso_latin_2,", + " cp1250 UTF8 (default) 򥵥ݡȤƤޤ", + "", + " ϡ (ǥեȤϼ) Τ줫Ǥδֳ֤", + " Ψ <dashlength> (>0) ѹǤޤ", + "" + #endif /* JAPANESE_DOC */ END_HELP(aqua) #endif /* TERM_HELP */ diff -rc term/be.trm.ORG term/be.trm *** term/be.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/be.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 390,395 **** --- 390,396 ---- #ifdef TERM_HELP START_HELP(be) + #ifndef JAPANESE_DOC "1 be", "?commands set terminal be", "?set terminal be", *************** *** 689,693 **** --- 690,990 ---- "%@gnuplot*line7Dashes: 42", "%@gnuplot*line8Dashes: 13", "@end table" + #else /* JAPANESE_DOC */ + "1 be", + "?commands set terminal be", + "?set terminal be", + "?set term be", + "?terminal be", + "?term be", + "?be", + "?BE", + " Ϸ `be` ϡX ФѤ`beos` ڥ졼ƥ󥰥ƥ", + " gnuplot 򥳥ѥ뤹ͤΤΤΤǤĶѿ `DISPLAY` ", + " åȤƤ뤫Ķѿ `TERM` `xterm` ˥åȤƤ뤫", + " ϥޥɥ饤󥪥ץȤ `-display` ȤƤСץ", + " εưˤνϷ򤵤ޤ", + "", + " :", + " set terminal be {reset} {<n>}", + "", + " ʣΥ襦ɥ򥵥ݡȤƤޤ`set terminal be <n>`", + " ֹ n Υɥ˽Ϥޤn>0 ξ硢ֹϥɥ", + " ȥȥ̾ `gplt <n>` ȤդޤߤΥɥ", + " 뵭ѲǶ̤Ǥޤ (ǥեȥ뤫齽)", + "", + " `gnuplot` ɥ饤Ф̤ʽϥɥ饤ФѹƤ⡢襦ɥϳ", + " ޤޤˤʤޤ襦ɥϡΥɥ˥֤", + " ʸ q 򲡤ɥޥ͡Υ˥塼 `close` 򤹤", + " Ĥ뤳ȤǤޤ`reset` ¹ԤƤΥɥ٤Ĥ", + " ޤϼºݤ˥ɥƤҥץλޤ (", + " `-persist` ꤵƤʤ)", + "", + " 襦ɥ `-persisit` ץͿƤʤСä", + " λ˼ưŪĤޤ", + "", + " 襵ȥڥϡ`gnuplot` Υɥꥵ뤳Ȥ", + " ѹǤޤ", + "", + " Υ `gnuplot` `set linestyle` ѹǽǤ", + "", + " ϥɥ饤 `be` ˴ؤƤϡ`gnuplot` (ư)ޥɥ饤", + " ޤե뤫顢geometry font, name ʤɤ̾ X Toolkit", + " ץ꥽λդޤΥץˤĤƤ", + " X(1) ޥ˥奢ڡ (䤽ƱΤ) 򻲾ȤƤ", + "", + " ¾ˤ `be` ϷѤ¿ `gnuplot` Υץ󤬤ޤ", + " `gnuplot` Ƥ֤Ȥ˥ޥɥ饤󥪥ץȤƻꤹ뤫", + " ޤե \".Xdefaults\" Υ꥽ȤƻǤޤ", + " ưꤵΤǡ`gnuplot` ¹ԻˤѹǤޤ", + "2 ޥɥ饤󥪥ץ (command-line_options)", + "?commands set terminal be command-line-options", + "?set terminal be command-line-options", + "?set term be command-line-options", + "?be command-line-options", + " X Toolkit ץ˲äʲΥץ gnuplot Ω夲", + " ޥɥ饤ǡޤϥ桼Υե \".Xdefaults\" Υ꥽Ȥ", + " ƻǤޤ:", + "@start table - ޤ÷ƥȷ", + " `-mono` 顼ǥץ쥤ǶŪ", + " `-gray` 쥤ޤϥ顼ǥץ쥤ǤΥ쥤", + " (ǥեȤǤϥ쥤ǥץ쥤դ)", + " `-clear` ɽ (ִŪ) ̤õ", + " `-raise` 襦ɥ̤ؽФ", + " `-noraise` 襦ɥ̤ؽФȤϤʤ", + " `-persist` gnuplot ץཪλ襦ɥĤ", + "#\\begin{tabular}{|cl|} \\hline", + "#`-mono` & 顼ǥץ쥤ǶŪ\\\\", + "#`-gray` & 쥤ޤϥ顼ǥץ쥤ǤΥ쥤\\\\", + "# & (ǥեȤǤϥ쥤ǥץ쥤դ)\\\\", + "#`-clear` & ɽ (ִŪ) ̤õ\\\\", + "#`-raise` & 襦ɥ̤ؽФ\\\\", + "#`-noraise` & 襦ɥ̤ؽФȤϤʤ\\\\", + "#`-persist` & gnuplot ץཪλ襦ɥĤ\\\\", + "%c l .", + "%`-mono`@顼ǥץ쥤ǶŪ", + "%`-gray`@쥤ޤϥ顼ǥץ쥤ǤΥ쥤", + "% @(ǥեȤǤϥ쥤ǥץ쥤դ)", + "%`-clear`@ɽ (ִŪ) ̤õ", + "%`-raise`@襦ɥ̤ؽФ", + "%`-noraise`@襦ɥ̤ؽФȤϤʤ", + "%`-persist`@gnuplot ץཪλ襦ɥĤ", + "@end table", + " 嵭Υץ󡢤ϥޥɥ饤Ǥλ񼰤ǡ\".Xdefaults\" ˥", + " ȤƻꤹȤϰۤʤ񼰤Ȥޤ", + "", + " :", + " gnuplot*gray: on", + "", + " `gnuplot` 襹 `points` 褹Υˤ⡢ޥ", + " 饤󥪥ץ (`-pointsize <v>`) ȥ꥽ (`gnuplot*pointsize: <v>`)", + " 󶡤Ƥޤ `v` ΥγΨȤƻȤ¿", + " (0 < v <= 10) ǡ㤨 `-pointsize 2` ϥǥեȤΥ 2 ܡ", + " `-pointsize 0.5` ̤ΥȾʬȤޤ", + "2 ץ (monochrome_options)", + "?commands set terminal be monochrome_options", + "?set terminal be monochrome_options", + "?set term be monochrome_options", + "?be monochrome_options", + " ǥץ쥤ФƤ `gnuplot` 迧 (foreground) طʿ", + " (background) Ϳޤ󡣥ǥեȤǤطʤϹǤ`-rv`", + " `gnuplot*reverseVideo: on` ξˤطʤˤʤޤ", + "", + "2 顼꥽ (color_resources)", + "?commands set terminal be color_resources", + "?set terminal be color_resources", + "?set term be color_resources", + "?be color_resources", + " 顼ǥץ쥤ФƤϡ`gnuplot` ϰʲΥ꥽ (ǤϤ", + " ǥեȤͤ򼨤ޤ)ޤĴ (greyscale) Υ꥽򻲾", + " ޤ꥽ͤϥƥ BE rgb.txt ե˽񤫤Ƥ뿧", + " ̾ޤ 16 ʤο (BE Υޥ˥奢򻲾) ̾ȶ (0 ", + " 1 δ֤) 򥳥ޤǶڤäͤѤǤޤ㤨 `blue, 0.5`", + " Ⱦʬζ٤ġ̣ޤ", + "@start table - ޤ÷ƥȷ", + " gnuplot*background: white", + " gnuplot*textColor: black", + " gnuplot*borderColor: black", + " gnuplot*axisColor: black", + " gnuplot*line1Color: red", + " gnuplot*line2Color: green", + " gnuplot*line3Color: blue", + " gnuplot*line4Color: magenta", + " gnuplot*line5Color: cyan", + " gnuplot*line6Color: sienna", + " gnuplot*line7Color: orange", + " gnuplot*line8Color: coral", + "#\\begin{tabular}{|cl|} \\hline", + "#&gnuplot*background: white\\\\", + "#&gnuplot*textColor: black\\\\", + "#&gnuplot*borderColor: black\\\\", + "#&gnuplot*axisColor: black\\\\", + "#&gnuplot*line1Color: red\\\\", + "#&gnuplot*line2Color: green\\\\", + "#&gnuplot*line3Color: blue\\\\", + "#&gnuplot*line4Color: magenta\\\\", + "#&gnuplot*line5Color: cyan\\\\", + "#&gnuplot*line6Color: sienna\\\\", + "#&gnuplot*line7Color: orange\\\\", + "#&gnuplot*line8Color: coral\\\\", + "%c l .", + "%@gnuplot*background: white", + "%@gnuplot*textColor: black", + "%@gnuplot*borderColor: black", + "%@gnuplot*axisColor: black", + "%@gnuplot*line1Color: red", + "%@gnuplot*line2Color: green", + "%@gnuplot*line3Color: blue", + "%@gnuplot*line4Color: magenta", + "%@gnuplot*line5Color: cyan", + "%@gnuplot*line6Color: sienna", + "%@gnuplot*line7Color: orange", + "%@gnuplot*line8Color: coral", + "@end table", + "", + " ˴ؤ륳ޥɥ饤ν񼰤ϡ㤨аʲ̤Ǥ", + "", + " :", + " gnuplot -background coral", + "", + "2 Ĵ꥽ (grayscale_resources)", + "?commands set terminal be grayscale_resources", + "?set terminal be grayscale_resources", + "?set term be grayscale_resources", + "?be grayscale_resources", + " `-gray` 򤹤ȡ`gnuplot` ϡ쥤ޤϥ顼ǥ", + " 쥤ФơʲΥ꥽򻲾Ȥޤ (ǤϤΥǥեȤͤ", + " ޤ)ǥեȤطʿϹǤ뤳ȤդƤ", + "@start table - ޤ÷ƥȷ", + " gnuplot*background: black", + " gnuplot*textGray: white", + " gnuplot*borderGray: gray50", + " gnuplot*axisGray: gray50", + " gnuplot*line1Gray: gray100", + " gnuplot*line2Gray: gray60", + " gnuplot*line3Gray: gray80", + " gnuplot*line4Gray: gray40", + " gnuplot*line5Gray: gray90", + " gnuplot*line6Gray: gray50", + " gnuplot*line7Gray: gray70", + " gnuplot*line8Gray: gray30", + "#\\begin{tabular}{|cl|} \\hline", + "#&gnuplot*background: black\\\\", + "#&gnuplot*textGray: white\\\\", + "#&gnuplot*borderGray: gray50\\\\", + "#&gnuplot*axisGray: gray50\\\\", + "#&gnuplot*line1Gray: gray100\\\\", + "#&gnuplot*line2Gray: gray60\\\\", + "#&gnuplot*line3Gray: gray80\\\\", + "#&gnuplot*line4Gray: gray40\\\\", + "#&gnuplot*line5Gray: gray90\\\\", + "#&gnuplot*line6Gray: gray50\\\\", + "#&gnuplot*line7Gray: gray70\\\\", + "#&gnuplot*line8Gray: gray30\\\\", + "%c l .", + "%@gnuplot*background: black", + "%@gnuplot*textGray: white", + "%@gnuplot*borderGray: gray50", + "%@gnuplot*axisGray: gray50", + "%@gnuplot*line1Gray: gray100", + "%@gnuplot*line2Gray: gray60", + "%@gnuplot*line3Gray: gray80", + "%@gnuplot*line4Gray: gray40", + "%@gnuplot*line5Gray: gray90", + "%@gnuplot*line6Gray: gray50", + "%@gnuplot*line7Gray: gray70", + "%@gnuplot*line8Gray: gray30", + "@end table", + "", + "2 ꥽ (line_resources)", + "?commands set terminal be line_resources", + "?set terminal be line_resources", + "?set term be line_resources", + "?be line_resources", + " `gnuplot` (ԥñ) Τ˰ʲΥ꥽", + " Ȥޤ (ǤϤΥǥեȤͤ򼨤ޤ)0 ޤ 1 ϺǾ", + " 1 ԥ̣ޤ2 ޤ 3 ͤˤäƥդγѤ", + " Ǥ⤢Ǥ礦", + "@start table - ޤ÷ƥȷ", + " gnuplot*borderWidth: 2", + " gnuplot*axisWidth: 0", + " gnuplot*line1Width: 0", + " gnuplot*line2Width: 0", + " gnuplot*line3Width: 0", + " gnuplot*line4Width: 0", + " gnuplot*line5Width: 0", + " gnuplot*line6Width: 0", + " gnuplot*line7Width: 0", + " gnuplot*line8Width: 0", + "#\\begin{tabular}{|cl|} \\hline", + "#&gnuplot*borderWidth: 2\\\\", + "#&gnuplot*axisWidth: 0\\\\", + "#&gnuplot*line1Width: 0\\\\", + "#&gnuplot*line2Width: 0\\\\", + "#&gnuplot*line3Width: 0\\\\", + "#&gnuplot*line4Width: 0\\\\", + "#&gnuplot*line5Width: 0\\\\", + "#&gnuplot*line6Width: 0\\\\", + "#&gnuplot*line7Width: 0\\\\", + "#&gnuplot*line8Width: 0\\\\", + "%c l .", + "%@gnuplot*borderWidth: 2", + "%@gnuplot*axisWidth: 0", + "%@gnuplot*line1Width: 0", + "%@gnuplot*line2Width: 0", + "%@gnuplot*line3Width: 0", + "%@gnuplot*line4Width: 0", + "%@gnuplot*line5Width: 0", + "%@gnuplot*line6Width: 0", + "%@gnuplot*line7Width: 0", + "%@gnuplot*line8Width: 0", + "@end table", + "", + " `gnuplot` ǻѤηѤ˰ʲΥ꥽򻲾Ȥ", + " ޤ0 ϼ̣ޤ2 10 ʿ `jk` (`j` `k` 1 ", + " 9 ޤǤ) ϡ`j` ĤΥԥ `k` ĤζΥԥ뤬³", + " ѥη֤ʤ̣ޤ㤨 '16' 1 ĤΥԥ", + " θ 6 Ĥζ³ѥˤʤޤˡ4 10", + " ʿǤܺ٤ʥԥȶΥѥǤޤ㤨С", + " '4441' 4 ĤΥԥ롢4 Ĥζ4 ĤΥԥ롢1 ĤζΥѥ", + " ̣ޤʲΥǥեȤΥ꥽ͤϡǥץ쥤", + " 뤤ϥ顼Ĵ (grayscale) ǥץ쥤ˤ", + " Ǥ顼ǥץ쥤ǤϤΥǥեȤͤϤۤȤ 0 ()", + " ǡ`axisDashes` ΤߤǥեȤ '16' ȤʤäƤޤ", + "@start table - ޤ÷ƥȷ", + " gnuplot*borderDashes: 0", + " gnuplot*axisDashes: 16", + " gnuplot*line1Dashes: 0", + " gnuplot*line2Dashes: 42", + " gnuplot*line3Dashes: 13", + " gnuplot*line4Dashes: 44", + " gnuplot*line5Dashes: 15", + " gnuplot*line6Dashes: 4441", + " gnuplot*line7Dashes: 42", + " gnuplot*line8Dashes: 13", + "#\\begin{tabular}{|cl|} \\hline", + "#&gnuplot*borderDashes: 0\\\\", + "#&gnuplot*axisDashes: 16\\\\", + "#&gnuplot*line1Dashes: 0\\\\", + "#&gnuplot*line2Dashes: 42\\\\", + "#&gnuplot*line3Dashes: 13\\\\", + "#&gnuplot*line4Dashes: 44\\\\", + "#&gnuplot*line5Dashes: 15\\\\", + "#&gnuplot*line6Dashes: 4441\\\\", + "#&gnuplot*line7Dashes: 42\\\\", + "#&gnuplot*line8Dashes: 13\\\\", + "%c l .", + "%@gnuplot*borderDashes: 0", + "%@gnuplot*axisDashes: 16", + "%@gnuplot*line1Dashes: 0", + "%@gnuplot*line2Dashes: 42", + "%@gnuplot*line3Dashes: 13", + "%@gnuplot*line4Dashes: 44", + "%@gnuplot*line5Dashes: 15", + "%@gnuplot*line6Dashes: 4441", + "%@gnuplot*line7Dashes: 42", + "%@gnuplot*line8Dashes: 13", + "@end table" + #endif /* JAPANESE_DOC */ END_HELP(be) #endif /* TERM_HELP */ diff -rc term/cairo.trm.ORG term/cairo.trm *** term/cairo.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/cairo.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 1334,1339 **** --- 1334,1340 ---- #ifdef TERM_HELP START_HELP(epscairo) + #ifndef JAPANESE_DOC "1 epscairo", "?set terminal epscairo", "?terminal epscairo", *************** *** 1345,1355 **** --- 1346,1371 ---- "", " Please read the help for the `pdfcairo` terminal." "" + #else /* JAPANESE_DOC */ + "1 epscairo", + "?set terminal epscairo", + "?terminal epscairo", + "?set term epscairo", + "?term epscairo", + "?epscairo", + " Ϸ `epscairo` ϡcairo, pango 饤֥Ѥ EPS ", + " (Encapsulated PostScript) ޤcairo version 1.6 ʹߤɬ", + " פǤ", + "", + " ܺ٤ϡ`pdfcairo` ϷΥإפ򻲾ȤƤ" + "" + #endif /* JAPANESE_DOC */ END_HELP(epscairo) #endif /* TERM_HELP */ #ifdef TERM_HELP START_HELP(cairolatex) + #ifndef JAPANESE_DOC "1 cairolatex", "?set terminal cairolatex", "?terminal cairolatex", *************** *** 1507,1517 **** --- 1523,1695 ---- " by the `header` command. Thus, you can use `header` to overwrite some of", " settings performed using \"gnuplot.cfg\"", "" + #else /* JAPANESE_DOC */ + "1 cairolatex", + "?set terminal cairolatex", + "?terminal cairolatex", + "?set term cairolatex", + "?term cairolatex", + "?cairolatex", + " Ϸ `cairolatex` ϡcairo pango 饤֥ȤäơEPS", + " (Encapsulated PostScript) PDF ϤޤʸϤˤϡ", + " Ϸ `epslatex` Ʊ LaTeX Ѥޤ", + "", + " :", + " set terminal cairolatex", + " {eps | pdf}", + " {standalone | input}", + " {blacktext | colortext | colourtext}", + " {header <header> | noheader}", + " {mono|color} {solid|dashed}", + " {{no}transparent} {{no}crop} {background <rgbcolor>}", + " {font <font>} {fontscale <scale>}", + " {linewidth <lw>} {rounded|butt} {dashlength <dl>}", + " {size <XX>{unit},<YY>{unit}}", + "", + " cairolatex Ϸϡepscairo Ϸ (`termnal epscairo`) ", + " pdfcairo Ϸ (`terminal pdfcairo`) ƱΥդϤޤ", + " ƥʸϥդΤǤϤʤLaTeX Ϥޤʲ", + " ʤץˤĤƤϡʲ: `pdfcairo`", + "", + " `eps` `pdf` ϡսϤη򤷤ޤlatex/dvips Ѥˤ", + " `eps` pdflatex Ѥˤ `pdf` ѤƤ", + "", + " `blacktext` ϡ顼⡼ɤǤ⤹٤Ƥʸǽ񤯤褦ˤޤ", + "", + " `cairolatex` ϥɥ饤Фϡʸΰ֤̤ˡ󶡤ޤ:", + " (a) '{' ǻϤޤ뤹٤Ƥʸϡ'}' ⤽ʸκǸɬפǤ", + " ʸΤ LaTeX DzˤĤˤ⥻󥿥󥰤ޤ", + " (b) '[' ǻϤޤʸϡμ˰ֻʸ (t,b,l,r,c Τ 2 Ĥ", + " )']{'оʸ󡢤³Ǹ '}' Ĥޤʸϡ", + " LaTeX LR-box ȤƽǤΤʤʤǤ⹽ޤ󡣰ֹ碌", + " ˹Ԥˤϡ\\rule{}{} ͭѤǤ礦ʲ⻲: `pslatex`", + " ʣԤϤ٥硢\\shortstack ѤƤ:", + " set ylabel '[r]{\\shortstack{first line \\\\ second line}}'", + "", + " ޥ `set label` Υץ `back` ϡ¾νϷȤϤۤʤ", + " ˡǽޤ`back` Ѥ٥ϡ¾Τ٤ƤǤθ", + " ˰`front` Ѥ٥ϡ¾Τ٤Ƥξ˰ޤ", + "", + " Υɥ饤Ф 2 ĤΰۤʤեޤĤϿޤ eps ޤ", + " pdf ʬǡ⤦Ĥ LaTeX ʬǤ LaTeX ե̾ϡ", + " ޥ `set output` ΤΤѤeps/pdf ե̾ϡγ", + " ĥ (̾ '.tex') '.eps' '.pdf' ֤ΤѤޤ", + " ϥեꤷʤäϡLaTeX ϤϤޤ`multiplot`", + " ⡼ɰʳǤϡ plot Ԥ˽ϥեĤΤ˺ʤ", + " ", + "", + " β򤢤ʤ LaTeX ʸ˼ˤϡ'\\input{filename}' ", + " Ƥ'.eps' '.pdf' եϡ\\includegraphics{...} ", + " ɤǼΤǡLaTeX ʸΥץꥢ֥ \\usepackage{graphicx}", + " ɬפޤդʸ (ץ `colourtext`) ", + " ϡץꥢ֥ \\usepackage{color} ɬפޤ", + "", + " ե˴ؤưϡإå⡼ɤ˰¸ޤξ", + " ⡢Ϳ줿եȥŬڤ礭׻Τ˻Ȥޤ", + " `standalone` ⡼ɤȤäƤʤϡɤߤȤǼºݤ", + " LaTeX ѤƤեȤȥեȥȤΤǡեȤ", + " ѹˤ LaTeX ΥޥɤѤƤLaTeX ʸ 12pt", + " ΥեȥȤäƤСץȤ '\", 12\"' ꤷ", + " ե̵̾뤵ޤ'standalone' ξϡͿ줿", + " ȤȥեȥѤޤܺ٤ϰʲ򻲾ȤƤ", + "", + " ʸդư뤫ɤϡTeX Υ֡ѿ \\ifGPcolor ", + " \\ifGPblacktext Ǥޤ\\ifGPcolor true \\ifGPblacktext", + " false ΤȤΤʸ󤬿դޤѹϡ줿", + " TeX եǹԤޤŪˤʤ TeX եΥץꥢ", + " ǡ㤨аʲΤ褦ˤǤޤ:", + " \\newif\\ifGPblacktext", + " \\GPblacktexttrue", + " ɽŪϡŪͤʤˤΤ߸Ϥޤ", + "", + " Ϸ cairolatex Ȥϡޥ `set output` TeX ե", + " ꤹݤ˥եγĥ (̾ \",tex\") ĤƤ", + " դΥե̾ϡγĥҤ֤뤳ȤǺޤ", + "", + " `standalone` ⡼ɤȤ硢LaTeX ե˴ LaTeX Υإå", + " ɲä졢եեΥե̾ˤ \"-inc\" ɲäޤ", + " `standalone` ⡼ɤϡdvips, pdfTeX, VTeX Ȥν", + " Ϥ TeX եޤǥեȤǤ `input` ǡ", + " LaTeX ʸ񤫤 \\input ޥɤǼޤɬפե", + " ޤ", + "", + " \"\" \"default\" ʳΥեȤͿ硢 LaTeX Υե", + " ̾ǤȤߤʤޤ ',' ڤǺ 3 Ĥʬʤ롢", + " 'fontname,fontseries,fontshape' ηǤǥեȤ fontshape ", + " fontseries ȤϡϾάǤޤäơե̾", + " ºݤν񼰤ϡ'{fontname}{,fontseries}{,fontshape}' Ȥʤޤ(:", + " gnuplot ˸ '{<fontname>}{,{<fontseries>}{,<fontshape>}}')", + " ̾γʬλˡϡLaTeX ΥեȷϤδ˽ɬפޤ", + " ե̾ (fontname) 3 4 ʸĹǡʲΤ褦ˤʤäƤ", + " : ǽʸϥեȤζԡ 2 Ĥʸϥե̾ѡץ", + " Ȥ̤ʥեѤ 1 ʸɲäǤޤ㤨С'j' ϸŤ", + " οѤΥեȡ'x' ϥѡȥեѤǤ¿Υե", + " ̾ʲ˵ҤƤޤ:", + "^ <a href=\"http://www.tug.org/fontname/fontname.pdf\">", + " http://www.tug.org/fontname/fontname.pdf", + "^ </a>", + " 㤨С'cmr' Computer Modern Roman 'ptm' Times-Roman, 'phv'", + " Helvetica ̣Ƥޤfont series ϡդɽ¿", + " ξϡ'm' ɸ (\"medium\")'bx' 'b' (bold) Υե", + " ̣ޤfont shape ϡŪˤ 'n' Ω (upright)'it' ", + " å (italic)'sl' (slanted)'sc' ⡼륭ԥ", + " (small caps) ̣ޤۤʤ series shapes 󶡤եȤ", + " ޤ", + "", + " :", + "", + " Times-Roman Υܡ (ʸƱ) Ȥˤ:", + " set terminal cairolatex font 'ptm,bx'", + " Helvetica, ܡΡåȤˤ:", + " set terminal cairolatex font 'phv,bx,it'", + " ƱǼΤηΥեȤȤˤ:", + " set terminal cairolatex font ',,sl'", + " ⡼륭ԥȤˤ", + " set terminal cairolatex font ',,sc'", + "", + " ˡǤϡƥȥեȤѹޤեȤѹ", + " ϡե \"gnuplot.cfg\" ޤϰʲ륪ץ", + " `header` Ȥɬפޤ", + "", + " `standalone` ⡼ɤǤϡեȥϥޥ `set terminal` ǻ", + " եȥޤꤷեȥȤˤϥե", + " \"size<size>.clo\" LaTeX θѥˤɬפޤǥե", + " ȤǤ 10pt, 11pt, 12pt 򥵥ݡȤƤޤѥå \"extsizes\"", + " 󥹥ȡ뤵ƤС8pt, 9pt, 14pt, 17pt, 20pt ɲäޤ", + "", + " ץ `header` ϰĤʸȤƼꡢʸ", + " LaTeX ե˽񤭽Фޤ`standalone` ⡼ɤǤϡϥץꥢ", + " ֥ \\begin{document} ľ˽񤭤ޤ`input` ⡼ɤǤϡ", + " ϥդ˴ؤ뤹٤Ƥɽ경뤿 \\begingroup ޥɤ", + " ľ˽񤭤ޤ", + "", + " :", + "", + " T1 եȥ󥳡ǥ󥰤ȤƥȥեȤȿեȤ", + " Times-Roman ˡsans-serif եȤ Helvetica Ѥˤ:", + " set terminal cairolatex standalone header \\", + " \"\\\\usepackage[T1]{fontenc}\\n\\\\usepackage{mathptmx}\\n\\\\usepackage{helvet}\"", + " Ǥ (bold) ȤճΥƥȤϤʤ:", + " set terminal cairolatex input header \"\\\\bfseries\"", + "", + " LaTeX ե \"gnuplot.cfg\" 򸫤Ĥȡ`standalone` ⡼ɤǤ", + " ץꥢ֥˼ߤޤϡɲäΤ˻Ȥ", + " ޤ: ʸΥեȤ򡢿ե (\"mathptmx.sty\" ) ", + " 碌 Times-Roman, Helvetica, Courier ˤˤ:", + " \\usepackage{mathptmx}", + " \\usepackage[scaled=0.92]{helvet}", + " \\usepackage{courier}", + " ե \"gnuplot.cfg\" ϡޥ `header` ꤹإå", + " ɤ߹ߤޤΤǡ\"gnuplot.cfg\" ꤹΤ `header` ", + " Ȥäƾ񤭤뤳ȤǤޤ", + "" + #endif /* JAPANESE_DOC */ END_HELP(cairolatex) #endif /* TERM_HELP */ #ifdef TERM_HELP START_HELP(pdfcairo) + #ifndef JAPANESE_DOC "1 pdfcairo", "?set terminal pdfcairo", "?terminal pdfcairo", *************** *** 1594,1604 **** --- 1772,1870 ---- " so that gnuplot can draw a line from non-integer coordinates. This avoids", " wobbling effects on diagonal lines ('plot x' for example).", "" + #else /* JAPANESE_DOC */ + "1 pdfcairo", + "?set terminal pdfcairo", + "?terminal pdfcairo", + "?set term pdfcairo", + "?term pdfcairo", + "?pdfcairo", + " Ϸ `pdfcairo` ϡPDF Ϥޤºݤϡ2D ", + " å饤֥Ǥ cairo ȡʸ֤ȥѤΥ饤", + " pango ͳƹԤޤ", + "", + " :", + " set term pdfcairo", + " {{no}enhanced} {mono|color} {solid|dashed}", + " {background <rgbcolor>", + " {font <font>} {fontscale <scale>}", + " {linewidth <lw>} {rounded|butt} {dashlength <dl>}", + " {size <XX>{unit},<YY>{unit}}", + "", + " νϷϡĥʸ⡼ (enhanced text mode) 򥵥ݡȤ", + " ƤơեȤ񼰥ޥ (ադʤ) ٥¾ʸ", + " ळȤǤޤĥʸ⡼ɤν񼰤¾ gnuplot ν", + " Ϸȶ̤Ǥܺ٤ϡʲ: `enhanced`", + "", + " ˤƤϡ`linewidth` ǻꤹ <lw> ѹǤ", + " ޤǥեȤ 0.25 ݥȤǤ(1 \"PostScript\" ݥ", + " = 1/72 = 0.353 mm)", + "", + " `rounded` ϡüܹݤǥեȤ `butt` äü", + " ĥäܹѤޤ", + "", + " PDF ϤΥǥեȤΥϡ5inch x 3inch Ǥץ `size` ", + " ϡ桼λꤹΤѹޤǥեȤ X, Y ", + " ñ̤ϥǤ¾ñ̤ѲǽǤ (ߤ cm Τ)`size` ", + " ץǻꤵ줿ȤˤüüޤǤΰϡ˥꡼", + " ɸ 0.0 1.0 бޤ", + "", + " <font> ϡ\"FontFace,FontSize\" ν񼰡Ĥޤե̾ȥ", + " ޤǶڤäĤʸȤɽޤFontFace ϡ\'Arial\' ", + " 褦̾Υե̾Ǥե̾Ϳʤ硢pdfcairo Ϸ", + " Ǥ\'Sans\' ѤޤFontSize ϥݥñ̤ǤΥեȥ", + " Ǥꤷʤϡpdfcairo ϷǤ 12 ݥȥɸ", + " եȤѤޤνϷΥѥ᡼ fontscale", + " ΥǥեȤ 0.5 ʤΤǡΥեȥϡPDF Ϥե륵", + " Ǹ⾮ʤǤ礦", + " :", + " set term pdfcairo font \"Arial,12\"", + " set term pdfcairo font \"Arial\" # ե̾Τѹ", + " set term pdfcairo font \",12\" # եȥΤѹ", + " set term pdfcairo font \"\" # ե̾ȥꥻå", + "", + " եȤϡ̾ΥեȽˤޤWindows Ǥϡ", + " Ȥϥȥѥͥ \"ե\" ιܤǹ츫Ĥ", + " ΤǡUNIX ǤϡեȤ \"fontconfig\" ǽޤ", + "", + " ʸΥ쥤Ȥ˻Ѥ饤֥ Pango ϡutf-8 ˴ŤƤ", + " ޤΤǡpdfcairo ϷǤϡʸɤ utf-8 Ѵɬפ", + " ޤǥեȤʸɤϡʤѤƤ \'locale\'", + " ˴Ťޤ¾ʸɤˤϡʤɤʸɤ", + " äƤΤμ¤ gnuplot 狼褦ˤƤܺ٤ˤĤ", + " ϡʲ: `encoding`", + "", + " pango ϡunicode ޥåԥ󥰤ǤʤեȤФƤͽ̷̤Ϳ", + " 뤫⤷ޤ㤨 Symbol եȤФƤϡpdfcairo Ϸ", + " ϡʸɤ unicode Ѵ뤿 http://www.unicode.org/ ", + " ޥåԥ󥰤Ѥޤʤ\"the Symbol font\" ϡAcrobat", + " Reader Ȱ \"SY______.PFB\" ȤۤƤ Adobe Symbol ", + " ȤǤȲᤵ뤳ȤդƤˡ", + " OpenOffice.org Ȱ \"opens___.ttf\" Ȥۤ OpenSymbol", + " եȤƱʸ󶡤ƤޤMicrosoft Symbol ե", + " (\"symbol.ttf\") ۤƤޤϰۤʤʸåȤˤʤäƤ", + " ơĤϷ礱ƤޤĤϿѤäƤޤäƤ", + " ʤΥǥեȤǤʤ餫꤬ (㤨Хǥ⥹", + " ץ enhancedtext.dem ɽʤȤä) ϡ", + " Adobe OpenOffice Symbol եȤ򥤥󥹥ȡ뤷ơMicrosoft ", + " Symbol եȤʤȤʤ⤷ޤ\"windings\" Τ", + " ¾ɸΥեȤǤư뤳Ȥ𤵤Ƥޤ", + "", + " Υ󥰤ϡΤȤѹǤޤ󡣽Ϥɤ뤿", + " ˤΥ󥰤ϡꥢСץ󥰤 2 Ĥ", + " äƤޤ", + " ꥢϡʿľǤʤ餫ɽޤ", + " Сץ󥰤ϡꥢȤǥԥ⾮", + " Ǥ٤󶡤gnuplot ɸľ񤱤褦ˤʤޤ", + " ϡгľ (㤨 'plot x') ɤΤ򤱤ޤ", + "" + #endif /* JAPANESE_DOC */ END_HELP(pdfcairo) #endif /* TERM_HELP */ #ifdef TERM_HELP START_HELP(pngcairo) + #ifndef JAPANESE_DOC "1 pngcairo", "?set terminal pngcairo", "?terminal pngcairo", *************** *** 1678,1683 **** --- 1944,2033 ---- " so that gnuplot can draw a line from non-integer coordinates. This avoids", " wobbling effects on diagonal lines ('plot x' for example).", "" + #else /* JAPANESE_DOC */ + "1 pngcairo", + "?set terminal pngcairo", + "?terminal pngcairo", + "?set term pngcairo", + "?term pngcairo", + "?pngcairo", + " Ϸ `pngcairo` ϡPNG Ϥޤºݤϡ2D ", + " å饤֥Ǥ cairo ȡʸ֤ȥѤΥ饤", + " pango ͳƹԤޤ", + "", + " :", + " set term pngcairo", + " {{no}enhanced} {mono|color} {solid|dashed}", + " {{no}transparent} {{no}crop} {background <rgbcolor>", + " {font <font>} {fontscale <scale>}", + " {linewidth <lw>} {rounded|butt} {dashlength <dl>}", + " {size <XX>{unit},<YY>{unit}}", + "", + " νϷϡĥʸ⡼ (enhanced text mode) 򥵥ݡȤ", + " ƤơեȤ񼰥ޥ (ադʤ) ٥¾ʸ", + " ळȤǤޤĥʸ⡼ɤν񼰤¾ gnuplot ν", + " Ϸȶ̤Ǥܺ٤ϡʲ: `enhanced`", + "", + " ˤƤϡ <lw> ѹǤޤ", + "", + " `rounded` ϡüܹݤǥեȤ `butt` äü", + " ĥäܹѤޤ", + "", + " PNG ϤΥǥեȤΥϡ640 x 480 ԥǤץ", + " `size` ϡ桼λꤹΤѹޤǥեȤ X, Y", + " ñ̤ϥԥǤ¾ñ̤ѲǽǤ (ߤ cm ȥ", + " ) cm ͿȤϡ 72 dpi ǤΥԥ", + " Ѵޤ`size` ץǻꤵ줿Ȥˤü", + " üޤǤΰϡ˥꡼ɸ 0.0 1.0 бޤ", + "", + " <font> ϡ\"FontFace,FontSize\" ν񼰡Ĥޤե̾ȥ", + " ޤǶڤäĤʸȤɽޤFontFace ϡ\'Arial\' ", + " 褦̾Υե̾Ǥե̾Ϳʤ硢pngcairo Ϸ", + " Ǥ\'Sans\' ѤޤFontSize ϥݥñ̤ǤΥեȥ", + " Ǥꤷʤϡpngcairo ϷǤ 12 ݥȤΥ", + " Ѥޤ", + " :", + " set term pngcairo font \"Arial,12\"", + " set term pngcairo font \"Arial\" # ե̾Τѹ", + " set term pngcairo font \",12\" # եȥΤѹ", + " set term pngcairo font \"\" # ե̾ȥꥻå", + "", + " եȤϡ̾ΥեȽˤޤWindows Ǥϡ", + " Ȥϥȥѥͥ \"ե\" ιܤǹ츫Ĥ", + " ΤǡUNIX ǤϡեȤ \"fontconfig\" ǽޤ", + "", + " ʸΥ쥤Ȥ˻Ѥ饤֥ Pango ϡutf-8 ˴ŤƤ", + " ޤΤǡpngcairo ϷǤϡʸɤ utf-8 Ѵɬפ", + " ޤǥեȤʸɤϡʤѤƤ \'locale\'", + " ˴Ťޤ¾ʸɤˤϡʤɤʸɤ", + " äƤΤμ¤ gnuplot 狼褦ˤƤܺ٤ˤĤ", + " ϡʲ: `encoding`", + "", + " pango ϡunicode ޥåԥ󥰤ǤʤեȤФƤͽ̷̤Ϳ", + " 뤫⤷ޤ㤨 Symbol եȤФƤϡpngcairo Ϸ", + " ϡʸɤ unicode Ѵ뤿 http://www.unicode.org/ ", + " ޥåԥ󥰤Ѥޤʤ\"the Symbol font\" ϡAcrobat", + " Reader Ȱ \"SY______.PFB\" ȤۤƤ Adobe Symbol ", + " ȤǤȲᤵ뤳ȤդƤˡ", + " OpenOffice.org Ȱ \"opens___.ttf\" Ȥۤ OpenSymbol", + " եȤƱʸ󶡤ƤޤMicrosoft Symbol ե", + " (\"symbol.ttf\") ۤƤޤϰۤʤʸåȤˤʤäƤ", + " ơĤϷ礱ƤޤĤϿѤäƤޤäƤ", + " ʤΥǥեȤǤʤ餫꤬ (㤨Хǥ⥹", + " ץ enhancedtext.dem ɽʤȤä) ϡ", + " Adobe OpenOffice Symbol եȤ򥤥󥹥ȡ뤷ơMicrosoft ", + " Symbol եȤʤȤʤ⤷ޤ\"windings\" Τ", + " ¾ɸΥեȤǤư뤳Ȥ𤵤Ƥޤ", + "", + " Υ󥰤ϡΤȤѹǤޤ󡣽Ϥɤ뤿", + " ˤΥ󥰤ϡꥢСץ󥰤 2 Ĥ", + " äƤޤ", + " ꥢϡʿľǤʤ餫ɽޤ", + " Сץ󥰤ϡꥢȤǥԥ⾮", + " Ǥ٤󶡤gnuplot ɸľ񤱤褦ˤʤޤ", + " ϡгľ (㤨 'plot x') ɤΤ򤱤ޤ", + "" + #endif /* JAPANESE_DOC */ END_HELP(pngcairo) #endif /* TERM_HELP */ diff -rc term/canvas.trm.ORG term/canvas.trm *** term/canvas.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/canvas.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 1421,1426 **** --- 1421,1427 ---- #ifdef TERM_HELP START_HELP(canvas) + #ifndef JAPANESE_DOC "1 canvas", "?commands set terminal canvas", "?set terminal canvas", *************** *** 1494,1498 **** --- 1495,1578 ---- " fishplot_plot_2, and so on. These can be referenced by external javascript", " routines, for example gnuplot.toggle_visibility(\"fishplot_plot_2\").", "" + #else /* JAPANESE_DOC */ + "1 canvas", + "?commands set terminal canvas", + "?set terminal canvas", + "?set term canvas", + "?terminal canvas", + "?term canvas", + "", + " Ϸ `canvas` ϡHTML5 canvas Ǿ褹 javascript ", + " ɤνޤ", + " :", + " set terminal canvas {size <xsize>, <ysize>} {background <rgb_color>}", + " {font {<fontname>}{,<fontsize>}} | {fsize <fontsize>}"," {{no}enhanced} {linewidth <lw>}", + " {rounded | butt}", + " {solid | dashed {dashlength <dl>}}", + " {standalone {mousing} | name '<funcname>'}", + " {jsdir 'URL/for/javascripts'}", + " {title '<some string>'}", + "", + " <xsize> <ysize> ΰΥԥñ̤ǤΥꤷޤ", + " standalone ⡼ɤǤΥǥեȤΥϡ600x400 ԥǤ", + " ǥեȤΥեȥ 10 Ǥ", + "", + " : ե canvastext.js 󶡤Ƥ Hershey simplex Roman ե", + " ȤΥʬΥեȰĤѤǤޤϡե", + " canvasmath.js ֤뤳ȤǤˤ UTF-8 󥳡ɤ줿", + " Hershey simplex Greek math symbols ޤޤƤޤ¾νϷ", + " 碌ơ`font \"name,size\"` ηȤ褦ˤʤäƤޤ", + " Ȥ `name` Υե̾ʬ̵뤵ޤΤ˥֥饦̾", + " դեȤ򥵥ݡȤǤ礦", + "", + " ǥեȤ `standalone` ⡼ɤϡHTML 5 canvas ǤѤƥ", + " դ褹褦 javascript ɤޤ HTML ڡޤ", + " HTML ڡϡ2 Ĥɬפ javascript ե 'canvastext.js'", + " 'gnuplot_common.js' ˥󥯤ޤ򥵥ݡȤ뤿ˤϤ", + " åե 'gnuplot_dashedlines.js' ɬפǤǥեȤǤϤ", + " եؤΥ󥯤ǡUnix ߴΥƥǤ̾Ϥǥ", + " 쥯ȥ /usr/local/share/gnuplot/<version>/js ˤޤ¾δĶ", + " ĤƤϡ󥹥ȡ˴ؤդ򻲾ȤƤϡ", + " `jsdir` ̤Υǥ쥯ȥꡢ뤤ϰŪ URL ", + " 뤳ȤѹǤޤդ⡼ȥ饤ȤΥޥǸ", + " ˤϡ̾ϸԤ꤬ŬڤǤ礦", + "", + " canvas ϷϤ٤ƥޥǽǤ", + " `mousing` ɲäȡ`standalone` ⡼ɤΥդβ˥ޥȥ", + " 󥰥ܥåĤޤϡ`canvastext.js` ֤ƤΤƱ", + " ǥ쥯ȥꡢޤ URL Ρ'gnuplot_mouse.js' Ȥ", + " javascript եؤΥ󥯤 'gnuplot_mouse.css' Ȥޥܥå", + " ˴ؤ륹륷Ȥɲäޤ", + "", + " ץ `name` ϡjavascript Τߤޤեޤ", + " 줬ޤ javascript ؿȡ줬褹 canvas Ǥ id ξϡ", + " ʲʸѥ᡼ޤ㤨аʲΥޥ", + " set term canvas name 'fishplot'", + " set output 'fishplot.js'", + " ϡjavascript ؿ fishplot() ޤեδؿϥ", + " դ id=fishplot canvas 褷ޤ javascript ؿƤ", + " Ф HTML ڡϡ canvastext.js ɤ߹ޤʤФ", + " ޤ󡣾Τ褦 fishplot ꤳǾ HTML ե", + " ϰʲΤ褦ˤʤޤ:", + "", + " <html>", + " <head>", + " <script src=\"canvastext.js\"></script>", + " <script src=\"gnuplot_common.js\"></script>", + " </head>", + " <body onload=\"fishplot();\">", + " <script src=\"fishplot.js\"></script>", + " <canvas id=\"fishplot\" width=600 height=400>", + " <div id=\"err_msg\">No support for HTML 5 canvas element</div>", + " </canvas>", + " </body>", + " </html>", + "", + " ΥХ뤽줾Υդ̾ϡfishplot_plot_1,", + " fishplot_plot_2 Ȥʤޤ javascript 롼Ǥ򻲾", + " 뤳ȤǤޤ: gnuplot.toggle_visibility(\"fishplot_plot_2\")", + "" + #endif /* JAPANESE_DOC */ END_HELP(canvas) #endif /* TERM_HELP */ diff -rc term/cgi.trm.ORG term/cgi.trm *** term/cgi.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/cgi.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 319,324 **** --- 319,325 ---- #ifdef TERM_HELP START_HELP(cgi) + #ifndef JAPANESE_DOC "1 cgi", "?commands set terminal cgi", "?set terminal cgi", *************** *** 336,340 **** --- 337,361 ---- " printers; the environment variable CGIPRNT must be set. `cgi` may be used", " for either a display or hardcopy; the environment variable CGIDISP is checked,", " first, then CGIPRNT. These terminals have no options." + #else /* JAPANESE_DOC */ + "1 cgi", + "?commands set terminal cgi", + "?set terminal cgi", + "?set term cgi", + "?terminal cgi", + "?term cgi", + "?cgi", + "?commands set terminal hcgi", + "?set terminal hcgi", + "?set term hcgi", + "?terminal hcgi", + "?term hcgi", + "?hcgi", + " `cgi` `hcgi` ϥɥ饤Ф SCO CGI ɥ饤Ф򥵥ݡȤޤ`hcgi`", + " ϥץѤǡĶѿ CGIPRNT ꤵƤɬפޤ`cgi`", + " ϥǥץ쥤ޤϥϡɥԡ˻Ȥޤ: Ķѿ CGIDISP ޤ", + " å CGIPRNT Ĵ٤ޤνϥɥ饤Фˤϥץ", + " Ϥޤ" + #endif /* JAPANESE_DOC */ END_HELP(cgi) #endif diff -rc term/cgm.trm.ORG term/cgm.trm *** term/cgm.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/cgm.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 1750,1755 **** --- 1750,1756 ---- #ifdef TERM_HELP START_HELP(cgm) + #ifndef JAPANESE_DOC "1 cgm", "?commands set terminal cgm", "?set terminal cgm", *************** *** 2019,2024 **** --- 2020,2301 ---- " which should get you the first entry in your application's default font", " table. 'Helvetica Bold' will give you its second entry, etc.", "" + #else /* JAPANESE_DOC */ + "1 cgm", + "?commands set terminal cgm", + "?set terminal cgm", + "?set term cgm", + "?terminal cgm", + "?term cgm", + "?cgm", + " `cgm` ɥ饤Ф CGM (Computer Graphics Metafile Version 1) ", + " ޤΥեեޥåȤ ANSI ʽ X3.122-1986 \"Computer", + " Graphics - Metafile for the Storage and Transfer of Picture Description", + " Information\" ƤΤΰʬǤ", + "", + " :", + " set terminal cgm {color | monochrome} {solid | dashed} {{no}rotate}", + " {<mode>} {width <plot_width>} {linewidth <line_width>}", + " {font \"<fontname>,<fontsize>\"}", + " {background <rgb_color>}", + " [deprecated] {<color0> <color1> <color2> ...}", + "", + " `solid` ƤζɤѥɤĤ֤ޤ;", + " <mode> `landscape`, `portrait`, `default` Τ줫;", + " <plot_width> ϥݥñ̤ǤΥդβꤵƤ;", + " <line_width> ϥݥñ̤Ǥ (ǥեȤ 1);", + " <fontname> ϥեȤ̾ (ʲΥեȰ); ", + " <fontsize> ϥݥñ̤ǤΥեȤΥ (ǥեȤ 12) Ǥ", + "", + " ǽ 6 ĤΥץϤɤν֤ǻꤷƤ⹽ޤ`default` ", + " 򤹤ȡƤΥץ򤽤ΥǥեȤͤˤޤ", + "", + " ο `set term` ޥɤꤹȤߤϡ侩Ǥ", + " ˡطʿʬΥ줿 background ǡο `set linetype`", + " ꤹ٤Ǥ礦侩λȤߤǤϿ 'xrrggbb' ηǼ", + " Ĥޤx ʸ 'x' ΤΡ'rrggbb' 16 ʿǤ֡СĤ", + " ʬǤǽοطʿȤƻȤθ³缡ο", + " ȤƳƤƤޤ", + "", + " :", + " set terminal cgm landscape color rotate dashed width 432 \\", + " linewidth 1 'Helvetica Bold' 12 # ǥե", + " set terminal cgm linewidth 2 14 # 乭Ȥ礭ե", + " set terminal cgm portrait \"Times Italic\" 12", + " set terminal cgm color solid # ݤʤɾäƤޤ !", + + "2 CGM Υե (font)", + "?commands set terminal cgm font", + "?set terminal cgm font", + "?set term cgm font", + "?cgm font", + " CGM (Computer Graphics Metafile) եκǽʬ᥿ե", + " ʬˤϡեȥꥹ (font table) ޤޤƤޤ", + " ǤϡեȤϤΥꥹȤˤֹǻꤵޤǥեȤǤϤ", + " Υɥ饤Фϰʲ 35 ĤΥեȥꥹȤˤΥꥹȤ", + " `Helvetica`, `Times`, `Courier` γƥեȤ `italic` `oblique`", + " ֤ΡӤεդˤ 6 ĤɲäΥեȤޤޤޤ", + " (Microsoft Office Corel Draw CGM import ե륿 `italic` ", + " `oblique` ƱΤȤưǤ)", + "@start table - ǽ÷ƥȷ", + " Helvetica", + " Helvetica Bold", + " Helvetica Oblique", + " Helvetica Bold Oblique", + " Times Roman", + " Times Bold", + " Times Italic", + " Times Bold Italic", + " Courier", + " Courier Bold", + " Courier Oblique", + " Courier Bold Oblique", + " Symbol", + " Hershey/Cartographic_Roman", + " Hershey/Cartographic_Greek", + " Hershey/Simplex_Roman", + " Hershey/Simplex_Greek", + " Hershey/Simplex_Script", + " Hershey/Complex_Roman", + " Hershey/Complex_Greek", + " Hershey/Complex_Script", + " Hershey/Complex_Italic", + " Hershey/Complex_Cyrillic", + " Hershey/Duplex_Roman", + " Hershey/Triplex_Roman", + " Hershey/Triplex_Italic", + " Hershey/Gothic_German", + " Hershey/Gothic_English", + " Hershey/Gothic_Italian", + " Hershey/Symbol_Set_1", + " Hershey/Symbol_Set_2", + " Hershey/Symbol_Math", + " ZapfDingbats", + " Script", + " 15", + "#\\begin{tabular}{|lll|} \\hline", + "#\\multicolumn{3}{|c|}{CGM fonts}\\\\\\hline", + "#&Helvetica&Hershey/Cartographic\\_Roman\\\\", + "#&Helvetica Bold&Hershey/Cartographic\\_Greek\\\\", + "#&Helvetica Oblique&Hershey/Simplex\\_Roman\\\\", + "#&Helvetica Bold Oblique&Hershey/Simplex\\_Greek\\\\", + "#&Times Roman&Hershey/Simplex\\_Script\\\\", + "#&Times Bold&Hershey/Complex\\_Roman\\\\", + "#&Times Italic&Hershey/Complex\\_Greek\\\\", + "#&Times Bold Italic&Hershey/Complex\\_Italic\\\\", + "#&Courier&Hershey/Complex\\_Cyrillic\\\\", + "#&Courier Bold&Hershey/Duplex\\_Roman\\\\", + "#&Courier Oblique&Hershey/Triplex\\_Roman\\\\", + "#&Courier Bold Oblique&Hershey/Triplex\\_Italic\\\\", + "#&Symbol&Hershey/Gothic\\_German\\\\", + "#&ZapfDingbats&Hershey/Gothic\\_English\\\\", + "#&Script&Hershey/Gothic\\_Italian\\\\", + "#&15&Hershey/Symbol\\_Set\\_1\\\\", + "#&&Hershey/Symbol\\_Set\\_2\\\\", + "#&&Hershey/Symbol\\_Math\\\\", + "%c c l .", + "%@@CGM fonts", + "%_", + "%@@Helvetica", + "%@@Helvetica Bold", + "%@@Helvetica Oblique", + "%@@Helvetica Bold Oblique", + "%@@Times Roman", + "%@@Times Bold", + "%@@Times Italic", + "%@@Times Bold Italic", + "%@@Courier", + "%@@Courier Bold", + "%@@Courier Oblique", + "%@@Courier Bold Oblique", + "%@@Symbol", + "%@@Hershey/Cartographic_Roman", + "%@@Hershey/Cartographic_Greek", + "%@@Hershey/Simplex_Roman", + "%@@Hershey/Simplex_Greek", + "%@@Hershey/Simplex_Script", + "%@@Hershey/Complex_Roman", + "%@@Hershey/Complex_Greek", + "%@@Hershey/Complex_Script", + "%@@Hershey/Complex_Italic", + "%@@Hershey/Complex_Cyrillic", + "%@@Hershey/Duplex_Roman", + "%@@Hershey/Triplex_Roman", + "%@@Hershey/Triplex_Italic", + "%@@Hershey/Gothic_German", + "%@@Hershey/Gothic_English", + "%@@Hershey/Gothic_Italian", + "%@@Hershey/Symbol_Set_1", + "%@@Hershey/Symbol_Set_2", + "%@@Hershey/Symbol_Math", + "%@@ZapfDingbats", + "%@@Script", + "%@@15", + "@end table", + + " ΥեȤκǽ 13 Ĥ WebCGM ׵ᤵƤΤǤ", + " Microsoft Office CGM import ե륿Ϥ 13 ĤɸեȤ", + " 'ZapfDingbats' 'Script' 򥵥ݡȤƤޤΥ", + " (script) եȤ '15' Ȥ̾ǤǤޤ", + " Microsoft import ե륿 font ֤˴ؤܤ", + " ĤƤϡ", + " C:\\Program Files\\Microsoft Office\\Office\\Cgmimp32.hlp", + " Υإץե롢ޤ", + " C:\\Program Files\\Common Files\\Microsoft Shared\\Grphflt\\Cgmimp32.cfg", + " եʤɤåƤ", + "", + " `set term` ޥɤǥǥեȤΥեȥꥹȤˤʤե̾", + " 뤳ȤǽǤξ硢λꤷեȤǽ˸뿷", + " եȥꥹȤޤΥե̾˴ؤơڥ롢ñ", + " Ƭʸɤ˥ڡ뤫ʤɤ CGM ե", + " ɤॢץꥱˤȤäŬڤʤΤǤ뤫ȳǧɬ", + " ޤ(gnuplot Ǥդ MIL-D-28003A 򥢥ץꥱϡ", + " ̾ʸʸΰ㤤̵뤷ޤ) եȤ򤤤Ĥ", + " äϡ`set term` ޥɤ򷫤֤ѤƤ", + "", + " :", + " set terminal cgm 'Old English'", + " set terminal cgm 'Tengwar'", + " set terminal cgm 'Arabic'", + " set output 'myfile.cgm'", + " plot ...", + " set output", + "", + " `set label` ޥɤǤϿեȤƳ뤳ȤϤǤޤ", + + "2 CGM Υեȥ (fontsize)", + "?commands set terminal cgm fontsize", + "?set terminal cgm fontsize", + "?set term cgm fontsize", + "?cgm fontsize", + " եȤϡڡ 6 ǤȲꤷƿ̤ޤ`size`", + " ޥɤǥڡνIJ椬ѹƤꡢCGM ե뤬ۤʤ", + " Ƥ硢̤ȤƥեȤΥ礵줿̾줿", + " 뤳ȤˤʤޤꤵƤѹˤϡ`width` ץ", + " ѤƤ", + + "2 cgm linewidth", + "?commands set terminal cgm linewidth", + "?set terminal cgm linewidth", + "?set term cgm linewidth", + "?cgm linewidth", + " `linewidth` ץݥñ (pt) ꤷޤǥե", + " Ȥ 1 pt Ǥ`fontsize` `width` ץΤȤ", + " Ƥ褦ˡڡμºݤˤäƤν̼ܤϱƶޤ", + + "2 cgm rotate", + "?commands set terminal cgm rotate", + "?set terminal cgm rotate", + "?set term cgm rotate", + "?cgm rotate", + " `norotate` ץϥƥȤβž򤷤ʤ褦ˤޤ㤨 Word", + " for Windows 6.0c Ѥ CGM ϥե륿ϲž줿ʸդޤ", + " Word ° DRAW ǥϤդ뤳ȤǤ", + " դԽ (㤨ж˸ФĤ)Ƥβž줿ʸ", + " ʿˤʤä¸ƤޤY θФϥåפ붭", + " ۤƤޤǤ礦`norotate` ץȤСɤɤʤ", + " ꤫ Y θФϤޤäƤޤޤԽˤäƥ᡼", + " 뤳ȤϤʤʤޤ`rotate` ץϥǥեȤεưݾڤ", + " ޤ", + + "2 cgm solid", + "?set terminal cgm solid", + "?set term cgm solid", + "?cgm solid", + " `solid` ץ襹̵Τ˻Ȥޤ", + " ϡ顼ͭǤ硢ޤˤ뤳Ȥǥդˤ", + " ͭѤǤ礦`dashed` ץϥǥեȤεưݾڤ", + " ξġ˰ۤʤΥѥͿޤ", + + "2 CGM Υ (size)", + "?commands set terminal cgm size", + "?set terminal cgm size", + "?set term cgm size", + "?cgm size", + " CGM դΥǥեȤΥϡ֤ (landscape) Ǥ 32599, ", + " 23457֤ (portrait) Ǥ 23457, 32599 Ǥ", + + "2 cgm width", + "?commands set terminal cgm width", + "?set terminal cgm width", + "?set term cgm width", + "?cgm width", + " CGM եƤĹŪñ̤Υեɤॢץ", + " 󤬺ǽŪʥդΥꤷޤǥեȤǤϺǽŪ", + " դ 6 (15.24 cm) ǤȲꤵƤޤ", + " եȥ׻Τ˻Ȥ졢`width` ץѹǤ", + "  `width` θݥñ̤ǻꤷޤ(ǡ", + " Ȥ PostScript Ʊ 1/72 ̣ޤñ̤ TeX Ǥ", + " \"big point\" ȸƤФƤޤ) ¾ñ̤Ѵˤϡgnuplot ο", + " Ȥޤ", + "", + " :", + " set terminal cgm width 432 # ǥե", + " set terminal cgm width 6*72 # Ʊ", + " set terminal cgm width 10/2.54*72 # 10 cm ", + + "2 cgm nofontlist", + "?commands set terminal cgm nofontlist", + "?set terminal cgm nofontlist", + "?set term cgm nofontlist", + "?cgm nofontlist", + "?set terminal cgm winword6", + "?set term cgm winword6", + "?cgm winword6", + " ǥեȤΥեȥꥹ (font table) WebCGM Ǵ𤵤Ƥե", + " ȤޤǤơ Microsoft Office Corel Draw CGM (Computer", + " Graphics Metafile) ϥե륿Ŭ礷Ƥޤ¾Υץꥱ", + " ϰۤʤեȡ뤤ϰۤʤե̾Ѥ뤫Τޤ󤬡", + " ϥޥ˥奢ˤϽ񤫤ƤʤΤޤ󡣥ץ", + " `nofontlist` (`winword6` Ʊ̣) Ѥ CGM ե뤫ե", + " ȥꥹȤޤξ硢ɤ߹ץꥱϥǥե", + " ȤΥեȥꥹȤѤǤ礦gnuplot ϤξǤե", + " Τ˼ʬΥǥեȤΥեȥꥹȤѤޤäơ", + " 'Helvetica' 1 ֤ˤʤꡢ줬ʤλѤ륢ץꥱΥ", + " եȥեȥꥹȤκǽΤΤˤʤޤ'Helvetica Bold' ", + " եȥꥹȤ 2 ܤΥեȤб¾ƱͤȤʤޤ", + "" + #endif /* JAPANESE_DOC */ END_HELP(cgm) #endif /* TERM_HELP */ diff -rc term/context.trm.ORG term/context.trm *** term/context.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/context.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 1965,1970 **** --- 1965,1971 ---- #ifdef TERM_HELP START_HELP(context) + #ifndef JAPANESE_DOC "1 context", "?commands set terminal context", "?set terminal context", *************** *** 2106,2111 **** --- 2107,2262 ---- " \\useGNUPLOTgraphic[sin]", " \\stoptext", " This will run gnuplot automatically and include the resulting figure in the document." + #else /* JAPANESE_DOC */ + "1 context", + "?commands set terminal context", + "?set terminal context", + "?terminal context", + "?context", + " ConTeXt (Τ) Metapost ȹ٤ͻ礷ʼ PDF ʸ", + " 뤿 TeX ΥޥѥåǤνϷϡMetafun", + " ޤϼưԽǤۤȤɤΤȤ", + " ʤǤޤ", + "", + " ConTeXt + gnuplot ⥸塼ʿŪʥ桼ˤϡΥڡɤ", + " ⡢`Using ConTeXt` 򻲾Ȥ뤫ConTeXt gnuplot ⥸塼Υޥ˥", + " 򻲾Ȥ뤳Ȥ侩ޤ", + "", + " Ϸ `context` ϡʲΥץ򥵥ݡȤƤޤ:", + "", + " :", + " set term context {default}", + " {defaultsize | size <scale> | size <xsize>{in|cm}, <ysize>{in|cm}}", + " {input | standalone}", + " {timestamp | notimestamp}", + " {noheader | header \"<header>\"}", + " {color | colour | monochrome}", + " {rounded | mitered | beveled} {round | butt | squared}", + " {dashed | solid} {dashlength | dl <dl>}", + " {linewidth | lw <lw>}", + " {fontscale <fontscale>}", + " {mppoints | texpoints}", + " {inlineimages | externalimages}", + " {defaultfont | font \"{<fontname>}{,<fontsize>}\"}", + "", + " standalone Ǥʤ (`input`) Ǥϡץϥե", + " `size`٤ƤΥ٥Ψ <fontscale> ǿ̤ `fontscasle`", + " font Τ̣߰¾ΥץϷٹʤ̵뤵", + " ߤǡϤΥեåɤ߹ .tex եꤷƤ", + " ʸΥեȤ 12pt ǤϤʤϡŬڤʥեȥ", + " ꤹ뤳Ȥ򶯤侩ޤˤꡢgnuplot ٥Ѥˤɤ줯", + " 餤礭ΥڡݤФΤ뤳ȤǤޤ", + "", + " `default` ϡ٤ƤΥץǥեȤͤ˥ꥻåȤޤ", + "", + " `defaultsize` ϡ襵 5in x 3in ꤷޤ", + " `size` <scale> ϡ襵ǥեȥ <scale> ܤˤޤ", + " ',' ڤ 2 ͿϡǽΤΤϲΥ2 ", + " ΤΤϿľꤷޤΥˤϡñ̤Ȥƥ", + " ('in'), ('cm') ȤޤάϥǥեͤФ", + " ǤȤߤʤޤ", + "", + " `input` (ǥե) ϡ¾ ConTeXt ʸ񤫤륰դ", + " ޤ", + " `standalone` ϡ˿ɲä켫ȤΤޤޥѥǤ", + " ˤޤξ硢`header` ץɬפˤʤ뤫⤷ޤ", + "", + " standalone Υդ//ޥɲä `header` ", + " ƤǥեȤ `noheader` Ǥ", + "", + " `notimestamp` ϡʬνϤޤ (С", + " ƥȤäƤ硢դ㤦Τ򿷤СȤϿ", + " ϤʤǤ礦)", + "", + " `color` (ǥե) ϡ顼ޤ`monochrome` ϰ", + " special ޤץѤˤϡεư򤳤Ѥ", + " äɤʤȤǥäƤͤϡƤƤ", + "", + " `rounded` (ǥե) `mitered`, `beveled` ϡʬܹη", + " 椷`round` (default) `butt`, `squared` ϡʬüη", + " ޤܺ٤ϡPostScript PDF Υե󥹥ޥ˥奢򻲾ȤƤ", + " 㤷ѲؿѤˤϡʬܹǤäѤ", + " 褦`rounded` `round` ȤȤǤ礦", + " (˴ؤŪʻȤߤϡΥץ襹̡", + " Ǥ褦 gnuplot ݡȤ٤Ȼפޤ)", + "", + " `dashed` (ǥե) ϡۤʤ˰ۤʤѥȤ`solid`", + " ϡ٤Ƥ˼Ѥޤ", + "", + " `dashlength` (ޤ `dl`) ϡʬĹ <dl> ܤޤ", + " `linewidth` (ޤ `lw`) ϡ٤Ƥ <lw> ܤޤ", + " (lw 1 0.5bp ̣ Metapost ΥǥեȤǤ)", + " `fontscale` ϡƥȥ٥ǥեȤʸեȤ <fontscale>", + " ܤ˳礷ޤ", + "", + " `mppoints` ϡMetapost 褵줿ѤߤηѤޤ", + " `texpoints` ϡñǤ뵭楻åȤѤޤϡʲ", + " Τ褦ˤ ConTeXt Ǥޤ:", + " \\defineconversion[my own points][+,{\\ss x},\\mathematics{\\circ}]", + " \\setupGNUPLOTterminal[context][points=tex,pointset=my own points]", + "", + " `inlineimages` ϡХʥʸȤƽ񤭽Фޤ", + " ConTeXt MKIV Τߤǵǽޤ", + " `externalimages` ϡPNG եϤ ConTeXt MKII ǵ", + " ǽޤ줬ư뤿ˤϡgnuplot PNG Ϥ򥵥ݡȤ", + " ɬפޤ", + "", + " standalone ΥդǤϡ`font` ǥե̾ȥǤޤ", + " standalone Ǥʤ⡼ (`input`) Ǥϡƥȥ٥˽ʬʥڡ", + " Ƥ뤿˥եȥΤߤ̣ޤ", + " ޥ", + " set term context font \"myfont,ss,10\"", + " ϡʲΤ褦ˤʤޤ:", + " \\setupbodyfont[myfont,ss,10pt]", + " 㤨Фɲä `fontscale` 0.8 ꤹȡ̤Ȥƥե", + " 8pt 礭ˤʤꡢ ", + " set label ... font \"myfont,12\"", + " 9.6pt ˤʤޤ", + "", + " Ŭʥץץȥե (ȥإå) ѰդΤϼʬǹԤä", + " ʤХեȤڤؤϸ̤ޤConTeXt MKII (pdfTeX)", + " ɸեȤϡʲΤ褦ˤƻȤޤ:", + " set terminal context standalone header '\\usetypescript[iwona][ec]' \\", + " font \"iwona,ss,11\"", + " եȤѤ˴ؤ ConTeXt κǿξˤĤƤϡConTeXt ʸ", + " wiki᡼󥰥ꥹ () õƤߤƤ", + "", + " :", + " set terminal context size 10cm, 5cm # 10cm, 5cm", + " set terminal context size 4in, 3in # 4in, 3in", + " UTF-8 󥳡ɥ٥ standalone (ڡ) դǻѤˤ:", + " set terminal context standalone header '\\enableregime[utf-8]'", + "", /* TODO: LaTeX formatting */ + "C 2 ɬ׾ (Requirements)", + "2 Requirements", + " ConTeXt Ѥ gnuplot ⥸塼:", + "^ <a href=\"http://ctan.org/pkg/context-gnuplot\">", + " http://ctan.org/pkg/context-gnuplot", + "^ </a>", + " ȡǿ ConTeXt ɬפǤ", + " gnuplot ƤӽФˤϡwrite18 ǽˤɬפޤ", + " ۤȤɤ TeX ʪǤϡ texmf.cnf shell_escape=t Ȥ뤳", + " ȤǤޤ", + "", + " νϷȤܤإפ˴ؤƤϰʲ⻲ȤƤ:", + "^ <a href=\"http://wiki.contextgarden.net/Gnuplot\">", + " http://wiki.contextgarden.net/Gnuplot", + "^ </a>", + "", + "C 2 ConTeXt gnuplot θƤӽФ (Calling gnuplot from ConTeXt)", + "2 Calling gnuplot from ConTeXt", + " ConTeXt ʸǥդǤñˡϰʲ̤:", + " \\usemodule[gnuplot]", + " \\starttext", + " \\title{How to draw nice plots with {\\sc gnuplot}?}", + " \\startGNUPLOTscript[sin]", + " set format y \"%.1f\"", + " plot sin(x) t '$\\sin(x)$'", + " \\stopGNUPLOTscript", + " \\useGNUPLOTgraphic[sin]", + " \\stoptext", + " ϼưŪ gnuplot ¹Ԥη̤βʸ˼ߤޤ" + #endif /* JAPANESE_DOC */ END_HELP(context) #endif /* TERM_HELP */ diff -rc term/corel.trm.ORG term/corel.trm *** term/corel.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/corel.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 431,436 **** --- 431,437 ---- #ifdef TERM_HELP START_HELP(corel) + #ifndef JAPANESE_DOC "1 corel", "?commands set terminal corel", "?set terminal corel", *************** *** 448,452 **** --- 449,473 ---- "", " where the fontsize and linewidth are specified in points and the sizes in", " inches. The defaults are monochrome, \"SwitzerlandLight\", 22, 8.2, 10 and 1.2." + #else /* JAPANESE_DOC */ + "1 corel", + "?commands set terminal corel", + "?set terminal corel", + "?set term corel", + "?terminal corel", + "?term corel", + "?corel", + " `corel` Ϸ CorelDraw ѤνϤǤ", + "", + " :", + " set terminal corel { default", + " | {monochrome | color", + " {\"<font>\" {<fontsize> ", + " {<xsize> <ysize> {<linewidth> }}}}}", + "", + " ǡեȥ (`fontsize`) (`linewidth`) ϥݥñ", + " ̡ (`xsize`) Ƚ (`ysize`) ϥñ̤ǤǥեȤͤ", + " 줾졢monochrome, \"SwitzerlandLight\", 22, 8.2, 10, 1.2 Ǥ" + #endif /* JAPANESE_DOC */ END_HELP(corel) #endif /* TERM_HELP */ diff -rc term/debug.trm.ORG term/debug.trm *** term/debug.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/debug.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 309,314 **** --- 309,315 ---- #ifdef TERM_HELP START_HELP(debug) + #ifndef JAPANESE_DOC "1 debug", "?commands set terminal debug", "?set terminal debug", *************** *** 318,322 **** --- 319,334 ---- "?debug", " This terminal is provided to allow for the debugging of `gnuplot`. It is", " likely to be of use only for users who are modifying the source code." + #else /* JAPANESE_DOC */ + "1 debug", + "?commands set terminal debug", + "?set terminal debug", + "?set term debug", + "?terminal debug", + "?term debug", + "?debug", + " Υɥ饤Ф `gnuplot` ΥǥХåΤ󶡤ƤΤǤ", + " 餯ɤ桼ΤߤѤΤǤ礦" + #endif /* JAPANESE_DOC */ END_HELP(debug) #endif diff -rc term/djsvga.trm.ORG term/djsvga.trm *** term/djsvga.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/djsvga.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 471,476 **** --- 471,477 ---- */ #ifdef TERM_HELP START_HELP(svga) + #ifndef JAPANESE_DOC "1 svga", "?commands set terminal svga", "?set terminal svga", *************** *** 483,487 **** --- 484,503 ---- "", " Syntax:", " set terminal svga {\"<fontname>\"}" + #else /* JAPANESE_DOC */ + "1 svga", + "?commands set terminal svga", + "?set terminal svga", + "?set term svga", + "?terminal svga", + "?term svga", + "?svga", + " `svga` ɥ饤Ф SVGA եå PC 򥵥ݡȤޤ", + " DJGPP ǥѥ뤵줿Τ߻ȤȤǤޤץϥե", + " Ȥ˴ؤΤΤߤǤ", + "", + " :", + " set terminal svga {\"<fontname>\"}" + #endif /* JAPANESE_DOC */ END_HELP(svga) #endif /* TERM_HELP */ diff -rc term/dumb.trm.ORG term/dumb.trm *** term/dumb.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/dumb.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 564,569 **** --- 564,570 ---- #ifdef TERM_HELP START_HELP(dumb) + #ifndef JAPANESE_DOC "1 dumb", "?commands set terminal dumb", "?set terminal dumb", *************** *** 599,603 **** --- 600,642 ---- " -0.8 + + ++||||+ + + ++||||+ + |", " -1 +---+--------+--------+-------+--------+--------+-+", " -4 -2 0 2 4 6 " + #else /* JAPANESE_DOC */ + "1 dumb", + "?commands set terminal dumb", + "?set terminal dumb", + "?set term dumb", + "?terminal dumb", + "?term dumb", + "?dumb", + " ü (`dumb`) ɥ饤ФϡASCII ʸѤƥƥΰ褷", + " ޤλȲѤΥץ󤬤ޤ", + "", + " :", + " set terminal dumb {size <xchars>,<ychars>} {[no]feed}", + #ifndef NO_DUMB_ENHANCED_SUPPORT + " {[no]enhanced}", + #endif + "", + " <xchars>, <ychars> ϥƥΰΥꤷǥեȤ 79 x 24", + " ȤʤäƤޤǸβԤϡ`feed` ץꤵƤΤ", + " Ϥޤ", + "", + " :", + " set term dumb size 60,15", + " plot [-5:6.5] sin(x) with impulse", + "", + " 1 +-------------------------------------------------+", + " 0.8 +|||++ ++||||++ sin(x) +----+ |", + " 0.6 +|||||+ ++|||||||+ |", + " 0.4 +||||||+ ++|||||||||+ |", + " 0.2 +|||||||+ ++|||||||||||+ +|", + " 0 ++++++++++++++++++++++++++++++++++++++++++++++++++|", + " -0.2 + +|||||||||||+ +|||||||||||+ |", + " -0.4 + +|||||||||+ +|||||||||+ |", + " -0.6 + +|||||||+ +|||||||+ |", + " -0.8 + + ++||||+ + + ++||||+ + |", + " -1 +---+--------+--------+-------+--------+--------+-+", + " -4 -2 0 2 4 6 " + #endif /* JAPANESE_DOC */ END_HELP(dumb) #endif /* TERM_HELP */ diff -rc term/dxf.trm.ORG term/dxf.trm *** term/dxf.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/dxf.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 404,409 **** --- 404,410 ---- #ifdef TERM_HELP START_HELP(dxf) + #ifndef JAPANESE_DOC "1 dxf", "?commands set terminal dxf", "?set terminal dxf", *************** *** 419,423 **** --- 420,441 ---- " modifying the source file. If a black-and-white plotting device is used, the", " colors are mapped to differing line thicknesses. See the description of the", " AutoCad print/plot command." + #else /* JAPANESE_DOC */ + "1 dxf", + "?commands set terminal dxf", + "?set terminal dxf", + "?set term dxf", + "?terminal dxf", + "?term dxf", + "?dxf", + " `dxf` ɥ饤ФϡAutoCad (꡼ 10.x) ˼ळȤǤ", + " ޤΥɥ饤мȤˤϥץϤޤ󤬡˴ؤ", + " Ĥħ¾ˡѹǤޤǥեȤ礭 AutoCad", + " ñ̤Ǥ 120x80 ǡ `set size` ѹǤޤ`dxf` 7 ", + " (֡С忧ġֻ) Ȥޤѹˤϥɥ", + " Хեɬפޤν֤Ȥ硢", + " οΰ㤤ɽޤܺ٤ AutoCad ΰ/ץ", + " ϥޥɤ˴ؤ뵭Ҥ򻲾ȤƤ" + #endif /* JAPANESE_DOC */ END_HELP(dxf) #endif /* TERM_HELP */ diff -rc term/dxy.trm.ORG term/dxy.trm *** term/dxy.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/dxy.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 191,196 **** --- 191,197 ---- #ifdef TERM_HELP START_HELP(dxy800a) + #ifndef JAPANESE_DOC "1 dxy800a", "?commands set terminal dxy800a", "?set terminal dxy800a", *************** *** 199,203 **** --- 200,215 ---- "?term dxy800a", "?dxy800a", " This terminal driver supports the Roland DXY800A plotter. It has no options." + #else /* JAPANESE_DOC */ + "1 dxy800a", + "?commands set terminal dxy800a", + "?set terminal dxy800a", + "?set term dxy800a", + "?terminal dxy800a", + "?term dxy800a", + "?dxy800a", + " Υɥ饤Ф Roland DXY800A ץå򥵥ݡȤޤץϤ", + " ޤ" + #endif /* JAPANESE_DOC */ END_HELP(dxy800a) #endif diff -rc term/eepic.trm.ORG term/eepic.trm *** term/eepic.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/eepic.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 577,582 **** --- 577,583 ---- #ifdef TERM_HELP START_HELP(eepic) + #ifndef JAPANESE_DOC "1 eepic", "?commands set terminal eepic", "?set terminal eepic", *************** *** 658,662 **** --- 659,751 ---- " set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'", " The other label -- account for long ticlabels:", " set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}}'" + #else /* JAPANESE_DOC */ + "1 eepic", + "?commands set terminal eepic", + "?set terminal eepic", + "?set term eepic", + "?terminal eepic", + "?term eepic", + "?eepic", + " `eepic` ɥ饤Ф LaTeX picture ĶĥΤ򥵥ݡȤޤ", + " `latex` ɥ饤Ф̤Ǥ", + "", + " Υɥ饤ФˤϤϡLaTeX Ѥ \"eepic.sty\" ޥѥåȶ", + " ˻Ȥ뤳ȤꤷƤޤȤˤϡ\"eepic.sty\" ", + " \"epic.sty\" \"tpic\" \\special ̿ᷲ򥵥ݡȤץ󥿥ɥ饤", + " ФɬפǤ⤷ʤλȤץ󥿥ɥ饤Ф \"tpic\"", + " \\special ̿򥵥ݡȤƤʤǤ⡢\"eepicemu.sty\" ȤȤ", + " ΤΤĤȤ褦ˤʤޤ", + " dvips dvipdfm \"tpic\" \\special 򥵥ݡȤƤޤ", + "", + " :", + " set terminal eepic {default} {color|dashed} {rotate} {size XX,YY}", + " {small|tiny|<fontsize>}", + "", + " ץ:", + " ץǤդν֤Ϳ뤳ȤǤޤ", + " 'color' gnuplot \\color{...} ޥɤˤꥰ", + " 򥫥顼ˤޤΥץѤϡlatex ʸΥץꥢ", + " ֥ \\usepackage{color} ɬפޤ", + " 'dashed' Ѥ뤳ȤĤޤΥץ", + " ʤȡμΤߤȤޤ", + " 'dashed' 'color' ϰΤߤ̣'color' ꤵ줿硢", + " 'dashed' ̵뤵ޤ", + " 'rotate' ˲ž (90 ) 줿ʸѤ褦ˤʤޤ", + " ꤷʤϡ1 ʸ 1 ʸѤ߾夲ƤˡDzž줿ʸ", + " ޤΥץȤϡ\\usepackage{graphicx} ץ", + " ֥ɬפޤ", + " 'small' point ǤΥΰȤ \\scriptsize ε", + " Ѥޤ (¿ʬ TeX ǤϤǡLaTeX2e ǤȤʤǤ礦)", + " ǥեȤǤɸοΥѤޤ", + " 'tiny' ϡ \\scriptscriptstyle εѤޤ", + " 'default' ƤΥץǥեȤͤ˥ꥻåȤޤǥե", + " Ȥϡcolor Ϥʤdashed line Ϥʤž (Ѥ߾夲) ʸλ", + " ѡ礭ʥελѡǤ", + " <fontsize> picture ĶǤΥեȥꤹǤñ", + " pt (ݥ) ǡ10 pt Ϥۤ 3.5 mm Ǥեȥꤷ", + " ʤ硢ƤΥʸ \\footnotesize ꤵޤ", + "", + " :", + " ʸ # (Ӥ¾ (La)TeX ̤ʰ̣Ĥ¾ʸ) \\\\ (", + " åå 2 ) ǥפ뤳Ȥ˺ʤǤ", + " դγѤ᤹ϼΤ褦ˤʤޤ(줬 tpic specials", + " ΰŪʤΤeepic.sty dvips/dvipdfm ΥХʤΤϻ", + " ˤϤ狼ޤ)", + " ǥեȤ eepic դ礭 5x3 ǡ teminal ץ", + " `size` ѹǽǤ", + " ǡ (point) ϡLaTeX Υޥ \"\\Diamond\", \"\\Box\" ʤɤ", + " ȤäޤΥޥɤϸߤ LaTeX2e Υˤ¸ߤ", + " latexsym ѥå˴ޤޤƤޤΥѥåۤΰ", + " ꡢä¿ LaTeX ΥƥΰˤʤäƤޤΥѥå", + " ȤȤ˺ʤǤlatexsym amssymb ѥå", + " ȤȤǽǤ", + " LaTeX ˴ؤƤΥɥ饤Фʸ֤̤ˡ󶡤", + " : '{' ǻϤޤʸϡ'}' Ĥɬפޤʸ", + " ʿˤľˤ⥻󥿥󥰤ޤ'[' ǻϤޤʸξ", + " ϡ֤λ򤹤ʸ (t,b,l,r Τ 2 Ĥޤ) ³", + " ']{'ʸΡǺǸ '}' Ȥޤʸ LaTeX LR-box", + " Ȥޤ'\\rule{}{}' ȤФɤֹ碌ǽǤ", + " ", + "", + " :", + " set term eepic", + " ϡդ picture Ķ˴ޤޤ줿 eepic ޥȤƽϤޤ", + " Υե LaTeX ʸ \\input ǼǤ", + " set term eepic color tiny rotate 8", + " eepic ޥ \\color ޥpoint \\scripscriptsize 礭", + " ˲ž줿ʸλѡƤʸ 8pt ˥åȤƽ", + " ޤ", + "", + " Фΰֹ碌˴ؤ:", + " gnuplot Υǥե (񤽤ʤˤʤ뤬ǤʤȤ⤢):", + " set title '\\LaTeX\\ -- $ \\gamma $'", + " ʿˤľˤ⥻󥿥:", + " set label '{\\LaTeX\\ -- $ \\gamma $}' at 0,0", + " ֤Ū˻ (˹碌):", + " set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'", + " ¾θФ -- ĹФФ븫Ѥ:", + " set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}}'" + #endif /* JAPANESE_DOC */ END_HELP(eepic) #endif /* TERM_HELP */ diff -rc term/emf.trm.ORG term/emf.trm *** term/emf.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/emf.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 1771,1776 **** --- 1771,1777 ---- #ifdef TERM_HELP START_HELP(emf) + #ifndef JAPANESE_DOC "1 emf", "?commands set terminal emf", "?set terminal emf", *************** *** 1812,1816 **** --- 1813,1862 ---- " Examples:", " set terminal emf 'Times Roman Italic, 12'", " set terminal emf dashed # otherwise all lines are solid" + #else /* JAPANESE_DOC */ + "1 emf", + "?commands set terminal emf", + "?set terminal emf", + "?set term emf", + "?terminal emf", + "?term emf", + "?emf", + " `emf` ɥ饤Ф EMF (Enhanced Metafile Format) եޤ", + " ηΥե¿ MS-Windows ץꥱǧǤޤ", + "", + " :", + " set terminal emf {color | monochrome} {solid | dashed}", + " {enhanced {noproportional}}", + " {rounded | butt}", + " {linewidth <LW>} {dashlength <DL>}", + " {size XX,YY} {background <rgb_color>}", + " {font \"<fontname>{,<fontsize>}\"}", + " {fontscale <scale>}", + "", + " `monochorome` ⡼ɤޤΥѥ۴ĤǤФޤ", + " `color` ⡼ɤޤ򤤤ĤοǤФ٤Ƥ 8 ĤΥǥե", + " ȿȤĤˤΤѥѲޤ", + " `solid` Ƥǽ񤭡ΥѥɤĤ֤ޤ", + " `linewidth <factor>` Ƥ򤳤ǻꤹܤˤޤ", + " `dashlength <factor>` ϡˤǤ礦", + " `<fontname>` ϥե̾", + " `<fontsize>` ϥݥñ̤ǤΥեȤ礭Ǥ", + "", + " ϲηŪ (̾Ф) ϡǥեȤǤŬñ̤Ǥ", + " 1024x768 ˤʤäƤޤץ `size` Ȥä̤ʷŪʥ", + " Ǥޤ", + "", + " ĥʸ⡼ (enhanced text mode) ϡץݡʥʸֳ", + " 褦ȤޤΥڡեȤȤ硢뤤Ϥζ", + " 򹥤ޤʤ硢ץ `noproportional` ȤȤǤ򥪥", + " ˤǤޤ", + "", + " ǥեȤϡ`color dashed font \"Arial,12\" size 1024,768` ǡ", + " `default` 򤹤ƤΥץ󤬤ΥǥեȤͤˤʤޤ", + "", + " :", + " set terminal emf 'Times Roman Italic, 12'", + " set terminal emf color solid # ݤʤɾäƤޤ !" + #endif /* JAPANESE_DOC */ END_HELP(emf) #endif /* TERM_HELP */ diff -rc term/emxvga.trm.ORG term/emxvga.trm *** term/emxvga.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/emxvga.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 475,480 **** --- 475,481 ---- #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(emxvga) + #ifndef JAPANESE_DOC "1 emxvga", "?commands set terminal emxvga", "?set terminal emxvga", *************** *** 506,510 **** --- 507,546 ---- " set terminal vgal", "", " The only option is the vesa mode for `emxvesa`, which defaults to G640x480x256." + #else /* JAPANESE_DOC */ + "1 emxvga", + "?commands set terminal emxvga", + "?set terminal emxvga", + "?set term emxvga", + "?terminal emxvga", + "?term emxvga", + "?emxvga", + "?commands set terminal emxvesa", + "?set terminal emxvesa", + "?set term emxvesa", + "?terminal emxvesa", + "?term emxvesa", + "?emxvesa", + "?commands set terminal vgal", + "?set terminal vgal", + "?set term vgal", + "?terminal vgal", + "?term vgal", + "?vgal", + " `emxvga`, `emxvesa`, `vgal` γƥɥ饤ФϤ줾 SVGA, vesa SVGA,", + " VGA åեåܡɤ PC 򥵥ݡȤޤ DOSޤ", + " OS/2 ǡ\"emx-gcc\" ǥѥ뤵줿뤳ȤտޤƤޤ", + " ˤϤ VESA ѥå SVGAKIT ɬפǤ Johannes", + " Martin (JMARTIN@GOOFY.ZDV.UNI-MAINZ.DE) ݼ餷 David J. Liu", + " (liu@phri.nyu.edu) ĥƤ饤֥Ǥ", + "", + " :", + " set terminal emxvga", + " set terminal emxvesa {vesa-mode}", + " set terminal vgal", + "", + " ͣΥץ `emxvesa` Ф vesa Υ⡼ɤǡǥեȤǤ", + " G640x480x256 ȤʤäƤޤ" + #endif /* JAPANESE_DOC */ END_HELP(emxvga) #endif /* TERM_HELP */ diff -rc term/epson.trm.ORG term/epson.trm *** term/epson.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/epson.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 1090,1095 **** --- 1090,1096 ---- #ifdef TERM_HELP START_HELP(epson_180dpi) + #ifndef JAPANESE_DOC "1 epson_180dpi", "?commands set terminal epson_180dpi", "?set terminal epson_180dpi", *************** *** 1179,1183 **** --- 1180,1277 ---- " Do not use `print`---use instead `copy file /b lpt1:`.", #endif "" + #else /* JAPANESE_DOC */ + "1 epson_180dpi", + "?commands set terminal epson_180dpi", + "?set terminal epson_180dpi", + "?set term epson_180dpi", + "?terminal epson_180dpi", + "?term epson_180dpi", + "?epson_180dpi", + "?commands set terminal epson_60dpi", + "?set terminal epson_60dpi", + "?set term epson_60dpi", + "?terminal epson_60dpi", + "?term epson_60dpi", + "?epson_60dpi", + "?commands set terminal epson_lx800", + "?set terminal epson_lx800", + "?set term epson_lx800", + "?terminal epson_lx800", + "?term epson_lx800", + "?epson_lx800", + "?commands set terminal nec_cp6", + "?set terminal nec_cp6", + "?set term nec_cp6", + "?terminal nec_cp6", + "?term nec_cp6", + "?nec_cp6", + "?commands set terminal okidata", + "?set terminal okidata", + "?set term okidata", + "?terminal okidata", + "?term okidata", + "?okidata", + "?commands set terminal starc", + "?set terminal starc", + "?set term starc", + "?terminal starc", + "?term starc", + "?starc", + "?commands set terminal tandy_60dpi", + "?set terminal tandy_60dpi", + "?set term tandy_60dpi", + "?terminal tandy_60dpi", + "?term tandy_60dpi", + "?tandy_60dpi", + "?commands set terminal dpu414", + "?set terminal dpu414", + "?set term dpu414", + "?terminal dpu414", + "?term dpu414", + "?dpu414", + " Υɥ饤Фϥץץ󥿤ΤĤȤΤ򥵥ݡ", + " ޤ", + "", + " `epson_180dpi` `epson_60dpi` Ϥ줾 180dpi (ɥå/),", + " 60dpi β٤ Epson LQ 24 ԥץѤΥɥ饤ФǤ", + "", + " `epson_lx800` Epson LX-800, Star NL-10 NX-1000, PROPRINTER ", + " ɤŬʥץ󥿤ήѤǤ롢Ū 9 ԥץ󥿥ɥ饤ФǤ", + "", + " `nec_cp6` NEC CP6 Epson LQ-800 ʤɤΥץ󥿤ǻȤ롢Ū", + " 24 ԥץѤΥɥ饤ФǤ", + "", + " `okidata` ɥ饤Ф 9 ԥ OKIDATA 320/321 ɸץ󥿤򥵥ݡȤ", + " ޤ", + "", + " `starc` ɥ饤Ф Star 顼ץѤǤ", + "", + " `tandy_60dpi` ɥ饤Ф 9 ԥ 60dpi Tandy DMP-130 ꡼ѤǤ", + "", + " `dpu414` ɥ饤Ф Seiko DPU-414 ǮץѤǤ", + "", + " `nec_cp6` ˤϥץ󤬤ޤ:", + "", + " :", + " set terminal nec_cp6 {monochrome | colour | draft}", + "", + " ǥեȤǤ (monochrome) Ǥ", + "", + " `dpu414` ˤϥץ󤬤ޤ:", + "", + " :", + " set terminal dpu414 {small | medium | large} {normal | draft}", + "", + " ǥեȤ medium (= եȥ) normal Ǥ", + " Ȥ߹碌ϡ`medium normal` `small draft` Ǥ", + #ifdef MSDOS + "", + " Υɥ饤ФΤ줾 PC ǰϥХʥꥳԡɬ", + " Ǥ`print` ȤäƤϤޤ󡣤 `copy file /b lpt1:`", + " ȤƤ", + #endif + "" + #endif /* JAPANESE_DOC */ END_HELP(epson_180dpi) #endif /* TERM_HELP */ diff -rc term/excl.trm.ORG term/excl.trm *** term/excl.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/excl.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 273,278 **** --- 273,279 ---- #ifdef TERM_HELP START_HELP(excl) + #ifndef JAPANESE_DOC "1 excl", "?commands set terminal excl", "?set terminal excl", *************** *** 282,286 **** --- 283,298 ---- "?excl", " The `excl` terminal driver supports Talaris printers such as the EXCL Laser", " printer and the 1590. It has no options." + #else /* JAPANESE_DOC */ + "1 excl", + "?commands set terminal excl", + "?set terminal excl", + "?set term excl", + "?terminal excl", + "?term excl", + "?excl", + " `excl` ɥ饤Ф EXCL 졼ץ󥿡 1590 Τ褦 Talaris ץ", + " 󥿤򥵥ݡȤޤץϤޤ" + #endif /* JAPANESE_DOC */ END_HELP(excl) #endif diff -rc term/fig.trm.ORG term/fig.trm *** term/fig.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/fig.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 1290,1295 **** --- 1290,1296 ---- #ifdef TERM_HELP START_HELP(fig) + #ifndef JAPANESE_DOC "1 fig", "?commands set terminal fig", "?set terminal fig", *************** *** 1381,1386 **** --- 1382,1482 ---- "", " To plot the error bars on top of the circles use", " plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 2554" + #else /* JAPANESE_DOC */ + "1 fig", + "?commands set terminal fig", + "?set terminal fig", + "?set term fig", + "?terminal fig", + "?term fig", + "?fig", + "?xfig", + " `fig` ɥ饤Ф Fig եåǤνϤޤ", + "", + " :", + " set terminal fig {monochrome | color}", + " {landscape | portrait}", + " {small | big | size <xsize> <ysize>}", + " {metric | inches}", + " {pointsmax <max_points>}", + " {solid | dashed}", + " {font \"<fontname>{,<fontsize>}\"}", + " {textnormal | {textspecial texthidden textrigid}}", + " {{thickness|linewidth} <units>}", + " {depth <layer>}", + " {version <number>}", + "", + " `monochrome` `color` ˤ뤫 `color` ˤ뤫ꤷ", + " ޤ`small` `big` ϡǥեȤ `landscape` ⡼ɤǤϥդ", + " 5x3 ˤ뤫 8x5 ˤ뤫`portrait` ⡼ɤǤ 3x5 ", + " ˤ뤫 5x8 ˤ뤫ꤷޤ`size` ϰϤ", + " <xsize>*<ysize> (ѹ) ޤξñ̤ϡ`inches` ", + " `metric` ˤäƤ줾쥤᡼ȥ뤫ˤʤޤ", + " \"xfig\" ǤԽФǥեȤñ̤ȤƤȤޤ", + "", + " `pointsmax <max_points>` ޤκꤷޤ", + "", + " `solid` ϡ (solid) linestyle ȤƤޤäǼưŪ", + " ˻ȤλѤ̤ʷɽޤ", + "", + " `font` ϡƥȥեȥե̾ <fontname> ˡեȥ", + " <fontsize> ݥȤꤷޤ`textnormal` ϥƥȥե饰", + " ꥻåȤ postscript եȤ򤷡`textspecial` ϥƥȥե", + " LaTeX special ꤷ`texthidden`, `textrigid` Ϥ줾̵ɽ", + " Υƥȡ󥰤ʤƥѤΥե饰ꤷޤ", + "", + " `depth` ƤʸФ롢Ťʤ˴ؤǥեȤο", + " (depth layer) ꤷޤǥեȤο 10 ǡ\"xfig\" ǥ", + " ξ˲񤭤뤿;ϤĤƤޤ", + "", + " `version` fig Ϥν񼰥Сꤷޤߤϡ", + " С 3.1 3.2 ΤߤݡȤƤޤ", + "", + " `thickness` ϥǥեȤꤷꤵʤ 1 ˤʤ", + " ѹϡ`plot` ޥɤ `linetype` ͤ 100 ܤοä", + " 뤳ȤǼ¸ǤޤƱͤˡ(ǥեȤοФ) Ǥ", + " ͤ <linetype> 1000 ܤοä뤳ȤǤޤä", + " ο <layer>+<linetype>/1000 ˤʤꡢ (<linetype>%1000)", + " /100 Ȥʤޤͤ 0 ξϥǥեȤˤʤޤ", + " `linewidth` `thickness` ƱǤ", + "", + " `plot` ޥɤ `point` ˤκݤε `fig` ɥ饤", + " Фɲä뤳ȤǤޤλ (`pointtype` ) % 100 ", + " 50 ʾͤȤ졢ɤĤ֤ǻ <pointtype> % 5 ͤ", + " سԤϹ (<pointtype> % 10 < 5 ξ) ޤϸߤοǽ񤫤", + " ޤѲǽʵϰʲ̤Ǥ", + " 50 - 59: ", + " 60 - 69: ", + " 70 - 79: Ҥ", + " 80 - 89: λѷ", + " 90 - 99: λѷ", + " ε礭ϥեȤ礭ȴطƤޤǥեȤǤ", + " οϡɤ顼С¸뤿ˡο 1 ", + " ͤˤʤäƤޤ<pointtype> 1000 礭硢 <layer>", + " +<pointtype>/1000-1 ˤʤޤ<pointtype>%1000 100 礭", + " ɤĤ֤ (<pointtype>%1000)/100-1 ˤʤޤ", + "", + " ͭɤĤ֤ (1 9) ϡġС忧֡硢򡢰", + " (⡼ɤǤ 1 6 ޤǤϹ 7 9 ޤǤ) Ǥ", + "", + " <linetype> <pointtype> ξܺ٤ˤĤƤϡʲ: `plot with`", + "", + " `big` ץϰΥС `bfig` ɥ饤ФʤǤ", + " Υɥ饤ФϺϤ⤦ݡȤƤޤ", + "", + " :", + " set terminal fig monochrome small pointsmax 1000 # ǥե", + "", + " plot 'file.dat' with points linetype 102 pointtype 759", + " ϡɤĤ֤줿ߤسԤ 1 ĤǤ", + "", + " plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 554", + " Ϲˤ륨顼С֤ɤĤ֤줿ߤޤαߤ", + " 1 ؤˤʤޤ (ǥեȤǤϿ 9)", + "", + " ߤξ˥顼С񤯤ˤϰʲΤ褦ˤƤ", + " plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 2554" + #endif /* JAPANESE_DOC */ END_HELP(fig) #endif /* TERM_HELP */ diff -rc term/gd.trm.ORG term/gd.trm *** term/gd.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/gd.trm 2012-01-22 14:37:58.000000000 +0900 *************** *** 2343,2348 **** --- 2343,2349 ---- #ifndef JPEG_HELP_ONLY #ifdef TERM_HELP START_HELP(png) + #ifndef JAPANESE_DOC "1 png", "?commands set terminal png", "?set terminal png", *************** *** 2424,2429 **** --- 2425,2515 ---- " Use 24 bits of color information per pixel, with a transparent background.", " Use the `enhanced text` mode to control the layout of strings to be printed.", "" + #else /* JAPANESE_DOC */ + "1 png", + "?commands set terminal png", + "?set terminal png", + "?set term png", + "?terminal png", + "?term png", + "?png", + " :", + " set terminal png ", + " {{no}enhanced}", + " {{no}transparent} {{no}interlace}", + " {{no}truecolor} {rounded|butt}", + " {linewidth <lw>} {dashlength <dl>}", + " {tiny | small | medium | large | giant}", + " {font \"<face> {,<pointsize>}\"} {fontscale <scale>}", + " {size <x>,<y>} {{no}crop}", + " {background <rgb_color>}", + "", + " PNG, JPEG, GIF ϡ饤֥ libgd ȤäޤPNG", + " ϡImageMagick ѥåΥե 'display' ˤνϤʲ", + " 褦˥ѥפϤȤŪɽ뤳ȤǤޤ:", + " set term png", + " set output '| display png:-'", + " 襳ޥɤνϤϡdisplay ɥŪ <space>", + " ǤĤȤǸ뤳ȤǤޤߤե¸ˤϡ", + " display ɥǺå`save` 򤷤Ƥ", + "", + " `transparent` ϡɥ饤ФطʿƩ (transparent) Ԥ褦", + " ޤǥեȤ `notransparent` Ǥ", + "", + " `interlace` ϡɥ饤Ф˥󥿡졼 GIF 褦ؼޤ", + " ǥեȤ `nointerlace` Ǥ", + "", + " ץ `linewidth` `dashlength` ϳΨǡ褵뤹٤Ƥ", + " ˱ƶͿޤʤ͡襳ޥɤ׵ᤵ", + " ˳ݻޤ", + "", + " ǥեȤǤϡϤ PNG 256 Ĥֹդ줿Ѥ", + " ޤ˥ץ `truecolor` ȤС24 ӥå/ԥο", + " TrueColor ޤƩɤĤ֤ (transparent", + " fill) ѤȤϡΥץ `truecolor` ɬפˤʤޤ", + " ʲ: `fillstyle`طʤƩϡֹդ TrueColor ", + " ǽǤ", + "", + " `butt` ʬǡüǤΤϤߤ򵯤ʤ᥽å", + " Ȥ褦ɥ饤Ф˻ؼޤϡ 1 礭", + " ΤͭǤϡʿľξͭѤǤ礦", + " ǥեȤ `rounded` (ݤ) Ǥ", + "", + " եȤξܺ٤ϡʣǤ", + " ʲƱ̣Ĵñ򼨤ޤ:", + " set term png font arial 11", + " set term png font \"arial,11\"", + " ܤˤĤƤϡ`fonts` βγ륻򻲾ȤƤ", + " ", + "", + " 襵 <x,y> ϥԥñ̤ͿޤǥեȤ 640x480 ", + " ʲ⻲: `canvas`, `set size`", + " 轪λü;ϡץ `crop` ǼȤǤη", + " ̤ȤƤβϾʤޤǥեȤ `nocrop` Ǥ", + "", + " طʿ 'xrrggbb' ηǻꤷޤǡx ϤΤޤʸ 'x' ", + " ̣'rrggbb' ֡СĤ 16 ʿǤʬǤ㤨 'x00ff00'", + " Фɽޤطʿʳɲäο侩Ǥ", + "", + "2 ", + "?set term png examples", + " set terminal png medium size 640,480 xffffff", + "", + " medium Ρ礭ѹǽDzžǤʤȤ߹ߥե", + " ѤƩʤطʿȤ (xffffff) Ѥޤ", + "", + " set terminal png font arial 14 size 800,600", + "", + " ϡ'arial' Ȥե̾Υ֥եȤ򸡺ե", + " ȥ 14pt ꤷޤեȤθɤΤ褦˹Ԥ뤫ˤ", + " Ƥϰʲ: `fonts`", + "", + " set terminal png transparent truecolor enhanced", + "", + " ϡ24 ӥå/ԥοѤطʤƩޤ", + " ɽʸȤ `enhanced text` ⡼ɤѤޤ", + "" + #endif /* JAPANESE_DOC */ END_HELP(png) #endif /* TERM_HELP */ #endif /* JPEG_HELP_ONLY */ *************** *** 2499,2504 **** --- 2585,2591 ---- #ifdef TERM_HELP START_HELP(jpeg) + #ifndef JAPANESE_DOC "1 jpeg", "?commands set terminal jpeg", "?set terminal jpeg", *************** *** 2551,2556 **** --- 2638,2696 ---- " in hexadecimal. For example, 'x00ff00' is green. The specification of", " additional colors other than the background is deprecated.", "" + #else /* JAPANESE_DOC */ + "1 jpeg", + "?commands set terminal jpeg", + "?set terminal jpeg", + "?set term jpeg", + "?terminal jpeg", + "?term jpeg", + "?jpeg", + " :", + " set terminal jpeg ", + " {{no}enhanced}", + " {{no}interlace}", + " {linewidth <lw>} {dashlength <dl>} {rounded|butt}", + " {tiny | small | medium | large | giant}", + " {font \"<face> {,<pointsize>}\"} {fontscale <scale>}", + " {size <x>,<y>} {{no}crop}", + " {background <rgb_color>}", + "", + " PNG, JPEG, GIF ϡ饤֥ libgd Ȥäޤ", + " ξ硢ñʤ PNG ƤơGIF ϥ˥᡼Ѥ", + " »ξʤǡ»Τ JPEG β", + " ޤϡä˥٥ɤ٤طʤǤΥ顼μĤޤ", + " ޤ gnuplot ŵŪʲФƤդ٤ȤǤ", + "", + " ץ `interlace` ϡץå JPEG ޤǥ", + " Ȥ `nointerlace` Ǥ", + "", + " ץ `linewidth` `dashlength` ϳΨǡ褵뤹٤Ƥ", + " ˱ƶͿޤʤ͡襳ޥɤ׵ᤵ", + " ˳ݻޤ", + "", + " `butt` ʬǡüǤΤϤߤ򵯤ʤ᥽å", + " Ȥ褦ɥ饤Ф˻ؼޤϡ 1 礭", + " ΤͭǤϡʿľξͭѤǤ礦", + " ǥեȤ `rounded` (ݤ) Ǥ", + "", + " եȤξܺ٤ϡʣǤ", + " ʲƱ̣Ĵñ򼨤ޤ:", + " set term jpeg font arial 11", + " set term jpeg font \"arial,11\"", + " ܤˤĤƤϡ`fonts` βγ륻򻲾ȤƤ", + " ", + "", + " 襵 <x,y> ϥԥñ̤ͿޤǥեȤ 640x480 ", + " ʲ⻲: `canvas`, `set size`", + " 轪λü;ϡץ `crop` ǼȤǤη", + " ̤ȤƤβϾʤޤǥեȤ `nocrop` Ǥ", + "", + " طʿ 'xrrggbb' ηǻꤷޤǡx ϤΤޤʸ 'x' ", + " ̣'rrggbb' ֡СĤ 16 ʿǤʬǤ㤨 'x00ff00'", + " Фɽޤطʿʳɲäο侩Ǥ", + "" + #endif /* JAPANESE_DOC */ END_HELP(jpeg) #endif /* TERM_HELP */ #endif /* HAVE_GD_JPEG */ *************** *** 2653,2658 **** --- 2793,2799 ---- #ifdef TERM_HELP START_HELP(gif) + #ifndef JAPANESE_DOC "1 gif", "?commands set terminal gif", "?set terminal gif", *************** *** 2754,2759 **** --- 2895,3008 ---- " frames of the animation sequence are created by the script file animate2.dem", " from the standard collection of demos.", "" + #else /* JAPANESE_DOC */ + "1 gif", + "?commands set terminal gif", + "?set terminal gif", + "?set term gif", + "?terminal gif", + "?term gif", + "?gif", + " :", + " set terminal gif ", + " {{no}enhanced}", + " {{no}transparent} {rounded|butt}", + " {linewidth <lw>} {dashlength <dl>}", + " {tiny | small | medium | large | giant}", + " {font \"<face> {,<pointsize>}\"} {fontscale <scale>}", + " {size <x>,<y>} {{no}crop}", + " {animate {delay <d>} {loop <n>} {{no}optimize}}", + " {background <rgb_color>}", + "", + " PNG, JPEG, GIF ϡ饤֥ libgd ȤäޤGIF", + " ϡImageMagick ѥåΥե 'display' ˤνϤʲ", + " 褦˥ѥפϤȤŪɽ뤳ȤǤޤ:", + + " set term gif", + " set output '| display gif:-'", + " 襳ޥɤνϤϡdisplay ɥŪ <space>", + " ǤĤȤǸ뤳ȤǤޤߤե¸ˤϡ", + " display ɥǺå`save` 򤷤Ƥ", + "", + " `transparent` ϡɥ饤ФطʿƩ (transparent) Ԥ褦", + " ޤǥեȤ `notransparent` Ǥ", + "", + " ץ `linewidth` `dashlength` ϳΨǡ褵뤹٤Ƥ", + " ˱ƶͿޤʤ͡襳ޥɤ׵ᤵ", + " ˳ݻޤ", + "", + " `butt` ʬǡüǤΤϤߤ򵯤ʤ᥽å", + " Ȥ褦ɥ饤Ф˻ؼޤϡ 1 礭", + " ΤͭǤϡʿľξͭѤǤ礦", + " ǥեȤ `rounded` (ݤ) Ǥ", + "", + " եȤξܺ٤ϡʣǤ", + " ʲƱ̣Ĵñ򼨤ޤ:", + " set term gif font arial 11", + " set term gif font \"arial,11\"", + " ܤˤĤƤϡ`fonts` βγ륻򻲾ȤƤ", + " ", + "", + " ץ `animate` Ϥʤμ긵ˤ gd 饤֥꤬˥᡼", + " gif κ򥵥ݡȤˤΤͭǤɽ", + " ֤ϡ1/100 ñ̤ǻǤޤ (ǥեȤ 5)ºݤɽ", + " ֤ϡѤɽեȤˤäѲޤ", + " ˥᡼η֤ǤޤǥեȤ 0 Ǥ", + " ̵¤η֤̣ޤ", + " ˥᡼ϡ `set output` `set term` ޥɤˤ", + " ƽλޤץ `optimize` ϡ˥᡼˴ؤ 2 Ĥ", + " ̤ޤ", + "", + " 1) ˥᡼Τ̤ñΥ顼ޥåפѤޤ", + " ˥᡼ƤΥե졼ǻѤƤοǽΥե졼", + " Ƥɬפޤ", + "", + " 2) ǽʤСġΥե졼ǰΥե졼Ȱ㤦ʬΤߤ˥", + " ե¸ޤϥե륵򾮤Ƥ", + " ޤƩǽѤƤˤƯʤ⤷ޤ", + "", + " ξκŬϤ꾮νϥեȤ", + " Ǥ¿ʬθ̤ϡĹ˥᡼󤫤ޤϥե졼ॵ", + " ȤƤ⾮ʾˤΤ̣߰٤Ǥ礦", + " ץ `nooptimize` Ϥθ̤򤤤̵ˤޤƥե", + " ϡġΥ顼ޥå (ץ饤١ȥ顼ޥå) Ȥݤ", + " ¸ƤޤդƤޤŬƤʤ˥", + " եϳ桼ƥƥȤäƸ뤳ȤǤޤ", + " θˤä gnuplot κŬ⾮ʥե뤬", + " 뤫⤷ޤ", + " ǥեȤǤ `nooptimize` Ǥ", + "", + " 襵 <x,y> ϥԥñ̤ͿޤǥեȤ 640x480 ", + " ʲ⻲: `canvas`, `set size`", + " 轪λü;ϡץ `crop` ǼȤǤη", + " ̤ȤƤβϾʤޤǥեȤ `nocrop` Ǥ", + "", + " طʿ 'xrrggbb' ηǻꤷޤǡx ϤΤޤʸ 'x' ", + " ̣'rrggbb' ֡СĤ 16 ʿǤʬǤ㤨 'x00ff00'", + " Фɽޤطʿʳɲäο侩Ǥ", + "", + "2 ", + "?set term gif examples", + " set terminal gif medium size 640,480 xffffff", + "", + " medium Ρ礭ѹǽDzžǤʤȤ߹ߥե", + " ѤƩʤطʿȤ (xffffff) Ѥޤ", + "", + " set terminal gif font arial 14 enhanced", + "", + " ϡ'arial' Ȥե̾Υ֥եȤ򸡺ե", + " ȥ 14pt ꤷޤեȤθɤΤ褦˹Ԥ뤫ˤ", + " Ƥϰʲ: `fonts`ϥ֥եȤʤΤǡĥʸ", + " ⡼ɤѤǤޤ", + "", + " set term gif animate transparent opt delay 10 size 200,200 x000000", + " load \"animate2.dem\"", + "", + " ϡ˥᡼ GIF եκѤ gif Ϸ򳫤ޤ", + " ˥᡼θġΥե졼ϡɸǥե뽸ˤ륹ץ", + " ե animate2.dem ˤäޤ", + "" + #endif /* JAPANESE_DOC */ END_HELP(gif) #endif /* TERM_HELP */ #endif /* HAVE_GD_GIF */ diff -rc term/ggi.trm.ORG term/ggi.trm *** term/ggi.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/ggi.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 1504,1509 **** --- 1504,1510 ---- #ifdef TERM_HELP START_HELP(ggi) + #ifndef JAPANESE_DOC "1 ggi", "?commands set terminal ggi", "?set terminal ggi", *************** *** 1537,1541 **** --- 1538,1578 ---- " set term ggi acc 10", " set term ggi acc 1 mode V1024x768", " set term ggi V1024x768" + #else /* JAPANESE_DOC */ + "1 ggi", + "?commands set terminal ggi", + "?set terminal ggi", + "?set term ggi", + "?terminal ggi", + "?term ggi", + "?ggi", + " `ggi` ɥ饤Ф X svgalib Τ褦ʰۤʤ륿åȾưޤ", + "", + " :", + " set terminal ggi [acceleration <integer>] [[mode] {mode}]", + "", + " X Ǥϡɥޥ͡εǽȤäƥɥΥѹ", + " ȤϤǤޤ󤬡⡼ɤ mode ץȤäơ㤨аʲΤ褦", + " ѹ뤳ȤǤޤ:", + " - V1024x768", + " - V800x600", + " - V640x480", + " - V320x200", + " ¾Υ⡼ɤˤĤƤϡggi (libggi) ΥɥȤ򻲾ȤƤ", + "  `mode` ɲäƤ⤷ʤƤ빽Ǥlibggi Υޥ˥奢", + " ڡǾҲ𤵤Ƥ褦ˡĶѿǥåȤ򤹤뤳Ȥ򤪴", + " ᤷޤX DGA Ȥʤ顢㤨аʲΤ褦ˤƤ", + " bash> export GGI_DISPLAY=DGA", + " csh> setenv GGI_DISPLAY DGA", + "", + " `acceleration` ϡŪʥݥư٥Ȥȯ륿å", + " (㤨 DGA) ǤΤ߻Ѥ졢ŪʵΥФΨ (Ѱ", + " ) ɽޤǥեȤ acceleration 7 Ǥ", + "", + " :", + " set term ggi acc 10", + " set term ggi acc 1 mode V1024x768", + " set term ggi V1024x768" + #endif /* JAPANESE_DOC */ END_HELP(ggi) #endif diff -rc term/gpic.trm.ORG term/gpic.trm *** term/gpic.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/gpic.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 294,299 **** --- 294,300 ---- #ifdef TERM_HELP START_HELP(gpic) + #ifndef JAPANESE_DOC "1 gpic", "?commands set terminal gpic", "?set terminal gpic", *************** *** 355,359 **** --- 356,425 ---- " .PS 6.0", " copy \"trig.pic\"", " .PE" + #else /* JAPANESE_DOC */ + "1 gpic", + "?commands set terminal gpic", + "?set terminal gpic", + "?set term gpic", + "?terminal gpic", + "?term gpic", + "?gpic", + " `gpic` ɥ饤Ф FSF (the Free Software Foundations) \"groff\" ѥ", + " GPIC ΥդޤǥեȤ礭 5 x 3", + " Ǥץϸ˴ؤΤΤߤǡǥեȤǤ (0,0)", + " Ǥ", + "", + " :", + " set terminal gpic {<x> <y>}", + "", + " `x` `y` ñ̤ϥǤ", + "", + " ñʥդˤϰʲΤ褦ˤޤ", + "", + " groff -p -mpic -Tps file.pic > file.ps", + "", + " pic νϤϥѥפ eqn ϤȤǤΤǡ'set label' ", + " `set {x/y}label` ޥɤǥդʣʴؿμ뤳Ȥǽ", + " 㤨С", + "", + " set ylab '@space 0 int from 0 to x alpha ( t ) roman d t@'", + "", + " ȤСʲΥޥɤˤä y ʬФդޤ", + "", + " gpic filename.pic | geqn -d@@ -Tps | groff -m[macro-package] -Tps", + " > filename.ps", + "", + " Τ褦ˤƺ줿ޤʸƤϤޤ褦˿̤뤳Ȥ", + " ޤpic ϴñǤΤǡɬפʤưפ˥դľԽ", + " Ǥޤ`gnuplot` Ǻ pic եƤκɸ x+gnuplotx,", + " y+gnuploty ηͿޤǥեȤǤ x, y ͤ 0 Ǥ", + " ĤΥեФƤ x,y 0 ꤷƤԤСʲ", + " Τ褦ˤʣΥդĤοޤƤޤȤǤޤ (", + " եȤ礭 5.0x3.0 ):", + "", + " .PS 8.0", + " x=0;y=3", + " copy \"figa.pic\"", + " x=5;y=3", + " copy \"figb.pic\"", + " x=0;y=0", + " copy \"figc.pic\"", + " x=5;y=0", + " copy \"figd.pic\"", + " .PE", + "", + " ϡ 2 ġĤ 2 Ĥ¤ 4 ĤΥդʤ롢8 ", + " ιοޤޤ", + "", + " ʲΥޥɤǤƱȤǤޤ", + "", + " set terminal gpic x y", + "", + " 㤨аʲΤ褦˻Ȥޤ", + "", + " .PS 6.0", + " copy \"trig.pic\"", + " .PE" + #endif /* JAPANESE_DOC */ END_HELP(gpic) #endif /* TERM_HELP */ diff -rc term/grass.trm.ORG term/grass.trm *** term/grass.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/grass.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 624,629 **** --- 624,630 ---- #ifdef TERM_HELP START_HELP(grass) + #ifndef JAPANESE_DOC "1 grass", "?commands set terminal grass", "?set terminal grass", *************** *** 635,639 **** --- 636,653 ---- " GRASS geographic information system. Contact grassp-list@moon.cecer.army.mil", " for more information. Pages are written to the current frame of the GRASS", " Graphics Window. There are no options." + #else /* JAPANESE_DOC */ + "1 grass", + "?commands set terminal grass", + "?set terminal grass", + "?set term grass", + "?terminal grass", + "?term grass", + "?grass", + " `grass` ɥ饤Ф GRASS 󥷥ƥΥ桼 `gnuplot` Ѥ", + " 뤳ȤǽˤޤܤˤĤƤ grassp-list@moon.cecer.army.mil", + " ϢäƤڡ GRASS եɥθߤΥե졼", + " ˽񤫤ޤץϤޤ" + #endif /* JAPANESE_DOC */ END_HELP(grass) #endif diff -rc term/hp26.trm.ORG term/hp26.trm *** term/hp26.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/hp26.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 691,696 **** --- 691,697 ---- #ifdef TERM_HELP START_HELP(hp2623a) + #ifndef JAPANESE_DOC "1 hp2623a", "?commands set terminal hp2623a", "?set terminal hp2623a", *************** *** 700,704 **** --- 701,716 ---- "?hp2623a", " The `hp2623a` terminal driver supports the Hewlett Packard HP2623A. It has", " no options." + #else /* JAPANESE_DOC */ + "1 hp2623a", + "?commands set terminal hp2623a", + "?set terminal hp2623a", + "?set term hp2623a", + "?terminal hp2623a", + "?term hp2623a", + "?hp2623a", + " `hp2623a` ɥ饤Фϥҥ塼åȥѥå (Hewlett Packard) HP2623A", + " 򥵥ݡȤޤץϤޤ" + #endif /* JAPANESE_DOC */ END_HELP(hp2623a) #endif diff -rc term/hp2648.trm.ORG term/hp2648.trm *** term/hp2648.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/hp2648.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 188,193 **** --- 188,194 ---- #ifdef TERM_HELP START_HELP(hp2648) + #ifndef JAPANESE_DOC "1 hp2648", "?commands set terminal hp2648", "?set terminal hp2648", *************** *** 197,201 **** --- 198,213 ---- "?hp2648", " The `hp2648` terminal driver supports the Hewlett Packard HP2647 and HP2648.", " It has no options." + #else /* JAPANESE_DOC */ + "1 hp2648", + "?commands set terminal hp2648", + "?set terminal hp2648", + "?set term hp2648", + "?terminal hp2648", + "?term hp2648", + "?hp2648", + " `hp2648` ɥ饤Фϥҥ塼åȥѥå (Hewlett Packard) HP2647 ", + " HP2648 򥵥ݡȤޤץϤޤ" + #endif /* JAPANESE_DOC */ END_HELP(hp2648) #endif diff -rc term/hp500c.trm.ORG term/hp500c.trm *** term/hp500c.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/hp500c.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 527,532 **** --- 527,533 ---- #ifdef TERM_HELP START_HELP(hp500c) + #ifndef JAPANESE_DOC "1 hp500c", "?commands set terminal hp500c", "?set terminal hp500c", *************** *** 544,548 **** --- 545,569 ---- " or \"tiff\". Any other inputs are replaced by the defaults, which are 75 dpi", " and no compression. Rasterization at the higher resolutions may require a", " large amount of memory." + #else /* JAPANESE_DOC */ + "1 hp500c", + "?commands set terminal hp500c", + "?set terminal hp500c", + "?set term hp500c", + "?terminal hp500c", + "?term hp500c", + "?hp500c", + " `hp500c` ɥ饤Фϥҥ塼åȥѥå (Hewlett Packard) Ҥ HP", + " DeskJet 500c 򥵥ݡȤޤˤϲ٤Ȱ̤˴ؤ륪ץ", + " ޤ", + "", + " :", + " set terminal hp500c {<res>} {<comp>}", + "", + " `res` 75, 100, 150, 300 Τ줫β (DPI; dots per", + " inch) ǡ`comp` \"rle\" \"tiff\" Ǥ¾򤹤Ȥϥǥե", + " ȤͤˤʤޤǥեȤ 75 dpi ǰ̤ϤʤǤ٤Ǥ", + " 饹饤ϤΥɬפȤޤ" + #endif /* JAPANESE_DOC */ END_HELP(hp500c) #endif /* TERM_HELP */ diff -rc term/hpgl.trm.ORG term/hpgl.trm *** term/hpgl.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/hpgl.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 2611,2616 **** --- 2611,2617 ---- #endif /* TERM_PROTO_ONLY */ #ifdef TERM_HELP START_HELP(hpgl) + #ifndef JAPANESE_DOC "1 hpgl", "?commands set terminal hpgl", "?set terminal hpgl", *************** *** 2688,2692 **** --- 2689,2774 ---- " to bother with `set encoding`.", "", " HPGL graphics can be imported by many software packages." + #else /* JAPANESE_DOC */ + "1 hpgl", + "?commands set terminal hpgl", + "?set terminal hpgl", + "?set term hpgl", + "?terminal hpgl", + "?term hpgl", + "?hpgl", + "?commands set terminal pcl5", + "?set terminal pcl5", + "?set term pcl5", + "?terminal pcl5", + "?term pcl5", + "?pcl5", + " `hpgl` ɥ饤Ф HP7475A ץåΤ褦Ѥ HPGL ϤԤʤ", + " 2 Ĥǽʥץޤ: ϥڥο `eject`", + " ץǡ\"eject\" ˥ץå˥ڡӽФ褦ؼ", + " ǥեȤǤ 6 ĤΥڥȤΥڡӽФϹԤʤޤ", + "", + " Ūʸå ISO-8859-1 CP850 `set encoding iso_8859_1` ", + " `set encoding cp850` ǧ뤳ȤǤޤ (ܺ٤ϡʲ:", + " `set encoding`)", + "", + " :", + " set terminal hpgl {<number_of_pens>} {eject}", + "", + " ʲ", + "", + " set terminal hpgl 8 eject", + "", + " ϡ `hp7550` ɥ饤ФƱǡ", + "", + " set terminal hpgl 4", + "", + " ϡ `hp7580b` ɥ饤ФƱǤ", + "", + " `pcl5` ɥ饤ФϡHewlett-Packard Designjet 750CHewlett-Packard", + " Laserjet III, Hewlett-Packard Laserjet IV Τ褦ʥץå򥵥ݡȤ", + " ޤϼºݤˤ HPGL-2 ѤƤΤǤִ֤̾ξ", + " ޤΥɥ饤ФˤϤĤΥץ󤬤ޤ", + " ʲ˼ǻꤷʤФޤ:", + "", + " :", + " set terminal pcl5 {mode <mode>} {<plotsize>}", + " {{color {<number_of_pens>}} | monochrome} {solid | dashed}", + " {font <font>} {size <fontsize>} {pspoints | nopspoints}", + "", + " <mode> `landscape` `portrait` Ǥ<plotsize> ϥդʪŪ", + " 襵ǡϰʲΤΤ줫Ǥ: `letter` ɸ", + " (8 1/2\" X 11\") ϡ`legal` (8 1/2\" X 14\") ϡ`noextended` ", + " (36\" X 48\") (letter )`extended` (36\" X 55\") ", + " (ۤ legal )`color` ʣΥڥ (ʤ顼) Ѥ", + " <number_of_pens> ϥ顼ϤǻѤڥܿ (ʤ) ", + " `monochrome` 1 ܤΥڥ (㤨й) Ǥ`solid` Ƥ", + " `dashed` ϰۤʤ亿ѥʬޤ", + " <font> `stick`, `univers`, `cg_times`, `zapf_dingbats`, `antique_olive`,", + " `arial`, `courier`, `garamond_antigua`, `letter_gothic`, `cg_omega`,", + " `albertus`, `times_new_roman`, `clarendon`, `coronet`, `marigold`,", + " `truetype_symbols`, `wingdings` Τ줫Ǥ<fontsize> ϥݥ", + " ñ̤ǤΥեȤ礭Ǥμ (point type) ϡ`nopspoints` ", + " ꤹ뤳ȤɸŪʥǥեȤ꤫Ǥ褦ˤʤޤ", + " `pspoints` ꤹ postscript terminal Ʊμ꤫", + " Ǥ褦ˤʤޤ", + "", + " ΥץΤĤȤ߹ޤ줿ݡȤϡץ󥿤˰¸", + " 뤳ȤդƤ㤨ƤΥեȤ϶餯 HP Laserjet IV", + " ǤϥݡȤƤǤ礦HP Laserjet III Designjet 750C ", + " 2,3 (㤨 univers, stick) ݡȤƤΤߤǤ礦", + " ޤlaserjet ν֤ʤΤǡǤϥ顼餫˻Ȥ", + " ޤ", + "", + " ǥե: landscape, noextended, color (6 pens), solid, univers, 12", + " point, nopspoints", + "", + " `pcl5` ǤϹŪʸåȤϥץ󥿤ǰޤΤǡƥʸ", + " Ŭڤ 8-bit ʸɤǡ虜虜 `set encoding` Ǽ", + " 򤹤ɬפϤޤ", + "", + " HPGL եå¿ΥեȥѥåǼळȤǽ", + " " + #endif /* JAPANESE_DOC */ END_HELP(hpgl) #endif /* TERM_HELP */ diff -rc term/hpljii.trm.ORG term/hpljii.trm *** term/hpljii.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/hpljii.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 401,406 **** --- 401,407 ---- #ifdef TERM_HELP START_HELP(hpljii) + #ifndef JAPANESE_DOC "1 hpljii", "?commands set terminal hpljii", "?set terminal hpljii", *************** *** 426,430 **** --- 427,459 ---- "", " The `hp500c` terminal is similar to `hpdj`; `hp500c` additionally supports", " color and compression." + #else /* JAPANESE_DOC */ + "1 hpljii", + "?commands set terminal hpljii", + "?set terminal hpljii", + "?set term hpljii", + "?terminal hpljii", + "?term hpljii", + "?hpljii", + "?commands set terminal hpdj", + "?set terminal hpdj", + "?set term hpdj", + "?terminal hpdj", + "?term hpdj", + "?hpdj", + " `hpljii` ɥ饤Ф HP Laserjet Sries II ץ󥿤`hpdj` ɥ饤Ф", + " HP DeskJet 500 ץ󥿤򥵥ݡȤޤΥɥ饤ФǤϡ", + " 򤬲ǽǤ", + "", + " :", + " set terminal hpljii | hpdj {<res>}", + "", + " `res` 75, 100, 150, 300 Τ줫β (DPI; dots per", + " inch) ǡǥեȤ 75 Ǥ٤ǤΥ饹饤ϤΥ", + " ɬפȤޤ", + "", + " `hp500c` ɥ饤Ф `hpdj` ȤۤƱǤ`hp500c` ϲäƥ顼", + " ̤⥵ݡȤƤޤ" + #endif /* JAPANESE_DOC */ END_HELP(hpljii) #endif /* TERM_HELP */ diff -rc term/hppj.trm.ORG term/hppj.trm *** term/hppj.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/hppj.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 273,278 **** --- 273,279 ---- #ifdef TERM_HELP START_HELP(hppj) + #ifndef JAPANESE_DOC "1 hppj", "?commands set terminal hppj", "?set terminal hppj", *************** *** 287,291 **** --- 288,308 ---- " set terminal hppj {FNT5X9 | FNT9X17 | FNT13X25}", "", " with the middle-sized font (FNT9X17) being the default." + #else /* JAPANESE_DOC */ + "1 hppj", + "?commands set terminal hppj", + "?set terminal hppj", + "?set term hppj", + "?terminal hppj", + "?term hppj", + "?hppj", + " `hppj` ɥ饤Ф HP PaintJet HP3630 ץ󥿤򥵥ݡȤޤ", + " ϥեȤ򤹤ΤΤߤǤ", + "", + " :", + " set terminal hppj {FNT5X9 | FNT9X17 | FNT13X25}", + "", + " ֥ե (FNT9X17) ǥեȤǤ" + #endif /* JAPANESE_DOC */ END_HELP(hppj) #endif diff -rc term/imagen.trm.ORG term/imagen.trm *** term/imagen.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/imagen.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 886,891 **** --- 886,892 ---- #ifdef TERM_HELP START_HELP(imagen) + #ifndef JAPANESE_DOC "1 imagen", "?commands set terminal imagen", "?set terminal imagen", *************** *** 908,912 **** --- 909,938 ---- " set terminal imagen portrait [2,3]", "", " puts six graphs on the page in three rows of two in portrait orientation." + #else /* JAPANESE_DOC */ + "1 imagen", + "?commands set terminal imagen", + "?set terminal imagen", + "?set term imagen", + "?terminal imagen", + "?term imagen", + "?imagen", + " `imagen` ɥ饤Ф Imagen 졼ץ󥿤򥵥ݡȤޤ 1 ", + " ʣΥդ֤뤳ȤǽǤ", + "", + " :", + " set terminal imagen {<fontsize>} {portrait | landscape}", + " {[<horiz>,<vert>]}", + "", + " `fontsize` ϥǥեȤǤ 12 ݥȤǡ쥤ȤΥǥեȤ", + " `landscape` Ǥ`<horiz>` `<vert>` ϥդȽ˲", + " ֤ꤷޤΥǥեȤ 1 Ǥ", + "", + " :", + " set terminal imagen portrait [2,3]", + "", + " ϡ1 ڡ 6 ĤΥդ򲣤 2 󡢽Ĥ 3 󡢽֤ (portrait)", + " ֤ޤ" + #endif /* JAPANESE_DOC */ END_HELP(imagen) #endif diff -rc term/kyo.trm.ORG term/kyo.trm *** term/kyo.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/kyo.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 204,209 **** --- 204,210 ---- #ifdef TERM_HELP START_HELP(kyo) + #ifndef JAPANESE_DOC "1 kyo", "?commands set terminal kyo", "?set terminal kyo", *************** *** 220,224 **** --- 221,244 ---- " The `kyo` and `prescribe` terminal drivers support the Kyocera laser printer.", " The only difference between the two is that `kyo` uses \"Helvetica\" whereas", " `prescribe` uses \"Courier\". There are no options." + #else /* JAPANESE_DOC */ + "1 kyo", + "?commands set terminal kyo", + "?set terminal kyo", + "?set term kyo", + "?terminal kyo", + "?term kyo", + "?kyo", + "?commands set terminal prescribe", + "?set terminal prescribe", + "?set term prescribe", + "?terminal prescribe", + "?term prescribe", + "?prescribe", + " `kyo` `prescribe` Υɥ饤Ф Kyocera () 졼ץ󥿤", + " ݡȤޤξԤͣΰ㤤ϡ`kyo` \"Helvetica\" Ȥ", + " Ф `prescribe` \"Courier\" ȤȤǤץϤ", + " ޤ" + #endif /* JAPANESE_DOC */ END_HELP(kyo) #endif diff -rc term/latex.trm.ORG term/latex.trm *** term/latex.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/latex.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 950,955 **** --- 950,956 ---- #ifdef TERM_HELP START_HELP(latex) + #ifndef JAPANESE_DOC "1 latex", "?commands set terminal emtex", "?set terminal emtex", *************** *** 1007,1011 **** --- 1008,1074 ---- " set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'", " The other label -- account for long ticlabels:", " set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}}'" + #else /* JAPANESE_DOC */ + "1 latex", + "?commands set terminal emtex", + "?set terminal emtex", + "?set term emtex", + "?terminal emtex", + "?term emtex", + "?emtex", + "?commands set terminal latex", + "?set terminal latex", + "?set term latex", + "?terminal latex", + "?term latex", + "?latex", + " :", + " set terminal {latex | emtex} {default | {courier|roman} {<fontsize>}}", + " {size <XX>{unit}, <YY>{unit}} {rotate | norotate}", + "", + " ǥեȤǤϡʸΥեȤѤޤ", + " Courier (cmtt) Roman (cmr) եȤΤ줫ˤ륪ץ", + " 󤬻ȤޤκݤϥեȥǤޤ", + " ʤ DVI ɥ饤ФǤդΥΥեȤФȤǤʤ", + " (㤨 dvips)ɸŪ 10, 11, 12 ݥȥǤʤȤ", + " Ǥ", + "", + " METAFONT 桼ؤηٹ: METAFONT ̯ʥϹߤޤ", + "", + " LaTeX ˴ؤƤΥɥ饤Фʸ֤̤ˡ󶡤", + " : '{' ǻϤޤʸϡ'}' Ĥɬפޤʸ", + " ʿˤľˤ⥻󥿥󥰤ޤ'[' ǻϤޤʸξ", + " ϡ֤λ򤹤ʸ (t,b,l,r Τ 2 Ĥޤ) ³", + " ']{'ʸΡǺǸ '}' Ȥޤʸ LaTeX LR-box", + " Ȥޤ'\\rule{}{}' ȤФɤֹ碌ǽǤ", + " ", + "", + " ǡ (point) ϡLaTeX Υޥ \"\\Diamond\" \"\\Box\" ", + " äޤΥޥɤϸߤ LaTeX2e Υˤ¸ߤ", + " latexsym ѥå˴ޤޤƤޤΥѥåۤΰ", + " ꡢä¿ LaTeX ΥƥΰˤʤäƤޤΥѥå", + " ȤȤ˺ʤǤ", + " ¾ϡamssymb ѥåεѤޤ", + "", + " ǥեȤ襵 5 inch 3 inch Ǥץ `size` ", + " 桼δ˾ΤѹǤޤޤǥեȤǤ X Y", + " Υñ̤ inch Ǥ¾ñ̤ȤȤǽǤ (ߤ cm", + " Τ)", + "", + " 'rotate' ꤹȡʸβžä y Υ٥βžǽˤ", + " ޤ (graphics graphicx ѥåɬ)ξ硢y ٥", + " 'Ѥ߾夲' ˤȤߤߤޤ", + "", + " :", + " Фΰֹ碌˴ؤ:", + " gnuplot Υǥե (񤽤ʤˤʤ뤬ǤʤȤ⤢):", + " set title '\\LaTeX\\ -- $ \\gamma $'", + " ʿˤľˤ⥻󥿥:", + " set label '{\\LaTeX\\ -- $ \\gamma $}' at 0,0", + " ֤Ū˻ (˹碌):", + " set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'", + " ¾θФ -- ĹФФ븫Ѥ:", + " set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}}'" + #endif /* JAPANESE_DOC */ END_HELP(latex) #endif /* TERM_TABLE */ diff -rc term/linux.trm.ORG term/linux.trm *** term/linux.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/linux.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 336,341 **** --- 336,342 ---- #ifdef TERM_HELP START_HELP(linux) + #ifndef JAPANESE_DOC "1 linux", "?commands set terminal linux", "?set terminal linux", *************** *** 347,351 **** --- 348,365 ---- " environment variable GSVGAMODE for the default mode; if not set, it uses", " 1024x768x256 as default mode or, if that is not possible, 640x480x16", " (standard VGA)." + #else /* JAPANESE_DOC */ + "1 linux", + "?commands set terminal linux", + "?set terminal linux", + "?set term linux", + "?terminal linux", + "?term linux", + "?linux", + " `linux` ɥ饤Фˤϻꤹ륪ץϲ⤢ޤ󡣤ϥǥե", + " ȤΥ⡼Ѥ˴Ķѿ GSVGAMODE 򻲾Ȥޤ⤷줬ꤵƤ", + " ʤ 1024x768x256 ǥեȤȤƻѤޤ줬Ǥʤ", + " 640x480x16 (ɸ VGA) Ȥޤ" + #endif /* JAPANESE_DOC */ END_HELP(linux) #endif diff -rc term/lua/gnuplot-tikz.help.ORG term/lua/gnuplot-tikz.help *** term/lua/gnuplot-tikz.help.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/lua/gnuplot-tikz.help 2012-01-22 14:46:46.000000000 +0900 *************** *** 1,3 **** --- 1,4 ---- + #ifndef JAPANESE_DOC "2 lua tikz", "?set terminal lua tikz", "?set term lua tikz", *************** *** 165,167 **** --- 166,340 ---- " Strings have to be put in single or double quotes. Double quoted", " strings may contain special characters like newlines '\\n' etc.", "" + #else /* JAPANESE_DOC */ + "2 lua tikz", + "?set terminal lua tikz", + "?set term lua tikz", + "?term lua tikz", + " TikZ ɥ饤Фϡ Lua Ϸνϥ⡼ɤΰĤǤ", + "", + "", + " :", + " set terminal lua tikz", + "", + " {latex | tex | context}", + " {color | monochrome}", + " {dashed | solid}", + " {nooriginreset | originreset}", + " {nogparrows | gparrows}", + " {nogppoints | gppoints}", + " {picenvironment | nopicenvironment}", + " {noclip | clip}", + " {notightboundingbox | tightboundingbox}", + " {background \"<colorpec>\"}", + " {size <x>{unit},<y>{unit}}", + " {scale <x>,<y>}", + " {plotsize <x>{unit},<y>{unit}}", + " {charsize <x>{unit},<y>{unit}}", + " {font \"<fontdesc>\"}", + " {{fontscale | textscale} <scale>}", + " {nofulldoc | nostandalone | fulldoc | standalone}", + " {{preamble | header} \"<preamble_string>\"}", + " {tikzplot <ltn>,...}", + " {notikzarrows | tikzarrows}", + " {rgbimages | cmykimages}", + " {noexternalimages|externalimages}", + " {bitmap | nobitmap}", + " {providevars <var name>,...}", + " {createstyle}", + " {help}", + "", + " ȤĹɬפȤ륪ץˤĤƤϡñ̤ꤵƤʤ", + " ФΥǥեȤ 'cm' Ȥʤޤ٤ƤĹˤϡʲñ̤", + " ѤǤޤ: 'cm', 'mm', 'in' ޤ 'inch', 'pt', 'pc', 'bp', 'dd',", + " 'cc' (: in ϥ (1in=2.54cm), pt ϥݥ (72.27pt=1in), pc", + " ϥѥ (1pc=12pt), bp ϥӥåݥ (72bp=1in), dd Didot ݥ", + " (26.6dd=1cm), cc Cicero (1cc=12dd))ͤñ̤δ֤˶", + " ƤϤޤ", + "", + " 'monochrome' ϡοդ̵ˤɤ٤򳥿Ĵڤؤ", + " ", + "", + " 'solid' ϡΤߤѤޤ", + "", + " 'originreset' ϡTikZ θκѤذưޤϤ", + " ĤĤ tikzpicture Ķ󤹤Τ˻ѤǤޤ", + " ϡmultiplotpm3d ǤϽʬˤϥƥȤƤޤ", + "", + " 'gparrows' ϡTikZ 󶡤 (arrow) ˡgnuplot ", + " (arrow) ؿѤޤ", + "", + " 'gppoints' ϡTikZ 󶡤赭ˡgnuplot ε", + " ؿѤޤ", + "", + " 'nopicenvironment' ϡ'tikzpicture' ĶưǹԤ褦ˤ", + " ˤάޤˤꡢˡ PGF/TikZ ", + " ľ뤳ȤǤޤ", + "", + " 'clip' ϡ줿Хǥåԥ󥰤ޤǥե", + " Ȥ 'noclip' ǡϥХޤǾζȤΤߤ", + " ꤷޤץ 'plotsize' 'tightboundingbox' Ѥ", + " Ȥ⥯åԥ󥰤Ȣ⤤ꤷޤ", + "", + " 'tightboundingbox' 򥻥åȤȡץ 'clip' ̵뤵졢ǽŪ", + " ʶȤ tikz ׻뼫ʶȤˤʤޤ", + "", + " 'background' ϡطʿ <colorspec> ǻꤷͤꤷޤ", + " <colorspec> ͭʿ̾'#' θ 16 ʿ֤ 3 ХȤ RGB ", + " (㤨 '#ff0000' Ͽ) Τ줫ǤʤФޤ󡣾ά", + " طʤƩˤʤޤ", + "", + " ץ 'size' ϡХ 2 ĤĹ <x>, <y> ɬפ", + " ޤǥեȤΥХ 12.5cm x 8.75cm Ǥ", + "", + " ץ 'scale' ϡץ 'size' ƱεǽǤ <x>,", + " <y> ĹǤϤʤΨˤʤޤ", + "", + " ץ 'plotsize' ϡХΰΥ", + " Ԥޤ줬̾ gnuplot εưǤΥץ", + " Ѥȡ鷺оΤʹ뤫⤷ޤ'originreset' ", + " 褦ˡΥץ multiplot pm3d ǻѤȡԹ", + " ̤򾷤줬ޤˡȤơ٤Ƥ margin 0", + " ꤷǥץ 'noclip' Ѥ롢Ȥ⤢ޤ", + " ϡΰͿХ礭ˤʤޤ", + "", + " ץ 'charsize' ϡѤեȤοʿȿľʿ", + " ͤɬפȤޤʤ TeX ʸǤɤΤ褦˻Ѥ뤫", + " ĤƤϡץȤ륹ե򸫤Ƥ", + "", + " ץ 'fontscale', 'textscale' ˤϡ̼ѥ᡼ɬפǤ", + " Τ٤Ƥʸ󤬤ν̼ǿ̤ޤ", + "", + " ץ 'tex', 'latex', 'context' ϡTeX ϷǤǥե", + " Ȥ LaTeX ǤΥեɤ߹ˤϡʤʸե", + " ƬбԤƤ:", + " \\input gnuplot-lua-tikz.tex % (plain TeX ξ)", + " \\usepackage{gnuplot-lua-tikz} % (LaTeX ξ)", + " \\usemodule[gnuplot-lua-tikz] % (ConTeXt ξ)", + "", + " 'createstyle' ϡΥץȤ TeX/LaTeX/ConTeXt ե", + " ƳФŬڤʥե˽񤭽Фޤ", + "", + " 'fulldoc' ޤ 'standalone' ϡΤޤޥѥǤ褦ʴ", + " LaTeX ʸޤ", + "", + " 'preamble' ޤ 'header' ϡstandalone ⡼ɤΥɥȤΥץꥢ", + " ֥ɲ LaTeX ɤϤΤ˻Ȥޤ", + "", + " ץ 'tikzplot' Ǥϡޥ '\\path' '\\path plot'", + " Ѥޤ³ (linetype) οͤΥꥹ (<ltn>,...) ", + " ˱ƶޤ٤ƤФĤ襹", + " 뤬¸ߤޤ1 ʾΤ٤ƤФơǥեȤ襹", + " 'smooth' Ǥ", + "", + " ץ 'tikzarrows' Ѥȡ桼 gnuplot ", + " (arrow) Υ TikZ Υ˳Ƥޤϡ", + " γѤͤ 'äƻѤ' ȤǤʤƤޤ㤨С '7' ", + " Υ TikZ 'gp arrow 7' ˳Ƥ졢¾Ϳ", + " 줿ͤϤ٤̵뤵ޤǥեȤǤϡTikZ ϷϤ٤Ƥ", + " Фƥƥ륹ѤޤǥեȤ gnuplot Τ褦", + " ˤϡץ 'gparrows' ѤƤ", + "", + " 'cmykimages' Ǥϡ饤ǡФ RGB 顼ǥ", + " CMYK ǥѤޤ¾Τ٤Ƥο (οʤ) ϡ", + " 㤨 xcolors ѥåǽΤǡΥץαƶ", + " ޤ󡣤Υץϡ饤ǤʤǡǤ", + " ̵뤵ޤ", + "", + " ץ 'externalimages' Ѥȡ٤ƤΥӥåȥޥåײ", + " PNG Ȥƽ񤭽Ф餬ʸΥѥɤ߹ޤ", + " ˤʤޤDVI ե롢Ӥθ PostScript ե", + " ˤϡPNG ե EPS եˡ̤Ѵɬפޤ", + " 㤨 ImageMagick `convert` ǹԤޤƩӥåȥޥåײ", + " ˳ PNG Ȥޤ", + "", + " ץ 'nobitmap' ϡͥƥ֤ PS, PDF 饤", + " ˡɤ٤줿ĹȤƥ󥰤ޤΥץ", + " ϡ饤ǤʤǡǤ̵뤵ޤ", + "", + " ץ 'providevars' ϡgnuplot ѿ桼ѿTeX ", + " ץǤ⥳ޥ '\\gpgetvar{<var name>}' Ѥ뤳ȤѲ", + " ǽˤޤѤǤѿΰ򸫤ˤϡ'show variables all' ", + " ޥɤѤƤ", + "", + " ʸ <fontdesc> ˤϡ㤨 '\\small' Τ褦 TeX/LaTeX/ConTeXt ", + " ͭʥեȥޥɤ뤳ȤǤϡ\"font=<fontdesc>\"", + " ηΥΡɥѥ᡼ȤľϤޤϡΡɤ˥", + " ɤɲäΤˡ֤虜ȴְ㤨ơ׻Ȥޤ㤨 '\\small,yshift=1ex'", + " ͭǤ',yshift=1ex' ͭǡϸߤΥեѹ", + " ޤ󡣤ꥹȤ 2 㳰Ǥ줬 <>{ñ} η", + " οͤξ硢¾νϷǤǤ褦˥եȥȲ", + " 졢 1 ɲäƤޤޤñ̤ά줿ͤ 'pt' ñ̤", + " ᤵޤ㤨С'\\sffamily,12,fill=red' ϡطʿ֤ 12pt ", + " LaTeX sans serif եȤꤷޤ", + " ƱȤ ConTeXt ˤޤ㤨С'\\switchtobodyfont[iwona],10'", + " ϥեȤ 10pt Iwona ѹޤ", + " Plain TeX 桼ϡեȥѹϺǽΰŪ˹Ԥʤ", + " Фޤ󡣥ƥȥܥåν̼ܤ褦2 ܤƱ", + " ͤꤹ٤Ǥ", + "", + " ʸñ졢뤤ŰɬפޤŰ", + " 줿ʸˤϡԤ '\\n' ʤɤ̤ʸ뤳ȤǤ", + " ޤ", + "" + #endif /* JAPANESE_DOC */ diff -rc term/lua.trm.ORG term/lua.trm *** term/lua.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/lua.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 1342,1347 **** --- 1342,1348 ---- #ifdef TERM_HELP START_HELP(lua) + #ifndef JAPANESE_DOC "1 lua", "?commands set terminal lua", "?set terminal lua", *************** *** 1368,1377 **** --- 1369,1407 ---- " All arguments will be provided to the selected script for further", " evaluation. E.g. 'set term lua tikz help' will cause the script itself", " to print additional help on options and choices for the script.", + #else /* JAPANESE_DOC */ + "1 lua", + "?commands set terminal lua", + "?set terminal lua", + "?set term lua", + "?terminal lua", + "?term lua", + "?lua", + " `lua` ϥɥ饤Фϡоե뤿Ρ", + " Lua ץȤȤȤ߹碌ǵǽޤߥݡȤƤо", + " ϡTikZ -> pdflatex ΤߤǤ", + "", + " Lua ˴ؤϡhttp://www.lua.org ǻȤǤޤ", + "", + " :", + " set terminal lua <target name> | \"<file name>\"", + " {<script_args> ...}", + " {help}", + "", + " ץѤ 'target name'ޤϰդ 'file name' ɬܤ", + " ץȤ 'target name' ͿϡνϷϡ", + " \"gnuplot-<target name>.lua\" ޤǥ쥯ȥõ", + " ԤȴĶѿ GNUPLOT_LUA_DIR õޤ", + "", + " ¾Τ٤Ƥΰϡ򤷤ץȤɾ褦Ϳ", + " 㤨С'set term lua tikz help' ϡץȤ켫Ȥˡ", + " ץѤΥץ˴ؤɲäΥإפɽޤ", + #endif #include "lua/gnuplot-tikz.help" "" END_HELP(lua) START_HELP(tikz) + #ifndef JAPANESE_DOC "1 tikz", "?commands set terminal tikz", "?set terminal tikz", *************** *** 1384,1388 **** --- 1414,1432 ---- " `set term tikz` is a short form of the command `set term lua tikz`.", " See `term lua` for more information. Use the command `set term tikz help`", " to print terminal options." + #else /* JAPANESE_DOC */ + "1 tikz", + "?commands set terminal tikz", + "?set terminal tikz", + "?set term tikz", + "?terminal tikz", + "?term tikz", + "?tikz", + " Υɥ饤ФϡTeX Υեåޥ TikZ ѥåȤȤ˻", + " Ϥޤߤϡ lua script ˤäƼƤơ", + " `set term tikz` `set term lua tikz` ξάǤܺ٤ϰʲ:", + " `term lua`ϷΥץɽˤϡ`set term tikz help`", + " ѤƤ" + #endif END_HELP(tikz) #endif /* TERM_HELP */ diff -rc term/mac.trm.ORG term/mac.trm *** term/mac.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/mac.trm 2012-01-22 14:49:13.000000000 +0900 *************** *** 137,142 **** --- 137,143 ---- #ifdef TERM_HELP START_HELP(mac) + #ifndef JAPANESE_DOC "1 macintosh", "?set terminal macintosh", "?set term macintosh", *************** *** 167,171 **** --- 168,206 ---- " to multiwin, generate some graphs, and then switch to singlewin again, the", " orginal 'singlewin' window will be resused if it is still open. Otherwise", " a new 'singlewin' window will be created. The 'singlewin' window is not numbered." + #else /* JAPANESE_DOC */ + "1 macintosh", + "?set terminal macintosh", + "?set term macintosh", + "?terminal macintosh", + "?term macintosh", + "?macintosh", + " :", + " set terminal macintosh {singlewin | multiwin} {vertical | novertical}", + " {size <width>, <height> | default}", + "", + " 'singlewin' ñ쥦ɥؤ¤Ǥꡢ˥᡼ѤͭѤǤ", + " 'multiwin' ʣΥɥȤ褦ˤʤޤ", + " 'vertical' gx ץθǤΤͭǤΥץǤϲž", + " ʸľ˽񤭤ޤnovertical ϤΥץ̵ˤ", + " ޤ", + " size <width>, <height> preferences dialog ꤵ줿ե", + " 񤭴'set term mac size default' 'set term mac default' ", + " ꤵޤǤͤݻޤ", + "", + " 'set term mac size default' ϥɥ preferences", + " dialog ꤷΤˤޤ", + "", + " 'set term mac default' ƤΥץǥեȤͤꤷޤ", + " ǥեͤ nogx, multiwin, novertical Ǥ", + "", + " multiwin ץθǥդθ singlewin ˥å", + " 硢 plot ޥɤǤϹ˰ĥɥ졢ο", + " ɥǤ singlewin ͭʴֻѤޤ multiwin ꡢ", + " ĤΥդޤƤ singlewin ˥åȡ⤷", + " 'singlewin' ɥޤƤФ줬Ȥ졢Ǥʤ", + " п 'singlewin' ɥޤ'singlewin' ɥ", + " ֹդϤޤ" + #endif /* JAPANESE_DOC */ END_HELP(mac) #endif /* TERM_HELP */ diff -rc term/metafont.trm.ORG term/metafont.trm *** term/metafont.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/metafont.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 540,545 **** --- 540,546 ---- #ifdef TERM_HELP START_HELP(mf) + #ifndef JAPANESE_DOC "1 mf", "?commands set terminal mf", "?set terminal mf", *************** *** 636,640 **** --- 637,739 ---- " saves a lot of TeX memory. One last advantage of using the METAFONT driver", " is that the DVI file really remains device independent, because no \\special", " commands are used as in the eepic and tpic drivers." + #else /* JAPANESE_DOC */ + "1 mf", + "?commands set terminal mf", + "?set terminal mf", + "?set term mf", + "?terminal mf", + "?term mf", + "?mf", + "?metafont", + " `mf` ɥ饤Ф METAFONT ץؤϥեޤä", + " οޤ TeX ʸǤʸƱ褦˻ȤȤǤޤ", + "", + " ʸǿޤȤˤϡ`gnuplot` νϤեϤȤ METAFONT", + " ץ¹Ԥɬפޤäơ桼ϥեȤ", + " ץȿäեȤɥȤ˼िδμ", + " ɬפȤʤޤѤ륵Ȥ METAFONT ץबŬڤ", + " ꤵƤСиΤʤ桼Ǥ⤽ʤϤǤǤ礦", + "", + " ʸ METAFONT ʸåȤ˴ŤƥݡȤޤ", + " Ǥ Computer Modern Roman եȥåȤϤǤ桼ɬפ", + " եȤ򲿤Ǥ⼫ͳ֤ȤǤޤեȤ", + " METAFONT ե뤬Ȥ֤ˤʤäƤɬפޤġ", + " ʸ METAFONT ̡Υԥ㡼ѿ¸졢ʸɬפˤʤ", + " Ȥˤѿ (ž) ޤϡMETAFONT", + " ץबפ֤Ǥ׻ (Ĥޤ PC) Ǥϡԥ", + " 㡼ѿ򤿤Ѥ뤳ȤǡȤ̤θ³", + " Ȥ⤢ޤ", + "", + " `mf` ɥ饤ФˤϥץϤޤ", + "2 METAFONT λȤ", + "?commands set terminal mf detailed", + "?set terminal mf detailed", + "?set term mf detailed", + "?mf detailed", + "?metafont detailed", + "", + " - Ϸ (terminal) METAFONT ˥å:", + " set terminal mf", + " - ϥե̾ꡣ㤨:", + " set output \"myfigures.mf\"", + " - դ衣ƥդ̡ʸΥǥեȤ礭", + " 5x3 Ǥ礭 `set size 0.5,0.5` Τ褦ˤƤɤʥ", + " ˤǤ⼫ͳѹǤޤ", + "", + " - `gnuplot` λ", + "", + " - `gnuplot` νϥեФ METAFONT ¹ԤTFM ե GF", + " եޤդϳ礭 (5x3 ) Τǡmemmax ͤ", + " ʤȤ 150000 Ǥ METAFONT ȤɬפǤ礦Unix Ǥϡ", + " ̾ bigmf Ȥ̾ǥ󥹥ȡ뤵ƤǤ礦ʲǤϡ", + " virmf ޥɤ big Ǥ METAFONT ǤȲꤷ¹򼨤ޤ:", + "", + " - METAFONT Ω夲:", + " virmf '&plain'", + " - ֤: METAFONT ץץ ('*') ǼΤ褦Ǥޤ:", + " \\mode:=CanonCX; % ʤλѤץ󥿤", + " - Ψ (magnification) (ץ):", + " mag:=1; % ʤιߤͤ", + " - `gnuplot` Ǻäե:", + " input myfigures.mf", + " ŵŪ Unix ޥǤϡvirmf '&plain' ¹Ԥ륹ץ \"mf\" ", + " Τǡvirmf &plain mf Ȥޤˤ mfput.tfm", + " mfput.$$$gf ($$$ Ͻ֤β) 2 ĤΥե뤬ޤ", + " κȤϡ٤Ƥ򥳥ޥɥ饤Ǵñ˼¹Ԥ뤳ȤǤޤ:", + " virmf '&plain' '\\mode:=CanonCX; mag:=1; input myfigures.mf'", + " ξ硢ե̾ myfigures.tfm myfigures.300gf Ȥ", + " ̾ˤʤޤ", + "", + " - gftopk Ȥä GF ե뤫 PK ե:", + " gftopk myfigures.300gf myfigures.300pk", + " gftopk ե̾ϤʤѤ DVI ɥ饤Ф˰¸ޤ", + " ΤǡȤ TeX δԤ˥ե̾ε§ˤĤʹƤ", + " TFM ե PK եŬʥǥ쥯ȥ˥󥹥ȡ뤹뤫", + " ޤϴĶѿŬڤͤꤷޤ̾綠ϡTEXFONTS ˥ȥ", + " 쥯ȥޤ뤳ȤȡʤѤ DVI ɥ饤ФѤƤ", + " ѿ (ɸŪ̾Ϥޤ ...) ФƱȤкѤߤ", + " TeX եȥȥå (TFM) ե 򸫤ĤDVI ɥ饤", + " Ф PK ե򸫤Ĥ褦ˤ뤿ɬפʺȤǤ", + "", + " - ʸˤΥդ뤿 TeX ˤΥե̾ؼ:", + " \\font\\gnufigs=myfigures", + " ƥդϡǽΥդʸ 02 ܤΥդʸ 1 Ȥ褦ˡ", + " 줾ĤʸȤ¸Ƥޤ嵭κȤԤʤȡ", + " Ϥ¾ʸƱ褦˻ȤȤǤ㤨Х 1 2 ʸ", + " ˥󥿥󥰤֤ plain TeX եǤ٤Ȥ:", + " \\centerline{\\gnufigs\\char0}", + " \\centerline{\\gnufigs\\char1}", + " Ǥ LaTeX Ǥ picture ĶȤä \\makebox \\put ", + " Ǥդΰ֤˥դ֤뤳ȤǤޤ", + "", + " Τϡ٥եȤƤޤС˻֤ˤʤ", + " : TeX ϥդʸȤƻȤ֤ˤϤʤ֤", + " Ѥޤ󤷡դʸ뤳Ȥ¿Ǥ礦顣", + " Ƥ TeX ΥˤʤޤMETAFONT ɥ饤ФȤ", + " ǸΰĤϡ DVI ե뤬ΥǥХ¸", + " ˤʤȤȤǤ eepic tpic ɥ饤ФΤ褦 \\special", + " ޥɤȤʤǤ" + #endif /* JAPANESE_DOC */ END_HELP(mf) #endif /* TERM_HELP */ diff -rc term/metapost.trm.ORG term/metapost.trm *** term/metapost.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/metapost.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 993,998 **** --- 993,999 ---- #ifdef TERM_HELP START_HELP(mp) + #ifndef JAPANESE_DOC "1 mp", "?commands set terminal mpost", "?set terminal mp", *************** *** 1172,1176 **** --- 1173,1372 ---- " built-in size changing commands can be used for maximum flexibility. Be sure", " to set the appropriate MP configuration variable to force Metapost to run", " LaTeX instead of plainTeX." + #else /* JAPANESE_DOC */ + "1 mp", + "?commands set terminal mpost", + "?set terminal mp", + "?set term mp", + "?terminal mp", + "?term mp", + "?mp", + "?metapost", + "", + " `mp` ɥ饤Ф Metapost ץϤ뤳ȤտޤϤ", + " ΥեФ Metapost ¹Ԥȥդޤ EPS ե", + " 뤬ޤǥեȤǤ Metapost Ƥʸ TeX ̤", + " ϥȥ丫ФǤդ TeX εܼŪ˻ȤȤǤ", + " 롢ȤĤȤ̣ޤ", + "", + " :", + " set term mp {color | colour | monochrome}", + " {solid | dashed}", + " {notex | tex | latex}", + " {magnification <magsize>}", + " {psnfss | psnfss-version7 | nopsnfss}", + " {prologues <value>}", + " {a4paper}", + " {amstex}", + " {\"<fontname> {,<fontsize>}\"} ", + "", + " ץ `color` 򥫥顼ǽ񤯤Ȥ̣ (򥵥ݡȤ", + " ץ󥿤ǥץ쥤)`monochrome` (ޤϲꤷʤ)", + " Ϲ򤵤ޤץ `solid` `dashed`", + " (ޤ̵) ۤʤѥʬޤ`solid` ", + " ꤵƤ `color` ꤵʤä硢ۤȤƤƱ", + " ΤˤʤޤⲿξˤͭѤǤ礦ǧƤޤ", + "", + " ץ `notex` ϴ TeX 򱪲󤷤ޤΤǡΥץθ", + " ϸФˤ TeX ΥɤϻȤȤǤޤ󡣤ϡŤե", + " 롢뤤 TeX Ǥü쵭ȤƲᤵƤޤ `$` `%` ", + " 褦ʰŪʸ򤿤ȤեΤѰդƤޤ", + "", + " ץ `tex` ϡTeX ǽʸϤ褦ꤷޤ", + "", + " ץ `latex` ϡLaTeX ǽʸϤ褦ꤷ", + " ˤä TeX ǤϻȤʤ LaTeX ǤϻȤΡ㤨ʬ", + " \\frac ǽ񤤤ꤹ뤳ȤǤޤΥץȤϡ", + " Ķѿ TEX LaTeX μ¹ԥץ̾ (̾ latex) ꤹ뤫", + " 뤤 `mpost --tex=<LaTeX μ¹ԥץ̾> ...` Ȥ뤳Ȥ˺", + " ʤǤǤʤ metapost ϥƥȤν TeX Ȥ", + " ȤƼԤƤޤǤ礦", + "", + " TeX ˤեȥѹϿˤϸ̤ʤΤ褦ѹ", + " ԤʤȤƤñˡϡŪ˳Ψ (magnification factor) ", + " ʳˤϤޤ󡣤줬ץ `magnification` ΰ̣Ǥ", + " ξϳΨ˻ꤹɬפޤƤʸ (դǤ", + " ʤ) ϤΨdz礵ޤǥեȤ 10pt ʳ¾Υ", + " ǽ񤭤ϤѤƤǰʤȤƤοƱ", + " ˤʤäƤޤޤʲ MP ϤԽ˴ؤ", + " 򻲾ȤƤ`mag` `notex` θǤƯޤԤʤ", + " ̣ʤ餤 (ʲ˽Ҥ٤) եȥץϤޤƯ", + " ", + "", + " ץ `psnfss` postscript եȤ LaTeX Ȥ߹碌ƻ", + " ޤΥץ LaTeX ȤΤ̣߰ޤΤǡ", + " ưŪ `latex` ץ򤵤ޤΥץϰʲ", + " LaTeX ѥåѤޤ:", + " inputenc(latin1), fontenc(T1), mathptmx, helvet(scaled=09.2), courier,", + " latexsym, textcomp", + "", + " ץ `psnfss-version7` postscript եȤ LaTeX Ȥ߹", + " ƻѤޤ (`latex` ưŪ򤵤ޤ) ʲ LaTeX ѥ", + " Ѥޤ:", + " inputenc(latin1), fontenc(T1), times, mathptmx, helvet, courier", + "", + " ץ `nopsnfss` ϥǥեȤǡɸŪʥե (ꤵ", + " ʤ cmr10) Ȥޤ", + "", + " ץ `prologues` ɲäͤ˻metapost ե", + " `prologues:=<>` ȤԤɲäޤͤȤ `2` ꤹ", + " metapost eps ե褦 postscript եȤѤ", + " ˤꤽη̤㤨 ghostscript ʤɤǻȤǤ褦ˤʤޤɸ", + " Ǥ metapost TeX ΥեȤѤޤΤǡ򻲾Ȥˤ", + " (La)TeX Υե˼ɬפޤ", + "", + " ץ `noprologues` ϥǥեȤǡprologue ǻꤷʤ", + " ɲäޤ", + "", + " ץ `a4paper` `[a4paper]` documentclass ɲäޤɸ", + " Ǥ letter ѻ (ǥե) ȤޤΥץ LaTeX", + " ǤΤ߻ȤޤΤǡưŪ `latex` ץ򤵤ޤ", + "", + " ץ `amstex` ϡưŪ `latex` ץ򤷡ʲ", + " LaTeX ѥåѤޤ: amsfonts, amsmath(intlimits)ǥե", + " ǤϤϻѤޤ", + "", + " ǰϤޤ줿̾ϥե̾ɽ`set label` `set title` ", + " Ū˥եȤͿʤϤΥեȤȤޤե", + " TeX ǧǤ (TFM ե뤬¸ߤ) ΤȤɬפޤ", + " ǥեȤǤ `notex` 򤵤Ƥʤ \"cmr10\" Ǥʤ", + " \"pcrr8r\" (Courier) Ȥޤ`notex` θǤ⡢Metapost ˤ", + " TFM եɬפǤ`pcrr8r.tfm` LaTeX psnfss ѥå", + " Courier ե̾ȤͿƤޤ`notex` ΥǥեȤե", + " ȤѹϡʤȤ 32-126 ΥϰϤ ASCII 󥳡", + " ǥ󥰤˰פΤǤ`cmtt10` ܻۤȤޤ", + " ϥ 32 (ڡ) ˥ڡǤϤʤʸäƤޤ", + "", + " 5.0 99.99 δ֤ǤդοǤά줿", + " 10.0 Ȥޤʤ٤ `magstep` Ĥޤ 1.2 ޤ", + " 0.5 10 ܤ򾮿ʲ 2 ̤ݤ᤿ͤѤ뤳Ȥ򤪴", + " ޤϤ줬 TeX ΥƥǺǤ褯ȤեȤΥ", + " Ǥ", + "", + " ƤΥץϾάǽǤեȤꤹϤ (ɬפ", + " 饵Ĥ) ֺǸ˻ꤹɬפޤե̾ˤΥ", + " 󤬴ޤޤƤȤƤ⡢Ѥˤϥեȥ", + " ɬפޤ㤨 `set term mp \"cmtt12\"` cmtt12 ǥե", + " ȤΥǤ 10 ˽̤ƻȤޤ¿ʬ˾ޤʤȤǤ礦", + " cmtt10 ȤɤǤ礦", + "", + " ʲ ascii ʸϡTeX Ǥ̤˰ޤ:", + " $, &, #, %, _; |, <, >; ^, ~, \\, {, }", + " $, #, &, _, % 5 Ĥϡ㤨 `\\$` Ȥ뤳Ȥưפˤ򥨥", + " פǤޤ<, >, | 3 Ĥϡ㤨 `$<$` Τ褦˿⡼ɤ", + " ФޤޤĤΤΤ˴ؤƤϾ TeX βɬפˤ", + " ޤŬʤ褤 TeX ܤƳƤǤ礦", + "", + " ФŰǰϤ硢TeX ɤΥХååϥ", + " (2 Ľ) ɬפޤñȤФ򤱤뤳ȤϤ", + " ޤ٤ϲԤȤ `\\n` Ȥʤʤޤ񤤤Ƥ븽", + " ߡgnuplot 3.7 `plot` ޥɤͿ줿ȥϡ̤ʾͿ", + " 줿Ȥϰۤʤ򤷤ޤΥˤ餺 TeX", + " ޥɤΥХååŲɤǤ", + "", + " Metapost β TeX ʸǰ̤˻ȤƤޤMetapost ϥե", + " Ȥ TeX ԤʤΤƱˡǰ¾ʸ", + " ȤϰۤʤäƤޤդ LaTeX ʸ graphics ѥå", + " Ǽޤ졢뤤 epsf.tex Ȥä plainTeX ˼ޤ졢", + " dvips (ޤ¾ dvi ps ؤѴե) PostScript Ѵ", + " 硢ΥʸƤǤ礦", + " Metapost Ϥ򤽤Τޤ PostScript 󥿥ץ꥿äƤ⡢", + " ʸϽϤʤǤ礦", + "", + "2 Metapost λȤ", + "?commands set terminal mp detailed", + "?set terminal mp detailed", + "?set term mp detailed", + "?mp detailed", + "?metapost detailed", + "", + " - ޤ terminal ɥ饤Ф Metapost ꡢ㤨:", + " set terminal mp mono \"cmtt12\" 12", + "", + " - ϥե㤨:", + " set output \"figure.mp\"", + "", + " - դ plot (ޤ multiplot γƥ롼) Ϥ줾̤", + " Metapost beginfig...endfig 롼פʬޤΥǥեȤΥ", + " 5x3 Ǥ `set size 0.5,0.5` Ȥ", + " פŬʳ򤽤Τ褦˻ꤹ뤳ȤѹǤޤ", + "", + " - gnuplot λ", + "", + " - gnuplot νϥեФ Metapost ¹Ԥ EPS ե", + " :", + " mpost figure.mp OR mp figure.mp", + " Metapost ץ̾ϥƥ˰¸Unix Ǥ̾ `mpost` ǡ¾", + " ¿ΥƥǤ `mp` ǤMetapost ϳƥդФ 1 ĤĤ", + " EPS եޤ", + "", + " - Υդʸ˼ˤ LaTeX graphics ѥå䡢plainTeX", + " Ǥ epsf.tex :", + " \\usepackage{graphics} % LaTeX", + " \\input epsf.tex % plainTeX", + " TeX DVI Ϥ PS ѴΤˡdvips ʳ DVI ɥ饤ФȤ", + " ϡLaTeX ե˰ʲιԤɬפ뤫Τޤ:", + " \\DeclareGraphicsRule{*}{eps}{*}{}", + " 줿ƥդʬΥեˤʤäƤơǽΥդΥե", + " ϡ㤨 figure.0, 2 ܤ㤨 figure.1 Τ褦̾ˤʤޤ", + " äơ3 ܤΥդʸ˼िˤʤʤФʤ", + " ȤϰʲΤߤǤ:", + " \\includegraphics{figure.2} % LaTeX", + " \\epsfbox{figure.2} % plainTeX", + "", + " mp ɥ饤Ф postscript ɥ饤Фϡ⤷ȤС", + " ԽǽʽϤǤȤȤǤ礦νϤǽʸ¤", + " 뤿ΡʤϤʧޤMetapost ˴ؤ뤽", + " μΤǡǥեȤ俧 `lt[]` `col[]` Խ", + " 뤳ȤѹǤ褦ˤʤޤ/顼/Ȥä", + " ⡢ͤȤƤ `dashedlines` `colorlines` ѹ", + " 뤳ȤǹԤʤޤǥեȤ `tex` ץͭʾ硢֥", + " å `vebatimtex...etex` Խ뤳Ȥǡ٥ʸեȤФ", + " ŪѹԤʤޤäˡ⤷˾ʤ LaTeX Υץꥢ֥", + " ä뤳ȤǤξ LaTeX λĥѹޥɤȤΤ", + " νȯǤǤ礦Metapost plainTeX Ǥʤ", + " LaTeX ¹Ԥ褦Ŭڤ MP ѿꤹ뤳Ȥ˺ʤǤ", + " " + #endif /* JAPANESE_DOC */ END_HELP(mp) #endif /* TERM_HELP */ diff -rc term/mif.trm.ORG term/mif.trm *** term/mif.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/mif.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 965,970 **** --- 965,971 ---- #ifdef TERM_HELP START_HELP(mif) + #ifndef JAPANESE_DOC "1 mif", "?commands set terminal mif", "?set terminal mif", *************** *** 996,1000 **** --- 997,1035 ---- " set term mif # defaults", " set term mif vectors", " set term mif help" + #else /* JAPANESE_DOC */ + "1 mif", + "?commands set terminal mif", + "?set terminal mif", + "?set term mif", + "?terminal mif", + "?term mif", + "?mif", + " `mif` ɥ饤Ф Frame Maker MIF եޥå (version 3.00) νϤ", + " ޤ 15*10 cm Υ MIF ե졼ϤƱڥ", + " ǽ񤫤륰դδǤƱ MIF 롼פ˥롼ײޤ", + " `gnuplot` 1 ڡˤ륰դδǤϰĤ MIF ե졼", + " 褵졢Ĥ MIF ե졼ϰĤ礭 MIF ե졼˽", + " ޤʸǻȤ MIF եȤ \"Times\" Ǥ", + "", + " MIF 3.00 ɥ饤ФǤϤĤΥץǤޤ", + "", + " :", + " set terminal mif {color | colour | monochrome} {polyline | vectors}", + " {help | ?}", + "", + " `colour` (line type) >= 0 򥫥顼 (MIF separation 2--7) ǡ", + " `monochrome` Ƥ (MIF separation 0) 褷ޤ", + " `polyline` ϶Ϣ³Ȥ褷`vectors` ϶٥ȥ", + " ޤȤ褷ޤ", + " `help` `?` ϥ饤إפɸ२顼ϤɽޤξԤϤ", + " λˡûϤ`help` Ϲ˥ץɽޤ", + "", + " :", + " set term mif colour polylines # ǥե", + " set term mif # ǥե", + " set term mif vectors", + " set term mif help" + #endif /* JAPANESE_DOC */ END_HELP(mif) #endif /* TERM_HELP */ diff -rc term/next.trm.ORG term/next.trm *** term/next.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/next.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 1501,1506 **** --- 1501,1507 ---- #ifdef TERM_HELP START_HELP(next) + #ifndef JAPANESE_DOC "1 next", "?commands set terminal next", "?set terminal next", *************** *** 1532,1537 **** --- 1533,1571 ---- " set term next old", "", " Pointsizes may be changed with `set linestyle`." + #else /* JAPANESE_DOC */ + "1 next", + "?commands set terminal next", + "?set terminal next", + "?set term next", + "?terminal next", + "?term next", + "?next", + "?NeXT", + " `next` ɥ饤ФˤΤΤĤΥץ󤬤ޤ", + "", + " :", + " set terminal next {<mode>} {<type> } {<color>} {<dashed>}", + " {\"<fontname>\"} {<fontsize>} title {\"<newtitle>\"}", + "", + " <mode> `default` Τ߻ǤξƤΥץ󤬥ǥե", + " ˤʤޤ<type> `new` `old` ǡ`old` ϸŤñ쥦ɥ", + " ׵ᤷޤ<color> `color` (顼) `monochrome` ()", + " <dashed> `solid` (Τ) `dashed` (ͭ)\"<fontname>\"", + " ͭ PostScript եȤ̾<fontsize> PostScript ݥ", + " ñ̤ǤΥեȤΥ<title> GnuTerm ɥΥȥ", + " 򤽤줾ꤷޤǥեȤ `new`, `monochrome`, `dashed`,", + " \"Helvetica\", 14pt Ǥ", + "", + " :", + " set term next default", + " set term next 22", + " set term next color \"Times-Roman\" 14", + " set term next color \"Helvetica\" 12 title \"MyPlot\"", + " set term next old", + "", + " 礭 `set linestyle` ѹǤޤ" + #endif /* JAPANESE_DOC */ END_HELP(next) #endif /* TERM_HELP */ diff -rc term/openstep.trm.ORG term/openstep.trm *** term/openstep.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/openstep.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 1373,1378 **** --- 1373,1379 ---- #ifdef TERM_HELP START_HELP(openstep) + #ifndef JAPANESE_DOC "1 Openstep (next)", #ifndef TERM_HELP_OPENSTEP "?commands set terminal openstep", *************** *** 1411,1416 **** --- 1412,1457 ---- " set term openstep old", "", " Pointsizes may be changed with `set linestyle`." + #else /* JAPANESE_DOC */ + "1 Openstep (next)", + #ifndef TERM_HELP_OPENSTEP + "?commands set terminal openstep", + "?set terminal openstep", + "?set term openstep", + "?terminal openstep", + "?term openstep", + "?openstep", + "?OpenStep", + "?Openstep", + /* + "?next", + "?NeXT", + */ + #endif + " openstep (next) ɥ饤ФˤΤΤĤΥץ󤬤ޤ", + "", + " :", + " set terminal openstep {<mode>} {<type> } {<color>} {<dashed>}", + " {\"<fontname>\"} {<fontsize>} title {\"<newtitle>\"}", + "", + " <mode> `default` Τ߻ǤξƤΥץ󤬥ǥե", + " ˤʤޤ<type> `new` `old` ǡ`old` ϸŤñ쥦ɥ", + " ׵ᤷޤ<color> `color` (顼) `monochrome` ()", + " <dashed> `solid` (Τ) `dashed` (ͭ)\"<fontname>\"", + " ͭ PostScript եȤ̾<fontsize> PostScript ݥ", + " ñ̤ǤΥեȤΥ<title> GnuTerm ɥΥȥ", + " 򤽤줾ꤷޤǥեȤ `new`, `monochrome`, `dashed`,", + " \"Helvetica\", 14pt Ǥ", + "", + " :", + " set term openstep default", + " set term openstep 22", + " set term openstep color \"Times-Roman\" 14", + " set term openstep color \"Helvetica\" 12 title \"MyPlot\"", + " set term openstep old", + "", + " 礭 `set linestyle` ѹǤޤ" + #endif /* JAPANESE_DOC */ END_HELP(openstep) #endif /* TERM_HELP */ diff -rc term/pbm.trm.ORG term/pbm.trm *** term/pbm.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/pbm.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 483,488 **** --- 483,489 ---- #ifdef TERM_HELP START_HELP(pbm) + #ifndef JAPANESE_DOC "1 pbm", "?commands set terminal pbm", "?set terminal pbm", *************** *** 512,516 **** --- 513,550 ---- " set terminal pbm small monochrome # defaults", " set terminal pbm color medium size 800,600", " set output '| pnmrotate 45 | pnmtopng > tilted.png' # uses NETPBM" + #else /* JAPANESE_DOC */ + "1 pbm", + "?commands set terminal pbm", + "?set terminal pbm", + "?set term pbm", + "?terminal pbm", + "?term pbm", + "?pbm", + " :", + " set terminal pbm {<fontsize>} {<mode>} {size <x>,<y>}", + "", + " <fontsize> `small` `medium` `large` ǡ<mode> `monochrome`", + " `gray` `color` ǤǥեȤ襵 640 ԥ", + " 480 ԥι⤵Ǥϥϡx y ξ 8 ԥܤ", + " Τ˺Ǥ᤯ʤ褦˶ɲäޤɬפǤСζʬ", + " ϸǼȤǤޤ", + "", + " `pbm` ɥ饤ФνϤ <mode> ˤޤ: `monochrome` portable", + " bitmap (PBM; 1 ԥ 1 ӥå) `gray` portable graymap (PGM;", + " 1 ԥ 3 bit) `color` portable pixmap (PPM; 1 ԥ 4 ", + " å) Ϥޤ", + "", + " Υɥ饤ФνϤϡNETPBM ˤä󶡤͡ʲѴ", + " ġǻȤȤǤޤ Jef Poskanzer PBMPLUS ѥå˴", + " Ť NETPBM ϡ嵭 PBM GIF, TIFF, MacPaint, Macintosh", + " PICT, PCX, X11 ӥåȥޥåס¾¿ηѴץ", + " ޤʾ http://netpbm.sourceforge.net/ ˤޤ", + "", + " :", + " set terminal pbm small monochrome # ǥե", + " set terminal pbm color medium size 800,600", + " set output '| pnmrotate 45 | pnmtopng > tilted.png' # NETPBM " + #endif /* JAPANESE_DOC */ END_HELP(pbm) #endif /* TERM_HELP */ diff -rc term/pc.trm.ORG term/pc.trm *** term/pc.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/pc.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 546,551 **** --- 546,552 ---- #ifdef TERM_HELP START_HELP(dospc) + #ifndef JAPANESE_DOC "1 dospc", "?commands set terminal dospc", "?set terminal dospc", *************** *** 556,560 **** --- 557,573 ---- " The `dospc` terminal driver supports PCs with arbitrary graphics boards,", " which will be automatically detected. It should be used only if you are", " not using the gcc or Zortec C/C++ compilers." + #else /* JAPANESE_DOC */ + "1 dospc", + "?commands set terminal dospc", + "?set terminal dospc", + "?set term dospc", + "?terminal dospc", + "?term dospc", + "?dospc", + " `dospc` ɥ饤Ф PC ǤդΥեåܡɤ򥵥ݡȤ", + " ưФޤϡgcc, ޤ Zortec C/C++ ѥȤä", + " ʤȤΤѲǽǤ" + #endif /* JAPANESE_DOC */ END_HELP(dospc) #endif /* TERM_HELP */ diff -rc term/pdf.trm.ORG term/pdf.trm *** term/pdf.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/pdf.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 1715,1720 **** --- 1715,1721 ---- #ifdef TERM_HELP START_HELP(pdf) + #ifndef JAPANESE_DOC "1 pdf", "?commands set terminal pdf", "?set terminal pdf", *************** *** 1758,1762 **** --- 1759,1809 ---- " changes this to whatever the user requests. By default the X and Y sizes", " are taken to be in inches, but other units are possible (currently only cm).", "" + #else /* JAPANESE_DOC */ + "1 pdf", + "?commands set terminal pdf", + "?set terminal pdf", + "?set term pdf", + "?terminal pdf", + "?term pdf", + "?pdf", + " Υɥ饤Ф Adobe PDF (Portable Document Format) Ϥ", + " Acrobat Reader Τ褦ʥġɽǤޤ", + "", + " :", + " set terminal pdf {monochrome|color|colour}", + " {{no}enhanced}", + " {fname \"<font>\"} {fsize <fontsize>}", + " {font \"<fontname>{,<fontsize>}\"} {fontscale <scale>}", + " {linewidth <lw>} {rounded|butt}", + " {solid|dashed} {dl <dashlength>}}", + " {size <XX>{unit},<YY>{unit}}", + "", + " ǥեȤǤϡġФưۤʤ뿧Ѥޤ`monochrome` ", + " 򤹤ƤޤΤǡ̤뤿 `dashed` ", + " ȤɤǤ礦Υ⡼ɤǤɤĤ֤ΰ饤󥹥", + " Ū˿Ѥ뤳ȤǤޤ", + "", + " <font> ϥǥեȤǻȤե̾ (ǥեȤǤ Helvetica) ", + " <fontsize> ϥݥñ̤ǤΥեȥ (ǥեȤǤ 12) Ǥ", + " ɤΤ褦ʥեȤȤơեȤ򥤥󥹥ȡ뤹ˤϡȤ", + " äȤ˴ؤƤϡ˥󥹥ȡ뤵Ƥ pdflib Υɥ", + " Ȥ򻲾ȤƤ", + "", + " ץ `enhanced` ϡĥʸǽ (դʸդʸ", + " ʣΥեȤ) ͭˤޤʲ: `enhanced`", + "", + " ˤƤ `linewidth` ǻꤹ <n> ä뤳", + " ȤǤޤƱͤˡ`dashlength` ϥǥեȤζʬФ", + " ѰҤǤ", + "", + " `rounded` ϡüܹݤǥեȤ `butt` äü", + " ĥäܹѤޤ", + "", + " PDF ϤΥǥեȤΥϡ5inch x 3inch Ǥץ `size` ", + " ϡ桼λꤹΤѹޤǥեȤ X, Y ", + " ñ̤ϥǤ¾ñ̤ѲǽǤ (ߤ cm Τ)", + "" + #endif /* JAPANESE_DOC */ END_HELP(pdf) #endif diff -rc term/pm.trm.ORG term/pm.trm *** term/pm.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/pm.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 1247,1252 **** --- 1247,1253 ---- #ifdef TERM_HELP START_HELP(pm) + #ifndef JAPANESE_DOC "1 pm", "?commands set terminal pm", "?set terminal pm", *************** *** 1281,1285 **** --- 1282,1322 ---- " the optional numerical argument.", "", " Linewidths may be changed with `set linestyle`." + #else /* JAPANESE_DOC */ + "1 pm", + "?commands set terminal pm", + "?set terminal pm", + "?set term pm", + "?terminal pm", + "?term pm", + "?pm", + " `pm` ɥ饤Фϡդ褵 OS/2 ץ쥼ơޥ͡", + " ɥ󶡤ޤΥɥϺǽΥդ褵줿Ȥ", + " ޤΥɥϰåץܡɤؤΥԡĤ", + " 俧ĴΤεǽƤ켫ȤΥ饤إפäƤ", + " ޤ`multiplot` ץ⥵ݡȤƤޤ", + "", + " :", + " set terminal pm {server {n}} {persist} {widelines} {enhanced} {\"title\"}", + "", + " `persist` ꤹȡƥդϤ줾켫ȤΥɥ", + " ٤ƤΥɥ `gnuplot` λⳫޤޤˤʤޤ", + " `server` ꤹȡƤΥդƱɥ˸졢", + " `gnuplot` λⳫޤޤˤʤޤΥץϡɲä", + " ꡢοϥХץΥ󥹥󥹤ˤʤޤä", + " ƱʣΥХɥȤȤǤޤ", + "", + " `widelines` ꤹȡƤΥդιޤ", + " `enhanced` ꤹȡդʸ䲼դʸʣΥեȤȤ", + " ȤǤޤ (ܺ٤ϡʲ: `enhanced text`) PostScript ", + " ȤΥե̾ 1 ʸ˾άǤޤ", + " (T/H/C/S Ϥ줾 Times/Helvetica/Courier/Symbol ̣ޤ)", + "", + " `title` ꤹȡ襦ɥΥȥȤƻȤޤ", + " ϥХ󥹥̾ȤƤȤ졢ɲäο񤭤", + " ޤ", + "", + " `set linestyle` ѹǤޤ" + #endif /* JAPANESE_DOC */ END_HELP(pm) #endif /* TERM_HELP */ diff -rc term/post.trm.ORG term/post.trm *** term/post.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/post.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 3821,3826 **** --- 3821,3827 ---- * of "text" that is necessary to avoid errors. */ START_HELP(00psglobal) + #ifndef JAPANESE_DOC #define PS_COMMON_OPTS1 \ " {level1 | leveldefault}",\ " {color | colour | monochrome}",\ *************** *** 3893,3901 **** --- 3894,3979 ---- " actual limits of the plot.",\ "", "" + #else /* JAPANESE_DOC */ + #define PS_COMMON_OPTS1 \ + " {level1 | leveldefault}",\ + " {color | colour | monochrome}",\ + " {background <rgbcolor> | nobackground}",\ + " {solid | dashed}",\ + " {dashlength | dl <DL>}",\ + " {linewidth | lw <LW>}",\ + " {rounded | butt}",\ + " {clip | noclip}",\ + " {palfuncparam <samples>{,<maxdeviation>}}",\ + " {size <XX>{unit},<YY>{unit}}", + #define PS_COMMON_OPTS2 \ + " {blacktext | colortext | colourtext}",\ + " {{font} \"fontname{,fontsize}\" {<fontsize>}}",\ + " {fontscale <scale>}", + #define PS_COMMON_PROLOG_INFO \ + " ʲΤ褦ʥ顼åФ:",\ + " \"Can't find PostScript prologue file ... \"",\ + " ʲ: `postscript prologue`Ƥλؼ˽äƤ",\ + "", + #define PS_COMMON_DOC1 \ + " ץ `color` ϥ顼ͭˤ`monochrome` ϳǤ",\ + " 褷ޤˡ`monochrome` ϳ `palette` Ѥޤ",\ + " ϡŪ `colorspec` ǻꤵ줿ʤοѹޤ",\ + "",\ + " `solid` ƤΥդΥѥǾ񤭤ޤ",\ + " `dashlength` ޤ `dl` ʬĹ <DL> (0 礭¿)",\ + " ꤷ",\ + " `linewidth` ޤ `lw` Ƥ <LW> ꤷޤ",\ + "",\ + " ǥեȤǤϡ PostScript ɤϡä˥ե륿󥰤",\ + " filledcurves Τ褦ʤǤܤΰΥѥɤĤ֤ˤơ",\ + " PostScript Level 2 ȤƾҲ𤵤Ƥ쵡ǽȤޤPostScript",\ + " Level 2 εǽϾŪݸƤơPostScript Level 1 Υ󥿡",\ + " ץ꥿顼Фषå PostScript Level 1 ˤ",\ + " Ǥ뤳Ȥɽ褦ˤʤäƤޤ`level1` ץϡ",\ + " εǽ PostScript Level1 ѤPostScript Level 2 ",\ + " ɤڻѤޤ󡣤ϸŤץ󥿤䡢Adobe Illustrator ",\ + " ŤСʤɤɬפˤʤ뤫⤷ޤ󡣤Υե饰 `level1` ",\ + " Ϥ줿 PostScript եΤԤԽ뤳Ȥǡ夫",\ + " Ū PostScript Level 1 ǽ ON/OFF ˤ뤳ȤǤޤlevel",\ + " 2 ΥɤޤޤƤ硢εǽϸʤΥե饰",\ + " åȤ줿硢뤤 PostScript 󥿥ץ꥿ץब level 2",\ + " ʾ PostScript ᤹Ȥϸʤä˷ٹʸ֤",\ + " ޤ",\ + "",\ + " `rounded` ϡüܹݤǥեȤ `butt` äü",\ + " ĥäܹѤޤ",\ + "",\ + " `clip` ϡPostScript ˤ٤ƤνϤ BoundingBox (PostScript γ)",\ + " ǥåפ뤳Ȥؼޤ; ǥեȤ `noclip` Ǥ",\ + "",\ + " `palfuncparam` `set palette functions` ϤηɤΤ褦˥",\ + " ɲ뤫椷ޤŪʿʬؿ (`set palatte functions` ",\ + " ꤵ) ϡpostscript ϤǤϷ䴰Ѥƥɲ",\ + " ޤ: ޤʬؿ <samples> Ĥɸܲ졢Ƥ",\ + " ϡ̤Ȥ䴰Ȥк <maxdeviation> ˼ޤ褦",\ + " ޤۤȤƤͭʥѥåȤǡǥեȤ <samples>",\ + " =2000 <maxdeviation>=0.003 ͤ򤽤Τޤ޻ȤΤɤǤ礦",\ + "",\ + " PostScript ϤΥǥեȤ礭 10 x 7 ǤEPS ",\ + " ϤΥǥեȤ礭 5 x 3.5 Ǥץ `size` ",\ + " 桼ꤷΤѹޤǥեȤǤ X Y Υ",\ + " ñ̤ϥȤߤʤޤ¾ñ (ߤ cm Τ) Ȥ",\ + " ȤϤǤޤ BoundingBox (PostScript եγ) ϡ",\ + " ѹ줿ٴޤ褦ꤵޤ",\ + " ꡼ɸϡץ `size` ǻꤵ줿ȤΤ 0.0",\ + " 1.0 ˤʤޤ",\ + " : `ϡϡϷǤ⡢ޥ set size ",\ + " ꤷȸäƤȤѹ̣ޤ`ˡ",\ + " BoundingBox ѹ줺˻ĤäƤޤ꡼ɸºݤ",\ + " θ³бƤޤǤ",\ + "", + "" + #endif /* JAPANESE_DOC */ END_HELP(00psglobal) START_HELP(epslatex) + #ifndef JAPANESE_DOC "1 epslatex", "?commands set terminal epslatex", "?set terminal epslatex", *************** *** 4063,4071 **** --- 4141,4324 ---- " by the `header` command. Thus, you can use `header` to overwrite some of", " settings performed using \"gnuplot.cfg\"", "" + #else /* JAPANESE_DOC */ + "1 epslatex", + "?commands set terminal epslatex", + "?set terminal epslatex", + "?set term epslatex", + "?terminal epslatex", + "?term epslatex", + "?epslatex", + " `epslatex` ɥ饤Ф LaTeX ǽ٤Ϥޤ", + "", + " :", + " set terminal epslatex {default}", + " set terminal epslatex {standalone | input}", + " {oldstyle | newstyle}", + PS_COMMON_OPTS1 + " {header <header> | noheader}", + PS_COMMON_OPTS2 + "", + " epslatex Ϸϡʸ PostScript ɤ˴ޤޤ LaTeX", + " ե˰ܤȤ `terminal postscript eps` Ʊͤ褷ޤ", + " äơ`postscript terminal` ¿Υץ󤬶̤Ǥ", + "", + " version 4.0 4.2 δ֤ˡpostscript ϷȤΤɤߴ", + " epslatex Ϥѹޤ襵 5 x 3 ", + " 5 x 3.5 ؤѹ졢ʸϽϥեȥ 50% ȸ", + " ʤƤޤߤ 60% ɾƤޤ¿ Postscript", + " 䵭Ȥޤξ֤ˤ֤ۤˤˤϥץ", + " `oldstyle` ꤷƤ(ºݤˤϤ鷺ʰ㤤Ĥޤ:", + " Υ鷺˰㤤 (tics) ϽȾʬˤʤäƤޤ", + " `set tics scale` ѹǤޤ (arrow) ˴ؤƤ", + " postscript ϷǻȤƤεǽѤǤޤ)", + "", + PS_COMMON_PROLOG_INFO + PS_COMMON_DOC1 + " `blacktext` ϡȤ顼⡼ɤǤƤʸǽ񤭤ޤ", + "", + " epslatex ɥ饤Фʸ֤̤ˡ󶡤ޤ:", + " (a) '{' ǻϤޤʸϡ'}' Ĥɬפޤʸ", + " LaTeX ˤäƿʿˤľˤ⥻󥿥󥰤ޤ", + " (b) '[' ǻϤޤʸξϡ֤λ򤹤ʸ (t,b,l,r,c Τ", + " 2 Ĥޤ) ³ ']{'ʸΡǺǸ '}' Ȥޤ", + " ʸ LaTeX LR-box Ȥޤ\\rule{}{} ȤФ", + " ɤֹ碌ǽǤ礦ʲ⻲: ɥ饤 `pslatex` ˴", + " ", + " ʣԤθФˤ \\shortstack ѤƤ㤨С", + " set ylabel '[r]{\\shortstack{first line \\\\ second line}}'", + "", + " `set label` ޥɤΥץ `back` ϻȤޤ¾νϷΤ", + " ΤȤϾäƤޤ`front` ξθФ¾ƤǤξ˽", + " ϤΤФơ`back` ȤäФ¾ƤǤβ˽Ϥ", + " ޤ", + "", + " Υɥ饤Ф 2 Ĥ̤Υեޤ1 ĤϿޤ eps ʬǡ", + " ⤦Ĥ LaTeX ʬǤLaTeX ե̾ϡ`set output` ", + " ɤΤΤȤ졢eps ե̾Ϥγĥ (̾ `.tex`) ", + " `.eps` ֤Τˤʤޤ", + " ϥեꤷʤ LaTeX ϤϹԤʤޤ !", + " `multiplot` ⡼ɰʳǤϡԤʤˤνϥե򥯥", + " Τ˺ʤǤ", + "", + " LaTeX ʸǿޤˤ '\\input{filename}' ȤƤ", + " `.eps` ե \\includegraphics{...} ޥɤǼΤǡä", + " LaTeX Υץꥢ֥ \\usepackage{graphicx} ɬפޤ", + " `textcolour` ץǿդʸѤƤϡLaTeX ", + " ץꥢ֥ \\usepackage{color} ɬפޤ", + "", + " eps ե뤫 'epstopdf' Ȥä pdf ե뤳ȤǤ", + " ޤgraphics ѥåŬڤꤵƤ硢 LaTeX Υե", + " ϡѹʤ pdflatex ˤäƤǤξ eps ե", + " pdf ե뤬ޤޤ", + "", + " եȤ˴ؤưϥإå⡼ɤ˰¸ޤ", + " ɤξǤ⡢Ϳ줿եȥϥڡη׻ˤȻѤ", + " ޤ`standalone` ⡼ɤȤʤäϡinclude ", + " μºݤ LaTeX եȤȥեȥȤΤǡäƥեȤ", + " ѹˤ LaTeX ޥɤȤäƤ㤨ХեȥȤ", + " LaTeX ʸ 12pt Ȥϡץ '\"\" 12' Ȥޤ", + " ե̵̾뤵ޤ`standalone` ȤϡͿ줿ե", + " ȤȥեȥȤޤܺ٤ϲ򻲾ȤƤ", + "", + " ʸ󤬥顼ɽ뤫ɤ TeX Bool ѿ \\ifGPcolor ", + " \\ifGPblacktext 椷ޤ\\ifGPcolor true \\ifGPblacktext ", + " false ξΤʸϥ顼ɽޤ TeX ", + " ѹ뤫ޤϤʤ TeX եŪͿƤ", + " 㤨", + " \\newif\\ifGPblacktext", + " \\GPblacktexttrue", + " 򤢤ʤΥեΥץꥢ֥˽񤭤ޤʬŪʻŪͤ", + " ͿƤʤȤΤƯޤ", + "", + " epslatex ϷȤ硢`set output` ޥɤ TeX ե̾", + " ĥդ (̾ \".tex\") ͿƤeps ե̾Ϥ", + " ĥҤ \".eps\" ֤̾ˤʤޤ", + "", + " `standalone` ⡼ɤȤ硢 LaTeX ե˴ LaTeX Υإ", + " ղä졢eps եΥե̾ˤ \"-inc\" ɲäޤ", + " `standalone` ⡼ɤϡdvips, pdfTeX, VTeX Ȥǽ", + " Ϥ褦 TeX եޤ", + " ǥեȤ `input` ⡼ɤǡ \\input ޥɤȤäơ̤", + " LaTeX ե뤫ɤ߹ޤ褦ʥեޤ", + "", + " \"\" \"default\" ʳΥե̾Ϳ줿硢 LaTeX Υ", + " ̾Ȳᤵޤϡ'fontname,fontseries,fontshape' Ρ", + " ޤǶڤ줿 3 İʲʬʤޤǥեȤΥեȥ", + " סեȥ꡼ȤϤϾάǤޤĤޤꡢե", + " ̾Фʽ񼰤ϡ'[fontname][,fontseries][,fontshape]' Ȥ", + " ޤΤʬ̾˴ؤƤ LaTeX ΥեηϤδ˽", + " ޤfontname 3 4 ʸĹǡΤ褦ʵ§ǺƤ", + " : 1 ܤեȤ¤ɽ 2 Ĥե̾ץ", + " ɲä 1 Ĥ̤ʥեȤ̣㤨 'j' ϵ켰ο", + " եȡ'x' expert եȤʤäƤޤʲˤϡ¿Υե", + " Ȥ̾ˤĤƽ񤫤Ƥޤ", + "^ <a href=\"http://www.tug.org/fontname/fontname.pdf\">", + " http://www.tug.org/fontname/fontname.pdf", + "^ </a>", + " 㤨 'cmr' Computer Modern Roman եȡ'ptm' Times-Roman,", + " 'phv' Helvetica ɽޤեȥ꡼ʸ̣", + " Ⱦ 'm' (\"medium\")'bx' ޤ 'b' (bold) ե", + " Ȥ̣ޤեȥפϰ̤ 'n' Ω (upright)'it'", + " ϥå'sl' ϼ (slanted)'sc' Ͼʸ (small caps)", + " ȤʤޤȤϰۤʤեȥ꡼եȥפͿ", + " եȤ¸ߤޤ", + "", + " :", + "", + " Times-Roman (פϼʸƱ) Ȥ:", + " set terminal epslatex 'ptm,bx'", + " Helvetica ǥåȤ:", + " set terminal epslatex 'phv,bx,it'", + " ΤΥפǼΥեȤȤ³:", + " set terminal epslatex ',,sl'", + " ʸ (small caps) Ȥ:", + " set terminal epslatex ',,sc'", + "", + " ˡǤʸΥեȤΤߤѹޤΥեȤѹ", + " ϡ\"gnuplot.cfg\" ե뤫ޤ `header` ץȤ", + " ɬפޤˤĤƤϰʲ˽񤭤ޤ", + "", + " standalone ⡼ɤǤϡեȥ `set terminal` ޥɤͿ", + " 줿եȥȤޤꤷեȥȤ뤿ˤ", + " LaTeX θѥ \"size<size>.clo\" Ȥե뤬¸ߤʤФ", + " ޤ󡣥ǥեȤǤ 10pt, 11pt, 12pt ݡȤƤޤѥ", + " \"extsizes\" 󥹥ȡ뤵ƤС8pt, 9pt, 14pt, 17pt,", + " 20pt ɲäޤ", + "", + " ץ `header` ʸޤʸϡ", + " LaTeX ե˽񤭹ޤޤ`standalone` ⡼ɤȤ硢ʸ", + " ϥץꥢ֥ \\begin{document} ޥɤľ˽񤭹ޤޤ", + " `input` ⡼ɤǤϡʸ \\begingroup ޥɤľ֤졢", + " ؤ꤬٤ƶɽŪˤʤ褦ˤޤ", + "", + " :", + "", + " T1 եȥ󥳡ǥ󥰤Ȥʸ󡢿եȤ Times-Roman", + " Ȥ󥻥եեȤ Helvetica ѹ:", + " set terminal epslatex standalone header \\", + " \"\\\\usepackage[T1]{fontenc}\\n\\\\usepackage{mathptmx}\\n\\\\usepackage{helvet}\"", + " γʸˤϱƶͿʤ褦 (boldface) ե", + " ȤȤ:", + " set terminal epslatex input header \"\\\\bfseries\"", + "", + " ե \"gnuplot.cfg\" LaTeX ˤäƸĤȡ`standalone`", + " ⡼ɤȤäƤϡ LaTeX ʸΥץꥢ֥˼", + " ޤޤɲäԤʤΤ˻Ȥޤ㤨СʸΥե", + " Ȥ TImes-Roman, Helvetica, Courier ѹ(\"mathptmx.sty\" ǰ", + " Ƥ) եȤ:", + " \\usepackage{mathptmx}", + " \\usepackage[scaled=0.92]{helvet}", + " \\usepackage{courier}", + " ե \"gnuplot.cfg\" `header` ޥɤͿإå", + " ɤ߹ޤޤäơ\"gnuplot.cfg\" ǹԤʤΤĤ", + " `header` Ȥäƾ񤭤뤳ȤǤޤ", + "" + #endif /* JAPANESE_DOC */ END_HELP(epslatex) START_HELP(pslatex) + #ifndef JAPANESE_DOC "1 pslatex and pstex", "?commands set terminal pslatex", "?set terminal pslatex", *************** *** 4145,4153 **** --- 4398,4486 ---- "", " Linewidths and pointsizes may be changed with `set style line`." "" + #else /* JAPANESE_DOC */ + "1 pslatex and pstex", + "?commands set terminal pslatex", + "?set terminal pslatex", + "?set term pslatex", + "?terminal pslatex", + "?term pslatex", + "?pslatex", + "?commands set terminal pstex", + "?set terminal pstex", + "?set term pstex", + "?terminal pstex", + "?term pstex", + "?pstex", + " `pslatex` ɥ饤Ф LaTeX ǸϤ`pstex` ɥ饤", + " Ф TeX ǸϤޤ`pslatex` dvips xdvi ", + " ǧǽ \\special ̿Ѥޤ`pstex` ޤϡǤ", + " plain-TeX ١ TeX (LaTeX ⤽Ǥ) ǼळȤǤޤ", + "", + " :", + " set terminal [pslatex | pstex] {default}", + " set terminal [pslatex | pstex]", + " {rotate | norotate}", + " {oldstyle | newstyle}", + " {auxfile | noauxfile}", + PS_COMMON_OPTS1 + " {<font_size>}", + "", + PS_COMMON_PROLOG_INFO + PS_COMMON_DOC1 + " `rotate` ꤵ y θФžޤ", + " <font_size> ϴ˾եȤ (ݥñ̤Ǥ) 礭Ǥ", + "", + " `auxfile` ꤵȡɥ饤Ф PostScript ޥɤLaTeX ե", + " ľܽϤˡե˽񤭽Ф褦ˤʤޤ", + " ϡdvips 򰷤ʤ餤礭դǤͭѤǤ", + " PostScript ե̾ϡ`set output` ޥɤͿ TeX ", + " ̾ƳΤǡϤκǸ `.tex` ʬ (ºݤ", + " ե̾κǸγĥҤʬ) `.ps` ֤ΡޤϡTeX", + " ե˳ĥҤʤʤ `.ps` Ǹդ­Τˤʤޤ", + " `.ps` ե \\special{psfile=...} Ȥ̿ `.tex` ե", + " ޤޤ`multiplot` ⡼ɰʳǤϡԤʤˤν", + " ϥե򥯥Τ˺ʤǤ", + "", + " version 4.2 gnuplot ps(la)tex ϷǤ 5 x 3 ", + " ϤǤߤǤ 5 x 3.5 ˤʤäƤޤ postscript", + " eps Ϸ˹碌ѹǤäơʸϡ epslatex ", + " ϥեȥ 50% ȸʤޤߤ 60% ɾƤ", + " η᤹ˤϡץ `oldstyle` ꤷƤ", + "", + " pslatex ɥ饤Фʸ֤̤ˡ󶡤ޤ:", + " (a) '{' ǻϤޤʸϡ'}' Ĥɬפޤʸ", + " LaTeX ˤäƿʿˤľˤ⥻󥿥󥰤ޤ", + " (b) '[' ǻϤޤʸξϡ֤λ򤹤ʸ (t,b,l,r Τ", + " 2 Ĥޤ) ³ ']{'ʸΡǺǸ '}' Ȥޤ", + " ʸ LaTeX LR-box Ȥޤ\\rule{}{} ȤФ", + " ֹ碌ǽǤ礦", + "", + " ˵ҤƤʤץ `Postscript terminal` ΤΤƱ", + " Τǡ餬ԤʤΤΤꤿФ򻲾ȤƤ", + "", + " :", + " set term pslatex monochrome dashed rotate # ǥեȤ", + " PostScript ޥɤ \"foo.ps\" ˽񤭽Ф:", + " set term pslatex auxfile", + " set output \"foo.tex\"; plot ...; set output", + " Фΰֹ碌˴ؤ:", + " gnuplot Υǥե (񤽤ʤˤʤ뤬ǤʤȤ⤢):", + " set title '\\LaTeX\\ -- $ \\gamma $'", + " ʿˤľˤ⥻󥿥:", + " set label '{\\LaTeX\\ -- $ \\gamma $}' at 0,0", + " ֤Ū˻ (˹碌):", + " set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'", + " ¾θФ -- ĹФФ븫Ѥ:", + " set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}}'", + "", + " 礭 `set style line` ѹǤޤ", + "" + #endif /* JAPANESE_DOC */ END_HELP(pslatex) START_HELP(post) + #ifndef JAPANESE_DOC "1 postscript", "?commands set terminal postscript", "?set terminal postscript", *************** *** 4410,4414 **** --- 4743,5009 ---- " other fonts you may have to try both settings. See also `fontfile`.", "", "" + #else /* JAPANESE_DOC */ + "1 postscript", + "?commands set terminal postscript", + "?set terminal postscript", + "?set term postscript", + "?terminal postscript", + "?term postscript", + "?postscript", + " `postscript` ɥ饤ФǤϤĤΥץǤޤ", + "", + " :", + " set terminal postscript {default}", + " set terminal postscript {landscape | portrait | eps}", + " {enhanced | noenhanced}", + " {defaultplex | simplex | duplex}", + " {fontfile [add | delete] \"<filename>\"", + " | nofontfiles} {{no}adobeglyphnames}", + PS_COMMON_OPTS1 + PS_COMMON_OPTS2 + PS_COMMON_PROLOG_INFO + "", + " `landscape` `portrait` ϽϤ֤֤򤷤ޤ", + " `eps` ⡼ɤ EPS (Encapsulated PostScript) Ϥޤ", + " ̾ PostScript ˡ¾¿ΥץꥱǼळ", + " Ǥ褦ˤĤιԤɲäΤǤ (ɲäԤ PostScript", + " ΥȹԤʤΤǡäƤ켫ȤȰǤޤ)EPS Ϥ", + " ˤ `eps` ⡼ɤѤ1 ĤΥեˤ 1 ĤΥդΤߡ", + " Ƥ`eps` ⡼ɤǤϥեȤޤƥΤǥեȤ", + " 礭Ⱦʬ˽̤ޤ", + "", + " `enhanced` ϳĥʸ⡼ (դʸդʸʣ", + " ΥեȤ) εǽͭˤޤܺ٤ϡʲ: `enhanced`", + " `blacktext` ϡȤ顼⡼ɤǤƤʸǽ񤭤ޤ", + "", + " PostScript ξ̰̿ (duplex) ϡץ󥿤 1 λξ̰", + " 뤳Ȥǽˤޤ`defaultplex` ϥץ󥿤ΥǥեȤ", + " `simplex` ϻ̤Τ߰`duplex` ξ̰Ԥʤޤ (", + " ʤΥץ󥿤Ԥʤʤʤ̵뤵ޤ)", + "", + " `\"<fontname>\"` ͭ PostScript եȤ̾ǡ`<fontsize>` ", + " PostScript ݥñ̤ǤΥեȤ礭Ǥ", + " ɸŪ postscript եȰʳˡɽΤ oblique", + " Symbol ե (\"Symbol-Oblique\") Ƥޤ", + "", + " `default` ƤΥץʲΥǥեȤͤꤷޤ:", + " `landscape`, `monochrome`, `dashed`, `dl 1.0`, `lw 1.0`, `defaultplex`,", + " `noenhanced`, \"Helvetica\", 14ptPostScript ΥդΥǥեȤ礭", + " ϡ10 7 ι⤵Ǥ", + PS_COMMON_DOC1 + " `fontfile` `fontfile add` ǻꤵ줿եȤϡΥեȤΥ", + " ľ postscript Type 1, TrueType եȤ gnuplot ", + " postscript Ϥ˥ץ벽ޤäơޤ줿ե", + " ȤϸФȥʤɤ˻ȤȤǤޤܺ٤ϡʲ:", + " `postscript fontfile``fontfile delete` ˤäƥեȥե", + " ޤեΰȤǤޤ", + " `nofontfiles` ߥեȤΥꥹȤ򥯥ꥢޤ", + "", + " :", + " set terminal postscript default # postscript", + " set terminal postscript enhanced # enhpost", + " set terminal postscript landscape 22 # psbig", + " set terminal postscript eps 14 # epsf1", + " set terminal postscript eps 22 # epsf2", + " set size 0.7,1.4; set term post portrait color \"Times-Roman\" 14", + " set term post \"VAGRoundedBT_Regular\" 14 fontfile \"bvrr8a.pfa\"", + "", + " 礭 `set style line` ѹǤޤ", + "", + " `postscript` ɥ饤Ф 70 ΰۤʤ򥵥ݡȤƤơ", + " `plot` `set style line` `pointtype` ץǤޤ", + "", + " `gnuplot` Postscript ˴ؤ¿ʬͭѤȻפե뤬 `gnuplot`", + " ʪޤϤۥȤ /docs/psdos ֥ǥ쥯ȥˤ", + " ĤޤޤƤޤˤ \"ps_symbols.gpi\" (¹Ԥ `postscript`", + " ɥ饤ФǻȤƤεҲ𤹤 \"ps_symbols.ps\" Ȥե", + " `gnuplot` Υޥɥե)\"ps_guide.ps\" (ĥ줿񼰤", + " ؤȡʸ 8 ʥɤΡsymbol ե", + " ޤ PostScript ե)\"ps_file.doc\" (`gnuplot` Ǻ", + " PostScript եι¤ޤƥȥե)", + " \"ps_fontfile_doc.tex\" (եȤʸΰ LaTeX ΥեȤ", + " ߤ˴ؤûޤ LaTeX ե) ޤ", + "", + " PostScript եԽǽǡ `gnuplot` ǤС", + " ˾褦˽뤳Ȥϼͳ˹ԤʤޤΤΥҥȤˤϡ", + " ʲ: `editing postscript` ᡣ", + "2 PostScript Խ (editing postscript)", + "?commands set terminal postscript editing", + "?set terminal postscript editing", + "?set term postscript editing", + "?terminal postscript editing", + "?term postscript editing", + "?editing_postscript", + "?editing postscript", + " PostScript ϤȤƤʣʸǡǾܺ٤򵭽Ҥ뤳ȤϤȤƤ", + " Ǥޤ󡣤Ǥ⡢`gnuplot` Ǻ PostScript եˤϡ", + " ̿Ūʥ顼򤽤ΥեƳƤޤΤʤѹԤʤ", + " ǽʬޤ", + "", + " 㤨СPostScript ʸ \"/Color true def\" (`set terminal postscript color`", + " ޥɤƥե˽񤭹ޤޤ) ѹơ", + " ΤˤˡϤ狼Ǥ礦Ʊͤˡοʸο", + " (weight)Υ⡢˴ñ˽񤭴Ǥ礦ȥ", + " 丫Фʤɤʸθ䡢եȤѹԽǽǤ礦Ǥդ", + " Τ֤ѹǤޤǤդΤΤɲäꡢ", + " Ǥޤν PostScript ομɬפǤ礦", + "", + " `gnuplot` ˤäƺ PostScript եι˴ؤƤϡgnuplot", + " Υʪ docs/ps ǥ쥯ȥΥƥȥե \"ps_file.doc\"", + " ˽Ҥ٤Ƥޤ", + "2 postscript fontfile", + "?commands set terminal postscript fontfile", + "?set terminal postscript fontfile", + "?set term postscript fontfile", + "?terminal postscript fontfile", + "?term postscript fontfile", + "?postscript fontfile", + "?fontfile", + " ץ `fontfile` ޤ `fontfile add` 1 ĤΥե̾", + " ȤƻΥե postscript ˥ץ벽ߡ", + " ˤä͡ʸ (٥롢긫Фȥ) 򤽤", + " եȤǽϤ뤳Ȥǽˤޤץ `fontfile delete` ", + " 1 ĤΥե̾˻Υե̾򥫥ץ벽ե", + " ΥꥹȤޤ", + "", + " postscript ϥɥ饤ФϤĤΥեȥեǧޤ:", + " ASCII Type 1 ե (ĥ \".pfa\")Хʥ Type 1 ", + " (ĥ \".pfb\")TrueType ե (ĥ \".ttf\")pfa ե", + " ľǧޤpfb ttf ե gnuplot μ¹¹Ԥ", + " Ѵ졢ΤŬڤѴġ () 󥹥ȡ뤵", + " ɬפޤե̾ϳĥҤޤƴʷǻꤹɬפ", + " ޤ `fontfile` ץϤ礦ɰĤΥեȥե̾", + " бޤΤǡʣΥեȥեिˤϤΥץ", + " ʣȤäƲ", + "", + " եȥեϡȥǥ쥯ȥꡢ `set fontpath` Ϳ", + " եȥѥƤΥǥ쥯ȥ꤬ޤˡĶѿ", + " GNUPLOT_FONTPATH ǥեȥѥꤹ뤳ȤǤޤ줬ꤵ", + " ƤʤϥǥեȤθꥹȤȤޤϥƥ", + " ¸ޤܺ٤ϡʲ: `set fontpath`", + "", + " ޤ줿եȥեȤˤϡե̾ (̾ե̾Ʊ", + " ǤϤޤ) ꤹɬפޤå⡼ɤ `fontfile` ", + " ץȤäƥեȤ硢ե̾ϥ꡼ɽ", + " ޤ:", + " Font file 'p052004l.pfb' contains the font 'URWPalladioL-Bold'. Location:", + " /usr/lib/X11/fonts/URW/p052004l.pfb", + "", + " pfa pfb եȤǤϡե̾ϥեȥե˸Ĥ뤳", + " Ǥޤեȥե \"/FontName /URWPalladioL-Bold def\" ", + " 褦ʹԤޤοʪ / Τե̾Ǥ", + " ξ \"URWPalladioL-Bold\" Ȥʤޤ", + " TrueType եȤǤϡե̾ϥХʥ¸ƤΤǸ", + " ĤΤưפǤϤޤ󡣤ˡ̾¿ξ硢Type 1 ", + " (¹ TrueType ѴǤ) ǤϥݡȤƤ", + " ʤڡޤˤʤäƤޤΤᡢե̾Ϥ", + " 饹ڡѴޤgnuplot ǻȤ줿", + " ե̾Ǥ뤫ΤǤñˡϡgnuplot å⡼ɤǵ", + " ươʲΤ褦Ϥ뤳ȤǤ:", + " \"set terminal postscript fontfile '<filename.ttf>'\".", + "", + " եȥե (ttf, pfb) pfa Ѵ뤿ˡեȥե", + " ɤǡѴ̤ɸϤǤФѴġ뤬ɬפˤʤ", + " ޤνϤɸϤ˽񤭽ФȤǤʤ硢¹ѴϤ", + " ޤ", + "", + " pfb եФƤϡ㤨 \"pfbtops\" Ȥޤ줬ƥ", + " ˥󥹥ȡ뤵ƤС¹ѴϤޤԤϤǤpfb ե", + " Υץ벽äȤäƤߤޤ礦⤷ץѴ", + " ġƤӽФƤʤϡɤΤ褦˥ġƤӽФɤ", + " Ķѿ GNUPLOT_PFBTOPFA ˡ㤨 \"pfbtops %s\" Τ褦", + " Ʋ`%s` ϥեȥե֤̾ޤΤǡϤ", + " ʸɬɬפǤ", + "", + " ¹Ѵ򤷤ʤơɤ pfa ΥեɬפǤ", + " 硢\"pfb2pfa\" Ȥ C ǽ񤫤줿ñʥġȤɤǤ礦", + " C ѥǥѥǤ ftp Ф֤", + " ޤ㤨", + "^ <a href=\"ftp://ftp.dante.de/tex-archive/fonts/utilities/ps2mf/\">", + " ftp://ftp.dante.de/tex-archive/fonts/utilities/ps2mf/", + "^ </a>", + " ºݤ \"pfbtopfa\" \"pfb2ps\" ƱȤԤޤ\"pfbtops\" Ϸ̤", + " pfa ɤɸϤ˽Ϥޤ\"pfbtopfa\" ϥե˽Ϥޤ", + "", + " TrueType եȤϡ㤨 \"ttf2pt1\" ȤġȤä Type 1 pfa", + " եޥåȤѴǤޤϰʲˤޤ:", + "^ <a href=\"http://ttf2pt1.sourceforge.net/\">", + " http://ttf2pt1.sourceforge.net/", + "^ </a>", + " ⤷ gnuplot Ȥ߹ޤƤѴ礬ޤԤʤ硢Ѵ", + " ɤϴĶѿ GNUPLOT_TTFTOPFA ѹǤޤttf2pt1 Ȥϡ", + " \"ttf2pt1 -a -e -W 0 %s - \" Τ褦ꤷƲǤ", + " `%s` ϥե̣̾ޤ", + "", + " üӤΤˡѥפȤ褦ˤʤäƤޤ (ѥפ򥵥ݡ", + " Ƥ OS )ե̾ \"<\" ǻϤᡢθ˥ץƤӽФ", + " ɲäޤΥץϤɸϤؤ pfa ǡǤʤФ", + " ޤ󡣷̤Ȥ pfa ե㤨аʲΤ褦ˤƥ", + " 뤳Ȥˤʤޤ: `set fontfile \"< cat garamond.pfa\"`", + "", + " Type 1 եȤळȤϡ㤨 LaTeX ʸ postscript ե", + " ˻Ȥޤpfb \"european computer modern\" ", + " (\"computer modern\" եȤΰ) Ϥ CTAN Ф֤", + " Ƥޤ", + "^ <a href=\"ftp://ftp.dante.de/tex-archive/fonts/ps-type1/cm-super/\">", + " ftp://ftp.dante.de/tex-archive/fonts/ps-type1/cm-super/", + "^ </a>", + " 㤨Сե \"sfrm1000.pfb\" ϡդΩΤ 10 ݥ", + " ȤΥե (ե̾ \"SFRM1000\") Ǥcomputer modern եȤ", + " Ǥ񤯤ΤɬפǤϰʲˤޤ:", + "^ <a href=\"ftp://ftp.dante.de/tex-archive/fonts/cm/ps-type1/bluesky\">", + " ftp://ftp.dante.de/tex-archive/fonts/cm/ps-type1/bluesky", + "^ </a>", + " ˤäơTeX ѤǤդʸȤޤcomputer modern", + " եȤϾ󥳡ǥ󥰤ʤäƤޤ (Τᡢʸ", + " ˤ cmr10.pfb sfrm1000.pfb Ȥ٤Ǥ)", + " TeX եȤλˡϤĤΥǥΰĤΤ뤳ȤǤޤ", + " `gnuplot` Υʪ /docs/psdoc ˴ޤޤե", + " \"ps_fontfile_doc.tex\" TeX إեȤʸΰɽޤޤƤ", + " ", + "", + " ե \"CMEX10\" (ե \"cmex10.pfb\") ȡgnuplot ", + " ɲåե \"CMEX10-Baseline\" ޤϡ¾ʸˤ", + " ˿ľˤ餵줿ΤǤ (CMEX10 ϡŷդ˥١饤", + " ޤ)", + "2 PostScript prologue ե", + "?commands set terminal postscript prologue", + "?set terminal postscript prologue", + "?terminal postscript prologue", + "?postscript prologue", + "?prologue", + " PostScript ϥե %%Prolog ޤߤޤ㤨ʸ", + " 󥳡ǥ󥰤ʤɤޤɲå桼ޤफ⤷ޤ", + " 󡣤Υϡgnuplot μ¹ԥե˥ѥ뤵", + " 롢뤤ϤʤΥԥ塼̤ΤȤ¸Ƥ", + " PostScript prologue ե뷲饳ԡޤΥե뤬", + " ǥեȤΥǥ쥯ȥϡgnuplot Υ󥹥ȡꤵ", + " ΥǥեȤ gnuplot ޥɤ `set psdir` ȤĶ", + " GNUPLOT_PS_DIR 뤳ȤѹǤޤʲ: `set psdir`", + "2 postscript adobeglyphnames", + "?commands set terminal postscript adobeglyphnames", + "?set terminal postscript adobeglyphnames", + "?terminal postscript adobeglyphnames", + "?postscript adobeglyphnames", + "?adobeglyphnames", + "=UTF-8", + " ϡUTF-8 󥳡ǥ󥰤Ǥ PostScript ϤˤΤߴطޤ", + " ϡ0x00FF 礭 Unicode ȥݥ (Ĥޤ Latin1 ", + " Τ٤) ʸ򵭽ҤΤ˻Ȥ̾椷ޤ̤ˡ", + " unicode ʸϰդ̾ unicode ֹ椷ޤ", + " 󡣤Adobe ϡϰϤʸ (ĥƥʸꥷʸ)", + " ̾Ƥ侩§äƤޤեȤˤäƤϤε§", + " ѤƤΤޤǤʤΤ⤢ޤgnuplot ϥǥե", + " ȤǤ Adobe ̾Ѥޤ㤨СꥷʸξʸΥ", + " ե /alpha Ȥʤޤ`noadobeglyphnames` ꤷ硢ʸ", + " Ф gnuplot /uni03B1 ȤȤޤ", + " ǤʤäȤСϤʸեˤˤ", + " 餺줬ĤʤǤAdobe եȤФƤϡǥե", + " ȤȤΤ⤷ޤ󤬡¾ΥեȤǤξ", + " ƤߤʤȤʤ⤷ޤ󡣰ʲ⻲: `fontfile`", + "", + "" + #endif /* JAPANESE_DOC */ END_HELP(post) #endif /* TERM_HELP */ diff -rc term/pstricks.trm.ORG term/pstricks.trm *** term/pstricks.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/pstricks.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 673,678 **** --- 673,679 ---- #ifdef TERM_HELP START_HELP(pstricks) + #ifndef JAPANESE_DOC "1 pstricks", "?commands set terminal pstricks", "?set terminal pstricks", *************** *** 694,698 **** --- 695,723 ---- "", " The first option invokes an ugly hack that gives nicer numbers; the second", " has to do with plot scaling. The defaults are `hacktext` and `nounit`." + #else /* JAPANESE_DOC */ + "1 pstricks", + "?commands set terminal pstricks", + "?set terminal pstricks", + "?set term pstricks", + "?terminal pstricks", + "?term pstricks", + "?pstricks", + " `pstricks` ɥ饤Ф LaTeX \"pstricks.sty\" ޥѥåȶ˻", + " 뤳ȤտޤƤޤ `eepic` `latex` ɥ饤Ф", + " ΰĤǤ\"pstricks.sty\" ɬפǤ PostScript ", + " ᤹ץ󥿡ޤ Ghostscript Τ褦ѴեȤɬפǤ", + "", + " PSTricks anonymous ftp Princeton.EDU /pub ǥ쥯ȥ꤫", + " ǤޤΥɥ饤ФϡPSTricks ѥåƤǽϤȤ", + " ʤɤȤͤƤϤޤ", + "", + " :", + " set terminal pstricks {hacktext | nohacktext} {unit | nounit}", + "", + " ǽΥץϡޤǤϤʤˡǿΤɤϤ", + " Τǡ2 ܤΥץϥդ򿭽̤ݤˤɬפǤǥե", + " ȤǤ `hacktext` `nounit` Ǥ" + #endif /* JAPANESE_DOC */ END_HELP(pstricks) #endif /* TERM_HELP */ diff -rc term/qms.trm.ORG term/qms.trm *** term/qms.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/qms.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 225,230 **** --- 225,231 ---- #ifdef TERM_HELP START_HELP(qms) + #ifndef JAPANESE_DOC "1 qms", "?commands set terminal qms", "?set terminal qms", *************** *** 234,238 **** --- 235,250 ---- "?qms", " The `qms` terminal driver supports the QMS/QUIC Laser printer, the Talaris", " 1200 and others. It has no options." + #else /* JAPANESE_DOC */ + "1 qms", + "?commands set terminal qms", + "?set terminal qms", + "?set term qms", + "?terminal qms", + "?term qms", + "?qms", + " `qms` ɥ饤Ф QMS/QUIC 졼ץ󥿡Talaris 1200¾򥵥", + " ȤޤץϤޤ" + #endif /* JAPANESE_DOC */ END_HELP(qms) #endif diff -rc term/qt.trm.ORG term/qt.trm *** term/qt.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/qt.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 73,78 **** --- 73,79 ---- #ifdef TERM_HELP START_HELP(qt) + #ifndef JAPANESE_DOC "1 qt", "?set terminal qt", "?terminal qt", *************** *** 162,166 **** --- 163,260 ---- " chosen when the program is compiled. You can override that by defining", " the environment variable GNUPLOT_DRIVER_DIR to point to a different", " location." + #else /* JAPANESE_DOC */ + "1 qt", + "?set terminal qt", + "?terminal qt", + "?set term qt", + "?term qt", + "?qt", + " `qt` ϷϡQt 饤֥Ѥ̥ɥؤνϤޤ", + "", + " :", + " set term qt {<n>}", + " {size <width>,<height>}", + " {{no}enhanced}", + " {font <font>}", + " {title \"title\"}", + " {{no}persist}", + " {{no}raise}", + " {{no}ctrl}", + " {close}", + " {widget <id>}", + "", + " ʣ襦ɥ⥵ݡȤƤơ`set terminal qt <n>` Ȥ", + " ֹ n 襦ɥؽϤޤ", + "", + " ǥեȤΥɥȥϡΥɥֹ˴ŤƤޤ", + " Υȥϥ \"title\" ǤǤޤ", + "", + " 襦ɥϡ`gnuplot` νϷ̤ʤΤѹǤⳫ", + " ޤ޻Ĥޤ襦ɥϡΥɥϥեä", + " ֤ʸ 'q' ǤĤɥޥ͡˥塼 `close` ", + " 򤹤뤫ޤ `set term qt <n> close` Ȥ뤳ȤĤ뤳ȤǤ", + " ޤ", + "", + " ΰΥϥԥñ̤ͿޤǥեȤ 640x480 Ǥ", + " ˲äơɥμºݤΥˤϡġС䥹ơС", + " ѤΥڡɲäޤ", + " ɥΥѹȡ襰դ⥦ɥο", + " Ԥä礦褦ˤ˿̤ޤ`qt` Ϸϥեȡ", + " Τ򿭽̤ޤΤΥڥϰݤޤ", + " θ `replot` ȥפ뤫ߥʥġС `replot` ", + " 򥯥å뤫 `plot` ޥɤϤȡο", + " ǤϴˤΥɥ˹碌ޤեȥϤ" + " ΥǥեȤ˥ꥻåȤޤ", + "", + " ߤ襦ɥ (`set term qt <n>` 򤵤줿) ÷ǡ", + " εưϡ¾νϷȶ̤Ǥܺ٤ϡʲ: `mouse`ˤ", + " ɲäΥ⤤ĤĤƤޤϤ켫ΤŪʤ", + " ˤʤäƤϤǤ", + "", + " νϷϡĥʸ⡼ (enhanced text mode) 򥵥ݡȤ", + " ƤơեȤ񼰥ޥ (ադʤ) ٥¾ʸ", + " ळȤǤޤĥʸ⡼ɤν񼰤ϡgnuplot ¾ν", + " Ϸȶ̤Ǥܺ٤ϡʲ: `enhanced`", + "", + " <font> \"FontFace,FontSize\" ηǡFontFace FontSize Ȥ", + " ޤʬΥưĤʸȤƽ񤭤ޤFontFace ϡ\'Arial\' Τ", + " ̾Υե̾ǤFontFace Ϳʤϡqt Ϸ", + " \'Sans\' ѤޤFontSize ϥݥñ̤ΥեȥǤ", + " FontSize Ϳʤϡqt Ϸ 9 ݥȤѤޤ", + " :", + " set term qt font \"Arial,12\"", + " set term qt font \"Arial\" # ե̾Τѹ", + " set term qt font \",12\" # եȥΤѹ", + " set term qt font \"\" # ե̾եȥꥻå", + "", + " Qt Υ®٤ϡѤ󥰥⡼ɤˤä礭Ѥ", + " ޤQt С 4.7 ʹߤǤϡϴĶѿ QT_GRAPHICSSYSTEM ", + " Ǥ褦ˤʤäƤޤꤹ륪ץϡ®٤", + " ˡ\"native\", \"raster\", \"opengl\" ȤʤäƤޤ Qt ", + " ǤǤϡνϷǤϥǥեȤ \"raster\" ˤޤ", + "", + " ǽʸ¤ǤɤϤ뤿ˡΥ󥰤ϥꥢ", + " Сץ󥰡ҥ󥰤 3 ĤεäƤޤ", + " Сץ󥰤ϡꥢȤǥԥ⾮", + " Ǥ٤󶡤gnuplot ɸľ񤱤褦ˤʤޤ", + " ϡгľ (㤨 'plot x') ɤΤ򤱤ޤ", + " ҥƥ󥰤ϡСץ󥰤ˤäưʿľ", + " ʬΤܤ򤱤ޤνϷϡľɸ·", + " ˤꡢ1 ԥľ 1 (1 Ĥ¿⾯ʤ", + " ʤ) Υԥ褷ޤ", + "", + " ǥեȤǤϡ褬Ԥ줿Ȥ˥ɥϥǥȥåפΰ־", + " () ɽޤϡ \"raise\" Ǥޤ", + "  \"persist\" ϡ٤Ƥ襦ɥŪĤʤ", + " ϡgnuplot λʤ褦ˤޤ", + " ǸˡǥեȤǤ <space> gnuplot 󥽡륦ɥ", + " ˾夲'q' 襦ɥĤޤ \"ctrl\" ϡ", + " ΥƤ򡢤줾 <ctrl>+<space> <ctrl>+'q' ѹޤ", + "", + " ץΥѥ򤷤ˡgnuplot γɥ饤", + " gnuplot_qt 󥹥ȡ뤵ޤĶѿ GNUPLOT_DRIVER_DIR ", + " ʾꤹ뤳Ȥ֤ѹ뤳ȤǤޤ" + #endif /* JAPANESE_DOC */ END_HELP(qt) #endif /* TERM_HELP */ diff -rc term/regis.trm.ORG term/regis.trm *** term/regis.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/regis.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 258,263 **** --- 258,264 ---- #ifdef TERM_HELP START_HELP(regis) + #ifndef JAPANESE_DOC "1 regis", "?commands set terminal regis", "?set terminal regis", *************** *** 270,274 **** --- 271,290 ---- "", " Syntax:", " set terminal regis {4 | 16}" + #else /* JAPANESE_DOC */ + "1 regis", + "?commands set terminal regis", + "?set terminal regis", + "?set term regis", + "?terminal regis", + "?term regis", + "?regis", + " `regis` ɥ饤Ф REGIS եåǤνϤޤΥ", + " 饤ФˤϿ 4 Ȥ (ǥե) 16 ȤΥץ󤬤", + " ", + "", + " :", + " set terminal regis {4 | 16}" + #endif /* JAPANESE_DOC */ END_HELP(regis) #endif diff -rc term/sun.trm.ORG term/sun.trm *** term/sun.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/sun.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 360,365 **** --- 360,366 ---- #ifdef TERM_HELP START_HELP(sun) + #ifndef JAPANESE_DOC "1 sun", "?commands set terminal sun", "?set terminal sun", *************** *** 369,373 **** --- 370,385 ---- "?sun", " The `sun` terminal driver supports the SunView window system. It has no", " options." + #else /* JAPANESE_DOC */ + "1 sun", + "?commands set terminal sun", + "?set terminal sun", + "?set term sun", + "?terminal sun", + "?term sun", + "?sun", + " `sun` ɥ饤Ф SunView ɥƥ򥵥ݡȤƤޤ", + " Ϥޤ" + #endif /* JAPANESE_DOC */ END_HELP(sun) #endif diff -rc term/svg.trm.ORG term/svg.trm *** term/svg.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/svg.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 1943,1948 **** --- 1943,1949 ---- #ifdef TERM_HELP START_HELP(svg) + #ifndef JAPANESE_DOC "1 svg", "?commands set terminal svg", "?set terminal svg", *************** *** 1994,1998 **** --- 1995,2055 ---- " the desired font. Gnuplot will look for the requested file using the", " directory list in the GNUPLOT_FONTPATH environmental variable.", " NB: You must embed an svg font, not a TrueType or PostScript font." + #else /* JAPANESE_DOC */ + "1 svg", + "?commands set terminal svg", + "?set terminal svg", + "?set term svg", + "?terminal svg", + "?term svg", + "?svg", + " Υɥ饤Ф W3C SVG (Scalable Vector Graphics) եޥåȤ", + " ޤ", + "", + " :", + " set terminal svg {size <x>,<y> {|fixed|dynamic}}", + " {{no}enhanced}", + " {fname \"<font>\"} {fsize <fontsize>}", + " {mouse} {jsdir <dirname>} {name <plotname>}", + " {font \"<fontname>{,<fontsize>}\"}", + " {fontfile <filename>}", + " {rounded|butt} {solid|dashed} {linewidth <lw>}", + " {background <rgb_color>}", + "", + " <x> <y> SVG դΥǤ`dynamic` ", + " svg ӥ塼Υꥵ`fixed` Х׵ᤷޤ", + " (ǥե)", + "", + " `linewidth <w>` ϿޤǻѤƤ <w> ä", + " ޤ", + "", + " <font> ϥǥեȤȤƻȤե̾ (ǥեȤǤ Arial)", + " <fontsize> ϥݥñ̤ǤΥեȥ (ǥեȤ 12) Ǥ", + " svg ӥ塼諒եȤϡΥեɽκݤˤ̤ѥեȤȤ", + " ȤˤʤǤ礦", + "", + " svg Ϸϳĥʸǽ (enhanced) 򥵥ݡȤƤޤ", + " ϡեȻ¾ν̿٥¾ʸळȤ", + " ǽˤޤĥʸ⡼ɤν񼰻¾νϷξƱ", + " ܺ٤ϡʲ: `enhanced`", + "", + " ץ `mouse` ϡб key ǥå뤳ȤǤ줾Υ", + " On/Off ˤ뵡ǽ򥵥ݡȤ javascript ⥸塼ؤΥ", + " ळȤ gnuplot ˻ؼޤǥեȤǤϡΥץ", + " ϥǥ쥯ȥꡢ̤ /usr/local/share/gnuplot/<version>/js ", + " ޤץ `jsdir` ̤Υǥ쥯ȥ꤫̾", + " URL ꤹ뤳ȤǤѹǤޤSVG Web ڡ", + " ǤС̤ϸԤ URL ꤷޤ", + "", + " SVG ǤϡSVG ʸ˥եȤľळȤǤޤʥ", + " ȤؤΥϥѡ󥯤Ϳ뤳ȤǤޤ`fontfile` ץ", + " ˤϡ̤ȤƽϤ SVG ե <defs> ˥", + " ե̾ꤷޤΥեϡ켫Ȥե", + " ȤޤǤ뤫ޤϴԤեȤ򻲾Ȥϥѡ󥯤", + " 뤿ιԤޤΤΤɤ餫Ǥgnuplot ϡĶѿ", + " GNUPLOT_FONTPATH Υǥ쥯ȥꥹȤ׵ᤵ줿եõޤ", + " : TrueType PostScript եȤǤϤʤ svg եȤɬ", + " ޤ" + #endif /* JAPANESE_DOC */ END_HELP(svg) #endif diff -rc term/t410x.trm.ORG term/t410x.trm *** term/t410x.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/t410x.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 315,320 **** --- 315,321 ---- #ifdef TERM_HELP START_HELP(tek410x) + #ifndef JAPANESE_DOC "1 tek410x", "?commands set terminal tek410x", "?set terminal tek410x", *************** *** 324,328 **** --- 325,340 ---- "?tek410x", " The `tek410x` terminal driver supports the 410x and 420x family of Tektronix", " terminals. It has no options." + #else /* JAPANESE_DOC */ + "1 tek410x", + "?commands set terminal tek410x", + "?set terminal tek410x", + "?set term tek410x", + "?terminal tek410x", + "?term tek410x", + "?tek410x", + " `tek410x` ɥ饤Ф Tektronix 410x, 420x եߥ꡼򥵥ݡȤƤ", + " ץϤޤ" + #endif /* JAPANESE_DOC */ END_HELP(tek410x) #endif diff -rc term/tek.trm.ORG term/tek.trm *** term/tek.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/tek.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 798,803 **** --- 798,804 ---- #ifdef TERM_HELP START_HELP(tek40) + #ifndef JAPANESE_DOC "1 tek40", "?commands set terminal tek40xx", "?set terminal tek40xx", *************** *** 855,859 **** --- 856,920 ---- " `km-tek40xx` supports them in monochrome. `selanar` supports Selanar graphics.", " `bitgraph` supports BBN Bitgraph terminals.", " None have any options." + #else /* JAPANESE_DOC */ + "1 tek40", + "?commands set terminal tek40xx", + "?set terminal tek40xx", + "?set term tek40xx", + "?terminal tek40xx", + "?term tek40xx", + "?tek40", + "?commands set terminal vttek", + "?set terminal vttek", + "?set term vttek", + "?terminal vttek", + "?term vttek", + "?vttek", + "?commands set terminal xterm", + "?set terminal xterm", + "?set term xterm", + "?terminal xterm", + "?term xterm", + "?xterm", + #ifdef KERMIT + "?commands set terminal kc-tek40xx", + "?set terminal kc-tek40xx", + "?set term kc-tek40xx", + "?terminal kc-tek40xx", + "?term kc-tek40xx", + "?kc-tek40xx", + "?commands set terminal km-tek40xx", + "?set terminal km-tek40xx", + "?set term km-tek40xx", + "?terminal km-tek40xx", + "?term km-tek40xx", + "?km-tek40xx", + #endif + #ifdef SELANAR + "?commands set terminal selanar", + "?set terminal selanar", + "?set term selanar", + "?terminal selanar", + "?term selanar", + "?selanar", + #endif + #ifdef BITGRAPH + "?commands set terminal bitgraph", + "?set terminal bitgraph", + "?set term bitgraph", + "?terminal bitgraph", + "?term bitgraph", + "?bitgraph", + #endif + " Υɥ饤з VT-饤üΤĤ򥵥ݡȤޤ`tek40xx`", + " Tektronix 4010 Ȥ¾ۤȤɤ TEK ߥ졼򥵥ݡȤޤ", + " `vttek` VT-饤 tek40xx üߥ졼򥵥ݡȤޤ", + " ʲΤΤϡgnuplot Υѥ򤵤줿ΤΤߤѤǤޤ:", + " `kc-tek40xx` ϥ顼 MS-DOS Kermit Tek4010 ߥʥ륨ߥ졼", + " `km-tek40xx` ϤǤ򥵥ݡȤޤ", + " `selanar` Selanar եåü򥵥ݡȤޤ", + " `bitgraph` BBN Bitgraph ü򥵥ݡȤޤ", + " ⥪ץϤޤ" + #endif /* JAPANESE_DOC */ END_HELP(tek40) #endif /* TERM_HELP */ diff -rc term/texdraw.trm.ORG term/texdraw.trm *** term/texdraw.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/texdraw.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 368,373 **** --- 368,374 ---- #ifdef TERM_HELP START_HELP(texdraw) + #ifndef JAPANESE_DOC "1 texdraw", "?commands set terminal texdraw", "?set terminal texdraw", *************** *** 384,388 **** --- 385,409 ---- " of any LaTeX implementation. Please do not forget to use this package.", "", " It has no options." + #else /* JAPANESE_DOC */ + "1 texdraw", + "?commands set terminal texdraw", + "?set terminal texdraw", + "?set term texdraw", + "?terminal texdraw", + "?term texdraw", + "?texdraw", + " `texdraw` ɥ饤Ф LaTeX texdraw Ķ򥵥ݡȤޤ texdraw", + " ѥå \"texdraw.sty\" \"texdraw.tex\" ȶ˻Ѥ뤳Ȥ", + " Ƥޤ", + "", + " ǡ (point) ϡLaTeX Υޥ \"\\Diamond\", \"\\Box\" ʤɤ", + " ȤäޤΥޥɤϸߤ LaTeX2e Υˤ¸ߤ", + " latexsym ѥå˴ޤޤƤޤΥѥåۤΰ", + " ꡢä¿ LaTeX ΥƥΰˤʤäƤޤΥѥå", + " ȤȤ˺ʤǤ", + "", + " ץϤޤ" + #endif /* JAPANESE_DOC */ END_HELP(texdraw) #endif /* TERM_HELP */ diff -rc term/tgif.trm.ORG term/tgif.trm *** term/tgif.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/tgif.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 1714,1719 **** --- 1714,1720 ---- #ifdef TERM_HELP START_HELP(tgif) + #ifndef JAPANESE_DOC "1 tgif", "?commands set terminal tgif", "?set terminal tgif", *************** *** 1784,1789 **** --- 1785,1863 ---- " # and 2 in the y-direction", " set terminal tgif landscape [3,3] # landscape; 3 plots in both", " # directions" + #else /* JAPANESE_DOC */ + "1 tgif", + "?commands set terminal tgif", + "?set terminal tgif", + "?set term tgif", + "?terminal tgif", + "?term tgif", + "?tgif", + " Tgif X11 ١ΥɥġǤ --- GIF ˴ؤƲ", + " 櫓ǤϤޤ", + "", + " `tgif` ɥ饤Фʣ礭 (`set pointsize` )ʣθФ", + " Υեȡեȥ (㤨 `set label \"Hallo\" at x,y font", + " \"Helvetica,34\"`) 1 ڡʣΥ򥵥ݡȤޤ", + " Ψѹޤ", + "", + " :", + " set terminal tgif {portrait | landscape | default} {<[x,y]>}", + " {monochrome | color}", + " {{linewidth | lw} <LW>}", + " {solid | dashed}", + " {font \"<fontname>{,<fontsize>}\"}", + "", + " <[x,y]> ˤϤΥڡ x y Υդοꤷ", + " `color` ϥ顼ǽͭˤ`linewidth` Ƥ <LW> ܤ", + " \"<fontname>\" ˤͭ PostScript ե̾<fontsize> Ϥ", + " PostScript եȤ礭ꤷޤ`defaults` ƤΥץ", + " ͤǥեȤͤ˥åȤޤǥեȤ `portrait`, `[1,1]`,", + " `color`, `linewidth 1.0`, `dashed`, `\"Helvetica,18\"` Ǥ", + "", + " `solid` ץϡԽˤǤ褦ˡ顼Ǥ", + " ̻Ȥޤϡɥԡˤʤ뤳Ȥ¿Τǡξ", + " `dashed` 򤹤٤Ǥ礦", + "", + " ¿ (multiplot) 2 ˡǼƤޤ", + "", + " ΰĤϡɸŪ gnuplot ¿ΤǤ:", + "", + " set terminal tgif", + " set output \"file.obj\"", + " set multiplot", + " set origin x01,y01", + " set size xs,ys", + " plot ...", + " ...", + " set origin x02,y02", + " plot ...", + " unset multiplot", + "", + " ܤˤĤƤϡʲ: `set multiplot`", + "", + " ⤦Ĥˡϥɥ饤Ф [x,y] ץǤˡĹϡ", + " (origin) 礭 (size) 򤷤ʤƤƤΥդưŪ˽", + " ܤ֤뤳ȤǤդ x/y ϡ 3/2 (ޤ `set", + " size` ꤵ줿) ݻޤ", + "", + " ξ¿μ򤵤줿硢ɸŪʤ򤵤졢", + " Υåɽޤ", + "", + " ñ (ޤɸŪ¿) :", + " set terminal tgif # ǥե", + " set terminal tgif \"Times-Roman,24\"", + " set terminal tgif landscape", + " set terminal tgif landscape solid", + "", + " ɥ饤Фλ¿λȤߤѤ:", + " set terminal tgif portrait [2,4] # ֡x- 2 ġy-", + " # 4 ĤΥ", + " set terminal tgif [1,2] # ֡x- 1 ġy-", + " # 2 ĤΥ", + " set terminal tgif landscape [3,3] # ֡ξ 3 ĤΥ", + " # " + #endif /* JAPANESE_DOC */ END_HELP(tgif) #endif /*{{{}}}*/ diff -rc term/tkcanvas.trm.ORG term/tkcanvas.trm *** term/tkcanvas.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/tkcanvas.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 611,616 **** --- 611,617 ---- #ifdef TERM_HELP START_HELP(tkcanvas) + #ifndef JAPANESE_DOC "1 tkcanvas", "?commands set terminal tkcanvas", "?set terminal tkcanvas", *************** *** 661,665 **** --- 662,720 ---- " coordinates of the midpoint are only filled for logarithmic axes.", "", " The current version of `tkcanvas` supports neither `multiplot` nor `replot`." + #else /* JAPANESE_DOC */ + "1 tkcanvas", + "?commands set terminal tkcanvas", + "?set terminal tkcanvas", + "?set term tkcanvas", + "?terminal tkcanvas", + "?term tkcanvas", + "?tkcanvas", + " Υɥ饤Ф Tcl/Tk ١ (ǥե)ޤ Perl ١ Tk", + " canvas widget ޥɤޤȤˤϡ\"term.h\" ΤΥ", + " 饤ФбԤΥȵ򳰤ŬʹԤ񤭲ä `gnuplot`", + " make ľơʲΤ褦˼¹Ԥޤ", + "", + " gnuplot> set term tkcanvas {perltk} {interactive}", + " gnuplot> set output 'plot.file'", + "", + " \"wish\" ưǡʲ Tcl/Tk ޥ¹ԤƤ", + " :", + "", + " % source plot.file", + " % canvas .c", + " % pack .c", + " % gnuplot .c", + "", + " Perl/Tk ξϰʲΤ褦ˤƤΥץȤޤ:", + "", + " use Tk;", + " my $top = MainWindow->new;", + " my $c = $top->Canvas->pack;", + " my $gnuplot = do \"plot.pl\";", + " $gnuplot->($c);", + " MainLoop;", + "", + " `gnuplot` ˤä줿ɤ \"gnuplot\" ȸƤФ³ꡢ", + " Ϥΰ canvas ̾Ȥޤμ³ƤФȡ", + " canvas 򥯥ꥢcanvas Υ򸫤Ĥټޤ褦˥", + " դ񤭤ޤ", + "", + " 2 (`plot`) Ǥ 2 Ĥμ³ɲäޤ:", + " \"gnuplot_plotarea\" ϰϤζޤꥹ \"xleft, xright, ytop,", + " ybot\" canvas ꡼ɸ֤2 ĤФμɸǤϰ", + " \"x1min, x1max, y1min, y1max, x2min, x2max, y2min, y2max\" ϼ³", + " \"gnuplot_axisranges\" Ƥ٤ޤ\"interactive\" ץ", + " ꤹȡcanvas ʬǥޥ򥯥åȤʬκɸ", + " ɸϤ˽Ϥ褦ˤʤޤˡ\"user_gnuplot_coordinates\"", + " Ȥ³뤳Ȥǡ뿷ư򵯤Ȥǽ", + " Ǥμ³ˤϰʲΰϤޤ: \"win id x1s y1s x2s y2s", + " x1e y1e x2e y2e x1m y1m x2m y2m\"ϡcanvas ̾ʬ id", + " 2 ĤκɸϤǤΤʬγκɸλκɸκɸ", + " ǤκɸпФƤΤͿޤ", + "", + " `tkcanvas` θߤǤǤ `multiplot` `replot` ⥵ݡȤƤޤ", + " " + #endif /* JAPANESE_DOC */ END_HELP(tkcanvas) #endif diff -rc term/tpic.trm.ORG term/tpic.trm *** term/tpic.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/tpic.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 928,933 **** --- 928,934 ---- #ifdef TERM_HELP START_HELP(tpic) + #ifndef JAPANESE_DOC "1 tpic", "?commands set terminal tpic", "?set terminal tpic", *************** *** 964,968 **** --- 965,1008 ---- " set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'", " The other label -- account for long ticlabels:", " set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}}'" + #else /* JAPANESE_DOC */ + "1 tpic", + "?commands set terminal tpic", + "?set terminal tpic", + "?set term tpic", + "?terminal tpic", + "?term tpic", + "?tpic", + " `tpic` ɥ饤Ф tpic \\special Ǥ LaTeX picture Ķ򥵥ݡ", + " Ȥޤ `latex` `eepic` ɥ饤Ф̤Ǥ", + " 礭 (pointsize) (linewidth)δֳ (interval)", + " ˴ؤ륪ץ󤬤ޤ", + "", + " :", + " set terminal tpic <pointsize> <linewidth> <interval>", + "", + " `pointsize` `linewidth` ǥߥꥤñ̡`interval` ϼ¿", + " ñ̤ϥǤǤʤͤꤹȥǥեȤͤȤޤ", + " եȤǤ pointsize = 40, linewidth = 6, interval = 0.1 Ǥ", + "", + " LaTeX ˴ؤƤΥɥ饤Фʸ֤̤ˡ󶡤", + " : '{' ǻϤޤʸϡ'}' Ĥɬפޤʸ", + " LaTeX ˤäƿʿˤľˤ⥻󥿥󥰤ޤ'[' ", + " Ϥޤʸξϡ֤λ򤹤ʸ (t,b,l,r Τ 2 Ĥޤ)", + " ³ ']{'ʸΡǺǸ '}' Ȥޤʸ", + " LaTeX LR-box Ȥޤ\\rule{}{} ȤФɤֹ", + " ǽǤ礦", + "", + " :", + " Фΰֹ碌˴ؤ:", + " gnuplot Υǥե (񤽤ʤˤʤ뤬ǤʤȤ⤢):", + " set title '\\LaTeX\\ -- $ \\gamma $'", + " ʿˤľˤ⥻󥿥:", + " set label '{\\LaTeX\\ -- $ \\gamma $}' at 0,0", + " ֤Ū˻ (˹碌):", + " set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'", + " ¾θФ -- ĹФФ븫Ѥ:", + " set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}}'" + #endif /* JAPANESE_DOC */ END_HELP(tpic) #endif /* TERM_TABLE */ diff -rc term/unixpc.trm.ORG term/unixpc.trm *** term/unixpc.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/unixpc.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 615,620 **** --- 615,621 ---- #ifdef TERM_HELP START_HELP(unixpc) + #ifndef JAPANESE_DOC "1 unixpc", "?commands set terminal unixpc", "?set terminal unixpc", *************** *** 624,628 **** --- 625,640 ---- "?unixpc", " The `unixpc` terminal driver supports AT&T 3b1 and AT&T 7300 Unix PC. It has", " no options." + #else /* JAPANESE_DOC */ + "1 unixpc", + "?commands set terminal unixpc", + "?set terminal unixpc", + "?set term unixpc", + "?terminal unixpc", + "?term unixpc", + "?unixpc", + " `unixpc` ɥ饤Ф AT&T 3b1 AT&T 7300 Unix PC 򥵥ݡȤޤ", + " ץϤޤ" + #endif /* JAPANESE_DOC */ END_HELP(unixpc) #endif /* TERM_HELP */ diff -rc term/v384.trm.ORG term/v384.trm *** term/v384.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/v384.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 194,199 **** --- 194,200 ---- #ifdef TERM_HELP START_HELP(vx384) + #ifndef JAPANESE_DOC "1 vx384", "?commands set terminal vx384", "?set terminal vx384", *************** *** 203,207 **** --- 204,219 ---- "?vx384", " The `vx384` terminal driver supports the Vectrix 384 and Tandy color", " printers. It has no options." + #else /* JAPANESE_DOC */ + "1 vx384", + "?commands set terminal vx384", + "?set terminal vx384", + "?set term vx384", + "?terminal vx384", + "?term vx384", + "?vx384", + " `vx384` ɥ饤Ф Vectrix 384 Tandy 顼ץ󥿤򥵥ݡȤ", + " ץϤޤ" + #endif /* JAPANESE_DOC */ END_HELP(vx384) #endif diff -rc term/vgagl.trm.ORG term/vgagl.trm *** term/vgagl.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/vgagl.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 1550,1555 **** --- 1550,1556 ---- #ifdef TERM_HELP START_HELP(vgagl) + #ifndef JAPANESE_DOC "1 vgagl", "?commands set terminal vgagl", "?set terminal vgagl", *************** *** 1606,1611 **** --- 1607,1670 ---- " - G1360x768x256", " - G1600x1200x256", "" + #else /* JAPANESE_DOC */ + "1 vgagl", + "?commands set terminal vgagl", + "?set terminal vgagl", + "?set term vgagl", + "?terminal vgagl", + "?term vgagl", + "?vgagl", + " ɥ饤 `vgagl` ϥޥ pm3d ˥ݡȤlinux ι®", + " 󥽡ɥ饤ФǤǥեȥ⡼ɤˤ Ķѿ", + " SVGALIB_DEFAULT_MODE 򻲾ȤޤꤵƤʤ 256 ⡼", + " ɤͭʲ٤ΤǤ⤤Τ򤷤ޤ", + "", + " :", + " set terminal vgagl \\", + " background [red] [[green] [blue]] \\", + " [uniform | interpolate] \\", + #if 0 + " [dump \"file\"] \\", + #endif + " [mode]", + "", + " 顼⡼ɤ mode ץͿ뤳ȤǤޤG1024x768x256 ", + " 褦ʵŪ̾ΤͿ뤳ȤǤޤץ `background`", + " [0, 255] ϰϤ 1 ġޤ 3 ĤȤޤ 1 Ĥ", + " Ϥطʤγͤȸʤ졢3 ĤȤξϤб", + " طʤ˼ޤ", + " ߤ¾Ūʥץ `interpolate` `uniform` ϡѷɤ", + " ֤κݤ˿֤Ԥɤ (ǥեȤǤ ON) 椷ޤ", + #if 0 + "", + " `screen dump file` ϥץ `dump \"file\"` λǹԤޤΥ", + " ץ󤬻ꤵ (ʤץե̾Ǥʤ) ", + " KP_Delete 򲡤ȤǤΥե˥꡼פ񤭽Фޤ", + " εǽ뤳Ȥ뤳ȤǤޤ󡣥ե raw ppm", + " (P6) ǽϤޤΥץ `set term` ޥɤȯԤ", + " ٤˥ꥻåȤޤ", + #endif + "", + " ٥⡼ɤˤϡ¿ʬ libvga ե (̾", + " /etc/vga/libvga.conf) ɬפǤ礦VESA fb ȤΤ", + " ɤǤϥͥΥѥ뤬ɬפǤ", + "", + " vgagl ɥ饤ФϡʲΥꥹȤΤ *ͭ* vga ⡼ɤκǽΤ", + " Ѥޤ", + " - vgagl Ϳ⡼ɡ㤨 `set term vgagl G1024x768x256`", + " Ϻǽ G1024x768x256 ⡼ɤͭɤåޤ", + " - Ķѿ SVGALIB_DEFAULT_MODE", + " - G1024x768x256", + " - G800x600x256", + " - G640x480x256", + " - G320x200x256", + " - G1280x1024x256", + " - G1152x864x256", + " - G1360x768x256", + " - G1600x1200x256", + "" + #endif /* JAPANESE_DOC */ END_HELP(vgagl) #endif #endif /* defined(USE_MOUSE) */ diff -rc term/vws.trm.ORG term/vws.trm *** term/vws.trm.ORG 2012-01-22 14:36:37.000000000 +0900 --- term/vws.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 477,482 **** --- 477,483 ---- #ifdef TERM_HELP START_HELP(VWS) + #ifndef JAPANESE_DOC "1 VWS", "?commands set terminal VWS", "?set terminal VWS", *************** *** 487,491 **** --- 488,504 ---- " The `VWS` terminal driver supports the VAX Windowing System. It has", " no options. It will sense the display type (monochrome, gray scale,", " or color.) All line styles are plotted as solid lines." + #else /* JAPANESE_DOC */ + "1 VWS", + "?commands set terminal VWS", + "?set terminal VWS", + "?set term VWS", + "?terminal VWS", + "?term VWS", + "?VWS", + " `VWS` ɥ饤Ф VAX ɥƥ򥵥ݡȤޤץ", + " ޤ󡣤Υɥ饤Фϥǥץ쥤ξ (쥤뤫", + " 顼) ưΤޤƤϼ褵ޤ" + #endif /* JAPANESE_DOC */ END_HELP(VWS) #endif /* TERM_HELP */ diff -rc term/win.trm.ORG term/win.trm *** term/win.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/win.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 883,888 **** --- 883,889 ---- #ifdef TERM_HELP START_HELP(windows) + #ifndef JAPANESE_DOC "1 windows", "?commands set terminal windows", "?set terminal windows", *************** *** 1151,1155 **** --- 1152,1424 ---- " must be SOLID with unit width.", "", " See `graph-menu`." + #else /* JAPANESE_DOC */ + "1 windows", + "?commands set terminal windows", + "?set terminal windows", + "?set term windows", + "?terminal windows", + "?term windows", + "?windows", + " Ϸ `windows` ϡʸ Windows GDI Ѥ", + " ®÷ϥɥ饤ФǤWindows ǤϡʣδĶư `wxt`", + " Ϸ⥵ݡȤƤޤ", + "", + " :", + " set terminal windows {<n>}", + " {color | monochrome}", + " {solid | dashed}", + " {enhanced | noenhanced}", + " {font <fontspec>}", + " {linewdith <scale>}", + " {fontscale <scale>}", + " {linewdith <scale>}", + " {background <rgb color>}", + " {title \"Plot Window Title\"}", + " {size <width>,<height>}", + " {position <x>,<y>}", + " {close}", + "", + " ʣΥɥ褬ݡȤƤޤ: `set terminal win <n>` ", + " Ϥֹ n 襦ɥޤ", + "", + " `color`, `monochrome` ϡ顼ϤϤǡ", + " `dashed` `solid` ϡȼǤ`color` Ǥ `solid` ", + " ǥեȤǡ`monochrome` Ǥ `dashed` ǥեȤǤ", + " `enhanced` ϳĥʸ (enhanced text mode) εǽ (աʸ", + " եȤκ) ͭˤޤܺ٤ϰʲ: `enhanced text`", + " `<fontspec>` \"<fontface>,<fontsize>\" ηǡ\"<fontface>\" ͭ", + " Windows Υե̾ǡ`<fontsize>` ϥݥñ̤ǤΥեȤ", + " 礭ǤξǤϤάǽǤ", + " Ǥ gnuplot Ǥϡ`font` ɤϾάǽǡ<fontsize> ϰ", + " ʤοͤͿ뤳ȤǤޤߤϤηϥݡȤ", + " ޤΤդƤ", + " `linewidth` `fontscale` ʸ򿭽̤Ǥޤ", + " `title` ϡեɥΥȥѹޤ", + " `size` ϥɥΥԥñ̤Ǥȹ⤵`position` ϥ", + " θʤѤΥ꡼Υԥñ̤Ǥΰ֤", + " Υץϡե `wgnuplot.ini` ΥǥեȤ", + " 񤭤ޤ", + "", + " ¾Υץ⥰ե˥塼ե `wgnuplot.ini` ѹ", + " ޤ", + "", + " Windows Ǥϡ÷⡼ɤǤ̾ޥɥ饤󤫤Ϳե", + " κǸãľ˽λޤޥɥ饤κǸ `-` ", + " ̤ǤޤΥ⡼ɤǤϥƥȥɥɽ", + " դΤߤɽȤʤޤץȤ `-persist` (x11 Ǥ", + " gnuplot Ʊץ; Windows ΤߤΥץ `/noend` ", + " `-noend` ȤȤǤޤ) ꤹ gnuplot Ͻλʤʤ", + " ξ¾ OS Ǥ gnuplot εưȤϰۤʤꡢ-persist ץ", + " gnuplot ÷ޥɥ饤դޤ", + "", + " ޥ `set term` gnuplot νϷѹ硢襦ɥ", + " ϤΤޤ޻Ĥޤ`set term windows close` 襦ɥĤ", + " ȤǤޤ", + "", + " `gnuplot` ϡWindows ǤνϤΤΤĤˡ򥵥ݡ", + " Ƥޤʲ: `windows printing`windows Ϸϡå", + " ܡɤ EMF ե̤¾ΥץȤΥǡθ򴹤򥵥ݡȤ", + " Ƥޤʲ: `graph-menu`EMF եˤϡ`emf` ", + " ϷȤȤǤޤ", + "2 ե˥塼 (graph-menu)", + "?commands set terminal windows graph-menu", + "?set terminal windows graph-menu", + "?set term windows graph-menu", + "?windows graph-menu", + "?graph-menu", + " `gnuplot graph` ɥǥޥαܥ(*) 򲡤ƥ", + " 塼 `Options` 򤹤ȰʲΥץĥݥåץåץ˥", + " ޤ:", + "", + " `Copy to Clipboard` åץܡɤ˥ӥåȥޥåפ EMF 򥳥ԡ", + "", + " `Save as EMF...` ߤΥեɥ EMF եȤ¸", + "", + " `Print...` եåɥ Windows ץ󥿥ɥ饤Фǥץ", + " ȡץ󥿤ȳΨ򤬲ǽǤ `Print` ץ", + " ̤ `gnuplot` λĥץ󥿥ɥ饤ФˤɤϤ", + " ޤ󡣰ʲ⻲: `windows printing`", + "", + " `Bring to Top` åȥեɥ¾Ƥ襦", + " ɥμɽ", + "", + " `Color` åȥ顼郎ͭå̵Ǥ", + "", + " `Double buffer` դ򥹥꡼˼̤˥Хåե褹뤳", + " Ȥͭˤޤϡ㤨Х˥᡼ 3 դβž", + " Τ (եå) 򤷤ޤʲ: `mouse`, `scrolling`", + "", + " `Oversampling` ۥХΥܤˤޤ꡼˼̤ݤ", + " ϺƤȾʬ˽̾ޤˤꡢեåϤ餫ˤʤ", + " ׻֤ɬפǤ `double buffer` ɬ", + " פǤ", + "", + " `Antialiasing` ޤüʿ경򤷤ޤ", + " ȤդƤ", + "", + " `Background...` ɥطʿ", + "", + " `Choose Font...` եåɥǻȤեȤ", + "", + " `Line Styles...` οΥޥ", + "", + " `Update wgnuplot.ini` ߤΥɥΰ֡ɥ礭ƥ", + " ȥɥΥեȤȤΥեȥեɥΥե", + " ȤȤΥեȥطʿե `wgnuplot.ini` ", + " ¸", + "", + "^<HR align=\"left\" width=\"100\">", + " (*) Υ˥塼ϡ`unset mouse` ˤäƱޥܥ󲡤Ȥ", + " ʤΤա", + "2 (printing)", + "?commands set terminal windows printing", + "?set terminal windows printing", + "?set term windows printing", + "?windows printing", + "?printing", + "?screendump", + " ߤˤꡢդϰʲΤ褦ˡǰǤޤ", + "", + " `1.` `gnuplot` Υޥ `set terminal` ǥץ󥿤򤷡`set output`", + " ǽϤե˥쥯", + "", + " `2.` `gnuplot graph` ɥ `Print...` ޥɤ򡣥ƥ", + " ȥɥ餳Ԥʤ̤ʥޥ `screendump` ⤢롣", + "", + " `3.` `set output \"PRN\"` ȤȽϤϰե˽Ϥ졢`gnuplot`", + " λ뤫ޤ `set output` ޥɤǽϤ¾ΤΤѹȡ", + " () ܥå졢ǥץ󥿥ݡȤ򡣤", + " OK 򤹤ȡϤϥץȥޥ͡Ǥϲù줺ˤΤޤ", + " 줿ݡȤǥץȥȤ롣϶ (ޤϸΰ) ˡ", + " ѤνϤ򡢤бƤʤץ󥿤뤳Ȥ̣롣", + "", + "2 ƥȥ˥塼 (text-menu)", /* FIXME: this is not really related to the windows driver, but the windows platform */ + "?commands set terminal windows text-menu", + "?set terminal windows text-menu", + "?set term windows text-menu", + "?windows text-menu", + "?text-menu", + " `gnuplot text` ɥǥޥαܥ򲡤ƥ˥塼", + " `Options` 򤹤ȰʲΥץĥݥåץåץ˥塼", + " ޤ:", + "", + " `Copy to Clipboard` ޡƥȤ򥯥åץܡɤ˥ԡ", + "", + " `Paste` ǤΤƱ褦˥åץܡɤƥȤ򥳥ԡ", + "", + " `Choose Font...` ƥȥɥǻȤեȤ", + "", + " `System Colors` 򤹤ȥȥѥͥꤷƥ५顼", + " ƥȥɥͿ롣򤷤ʤطʤʸϹġ", + "", + " `Wrap long lines` 򤹤ȸߤΥɥĹԤޤ֤", + "", + " `Update wgnuplot.ini` ߤ򡢥桼Υץꥱǡǥ", + " 쥯ȥˤե `wgnuplot.ini` ¸", + "", + "2 ˥塼ե wgnuplot.mnu", /* FIXME: this is not really related to the windows driver, but the windows platform */ + "?windows wgnuplot.mnu", + "?wgnuplot.mnu", + " ˥塼ե `wgnuplot.mnu` `gnuplot` Ʊǥ쥯ȥˤ", + " 硢`wgnuplot.mnu` ˽񤫤Ƥ˥塼ɤ߹ޤޤ˥塼", + " ɤϰʲ̤:", + "", + " [Menu] ιԤ̾ǿ˥塼򳫻", + " [EndMenu] ߤΥ˥塼λ", + " [--] ʿʥ˥塼λڤ", + " [|] ľʥ˥塼λڤ", + " [Button] ˥塼˲ܥ졢˼ΥޥƤ", + "", + " ޥ 2 Ԥǽ񤭡ǽιԤϥޥ̾ (˥塼θФ)2 ܤ", + " ΤǤƬζ̵뤵ޤޥޥɤϰʲ̤:", + "", + " [INPUT] [EOS] {ENTER} ޤǤץץȤȤƽϤʸ", + " [EOS] ʸν (End Of String)Ϥʤ", + " [OPEN] ե̾ǽ [EOS] ޤǤåɥΥ", + " ȥ롢鼡 [EOS] {ENTER} ޤǤǥեȤΥ", + " ̾", + " [SAVE] ֥ե̾ ([OPEN] Ʊ)", + " [DIRECTORY] ǥ쥯ȥ̾[EOS] {ENTER} ޤǤåɥ", + " Υȥ" + "", + " ޥʸ֤ϰʲ̤:", + "", + " {ENTER} '\\r'", + " {TAB} '\\011'", + " {ESC} '\\033'", + " {^A} '\\001'", + " ...", + " {^_} '\\031'", + "", + " ޥŸʸ 256 ʸ¤Ƥޤ", + "", + "2 wgnuplot.ini", + "?commands set terminal windows wgnuplot.ini", + "?set terminal windows wgnuplot.ini", + "?set term windows wgnuplot.ini", + "?windows wgnuplot.ini", + "?wgnuplot.ini", + " Windows ƥȥɥ `windows` ϷϡץΤĤ", + " `wgnuplot.ini` `[WGNUPLOT]` 󤫤ɤ߹ߤޤΥե", + " ϡ桼Υץꥱǡǥ쥯ȥ֤ޤ", + " `wgnuplot.ini` եΥץ:", + "", + " [WGNUPLOT]", + " TextOrigin=0 0", + " TextSize=640 150", + " TextFont=Terminal,9", + " TextWrap=1", + " TextLines=400", + " SysColors=0", + " GraphOrigin=0 150", + " GraphSize=640 330", + " GraphFont=Arial,10", + " GraphColor=1", + " GraphToTop=1", + " GraphDoublebuffer=1", + " GraphOversampling=0", + " GraphAntialiasing=1", + " GraphBackground=255 255 255", + " Border=0 0 0 0 0", + " Axis=192 192 192 2 2", + " Line1=0 0 255 0 0", + " Line2=0 255 0 0 1", + " Line3=255 0 0 0 2", + " Line4=255 0 255 0 3", + " Line5=0 0 128 0 4", + "", + "^ <h3>ƥȥɥץ</h3> ", + "", + " ʲ wgnuplot ΥƥȥɥΤߤŬѤޤ", + "", + " `TextOrigin` `TextSize` ϡƥȥɥΰ֤ȥλ", + " Ǥ", + "", + " `TextFont` ϡƥȥɥΥեȤȥλǤ", + "", + " `TextWrap` ϡĹƥȹԤޤ֤򤷤ޤ", + "", + " `TextLines` ϡƥȥɥХåե˲ (ޤ֤ʤ)", + " ݻ뤫ꤷޤߤϡͤ wgnuplot ⤫ѹǤޤ", + " ", + "", + " ʲ: `text-menu`", + "", + "^ <h3>եɥץ</h3>", + "", + " `GraphFont` ϡե̾ȥݥñ̤ΥեȥλǤ", + "", + " `Border`, `Axis`, `Line` ˤϡ֤ζ (0--255)Фζ١Ĥζ١", + " 顼 5 Ĥοꤷޤ", + " (`linestyle`) ϡ0=1=2=3=4=Ȥ", + " äƤޤ `wgnuplot.ini` ǤϡLine 2 ϥ顼⡼ɤǤФ", + " ǡ⡼ɤǤϺˤʤޤǥեȤ 1 ԥǤ", + " 郎ͤξ硢ͤԥñ̤ǤǤ̣", + " ޤLine1 `points` ǻȤ 1 ԥμǤ", + " Фʤޤ", + "", + " ʲ: `graph-menu`" + #endif /* JAPANESE_DOC */ END_HELP(windows) #endif /* TERM_HELP */ diff -rc term/wxt.trm.ORG term/wxt.trm *** term/wxt.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/wxt.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 442,447 **** --- 442,448 ---- #ifdef TERM_HELP START_HELP(wxt) + #ifndef JAPANESE_DOC "1 wxt", "?set terminal wxt", "?terminal wxt", *************** *** 555,559 **** --- 556,680 ---- " bindings by <ctrl>+<space> and <ctrl>+'q', respectively.", " These three keywords (raise, persist and ctrl) can also be set and remembered", " between sessions through the configuration dialog." + #else /* JAPANESE_DOC */ + "1 wxt", + "?set terminal wxt", + "?terminal wxt", + "?set term wxt", + "?term wxt", + "?wxt", + " `wxt` ϷϡġΥɥؤνϤޤɥ ", + " wxWidgets 饤֥ޤ (줬 `wxt` ̾ͳǤ)", + " ݤϡ2D եå饤֥ cairo ȡʸ/", + " 饤֥ pango ޤ", + "", + " :", + " set term wxt {<n>}", + " {size <width>,<height>} {background <rgb_color>}", + " {{no}enhanced}", + " {font <font>} {fontscale <scale>}", + " {title \"title\"}", + " {dashed|solid} {dashlength <dl>}", + " {{no}persist}", + " {{no}raise}", + " {{no}ctrl}", + " {close}", + "", + " ʣ襦ɥ⥵ݡȤƤơ`set terminal wxt <n>` Ȥ", + " ֹ n 襦ɥؽϤޤ", + "", + " ǥեȤΥɥȥϡΥɥֹ˴ŤƤޤ", + " Υȥ \"title\" ɤǤǤޤ", + "", + " 襦ɥϡ`gnuplot` νϷ̤ʤΤѹƤĤäޤ", + " ˤʤޤĤˤϡΥɥϥե", + " 'q' Ϥ뤫ɥޥ͡Υ˥塼 `close` ", + " 뤫`set term wxt <n> close` ȤƤ", + "", + " ΰΥϥԥñ̤ͿޤǥեȤ 640x384 Ǥ", + " ˲äơɥμºݤΥˤϡġС䥹ơС", + " ѤΥڡɲäޤ", + " ɥΥѹȡ襰դ⥦ɥο", + " Ԥä礦褦ˤ˿̤ޤ¾÷ϷȰ㤤`wxt`", + " ϷϥեȡޤΤ򿭽̤ޤΤΥڥ", + " ϰݤäơڡϳɤ٤ޤθ `replot`", + " ȥפ뤫ߥʥġС `replot` 򥯥å뤫", + " `plot` ޥɤϤȡοǤϴˤΥ", + " ɥ˹碌ޤեȥϤ줾ΥǥեȤ˥", + " åȤޤ", + "", + " ߤ襦ɥ (`set term wxt <n>` 򤵤줿) Ū", + " εưϡ¾νϷȶ̤Ǥܺ٤ϡʲ: `mouse`", + " ɲäΥ⤤ĤĤƤޤϤ켫ΤŪʤ", + " ΤˤʤäƤϤǤ", + "", + " νϷϡĥʸ⡼ (enhanced text mode) 򥵥ݡȤ", + " ƤơեȤ񼰥ޥ (ադʤ) ٥¾ʸ", + " ळȤǤޤĥʸ⡼ɤν񼰤¾ gnuplot ν", + " Ϸȶ̤Ǥܺ٤ϡʲ: `enhanced`", + "", + " <font> \"FontFace,FontSize\" ηǡFontFace FontSize Ȥ", + " ޤʬΥưĤʸȤƽ񤭤ޤFontFace ϡ\'Arial\' Τ", + " ̾Υե̾ǤFontFace Ϳʤϡwxt Ϸ", + " \'Sans\' ѤޤFontSize ϡݥñ̤ΥեȥǤ", + " FontSize Ϳʤϡwxt Ϸ 10 ݥȤѤޤ", + " :", + " set term wxt font \"Arial,12\"", + " set term wxt font \"Arial\" # ե̾Τѹ", + " set term wxt font \",12\" # եȥΤѹ", + " set term wxt font \"\" # ե̾եȥꥻå", + "", + " եȤ̾Υեȥ֥ƥफޤMS-Windows Ǥ", + " ȥѥͥ \"Fonts\" ȥǸΤǡꤷ", + " ޤUnix ǤϡեȤ \"fontconfig\" ޤ", + "", + " ʸΥ쥤Ȥ˻Ѥ pango 饤֥ utf-8 ܤȤƤ", + " ޤΤǡwxt ϷǤϥ󥳡ǥ󥰤 utf-8 ˤɬפ", + " ǥեȤϥ󥳡ǥ󥰤ϡƥ \'locale\' ˤ", + " ¾Υ󥳡ǥ󥰤Ѥϡ gnuplot Τ餻", + " ɬפޤܺ٤ϡʲ: `encoding`", + "", + " pango ϡunicode ޥåԥ󥰤ǤʤեȤФƤͽ̷̤Ϳ", + " 뤫⤷ޤ㤨 Symbol եȤФƤϡwxt Ϸϡʸ", + " ɤ unicode Ѵ뤿 http://www.unicode.org/ 󶡤", + " ޥåԥ󥰤Ѥޤpango ϡʸޤեȤ򸫤Ĥ뤿", + " ˤʤ Symbol եȤ򸡺 DejaVu եȤΤ褦ˡ", + " unicode 򥫥С¾ΥեȤõȤäκȤ", + " Ȥޤʤ\"the Symbol font\" ϡAcrobat Reader Ȱ", + " \"SY______.PFB\" ȤۤƤ Adobe Symbol եȤǤȲ", + " ᤵ뤳ȤդƤˡOpenOffice.org Ȱ", + " \"opens___.ttf\" Ȥۤ OpenSymbol եȤƱʸ", + " ƤޤMicrosoft Symbol ե (\"symbol.ttf\") ۤƤ", + " ޤϰۤʤʸåȤˤʤäƤơĤϷ礱Ƥޤ", + " ĤϿѤäƤޤäƤޤʤΥǥեȤ", + " ʤ餫꤬ (㤨Хǥ⥹ץ enhancedtext.dem ", + " ɽʤȤä) ϡAdobe OpenOffice Symbol ե", + " Ȥ򥤥󥹥ȡ뤷ơMicrosoft Symbol եȤʤȤ", + " ʤ⤷ޤ", + " \"windings\" Τ褦¾ɸΥեȤǤư뤳Ȥ𤵤", + " ޤ", + "", + " Υ󥰤ϡġСŪѹǤޤǽʸ¤Ǥ", + " ɤϤ뤿ˤΥ󥰤ϡꥢС", + " ץ󥰡ҥƥ󥰤 3 ĤεäƤޤ", + " ꥢϡʿľǤʤγ餫ɽǽˤޤ", + " Сץ󥰤ϡꥢȤǥԥ⾮", + " Ǥ٤󶡤gnuplot ɸľ񤱤褦ˤʤޤ", + " ϡгľ (㤨 'plot x') ɤΤ򤱤ޤ", + " ҥƥ󥰤ϡСץ󥰤ˤäưʿľ", + " ʬΤܤ򤱤ޤνϷϡľɸ·", + " ˤꡢ1 ԥľ 1 (1 Ĥ¿⾯ʤ", + " ʤ) Υԥ褷ޤ", + "", + " ǥեȤǤϡ褬Ԥ줿Ȥ˥ɥϥǥȥåפΰ־", + " () ɽޤϡ \"raise\" Ǥޤ", + "  \"persist\" ϡ٤Ƥ襦ɥŪĤʤ", + " ϡgnuplot λʤ褦ˤޤ", + " ǸˡǥեȤǤ <space> gnuplot 󥽡륦ɥ", + " ˾夲'q' 襦ɥĤޤ \"ctrl\" ϡ", + " ΥƤ򡢤줾 <ctrl>+<space> <ctrl>+'q' ѹޤ", + " 3 ĤΥ (raise, persist, ctrl) ϡ", + " ΤȤǤꤷ뤳ȤǤޤ" + #endif /* JAPANESE_DOC */ END_HELP(wxt) #endif /* TERM_HELP */ diff -rc term/x11.trm.ORG term/x11.trm *** term/x11.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/x11.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 2115,2120 **** --- 2115,2121 ---- #ifdef TERM_HELP START_HELP(x11) + #ifndef JAPANESE_DOC "1 x11", "?commands set terminal x11", "?set terminal x11", *************** *** 2668,2673 **** --- 2669,3231 ---- "%@gnuplot*fastrotate: on", "%@gnuplot*ctrlq: off", "@end table" + #else /* JAPANESE_DOC */ + "1 x11", + "?commands set terminal x11", + "?set terminal x11", + "?set term x11", + "?terminal x11", + "?term x11", + "?x11", + "?X11", + "", + " :", + " set terminal x11 {<n> | window \"<string>\"}", + " {title \"<string>\"}", + " {{no}enhanced} {font <fontspec>}", + " {linewidth LW} {solid|dashed}", + " {{no}persist} {{no}raise} {{no}ctrlq}", + " {close}", + " {size XX,YY} {position XX,YY}", + " set terminal x11 {reset}", + "", + " ʣΥ襦ɥ򥵥ݡȤƤޤ`set terminal x11 <n>`", + " ֹ n 襦ɥ˽Ϥޤn 0 ǤʤСȥ뤬", + " Ū˻ꤵƤʤФֹ椬ɥȥȤƤĤ졢", + " ˤ `Gnuplot <n>` ȥ٥դޤͭʥɥ", + " ϥ뵭ѲǶ̤Ǥޤ (ǥեȥ뤫齽", + " )", + "", + " `x11` ϷϡΥץꥱˤäƤ X Υ", + " ɥ X ID (16 ɽ) 򥪥ץ `window` θʸȤƻ", + " 뤳ȤǡΥɥ³ǤޤX ʣΥ饤Ȥ˥", + " ButtonPress ǧʤᡢgnuplot γɥ򥳥", + " ƥʤȤƻѤޤˡˤꡢgnuplot ΥޥǽϤȤꤳޤ", + " 襦ɥǤưޤ", + "", + " set term x11 window \"220001e\"", + "", + " x11 ϷϡѲǽʥեȤθdzĥʸ⡼ (ʲ:", + " `enhanced`) 򥵥ݡȤƤޤʸޤ졢͡ʸ̤Ϳ", + " եȥ̿ΤˡǥեȤ x11 եȤ֥", + " եȤǤɬפޤäơʲκǽϤޤǤ", + " 2 ܤΤΤϤǤϤʤǤ礦", + "", + " set term x11 enhanced font \"arial,15\" ", + " set title '{/=20 Big} Medium {/=5 Small}' ", + "", + " set term x11 enhanced font \"terminal-14\" ", + " set title '{/=20 Big} Medium {/=5 Small}' ", + "", + " `gnuplot` ɥ饤Ф̤ʽϥɥ饤ФѹƤ⡢襦ɥϳ", + " ޤޤˤʤޤ襦ɥϡΥɥ˥֤", + " ʸ q 򲡤ɥޥ͡Υ˥塼 `close` 򤹤", + " Ĥ뤳ȤǤޤ`reset` ¹ԤƤΥɥ٤Ĥ", + " ޤϼºݤ˥ɥƤҥץλޤ (", + " `-persist` ꤵƤʤ)ޥ `close` ϡġ", + " ɥֹꤷĤΤ˻ȤȤǤޤpersist", + " Τ˻ĤäƤ褦襦ɥ `close` ޥɤǤĤ뤳", + " ϤǤޤֹά `close` ˤϸͭ襦", + " Ĥޤ", + "", + " gnuplot γˤɥ饤 gnuplot_x11 ϡץΥѥ", + " 򤵤줿ǥեȤξ꤬ޤϴĶѿ", + " GNUPLOT_DRIVER_DIR ۤʤ뤳ȤѹǤޤ", + "", + " 襦ɥ `-persisit` ץͿƤʤСä", + " λ˼ưŪĤޤ", + "", + " ץ `persist` `raise` ϥǥեȤǤꤵƤޤ󤬡", + " ϡǥեȤ (persist == no raise == yes) ޥɥ", + " 󥪥ץ -persist / -raise λ꤫ޤ X Υ꥽ͤȤ", + " 롢ȤȤ̣ޤ[no]persist [no]raise ꤵ", + " ϥޥɥ饤󥪥ץ X ꥽ͥ褵ޤ", + " Υץľ˸ϤޤΤǡ˵ưƤ", + " 饤Фεưѹޤɥ̤˽Фʤϡʲ:", + " `raise`", + "", + " ץ `title \"<title name>\"` ϸߤ襦ɥˡޤֹ", + " ꤹФֹ襦ɥФ륦ɥȥ̾Ĥ", + " ޤΥȥ뤬ɽꡢޤɽ뤫ɤϡȤä", + " X Υɥޥ͡˰¸ޤ", + "", + " ץ size ϡ襦ɥΥꤹΤ˻ѤǤޤ", + " Υץϡθ륦ɥΤߤŬѤޤ", + "", + " ץ position ϡ襦ɥΰ֤ꤹΤ˻Ȥޤ", + " Υץϡθ륦ɥΤߤŬѤޤ", + "", + " 襵ȥڥϡ`gnuplot` Υɥꥵ뤳Ȥ", + " ѹǤޤ", + "", + " Υ `gnuplot` `set linestyle` ѹǽǤ", + "", + " ϥɥ饤 `x11` ˴ؤƤϡ`gnuplot` (ư)ޥɥ饤", + " ޤե뤫顢geometry font, name ʤɤ̾ X Toolkit", + " ץ꥽λդޤΥץˤĤƤ", + " X(1) ޥ˥奢ڡ (䤽ƱΤ) 򻲾ȤƤ", + "", + "=X resources", + " ¾ˤ `x11` ϷѤ¿ `gnuplot` Υץ󤬤ޤ", + " `gnuplot` Ƥ֤Ȥ˥ޥɥ饤󥪥ץȤƻꤹ뤫", + " ޤե \".Xdefaults\" Υ꥽ȤƻǤޤ", + " ϵưꤵΤǡ`gnuplot` ¹ԻˤѹǤޤ", + " (`persist` `raise` ʳ)", + "2 X11 Υե (x11_fonts)", + "?commands set terminal x11 x11_fonts", + "?set terminal x11 x11_fonts", + "?set term x11 x11_fonts", + "?x11 x11_fonts", + "?x11_fonts", + "=fonts", + " ưϡƥ꤫桼 .Xdefaults ե꤫", + " ޥɥ饤꤫Τ줫ˤ X11 ꥽ˤäƥǥե", + " ΥեȤ򤵤ޤ", + "", + " :", + " gnuplot*font: lucidasans-bold-12", + " ǥեȤΥեȤgnuplot x11 ɥ饤Ф˰ʲΤ", + " ˤƻؼ뤳ȤǤޤ:", + " `set term x11 font \"<fontspec>\"`", + " ޤ x11 ɥ饤ФϡͿ줿եȤ̾ X Ф˿Ҥͤޤ", + " 䤤碌Ԥ硢<fontspec> ", + " \"<font>,<size>,<slant>,<weight>\" Ȳᤷʲηδ X11 ե", + " ̾褦Ȥޤ:", + " -*-<font>-<weight>-<s>-*-*-<size>-*-*-*-*-*-<encoding>", + "", + " <font> ϥեȤδ̾ (base name) (: Times, Symbol)", + " <size> ϥݥȥ (꤬ʤХǥեȤ 12)", + " <s> <slant>==\"italic\" ʤ `i`, <slant>==\"oblique\" ʤ `o`, ¾ `r`", + " <weight> Ū˻ꤵ `medium` `bold`¾ `*`", + " <encoding> ϸߤʸ˴Ť (ʲ: `set encoding`)", + " ä `set term x11 font \"arial,15,italic\"` (ǥեȤ encoding", + " Ȥ) -*-arial-*-i-*-*-15-*-*-*-*-*-iso8859-1 Ѵޤ", + " <size>, <slant>, <weight> ϤɬܤǤϤޤ<slant> ", + " <weight> ꤷʤäϡեȥФǽ˸ĤѼ", + " ΥեȤ뤫⤷ޤ", + " ǥեȤΥ󥳡ǥ󥰤ϡб X11 ꥽Ȥäꤹ뤳", + " ȤǤޤ:", + " gnuplot*encoding: iso8859-15", + " x11 ɥ饤ФϡŪ PostScript ե̾ǧƱͭ", + " X11 եȤ TrueType եȤ֤ޤ", + " Ʊ礬`set label` ׵ˤեȤǤȤƤ", + " ޤ", + "", + " ʤ gnuplot configure --enable-x11-mbfonts ץĤ", + " ƥ󥹥ȡ뤵줿Τʤ顢ե̾ \"mbfont:\" Ĥ뤳", + " ȤǥޥХȥեȤꤹ뤳ȤǤޤե̾ʣ", + " ĤȤǤޤξϥߥǶڤޤޥХȥ", + " ȤΥ󥳡ǥ󥰤 locale ˽ޤΤǡĶѿ", + " LC_CTYPE Ŭڤ (㤨 ja_JP.eucJP, ko_KR.EUC, zh_CN.EUC ʤ) ", + " ꤹɬפޤ", + "", + " :", + " set term x11 font 'mbfont:kana14;k14'", + " # 'kana14' 'k14' ܸ X11 font ꥢ̾';'", + " # ϥե̾ζڤǤ", + " set term x11 font 'mbfont:fixed,16,r,medium'", + " # <font>,<size>,<slant>,<weight> ѤǤޤ", + " set title '(mb strings)' font 'mbfont:*-fixed-medium-r-normal--14-*'", + "", + " Ʊ񼰤 X Υ꥽ǤΥǥեȥեȤǤͭǤ:", + " gnuplot*font: \\", + " mbfont:-misc-fixed-medium-r-normal--14-*-*-*-c-*-jisx0208.1983-0", + "", + " gnuplot --enable-x11-mbfonts ǥ󥹥ȡ뤵줿硢\"mbfont:\"", + " ĤʤƤ 2 Ĥ̤ PostScript ե̾ 'Ryumin-Light-*',", + " 'GothicBBB-Medium-*' (ɸŪܸ PS ե) ȤȤǤޤ", + "", + "2 ޥɥ饤󥪥ץ (command-line_options)", + "?commands set terminal x11 command-line-options", + "?set terminal x11 command-line-options", + "?set term x11 command-line-options", + "?x11 command-line-options", + "?command-line-options", + " X Toolkit ץ˲äʲΥץ gnuplot Ω夲", + " ޥɥ饤ǡޤϥ桼Υե \".Xdefaults\" Υ꥽Ȥ", + " ƻǤޤ (`raise` `persist` `set term x11 [no]raise [no]persist`", + " ˤäƾ񤭤뤳ȤդƤ):", + "@start table - ޤ÷ƥȷ", + " `-mono` 顼ǥץ쥤ǶŪ", + " `-gray` 쥤ޤϥ顼ǥץ쥤ǤΥ쥤", + " (ǥեȤǤϥ쥤ǥץ쥤դ)", + " `-clear` ɽ (ִŪ) ̤õ", + " `-tvtwm` geometry ץˤ֤λ򡢲ۥ롼ȥɥ", + " ߤɽʬФŪʰ֤ˤ", + " `-raise` 襦ɥ̤ؽФ", + " `-noraise` 襦ɥ̤ؽФȤϤʤ", + #ifdef USE_MOUSE + " `-noevents` ޥϤʤ", + " `-ctrlq ` ɥ q Ǥʤ ctrl-q Ĥ", + #endif + " `-persist` gnuplot ץཪλ襦ɥĤ", + "#\\begin{tabular}{|cl|} \\hline", + "#`-mono` & 顼ǥץ쥤ǶŪ\\\\", + "#`-gray` & 쥤ޤϥ顼ǥץ쥤ǤΥ쥤\\\\", + "# & (ǥեȤǤϥ쥤ǥץ쥤դ)\\\\", + "#`-clear` & ɽ (ִŪ) ̤õ\\\\", + "#`-tvtwm` & geometry ץˤ֤λ򡢲ۥ롼ȥɥ\\\\", + "# & ߤɽʬФŪʰ֤ˤ\\\\", + "#`-raise` & 襦ɥ̤ؽФ\\\\", + "#`-noraise` & 襦ɥ̤ؽФȤϤʤ\\\\", + #ifdef USE_MOUSE + "#`-noevents` & ޥϤʤ\\\\", + #endif + "#`-persist` & gnuplot ץཪλ襦ɥĤ\\\\", + "%c l .", + "%`-mono`@顼ǥץ쥤ǶŪ", + "%`-gray`@쥤ޤϥ顼ǥץ쥤ǤΥ쥤", + "% @(ǥեȤǤϥ쥤ǥץ쥤դ)", + "%`-clear`@ɽ (ִŪ) ̤õ", + "%`-tvtwm`@geometry ץˤ֤λ򡢲ۥ롼ȥɥ", + "% @ߤɽʬФŪʰ֤ˤ", + "%`-raise`@襦ɥ̤ؽФ", + "%`-noraise`@襦ɥ̤ؽФȤϤʤ", + #ifdef USE_MOUSE + "%`-noevents`@ޥϤʤ", + #endif + "%`-persist`@gnuplot ץཪλ襦ɥĤ", + "@end table", + "=X resources", + " 嵭Υץϥޥɥ饤Ǥλ񼰤ǡ\".Xdefaults\" ˥", + " ȤƻꤹȤϰۤʤ񼰤Ȥޤ", + "", + " :", + " gnuplot*gray: on", + " gnuplot*ctrlq: on", + "", + " `gnuplot` 襹 `points` 褹Υˤ⡢ޥ", + " 饤󥪥ץ (`-pointsize <v>`) ȥ꥽ (`gnuplot*pointsize: <v>`)", + " 󶡤Ƥޤ `v` ΥγΨȤƻȤ¿", + " (0 < v <= 10) ǡ㤨 `-pointsize 2` ϥǥեȤΥ 2 ܡ", + " `-pointsize 0.5` ̤ΥȾʬȤޤ", + "", + " `-noevents` ϥޥƤϤν̵ˤޤ (`q` ", + " `<space>` ˤ륦ɥνλ)ϡgnuplot Υᥤ", + " ȤΩ x11 ɥ饤ФѤץͭѤǤ", + "", + " `-ctrlq` åϡ襦ɥĤۥåȥ `q` ", + " `<ctrl>q` ѹޤϡ`pause mouse keystroke` ˤ륭", + " ¸ǽȤäƤˤϡ¾Υե٥åʸƱͤ", + " `q` ¸Ǥ褦ˤʤΤͭѤǤ礦Ʊͳǡ`-ctrlq` ", + " å <space> ۥåȥ <ctrl><space> ֤ޤ", + "", + "2 ץ (monochrome_options)", + "?commands set terminal x11 monochrome_options", + "?set terminal x11 monochrome_options", + "?set term x11 monochrome_options", + "?x11 monochrome_options", + "?monochrome_options", + "=X resources", + " ǥץ쥤ФƤ `gnuplot` 迧 (foreground) طʿ", + " (background) Ϳޤ󡣥ǥեȤǤطʤϹǤ`-rv`", + " `gnuplot*reverseVideo: on` ξˤطʤˤʤޤ", + "", + "2 顼꥽ (color_resources)", + "?commands set terminal x11 color_resources", + "?set terminal x11 color_resources", + "?set term x11 color_resources", + "?x11 color_resources", + "?color_resources", + "=X resources", + " x11 ϷϰʲΥ꥽ (ǤϤΥǥեȤͤ򼨤ޤ)", + " ޤĴ (greyscale) Υ꥽򻲾Ȥޤ꥽ͤϥ", + " ƥ X11 rgb.txt ե˽񤫤Ƥ뿧̾ޤ 16 ʤο", + " (X11 Υޥ˥奢򻲾) ̾ȶ (0 1 δ֤) 򥳥ޤ", + " ڤäͤѤǤޤ㤨 `blue, 0.5` Ⱦʬζ٤ġ̣", + " ޤ", + "@start table - ޤ÷ƥȷ", + " gnuplot*background: white", + " gnuplot*textColor: black", + " gnuplot*borderColor: black", + " gnuplot*axisColor: black", + " gnuplot*line1Color: red", + " gnuplot*line2Color: green", + " gnuplot*line3Color: blue", + " gnuplot*line4Color: magenta", + " gnuplot*line5Color: cyan", + " gnuplot*line6Color: sienna", + " gnuplot*line7Color: orange", + " gnuplot*line8Color: coral", + "#\\begin{tabular}{|cl|} \\hline", + "#&gnuplot*background: white\\\\", + "#&gnuplot*textColor: black\\\\", + "#&gnuplot*borderColor: black\\\\", + "#&gnuplot*axisColor: black\\\\", + "#&gnuplot*line1Color: red\\\\", + "#&gnuplot*line2Color: green\\\\", + "#&gnuplot*line3Color: blue\\\\", + "#&gnuplot*line4Color: magenta\\\\", + "#&gnuplot*line5Color: cyan\\\\", + "#&gnuplot*line6Color: sienna\\\\", + "#&gnuplot*line7Color: orange\\\\", + "#&gnuplot*line8Color: coral\\\\", + "%c l .", + "%@gnuplot*background: white", + "%@gnuplot*textColor: black", + "%@gnuplot*borderColor: black", + "%@gnuplot*axisColor: black", + "%@gnuplot*line1Color: red", + "%@gnuplot*line2Color: green", + "%@gnuplot*line3Color: blue", + "%@gnuplot*line4Color: magenta", + "%@gnuplot*line5Color: cyan", + "%@gnuplot*line6Color: sienna", + "%@gnuplot*line7Color: orange", + "%@gnuplot*line8Color: coral", + "@end table", + "", + " ˴ؤ륳ޥɥ饤ν񼰤ϡط (bacground) ˴ؤƤñ", + " ̾ X11 toolkit ץ \"-bg\" ľбޤ¾ΤΤ⡢", + " ưŪʥ꥽ξ񤭥ץ \"-xrm\" ȤȤǤ", + " ", + "", + " :", + "", + " طʿѹˤ", + " gnuplot -background coral", + "", + " 1 ܤο񤭴ˤ", + " gnuplot -xrm 'gnuplot*line1Color:blue'", + "", + "2 Ĵ꥽ (grayscale_resources)", + "?commands set terminal x11 grayscale_resources", + "?set terminal x11 grayscale_resources", + "?set term x11 grayscale_resources", + "?x11 grayscale_resources", + "?grayscale_resources", + "=X resources", + " `-gray` 򤹤ȡ`gnuplot` ϡ쥤ޤϥ顼ǥ", + " 쥤ФơʲΥ꥽򻲾Ȥޤ (ǤϤΥǥեȤͤ", + " ޤ)ǥեȤطʿϹǤ뤳ȤդƤ", + "@start table - ޤ÷ƥȷ", + " gnuplot*background: black", + " gnuplot*textGray: white", + " gnuplot*borderGray: gray50", + " gnuplot*axisGray: gray50", + " gnuplot*line1Gray: gray100", + " gnuplot*line2Gray: gray60", + " gnuplot*line3Gray: gray80", + " gnuplot*line4Gray: gray40", + " gnuplot*line5Gray: gray90", + " gnuplot*line6Gray: gray50", + " gnuplot*line7Gray: gray70", + " gnuplot*line8Gray: gray30", + "#\\begin{tabular}{|cl|} \\hline", + "#&gnuplot*background: black\\\\", + "#&gnuplot*textGray: white\\\\", + "#&gnuplot*borderGray: gray50\\\\", + "#&gnuplot*axisGray: gray50\\\\", + "#&gnuplot*line1Gray: gray100\\\\", + "#&gnuplot*line2Gray: gray60\\\\", + "#&gnuplot*line3Gray: gray80\\\\", + "#&gnuplot*line4Gray: gray40\\\\", + "#&gnuplot*line5Gray: gray90\\\\", + "#&gnuplot*line6Gray: gray50\\\\", + "#&gnuplot*line7Gray: gray70\\\\", + "#&gnuplot*line8Gray: gray30\\\\", + "%c l .", + "%@gnuplot*background: black", + "%@gnuplot*textGray: white", + "%@gnuplot*borderGray: gray50", + "%@gnuplot*axisGray: gray50", + "%@gnuplot*line1Gray: gray100", + "%@gnuplot*line2Gray: gray60", + "%@gnuplot*line3Gray: gray80", + "%@gnuplot*line4Gray: gray40", + "%@gnuplot*line5Gray: gray90", + "%@gnuplot*line6Gray: gray50", + "%@gnuplot*line7Gray: gray70", + "%@gnuplot*line8Gray: gray30", + "@end table", + "", + "2 ꥽ (line_resources)", + "?commands set terminal x11 line_resources", + "?set terminal x11 line_resources", + "?set term x11 line_resources", + "?x11 line_resources", + "?line_resources", + "=X resources", + " `gnuplot` (ԥñ) Τ˰ʲΥ꥽", + " Ȥޤ (ǤϤΥǥեȤͤ򼨤ޤ)0 ޤ 1 ϺǾ", + " 1 ԥ̣ޤ2 ޤ 3 ͤˤäƥդγѤ", + " Ǥ⤢Ǥ礦", + "@start table - ޤ÷ƥȷ", + " gnuplot*borderWidth: 2", + " gnuplot*axisWidth: 0", + " gnuplot*line1Width: 0", + " gnuplot*line2Width: 0", + " gnuplot*line3Width: 0", + " gnuplot*line4Width: 0", + " gnuplot*line5Width: 0", + " gnuplot*line6Width: 0", + " gnuplot*line7Width: 0", + " gnuplot*line8Width: 0", + "#\\begin{tabular}{|cl|} \\hline", + "#&gnuplot*borderWidth: 2\\\\", + "#&gnuplot*axisWidth: 0\\\\", + "#&gnuplot*line1Width: 0\\\\", + "#&gnuplot*line2Width: 0\\\\", + "#&gnuplot*line3Width: 0\\\\", + "#&gnuplot*line4Width: 0\\\\", + "#&gnuplot*line5Width: 0\\\\", + "#&gnuplot*line6Width: 0\\\\", + "#&gnuplot*line7Width: 0\\\\", + "#&gnuplot*line8Width: 0\\\\", + "%c l .", + "%@gnuplot*borderWidth: 2", + "%@gnuplot*axisWidth: 0", + "%@gnuplot*line1Width: 0", + "%@gnuplot*line2Width: 0", + "%@gnuplot*line3Width: 0", + "%@gnuplot*line4Width: 0", + "%@gnuplot*line5Width: 0", + "%@gnuplot*line6Width: 0", + "%@gnuplot*line7Width: 0", + "%@gnuplot*line8Width: 0", + "@end table", + "", + " `gnuplot` ǻѤηѤ˰ʲΥ꥽򻲾Ȥ", + " ޤ0 ϼ̣ޤ2 10 ʿ `jk` (`j` `k` 1 ", + " 9 ޤǤ) ϡ`j` ĤΥԥ `k` ĤζΥԥ뤬³", + " ѥη֤ʤ̣ޤ㤨 '16' 1 ĤΥԥ", + " θ 6 Ĥζ³ѥˤʤޤˡ4 10", + " ʿǤܺ٤ʥԥȶΥѥǤޤ㤨С", + " '4441' 4 ĤΥԥ롢4 Ĥζ4 ĤΥԥ롢1 ĤζΥѥ", + " ̣ޤʲΥǥեȤΥ꥽ͤϡǥץ쥤", + " 뤤ϥ顼Ĵ (grayscale) ǥץ쥤ˤ", + " Ǥ", + " 顼ǥץ쥤Ǥ dashed:off ǥեȤˤʤäƤޤ", + "@start table - ޤ÷ƥȷ", + " gnuplot*dashed: off", + " gnuplot*borderDashes: 0", + " gnuplot*axisDashes: 16", + " gnuplot*line1Dashes: 0", + " gnuplot*line2Dashes: 42", + " gnuplot*line3Dashes: 13", + " gnuplot*line4Dashes: 44", + " gnuplot*line5Dashes: 15", + " gnuplot*line6Dashes: 4441", + " gnuplot*line7Dashes: 42", + " gnuplot*line8Dashes: 13", + "#\\begin{tabular}{|cl|} \\hline", + "#&gnuplot*dashed: off\\\\", + "#&gnuplot*borderDashes: 0\\\\", + "#&gnuplot*axisDashes: 16\\\\", + "#&gnuplot*line1Dashes: 0\\\\", + "#&gnuplot*line2Dashes: 42\\\\", + "#&gnuplot*line3Dashes: 13\\\\", + "#&gnuplot*line4Dashes: 44\\\\", + "#&gnuplot*line5Dashes: 15\\\\", + "#&gnuplot*line6Dashes: 4441\\\\", + "#&gnuplot*line7Dashes: 42\\\\", + "#&gnuplot*line8Dashes: 13\\\\", + "%c l .", + "%@gnuplot*dashed: off", + "%@gnuplot*borderDashes: 0", + "%@gnuplot*axisDashes: 16", + "%@gnuplot*line1Dashes: 0", + "%@gnuplot*line2Dashes: 42", + "%@gnuplot*line3Dashes: 13", + "%@gnuplot*line4Dashes: 44", + "%@gnuplot*line5Dashes: 15", + "%@gnuplot*line6Dashes: 4441", + "%@gnuplot*line7Dashes: 42", + "%@gnuplot*line8Dashes: 13", + "@end table" + , "", + "2 X11 pm3d ꥽ (pm3d_resources)", + "?commands set terminal x11 pm3d_resources", + "?set terminal x11 pm3d_resources", + "?set term x11 pm3d_resources", + "?x11 pm3d_resources", + "?pm3d_resources", + "?x11 pm3d", + "=X resources", + " Ŭڤ visual 饹ȿ򤹤ΤϡX11 ץꥱˤȤä", + " 줷äʤȤǤ X11 ۤʤ뿼 (depth) 6", + " Ĥ visual 򥵥ݡȤƤ뤫Ǥ", + "", + " ǥեȤǤ `gnuplot` ϤΥ꡼ΥǥեȤ visual ", + " ޤƤ뤳ȤΤǤ뿧򤵤줿 visual 饹ˤä", + " ޤ12bit Ķ뿼٤ visual 饹Ǥϡgnuplot Ϻ", + " Ǥ 0x200 (=512) ǵưޤ8bit Ķ (12bit ʲ)", + " ٤ visual 饹ǤϺ翧 0x100 (=256) 8bit ʲΥǥ", + " ץ쥤ǤϺ翧 240 (16 ϶οѤ˼) ˤʤޤ", + "", + " gnuplot Ϻǽˡ˽Ҥ٤褦ʺ翧Ƥ褦ȵưޤ", + " ˼ԤȤοϡgnuplot դ뤳ȤǤ", + " ǡ1/2 ĸ餵ޤ`maxcolors` 򷫤֤ 2 dzä̡", + " `mincolors` ⾮ˤʤä硢`gnuplot` private 顼", + " ޥåפȤȤޤξ硢ɥޥ͡ϡݥ󥿤", + " X11 ɥ饤ФΥɥ뤫Ф뤫ǥ顼ޥåפ (swapping)", + " ǤĤȤˤʤޤ", + "", + " `mincolors` ΥǥեȤͤ maxcolors / (num_colormaps > 1 ? 2 : 8)", + " ǡnum_colormaps gnuplot ߻ѤƤ륫顼ޥåפοǡ", + " ϡx11 Υɥ 1 ĤƤ褦̾ξ 1 Ǥ", + "", + " ʣ (ۤʤ) visual 饹򡢰ĤΥ꡼ǥݡȤ褦", + " ʥƥ⤢ޤΤ褦ʥƥǤϡgnuplot ˻ꤷ", + " visual 饹Ū˻Ȥ碌ɬפޤ㤨СǥեȤ", + " visual 8bit PseudoColor ɤ⥹꡼ 24bit TrueColor ", + " ݡȤƤƤष򤹤٤Ǥ褦ʾǤ", + "", + " X ФǽϤ˴ؤϥץ `xdpyinfo` ǼǤޤ", + " visual ̾ϼΤΰĤǤޤ: StaticGray, GrayScale,", + " StaticColor, PseudoColor, TrueColor, DirectColor X Ф׵", + " 줿 visual ΰۤʤʣο٤򥵥ݡȤƤ硢`gnuplot` ", + " Ǥ礭 (ǿ) ٤ visual 饹򤷤ޤ׵ᤵ줿", + " visual 饹ǥեȤ visual ȤäƤơηʣΥ饹", + " ݡȤƤϡǥեȤ visual 򤵤ޤ", + "", + " : 8bit PseudoColor visual Ǥϡ`gnuplot*maxcolors: 240`ڤ", + " `gnuplot*mincolors: 240` Ȼꤹ뤳ȤǶŪ private 顼ޥå", + " Ȥ褦ˤǤޤ", + "", + "@start table - first is interactive cleartext form", + " gnuplot*maxcolors: <>", + " gnuplot*mincolors: <>", + " gnuplot*visual: <visual ̾>", + "#\\begin{tabular}{|cl|} \\hline", + "#&gnuplot*maxcolors: \\\\", + "#&gnuplot*mincolors: \\\\", + "#&gnuplot*visual: visual ̾\\\\", + "%c l .", + "%@gnuplot*maxcolors: <>", + "%@gnuplot*mincolors: <>", + "%@gnuplot*visual: <visual ̾>", + "@end table" + , "", + "2 X11 ¾Υ꥽ (other_resources)", + "?commands set terminal x11 other_resources", + "?set terminal x11 other_resources", + "?set term x11 other_resources", + "?x11 other_resources", + "=X resources", + " ǥեȤǤϡߤ襦ɥƤϡɥ X ٥", + " ˽ä X11 åץܡɤޤ'gnuplot*exportselection' ", + " ꥽ͤ 'off' 'false' ꤹ뤳Ȥˤꤳ̵ˤǤ", + " ", + "", + " ǥեȤǤϡʸβž®ԤʤˡȤޤطʿ", + " ˤäƤϤն᤬뤳Ȥޤ줬ϡ꥽", + " 'gnuplot.fastrotate' 'off' ˤƤߤƤ", + "", + "@start table - other x11 resources", + " gnuplot*exportselection: off", + " gnuplot*fastrotate: on", + " gnuplot*ctrlq: off", + "#\\begin{tabular}{|cl|} \\hline", + "#&gnuplot*exportselection: off\\\\", + "#&gnuplot*fastrotate: on\\\\", + "#&gnuplot*ctrlq: off\\\\", + "%c l .", + "%@gnuplot*exportselection: off", + "%@gnuplot*fastrotate: on", + "%@gnuplot*ctrlq: off", + "@end table" + #endif /* JAPANESE_DOC */ END_HELP(x11) #endif /* TERM_HELP */ diff -rc term/xlib.trm.ORG term/xlib.trm *** term/xlib.trm.ORG 2012-01-22 14:36:36.000000000 +0900 --- term/xlib.trm 2012-01-22 14:37:59.000000000 +0900 *************** *** 89,94 **** --- 89,95 ---- #ifdef TERM_HELP START_HELP(xlib) + #ifndef JAPANESE_DOC "1 xlib", "?commands set terminal xlib", "?set terminal xlib", *************** *** 101,105 **** --- 102,120 ---- " `set output '<filename>'`. `set term x11` is equivalent to", " `set output \"|gnuplot_x11 -noevents\"; set term xlib`.", " `xlib` takes the same set of options as `x11`." + #else /* JAPANESE_DOC */ + "1 xlib", + "?commands set terminal xlib", + "?set terminal xlib", + "?set term xlib", + "?terminal xlib", + "?term xlib", + "?xlib", + " `xlib` ɥ饤Ф X11 Windows System 򥵥ݡȤƤޤΥɥ饤", + " Ф gnuplot_x11 ؤ̿ޤ`set output '<filename>'` ", + " ꤹȤե˽񤭽Фޤ`set term x11` ϡ", + " `set output \"|gnuplot_x11 -noevents\"; set term xlib` ƱͤǤ", + " `xlib` ˤ `x11` ƱץȤͿ뤳ȤǤޤ" + #endif /* JAPANESE_DOC */ END_HELP(xlib) #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/psdoc/���������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340021�012156� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/psdoc/ps_fontfile_doc.tex��������������������������������������������������������0000644�0004711�0000144�00000023042�07647756701�016074� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������\documentclass[a4paper,10pt]{article} \usepackage[T1]{fontenc} \usepackage{booktabs} \usepackage{longtable} \usepackage{graphicx} \usepackage{array} \usepackage{calc} %\usepackage[width=18cm,height=24cm]{geometry} \addtolength{\textwidth}{40mm} \addtolength{\oddsidemargin}{-15mm} \let\orgcaption\caption \newlength\tmplength \newcommand{\captionabove}{% \setlength{\tmplength}{\abovecaptionskip}% \setlength{\abovecaptionskip}{\belowcaptionskip}% \setlength{\belowcaptionskip}{\tmplength}% \orgcaption} \font\cmmi=cmmi10 \font\cmr=cmr10 \font\cmti=cmti10 \font\cmtt=cmtt10 \font\cmu=cmu10 \font\cmsy=cmsy10 \font\cmex=cmex10 \font\cmss=cmss10 \font\cmff=cmff10 \font\cmtex=cmtex10 \font\lasy=lasy10 \newcount\rownum \newcounter{dezcnt} \def\dez#1#2#3\empty{\setcounter{dezcnt}{64*#1+8*#2+#3}\thedezcnt} \newcommand*\row[1]{% \global\let\zus=\empty \ifnum#1=000 \gdef\zus{241}% \else\ifnum#1=001 \gdef\zus{242}% \else\ifnum#1=002 \gdef\zus{243}% \else\ifnum#1=003 \gdef\zus{244}% \else\ifnum#1=004 \gdef\zus{245}% \else\ifnum#1=005 \gdef\zus{246}% \else\ifnum#1=006 \gdef\zus{247}% \else\ifnum#1=007 \gdef\zus{250}% \else\ifnum#1=010 \gdef\zus{251}% \else\ifnum#1=011 \gdef\zus{252}% \else\ifnum#1=012 \gdef\zus{255}% \else\ifnum#1=013 \gdef\zus{256}% \else\ifnum#1=014 \gdef\zus{257}% \else\ifnum#1=015 \gdef\zus{260}% \else\ifnum#1=016 \gdef\zus{261}% \else\ifnum#1=017 \gdef\zus{262}% \else\ifnum#1=020 \gdef\zus{263}% \else\ifnum#1=021 \gdef\zus{264}% \else\ifnum#1=022 \gdef\zus{265}% \else\ifnum#1=023 \gdef\zus{266}% \else\ifnum#1=024 \gdef\zus{267}% \else\ifnum#1=025 \gdef\zus{270}% \else\ifnum#1=026 \gdef\zus{271}% \else\ifnum#1=027 \gdef\zus{272}% \else\ifnum#1=030 \gdef\zus{273}% \else\ifnum#1=031 \gdef\zus{274}% \else\ifnum#1=032 \gdef\zus{275}% \else\ifnum#1=033 \gdef\zus{276}% \else\ifnum#1=034 \gdef\zus{277}% \else\ifnum#1=035 \gdef\zus{300}% \else\ifnum#1=036 \gdef\zus{301}% \else\ifnum#1=037 \gdef\zus{302}% \else\ifnum#1=040 \gdef\zus{303}% and \200 \else\ifnum#1=177 \gdef\zus{304}% \fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi \textbackslash #1% \ifx\zus\empty \else , \textbackslash\zus \fi & {\cmr\char'#1} & {\cmti\char'#1} & {\cmtt\char'#1} & {\cmmi\char'#1} & {\cmu\char'#1} & {\cmss\char'#1} & {\cmtex\char'#1} & {\cmff\char'#1} & {\cmsy\char'#1} & {\lasy\char'#1} & \ifodd\rownum \else\qquad\fi \global\advance\rownum 1 {\raisebox{1.7ex}[0mm][1ex]{\cmex\char'#1}} & \textbackslash #1% \ifx\zus\empty \else , \textbackslash\zus \fi & \expandafter\dez#1\empty \ifx\zus\empty \else , \expandafter\dez\zus\empty \fi \\ } \begin{document} \title{Using \TeX\ Fonts in the Gnuplot Postscript Terminal} \author{Harald Harders, {\ttfamily h.harders@tu-bs.de}} \date{2003-03-03} \maketitle \noindent The Postscript terminal can embed Postscript Type\,1 fonts (with extensions \verb|.pfa| and \verb|.pfb|) and TrueType fonts (extension \verb|.ttf|)\footnote{If \texttt{.pfb} and \texttt{.ttf} fonts really can be embedded depends on your gnuplot installation: It needs to be able to handle pipes.} using the command \begin{verbatim} set terminal postscript fontfile '<filename>' \end{verbatim} The \verb|fontfile| option can be used multiple times. See the sections \emph{set terminal postscript} and \emph{set fontpath} in the Gnuplot documentation for further description. The embedded font can be used by \begin{verbatim} set terminal postscript '<fontname>' <size> \end{verbatim} or in postscript enhanced terminal as following example: \begin{verbatim} set xlabel '{/CMMI10 x}' \end{verbatim} Among other things, the font embedding is useful for generating plots to be included in \LaTeX\ documents. For normal text, the \emph{cm-super} Postscript Type\,1 fonts are a good choice. They are available from CTAN servers, e.g. \begin{verbatim} ftp://ftp.dante.de/tex-archive/fonts/ps-type1/cm-super/ \end{verbatim} The normal upright font with serifes is defined in \verb|sfrm1000.pfb|, and the font name is \verb|SFRM1000|\footnote{If you have an old version of the cm-super font, prior 2001-10-14, the font name is in lowercase letters: \texttt{sfrm1000}. You should update to a new version.} (The \verb|1000| means that this font is designed for 10\,pt). Replace the \verb|rm| by \verb|it|, \verb|bx| or other combinations in both the file name and the font name (here, in uppercase letters) in order to get other font shapes. The encoding of these fonts is ordinary and thus is not described here. Table~\ref{tab:fontnames} shows some examples of fonts contained in the cm-super font bundle. % \begin{table} \centering \captionabove{Some fonts in the cm-super font bundle (for a designsize of 10\,pt)}% \label{tab:fontnames}% \begin{tabular}{>{\ttfamily}l>{\ttfamily}ll} \toprule \multicolumn{1}{l}{File name}& \multicolumn{1}{l}{Full font name} & Example \\ & \multicolumn{1}{l}{(all preceded by \texttt{Computer Modern})} & \\ \midrule sfrm1000.pfb& Roman & {\rmfamily\upshape Example} \\ sfbx1000.pfb& Bold Extended & {\rmfamily\bfseries\upshape Example} \\ sfti1000.pfb& Italic & {\rmfamily\itshape Example} \\ sfbi1000.pfb& Bold Extended Italic & {\rmfamily\bfseries\itshape Example} \\ sfsl1000.pfb& Slanted & {\rmfamily\slshape Example} \\ sfbl1000.pfb& Bold Extended Slanted & {\rmfamily\bfseries\slshape Example} \\ sfcc1000.pfb& Caps and Small Caps & {\rmfamily\bfseries\scshape Example} \\ \midrule sfss1000.pfb& Sans Serif & {\sffamily\upshape Example} \\ sfsi1000.pfb& Sans Serif Slanted & {\sffamily\slshape Example} \\ sfsx1000.pfb& Sans Serif Bold Extended & {\sffamily\bfseries\upshape Example} \\ sfso1000.pfb& Sans Serif Bold Extended Slanted & {\sffamily\bfseries\slshape Example} \\ \midrule sftt1000.pfb& Typewriter & {\ttfamily\upshape Example} \\ sfit1000.pfb& Typewriter Italic & {\ttfamily\itshape Example} \\ sfst1000.pfb& Typewriter Slanted & {\ttfamily\slshape Example} \\ sftc1000.pfb& Typewriter Caps and Small Caps & {\ttfamily\scshape Example} \\ \bottomrule \end{tabular} \end{table} For mathematics the Type\,1 versions of the Computer Modern fonts are useful. They should be installed in most \TeX\ implementations and are also available from CTAN servers, e.g. \begin{verbatim} ftp://ftp.dante.de/tex-archive/fonts/cm/ps-type1/bluesky/pfb/ \end{verbatim} Here, the font name is the base of the file name in uppercase letters, e.g.\ the file \verb|cmmi10.pfb| contains the font \verb|CMMI10|. Since the encoding of these fonts is strange, a table containing all characters for some fonts follows. The font \verb|CMEX10| contains large symbols for mathematics. They overlap sometimes in the table. Since the baseline of the \verb|CMEX10| font is at the top of the signs, Gnuplot defines a font \verb|CMEX10-Baseline| with a different baseline if \verb|CMEX10| is embedded (normally by using \verb|fontfile 'cmex10.pfb'|. In contrast to the other fonts, \verb|CMEX10| is only available in the design size 10\,pt. You can access all characters of the fonts by typing their octal code. To get a $\heartsuit$ symbol, you may type: \begin{verbatim} set label '{/CMSY10 \176}' at graph 0.5,0.5 \end{verbatim} Since characters with an octal number below \textbackslash 040 can't be displayed by some postscript interpreters, these characters are repeated in the Computer Modern Fonts with a larger code. Thus, you should use the larger number, where two octal numbers are given (e.g.\ \textbackslash 000, \textbackslash 241). For example, you better use \begin{verbatim} set xlabel '{/CMR10 \242}' \end{verbatim} than \begin{verbatim} set xlabel '{/CMR10 \001}' \end{verbatim} to get an upright uppercase Delta $\Delta$. \begin{longtable}{lllllllllllllr} \toprule Oct& \rotatebox{90}{CMR10}& \rotatebox{90}{CMTI10}& \rotatebox{90}{CMTT10}& \rotatebox{90}{CMMI10}& \rotatebox{90}{CMU10}& \rotatebox{90}{CMSS10}& \rotatebox{90}{CMTEX10}& \rotatebox{90}{CMFF10}& \rotatebox{90}{CMSY10}& \rotatebox{90}{LASY10}& \rotatebox{90}{CMEX10-Baseline}& Oct& Dec\\ \midrule \endhead \bottomrule \endfoot \row{000}\row{001}\row{002}\row{003}\row{004}\row{005}\row{006}\row{007} \row{010}\row{011}\row{012}\row{013}\row{014}\row{015}\row{016}\row{017} \row{020}\row{021}\row{022}\row{023}\row{024}\row{025}\row{026}\row{027} \row{030}\row{031}\row{032}\row{033}\row{034}\row{035}\row{036}\row{037} \row{040}\row{041}\row{042}\row{043}\row{044}\row{045}\row{046}\row{047} \row{050}\row{051}\row{052}\row{053}\row{054}\row{055}\row{056}\row{057} \row{060}\row{061}\row{062}\row{063}\row{064}\row{065}\row{066}\row{067} \row{070}\row{071}\row{072}\row{073}\row{074}\row{075}\row{076}\row{077} % \row{100}\row{101}\row{102}\row{103}\row{104}\row{105}\row{106}\row{107} \row{110}\row{111}\row{112}\row{113}\row{114}\row{115}\row{116}\row{117} \row{120}\row{121}\row{122}\row{123}\row{124}\row{125}\row{126}\row{127} \row{130}\row{131}\row{132}\row{133}\row{134}\row{135}\row{136}\row{137} \row{140}\row{141}\row{142}\row{143}\row{144}\row{145}\row{146}\row{147} \row{150}\row{151}\row{152}\row{153}\row{154}\row{155}\row{156}\row{157} \row{160}\row{161}\row{162}\row{163}\row{164}\row{165}\row{166}\row{167} \row{170}\row{171}\row{172}\row{173}\row{174}\row{175}\row{176}\row{177} % \end{longtable} \end{document} ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/psdoc/Makefile�������������������������������������������������������������������0000644�0004711�0000144�00000001205�07577360220�013637� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Create ps_symbols.ps # top_srcdir = ../.. all: ps_symbols.ps ps_fontfile_doc.ps pdf: ps_fontfile_doc.pdf ps_symbols.ps: ps_symbols.gpi @if test -f $(top_srcdir)/src/gnuplot ; then \ $(top_srcdir)/src/gnuplot ps_symbols.gpi ; \ else \ gnuplot ps_symbols.gpi ; \ fi ps_fontfile_doc.ps: ps_fontfile_doc.tex latex ps_fontfile_doc latex ps_fontfile_doc dvips -j0 ps_fontfile_doc ps_fontfile_doc.pdf: ps_fontfile_doc.tex pdflatex ps_fontfile_doc pdflatex ps_fontfile_doc clean: -rm -f ps_symbols.ps ps_fontfile_doc.aux ps_fontfile_doc.dvi \ ps_fontfile_doc.log ps_fontfile_doc.pdf ps_fontfile_doc.ps distclean: clean �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/psdoc/ps_file.doc����������������������������������������������������������������0000644�0004711�0000144�00000027147�06674537356�014341� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������A short guide to PostScript files created by gnuplot's "postscript" terminal by Dick Crawford, aka rccrawford@lanl.gov Before we begin, let me say a few words about PostScript. It is highly ver- satile, but with versatility comes complexity. Syntax is extremely important; a misplaced command can do unexpected things. Thus the adventurous soul who wishes to alter the PostScript but has not been initiated into the arcana of PostScript would be well-advised to change only those items (like numerical values, font names or heights, or the letters defining symbols) that are fairly obvious as to their meaning. PostScript is stack-oriented and works in Reverse Polish notation: 'a b add' takes 'a' and 'b' off of the stack and replaces them with 'a+b'. The 'stroke' command actually draws lines on the page. It uses whatever line width and style are currently defined. Thus if we specify a bunch of commands like 'LT1 1 2 moveto 3 4 lineto LT3 stroke' [LT1 and LT3 are line type defi- nitions, 'x y moveto' moves the (virtual) pen to (x,y) and 'x y lineto' draws a line from wherever the pen was to (x,y)], the line connecting points (1,2) and (3,4) will be in type LT3. PostScript is case-sensitive. The sample file below has been pruned of repeated commands, just to keep its length down. Comment lines begin with '%'. Lines beginning with '%%' are inserted for "encapsulated PostScript" -- these lines are read by applications that import PostScript. Lines beginning with '%#' have been added to the sample by me for explanatory purposes. I have merged files created by the postscript terminal with no options, with the "eps" option and with the "enhanced" option. The differences will be clearly pointed out when appropriate. Here we go. %!PS-Adobe-2.0 %%Title: psgenh %%Creator: gnuplot 3.5 (pre 3.6) patchlevel beta 338 %%CreationDate: Fri Jan 16 13:18:18 1998 %%DocumentFonts: (atend) %%BoundingBox: 50 50 554 770 %%Orientation: Landscape %# In 'eps' mode, the preceding two lines would look like: %# %%BoundingBox: 50 50 410 302 %# %%Orientation: Portrait %%Pages: (atend) %%EndComments %# %# The 'dictionary' contains stuff defined by the user. %# /gnudict 120 dict def gnudict begin %# %# The following switch toggles between color and monochromatic. %# /Color false def %# %# The following switch toggles between solid and dot-dash lines. %# /Solid false def %# %# The following parameter scales all linewidths in the plot. %# /gnulinewidth 5.000 def /userlinewidth gnulinewidth def %# %# The following parameter specifies the vertical displacement of the labels %# and titles (it is used in the 'show' commands defined below). It should %# be about 1/3 of the font height. %# /vshift -46 def %# %# The following parameter scales the lengths of all dot-dash patterns. %# /dl {10 mul} def %# %# The following two parameters scale the horizontal and vertical sizes of %# the symbols used by 'plot with points'. %# /hpt_ 31.5 def /vpt_ 31.5 def /hpt hpt_ def /vpt vpt_ def %# %# The following four commands are aliases of the four 'pen movement' %# commands. Use of these aliases significantly shortens the file. Note %# that the first two are 'absolute' movements and the latter two are %# 'relative'. M and R move to the specified position; L and V draw a %# straight line (from the current position) to it. %# /M {moveto} bind def /L {lineto} bind def /R {rmoveto} bind def /V {rlineto} bind def %# %# These are a couple more parameters used in plotting symbols. Why %# they are here instead of up with 'hpt' and 'vpt' I know not. %# /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def %# %# The 'show' command writes out a character string. The following three %# varieties do so as left-, right-, and center-justified. [Remember, %# we're still in the dictionary--the font doesn't need to be specified %# until we actually use one of these.] %# /Lshow { currentpoint stroke M 0 vshift R show } def /Rshow { currentpoint stroke M dup stringwidth pop neg vshift R show } def /Cshow { currentpoint stroke M dup stringwidth pop -2 div vshift R show } def %# %# The following commands define the various line types (normal, bold, %# dashed, etc.) used by gnuplot. %# %# UP, DL, and UL are busywork commands used by others here %# /UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def /DL { Color {setrgbcolor Solid {pop []} if 0 setdash } {pop pop pop Solid {pop []} if 0 setdash} ifelse } def /BL { stroke gnulinewidth 2 mul setlinewidth } def %# twice the linewidth /AL { stroke gnulinewidth 2 div setlinewidth } def %# half the linewidth /UL { gnulinewidth mul /userlinewidth exch def } def /PL { stroke userlinewidth setlinewidth } def %# normal linewidth /LTb { BL [] 0 0 0 DL } def /LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def /LT0 { PL [] 0 1 0 DL } def /LT1 { PL [4 dl 2 dl] 0 0 1 DL } def %# %# ...and a bunch more. %# In the LT's, the first command ('PL' for LT1) sets the linewidth, %# the stuff in [...] defines the dot-dash pattern, and the three numbers %# define the rgb color. %# %# The following commands define the symbols used to plot data points. %# /Pnt { stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore } def /Dia { stroke [] 0 setdash 2 copy vpt add M hpt neg vpt neg V hpt vpt neg V hpt vpt V hpt neg vpt V closepath stroke Pnt } def %# %# ...and a bunch (dozens) more. %# %# The 'MF...' commands are used to handle the 'enhanced' syntax. If the %# 'enhanced' mode is not invoked, these commands won't appear in the file. %# /MFshow {{dup dup 0 get findfont exch 1 get scalefont setfont [ currentpoint ] exch dup 2 get 0 exch rmoveto dup dup 5 get exch 4 get {show} {stringwidth pop 0 rmoveto}ifelse dup 3 get {2 get neg 0 exch rmoveto pop} {pop aload pop moveto}ifelse} forall} bind def /MFwidth {0 exch {dup 3 get{dup dup 0 get findfont exch 1 get scalefont setfont 5 get stringwidth pop add} {pop} ifelse} forall} bind def /MLshow { currentpoint stroke M 0 exch R MFshow } bind def /MRshow { currentpoint stroke M exch dup MFwidth neg 3 -1 roll R MFshow } def /MCshow { currentpoint stroke M exch dup MFwidth -2 div 3 -1 roll R MFshow } def end %# %# The dictionary is now complete. We activate it, save what went before %# (the 'gsave' command saves everything on a different stack) and begin. %# %%EndProlog %%Page: 1 1 gnudict begin gsave %# %# First we position the plot on the page and scale it. %# %# The 'translate' command moves the origin to the specified position. %# [The PostScript default origin is near the lower left-hand corner.] %# The 'scale' command changes the units used in the plot. %# [The PostScript default unit is the point: 72 points equal one inch.] %# The 'rotation' command rotates the coordinates clockwise through the %# specified angle (degrees). %# [The PostScript default orientation is profile.] %# %# This sample changes the orientation to landscape (the gnuplot default) %# and the unit to tenths of a point. Note that if the first two commands %# were interchanged, the translation would be only five points in each %# direction, instead of fifty. %# %# If this had been generated in 'eps' mode, the "90 rotate" and "0 -5040 %# translate" commands would not appear and the units would be 0.050 instead %# of 0.100. %# %# If you want to change the size or the position of the plot, this is where %# to do it. %# 50 50 translate 0.100 0.100 scale 90 rotate 0 -5040 translate 0 setgray newpath %# %# Define the default font. The number is the height. As usual, fonts %# used primarily for text have characters only about 70% the specified %# height, because spacing between lines is built-in. The Symbol font and %# others that are normally not used for text produce characters that are %# more nearly the specified height. Thus if you want to intersperse, for %# example, Greek and Roman letters (as you might when writing an equation), %# you'll need to play with the heights of the two fonts in order for them %# to look reasonably proportioned. %# %# The font defined here is used for the tick labels first, then the axis %# labels and plot titles, and finally the key. If you want to change the %# font, simply insert the modified line after you are done with the old one %# (i.e. the last 'show' command to use it) but before the new one is needed. %# Note that if you change the font height, you'll also want to change the %# value of 'vshift' (it's near the top of the dictionary). I'll give an %# example of this later on... %# (Helvetica) findfont 140 scalefont setfont LTb %# %# Label and draw the ticks along the y-axis. I've given you three %# y-tics in different formats... %# %# The tick length is 63 units. %# %# This first y-tic is in 'normal' mode: %# 728 560 M 63 0 V 6325 0 R -63 0 V 644 560 M (-10) Rshow %# %# This y-tic is in 'enhanced' mode: %# 728 1645 M 63 0 V 6325 0 R -63 0 V stroke 644 1645 M [ [(Helvetica) 140.0 0.0 true true (-5)] ] -46.7 MRshow %# %# This one is in 'normal' mode, but is rotated: %# 434 2730 M 63 0 V 6619 0 R -63 0 V -6759 0 R currentpoint gsave translate 90 rotate 0 0 M (0) Cshow grestore %# %# Now the x-tics. Here's one: %# 728 560 M 0 63 V 0 4277 R 0 -63 V stroke 728 420 M [ [(Helvetica) 140.0 0.0 true true (-10)] ] -46.7 MCshow LTb %# %# Now draw the left and lower axes. Were this drawn by 'splot' %# instead of 'plot', there might be some other axes drawn. %# 728 560 M 6388 0 V 0 4340 V -6388 0 V 728 560 L stroke %# Now come labels (both for the axes and those on "set label" commands) %# and other titles. I just give you axis labels here, in 'enhanced' mode: %# 140 2730 M currentpoint gsave translate 90 rotate 0 0 moveto [ [(Helvetica) 140.0 0.0 true true (ylabel)] ] -46.7 MCshow grestore 3922 210 M [ [(Helvetica) 140.0 0.0 true true (xlabel)] ] -46.7 MCshow %# %# We're finally ready to plot functions and/or data. %# %# The key is drawn just before the applicable data. %# %# Choose a line type and write the key. %# In this sample, it is drawn with lines. %# 1.000 UL LT0 6465 4767 M (x) Rshow %# the function label in the key 6549 4767 M %# the sample line in the key 399 0 V %# %# Now the data (this is drawn with some combination of absolute and %# relative lineto's and moveto's): %# 728 560 M 2043 560 V 4926 911 L 2043 560 V 7116 4900 L %# %# ...and more. %# %# We don't need to eplicitly 'stroke' to draw the lines for each function %# because the 'stroke' command is included in the line-type definition %# commands. Thus switching line types automatically 'strokes' previous %# lines. Clever program, that gnuplot... %# %# We can now repeat commands for the key and data for as many items %# as were specified on the "plot" or "splot" command. %# %# Here's a second function, plotted with dots: %# LT1 6486 4486 M (function 2) Rshow 6654 4486 Pnt %# %# The data: %# 840 911 Pnt 2883 2030 Pnt 4926 2590 Pnt 6969 3710 Pnt %# %# ...and more. %# %# Since we're now done, we 'stroke' the last lines, close the dictionary %# and restore the previous settings (those saved by the 'gsave' at the top). %# [The 'gsave'/'grestore' pair is included so that if this file is embedded %# in another PostScript file, this patch won't mess up the other parts of %# the picture. It's considered good PostScript style to do this.] %# stroke grestore end %# %# And, finally, we send the page to the printer. [If we do embed this %# file into another PostScript file, we'd remove this 'showpage'. Unless, %# of course, this was appended to the other file, in which case we'd %# remove the 'showpage' from the end of that file.] %# %# showpage %%Trailer %%DocumentFonts: Helvetica %%Pages: 1 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/psdoc/README���������������������������������������������������������������������0000644�0004711�0000144�00000002252�07534751026�013063� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This set of files contains information about the gnuplot-PostScript interface. ps_file.doc is a discussion of a PostScript file as written by gnuplot. ps_guide.ps is a PostScript file that has two pages. The first is a summary of the enhanced syntax (available via "set terminal postscript enhanced". The second is a table of the character codes. The table has the standard encoding (shown in Times-Roman), the Symbol and Zapf-Dingbats fonts, and the ISO-Latin1 (also known as ISO-8859-1) encoding. The last entry may be changed to ISO-Latin2 (also called as ISO-8859-2), CP850 or CP852 (for OS/2) or CP437 (for MS-DOS) by editing line #14 in the file. These encodings are selected via the "set encoding" command. ps_symbols.gpi is a gnuplot command file that generates ps_symbols. ps.ps_symbols.ps is a PostScript file that shows a simple display of the 76 symbol types available to the "postscript" terminal and selectable via the "pt" option on the "plot" command. ps_fontfile_doc.tex is a LaTeX file that generates the file ps_fontfile_doc.ps. It contains a table containing the glyphs of the most important TeX math fonts (Computer Modern Fonts). ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/psdoc/ps_guide.ps����������������������������������������������������������������0000644�0004711�0000144�00000055041�07624641621�014351� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-2.0 %%Creator: gnuplot, modified by Richard Crawford %%Pages: 2 %%EndComments /gnudict 120 dict def gnudict begin % definitions for the character codes page: % the variable "LastColumn" determines which encoding vector is used for % the last (right-most) column in the display % 1 = ISO-Latin1 (also known as ISO-8859-1) for Unix % 2 = ISO-Latin2 (also known as ISO-8859-2) for Unix (Central Europe) % 3 = CP 437 for MS-DOS % 4 = CP 850 for OS/2 % 5 = CP 852 for OS/2 /LastColumn 1 def /reEncode { findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall currentdict /CharStrings known { CharStrings EncodingCheck known { /Encoding EncodingVector def } if} if currentdict end definefont pop } def /ISOLatin1 { /EncodingCheck /ydieresis def /EncodingVector ISOLatin1Encoding def } def % Encoding for ISO-8859-2 (also called as Latin-2), with corrections % Levente NOVK <novak@jaguar.dote.hu> /ISOLatin2 { /EncodingCheck /ydieresis def /EncodingVector [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M /N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /nbspace/Aogonek/breve/Lslash/currency/Lcaron/Sacute/section /dieresis/Scaron/Scommaaccent/Tcaron/Zacute/hyphen/Zcaron/Zdotaccent /degree/aogonek/ogonek/lslash/acute/lcaron/sacute/caron/cedilla /scaron/scommaaccent/tcaron/zacute/hungarumlaut/zcaron/zdotaccent /Racute/Aacute/Acircumflex/Abreve/Adieresis/Lacute/Cacute/Ccedilla /Ccaron/Eacute/Eogonek/Edieresis/Ecaron/Iacute/Icircumflex/Dcaron /Dcroat/Nacute/Ncaron/Oacute/Ocircumflex/Ohungarumlaut/Odieresis /multiply/Rcaron/Uring/Uacute/Uhungarumlaut/Udieresis/Yacute /Tcommaaccent/germandbls/racute/aacute/acircumflex/abreve/adieresis /lacute/cacute/ccedilla/ccaron/eacute/eogonek/edieresis/ecaron /iacute/icircumflex/dcaron/dcroat/nacute/ncaron/oacute/ocircumflex /ohungarumlaut/odieresis/divide/rcaron/uring/uacute/uhungarumlaut /udieresis/yacute/tcommaaccent/dotaccent ] def } def /CP437 { /EncodingCheck /ydieresis def /EncodingVector [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/.notdef /Ccedilla/udieresis/eacute/acircumflex/adieresis/agrave/aring/ccedilla /ecircumflex/edieresis/egrave/idieresis/icircumflex/igrave/Adieresis/Aring /Eacute/ae/AE/ocircumflex/odieresis/ograve/ucircumflex/ugrave /ydieresis/Odieresis/Udieresis/cent/sterling/yen/.notdef/florin /aacute/iacute/oacute/uacute/ntilde/Ntilde/ordfeminine/ordmasculine /questiondown/.notdef/logicalnot/onehalf/onequarter/exclamdown/guillemotleft/guillemotright /space/space/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/germandbls/.notdef/.notdef/.notdef/.notdef/mu/.notdef /.notdef/.notdef/.notdef/.notdef/infinity/.notdef/.notdef/.notdef /.notdef/plusminus/greaterequal/lessequal/.notdef/.notdef/divide/.notdef /degree/bullet/periodcentered/.notdef/nsuperior/twosuperior/.notdef/.notdef ] def } def /CP850 { /EncodingCheck /ydieresis def /EncodingVector [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/.notdef /Ccedilla/udieresis/eacute/acircumflex/adieresis/agrave/aring/ccedilla /ecircumflex/edieresis/egrave/idieresis/icircumflex/igrave/Adieresis/Aring /Eacute/ae/AE/ocircumflex/odieresis/ograve/ucircumflex/ugrave /ydieresis/Odieresis/Udieresis/oslash/sterling/Oslash/multiply/florin /aacute/iacute/oacute/uacute/ntilde/Ntilde/ordfeminine/ordmasculine /questiondown/registered/logicalnot/onehalf/onequarter/exclamdown/guillemotleft/guillemotright /space/space/.notdef/.notdef/.notdef/Aacute/Acircumflex/Agrave /.notdef/.notdef/.notdef/.notdef/.notdef/cent/yen/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/atilde/Atilde /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/currency /eth/Eth/Ecircumflex/Edieresis/Egrave/dotlessi/Iacute/Icircumflex /Idieresis/.notdef/.notdef/.notdef/.notdef/brokenbar/Igrave/.notdef /Oacute/germandbls/Ocircumflex/Ograve/otilde/Otilde/mu/thorn /Thorn/Uacute/Ucircumflex/Ugrave/yacute/Yacute/macron/acute /hyphen/plusminus/equal/threequarters/paragraph/section/divide/.notdef /degree/.notdef/periodcentered/onesuperior/threesuperior/twosuperior/.notdef/.notdef ] def } def /CP852 { /EncodingCheck /ydieresis def /EncodingVector [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/paragraph/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash /zero/one/two/three/four/five/six/seven /eight/nine/colon/semicolon/less/equal/greater/question /at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W /X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore /grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w /x/y/z/braceleft/bar/braceright/asciitilde/.notdef /Ccedilla/udieresis/eacute/acircumflex/adieresis/uring/cacute/ccedilla /lslash/edieresis/Ohungarumlaut/ohungarumlaut/icircumflex/Zacute/Adieresis/Cacute /Eacute/Lacute/lacute/ocircumflex/odieresis/Lcaron/lcaron/Sacute /sacute/Odieresis/Udieresis/Tcaron/tcaron/Lslash/multiply/ccaron /aacute/iacute/oacute/uacute/Aogonek/aogonek/Zcaron/zcaron /Eogonek/eogonek/.notdef/zacute/Ccaron/scedilla/guillemotleft/guillemotright /.notdef/.notdef/.notdef/.notdef/.notdef/Aacute/Acircumflex/Ecaron /Scedilla/.notdef/.notdef/.notdef/.notdef/Zdotaccent/zdotaccent/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/Abreve/abreve /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/currency /eth/Eth/Dcaron/Edieresis/dcaron/Ncaron/Iacute/Icircumflex /ecaron/.notdef/.notdef/.notdef/.notdef/Tcedilla/Uring/.notdef /Oacute/germandbls/Ocircumflex/Nacute/nacute/ncaron/Scaron/scaron /Racute/Uacute/racute/Uhungarumlaut/yacute/Yacute/tcedilla/acute /hyphen/hungarumlaut/ogonek/caron/breve/section/divide/cedilla /degree/dieresis/dotaccent/uhungarumlaut/Rcaron/rcaron/.notdef/.notdef ] def } def /Numbs [ (040) (041) (042) (043) (044) (045) (046) (047) (050) (051) (052) (053) (054) (055) (056) (057) (060) (061) (062) (063) (064) (065) (066) (067) (070) (071) (072) (073) (074) (075) (076) (077) (100) (101) (102) (103) (104) (105) (106) (107) (110) (111) (112) (113) (114) (115) (116) (117) (120) (121) (122) (123) (124) (125) (126) (127) (130) (131) (132) (133) (134) (135) (136) (137) (140) (141) (142) (143) (144) (145) (146) (147) (150) (151) (152) (153) (154) (155) (156) (157) (160) (161) (162) (163) (164) (165) (166) (167) (170) (171) (172) (173) (174) (175) (176) (220) (221) (222) (223) (224) (225) (226) (227) (230) (232) (233) (235) (236) (237) (240) (241) (242) (243) (244) (245) (246) (247) (250) (251) (252) (253) (254) (255) (256) (257) (260) (261) (262) (263) (264) (265) (266) (267) (270) (271) (272) (273) (274) (275) (276) (277) (300) (301) (302) (303) (304) (305) (306) (307) (310) (311) (312) (313) (314) (315) (316) (317) (320) (321) (322) (323) (324) (325) (326) (327) (330) (331) (332) (333) (334) (335) (336) (337) (340) (341) (342) (343) (344) (345) (346) (347) (350) (351) (352) (353) (354) (355) (356) (357) (360) (361) (362) (363) (364) (365) (366) (367) (370) (371) (372) (373) (374) (375) (376) (377) ] def /Codes [ (\040) (\041) (\042) (\043) (\044) (\045) (\046) (\047) (\050) (\051) (\052) (\053) (\054) (\055) (\056) (\057) (\060) (\061) (\062) (\063) (\064) (\065) (\066) (\067) (\070) (\071) (\072) (\073) (\074) (\075) (\076) (\077) (\100) (\101) (\102) (\103) (\104) (\105) (\106) (\107) (\110) (\111) (\112) (\113) (\114) (\115) (\116) (\117) (\120) (\121) (\122) (\123) (\124) (\125) (\126) (\127) (\130) (\131) (\132) (\133) (\134) (\135) (\136) (\137) (\140) (\141) (\142) (\143) (\144) (\145) (\146) (\147) (\150) (\151) (\152) (\153) (\154) (\155) (\156) (\157) (\160) (\161) (\162) (\163) (\164) (\165) (\166) (\167) (\170) (\171) (\172) (\173) (\174) (\175) (\176) (\220) (\221) (\222) (\223) (\224) (\225) (\226) (\227) (\230) (\232) (\233) (\235) (\236) (\237) (\240) (\241) (\242) (\243) (\244) (\245) (\246) (\247) (\250) (\251) (\252) (\253) (\254) (\255) (\256) (\257) (\260) (\261) (\262) (\263) (\264) (\265) (\266) (\267) (\270) (\271) (\272) (\273) (\274) (\275) (\276) (\277) (\300) (\301) (\302) (\303) (\304) (\305) (\306) (\307) (\310) (\311) (\312) (\313) (\314) (\315) (\316) (\317) (\320) (\321) (\322) (\323) (\324) (\325) (\326) (\327) (\330) (\331) (\332) (\333) (\334) (\335) (\336) (\337) (\340) (\341) (\342) (\343) (\344) (\345) (\346) (\347) (\350) (\351) (\352) (\353) (\354) (\355) (\356) (\357) (\360) (\361) (\362) (\363) (\364) (\365) (\366) (\367) (\370) (\371) (\372) (\373) (\374) (\375) (\376) (\377) ] def /Doit { 0 1 204 { /Ind exch def % stores the index /Col Ind 41 idiv def % column number /Row Ind Col 41 mul sub def % row number Col 1.60 mul dX add Row -.225 mul moveto Sym Ind get show } for } def % definitions for the enhanced syntax page: /Color false def /Solid false def /gnulinewidth 5.000 def /vshift -40 def /M {moveto} bind def /L {lineto} bind def /R {rmoveto} bind def /V {rlineto} bind def /Lshow { currentpoint stroke M 0 vshift R show } def /Rshow { currentpoint stroke M dup stringwidth pop neg vshift R show } def /Cshow { currentpoint stroke M dup stringwidth pop -2 div vshift R show } def /DL { Color {setrgbcolor Solid {pop []} if 0 setdash } {pop pop pop Solid {pop []} if 0 setdash} ifelse } def /MFshow {{dup dup 0 get findfont exch 1 get scalefont setfont [ currentpoint ] exch dup 2 get 0 exch rmoveto dup dup 5 get exch 4 get {show} {stringwidth pop 0 rmoveto}ifelse dup 3 get {2 get neg 0 exch rmoveto pop} {pop aload pop moveto}ifelse} forall} bind def /MFwidth {0 exch {dup 3 get{dup dup 0 get findfont exch 1 get scalefont setfont 5 get stringwidth pop add} {pop} ifelse} forall} bind def /MLshow { currentpoint stroke M 0 exch R MFshow } bind def /MRshow { currentpoint stroke M exch dup MFwidth neg 3 -1 roll R MFshow } def /MCshow { currentpoint stroke M exch dup MFwidth -2 div 3 -1 roll R MFshow } def end %%EndProlog %%Page: 1 1 gnudict begin gsave 50 50 translate 0.100 0.100 scale 0 setgray newpath (Times-Roman) findfont 120 scalefont setfont gnulinewidth 2 mul setlinewidth [] 0 0 0 DL 2525 7080 M [ [(Times-Roman) 160.0 0.0 true true (Syntax for )] [(Times-Bold) 160.0 0.0 true true (postscript enhanced)] [(Times-Roman) 160.0 0.0 true true ( option)] ] -53.3 MCshow 2525 6804 M [ [(Times-Bold) 120.0 0.0 true true (enhpost)] [(Times-Roman) 120.0 0.0 true true ( is the product of David Denholm and Matt Heffron.)] ] -40.0 MCshow 2525 6597 M [ [(Times-Roman) 120.0 0.0 true true (This guide is the product of Dick Crawford.)] ] -40.0 MCshow 3679 6321 M [ [(Times-Roman) 120.0 0.0 true true (text)] ] -40.0 MCshow 4602 6321 M [ [(Times-Roman) 120.0 0.0 true true (result)] ] -40.0 MCshow 2755 6045 M [ [(Times-Roman) 120.0 0.0 true true (Superscripts are denoted by ^:)] ] -40.0 MRshow 3679 6045 M [ [(Times-Roman) 120.0 0.0 true true ('10^{-2}')] ] -40.0 MCshow 4602 6045 M [ [(Times-Roman) 120.0 0.0 true true (10)] [(Times-Roman) 96.0 60.0 true true (-2)] ] -52.0 MCshow 2755 5838 M [ [(Times-Roman) 120.0 0.0 true true (Subscripts are denoted by _:)] ] -40.0 MRshow 3679 5838 M [ [(Times-Roman) 120.0 0.0 true true ('A_{j,k}')] ] -40.0 MCshow 4602 5838 M [ [(Times-Roman) 120.0 0.0 true true (A)] [(Times-Roman) 96.0 -36.0 true true (j,k)] ] -28.0 MCshow 2755 5631 M [ [(Times-Roman) 120.0 0.0 true true (Braces are not needed for single characters:)] ] -40.0 MRshow 3679 5631 M [ [(Times-Roman) 120.0 0.0 true true ('e^x')] ] -40.0 MCshow 4602 5631 M [ [(Times-Roman) 120.0 0.0 true true (e)] [(Times-Roman) 96.0 60.0 true true (x)] ] -52.0 MCshow 2755 5286 M [ [(Times-Roman) 120.0 0.0 true true (Use @ to align sub- and superscripts:)] ] -40.0 MRshow 3679 5286 M [ [(Times-Roman) 120.0 0.0 true true ('x@^2_k')] ] -40.0 MCshow 4602 5286 M [ [(Times-Roman) 120.0 0.0 true true (x)] [(Times-Roman) 96.0 60.0 false true (2)] [(Times-Roman) 96.0 -36.0 true true (k)] ] -40.0 MCshow 2755 5079 M [ [(Times-Roman) 120.0 0.0 true true (Put the shorter of the two first:)] ] -40.0 MRshow 3679 5079 M [ [(Times-Roman) 120.0 0.0 true true ('x@_0^{-3/2}y')] ] -40.0 MCshow 4602 5079 M [ [(Times-Roman) 120.0 0.0 true true (x)] [(Times-Roman) 96.0 -36.0 false true (0)] [(Times-Roman) 96.0 60.0 true true (-3/2)] [(Times-Roman) 120.0 0.0 true true (y)] ] -40.0 MCshow 2755 4872 M [ [(Times-Roman) 120.0 0.0 true true (...rather than:)] ] -40.0 MRshow 3679 4872 M [ [(Times-Roman) 120.0 0.0 true true ('x@^{-3/2}_0y')] ] -40.0 MCshow 4602 4872 M [ [(Times-Roman) 120.0 0.0 true true (x)] [(Times-Roman) 96.0 60.0 false true (-3/2)] [(Times-Roman) 96.0 -36.0 true true (0)] [(Times-Roman) 120.0 0.0 true true (y)] ] -40.0 MCshow 2755 4527 M [ [(Times-Roman) 120.0 0.0 true true (Font changes are enclosed in braces:)] ] -40.0 MRshow 3679 4527 M [ [(Times-Roman) 120.0 0.0 true true ('{/Helvetica m}')] ] -40.0 MCshow 4602 4527 M [ [(Helvetica) 120.0 0.0 true true (m)] ] -40.0 MCshow 2755 4320 M [ [(Times-Roman) 120.0 0.0 true true (...size, too:)] ] -40.0 MRshow 3679 4320 M [ [(Times-Roman) 120.0 0.0 true true ('{/=8 m}')] ] -40.0 MCshow 4602 4320 M [ [(Times-Roman) 80.0 0.0 true true (m)] ] -40.0 MCshow 2755 4113 M [ [(Times-Roman) 120.0 0.0 true true (...or both:)] ] -40.0 MRshow 3679 4113 M [ [(Times-Roman) 120.0 0.0 true true ('{/Helvetica=18 m}')] ] -40.0 MCshow 4602 4113 M [ [(Helvetica) 180.0 0.0 true true (m)] ] -60.0 MCshow 2755 3768 M [ [(Times-Roman) 120.0 0.0 true true (Characters can be specified by code:)] ] -40.0 MRshow 3679 3768 M [ [(Times-Roman) 120.0 0.0 true true ('{\\120}')] ] -40.0 MCshow 4602 3768 M [ [(Times-Roman) 120.0 0.0 true true (\120)] ] -40.0 MCshow 2755 3562 M [ [(Times-Roman) 120.0 0.0 true true (...which is how to get nonkeyboard characters:)] ] -40.0 MRshow 3679 3562 M [ [(Times-Roman) 120.0 0.0 true true ('{\\267}')] ] -40.0 MCshow 4602 3562 M [ [(Times-Roman) 120.0 0.0 true true (\267)] ] -40.0 MCshow 2755 3355 M [ [(Times-Roman) 120.0 0.0 true true (Use keyboard characters or codes for other fonts:)] ] -40.0 MRshow 3679 3355 M [ [(Times-Roman) 120.0 0.0 true true ('{/Symbol p\\271 22/7}')] ] -40.0 MCshow 4602 3355 M [ [(Symbol) 120.0 0.0 true true (p\271 22/7)] ] -40.0 MCshow 2755 3010 M [ [(Times-Roman) 120.0 0.0 true true (Everything outside braces is in the default font:)] ] -40.0 MRshow 3679 3010 M [ [(Times-Roman) 120.0 0.0 true true ('P = {/Symbol r}kT')] ] -40.0 MCshow 4602 3010 M [ [(Times-Roman) 120.0 0.0 true true (P = )] [(Symbol) 120.0 0.0 true true (r)] [(Times-Roman) 120.0 0.0 true true (kT)] ] -40.0 MCshow 2755 2665 M [ [(Times-Roman) 120.0 0.0 true true (Space of a given size can be inserted with &:)] ] -40.0 MRshow 3679 2665 M [ [(Times-Roman) 120.0 0.0 true true ('<junk>')] ] -40.0 MCshow 4602 2665 M [ [(Times-Roman) 120.0 0.0 true true (<junk>)] ] -40.0 MCshow 3679 2458 M [ [(Times-Roman) 120.0 0.0 true true ('<&{junk}>')] ] -40.0 MCshow 4602 2458 M [ [(Times-Roman) 120.0 0.0 true true (<)] [(Times-Roman) 120.0 0.0 true false (junk)] [(Times-Roman) 120.0 0.0 true true (>)] ] -40.0 MCshow 2755 2113 M [ [(Times-Roman) 120.0 0.0 true true (Special characters \(^,_,{,},@,&,\\\) can be escaped by \\:)] ] -40.0 MRshow 3679 2113 M [ [(Times-Roman) 120.0 0.0 true true ('f\\{x,y\\}')] ] -40.0 MCshow 4602 2113 M [ [(Times-Roman) 120.0 0.0 true true (f{x,y})] ] -40.0 MCshow 2755 1906 M [ [(Times-Roman) 120.0 0.0 true true (...or \\\\ if within a double-quoted string:)] ] -40.0 MRshow 3679 1906 M [ [(Times-Roman) 120.0 0.0 true true ("f\\\\{x,y\\\\}")] ] -40.0 MCshow 4602 1906 M [ [(Times-Roman) 120.0 0.0 true true (f{x,y})] ] -40.0 MCshow 216 1630 M [ [(Times-Roman) 120.0 0.0 true true (Everything can be done recursively:)] ] -40.0 MLshow 216 1423 M [ [(Times-Roman) 120.0 0.0 true true (the text)] ] -40.0 MLshow 2755 1423 M [ [(Times-Roman) 120.0 0.0 true true ('{/Symbol=18 \\362@_{/=9.6 0}^{/=12 \\245}})] ] -40.0 MCshow 2755 1216 M [ [(Times-Roman) 120.0 0.0 true true ({/Helvetica e^{-{/Symbol m}^2/2} d}{/Symbol m = \(p/2\)^{1/2}}')] ] -40.0 MCshow 216 1009 M [ [(Times-Roman) 120.0 0.0 true true (produces the result:)] ] -40.0 MLshow 2755 1009 M [ [(Symbol) 180.0 0.0 true true (\362)] [(Symbol) 96.0 -54.0 false true (0)] [(Symbol) 120.0 90.0 true true (\245)] [(Helvetica) 120.0 0.0 true true (e)] [(Helvetica) 96.0 60.0 true true (-)] [(Symbol) 96.0 60.0 true true (m)] [(Helvetica) 76.8 108.0 true true (2)] [(Helvetica) 96.0 60.0 true true (/2)] [(Helvetica) 120.0 0.0 true true ( d)] [(Symbol) 120.0 0.0 true true (m = \(p/2\))] [(Symbol) 96.0 60.0 true true (1/2)] ] -60.0 MCshow 216 802 M [ [(Times-Roman) 120.0 0.0 true true (Note how font sizes and definitions are preserved across pairs of braces.)] ] -40.0 MLshow 216 388 M [ [(Times-Roman) 120.0 0.0 true true (The default font for this page is /Times-Roman=12. These and other options may be changed)] ] -40.0 MLshow 216 250 M [ [(Times-Roman) 120.0 0.0 true true (on the command )] [(Times-Bold) 120.0 0.0 true true (set terminal postscript)] [(Times-Roman) 120.0 0.0 true true (. See the manual or )] [(Times-Bold) 120.0 0.0 true true (help postscript)] [(Times-Roman) 120.0 0.0 true true ( for details.)] ] -40.0 MLshow gnulinewidth setlinewidth [] 0 1 0 DL stroke showpage grestore %%Page: 2 2 % Character code page gsave 72 72 scale 1.0 10.5 translate 0 0 moveto /Times-Roman findfont .225 scalefont setfont /Title (PostScript Character Codes) def Title stringwidth pop -2 div 3.2 add 0 rmoveto Title show /Times-Roman findfont .20 scalefont setfont 0 -.25 translate 0 0 moveto /Extra LastColumn 1 eq {(ISO Latin-1)} if LastColumn 2 eq {(ISO Latin-2)} if LastColumn 3 eq {(CP437)} if LastColumn 4 eq {(CP850)} if LastColumn 5 eq {(CP852)} if def /H (T = text (here Times-Roman) S = Symbol Z = ZapfDingbats E = ) def H stringwidth pop Extra stringwidth pop add ( encoding) stringwidth pop add -2 div 3.2 add 0 rmoveto H show Extra show ( encoding) show /H ((the "E" character set is accessed via an option on "set encoding" )) def H stringwidth pop -2 div 3.2 add -.20 moveto H show -.6 -.5 translate 0 1 4 { 1.60 mul /X0 exch def X0 .375 add 0 moveto (T) show X0 .625 add 0 moveto (S) show X0 .875 add 0 moveto (Z) show X0 1.125 add 0 moveto (E) show } for 0 -.25 translate % first subcolumn: ACSII code /Times-Roman findfont .175 scalefont setfont /dX 0 def % subcolumn offset /Sym Numbs def % item to be printed Doit % second subcolumn: Times-Roman /Times-Roman findfont .175 scalefont setfont /dX .375 def % subcolumn offset /Sym Codes def % item to be printed Doit % third subcolumn: Symbol /Symbol findfont .175 scalefont setfont /dX .625 def % subcolumn offset /Sym Codes def % item to be printed Doit % fourth subcolumn: ZapfDingbats /ZapfDingbats findfont .175 scalefont setfont /dX .875 def % subcolumn offset /Sym Codes def % item to be printed Doit % fifth subcolumn: selected by "LastColumn" LastColumn 1 eq { % Times-Roman with ISO Latin-1 encoding /TRISOL1 ISOLatin1 /Times-Roman reEncode /TRISOL1 findfont .175 scalefont setfont } if LastColumn 2 eq { % Times-Roman with ISO Latin-2 encoding /TRISOL2 ISOLatin2 /Times-Roman reEncode /TRISOL2 findfont .175 scalefont setfont } if LastColumn 3 eq { % subcolumn: Times-Roman with CP 437 encoding /TRCP437 CP437 /Times-Roman reEncode /TRCP437 findfont .175 scalefont setfont } if LastColumn 4 eq { % Times-Roman with CP 850 encoding /TRCP850 CP850 /Times-Roman reEncode /TRCP850 findfont .175 scalefont setfont } if LastColumn 5 eq { % Times-Roman with CP 852 encoding /TRCP852 CP852 /Times-Roman reEncode /TRCP852 findfont .175 scalefont setfont } if /dX 1.125 def % subcolumn offset /Sym Codes def % item to be printed Doit showpage grestore end �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/psdoc/ps_symbols.gpi�������������������������������������������������������������0000644�0004711�0000144�00000020021�11453171724�015064� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������set size 0.67,1 set terminal postscript lw 1.5; set output 'ps_symbols.ps' set title 'Symbols and linetypes in Postscript terminal' set noborder; set nozeroaxis; set noxtics; set noytics set xlabel ''; set ylabel ''; set nokey; set size square; set xrange [-1.2:1.2]; set yrange [-1.2:1.2]; set parametric; set samples 2 set angle radian f(x)=cos(pi*x/38.0); g(x)=sin(pi*x/38.0) set label '(#70--75 are opaque)' at 0,0 center set label '0' at 1.07*f(0), 1.07*g(0) center set label '5' at 1.07*f(5), 1.07*g(5) center set label '10' at 1.07*f(10), 1.07*g(10) center set label '15' at 1.07*f(15), 1.07*g(15) center set label '20' at 1.07*f(20), 1.07*g(20) center set label '25' at 1.07*f(25), 1.07*g(25) center set label '30' at 1.07*f(30), 1.07*g(30) center set label '35' at 1.07*f(35), 1.07*g(35) center set label '40' at 1.07*f(40), 1.07*g(40) center set label '45' at 1.07*f(45), 1.07*g(45) center set label '50' at 1.07*f(50), 1.07*g(50) center set label '55' at 1.07*f(55), 1.07*g(55) center set label '60' at 1.07*f(60), 1.07*g(60) center set label '65' at 1.07*f(65), 1.07*g(65) center set label '70' at 1.07*f(70), 1.07*g(70) center set label '75' at 1.07*f(75), 1.07*g(75) center unset arrow f1(x)=0.45 *cos(pi*x/38.0); g1(x)=0.45 *sin(pi*x/38.0) f2(x)=0.97*cos(pi*x/38.0); g2(x)=0.97*sin(pi*x/38.0) l= 0; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l l=l+1; set arrow from f1(l),g1(l) to f2(l),g2(l) nohead lt l plot f( 0),g( 0) w p lt 0 pt 0,\ f( 1),g( 1) w p lt 0 pt 1, f( 2),g( 2) w p lt 0 pt 2, f( 3),g( 3) w p lt 0 pt 3,\ f( 4),g( 4) w p lt 0 pt 4, f( 5),g( 5) w p lt 0 pt 5, f( 6),g( 6) w p lt 0 pt 6,\ f( 7),g( 7) w p lt 0 pt 7, f( 8),g( 8) w p lt 0 pt 8, f( 9),g( 9) w p lt 0 pt 9,\ f(10),g(10) w p lt 0 pt 10, f(11),g(11) w p lt 0 pt 11, f(12),g(12) w p lt 0 pt 12,\ f(13),g(13) w p lt 0 pt 13, f(14),g(14) w p lt 0 pt 14, f(15),g(15) w p lt 0 pt 15,\ f(16),g(16) w p lt 0 pt 16, f(17),g(17) w p lt 0 pt 17, f(18),g(18) w p lt 0 pt 18,\ f(19),g(19) w p lt 0 pt 19, f(20),g(20) w p lt 0 pt 20, f(21),g(21) w p lt 0 pt 21,\ f(22),g(22) w p lt 0 pt 22, f(23),g(23) w p lt 0 pt 23, f(24),g(24) w p lt 0 pt 24,\ f(25),g(25) w p lt 0 pt 25, f(26),g(26) w p lt 0 pt 26, f(27),g(27) w p lt 0 pt 27,\ f(28),g(28) w p lt 0 pt 28, f(29),g(29) w p lt 0 pt 29, f(30),g(30) w p lt 0 pt 30,\ f(31),g(31) w p lt 0 pt 31, f(32),g(32) w p lt 0 pt 32, f(33),g(33) w p lt 0 pt 33,\ f(34),g(34) w p lt 0 pt 34, f(35),g(35) w p lt 0 pt 35, f(36),g(36) w p lt 0 pt 36,\ f(37),g(37) w p lt 0 pt 37, f(38),g(38) w p lt 0 pt 38, f(39),g(39) w p lt 0 pt 39,\ f(40),g(40) w p lt 0 pt 40, f(41),g(41) w p lt 0 pt 41, f(42),g(42) w p lt 0 pt 42,\ f(43),g(43) w p lt 0 pt 43, f(44),g(44) w p lt 0 pt 44, f(45),g(45) w p lt 0 pt 45,\ f(46),g(46) w p lt 0 pt 46, f(47),g(47) w p lt 0 pt 47, f(48),g(48) w p lt 0 pt 48,\ f(49),g(49) w p lt 0 pt 49, f(50),g(50) w p lt 0 pt 50, f(51),g(51) w p lt 0 pt 51,\ f(52),g(52) w p lt 0 pt 52, f(53),g(53) w p lt 0 pt 53, f(54),g(54) w p lt 0 pt 54,\ f(55),g(55) w p lt 0 pt 55, f(56),g(56) w p lt 0 pt 56, f(57),g(57) w p lt 0 pt 57,\ f(58),g(58) w p lt 0 pt 58, f(59),g(59) w p lt 0 pt 59, f(60),g(60) w p lt 0 pt 60,\ f(61),g(61) w p lt 0 pt 61, f(62),g(62) w p lt 0 pt 62, f(63),g(63) w p lt 0 pt 63,\ f(64),g(64) w p lt 0 pt 64, f(65),g(65) w p lt 0 pt 65, f(66),g(66) w p lt 0 pt 66,\ f(67),g(67) w p lt 0 pt 67, f(68),g(68) w p lt 0 pt 68, f(69),g(69) w p lt 0 pt 69,\ f(70),g(70) w p lt 0 pt 70, f(71),g(71) w p lt 0 pt 71, f(72),g(72) w p lt 0 pt 72,\ f(73),g(73) w p lt 0 pt 73, f(74),g(74) w p lt 0 pt 74, f(75),g(75) w p lt 0 pt 75 set output ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/Makefile.in����������������������������������������������������������������������0000644�0004711�0000144�00000044133�12220145731�013130� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in for GNUPLOT documentation # # Note that the master file for generating documentation is gnuplot.doc. # See README. # # To print manual: # # For LaTeX # make gnuplot.dvi # or # make pdf # (requires pdflatex) # or # make pdffigures # (requires also graphicx and picins packages) # or # make ps # # For groff (GNU troff} # make grotxt # (print or view gnuplot.txt) # or # make grodvi # (print or view gnuplot.dvi) # or # make grops # (print or view gnuplot.ps) # # For nroff # make gnuplot.nroff # (print or view gnuplot.nroff) # # For troff # make "TROFF=itroff" troff (use your troff here) # # For GNU info (texinfo) # make info # # default is what is needed for interactive gnuplot all: gnuplot.gih # this tells GNU make not to export variables into the environment # But other makes dont understand its significance, so it must # not be the first target in the file. So it is here, before # any variables are created, but after the default target .NOEXPORT: SHELL = /bin/sh prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ datadir = @datadir@ datarootdir = @datarootdir@ infodir = @infodir@ lispdir = @lispdir@ srcdir = @srcdir@ top_builddir = .. top_srcdir = @top_srcdir@ VPATH = @srcdir@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : INFO_DEPS = $(srcdir)/gnuplot.info CC = @CC_FOR_BUILD@ CPP = @CPP@ DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I.. -I$(top_builddir) CPPFLAGS = @CPPFLAGS@ CFLAGS = @CFLAGS@ GIHDIR = @GIHDIR@ INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/term LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@ .c.o: $(COMPILE) -c $< # The makeinfo command from GNU texinfo MAKEINFO = @MAKEINFO@ # Required for the temporary .info file fix EMACS = @EMACS@ # substitute your troff command (and any flags) for this one TROFF = @TROFF@ # LaTeX command, either latex or latex2e or no LATEX = @LATEX@ # PlainTeX PLAINTEX = @PLAINTEX@ # PDFLaTeX command PDFLATEX = @PDFLATEX@ # substitute your DVI to PostScript conversion program here DVIPS = @DVIPS@ T = $(top_srcdir)/term/ CORETERM = $(T)aed.trm $(T)ai.trm $(T)aquaterm.trm $(T)be.trm \ $(T)cairo.trm $(T)canvas.trm $(T)cgi.trm $(T)cgm.trm $(T)context.trm \ $(T)corel.trm $(T)debug.trm $(T)djsvga.trm $(T)dumb.trm $(T)dxf.trm \ $(T)dxy.trm $(T)eepic.trm $(T)emf.trm $(T)emxvga.trm $(T)epson.trm \ $(T)estimate.trm $(T)excl.trm $(T)fig.trm $(T)gd.trm $(T)ggi.trm \ $(T)gpic.trm $(T)grass.trm $(T)hp2648.trm $(T)hp26.trm $(T)hp500c.trm \ $(T)hpgl.trm $(T)hpljii.trm $(T)hppj.trm $(T)imagen.trm $(T)kyo.trm \ $(T)latex.trm $(T)linux.trm $(T)lua.trm $(T)mac.trm $(T)metafont.trm \ $(T)metapost.trm $(T)mif.trm $(T)next.trm $(T)openstep.trm $(T)pbm.trm \ $(T)pdf.trm $(T)pm.trm $(T)post.trm $(T)pslatex.trm \ $(T)pstricks.trm $(T)qms.trm $(T)qt.trm $(T)regis.trm $(T)sun.trm \ $(T)svg.trm $(T)t410x.trm $(T)tek.trm $(T)texdraw.trm $(T)tgif.trm \ $(T)tkcanvas.trm $(T)tpic.trm $(T)v384.trm $(T)vgagl.trm \ $(T)vws.trm $(T)win.trm $(T)wxt.trm $(T)x11.trm $(T)xlib.trm DIST_COMMON = README Makefile.in SOURCES = checkdoc.c doc2gih.c doc2hlp.c doc2ipf.c doc2ms.c doc2rnh.c \ doc2rtf.c doc2tex.c windows/doc2html.c termdoc.c xref.c TERM_H = $(top_srcdir)/src/term.h BUILT_SOURCES = allterm.h HEADERS = doc2x.h xref.h EXTRA_DIST = doc2texi.el gnuplot.doc gnuplot.texi gpcard.tex \ makefile.dst titlepag.ipf titlepag.ms titlepag.tex \ toc_entr.sty psdoc faq-ja.tex gnuplot-ja.doc README.ja \ term-ja.diff plotstyles.gnu pdffigures.tex gnuplot.pdf windows CLEANFILES = doc2tex gnuplot.tex gnuplot.dvi gnuplot.aux gnuplot.log \ gnuplot.toc gnuplot.ps gpcard.dvi gpcard.log gpcard.ps alldoc2gih \ doc2gih gnuplot.gih doc2hlp gnuplot.hlp gnuplot.idx gnuplot.ilg \ gnuplot.ind gnuplot.info* gnuplot.out doc2ipf gnuplot.ipf doc2ms \ gnuplot.ms doc2rnh gnuplot.rnh doc2rtf gnuplot.rtf gnuplot.nroff \ checkdoc gnuplot.txt gnuplot.tmp VERSION gnuplot.4tc gnuplot.4ct \ gnuplot.idv gnuplot.xref gnuplot.lg figure*.pdf pdffigures.* \ wxhelp/*.html wxhelp/wgnuplot.htc windows/wgnuplot.htk gnuplot.pdf \ gnuplot.htb gnuplot-eldoc.el gnuplot-eldoc.elc DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(EXTRA_DIST) allterm.h: $(CORETERM) @echo "Building allterm.h" @for e in `egrep "^[ ]*START_HELP" $(CORETERM) |\ LC_ALL=C sort -f -t':' -k2` ; do \ f=`echo $$e |cut -d\: -f1` ; s=`echo $$e | cut -d\: -f2` ;\ sed -n "/^[ ]*$$s/,/^[ ]*END_HELP/p" $$f ; \ done >$@ # HBB 20041111: commented out, since it's no longer used. #term.h: $(CORETERM) # @echo "Building term.h" # @cat ../config.h $(CORETERM) > term.c # $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -DTERM_DRIVER_H -DTERM_HELP term.c | \ # sed '/^ *$$/d;/^#/d' >$@ # @rm -f term.c # for debugging alldoc: check dvi gih hlp html info ipf ms nroff pdffigures ps rnh rtf htb ### [tn]roff documentation troff: gnuplot.ms titlepag.ms @if [ "$(srcdir)" = "$(top_builddir)" ] ; then \ tbl gnuplot.ms | eqn | $(TROFF) -ms ; \ else \ < gnuplot.ms sed "s,titlepag\.ms,$(srcdir)/titlepag\.ms," |\ tbl | eqn | $(TROFF) -ms ; \ fi nroff: gnuplot.nroff gnuplot.nroff: gnuplot.ms titlepag.ms @if [ "$(srcdir)" = "$(top_builddir)" ] ; then \ tbl gnuplot.ms | neqn | nroff -ms | col > gnuplot.nroff ; \ else \ < gnuplot.ms sed "s,titlepag\.ms,$(srcdir)/titlepag\.ms," |\ tbl | neqn | nroff -ms | col > gnuplot.nroff ; \ fi ### groff documentation groff: grotxt grodvi grops grotxt: gnuplot.ms titlepag.ms @if [ "$(srcdir)" = "$(top_builddir)" ] ; then \ groff -s -p -t -e -ms -Tlatin1 gnuplot.ms > gnuplot.txt ; \ else \ sed "s,titlepag\.ms,$(srcdir)/titlepag\.ms," gnuplot.ms |\ groff -s -p -t -e -ms -Tlatin1 gnuplot.ms > gnuplot.txt ; \ fi grodvi: gnuplot.ms titlepag.ms @if [ "$(srcdir)" = "$(top_builddir)" ] ; then \ groff -s -p -t -e -ms -Tdvi gnuplot.ms > gnuplot.dvi ; \ else \ sed "s,titlepag\.ms,$(srcdir)/titlepag\.ms," gnuplot.ms |\ groff -s -p -t -e -ms -Tdvi gnuplot.ms > gnuplot.dvi ; \ fi grops: gnuplot.ms titlepag.ms @if [ "$(srcdir)" = "$(top_builddir)" ] ; then \ groff -s -p -t -e -ms -Tps gnuplot.ms > gnuplot.ps ; \ else \ sed "s,titlepag\.ms,$(srcdir)/titlepag\.ms," gnuplot.ms |\ groff -s -p -t -e -ms -Tps gnuplot.ms > gnuplot.ps ; \ fi ### doc2xxx dependencies ms: gnuplot.ms gnuplot.ms: doc2ms $(srcdir)/gnuplot.doc ./doc2ms $(srcdir)/gnuplot.doc gnuplot.ms doc2ms: doc2ms.o termdoc.o $(LINK) doc2ms.o termdoc.o $(LIBS) doc2ms.o: doc2ms.c $(BUILT_SOURCES) $(COMPILE) -DALL_TERM_DOC -c $(srcdir)/doc2ms.c ### html html: htmldocs/gnuplot.html # requires makeinfo (GNU texinfo) 4.0 or better # htmldocs/gnuplot.html: $(srcdir)/gnuplot.texi # $(MAKEINFO) --html -I$(srcdir) $(srcdir)/gnuplot.texi --no-split --output=$@ # requires a working latex2html, which is hard to find these days # htmldocs/gnuplot.html: $(srcdir)/gnuplot.tex # mkdir -p htmldocs # latex2html -dir htmldocs -local_icons gnuplot htmldocs/gnuplot.html: $(srcdir)/gnuplot.dvi rm -f VERSION; ln -s ../VERSION . htlatex gnuplot mkdir -p htmldocs mv gnuplot.html gnuplot.css gnuplot*.png gnuplot.log htmldocs/ ### PDF documentation pdffigures: pdffigures.tex pdffigures.tex: figures gnuplot.pdf rm -f gnuplot.tex echo "" > pdffigures.tex figures: doc2tex$(EXEEXT) $(srcdir)/gnuplot.doc @if [ -a $(top_srcdir)/src/gnuplot ] ; then \ GNUPLOT_LIB=$(top_srcdir)/demo ../src/gnuplot $(srcdir)/plotstyles.gnu ; \ ./doc2tex$(EXEEXT) -figures $(srcdir)/gnuplot.doc gnuplot.tex ; \ echo "\usepackage{graphicx}" > pdffigures.tex ; \ echo "\usepackage{picins}" >> pdffigures.tex ; \ else \ echo gnuplot executable not found - cannot regenerate manual figures ; \ touch gnuplot.pdf ; \ fi pdf: gnuplot.pdf gnuplot.pdf: gnuplot.tex @if test $(PDFLATEX) != no ; then \ rm -f gnuplot.idx ; \ touch gnuplot.idx ; \ TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(PDFLATEX) gnuplot ; \ TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(PDFLATEX) gnuplot ; \ TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(PDFLATEX) gnuplot ; \ makeindex gnuplot ; \ TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(PDFLATEX) gnuplot ; \ else \ echo pdflatex not found - cannot build pdf file ; \ fi ### LaTeX documentation tex: gnuplot.tex gnuplot.tex: doc2tex $(srcdir)/gnuplot.doc ./doc2tex $(srcdir)/gnuplot.doc gnuplot.tex doc2tex: doc2tex.o termdoc.o $(LINK) doc2tex.o termdoc.o $(LIBS) doc2tex.o: doc2tex.c $(BUILT_SOURCES) $(COMPILE) -DALL_TERM_DOC -c $(srcdir)/doc2tex.c # this is how to make DVI files dvi: gnuplot.dvi gpcard.dvi gnuplot.dvi: gnuplot.tex titlepag.tex toc_entr.sty @if test $(LATEX) != no ; then \ rm -f gnuplot.idx ; \ touch gnuplot.idx ; \ TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(LATEX) gnuplot ; \ TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(LATEX) gnuplot ; \ TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(LATEX) gnuplot ; \ makeindex gnuplot ; \ TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(LATEX) gnuplot ; \ else \ echo "latex not found - cannot build dvi file" ; \ fi gpcard.dvi: gpcard.tex @if test $(PLAINTEX) != no ; then \ TEXINPUTS=.:$(srcdir):$(top_srcdir): tex gpcard ; \ else \ echo "plaintex not found - cannot build dvi file" ; \ fi ### Postscript format # if pslatex has been installed, add "times" to titlepage.tex ps: gnuplot.ps gpcard.ps gnuplot.ps: gnuplot.dvi @if test $(DVIPS) != no ; then \ $(DVIPS) gnuplot.dvi -o gnuplot.ps ; \ else \ echo "dvips not found - cannot build PS file" ; \ fi gpcard.ps: gpcard.dvi @if test $(DVIPS) != no ; then \ $(DVIPS) gpcard.dvi -o gpcard.ps ; \ else \ echo "dvips not found - cannot build PS file" ; \ fi # this is how to make gnuplot.hlp hlp: gnuplot.hlp gnuplot.hlp: doc2hlp $(srcdir)/gnuplot.doc ./doc2hlp $(srcdir)/gnuplot.doc gnuplot.hlp doc2hlp: doc2hlp.o termdoc.o $(LINK) doc2hlp.o termdoc.o $(LIBS) ### gnuplot interactive help format gih: gnuplot.gih gnuplot.gih: doc2gih $(srcdir)/gnuplot.doc @rm -f alldoc2gih ./doc2gih $(srcdir)/gnuplot.doc gnuplot.gih doc2gih: doc2gih.o termdoc.o $(LINK) doc2gih.o termdoc.o $(LIBS) # To include all terminals in the .gih file allgih: alldoc2gih $(srcdir)/gnuplot.doc @rm -f doc2gih ./alldoc2gih $(srcdir)/gnuplot.doc gnuplot.gih alldoc2gih: alldoc2gih.o termdoc.o $(LINK) alldoc2gih.o termdoc.o $(LIBS) alldoc2gih.o: doc2gih.c $(BUILT_SOURCES) $(COMPILE) -DALL_TERM_DOC -c $(srcdir)/doc2gih.c @mv doc2gih.o alldoc2gih.o ### wxhelp format htb: gnuplot.htb gnuplot.htb: wxhelp/wgnuplot.html GNUPLOT_LIB=$(srcdir)/../demo ../src/gnuplot -e "winhelp=1;" $(srcdir)/plotstyles.gnu zip -j9 gnuplot.htb windows/wgnuplot.hhp wxhelp/wgnuplot.hhc wxhelp/wgnuplot.hhk wxhelp/*.html windows/*.png wxhelp/wgnuplot.html: wxhelp/doc2html $(srcdir)/gnuplot.doc ./wxhelp/doc2html $(srcdir)/gnuplot.doc wxhelp/ wxhelp/doc2html.o: $(srcdir)/windows/doc2html.c $(BUILT_SOURCES) [ -d wxhelp ] || mkdir wxhelp $(COMPILE) -c -o $@ -I.. -DALL_TERM_DOC -DWXHELP $< wxhelp/doc2html: wxhelp/doc2html.o termdoc.o xref.o ../src/version.o $(LINK) $^ ### GNU info format info: gnuplot.info gnuplot.info: gnuplot.texi $(MAKEINFO) -I$(srcdir) $< --no-split --output=$@ # Thanks to Bruce Ravel for doc2texi.el! gnuplot.texi $(srcdir)/gnuplot-eldoc.el $(srcdir)/gnuplot-eldoc.elc: $(srcdir)/doc2texi.el $(srcdir)/gnuplot.doc @echo "Creating texinfo and eldoc strings file" @if test "$(EMACS)" != no; then \ test "$(top_srcdir)" = "$(top_builddir)" || echo "COPYING GNUPLOT.DOC" ; \ test "$(top_srcdir)" = "$(top_builddir)" || cp $(srcdir)/gnuplot.doc . ; \ $(EMACS) -batch -q --no-site-file -l $(srcdir)/doc2texi.el -f d2t-doc-to-texi ; \ echo "Compiling gnuplot-eldoc.el" ; \ $(EMACS) -batch -q --no-site-file -f batch-byte-compile gnuplot-eldoc.el ; \ else \ echo "No emacs found - cannot create texinfo file" ; \ fi # this is how to make OS/2 ipfc documentation ipf: gnuplot.ipf gnuplot.ipf: doc2ipf $(srcdir)/gnuplot.doc ./doc2ipf $(srcdir)/gnuplot.doc gnuplot.ipf doc2ipf: doc2ipf.o termdoc.o xref.o $(LINK) doc2ipf.o termdoc.o xref.o $(LIBS) ### Rich Text Format rtf: gnuplot.rtf gnuplot.rtf: doc2rtf $(srcdir)/gnuplot.doc ./doc2rtf $(srcdir)/gnuplot.doc gnuplot.rtf doc2rtf: doc2rtf.o termdoc.o xref.o $(LINK) doc2rtf.o termdoc.o xref.o $(LIBS) # this is how to make rnh documentation (VMS help format) rnh: gnuplot.rnh gnuplot.rnh: doc2rnh $(srcdir)/gnuplot.doc ./doc2rnh $(srcdir)/gnuplot.doc gnuplot.rnh doc2rnh: doc2rnh.o termdoc.o $(LINK) doc2rnh.o termdoc.o $(LIBS) # this is how to check the gnuplot.doc file check: all checkdoc @./checkdoc < $(srcdir)/gnuplot.doc; \ if test $$? -eq 0; then \ echo "PASS: gnuplot.doc"; \ else \ :; \ fi checkdoc: checkdoc.o termdoc.o $(srcdir)/gnuplot.doc $(LINK) checkdoc.o termdoc.o $(LIBS) checkdoc.o: checkdoc.c $(BUILT_SOURCES) $(COMPILE) -DALL_TERM_DOC -c $(srcdir)/checkdoc.c # install section # Sep 2013 (version 4.6.4) install-info is no longer a default target # install: install-gih install-info install-pdf install: install-gih install-pdf install-gih: gnuplot.gih $(top_srcdir)/mkinstalldirs $(DESTDIR)$(GIHDIR) $(INSTALL_DATA) gnuplot.gih $(DESTDIR)$(GIHDIR)/gnuplot.gih install-pdf: $(top_srcdir)/mkinstalldirs $(DESTDIR)$(GIHDIR) if test -f gnuplot.pdf ; then \ $(INSTALL_DATA) gnuplot.pdf $(DESTDIR)$(GIHDIR)/gnuplot.pdf; \ fi install-info: gnuplot.info gnuplot-eldoc.el gnuplot-eldoc.elc @if test "$(EMACS)" != no; then \ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir) $(DESTDIR)$(lispdir); \ $(INSTALL_DATA) gnuplot.info $(DESTDIR)$(infodir)/gnuplot.info; \ $(INSTALL_DATA) gnuplot-eldoc.el $(DESTDIR)$(lispdir)/gnuplot-eldoc.el; \ $(INSTALL_DATA) gnuplot-eldoc.elc $(DESTDIR)$(lispdir)/gnuplot-eldoc.elc; \ else : ; fi @if (test "$(EMACS)" != no && install-info --version && \ install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \ echo "install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gnuplot.info";\ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gnuplot.info || :;\ else : ; fi installcheck: install-exec: # uninstall section uninstall: uninstall-gih uninstall-info uninstall-pdf uninstall-gih: rm -f $(DESTDIR)$(GIHDIR)/gnuplot.gih uninstall-pdf: rm -f $(DESTDIR)$(GIHDIR)/gnuplot.pdf uninstall-info: $(PRE_UNINSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile"; \ ! test -d $(DESTDIR)$(infodir) || ! test -e $(DESTDIR)$(infodir)/$$relfile || \ install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if cd $(DESTDIR)$(infodir); then \ echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done rm -rf $(DESTDIR)$(lispdir)/gnuplot-eldoc.el $(DESTDIR)$(lispdir)/gnuplot-eldoc.elc # for VMS only install-vms: gnuplot.hlp $(INSTALL_DATA) gnuplot.hlp $(datadir)/gnuplot.hlp distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = docs distdir: $(DISTFILES) distdir=`cd $(distdir) && pwd` @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done clean-local: @test "$(top_srcdir)" = "$(top_builddir)" || rm -f gnuplot.texi clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -d htmldocs && rm -rf htmldocs clean-compile: rm -f *.o core *.core clean: clean-local clean-generic clean-compile -rm -f *.exe *~ mostlyclean: clean distclean: clean -rm -f Makefile @test "$(top_srcdir)" = "$(top_builddir)" || rm -f ./gnuplot.doc realclean: distclean -rm -f TAGS Makefile: Makefile.in ../config.status cd .. \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status ### Dependencies - do not edit! # all doc2somethings depend on termdoc and either ../term.h or # allterm.h, maybe this would be better as separate object file # (but then we have to change all the other makefiles). Plus then # we cannot make some doc2* filters use allterm.h and others use term.h checkdoc.o: checkdoc.c ../config.h $(top_srcdir)/src/syscfg.h \ $(top_srcdir)/src/stdfn.h doc2x.h allterm.h alldoc2gih.o: doc2gih.c ../config.h $(top_srcdir)/src/syscfg.h \ $(top_srcdir)/src/stdfn.h doc2x.h allterm.h doc2gih.o: doc2gih.c ../config.h $(top_srcdir)/src/syscfg.h \ $(top_srcdir)/src/stdfn.h doc2x.h $(TERM_H) doc2hlp.o: doc2hlp.c ../config.h $(top_srcdir)/src/syscfg.h \ $(top_srcdir)/src/stdfn.h doc2x.h $(TERM_H) doc2ipf.o: doc2ipf.c ../config.h $(top_srcdir)/src/syscfg.h \ $(top_srcdir)/src/stdfn.h doc2x.h $(TERM_H) doc2ms.o: doc2ms.c ../config.h $(top_srcdir)/src/syscfg.h \ $(top_srcdir)/src/stdfn.h doc2x.h allterm.h doc2rnh.o: doc2rnh.c ../config.h $(top_srcdir)/src/syscfg.h \ $(top_srcdir)/src/stdfn.h doc2x.h $(TERM_H) doc2rtf.o: doc2rtf.c ../config.h $(top_srcdir)/src/syscfg.h \ $(top_srcdir)/src/stdfn.h doc2x.h $(TERM_H) doc2tex.o: doc2tex.c ../config.h $(top_srcdir)/src/syscfg.h \ $(top_srcdir)/src/stdfn.h doc2x.h allterm.h termdoc.o: termdoc.c ../config.h $(top_srcdir)/src/syscfg.h \ $(top_srcdir)/src/stdfn.h doc2x.h xref.o: xref.c ../config.h $(top_srcdir)/src/syscfg.h \ $(top_srcdir)/src/stdfn.h doc2x.h xref.h #the end �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/README���������������������������������������������������������������������������0000644�0004711�0000144�00000027420�11544060063�011745� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Notes on the gnuplot help files and documentation. -------------------------------------------------- Gnuplot documentation is available in three ways: 1 - interactively, within gnuplot 2 - as a printed document. 3 - as a manual page, through the Unix man(1) facility The third form tells how to run gnuplot. The first two forms describe the inner workings, and contain equivalent information. They derive their information from the file "gnuplot.doc", which is the master copy of gnuplot help information. All other forms, except for the man page "gnuplot.1", are derived from it. PostScript, PDF, or HTML versions of the manual can be created from the TeX version if you have latex, pdflatex, and htlatex available, respectively. gnuplot.doc -> gnuplot.gih -> gnuplot.hlp -> gnuplot.info -> gnuplot.ipf -> gnuplot.ms -> gnuplot.rnh -> gnuplot.rtf -> wgnuplot.html -> gnuplot.tex On Unix and MSDOS the interactive help is built into the program, and uses the file "gnuplot.gih" ('make gih'). On VMS, the interactive help is supplied by the system help facility, using the file "gnuplot.hlp". This is built by default, either by doc2hlp, or doc2rnh and RUNOFF which format gnuplot.doc for the VMS HELP indenting conventions. The help file is placed in a help library, "gnuplot.hlb" but it may be also be placed in one of the system-wide help libraries, using lib/help ('help lib'). If VMS users prefer the gnuplot interactive help facility to the system facility, this can be easily changed by not defining NO_GIH. The PDF and HTML versions of the gnuplot manual can include hyperlinks to demonstration plots. There is a special makefile target "make pdffigures" to generate and include sample plots directly in the manual itself. Under EMACS, interactive help uses the file "gnuplot.info" ('make info'). On OS/2, the Information Presentation Facility Compiler converts the file "gnuplot.ipf" to a "gnuplot.inf" file. The printed document is available in troff/nroff (ms) format, using the file "gnuplot.ms". For nroff, use 'make nroff'. For troff, type 'make ms' and then 'troff -ms gnuplot.ms' in whatever way you use troff. For groff (on linux), use 'groff -t -e -mgs gnuplot.ms' On MS-Windows, the Microsoft HTML help compiler converts the file "wgnuplot.html" to a 'chm' file which is used by the standard Windows help program. Hyperlinks and sample plots are included. Alternatively, the Microsoft help compiler converts the file "gnuplot.rtf" to a 'hlp' file. Manual entries for the terminals are not included in "gnuplot.doc"; instead, each "driver.trm" file (in the directory /term) contains its own documentation section. See "term/README" for details. When you build gnuplot, only some of the terminal drivers are loaded; these are selected in "term.h" by compiler directives specified in the makefile. The interactive help generators use the same set of compiler directives in "term.h", and thus interactive help contains information for just those terminals actually loaded. The printed manual generators and the html generator contain information about all terminals. This is accomplished by concatenating all of the ".trm" files into a single one, "allterm.h". The file "termdoc.c" is used by each of the nine processing programs ("doc2gih.c", etc.); it #includes either "term.h" or "allterm.h", as is appropriate. If you wish to override the default decision about which terminals are to appear in the documentation, edit the appropriate target in the Makefile and add/remove -DALL_TERM_DOC to/from the compiler flags. Description of the gnuplot.doc format: -------------------------------------- Here is an example of the DOC master help format: ? 1 gnuplot GNUPLOT is a command-driven interactive function plotting program. It ... ?exit 2 exit 'exit', 'quit' and ... ?expressions 2 expressions In general, any mathematical expression accepted by C, ... Topics: functions operators ?expressions functions ?functions 3 functions The functions in GNUPLOT are ... Topics: abs acos arg ... ?expressions functions abs ?functions abs ?abs 4 abs This function returns the absolute value of its argument. The returned value is of the same type as the argument. ?expressions functions acos ?functions acos ?acos 4 acos This function returns the arc cosine (inverse cosine) of its argument. 'acos' returns its argument in radians. Some notes about the format: ---------------------------- Remember that all text must be able to be processed by gnuplot, VMS, nroff, troff, info, itl, and latex, and always do something reasonable. The first column is reserved for control characters. Text does not start in the first column. Lines that start in column 2 may be typeset by LaTeX. Lines that have a space in column 2 are to be printed in a verbatim environment by LaTeX. Tables must have a space in column 2. Do NOT use tabs in the help file. Conversion from this format to vax .hlp file involves removal of lines starting with [?@#$%] (see doc2hlp). VMS uses the numbers to represent a tree. Conversion from this format to gnuplot .gih file involves removal of lines starting with [0-9@#$%] (see doc2gih). Gnuplot matches your help query against the ? lines to find the help information. Multiple ? lines for one text block constitute synonyms. The most specific should be first, eg 'expressions functions' before 'functions'. Spaces are allowed here, but should be single. Backquote pairs are converted by the doc2tex program into boldface; that is, `some text` is converted to {\bf some text}. Be sure to pair the backquotes, or the whole document will be boldface! doc2ms converts `` pairs to \fB...\fR, except inside tables : for the moment, this has to be done manually on the lines starting %, but we ought to find some way to allow tables to be entered just the once ! Control characters in first column: ? used by .gih format, for builtin interactive help - keyword 0-9 used by VMS help and by doc2{tex,ms,html} formatters to define level,keyword @ used by doc2{tex,ms,rnh} to define table start/end # used by doc2tex: table entry = used by doc2tex: index entry F used by doc2{tex,html}: embedded figure (followed by base name of the pdf file) % used by doc2ms: table entry ^ used by doc2{tex,html}: hypertext link / HTML code < the help from the terminal driver files is inserted at this point. C comment (mainly for RCS ID line) C# reserved form of comment (used internally by termdoc.c) Tables: ------- Here is a sample table: @start table - first is interactive cleartext form Symbol Example Explanation ?: a?b:c ternary operation #\begin{tabular}{|ccl|} \hline #\multicolumn{3}{|c|}{Ternary Operator} \\ #Symbol & Example & Explanation \\ \hline #\verb~?:~ & \verb~a?b:c~ & ternary operation\\ %c c l . %Symbol@Example@Explanation %_ %?:@a?b:c@* ternary operation @end table "doc2tex" and "doc2ms" are the formats that do something with tables other than copy them verbatim. It is best to bracket a table in a "@start table"/"@end table" pair. Inside the "@start"/"@end" block are three independent sets of commands: those that begin with "#" will be processed by "doc2tex" only, those that begin with "%" will be processed by "doc2ms" only, and all others will be copied verbatim by all other "doc2"s. So the commands may be shuffled together, as long as the order of each of the three sets is unchanged. That is, the example could be written this way without any effect on the result: @start table - first is interactive cleartext form #\begin{tabular}{|ccl|} \hline %c c l . #\multicolumn{3}{|c|}{Ternary Operator} \\ %Symbol@Example@Explanation Symbol Example Explanation #Symbol & Example & Explanation \\ \hline %_ ?: a?b:c ternary operation #\verb~?:~ & \verb~a?b:c~ & ternary operation\\ %?:@a?b:c@* ternary operation @end table In LaTeX, the command "\begin{tabular}{|ccl|} \hline" creates a three-column table having the first two columns centered, the third column left-justified, a vertical line at each side, and a horizontal line drawn first. Thus the table will be enclosed in a box ("doc2tex" provides the closing "\hline"). A double-backslash is a line skip. In the table entries themselves, the ampersand is the column separator. If any LaTeX special characters are in the table, they must be written within "\verb" constructs, as is the case with the question mark in the example. In nroff, the command "c c l ." creates a three-column table justified the same way as the LaTeX table discussed above. The ampersand is the column separator. Rules for stylistic consistency (courtesy Jens Emmerich): --------------------------------------------------------- 0. General * Use your brain -- the reader has one, too (at least in theory). * Format according to the logical structure, not according to visual charm. * Keep things short. Don't split lines without a good reason. Many people still use 24 line terminals/screens. Backslashify lines only in code examples. 1. Verbatim lines: start column and line length * Verbatim text starts in column 8 (7 spaces before the text). The reason is that "Syntax:" is 7 and "Examples:" is 9 characters wide. Adding the space in column 1 we have 1 resp. 3 characters "overlap" in the online text versions, which is still easy to read as all commands are at least 3 characters long. This does not apply to the "interactive clear text form"-tables. * The rightmost used column is column 73 (counting from 1). This allows LaTeX formatted documents with only slightly wider text than default, which adds to readability. 2. Line spacing * An empty line goes before "Syntax:" and "Example:", but not after them. Without these keywords, add an empty line before verbatim lines if they are not embedded in a sentence. * Leave blank lines within verbatim environments only if it is really needed for clarity. * Verbatim environments are separated from the following text by a blank line, but not if they are embedded in a sentence. * Short explanations within examples can be embedded within comments if they are really short, otherwise use "normal" text (beginning at column 2) and leave no blank lines between the text and the example. 3. Spaces around braces * In general don't put a space after an opening "{" or before a closing brace "}". This makes everything wider and harder to spot. * Do insert a space in the following situations: - where it adds clarity to nesting levels >=3 of braces; usually only one brace for the outermost brace on a particular line (see 'set grid') - on multiple line optional constructs (see 'set xtics') * Separate multiple optional constructs by a space. * Don't separate them if they belong together. (see 'set title') * Do separate them if they belong together but require a space in between (see 'set ticscale'). * Part of these rules are really a consequence of gnuplot's inconsistent syntax. 4. Placing and spaces around "|" * Place a space before and after the "|". Otherwise the alternatives tend to optically 'melt' and they are harder to read. * Keep or-expressions on one line, if possible. * On multi-line expressions place the "|" at the beginning of the next line rather than the end of the first. This makes it easier to see that the expression continues. Align the first components; this requires indenting the first line a bit further (see 'set cntrparam'). 5. Comma-separated optional argument lists * Place the space before the opening brace rather within the braces after the comma (as one normally does) (see 'set isosamples'). ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/doc2gih.c������������������������������������������������������������������������0000644�0004711�0000144�00000007744�10707513067�012566� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: doc2gih.c,v 1.16 2007/10/24 00:47:51 sfeam Exp $"); } #endif /* GNUPLOT - doc2gih.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * doc2gih.c -- program to convert Gnuplot .DOC format to gnuplot * interactive help (.GIH) format. * * This involves stripping all lines with a leading digit or * a leading @, #, or %. * Modified by Russell Lang from hlp2ms.c by Thomas Williams * * usage: doc2gih [file.doc [file.gih]] * * Original version by David Kotz used the following one line script! * sed '/^[0-9@#%]/d' file.doc > file.gih */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "syscfg.h" #include "stdfn.h" #include "doc2x.h" void convert __PROTO((FILE *, FILE *)); void process_line __PROTO((char *, FILE *)); int main (int argc, char **argv) { FILE *infile; FILE *outfile; infile = stdin; outfile = stdout; if (argc > 3) { fprintf(stderr, "Usage: %s [infile [outfile]]\n", argv[0]); exit(EXIT_FAILURE); } if (argc >= 2) { if ((infile = fopen(argv[1], "r")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for reading\n", argv[0], argv[1]); exit(EXIT_FAILURE); } } if (argc == 3) { if ((outfile = fopen(argv[2], "w")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for writing\n", argv[0], argv[2]); exit(EXIT_FAILURE); } } convert(infile, outfile); return EXIT_SUCCESS; } void convert (FILE *inf, FILE *outf) { static char line[MAX_LINE_LEN+1]; while (get_line(line, sizeof(line), inf)) process_line(line, outf); } void process_line(char *line, FILE *b) { static int line_count = 0; line_count++; switch (line[0]) { /* control character */ case '?':{ /* interactive help entry */ (void) fputs(line, b); break; } case '@':{ /* start/end table */ break; /* ignore */ } case '#':{ /* latex table entry */ break; /* ignore */ } case '=':{ /* latex index entry */ break; /* ignore */ } case 'F':{ /* latex embedded figure */ break; /* ignore */ } case '%':{ /* troff table entry */ break; /* ignore */ } case '^':{ /* html entry */ break; /* ignore */ } case '\n': /* empty text line */ case ' ':{ /* normal text line */ (void) fputs(line, b); break; } default:{ if (isdigit((int)line[0])) { /* start of section */ /* ignore */ } else fprintf(stderr, "unknown control code '%c' in column 1, line %d\n", line[0], line_count); break; } } } ����������������������������gnuplot-4.6.4/docs/doc2x.h��������������������������������������������������������������������������0000644�0004711�0000144�00000005126�10037021023�012241� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: doc2x.h,v 1.8 2004/04/13 17:23:31 broeker Exp $ * */ /* GNUPLOT - doc2x.h */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ #ifndef DOCS_DOC2X_H # define DOCS_DOC2X_H #include "stdfn.h" /* HBB 990828: safe_strncpy() prototype */ /* Various defines and macros */ #ifndef MAX_LINE_LEN # define MAX_LINE_LEN 1023 #endif #ifndef MAX_NAME_LEN # define MAX_NAME_LEN 255 #endif #ifdef HAVE_STRINGIZE # define START_HELP(driver) "C#" #driver , # define END_HELP(driver) ,"C#", #else # define START_HELP(driver) /* nought */ # define END_HELP(driver) , #endif #if defined(DOCS_TERMDOC_MAIN) || defined(DOCS_XREF_MAIN) extern char *termtext[]; #else /* a complete lie, but they dont need it ! */ # define TERM_DRIVER_H # define TERM_HELP char *termtext[] = { # ifdef ALL_TERM_DOC # include "allterm.h" # else # include "term.h" # endif NULL }; #endif /* !DOCS_TERMDOC_MAIN */ /* From termdoc.c */ #ifndef DOCS_TERMDOC_MAIN extern int termdoc_lineno; extern char termdoc_filename[]; #endif /* We are using the fgets() replacement from termdoc.c */ #ifndef DOCS_TERMDOC_MAIN extern #endif char *get_line __PROTO((char *, int, FILE *)); #endif /* DOCS_DOC2X_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/gpcard.tex�����������������������������������������������������������������������0000644�0004711�0000144�00000126137�11620267645�013066� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������% Quick Reference Card for gnuplot 2004 % % $Id: gpcard.tex,v 1.8 2011/08/09 17:34:29 sfeam Exp $ % % Format stolen shamelessly from the GNU Emacs reference card %**start of header \special{landscape} \newcount\columnsperpage % This file can be printed with 1, 2, or 3 columns per page (see below). % Specify how many you want here. Nothing else needs to be changed. % For gnuplot refcard, entries are too wide for 3 columns. Print % 2 columns landscape \columnsperpage=2 % Copyright (c) 1987 Free Software Foundation, Inc. % This file is part of GNU Emacs, but was adapted for the gnuplot % reference card because it was so nicely set up. % This file is intended to be processed by plain TeX (TeX82). % % The final reference card has six columns, three on each side. % This file can be used to produce it in any of three ways: % 1 column per page % produces six separate pages, each of which needs to be reduced to 80%. % This gives the best resolution. % 2 columns per page % produces three already-reduced pages. % You will still need to cut and paste. % 3 columns per page % produces two pages which must be printed sideways to make a % ready-to-use 8.5 x 11 inch reference card. % For this you need a dvi device driver that can print sideways. % Which mode to use is controlled by setting \columnsperpage above. % % Author of GNU Emacs Refcard: % Stephen Gildea % UUCP: mit-erl!gildea % Internet: gildea@erl.mit.edu % % Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik % for their many good ideas. % % Person who ripped off the formatter: % Alex Woo % NASA Ames Research Center % Internet: woo@ames.arc.nasa.gov % % Modified on 9 Dec 1992 by: % Daniel S. Lewart % University of Illinois % Internet: d-lewart@uiuc.edu % make \bye not \outer so that the \def\bye in the \else clause below % can be scanned without complaint. \def\bye{\par\vfill\supereject\end} \def\copyrightnotice{ \vskip 1ex plus 2 fill\begingroup\small Layout adapted from the \TeX\ source for Stephen Gildea's GNU Emacs Reference Card (version 1.8). PostScript is a registered trademark of Adobe Systems Incorporated. GNU, Versatec, Imagen, Printronix, Canon, GraphOn, Visual, MicroVAX, UIS, Tektronix, Unix, VAX, VMS, NeWS, SunView, and em4010 are all trademarks of various companies. We endorse none of them. \endgroup} \newdimen\intercolumnskip \newbox\columna \newbox\columnb \def\ncolumns{\the\columnsperpage} \message{[\ncolumns\space column\if 1\ncolumns\else s\fi\space per page]} \def\scaledmag#1{ scaled \magstep #1} % This multi-way format was designed by Stephen Gildea % October 1986. % modified for gnuplot refcard by Alex Woo \if 1\ncolumns % \hsize 4in \hsize 6in \vsize 10in \voffset -.7in \font\titlefont=\fontname\tenbf \scaledmag3 \font\headingfont=\fontname\tenbf \scaledmag2 \font\smallfont=\fontname\sevenrm \font\smallsy=\fontname\sevensy \footline{\hss\folio} \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}} \else % \hsize 3.2in \hsize 5in \vsize 7.95in \hoffset -.75in \voffset -.745in \font\titlefont=cmbx10 \scaledmag2 \font\headingfont=cmbx10 \scaledmag1 \font\smallfont=cmr6 \font\smallsy=cmsy6 \font\eightrm=cmr8 \font\eightbf=cmbx8 \font\eightit=cmti8 \font\eighttt=cmtt8 \font\eightsy=cmsy8 \textfont0=\eightrm \textfont2=\eightsy \def\rm{\eightrm} \def\bf{\eightbf} \def\it{\eightit} \def\tt{\eighttt} \normalbaselineskip=.8\normalbaselineskip \normallineskip=.8\normallineskip \normallineskiplimit=.8\normallineskiplimit \normalbaselines\rm %make definitions take effect \if 2\ncolumns \let\maxcolumn=b \footline{\hss\rm\folio\hss} \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}} \else \if 3\ncolumns \let\maxcolumn=c \nopagenumbers \else \errhelp{You must set \columnsperpage equal to 1, 2, or 3.} \errmessage{Illegal number of columns per page} \fi\fi \intercolumnskip=.46in \def\abc{a} \output={% % This next line is useful when designing the layout. %\immediate\write16{Column \folio\abc\space starts with \firstmark} \if \maxcolumn\abc \multicolumnformat \global\def\abc{a} \else\if a\abc \global\setbox\columna\columnbox \global\def\abc{b} %% in case we never use \columnb (two-column mode) \global\setbox\columnb\hbox to -\intercolumnskip{} \else \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi} \def\multicolumnformat{\shipout\vbox{\makeheadline \hbox{\box\columna\hskip\intercolumnskip \box\columnb\hskip\intercolumnskip\columnbox} \makefootline}\advancepageno} \def\columnbox{\leftline{\pagebody}} \def\bye{\par\vfill\supereject \if a\abc \else\null\vfill\eject\fi \if a\abc \else\null\vfill\eject\fi \end} \fi % we won't be using math mode much, so redefine some of the characters % we might want to talk about \catcode`\^=12 \catcode`\_=12 \chardef\\=`\\ \chardef\{=`\{ \chardef\}=`\} \hyphenation{mini-buf-fer} \parindent 0pt \parskip 1ex plus .5ex minus .5ex \def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip} \outer\def\newcolumn{\vfill\eject} \outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex} \outer\def\section#1{\par\filbreak \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}% \vskip 2ex plus 1ex minus 1.5ex} \newdimen\keyindent \def\beginindentedkeys{\keyindent=1em} \def\endindentedkeys{\keyindent=0em} \endindentedkeys \def\paralign{\vskip\parskip\halign} \def\<#1>{$\langle${\rm #1}$\rangle$} \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows \def\beginexample{\par\leavevmode\begingroup \obeylines\obeyspaces\parskip0pt\tt} {\obeyspaces\global\let =\ } \def\endexample{\endgroup} \def\key#1#2{\leavevmode\hbox to \hsize{\vtop % {\hsize=.75\hsize\rightskip=1em {\hsize=.5\hsize\rightskip=1em \hskip\keyindent\relax#1}\kbd{#2}\hfil}} \newbox\metaxbox \setbox\metaxbox\hbox{\kbd{M-x }} \newdimen\metaxwidth \metaxwidth=\wd\metaxbox \def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize {\hskip\keyindent\relax#1\hfil}% \hskip -\metaxwidth minus 1fil \kbd{#2}\hfil}} \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad &\kbd{#3}\quad\cr} %**end of header \title{gnuplot Quick Reference} \centerline{(Copyright(c) Alex Woo 1992 June 1)} \centerline{Updated by Hans-Bernhard Br\"o{}ker, April 2004} \section{Starting gnuplot} \key{to enter gnuplot}{gnuplot} \key{to enter batch gnuplot}{gnuplot macro_file} \key{to pipe commands to gnuplot}{application | gnuplot} see below for environment variables you might want to change before entering gnuplot. \section{Exiting gnuplot} \key{exit gnuplot}{quit} All gnuplot commands can be abbreviated to the first few unique letters, usually three characters. This reference uses the complete name for clarity. \section{Getting Help} \key{introductory help} {help plot} \key{help on a topic}{help <topic>} \key{list of all help available}{help or ?} \key{show current environment}{show all} \section{Command-line Editing} The UNIX, MS-DOS and VMS versions of gnuplot support command-line editing and a command history. EMACS style editing is supported. \beginindentedkeys Line Editing: \key{move back a single character}{^ B} \key{move forward a single character}{^ F} \key{moves to the beginning of the line}{^ A} \key{moves to the end of the line}{^ E} \key{delete the previous character} {^ H and DEL } \key{deletes the current character} {^ D} \key{deletes to the end of line}{^ K} \key{redraws line in case it gets trashed}{ ^ L,^ R} \key{deletes the entire line}{ ^ U} \key{deletes the last word}{ ^ W} \endindentedkeys \beginindentedkeys History: \key{moves back through history}{ ^ P } \key{moves forward through history}{ ^ N } \endindentedkeys The following arrow keys may be used on most PC versions if READLINE is used. \beginindentedkeys IBM PC Arrow Keys: \key{Left Arrow}{same as ^ B} \key{Right Arrow}{same as ^ F} \key{Ctrl Left Arrow}{same as ^ A} \key{Ctrl Right Arrow}{same as ^ E} \key{Up Arrow}{same as ^ P} \key{Down Arrow}{same as ^ N} \endindentedkeys \section{Graphics Devices} All screen graphics devices are specified by names and options. This information can be read from a startup file (.gnuplot in UNIX). If you change the graphics device, you must replot with the \kbd{replot} command or recreate it repeating the \kbd{load} of the script that created it. \key{get a list of valid devices }{set terminal [options]} \beginindentedkeys Graphics Terminals: \key{Mac OS X} {set term aqua} \key{AED 512 Terminal} {set term aed512} \key{AED 767 Terminal} {set term aed767} \key{BBN Bitgraph Terminal} {set term bitgraph} \key{SCO CGI Driver} {set term cgi} \key{MS-DOS Kermit Tek4010 term - color} {set term kc_tek40xx} \key{MS-DOS Kermit Tek4010 term - mono} {set term km_tek40xx} \key{NeXTstep window system} {set term next} \key{OS/2 Presentation Manager} {set term pm} \key{REGIS graphics language} {set term regis} \key{Selanar Tek Terminal} {set term selanar} \key{SunView window system} {set term sun} \key{Tektronix 4106, 4107, 4109 \& 420X } {set term tek4OD10x} \key{Tektronix 4010; most TEK emulators} {set term tek40xx} \key{VAX UIS window system} {set term VMS} \key{VT-like tek40xx terminal emulator} {set term vttek} \key{UNIX plotting (not always supplied)} {set term unixplot} \key{AT\&T 3b1 or 7300 UNIXPC} {set term unixpc} \key{MS Windows} {set term windows} \key{X11 display terminal} {set term x11} \endindentedkeys \beginindentedkeys Turbo C PC Graphics Modes: \key{Hercules}{set term hercules} \key{Color Graphics Adaptor}{set term cga} \key{Monochrome CGA}{set term mcga} \key{Extended Graphics Adaptor}{set term ega} \key{VGA} {set term vga} \key{Monochrome VGA} {set term vgamono} \key{Super VGA - requires SVGA driver}{set term svga} \key{AT\&T 6300 Micro}{set term att} \endindentedkeys \beginindentedkeys Hardcopy Devices: \key{Unknown - not a plotting device} {set term unknown} \key{Dump ASCII table of X Y [Z] values}{set term table} \key{printer or glass dumb terminal} {set term dumb} \key{Roland DXY800A plotter} {set term dxy800a} Dot Matrix Printers \key{Epson-style 60-dot per inch printers} {set term epson_60dpi} \key{Epson LX-800, Star NL-10 }{set term epson_lx800} \key{NX-1000, PROPRINTER }{set term epson_lx800} \key{NEC printer CP6, Epson LQ-800 } {set term nec_cp6 [monochrome color draft]} \key{Star Color Printer} {set term starc} \key{Tandy DMP-130 60-dot per inch } {set term tandy_60dpi} \key{Vectrix 384 \& Tandy color printer} {set term vx384} Laser Printers \key{Talaris EXCL language}{set term excl} \key{Imagen laser printer} {set term imagen} \key{LN03-Plus in EGM mode} {set term ln03} \key{PostScript graphics language } {set term post [mode color `font' size]} \key{CorelDraw EPS} {set term corel [mode color `font' size]} \key{Prescribe - for the Kyocera Laser Printer} {set term prescribe} \key{Kyocera Laser Printer with Courier font} {set term kyo} \key{QMS/QUIC Laser (also Talaris 1200 )}{set term qms} Metafiles \key{AutoCAD DXF (120x80 default)} {set term dxf} \key{FIG graphics language: SunView or X }{set term fig} \key{FIG graphics language: Large Graph}{set term bfig} \key{SCO hardcopy CGI}{set term hcgi} \key{Frame Maker MIF 3.0} {set term mif [pentype curvetype help]} \key{Portable bitmap} {set term pbm [fontsize color]} \key{TGIF language} {set term tgif} HP Devices \key{HP2623A and maybe others} {set term hp2623A} \key{HP2648 and HP2647} {set term hp2648} \key{HP7580, \& probably other HPs (4 pens)} {set term hp7580B} \key{HP7475 \& lots of others (6 pens)} {set term hpgl} \key{HP Laserjet series II \& clones} {set term hpljii [75 100 150 300]} \key{HP DeskJet 500} {set term hpdj [75 100 150 300]} \key{HP PaintJet \& HP3630 } {set term hppj [FNT5X9 FNT9X17 FNT13x25]} \key{HP laserjet III ( HPGL plot vectors)} {set term pcl5 [mode font fontsize ]} TeX picture environments \key{LaTeX picture environment} {set term latex} \key{EEPIC -- extended LaTeX picture } {set term eepic} \key{LaTeX picture with emTeX specials} {set term emtex} \key{PSTricks macros for TeX or LaTeX} {set term pstricks} \key{TPIC specials for TeX or LaTeX} {set term tpic} \key{MetaFont font generation input} {set term mf} Saving and restoring terminal \key{restore default or pushed terminal} {set term pop} \key{save (push) current terminal} {set term push} Commands associated to interactive terminals \key{change mouse settings} {set mouse} \key{change hotkey bindings} {bind} \endindentedkeys \section{Files} \key{{\bf plot} a data file}{plot `fspec'} \key{{\bf load} in a macro file}{load `fspec'} \key{{\bf save} command buffer to a macro file}{save `fspec'} \key{{\bf save settings} for later reuse}{save set `fpec'} \section{PLOT \& SPLOT commands} {\bf plot} and {\bf splot} are the primary commands {\bf plot} is used to plot 2-d functions and data, while {\bf splot} plots 3-d surfaces and data. Syntax: plot $\{$ranges$\}$ $<$function$> \{$title$\} \{$style$\}$ $\{, <$function$> \{$title$\} \{$style$\}...\}$ splot $\{$ranges$\} <$function$> \{$title$\} \{$style$\}$ $\{, <$function$> \{$title$\} \{$style$\}...\}$ where $<$function$>$ is either a mathematical expression, the name of a data file enclosed in quotes, or a pair ({\bf plot}) or triple ({\bf splot}) of mathematical expressions in the case of parametric functions. User-defined functions and variables may also be defined here. Examples will be given below. \section{Plotting Data} Discrete data contained in a file can displayed by specifying the name of the data file (enclosed in quotes) on the {\bf plot} or {\bf splot} command line. Data files should contain one data point per line. Lines beginning with \# (or ! on VMS) will be treated as comments and ignored. For {\bf plot}s, each data point represents an (x,y) pair. For {\bf splot}s, each point is an (x,y,z) triple. For {\bf plot}s with error bars (see {\bf plot errorbars}), each data point is either (x,y,ydelta), (x,y,ylow,yhigh), (x,y,xlow,xhigh), (x,y,xdelta,ydelta), or (x,y,xlow,xhigh,ylow,yhigh). In all cases, the numbers on each line of a data file must be separated by blank space. This blank space divides each line into columns. For {\bf plot}s the x value may be omitted, and for {\bf splot}s the x and y values may be omitted. In either case the omitted values are assigned the current coordinate number. Coordinate numbers start at 0 and are incremented for each data point read. \section{Surface Plotting} Implicitly, there are two types of 3-d datafiles. If all the isolines are of the same length, the data is assumed to be a grid data, i.e., the data has a grid topology. Cross isolines in the other parametric direction (the ith cross isoline passes thru the ith point of all the provided isolines) will also be drawn for grid data. (Note contouring is available for grid data only.) If all the isolines are not of the same length, no cross isolines will be drawn and contouring that data is impossible. \section{Using Pipes} On some computer systems with a popen function (Unix, plus some others), the datafile can be piped through a shell command by starting the file name with a '$<$'. For example: pop(x) = 103*exp(x/10) plot "$<$ awk '$\{$ print \$1-1965 \$2 $\}$' population.dat", pop(x) would plot the same information as the first population example but with years since 1965 as the x axis. Simple manipulations of this kind can also be done using the extended capabilties of {\bf using} Similarly, output can be piped to another application, e.g. set out "$|$lpr -Pmy\_laser\_printer" \section{Plot Data Using} The format of data within a file can be selected with the {\bf using} option. An explicit scanf string can be used, or simpler column choices can be made. \key{plot "datafile"}{ $\{$ using $\{ <$ycol$> |$} \key{}{$<$xcol$>:<$ycol$> |$} \key{}{$<$xcol$>:<$ycol$>:<$ydelta$> |$} \key{}{$<$xcol$>:<$ycol$>:<$width$> |$} \key{}{$<$xcol$>:<$ycol$>:<$xdelta$> |$} \key{}{$<$xcol$>:<$ycol$>:<$ylo$>:<$yhi$> |$} \key{}{$<$xcol$>:<$ycol$>:<$xlo$>:<$xhi$> |$} \key{}{$<$xcol$>:<$ycol$>:<$xdelta$>:<$ydelta$> |$} \key{}{$<$xcol$>:<$ycol$>:<$ydelta$>:<$width$> |$} \key{}{$<$xcol$>:<$ycol$>:<$ylo$>:<$yhi$>:<$width$> |$} \key{}{$<$xc$>:<$yc$>:<$xlo$>:<$xhi$>:<$ylo$>:<$yhi$> \}$} \key{}{$\{$"<scanf string>"$\} \} ...$} \key{splot "datafile"} {$\{$ using $\{ <$xcol$>:<$ycol$>:<$zcol$> \}$} \key{}{$\{"<$scanf string$>"\} \} ...$} $<$xcol$>$, $<$ycol$>$, and $<$zcol$>$ explicitly select the columns to plot from a space or tab separated multicolumn data file. If only $<$ycol$>$ is selected for {\bf plot}, $<$xcol$>$ defaults to 1. If only $<$zcol$>$ is selected for {\bf splot}, then only that column is read from the file. An $<$xcol$>$ of 0 forces $<$ycol$>$ to be plotted versus its coordinate number. $<$xcol$>$, $<$ycol$>$, and $<$zcol$>$ can be entered as constants or expressions. Expressions enclosed in parentheses can be used to compute a column data value from all numbers in the input record. If errorbars (see also {\bf plot errorbars}) are used for {\bf plot}s, xdelta or ydelta (for example, a +/- error) should be provided as the third column, or (x,y)low and (x,y)high as third and fourth columns. These columns must follow the x and y columns. If errorbars in both directions are wanted then xdelta and ydelta should be in the third and fourth columns, respectively, or xlow, xhigh, ylow, yhigh should be in the third, fourth, fifth, and sixth columns, respectively. Scanf strings override any $<$xcol$>$:$<$ycol$>$(:$<$zcol$>$) choices, except for ordering of input, e.g., \key{plot "datafile"}{ using 2:1 "\%f\%*f\%f"} causes the first column to be y and the third column to be x. If the scanf string is omitted, the default is generated based on the $<$xcol$>$:$<$ycol$>$(:$<$zcol$>$) choices. If the {\bf using} option is omitted, ''\%f\%f'' is used for {\bf plot} (''\%f\%f\%f\%f'' or ''\%f\%f\%f\%f\%f\%f'' for {\bf errorbar} {\bf plot}s) and ''\%f\%f\%f'' is used for {\bf splot}. \key{plot "MyData"} {using "\%*f\%f\%*20[^$\backslash$n]\%f" w lines} Data are read from the file ``MyData'' using the format ''\%*f\%f\%*20[^$\backslash$n]\%f''. The meaning of this format is: ''\%*f'' ignore the first number, ''\%f'' then read in the second and assign to x, ''\%*20[^$\backslash$n]'' then ignore 20 non-newline characters, ''\%f'' then read in the y value. \section{Plot With Errorbars} Error bars are supported for 2-d data file plots by reading one to four additional columns specifying ydelta, ylow and yhigh, xdelta, xlow and xhigh, xdelta and ydelta, or xlow, xhigh, ylow, and yhigh respectively. No support exists for error bars for {\bf splot}s. In the default situation, gnuplot expects to see three to six numbers on each line of the data file, either (x, y, ydelta), (x, y, ylow, yhigh), (x, y, xdelta), (x, y, xlow, xhigh), (x, y, xdelta, ydelta), or (x, y, xlow, xhigh, ylow, yhigh). The x coordinate must be specified. The order of the numbers must be exactly as given above. Data files in this format can easily be plotted with error bars: plot "data.dat" with errorbars (or yerrorbars) plot "data.dat" with xerrorbars plot "data.dat" with xyerrorbars The error bar is a line plotted from (x, ylow) to (x, yhigh) or (xlow, y) to (xhigh, y). If ydelta is specified instead of ylow and yhigh, ylow=y-ydelta and yhigh=y+ydelta are derived. The values for xlow and xhigh are derived similarly from xdelta. If there are only two numbers on the line, yhigh and ylow are both set to y and xhigh and xlow are both set to x. To get lines plotted between the data points, {\bf plot} the data file twice, once with errorbars and once with lines. If x or y autoscaling is on, the x or y range will be adjusted to fit the error bars. Boxes may be drawn with y error bars using the {\bf boxerrorbars} style. The width of the box may be either set with the "set boxwidth" command, given in one of the data columns, or calculated automatically so each box touches the adjacent boxes. Boxes may be drawn instead of the cross drawn for the {\bf xyerrorbars} style by using the {\bf boxxyerrorbars} style. \key{x,y,ylow \& yhigh from columns 1,2,3,4}{plot "data.dat" us 1:2:3:4 w errorbars} \key{x from third, y from second, xdelta from 6}{plot "data.dat" using 3:2:6 w xerrorbars} \key{x,y,xdelta \& ydelta from columns 1,2,3,4}{plot "data.dat" us 1:2:3:4 w xyerrorbars} \section{Plot Ranges} The optional range specifies the region of the plot that will be displayed. Ranges may be provided on the {\bf plot} and {\bf splot} command line and affect only that plot, or in the {\bf set xrange}, {\bf set yrange}, etc., commands, to change the default ranges for future plots. \key{[$\{<$dummy-var$> =\} \{<$xmin$> : <$xmax$>\}$]} { $\{$ [$\{<$ymin$> : <$ymax$>\}$] $\}$} where $<$dummy-var$>$ is the independent variable (the defaults are x and y, but this may be changed with {\bf set dummy}) and the min and max terms can be constant expressions. Both the min and max terms are optional. The ':' is also optional if neither a min nor a max term is specified. This allows '[ ]' to be used as a null range specification. Specifying a range in the {\bf plot} command line turns autoscaling for that axis off for that plot. Using one of the {\bf set} range commands turns autoscaling off for that axis for future plots, unless changed later. (See {\bf set autoscale}). \key{This uses the current ranges}{plot cos(x)} \key{This sets the x range only}{plot [-10:30] sin(pi*x)/(pi*x)} \key{This sets both the x and y ranges}{plot [-pi:pi] [-3:3] tan(x), 1/x} \key{sets only y range, \&} {plot [ ] [-2:sin(5)*-8] sin(x)**besj0(x)} \key{turns off autoscaling on both axes}{} \key{This sets xmax and ymin only}{plot [:200] [-pi:] exp(sin(x))} \key{This sets the x, y, and z ranges}{splot [0:3] [1:4] [-1:1] x*y} \section{Plot With Style} Plots may be displayed in one of twelve styles: {\bf lines}, {\bf points}, {\bf linespoints}, {\bf impulses}, {\bf dots}, {\bf steps}, {\bf errorbars} (or {\bf yerrorbars}), {\bf xerrorbars}, {\bf xyerrorbars}, {\bf boxes}, {\bf boxerrorbars}, or {\bf boxxyerrorbars}. The {\bf lines} style connects adjacent points with lines. The {\bf points} style displays a small symbol at each point. The {\bf linespoints} style does both {\bf lines} and {\bf points}. The {\bf impulses} style displays a vertical line from the x axis (or from the grid base for {\bf splot}) to each point. The {\bf dots} style plots a tiny dot at each point; this is useful for scatter plots with many points. The {\bf steps} style is used for drawing stairstep-like functions. The {\bf boxes} style may be used for barcharts. The {\bf errorbars} style is only relevant to 2-d data file plotting. It is treated like {\bf points} for {\bf splot}s and function {\bf plot}s. For data {\bf plot}s, {\bf errorbars} is like {\bf points}, except that a vertical error bar is also drawn: for each point (x,y), a line is drawn from (x,ylow) to (x,yhigh). A tic mark is placed at the ends of the error bar. The ylow and yhigh values are read from the data file's columns, as specified with the {\bf using} option to plot. The {\bf xerrorbars} style is similar except that it draws a horizontal error bar from xlow to xhigh. The {\bf xyerrorbars} or {\bf boxxyerrorbars} style is used for data with errors in both x and y. A barchart style may be used in conjunction with y error bars through the use of {\bf boxerrorbars}. The See {\bf plot errorbars} for more information. Default styles are chosen with the {\bf set function style} and {\bf set data style} commands. By default, each function and data file will use a different line type and point type, up to the maximum number of available types. All terminal drivers support at least six different point types, and re-use them, in order, if more than six are required. The LaTeX driver supplies an additional six point types (all variants of a circle), and thus will only repeat after twelve curves are plotted with points. If desired, the style and (optionally) the line type and point type used for a curve can be specified. \key{with $<$style$>$}{$ \{<$linetype$> \{<$pointtype$>\}\}$} where $<$style$>$ is either {\bf lines}, {\bf points}, {\bf linespoints}, {\bf impulses}, {\bf dots}, {\bf steps}, {\bf errorbars} (or {\bf yerrorbars}), {\bf xerrorbars}, {\bf xyerrorbars}, {\bf boxes}, {\bf boxerrorbars}, {\bf boxxyerrorbars}. The $<$linetype$>$ \& $<$pointtype$>$ are positive integer constants or expressions and specify the line type and point type to be used for the plot. Line type 1 is the first line type used by default, line type 2 is the second line type used by default, etc. \key{plots sin(x) with impulses}{plot sin(x) with impulses} \key{plots x*y with points, x**2 + y**2 default}{splot x*y w points, x**2 + y**2} \key{plots tan(x) with default function style} {plot [ ] [-2:5] tan(x)} \key{plots ``data.1'' with lines}{plot "data.1" with l} \key{plots ``leastsq.dat'' with impulses} {plot 'leastsq.dat' w i} \key{plots ``exper.dat'' with errorbars \& } {plot 'exper.dat' w l, 'exper.dat' w err} \key{ lines connecting points}{} Here 'exper.dat' should have three or four data columns. \key{plots x**2 + y**2 and x**2 - y**2 with the same line type} {splot x**2 + y**2 w l 1, x**2 - y**2 w l 1} \key{plots sin(x) and cos(x) with linespoints, using} {plot sin(x) w linesp 1 3, \\} \key{ the same line type but different point types}{ cos(x) w linesp 1 4} \key{plots file ``data'' with points style 3} {plot "data" with points 1 3} Note that the line style must be specified when specifying the point style, even when it is irrelevant. Here the line style is 1 and the point style is 3, and the line style is irrelevant. See {\bf set style} to change the default styles. \section{Plot Title} A title of each plot appears in the key. By default the title is the function or file name as it appears on the plot command line. The title can be changed by using the {\bf title} option. This option should precede any {\bf with} option. \key{ title "$<$title$>$"}{} where $<$title$>$ is the new title of the plot and must be enclosed in quotes. The quotes will not be shown in the key. \key{plots y=x with the title 'x'} {plot x} \key{plots the ``glass.dat'' file} {splot "glass.dat" tit 'revolution surface'} \key{with the title 'revolution surface'}{} \key{plots x squared with title ``x^2'' and ``data.1''} {plot x**2 t "x^2", \\} \key{ with title 'measured data'}{ "data.1" t 'measured data'} \section{Set-Show Commands} All commands below begin with either {\bf set} or {\bf unset}, and usually their state can be shown by passing their name to the {\bf show} command. \beginindentedkeys \key{unit any angles are given in}{angles [degrees|radians]} \key{arrows from point to}{arrow [<tag>][from <sx>,<sy>,<sz>]} \key{}{ [to <ex>,<ey>,<ez>][head|nohead|heads]} \key{force autoscaling of an axis}{autoscale [<axes>]} \key{enter/exit parametric mode} {parametric} \key{display border}{border [<choice>] [<style>]} \key{clip points/line near boundaries}{clip <clip-type>} \key{specify parameters for contour plots}{cntrparam [spline][points][order][levels]} \key{enable splot contour plots}{contour [base|surface|both]} \key{default plotting style for data}{data style <style-choice>} \key{specify dummy variable}{dummy <dummy1>,<dummy2>...} \key{tic-mark label format specification}{format [<axes>]["format-string"]} \key{function plotting style}{function style <style-choice>} \key{draw a grid at tick positions}{grid [<which tics>...] [<linestyle>]} \key{enables hiddenline removal}{hidden3d [\dots]} \key{specify number of isolines}{isosamples <n1>[,<n2>]} \key{enables key of curves in plot}{key [\dots]} \key{logscaling of axes (optionally giving base)}{logscale <axes> [<base>]} \key{mapping 3D coordinates}{mapping [cartesian|spherical|cylindrical]} \key{offsets from center of graph}{offsets <left>,<right>,<top>,<bottom>} \key{color-mapped plotting modes}{pm3d [\dots]} \key{mapping 2D coordinates}{polar} \key{set radial range}{rrange [<rmin>:<rmax>]} \key{set sampling rate of functions}{samples <expression>} \key{set scaling factors of plot}{size <xsize>,<ysize>} \key{control display of isolines of surface}{surface} \key{control graphics device}{terminal <device>} \key{change direction of tics}{tics <direction>} \key{adjust relative height of vertical axis}{ticslevel <level>} \key{adjust size of tick marks}{ticscale [<size>]} \key{turn on time/date stamp}{time} \key{set centered plot title}{title "title-text" <xoff>,<yoff>} \key{set parametric range}{trange [<tmin>:<tmax>]} \key{set surface parametric ranges}{urange or vrange} \key{sets the view point for {\bf splot}}{view <rot_x>,<rot_z>,<scale>,<scale_z>} \key{sets the top view (map) for {\bf splot}}{view map} \key{sets x-axis label}{xlabel "<label>" <xoff>,<yoff>} \key{set horizontal range}{xrange [<xmin>:<xmax>]} \key{change horizontal tics}{xtics <start>,<incr>,<end>,} \key{}{"<label>" <pos> } \key{adjust number of minor tick marks}{mxtics OR mytics [<freq>]} \key{draw x-axis}{xzeroaxis} \key{sets y-axis label}{ylabel "<label>" <xoff>,<yoff>} \key{set vertical range}{yrange [<ymin>:<ymax>]} \key{change vertical tics}{ytics <start>,<incr>,<end>,} \key{}{"<label>" <pos> } \key{draw y-axis}{yzeroaxis} \key{set default threshold for values near 0}{zero <expression>} \key{draw axes}{zeroaxis} \key{sets z-axis label}{zlabel "<label>" <xoff>,<yoff>} \key{set vertical range}{zrange [<zmin>:<zmax>]} \key{change vertical tics}{ztics <start>,<incr>,<end>,} \key{}{"<label>" <pos> } \key{draw z-axis}{zzeroaxis} \endindentedkeys \section{Contour Plots} Enable contour drawing for surfaces. This option is available for {\bf splot} only. Syntax: set contour $\{$ base $|$ surface $|$ both $\}$ unset contour If no option is provided to {\bf set contour}, the default is {\bf base}. The three options specify where to draw the contours: {\bf base} draws the contours on the grid base where the x/ytics are placed, {\bf surface} draws the contours on the surfaces themselves, and {\bf both} draws the contours on both the base and the surface. See also {\bf set cntrparam} for the parameters that affect the drawing of contours. \section{Contour Parameters} Sets the different parameters for the contouring plot (see also {\bf contour}). \key{set cntrparam}{ $\{ \{$ linear $|$ cubicspline $|$ bspline $\} |$} \key{}{points $<$n$>$ $|$ } \key{}{order $<$n$>$ $|$ } \key{}{levels \{ [ auto ] $<$n$>$ $|$ } \key{}{discrete $<$z1$>$ $<$z2$>$ ... $|$ } \key{}{incr $<$start$>$ $<$increment$>$ [ $<$n$>$ ] $\} \}$ } \key{5 automatic levels}{set cntrparam levels auto 5} \key{3 discrete levels at 10\%, 37\% and 90\%} {set cntrp levels discrete .1 1/exp(1) .9} \key{5 incremental levels at 0, .1, .2, .3 and .4} {set cntrparam levels incremental 0 .1 5 } \key{sets n = 10 retaining current setting of auto, incr., or discr.} {set cntrparam levels 10 } \key{set start = 100 and increment = 50, retaining old n} {set cntrparam levels incremental 100 50} This command controls the way contours are plotted. $<$n$>$ should be an integral constant expression and $<$z1$>$, $<$z2$>$ any constant expressions. The parameters are: {\bf linear}, {\bf cubicspline}, {\bf bspline} - Controls type of approximation or interpolation. If {\bf linear}, then the contours are drawn piecewise linear, as extracted from the surface directly. If {\bf cubicspline}, then piecewise linear contours are interpolated to form a somewhat smoother contours, but which may undulate. The third option is the uniform {\bf bspline}, which only approximates the piecewise linear data but is guaranteed to be smoother. {\bf points} - Eventually all drawings are done with piecewise linear strokes. This number controls the number of points used to approximate a curve. Relevant for {\bf cubicspline} and {\bf bspline} modes only. {\bf order} - Order of the bspline approximation to be used. The bigger this order is, the smoother the resulting contour. (Of course, higher order bspline curves will move further away from the original piecewise linear data.) This option is relevant for {\bf bspline} mode only. Allowed values are integers in the range from 2 (linear) to 10. {\bf levels} - Number of contour levels, 'n'. Selection of the levels is controlled by 'auto' (default), 'discrete', and 'incremental'. For 'auto', if the surface is bounded by zmin and zmax then contours will be generated from zmin+dz to zmax-dz in steps of size dz, where dz = (zmax - zmin) / (levels + 1). For 'discrete', contours will be generated at z = z1, z2 ... as specified. The number of discrete levels is limited to MAX\_DISCRETE\_LEVELS, defined in plot.h to be 30. If 'incremental', contours are generated at $<$n$>$ values of z beginning at $<$start$>$ and increasing by $<$increment$>$. \section{Specifying Labels} Arbitrary labels can be placed on the plot using the {\bf set label} command. If the z coordinate is given on a {\bf plot} it is ignored; if it is missing on a {\bf splot} it is assumed to be 0. \key{set label $\{<$tag$>\} \{"<$label_text$>"\}$} {$\{$at $<$x$>,<$y$>\{,<$z$>\}\}$} \key{}{$\{<$justification$>\}$} \key{unset label $\{<$tag$>\}$}{} \key{show label}{} The text defaults to '''', and the position to 0,0,0. The $<$x$>$, $<$y$>$, and $<$z$>$ values are in the graph's coordinate system. The tag is an integer that is used to identify the label. If no $<$tag$>$ is given, the lowest unused tag value is assigned automatically. The tag can be used to delete or change a specific label. To change any attribute of an existing label, use the {\bf set label} command with the appropriate tag, and specify the parts of the label to be changed. By default, the text is placed flush left against the point x,y,z. To adjust the way the label is positioned with respect to the point x,y,z, add the parameter $<$justification$>$, which may be {\bf left}, {\bf right} or {\bf center}, indicating that the point is to be at the left, right or center of the text. Labels outside the plotted boundaries are permitted but may interfere with axes labels or other text. \key{label at (1,2) to ``y=x'' }{set label "y=x" at 1,2} \key{label ``y=x^2'' w right of the text at (2,3,4), } {set label 3 "y=x^2" at 2,3,4 right} \key{\& tag the label number 3 }{} \key{change preceding label to center justification}{set label 3 center} \key{delete label number 2 }{unset label 2} \key{delete all labels}{unset label} \key{show all labels (in tag order)}{show label} (The EEPIC, Imagen, LaTeX, and TPIC drivers allow $\backslash$$\backslash$ in a string to specify a newline.) \section{Miscellaneous Commands} For further information on these commands, print out a copy of the gnuplot manual. \key{change working directory}{cd} \key{erase current screen or device}{clear} \key{exit gnuplot}{exit or quit or EOF} \key{display text and wait}{pause <time> ["<string>"]} \key{print the value of $<$expression$>$}{print <expression>} \key{print working directory}{pwd} \key{repeat last {\bf plot} or {\bf splot}}{replot} \key{spawn an interactive shell}{! (UNIX) or \$ (VMS)} \section{Environment Variables} A number of shell environment variables are understood by gnuplot. None of these are required, but may be useful. See 'help environment' for the complete description. If GNUTERM is defined, it is used as the name of the terminal type to be used. This overrides any terminal type sensed by gnuplot on start up, but is itself overridden by the .gnuplot (or equivalent) start-up file (see {\bf start-up}), and of course by later explicit changes. On Unix, OS/2, and MS-DOS, GNUHELP may be defined to be the pathname of the HELP file (gnuplot.gih). On VMS, the symbol GNUPLOT\$HELP should be defined as the name of the help library for gnuplot. On Unix, HOME is used as the name of a directory to search for a .gnuplot file if none is found in the current directory. On OS/2 and MS-DOS, GNUPLOT is used to search for gnuplot.ini file. On VMS, SYS\$LOGIN: is used. See 'help start-up'. GNUPLOT\_LIB may be used to define additional search directories for data and command (script) files. On Unix, PAGER is used as an output filter for help messages. GDFONTPATH is the directory where png terminal searches TrueType fonts, i.e.~files like arial.ttf. GNUPLOT\_FONTPATH is that for the postscript terminal. On Unix, SHELL is used for the {\bf shell} command. On MS-DOS, COMSPEC is used for the {\bf shell} command. On MS-DOS, if the BGI interface is used, the variable {\bf BGI} is used to point to the full path to the BGI drivers directory. Furthermore SVGA is used to name the Super VGA BGI driver in 800x600 res., and its mode of operation as 'Name.Mode'. For example, if the Super VGA driver is C:$\backslash$TC$\backslash$BGI$\backslash$SVGADRV.BGI and mode 3 is used for 800x600 res., then: 'set BGI=C:$\backslash$TC$\backslash$BGI' and 'set SVGA=SVGADRV.3'. GNUFITLOG holds the name of a directory or a file that saves fit results. \section{Expressions} In general, any mathematical expression accepted by C, FORTRAN, Pascal, or BASIC is valid. The precedence of these operators is determined by the specifications of the C programming language. White space (spaces and tabs) is ignored inside expressions. Complex constants may be expressed as $\{<$real$>,<$imag$>\}$, where $<$real$>$ and $<$imag$>$ must be numerical constants. For example, $\{3,2\}$ represents 3 + 2{\bf i} and $\{0,1\}$ represents {\bf i} itself. The curly braces are explicitly required here. \section{Functions} The functions in gnuplot are the same as the corresponding functions in the Unix math library, except that all functions accept integer, real, and complex arguments, unless otherwise noted. The {\bf sgn} function is also supported, as in BASIC. %\begin{center} %\begin{tabular}{|ccl|} \hline { \catcode`\^=7 \catcode`\_=8 \def\ff#1{\hbox{\rm #1}\,} \def\fff#1{\hbox{\rm #1}\,} \def\sin{\ff{sin}} \def\cos{\ff{cos}} \def\tan{\ff{tan}} \def\sinh{\ff{sinh}} \def\cosh{\ff{cosh}} \def\tanh{\ff{tanh}} \def\log{\fff{log}} \settabs 5\columns \+Function & Arguments & Returns \cr \hrule%\hline \+ abs(x) & any & absolute value of {\tt x}, $|x|$; same type \cr \+ abs(x) & complex & length of {\tt x}, $\sqrt{{\hbox{real}(x)^{2} + \hbox{imag}(x)^{2}}}$ \cr \+ acos(x) & any & $\cos^{-1} x$ (inverse cosine) in radians \cr \+ arg(x) & complex & the phase of $x$ in radians\cr \+ asin(x) & any & $\sin^{-1} x$ (inverse sin) in radians \cr \+ atan(x) & any & $\tan^{-1} x$ (inverse tangent) in radians \cr \+ besj0(x) & radians & $j_{0}$ Bessel function of $x$ \cr \+ besj1(x) & radians & $j_{1}$ Bessel function of $x$ \cr \+ besy0(x) & radians & $y_{0}$ Bessel function of $x$ \cr \+ besy1(x) & radians & $y_{1}$ Bessel function of $x$ \cr \+ ceil(x) & any & $\lceil x \rceil$, smallest integer not less than $x$ (real part) \cr \+ cos(x) & radians & $\cos x$, cosine of $x$ \cr \+ cosh(x) & radians & $\cosh x$, hyperbolic cosine of $x$ \cr \+ erf(x) & any & $\hbox{Erf}(\hbox{real}(x))$, error function of real($x$) \cr \+ erfc(x) & any & $\hbox{Erfc}(\hbox{real}(x))$, 1.0 $-$ error function of real($x$) \cr \+ exp(x) & any & $e^{x}$, exponential function of $x$ \cr \+ floor(x) & any & $\lfloor x \rfloor$, largest integer not greater than $x$ (real part) \cr \+ gamma(x) & any & $\hbox{Gamma}(\hbox{real}(x))$, gamma function of real($x$) \cr \+ ibeta(p,q,x) & any & $\hbox{Ibeta}(\hbox{real}(p,q,x))$, ibeta function of real($p$,$q$,$x$) \cr \+ igamma(a,x) & any & $\hbox{Igamma}(\hbox{real}(a,x))$, igamma function of real($a$,$x$) \cr \+ imag(x) & complex & imaginary part of $x$ as a real number \cr \+ int(x) & real & integer part of $x$, truncated toward zero \cr \+ lgamma(x) & any & $\hbox{Lgamma}(\hbox{real}(x))$, lgamma function of real($x$) \cr \+ log(x) & any & $\log_{e} x$, natural logarithm (base $e$) of $x$ \cr \+ log10(x) & any & $\log_{10} x$, logarithm (base $10$) of $x$ \cr \+ rand(x) & any & $\hbox{Rand}(\hbox{real}(x))$, pseudo random number generator \cr \+ real(x) & any & real part of $x$ \cr \+ sgn(x) & any & 1 if $x>0$, -1 if $x<0$, 0 if $x=0$. imag($x$) ignored \cr \+ sin(x) & radians & $\sin x$, sine of $x$ \cr \+ sinh(x) & radians & $\sinh x$, hyperbolic sine $x$ \cr \+ sqrt(x) & any & $\sqrt{x}$, square root of $x$ \cr \+ tan(x) & radians & $\tan x$, tangent of $x$ \cr \+ tanh(x) & radians & $\tanh x$, hyperbolic tangent of $x$\cr \hrule % \hline } %\end{tabular} %\end{center} \section{Operators} The operators in gnuplot are the same as the corresponding operators in the C programming language, except that all operators accept integer, real, and complex arguments, unless otherwise noted. The ** operator (exponentiation) is supported, as in FORTRAN. Parentheses may be used to change order of evaluation. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \bye \subsubsection{Binary} The following is a list of all the binary operators and their usages: \begin{center} \begin{tabular}{|ccl|} \hline \multicolumn{3}{|c|}{Binary Operators} \\ Symbol & Example & Explanation \\ \hline \verb~**~ & \verb~a**b~ & exponentiation\\ \verb~*~ & \verb~a*b~ & multiplication\\ \verb~/~ & \verb~a/b~ & division\\ \verb~%~ & \verb~a%b~ & * modulo\\ \verb~+~ & \verb~a+b~ & addition\\ \verb~-~ & \verb~a-b~ & subtraction\\ \verb~==~ & \verb~a==b~ & equality\\ \verb~!=~ & \verb~a!=b~ & inequality\\ \verb~&~ & \verb~a&b~ & * bitwise AND\\ \verb~^~ & \verb~a^b~ & * bitwise exclusive OR\\ \verb~|~ & \verb~a|b~ & * bitwise inclusive OR\\ \verb~&&~ & \verb~a&&b~ & * logical AND\\ \verb~||~ & \verb~a||b~ & * logical OR\\ \verb~?:~ & \verb~a?b:c~ & * ternary operation\\ \hline \end{tabular} \end{center} (*) Starred explanations indicate that the operator requires integer arguments. Logical AND (\&\&) and OR ($|$$|$) short-circuit the way they do in C. That is, the second \&\& operand is not evaluated if the first is false; the second $|$$|$ operand is not evaluated if the first is true. The ternary operator evaluates its first argument (a). If it is true (non-zero) the second argument (b) is evaluated and returned, otherwise the third argument (c) is evaluated and returned. \subsubsection{Unary} The following is a list of all the unary operators and their usages: \begin{center} \begin{tabular}{|ccl|} \hline \multicolumn{3}{|c|}{Unary Operators}\\ Symbol & Example & Explanation \\ \hline \verb@-@ & \verb@-a@ & unary minus \\ \verb@~@ & \verb@~a@ & * one's complement \\ \verb@!@ & \verb@!a@ & * logical negation \\ \verb@!@ & \verb@a!@ & * factorial \\ \hline \end{tabular} \end{center} (*) Starred explanations indicate that the operator requires an integer argument. The factorial operator returns a real number to allow a greater range. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/doc2rtf.c������������������������������������������������������������������������0000644�0004711�0000144�00000020066�10707513067�012602� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: doc2rtf.c,v 1.16 2007/10/24 00:47:51 sfeam Exp $"); } #endif /* GNUPLOT - doc2rtf.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * doc2rtf.c -- program to convert Gnuplot .DOC format to MS windows * help (.rtf) format. * * This involves stripping all lines with a leading digit or * a leading @, #, or %. * Modified by Maurice Castro from doc2gih.c by Thomas Williams * * usage: doc2rtf file.doc file.rtf [-d] * */ /* note that tables must begin in at least the second column to */ /* be formatted correctly and tabs are forbidden */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "syscfg.h" #include "stdfn.h" #define MAX_LINE_LEN 1023 #include "doc2x.h" #include "xref.h" static TBOOLEAN debug = FALSE; void footnote __PROTO((int, char *, FILE *)); void convert __PROTO((FILE *, FILE *)); void process_line __PROTO((char *, FILE *)); int main (int argc, char **argv) { FILE *infile; FILE *outfile; if (argc == 4 && argv[3][0] == '-' && argv[3][1] == 'd') debug = TRUE; if (argc != 3 && !debug) { fprintf(stderr, "Usage: %s infile outfile\n", argv[0]); exit(EXIT_FAILURE); } if ((infile = fopen(argv[1], "r")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for reading\n", argv[0], argv[1]); exit(EXIT_FAILURE); } if ((outfile = fopen(argv[2], "w")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for writing\n", argv[0], argv[2]); exit(EXIT_FAILURE); } parse(infile); convert(infile, outfile); return (EXIT_SUCCESS); } /* generate an RTF footnote with reference char c and text s */ void footnote(int c, char *s, FILE *b) { fprintf(b, "%c{\\footnote %c %s}\n", c, c, s); } void convert(FILE *a, FILE *b) { static char line[MAX_LINE_LEN+1]; /* generate rtf header */ fprintf(b, "{\\rtf1\\ansi "); /* vers 1 rtf, ansi char set */ fprintf(b, "\\deff0"); /* default font font 0 */ /* font table: font 0 proportional, font 1 fixed */ fprintf(b, "{\\fonttbl{\\f0\\fswiss Arial;}{\\f1\\fmodern Courier New;}}\n"); /* process each line of the file */ while (get_line(line, sizeof(line), a)) { process_line(line, b); } /* close final page and generate trailer */ fprintf(b, "}{\\plain \\page}\n"); /* fprintf(b,"}\n"); */ /* HBB: HACK ALERT: only without this, hc31 works */ list_free(); } void process_line(char *line, FILE *b) { static int line_count = 0; static char line2[MAX_LINE_LEN+1]; static int last_line; int i; int j; static int startpage = 1; char str[MAX_LINE_LEN+1]; char topic[MAX_LINE_LEN+1]; int k, l; static int tabl = 0; static int para = 0; static int llpara = 0; static int inquote = FALSE; static int inref = FALSE; struct LIST *klist; line_count++; i = 0; j = 0; while (line[i] != NUL) { switch (line[i]) { case '\\': case '{': case '}': line2[j] = '\\'; j++; line2[j] = line[i]; break; case '\r': case '\n': break; case '`': /* backquotes mean boldface or link */ if (line[1] == ' ') /* tabular line */ line2[j] = line[i]; else if ((!inref) && (!inquote)) { k = i + 1; /* index into current string */ l = 0; /* index into topic string */ while ((line[k] != '`') && (line[k] != NUL)) topic[l++] = line[k++]; topic[l] = NUL; klist = lookup(topic); if (klist && (k = klist->line) > 0 && (k != last_line)) { line2[j++] = '{'; line2[j++] = '\\'; line2[j++] = 'u'; line2[j++] = 'l'; line2[j++] = 'd'; line2[j++] = 'b'; line2[j] = ' '; inref = k; } else { if (debug) fprintf(stderr, "Can't make link for \042%s\042 on line %d\n", topic, line_count); line2[j++] = '{'; line2[j++] = '\\'; line2[j++] = 'b'; line2[j] = ' '; inquote = TRUE; } } else { if (inquote && inref) fprintf(stderr, "Warning: Reference Quote conflict line %d\n", line_count); if (inquote) { line2[j] = '}'; inquote = FALSE; } if (inref) { /* must be inref */ sprintf(topic, "%d", inref); line2[j++] = '}'; line2[j++] = '{'; line2[j++] = '\\'; line2[j++] = 'v'; line2[j++] = ' '; line2[j++] = 'l'; line2[j++] = 'o'; line2[j++] = 'c'; k = 0; while (topic[k] != NUL) line2[j++] = topic[k++]; line2[j] = '}'; inref = 0; } } break; default: line2[j] = line[i]; } i++; j++; line2[j] = NUL; } i = 1; switch (line[0]) { /* control character */ case '?':{ /* interactive help entry */ if ((line2[1] != NUL) && (line2[1] != ' ')) footnote('K', &(line2[1]), b); break; } case '@':{ /* start/end table */ break; /* ignore */ } case '^':{ /* html link escape */ break; /* ignore */ } case '=': /* latex index entry */ case 'F': /* latex embedded figure */ case '#':{ /* latex table entry */ break; /* ignore */ } case '%':{ /* troff table entry */ break; /* ignore */ } case '\n': /* empty text line */ fprintf(b, "\\par\n"); llpara = para; para = 0; tabl = 0; break; case ' ':{ /* normal text line */ if ((line2[1] == NUL) || (line2[1] == '\n')) { fprintf(b, "\\par\n"); llpara = para; para = 0; tabl = 0; } if (line2[1] == ' ') { if (!tabl) { fprintf(b, "\\par\n"); } fprintf(b, "{\\pard \\plain \\f1\\fs20 "); fprintf(b, "%s", &line2[1]); fprintf(b, "}\\par\n"); llpara = 0; para = 0; tabl = 1; } else { if (!para) { if (llpara) fprintf(b, "\\par\n"); /* blank line between paragraphs */ llpara = 0; para = 1; /* not in para so start one */ tabl = 0; fprintf(b, "\\pard \\plain \\qj \\fs20 \\f0 "); } fprintf(b, "%s \n", &line2[1]); } break; } default:{ if (isdigit((int)line[0])) { /* start of section */ if (startpage) { /* use new level 0 item */ refs(0, b, "\\par", NULL, "\\par{\\uldb %s}{\\v loc%d}\n"); fprintf(b, "}{\\plain \\page}\n"); } else { refs(last_line, b, "\\par", NULL, "\\par{\\uldb %s}{\\v loc%d}\n"); fprintf(b, "}{\\plain \\page}\n"); } para = 0; /* not in a paragraph */ tabl = 0; last_line = line_count; startpage = 0; fprintf(b, "{\n"); sprintf(str, "browse:%05d", line_count); footnote('+', str, b); footnote('$', &(line2[1]), b); /* title */ fprintf(b, "{\\b \\fs24 %s}\\plain\\par\\par\n", &(line2[1])); /* output unique ID */ sprintf(str, "loc%d", line_count); footnote('#', str, b); } else fprintf(stderr, "unknown control code '%c' in column 1, line %d\n", line[0], line_count); break; } } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/README.ja������������������������������������������������������������������������0000644�0004711�0000144�00000037515�11156645040�012347� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# $Id: README.ja,v 1.5 2009/03/14 06:09:36 sfeam Exp $ # The Japanese translations of gnuplot manuals # Shigeharu TAKENO <shige@iee.niit.ac.jp> # gnuplot °ޥ˥奢ܸˤĤ Shigeharu TAKENO <shige@iee.niit.ac.jp> 1. Ϥ ----------- ˤϡgnuplot °ޥ˥奢ܸ֤Ƥ ΥեǤϡ֤ƤʲΥե˴ؤ Ԥޤ [a] gnuplot-ja.doc: docs/gnuplot.doc ܸ [b] term-ja.diff: term/*.trm Υɥܸؤκʬ [c] faq-ja.tex: faq.tex (FAQ θ; LaTeX ե) ܸ [d] gnuplot-ja.1: man/gnuplot.1 ܸ [e] README.ja: Υե ( Unix 桼ؤ) ʤΥեܸƥȥեǤδ ɤϤ EUC_JP (ܸ EUC) ˤʤäƤޤɬפʤŬ ѴƤѤ ¾Υե (wgnuplot ѤΥե) ˴ؤƤϡREADME.win-ja Ĥ⤢ޤ˴ؤƤ 3. աפ򻲾Ȥ ܸκǿǤ䤳˴ؤϰʲ WWW ڡ˷ ܤƤͽǤΤǤ⻲ȤƲ http://takeno.iee.niit.ac.jp/~foo/gp-jman/ ܸ PDF PSLaTeX ʤɤ¾ΥեޥåȤη ե⤽֤Ƥޤ 2. ˡ --------- 2.1. ܸ쥪饤إ (.gih) κ ----------------------------------------- ޤgnuplot-ja.doc 򸵤ܸ쥪饤إץե ޤʤǤ֥饤إספȤϡ ÷ gnuplot 󥽡 help ȤƻȤǤΤΤ (.gih Υե) ؤޤ [1] ̤ gnuplot make & install ǽ餫ܸ쥪饤إפʤ褦ˤ뤳Ȥǽ ѸǤäǤ̵Ǥ [2] term/ ˥ѥåƤ gnuplot Ÿǥ쥯ȥˤȤޤ % patch -p0 < docs/term-ja.diff ǡterminal ɥ饤ФΥޥ˥奢ʬܸɲä졢 docs/doc2rtf.c ܸ첽ѥåŬѤ졢docs/sjisenc.c, docs/tex2ja.awk ɲäޤ [3] docs/Makefile ν docs/Makefile CFLAGS ˡܸͭˤ뤿ˡ -DJAPANESE_DOC ɲäޤŬʥǥ docs/Makefile Ƥ [4] docs ǥ쥯ȥΥġľ % cd docs % make clean % make doc2gih ꥸʥ gnuplot 򥳥ѥ뤷˺ docs/ ǥ쥯 ȥΥġˤϡ terminal ɥ饤ФΥإʬȤ߹ޤ ƤޤΤǡܸޥ˥奢ϥġκľɬ Ǥ [5] gnuplot Υ饤إץե (.gih) % ./doc2gih gnuplot-ja.doc gnuplot-ja.gih [6] ǤإץեŬʤȤ֤ ǤäեŬʾ֤ơΥѥ GNUHELP ꤹСgnuplot ϤΥե򥪥饤إפȤƻѤ 褦ˤʤޤ # cp gnuplot-ja.gih /usr/local/share/gnuplot/gnuplot-ja.gih % setenv GNUHELP /usr/local/share/gnuplot/gnuplot-ja.gih gnuplot.gih 񤭤ƥ󥹥ȡ뤹뤳ȤǤޤ ξϡ[5],[6] ϡ % cp gnuplot-ja.doc gnuplot.doc % make install-gih ȤкѤߤޤ 2.2. ¾ηΥɥȤκ --------------------------------- ¾ηΥɥȤκϡdocs/ Makefile ̤˹Ԥ ǤϺѤޤʤ⤫ʤꤢޤʲǡĤɽŪʤ Ҳ𤷤ޤ [a] LaTeX , dvi κ LaTeX ΥեϰʲΤ褦˺ޤ % cd docs % make doc2tex % ./doc2tex gnuplot-ja.gih tmpf % awk -f tex2ja.awk tmpf > gnuplot-ja.tex tex2ja.awk ϡ\pageref \index ŬڤˤĤ뤿 awk ץȤǡmultibyte б GNU awk ʤ (Solaris nawk Ǥ 褦) ܸ̤ awk ɬפǤ äƺä LaTeX ե platex ǤۤܥѥǤ Ǥplatex \subsection{New plot style {\bf pm3d}} Τ褦ʹԤǤ褯ʬʤ顼Ǥ뤳ȤޤΤǡξ Ϥ \bf ̿ȤޤޤưǤȤ뤫sed Ǽ Τ褦ˤƤ % sed '/subsection.*\\bf/s/\\bf //' gnuplot-ja.tex > tmpf % mv tmpf gnuplot-ja.tex ѥϡʲΤ褦ˤޤ % setenv TEXINPUTS .:..:: % touch gnuplot-ja.idx % platex gnuplot-ja.tex % platex gnuplot-ja.tex % platex gnuplot-ja.tex % makeindex gnuplot-ja.idx % platex gnuplot-ja.tex ѸǤ gnuplot.doc ܸǾ񤭤Ƥϡ % cd docs % make 'LATEX=platex' tex % sed '/subsection.*\\bf/s/\\bf //' gnuplot.tex > tmpf % mv tmpf gnuplot.tex % make 'LATEX=platex' dvi O.K. Ǥ [b] PS κ PS ϡ[a] Ǻä dvi ե dvips ˤ OK Ǥ % dvips gnuplot-ja.dvi ѸǤ gnuplot.doc ܸǾ񤭤Ƥϡ % make gnuplot.ps ǤǤޤ [c] PDF κ PDF ϡMakefile Ʊ褦 (pdflatex Ȥ) ˤϺޤ ps2pdf dvipdfmx Ȥäƺ뤳ȤǤޤ ps2pdf (ghostscript °) Ȥϡ[b] PS ե򤽤 ˤ OK Ǥ % ps2pdf gnuplot-ja.ps dvipdfmx Ȥդɬפǡ[a] dvi ե Τޤ dvipdfmx ˤƤϤޤtitlepag.tex ٥ѥľɬפޤ titlepag.tex 20 ̤ܰϤޤ \usepackage[ ιԤμ (hyperref ѥåΥץ) dvipdfm, ȤԤ졢12 ̤ܰ \else θˡ \AtBeginDvi{\special{pdf:tounicode EUC-UCS2}} Τ褦ʹԤƤ饳ѥ뤷ޤԤϡʸ 뤿ΤΤǤ % setenv TEXINPUTS .:..:: % platex gnuplot-ja.tex % dvipdfmx gnuplot-ja.dvi ʤxdvi ǻȤ⡢[a] dvi ե⡢Τ褦 ˤƺä dvi ե礬褦Ǥ ǥեȤ Makefile Ǥ PDF եκ [a] pdflatex ˤ褦ˤʤäƤΤǤpdflatex ܸˤбƤ ʤΤǡѸ gnuplot.doc ܸǾ񤭤ƤǤ⡢ ܸ PDF ե % make pdf Ǻ뤳ȤϤǤޤ [d] HTML κ HTML ϡǥեȤ Makefile Ǥ [a] LaTeX ե뤫 latex2html Ǻ褦ˤʤäƤ褦Ǥlatex2html ʤ ϡtexinfo ͳ makeinfo ǺȤǤ礦 % sed -e 's/gnuplot.doc/gnuplot-ja.doc/g' \ -e 's/gnuplot.texi/gnuplot-ja.texi/g' \ -e 's/Commands/ޥ (Commands)/' \ -e 's/Bugs\("\)/Х\1/' doc2texi.el > doc2texi-ja.el % emacs -batch -l ./doc2texi-ja.el -f d2t-doc-to-texi gnuplot-ja.texi Ǥޤ % makeinfo --html -I. ./gnuplot-ja.texi --no-split --output=gnuplot-ja.html gnuplot-ja.html Ǥޤ latex2html ȤϡMakefile ˽񤫤ƤΤƱͤ % mkdir -p htmldocs % latex2html -dir htmldocs -local_icons gnuplot-ja.tex Τ褦ˤޤɤˡǤ⡢ޤ괰ʤΤϤǤ 褦Ǥ ѸǤ gnuplot.doc ܸǾ񤭤Ƥ硢latex2html Ȥ % make html ǤǤޤ [e] info κ info ϡ[d] Ǻ texinfo makeinfo Ǻ % makeinfo -I. ./gnuplot-ja.texi --no-split --output=gnuplot-ja.info ѸǤ gnuplot.doc ܸǾ񤭤Ƥϡ % rm gnuplot.texi % make info ǤǤޤ (ˡǥեȤǤĤƤѸǤ gnuplot.texi Ƥɬפޤ) [f] hlp (MS-Windows ѥ饤إ) κ hlp ϡRTF ΥɥȤơ MS-Windows ΥإץѥѤ hlp ѴޤRTF (Rich Text Format) ϡdocs/ ˤġ doc2rtf ȤФΤǤ ܸ RTF ΥեϡǤϤޤޤΤǡ դɬפǤ term-ja.diff ˤϡdoc2rtf.c ФܸѤΥѥåޤޤƤ ꡢ2.1. ܸ쥪饤إפκ[2] κȤǡŬ Ƥơ sjisenc.c ȤեƤȻפ ޤ doc2rtf ľsjisenc.c ⥳ѥ뤷Ƥޤ % make clean % make 'CFLAGS=-g -O2 -DALL_TERM_DOC' doc2rtf % gcc -o sjisenc sjisenc.c ʤ-DALL_TERM_DOC ĤʤȡMS-Windows ˴Ϣɥ饤 ΥإפȤ߹ޤޤΤդƤ ˡ doc2rtf Ѥ RTF Υե (Ⱦüʤ) nkf ǴѴơ sjisenc 8bit RTF Ѥ˥󥳡ɤޤ % ./doc2rtf gnuplot-ja.doc tmpf % nkf -s -Lw tmpf | ./sjisenc > gnuplot-ja.rtf ѴġȤ nkf ʳޤϲԥѴ򥵥ݡ ȤƤʤŤ nkf ѤƤϡǽΥޥ nkf -s -Lw = EUC-JP Shift_JIS ˡԥɤ LF CR+LF Ѵ ȤʬŬڤʥġŬɤߤƤ RTF ե MS-Windows Υإץѥˤ hlp Υե ޤ MS-Windows ΥإץѥϡMS-Windows C ȯĶˤ Ƥ⤢ޤʲΥȤɤǤ Ǥ ftp://ftp.microsoft.com/Softlib/MSLFILES/ HC505.exe : Microsoft Help Compiler (version 3.10.505) 2.3. faq-ja.tex --------------- ϡgnuplot ° FAQ θˤʤäƤ LaTeX ե ꥸʥϰʲˤޤ gnuplot/faq/faq.tex CVS Repository http://gnuplot.cvs.sourceforge.net/gnuplot/faq/faq.tex ϡcomp.graphics.apps.gnuplot ή줿Τǡʪ˴ޤޤ Τϡ faq.tex latex2html ˤơ lynx ǥ ȲƤ¿ùΤǤ ܸǤ FAQ ƥȥեƱͤˤƺǤʲǤ ηΤΤƸƤޤ gnuplot-FAQ (ܸ) http://takeno.iee.niit.ac.jp/~shige/unix/gnuplot/gnuplot.html HTML եϡʲΤ褦ʥץ latex2html ˤƤ % latex2html -image_type gif -split 0 -show_section_numbers \ -html_version 4.0 -nonavigation faq-ja.tex ƥȥեϡ w3m ˤƺäƤޤ % w3m -dump faq-ja/index.thml > faq-ja.txt LaTeX Υѥ platex ̤˥ѥǤ dvips ˤ뤳ȤϤʤΤǤPDF եˤȤϡ 2 ĤԤäƤޤ 1) Ƭ \usepackage[...]{hyperref} Υץ ([...] ʬ) hypertex, dvipdfm, Ѥ 2) \documentclass μιԤˡʲ: \AtBeginDvi{\special{pdf:tounicode EUC-UCS2}} 2) ʸʤ뤿ΤΤǤ 2.4. gnuplot-ja.1 ----------------- gnuplot-ja.1 ϡUnix ѤΥ饤ޥ˥奢 (nroff ե) ǡ man/gnuplot.1 ȤäƤΤΤǤ ʤϡ2.1. ܸ쥪饤إ (.gih) κפΥ 饤إפȤϰ㤤gnuplot ޥɤ椫ǤϤʤUnix man ޥɤǻȤޤ Unix ѤΥ饤ޥ˥奢ʤΤǡŪ X11 terminal ˴ؤ ޥ˥奢ˤʤäƤޤ ܸǽ񤤤Ƥޤman ޥɤǻȤˤϡ ܸбƤ nroff (groff) ɬפǤ ưŪˤϤܸ쥪饤ޥ˥奢뤬ޤѴʤ ϡưܸб nroff (groff) ƥȥե ơman/cat1 ˥󥹥ȡ뤷Ƥ ܸб nroff ξϡ % nroff -man gnuplot-ja.1 > gnuplot.1 ܸб groff ξϡ % groff -Tnippon -man gnuplot-ja.1 > gnuplot.1 줿ƥȥե뤬Ȼפޤޤ ϡ󥹥ȡ뤵Ƥ nroff, groff Υޥ˥奢 ȤƤ 3. ------- ĤդҤ٤ޤ [1] γϤ餫ʤǯФäȤ⤢˰ʤ [2] gnuplot 3.5 Ȥޤѹʤʬ˴ؤƤ 3.5 ܸ򤽤Τޤ޻ȤäƤ 3.5 ܸ¿ѡήѤƤ 3.5 ܸȤ̵طƤ Τ褦˥ХХʰ򤷤Ƥ ⤢Ȼפޤոޤ顢 4. Ԥȥ饤󥹡פϢϢƤ 4. Ԥȥ饤 ------------------- ̵ܸݾڤǤνϡбǤ ΤϹԤͽǤΤǡ𡢰ոʤɤϴޤޤ ϲ᡼륢ɥ쥹ؤꤤפޤޤƼϡ缡 WWW page ˷ǺܤͽǤ e-mail: shige@iee.niit.ac.jp WWW page: http://takeno.iee.niit.ac.jp/~foo/gp-jman/ ե饤󥹤ϡꥸʥ gnuplot Υ饤󥹤˽ޤ 򻲾ȤƤ Ԥϰʲ̤Ǥ [a] gnuplot.doc-ja, [b] term-ja.diff, [d] gnuplot-ja.1: gnuplot 3.2 : Ĵ gnuplot 3.5 : ë gnuplot 3.7 : ľ硢ڵ򾭡 ƣء塢߷β𡢺Ű顢쳤Ȼ͡ ƿϺܸ졢β𡢻ߴм gnuplot 3.8 : ¼塢м gnuplot 4.0 ʹ: м [c] faq-ja.tex: м ʤ[d] Ƥϡۤ [a],[b] ˴ޤޤƤơѤ Ƥޤ gnuplot 3.2 gnuplot.doc ܸκԤĴ gnuplot 3.5 ѤܸκԤξë󤫤ϡ򸵤 θ˲ĺޤ ʲ gnuplot 3.2, gnuplot 3.5 gnuplot.doc ܸ° ʸѤޤ ----- (gnuplot 3.2 ) ----- GNUPLOT 3.2 patchlevel 2 ۥ֤ˤ롢docs/gnuplot.doc ܸǤ gnuplotj.doc Ǥϥꥸʥ˽ऺΤȤޤ ɤ EUC ǽ񤫤Ƥޤꥸʥ˴ޤޤƤ doc2gih doc2tex ǤǧƤޤâ doc2tex ̤ϡEUC Τޤ̤ơ.tex Ѵ TeX νϤ˹äɤѴ Ʋޤtitlepage.tex ɬפ˱ƽƲ ӤȤǤϤޤ󤬡Ǥ˴ĺйǤ Ĵ tamaru@keisu-s.t.u-tokyo.ac.jp ----- ޤ (gnuplot 3.2 ) ----- ----- (gnuplot 3.5 ) ----- 2 ܸˤĤ ?japanese ܸϡؤĴ 󤬡fj.sources Ƥ줿 gnuplot 3.2 gnuplot.doc ܸ From: tamaru@keisu-s.t.u-tokyo.ac.jp (Hiroharu Tamaru) Newsgroups: fj.sources Subject: gnuplot 3.2.2 Japanese document (1/2) Message-ID: <TAMARU.92Sep16174046@meipserv.keisu-s.t.u-tokyo.ac.jp> Date: 16 Sep 92 08:40:46 GMT Distribution: fj ؤξë  gnuplot 3.5 ѤѹΤǤ 3.2 3.5 δ֤ǸʸѲΤʤʬ(3/4)ϡ§Ȥ Ĵݤ򤽤Τޤ޻ȤäƤޤ ܸθäơ פ󡤰ƣ ƤΥå򤷤Ƥޤ꤬Ȥޤ ʤʸϤΤ˴ؤХ򸫤Ĥϡ masutani@me.es.osaka-u.ac.jp ޤǤϢ ----- ޤ (gnuplot 3.5 ) ----- 5. ռ ------- ޤ gnuplot 3.5 ѤΥޥ˥奢ܸϤ꤬Ȥ碌 ĺƤƿäˤʤäƤޤܸθꡢ gnuplot 3.2 ѥޥ˥奢ܸκԤĴ3.5 ѥ ˥奢ܸԤξëˤϤθ˲ĺ ޤʽĺޤξڤƤ鿽夲ޤɤ ⤢꤬Ȥޤ gnuplot plus ѥå (http://www.yama-ga.com/gnuplot/) ˴ޤޤ ޥ˥奢˴ؤƤԤλͤˤϸ˲ĺ ޤɤ⤢꤬Ȥޤ ⶶͺ (yosio@quanta.kj.yamagata-u.ac.jp) cgm-font Υ bug 𡢾嵭ݡȥڡ QandA Q1,Q2 ˴ؤ󡢤 set size ˴ؤβɤĺ ޤɤ⤢꤬Ȥޤ Ĺ (oden924@moon.e-com.ne.jp) 󤫤顢set grid bug ĺޤɤ⤢꤬Ȥޤ gnuplot ȯ Hans-Bernhard Broeker Ethan Merritt ˤϡΥ饤󥹤 gnuplot ΤؤΥޡˤĤƿ ĺޤɤ⤢꤬Ȥޤ 2000 ǯ 2003 ǯ٤ޤǤ漼СԤ Τ򸵤ˤƤơ () ȼޤȤԤäޤ γưΤǿ gnuplot Фμ졢ꥸ ʥθܲȤ𤹤뤳ȤǤؤδͿԤȤǤ ƬǺޤʤôƤ줿ˤⴶפޤ ޤȤǽǤ줿ʲνʪ⿧Ȼͤˤĺ ʻƤ gnuplot ѡեȡޥ˥奢̭եȥХ ֻȤʤ GNUPLOT ǡݴ (ƻϺƽ)ƥΥ 쥹 6. ܼ ------- 1. Ϥ 2. ˡ 2.1. ܸ쥪饤إ (.gih) κ 2.2. ¾ηΥɥȤκ 2.3. faq-ja.tex 2.4. gnuplot-ja.1 3. 4. Ԥȥ饤 5. ռ 6. ܼ +=================================================+ м 945-1195 㹩 Żҹز shige@iee.niit.ac.jp TEL(&FAX): 0257-22-8161 +=================================================+ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/doc2rnh.c������������������������������������������������������������������������0000644�0004711�0000144�00000021410�11670222700�012557� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: doc2rnh.c,v 1.17.4.1 2011/12/08 21:01:52 sfeam Exp $"); } #endif /* GNUPLOT - doc2rnh.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * doc2rnh.c -- program to convert Gnuplot .DOC format to * Digital Standard Runoff for VMS HELP files * (gnuplot.doc, including the terminal documentation * is no longer formated for VMS HELP by default) * * From hlp2ms by Thomas Williams * * Modified by Russell Lang, 2nd October 1989 * to make vms help level 1 and 2 create the same ms section level. * * Modified to become doc2ms by David Kotz (David.Kotz@Dartmouth.edu) 12/89 * Added table and backquote support. * * Adapted from doc2ms.c (the unix 'runoff' text-processor) * by Lucas Hart 3/97 * * right margin is adjusted two spaces for each level to compensate * for the indentation by VMS HELP * * the page width can be adjusted by changing the value of DSR_RM * usage: $ MCR []doc2rnh gnuplot.doc gnuplot.rnh * $ RUNOFF gnuplot.rnh * * */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "syscfg.h" #include "stdfn.h" #include "doc2x.h" extern TBOOLEAN single_top_level; #define LINE_SKIP 3 #define DSR_RM 70 void init __PROTO((FILE *)); void convert __PROTO((FILE *, FILE *)); void process_line __PROTO((char *, FILE *)); void section __PROTO((char *, FILE *)); void putrnh __PROTO((char *, FILE *)); void putrnh_ __PROTO((char *, FILE *)); void finish __PROTO((FILE *)); static TBOOLEAN intable = FALSE; static TBOOLEAN rnh_table = FALSE; static TBOOLEAN initial_entry = FALSE; int main (int argc, char **argv) { FILE *infile; FILE *outfile; infile = stdin; outfile = stdout; single_top_level = TRUE; if (argc > 3) { fprintf(stderr, "Usage: %s [infile [outfile]]\n", argv[0]); exit(EXIT_FAILURE); } if (argc >= 2) { if ((infile = fopen(argv[1], "r")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for reading\n", argv[0], argv[1]); exit(EXIT_FAILURE); } } if (argc == 3) { if ((outfile = fopen(argv[2], "w")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for writing\n", argv[0], argv[2]); exit(EXIT_FAILURE); } } init(outfile); convert(infile, outfile); finish(outfile); return EXIT_SUCCESS; } void init(FILE *b) { /* */ (void) fputs("\ .no paging\n\ .no flags all\n\ .left margin 1\n\ .right margin 70\n\ .no justify\n", b); } void convert(FILE *a, FILE *b) { static char line[MAX_LINE_LEN+1]; while (get_line(line, sizeof(line), a)) { process_line(line, b); } } void process_line(char *line, FILE *b) { switch (line[0]) { /* control character */ case '?':{ /* interactive help entry */ break; /* ignore */ } case '@':{ /* start/end table */ if (rnh_table) { (void) fputs(".end literal\n", b); rnh_table = FALSE; intable = FALSE; } else { /* (void) fputs(".literal\n",b); */ intable = TRUE; rnh_table = FALSE; initial_entry = TRUE; } /* ignore rest of line */ break; } case '^':{ /* html table entry */ break; /* ignore */ } case '=': /* latex index entry */ case 'F': /* latex embedded figure */ case '#':{ /* latex table entry */ break; /* ignore */ } case '%':{ /* troff table entry */ break; /* ignore */ } case '\n': /* empty text line */ case ' ':{ /* normal text line */ /* most tables are simple; no flags means no protected characters * other than period (command indicator) in first column * * However, for ease of maintainence, two tables have sublevels * and descriptions, corresponding to the printed table entries, * encapsulated by the table markers. Therefore we need to * do some more work. * * Doc2hlp just ignores the table headings and treats * lower levels irrespectively, but we need to break * the level designators out of the table format. * * The first entry in a table will have either * - a level number in the first column => remainder of text in * table is help text * - spaces in the first two columns => rest of text is literal * to be placed in table format * */ /* use the "cleartext" table or other text in tables */ /* if (intable) { */ /* its already literal */ if (rnh_table) { /* its a literal */ putrnh(line + 1, b); break; } switch (line[1]) { case ' ':{ if ((intable) && (initial_entry)) { rnh_table = TRUE; initial_entry = FALSE; fputs(".literal\n", b); putrnh(line + 1, b); break; } /* verbatim mode */ fputs(".literal\n", b); putrnh(line + 1, b); fputs(".end literal\n", b); break; } /* * "." in first column is the DSR command character; * therefore, include the preceeding " " */ case '.':{ putrnh(line, b); break; } default:{ if (line[0] == '\n') fputs(".skip\n", b); /* totally blank line */ else putrnh(line + 1, b); break; } break; } break; } default:{ if (isdigit((int) line[0])) { /* start of section */ /* some HELP text is surrounded by table flags */ /* doc2rnh will ignore the flags */ if (intable) { if (initial_entry) { initial_entry = FALSE; rnh_table = FALSE; } } section(line, b); } else fprintf(stderr, "unknown control code '%c' in column 1\n", line[0]); break; } } } /* process a line with a digit control char */ /* starts a new [sub]section */ /* We want to retain section number, so its simpler than w/ TeX or roff */ void section(char *line, FILE *b) { int sh_i; static int old = 1; /* (void) sscanf(line,"%d",&sh_i); * * check to make sure this works with terminals also */ sh_i = atoi(line); if (sh_i > old) { do if (old != 1) /* this line added by rjl */ (void) fputs(".rm-2\n", b); while (++old < sh_i); } else if (sh_i < old) { do if (sh_i != 1) /* this line added by rjl */ (void) fputs(".rm+2\n", b); while (--old > sh_i); } /* added by dfk to capitalize section headers */ /* Header name starts at [2] */ /* omit for online documentation * if (islower(line[2])) * line[2] = toupper(line[2]); */ old = sh_i; (void) fputs(".indent -1;\n", b); (void) putrnh_(line, b); (void) fputs(".br;\n", b); } /* * dummy function in case we need to convert some characters in * output string ala doc2tex and doc2ms */ void putrnh(char *s, FILE *file) { (void) fputs(s, file); } /* * LBR$OUTPUT_HELP treats spaces and "/"s as list separators for topics, * but they are used in gnuplot.doc for the printed docs; convert to * "_" and "|" Modeled after section heading conversions in doc2tex * and doc2ms. * */ void putrnh_(char *s, FILE *file) { int i, s_len, last_chr; last_chr = s_len = strlen(s); for (i = s_len - 1; i > 2; i--) { /* any trailing spaces to drop? */ if (s[i] != ' ') { last_chr = i; break; } } for (i = 0; i <= last_chr; i++) { if (i > 2) { switch (s[i]) { case ' ': (void) fputc('_', file); break; case '/': (void) fputc('|', file); break; default: (void) fputc(s[i], file); } } else { (void) fputc(s[i], file); } } } void finish(FILE *b) { return; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/gnuplot-ja.doc�������������������������������������������������������������������0000644�0004711�0000144�00002057200�11756524321�013644� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������C RCS $Id: gnuplot-ja.doc,v 1.39.2.2 2012/05/16 22:10:48 markisch Exp $ C corresponding original gnuplot.doc revision: 1.701.2.14 C C Copyright (C) 1986 - 1993, 1998, 1999, 2000, 2001, 2004 Thomas Williams, Colin Kelley et al. C C Japanese translation: Hiroharu Tamaru (2.0, 3.2), MASUTANI Yasuhiro (3.5), C Shigeharu Takeno et al (3.7, 4.X) 1 gnuplot ?gnuplot C contributers ɽΥʸϡߤΥꥸʥǤ UTF-8 C ǽ񤫤Ƥ뤬 HTML ̾ȷѹƤ롣 ^<h2 align="center"> An Interactive Plotting Program </h2> ^<p align="center"> Thomas Williams & Colin Kelley</p> ^<p align="center"> Version 4.6 organized by Ethan A Merritt and others</p> ^<p align="center">Major contributors (alphabetic order):<br> ^<br> ^ Hans-Bernhard Broeker, John Campbell,<br> ^ Robert Cunningham, David Denholm,<br> ^ Gershon Elber, Roger Fearick,<br> ^ Carsten Grammes, Lucas Hart,<br> ^ Lars Hecking, Péter Juhász,<br> ^ Thomas Koenig, David Kotz,<br> ^ Ed Kubaitis, Russell Lang,<br> ^ Timothée Lecomte, Alexander Lehmann,<br> ^ Alexander Mai, Bastian Märkisch,<br> ^ Ethan A Merritt, Petr Mikulík,<br> ^ Carsten Steger, Shigeharu Takeno,<br> ^ Tom Tkacik, Jos Van der Woude,<br> ^ James R. Van Zandt, Alex Woo, Johannes Zellner<br> ^</p> ^<p align="center"> Copyright (C) 1986 - 1993, 1998 - 2004 Thomas Williams, Colin Kelley<br> ^ Copyright (C) 2004 - 2011 various authors</p> ^<p align="center"> Mailing list for comments: <tt>gnuplot-info@lists.sourceforge.net</tt><br> ^ Mailing list for bug reports: <tt>gnuplot-bugs@lists.sourceforge.net</tt><br> ^ Web access (preferred): <tt>http://sourceforge.net/projects/gnuplot</tt></p> ^<p align="center"> This manual was originally prepared by Dick Crawford</p> C ԤĹΤϡǤФʤȤ 2  (Copyright) ?copyright ?license Copyright (C) 1986 - 1993, 1998, 2004, 2007 Thomas Williams, Colin Kelley Permission to use, copy, and distribute this software and its documentation for any purpose with or without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Permission to modify the software is granted, but not the right to distribute the complete modified source code. Modifications are to be distributed as patches to the released version. Permission to distribute binaries produced by compiling modified sources is granted, provided you 1. distribute the corresponding source modifications from the released version in the form of a patch file along with the binaries, 2. add special version identification to distinguish your version in addition to the base release version number, 3. provide your name and address as the primary contact for the support of your modified version, and 4. retain our contact information in regard to use of the base software. Permission to distribute the released version of the source code along with corresponding source modifications in the form of a patch file is granted with same provisions 2 through 4 for binary distributions. This software is provided "as is" without express or implied warranty to the extent permitted by applicable law. AUTHORS Original Software: Thomas Williams, Colin Kelley. Gnuplot 2.0 additions: Russell Lang, Dave Kotz, John Campbell. Gnuplot 3.0 additions: Gershon Elber and many others. Gnuplot 4.0 additions: See list of contributors at head of this document. (ʲޤ; ʤΤޤΤǾܤϾ嵭θʸ äƤԤǤޤ) Copyright (C) 1986 - 1993, 1998, 2004, 2007 Thomas Williams, Colin Kelley ΥեȥȤ°ʸλѡʣۤεĤϡ嵭 (copyright) ɽƤʣʪ˽񤫤Ƥ뤳ȡɽ εʸξλٱʸ˽񤫤Ƥ뤳ȤȤǡ ʸˤݾڤޤ ΥեȥνǧƤޤޤ ɤۤθǧޤ󡣽ϥ꡼ǤФѥåη ۤʤФʤޤ󡣽줿򥳥ѥ뤷ƺ줿Х ʥۤϡʲξθǧޤ: 1. ꡼ǤΥνʬ򡢥ѥåηǥХʥȶ ۤ뤳 2. ١Ȥʤ꡼Ǥȶ̤뤿ˡΥСֹ ʥСҤղä뤳 3. νǤΥݡѤˡʤ̾ȥǽʥɥ쥹 󶡤뤳 4. ١Ȥʤ륽եȥλѤ˴ؤƤϡ桹Ϣݻ ³뤳 ꡼ǤΥɤ򡢥ѥåηǤΥνȰۤ ȤϡХʥۤ˴ؤ 2 4 ޤǤξθǵޤ Υեȥ "뤬ޤ" 󶡤졢ŬѲǽˡΧǵ Ϥݾڤɽ뤤ϰżƤϤޤ ꥸʥ륽եȥ: Thomas Williams, Colin Kelley. Gnuplot 2.0 ɲ: Russell Lang, Dave Kotz, John Campbell. Gnuplot 3.0 ɲ: Gershon Elber Ȥ¾ο͡ Gnuplot 4.0 ɲ: ʸκǽˤͿ (contributors) ΥꥹȻȡ 2 Ϥ (Introduction) ?introduction ? `gnuplot` ϡݡ֥ʥޥΥե桼ƥƥǡ Linux, OS/2, MS Windows, OSX, VMS, ¾¿Υץåȥۡư ޤɤˤޤ̵ۤƤޤ ( ʤвʧɬפϤޤ)ϡʳؼԤ ؿǡʤɤŪɽǤ褦줿ΤǤߤޤǤˡ 㤨 Web ץȤʤɡ¿÷Ѥ⥵ݡȤ褦 ĹƤޤϡ㤨 Octave Τ褦˥ɥѡƥΥץꥱ 襨󥸥ȤƤȤƤޤgnuplot ϡ1986 ꥵ ȤȳȯʳȯԤƤޤ gnuplot ϡ2 ޤ 3 Ρ¿μΥդ򥵥ݡȤ ޤ: աաա٥ȥ衢̡ Ƥ˴Ϣ뤵ޤޤʸƤˤĤ̤ 跿⥵ݡȤƤޤ gnuplot ¿ΰۤʤϤ򥵥ݡȤƤޤ: ÷꡼Ϸ (ޥۥåȥϤǽ)ڥץå丽ߤΥץ󥿤ؤľ ܽϡޤ¿Υեؤν (eps, emf, fig, jpeg, LaTeX, pdf, png, postscript, ...)gnuplot ϡưפ˿Ϸɲä 褦ĥ뤳ȤǤޤǶɲä줿÷Ϸˤϡ wxWidgets (ʣΥץåȥۡѲǽ), Qt 򸵤ˤΤ svg HTML5 canvas ϷѤСդ Web ڡ ޥѲǽʷϤ뤳ȤǤޤ `gnuplot` Υޥɸʸʸ̤ޤʤʸ 񤫤줿ޥɤؿ̾ϡʸǽ񤤤ΤȤƱǤϤ ޤ󡣤Υޥɤ⡢ޤ̵¤ˤƾά뤳Ȥ Ǥޤ1 ˤϥߥ (;) ǶڤäʣΥޥɤ񤯤 Ǥޤʸñ䡢뤤ŰΤɤ餫ǽ񤭻Ϥ ޤξԤˤ̯ʰ㤤ޤ (ܺ٤ϡʲ: `syntax`): load "filename" cd 'dir' ޥɤϡʣԤˤޤ뤳ȤǤޤξϡǽ԰ʳ ƤιԤι˥Хåå (\) ɬפޤХå åɬƹ *Ǹ* ʸǤʤƤϤʤޤ󡣤η̤ȤƥХ åȡ³ʸ¸ߤʤäΤ褦˰ޤ Ĥޤꡢʸڡ򤹤뤳Ȥ⤢ޤ󤷡Ԥˤäƥ Ȥλ뤳Ȥ⤢ޤ󡣤ǤʣԤˤޤԤƬ ȥȤȡΥޥΤȥȤ뤳Ȥˤʤ (ʲ: `comments`)ʤդޤ⤷ʣԤΥޥɤ ɤǥ顼ȤѡϤξΤˤϻؼ뤳Ȥ ޤ󤷡ޤԤ˻ؼɬפʤǤ礦 ΥɥȤˤơ ({}) ϾάǽʰɽΤȤ (|) ϡߤ¾ŪʰڤΤȤޤ`gnuplot` Υ ɤ `help` ˤ̾ϡХå () ޤϲǽʾ ˤ `boldface` () ɽޤѳ (<>) ϡб ֤٤Τɽޤ¿ξ硢ץΰˤϡ 줬άȥǥեȤͤѤޤξ硢 ɬѳ̤̤ǰϤޤƽ񤫤Ƥ櫓ǤϤޤ ܤˤĤƤΥإפɬפʤȤˤϡ`help` ³Ƥι̾ ϤƲޤñ `help ?` ǤإפιܤΥ˥塼 ޤ `gnuplot` Ȥϡ`plotting` ˴ؤɤߤϤ ɤǤ礦 (÷ǻʤ `help plotting` ϤƲ) simple.dem ǥ򻲾ȤƤ뤤ϰʲ Web ڡˤ¾Υ Ȱˤޤ ^ <a href="http://www.gnuplot.info/demo/"> http://www.gnuplot.info/demo/ ^ </a> `gnuplot` ϥޥɥ饤󤫤顢뤤ϥǥȥå״ĶΥ󤫤 ư뤳ȤǤޤޥɥ饤󤫤鵯ưȤϡʲν񼰤 Ȥޤ gnuplot {OPTIONS} file1 file2 ... file1, file2 ϡ`local` ޥɤǼΤƱϥե (ץȥե) Ǥ X11 ١ΥƥǤϡʲν񼰤Ȥޤ gnuplot {X11OPTIONS} {OPTIONS} file1 file2 ... ܺ٤ϡX11 ΥɥȡӰʲ: `x11` gnuplot Ϳ륪ץϡޥɹԤΤɤ֤Ƥ⹽ޤ󡣥 ϻꤷ˼¹Ԥ졢Ʊͤ -e ץǤդΥޥɤͿ 뤳ȤǤޤ: gnuplot file1.in -e "reset" file2.in ̤ʥե̾ "-" ϡɸϤɤޤΤ˻Ȥޤ`gnuplot` ϺǸΥեȽλޤɤ߹ޤե ꤷʤϡ`gnuplot` ɸϤϤޤܺ ϡʲ: `batch/interactive`gnuplot ѤΥץˤĤƤϡ ʲΤ褦ˤư򸫤뤳ȤǤޤ: gnuplot --help ܺ٤ϰʲ: `command line options` ÷襦ɥǤκϡ'h' ǤĤȥۥåȥ (`hotkeys`) ȥޥǽ (`mousing`) ˴ؤإפ򸫤뤳ȤǤޤ `seeking-assistance` ΥϡʤإסFAQ õ ݤͿƤǤ礦 2 õФ (Seeking-assistance) ?help-desk ?seeking-assistance ?faq ?FAQ gnuplot Web ڡϰʲˤޤ ^ <a href="http://www.gnuplot.info"> http://www.gnuplot.info ^ </a> ˡե FAQ.pdf ޤϾ Web Ȥ ^ <a href="http://www.gnuplot.info/faq/"> FAQ (١ʹ; Frequently Asked Questions) ΰ ^ </a> åƤ gnuplot 桼ȤƤμɬפʤ顢ʲΥ˥塼롼פѤ Ƥ comp.graphics.apps.gnuplot ãϥ᡼󥰥ꥹȤ˻äꡢष˥塼롼פΥå ɤळȤ򴫤ޤ᡼󥰥ꥹȤͭǡƱå Ƥޤ᡼󥰥ꥹȤ˻äˡ˴ؤƤϡSouceForge gnuplot γȯ Web ^ <a href="http://sourceforge.net/projects/gnuplot"> http://sourceforge.net/projects/gnuplot ^ </a> 򻲾ȤƤ ᡼󥰥ꥹȥСؤΥ᡼륢ɥ쥹: gnuplot-info@lists.sourceforge.net Хݡȡβϰʲ trackers upload Ƥ: http://sourceforge.net/projects/gnuplot/support ݡȤˡʤݡȤ褦ȤƤХ 꿷 gnuplot Ǵ˽ƤʤåƤ ȯǤ˴ؤ᡼󥰥ꥹ: gnuplot-beta@lists.sourceforge.net ƤȤϡʤѤƤ gnuplot ΥС Ϸڥ졼ƥ󥰥ƥࡢȤäƤξޤ褦ˤ ־ץץȤФʤɤǤ ξ硢ǡեΥץåȤؿΥץåȤɤ 2 ǽ (New features) ?new-features ǤϡС 4.4 ʹߤɲä줿ʤΤҲ𤷤ޤ Ūʰϡե NEWS 򻲾ȤƤ 3 ʸ (New syntax) Ffigure_newsyntax Ǥ gnuplot ˤϡ֤ (iteration) ޥɤ֥å¤ if/else/while/do ƳƤޤʲ: `if`, `while`, `do`ñʷ֤ϡޥ `plot`, `set` ѤǤޤʲ : `iteration`ʣΥޥɤޤŪʷ֤ϡʲǾ 𤹤֥å¤Ѥ뤳ȤǹԤޤǽ˴Ϣơ ΰʲ⻲: `summation`ʲϡοʸǽ򤤤Ĥ ѤǤ: set multiplot layout 2,2 fourier(k, x) = sin(3./2*k)/k * 2./3*cos(k*x) do for [power = 0:3] { TERMS = 10**power set title sprintf("%g term Fourier series",TERMS) plot 0.5 + sum [k=1:TERMS] fourier(k,x) notitle } unset multiplot ߤϡǡե뤫Υǡ򡢥ե 1 ܤ˽񤫤줿 ٥̾򤹤뤳ȤǤޤʲ: `columnhead`: plot for [crop in "Oats Peas Beans"] 'data' using "Year":crop 3 Υޥ (Local customization of linetypes) ߤǤϡ桼˻Ѥ° (μ) Υ եȤ¤Ӥ򥫥ޥǤޤʲ: `set linetype` ̾ƥѤνե `gnuplotrc` ĿŪʽե `~/.gnuplot` Τ줫ǹԤޤʲ: `initialization` ߤ¿νϷǥդطʿŪǤޤο 褹Τˡ̤ (linetype) `bgnd` ѤǤޤʲ: `bgnd` 3 襹 (New plot styles) 襹ΰʲ: `boxplot`, `circles`, `ellipses`, `fillsteps` 3 ˺ɸβ (Revised polar axes) ˺ɸ⡼ɤϡ¿襹򥵥ݡȤ褦˲ɤ ޤ˺ɸϡǤ x, y ȤΩ衢٥դǤޤ ʲ: `set polar`, `set rrange` 3 ʿ경르ꥺ =kdensity =cumulative 2 3 ξˡʿ경르ꥺबɲäƤơ 餫ʥҥȥʬ۴ؿ `plot` ˤˡ줾 `smooth kdensity` `smooth cumulative` Ȥޤ`dgrid3d` ˤϡ `splot` Ѥ˿ʿ경Ťդؿ (kernel) ĤɲäƤ ʲ: `smooth`, `dgrid3d` 3 (time/date) μ谷 =time ߤ gnuplot ϡߥ٤פΥեޥåȤ⤽ ȼäѹƤޤȤ߹ߴؿ time() ϡƥפ ä֤ޤ : ߤλߥ٤ɽ print strftime("%H:%M:%.3S %d-%b-%Y",time(0.0)) 18:15:04.253 16-Apr-2011 3 ǡδñ׾ ޥ `stats` ϡ`plot` `splot` Ʊ񼰤ǥե뤫 ǡɤ߹ߤޤդ褹ΤǤϤʤϡcolumn ꤵ줿ǡδñ׾ϤޤϤΤϡǾ (min) (max)ɸк (standard deviation) (correlation) ǡƤͤ򤽤ʹߤ襳ޥɤιѤǤ 褦̾ΤĤѿ¸ޤʲ: `stats` 3 /줿Ϸ ɥ饤 `qt` ϡQt եåؤκǾ̤˰֤÷Ϸ μǤϡեΥǥȥå״ĶΰĤΥɥȤ ơ뤤 Qt ١ߥǥХΥե륹꡼󥢥ץꥱ ȤƵǽޤ`qt` ϷϿޤƤ Web ١÷ɽ򥵥ݡȤϷ 2 ĤޤHTML5 `canvas` Ϸ version 4.4 Ƴޤ`svg` Ϸϡ ˴ؤơ gnuplot svg Ϥ礭 svg/xml ʸˤ褯褦ˡ礭ɤƤޤ ϥɥ饤 `canvas` ϡ֥ڡ canvas HTML 褹 javascript ϤޤϡĤޤരʥ ڡ뤤ϳ줿 HTML ɥȤΰ (ʣ 뤳ȤǤ) Ȥ륹ץȡΤ줫Ǥ ޤϡ/̾ʤɤΡ֥饦¦Υޥư򥵥 ȤƤޤ ϥɥ饤 `lua` ϡlua ץߥ󥰸ΥץȤˤäƤ ʤǽʥǡޤǤϡΤ褦ʥץȤ Ƥ gnuplot-tikz.lua ΤߤѰդƤơϡlatex TikZ ѥ ѤνϤޤ¾ TeX ѥåѡ뤤 TeX ʳΥġѤ gnuplot Ϥ lua ץȤʤɤ 뤳ȤǽǤ礦 `set term tikz` ϡ`set term lua tikz` ξάǤ˽񤤤褦 lua Ϸȳ lua ץȤѤ latex ʸ ޤ ϥɥ饤 `context` ϡConTeXt TeX ޥѥåǤ˽ ϤޤνϤνˤϡʲ ConTeXt Ѥ gnuplot ⥸塼뤬ɬפǤ: ^ <a href="http://ctan.org/pkg/context-gnuplot"> http://ctan.org/pkg/context-gnuplot ^ </a> Ϸ `epscairo` ϡcairo pango 饤֥Ѥ EPS (Encapsulated PostScript) ޤϡϥɥ饤 `postscript` Ȥ̤ EPS ˡȤʤޤ㤨нϷ `wxt` β̽ϤƱܤ EPS ե뤬ߤȤ͸Ǥ Ϸ `cairolatex` ϡϷ `pdfcairo` `epscairo` cairo ˤѤ LaTeX ʸ˼िΥդޤ ϡPDF EPS դޤƥʸϡϷ `epslatex` Ʊˡ LaTeX žޤ ϥɥ饤 `windows` ϡƩꥢХåե󥰽 ϡʣΥեɥդΥåץܡɤؤΥԡ䥰դ EMF եؤ¸򥵥ݡȤ褦ɤƤޤץ ⤿󤢤ꡢ桼󥿡եɤƤޤˡ ĹԤޤꤿߤ򥵥ݡȤ褦˥ƥȥ󥽡Υץ ˽񤭴Ƥޤإפϡߤ HTML ΤΤѰդ ޤ 2 ߴ (Backwards compatibility) ?backwards compatibility ?compatibility ǤǻȤƤĤν񼰤 gnuplot 4.0 侩Ȥʤޤ ϺǤǧϤ³Ƥޤϸߥѥ 졢ʲΤ褦ˤͭˤǤޤ: ./configure --enable-backwards-compatibility : 侩ν񼰤ϡ̤ gnuplot ΤǤǡ˺Ƥ ⤷ޤ Ĥμʰ㤤ϡʣʥޥ (äʸѿޤॳޥ) Τ ޤ򤱤褦ʥɤƳǤäդ٤ϡե ȡФολѤǤ : 侩: set title "Old" 0,-1 set data linespoints plot 1 2 4 # horizontal line at y=1 : TITLE = "New" set title TITLE offset char 0, char -1 set style data linespoints plot 1 linetype 2 pointtype 4 2 Хå/÷ (Batch/Interactive) ?batch/interactive ?command line options `gnuplot` ¿ΥƥǡХå뤤÷Τɤ ηǤ¹ԤǤȤ߹碌뤳ȤǽǤ ޥɥ饤ϡץؤΥץ (ʸ - ǻϤޤ) `gnuplot` ޥɤޤե̾ǤȲᤵޤ -e "command" ηΥץϡgnuplot ޥɤŪ˼¹Ԥ ƥեȤΥޥʸϡꤵ줿˼¹Ԥޤ̤ʥ ̾ "-" ϡޥɤɸϤɤ߹ळȤ̣ޤǸ Υե¹Ԥ `gnuplot` Ͻλޤɤ߹ޤե롢 ӥޥʸꤷʤäϡ`gnuplot` ɸϤ ÷Ϥդޤ `exit` `quit` Ϥɤ⸽ߤΥޥɥեλޤƤ ե뤬äƤʤСΥե `load` Τ˻Ȥޤ : ä򳫻Ϥ: gnuplot 2 ĤΥޥɥե "input1", "input2" ȤäƥХåԤʤ: gnuplot input1 input2 ե "header" θ塢÷⡼ɤưθ̤Υޥ ե "tailer" ¹Ԥ: gnuplot header - trailer ޥɥ饤󤫤 `gnuplot` ޥɤľͿλ˥꡼ ˥դĤ褦˥ץ "-persist" Ȥ: gnuplot -persist -e "set title 'Sine curve'; plot sin(x)" եΥޥɤ¹Ԥˡ桼ѿ a s 򥻥åȤ: gnuplot -e "a=2; s='file.png'" input.gpl 2 Х (Canvas size) ?canvas size ?canvas ?set term size gnuplot ΰǤǤϡ`set size` ͤ򡢽Ϥΰ ( ) Υ椹ΤˤȤäƤϷ⤢ޤ٤Ƥ Ϸä櫓ǤϤޤǤŪΤ `set size` Ѥ뤳Ȥ version 4.2 侩Ȥʤꡢversion 4.4 ߤϡۤȤɤνϷʲΥ롼˽褦ˤʤޤ: `set term <terminal_type> size <XX>, <YY>` ϡϥեΥ ޤ "Х" Υ椷ޤѥ᡼ͭͤ ĤƤϡġνϷΥإפ򻲾ȤƤǥեȤǤϡ դϤΥХΤ褵ޤ `set size <XX>, <YY>` ϡ輫Τ򥭥ХΥФŪ ̤ޤ1 꾮ͤꤹȡդϥХΤ ᤺1 礭ͤꤹȡդΰʬΤߤХ Τ˹礦褦褵ޤ1 礭ͤꤹȡ Ǥ꤬뤫⤷ʤȤդƤ Υ롼˱ʤ㳰 PostScript ɥ饤ФǡǥեȤǤϰ ǤΤƱ񤤤򤷤ޤgnuplot μǤǤϡPostScript ɥ饤 ФƱͤ˥ǥեȤο񤤤ѹ뤳ȤˤʤǤ礦 : set size 0.5, 0.5 set term png size 600, 400 set output "figure.png" plot "data" with lines Υޥɤϡ 600 ԥ롢⤵ 400 ԥνϥե "figure.png" ޤդϥХκ֤ޤ ϡmultiplot ⡼ɤ˹ԤäƤˡ̷⤷ޤ 2 ޥɥ饤Խ (Command-line-editing) ?line-editing ?editing ?command-line-editing ޥɥ饤ǤԽǽȥޥɥҥȥεǽϡ GNU readline 饤֥꤫ BSD libedit 饤֥ꡢޤȤ߹ޤ ƱΤΤΤ줫ȤäƥݡȤƤޤϡ gnuplot Υѥ configure ΥץǹԤޤ Ȥ߹ߤ readline ǤξԽޥɤϰʲ̤ǤDEL ˴ؤưϥƥ˰¸뤳ȤդƤGNU readline 饤֥ BSD libedit 饤֥˴ؤƤϡ켫ȤΥɥ 򻲾ȤƤ @start table - ޤ÷ƥȷ `Խ`: ^B 1 ʸ᤹ ^F 1 ʸؿʤ ^A ԤƬ˰ư ^E ԤκǸ˰ư ^H ľʸ DEL ߤʸ ^D ֤߰ʸԤʤ EOF ^K ֤߰ޤǺ ^L,^R 줿ɽιԤɽ ^U Τκ ^W ľñ ``: ^P ذư ^N ذư #\begin{tabular}{|cl|} \hline #\multicolumn{2}{|c|}{ޥɹԽޥ} \\ \hline \hline #ʸ & ǽ \\ \hline # & \multicolumn{1}{|c|}{Խ}\\ \cline{2-2} #\verb~^B~ & 1 ʸ᤹\\ #\verb~^F~ & 1 ʸؿʤ\\ #\verb~^A~ & ԤƬذư\\ #\verb~^E~ & ԤκǸذư\\ #\verb~^H~ & ľʸ\\ #\verb~DEL~ & ߤʸ\\ #\verb~^D~ & ֤߰ʸԤʤ EOF\\ #\verb~^K~ & ֤߰ޤǺ\\ #\verb~^L, ^R~ & 줿ɽιԤɽ\\ #\verb~^U~ & Τκ\\ #\verb~^W~ & ľñ\\ \hline # & \multicolumn{1}{|c|}{} \\ \cline{2-2} #\verb~^P~ & ذư\\ #\verb~^N~ & ذư\\ %c l . %ʸ@ǽ %_ %@Խ %^B@1 ʸ᤹ %^F@1 ʸؿʤ %^A@ԤƬ˰ư %^E@ԤκǸ˰ư %^H@ľʸ %DEL@ߤʸ %^D@֤߰ʸԤʤ EOF %^K@֤߰ޤǺ %^L, ^R@줿ɽιԤɽ %^U@Τκ %^W@ľñ %_ %@ %^P@ذư %^N@ذư @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th>ʸ</th> <th>ǽ</th></tr> ^</thead> ^<tbody> ^<tr> <td></td> <th>Խ</th></tr> ^<tr> <td><tt>^B</tt></td> <td>1 ʸ᤹</td></tr> ^<tr> <td><tt>^F</tt></td> <td>1 ʸؿʤ</td></tr> ^<tr> <td><tt>^A</tt></td> <td>ԤƬذư</td></tr> ^<tr> <td><tt>^E</tt></td> <td>ԤκǸذư</td></tr> ^<tr> <td><tt>^H</tt></td> <td>ľʸ</td></tr> ^<tr> <td><tt>DEL</tt></td> <td>ߤʸ</td></tr> ^<tr> <td><tt>^D</tt></td> <td>֤߰ʸԤʤ EOF</td></tr> ^<tr> <td><tt>^K</tt></td> <td>֤߰ޤǺ</td></tr> ^<tr> <td><tt>^L, ^R</tt></td> <td>줿ɽιԤɽ</td></tr> ^<tr> <td><tt>^U</tt></td> <td>Τκ</td></tr> ^<tr> <td><tt>^W</tt></td> <td>ľñ</td></tr> ^</tbody> ^<tbody> ^<tr> <th></th> <th></th></tr> ^<tr> <td><tt>^P</tt></td> <td>ذư</td></tr> ^<tr> <td><tt>^N</tt></td> <td>ذư</td></tr> ^</tbody> ^</table> 2 (Comments) ?comments ȤϼΤ褦˼Ƥޤ: ʸ '#' ϡΤƤξ ˽񤯤ȤǤޤΤȤ `gnuplot` ϤιԤλĤʬ̵ ޤ桢 (ʣǿޤ) 桢ޥִ (command substitution) ʤɤǤϤθ̤ޤ󡣴ñ˸ ̣Τ褦ʻȤ򤷤СưȸȤǤ ǡեΥʸλˤĤƤϡʲ: `set datafile commentschars`ȹԤ '\' ǽäƤ硢 ιԤ⥳ȤȤư뤳ȤդƤ 2 ɸ (Coordinates) ?coordinates =axes ޥ `set arrow`, `set key`, `set label`, `set object` ϥվ Ǥդΰ֤Ǥޤΰ֤ϰʲν񼰤ǻꤷޤ: {<system>} <x>, {<system>} <y> {,{<system>} <z>} ƺɸϻ <system> ˤϡ`first`, `second`, `graph`, `screen`, `character` Τ줫ޤ `first` ϺȲμ x,y (3D ξ z ) κɸϤ ޤ`second` 2 (ȱμ) Ѥޤ`graph` ϥ ΰŪ֤ꤷ 0,0 夬 1,1 (splot ξ ϥΰκ 0,0,0 ǡΰ֤ z ͤѤ ʲ: `set xyplane`) Ȥʤޤ`screen` ɽϰ (ϰ ΤǤꡢ`set size` 򤵤ʬǤϤޤ) ꤷ 0,0 夬 1,1 Ȥʤޤ`character` ϡΰκ (screen 0,0) Ρʸʸι⤵Ǥΰ֤Ϳޤäơ `character` ɸϡ򤵤줿եȤΥ˰¸ޤ x κɸϤꤵƤʤ `first` Ȥޤy κɸϤ ꤵƤʤ x ФɸϤѤޤ ͿɸŪʰ֤ǤϤʤŪͤǤ⤢ޤ (㤨 `set arrow` ... `rto` 2 ܤο)ΤۤȤɤͿ줿 ͤǽΰ֤Ф뺹ȤƻȤޤͿ줿ɸпˤ ϡŪͤΨȤƲᤵޤ㤨 set logscale x set arrow 100,5 rto 10,2 ϡx п y μʤΤǡ100,5 ΰ֤ 1000,7 ΰ ֤ؤ񤯤Ȥˤʤޤ (뤤Ϥʾ) μּǤ硢`timefmt` νʸ ˽äơǰϤޤ줿ʸŬڤʺɸꤹɬפ ʲ: `set xdata`, `set timefmt`ޤ`gnuplot` ɽ ǧƤơξ礽 2000 ǯ 1 1 ÿȲᤵ 2 ʸǡ (Datastrings) ?datastrings ǡեˤϡۥ磻ȥڡ (䥿) ޤޤʤǤդΰ ǽʸ󡢤뤤 2 ŰǰϤޤ줿Ǥդʸ (ۥ磻ȥ ޤޤƤɤ)Τ줫ηʤʸǡ뤳 ȤǽǤǡե˼Τ褦ʹԤޤޤƤ硢 4 Ĥޤߡ3 ܤƥʬǤȸʤޤ: 1.000 2.000 "Third column is all of this text" 4.00 ƥʬ 2 3 㤨аʲΤ褦˻Ѥޤ: plot 'datafile' using 1:2:4 with labels splot 'datafile using 1:2:3:4 with labels ƥʬǡ 1 ġޤʣ輴Υ٥Ȥ ƻѤǤޤϡϥǡ 3 ܤ 4 ܤ (X,Y) ɸ ƼФʬ褷ޤξ gnuplot ϡx ˱äɸŪ˴֤ζ٥ΤĤ ĤΤǤϤʤϥǡե 1 ܤ X ɸΰ֤ˡ ߤʸ x ˱äƤĤƹԤޤ set xtics plot 'datafile' using 3:4:xticlabels(1) with linespoints =columnheader ϥǡκǽΥȥ (ʤθФ) ƥʬȲ ᤹⤦ĤΥץ󤬤ꡢϥƥʬ򡢤褷 Υǡ (key) ΥȥʬȤƻѤޤϡƬ Ԥ 2 ܤʬܥåΥȥΤ˻Ѥ 2,4 ܤ׵ᤵ줿褹Τ˽ޤ: plot 'datafile' using 1:(f($2)/$4) with lines title columnhead(2) ̤: plot for [i=2:6] 'datafile' using i title "Results for ".columnhead(i) ʲ: `set style labels`, `using xticlabels`, `plot title`, `using` 2 ĥʸ⡼ (Enhanced text mode) ?enhanced text ?enhanced ¿νϷĥʸ⡼ (enhanced text mode) 򥵥ݡ Ƥޤϡʸɲäν񼰾ᤳߤޤ㤨 "x^2" x μ̾桹դ 2 Ĥǽ񤭽Фޤ ⡼ɤϡ㤨С"set term png enhanced" Τ褦̤ϽϷ Ȥ򤷤ޤ "set termoption enhanced" ȤäƤε ǽͭ/̵ˤǤޤ"set label 'x_2' noenhanced" Τ褦˸ġ ʸŬѤ뤳ȤǤޤ @start table - ޤ÷ƥȷ 浭 ^ a^x դʸ _ a_x դʸ @ @x, a@^b_{cd} ܥå (ʤ) & &{space} ꤷĹΥڡ ~ ~a{.8-} 'a' ξ '-' 򡢸ߤΥեȥ .8 ܻ夲֤˽Ťͽ #\begin{tabular}{|cccl|} \hline #\multicolumn{4}{|c|}{ĥʸ浭} \\ \hline #浭 & & & \\ \hline #\verb~^~ & \verb~a^x~ & $a^x$ & դʸ\\ #\verb~_~ & \verb~a_x~ & $a_x$ & դʸ\\ #\verb~@~ & \verb~a@^b_{cd}~ & $a^b_{cd}$ & ܥå (ʤ)\\ #\verb~&~ & \verb~d&{space}b~ & d\verb*+ +b & ꤷĹΥڡ\\ #\verb|~| & \verb|~a{.8-}| & $\tilde{a}$ & 'a' ξ '-' 򡢸ߤΥեȥ\\ #\verb~ ~ & \verb~ ~ & ~ ~ & .8 ܻ夲֤˽Ťͽ\\ %c c l . %.TE", /* ugly - doc2ms uses @ for column separator, but here we */ %.TS", /* need @ in table, so end and restart the table ! */ %center box tab ($) ; %c c l . %浭$$ %_ %^$a^x$դʸ %\&_$a\&_x$դʸ % @ $ @x, a\&@^b\&_{cd}$ܥå (ʤ) % & $ &{space}$ꤷĹΥڡ % ~ $ ~a{.8-}$'a' ξ '-' 򡢸ߤΥեȥ % $ $ .8 ܻ夲֤˽Ťͽ @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="center"> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th>浭</th> <th></th> <th></th></tr> ^</thead> ^<tbody> ^<tr> <td><tt> ^ </tt></td> <td><tt>a^x</tt></td> <td>դʸ</td></tr> ^<tr> <td><tt> _ </tt></td> <td><tt>a_x</tt></td> <td>դʸ</td></tr> ^<tr> <td><tt> @ </tt></td> <td><tt> @x</tt>, <tt>a@^b_{cd}</tt></td> <td>ܥå (ʤ)</td></tr> ^<tr> <td><tt> &</tt></td> <td><tt> &{space}</tt></td> <td>ꤷĹΥڡ</td></tr> ^<tr> <td><tt> ~ </tt></td> <td><tt> ~a{.8-}</tt></td> <td>'a' ξ '-' 򡢸ߤΥեȥ<br> .8 ܻ夲֤˽Ťͽ</td></tr> ^</tbody> ^</table> 楫åϰʸԤսʣʸ񤯾˻Ȥޤ ( 2^{10})եȡӤΥѹˤϡʲη äƤ: {/[fontname][=fontsize | *fontscale] text} äơ㤨 {/Symbol=20 G} 20 ݥȤΦ ()ˡ{/*0.75 K} ϸߤͭ ʥեȥ 3/4 礭 K ˤʤޤ (ʸ '/' ϡ'{' ľʸǤʤƤϤʤޤ) ܥå (phantom box) a@^b_c ξդʸȲդʸ· ͭѤǤʸ˥ȵŤͤˤϤޤƯޤ ԤŪΤˤϡʥȤ䤽¾Υƥ Τ¿ʸĥ󥳡 (㤨 iso_8859_1 utf8) ѤǤ礦ʲ: `set encoding`Υܥåϥڡ 󥰤ԤʤʤΤǡܥå (Ĥޤ @ θ) ξդʸ դʸûϤΤŬƤޤ ʸƱĹΥڡʸ '&' ȤȤ뤳ȤǤ ޤʤ 'abc&{def}ghi' ϰʲޤ (abc ghi δ֤ 3 ʸʬζ): 'abc ghi' ʸ '~' ϡʸޤϥåǰϤޤ줿ʸˡ³ʸ ޤϥåǰϤޤ줿ʸŤͽ񤭤ޤ2 ܤʸϺǽʸ ˤ碌ƿʿ˥󥿥󥰤ޤä '~a/' 'a' Ӥ ʥå夬ޤ2 ܤʸϡ˿֤Ȥǿ ľ˰ư뤳ȤǤޤοϸߤΥեȥФ ̣˽äʸ夬ä겼äꤷޤξ ʸ 1 ʸĹʤΤǥåǰϤɬפޤŤ 񤭤ʸ󤬿ϤޤäƤϡľˤ餹ͤʸ δ֤˥ڡƤ ('~{abc}{.5 000}')ʳϥڡ פǤ ('~{abc}{.5---}')뤤ξΥեȤѹ뤳 ȤǤޤ ('~a{.5 /*.2 o}'; 'a' 1/5 礭 'o'ξ ȥåδ֤ΥڡɬפǤ) ʸ󤬻Ϥޤä 뤳ȤϤǤޤ󡣤줾ʸǡ¾üʽ񼰤Ȥ Ǥޤ󡣤'~a{\^}' Τ褦üʸ򥨥פ뤳 () ϲǽǤ \ʸ (8 ʿ) ꤹ뤳Ȥüʵꤹ뤳ȤǤ 㤨С{/Symbol \245} ̵εˤʤޤϡ UTF-8 Τ褦ʥޥХȥ󥳡ɤξˤϤޤޤUTF-8 ĶǤϡϤ뤫ޤ̤ΤǤʤ˾ʸ򤹤 ȤǥޥХϤǤ褦ˤ٤Ǥ ʸϡ \\ \{ ʤɤΤ褦 \ ȤäƥפǤޤ ŰʸñʸȤϰۤʤäƲᤵ 뤳ȤΤäƤƤʰ㤤ϡŰʸǤϥХ å 2 ĽŤͤɬפ뤳ȤǤ (ϸդΤ񤷤ΤǤȤꤢäƤߤƤ): set xlabel 'Time (10^6 {/Symbol m}s)' set title '{/Symbol=18 \\362@_{/=9.6 0}^{/=12 x}} \\ {/Helvetica e^{-{/Symbol m}^2/2} d}{/Symbol m}' gnuplot ʪ /docs/psdoc ֥ǥ쥯ȥˤե "ps_guide.ps" ˡĥ줿񼰤˴ؤ㤬˺ܤäƤޤ 2 Ķѿ (Environment) ?environment `gnuplot` ¿ΥĶѿǧޤɬܤΤΤϤޤ󤬡 Ȥˤʤ뤫Τޤ GNUTERM Ƥ硢ϻѤϷ (terminal) ̾ ȤƻȤޤ `gnuplot` ư˸ĤϷͥ ƻѤޤ.gnuplot (ޤϤ) ȥåץե (ʲ: `startup`) ˤ䡢ΤȤǤθ Ū˻ꤷʪͥ褵ޤ GNUHELP ˥إץե (gnuplot.gih) Υѥ̾ƤȤ ޤ VMS Ǥϡ̾ GNUPLOT$HELP `gnuplot` Υإץ饤֥̾ ޤ`gnuplot` ΥإפǤդΥƥΥإץ饤֥ 뤳ȤǤ`gnuplot` Ǥ⳰Ǥ⻲Ȥƹޤ Unix ˤƤϡȥǥ쥯ȥ .gnuplot Ȥե뤬ʤ ˤϡHOME 줿ǥ쥯ȥõޤMS-DOS, Windows, OS/2 Ǥ GNUPLOT ˻ȤޤWindows ǤϡNT Ѥѿ USERPROFILE ⻲ȤޤVMS Ǥ SYS$LOGIN Ǥ`help startup` ǤäƤߤƤ Unix ˤƤϡPAGER إץåνѤΥե륿ȤƻȤ ޤ Unix ǤϡSHELL `shell` ޥɤκݤ˻ȤޤMS-DOS, OS/2 COMSPEC `shell` ޥɤκݤ˻Ȥޤ FIT_SCRIPT ϡƤϤ (fit) Ǥ줿Ȥ˼¹Ԥ `gnuplot` ޥɤλ˻Ȥޤʲ: `fit`FIT_LOG ƤϤˤ եΥǥեȤΥե̾λ˻Ȥޤ GNUPLOT_LIB ϡǡ䥳ޥɥեθǥ쥯ȥɲ Τ˻ȤޤѿϡĤΥǥ쥯ȥ̾ޤʣΥǥ ȥ̾񤯤ȤǤޤǥ쥯ȥζڤϥץåȥۡ ˰㤤ޤ㤨 Unix Ǥ ':' ǡMS-DOS, Windows, OS/2 Ǥ ';' GNUPLOT_LIB ͤѿ `loadpath` ɲäޤ `save` `save set` ޥɤǤ¸ޤ ϥɥ饤Фˤ gd 饤֥ͳ TrueType եȤ򰷤 ⤤ĤޤΥɥ饤ФΥեȸѥϡĶѿ GDFONTPATH ǤޤˡΥɥ饤ФǤΥǥեȤΥ ȤϴĶѿ GNUPLOT_DEFAULT_GDFONT Ǥޤ postscript ϥɥ饤ФϼʬǻäƤեȸѥȤޤ ϴĶѿ GNUPLOT_FONTPATH Ǥޤ񼰤 GNUPLOT_LIB ƱǤGNUPLOT_FONTPATH ͤѿ `fontpath` ɲäޤ `save` `save set` ޥɤǤ¸ޤ PostScript ɥ饤Фϡ (Ȥ߹ޤƤʤ) եõ ˴Ķѿ GNUPLOT_PS_DIR Ѥޤ󥹥ȡκȤˤꡢ gnuplot ˤϤΥեΥԡȤ߹ޤƤ뤫ޤϥǥե ȤΥѥޤƤޤѿϡpostscript Ϸǥǥ ȤΥե˥ޥ prologue եѤ ΤѤǤޤʲ: `postscript prologue` 2 (Expressions) ?expressions Ūˤ C, FORTRAN, Pascal, BASIC ˤѲǽʿɽ Ǥޤ 黻Ҥ̤ͥ C λͤ˽ޤζʸ ȥʸ̵뤵ޤ ʣǿ {<real>,<imag>} ɽޤ <real> <imag> () ϿǤɬפޤ㤨 {3,2} 3 + 2i 路{0,1} 'i' ȤɽޤˤŪ楫å ɬפޤ =division gnuplot "¿" "" 黻 FORTRAN C Τ褦˰Ȥ դƤ"1", "-10" ʤɤȸʤ졢"1.0", "-10.0", "1e1", 3.5e-1 ʤɤϼ¿ȸʤޤ 2 ĤΤäȤפʰ ϳ任Ǥγ任ڤΤƤޤ: 5/2 = 2¿ϤǤϤ ޤ: 5.0/2.0 = 2.5餬ߤξ硢׻ϼ "ĥ" ޤ: 5/2e0 = 2.5dz硢 ͤϥѥˤäѤޤ"print -5/2" ȤơʤΥ ब -2 -3 ΤɤȤ뤫ǧƤ "1/0" "̤ (undefined)" ե饰ˤꤽ ̵뤷ޤ뤤ϡ餫Ƥ NaN ȤäƤƱ ȤˤʤޤˤĤƤϡʲ: `using` =NaN ʣǿɽμ¿ʬʬϡɤʷϤƤ˼¿Ǥ: {3,2} "3" "2" ϼ¿ǤꡢǤϤޤ gnuplot ʸФñʱ黻ʸѿѤǤޤ м ("A" . "B" eq "AB") Ͽɾޤʸη Ҥʸ黻Ҥ̣Ƥޤ ȤƤͤޤʸϡ줬Ѥ줿ϡб ¿Ѵޤäơ("3" + "4" == 7) (6.78 == "6.78") ɤ⿿ˤʤޤϡ줬ʸ黻ҤǻȤ줿ʸ Ѵޤ¿ʣǿϥǤŵŪϡե̾ ¾ʸȤǤ礦: 㤨 ("file" . 4 eq "file4") ϿǤ ֻꤹϰϵһ [beg:end] ˤäơʬʸꤹ뤳Ȥ Ǥޤ㤨С"ABCDEF"[3:4] == "CD" ǡ"ABCDEF"[4:*] == "DEF" "string"[beg:end] ϡʸͤȤ߹ߴؿ substr("strings",beg,end) Ƥ֤ȤȤۤƱǤؿƤӽФǤ beg, end Ͼά뤳ȤϤǤޤ 3 ؿ (Functions) ?expressions functions `gnuplot` οشؿϡUnix إ饤֥δؿȤۤƱǤ դʤƤδؿ¿ʣǿΰ뤳ȤǤ ѤͤȤؿ (㤨 sin(x), cos(x), arg(z)) ϡ ͤ饸Ȥưޤϥޥ `set angles` ˤä ѹǤޤ ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3" width="90%"> ^<colgroup> ^ <col align="center"> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th colspan="3"> إ饤֥ؿ </th></tr> ^<tr> <th>ؿ</th> <th></th> <th></th></tr> ^</thead> ^<tbody> ^<tr> <td>abs(x)</td> <td>Ǥ</td> <td>|<i>x</i>|, <i>x</i> ; Ʊ</td></tr> ^<tr> <td>abs(x)</td> <td>ʣǿ</td> <td>length of <i>x</i>, √( Re(<i>x</i>)<sup>2</sup> + Im(<i>x</i>)<sup>2</sup> )</td></tr> ^<tr> <td>acos(x)</td> <td>Ǥ</td> <td>cos<sup>-1</sup> <i>x</i> ()</td></tr> ^<tr> <td>acosh(x)</td> <td>Ǥ</td> <td>饸Ǥ cosh<sup>-1</sup> <i>x</i> (ж;)</td></tr> ^<tr> <td>airy(x)</td> <td>Ǥ</td> <td>꡼ (Airy) ؿ Ai(<i>x</i>)</td></tr> ^<tr> <td>arg(x)</td> <td>ʣǿ</td> <td><i>x</i> г</td></tr> ^<tr> <td>asin(x)</td> <td>Ǥ</td> <td>sin<sup>-1</sup> <i>x</i> ()</td></tr> ^<tr> <td>asinh(x)</td> <td>Ǥ</td> <td>饸Ǥ sinh<sup>-1</sup> <i>x</i> (ж)</td></tr> ^<tr> <td>atan(x)</td> <td>Ǥ</td> <td>tan<sup>-1</sup> <i>x</i> (󥸥)</td></tr> ^<tr> <td>atan2(y,x)</td> <td>ޤϼ¿</td> <td>tan<sup>-1</sup>(<i>y/x</i>) (󥸥)</td></tr> ^<tr> <td>atanh(x)</td> <td>Ǥ</td> <td>饸Ǥ tanh<sup>-1</sup> <i>x</i> (ж)</td></tr> ^<tr> <td>EllipticK(k)</td> <td>(-1:1) μ¿ k</td> <td><i>K(k)</i> 1 ﴰʱʬ</td></tr> ^<tr> <td>EllipticE(k)</td> <td>[-1:1] μ¿ k</td> <td><i>E(k)</i> 2 ﴰʱʬ</td></tr> ^<tr> <td>EllipticPi(n,k)</td> <td>¿ n<1, (-1:1) μ¿ k</td> <td> Π(<i>n,k</i>) 3 ﴰʱʬ</td></tr> ^<tr> <td>besj0(x)</td> <td>ޤϼ¿</td> <td>饸Ǥ <i>j</i><sub>0</sub> ٥åؿ (0 ٥åؿ)</td></tr> ^<tr> <td>besj1(x)</td> <td>ޤϼ¿</td> <td>饸Ǥ <i>j</i><sub>1</sub> ٥åؿ (1 ٥åؿ)</td></tr> ^<tr> <td>besy0(x)</td> <td>ޤϼ¿</td> <td>饸Ǥ <i>y</i><sub>0</sub> ٥åؿ (0 Υޥؿ)</td></tr> ^<tr> <td>besy1(x)</td> <td>ޤϼ¿</td> <td>饸Ǥ <i>y</i><sub>1</sub> ٥åؿ (1 Υޥؿ)</td></tr> ^<tr> <td>ceil(x)</td> <td>Ǥ</td> <td>⌈<i>x</i>⌉, <i>x</i> (μ) ʾκǾ</td></tr> ^<tr> <td>cos(x)</td> <td>radians</td> <td>cos <i>x</i>, <i>x</i> Υ</td></tr> ^<tr> <td>cosh(x)</td> <td>Ǥ</td> <td>cosh <i>x</i>, 饸Ǥ <i>x</i> Υϥѥܥå</td></tr> ^<tr> <td>erf(x)</td> <td>Ǥ</td> <td>erf(Re(<i>x</i>)), <i>x</i> μθؿ</td></tr> ^<tr> <td>erfc(x)</td> <td>Ǥ</td> <td>erfc(Re(<i>x</i>)), 1.0 - (<i>x</i> μθؿ)</td></tr> ^<tr> <td>exp(x)</td> <td>Ǥ</td> <td><i>e<sup>x</sup></i>, <i>x</i> λؿؿ</td></tr> ^<tr> <td>expint(n,x)</td> <td>Ǥ</td> <td><i>E<sub>n</sub></i>(<i>x</i>), <i>x</i> λؿʬ</td></tr> ^<tr> <td>floor(x)</td> <td>Ǥ</td> <td>⌊<i>x</i>⌋, <i>x</i> (μ) ʲκ</td></tr> ^<tr> <td>gamma(x)</td> <td>Ǥ</td> <td>Γ(Re(<i>x</i>)), <i>x</i> μΥ޴ؿ</td></tr> ^<tr> <td>ibeta(p,q,x)</td> <td>Ǥ</td> <td>ibeta(Re(<i>p,q,x</i>)), <i>p</i>,<i>q</i>,<i>x</i> μԴ١ؿ</td></tr> ^<tr> <td>inverf(x)</td> <td>Ǥ</td> <td><i>x</i> μεոؿ</td></tr> ^<tr> <td>igamma(a,x)</td> <td>Ǥ</td> <td>igamma(Re(<i>a,x</i>)), <a>a</a>,<i>x</i> μԴ޴ؿ</td></tr> ^<tr> <td>imag(x)</td> <td>ʣǿ</td> <td>Im(<i>x</i>), <i>x</i> εʬ (¿)</td></tr> ^<tr> <td>invnorm(x)</td> <td>Ǥ</td> <td><i>x</i> μεʬ۴ؿ</td></tr> ^<tr> <td>int(x)</td> <td>¿</td> <td><i>x</i> ʬ (0 ˸äƴݤ)</td></tr> ^<tr> <td>lambertw(x)</td> <td>¿</td> <td>Lambert W ؿ</td></tr> ^<tr> <td>lgamma(x)</td> <td>Ǥ</td> <td>lgamma(Re(<i>x</i>)), <i>x</i> μΥпؿ</td></tr> ^<tr> <td>log(x)</td> <td>Ǥ</td> <td>ln <i>x</i>, <i>x</i> μп ( <i>e</i>)</td></tr> ^<tr> <td>log10(x)</td> <td>Ǥ</td> <td>log<sub>10</sub> <i>x</i>, <i>x</i> п ( 10)</td></tr> ^<tr> <td>norm(x)</td> <td>Ǥ</td> <td>norm(<i>x</i>), <i>x</i> μʬ۴ؿ</td></tr> ^<tr> <td>rand(x)</td> <td></td> <td> [0:1] ε</td></tr> ^<tr> <td>real(x)</td> <td>Ǥ</td> <td>Re(<i>x</i>), <i>x</i> μ¿ʬ</td></tr> ^<tr> <td>sgn(x)</td> <td>Ǥ</td> <td><i>x</i> > 0 ʤ 1, <i>x</i> < 0 ʤ -1, <i>x</i> = 0 ʤ 0. <i>x</i> ε̵</td></tr> ^<tr> <td>sin(x)</td> <td>Ǥ</td> <td>sin <i>x</i>, <i>x</i> Υ</td></tr> ^<tr> <td>sinh(x)</td> <td>Ǥ</td> <td>sinh <i>x</i>,饸Ǥ <i>x</i> Υϥѥܥå</td></tr> ^<tr> <td>sqrt(x)</td> <td>Ǥ</td> <td>√<i>x</i>, <i>x</i> ʿ</td></tr> ^<tr> <td>tan(x)</td> <td>Ǥ</td> <td>tan <i>x</i>, <i>x</i> Υ󥸥</td></tr> ^<tr> <td>tanh(x)</td> <td>Ǥ</td> <td>tanh <i>x</i>, 饸Ǥ <i>x</i> Υϥѥܥå󥸥</td></tr> ^<tr> <td>voigt(x,y)</td> <td>¿</td> <td>ؿȥĴؿξߤ</td></tr> ^</tbody> ^</table> ^<p> </p> ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3" width="90%"> ^<colgroup> ^ <col align="center"> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th colspan="3"> ʸؿ </th></tr> ^<tr> <th>ؿ</th> <th></th> <th></th></tr> ^</thead> ^<tbody> ^<tr> <td>gprintf("format",x,...)</td> <td>Ǥ</td> <td>gnuplot ν񼰲ϴŬѤ̤ʸ</td></tr> ^<tr> <td>sprintf("format",x,...)</td> <td>ʣ</td> <td>C sprintf ֤ʸ</td></tr> ^<tr> <td>strlen("string")</td> <td>ʸ</td> <td>Хñ̤ǤʸĹ ()</td></tr> ^<tr> <td>strstrt("string","key")</td> <td>ʸ</td> <td>ʬʸ "key" Ƭ</td></tr> ^<tr> <td>substr("string",beg,end)</td> <td>ʣ</td> <td>ʸ "string"[beg:end]</td></tr> ^<tr> <td>strftime("timeformat",t)</td> <td>Ǥ</td> <td>gnuplot ˤϷ̤ʸ</td></tr> ^<tr> <td>strptime("timeformat",s)</td> <td>ʸ</td> <td>ʸ s Ѵ 2000 ǯÿ</td></tr> ^<tr> <td>system("command")</td> <td>ʸ</td> <td>륳ޥɤνϤʸ</td></tr> ^<tr> <td>word("string",n)</td> <td>string, int</td> <td>ʸ "string" n ܤñ</td></tr> ^<tr> <td>words("string")</td> <td>ʸ</td> <td>ʸ "string" ñ</td></tr> ^</tbody> ^</table> ^<p> </p> ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3" width="90%"> ^<colgroup> ^ <col align="center"> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th colspan="3"> ¾ gnuplot δؿ </th></tr> ^<tr> <th>ؿ</th> <th></th> <th></th></tr> ^</thead> ^<tbody> ^<tr> <td>column(x)</td> <td>ʸ</td> <td> ϥǡ <i>x</i> ܤ</td></tr> ^<tr> <td>columnhead(x)</td> <td></td> <td> ǡեκǽ <i>x</i> ʸ</td></tr> ^<tr> <td>defined(X)</td> <td>ѿ̾</td> <td> [侩] X Ƥ 1, Ǥʤ 0</td></tr> ^<tr> <td>exists("X")</td> <td>ʸ</td> <td> ѿ̾ X Ƥ 1, Ǥʤ 0</td></tr> ^<tr> <td>stringcolumn(x)</td> <td></td> <td> ʸȤƤ <i>x</i> ܤ</td></tr> ^<tr> <td>timecolumn(x)</td> <td></td> <td> ǡե <i>x</i> ܤǡ</td></tr> ^<tr> <td>tm_hour(x)</td> <td></td> <td></td></tr> ^<tr> <td>tm_mday(x)</td> <td></td> <td></td></tr> ^<tr> <td>tm_min(x)</td> <td></td> <td>ʬ</td></tr> ^<tr> <td>tm_mon(x)</td> <td></td> <td></td></tr> ^<tr> <td>tm_sec(x)</td> <td></td> <td></td></tr> ^<tr> <td>tm_wday(x)</td> <td></td> <td>νβ</td></tr> ^<tr> <td>tm_yday(x)</td> <td></td> <td>ǯβ</td></tr> ^<tr> <td>tm_year(x)</td> <td></td> <td></td></tr> ^<tr> <td>time(x)</td> <td>Ǥ</td> <td>ߤΥƥ</td></tr> ^<tr> <td>valid(x)</td> <td></td> <td> ǡ column(<i>x</i>) </td></tr> ^<tr> <td>value("name")</td> <td>ʸ</td> <td> ̾ name ѿθߤ</td></tr> ^</tbody> ^</table> C TeX troff Ϥ˴ؤƤɽϰʲΥإץ֤ޤ C HTML إפ˴ؤƤɽȥξɬפʤΤǡʲΥޥå C ޡ doc2html ؤΤΥʥȤƻѤޤ ^<!-- INCLUDE_NEXT_TABLE --> @start table #\begin{longtable}{|ccl|} \hline #\multicolumn{3}{|c|}{إ饤֥ؿ} \\ \hline \hline #ؿ & & \\ \hline #\endhead \hline \endfoot %c c l . %ؿ@@ %_ 4 abs ?expressions functions abs ?abs #abs(x) & Ǥ & $x$ , $|x|$; Ʊ\\ #abs(x) & ʣǿ & $x$ Ĺ, $\sqrt{{\mbox{real}(x)^{2} + #\mbox{imag}(x)^{2}}}$ \\ %abs(x)@Ǥ@$x$ , $|x|$; Ʊ %abs(x)@ʣǿ@$x$ Ĺ, $sqrt{roman real (x) sup 2 + roman imag (x) sup 2}$ ؿ `abs(x)` ֤ͤޤ֤ͤηϰƱǤ ʣǿΰФƤ, abs(x) ʣʿ̤ˤ x Ĺ ޤ [ʤ sqrt(real(x)**2 + imag(x)**2) ] 4 acos ?expressions functions acos ?acos #acos(x) & Ǥ & $\cos^{-1} x$ () \\ %acos(x)@Ǥ@$cos sup -1 x$ () ؿ `acos(x)` ϰΥ (;) ֤ޤ`acos` ͤ饸ñ̤ޤ٤Ǥ뤫 `set angles` 򤵤ޤ 4 acosh ?expressions functions acosh ?acosh #acosh(x) & Ǥ & 饸Ǥ $\cosh^{-1} x$ (ж;)\\ %acosh(x)@Ǥ@$饸Ǥ cosh sup -1 x$ (ж;) ؿ `acosh(x)` ϵեϥѥܥå (ж;) ͤ饸 ֤ޤ 4 airy ?expressions functions airy ?airy #airy(x) & Ǥ & ꡼ؿ Ai(x) \\ %airy(x)@Ǥ@꡼ؿ Ai(x) ؿ `airy(x)` ϡ꡼ (Airy) ؿ Ai(x) ֤ͤޤؿ Ai(x) ϡʬ y'' - x y = 0 Ρ¿ΤͭʲǤ ʣǿξ硢εʬ̵뤵ޤ 4 arg ?expressions functions arg ?arg #arg(x) & ʣǿ & $x$ г \\ %arg(x)@ʣǿ@$x$ г ؿ `arg(x)` ʣǿгѤ`set angles` ˤäƥ饸 󡢤ޤ٤֤ޤ 4 asin ?expressions functions asin ?asin #asin(x) & Ǥ & $\sin^{-1} x$ () \\ %asin(x)@Ǥ@$sin sup -1 x$ () ؿ `asin(x)` ϰΥ () ֤ޤ`asin` ֤ ͤ `set angles` ˤäƥ饸ñ̤ޤ٤ˤʤޤ 4 asinh ?expressions functions asinh ?asinh #asinh(x) & Ǥ & 饸Ǥ $\sinh^{-1} x$ (ж)\\ %asinh(x)@Ǥ@$饸Ǥ sinh sup -1 x$ (ж) ؿ `asinh(x)` ϵեϥѥܥå (ж) ͤ饸 ֤ޤ 4 atan ?expressions functions atan ?atan #atan(x) & Ǥ & $\tan^{-1} x$ (󥸥) \\ %atan(x)@Ǥ@$tan sup -1 x$ (󥸥) ؿ `atan(x)` ϰΥ󥸥 () ֤ͤޤ `atan` ֤ͤ `set angles` ˤäƥ饸ñ̤ޤ٤ ʤޤ 4 atan2 ?expressions functions atan2 ?atan2 #atan2(y,x) & ޤϼ¿ & $\tan^{-1} (y/x)$ (󥸥) \\ %atan2(y,x)@ޤϼ¿@$tan sup -1 (y/x)$ (󥸥) ؿ `atan2(y,x)` ϰμ¿ʬΥ󥸥 () ֤ͤޤ`atan2` `set angles` ˤäƥ饸ñ̤٤ ʤ롢Ŭڤʻʬߤˤ֤ͤޤ 4 atanh ?expressions functions atanh ?atanh #atanh(x) & Ǥ & 饸Ǥ $\tanh^{-1} x$ (ж)\\ %atanh(x)@Ǥ@饸Ǥ $tanh sup -1 x$ (ж) ؿ `atanh(x)` ϵեϥѥܥå󥸥 (ж) ͤ饸 ֤ޤ 4 EllipticK #EllipticK(k) & ¿ k $\in$ (-1:1) & $K(k)$ 1 ﴰʱʬ\\ %EllipticK(k)@(-1:1) μ¿ k@$K k$ 1 ﴰʱʬ ʲ: `elliptic integrals` 4 EllipticE #EllipticE(k) & ¿ k $\in$ [-1:1] & $E(k)$ 2 ﴰʱʬ\\ %EllipticE(k)@[-1:1] μ¿ k@ $E k$ 2 ﴰʱʬ ʲ: `elliptic integrals` 4 EllipticPi #EllipticPi(n,k) & ¿ n$<$1, ¿ k $\in$ (-1:1) & $\Pi(n,k)$ 3 ﴰʱʬ\\ %EllipticPi(n,k)@ ¿ n<1, (-1:1) μ¿ k@ $Pi n,k$ 3 ﴰʱʬ ʲ: `elliptic integrals` 4 besj0 ?expressions functions besj0 ?besj0 #besj0(x) & ޤϼ¿ & $j_{0}$ ٥åؿ (0 ٥åؿ)\\ %besj0(x)@ޤϼ¿@$j sub 0$ ٥åؿ (0 ٥åؿ) ؿ `besj0(x)` ϰ j0 ٥åؿ (0 1 ؿ J00 ٥åؿ) ֤ͤޤ`besj0` ˤϰϥ饸Ϳޤ 4 besj1 ?expressions functions besj1 ?besj1 #besj1(x) & ޤϼ¿ & $j_{1}$ ٥åؿ (1 ٥åؿ)\\ %besj1(x)@ޤϼ¿@$j sub 1$ ٥åؿ (1 ٥åؿ) ؿ `besj1(x)` ϰ j1 ٥åؿ (1 1 ؿ J11 ٥åؿ) ֤ͤޤ`besj1` ˤϰϥ饸Ϳޤ 4 besy0 ?expressions functions besy0 ?besy0 #besy0(x) & ޤϼ¿ & $y_{0}$ ٥åؿ (0 Υޥؿ)\\ %besy0(x)@ޤϼ¿@$y sub 0$ ٥åؿ (0 Υޥؿ) ؿ `besy0(x)` ϰ y0 ٥åؿ (0 2 ؿ Y00 Υޥؿ) ֤ͤޤ`besy0` ˤϰϥ饸Ϳޤ 4 besy1 ?expressions functions besy1 ?besy1 #besy1(x) & ޤϼ¿ & $y_{1}$ ٥åؿ (1 Υޥؿ)\\ %besy1(x)@ޤϼ¿@$y sub 1$ ٥åؿ (1 Υޥؿ) ؿ `besy1(x)` ϰ y1 ٥åؿ (1 2 ؿ Y11 Υޥؿ) ֤ͤޤ`besy1` ˤϰϥ饸Ϳޤ 4 ceil ?expressions functions ceil ?ceil #ceil(x) & Ǥ & $\lceil x \rceil$, $x$ (μ) ʾκǾ\\ %ceil(x)@Ǥ@$left ceiling x right ceiling$, $x$ (μ) ʾκǾ ؿ `ceil(x)` ϰʾκǾ֤ޤʣǿФƤ `ceil` ϤΰμʾκǾ֤ޤ 4 cos ?expressions functions cos ?cos #cos(x) & Ǥ & $x$ Υ $\cos x$\\ %cos(x)@饸@$x$ Υ $cos~x$ ؿ `cos(x)` ϰΥ (;) ֤ͤޤ`cos` `set angles` ˤäơ饸ޤ٤ΰդޤ 4 cosh ?expressions functions cosh ?cosh #cosh(x) & Ǥ & $\cosh x$, $x$ Υϥѥܥå \\ %cosh(x)@Ǥ@$cosh~x$, $x$ Υϥѥܥå ؿ `cosh(x)` ϰΥϥѥܥå֤ͤޤ`cosh` ϥ饸Ϳޤ 4 erf ?expressions functions erf ?erf #erf(x) & Ǥ & $\mbox{erf}(\mbox{real}(x))$, $x$ θؿ\\ %erf(x)@Ǥ@$erf ( roman real (x))$, $x$ μθؿ ؿ `erf(x)` ϰμθؿ֤ͤޤʣǿξ ϵ̵뤵ޤʲ: `erfc`, `inverf`, `norm` 4 erfc ?expressions functions erfc ?erfc #erfc(x) & Ǥ & $\mbox{erfc}(\mbox{real}(x))$, 1.0 - ($x$ μθؿ) \\ %erfc(x)@Ǥ@$erfc ( roman real (x))$, 1.0 - ($x$ μθؿ) ؿ `erfc(x)` 1.0 顢μθؿͤΤ֤ ޤʣǿξϵ̵뤵ޤʲ: `erf`, `inverf`, `norm` 4 exp ?expressions functions exp ?exp #exp(x) & Ǥ & $e^{x}$, $x$ λؿؿ\\ %exp(x)@Ǥ@$e sup x$, $x$ λؿؿ ؿ `exp(x)` λؿؿ (`e` ΰ) ֤ޤĶˤ Ƥ (ä sun) 礭 x ͤФ exp(-x) ̤֤ͤ礬 ޤΤ褦ʾ硢safe(x) = x<-100 ? 0 : exp(x) Τ褦ʥ桼 ؿΩĤǤ礦 4 expint ?expressions functions expint ?expint #expint(n,x) & $n\ge0$, ¿ $x\ge0$ & $E_n(x)=\int_1^\infty t^{-n} e^{-xt}\,dt$, $x$ λؿʬ \\ %expint(n,x)@any@$E sub n (x)$, $x$ λؿʬ ؿ `expint(n,x)` ϡΰμ¿ʬλؿʬʤ t δؿ t^(-n) e^(-tx) 1 ޤǤʬ֤ͤޤn 0 ʾ x 0 ʾμ¿ǡx>0 n>1 Τ줫ǤʤФʤޤ 4 floor ?expressions functions floor ?floor #floor(x) & Ǥ & $\lfloor x \rfloor$, $x$ (μ) ʲκ\\ %floor(x)@Ǥ@$left floor x right floor$, $x$ (μ) ʲκ ؿ `floor(x)` Ϥΰʲκ֤ޤʣǿФ Ƥ `floor` Ϥΰμʲκ֤ޤ 4 gamma ?expressions functions gamma ?gamma #gamma(x) & Ǥ & $\mbox{gamma}(\mbox{real}(x))$, $x$ μΥ޴ؿ\\ %gamma(x)@Ǥ@$GAMMA ( roman real (x))$, $x$ μΥ޴ؿ ؿ `gamma(x)` ϰμΥ޴ؿ֤ͤޤ n Ф Ƥ gamma(n+1) = n! Ǥʣǿξ硢ʬ̵뤵ޤ 4 ibeta ?expressions functions ibeta ?ibeta #ibeta(p,q,x) & Ǥ & $\mbox{ibeta}(\mbox{real}(p,q,x))$, $p$,$q$,$x$ μԴ١ؿ \\ %ibeta(p,q,x)@Ǥ@$ibeta ( roman real (p,q,x))$, $p$,$q$,$x$ μԴ١ؿ ؿ `ibeta(p,q,x)` ϰμԴ١ؿ֤ͤޤp, q x [0:1] ͤǤʣǿξϵ̵뤵ޤ δؿϢʬˡ (Abramowitz and Stegun, 1964) ǶƤơ x < (p-1)/(p+q-2) ϰϤǤΤǤϤޤ 4 inverf ?expressions functions inverf ?inverf #inverf(x) & Ǥ & $x$ μεոؿ \\ %inverf(x)@Ǥ@$x$ μεոؿ ؿ `inverf(x)` ϰμεոؿ֤ͤޤʲ: `erf`, `invnorm` 4 igamma ?expressions functions igamma ?igamma #igamma(a,x) & Ǥ & $\mbox{igamma}(\mbox{real}(a,x))$, $a$,$x$ μԴ޴ؿ \\ %igamma(a,x)@Ǥ@$igamma ( roman real (a,x))$, $a$,$x$ μԴ޴ؿ ؿ `igamma(a,x)` ϰμΡ줿Դ޴ؿͤ ֤ޤǡa > 0, x >= 0 ǤɸŪʵˡǤ P(a,x) (㤨 Abramowitz and Stegun (6.5.1)) ǡx ̵ȯζ˸ͤ 1 Ǥʣǿξϵ̵뤵ޤ 4 imag ?expressions functions imag ?imag #imag(x) & ʣǿ & $x$ εʬ (¿) \\ %imag(x)@ʣǿ@$x$ εʬ (¿) ؿ `imag(x)` ϰεʬ¿Ȥ֤ޤ 4 invnorm ?expressions functions invnorm ?invnorm #invnorm(x) & Ǥ & $x$ μεʬ۴ؿ \\ %invnorm(x)@Ǥ@$x$ μεʬ۴ؿ ؿ `invnorm(x)` ϰμФ롢ʬ (ʬ) ʬ ۴ؿεմؿ֤ͤޤʲ: `norm` 4 int ?expressions functions int ?int #int(x) & ¿ & $x$ ʬ (0 ˸äƴݤ) \\ %int(x)@¿@$x$ ʬ (0 ˸äƴݤ) ؿ `int(x)` ϡʬ (0 ˸äƴݤ᤿) ֤ޤ 4 lambertw ?expressions functions lambertw ?lambertw #lambertw(x) & ¿ & Lambert W ؿ \\ %lambertw(x)@¿@Lambert W ؿ lambertw ؿ Lambert W ؿμ֤ͤޤϡ (W(z)*exp(W(z))=z ޤz z >= -exp(-1) ¿Ǥ Фޤ 4 lgamma ?expressions functions lgamma ?lgamma #lgamma(x) & Ǥ & $\mbox{lgamma}(\mbox{real}(x))$, $x$ μΥпؿ\\ %lgamma(x)@Ǥ@$lgamma ( roman real (x))$, $x$ μΥпؿ ؿ `lgamma(x)` ϰμΥ޴ؿͤμп֤ͤޤ ʣǿξ硢̵뤵ޤ 4 log ?expressions functions log ?log #log(x) & Ǥ & $\log_{e} x$, $x$ μп ( $e$) \\ %log(x)@Ǥ@$ln~x$, $x$ μп ( $e$) ؿ `log(x)` ϰμп ( `e`) ֤ͤޤʲ: `log10` 4 log10 ?expressions functions log10 ?log10 #log10(x) & Ǥ & $\log_{10} x$, $x$ п ( $10$) \\ %log10(x)@Ǥ@${log sub 10}~x$, $x$ п ( $10$) ؿ `log10(x)` ϰп ( 10) ֤ޤ 4 norm ?expressions functions norm ?norm #norm(x) & Ǥ & $x$ μʬ (ʬ) ؿ \\ %norm(x)@Ǥ@$norm(x)$, $x$ μʬ (ʬ) ؿ ؿ `norm(x)` ϡμФ롢ʬ (ʬ) ʬ ۴ؿ֤ͤޤʲ: `invnorm`, `erf`, `erfc` 4 rand ?expressions functions rand ?rand #rand(x) & & [0:1] ε \\ %rand(x)@@ [0:1] ε `rand(0)` [0:1] ε֤ܤϰʲ: `random` 4 real ?expressions functions real ?real #real(x) & Ǥ & $x$ μ \\ %real(x)@Ǥ@$x$ μ ؿ `real(x)` ϰμ֤ޤ 4 sgn ?expressions functions sgn ?sgn #sgn(x) & Ǥ & $x>0$ ʤ 1, $x<0$ ʤ -1, $x=0$ ʤ 0. $x$ ε̵ \\ %sgn(x)@Ǥ@$x>0$ ʤ 1, $x<0$ ʤ -1, $x=0$ ʤ 0. $x$ ε̵ ؿ `sgn(x)` ϰʤ 1 ʤ -1 0 ʤ 0 ֤ޤ ʣǿξ̵뤵ޤ 4 sin ?expressions functions sin ?sin #sin(x) & Ǥ & $\sin x$, $x$ Υ\\ %sin(x)@Ǥ@$sin~x$, $x$ Υ ؿ `sin(x)` ϰΥ () ֤ͤޤ`sin` `set angles` ˤäơ饸ޤ٤ΰդޤ 4 sinh ?expressions functions sinh ?sinh #sinh(x) & Ǥ & $\sinh x$, $x$ Υϥѥܥå \\ %sinh(x)@Ǥ@$sinh~x$, $x$ Υϥѥܥå ؿ `sinh(x)` ϰΥϥѥܥå֤ͤޤ`sinh` ϥ饸Ϳޤ 4 sqrt ?expressions functions sqrt ?sqrt #sqrt(x) & Ǥ & $\sqrt{x}$, $x$ ʿ\\ %sqrt(x)@Ǥ@$sqrt x $, $x$ ʿ ؿ `sqrt(x)` ϰʿ֤ͤޤ 4 tan ?expressions functions tan ?tan #tan(x) & Ǥ & $\tan x$, $x$ Υ󥸥 \\ %tan(x)@Ǥ@$tan~x$, $x$ Υ󥸥 ؿ `tan(x)` ϰΥ󥸥 () ֤ͤޤ`tan` `set angles` ˤäơ饸ޤ٤ΰդޤ 4 tanh ?expressions functions tanh ?tanh #tanh(x) & Ǥ & $\tanh x$, $x$ Υϥѥܥå󥸥\\ %tanh(x)@Ǥ@$tanh~x$, $x$ Υϥѥܥå󥸥 ؿ `tanh(x)` ϰΥϥѥܥå󥸥Ȥ֤ͤޤ `tanh` ΰϥ饸Ϳޤ 4 voigt ?expressions functions voigt ?voigt #voigt(x,y) & ¿ & Voigt/Faddeeva ؿ $\frac{y}{\pi} \int{\frac{exp(t^2)}{(x-t)^2+y^2}}dt$ \\ %voigt(x,y)@¿@ؿȥĴؿξߤ ؿ `voigt(x,y)` ϡڥȥϤǻѤ Voigt/Faddeeva ؿ ֤ޤθ 1/10^4 Ǥ #\hline \end{longtable} #%% begin dummy tabular because the @end processing wants to end one #\begin{tabular}{|ccl|} @end table ^<!-- INCLUDE_NEXT_TABLE --> @start table #\begin{tabular}{|ccl|} \hline #\multicolumn{3}{|c|}{ʸؿ} \\ \hline \hline #ؿ & & ֤ \\ \hline %c c l . %ؿ@@֤ %_ 4 gprintf ?expressions functions gprintf #gprintf("format",x,...) & Ǥ & gnuplot ν񼰲ϴŬѤ̤ʸ \\ %gprintf("format",x,...)@Ǥ@gnuplot ν񼰲ϴŬѤ̤ʸ \\ `gprintf("format",x)` ϡgnuplot ȼν񼰻Ҥ˰Ĥѿ x Ŭ Ѥη̤ʸ֤ޤɸŪ C 񼰻ҤȤ ϡ `sprintf("format",x)` Ȥɬפޤ ʲ: `format specifiers` 4 sprintf ?expressions functions sprintf ?sprintf #sprintf("format",x,...) & ʣ & C sprintf ֤ʸ \\ %sprintf("format",x,...)@ʣ@C sprintf ֤ʸ \\ `sprintf("format",var1,var2,...)` ɸŪ C ν񼰻Ҥʣ ĤΰŬѤη̤ʸ֤ޤgnuplot ȼν񼰻 Ȥϡ `gprintf()` Ѥɬפޤ sprintf ν񼰻Ҥ˴ؤܤˤĤƤϡɸŪ C ܤunix sprintf man ڡ򻲾ȤƤ 4 strlen ?expressions functions strlen ?strlen #strlen("string") & ʸ & Хñ̤ǤʸĹ () \\ %strlen("string")@ʸ@Хñ̤ǤʸĹ () `strlen("string")` ϡХñ̤ǤʸĹ֤ޤߤΥ ɡǥ󥰤¿Хʸ򥵥ݡȤƤСͤʸʸ 礭ʤǤ礦 4 strstrt ?expressions functions strstrt ?strstrt #strstrt("string","key") & ʸ & ʬʸ "key" Ƭ\\ %strstrt("string","key")@ʸ@ʬʸ "key" Ƭ `strstrt("string","key")` ϡʸ "key" "string" õ 줬Ƭ֤֤ޤ"key" Ĥʤä 0 ֤ ޤC 饤֥ strstr ؿ˻ƤޤʸؤΥݥ󥿤 strstr Ȥϰ㤤Ǥΰ֤֤ޤ㤨С strstrt("hayneedlestack","needle") = 4 Ȥʤޤ 4 substr ?expressions functions substr ?substr =substring #substr("string",beg,end) & ʣ & ʸ "string"[beg:end] \\ %substr("string",beg,end)@ʣ@ʸ "string"[beg:end] `substr("string",beg,end)` ϡʸ beg end ܤޤǤʸ ʤʸ֤ޤϡ"string"[beg:end] ȤȤۤƱ Ǥϥץ beg, end άǤޤ 4 strftime ?expressions functions strftime ?strftime #strftime("timeformat",t) & Ǥ & gnuplot ˤϷ̤ʸ \\ %strftime("timeformat",t)@Ǥ@gnuplot ˤϷ̤ʸ `strftime("timeformat",t)` ϡ2000 ǯÿˤ t ˡ 񼰻 timeformat ŬѤޤ ʲ: `time_specifiers`, `strptime` 4 strptime ?expressions functions strptime ?strptime #strptime("timeformat",s) & ʸ & ʸ s Ѵ 2000 ǯÿ \\ %strptime("timeformat",s)@ʸ@ʸ s Ѵ 2000 ǯÿ `strptime("timeformat",s)` 񼰻 timeformat Ȥäʸ s ɤ߹ǡ 2000 ǯÿѴޤ ʲ: `time_specifiers`, `strftime` 4 system ?expressions functions system =system #system("command") & ʸ & 륳ޥɤνϤʸ\\ %system("command")@ʸ@륳ޥɤνϤʸ `system("command")` ϡɸŪʥѤ "command" ¹Ԥ ɸϤؤʸʸѿȤ֤ޤֺǸβ԰Ĥ̵ 뤵ޤ ϡ'f(x) = real(system(sprintf("somecommand %f", x)))' Τ褦ˤ ơؿνϤ gnuplot ץ˼ΤѤǤޤ 4 word ?expressions functions word ?word =word #word("string",n) & ʸ, & ʸ "string" n ܤñ \\ %word("string",n)@ʸ, @ʸ "string" n ܤñ `word("string",n)` ʸ string n ܤñʸ֤ޤ `word("one two three",2)` ʸ "two" ֤ޤ 4 words ?expressions functions words ?words =words #words("string") & ʸ & ʸ "string" ñ \\ %words("string")@ʸ@ʸ "string" ñ `words("string")` ʸ string ñ֤ޤ㤨 `words(" a b c d")` 4 ֤ޤ @end table ^<!-- INCLUDE_NEXT_TABLE --> @start table #\begin{tabular}{|ccl|} \hline #\multicolumn{3}{|c|}{¾ {\bf gnuplot} δؿ} \\ \hline \hline #ؿ & & ֤ \\ \hline %c c l . %ؿ@@֤ %_ 4 column ?expressions functions column ?column #column(x) & & ǡե $x$ \\ %column(x)@@ ǡե $x$ #column(x) & ʸ & ǡե $x$ \\ %column(x)@ʸ@ ǡե $x$ `column(x)` fit 뤤ϥǡեץåȤǤ `using` ν οΰȤƤΤ߻Ȥޤ $x$ ܤƤͤȤɾ ޤʲ: `plot datafile using` 4 columnhead ?expressions functions columnhead ?columnhead #columnhead(x) & & ǡեκǽ $x$ ʸ \\ %columnhead(x)@@ ǡեκǽ $x$ ʸ `columnhead(x)` ϡΤƤϤ (fit) κݤ `using` ο Ȥơ뤤ϥǡեǤΤ줫ΤߤǻȤޤϡ ǡκǽιԤ x ܤƤޤʸɾޤʲ: `plot datafile using` 4 defined ?expressions functions defined ?defined #defined(X) & ѿ̾ & [侩] X Ƥ 1, Ǥʤ 0\\ %defined(X)@ѿ̾@ [侩] X Ƥ 1, Ǥʤ 0 `defined(X)` [侩] ϡX Ƥ 1Ǥʤ 0 ֤ޤ 4 exists ?expressions functions exists ?exists #exists("X") & ʸ & ѿ̾ X Ƥ 1, Ǥʤ 0\\ %exists("X")@ʸ@ ѿ̾ X Ƥ 1, Ǥʤ 0 exists() ΰʸޤʸѿǤʸ󤬡 Ƥѿ̾äƤ 1 򡢤Ǥʤ 0 ֤ޤ 4 stringcolumn ?expressions functions stringcolumn ?stringcolumn ?expressions functions strcol ?strcol #stringcolumn(x) & ʸ & ʸȤƤ $x$ ܤ \\ %stringcolumn(x)@ʸ@ ʸȤƤ $x$ ܤ `stringcolumn(x)` fit 뤤ϥǡեץåȤǤ `using` οΰȤƤΤ߻Ȥޤ $x$ ܤƤʸ Ȥ֤ޤʲ: `plot datafile using` 4 timecolumn ?expressions functions timecolumn ?timecolumn #timecolumn(x) & & ǡե $x$ ܤǡ \\ %timecolumn(x)@@ ǡե $x$ ܤǡ `timecolumn(x)` fit 뤤ϥǡեץåȤǤ `using` οΰȤƤΤ߻Ȥޤʲ: `plot datafile using` ϡλꤷ󤫤ϤޤǡǡͤȤɤߡ gnuplot ɽǤ "2000 ǯÿ" ֤ޤ Τ `timefmt` ʸ򸫤Ĥ뤿ᡢ`timecolumn` Ϥ Ʊֹ `using` õޤ⤷줬Ĥä顢 λоݤȤʤ뼴 `timefmt` ʸ󤬻ѤޤĤʤ ä顢`timecolumn` ϥǥեȤǤ x `timefmt` ʸ ޤ 4 tm_hour ?expressions tm_hour ?tm_hour #tm\_hour(x) & & \\ %tm_hour(x)@@ ؿ `tm_hour` ϰ 2000 ǯ 1 1 ÿȲᤷ줬 β (0--23 ϰϤ) Ǥ뤫򡢼¿Ȥ֤ޤ 4 tm_mday ?expressions tm_mday ?tm_mday #tm\_mday(x) & & \\ %tm_mday(x)@@ ؿ `tm_mday` ϰ 2000 ǯ 1 1 ÿȲᤷ줬 ηβ (1--31 ϰϤ) Ǥ뤫򡢼¿Ȥ֤ޤ 4 tm_min ?expressions tm_min ?tm_min #tm\_min(x) & & ʬ \\ %tm_min(x)@@ʬ ؿ `tm_min` ϰ 2000 ǯ 1 1 ÿȲᤷ줬 βʬ (0--59 ϰϤ) Ǥ뤫򡢼¿Ȥ֤ޤ 4 tm_mon ?expressions tm_mon ?tm_mon #tm\_mon(x) & & \\ %tm_mon(x)@@ ؿ `tm_mon` ϰ 2000 ǯ 1 1 ÿȲᤷ줬 (0--11 ϰϤ) Ǥ뤫򡢼¿Ȥ֤ޤ 4 tm_sec ?expressions tm_sec ?tm_sec #tm\_sec(x) & & \\ %tm_sec(x)@@ ؿ `tm_sec` ϰ 2000 ǯ 1 1 ÿȲᤷ줬 β (0--59 ϰϤ) Ǥ뤫򡢼¿Ȥ֤ޤ 4 tm_wday ?expressions tm_wday ?tm_wday #tm\_wday(x) & & νβ \\ %tm_wday(x)@@νβ ؿ `tm_wday` ϰ 2000 ǯ 1 1 ÿȲᤷ줬 νβ (0--6 ϰϤ) Ǥ뤫򡢼¿Ȥ֤ޤ 4 tm_yday ?expressions tm_yday ?tm_yday #tm\_yday(x) & & ǯβ \\ %tm_yday(x)@@ǯβ ؿ `tm_yday` ϰ 2000 ǯ 1 1 ÿȲᤷ줬 ǯβ (1--366 ϰϤ) Ǥ뤫򡢼¿Ȥ֤ޤ 4 tm_year ?expressions tm_year ?tm_year #tm\_year(x) & & \\ %tm_year(x)@@ ؿ `tm_year` ϰ 2000 ǯ 1 1 ÿȲᤷ줬 ǯ () Ǥ뤫򡢼¿Ȥ֤ޤ 4 time ?expressions time ?time #time(x) & Ǥ & ߤΥƥ \\ %time(x)@Ǥ@ߤΥƥ ؿ `time` ϸߤΥƥ֤ޤͤ `strftime` ؿ ʸѴǤޤ`timecolumn` Ȥ߹碌Ū դΤˤȤޤηϤ줬֤Τꤷޤ ξ time() ϸߤλ 2000 ǯ 1 1 Ȥ ֤¿ (ޤʣǿ) ʤƱͤͤ¿Ȥ֤ޤ ʸʤСʸǤȤߤʤ񼰲줿ʸ 󶡤褦 `strftime` Ϥޤ 4 valid ?expressions functions valid ?valid #valid(x) & & ǡ $\mbox{column}(x)$ \\ %valid(x)@@ ǡ column($x$) `valid(x)` ϡǡ褫 fit ˤ `using` μǤȤ ޤ󡣰ʲ: `plot datafile using` #value("name") & ʸ & ̾ name ѿθߤ\\ %value("name")@ʸ@ ̾ name ѿθߤ @end table 4 ʱʬ (elliptic integrals) ?expressions functions elliptic integrals ?elliptic integrals =elliptic integrals ؿ `EllipticK(k)` ϡ 1 ﴰʱʬʤؿ `(1-(k*sin(p))**2)**(-0.5)` 0 /2 ޤǤϰϤιʬͤ ޤ`k` -1 1 Ǥ (ξüϴޤޤʤ) ؿ `EllipticE(k)` ϡ 2 ﴰʱʬʤؿ `(1-(k*sin(p))**2)**0.5` 0 /2 ޤǤϰϤιʬ֤ͤ ޤ`k` -1 1 Ǥ (ξüޤ) ؿ `EllipticPi(n,k)` ϡ 3 ﴰʱʬʤؿ `(1-(k*sin(p))**2)**(-0.5)/(1-n*sin(p)**2)` 0 /2 ޤǤϰϤ ʬ֤ͤޤѥ᡼ `n` 1 꾮`k` -1 1 δ (ξüϴޤޤʤ) ǤʤФޤꡢ٤Ƥ `k` Ф EllipticPi(0,k) == EllipticK(k) Ǥ뤳ȤդƤ 4 (random) ?expressions random ?random =rand ؿ `rand()` 0 1 δ֤εޤϰʲ 르ꥺѤƤޤ: P. L'Ecuyer and S. Cote, "Implementing a random number package with splitting facilities", ACM Transactions on Mathematical Software, 17:98-111 (1991). rand(0) ˻ 2 Ĥ 32bit μ (seed) θߤͤ [0:1] ε֤ͤ rand(-1) 2 Ĥμͤɸ᤹ͤ rand(x) 0 < x < 2^31-1 ʤξ x ꤹ rand({x,y}) 0 < x,y < 2^31-1 ʤ seed1 x seed2 y ꤹ 4 value ?expressions functions value ?value A 桼ѿ̾ǤСB = value("A") ϻ¾ B = A ƱǤϡѿ̾Ȥʸѿ˼Ƥͭ ѤǤʲ: `user-defined variables`ϡѿ̾ǡե 뤫ɤ߼뤳ȤǽˤޤǤ硢value() Ϥ ο֤ͤޤʸǡƤѿб ʤ硢value() NaN ֤ޤ 3 黻 (Operators) ?expressions operators ?operators `gnuplot` α黻ҤϡC α黻ҤȤۤƱǤäդʤ Ƥα黻Ҥ¿ʣǿΰ뤳ȤǤޤޤ FORTRAN ǻȤ ** (߾) 黻Ҥ⥵ݡȤƤޤ 黻ɾνѹˤϤäȤޤ 4 ñ黻 (Unary) ?expressions operators unary ?operators unary ?unary ʲϡñ黻ҤȤλˡΰǤ: @start table - ޤ÷ƥȷ - -a ޥʥ + +a ץ饹 (⤷ʤ) ~ ~a * 1 (ӥåȿž) ! !a * Ū ! a! * $ $3 * `using` Ǥΰ/ =factorial =negation =one's complement =operator precedence #\begin{tabular}{|ccl|} \hline #\multicolumn{3}{|c|}{ñ黻}\\ \hline \hline # & & \\ \hline #\verb@-@ & \verb@-a@ & ޥʥ \\ #\verb@+@ & \verb@+a@ & ץ饹 (⤷ʤ) \\ #\verb@~@ & \verb@~a@ & * 1 (ӥåȿž) \\ #\verb@!@ & \verb@!a@ & * Ū \\ #\verb@!@ & \verb@a!@ & * \\ #\verb@$@ & \verb@$3@ & * `using` Ǥΰ/ \\ C ugly hack: doc2ms uses $ as delimiter for eqn's so it doesn't seem to C be able to print them. So we have to typeset this table without using C eqn (at least that's the only solution I found, without any real docs C on *roff and eqn C First, terminate the table doc2ms.c already started: %.TE C ... then turn off eqn delimiters: %.EQ %delim off %.EN C ... and restart the table: %.TS %center box tab (@) ; %c c l . %@@ %_ %-@-a@ޥʥ %+@+a@ץ饹 (⤷ʤ) %~@~a@* 1 (ӥåȿž) %!@!a@* Ū %!@a!@* %$@$3@* `using` Ǥΰ/ %_ @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="center"> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th></th> <th></th> <th></th></tr> ^</thead> ^<tbody> ^<tr> <td><tt>-</tt></td> <td><tt>-a</tt></td> <td>ޥʥ</td></tr> ^<tr> <td><tt>+</tt></td> <td><tt>+a</tt></td> <td>ץ饹 (⤷ʤ)</td></tr> ^<tr> <td><tt>~</tt></td> <td><tt>~a</tt></td> <td>* 1 (ӥåȿž)</td></tr> ^<tr> <td><tt>!</tt></td> <td><tt>!a</tt></td> <td>* Ū</td></tr> ^<tr> <td><tt>!</tt></td> <td><tt>a!</tt></td> <td>* </td></tr> ^<tr> <td><tt>$</tt></td> <td><tt>$3</tt></td> <td>* `using` Ǥΰ/</td></tr> ^</tbody> ^</table> (*) ΤĤ黻ҤΰǤʤФʤޤ 黻Ҥ̤ͥ Fortran C ƱǤθƱ͡黻ɾ Ѥ뤿ˤäȤޤä -2**2 = -4 ǡ (-2)**2 = 4 Ǥ 黻Ҥϡ礭֤ͤ褦˼¿֤ޤ 4 黻 (Binary) ?expressions operators binary ?operators binary ʲϡ黻ҤȤλˡΰǤ: @start table - ޤ÷ƥȷ ** a**b ߾ * a*b / a/b % a%b * ; + a+b - a-b == a==b != a!=b ʤ < a<b 꾮 <= a<=b ʲ > a>b 礭 >= a>=b ʾ & a&b * ӥå (AND) ^ a^b * ӥå¾ (XOR) | a|b * ӥå (OR) && a&&b * Ū AND || a||b * Ū OR = a = b , (a,b) ߼ɾ . A.B ʸϢ eq A eq B ʸ ne A ne B ʸʤ =bitwise operators =string operators =modulo =exponentiation #\begin{tabular}{|ccl|} \hline #\multicolumn{3}{|c|}{黻} \\ \hline \hline # & & \\ \hline #\verb~**~ & \verb~a**b~ & ߾\\ #\verb~*~ & \verb~a*b~ & \\ #\verb~/~ & \verb~a/b~ & \\ #\verb~%~ & \verb~a%b~ & * ;\\ #\verb~+~ & \verb~a+b~ & \\ #\verb~-~ & \verb~a-b~ & \\ #\verb~==~ & \verb~a==b~ & \\ #\verb~!=~ & \verb~a!=b~ & ʤ\\ #\verb~<~ & \verb~a<b~ & 꾮\\ #\verb~<=~ & \verb~a<=b~ & ʲ\\ #\verb~>~ & \verb~a>b~ & 礭\\ #\verb~>=~ & \verb~a>=b~ & ʾ\\ #\verb~&~ & \verb~a&b~ & * ӥå (AND)\\ #\verb~^~ & \verb~a^b~ & * ӥå¾Ū (XOR)\\ #\verb~|~ & \verb~a|b~ & * ӥå (OR)\\ #\verb~&&~ & \verb~a&&b~ & * Ū AND\\ #\verb~||~ & \verb~a||b~ & * Ū OR\\ #\verb~=~ & \verb~a = b~ & \\ #\verb~,~ & \verb~(a,b)~ & ߼ɾ\\ #\verb~.~ & \verb~A.B~ & ʸϢ\\ #\verb~eq~ & \verb~A eq B~ & ʸ\\ #\verb~ne~ & \verb~A ne B~ & ʸʤ\\ %c c l . %@@ %_ %**@a**b@߾ %*@a*b@ %/@a/b@ %%@a%b@* ; %+@a+b@ %-@a-b@ %==@a==b@ %!=@a!=b@ʤ %<@a<b@꾮 %<=@a<=b@ʲ %>@a>b@礭 %>=@a>=b@ʾ %&@a&b@* ӥå (AND) %^@a^b@* ӥå¾Ū (XOR) %|@a|b@* ӥå (OR) %&&@a&&b@* Ū AND %||@a||b@* Ū OR %=@a = b@ %,@(a,b)@߼ɾ %.@a.b@ʸϢ %eq@A eq B@ʸ %ne@A ne B@ʸʤ @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="center"> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th></th> <th></th> <th></th></tr> ^</thead> ^<tbody> ^<tr> <td><tt>**</tt></td> <td><tt>a**b</tt></td> <td>߾</td></tr> ^<tr> <td><tt>*</tt></td> <td><tt>a*b</tt></td> <td></td></tr> ^<tr> <td><tt>/</tt></td> <td><tt>a/b</tt></td> <td></td></tr> ^<tr> <td><tt>%</tt></td> <td><tt>a%b</tt></td> <td>* ;</td></tr> ^<tr> <td><tt>+</tt></td> <td><tt>a+b</tt></td> <td></td></tr> ^<tr> <td><tt>-</tt></td> <td><tt>a-b</tt></td> <td></td></tr> ^<tr> <td><tt>==</tt></td> <td><tt>a==b</tt></td> <td></td></tr> ^<tr> <td><tt>!=</tt></td> <td><tt>a!=b</tt></td> <td>ʤ</td></tr> ^<tr> <td><tt><</tt></td> <td><tt>a<b</tt></td> <td>꾮</td></tr> ^<tr> <td><tt><=</tt></td> <td><tt>a<=b</tt></td> <td>ʲ</td></tr> ^<tr> <td><tt>></tt></td> <td><tt>a>b</tt></td> <td>礭</td></tr> ^<tr> <td><tt>>=</tt></td> <td><tt>a>=b</tt></td> <td>ʾ</td></tr> ^<tr> <td><tt>&</tt></td> <td><tt>a&b</tt></td> <td>* ӥå (AND)</td></tr> ^<tr> <td><tt>^</tt></td> <td><tt>a^b</tt></td> <td>* ӥå¾Ū (XOR)</td></tr> ^<tr> <td><tt>|</tt></td> <td><tt>a|b</tt></td> <td>* ӥå (OR)</td></tr> ^<tr> <td><tt>&&</tt></td> <td><tt>a&&b</tt></td> <td>* Ū AND</td></tr> ^<tr> <td><tt>||</tt></td> <td><tt>a||b</tt></td> <td>* Ū OR</td></tr> ^<tr> <td><tt>=</tt></td> <td><tt>a = b</tt></td> <td></td></tr> ^<tr> <td><tt>,</tt></td> <td><tt>(a,b)</tt></td> <td>߼ɾ</td></tr> ^<tr> <td><tt>.</tt></td> <td><tt>a.b</tt></td> <td>ʸϢ</td></tr> ^<tr> <td><tt>eq</tt></td> <td><tt>A eq B</tt></td> <td>ʸ</td></tr> ^<tr> <td><tt>ne</tt></td> <td><tt>A ne B</tt></td> <td>ʸʤ</td></tr> ^</tbody> ^</table> (*) ΤĤ黻ҤΰǤʤФʤޤ ʸ A,B ϱ黻Ҥʸ׵᤹뤳Ȥ̣ޤ 黻Ҥ AND (&&) OR (||) C Ʊͤɬ׺Ǿ¤ɾ ޤ󡣤ʤ`&&` 2 ϡ 1 ʤɾޤ 󤷡`||` 2 ϡ 1 ʤɾޤ ߼ɾ (,) ϡåǤΤɾ졢鱦ؽ˼¹Ԥ뤳 ݾڤ졢Ǥⱦμ֤ͤޤ 4 黻 (Ternary) ?expressions operators ternary ?operators ternary ?ternary Ĥ黻Ҥޤ: @start table - ޤ÷ƥȷ ?: a?b:c 黻 #\begin{tabular}{|ccl|} \hline #\multicolumn{3}{|c|}{黻} \\ \hline \hline # & & \\ \hline #\verb~?:~ & \verb~a?b:c~ & 黻\\ %c c l . %@@ %_ %?:@a?b:c@* 黻 @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="center"> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th></th> <th></th> <th></th></tr> ^</thead> ^<tbody> ^<tr> <td><tt>?:</tt></td> <td><tt>a?b:c</tt></td> <td>* 黻</td></tr> ^</tbody> ^</table> 黻Ҥ C ΤΤƱƯ򤷤ޤǽΰ (a) Ǥʤ Фޤ󡣤ͤɾ졢줬 (Ǥʤ) ʤ 2 ܤ (b) ɾ줽֤ͤ졢Ǥʤ 3 ܤΰ (c) ɾ졢֤ͤޤ 黻ҤϡʬŪ줿ؿ䡢郎줿ˤΤ 褹롢ȤäȤԤʤͭѤǤ : 0 <= x < 1 Ǥ sin(x) ˡ1 <= x < 2 Ǥ 1/x ơʳ x Ǥʤؿ: f(x) = 0<=x && x<1 ? sin(x) : 1<=x && x<2 ? 1/x : 1/0 plot f(x) `gnuplot` ̤ͤФƤϲɽˤ̵뤹ΤǡǸξ δؿ (1/0) 򲿤ϤʤȤդƤޤ ؿ襹뤬 lines () ξ硢Ϣ³ (x=1) ν Ϣ³ؿȤФƤޤȤˤդƤϢ ³ˤʤ褦ˤˤϡؿ 2 Ĥʬ줾ʬƤ ( Τ褦ʾ硢޲ѿؿȤΤǤ) ե 'file' Υǡǡ4 ܤΥǡǤʤȤ1 ܤ ǡ˴ؤ 2 ܤ 3 ܤΥǡʿͤ: plot 'file' using 1:( $4<0 ? 1/0 : ($2+$3)/2 ) `using` ν񼰤˴ؤƤϡʲ: `plot datafile using` 3 (Summation) ?expressions operators summation ?operators summation ?summation ¤μϡʲηɽޤ: sum [<var> = <start> : <end>] <expression> <var> ϡ<start> <end> ޤǤͤ˼ѿȤ ưޤγͤФơ <expression> ͤͤɲä졢 ǽŪʹͤ¤μͤȤʤޤ : print sum [i=1:10] i 55. # ʲ plot 'data' using 1:($2+$3+$4+$5+$6+...) Ʊ plot 'data' using 1 : (sum [col=2:MAXCOL] column(col)) <expression> ϡɬѿ <var> ޤɬפϤޤ<start> <end> ѿͤǻǤޤͤưŪѹ뤳 ϤǤޤ󡣤ǤʤѤޤ<end> <start> ϡ¤ͤ 0 Ȥʤޤ 3 Ѥѿ (Gnuplot-defined variables) ?gnuplot-defined variables ?GPVAL gnuplot ϡץθߤ֤ľȿǤ褦ɤ ФѤѿ򤤤ĤäƤޤѿ̾ϡ㤨 GPVAL_TERM, GPVAL_X_MIN, GPVAL_X_MAX, GPVAL_Y_MIN Τ褦 "GPVAL_" Ϥޤޤ餹٤ƤΰȤͤ򸫤ˤϡ`show variables all` ϤƤΥѥ᡼˴Ϣ (ϰϡп 뤫) ϡ `set` ΤǤϤʤǸ褵줿Τ ޤ : [X,Y] Υ꡼Ǥκɸ׻ˡ GRAPH_X = (X - GPVAL_X_MIN) / (GPVAL_X_MAX - GPVAL_X_MIN) GRAPH_Y = (Y - GPVAL_Y_MIN) / (GPVAL_Y_MAX - GPVAL_Y_MIN) SCREEN_X = GPVAL_TERM_XMIN + GRAPH_X * (GPVAL_TERM_XMAX - GPVAL_TERM_XMIN) SCREEN_Y = GPVAL_TERM_YMIN + GRAPH_Y * (GPVAL_TERM_YMAX - GPVAL_TERM_YMIN) FRAC_X = SCREEN_X / GPVAL_TERM_XSIZE FRAC_Y = SCREEN_Y / GPVAL_TERM_YSIZE =errors =error state ɤ߽Фѿ GPVAL_ERRNO ϡǤդ gnuplot ޥɤ륨顼 ᤯äƤޤä 0 Ǥʤͤ˥åȤ졢ľΥ顼 åʸѿ GPVAL_ERRMSG ¸ޤGPVAL_ERRNO GPVAL_ERRMSG ϡޥ `reset errors` ȤäƥꥢǤޤ `mouse` ǽȤ÷Ϸϡ"MOUSE_" ǻϤޤɤ߽Ф ѿ򤤤ĤäƤޤܺ٤ϡʲ: `mouse variables` `fit` ǽϡ"FIT_" ǻϤޤ뤤ĤѿѤޤΤǡΤ褦 ̾ȤΤ򤱤٤Ǥ礦`fit` λѤ˺ݤƤϡ "FIT_LIMIT" Τ褦˺򤹤ɬפ褦ѿϤޤ `set fit errorvariables` ȤȳƤϤѿΥ顼ϡΥѥ ̾ "_err" ɲäѿ¸ޤܺ٤ϡʲ: `fit` ʲ⻲: `user-defined variables`, `reset errors`, `mouse variables`, `fit` 3 桼ѿȴؿ (User-defined) ?expressions user-defined ?user-defined variables ?user-defined ?variables ʥ桼ѿ 1 Ĥ 12 ĤޤǤΰĥ桼ؿ ǤդξȤäꤹ뤳ȤǤޤ `plot` ޥ ɾǤǽǤ 桼ؿ: <func-name>( <dummy1> {,<dummy2>} ... {,<dummy12>} ) = <expression> <expression> ϲѿ <dummy1> <dummy12> ɽǤ 桼ѿ: <variable-name> = <constant-expression> : w = 2 q = floor(tan(pi/2 - 0.1)) f(x) = sin(w*x) sinc(x) = sin(pi*x)/(pi*x) delta(t) = (t == 0) ramp(t) = (t > 0) ? t : 0 min(a,b) = (a < b) ? a : b comb(n,k) = n!/(k!*(n-k)!) len3d(x,y,z) = sqrt(x*x+y*y+z*z) plot f(x) = sin(x*a), a = 0.2, f(x), a = 0.4, f(x) file = "mydata.inp" file(n) = sprintf("run_%d.dat",n) Ǹ 2 Ԥϡ桼ʸѿȡ桼ʸؿ̣ Ƥޤ =NaN =pi ѿ `pi` (3.14159...) `NaN` (IEEE ("Not a Number")) Ϥ餫 Ƥޤ餬ɬפʤС¾ΤΤ˺뤳Ȥ ǽǤʲΤ褦ˤƸͤ뤳ȤǤޤ: NaN = GPVAL_NaN pi = GPVAL_pi ¾ˤ⤤Ĥѿ㤨÷ϷǤΥޥƤϤ (fit) ʤɤ gnuplot ư֤˱ޤܺ٤ ʲ: `gnuplot-defined variables` ѿ V Ƥ뤫ɤϡ exists("V") ǥå ޤ: a = 10 if (exists("a")) print "a is defined" if (!exists("b")) print "b is not defined" ѿ̾ؿ̾̿̾§ϡΥץߥ󥰸ƱǡƬϥ ե٥åȤǡθʸϥե٥åȡ"_" Ȥޤ ƴؿϡ'GPFUN_' ȤƬ̤ʸѿȤ ѤǤޤ : set label GPFUN_sinc at graph .05,.95 ʲ: `show functions`, `functions`, `gnuplot-defined variables`, `macros`, `value` 2 ե ?fonts gnuplot 켫ȤˤϤɤʥեȤޤޤƤϤ餺եȽ äƤǡκᤷȤ˽Ϸ˰ۤʤޤ ǤϡʣνϷŬѤեȵˤĤޤ 夲ΰʳνϷǤΥեȤλѤ˴ؤƤϡνϷΥ Ȥ򻲾ȤƤ 3 cairo (pdfcairo, pngcairo, epscairo, wxt Ϸ) ?fonts cairo =fonts =pdf =png =wxt ߤޤ󡣤ΥϤޤǤƤޤ νϷϡեȤθȥ˳ fontconfig ġ Ѥޤ ^ <a href="http://fontconfig.org/fontconfig-user.html"> fontconfig 桼ޥ˥奢 ^ </a> 򻲾ȤƤϡgnuplot ǰŪ̾䥵ǥեȤ ׵᤹뤳Ȥǽˤɬפʤ fontconfig ƱΥեȤѤ 뤳ȤǤΤǡ̾ϤǽʬǤ礦ʲϡ¿ʬⵡ ǽޤ: set term pdfcairo font "sans,12" set term pdfcairo font "Times,12" set term pdfcairo font "Times-New-Roman,12" 3 gd (png, gif, jpeg terminals) ?gd ?fonts gd =fonts =png =jpeg =gif png, gif, jpeg ϷΥեȽϡ饤֥ libgd ˤä Ԥޤlibgd ϡ 5 δܥեȤľ󶡤Ƥޤ: `tiny` (5x8 ԥ), `small` (6x12 ԥ), `medium`, (7x13 Bold), `large` (8x16), `giant` (9x15 ԥ)ΥեȤ礭 žꤹ뤳ȤϤǤޤ󡣻Ѥݤϡ`font`  ɤ˾Υɤꤷޤ: set term png tiny ¿Υƥǡlibgd Adobe Type 1 ե (*.pfa) TrueType եȤؤΥ󶡤ޤξեȼȤ̾ǤϤʤ եȥե̾"<face> {,<pointsize>}" ηͿޤ ǡ<face> ϥեȥեΥեѥ̾ޤϴĶѿ GDFONTPATH ǻؼǥ쥯ȥΰĤΥե̾Ƭʬ Τ줫Ǥäơ'set term png font "Face"' ϡ <ǥ쥯ȥ>/Face.ttf <ǥ쥯ȥ>/Face.pfa Ȥե ̾ΥեȤõȤޤ㤨СGDFONTPATH `/usr/local/fonts/ttf:/usr/local/fonts/pfa` ޤޤƤϡʲ Υޥɤ 2 ĤĤϤƱȤˤʤޤ: set term png font "arial" set term png font "/usr/local/fonts/ttf/arial.ttf" set term png font "Helvetica" set term png font "/usr/local/fonts/pfa/Helvetica.pfa" ǥեȤΥեȥƱ˻ꤹˤ: set term png font "arial,11" TrueType Adobe Type 1 եȤϡ礭ѹžǽ "set term" ޥɤǥեȤꤷʤä硢gnuplot ̤ ǥեȥեȤ꤬뤫ɤĴ٤뤿˴Ķѿ GNUPLOT_DEFAULT_GDFONT 򻲾Ȥޤ 3 postscript (ץ벽 postscript *.eps ) ?fonts postscript =fonts =postscript =eps PostScript եȽϡץ󥿤ɽեȤԤޤ⤷ Υԥ塼˥եȤڤʤƤ⡢gnuplot PostScript ե롢ޤϥץ벽 PostScript (*.eps) եǤޤ gnuplot ñ˽ϥե˥եȤ̾Ȥǡץ ɽեȤ̾եȤ򸫤Ĥ뤫뤳Ȥꤷ ޤ PostScript ץ󥿤ɽեȤϤ٤ơɸŪ Adobe եȥå `Times-Roman`, `Helvetica`, `Courier`, `Symbol` ΤäƤϤǤ ¿ʬ¾ˤ¿ΥեȤȤ褦ˤʤäƤȻפޤ ΥեȥåȤϤʤΥƥץ󥿤˰¸ޤ gnuplot ϡΤޤ󤷵ˤ⤷ޤgnuplot *.ps *.eps Ϥϡʤ׵ᤷե̾ñ˻äƤǤ äơ set term postscript eps font "Times-Roman,12" ϡ٤ƤΥץ󥿤ɽեȤŬڤʽϤޤ set term postscript eps font "Garamond-Premier-Pro-Italic" ϡ PostScript ޤϥեޤüʥ Ȥ򻲾ȤޤΤǡΥץ󥿤ɽեȤ׵ᤷ ΥեȤɽǤʤǤ礦ξ̤ʥեȤѤ ޤ ꤷեȤϥեǡɤʥץ󥿤 ⤽Ȥ褦ˤ뤳ȤǽǤˤϡʤΥƥŬ ʥեȵҥե뤬뤳ȤɬפȤʤޤˡǥեȤ 硢Υ饤󥹤ɬפȤʤեȥե⤢뤳Ȥ դƤܺ٤ˤĤƤϡʲ: `postscript fontfile` 2 إפѸ (Glossary) ?glossary ΥɥΤϤäơѸ˴ؤΰݻͤƤ λߤϴˤƤޤ󡣤 `gnuplot` 򤫤ƿʲƤ褦ˡޥɤ䥭ɤ̾⤽Τ褦ʴ ӽ뤫Τ褦˺ѤƤ뤫ǤǤϡ ɤΤĤɤΤ褦˻ȤƤ뤫ޤ "ڡ (page)""ɽ (screen)""Х (canvas)" ϡ `gnuplot` ǽΰΤؤޤǥȥåפǤϤϥ ɥΤؤץåǤϡλΡsvga ⡼ɤǤϡ ꡼Τؤޤ ɽ̤ϡġޤϤʾ " (plot)" ޤߤޤ ϰĤβɸȰĤνĺɸޤ; (margin) ˽񤫤ʸ (text) Ʊ͡ϼºݤˤξɽƤ ɬפϤޤ ϰĤ "" ޤߤޤդϰĤβɸȰĤν ɸޤϼºݤˤξɽƤɬפϤ դϰĤޤϤʾ " (line)" ޤߤޤϰĤδ ޤϥǡǤѸ "line" 襹ȤƤȤޤ ˤѸ "ʸΰ (a line of text)" Τ褦˻Ȥ뤳 ⤢ޤ¿ʬʸ̮餽϶̤ǤǤ礦 ĤΥվʣζϤ줾̾ޤ̾ϡζ ɽ˻Ȥ襹ΥץȤȤ "() key" ˰ ɽޤϡˤ "(ɽ) legend" ȤƤФޤ Ѹ "ȥ (title)" `gnuplot` Ǥʣΰ̣ǻȤޤ ɥȤǤϤ̤뤿ˡƻȤ " (plot)" " (line)"" (key)" ƬˤĤ⤷ޤ 2 Υդ 4 ĤޤǤθФդ뼴ĤȤǤޤ 4 Ĥμ̾Ϥ줾졢βζ˱褦Ǥ "x" ζ˱褦 "y"ζ˱褦 "x2"ζ˱褦 "y2" ʤäƤޤʲ: `axes` 3 Υդ 3 ĤޤǤθФդ뼴 (`axes`) "x","y","z" ĤȤǤޤɤμ˴ؤƤ⤽줬վǤɤ˽񤫤 뤫Ҥ٤뤳ȤϤǤޤ󡣤ϡ`set view` ǥդ򸫤 ѹǤ뤫Ǥ ǡե˴ؤǤϡѸ " (record)" 褷ե ΰԤʸ󡢤ʤʸʸƱΤδ֤ʸ󡢤ؤ Τ˻Ȥޤ" (point)" ϹԤФĤΥǡǤ"ǡ ֥å (datablock)" ϡԤǶڤ줿Ϣ³ʣιԤʤ νǤǡեε "line" Ȥϡ ϥǡ֥åʬؤޤ (: ܸǤϤ˽񤫤Ƥ褦ѸϹθ ƤϤ餺äƺǽޤ̩ˤϸʸ Ȥ٤Ǥ礦) 2  (linetypes) ?linetypes ?colors gnuplot γƽϷ " (linetype)" 򤢤ѰդƤޤ Ͽ/Υѥ󡢤ޤϿ/ȹ礻ǰ㤤 ɽƤޤνϷΥǥեȤϡνϷ ꤷ (`set terminal`) `test` ޥɤȯԤ뤳ȤdzǧǤ Ƥ뿧/ΥѥϤ٤ƤνϷƱ ǤȤݾڤϲ⤢ޤ󤬡 -1 ̤ƤνϷǡ Ǥ̤ɽ (̾Ϲ) μ̣Ƥޤޤ¿νϷ ǡطʿǤμ̣̤ "bgnd" ǧޤ ǥեȤ (linetype) °ϡŪեΤ줫 ˤäƺǽǤϡ٤Ƥ gnuplot 襳ޥɤǻѤ ο¾°򥫥ޥ뤳Ȥǽˤޤʲ: `set linetype` ǥեȤǤϡĤ襳ޥǤδؿǡե¤Ӥˤϡ ֤郎ƤޤΥǥեȤνϡؿǡե 롢ޤϤ¾Ǥ˸̤ꤹ뤳ȤǾ񤭤Ǥޤ : plot "foo", "bar" # 1, 2 2 ե plot sin(x) linetype 4 # Ϸ˰¸￧ 4 plot sin(x) lt -1 # =colors ¿νϷǡ桼Ǥ褦ˤʤäƤޤ Ū rgb (֡С) ꤹ뤫̾ߤ pm3d ѥå 򻲾Ȥ뿧ͤΤ줫ǹԤʤޤ : plot sin(x) lt rgb "violet" # gnuplot λĿ̾ΰ plot sin(x) lt rgb "#FF00FF" # Ū 16 RGB 3 plot sin(x) lt palette cb -45 # ߤΥѥåȤ cbrange # -45 б뿧 plot sin(x) lt palette frac 0.3 # ѥåȤб뾮 ʲ: `show colornames`, `set palette`, `cbrange` /Υѥ򥵥ݡȤϷǤϡǥեȤ/ ΥѥȿξƤޤν gnuplot ˤϡ/ ѥѹȤߤʤΤǡѥο Ȥ߹碌ϡˤѥ (linetype) ǥեȤο򥭡 `linecolor` (ά `lc`) Ǿ񤭤 ɬפޤ㤨Сpostscript ϷΥǥեȤ 3 Ǥʲ襳ޥɤƱѥ 3 ĤԤʤ ޤĤ (ǥե)Ĥ ( 1 Υǥեȿ)⤦ Ĥ϶⿧ˤʤޤ : set term postscript dashed color plot 'foo' lt 3, 'baz' lt 3 linecolor 1, 'bar' lt 3 lc rgb 'gold' 3 (colorspec) ?colorspec ?rgbcolor =colors ?lc ?linecolor ?tc ?textcolor ¿ΥޥɤǡŪʿλȤʤäꤹ뤳ȤǤ ޤϷ˰¸뿧ϡѤƤϷ RGB 顼 pm3d ѥåȤ򥵥ܡȤƤˤΤѲǽǤ : ... {linecolor | lc} {<colorspec> | <n>} ... {textcolor | tc} {<colorspec> | {linetype | lt} <n>} <colorspec> ϰʲηΤ줫Ǥ: rgbcolor "colorname" rgbcolor "#RRGGBB" rgbcolor variable # ϥե뤫ɤ߹ palette frac <val> # <val> 0 1 palette cb <value> # <val> cbrange ϰϤ palette z variable # ϥե뤫鿧ֹɤ߹ <n> ϡ (linetype) ֹ椬Ȥ̣ޤʲ: `test` "colorname" gnuplot ˻äƤ뿧̾ΤΰĤꤷ ޤͭ̾ΰ˴ؤƤϡʲ: `show colornames` "#RRGGBB" "#" θ 16 ¤٤ޤRRGGBB ϡ֡С οʬ̣줾 0 - 255 ϰϤοǤ㤨Сޥ () = Ǥ뤤 + Ǥ뤤ġʤΤǡ#FF00FF ɽ졢 16 ʿǡ(255 << 16) + (0 << 8) + (255) ̣Ƥޤ 顼ѥåȤȤϡʸۤǡñοͤο˳餫 ŤޤˤΤ褦 2 ĤбդϤޤ `palette frac` 0 1 ޤǤξͤ򡢥顼ѥåȤϰϤ դΤǡ`palette cb` ϡϰϤƱ顼ѥåȤس ƤΤǤʲ: `set cbrange`, `set colorbox`б դΤɤ餫ȤäơߤΥѥåȤӽФȤǤ "palette z" ϡʬǤ z ͤ򡢥ѥåȤбŤ Ƥ cbrange ϰϤбŤޤˤꡢ3 ζ ˱äƿ餫Ѳ뤳ȤǤޤϡ2 ǡ åͤɲäǡɤ߹ޤƿդΤˤȤޤ ( Ƥ 2 襹뤬ɲǧ櫓ǤϤޤ) 4 background color ?background ?bgnd ߤ¿νϷǥդطʿŪǤޤ̤ (linetype) `bgnd` Ϥο褷ޤ `bgnd` ϿȤƤǧ ޤ : # ʲϥХΰʬطʿǾ񤭤뤳ȤǾõޤ set term wxt background rgb "gray75" set object 1 rectangle from x0,y0 to x1,y1 fillstyle solid fillcolor bgnd # ʲ x ˱äָʤޤ plot 0 lt bgnd 4 linecolor variable ?linecolor variable ?lc variable ?textcolor variable ?tc variable `lc variable` ϡϥǡΰĤ󤫤ɤͤ (linetype) ֹȤƻȤ°뿧Ȥ褦ץ˻ؼޤ äƤϡ`using` ҤбλɲäɬפȤޤʸ οƱͤˡ`tc variable` ǻǤޤ : # ǡ 3 ܤ򡢸ġ˿ƤΤ˻ plot 'data' using 1:2:3 with points lc variable # ĤΥǡեˤʣΥǡ뤳Ȥǽǡ # 2 ԤζԤʬΥƤޤġΥǡˤ # index ͤƤƤ (ʲ: `index`)using # column(-2) ǼǤޤʲ: `pseudocolumns`ʲ # -2 column ͤȤäơġΥǡۤʤ # ޤ plot 'data' using 1:2:(column(-2)) with lines lc variable 4 rgbcolor variable ?rgbcolor variable ?lc rgbcolor variable ?tc rgbcolor variable դγƥǡʬޤϳƥ٥ˤ줾ۤʤ뿧 뤳ȤǤޤ`lc rgbcolor variable` ϡǡեγƹԤ RGB ξɤ߹褦ץ˻ؼޤäƤϡ `using` ҤˤбλɲäɬפȤ 24-bit RGB 3 ȤǤȤߤʤޤͤǡե뤫ľ ͿϡϺǤñʷ 16 ͤͿޤ (ʲ: `rgbcolor`)ǡʲΤ褦 24-bit RGB Ȥɾ ʿ `using` Ҥ뤳ȤǤޤʸοƱͤˡ `tc rgbcolor variable` ǻǤޤ : # 3 ǡ x,y,z ɸб֡СĤʬĿ # ΤĤ rgb(r,g,b) = 65536 * int(r) + 256 * int(g) + int(b) splot "data" using 1:2:3:(rgb($1,$2,$3)) with points lc rgb variable 3 linestyles linetypes ? linestyles vs linetypes ϡΤ褦¾°ĤȤǤޤ (point) ε Ʊͤ°ȤȤˡ°򥳥ޥ `set style line` Ȥ ƥ桼 "饤󥹥 (linestyle)" ȤƷӤĤ뤳ȤǤ 줿 linestyle ϡplot ޥǡĤޤ¿ ǤФƤɽ椹Τ˻ȤȤǤޤ `linetypes` ϱ³Ū (ŪˤޤǤݻ) Ǥ `linestyles` ϰŪʤΤǤΥեåξ֤ꥻå ޤǤδ֤ݻޤ : # 饤󥹥򡢽Ϸ˰¸ʤ cyan 3 # 6 (ݤ) set style line 5 lt rgb "cyan" lw 3 pt 6 plot sin(x) with linespoints ls 5 # 5 2 ޥ (mouse input) ?mouse input ¿νϷǡߤ˥ޥȤäƺѤ򤹤뤳Ȥǽˤʤ ƤޤΤĤϥۥåȥ⥵ݡȤƤơޥ 뤬ͭ襦ɥˤȤˡ륭򲡤ȤǤ餫 ؿ¹Ԥ뤳ȤǤޤޥϤ `batch` ɥץȤȤ߹碌뤳Ȥǽǡ㤨 `pause mouse` Ȥơ θ˥ޥåˤäƥѥ᡼Ȥ֤äޥѿ θΥץưȿǤ뤳ȤǤޤʲ: `bind`, `mouse variables`ޤʲ⻲: `set mouse` 3 bind ?commands bind ?hotkey ?hotkeys ?bind : bind {allwindows} [<key-sequence>] ["<gnuplot commands>"] bind <key-sequence> "" reset bind `bind` ϡۥåȥ˻ѤޤۥåȥȤϡ 뤬ɥ饤ФΥɥˤȤˡ륭ޤʣΥ 򲡤Ȥǡgnuplot Υޥ¹Ԥ뵡ǽΤȤޤ `bind` ϡgnuplot `mouse` 򥵥ݡȤ褦˥ѥ뤵Ƥ ĥޥͭʽϷǻȤƤˤΤͭǤ뤳Ȥ Ƥ桼Υ (binding) ϡȤ߹ (builtin) ֤ޤ<space> 'q' ̾ϺϤǤޤ󡣤 ͣ㳰ˤĤƤϡʲ: `bind space` ޥܥϺϤǤޤ ۥåȥΰˤ `show bind`, ޤ `bind` ȥפ뤫 եɥǥۥåȥ 'h' ϤƤ ϡ`reset bind` ǥǥեȤξ֤Ǥޤ ޤʣΥϰǰϤɬפ뤳ȤդƤ ɸǤϥۥåȥϸߤ襦ɥϥ뤬Τ ǧޤ`bind allwindows <key> ...` (`bind all <key> ...` Ⱦά ) ϡ<key> γ򡢤줬ߤͭʤΤݤ˴ؤ餺٤ gnuplot 襦ɥDzǽˤޤξ硢gnuplot ѿ MOUSE_KEY_WINDOW ˤ줬Ԥʤ줿ɥ ID ¸ΤǤ 򥭡˳ƤޥɤǻѤ뤳ȤǤޤ : - : bind a "replot" bind "ctrl-a" "plot x*x" bind "ctrl-alt-a" 'print "great"' bind Home "set view 60,30; replot" bind all Home 'print "This is window ",MOUSE_KEY_WINDOW' - ɽ: bind "ctrl-a" # ctrl-a Ф륭ɽ bind # ƤΥɽ show bind # ƤΥɽ - : bind "ctrl-alt-a" "" # ctrl-alt-a Υ (Ȥ߹ߥϺޤ) reset bind # ǥե (Ȥ߹) ΥƳ bind! # "reset bind" ̤η (侩) - ȥ륹å˥: v=0 bind "ctrl-r" "v=v+1;if(v%2)set term x11 noraise; else set term x11 raise" (ctrl / alt) ʸʸζ̤Ϥޤ󤬡Ϥ Ϥޤ: ctrl-alt-a == CtRl-alT-a ctrl-alt-a != ctrl-alt-A (alt == meta) ΰ: ctrl, alt ݡȤƤü쥭ΰ: "BackSpace", "Tab", "Linefeed", "Clear", "Return", "Pause", "Scroll_Lock", "Sys_Req", "Escape", "Delete", "Home", "Left", "Up", "Right", "Down", "PageUp", "PageDown", "End", "Begin", "KP_Space", "KP_Tab", "KP_Enter", "KP_F1", "KP_F2", "KP_F3", "KP_F4", "KP_Home", "KP_Left", "KP_Up", "KP_Right", "KP_Down", "KP_PageUp", "KP_PageDown", "KP_End", "KP_Begin", "KP_Insert", "KP_Delete", "KP_Equal", "KP_Multiply", "KP_Add", "KP_Separator", "KP_Subtract", "KP_Decimal", "KP_Divide", "KP_1" - "KP_9", "F1" - "F12" ʲϡºݤΥǤϤʤɥ˴ؤ륤٥ȤǤ: "Close" ʲ⻲: `mouse` 4 bind space ?commands bind space ?bind space gnuplot configure ˥ץ --enable-rase-console Ĥƥ 󥹥ȡ뤵줿ϡ襦ɥ <space> 򥿥פ gnuplot Υޥɥɥ̤˽ФޤΥۥåȥϡ 'gnuplot -ctrlq' Τ褦ˤ gnuplot ư뤫ޤ X ꥽ 'gnuplot*ctrlq' ꤹ뤳Ȥ ctrl-space ѹǤޤ ʲ: `x11 command-line-options` 3 ޥѤѿ (Mouse variables) ?mouse variables `mousing` (ޥǽ) ͭʾ硢ߤΥɥǤΥޥ åˤä gnuplot Υޥɥ饤ǻȤȤǤ뿧ʥ桼 ѿꤵޤåΥޥκɸѿ MOUSE_X, MOUSE_Y, MOUSE_X2, MOUSE_Y2 ޤå줿ܥ䡢ΤȤ ᥿ξ֤ MOUSE_BUTTON, MOUSE_SHIFT, MOUSE_ALT, MOUSE_CTRL ޤѿǤդγϻˤ̤ǡͭ襦 ɥǤΥޥå٥Ȥˤäƽޤͭ 襦ɥǥޥ˥å줿ɤ򥹥ץȤĴ ٤ˤϡѿΤΤɤ줫ĤƤ뤫ɤ åнʬǤ plot 'something' pause mouse if (defined(MOUSE_BUTTON)) call 'something_else'; \ else print "No mouse click." 襦ɥǤΰϢΥϤפ뤳Ȥ⡢ޥɤȤ ȤDzǽȤʤޤ plot 'something' pause mouse keypress print "Keystroke ", MOUSE_KEY, " at ", MOUSE_X, " ", MOUSE_Y `pause mouse keypress` Ϥǽλ MOUSE_KEY ˤϲ 줿 ASCII ɤ¸ޤMOUSE_CHAR ˤϤʸȤʸ ͤȤ¸ޤpause ޥɤ (㤨 ctrl-C 襦 ɥĤʤɤ) ۾ェλ MOUSE_KEY -1 ˤʤޤ ޥˤθοϰϤϡGPVAL_X_MIN, GPVAL_X_MAX, GPVAL_Y_MIN, GPVAL_Y_MAX ǻȤǤ뤳ȤդƤ ʲ: `gnuplot-defined variables` 2 (Plotting) ?plotting `gnuplot` ˤ 3 ĤΥޥɡ`plot`, `splot`, `replot` ޤ`plot` 2 `splot` 3 ( ºݤˤ 2 ̤ؤμͱ) ޤ`replot` Ϳ줿 ľ `plot` ޤ `splot` ޥɤɲä¹Ԥޤ ˴ؤŪʾȾϡ`plot` ˴ؤǸĤޤ3 ˸ͭξ `splot` ιˤޤ `plot` xy ľɸϤȶ˺ɸϤȤޤ˺ɸϤξܺ٤˴ؤƤ ʲ: `set polar``splot` xyz ľɸϤΤߤޤ󤬡 ޥ `set mapping` ¾ 2, 3 κɸϤѤ뤳Ȥޤ ˡץ `using` ȤС`plot` Ǥ `splot` ǤۤȤ ɤʺɸϤǤ⤽ƻȤȤޤ =axes `plot` Ǥϡ4 Ĥζ x (), x2 (), y (), y2 () 򤽤줾 ΩʼȤưȤǤޤץ `axes` ǡͿ줿ؿ ǡɤμΥڥɽ뤫٤ޤޤƼν̼ܤ丫 ФŤ椹뤿˽ʬ亴Ȥʤ `set` ޥɷ¸ ޤĤΥޥɤϡ`set xlabel` Τ褦˼̾򤽤 äƤޤʳΤΤ `set logscale xy` Τ褦ˡ1 ġ ʣμ̾򥪥ץȤƤȤޤz 椹륪ץ 䥳ޥɤ 2 դˤϸϤޤ `splot` ϡ˲äƶ̤񤯤ȤǤޤ3 δ γʻ˴ؤˤĤƤϡʲ: `set isosamples`3 ǡΥեɬפʷ֤ˤĤƤϡʲ: `splot datafile` ˴ؤˤĤƤϡʲ: `set contour`, `set cntrparam` `splot` Ǥν̼ܤ丫Фդϡx2 y2 椹륳ޥ 䥪ץϸ̤ʤz 椹ΤˤϤ̤롢 Ȥ `plot` ƱǤ 2 (Startup (initialization)) ?startup ?start ?start-up ?initialization ?.gnuplot ưˡgnuplot ϤޤƥѤνե `gnuplotrc` õ ޤΥե֤ gnuplot Υ󥹥ȡ˷ꤵ졢 `show loadpath` Τ뤳ȤǤޤ˥桼Υۡǥ쥯ȥ ˸ĿѤեõޤΥե Unix ϤΥƥǤ `.gnuplot` Ǥꡢ¾νϤǤ `GNUPLOT.INI` ȤʤäƤޤ (Windows OS/2 ǤϡĶѿ `GNUPLOT` ꤵƤ̾Υǥ ȥˤõޤ; Windows Ǥϡѿ GNUPLOT Ƥ `USEPROFILE` Ѥޤ): 󥹥ȡ `gnuplot` ǽ˥ȥǥ쥯ȥõ褦Ǥޤƥ ʤΤǤϿ侩ޤ 2 ʸʸѿ (Strings) ?strings ?string variables ʸ˲äơۤȤɤ gnuplot ޥɤʸѿʸ ޤʸ֤ؿդޤ㤨Сʲ 4 Ĥ plot Τ Ϸ̤ȤƱ西ȥޤ: four = "4" graph4 = "Title for plot #4" graph(n) = sprintf("Title for plot #%d",n) plot 'data.4' title "Title for plot #4" plot 'data.4' title graph4 plot 'data.4' title "Title for plot #".four plot 'data.4' title graph(4) ϡ줬ʸ黻ҤˤäƺѤ줿ϡʸѴ ޤΤǡʲƱͤưޤ: N = 4 plot 'data.'.N title "Title for plot #".N ̤ˡޥɥ饤γǤϡ餬ɸŪ gnuplot ؤ̿ʸ ˡΰʬǧΰʳϡͭʸѿȤƤɾΤߤ ʤޤäơʲΥޥϡ餯Ϻʤ 򤱤٤ǤʸˡŪˤϴְäƤϤޤ: plot = "my_datafile.dat" title = "My Title" plot plot title title ʸФ 3 Ĥ黻ҤѰդƤޤ: ʸη黻 ".", ʸ黻 "eq", ʸ黻 "ne" Ǥ Ǥ TRUE ɽޤ if ("A"."B" eq "AB") print "TRUE" ʲ⻲: 2 Ĥʸ񼰴ؿ `gprintf`, `sprintf` =substring ǤդʸʸѿʸʹؿˡϰϻҤĤ뤳Ȥˤ ʬʸǤޤϰϻҤ [begin:end] ηǡbegin ʬʸƬ֡end ϺǸΰ֤Ǥֻϡǽʸ 1 ܤȸޤƬΰ֡Ǹΰ֤϶뤤 '*' Ǥ⹽ޤ ξ硢ϸʸΤƬ뤤ϺṆ̀ޤ㤨С str[:] str[*:*] Ϥɤ str ʸΤ̣ޤ 2 ִȥޥɥ饤ޥ (Substitution) ?substitution gnuplot ؤ̿ʸ󤬺ǽɤ߹ޤ줿ʤޤ줬 졢⤷ϼ¹Ԥʳǡ2 Ĥηñִ¹Ԥ ϥХå (ASCII ֹ 96) ǰϤޤƤ뤫ޤ @ (ASCII ֹ 64) ƬˤĤʸФƹԤʤޤ 3 ХåȤˤ륷ƥॳޥɤִ (Substitution backquotes) ?substitution backquotes ?backquotes ?shell commands 륳ޥɤХåȤǰϤळȤˤäƥޥִԤ ȤǤޤΥޥɤϻҥץǼ¹Ԥ졢νϷ̤ǥ ɥ饤ΥХåȤǰϤޤ줿ޥɤ֤ޤϤ äƤϥѥפݡȤƤ⤢ޤʲ: `plot datafile special-filenames` ޥִϡñʸʳϡ`gnuplot` Υޥɥ饤 桢ɤǤǤѲǽǤ : ʲϡ`leastsq` Ȥץ¹ԤνϷ̤ǡ `leastsq` (ޤΰ䤳ߤ) ֤ޤ: f(x) = `leastsq` VMS Ǥϡ f(x) = `run leastsq` ʲϸߤդȥ桼̾Υ٥ޤ: set label "generated on `date +%Y-%m-%d` by `whoami`" at 1,1 set timestamp "generated on %Y-%m-%d by `whoami`" 3 ʸѿΥޥִ (Substitution macros) ?substitution macros ?macros =exists ޥɥ饤ΥޥִϥǥեȤǤ̵ˤʤäƤޤ `set macros` ͭˤǤޤޥִͭǤ硢ʸ @ ϡ ޥɥ饤ǤʸѿͤؤִԤʤΤ˻Ȥޤʸ ѿͤȤƤʸϡʣñ줫ʤ뤳ȤǽǤˤ ʸѿ򥳥ޥɥ饤ޥȤƻȤȤǽˤʤޤε ǽˤŸǤΤʸΤߤǡʸͤ˼Ȥ ϤǤޤ : set macros style1 = "lines lt 4 lw 2" style2 = "points lt 3 pt 5 ps 2" range1 = "using 1:3" range2 = "using 1:5" plot "foo" @range1 with @style1, "bar" @range2 with @style2 @ ޤԤϡϻŸ졢줬ºݤ˼¹Ԥ ˤϼΤ褦ǤƱȤˤʤޤ plot "foo" using 1:3 with lines lt 4 lw 2, \ "bar" using 1:5 with points lt 3 pt 5 ps 2 ؿ exists() ϥޥɾ˴ؤͭѤǤ礦ʲϡC ˥桼ѿ̾ŸǤ뤫ɤåޤ C = "pi" if (exists(C)) print C," = ", @C ޥŸϡñ⡢ޤŰǤϹԤʤޤ󤬡 ХåǤϥޥŸޤ ޥŸϡgnuplot ޥɹԤ򸫤Ȥᤤʳ gnuplot Ƥ٤Ԥޤäơ A = "c=1" @A Τ褦ʥɤ¹ԤޤʲΤ褦ʹԤϤǤϡ ޥƱԤˤ뤿Ÿ˴֤˹ʤǤ A = "c=1"; @A # will not expand to c=1 ޥɤƼ¹Ԥˤϡޥ `evaluate` ͭѤǤ礦 3 ʸѿޥޥɥ饤ִ (mixing_macros_backquotes) ?mixing_macros_backquotes ?substitution mixing_macros_backquotes ʸѿХåȤˤִޥˤִߴطϾ 䤳ǤХåȤϥޥִ˸ʤΤǡ filename = "mydata.inp" lines = ` wc --lines @filename | sed "s/ .*//" ` ϡmydata.ipn ιԿѿ lines ¸뤳Ȥˤʤޤޤ ŰϥХåȤִ˸ʤΤǡ mycomputer = "`uname -n`" ϡƥॳޥ `uname -n` ֤ʸʸѿ mycomputer ¸뤳Ȥˤʤޤ ޥִŰǤϵǽʤΤǡƥॳޥɤ ޥȤƤޥȤѤĥХåִ ʤȤϤǤǤޤ machine_id = "uname -n" mycomputer = "`@machine_id`" # ޤʤ ! μԤϡŰ䤬 @machine_id ޥȤƲ᤹뤳Ȥ˸ Ƥ뤫ǤƥॳޥɤޥȤ¸θ夽¹ ˤϡХåȼΤޥ˴ޤɬפޤϰ Τ褦˥ޥ뤳ȤǼ¸Ǥޤsprintf ν񼰤ˤ 3 ΰƤҤˤʤäƤ뤳ȤդƤ machine_id = sprintf('"`uname -n`"') mycomputer = @machine_id 2 ڤ䥫åλȤ (Syntax) ?syntax ?specify ?punctuation ꥹȤɸ (,) ڤǤΤФץ䤽ȼ ѥ᡼ϥڡ ( ) ڤǤϰϤϥ (:) ǶڤäƤ ä ([]) Ǥޤʸե̾ϰǤꡢ¾ˤ Ĥå (()) ǤΤޤ ޤϰʲζڤǻѤޤ`set` ޥɤ `arrow`, `key`, `label` κɸ; ƤϤ (fit) ѿΥꥹ (ޥ `fit` Υ  `via` ³ꥹ); ޥ `set cntrparam` ǻꤵ ӤȤӤͤ䤽Υ롼ץѥ᡼Υꥹ; `set` ޥɤ `dgrid3d` `dummy`, `isosamples`, `offsets`, `origin`, `samples`, `size`, `time`, `view` ΰ; ΰ֤䤽Υ롼ץѥ᡼Υ ; ȥ伴θФΰ; `plot`, `replot`, `splot` ޥɤ x,y,z ɸη׻˻Ȥ޲ѿؿΥꥹ; `plot`, `replot`, `splot` ޥɤʣ (ǡޤϴؿ) Τ줾ΰϢΥ ɤΥꥹȡ () åϡθФ (롼ץѥ᡼ǤϤʤ) Ū˽ ͿζڤȤơޤ `fit`, `plot`, `replot`, `splot` ޥɤ `using` ե륿Ǥη׻ؼ뤿˻Ȥޤ (å䥳ޤ̾δؿɽǤȤޤ) äϡ`set`, `plot`, `splot` ޥɤǤϰϤڤΤ˻Ȥ ޤ `range` (ϰ) (`set`, `plot`, `splot` ޥɤǻȤ ) ξüͤڤΤˡޤ `plot`, `replot`, `splot`, `fit` ޥɤ `using` ե륿γƥȥڤΤ˻Ȥޤ ߥ (;) ϡԤΥޥɹͿʣΥޥɤ Τ˻Ȥޤ 楫å ({}) ϡĥʸ⡼ (enhanced text mode) εҤ䡢 if/then/else ʸΥ֥åζڤȤƻȤޤޤʣǿ ҤΤˤȤޤ: {3,2} = 3 + 2i Ȥʤޤ EEPIC, Imagen, Uniplex, LaTeX, TPIC γƽϷǤϡñ \\ ޤŰ \\\\ DzԤ򼨤ȤǽǤ 3 (Quotes) ?quotes ?syntax quotes gnuplot ϡʸڤΤˡŰ (ASCII 34 )ñ (ASCII 39 )ӥХå (ASCII 96 ) 3 ΰȤޤ ե̾ñ䡢뤤ŰǰϤߤޤΥޥ˥奢 Ǥϰ̤˥ޥɤ㼨Ǥϡ狼䤹뤿˥ե̾ñ Ǥꡢ¾ʸŰǤޤ Ф (label)ȥ (title)ޤϤ¾ǤǻѤʸ ʣʸñ䡢뤤ŰǰϤߤޤ ǰϤޤ줿ʸΤʤη̤ϡɤΰ䵭֤ˤ äѤޤ \n () \345 (8 ɽʸ) Τ褦ʥХåå (\) ˤüʸɽϡ2 ŰʸǤϸϤޤñ ǤϡХåå弫Τ̾ʸȸʤޤñ ʸñ伫 (ASCII 39 ) ȤˤϡŤ ƽɬפޤĤޤꡢʸ "d\" s' b\\" ȡ'd" s'' b\' ϴ ƱΤȤʤޤ 1 Ĥʣʸ˴ؤֹ碌ϳƹԤƱƯޤäơ ˰ֹ碌줿ʸ "This is the first line of text.\nThis is the second line." ϼΤ褦ɽޤ: This is the first line of text. This is the second line. 'This is the first line of text.\nThis is the second line.' ȼΤ褦ˤʤޤ This is the first line of text.\nThis is the second line. ĥʸ (enhanced text processing) ŰФƤñ ФƤⵡǽޤΥ⡼ɤ򥵥ݡȤƤϷ ǤΤƯޤʲ: `enhanced text` Хå () ϥޥɥ饤ִΤ˥ƥॳޥ ϤΤ˻Ȥޤʲ: `substitution` 2 /եǡ (Time/Date) ?time/date `gnuplot` ϥǡȤƻ/վλѤ򥵥ݡȤƤޤ εǽ `set xdata time`, `set ydata time` ʤɤΥޥɤˤäͭ ˤʤޤ ǤƤλ/դ 2000 ǯÿѴޤޥ `set timefmt` ƤϽ񼰤ޤǡե롢ϰϡ θФ٥ΰ֡û˸СǡͤȤƤ Τν񼰤ˤäƼȤʤФޤ󡣰ˤϰĤ Ͻ񼰤ΤߤͭʤΤǡƱȤϤƤλ/դΥǡ Ʊ񼰤Ǥɬפޤäơե x y ξ /եǡǤϡƱ񼰤ǤʤФޤ ÿ (ÿ) ѴϹɸ (UT; ˥åɸ (GMT) Ʊ ) Ȥޤƹɸƻ֤ؤѴεǽϲ碌Ƥ ޤ󡣤⤷ǡ٤ƱɸӤ˽äƤʤ (Ƥ ƻ֤ǤʤΤɤ餫ˤΤ߽ʤ) ˴ؤƲ⿴ ۤ뤳ȤϤޤ󡣤ʤѤ륢ץꥱ Ūʻ̩˹ͻʤФʤϡʤȤ UT Ѵ ٤Ǥ礦 `show xrange` Τ褦ʥޥɤϡͤ `timefmt` ˽äƲ ľޤ`timefmt` ѹƤ⤦ `show` Ǥͤɽ Ͽ `timefmt` ˽äɽޤΤᡢ⤷ǽ 륳ޥ (`set xdata` Τ褦) ͿȡͤͤȤ ɽ뤳Ȥˤʤޤ ޥ `set format` ޤ `set tics format` ϡꤵ줿/ դǤʤ˴ؤ餺θФ˻Ȥ񼰤ޤ /վ󤬥ե뤫褵硢`plot`, `splot` ޥɤ `using` ץɬ׻Ȥɬפޤ`plot`, `splot` ϳƹԤΥǡʬΥ˥ڡȤޤ/եǡϤ ˥ڡޤ뤫Ǥ⤷ֶڤѤƤΤʤ顢 ΥƥबɤΤ뤿˲٤ƥȤɬפ Ǥ礦 ؿ `time` ϡߤΥƥΤ˻Ȥޤͤϡ `strftime` ؿʸѴǤޤ`timecolumn` Ȥ߹碌 ŪդΤˤȤޤηϤ줬֤ ꤷޤξ time() ϸߤλ 2000 ǯ 1 1 Ȥ֤¿ (ޤʣǿ) ʤƱͤͤ¿ Ȥ֤ޤ (ðʲ) ʬ٤ϡڥ졼ƥ󥰥ƥ ˰¸ޤʸʤСʸǤȤߤʤ 줿ʸ󶡤褦 `strftime` Ϥޤ ϻ/եǡǤ ե "data" ϰʲΤ褦ʹԤʤȤޤ: 03/21/95 10:00 6.02e23 ΥեϰʲΤ褦ˤɽޤ: set xdata time set timefmt "%m/%d/%y" set xrange ["03/21/95":"03/22/95"] set format x "%m/%d" set timefmt "%m/%d/%y %H:%M" plot "data" using 1:3 ǡx θФ "03/21" Τ褦ɽޤ ʲ: `time_specifiers` 1 襹 (plotting styles) ?plotting styles gnuplot Ǥϡ襹뤬ѤǤޤ ϡե٥åȽ˰ʲ˾Ҳ𤵤Ƥޤ ޥ `set style data` `set style function` ϡʹߤ `plot` `splot` ޥɤФƥǥեȤ襹ѹ ޤ 襹ϡޥ `plot` `splot` ΰʬȤơŪ˥ ץꤹ뤳ȤǤޤĤǡʣ襹 Ȥ߹碌ϡǤФ襹ꤹɬפ : plot 'data' with boxes, sin(x) with lines 襹ϡ켫Τǡե뤫ΤĤΥǡ Ԥޤ㤨СǥեȤǤ `lines` ϡy ͤ 1 Υǡ (x ͤϰۤ˽֤˼)ޤϺǽ餬 x, y 2 ĤԤƤޤեβΥǡǡȲᤵ 뤦ޤˡ˴ؤˤĤƤϡʲ: `using` 2 boxerrorbars ?commands set style boxerrorbars ?set style boxerrorbars ?plotting styles boxerrorbars ?style boxerrorbars ?boxerrorbars 襹 `boxerrorbars` 2 ΥǡǤΤѲǽǤ `boxes` `yerrorbars` ȹ礻Ǥϡ3 󡢤 4 󡢤ޤ 5 ΥǡѤޤ: 3 : x y ydelta 4 : x y ydelta xdelta # Ȣ != -2 4 : x y ylow yhigh # Ȣ == -2 5 : x y ylow yhigh xdelta Ffigure_boxerrorbars y θ "ydelta" ηͿơȢβ餫 -2.0 ꤵ (`set boxwidth -2.0`) ʤСȢβ 4 ܤͤͿ ޤy θ "ylow yhigh" ηͿȢβ 5 ܤͤͿޤ̤ʾȤơ"ylow yhigh" θ 4 ΥǡФ `boxwidth = -2.0` Ȥ꤬ޤξȢ βϡܤȢˤäĤ褦˼ưŪ˷׻ޤ3 Υǡ ξ⡢ϼưŪ˷׻ޤ ɲ (4,5,6 ) ȡϳƥǡ variable color (ʲ: `linecolor`, `rgbcolor variable`) ȤƻȤޤ ϡȢζƱ褵ޤ Ȣι⤵ϡ`yerrorbars` Ʊͤ y θͤꤵޤ y-ydelta y+ydelta ޤǡ뤤 ylow yhigh ޤǡϲ ΥǡͿƤ뤫ˤäƷޤޤ ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/mgr.html"> errorbar ǥ⡣ ^ </a> 2 boxes ?commands set style boxes ?set style boxes ?plotting styles boxes ?style boxes ?boxes Ffigure_boxes `boxes` 2 ǤΤѲǽǤͿ줿 x ɸ濴Ȥx (դζ顢ǤϤޤ) Ϳ줿 y ɸޤǤȢ񤭤ޤϴŪˡ2 󡢤ޤ 3 Υǡ Ѥޤ;ʬϡvariable Ԥɤ٤ξ󶡤줿 ΤȤƻѤޤ (ʲ: `rgbcolor variable`) 2 : x y 3 : x y x_width Ȣ 3 ĤΤĤˡǷꤵޤϥǡ 3 ܤΥǡ äƤϡ줬Ȣ˥åȤޤǤʤ `set boxwidth` ޥɤȢåȤƤϡ줬Ȥ ޤΤɤǤʤ硢ȢϡܤȢäĤ褦˼ư Ū˷׻ޤ ȢȤϸߤɤĤ֤ (fillstyle) ˽äɤĤ֤ ܺ٤ϡʲ: `set style fill`ɤĤ֤ plot ޥɾǻꤹ뤳ȤǤޤ ɤĤ֤뤬 `empty` ξϡȢɤĤ֤ޤ ɤĤ֤뤬 `solid` ξϡȢϸߤ迧ǥ٥ɤꤵ ޤˤɲåץ <density> ꡢɤĤ֤̩٤ ̣0 طʿ1 迧ΤΤˤʤޤ ɤĤ֤뤬 `pattern` ξϡȢϸߤ迧Ǥѥ ɤĤ֤ޤϥɥ饤ФݡȤƤɬפޤ : ǡեɤĤ֤Ȣ褷ȢƱΤ򾯤ľ˥ڡ (): set boxwidth 0.9 relative set style fill solid 1.0 plot 'file.dat' with boxes ѥǤɤĤ֤Ȣ sin cos Υդ: set style fill pattern plot sin(x) with boxes, cos(x) with boxes sin ϥѥ 0 ǡcos ϥѥ 1 褵ޤɲä ϥɥ饤ФݡȤѥ۴Ū˻Ѥޤ 줾ΥǡŪɤĤ֤: plot 'file1' with boxes fs solid 0.25, \ 'file2' with boxes fs solid 0.50, \ 'file3' with boxes fs solid 0.75, \ 'file4' with boxes fill pattern 1, \ 'file5' with boxes fill empty 2 boxplot ?plotting styles boxplot ?style boxplot ?boxplot Ffigure_boxplot boxplot ϡͤŪʬۤɽŪˡǤʬ̶ϡ 1/4 ʬ̶ʲͤĤ褦ˡ1/2 ʬ̶ (᥸) ʲͤĤ褦ˡȷꤵޤʬ̤軰 ʬ̤δ֤ΰϤ褦Ȣ褷᥸ͤΤȤˤϿʿ ޤȢҤϡȢ桼³ޤDZĹޤθ³ ˤϡҤȤĤҤȤ褵ޤ : # x ɸ 1.0y 5 ܤͤΤȤ boxplot plot 'data' using (1.0):5 # Ʊϰϳϱboxplot 0.3 ˤ set style boxplot nooutliers plot 'data' using (1.0):5:(0.3) ǥեȤǤϡusing ˤ 2 ܤ y Τ٤ƤͤФ boxplot 1 Ĥޤɲä (4 ܤ) ꤹ ȡͤ򤢤ѿΥŪʥ٥ͤǤȸʤΥ ͤΥ٥ͤο boxplot 褷ޤ boxplot δֳ ϥǥեȤǤ 1.0 Ǥ `set style boxplot separation` ѹǤޤǥեȤǤϡѿͤϡ boxplot β (ޤ ) Υ٥ɽޤ # 'data' 2 ܤ "control" "treatment" Τ줫ʸ # ʲϡΰ 2 Ĥ boxplot plot 'data' using (1.0):5:(0):2 ȢΥǥեȤ `set boxwidth <width>` Ǥޤplot ޥɤ `using` ˤ 3 ܤΥץǤǤޤ1 3 ܤ (x ɸ) ̾ǡǤϤʤȤͿޤ ǥեȤǤϡȢҤȢü顢y ͤʬϰϤ 1.5 ܤ ޤäƤƺǤΥƤ褦ޤDZĹޤǥեȤǤϡ ϳ (outlier) ϱ (pointtype 7) ޤȢҤü `set bars` ȤäǤޤ ΥǥեȤ `set style boxplot` ޥɤѹǤޤ ʲ: `set style boxplot`, `bars`, `boxwidth`, `fillstyle`, `candlesticks` 2 boxxyerrorbars ?commands set style boxxyerrorbars ?set style boxxyerrorbars ?plotting styles boxxyerrorbars ?style boxxyerrorbars ?boxxyerrorbars Ffigure_boxxyerrorbars `boxxyerrorbars` 2 ΥǡǤΤѲǽǤ ϡ`xyerrorbars` 뤬ñʬθ򺹤ɽȤĹɽ 뤳ȤСۤƱǤϡϥǡ 4 󡢤ޤ 6 Ѥޤ;ʬϡvariable Ԥɤ٤ξ󶡤 줿ΤȤƻѤޤ (ʲ: `rgbcolor variable`) 4 : x y xdelta ydelta 6 : x y xlow xhigh ylow yhigh Ȣȹ⤵ `xyerrorbars` Ʊ x, y θꤵޤ Ĥޤꡢxlow xhigh ޤǤ ylow yhigh ޤǡޤ x-xdelta x+xdelta ޤǤ y-ydelta y+ydelta ޤǡϲΥǡ ͿƤ뤫ˤäƷޤޤ ɲ (5,7 ) ȡϳƥǡ variable color (ʲ: `linecolor`, `rgbcolor variable`) ǤȤƻȤ ȢϸߤɤĤ֤ (fillstyle) ˽äɤޤ ٤ϡʲ: `set style fill`, `boxes`plot ޥɾǿɤ Ĥ֤ꤹ뤳ȤǤޤ 2 candlesticks ?commands set style candlesticks ?set style candlesticks ?plotting styles candlesticks ?style candlesticks ?candlesticks Ffigure_candlesticks `candlesticks` ϡͻǡ 2 Υǡ衢 ǡΤҤդդΤ˻Ȥޤ ϡʿˤ x 濴Ȥľˤϳ (open) Ƚ (close) 򶭳ȤĹȤޤơ x ɸΤȤ ĹΤƤäڤ󤫤ǹ (high) ޤǤȡĹ줫ǰ (low) ޤǤοľޤοľϺǹͤȺǰͤؤäƤ ѹޤ Ū 5 ΥǡɬפǤ: ͻǡ: date open low high close ȢҤ: x box_min whisker_min whisker_high box_high Ĺϥޥ `set boxwidth` Ǥޤ gnuplot ؤθߴȤơboxwidth ѥ᡼ꤵƤʤ `set bars <width>` 椵褦ˤʤäƤޤ ˡȢҤ (box-and-whisker) Υ롼ײ˴ؤŪ λɲä 6 ܤΥǡǻǤޤϡx ɸƱ ñ̤ͿʤФޤ ɲ (6 ܡޤ 6 ܤǡȤƻȤ 7 ) ȡϳƥǡ variable color (ʲ: `linecolor`, `rgbcolor variable`) ȤƻȤޤ ǥեȤǤϡľʬΤƤäڤˤϿľ˸ʿϰ 󡣤硢㤨ŵŪȢҤ (box-and-whisker plot) ǤλѤǤ襳ޥɤ˥ `whiskerbars` ɲä ƤǥեȤǤϡʿȢ (candlestick) οʿդ˰ ޤΤФꤹ뤳ȤѹǤޤ ͻǡ̾δǤϡ() < () ξĹ϶ǡ () < () ξɤ٤ޤߤ fillstyle "empty" 򥻥åȤƤϡºݤˤʤޤʲ: `fillstyle` fillstyle ɤ٤ޤϥѥ򥻥åȤƤϡ͡ ͤ˴طʤ٤ƤȢˤ줬Ȥޤʲ: `set bars`, `financebars`ޤʲ⻲ȤƤ ^ <a href="http://www.gnuplot.info/demo/candlesticks.html"> candlestick ^ </a> ^ <a href="http://www.gnuplot.info/demo/finance.html"> finance ^ </a> Υǥ⡣ : ͤɽεʤɤɲä硢ʲΤ褦ˡ դդ¾襳ޥɤɲäɬפޤ: # ǡ: X 'Ǿ' '1/4 ̤' '' '3/4 ̤' '' set bars 4.0 set style fill empty plot 'stat.dat' using 1:3:2:6:5 with candlesticks title 'Quartiles', \ '' using 1:4:4:4:4 with candlesticks lt -1 notitle # Ҥξ˿ʿȼǡʿ 50% ˤ plot 'stat.dat' using 1:3:2:6:5 with candlesticks whiskerbars 0.5 ʲ: `set boxwidth`, `set bars`, `set style fill`, `boxplot` 2 circles ?commands set style circles ?set style circles ?plotting styles circles ?style circles ?circles Ffigure_circles `circles` ϡƥǡ줿Ⱦ¤αߤ褷ޤ3 ΥǡͿϡ x, y, Ⱦ¤ȲᤷޤȾ¤ϡ οʿ (x ޤ x2) ñ̤Dzᤵޤy ν̼ܤ ڥϡ̵뤵ޤ2 ΥǡͿʤȡȾ `set style circle` ޤξ硢Ⱦ¤ graph screen κɸϤͿ뤳ȤǤޤǥեȤǤϴʱߤ褷ޤ 4 ܡ5 ܤ˳ϳѡλѤꤹ뤳Ȥ褹뤳ȤǤ ޤ4 ܡ뤤 6 ܤΥǡɲäʬߤοꤹ뤳 ȤǤޤγϳѡλѤñ̤٤ǻꤹɬפޤ : # Ѥ 3 ܤͤ㤹褦ʱߤ set style fill transparent solid 0.2 noborder plot 'data' using 1:2:(sqrt($3)) with circles, \ 'data' using 1:2 with linespoints # ߤ˥ѥåޥ plot 'data' using 1:2:(10):(40):(320) with circles # ǡDZߥդ set xrange [-15:15] set style fill transparent solid 0.9 noborder plot '-' using 1:2:3:4:5:6 with circles lc var 0 0 5 0 30 1 0 0 5 30 70 2 0 0 5 70 120 3 0 0 5 120 230 4 0 0 5 230 360 5 e ϡpointstyle 7 Υ variable Ȥ `points` ˤ ȻƤޤcircles x ϰϤǿ̤ۤʤޤ ⻲: `set object circle`, `fillstyle` 2 ellipses ?plotting styles ellipses ?style ellipses ?ellipses Ffigure_ellipses `ellipses` ϡƥǡʱ (ellipse) 褷ޤ ϡ2 ˤΤŬѤޤʱߤϡ濴缴ľ¡ ľ¡x ȼ缴Τʤѡɽޤ 2 : x y 3 : x y major_diam 4 : x y major_diam minor_diam 5 : x y major_diam minor_diam angle 2 ΥǡΤߤͿ줿ϡ濴κɸȤߤʤ졢ʱ ϥǥեȤ礭褵ޤ (ʲ: `set style ellipse`) ߤθϡ缴 x ΤʤѤޤǥեȤ ellipse Υ뤫ޤ (ʲ: `set style ellipse`) 3 ΥǡͿ줿ϡ3 ܤϼ硢ξľ () Ȥƻ ޤϥǥեȤ 0 ˤʤޤ 4 ΥǡͿ줿ϡ濴κɸ缴ľ () ľ¤ȤƻȤޤľ¤ǤꡢȾ¤ǤʤȤդ 5 ΥǡͿ줿ϡ5 ܤͤñ̤θγ٤λ ƻȤޤ ʱߤϡ3,4,5 ͤͤȤƻꤹ뤳ȤǡΥǥեȤ ͤѤʱߤ񤫤뤳ȤǤޤ Τ٤Ƥξǡvariable color ǡǸ (3,4,5,6 ) ɲäǤޤܺ٤ϰʲ: `colorspec` ǥեȤǤϡ缴ľ¤Ͽʿ (x ޤ x2) ñ̡ľ¤Ͽľ (y ޤ y2) ñ̤ǤȤߤʤޤϡx y ν̼ ۤʤ硢缴ϲžˤϤʤʤȤȤ ̣Ƥޤεưϡ `units` ѹǤޤ ˴ؤƤϡ3 ʤޤ: `units xy` ˴ޤޤƤ硢μϾ˽Ҥ٤褦˽̼ ޤ`units xx` Ȥȡľ¤ξȤ x ñ̤Ƿ׻졢 `units yy` ξȤ y ñ̤Ƿ׻ޤ 2 ĤϡΥ ѹƤ⡢ʱߤڥޤ `units` άϡǥեȤ꤬Ѥ졢`units xy` Ȥ ޤϡ`set style ellipse` ǺǽǤ (ʱߤͭŪ˻Ѥ): plot 'data' using 1:2:3:4:(0):0 with ellipses ʲ⻲: `set object ellipse`, `set style ellipse`, `fillstyle` 2 dots ?commands set style dots ?set style dots ?plotting styles dots ?style dots ?dots Ffigure_dots `dots` ϳ˾ʥɥåȤ褷ޤϤ ʤ뻶ۿޤǤ礦2 Ǥ 1 󡢤ޤ 2 ϥǡ3 Ǥ 3 ΥǡɬפǤ ϷˤäƤ (post, pdf ʤ)ɥåȤ礭 linewidth ѹ 뤳ȤǤ뤳Ȥ⤢ޤ 1 : y # x Ϲֹ 2 : x y 3 : x y z # 3D Τ (splot) 2 filledcurves ?commands set style filledcurves ?set style filledcurves ?plotting styles filledcurves ?style filledcurves ?filledcurves Ffigure_filledcurves `filledcurves` 2 ǤΤѲǽǤ 3 ΰۤʤ꤬ǽǤǽ 2 ϴؿ衢뤤 2 ϥ ѤΤΤǡǾҲ𤹤褦˥ץǹʤ꤬Ǥޤ : plot ... with filledcurves [option] ǡץϰʲΤΤ줫Ǥ: [closed | {above | below} {x1 | x2 | y1 | y2 | r}[=<a>] | xy=<x>,<y>] ǽΤΤ `closed` ǡ϶켫Ȥ¿ѷȸʤޤ ϥǡ 2 ξˤϤ줬ǥեȤǤ 2 ܤϻꤵ줿뤤ϿʿľͿ줿ʤɤȡ Ȥδ֤˺ΰɤĤ֤ޤ filledcurves closed ... ĶǰϤޤΰ filledcurves x1 ... x1 filledcurves x2 ... x2 (y1, y2 Ʊ) filledcurves y1=0 ... (y1 Ǥ) ľ y=0 i.e. x1 ʿ filledcurves y2=42 ... (y2 Ǥ) ľ y=42 i.e. x2 ʿ filledcurves xy=10,20 ... x1,y1 Ǥ 10,20 (𷿤Τ褦ʷ) filledcurves above r=1.5 ˺ɸǤư¼ 1.5 γ¦ΰ 3 ܤ 3 ϥǡɬפȤ x ɸȡФ 2 Ĥ y ɸʤꡢƱ x ɸνФ 2 Ĥζ y ɸбޤƤ 2 Ĥζδ֤ΰ褬ɤĤ֤ޤ ϥǡ 3 ʾξˤϤ줬ǥեȤǤ 3 : x y1 y2 Ϥ줿 2 Ĥζδ֤ΰɤĤ֤: ^ <a href="http://www.gnuplot.info/demo/fillbetween.html"> ֤ɤĤ֤ǥ⡣ ^ </a> plot 'data' using 1:2:3 with filledcurves `above` `below` ץ ... filledcurves above {x1|x2|y1|y2|r}=<val> ... using 1:2:3 with filledcurves below ηΥޥɤŬѲǽǤɤξǤ⡢Υץ ɤĤ֤ΰ򡢶ޤ϶¦¤ޤ : ⡼ɤƤνϷǥݡȤȤϸ¤ޤ ǡե뤫줿ɤĤ֤礹ȡʤʤä ʤΰˤʤ뤳Ȥޤ gnuplot ΰǤϤ 򥯥åԥ󥰤Ƥ뤫Ǥ <a>, <x>, <y> ΰγˤ硢ϥդζذư ޤäơץ xy=<x>,<y> ꤷμºݤɤĤ֤ ϡxrange yrange ˰¸ޤ 2 financebars ?commands set style financebars ?set style financebars ?plotting styles financebars ?style financebars ?financebars `financebars` ϶ͻǡ 2 ΥǡǤΤѲǽ Ǥϡx ɸ 1 (̾) ȡ4 Ĥ y ɸ () ɬפ ޤ 5 : date open low high close ɲ (6 ) ȡϳƹ variable color ( : `linecolor`, `rgbcolor variable`) ȤƻȤޤ Ffigure_financebars ϡʿˤϤ x ɸ֤졢ľˤϺǹ (high) ǰ (low) üȤʬȤޤơʬ˿ʿ¦ ߤ (open) νˡʿ¦ιߤ (close) νˤĤ ޤιߤĹ `set bars` ѹǤޤϺǹͤȺǰ ؤäƤѤޤ󡣰ʲ: `set bars`, `candlesticks` ⻲ȤƤ ^ <a href="http://www.gnuplot.info/demo/finance.html"> ͻǡǥ⡣ ^ </a> 2 fsteps ?commands set style fsteps ?set style fsteps ?plotting styles fsteps ?style fsteps ?fsteps Ffigure_fsteps `fsteps` 2 ǤΤѲǽǤ 2 ܤʬ ٤礦Ĥʤޤ: 1 ܤ (x1,y1) (x1,y2) ޤǡ2 ܤ (x1,y2) (x2,y2) ޤǡξϡ`lines` `points` Ф ΤƱǤ`fsteps` `steps` ΰ㤤ϡ`fsteps` ϡޤ y ˽񤤤Ƥ鼡 x ˽񤯤ΤФ`steps` x ˽񤤤Ƥ鼡 y ˽񤭤ޤ ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/steps.html"> steps ǥ⡣ ^ </a> 2 fillsteps ?commands set style fillsteps ?set style fillsteps ?style fillsteps ?fillsteps `fillsteps` ϡ`steps` ȤۤƱǤ y=0 Ȥδ֤ ΰ򸽺ߤ fillstyle ɤ٤ޤʲ: `steps` 2 histeps ?commands set style histeps ?set style histeps ?plotting styles histeps ?style histeps ?histeps Ffigure_histeps `histeps` 2 ǤΤѲǽǤϥҥȥ ǤѤտޤƤޤy ͤϡx ͤ濴֤ȹͤ x1 Ǥ ((x0+x1)/2,y1) ((x1+x2)/2,y1) ޤǤοʿȤɽ ޤüǤϡϤ x ɸ濴ˤʤ褦˱Ĺ ٤礦ƱΤοʿüϡξԤʿͤΤȤǤαľ ʤ ((x1+x2)/2,y1) ((x1+x2)/2,y2) ʬǷФޤ ξϡ`lines` `points` ФΤƱǤ `autoscale` ͭǤ硢x ϰϤϡαĹ줿ʿϰϤ ϤʤǡϰϤ򤵤ޤäơü˴ؤƤϤοʿ ȾʬʤȤˤʤޤ ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/steps.html"> steps ǥ⡣ ^ </a> `histeps` ñʤ襹ˤ`gnuplot` ˤϡҥȥ ȢǽϤ䡢ǡ礫콸ĤꤹǽϤʤɤϤޤ 2 histograms ?commands set style histogram ?set style histogram ?style histograms ?plotting styles histograms ?histograms `histograms` 2 ǤΤͭǤϡǡγ ¤ӤʿԤդޤ`plot` ޥɤγǤϡ ˴ؤͤΥȥ뤬°뤫Τޤ󤬡ñ ϥǡꤹɬפޤ (㤨ϥե 1 Ĥ) ߤϡ4 ΥҥȥΥ뤬ݡȤƤޤ set style histogram clustered {gap <gapsize>} set style histogram errorbars {gap <gapsize>} {<linewidth>} set style histogram rowstacked set style histogram columnstacked ǥեȤΥ `set style histogram clustered gap 2` б ƤޤΥǤϡ˻ꤵ줿ǡͤνϡ 줿ǡΤΤ줾ν (ֹ) б x ɸξˡ ơȢΥ롼פȤƸǤ֤ޤäơ<n> ĤΥǡ ˻ꤷ硢ǽθǤޤ x=1 濴Ȥ <n> ĤȢθǤޤ ʤꡢγơι⤵ϡ <n> ǡơκǽ (1 ) ޤθ˾ (gap) 졢˳ƥǡμ (2 ) ͤбȢθǤޤ꤬ x=2 濴Ȥ֤ޤʲƱ ǤǥեȤζ (gap) 2 ϡȢθǤޤƱΤδ֤ζ򤬡Ȣ 2 ĤȤ̣ޤƱФȢƱޤƱ ѥͿޤ (ʲ: `set style fill`) ȢθǤޤꤽ줾ϡǡե 1 ĤιԤޤΤ ϥեγƹԤκǽιܤФ (٥) Ǥ뤳Ȥɤ ȤǤˤ븫Ф (٥) ϡ`using` `xticlabels` Ĥ뤳ȤǡбȢθǤޤο x ˱ä ֤ȤǤޤ `errorbars` ϡƥȥФɲäɬפȤ `clustered` ˤȤƤɤƤޤǽϡ `clustered` ξƱͤȢι⤵ (y ) Ȥݻ ޤ 2 : y yerr # y-yerr y+err ؿӤ 3 : y ymin yman # ymin ymax ؿӤ θܤϡߤ `set bars` ͤ <linewidth> ץ Ǥޤ Ѥ߾夲Υҥȥ 2 ĤηݡȤƤޤ ޥ `set style histogram {rowstacked|columnstacked}` Ǥ Υˤơ򤵤줿ΥǡͤѤ߾夲줿 ȢȤƽޤͤϡy=0 Ѥ߾夲졢ͤ ظäѤ߾夲ޤͤͤäƤϡ ȲξѤ߾夲ޤǥեȤѤ߾夲⡼ɤ `rowstacked` Ǥ `rowstacked` ϡޤǽ򤵤줿γƹԤͤ x Τ 줾ΰ֤֤ޤ: 1 ܤͤ x=1 Ȣ2 ܤΤ x=2ʲ ƱͤȤʤޤ2 ܰʹߤ򤵤줿бȢϡξ ߽ŤͤƹԤޤƷ̤Ȥơx=1 ˤǤȢѤ߽Ťͤϡ κǽ (1 ܤ) ʤꡢx=2 ȢѤ߽Ťͤϳ 2 ͡ʤɤΤ褦ˤʤޤƱФȢƱޤƱѥ Ϳޤ (ʲ: `set style fill`) `columnstacked` ƱͤǤϳȢѤ߾夲 (ƹ ΥǡǤϤʤ) Υǡʤޤǽ˻ꤵ줿γ ԤΥǡ x=1 ȢѤ߾夲2 ܤ˻ꤷγƹԤΥ x=2 ȢѤ߾夲ʤɤΤ褦ˤʤޤΥǤϡ Ȣοϡƥǡܤ (ֹǤϤʤ) ֹ椫ꤵޤ Ȣϥޥ `set boxwidth` ѹǤޤ ȢɤĤ֤ϥޥ `set style fill` Ǥޤ histograms x Ͼ x1 Ȥޤy ˴ؤƤ y1 y2 Ǥޤplot ̿᤬histograms ¾Υξ ޤ硢histogram Ǥʤϡx1 Ȥ x2 Ȥ ޤ : Ffigure_histclust ϥեϡ2, 4, 6, ... ˥ǡͤ3, 5, 7, ... ˸ɾĤȤޤʲϡ2 ܡ4 ܤͤȢθǤޤ귿 (clustered; ǥեȥ) ΥҥȥȤ褷ޤ ϡplot ޥɤǷ֤ (iteration) ѤƤޤΤǡǤդθ ΥǡĤΥޥɤǽǤޤʲ: `iteration` set boxwidth 0.9 relative set style data histograms set style histogram cluster set style fill solid 1.0 border lt -1 plot for [COL=2:4:2] 'file.dat' using COL ϡx γͤ濴Ȥ뤽줾 2 ĤȢ (ľ) Ǥޤˤޤϥեκǽ˥٥뤬ޤޤ ʤ餽򡢰ʲξѹޥɤ x ˱ä֤Ǥޤ plot for [COL=2:4:2] 'file.dat' using COL:xticlabels(1) Ffigure_histerrorbar ե뤬ƥǡ¬ͤϰϤξξޤǤ硢 ɲä뤳ȤǤޤʲΥޥɤϸ (y-<error>) (y+<error>) ˰ƬȢƱοʿĤޤ ȸüϡ 2 褵ޤ set bars fullwidth set style fill solid 1 border lt -1 set style histogram errorbars gap 2 lw 2 plot for [COL=2:4:2] 'file.dat' using COL:COL+1 ƱǡѤ߾夲 (rowstacked) Υҥȥ褹硢 ޤǤȤϰ㤤ʲǤϷ֤ȤΤǤʤŪ̡ ꤷޤ set style histogram rowstacked plot 'file.dat' using 2, '' using 4:xtic(1) Ffigure_histrows ϡİĤαľǡΰĤб ϡ2 ĤʬѤ߾夲ηǤꡢ줾ʬι⤵ ե 2 ܤ 4 ܤͤбޤ Ǹ˰ʲΥޥ set style histogram columnstacked plot 'file.dat' using 2, '' using 4 Ffigure_histcols ϡİĤ줾ǡб롢2 ĤαľѤ߽Ťͤ ޤx=1 ˤϡǡե 2 ܤγƹԤͤб Ȣʤޤx=2 ˤϡǡե 4 ܤγƹԤͤ Ȣʤޤϡgnuplot ̾Ϥνġβ 뤳ȤˤʤޤΤǡkey ȥ x θФλ ѹɬפޤʲΥʬ򻲾ȤƤ set style histogram columnstacked plot '' u 5:key(1) # 1 ܤ key ȥ˻ plot '' u 5 title columnhead # 2 ĤϡƱǡͤͿƤΤǤۤʤ񼰤Ǥ 뤳ȤդƤ 3 newhistogram ?newhistogram ?histograms newhistogram ?plotting style histograms newhistogram : newhistogram {"<title>"} {lt <linetype>} {fs <fillstyle>} {at <x-coord>} 2 İʾΥҥȥȤ뤳ȤǤޤξ ޥ `newhistogram` ȤȤǡŪʬΥޤ Υ٥ʬΥ뤳ȤǤޤ : set style histogram cluster plot newhistogram "Set A", 'a' using 1, '' using 2, '' using 3, \ newhistogram "Set B", 'b' using 1, '' using 2, '' using 3 ٥ "Set A" "Set B" ϡ줾ΥҥȥȤβx ƤΥ٥βΰ֤˸ޤ ޥ newhistogram ϡҥȥοդŪ˻ꤷ (linetype) ǻϤΤˤȤޤǥեȤǤϡֹϥҥȥ ζޤǤϢ³Ūä³ޤϡʣΥҥ ȥƱդܤޤ plot newhistogram "Set A" lt 4, 'a' using 1, '' using 2, '' using 3, \ newhistogram "Set B" lt 4, 'b' using 1, '' using 2, '' using 3 ƱͤˡΥҥȥꤷ fillstyle ǻϤᤵ뤳Ȥǽ fillstyle `pattern` ˥åȤ硢ɤ٤˻Ѥ ѥֹϼưŪäƤޤ Ffigure_newhist ץ `at <x-coord>` ϡθΥҥȥ x ɸΰ֤ <x-coord> ꤷޤ: set style histogram cluster set style data histogram set style fill solid 1.0 border -1 set xtic 1 offset character 0,0.3 plot newhistogram "Set A", \ 'file.dat' u 1 t 1, '' u 2 t 2, \ newhistogram "Set B" at 8, \ 'file.dat' u 2 t 2, '' u 2 t 2 ξ硢2 ܤΥҥȥΰ֤ x=8 Ϥޤޤ 3 ʣϤ뼫ưŪʷ֤ (automated) ?automated ?histograms automated ?styles histograms automated ?plotting styles histograms automated ĤΥǡեΤ󤫤顢ĤΥҥȥ 硢plot η֤ (iteration) ǽȤǤ礦ʲ: `iteration`㤨С3 ܤ 8 ܤޤǤΥǡѤ߾夲Υҥ ȥ: set style histogram columnstacked plot for [i=3:8] "datafile" using i title columnhead 2 image ?commands set style image ?set style image ?plotting styles image ?style image ?image ?rgbimage ?rgbalpha 襹 `image`, `rgbimage`, `rgbalpha` ϡͤɸ äʻҾǡͤ2 ޤ 3 Τʿ̾˼ͱƤ ޤϥǡϡˤӥåޥåײե (PNG Τ褦ɸŪ ʥեޥåȤѴΤǤ褤) ñʿǤ =heatmap Ffigure_heatmap οޤϡ顼ͤ󤫤鲹ʬۤǤߤΥѥå 򡢳ƥ顼ͤбԥοؤγƤ˻Ѥޤ plot '-' matrix with image 5 4 3 1 0 2 2 0 0 1 0 0 0 1 0 0 1 2 4 3 e e Ffigure_rgb3D 2 γƥԥ (ǡ) ϡ襰ǤĹ ʿϻΤȤʤޤγƥǡκɸϡʿϻΤ濴 ꤷޤʤM x N ĤΥǡ M x N ԥβ ޤϡM x N ĤΥǡ礬 (M-1) x (N-1) Ǥ pm3d ι¤ȤϰۤʤޤХʥǡγʻҤϡɲ ɤǤǽǤʲ: `binary keywords flipx`, `keywords center`, `keywords rotate` Ffigure_scaled_image ƥԥ x y 礭򼨤Ȥǡǡ 2 ɸ Ĺ˼ޤ褦˿̤뤳ȤǤޤʲ: `binary keywords dx`, `dy`βΤˤϡƱϲ 줾 dx, dy, origin ꤷʣ֤ޤ PNG ӥγ 50x128 ԥǤ⤤ӥϡ`dx=0.5 dy=1.5` dz Ƥ褷㤤ӥϡ`dx=0.5 dy=0.35` ȤƤޤ (: Ҥ٤ƤȤϡpdflatex Ѥޥ˥奢˸ޤΤǡ ܸΥޥ˥奢ˤϤοޤϴޤޤƤʤǤ礦) `image` ϡ쥤 (Ĵ)ޤϥ顼ѥå ޤǤԥϤޤä 2 (`plot` ) Ǥ 3 Υǡ (x,y,value) 3 (`splot` ޥ) Ǥ 4 Υǡ (x,y,z,value) ɬפˤʤޤ `rgbimage` ϡ֡СĤ 3 Ĥοʬ (RGB) ǵҤ줿 Ϥޤä `plot` Ǥ 5 ǡ (x,y,r,g,b) `splot` Ǥ 6 ǡ (x,y,z,r,g,b) ɬפˤʤޤ֡С Ĥγʬ [0:255] ϰˤȲꤵޤ `rgbalpha` ϡ֡СĤ RGB ʬ˲äơե (Ʃѥ᡼) ξޤԥϤޤäơ `plot` Ǥ 6 ǡ (x,y,r,g,b,a) `splot` Ǥ 7 ǡ (x,y,z,r,g,b,a) ɬפˤʤޤ֡Сġӥեγʬ [0:255] ϰˤȲꤵޤ 3 Ʃ (transparency) ?image transparency ?transparency ?alpha channel 襹 `rgbalpha` ϡϥǡγƥԥ뤬 [0:255] ϰ ΥեͤäƤɬפޤalpha = 0 ΥԥϴƩ ǡβ () ǤѤޤalpha = 255 Υԥ ƩǤ٤ƤνϷϡ 2 Ĥξüͤ򥵥ݡ Ȥޤ0 < alpha < 255 ΥԥȾƩǡ 2,3 νϷ ˤбƤ餺¾νϷǤϤ 0 255 Ȥư ȤˤԤޤ 3 image failsafe ?commands set style image failsafe ?set style image failsafe ?plotting styles image failsafe ?style image failsafe ?image failsafe ?failsafe ϷΥɥ饤ФˤäƤϡ2 ĹΰǤβǡΥ 󥰤Ŭ롼󶡤Ƥ礬ޤ 롼ԴǤ뤳ȤΤƤޤκŬ롼ϡ  `failsafe` ȤȤ̵Ǥޤ: plot 'data' with image failsafe 2 impulses ?commands set style impulses ?set style impulses ?plotting styles impulses ?style impulses ?impulses Ffigure_impulses `impulses` ϡ2 Ǥ y=0 y ͤؤΡ3 Ǥ z=0 z ͤؤΡľʬɽޤy z ͤͤǤ褤ȤդƤǡɲƿľʬ οѤǤޤΥ 3 ǻѤ硢 (linewidth > 1) ѤȤŪǤ礦 3 դ˻Τˤʤޤ 1 : y 2 : x y # [x,0] [x,y] ؤ (2D) 3 : x y z # [x,y,0] [x,y,z] ؤ (3D) 2 labels ?commands set style labels ?set style labels ?plotting styles labels ?style labels ?labels Ffigure_labels `labels` ϡǡե뤫ɸʸɤ߹ߡʸ 򤽤 2 ޤ 3 ɸ֤ޤϴŪ 3 ޤ 4 ϤɬפȤޤ;ʬϡեȥʸ ѿͤΤ褦ʾ󶡤줿ΤȤƻѤޤ (ʲ: `rgbcolor variable`) 3 : x y string # 2 4 : x y z string # 3 եȡžѤ䤽¾ƥȤ°ɲåץȤ ǽǤ (ʲ: `set label`)ϡϥե 1 äԤ̾ʸ4, 5 ܤäϿ޺ɸ 褷ޤեȥϡ3 ܤͤ׻ƤơξϤ Ͽ͸̣Ƥޤ CityName(String,Size) = sprintf("{/=%d %s}", Scale(Size), String) plot 'cities.dat' using 5:4:(CityName(stringcolumn(1),$3)) with labels եȥ򡢸ġλԤ̾Фưۤʤ륵˹碌ʤƤ ʤСޥɤϤäȴñǤ: plot 'cities.dat' using 5:4:1 with labels font "Times,8" `labels` 3 ǤѤǤޤξ X,Y,Z ʸ 󡢤 4 Ĥ꤬ɬפǤ splot 'datafile' using 1:2:3:4 with labels ʲ⻲: `datastrings`, `set style data` 2 lines ?commands set style lines ?set style lines ?plotting styles lines ?style lines ?lines Ffigure_lines `lines` ܤľʬǷӤޤ ϡ2 Ǥ⡢3 ǤѤǤŪˤϡ1 2 3 󤫤ϥǡɬפȤޤ ;ʬϡοѹʤɤξ󶡤줿ΤȤƻѤ (ʲ: `rgbcolor variable`) 2 ξ 1 : y # ֹˤۤ x 2 : x y 3 ξ 1 : z # x ϰۤιֹ桢y index 3 : x y z ʲ⻲: `linetype`, `linewidth`, `linestyle` 2 linespoints ?commands set style linespoints ?commands set style lp ?set style linespoints ?plotting styles linespoints ?set style lp ?style linespoints ?style lp ?linespoints ?lp ?pointinterval Ffigure_linespoints `linespoints` ϡܤ򿿤ľʬǷӡθǺ äƳ˾ʵޤޥ `set pointsize` Ȥ ơεΥǥեȤ礭ѹǤޤ Ū 2 Ǥ 1 󡢤ޤ 2 ϥǡɬפǡ3 Ǥ 1 󡢤ޤ 3 ΥǡɬפǤʲ: `style lines` ;ʬϡΥοѹʤɤξ󶡤줿ΤȤ ƻѤޤ (linetype) °Ǥ `pointinterval` (ά `pi`) ǡ Τ٤ƤͿˤ뤫ɤǤޤ㤨С `with lp pi 3` ϡ٤ƤΥǡ֤ʬޤε 3 Ĥˤ񤭤ޤ`pointinterval` ͤˤϡβ ʬʬäޤäʬΥ `set pointintervalbox` Ǥޤ `linespoints` `lp` άȤޤ 2 points ?commands set style points ?set style points ?plotting styles points ?style points ?points Ffigure_points `points` ϳ˾ʵɽޤεΥǥե 礭ѹˤϥޥ `set pointsize` Ȥޤ Ū 2 Ǥ 1 󡢤ޤ 2 ϥǡɬפǡ3 Ǥ 1 󡢤ޤ 3 ΥǡɬפǤʲ: `style lines` ;ʬϡΥѹʤɤξ󶡤줿ΤȤ Ѥޤ 2 polar Ffigure_polar ˺ɸ (polar) ϡºݤˤ襹ΰĤǤϤޤ󤬡 ˤΰ˾夲Ƥޤץ `set polar` ϡ Ϥ 2 ɸ <x>,<y> <>,<Ⱦ> Ȳ᤹뤳Ȥ gnuplot ˻ؼޤ٤ƤǤϤʤ¿ 2 襹뤬 ɸ⡼ɤǤⵡǽޤޤϡ襹 `lines` `filledcurves` Ȥ߹碌򼨤Ƥޤ(: ǽҤ٤ƤޤȤϡpdflatex Ѥޥ˥奢˸ޤΤǡܸΥޥ˥奢ˤϤοޤϴ ޤƤʤǤ礦) ʲ: `set polar`, `set rrange`, `set size square` 2 steps ?commands set style steps ?set style steps ?plotting styles steps ?style steps ?steps Ffigure_steps `steps` 2 ǤΤѲǽǤ 2 ܤʬ 礦Ĥʤޤ: 1 ܤ (x1,y1) (x2,y1) ޤǡ2 ܤ (x2,y1) (x2,y2) ޤǡξϡ`lines` `points` Ф ΤƱǤ`fsteps` `steps` ΰ㤤ϡ`fsteps` ϡޤ y ˽񤤤Ƥ鼡 x ˽񤯤ΤФ`steps` x ˽񤤤Ƥ鼡 y ˽񤭤ޤȥ١饤Ǥ y=0 Ȥ ֤ΰɤ٤ˤϡ`fillsteps` ѤƤ ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/steps.html"> steps ǥ⡣ ^ </a> 2 rgbalpha ?commands set style rgbalpha ?set style rgbalpha ?plotting styles rgbalpha ?style rgbalpha ʲ: `image` 2 rgbimage ?commands set style rgbimage ?set style rgbimage ?plotting styles rgbimage ?style rgbimage ʲ: `image` 2 vectors ?commands set style vectors ?set style vectors ?plotting styles vectors ?style vectors ?vectors 2 `vectors` (x,y) (x+xdelta,y+ydelta) ޤǤΥ ȥ񤭤ޤ3 `vectors` ƱͤǤǡϴ Ū 6 ɬפǤƥ٥ȥüˤϾ񤫤ޤ 4 : x y xdelta ydelta 6 : x y z xdelta ydelta zdelta ξξǡɲ (2D Ǥ 5 ܡ3D Ǥ 7 ) ȡ ϳƥǡ variable color (ʲ: `linecolor`, `rgbcolor variable`) ȤƻȤޤ vectors ȤäƤ splot `set mapping cartesian` Τߤǥ ȤƤޤ  "with vectors" ϡθˡ饤 arrow 䡢餫Ƥ arrow λȡ뤤󤫤 ƥ٥ȥФɬפ arrow Υǥåɤ褦ʻ ȼȤǤޤ: "arrowstyle variable" Ѥ硢б ٥ȥ뤬褵ݤˤϤ줬 arrow °ͤ٤ƤΤ plot ޥ¾° arrow 򤳤Υ Ⱥߤ뤳ȤϤǤޤ plot ... with vectors filled heads plot ... with vectors arrowstyle 3 plot ... using 1:2:3:4:5 with vectors arrowstyle variable ܺ٤ϡʲ: `arrowstyle` : plot 'file.dat' using 1:2:3:4 with vectors head filled lt 2 splot 'file.dat' using 1:2:3:(1):(1):(1) with vectors filled head lw 2 `set clip one` `set clip two` 2 Υ٥ȥ˱ƶͿ ޤܺ٤ϡʲ: `set clip`, `arrowstyle` 2 xerrorbars ?commands set style xerrorbars ?set style xerrorbars ?plotting styles xerrorbars ?style xerrorbars ?xerrorbars Ffigure_xerrorbars `xerrorbars` 2 ΥǡΤߤѲǽǤ `xerrorbars` ϡʿθؼ (error bar) ɽʳ `points` ƱǤ (x,y) ˤ (xlow,y) (xhigh,y) ޤǡ ޤ (x-xdelta,y) (x+xdelta,y) ޤǤʬޤ ϤĤΥǡͿ뤫ˤäѤޤؼüˤ ߤΰդޤ (`set bars` ȤƤʤСܺ٤˴ؤ ϡʲ: `set bars`)ΥϴŪˡ3 4 Υǡ ɬפǤ: 3 : x y xdelta 4 : x y xlow xhigh ɲ (4,5 ) ȡ variable color Ȥ Ȥޤ 2 xyerrorbars ?commands set style xyerrorbars ?set style xyerrorbars ?plotting styles xyerrorbars ?style xyerrorbars ?xyerrorbars Ffigure_xyerrorbars `xyerrorbars` 2 ΥǡΤߤѲǽǤ `xyerrorbars` ϡʿľθؼ (error bar) ɽʳ `points` ƱǤ (x,y) ˤ (x,y-ydelta) (x,y+ydelta) ޤǤ (x-xdelta,y) (x+xdelta,y) ޤǡޤ (x,ylow) (x,yhigh) ޤǤ (xlow,y) (xhigh,y) ޤǤʬ ޤϤĤΥǡͿ뤫ˤäѤޤ ؼüˤϹߤΰդޤ (`set bars` ȤƤʤ Сܺ٤˴ؤƤϡʲ: `set bars`) 4 󤫡6 Υǡ ɬפǤ 4 : x y xdelta ydelta 6 : x y xlow xhigh ylow yhigh ǡݡȤƤʤ緿ηͿ줿硢`plot` ޥɤ `using` ե륿ȤäŬڤʷľʤȤޤ㤨 Хǡ (x,y,xdelta,ylow,yhigh) ȤǤ硢ʲΤ褦 ޤ: plot 'data' using 1:2:($1-$3):($1+$3):4:5 with xyerrorbars ɲ (5,7 ) ȡϳƥǡ variable color ȤƻȤޤ 2 yerrorbars ?commands set style yerrorbars ?commands set style errorbars ?plotting styles yerrorbars ?plotting styles errorbars ?set style yerrorbars ?set style errorbars ?style yerrorbars ?style errorbars ?yerrorbars Ffigure_yerrorbars `yerrorbars` (ޤ `errorbars`) 2 ΥǡΤߤ ѲǽǤ`yerrorbars` ϡľθؼ (error bar) ɽ ʳ `points` ˻Ƥޤ (x,y) ˤ (x,y-ydelta) (x,y+ydelta) ޤǡޤ (x,ylow) (x,yhigh) ޤǤʬ ϤĤΥǡͿ뤫ˤäѤޤ üˤϹߤΰդޤ (`set bars` ȤƤʤС ܺ٤˴ؤƤϡʲ: `set bars`)ϡ3 4 Υǡɬ פǤ 3 : x y ydelta 4 : x y ylow yhigh ɲ (4,5 ) ȡ variable color Ȥ Ȥޤ ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/mgr.html"> errorbar ǥ⡣ ^ </a> 2 xerrorlines ?commands set style xerrorlines ?set style xerrorlines ?plotting styles xerrorlines ?style xerrorlines ?xerrorlines Ffigure_xerrorlines `xerrorlines` 2 ΥǡΤߤѲǽǤ `xerrorlines` `linespoints` ˻Ƥޤʿθ Ȥ㤤ޤ (x,y) ǡǡθĿ˱ (xlow,y) (xhigh,y) ޤǡޤ (x-xdelta,y) (x+xdelta,y) ޤǤʬ 졢ƹΰü֤ޤ (`set bars` ȤƤʤ 硣ܺ٤ϡʲ: `set bars`)Ūˤϡ3 4 Υǡ ɬפǤ: 3 : x y xdelta 4 : x y xlow xhigh ɲ (4,5 ) ȡ variable color Ȥ Ȥޤ 2 xyerrorlines ?commands set style xyerrorlines ?set style xyerrorlines ?plotting styles xyerrorlines ?style xyerrorlines ?xyerrorlines Ffigure_xyerrorlines `xyerrorlines` 2 ΥǡΤߤѲǽǤ `xyerrorlines` `linespoints` ˻Ƥޤʿȿľθ 뤳Ȥ㤤ޤ (x,y) ǡǡθĿ˱ơ (x,y-ydelta) (x,y+ydelta) ޤǤ (x-xdelta,y) (x+xdelta,y) ޤǡ뤤 (x,ylow) (x,yhigh) ޤǤ (xlow,y) (xhigh,y) ޤǤʬ졢ƹΰü֤ޤ (`set bars` ȤƤʤ硣ܺ٤ϡʲ: `set bars`)ϡ4 6 ϥǡɬפǤ 4 : x y xdelta ydelta 6 : x y xlow xhigh ylow yhigh ǡݡȤƤʤ緿ηͿ줿硢`plot` ޥɤ `using` ե륿ȤäŬڤʷľʤȤޤ㤨 Хǡ (x,y,xdelta,ylow,yhigh) ȤǤ硢ʲΤ褦 ޤ: plot 'data' using 1:2:($1-$3):($1+$3):4:5 with xyerrorlines ɲ (5,7 ) ȡϳƥǡ variable color ȤƻȤޤ 2 yerrorlines ?commands set style yerrorlines ?commands set style errorlines ?plotting styles yerrorlines ?plotting styles errorlines ?set style yerrorlines ?set style errorlines ?style yerrorlines ?style errorlines ?yerrorlines Ffigure_yerrorlines `yerrorlines` (ޤ `errorlines`) 2 ΥǡΤ ѲǽǤ`yerrorlines` `linespoints` ˻Ƥޤľ 뤳Ȥ㤤ޤ (x,y) ǡǡθĿ˱ (x,y-ydelta) (x,y+ydelta) ޤǡޤ (x,ylow) (x,yhigh) ޤǤʬ졢ƹΰü֤ޤ (ܺ٤ϡʲ : `set bars`) ϡ3 4 ϤɬפǤ 3 : x y ydelta 4 : x y ylow yhigh ɲ (4,5 ) ȡ variable color Ȥ Ȥޤ ʲ⻲ȡ ^ <a href="http://www.gnuplot.info/demo/mgr.html"> 顼СΥǥ ^ </a> 2 3 () (3D (surface) plots) ?3D (surface) plots ?plotting styles 3d (surface) plots =3D =surface Ffigure_surface ϡޥ `plot` ǤϤʤޥ `splot` Ȥä `with lines` ȤС̤ʻǤޤ̤ ɤ٤ϡ `with pm3d` ǹԤȤǤޤ̤̾ 줬 3 ζ̤ǤȤϤä狼褦ʻɽޤ ξ硢X, Y, Z Ϥ٤ɽޤ3 ŪʺФϡ 䡢Ǥοˤꡢޤʲ: `hidden3d`, `set pm3d` ΥץǤ `depthorder` Ffigure_surface+contours ޥ `splot` ϡ Z ͤФ׻褹뤳Ȥ ޤϡ̤켫Τξ˽񤯤ȤǤޤXY ʿ̤ؼͱƤ뤳ȤǤޤʲ: `set contour` 3 2 ͱ (set view map) ?2D projection (set view map) ?projection Ffigure_mapcontours ޥ `splot` ̤ʾȤơ Z μͱƤˤ롢Z ɸ 2 ̤ؤϿ޺ (map) ޤʲ: `set view map` ⡼ɤϡ䲹ʬۤΤѤǤޤ 1 ޥ (Commands) ?commands ΥǤ `gnuplot` դ륳ޥɤ򥢥ե٥åȽ ¤٤ƤޤΥɥȤ˰ΤƤΥޥɤޤ Ǥޤ÷ǻȤǤɥȤϴǤϤʤǽ ޤºݡθФβ˲Υޥɤɽʤƥब ޤ ۤȤɤξ硢ޥ̾ȤΥץϡʶ路ʤϰϤǾά 뤳ȤǽǤʤ"`plot f(x) with lines`" "`p f(x) w li`" Ȥ뤳ȤǤޤ 񼰤εҤˤơ楫å ({}) ɲûǤ̣ (|) ϸߤ¾ŪʰڤΤȤޤ 2 cd ?commands cd ?cd `cd` ޥɤϥȥǥ쥯ȥѹޤ : cd '<ǥ쥯ȥ̾>' ǥ쥯ȥ̾ϰ˰ϤޤƤʤФʤޤ : cd 'subdir' cd '..' Хåå (\) Ű (") Ǥ̤ʰ̣äƤޤ ˥פɬפޤΤǡWindows 桼ˤñ Ȥ򴫤ޤ㤨С cd "c:\newdata" ǤϼԤޤ cd 'c:\newdata' cd "c:\\newdata" ʤ̤ưǤ礦 2 call ?commands call ?call `call` ޥɤϡ1 Ĥεǽʳ `load` ޥɤǤ εǽϡ10 ĤޤǤΥѥ᡼򥳥ޥɤɲäǤ뤳ȤǤ (ѥ᡼ɸŪʹʸ§ˤäƶڤޤ)Υѥ᡼ ϡե뤫ɤޤԤ뤳ȤǤޤ`call` ե뤫ƹԤɤޤˡ`$` (ɥ뵭) ³ (0--9) Ӥޤ⤷ĤС¤Ӥ `call` ΥޥɹԤб ѥ᡼֤ޤ`call` ιԤǤΥѥ᡼ʸ ƻꤵƤʤСϤǤ䤬ʤޤ ʸ `$#` ϥѥ᡼θĿ֤ޤʸ³ `$` Ϥʸˤʤޤ㤨СĤ `$` ˤ `$$` Ȥޤ `call` ΥޥɹԤ 10 Ĥ¿ѥ᡼Ϳȥ顼 ޤͿʤäѥ᡼ϡ̵Ȥưޤ`call` Υեˤ `load` ޤ `call` ޥɤäƤ⹽ : call "<ϥե>" <ѥ᡼ 0> < 1> ... < 9> ϥե̾ϰǰϤޤʤФʤޤ󡣤ơѥ᡼ ǰϤळȤ侩ޤ (gnuplot ξΥСǤϰ ϤǤʬȰϤǤʤʬФƤϰ㤦갷򤹤ͽǤ) : ե 'calltest.gp' ϰʲιԤޤǤȤ: print "argc=$# p0=$0 p1=$1 p2=$2 p3=$3 p4=$4 p5=$5 p6=$6 p7=x$7x" ιԤϤ: call 'calltest.gp' "abcd" 1.2 + "'quoted'" -- "$2" ʲΤ褦ɽǤ礦: argc=7 p0=abcd p1=1.2 p2=+ p3='quoted' p4=- p5=- p6=$2 p7=xx : `using` ѤƤǡեǤʸˡŪ˽ŤʤäƤޤ ξ硢`call` 줿ǡե뤫ץåȤȤϡǡ n ܤλؼˤ `$$n` ޤ `column(n)` ѤƤ 2 clear ?commands clear ?clear `clear` ޥɤϡ`set output` 򤵤줿̤ޤϽ֤򥯥 ޤ̾ϡɥԡ֤ФƤϲڡԤޤ 򤹤ˤ `set terminal` ѤƲ Ĥν֤ `clear` ޥɤǤ `set size` 줿 ΰΤߤõޤΤᡢ`set multiplot` ȤȤ˻Ѥ뤳Ȥ ޤĺ뤳ȤǤޤ : set multiplot plot sin(x) set origin 0.5,0.5 set size 0.4,0.4 clear plot cos(x) unset multiplot Υޥɤξܺ٤ˤĤƤϡʲ: `set multiplot`, `set size`, `set origin` 2 Do ?commands do ?do : do for <iteration-spec> { <commands> <commands> } ϡޥʣ¹Ԥޤޥɤ楫å {} ǰϤߡ ijϥå "{" ϡ `do` ƱԤ֤ɬפޤ ΥޥɤϡŤ (äʤ) if/else ʸȰ˻ȤȤ Ǥޤ󡣷֤ <iteration-spec> ˤĤƤϡʲ: `iteration`: set multiplot layout 2,2 do for [name in "A B C D"] { filename = name . ".dat" set title sprintf("Condition %s",name) plot filename title name } unset multiplot 2 evaluate ?commands evaluate ?evaluate ޥ `evaluate` ϡʸȤͿ줿ޥɤ¹Ԥޤ ʸ˲ʸƤϤޤ : eval <string expression> ϡäƱͤΥޥɤη֤ͭѤǤ : set_label(x, y, text) \ = sprintf("set label '%s' at %f, %f point pt 5", text, x, y) eval set_label(1., 1., 'one/one') eval set_label(2., 1., 'two/one') eval set_label(1., 2., 'one/two') ʸ󤫤饳ޥɤ¹Ԥ̤ˡ˴ؤƤϡʲ: `substitution macros` 2 exit ?commands exit ?exit `exit` `quit` ξޥɤ END-OF-FILE ʸ (̾ Ctrl-D) Ʊ͡ ߤϥȥ꡼ࡢʤüäѥϡե ( ) Ϥλޤ ϥȥ꡼ब (Ū `load` ΥץȤ) ˤʤäƤ 硢ɤ߹ߤϿƤΥȥ꡼Ƿ³ޤȥåץ٥Υȥ꡼ब ĤȡץϤ켫Ƚλޤ ޥ `exit gnuplot` ϡľˡ̵ˡ㤨ϥȥ꡼ ¿ʳ˥ͥȤƤƤ⡢gnuplot λޤξ硢 ƤƤνϥեϤ줤˴ʷǤĤʤǽ ޤ: bind "ctrl-x" "unset output; exit gnuplot" ܺ٤ϡʲ: `batch/interactive` 2 fit ?commands fit ?fit ?least-squares ?Marquardt `fit` ޥɤϥ桼Ϳ (x,y) ޤ (x,y,z) ηΥǡ νؤƤϤǽˤޤˤ Marquardt-Levenberg ˡ Ǿˡ (NLLS) μѤޤ˸ ѿϤƤϤΥѥ᡼ȤƻȤȤǤޤ μ֤ͤϼ¿Ǥɬפޤ : fit {<ranges>} <expression> '<datafile>' {datafile-modifiers} via '<parameter file>' | <var1>{,<var2>,...} ϰ (xrange,yrange) ϡƤϤǡŪ¤Τ ȤȤǤϰϤĶǡ̵뤵ޤν񼰤 `plot` ޥƱ [{dummy_variable=}{<min>}{:<max>}], Ǥʲ: `plot ranges` <expression> ̾Ϥ餫桼줿 f(x) ޤ f(x,y) δؿǤ`gnuplot` ͭǤդοǤޤ <datafile> `plot` ޥɤƱͤ˰ޤ`plot datafile` ν (`using`, `every`,...) ϡ`smooth` Ȥޤ괫ʤ `thru` ơ `fit` ˻ȤȤǤޤʲ:`plot datafile` ƤϤ 1 ѿؿ z=f(x) ؤΥǥեȤΥǡν񼰤 z x:z ǤĤޤꡢǡ 1 󤷤ʤФϽ°ѿ (ؿ) ȸ ʤ졢ֹ椬Ωѿ (ѿ) Ȥʤꡢ2 ΥǡС1 ܤΩѿ͡2 ܤ°ѿͤȤʤޤ ηϥǡեؤ `using` ҤѹǤ㤨 z ͤ¾󤫤äꡢ뤤ʣ󤫤׻ͤȤ뤳ȤǤ ޤ3 ܤ `using` (ֹ桢ޤϿ) Ϳ줿ϡ б z ͤɸкȤƲᤵ졢ϤΥǡؤν (=1/s**2) ׻Τ˻ȤޤǤʤСƤΥǡ ƱŤ (1) Ƿ׻ޤ`using` ץꤷʤä 硢3 ܤΥǡäǤǡ z кɤޤޤ ǡξϽŤ 1 ˤʤޤ 2 ѿؿ z=f(x,y) ƤϤ硢ǡν񼰤 `using` ˤ 4 Ĥι x:y:z:s ׵ᤵޤϴƤͿʤФ 餺­ܤФƤϤɤǥեȤϲꤵƤޤ󡣳 ǡνŤߤϾƱͤ 's' ׻ޤ⤷ɾä ʤСͤȤƻꤹФǤ礦 (ʲ: `plot datafile using`)㤨 `using 1:2:3:(1)` Τ褦ˡ ƤϤؿˤϡΩѿ 5 Ĥޤǻޤ1 ѿʳξ ϡΩѿθĿ 2 ¿ `using` 򤷤ʤФ 󡣵񼰡ƥǥեȤΥߡѿ̾ϰʲ̤Ǥ: z x:z x:z:s x:y:z:s x:y:t:z:s x:y:t:u:z:s x:y:t:u:v:z:s ߡѿ̾ϡˤ褦ϰϻˤäѹǤޤǽ Ϥ `using` κǽΤΤбʲƱͤǤz (°ѿ) ϤǤޤ̾ѹǤޤ ʣΥǡʣ 1 ѿؿƱƤϤ뤳Ȥ⡢y ' ѿ' ȤвǽǤ㤨ХǡֹȤ2 ѿؿؤƤ ᡢȤФǤ礦ʲ: `fit multi-branch` `via` Ҥϡѥ᡼Ĵľܤޤϥѥ᡼ե Ȥ뤳ȤˤäƹԤꤷޤ : f(x) = a*x**2 + b*x + c g(x,y) = a*x**2 + b*y**2 + c*x*y FIT_LIMIT = 1e-6 fit f(x) 'measured.dat' via 'start.par' fit f(x) 'measured.dat' using 3:($7-5) via 'start.par' fit f(x) './data/trash.dat' using 1:2:3 via a, b, c fit g(x,y) 'surface.dat' using 1:2:3:(1) via a, b, c fit a0 + a1*x/(1 + a2*x/(1 + a3*x)) 'measured.dat' via a0,a1,a2,a3 fit a*x + b*y 'surface.dat' using 1:2:3:(1) via a,b fit [*:*][yaks=*:*] a*x+b*yaks 'surface.dat' u 1:2:3:(1) via a,b fit a*x + b*y + c*t 'foo.dat' using 1:2:3:4:(1) via a,b,c h(x,y,t,u,v) = a*x + b*y + c*t + d*u + e*v fit h(x,y,t,u,v) 'foo.dat' using 1:2:3:4:5:6:(1) via a,b,c,d,e ȿθġΥƥåפθǡƤϤθߤξ֤ˤĤƤξܺ٤ʾ ̤ɽޤǽȺǸξ֤˴ؤƱ "fit.log" Ȥեˤ񤭽ФޤΥեƤϤ äʤ褦˾ɲäƤޤ˾ʤ뤤 ̾ˤǤޤޥ `set fit logfile` Ȥäƥե̾ ѹ뤳ȤǤޤ gnuplot `set fit errorvariables` Ȥ褦˥󥹥ȡ뤵 ơΥޥɤѤ硢ƤϤѥ᡼θϡΥ ᡼Ȼ̾ ("_err" ɲä줿̾) ѿ¸ޤ äƤθ򹹤ʤ׻ϤȤƻѤ뤳ȤǤޤ ƤϤȿ Ctrl-C 򲡤ȤǤǤޤߤȿ˽ λ塢 (1) ƤϤߤƸߤΥѥ᡼ͤѤ (2) ƤϤ³Ԥ (3) Ķѿ FIT_SCRIPT ǻꤷ `gnuplot` ޥɤ¹Ԥ Τ줫֤ȤǤޤFIT_SCRIPT ΥǥեȤ `replot` ꡢäƤ⤷ǡƤϤؿĤΥդˤ餫褷 СߤƤϤξ֤ɽ뤳ȤǤޤ `fit` λϡǸΥѥ᡼ͤ¸Τ `update` ɤȤޤͤϺƤӥѥ᡼ͤȤƻȤȤǤޤ ܺ٤ϡʲ: `update` 3 ѥ᡼Ĵ (adjustable parameters) ?commands fit parameters ?fit parameters ?commands fit adjustable_parameters ?fit adjustable_parameters ?fit_parameters `via` ϥѥ᡼Ĵ᤹뤿 2 ĤˡǤޤĤ ޥɥ饤󤫤ľܻؼΤǡ⤦Ĥϥѥ᡼ե ȤƴŪ˹ԤΤǤ 2 ĤϽͤǰäˡ ޤ Ĵѥ᡼ϡ`via` ɤθ˥ޤǶڤ줿ѿ̾ ΥꥹȤ񤯤ȤǻǤޤƤʤѿϽ 1.0 ƺޤƤϤϡѿνͤ餫Ŭڤͤ ꤵƤ¿ʬ®«Ǥ礦 ѥ᡼եϸġΥѥ᡼򡢸̤ 1 Ԥ˰Ĥġͤ Τ褦ʷǻꤷƽ񤭤ޤ ѿ̾ = '#' ǻϤޤ륳ȹԤԤޤ̤ʷȤ ѿ̾ = # FIXED ϡѿꤵ줿ѥ᡼Ǥ뤳Ȥ̣ϤΥե ǽޤĴϤޤ󡣤ϡ`fit` ǥݡȤ ѿǡɤ줬ꤵ줿ѿǤ뤫ΤͭѤǤ礦 `# FIXED` ȸɤϸ̩ˤηǤʤƤϤʤޤ 3 fit γά (fit beginners_guide) ?commands fit beginners_guide ?fit beginners_guide ?fit guide ?fitting `fit` ϡͿ줿ǡͿ줿桼ؿˤäȤɤ ƤϤ褦ʥѥ᡼򸫤ĤΤ˻ȤޤƤϤϡ ƱǤϥǡȴؿͤȤμ뤤ϻĺ (SSR:Sum of the Squared Residuals) ¤Ƚꤵޤ̤̾() ȸƤФޤΥ르ꥺ SSR Ǿ뤳Ȥ򤷤褦 ޤ⤦ܤȡǡ (ޤ 1.0) νŤߤĤĺ (WSSR) κǾԤäƤޤܺ٤ϡʲ: `fit error_estimates` 줬() ǾƤϤˡȸƤФ椨Ǥ`` ̣ƤΤ򸫤뤿Ҳ𤷤ޤˤĤ ˤĤƽҤ٤ƤޤǤϴñΤᡢ1 ѿΥ桼 ؿ z=f(x), 2 ѿδؿ z=f(x,y) Τ褦ˤ⽾°ѿ z Ѥ뤳Ȥˤޤѥ᡼Ȥ `fit` ĴŬڤͤ ꤹ桼ѿǡؿ̤οǤǸ /Ȥϡ°ѿ z `fit` Ĵѥ᡼Ȥδط ΤǤꡢz Ωѿ x (ޤ x y) ȤδطΤȤǤϤ ޤ (Ū˽Ҥ٤ȡǾǤϡƤϤؿΥѥ᡼ ˤ 2 (ƹ˹ⳬ) Ƴؿ 0ȤȤˤʤޤ) Ǿˡ (LLS) Ǥϡ桼ؿñʴؿ¤Ǥꡢ ϰĤΥѥ᡼ܤ¾Υѥ᡼ޤޤʤˤʤޤ Ǿˡ (NLLS) ǤϤʣʴؿ򰷤ѥ᡼Ͽ Ȥ򤵤ޤաꥨκǾˡΰ㤤ɽ ĤǤաꥨǤϰĤι z=a*sin(c*x) + b*cos(c*x). Τ褦ɽޤ⤷a b ̤Τʥѥ᡼ c Ȥ ѥ᡼ɾǾˤʤޤc ̤Τʥѥ᡼ ʤФˤʤޤ ξ硢ѥ᡼ͤŪñľˡˤäƷ ޤΤ褦 LLS üʾǤꡢ'gnuplot' Ѥ ȿˡϡ󤽤ޤơŪ NLLS 򤯤ȤǤ ޤ`fit` ϸԤȤǺǾͤõȤޤȿγƥƥå ϡѥ᡼οͤȤФ WSSR ׻ޤMarquardt- Levenberg Υ르ꥺϼΥƥåפΥѥ᡼ͤ򤷤ޤ ƤϤ餫Ϳࡢʤ(1) ƤϤ᤬ "«" (WSSR и FIT_LIMIT 꾮ʤä)ޤ (2) 餫 ꤵ줿ȿθ³ FIT_MAXITER (ʲ: `fit control variables`) ã硢Τ줫ޤ³ ޤܡɤ餽ƤϤȿǤǤޤ³ ߤ뤳ȤǤޤ (ʲ: `fit`)桼ѿ FIT_CONVERGED ϡ ľ fit ޥɤ«ˤ꽪λ 1 ޤߡʳͳ Ǥ 0 ޤߤޤ ƤϤ˻ȤؿϤФФǥ (ޤϤ) 򸵤ˤ ơϥǡο򵭽Ҥꡢ뤤ͽ¬褦Ȥޤ `fit` ϡǡΥǥˤɤ줯餤ޤƤϤޤäƤΤ ꤹ뤿ᡢƸġΥѥ᡼θϰϤɾ뤿ˡ μͳʥѥ᡼ͤΤ˻Ȥޤʲ: `fit error_estimates` ǤʤСˤƤϤˤؿϡǥȤ̵ط ФƤޤ (ϽʬɽϤȺǤ⾯ʤΥѥ᡼ǡ η򵭽ҤʴؿȤƷи˴ŤФǤ礦) ⤷ʤƤΥǡ̤褦ʳ餫ʶߤʤ `fit` ǤϤʤष `plot` `smooth` ץǤԤ٤ 礦 3 ɾ (error estimates) ?commands fit error_estimates ?fit error_estimates ?fit errors `fit` ˤ "" ȤѸ 2 Ĥΰۤʤäʸ̮Ѥޤ Ĥϥǡ⤦Ĥϥѥ᡼Ǥ ǡϡʿĺνŤդ WSSRʤּꤹ ġΥǡŪʽŤߤ׻ΤѤޤϥѥ ɾ˱ƶͿޤϡ餬ƤϤ줿ؿ ġΥǡкǽŪͤͿƶ礭ꤹ뤳Ȥˤ ޤΤʥǡɾͿƤˤϡѥ᡼θ ɾ `fit` ϤϤΩĤǤ礦 'statistical overview' Ǥ `fit` νϤΤĤ 'practical guidelines' ФطʤҤ٤Ƥޤ 4 Ūʳ (statistical overview) ?commands fit error statistical_overview ?fit error statistical_overview ?statistical_overview Ǿˡ (Non-Linear Least-Squares; NLLS) ϡ ʬۤŪ˵ҤƤޤʤϥǡͿ줿 ʿѤȤʿѤФͿ줿ɸкĥ () ʬۤ˽ 콸ĤɸܤȲꤵޤʬ礭ɸܡ콸Ĥɸк Τ뤳ȤФƤϡּʬפѤơּ֦̾פȸƤФ ͤĴ٤뤳ȤˤƤϤɤפҤ٤뤳ȤǤޤ餵 ͳ٤Φּ (ּμͳ٤ϡǡοƤϤѥ ᡼θĿ) 1.0 ǤϡǡƤϤ줿 ؿȤкνŤߤĤ¤ߤΥѥ᡼ͤФؿͿ 줿ɸкˤäħդ줿콸ĤΡʥץФ ¤ȤƱǤ뤳Ȥ̣ޤ ʬ = פǤ夲׳Ʊ͡콸ĤɸкǤʤ硢 ϴ¬к¤ȴԤк¤ӤȤ˸̤˽Ť Ť٤Ǥ ǽʳ `fit` 'stdfit'ʤĺ RMS (ʿʿ) ǵ ƤϤɸкȡǡŤߤŤƤ ' 줿ּ' ȤƤФĺʬݡȤޤͳ (ǡ οƤϤѥ᡼ο) ϤɾǻѤ ʤʤ顢ǡλĺη׻ǻȤѥ᡼Ʊǡ ΤǤͤϰʲѿޤ: FIT_NDF = ͳ٤ο FIT_WSSR = ŤߤĤĺμ FIT_STDFIT = sqrt(WSSR/NDF) ѥ᡼˴ؤ뿮٥ɾ뤳ȤǡƤϤᤫǾ Φּȡ׵᤹뿮٥Φּͤꤹ뤿Φּ Ѥ뤳ȤޤΤ褦ͤѥ᡼Ȥ ꤹˤϡΤʤ׻ɬפȤʤǤ礦 `fit` Ͽ֤ηषǸȿʬ-ʬ󤫤ľ ѥ᡼θɾ𤷤ޤɾϡɸк ȤƷ׻̤λ˴ؤ׾ξ郎̤ˤǾ ǤݾڤʤΤǤǾǤɸ (ƥѥ᡼ ɸк) ƱˡǷ׻ޤƤΤᴷˤꡢ "ɸ" Ȥ "ɸ" ȸƤФƤޤɸϰ ̤˳ڴѲ᤮٥ηˤϻȤ٤ǤϤޤ󤬡Ūʻ ɸȤƤΩĤǤ礦 ǽŪʲϡϰϤˤѥ᡼ؤ򼨤ع : μгǡʤؤϾ 1 ǡƤΥѥ᡼ ΩʤгǤϤ٤ 0 ˶ᤤͤˤʤޤ¾䤤 2 Ĥѿϡ礭 1 ǡطؤؤˤä ʤгǤޤгǤ礭ۤɡ ѥ᡼ɸкɾϡɸ˶᤯ʤޤ 4 Ūʥɥ饤 (practical guidelines) ?commands fit error practical_guidelines ?fit error practical_guidelines ?practical_guidelines ?guidelines ġΥǡؤνŤߤŤγƤδäΤäƤʤ顢줬¬ ̤ФܤѤ褦ȤǤ礦㤨СĤ ¾ƤˤʤȤȤθ뤳ȤǽǤ ơϺǽŪʥѥ᡼ͤ˱ƶޤ ǡνŤդϡǸȿ `fit` ɲýϤФδ ͿޤƱ˽ŤդԤʤˤƤ⡢Ť 1 ȤȤ षʿɸкɾ뤳Ȥּ褬ˤꤽǤ ˡWSSR ̵ѿȤ뤳Ȥˤʤޤ ƤϤȿγʳǡƤϤοʹԤɾ˻ȤȤɽ ޤ ('*' Ϥ꾮 WSSR 򸫤Ĥʤäȡƺƻ ԤƤ뤳Ȥ̣ޤ)'sum of squares of residuals' (ĺμ ) ϡ'chisquare' (ּ) ȤƤФޤϥǡƤϤ ؿȤδ֤ WSSR ̣Ƥơ`fit` ϤǾ褦Ȥޤ ʳǡŤդ줿ǡˤäơּͤϼͳ (= ǡ ο - ѥ᡼ο) ˶դȤԤޤWSSR 줿 ּ (WSSR/ndf; ndf = ͳ)ޤƤϤɸк (stdfit = sqrt(WSSR/ndf)) ׻Τ˻ȤޤϺǽŪ WSSR Ф ƥݡȤޤ ǡŤդƤʤСstdfit ϡ桼ñ̤ǤΡǡ ƤϤؿк RMS (ʿʿ) ˤʤޤ ⤷ʥǡͿǡʬ¿ǥ뤬С ּͤϤۤ 1 ˤʤޤ (ܺ٤ϡŬ׳ؤܤ 'ּʬ ' ι򻲾ȤƤ)ξ硢γפ˽񤫤Ƥ뤳Ȱʳ ˡǥ뤬ǡˤɤ줯餤ɤƤϤäƤ뤫ꤹ뤿ɲ λˡĤޤ ּ褬 1 Ϥ뤫礭ʤä顢ʥǡɾ ʬۤʤǡƥ¬Ωɸ (outliers)ޤɤʤǥؿʤɤΤǤ礦㤨 `plot 'datafile' using 1:($2-f($1))` ʤɤȤƻĺ褹뤳Ȥϡ ΥƥŪʷΤ뤿μ꤬Ȥʤޤǡȴؿ ξԤ褹뤳Ȥϡ¾Υǥͤμ꤬ȤʤǤ礦 Ʊͤˡ1.0 꾮ּϡWSSR ʬۤĥ ʥץȴؿФƴԤΤ⾮Ȥ̣ ǡɾ礭ΤŪʲ꤬ʤΤޤ ϥǥؿŪơŪ˲äüʥץˤư ƤϤˤʤäƤΤǤ礦Ǹξϡꥷץʴؿˤ ФޤԤǤ礦 ɸŪʥ顼򡢥ѥ᡼Գ˴ؤ롢긽Ūɾ طդ뤳ȡعνɾ뤳ȤǤ褦ˤʤ ˡʤ `fit` ȡŬѤ褦Ȥ뤢˴Ƥ ɬפǤ礦 `fit` ϡǾˡμǤ϶̤ơΥμ (y-f(x))**2 νŤդ¤Ǿ褦Ȥ뤳ȤդƤ ϡx ͤ "" ׻˴ؤƤϤɤˡͿƤϤ餺ñ y ˴ؤɾΤߤǤޤ"Ω" (ʬۤΥǥΤ鳰 Ƥǡ) Ͼ˲򰭲ǽޤ 3 (control) ?commands fit control ?fit control `fit` ˱ƶͿ뤿Ǥ뤿 `gnuplot` ѿ ޤ `gnuplot` ư˰Ǥޤ `control_variable` ǾҲ𤷡`gnuplot` Ω 夬ꤹѿ `environment_variables` ǾҲ𤷤ޤ 4 ѿ (control variables) ?commands fit control variables ?fit control variables ǥեȤΤäȤ⾮θ³ (1e-5) ϡѿ FIT_LIMIT ѹǤޤĺʿ¤ 2 Ĥȿƥå״֤ǡοͤ 꾮Ѳʤä硢ƤϤ롼ϡ '«' ȸʤޤ ȿκͤѿ FIT_MAXITER ¤ޤ0 (ޤʤ) ̵̣ޤ ˤΥ르ꥺ椷ǡ Marquardt-Levenberg ꥺɤΤäƤϡˤ˱ƶͿѿޤ `lambda` () κǽͤϡ̾ ML 󤫤鼫ưŪ˷׻ޤ 򤢤餫Ѱդͤ˥åȤ FIT_START_LAMBDA ˥åȤƤFIT_START_LAMBDA 0 ʲ˥åȤȡưŪ ˷׻褦ˤʤޤѿ FIT_LAMBDA_FACTOR ϡּ貽줿ؿá뤤ϸˤĤ `lambda` 뤤ϸͿޤFIT_LAMBDA_FACTOR 0 Ȥȡ ǥեȤΰ 10.0 Ѥޤ `fit` ˤ FIT_ Ϥޤѿ¾ˤ⤢ޤ顢桼ѿȤ ƤϤΤ褦̾ǻϤޤѿϻȤʤ褦ˤΤǤ礦 ѿ FIT_SKIP FIT_INDEX ϡǤ `gnuplot` Ρ`gnufit` ȸ ФƤ `fit` ѥåǻȤƤΤǡߤϻѤƤޤ FIT_SKIP εǽϥǡեФ `every` ҤѰդƤ FIT_INDEX ʣƤϤˡ (multi-branch fitting) ǻȤƤ ΤǤ1 ѿʣƤϤˡϡǤ 3 ƤϤȤƹ ʤƤơǤϻޤλˤ 2 ѿ `using` ȤƤޤ ʲ: `fit multi-branch` 4 Ķѿ (control environment) ?commands fit control environment ?fit control environment Ķѿ `gnuplot` Ω夬ʤФʤޤ󡣤 ˡϥڥ졼ƥ󥰥ƥ˰¸ޤ FIT_LOG ϡƤϤΥ񤫤ե̾ (ӥѥ) ѹޤǥ ȤǤϡȥǥ쥯ȥ "fit.log" ȤʤäƤޤΥǥե Ȥͤϥޥ `set fit logfile` Ȥäƾ񤭤Ǥޤ FIT_SCRIPT ϡ桼Ǥ˼¹Ԥ륳ޥɤꤷޤǥեȤǤ `replot` Ǥ`plot` `load` ޥɤȤСƤϤοʹԾ ɽ򥫥ޥΤǤ礦 3 ʣƤϤ (multi-branch) ?commands fit multi-branch ?fit multi-branch ?multi-branch ?branch ʣƤϤˡ (multi-branch fitting) ǤϡʣΥǡ򡢶̤ ѥ᡼ʣ 1 ѿδؿˡWSSR ¤Ǿ뤳Ȥˤ äƱƤϤ뤳ȤޤƥǡФؿȥѥ᡼ () 'ѿ' ȤȤǤޤ㤨Сǡֹ (-1; 'ǡ' ֹ) ޤϥǡեֹ (-2) 2 ܤΩ ѿȤޤ : 2 Ĥλؿ z=f(x) ͿƤơ줾ۤʤǡ 򵭽ҤƤ뤬̤֤Υѥ᡼ͤɾ롣 ǡե뤬 x:z:s ηǤäȤȡξʲΤ褦ˤ Ф褤 f(x,y) = (y==0) ? a*exp(-x/tau) : b*exp(-x/tau) fit f(x,y) 'datafile' using 1:-2:2:3 via a, b, tau ʣˤĤƤϡǥե "fit.dem" ǻȤ "hexa.fnc" 򻲾ȤƤ ⤷°ѿΥ˺硢ñ̤νŤդǤ 1 Ĥλޤ ۤƤޤǽΤǡŬʽŤդɬפˤʤޤƻޤ ХƤϤΤʣƤϤˡβͤȤѤΤϡ 碌γƻޤФŪʱƶ˴ؤɽͿ뤳Ȥˤʤ 礦 3 (starting values) ?commands fit starting_values ?fit starting_values ?starting_values ƤϤϡŪʺŬ (ĺμ (SSR) κǾͤIJ) ؤμ«ݾڤϤޤ󤬡ɽŪʶ˾ͤͿ뤳ȤϤǤޤ ֥롼Ϥꤹˡ򲿤碌ƤʤΤǡ줬 äɤȽǤΤϤʤǤȤʤޤ `fit` ϡ򤫤󤯤ϤȼԤ뤫Τޤ󤷡ФФ ϵޤ󤯤ȤΤϡSSR 礭ѥ᡼ѲФ Ѳ뤤ϿŪ԰ΰ (㤨пͤ礭 ưη夢դ򵯤) ãƤޤäơη "̤ (undefined value)" Υå `gnuplot` ߤƤޤ 褦ʾ̣ޤ ŪʺŬͤ򸫤Ĥǽˤϡǽͤ򤽤β˾ʤ Ȥۤܶ᤯˼٤Ǥ礦㤨С⤷ǽʤаʬ礭 ϰǡǽͤ˶ᤤۤ¾βǽλƤޤǽ㤯ʤ ޤǽͤ򸫤ĤĤˡϡǡƤϤؿƱ ξ褷Ŭʶᤵãޤǡѥ᡼ͤѹ `replot` 뤳Ȥ򷫤֤ȤǤϡ褯ʤƤϤζ˾ͤ Ϥ᤬λɤåΤˤͭѤǤ Ŭ٤ɤƤϤ᤬"褤" ƤϤ (ɤ ƤϤɤδˤäħդ줿׳Ūʰ̣ǡ뤤 ΥǥΤŬڤʲǤ롢ȤʪŪʰ̣) ¸ߤʤ ξˤϤʤޤˤäƤϡƥѥ᡼ΰ̣ΤϰϤ С褦͡ʽͤνФ `fit` 뤳Ȥ˾ޤ Τޤ 3 ҥ (tips) ?commands fit tips ?fit tips ?tips Ǥϡ`fit` ¤Ѥ뤿ˤĤФƤ٤ҥȤ Ҳ𤷤ޤȿŪǤϤʤΤǡܼ߹ޤDz ɤǤ `fit` ΰ `via` ˤϡ2 Ĥ礭ۤʤŪΤ 2 Ĥη ޤ`via "file"` ηϡХå (÷Ǥμ¹Ԥǽ) ǺǤɤȤ졢ΥեǽͤͿޤθǷ̤¾ (ޤ Ʊ) ѥ᡼ե˥ԡ뤿 `update` Ȥ Ȥޤ `via var1, var2, ...` η÷μ¹ԤɤȤ졢ޥɥҥ εȤäƥѥ᡼ꥹȤԽԤƤϤ¹Ԥꡢ 뤤ϿͤͿƼμ¹ԤԤʤäꤷޤ񤷤 ФƤäͭѤǡƤΥѥ᡼Ф 1 ٤ƤϤľ ¹ԤƤ⡢ɤͤǤʤФޤʤȤ뤫Ǥ 򸫤ĤˤϡĤΥѥ᡼ΤߤФƲȿԤʤ ǽŪˤƤΥѥ᡼Ф 1 ٤ƤϤ᤬ޤȤ ʬ᤯ʤޤǤ򷫤֤ȤǤ ƤϤԤʤؿΥѥ᡼֤˶̤ΰ¸طʤȤϳǧ Ƥ㤨Сa*exp(x+b) ƤϤ˻ȤäƤϤޤ󡣤 a*exp(x+b)=a*exp(b)*exp(x) ǤäƤξ a*exp(x) ޤ exp(x+b) ȤäƤ Ūʤ: ѥ᡼礭Ϥޤ㤤ƤϤޤ Ǥ礭ѥ᡼ȺǤ⾮ѥ᡼椬礭ƤϤμ «٤ʤޤ椬ޥư٤εտ˶ᤤޤ ϤʾʤСۤȤɱʵפ˼«ʤݤǤ礦 Ƥδؿ򤳤򤱤褦˲ɤʤФޤ㤨Сؿ 'parameter' '1e9*parameter' ˤȤޤϺǽͤ 1e9 dzȤ ⤷ؿƤϤѥ᡼򷸿Ȥ롢ñʴؿ 񤱤ʤ顢ϤȤƤ⤤Τ󤽤ƤΤʤ顢꤬ ϤǤϤʤΤǡȿϾʤǼ«Ǥ礦⤷ 餿äǤफ⤷ޤ ºݤμ¸ιֵǤϥǡϤФ뤤ĤλؼͿ졢 ǡؤκǽδؿƤϤ᤬Ԥʤޤ⤷ȡ ʣ¦̤ˤҤȤĤбʣΥץɬפΤޤ󤬡 ƤδؿƤϤΥѥ᡼ߤä ФǤ礦`fit` ȤСѥ᡼λľܥ ǥؿ񤯤ȤˤꡢϤФ 1 ǺѤΤǤϤ 񤷤ƤϤη׻ȤޤǡѴ⤫ʤγ 򤱤뤳Ȥޤ⤷줬ƤϤؿñ㲽˴ؤơ ̷⤷ƤȻפʤ顢Ǥ "singular matrix" Υåϡ Marquardt-Levenberg 르ꥺ Υ롼󤬡ȿФѥ᡼ͤη׻ʤȤ ̣ޤξ硢̤ʽͤϤ뤫ؿ̤ʷǽľ ñʴؿˤƤߤƤ Ǹˡ¾ƤϤѥå (fudgit) Υޥ˥奢뤫顢ʸ 󤹤褦ʤѤ夲ޤ: "Nonlinear fitting is an art! ( ƤϤˡϷݽѤ !)" 2 help ?commands help ?help `help`ޥɤϡȤ߹ߥإפɽޤˤĤƤ ꤷȤˤϡν񼰤ȤäƲ: help {<̾>} ⤷ <̾> ꤵʤäϡ`gnuplot` ˤĤƤδñ ɽޤꤷܤˤĤƤɽ줿塢Ф ܤΥ˥塼ɽ졢κ̾Ϥ뤳ȤǺܤФإ ³뤳ȤǤޤơκܤɽ줿ˡ ̾Ϥ׵ᤵ뤫ޤ 1 ιܤΥ٥ޤ 򷫤֤Ȥ䤬ơ`gnuplot` Υޥɥ饤ؤޤ ޤ (?) ܤȤƻꤹȡߤΥ٥ιܤΥꥹȤ ɽޤ 2 history ?commands history ?history ޥ `history` ϡԽޥɥ饤 (history) ɽꡢΰ¸ꡢΰĤ¹Ԥꤷޤ ǻˡҲ𤷤ޤ: history # Τɽ history 5 # ľ 5 Ĥɽ history quiet 5 # ȥֹʤľ 5 Ĥɽ history "hist.gp" # Τե hist.gp ˽񤭽Ф history "hist.gp" append # Τե hist.gp ɲä history 10 "hist.gp" # ľ 10 Ĥե hist.gp ˽ history 10 "|head -5 >>diary.gp" # ѥפ 5 Ľ񤭽Ф history ?load # "load" ǻϤޤΤ٤Ƥɽ history ?"set c" # Ʊ (ʣθϰǰϤ) hi !reread # "reread" ǻϤޤǤ⿷Ԥ¹ hist !"set xr" # Ʊ (ʣθϰǰϤ) hi !hi # ƤƤߤ :-)) popen ؿ򥵥ݡȤ褦ʥƥ (Unix ʤ) ǤϡνϤ ѥ׷ͳ¾γץϤȤǤޤξ硢 Ĥˤ褦ˡե̾Ȥƥޥ̾Ƭ '|' Ĥ Ȥޤ 2 if ?commands if ?if : if (<condition>) { <command>; <command> <commands> <commands> } else { <commands> } ν: if (<>) <ޥɹ> [; else if (<>) ...; else ...] ΥС gnuplot ϡif/else Υ֥å򥵥ݡȤƤ  `if`, `else` θ˳ϥå "{" ³硢"}" λ֥åޤǤΤ٤Ƥʸ (ʣϹԤ) ˾Ūʼ¹ԤŬ Ѥޤif ޥɤҤˤ뤳ȤǤޤ Ť 1 Ԥ if/else ʸޤݡȤƤޤ֥ ν񼰤ȤϺƤϤޤ󡣰ʲ: `if-old` 3 if-old ?if if-old ?if-old gnuplot С 4.4 ޤǤϡif/else ޥɤϰϤ 1 α ޤäƤޤߤ楫å { } ǰϤळȤʣԤˤ뤳Ȥǽ ˤʤäƤޤθŤĤƤޤ楫åΥ֥ ǻȤȤϤǤޤ  `if` "{" Ȥʤʤϡ<> (Ǥʤ) ʤ <ޥɹ> Υޥ (ʣ) ¹Ԥ졢 () ʤ åפޤξϹԤκǸˤʤ뤫`else` ȤޤǤ줬Ԥޤ`;` ȤƱԤʣΥޥ֤ ǽǤդΥޥ (`if` ιʸ) ϤǤϽʤ ȤդƤ : pi=3 if (pi!=acos(-1)) print "?Fixing pi!"; pi=acos(-1); print pi ¹Ԥȡ ?Fixing pi! 3.14159265358979 ɽޤ if (1==2) print "Never see this"; print "Or this either" Ȥȡɽޤ ¾: v=0 v=v+1; if (v%2) print "2" ; else if (v%3) print "3" ; else print "fred" (٤ǸιԤ򷫤֤ƤߤƤ !) if reread Ȥäƥ롼פϡʲ: `reread` 2 ֤ (iteration) ?iteration ?iterate `plot`, `splot`, `set`, `unset` ޥɤǤϡ֤ȤȤ ޤϡŪʥޥɤʣ¹Ԥ̤ΤΤ Τμ¹ԤǤϷ֤ѿˤäƿϺɾޤ`do` ޥ ɤǤϡɤʥޥǤ֤ⷫ¹Ԥ뤳ȤǤޤ֤ ϸߤϰʲ 2 Ĥη򥵥ݡȤƤޤ: for [intvar = start:end{:increment}] for [stringvar in "A B C D"] : plot for [filename in "A.dat B.dat C.dat"] filename using 1:2 with lines plot for [basename in "A B C"] basename.".dat" using 1:2 with lines set for [i = 1:10] style line i lc rgb "blue" unset for [tag = 100:200] label tag ֤Ҥ⥵ݡȤƤޤ: set for [i=1:9] for [j=1:9] label i*10+j sprintf("%d",i*10+j) at i,j ʤˤĤƤϡʲ: `plot iteration`, `do` 2 load ?commands load ?load `load` ޥɤϡꤵ줿ϥեγƹԤ򡢤줬Ū 줿Τ褦˼¹Ԥޤ`save` ޥɤǤĤ줿եϡ `load` 뤳ȤǤޤͭʥޥɤν񤫤줿ƥȥե ĤСϡ`load`ޥɤˤäơ¹Ԥ뤳ȤǤޤ `load` Υեˤ `load` ޤ `call` ޥɤä ⹽ޤ󡣥ޥΥȤˤĤƤϡʲ: `comments` `load` Ȥ˰ͿˡˤĤƤϡʲ: `call` : load "<ϥե̾>" ϥե̾ϰǰϤޤʤФʤޤ `load` ޥɤϡɸϤΥޥɤϤΤˡ̤ʥե ̾ "-" ѰդƤޤϡ`gnuplot` Υޥɥե뤬 ĤΥޥɤɸϤդ뤳Ȥ̣ޤܺ٤ˤĤ ϡʲ: `batch/interactive` Unix Τ褦 popen ؿ򥵥ݡȤ褦ʥƥǤϡ'<' ǻϤޤ ե̾ˤ뤳Ȥǡϥեѥפɤ߹ळȤǤޤ : load 'work.gnu' load "func.dat" load "< loadfile_generator.sh" `gnuplot` ؤΰȤͿ줿ե̾ϡۤΤ `load` ޥɤˤäƼ¹Ԥޤϡꤵ줿˥ɤ졢θ `gnuplot` Ͻλޤ 2 lower ?commands lower ?lower : lower {plot_window_nb} ޥ `lower` (`raise` ȿ) ϡ`pm`, `win`, `wxt`, `x11` gnuplot ÷Ϸμ¹ˡ襦ɥ (ظ) ˲ 襦ɥ򡢥ǥȥå׾Υɥޥ͡ z ɥνŤʤβ֤ޤ `x11` `wxt` Τ褦ʣ襦ɥ򥵥ݡȤƤ硢 եȤǤϤΥޥɤϤʣΥɥ߽˲ǽ 줿ɥֲˡǸ˺줿ɥ־¤٤ ץֹ椬Ϳ줿硢б襦 ɥ¸ߤФΤߤޤ ץϡñ襦ɥνϷʤ `pm` `win` Ǥ̵뤵ޤ 2 pause ?commands pause ?pause ?pause mouse `pause` ޥɤϡޥɤ³Ǥդʸɽ塢ꤵ ֤ޤϡԥޤԤޤ`pause` ޥɤϡ `load` ѤΥեȶ˻ѤȡˤʤǤ礦 : pause <time> {"<string>"} pause mouse {<endcondition>}{, <endcondition>} {"<string>"} <time> ϡǤդޤϼǤ-1 ꤹȲԥ Ԥޤ0 ꤹȰԤοꤹȤÿ ޤ¹ԴĶðʲλֻ򥵥ݡȤƤʤ硢λ֤ ÿ˴ݤޤ`pause 0` `print` ƱǤ ѤƤϷ `mousing` (ޥǽ) 򥵥ݡȤƤ硢 `pause mouse` ϡޥå뤫 ctrl-C ޤԤĤ褦 ˤʤޤǤʤϷޤϥޥǽͭˤʤäƤʤ `pause mouse` `pause -1` ƱǤ ġ뤤ʣνλ (endcondition) `pause mouse` θͿ 줿硢ΤΤɤΰĤǤ pause ϽλޤǤ뽪 λϡ`keypress`, `button1`, `button2`, `button3`, `close`, `any` Τ줫Ǥpause Ϥˤäƽλ硢줿 ASCII ɤ MOUSE_KEY ¸졢ʸ켫Ȥϡ1 ʸʸ Ȥ MOUSE_CHAR ֤ޤ`keypress` λΰĤǤС ۥåȥ (ƥޥ) ̵ˤʤޤ`buttons3` λ ΰĤǤС絡ǽ̵ˤʤޤ ɤξǤޥκɸѿ MOUSE_X, MOUSE_Y, MOUSE_X2, MOUSE_Y2 ¸ޤʲ: `mouse variables` : `pause` ޥɤ OS ؤΥޥɤǤΰǤϤʤΤǡ ۤʤ֤Ǥϰۤʤư򤹤ǽޤ(ϡƥ ȥեåɤΤ褦˺ߤ뤫ˤޤ) : pause -1 # ԥޤԤ pause 3 # 3 Ԥ pause -1 "³ˤ return ǤäƤ" pause 10 "ʤǤ ? 3 spline Ǥ" pause mouse "򤷤ǡǤդΥܥ򥯥åƤ" pause mouse keypress "ͭʥɥ A-F ʸϤƤ" pause mouse button1,keypress pause mouse any "ǤդΥܥǽλޤ" Ǥ "pause mouse key" ϡͭ襦ɥǤǤդΥ ϤˤäƺƳޤ̤ʥϤޤԤĤ褦ˤϡ Τ褦 reread ˤ롼פȤȤǤޤ: print "襦ɥ Tab ǤĤޤ" load "wait_for_tab" ե "wait_for_tab" ϰʲΤ褦ʤΤǤ: pause mouse key if (MOUSE_KEY != 9) reread 2 plot ?commands plot ?plot `plot` `gnuplot` ǿޤδŪʥޥɤǤ ϴؿ ǡ¤¿ˡɽޤ`plot` 2 δؿǡ Τ˻Ȥ졢`splot` 3 ζ̤ǡ 2 Ƥޤ `plot` `splot` ¿ζ̤εǽ󶡤ޤΰ㤤ˤĤƤ ʲ: `splot`äդƤޤ`binary <binary list>` `plot`, `splot` ξưޤξԤˤϾʰ㤤 ޤ : plot {<ranges>} {<iteration>} {<function> | {"<datafile>" {datafile-modifiers}}} {axes <axes>} {<title-spec>} {with <style>} {, {definitions{,}} <function> ...} ؿ <function>ޤϰǰϤޤ줿ǡե̾ (<datafile>) Τɤ餫Ϳޤؿ̾ 1 ܤοǤ޲ѿ⡼ (parametric) ˤƤ 2 ĤοȤǤؿϡȤ߹ߴؿ 桼ؿ뤤Ϥ plot ޥɤξͿΤΤ줫 ѤǤޤޤǶڤ뤳ȤǡʣΥǡؿ 1 ĤΥޥ ɤǤޤʲ: `data`, `functions` : plot sin(x) plot sin(x), cos(x) plot f(x) = sin(x*a), a = .2, f(x), a = .4, f(x) plot "datafile.1" with lines, "datafile.2" with points plot [t=1:10] [-pi:pi*2] tan(t), \ "data.1" using (tan($2)):($3/$4) smooth csplines \ axes x1y2 notitle with lines 5 plot for [datafile in "spinach.dat broccoli.dat"] datafile ʲ: `show plot` 3 (axes) ?commands plot axes ?plot axes ?axes (axes) ϡ4 ȤѤǤޤ;  <axes> ϡľ ɤμ˼٤碌뤫ȤȤ򤹤Τ˻Ȥޤ `x1y1` ϲμȺμ; `x2y2` Ͼȱμλ; `x1y2` ϲ ȱμλ; `x2y1` ϾȺμλǤ`plot` ޥɤǻꤵ 줿ϰϤϡκǽμ (Ⱥ) ˤΤŬѤޤ 3 binary ?binary ?data binary ?datafile binary ?plot data binary Хʥǡե: `gnuplot` СǤϡХʥΥǡեưŪ ˸ФΤ⤢ޤߤϥե̾θ `binary` Υ ɤͿ뤳ȤɬܤȤʤäƤޤե˴ؤ뽽ʬܺ٤ ϡ桼ޥɥ饤󤫤Ϳ뤫ޤϥݡȤƤ `filetype` ΥХʥΥե뤽켫ȤȴФ뤫ɬ ޤХʥեˤϡ礭 2 Ĥηbinary matrix binary general ޤ `binary matrix` ϡ32 ӥå IEEE ʤư (float) 2 η¤ӡκɸͤɽԤɲäƤޤ ASCII matrix Ʊ͡`using` ꥹȤˤƤϡɸѤ¤ (1 ) using 1 ܤ (x ɸ) бɸѤιԤ¤ (1 ) using 2 ܤ (y ɸ) бγͤ using 3 ܤ (z ɸ) бޤ `binary general` ϡǤոĤΥǡޤߡξϥ ɥ饤ǻꤹɬפޤ㤨 `array`, `record`, `format`, `using` ʤɤǥǡμǤޤ¾ˤ⡢ե إåɤФꡢǥ (endian) ѹ뤿ͭѤʥ ޥɤޤ֡ǡѴԤʤޥɤȤޤ ϡͤɸܲ줿ǡξ硢κɸեˤϴޤޤ Ȥɤ뤫Ǥmatrix Хʥ ASCII ǡȰäƤ Ǥgeneral Хʥ 1,2,3 Ȥä `using` ꥹȤ ֹȤ鷺ष 1 ܤϥե 1 ܡ뤤 `format` ꥹȤǻꤵ줿Ρˤʤޤ ޤޤ binary ץФŪʥǥեȤǽǡ `(s)plot <filename> binary ...` ޥɤͿ륪ץ Ʊ񼰤ǻǤޤν񼰤 `set datafile binary ...` Ǥ Ūʵ§ȤơǥեȤΥѥ᡼ϥե뤫ȴФ줿 ᡼Ǿ񤭤졢ϥޥɥ饤ǻꤵ줿̤ʥѥ᡼ Ǿ񤭤ޤ 㤨 `array`, `record`, `format`, `filetype` `binary general` ꤹ褦ʥɤĤƤʤСǥեȤΥХ `binary matrix` Ǥ general Хʥǡϡ̤ʥե̾ '-' Ȥäƥޥɥ饤 Ϥ뤳ȤǤޤϥܡɤϤտޤ ΤǤϤʤѥפȤäƥץ˥ХʥѴ뤿 ΤΤǤХʥǡˤϺǸɽ椬ޤΤǡgnuplot ϥѥפǡɤ߹硢`array` Ҥǻꤷˤ ޤǥǡɤ߹³ޤܺ٤˴ؤƤϡʲ: `binary matrix`, `binary general` `index` ɤϡեեޥåȤ 1 ĤΥեˤĤ 1 ζ̤ʤᡢݡȤޤ`every` `using` ե륿 ϥݡȤޤ`using` ϡǡ 3 Ȥηɤޤ Τ褦Ưޤ ^ <a href="http://www.gnuplot.info/demo/binary.html"> Хʥե splot Υǥ⡣ ^ </a> 4 general ?commands plot binary general ?commands splot binary general ?plot binary general ?splot binary general ?datafile binary general ?data binary general ?binary general general Хʥǡϡη˴ؤɬեˤ ʤƤɤեη˴ؤܺ٤ʾ򥳥ޥɥ饤󤫤Ϳ 뤳ȤǡΥǡɤ߹ळȤǽˤʤޤΥץν ϰŪʥ桼ˤϤǤgeneral Хʥä gnuplot Ȥ¿Υǡ褦ʥץꥱ˼äƤͭѤǤ : plot '<file_name>' {binary <binary list>} ... splot '<file_name>' {binary <binary list>} ... general Хʥϡե빽¤˴ؤ˴Ϣ륭ɡ ʤ `array`, `record`, `format`, `filetype` ʤɤ <binary list> Ϳ뤳Ȥͭˤʤޤʳξ matrix Хʥ ʤޤ(ܺ٤˴ؤƤϡʲ: `binary matrix`) Хʥ˴ؤ󤬼ưŪ˥ե뤫ɤ߼뤳ȤǤ褦 ɸŪʥե⤤Ĥޤ (ΰ򸫤ˤϡgnuplot ò̤ `show datafile binary` Ƥ)ʳξ ޥɥ饤󡢤뤤ϥǥեȤͤꤹɬפޤ ɤ˴ؤƤϰʲޤ <binary list> Ϳ륭 `filetype` ϡեɤ߹Τ Ѥ롼󡢤ʤǡηΰ椷ޤݡȤ Ƥ filetype ΰ򸫤ˤϡ`show datafile binary filetypes` Ƥfiletype ꤷʤε§ϡ`splot` Ѥ `binary` ɤñȤͿ줿ϸŵŪ gnuplot Хʥȸ ʤ졢¾Ƥξʤ `plot` ѤޤϾʤȤĤ <binary list> ɤͿ줿褦ʾϡraw Хʥե Ȥߤʤ졢ΥɤˤäƥХʥꤵޤ general Хʥǡե 2 ĤδŪʥ饹ʬޤ 줬ɤΤ褦˰ΤˤäξΥ饹⤢ޤ ĤΥ饹ϡǡϰͤ˥ץ󥰤Ƥȸʤ졢κ ɸɬŪˤޤΥ饹Ǥ <binary list> ɤѤƤ椬ԤʤޤơΥ饹Ǥͥ ̤ϡޥɥ饤ѥ᡼եΥѥ᡼񤭤 ϥǥեȤ񤭤ޤ⤦ĤΥ饹ϡɸ󤬥ե ˴ޤޤ줿ʣΥեȤΤΤΡ뤤 gnuplot Х ʥΤ褦ͤɸܲޤĤΥեΤΤΤǤ gnuplot ХʥΤ褦üʥǡեʳǤϡ̤˥Хʥ ϳǰ ASCII ǡƱͤ˹ͤޤϾ Ƥơ `using` ˤäƷӤĤ <using list> 򤵤 ޤ`format` ʸ󤬲ꤵʤä硢gnuplot ϥХʥ ο `<using list>` Ϳֹޤ㤨 `using 1:3` ξ 3 󤺤ĥǡɤ߼졢2 ܤΤΤ̵ ޤ襹ˤϤŵŪʥѥ᡼θĿꡢ Ť `<using list>` ǥեȤȤ򤵤ޤ㤨 `with image` Ǥ ǥեȤ `using 1` `with rgbimage` Ǥϥǥ Ȥ `using 1:2:3` Ȥޤ`using` //index ɽ ʸϡ̤ˤϥХʥǡǤϻȤ٤ǤϤʤȤդƤ 椹 <binary list> Υɤޤ 4 array ?binary array Хʥեɸܤ礭ꤷޤɸ gnuplot ƤޤμɽꤷʤФޤ㤨 `array=(10,20)` ϡ2 Ǻǽμ (x) ˤ 10 2 ܤμ (y) ˤ 20 ɸܲǡ뤳Ȥ̣ޤե λޤǥǡ³Ȥ򼨤ΤͤȤޤǡ 1 ϡåϾάǤޤʣΥǡΥʬΥΤˡ ȤȤǤޤ㤨 `array=25:35` 2 Ĥ 1 ǡ եˤ뤳Ȥ̣ޤ : gnuplot version 4.2 Ǥ array=(128,128) Ȥ񼰤ǤϤ array=128x128 Ȥ񼰤ѤƤޤŤ Ͽ侩Ƥޤ󤬡ʤ gnuplot ߴ ݡȤ褦ѥ뤵ƤаǤȤޤ 4 record ?binary record Υɤ `array` Ʊ񼰤ǡƱǽ󶡤ޤ `record` gnuplot ˺ɸưޤ󡣤ϡΤ褦 ɸ󤬡ХʥǡեΤ˴ޤޤƤΤΤ ΤǤ 4 skip ?binary skip ΥɤϡХʥեΤΥåפǽˤޤ 㤨СΥե뤬ǡΰγϰ֤ 1024 ХȤΥإå Ĥ褦ʾˤϡʲΤ褦ˤȻפǤ礦: plot '<file_name>' binary skip=1024 ... եʣΥ쥳ɤ硢Τ줾ФƬΤ餷 ֤ꤹ뤳ȤǤޤ㤨СǽΥ쥳ɤ 512 ХȤ åפ2 ܡ3 ܤΥ쥳ɤ 256 ХȤ򥹥åפ ϰʲΤ褦ˤޤ: plot '<file_name> binary record=356:356:356 skip=512:256:256 ... 4 format ?binary format ǥեȤΥХʥϡñư (float) ġǤ ꤹ뤿ˡ format ѿΥ˴ؤܺ٤ʾ Ǥޤ㤨 `format="%uchar%int%float"` ϡǽ using Ȥʤʸѿ (unsigned char) 2 ܤĤ (int) 3 ܤñư (float) ꤷƤޤ⤷ Ҥο꾮ϡĤѿϰ Τ˺ǸͿѿޤ `using` Ʊ͡`*` ʸĤɤ߼ΤƤ񼰤˻ꤹ ȤǤޤ֤եɤؤβˤäưۤη֤ ꤹ뤳ȤǤޤ㤨С`format="%*2int%3float"` ϡ3 Ĥ ¿ǡɤˡ2 Ĥǡɤ߼ΤƤޤѤǤѿ ΰϡ`show datafile binary datasizes` Ǹ뤳ȤǤޤ ϡ줾ΥѥˤäƤΥХȥȤȤ˥ޥ ¸ѿ̾Υ롼פȡޥ˰¸ʤѿ̾Υ롼פʬ Ƥޤ 4 endian ?binary endian եΥХʥǡΥǥϡgnuplot ưץåȥ ΥǥȤϰۤʤɤޤĤλ gnuplot ХȤɤΤ褦˰Ǥޤ㤨 `endian=little` ϡХʥե򡢤ΥХȤ¤Ӥ夫 礭¤ǤȸʤޤץϰʲΤΤȤޤ little: 夫礭ʷ¤ big: 礭ʷ夫龮ʷ¤ default: compiler Ʊǥȸʤ swap (swab): ǥѹ (褦ʤ餳 ȤäƤߤƤ) gnuplot ϡѥ˥ץ󤬻ꤵƤС"middle" ( "pdp") ǥ⥵ݡȤǤޤ 4 filetype ?binary filetype gnuplot ϡĤɸŪʥХʥեˤĤƤɬפʾ Υե뤫ȴФȤǤޤ㤨 "format=edf" ESRF åեΥեȤɤ߹ߤޤߥݡȤƤ ˤĤƤϡ`show datafile binary filetypes` ǸƤ ̤ʥեȤ `auto` ꡢξ gnuplot ϥХʥ γĥҤݡȤƤɸŪʳĥҤǤ뤫 åޤ ޥɥ饤󥭡ɤϥե뤫ɤ߼񤭤Τ˻Ȥ 졢ե뤫ɤ߼ϥǥեȤ񤭤ޤ (ܺ٤ ʲ: `set datafile binary`) 5 avs ?binary filetype avs ?filetype avs ?avs `avs` ϡưŪǧ᡼ФХʥեη ĤǤAVS ñʥեޥåȤǡץꥱ֤ǤȤ Τ˺ǤŬƤޤϡ2 Ĥ long (xwidth ywidth) ȡ θ³ԥ󤫤ꡢγƥԥ alpha/red/green/blue 4 ХȤޤ 5 edf ?binary filetype edf ?filetype edf ?edf ?filetype ehf ?ehf `edf` ϡưŪǧ᡼ФХʥեη ĤǤEDF ESRF ǡեޥå (ESRF Data Format) ̣ ơ edf ehf ξη򥵥ݡȤƤޤ (Ԥ ESRF Header Format)λѤ˴ؤܤϰʲǸĤǤ礦: http://www.edfplus.info/specs 5 png ?binary filetype png ?binary filetype gif ?binary filetype jpeg ?filetype png ?filetype gif ?filetype jpeg gnuplot png/gif/jpeg Ѥ libgd 饤֥Ȥ褦˥󥹥 뤵Ƥ硢βХʥեȤɤ߹ळ ȤǤޤʲΤ褦Ūʥޥ plot 'file.png' binary filetype=png ȤȤǤޤ餫ʲΤ褦ꤷơĥҤ鼫ư Ū˲ưŪǧ뤳ȤǤޤ set datafile binary filetype=auto 4 keywords ?binary keywords ʲΥ (keyword) ϡХʥե뤫ɸȤ ˤΤŬѤޤĤޤꡢbinary array, matrix, image θġǤ x,y,z ΰ֤ؤ֤ΤΤΤǤ 5 scan ?binary keywords scan gnuplot ХʥեɤΤ褦뤫ȤȤȼºݤ Ǹ뼴Ȥδ֤δطˤĤƤ¿κ𤬵ޤ κ򸺤餹ˤϡgnuplot ϥХʥե "" //̡ޤ ®//٤ȹͤȤǤ礦Υɤ gnuplot ˡΤɤκɸ (x/y/z) ˳Ƥ ꤷޤ 2 ġޤ 3 Ĥʸ¤Ӥɽǽʸ ˡʸˡ3 ܤʸ̤бޤ㤨С `scan=yx` ϡǤ® () y б̤® () x б뤳Ȥ̣ޤ ⡼ɤ `plot` ξ硢ˤ x y 2 ĤʸȤȤ Ǥ`splot` ФƤ x, y, z 3 ĤʸȤȤǤޤ Ƥ˴ؤƤϡ//̤ľɸؤΤߤ¤ ̤ˤޤ󡣤ͳǡɸؤγƤΤλҤѰդ Ƥơľɸ x, y, z t (), r, z ʤäƤޤ 5 transpose ?binary keywords transpose `scan=yx`ޤ `scan=yxz` ƱǤ 5 dx, dy, dz ?binary keywords dx ?binary keywords dy ?dx ?dy gnuplot ɸ硢δֳ֤ϤΥɤǻꤵ줿 ΤѤޤ㤨 `dx=10 dy=20` x 10y 20 δֳ֤ɸܲ줿Ȥ̣ޤ`dy` `dx` ʤлȤޤ Ʊͤ `dz` `dy` ʤлȤޤ󡣤⤷ǡμꤷ ɤμ礭硢Ĥμδֳ֤ϡꤵ줿 Ǥ⤤ΤΤƱͤѤޤ㤨вե뤫ɤ ޤ졢`dx=3.5` Τ߻ꤵ줿硢gnuplot x δֳ֤ y δֳ֤ 3.5 Ѥޤ ʲΥɤɸˤΤŬѤޤʲΤΤ matrix ХʥեˤȤޤ 5 flipx, flipy, flipz ?binary keywords flipx Хʥǡե gnuplot Ȱפʤ ޤˤޤΥɤϡ줾 x, y, z Υǡ ոˤޤ 5 origin ?binary keywords origin gnuplot ž (transpose) ȿž (flip) ˤƺɸ硢 κˤʤ褦ˤޤʤǡž֤ ȿžιԤʤ줿ľɸϤ 1 ݸ¤褦ˤޤ 򥰥դΤ¾ξ֤硢`origin` ɤǻ gnuplot κ碌ޤλϡ`plot` 2 Ĥκɸȡ`splot` Ǥ 3 ĤκɸȤꤷƤ㤨 `origin=(100,100):(100,200)` ϡĤΥե˴ޤޤ 2 ĤΥ Фǡ2 ФǤ2 ܤȤ `origin=(0,0,3.5)` 򤢤ȡ 3 ѤλǤ 5 center ?binary keywords center ?keywords center `origin` ȻƤޤΥɤϡ濴Υ ǻꤷˤʤ褦֤ޤ㤨 `center=(0,0)` Τ褦ˤ Υ `Inf` ΤȤ center ŬѤޤ 5 rotate ?binary keywords rotate ?keywords rotate ž (transpose) ȿž (flip) ޥɤϺɸȺɸˤ νͿƤޤ٤˴ؤ봰ϡ2 βžѤ򵭽Ҥžѥ٥ȥͿ뤳ȤˤԤʤȤǽˤ ޤ  `rotate` , `plot`, `splot` ξǡ2 ̤ФŬ ޤžϺɸʿ̤γ٤˴ؤƹԤʤޤ ٤ϡ饸ñ̤Ǥpi degrees ܿȤƤΥ饸Ǥɽ Ǥޤ㤨С`rotate=1.5708`, `rotate=0.5pi`, `rotate=90deg` ٤Ʊ̣Ǥ `origin` ꤵ줿硢žʿ԰ư˺濴ˤƹ ʤޤʳǤϲž濴 (`center`) ˴ؤƹԤʤ 5 perpendicular ?binary keywords perpendicular `splot` ˴ؤƲž٥ȥ꤬٥ȥɽ 3 Ĥο Ȥꤹ뤳ȤǼƤơΥ٥ȥ 2 xy ʿ̤ Ƹդ줿ˡ٥ȥ (perpendicular) ɽƤޤ 󤽤ΥǥեȤ (0,0,1) Ǥrotate perpendicular ξ 뤳Ȥˤꡢ3 ̵إǡդ뤳Ȥ ʤޤ ޤǽ 2 βžԤʤ졢μ 3 βžԤʤޤ ĤޤꡢR' 򤢤Ѥˤ 2 x 2 βžȤP (0,0,1) (xp,yp,zp) ػҸ˲ž 3 x 3 ιȤR' 򺸾ʬ Ȥƻ 3,3 ʬ 1 Ǥ¾ʬ 0 Ǥ褦ʹ (Ĥ z βž) ȤСѴɽˤط v' = P R v Ȥʤޤǡv ϥǡե뤫ɤ߹ޤ줿 3 x 1 ΰ֥٥ȥǤեΥǡ 3 ŪʤΤǤʤ ϡŪʥ롼뤬ŬѤ 3 Υǡȸʤޤ ( С̾ z ɸ 0 Ȥ졢xy ʿ 2 ǡȸʤޤ) 3 ǡ (data) ?commands plot datafile ?plot datafile ?data-file ?datafile ?data ?file եǼ줿ΥŪʥǡϡ`plot` ޥɥ饤ǡ ǡե̾ (<datafile>) ñޤŰǰϤǻ 뤳ȤˤäɽǤޤ : plot '<file_name>' {binary <binary list>} {{nonuniform} matrix} {index <index list> | index "<name>"} {every <every list>} {thru <thru expression>} {using <using list>} {smooth <option>} {volatile} {noautoscale} Ҥ `binary`, `index`, `every`, `thru`, `using`, `smooth` ϡ 줾ʬޤñ˸ȡ`binary` ϥǡХʥ ե뤫Ǥ褦ˤ (ǥեȤ ASCII ե)`index` ϥޥǡե뤫ɤΥǡɽΤӡ `every` ĤΥǡ礫ɤɽΤӡ`using` Ԥɤ᤹Τꤷ (`thru` ϡ`using` ̤ʾ Ǥ) `smooth` ñ֤ȶԤޤ(`splot` ϡ 褯񼰤äƤޤ`smooth` ץ `thru` ץ ϥݡȤƤޤ)  `noautoscale` ϡưŪ˼ϰϤꤵ뵡ǽͭ ˡǡˤĤƤϡ̵뤵 ( ư̼ܵǽη׻оݤ鳰) 褦ˤޤ ASCII ǡե: ǡեϡԤˤĤʤȤĤΥǡޤɬפ (`using` ϰԤĤΥǡݥȤ֤ȤǤޤ)`#` (VMS Ǥ `!`) ǻϤޤԤϡȤȤư졢̵뤵ޤƥ ϡ(x,y) Ȥɽޤ顼Сޤޤɽե顼 `plot` Ǥ (ʲ: `set style errorbars`, `set style errorlines`)ƥǡϡ(x,y,ydelta), (x,y,ylow,yhigh), (x,y,xdelta), (x,y,xlow,xhigh), (x,y,xlow,xhigh,ylow,yhigh) Τ줫 ̣ޤ ɤʾǤ⡢񼰤λҤ `using` ץˤäͿƤ ʤСǡեγƹԤοϡۥ磻ȥڡ (Ĥޤʣ ζ򤫥) ˤäƶڤƤɬפޤΥۥ磻ȥ ϡƹԤιܤ˶ڤޤŰǰϤޤ줿ۥ磻 ȥڡδǤ̵뤵졢äƼΤ褦ʥǡԤ 3 󡢤 ʤޤ: 1.0 "second column" 3.0 ǡϡؿ e, E ʸĤؿɽǽ񤫤ƤƤ⹽ޤ 󡣥ޥ `set datafile fortran` ͭʾϡfortran λؿ d, D, q, Q Ȥޤ ɬפǤΤϤĤ (y ) ΤߤǤ⤷ x ͤά줿 顢`gnuplot` Ϥ 0 ǻϤޤͤȤѰդޤ ǡեˤơ֥󥯹 (Ȳԡʳʸޤޤ ) ϽפǤ 1 ԤΥ֥󥯹Ԥϡ`plot` Ϣ³ؼޤ; ֥󥯹Ԥˤäƶ ڤ줿ǷФ뤳ȤϤޤ (line style ǽ񤫤Ƥ ˤ) 2 ԤΥ֥󥯹Ԥϡ̡Υǡ֤ζڤ򼨤ޤʲ: `index` ⤷ autoscale ξ֤Ǥ (ʲ: `set autoscale`)Ƥ ǡݥȤޤ褦˼ưŪ˰Фơ꤬񤫤 ʤƤ꤬ޡޤϡ2 Ĥη̤ޤ: i) `splot` Ǥϡ̤γѤ̤γѤ˰פƤʤȤޤ ξ硢ĤϽ񤫤뤳ȤϤޤii) 2 μǤΡƱ x ϰϤΥǡɽκݡ⤷ x2 μФ꤬񤫤Ƥʤ ϡx ɸäƤʤȤޤ x (x1) Ƥ ˤޤǼưŪ˰ФΤФx2 ϤǤϤʤǤ Ǥ򸫤뤳ȤǤޤ: reset; plot '-', '-' axes x2y1 1 1 19 19 e 1 1 19 19 e 򤱤ˤϡ`set autoscale` ޥɤ `fixmin`/`fixmax` ץ ȤȤǤޤϡιߤ˹礦褦˼ϰ ưŪ˳ĥ뵡ǽ̵ˤޤ ٥κɸʸǡե뤫ɤ߹ळȤǤޤ (ʲ : `labels`) 4 every ?commands plot datafile every ?plot datafile every ?plot every ?data-file every ?datafile every ?every  `every` ϡ褹ǡǡ礫Ū˥ץ 󥰤뤳Ȥǽˤޤ Ǥ ֥ݥȡפϥե 1 ĤιԤˤäǡ ǤΡ֥֥åפϡ֥ǡ֥å(ʲ: `glossary`) ƱΤ̣뤳ȤȤޤ : plot 'file' every {<ݥʬ>} {:{<֥åʬ>} {:{<ϥݥ>} {:{<ϥ֥å>} {:{<λݥ>} {:<λ֥å>}}}}} ץåȤǡݥȤϡ<ϥݥ> <λݥ> <ݥʬ> äФ졢֥å <ϥ֥å> <λ ֥å> ޤ <֥åʬ> äФޤ ƥ֥åκǽΥǡϡեκǽΥ֥åƱ褦ˡ 0 ֡פȤޤ ץåȤǤʤޤǤԤ⥫Ȥ뤳ȤդƲ ĤοϾά뤳ȤǤޤ; ʬΥǥեȤ 1 Ϥ ͤϺǽΥݥȤǽΥ֥åƽλͤϺǸΥݥȤ Υ֥åꤵޤ`every` ꤵʤʤ顢ƤιԤ ΥݥȤץåȤޤ : every :::3::3 # 4 ܤΥ֥åФޤ (0 ֤ǽ) every :::::9 # ǽ 10 ֥åФޤ every 2:2 # 1 ĤΥ֥å 1 ĤΥݥȤ # ޤ every ::5::15 # 줾Υ֥åǥݥ 5 15 ޤǤ # Фޤ : ^ <a href="http://www.gnuplot.info/demo/simple.html"> ñ plot ǥ (simple.dem) ^ </a> , ^ <a href="http://www.gnuplot.info/demo/surface1.html"> ѥ᡼⡼ɤǤ splot ǥ ^ </a> , ^ <a href="http://www.gnuplot.info/demo/surface2.html"> ѥ᡼⡼ɤǤ splot ǥ ^ </a> 4 ǡե (example) ?commands plot datafile example ?plot datafile example ?plot example ?datafile example ?data-file example ?example ϡե "population.dat" Υǡޤˤ Ǥ pop(x) = 103*exp((1965-x)/10) set xrange [1960:1990] plot 'population.dat', pop(x) ե "population.dat" ϼΤ褦ʥեǤ # Gnu population in Antarctica since 1965 1965 103 1970 55 1975 34 1980 24 1985 10 =skip binary : # 2 Ĥ float ͤ (2 ܤ̵̣ͤ)ɤ߼Τơ # Ĥ float ̵ͤ¤Ĺ³ 1 ǡȤƻ plot '<file_name>' binary format="%float%*float" using 1:2 with lines # ǡե뤫ɸΤɬפʾ򤹤٤ƤΥإ # ˴ޤǤ EDF եξ plot '<file_name>' binary filetype=edf with image plot '<file_name>.edf' binary filetype=auto with image # 3 Ĥʤʸ (unsigned char) RGB ο # ʬȤ򤷡y ȿžɸʿ̾ѹ # (夬ˤʤ褦)ԥδֳ֤ꤷե # ˤ 2 ĤβޤޤƤơΤĤ origin ʿ # ư롣 plot '<file_name>' binary array=(512,1024):(1024,512) format='%uchar' \ dx=2:1 dy=1:2 origin=(0,0):(1024,1024) flipy u 1:2:3 w rgbimage # 4 Ĥ̤Υǡʤꡢɸǡե˴ޤޤƤ # 롣ե gnuplot ¹ԤƤ륷ƥȤϰۤʤ륨 # ǥƤ롣 splot '<file_name>' binary record=30:30:29:26 endian=swap u 1:2:3 # Ʊϥեǡ 1 ܤ 3 ܤΥ쥳ɤ򥹥å splot '<file_name>' binary record=30:26 skip=360:348 endian=swap u 1:2:3 ʲ: `binary matrix` 4 index ?commands plot datafile index ?plot datafile index ?plot index ?data-file index ?datafile index ?index  `index` ϡѤʣΥǡĥե뤫顢 Υǡ򤹤뤳Ȥǽˤޤ : plot 'file' index { <m>{:<n>{:<p>}} | "<name>" } ǡ 2 ԤζʬΥƤޤ`index <m>` <m> ܤν 򤷤ޤ; `index <m>:<n>` <m> <n> ޤǤΥǡ ; `index <m>:<n>:<p>` ϡ<m>, <m>+<p>, <m>+2<p>, ʤɡ<p> 򤷡 <n> ǽλޤC ź (index) դ˽ index 0 ϤΥեκǽΥạ̇̄ޤ礭 index λˤϥ顼å֤ޤ<p> ꤷ<n> ˤ硢<p> ΥǡեκǸޤɤ߹ߤޤ`index` ꤷʤϡեΥǡΤñΥǡȤ褷 : plot 'file' index 4:5 եγФơ줬ޤޤǡ index ͤϡ `column(-2)` ѤǤޤϡʲ˸褦ˡΥե θġΥǡ̤̤ˡ󶡤ޤϡѤ 1 ĤΥǡ򤷤ʤ `index` ޥɤԳ湥Ǥ ġΥǡ˰ۤʤ°ƤˤϤȤƤǤ ʲ: `pseudocolumns`, `lc variable` : plot 'file' using 1:(column(-2)==4 ? $2 : NaN) # ȤƤԳ湥 plot 'file' using 1:2:(column(-2)) linecolor variable # ȤƤ ! `index '<name>'` ϡǡ̾ '<name>' 򤷤ޤ̾ϥ ȹԤ˽񤤤ƥǡ˳ƤޤʸȤ³ 򤽤ΥȹԤơη̤ <name> ϤޤäƤС ³ǡ <name> Ȥ̾ĤơǤ : plot 'file' index 'Population' <name> ǻϤޤ뤹٤ƤΥȤ³ǡ̾ˤʤ뤳 դƤ򤱤뤿ˡ㤨 '== Popolation ==' '[Population]' ʤɤ̿̾ˡ򤹤Ǥ礦 ^ <p>ʲ Web ڡ⻲: ^ <a href="http://www.gnuplot.info/demo/multimsh.html"> ^ index Ȥä splot Υǥ ^ </a></p> 4 smooth ?commands plot datafile smooth ?plot datafile smooth ?plot smooth ?data-file smooth ?datafile smooth ?smooth `gnuplot` ϡǡ֤ȶԤŪʥ롼򤤤Ĥ Ƥޤ `smooth` ץ˥롼ײƤޤ 줿ǡ򤷤Сˤƥǡ򤹤뤫 ޤŬڤʥǥ fit ȤΤǤ礦 : smooth {unique | frequency | cumulative | cnormal | kdensity | csplines | acsplines | bezier | sbezier} `unique`, `frequency`, `cumulative`, `cnormal` ϡǡñĴ· Ǥ plot ޤ¾Υ롼Ϥ⡢ǡξü ֤֡Ϣ³ηꤹ뤿˥ǡȤޤζ ϡؿȤƱˡ褵ޤʤͤ x ɸ 褦Ʊζ֤ȤФ (ʲ: `set samples`) ʬǤĤʤȤˤ (⤷ line style ФƤΤʤ) 褵 ޤ ⤷ `autoscale` ξ֤ǤСϰϤϥդζ˶ ޤ褦˷׻ޤ ⤷ `autoscale` ξ֤Ǥʤsmooth Υץ `acsplines` `csplines` ǤСɸܲϡϥǡޤ褦 x ϰϤȡ`set xrange` ʤɤꤵ줿ɸϰϤζ ʬξǹԤʤޤ 򤵤줿ץŬѤΤ˥ǡʤϡ 顼åɽޤκǾΥǡ `unique` `frequency` Ǥ 1 ġ`acsplines` Ǥ 4 ġ¾ΥץǤ 3 Ǥ `smooth` ץϡؿΤȤˤ̵뤵ޤ 5 acsplines ?commands plot datafile smooth acsplines ?plot datafile smooth acsplines ?data-file smooth acsplines ?datafile smooth acsplines ?plot smooth acsplines ?plot acsplines ?smooth acsplines ?acsplines `acsplines` ץϡּʳ餫ʥץ饤פǥǡ ǡ x ˴ؤñĴˤ줿 (ʲ: `smooth unique`)1 ĤζĤ 3 ¿༰ΰʬˤʬŪ˹ޤ 3 ηϡĤΥǡݥȤνŤդˤäƵ ޤŤߤϡǡե 3 ܤͿޤΥǥե ͤϡ`using` 3 ܤιܤˤäѹ뤳ȤǤޤ㤨 Τ褦ˤޤ plot 'data-file' using 1:2:(1.0) smooth acsplines 塢ŤߤŪ礭ϡΤ˻Ȥʬο ꤷޤ⤷Ťߤ礭СġΥǡαƶ礭ʤꡢ ζϡ٤礦Ʊ֤ 3 ץ饤ǤĤʤ ˶Ťޤ⤷ŤߤСζϤ꾯ʤʬǹ졢 ˤäƤʿŪˤʤޤκǤüʾϤ 1 Ĥζʬ ʤǤꡢƤΥǡ˽ŤߤդǾ 2 äƺޤΩ줫СʿꤵνŤߤϡζФ ʿ경ҡפˤäʬ䤵줿ؤΡŪʽŤߤȸ뤳Ȥ ޤˤꡢΥե (ɸŪ) ʿꤵνŤߤȤ ƻȤȤǤޤ : sw(x,S)=1/(x*x*S) plot 'data_file' using 1:2:(sw($3,100)) smooth acsplines 5 bezier ?commands plot datafile smooth bezier ?plot datafile smooth bezier ?plot smooth bezier ?data-file smooth bezier ?datafile smooth bezier ?plot bezier ?smooth bezier ?bezier `bezier` ץϡn (ǡθĿ) Υ٥ǥǡ ޤζξüĤʤޤ 5 csplines ?commands plot datafile smooth csplines ?plot datafile smooth csplines ?plot smooth csplines ?data-file smooth csplines ?datafile smooth csplines ?plot csplines ?smooth csplines ?csplines `csplines` ץϥǡñĴ· (ʲ: `smooth unique`) 3 ץ饤ǰ³Ĥʤޤ 5 sbezier ?commands plot datafile smooth sbezier ?plot datafile smooth sbezier ?plot smooth sbezier ?data-file smooth sbezier ?datafile smooth sbezier ?plot sbezier ?smooth sbezier ?sbezier `sbezier` ץϡǽ˥ǡñĴ· (ʲ: `unique`) `bezier` 르ꥺŬѤޤ 5 unique ?commands plot datafile smooth unique ?plot datafile smooth unique ?plot smooth unique ?data-file smooth unique ?datafile smooth unique ?plot unique ?smooth unique ?unique `unique` ץϡǡ x ñĴˤޤƱ x ĥ y ͤʿѤưĤ֤ޤƤη̤Ȥ ʬǷӤޤ 5 frequency ?commands plot datafile smooth frequency ?plot datafile smooth frequency ?plot smooth frequency ?data-file smooth frequency ?datafile smooth frequency ?plot frequency ?smooth frequency ?frequency ץ `frequency` ϡǡ x ˴ؤñĴˤޤx ɸƱ ϡ y ͤιפ y ͤȤƻİĤ֤ ޤ̤ȤƤϿäʬǷФ뤳Ȥˤʤޤ ʲ⻲ȡ ^ <a href="http://www.gnuplot.info/demo/smooth.html"> smooth.dem ^ </a> 5 cumulative ?commands plot datafile smooth cumulative ?plot datafile smooth cumulative ?plot smooth cumulative ?data-file smooth cumulative ?datafile smooth cumulative ?plot cumulative ?smooth cumulative ?cumulative ץ `cumulative` ϡǡ x ˴ؤñĴˤޤx ɸ Ʊϡʲ x ͤĤ٤Ƥ (ʤߤΥǡ ¦) Ф y ͤŪʹפ y ͤȤƻİĤ ޤϡǡʬ۴ؿΤѤǤޤ ʲ⻲ȡ ^ <a href="http://www.gnuplot.info/demo/smooth.html"> smooth.dem ^ </a> 5 cnormal ?commands plot datafile smooth cnormal ?plot datafile smooth cnormal ?plot smooth cnormal ?data-file smooth cnormal ?datafile smooth cnormal ?plot cnormal ?smooth cnormal ?cnormal ץ `cnormal` ϡx ˴ؤñĴǡy ͤ [0:1] ǡޤƱ x ͤʣϡ꾮 x ͤĤ٤ƤΥǡ (ʤߤΥǡ⺸ˤ ) ¤򡢤٤Ƥ y ͤ¤dzäͤ y ͤȤƻĤ褦 ʰΥǡ֤Ѥޤϡǡ줿ʬ ۴ؿΤ˻Ȥޤ (äɸΰۤʤǡӤΤ ͭѤǤ) ʲ⻲ȡ ^ <a href="http://www.gnuplot.info/demo/smooth.html"> smooth.dem ^ </a> 5 kdensity ?commands plot datafile smooth kdensity ?plot datafile smooth kdensity ?plot smooth kdensity ?data-file smooth kdensity ?datafile smooth kdensity ?plot kdensity ?smooth kdensity ?kdensity ץ `kdensity` ϡˤѤγ̩ɾ (ϳ餫ʥҥȥˤʤޤ) 褹ˡΰĤǤ ˤ 1 γΰ֤֤졢Υˤ٤Ƥ¤ؿ 褵ޤ2 ܤͤϡˤνŤߤȤƻѤޤ( 줿ҥȥˤϡ 1/(θĿ) Ȥ٤Ǥ) 3 ܤͤСϥˤΥХȤƻѤޤ2 ꤷʤ뤤 3 ܤͤ 0 ʲǤСgnuplot ϥǡ ʬۤǤ˺ŬȤʤ褦ʥХ׻ޤ( ̾ϤȤƤݼŪǡʤХǤ) 4 ̤ʥե̾ (special-filenames) ?commands plot datafile special-filenames ?plot datafile special-filenames ?plot special-filenames ?datafile special-filenames ?special-filenames ̤ʰ̣ĥե̾ȤơΤΤޤ: '', '-', '+', '++' Υե̾ '' ϡƱ plot ޥɾǡľϥեƤ Ѥ뤳Ȥ gnuplot ˻ؼޤäơƱϥե 2 Ĥ ǡ褹ˤϰʲΤ褦ˤޤ: plot 'filename' using 1:2, '' using 1:3 '+' '++' Ȥ̤ʥե̾ϡ`using` Τ襹 ˥饤ؿȤ褦ˤ뤿λȤߤǤ̾ؿϥ ץñ y (ޤ z) ͤƤޤ󡣤ե '+' Ϥ줬ºݤϥեǤ褦ˡ`using` ˤ 1 ܤͤɸȤưɲäͤꤹ뤳Ȥǽ ֤ɸοϡ`set samples` Ǥޤ : plot '+' using ($1):(sin($1)):(sin($1)**2) with filledcurves Ʊͤˡե '++' ϡx `set samples` 椵 y `set isosamples` 椵οΡɸŪ [x,y] ɸγʻҤ 2 Υǡ֤ޤ'++' ˡxrange yrange ꤹɬפޤ : splot '++' using 1:2:(sin($1)*sin($2)) with pm3d plot '++' using 1:2:(sin($1)*sin($2)) with image `'-'` Ȥ̤ʥե̾ϡǡ饤Ǥ뤳Ȥؼ ޤʤǡ򥳥ޥɤθ³ƻꤷޤΤȤϥ Τߤޥɤ³ޤäơ`plot` ޥɤФե ȥ롢饤󥹥Ȥäץϡ`plot` Υޥ 饤˽񤫤ʤȤޤ󡣤ϡunix 륹ץȤˤ << (ҥɥ)뤤 VMS DCL ˤ $DECK ƱͤǤ Υǡϡ餬ե뤫ɤ߹ޤ줿Τ褦ˡ1 ԤˤĤ 1 ĤĤΥǡϤޤƥǡνϡ1 ܤλϤ ʸ "e" ֤Ȥǻؼޤ`using` ץ򤳤Υǡ ŬѤ뤳ȤϲǽǤؿ̤ǡե륿뤳Ȥ˻Ȥ Τϰ̣Ǥ礦֤Τ˻ȤȤ¿ʬ̣ʤǤ礦 `'-'` ϡǡȥޥɤ˻ĤȤͭѤǤΤˤ ޤ㤨С`gnuplot` եȥץꥱΥ֥ץ ȤƵưʤɤˤޤȤơǥ󥹥ȥ ǤεǽȤΤǤ礦`index` `every` Τ褦 `plot` ΥץͿƤȡϤʤ˻Ȥ뤳 ȤΤʤǡϤפޤ򸫤Ƥ plot '-' index 0, '-' index 1 2 4 6 10 12 14 e 2 4 6 10 12 14 e ϡºݤưޤ plot '-' , '-' 2 4 6 e 10 12 14 e ȥפڤǤ礦 ⤷`replot` ޥɤ `'-'` Ȥʤ顢ʤ 1 ٰʾǡ ϤɬפǤ礦ʲ: `replot`, `refresh` Υե̾ ('') ϡľΥե̾ƤӻȤ뤳Ȥؼ ϡ plot '/ȤƤ/Ĺ/ե̾' using 1:2, '' using 1:3, '' using 1:4 Τ褦ʤȤǤ(⤷Ʊ plot ޥɾǡ`'-'` `''` ξѤȡˤ褦ˡ饤ǡ 2 Ĥν Ϳɬפޤ) popen ؿäƤ륷ƥǤϡǡեϡ'<' ǻϤޤ ̾ˤäơ륳ޥɤѥϤ뤳ȤǤޤ㤨 pop(x) = 103*exp(-x/10) plot "< awk '{print $1-1965, $2}' population.dat", pop(x) ϡǽο͸Ʊ褷ޤx ɸ 1965 ǯ ηвǯɽ褦ˤʤޤ¹ԤȤϡΥǡ ΥȹԤ򤹤٤ƺʤФʤޤ󤬡ޤϾΥ ɤκǽʬ򼡤Τ褦Ѥ뤳ȤǤޤ (ޤ³ʬ): plot "< awk '$0 !~ /^#/ {print $1-1965, $2}' population.dat" ΥץϺǤޤ`using` 뤤 `thru` ɤѤñʥե륿󥰤ǹԤȤǽǤ 4 thru ?commands plot datafile thru ?plot datafile thru ?plot thru ?data-file thru ?datafile thru ?thru `thru` ؿΥСȤθߴΤѰդƤޤ : plot 'file' thru f(x) ϼƱͤǤ: plot 'file' using 1:(f($2)) Ԥʣ˸ޤäƤޤ plot 'file' thru f(y) ưޤ (ʤy ߡѿȤƻȤȤǤޤ) `thru` `splot` `fit` Ǥ̤ޤθ̤ޤ 4 using ?commands plot datafile using ?plot datafile using ?plot using ?data-file using ?datafile using ?using Ǥ褯ȤǡեνҤ `using` ǡϥե ΤɤιԤ褹Τؼޤ : plot 'file' using <entry> {:<entry> {:<entry> ...}} {'format'} format ꤹȡ C 饤֥ؿ 'scanf' ŬѤƥǡ եγƹԤɤߤޤǤʤСƹԤϥۥ磻ȥڡ ( 䥿) Ƕڤ줿ǡ (ե) ʤȤߤʤޤ ʲ⻲: `datafile separator` <entry> ϡϥեΰĤΥեɤ򤹤뤿ñʤ ֹ椫ĤΥǡκǽιԤΥ٥˰פʸ󡢥 ǰϤޤ줿xticlabels(2) Τ褦˥åǰϤޤʤ̤ʴؿ 줫Ǥ Υȥ꤬åǰϤޤ줿ξ硢N ܤͤꤹΤ˴ؿ column(N) ѤǤޤĤޤꡢcolumn(1) ɤ߹ޤ줿ǽιܤ Ȥcolumn(2) ϼιܡȤäǤcolumn(1), column(2), ... άȤơ̤ʵ $1, $2, ... ѤǤޤؿ `valid(N)` ǡN ܤͭʿǤ뤫ɤƥȤǤޤ =column =columnhead ϥեκǽιԤγˡǡͤǤϤʤ٥äƤ 硢Υ٥ plot ȥ˻ѤǤޤؿ column() ϡֹʳ˥٥Ǥޤ㤨Сǡ ե뤬ʲΤ褦ʾ: Height Weight Age val1 val1 val1 ... ... ... ʲ plot ޥɤƱ̣ˤʤޤ: plot 'datafile' using 3:1, '' using 3:2 plot 'datafile' using (column("Age")):(column(1)), \ '' using (column("Age")):(column(2)) plot 'datafile' using "Age":"Height", '' using "Age":"Weight" Υ٥ plot ȥ˻Ȥˤϡ`set key autotitle columnhead` ȤƤ ϥǡե 1...N Ȥºݤ˲äơgnuplot ϴ ĤĤ "" 󶡤ޤ㤨С$0 ޤ column(0) ϡ ǡΤΥǡԤιֹ֤ޤʲ: `pseudocolumns` <entry> ˲񤫤ʤСΥȥΥꥹȤν˥ǥեȤͤ Ȥޤ㤨 `using ::4` ϡ`using 1:2:4` Ȳᤵޤ `using` ˤĤΥȥꤷϡ <entry> y ͤ ƻȤ졢ǡֹ ( $0) x ȤƻȤޤ㤨 "`plot 'file' using 1`" "`plot 'file' using 0:1`" Ʊ̣Ǥ `using` 2 ĤΥȥͿ硢 x, y ȤƻȤޤ ˥ȥɲäơϤΥǡѤ褦襹 ξܺ٤ˤĤƤϡʲ: `set style`, `fit` 'scanf' ؿǤϿʥǡοϤȤޤ`gnuplot` ƤϥǡưȤߤʤޤ顢`gnuplot` Ǥ `%lf` ܼŪͣοϻꡢȤȤˤʤޤ ʸˤϡʤȤġ 7 İʲΡΤ褦ϻ ɬפޤ 'scanf' Ͽȿδ֤˥ۥ磻ȥڡʤ򡢥 ("\t") ("\n")ޤϲڡ ("\f") ȴԤޤʳϤ Ū˥åפ٤Ǥ "\t", "\n", "\f" ȤȤϥ󥰥륯Ȥष֥륯Ȥ Ȥ٤Ǥ뤳ȤդƤ 5 using (using_examples) ?examples ?commands plot datafile using examples ?plot datafile using examples ?datafile using examples ?using examples ϡ1 ܤΥǡФ 2 ܤ 3 ܤ¤ͤ plot ޤ ʸϡǡڡڤǤʤ޶ڤǤ뤳 ؼƤޤƱȤ `set datafile separator ","` ꤹ ȤǤǽǤ plot 'file' using 1:($2+$3) '%lf,%lf,%lf' ϡʣʽ񼰻ǥǡե "MyData" ɤ߹ ޤ plot 'MyData' using "%*lf%lf%*20[^\n]%lf" ν񼰻ΰ̣ϰʲ̤Ǥ: %*lf ̵ͤ %lf ưɤ߹ (ǥեȤǤ x ) %*20[^\n] 20 Ĥβ԰ʳʸ̵ %lf ưɤ߹ (ǥեȤǤ y ) 3 黻 `?:` Ȥäƥǡե륿ĤηҲ𤷤ޤ plot 'file' using 1:($3>10 ? $2 : 1/0) ϡ1 ܤΥǡФơ3 ܤΥǡ 10 ʾǤ褦 2 ܤΥǡ plot ޤ`1/0` ̤ͤǤꡢ`gnuplot` ̤ ̵뤹ΤǡäŬڤǤʤϱ뤳Ȥˤʤޤ ޤϡ餫Ƥ NaN ȤäƤƱȤˤʤޤ =NaN åǻϤޤäƤʤ¤ֹȤƻȤȤǤޤ 㤨 `using 0+(ʣʼ)` ͤʤȤǤޤơοϡ åǥȤƤʤпͤɾ졢åǥ ƤиġΥǡɤ߹िˤͤɾ롢Ȥ פǤ եޥåȥǡȤäƤ硢λ֤Υǡʣ Ϥ餻뤳ȤǤޤξ硢¾Υǡγϰ֤׻Ȥ ֤Υǡ˶򤬴ޤޤƤ뤳ȤդƤ㤨Сǡ ԤκǽǤڡޤ줿֥ǡǤʤСy ͤ 3 ܤͤȤƻꤵ٤Ǥ `plot 'file'` `plot 'file' using 1:2` `plot 'file' using ($1):($2)` ˤ̯ʰ㤤뤳ȤդƤ 1) `file` 1 2 ΥǡĹԤ򤽤줾ޤǤȤ ȡǡ 1 ΤߤιԤФƤϡǽΤΤ x ͤФ2 ܤΤΤϤιԤ̵뤷3 ܤΤΤϤ̤ͤȤ¸ ޤ (ޤ plot Ƥ (plot with lines)̤ ᤹Фʤ褦)2) 1 ܤʸޤǤ褦ʹԤ 硢ǽΤΤϥ顼Ȥ plot ߤޤ2 ܤ 3 ܤ ΤϤפʹԤɤߤȤФޤ ºݡǽñ plot 'file' using 1:2 Ȼꤹ뤳Ȥǡξɤʤ˥ߤΥǡޤԤĥե plot 뤳ȤǽˤʤޤɤƤǡե ʸĤƤʤСΥƥȹԤ˥ʸ (#) ֤Ǥ礦 5 (pseudocolumns) ?pseudocolumns ?commands plot datafile using pseudocolumns ?plot datafile using pseudocolumns ?datafile using pseudocolumns ?using pseudocolumns plot ʸ `using` μǤϡϥե˴ޤޤºݤΥǡ ˲äƴ⻲ȤǤ "" (pseudocolumns) ˴ޤޤ Ƥޤ column(0) ǡǤγν֤֡ 0 Ϥޤꡢ2 ԤΥ֥󥯹ԤǥꥻåȤޤά $0 Ѳġ column(-1) ֹ 0 Ϥޤꡢ1 ԤΥ֥󥯹Ԥǥꥻå ޤϡ󡢤ޤϳʻҾǡΥǡ Ԥбޤ column(-2) ʣΥǡĥեΡߤΥǡ index ֹ档ʲ: `index` 5 xticlabels ?xticlabels ?using xticlabels ?plot using xticlabels ιߤθФ (ticlabel) ʸؿˤäƺ뤳ȤǤ ̾ϰȤƥǡ󤫤ޤǤñʷϡǡ󼫿 ʸȤƤѤǡxticlabels(N) xticlabels(stringcolumn(N)) ξάȤƻȤޤʲ 3 ܤǤ x ιߤθФ ƻѤޤ plot 'datafile' using <xcol>:<ycol>:xticlabels(3) with <plotstyle> θФϡǤդ輴 x,x2,y,y2,z ѤǤޤ `ticlabels(<labelcol>)` ϡ`using` ǡΥǡκɸ ꤬ƺѤ˹Ԥɬפޤͭ X,Y[,Z] ɸȤij ǡФơxticlabels() Ϳʸͤϡб x ɸƱ x θФΥꥹȤɲäޤ`xticlabels()` `xtic()` Ⱦά뤳ȤǤ¾μ˴ؤƤƱͤǤ : splot "data" using 2:4:6:xtic(1):ytic(3):ztic(6) Ǥϡx y θФ x,y ɸͤȤ̤󤫤Ф z θФϡб z ɸͤޤ : plot "data" using 1:2:xtic( $3 > 10. ? "A" : "B" ) ϡx θФʸʹؿѤΤǡǡե γ x ιߤθФϡ3 ܤͤˤä "A" "B" 줫Ȥʤޤ 5 x2ticlabels ?using x2ticlabels ?plot using x2ticlabels ʲ: `plot using xticlabels` 5 yticlabels ?using yticlabels ?plot using yticlabels ʲ: `plot using xticlabels` 5 y2ticlabels ?using y2ticlabels ?plot using y2ticlabels ʲ: `plot using xticlabels` 5 zticlabels ?using zticlabels ?plot using zticlabels ʲ: `plot using xticlabels` 4 volatile ?datafile volatile ?plot datafile volatile  `volatile` ϡϥȥ꡼फե뤫ɤ߹ ǡɤ߹߻ˤͭǤϤʤȤ̣ޤϡǽ ¤ץˡ`replot` ޥɤ `refresh` ޥɤȤ 褦Ȥޤʲ: `refresh` 3 errorbars ?commands plot errorbars ?commands splot errorbars ?plot errorbars ?splot errorbars ?errorbars 顼Сϡ1 4 Ĥɲä줿ǡɤ (ޤϥȥ `using` ɲ򤹤) Ȥˤꡢ2 ǡˤƼ¸ Ƥޤɲäͤϡ줾Υ顼Сǰۤʤä ǻȤޤ ǥեȤǤϡ`gnuplot` ϥǡեγƹԤ˰ʲΤ褦 3 ġ 4 ġ뤤 6 Ĥ󤬤뤳ȤԤƤޤ: (x, y, ydelta), (x, y, ylow, yhigh), (x, y, xdelta), (x, y, xlow, xhigh), (x, y, xdelta, ydelta), (x, y, xlow, xhigh, ylow, yhigh) x ɸɬꤷʤФޤ󡣳ƿͤ񤯽ǵ󤲤̤ ʤƤϤʤޤ󡣤`using` ҤȤФνǤޤ 礱Ƥͤ䤦ȤϲǽǤ㤨С plot 'file' with errorbars plot 'file' using 1:2:(sqrt($1)) with xerrorbars plot 'file' using 1:2:($1-$3):($1+$3):4:5 with xyerrorbars ǸϡŪ x θŪ y θȤݡȤ ʤȤΥեФΤǤ`using` ȥ꤬Ū x θ Ū x κǾͤȺͤƤޤ y Υ顼Сϡ(x, ylow) (x, yhigh) ؤαľȤޤ ylow yhigh ydelta ꤵ줿Ȥϡylow = y - ydelta, yhigh = y + ydelta ȤʤޤԤ˥ǡ 2 ĤʤСylow yhight ϤȤ y Ȥʤޤx 顼СƱͤ˷׻줿ʿǤ ǡγޤϡwith errorbars with lines ꤷơƱǡե 2 `plot` Ʋ ( 2 ĤΥȥʤ褦ˡΰˤ `notitle` ץȤ Ȥ˺ʤDz)¾Ȥơerrorlines ޥɤ⤢ޤ (ʲ: `errorlines`) 顼Сˤϡ⤷ `set bars` ȤäƤʤСΤ줾ü˿ľ ʬĤޤ (ܺ٤ϡʲ: `set bars`) ưϰϻ꤬ͭǤСϰϤϥ顼Сޤ褦Ĵ ޤ ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/mgr.html"> 顼СΥǥ ^ </a> ʤ˴ؤƤϡʲ: `plot using`, `plot with`, `set style` 3 errorlines ?commands plot errorlines ?commands splot errorlines ?plot errorlines ?splot errorlines ?errorlines (errorbar) ȼϡ2 ǡեǥݡ Ƥơ 1 Ĥ 4 Ĥɲä (ޤ `using` ǻꤹ) ǡͿ뤳ȤǹԤʤޤɲäͤϡ͡ errorline Τ줾ǰۤʤäǻȤޤ ǥեȤξ֤Ǥϡ`gnuplot` ϡǡեγƹԤ 3 ġ4 ġ 6 ĤΤ줫θĿΥǡ뤳ȤԤ줾ʲΤ줫 бޤ (x, y, ydelta), (x, y, ylow, yhigh), (x, y, xdelta), (x, y, xlow, xhigh), (x, y, xdelta, ydelta), (x, y, xlow, xhigh, ylow, yhigh) x ɸϻꤹɬפޤǡν֤ηǤɬפ ޤ`using` ҤǤν֤ꡢ礱ƤФ Ϳꤹ뤳ȤǤޤ㤨 plot 'file' with errorlines plot 'file' using 1:2:(sqrt($1)) with xerrorlines plot 'file' using 1:2:($1-$3):($1+$3):4:5 with xyerrorlines ǸϡŪ x θŪ y θȤݡȤ ʤȹ礻ΥǡΥեФΤǡ`using` Ūʸ Ū x κǾͤȺͤƤޤ y (x, ylow) (x, yhigh) 褵Ǥylow, yhigh ydelta ꤵ줿ϡylow = y - ydelta, yhigh = y + ydelta ȰޤԤ 2 ĤΥǡʤ硢yhigh, ylow ξ y ˤʤޤx ƱͤˡǷ׻ʿǤ ˤϡ`set bars` ꤵƤʤ硢ξüǿľ˸ ʬդޤ (ܺ٤ϡʲ: `set bars`) ư̼ (autoscaling) ON ξ硢ϰϤϸ褦Ĵ ޤ ʤˤĤƤϡʲ: `plot using`, `plot with`, `set style` 3 ؿ (functions) ?commands plot functions ?plot functions ?functions ޥ `plot`, `splot` Ǥϡե뤫ɤ߹ǡ ǤʤȤ߹ߴؿ桼ؿ褹뤳ȤǤޤؿ ϡΩʼ̾ϰϤϤäƥǡץ뤳Ȥɾޤ ʲ: `set samples`, `set isosamples` : approx(ang) = ang - ang**3 / (3*2) plot sin(x) title "sin(x)", approx(x) title "approximation" ؿΥǥեȤ襹ꤹˡˤĤƤϡʲ: `set style function`Ȥ߹ߴؿξˤĤƤϡʲ: `expressions functions`ǴؿˡˤĤƤϡʲ: `user-defined` 3 ޲ѿ⡼ (parametric) ?commands plot parametric ?commands splot parametric ?plot parametric ?splot parametric ޲ѿ⡼ (`set parametric`) Ǥϡ`plot` Ǥ 2 ĤοȤ `splot` Ǥ 3 ĤοȤͿɬפޤ : plot sin(t),t**2 splot cos(u)*cos(v),cos(u)*sin(v),sin(u) ǡեƱ褦褵ޤǡե뤬 ΤͿˡǤդ޲ѿؿ˴˻ꤵ줿 ƤǤȡx ޲ѿؿ (Ǥ `sin(t)`) y ޲ѿؿ (Ǥ `t**2`) Ȥδ֤ˡ¾νҤǡ ؿϤߤǤϤޤ󡣤Τ褦ʤȤ򤹤ȡʸ顼ˤ ꡢ޲ѿؿˤϻꤵƤʤɽޤ `with` `title` Τ褦¾νҤϡ޲ѿؿλ꤬λ ˻ꤷʤФޤ plot sin(t),t**2 title 'Parametric example' with linespoints ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/param.html"> ޲ѿ⡼ɤΥǥ⡣ ^ </a> 3 ϰ (ranges) ?commands plot ranges ?commands splot ranges ?plot ranges ?splot ranges ?ranges ץϰ (range) ϡɽ륰դΰϰϤꤷޤ plot ޥɤȤ̤ `set range` ʸϰϻꤹΤǤϤʤ plot ɾΤΰȤϰϻꤹ硢ΥդŪ˳礷 ưϤǤʤʤǤ礦ϰϤѹ `replot` 뤳ȤǤʤʤǤ礦 : [{<dummy-var>=}{{<min>}:{<max>}}] [{{<min>}:{<max>}}] ǽϰϻΩѿϰ (`xrange` ޤϥѥȥå⡼ɤ `trange`) ǡ2 ܤΤΤϽ°ѿϰ `yrange` (ѥȥå ⡼ɤǤ `xrange`) Ȥʤޤ<dummy-var> ˤΩѿο̾ ꤷޤ (ǥեȤѿ̾ `set dummy` ѹǤޤ)<min>, <max> ˤ뤤 * 񤯤ȤǤޤ ѥȥå⡼ɤǤʤСͿ٤ϰϻ `xrange`, `yrange` νˤʤޤ ѥȥå⡼ɤǤϡ`plot` ޥɤФƤϤν `trange`, `xrange`, `yrange` ˤʤޤʲ `plot` ޥɤϡ`trange` [-pi:pi], `xrange` [-1.3:1.3], `yrange` [-1:1] ꤹǤ plot [-pi:pi] [-1.3:1.3] [-1:1] sin(t),t**2 x2 ϰϤ y2 ϰϤϤǤϻǤʤȤդƤ ˤ `set x2range` `set y2range` Ȥޤ ϰϤŬڤʥ⡼ɤФơ˼Dzᤵޤɬפϰϻ ꤬ƻꤵȡƤӻꤷľȤϤޤ󤬡ɬפʤ ʬꤷʤ褦ˤϤǤޤ󡣤ꡢ˶ϰϻ `[]` ֤ޤ `*` ϡmin (Ǿ) max () ˼ưϰϻ (autoscale) εǽ ȤȤǽˤޤʲ⻲: `set autoscale` `plot` `splot` ΥޥɹԤǻꤵ줿ϰϤϤΥդˤΤ߱ƶ ڤܤޤäơθΥդΥǥեȤϰϤѹˤϡ `set xrange` `set yrange` ѤƤ ֥ǡФƤϡϰϤϥȤǰϤǻꤹɬפޤ ( ե˸֥ǡƱ)`gnuplot` ϤϰϤ ɤߤΤ˻ֽʸ (`timefmt`) Ѥޤܤϰʲ: `set timefmt` : ʲϸߤϰϤѤޤ: plot cos(x) ʲ x ϰϤΤߤλǤ: plot [-10:30] sin(pi*x)/(pi*x) ʲϾƱǤѿȤ t Ȥޤ: plot [t = -10 :30] sin(pi*t)/(pi*t) ʲ x y ξϰϤλǤ: plot [-pi:pi] [-3:3] tan(x), 1/x ʲϡy ϰϤΤߤλǡξμμưϰϻ굡ǽ̵ˤޤ: plot [ ] [-2:sin(5)*-8] sin(x)**besj0(x) ʲ x κͤ y κǾͤΤߤλǤ plot [:200] [-pi:] exp(sin(x)) ʲ x ϰϤǡȤƻꤷƤޤ: set timefmt "%d/%m/%y %H:%M" plot ["1/6/93 12:00":"5/6/93 12:00"] 'timedata.dat' 3 ֤ (iteration) ?commands plot iteration ?commands splot iteration ?plot iteration ?splot iteration =iteration ¿ƱΥեؿƱ褹ϡ줾 plot ɤη֤ (iteration) ǤԤΤǤ : plot for [<variable> = <start> : <end> {:<increment>}] plot for [<variable> in "string of words"] ֤Ŭϰ (scope) ϡΥ (,) ޥɤνꡢΤ 줫˸줿ȤޤǤǤ֤ (nest) ˤ뤳ȤϤ ޤ ֤ʸޤޤǤʤΤǡʲϰĤζ sin(3x) 褷ޤ plot for [i=1:3] j=i, sin(j*x) j θ˥ޤʤΤǡʲ 3 Ĥζ褷ޤ plot for [i=1:3] j=i sin(j*x) : plot for [dataset in "apples bananas"] dataset."dat" title dataset Ǥϡ֤ϥե̾б륿ȥξǻȤ Ƥޤ : file(n) = sprintf("dataset_%d.dat",n) splot for [i=1:10] file(i) title sprintf("dataset %d",i) ϡե̾ʸʹؿΤ褦 10 ΥեƱ褷ޤ֤ѿ (Ǥ 'i') ϰĤ Ȥư졢 2 ٰʾѤǤޤ : set key left plot for [n=1:4] x**n sprintf("%d",n) ϡؿȤ褷ޤ : list = "apple banana cabbage daikon eggplant" item(n) = word(list,n) plot for [i=1:words(list)] item(i).".dat" title item(i) list = "new stuff" replot ǤϡꥹȤ˽äƳƥƥåפʹԤγƹܤФưĤ 褬ԤޤγƹܤưŪ˼ޤΤǡΥꥹȤѹ Τޤ replot 뤳ȤǤޤ : list = "apple banana cabbage daikon eggplant" plot for [i in list] i.".dat" title i list = "new stuff" replot ϡη֤ѿǤϤʤʸη֤ѿѤ 뤳ȰʳƱǤ 3 title ?commands plot title ?commands splot title ?plot title ?splot title ?columnheader ǥեȤǤϳƶϡбؿե̾ǥ˰ɽ ޤplot Υץ `title` ȤȤǡŪʥȥͿ 뤳ȤǤޤ : title <text> | notitle [<ignored text>] title columnheader | title columnheader(N) <text> ϡǰϤޤ줿ʸ󤫡ʸɾ뼰Τ 줫Ǥϥˤɽޤ ϥǡκǽι (ʤƬ) ʸեɤȲ 򥭡ȥȤѤ륪ץ⤢ޤʲ: `datastrings`ϡ`set key autotitle columnhead` ꤹХǥ ȤεưȤʤޤ ȥȥץͽ `notitle` ȤȤǥǤ ޤʤȥ (`title ''`) `notitle` Ʊ̣ޤ ץߤȤϡİʾζ򥿥ȥθƤ (`tilte ' '`)`notilte` θʸĤ硢ʸ ̵뤵ޤ `key autotitles` ꤵ (ǥե) `title` `notitle` ꤵʤä硢Υȥ `plot` ޥɾˤؿ̾ ǡե̾ˤʤޤե̾ξϡꤵǤդΥǡ ե뽤Ҥ⤽Υǥեȥȥ˴ޤޤޤ ֤䥿ȥΰ·ʤɤΥΥ쥤Ȥϡ`set key` Ǥ ޤܺ٤ϡʲ: `set key` : ʲ y=x 򥿥ȥ 'x' ɽޤ: plot x ʲϡx 2 򥿥ȥ "x^2" ǡե "data.1" 򥿥ȥ "measured data" ɽޤ: plot x**2 title "x^2", 'data.1' t "measured data" ʲϡ˺ɸդμ˱߷ζ񤭡ȥʤɽޤ: set polar; plot my_function(t), 1 notitle ʲϡեγ˥ȥޤʣΥǡ褷ޤ: plot for [i=1:4] 'data' using i title columnhead 3 with ?commands plot with ?commands splot with ?commands plot style ?commands splot style ?plot with ?plot style ?splot with ?splot style ?style ?with ؿǡɽˤϤΥΤΰĤȤȤǤޤ  `with` ΤѰդƤޤ : with <style> { {linestyle | ls <line_style>} | {{linetype | lt <line_type>} {linewidth | lw <line_width>} {linecolor | lc <colorspec>} {pointtype | pt <point_type>} {pointsize | ps <point_size>} {fill | fs <fillstyle>} {nohidden3d} {nocontours} {nosurface} {palette}} } ǡ<style> ϰʲΤ줫: lines dots steps errorbars xerrorbar xyerrorlines points impulses fsteps errorlines xerrorlines yerrorbars linespoints labels histeps financebars xyerrorbars yerrorlines vectors ޤϡ boxes candlesticks image circles boxerrorbars filledcurves rgbimage ellipses boxxyerrorbars histograms rgbalpha pm3d boxplot ǽΥ롼פΥϡʸ° 2 Υ롼 Υϡɤ٤°äƤޤʲ: `fillstyle` ˥֥ĥ⤢ޤġΥξܺ٤ˤĤ Ƥϡʲ: `plotting styles` ǥեȤΥϡ`set style function` `set style data` Ǥޤ ǥեȤǤϡ줾δؿǡեϡȤȤǤ뷿 ãޤǰۤʤȤޤ٤Ƥüѥɥ饤Ф 6 Ĥΰۤʤ򥵥ݡȤƤơ⤷׵ᤵ줿硢 ˺ѤƤޤνϷǤν Τ򸫤С`test` ȤƤ ĤӤʤС<line_type> <point_type> ꤷƤͤϡǻȤꤹ (ޤϿ) ǤѤüǻȤɽ ˤ `test` ޥɤȤäƤ 礭 <line_width> <point_size> ѹǤޤ ϤγơüΥǥեȤͤФŪͤȤƻꤷ 礭ΤѤ褦ѹǤޤܺ٤ϡʲ: `set pointsize`ǥåȤ <point_size> ȡ `set pointsize` ǥåȤ礭ϡǥեȤΥݥȥ ˳ݤ뤳ȤդƤʤθ̤Ѥ ޤ㤨С`set pointsize 2; plot x w p ps 3` ϡǥեȤ 3 ܤǤäơ6 ܤǤϤޤ 饤󥹥ΰʬ뤤ϳ plot ˤ `pointsize variable` ȤǽǤξ硢Ϥˤɲä 1 ׵ᤵޤ 2D Ǥ 3 3D Ǥ 4 Υǡɬפˤʤޤġ ΥϡΤ̤Ƥ pointsize ˡǡե뤫 ˤͤ򤫤ΤȤƷꤵޤ `set style line` Ȥä//ȤСΥ ֹ <line_style> ˥åȤ뤳ȤǤȤȤǤ gnuplot `pm3d` 򥵥ݡȤ褦˥󥹥ȡ뤵ƤʤС `splots` ˤ lines, points, dots ο餫Ѳ뤿 ̤ʥ `palette` Ȥޤοϡޥ `set palette` Ǥ餫ꤵ줿餫Ѳ륫顼ѥåȤ򤷤ޤ ͤϡ z ɸͤޤ `using` 4 ܤΥѥ᡼Ȥ ꤵ뿧ɸбޤ2 3 (`plot` `splot` ޥ) ξǡѥåȿ򾮿ͤޤϥ顼ܥåϰϤ Ť줿ͤΤ줫ǻꤹ뤳ȤǤޤѥåȿͤϡ `using` Ū˻ꤵ줿󤫤ɤ߹ळȤǽǤ ʲ: `colors`, `set palette`, `linetype`  `nohidden3d` ϡ`splot` ޥɤˤΤŬ ޤ̾Хʥץ `set hidden3d` ϥվ ŬѤޤơ `nohidden3d` ץĤ뤳 Ȥǡ hidden3d ν뤳ȤǤޤ`nohidden3d` ޡ줿̰ʳθġ (ʬ٥) ϡ̾ ¾β餫ǤDZƤޤ褵ޤ Ʊͤˡ `nocontours` ϡХ `set contour` ꤬ ͭʾǤ⡢̤ plot Ф赡ǽ򥪥դˤޤ Ʊͤˡ `nosurface` ϡХ `set surface` ꤬ͭ ʾǤ⡢̤ plot Ф 3 򥪥դˤޤ ɤϰż褦ʷǾάǽǤ `linewidth`, `pointsize`, `palette` ץƤü֤ǥݡ ȤƤ櫓ǤϤʤȤդƤ : ʲϡsin(x) ľ褷ޤ: plot sin(x) with impulses ʲϡx 褷x**2 ǥեȤ褷ޤ: plot x w points, x**2 ʲϡtan(x) ؿΥǥեȤǡ"data.1" ޤ褷ޤ: plot [ ] [-2:5] tan(x), 'data.1' with l ʲϡ"leastsq.dat" ľ褷ޤ: plot 'leastsq.dat' w i ʲϡǡե "population" 褷ޤ: plot 'population' with boxes ʲϡ"exper.dat" 򥨥顼Сդޤ褷ޤ (顼С 3 󡢤뤤 4 ΥǡɬפȤޤ): plot 'exper.dat' w lines, 'exper.dat' notitle w errorbars ⤦Ĥ "exper.dat" Υ顼Сդޤ (errorlines) Ǥ ˡ (顼С 3 󡢤뤤 4 Υǡɬ): plot 'exper.dat' w errorlines ʲϡsin(x) cos(x) ޡդޤ褷ޤޤ ƱǤޡϰۤʤäΤȤޤ: plot sin(x) with linesp lt 1 pt 3, cos(x) with linesp lt 1 pt 4 ʲϡ"data" 3 ǡ礭̾ 2 ܤ褷ޤ: plot 'data' with points pointtype 3 pointsize 2 ʲϡ"data" 褷ޤ4 ܤɤǡ pointsize ȤƻѤޤ: plot 'data' using 1:2:4 with points pt 5 pointsize variable ʲϡ2 ĤΥǡФơΤ߰ۤʤѤ褷ޤ: plot 'd1' t "good" w l lt 2 lw 3, 'd2' t "bad" w l lt 2 lw 1 ʲϡx*x ζɤĤ֤ȿӤ褷ޤ: plot x*x with filledcurve closed, 40 with filledcurve y1=10 ʲϡx*x ζȿȢ褷ޤ: plot x*x, (x>=-5 && x<=5 ? 40 : 1/0) with filledcurve y1=10 lt 8 ʲϡ餫Ѳ뿧Ƕ̤褷ޤ: splot x*x-y*y with line palette ʲϡ2 ĤοΤĤ̤򡢰ۤʤ⤵ɽޤ: splot x*x-y*y with pm3d, x*x+y*y with pm3d at t 2 print ?commands print ?print `print` ޥɤ <> ̤ͤɽޤ `pause 0` Ʊ Ǥ<> ϡ `gnuplot` οޤʸǤ : print <> {, <>, ...} ʲ: `expressions`ϥե `set print` Ǥޤ 2 pwd ?commands pwd ?pwd `pwd` ޥɤϥȥǥ쥯ȥ̤̾ɽޤ ȥǥ쥯ȥʸѿ¸ꡢʸǻȤ ϡѿ GPVAL_PWD ȤȤǤ뤳ȤդƤʲ: `show variables all` 2 quit ?commands quit ?quit `exit` `quit` ξޥɤ END-OF-FILE ʸϡ`gnuplot` λ ޤΥޥɤϡ֤ (`clear` ޥɤƱͤ) ꥢƤ齪λޤ 2 raise ?commands raise ?raise : raise {plot_window_nb} ޥ `raise` (`lower` ȿ) ϡ`pm`, `win`, `wxt`, `x11` gnuplot ÷Ϸμ¹ˡ襦ɥ () ˾夲 襦ɥ򡢥ǥȥå׾Υɥޥ͡ z ɥνŤʤ () ֤ޤ `x11` `wxt` Τ褦ʣ襦ɥ򥵥ݡȤƤ硢 եȤǤϤΥޥɤϤʣΥɥ߽˾夲ǽ 줿ɥֲˡǸ˺줿ɥ־¤٤ ץֹ椬Ϳ줿硢б襦 ɥ¸ߤФΤߤ夲ޤ ץϡñ襦ɥνϷʤ `pm` `win` Ǥ̵뤵ޤ ɥ X11 ̤˽Фʤ硢⤷襦ɥϡ ʤ X11 åưƤ (㤨 telnet ssh åʤ ˤä) ޤ̤˽ФȤɥޥ͡ˤä ɳƤǽޤ 2 refresh ?commands refresh ?refresh ޥ `refresh` ϡ`replot` ˻Ƥޤ 2 Ĥǰ㤤 ޤ`refresh` ϡɤ߹ǡѤơߤ 褷ޤϡ`refresh` (ǥХ '-' ) 饤ǡ衢ƤѲǡե뤫˻ ȤȤ̣ޤޥ `refresh` ϡ¸ߤ ˿ǡɲäΤˤϻȤޤ ޥä˥।ȥॢȤǤϡŬڤʾ `replot` ˤष `refresh` Ѥޤ: plot 'datafile' volatile with lines, '-' with labels 100 200 "Special point" e # ʥޥ򤳤Ǽ¹ set title "Zoomed in view" set term post set output 'zoom.ps' refresh 2 replot ?commands replot ?replot `replot` ޥɤʤǼ¹ԤȡǸ˼¹Ԥ `plot` ޤ `splot` ޥɤƼ¹ԤޤϡץåȤۤʤ `set` ץǤߤꡢƱץåȤۤʤ֤˽ϤꤹȤ Ǥ礦 `replot` ޥɤФϺǸ˼¹Ԥ `plot` ޤ `splot` ޥɤΰ (ۤ ',' ȶ) ɲä졢줫Ƽ¹Ԥޤ `replot` ϡϰ (range) Ƥϡ`plot` `splot` Ʊ Ȥ뤳ȤǤޤäơľΥޥɤ `splot` ǤϤʤ `plot` ξϡؿ⤦ĤμǥץåȤΤ `replot` ȤȤ Ǥޤ : plot '-' ; ... ; replot ȤȤϿ侩ޤ󡣤ϡ줬ʤ˺ƤƱǡ ƤϤ׵᤹뤳Ȥˤʤ뤫ǤƤξ硢˥ޥ `refresh` Ȥޤϡɤ߹ǡȤäƥդ 褷ޤ `replot` ޥɤ `multiplot` ⡼ɤǤƯޤ󡣤ϡ줬 ΤˤǤϤʤľΥץåȤΤߤƼ¹ԤΤǤ Ǹ˼¹Ԥ `plot` (`splot`) ޥɤƤˡˤĤƤ ʲ⻲: `command-line-editing` ľ襳ޥɤΤɽ뤳Ȥ䡢 `history` ԡˡˤĤƤϡʲ⻲: `show plot` 2 reread ?commands reread ?reread `reread` ޥɤϡ`load` ޥɤޤϥޥɥ饤ǻꤷ `gnuplot` Υޥɥե򡢤μΥޥɤɤޤˡ ˺ꤷޤϡޥɥեκǽ餫 `reread` ɤޤǤΥޥɤ̵¥롼פܼŪ˼Ƥ뤳Ȥˤʤޤ (ϲⰭȤǤϤޤ`reread` `if` Ȥ߹ 碌뤳ȤǤȤƤͭѤʥޥɤȤʤޤ) ɸϤϤξϡ`reread` ޥɤϲƶͿޤ : ե "looper" Τ褦ʥե a=a+1 plot sin(x*a) pause -1 if(a<5) reread ơ`gnuplot` 鼡Τ褦˼¹ԤȤޤ a=0 load 'looper' ȡpause Υåʬ䤵줿 5 ΥץåȤԤ뤳Ȥ ʤޤ ե "data" ƹԤˡ0 10 ޤǤϰ (yrange) 6 ĤΥ ǽ餬 x ɸǡ¾ 5 ĤΰۤʤؿΡ x Ǥ ͤǤȤޤơե "plotter" c_p = c_p+1 plot "$0" using 1:c_p with lines linetype c_p if(c_p < n_p) reread ǡ`gnuplot` 鼡Τ褦˼¹ԤȤޤ n_p=6 c_p=1 unset key set yrange [0:10] set multiplot call 'plotter' 'data' unset multiplot ȡ5 ĤΥץåȤ碌 1 ĤΥդǤޤyrange ϡ multiplot ⡼ɤǺǽΤΤ³ƽ񤫤 5 ĤΥդƱ Ĥ褦ˡŪ˻ꤹɬפޤꤷʤФʤ 󡣤ʤȡƤΥդƱǽ񤫤뤳Ȥˤʤޤ ˥᡼ΥץȤơdemo ǥ쥯ȥ animate.dem ⻲ Ƥ 2 reset ?commands reset ?reset ?reset errors ?reset bind ޥ `reset` `set` ޥɤǤ롢դ˴ؤƤΥ ץǥեȤͤꤷޤΥޥɤϡ㤨Хޥɥ κǸ˥դΥǥեȤ롢뤤ϥޥɥե ǤԤʤä˸ξ֤᤹ȤʤɤǤ ͡ʥץμǥեȤͤΤˤϡ`set` ޥɤη̤ ȤƤ ʲΤΤϡ`reset` αƶޤ `set term` `set output` `set loadpath` `set fontpath` `set linetype` `set encoding` `set decimalsign` `set locale` `set psdir` =error state `reset errors` ϡ顼ѿ GPVAL_ERRNO GPVAL_ERRMSG Τߤ ꥢޤ =bind `reset bind` ϡǥեȤξ֤ޤ 2 save ?commands save ?save set ?save `save` ޥɤϡ桼ؿѿ`set term` ξ֡`set` ꤹƤΥץΤ줫뤤Ϥ餹٤Ƥȡ˲ä ƺǸ˼¹Ԥ `plot` (ޤ `splot`) ޥɤ򡢻ꤷե ¸ޤ : save {<ץ>} '<ե̾>' ǡ<ץ> ϡ`functions`, `variables`, `terminal`, `set` Τ줫Ǥɤꤵʤäˤϡ`gnuplot` ϡ桼 ؿѿset ꤹ륪ץ󡢺Ǹ˼¹Ԥ `plot` (ޤ `splot`) ޥɤƤ¸ޤ `save` ϡƥȷǽϤޤޤΥե `load` ɤɤ߹ळȤǤޤ`set` ץդޤϲ⥪ץ Ĥ `save` ¹Ԥ硢`terminal` `output` Υ ̾ϥȵĤǽ񤭽ФޤϤνϥե ¾δĶ˥󥹥ȡ뤵줿 gnuplot ưˡʤ˻Ȥ 褦ˤ롢뤤Ϥäե񤭤Ƥޤäꤹ 򤱤롢Ȥạ̈ޤ `save terminal` ϡ`terminal` ξ֤򡢥ȵĤ˽񤭽 ޤϼˡäȤδ֤ `terminal` ؤ ¸Ƥ `terminal` ξ֤ɤ߹ळȤǰ terminal ᤹ʤɤΩޤñ gnuplot åǤϡ ߤ terminal ¸/¾ˡǤ륳ޥ `set term push` `set term pop` Ȥष⤷ޤ󡣰ʲ: `set term` ե̾ϰ˰ϤƤʤФʤޤ ̤ʥե̾ "-" ˤ `save` ޥɤɸϤ˽Ϥ뤳 Ǥޤpopen ؿ򥵥ݡȤ褦ʥƥ (Unix ʤ) Ǥϡ save νϤѥ׷ͳ¾γץϤȤǤޤ 硢ե̾Ȥƥޥ̾Ƭ '|' ĤΤȤޤ ϡ`gnuplot` ȥѥפ̤̿ץˡ`gnuplot` ˴ؤӤ󥿡ե󶡤ޤܺ٤ϡʲ : `batch/interactive` : save 'work.gnu' save functions 'func.dat' save var 'var.dat' save set 'options.dat' save term 'myterm.gnu' save '-' save '|grep title >t.gp' 2 set-show ?commands set ?commands show ?set ?show ?show all `set` ޥɤϼ¤¿ΥץꤹΤ˻Ȥޤ `plot`, `splot`, `replot` ޥɤͿޤDzɽޤ `show` ޥɤϤͤɽޤ`show all` Ǥ ɽޤ `set` ޥɤѹ줿ץϡб `unset` ޥ ɤ¹Ԥ뤳ȤǥǥեȤξ֤᤹ȤǤޤʲ⻲: `reset`ƤΥѥ᡼ǥեȤͤᤷޤ ⤷ѿΥǡޤʤС`show` ϡ`set timefmt` ˤä ꤵƤ񼰤˽äɽޤѿǽꤵ Ƥν񼰤̤ʤäȤƤǤ =iteration `set` `unset` ޥɤˤϷ֤ѤǤޤʲ: `iteration` 3 angles ?commands set angles ?commands show angles ?set angles ?show angles ?angles ?commands set angles degrees ?set angles degrees ?angles degrees ?degrees ǥեȤǤ `gnuplot` ϶˺ɸդΩѿñ̤ϥ饸 ޤ`set polar` `set angles degrees` ꤹȡñ ٤ˤʤꡢǥեȤϰϤ [0:360] Ȥʤޤϥǡե äǤ礦٤ϡ`set mapping` ޥɤꤹ 뤳Ȥˤ 3 ǤͭǤ : set angles {degrees | radians} show angles `set grid polar` ǻꤵ٤⡢`set angles` ǻꤷñ̤ɤޤ ɽޤ `set angles` Ȥ߹ߴؿ sin(x), cos(x), tan(x) ΰ asin(x), acos(x), atan8x), atan2(x), arg(x) νϤˤƶͿޤж 䡢٥åؿΰˤϱƶͿޤ󡣤ʣǿȤ жؿνϤˤϱƶФޤδؿȤȤϡ `set angles radians` Ϥΰδ֤˰ä¸ ʤФʤޤ x={1.0,0.1} set angles radians y=sinh(x) print y #{1.16933, 0.154051} ɽ print asinh(y) #{1.0, 0.1} ɽ set angles degrees y=sinh(x) print y #{1.16933, 0.154051} ɽ print asinh(y) #{57.29578, 5.729578} ɽ ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/poldat.html"> poldat.dem: `set angles` Ѥ˺ɸΥǥ ^ </a> 3 arrow ?commands set arrow ?commands unset arrow ?commands show arrow ?set arrow ?unset arrow ?show arrow ?arrow ?noarrow `set arrow` ޥɤȤȤˤꡢվǤդΰ֤ɽ 뤳ȤǤޤ : set arrow {<tag>} {from <position>} {to|rto <position>} { {arrowstyle | as <arrow_style>} | { {nohead | head | backhead | heads} {size <length>,<angle>{,<backangle>}} {filled | empty | nofilled} {front | back} { {linestyle | ls <line_style>} | {linetype | lt <line_type>} {linewidth | lw <line_width} } } } unset arrow {<tag>} show arrow {<tag>} <tag> ϳ̤Ǥꤷʤϡλ ̤ѤκǤ⾮ưŪ˳ƤޤȤȤǡ ѹꡢǤޤ¸ߤ° ϡ `set arrow` ޥɤѹսꤷ <position> x,y 뤤 x,y,z ǻꤷޤƤ˺ɸϤ 򤹤뤿 `first`, `second`, `graph`, `screen`, `character` ȤǤޤɸꤷʤХǥեȤǤ 0 ȸʤޤ üϡ5 Ĥκɸϡʤ `first` `second` μ뤤 `graph`, `screen`, `character` Τ 1 Ĥ򤷤ƻǤޤ ܺ٤ϡʲ: `coordinates`"from" ξκɸϻҤϡ"to" ξ˱ƶڤܤȤϤޤ󡣥դȤϤ߽Ф񤯤 ȤǤޤüˤäƤϥ顼뤳Ȥޤ "to" "rto" ǻꤵƤ硢Ūʰ֤ ޤξ硢 (п) `graph`, `screen` ɸ ФƤϡȽεΥͿ줿Ūͤбޤ ФƤϡͿ줿Ūͤϡ齪ؤܿб äơпξ硢ŪͤȤ 0 ͤͿ뤳Ȥϵ ޤ `nohead` ꤹ뤳ȤǡΤʤ𡢤ʤʬ񤯤ȤǤ ޤξʬ̤ˡͿޤǥեȤǤ 1 Ĥ 1 Ĥ򤽤νü˻äƤޤ`backhead` ϻ `heads` ʬξüޤƤνϷξü 򥵥ݡȤƤ櫓ǤϤޤ 礭 `size <length>,<angle>` ޤ `size <length>,<angle>,<backangle>` Ǥޤ`<length>` γƻޤĹǡ`<angle>` λޤ𼴤ʤ (ñ̤) Ǥ `<length>` ñ̤ x ƱǤ `<length>` `first`, `second`, `graph`, `screen`, `character` Ĥ뤳Ȥѹ ޤܺ٤ϡʲ: `coordinates``<backangle>` ϡ`filled` ޤ `empty` Ȥ˻Ȥ줿Τ߸Ϥξ硢 `<backangle>` θʬ𼴤Ȥڤ (`<angle>` Ʊ; ñ̤) ˤʤޤϷ `fig` ϡ¤줿ڤѴؿä ơ 3 Ĥΰۤʤ򥵥ݡȤƤơ 2 ĤͤǷ ޤ: 70 ̤ξ硢ϤؤڤѤ110 ٤Ķ 硢ʬäѤδ֤γѤǤϡθľˤʤ ޤ `filled` ꤹȡɤĤ֤줿ޤ (`heads` Ȥ Ƥ)ɤĤ֤ϡ¿ѷɤĤ֤Ԥ褦ʽϷ ݡȤƤơΥꥹȤˤĤƤϡʲ: `pm3d`¾νϷ ǤĤޤɤĤ֤ޤ󡣤Ʊ (Ĥ ɤʤ) ϡ`empty` ꤷƤޤޤ`metafont`, `metapost`, `latex`, `tgif` Τ褦ˡ򤽤鼫ȤȼΥ롼 褦ʽϷǤϡɤĤ֤Ϥ󥵥 Ȥޤ ϥ桼饤󥹥ΥꥹȤ֤ȤǤޤ (ʲ: `set style line`)ѰդƤ <line_type> (ǥե ȤΥ饤󥹥ΥꥹȤֹ) <linewidth> (ǥեȤ ܿ) ȤäƤ뤳ȤǤޤ 桼ѤΥ饤󥹥뤬򤵤줿硢° ( ) ϡñ¾ `set arrow` ޥɤŬֹ `lt`, `lw` ʤɤ ꤷƤ⡢ѹϤǤʤȤդƲ `front` ꤹȡϥդΥǡξޤ`back` ꤵ줿 (ǥե) ϥդΥǡβޤ`front` ȤС̩ǡ𤬸ʤʤ뤳ȤɤȤǤޤ : (1,2) ؤ桼ѤΥ 5 ˤ: set arrow to 1,2 ls 5 ΰκѤ (-5,5,3) إֹ 3 ˤ: set arrow 3 from graph 0,0 to -5,5,3 ü 1,1,1 ѹ򳰤 2 ˤˤ: set arrow 3 to 1,1,1 nohead lw 2 x=3 νإդβޤDZľˤ: set arrow from 3, graph 0 to 3, graph 1 nohead T ξü˻ıľˤ: set arrow 3 from 0,-5 to 0,5 heads size screen 0.1,90 ŪʵΥ򥰥պɸͿˤ: set arrow from 0,-5 rto graph 0.1,0.1 x пŪʽꤷ: set logscale x set arrow from 100,-5 rto 10,10 100,-5 1000,5 ޤǤޤ (y) ФƤ Ūʺɸ 10 " 10" ̣ΤФп (x) ФƤ Ūʺɸ 10 "ܿ 10" ȤƯޤ 2 ֤äˤ: unset arrow 2 Ƥäˤ: unset arrow Ƥξ (ν) ˤ: show arrow ^ <a href="http://www.gnuplot.info/demo/arrowstyle.html"> Υǥ ^ </a> 3 autoscale ?commands set autoscale ?commands unset autoscale ?commands show autoscale ?set autoscale ?unset autoscale ?show autoscale ?autoscale ?noautoscale ư̼ܵǽ (autoscale) x, y, z γƼФΩˡޤϰ礷 ƻǤޤǥեȤǤƤμФƼư̼Ԥޤ ޤΰ (`plot`) ȤΤߤ򸵤 autoscale ϡ оݤǤʤ `plot` ˥ե饰 `noautoscale` Ĥ뤳ȤǤޤ ʲ: `datafile` : set autoscale {<axes>{|min|max|fixmin|fixmax|fix} | fix | keepfix} unset autoscale {<axes>} show autoscale ǡ<axes> () `x`, `y`, `z`, `cb`, `x2`, `y2`, `xy` Τ Ǥ`min` ޤ `max` 򼴤ɲûꤹ (`xy` ǤϻȤޤ) `gnuplot` ˤμκǾ͡ޤϺͤΤߤư̼ܤ뤳 ȤˤʤޤⲿꤵƤʤƤμоݤȤʤޤ `fixmin` `fixmax` `fix` ɲûꤹȡֳ֤μư ܻΡ֤ޤǤϰϤμư gnuplot ˹Ԥ碌ʤ褦 ˤޤ`set autoscale fix` ϤƤμФꤷޤ `set autoscale keepfix` ϡľ `fix` ݻޤ μư̼ܤˤޤ ư̼ܵǽȤȤϡϰϤϼưŪ˳Ф졢°ѿ (`plot` ΤȤ y `splot` ΤȤ z ) ϡؿǡͰ褬 ޤ褦ꤵޤ °ѿ (y ޤ z) μư̼ܵǽꤵƤʤϡߤ y z ϰϤΤޤ޻Ȥޤ Ωѿ (`plot` ΤȤ x `splot` ΤȤ x,y ) μư̼ ǽꤵƤϡ褵ƤΥǡեޤ 褦Ȥ褦ˤʤޤǡե뤬 1 ĤꤵƤ ʤϡư̼ܵǽϤʤθ̤⤢ޤ󡣤ĤޤꡢؿΤߤ ꤵƤƥǡեȤʤϡx ϰ (z = f(x,y) 褷ƤȤ y ) ϱƶ򤦤ޤ ϰϤ˴ؤܤ˴ؤƤϡʲ: `set xrange` ޲ѿ⡼ (parametric) Ǥ⼫ư̼ܵǽͭǤ (ʲ: `set parametric`)ξ硢¿ν°ѿΤǡx, y, z ˴ؤơ¿椬Ԥޤ޲ѿ⡼ɤǤΩѿ ( ѿ) `plot` Ǥ t `splot` Ǥ u, v Ǥ޲ѿ⡼ Ǥϡư̼ܵǽ (t, u, v, x, y, z) ƤϰϤ椷x, y, z ϰϤμư˹Ԥޤ ư̼ܵǽϡ˺ɸ⡼ (polar mode) Ǥ `plot` ޲ѿ⡼ Ʊͤ˵ǽޤ˺ɸ⡼ɤǤ `set dummy` Ωѿ t ѹǤ (ʲ: `set dummy`) Ȥĥޤ ꤬μɽ졢⤳μФ褬Ԥʤ ˤϡx2range y2range xrange yrange ͤѤޤ ϡxrange yrange Ĥ˼ư̼ܤפ˹Ԥ ޤΤǡˤäͽʤ̤⤿餹ǽޤ 򤱤뤿 `fixmin`, `fixmax` ץȤȤǤޤ : ʲ y μư̼ܵǽꤷޤ (¾μˤϱƶͿޤ): set autoscale y ʲ y κǾͤФƤΤ߼ư̼ܵǽꤷޤ (y κ͡ ¾μˤϱƶͿޤ): set autoscale ymin ʲ x2 ٤ؤμưϰϳ絡ǽ̵ˤäǡ ⡢ޤϴؿФ٤ϰϤݻޤ: set autoscale x2fixmin set autoscale x2fixmax ʲ x, y ξμư̼ܵǽꤷޤ: set autoscale xy ʲ x, y, z, x2, y2 μư̼ܵǽꤷޤ: set autoscale ʲ x, y, z, x2, y2 μư̼ܵǽػߤޤ: unset autoscale ʲ z ΤߤˤĤƼư̼ܵǽػߤޤ: unset autoscale z 4 ޲ѿ⡼ (parametric) ?commands set autoscale parametric ?set autoscale parametric ?set autoscale t ޲ѿɽ⡼ (`set parametric`) ˤƤϡxrange yrange Ʊͤ˽̼ܤѤ뤳ȤǤޤĤޤꡢ޲ѿ⡼ɤˤƤϡ x ⼫ưŪ˽̼ܤĴ졢ȤƤ޲ѿɽδؿ ޤ褦ˤʤޤy ޲ѿ⡼ɤǤʤƱͤ ưŪ˽̼ܤѤޤx ˤĤƼư̼ܵǽꤵƤʤ ϡߤ x ϰϤȤޤ ǡե޲ѿ⡼ɤǤ⤽Ǥʤ֤ǤƱͤ褵 ޤǡեȴؿߤƤˤϡ㤤 ޤ: ޲ѿ⡼ɤǤʤСx μư̼ܵǽϡؿϰϤ ǡϰϤ˹碌ޤ޲ѿ⡼ɤǤϥǡϰ ϴؿϰϤ˱ƶޤ ˤϡҼˤʤʤ褦 `set autoscale t` Ȥޥ ѰդƤޤθ̤˾ΤǤư̼ ǽꤵƤȡ`gnuplot` t ϰϤ̵ʤäƤޤ ȽǤϰϤ򾯤Ĵޤư̼ܵǽꤵƤʤ Τ褦ʤȤˤϥ顼ȤʤޤΤ褦ưϼ¤Ϥޤ̣ ʤä `set autoscale t` Ȥޥɤ¸߰յ˵䤬 ޤ `splot` ǤϾ嵭ȯۤθ˳ĥƤޤư̼ܵǽꤵ Ƥ硢x, y, z γϰϤϷ׻̤ޤ褦ꤵ̼ Ĵޤ 4 ˺ɸ⡼ (polar) ?commands set autoscale polar ?set autoscale polar ˺ɸ⡼ (`set polar`) Ǥϡxrange yrange ϼư̼ܥ⡼ɤǤ ʤʤޤư¼ϰѤ `set rrange` Ѥ硢xrange yrange Ϥ˹礦褦˼ưŪĴޤˤ ĴСθŪ xrange yrange ޥɤȤȤ Ǥޤʲ: `set rrange`trange ϼưϰ꤬ʤޤ ⤷trange ݸ (ʬ) ˼ޤʤСư̼ܵǽˤꤽ ξݸ¤Τߤ褬Ԥ뤳ȤդƤ 1 ġ뤤 2 ĤϰϤŪꤷƤ¾ΤΤꤷʤ ͽʤ̤Τޤ ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/poldat.html"> ˺ɸΥǥ⡣ ^ </a> 3 bars ?commands set bars ?commands show bars ?set bars ?show bars ?bars ޥ `set bars` ϸ (errorbar) ξü boxplot ĤȢҤξüΥޡ椷ޤ : set bars {small | large | fullwidth | <size>} {front | back} unset bars show bars `small` 0.0, `large` 1.0 ƱǤꤷʤХǥե Ȥͤ 1.0 Ǥ  `fullwidth` ϡerrorbar ȼ boxplots histograms ˤ ߴϢޤ errorbar ξüбȢƱ ޤȢΤѹ뤳ȤϤޤ  `front`, `back` ϡɤ٤ĹΤĤ errorbar Τߤ Ϣޤ (boxes, candlesticks, histograms) 3 bind ?commands show bind ?show bind =bind ߤΥۥåȥγ (binding) ɽޤʲ: `bind` 3 bmargin ?commands set bmargin ?set bmargin ?bmargin ޥ `set bmargin` ϡ;Υꤷޤܺ٤ ʲ: `set margin` 3 border ?commands set border ?commands unset border ?commands show border ?set border ?unset border ?show border ?border ?noborder `set border` `unset border` `plot` `splot` ǤΥդȤ ɽ椷ޤȤɬ⼴ȤϰפʤȤդƤ `plot` Ǥפޤ`splot` ǤפƤޤ : set border {<integer>} {front | back} {linewidth | lw <line_width>} {{linestyle | ls <line_style>} | {linetype | lt <line_type>}} unset border show border `set view 56,103` Τ褦Ǥդɽ줦 `splot` Ǥϡ x-y ʿ̾ 4 ĤγѤ (`front`), (`back`) , (`left`), (`right`) Τ褦˸ƤФޤ󤳤Ʊ 4 ĤγѤŷ̤ˤ ޤäơ㤨 x-y ʿ̾θȱγѤĤʤ "α (bottom right back)" ȸŷμγѤĤʤ "ľ (front vertical)" ȸƤ֤Ȥˤޤ (̿̾ˡϡ Ԥɽ򤹤뤿˻Ȥޤ) Ȥϡ12 ӥåȤ沽Ƥޤ: 4 ӥåȤ `plot` 볰ȡ`splot` ФƤ̤γȡ 4 ӥåȤ `splot` αľ ȡƾ 4 ӥåȤ `splot` ŷ̤γȤ椷ޤ `<>` ͤϼɽбܤο¤ˤʤޤ: @start table - first is interactive cleartext form ӥå plot splot 1 κ 2 κ 4 α 8 α 16 ̤ʤ ľ 32 ̤ʤ ľ 64 ̤ʤ ľ 128 ̤ʤ ľ 256 ̤ʤ ŷκ 512 ̤ʤ ŷα 1024 ̤ʤ ŷκ 2048 ̤ʤ ŷα #\begin{tabular}{|c|c|c|} \hline #\multicolumn{3}{|c|}{ն沽} \\ \hline \hline #ӥå & plot & splot \\ \hline #1 & & κ \\ #2 & & κ \\ #4 & & α \\ #8 & & α \\ #16 & ̤ʤ & ľ \\ #32 & ̤ʤ & ľ \\ #64 & ̤ʤ & ľ \\ #128 & ̤ʤ & ľμ \\ #256 & ̤ʤ & ŷκ \\ #512 & ̤ʤ & ŷα \\ #1024 & ̤ʤ & ŷκ \\ #2048 & ̤ʤ & ŷα \\ %c c c . %ӥå @plot@splot %_ %1@@κ %2@@κ %4@@α %8@@α %16@̤ʤ@ľ %32@̤ʤ@ľ %64@̤ʤ@ľ %128@̤ʤ@ľ %256@̤ʤ@ŷκ %512@̤ʤ@ŷα %1024@̤ʤ@ŷκ %2048@̤ʤ@ŷα @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="right"> ^ <col align="center"> ^ <col align="center"> ^</colgroup> ^<thead> ^<tr> <th>ӥå</th> <th>plot</th> <th>splot</th></tr> ^</thead> ^<tbody> ^<tr> <td>1</td> <td></td> <td>κ</td></tr> ^<tr> <td>2</td> <td></td> <td>κ</td></tr> ^<tr> <td>4</td> <td></td> <td>α</td></tr> ^<tr> <td>8</td> <td></td> <td>α</td></tr> ^<tr> <td>16</td> <td>̤ʤ</td> <td>ľ</td></tr> ^<tr> <td>32</td> <td>̤ʤ</td> <td>ľ</td></tr> ^<tr> <td>64</td> <td>̤ʤ</td> <td>ľ</td></tr> ^<tr> <td>128</td> <td>̤ʤ</td> <td>ľ</td></tr> ^<tr> <td>256</td> <td>̤ʤ</td> <td>ŷκ</td></tr> ^<tr> <td>512</td> <td>̤ʤ</td> <td>ŷα</td></tr> ^<tr> <td>1024</td> <td>̤ʤ</td> <td>ŷκ</td></tr> ^<tr> <td>2048</td> <td>̤ʤ</td> <td>ŷα</td></tr> ^</tbody> ^</table> ӥåȤϰİġ뤤ϤĤޤȤưˤΥޥɤղä ޤ ǥեȤͤ 31 ǡ `plot` Ǥ 4 γơ`splot` Ǥ̤ z Ȥ̣ޤ 2 Ǥ϶Ϥ٤ƤǤΰ־ޤ (`front`) ⤷Ǥβϡ`set border back` ȤƤ <line_style>, <line_type>, <line_width> ꤷơˤ ȿǤ뤳ȤǤޤ (ߤν֤ݡȤΤ˸ ޤ) `plot` Ǥϡ 2 ͭˤ뤳ȤǡȺʳζ ȤǤޤܺ٤ϡʲ: `xtics` "`unset surface; set contour base`" ʤɤˤä `splot` ̤ˤΤ 褹硢ľŷϤ餬ꤵƤƤ褵ޤ `set grid` Υץ 'back', 'front', 'layerdefault' Ǥ⡢ ζ񤯽֤Ǥޤ : ʲϡǥեȤޤ: set border ʲϡ`plot` ǤϺȲ`splot` Ǥ̤κȺ ޤ: set border 3 ʲϡ`splot` Ǽ˴Ȣޤ: set border 4095 ʲϡαľ̤ŷΤʤȢޤ: set border 127+256+512 # ޤ set border 1023-128 ʲϡ`plot` ФƾȱΤߤ򼴤Ȥ ޤ: unset xtics; unset ytics; set x2tics; set y2tics; set border 12 3 boxwidth ?commands set boxwidth ?commands show boxwidth ?set boxwidth ?show boxwidth ?boxwidth ޥ `set boxwidth` `boxes`, `boxerrorbars`, `boxplot`, `candlesticks`, `histograms` ˤΥǥեȤ 뤿˻Ȥޤ : set boxwidth {<width>} {absolute|relative} show boxwidth ǥեȤǤϡ٤礦ܤ褦˳ơޤ ȤϰۤʤǥեȤꤹˤ `set boxwidth` ޥɤ ޤ`relative` ξϡǥեȤФǤȲ ޤ `relative` ꤷʤä硢 (boxwidth) Ȥƻꤵ 줿Ūͤϡߤ x ñ̤Ǥο (`absolute`) ǤȲ ޤx п (ʲ: `set log`) Ǥ硢boxwidth ϼºݤˤ x=1 ǤΤ "Ū" ȤʤꡢʪŪĹΤ̤ ݻޤ (ʤ x ɸäˤȤʤäƶʤä ޤ)п x ϰϤ x=1 ΥƤϡŬڤ Фˤϲ٤Ƥߤɬפ뤫Τޤ ǥեȤͤϡ`boxes` `boxerrorbars` Ѥɲä ǡŪͤФˤä֤ޤ4 Υǡ ξ硢 4 ܤͤȤƻȤޤ -2.0 ξˤϼư׻ޤܺ٤ϡʲ: `style boxes`, `style boxerrorbars` ưŪ˥åȤˤ set boxwidth Ȥ롢뤤 4 ΥǡФƤϰʲΤ褦ˤޤ set boxwidth -2 `plot` Υ `using` ȤäƤƱ̤뤳ȤǤޤ: plot 'file' using 1:2:3:4:(-2) ưŪͤȾʬˤˤ set boxwidth 0.5 relative Ū 2 ˤˤ set boxwidth 2 absolute 3 clabel ?commands set clabel ?commands unset clabel ?commands show clabel ?set clabel ?unset clabel ?show clabel ?clabel `gnuplot` ϡclabel ꤵƤˤϡơΥ٥ ƻȤѲޤΥץͭǤ (ǥե )ˤäƳơ򡢤줬ɽ z Υ٥ȤȤɽ : set clabel {'<format>'} unset clabel show clabel ʸΥǥեȤ %8.3g ǡʬ 3 ɽޤ⤷ key ΥǥեȤͤѹƤС֤Խʬʤ ˤʤ뤫⤷ޤ ǽޤ clabel ̵ǤͣĤ ϡ(̤ +1) ˤʤޤ϶̤ƱΤ ʤޤ ʲ: `set contour` 3 clip ?commands set clip ?commands unset clip ?commands show clip ?set clip ?unset clip ?show clip ?clip ?noclip `gnuplot` ϥդüդΥǡ򥯥åԥ󥰤뤳ȤǤ ޤ : set clip <clip-type> unset clip <clip-type> show clip `gnuplot` Ф륯å׷ (clip-type) Ȥơ`points`, `one`, `two` 3 򥵥ݡȤƤޤФơ å׷ǤդȤ߹礻ꤹ뤳ȤǤޤ`pm3d` οϿޤ 顼̤ɤĤ֤줿ͳѷϤΥޥɤǤǤޤ󤬡 `set pm3d clip1in` `set pm3d clip4in` ˤäƲǽǤ뤳Ȥ Ƥ å׷ `points` ꤹȡΰˤϤ뤱ɶ ˶ᤤ褦򥯥åפ (ºݤˤ褷ʤǤ) 褦 `gnuplot` ˻ؼޤȤ礭ʥޡѤȤˡ ΥޡϤ߽Фʤ褦ˤ̤ޤ`points` 򥯥åפʤ硢դ뤫⤷ޤ ξ硢x y ϰ (xrange, yrange) ĴƤߤƲ å׷ `one` ꤹȡüΤߤΰˤ褦ʬ 褹褦 `gnuplot` ˻ؼޤκݡΰˤʬ Τߤºݤ褵ϰϤǤꤷʤä硢Τ褦ʬ оݤȤʤ餺ɤʬ褵ޤ ξü϶ϰϤ̵ΰ̲᤹Ȥʬ⤢ޤ å׷ `two` ꤹ뤳ȤˤäơΤ褦ʬΰ ʬ褹뤳ȤǤޤ ɤΤ褦ʾǤ⡢ϰϤγ뤳ȤϤޤ ǥեȤǤϡ`noclip points`, `clip one`, `noclip two` Ȥʤä ޤ ƤΥå׷򸫤ˤϰʲΤ褦ˤޤ: show clip ΥСȤθߴΤʲν񼰤ѲǽǤ: set clip unset clip `set clip` `set clip points` ƱǤ`unset clip` 3 å׷Ƥ̵ˤޤ 3 cntrparam ?commands set cntrparam ?commands show cntrparam ?set cntrparam ?show cntrparam ?cntrparam `set cntrparam` ˡӤ餫褹ˡ 椷ޤ`show contour` ϸߤ `contour` Ǥʤ `cntrparam` ɽޤ : set cntrparam { { linear | cubicspline | bspline | points <n> | order <n> | levels { auto {<n>} | <n> | discrete <z1> {,<z2>{,<z3>...}} | incremental <start>, <incr> {,<end>} } } } show contour Υޥɤ 2 ĤεǽäƤޤĤ (ǡ ֡뤤ϴؿɸܲ (isosample) ˤ) Ǥ z ͤ ǡ⤦ĤϡΤ褦˷ꤵ줿 z ƱΤǷ ˡǤ<n> <z1>, <z2> ... Ǥդ ƥץѿΰ̣ϼ̤Ǥ: `linear`, `cubicspline`, `bspline` --- () ˡꤷޤ `linear` ʤС϶̤줿ͤʬŪľǷӤޤ `cubicspline` (3 ץ饤) ʤСʬŪľϤ֤ʤ餫 褦֤ޤ¿ǤIJǽޤ `bspline` (B-spline) ϡ餫ʶȤݾڤޤ z ΰ֤ƤǤ `points` --- ǽŪˤϡƤϡʬŪľǹԤޤ ǻꤹϡ`bspline` ޤ `cubicspline` Ǥζ˻Ȥʬ ο椷ޤºݤˤ cubicspline bspline ζ (ʬ) `points` ʬοѤʤޤ `order` --- bspline μǤμ礭ʤˤĤơ Ϥʤ餫ˤʤޤ (󡢹⼡ bspline ˤʤۤɡ ʬŪľΥƤޤ)Υץ `bspline` ⡼ɤǤ ͭǤǤͤϡ2 (ľ) 10 ޤǤǤ `levels` --- Υ٥οϡ`auto` (ǥե), `discrete`, `incremental` Υ٥ <n> 椷ޤ `auto` Ǥϡ<n> ϲΥ٥οǤꡢºݤΥ٥οϡñʥ ٥褦Ĵᤵޤ̤ z ɸ zmin zman ϤˤȤϤδ֤ dz ܤˤʤ褦ޤ ǡdz 10 Τ٤ 1, 2, 5 ܡΤ줫Ǥ (2 Ĥ δ֤ٳڤ褦) `levels discrete` Ǥϡϻꤵ줿 z = <z1>, <z2> ... Ф ޤꤷĿΥ٥θĿȤʤޤ`discrete` ⡼ɤǤϡ`set cntrparams levels <n>` ȤϾ̵뤵ޤ `incremental` Ǥϡ z = <start> Ϥޤꡢ<increment> ƹԤ³θĿãޤǽ񤫤ޤ<end> Ϥο ꤹΤ˻Ȥޤϸ `set cntrparam levels <n>` ˤä ѹޤz пξ硢`set ztics` ξƱͤˡ <increment> ܿȤƲᤵޤ ޥ `set cntrparam` ʤ˸ƤФ줿ϡΥǥեȤ ͤȤޤ: linear, 5 points, order 4, 5 auto levels : set cntrparam bspline set cntrparam points 7 set cntrparam order 10 ʲϥ٥δब礨 5 ĤΥ٥뤬˼ưŪ򤵤ޤ: set cntrparam levels auto 5 ʲ .1, .37, .9 ˥٥ꤷޤ: set cntrparam levels discrete .1,1/exp(1),.9 ʲ 0 4 ޤǡ1 䤹٥ꤷޤ: set cntrparam levels incremental 0,1,4 ʲϥ٥ο 10 ꤷޤ (äκǸ (end) ޤϼư ꤵ٥οѹޤ): set cntrparam levels 10 ʲϥ٥οݻޤޥ٥γͤʬͤꤷޤ: set cntrparam levels incremental 100,50 ˴ؤƤϡʲ: `set contour`Υ ٥ν񼰤˴ؤƤϡʲ: `set clabel` ʲ⻲ȤƤ ^ <a href="http://www.gnuplot.info/demo/contours.html"> Υǥ (contours.dem) ^ </a> ^ <a href="http://www.gnuplot.info/demo/discrete.html"> 桼٥Υǥ (discrete.dem). ^ </a> 3 顼ܥå (colorbox) ?commands set colorbox ?commands show colorbox ?commands unset colorbox ?set colorbox ?show colorbox ?unset colorbox ?colorbox ΰɽʤ `pm3d` `palette` min_z max_z ޤǤγ 餫ʿθۤϡ`unset colorbox` ȤƤʤ¤ꥫ顼ܥå (colorbox) ޤ set colorbox set colorbox { { vertical | horizontal } { default | user } { origin x, y } { size x, y } { front | back } { noborder | bdefault | border [line style] } } show colorbox unset colorbox 顼ܥåΰ֤ϡ`default` ޤ `user` ǻǤԤξ ΰ֤礭 `origin` `size` ޥɤꤷޤ顼ܥ ϡդ̤θ (`front`) 뤤 (`back`) 褵뤳 ȤǤޤ ۤϡץ `vertical` `horizontal` ؤ뤳Ȥ ǽǤ `origin x, y` `size x, y` `user` ץȤȤǤΤ߻Ѥ ޤx, y ͤϡǥեȤǤϥ꡼ɸȲᤵޤ 3 ѤΤޤäץ˲᤮ޤ`set view map` splot ޤ 2 ǤϡǤդκɸϤǤλ꤬ǽǤ㤨 аʲƤߤƤ: set colorbox horiz user origin .1,.02 size .8,.04 Ͽʿοۤ򥰥դβդ褷ޤ `border` ϶ ON ˤޤ (ǥե) `noborder` ϶ OFF ˤޤ`border` θͿȡ򶭳 褹 line style ΥȤƻȤޤ㤨: set style line 2604 linetype -1 linewidth .4 set colorbox border 2604 line style `2604`ʤ٤ΥǥեȤζ (-1) Ƕ 褷ޤ`bdefault` (ǥե) ϡ顼ܥåζ˥ եȤζ line style Ȥޤ 顼ܥåμ `cb` ȸƤФ졢̾μΥޥɤ椵ޤ ʤ `set/unset/show` `cbrange`, `[m]cbtics`, `format cb`, `grid [m]cb`, `cblabel` ʤɤ¿ʬ `cbdata`, `[no]cbdtics`, `[no]cbmtics` ʤɤȤǤ礦 ѥ᡼̵ `set colorbox` ϥǥեȤΰ֤ؤޤ `unset colorbox` ϥ顼ܥåΥѥ᡼ǥեͤ˥ꥻå ξǥ顼ܥå OFF ˤޤ ʲ⻲: `set pm3d`, `set palette`, `x11 pm3d`, `set style line` 3 ̾ (colornames) ?colornames ?show colornames ?commands show colornames ?show palette colornames gnuplot ϸꤵ줿Ŀο̾äƤޤϡpm3d ѥ åȤǤĤʤ뿧ϰϤΤˡ뤤ϸġ饤󥹥 οϷ˰¸ʤꤹΤ˻Ȥޤgnuplot λĿ̾ΰ򸫤ˤϡޥ `show colornames` ѤƤ : set style line 1 linecolor rgb "sea-green" 3 (contour) ?commands set contour ?commands unset contour ?commands show contour ?set contour ?unset contour ?show contour ?contour ?nocontour ޥ `set contour` ϶̤ȤؼޤΥ `splot` ǤΤͭǤϡʻҾǡ (grid data) ɬ פȤޤܺ٤ϡʲ: `grid_data`ʻҾǡ ϡʻҤ뤿 `set dgrid3d` Ѥޤ : set contour {base | surface | both} unset contour show contour 3 ĤΥץɤ˰ꤷޤ`base` x/y ιߤΤ̤졢`surface` ǤϤ ̼Τξ졢`both` Ǥ̤ȶ̾ξޤ 󤬻ꤵƤʤ `base` ǤȲꤵޤ ˱ƶͿѥ᡼ˤĤƤϡʲ: `set cntrparam`Υ٥˴ؤƤϡʲ: `set clabel` ΤߤΥդ뤿ˡ̼Ȥ򤷤ʤ褦ˤ뤳Ȥ Ǥޤ (ʲ: `set surface`)`set size` Ȥäơդ դ褹뤳ȤǽǤäϷ⡢Υǡ ե˽񤭽ФƤ 2 ǡȤɤ߹褹 Ф褤椬ǽˤʤޤ: unset surface set contour set cntrparam ... set table 'filename' splot ... unset table # contour info now in filename set term <whatever> plot 'filename' ˤϡǡϳʻҾǡ ("grid data") Ǥɬפ ޤΤ褦ʥեǤϡĤ y-ΩƤ ¤٤Ƥޤ٤ y-Ω¤٤졢١ ³Ƥޤy-ΩƱΤʬΥˤϰԤζ ( ԰ʳʸޤޤʤ) 򶴤ߤޤʲ: `splot datafile` ʲ⻲ȤƤ ^ <a href="http://www.gnuplot.info/demo/contours.html"> Υǥ (contours.dem) ^ </a> ^ <a href="http://www.gnuplot.info/demo/discrete.html"> 桼٥Υǥ (discrete.dem). ^ </a> 3 data style ?set data style ΥޥɤηϸߤϿ侩Ƥޤ󡣰ʲ: `set style data` 3 datafile ?set datafile ?show datafile ޥ `set datafile` ϡ`plot`, `splot`, `fit` ޥɤϥǡ ɤˡ (field) βλ椹륪ץ ޤߤϡ6 ĤΤΤ褦ʥץ󤬼Ƥޤ 4 set datafile fortran ?set datafile fortran ?show datafile fortran ?fortran ޥ `set datafile fortran` ϡϥե Fortran D Q ̤ͤʥåǽˤޤ̤ʥåϽ ٤ޤΤǡºݤˤΥǡե뤬 Fortran D Q äƤˤΤߤ򤹤٤ǤΥץϡθ `unset datafile fortran` Ԥ̵ˤǤޤ 4 set datafile nofpe_trap ?set datafile nofpe_trap ?fpe_trap ?nofpe_trap =floating point exceptions ޥ `set datafile nofpe_trap` ϡϥե뤫ǡɤ߹ ߤκݤˡ٤Ƥοɾư㳰ϥɥκƽ ʤ褦 gnuplot ̿ᤷޤˤꡢȤƤ礭ʥե뤫 ΥǡϤʤ®ʤޤư㳰˥ץ ब۾ェλƤޤϤޤ 4 set datafile missing ?set datafile missing ?show datafile missing ?set missing ?missing ޥ `set datafile missing` `gnuplot` ˡɤΤ褦ʸ󤬥 եη礱ǡ (missing data) ̣Τؼޤ ºݤˤʸ󤬤ɤΤ褦˼갷뤫ϡ`plot` `splot` ޥ ɤ `using` Ҥˤ¸ޤ : set datafile missing {"<string>"} show datafile missing unset datafile : # IEEE NaN ("Not a Number") ɤޤ२ȥ̵뤹 set datafile missing "NaN" : set style data linespoints plot '-' 1 10 2 20 3 ? 4 40 5 50 e set datafile missing "?" plot '-' 1 10 2 20 3 ? 4 40 5 50 e plot '-' using 1:2 1 10 2 20 3 ? 4 40 5 50 e plot '-' using 1:($2) 1 10 2 20 3 ? 4 40 5 50 e ǽ `plot` ϡ"3 ?" ιԤǤϺǽΥǡΤߤǧǤ 1 Ԥ 1 Ĥǡʤäε§ŬѤ졢ֹ椬 "x" ǥǡ "y" ȸʤ졢 (2,3) (ξϸä) 褵ޤ 2 ܤ 3 ܤ `plot` ޥɤϡιԤ̵뤷ޤ ϡ(2,20) (4,40) Фޤ 4 ܤ `plot` ⿿ιԤ̵뤷ޤξ (2,20) (4,40) ϷФޤ ǥեȤ `missing` ѤʸϲƤޤ󤬡¿ξ ͤԤ٤ˤǧǤʤʸĤä餽Ϸ礱 ǡ (missing data) Ǥȸʤޤ 4 set datafile separator ?set datafile separator ?show datafile separator ?datafile separator ?separator ޥ `set datafile separator "<char>"` ϡ`gnuplot` ˡθ ϥեΥǡʬΥʸ (whitespace) Ǥʤ <char> ǤȻؼޤΥޥɤκǤŪʻϡɽ׻եȤ ǡ١եȤˤäƺ줿 csv (޶ڤ) եɤ Ǥ礦ǥեȤΥǡʬΥʸ϶ (whitespace) Ǥ : set datafile separator {"<char>" | whitespace} : # ֶڤΥե set datafile separator "\t" # ޶ڤΥե set datafile separator "," 4 set datafile commentschars ?set datafile commentschars ?commentschars ޥ `set datafile commentschars` `gnuplot` ˡɤʸǡ եΥȤ̣Τؼޤgnuplot ϡꤵ ʸΰĤǡԤκǽʸȤƸ줿硢ʸ ʲ̵뤷ޤ : set datafile commentschars {"<string>"} show datafile commentschars unset commentschars ǥեȤ string ϡVMS Ǥ "#!" ǡʳǤ "#" Ǥ äơǡեΰʲιԤϴ̵뤵ޤ # 1 2 3 4 ʲι 1 # 3 4 ϡ⤷ set datafile missing '#' ꤵƤʤСͽ̷̤ޤ : set datafile commentschars "#!%" 4 set datafile binary ?set datafile binary ޥ `set datafile binary` ϡǡեɤ߹߻˥Х եǥեȤꤹΤ˻Ȥޤ񼰤ϡ줬 `plot` ޤ `splot` ޥɤǻȤΤΤƱǤ<binary list> 񤱤륭ɤ˴ؤƤϡܤϡʲ: `binary matrix`, `binary general` : set datafile binary <binary list> show datafile binary show datafile unset datafile : set datafile binary filetype=auto set datafile binary array=(512,512) format="%uchar" ?show datafile binary show datafile binary # ߤΰɽ 3 decimalsign ?commands set decimalsign ?commands show decimalsign ?commands unset decimalsign ?set decimalsign ?show decimalsign ?unset decimalsign ?decimalsign =locale ޥ `set decimalsign` ϡθФ뤤 `set label` ʸ ˽񤫤ξ򤷤ޤ : set decimalsign {<value> | locale {"<locale>"}} unset decimalsign show decimalsign <value> ϡ̾ξ֤ƻȤʸǤŵŪ Τϥԥꥪ '.' 䥳 ',' Ǥ¾ˤͭѤʤΤǤ礦 <value> άȡζڤϥǥե (ԥꥪ) ѹޤunset decimalsign <value> άΤƱ̤ ޤ : ¿Υ衼åѽǤϷˤ: set decimalsign ',' ΤȤդƤ: Ūʸꤷ硢ϼ ʤɤ gnuplot gprintf() 񼰴ؿǽϤͤΤߤ˱ƶ ϥǡν񼰻 sprintf() 񼰴ؿǽϤͤˤϱƶ 󡣤ϤϤηεưѹϡ˰ʲ ѤƤ: set decimalsign locale ϡgnuplot ˡϤȽϤν񼰤򡢴Ķѿ LC_ALL, LC_NUMERIC, LANG θߤ˽äΤȤ碌褦ˤޤ set decimalsign locale "foo" ϡgnuplot ˡϤȽϤν񼰤򡢥 "foo" ˽äΤ ޤΥ뤬󥹥ȡ뤵Ƥɬפޤ⤷ "foo" Ĥʤä硢顼åϤ졢 ѹޤlinux ƥǤϡ˥󥹥ȡ뤵 ΰ "locale -a" Ǹ뤳ȤǤޤlinux Υ ʸϤ "sl_SI.UTF-8" Τ褦ʷ򤷤ƤޤWindows Υʸ "Slovenian_Slovenia.1250"ޤ "slovenian" Τ ʷǤʸβϡC Υ󥿥饤֥꤬Ԥ ȤդƤŤ C 饤֥ǤϡΥݡ (㤨п 3 ζڤʸʤ) ʬŪˤ󶡤Ƥʤ ޤ set decimalsign locale; set decimalsign "." ϡߤΥ˹äɤʾǤ⡢ƤϤФƻ Ѥ褦ꤷޤgnuplot ؿ gprintf() Ȥäƽ񼰲 ͤŪ˻ꤵ줿 '.' ˤʤޤ () 3 dgrid3d ?commands set dgrid3d ?commands unset dgrid3d ?commands show dgrid3d ?set dgrid3d ?unset dgrid3d ?show dgrid3d ?dgrid3d ?nodgrid3d ?kdensity2d ޥ `set dgrid3d` ϡʻҾǡʻҾǡؤμǽ ͭˤΤΥѥ᡼ꤷޤʻҾǡι¤ˤĤ ξܺ٤ϡʲ: `splot grid_data` : set dgrid3d {<rows>} {,{<cols>}} { splines | qnorm {<norm>} | (gauss | cauchy | exp | box | hann) {kdensity} {<dx>} {,<dy>} } unset dgrid3d show dgrid3d ǥեȤǤ `dgrid3d` ̵ˤʤäƤޤͭˤʤȡե ɤ߹ޤ 3 Υǡϡֻߤץǡ (ʻҾǡ) ǤȸʤޤʻҤϡդΤˡߤ Ϥˡȡrow_size/col_size ǻꤵι Ĥ褦ޤʻҤ x () y () ֤Ǥz ͤϻߤǡ z ͤνŤդʿѡޤϥץ ֤ȤƷ׻ޤѤС§Ūʴֳ֤γʻҤ졢 ƤγʻǸΥǡγ꤫ʶͤɾޤΥǡ ˤζͤ褵ޤ ǥեȤοϹԤοΥǥեȤͤ 10 Ǥ Υǡͤ׻뤿ΤĤΥ르ꥺबѰդ ơɲäΥѥ᡼ǤΤ⤢ޤ֤ϡʻ ˶ᤤǡۤɡγʻФƤ궯ƶͿޤ `splines` 르ꥺϡ"Ĥ" 򸵤ˤַ׻Ԥޤ ɲåѥ᡼ޤ `qnorm` 르ꥺϳƳʻϥǡνŤդʿѤ׻ޤ ϳʻεΥ norm εտǽŤդޤ(ºݤˤϡ dx, dy ƥǡȳʻȤκʬǤȤȡŤߤ dx^norm + dy^norm Ϳޤ2 Τ٤ΥΥࡢä 4, 8, 16 ˴ؤƤϡ νŤߤη׻ϥ桼åɵΥȤȤ (dx^2+dy^2)^norm/2 Τ褦 ˺ŬƤޤǤդǤʤȤȤǽǤ) Υ Τ٤ͤ򤿤Ĥɲåѥ᡼ȤƻǤޤΥ르ꥺ बǥեȤˤʤäƤޤ ǸˡŤդʿѤη׻ѤˡĤʿ경Ťդؿ (kernel) ѰդƤޤ: z = Sum_i w(d_i) * z_i / Sum_i w(d_i), z_i i ܤΥǡͤǡd_i ϸߤγʻ i ܤΥǡΰ֤ εΥǤ٤ƤνŤդؿߤγʻ˶ᤤΥǡˤ 礭ʽŤߡΥǡˤϾŤߤդޤ ʲνŤդؿѤǤޤ: gauss : w(d) = exp(-d*d) cauchy : w(d) = 1/(1 + d*d) exp : w(d) = exp(-d) box : w(d) = 1 d<1 ξ = 0 ¾ hann : w(d) = 0.5*(1-cos(2*pi*d)) d<1 ξ w(d) = 0 ¾ 5 Ĥʿ경ŤդؿΤĤѤ硢2 ĤޤǤ åѥ᡼ dx dy ǤޤϡΥη׻˺ɸΰ 򥹥ѴΤ˻Ȥޤ: d_i = sqrt( ((x-x_i)/dx)**2 + ((y-y_i)/dy)**2 ), ǡx,y ϸߤ ʻκɸǡx_i,y_i i ܤΥǡκɸǤdy Υǥե ͤ dx ǡΥǥեȤͤ 1 ˤʤäƤޤѥ᡼ dx dy ϡǡʻء֥ǡ켫Ȥñ̤ǡפδͿԤϰϤ ǽˤޤ ץ󥭡 `kdensity2d` ϡŤդؿ̾θ (ץ ) ѴΥѥ᡼֤Τǡϥ르ꥺ ơʻѤ˷׻ͤŤߤ ( z = Sum_i w(d_i) * z_i ) Ǥ ʤ褦ˤޤz_i ٤ξ硢ϻ¾ 2 ѿν դɾ褷ޤ: ( 5 ĤΤΰĤ) Ťդؿƥǡ ֤졢νŤߤ¤٤Ƥγʻɾ졢ƸΥ ˤγ餫ʶ̤褵ޤϡ1 Υǡ Ф `smooth kdensity` ץ󤬹ԤȤȤޤˤƱ ( kdensity2d.dem 򻲾ȤƤ) ߴΤˡ鷺˰ۤʤ񼰤⥵ݡȤƤޤɤΥ ꥺŪ򤷤ʤä硢`qnorm` 르ꥺबꤵ졢 3 İʲΡ (,) ڤΥץѥ᡼ꤷϡ 򤽤줾Կ norm ͤǤȲᤷޤ ץ `dgrid3d` ϡߤǡŤդʿѤǵ§ŪʳʻҤ ֤ѤñʻȤߤ˲᤮ޤ󡣤Ф줿ˡ ¸ߤޤΤǡñˡԽʬǤС`gnuplot` γǤ 褦ˡǥǡ٤Ǥ礦 ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/dgrid3d.html"> dgrid3d.dem: dgrid3d Υǥ ^ </a> ^ <a href="http://www.gnuplot.info/demo/scatter.html"> scatter.dem: dgrid3d Υǥ ^ </a> 3 dummy ?commands set dummy ?commands show dummy ?set dummy ?show dummy ?dummy ޥ `set dummy` ϥǥեȤβѿ̾ѹޤ : set dummy {<dummy-var>} {,<dummy-var>} show dummy ǥեȤǤϡ`gnuplot` `plot` Ǥϡ޲ѿ⡼ɡ뤤϶˺ ɸ⡼ɤǤ "t", Ǥʤ "x" Ωѿ (ѿ) ȤƱͤ `splot` Ǥϡ޲ѿ⡼ɤǤ (`splot` ϶˺ɸ⡼ɤǤϻȤޤ) "u" "v", Ǥʤ "x" "y" ΩѿȤޤ ѿϡʪŪ˰̣Τ̾뤤Ϥ̾ȤƻȤ Ǥ礦㤨С֤δؿ褹: set dummy t plot sin(t), cos(t) ΥޥɤǤϡʤȤĤβѿꤵɬפޤ `set dummy` ȥ顼åɽޤ : set dummy u,v set dummy ,s ϡ2 ܤѿ s Ȥޤ 3 encoding ?commands set encoding ?commands show encoding ?set encoding ?show encoding ?encoding ?encodings =UTF-8 =SJIS ޥ `set encoding` ʸΥ󥳡 (encoding) 򤷤ޤ : set encoding {<value>} set encoding locale show encoding ͭ (value) ϰʲ̤Ǥ default - Ϸ˥ǥեȤΥ󥳡ɤλѤ̿ iso_8859_1 - ¿ Unix ơ MS-Windows ǻѲ ǽʺǤŪ衼åѥ󥳡ɡΥ󥳡 ɤ PostScript 'ISO-Latin1' ȤΤ ΤǤ iso_8859_15 - 桼ޤ iso_8859_1 ΰ iso_8859_2 - /衼åѤǻѤ륨󥳡 iso_8859_9 - (Latin5 ȤΤ) ȥ륳ǻѤ륨󥳡 koi8r - ɤȤ Unix Υʸ󥳡 koi8u - Unix Υ饤Υʸ󥳡 cp437 - MS-DOS Υɥڡ cp850 - 衼åѤ OS/2 Υɥڡ cp852 - /衼åѤ OS/2 Υɥڡ cp950 - MS Ǥ Big5 (emf terminal Τ) cp1250 - /衼åѤ MS Windows Υɥڡ cp1251 - ӥ֥륬ꥢޥɥ˥ (8 ӥå) cp1254 - ȥ륳 MS Windows Υɥڡ (Latin5 γĥ) sjis - Shift_JIS ܸ쥨󥳡 utf8 - ʸ Unicode ȥݥȤΡĹ (ޥ ) ɽ ޥ `set encoding locale` ϡ¾ΥץȤϰ㤤ϸ Υ¹ԻδĶꤷ褦ȤޤƤΥƥǤ ϴĶѿ LC_ALL, LC_CTYPE, LANG Τ줫ˤä椵ޤ λȤߤϡ㤨 wxt, cairopdf ϷǡUTF-8 EUC-JP Τ褦 ʥޥХʸ󥳡ɤ̤ɬפǤΥޥɤդ ʤɤΥͭɽˤϱƶͿޤ ʲ⻲: `set locale`, `set decimalsign` ̤ˡ󥳡ɤϽϷ˹Ԥʤɬפޤ Υ󥳡ɤϤɤʽϷǤ⥵ݡȤƤȤϸ¤餺ƽ Ϸ׵ᤵ줿ɤɸʸǤʤФޤ 3 fit ?commands set fit ?commands show fit ?set fit ?show fit `fit` ϡޥ `fit` νϤԤեޤ : set fit {logfile {"<filename>"}} {{no}errorvariables} {{no}quiet} unset fit show fit <filename> ϡñ䤫ŰǰϤɬפޤ ե̾ꤷʤä硢ޤ `unset fit` Ѥϡ եϥǥեȤͤǤ "fit.log"ޤϴĶѿ `FIT_LOG` ͤ˥ꥻåȤޤ Ϳ줿ե̾ / \ ǽäƤ硢ϥǥ쥯ȥ ̾Ȳᤵ졢եϤΥǥ쥯ȥ "fit.log" Ȥʤޤ ץ `errorvariables` ON ˤȡ`fit` ޥɤǷ׻ ƤϤѥ᡼θΥѥ᡼̾ "_err" ̾Υ桼ѿ˥ԡޤϼˡƤϤؿȥ 襰դξ˥ѥ᡼Ȥθ򻲾Ѥ˽ϤΤ˻Ȥ ޤ㤨: set fit errorvariables fit f(x) 'datafile' using 1:2 via a, b print "error of a is:", a_err set label 'a=%6.2f', a, '+/- %6.2f', a_err plot 'datafile' using 1:2, f(x) ǥեȤǤϡե˽񤭽Фϲ̤ˤɽޤ `set fit quiet` ȤФβɽϾäޤ 3 fontpath ?commands set fontpath ?commands show fontpath ?set fontpath ?show fontpath ?fontpath `fontpath` ϡեȥեɤ߹Υեθ ɲޤΤȤpostscript ϷΤߤ `fontpath` 򥵥ݡȤƤޤե뤬ߤΥǥ쥯ȥ˸Ĥʤä 硢`fontpath` Υǥ쥯ȥ꤬ޤݡȤƤե եη˴ؤܤ `terminal postscript` ʸˤޤ : set fontpath {"pathlist1" {"pathlist2"...}} show fontpath ѥ̾ñΥǥ쥯ȥ̾ޤʣΥѥ̾ΥꥹȤȤϤ ʣΥѥʤѥꥹȤ OS ͭΥѥڤꡢ㤨 Unix ϥ (':'), MS-DOS, Windows, OS/2 Ǥϥߥ (';') Ƕڤ ޤ`show fontpath`, `save`, `save set` ޥɤϡΤ OS ͭΥѥڤ򥹥ڡ (' ') ֤ޤǥ쥯ȥ̾ ᡼ޡ ('!') ǽäƤ硢Υǥ쥯ȥΥ ֥ǥ쥯ȥ⸡ޤ Ķѿ GNUPLOT_FONTPATH ꤵƤ硢Ƥ `fontpath` ɲäޤ줬ꤵƤʤ祷ƥ˰¸ǥե ȤͤѤޤǽ˥եȥѥȤäȤˡδĤΥ 쥯ȥ꤬¸ߤ뤫ƥȤ졢åȤޤäơֺǽ `set fontpath`, `show fontpath`, `save fontpath` 䡢ߥե Ѥ `plot`, `splot` ϡ֤ޤ򾯤 ǤûСĶѿ GNUPLOT_FONTPATH ꤷƤ Хǥ쥯ȥΥå OFF ˤʤޤǥեȤΥեȥ Ǥ뤫ϡ`show fontpath` Ǹ뤳ȤǤޤ `show fontpath` ϡ桼 fontpath ȥƥ fontpath ̡ ɽޤ`save`, `save set` ޥɤϡ桼 `fontpath` Τߤ¸ޤ gd 饤֥̤ƥե̾ǥեȤ˥ϥɥ饤Ф ؤƤϡեȸѥϴĶѿ GDFONTPATH 椵ޤ 3 format ?commands set format ?commands show format ?set format ?show format ?format ?format cb ɸιߤθФϡޥ `set format` ޤ `set tics format` ޤϸ̤˥ޥ `set {}tics format` ǽ񼰤Ǥޤ : set format {<axes>} {"<format-string>"} set format {<axes>} {'<format-string>'} show format ǡ<axes> () `x`, `y`, `xy`, `x2`, `y2`, `z`, `cb`ޤϲ ꤷʤ (ξ礽ν񼰤Ϥ٤ƤμŬѤޤ) Τ줫 Ǥʲ 2 ĤΥޥɤƱǤ: set format y "%.2f" set ytics format "%.2f" ʸĹ 100 ʸޤǡ¤ƤޤǥեȤν ʸ "% g" Ǥ"%.2f" "%3.0em" ʤɤν񼰤ޤ뤳Ȥ ¿Ǥ礦LaTeX ѤˤϤ褯 "$%g$" ޤޤʸ򲿤 Ϳʤϡformat ϥǥեȤޤʸ "" ꤷ 硢߼ȤɽޤФϤĤޤ󡣹߼Ȥäˤϡ `unset xtics` ޤ `set tics scale 0` ѤƤ ʸǤϡʸ (\n) ĥʸ (enhanced text) ѤΥ åפȤޤ ξϡñ (') Ǥʤ (") Ȥä ʲ⻲: `syntax` "%" ƬˤĤʤʸϤΤޤɽޤäơʸ ڡʸʤɤ뤳ȤǤޤ㤨 "%g m" ȤС ͤθ " m" ɽޤ"%" Ȥɽˤ "%g %%" 褦 2 ĽŤͤޤ ߤ˴ؤܤˤĤƤϡʲ⻲: `set xtics`ޤ ˡǽϤ˥ǥեȰʳξʬΥʸȤˤ Ƥϡʲ: `set decimalsign` ʲ⻲ȡ ^ <a href="http://www.gnuplot.info/demo/electron.html"> 쥯ȥ (Ż) ǥ (electron.dem). ^ </a> 4 gprintf ?gprintf ʸؿ gprintf("format",x) ϡgnuplot ޥɤ `set format`, `set timestamp` ʤɤƱͤΡgnuplot ȼν񼰻ҤȤޤ ν񼰻ҤϡɸŪ C δؿǤ sprintf() ΤΤƱ ǤϤޤgprintf() ϡϰĤĤޤ 󡣤Τˡgnuplot ˤ sprintf("format",x1,x2,...) ؿѰդ Ƥޤgnuplot ν񼰥ץΰˤĤƤϡʲ: `format specifiers` 4 񼰻 (format specifiers) ?commands set format specifiers ?set format specifiers ?format specifiers ?format_specifiers Ѳǽʽ (/ե⡼ɤǤʤ) ϰʲ̤Ǥ: @start table - first is interactive cleartext form %f 꾮ɽ %e, %E ؿɽ; ؿ "e", "E" Ĥ %g, %G %e (ޤ %E) %f ά %x, %X 16 ɽ %o, %O 8 ɽ %t 10 ʤβ %l ߤпܤȤ벾 %s ߤпܤȤ벾; ñ (scientific power) %T 10 ʤλؿ %L ߤпܤȤؿ %S ñ̤λؿ (scientific power) %c ñʸ %b ISO/IEC 80000 ˡ (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) β %B ISO/IEC 80000 ˡ (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) Ƭ %P Фܿ #\begin{tabular}{|cl|} \hline #\multicolumn{2}{|c|}{٥οͽ񼰻}\\ #\hline \hline # & \\ \hline #\verb@%f@ & 꾮ɽ \\ #\verb@%e@, \verb@%E@ & ؿɽ; ؿ "e", "E" Ĥ \\ #\verb@%g@, \verb@%G@ & \verb@%e@ (ޤ \verb@%E@) \verb@%f@ ά \\ #\verb@%x@, \verb@%X@ & 16 ɽ \\ #\verb@%o@, \verb@%O@ & 8 ɽ \\ #\verb@%t@ & 10 ʤβ \\ #\verb@%l@ & ߤпܤȤ벾 \\ #\verb@%s@ & ߤпܤȤ벾; ñ (scientific power) \\ #\verb@%T@ & 10 ʤλؿ \\ #\verb@%L@ & ߤпܤȤؿ \\ #\verb@%S@ & ñ̤λؿ (scientific power) \\ #\verb@%c@ & ñʸ \\ #\verb@%b@ & ISO/IEC 80000 ˡ (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) β\\ #\verb@%B@ & ISO/IEC 80000 ˡ (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) Ƭ\\ #\verb@%P@ & Фܿ \\ %c l . %@ %_ %%f@꾮ɽ %%e, %E@ؿɽ; ؿ "e", "E" Ĥ %%g, %G@%e (ޤ %E) %f ά %%x, %X@16 ɽ %%o, %O@8 ɽ %%t@10 ʤβ %%l@ߤпܤȤ벾 %%s@ߤпܤȤ벾; ñ (scientific power) %%T@10 ʤλؿ %%L@ߤпܤȤؿ %%S@ñ̤λؿ (scientific power) %%c@ñʸ %%b@ISO/IEC 80000 ˡ (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) β %%B@ISO/IEC 80000 ˡ (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) Ƭ %%P@Фܿ %_ @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th></th> <th></th></tr> ^</thead> ^<tbody> ^<tr> <td><tt>%f</tt></td> <td>꾮ɽ</td></tr> ^<tr> <td><tt>%e</tt>, <tt>%E</tt></td> <td>ؿɽ; ؿ "e", "E" Ĥ</td></tr> ^<tr> <td><tt>%g</tt>, <tt>%G</tt></td> <td><tt>%e</tt> (ޤ <tt>%E</tt>) <tt>%f</tt>ά</td></tr> ^<tr> <td><tt>%x</tt>, <tt>%X</tt></td> <td>16 ɽ</td></tr> ^<tr> <td><tt>%o</tt>, <tt>%O</tt></td> <td>8 ɽ</td></tr> ^<tr> <td><tt>%t</tt></td> <td>10 ʤβ</td></tr> ^<tr> <td><tt>%l</tt></td> <td>ߤпܤȤ벾</td></tr> ^<tr> <td><tt>%s</tt></td> <td>ߤпܤȤ벾; ñ (scientific power)</td></tr> ^<tr> <td><tt>%T</tt></td> <td>10 ʤλؿ</td></tr> ^<tr> <td><tt>%L</tt></td> <td>ߤпܤȤؿ</td></tr> ^<tr> <td><tt>%S</tt></td> <td>ñ̤λؿ (scientific power)</td></tr> ^<tr> <td><tt>%c</tt></td> <td>ñʸ</td></tr> ^<tr> <td><tt>%b</tt></td> <td>ISO/IEC 80000 ˡ (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) β</td></tr> ^<tr> <td><tt>%B</tt></td> <td>ISO/IEC 80000 ˡ (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) Ƭ</td></tr> ^<tr> <td><tt>%P</tt></td> <td>π ܿ</td></tr> ^</tbody> ^</table> ñ ('scientific' power) ϡؿ 3 ܿǤ褦ʤΤǤ ñ̻ؿ (`"%c"`) ʸؤѴ -18 +18 ޤǤλؿФ ݡȤƤޤϰϳλؿξ硢񼰤̾λؿ ޤ ۤ˻ȤȤΤǤ뽤 ("%" Ƚ񼰻Ҥδ֤˽񤯤) ˤϡ ΤĤޤ: "-" Ͽ򺸵ͤˤ"+" οˤ Ĥ" " () ο "-" Ĥ٤οξ˶ ĤĤ"#" Ͼʲο 0 ǤäƤ⾮Ĥ Ͻᡢľ "0" (ʸǤʤ) Ƭ ˶ʬ 0 ᡢθ 񤤤Τ٤̣ޤ (ξϺǾ塢ξϾ η) Ƥν򥵥ݡȤƤʤ OS ⤢Ǥ礦դˤ ʳΤΤ⥵ݡȤ OS ⤢Ǥ礦路ϡŬڤʻ Ĵ١Ƽ¸ƤߤƤ : set format y "%t"; set ytics (5,10) # "5.0" "1.0" set format y "%s"; set ytics (500,1000) # "500" "1.0" set format y "%+-12.3f"; set ytics(12345) # "+12345.000 " set format y "%.2t*10^%+03T"; set ytic(12345)# "1.23*10^+04" set format y "%s*10^{%S}"; set ytic(12345) # "12.345*10^{3}" set format y "%s %cg"; set ytic(12345) # "12.345 kg" set format y "%.0P pi"; set ytic(6.283185) # "2 pi" set format y "%.0f%%"; set ytic(50) # "50%" set log y 2; set format y '%l'; set ytics (1,2,3) #"1.0", "1.0", "1.5" ɽ (3 1.5 * 2^1 ʤΤ) ݤȻؿɬפȤʤ褦ʽ񼰤 9.999 ͤʿ񤫤 ꤬뤳Ȥޤ Υǡǡ (time/date) ξ硢ʸ 'strftime' ؿ ('gnuplot' "man strftime" ȤƤߤƤ) ˴ؤͭ ԤɬפޤȤϽ񼰻ΰ˴ؤƤϡʲ: `set timefmt` 4 ǡ (time/date specifiers) ?commands set format date_specifiers ?commands set format time_specifiers ?set format date_specifiers ?set format time_specifiers ?set date_specifiers ?set time_specifiers ?date_specifiers ?time_specifiers ǡ⡼ (time/date mode) Ǥϡν񼰤ѤǤޤ: @start table - first is interactive cleartext form %a ̾ξά (Sun,Mon,...) %A ̾ (Sunday,Monday,...) %b, %h ̾ξά (Jan,Feb,...) %B ̾ (January,February,...) %d (01--31) %D "%m/%d/%y" δά (ϤΤ) %F "%Y-%m-%d" δά (ϤΤ) %k (0--23; 1 ޤ 2 ) %H (00--23; 2 ) %l (1--12; 1 ޤ 2 ) %I (01--12; 2 ) %j ǯ̻ (1--366) %m (01--12) %M ʬ (0--60) %p "am" ޤ "pm" %r "%I:%M:%S %p" δά (ϤΤ) %R "%H:%M" δά (ϤΤ) %S (ϤǤ 0--60 ϤǤϼ¿) %s 2000 ǯǽ餫ÿ %T "%H:%M:%S" δά (ϤΤ) %U ǯ̻ (ȿ) %w ֹ (0--6, = 0) %W ǯ̻ (Ϸȿ) %y (2000-2068 ǯ 0-681969-1999 ǯ 69-99) %Y (4 ) #\begin{tabular}{|cl|} \hline #\multicolumn{2}{|c|}{٥񼰻}\\ #\hline \hline # & \\ \hline #\verb@%a@ & ̾ξά (Sun,Mon,...) \\ #\verb@%A@ & ̾ (Sunday,Monday,...) \\ #\verb@%b@, \verb@%h@ & ̾ξά (Jan,Feb,...) \\ #\verb@%B@ & ̾ (January,February,...) \\ #\verb@%d@ & (01--31) \\ #\verb@%D@ & \verb@"%m/%d/%y"@ δά (ϤΤ)\\ #\verb@%F@ & \verb@"%Y-%m-%d"@ δά (ϤΤ)\\ #\verb@%k@ & (0--23; 1 ޤ 2 ) \\ #\verb@%H@ & (00--23; 2 ) \\ #\verb@%l@ & (1--12; 1 ޤ 2 ) \\ #\verb@%I@ & (01--12; 2 ) \\ #\verb@%j@ & ǯ̻ (1--366) \\ #\verb@%m@ & (01--12) \\ #\verb@%M@ & ʬ (0--60) \\ #\verb@%p@ & "am" ޤ "pm" \\ #\verb@%r@ & \verb@"%I:%M:%S %p"@ δά (ϤΤ)\\ #\verb@%R@ & \verb@"%H:%M"@ δά (ϤΤ)\\ #\verb@%S@ & (ϤǤ 0--60 ϤǤϼ¿)\\ #\verb@%s@ & 2000 ǯǽ餫ÿ \\ #\verb@%T@ & \verb@"%H:%M:%S"@ δά (ϤΤ)\\ #\verb@%U@ & ǯ̻ (ȿ) \\ #\verb@%w@ & ֹ (0--6, = 0) \\ #\verb@%W@ & ǯ̻ (Ϸȿ) \\ #\verb@%y@ & (0-991969-2068 ǯβ 2 ) \\ #\verb@%Y@ & (4 ) \\ %c l . %@ %_ %%a@̾ξά (Sun,Mon,...) %%A@̾ (Sunday,Monday,...) %%b, %h@̾ξά (Jan,Feb,...) %%B@̾ (January,February,...) %%d@ (01--31) %%D@"%m/%d/%y" δά (ϤΤ) %%F@"%Y-%m-%d" δά (ϤΤ) %%k@ (0--23; 1 ޤ 2 ) %%H@ (00--23; 2 ) %%l@ (1--12; 1 ޤ 2 ) %%I@ (01--12; 2 ) %%j@ǯ̻ (1--366) %%m@ (01--12) %%M@ʬ (0--60) %%p@"am" ޤ "pm" %%r@"%I:%M:%S %p" δά (ϤΤ) %%R@"%H:%M" δά (ϤΤ) %%S@ (ϤǤ 0--60 ϤǤϼ¿) %%s@2000 ǯǽ餫ÿ %%T@"%H:%M:%S" δά (ϤΤ) %%U@ǯ̻ (ȿ) %%w@ֹ (0--6, = 0) %%W@ǯ̻ (Ϸȿ) %%y@ (0-991969-2068 ǯβ 2 ) %%Y@ (4 ) %_ @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th></th> <th></th></tr> ^</thead> ^<tbody> ^<tr> <td><tt>%a</tt></td> <td>̾ξά (Sun,Mon,...)</td></tr> ^<tr> <td><tt>%A</tt></td> <td>̾ (Sunday,Monday,...)</td></tr> ^<tr> <td><tt>%b</tt>, <tt>%h</tt></td> <td>̾ξά (Jan,Feb,...)</td></tr> ^<tr> <td><tt>%B</tt></td> <td>̾ (January,February,...)</td></tr> ^<tr> <td><tt>%d</tt></td> <td> (01–31)</td></tr> ^<tr> <td><tt>%D</tt></td> <td><tt>%m/%d/%y</tt> δά (ϤΤ)</td></tr> ^<tr> <td><tt>%F</tt></td> <td><tt>%Y-%m-%d</tt> δά (ϤΤ)</td></tr> ^<tr> <td><tt>%k</tt></td> <td> (0–23; 1 ޤ 2 )</td></tr> ^<tr> <td><tt>%H</tt></td> <td> (00–23; 2 )</td></tr> ^<tr> <td><tt>%l</tt></td> <td> (1–12; 1 ޤ 2 )</td></tr> ^<tr> <td><tt>%I</tt></td> <td> (01–12; 2 )</td></tr> ^<tr> <td><tt>%j</tt></td> <td>ǯ̻ (1–366)</td></tr> ^<tr> <td><tt>%m</tt></td> <td> (01–12)</td></tr> ^<tr> <td><tt>%M</tt></td> <td>ʬ (0–60)</td></tr> ^<tr> <td><tt>%p</tt></td> <td>"am" ޤ "pm"</td></tr> ^<tr> <td><tt>%r</tt></td> <td><tt>%I:%M:%S %p</tt> δά (ϤΤ)</td></tr> ^<tr> <td><tt>%R</tt></td> <td><tt>%H:%M</tt> δά (ϤΤ)</td></tr> ^<tr> <td><tt>%S</tt></td> <td> (ϤǤ 0–60 ϤǤϼ¿)</td></tr> ^<tr> <td><tt>%s</tt></td> <td>2000 ǯǽ餫ÿ</td></tr> ^<tr> <td><tt>%T</tt></td> <td><tt>%H:%M:%S</tt> δά (ϤΤ)</td></tr> ^<tr> <td><tt>%U</tt></td> <td>ǯ̻ (ȿ)</td></tr> ^<tr> <td><tt>%w</tt></td> <td>ֹ (0–6, = 0)</td></tr> ^<tr> <td><tt>%W</tt></td> <td>ǯ̻ (Ϸȿ)</td></tr> ^<tr> <td><tt>%y</tt></td> <td> (0-991969-2068 ǯβ 2 )</td></tr> ^<tr> <td><tt>%Y</tt></td> <td> (4 )</td></tr> ^</tbody> ^</table> ɽ񼰤Ǥϡλ (% θҤ) "0" ("" Ǥʤ "") Ĥ뤳ȤǡƬ˶򤬤Ǥ˶ 0 뤳ȤǤޤǾνǻꤹ뤳 ȤǤޤ (ϤɽΤ˻ꤷ­ʤ̵ 뤵ޤ) %S ϼ¿ĤޤΤǡä񤱤ޤ ɽʸĹ 24 ʸޤǡȤ¤ꡢĹʬڤ ΤƤޤ : Υǡ "76/12/25 23:11:11" ξ set format x # ǥեȤǤ "12/25/76" \n "23:11" set format x "%A, %d %b %Y" # "Saturday, 25 Dec 1976" set format x "%r %D" # "11:11:11 pm 12/25/76" Υǡ "98/07/06 05:04:03.123456" ξ set format x "%1y/%2m/%3d %01H:%02M:%06.3S" # "98/ 7/ 6 5:04:03.123" 3 function style ?set function style ΥޥɤηϸߤϿ侩Ƥޤ󡣰ʲ: `set style function` 3 functions ?commands show functions ?show functions `show functions` ޥɤϥ桼ؿȤƤɽ ޤ : show functions gnuplot ˤؿȤλȤˤĤƤϡʲ: `expressions` ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/spline.html"> 桼ؿǤΥץ饤 (spline.dem) ^ </a> ^ <a href="http://www.gnuplot.info/demo/airfoil.html"> ؿʣѿ˻ (airfoil.dem) ^ </a> 3 grid ?commands set grid ?commands unset grid ?commands show grid ?set grid ?unset grid ?show grid ?grid ?nogrid ޥ `set grid` ϳʻޤ : set grid {{no}{m}xtics} {{no}{m}ytics} {{no}{m}ztics} {{no}{m}x2tics} {{no}{m}y2tics} {{no}{m}cbtics} {polar {<angle>}} {layerdefault | front | back} { {linestyle <major_linestyle>} | {linetype | lt <major_linetype>} {linewidth | lw <major_linewidth>} { , {linestyle | ls <minor_linestyle>} | {linetype | lt <minor_linetype>} {linewidth | lw <minor_linewidth>} } } unset grid show grid ʻǤդμǤդμ/Фͭ/̵ˤǤμ ФǤߤν֤ݡȤ ϰϤǡ餫饤󥹥Ѥ뤳ȤǤޤ ˡ2 Ǥ϶˺ɸʻҤȤȤǤޤǽʶ Фơ򤵤줿̤Ʊߤ濴; (ζ֤ `set angles` ˤä١ޤϥ饸ǻ ޤ)˺ɸʻҤϸߤ϶˺ɸ⡼ɤǤϼưŪˤʤ դƤ `set grid` ˡɬפͭˤʤäƤʤФʤޤ `gnuplot` ϡ¸ߤʤФʻҤ̿ñ̵뤷ޤ Ǥ꤬ͭˤʤФФʻҤޤ ʻФ򲿤ꤷʤСʻƱ郎Ȥ ǥեȤζ˺ɸγ٤ 30 ٤Ǥ `front` ꤹȡʻϥդΥǡξޤ`back` ꤵ줿ϳʻϥդΥǡβޤ`front` С̩ǡdzʻʤʤ뤳ȤɤȤǤޤ եȤǤ `layerdefault` ǡ 2D Ǥ `back` ƱǤ 3D ΥǥեȤϡʻҤȥդȤ 2 Ĥñ̤ʬΥʻ ϸˡȤǡޤϴؿ˽񤭤ޤ`hidden3d` ⡼ɤǤϡ줬켫Ȥ¤Ӵ򤷤ƤޤΤǡʻν֤Υ ץ̵뤵졢ʻⱣˤޤΥץ ϡºݤˤϳʻǤʤ`set border` ˤ붭Ȥ ι (ʲ: `set xtics`) ˤƶڤܤޤ z γʻ̤ޤμʬŪȢ ƤˤϤǤ礦ʲ: `set border` 3 hidden3d ?commands set hidden3d ?commands unset hidden3d ?commands show hidden3d ?set hidden3d ?unset hidden3d ?show hidden3d ?hidden3d ?nohidden3d `set hidden3d` ޥɤ϶ (ʲ: `splot`) DZԤ 褦˻ؼޤν르ꥺ˴ؤɲõǽ⤳Υ ޥɤǤޤ : set hidden3d {defaults} | { {front|back} {{offset <offset>} | {nooffset}} {trianglepattern <bitpattern>} {{undefined <level>} | {noundefined}} {{no}altdiagonal} {{no}bentover} } unset hidden3d show hidden3d gnuplot ̾ɽȤϰۤʤꡢǤͿ줿ؿޤϥǡ γʻ򡢼ºݤζ̤ζ̤ظˤäƱƤǤ ʤΤƱ褦˽ޤ줬ǽ뤿ˤϡζ̤ 'ʻҾ' (ʲ: `splot datafile`) Ǥɬפꡢޤ `with lines` `with linespoints` ƤʤФޤ `hidden3d` ͭʤȤϡʻǤʤʬξ (ʲ: `set contour`) Ᵽޤʣ̤褷Ƥϡ ƶ̤ϼʬȤ¾ζ̤DZʬޤ̾ؤ ɽ (`set contour surface`) ϵǽޤ ФϾɽ졢ƶޤ󡣥դ (key) ̤˱뤳ȤϤޤgnuplot С 4.6 Ǥϡվ ̤Ĥʤ֤Ǥ⡢hidden3d `points`, `labels`, `vectors`, `impulses` 3 襹˱ƶͿޤγơ 򤳤νŪ˽Ȥϡ`with` ̤Υץ `nohidden3d` ɲäƤ hidden3d ϡpm3d ⡼ɤ褵줿ɤ٤줿̤ˤϱƶͿ pm3d ζ̤ФƱͤθ̤ʤС `set pm3d depthorder` ȤäƤʣ pm3d ̤̾ `hidden3d` Ȥ߹碌ˤϡhidden3d ƤǤŪ Ĥ¾Ǥθ褹뤿Υץ `set hidden3d front` Ѥƶ̤ 2 褷Ƥǽ `with lines lt -2` ǡ2 ܤ `with pm3d` 褷ޤǽǤϡ η׻ԤäƤ֤ϱζ̤ޤޤƤΤǤºݤˤϤ ̼Τ褵ޤ ؿͤϳʻҸΩθɾޤ뤳Ȥνʬ ϸġδؿ͡뤤ϥǡδ֤ϤΥ르ꥺˤä ֤ޤϡ`hidden3d` 褹 `nohidden3d` 褹 Ǵؿθۤʤ뤳Ȥ̣ޤʤʤСԤξ ͤϳɸɾ뤫Ǥΰ㤤˴ؤˤĤƤϡ ʲ: `set samples`, `set isosamples` ̤αʬõΤ˻Ȥ륢르ꥺϡΥޥɤ 椵뤤ĤɲåץäƤޤ`defaults` ꤹ ФϤ٤ơʲǽҤ٤褦ʥǥեȤͤꤵޤ `defaults` ꤵʤäˤϡŪ˻ꤵ줿ץ ߤƶʳΤΤϰͤѤޤäơ Υץͤ򤤤뤳Ȥʤñ `set {no}hidden3d` ΤߤDZ򥪥/դǤ뤳Ȥˤʤޤ ǽΥץ `offset` '΢¦' 褹˱ƶͿ ޤ̾϶̤ɽ΢̤뤿ˡ΢¦ϡɽ¦ 礭ֹ郎Ȥޤ`offset <offset>` ˤäơɲä ͤ򡢥ǥեȤ 1 ȤϰۤʤʬͤѹǤޤ`nooffset` `offset 0` ̣ɽ΢ƱȤȤˤʤޤ Υץ `trianglepattern <bitpattern>` Ǥ<bitpattern> 0 7 ޤǤοǡӥåȥѥȲᤵޤƶ̤ϻѷ ʬ䤵ޤΥӥåȥѥγƥӥåȤϤλѷγդɽ ꤷޤӥå 0 ϳʻҤοʿաӥå 1 ϳʻҤοľաӥ 2 ϡγʻҤ 2 Ĥλѷʬ䤵ȤгդǤǥե ȤΥӥåȥѥ 3 ǡƤοʿդȿľդɽг դɽʤȤ̣ޤгդɽ 7 ꤷޤ ץ `undefined <level>` ϡƤʤ (礱Ƥǡ ޤ̤δؿ) ޤͿ줿 x,y,z ϰϤĶƤ ŬѤ륢르ꥺؼޤΤ褦ϡǤ ɽƤޤޤϥǡޤ ޤܤƤζǤƱͤ˼졢äƶ̤˷꤬ ޤ<level> = 3 ξ硢 `noundefined` Ʊǡɤ ΤƤޤ󡣤¾ξǤΤ Ȥʤ٤Ǥ<level> = 2 Ǥ̤ϼΤƤޤϰϤĶ ϼΤƤޤ<level> = 1 Ǥϡ줬ǥեȤǤϰ ĶΤƤޤ `noaltdiagonal` ꤹȡ`undefined` ͭΤȤ (ʤ <level> 3 Ǥʤ) ˵ʲξΥǥեȤǤμ谷ѹǤ ϶̤γƳʻҾʬϰгˤä 2 Ĥλѷʬ ޤ̾ϤгƤʻҤФƱƤ ⤷ʻҤ 4 ĤγѤΤĤ `undefined` ˤȤ ƤơγѤ̾г˾äƤϡξλ ѷƤޤޤ⤷ǥեȤǤ `altdiagonal` ͭˤʤäƤ硢γʻҤˤĤƤ¾г 򤵤졢̤η礭Ǿˤʤ褦ˤޤ `bentover` ץϺ٤ `trianglepattern` ȤȤ˵̤Τ 椷ޤʤꤷ勞ζ̤Ǥϡ ASCII ʸ˽񤤤 ˡ̤ 1 ĤγʻҤ 2 Ĥʬ줿ѷɽ΢ȿ¦ Ƥޤ (ʤλͳѷޤʤƤ ('bent over') ) ޤ: C----B 4 ѷ: A--B ɽ 4 ѷ: |\ | ("set view 0,0") | /| ("set view 75,75" perhaps) | \ | |/ | | \ | C--D | \| A D ̤γʻҤгդ <bitpattern> 2 bit ˤäƸ褦ˤϤʤ ƤϤʤ硢г CB Ϥɤˤ񤫤ʤȤˤʤꡢ줬 ̤ɽ򤷤ˤΤˤޤǥեȤ `bentover` ץϡΤ褦ʾ礽ɽ褦ˤޤ⤷ ʤʤ顢`nobentover` 򤷤Ƥ ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/hidden.html"> Υǥ (hidden.dem) ^ </a> ^ <a href="http://www.gnuplot.info/demo/singulr.html"> ʣʱΥǥ (singulr.dem). ^ </a> 3 historysize ?commands set historysize ?set historysize ?unset historysize ?historysize ?nohistorysize : ޥ `set historysize` ϡgnuplot GNU readline 饤֥ Ȥ褦 configure 줿ΤͭǤ : set historysize <int> unset historysize historysize ͤϡgnuplot νλ history ιԤ⡹ιԿޤ ڤΤƤ뤿˻ȤޤǥեȤ 500 Ǥ `unset historysize` history ڼΤƤ̵ˤޤΤǡhistory ˽񤭽ФԿ¤򤷤ޤ 3 isosamples ?commands set isosamples ?commands show isosamples ?set isosamples ?show isosamples ?isosamples ؿ̤Ȥ褹θΩ (ʻ) ̩٤ϥޥ `set isosamples` ѹǤޤ : set isosamples <iso_1> {,<iso_2>} show isosamples ƶ̥դ <iso_1> Ĥ u-Ω <iso_2> Ĥ v-Ωޤ <iso_1> Τ߻ꤹС<iso_2> <iso_1> Ʊͤꤵޤ ǥեȤǤϡu, v 줾 10 ܤɸܲԤޤɸܿä ¿ФΤʥդޤ֤ޤ ѥ᡼ϡǡեˤϲƶͿޤ ΩȤϡ̤ΰĤ޲ѿꤷơ⤦Ĥ޲ѿˤä ΤȤǤΩϡ̤ɽñˡͿޤ s(u,v) ޲ѿ u ꤹ뤳Ȥ u-Ω c(v) = s(u0,v) 졢޲ѿ v ꤹ뤳Ȥ v-Ω c(u) = s(u,v0) Ǥޤ ؿζ̥դʤƤ硢`set samples` ƸΩɸܲο椷ޤʲ: `set samples`, `set hidden3d`롼ϡؿɸܲϳƸΩθ ǹԤȲꤷƤΤǡؿζ̤β٤ѹȤ ϡ`isosamples` Ʊ褦 `samples` ѹΤ˾ޤǤ礦 3 key ?commands set key ?commands unset key ?commands show key ?set key ?unset key ?show key ?key ?nokey ?legend ޥ `set key` 褵줿ɽɽ뤳Ȥǽ ޤ (key) ơʤ褵ġΥǡؿˤĤ̾ Ӥ饰դζȥվɽ椫ʤ륵ץϡ `plot` (ޤ `splot`) ޥɤ `title`, `with` ץˤ ꤵޤܤˤĤƤϡʲ: `plot title`, `plot with` : set key {on|off} {default} {{inside | outside} | {lmargin | rmargin | tmargin | bmargin} | {at <position>}} {left | right | center} {top | bottom | center} {vertical | horizontal} {Left | Right} {{no}opaque} {{no}reverse} {{no}invert} {samplen <sample_length>} {spacing <vertical_spacing>} {width <width_increment>} {height <height_increment>} {{no}autotitles {columnheader}} {title "<text>"} {{no}enhanced} {font "<face>,<size>"} {textcolor <colorspec>} {{no}box { {linestyle | ls <line_style>} | {linetype | lt <line_type>} {linewidth | lw <line_width>}}} {maxcols {<max no. of columns> | auto}} {maxrows {<max no. of rows> | auto}} unset key show key () ϡγФ륿ȥȥץ (; Ȣ) ޤεǽϡ`set key off` ޤ `unset key` ̵ˤǤޤġΥΥȥϡб plot ޥ˥  `notitle` ȤȤ̵ˤǤޤ γǤ `vertical` () ޤ `horizontal` () ˽äƽŤ ޤ`vertical` ξ硢key ϲǽʤ 2,3 ĤνĤȤޤ ʤǤϿľڡʤʤޤǤ 1 Ĥ󤵤ޤ 鿷󤬳Ϥޤľڡϡ`maxrows` Ȥä ¤Ǥޤ`horizontal` ξϡkey ϲιԤǤʤ ȤޤʿΥڡ `maxcols` ˤ¤Ǥޤ ǥեȤǤϡkey ϥΰ¦αγѤ֤ޤ `left`, `right`, `top`, `bottom`, `center`, `inside`, `outside`, `lmargin`, `rmargin`, `tmargin`, `bmargin` (, `above`, `over`, `below`, `under`) ϡΰ¾ξؤμưŪ֤Τ˻Ѥޤ key ɤ֤ܤؼ뤿 `at <position>` ޤξ硢 `left`, `right`, `top`, `bottom`, `center` Ʊͤδ碌ŪǻȤޤ ܤϡʲ: `key placement` դΥȥι· `Left`, `Right` (ǥե) ǻؼ ޤ٥ʸȶΥץϺؤ뤳ȤǤޤ (`reverse`) ΤȤǰϤळȤǤޤ (`box {...}`)Ȥ ϡ (`linetype`), (`linewidth`)뤤ѤΥ饤 (`linestyle`) ꤹ뤳ȤǤޤ ǥեȤǤϡkey ϰĤΥդƱ˺ޤʤkey ȥȥϡб륰դƱޤϡ դˤ key ξǤ򤫤֤֤뤳Ȥ̣ޤ `set key opaque` ϡkey 򤹤٤ƤΥդ褬ä ξ硢key ΰطʿɤĤ֤ key εȥȥ ޤäơkey ȤϤĤǤʤƤޤ 뤳Ȥˤʤޤ`set key noopaque` ǥǥեȤǤޤ ǥեȤǤϡǽΥ٥뤬ΰ־˸졢³ ٥뤬β¤ǹԤޤץ `invert` ϡǽΥ٥ ΰֲ֤³٥򤽤ξ¤٤ƹԤޤΥץ ϡΥ٥νĤ¤Ӥν֤Ѥ߾夲Υҥȥ (`histograms`) Ȣν֤˹碌ȤǤ礦 <height_increment> ϡȢι⤵˲ä긺餷ꤹ⤵ ( ʸʬ) ɽͤǤϼˡβȢǡ ¤Ӥβζ礭ΤΤǤ `plot` `splot` 褵ƤζϡǥեȤΥץ `autotitles` ˽äɽ (title) Ĥޤɽμưϡ `noautotaitle` Ǥޤξ硢`(s)plot ... title ...` Ū˻ꤵ줿ɽΤߤ뤳Ȥˤʤޤ =columnheader ޥ `set key autotitle columnheader` ϡϥǡƬԤγ ΥȥƥʸȲᤷб襰դΥȥȤ ƻѤޤ褵̤ʣǡδؿǤϡ gnuplot Ϥɤ򥿥ȥ˻ȤФΤ狼ޤΤǡ 褦ʾ硢plot ޥɾǡ㤨аʲΤ褦Ū˥ȥ ꤹɬפޤ plot "datafile" using (($2+$3)/$4) title columnhead(3) with lines ΤϤɽξˤĤ뤳ȤǤޤ (`title "<text>"`)ñ (') Ű (") ΰ㤤ˤĤƤϡʲ⻲: `syntax` ɽι·ϡդɽι·ƱΤȤޤ `set key` ΥǥեȤϡ`on`, `right`, `top`, `vertical`, `Right`, `noreverse`, `noinvert`, `samplen 4`, `spacing 1.25`, `title ""`, `nobox` ǤȤϥǥեȤǤϥγȤƱ Ȥޤ`set key default` ȤȥǥեȤޤ ϡ1 Ԥ 1 ʬĤοԤΤޤȤޤȤƽ񤫤ޤƹԤα ¦ˤ (`reverse` ȤäƤк¦ˤ) ζƱľΥ ץ뤬졢¾¦ˤ `plot` ޥɤʸ (title) ֤ޤιԤϡͶľκ¦ȱ¦ʬ뤫Τ ˿ľ󤵤ޤޥ `set key` ǻꤹɸϤβͶ ʬξüκɸǤ`plot` Ǥľΰ֤ꤹ뤿 x y Ȥ졢`splot` Ǥϡx, y, z ƤȤդ 2 ƤΤƱˡȤäơͶľ 2 ̤Ǥΰ֤ ޤ TeX 䡢ʸޤϤȤϡ`gnuplot` ΰֹ碌Τʸɾ뤳ȤǤޤ󡣤 ä򺸤֤ `set key left Left reverse` Ȥȹ礻 ΤǤ礦 `splot` 񤯾硢ˤΥ٥ɽޤ Υ٥¤Ӷ礬ޤʤޤ̤ʰ֤˾ ֤ϤΥ٥ν񼰤Ǥޤܺ٤ϡʲ: `set clabel` : ʲϥǥեȤΰ֤ɽޤ: set key default ʲɽʤޤ: unset key ʲϥǥեȤ () ɸϤǤ (2,3.5,2) ΰ֤ɽ ޤ: set key at 2,3.5,2 ʲ򥰥դβɽޤ: set key below ʲ򺸲ѤɽƥȤϺ˹·ǡȥĤ 3 γȤ񤭤ޤ: set key left bottom Left title 'Legend' box 3 4 (key placement) ?commands set key placement ?set key placement ?key placement ֤λȤߤ򤿤κǤפʳǰϡΰ衢ʤ⤫ ȤȤȡΰζȤδ֤; (margin) ͤ뤳ȤǤ ΰ˱äơ `left/center/right` (l/c/r) `top/center/bottom` (t/c/b) ϡkey 򤽤ΰ¦Τɤ֤ 椷ޤ ⡼ `inside` Ǥϡkey ϥ `left` (l), `right` (r), `top` (t), `bottom` (b), `center` (c) ˤäưʲοޤΤ褦ΰζ ˸äƽϤޤ: t/l t/c t/r c/l c c/r b/l b/c b/r ⡼ `outside` ǤƱͤ˼ưŪ֤ޤΰζ ФơȤषܤФơȤ٤Ǥ礦 դζϡΰγ key ξ뤿ˡ¦ ư뤳Ȥˤʤޤ¾Υ٥μ򤷤ޤ⤷ ϥǥХˤäƤϥ顼⤷ޤkey Ϥ˹碌Ƥɤ趭ư뤫ϡ˽Ҥ٤ key ΰ֡ ӽŤ;夲˰¸ޤ4 濴·Υץ (`center`) ˴ؤƤϡɤζưΤ˴ؤ뤢ޤϤޤ󤬡Ѥؤ ϤΥץˤĤƤϡŤ;夲 `vertical` ξϺޤ ζ`horizontal` ξϾޤϲζ줾¦Ŭ ڤ˰ưޤ ; (margin) νϡŤ;夲ˤʤưŪ֤ǽ ˤƤޤ`lmargin` (lm), `rmargin` (rm), `tmargin` (tm), `bmargin` (bm) ΤΰĤ̷⤷ʤ 1 ΥɤȤ߹ ƻѤ硢ʲοޤ˼ key ֤ޤ: l/tm c/tm r/tm t/lm t/rm c/lm c/rm b/lm b/rm l/bm c/bm r/bm  `above` `over` `tmargin` Ʊ̣ǤΥС ȤθߴΤˡ`above` `over` l/c/r Ť;夲Υ ɤʤǻѤȡ`center` `horizontal` Ȥޤ `below` `under` `bmargin` Ʊ̣ǤߴΤˡ `below` `under` l/c/r Ť;夲ΥɤʤǻѤ `center` `horizontal` Ȥޤˡ`outside` ߴΤ t/b/c Ť;夲ΥɤʤС`top`, `right`, `vertical` (Ĥޤ t/rm Ʊ) Ѥޤ ΰ (<position>) ϡΥСƱñ x,y,z ꤷ Ƥ⤤ǤκǽΥץԤκɸκɽϤ򤹤뤿 5 ĤΥ (`first`, `second`, `graph`, `screen`, `character`) ƬˤĤ뤳ȤǤޤܺ٤ϡʲ: `coordinates`<position> Ϳ줿 `left`, `right`, `top`, `bottom`, `center` θ̤ϡ label ޥɤ֤ʸξƱ褦˴֤ΰֹ碌 ˻Ѥޤʤ`left` key <position> α֤ƺ 碌ǽϤޤ¾ξƱͤǤ 4 (key samples) ?commands set key samples ?set key samples ?key samples ǥեȤǤϡվγϥˤ줾б륨ȥ ޤΥȥˤϡ西ȥȡǻȤΤƱ ƱɤĤ֤°ˤ//Ȣ Υץ뤬ޤfont textcolor °ϡ˸ġ西ȥθܤ椷 textcolor "variable" ˥åȤȡγƥȥʸϡ 襰դɤĤ֤ƱˤʤޤϡΤ gnuplot ΥǥեȤεưǤ նΥץʬĹ `samplen` ǻǤޤĹ Ĺȡ<sample_length>*(ʸ) ¤ȤƷ׻ޤ `sapmlen` ϡվΥץΰ֤ˤ (⤷ץʬȤ 񤫤ʤƤ) ƶͿƤޤϡεϥץʬ ˽񤫤뤿Ǥ Դ֤οľڡϡ`spacing` ǻǤޤϡΥ (pointsize) ȿľΥ <vertical_spacing> Ѥˤʤޤ οľڡϡʸι⤵⾮ϤʤʤȤݾڤƤ ޤ <width_increment> ϡʸĹ˲ä긺餷ꤹ (ʸʬ ) ɽͤǤϡ˳Ȥ񤭡ʸʸȤ ˤͭѤǤ礦`gnuplot` ϳȤ׻Ȥϡ٥ʸ ʸñ˿ʤΤǡΤ˻Ȥޤ 3 ٥ (label) ?commands set label ?commands unset label ?commands show label ?set label ?unset label ?show label ?label ?nolabel `set label` ޥɤȤȤˤäǤդθФ (label) 򥰥 ɽ뤳ȤǤޤ : set label {<tag>} {"<label text>"} {at <position>} {left | center | right} {norotate | rotate {by <degrees>}} {font "<name>{,<size>}"} {noenhanced} {front | back} {textcolor <colorspec>} {point <pointstyle> | nopoint} {offset <offset>} unset label {<tag>} show label (<position>) x,y x,y,z Τɤ餫ǻꤷɸϤ򤹤 ˤϤκɸ `first`, `second`, `graph`, `screen`, `character` Ĥޤܺ٤ϡʲ: `coordinates` (<tag>) ϸФ̤뤿ͤǤꤷʤä ̤ѤΤΤǺǤ⾮ͤưŪ˳ƤޤߤθФ ѹȤϤΥѹܤꤷ `set label` ޥ ɤȤޤ <label text> ʸǤ⹽ޤ󤷡ʸѿޤʸ ͤļǤ⹽ޤ󡣰ʲ: `strings`, `sprintf`, `gprintf` ǥեȤǤϡꤷ x,y,z ˸ФʸϤκü褦 ޤx,y,z 򸫽ФΤɤ·뤫ѹˤѿ <justification> ꤷޤˤϡ`left`, `right`, `center` 줫Ǥ줾ʸϤκ椬ꤷ褦 ֤褦ˤʤޤϰϤγˤϤ߽Ф褦ʻ ɸθФ¾ʸȽŤʤ礬ޤ `rotate` ꤹȥ٥ϽĽ񤭤ˤʤޤ (ϥɥ饤Ф бƤСǤ)`rotate by <degrees>` Ϳ줿ϡ Ŭ礷Ƥϥɥ饤Фϻꤵ줿٤ʸ񤳤Ȥޤ ǤʤϷǤϡľʸȤưޤ եȤȤΥϡϷեȤ򥵥ݡȤƤ `font "<name>{,<size>}"` ŪǤޤǤʤϷ ϡǥեȤΥեȤȤޤ ̾ϡߤνϷݡȤƤС٥ʸƤʸ ˳ĥʸ⡼ (enhanced text mode) Ѥޤ `noenhanced` Ѥ뤳ȤǡΥ٥ĥʸ鳰 ȤǤޤϡ٥뤬㤨Х (_) ޤǤ ʤɤͭѤǤʲ: `enhanced text` `front` ͿȡФϥǡΥդξ˽񤫤ޤ`back` Ϳ (ǥե)Фϥդβ˽񤫤ޤ`front` ȤȤǡ̩ʥǡˤäƸФƤޤȤ򤱤뤳 ޤ `textcolor <colorspec>` ϸФʸοѹޤ<colorspec> rgb ޤϥѥåȤؤγΤ줫Ǥޤ ʲ: `colorspec`, `palette``textcolor` ϡ`tc` ȾάǽǤ `tc default` ϡʸǥեȤˤޤ `tc lt <n>` ϡʸ <n> (line type)ƱΤˤޤ `tc ls <n>` ϡʸ line style <n> ƱΤˤޤ `tc palette z` ϡФ z ΰ֤бѥåȿˤʤޤ `tc palette cb <val>` ϡ (colorbar) <val> οˤʤޤ `tc palette fraction <val>` (0<=val<=1) ϡ[0:1] `palette` Ĵ/顼ؤμбˤʤޤ `tc rgb "#RRGGBB"` ϡǤդ 24-bit RGB 򤷤ޤ <pointstyle>  `lt`, `pt`, `ps` ȤȤͿ (ʲ : `style`)Ϳ줿ȡͿ줿οǸФ֤ (point) 褵졢ФʸϾưޤΥץ `mouse` ĥ줿ϷǤΥ٥֤ˡǥեȤǻѤ ƤޤФʸ᤯赡ǽ off (줬ǥե) ˤ ˤϡ`nopoint` ѤƤ ΰưϡǥեȤǤϡ<pointstyle> Ϳ `pointsize` ñ̤ 1,1 ǡ<pointstyle> ͿƤʤ 0,0 Ǥưϡ ɲä `offset <offset>` ǤǤޤǡ<offset> x,y ޤ x,y,z ηǤ˺ɸϤ򤷤ơ `first`, `second`, `graph`, `screen`, `character` Τ줫Ĥ뤳ȤǤ ޤܺ٤ϡʲ: `coordinates` ⤷ (뤤Ϥʾ) ּǤ硢ɸ `timefmt` ν񼰤ˤäưǰϤޤ줿ʸͿɬפޤʲ : `set xdata`, `set timefmt` EEPIC, Imagen, LaTeX, TPIC ǽϤϡ\\ ȤȤǸФ Ԥ뤳ȤǤޤ ٥κɸʸǡե뤫ɤ߹ळȤǤޤ (ʲ : `labels`) : (1,2) ΰ֤ "y=x" Ƚ񤯾: set label "y=x" at 1,2 Symbol եȤΥ 24 "" () 򥰥դο˽񤯾: set label "S" at graph 0.5,0.5 center font "Symbol,24" Ф "y=x^2" αü (2,3,4) 褦ˤֹȤ 3 Ȥ : set label 3 "y=x^2" at 2,3,4 right θФ·ˤ: set label 3 center ֹ 2 θФ: unset label 2 ƤθФ: unset label ƤθФ򥿥ֹɽ: show label x ּǤ륰դ˸Фꤹ: set timefmt "%d/%m/%y,%H:%M" set label "Harvest" at "25/8/93",1 ǡȡƤϤ줿ѥ᡼ˤƤϤؿ褷 硢`fit` θǤ `plot` ˰ʲ¹Ԥޤ: set label sprintf("a = %3.5g",par_a) at 30,15 bfit = gprintf("b = %s*10^%S",par_b) set label bfit at 30,20 ƤϤѥ᡼ΤĤؿɽ: f(x)=a+b*x fit f(x) 'datafile' via a,b set label GPFUN_f at graph .05,.95 set label sprintf("a = %g", a) at graph .05,.90 set label sprintf("b = %g", b) at graph .05,.85 Фʸ򾮤龯ư: set label 'origin' at 0,0 point lt 1 pt 2 ps 3 offset 1,-1 pm3d Ȥä 3 Υ顼̾Τΰ֤ˡ z ( 5.5) б򸫽ФʸˤĤ: set label 'text' at 0,0,5.5 tc palette z 3 (linetype) ?commands set linetype ?commands unset linetype ?commands show linetype ?set linetype ?unset linetype ?show linetype ?linetype ޥ `set linetype` ϳƼ˻ѤŪ (linetype) 뤳ȤǽˤޤΥޥɤΥץϡ "set style line" ΤΤƱǤ饤󥹥Ȱ㤦Ȥϡ `set linetype` ˤϱ³ŪʤȤǡ `reset` αƶ ޤ 㤨С 1 2 ϥǥեȤǤ֤ФǤʲΤ褦˺ ޤ: set linetype 1 lw 2 lc rgb "blue" pointtype 6 set linetype 2 lw 2 lc rgb "forest-green" pointtype 8 lt 1 ѤƤ뤹٤ƤΤΤ٤ (lt 1 ΰΥǥ ) ˤʤޤϡlt 1 ˴Ťƺ줿 Ūʥ饤󥹥Τ褦ʤΤޤǤޤ ``: Υޥɤ gnuplot С 4.6 ǿƳ줿Τǡ С 4.2 Τޤʥޥ "set style increment user" ֤ ΤǤŤޥɤϸߤ侩Ǥ λȤߤϡgnuplot ǻѤФĿŪʹߤꤹ ˤȤޤԤˤϡ¹Իե ~/.gnuplot ˡ㤨 аʲΤ褦ʤѤΥޥɲä뤳Ȥ򤪴ᤷޤ: if ((GPVAL_VERSION < 4.5) \ || (!strstrt(GPVAL_COMPILE_OPTIONS,"+USER_LINETYPES"))) \ exit set linetype 1 lc rgb "dark-violet" lw 2 pt 0 set linetype 2 lc rgb "sea-green" lw 2 pt 7 set linetype 3 lc rgb "cyan" lw 2 pt 6 pi -1 set linetype 4 lc rgb "dark-red" lw 2 pt 5 pi -1 set linetype 5 lc rgb "blue" lw 2 pt 8 set linetype 6 lc rgb "dark-orange" lw 2 pt 3 set linetype 7 lc rgb "black" lw 2 pt 11 set linetype 8 lc rgb "goldenrod" lw 2 set linetype cycle 8 ȡʤ gnuplot ¹Ԥ٤Ϥͤ˽ ޤϤʤǤޤʤϡ ϥǥեȤ°³ޤ㤨 3 鳰С Ĥ pt 3, lw 1 Ȥʤޤʤץ륹ץȤκǽ 2,3 ιԤϡŤС gnuplot Ǥϥåפ뤿ݸǤ ƱͤΥץȥեǡơޥ١οԤäꡢ 西ס뤤νϷѤ˿򥫥ޥꤹ뤳 ǽǤ =cycle ޥ `set linetype cycle 8` ϡ礭ֹФƤϿ ˴ؤ뤳Ѥ뤳Ȥ gnuplot ޤʤ (linetype) 9-16, 17-24 ФƤϡƱѤ ޤ° (pointtype, pointsize, pointinterval) ϡ ޥɤαƶϼޤ`unset linetype cycle` Ϥεǽ̵ ޤ礭ֹ°ŪϡϾ ֹ°κѤͥ褵ޤ 3 lmargin ?commands set lmargin ?set lmargin ?lmargin ޥ `set lmargin` Ϻ;Υ򥻥åȤޤܺ٤ϡʲ : `set margin` 3 loadpath ?commands set loadpath ?commands show loadpath ?set loadpath ?show loadpath ?loadpath `loadpath` ϡ`call`, `load`, `plot`, `splot` ޥɤΥǡ ե롢ޥɥեθѥɲޤե뤬ߤ ǥ쥯ȥ˸Ĥʤä硢`loadpath` Υǥ쥯ȥ꤬ ޤ : set loadpath {"pathlist1" {"pathlist2"...}} show loadpath ѥ̾ñΥǥ쥯ȥ̾ޤʣΥѥ̾ΥꥹȤȤϤ ʣΥѥʤѥꥹȤ OS ͭΥѥڤꡢ㤨 Unix ϥ (':'), MS-DOS, Windows, OS/2 Ǥϥߥ (';') Ƕڤ ޤ`show loadpath`, `save`, `save set` ޥɤϡOS ͭΥѥ ڤ򥹥ڡ (' ') ֤ޤ Ķѿ GNUPLOT_LIB ꤵƤ硢Ƥ `loadpath` äޤ`show loadpath` ϡ`set loadpath` GNUPLOT_LIB ͤ ̡ɽޤ`save`, `save set` ޥɤϡGNUPLOT_LIB ͤ ̵뤷ޤ 3 locale ?commands set locale ?set locale ?locale `locale` `{x,y,z}{d,m}tics` դθꤷޤ : set locale {"<locale>"} <locale> ˤϥ󥹥ȡ뤵줿ƥǻȤȤνǤդθ ǤޤǽʥץˤĤƤϥƥΥɥȤ򻲾Ȥ Ƥޥ `set locale ""` ϡĶѿ LC_TIME, LC_ALL, LANG ͤꤷ褦Ȥޤ ˴ؤ locale ѹϡʲ: `set decimalsign` ʸ󥳡ɤ򸽺ߤΥΤΤѹϡʲ: `set encoding` 3 logscale ?commands set logscale ?commands unset logscale ?commands show logscale ?set logscale ?unset logscale ?show logscale ?set log ?logscale ?nologscale : set logscale <axes> {<base>} unset logscale <axes> show logscale ǡ<axes> () ϡ`x`, `x2`, `y`, `y2`, `z`, `cb`, `r` Ǥդ Ȥ߹礻ǽǤ<base> ϡпǤ (ǥե 10)ꤷʤäϡ`r` ʳΤ٤ƤμоݤȤʤ ޤޥ `unset logscale` ϡ٤Ƥμп : x, z ξˤĤпꤹ: set logscale xz y ˤĤ 2 Ȥпꤹ: set logscale y 2 pm3d plot Ѥ z ȿμпꤹ: set logscale zcb z п: unset logscale z 3 macros ?commands set macros ?commands show macros ?set macros ?show macros ˤꥳޥɥ饤Υޥִǽͭˤȡޥɥ饤 @<stringvariablename> ηʬʸϡʸѿ <stringvariablename> ˴ޤޤƥʸ֤ޤʲ : `substitution` : set macros 3 mapping ?commands set mapping ?commands show mapping ?set mapping ?show mapping ?mapping ǡ `splot` ˵̺ɸɸͿ줿硢`set mapping` ޥɤ `gnuplot` ˤɤΤ褦˰ꤹΤ˻Ȥޤ : set mapping {cartesian | spherical | cylindrical} ǥեȤǤϥƥɸ (̾ x,y,z ɸ) Ȥޤ ̺ɸǤϡǡ 2 Ĥ 3 Ĥ (ޤϤθĿ `using` ȥ) ȤͿޤǽ 2 Ĥϡ`set angles` ꤵ줿ñ Ǥ̳ (theta) ȶij (phi) (ʤ "" "") Ȥߤʤ ޤȾ r ϡ⤷ 3 ܤΥǡФ줬Ȥ졢⤷ʤ 1 ꤵޤѿ x,y,z Ȥбϰʲ̤Ǥ: x = r * cos(theta) * cos(phi) y = r * sin(theta) * cos(phi) z = r * sin(phi) ϡ"˺ɸ" Ȥꡢष "ϳؾκɸ" (١) 뤳ȤդƤ (ʤphi z ȤʤѡȤ ƻפäijѡˤʤޤ) ɸǤϡǡϤϤ 2 Ĥ 3 ĤͿ졢ǽ 2 Ĥ theta (`set angle` ǻꤵ줿ñ̤) z ȸʤޤȾ r ̺ɸξƱ͡3 ܤΥǡФ줬ʤ 1 ޤѿ x,y,z Ȥбϰʲ̤Ǥ: x = r * cos(theta) y = r * sin(theta) z = z `mapping` θ̤ϡ`splot` ޥɾ `using` ˤե륿Ǽ¸ 뤳ȤǽǤ¿Υǡե뤬 `mapping` Ǥ礦`mapping` ȤäƤƤ⡢⤷եΥ ν֤ŬڤǤʤä `using` ɬפˤʤäƤޤޤ `mapping` `plot` Ǥϲ⤷ޤ ^ ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/world.html"> world.dem: mapping Υǥ⡣ ^ </a> 3 margin ?commands set margin ?commands show margin ?set margin ?show margin ?margin `margin` (Ϥ;) Ȥϡΰζ饭Хΰֳ¦ޤ δֳ֤ΤȤǤ;礭ϼưŪˤȤޤޥ `set margin` ѹ뤳ȤǤޤ`show margin` ϸߤɽ ޤΰζ¦ǤޤǤδֳ֤ѹ ʲ: `set offsets` : set bmargin {{at screen} <margin>} set lmargin {{at screen} <margin>} set rmargin {{at screen} <margin>} set tmargin {{at screen} <margin>} show margin <margin> ΥǥեȤñ̤ˤϡŬڤȻפ롢ʸι⤵Ȥ ޤͤ;Ū礭 (ޤ̵) `gnuplot` ˤäƼư׻ͤȤȤˤʤޤ3 Ǥ ; (lmargin) Τߤʸ礭ñ̤ȤǤޤ  `at screen` ϡ;λ꤬ΤΰФ Ǥ뤳Ȥ̣ޤϡ¿ (multiplot) ⡼ɤǤ 2D, 3D դγѤΤ·Τ˻Ȥޤ֤ϸߤ `set origin` `set size` ̵ͤ뤹褦ˤʤäƤơ¿Υ ֤̤ˡȤƻȤ뤳ȤտޤƤޤ ;̾ꡢθФθФΥȥ롢 աƶγˤ key (ոФ) Υ򸵤˷ ޤιߤǤʤˤĤƤ ( `set xtics axis` ˤä)ι߼ȤȤθФ; ׻ˤϴޤޤޤ󤷡;˽񤫤¾ʸΰ֤η׻ˤޤޤ ޤ󡣤ϡȶ˶ᤤ硢θФ¾ʸ ǽ򼨺ޤ 3 mouse ?commands set mouse ?commands unset mouse ?set mouse ?unset mouse ?mousing ?mouse ?nomouse ޥ `set mouse` ϡߤ÷ϷФƥޥǽͭ ˤޤ÷⡼ɤǤ̾ǥեȤǤͭˤʤäƤޤ ޥɤե뤫ɤ߹ޤϥǥեȤǤ̵ˤʤäƤ ޥ⡼ɤ 2 ѰդƤޤ2 ⡼ɤϡ`plot` ޥ `splot` 2 ͱ (ʤz βžѤ 0, 90, 180, 270, 360 ٤ `set view` `set view map`) ưޤΥ⡼ɤǤϡ ޥ֤פ졢ޥܥȤäƳ礷ư Ǥޤդб key ȥ̤ʥåȥ ʤɤ򥯥å뤳ȤǡġΥդ򥪥/դڤؤ Ȥ򥵥ݡȤϷ⤢ޤ `splot` ˤ 3 դФƤϡդλ (view) Ƚ̼ܤ ѹ줾ޥܥ 1 2 (ˤɥå) ǹԤޤܥ 2 οľΥɥå shift Ʊ˹Ԥȡz ΰֲΰ (`xyplane`) 岼ޤΥܥˤ <ctrl> 򲡤 ȡɸɽޤǡɽϾäޤ礭ʥǡ ФͭѤǤ礦 ޥ¿ (multiplot) ⡼Ǥ̵Ǥ`unset multiplot` ¿褬뤹Сޥǽ ON ˤʤޤκѤ multiplot κǸ (replot 褵褦ʤ) ФƤΤ Ǥ : set mouse {doubleclick <ms>} {nodoubleclick} \ {{no}zoomcoordinates} \ {noruler | ruler {at x,y}} \ {polardistance{deg|tan} | nopolardistance} \ {format <string>} \ {clipboardformat <int>/<string>} \ {mouseformat <int>/<string>} \ {{no}labels {"labeloptions"}} \ {{no}zoomjump} {{no}verbose} unset mouse ץ `noruler` `ruler` ϡ구 (ruler) ǽ off, on ˤ `ruler` ˤϺɸͿƸꤹ뤳ȤǤޤ`ruler` on δ֡ruler θޥޤǤΥ桼ñ̤ǤεΥϢ³Ūɽ ޤǥեȤǤϡruler Υȥ륹å 'r' ˥ Ƥޤ ץ `polardistance` ϡޥ뤫구 (ruler) ޤǤε Υ˺ɸǤɽ (Υӳ٤ޤϷ) 뤫ɤꤷ ϥǥեȤΥ '5' бޤ =labels ܥ 2 gnuplot α³Ūʥ٥ˤϡץ `labels` ѤޤǥեȤ `nolabels` ǡܥ 2 ñ˰ Ūʥ٥ޥ֤褷ޤ٥ϸߤ `mouseformat` ˽äƽ񤫤ޤ`labeloptions` ʸϡޥ `set label` ޥɤϤޤΥǥեȤ "point pointstyle 1" ǡϥ ٥֤˾ץ饹 (`+`) 褷ޤŪʥ٥ϡμ `replot`ޤϥޥǤϸޤ󡣱³Ūʥ٥ϡ ξ Ctrl 򲡤ƥܥ 2 򥯥å뤳ȤǾäȤ ǤޤºݤΥ٥ΰ֤ˤɤ̶᤯ǥåʤФʤ ͤ `pointsize` Ƿꤵޤ ץ `verbose` ON ξ硢¹Ի𥳥ޥɤɽޤ Υץϥɥ饤Хɥ `6` ǤĤȤ ON/OFF åǤޤǥեȤǤ `verbose` OFF ˤʤäƤޤ ɥ饤Хɥ 'h' ǤĤȡޥȥûɽ ޤϡ桼Υʤ `bind` ޥɤˤ `hotkeys` (ʲ: `bind`) ɽޤ桼 `hotkeys` ǥեȤΥ̵ˤޤ ʲ⻲: `bind`, `label` 4 doubleclick ?set mouse doubleclick ?mouse doubleclick ֥륯åβ٤ϥߥ (ms) ñ̤Ϳޤϡܥ 1 ѤΤΤǡߤΥޥ֤򥯥åץܡ (`clipboard`) ˥ԡ Τ˻ȤޤǥեȤͤ 300 ms Ǥ 0 ms ꤹ 󥰥륯åǤΥԡԤ褦ˤʤޤ 4 mouseformat ?set mouse format ?set mouse mouseformat ?mouse format ?mouseformat ޥ `set mouse format` ϡsprintf() Фʸλǡ ޥ [x,y] ɸ襦ɥȥåץܡɤˤɤΤ褦 ɽ뤫ꤷޤǥեȤ "% #g" Ǥ `set mouse clipboardformat` `set mouse mouseformat` ϡܥ 1 ܥ 2 κѻ (ɸ򥯥åץܡɤإԡޥ֤˰Ū Ĥ) ʸνѤ˻Ȥޤξ硢ʲ ɽˤ񼰥ץΰĤ򤷤ޤʸξϡ񼰥 ץ 6 sprintf() νʸȤƻȤޤΤǡ2 Ĥμ¿ Ҥޤɬפޤ: `set mouse mouseformat "mouse x,y = %5.2g, %10.3f"`. ʸޤդˤˤϡ`set mouse mouseformat ""` Ȥޤ ʲν񼰤ѲǽǤ: 0 ǥե (1 Ʊ) 1 κɸ 1.23, 2.45 2 պɸ (0 1 ޤ) /0.00, 1.00/ 3 x = timefmt y = ɸ [(`set timefmt` ), 2.45] 4 x = y = ɸ [31. 12. 1999, 2.45] 5 x = y = ɸ [23:59, 2.45] 6 x = / y = ɸ [31. 12. 1999 23:59, 2.45] 7 `set mouse mouseformat` ˤ񼰡: "mouse x,y = 1.23, 2.450" 4 ޥ (scrolling) ?set mouse scrolling ?mouse scrolling ?mouse wheel ?scrolling ?mousewheel 2 դ 3 դξǡX Y ο̤ϥޥۥ ȤȤĴǤޤ<wheel-up> ϥ륢åפ (YMIN YMAX ξ Y ϰϤ 10 ѡȤäY2MIN Y2MAX ˤƱ ΤȤԤޤ)<wheel-down> ϥ󤷤ޤ <shift-wheel-up> Ϻ뤷 (XMIN XMAX ξ X2MIN X2MAX ξ򸺾)<shift-wheel-down> ϱ뤷ޤ <control-wheel-up> ϥդ濴˥।󤷡 <control-wheel-down> ϥॢȤޤ<shift-control-wheel-up> X X2 Τߤ˱äƥ।󤷡<shift-control-wheel-down> X X2 ˱äƤΤߥॢȤޤ 4 X11 ǤΥޥ (X11 mouse) ?mouse x11_mouse ?x11_mouse ?x11 mouse x11 νϷΥץ `set term x11 <n>` Ȥäʣ X11 ɥƤ硢ޥޥɤȥۥåȥεǽ ȤΤϸߤ襦ɥΤߤǤ¾Υɥ⺸ ޥκɸɽ̤ϤƤǤ礦 4 zoom ?mouse zoom ?zoom (zoom) ϡ̾Ϻޥܥ򲡤ȤǹԤ졢ϰϤ ϥޥΥɥåǹԤޤȤϰۤʤޥܥ׵᤹ ¹ԴĶ⤢뤫⤷ޤ󡣸Υդϡեɥǥۥå 'u' 򥿥פ뤳ȤǤޤۥåȥ 'p' 'n' ϡ ˤɤޤ ץ `zoomcoordinates` ϡκݤˡȤüˤκɸ 񤯤ɤꤷǥեȤǤ ON ˤʤäƤޤ ץ `zoomjump` ON ξ硢ܥ 3 ˤϰϤ Ϥȡޥݥ󥿤ϼưŪ˾줿֤˰ưޤ ϡ (ޤ϶Ǥ) ϰϤ򤷤ƤޤȤ ΤǤ礦ǥեȤǤ `zoomjump` OFF Ǥ 3 multiplot ?commands set multiplot ?commands unset multiplot ?set multiplot ?unset multiplot ?multiplot ?nomultiplot ޥ `set multiplot` `gnuplot` ¿⡼ɤˤޤ ʣƱڡɥ꡼ɽΤǤ : set multiplot { layout <rows>,<cols> {rowsfirst|columnsfirst} {downwards|upwards} {title <page title>} {scale <xscale>{,<yscale>}} {offset <xoff>{,<yoff>}} } unset multiplot Ϸ (terminal) ˤäƤϡޥ `unset multiplot` Ϳ ޤDzɽʤȤޤξ礳Υޥɤˤ ڡΤ褬Ԥʤ졢gnuplot ɸñ⡼ɤˤʤޤ ʳνϷǤϡ `plot` ޥɤ줾ɽ򹹿ޤ ϡޤǽϤΤ٤Ƥ褷˿Τɲä ˡ뤤ϡߤɽñ˿ΤɲäΤ 줫Ǥ ǻȤΰϡ褬Ԥ˾ä뤳ȤϤ 󤫤顢 "" 褦ʾʤɤǤʤ顢`clear` ޥɤѤƤ ѤθФ٥ȥϡˤơ󸽺ߤΥȸ˽ äƽ񤫤ޤ (餬 `screen` ɽϤƤʤ) ʳƤ `set` Τ褹٤ƤŬѤޤ⤷ 1 ٤ˤߤΤꤿʤ顢줬㤨 (timestamp) Ȥ顢`set multiplot` `unset multiplot` ǰϤޤ ֥å `plot` (ޤ `splot`, `replot`) ̿ΰĤ `set time` `unset time` ǤϤǤ multiplot Υȥϡġ西ȥ뤬äȤƤ⡢Ȥ ΤΤǡڡξˤΤΥХΤˤ錄륹ڡ ݤޤ layout ꤵƤʤ硢뤤Ϥɤֹ碌򤷤 ϡޥ `set origin` `set size` ֤ꤹɬ פޤܺ٤ϡʲ: `set origin`, `set size` : set multiplot set size 0.4,0.4 set origin 0.1,0.1 plot sin(x) set size 0.2,0.2 set origin 0.5,0.5 plot cos(x) unset multiplot ϡcos(x) Υդsin(x) ξѤ߽Ťͤɽޤ `set size` `set origin` Τΰ򻲾Ȥϳ Ѥޤʲ⻲: `set term size`趭·ʤ С`set margin` ޥɤǡγ;򥵥Ʊ· ȤޤλѤ˴ؤƤϡʲ: `set margin`;򥵥 ʸñ̤Ūʿñ̤Ѥ뤳ȤդƤ äƻĤäڡ륰դɽǥХɽ˰¸ ޤ㤨Сץ󥿤ȥǥץ쥤ɽ¿ʬäΤˤʤǤ 礦 ץ `layout` ˤꡢˤ줾ͿƤ `set size` `set origin` ޥɤʤˡñʣդǤޤ ϼưŪ˹Ԥʤ졢ĤǤ⤽ѹǤޤ `layout` Ǥɽ <rows> Ԥ <cols> γʻҤʬ䤵졢ƳʻҤϡ θ³б̾Υץˤäƹ (rowsfirst)뤤 (columnsfirst) ƹԤޤ襰դѤ߾夲ϲ (`downwards`) ˡޤϾ (`upwards`) ˿Ӥ褦ˤǤޤ եȤ `rowsfirst` `downwards` Ǥ `scale` ǿ̤`offset` ǰ֤ʿ԰ưԤʤȤǤ ޤscale offset y ͤά줿ϡx ͤ˻ ޤ`unset multiplot` ˤ꼫ưֵǽϥդˤʤꡢ `set size` `set origin` ͤ `set multiplot layout` ξ֤ ޤ : set size 1,1 set origin 0,0 set multiplot layout 3,2 columnsfirst scale 1.1,0.9 [ ˤ 6 ĤޤǤ襳ޥ ] unset multiplot Ǥ 6 Ĥ褬 2 ˾夫鲼ء鱦ؤƹ ޤϿʿ 1.1/2ľ 0.9/3 Ȥʤޤ ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/multiplt.html"> multiplot Υǥ (multiplt.dem) ^ </a> 3 mx2tics ?commands set mx2tics ?commands unset mx2tics ?commands show mx2tics ?set mx2tics ?unset mx2tics ?show mx2tics ?mx2tics ?nomx2tics x2 () ξߤΰ `set mx2tics` 椵ޤʲ: `set mxtics` 3 mxtics ?commands set mxtics ?commands unset mxtics ?commands show mxtics ?set mxtics ?unset mxtics ?show mxtics ?mxtics ?nomxtics x ξߤΰ `set mxtics` 椵ޤ`unset mxtics` ˤäƤɽʤ뤳ȤޤƱͤ楳ޥɤƼ ѰդƤޤ : set mxtics {<freq> | default} unset mxtics show mxtics ν񼰤 `mytics`, `mztics`, `mx2tics`, `my2tics`, `mcbtics` ФƤƱǤ <freq> ֤Ρˤäʬ䤵֤ο ( ǤϤޤ) Ǥ̾ФƤϥǥեȤͤ 2 5 ǡˤäѲޤä֤ 1 ġޤ 4 Ĥξ꤬뤳Ȥˤʤޤ`default` ꤹ뤳Ȥˤäƾ οϥǥեȤͤޤ пǤ硢ʬ֤οϥǥեȤǤͭդʿ˥åȤ ޤ (10 ĤĹ򸵤ˤ)<freq> ͿƤФ餬ͥ褵 ޤпǤ̾ξ (㤨 1 10 ޤǤ 2, 3, ..., 8, 9 ι) ϡ9 Ĥʬ֤ޤ󤬡<freq> 10 Ȥ뤳ȤǤʤޤ Ǥդΰ֤ꤹˤϡ("<label>" <pos> <level>, ...) `set {x|x2|y|y2|z}tics` ǻѤƤ<label> ("") ǡ<level> 1 ˤޤ ޥ `set m{x|x2|y|y2|z}tics` ϡ꤬ͤδֳ֤ξˤΤ Ưޤ⤷Ƥ꤬ `set {x|x2|y|y2|z}tics` ˤäƼư ֤줿ϡξΥޥɤ̵뤵ޤưŪ ֤ȼưξ֤ϡ`set {x|x2|y|y2|z}tics` `set {x|x2|y|y2|z}tics add` ȤȤȤǶ¸Ǥޤ : set xtics 0, 5, 10 set xtics add (7.5) set mxtics 5 ξ硢 0,5,7.5,10 1,2,3,4,6,7,8,9 ξ set logscale y set ytics format "" set ytics 1e-6, 10, 1 set ytics add ("1" 1, ".1" 0.1, ".01" 0.01, "10^-3" 0.001, \ "10^-4" 0.0001) set mytics 10 ξ硢ϻꤵ줿񼰤ǡпŪ ǥեȤǤϾɽϡǤϥդǡпǤϥˤʤ ƤޤϡФ `axis|border` `{no}mirror` λѾޤ˴ؤˤĤƤϡʲ: `set xtics` 3 my2tics ?commands set my2tics ?commands unset my2tics ?commands show my2tics ?set my2tics ?unset my2tics ?show my2tics ?my2tics ?nomy2tics y2 () ξߤΰ `set my2tics` 椵ޤʲ: `set mxtics` 3 mytics ?commands set mytics ?commands unset mytics ?commands show mytics ?set mytics ?unset mytics ?show mytics ?mytics ?nomytics y ξߤΰ `set mytics` 椵ޤʲ: `set mxtics` 3 mztics ?commands set mztics ?commands unset mztics ?commands show mztics ?set mztics ?unset mztics ?show mztics ?mztics ?nomztics z ξߤΰ `set mztics` 椵ޤʲ: `set mxtics` 3 object ?object ?commands set object ?commands show object ?set object ?show object ޥ `set object` ϡθ 2 褹٤ƤɽñΥ ֥Ȥޤ֥ȤϤĤǤǤޤ֥ Ȥηϡߤ `rectangle` (Ĺ)`circle` ()`ellipse` (ʱ) 򥵥ݡȤƤޤĹϡޥ `set style rectangle` ˤäꤵ줿° (ɤ٤) ǥե ȤƼѤޤġΥȤ̡Υ°褹뤳 ȤǽǤߤʱߤϡ`set style fill` ˤɤ٤ Ѥޤ : set object <index> <object-type> <object-properties> {front|back|behind} {fc|fillcolor <colorspec>} {fs <fillstyle>} {default} {lw|linewidth <width>} <object-type> ϡ`rectangle`, `ellipse`, `circle`, `polygon` Τ ǤġΥ֥Ȥηϡηͭ⤤ĤäƤ ޤ `front` ꤹȡ֥ȤϤ٤ƤǤ () 褵 ޤ`front` Ȼꤵ줿٥ϸ () ˤʤޤ`back` ꤹȡ٤Ƥǡ٤ƤΥ٥θ֤ޤ `behind` ϡ `back` Ĺޤह٤ƤΤΤθ֤ äơ set object rectangle from screen 0,0 to screen 1,1 behind ϡդڡΤطʤ˿ĤΤѤǤޤ ֥Ȥɤ٤ο <colorspec> ǻꤷޤ`fillcolor` `fc` ȾάǤޤɤ٤ <fillstyle> ǻꤷޤܺ ϡʲ: `colorspec`, `fillstyle` `default` ꤹ ȡ°褬ºݤ˹ԤȤΥǥեȤ ޤʲ: `set style rectangle` 4 rectangle ?rectangle ?commands set object rectangle ?commands show object rectangle ?set object rectangle ?show object rectangle : set object <index> rectangle {from <position> {to|rto} <position> | center <position> size <w>,<h> | at <position> size <w>,<h>} Ĺΰ֤ϡгѤ˸礦 2 Ĥĺ (ȱ) ΰ֡ 濴ΰ֤Ȳ (<w>) Ƚ (<h>) ǻǤޤξ ΰ֤ϡκɸ (`first`, `second`)ΰкɸ (`graph`)꡼ɸ (`screen`) Τ줫ѤǤޤ (ʲ: `coordinates`)ץ `at` `center` Ʊ̣Ǥ : # ɸǰϤޤ줿ΰΤطʤ忧 set object 1 rect from graph 0, graph 0 to graph 1, graph 1 back set object 1 rect fc rgb "cyan" fillstyle solid 1.0 # Ѥ 0,0, Ѥ 2,3 ֤ͳѤ֤ set object 2 rect from 0,0 to 2,3 fc lt 1 # Ĥζ (ɤ٤ʤ) Ĺ֤ set object 3 rect from 0,0 to 2,3 fs empty border rgb "blue" # ĺϰưʤޤޡɤ٤ȿǥեȤѹ set object 2 rect default 4 ellipse ?ellipse ?commands set object ellipse ?commands show object ellipse ?set object ellipse ?show object ellipse : set object <index> ellipse {at|center} <position> size <w>,<h> {angle <orientation>} {units xy|xx|yy} {<other-object-properties>} ʱߤΰ֤ϡ濴ꤷθȹ⤵ (缴) ꤷ  `at` `center` Ʊ̣Ǥ濴ΰ֤λˤϡ κɸ (`first`, `second`)ΰкɸ (`graph`) ɸ (`screen`) Τ줫ѤǤޤ (ʲ: `coordinates`) 缴ĹϡκɸͿʤФޤʱߤθ (orientation) ϡʿʱߤμ缴Ȥδ֤γ٤ǻꤷޤ٤Ϳ ʤСǥեȤʱߤθ˻Ȥޤ (ʲ: `set style ellipse`) `units` ϡʱߤμν̼ܤ˻ Ѥޤ`units xy` ϡ缴 x ñ̤ǡ y ñ̤Ƿ׻ ޤ`units xx` ξȤ x ñ̤ǽ̼ܤ`units yy` ξ Ȥ y ñ̤ˤʤޤ ǥեȤ `xy` Ǥ`set style ellipse units` ǤĤǤ Ǥޤ : x y ν̼ܤʤ ( `units xy` ξ) žμ缴Ϥʤޤ `set object ellipse size <2r>,<2r>` `set object circle <r>` Ȥϡ ̤ˤƱȤˤϤʤʤȤդƤcircle Ⱦ¤Ͼ x ñ̤Ƿפ졢ä x y ν̼ܤäꡢΥ ڥ椬 1 ǤʤƤ⡢˱ߤޤ`units` `xy` ƤС'set object ellipse' Ǥϡǽ <2r> x ñ̤ǡ <2r> y ñ̤Ƿפޤ x y ν̼ܤƱ ǡΥڥ椬 1 ǤΤ߱ߤ뤳Ȥ̣ ޤ`units` `xx` `yy` ˥åȤСޥ `set object` ǻꤷľ¤Ʊñ̤Ƿ׻Τǡʱߤ ڥꥵƤ⤽Υڥݻޤ 4 circle ?circle ?commands set object circle ?commands show object circle ?set object circle ?show object circle : set object <index> circle {at|center} <position> size <radius> {arc [<begin>:<end>]} {<other-object-properties>} ߤΰ֤ϡ濴ꤷθȾ¤ꤷޤ `at` `center` Ʊ̣Ǥΰ֤Ⱦ¤ˤϡx κɸΰ кɸ (`graph`)꡼ɸ (`screen`) Τ줫ѤǤ ޤ (ʲ: `coordinates`)ΤξǤ⡢Ⱦ¤ϼա ꡼οʿν̼ܤФƷפ졢ʿȿľν̼ܤˤ 줬äƤ⡢̤ߤˤʤ褦ľޤ ǥեȤǤϡʱߤ褵ޤץ `arc` ˳ϳѤ λѤ٤ñ̤Ȥƻꤹȱ߸̤褷ޤ߸̤ϡȿײ ޤ 4 polygon ?polygon ?commands set object polygon ?commands show object polygon ?set object polygon ?show object polygon : set object <index> polygon from <position> to <position> ... {to <position>} ޤ from <position> rto <position> ... {rto <position>} ¿ѷΰ֤ϡĺΰ֤Ϳ뤳ȤǻǤޤϡ κɸ (`first`, `second`)ΰкɸ (`graph`)꡼ ɸ (`screen`) Τ줫ѤǤޤŪʺɸ (rto) ϡκɸϤĺƱɸϤǤʤФޤ󡣰ʲ : `coordinates` : set object 1 polygon from 0,0 to 1,1 to 2,0 set object 1 fc rgb "cyan" fillstyle solid 1.0 border lt -1 3 offsets ?commands set offsets ?commands unset offsets ?commands show offsets ?set offsets ?unset offsets ?show offsets ?offsets ?nooffsets եåȤϡư̼ܤ줿դΥǡμ˶ζ֤ Ȥߤ󶡤ޤեåȤϡx1,y1 2 `plot` ޥɤ ߤǰ̣ޤ : set offsets <left>, <right>, <top>, <bottom> unset offsets show offsets ƥեåȤޤϿȤΥǥեȤͤ 0 Ǥ ǥեȤǤϡΥեåȤ x1 Ʊñ̤ǻꤷ岼Υ åȤ y1 Ʊñ̤ǻꤷޤ "graph" Ѥ뤳 ȤǼϰϤФȤƥեåȤꤹ뤳ȤǤޤ ΥեåȤͤϡϰϤꤵ줿ؿФޤ㤨β ΥեåȤ y κǾͤ꾮ͤˤޤƤϰ ǤΥեåȤϡư̼ܡ뤤ϥåԥ󥰤Ȥλפ̷ ̤ǽޤư̼ܵǽ鼴ϰϤĴꤿ ϡ"set auto fix" ꤹȤǤ礦 : set auto fix set offsets graph 0.05, 0, 2, 2 plot sin(x) sin(x) Υդ y ϰϤ [-3:3] ˤʤޤϡؿ y ϰϤ [-1:1] ˼ư̼ܤޤľΥեåȤ줾 2 Ǥ뤿Ǥx ϰϤ [-11:10] ˤʤޤϥǥե Ȥ [-10:10] ǤϰϤ 0.05 γФ뤿Ǥ 3 origin ?commands set origin ?commands show origin ?set origin ?show origin ?origin ޥ `set origin` ϥ꡼Ƕθ (ʤ դȤ;) Τ˻ѤޤκɸϤϥ꡼ɸ (`screen`) ͿޤκɸϤ˴ؤˤĤƤϡʲ: `coordinates` : set origin <x-origin>,<y-origin> 3 output ?commands set output ?commands show output ?set output ?show output ?output ?output file ǥեȤǤϡդɸϤɽޤޥ `set output` νϤꤵ줿եǥХ˥쥯Ȥޤ : set output {"<filename>"} show output ե̾ϰǰϤޤʤФʤޤ󡣥ե̾ά줿 ϡľ `set output` dz줿ե뤬졢ʽϤ ɸ (STDOUT) ޤ(⤷`set output "STDOUT"` Ȥ Ϥ "STDOUT" Ȥ̾Υե뤫⤷ޤ ! [" ʤ" ȤΤϡ㤨 `x11` `wxt` ʤɤ terminal (Ϸ) Ǥ `set output` ̵뤵뤫Ǥ]) `set terminal` `set output` ξꤹ硢`set terminal` ˻ꤹǤϡ terminal ǤϡOS ɬפ ե饰򥻥åȤ뤳Ȥ뤫Ǥ㤨СOS ե򳫤 Ȥ (鵷ɤ) ե뤬եޥåȤƤ뤫ɤΤɬפ 褦 OS ʤɤ쳺ޤ popen ؿĤ褦ʥޥ (Unix ) Ǥϡե̾κǽ '|' 뤳ȤˤꡢϤ򥷥륳ޥɤ˥ѥפϤȤǽǤ㤨 аʲ̤Ǥ: set output "|lpr -Plaser filename" set output "|lp -dlaser filename" MS-DOS Ǥϡ`set output "PRN"` ȤɸΥץ󥿤˽Ϥޤ VMS ǤϽϤǤդΥסǽʥǥХ뤳ȤޤϤ DECnet Ʃʥ뤳ȤǽǡϤνͿƤ ޤ 3 parametric ?commands set parametric ?commands unset parametric ?commands show parametric ?set parametric ?unset parametric ?show parametric ?parametric ?noparametric `set parametric` ޥɤ `plot` `splot` ΰ̣̾δؿ 褫޲ѿɽ (parametric) ؿѹޤ`unset parametric` Ȥи⡼ɤޤ : set parametric unset parametric show parametric 2 դˤƤϡ޲ѿɽؿϤҤȤĤ޲ѿФ 2 ĤδؿޤȤƤ plot sin(t),cos(t) Ȥ뤳Ȥˤ Ʊߤޤ (ڥ椬ꤵƤСʲ: `set size`)`gnuplot` ϡξδؿ޲ѿˤ `plot` Τ ͿƤʤХ顼åФޤ 3 դˤƤ̤ x = f(u,v), y = g(u,v), z = h(u,v) ޤä 3 ĤδؿȤǻꤹɬפޤȤƤϡ `cos(u)*cos(v),cos(u)*sin(v),sin(u)` Ȥ뤳ȤˤäƵ̤ޤ `gnuplot` ϡ3 δؿ޲ѿˤ `splot` ΤͿ ƤʤХ顼åФޤ ˤäɽǤؿϡñ f(x) δؿ񤹤뤳Ȥ ʤޤʤʤС2 (3 ) δؿ x, y (, z) ͤΩ˷׻ 뵭ҤǤ뤫Ǥºݡt,f(t) ΥդϡܤδؿΤ褦 ʹؿѤ x ͤ׻ f(x) ˤä륰 դǤƱͤˡ3 Ǥ u,v,f(u,v) ϡf(x,y) Ǥ ޲ѿɽؿϡx δؿy δؿ (z δؿ)ν˻ꤷ ϶̤޲ѿӤѰ뤳ȤαդƲ ˡ`set parametric` λϡѿѰѤ뤳ȤŤ ޤ̾ f(x) f(x,y) xrangeyrange (zrange) ΤФơ޲ѿ⡼ɤǤϤ˲äơtrange, urange, vrange ѤޤѰ `set trange`, `set urange`, `set vrange` ˤäľܻꤹ뤳Ȥ⡢`plot` `splot` ǻꤹ뤳ȤǤޤ Ǥϡ޲ѿΥǥեȤѰ [-5:5] ȤʤäƤޤ ŪˤϤΥǥեͤäͭդʤΤѹͽǤ 3 plot ?commands show plot ?show plot ޥ `show plot` ϸߤ襳ޥɡʤ `replot` ޥ ǺƸ롢ľ˹Ԥ줿 `plot` `splot` ޥɤɽޤ ˥ޥ`show plot add2history` ϡθߤ襳ޥɤ `history` ˽񤭽Фޤϡ`replot` Ȥäľ襳ޥ ˶ɲä硢ƥޥɹΤ򤹤Խ Ǥ 3 pm3d ?commands set pm3d ?commands show pm3d ?set pm3d ?show pm3d ?pm3d pm3d `splot` ΰĤΥǡѥåȤ˳դ줿 3 4 ǡ򡢥顼/οϿ/̤Ȥ褷ޤϤ륢 르ꥺѤƤơϥǡʻҾǤäƤ⡢ǡ οäƤ褦ʻҾΥǡǤäƤ⡢뤳Ȥʤ Ǥޤ (ץǤդνͿ뤳ȤǤޤ): set pm3d set pm3d { { at <position> } { interpolate <steps/points in scan, between scans> } { scansautomatic | scansforward | scansbackward | depthorder } { flush { begin | center | end } } { ftriangles | noftriangles } { clip1in | clip4in } { corners2color { mean|geomean|median|min|max|c1|c2|c3|c4 } } { hidden3d {<linestyle>} | nohidden3d } { implicit | explicit } { map } } show pm3d unset pm3d splot ޥɤ `with pm3d` ꤷ硢ޤϥǡؿ襹 (`style`) Ū pm3d ˥åȤƤ硢뤤ϡ pm3d ⡼ɤ `set pm3d implicit` ȤʤäƤϡpm3d Υ顼 ̤褵ޤ 2 Ĥξϡplot ޥɤǻꤷ ܤ p3md ̤ɲä褷ޤ㤨С splot 'fred.dat' with lines, 'lola.dat' with lines ϡƥǡޤˤܤ pm3d ̤ξ褷ޤ ץ `explicit` ON (ޤ `implicit` OFF) ξϡ° `with pm3d` ꤵ줿Τߤ pm3d ̤Ȥ褵ޤ㤨 splot 'fred.dat' with lines, 'lola.dat' with pm3d ϡ'freq.dat' ޤ (Τߤ)'lola.dat' pm3d ̤褵 ޤ gnuplot εưϤΥ⡼ɤ `explicit` ˤʤäƤޤŪ ƸߴΤˡޥ `set pm3d;` (ʤץꤷʤ ) `set pm3d at X ...` (ʤ `at` ǽΥץξ) ϥ⡼ɤ `implicit` ѹޤޥ `set pm3d;` ϡ¾ ץ򤽤ΥǥեȤξ֤ꤷޤ ǥեȤΥǡ/ؿ襹 `pm3d` ˤϡ㤨 set style data pm3d Ȥޤξ硢ץ `implicit` `explicit` ϸϤ ĤˤƤϡϥޥɥ饤Ϳ줿褵 뤳ȤդƤäˡ񤭤ƤǤ ΰ򱣤Ƥޤǽ褦ʶ̤ɤĤ֤κݤ˴ؿ Ǥ礦 p3md οդϡ3 Ĥΰۤʤ `top`, `bottom`, `surface` Τ ޤϤ٤Ƥ˹Ԥޤʲ: `pm3d position`ʲΥޥ ϡۤʤä⤵ 3 Ĥοդζ̤ޤ: set border 4095 set pm3d at s splot 10*x with pm3d at b, x*x-y*y, x*x+y*y with pm3d at t ʲ⻲: `set palette`, `set cbrange`, `set colorbox`Ƥ ǥե `demo/pm3d.dem` ⻲ͤˤʤǤ礦 4 pm3d Υ르ꥺ (algorithm) ?pm3d algorithm ޤϿ/̤ɤΤ褦ΤˤĤƵҤޤϥǡ ϡؿɾ뤫ޤ `splot data file` ޤ ̤ϡ (Ω) η֤ǹޤpm3d 르ꥺǤϡ ǽǸФ줿٤礦 2 ȡǸФ줿¾ 2 ֤ΰ褬 4 z (ޤɲä줿 'color' Ѥ͡ ʲ: `using`) ˽äƳ (ޤ 顼) ɤޤǥե ȤǤ 4 ĤγѤͤʿͤȤޤϥץ `corners2color` ѹǤޤʤζ̤ˤϡ٤礦 2 򺹤ƤϤʤơο㤤ƤϤ ޤ󡣤󡢺ǤɤΤοƱȤǤ¾ˤϲ ɬפǤϤޤ (㤨ХǡϳʻҾǤɬפʤ)¾ˤ⤳ pm3d 르ꥺϡϤ줿 (¬줿뤤Ϸ׻줿) ΰ γˤϲʤȤĹ꤬ޤ ̤οŤϡʲΤ褦ϥǡ˴ؤƹԤޤ: 1. ؿޤ 1 Ĥ 3 ĤΥǡ󤫤ʤǡ splot: ˽Ҥ ͳѷ 4 ĤγѤ z ɸʿ (ޤ `corners2color`) 顢 ϰ [0:1] Ϳ `zrange` ޤ `cbrange` ϰ [min_color_z,max_color_z] ؤбˤꡢ/顼ͤޤ ͤϡľܳοϿѤγͤȤƻȤȤǤޤ 줿ͤ򥫥顼б뤳ȤǤޤϡʲ : `set palette` 2. 2 Ĥ 4 ĤΥǡ󤫤ʤǡ splot: /顼ͤϡz ͤ˺ǸκɸȤäޤΤǡ z ɸΩ ʤΤˤʤޤ 4 ǡ˻ȤȤǤޤ ¾: 1. ʪؼԤδ֤Ǥϡgnuplot ʸ䥽˸ 'iso_curve' ( Ω) Ȥդ⡢Ǹڤ ' (scan)' Ȥդ Ƥޤ1 ٤¾εϿˤ꿧Ͽޤɾ롢Ȥ ΤϤ̣Ǥ 2. 'gray' 'color' (scale) ϡ餫Ѳ륫顼ѥåȤ ΡϢ³ѿǤμͻҤ襰դ٤Ĺ ɽޤʸǤϤ "顼ܥå (colorbox)" ȸƤӡ ѿ򥫥顼ܥåѿȸƤӤޤʲ: `set colorbox`, `set cbrange` 3. pm3d οŤ 3 ̤ǤϤʤ 2 ˻Ȥˤϡ `set view map` `set pm3d map` ѤƤ 4 pm3d ΰ (position) ?pm3d position ζ̤̤ŷ (ξϳ/顼ʿϿ) ̾ z ɸ (/顼) ȤǤޤϡץ `at` ˡ`b`, `t`, `s` 6 ĤޤǤȹ礻ʸĤƻꤹ뤳 ǹԤޤ㤨 `at b` ̤Τߤ褷ޤ`at st` Ϻǽ˶ ̤Ƽŷ̤˿Ͽޤޤ`at bstbst` ... ܤ áʤΤϻȤޤ ɤ줿ͳѷϡ鼡ؤ褵ƹԤޤ̤褹 (`at s`)λͳѷΤΤ˽Ťʤ (񤭤) ޤ (gnuplot ɤ 줿¿ѷ֤νŤʤߺѤ׻褦ʲ۸¥ġǤϤ ޤ) ǽǡǽǸؤ륹 åץ `scansforward` `scansbackward` ƤߤƤ ǥեȤ `scansautomatic` ǡ gnuplot Ȥν ¬ޤǡץ `depthorder` ϻͳѷν˺ ޤɤĤ֤Ͽ¤Ѥ줿ǹԤ졢ˤ꤫ ʤʣʶ̤ǤŪʤΤˤ뤳ȤǤޤܺ٤ϡʲ: `pm3d depthorder` 4 ν (scanorder) ?pm3d scanorder ?pm3d depthorder ?pm3d flush ?depthorder =flush =scansforward =scansbackward =scansautomatic =depthorder ǥեȤǤϡpm3d ɤ٤̤ͳѷϡ餬̤ ʻ˱äƽв񤦽֤ɤ٤ޤν֤ϡץ `scansautomatic`|`scansforward`|`scansbackward` Ǥޤ (scan) ץϡ̤ˤϱ̽ȤξΩޤ 2 Ϣ³οƱǤʤä硢ͳѷμϤ ξκǽ餫 (`flush begin`) ˤ뤫Ǹ夫 (`flush end`) ˤ뤫椫 (`flush center`) ˤ뤫ꤷʤФޤ `flush (center|end)` `scansautomatic` ȤξΩä `flush center` ޤ `flush end` ꤷ `scansautomatic` ꤵ 줿硢̵ `scansforward` ѹޤ 2 Ϣ³οƱǤʤä硢ġ­ ˡκǸ˿ѷɤ򥪥ץ `ftriangles` ϻؼޤϳ餫ʿϿޤζΤ˻Ȥޤ gnuplot ϡ̤ɤ٤ˤƤϡα̽ϹԤޤ󤬡 Ƥϱᤤؽ˻ͳѷǤɤ٤ȤǽʬʤǤ ˤʤޤΥ⡼ɤϡʲΥץȤȤǤޤ: set pm3d depthorder hidden3d ץ `depthorder` ɤ٤ͳѷؤλؼǡץ `hidden3d` Ʊͤ˶ (⤷ʤ) ؤλؼǤŪʥץ Ǥ `set hidden3d` ϡpm3d ̤ˤϱƶʤȤդƤ 4 åԥ (clipping) ?pm3d clipping ͳѷ x,y ɸ˴ؤ륯åԥ󥰤 2 ĤˡǹԤޤ `clip1in`: ƻͳѷƤ 4 ƤʤФʤ餺ʤ ⤽Τ 1 x, y ϰϤˤޤäƤʤФʤޤ `clip4in`: ƻͳѷƤ 4 x, y ϰϤˤޤäƤʤФ ޤ 4 γ ?pm3d color_assignment =mean =geomean =median =min =max `3 Υǡ (x,y,z) ξ`: Ťϥ顼ܥåƱͤ `set palette` Ƿꤵ ĤǤϰĤΥѥåȤΤߤ¸ߤޤĤζ̤ ʤѥåȤ褹ˤϡ`origin` `size` ꤷ `mutiplot` ȤȤǹԤޤϥɥ饤ФѤǤ뿧ȤԤƤޤ ˤ `set palette maxcolors` ȤȤ˺줺ˡ 褵 pm3d ͳѷˤϰĤγ/顼ͤбޤ (4 ĺ dz餫ʥ顼Ѳϵޤ)ͤϡ`corners2color <option>` ˽äƼϤγѤ z ɸ׻ޤ<option> 'mean' (ǥե )'geomean', 'median' ǡ̤Υ顼ʿ경˴ĤμͿ 'min','max' Ϥ줾Ǿͤ͡򤷤ޤϱҤʡ 뤤ϵ޷ʥԡͤĤ褦ʥԥ륤᡼俧ϿޤȤ ɬפޤ󡣤Τ褦ʾˤϡषץ 'c1', 'c2', 'c3', 'c4' ȤäơͳѷογˤĤγѤ z ɸȤ褦 ˤФǤ礦ɤγѤ 'c1' бΤΤ뤿ˤϲ ¸ƤߤɬפǤ礦θ˰¸Ƥޤ pm3d 르ꥺϡ顼̤ϥǡϰϤγˤʤ ǡץ 'c<j>' ϡʻҤ 2 ĤΤؤ˱äԥ뤬ɤλ ѷοˤͿʤȤ̤⤿餷ޤ㤨Сpm3d 르 ꥺ 4x4 ΥǡγʻҤŬѤ륹ץ `demo/pm3d.dem` ( 󸫤Ƥ) Ǥϡ(4-1)x(4-1)=9 ʤĹޤ `4 Υǡ (x,y,z,color) ξ`: 4 ܤ˥ǡͿ硢̤̾˥ѥåȤ˳Ƥ볥 ĴͤȤߤʤޤġλͳѷκ̿ϾƱͤ˹Ԥޤͤ z ͤȤڤΥޤ̤κ̿ץˤꡢ4 ܤΥǡ RGB Ϳ뤳ȤǤޤʲ: `rgbcolor variable`ξ硢 襳ޥɤϰʲΤ褦ˤɬפޤ: splot ... using 1:2:3:4 with pm3d lc rgb variable Ϳ줿Фơμ 4 ĤʿѲ줿 (x,y) ɸ Ѥƻͳѷäơλͳѷοɤ롢Ȥä褦 ¾襢르ꥺब뤫⤷ޤ ϡ᡼ (2 γʻ) ФƤ `image` `rgbimage` ˤäƴ˹ԤʤƤޤ z ͤϰϤȶ̤οͤϰϤϡz cb ˴ؤ `set log` Ʊ͡ `set zrange` `set cbrange` ˤäΩĴ뤳Ȥդ Ͽޤ cb ΤߤĴᤵޤʲ⻲: `set view map`, `set colorbox` 4 hidden3d ?set pm3d hidden3d ?pm3d hidden3d ץ `set pm3d hidden3d` ϡƻͳѷζ򡢻ͳѷ켫 褵ΤƱ褷ޤ̾ϡϵŪʱã 뤿ˡץ `depthorder` ȤȤ˻Ѥޤϡޥ `set hidden3d` Ѥ⤺äȸŪǤ礦Υޥɤϡ θܤ椹뤿ɲäΥ饤󥹥륪ץļ ޤ饤ѥ᡼Ȼꤹ뤫άϡ plot ޥɤͿ줿°Ѥޤ侩: set pm3d at s hidden3d depthorder unset hidden3d unset surf splot x*x+y*y linecolor rgb "black" linewidth 0.5 4 interpolate ?set pm3d interpolate ?pm3d interpolate ץ `interpolate m,n` ϡʻ٤ܤ֤ ѷŪ֤ޤǡФƤϡ϶̤οѲ 餫ˤ̤οޤؿФƤϡ֤ ٤˥񤷤ƤޤȤäȤ餤ΰ̣ ޤ󤫤顢ؿξ `samples` `isosamples` Ȥ Ǥ礦 m, n ФƤϡƻͳѷޤϻѷϡ줾 m n ֤ޤ m, n Ǥ֤٤ϡʤȤ |m|, |n| 褵褦򤵤ޤ̤ʳʻҴؿȸ ȤǤޤ0 ξ硢ʤ `interpolate 0,0` ϡưŪ˺ Ŭֶ򤷤ޤ 4 侩ʥץ ?pm3d deprecated_options Υޥɤˤϥץ {transparent|solid} ȤƤޤ ߤϡƱ̤򤽤줾 `set grid {front|layerdefault}` ˤä ȤǤޤ ޥ `set pm3d map` ϰʲΰϢΤΤƱͤǤ: `set pm3d at b`; `set view map`; `set style data pm3d`; `set style func pm3d`; `set view map` ʤäεСؤθߴΤΤΤǤ ϥǡե륿뤿 `zrange`ӿϰϤѹѤ `cbrange` դŬڤ˻ѤƤ`set (no)surface` ( ?) 褦Ǥ 3 palette ?commands set palette ?commands show palette ?set palette ?show palette ?palette ѥåȤϡ`pm3d` ǡ顼¿ѷ顼ҥȥࡢ ۤطʡ¾Ƥ롢뤤ϼΤɤĤ֤ǻ 롢εǤǤϤϳ餫 "Ϣ³Ū" 顼䳥 ĴΥѥåȤ̣ޤñ˥ѥåȤȸƤ֤Ȥˤޤ 顼ѥåȤϡ¿ѷοɤĤ֤ȳ餫ʿΥѥåȤ򥵥ݡ ȤϷɬפȤϸߡ`pm3d` ǰɽϷ ǻѲǽǤͤϰϤϡ`set cbrange` `set log cb` Ω ĴǽǤ顼ѥåΤ `colorbox` ɽޤ : set palette set palette { { gray | color } { gamma <gamma> } { rgbformulae <r>,<g>,<b> | defined { ( <gray1> <color1> {, <grayN> <colorN>}... ) } | file '<filename>' {datafile-modifiers} | functions <R>,<G>,<B> } { cubehelix {start <val>} {cycles <val>} {saturation <val>} } { model { RGB | HSV | CMY | YIQ | XYZ } } { positive | negative } { nops_allcF | ps_allcF } { maxcolors <maxcolors> } } show palette show palette palette <n> {{float | int}} show palette gradient show palette fit2rgbformulae show palette rgbformulae show colornames `set palette` (ʤץʤǤ) ǥեȤͤꤷ ʳξ硢ץǤդνͿ뤳ȤǤޤ `show palette` ϡߤΥѥåȤ°ɽޤ `show palette gradient` ϡѥåȤθ (gradient) (줬 ŬڤǤ) ɽޤ`show palette rgbformulae` ϡѤ ѤǤ롢ͤ饫顼ؤѴɽޤ `show colornames` ϡǧǤ뿧̾ɽޤ `show palette palette <n>` ϡ<n> ĤΥŪʿĥѥåȤΡ ߤΥѥåȤˤäƷ׻ RGB ͤȤȥѥåȤɽ򡢲 ̡ޤ `set print` ǻꤵ줿ե˽񤭽Фޤǥե ιɽϡɲäΥץ float ޤ int ˤäơ3 [0..1] μ¿ͤˤ뤫 [0..255] ͤˤ뤫򤽤줾Ǥ ˡ gnuplot Υ顼ѥåȤOctave Τ褦¾β ꥱϤȤǤޤΤ褦ʥƥȷ RGB ΰ ɽ˲ä`test palette` ޥɤˤꡢߤΥѥåȤ R,G,B ξ 褵뤳ȤǤޤ ʲΥץϡդ°ꤷޤ ΥѥåȤѤޤϡ`gray` `color` ˤʤޤ㤨С `pm3d` 顼̤Ǥϡϰ [min_z,max_z] ϰ [0:1] б Ƥơ̻ͳѷ 4 ĤγѤ z ɸʿͤ򤳤ϰϤб 뤳Ȥdzʬγ (gray) ޤͤϡ ĴοϿޤǤγͤȤľܻȤȤǤޤ顼οϿޤ ϡγͤ (R,G,B) ؤѴʤ [0:1] ([0:1],[0:1],[0:1]) ؤμȤޤ Ūˡ2 ΰۤʤѲǽǤ: 1 Ĥϳ饫顼 βŪʸ⤦ĤΥŪбɽ֤ˤΤǤ `palette rgbformulae` `palette functions` ŪʸѤǡ `palette defined` `palette file` ɽѤǤ`palette rgbformulae` postscript ϤΥ򾮤뤳ȤǤޤ ޥ `show palette fit2rgbformulae` ϡߤ `set palette` ˺ ɤб `set palette rgbformulae` 򸫤ĤФޤ rgbformulae ѥåȰʳФƤ̣ޤΥޥɤϼ ˡѥåȤ rgbformulae gnuplot ƱʪȤäƤ볰ץ ࡢ㤨 zimg ʤɤˤȤäͭѤǤ ( ^ <a href="http://zimg.sourceforge.net"> http://zimg.sourceforge.net ^ </a> ) `set palette gray` ϡĴΤߤΥѥåȤˤ `set palette rgbformulae`, `set palette defined`, `set palette file`, `set palette functions` ϥ顼ѥåȤˤޤѥåȤľ Υ顼ѥåȤء`set palette color` ǴñǤޤ `set palette gamma <gamma>` ˤ뼫ưŪʥϡΥѥå (`set palette gray`) ȡ`cubehelix` 顼ѥåȷ˹Ԥޤ gamma = 1 ξϡθٸۤޤʲ: `test palette` Ϸ¿ϡͭ¸ĤοݡȤƤޤ (㤨 gif 256 )ǥեȤ gnuplot ￧ƤλĤͭ ΰϡǥեȤǤ pm3d Ѥ¸ޤäơʣΥѥå Ѥ褦 multiplot ϡǽΥѥåȤ٤Ƥͭʿ ȤƻѤƤΤǡԤƤޤǤ礦Τ褦¤ϡʬ N `set palette maxcolors <N>` ȤȤǴ¤Ǥޤ ΥץϡN ĤΥŪʿϢ³ŪʥѥåȤֳ֤ʥ 󥰤򤷤ޤֳ֤ N ĤΥȤϡĤϢ ³ŪʥѥåȤ `set palette defined` ѤƤ RGB ֤ȤԤΤ˾ˤäȤͭѤʿ֤ǤȤϸ¤ʤ Ȥͳǡ֤ `model` ȤȤǡ`RGB`, `HSV`, `CMY`, `YIQ`, `XYZ` Τ줫ѹǤޤRGB ʳο֤Ǥ `set palette defined` ɽǿ̾ȤȡϤʿˤʤޤ Ƥ RGB Ѥ˽񤤤Ƥޤ줾ο֤ǡ㤨 `R` `H`, `C`, `Y`, `X` ΤȤ̣뤳ȤդƤ (`G`, `B` Ʊ) Ƥο֤ǡƤͤ [0,1] ¤Ƥޤ RGB ֡СĤCMY Ͽ忧 (Cyan) (Magenta) (Yellow) HSV Ͽ (Hue) (Saturation) (Value) 򤽤줾̣ޤ YIQ ƾȥ顼ƥ (the U.S. Commercial Color Television Broadcasting) λȤä顼ǥǡRGB Ͽ򸵤ˤ ƤޤƥӤФߴäƤޤXYZ CIE ('Commission Internationale de l'Eclairage'; ݾѰ) ǥ 3 ĤθɷͤǤ ǥΤܤˤĤƤϰʲ򻲾ȤƤ: ^ <a href="http://en.wikipedia.org/wiki/Color_space"> http://en.wikipedia.org/wiki/Color_space ^ </a> 4 rgbformulae ?commands set palette rgbformulae ?set palette rgbformulae ?palette rgbformulae ?rgbformulae =colors `rgbformulae` Ѥˤ 3 ĤŬڤʳƴؿФɬפޤ `rgbformulae <r>,<g>,<b>` ̤ƹԤޤȤȤ ƴؿΰ `show palette rgbformulae` Ǹ뤳ȤǤ ǥեȤ `7,5,15` ǡ¾ȤƤ `3,11,6`, `21,23,3`, `3,23,21` ʤɤޤ`3,-11,-6` Τ褦ͤϡդΥ顼 ̣ޤ (ʤ1-gray 򤽤δؿޤ) C ΰʲ: ץ `positive`, `negative`) RGB ο֤ǤϡĤɤƸޤ: 7,5,15 ... Ū pm3d (---) 3,11,6 ... -- 23,28,3 ... (--); ¾Ȥ߹碌ƤߤƤ 21,22,23 ... ٿ (---) 30,31,32 ... Υ顼ɽ (----) 33,13,10 ... (---) 34,35,36 ... AFM ٿ (---) HSV ֤ǤΥե륫顼ѥå: 3,2,2 ... ---忧--- `rgbformulae` Ȥ̾ǸƤФƤƤ⡢̤ꡢδؿϼº ˤ <H>,<S>,<V> ޤ <X>,<Y>,<Z>, ... Ȥäʬꤹ뤫 ⤷ʤȤȤդƤ ޤοȿžˤ `positive` `negative` ȤäƤ ^ <a name="positive"></a> ^ <a name="negative"></a> ¾οηϤФǤɤ rgbformulae νϡʲΥޥɤǸ 뤳ȤǤ뤳ȤФƤƤ show palette fit2rgbformulae 4 defined ?commands set palette defined ?set palette defined ?palette defined =colors RGB ؤб `palette defined` ȤȤǼưǤ : (gradient) RGB ͤͿ뤿Ѥޤ ۤϡ[0,1] γͤ [0,1]x[0,1]x[0,1] RGB ֤ؤΡʬŪ ʼǤ֤˻Ȥ볥ͤ RGB ͤȤꤹɬ פޤ: : set palette defined { ( <gray1> <color1> {, <grayN> <colorN>}... ) } <grayX> [0,1] ˳Ƥ٤ͤǡ<colorX> Ϥб RGB Ǥ顼ͤ 3 ˡǻꤹ뤳ȤǤޤ: <color> := { <r> <g> <b> | '<color-name>' | '#rrggbb' } ֡СĤбǶڤ줿 3 Ĥ (줾 [0,1] ) Ǥ줿̾ޤϰǤ줿 X λΤ 줫ǤۤǤϡ 3 ηͳȤ߹碌뤳 Ǥޤ֤Ȥ RGB ǤʤΤ򤵤줿翧̾ "red" äΤˤʤǤ礦ѤǤ뿧̾ `show colornames` Ǥ ΰ򸫤뤳ȤǤޤ <r> Ƚ񤤤Ƥ⡢HSV ֤ǤϤ <H> ʬCIE-XYZ ֤Ǥ <X> 򡢤Ȥä褦򤵤줿顼ǥ˰¸ự㤦Ȥ Ƥ <gray> ͤϼ¿ξ¤٤ɬפޤͤϼưŪ [0,1] Ѵޤ åĤθۤʤ `set palette defined` Ȥ硢RGB ֤ˤ餫ꤵ줿ե륹ڥȥ뿧ۤѤޤۤ ɽˤ `show palette gradient` ѤƤ : Υѥå (ΩʤŪ) ˤ: set palette model RGB set palette defined ( 0 "black", 1 "white" ) IJ֤Υѥå (Ƥ) ˤ: set palette defined ( 0 "blue", 1 "yellow", 2 "red" ) set palette defined ( 0 0 0 1, 1 1 1 0, 2 1 0 0 ) set palette defined ( 0 "#0000ff", 1 "#ffff00", 2 "#ff0000" ) Τ褦ʥѥåȤˤ: set palette defined ( 0 "blue", 3 "green", 6 "yellow", 10 "red" ) HSV ֤ǤΥե륫顼ڥȥ: set palette model HSV set palette defined ( 0 0 1 1, 1 1 1 1 ) set palette defined ( 0 0 1 0, 1 0 1 1, 6 0.8333 1 1, 7 0.8333 0 1) MATLAB ǻȤǥեȥѥåȤζ: set pal defined (1 '#00008f', 8 '#0000ff', 24 '#00ffff', \ 40 '#ffff00', 56 '#ff0000', 64 '#800000') ֳ֤ʾοΥѥåȤˤ: set palette model RGB maxcolors 4 set palette defined ( 0 "yellow", 1 "red" ) '̿' (餫ǤϤʤ gray = 1/3, 2/3 ķӤ): set palette model RGB set palette defined (0 "dark-green", 1 "green", \ 1 "yellow", 2 "dark-yellow", \ 2 "red", 3 "dark-red" ) 4 functions ?commands set palette functions ?set palette functions ?palette functions γƤ R(gray), G(gray), B(gray) 3 ĤδؿͿˤ `set palette functions <Rexpr>, <Gexpr>, <Bexpr>` ȤäƤ 3 Ĥδؿѿϡ[0,1] ͤѿ `gray` Ǥꡢ ͤ [0,1] ˼ɬפޤ <Rexpr> ϡHSV ֤򤵤ƤϡH ͤɽǤʤ ʤȤդƤ (¾μޤ¾ο֤ǤƱͤǤ) : ե륫顼ѥåȤˤ: set palette model HSV functions gray, 1, 1 ⿧ؤɤѥå: set palette model XYZ functions gray**0.35, gray**0.5, gray**0.8 Υѥå: gamma = 2.2 color(gray) = gray**(1./gamma) set palette model RGB functions color(gray), color(gray), color(gray) 4 cubehelix ?commands set palette cubehelix ?set palette cubehelix ?cubehelix ץ "cubehelix" Ϥѥå²ޤϡ Ĵͤ 0 1 äΤȼʤ̣θ٤ñĴäΤƱ ˡ (hue) ɸ࿧Ĥ˽äѲޤ D A Green (2011) http://arxiv.org/abs/1108.5083 `start` ϡĤ˱ä饸ñ̤Ƿꤷޤ `cycles` ϡѥåȤϰϤϤäƿĤ򲿲뤫ꤷޤ `saturation` () 礭ȡꤢ䤫ʿˤʤޤ1 礭 ٤ϡġ RGB ʬ򥯥åԥ󥰤뤳Ȥˤʤꡢ٤ñĴǤ ʤʤäƤޤޤ`set palette gamma` ѥåȤ˱ƶͿޤ ǥեͤϰʲ̤Ǥ set palette cubehelix start 0.5 cycles -1.5 saturation 1 set palette gamma 1.5 4 file ?commands set palette file ?set palette file ?palette file `set palette file` ϴŪ `set palette defined (<gradient>)` Ʊ ǡ <gradient> ǡե뤫ɤ߹ޤޤ4 (gray, R,G,B) ޤ 3 (R,G,B) Υǡ `using` ǡե뽤Ҥ ä򤵤ɬפޤ3 ξ硢ֹ椬 gray ͤȤƻ ޤ gray ϰϤϼưŪ [0,1] ˥Ѵޤ ե̾ΥǡեȤɤޤΤǡƤΥǡե ҤȤޤ 㤨 HSV ֤򤵤Ƥˤϡ`R` ϼºݤˤ `H` ؤ ȤդƤ ˤäơ<filename> `'-'` ξϡǡ饤ǰ ³Ϳ졢Ĥ `e` ΤߤιԤǤ줬λ뤳Ȥ̣ޤ (gradient) ɽˤ `show palette gradient` ѤƤ : RGB ΥѥåȤ [0,255] ϰϤɤ߹: set palette file 'some-palette' using ($1/255):($2/255):($3/255) Υ (---) ѥå: set palette model RGB file "-" 0 0 1 0 1 0 1 1 0 1 0 0 e ХʥѥåȥեƱͤ˥ݡȤƤޤʲ: `binary general`R,G,B double Υǡ 64 Ĥ 3 Ȥե palette.bin ˽Ϥɤ߹: set palette file "palette.bin" binary record=64 using 1:2:3 4 (gamma correction) ?commands set palette gamma-correction ?set palette gamma-correction ?palette gamma-correction ?gamma-correction ۿФ륬 `set palatte gamma <gamma>` ON ˤ ޤ<gamma> ΥǥեȤ 1.5 ǡ¿νϷŬڤ Ǥ ϡcubehelix 顼ѥåȷˤŬѤޤ¾ο ˤŬѤޤ󡣤Ūʿؿ˥Τ 񤷤ޤ : set palette model RGB set palette functions gray**0.64, gray**0.67, gray**0.70 ֤줿ۤȤäƥԤˤϡŬʥ顼֤ͤ ꤷޤ set palette defined ( 0 0 0 0, 1 1 1 1 ) 㤨аʲꤷƤ: set palette defined ( 0 0 0 0, 0.5 .73 .73 .73, 1 1 1 1 ) ޤϡ֤ "" ֤˽ʬɤŬ礹ޤǤɤ ֤õƤ 4 postscript ?commands set palette postscript ?set palette postscript postscript եΥ򾮤Ūǡε͡ ƤǤϤʤĤη׻줿 RGB εͤΥե˽񤫤 ʬؿ postscript ľܥɲ졢pm3d ľ إåȤƤޤ/g /cF 򻲾ȤƤ̾綠 򤽤˽񤯤Ȥϡ3 ĤμΤߤȤ˰̣ޤ multiplot 䤽¾ͳ postscript եΤѴؿ ľܼԽȻפΤޤ󡣤줬ǥեȤΥץ `nops_allcF` Ǥץ `ps_allcF` ȤȡƤθ postscript ե˽񤫤ޤĤΥǡۤʤ̤˰ۤ ѥåȤȤŪ postscript եԽ ˡΥץ˴ؿĤǤ礦εǽϡ`origin` `size` ꤷ `multiplot` ȤȤǼ¸ǤǤ礦 pm3d ϿޤʻҾ뤤Ϥۤܵ§ǡ postscript Ȥ褵줿硢gnuplot Ʊۤ awk ץ `pm3dCompress.awk` ȤȤǡ postscript եΥ 50% ̤ޤǾ뤳ȤǤޤΥեʸ˼ 硢뤤®Υץ󥿤礭ʥեʤɤˡεǽ ˴ؿĤȤǤ礦ˡϰʲ̤Ǥ: awk -f pm3dCompress.awk thefile.ps >smallerfile.ps pm3d ϿޤͳѷγʻҾǡ postscript եȤ褵 줿硢Ʊۤ awk ץ `pm3dConvertToImage.awk` ȤȤǡΥ򹹤˾뤳ȤǤޤˡ: awk -f pm3dConvertToImage.awk <thefile.ps >smallerfile.ps postscript ϤγĴ򥫥顼ءޤϤεա <maxcolors> ʤɤ򡢼ưѹ뤳ȤǤޤ 3 pointintervalbox ?commands set pointintervalbox ?set pointintervalbox ?pointintervalbox ° `pointinterval` 襹 `linespoints` ǻȤޤ pointinterval ͡㤨 -N Ȥȡε N ˽񤭡 ƳεθȢ (ºݤˤϱ) ʬطʿɤĤ֤ƾ ޤޥ `set pointintervalbox` Ϥξäΰ礭 (Ⱦ) 椷ޤϥǥեȤȾ (= pointsize) ФΨǤ 3 pointsize ?commands set pointsize ?commands show pointsize ?set pointsize ?show pointsize ?pointsize ޥ `set pointsize` ǻȤ礭ѹޤ : set pointsize <multiplier> show pointsize ǥեȤ 1.0 ܤǤǡϤǤϡ礭ݥȥ 䤹Ǥ礦 ĤФݥȥ `plot` ޥɤξǤѹǤޤ ܺ٤ϡʲ: `plot with` ݥȥϡɬƤνϷǥݡȤƤ櫓 ǤϤʤȤդƤ 3 polar ?commands set polar ?commands unset polar ?commands show polar ?set polar ?unset polar ?show polar ?polar ?nopolar ޥ `set polar` ϥդˡ xy ľɸϤ˺ɸϤ ѹޤ : set polar unset polar show polar ˺ɸ⡼ɤǤϡѿ (t) ϳ٤ɽޤt ΥǥեȤϰϤ [0:2*pi] Ǥñ̤Ȥ٤򤵤Ƥ [0:360] Ȥʤޤ (ʲ: `set angles`) ޥ `unset polar` ˡǥեȤ xy ľɸϤᤷ `set polar` ޥɤ `splot` ǤϥݡȤƤޤ`splot` ФƱͤεǽ˴ؤƤϡʲ: `set mapping` ˺ɸ⡼ɤǤ t οΰ̣ r=f(t) Ȥʤꡢt ϲžѤȤʤޤ trange ϴؿ () 椷rrange, xrange, yrange Ϥ줾 쥰դ x,y ϰϤ椹뤳ȤˤʤޤϰϤ rrange ϼưŪꤵ뤫ޤŪǤޤܺ٤˴ؤ Ƥϡʲ: `set rrange`, `set xrange` : set polar plot t*sin(t) set trange [-2*pi:2*pi] set rrange [0:3] plot t*sin(t) ǽ `plot` ϥǥեȤγ٤ϰϤ 0 2*pi Ȥޤư ȥդΥϼưŪ˿̤ޤ2 ܤ `plot` ϳ٤ ĥդΥ 3 ¤ޤ x,y Τ줾 [-3:3] ¤뤳Ȥˤʤޤ `set size square` Ȥ `gnuplot` ϥڥ (IJ) 1 ΤDZߤ (ʱߤǤʤ) ߤ˸褦ˤʤޤ ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/polar.html"> ˺ɸΥǥ (polar.dem) ^ </a> ^ <a href="http://www.gnuplot.info/demo/poldat.html"> ˺ɸǡ (poldat.dem) ^ </a> 3 print ?commands set print ?commands show print ?set print ?show print ޥ `set print` `print` ޥɤνϤե˥쥯 ޤ : set print set print "-" set print "<filename>" set print "<filename>" append set print "|<shell_command>" "<filename>" ʤϽϤ <STDERR> ˤʤޤ"-" Ȥ <filename> <STDOUT> ̣ޤ`append` ե饰ϥեɲ (append) ⡼ɤdzȤ̣ޤѥפ򥵥ݡȤץåȥ Ǥϡ<filename> "|" ǻϤޤäƤ顢<shell_command> ؤΥ פޤ 3 psdir ?commands set psdir ?commands show psdir ?set psdir ?show psdir ?psdir ޥ `set psdir <directory>` ϡpostscript Ϸ prologue.ps ʸ󥳡ѤΥեõΤ˻Ѥ븡ѥ椷ޤ λȤߤϡ̤˥˥ޥ prolog ե뷲ڤؤ Τ˻Ȥޤν֤ϰʲΤ褦ˤʤäƤޤ 1) `set psdir` ꤷϤΥǥ쥯ȥ 2) Ķѿ GNUPLOT_PS_DIR ǻꤷǥ쥯ȥ 3) Ȥ߹ޤ줿إåޤϥǥեȤΥƥǥ쥯ȥ 4) `set loadpath` ǻꤷǥ쥯ȥ 3 raxis ?commands set raxis ?raxis ޥ `set raxis` `unset raxis` ϡư¼ʻ x ʬ Υ褹뤫ɤڤؤޤߤ rrange κǾͤ 0 Ǥ (Ƽư̼ܤǤʤ) 硢դȼãʤȤ򼨤 ݤ˺ɸդ濴ޤϡդζƱ 褵ޤʲ: `polar`, `rrange`, `rtics`, `set grid` 3 rmargin ?commands set rmargin ?set rmargin ?rmargin ޥ `set rmargin` ϱ;Υ򥻥åȤޤ ܺ٤ϡʲ: `set margin` 3 rrange ?commands set rrange ?commands show rrange ?set rrange ?show rrange ?rrange ޥ `set rrange` ϶˺ɸ⡼ɤΥդưϰϤꤷ xrange yrange ξꤷƤޤޤξԤϡ [-(rmax-rmin) : +(rmax-rmin)] ˤʤޤθ xrange yrange ѹƤ (㤨г礹뤿) rrange ѹʤ Τǡǡ rrange ˴ؤƥåԥ󥰤줿ޤޤȤʤޤrmin ˴ؤ뼫ư̼ܤϾ rmin = 0 Ȥʤޤ 3 rtics ?commands set rtics ?commands show rtics ?set rtics ?show rtics ?rtics ޥ `set rtics` ϡư¼˱ä֤ޤϡ ɸ⡼ɤǤΤɽޤȤθФϸα¦  `mirror` ϡκ¦ˤޤ¾Υ ɤ˴ؤäˤĤƤϰʲ: `polar`, `set xtics` 3 samples ?commands set samples ?commands show samples ?set samples ?show samples ?samples ؿޤϥǡ֤˴ؤ륵ץ󥰿ϥޥ `set samples` ѹǤޤ : set samples <samples_1> {,<samples_2>} show samples ǥեȤǤϥץ 100 ꤵƤޤͤ䤹 Τ褬ޤ٤ʤޤΥѥ᡼ϥǡե ˤϲαƶͿޤ󤬡/Υץ󤬻ȤƤ Ϥθ¤ǤϤޤ2 ˤĤƤ `plot smooth` 3 ˴ؤƤϡʲ: `set dgrid3d` 2 Υ褬ԤʤȤ <samples_1> ͤΤߤطޤ ʤǶ褬ԤʤȤϡsamples ͤϸΩɾ 륵ץλˤʤޤ v-Ω <samples_1> ĤΥ u-Ω <samples_2> ĤΥץޤ<samples_1> Τ߻ꤹȡ<samples_2> ͤ <samples_1> Ʊͤꤵޤ ʲ⻲: `set isosamples` 3 size ?commands set size ?commands show size ?set size ?show size ?size ?aspect ratio ?set size square ?set size ratio ?ratio : set size {{no}square | ratio <r> | noratio} {<xscale>,<yscale>} show size <xscale> <yscale> ΤγΨǡΤȤϥդȥ ٥;ʬޤߤޤ פ: gnuplot ΰǤǤϡ`set size` ͤ򡢽Ϥΰ (Х) Υ椹ΤˤȤäƤϷ⤢ ٤ƤνϷä櫓ǤϤޤǤ version 4.6 ǤϡۤȤɤνϷʲΥ롼˽褦ˤ ޤ: `set term <terminal_type> size <XX>, <YY>` ϡϥեΥ ޤ "Х" Υ椷ޤѥ᡼ͭͤ ĤƤϡġνϷΥإפ򻲾ȤƤǥեȤǤϡ դϤΥХΤ褵ޤ `set size <XX>, <YY>` ϡ輫Τ򥭥ХΥФŪ ̤ޤ1 꾮ͤꤹȡդϥХΤ ᤺1 礭ͤꤹȡդΰʬΤߤХ Τ˹礦褦褵ޤ1 礭ͤꤹȡ Ǥ꤬뤫⤷ʤȤդƤ `ratio` ϡꤷ <xscale>, <yscale> ϰǡդΥ (IJ) <r> ˤޤ (<r> x ĹФ y Ĺ) <r> ͤˤȤΰ̣ϰäޤ<r>=-1 ΤȤx y ñ (Ĥޤ 1) ĹƱˤʤ褦ꤵޤ `set view equal xy` ƱǤʲ: `set view equal`<r>=-2 ΤȤy ñĹ x ñĹ 2 ܤꤵ <r> ͤ˴ؤưʲƱͤǤ `gnuplot` ꤵ줿ڥΥդȽ񤱤뤫򤵤 Ϸ˰¸ޤդΰϽϤλꤵ줿ʬˤȼ ޤꡢڥ椬 <r> Ǥ褦ʺĹȤʤޤ ( Ŭ;Ĥޤ) `square` `ratio 1` Ʊ̣Ǥ `noratio` `nosquare` Ϥ⥰դ򤽤νϷ (terminal) Ǥ ǥեȤΥڥᤷޤ<xscale> <yscale> ϤΥǥ Ȥ (1.0) ˤᤷޤ `ratio` `square` 3 Ǥϰ̣ޤ󤬡`set view map` Ѥ 3 2 ͱƤˤϱƶͿޤ ʲ⻲: `set view equal`ϡ3 x y ŪƱ ޤ : դߤΥХ褦礭ꤷޤ: set size 1,1 դ̾Ⱦʬ礭ˤޤ: set size square 0.5,0.5 դι⤵ 2 ܤˤޤ: set size ratio 2 3 style ?set style ?show style ?unset style ǥեȤ襹ϡ`set style data` `set style function` ǤޤؿǡΥǥեȤ襹ġѹ ˡˤĤƤϡʲ: `plot with`ΰΤϡʲ : `plotting styles` : set style function <style> set style data <style> show style function show style data ǤǤΥǥեȥǤޤ set style arrow <n> <arrowstyle> set style fill <fillstyle> set style histogram <histogram style options> set style line <n> <linestyle> `gnuplot` object 򥵥ݡȤ褦˥ѥ뤵ƤСʲ ץͭǤ: : set style rectangle <object options> <linestyle> <fillstyle> set style circle radius <size> set style ellipse size <size> units {xy|xx|yy} 4 set style arrow ?commands set style arrow ?commands unset style arrow ?commands show style arrow ?set style arrow ?unset style arrow ?show style arrow ?arrowstyle ƽϷηΥǥեȤνäƤơϥޥ `test` ǻȤǤޤ`set style arrow` ηη ǻȤȤˤƱ򷫤֤ƻꤷʤ Ƥ⥤ǥåǻȤǤ褦ˤޤ : set style arrow <index> default set style arrow <index> {nohead | head | heads} {size <length>,<angle>{,<backangle>}} {filled | empty | nofilled} {front | back} { {linestyle | ls <line_style>} | {linetype | lt <line_type>} {linewidth | lw <line_width} } unset style arrow show style arrow <index> ǡΥ (arrowstyle) ꤷޤ `default` ꤹȡƤ arrow ѥ᡼ϤΥǥե Ȥͤˤʤޤ <index> arrowstyle ¸ߤ硢¾Ƥ¸줿ޤޡͿ 줿ѥ᡼Τߤѹޤ<index> ¸ߤʤСꤵ ʤäͤϥǥեȤͤˤʤޤ `nohead` ꤹ뤳ȤǡΤʤ𡢤ʤʬ񤯤ȤǤ ޤξʬ̤ˡͿޤǥեȤǤ 1 Ĥ褬ĤƤޤ`heads` λʬξü褬ޤ 礭 `size <length>,<angle>` ޤ `size <length>,<angle>,<backangle>` Ǥޤ`<length>` γƻޤĹǡ`<angle>` λޤ𼴤ʤ (ñ̤) Ǥ `<length>` ñ̤ x ƱǤ `<length>` `first`, `second`, `graph`, `screen`, `character` Ĥ뤳Ȥѹ ޤܺ٤ϡʲ: `coordinates``<backangle>` ϡ`filled` ޤ `empty` Ȥ˻Ȥ줿Τ߸Ϥξ硢 `<backangle>` θʬ𼴤Ȥڤ (`<angle>` Ʊ; ñ̤) ˤʤޤϷ `fig` ϡ¤줿ڤѴؿä ơ 3 Ĥΰۤʤ򥵥ݡȤƤơ 2 ĤͤǷ ޤ: 70 ̤ξ硢ϤؤڤѤ110 ٤Ķ 硢ʬäѤδ֤γѤǤϡθľˤʤ ޤ `filled` ꤹȡɤĤ֤줿ޤ (`heads` Ȥ Ƥ)ɤĤ֤ϡ¿ѷɤĤ֤Ԥ褦ʽϷ ݡȤƤơΥꥹȤˤĤƤϡʲ: `pm3d`¾νϷ ǤĤޤɤĤ֤ޤ󡣤Ʊ (Ĥ ɤʤ) ϡ`empty` ꤷƤޤޤ`metafont`, `metapost`, `latex`, `tgif` Τ褦ˡ򤽤鼫ȤȼΥ롼 褦ʽϷǤϡɤĤ֤Ϥ󥵥 Ȥޤ ϥ桼饤󥹥ΥꥹȤ֤ȤǤޤ (ʲ: `set style line`)ѰդƤ `<line_type>` (ǥ ȤΥ饤󥹥ΥꥹȤֹ) `<linewidth>` (ǥե ܿ) ȤäƤ뤳ȤǤޤ 桼ѤΥ饤󥹥뤬򤵤줿硢° ( ) ϡñ¾ `set style arrow` ޥɤŬֹ `lt`, `lw` ʤɤꤷƤ⡢ѹϤǤʤȤդƲ `front` ꤹȡϥդΥǡξޤ`back` ꤵ줿 (ǥե) ϥդΥǡβޤ`front` ȤС̩ǡ𤬸ʤʤ뤳ȤɤȤǤޤ : 褬ʤܤˤ: set style arrow 1 nohead lw 2 set arrow arrowstyle 1 ¾ˤĤƤϡʲ: `set arrow` 4 boxplot ?commands set style boxplot ?commands unset style boxplot ?commands show style boxplot ?set style boxplot ?unset style boxplot ?show style boxplot ޥ `set style boxplot` ˤꡢ襹 `boxplot` Υ쥤ȤѹǤޤ : set style boxplot {range <r> | fraction <f>} {{no}outliers} {pointtype <p>} {candlesticks | financebars} {separation <x>} {labels off | auto | x | x2} {sorted | unsorted} boxplot Ȣϡ˥ǡʬ̤軰ʬ̤ͤϰϤˤ äƤޤȢĹȢҤθ³ϡ2 ĤΰۤʤˡǤ ޤǥեȤǤϡȢҤϡȢΤ줾ü顢ʬϰϤ 1.5 (ʤȢθ̩ʿľι⤵) ϰϤˤޤDZĹ ޤȢҤ줾ϡǡΤ° y ͤǽλ 褦ˡ᥸˸äڤΤƤޤʬϰϤ 1.5 ͤʤ⤢ޤ顢ȢҤϤܾ̾ϰϤû ⤢ޤΥǥեȤϰʲбޤ set style boxplot range 1.5 ⤦ĤˡȤơȢҤγ (fraction) ꤹ 뤳ȤǤޤξ硢ϰϤϥ᥸ͤ顢ǡλ ʬϤޤǡоΤ˱ĹޤΤȤ⡢ġȢҤϥ üޤǤ¤ޤǡ 95% Ϥˤ ʲΤ褦ˤޤ set style boxplot fraction 0.95 ȢҤϰϤγˤǤդϡoutliers ȸʤޤǥե ǤϤϤҤȤĤҤȤı (pointtype 7) ޤץ `nooutliers` Ϥ̵ˤޤ ǥեȤǤ boxplot candlesticks Ȼ褷ޤ financebars Ȼ褹뤿Υץ⤢ޤ boxplot using ꤬ 4 ܤľ硢ͤϤѿΥ Ūʥ٥ͤǤȸʤޤξ硢ΰѿΥ٥ο Ʊʣ boxplot ޤ boxplot ٤礦 ƱΤεΥϥǥեȤǤ 1.0 (x ñ̤) Ǥδֳ֤ϥץ `separation` ѹǤޤ ץ `labels` ϡ boxplot (줾ǡΤʬ б) ΤɤˡɤΤ褦˥٥Ĥ뤫ꤷޤǥե ȤǤϰҤͤʿ (x x2 Τ줫 plot ǻȤƤ) ٥˽Ϥޤϥץ `labels auto` бޤ ץ `labels x`, `labels x2` ˤäơŪ x x2 ˤ 줾Ϥ뤳ȤǤޤ`labels off` ǥդˤ뤳ȤǤ ޤ ǥեȤǤϡѿΰۤʤ٥б boxplot 󲽤Ϥ ǡեˤΥ٥뤬֤褷ޤεưϥ `unsorted` бޤץ `sorted` Ѥȡ ޤ٥򼭽˥Ȥν boxplot 褷ޤ ץ `separation`, `labels`, `sorted`, `unsorted` ϡplot 4 ܤλͿΤ߸Ϥޤ ʲ: `boxplot`, `candlesticks`, `financebars` 4 set style data ?commands set style data ?commands show style data ?set style data ?show style data ?data style ޥ `set style data` ϥǡФǥեȤ襹 ѹޤ : set style data <plotting-style> show style data ܤˤĤƤϡʲ: `plotting styles`ܤꤷʤä 硢ΰɽޤ`show style data` ϸߤΥǥեȤΥ 襹ɽޤ 4 set style fill ?commands set style fill ?commands show style fill ?set style fill ?show style fill ?fillstyle ޥ `set style fill` ϡboxes, histograms, candlesticks, filledcurves ǤˤǤΥǥեȤΥ˻ ޤΥǥեȤϡġɤ٤ (fillstyle) ꤹ뤳ȤǾ񤭤Ǥޤʲ: `set style rectangle` : set style fill {empty | {transparent} solid {<density>} | {transparent} pattern {<n>}} {border {lt} {lc <colorspec>} | noborder} ǥեȤɤĤ֤ (fillstyle) `empty` Ǥ ץ `solid` ϡϷݡȤƤ硢οǤΥ٥ ɤԤޤѥ᡼ <density> ɤĤ֤ζɽƤ <density> 0.0 ʤȢ϶<density> 1.0 ʤȢϤϸߤ ȴƱɤޤϷˤäƤϡζϢ³Ū ѲΤ⤢ޤ¾ΤΤϡʬŪɤĤ֤δ ĤΥ٥Ƥ˲᤮ޤ󡣥ѥ᡼ <density> Ϳ ʤäϥǥեȤ 1 ˤʤޤ ץ `pattern` ϡϥɥ饤ФˤäͿѥǤ Ĥ֤ԤޤѤǤɤĤ֤ѥμȿϽϥɥ饤 Ф˰¸ޤɤĤ֤ boxes ʣΥǡ褹 礽ΥѥϡʣζˤμƱͭ͡ ѥ򡢥ѥ <n> ϤƼŪѤޤ ץ `empty` ϡȢɤĤ֤ޤ󤬡줬ǥեȤǤ ǥեȤ `border` ϡߤμμȢζޤ `border <colorspec>` Ƕοѹ뤳ȤǤޤ`noborder` ʤ褦ˤޤ 5 set style fill transparent ?commands set style fill transparent ?set style fill transparent ?fillstyle transparent ?transparent ĤνϷϡɤĤ֤ΰ `transparent` (Ʃ) ° ݡȤƤޤtransparent solid ΰɤĤ֤Ǥϡ`density` (̩) ѥ᡼ϥեͤȤƻѤޤĤޤꡢ̩ 0 ϴ Ʃ̩ 1 ϴƩ̣ޤtransparent pattern Ĥ֤ǤϡѥطʤƩƩΤ줫Ǥ @start table - ƩΥɥ饤ФΥݡ Ϸ solid pattern pm3d -------------------------------- gif no yes no jpeg yes no yes pdf yes yes yes png TrueColor index yes post no yes no svg yes no yes win yes yes yes wxt yes yes yes x11 no yes no #\begin{tabular}{|cccl|} \hline #Ϸ & solid & pattern & pm3d \\ \hline #gif & no & yes & no \\ #jpeg & yes & no & yes \\ #pdf & yes & yes & yes \\ #png &TrueColor& index & yes \\ #post & no & yes & no \\ #svg & yes & no & yes \\ #win & yes & yes & yes \\ #wxt & yes & yes & yes \\ #x11 & no & yes & no \\ %c l . %Ϸ@solid@pattern@pm3d %_ %gif@no@yes@no %jpeg@yes@no@yes %pdf@yes@yes@yes %png@TrueColor@index@yes %post@no@yes@no %svg@yes@yes@yes %win@yes@yes@yes %wxt@yes@yes@yes %x11@no@yes@no %_ @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="center"> ^ <col align="center"> ^ <col align="center"> ^ <col align="center"> ^</colgroup> ^<thead> ^<tr> <th>Ϸ</th> <th>solid</th> <th>pattern</th> <th>pm3d</th></tr> ^</thead> ^<tbody> ^<tr> <td>gif</td> <td>no</td> <td>yes</td> <td>no</td></tr> ^<tr> <td>jpeg</td> <td>yes</td> <td>no</td> <td>yes</td></tr> ^<tr> <td>pdf</td> <td>yes</td> <td>yes</td> <td>yes</td></tr> ^<tr> <td>png</td> <td>TrueColor</td> <td>index</td> <td>yes</td></tr> ^<tr> <td>post</td> <td>no</td> <td>yes</td> <td>no</td></tr> ^<tr> <td>svg</td> <td>yes</td> <td>yes</td> <td>yes</td></tr> ^<tr> <td>win</td> <td>yes</td> <td>yes</td> <td>yes</td></tr> ^<tr> <td>wxt</td> <td>yes</td> <td>yes</td> <td>yes</td></tr> ^<tr> <td>x11</td> <td>no</td> <td>yes</td> <td>no</td></tr> ^</tbody> ^</table> ƩɤĤ֤ΰޤ॰դ򸫤äꤹΤˤϡ̤¤ ꤦ뤳ȤդƤ㤨Сpng ϷǤϡ"truecolor" ץ󤬻ꤵƤˤΤƩɤ٤ѤǤޤ PDF եˤƩΰ褬ҤƤƤ⡢PDF ɽեȤ äƤϤɽǤʤȤ⤢ꤨޤºݤ PostScript 󥿤ǤϤʤΤˡGhostscript/gv ǤϥѥɤĤ֤ΰ ɽǤޤ 4 set style function ?commands set style function ?commands show style function ?set style function ?show style function ޥ `set style function` ϴؿФǥեȤ襹 (lines, points, filledcurves ʤ) ѹޤʲ: `plotting styles` : set style function <plotting-style> show style function 4 set style increment ?commands set style increment ?commands show style increment ?set style increment ?show style increment ``: Υޥɤ侩Ǥ˿ޥ `set linetype` ѤƤϡѤΤΰŪŬ򸡺 ǤϤʤKΤޤʲ: `set linetype` : set style increment {default|userstyles} show style increment ǥեȤǤϡƱվμϡߤνϷǥǥեȤ ƤμΤΤǹԤޤ `set style increment user` 򤹤ȡǥեȤǤ ʤ桼饤󥹥ֹΤΤѤ뤳ȤǤޤ : set style line 1 lw 2 lc rgb "gold" set style line 2 lw 2 lc rgb "purple" set style line 4 lw 1 lc rgb "sea-green" set style increment user plot f1(x), f2(x), f3(x), f4(x) ϡؿ f1, f2, f4 Ͽ˥桼줿饤󥹥褵 ޤ桼饤󥹥뤬Ĥʤϡˤ ǥեȤ郎Ѥޤ㤨СǤϡf3(x) ϥǥ Ȥ 3 褵ޤ 4 set style line ?commands set style line ?commands unset style line ?commands show style line ?set style line ?unset style line ?show style line ?linestyle ?linewidth =linewidth =interval =linespoints =pointinterval ֤ˤϤΤΥǥեȤν礬ꡢϥޥ `test` Ǹ뤳ȤǤޤ`set style line` 礭򡢸ġθƤӽФǡξꤹˡñ ʤֹǻȤǤ褦ˤ餫ΤǤ : set style line <index> default set style line <index> {{linetype | lt} <line_type> | <colorspec>} {{linecolor | lc} <colorspec>} {{linewidth | lw} <line_width>} {{pointtype | pt} <point_type>} {{pointsize | ps} <point_size>} {{pointinterval | pi} <interval>} {palette} unset style line show style line `default` ϡƤΥ饤󥹥ѥ᡼򤽤Ʊ index (linetype) ꤷޤ <index> linestyle ¸ߤ硢¾Ƥ¸줿ޤޡͿ 줿ѥ᡼Τߤѹޤ<index> ¸ߤʤСꤵ ʤäͤϥǥեȤͤˤʤޤ Τ褦ˤĤ饤󥹥ϡǥեȤη (, ) ̤ʤΤ֤뤳ȤϤʤΤǡ饤󥹥롢ǥեȤη ɤȤޤ饤󥹥ϰŪʤΤǡޥ `reset` ¹ԤФĤǤ⤽ϾäޤKΤϡ ʲ: `set linetype` ϡ index ͤǥեȤȤޤ index ͤФ ºݤεηϡϷˤäưۤʤޤ 礭ϡߤνϷΥǥեȤ礭Ф Ǥ (Ǥ <point_size> ϡޥ `set pointsize` Ϳ ˤϱƶʤȤդƤ) `pointinterval` ϡ `linespoints` ǥδ ֤椷ޤǥեȤ 0 Ǥ (٤Ƥ褵)㤨С `set style line N pi 3` ϡ郎 N礭ϸߤνϷ ΥǥեȤǡ`with linespoints` ǤǤ 3 褵 褦ʥ饤󥹥ޤδֳ֤ͤˤȡϴ ֤ͤξƱǤεβˤʤ񤫤ʤ褦ˤ (ϷˤäƤ) Ƥν֤ `linewidth` `pointsize` 򥵥ݡȤƤ櫓Ǥ ޤ󡣤⤷ݡȤƤʤϤΥץ̵뤵 ޤ Ϸ˰¸ʤ `linecolor <colorspec>` `linetype <colorspec>` (ά `lc`, `lt`) Τ줫ȤäƳƤ뤳ȤǤޤ 硢 RGB 3 ȤͿ뤫gnuplot λĥѥåȤο̾ ΥѥåȤФ뾮ꡢޤ cbrange ؤθߤΥѥåȤб Ф͡Τ줫Ϳޤʲ: `colors`, `colorspec`, `set palette`, `colornames`, `cbrange` `set style line <n> linetype <lt>` ϡϷ˰¸/Υ ȿξ򥻥åȤޤ`set style line <n> linecolor <colorspec>` `set style line <n> linetype <colorspec>` ϡߤ/Υѥ ѹ˿ꤷޤ 3 ⡼(`splot` ޥ) Ǥϡ"linetype palette z" ξάȤ ̤˥ `palette` ȤȤƤޤοͤϡ splot z ɸ (⤵) б뤤϶̤˱äƳ餫 ޤ : ʲǤϡֹ 1, 2, 3 ФǥեȤ򤽤줾֡СĤȤ ǥեȤη򤽤줾ѷǤȤޤΤȤ ʲΥޥ set style line 1 lt 2 lw 2 pt 3 ps 0.5 ϡ饤󥹥ȤơФǥǥեȤ 2 ܤ ѷȾʬޤޤʲΥޥ set style function lines plot f(x) lt 3, g(x) ls 1 ϡf(x) ϥǥեȤǡg(x) ϥ桼Ф褷 Ʊͤˡޥ set style function linespoints plot p(x) lt 1 pt 3, q(x) ls 1 ϡp(x) ֤ǷФ줿ǥեȤλѷǡq(x) ФǷФ ѷ褷ޤ splot sin(sqrt(x*x+y*y))/sqrt(x*x+y*y) w l pal ϡ`palette` ˽äƳ餫ʿȤäƶ̤褷ޤϤ ݡȤϷǤȤưʤȤդƤ ʲ⻲: `set palette`, `set pm3d` set style line 10 linetype 1 linecolor rgb "cyan" ϡRGB 顼򥵥ݡȤ뤹٤ƤνϷǡ饤󥹥 10 ˼ ο忧Ƥޤ 4 set style circle ?commands set style circle ?commands unset style circle ?commands show style circle ?set style circle ?unset style circle ?show style circle : set style circle {radius {graph|screen} <R>} Υޥɤϡ襹 "with circles" ǻȤǥեȤȾ ꤷޤϡǡ 2 Υǡ (x,y) Ϳʤä 硢뤤ϴؿΤȤŬѤޤǥեȤϡʲΤ褦 ʤäƤޤ: "set style circle radius graph 0.02" 4 set style rectangle ?commands set style rectangle ?commands unset style rectangle ?commands show style rectangle ?set style rectangle ?unset style rectangle ?show style rectangle ޥ `set object` 줿Ĺˤ̡ΥǤ ̤Υ򤷤ʤСΥ֥Ȥϥޥ `set style rectangle` ˤǥեȤѤޤ : set style rectangle {front|back} {lw|linewidth <lw>} {fillcolor <colorspec>} {fs <fillstyle>} ʲ: `colorspec`, `fillstyle``fillcolor` `fc` ȾάǤޤ : set style rectangle back fc rgb "white" fs solid 1.0 border lt -1 set style rectangle fc linsestyle 3 fs pattern 2 noborder ǥեȤϡطʿǤɤ٤ǡϹˤʤäƤޤ 4 set style ellipse ?commands set style ellipse ?commands show style ellipse ?set style ellipse ?unset style ellipse ?show style ellipse : set style ellipse {units xx|xy|yy} {size {graph|screen} <a>, {{graph|screen} <b>}} {angle <angle>} Υޥɤϡʱߤľ¤Ʊñ̤Ƿ׻뤫ɤ椷ޤ ǥեȤ `xy` ǡʱߤμ缴 ( 1 ) ľ¤ x (ޤ x2) Ʊñ̤Ƿ׻ ( 2 ) ľ¤ y (ޤ y2) ñ̤ ׻ޤΥ⡼ɤǤϡʱߤξϡ輴Υڥ˰ ¸ޤ`xx` `yy` ꤹС٤ƤʱߤξƱñ̤Ƿ ޤϡ褵ʱߤξϡžƤޤޤ ʿľΰν̼ܤѹˤʤʤ뤳Ȥ ̣ޤ ϡobject Ȥ줿ʱߡޥ `plot` ˤä褵 ʱߤξ˱ƶͿŪǤ`units` ͤϡ衢 ֥Ǥޤ ʱߤΥǥեȤΥ⡢ `size` Ǥޤǥե ȤΥϡ2 ΤߤΥǡޤϴؿ plot ̿ŬѤޤ 2 Ĥͤϡʱߤ (2 Ĥμ缴2 Ĥ˸礦) 缴ľ¤ ľ¤ȤƻѤޤ ǥեȤϡ"set style ellipse size graph 0.05,0.03" Ǥ ǸˤʤޤǥեȤθ򥭡 `angle` Ǥ ϡʱߤμ缴ȥդ x ȤʤѤǡñ̤٤Ϳ ɬפޤ ʱߤ object ˴ؤƤϰʲ⻲: `set object ellipse`2 襹˴ؤƤϰʲ: `ellipses` 3 surface ?commands set surface ?commands unset surface ?commands show surface ?set surface ?unset surface ?show surface ?surface ?nosurface ޥ `set surface` `splot` ˤ̤ɽ椷ޤ : set surface unset surface show surface ̤ϥǡؿФơ`with` ǻꤵ줿롢뤤¾ Ŭڤʥǽ񤫤ޤ `unset surface` ˤ `splot` ϡؿǡեФ ʤʤޤ̤ˤؿ䤢ǡեζ ̵ˤƤ¾ͭˤˤϡޥ `splot` Υ  `nosurface` ѤƤξǤ `set contour` ˤ̤Ͻ񤫤ޤ`unset surface; set contour base` ȤϡʻҤɽݤǤʲ⻲: `set contour` 3 table ?commands set table ?set table ?table `table` ⡼ɤͭʾ硢`plot` `splot` ޥɤϡߤνϷ Фºݤؤ X Y {Z} R ͤʣ󤫤ʤ ɽΥϤԤʤޤʸ R ϡ 3 ΤΰĤ : ͭϰˤ "i"ϰϳξ "o"̤ (undefined) ξ "u" Ǥǡν񼰤ϡΥ٥ν (ʲ: `set format`) ˤäƷޤꡢϰĤζǶڤޤ ϡ㤨 `plot` 褹ʤɡѤ ¸ȤǤˤĤƤϡʲ: `set contour` ˡϡ֤줿ǡ¸ΤˤȤȤǤޤ (ʲ : `set samples`, `set dgrid3d`) : set table {"outfile"} plot <whatever> unset table ɽνϤϡꤵ줿ե˽񤭽Фޤ꤬ʤ `set output` ǻꤵƤͤ˽ϤޤߤνϷɸ Ū᤹ˤϡ`unset table` Ū˹Ԥʤɬפޤ 3 terminal ?commands set terminal ?commands show terminal ?set terminal ?set term ?show terminal ?show term ?set terminal push ?set term push ?terminal push ?term push ?push ?set terminal pop ?set term pop ?terminal pop ?term pop ?pop `gnuplot` Ͽ¿Υեå򥵥ݡȤƤޤޥ `set terminal` Ȥä `gnuplot` νϤоݤȤʤμ ե롢ޤϽ֤˥쥯Ȥˤ `set output` ȤäƤ : set terminal {<terminal-type> | push | pop} show terminal <terminal-type> ά `gnuplot` ѲǽʽϷΰ ɽޤ<terminal-type> λˤû̷Ȥޤ `set terminal` `set output` ξȤ硢`set terminal` ǽ ˤǤϡOS ˤäƤϡ줬ɬפȤե饰 åȤϷ뤫Ǥ ĤνϷϤɲåץޤ `<term>` Фľ `set term <term> <options>` ǻѤ줿 ץϵ졢θ `set term <term>` ꥻåȤ뤳 ȤϤޤ󡣤㤨аͭѤǤĤΰۤʤϷ ؤ硢Υץ򷫤֤ɬפϤޤ ޥ `set term push` ϡߤνϷȤ `set term pop` ˤäޤǵƤޤ `save term`, `load term` ۤƱǤե륷ƥؤΥϹԤ鷺ä㤨Ф ϡ˥ץåȥۡ˰¸ʤǽϷŪ˻Ȥ ޤgnuplot εư塢ǥեȡޤ `startup` ե˽񤫤 ϷưŪ˵ (push) ޤäơŪ˽Ϸ 뤳ȤʤǤդΥץåȥۡǥǥեȤνϷ `set term pop` ˤä롢ȤưԤץȤ 򼺤鷺˽񤯤Ȥޤ ܺ٤ϡʲ: `complete list of terminals` 3 termoption ?commands set termoption ?set termoption ?termoption ޥ `set termoption` ϡ߻ѤƤϷο񤤤򡢿 `set terminal` ޥɤȯԤʤѹ뤳Ȥǽˤޤ ޥɰĤФưĤΥץΤߤѹǤޤƤˡ ѹǤ륪ץϤ¿Ϥޤ󡣸߻Ѳǽʥץ ϰʲΤΤΤߤǤ set termoption {no}enhanced set termoption font "<fontname>{,<fontsize>}" set termoption fontscale <scale> set termoption {solid|dashed} set termoption {linewidth <lw>}{lw <lw>} 3 tics ?commands set tics ?commands unset tics ?commands show tics ?set tics ?unset tics ?show tics ?tics Ƥμ (ФΤĤ) ٤˹ԤȤϡޥ `set tics` DzǽǤ Ƥμ (ФΤĤ) ޥ `set tics` ǰ٤ Ǥޤ `unset tics` Ǿä`set tics` (ǥեȤξ ֤) ꤬Ĥޤñ켴ԤʤƱͤΥޥ ޤ (`tics` ˼̾Ĥ) : set tics {axis | border} {{no}mirror} {in | out} {scale {default | <major> {,<minor>}}} {{no}rotate {by <ang>}} {offset <offset> | nooffset} {left | right | center | autojustify} { format "formatstring" } { font "name{,<size>}" } { textcolor <colorspec> } set tics {front | back} unset tics show tics κǽν񼰤ΤȤ˽񤤤ץϡġμˤ⡢ޤϤ٤ μ (x, y, z, x2, y2, cb) ˤŬѤǤޤ tics `front` ޤ `back` ϡ2D (splot Բ) ˤΤ ٤Ƥμ 1 ŬѤޤϡǤŤʤä Ǥ̤˽Ф֤椷ޤ `axis` `border` `gnuplot` (ιKȤȤθФ) 򡢤줾켴ˤĤΤˤĤΤؼޤˤ Ƥᤤ硢`axis` ѤȶɽƤ (ʲ: `set border`) θФʸ򶭳γ˽ФƤޤǤ礦 缫ưŪʥ쥤ȥ르ꥺˤ;褯ʤΤȤ äƤޤޤ `mirror` `gnuplot` ȿ¦ζƱ֤ˡФΤʤ Ϥ褦ؼޤ`nomirror` ϡʤƤ̤Τ Ԥʤޤ `in` `out` ιߤ¦¦ڤѤޤ ιߤΥ `scale` ĴǤޤ<minor> λ꤬ά 줿ϡ 0.5*<major> ˤʤޤǥեȤΥϡ ꤬ 1.0 Ǿ꤬ 0.5 ǡ `scale default` ǸƤӤޤ `rotate` ϡʸ 90 ٲžƽϤ褦Ȥޤϡʸ βž򥵥ݡȤƤϥɥ饤 (terminal) Ǥϼ¹Ԥޤ `norotate` Ϥ򥭥󥻥뤷ޤ`rotate by <ang>` ϳ <ang> žԤʤޤϤĤνϷ (terminal) ǥݡȤ Ƥޤ x y ΥǥեȤ `border mirror norotate` ǡx2, y2 `border nomirror norotate` ǥեȤǤz ΥǥեȤ `nomirror` Ǥ <offset> x,y ޤ x,y,z ηǤ˺ɸϤ򤷤ơ `first`, `second`, `graph`, `screen`, `character` Τ줫 Ĥ뤳ȤǤޤ<offset> ϡθФʸΥǥե ΰ֤Τ餷֤ǡΥǥեȤñ̷Ϥ `character` Ǥ ܺ٤ϡʲ: `coordinates``nooffset` offset OFF ˤޤ ǥեȤǤϸФ٥ϡ̤褦ˡȲžѤ˰¸ ֤˼ưŪ˰ֹ碌ޤ줬ˤʤСŪ `left`, `right`, `center` Υɤˤֹ碌ѹǤޤ `autojustify` ǥǥեȤεưޤ ץʤ `set tics` ϡιߤ¦ˤޤ¾ ƤΥץľͤݻޤ (٥ΤĤ) ¾˴ؤƤϡʲ: `set xtics` ˴ؤƤϡʲ: `set mxtics`Υޥɤϡ ƼˤΰĤμ󶡤ޤ 3 ticslevel ?commands set ticslevel ?commands show ticslevel ?set ticslevel ?show ticslevel ?ticslevel ߤϿ侩Ƥޤ󡣰ʲ: `set xyplane` 3 ticscale ?commands set ticscale ?commands show ticscale ?set ticscale ?show ticscale ?ticscale ޥ `set ticscale` ϸߤϿ侩Ƥޤ `set tics scale` ȤäƤ 3 timestamp ?commands set timestamp ?commands unset timestamp ?commands show timestamp ?set timestamp ?unset timestamp ?show timestamp ?timestamp ?notimestamp ޥ `set timestamp` դȻ򺸤;ɽޤ : set timestamp {"<format>"} {top|bottom} {{no}rotate} {offset <xoff>{,<yoff>}} {font "<fontspec>"} unset timestamp show timestamp ʸ (format) Ȥäơ񤫤դȻν񼰤򤹤뤳Ȥ ǤޤǥեȤ asctime() Ѥ "%a %b %d %H:%M:%S %Y" (̾ʬá4 )`top` `bottom` Ȥ դ򺸤;ξ֤뤫֤뤫Ǥޤ (ǥե Ȥϲ)`rotate` ϡ⤷ϷݡȤƤФǤդ ľʸˤޤ <xoff><yoff> Ϥ (offset) ̣ ˤäƤŬڤʰֹ碌Ԥޤ<font> դ񤫤 Ȥꤷޤ `timestamp` ˾ά̾ `time` ȤäƤ⹽ޤ : set timestamp "%d/%m/%y %H:%M" offset 80,-2 font "Helvetica" դνʸ˴ؤܤˤĤƤϡʲ: `set timefmt` 3 timefmt ?commands set timefmt ?commands show timefmt ?set timefmt ?show timefmt ?timefmt ΥޥɤϡǡηˤʤäƤˡλǡ ŬѤޤϥޥ `set xdata time` ͿƤʤȰ ̣ޤ : set timefmt "<format string>" show timefmt ʸ (<format string>) `gnuplot` ǡǡե ɤΤ褦ɤफؼޤͭʽ񼰤ϰʲ̤Ǥ: @start table - ޤ÷ƥȷ %d , 1--31 %m , 1--12 %y ǯ, 0--99 %Y ǯ, 4-digit %j 1 ǯβ, 1--365 %H , 0--24 %M ʬ, 0--60 %s Unix epoch (1970-01-01, 00:00 UTC) ÿ %S (ϤǤ 0--60 ϤǤϼ¿) %b ̾ (Ѹ) 3 ʸά %B ̾ (Ѹ) #\begin{tabular}{|cl|} \hline #\multicolumn{2}{|c|}{ǡ񼰻}\\ #\hline \hline # & \\ \hline #\verb@%d@ & , 1--31 \\ #\verb@%m@ & , 1--12 \\ #\verb@%y@ & ǯ, 0--99 \\ #\verb@%Y@ & ǯ, 4 \\ #\verb@%j@ & 1 ǯβ, 1--365 \\ #\verb@%H@ & , 0--24 \\ #\verb@%M@ & ʬ, 0--60 \\ #\verb@%s@ & Unix epoch (1970-01-01, 00:00 UTC) ÿ\\ #\verb@%S@ & (ϤǤ 0--60 ϤǤϼ¿)\\ #\verb@%b@ & ̾ (Ѹ) 3 ʸά \\ #\verb@%B@ & ̾ (Ѹ) \\ %c l . %@ %_ %%d@, 1--31 %%m@, 1--12 %%y@ǯ, 0--99 %%Y@ǯ, 4 %%j@1 ǯβ, 1--365 %%H@, 0--24 %%M@ʬ, 0--60 %%s@Unix epoch (1970-01-01, 00:00 UTC) ÿ %%S@ (ϤǤ 0--60 ϤǤϼ¿) %%b@̾ (Ѹ) 3 ʸά %%B@̾ (Ѹ) %_ @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th></th> <th></th></tr> ^</thead> ^<tbody> ^<tr> <td><tt>%d</tt></td> <td>, 1–31</td></tr> ^<tr> <td><tt>%m</tt></td> <td>, 1–12</td></tr> ^<tr> <td><tt>%y</tt></td> <td>ǯ, 0–99</td></tr> ^<tr> <td><tt>%Y</tt></td> <td>ǯ, 4-digit</td></tr> ^<tr> <td><tt>%j</tt></td> <td>1 ǯβ, 1–365</td></tr> ^<tr> <td><tt>%H</tt></td> <td>, 0–24</td></tr> ^<tr> <td><tt>%M</tt></td> <td>ʬ, 0–60</td></tr> ^<tr> <td><tt>%s</tt></td> <td>Unix epoch (1970-01-01 00:00 UTC) ÿ</td></tr> ^<tr> <td><tt>%S</tt></td> <td> (ϤǤ 0–60 ϤǤϼ¿)</td></tr> ^<tr> <td><tt>%b</tt></td> <td>̾ (Ѹ) 3 ʸά</td></tr> ^<tr> <td><tt>%B</tt></td> <td>̾ (Ѹ)</td></tr> ^</tbody> ^</table> ǤդʸʸǻѤǤޤ§˽äƤɬפޤ \t () ǧޤХåå + 8 ʿ (\nnn) Ϥ줬 ʸѴޤǤʬΥʸʤ硢%d, %m, %y, %H, %M, %S Ϥ줾 2 οɤ߹ߤޤ%S Ǥɤ߹ߤǾ ΥեɤˤĤƤϡξĤο򾮿û Ȳᤷޤ%Y 4 塢%j 3 οɤ߹ߤޤ%b 3 ʸ %B ɬפʬʸ׵ᤷޤ (ڡ) ΰϤ㤤ޤʸ 1 Ĥζϡ 0 ġ뤤 1 İʾζʸɽޤʤ "%H %M" "1220" "12 20" "12 20" Ʊ褦ɤߤޤ ǡʸνޤꤽ줾ϡ`using n:n` ΰİĤ ȥȤޤä `11:11 25/12/76 21.0` 3 Υǡǧ ޤ򤱤뤿ˡǡޤޤ `gnuplot` ϡ ʤ `using` ꤬ʤΤǤȲꤷޤ եǡ̾ޤǤ硢ʸǤӽ Фޤ󤬡"%a", "%A", "%b", "%B" Ǥɽ뤳ȤϤ ޤ`gnuplot` Ͽͤޤ顢ڤ ǡνϤ¾Υץξܺ٤˴ؤƤϡʲ: `set format` 2 %y ɤ硢69-99 2000 ǯ̤00-68 2000 ǯʸ ȸʤޤ: ϡUNIX98 λͤ˹碌ΤǤδ Ϥǰ㤤Τǡ2 ܼͤŪˤޤǤ ¾ξˤĤƤϡʲ⻲: `set xdata`, `time/date` : set timefmt "%d/%m/%Y\t%H:%M" ϡ`gnuplot` դȻ֤֤ʬΥƤ뤳Ȥ򶵤ޤ ( ʤΥǡ衼Ƥ֤äΤɤʣΥ ѴƤޤ ? ʸϥե˼ºݤˤʪȰ פƤʤФʤޤ) ʲ⻲ ^ <a href="http://www.gnuplot.info/demo/timedat.html"> ǡ (time data) ǥ⡣ ^ </a> 3 title ?commands set title ?commands show title ?set title ?show title ?title ޥ `set title` ϡξο˽񤫤西ȥ ޤ`set title` `set label` üʤΡȤߤʤޤ : set title {"<title-text>"} {offset <offset>} {font "<font>{,<size>}"} {{textcolor | tc} {<colorspec> | default}} {{no}enhanced} show title <offset> x,y ޤ x,y,z ηǻꤷϡȥͿ 줿ͤưޤ˺ɸϤ򤷤ơ `first`, `second`, `graph`, `screen`, `character` Τ줫Ĥ뤳ȤǤ ޤܺ٤ϡʲ: `coordinates`ǥեȤǤ `character` ɸ ϤȤޤ㤨С"`set title offset 0,-1`" ϥȥ y ΰ֤Τѹ礶äѤ˸ä 1 ʸʬι⤵ȥ򲼤˲ ޤ1 ʸ礭ϡեȤȽϷξ˰¸ޤ <font> ϥȥ뤬񤫤եȤꤹΤ˻Ȥޤ<size> ñ̤ϡɤνϷ (terminal) ȤäƤ뤫ˤäѤޤ `textcolor <colorspec>` ϡʸοѹޤ<colorspec> ϡ rgb ޤϥѥåȤؤγΤ줫Ǥޤʲ: `colorspec`, `palette` `noenhanced` ϡĥʸ (enhanced text) ⡼ɤͭˤʤäƤ Ǥ⡢ȥĥʸʤ褦ˤޤ `set title` ѥ᡼ʤǻȤȥȥõޤ ХååʸκѡڤʸϤñŰ 㤤ˤĤƤϡʲ: `syntax` 3 tmargin ?commands set tmargin ?set tmargin ?tmargin ޥ `set tmargin` Ͼ;Υ򥻥åȤޤܺ٤ϡʲ : `set margin` 3 trange ?commands set trange ?commands show trange ?set trange ?show trange ?trange ޥ `set trange` ϡ޲ѿ⡼ɡ뤤϶˺ɸ⡼ɤǤ x,y ͤ׻Τ˻Ȥ޲ѿϰϤꤷޤܺ٤ϡʲ: `set xrange` 3 urange ?commands set urange ?commands show urange ?set urange ?show urange ?urange `set urange` `set vrange` ϡ`splot` ޲ѿ⡼ɤ x,y,z ׻Τ˻Ȥ޲ѿϰϤꤷޤܺ٤ϡʲ: `set xrange` 3 variables ?commands show variables ?show variables all ?show variables `show variables` ޥɤϥ桼ѿѿθߤͤΰ ɽޤgnuplot ϡGPVAL_, MOUSE_, FIT_, TERM_ ǻϤޤ̾ ѿƤޤ : show variables # GPVAL_ ǻϤޤΰʳѿɽ show variables all # GPVAL_ ǻϤޤΤޤƤѿɽ show variables NAME # NAME ǻϤޤѿΤߤɽ 3 version ?show version ޥ `show version` ϸߵưƤ gnuplot ΥС󡢺ǽ ԤȡFAQ info-gnuplot ᡼󥰥ꥹȡХݡ Υ᡼륢ɥ쥹ɽޤŪ˥ץबƤФƤȤ ꡼ˤξɽޤ : show version {long} `long` ץͿȡ˥ڥ졼ƥ󥰥ƥࡢ`gnuplot` 󥹥ȡΥѥ륪ץ󡢥إץե֤ꡢ (Ƥ) ͭѤʥ᡼륢ɥ쥹ɽޤ 3 view ?commands set view ?commands show view ?set view ?set view map ?show view ?view ޥ `set view` `splot` λγ٤ꤷޤϡ 3 ɸɤΤ褦 2 β (screen) Ƥ뤫 椷ޤϡ褵줿ǡβžȽ̼ܤͿƤޤ ͱƤݡȤƤޤ3 ͱơ 2 ŪϿ޾ ؤ 2 ľͱƤݡȤƤޤ : set view <rot_x>{,{<rot_z>}{,{<scale>}{,<scale_z>}}} set view map set view {no}equal {xy|xyz} show view <rot_x> <rot_z> ϡ̤Ƥ벾Ū 3 ɸϤ ž (ñ̤) ǡǽ (ʤžԤʤ) οʿ x, οľ y, ̼Ȥ˿ľʼ z Ȥʤ Ƥޤǽ x μ <rot_x> žޤˡ z μ <rot_z> žޤ ޥ `set view map` ϡϿޤȤɽΤ˻Ȥޤ (`contour`) 衢ӥ顼ɽ (`pm3d`) οϿޤ˻Ȥ ޤԤ˴ؤƤϡϥǡΥե륿Ѥ `zrange` ꡢ ӿϰϤν̼ܤ˴ؤ `cbrange` Ŭڤ˹ԤȤդƤ <rot_x> [0:180] ϰϤ¤ƤơǥեȤǤ 60 ٤Ǥ <rot_z> [0:360] ϰϤ¤ƤơǥեȤǤ 30 ٤Ǥ <scale> `splot` ΤοΨ椷<scale_z> z ο̤Τߤ ԤʤޤΨΥǥեȤϤɤ 1.0 Ǥ : set view 60, 30, 1, 1 set view ,,0.5 ǽ 4 ĤƤǥեȤͤˤƤޤ2 ĤϽ̾Ψ Τߤ 0.5 ѹƤޤ 4 equal_axes ?set view equal_axes ?set view equal ?view equal_axes ?view equal ?equal_axes ޥ `set view equal xy` x y ñ̤ĹŪ ʤ褦˽̼ܤ碌դڡٹ礦褦ˤν̼ܤ ޤޥ `set view equal xyz` ϡ z x y ˹ 褦ˤޤߤ z ϰϤ趭ϰϤ˹礦ݾڤϤ ޤ󡣥ǥեȤǤϡ3 ĤμΩͭΰ褦˿̤ ޤ ʲ⻲: `set xyplane` 3 vrange ?commands set vrange ?commands show vrange ?set vrange ?show vrange ?vrange ޥ `set urange` `set vrange` ϡ`splot` ޲ѿ (ѥ᡼ ) ⡼ɤ x, y, z ͤ׻Τ˻Ȥ޲ѿϰϤꤷ ޤ ܺ٤ϡʲ: `set xrange` 3 x2data ?commands set x2data ?commands show x2data ?set x2data ?show x2data ?x2data ޥ `set x2data` x2 () Υǡ () ޤܺ٤ϡʲ: `set xdata` 3 x2dtics ?commands set x2dtics ?commands unset x2dtics ?commands show x2dtics ?set x2dtics ?unset x2dtics ?show x2dtics ?x2dtics ?nox2dtics ޥ `set x2dtics` x2 () ѹޤܺ٤ϡ ʲ: `set xdtics` 3 x2label ?commands set x2label ?commands show x2label ?set x2label ?show x2label ?x2label ޥ `set x2label` x2 () θФꤷޤܺ٤ϡʲ : `set xlabel` 3 x2mtics ?commands set x2mtics ?commands unset x2mtics ?commands show x2mtics ?set x2mtics ?unset x2mtics ?show x2mtics ?x2mtics ?nox2mtics ޥ `set x2mtics` ϡx2 () 1 ǯγƷꤷޤܺ٤ϡ ʲ: `set xmtics` 3 x2range ?commands set x2range ?commands show x2range ?set x2range ?show x2range ?x2range ޥ `set x2range` x2 () ɽʿϰϤꤷޤ ܺ٤ϡʲ: `set xrange` 3 x2tics ?commands set x2tics ?commands unset x2tics ?commands show x2tics ?set x2tics ?unset x2tics ?show x2tics ?x2tics ?nox2tics ޥ `set x2tics` x2 () ΡФդ Ԥʤޤܺ٤ϡʲ: `set xtics` 3 x2zeroaxis ?commands set x2zeroaxis ?commands unset x2zeroaxis ?commands show x2zeroaxis ?set x2zeroaxis ?unset x2zeroaxis ?show x2zeroaxis ?x2zeroaxis ?nox2zeroaxis ޥ `set x2zeroaxis` ϡ̤ x2 () (y2 = 0) ܺ٤ϡʲ: `set zeroaxis` 3 xdata ?commands set xdata ?commands show xdata ?set xdata ?show xdata ?xdata Υޥɤ x Υǡǡ˥åȤޤƱͤΥ ɤ¾μ줾ѰդƤޤ : set xdata {time} show xdata `ydata`, `zdata`, `x2data`, `y2data`, `cbdata` ˤƱ񼰤ƤϤ ޤ `time` ץϥǡǡǤ뤳Ȥޤץ Ĥʤ硢ǡ̾ΤΤޤ gnuplot ˤɤΤ褦ǡɤߤޤ뤫ˤĤƤϡʲ: `set timefmt`ǡϺλϤޤ (: ̩ˤ 2000 ǯ 1 1 λϤޤ) ÿѴޤֽ (timefmt) ϸߤϤ ĤȤޤ󡣤ϡƤǡܤν񼰤˰ ʤФʤʤȤ̣ޤޤϰϤλϡ꤬ ȲᤵΤ򤱤뤿ˡν񼰤˽äʸǰϤǻ ꤹ٤Ǥ ߤθФ (label) ɽΤˤϴؿ 'strftime' (unix Ǥ Ĵ٤ˤ "man strftime" ȥפƤ) Ȥޤ `set format x "string"` ǡ10 ʿν񼰤ǤϤʤʤ (2 İʾ '%'ޤ %f Ǥ %g Ǥʤ) ͿƤʤС `gnuplot` ϤŬ˰̣Τ񼰤Ƿ׻ɽޤ ¾ξˤĤƤϡʲ: `time/date` 3 xdtics ?commands set xdtics ?commands unset xdtics ?commands show xdtics ?set xdtics ?unset xdtics ?show xdtics ?xdtics ?noxdtics ޥ `set xdtics` x ιߤѴޤ (0=Sun, 6=Sat)6 ۤ 7 ˤ;꤬Ȥޤ`unset xdtics` θФǥեȤηᤷޤ¾μˤƱȤԤʤƱ ͤΥޥɤѰդƤޤ : set xdtics unset xdtics show xdtics `ydtics`, `zdtics`, `x2dtics`, `y2dtics`, `cbdtics` ˤƱ񼰤 Ϥޤޤ ʲ⻲: `set format` 3 xlabel ?commands set xlabel ?commands show xlabel ?set xlabel ?show xlabel ?xlabel ޥ `set xlabel` x θФꤷޤ¾μˤ⸫Ф ꤹƱͤΥޥɤޤ : set xlabel {"<label>"} {offset <offset>} {font "<font>{,<size>}"} {textcolor <colorspec>} {{no}enhanced} {rotate by <degrees> | rotate parallel | norotate} show xlabel Ʊ񼰤 `x2label`, `ylabel`, `y2label`, `zlabel`, `cblabel` ˤŬ Ѥޤ <offset> x,y ޤ x,y,z ηǻꤷϡФͿ 줿ͤưޤ˺ɸϤ򤷤ơ `first`, `second`, `graph`, `screen`, `character` Τ줫Ĥ뤳ȤǤ ޤܺ٤ϡʲ: `coordinates`ǥեȤǤ `character` ɸ ϤȤޤ㤨С"`set xlabel offset -1,0`" ϸФ x ֤Τѹ礶äѤ˸ä 1 ʸʬФ򺸤ˤ餷 1 ʸ礭ϡեȤȽϷξ˰¸ޤ <font> ϸФ񤫤եȤꤹΤ˻ȤޤեȤ <size> (礭) ñ̤ϡɤʽϷȤ˰¸ޤ `noenhanced` ϡĥʸ (enhanced text) ⡼ɤͭˤʤäƤ Ǥ⡢٥ʸĥʸʤ褦ˤޤ ФõˤϡץĤ˼¹Ԥޤ: "`set y2label`" θФΥǥեȤΰ֤ϰʲ̤Ǥ: xlabel: x θФϥդβο ylabel: y θФϥդκοǡʿ˽񤫤뤫ľ ˤʤ뤫ϽϷ¸ zlabel: z θФϼɽϰϤǡФο椬 z ο cblabel: (color box) μθФȢ˱ä·졢Ȣ ʿʤ鲼ˡľʤ鱦 y2label: y2 θФ y2 αΰ֤ϡϷ¸ y Ʊͤε§Ƿꡣ x2label: x2 θФϥդξǡȥϲϡ ʸȤСˤʣιԤʤ西ȥ x2 θФ 뤳Ȥǽ: set title "This is the title\n\nThis is the x2label" ŰȤ٤Ǥ뤳ȤդƤξ硢 2 ĤιԤƱեȤȤޤ 2 ξ x, x2, y, y2 Υ٥ (ž) ϡ `rotate by <>` ꤹ뤳ȤѹǤޤ3 x, y Υ٥ϥǥեȤǤϿʿˤʤäƤޤ `rotate parallel` ꤹ뤳ȤǼʿԤˤ뤳ȤǤޤ ⤷ΰ֤ΥǥեȤΰ֤ʤʤС `set label` ȤäƤΥޥɤʸɤ֤뤫äȼͳ Ǥޤ ХååʸκѡڤʸϤñŰ 㤤˴ؤܤˤĤƤϡʲ: `syntax` 3 xmtics ?commands set xmtics ?commands unset xmtics ?commands show xmtics ?set xmtics ?unset xmtics ?show xmtics ?xmtics ?noxmtics ޥ `set xmtics` x θФѴޤ1=Jan (1 )12=Dec (12 ) Ȥʤޤ12 ۤϡ12 dzäޤ Ѵޤ`unset xmtics` ϥǥեȤθФޤ ¾μФƤƱ򤹤ƱͤΥޥɤѰդƤޤ : set xmtics unset xmtics show xmtics `x2mtics`, `ymtics`, `y2mtics`, `zmtics`, `cbmtics` ˤƱ񼰤Ŭ ޤ ʲ⻲: ޥ `set format` 3 xrange ?commands set xrange ?commands show xrange ?set xrange ?show xrange ?writeback ?restore ?xrange ޥ `set xrange` ɽʿϰϤꤷޤ¾μ ˤƱͤΥޥɤ¸ߤޤ˺ɸǤư r, ޲ѿ t, u, v ˤ¸ߤޤ : set xrange { [{{<min>}:{<max>}}] {{no}reverse} {{no}writeback} } | restore show xrange <min> <max> ˤޤ '*' ǡ'*' ϼư̼ܵ ǽ̣ޤư̼ܵǽ˴ؤܺ٤ϲ˽Ҥ٤ޤǡξ 硢ϰϤ `set timefmt` ν񼰤˽äʸǰϤɬפ ޤά줿ͤѹޤ `yrange`, `zrange`, `x2range`, `y2range`, `cbrange`, `rrange`, `trange`, `urange`, `vrange` Ʊ񼰤Ѥޤ ץ `reverse` ϼդˤޤ㤨 `set xrange [0:1] reverse` ϡ1 0 Ǥ褦ʼˤޤ ϡ `set xrange [1:0]` ƱǤ`reverse` ϼ˼ư ̼ (`autoscale`) Ѥ뤳ȤտޤƤޤ ư̼ܵǽ: <min> (ƱͤΤȤ <max> ˤŬѤޤ) ꥹ "*" ξϼư̼ܵǽˤʤޤξΤͤˡ <lb>ޤϾ <ub>ޤϤξ¤Ϳޤ񼰤ϰʲ ̤Ǥ { <lb> < } * { < <ub> } 㤨 0 < * < 200 <lb> = 0, <ub> = 200 ȤʤޤΤ褦Ǥϡ<min> ϼư ܤޤκǽŪͤ 0 200 δ֤ˤʤޤ ( '<' Ǥξüͤޤߤޤ)¤¤ꤷʤϡ '<' άǤޤ<ub> <lb> 꾮ϡ¤ϥդˤʤꡢʼ ư̼ܤˤʤޤ εǽϡư̼ܤɤϰϤ¤¬ǡ䡢 ͤΥåԥ󥰡ޤϥǡۤɤϰϤɬפȤƤʤƤ ϰϤݾڤΤͭѤǤ礦 ץ `writeback` ϡ`set xrange` ƤХåե ư̼ܵǽˤ줿ϰϤ¸ޤϡĤδؿƱ ɽϰϤϤΤΤĤΤΤꤵ Ǥ`writeback` κѤϡ`plot` μ¹˵ǽΤǡ ޥɤ˻ꤹɬפޤǸ¸ʿϰϤ `set xrange restore` Ǥޤ夲ޤ set xrange [-10:10] set yrange [] writeback plot sin(x) set yrange restore replot x/2 ξ硢y ϰ (yrange) sin(x) ͰȤƺ줿 [-1:1] ˤʤꡢx/2 Ͱ [-5:5] ̵뤵ޤ嵭Τ줾Υޥɤθ `show yrange` ¹ԤСDzԤʤƤ뤫򤹤 ˤʤǤ礦 2 ˤơ`xrange` `yrange` ϼϰϤꤷ`trange` ϡ޲ѿ⡼ɤ޲ѿϰϡ뤤϶˺ɸ⡼ɤγ٤ϰϤ ꤷޤƱͤ 3 ޲ѿ⡼ɤǤϡ`xrange`, `yrange`, `zrange` ϰϤ`urange` `yrange` ޲ѿϰϤޤ ˺ɸ⡼ɤǤϡ`rrange` 褵ư¤ϰϤꤷޤ<rmin> ư¤ؤɲäȤƺѤ <rmax> ư¤ڤΤƤ (clip) 褦˺Ѥ<rmax> ۤư¤Ф褵ޤ`xrange` `yrange` ϱƶޤϰϤϡդ r(t)-rmin Υ դǡθФˤϤ줾 rmin ä褦ʤΤǤ뤫Τ褦 ˥åȤޤ ƤϰϤʬŪˡޤŪ˼ư̼ܤޤǡ ʤСѥ᡼ѿμư̼ܵǽϰ̣ʤǤ礦 ϰϤ `plot` Υޥɥ饤ǤǤޤޥɥ饤Ϳ 줿ϰϤñˤ `plot` ޥɤǤȤ졢`set` ޥɤ ꤵ줿ϰϤϤθǡޥɥ饤ϰϤꤷƤʤ ƤǻȤޤ `splot` ƱǤ : x ϰϤǥեȤͤˤޤ: set xrange [-10:10] y ϰϤä褦ˤޤ: set yrange [10:-10] z κǾͤˤϱƶͿ (ư̼ܤ줿ޤ)ͤΤ 10 ꤷޤ: set zrange [:10] x κǾͤϼư̼ܤȤͤѹޤ: set xrange [*:] x κǾͤư̼ܤȤޤκǾͤ 0 ʾˤޤ set xrange [0<*:] x ϰϤư̼ܤȤޤƤ 10 50 ϰϤݻޤ (ºݤϤ礭ʤǤ礦): set xrange [*<10:50<*] ư̼ܤǺϰϤ -1000 1000ʤ [-1000:1000] Ǽư ܤޤ: set xrange [-1000<*:*<1000] x κǾͤ -200 100 δ֤Τɤˤޤ: set xrange [-200<*<100:] 3 xtics ?commands set xtics ?commands unset xtics ?commands show xtics ?set xtics ?unset xtics ?show xtics ?xtics ?noxtics x (ФΤĤ) ޥ `set xtics` Ǥޤ `unset xtics` Ǿä`set xtics` (ǥեȤξ֤) ꤬Ĥޤy,z,x2,y2 ԤʤƱͤΥޥɤ ޤ : set xtics {axis | border} {{no}mirror} {in | out} {scale {default | <major> {,<minor>}}} {{no}rotate {by <ang>}} {offset <offset> | nooffset} {left | right | center | autojustify} {add} { autofreq | <incr> | <start>, <incr> {,<end>} | ({"<label>"} <pos> {<level>} {,{"<label>"}...) } { format "formatstring" } { font "name{,<size>}" } { rangelimited } { textcolor <colorspec> } unset xtics show xtics Ʊ񼰤 `ytics`, `ztics`, `x2tics`, `y2tics`, `cbtics` ˤŬѤ ޤ `axis` `border` `gnuplot` (ιKȤȤθФ) 򡢤줾켴ˤĤΤˤĤΤؼޤˤ Ƥᤤ硢`axis` ѤθФʸ򶭳γ˽Ф ޤǤ礦ξ缫ưŪʥ쥤ȥ르ꥺˤ; 褯ʤΤȤʤäƤޤޤ `mirror` `gnuplot` ȿ¦ζƱ֤ˡФΤʤ Ϥ褦ؼޤ`nomirror` ϡʤƤ̤Τ Ԥʤޤ `in` `out` ιߤ¦¦ڤѤޤ ιߤΥ `scale` ĴǤޤ<minor> λ꤬ά 줿ϡ 0.5*<major> ˤʤޤǥեȤΥϡ ꤬ 1.0 Ǿ꤬ 0.5 ǡ `scale default` ǸƤӤޤ `rotate` ϡʸ 90 ٲžƽϤ褦Ȥޤϡʸ βž򥵥ݡȤƤϥɥ饤 (terminal) Ǥϼ¹Ԥޤ `norotate` Ϥ򥭥󥻥뤷ޤ`rotate by <ang>` ϳ <ang> žԤʤޤϤĤνϷ (terminal) ǥݡȤ Ƥޤ x y ΥǥեȤ `border mirror norotate` ǡx2, y2 `border nomirror norotate` ǥեȤǤz ˤϡ `{axis | border}` ץ̵ǡǥեȤ `nomirror` Ǥz ߥ顼ʤ顢¿ʬ `set border` ǤΤζ֤ ɬפǤ礦 <offset> x,y ޤ x,y,z ηǻꤷޤ˺ɸϤ 򤷤ơ `first`, `second`, `graph`, `screen`, `character` 줫Ĥ뤳ȤǤޤ<offset> ϹʸΥǥեȤΰ ΤɽǥեȤκɸϤ `character` Ǥܺ٤ϡʲ : `coordinates``nooffset` Ϥ餷̵ˤޤ : xtics ˶Ť: set xtics offset 0,graph 0.05 ǥեȤǤϸФ٥ϡ̤褦ˡȲžѤ˰¸ ֤˼ưŪ˰ֹ碌ޤ줬ˤʤСŪ `left`, `right`, `center` Υɤˤֹ碌ѹǤޤ `autojustify` ǥǥեȤεưޤ ץʤ `set xtics` ¹Ԥȡ꤬ɽ֤Ǥ СϥǥեȤζޤϼǤʤв⤷ 󡣤˻ꤷδֳ֡ (ȸФ) ݻޤ ΰ֤ϡǥեȡޤϥץ `autofreq` ꤵƤ мưŪ˷׻ޤǤʤС 2 Ĥηǻꤵ : żŪ <start>, <incr>, <end> ϡ <start> <end> δ֤ <incr> δֳ֤ɽޤ<end> ꤷʤС̵ Ȥߤʤޤ<incr> ͤǽǤ<start> <end> ξ ꤵƤʤ硢<start> -硢<end> +Ȥߤʤ졢 <incr> ܤΰ֤ɽޤпξ硢δֳ (ʬ) ϡܿȤƻѤޤ <start> <incr> 򡢿ͤθ˻ꤹ (㤨 `rotate by <angle>` Ȥ `offset <offset>` θ)gnuplot ιʸ ϡͤ餽 <start> <incr> ͤΰԤȤ ְ㤤Ȥޤ򤹤ˤϡΤ褦ʾϡ`0-<start>` `0-<incr>` Τ褦˻ꤷƤ : set xtics border offset 0,0.5 -5,1,5 Ǹ ',' ΤȤǼԤޤ set xtics border offset 0,0.5 0-5,1,5 set xtics offset 0,0.5 border -5,1,5 ʤСȻؼ̤ˡ򶭳ˡ긫Фʸ 0,0.5 ʸʬ餷ơstart, increment, end 򤽤줾 -5,1,5 ꤷ `set grid` Υץ 'front', 'back', 'layerdefault' ⡢x ν˱ƶޤ : 0, 0.5, 1, 1.5, ..., 9.5, 10 ΰ֤ set xtics 0,.5,10 ..., -10, -5, 0, 5, 10, ... set xtics 5 1, 100, 1e4, 1e6, 1e8 set logscale x; set xtics 1,100,1e8 Ū ("<label>" <pos> <level>, ...) ηϡǤդΰ֡ 뤤ϿǤʤФǽˤޤηǤϡϰ ֤ονͿɬפϤޤ󡣳ϰ (pos) ȸФ (label) ޤФɬܤǤϤޤ󡣸ФŰ Ϥޤ줿ʸǤ뤳ȤդƤϡ"hello" Τ褦ʸ ʸǤ⹽ޤ󤷡"%3f clients" Τ褦ˤΰ֤Ѵ ʸޤǤ⹽ޤ󤷡ʸ "" Ǥ⹽ޤ󡣤 ˤĤƤϡʲ: `set format`⤷ʸͿʤ СǥեȤοθФѤޤ ŪʷǤ 3 ܤΥѥ᡼Ȥ "٥" (level) Ϳ뤳 ȤǤޤǥեȤΥ٥ 0 ạ̇̄ 뤬 1 ξ羮꤬ޤ٥ꤹϥ٥ɬ ꤹɬפޤ : set xtics ("low" 0, "medium" 50, "high" 100) set xtics (1,2,4,8,16,32,64,128,256,512,1024) set ytics ("bottom" 0, "" 10, "top" 20) set ytics ("bottom" 0, "" 10 1, "top" 20) 2 ܤǤϡƤ꤬Фդޤ3 ܤǤϡü ΤФդޤ4 ܤΡФΤʤϾ ˤʤޤ ̾Ū (ư) ֤Ϳ줿硢ưŪ ϻȤޤ󡣵դˡ`set xtics auto` Τ褦ʤΤꤵ줿 ϡ˼ưꤷϾäƤޤޤμư ȼưŪ¸ˤϥ `add` ѤƤ ɲäΥ˽񤫤ʤФޤ : set xtics 0,.5,10 set xtics add ("Pi" 3.14159) ϼưŪιߤ x 0.5 ֳ֤ǤĤޤФΤȤ ŪʸФɲäޤ ꤷƤ⡢ɽΤϤޤϰϤΤΤǤ θФν (ޤϾά) `set format` 椵ޤ `set xtics (`<label>`)` ηŪʸФʸ󤬴ޤޤ ƤʤǤ (Фդʤ) ϡ`set mxtics` ޥɤǼưŪɲä 뤫ޤϰ֤ư `set xtics ("" <pos> 1, ...)` ηͿ ȤǤޤ 4 xtics time_data ?set xtics time_axis tics ?xtics time_axis tics ?time_axis tics ǡξ硢֤ͤ `timefmt` ν񼰤ˤä աޤϻǰϤͿʤФޤ<start>, <incr>, <end> Ȥ硢<start> <end> `timefmt` ˽äͿ ޤ<incr> ñ̤Ϳɬפޤλϼºݤˤ `set format` Ϳ񼰤˽äɽޤ : set xdata time set timefmt "%d/%m" set xtics format "%b %d" set xrange ["01/12":"06/12"] set xtics "01/12", 172800, "05/12" set xdata time set timefmt "%d/%m" set xtics format "%b %d" set xrange ["01/12":"06/12"] set xtics ("01/12", "" "03/12", "05/12") ξȤ "Dec 1", "Dec 3", "Dec 5", ޤ2 ܤ "Dec 3" ϸФդޤ 4 xtics rangelimited ?set xtics rangelimited ?xtics rangelimited ?rangelimited ?range-frame ΥץϡưŪ뼴θФȡ褵줿 ǼºݤͿϰϤб趭ξ¤ޤ Ф븽ߤϰ¤Ȥ̵طǤ뤳ȤդƤ㤨 Хǡ "file.dat" Υǡ٤ 2 < y < 4 ϰϤˤȤȡ ʲΥޥɤϡ¦趭 (y ) y ϰ ([0:10]) Τ ʬ ([2:4]) Τߤ褵졢ϰ ([2:4]) μΤߤ ޤĤޤꡢ y ϰ ([0:10]) ˳礵 ޤζ 0 2 δ֡4 10 δ֤϶ΰȤʤޤ Υϡ`ϰ` (range-frame) ȤƤФޤ set border 3 set yrange [0:10] set ytics nomirror rangelimited plot "file.dat" 3 xyplane ?commands set xyplane ?commands show xyplane ?set xyplane ?show xyplane ?xyplane `set xyplane` ޥɤ 3D xy ʿ̤ΰ֤ĴΤ ȤޤߴΤˡ"set ticslevel" Ʊ̣Υޥɤ ƻȤȤǤޤ : set xyplane at <zvalue> set xyplane relative <frac> set ticslevel <frac> # set xyplane relative Ʊ show xyplane `set xyplane relative <frac>` ϡxy ʿ̤ Z ϰϤΤɤ֤ ꤷޤ<frac> ˤϡxy ʿ̤ z ΰֲΰ֤ȤκΡz ΤФͿޤǥեȤͤ 0.5 Ǥͤ Ƥޤ 3 ĤμθФŤʤǽ ޤ侩ǤŤ `set ticslevel` ߴΤ˻Ĥ Ƥޤ xy ʿ̤ z 'pos' ΰ֤֤ˤϡ`ticslevel` ͤ (pos - zmin) / (zmin - zmax) ȤƤΰ֤ z (`zrange`) ѹѤäƤޤޤ ⤦ĤηǤ `set xyplane at <zvalue>` ϡߤ z ϰϤ ˤ뤳Ȥʤꤷ z ͤΰ֤ xy ʿ̤ꤷޤäơ x,y,z ̤θ̤褦ˤˤϡ`set xyplane at 0` Ȥ Ȥˤʤޤ ʲ⻲: `set view`, `set zeroaxis` 3 xzeroaxis ?commands set xzeroaxis ?commands unset xzeroaxis ?commands show xzeroaxis ?set xzeroaxis ?unset xzeroaxis ?show xzeroaxis ?xzeroaxis ?noxzeroaxis ޥ `set xzeroaxis` y = 0 ľޤܺ٤˴ؤƤϡ : `set zeroaxis` 3 y2data ?commands set y2data ?commands show y2data ?set y2data ?show y2data ?y2data ޥ `set y2data` y2 () Υǡ () ޤܺ٤ϡʲ: `set xdata` 3 y2dtics ?commands set y2dtics ?commands unset y2dtics ?set y2dtics ?unset y2dtics ?show y2dtics ?y2dtics ?noy2dtics ޥ `set y2dtics` y2 () ѹޤܺ٤ϡ ʲ: `set xdtics` 3 y2label ?commands set y2label ?commands show y2label ?set y2label ?show y2label ?y2label ޥ `set y2label` y2 () θФꤷޤܺ٤ϡʲ : `set xlabel` 3 y2mtics ?commands set y2mtics ?commands unset y2mtics ?commands show y2mtics ?set y2mtics ?unset y2mtics ?show y2mtics ?y2mtics ?noy2mtics ޥ `set y2mtics` y2 () 1 ǯγƷѹޤ ܺ٤ϡʲ: `set xmtics` 3 y2range ?commands set y2range ?commands show y2range ?set y2range ?show y2range ?y2range ޥ `set y2range` y2 () ɽľϰϤꤷޤ ܺ٤ϡʲ: `set xrange` 3 y2tics ?commands set y2tics ?commands unset y2tics ?commands show y2tics ?set y2tics ?unset y2tics ?show y2tics ?y2tics ?noy2tics ޥ `set y2tics` y2 () ΡФդ Ԥʤޤܺ٤ϡʲ: `set xtics` 3 y2zeroaxis ?commands set y2zeroaxis ?commands unset y2zeroaxis ?commands show y2zeroaxis ?set y2zeroaxis ?unset y2zeroaxis ?show y2zeroaxis ?y2zeroaxis ?noy2zeroaxis ޥ `set y2zeroaxis` ϡ̤ y2 () (x2 = 0) ܺ٤ϡʲ: `set zeroaxis` 3 ydata ?commands set ydata ?commands show ydata ?set ydata ?show ydata ?ydata ޥ `set ydata` y Υǡ () ꤷޤ ʲ: `set xdata` 3 ydtics ?commands set ydtics ?commands unset ydtics ?commands show ydtics ?set ydtics ?unset ydtics ?show ydtics ?ydtics ?noydtics ޥ `set ydtics` y ѹޤܺ٤ϡʲ : `set xdtics` 3 ylabel ?commands set ylabel ?commands show ylabel ?set ylabel ?show ylabel ?ylabel Υޥɤ y θФꤷޤʲ: `set xlabel` 3 ymtics ?commands set ymtics ?commands unset ymtics ?commands show ymtics ?set ymtics ?unset ymtics ?show ymtics ?ymtics ?noymtics ޥ `set ymtics` ϡy ѹޤܺ٤ϡʲ : `set xmtics` 3 yrange ?commands set yrange ?commands show yrange ?set yrange ?show yrange ?yrange ޥ `set yrange` ϡy οľϰϤꤷޤܺ٤ϡʲ : `set xrange` 3 ytics ?commands set ytics ?commands unset ytics ?commands show ytics ?set ytics ?unset ytics ?show ytics ?ytics ?noytics ޥ `set ytics` y (Фդ) 椷ޤ ܺ٤ϡʲ: `set xtics` 3 yzeroaxis ?commands set yzeroaxis ?commands unset yzeroaxis ?commands show yzeroaxis ?set yzeroaxis ?unset yzeroaxis ?show yzeroaxis ?yzeroaxis ?noyzeroaxis ޥ `set yzeroaxis` x = 0 ľ (y ) 񤭤ޤܺ٤ϡ : `set zeroaxis` 3 zdata ?commands set zdata ?commands show zdata ?set zdata ?show zdata ?zdata ޥ `set zdata` z Υǡ () ꤷޤ ʲ: `set xdata` 3 zdtics ?commands set zdtics ?commands unset zdtics ?commands show zdtics ?set zdtics ?unset zdtics ?show zdtics ?zdtics ?nozdtics ޥ `set zdtics` z ѹޤܺ٤ϡʲ : `set xdtics` 3 zzeroaxis ?commands set zzeroaxis ?commands unset zzeroaxis ?commands show zzeroaxis ?set zzeroaxis ?unset zzeroaxis ?show zzeroaxis ?zzeroaxis ?nozzeroaxis ޥ `set zzeroaxis` (x=0,y=0) ̤ľޤϡ2D 衢 `set view map` Ǥ splot ǤϸϤޤ󡣾ܺ٤ϡ ʲ: `set zeroaxis`, `set xyplane` 3 cbdata ?commands set cbdata ?commands show cbdata ?set cbdata ?show cbdata ?cbdata Υޥɤϥ顼ܥåΥǡ () ˼ꤷ ޤʲ: `set xdata` 3 cbdtics ?commands set cbdtics ?commands unset cbdtics ?commands show cbdtics ?set cbdtics ?unset cbdtics ?show cbdtics ?cbdtics ?nocbdtics ޥ `cbdtics` ϥ顼ܥåιߤѴޤ ܺ٤ϡʲ: `set xdtics` 3 zero ?commands set zero ?commands show zero ?set zero ?show zero ?zero `zero` ͤϡ0.0 ˶ᤤǥեȤͤɽޤ : set zero <expression> show zero `gnuplot` ϡ(ʣǿͤˤƤ) ͤεʬ ͤ `zero` ͤ礭 (Ĥޤ¿Ǥʤͤ) ϡ 褷ޤ󡣤ͤ `gnuplot` ¾͡ʬˤƤ (ޤ) ͸ͤȤƤȤƤޤǥեȤ `zero` ͤ 1e-8 Ǥ1e-3 (= ŵŪʥӥåȥޥåץǥץ쥤β٤εտ) 礭 `zero` ͤꤹ٤ǤϤʤǤ礦`zero` 0.0 ꤹΤϰ̣ΤʤȤǤϤޤ 3 zeroaxis ?commands set zeroaxis ?commands unset zeroaxis ?commands show zeroaxis ?set zeroaxis ?unset zeroaxis ?show zeroaxis ?zeroaxis x `set xzeroaxis` ˤä졢`unset xzeroaxis` ˤäƺ ޤƱͤ y, x2, y2, z ѤΥޥɤƱͤƯ򤷤ޤ : set {x|x2|y|y2|z}zeroaxis { {linestyle | ls <line_style>} | { linetype | lt <line_type>} { linewidth | lw <line_width>}} unset {x|x2|y|y2|z}zeroaxis show {x|y|z}zeroaxis ǥեȤǤϡΥץϥդˤʤäƤޤ򤵤줿 0 μ <line_type> η<line_width> (߻ѤƤ ϷݡȤƤ) ǡ뤤Ϥ餫줿 <line_style> Υޤ ηꤷʤС̾μη ( 0) ޤ `set zeroaxis` `set xzeroaxis; set yzeroaxis` ƱǤz ϡ `set zzeroaxis` ȤäΩꤹɬפ뤳ȤդƤ : y=0 μ򸫤褦˴ñ˽񤯾: set xzeroaxis ˤơäޤѥˤ: set xzeroaxis linetype 3 linewidth 2.5 3 zlabel ?commands set zlabel ?commands show zlabel ?set zlabel ?show zlabel ?zlabel Υޥɤ z θФꤷޤʲ: `set xlabel` 3 zmtics ?commands set zmtics ?commands unset zmtics ?commands show zmtics ?set zmtics ?unset zmtics ?show zmtics ?zmtics ?nozmtics ޥ `set zmtics` z ѹޤܺ٤ϡʲ : `set xmtics` 3 zrange ?commands set zrange ?commands show zrange ?set zrange ?show zrange ?zrange ޥ `set zrange` z ɽϰϤꤷޤΥ ޥɤ `splot` ˤΤͭǡ`plot` Ǥ̵뤵ޤܺ٤ϡʲ : `set xrange` 3 ztics ?commands set ztics ?commands unset ztics ?commands show ztics ?set ztics ?unset ztics ?show ztics ?ztics ?noztics ޥ `set ztics` z (Фդ) 椷ޤ ܺ٤ϡʲ: `set xtics` 3 cblabel ?commands set cblabel ?commands show cblabel ?set cblabel ?show cblabel ?cblabel Υޥɤϥ顼ܥåθФꤷޤʲ: `set xlabel` 3 cbmtics ?commands set cbmtics ?commands unset cbmtics ?commands show cbmtics ?set cbmtics ?unset cbmtics ?show cbmtics ?cbmtics ?nocbmtics ޥ `set cbmtics` ϥ顼ܥåθФѴ ޤܺ٤ϡʲ: `set xmtics` 3 cbrange ?commands set cbrange ?commands show cbrange ?set cbrange ?show cbrange ?cbrange ޥ `set cbrange` ϡ `with pm3d`, `with image` `with palette` ʤɤˤäƸߤΥѥå (`palette`) Ȥäƿդ ͤϰϤꤷޤϰϳͤФƤϡǤᤤ³ͤ Ѥޤ 顼ܥå (cb-) `splot` Ǽư̼ܤƤϡ 顼ܥåϰϤ `zrange` Ȥޤ`splot ... pm3d|palette` 褵ϡۤʤ `zrange` `cbrange` ȤȤǥե륿 󥰤Ǥޤ `set cbrange` ν񼰤˴ؤܺ٤ϡʲ: `set xrange`ʲ⻲: `set palette`, `set colorbox` 3 cbtics ?commands set cbtics ?commands unset cbtics ?commands show cbtics ?set cbtics ?unset cbtics ?show cbtics ?cbtics ?nocbtics ޥ `set cbtics` ϥ顼ܥå (Фդ) 椷ޤܺ٤ϡʲ: `set xtics` 2 shell ?commands shell ?shell `shell` ޥɤŪʥưޤ`gnuplot` ˤϡ VMS Ǥ `logout` Unix ʤ `exit` ⤷ END-OF-FILE ʸ MS-DOS OS/2 ʤ `exit` ϤƲ 륳ޥɤ¹Ԥˡ 2 Ĥޤ: ޥ `system` Ȥ `!` (VMS Ǥ $) ȤԤϡޥʸѥ᡼Ȥ Τǡ¾ gnuplot ޥɤΤɤǤȤȤǤޤԤ 񼰤ϡιԤˤΥޥɤĤǤ뤳Ȥ׵ᤷޤξ 祳ޥɤλȤ `gnuplot` äƤޤ㤨 MS-DOS, OS/2 Ǥϡ ! dir ޤ system "dir" Ȥȥǥ쥯ȥΰɽ `gnuplot` äƤޤ `system` Ȥ¾: system "date"; set time; plot "a.dat" print=1; if (print) replot; set out; system "lpr x.ps" 2 splot ?commands splot ?splot `splot` 3 ΤΥޥɤǤ (¸ΤǤ礦 ºݤˤϤ 2 ؤμͱ)ϴؿޤϥե뤫ɤ߹ ǡ `plot` ޥɤȤȤƤɤˡǤޤ `splot` ϡ줾ñ x, y, z 󶡤ǡ`plot` Ѱդ Ƥ 2 x2, y2 Τ褦ʤΤϤޤ 2 3 ξǻȤ¿ΥץˤĤƤϡʲ: `plot` : splot {<ranges>} {<iteration>} <function> | "<datafile>" {datafile-modifiers}} {<title-spec>} {with <style>} {, {definitions{,}} <function> ...} ǡؿ <function>ޤϥȤǤ줿ǡե̾ ɤ餫ɬפǤؿϡܤο뤤޲ѿ⡼ɤǤ 3 ĤοȤǤ ǥեȤǤϡ`splot` 褵ǡβ˴ xy ̤ޤ z ΰֲ xy ʿ̤ΰִط `set xyplane` ѹǤޤ `splot` μͱƤθ `set view` Ǥޤܺ٤ϡʲ: `set view`, `set xyplane` `splot` ޥɤϰϤλν񼰤 `plot` ξƱǤ޲ѿ ⡼ɤǤʤϰϤ `xrange`, `yrange`, `zrange` νǤꡢ޲ ⡼ɤǤ `urange`, `vrange`, `xrange`, `yrange`, `zrange` νǤ `title` ץ `plot` ƱǤ`with` `plot` ȤۤƱ Ǥ`splot` ǤѲǽ襹 `lines`, `points`, `linespoints`, `dots`, `impulses` ˸¤Ƥޤ`plot` ǻȤ 顼Сεǽ `splot` ˤϤޤ `datafile` ץˤϤ˰㤤ޤ ʲ⻲: `show plot` 3 ǡե (datafile) ?commands splot datafile ?splot datafile `plot` Ʊ褦ˡ`splot` ǥե뤫饰դǤޤ : splot '<file_name>' {binary <binary list>} {{nonuniform} matrix} {index <index list>} {every <every list>} {using <using list>} `""` `"-"` Ȥä̤ʥե̾ `plot` Ʊͤ˵ޤ : `special-filenames` ûˤȡ`binary` `matrix` ϤΥǡ̤ʷǤ뤳Ȥ `index` ¿ťǡե뤫ɤΥǡ褹뤫 `every` ϳƥǡ礫ɤΥǡ (ʬ) 褹뤫 `using` ϳƥǡԤɤΤ褦֤ꤷޤ `index` `every` ץ `plot` ξƱ褦˿񤤤ޤ `using` ⡢`using` ΥꥹȤ 2 ĤǤʤ 3 ɬפǤȤȤ ƤƱͤǤ `thru` `smooth` Ȥä `plot` Υץ `splot` ǤѤǤ ޤ󡣤`cntrparam` `dgrid3d` ¤ƤϤޤʿ경 ΤѰդƤޤ ǡեηϡ (x,y,z) 3 ȤǤʳϡܼŪ `plot` ƱǤ⤷ĤͤͿС z ȤƻȤ졢 ǡ֥åֹ椬 y Ȥơ x ϤΥǡ֥åǤֹ椬 Ȥޤ⤷ 2 ġ뤤 4 ĤͤͿС`gnuplot` Ϥ Ǹͤ pm3d plot Ǥοη׻˻Ȥޤ3 Ĥͤ (x,y,z) Ȥȸ ʤޤ¾ͤСϰ̤˸ȸʤޤ `fit` ǻȤȤǽǤ `splot` ΥǡեǤϡ1 ԤζԤϥǡ֥åʬΥҤǤ `splot` ϸġΥǡ֥å򡢴ؿ y-ΩƱΤȤư ޤ1 ԤζԤʬΥƤƱΤʬǷФ뤳ȤϤޤ ƤΥǡ֥åƱοľ硢`gnuplot` ϥǡ ֥åǤбƱΤָΩޤ "grid data" ȸƤФ졢̤衢 (`set contour`) (`set hidden3d`) ǤϡηΥǡǤ뤳ȤɬפȤʤޤʲ ⻲: `splot grid_data` 3 `splot` ǡˤƤϡ޲ѿ⡼ (`parametric`) 뤳ȤϤϤפǤ 4 matrix ?commands plot datafile matrix ?commands splot datafile matrix ?plot datafile matrix binary ?splot datafile matrix binary ?plot binary matrix ?splot binary matrix ?plot matrix binary ?splot matrix binary ?matrix binary ?binary matrix gnuplot ϡmatrix () Υǡ2 ĤΰۤʤDz᤹뤳 ȤǤޤ 1 Ĥϡx, y κɸͤǤȲꤷơͤ ΰͤʳʻҤ matrix Τ줾Ǥ˳ƤˡǤϡ ASCII ǡФƤϥǥեȤǤХʥǡФƤϤ Ϥޤ ͤ matrix ǡ褹륳ޥɤ: splot 'file' matrix using 1:2:3 # ASCII ǡ splot 'file' binary general using 1:2:3 # Хʥǡ ͤʳʻҤ matrix ǡǤϡƥ֥å z ͤϰԤǰ٤ɤ ޤʤ z11 z12 z13 z14 ... z21 z22 z23 z24 ... z31 z32 z33 z34 ... ASCII ϤǤϡԤ䥳ȹԤǡλʶ̤ (mesh) 򳫻ϤޤĤΤȤǤ`splot` ޥ `index` ץȤäƥե֤ͳǤޤ =nonuniform 2 ܤηϡͤʳʻҤǡx, y ɸƤȲꤹ ǡϥǡκǽιԤ y ɸǽ x ɸȤߤʤޤ ХʥǡФƤϡ1 ܤκǽǤϡǡǤʤФ ޤ (ASCII ǡǤϤο̵뤵ޤ)ɸȥǡͤϡ ХʥǡǤñưͤȤߤʤޤ ͤ matrix ǡ褹륳ޥɤ: splot 'file' nonuniform matrix using 1:2:3 # ASCII ǡ splot 'file' binary matrix using 1:2:3 # Хʥǡ äơͤ matrix ǡι¤ϰʲΤ褦ˤʤޤ: <N+1> <y0> <y1> <y2> ... <yN> <x0> <z0,0> <z0,1> <z0,2> ... <z0,N> <x1> <z1,0> <z1,1> <z1,2> ... <z1,N> : : : : ... : ϰʲΤ褦 3 ĤοȤѴޤ: <x0> <y0> <z0,0> <x0> <y1> <z0,1> <x0> <y2> <z0,2> : : : <x0> <yN> <z0,N> <x1> <y0> <z1,0> <x1> <y1> <z1,1> : : : ơ 3 ĤοȤ `gnuplot` θΩѴ졢θ `gnuplot` ̾ˡλĤԤޤ ٥ȥΥ֥롼 (C ˤ) `binary.c` Ѱդ ƤޤХʥǡ񤯥롼 int fwrite_matrix(file,m,nrl,nrl,ncl,nch,row_title,column_title) ǤΥ֥롼Ȥ㤬 `bf_test.c` ȤѰդƤơ ϥǥե `demo/binary.dem` ѤʣΥХʥե ޤ `plot` Ǥλˡ: plot `a.dat` matrix plot `a.dat` matrix using 1:3 plot 'a.gpbin' {matrix} binary using 1:3 ιԤ褷using 2:3 Ȥ衢using 1:2 ϡκɸ褷ޤ (¿ʬ̵̣Ǥ)ץ `every` ŬѤ 뤳ȤŪ˹ԤǤޤ -- ASCII ǡեμγ: splot `a.dat` matrix using (1+$1):(1+$2*10):3 -- ASCII ǡե 3 Ԥ: plot 'a.dat' matrix using 1:3 every 1:999:1:2 (Ԥ 0 Τǡ3 ǤϤʤ 2 ꤷޤ) Gnuplot ϡ`array`, `record`, `format`, `filetype` ʤɤ general ʥꤹ褦ʥɤĤ˥ץ `binary` Ȥǡmatrix Хʥեɤ߹ळȤǤޤ¾Ѵ Ѥ general Хʥꥭɤϡmatrix ХʥեˤŬѤǤ Ǥ礦(ܺ٤ϡʲ: `binary general`) 4 ǡե ?commands splot datafile example ?splot datafile example ?splot example ʲ3 ǡեñʰĤǤ splot 'datafile.dat' ǡ"datafile.dat" ϰʲޤȤޤ: # The valley of the Gnu. 0 0 10 0 1 10 0 2 10 1 0 10 1 1 5 1 2 10 2 0 10 2 1 1 2 2 10 3 0 10 3 1 0 3 2 10 "datafile.dat" 4*3 γʻ (줾 3 ʤ֥å 4 Ĥι) 뤳ȤդƲ (ǡ֥å) 1 Ԥ ԤǶڤޤ x ͤϤ줾Υǡ֥åˤʤäƤ뤳ȤդƲ ⤷ y ͤȤͭʾ֤褹ȡζ̤ ΢֤ǽ񤫤뤳Ȥˤʤޤ ʻҾǡ (grid data) ФơġΥǡ֥å x ͤ ȤƤɬפϤޤ󤷡Ʊ y ͤƱͤ·Ƥ ɬפ⤢ޤ`gnuplot` ϸġΥǡ֥åο ȤɬפȤƤǤƳΤѤ ̤ܤϡбŪǷ֤ᡢ·γʻҥǡФ ̤ؤαƶͽۤǤޤ󡣤ϥХθǥ Ȥ٤Ǥ礦 3 ʻҾǡ (grid data) ?commands splot grid_data ?splot grid_data ?grid_data 3 ΤΥ롼ϡġܤγʻҤˤƤϰĤɸ ĤΥǡ롢ȤγʻҾǡѤ߷פƤޤƥ ϡؿͤɾ뤳 (ʲ: `set isosamples`)ޤ ǡեɤ߹ळ (ʲ: `splot datafile`) ˤä ޤ"Ω" ȤդϴؿФƤ⡢ǡФƤ⤽ ܤɽΤȤѤޤܤϡɬ x, y ˴ؤĹ ǤʤƤ褯u,v ޲ѿɽƤ⹽ʤȤդƲ ʲ: `set isosamples` `gnuplot` ϤΤ褦ʷɬɬפȤϤޤ㤨 ؿξϡ`samples` `isosamples` ȰäƤƤ⹽ޤ ʤx-ΩΤ1 ܤ y-ΩȸʤΤĤ ȤޤǡեξϡġΥǡ֥åΤФĤ θĿƱǤС"Ω" ϥǡ֥åӡ "ǸΩ" ϳƥǡ֥åбƱΤӡ"" ȤޤɤξǤ⡢ӱ⡼ɤտޤ եޥåȤǤäȤϰäͿ뤳ȤˤʤޤФĤ Τǡ `set dgrid3d` ˤä{ۤʤ}ʻҾǡѴ뤳 Ǥޤ ˴ؤ륳ɤϡy-Ωȡб٤ y-Ω δ֤ʬ˱äƤ z ĥϤ¬ޤäơx-Ωˡ y-ΩȤθȤϤʤʤ褦ɸ褦ʶ̤ФƤϡ `splot` ϤΤ褦ɸ̵뤹뤳Ȥˤʤޤʲ ߤƲ: set xrange [-pi/2:pi/2]; set yrange [-pi/2:pi/2] set style function lp set contour set isosamples 10,10; set samples 10,10; splot cos(x)*cos(y) set samples 4,10; replot set samples 10,4; replot 3 splot ζ (splot surfaces) ?commands splot surfaces ?splot surfaces `splot` νޤȤơ뤤ϡ֤Ȥˤäƶ ɽ뤳ȤǤޤ`plot` Ʊͤˡϥǡե뤫ɤ ȤǤޤꤵ줿֤Ǵؿͤɾ뤳ȤǤޤ ʲ: `set isosamples`̤ϡʬǷ֤ȤǶŪ˺ ޤʲ: `set surface`Ƥξ̤ϡ`set hidden3d` ƩˤǤޤ3 ̤įϡ`set view` ѹǤ ޤ ˡʻҾΥǡФƤϡ`splot` Ʊ⤵֤ 뤳ȤǤ (ʲ: `set contour`)Ƥ ȤǤޤˡηˤϿľʬ餫Ȥ ȤǤޤ (ʲ: `set cntrparam`)ؿϡ `set isosamples` `set samples` ǷꤵʻҾǡȤɾޤ Υǡϡ`data-file` ˽񤫤Ƥ褦ʳʻҾǡե åȤˤ뤫뤤ϳʻҥǡ (ʲ: `set dgrid3d`) ȤȤ򤷤ʤФϤʤޤ ϶̤ξɽ뤳ȤǤޤ̤˼ͱƤ뤳ȤǤ ̤ؤμͱƤϡե˽񤭽ФȤǤƤ `plot` ǺƤɤ߹ `plot` Τ궯ǽϤȤǤޤ 2 stats (ñ׾) ?commands stats ?stats ?statistics : stats 'filename' [using N[:M]] [name 'prefix'] [[no]output]] Υޥɤϡե 1 󡢤ޤ 2 Υǡδñ׾ 󶡤ޤusing Ҥϡplot ޥɤƱDzᤵޤ `index`, `every`, `using` ˴ؤܺ٤ˤĤƤϰʲ: `plot` ǡϡβϤ xrange, yrange ˽äƥե륿ˤ ʲ: `set xrange`ξϥǥեȤǤϥ꡼˽Ϥ ޤޥ `set print` ˻ȤȤǽϤե˥ 쥯Ȥꡢץ `nooutput` ȤȤǽϤʤ褦ˤ뤳 ȤǤޤ ̽Ϥ˲ägnuplot ϸġ׾ 3 Ĥѿ롼פ¸ ޤ 1 ܤѿ롼פϡɤʥǡ¤Ǥ뤫򼨤ޤ: STATS_records # ϰΥǡԤ STATS_outofrange # ϰϳȤƽ줿Կ STATS_invalid # ̵/Դ/»ǡԤ STATS_blank # Ԥ STATS_blocks # ե index ǡ֥å 2 ܤѿ롼פϡ1 ĤΡϰΥǡ򼨤ޤ 뼴 (1 ܤˤ x ɲä 2 ܤˤ y ) ư̼ ξϡϰϤ¤Ϥޤ2 Ĥ 1 `stats` ޥɤ Ϥϡѿ̾ˤ "_x", "_y" Ȥɲäޤ STATS_mix_x ϡ1 ܤΥǡκǾͤǡSTATS_min_y 2 ܤΥǡκǾ̣ͤޤ STATS_min # ϰΥǡκǾ STATS_max # ϰΥǡκ STATS_index_min # data[i] == STATS_min Ȥʤź i STATS_index_max # data[i] == STATS_max Ȥʤź i STATS_lo_quartile # () ʬ̶ STATS_median # ᥸ (ʬ̶) STATS_up_quartile # 軰 () ʬ̶ STATS_mean # ϰΥǡʿ STATS_stddev # ϰΥǡɸк STATS_sum # STATS_sumsq # ʿ 3 ܤѿ롼פϡ2 ĤΥǡβѤǤ STATS_correlation # x y ط STATS_slope # ľ y = Ax + B η A STATS_intercept # ľ y = Ax + B η B STATS_sumxy # (x*y ) STATS_pos_min_y # y κǾͤͿ x ɸ STATS_pos_max_y # y κͤͿ x ɸ Ʊ 2 İʾΥե뤫׾ȤȤǤǤ 顢ѿΥǥեȤƬǤ "STATS" 򥪥ץ `name` 桼ꤹʸ֤뤳ȤǤ褦ˤʤäƤޤ㤨 Сۤʤ 2 ĤΥեΤ줾 2 ܤΥǡʿͤϰʲΤ ˤӤǤޤ: stats "file1.dat" using 2 name "A" stats "file2.dat" using 2 name "B" if (A_mean < B_mean) {...} STATS_index_xxx Ǽźͤϡplot ޥɤ 0 ($0) ͤбǽź 0Ǹź N-1 Ȥʤޤ ᥸Ȼʬ̶ͤõݤϥǡͤ򥽡Ȥ N ξϡ (N+1)/2 ܤͤ᥸ͤȤN ξϡ N/2 ܤ (N+2)/2 ܤͤʿͤ᥸ͤȤޤʬ̶ Ʊͤ˽ޤ θĤ뤿˥ޥ `stats` ѤˤĤ ϡʲ򻲾ȤƤ ^ <a href="http://www.gnuplot.info/demo/stats.html"> stats.dem ^ </a> ߤμǤϡX Y ΰпξϲϤǤޤ󡣤 ¤ϺΥСǤϲäǤ礦 2 system ?commands system ?system `system "command"` ϡɸŪʥȤä "command" ¹Ԥޤ ʲ: `shell`ؿȤƸƤФ줿硢`system("command")` Ϸ ȤɸϤήʸʸͤȤ֤ޤɲä ʸ̵뤵ޤ ϡgnuplot ץ˳ؿΤ˻Ȥޤ: f(x) = real(system(sprintf("somecommand %f", x))) 2 test ?commands test ?test palette ?test ΥޥɤϡϷѥåȤǤɤΤ褦ʽϤԤʤ뤫 ƥȤɽޤ : test {terminal | palette [rgb|rbg|grb|gbr|brg|bgr]} `test` ޤ `test terminal` ϡ߻νϷ (`terminal`) ȤμࡢμࡢޤͭѤʤѲǽʤ¾ ޤ `test palette` ϡR(z),G(z),B(z) (0<=z<=1) ξ֤褷ޤ ϸߤΥ顼ѥå (`palette`) RGB ʬ򼨤ޤޤRGB Ĵ˼ NTSC ѤƷ׻줿٤褷ޤɲ Υѥ᡼ϡr,g,b ʸȹ礻ǡˤ褹֤ꤵ ޤ 2 undefine ?commands undefine ?undefine 1 ġޤʣѤߤΥ桼ѿޤϡƥ Ȥޤ褦ʥץȤξ֤ꥻåȤΤǤ礦 ѿ̾ˤϡǸʸȤƥ磻ɥʸ `*` ȤȤǤ 磻ɥʸĤȡʬǻϤޤ뤹٤Ƥ ޤϡ̤ƬȤäƤʣѿ Ǥ礦磻ɥʸѿ̾κǸˤȤʤ ȤդƤ`undefine` ˥磻ɥʸΤߤȤ Ϳϲ⤷ޤ : undefine foo foo1 foo2 if (!exists("foo")) load "initialize.gp" bar = 1; bar1 = 2; bar2 = 3 undefine bar* # 3 Ĥѿ 2 unset ?commands unset ?unset =iteration ޥ `set` ꤷץϡб `unset` ޥ ˤäƤΥǥեȤ᤹ͤȤǽǤ`unset` ޥɤˤϷ ֤ѤǤޤʲ: `iteration` : set xtics mirror rotate by -45 0,10,100 ... unset xtics # ֹ 100 200 ޤǤΥ٥ unset unset for [i=100:200] label i 2 update ?commands update ?update ΥޥɤƤϤ (fit) Υѥ᡼θߤͤ򡢽ͤΥե η (`fit` ιƤ)Ϳ줿ե˽񤭽Ф ޤϡߤͤ򡢸ǻȤˡ뤤Ͻλ/ǤƤ Ƽ¹Ԥ뤿¸ƤΤͭѤǤ : update <filename> {<filename>} 2 ܤΥե̾ꤹȡΥѥ᡼եѹ 2 ܤΥե˹줿ͤ񤭽Фޤ ǤʤСꤷե뤬¸ߤ `gnuplot` ϤΥե ̾ `.old` Ĥƥե̾ѹꤷե̾Υե ˳ľޤĤޤꡢ"`update 'fred'`" Ȥȡ "`!rename fred fred.old; update 'fred.old' 'fred'`" ȤȤƱ Ȥˤʤޤ["filename.ext" 12 ʸȤʤ MS-DOS ¾Υ ƥǤϡ"ext" "`old`" ˤʤä "filename" ϺǽΥե˴ط (¿ʬɤ줫ʬǤ礦) ȤޤVMS Ǥϡ ΥСƥबȤ뤿ᡢ̾ѹϹԤʤޤ ] ܤ˴ؤƤϡʲ: `fit` 2 While ?while ?commands while : while (<expr>) { <commands> } ϡޥɤΥ֥å<expr> 0 Ǥʤͤɾ֡ ֤¹ԤޤΥޥɤϡŤ (äʤ) if/else ʸ Ȱ˻ȤȤϤǤޤ󡣰ʲ: `if` 1 Ϸ (Terminal) ^ <h2> Terminal Types </h2> 2 Ϸΰ ?complete list of terminals ?terminal ?term gnuplot ϤȤƤ¿νϷ򥵥ݡȤƤޤϡŬڤ Ϸɬפʤ鵡ǽѹɲåץĤ򤹤뤳 ˤꤵޤʲ: `set terminal` ʸϡʤΥƥǽꤪӥ󥹥ȡ뤬ʤʤ äѤǤʤϷˤĤƤ⵭ҤƤ뤫Τޤ 󥹥ȡ뤵줿ġ gnuplot ǡɤνϷͭʤΤΰ ˤϡץ򲿤Ĥ 'set terminal' ǤäƤ (: ܸ˴ޤޤ terminal Υޥ˥奢ϡΰˤϤ ϷΤΤޤޤƤ뤫⤷ޤ󤷡դˤΰνϷ ǥޥ˥奢뤬ʤΤ⤢뤫⤷ޤ) <3 -- Ƥνϥɥ饤Фιܤϡ.trm ե뤫ĥäޤ 1 Х (Bugs) ?bugs ХݡȤ e-mail gnuplot-bugs ᡼󥰥ꥹȤ뤫ޤ SourceForge gnuplot ֥ȤˤƤƤ ݡʤѤƤ gnuplot ΥСδʾ󡢤Ʋǽ ʤФΥХ¾ڤƥȥץȤäƤʲ: `seeking-assistance` 2 ΤƤ (limitations) =gamma =bessel =timefmt =nohidden3d =floating point exceptions ư׻㳰 (ưͤ礭 (ޤϾ) 硢0 任ʤ) ϡ桼ؿˤƻȯޤäˡ ĤΥǥǡưϰϤۤͤ뤳Ȥ褦Ǥ ƥबΤ褦㳰̵뤹 (`gnuplot` ϤΤ褦Ǥ ʤΡȸʤޤ) ޤ `gnuplot` μ¹Ԥߤ뤫ϡ ѥ (뤤ϼ¹Ի) δĶˤޤ ޴ؿȥ٥åؿerf ؿʣǿФƤưޤ "" Ȥƻꤵ줿ɸ 24 ޤ֤ޤ `nohidden3d` ϡŪǤ `set hidden3d` 򡢸ġ Ƚ뤿ΥץǤ޲ѿζ (parametric) ФƤϵǽޤ X11 Ϸ: UTF-8 եȤ򤬺Ǥץϡx11 ϥ ɥΥڥɵᤷޤ󡣤ϡ"set size ratio" Τ褦ʥޥɤ˵ǽ뤿ˤϡx11 ɥΤ ʤФʤʤǤ ٤Ƥ x11 襦ɥ ơ٤ 1 ĤΥ顼ѥåȤΤߤͭǤϡۤʤѥ ȤѤޤ multiplot Ǥ x11 Ǥɽʤ ȤȤ̣ޤ Qt Ϸ: ѥ˻Ѥ qt Ķ󥰥⡼ɤȤ "opengl" 򥵥ݡȤƤʤ¿ѷȶɽϤʤʤ ǽޤ 2 饤֥ (External libraries) ?bugs external_libraries =libgd =svgalib =locale =internationalization =pdf 饤֥ GD (PNG/JPEG/GIF ɥ饤Фǻ): С 2.0.33 ޤǤ libgd ˤϡAdobe Symbol եȤʸ ޥåԥ󥰤˴ؤ뤤ĤΥХޤޤꥢ ʬХξγѤȸˡ饤֥꤬ơ եȤȤ⤢ޤ 饤֥ PDFlib (PDF ɥ饤Фǻ): gnuplot libpdf ΥС 4, 5, 6 Τ줫󥯤Ǥޤ ϥСˤäƥѥפ줿ϤνäƤޤ ΤǡѥפȤä PDF Ϥ gnuplot ץȤϡPDFlib Τ СǤưʤ⤷ޤ 饤֥ svgalib (linux, vgadl ɥ饤Фǻ): gnuplot root setuid (!) 뤳Ȥ׵ᤷޤӥ ɤ X11 ǻѤ륰եåɥ饤Фͭ¿ΥХ ޤ ݲ (): gnuplot ϡϤοʸΥ˰¸񼰤 C 󥿥饤֥˴ޤޤ setlocale() ѤƹԤΤǡ ͭ䡢뵡ǽΥݡȤΥ٥ (㤨п 3 ζڤʸʤ) ʤɤϡʤΥԥ塼󶡤ݲΥݡ Ȥٹ礤˰¸ޤ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/gnuplot.pdf����������������������������������������������������������������������0000644�0004711�0000144�00006011407�12223340017�013247� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������%PDF-1.5 % 2 0 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vjmGݬщ*9]Bz9nTwˇMl1d>`iٷqQYa"/}e' ^!ۿO~]v1Q߱g(}xk($H <#p|Q=:s)7M\Wswz6,4?wPOtԟsڟϘ.=GI8Ή7m�([ endstream endobj 404 0 obj << /Type /ObjStm /N 100 /First 851 /Length 1002 /Filter /FlateDecode >> stream xڍn6sM@sB[t]Q+K v.@g3Pʐ"!!L`+=sd"x׆8jKZAic1FI'#Kk {x1LdOF9X :ȕH1:&ry'^AzKg>P##*1brFWD1LQa̓FK`?J%r^ʪ8iLʖP6*&$"T2D٨!LJ$S`X3VPFL`^R_&<^]co�qCDD[&e w(;gbge ]ql٥3)trs(P9 ]x+`C�Hq@EqTĞc9*13q*'d�S=n q P-Z1έUI e _V<& +(ZOaG< G͛7t}Goծ[4KJWmеu螳vU|V?þ;QE9>\ٳf~7_mn;Н My~ٟ6E+_OhnvC=vll7Џ-l IYKJ6^`>OS7Ӱc?믹DQ<#v}un؊M(J+*.Ӱg4r{-uԊN5/NZxu&垾u%k?rueQ!uess+xt)˕x2̇)K!*ܫMߊ^>C7"SIJFl_SGQVQG9y\_Hwc4ϴ9GRۅoaxd ?#J>ųחi#٪=Vx܊x[lX~? ?'E8n;˗ endstream endobj 605 0 obj << /Type /ObjStm /N 100 /First 849 /Length 950 /Filter /FlateDecode >> stream xڍMo6s "�޴)^iyWh%Wu_wv@w)pfRLMDcpC `X0& s�eXɚPɂ 6Kd},9 9jC."^䒎5U=Ց%oyQy yAA>{ZkeP `&,jH Ez4SLQ5UH 䖐k@ lHBBE! 4t-4'Rib`%b?a<&ؐfʱIW9z0Ny!Q@&ȵ ނ%Q@{DWQ$=&P>pŁ:d_ŪH %@i0_WX4 $8j@huG pLsp:8&A9T qRӰg z,g {W oLv iZv8xh&Hz~nnݻoWwq\ 7Gf;?Ek"iK8tmGԂᐳ]k,ВaM_Des89{n]ӿ˽ YӴl E~;~m,۹]wvP~!{t۾yh2]~l?.F=V}XIV4C3 a_R>l&eE: g^کѵ"w˙e}wdoS7,E0+}ٕmvpOb!1;~ڹXKt'˻S۔'rn!Y]Ɨ" g41۹/LߵumS>Di?ʯd]y:ۜ)tCVʶ6fz7)e_qڕ\ȯ/ݮ|R6 Q endstream endobj 806 0 obj << /Type /ObjStm /N 100 /First 855 /Length 987 /Filter /FlateDecode >> stream xڍMo6s{^&-EeP}A/m.@}FFr(*!c("76қQaӑVړfv"# X28'@Ʀx$ɤ8x:^md#αBqS䠍ΐ 5K^!y<gp3=B!"'SdB@�m>DM'bqIy!<QJbpi UD]ܓ. t`٫b6<ƛ,pIiu:81:uIx (IM[v! EcFlaঠov*ΥPL  RhF=ES!u8Ǟd 1o$8&p%N d� C:ȱ$33)@p'i\*VtQ b=AA,N UډX>։ Vi:ͧOtLw㗑ai~DW͇v:u:O\E1g؍3E~'YjsQxR{ne}뚢}SZ>7+P Wq?5 .#WvYP̓+yK(cAVW2a]\D|%am_uK{(zy ݙ]Qzcߗ[ȳPrv-2{T_x}U>Ls;TEi`muF;0l7/3?۟6( iwf(킯mi.yKO]WKg5Ź򯌦mzi0{lf}NLC[VM8V[qm]GflOU=eE9M7~\ x\}Lj;_\a3gu7ng3ߙw8Cӱ[۩^국Y5Vr endstream endobj 1007 0 obj << /Type /ObjStm /N 100 /First 949 /Length 997 /Filter /FlateDecode >> stream xڅMoFs{NPĐr̅he tkw*(bihgB8$5LyOKH_HRy6"X" GJ B Rb-IbR^ڲ/8I=r%d7  2%Kvk [KV5Hb)+NeőS<9^hNI(rH а)(9x b>wH%EQDCі-K;UX-/Rd8n 3?� Z"cq05@SJ *"�Z΁k(LTjDT�_fiPWa,YAˆYs0Y.XkVqC9S,pty)AŗȌXz]4[9P/UA cf8fa!/! YXtiG_Wt+hX]ʱ؏-PP\6,~qovG/~7s_42޽ۼE-i?4V\JYW'5J7)6Ðs[j/һ+AEy? /ilJ}=/*A+O+WIw;KNҺvM]%~8N9-NM6uNXjj+ݾ|sS\ixlj+iW~yNԏTtáWR>.}>OC4gWs,>8+n藕8еZca}iܯW|}oJcjԝN/[Mcyӹ ǫ:KտajVĿ|y \7]s̩=vϩ.TvSWnPm3Wv۵PyJkX 햗Jg/4CL]MrF:[y񘆡aσ3rE7k4svm+f,[y endstream endobj 1208 0 obj << /Type /ObjStm /N 100 /First 950 /Length 879 /Filter /FlateDecode >> stream xڍnFz>9D  \K'v>U#d0nS35nH2:U1㯓$FQHQO#� 5H,^!Sq 9eѱjX-7)jx6v>}+`⁕CY9D EBfA x%Z ĘQ9fuԤL ȂH*Ar5f_$y@e;QJq,Yq$^p>(nh\p+Dh>P"Bw#<4T4'XjInʈO3Y#+H+�VtfܗZ9LrRO!h5/ V]ͣFnq!cT\J*])*z�&n|diYk4LJ:)FuTA[K 5/|xn�S"3__=-┳xǧHܩvR^:~'nNrLu>=+絼}{ݴeLrχez9g:i}ڴ,e?mIþԞ7 ~N0.==:npե23폐_ćsҴ鲎=/uWMx4_tg_3`nnV7`ncߟ/3tf؀v6ZwøJ}VEtI:kcoBvƦo:/zv5+7aw ]*kNYC5nIF(+mafi8ӇݬF2> =wwkLi.@?4i&"IE)-CvhjN5TQN endstream endobj 1409 0 obj << /Type /ObjStm /N 100 /First 947 /Length 976 /Filter /FlateDecode >> stream xڍTMoFW1.1ܤ 4'%)j(�%$^*-P,}G7ơMUӐUx:OOS HEr=9vH,A>  V6X58`IG d|~dT 0HeMPB蹁GԱSČ#g3c☃@NY:p xC@f=yoCC`P%!,0!P0`vԨ)K':)B*:(#: ύoL~'to6*7* AxdT!!>*T9[)I$Z$#N;)'c"k04i&@F^&#<J46aQŒfe`u\+a~NFG[,+^j-,&i`B4EFЌ;#jc7f9 6bV Xp`ZVspMI&_5߼}K[8|۹?16^лwWtQrSqH]׻4*P/ _T>[gW* ۧom_Ek:]qzLǻ\lZ˔Vu:@ׅ]ZWziobsX< zuŦOi~yLS6u>ݎV5HøOmuvx<M~vL<}8tsQ%(n=TT/v~9}wO/ةx莩&$S7e>~6O+~- { E=lU5dqW ??קqo zkOqËRF4<+#IDX6˒S7^k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Z >4τcl7fxt`~ZҚ. 4}p߳sF ;?̪5}'wO�h�tPC٨z}T-K?V=@'Rݬ$MHrn{zr2!֚/0(aI 7H&FJЙxvG~7ւԍ' o> N`;@xE+ӄMvo^r~Oi endstream endobj 1811 0 obj << /Type /ObjStm /N 100 /First 949 /Length 1094 /Filter /FlateDecode >> stream xڍKoFsL 0rHA i-$XΧjqERw)A::ū9)A;�׊ 7 81RPH b8HRP@%@jJ$HK21ʂ]3PadAy̚JqZB;&-#0C1LAH20Ncd<XVX: C-5V�hIp)3Rdg`#cT0^V{4p3,Q=giOg`3D5BW38)#h F ?J[E%9i)IL,!haAڧZ%((ɃZ-qHFzIHyTTʕ6dr,̡<Ce84IIOGMRzT3fR(/7)2M:ch<*̭LƩÖDɍ&-h<UjH9%]G<j-ݣh-(ةz xTYpEdy (!KE;-!eNOa~wqa;X)KxzcDLM lEB.0"+2z9a*2W SR?On066yVMݴ]_ufu[M~^4}9ASWLS&+}V7.|Xkq:`U .{ŊrV쵱{t"eY4eI[YVņ۬b"h-Y"J`2P>KVX w4EĜel+>,xϹEL+6eƮÇΫ659ƁkCnюf#:nea˪rv?4NvcO$\)7Tt[~o6M9VC0U ۩ENd!/~/% 5qaj-NhCJ6l,Zӻ*ToX/gdDozKyf9R_}Xmߴ! E?A^ endstream endobj 2051 0 obj << /Length 966 /Filter /FlateDecode >> stream xYKo8W(QٴhHw/EDt;$^mm8lY37f:\"qY4J eVV<') #KpWMoӌ%)* ˛60{;M( h$o<#UmDY&1ex*ctb+6y!"~M6Y`JXXd 0,ce*!8~jt3h_EtP tNq[Y|[)?n cQ嘋!k�!T$®463RJQVpemw@)c+,I<?r~8g?aBPG2s.PؾUq~jT'{V8u| /߈M@qP%J0;y2xxeqߴAbz4�,zQ+G<UA]GcdC8n-@c՗hm+ ^DP[[mw]Hbظ;3/A~10 qJOS1wŧ.tm¢~޷+jS ;fb[0ܻN*߬ ? +LDq?Rx/ 0ިϣ F;ƟݮN6N#vRDFgwFu JcmɎȯPj+mJjF`2)� 3*sJ u'c`IIN^-785`З|.WMV6t+cBƕ߇t9=߁m8ln#,KQs*lЩ&{9:Tga*SaKu8|9ƪgg>m_(Tq >1\z ~Y6O|� .� endstream endobj 2091 0 obj << /Length 1073 /Filter /FlateDecode >> stream xY[s8}Qt @lgmާ2\\m_$N;mR=|:߅rvvx<4rH}Y-{pכ7˅ l+?J@+jqDr bry<>Ț!V<<񾚳JDm o1{7(!أ< )vZte)d^W~x x~χ" QEMh _޺@>@l!_|Bhr*Vq#)?m;T5 P]D@>~J"%G _ɕR85cBCcŃ9!FPQH8s7%$p0M] ۵ã_#+Q%\r=@:PGQd Svv|x4o\׭l&߹W`:ͪTڮƣb,TkG0"OEWEݶ )pã ̫LjɹVMjwObE$]\R꬏Ep{,Ua=U!/Hm׆q'*3 )ze9H%* B9ە1a!?9 FJ1pc j*Pq~a>t]S{t?$ʿ68v"ak'8:~ ݉43>Awل̱Қhi`v9{[RvR;J J]TU.uٞ"fZ`|FǕGU+E߬/T)8Sb=ݪl Yr*Ƽ_JM-F=z$纕QUye3>wYD1ZEt,%S'SٗXr=q~}D( >!" vN/Rk|2@);A,,2;{!baCC(D>6<d.?t?N"$&v1#i\%<7GSIk|WYJ4o$]_iN]wu2' endstream endobj 2124 0 obj << /Length 578 /Filter /FlateDecode >> stream xV[o0~W~+tjʶM>8Ieg.)Qu*U ,|s|fnȋ ނ;0\A\SA.G$R5r)ys,ٗe<_+t;` wt} ̹ΟߣQU`"+3kz,ID'X/iV JC3(c jlƅdxκix&VU& Ϗ 'HMb NnuZV`D񇢞�-R&ٛ] Q\q4xQժ�{yȏD+vFf'ofe {<GfnW.́f\~`+c9iC:ǿE&kSZ+#țWv6e":-Zu˒BﳼBnHȫwֈi1vN2S'3>}`bRhd^Ҩ<y@K);ʊq ־qVGs bRGYm(Mc-R*[E7C=7�\K3Yjcn-uy#r9f;TI]j/G_>M^>?w+R endstream endobj 2015 0 obj << /Type /ObjStm /N 100 /First 1018 /Length 2719 /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U Br\()@ҔD`\-2XRI#0މϺ8t T; Ertzc<. nFC.ge+jTU1ի}f/UgMǾnO6k[K̚;.XtQ</2]כV(Ms!)#UUYi6"~v]##88fȟ$4QcNEL�̟۟>R8es-Lt2BǨa{rkDl;=Eƥc<H@[s+MDeҮ]൮'[vl\7ǥ|Ugn`b5٦(3 fQ ܸhxiۚ%s@Ե#!�@?4u S@0Bߵ1gjK{QpvvqB�" F`Q[ʊqQ=kPm472P9&[fD7/繮ߜ "obߞW =K,v5O;2BRQ2euM?i+6\DQYטj5EѶ$:yJ5,Va_j endstream endobj 2344 0 obj << /Length 1015 /Filter /FlateDecode >> stream x[nF+$dX&6@֢hMMiT;Cڀ(�[9{;WE$3V#7ϸjWgWI )(T 1ud,I`2z8[-^/8ގd�(>hm2"wT&D_?`$$bRd<իz۩$eYR�Hy`1GqdG)def`E20p3N]Xen?܃ejcu �d(윣�݁B"K30twķekz=Z(a;dϨEgs <4~*uȊȊG |l|٠4\ŕc"S6"תoO7Uy1XL83F7\<Ԏ�=/u[ g`7\M]M%1<G/;;czԶ,0YVot�Xp@3-llfkyoۼT}m  "s(U»ܶ m6)JNRAx�lV.ȾJԭ?3ʆN DLNcyUkպV6 M3̬5w)8bZ֦n?h?!"Do>L b!FqwTf1&!exF /zVK `tk,1UیCI&/�q մ0=`F\!@39?ZdTFިV8չJEͅpջ\($¼#| e/H阐`2dj�WʁVv~oF)A.&C۫O! s!>e>Rԭ5crpw{}Wqr1Ld+ܛr3? e__Xs?Z>GB R/!B8V!q<2wxq���| endstream endobj 2251 0 obj << /Type /ObjStm /N 100 /First 1017 /Length 2607 /Filter /FlateDecode >> stream x[Aϯ1ARJ5N 1kI013Ϳ{FLjSݚIҫ*u9rD+9ZPD(JcÂ&-Hꙭ ܒxဪAjߖ ]ƷJ/oAJ1U|ќOPrДgx*j3ct*9J % ǵ7ȝ ߖL<<t1\RYY dJxփp\O`s0|1\)j-~<L|:{2檦>JDC{cT 5qUgXe,E-Vk6SkPKKN&1-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)~B@:luTSl8ʚ9)e[ߊ ?x(bLNOcz Ҋɓo7Av endstream endobj 2392 0 obj << /Length 911 /Filter /FlateDecode >> stream xMS0>}ChK\3pgl'8N@u2 ʗf�cѮv׫$,b^<x9Bz B$ "&BO�ӿ12E<jG�K-X #Lk{_{g$xL |X_ |ƒ)i651\2C8;r&W1is*T5Ҿ+$żVpT9J0)ni- E˳D)Qgv^p8Ij,L|n3bn vVq k.R1p%tN5%R2UU 'FFǶ:@%wk~벳.'dTm"9_C<׳@9=@P�s_n:QUT%Eo{h אp8+::/ފ^'2Ğ~ʤJՉm% dqUM<+'muH.א<ɪĀ)\C*MjUG&S$N<LMKKn"]yĔ!e<peƫBo;t鉵iv ! DҪJx:v`D+`'mzv"[мN"\$O6ݼlHTHQZci?,E5SJ%,j㍨$ J݇o߭I'xݺ|{V.M5LAʴ]IR i5mJG aY<UhAreF͖T79CЪoB.?J$~ROգj{lC-FjT8]-ߣqk*Ďh%G;9dkSK}7Q6s- `� &) endstream endobj 2439 0 obj << /Length 734 /Filter /FlateDecode >> stream xIO@sξ\U!.JSuxl$]Pf `76޼5bBGX'Ϋ(w˂C{*JE.*JFU9MuV٧"~ptȮo۵@B"{%)km}`)J)yBa<e̩kSIv<zgCcZv<u. G;g.JXl0za"T?* S%in"=f� R:^¥ GzLĆi o5Ҩ1(1q%:s^ךeXQ$ظBvGɰu."ugyPO\yǵkk'|1_53@$;C[/dqM/Sj]+%.qJ,GJqo2:ȴ*a>7bFa�iI0fG1ӘZL#1t/a4&߀9S9S 2D0}uMĀ;D)i( 26m̪/g&Mwq< ËuruzR'c(&eQbOHMN-RhV*bA.x$C jC% G-^wQA5NGG&gop& |c(0m:L7v'A lB_ &C> endstream endobj 2346 0 obj << /Type /ObjStm /N 100 /First 1019 /Length 2500 /Filter /FlateDecode >> stream x[]%}_$*UI%bN Ydه= &f&9G〚C`]uZ*N͚-5 4j^hx0Q-"4zSЫA$eZ$[zet78/2nAp`y o#-șQ;nˍ› ^:kA3V)k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/Subtype /Form /FormType 1 /PTEX.FileName (./figure_newsyntax.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 2632 0 R /BBox [0 0 252 144] /Group 2631 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 2633 0 R>> >> /Length 1916 /Filter /FlateDecode >> stream xWK^5 _%,zI XC,UGSv2h%7>ywŰ_/~אhޔ#zYjNūgY Y ||_o//\_У&ěj-Ͻ~gb߅w|ZlK_jSRkM{ކDw5ߑyVJk\6gt5Q^mM2Mc=x[ir(=CӢ><u.&2,SJNl>;a?9-h\E!(7M__IWÌZ}(f ^l-!u[@r\TXE�?`l9bqm)eȹ Z5MKI8dT,C@vys9qcg dx!cq-tc,Ym.#jZ^m Z.HEqRƹJ\V4oCrd<M7 -WAk-uybc?Q+y|'�p+^6#ސ%.[}k0` d4Jae7�9�; xYx t@˒c&䡡7 h53"˒od+RQvd4g$@ 95\b;lrQx9WXd�\88%kLdސ$N`tg_B1ʙoIG1J|ȿW) KVRq2Ҋ' D<s� /(5\o} ˆ 5|@J~ăa ZZF>6 nj׬nd.VjoG4T[*Y"7UI-Hnj9Q MR'u{f˨F #)lj+VnWε:\L ζ[$-Segu`Pۥl,%C-+ ^ʔ)ʸ+bŤ)p810 Th([]È eˉec0_KcM0Rn䃘C& bNSD*5_\*̲͆:|T3Va`bB )"*I íߋղfth݂ #܎TbN0sIU& w\s7;[`2vp$%aIP=I (YDrJ-2"=DGv O7"_߈3 4$9m^# gr-rQ6:j8wpd<-# w;FC]xNGR]^f:kO(:KA8&Y8EWAV|& :M5CBph(Z'~{*V膓-tmu s4Tܮʷc"yBĔHR+n0J" j_�VUv%T< UO{a'ݰ Wf@R2/㉌ڸZ0R )T԰,[^\-0k8UQ6R?B~j *QTITkT*{T+c*dҘZFhfjځ ٤Q tmPU5yVjcQMXQMR9ioLt'xhM&2L<9xrQӥ\x:L&<UO *Uu0/ӓ>."?5Y Z LI5TM-= =&5*o@8RApΜ X'V艫1�>֍6؂><VXr[cM޶6LFooӾ vd{ܝjK+'#ZitB7Ȋ endstream endobj 2635 0 obj << /Length 2637 0 R /Filter /FlateDecode >> stream x]Qn {L_HR^|Cu6,.R  Dav/Cq{ފ(mn^ L8kêK_d5eP|Pq ~Ó>0�(޼D 됥as4Ju Qq/{"lCӾ# +qu@?/RC#*2)=zƛZ˒L)q H^G]f]?bd& & |,3g"6))6x+g]t X`H endstream endobj 2636 0 obj << /Length 2638 0 R /Filter /FlateDecode /Length1 7268 >> stream x9{tTy%d2/2w$&Ä rI2@xL Hf  *X_ (tk9Բ =cK۞]q5甞!HTd3՞k=�!$$K [ȋg"ذk:.}c-- xzӝX8*Y~M " {LglqOO 7!\y qBj"[G4B^aa ijpͲH<31rFF9@OaF0`˶mY;uwV%i^y*Uֱ�LI}UUUn](^s_b4ʳr SXԙa%ǘg)$oQT':!ळn)IZ+*xW?jAI6/K �V:_TM|p&)o۳[wĆ7L#efM/rbqy\uV=X9E1ۇ@-"/DAE@` vrP\j|ȴm۶#[$D@OUԗD[aH1r$6ay+K@Wg| lN=۳CakKyjc+>ҩChshk!ifn LgB+hp:ృl\z6�t͒$gÐ^8k;0 ngUyK@b-9^̾ms.VpwV0|\ypR͆iӼdlkfys<l4Ê⳹ V%*,K%/L $&E J/IpP@X 5B tfOKCYJ`XU]RFE˲+T~%X$cAz bg($/jOKe$[-Q5^mz")OtcNr#n"`~C|S:<vOo;ZG5/e|uF g0F-%Icrp4~7y|`j0XkE"чnDŽ| +}uO҄aMK`2}̕Mt-"DW!rU>jZ y�0u9yS:<Ւ>GE\ N%Щ謧] vA;\ F]pg5<"c.hwA u.y8+T.\PiH!<ˆ`['Mjb800h7#qǼ86 Gp׏g?zϞ}1vM;0*u Ux&Ľ>i*+&) +]pqˆN(wQ | =~'$넘d'EPa Ua90Y~@La{+nT2qjg ΋Wv#? ٓ|p?>:p.ŧ>_:ǟ%7{I:]5OO +FEpL9al,T=2F9ej4F SnK$enW=BPcg[tsU N}jj|v(qg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b`=p/cN%T[eGZS˿BO,<`uz]J"nH endstream endobj 2841 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_boxerrorbars.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 2855 0 R /BBox [0 0 252 144] /Group 2853 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 2856 0 R>> >> /Length 773 /Filter /FlateDecode >> stream xN\1 )l;l+U*uA;;ZE P>~24!M&رs<M`OyL X.m1_̓ANڀ!z Dqו{͜_4p*s 認{afk>ߋyu]Ba:9rnv7ӻ_?r~w7}ܭy8!JZlc =69oB% 7[I|>lc&,I?X#[�g,xЊA-k# Q%Z (0J(⌤- R0]Y'Ad#:bL\G:s 5ظo~͡Ũ@q U4|l r^VnNX#s yj7O4`nH_5kq:F^IyBsrc!_8U/Unzx2Z Ӻ{2rA\©z, )8f߶}R}T5ȧM+ t0-|CV5!aAd#N[&:!WJ =uNںpD~5nwYٮ&] i!�IS!Jwt.iZ'7@(X6 :JYx8d0xCVdVVuHoy!hB(kLgRה%. McDĿdV*b!47g_R> endstream endobj 2858 0 obj << /Length 2860 0 R /Filter /FlateDecode >> stream x]n0 E /y0"jaчJ84RI}d4�ߋS\�Ż�Jq#NڰE[̃cm 8wFY9\`$ �7/k3gԯ&@$*^H}'ö؟ssu:Wy$a%.n3!eWehJJ|!kYRa4̏_2ˤ3VY&ϧOgUUidqN=#]DC܀6x+g]LC endstream endobj 2859 0 obj << /Length 2861 0 R /Filter /FlateDecode /Length1 7232 >> stream x9 pSWv'Y-[zF?H F2! ~ؖl0J&2`!8|lAlaE&Il&-ρ:)mtmv Oa-'ɘt3Lu?w={}��9{7<!>:߹]rS 7#b0x۷7<]89YӋ63-'D<@ٿy݁6g\yۖ=�uG^I, l"Xћzs<9GoЇ;2;~":{8ӎ;OqȎ;nרeó׎$v"֏4@#G,6Qv1Rsv<J;vkȵrVRfMdj*j`UP!T+˹(^Hj+}IonwƟFVGM~% V6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IhbjD0F{ܜ:/_ 94̥:[KQp90eI`On]^o_\͗5iSYuARĶC#Xzޞ[#*C >H< >DWKIr}PYZ'i$",%�RGtFLOUdPTlxYq։DHBXgd"N,rbdJ #/p%֏iCM괖5+ I=_] <o"Cz(�5IsJUf(Fg(1|Ir,~GslQtyD UDZ޻IRd$*@qD 2]rBT%4lw;i KB{DUi=. DO^sT\;]শ&Su*֧@P;WR0Om%D^Ju*!ZϘueDw*\t6HWU鋲# jijZ:# Itצ#4(E8%F ! jjUC aYVKtAH4oT©13[iF7M)Gd)0IQ3$JSD0R|5j(fK' z)"Q_Rp̣Y9m i_�M1 D�̘jj\A'ƯgR(7%rzB/WPpihrd#İܿM"/Mmj.=lh¦Z)a +3#/rj3yIKCr ː fj%^R�U!4x3fpGΒZX[HW]du3pq a`&SrQVL\Fz0/@6IkZ5ƇW#NJj;/9i٥P-+.~r6]+AʽD,5C&y)m$ˤ}j\5 _g1BHq}XEk"^:KSQJ* ~^bB NL nDv|ќE `DZ7?y>Y_/yYU^)p\Zu�VKfAsC گc=mizռq^ KyA[=[i}wZ�Û{ 7^�741  B=R_G0/%0jꨦ8ʈ#@} .%7E2l aYF}Aix9C \֞Arqq5 _ܧWJW\V_|2_v͗|r)|)viХE4B%:y@](^_@<o-hh|QcWiN<|94?'>Dž= C1Xѹıǯ<αL{<Oո Oe6\Ej!YDYIDY,仿]}w>pX?/op;;q;mq>9baPwd2+u+b71,;JizRXGf^k7[XJS٦y:S4ۊPذP47 7>hܐ݀/t"t&+@H y] [K޺X3ͻͼjQ#885&d QqZZSگBG0ѽBI-o1wIqXvn۶ݧhZk[ tmm`6M}!#>F#CaD_JIoKO mo-^ endstream endobj 2845 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_boxes.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 2862 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 2863 0 R>> >> /Length 355 /Filter /FlateDecode >> stream xRN1[Bq^Z$D.J# DD( R|v}HNwy3co}rg,Rqp#LeLʞ :ֆ<u@6/|W&:Sb!<A0p.@`Rlpٛ\(yd_kxY\,: 5 sx_^h9rճN@ W"hrD^Fxh8F)F H *'4cLǪHzvgUC#&8TfEL&̖h. G:t Nv)(a8YIOլO C�4u߽/T E endstream endobj 2865 0 obj << /Length 2867 0 R /Filter /FlateDecode >> stream x]n E|($TB&>ԴIYk`4�_} ŵ}n PYv@<.%€@n˩w s- %7=y�śWau2V~pB{k?!ɼoMdBenI K Z7 +y Z~R)0q~Lc/_HW<i ī̫u:zs}ϧO2?n[g4vz4oX]t p endstream endobj 2866 0 obj << /Length 2868 0 R /Filter /FlateDecode /Length1 6832 >> stream xX p[Uz{%[-{ōز";!7%;qbQ!؉%!!J *L`@34e\,nY؝ ]^)nN%Xdǡt3=yqν׀�)Aܺ39p[7;0O+C+@#�Soζ~5a/ًL~ 6"z~=_q&][�O>Ktm7D8o�WG7}^Sٛ5۴634s6sVĭzs86[nbyˁ@5́8GxЁ{Tn* :T$JHDT Nʁ FTF?3p` nʖ[ԲJk6snVQl Ҩkk몴%\g׻ڝiܭ|.?7m6Gۋ=\cɫ)Ү#{60tVuƁG e{Q$n7fk$nۜq#8Dn 'F(;q܉URtʼnI!ѹWya cPg&^kj/tҵeKjV/vNoV2\2S<|5gir+\@s�$//,yKc2"<l ֹ0b=j5 l;EX%uXmKVzBD~U;۹ |kjz@~P=xQlyy^S{F8798Nvĵa'" XKĐ&( X%(묪8<ݳEM[[̦5jpحxHWB7]wޟQzEgji9Wϓ_䙔^{qzHġ+*bAVaR21ce3c1klm\ε)ڥ|Ymz}vGˤ]S_7ox'NMSN[E@FY:2+3lJ75.Ca$npHs.N0*Z\8g]8f \r .]UY ETJE-*cUvU}iNvӕ -Wegg`)|z9u׽wSnƚ~_'>ˠ":7>-g+ָv~֪/0_f{j<^AӞ=ox>1|> :E<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(| أ6ؚ R8EpꎡT}EI -55̮#p20FH < #O3qCRؗT .Knz3E2^yI 3'9+qyk-0CV8jm"]IE+t4dL R{+Xs0 0D&{yG =�K=nMp/^ߓ!^(ijI%jqtP$dKVGVv �*(Z7lzq@?yx;U΄WAyf8NVQiCjFxS e20:R\J~ 1*FimZeo�>EP_CUq/.yZ~?8%RS󀠚2%+}r!=ͩA_*v[!{ĐxE@֑7J,Clt 0A̅BgYj,;m&'?\\aoGdE)jm aXZ-Ԉ bM\m-0yp2?P@&:xеNjh@O 羣" r,q^3ɧ25K"}0�SDUҭZJڈD0P(L V^$ve Omzl΢;=ZB*\&$] wt%3ZqK5 湽"B8~c8JvOAޖۮv+U1Л JS?jT^ט' RY 1Q\ev lrߺuFݦV;H=_3~)D k @dD_R{eKKd.D˟\~rw ?,&;d'(t"LULDjR^槫U1 _s}K#~U27#x\+{7)^.dv%S_[Ke�[ endstream endobj 2869 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_boxplot.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 2876 0 R /BBox [0 0 252 144] /Group 2875 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 2877 0 R>> >> /Length 895 /Filter /FlateDecode >> stream xMO1 +|Æ$cW*!@;7ġZ *NYv!-!xm'owLj7H ad~ :Xø a^yxnOKqޟ8 .@*f^:<4\^S]bEÐdf-s^Q3-3\eHz +>GP[ Bkb,-gM^\H^.7S B0:&Ia5|�Lz*RlCԫ gN]դcvR;cM՗Z_۵.7OB! ~ [ƁR񗴱xB=b1B`UWD$Kާ7b %D,Z1C_ BD.,DL9U9:tӄMRId\Lɬ] ch.>[C'<กIΘdÄjÔUa IvLr7F0e'db&iw)f*J}2tBe|9\Jet(BEz;s|t\)$wP .}%T/T$ʦ۱$g.iwCVsEz߉|fc|z[f.VlNWmE[cL/&lF6>sib;I>|Kdw+kH|Df,J+31<OS[U|*څ[b(a{SWOXU.q&p ޅU缠R^%P 3{F26W+U@Y`w'R'h23SBȞIvP$+ /H*ݿ4Oolɩz{L[8 ̆ cdsncK endstream endobj 2879 0 obj << /Length 2881 0 R /Filter /FlateDecode >> stream x]n <ݡ"QI(]r؇ iD!o?>NolC`M16V\$„e7r$52X@?saÓr>�oAa0vuW.h#4AN^ -㠒dG`nkI)\k*&-E ȦIʧ¬2U2+3_*_2]p͓\\U߽]:-3.-7x糪_W2 endstream endobj 2880 0 obj << /Length 2882 0 R /Filter /FlateDecode /Length1 6468 >> stream x8kpTeۯ$~&imHб:\t'!H:0nH "` *AZ)q6A7ZuFrXwKG2Fݪ"èeDT/=;y�@.āqX \zG#uS^WOlMonQ;zc=xq[�DŽ[Gu�۷u; v߼mc `>+?%X쿭7?#�8X?m'@ˬ<B`0ᮒvv$Fj z6kY-6oᤙTӻwݳwj0z.u pV? t}k`D 7K_.`dr"6@`r B Np FK3gFod4Y]ՋWr ˤ9:3JEE :ۯ<<#ս 'މp/3~9?ԯkֱ0l6OM.{5ԙ4bКxyj ',8l gվžU.D ]5G^ zFz}A)Lq~y̅;9stAes3|nm ,x\=@J.C(É2.hxi"o)ƞYwѪ傎%BP7 䙿q"5�zwx=p<WRysO&paWKK͑$5y~33y]s`>l.JD0Y5yź<7U\]A窨l "sāHUrBNTpF+ҝPV,cօt[BoͺvS7l}{C;ཻv߼=[_r}H1gױrێק?Нw ]&ʻRZm(\hy-.8aa#FHriJF-RmԪ.qhbA ڡ ĪK�Ўfa|j25|Ѩ[4|oՊVckh3?])  Sp=v B (K5*Ϙ"ఀ /`P@Y*E-NLW0 3nnݷzemW[hPw/S0_6)[SC,FwȻt |UN욚|�WBE ޗڡ雺=xXJsA^L6(q90Kk2:gѸZRSkx^`/5ш/(؆ݸߍq71Fٍn|VT1?t㘊RAp3*IUqXՕq7:*lE^a+)cga> Vyy.ոJWř`3CG^H}/< N˻Sxh}S= y?<xdV/~JǜKAí,1NHcporg2J\*uImw,53o想$go8&q' 4Եu0@yBh5C:^v? fLI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) ܮTXBQY7Qc0A.(R2WX 5$}ׅ\] ~SN_lm,}yb唅a 0e_HspE Y?sLK^ˁ!eV74Ǯw1Um(m5~~=L\F :( {=j[?G!L?Lt#J.%ŒhL({kd`)),`8Mn{HOP`اnlL!4,$HHlhlbl^6o a Z=|i4 LY}{i[ јfa6~Q( A5ԥ.eP86#OD>PȔ\ഥoHΦWYǃeߦiuٷ7R,'gXl_q22PC8{_ԡ;[-؛-C ~ͲLEݹ. Ua,�!˧*1OM4󗎮C^ۑHM<ȉ+> Hqf�?-X NDơvO$tj"R8}�R NA_'R#M$fڔ`Ԯ%T=λl1'eʝZdߋo TR։sȱF ʕrm/*5<5Ca交{&j 9b)f.tԜ E9Ֆ[.";|�7c=fV'Sӫʓݯ63ӏb-mINbd{N0֮sسk,>nmR֛?4yO?*DsDꊢiF*ԑ{:mg *4: ڋ*F@cM d4rۈX[ݢ` ˱E�>|u�J ^=aW~Y"OUadk ? endstream endobj 2888 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_boxxyerrorbars.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 2901 0 R /BBox [0 0 252 144] /Group 2900 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 2902 0 R>> >> /Length 338 /Filter /FlateDecode >> stream xj0 ~ CT[:r;[ۭvo?EIX H(\0YXEb8Gy6o`‡ vT_4�<:KPb@(#z/0z+L< 쑼 1:$Ijc&r m=jmߗ,#LJL6@iE\xBz !![A\xBe2ȍ؇RJ9YڴPjץ+LERI 3IODj1F9$ÔuPRc/sy:G[US%PE,G ʜ{~Fb,fۅ9$;+ endstream endobj 2904 0 obj << /Length 2906 0 R /Filter /FlateDecode >> stream x]n0 Ew}tJ0  eAV})1H{ .sgM/�Xq]^"8+vK'22p^D@A5 vOjA�@zc'}]zFչEۂBM^:Y2;Eu=C(ӽpuD? E-4ZW+*Z~^4uM< c)?0?D~f~SNxɼ\G/먯g{9F:y E* 2F}?=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X6%&|P^C0G)WgѠ)|u ) F>ĥKo/I.ȭSC>_]\_0z!'z-(7\zwZN7#UK!lDDbⵉɉG}d}AzN?4 OIOqs#'zB:<?v|tY}d4G8G Jai~Z:ډבZV%A#:S_Áw>x8t_⾑Ľ#r팔I;nH77/=ݦj;$fsUx* ҆2m$ h%_&sGDکOF.F85k [KIuOMׄˤ咵Yj6n9Oφy5\ avU;v۪tjZkgP\…FǑ@u4Mw%sdN6toCZCתUuF/֪Be-l14vM#vٳ3:vΝs ! #F#ۇg'MlΌ8}sz= endstream endobj 2894 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_candlesticks.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 2908 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 2909 0 R>> >> /Length 670 /Filter /FlateDecode >> stream xKo! +|lK0V*U!ުͻJF߯1@{`/0<O7pw2&JdU 4sp8NhjZ<3MT#//we?*m3iJ9?N;a;}z{xտ맛q_~!FYo�h8_"xb%7U2+Y筵l1tj0f2WHM<;:jkXr*):E=ɉfږMGIEr1NV4rY,ؠM\gdqђ6V6oU+| c~> W'k˰ӒƏugwBA#L-}H5h`VʎL^,j&jPd18%}u*@vOY9 k(PI bPVs_MtA IFuVsl&:X MvJdd0A61E`fJ=/]~+;M3jNZxzE\B%ʚe 6ѮP+ ݎ*=%\+*q9zV,O%f;PJ6R WI9 aܳ6o~^*W'ky5 O"i5ry endstream endobj 2911 0 obj << /Length 2913 0 R /Filter /FlateDecode >> stream x]n E|(yUB&>Դ"5TpuɮscMϪ�2^!8+QK_5uNddn%aRBA% vOzA�@5zcG}][չE]Ɓʽtd7&l{BfΎ(d h\Qw<hSQ~!.HX"Edd\(f|:TgOߺ׈Ghңiws~nČ endstream endobj 2912 0 obj << /Length 2914 0 R /Filter /FlateDecode /Length1 7456 >> stream xY pTU{t'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xb)Pq=/"Vqqx1KY û9])%.1XNm wW=0-UNjOo/V`m2fV-=Q<!sBp߅JDҳM8D:oRZ/+(b,<Ƀ'-_k)ʢ!%4=26Sû_l6eSo *S}vbbU5k1?>]c.؂pӈ^HD_ ȫdP|^#knNsI|\.+=wh:L1Vx<LBzP k:&Wi7}MI8<𐋷 ^,_t鹦2m/31r#-8=BѬ[nmO?(d"Uoq󘸭񡾆%ĞԹ<*<!cW F K1=YM�"\Ǝ-F Y-�o3CčJ NN -DB~ǂo 2s1h^RRuNH;n\c٣38JnJzPMlP-V?r)j)I)GOGz>CׯwW,ET;/פ Bjw}=KTE15z^-Č_) LmNd->b^ҳZ&*B9NCWs endstream endobj 2926 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_circles.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 2933 0 R /BBox [0 0 252 144] /Group 2932 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> /a1 << /CA 0.2 /ca 0.2 >> >>/Font << /f-0-0 2934 0 R>> >> /Length 11341 /Filter /FlateDecode >> stream x]=%qWP N  8@K2@r&:w;kNŪsE޿kß_8?zO}ΏGy?R^_~9^jL?ZQO{'3}5GӜLoZ?xڜnz~y6_~\C?~=Ͻ~?w>GIx  1@x3Gy LHq+󑜿uzHqc9Ǔ=sSRI]~{D|}x1/o6r}?!=1s~]1c9Ǔ=S-?['j|�.=$>@9@~Y ņ]=Souq7k- =#z÷94>q{оO o n6GH7yzKp}[ng|sK6\SmM68:\sl>=q]c.s+)9ݎآ02opO~r|1ʼ}ށJ7_)c7e7'GnYkkF\">0>ɑ5xu<pR˷FҊQ>7ٖSP~~;eK~e i,oß cS+cyb0x]/_xp ᘥnUVk!T΍s<#-s7Wi߷B:3Ž;Z t8wrHg-tk/@d-{λ_baZ4{Ǫ-H}Gw_w."'u~EɥtOzƻY-}?2NÎ>LY =;w7k}_ݠxOcg2y H$6/$Mc?斷f.|F7m?GPaY4i5\5WаuqumxQQ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Iu$O$ m8܍l5ZGX@u°UmXt\A3a(�O< �PF&8y#MyI6mĮ"F$ $Ad |X$OXnrD:WJLML-=$;} t5|BƖg>u i.N&slr08#7b�^3w+2dEyr'4qC_rܟ ;Te~<4+[&9d`*7o;ɵřȜ әe|uzRj-wS+MrYu2Q=NQj4:}IR|LL )gprb,*⪖а&Vqcmbj˜߶Q<}XTVXs7&DJ㏲@4qJ7Iol[$ia f}$BU`^- GM /)D4daȃoaE)L8*LNd ;Y/j?ĄHu iuDZhdCUi)ߎ`Pd#=|^k{vh/_`S5j4~=C°hLiÈ]*W~,Sٯ@zm%W # a=Jɜߕ,6R7U4U9{#$\(儍IQVȶF܊EרYH|?|[)#إS nAϚsukģ!c͊Å8k4~{t1Wז'^?rEXOC[8OF]nC[KX?}~iaD?v?3 4$�~iѩs3?ݟ闻B[}ۿ@ǟ~^ONO~}v#/3{ˇG|^7 F<h2x"j2}+ D" /;/}ϫyB'ym/ (ħ[XqiARq3=o3=kt\=o φMSw}cUmQvٽ7mw7O[ ym;t y-=|纅̅6qya~8՟\l9iw}S~gmCqMsp^(.UpBoF֟v`8Ƴ~_r'Y?+~ endstream endobj 2936 0 obj << /Length 2938 0 R /Filter /FlateDecode >> stream x]Pn {L*=!KUz!mUaqj@R;up6^X#~ a:qVW@hpD9E �{}5n!.#}M.wM.OqSe|Wk#)q RanF"At_)&n2ud,"<6  >7|.7k{ұ汊b[{ endstream endobj 2937 0 obj << /Length 2939 0 R /Filter /FlateDecode /Length1 5492 >> stream xX}pSו?==IeK2y`=+;2&a[ ?4쀟Ӂ ⒯fLj)tIhfX6,OMM Mvd;N3If:xp$b'1i׺w>{{� $iX0#{b � Dz[|o^r�0]޾mMp?3<ě$l0=H]{>wD/޹{k hҮؾ8=7D=Cq~Hd8 t)NN•(^p 4|A W'`R@..*`H@E@RpR&Y]<pӃgM2ig4zEXWzA[N2~@Rە*BLvdxb1 (TVY+V$0w1y.ݵe% ՄZ}(>> |p*`4Z 9gBfoe >쯩|+@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xA 9-xƅh haB qfuX])=In uCՑ\X=r>.BsҔ7Aض.fTٸϡQE"R2lSUU5&-Qnچ9CסDgFV-3*xx5d}ٽ;(2+m|x8[jL 0tC \/]y3Aʎ;ILzamQZ%kkΨ؂ u5sAF W'uP2{{^-R]y:`^ᩣI|@xkp3 ʶ .d]:L,[/.EN{݃6Ϡo.|AJqv> ? drؿ/@\Mq]=qnSG\i#5"`gXS2oY~U4_Y*5PT<I]t#2_:;\G7v_!U8M-;K;hSz/JkԈQ:t5YQ+RRS}},:dž GZXS[4kŠŻFl J ``"J+IGK8,$ W.,@l f>d"OrJEsg%�^@ b KQ]-'8rjw^--v @OAY53')1-=Hq;w3ҸXPE<_xVv{njs%cP.DE/v7w[džLc�$$=/$d>$r}h0e)4(S,}C8d4QoQr`;RS "ы!RcB|lu0[ R0UW,rDeќ1W$QKDp˿P:ο);֚n`sQ*Z\N7Br%qP@} ѬZ-:Tw݀� 2m2Px'S%[F00=}^tyr]u/%b:*z L>LG(;hzU|Gዣ/SMWC.k.kWY�.ݔ֚C)LidA%[ c9 sӏ PFf&z;AڱhY-e�{"WCV8}u`|"_њ2jʵXD_mݞkҺxND3fQNE=Z@ipz? 1^<o۾"{9/~h[qi ;qar/X$%t叔?@nb8ی,@M8oW6DŽ RJD"a(y0Ʃ`4|h�G endstream endobj 2943 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_ellipses.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 2957 0 R /BBox [0 0 252 144] /Group 2956 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 2958 0 R>> >> /Length 8483 /Filter /FlateDecode >> stream xM5QC?wwO!nBX" R>ZnW݋&Hy9Y?l]ˮ}^yzߦe~5}M~{5;3g޶׿oί}_r}]x\zwN|똎i3-{wg__o__~os?v3vH~KfZ[RE9-G(Д'^u^gWI gz;?E_ـPZ??}eBVy JeVwzC8ޛawI gΛ|-g׹/Biϙ`wW6)w4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Z1i#DL܏(nDF`DF`DF`DF`DF`D~\9�# 5 P. qLKy:ȎD;qZĴUO޹(9KAIEeUitEMyU^.^֫iC̥{}]%C\W^-So󿫚 E/"b.>Ԫ^:sEaYk + O慐6%.[^&G=DX2O۞rSbæls^T~aE̹D/}g:UUf 퇽{oq>d W;#CI6 #s+zQu).s=&[CPy02G\M?6j\ܾ]V̥! f }]OU-۾0O6KplTP'I^$nQ?qas^dZ}q mVuCbY-9Ok-RdlQ˥/yt&]w׽ g% ̀t{TEyfuF7zd10/BVy ſ[,YvU<s#l.QKYpSq CQq[(o9י^I̥{̹.?*SKfv5r5b[~@ޣlIr¼\T9'KwyQŝ𕇯<|+_yW𕇯<|+_yʟUj M!TJ^ƏzX rRZI`VfS}M})&ǜ<RV˓!hʩ7dդjD2y]伩NL:L&a0y)UT@B*m r+k*A(퓔 x V){P&s׾Sbi uL�K@^ܨU$kOi2>827ԶSIXr# e/|V�a-z".a�Ya_jsΣQcAK9ҫ9N~CT!9MW u (ge"i et#J rA4V[�8N C�yd$M{j*m?ʘ$j2Ӧ}$M;SuiڥSk9TB;Z$M{ }U~[:<$1hJ SWX 7Ps_ژ]L,d:{6h{)Jyt],#kH]vHXlmIZYpެ`-YBz] aiиHb@huՖìlw5fp,sT17A=у}DF`DF=у=(|X,K99_|O endstream endobj 2960 0 obj << /Length 2962 0 R /Filter /FlateDecode >> stream x]Qn {LID,UŇ>Ta"Հ09@J=.KYz0.€lW6*޲YzܯKĹcMK +l� l.}?8 XۂƑ{U<l#T9ߕӸx0H;!khǖjF-kꚔBP`9c  H'•ȘV-:i}UzM83O~c endstream endobj 2961 0 obj << /Length 2963 0 R /Filter /FlateDecode /Length1 6460 >> stream x8 p[Օ缧%ےa؉-;r`/%q?JRb;%!F,2Jn@xw d'O85%n0v[%n2Ba:'q(tfgv:Ǻ|Օ )Aܾ+90߾o8YM}؎]NPdޑ_! 2:«;~h7h+A]{LzWޱ{{'ޕgZG ' pًWSOeYouNg2qEEYo+qZlLg/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//0 $v5=hoGNU"EOk3:P"rly'.ZD4$ *ڴO A6GX |5vp%"4b5b:.mպ+ꊿjnLF\6 �lN< 4 a0w5PF`l'` =:XhI)JZa~?fF 0t #>` !xg>r!,ܧr̡FY<4D5+Gp} 2VǗtT,["Oos>&'=<Ow[Ӕfgq2YS<ӗy%J't6Mn80!bogѵyṡ2Rk8Ky~+ą8� ۍ8]s(ŦMiM8˟u9%Lٔ";b.ðI0I<y^]L _/=]{̜1-j{c%0MWyGQ B#K=L6LP:y%.:1CۍgJKsq=׋=125 3iޭh1*Ƹ`Nk>[g&{2ŵ #{/4YzF6¯uVk-/ B 2F,`\sHf*s]NQinmCL)NcA46"]?{ r~#<vh[4>/Ym`"sxk]Pdh%NZB\8 'Zǫ,U>f<B`,/xBR{&OaONBƃ?òҎv.??\wѪV<бZqɁ=!UցŘN_d**&(̚@mW١}/?p_xX*73q؍É<m�n\y BT!fDӟ8<\'钾4]-\#L�?&n6̳V N]inIڙbNT W0S|pᨅ=-erNW6tzw!.r$.̾|$餟鬟oo|C(Y9GO3<0�=c endstream endobj 2950 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_dots.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 2972 0 R /BBox [0 0 252 144] /Group 2971 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>>> /Length 52564 /Filter /FlateDecode >> stream xtI#9̤:N8N[忪Ew߬E;@RԪCRR q?xUS>ZO{OI[<-k+~?Y^ |ϊI;')mʟ?YqSY Qe/ <O_?>y7, ^qڿx<  ӟT2F&;>< =N;ɍ}=+I}~<\pv~_ ^GK _|W~'qΣm+pjOU_Ư%?-?T[/_p/'o;ҏ!/fm(<|w!o+]?G)>|Eծ?:&eoQ;wtk%J:akF?g~WQ? .6~,u/3ҡi8k- :磵O9?/Gßk} ϬqǿLO# ΊQ>.<mʻ˖8>|9pR#iG3y ?ˇgT/fsz6{\OTG{V^d??|^>m.i} } >ߦo<?po_ޡ +M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fqZ;,*U 7w2Rth\[)˚Fq*V d|<~{@/ě/ڒ\4 ]Ҵ2t7S%= 4z$W^+G { F?'0ar%fF5,|L�U=Aet~%`۝\fb lVgc6$>$ )gJF}C=^#d$A.1`k@?M338p~ P_N]}$=е!йn'@x]DH�48n% pݚ. G`3BAL]:#L+ P䀤- 꺤ނGgH16ڑvl68v d \"ABƀm]E輿0/[cV>?L7l_#LwښBݭ_6|C>mɥж1%[z�toD/=-w H,KB7d4<X;-*;*{ mQ2wj~nDy~N9 >zmc6<G4MI+m&sjf*as tkk-U VE^AO_ppχM7; [5}1~h 8$GIp( Qs#̥%o/jԅ4?|7~y< {?(1 ?[1ݪ|ӤL endstream endobj 2964 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_filledcurves.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 2973 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 2974 0 R>> >> /Length 1153 /Filter /FlateDecode >> stream xXˎS9+mH id7 B4 S]7B:v|]hYF|B+䣰-|UJ{T4x/?a2ʨb.Y`Q-䫃Hs&:΀uP9/:{y(Np<~Y=:xq*^׻-^`e*"iiLڹyt튴. vm,2}逧,OXӨL؋ב ;`kkl5jYxryTt zzсkqcv9nX+frÉ9{{=^&9wy<6>IןW,?`Pػ=XTh1:AeKᖖr]m属rIykL`5XR=j+HXGxKxV cpY *[B5Q^i2y=Q ı=K85b1x>55()pۀ�[:_yuRZEq-J1knm?E ~&%(-4r\2M3pLn81goklK-(J<1n}Mg1Q>A 1l FZK%; n%O@pd`٣yKyŲX[oHp9K>B�weu@O8`١AIE8XvhP}"C.@9'|.0]B�uVvHAc�Eh Xvh8PJc;,;*:Q:C?UR<.sr*LZ=OqOICO_Ҙ"Ec߷Y_\X܌IX~Z+5LsF'kGN{-u%I#f6).$^"͟Kjtg&#RoCB6[ yjσ׬"pSIF5_0ijiYb2:bLj=TڣN4ɩ>IrґuzZOu4T CL RPMHL-׊mJʆ5HH9kA% (i;މbg endstream endobj 2976 0 obj << /Length 2978 0 R /Filter /FlateDecode >> stream x]Mo0 >vZ)B }hl?&E! WVb'qGL  /SYv0fJ]OJKXal3>)�Hރ0 lOH-={[7"$xX˺?xJf8`Nt ˎRr͵ JWYӔ12wX?~ H/E/a OOŞ*Ιg=+W/3͘_鱺OB<x8xo9[48[?y/8d endstream endobj 2977 0 obj << /Length 2979 0 R /Filter /FlateDecode /Length1 8936 >> stream x9kTT>g^0s0/s# 㠀Q9" (v JZWQc1Fj64zM]ԦĦIӮ,{kڼlMry45afИuw?�BH&+׵w9{/"6µܲIn,FHZEB;1Z[v|G"\5!y7YwBxbM׮_NȓvCi]]"r׆U]AB?F5/So'g̪岲LQFk?w$y :g0 tN NMZ3dp qB9� l ĝsBsN8VERd Xh:o %XbI6A٠\,K3(PXs=PIt|Q̡mW՝vn@3[50w7(U3q恵bEhw[8ZDZv\(rAa.p^.\@\pau,URH@*U~2-&v_eBAY錒NʰU LQ)5ޝ׽g-sy97btw'Q 39<r,fK8a4[Ć(q> n17T´@c+>#*eP(q(Y2}#>ֶu۪?ٍ5W_m>R/σ6~/귈ݞ'yDž^bGZ\ťQ+ 葠Ka T %%I4ILM10R9ޚH4@ˈ)!&QL0 kRqǝv퉎gSCT;\1P97SS'fٜNqd㝞\O8 {8X/~^/)7y/S^88\7fΏ~cgx\ Ui?{gV^8^9/z!./^ xAczmX($wE,]gdP /PdZy'~+J\y9GV9衦/>>CA@ O]zsf !z]*8op p ;̰ fhtfnj. 13͠a z(2o,un(AN+ B(4bS _CƓjK.uauxr \)!jq䁖yГ<ʃX<<(9<)ֱ%오L;r͠zEL08|}͌?ڛ/ ܜxs=_ۺmYԋp?_w�%.$7W yRp(.jzœEaç䨇`$c^ARb\sb"s7ί]o>TmJ=!wݐ" ;p�}"xzԧ9;]nIpy{Cw7SP .zw⏻: kl>Ess~v%1O;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ar8#Ϫ"�GeCxdőw >lr~#4�IJ;H%B8zp q]`⿭6/WO)X'i Ѱ#DE_* @)R A4J/$bpPdsO^j[lc0\^ic< O,bh.`#=GJw YqE}>c$=.ȹuP)"ܟ)I<Ѓ<kZeZ0Ԏԕq+LeE$ ŤB(չnzdG^GH>o?g˧#/wAfxa?`Ǥ@(1}GV\ٜ"Tk2@].h`?uX0AѕC3iĥ;tzbT-θ㍽ pc Ɛł~�ukM@lVS6pJH�${z@u챯?a%^:/ЋϩQ=ؑ~ D/{x_2<,8n5�UB}=x1bƀcH+n(sPQ k{ 6fI i&)v \6R =n=5SeB;<- PWZ`PLylE "M~N9KٹǁFu}l=i|]?<тW^OOPc8uh9xP"h^\T=8 #+< GJLK=g8:chp:[rB‘8Sn �mf݄"+gN-Ud1i_oR� E:*8U>ғx85J9Ƣcƾ]\BFX+TKWA+0lnfqa�8WD�AS V$q4s`V|,c>>RoFpuaM[oQ0W`*0OS8楥E먹upέ#Nsԋ~JǾԾc׋0LAҸJ'Hػ<4+q0R>78(k@D q(Oؽ4fvrtEJ{^,y"4du ;@vxZŴ$f5sh æL<1 6 OO_ekQyQ(d7ad&6'ߣa�c e v牴 ]|)s8 L*&9迚OgWxfSтlR匓_m;t`;�p4 xɊ֎(}[|=x%?O;n͢C1oy)ѭA=7hT �PX Jwۗs%DW|Vyb8|rY!ӿ^A% %ī zuOwp<:|"p)6PowmC4!^ mj<pӞ:I_}4.wL(anT=@gs~R-Rezq<+c%|ӺLx%7r h endstream endobj 2982 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_financebars.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 2997 0 R /BBox [0 0 252 144] /Group 2995 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 2998 0 R>> >> /Length 499 /Filter /FlateDecode >> stream xUMo0W;H C!7a)ҊTɬG(癗񓱰<?ݳ^ Gy`~~>?,y7!d�q @p/p]9wn2Y(dh}2f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hM#r`B~lj:<|&Cf3+i@+_Kau:{emi}C'TmLf tFtn:Oo`s@+v5T0c*yFo;"p5cyNKCr ː 4u`ϩ�qj:yAǙ38\ gKMTO+u!EQ3™S09Fլf.s!C=CEp̂y#=l՝Z1&j`5Dk%(D1:EfBC¤dYeAUS,7Q$؇5d1-);a;"C%aB ~s}ֺ9)&<#S0RԛZ/y#Y~~V-~W ~v},pOA=hF5lHxt]PM-lHU#}jf]OSo?E#ҲO8^ �qr¿ʾƲë7 V(OatjX*D@}#_+!N|+ :_݄nzUG%q IujQ [OX֯%t"|`^C0C`=קP}_bK2 dtt$\߹sh=G糶ᳱgGfXϠ>BK<o+Sd٩SSS))E6!OTN O'NN0_yN:ؾc|I>)=Ʌ=ʍFap0ȡEҡfЃ'Ƨ'='^ Vێ\OfYn=T(눲N]=8|{m#qG=~-3\&m/]ݼP*vu,fWl*^R1m쩔zˤn#l F+/~;7;^dSٖu!>HPҼ\6Ḱכk>ל׌_hxWCeBs[b[@kMonuY}}V E48uuiz+5S+dޣeݩAwOVbh6@ 4yDhܹ˯iZwg 3tĝ;aN]!#~F#C aDJILӅS>pFa4 endstream endobj 2986 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_fsteps.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3004 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3005 0 R>> >> /Length 389 /Filter /FlateDecode >> stream xTj0+q-BJ 4weRl,zf+c 6Q81 /ikz%BfiZgdBwRdjx9ˤX&a!ҦAȀدZc|3 Bizg$ ՚ݝ~߰>Wj˞BR n{mOmmF ơ!9u1(5qwK{EtCGBtk1GCN.h3I4I6=\bf ᚍ&m-ϙQ2jV'ĨX3B6@GQr?W�37HJVqU`L49 endstream endobj 3007 0 obj << /Length 3009 0 R /Filter /FlateDecode >> stream x]n <ݡmJ(]r-$H A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[)uHqCxkޢdi#ٹ=` A$@ t*84Jv0ΞRɂ@C\?ڍH1dž.=; ZZz̏'T-aӎ/zhj%~l]'/'x?!d/ؔw?" 1Z?Wp@?8uyR>\500dCBbǘ*3 9jƊ:4YqaSUzTGP>U]qjig|G�Y G7>.ゐ.!YN*- eNw?qZzE)䈟`j"'lLgz8E:K 5(L/7H)61 086[ٮiɶ)3%p?΂x}#Ǯ(9  nRLѢo43"}u$rXY@X/99eU(NOei2x1[:ײ$K-z_7XgA'/~Xv|q^6$[8[L(FACĊPHA pNjFIބ!1ϦĊC64⾰8O;W@$ϴ T)OIv7B,?Qq<КYRxŪFW)f9~%t7Il z WAƤ FP2 ^!hnOnG=E~aѰޞ*\I!Gk8-"s1޹8ܕR!0 Ig!v^4~f@^Ѳ- ҨɗV6 Ė^$*:B t}:HF#8OQ7T O hYEd g+!#ԀB=B抡!v i;v*. "0T^�*f/Y4+Gb]]&M:< D FUUyyK^-6+wEvvlU6~6ZpӂI7rZ[ôӧ)*!re `՘\*r<1)=*E#.#~}RbӜANd o8!LYeǣqHl  %m/@yd<r~ѧH\>M/4p f@ LK%w*s0efa-B(H=b胄n/G@ .LjSYb +:5/Re\jb)f*)vPѸRLRr@%X9ɞ`$ErT V]ԗ(cڷz]poU9RA?gpYN9HPlBI>LTl"T$ Le~ 6 endstream endobj 2989 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_histeps.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3021 0 R /BBox [0 0 252 144] /Group 3019 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3022 0 R>> >> /Length 404 /Filter /FlateDecode >> stream xN0@9¡x"!$$ܪt";mGЉ"Y{t=ÇA(NB ڊ( ̜/Q�$h |6+J*/]ElaJu?F(/]*PGi-~F~9�:χюZu#5P/is\zs8.~V<]ZV) +i6CՍ, uWrW\ޙk4&^5TNJ\>)jvm3@ iX䮞5襢aؙFu1*+5c I52(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(<mo28i)LYM Q]$hQ6P /yAb.ds< {7?I)<]g܉-a ٙPeGYqC MDIGTrBYNKP w*=zS2:")%d$%5Q3qa)eމEAi:?_.ܶƘ|͗nX``WMVS &D~]R7?n}^ߔNZgS?+e ?`DI8P^릟X|h. <Ǭz:_`ς?J 񂈃Z&1K-LC]m~⧆xxv#yZ7Wcq7s endstream endobj 3028 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_histclust.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3038 0 R /BBox [0 0 252 144] /Group 3037 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3039 0 R>> >> /Length 658 /Filter /FlateDecode >> stream x=o1{)8o!$$u" \(W$WGn6۹ߝgǯ~agxaK/t ^�CpfT e ;ܱR u%t Tp{d><+p Fݜ@㉽>畒 q1<*Jeޙkp>P�$KeZ)zv0tu)vг@MhەV^d`a:)jagQ^)pa3 mb'I!^>*a`席-qy敲)bnZڒS'»Pi)^G=ba78 wb%w[qGb)l{7?zZgH}p*Ce,%QT"n&:!PS*J&^J=QQ7bIƥEՏ b~Enoop%t2zůڲjQmviK{e*f3t8p [&3E^)qSuȣ{YһJH8M[:t ,Yr45?Vd=pj_PhuP~ԠJ0jeM7,)LAC!qWvy0c endstream endobj 3041 0 obj << /Length 3043 0 R /Filter /FlateDecode >> stream x]n0 w=t|)vtu�DjYo_Q RO$Gv{kd~Q/ƊmT_ͣYp#7=�7{i`pugruq^F:Y{&l(B^PyA;M@Ŋ%I}^%y4sA\2sE,%@\3 sCH|d>F\SRZ%&2PS 4#//hhT46Ou>21퐶g,G; endstream endobj 3042 0 obj << /Length 3044 0 R /Filter /FlateDecode /Length1 8176 >> stream x9kXT׵k3/f`^ 08ʜq@G`B3G Jz551GX4&&6^kxI>!MjjM~MՆ~_j$7_ ]̀&{Xkz �! <KW_~[t:ak]�7 ПZM/c�i}mZZƊ�\!o#DB EU6ԖLPr?!x֪_.k�]+ <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ӗ2@lnl&SQ &cq*Dn*<𓡉0\T5TDޗK.E2l%aY?:k}IxC\ھ$p ]s^>~k׎_K=ZF_3Z`*mOt8Ro^lK٥KKK%%.nkW{z!z,g|n}rɭ'qBOE 䁱9=1'Oقgp.΂d9'A8ԲP:jTu43ff,i"8ymڷ{}GtG>k;w|P{}^}ElIt .XW4Kf"ZԽН7iIa Zx7_W˼0/nPJj2=7엖{љ`vR՞Z_x / }A) s5e3lhi-M&nB?4,bil.ZŮ^o}~RBw)yY+5,PthZ0܃y=P5^7?DFJ+ $6:'䎎u^KԂw;Xovt@G #^6Gi` &IvD.! endstream endobj 3030 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_histerrorbar.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3045 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3046 0 R>> >> /Length 972 /Filter /FlateDecode >> stream xMoT!WP,51쌋jI8\ 8yz9ӇI{vu-$4y#n .دIq>!�$%7 Wy:T|'ʞYc%3Q 4]fǛwӻcվ`3@2 bEm }(R9+ $)ʀ+\ nB,^*ʃʐp*uWdȶj۪հjo>r_uHo˅ޙKzX)lRM Vm=wڊ/Ua6O}3B\[`Gb1d#Tk^mAsU+]͏}"+|ZQ/B${EvdC0{\2\p[p[XI.ö{I|Ғ < ާw| >}|=_ߧ?|f?ϏQ y Mь -A47to:#Rye>(9 RP:%xR݋Ű쒬/p1< 1!}"l:|I(i~;FZ:w5y ((#^pzwH0@Zs#0PjLz .PϛnmddXshKrK�)T+R "E.)b+ՍeT<>|͕CCg'شsV[%~IzOͤ 9礅R(n8 ^.B![-2зK$ sj}rqAԺcP^-Ēl*SmW|˞#Mywg',fF-T%>1,w&J=J+n,4|3JZ\/�>/Hd^^\HQ^<brKV]&fi`)ʂƕh̸`ӞPCPlvEŜ ]Ut  endstream endobj 3048 0 ob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I.nv&+X,ef82lȰ!y߮9/#*컪=l?brOii?/pd4s4?E-j&Eh+:䊾= Kod4RD'ހi-NO?)vlwr0Q[s9ZAcq'\ܾh$V!T $l\y&3GfBMXș 8dr!:|ĸݳF.9as0JWE\ <۴۹_񴿿>/q8橯:\4u KdCMX$TKp!z>`OЖh~?T<$sb&Fw<@La,hH%7榰78d,J2LЫ+fEמ3PI$P6% + J6<6Yİ XX*K<@+-OsDpմxܺ䃞K.Є8r[./Tp,Jﰲ4.P($DI4TyJT ͸WPњͱ�T+ uE�5w|DB״VmuCv--MǗ .Oi2QP:((ipʖ=AzPkP \EX͑<#MYJX,�)-Aʜ<C1y&B>c@XfC�:9dol5弒z\fq>S=6W)&xm`>O],OJ2bE ^1h@(|XQ|D-~s;zr $hP1,OIr# ez :v rh/} \�-o!}E S" \ٍH~Rfgd皑x9 q[a,ʼnR"2 RBb BX~j7c:pC6UF<̰Bx..<_4U?Y<BVXO*/NHiߏ/N-E5] }}۟D2 ]z* Ԩ{`')z(-g>h0 endstream endobj 3031 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_histrows.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3061 0 R /BBox [0 0 252 144] /Group 3060 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3062 0 R>> >> /Length 610 /Filter /FlateDecode >> stream xKo0 <vEq-vh۰C4E^~,- E'~HM(_z(D ,~%섑/M(-h�~8OJ0\g.[?F4QRCRk4 xnOge3>eaVXEU,n!Oͱ[g2^=#WIEԚ]*$Rܲ< qƆW:+l>DSm߬ :p]z@;csCaqŤɩ@'_?wQ#H$C2N\ݾlUE?gCޗl3Qd#X؏y"Q/cЄrԀ+c`}= ѤN`'a؅0<]W@6|<Y,"LB>mL: m^*nǖ|9SsH[S &ӚHZlHP.U\tᦩkks$<j^M@py\-[~څڣ><VKT- W?"UȤ2|<;Ľ endstream endobj 3064 0 obj << /Length 3066 0 R /Filter /Fl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P$}Fp;ҥbS&C)UaQOB]$1mk-DNjZQ$%OEazhQZ82!1XOA tdj:ELxȁ<Ee=@qQJl28=*mj"m!sNTӨƖw}FT_js9Ţ(՜D՘JY')m?. ,K,pNTMDTte^j#\1a΂�hn(ӍJK*&OILSRD'fr=hY\Ty{:'‰ D2)E/*o4T}Q n)BntPt_THU A!kH! :jɴF`d!p jδ`P::n 1F1\|EY,jTZ9NiW?A0ΰPV0M!YZ.ňBRfQ7] e:OتhPMď*S ÕV X5fjRbAQ uaySs h saH)4E9MmRMd΍dp3TAUmI8Lm%awM}),ݵ`J%JEб R$D Е!`dBb:ՠ#txygYq\CYdwyۀ8Kqz$TerQIIaNs $ 'lB'Z ֙$ qrq w }>r†?C%xxMQ~4Elă4 $BAL65YZQZ/8DftQ�N*PXcH#^ڸKR &6B~`9xәnj_&<'_+y=/7|Z9^c_ip3Udz9# :2/Ej"³{I%vJwsrsQZЫJйL9(%g,ORJr=^ObxC|JtµH-كw'o93]3)<{ �Ͱ /=>@`6 2 ߥxIb71I1a7`s G�߁8>A[Xp%+] o3nX|z>`W b/3e~ق1ߗKKK-:.F zޟyO3Ցc֝c=>[.num= >Ӿ߉'`Gqw ?}i?Td7so QgiXLll7m9Z2)2O6olپhtz1wcX_z[gu& )|β̜PA5 _}E/53 `}l1]cOfˢp{O7$[ȱз0WTq-scs9\_eTWx+L pNX9ɡ hdP ゎ: H~p48:Oy]Y[WeZ^n5>zմ[%u#�?QvKJFUk"jtR6@QRnx#>I<D.mc Bk+im'AeÀ<JC8{i+J̋O[}]+ endstream endobj 3052 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_histcols.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3068 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3069 0 R>> >> /Length 703 /Filter /FlateDecode >> stream xMo0 :n,b0`n ;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z{L\Dh?y9\зxݣŃ*4WbAc/P t ) LJѻe0-t}L-uff#idayLƒsD L"~4zr4AD~:9DwN7;eqɿ7[(z=Y\X 4Bp{#Qb>‰Lmfdr !N(CHx l?芨PeJCx>߾|\їgY^|؃i9b7c?8_09>=z{m%HkY,zeb7(+fFD+)=&$70W& '9؊x$,'.tp<j9"mqFdk Ѕ7`#*9{gVG{|(/r-pon+�Tey#,J mQ>p'90{t\5<Q?N=E@0H0{ Q\�m(/0:Pn2z8<Lf*4N !U|5tJt~J.GStMJdN^`)rnW,f {ᕲx3{ 2kGpCAon(#|:ɒ7eoR{yl"Pm]])U]1լxXF''VU\zFOW~%`Xg�3<֪!gg< 쌅# 53ž顦|̕BMUڽwVD_oq<Tx`(lv7ܐ7pcE/� eF,]OfKO8a&P4t{7I (P)iM=!wxȳ h aUwA5a|}Z_wؙW? s4Rc^ʷgnæ{sgo4\f/=^XcbEl*~ӨdTRMtS endstream endobj 3071 0 obj << /Length 3073 0 R /Filter /FlateDecode >> stream x]n0 y C4!M݅>4FBzU'�۱sS=,vr&\F29QI0SyHF;g4P|' �x .:.B) TeÌP}gR|>)>7 bp0 ,[hm:/&%VA4eḣ̒Y5bVď̏s>dNF4JgN&1kiN9fsޚUGooI}OUaduX 6 } !!?<F)+Ka endstream endobj 3072 0 obj << /Length 3074 0 R /Filter /FlateDecode /Length1 9808 >> stream x:kxTյ{3d&3g&3 ̜0�CH& d EdA$[T--'ȵ^Kъ Դj4RԜu<zu7g{Zk=JJ&5gA0!TMإd"ʎUknm}J !Vߴ2G I[6f nr;"Fqk6l^nF#]vy+!o'!c#kZ7wЇ ܃0۱~EO0 E_֣DrZ#ђL)S\ㄈ\e:R'reeVO,726~f(.J9Μy7DwB6h*?& Ȓ/?ʟG4|IS wPl&fLf͖)tܛDp  @"@0)7вtVF t,$�gOp͠}o8yvvg;omS<_f{O:^{wbXI>>DIH@gPƠ5"i0u(5z0`BrV|\V+;=ГgG2 Cv~zs~ "f1v.;HN.vLvhfR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0Vc^AVWgnLm3Tn'[7+kH-6Vbh`O]�{2i ?E5'R!CZY/ K)X�(3#`P DUFE> *ΐYGpLl\u!}EHpkg*N-DQ B`(w/(s M^U ڛ"cQbiY9|sop_\B)h.v<lV6Pnۻ"l$@n7 љTnEd*|/u ^& ãx!  XKc^ww11t1 ӟ?b%儧6u,~sdiI,a@UO~sR$SWN<Ebmƚ5Oh!T):4j_#vM8ޏm�yȣ a;蝹D'.fAUk^P[f,PZR'Q|b>J_UL+Nkǧ]JdB=i${ E&@__Uބ)`hUg+Y- f `AXi'LE O'MNʱ.ºk9p…84~A J;lmUVcK"͕@#!8=lB@R%E|~ss|iEbbbŞT0OT37a&rwv||t^{stg;ow?O⹀9{|m`y8z80},Nx?;pis擙ÅaX۲׋5uֵXc!e>R#e0n{@۱+{ٽ:MTg^ltQ~,'?i-ȴ\]MmMZܰ-.k PxCJ1-aEg1/:,TOZՁT^kG/x,BY5 dK[0wn4,bil(?*ZO?9!X=RN%45/%ܷTdJR$[ڰ#((v R!vvn~o/o#rig KtN٩~e襝D(Dl23>:8Q;Υ + endstream endobj 3053 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_newhist.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3076 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3077 0 R>> >> /Length 1259 /Filter /FlateDecode >> stream xMo6<Ƈe1)zH !qIYZ m-=!5zgD\CķEIp;'_#S_ZâtBQi �ڇxi*ime4TmM.\G yʘ3Z\uPw׾^O`7J=*O! {h=)5}{=Hɫd0 6Vn汻7Shg>Ai`WP隇"(O}*=C5EQBGuMC[D蚇"(Oe⧡^;NyӱuiZPx'"b(ϩu`}#NS'iF䙛G9 4ҼEF4%qN`};CnM߈.~S8j \!-v`jR :y)p%o:&C=>۱�M+v1K\'2Wc%m#U`Re+aOfaNlgSr(6X,t?WAmdh#,>E65\}7SZ?ئ?U+#7q*CoUdi#,6E6d L̕�X6;FX|lMSo,)Z{%ǍVdTlF)|PZzBLc"{*9~lvLooG\t}ǯ`F<[=sI=\�4-i>~}=`'.nQ{FۏϏopM�IJ6lҝ2/slN"SǓU5 ] D:=ʴ24F,1e[.%%s jT ?oNfȋA6�ĔZOoѓ;g]~әq6fh|}HhJ[ODKe:3Iyq|8>)v(/i0>9JSqBY{rmhM7)8PCK^f�48R`~=[7Xw;LTr6Nv#/Ա)ƾ/K췛۽Wjto7ʑHxL{ǙnngmpU S`. eFʻ"賜0[7Bg ~RtTS]A ʩưAQjyS=o9R0APvq:jƜ7QI;.a^`Sug^Y;X endstream endobj 3079 0 obj << /Length 3081 0 R /Filter /FlateDecode >> stream x]n0EYDBHUaчJKX,z<Q*ux^&9u/5+$~V=0=.+3^Yڨ~'0oˊSgY4 $~ݳ$� y}zN7~pBB*4aކ !NY}BKR `/(4mVj}<ESk 1g9sN\0ĒY%q\5@|d>5kЁ%RCz*SsOM=uJYrOլ92D_ݼGp<F endstream endobj 3080 0 obj << /Length 3082 0 R /Filter /FlateDecode /Length1 8984 >> stream x9mTT׵{;wfGgp \B2QA>Kbɇc!&111 /l,!M&iצц׾Umhe%axmsgs9� � ,-~+�K7�ز_X~@[j]g,�)�7޾_k[܊_ ܬ6B$d/KnT|M-�O_�pi=;:v`{cٓr8D1遃Tj[WIvcCv$p͛,ey+X hv3;ʚa2Zo~s w쾫;|lzOGO`N~IxO(�jZ@7Ƭ5lujX+E g `^{ٔMW,Z`.ΰp^ Lw@{7= !qL$3Ӝf#V+hU3tl ]t"8q؉}N 9kPZII\_^,).&,3SmFԨ5n7?utyBř.|`+sg/wݵwQǫ/,Y 2kȞ {źlkFFjŪFPC^~v5$aR$iNA4+ء k56MG|P>8.׳jUW"Wq,T-!,֛DY$G �Ŧ81}EAVςFټqK;_hƟqly8l {{5 ]{)bC[H dJ!#,=*-2*drFָ%,z,hF02#㲖yI6,7&[7.F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Yl1K2<|^mg8dky/C* RKB080-|&{afO (x;JVkNSv)G4ydSI`8T$Uѩ8KάPuD;}:j5oѤ7x.q3M… I7�m)12Bhy?(i^LkHR`!sHm4q]6U_yTdɪB5 nN`l Tf{W\`fjs̑pnI !KY: >-;8|6"xU/`!L-I/4pU&okd1J@se[cd �Z0/m1m:vָnZB8# dzREハLuyN07mb6\]Ɠ�K%J4~fi]y-l4{;�*`]zm҄8 .�]C}0v_qx \[<OPÆh3tnWrsijl4pW#[6>K|20Pp#7< bYJQ$5--:׏'O.C_P7+dZdn-buJ,<U6#(J c=G ;�sKr{M)4B:@n5[DeVRc_iaӯ޴I>1'v hcon^pE A);)?Ob%{j-<=W>*PT 4Wz\u9 h~~_e�8t t#WP)5 ;} 3.<Q9?=Ϭ )0�m2C54fA7Lc , _AD=3W]éeV`KNY{sJ%_BX&W+">`奂z]gD)̡s|wX8Zh*2Ěb׹JZJ+ HjGԲfj%- 蟝~Ґ 7 "O,pֹHzi8_-Za*E\_Ƌm7 X 7굫>W8nIN8c9`(ɄvS;w} v:xy}R~h =3J5QM) 4'nST-p>�=kw/$r }4quIl5 ʩLSI2E6g7lJަ2c/lP6*#bRˋcL_% ikD^fAٲ xUy2!͈iGXCyg endstream endobj 3083 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_heatmap.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3097 0 R /BBox [0 0 252 144] /Group 3096 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/XObject << /x6 3098 0 R >>/Font << /f-0-0 3099 0 R>> >> /Length 1750 /Filter /FlateDecode >> stream xˎ6 @+lǶH"@i"b h&}})zhsY<ز,Rw:=˷Chj*lH/OUN%]]I[9U[~%G9zzͣmeԍ)W2�ɯ/KCz}A|wpk?}VGRs9W9+('ëٔo/*n%nmQm9x83b}lTgH2Ðgۛ?͇wo>ܦǻͻ?o?ax>)6bڟ+ӡ_҇E&iڟpzg//_?C<z+ekx+딮FY9d`liAg3A~�?vjM3M& 3'HnuVo[|ځr!s�!'^>j:\ E/`Q7^ЁqG֧0}W$w#X]`Ib2,G0zո=+1'kӾK=:0QOGz(p2)<XmL-8ʈ8twu>#̃%ǫ˔ֺf.QkXC̃)q;&ְtbqh] XDFo4gk0V85z+rgyz cQuXiD#X}gZ`ecQu{:ҋXpIGX(\dW=Xp es.%XԷ߱E\Ee.'5:#X}@gI3@=Xz@-}cX YlV(ǍҊV@aUꞙ<zF}E`7<fcV/aiXhFU0Zdu`Fl:ƒՃgܵa cօ0Tf^`u Ceu::š@U H&=r* 9aգP% [0Nj)cNVoA-� t+cY{kn!`@ak�TZZbT�pdL a!�TjsڀH_FuK$ii[O=<�SaR Ѓq-RAm-{�VX;Pyzh}ǻKQDvyin-s-_F<`}V^A0JP>SX*`Q@`�șXÁGX� KӋ::쀇VQ@Y#ɷVp' -p=zD/%Zå@ysS_uKH=\üFu`5C7üF<zh0i~KE[JŒ9-%IE_T<X=R#J%]U#+a)T:ܦYx;ɲ~zX gقtnapa{.<3{XƋ^['G"J`!ha1,X2&FOa- <?a9,x+3b4_]h]V7d=vkX -s2Ong(ӱVT<U˷w�FE endstream endobj 3098 0 obj << /Length 3100 0 R /Filter /FlateDecode /Type /XObject /Subtype /Image /Width 5 /Height 4 /ColorSpace /DeviceGray /Interpolate false /BitsPerComponent 8 >> stream xc0N;33�& endstream endobj 3102 0 obj << /Length 3104 0 R /Filter /FlateDecode >> stream x]Mn0>"  !UET{Z*2dDCq{V^Yr뼉ר<7N]~i Hö0άmy5n|d3<0y D/|uH!~%:n&1"7{ݺS_( ,aG֖e[k;; #keZX[י+ Y 䚸Fn q@|H,3%1yJTT^ Aa)IS%"@ y t>T^SaNEߘMU3xqNv]- endstream endobj 3103 0 obj << /Length 3105 0 R /Filter /FlateDecode /Length1 10620 >> stream xz}|ו=3Idk$Yȃm@vd<6`<[6ة, @!7$58 !Mo4-lqtitz}a㤔_wt_.s9܏yUBMK;(!L慄G޵/ '4뮿pY\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;;HlgVuXο9ߡujD[yj-VȋB#^{o6#1"ZWeVМkCYD!֟0ٷMxjCqx01{TQd,UҬǚռ ) ]j1O?kXP8(pXñ 2نהalDhDQ62qj#}Iu۸)ѯ tu(cj6ky5?,;BUTjM睂p h7ڔ~77(;*֩]^\@@A7DtChIr-v䎴ˢ8# *SݪSҮv;7%4չZ%YjPןՏ%6%^!p?/ jheEuΝj(D)$aUVPÊءhf?ơP[iI4nK u,#&2h,$? !!f9~US+Xpk 5C/MiE9͜V7dV3j Vz)-apXHo3̚P2Cp4Yz5QU'44P)AeU,hPL$@g Wp̰o7k |J44h-bxtiò9sRmqMg)Rc<9OAC[Ͱ4 Ȧ+<ď$^bYQX/ e4�A0Sz+2!}t@~ř38 /0:7*ɘo`G qfGq Mdr6',0aP/!U̿BqV3E_,ٯS![x;7 JЩJWRќQ5*+QMJ<Ѫf;jTX5|7jx(*h9F_4`P[J !mĄ}_9i?~a쥦_=a_ 5Sus/~G^XEF1 XGa݆uLqT'Gp,̼H1:.:k8A_H-{>sb;_l)1kY :jGy uX=!8dž96?OF$]W;4mK'J]+FΊ;@§XdVXEV-'`a V>[/G2ҊeF'eH6K.?/Ъakn>_m]^0$ &?`d 81?>d>:78Ͻϖ1-__K^6x͘m{`ؒЯW\i[Jٕ+ YwFFGF/;]^l^cB7?|MY&טgL3ӧo z84vjsar{5 d*Gl ab݈uX8G:y $X?y{h!Q܁0=wGBw/$oIb[ .V8/lCH,V??'9Z9d؀66V= udnCMXqFgYcэ1yGcW[۽o-&6?P$dGR,^rl~4&ǂX~-Z`k%[+ҭ ֨ml6F .p˦His0s| ԦQIk0WǏ@Z)&JډYa Iۻ/B D"ߏ_A^KIz{Io/@m <[{#$mvoz9:YЎw%O endstream endobj 3084 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_rgb3D.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3106 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRG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%ؽ`a+4 O1̌ޱ2*VEHȠW$BUC^veq@e8>9Q!H¼xYMEJSk)>DU )S22YT)Ĝ;i#d{͔ͧ\I8RHIw7Lݴwg}D!Asqm%,򰼪+&Frqi2ӑQыCA j_kUMrq ً.)A'B1-c<ɜx~}|IdI2aL@&;>էɷL\*:4ŲK1|y]XL!ꗩ"~g:QzN K ֗b) 2؈E?1+5rQfp.Z+̧3p5$Dãf0YOb>xy r<`=B2* FX )7ط3coftRXN�VJ<y FB idHEc~g"~i$t?ᩈB3Tce $E9RHeb ZTl5bl[Fo8B$:_t k~ /`2Pyqf޵k/^c˯WѫW{jH <N>i"PK嗢◔K%`>as=|W7ЗU_<[O`:9D>}LG<GGg9\<}hsv,s<̃9dpiv ܅b2:,he9$)0p|`}g|gN6{61Ϻk8&]m484kiAq$"yZhrONġ$4ǮcQKt HLc43/0=;/-hgg"%IS6P{kږZx#/F^R$"no$Ք5MM[7A4LC&dj1m5&RMx.pp{guCeD)[)XvB.jc^ʯW/hVbr҆Iı撐X߈oG䒎$ tt *A|6D�{/ Km';;R8\ endstream endobj 3088 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_scaled_image.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3113 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/XObject << /x6 3114 0 R /x7 3115 0 R /x8 3116 0 R /x9 3117 0 R >>/Font << /f-0-0 3118 0 R>> >> /Length 722 /Filter /FlateDecode >> stream xVn@W\D348@p˰)3?fc0X nuwz~UԜ0c0\Fo"He T ~x4Kƒ+" 1P~g mh!nE+$;8is-ԗGSA0F`y%tB>H?HX3"遮-OOq3ݩ(0Sd&L)fĎ驋23fjn$fhްR}(ja^9fR R@FA'<5+EHvEK9ݨI( T!車 De"6TxƤGגjrH4Lצn&R3x}nvy7z_|(+zP.Z辅^ߧr}Şe_#W !Ev6#1֛ a{No70-xlM*D9e.D*ֱף`4l4\JK8ɘurks6\8>bQr!5}թk,.,A\,E{ѲI-U'^Ǿ S2'#4X09<lVxkiF6Xy,aZ=JS9J斲"e(8H `�VEar=^+E} endstream endobj 3114 0 obj << /Length 3119 0 R /Filter /FlateDecode /Type /XObject /Subtype /Image /Width 50 /Height 128 /ColorSpace /DeviceRGB /Interpolate false /BitsPerComponent 8 >> stream x_,h~ 2I"01HVB6&H'0fL,!(o~W>9̽΂H}骺Uun_f]cw꫿ut2.d紿ġG677ƷJAA2)u~þ-_8E5,2 w+uT &HMW'Z,JCY;3r3g_w />>U}P )Hxo+u5=sN1]ݳW7?nOKvcn5a=~H;@VTNPw] LwC`< lzR2O]`f .@C _'* kTbR?k m0Z! ~& lW%(oSS EgjNlKћQP|]^я5'2՝4дBb:'||Ti YJFYaN9G@r 9On:p#{퐔m 6$NAYhm2qU&}s% EGHn lֶ!X9flk3B{SJS?m|Jզ'`ZTT|uCRnۤtk*tiϩ;ns7*Tp!VX MK+hscֻ O| D@V|8,4=p=LTnLϬ{ PU7,oJ*WN,B?us:t+sP;Ƅkt.V'GQqQV:U{^չBӢ'jg=:+ _# r+ %#=t!!QI0 =$ljT]UA5 i& b?2P" tmG(eN&*k7ߜ#M�rԵB @VE^axtazLTvPǡ,AZ =¨FQWiE 3HРȍ=e,A$sL :%}<~tj44 =c٬keU[0W|v T~fCQ 2Th9.%_;4j+ 6AubJ N67sz^AJT91KjShIKWA2jL[َ!m[ k DxDUY멶AnzSʖs5mO XoS{+ j~9Yh8 T#G@o~̌Q[<v:'q"F-c,%,L IQOZ{&/hJ^p62itAt֨w)K:Ӣ ^M^Y@u^|VCgtEr'ٗ<a#2Q.^Xؕszn^o82gs3�Xdc&tBe+jT*5I?ʘmVH: ;z P1 *nT2׷N8VīTon*Y/;-ُv#T{XxɊ Ί GCkQs4*RОNL{] T])jΩW] `/D4*bdTX]ĥw>T2*xemO+j5C^J+ Q~2QG#;>$ $2)JuY`ޙY:PsKʂ2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ܨ|Jg1I׸-2fD"= ?gkBʩIyecWUZ#V&WnGFm~~y,IAL5 }kOm*'ybW.-u}w=6~J6eQ6z3t ؋>z^a{c|XӘ$ѡ 멾|am-gVmTcpȿ>}3,`bZ:.WUu)WȌZGj ӊ~!`;W^i\> OܡC?<7 kg۴ iQIuEgO^ߏ'O^y{2JhKrx;*^AdCj֭btBRn6d-_vHTRLcz,qvrTRG}]l*s >\yĝGu YsY5 0 7AEs#q j/V,8CoV*EVFKݰr,2׃`[A'v>IZ)mLIGmYg BeuK]ܝ8pJHՃv]9|U*y5CXe|npѥ.yױuƼdGk^=”7KdKW6\s(G3 endstream endobj 3115 0 obj << /Length 3120 0 R /Filter /FlateDecode /Type /XObject /Subtype /Image /Width 50 /Height 128 /ColorSpace /DeviceRGB /Interpolate false /BitsPerComponent 8 >> stream x_,h~ 2I"01HVB6&H'0fL,!(o~W>9̽΂H}骺Uun_f]cw꫿ut2.d紿ġG677ƷJAA2)u~þ-_8E5,2 w+uT &HMW'Z,JCY;3r3g_w />>U}P )Hxo+u5=sN1]ݳW7?nOKvcn5a=~H;@VTNPw] LwC`< lzR2O]`f .@C _'* kTbR?k m0Z! ~& lW%(oSS EgjNlKћQP|]^я5'2՝4дBb:'||Ti YJFYaN9G@r 9On:p#{퐔m 6$NAYhm2qU&}s% EGHn lֶ!X9flk3B{SJS?m|Jզ'`ZTT|uCRnۤtk*tiϩ;ns7*Tp!VX MK+hscֻ O| D@V|8,4=p=LTnLϬ{ PU7,oJ*WN,B?us:t+sP;Ƅkt.V'GQqQV:U{^չBӢ'jg=:+ _# r+ %#=t!!QI0 =$ljT]UA5 i& b?2P" tmG(eN&*k7ߜ#M�rԵB @VE^axtazLTvPǡ,AZ =¨FQWiE 3HРȍ=e,A$sL :%}<~tj44 =c٬keU[0W|v T~fCQ 2Th9.%_;4j+ 6AubJ N67sz^AJT91KjShIKWA2jL[َ!m[ k DxDUY멶AnzSʖs5mO XoS{+ j~9Yh8 T#G@o~̌Q[<v:'q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Y[Ti.JXB `Fe9Pٽ+!rmh^JnKe`ZƖ�Dsme@FeJ+EYjss:,A ǖ+PGW,LPMDqBq\bT2I\n(uIe"R -m ݻ}tiۏRC۠BxZ` orҴ@e ?z+]Uq \Hlp.WNk>Je"pc¼>P;LX*_14`ex$(qS&ШF%5WP[ۡkXfq;a!J iiحFɢP--W^|l|&3)TXYt8*�=J > IpX$.I,*NV"}5Ft'<3(d&ܨ|Jg1I׸-2fD"= ?gkBʩIyecWUZ#V&WnGFm~~y,IAL5 }kOm*'ybW.-u}w=6~J6eQ6z3t ؋>z^a{c|XӘ$ѡ 멾|am-gVmTcpȿ>}3,`bZ:.WUu)WȌZGj ӊ~!`;W^i\> OܡC?<7 kg۴ iQIuEgO^ߏ'O^y{2JhKrx;*^AdCj֭btBRn6d-_vHTRLcz,qvrTRG}]l*s >\yĝGu YsY5 0 7AEs#q j/V,8CoV*EVFKݰr,2׃`[A'v>IZ)mLIGmYg BeuK]ܝ8pJHՃv]9|U*y5CXe|npѥ.yױuƼdGk^=”7KdKW6\s(G3 endstream endobj 3116 0 obj << /Length 3121 0 R /Filter /FlateDecode /Type /XObject /Subtype /Image /Width 50 /Height 128 /ColorSpace /DeviceRGB /Interpolate false /BitsPerComponent 8 >> stream x_,h~ 2I"01HVB6&H'0fL,!(o~W>9̽΂H}骺Uun_f]cw꫿ut2.d紿ġG677ƷJAA2)u~þ-_8E5,2 w+uT &HMW'Z,JCY;3r3g_w />>U}P )Hxo+u5=sN1]ݳW7?nOKvcn5a=~H;@VTNPw] LwC`< lzR2O]`f .@C _'* kTbR?k m0Z! ~& lW%(oSS EgjNlKћQP|]^я5'2՝4дBb:'||Ti YJFYaN9G@r 9On:p#{퐔m 6$NAYhm2qU&}s% EGHn lֶ!X9flk3B{SJS?m|Jզ'`ZTT|uCRnۤtk*tiϩ;ns7*Tp!VX MK+hscֻ O| D@V|8,4=p=LTnLϬ{ PU7,oJ*WN,B?us:t+sP;Ƅkt.V'GQqQV:U{^չBӢ'j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umber 1 /PTEX.InfoDict 3141 0 R /BBox [0 0 252 144] /Group 3140 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3142 0 R>> >> /Length 341 /Filter /FlateDecode >> stream xN1}9ꁡNĘx@F8wZFflۭҐ;?kXFrpPZMAfyL*` Q3t,65MЁ;'6Q7I}:K"Wjq`O FU2[MB o;/$fk;5^H] Vf?_kuۖCA=\ı9 DƮA2 ǃ8s}<X>kTkF0[!KO O\T@vYD>THϩ<i6Vb1_xqN -iǻܝ>1dǏ;V.]H\7'ӱ endstream endobj 3144 0 obj << /Length 3146 0 R /Filter /FlateDecode >> stream x]n <ݡJ(]r-$dH A3Pu`!cyn Z 0=.B(AnsݖScI K�5zcG}]یչA@׽tx2Mu=C(ӹ-Y:#2)D rjV7K?3YU$S ~93H9:sWWFe!uۍsA㫍EWZ@ endstream endobj 3145 0 obj << /Length 3147 0 R /Filter /FlateDecode /Length1 7288 >> stream x9 pSWv缧-ْ~FX ,dx`a[z&2$!8@(P/!dI s['K&dvCt o:!zޓdl3k{9ƀ�I`߲{�-{vm� S`<+DӤdoow^K�pK Q`yw >JpUw PKWo;׿K/v֧ &}E2{[zŘ 5_oGeZh6SzfApa B ?w9 qnZ1<!{\H"b b5DI0¨FvM+\إ!o˔JlwBH%`ku Ѩkj]\T(%~ы73y5?ہN|yw0wNe/މh$2HI}`vkE:%gQTvZ-v=*[7d7pcQ7Jnsa hs#q\L3jխzj0cUצ۴Em0s˖T/Xӿ&;mT|x�tg`re1)V+LPQ_XhŲnbD<�z΃k=ܙ[yA]NQŚi1vaI-N).qMB־UۅG;2OnuND?%t8yy>dvT.lq;g1^ooa/q8ơCఆ!8LpPⰊCCN#)mMRpx~#vN-ܮ=䗩g]b\=ja>횈okpNnzxdϽq1e?6qLt,ug<( k_va?,X -x¨Ⱥ?n QC^Mγ'm2k#-".q. "~)eu񘈛EĨ "Vi|u"ω[DIjLEP1M#"Y[m_Df2 #7CI1IKt&{Y[�h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D1H;ӸJOM 7|$TBV!ʛPCXZfj@=^FGZ;ЩIRsrUܓ+4n'sA t+)ՍxuDƒm&>A>Q'#ZE. ˨X 0i%Fi 2L9–Q&e&*&蕺eTH9nL\RieTIz$I񎠊z0/ы6 ;BRmz#y7Ñ$)ƒcZKթOΦk%ܟJa~$,J[:_k3x7R I<I*FƸ$?ޔ)JIP{ ~_wYW|p7᛻?믟x2ozj0IOַjs`Pu�4S-v^~ShQTӋL5̡-Tb"|a3l8D_ }Vum$/z3b?nYacp5Dz `_+!I|+ bjnU Gqe $U[KX_Cp>B0,L0@#mVk/N:& 'pu^C21^Ν0lu5Zsjj᫆|K˸W^ʏbpvvbbrQGcUccɱ./g=ϝg?&Nw>x:܉ >cKƏ1鱳 Jl;ډh[Vj9!UQe-QJخ|{$p#M>:(<0t9fWqW+=1 4 .5o.]ItI\1m:˹YbQLOZv}MmQJRt<H<Kĺ/I-~Ҷf`Mr )qF1VǍ ]"g"")E䍹Dg̎֘MCb!kX]V $]QhZFiz<ک*A|\>08u%-([H I[Ɉ ]v�iW St]`.M*CFj*]6*1Rwei™Fx6>-\ endstream endobj 3129 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_labels.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3148 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3149 0 R>> >> /Length 2497 /Filter /FlateDecode >> stream xuXnH}W| G;žd}eFf K^J4|jR$�$wTթ*w#*?_zQN뻍K?JVY/[ъJVw7~Oݗs8n_Q>HU)Iw}۴N}jUOML}3~Ϣϡ?6'>Xi]LgܛFׯC:݆]Z8tCyO,VNYu%:cv t"$`: >F؂1>7+c RV+NX6::끆6|Xߓ#=fz=):XZ%(&Dt1 =qrY�dFY }Jz8,Au !FQ,#IVXr"icUlke%Pv *CNDjOY#,FreXꄖBR]tx__,h}Rs]`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K` GMy|H�56`Ob^p?e & V& ͩߞk(Lŋ>J.&S r!lp>l} Sp�0S&ʄ@iƋ]|el j`qv?qusue}{* v+!2]T9cim>3אnp9@r2G%aDxmr(2L+d�ZT]p (7N5sUe gA _ɭ@Z -ۃ_ׯ5NC &@f9T.JmSNǣ0OE-U:= )G-U$ᱞꏳĿohtg.羁.>׭c>O s,ʍ 8وa nvF` 49VmCY#<c$c/w\"1[aMV:ߗp> h'a15R[C& ňR 7:s7N�KXgB ,/R.nfha||JZ8a3ԡ¸˸˸0e]̂Wojs՘/K�n~At J_4_F endstream endobj 3134 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_lines.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3174 0 R /BBox [0 0 252 144] /Group 3172 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3175 0 R>> >> /Length 291 /Filter /FlateDecode >> stream xQJAWQt* x- 'B!oϮ$=]=Ut~2G$'x~~a]COCڤo‰CB9\/V RRjEPrT85ZsHd;}Fl{7]MxbhWܠ~,ݷ�mTMhjFOט"a)[�}h $fCKAI}&V'**b,)0%iD_=B /W8 Ldϛ/Iv endstream endobj 3177 0 obj << /Length 3179 0 R /Filter /FlateDecode >> stream x]QMo +|4mV"M%}h~�'CZ�rȿv�??kZ:0n X@o^$=$9A96O�6_׮PNh#4qr/ҿ g7qݒ/sUw%4^* Ҏj!ahإ(A}Ӊ2 Kd?sτ+1UUX0&|,K}j*>ZBIi8c L endstream endobj 3178 0 obj << /Length 3180 0 R /Filter /FlateDecode /Length1 6504 >> stream x8 pSWv'Y%[= % d[L eCX&$J6n'eZbuRm6;;٤l vJ6NX[=I6&L;|={ue@�($ nّ7`\�lٳ[t.!$uhێo$k(0\׷>(Y8OD?#�h+Pp;v"Ax?޹%P~C){.m#@2oŮ;+,[ ,E&x䧈atn'6;qN9NQ'pNܭqk4W4bIXKiDDDqN;QYNY%֐4YxT]}EwACo 6PlЬk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3e mj*95ޤB|KNK s%R-#3DXA ;ChVU{m*(1):ceGъ#JwKj艮m$`te/*@Xfb&R*UCQY6iiچZ!sr ǨSS봵<V/BuGl10iYP[YtMHԪX,ݬŨ4 ŤAQ(Gr.Zs, =`agvp A[^;SF+ŌK9@;_+ayͣ@KtV:ځNe:fDZ۟4iO{gkCu7VW֘PGZC]=׬&>}C)K/ ^544*Ǩ!R'!FM Ը:[4qeҬمʵdzne9򴴎h,-4H \rl 9OUN/|13'MZy|ٓHݥ#=13};{jd@dJHgDl0NJ }PEi5IZM3@j<F7PI=IWTd)#)'e2K%eZ{ ԫj鳬o·w?wazsv:}0f|S!9Ղz{qfُW</*L*j%lӍαj`'i [Z:_Y�q0"Qil"$WOՄ"!@1j:jYՄW;ԣl\Gx+-1Lp!rA/Nk$x*w0y{6* .oݼp<a܈1z#rh嵕+0Wȳ+5W++#N:!NL M$'ޝ6qk˜|c .%'rN8)/_FΠp&pbtW8urp䭓xfbd-| q=S 7n , کvZqg=q+o㇏뇞I>3 <8rnXv>iJ!GhZ]^lQ8' }$Fi#zrXG^v~'WvMpo[څ@;?&ںuupڲR-wZlkpE ,VOtDlhXi#HpK倅@pI'qG]~۸!Co!ICjY5 M4sGBci+Kcmj?Md6IZvBclxx_iO,fa֔8Rg<"0=$a`cJL{8gNSvHw endstream endobj 3159 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_linespoints.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3181 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3182 0 R>> >> /Length 959 /Filter /FlateDecode >> stream xWKO0Wֵ'vb_Jz‶@A,-߱3I܄]"d>('e EnՙzQLvlzW3΂v.>%%(?)<;F4@$ӏ<^듭e ]G#nnй^/7Ͽӟ7OvlR>t,RH@-YvcobFEwXTcY8M@`zB>dI ztu-CAD,�kDV c1NTɪ>ߕ5V<W$t.a~X@1PvE`Zbd}NpibSzx=&`Pw#J͐hEvNfA;`=)j8Z`.A�l!VjXs5"<`JŪR]XLV@c6,tn*'K d@_{8=G06D-$]`[|MF$4].UINctp``�l%(A(>(_�^ R�~/AR߱ ؼN 坅:pa_|{q7_f_@ '\pC(x Z,^)8EAXu+@Bڗ5銞B}Y渢癐Omu?ev=~ED+QB\*gAQ>ŋ$BR3$g϶ykL]& [-38r8BYx{AłzbZkܞJ5*{UWP cALO\kqw>`YTIAuQQbJ3w| ]9h #቙!<ʙYy endstream endobj 3184 0 obj << /Length 3186 0 R /Filter /FlateDecode >> stream x]Qn0 !#"]<�[R,/))xGdvn[7Fì;`Gg.5h/SE fvKz22wqjU]CA%6OfA@ ]`u.B Z*~BȒyʏqݒOz2 %=\|1jkX㑤yNAc g$p'Lx-fAΎxkEc//W+)]#;Sop 5_Z\Oltx߭= >b endstream endobj 3185 0 obj << /Length 3187 0 R /Filter /FlateDecode /Length1 8244 >> stream x9}tT՝{f&3{|!3ox&aB` $3Iv^d D+je))"ҚvYˋ6ZZbWq<tk[enl.,Tۣ&{3 t܏׽q@�AX7n|3`6!v.i->'�rz_4e ϐc?S�q- DZv7eK7#o j=~{q#fO�CL]~>.xO8s=Ֆdg6)`qS E0y:<Xy=h<a^0e AV=hAT B΃gY4>]46*=z= o *aǾrJ*q%,Zr[XOL߽j{[o?\G{KKGi&2&[ vpMpaU`gYUT!8Eu]^4y^"3ń/^a{xlk0m2jpYOzC_]fiŕK*=Z|@*ri,ʶoNð4,gREt?xA.XX39EͲ؝B '}Ƈm[0o'ܰ?mF`- .OEMĖDϽkxe^׶åE1ge-$~(B \윜@E-�|Euxy qBAX B `AT(,bHi*Zgg;bL1δ悮{:�/3'd\bYG4"\uMݚ{m ~`d]a9~e<}1>O<% %rv[tYkv|ɎxŽG׎;gyvtd48vLQl1;jv6@ގ`+H|ٮ{:_-3bQYU]7,]"e_90&<,99<<>Eyܹm*˟�@W�M"H�w/`e�o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5EHX՘N;uJr2#ȷf*lꓢdZrEmc$^RXQ ^vwqH$5[FIA bDDh"5 D2tc8qMܛXt,B rح34ۊ7D2bNƌJ-sIbj|RJPufOEh*޷I &}t6qHU*U=B~#8T#V:RskW|if#i>0i?= f-qϪB@VZdpnmG?Ls6b1_k&pkͬ4O]?ҥ!Y$QI`k4P-}zЋq_RQnc6hL"4S5 r4YLY>hM!,/F.DWH:5"aXO"5xMd}\hJm#oq{Wyz;2%jՑyD?/ҥa`#u@}6y iPM€7"84a( J8jJSini\et6NYf#% B8lTHOs$CNpե;t; oMJTK@* < r6bvh6VK:FפfoEx|hGxxO))Jx =nQL0&|uWON=5m7~0ZBQ;=۶eU^10LL�.c4Aa !-w <ƫiuu:'gt5 a7@9�!r>Bl8@* }#E`o,e y`tJX2\XK}zC~Մ: s3P]CU4GqDdRKHԢQul a~7dG3pC-\ўE| '(NPJq䕳W5{.̖]FezV_/)/ _2ۜoǗ^~_ Iey<o ?& %΍]&0g"A&xjͩ=|:4<x:5- r;u4[5 [NS+x 6H5Bu խTQ5e5QVeyÇ=|07`価}]gw1ە;;+| Lrӆc9CLkʂ] N6 5v+{=ZmJ Ju\09DְSrsf[5*m Hn`i';;cXq$&؜F)pv[+3r2NgsuB 0Ir8C#pePVev[4~ :G;xj (P> I`;Fp;0!0Cvܾo703a6!Iwoщᴐ.=3!n�6 endstream endobj 3161 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_points.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3188 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3189 0 R>> >> /Length 722 /Filter /FlateDecode >> stream xUN1+0n}E� /Oc{YvWH tn? E:Tt,dGBWN◽/adoH\Nʇl$+M4)ҖI2rO? _b 28ڗ$czXj }ڈXIC }Df+NO is->޾^]>^7s5ޓeK>T%[j8&I_fE -s=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figure_steps.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3216 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3217 0 R>> >> /Length 523 /Filter /FlateDecode >> stream xUMk0W̱=X[B)zH[ȡ4aM6ѧƫb{Og H/pS ޙ@p )�fڔ~Eq<D*po~-ˤwIp 3 MAx}(*f($'a|`ޟx<==}癒"r#]hHäA(C[ө=2i:PtZ5ւU#rlEk܆�4DA$&2ZDB& J!X�R(چb{X9ShH)dpݦSQ鐎cjoH^ܳ`Te̕bqMz՟ٺܨ*gPmyu󸤳E:.y[@ Ts ЬڙݻrܖsTCWV&qATqBmyUk $,IQY}wAZ}9n\:ord endstream endobj 3219 0 obj << /Length 3221 0 R /Filter /FlateDecode >> stream x]n <ݡmIQ?ZHɐ@3Pu!}n߽Qz0 +JPZ)rd%ܚѲA% vO�y^ v_.nug4kP8u/{gVQ^mO!\䖤U^̈́zF"[Q~3 Ac3?F~BIS ^e^E-{COg/حb|rN捓j?qEWZdb endstream endobj 3220 0 obj << /Length 3222 0 R /Filter /FlateDecode /Length1 6860 >> stream xX p[Օ>=ɒ-ےl9b'ȉ'~-َ[QWrq҈B po ]\f(gwh; °dnatlOP^{{te@�ȁ8 n G�\}{^gJ�ÇD]ߏ �N{K/& fD zЮ'DO]~1z]+v0�;)g] <},-Zs򚹼<1G#f1`LQAca dC ?i!mý*RxZmHS5$J6HDTu'nè *#eóVb ۰OO[ԲJkzi|UQ6vhT55*sJd@ XuNrFgۿ}ixGw! wCECܝ4U9RS A26>+<x*[ 1l4#FŎ;ŽvcЎqL%E;vQ](y2f #@; ^\-YҒkVxճ3\^!xhz5h::e/UPX ͝`&yYN~M!7�sGlO:Pq`}=-U^`)YJ?m,*kU2[lU#E{k+uIw[X;ݳ7֛6:;bQpb).v E ,D؋\ZsgDkpZ)M5D 8,`T *X Xo3 gxKfvT�_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5 ܷe"hvUFAKQ{{)h(\n_WKlУ.:>Κ< LY)2DII"Mx%'XQ;MXl̔PP (ZDwYҴqL[|ݗmdJ@=|VSR1SbD!ƷV8]VU0X`q5'4ojSe_6kM0.ݾ¤Rȟp@Ǣ"oD |%ʏ 9: 礂Ȳᒷ/l?2kGf-mMʈ59 iq)}=(_G|q'C-pK.A#<. #TN� -I.4 \ B8>sZj0xœ -PSN /C8_rlKR>p6%v HFSw,wA2 f Q5B,b 3 ;9d`(A7C@OAG2!-qHhw:Ez`hy¼2W1`/q#vJ]: +9z q?HsXo �GϰSnQsyKs H? Dj?MFj2&>>]x(�cRnH|$H$"< Nq|XL:::v"}G�IHVui'_c@$;If1V<g""zWpv-@c7H<Wrr�m6@L~P|_'~>>|_P Y0-Ҕ7qO "ukj[y F%,Ua (rȜ9kM~'~g1%ºn]BݦW^>Q0L)K7-,/3I\B}{2e! ʈiMTޟKx']DE(5Nkz>KN*g-@_ 9~|_! _MH;iӱO@2iG�@bG/nW# Nf"4uPpv4pZqszg/u-S4c endstream endobj 3225 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_xerrorbars.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3237 0 R /BBox [0 0 252 144] /Group 3236 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3238 0 R>> >> /Length 818 /Filter /FlateDecode >> stream xKo0^b\coGBHH, C,Jh #)R4igPs~~> -ߧJ QX|u'|Zi]8Gy/ ^Ga2A AZ뇱Y`Z~ӭD$M:c.QTQ\4.7??N;Lc~i8X-<JJ Jf ˫$u$]2(]L΅26ʾlx]F@dT̬֝9RđqSAqC5ݣ4Przim3t3l(_Q~k7gVmG YԌ o .$K H[M֓(ZOҽkbM�YMĚ*$w I]0IF==6˔ԡ9 E j=d?Kbvsb)'S/tY롒Ԗnn2IQF/ &xJz�Ü FKG2 ɠ摅4^4[(ImW 7|ΐ1_CmK6 kG֮jY )1I*Uv[>תFm1 t0-j)|$Jn/$ן12 @E1+\I²4JRh_d$0L #|E$՟1{%\7,$c3ŕbE~ cr0LLS4Gp MM,dG%5">XO4kQo"2dBbHFY"/$_}sT� endstream endobj 3240 0 obj << /Length 3242 0 R /Filter /FlateDecode >> stream x]Mn0>,EdCJJ7,�1TêwlG7o̯skM�ga�m̫Ʋed[Ncm 8VϬPs ~ݓ|`�߼BokQ:�5 (޽OVQ߄mOc!\pqDY-D CWȠwY}>U*B1KҥH y2?G^yy\Gyxu?ocL=ő."0wf ; endstream endobj 3241 0 obj << /Length 3243 0 R /Filter /FlateDecode /Length1 7232 >> stream x9 tTezw2L2sü8spIb2&$I &/; @q+"bbXFmĭvJS(٭n&;3!sz_�\H�Җ#�p[-;+֑mo�`On[-Z$4,į3-&D]�xx]/&[� |#7#Xm3c͞?? 6T-6L\~͒7#1h)˛rxہ\@ú'8xwkJq 9@8#Iۃ( ik<JkMSk7BC55P@+HB꥕z9e,ٍnvW:w}6w;7ƭ6ڙ̃~Zɪi(ԯ<ãV0 t9]1v^-f"Db͉:'‰cNFwbĉ:q\%'ZN0:+d@F ]_m5}f,rN Tƛ@T流@4|,⥢�Ŋm(<tyH,ǘg:bx̅ \tcfTyJ?Fk^m {b{C ͕+m۸o=ouuK$y(?<|lYyF(3; 8N:cz븈gE*"XG#"EX)$R&8>?sM ǝi{:�/s'd\b\G(\tM 72Oݶ/5xX1f`,`+=b~*$|D9ו!C^aYpHvz{ǣ <6Si zn<yO/&$C$<u:1 kXq339;ukeRnq*Sr"[a%?ӛ.8,Aq9vhBg]zdÝd.眵+fCF9զ?J]l|j_ۏצ~@W&쁀,S%rˑs|228!Z[Ebg拊̅Hjw̎)/^^b܋/WѤxҋ^)-}:W0nR,c BI,PK쾚ԭܷmu;i&<*L>)[..9/>ImcO>~!?eQJ@0l; V+ <gZsVќK)k+jy:+dS;}Zta^$;)ʹU߭~0zunLcZMm'?<Cg˥j_.SA$fr6 BpYF\XB 55Nih܅c.Lpąq*.L\hJ k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yQ͓x)Dс$ GTd!꣔ܝgQQIZ? h_7t~-R9'xvꉙrW߆5T,ŖoOOݦ Cគ2Zؽ(t ꧈z)Qz8v0?I;oӂ}MDVo!@m�DC;CL47%ķ'C+zꇩ먧9*#Hs0 WiD3laټV[2s!Cx 4C\6Fr3(ྯ0&>xL<>}z[ |\ky sh@VLș =:%MUNL%^:;5=eJ<?<SArJ<ʼn'֟w?''#Gch9& ~hPW|RpN§p=dx|",4ԃSA0uQeQ)a<3q؝|⎱;ן)w\k)]=j@a\fsx"ӆJL\P]أ'uhE_y3;LG8%c[֋ٳPv[;6_.[[%j{-Z -çü. 㨶hV[zۃZ8߲[8c]~ۤqH]lT:zUzz7D'q4zԪAZ(l3خ]ZC{h?!v0G.ܵ v҄0g4B09$]Fvpz=,_ endstream endobj 3227 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_xyerrorbars.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3244 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3245 0 R>> >> /Length 1082 /Filter /FlateDecode >> stream x=6{ qq)= b;10g8_Zmmp靛CQ}v??}_/nb_]?>_~0]f?_!g]HCkbJ _s{|r3^>24 p1x:'ܟ޹^..|yq^IߛO qH%Bٟ}LaG. 7ې4KJ %%`) gρ e C *`8bFqڌgڢPkb69!SF)]MVpm+UqQ YLJugFaq1� F8{ kBn&|8`YRi}6+܌SBήW赗z,pdQ5| <Zɜ]oZt(AzfĬ#ʮ>m`8Z%U4#iªk jV]AËP G*uV 0VWAȉ_p dcZBH $zJ Ѵ( {mqjVKԄ.J0&l]~_*L /xpX ~u4K()L qmYLzFWŕMr* n8@m;PR6I==y/2HԶ$dtUbZ8e"-wX<pƫv01|))V &{~.<ka�0Ed 3~ŠFVQ"ȔXIںk_EԵS4QfG$տP;uZDȄv|![ o%/Ui@fi~/JHA.)Qc oFYH`@?Y; ^tH`f3#jHf`V`"7Fiә"AАj18u[/*$ɇର݇ř6=6|7 ED/'ݿ&j endstream endobj 3247 0 obj << /Length 3249 0 R /Filter /FlateDecode >> stream x]n0EYGH%T}�8TêR0gE8tϝ5w?hce^Dj(JPF)48QߖSg,j.o{R�7{ץgԯ6@.j^ !K}o¶؟sse:<.n{Ey ֭@GF-/&kSM4GϤ<i*a^G^sS%2r\GͼJ`]D4mq{ZM c~onv1_.m endstream endobj 3248 0 obj << /Length 3250 0 R /Filter /FlateDecode /Length1 7824 >> stream x9 tTwLfL2s' {Ka&& rI2@0L^v&`2bW$VETAqֶk[mʚ]u= +Evk33=9'{ݛ�@$yszټgz2u�Lg-GW<uIxO`pˆQ?Gp #߲}s?@' 0 GqWr�͜7~*y-\AÚg4#1d-ϟzy˅M.\B .؅g\8£.ׅtjp!m:#YA .45եi؅}:tۡj}l蝃GZ@kkjJ .ZwXM ޶_}6w7-CGv9`7|pW-`vƀG;U=sZ-UĬN n2G 1ƈU7NQsnxQ\Ϋ5Ꙫ�~{P닎eAҚeU./N N\U+ԼÀ4~, y°\Ь.+,4c["\S 5{0aZ;J?FPcکWuuBĶxߝ{+Wt*:FrG*F Nx|p8 ssE7/�wq$fq;8h:bFۘSNJh$%`Ta F$T%PPDJdDzMߩI86?#Mi{:�/'d\bZG$\qMw5'{ٗA/-)ӏ0pyd_RN{uu0'^`1+rb'_dLy}>s_owIK}r~!! !}˫5%lB> VwC|>./v 2ȐZ9HuTݵ5R !sgX 3N>6&>"ԍ{JO6\c-Ҋ 7ސwVT>̒9u m,SO*Nߒ{`)X<b1g=),B+c<%o/-$"Q"FDlJą":Dq貈?">+"^duֹh "gD<q"6X#b,9\-S,sϞhVYAċ"NZ@Gt]?I5GEL8,z"{397f7rU˲Ͷj#q@}U�fnA +тEKt뮊$,߶.藮.XM]>RJ?;‚>9χQEԞbD<@%X*,|qnwEbvctWѤX),MΔ5ZO0[�@pe좥b P1'.qkJѰreG++~?Y9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Bv f@^@�\p5D!&mf"6tA38�\��8Q}c8`'"}%Je TW"~`Gw㘹13eˉkՐMG@yM�[a~?/&�vcmY} r \`@=,>:.(dp-([,9t`!M>Z^He#8@k7Qh}L �# �rC)J%{`- 2 53pgA-,44Trf[j-lw/px+ S(8dWeJ]tRp`G|lJmH=Q3) [L h[=J>t[}{^PƇ|e_^e i|د_w9$}H[w-&5J+NʅŁfA"�h %}ʯ]y2f4#9=7 g.c+0s|깰7<Nڀ/|f6@'3QYU03V +~.Qt$39dc\E&,2Ef�hduo#ZG+{[7~Dc `0D~/R8MLXs7^1<^W^K! لa}` }{:kk=GmgD޿(cU.\>xl:a:4/_87ҵPS8{vS@ >M[/dSj!\F ;­n8�c9[f)By.vW[[>Ll>誧<(yB^f&̣b< iq�7!]̿IƁÿW4;�z~'WiT(| _e/[H/O!UTcoC4DWF ,x, ]ѻ LvޡcÂ�6+<1B*`~]<gp )h endstream endobj 3229 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_yerrorbars.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3263 0 R /BBox [0 0 252 144] /Group 3262 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3264 0 R>> >> /Length 814 /Filter /FlateDecode >> stream xWMo1WX{k$ġPPH|xKT)7y3;}<)߇geEyzT>kk~W= YG3F}/&Fw٪YXvHEv,_Q5+;oB!<~`I'pM(')%S`R8ĝ@&9S, UMlCHi=7 㮎+dU'8]5" LnU ;ᵛD$|`Ok`h`u9h2<fc%sNہn}%^t|! h4]FAgDնZt|{ YT܅^d]?8x?ӡIJޞf.T\fH@\IdM%#ڣhkջRotl?ywN!=yFda(Cb8>I@9Kn+(ٕfGt,q'9WDJP/qĻh* O#N U"/$0v<AT�IE/¹L." !' @W HAe=:] UjKt՝!_Nrg d TvG ' ,_A_PYwOP?7')wR ԘR]-9!b1fCk|/GEl!R,v3-aFG ' @<DըF;% endstream endobj 3266 0 obj << /Length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+-9L͡ `!2'Ѥ|m9F>'c-W=yVQG>>BGl>89?3rfLN4?QzzޚS=8E:98e2B]ѭ8ԩSSg}_ދAt|q14ڟV"OğƎr$xD|rp<ReS)/&kȇY:^AfiTos(Q_%|pA݉w%{r+R.\ײL)XjĞچvo)$ו~b[+ jzd"6ĝIbJوGrma&eSp89;Iۆ pڲJ(-Zk%ɰ˃a=,ËZ}=WG޺=X=A]@Hь86MZfdl6^zGs=:p�Kڌꮨ/"A GɄcv�=BJca]kŅ00`4B09$]F :.)r+ endstream endobj 3252 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_xerrorlines.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3270 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3271 0 R>> >> /Length 895 /Filter /FlateDecode >> stream xWMo1 W|\+!$$4 |;tvE{y^q̽в>hyShe-| ݉OVZ~NeNKa,SF[T X+Qo1N7 2giBRk xG}@<Z}su:8o_|yKҏcU.Xrsed 2ِ+Lљl1S@ tT C/@L_"*z%`iU1Il12X\TY/2HW %V~K,ៜq|8PCfP+6;0dR۬fY2!`z0GyG`R2E^_}Ve""icwV#k}!׶eǺÌ Y7Ȑnt-730dVMH?Fdד6<|5<24&ub]T̈jL6P09Dga̤&bθX<IJ<{h)~ a1΅XFD-CIW[n|N0FZCt&2bN Ar؀JL@|vf!~eLM6|'vS 礔q?GԱXt#Tr%# p51!hnO˜[m9Z`o }bT4o`?#3W(y0�͝! GB;aQ#C?"W,r.xi qb3,BXW_Ř-AD42 뒵nIIW ?+jo96d4ϕ$ P"KL@|4}/9: endstream endobj 3273 0 obj << /Length 3275 0 R /Filter /FlateDecode >> stream x]n E|ňLY E,P~@&Ej�h*ur|o~m[k"d* evo9q wqjvLԜcXa܀ �[Pau pBbM 5}sx*꛸n)\=Bϻ2t gK j@h0_~%G-L֪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ji)j a ZxoW[GS1#۩ O9%kYV9eGږ-/病֖El a˥Co >CбЩ!%f5n+ZK7uXz-{,;Pc8<StG QqZZG5SgMd@M1OMqQ4Fw 4Z'pݎ4 S|;`m@FjG�4{` cӓut \*^ endstream endobj 3254 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_xyerrorlines.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3277 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3278 0 R>> >> /Length 1146 /Filter /FlateDecode >> stream xM6<6Uu"@VP4:Ai}%z`;;_W7q\?>~0?]G/GP&?Bl4z?\Շ) 9xØ ^{`px~?>NO>=}}u~<6␦!9W1gM!)2vJ"SI!OC0�,̐$HoapPF 4u\&ApP@aD'n/l}qϰׁLẄ&謹IYSxLxuq>7%Ԍ7[)3[Z|IT@wӟUƌ#zE+e/$^8+\"(*FM K-c֪\U:Oxe] Ow)k͈Y'GKz8 $6 E8dGak jF6/BC1.NX1׽1Gº]d\ ٘R &I[{LR#wz4QNF0?j*طBK`xlX[\.y]ɽx=vegȧ^fϦjn=PR &"Rڷe1%mFWM#6I>e[\M`F@pJ& `t"ヵ%FbnWBNg,MA++-pX=pW-&3`@#ܦPB5XPC()sR/7p«\ p$/bN_H=3C+o7[Eh(;NP~;=S*X"e=v"Eu)y3=Sje7U?@uko#\IP[&4R"Jc/1!ʞ2]7]$)Qߑ7#,Po$E G&"7RY_}$n+s!6J=ϥ�[> B=_U-M-N:ĥ/*IR櫴.t`"_^(~W$/bErB''Է?Kl endstream endobj 3280 0 obj << /Length 3282 0 R /Filter /FlateDecode >> stream x]n0EYWR !UE*=;D{0.sgM/�Xq]^"8+vJo9Nd5Y샚k2�+Ns?8 >2aFRx)꛰)B$$N(<oѺhտ^Qqd{k9ќBt'M<k1{:yɼ\3QK2jd_Jߦ}ߏzOIva,-. z7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3C{uD{p̀v*26sR9Ѿ8\FW.&$ckYRYa OR"[D ۊr(C{6@Iu@(S&<~N>Γ|q8!B|6O^?hOWF�::%V~u%w4mgGM>x85Rڞ\&Eiݕ<fBvZ\nnGZ( PJq4J N=5 JթZv. Ց~Nv PĎ/[ endstream endobj 3256 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_yerrorlines.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3299 0 R /BBox [0 0 252 144] /Group 3298 0 R /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3300 0 R>> >> /Length 872 /Filter /FlateDecode >> stream xWMo1Wk{BnZ* jTχ7q*5~yٙgIu}zuYu�_=/_ug:]yG-_zvNfڹX>&[Yr٨mLgg3xG1q3뻫 6כ;g~nnջ͜|uL쓞ٰ֤ÜN2a320O2%De 5袱9clM3j3RadhR7;`%0 �l2s2}O+5om-n?i6a_ѾPƠLܿѤ km[,EYKǸ ՈfM@o v +b ]YX2o*"M޷rqdyZ:4jamvi0kwGC`ƼT3%jXH<gHZ+/cZy2kΓyx܁,XRr9Z=#ΜڱDSĉ) 6G:4*u@MynU-6 7`IΞpxH F#<ae5d4!>Aَ԰WPo {,"D; N`%Tz%) >EUU1X/XU'Ɨ^&(5 D0!`69UC@[(Jf` 3_AzϰgeaZ(]Qg8:!=}*Ɂ+(dG ]b!/}oaa q~,@\ʢdWE-AEQ,"Uehb/%,1$=^,Eb `!Qfeѯ~!9$Q P"GB_Ayjz endstream endobj 3302 0 obj << /Length 3304 0 R /Filter /FlateDecode >> stream x]Qn -/  Y.<'` ŀ0.YtR3h}n߃Fƪ[Dp4jPF)r=d9Z?9ǰI�0;[ m5 (tK_ gU7qݒOz:we$ξz;"UՀкahտ=%[-LҪ1c* Hu19OǢ9&.|x]x,X&c~MFO3KGCJXw> endstream endobj 3303 0 obj << /Length 3305 0 R /Filter /FlateDecode /Length1 7532 >> stream x9 pTUםNҝtwҿ<! ` $ t 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fwmш$m869Ѱ?0o, endstream endobj 3286 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_surface.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3306 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3307 0 R>> >> /Length 4041 /Filter /FlateDecode >> stream xMW̒,|F[*Tʂ.P,\؀)!!??ZҨgBa{M-%~ZO_w<}ڗޢqs涻|X?<}պۧO쟗_߼]_7o??=s{/=m~x;W'[͇'[pb-|XR-~-piNi =bՓ^śsemrI{~ٶʿN\*-U.Z̥8s#;DzZ|wnv5/#$<^_E$zo/$2#P2*4YM{V+Y vsmE7XO\N\=)&sULmHf-䥵\֢d2Q.8䚐4@Ϣ+|8IJzG0Q&~lG?iS+n% [}˻9לt+V6z0ak?ִ̹F'Aݟp)u)r m9$s%Є)o)NCPGJ[$m}hR<@$UZRjFeQ5%_[Jg3ȣ\ 1 L{ҫ<ߪl`$6�&/m=+OJJ)S!yC95["wl#dN~9>w*πJ_8\G9y\n0w W<ǫGA%WMItEPC^Z]*'ē-83gHQe>A1bkq7y33scQWL՘r+K躹O l&ci68! h}䎐w<U-)*Rm6+HΆUYqcd2ϽTj3KaQ>wNӇD+9X5d\ɖ[K CCJ\`0AGyi$Pcm\0=r?*ڈX' O0Cid 'x4Bm%48#Py2 bL(=1(W':ii] xKqGMzcmר%sRpR`%Y%j[prH[8U+;S^C단+^! ՚@42+(shB']8 ,6bADC[Sg[ ЛQeYv%Й4fA $?0\\[8Şlm0YE#OQ'/=r`ϭw}q1T%u3[~J5nsqRM.Pi\GNȳaʝvjgBܝ \JWk6 8\"6yC%/&r+㡄rEk,C|�d۠0lM '.$QpSa9.K|ۡ9Q.>'(W:u<"ycd͂R0h)eDnb<vQdi72gJW"HgcWU8P,N|-jWK9pW\nX(2ɚ u'rJiZuO@LDKl:Tp7U6W39dS2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JzߓuH+~8)ǧ=HYO!c k0XYOԐ "X;¹6|dAs3Y?Y.\1 yLPx#ĚQB "k;vb?I 37揞]J=O܂]qȜX6^، $*"m,k4Rz)Z=-Bb"~iCRj|'QQY8p>Z&u X7decM`釾_| Fgc O!)>hy]O^f+/2痸KKK}/,Q#-ϋm#pg*/$..m{uaqro85|nxdxtؔzm5o__eVwM>3g0G~$x$z}'/ <>8}zV e;<+q[v|mǀHY<1>$ȞG<?ul꾁w~3Qv{8x{㌠/m36N}[dz<%`Gcy(luhgl-b_g5@hf[ܾ::=3>"olhyA{c1/7Ygxy4.&;js0niegg0)7 13%nVAd[:TÃ*i븹}}:Y]M Jڃ Yk CnRܹ+L ލoFd LIx'Iv 1d`wX!Bػs'^1ޙvμh, endstream endobj 3289 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_surface+contours.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3313 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3314 0 R>> >> /Length 8571 /Filter /FlateDecode >> stream x]K%9q_qâ/T& p/l,L3Kʇ2uS0gRI|IQß?ovG|GxΜbz|~Oۧ{Ǐ?|?zOO||_Ï?/?~5>?~}~=v_}[ ?||| [|O8T(=Կ_io~{( 8:l{~?uԬ 侽Jx3=Ǿ7W=Rq"* ppxbx0[_ƕ=>r"8yzZ~7|?uH-C<^쫐ZMW"{jʋ,g~dھz*W|a*r85Az%?x?c-9nՐL-�bЍ|ؕz%A P˄% & UU&ԃ9pOz]Ĺ QjMsW}ӆ^8Z ~ܰ?Բ_7ġe0+ [%p6hSҙ5QbI-aR 'Z'ЋR# bII <4leHWba^q%Kf+`ejqVӀƍ<.7t2.vVMJ }aegEƯ>b'vTؿ"_&GK6{GqZƽ̍";k9E^Ί)H|^R;l"^*?S.-Q )'lKZS;::1BfWʼnGYGykjG\b4FfBszU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掘bwX5{ÊԈ] ?뷎DLP,(߯a D@I4DSHVz r(SJP*%LKh)X)Uww(h]W,J^cqW ;$ʞvNP Tw֋d.S-Uvq]HBSTp w5V_qTؕUTJHV8rD궪l)i @!UYJXJmA]Kj>MÃXX\V6'ڹFN5bWj8&EWTC  zqĨ4EFRu9MAז2h F/CF "HsU8Ū[9GdqJX*ͧcժ洠.Nqu^̟*bb8à .C0:ReV^J%*r$MrZTi]5b"~$g�UJM-\#` 3d 7K |BTgZ4-a-ԡ{eYuY"1:rc<AC}SeC[e5p[cKi ķ5E`YODZi/ eTTQԕ#`ާeB : U'Β$!U'4) ΐ%(~L6je#<* <uc&o?ZN' џ#{S S;y-c&U݅kZT xLu6D( C5Ip#:bVW*RP)ND 8=(Z]RrVT J })['knFH'y4_<4tqJSo ld5;዇.o7[WTBVjCf 'M{äka]5< SNX9QR|ea !O{.8SD20'^l''Bq&V|I!yobFbo+ CO変w /+۰?'2%&�]@Rh'0{4J~j% 䛋yAlҌ٤2{j8J#}( .hUUEa_k_}u^0$z?`p~?3E/gk?w[r0?k99?}h1X?)?t}Ɠ.998֞=)Xā3x.$ccˎ8LCL0>p@OBa2RYkeE.= G;` ˌ5u Xb!e1R#e<mrym۷{-{of^µH pMv7l? pex,#ӊHmZ<ͬV ^VoX X##1՘ BÃz?{QbH)kPk߯=WkGh 5\Sk|ufgls%ln¤9d63fsy5 $ԟceP6QmEwB[VDݼgiQ%N  $͛h@�[%DmNa6df: *C l* <mڨ@j:{sz9:9Ё?^,΂ endstream endobj 3291 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./figure_mapcontours.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 3320 0 R /BBox [0 0 252 144] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources << /ExtGState << /a0 << /CA 1 /ca 1 >> >>/Font << /f-0-0 3321 0 R>> >> /Length 3728 /Filter /FlateDecode >> stream xM W.'93E�]E6:qrSWEzAřD/q?{3^n~}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O\W1`Zu^>G.TQ;O9*[>dCtl&i@+�##K%zB~x?Sg*;=I?$= e9Ɗ&^UO1O/g9$V/f^O):/rgx?CV�؎epWf0E@-سߝlk;eKZ*>fpŎ1쮠֔OUv Q֡(ea=*R /4"u [ 0rHF6ŦAEAo6{$a)?Ŝx#N<ZV32O}ɯl8]khJzh#meFHq s#]ywU4iw<:ѱ;YS slL蹑X)%&o@co, -<$“ baBYqnXCFlHzxJBw1a#Q*:nhp!!=v3she+Oo&)H.~�É2DC]Sn{7"DC�G!FiXkrHǬ74?:s4@"}MB� @Yj+qaېakh:GY� rq8*�Zo@AAJt5d~&TSZX9 :͢R] 7Qn}JH ^RթA^0mG TP'=`]K靪fZ7Mޞak \JY.2!)脀?lI&"g-:O׶V a=FI 9: rt31oQmπ�&D?ԅp5tQ-}$6 85mFF؉ocSWX,LR(d8gupL= 21P޲Xf GF!ʦ<BS Y— %ssH]V<Ej V3ҊEzZiqpE?CxrW<:č�چ8Xf\VNc:&<3SB EMf2_bo@$#LghBBG $x3;9M黲I4](#㩱J{I~2tU./ bRYɺ y@iO{:�"b"FeJ}΁A�@i><EYG2~9ptWz ߕ ,p�S` CjpŪУ t�W|Z�H`+;B:OSav1\6yZ( 8W3-A�J,OS+FƻЭޗϱr8*%!$?ZM5&s׋E}/�jIZ^K8s*&CdĬzd,ϙGOEkĩ# �6r yhJ?ے}MHX_zKCw_ӆurP!h+ ʻ cHfy{3e-.%kYmDv_fpr&8hJ|/=;<,̼7k2/l\IpO+e.?'YQw~ژ8,'Tю̈/߽D*άqae{JpC: 8pLh0?C]k> (ds-a{1�0`sN/hG.;VNK{IV5$WmMܘ+b;7 -oi}Uob.fSa͠J.}a ad`LMXIɱ�-i"KΡ «LmhviW?8͊V D3t,Cf5cw50d̻ +TQQ{-lCql#3? endstream endobj 4034 0 obj << /Type /ObjStm /N 100 /First 995 /Length 2253 /Filter /FlateDecode >> stream xZo] ~_v")`Hd+aEۂ<m, Qp#>0 ?$湇:$)QpO%R)UCh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hnq'D< ouioY/�|PYhy8B;OЫDEIJDsG,\3%a͝,{ �S�WhJ=Y~\<'D=iqy">"4hPLezi'R (,\W=Go58N8v:YL@G䞀_oek_GoYjYr᳦~麴`DW^vp侑#W̖LwC3Z:(#U|q13ӈ7k* endstream endobj 4222 0 obj << /Length 1765 /Filter /FlateDecode >> stream xڵXKs6WHD �v6ډ/�KŖ"UR%bAJ)+5.^޼|ceZ>&cVÌ͢e!~fƻMYogs)ey3s>ݾ%a6K-7>%F uy7u9TV@,*Lx[,Z\p$ CoW9T% ǴyP�r`,U\,^̄Wz[j|̒x *ܾhCOM-ڛv }gBsװ\$c2w0AvO*0FIly'[a.MtEsd [[W-CəLmpA}#Ldi3 mFƆgoJj!ańǢ wA,vS:Aua8]@R0 B yI8dȑ^hSCz|3*:_<= rΜS"f)W#\H\˖Zn6Ou7Mh2_z. !re5ކ<iDH}X\'0ecOa"S _OyS{jfZUibaskc`'GEYT9T:&h973XM@ _@ N z5z-K Iix^ n~, O"e1hMkxuaXmMAxXCHޭdas˧f6cR+WR47 2Snǖ7C ۇi#<EDE@{j*tV (ѿ0e#6u),|~19җ�}&0(uƲWĊF)ʳe5ь,K@YPۮzrU]aʅJUSL[�JÈN%Y\Tr,Um#nea^#?\k>u _"(!c;ɨlL?<SySB w_�a._%YXP5zwy+ő՗Q,MՏ!+Zi}_z( L@ .\nz.Mɶ($q:;7M`xI3z=}b1jc~'g Ht4)H(yOcg3rΗ~nWn_]ezAHtf Fg7&,aEh`̈́ ~wt j- xHIK_9o`mQW!Ǔ9c,ZB,4ƜPʌLo j.4/H_j+C qPvECndcMhIU-)FRNBv�4L/gFe};8Lf?=5ܒ PEOYk󮯢TS`.kiT o�/Lp/EmD_4EyL35\. WNp|Bj";:}]D=Đx Ce iw)ApԷ+h9I541|44%0/N=xh#7xoCi.dbS!udLgǷ,^`"swa K/ju̗!ۅХʐkV]dۺiϷ9aBNhGD· endstream endobj 4233 0 obj << /Length 1882 /Filter /FlateDecode >> stream xX[F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IOq} a26#~塛D՝ Uiv,ɭp+{[D15@aE3}+#䀘Um\L1w[�5An -vd: x g@lQhIUsü0Ϭކ*q3*\*ۆ9Qye`Oڨy9C]'[K [C(&k¿{Z[#OW;GbT�Px endstream endobj 5447 0 obj << /Length 1257 /Filter /FlateDecode >> stream xڝM6UHנ)R!@#^v%S+QY,q$٤%9vG74Ʊy &Iͽ>& QXoB!77"O}]?[ 7A@\}x~ 6ۅ*0No}^zot޳*~=>ZxBxؐ{<yΠd Fƍ9BzC;T[੃~|_FaMBJ*d?Oښs^$  5 ƴve'[xɒBT/ٔVǺ9"'9.bW]hcf;As~ θoyqԈ3F}l:%>]# ֯8/ r?8CR9-mD�v <⩷`Bji4C$q<{}=Kp}[HhቫZd@.F6mc,u%J(V¶cZѣs_Y~גc\pV/];`Vn ^ѻlqwaz7j!rV#ǟɦ発_L M'h+gp�g =A3 4/�:_eU+0x՝i球5 EGkspOV5ϸᙩ7g-Qʪ+sa%+S0p`};ӪU &8J'w`J|]®^<|%iAR. Is]nihC`*'8M)ebtJ$zdܼ`(Ai@4Z5a_0c 4@%BgroDJp, f1ڎeלּ3a1Q2ԣtO=Urt0_^)~xsE>3wC |O0vv<sPP'S -x,=Aad洇s?rx{O咬FL.GA' :WMV}P`|ٕ,Ӊ=oE q�qI{o8TU-f)Ej;HٗkԝM&5&C5ݹW=15O/#l oss?P%Ծ)~ 0 !slFt6f"hj`}7]/&[+ duW5 $ endstream endobj 5286 0 obj << /Type /ObjStm /N 100 /First 1024 /Length 3048 /Filter /FlateDecode >> stream xڽ[\W\8lvIۂ� ":$tM` 8* o}`0 jM]MjJjjU4UX"Ԏ?yrwze}kLR|`JZ#!$�nM99$] Z9O2''o=UQFG3U]l]o0ajYT2hy55/kd3i_t80-QzM&(]FX&-Y#O捣 Qy hcduѓ7]x7(w೹:fyksլ[MMݏZ]s8ܿG=:ӰuQ,h:84 QMcRy;Z8?sFᨧi}\@i])i 쥔ebJ=+xLiN㊩t ǁ00k~mJYA{&r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ĥ-[ @nr -[ @r={ @<y#G @<y<!k)1p j $AAA S S S S S S S S S S s s s s s s s s s k 5k @\r ȡ& 5i %%%%CР54A jhPCР54A jhPCР54A jhPCР54A jhPCР54A jhPCР54A jhPCР-4hA ZhBР-4hA ZhBР-4hA ZhBРIoׄjn% b׭c g,1>[w endstream endobj 5634 0 obj << /Type /ObjStm /N 100 /First 1014 /Length 2444 /Filter /FlateDecode >> stream xڽ[Mݿ_eUUIU*0@VٙY Cgst}כ6Di0n-.ǩRѻVFZĔ+ъ@5gH5zI5F6#/"3_0 N"~7y+I\0"Q/c=7Et}1Fh |B|#DHY#baa#sXXZzn.m=J7|SJI�/s f"KKvĹE~S '-ӄ#<kmizq50o1XodɩFk%&%w>5~;w{q;J8 3 F̀V`4lѲL|L: 2)L,Vfਗ9FKJP:z# %Tzpf;=TK&wz@Xv 9kF mP&m= nAb000O$%"K@;b5 c;%fj$K�aXMD!Vnv#,W4u^B"b5w^nǏ>ܾ?姏z/ ?t&/~>{|<G ȼRWcߖwr?o~ۏjo7߼6NQGm#pMAHlRYDFvÊάtzӋB  Tc{tj%e:�RhPh(r bFJ/6j }VE5\.bڦZE@.Эh4}RTp:&Ox'x-Hć_:!Ff|?@'_Gs?ZiBsq2PHĦ V0-q"nب _ɈM*#z2W$ܵZx x- ,XipFJ[:ðs3lQ |qp{!G1c+jZ*W!it! @dӘ39d(3\g& ȁ>D1bʺN0^oHb;u&M tT 8S cd#VY3#"3r$`RS5++E=N|j`.̂Xm>0VY:ǰS#4 ~Gᤶ^Q?bS{ItnJ5o^RY.pR"@2 EN#AJf#+:"A0P)*,^j;r7jLX i<1)l}3SCa ³w[59EkD} q1Xh=`2I:']E[aF28L*Mw+$fa�O_- 6pGD$3;e1A$@(yP?GS5*DJ!C: Ag2MM\Gd;u0:@txvs5:'W2ƀaُN) WWiM2 #v0J u:r]1P!=ͣ <`Q#Z7&bSS{E1x5x^y qf � + !^RwjZD›G˾D}7ǀAk߇af5zS{FWׄC r PV(⢢~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Dzk ;'5Կ&vagҽkk{T (b ϗ$xpЛ"%O3,@[.Ax+)5zBX7<^H;M“EA"' زzCEZjh<QY٪/%k8IB5Qa;:sOO*j|=;W<Ayێ2;X|yYwjkno(Pp<:@NQo@sCPex,!Hx9au'[8ɾ*P_2iqO3`<j ͗ds+HpzF|rb }N )J49ytk橛m 0+wa�jc; zi D6T;>hm 3MFovDw_,3{mGsf]liK [WrRc<͒ZC&D3k:;DˌyS|xp j\"Incr !V; OTN6^A;Y<1A_1Cyr69Dk ;`U}ŠLTRc2CY�hM]cd2) sH6=5SkTJ3r,N:ZT2r2Jwa+c9Dymo  8MT8`#4pF O2&tSV{'5z{TMDUrƩe熀?�B Un2G2V+MhQwNUL9ᡒQ8>~`ǞV4{P7B8OnȄ1CmMN#P2x~x"W;٬wxχe܅;Ptۄfx~y*d GGa18߅b6$!.ަ"`uɯk]g!� endstream endobj 5854 0 obj << /Length1 1438 /Length2 6197 /Length3 0 /Length 7169 /Filter /FlateDecode >> stream xڍwP[5ET"E!;* Ћ"RD:J"UH(tI/z3?Ir^{Yy8YvH[*@:J`3 �EI89? N G"dA0ؘ2E �M@DRVDJ2(Y2nh"04 '惂;8b Ddd~]a(8�@00WD(�FB0ϿZ9b0n^^^BW +�c04 " Ѕ&D 0rʀ/ \P@P�x�XCC �s:�!] Bn��zBo��z'~PU4�@DCQp7 Z wERW9 @HWW&?e8 @z!Yvy #0 ? l?1 0oF>nI_a,�?7K�aHO�ĿW$""�;89$ Zc%{,X�>Šp- +逌OVI ʈHJ�#>g{ fG< ]$V0�,` �B_"F].o T=\\~x �k$&>ek%40MX $JѪpo>uKMv G>2 rXA4~`Xw{ eCQ I�`%]I�D~y9@X`K�X�{$͊�E¶( u @^~`0(4z7̩&" ~sVs 4ޗOCVP'i;o,ߟgi#|b|id8L2;J;|GۂF?_;7kr{HSPyuy- FL|~)EzY6.og\<əo3EFCwsߛrd泑,I$bE~D]0Ew0p0?gkk*3Q|.ahD<b4֒I~47[f]vܺaH|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-^|;XQ,r*Wn^E!sd%!Hc%b~ (߃! 5qqok<F89WiTgr1Eɘi\}_)6~/b6Cɦ~+z7j=H�5j όzF =(d&y|v3"j1dCsBWGm+gR`rCg{F1522fQͼۼ4%hf纙ε-fJiɱmEMiTe:8F& +k ogU^C6S]hiֵksːt{|�4٬^(' >HGUBni+{oߺoiYu^~ס#2\:-Q6UC1Z *7, f\f!@`[Ye11߃YjQB4kPNaGW5fMu .YPLrŴl·XG(mf=kݲnk}P1֚gPKc+M5kRZgXJv,utJ }(u6阖‰ pݔ6w>Ќ~ ^D[[MXWҳ;2$ra[k duuҤUڀXW- %EZh&8Pen;SnԖ|Ir\h{=~&U\1O-e _'tC4Ky<aawDfzΉ00S{R2ewk/Xjk1u-SMsqm/˻\pG}kE^aD],³ŗhG1W,w*XPf voaib侳iS i{ԗ^~U8cʉ Qkt?Oۺ`fWm|X]ڎCgTWqjh*Lg׍U(.8kngTŷ2dsed1"o;B<(kC>4hˮ5_뛱EpWzӗŀ+.ϙoYvϯ/nv.q͏;q^$vן]yw4o0go`ANjMގ |<x *Ems?ڧ endstream endobj 5856 0 obj << /Length1 2779 /Length2 23388 /Length3 0 /Length 24952 /Filter /FlateDecode >> stream xڌPXhpwwwn A[%$|^սEUk{sLEQd ٻ02tXY�,,L,,lHTTV.ɑNV {?4ĝ&.` XQdsXXXX�l,,S9$LܬL�9=Jde_4f�V^^nv@'+3{;8-@dft w..|L&vL 'K!Z;4*db4&$*;+A.&N@�X`kewڛ��uYoe�49 d`bieo \<\�&MlA`{7+[S_�DU& řW̿܀,io.ڻ8#O h'?õ{YXٛ[*ՁY(+X[f tpps��;_4<kr�9�,e�},H^&n@+σ"$VV hie;X dcӏo`m=5bf)Y1EYJPL b0q�XY8�/>oW_RãwAA 3@,,fK?J_4+Yz泫 x7A Z dkd]L"joio<*V.f&�vnkeT9[p�,, sf6K<oHI{3c <z0xL  �\k\�f_Y70F<�f߈,/f7b0KFl�f߈,F 8o+xU~#pt]7GW8�8oE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FwŁE .0(rVa>{xqS45~at3㐨o7q>Eu lRdBEWTׇJ* TXYN7̴[-q{Jㅬ8J.A|˧ +++voqBN3^f>&3beMSPU 3obB g 1:EnS5]@x$1jin.=}W?.4$ô']k$7A;Et9XbJ>7S`odV K>q l;=y_}ğ5BV{q= 4$cA,Zv|q=c!F ˀo+ endstream endobj 5863 0 obj << /Length1 1666 /Length2 9238 /Length3 0 /Length 10324 /Filter /FlateDecode >> stream xڍTk6LKH3HH ]R0PC4%]ҝH - Jw~x=}[s}]z^KCnU; 89"�Yuuen �y@0o96>wC F<: <@D@ �sTPl&Y3G� -,,s=;�kCD r"f@8pqq]8Vn05@uvZ�~ �CJ �Ѕ["P:<v:t�P?j*?1;<`V�KƉpG<,~v.{+f6 qt0@AZ�~\ 0G w\<YBnou@`> y_͵u9x,aӰxȥ�sz U GfE�BB���C[#`f }rBP+ass,`jsj'~3 0~�&`sjk22pw/ |*wHN/px(ߙ5, +Ch `g@a7_O=˟l0ЯˡX@huj%vztn>N ߟrjC@�Ղ~_<V@vbp<Oa7>C<�3a$?ay-<x0<;cn0K$RpW?pAx�\V·C�p >DI.�.؁]Ex<xs|0WE!J*<oǕC!سphMM`E4ƈ~ <LDjnFjlME̱z-G3:-+:3xsH dhE {h";$-zutwc&-RT jh*JW#]d>�?!>:`-(,YSUK8J•׷"yj9G 97YIv-zKY.j4׏vY:,#z^9.ʤ8gn[gС6Kğw”ʿتzMvܼVMV~5\=NlOӧ(W`gUIDd;>9}v g,A<R[A ~/xy\a)z\u?yy09UF8DGz.xp#$:R~̻}XSjke]$\@YE|~' %H#ğK۵?jv=@'zcQv+^ɚ~*|[&66uba QuM)kywxoI#[WN"X'&cr H=ᵢ<Nǧ{fJwo~7}| C|vQS_(i]+mKX<} &H %S9^D_m^VXcs5ڬ ߰vC^1mj^ z\XaXS60!v߱6M{<tWiLRl(I0awi2]xGmDǽ?j `퐠/\\qﳏM 4t]K Z(^3ɟuڼbY_'O!\Z|XsDoQO_'j 'yvJ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(+'ig=f8r_GX)긕m[}We\Ro`#LeK2d#W@'udi<Hh 4H7R,r{ǗTv)ϭHLR٢0Wibh{e.-m/[_*+G.$3Ih[O T+~k+>d .`_ ^[\nRJQ|A.g'DTt &&Js=xf+ _B]@bh,r4(,kl I)`c|$"k\cv2m쀋M.y62=2nFUsG__?Op2'j- Ȩg؈9~]_r*J2G9rV~6D R ֹ-w vzJw 6ۍ|1mF lq0~bvQ.Fwd|U"L'xc|30O;Ц4&`){7RAH;=X?L6L.Y%׷vGr]R[-sE) UbVcu̖W P2kydG ʙe6${3X'RVqKTQ"˩ ]*kʭl#C:%?-HІaZS&+98c<\$M_vPU+.Qy cNhrQjZdDɉ02e-M-e|^Wĺ];aPTTq&`M*Z{6̗~kw7~:&7gLž%s!\,CO6[P)qmQ9x@ [8||l]K.f2�Jk2spᐃr5kM&H W80rxfyƧaL_rbfps}qW ) j_׆ 4b`C_n ;Qb= -T:weS>tpb =i5&FЩwLӿs!o /!ZN/v><@ e V\w83.�b `SJ ݮ�!&^9,f{!_%==C ϳ*^3f'e|a @I'ʷ!ҥMe3qPClGInZnӇPcDZcWoܧGǒ\+ 5r @N&<+)Í}hI7pG!FW9b3QޟK(vuȇk?ґT,-5U(L0!}[^;o=T%!}hX rA"e4N/`ݔ ".rm:M#>hPs^VC<!`9*&ӻbߍ-'脳^e 1z̪Epmַ?Ur? �>2; F<R5Qty'T=Et &qB2+NIAE%z/m9+hzQ"u[M|/?@$x~Լ9h4+"<[']9'9$KF~#(8\8?_ endstream endobj 5865 0 obj << /Length1 1540 /Length2 7917 /Length3 0 /Length 8940 /Filter /FlateDecode >> stream xڍT6L "!%C03)!ttK "" )s[~FS] n @.a�ApebЇB0ȸ@@{,q�@�_( O E rZ8�pAEo%� NH9B\` BBw�:p0W fQ[IÃwgax@�m+bEraƁ�е �C`n0+ ~s*@ ' �+W!(w2 ;:`^P �hȫr <l�W ~rA@OKi@ v:!\9\(r*sr0+#pu>Y |^:k{|P/VnNz0DI{6%(# 8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C҈}(l(kt,ս� N+im& Ӿ5:#RQ;>&~עyeEz)} Rz~j̅hְCT^pTհB/8t촯M=k?N Lo˻sM׺R$hVC$"GfGq$|N@i7A(^m2RcTz ak>c.}?Kv'dݼɍsUET>UJ3GuǧUOLֆ`t)OWD޼G/2Z:.މtp"#n(4>sm#/0|(/TT8IN=ֵKXtСތծ';FL"^ ՅH<tز'2QҡbE~@ob+y{^-Bl4(9L$'Bŧ.h2#^h5m2t [>w7LLpe_}yAKĝcn^�Hnjٿ5 :T׏S&ڑ)InpGŞgL) *3@c|+s+972 ? ,Ѧ%fg .v4U<u&Rp%hPhB]oͩbZ-#>rEE|6-.ձ%sA:N<=Ĩ f{Hh_<P|"9* endstream endobj 5869 0 obj << /Length1 2359 /Length2 17125 /Length3 0 /Length 18514 /Filter /FlateDecode >> stream xڌpj Ƕ۶՘M8mQcmjlY{~9g2uY"SQgp2J;911$̬TT6n.6N0pdn ;E'G= `ge ?@ wr"PI89{XY#֜;@bcnP4u:2ԝmnV͙ӓJif P]<Lbƌ@аq\� ḿ wG �.�Pv:X_p+ΦNΦ6V�K{ @YZˍ`h񗡩 dw�i1U)鹚82E0.K9ZH898�\Ohj7˿&ko`iha wgMG@9DdV@7�+++'��2f+3o%_b_g'g%j}_1wlD xYA`翟 Aeh+K1uN^�_&N�; (KULm]럀rN�Q�?4<:fPr2@g XXA?.(o v[MGm`co&B tTKVZظ;_):FWi/V?S�q8�XYtov4U@9oJ)Gs'`b Z/v../@-^o6 �X: 5Qn.�_!n�`x,E꿈"Xd v�`8,?T/(ʠ2A (_tEl 栵 Sg! $5@^E\ =hpr%qpG tHX8\]m j@Mc�?YS*h4@Xd,�T? ? 5 \ WGC"AdAAt@?9-upM]gQGc@<t tԠ^87k?F* zxyc@H " (_0ww1w=!U^@sy's·Z1BOq]t:&E.'.wb)=h+RKmI~/ jS 8b DL{~ StEQ)|jX UݫR1mT:KU`3GD Gq:{{77N*Q⫷8M'>%1-A<o߲uѴ9Md6Z]%+#j ~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4פa?7R7y$,~'&]9G6dL(ia}aڳ)J߬jkM#[p0='k#n0@={CQKd2nV +_\0< G P7~Y,)%geU'E尀7ks_}_2D+o4!] "omǨ76跣r+8*A/�*1�f;@44`wq»2)w֡bŅ#nz"[Q= )~ۮ.9>2}'R\#=|&vK0S3?bEgC^+\.kTQ6HR䜐ⰷ/<.ZQ?U#֎HQnb)řJ:A.H<1s3х >0fLU=E/_f!F!y=^h2\DA*GkCF I埏(ʋⓑ-uR oGd=XJ\t/bA+vsXf5٥GH~)Ϳ#0d;zbdeğl;sGwrj tJ endstream endobj 5875 0 obj << /Length1 1658 /Length2 7411 /Length3 0 /Length 8489 /Filter /FlateDecode >> stream xڍ4[6,5Z!z޻c0D{ z5h!DA&99}k}ߚf}m_=^׀KfRA\|ܼ�-3>^�/�7//?!0<`T<<@$h@:j�uOO�','" !P0(ä�s�;:!u~�|bb"r 0 вE8\ !|U pus<8`@yx(m]Aq0 0 `  GxBA�du&@ Y/N�I'W"0w-su�0QF 8P_8 oe !~o,E2�!p0G_imV+\]AP < r�C~Ѱt1=Aj|0G +&,,�@>@'_ }@a$@7Iv�!?p^ �߆p�` `rCq Z#Eʏϓ%Ra0(?GHNH0?KL' ;?oTgwQ �EٽxQ럱a6 g?+ D??HmgcuC|x @Ά 9!u55Z {Z:"u'++}@`/-}0 ;(^!G肼[#m!'u@zx \ j-q�7@�0_ˇ-; = G@/XqGHB` yU`b� bbgGtui<@HSI~j-Y U8 s0DΫ:9*oqյ$h!N9*652u+"؏<yZ@Qܐ?*~DktɌ :N֣!@`I5~m7|\l ( ϠBt>3g\C=!Lxaif4q p)Gw"!{tym`iFpM$1:}X0irz Y^B"=5yFdLPGgB=`BsR}+֛y8qe23ڣ\f @ h ݋?f`ef0 X}|teo.B^XB6`F2@LDM9ۋAp)]*|mh_ t:$ɴ+g`/EM10^#ǚ- q&H�][E\Vl~!XȐ裡6J6x\ !>QͫOKJ>]<wHX@}$;~,+ns'2mu`y?fGl:DdnP(ȚB ߶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|OOJ~[).sK#ȟ m1~ kCJ+z@ΌRd:1DrYpLb#ޤԷ=1VƱ,&"P<S@>JCP/GEqP4 Q-{yC\5R kIdĠmhr/8/q5YŎ9*Awx1뇸^<X6f{W.I5qn) -oثV =?2q)hH3̑V%Sr1]qWO>4/dJe{'4*ay?F+R Yt1f6+IYO(6nM{hdhX1gFv'Y>ӁJx6q.'9B%{eI�3D)Y&]\x!-Np3 jxgz< Dˋ1>ځWT>; kz$h:_uĦuz2ti iceuMnk+X endstream endobj 5877 0 obj << /Length1 1414 /Length2 6093 /Length3 0 /Length 7057 /Filter /FlateDecode >> stream xڍtTk.(1( ! Ct7030 ݍ JtHҝtJH uΚy;뾯`瓵AXCp_@ o"$08 H7.P0 mS�q8@ �D%@b�A"�PCnDo$n+ �=x vw:@Ap&euFw� W .I{E;#v0=@Ez@m��?8�0?v}-' wCgmH�9@_U pl� ~ ; ]po` s4Q^�0W {aN`ktJ�0_ H ʍ "W6gg(F~ 0$7fO_[wc8WD<@]P/=Wyoo'El?"_7BC}'"`�P;h3|$ `& 'hz N/XKCUC^�_>�D?. U rTT"�`@oт/pA 2D [�SoUEo7o;Ü @S&-AHYjswo* ,Mq>0;M с *=`p 닃/ZuGW .(ZT l~OPD�F"Dh �|Ah@~�#P�?$V� V =wQ��t~D}|( !B@9T5e24;J9^?CyUʦn∱)?F#^Y*( 5CW'vPݨ؋k̷p%M ,ȿjq4}p~#cKeD`ŘL)fiGb`rͱkf }Y=/_wVEPS &S'fջapʉ|/NIC_\= bbbp19 ¢0ڷFkdž9$~xՌ4Hc`e\mĖʵ_S<Fv&t{\1*/7\`#OXuELg4ItEO6QPq:2ޘP> ?g1ĭiiyy5)Z \uY2SH{0h^xI\,0o~m?xZ#+�ďx(y/%ƿ'gݢUm"f5>UZ@`g1c$ݺD">c,iTR Cfh|Vx\bZRyFAL3p@.!)![9U;rJ"<o Ć nx[<r4U_@=3\)g:ּhXpv[+81M 4!k|BCV26|�GXrbW9eҕ(ܒAc!OwuQ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q%/ eJ~k:Ag^֒JyqȈ\+*u |Dgs$Av>{<HHU8]o"m˟zKtT׻^Jա-5/YN"^PaMwvT5lSSBП<O:wnb9}}}@n9jNtx+aYEy1]Å.|]6bfYmYƸu4qJ]SzSR"<q> ,UcJc }уMgN$Eo Y͊"n[X@݊J -odΫԆΌc8<;/q7mU#JP/VGgX39ꖫm|es !Ayv mgӈ#*C'Hug2k*,N&pTr#b;g Ǵ vg~]((#EGL5ZlAU}$,lvhfީ4pϠݬE.^ /]%Sk[ޥ7`G|'Dkm �b?[3B/gbfd9 ut`Mw=lL'P_k&a%BOeq5OX8i |oxI"Y=Y`,}vSY26+$j]y<[*)Ԅ_r'`hNJf$yLkŚ/ݥcY4qmeSW=9٪[6wKDY|*ӉB>"hꠥ] endstream endobj 5879 0 obj << /Length1 1592 /Length2 9342 /Length3 0 /Length 10374 /Filter /FlateDecode >> stream xڍeT.wBp'hwhq$Ak+)Nqw+X^}{c;2Fk# 4ZPsHh+rsx9x0{rt]  3 $1=@!W�n^� !B\\�.. B�37%@ 3HC=6<,�nA$@` 3@ frxhafЂZA0 ,b9 f.Pgk1v;f@%T@Ɖ�жЂZ͜A'=qyrqXOZ�5GOc? 5pylfaup4x!�+=&  ]Ofnf`{3'?n�=UW}.`G wa, :8 0;, kv;odXZ.;ey#�\\\<��aa@_oG# / b]AV7BX-`�s5O'1O4g \?9=1 ut_+ɱURRP7/? xt8!U7uETXAԽ q 3B 0CC.~./%_7sCGo�ϮP>mM@. ZEӎHBx"�Ya6ra<C@PwɋtOga<i;,j{y_�̜<џOj � ' {r< :K�O$��q?�@?PA>�_�t|�/_puv~z;`S<T }aj!l[zU)I}$ UoKm[#PZ77r^sG:>Oc>1OJBm+&8;+צKkF3)v3"e6(L?91F"QHx1$ʥ$]N$F?۽NַXHrT:K\t0Ű%Kz95-˰8pVuB:bo2ڣu4Lso¬2E ^L%]rh=hr?93|'⌵]3RهյN',І"Rm75>EٛtZq0hp"ou(}^ oL8>\YMtGo(D>g+S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M)<ss'mCЁ-@CwYf xj#)py~fP7NQ8>鱠5'_:YXd/ pr�+6Wdyk2~5/1xopfTrN1>nñ.@3Òg;Я_c#DOZ9"N G&oupq,h \ sא9_&$* endstream endobj 5881 0 obj << /Length1 2985 /Length2 21291 /Length3 0 /Length 22970 /Filter /FlateDecode >> stream xڌPH  w]]{w�% %˝~_uoQ5s9ϱJR%Fa[##+ @T^UOI rOOtp!�4t 6�g+�+;?E[>  :Sڹ;̝~@cL `fk;@�26: �* L;9132Z;2: 2�\AN�e#h2@OhL�Us *N@�X`288ۘ��`�i9oe�$v2k; ` %䘜ܜ�6& m ] AVF`$ ɑd+F_fi189'r�Oq-ml]m<LA6&0qcV;̀N�Nv6��t36g@"/18oO;[;)8 7h898=\/ge�F@3 o`1o  n?V�˯;_%fVҔѠ'EDl��F6vv�';7 _+*=iS[�!s0\ _ nh~7. '1__4+Z�wx2maU5<lW "lcfo"A 7_֭@6@%[GЯ#gl >Sk z155zl\�CCwxpqr<Y3jtL6N-�pt�S[_%0 �"7Y70F�f7 Y7b0KFl�f߈,q�e~#0E7s\~#0o7sQ\T~#0E7sQ\4~#0E_  W29;[+geg deWK nW2&ؓoadhlheh}_b?9N9=Ze[l t>/('x w~Lbbke'g;7`)ׯu{g10?xXjpL[k\0kO`Nf?U68v@?42L? 8_'){?"_̿]qmـOI�q6uA |}1& i.VVpv>o ԟ~K dY9l;_m_B['aXY&(+8?9p79AW_:@?* 6 :V0n#V `οhlga;Hp\@ <#qc`:@]x�\n !4_5v[)Lʸ=vr[#s6"Z8~uyS"ɓaS-lps1-ؽc5=Dpv, e(yr0n]%jzfTp"<O2FLSf81C?uCB{!>`^cX)Ues%BK,_};BjukOGNaWr»O .m[yUB2G1[?&āD% Vsg}JJzLcPt~kAdE)Sr+"ʳbnmMD67>#7r CwZE %&ga$WW:w|iN# cmRHPXفb*[w2K&&Z$ Fwo(~0A#7?|۰'x =l!Q0T 3TSyqS@7w/7;'@|$Ogh*+Bco)| &Ҵ!DA,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z۸jB %oDYr�PD~꜕IҒҒh }̾t5w{#§D#-C0KŁ eO]NBn]Ⱥb2Y=@ౌ7_z Je" F+a R2hmñ>ȰZ`4J$./"<*n_Bu||FC dB6mhwk8h|u%RL+2P81B [P�}`5RvS1meZ@7!>Vf#T}<;vhڷ d\PjAf ydgboC|G+=^<- Qx{ik D=MRO6bo^3{ Zk!F.Hj<VduJF DjԨqoAUw)ל[Oݩ@$>zRZ1^9iߤix9Z !HߗIObPX k-7[n.BoE]5pg,|vȚ: kBm=i#<6X9I` 2`xr8(Y,uxfx)GjmK W=!Ȟ4.rJf3];Q#`Lc ՠ %jfYan°'č"> lRɿ\WsHs.^[Ⱦ5}� \L qU,su1AcG?t6 B.zF/$w3Na� \k-`Z8Ckਮ7'l}6=͉ROΘC_[L;ED'F] W?k[`'͕ދ,GSP}w<\El\Şzg~8я\md;at&s Y$expf!xe}4`+af,& PHD5@۬\# endstream endobj 5883 0 obj << /Length1 1703 /Length2 3875 /Length3 0 /Length 4924 /Filter /FlateDecode >> stream xڍu 8m?6JZ} 3cw){B3 cf̌aB"ID)"$;Y )KBJ,5}k9眛 K- '2HY*cfeyYB&*jv HM 2B6]" 7@H%U*!*D*0,`L$D'\ݨP? $TQQ<A2"�f( UD%PsRIp,ʓ"K$jHJ>8`R@2 �뒁(O4Y(`冣tXT  (ě�T42I ''Au9�R'ݯD8F0 &zP: `qx07RND)D(EC(qtu@A 飠8"K5@׬G==A[?. {5׃@!FX]& 8/oH2\A*@ �$pÉ\7CHDd8,}((P`fǿ 084p]qP8_4?$XMH7Z 73;K6A2r ;oXOpΆψ%*?%@w[\HZIiPD? l&=:=7I(OM7 3"RmlbpޞQQІh\.G8*mcb~ʎD nd|ʡ=75kBz4zrJ�LFah?$wc,HB�H]�%a-UR�(m. �GAMC'mABs 7A9�&r!D'A6&7A>/D"�XhM: o1( 6"f:yjS(Cm"@9 ހڛLo aB܋B-hȌ)50v؎> Q[OҪ}34\֏2;.S|*G[.L13w'`\f-|4;$J{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f|DXA�T�!{ D|*(@KN]^S9%P.^-T�I-At-;IᑢG8W{M_}ItQ(T9]Xl(ՅN4AO?_e?cz|9<l/p: 9ۗ/>8s=gz3Xo#.35NQ#}gf!W{F& endstream endobj 5897 0 obj << /Type /ObjStm /N 100 /First 984 /Length 1697 /Filter /FlateDecode >> stream xڅA7 Es ] II% 0`*  ANtu5lzaEPYjF_*WQG C Wъ *Yc_ւ˨dr`}he֥T-mW%^US1hWM+B*.[[V*^C'E u+#h+G`+* x=X U-hK}7ybnWV U[1T' ɹ05ڡۻMڊV YT!<VłU!RŨR8V(JSDנTHVPj+trV" *RERE[ T1trVJsJ'+jW(zJ'o \j:y[kzQA'o}+tr+U۱:y{ ׭;ZUB%V\Ytt0'1vRE_U+&RŬsz+hWլFeJMzʐUU*F =oclTqlT1˻?>=:O}o|.?oKnÏs?r~^:S:_ïe~v(Gp3A@?bƐ÷DcO^{X8C{2p[_~{_~U7KYRc~sׅ=7 p#;:zLGmlcsԆgj=2ao' Nen^5h@4w:۽ϣ<𐜇x-!<󐐇`CBlxp΃=yၜ<y@<`x AB&څr>%v1..av9c_/qη~~!j~~v9a=Я?~^w<O7O"c?j/1݋0<Fc y c<1B9yG7<zΣ{# hGy4ã<Ch9G3<x8b<q8{\̞Kܲa\S69p$pᰁ *`!GK y灐 σBdx>v/~&9w~{3<pw&ܑ;|s0<aÄ;pc*a#ɷ}۽ w?]t]='GA0ay=  zA&=|# zGA0ayУya=$!G y؇<C�‡��K`yg;lv&ۑg;|#vlGَ0ayp/f;L[aZ¤9.i#&QGnX7 ;w m͙twΆ!ސBC1_W;=mxL:Hf̤;+;>OF9 >cxÐ0|3>Cd #}F>o  7Yp#_cѫ9V!n`U)5ϪaZ\3ZNNݫ!9<ZC y!!1<8<{`Ãs<8Rv/~0<p aȷ; endstream endobj 5898 0 obj << /Type /ObjStm /N 100 /First 914 /Length 1789 /Filter /FlateDecode >> stream xڅY˪$GW #�` z @O[QUY et7qosByhGG|�Z{"ζxpM"k`]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-+d\z Vȸ4Ib9lBCђP|(ZR>-)1{Z%ҡJƥgp׸1.9θ�[![[eU$YIJU;NfslRڶhTR}R9wM"m;Ќ((Kvrs$"жMAsrZurZuU:9W}99W}&ftA۶U.]"I)4#Nѥat^&mh0]FI4ng\s?Mh6`J\Fҙ0:Eք)z%m &AC2P|(\r.Sy+lmڶeG|sf4.AtiRb.)6ib+$GԶqhMUIT*;j<m5A{TM%I{٤'hMETE MD6h/[WPUDTE C>.ض$i/JI>9-ֆmF{b]e$^c$|J W}Vt.i/+Kut4Ƹ}t'|m.4.)\t]N]^l[N٥k4]NC pHަSkѷFSsiVդ0^1;rWfMKvbi1CJEP}+^1ۦbDO$CFW Ub]K֣Ӝ"T,rCeB,Vco yqU H6 "|̇PR.!yl$mC:f*0Si+VqH벛2w`i-: `a8n)t+|mEzۧA]rW)\R.݊ǎʆ)Kb)}ۊt!Ep! SIsV8t+|mE4c(\r>.9nC-":)= S.ض"sJki0jsViVqhgw"}ۊt:̩Ü*K&┆+NU]kmE:-TbN+- ^qƽ=VbN%rbN+┆+NUܴ}mE鰘kd5 $^X6*l_ۏmM~k/t F,{ |W*Ƀr"Uw+ϳ4gMᤩ"?z!w/!q{K={^+wxEp|r]s9Ċ]E?|S]*.J+}ܺ%cWu_aI;x-~x5wOT9cW<l_|k"c|5 R̯e endstream endobj 6055 0 obj << /Author(gnuplot)/Title(gnuplot documentation)/Subject(see www.gnuplot.info)/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.13)/Keywords() /CreationDate (D:20131003120550-07'00') /ModDate (D:20131003120550-07'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Mageia) kpathsea version 6.1.0) >> endobj 6025 0 obj << /Type /ObjStm /N 30 /First 288 /Length 884 /Filter /FlateDecode >> stream xڍWn1,�8$`.'rT  )E>䮞Ւ9jIguޙgsBq$'9U.]Vu9EQJk&(:t)=;2MP)WYul:u )qcÎ_qk0Ҕ-U@c{;NV9oК/O|]_6O38\rTVq5ԪWVq5j^.6wLd#<831VXݭ~ݮOT&,K|7eUȞ^0�(@�9xzm+BA = �!$cc9PXA5A5A5�dPjS8Ys@4C4C4#=mzFlsXXFf zP9C6ZZ 2ȐؤЃ ,HLBӟ y(d+d+d+SH/N1� '> 5~..\ԠǨ5bTP r,vӄK200j(}.1."\D'4W .RMГGC24!CL3LK1 2<dd'OdZvlpE]_|�Oɴʣ嘫lW �@dhrs\\\'Cm2/ B =?'J [   $CT3T T R~2~? ΀ =I/ߞ<PWW$2a/4O€€gQw _೎mY46T}\nupX~)qn]HgegwKa,?]||^/lX^6>סR! endstream endobj 6056 0 obj << /Type /XRef /Index [0 6057] /Size 6057 /W [1 3 1] /Root 6054 0 R /Info 6055 0 R /ID [<120A6260B97CAB73BE342B2C4FC38B17> <120A6260B97CAB73BE342B2C4FC38B17>] /Length 14936 /Filter /FlateDecode >> stream x%}x\oYK&9i6MiӼMӴ[$Mפ6%p**˂L]Ep32ʌ F]@Oϙ~3'yg@"@'\K 7A&aTBn T[ @XrO@3r7# Qrs Fu:PO.Fn0Ց!tA#zrӄM"@3rG@ fr[QrG]%<;N a8Aa; C2II8)En%nCna/#wEӠ gYrssȍ!rȍr)= 7D"rz)KVɝ#L 9 *ɝ%ԁF>D"WMPΐ2urҲPFANZɄ e |\;9vr]6$pN{>QrX!w\*xH9Y%Fc$9l <%7O83$Esr( ~W>ž'A[)}}OEL}Sbߧ䨭}}/Hؐ~CܧcB )zr*ljzbo n ԆFri%EPo L/B&Qr*5qr/E Qaߗ'-c~9\;ɝ CsIxHN#WM )T아Tپ_~ѠdBSAHu#' P /ԋC%r5b߿LF>ž'Hb߿FnݧSB}^}}/9b߿A5O/k"b߿IΒ)[N{HH&OZݧ;Cnb߿O:9|_X!zArzG8 F?!I0R)9Nۄ:`Irrz:EE e~/P!}%rT$ Jr1#Uga pqv@AQr|EkAF\'0zd0a ɄӄM =LNL-$5Vp'Uc89N�+m{&A9ά˄'A'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,+xv1kxv1kxv1kxv1kxc̒>W IE endstream endobj startxref 1562537 %%EOF ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/windows/�������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340021�012540� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/windows/wgnuplot.stp�������������������������������������������������������������0000644�0004711�0000144�00000000635�11530504252�015163� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������a about after against all also among an and are as at be became because been between but by can come do during each early for form found from had has have he her his however in include into is it its late later me med made many may more most near no non not of on only or other over several she some such than that the their then there these they this to under until use was we were when where which who with you ���������������������������������������������������������������������������������������������������gnuplot-4.6.4/docs/windows/doc2html.c���������������������������������������������������������������0000644�0004711�0000144�00000041121�11567117103�014434� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef lint static char *RCSid() { return RCSid("$Id: doc2html.c,v 1.6 2011/05/25 06:14:27 markisch Exp $"); } #endif /* GNUPLOT - doc2html.c */ /*[ * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the complete modified source code. Modifications are to * be distributed as patches to the released version. Permission to * distribute binaries produced by compiling modified sources is granted, * provided you * 1. distribute the corresponding source modifications from the * released version in the form of a patch file along with the binaries, * 2. add special version identification to distinguish your version * in addition to the base release version number, * 3. provide your name and address as the primary contact for the * support of your modified version, and * 4. retain our contact information in regard to use of the base * software. * Permission to distribute the released version of the source code along * with corresponding source modifications in the form of a patch file is * granted with same provisions 2 through 4 for binary distributions. * * This software is provided "as is" without express or implied warranty * to the extent permitted by applicable law. ]*/ /* * doc2html.c -- program to convert Gnuplot .DOC format to MS windows * HTML help (.html) format. * * Derived from doc2rtf and doc2html (version 3.7.3) by B. Maerkisch * * usage: doc2html file.doc outputdirectory [-d] * */ /* note that tables must begin in at least the second column to */ /* be formatted correctly and tabs are forbidden */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef WXHELP /* The Microsoft help compiler splits topics and creates the index automatically. To create help files for wxWidgets we need to do this manually. Note that this might overwrite the stub index file from CVS. */ #define SPLIT_FILES #define CREATE_INDEX #endif #include "syscfg.h" #include "stdfn.h" #define MAX_LINE_LEN 10230 #include "doc2x.h" #include "xref.h" #include "version.h" static TBOOLEAN debug = FALSE; static char path[PATH_MAX]; static const char basename[] = "wgnuplot"; void convert __PROTO((FILE *, FILE *, FILE *, FILE *)); void process_line __PROTO((char *, FILE *, FILE *, FILE *)); int main (int argc, char **argv) { FILE *infile; FILE *outfile; FILE *contents; FILE *index = NULL; char filename[PATH_MAX]; char *last_char; if (argc == 4 && argv[3][0] == '-' && argv[3][1] == 'd') debug = TRUE; if (argc != 3 && !debug) { fprintf(stderr, "Usage: %s infile outpath\n", argv[0]); exit(EXIT_FAILURE); } if ((infile = fopen(argv[1], "r")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for reading\n", argv[0], argv[1]); exit(EXIT_FAILURE); } strcpy(path, argv[2]); /* make sure there's a path separator at the end */ last_char = path + strlen(path); if ((*last_char != DIRSEP1) && (*last_char != DIRSEP2)) { *last_char++ = DIRSEP1; *last_char = 0; } strcpy(filename, path); strcat(filename, basename); strcat(filename, ".html"); if ((outfile = fopen(filename, "w")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for writing\n", argv[0], filename); fclose(infile); exit(EXIT_FAILURE); } strcpy(filename, path); strcat(filename, basename); strcat(filename, ".hhc"); if ((contents = fopen(filename, "w")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for writing\n", argv[0], filename); fclose(infile); fclose(outfile); exit(EXIT_FAILURE); } #ifdef CREATE_INDEX strcpy(filename, path); strcat(filename, basename); strcat(filename, ".hhk"); if ((index = fopen(filename, "w")) == (FILE *) NULL) { fprintf(stderr, "%s: Can't open %s for writing\n", argv[0], filename); fclose(infile); fclose(outfile); fclose(contents); exit(EXIT_FAILURE); } #endif parse(infile); convert(infile, outfile, contents, index); return EXIT_SUCCESS; } void header(FILE *a, char * title) { /* generate html header */ fprintf(a, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"); fprintf(a, "<html>\n"); fprintf(a, "<head>\n"); fprintf(a, "<meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\">\n"); fprintf(a, "<title>%s\n", title); fprintf(a, "\n"); fprintf(a, "\n"); } void footer(FILE *a) { /* close final page and generate trailer */ fprintf(a, "\n"); fprintf(a, "\n"); } void convert(FILE *a, FILE *b, FILE *c, FILE *d) { static char line[MAX_LINE_LEN+1]; header(b, "gnuplot help"); fprintf(b, "

gnuplot %s patchlevel %s

\n", gnuplot_version, gnuplot_patchlevel); header(c, "gnuplot help contents"); fprintf(c, "
    \n"); if (d) { header(d, "gnuplot help index"); fprintf(d, "
      \n"); } /* process each line of the file */ while (get_line(line, sizeof(line), a)) { process_line(line, b, c, d); } footer(b); fprintf(c, "
    \n"); footer(c); if (d) { fprintf(d, "
\n"); footer(d); } list_free(); } void process_line(char *line, FILE *b, FILE *c, FILE *d) { static int line_count = 0; static char line2[MAX_LINE_LEN+1]; static int last_line; static int level = 1; static TBOOLEAN startpage = TRUE; static TBOOLEAN tabl = FALSE; static TBOOLEAN skiptable = FALSE; static TBOOLEAN forcetable = FALSE; static TBOOLEAN para = FALSE; static TBOOLEAN inhlink = FALSE; static TBOOLEAN inkey = FALSE; static TBOOLEAN inquote = FALSE; static int inref = 0; static int klink = 0; /* link number counter */ static char location[PATH_MAX+1] = {0}; struct LIST *klist; int i, j, k, l; line_count++; i = 0; j = 0; while (line[i] != NUL) { switch (line[i]) { case '<': line2[j++] = '&'; line2[j++] = 'l'; line2[j++] = 't'; line2[j] = ';'; break; case '>': line2[j++] = '&'; line2[j++] = 'g'; line2[j++] = 't'; line2[j] = ';'; break; case '&': line2[j++] = '&'; line2[j++] = 'a'; line2[j++] = 'm'; line2[j++] = 'p'; line2[j] = ';'; break; case '\r': case '\n': break; case '`': /* backquotes mean boldface or link */ if (line[1] == ' ') /* tabular line */ line2[j] = line[i]; else if ((!inref) && (!inquote)) { char topic[MAX_LINE_LEN+1]; k = i + 1; /* index into current string */ l = 0; /* index into topic string */ while ((line[k] != '`') && (line[k] != NUL)) topic[l++] = line[k++]; topic[l] = NUL; klist = lookup(topic); if (klist && (k = klist->line) > 0 && (k != last_line)) { char hyplink1[MAX_LINE_LEN+1]; #if 0 /* K-link: index lookup via ActiveX and JavaScript. */ /* Deactivated, as none of the open source viewers seem to support this */ char id[15]; sprintf(id, "link%i", ++klink); sprintf(hyplink1, "\n" " \n" " \n" " \n" "\n" "", id, topic, id); if (debug) fprintf(stderr, "hyper link \"%s\" - %s on line %d\n", topic, id, line_count); #else /* explicit links */ if ((klist->line) > 1) sprintf(hyplink1, "", klist->line); else sprintf(hyplink1, "", basename); if (debug) fprintf(stderr, "hyper link \"%s\" - loc%d.html on line %d\n", topic, klist->line, line_count); #endif strcpy(line2 + j, hyplink1); j += strlen(hyplink1) - 1; inref = k; } else { if (debug) fprintf(stderr, "Can't make link for \042%s\042 on line %d\n", topic, line_count); line2[j++] = '<'; line2[j++] = 'b'; line2[j] = '>'; inquote = TRUE; } } else { if (inquote && inref) fprintf(stderr, "Warning: Reference Quote conflict line %d\n", line_count); if (inquote) { line2[j++] = '<'; line2[j++] = '/'; line2[j++] = 'b'; line2[j] = '>'; inquote = FALSE; } if (inref) { /* must be inref */ line2[j++] = '<'; line2[j++] = '/'; line2[j++] = 'a'; line2[j] = '>'; inref = 0; } } break; default: line2[j] = line[i]; } i++; j++; line2[j] = NUL; } i = 1; if (inkey && !(line[0] == '?' || line[0] == '=')) { /* close keyword object */ fprintf(b, "\n"); inkey = FALSE; } switch (line[0]) { /* control character */ case '=': /* latex index entry */ break; case '?': /* interactive help entry */ if ((line2[1] != NUL) && (line2[1] != ' ')) { #ifndef CREATE_INDEX if (!inkey) { /* open keyword object */ fprintf(b, "\n"); inkey = TRUE; } /* add keyword */ fprintf(b, " \n", &line2[1]); #else fprintf(d, "
  • \n"); fprintf(d, " \n", &line2[1]); fprintf(d, " \n", location); fprintf(d, " \n"); /* NB: don't set inkey here */ #endif if (debug) fprintf(stderr,"keyword defintion: \"%s\" on line %d.\n", line2 + 1, line_count); } break; case '@':{ /* start/end table */ skiptable = !skiptable; if (!skiptable) forcetable = FALSE; break; } case '^':{ /* html link escape */ if ((!inhlink) && (line[3] == 'a') && (line[5] == 'h')) { char *str; inhlink = TRUE; /* remove trailing newline etc */ str = line + strlen(line) - 1; while (*str=='\r' || *str=='\n') *str-- = NUL; fprintf(b, "%s", line + 2); } else if (inhlink) { inhlink = FALSE; fputs(line + 2, b); /* copy directly */ } else { if (line[2] == '!') { /* hack for function sections */ const char magic[] = ""; if (strncmp(line+1, magic, strlen(magic)) == 0) forcetable = TRUE; } inhlink = FALSE; fputs(line + 1, b); /* copy directly */ } break; /* ignore */ } case 'F': /* latex embedded figure */ if (para) fprintf(b, "

    \n"); fprintf(b, "\"%s\"\n", line2+1, line2+1); if (para) fprintf(b, "

    \n"); break; case '#':{ /* latex table entry */ break; /* ignore */ } case '%':{ /* troff table entry */ break; /* ignore */ } case '\n': /* empty text line */ if (tabl) fprintf(b, "\n"); if (para) fprintf(b, "

    \n"); para = FALSE; tabl = FALSE; break; case ' ':{ /* normal text line */ if (skiptable && !forcetable) break; /* break */ if ((line2[1] == NUL) || (line2[1] == '\n')) { fprintf(b, "\n"); if (para) fprintf(b, "

    \n"); para = FALSE; tabl = FALSE; } else if (line2[1] == ' ') { /* in table */ if (inhlink) { int numspaces = 0; while (line2[numspaces+1] == ' ') numspaces++; fprintf(b, "%s", line2+1+numspaces); } else { if (!tabl) { if (para) fprintf(b, "

    \n"); fprintf(b, "
    \n");
    		    }
    		    fprintf(b, "%s\n", &line2[1]);
    		    para = FALSE;
    		    tabl = TRUE;
                    }
    	    } else {
                    if (inhlink) {
                        /* no newline here! */
                        fprintf(b, "%s", &line2[1]);
                    } else {
                        if (tabl) {
            	        fprintf(b, "
    \n"); tabl = 0; } if (!para) { para = TRUE; /* not in para so start one */ tabl = FALSE; fprintf(b, "

    "); } fprintf(b, "%s\n", &line2[1]); } } break; } default:{ if (isdigit((int)line[0])) { /* start of section */ int newlevel = line[0]-'0'; char spacer[10]; if (startpage) { } else { if (tabl) fprintf(b, "\n"); if (para) fprintf(b, "

    \n"); } para = FALSE; /* not in a paragraph */ tabl = FALSE; if (!startpage) /* add list of subtopics */ refs(last_line, b, "

    Subtopics

    \n\n", "\n", "\t
  • %s
  • \n"); last_line = line_count; fprintf(b, "\n"); /* output unique ID */ if (!startpage) sprintf(location, "loc%d", line_count); else strcpy(location, basename); #ifndef SPLIT_FILES /* let hhc auomatically split contents */ if (!startpage) { fprintf(b, "\n"); fprintf(b, "\n", location); fprintf(b, "\n", &line2[2]); fprintf(b, "\n"); fprintf(b, "

    %s

    \n", &line2[2]); } #else /* split contents manually */ if (!startpage) { char newfile[PATH_MAX]; /* close current file */ footer(b); fclose(b); /* open new file */ sprintf(newfile, "%s%s.html", path, location); /* fprintf(stderr, "%s\n", newfile); */ if (!(b = fopen(newfile, "w"))) { fprintf(stderr, "%s: Can't open %s for writing\n", "doc2html", newfile); exit(EXIT_FAILURE); } header(b, &line2[2]); fprintf(b, "

    %s

    \n", &line2[2]); } #endif /* create toc entry */ if (newlevel > level) { level = newlevel; memset(spacer, '\t', level); spacer[level] = NUL; fprintf(c, "%s
      \n", spacer); } else if (newlevel < level) { for ( ; newlevel < level; level--) { memset(spacer, '\t', level); spacer[level] = NUL; fprintf(c, "%s
    \n", spacer); } } level = newlevel; memset(spacer, '\t', level); spacer[level] = NUL; fprintf(c, "%s
  • \n", spacer); fprintf(c, "%s \n", spacer, &line2[2]); fprintf(c, "%s \n", spacer, location); fprintf(c, "%s \n", spacer); if (debug) fprintf(stderr, "Section \"%s\", Level %i, ID=%s on line %d\n", line2 + 2, level, location, line_count); startpage = FALSE; } else fprintf(stderr, "unknown control code '%c' in column 1, line %d\n", line[0], line_count); break; } } } gnuplot-4.6.4/docs/windows/wgnuplot.hhk0000644000471100001440000000030211530504252015116 0ustar
    gnuplot-4.6.4/docs/windows/wgnuplot.hhp0000644000471100001440000000104411530504252015127 0ustar [OPTIONS] Auto Index=Yes Compatibility=1.1 or later Compiled file=wgnuplot.chm Contents file=wgnuplot.hhc Default Window=main Default topic=wgnuplot.html Display compile progress=No Error log file=wgnuplot.log Flat=Yes Full text search stop list file=..\..\docs\win\wgnuplot.stp Full-text search=Yes Index file=wgnuplot.hhk Language=0x409 Englisch (USA) Title=gnuplot help [WINDOWS] main="gnuplot help","wgnuplot.hhc","wgnuplot.hhk","wgnuplot.html","wgnuplot.html",,,,,0x63520,,0x10384e,[0,0,680,550],,,,,,,0 [FILES] wgnuplot.html [INFOTYPES] gnuplot-4.6.4/docs/titlepag.ms0000644000471100001440000000203410071357542013236 0ustar .nr HM 3.2i .TL GNUPLOT .br An Interactive Plotting Program .sp .AU Thomas Williams & Colin Kelley .br Version 4.1 organized by: Hans-Bernhard Broeker .br Major contributors (alphabetic order): .br Hans-Bernhard Broeker .br John Campbell .br Robert Cunningham .br David Denholm .br Gershon Elber .br Roger Fearick .br Carsten Grammes .br Lucas Hart .br Lars Hecking .br Thomas Koenig .br David Kotz .br Ed Kubaitis .br Russell Lang .br Alexander Lehmann .br Alexander Mai .br Ethan Merritt .br Petr Mikulik .br Carsten Steger .br Tom Tkacik .br Jos Van der Woude .br Alex Woo .br James R. Van Zandt .br Johannes Zellner .br Copyright (C) 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley .AI Mailing list for comments: gnuplot-info@lists.sourceforge.net .br Mailing list for bug reports: gnuplot-bugs@lists.sourceforge.net \*(DY .br This manual was prepared by Dick Crawford. 3 December 1998 .AB no .AE .LP .nr HM 1.2i .ds CH .ds LH GNUPLOT 4.1 .ds RH % .\".nr PS 12 .\".nr VS 13 gnuplot-4.6.4/docs/gnuplot.doc0000644000471100001440000213366712216122375013263 0ustar C RCS $Id: gnuplot.doc,v 1.701.2.30 2013/09/17 18:52:45 sfeam Exp $ C C Copyright (C) 1986 - 1993, 1998, 1999, 2000, 2001, 2004 Thomas Williams, Colin Kelley et al. C 1 gnuplot ?gnuplot ^

    An Interactive Plotting Program

    ^

    Thomas Williams & Colin Kelley

    ^

    Version 4.6 organized by Ethan A Merritt and others

    ^

    Major contributors (alphabetic order):
    ^
    ^ Hans-Bernhard Broeker, John Campbell,
    ^ Robert Cunningham, David Denholm,
    ^ Gershon Elber, Roger Fearick,
    ^ Carsten Grammes, Lucas Hart,
    ^ Lars Hecking, Péter Juhász,
    ^ Thomas Koenig, David Kotz,
    ^ Ed Kubaitis, Russell Lang,
    ^ Timothée Lecomte, Alexander Lehmann,
    ^ Alexander Mai, Bastian Märkisch,
    ^ Ethan A Merritt, Petr Mikulík,
    ^ Carsten Steger, Shigeharu Takeno,
    ^ Tom Tkacik, Jos Van der Woude,
    ^ James R. Van Zandt, Alex Woo, Johannes Zellner
    ^

    ^

    Copyright (C) 1986 - 1993, 1998 - 2004 Thomas Williams, Colin Kelley
    ^ Copyright (C) 2004 - 2011 various authors

    ^

    Mailing list for comments: gnuplot-info@lists.sourceforge.net
    ^ Mailing list for bug reports: gnuplot-bugs@lists.sourceforge.net
    ^ Web access (preferred): http://sourceforge.net/projects/gnuplot

    ^

    This manual was originally prepared by Dick Crawford

    2 Copyright ?copyright ?license Copyright (C) 1986 - 1993, 1998, 2004, 2007 Thomas Williams, Colin Kelley Permission to use, copy, and distribute this software and its documentation for any purpose with or without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Permission to modify the software is granted, but not the right to distribute the complete modified source code. Modifications are to be distributed as patches to the released version. Permission to distribute binaries produced by compiling modified sources is granted, provided you 1. distribute the corresponding source modifications from the released version in the form of a patch file along with the binaries, 2. add special version identification to distinguish your version in addition to the base release version number, 3. provide your name and address as the primary contact for the support of your modified version, and 4. retain our contact information in regard to use of the base software. Permission to distribute the released version of the source code along with corresponding source modifications in the form of a patch file is granted with same provisions 2 through 4 for binary distributions. This software is provided "as is" without express or implied warranty to the extent permitted by applicable law. AUTHORS Original Software: Thomas Williams, Colin Kelley. Gnuplot 2.0 additions: Russell Lang, Dave Kotz, John Campbell. Gnuplot 3.0 additions: Gershon Elber and many others. Gnuplot 4.0 additions: See list of contributors at head of this document. 2 Introduction ?introduction ? `Gnuplot` is a portable command-line driven graphing utility for Linux, OS/2, MS Windows, OSX, VMS, and many other platforms. The source code is copyrighted but freely distributed (i.e., you don't have to pay for it). It was originally created to allow scientists and students to visualize mathematical functions and data interactively, but has grown to support many non-interactive uses such as web scripting. It is also used as a plotting engine by third-party applications like Octave. Gnuplot has been supported and under active development since 1986. Gnuplot supports many types of plots in either 2D and 3D. It can draw using lines, points, boxes, contours, vector fields, surfaces, and various associated text. It also supports various specialized plot types. Gnuplot supports many different types of output: interactive screen terminals (with mouse and hotkey input), direct output to pen plotters or modern printers, and output to many file formats (eps, emf, fig, jpeg, LaTeX, pdf, png, postscript, ...). Gnuplot is easily extensible to include new output modes. Recent additions include interactive terminals based on wxWidgets (usable on multiple platforms), and Qt. Mouseable plots embedded in web pages can be generated using the svg or HTML5 canvas terminal drivers. The command language of `gnuplot` is case sensitive, i.e. commands and function names written in lowercase are not the same as those written in capitals. All command names may be abbreviated as long as the abbreviation is not ambiguous. Any number of commands may appear on a line, separated by semicolons (;). Strings may be set off by either single or double quotes, although there are some subtle differences. See `syntax` and `quotes` for more details. Examples: load "filename" cd 'dir' Commands may extend over several input lines by ending each line but the last with a backslash (\). The backslash must be the _last_ character on each line. The effect is as if the backslash and newline were not there. That is, no white space is implied, nor is a comment terminated. Therefore, commenting out a continued line comments out the entire command (see `comments`). But note that if an error occurs somewhere on a multi-line command, the parser may not be able to locate precisely where the error is and in that case will not necessarily point to the correct line. In this document, curly braces ({}) denote optional arguments and a vertical bar (|) separates mutually exclusive choices. `Gnuplot` keywords or `help` topics are indicated by backquotes or `boldface` (where available). Angle brackets (<>) are used to mark replaceable tokens. In many cases, a default value of the token will be taken for optional arguments if the token is omitted, but these cases are not always denoted with braces around the angle brackets. For built-in help on any topic, type `help` followed by the name of the topic or `help ?` to get a menu of available topics. The new `gnuplot` user should begin by reading about `plotting` (if in an interactive session, type `help plotting`). See the simple.dem demo, also available together with other demos on the web page ^ http://www.gnuplot.info/demo/ ^ `Gnuplot` can be started from a command line or from an icon according to the desktop environment. Running it from command line can take the syntax gnuplot {OPTIONS} file1 file2 ... where file1, file2, etc. are input file as in the `load` command. On X11-based systems, you can use gnuplot {X11OPTIONS} {OPTIONS} file1 file2 ... see your X11 documentation and `x11` in this document. Options interpreted by gnuplot may come anywhere on the line. Files are executed in the order specified, as are commands supplied by the -e option, for example gnuplot file1.in -e "reset" file2.in The special filename "-" is used to force reading from stdin. `Gnuplot` exits after the last file is processed. If no load files are named, `Gnuplot` takes interactive input from stdin. See help `batch/interactive` for more details. The options specific to gnuplot can be listed by typing gnuplot --help See `command line options` for more details. In sessions with an interactive plot window you can hit 'h' anywhere on the plot for help about `hotkeys` and `mousing` features. Section `seeking-assistance` will help you to find further information, help and FAQ. 2 Seeking-assistance ?help-desk ?seeking-assistance ?faq ?FAQ The canonical gnuplot web page can be found at ^ http://www.gnuplot.info ^ Before seeking help, please check file FAQ.pdf or the above website for ^ FAQ (Frequently Asked Questions) list. ^ If you need help as a gnuplot user, please use the newsgroup comp.graphics.apps.gnuplot We prefer that you read the messages through the newsgroup rather than subscribing to the mailing list which is also available and carries the same set of messages. Instructions for subscribing to gnuplot mailing lists may be found via the gnuplot development website on SourceForge ^ http://sourceforge.net/projects/gnuplot ^ The address for mailing to list members is: gnuplot-info@lists.sourceforge.net Bug reports and code contributions should be uploaded to the trackers at http://sourceforge.net/projects/gnuplot/support Please check previous bug reports if the bug you want to report has not been already fixed in a newer version of gnuplot. A mailing list for those interested in development version of gnuplot is: gnuplot-beta@lists.sourceforge.net When posting a question, please include full details of the gnuplot version, the terminal type, and the operating system you are using. A _small_ script demonstrating the problem may be useful. Function plots are preferable to datafile plots. 2 New features ?new-features This section lists major additions since version 4.4. For a more exhaustive list, see the NEWS file. 3 New syntax Ffigure_newsyntax This version of gnuplot introduces command iteration and block-structured if/else/while/do constructs. See `if`, `while`, and `do`. Simple iteration is possible inside `plot` or `set` commands. See `iteration`. General iteration spanning multiple commands is possible using a block construct as shown below. For a related new feature, see the `summation` expression type. Here is an example using several of these new syntax features: set multiplot layout 2,2 fourier(k, x) = sin(3./2*k)/k * 2./3*cos(k*x) do for [power = 0:3] { TERMS = 10**power set title sprintf("%g term Fourier series",TERMS) plot 0.5 + sum [k=1:TERMS] fourier(k,x) notitle } unset multiplot It is now possible to select a column of data from a data file by matching a label in the first row of the file. See `columnhead`. For example plot for [crop in "Oats Peas Beans"] 'data' using "Year":crop 3 Local customization of linetypes You can now customize properties (color, linewidth, point type) of the default sequence of linetypes used in plotting. See `set linetype`. This is normally done in an initialization file, either the system-wide file `gnuplotrc` or a private file `~/.gnuplot`. See `initialization`. Most terminals now allow you to set an explicit background color for the plot. The special linetype `bgnd` can be used to draw in this color. See `bgnd`. 3 New plot styles See documentation for plot styles `boxplot`, `circles`, `ellipses`, and `fillsteps`. 3 Revised polar axes Polar plot mode has been reworked to support additional plot styles. The polar axes can now be drawn and labeled independent of the x and y axes. See `set polar` and `set rrange`. 3 New smoothing algorithms =kdensity =cumulative New smoothing algorithms have been added for both 2- and 3-dimensional plots. `smooth kdensity` and `smooth cumulative` can be used with `plot` to draw smooth histograms and cumulative distribution functions. Several new smoothing kernels have been added to `dgrid3d` for use with `splot`. See `smooth` `dgrid3d`. 3 New time/date handling =time Gnuplot now tracks time to millisecond precision. Time formats have been modified to match this. The new built-in function time() returns the current time of day according to the system clock. Example: print the current time to msec precision print strftime("%H:%M:%.3S %d-%b-%Y",time(0.0)) 18:15:04.253 16-Apr-2011 3 Statistical summary of data The new `stats` command reads data from a file using the same syntax as the `plot` or `splot` commands. Rather than drawing a graph, it prints out a statistical summary of the data contained in the column[s] requested. The resulting statistics min, max, mean, standard deviation, correlation, etc. are also stored in named variables that can be used to compose or modify subsequent plotting commands. See `stats`. 3 New or revised terminal drivers The `qt` driver implements an interactive terminal on top of the Qt graphics layer. It can function either as a window in a full-featured desktop enviroment or as a full-screen application on a Qt-based embedded device. The `qt` terminal is new and may still have some rough edges. Two terminal types support web-based interactive display. The HTML5 `canvas` terminal was introduced in version 4.4. The `svg` terminal has been extensively revised to include support for mousing and better incorporation of svg plots from gnuplot into larger svg/xml documents. The `canvas` terminal driver produces javascript output that draws onto the HTML canvas element of a web page. It can produce either a complete web page containing a single plot, or a script that can be embedded as part of an externally generated HTML document that perhaps contains multiple plots. The embedded plots support browser-side mousing, including zoom/unzoom. The `lua` terminal driver creates data intended to be further processed by a script in the lua programming language. At this point only one such lua script, gnuplot-tikz.lua, is available. It produces a TeX document suitable for use with the latex TikZ package. Other lua scripts could be written to process the gnuplot output for use with other TeX packages, or with other non-TeX tools. `set term tikz` is shorthand for `set term lua tikz`. As decribed above, it uses the generic lua terminal and an external lua script to produce a latex document. The `context` terminal driver creates output to be further processed by the ConTeXt TeX macro package. To process its output, you additionally require the gnuplot module for ConTeXt available at ^ http://ctan.org/pkg/context-gnuplot ^ The `epscairo` terminal uses the cairo and pango libraries to create encapsulated postscript (eps) ouput. It is an alternative to the `postscript` terminal driver for those who would like to have their eps files look equal to e.g. screen output by the `wxt` terminal. The `cairolatex` terminal uses the cairo backend of the `pdfcairo` or `epscairo` terminal to produce graphs for inclusion in LaTeX documents. It creates pdf or eps graphics but transfers texts to LaTeX in the same way as the `epslatex` terminal. The `windows` terminal driver has been revised to suport transparency, antialiasing, buffered output, multiple graph windows and copying to clipboard and saving of graphs as emf files. It has many new options and a revised user interface. Additionaly, the code of the text console has been largely rewritten to support wrapping of long lines. Help is now provided via HTML. 2 Backwards compatibility ?backwards compatibility ?compatibility Gnuplot version 4.0 deprecated certain syntax used in earlier versions, but continued to recognize it. This is now under the control of a configuration option, and can be enabled as follows: ./configure --enable-backwards-compatibility Notice: Deprecated syntax items may be removed entirely in some future version of gnuplot. One major difference is the introduction of keywords to disambiguate complex commands, particularly commands containing string variables. A notable issue was the use of bare numbers to specify offsets, line and point types. Illustrative examples: Deprecated: set title "Old" 0,-1 set data linespoints plot 1 2 4 # horizontal line at y=1 New: TITLE = "New" set title TITLE offset char 0, char -1 set style data linespoints plot 1 linetype 2 pointtype 4 2 Batch/Interactive Operation ?batch/interactive ?command line options `Gnuplot` may be executed in either batch or interactive modes, and the two may even be mixed together on many systems. Any command-line arguments are assumed to be either program options (first character is -) or names of files containing `gnuplot` commands. The option -e "command" may be used to force execution of a gnuplot command. Each file or command string will be executed in the order specified. The special filename "-" is indicates that commands are to be read from stdin. `Gnuplot` exits after the last file is processed. If no load files and no command strings are specified, `gnuplot` accepts interactive input from stdin. Both the `exit` and `quit` commands terminate the current command file and `load` the next one, until all have been processed. Examples: To launch an interactive session: gnuplot To launch a batch session using two command files "input1" and "input2": gnuplot input1 input2 To launch an interactive session after an initialization file "header" and followed by another command file "trailer": gnuplot header - trailer To give `gnuplot` commands directly in the command line, using the "-persist" option so that the plot remains on the screen afterwards: gnuplot -persist -e "set title 'Sine curve'; plot sin(x)" To set user-defined variables a and s prior to executing commands from a file: gnuplot -e "a=2; s='file.png'" input.gpl 2 Canvas size ?canvas size ?canvas ?set term size In earlier versions of gnuplot, some terminal types used the values from `set size` to control also the size of the output canvas; others did not. The use of 'set size' for this purpose was deprecated in version 4.2. Since version 4.4 almost all terminals now behave as follows: `set term size , ` controls the size of the output file, or "canvas". Please see individual terminal documentation for allowed values of the size parameters. By default, the plot will fill this canvas. `set size , ` scales the plot itself relative to the size of the canvas. Scale values less than 1 will cause the plot to not fill the entire canvas. Scale values larger than 1 will cause only a portion of the plot to fit on the canvas. Please be aware that setting scale values larger than 1 may cause problems on some terminal types. The major exception to this convention is the PostScript driver, which by default continues to act as it has in earlier versions. Be warned that the next version of gnuplot may change the default behaviour of the PostScript driver as well. Example: set size 0.5, 0.5 set term png size 600, 400 set output "figure.png" plot "data" with lines These commands will produce an output file "figure.png" that is 600 pixels wide and 400 pixels tall. The plot will fill the lower left quarter of this canvas. This is consistent with the way multiplot mode has always worked. 2 Command-line-editing ?line-editing ?editing ?command-line-editing Command-line editing and command history are supported using either an external gnu readline library, an external BSD libedit library, or a built-in equivalent. This choice is a configuration option at the time gnuplot is built. The editing commands of the built-in version are given below. Please note that the action of the DEL key is system-dependent. The gnu readline and BSD libedit libraries have their own documentation. @start table - first is interactive cleartext form `Line-editing`: ^B moves back a single character. ^F moves forward a single character. ^A moves to the beginning of the line. ^E moves to the end of the line. ^H deletes the previous character. DEL deletes the current character. ^D deletes current character, sends EOF if the line is empty. ^K deletes from current position to the end of line. ^L,^R redraws line in case it gets trashed. ^U deletes the entire line. ^W deletes previous word. `History`: ^P moves back through history. ^N moves forward through history. #\begin{tabular}{|cl|} \hline #\multicolumn{2}{|c|}{Command-line Editing Commands} \\ \hline \hline #Character & Function \\ \hline # & \multicolumn{1}{|c|}{Line Editing}\\ \cline{2-2} #\verb~^B~ & move back a single character.\\ #\verb~^F~ & move forward a single character.\\ #\verb~^A~ & move to the beginning of the line.\\ #\verb~^E~ & move to the end of the line.\\ #\verb~^H~ & delete the previous character.\\ #\verb~DEL~ & delete the current character.\\ #\verb~^D~ & delete current character. EOF if line is empty.\\ #\verb~^K~ & delete from current position to the end of line.\\ #\verb~^L, ^R~ & redraw line in case it gets trashed.\\ #\verb~^U~ & delete the entire line. \\ #\verb~^W~ & delete previous word. \\ \hline # & \multicolumn{1}{|c|}{History} \\ \cline{2-2} #\verb~^P~ & move back through history.\\ #\verb~^N~ & move forward through history.\\ %c l . %Character@Function %_ %@Line Editing %^B@move back a single character. %^F@move forward a single character. %^A@move to the beginning of the line. %^E@move to the end of the line. %^H@delete the previous character. %DEL@delete the current character. %^D@delete current character. EOF if line is empty. %^K@delete from current position to the end of line. %^L, ^R@redraw line in case it gets trashed. %^U@delete the entire line. %^W@delete previous word. %_ %@History %^P@move back through history. %^N@move forward through history. @end table ^ ^^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
    Character Function
    Line Editing
    ^B move back a single character.
    ^F move forward a single character.
    ^A move to the beginning of the line.
    ^E move to the end of the line.
    ^H delete the previous character.
    DEL delete the current character.
    ^D delete current character. EOF if line is empty
    ^K delete from current position to the end of line.
    ^L, ^R redraw line in case it gets trashed.
    ^U delete the entire line.
    ^W delete previous word.
    History
    ^P move back through history.
    ^N move forward through history.
    2 Comments ?comments Comments are supported as follows: a `#` may appear in most places in a line and `gnuplot` will ignore the rest of the line. It will not have this effect inside quotes, inside numbers (including complex numbers), inside command substitutions, etc. In short, it works anywhere it makes sense to work. See also `set datafile commentschars` for specifying comment characters in data files. Note that if a comment line ends in '\' then the subsequent line is also treated as a comment. 2 Coordinates ?coordinates =axes The commands `set arrow`, `set key`, `set label` and `set object` allow you to draw something at an arbitrary position on the graph. This position is specified by the syntax: {} , {} {,{} } Each can either be `first`, `second`, `graph`, `screen`, or `character`. `first` places the x, y, or z coordinate in the system defined by the left and bottom axes; `second` places it in the system defined by the second axes (top and right); `graph` specifies the area within the axes---0,0 is bottom left and 1,1 is top right (for splot, 0,0,0 is bottom left of plotting area; use negative z to get to the base---see `set xyplane`); `screen` specifies the screen area (the entire area---not just the portion selected by `set size`), with 0,0 at bottom left and 1,1 at top right; and `character` gives the position in character widths and heights from the bottom left of the screen area (screen 0,0), `character` coordinates depend on the chosen font size. If the coordinate system for x is not specified, `first` is used. If the system for y is not specified, the one used for x is adopted. In some cases, the given coordinate is not an absolute position but a relative value (e.g., the second position in `set arrow` ... `rto`). In most cases, the given value serves as difference to the first position. If the given coordinate resides in a logarithmic axis the value is interpreted as factor. For example, set logscale x set arrow 100,5 rto 10,2 plots an arrow from position 100,5 to position 1000,7 since the x axis is logarithmic while the y axis is linear. If one (or more) axis is timeseries, the appropriate coordinate should be given as a quoted time string according to the `timefmt` format string. See `set xdata` and `set timefmt`. `Gnuplot` will also accept an integer expression, which will be interpreted as seconds from 1 January 2000. 2 Datastrings ?datastrings Data files may contain string data consisting of either an arbitrary string of printable characters containing no whitespace or an arbitrary string of characters, possibly including whitespace, delimited by double quotes. The following sample line from a datafile is interpreted to contain four columns, with a text field in column 3: 1.000 2.000 "Third column is all of this text" 4.00 Text fields can be positioned within a 2-D or 3-D plot using the commands: plot 'datafile' using 1:2:4 with labels splot 'datafile' using 1:2:3:4 with labels A column of text data can also be used to label the ticmarks along one or more of the plot axes. The example below plots a line through a series of points with (X,Y) coordinates taken from columns 3 and 4 of the input datafile. However, rather than generating regularly spaced tics along the x axis labeled numerically, gnuplot will position a tic mark along the x axis at the X coordinate of each point and label the tic mark with text taken from column 1 of the input datafile. set xtics plot 'datafile' using 3:4:xticlabels(1) with linespoints =columnheader There is also an option that will interpret the first entry in a column of input data (i.e. the column heading) as a text field, and use it as the key title for data plotted from that column. The example given below will use the first entry in column 2 to generate a title in the key box, while processing the remainder of columns 2 and 4 to draw the required line: plot 'datafile' using 1:(f($2)/$4) with lines title columnhead(2) Another example: plot for [i=2:6] 'datafile' using i title "Results for ".columnhead(i) See `set style labels`, `using xticlabels`, `plot title`, `using`. 2 Enhanced text mode ?enhanced text ?enhanced Many terminal types support an enhanced text mode in which additional formatting information is embedded in the text string. For example, "x^2" will write x-squared as we are used to seeing it, with a superscript 2. This mode is normally selected when you set the terminal, e.g. "set term png enhanced", but may also be toggled afterward using "set termoption enhanced", or by marking individual strings as in "set label 'x_2' noenhanced". @start table - first is interactive cleartext form Control Examples Explanation ^ a^x superscript _ a_x subscript @ @x or a@^b_{cd} phantom box (occupies no width) & &{space} inserts space of specified length ~ ~a{.8-} overprints '-' on 'a', raised by .8 times the current fontsize #\begin{tabular}{|cccl|} \hline #\multicolumn{4}{|c|}{Enhanced Text Control Codes} \\ \hline #Control & Example & Result & Explanation \\ \hline #\verb~^~ & \verb~a^x~ & $a^x$ & superscript\\ #\verb~_~ & \verb~a_x~ & $a_x$ & subscript\\ #\verb~@~ & \verb~a@^b_{cd}~ & $a^b_{cd}$ &phantom box (occupies no width)\\ #\verb~&~ & \verb~d&{space}b~ & d\verb*+ +b & inserts space of specified length\\ #\verb|~| & \verb|~a{.8-}| & $\tilde{a}$ & overprints '-' on 'a', raised by .8\\ #\verb~ ~ & \verb~ ~ & ~ ~ & times the current fontsize\\ %c c l . %.TE", /* ugly - doc2ms uses @ for column separator, but here we */ %.TS", /* need @ in table, so end and restart the table ! */ %center box tab ($) ; %c c l . %Control$Examples$Explanation %_ %^$a^x$superscript %\&_$a\&_x$subscript % @ $ @x or a\&@^b\&_{cd}$phantom box (occupies no width) % & $ &{space}$inserts space of specified length % ~ $ ~a{.8-}$overprints '-' on 'a', raised by .8 % $ $times the current fontsize @end table ^ ^^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
    Control Examples Explanation
    ^ a^x superscript
    _ a_x subscript
    @ @x or a@^b_{cd} phantom box (occupies no width)
    & &{space} inserts space of specified length
    ~ ~a{.8-} overprints '-' on 'a', raised by .8
    times the current fontsize
    Braces can be used to place multiple-character text where a single character is expected (e.g., 2^{10}). To change the font and/or size, use the full form: {/[fontname][=fontsize | *fontscale] text}. Thus {/Symbol=20 G} is a 20 pt GAMMA and {/*0.75 K} is a K at three-quarters of whatever fontsize is currently in effect. (The '/' character MUST be the first character after the '{'.) The phantom box is useful for a@^b_c to align superscripts and subscripts but does not work well for overwriting an accent on a letter. For the latter, it is much better to use an encoding (e.g. iso_8859_1 or utf8) that contains a large variety of letters with accents or other diacritical marks. See `set encoding`. Since the box is non-spacing, it is sensible to put the shorter of the subscript or superscript in the box (that is, after the @). Space equal in length to a string can be inserted using the '&' character. Thus 'abc&{def}ghi' would produce 'abc ghi'. The '~' character causes the next character or bracketed text to be overprinted by the following character or bracketed text. The second text will be horizontally centered on the first. Thus '~a/' will result in an 'a' with a slash through it. You can also shift the second text vertically by preceding the second text with a number, which will define the fraction of the current fontsize by which the text will be raised or lowered. In this case the number and text must be enclosed in brackets because more than one character is necessary. If the overprinted text begins with a number, put a space between the vertical offset and the text ('~{abc}{.5 000}'); otherwise no space is needed ('~{abc}{.5---}'). You can change the font for one or both strings ('~a{.5 /*.2 o}'---an 'a' with a one-fifth-size 'o' on top---and the space between the number and the slash is necessary), but you can't change it after the beginning of the string. Neither can you use any other special syntax within either string. You can, of course, use control characters by escaping them (see below), such as '~a{\^}' You can access special symbols numerically by specifying \character-code (in octal), e.g., {/Symbol \245} is the symbol for infinity. This does not work for multibyte encodings like UTF-8, however. In a UTF-8 environment, you should be able to enter multibyte sequences implicitly by typing or otherwise selecting the character you want. You can escape control characters using \, e.g., \\, \{, and so on. But be aware that strings in double-quotes are parsed differently than those enclosed in single-quotes. The major difference is that backslashes may need to be doubled when in double-quoted strings. Examples (these are hard to describe in words---try them!): set xlabel 'Time (10^6 {/Symbol m}s)' set title '{/Symbol=18 \\362@_{/=9.6 0}^{/=12 x}} \\ {/Helvetica e^{-{/Symbol m}^2/2} d}{/Symbol m}' The file "ps_guide.ps" in the /docs/psdoc subdirectory of the gnuplot source distribution contains more examples of the enhanced syntax. 2 Environment ?environment A number of shell environment variables are understood by `gnuplot`. None of these are required, but may be useful. If GNUTERM is defined, it is used as the name of the terminal type to be used. This overrides any terminal type sensed by `gnuplot` on start-up, but is itself overridden by the .gnuplot (or equivalent) start-up file (see `startup`) and, of course, by later explicit changes. GNUHELP may be defined to be the pathname of the HELP file (gnuplot.gih). On VMS, the logical name GNUPLOT$HELP should be defined as the name of the help library for `gnuplot`. The `gnuplot` help can be put inside any system help library, allowing access to help from both within and outside `gnuplot` if desired. On Unix, HOME is used as the name of a directory to search for a .gnuplot file if none is found in the current directory. On MS-DOS, Windows and OS/2, GNUPLOT is used. On Windows, the NT-specific variable USERPROFILE is also tried. VMS, SYS$LOGIN: is used. Type `help startup`. On Unix, PAGER is used as an output filter for help messages. On Unix, SHELL is used for the `shell` command. On MS-DOS and OS/2, COMSPEC is used for the `shell` command. FIT_SCRIPT may be used to specify a `gnuplot` command to be executed when a fit is interrupted---see `fit`. FIT_LOG specifies the default filename of the logfile maintained by fit. GNUPLOT_LIB may be used to define additional search directories for data and command files. The variable may contain a single directory name, or a list of directories separated by a platform-specific path separator, eg. ':' on Unix, or ';' on DOS/Windows/OS/2 platforms. The contents of GNUPLOT_LIB are appended to the `loadpath` variable, but not saved with the `save` and `save set` commands. Several gnuplot terminal drivers access TrueType fonts via the gd library. For these drivers the font search path is controlled by the environmental variable GDFONTPATH. Furthermore, a default font for these drivers may be set via the environmental variable GNUPLOT_DEFAULT_GDFONT. The postscript terminal uses its own font search path. It is controlled by the environmental variable GNUPLOT_FONTPATH. The format is the same as for GNUPLOT_LIB. The contents of GNUPLOT_FONTPATH are appended to the `fontpath` variable, but not saved with the `save` and `save set` commands. GNUPLOT_PS_DIR is used by the postscript driver to search for external prologue files. Depending on the build process, gnuplot contains either a built-in copy of those files or a default hardcoded path. You can use this variable have the postscript terminal use custom prologue files rather than the default files. See `postscript prologue`. 2 Expressions ?expressions In general, any mathematical expression accepted by C, FORTRAN, Pascal, or BASIC is valid. The precedence of these operators is determined by the specifications of the C programming language. White space (spaces and tabs) is ignored inside expressions. Complex constants are expressed as {,}, where and must be numerical constants. For example, {3,2} represents 3 + 2i; {0,1} represents 'i' itself. The curly braces are explicitly required here. =division Note that gnuplot uses both "real" and "integer" arithmetic, like FORTRAN and C. Integers are entered as "1", "-10", etc; reals as "1.0", "-10.0", "1e1", 3.5e-1, etc. The most important difference between the two forms is in division: division of integers truncates: 5/2 = 2; division of reals does not: 5.0/2.0 = 2.5. In mixed expressions, integers are "promoted" to reals before evaluation: 5/2e0 = 2.5. The result of division of a negative integer by a positive one may vary among compilers. Try a test like "print -5/2" to determine if your system chooses -2 or -3 as the answer. The integer expression "1/0" may be used to generate an "undefined" flag, which causes a point to ignored. Or you can use the pre-defined variable NaN to achieve the same result. See `using` for an example. =NaN The real and imaginary parts of complex expressions are always real, whatever the form in which they are entered: in {3,2} the "3" and "2" are reals, not integers. Gnuplot can also perform simple operations on strings and string variables. For example, the expression ("A" . "B" eq "AB") evaluates as true, illustrating the string concatenation operator and the string equality operator. A string which contains a numerical value is promoted to the corresponding integer or real value if used in a numerical expression. Thus ("3" + "4" == 7) and (6.78 == "6.78") both evaluate to true. An integer, but not a real or complex value, is promoted to a string if used in string concatenation. A typical case is the use of integers to construct file names or other strings; e.g. ("file" . 4 eq "file4") is true. Substrings can be specified using a postfixed range descriptor [beg:end]. For example, "ABCDEF"[3:4] == "CD" and "ABCDEF"[4:*] == "DEF" The syntax "string"[beg:end] is exactly equivalent to calling the built-in string-valued function substr("string",beg,end), except that you cannot omit either beg or end from the function call. 3 Functions ?expressions functions The math functions in `gnuplot` are the same as the corresponding functions in the Unix math library, except that all functions accept integer, real, and complex arguments unless otherwise noted. Functions that accept or return angles (e.g. sin(x), cos(x), arg(z)) treat angle values as radians, but this may be changed to degrees using the command `set angles`. ^ ^^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
    Math library functions
    Function Arguments Returns
    abs(x) any |x|, absolute value of x; same type
    abs(x) complex length of x, √( Re(x)2 + Im(x)2 )
    acos(x) any cos-1 x (inverse cosine)
    acosh(x) any cosh-1 x (inverse hyperbolic cosine) in radians
    airy(x) any Airy function Ai(x)
    arg(x) complex the phase of x
    asin(x) any sin-1 x (inverse sin)
    asinh(x) any sinh-1 x (inverse hyperbolic sin) in radians
    atan(x) any tan-1 x (inverse tangent)
    atan2(y,x) int or real tan-1(y/x) (inverse tangent)
    atanh(x) any tanh-1 x (inverse hyperbolic tangent) in radians
    EllipticK(k) real k in (-1:1) K(k) complete elliptic integral of the first kind
    EllipticE(k) real k in [-1:1] E(k) complete elliptic integral of the second kind
    EllipticPi(n,k) real n<1, real k in (-1:1) Π(n,k) complete elliptic integral of the third kind
    besj0(x) int or real j0 Bessel function of x, in radians
    besj1(x) int or real j1 Bessel function of x, in radians
    besy0(x) int or real y0 Bessel function of x, in radians
    besy1(x) int or real y1 Bessel function of x, in radians
    ceil(x) any x⌉, smallest integer not less than x (real part)
    cos(x) radians cos x, cosine of x
    cosh(x) any cosh x, hyperbolic cosine of x in radians
    erf(x) any erf(Re(x)), error function of real(x)
    erfc(x) any erfc(Re(x)), 1.0 - error function of real(x)
    exp(x) any ex, exponential function of x
    expint(n,x) any En(x), exponential integral function of x
    floor(x) any x⌋, largest integer not greater than x (real part)
    gamma(x) any Γ(Re(x)), gamma function of real(x)
    ibeta(p,q,x) any ibeta(Re(p,q,x)), ibeta function of real(p,q,x)
    inverf(x) any inverse error function real(x)
    igamma(a,x) any igamma(Re(a,x)), igamma function of real(a,x)
    imag(x) complex Im(x), imaginary part of x as a real number
    invnorm(x) any inverse normal distribution function real(x)
    int(x) real integer part of x, truncated toward zero
    lambertw(x) real Lambert W function
    lgamma(x) any lgamma(Re(x)), lgamma function of real(x)
    log(x) any ln x, natural logarithm (base e) of x
    log10(x) any log10 x, logarithm (base 10) of x
    norm(x) any norm(x), normal distribution function of real(x)
    rand(x) int pseudo random number in the interval [0:1]
    real(x) any Re(x), real part of x
    sgn(x) any 1 if x > 0, -1 if x < 0, 0 if x = 0. ℑ(x) ignored
    sin(x) any sin x, sine of x
    sinh(x) any sinh x, hyperbolic sine of x in radians
    sqrt(x) any x, square root of x
    tan(x) any tan x, tangent of x
    tanh(x) any tanh x, hyperbolic tangent of x in radians
    voigt(x,y) real convolution of Gaussian and Lorentzian
    ^

     

    ^ ^^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
    String functions
    Function Arguments Returns
    gprintf("format",x,...) any string result from applying gnuplot's format parser
    sprintf("format",x,...) multiple string result from C-language sprintf
    strlen("string") string int length of string in bytes
    strstrt("string","key") strings int index of first character of substring "key"
    substr("string",beg,end) multiple string "string"[beg:end]
    strftime("timeformat",t) any string result from applying gnuplot's time parser
    strptime("timeformat",s) string seconds since year 2000 as given in string s
    system("command") string string containing output stream of shell command
    word("string",n) string, int returns the nth word in "string"
    words("string") string returns the number of words in "string"
    ^

     

    ^ ^^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
    other gnuplot functions
    Function Arguments Returns
    column(x) int or string contents of column x during data input.
    columnhead(x) int string containing first entry of column x in datafile.
    defined(X) variable name [DEPRECATED] returns 1 if X is defined, 0 otherwise.
    exists("X") string returns 1 if a variable named X is defined, 0 otherwise.
    stringcolumn(x) int content column x as a string.
    timecolumn(x) int timecolumn x during datafile manipulation.
    tm_hour(x) int the hour
    tm_mday(x) int the day of the month
    tm_min(x) int the minute
    tm_mon(x) int the month
    tm_sec(x) int the second
    tm_wday(x) int the day of the week
    tm_yday(x) int the day of the year
    tm_year(x) int the year
    time(x) any the current system time
    valid(x) int test validity of column(x) during datafile manip.
    value("name") string returns the current value of the named variable.
    C For TeX and troff output a table replaces the help sections below. C For the HTML help we want both, table and sections, so the magic C marker below is used to signal this to doc2html: ^ @start table #\begin{longtable}{|ccl|} \hline #\multicolumn{3}{|c|}{Math library functions} \\ \hline \hline #Function & Arguments & Returns \\ \hline #\endhead \hline \endfoot %c c l . %Function@Arguments@Returns %_ 4 abs ?expressions functions abs ?abs #abs(x) & any & absolute value of $x$, $|x|$; same type \\ #abs(x) & complex & length of $x$, $\sqrt{{\mbox{real}(x)^{2} + #\mbox{imag}(x)^{2}}}$ \\ %abs(x)@any@absolute value of $x$, $|x|$; same type %abs(x)@complex@length of $x$, $sqrt{roman real (x) sup 2 + roman imag (x) sup 2}$ The `abs(x)` function returns the absolute value of its argument. The returned value is of the same type as the argument. For complex arguments, abs(x) is defined as the length of x in the complex plane [i.e., sqrt(real(x)**2 + imag(x)**2) ]. 4 acos ?expressions functions acos ?acos #acos(x) & any & $\cos^{-1} x$ (inverse cosine) \\ %acos(x)@any@$cos sup -1 x$ (inverse cosine) The `acos(x)` function returns the arc cosine (inverse cosine) of its argument. `acos` returns its argument in radians or degrees, as selected by `set angles`. 4 acosh ?expressions functions acosh ?acosh #acosh(x) & any & $\cosh^{-1} x$ (inverse hyperbolic cosine) in radians \\ %acosh(x)@any@$cosh sup -1 x$ (inverse hyperbolic cosine) in radians The `acosh(x)` function returns the inverse hyperbolic cosine of its argument in radians. 4 airy ?expressions functions airy ?airy #airy(x) & any & Airy function Ai(x) \\ %airy(x)@any@Airy function Ai(x) The `airy(x)` function returns the value of the Airy function Ai(x) of its argument. The function Ai(x) is that solution of the equation y'' - x y = 0 which is everywhere finite. If the argument is complex, its imaginary part is ignored. 4 arg ?expressions functions arg ?arg #arg(x) & complex & the phase of $x$ \\ %arg(x)@complex@the phase of $x$ The `arg(x)` function returns the phase of a complex number in radians or degrees, as selected by `set angles`. 4 asin ?expressions functions asin ?asin #asin(x) & any & $\sin^{-1} x$ (inverse sin) \\ %asin(x)@any@$sin sup -1 x$ (inverse sin) The `asin(x)` function returns the arc sin (inverse sin) of its argument. `asin` returns its argument in radians or degrees, as selected by `set angles`. 4 asinh ?expressions functions asinh ?asinh #asinh(x) & any & $\sinh^{-1} x$ (inverse hyperbolic sin) in radians \\ %asinh(x)@any@$sinh sup -1 x$ (inverse hyperbolic sin) in radians The `asinh(x)` function returns the inverse hyperbolic sin of its argument in radians. 4 atan ?expressions functions atan ?atan #atan(x) & any & $\tan^{-1} x$ (inverse tangent) \\ %atan(x)@any@$tan sup -1 x$ (inverse tangent) The `atan(x)` function returns the arc tangent (inverse tangent) of its argument. `atan` returns its argument in radians or degrees, as selected by `set angles`. 4 atan2 ?expressions functions atan2 ?atan2 #atan2(y,x) & int or real & $\tan^{-1} (y/x)$ (inverse tangent) \\ %atan2(y,x)@int or real@$tan sup -1 (y/x)$ (inverse tangent) The `atan2(y,x)` function returns the arc tangent (inverse tangent) of the ratio of the real parts of its arguments. `atan2` returns its argument in radians or degrees, as selected by `set angles`, in the correct quadrant. 4 atanh ?expressions functions atanh ?atanh #atanh(x) & any & $\tanh^{-1} x$ (inverse hyperbolic tangent) in radians \\ %atanh(x)@any@$tanh sup -1 x$ (inverse hyperbolic tangent) in radians The `atanh(x)` function returns the inverse hyperbolic tangent of its argument in radians. 4 EllipticK #EllipticK(k) & real k $\in$ (-1:1) & $K(k)$ complete elliptic integral of the first kind \\ %EllipticK(k)@real k in (-1:1)@$K k$ complete elliptic integral of the first kind See `elliptic integrals`. 4 EllipticE #EllipticE(k) & real k $\in$ [-1:1] & $E(k)$ complete elliptic integral of the second kind \\ %EllipticE(k)@real k in [-1:1]@ $E k$ complete elliptic integral of the second kind See `elliptic integrals`. 4 EllipticPi #EllipticPi(n,k) & real n$<$1, real k $\in$ (-1:1) & $\Pi(n,k)$ complete elliptic integral of the third kind \\ %EllipticPi(n,k)@ real n<1, real k in (-1:1)@ $Pi n,k$ complete elliptic integral of the third kind See `elliptic integrals`. 4 besj0 ?expressions functions besj0 ?besj0 #besj0(x) & int or real & $j_{0}$ Bessel function of $x$, in radians \\ %besj0(x)@int or real@$j sub 0$ Bessel function of $x$, in radians The `besj0(x)` function returns the j0th Bessel function of its argument. `besj0` expects its argument to be in radians. 4 besj1 ?expressions functions besj1 ?besj1 #besj1(x) & int or real & $j_{1}$ Bessel function of $x$, in radians \\ %besj1(x)@int or real@$j sub 1$ Bessel function of $x$, in radians The `besj1(x)` function returns the j1st Bessel function of its argument. `besj1` expects its argument to be in radians. 4 besy0 ?expressions functions besy0 ?besy0 #besy0(x) & int or real & $y_{0}$ Bessel function of $x$, in radians \\ %besy0(x)@int or real@$y sub 0$ Bessel function of $x$, in radians The `besy0(x)` function returns the y0th Bessel function of its argument. `besy0` expects its argument to be in radians. 4 besy1 ?expressions functions besy1 ?besy1 #besy1(x) & int or real & $y_{1}$ Bessel function of $x$, in radians \\ %besy1(x)@int or real@$y sub 1$ Bessel function of $x$, in radians The `besy1(x)` function returns the y1st Bessel function of its argument. `besy1` expects its argument to be in radians. 4 ceil ?expressions functions ceil ?ceil #ceil(x) & any & $\lceil x \rceil$, smallest integer not less than $x$ #(real part) \\ %ceil(x)@any@$left ceiling x right ceiling$, smallest integer not less than $x$ (real part) The `ceil(x)` function returns the smallest integer that is not less than its argument. For complex numbers, `ceil` returns the smallest integer not less than the real part of its argument. 4 cos ?expressions functions cos ?cos #cos(x) & any & $\cos x$, cosine of $x$ \\ %cos(x)@radians@$cos~x$, cosine of $x$ The `cos(x)` function returns the cosine of its argument. `cos` accepts its argument in radians or degrees, as selected by `set angles`. 4 cosh ?expressions functions cosh ?cosh #cosh(x) & any & $\cosh x$, hyperbolic cosine of $x$ in radians \\ %cosh(x)@any@$cosh~x$, hyperbolic cosine of $x$ in radians The `cosh(x)` function returns the hyperbolic cosine of its argument. `cosh` expects its argument to be in radians. 4 erf ?expressions functions erf ?erf #erf(x) & any & $\mbox{erf}(\mbox{real}(x))$, error function of real($x$) \\ %erf(x)@any@$erf ( roman real (x))$, error function of real ($x$) The `erf(x)` function returns the error function of the real part of its argument. If the argument is a complex value, the imaginary component is ignored. See `erfc`, `inverf`, and `norm`. 4 erfc ?expressions functions erfc ?erfc #erfc(x) & any & $\mbox{erfc}(\mbox{real}(x))$, 1.0 - error function of real($x$) \\ %erfc(x)@any@$erfc ( roman real (x))$, 1.0 - error function of real ($x$) The `erfc(x)` function returns 1.0 - the error function of the real part of its argument. If the argument is a complex value, the imaginary component is ignored. See `erf`, `inverf`, and `norm`. 4 exp ?expressions functions exp ?exp #exp(x) & any & $e^{x}$, exponential function of $x$ \\ %exp(x)@any@$e sup x$, exponential function of $x$ The `exp(x)` function returns the exponential function of its argument (`e` raised to the power of its argument). On some implementations (notably suns), exp(-x) returns undefined for very large x. A user-defined function like safe(x) = x<-100 ? 0 : exp(x) might prove useful in these cases. 4 expint ?expressions functions expint ?expint #expint(n,x) & int $n\ge0$, real $x\ge0$ & $E_n(x)=\int_1^\infty t^{-n} e^{-xt}\,dt$, exponential integral of $x$ \\ %expint(n,x)@any@$E sub n (x)$, exponential integral function of $x$ The `expint(n,x)` function returns the exponential integral of the real part of its argument: integral from 1 to infinity of t^(-n) e^(-tx) dt. n must be a nonnegative integer, x>=0, and either x>0 or n>1. 4 floor ?expressions functions floor ?floor #floor(x) & any & $\lfloor x \rfloor$, largest integer not greater #than $x$ (real part) \\ %floor(x)@any@$left floor x right floor$, largest integer not greater than $x$ (real part) The `floor(x)` function returns the largest integer not greater than its argument. For complex numbers, `floor` returns the largest integer not greater than the real part of its argument. 4 gamma ?expressions functions gamma ?gamma #gamma(x) & any & $\mbox{gamma}(\mbox{real}(x))$, gamma function of real($x$) \\ %gamma(x)@any@$GAMMA ( roman real (x))$, gamma function of real ($x$) The `gamma(x)` function returns the gamma function of the real part of its argument. For integer n, gamma(n+1) = n!. If the argument is a complex value, the imaginary component is ignored. 4 ibeta ?expressions functions ibeta ?ibeta #ibeta(p,q,x) & any & $\mbox{ibeta}(\mbox{real}(p,q,x))$, ibeta function of real($p$,$q$,$x$) \\ %ibeta(p,q,x)@any@$ibeta ( roman real (p,q,x))$, ibeta function of real ($p$,$q$,$x$) The `ibeta(p,q,x)` function returns the incomplete beta function of the real parts of its arguments. p, q > 0 and x in [0:1]. If the arguments are complex, the imaginary components are ignored. The function is approximated by the method of continued fractions (Abramowitz and Stegun, 1964). The approximation is only accurate in the region x < (p-1)/(p+q-2). 4 inverf ?expressions functions inverf ?inverf #inverf(x) & any & inverse error function of real($x$) \\ %inverf(x)@any@inverse error function real($x$) The `inverf(x)` function returns the inverse error function of the real part of its argument. See `erf` and `invnorm`. 4 igamma ?expressions functions igamma ?igamma #igamma(a,x) & any & $\mbox{igamma}(\mbox{real}(a,x))$, igamma function of real($a$,$x$) \\ %igamma(a,x)@any@$igamma ( roman real (a,x))$, igamma function of real ($a$,$x$) The `igamma(a,x)` function returns the normalized incomplete gamma function of the real parts of its arguments, where a > 0 and x >= 0. The standard notation is P(a,x), e.g. Abramowitz and Stegun (6.5.1), with limiting value of 1 as x approaches infinity. If the arguments are complex, the imaginary components are ignored. 4 imag ?expressions functions imag ?imag #imag(x) & complex & imaginary part of $x$ as a real number \\ %imag(x)@complex@imaginary part of $x$ as a real number The `imag(x)` function returns the imaginary part of its argument as a real number. 4 invnorm ?expressions functions invnorm ?invnorm #invnorm(x) & any & inverse normal distribution function of real($x$) \\ %invnorm(x)@any@inverse normal distribution function real($x$) The `invnorm(x)` function returns the inverse cumulative normal (Gaussian) distribution function of the real part of its argument. See `norm`. 4 int ?expressions functions int ?int #int(x) & real & integer part of $x$, truncated toward zero \\ %int(x)@real@integer part of $x$, truncated toward zero The `int(x)` function returns the integer part of its argument, truncated toward zero. 4 lambertw ?expressions functions lambertw ?lambertw #lambertw(x) & real & Lambert W function \\ %lambertw(x)@real@Lambert W function The lambertw function returns the value of the principal branch of Lambert's W function, which is defined by the equation (W(z)*exp(W(z))=z. z must be a real number with z >= -exp(-1). 4 lgamma ?expressions functions lgamma ?lgamma #lgamma(x) & any & $\mbox{lgamma}(\mbox{real}(x))$, lgamma function of real($x$) \\ %lgamma(x)@any@$lgamma ( roman real (x))$, lgamma function of real ($x$) The `lgamma(x)` function returns the natural logarithm of the gamma function of the real part of its argument. If the argument is a complex value, the imaginary component is ignored. 4 log ?expressions functions log ?log #log(x) & any & $\log_{e} x$, natural logarithm (base $e$) of $x$ \\ %log(x)@any@$ln~x$, natural logarithm (base $e$) of $x$ The `log(x)` function returns the natural logarithm (base `e`) of its argument. See `log10`. 4 log10 ?expressions functions log10 ?log10 #log10(x) & any & $\log_{10} x$, logarithm (base $10$) of $x$ \\ %log10(x)@any@${log sub 10}~x$, logarithm (base $10$) of $x$ The `log10(x)` function returns the logarithm (base 10) of its argument. 4 norm ?expressions functions norm ?norm #norm(x) & any & normal distribution (Gaussian) function of real($x$) \\ %norm(x)@any@$norm(x)$, normal distribution function of real($x$) The `norm(x)` function returns the cumulative normal (Gaussian) distribution function of the real part of its argument. See `invnorm`, `erf` and `erfc`. 4 rand ?expressions functions rand ?rand #rand(x) & int & pseudo random number in the interval [0:1] \\ %rand(x)@int@pseudo random number in the interval [0:1] `rand(0)` returns a pseudo random number in the interval [0:1]. See `random` for more details. 4 real ?expressions functions real ?real #real(x) & any & real part of $x$ \\ %real(x)@any@real part of $x$ The `real(x)` function returns the real part of its argument. 4 sgn ?expressions functions sgn ?sgn #sgn(x) & any & 1 if $x>0$, -1 if $x<0$, 0 if $x=0$. imag($x$) ignored \\ %sgn(x)@any@1 if $x > 0$, -1 if $x < 0$, 0 if $x = 0$. $roman imag (x)$ ignored The `sgn(x)` function returns 1 if its argument is positive, -1 if its argument is negative, and 0 if its argument is 0. If the argument is a complex value, the imaginary component is ignored. 4 sin ?expressions functions sin ?sin #sin(x) & any & $\sin x$, sine of $x$ \\ %sin(x)@any@$sin~x$, sine of $x$ The `sin(x)` function returns the sine of its argument. `sin` expects its argument to be in radians or degrees, as selected by `set angles`. 4 sinh ?expressions functions sinh ?sinh #sinh(x) & any & $\sinh x$, hyperbolic sine of $x$ in radians \\ %sinh(x)@any@$sinh~x$, hyperbolic sine of $x$ in radians The `sinh(x)` function returns the hyperbolic sine of its argument. `sinh` expects its argument to be in radians. 4 sqrt ?expressions functions sqrt ?sqrt #sqrt(x) & any & $\sqrt{x}$, square root of $x$ \\ %sqrt(x)@any@$sqrt x $, square root of $x$ The `sqrt(x)` function returns the square root of its argument. 4 tan ?expressions functions tan ?tan #tan(x) & any & $\tan x$, tangent of $x$ \\ %tan(x)@any@$tan~x$, tangent of $x$ The `tan(x)` function returns the tangent of its argument. `tan` expects its argument to be in radians or degrees, as selected by `set angles`. 4 tanh ?expressions functions tanh ?tanh #tanh(x) & any & $\tanh x$, hyperbolic tangent of $x$ in radians\\ %tanh(x)@any@$tanh~x$, hyperbolic tangent of $x$ in radians The `tanh(x)` function returns the hyperbolic tangent of its argument. `tanh` expects its argument to be in radians. 4 voigt ?expressions functions voigt ?voigt #voigt(x,y) & real & Voigt/Faddeeva function $\frac{y}{\pi} \int{\frac{exp(t^2)}{(x-t)^2+y^2}}dt$ \\ %voigt(x,y)@real@convolution of Gaussian and Lorentzian The function `voigt(x,y)` returns an approximation to the Voigt/Faddeeva function used in spectral analysis. The approximation is accurate to one part in 10^4. #\hline \end{longtable} #%% begin dummy tabular because the @end processing wants to end one #\begin{tabular}{|ccl|} @end table ^ @start table #\begin{tabular}{|ccl|} \hline #\multicolumn{3}{|c|}{String functions} \\ \hline \hline #Function & Arguments & Returns \\ \hline %c c l . %Function@Arguments@Returns %_ 4 gprintf ?expressions functions gprintf #gprintf("format",x,...) & any & string result from applying gnuplot's format parser \\ %gprintf("format",x,...)@any@string result from applying gnuplot's format parser `gprintf("format",x)` applies gnuplot's own format specifiers to the single variable x and returns the resulting string. If you want standard C-language format specifiers, you must instead use `sprintf("format",x)`. See `format specifiers`. 4 sprintf ?expressions functions sprintf ?sprintf #sprintf("format",x,...) & multiple & string result from C-language sprintf \\ %sprintf("format",x,...)@multiple@string result from C-language sprintf `sprintf("format",var1,var2,...)` applies standard C-language format specifiers to multiple arguments and returns the resulting string. If you want to use gnuplot's own format specifiers, you must instead call `gprintf()`. For information on sprintf format specifiers, please see standard C-language documentation or the unix sprintf man page. 4 strlen ?expressions functions strlen ?strlen #strlen("string") & string & int length of string in bytes\\ %strlen("string")@string@int length of string in bytes `strlen("string")` returns the length of the string in bytes. If the current encoding supports multibyte characters, this may be larger than the number of characters in the string. 4 strstrt ?expressions functions strstrt ?strstrt #strstrt("string","key") & strings & int index of first character of substring "key" \\ %strstrt("string","key")@strings@int index of first character of substring "key" `strstrt("string","key")` searches for the character string "key" in "string" and returns the index to the first character of "key". If "key" is not found, returns 0. Similar to C library function strstr except that it returns an index rather than a string pointer. strstrt("hayneedlestack","needle") = 4. 4 substr ?expressions functions substr ?substr =substring #substr("string",beg,end) & multiple & string "string"[beg:end] \\ %substr("string",beg,end)@multiple@string "string"[beg:end] `substr("string",beg,end)` returns the substring consisting of characters beg through end of the original string. This is exactly equivalent to the expression "string"[beg:end] except that you do not have the option of omitting beg or end. 4 strftime ?expressions functions strftime ?strftime #strftime("timeformat",t) & any & string result from applying gnuplot's time parser \\ %strftime("timeformat",t)@any@string result from applying gnuplot's time parser `strftime("timeformat",t)` applies the timeformat specifiers to the time t given in seconds since the year 2000. See `time_specifiers` and `strptime`. 4 strptime ?expressions functions strptime ?strptime #strptime("timeformat",s) & string & seconds since year 2000 as given in string s \\ %strptime("timeformat",s)@string@seconds since year 2000 as given in string s `strptime("timeformat",s)` reads the time from the string s using the timeformat specifiers and converts it into seconds since the year 2000. See `time_specifiers` and `strftime`. 4 system ?expressions functions system =system #system("command") & string & string containing output stream of shell command \\ %system("command")@string@string containing output stream of shell command `system("command")` executes "command" using the standard shell and returns the resulting character stream from stdout as string variable. One optional trailing newline is ignored. This can be used to import external functions into gnuplot scripts using 'f(x) = real(system(sprintf("somecommand %f", x)))'. 4 word ?expressions functions word ?word =word #word("string",n) & string, int & returns the nth word in "string" \\ %word("string",n)@string, int@returns the nth word in "string" `word("string",n)` returns the nth word in string. For example, `word("one two three",2)` returns the string "two". 4 words ?expressions functions words ?words =words #words("string") & string & returns the number of words in "string" \\ %words("string")@string@returns the number of words in "string" `words("string")` returns the number of words in string. For example, `words(" a b c d")` returns 4. @end table ^ @start table #\begin{tabular}{|ccl|} \hline #\multicolumn{3}{|c|}{other {\bf gnuplot} functions} \\ \hline \hline #Function & Arguments & Returns \\ \hline %c c l . %Function@Arguments@Returns %_ 4 column ?expressions functions column ?column #column(x) & int or string & column $x$ during datafile manipulation. \\ %column(x)@int or string@ column $x$ during datafile manipulation. `column(x)` may be used only in expressions as part of `using` manipulations to fits or datafile plots. It evaluates to the numerical value of the contents of column x. See `plot datafile using`. 4 columnhead ?expressions functions columnhead ?columnhead #columnhead(x) & int & string containing first entry of column $x$ in datafile. \\ %columnhead(x)@int@ string containing first entry of column $x$ in datafile. `columnhead(x)` may only be used in expressions as part of `using` manipulations to fits or datafile plots. It evaluates to a string containing the contents of column x in the first line of data. See `plot datafile using`. 4 defined ?expressions functions defined ?defined #defined(X) & variable name & [DEPRECATED] returns 1 if X is defined, 0 otherwise. \\ %defined(X)@variable name@ [DEPRECATED] returns 1 if X is defined, 0 otherwise. `defined(X)` [DEPRECATED] returns 1 if a variable named X has been defined, otherwise it returns 0. Please use `exists("X")` instead. 4 exists ?expressions functions exists ?exists #exists("X") & string & returns 1 if a variable named X is defined, 0 otherwise. \\ %exists("X")@string@ returns 1 if a variable named X is defined, 0 otherwise. The argument to exists() is a string constant or a string variable; if the string contains the name of a defined variable, the function returns 1. Otherwise the function returns 0. 4 stringcolumn ?expressions functions stringcolumn ?stringcolumn ?expressions functions strcol ?strcol #stringcolumn(x) & int or string & content of column $x$ as a string. \\ %stringcolumn(x)@int or string@ content column $x$ as a string. `stringcolumn(x)` may be used only in expressions as part of `using` manipulations to fits or datafile plots. It returns the content of column x as a string variable. See `plot datafile using`. 4 timecolumn ?expressions functions timecolumn ?timecolumn #timecolumn(x) & int & timecolumn $x$ during datafile manipulation. \\ %timecolumn(x)@int@ timecolumn $x$ during datafile manipulation. `timecolumn(x)` may be used only in expressions as part of `using` manipulations to fits or datafile plots. See `plot datafile using`. It reads the data starting at that column as a time/date value and returns its value in gnuplot's internal time representation of "seconds since the millennium". To find the right `timefmt` string to use, `timecolumn` searches for a `using` specification with the same column number as its argument. If one is found, `timefmt` pattern of the target axis for this specifier is used. Otherwise, `timecolumn` chooses the x axis `timefmt` per default. 4 tm_hour ?expressions tm_hour ?tm_hour #tm\_hour(x) & int & the hour \\ %tm_hour(x)@int@the hour The `tm_hour` function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the hour (an integer in the range 0--23) as a real. 4 tm_mday ?expressions tm_mday ?tm_mday #tm\_mday(x) & int & the day of the month \\ %tm_mday(x)@int@the day of the month The `tm_mday` function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the day of the month (an integer in the range 1--31) as a real. 4 tm_min ?expressions tm_min ?tm_min #tm\_min(x) & int & the minute \\ %tm_min(x)@int@the minute The `tm_min` function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the minute (an integer in the range 0--59) as a real. 4 tm_mon ?expressions tm_mon ?tm_mon #tm\_mon(x) & int & the month \\ %tm_mon(x)@int@the month The `tm_mon` function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the month (an integer in the range 0--11) as a real. 4 tm_sec ?expressions tm_sec ?tm_sec #tm\_sec(x) & int & the second \\ %tm_sec(x)@int@the second The `tm_sec` function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the second (an integer in the range 0--59) as a real. 4 tm_wday ?expressions tm_wday ?tm_wday #tm\_wday(x) & int & the day of the week \\ %tm_wday(x)@int@the day of the week The `tm_wday` function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the day of the week (an integer in the range 0--6) as a real. 4 tm_yday ?expressions tm_yday ?tm_yday #tm\_yday(x) & int & the day of the year \\ %tm_yday(x)@int@the day of the year The `tm_yday` function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the day of the year (an integer in the range 1--366) as a real. 4 tm_year ?expressions tm_year ?tm_year #tm\_year(x) & int & the year \\ %tm_year(x)@int@the year The `tm_year` function interprets its argument as a time, in seconds from 1 Jan 2000. It returns the year (an integer) as a real. 4 time ?expressions time ?time #time(x) & any & the current system time \\ %time(x)@any@the current system time The `time` function returns the current system time. This value can be converted to a date string with the `strftime` function, or it can be used in conjunction with `timecolumn` to generate relative time/date plots. The type of the argument determines what is returned. If the argument is an integer, time() returns the current time as an integer, in seconds from 1 Jan 2000. If the argument is real (or complex), the result is real as well. If the argument is a string, it is assumed to be a format string, and it is passed to `strftime` to provide a formatted time string. 4 valid ?expressions functions valid ?valid #valid(x) & int & test validity of $\mbox{column}(x)$ during datafile manip.\\ %valid(x)@int@ test validity of column($x$) during datafile manip. `valid(x)` may be used only in expressions as part of `using` manipulations to fits or datafile plots. See `plot datafile using`. #value("name") & string & returns the value of the named variable.\\ %value("name")@string@ returns the current value of the named variable. @end table 4 elliptic integrals ?expressions functions elliptic integrals ?elliptic integrals =elliptic integrals The `EllipticK(k)` function returns the complete elliptic integral of the first kind, i.e. the definite integral between 0 and pi/2 of the function `(1-(k*sin(p))**2)**(-0.5)`. The domain of `k` is -1 to 1 (exclusive). The `EllipticE(k)` function returns the complete elliptic integral of the second kind, i.e. the definite integral between 0 and pi/2 of the function `(1-(k*sin(p))**2)**0.5`. The domain of `k` is -1 to 1 (inclusive). The `EllipticPi(n,k)` function returns the complete elliptic integral of the third kind, i.e. the definite integral between 0 and pi/2 of the function `(1-(k*sin(p))**2)**(-0.5)/(1-n*sin(p)**2)`. The parameter `n` must be less than 1, while `k` must lie between -1 and 1 (exclusive). Note that by definition EllipticPi(0,k) == EllipticK(k) for all possible values of `k`. 4 Random number generator ?expressions random ?random =rand The function `rand()` produces a sequence of pseudo-random numbers between 0 and 1 using an algorithm from P. L'Ecuyer and S. Cote, "Implementing a random number package with splitting facilities", ACM Transactions on Mathematical Software, 17:98-111 (1991). rand(0) returns a pseudo random number in the interval [0:1] generated from the current value of two internal 32-bit seeds. rand(-1) resets both seeds to a standard value. rand(x) for integer 0 < x < 2^31-1 sets both internal seeds to x. rand({x,y}) for integer 0 < x,y < 2^31-1 sets seed1 to x and seed2 to y. 4 value ?expressions functions value ?value B = value("A") is effectively the same as B = A, where A is the name of a user-defined variable. This is useful when the name of the variable is itself held in a string variable. See `user-defined variables`. It also allows you to read the name of a variable from a data file. If the argument is a numerical expression, value() returns the value of that expression. If the argument is a string that does not correspond to a currently defined variable, value() returns NaN. 3 Operators ?expressions operators ?operators The operators in `gnuplot` are the same as the corresponding operators in the C programming language, except that all operators accept integer, real, and complex arguments, unless otherwise noted. The ** operator (exponentiation) is supported, as in FORTRAN. Parentheses may be used to change order of evaluation. 4 Unary ?expressions operators unary ?operators unary ?unary The following is a list of all the unary operators and their usages: @start table - first is interactive cleartext form Symbol Example Explanation - -a unary minus + +a unary plus (no-operation) ~ ~a * one's complement ! !a * logical negation ! a! * factorial $ $3 * call arg/column during `using` manipulation =factorial =negation =one's complement =operator precedence #\begin{tabular}{|ccl|} \hline #\multicolumn{3}{|c|}{Unary Operators}\\ \hline \hline #Symbol & Example & Explanation \\ \hline #\verb@-@ & \verb@-a@ & unary minus \\ #\verb@+@ & \verb@+a@ & unary plus (no-operation) \\ #\verb@~@ & \verb@~a@ & * one's complement \\ #\verb@!@ & \verb@!a@ & * logical negation \\ #\verb@!@ & \verb@a!@ & * factorial \\ #\verb@$@ & \verb@$3@ & * call arg/column during `using` manipulation \\ C ugly hack: doc2ms uses $ as delimiter for eqn's so it doesn't seem to C be able to print them. So we have to typeset this table without using C eqn (at least that's the only solution I found, without any real docs C on *roff and eqn C First, terminate the table doc2ms.c already started: %.TE C ... then turn off eqn delimiters: %.EQ %delim off %.EN C ... and restart the table: %.TS %center box tab (@) ; %c c l . %Symbol@Example@Explanation %_ %-@-a@unary minus %+@+a@unary plus (no-operation) %~@~a@* one's complement %!@!a@* logical negation %!@a!@* factorial %$@$3@* call arg/column during `using` manipulation %_ @end table ^ ^^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
    Symbol Example Explanation
    - -a unary minus
    + +a unary plus (no-operation)
    ~ ~a * one's complement
    ! !a * logical negation
    ! a! * factorial
    $ $3 * call arg/column during `using` manipulation
    (*) Starred explanations indicate that the operator requires an integer argument. Operator precedence is the same as in Fortran and C. As in those languages, parentheses may be used to change the order of operation. Thus -2**2 = -4, but (-2)**2 = 4. The factorial operator returns a real number to allow a greater range. 4 Binary ?expressions operators binary ?operators binary The following is a list of all the binary operators and their usages: @start table - first is interactive cleartext form Symbol Example Explanation ** a**b exponentiation * a*b multiplication / a/b division % a%b * modulo + a+b addition - a-b subtraction == a==b equality != a!=b inequality < a a>b greater than >= a>=b greater than or equal to & a&b * bitwise AND ^ a^b * bitwise exclusive OR | a|b * bitwise inclusive OR && a&&b * logical AND || a||b * logical OR = a = b assignment , (a,b) serial evaluation . A.B string concatenation eq A eq B string equality ne A ne B string inequality =bitwise operators =string operators =modulo =exponentiation #\begin{tabular}{|ccl|} \hline #\multicolumn{3}{|c|}{Binary Operators} \\ \hline \hline #Symbol & Example & Explanation \\ \hline #\verb~**~ & \verb~a**b~ & exponentiation\\ #\verb~*~ & \verb~a*b~ & multiplication\\ #\verb~/~ & \verb~a/b~ & division\\ #\verb~%~ & \verb~a%b~ & * modulo\\ #\verb~+~ & \verb~a+b~ & addition\\ #\verb~-~ & \verb~a-b~ & subtraction\\ #\verb~==~ & \verb~a==b~ & equality\\ #\verb~!=~ & \verb~a!=b~ & inequality\\ #\verb~<~ & \verb~a~ & \verb~a>b~ & greater than\\ #\verb~>=~ & \verb~a>=b~ & greater than or equal to\\ #\verb~&~ & \verb~a&b~ & * bitwise AND\\ #\verb~^~ & \verb~a^b~ & * bitwise exclusive OR\\ #\verb~|~ & \verb~a|b~ & * bitwise inclusive OR\\ #\verb~&&~ & \verb~a&&b~ & * logical AND\\ #\verb~||~ & \verb~a||b~ & * logical OR\\ #\verb~=~ & \verb~a = b~ & assignment\\ #\verb~,~ & \verb~(a,b)~ & serial evaluation\\ #\verb~.~ & \verb~A.B~ & string concatenation\\ #\verb~eq~ & \verb~A eq B~ & string equality\\ #\verb~ne~ & \verb~A ne B~ & string inequality\\ %c c l . %Symbol@Example@Explanation %_ %**@a**b@exponentiation %*@a*b@multiplication %/@a/b@division %%@a%b@* modulo %+@a+b@addition %-@a-b@subtraction %==@a==b@equality %!=@a!=b@inequality %<@a@a>b@greater than %>=@a>=b@greater than or equal to %&@a&b@* bitwise AND %^@a^b@* bitwise exclusive OR %|@a|b@* bitwise inclusive OR %&&@a&&b@* logical AND %||@a||b@* logical OR %=@a = b@assignment %,@(a,b)@serial evaluation %.@a.b@string concatenation %eq@A eq B@string equality %ne@A ne B@string inequality @end table ^ ^^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
    Symbol Example Explanation
    ** a**b exponentiation
    * a*b multiplication
    / a/b division
    % a%b * modulo
    + a+b addition
    - a-b subtraction
    == a==b equality
    != a!=b inequality
    < a<b less than
    <= a<=b less than or equal to
    > a>b greater than
    >= a>=b greater than or equal to
    & a&b * bitwise AND
    ^ a^b * bitwise exclusive OR
    | a|b * bitwise inclusive OR
    && a&&b * logical AND
    || a||b * logical OR
    = a = b assignment
    , (a,b) serial evaluation
    . a.b string concatenation
    eq A eq B string equality
    ne A ne B string inequality
    (*) Starred explanations indicate that the operator requires integer arguments. Capital letters A and B indicate that the operator requires string arguments. Logical AND (&&) and OR (||) short-circuit the way they do in C. That is, the second `&&` operand is not evaluated if the first is false; the second `||` operand is not evaluated if the first is true. Serial evaluation occurs only in parentheses and is guaranteed to proceed in left to right order. The value of the rightmost subexpression is returned. 4 Ternary ?expressions operators ternary ?operators ternary ?ternary There is a single ternary operator: @start table - first is interactive cleartext form Symbol Example Explanation ?: a?b:c ternary operation #\begin{tabular}{|ccl|} \hline #\multicolumn{3}{|c|}{Ternary Operator} \\ \hline \hline #Symbol & Example & Explanation \\ \hline #\verb~?:~ & \verb~a?b:c~ & ternary operation\\ %c c l . %Symbol@Example@Explanation %_ %?:@a?b:c@* ternary operation @end table ^ ^^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
    Symbol Example Explanation
    ?: a?b:c * ternary operation
    The ternary operator behaves as it does in C. The first argument (a), which must be an integer, is evaluated. If it is true (non-zero), the second argument (b) is evaluated and returned; otherwise the third argument (c) is evaluated and returned. The ternary operator is very useful both in constructing piecewise functions and in plotting points only when certain conditions are met. Examples: Plot a function that is to equal sin(x) for 0 <= x < 1, 1/x for 1 <= x < 2, and undefined elsewhere: f(x) = 0<=x && x<1 ? sin(x) : 1<=x && x<2 ? 1/x : 1/0 plot f(x) Note that `gnuplot` quietly ignores undefined values, so the final branch of the function (1/0) will produce no plottable points. Note also that f(x) will be plotted as a continuous function across the discontinuity if a line style is used. To plot it discontinuously, create separate functions for the two pieces. (Parametric functions are also useful for this purpose.) For data in a file, plot the average of the data in columns 2 and 3 against the datum in column 1, but only if the datum in column 4 is non-negative: plot 'file' using 1:( $4<0 ? 1/0 : ($2+$3)/2 ) For an explanation of the `using` syntax, please see `plot datafile using`. 3 Summation ?expressions operators summation ?operators summation ?summation A summation expression has the form sum [ = : ] is treated as an integer variable that takes on successive integral values from to . For each of these, the current value of is added to a running total whose final value becomes the value of the summation expression. Examples: print sum [i=1:10] i 55. # Equivalent to plot 'data' using 1:($2+$3+$4+$5+$6+...) plot 'data' using 1 : (sum [col=2:MAXCOL] column(col)) It is not necessary that contain the variable . Although and can be specified as variables or expressions, their value cannot be changed dynamically as a side-effect of carrying out the summation. If is less than then the value of the summation is zero. 3 Gnuplot-defined variables ?expressions gnuplot-defined ?gnuplot-defined ?gnuplot-defined variables ?GPVAL ?gpval Gnuplot maintains a number of read-only variables that reflect the current internal state of the program and the most recent plot. These variables begin with the prefix "GPVAL_". Examples include GPVAL_TERM, GPVAL_X_MIN, GPVAL_X_MAX, GPVAL_Y_MIN. Type `show variables all` to display the complete list and current values. Values related to axes parameters (ranges, log base) are values used during the last plot, not those currently `set`. Example: To calculate the fractional screen coordinates of the point [X,Y] GRAPH_X = (X - GPVAL_X_MIN) / (GPVAL_X_MAX - GPVAL_X_MIN) GRAPH_Y = (Y - GPVAL_Y_MIN) / (GPVAL_Y_MAX - GPVAL_Y_MIN) SCREEN_X = GPVAL_TERM_XMIN + GRAPH_X * (GPVAL_TERM_XMAX - GPVAL_TERM_XMIN) SCREEN_Y = GPVAL_TERM_YMIN + GRAPH_Y * (GPVAL_TERM_YMAX - GPVAL_TERM_YMIN) FRAC_X = SCREEN_X / GPVAL_TERM_XSIZE FRAC_Y = SCREEN_Y / GPVAL_TERM_YSIZE =errors =error state The read-only variable GPVAL_ERRNO is set to a non-zero value if any gnuplot command terminates early due to an error. The most recent error message is stored in the string variable GPVAL_ERRMSG. Both GPVAL_ERRNO and GPVAL_ERRMSG can be cleared using the command `reset errors`. Interactive terminals with `mouse` functionality maintain read-only variables with the prefix "MOUSE_". See `mouse variables` for details. The `fit` mechanism uses several variables with names that begin "FIT_". It is safest to avoid using such names. "FIT_LIMIT", however, is one that you may wish to redefine. Under `set fit errorvariables`, the error for each fitted parameter will be stored in a variable named like the parameter, but with "_err" appended. See the documentation on `fit` for details. See `user-defined variables`, `reset errors`, `mouse variables`, and `fit`. 3 User-defined variables and functions ?expressions user-defined ?user-defined variables ?user-defined ?variables New user-defined variables and functions of one through twelve variables may be declared and used anywhere, including on the `plot` command itself. User-defined function syntax: ( {,} ... {,} ) = where is defined in terms of through . User-defined variable syntax: = Examples: w = 2 q = floor(tan(pi/2 - 0.1)) f(x) = sin(w*x) sinc(x) = sin(pi*x)/(pi*x) delta(t) = (t == 0) ramp(t) = (t > 0) ? t : 0 min(a,b) = (a < b) ? a : b comb(n,k) = n!/(k!*(n-k)!) len3d(x,y,z) = sqrt(x*x+y*y+z*z) plot f(x) = sin(x*a), a = 0.2, f(x), a = 0.4, f(x) file = "mydata.inp" file(n) = sprintf("run_%d.dat",n) The final two examples illustrate a user-defined string variable and a user-defined string function. =NaN =pi Note that the variables `pi` (3.14159...) and `NaN` (IEEE "Not a Number") are already defined. You can redefine these to something else if you really need to. The original values can be recovered by setting: NaN = GPVAL_NaN pi = GPVAL_pi Other variables may be defined under various gnuplot operations like mousing in interactive terminals or fitting; see `gnuplot-defined variables` for details. You can check for existence of a given variable V by the exists("V") expression. For example a = 10 if (exists("a")) print "a is defined" if (!exists("b")) print "b is not defined" Valid names are the same as in most programming languages: they must begin with a letter, but subsequent characters may be letters, digits, or "_". Each function definition is made available as a special string-valued variable with the prefix 'GPFUN_'. Example: set label GPFUN_sinc at graph .05,.95 See `show functions`, `functions`, `gnuplot-defined variables`, `macros`, `value`. 2 Fonts ?fonts Gnuplot does not provide any fonts of its own. It relies on external font handling, the details of which unfortunately vary from one terminal type to another. Brief documentation of font mechanisms that apply to more than one terminal type is given here. For information on font use by other individual terminals, see the documentation for that terminal. 3 cairo (pdfcairo, pngcairo, epscairo, wxt terminals) ?fonts cairo =fonts =pdf =png =wxt Sorry, this section is under construction. These terminals find and access fonts using the external fontconfig tool set. Please see the ^ fontconfig user manual. ^ It is usually sufficient in gnuplot to request a font by a generic name and size, letting fontconfig substitute a similar font if necessary. The following will probably all work: set term pdfcairo font "sans,12" set term pdfcairo font "Times,12" set term pdfcairo font "Times-New-Roman,12" 3 gd (png, gif, jpeg terminals) ?gd ?fonts gd =fonts =png =jpeg =gif Font handling for the png, gif, and jpeg terminals is done by the external library libgd. Five basic fonts are provided directly by libgd. These are `tiny` (5x8 pixels), `small` (6x12 pixels), `medium`, (7x13 Bold), `large` (8x16) or `giant` (9x15 pixels). These fonts cannot be scaled or rotated. Use one of these keywords instead of the `font` keyword. E.g. set term png tiny On most systems libgd also provides access to Adobe Type 1 fonts (*.pfa) and TrueType fonts (*.ttf). You must give the name of the font file, not the name of the font inside it, in the form " {,}". is either the full pathname to the font file, or the first part of a filename in one of the directories listed in the GDFONTPATH environmental variable. That is, 'set term png font "Face"' will look for a font file named either /Face.ttf or /Face.pfa. For example, if GDFONTPATH contains `/usr/local/fonts/ttf:/usr/local/fonts/pfa` then the following pairs of commands are equivalent set term png font "arial" set term png font "/usr/local/fonts/ttf/arial.ttf" set term png font "Helvetica" set term png font "/usr/local/fonts/pfa/Helvetica.pfa" To request a default font size at the same time: set term png font "arial,11" Both TrueType and Adobe Type 1 fonts are fully scalable and rotatable. If no specific font is requested in the "set term" command, gnuplot checks the environmental variable GNUPLOT_DEFAULT_GDFONT to see if there is a preferred default font. 3 postscript (also encapsulated postscript *.eps) ?fonts postscript =fonts =postscript =eps PostScript font handling is done by the printer or viewing program. Gnuplot can create valid PostScript or encapsulated PostScript (*.eps) even if no fonts at all are installed on your computer. Gnuplot simply refers to the font by name in the output file, and assumes that the printer or viewing program will know how to find or approximate a font by that name. All PostScript printers or viewers should know about the standard set of Adobe fonts `Times-Roman`, `Helvetica`, `Courier`, and `Symbol`. It is likely that many additional fonts are also available, but the specific set depends on your system or printer configuration. Gnuplot does not know or care about this; the output *.ps or *.eps files that it creates will simply refer to whatever font names you request. Thus set term postscript eps font "Times-Roman,12" will produce output that is suitable for all printers and viewers. On the other hand set term postscript eps font "Garamond-Premier-Pro-Italic" will produce an output file that contains valid PostScript, but since it refers to a specialized font, only some printers or viewers will be able to display the specific font that was requested. Most will substitute a different font. However, it is possible to embed a specific font in the output file so that all printers will be able to use it. This requires that the a suitable font description file is available on your system. Note that some font files require specific licensing if they are to be embedded in this way. See `postscript fontfile` for more detailed description and examples. 2 Glossary ?glossary Throughout this document an attempt has been made to maintain consistency of nomenclature. This cannot be wholly successful because as `gnuplot` has evolved over time, certain command and keyword names have been adopted that preclude such perfection. This section contains explanations of the way some of these terms are used. A "page" or "screen" or "canvas" is the entire area addressable by `gnuplot`. On a desktop it is a full window; on a plotter, it is a single sheet of paper; in svga mode it is the full monitor screen. A screen may contain one or more "plots". A plot is defined by an abscissa and an ordinate, although these need not actually appear on it, as well as the margins and any text written therein. A plot contains one "graph". A graph is defined by an abscissa and an ordinate, although these need not actually appear on it. A graph may contain one or more "lines". A line is a single function or data set. "Line" is also a plotting style. The word will also be used in sense "a line of text". Presumably the context will remove any ambiguity. The lines on a graph may have individual names. These may be listed together with a sample of the plotting style used to represent them in the "key", sometimes also called the "legend". The word "title" occurs with multiple meanings in `gnuplot`. In this document, it will always be preceded by the adjective "plot", "line", or "key" to differentiate among them. A 2D graph may have up to four labelled `axes`. The names of the four axes are "x" for the axis along the bottom border of the plot, "y" for the axis along the left border, "x2" for the top border, and "y2" for the right border. See `axes`. A 3D graph may have up to three labelled `axes` -- "x", "y" and "z". It is not possible to say where on the graph any particular axis will fall because you can change the direction from which the graph is seen with `set view`. When discussing data files, the term "record" will be resurrected and used to denote a single line of text in the file, that is, the characters between newline or end-of-record characters. A "point" is the datum extracted from a single record. A "datablock" is a set of points from consecutive records, delimited by blank records. A line, when referred to in the context of a data file, is a subset of a datablock. 2 linetypes, colors, and styles ?linetypes ?colors Each gnuplot terminal type provides a set of distinct "linetypes". These may differ in color, in thickness, in dot/dash pattern, or in some combination of color and dot/dash. The default linetypes for a particular terminal can be previewed by issuing the `test` command after setting the terminal type. The pre-defined colors and dot/dash patterns are not guaranteed to be consistent for all terminal types, but all terminals use the special linetype -1 to mean a solid line in the primary foreground color (normally black). Most terminals also recognize the special linetype "bgnd" to mean a solid line in the background color. You can redefine the default linetype properties either interactively or via an initialization file. This allows you to customize the colors and other properties of the lines used by all gnuplot plotting commands. See `set linetype`. By default, successive functions or datafiles plotted by a single command will be assigned successive linetypes. You can override this default sequence by specifying a particular linetype for any function, datafile, or plot element. Examples: plot "foo", "bar" # plot two files using linetypes 1, 2 plot sin(x) linetype 4 # terminal-specific linetype color 4 plot sin(x) lt -1 # black =colors For many terminal types it is also possible to assign user-defined colors using explicit rgb (red, green, blue) values, named colors, or color values that refer to the current pm3d palette. Examples: plot sin(x) lt rgb "violet" # one of gnuplot's named colors plot sin(x) lt rgb "#FF00FF" # explicit RGB triple in hexadecimal plot sin(x) lt palette cb -45 # whatever color corresponds to -45 # in the current cbrange of the palette plot sin(x) lt palette frac 0.3 # fractional value along the palette See `show colornames`, `set palette`, `cbrange`. For terminals that support dot/dash patterns, each default linetype has both a dot-dash pattern and a default color. Gnuplot does not currently provide a mechanism for changing the dot-dash pattern, so if you want both a particular dash pattern and a particular color you must first choose a linetype that has the required dash pattern, then override the default color using the keyword `linecolor`, abbreviated `lc`. For example, the postscript terminal provides a dashed blue line as linetype 3. The plot commands below use this same dash pattern for three plots, one in blue (the default), another in red (the default for linetype 1), and a third in gold. Example: set term postscript dashed color plot 'foo' lt 3, 'baz' lt 3 linecolor 1, 'bar' lt 3 lc rgb 'gold' 3 colorspec ?colorspec ?rgbcolor =colors ?lc ?linecolor ?tc ?textcolor Many commands allow you to specify a linetype with an explicit color. Terminal-independent color choice is only possible for terminals that support RGB color or pm3d palettes. Syntax: ... {linecolor | lc} { | } ... {textcolor | tc} { | {linetype | lt} } where has one of the following forms: rgbcolor "colorname" rgbcolor "#RRGGBB" rgbcolor variable # color is read from input file palette frac # runs from 0 to 1 palette cb # lies within cbrange palette z variable # color index is read from input file The "" is the linetype number the color of which is used, see `test`. "colorname" refers to one of the color names built in to gnuplot. For a list of the available names, see `show colornames`. "#RRGGBB" is a hexadecimal constant preceded by the "#" symbol. The RRGGBB represents the red, green, and blue components of the color, each on a scale from 0 - 255. For example, magenta = full-scale red + full-scale blue would be represented by #FF00FF, which is the hexadecimal representation of (255 << 16) + (0 << 8) + (255). The color palette is a linear gradient of colors that smoothly maps a single numerical value onto a particular color. Two such mappings are always in effect. `palette frac` maps a fractional value between 0 and 1 onto the full range of the color palette. `palette cb` maps the range of the color axis onto the same palette. See `set cbrange`. See also `set colorbox`. You can use either of these to select a constant color from the current palette. "palette z" maps the z value of each plot segment or plot element into the cbrange mapping of the palette. This allows smoothly-varying color along a 3d line or surface. It also allows coloring 2D plots by palette values read from an extra column of data (not all 2D plot styles allow an extra column). 4 background color ?background ?bgnd Most terminals now allow you to set an explicit background color for the plot. The special linetype `bgnd` will draw in this color, and `bgnd` is also recognized as a color. Examples: # This will erase a section of the canvas by writing over it in the # background color set term wxt background rgb "gray75" set object 1 rectangle from x0,y0 to x1,y1 fillstyle solid fillcolor bgnd # This will draw an "invisible" line along the x axis plot 0 lt bgnd 4 linecolor variable ?linecolor variable ?lc variable ?textcolor variable ?tc variable `lc variable` tells the program to use the value read from one column of the input data as a linetype index, and use the color belonging to that linetype. This requires a corresponding additional column in the `using` specifier. Text colors can be set similarly using `tc variable`. Examples: # Use the third column of data to assign colors to individual points plot 'data' using 1:2:3 with points lc variable # A single data file may contain multiple sets of data, separated by two # blank lines. Each data set is assigned as index value (see `index`) # that can be retrieved via the `using` specifier `column(-2)`. # See `pseudocolumns`. This example uses to value in column -2 to # draw each data set in a different line color. plot 'data' using 1:2:(column(-2)) with lines lc variable 4 rgbcolor variable ?rgbcolor variable ?lc rgbcolor variable ?tc rgbcolor variable You can assign a separate color for each data point, line segment, or label in your plot. `lc rgbcolor variable` tells the program to read RGB color information for each line in the data file. This requires a corresponding additional column in the `using` specifier. The extra column is interpreted as a 24-bit packed RGB triple. If the value is provided directly in the data file it is easiest to give it as a hexidecimal value (see `rgbcolor`). Alternatively, the `using` specifier can contain an expression that evaluates to a 24-bit RGB color as in the example below. Text colors are similarly set using `tc rgbcolor variable`. Example: # Place colored points in 3D at the x,y,z coordinates corresponding to # their red, green, and blue components rgb(r,g,b) = 65536 * int(r) + 256 * int(g) + int(b) splot "data" using 1:2:3:(rgb($1,$2,$3)) with points lc rgb variable 3 linestyles vs linetypes ? linestyles vs linetypes Lines can have additional properties such as linewidth. You can associate these various properties, as well as equivalent properties for point symbols, into user-defined "linestyles" using the command `set style line`. Once you have defined a linestyle, you can use it in a plot command to control the appearance of one or more plot elements. Whereas `linetypes` are permanent (they last until you explicitly redefine them), `linestyles` are temporary. They only last until the next reset of the graphics state. Examples: # define a new line style with terminal-independent color cyan, # linewidth 3, and associated point type 6 (a circle with a dot in it). set style line 5 lt rgb "cyan" lw 3 pt 6 plot sin(x) with linespoints ls 5 # user-defined line style 5 2 mouse input ?mouse input Many terminals allow interaction with the current plot using the mouse. Some also support the definition of hotkeys to activate pre-defined functions by hitting a single key while the mouse focus is in the active plot window. It is even possible to combine mouse input with `batch` command scripts, by invoking the command `pause mouse` and then using the mouse variables returned by mouse clicking as parameters for subsequent scripted actions. See `bind` and `mouse variables`. See also the command `set mouse`. 3 bind ?commands bind ?hotkey ?hotkeys ?bind Syntax: bind {allwindows} [] [""] bind "" reset bind The `bind` allows defining or redefining a hotkey, i.e. a sequence of gnuplot commands which will be executed when a certain key or key sequence is pressed while the driver's window has the input focus. Note that `bind` is only available if gnuplot was compiled with `mouse` support and it is used by all mouse-capable terminals. A user-specified binding supersedes any builtin bindings, except that and 'q' cannot normally be rebound. For an exception, see `bind space`. Only mouse button 1 can be bound, and only for 2D plots. You get the list of all hotkeys by typing `show bind` or `bind` or by typing the hotkey 'h' in the graph window. Key bindings are restored to their default state by `reset bind`. Note that multikey-bindings with modifiers must be given in quotes. Normally hotkeys are only recognized when the currently active plot window has focus. `bind allwindows ...` (short form: `bind all ...`) causes the binding for to apply to all gnuplot plot windows, active or not. In this case gnuplot variable MOUSE_KEY_WINDOW is set to the ID of the originating window, and may be used by the bound command. Examples: - set bindings: bind a "replot" bind "ctrl-a" "plot x*x" bind "ctrl-alt-a" 'print "great"' bind Home "set view 60,30; replot" bind all Home 'print "This is window ",MOUSE_KEY_WINDOW' - show bindings: bind "ctrl-a" # shows the binding for ctrl-a bind # shows all bindings show bind # show all bindings - remove bindings: bind "ctrl-alt-a" "" # removes binding for ctrl-alt-a (note that builtins cannot be removed) reset bind # installs default (builtin) bindings bind! # deprecated form of "reset bind" - bind a key to toggle something: v=0 bind "ctrl-r" "v=v+1;if(v%2)set term x11 noraise; else set term x11 raise" Modifiers (ctrl / alt) are case insensitive, keys not: ctrl-alt-a == CtRl-alT-a ctrl-alt-a != ctrl-alt-A List of modifiers (alt == meta): ctrl, alt List of supported special keys: "BackSpace", "Tab", "Linefeed", "Clear", "Return", "Pause", "Scroll_Lock", "Sys_Req", "Escape", "Delete", "Home", "Left", "Up", "Right", "Down", "PageUp", "PageDown", "End", "Begin", "KP_Space", "KP_Tab", "KP_Enter", "KP_F1", "KP_F2", "KP_F3", "KP_F4", "KP_Home", "KP_Left", "KP_Up", "KP_Right", "KP_Down", "KP_PageUp", "KP_PageDown", "KP_End", "KP_Begin", "KP_Insert", "KP_Delete", "KP_Equal", "KP_Multiply", "KP_Add", "KP_Separator", "KP_Subtract", "KP_Decimal", "KP_Divide", "KP_1" - "KP_9", "F1" - "F12" The following are window events rather than actual keys "Button1" "Close" See also help for `mouse`. 4 bind space ?commands bind space ?bind space If gnuplot was built with configuration option --enable-raise-console, then typing in the plot window raises gnuplot's command window. This hotkey can be changed to ctrl-space by starting gnuplot as 'gnuplot -ctrlq', or by setting the XResource 'gnuplot*ctrlq'. See `x11 command-line-options`. 3 Mouse variables ?mouse variables When `mousing` is active, clicking in the active window will set several user variables that can be accessed from the gnuplot command line. The coordinates of the mouse at the time of the click are stored in MOUSE_X MOUSE_Y MOUSE_X2 and MOUSE_Y2. The mouse button clicked, and any meta-keys active at that time, are stored in MOUSE_BUTTON MOUSE_SHIFT MOUSE_ALT and MOUSE_CTRL. These variables are set to undefined at the start of every plot, and only become defined in the event of a mouse click in the active plot window. To determine from a script if the mouse has been clicked in the active plot window, it is sufficient to test for any one of these variables being defined. plot 'something' pause mouse if (defined(MOUSE_BUTTON)) call 'something_else'; \ else print "No mouse click." It is also possible to track keystrokes in the plot window using the mousing code. plot 'something' pause mouse keypress print "Keystroke ", MOUSE_KEY, " at ", MOUSE_X, " ", MOUSE_Y When `pause mouse keypress` is terminated by a keypress, then MOUSE_KEY will contain the ascii character value of the key that was pressed. MOUSE_CHAR will contain the character itself as a string variable. If the pause command is terminated abnormally (e.g. by ctrl-C or by externally closing the plot window) then MOUSE_KEY will equal -1. Note that after a zoom by mouse, you can read the new ranges as GPVAL_X_MIN, GPVAL_X_MAX, GPVAL_Y_MIN, and GPVAL_Y_MAX, see `gnuplot-defined variables`. 2 Plotting ?plotting There are three `gnuplot` commands which actually create a plot: `plot`, `splot` and `replot`. `plot` generates 2D plots, `splot` generates 3D plots (actually 2D projections, of course), and `replot` appends its arguments to the previous `plot` or `splot` and executes the modified command. Much of the general information about plotting can be found in the discussion of `plot`; information specific to 3D can be found in the `splot` section. `plot` operates in either rectangular or polar coordinates -- see `set polar` for details of the latter. `splot` operates only in rectangular coordinates, but the `set mapping` command allows for a few other coordinate systems to be treated. In addition, the `using` option allows both `plot` and `splot` to treat almost any coordinate system you'd care to define. =axes `plot` also lets you use each of the four borders -- x (bottom), x2 (top), y (left) and y2 (right) -- as an independent axis. The `axes` option lets you choose which pair of axes a given function or data set is plotted against. A full complement of `set` commands exists to give you complete control over the scales and labelling of each axis. Some commands have the name of an axis built into their names, such as `set xlabel`. Other commands have one or more axis names as options, such as `set logscale xy`. Commands and options controlling the z axis have no effect on 2D graphs. `splot` can plot surfaces and contours in addition to points and/or lines. See `set isosamples` for information about defining the grid for a 3D function. See `splot datafile` for information about the requisite file structure for 3D data values, `set contour` and `set cntrparam` for information about contours. In `splot`, control over the scales and labels of the axes are the same as with `plot`, except that commands and options controlling the x2 and y2 axes have no effect whereas of course those controlling the z axis do take effect. 2 Start-up (initialization) ?startup ?start ?start-up ?initialization ?.gnuplot When gnuplot is run, it first looks for a system-wide initialization file named `gnuplotrc`. The location of this file is determined when the program is built and is reported by `show loadpath`. The program then looks in the user's HOME directory for a file called `.gnuplot` on Unix-like systems or `GNUPLOT.INI` on other systems. (Windows and OS/2 will look for it in the directory named in the environment variable `GNUPLOT`; Windows will use `USERPROFILE` if GNUPLOT is not defined). Note: The program can be configured to look first in the current directory, but this is not recommended because it is bad security practice. 2 String constants and string variables ?strings ?string variables In addition to string constants, most gnuplot commands also accept a string variable, a string expression, or a function that returns a string. For example, the following four methods of creating a plot all result in the same plot title: four = "4" graph4 = "Title for plot #4" graph(n) = sprintf("Title for plot #%d",n) plot 'data.4' title "Title for plot #4" plot 'data.4' title graph4 plot 'data.4' title "Title for plot #".four plot 'data.4' title graph(4) Since integers are promoted to strings when operated on by the string concatenation operator, the following method also works: N = 4 plot 'data.'.N title "Title for plot #".N In general, elements on the command line will only be evaluated as possible string variables if they are not otherwise recognizable as part of the normal gnuplot syntax. So the following sequence of commands is legal, although probably should be avoided so as not to cause confusion: plot = "my_datafile.dat" title = "My Title" plot plot title title There are three binary operators that require string operands: the string concatenation operator ".", the string equality operator "eq" and the string inequality operator "ne". The following example will print TRUE. if ("A"."B" eq "AB") print "TRUE" See also the two string formatting functions `gprintf` and `sprintf`. =substring Substrings can be specified by appending a range specifier to any string, string variable, or string-valued function. The range specifier has the form [begin:end], where begin is the index of the first character of the substring and end is the index of the last character of the substring. The first character has index 1. The begin or end fields may be empty, or contain '*', to indicate the true start or end of the original string. E.g. str[:] and str[*:*] both describe the full string str. 2 Substitution and Command line macros ?substitution When a command line to gnuplot is first read, i.e. before it is interpreted or executed, two forms of lexical substitution are performed. These are triggered by the presence of text in backquotes (ascii character 96) or preceded by @ (ascii character 64). 3 Substitution of system commands in backquotes ?substitution backquotes ?backquotes ?shell commands Command-line substitution is specified by a system command enclosed in backquotes. This command is spawned and the output it produces replaces the backquoted text on the command line. Some implementations also support pipes; see `plot datafile special-filenames`. Command-line substitution can be used anywhere on the `gnuplot` command line, except inside strings delimited by single quotes. Example: This will run the program `leastsq` and replace `leastsq` (including backquotes) on the command line with its output: f(x) = `leastsq` or, in VMS f(x) = `run leastsq` These will generate labels with the current time and userid: set label "generated on `date +%Y-%m-%d` by `whoami`" at 1,1 set timestamp "generated on %Y-%m-%d by `whoami`" 3 Substitution of string variables as macros ?substitution macros ?macros =exists Substitution of command line macros is disabled by default, but may be enabled using the `set macros` command. If macro substitution is enabled, the character @ is used to trigger substitution of the current value of a string variable into the command line. The text in the string variable may contain any number of lexical elements. This allows string variables to be used as command line macros. Only string constants may be expanded using this mechanism, not string-valued expressions. For example: set macros style1 = "lines lt 4 lw 2" style2 = "points lt 3 pt 5 ps 2" range1 = "using 1:3" range2 = "using 1:5" plot "foo" @range1 with @style1, "bar" @range2 with @style2 The line containing @ symbols is expanded on input, so that by the time it is executed the effect is identical to having typed in full plot "foo" using 1:3 with lines lt 4 lw 2, \ "bar" using 1:5 with points lt 3 pt 5 ps 2 The function exists() may be useful in connection with macro evaluation. The following example checks that C can safely be expanded as the name of a user-defined variable: C = "pi" if (exists(C)) print C," = ", @C Macro expansion does not occur inside either single or double quotes. However macro expansion does occur inside backquotes. Macro expansion is handled as the very first thing the interpreter does when looking at a new line of commands and is only done once. Therefore, code like the following will execute correctly: A = "c=1" @A but this line will not, since the macro is defined on the same line and will not be expanded in time A = "c=1"; @A # will not expand to c=1 For execution of complete commands the `evaluate` command may also be handy. 3 String variables, macros, and command line substitution ?mixing_macros_backquotes ?substitution mixing_macros_backquotes The interaction of string variables, backquotes and macro substitution is somewhat complicated. Backquotes do not block macro substitution, so filename = "mydata.inp" lines = ` wc --lines @filename | sed "s/ .*//" ` results in the number of lines in mydata.inp being stored in the integer variable lines. And double quotes do not block backquote substitution, so mycomputer = "`uname -n`" results in the string returned by the system command `uname -n` being stored in the string variable mycomputer. However, macro substitution is not performed inside double quotes, so you cannot define a system command as a macro and then use both macro and backquote substitution at the same time. machine_id = "uname -n" mycomputer = "`@machine_id`" # doesn't work!! This fails because the double quotes prevent @machine_id from being interpreted as a macro. To store a system command as a macro and execute it later you must instead include the backquotes as part of the macro itself. This is accomplished by defining the macro as shown below. Notice that the sprintf format nests all three types of quotes. machine_id = sprintf('"`uname -n`"') mycomputer = @machine_id 2 Syntax ?syntax ?specify ?punctuation Options and any accompanying parameters are separated by spaces whereas lists and coordinates are separated by commas. Ranges are separated by colons and enclosed in brackets [], text and file names are enclosed in quotes, and a few miscellaneous things are enclosed in parentheses. Commas are used to separate coordinates on the `set` commands `arrow`, `key`, and `label`; the list of variables being fitted (the list after the `via` keyword on the `fit` command); lists of discrete contours or the loop parameters which specify them on the `set cntrparam` command; the arguments of the `set` commands `dgrid3d`, `dummy`, `isosamples`, `offsets`, `origin`, `samples`, `size`, `time`, and `view`; lists of tics or the loop parameters which specify them; the offsets for titles and axis labels; parametric functions to be used to calculate the x, y, and z coordinates on the `plot`, `replot` and `splot` commands; and the complete sets of keywords specifying individual plots (data sets or functions) on the `plot`, `replot` and `splot` commands. Parentheses are used to delimit sets of explicit tics (as opposed to loop parameters) and to indicate computations in the `using` filter of the `fit`, `plot`, `replot` and `splot` commands. (Parentheses and commas are also used as usual in function notation.) Square brackets are used to delimit ranges given in `set`, `plot` or `splot` commands. Colons are used to separate extrema in `range` specifications (whether they are given on `set`, `plot` or `splot` commands) and to separate entries in the `using` filter of the `plot`, `replot`, `splot` and `fit` commands. Semicolons are used to separate commands given on a single command line. Curly braces are used in the syntax for enhanced text mode and to delimit blocks in if/then/else statements. They are also used to denote complex numbers: {3,2} = 3 + 2i. The EEPIC, Imagen, Uniplex, LaTeX, and TPIC drivers allow a newline to be specified by \\ in a single-quoted string or \\\\ in a double-quoted string. 3 Quote Marks ?quotes ?syntax quotes Gnuplot uses three forms of quote marks for delimiting text strings, double-quote (ascii 34), single-quote (ascii 39), and backquote (ascii 96). Filenames may be entered with either single- or double-quotes. In this manual the command examples generally single-quote filenames and double-quote other string tokens for clarity. String constants and text strings used for labels, titles, or other plot elements may be enclosed in either single quotes or double quotes. Further processing of the quoted text depends on the choice of quote marks. Backslash processing of special characters like \n (newline) and \345 (octal character code) is performed for double-quoted strings. In single-quoted strings, backslashes are just ordinary characters. To get a single-quote (ascii 39) in a single-quoted string, it has to be doubled. Thus the strings "d\" s' b\\" and 'd" s'' b\' are completely equivalent. Text justification is the same for each line of a multi-line string. Thus the center-justified string "This is the first line of text.\nThis is the second line." will produce This is the first line of text. This is the second line. but 'This is the first line of text.\nThis is the second line.' will produce This is the first line of text.\nThis is the second line. Enhanced text processing is performed for both double-quoted text and single-quoted text, but only by terminals supporting this mode. See `enhanced text`. Back-quotes are used to enclose system commands for substitution into the command line. See `substitution`. 2 Time/Date data ?time/date `gnuplot` supports the use of time and/or date information as input data. This feature is activated by the commands `set xdata time`, `set ydata time`, etc. Internally all times and dates are converted to the number of seconds from the year 2000. The command `set timefmt` defines the format for all inputs: data files, ranges, tics, label positions---in short, anything that accepts a data value must receive it in this format. Since only one input format can be in force at a given time, all time/date quantities being input at the same time must be presented in the same format. Thus if both x and y data in a file are time/date, they must be in the same format. The conversion to and from seconds assumes Universal Time (which is the same as Greenwich Standard Time). There is no provision for changing the time zone or for daylight savings. If all your data refer to the same time zone (and are all either daylight or standard) you don't need to worry about these things. But if the absolute time is crucial for your application, you'll need to convert to UT yourself. Commands like `show xrange` will re-interpret the integer according to `timefmt`. If you change `timefmt`, and then `show` the quantity again, it will be displayed in the new `timefmt`. For that matter, if you give the deactivation command (like `set xdata`), the quantity will be shown in its numerical form. The commands `set format` or `set tics format` define the format that will be used for tic labels, whether or not the specified axis is time/date. If time/date information is to be plotted from a file, the `using` option _must_ be used on the `plot` or `splot` command. These commands simply use white space to separate columns, but white space may be embedded within the time/date string. If you use tabs as a separator, some trial-and-error may be necessary to discover how your system treats them. The `time` function can be used to get the current system time. This value can be converted to a date string with the `strftime` function, or it can be used in conjunction with `timecolumn` to generate relative time/date plots. The type of the argument determines what is returned. If the argument is an integer, `time` returns the current time as an integer, in seconds from 1 Jan 2000. If the argument is real (or complex), the result is real as well. The precision of the fractional (sub-second) part depends on your operating system. If the argument is a string, it is assumed to be a format string, and it is passed to `strftime` to provide a formatted time/date string. The following example demonstrates time/date plotting. Suppose the file "data" contains records like 03/21/95 10:00 6.02e23 This file can be plotted by set xdata time set timefmt "%m/%d/%y" set xrange ["03/21/95":"03/22/95"] set format x "%m/%d" set timefmt "%m/%d/%y %H:%M" plot "data" using 1:3 which will produce xtic labels that look like "03/21". See `time_specifiers`. 1 plotting styles ?plotting styles There are many plotting styles available in gnuplot. They are listed alphabetically below. The commands `set style data` and `set style function` change the default plotting style for subsequent `plot` and `splot` commands. You also have the option to specify the plot style explicitly as part of the `plot` or `splot` command. If you want to mix plot styles within a single plot, you must specify the plot style for each component. Example: plot 'data' with boxes, sin(x) with lines Each plot style has its own expected set of data entries in a data file. For example by default the `lines` style expects either a single column of y values (with implicit x ordering) or a pair of columns with x in the first and y in the second. For more information on how to fine-tune how columns in a file are interpreted as plot data, see `using`. 2 boxerrorbars ?commands set style boxerrorbars ?set style boxerrorbars ?plotting styles boxerrorbars ?style boxerrorbars ?boxerrorbars The `boxerrorbars` style is only relevant to 2D data plotting. It is a combination of the `boxes` and `yerrorbars` styles. It uses 3, 4, or 5 columns of data: 3 columns: x y ydelta 4 columns: x y ydelta xdelta # boxwidth != -2 4 columns: x y ylow yhigh # boxwidth == -2 5 columns: x y ylow yhigh xdelta Ffigure_boxerrorbars The boxwidth will come from the fourth column if the y errors are given as "ydelta" and the boxwidth was not previously set to -2.0 (`set boxwidth -2.0`) or from the fifth column if the y errors are in the form of "ylow yhigh". The special case `boxwidth = -2.0` is for four-column data with y errors in the form "ylow yhigh". In this case the boxwidth will be calculated so that each box touches the adjacent boxes. The width will also be calculated in cases where three-column data are used. An additional (4th, 5th or 6th) input column may be used to provide variable (per-datapoint) color information (see `linecolor` and `rgbcolor variable`). The error bar will be drawn in the same color as the border of the box. The box height is determined from the y error in the same way as it is for the `yerrorbars` style---either from y-ydelta to y+ydelta or from ylow to yhigh, depending on how many data columns are provided. See also ^ errorbar demo. ^ 2 boxes ?commands set style boxes ?set style boxes ?plotting styles boxes ?style boxes ?boxes Ffigure_boxes The `boxes` style is only relevant to 2D plotting. It draws a box centered about the given x coordinate that extends from the x axis (not from the graph border) to the given y coordinate. It uses 2 or 3 columns of basic data. Additional input columns may be used to provide information such as variable line or fill color (see `rgbcolor variable`). 2 columns: x y 3 columns: x y x_width The width of the box is obtained in one of three ways. If the input data has a third column, this will be used to set the width of the box. If not, if a width has been set using the `set boxwidth` command, this will be used. If neither of these is available, the width of each box will be calculated automatically so that it touches the adjacent boxes. The interior of the boxes is drawn according to the current fillstyle. See `set style fill` for details. Alternatively a new fillstyle may be specified in the plot command. For fillstyle `empty` the box is not filled. For fillstyle `solid` the box is filled with a solid rectangle of the current drawing color. There is an optional parameter that controls the fill density; it runs from 0 (background color) to 1 (current drawing color). For fillstyle `pattern` the box is filled in the current drawing color with a pattern, if supported by the terminal driver. Examples: To plot a data file with solid filled boxes with a small vertical space separating them (bargraph): set boxwidth 0.9 relative set style fill solid 1.0 plot 'file.dat' with boxes To plot a sine and a cosine curve in pattern-filled boxes style: set style fill pattern plot sin(x) with boxes, cos(x) with boxes The sin plot will use pattern 0; the cos plot will use pattern 1. Any additional plots would cycle through the patterns supported by the terminal driver. To specify explicit fillstyles for each dataset: plot 'file1' with boxes fs solid 0.25, \ 'file2' with boxes fs solid 0.50, \ 'file3' with boxes fs solid 0.75, \ 'file4' with boxes fill pattern 1, \ 'file5' with boxes fill empty 2 boxplot ?plotting styles boxplot ?style boxplot ?boxplot Ffigure_boxplot Boxplots are a common way to represent a statistical distribution of values. Quartile boundaries are determined such that 1/4 of the points have a value equal or less than the first quartile boundary, 1/2 of the points have a value equal or less than the second quartile (median) value, etc. A box is drawn around the region between the first and third quartiles, with a horizontal line at the median value. Whiskers extend from the box to user-specified limits. Points that lie outside these limits are drawn individually. Examples # Place a boxplot at x coordinate 1.0 representing the y values in column 5 plot 'data' using (1.0):5 # Same plot but suppress outliers and force the width of the boxplot to 0.3 set style boxplot nooutliers plot 'data' using (1.0):5:(0.3) By default only one boxplot is produced that represents all y values from the second column of the using specification. However, an additional (fourth) colunm can be added to the specification. If present, the values of that column will be interpreted as the discrete levels of a factor variable. As many boxplots will be drawn as there are levels in the factor variable. The separation between these boxplots is 1.0 by default, but it can be changed by `set style boxplot separation`. By default, the value of the factor variable is shown as a tic label below (or above) each boxplot. Example # Suppose that column 2 of 'data' contains either "control" or "treatment" # The following example produces two boxplots, one for each level of the # factor plot 'data' using (1.0):5:(0):2 The default width of the box can be set via `set boxwidth ` or may be specified as an optional 3rd column in the `using` clause of the plot command. The first and third columns (x coordinate and width) are normally provided as constants rather than as data columns. By default the whiskers extend from the ends of the box to the most distant point whose y value lies within 1.5 times the interquartile range. By default outliers are drawn as circles (point type 7). The width of the bars at the end of the whiskers may be controlled using `set bars`. These default properties may be changed using the `set style boxplot` command. See `set style boxplot`, `bars`, `boxwidth`, `fillstyle`, `candlesticks`. 2 boxxyerrorbars ?commands set style boxxyerrorbars ?set style boxxyerrorbars ?plotting styles boxxyerrorbars ?style boxxyerrorbars ?boxxyerrorbars Ffigure_boxxyerrorbars The `boxxyerrorbars` style is only relevant to 2D data plotting. It is similar to the `xyerrorbars` style except that it draws rectangular areas rather than simple crosses. It uses either 4 or 6 basic columns of input data. Additional input columns may be used to provide information such as variable line or fill color (see `rgbcolor variable`). 4 columns: x y xdelta ydelta 6 columns: x y xlow xhigh ylow yhigh The box width and height are determined from the x and y errors in the same way as they are for the `xyerrorbars` style---either from xlow to xhigh and from ylow to yhigh, or from x-xdelta to x+xdelta and from y-ydelta to y+ydelta, depending on how many data columns are provided. An additional (5th or 7th) input column may be used to provide variable (per-datapoint) color information (see `linecolor` and `rgbcolor variable`). The interior of the boxes is drawn according to the current fillstyle. See `set style fill` and `boxes` for details. Alternatively a new fillstyle may be specified in the plot command. 2 candlesticks ?commands set style candlesticks ?set style candlesticks ?plotting styles candlesticks ?style candlesticks ?candlesticks Ffigure_candlesticks The `candlesticks` style can be used for 2D data plotting of financial data or for generating box-and-whisker plots of statistical data. The symbol is a rectangular box, centered horizontally at the x coordinate and limited vertically by the opening and closing prices. A vertical line segment at the x coordinate extends up from the top of the rectangle to the high price and another down to the low. The vertical line will be unchanged if the low and high prices are interchanged. Five columns of basic data are required: financial data: date open low high close whisker plot: x box_min whisker_min whisker_high box_high The width of the rectangle can be controlled by the `set boxwidth` command. For backwards compatibility with earlier gnuplot versions, when the boxwidth parameter has not been set then the width of the candlestick rectangle is controlled by `set bars `. Alternatively, an explicit width for each box-and-whiskers grouping may be specified in an optional 6th column of data. The width must be given in the same units as the x coordinate. An additional (6th, or 7th if the 6th column is used for width data) input column may be used to provide variable (per-datapoint) color information (see `linecolor` and `rgbcolor variable`). By default the vertical line segments have no crossbars at the top and bottom. If you want crossbars, which are typically used for box-and-whisker plots, then add the keyword `whiskerbars` to the plot command. By default these whiskerbars extend the full horizontal width of the candlestick, but you can modify this by specifying a fraction of the full width. The usual convention for financial data is that the rectangle is empty if (open < close) and solid fill if (close < open). This is the behavior you will get if the current fillstyle is set to "empty". See `fillstyle`. If you set the fillstyle to solid or pattern, then this will be used for all boxes independent of open and close values. See also `set bars` and `financebars`. See also the ^ candlestick ^ and ^ finance ^ demos. Note: To place additional symbols, such as the median value, on a box-and-whisker plot requires additional plot commands as in this example: # Data columns:X Min 1stQuartile Median 3rdQuartile Max set bars 4.0 set style fill empty plot 'stat.dat' using 1:3:2:6:5 with candlesticks title 'Quartiles', \ '' using 1:4:4:4:4 with candlesticks lt -1 notitle # Plot with crossbars on the whiskers, crossbars are 50% of full width plot 'stat.dat' using 1:3:2:6:5 with candlesticks whiskerbars 0.5 See `set boxwidth`, `set bars`, `set style fill`, and `boxplot`. 2 circles ?commands set style circles ?set style circles ?plotting styles circles ?style circles ?circles Ffigure_circles The `circles` style plots a circle with an explicit radius at each data point. If three columns of data are present, they are interpreted as x, y, radius. The radius is always interpreted in the units of the plot's horizontal axis (x or x2). The scale on y and the aspect ratio of the plot are both ignored. If only two columns are present, the radius is taken from `set style circle`. In this case the radius may be given in graph or screen coordinates. By default a full circle will be drawn. It is possible to plot arc segments instead of full circles by specifying a start and end angle in the 4th and 5th columns. An optional 4th or 6th column can specify per-circle color. The start and end angles of the circle segments must be specified in degrees. Examples: # draws circles whose area is proportional to the value in column 3 set style fill transparent solid 0.2 noborder plot 'data' using 1:2:(sqrt($3)) with circles, \ 'data' using 1:2 with linespoints # draws Pac-men instead of circles plot 'data' using 1:2:(10):(40):(320) with circles # draw a pie chart with inline data set xrange [-15:15] set style fill transparent solid 0.9 noborder plot '-' using 1:2:3:4:5:6 with circles lc var 0 0 5 0 30 1 0 0 5 30 70 2 0 0 5 70 120 3 0 0 5 120 230 4 0 0 5 230 360 5 e The result is similar to using a `points` plot with variable size points and pointstyle 7, except that the circles will scale with the x axis range. See also `set object circle` and `fillstyle`. 2 ellipses ?plotting styles ellipses ?style ellipses ?ellipses Ffigure_ellipses The `ellipses` style plots an ellipse at each data point. This style is only relevant for 2D plotting. Each ellipse is described in terms of its center, major and minor diameters, and the angle between its major diameter and the x axis. 2 columns: x y 3 columns: x y major_diam 4 columns: x y major_diam minor_diam 5 columns: x y major_diam minor_diam angle If only two input columns are present, they are taken as the coordinates of the centers, and the ellipses will be drawn with the default extent (see `set style ellipse`). The orientation of the ellipse, which is defined as the angle between the major diameter and the plot's x axis, is taken from the default ellipse style (see `set style ellipse`). If three input columns are provided, the third column is used for both diameters. The orientation angle defaults to zero. If four columns are present, they are interpreted as x, y, major diameter, minor diameter. Note that these are diameters, not radii. An optional 5th column may be used to specify the orientation angle in degrees. The ellipses will also be drawn with their default extent if either of the supplied diameters in the 3-4-5 column form is negative. In all of the above cases, optional variable color data may be given in an additional last (3th, 4th, 5th or 6th) column. See `colorspec` for further information. By default, the major diameter is interpreted in the units of the plot's horizontal axis (x or x2) while the minor diameter in that of the vertical (y or y2). This implies that if the x and y axis scales are not equal, then the major/minor diameter ratio will no longer be correct after rotation. This behavior can be changed with the `units` keyword, however. There are three alternatives: if `units xy` is included in the plot specification, the axes will be scaled as described above. `units xx` ensures that both diameters are interpreted in units of the x axis, while `units yy` means that both diameters are interpreted in units of the y axis. In the latter two cases the ellipses will have the correct aspect ratio, even if the plot is resized. If `units` is omitted, the default setting will be used, which is equivalent to `units xy`. This can be redefined by `set style ellipse`. Example (draws ellipses, cycling through the available line types): plot 'data' using 1:2:3:4:(0):0 with ellipses See also `set object ellipse`, `set style ellipse` and `fillstyle`. 2 dots ?commands set style dots ?set style dots ?plotting styles dots ?style 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 ?commands set style filledcurves ?set style filledcurves ?plotting styles filledcurves ?style filledcurves ?filledcurves Ffigure_filledcurves The `filledcurves` style is only relevant to 2D plotting. Three variants are possible. The first two variants require either a function or two columns of input data, and may be further modified by the options listed below. Syntax: plot ... with filledcurves [option] where the option can be one of the following [closed | {above | below} {x1 | x2 | y1 | y2 | r}[=] | xy=,] The first variant, `closed`, treats the curve itself as a closed polygon. This is the default if there are two columns of input data. The second variant is to fill the area between the curve and a given axis, a horizontal or vertical line, or a point. filledcurves closed ... just filled closed curve, filledcurves x1 ... x1 axis, filledcurves x2 ... x2 axis, etc for y1 and y2 axes, filledcurves y1=0 ... line y=0 (at y1 axis) ie parallel to x1 axis, filledcurves y2=42 ... line y=42 (at y2 axis) ie parallel to x2, etc, filledcurves xy=10,20 ... point 10,20 of x1,y1 axes (arc-like shape). filledcurves above r=1.5 the area of a polar plot outside radius 1.5 The third variant requires three columns of input data: the x coordinate and two y coordinates corresponding to two curves sampled at the same set of x coordinates; the area between the two curves is filled. This is the default if there are three or more columns of input data. 3 columns: x y1 y2 Example of filling the area between two input curves. ^ fill between curves demo. ^ plot 'data' using 1:2:3 with filledcurves The `above` and `below` options apply both to commands of the form ... filledcurves above {x1|x2|y1|y2|r}= and to commands of the form ... using 1:2:3 with filledcurves below In either case the option limits the filled area to one side of the bounding line or curve. Note: Not all terminal types support this plotting mode. Zooming a filled curve drawn from a datafile may produce empty or incorrect areas because gnuplot is clipping points and lines, and not areas. If the values of , , are out of the drawing boundary, then they are moved to the graph boundary. Then the actually filled area in the case of option xy=, will depend on xrange and yrange. 2 financebars ?commands set style financebars ?set style financebars ?plotting styles financebars ?style financebars ?financebars The `financebars` style is only relevant for 2D data plotting of financial data. It requires 1 x coordinate (usually a date) and 4 y values (prices). 5 columns: date open low high close An additional (6th) input column may be used to provide variable (per-record) color information (see `linecolor` and `rgbcolor variable`). Ffigure_financebars The symbol is a vertical line segment, located horizontally at the x coordinate and limited vertically by the high and low prices. A horizontal tic on the left marks the opening price and one on the right marks the closing price. The length of these tics may be changed by `set bars`. The symbol will be unchanged if the high and low prices are interchanged. See `set bars` and `candlesticks`, and also the ^ finance demo. ^ 2 fsteps ?commands set style fsteps ?set style fsteps ?plotting styles fsteps ?style fsteps ?fsteps Ffigure_fsteps The `fsteps` style is only relevant to 2D plotting. It connects consecutive points with two line segments: the first from (x1,y1) to (x1,y2) and the second from (x1,y2) to (x2,y2). The input column requires are the same as for plot styles `lines` and `points`. The difference between `fsteps` and `steps` is that `fsteps` traces first the change in y and then the change in x. `steps` traces first the change in x and then the change in y. See also ^ steps demo. ^ 2 fillsteps ?commands set style fillsteps ?set style fillsteps ?style fillsteps ?fillsteps The `fillsteps` style is exactly like `steps` except that the area between the curve and y=0 is filled in the current fill style. See `steps`. 2 histeps ?commands set style histeps ?set style histeps ?plotting styles histeps ?style histeps ?histeps Ffigure_histeps The `histeps` style is only relevant to 2D plotting. It is intended for plotting histograms. Y-values are assumed to be centered at the x-values; the point at x1 is represented as a horizontal line from ((x0+x1)/2,y1) to ((x1+x2)/2,y1). The lines representing the end points are extended so that the step is centered on at x. Adjacent points are connected by a vertical line at their average x, that is, from ((x1+x2)/2,y1) to ((x1+x2)/2,y2). The input column requires are the same as for plot styles `lines` and `points`. If `autoscale` is in effect, it selects the xrange from the data rather than the steps, so the end points will appear only half as wide as the others. See also ^ steps demo. ^ `histeps` is only a plotting style; `gnuplot` does not have the ability to create bins and determine their population from some data set. 2 histograms ?commands set style histogram ?set style histogram ?style histograms ?plotting styles histograms ?histograms The `histograms` style is only relevant to 2D plotting. It produces a bar chart from a sequence of parallel data columns. Each element of the `plot` command must specify a single input data source (e.g. one column of the input file), possibly with associated tic values or key titles. Four styles of histogram layout are currently supported. set style histogram clustered {gap } set style histogram errorbars {gap } {} set style histogram rowstacked set style histogram columnstacked The default style corresponds to `set style histogram clustered gap 2`. In this style, each set of parallel data values is collected into a group of boxes clustered at the x-axis coordinate corresponding to their sequential position (row #) in the selected datafile columns. Thus if datacolumns are selected, the first cluster is centered about x=1, and contains boxes whose heights are taken from the first entry in the corresponding data columns. This is followed by a gap and then a second cluster of boxes centered about x=2 corresponding to the second entry in the respective data columns, and so on. The default gap width of 2 indicates that the empty space between clusters is equivalent to the width of 2 boxes. All boxes derived from any one column are given the same fill color and/or pattern (see `set style fill`). Each cluster of boxes is derived from a single row of the input data file. It is common in such input files that the first element of each row is a label. Labels from this column may be placed along the x-axis underneath the appropriate cluster of boxes with the `xticlabels` option to `using`. The `errorbars` style is very similar to the `clustered` style, except that it requires additional columns of input for each entry. The first column holds the height (y value) of that box, exactly as for the `clustered` style. 2 columns: y yerr bar extends from y-yerr to y+err 3 columns: y ymin yman bar extends from ymin to ymax The appearance of the error bars is controlled by the current value of `set bars` and by the optional specification. Two styles of stacked histogram are supported, chosen by the command `set style histogram {rowstacked|columnstacked}`. In these styles the data values from the selected columns are collected into stacks of boxes. Positive values stack upwards from y=0; negative values stack downwards. Mixed positive and negative values will produce both an upward stack and a downward stack. The default stacking mode is `rowstacked`. The `rowstacked` style places a box resting on the x-axis for each data value in the first selected column; the first data value results in a box a x=1, the second at x=2, and so on. Boxes corresponding to the second and subsequent data columns are layered on top of these, resulting in a stack of boxes at x=1 representing the first data value from each column, a stack of boxes at x=2 representing the second data value from each column, and so on. All boxes derived from any one column are given the same fill color and/or pattern (see `set style fill`). The `columnstacked` style is similar, except that each stack of boxes is built up from a single data column. Each data value from the first specified column yields a box in the stack at x=1, each data value from the second specified column yields a box in the stack at x=2, and so on. In this style the color of each box is taken from the row number, rather than the column number, of the corresponding data field. Box widths may be modified using the `set boxwidth` command. Box fill styles may be set using the `set style fill` command. Histograms always use the x1 axis, but may use either y1 or y2. If a plot contains both histograms and other plot styles, the non-histogram plot elements may use either the x1 or the x2 axis. Examples: Ffigure_histclust Suppose that the input file contains data values in columns 2, 4, 6, ... and error estimates in columns 3, 5, 7, ... This example plots the values in columns 2 and 4 as a histogram of clustered boxes (the default style). Because we use iteration in the plot command, any number of data columns can be handled in a single command. See `iteration`. set boxwidth 0.9 relative set style data histograms set style histogram cluster set style fill solid 1.0 border lt -1 plot for [COL=2:4:2] 'file.dat' using COL This will produce a plot with clusters of two boxes (vertical bars) centered at each integral value on the x axis. If the first column of the input file contains labels, they may be placed along the x-axis using the variant command plot for [COL=2:4:2] 'file.dat' using COL:xticlabels(1) Ffigure_histerrorbar If the file contains both magnitude and range information for each value, then error bars can be added to the plot. The following commands will add error bars extending from (y-) to (y+), capped by horizontal bar ends drawn the same width as the box itself. The error bars and bar ends are drawn with linewidth 2, using the border linetype from the current fill style. set bars fullwidth set style fill solid 1 border lt -1 set style histogram errorbars gap 2 lw 2 plot for [COL=2:4:2] 'file.dat' using COL:COL+1 To plot the same data as a rowstacked histogram. Just to be different, this example lists the separate columns explicitly rather than using iteration. set style histogram rowstacked plot 'file.dat' using 2, '' using 4:xtic(1) Ffigure_histrows This will produce a plot in which each vertical bar corresponds to one row of data. Each vertical bar contains a stack of two segments, corresponding in height to the values found in columns 2 and 4 of the datafile. Finally, the commands set style histogram columnstacked plot 'file.dat' using 2, '' using 4 Ffigure_histcols will produce two vertical stacks, one for each column of data. The stack at x=1 will contain a box for each entry in column 2 of the datafile. The stack at x=2 will contain a box for each parallel entry in column 4 of the datafile. Because this interchanges gnuplot's usual interpretation of input rows and columns, the specification of key titles and x-axis tic labels must also be modified accordingly. See the comments given below. set style histogram columnstacked plot '' u 5:key(1) # uses first column to generate key titles plot '' u 5 title columnhead # uses first row to generate xtic labels Note that the two examples just given present exactly the same data values, but in different formats. 3 newhistogram ?newhistogram ?histograms newhistogram ?plotting style histograms newhistogram Syntax: newhistogram {""} {lt <linetype>} {fs <fillstyle>} {at <x-coord>} More than one set of histograms can appear in a single plot. In this case you can force a gap between them, and a separate label for each set, by using the `newhistogram` command. For example set style histogram cluster plot newhistogram "Set A", 'a' using 1, '' using 2, '' using 3, \ newhistogram "Set B", 'b' using 1, '' using 2, '' using 3 The labels "Set A" and "Set B" will appear beneath the respective sets of histograms, under the overall x axis label. The newhistogram command can also be used to force histogram coloring to begin with a specific color (linetype). By default colors will continue to increment successively even across histogram boundaries. Here is an example using the same coloring for multiple histograms plot newhistogram "Set A" lt 4, 'a' using 1, '' using 2, '' using 3, \ newhistogram "Set B" lt 4, 'b' using 1, '' using 2, '' using 3 Similarly you can force the next histogram to begin with a specified fillstyle. If the fillstyle is set to `pattern`, then the pattern used for filling will be incremented automatically. Ffigure_newhist The `at <x-coord>` option sets the x coordinate position of the following histogram to <x-coord>. For example set style histogram cluster set style data histogram set style fill solid 1.0 border -1 set xtic 1 offset character 0,0.3 plot newhistogram "Set A", \ 'file.dat' u 1 t 1, '' u 2 t 2, \ newhistogram "Set B" at 8, \ 'file.dat' u 2 t 2, '' u 2 t 2 will position the second histogram to start at x=8. 3 automated iteration over multiple columns ?automated ?histograms automated ?styles histograms automated ?plotting styles histograms automated If you want to create a histogram from many columns of data in a single file, it is very convenient to use the plot iteration feature. See `iteration`. For example, to create stacked histograms of the data in columns 3 through 8 set style histogram columnstacked plot for [i=3:8] "datafile" using i title columnhead 2 image ?commands set style image ?set style image ?plotting styles image ?style image ?image ?rgbimage ?rgbalpha The `image`, `rgbimage`, and `rgbalpha` plotting styles all project a uniformly sampled grid of data values onto a plane in either 2D or 3D. The input data may be an actual bitmapped image, perhaps converted from a standard format such as PNG, or a simple array of numerical values. =heatmap Ffigure_heatmap This figure illustrates generation of a heat map from an array of scalar values. The current palette is used to map each value onto the color assigned to the corresponding pixel. plot '-' matrix with image 5 4 3 1 0 2 2 0 0 1 0 0 0 1 0 0 1 2 4 3 e e Ffigure_rgb3D Each pixel (data point) of the input 2D image will become a rectangle or parallelipiped in the plot. The coordinates of each data point will determine the center of the parallelipiped. That is, an M x N set of data will form an image with M x N pixels. This is different from the pm3d plotting style, where an M x N set of data will form a surface of (M-1) x (N-1) elements. The scan directions for a binary image data grid can be further controlled by additional keywords. See `binary keywords flipx`, `keywords center`, and `keywords rotate`. Ffigure_scaled_image Image data can be scaled to fill a particular rectangle within a 2D plot coordinate system by specifying the x and y extent of each pixel. See `binary keywords dx` and `dy`. To generate the figure at the right, the same input image was placed multiple times, each with a specified dx, dy, and origin. The input PNG image of a building is 50x128 pixels. The tall building was drawn by mapping this using `dx=0.5 dy=1.5`. The short building used a mapping `dx=0.5 dy=0.35`. The `image` style handles input pixels containing a grayscale or color palette value. Thus 2D plots (`plot` command) require 3 columns of data (x,y,value), while 3D plots (`splot` command) require 4 columns of data (x,y,z,value). The `rgbimage` style handles input pixels that are described by three separate values for the red, green, and blue components. Thus 5D data (x,y,r,g,b) is needed for `plot` and 6D data (x,y,z,r,g,b) for `splot`. The individual red, green, and blue components are assumed to lie in the range [0:255]. The `rgbalpha` style handles input pixels that contain alpha channel (transparency) information in addition to the red, green, and blue components. Thus 6D data (x,y,r,g,b,a) is needed for `plot` and 7D data (x,y,z,r,g,b,a) for `splot`. The r, g, b, and alpha components are assumed to lie in the range [0:255]. 3 transparency ?image transparency ?transparency ?alpha channel The `rgbalpha` plotting style assumes that each pixel of input data contains an alpha value in the range [0:255]. A pixel with alpha = 0 is purely transparent and does not alter the underlying contents of the plot. A pixel with alpha = 255 is purely opaque. All terminal types can handle these two extreme cases. A pixel with 0 < alpha < 255 is partially transparent. Only a few terminal types can handle this correctly; other terminals will approximate this by treating alpha as being either 0 or 255. 3 image failsafe ?commands set style image failsafe ?set style image failsafe ?plotting styles image failsafe ?style image failsafe ?image failsafe ?failsafe Some terminal drivers provide code to optimize rendering of image data within a rectangular 2D area. However this code is known to be imperfect. This optimized code may be disabled by using the keyword `failsafe`. E.g. plot 'data' with image failsafe 2 impulses ?commands set style impulses ?set style impulses ?plotting styles impulses ?style impulses ?impulses Ffigure_impulses The `impulses` style displays a vertical line from y=0 to the y value of each point (2D) or from z=0 to the z value of each point (3D). Note that the y or z values may be negative. Data from additional columns can be used to control the color of each impulse. To use this style effectively in 3D plots, it is useful to choose thick lines (linewidth > 1). This approximates a 3D bar chart. 1 column: y 2 columns: x y # line from [x,0] to [x,y] (2D) 3 columns: x y z # line from [x,y,0] to [x,y,z] (3D) 2 labels ?commands set style labels ?set style labels ?plotting styles labels ?style labels ?labels Ffigure_labels The `labels` style reads coordinates and text from a data file and places the text string at the corresponding 2D or 3D position. 3 or 4 input columns of basic data are required. Additional input columns may be used to provide information such as variable font size or text color (see `rgbcolor variable`). 3 columns: x y string # 2D version 4 columns: x y z string # 3D version The font, color, rotation angle and other properties of the printed text may be specified as additional command options (see `set label`). The example below generates a 2D plot with text labels constructed from the city whose name is taken from column 1 of the input file, and whose geographic coordinates are in columns 4 and 5. The font size is calculated from the value in column 3, in this case the population. CityName(String,Size) = sprintf("{/=%d %s}", Scale(Size), String) plot 'cities.dat' using 5:4:(CityName(stringcolumn(1),$3)) with labels If we did not want to adjust the font to a different size for each city, the command would be much simpler: plot 'cities.dat' using 5:4:1 with labels font "Times,8" The `labels` style can also be used in 3D plots. In this case four input column specifiers are required, corresponding to X Y Z and text. splot 'datafile' using 1:2:3:4 with labels See also `datastrings`, `set style data`. 2 lines ?commands set style lines ?set style lines ?plotting styles lines ?style lines ?lines Ffigure_lines The `lines` style connects adjacent points with straight line segments. It may be used in either 2D or 3D plots. The basic form requires 1, 2, or 3 columns of input data. Additional input columns may be used to provide information such as variable line color (see `rgbcolor variable`). 2D form 1 column: y # implicit x from row number 2 columns: x y 3D form 1 column: z # implicit x from row, y from index 3 columns: x y z See also `linetype`, `linewidth`, and `linestyle`. 2 linespoints ?commands set style linespoints ?commands set style lp ?set style linespoints ?plotting styles linespoints ?set style lp ?style linespoints ?style lp ?linespoints ?lp ?pointinterval Ffigure_linespoints The `linespoints` style connects adjacent points with straight line segments and then goes back to draw a small symbol at each point. The command `set pointsize` may be used to change the default size of the points. 1 or 2 columns of basic input data are required in 2D plots; 1 or 3 columns are required if 3D plots. See `style lines`. Additional input columns may be used to provide information such as variable point size or line color. The `pointinterval` (short form `pi`) property of the linetype can be used to control whether or not every point in the plot is given a symbol. For example, 'with lp pi 3' will draw line segments through every data point, but will only place a symbol on every 3rd point. A negative value for `pointinterval` will erase the portion of line segment that passes underneath the symbol. The size of the erased portion is controlled by `set pointintervalbox`. `linespoints` may be abbreviated `lp`. 2 points ?commands set style points ?set style points ?plotting styles points ?style points ?points Ffigure_points The `points` style displays a small symbol at each point. The command `set pointsize` may be used to change the default size of the points. 1 or 2 columns of basic input data are required in 2D plots; 1 or 3 columns are required in 3D plots. See `style lines`. Additional input columns may be used to provide information such as variable point size or variable point color. 2 polar Ffigure_polar Polar plots are not really a separate plot style but are listed here for completeness. The option `set polar` tells gnuplot to interpret input 2D coordinates as <angle>,<radius> rather than <x>,<y>. Many, but not all, 2D plotting styles work in polar mode. The figure shows a combination of plot styles `lines` and `filledcurves`. See `set polar`, `set rrange`, `set size square`. 2 steps ?commands set style steps ?set style steps ?plotting styles steps ?style steps ?steps Ffigure_steps The `steps` style is only relevant to 2D plotting. It connects consecutive points with two line segments: the first from (x1,y1) to (x2,y1) and the second from (x2,y1) to (x2,y2). The input column requires are the same as for plot styles `lines` and `points`. The difference between `fsteps` and `steps` is that `fsteps` traces first the change in y and then the change in x. `steps` traces first the change in x and then the change in y. To fill the area between the curve and the baseline at y=0, use `fillsteps`. See also ^ <a href="http://www.gnuplot.info/demo/steps.html"> steps demo. ^ </a> 2 rgbalpha ?commands set style rgbalpha ?set style rgbalpha ?plotting styles rgbalpha ?style rgbalpha See `image`. 2 rgbimage ?commands set style rgbimage ?set style rgbimage ?plotting styles rgbimage ?style rgbimage See `image`. 2 vectors ?commands set style vectors ?set style vectors ?plotting styles vectors ?style vectors ?vectors The 2D `vectors` style draws a vector from (x,y) to (x+xdelta,y+ydelta). The 3D `vectors` style is similar, but requires six columns of basic data. A small arrowhead is drawn at the end of each vector. 4 columns: x y xdelta ydelta 6 columns: x y z xdelta ydelta zdelta In both cases, an additional input column (5th in 2D, 7th in 3D) may be used to provide variable (per-datapoint) color information. (see `linecolor` and `rgbcolor variable`). splot with vectors is supported only for `set mapping cartesian`. The keywords "with vectors" may be followed by an in-line arrow style specifications, a reference to a predefined arrow style, or a request to read the index of the desired arrow style for each vector from a separate column. Note: If you choose "arrowstyle variable" it will fill in all arrow properties at the time the corresponding vector is drawn; you cannot mix this keyword with other line or arrow style qualifiers in the plot command. plot ... with vectors filled heads plot ... with vectors arrowstyle 3 plot ... using 1:2:3:4:5 with vectors arrowstyle variable See `arrowstyle` for more details. Example: plot 'file.dat' using 1:2:3:4 with vectors head filled lt 2 splot 'file.dat' using 1:2:3:(1):(1):(1) with vectors filled head lw 2 `set clip one` and `set clip two` affect vectors drawn in 2D. Please see `set clip` and `arrowstyle`. 2 xerrorbars ?commands set style xerrorbars ?set style xerrorbars ?plotting styles xerrorbars ?style xerrorbars ?xerrorbars Ffigure_xerrorbars The `xerrorbars` style is only relevant to 2D data plots. `xerrorbars` is like `points`, except that a horizontal error bar is also drawn. At each point (x,y), a line is drawn from (xlow,y) to (xhigh,y) or from (x-xdelta,y) to (x+xdelta,y), depending on how many data columns are provided. A tic mark is placed at the ends of the error bar (unless `set bars` is used---see `set bars` for details). The basic style requires either 3 or 4 columns: 3 columns: x y xdelta 4 columns: x y xlow xhigh An additional input column (4th or 5th) may be used to provide information such as variable point color. 2 xyerrorbars ?commands set style xyerrorbars ?set style xyerrorbars ?plotting styles xyerrorbars ?style xyerrorbars ?xyerrorbars Ffigure_xyerrorbars The `xyerrorbars` style is only relevant to 2D data plots. `xyerrorbars` is like `points`, except that horizontal and vertical error bars are also drawn. At each point (x,y), lines are drawn from (x,y-ydelta) to (x,y+ydelta) and from (x-xdelta,y) to (x+xdelta,y) or from (x,ylow) to (x,yhigh) and from (xlow,y) to (xhigh,y), depending upon the number of data columns provided. A tic mark is placed at the ends of the error bar (unless `set bars` is used---see `set bars` for details). Either 4 or 6 input columns are required. 4 columns: x y xdelta ydelta 6 columns: x y xlow xhigh ylow yhigh If data are provided in an unsupported mixed form, the `using` filter on the `plot` command should be used to set up the appropriate form. For example, if the data are of the form (x,y,xdelta,ylow,yhigh), then you can use plot 'data' using 1:2:($1-$3):($1+$3):4:5 with xyerrorbars An additional input column (5th or 7th) may be used to provide variable (per-datapoint) color information. 2 yerrorbars ?commands set style yerrorbars ?commands set style errorbars ?plotting styles yerrorbars ?plotting styles errorbars ?set style yerrorbars ?set style errorbars ?style yerrorbars ?style errorbars ?yerrorbars Ffigure_yerrorbars The `yerrorbars` (or `errorbars`) style is only relevant to 2D data plots. `yerrorbars` is like `points`, except that a vertical error bar is also drawn. At each point (x,y), a line is drawn from (x,y-ydelta) to (x,y+ydelta) or from (x,ylow) to (x,yhigh), depending on how many data columns are provided. A tic mark is placed at the ends of the error bar (unless `set bars` is used---see `set bars` for details). Either 3 or 4 input columns are required. 3 columns: x y ydelta 4 columns: x y ylow yhigh An additional input column (4th or 5th) may be used to provide information such as variable point color. See also ^ <a href="http://www.gnuplot.info/demo/mgr.html"> errorbar demo. ^ </a> 2 xerrorlines ?commands set style xerrorlines ?set style xerrorlines ?plotting styles xerrorlines ?style xerrorlines ?xerrorlines Ffigure_xerrorlines The `xerrorlines` style is only relevant to 2D data plots. `xerrorlines` is like `linespoints`, except that a horizontal error line is also drawn. At each point (x,y), a line is drawn from (xlow,y) to (xhigh,y) or from (x-xdelta,y) to (x+xdelta,y), depending on how many data columns are provided. A tic mark is placed at the ends of the error bar (unless `set bars` is used---see `set bars` for details). The basic style requires either 3 or 4 columns: 3 columns: x y xdelta 4 columns: x y xlow xhigh An additional input column (4th or 5th) may be used to provide information such as variable point color. 2 xyerrorlines ?commands set style xyerrorlines ?set style xyerrorlines ?plotting styles xyerrorlines ?style xyerrorlines ?xyerrorlines Ffigure_xyerrorlines The `xyerrorlines` style is only relevant to 2D data plots. `xyerrorlines` is like `linespoints`, except that horizontal and vertical error bars are also drawn. At each point (x,y), lines are drawn from (x,y-ydelta) to (x,y+ydelta) and from (x-xdelta,y) to (x+xdelta,y) or from (x,ylow) to (x,yhigh) and from (xlow,y) to (xhigh,y), depending upon the number of data columns provided. A tic mark is placed at the ends of the error bar (unless `set bars` is used---see `set bars` for details). Either 4 or 6 input columns are required. 4 columns: x y xdelta ydelta 6 columns: x y xlow xhigh ylow yhigh If data are provided in an unsupported mixed form, the `using` filter on the `plot` command should be used to set up the appropriate form. For example, if the data are of the form (x,y,xdelta,ylow,yhigh), then you can use plot 'data' using 1:2:($1-$3):($1+$3):4:5 with xyerrorlines An additional input column (5th or 7th) may be used to provide variable (per-datapoint) color information. 2 yerrorlines ?commands set style yerrorlines ?commands set style errorlines ?plotting styles yerrorlines ?plotting styles errorlines ?set style yerrorlines ?set style errorlines ?style yerrorlines ?style errorlines ?yerrorlines Ffigure_yerrorlines The `yerrorlines` (or `errorlines`) style is only relevant to 2D data plots. `yerrorlines` is like `linespoints`, except that a vertical error line is also drawn. At each point (x,y), a line is drawn from (x,y-ydelta) to (x,y+ydelta) or from (x,ylow) to (x,yhigh), depending on how many data columns are provided. A tic mark is placed at the ends of the error bar (see `set bars` for details). Either 3 or 4 input columns are required. 3 columns: x y ydelta 4 columns: x y ylow yhigh An additional input column (4th or 5th) may be used to provide information such as variable point color. See also ^ <a href="http://www.gnuplot.info/demo/mgr.html"> errorbar demo. ^ </a> 2 3D (surface) plots ?3D (surface) plots ?plotting styles 3d (surface) plots =3D =surface Ffigure_surface Surface plots are generated using the `splot` command rather than the `plot` command. The style `with lines` draws a surface made from a grid of lines. Solid surfaces can be drawn using the style `with pm3d`. Usually the surface is displayed at some arbitrary viewing angle, such that it clearly represents a 3D surface. In this case the X, Y, and Z axes are all visible in the plot. The illusion of 3D is enhanced by choosing hidden line removal or depth-sorted surface elements. See `hidden3d` and `pm3d depthorder`. Ffigure_surface+contours The `splot` command can also calculate and draw contour lines corresponding to constant Z values. These contour lines may be drawn onto the surface itself, or projected onto the XY plane. See `set contour`. 3 2D projection (set view map) ?2D projection (set view map) ?projection Ffigure_mapcontours An important special case of the `splot` command is to map the Z coordinate onto a 2D surface by projecting the plot along the Z axis. See `set view map`. This plot mode can be used to generate contour plots and heat maps. 1 Commands ?commands This section lists the commands acceptable to `gnuplot` in alphabetical order. Printed versions of this document contain all commands; the text available interactively may not be complete. Indeed, on some systems there may be no commands at all listed under this heading. Note that in most cases unambiguous abbreviations for command names and their options are permissible, i.e., "`p f(x) w li`" instead of "`plot f(x) with lines`". In the syntax descriptions, braces ({}) denote optional arguments and a vertical bar (|) separates mutually exclusive choices. 2 cd ?commands cd ?cd The `cd` command changes the working directory. Syntax: cd '<directory-name>' The directory name must be enclosed in quotes. Examples: cd 'subdir' cd ".." It is recommended that Windows users use single-quotes, because backslash [\] has special significance inside double-quotes and has to be escaped. For example, cd "c:\newdata" fails, but cd 'c:\newdata' cd "c:\\newdata" work as expected. 2 call ?commands call ?call The `call` command is identical to the load command with one exception: you can have up to ten additional parameters to the command (delimited according to the standard parser rules) which can be substituted into the lines read from the file. As each line is read from the `call`ed input file, it is scanned for the sequence `$` (dollar-sign) followed by a digit (0--9). If found, the sequence is replaced by the corresponding parameter from the `call` command line. If the parameter was specified as a string in the `call` line, it is substituted without its enclosing quotes. Sequence `$#` is replaced by the number of passed parameters. `$` followed by any character will be that character; e.g. use `$$` to get a single `$`. Providing more than ten parameters on the `call` command line will cause an error. A parameter that was not provided substitutes as nothing. Files being `call`ed may themselves contain `call` or `load` commands. Syntax: call "<input-file>" <parameter-0> <parm-1> ... <parm-9> The name of the input file must be enclosed in quotes, and it is recommended that parameters are similarly enclosed in quotes (future versions of gnuplot may treat quoted and unquoted arguments differently). Example: If the file 'calltest.gp' contains the line: print "argc=$# p0=$0 p1=$1 p2=$2 p3=$3 p4=$4 p5=$5 p6=$6 p7=x$7x" entering the command: call 'calltest.gp' "abcd" 1.2 + "'quoted'" -- "$2" will display: argc=7 p0=abcd p1=1.2 p2=+ p3='quoted' p4=- p5=- p6=$2 p7=xx NOTE: there is a clash in syntax with the datafile `using` callback operator. Use `$$n` or `column(n)` to access column n from a datafile inside a `call`ed datafile plot. 2 clear ?commands clear ?clear The `clear` command erases the current screen or output device as specified by `set output`. This usually generates a formfeed on hardcopy devices. Use `set terminal` to set the device type. For some terminals `clear` erases only the portion of the plotting surface defined by `set size`, so for these it can be used in conjunction with `set multiplot` to create an inset. Example: set multiplot plot sin(x) set origin 0.5,0.5 set size 0.4,0.4 clear plot cos(x) unset multiplot Please see `set multiplot`, `set size`, and `set origin` for details of these commands. 2 Do ?commands do ?do Syntax: do for <iteration-spec> { <commands> <commands> } Execute a sequence of commands multiple times. The commands must be enclosed in curly brackets, and the opening "{" must be on the same line as the `do` keyword. This command cannot be used with old-style (un-bracketed) if/else statements. See `if`. For examples of iteration specifiers, see `iteration`. Example: set multiplot layout 2,2 do for [name in "A B C D"] { filename = name . ".dat" set title sprintf("Condition %s",name) plot filename title name } unset multiplot 2 evaluate ?commands evaluate ?evaluate The `evaluate` command executes the commands given as an argument string. Newline characters are not allowed within the string. Syntax: eval <string expression> This is especially useful for a repetition of similar commands. Example: set_label(x, y, text) \ = sprintf("set label '%s' at %f, %f point pt 5", text, x, y) eval set_label(1., 1., 'one/one') eval set_label(2., 1., 'two/one') eval set_label(1., 2., 'one/two') Please see `substitution macros` for another way to execute commands from a string. 2 exit ?commands exit ?exit The commands `exit` and `quit`, as well as the END-OF-FILE character (usually Ctrl-D) terminate input from the current input stream: terminal session, pipe, and file input (pipe). If input streams are nested (inherited `load` scripts), then reading will continue in the parent stream. When the top level stream is closed, the program itself will exit. The command `exit gnuplot` will immediately and unconditionally cause gnuplot to exit even if the input stream is multiply nested. In this case any open output files may not be completed cleanly. Example of use: bind "ctrl-x" "unset output; exit gnuplot" See help for `batch/interactive` for more details. 2 fit ?commands fit ?fit ?least-squares ?Marquardt The `fit` command can fit a user-supplied expression to a set of data points (x,z) or (x,y,z), using an implementation of the nonlinear least-squares (NLLS) Marquardt-Levenberg algorithm. Any user-defined variable occurring in the expression may serve as a fit parameter, but the return type of the expression must be real. Syntax: fit {<ranges>} <expression> '<datafile>' {datafile-modifiers} via '<parameter file>' | <var1>{,<var2>,...} Ranges may be specified to temporarily limit the data which is to be fitted; any out-of-range data points are ignored. The syntax is [{dummy_variable=}{<min>}{:<max>}], analogous to `plot`; see `plot ranges`. <expression> is any valid `gnuplot` expression, although it is usual to use a previously user-defined function of the form f(x) or f(x,y). <datafile> is treated as in the `plot` command. All the `plot datafile` modifiers (`using`, `every`,...) except `smooth` and the deprecated `thru` are applicable to `fit`. See `plot datafile`. The default data formats for fitting functions with a single independent variable, z=f(x), are z or x:z. That is, if there is only a single column then it is the dependent variable and the line numbers is the independent variable. If there are two columns, the first is the independent variable and the second is the dependent variable. Those formats can be changed with the datafile `using` qualifier, for example to take the z value from a different column or to calculate it from several columns. A third `using` qualifier (a column number or an expression), if present, is interpreted as the standard deviation of the corresponding z value and is used to compute a weight for the datum, 1/s**2. Otherwise, all data points are weighted equally, with a weight of one. Note that if you don't specify a `using` option at all, no z standard deviations are read from the datafile even if it does have a third column, so you'll always get unit weights. To fit a function with two independent variables, z=f(x,y), the required format is `using` with four items, x:y:z:s. The complete format must be given---no default columns are assumed for a missing token. Weights for each data point are evaluated from 's' as above. If error estimates are not available, a constant value can be specified as a constant expression (see `plot datafile using`), e.g., `using 1:2:3:(1)`. The fit function may have up to five independent variables. There must be two more `using` qualifiers than there are independent variables, unless there is only one variable. The allowed formats, and the default dummy variable names, are as follows: z x:z x:z:s x:y:z:s x:y:t:z:s x:y:t:u:z:s x:y:t:u:v:z:s The dummy variable names may be changed with ranges as noted above. The first range corresponds to the first `using` spec, etc. A range may also be given for z (the dependent variable), but that name cannot be changed. Multiple datasets may be simultaneously fit with functions of one independent variable by making y a 'pseudo-variable', e.g., the dataline number, and fitting as two independent variables. See `fit multi-branch`. The `via` qualifier specifies which parameters are to be adjusted, either directly, or by referencing a parameter file. Examples: f(x) = a*x**2 + b*x + c g(x,y) = a*x**2 + b*y**2 + c*x*y FIT_LIMIT = 1e-6 fit f(x) 'measured.dat' via 'start.par' fit f(x) 'measured.dat' using 3:($7-5) via 'start.par' fit f(x) './data/trash.dat' using 1:2:3 via a, b, c fit g(x,y) 'surface.dat' using 1:2:3:(1) via a, b, c fit a0 + a1*x/(1 + a2*x/(1 + a3*x)) 'measured.dat' via a0,a1,a2,a3 fit a*x + b*y 'surface.dat' using 1:2:3:(1) via a,b fit [*:*][yaks=*:*] a*x+b*yaks 'surface.dat' u 1:2:3:(1) via a,b fit a*x + b*y + c*t 'foo.dat' using 1:2:3:4:(1) via a,b,c h(x,y,t,u,v) = a*x + b*y + c*t + d*u + e*v fit h(x,y,t,u,v) 'foo.dat' using 1:2:3:4:5:6:(1) via a,b,c,d,e After each iteration step, detailed information about the current state of the fit is written to the display. The same information about the initial and final states is written to a log file, "fit.log". This file is always appended to, so as to not lose any previous fit history; it should be deleted or renamed as desired. By using the command `set fit logfile`, the name of the log file can be changed. If gnuplot was built with this option, and you activated it using `set fit errorvariables`, the error for each fitted parameter will be stored in a variable named like the parameter, but with "_err" appended. Thus the errors can be used as input for further computations. The fit may be interrupted by pressing Ctrl-C. After the current iteration completes, you have the option to (1) stop the fit and accept the current parameter values, (2) continue the fit, (3) execute a `gnuplot` command as specified by the environment variable FIT_SCRIPT. The default for FIT_SCRIPT is `replot`, so if you had previously plotted both the data and the fitting function in one graph, you can display the current state of the fit. Once `fit` has finished, the `update` command may be used to store final values in a file for subsequent use as a parameter file. See `update` for details. 3 adjustable parameters ?commands fit parameters ?fit parameters ?commands fit adjustable_parameters ?fit adjustable_parameters ?fit_parameters There are two ways that `via` can specify the parameters to be adjusted, either directly on the command line or indirectly, by referencing a parameter file. The two use different means to set initial values. Adjustable parameters can be specified by a comma-separated list of variable names after the `via` keyword. Any variable that is not already defined is created with an initial value of 1.0. However, the fit is more likely to converge rapidly if the variables have been previously declared with more appropriate starting values. In a parameter file, each parameter to be varied and a corresponding initial value are specified, one per line, in the form varname = value Comments, marked by '#', and blank lines are permissible. The special form varname = value # FIXED means that the variable is treated as a 'fixed parameter', initialized by the parameter file, but not adjusted by `fit`. For clarity, it may be useful to designate variables as fixed parameters so that their values are reported by `fit`. The keyword `# FIXED` has to appear in exactly this form. 3 short introduction ?commands fit beginners_guide ?fit beginners_guide ?fit guide ?fitting `fit` is used to find a set of parameters that 'best' fits your data to your user-defined function. The fit is judged on the basis of the sum of the squared differences or 'residuals' (SSR) between the input data points and the function values, evaluated at the same places. This quantity is often called 'chisquare' (i.e., the Greek letter chi, to the power of 2). The algorithm attempts to minimize SSR, or more precisely, WSSR, as the residuals are 'weighted' by the input data errors (or 1.0) before being squared; see `fit error_estimates` for details. That's why it is called 'least-squares fitting'. Let's look at an example to see what is meant by 'non-linear', but first we had better go over some terms. Here it is convenient to use z as the dependent variable for user-defined functions of either one independent variable, z=f(x), or two independent variables, z=f(x,y). A parameter is a user-defined variable that `fit` will adjust, i.e., an unknown quantity in the function declaration. Linearity/non-linearity refers to the relationship of the dependent variable, z, to the parameters which `fit` is adjusting, not of z to the independent variables, x and/or y. (To be technical, the second {and higher} derivatives of the fitting function with respect to the parameters are zero for a linear least-squares problem). For linear least-squares (LLS), the user-defined function will be a sum of simple functions, not involving any parameters, each multiplied by one parameter. NLLS handles more complicated functions in which parameters can be used in a large number of ways. An example that illustrates the difference between linear and nonlinear least-squares is the Fourier series. One member may be written as z=a*sin(c*x) + b*cos(c*x). If a and b are the unknown parameters and c is constant, then estimating values of the parameters is a linear least-squares problem. However, if c is an unknown parameter, the problem is nonlinear. In the linear case, parameter values can be determined by comparatively simple linear algebra, in one direct step. However LLS is a special case which is also solved along with more general NLLS problems by the iterative procedure that `gnuplot` uses. `fit` attempts to find the minimum by doing a search. Each step (iteration) calculates WSSR with a new set of parameter values. The Marquardt-Levenberg algorithm selects the parameter values for the next iteration. The process continues until a preset criterion is met, either (1) the fit has "converged" (the relative change in WSSR is less than FIT_LIMIT), or (2) it reaches a preset iteration count limit, FIT_MAXITER (see `fit control variables`). The fit may also be interrupted and subsequently halted from the keyboard (see `fit`). The user variable FIT_CONVERGED contains 1 if the previous fit command terminated due to convergence; it contains 0 if the previous fit terminated for any other reason. Often the function to be fitted will be based on a model (or theory) that attempts to describe or predict the behaviour of the data. Then `fit` can be used to find values for the free parameters of the model, to determine how well the data fits the model, and to estimate an error range for each parameter. See `fit error_estimates`. Alternatively, in curve-fitting, functions are selected independent of a model (on the basis of experience as to which are likely to describe the trend of the data with the desired resolution and a minimum number of parameters*functions.) The `fit` solution then provides an analytic representation of the curve. However, if all you really want is a smooth curve through your data points, the `smooth` option to `plot` may be what you've been looking for rather than `fit`. 3 error estimates ?commands fit error_estimates ?fit error_estimates ?fit errors In `fit`, the term "error" is used in two different contexts, data error estimates and parameter error estimates. Data error estimates are used to calculate the relative weight of each data point when determining the weighted sum of squared residuals, WSSR or chisquare. They can affect the parameter estimates, since they determine how much influence the deviation of each data point from the fitted function has on the final values. Some of the `fit` output information, including the parameter error estimates, is more meaningful if accurate data error estimates have been provided. The 'statistical overview' describes some of the `fit` output and gives some background for the 'practical guidelines'. 4 statistical overview ?commands fit error statistical_overview ?fit error statistical_overview ?statistical_overview The theory of non-linear least-squares (NLLS) is generally described in terms of a normal distribution of errors, that is, the input data is assumed to be a sample from a population having a given mean and a Gaussian (normal) distribution about the mean with a given standard deviation. For a sample of sufficiently large size, and knowing the population standard deviation, one can use the statistics of the chisquare distribution to describe a "goodness of fit" by looking at the variable often called "chisquare". Here, it is sufficient to say that a reduced chisquare (chisquare/degrees of freedom, where degrees of freedom is the number of datapoints less the number of parameters being fitted) of 1.0 is an indication that the weighted sum of squared deviations between the fitted function and the data points is the same as that expected for a random sample from a population characterized by the function with the current value of the parameters and the given standard deviations. If the standard deviation for the population is not constant, as in counting statistics where variance = counts, then each point should be individually weighted when comparing the observed sum of deviations and the expected sum of deviations. At the conclusion `fit` reports 'stdfit', the standard deviation of the fit, which is the rms of the residuals, and the variance of the residuals, also called 'reduced chisquare' when the data points are weighted. The number of degrees of freedom (the number of data points minus the number of fitted parameters) is used in these estimates because the parameters used in calculating the residuals of the datapoints were obtained from the same data. These values are exported to the variables FIT_NDF = Number of degrees of freedom FIT_WSSR = Weighted sum-of-squares residual FIT_STDFIT = sqrt(WSSR/NDF) To estimate confidence levels for the parameters, one can use the minimum chisquare obtained from the fit and chisquare statistics to determine the value of chisquare corresponding to the desired confidence level, but considerably more calculation is required to determine the combinations of parameters which produce such values. Rather than determine confidence intervals, `fit` reports parameter error estimates which are readily obtained from the variance-covariance matrix after the final iteration. By convention, these estimates are called "standard errors" or "asymptotic standard errors", since they are calculated in the same way as the standard errors (standard deviation of each parameter) of a linear least-squares problem, even though the statistical conditions for designating the quantity calculated to be a standard deviation are not generally valid for the NLLS problem. The asymptotic standard errors are generally over-optimistic and should not be used for determining confidence levels, but are useful for qualitative purposes. The final solution also produces a correlation matrix indicating correlation of parameters in the region of the solution; The main diagonal elements, autocorrelation, are always 1; if all parameters were independent, the off-diagonal elements would be nearly 0. Two variables which completely compensate each other would have an off-diagonal element of unit magnitude, with a sign depending on whether the relation is proportional or inversely proportional. The smaller the magnitudes of the off-diagonal elements, the closer the estimates of the standard deviation of each parameter would be to the asymptotic standard error. 4 practical guidelines ?commands fit error practical_guidelines ?fit error practical_guidelines ?practical_guidelines ?guidelines If you have a basis for assigning weights to each data point, doing so lets you make use of additional knowledge about your measurements, e.g., take into account that some points may be more reliable than others. That may affect the final values of the parameters. Weighting the data provides a basis for interpreting the additional `fit` output after the last iteration. Even if you weight each point equally, estimating an average standard deviation rather than using a weight of 1 makes WSSR a dimensionless variable, as chisquare is by definition. Each fit iteration will display information which can be used to evaluate the progress of the fit. (An '*' indicates that it did not find a smaller WSSR and is trying again.) The 'sum of squares of residuals', also called 'chisquare', is the WSSR between the data and your fitted function; `fit` has minimized that. At this stage, with weighted data, chisquare is expected to approach the number of degrees of freedom (data points minus parameters). The WSSR can be used to calculate the reduced chisquare (WSSR/ndf) or stdfit, the standard deviation of the fit, sqrt(WSSR/ndf). Both of these are reported for the final WSSR. If the data are unweighted, stdfit is the rms value of the deviation of the data from the fitted function, in user units. If you supplied valid data errors, the number of data points is large enough, and the model is correct, the reduced chisquare should be about unity. (For details, look up the 'chi-squared distribution' in your favourite statistics reference.) If so, there are additional tests, beyond the scope of this overview, for determining how well the model fits the data. A reduced chisquare much larger than 1.0 may be due to incorrect data error estimates, data errors not normally distributed, systematic measurement errors, 'outliers', or an incorrect model function. A plot of the residuals, e.g., `plot 'datafile' using 1:($2-f($1))`, may help to show any systematic trends. Plotting both the data points and the function may help to suggest another model. Similarly, a reduced chisquare less than 1.0 indicates WSSR is less than that expected for a random sample from the function with normally distributed errors. The data error estimates may be too large, the statistical assumptions may not be justified, or the model function may be too general, fitting fluctuations in a particular sample in addition to the underlying trends. In the latter case, a simpler function may be more appropriate. You'll have to get used to both `fit` and the kind of problems you apply it to before you can relate the standard errors to some more practical estimates of parameter uncertainties or evaluate the significance of the correlation matrix. Note that `fit`, in common with most NLLS implementations, minimizes the weighted sum of squared distances (y-f(x))**2. It does not provide any means to account for "errors" in the values of x, only in y. Also, any "outliers" (data points outside the normal distribution of the model) will have an exaggerated effect on the solution. 3 control ?commands fit control ?fit control There are a number of `gnuplot` variables that can be defined to affect `fit`. Those which can be defined once `gnuplot` is running are listed under 'control_variables' while those defined before starting `gnuplot` are listed under 'environment_variables'. 4 control variables ?commands fit control variables ?fit control variables The default epsilon limit (1e-5) may be changed by declaring a value for FIT_LIMIT When the sum of squared residuals changes between two iteration steps by a factor less than this number (epsilon), the fit is considered to have 'converged'. The maximum number of iterations may be limited by declaring a value for FIT_MAXITER A value of 0 (or not defining it at all) means that there is no limit. If you need even more control about the algorithm, and know the Marquardt-Levenberg algorithm well, there are some more variables to influence it. The startup value of `lambda` is normally calculated automatically from the ML-matrix, but if you want to, you may provide your own one with FIT_START_LAMBDA Specifying FIT_START_LAMBDA as zero or less will re-enable the automatic selection. The variable FIT_LAMBDA_FACTOR gives the factor by which `lambda` is increased or decreased whenever the chi-squared target function increased or decreased significantly. Setting FIT_LAMBDA_FACTOR to zero re-enables the default factor of 10.0. Other variables with the FIT_ prefix may be added to `fit`, so it is safer not to use that prefix for user-defined variables. The variables FIT_SKIP and FIT_INDEX were used by earlier releases of `gnuplot` with a 'fit' patch called `gnufit` and are no longer available. The datafile `every` modifier provides the functionality of FIT_SKIP. FIT_INDEX was used for multi-branch fitting, but multi-branch fitting of one independent variable is now done as a pseudo-3D fit in which the second independent variable and `using` are used to specify the branch. See `fit multi-branch`. 4 environment variables ?commands fit control environment ?fit control environment The environment variables must be defined before `gnuplot` is executed; how to do so depends on your operating system. FIT_LOG changes the name (and/or path) of the file to which the fit log will be written from the default of "fit.log" in the working directory. The default value can be overwritten using the command `set fit logfile`. FIT_SCRIPT specifies a command that may be executed after an user interrupt. The default is `replot`, but a `plot` or `load` command may be useful to display a plot customized to highlight the progress of the fit. 3 multi-branch ?commands fit multi-branch ?fit multi-branch ?multi-branch ?branch In multi-branch fitting, multiple data sets can be simultaneously fit with functions of one independent variable having common parameters by minimizing the total WSSR. The function and parameters (branch) for each data set are selected by using a 'pseudo-variable', e.g., either the dataline number (a 'column' index of -1) or the datafile index (-2), as the second independent variable. Example: Given two exponential decays of the form, z=f(x), each describing a different data set but having a common decay time, estimate the values of the parameters. If the datafile has the format x:z:s, then f(x,y) = (y==0) ? a*exp(-x/tau) : b*exp(-x/tau) fit f(x,y) 'datafile' using 1:-2:2:3 via a, b, tau For a more complicated example, see the file "hexa.fnc" used by the "fit.dem" demo. Appropriate weighting may be required since unit weights may cause one branch to predominate if there is a difference in the scale of the dependent variable. Fitting each branch separately, using the multi-branch solution as initial values, may give an indication as to the relative effect of each branch on the joint solution. 3 starting values ?commands fit starting_values ?fit starting_values ?starting_values Nonlinear fitting is not guaranteed to converge to the global optimum (the solution with the smallest sum of squared residuals, SSR), and can get stuck at a local minimum. The routine has no way to determine that; it is up to you to judge whether this has happened. `fit` may, and often will get "lost" if started far from a solution, where SSR is large and changing slowly as the parameters are varied, or it may reach a numerically unstable region (e.g., too large a number causing a floating point overflow) which results in an "undefined value" message or `gnuplot` halting. To improve the chances of finding the global optimum, you should set the starting values at least roughly in the vicinity of the solution, e.g., within an order of magnitude, if possible. The closer your starting values are to the solution, the less chance of stopping at another minimum. One way to find starting values is to plot data and the fitting function on the same graph and change parameter values and `replot` until reasonable similarity is reached. The same plot is also useful to check whether the fit stopped at a minimum with a poor fit. Of course, a reasonably good fit is not proof there is not a "better" fit (in either a statistical sense, characterized by an improved goodness-of-fit criterion, or a physical sense, with a solution more consistent with the model.) Depending on the problem, it may be desirable to `fit` with various sets of starting values, covering a reasonable range for each parameter. 3 tips ?commands fit tips ?fit tips ?tips Here are some tips to keep in mind to get the most out of `fit`. They're not very organized, so you'll have to read them several times until their essence has sunk in. The two forms of the `via` argument to `fit` serve two largely distinct purposes. The `via "file"` form is best used for (possibly unattended) batch operation, where you just supply the startup values in a file and can later use `update` to copy the results back into another (or the same) parameter file. The `via var1, var2, ...` form is best used interactively, where the command history mechanism may be used to edit the list of parameters to be fitted or to supply new startup values for the next try. This is particularly useful for hard problems, where a direct fit to all parameters at once won't work without good starting values. To find such, you can iterate several times, fitting only some of the parameters, until the values are close enough to the goal that the final fit to all parameters at once will work. Make sure that there is no mutual dependency among parameters of the function you are fitting. For example, don't try to fit a*exp(x+b), because a*exp(x+b)=a*exp(b)*exp(x). Instead, fit either a*exp(x) or exp(x+b). A technical issue: the parameters must not be too different in magnitude. The larger the ratio of the largest and the smallest absolute parameter values, the slower the fit will converge. If the ratio is close to or above the inverse of the machine floating point precision, it may take next to forever to converge, or refuse to converge at all. You will have to adapt your function to avoid this, e.g., replace 'parameter' by '1e9*parameter' in the function definition, and divide the starting value by 1e9. If you can write your function as a linear combination of simple functions weighted by the parameters to be fitted, by all means do so. That helps a lot, because the problem is no longer nonlinear and should converge with only a small number of iterations, perhaps just one. Some prescriptions for analysing data, given in practical experimentation courses, may have you first fit some functions to your data, perhaps in a multi-step process of accounting for several aspects of the underlying theory one by one, and then extract the information you really wanted from the fitting parameters of those functions. With `fit`, this may often be done in one step by writing the model function directly in terms of the desired parameters. Transforming data can also quite often be avoided, though sometimes at the cost of a more difficult fit problem. If you think this contradicts the previous paragraph about simplifying the fit function, you are correct. A "singular matrix" message indicates that this implementation of the Marquardt-Levenberg algorithm can't calculate parameter values for the next iteration. Try different starting values, writing the function in another form, or a simpler function. Finally, a nice quote from the manual of another fitting package (fudgit), that kind of summarizes all these issues: "Nonlinear fitting is an art!" 2 help ?commands help ?help The `help` command displays built-in help. To specify information on a particular topic use the syntax: help {<topic>} If <topic> is not specified, a short message is printed about `gnuplot`. After help for the requested topic is given, a menu of subtopics is given; help for a subtopic may be requested by typing its name, extending the help request. After that subtopic has been printed, the request may be extended again or you may go back one level to the previous topic. Eventually, the `gnuplot` command line will return. If a question mark (?) is given as the topic, the list of topics currently available is printed on the screen. 2 history ?commands history ?history `history` command lists or saves previous entries in the history of the command line editing, or executes an entry. Here you find 'usage by examples': history # show the complete history history 5 # show last 5 entries in the history history quiet 5 # show last 5 entries without entry numbers history "hist.gp" # write the complete history to file hist.gp history "hist.gp" append # append the complete history to file hist.gp history 10 "hist.gp" # write last 10 commands to file hist.gp history 10 "|head -5 >>diary.gp" # write 5 history commands using pipe history ?load # show all history entries starting with "load" history ?"set c" # like above, several words enclosed in quotes hi !reread # execute last entry starting with "reread" hist !"set xr" # like above, several words enclosed in quotes hi !hi # guess yourself :-)) On systems which support a popen function (Unix), the output of history can be piped through an external program by starting the file name with a '|', as one of the above examples demonstrates. 2 if ?commands if ?if New syntax: if (<condition>) { <command>; <command> <commands> <commands> } else { <commands> } Old syntax: if (<condition>) <command-line> [; else if (<condition>) ...; else ...] This version of gnuplot supports block-structured if/else statements. If the keyword `if` or `else` is immediately followed by an opening "{", then conditional execution applies to all statements, possibly on multiple input lines, until a matching "}" terminates the block. If commands may be nested. The old single-line if/else syntax is still supported, but can not be mixed with the new block-structured syntax. See `if-old`. 3 if-old ?if if-old ?if-old Through gnuplot version 4.4, the scope of the if/else commands was limited to a single input line. This has been replaced by allowing a multi-line clause to be enclosed in curly brackets. The old syntax is still honored by itself but cannot be used inside a bracketed clause. If no opening "{" follows the `if` keyword, the command(s) in <command-line> will be executed if <condition> is true (non-zero) or skipped if <condition> is false (zero). Either case will consume commands on the input line until the end of the line or an occurrence of `else`. Note that use of `;` to allow multiple commands on the same line will _not_ end the conditionalized commands. Examples: pi=3 if (pi!=acos(-1)) print "?Fixing pi!"; pi=acos(-1); print pi will display: ?Fixing pi! 3.14159265358979 but if (1==2) print "Never see this"; print "Or this either" will not display anything. else: v=0 v=v+1; if (v%2) print "2" ; else if (v%3) print "3"; else print "fred" (repeat the last line repeatedly!) See `reread` for an example of using if and reread together to perform a loop. 2 iteration ?iteration ?iterate The `plot`, `splot`, `set` and `unset` commands may optionally contain an iteration clause. This has the effect of executing the basic command multiple times, each time re-evaluating any expressions that make use of the iteration control variable. Iteration of arbitrary command sequences can be requested using the `do` command. Two forms of iteration clause are currently supported: for [intvar = start:end{:increment}] for [stringvar in "A B C D"] Examples: plot for [filename in "A.dat B.dat C.dat"] filename using 1:2 with lines plot for [basename in "A B C"] basename.".dat" using 1:2 with lines set for [i = 1:10] style line i lc rgb "blue" unset for [tag = 100:200] label tag Nested iteration is supported: set for [i=1:9] for [j=1:9] label i*10+j sprintf("%d",i*10+j) at i,j See additional documentation for `plot iteration`, `do`. 2 load ?commands load ?load The `load` command executes each line of the specified input file as if it had been typed in interactively. Files created by the `save` command can later be `load`ed. Any text file containing valid commands can be created and then executed by the `load` command. Files being `load`ed may themselves contain `load` or `call` commands. See `comments` for information about comments in commands. To `load` with arguments, see `call`. Syntax: load "<input-file>" The name of the input file must be enclosed in quotes. The special filename "-" may be used to `load` commands from standard input. This allows a `gnuplot` command file to accept some commands from standard input. Please see help for `batch/interactive` for more details. On some systems which support a popen function (Unix), the load file can be read from a pipe by starting the file name with a '<'. Examples: load 'work.gnu' load "func.dat" load "< loadfile_generator.sh" The `load` command is performed implicitly on any file names given as arguments to `gnuplot`. These are loaded in the order specified, and then `gnuplot` exits. 2 lower ?commands lower ?lower Syntax: lower {plot_window_nb} The `lower` command lowers (opposite to `raise`) plot window(s) associated with the interactive terminal of your gnuplot session, i.e. `pm`, `win`, `wxt` or `x11`. It puts the plot window to bottom in the z-order windows stack of the window manager of your desktop. As `x11` and `wxt` support multiple plot windows, then by default they lower these windows in descending order of most recently created on top to the least recently created on bottom. If a plot number is supplied as an optional parameter, only the associated plot window will be lowered if it exists. The optional parameter is ignored for single plot-window terminals, i.e. `pm` and `win`. 2 pause ?commands pause ?pause ?pause mouse The `pause` command displays any text associated with the command and then waits a specified amount of time or until the carriage return is pressed. `pause` is especially useful in conjunction with `load` files. Syntax: pause <time> {"<string>"} pause mouse {<endcondition>}{, <endcondition>} {"<string>"} <time> may be any constant or expression. Choosing -1 will wait until a carriage return is hit, zero (0) won't pause at all, and a positive number will wait the specified number of seconds. The time is rounded to an integer number of seconds if subsecond time resolution is not supported by the given platform. `pause 0` is synonymous with `print`. If the current terminal supports `mousing`, then `pause mouse` will terminate on either a mouse click or on ctrl-C. For all other terminals, or if mousing is not active, `pause mouse` is equivalent to `pause -1`. If one or more end conditions are given after `pause mouse`, then any one of the conditions will terminate the pause. The possible end conditions are `keypress`, `button1`, `button2`, `button3`, `close`, and `any`. If the pause terminates on a keypress, then the ascii value of the key pressed is returned in MOUSE_KEY. The character itself is returned as a one character string in MOUSE_CHAR. Hotkeys (bind command) are disabled if keypress is one of the end conditions. Zooming is disabled if button3 is one of the end conditions. In all cases the coordinates of the mouse are returned in variables MOUSE_X, MOUSE_Y, MOUSE_X2, MOUSE_Y2. See `mouse variables`. Note: Since `pause` communicates with the operating system rather than the graphics, it may behave differently with different device drivers (depending upon how text and graphics are mixed). Examples: pause -1 # Wait until a carriage return is hit pause 3 # Wait three seconds pause -1 "Hit return to continue" pause 10 "Isn't this pretty? It's a cubic spline." pause mouse "Click any mouse button on selected data point" pause mouse keypress "Type a letter from A-F in the active window" pause mouse button1,keypress pause mouse any "Any key or button will terminate" The variant "pause mouse key" will resume after any keypress in the active plot window. If you want to wait for a particular key to be pressed, you can use a reread loop such as: print "I will resume after you hit the Tab key in the plot window" load "wait_for_tab" File "wait_for_tab" contains the lines pause mouse key if (MOUSE_KEY != 9) reread 2 plot ?commands plot ?plot `plot` is the primary command for drawing plots with `gnuplot`. It creates plots of functions and data in many, many ways. `plot` is used to draw 2D functions and data; `splot` draws 2D projections of 3D surfaces and data. `plot` and `splot` offer many features in common; see `splot` for differences. Note specifically that although the `binary <binary list>` variation does work for both `plot` and `splot`, there are small differences between them. Syntax: plot {<ranges>} {<iteration>} {<function> | {"<datafile>" {datafile-modifiers}}} {axes <axes>} {<title-spec>} {with <style>} {, {definitions{,}} <function> ...} where either a <function> or the name of a data file enclosed in quotes is supplied. A function is a mathematical expression or a pair of mathematical expressions in parametric mode. Functions may be builtin, user-defined, or provided in the plot command itself. Multiple datafiles and/or functions may be plotted in a single command, separated by commas. See `data`, `functions`. Examples: plot sin(x) plot sin(x), cos(x) plot f(x) = sin(x*a), a = .2, f(x), a = .4, f(x) plot "datafile.1" with lines, "datafile.2" with points plot [t=1:10] [-pi:pi*2] tan(t), \ "data.1" using (tan($2)):($3/$4) smooth csplines \ axes x1y2 notitle with lines 5 plot for [datafile in "spinach.dat broccoli.dat"] datafile See also `show plot`. 3 axes ?commands plot axes ?plot axes ?axes There are four possible sets of axes available; the keyword <axes> is used to select the axes for which a particular line should be scaled. `x1y1` refers to the axes on the bottom and left; `x2y2` to those on the top and right; `x1y2` to those on the bottom and right; and `x2y1` to those on the top and left. Ranges specified on the `plot` command apply only to the first set of axes (bottom left). 3 binary ?binary ?data binary ?datafile binary ?plot data binary BINARY DATA FILES: Some earlier versions of `gnuplot` automatically detected binary data files. It is now necessary to provide the keyword `binary` after the filename. Adequate details of the file format must be given on the command line or extracted from the file itself for a supported binary `filetype`. In particular, there are two structures for binary files, binary matrix format and binary general format. The `binary matrix` format contains a two dimensional array of 32 bit IEEE float values with an additional column and row of coordinate values. As with ASCII matrix, in the `using` list, enumeration of the coordinate row constitutes column 1, enumeration of the coordinate column constitutes column 2, and the array of values constitutes column 3. The `binary general` format contains an arbitrary number of columns for which information must be specified at the command line. For example, `array`, `record`, `format` and `using` can indicate the size, format and dimension of data. There are a variety of useful commands for skipping file headers and changing endianess. There are a set of commands for positioning and translating data since often coordinates are not part of the file when uniform sampling is inherent in the data. Different from matrix binary or ASCII, general binary does not treat the generated columns as 1, 2 or 3 in the `using` list. Rather, column 1 begins with column 1 of the file, or as specified in the `format` list. There are global default settings for the various binary options which may be set using the same syntax as the options when used as part of the `(s)plot <filename> binary ...` command. This syntax is `set datafile binary ...`. The general rule is that common command-line specified parameters override file-extracted parameters which override default parameters. `Binary matrix` is the default binary format when no keywords specific to `binary general` are given, i.e., `array`, `record`, `format`, `filetype`. General binary data can be entered at the command line via the special file name '-'. However, this is intended for use through a pipe where programs can exchange binary data, not for keyboards. There is no "end of record" character for binary data. Gnuplot continues reading from a pipe until it has read the number of points declared in the `array` qualifier. See `binary matrix` or `binary general` for more details. The `index` keyword is not supported, since the file format allows only one surface per file. The `every` and `using` filters are supported. `using` operates as if the data were read in the above triplet form. ^ <a href="http://www.gnuplot.info/demo/binary.html"> Binary File Splot Demo. ^ </a> 4 general ?commands plot binary general ?commands splot binary general ?plot binary general ?splot binary general ?datafile binary general ?data binary general ?binary general General binary data in which format information is not necessarily part of the file can be read by giving further details about the file format at the command line. Although the syntax is slightly arcane to the casual user, general binary is particularly useful for application programs using gnuplot and sending large amounts of data. Syntax: plot '<file_name>' {binary <binary list>} ... splot '<file_name>' {binary <binary list>} ... General binary format is activated by keywords in <binary list> pertaining to information about file structure, i.e., `array`, `record`, `format` or `filetype`. Otherwise, matrix binary format is assumed. (See `binary matrix` for more details.) There are some standard file types that may be read for which details about the binary format may be extracted automatically. (Type `show datafile binary` at the command line for a list.) Otherwise, details must be specified at the command line or set in the defaults. Keywords are described below. The keyword `filetype` in <binary list> controls the routine used to read the file, i.e., the format of the data. For a list of the supported file types, type `show datafile binary filetypes`. If no file type is given, the rule is that traditional gnuplot binary is assumed for `splot` if the `binary` keyword stands alone. In all other circumstances, for `plot` or when one of the <binary list> keywords appears, a raw binary file is assumed whereby the keywords specify the binary format. General binary data files fall into two basic classes, and some files may be of both classes depending upon how they are treated. There is that class for which uniform sampling is assumed and point coordinates must be generated. This is the class for which full control via the <binary list> keywords applies. For this class, the settings precedence is that command line parameters override in-file parameters, which override default settings. The other class is that set of files for which coordinate information is contained within the file or there is possibly a non-uniform sampling such as gnuplot binary. Other than for the unique data files such as gnuplot binary, one should think of binary data as conceptually the same as ASCII data. Each point has columns of information which are selected via the `<using list>` associated with `using`. When no `format` string is specified, gnuplot will retrieve a number of binary variables equal to the largest column given in the `<using list>`. For example, `using 1:3` will result in three columns being read, of which the second will be ignored. There are default using lists based upon the typical number of parameters associated with a certain plot type. For example, `with image` has a default of `using 1`, while `with rgbimage` has a default of `using 1:2:3`. Note that the special characters for `using` representing point/line/index generally should not be used for binary data. There are keywords in <binary list> that control this. 4 array ?binary array Describes the sampling array dimensions associated with the binary file. The coordinates will be generated by gnuplot. A number must be specified for each dimension of the array. For example, `array=(10,20)` means the underlying sampling structure is two-dimensional with 10 points along the first (x) dimension and 20 points along the second (y) dimension. A negative number indicates that data should be read until the end of file. If there is only one dimension, the parentheses may be omitted. A colon can be used to separate the dimensions for multiple records. For example, `array=25:35` indicates there are two one-dimensional records in the file. Note: Gnuplot version 4.2 used the syntax array=128x128 rather than array=(128,128). The older syntax is now deprecated, but may still work if your copy of gnuplot was built to support backwards compatibility. 4 record ?binary record This keyword serves the same function as `array`, having the same syntax. However, `record` causes gnuplot to not generate coordinate information. This is for the case where such information may be included in one of the columns of the binary data file. 4 skip ?binary skip This keyword allows you to skip sections of a binary file. For instance, if the file contains a 1024 byte header before the start of the data region you would probably want to use plot '<file_name>' binary skip=1024 ... If there are multiple records in the file, you may specify a leading offset for each. For example, to skip 512 bytes before the 1st record and 256 bytes before the second and third records plot '<file_name> binary record=356:356:356 skip=512:256:256 ... 4 format ?binary format The default binary format is a float. For more flexibility, the format can include details about variable sizes. For example, `format="%uchar%int%float"` associates an unsigned character with the first using column, an int with the second column and a float with the third column. If the number of size specifications is less than the greatest column number, the size is implicitly taken to be similar to the last given variable size. Furthermore, similar to the `using` specification, the format can include discarded columns via the `*` character and have implicit repetition via a numerical repeat-field. For example, `format="%*2int%3float"` causes gnuplot to discard two ints before reading three floats. To list variable sizes, type `show datafile binary datasizes`. There are a group of names that are machine dependent along with their sizes in bytes for the particular compilation. There is also a group of names which attempt to be machine independent. 4 endian ?binary endian Often the endianess of binary data in the file does not agree with the endianess used by the platform on which gnuplot is running. Several words can direct gnuplot how to arrange bytes. For example `endian=little` means treat the binary file as having byte significance from least to greatest. The options are little: least significant to greatest significance big: greatest significance to least significance default: assume file endianess is the same as compiler swap (swab): Interchange the significance. (If things don't look right, try this.) Gnuplot can support "middle" ("pdp") endian if it is compiled with that option. 4 filetype ?binary filetype ?filetype For some standard binary file formats gnuplot can extract all the necessary information from the file in question. As an example, "format=edf" will read ESRF Header File format files. For a list of the currently supported file formats, type `show datafile binary filetypes`. There is a special file type called `auto` for which gnuplot will check if the binary file's extension is a quasi-standard extension for a supported format. Command line keywords may be used to override settings extracted from the file. The settings from the file override any defaults. (See `set datafile binary` for details.) 5 avs ?binary filetype avs ?filetype avs ?avs `avs` is one of the automatically recognized binary file types for images. AVS is an extremely simple format, suitable mostly for streaming between applications. It consists of 2 longs (xwidth, ywidth) followed by a stream of pixels, each with four bytes of information alpha/red/green/blue. 5 edf ?binary filetype edf ?filetype edf ?edf ?filetype ehf ?ehf `edf` is one of the automatically recognized binary file types for images. EDF stands for ESRF Data Format, and it supports both edf and ehf formats (the latter means ESRF Header Format). More information on specifications can be found at http://www.edfplus.info/specs 5 png ?binary filetype png ?binary filetype gif ?binary filetype jpeg ?filetype png ?filetype gif ?filetype jpeg If gnuplot was configured to use the libgd library for png/gif/jpeg output, then it can also be used to read these same image types as binary files. You can use an explicit command plot 'file.png' binary filetype=png Or the file type will be recognized automatically from the extension if you have previously requested set datafile binary filetype=auto 4 keywords ?binary keywords The following keywords apply only when generating coordinates from binary data files. That is, the control mapping the individual elements of a binary array, matrix, or image to specific x/y/z positions. 5 scan ?binary keywords scan A great deal of confusion can arise concerning the relationship between how gnuplot scans a binary file and the dimensions seen on the plot. To lessen the confusion, conceptually think of gnuplot _always_ scanning the binary file point/line/plane or fast/medium/slow. Then this keyword is used to tell gnuplot how to map this scanning convention to the Cartesian convention shown in plots, i.e., x/y/z. The qualifier for scan is a two or three letter code representing where point is assigned (first letter), line is assigned (second letter), and plane is assigned (third letter). For example, `scan=yx` means the fastest, point-by-point, increment should be mapped along the Cartesian y dimension and the middle, line-by-line, increment should be mapped along the x dimension. When the plotting mode is `plot`, the qualifier code can include the two letters x and y. For `splot`, it can include the three letters x, y and z. There is nothing restricting the inherent mapping from point/line/plane to apply only to Cartesian coordinates. For this reason there are cylindrical coordinate synonyms for the qualifier codes where t (theta), r and z are analogous to the x, y and z of Cartesian coordinates. 5 transpose ?binary keywords transpose Shorthand notation for `scan=yx` or `scan=yxz`. 5 dx, dy, dz ?binary keywords dx ?binary keywords dy ?dx ?dy When gnuplot generates coordinates, it uses the spacing described by these keywords. For example `dx=10 dy=20` would mean space samples along the x dimension by 10 and space samples along the y dimension by 20. `dy` cannot appear if `dx` does not appear. Similarly, `dz` cannot appear if `dy` does not appear. If the underlying dimensions are greater than the keywords specified, the spacing of the highest dimension given is extended to the other dimensions. For example, if an image is being read from a file and only `dx=3.5` is given gnuplot uses a delta x and delta y of 3.5. The following keywords also apply only when generating coordinates. However they may also be used with matrix binary files. 5 flipx, flipy, flipz ?binary keywords flipx Sometimes the scanning directions in a binary datafile are not consistent with that assumed by gnuplot. These keywords can flip the scanning direction along dimensions x, y, z. 5 origin ?binary keywords origin When gnuplot generates coordinates based upon transposition and flip, it attempts to always position the lower left point in the array at the origin, i.e., the data lies in the first quadrant of a Cartesian system after transpose and flip. To position the array somewhere else on the graph, the `origin` keyword directs gnuplot to position the lower left point of the array at a point specified by a tuple. The tuple should be a double for `plot` and a triple for `splot`. For example, `origin=(100,100):(100,200)` is for two records in the file and intended for plotting in two dimensions. A second example, `origin=(0,0,3.5)`, is for plotting in three dimensions. 5 center ?binary keywords center ?keywords center Similar to `origin`, this keyword will position the array such that its center lies at the point given by the tuple. For example, `center=(0,0)`. Center does not apply when the size of the array is `Inf`. 5 rotate ?binary keywords rotate ?keywords rotate The transpose and flip commands provide some flexibility in generating and orienting coordinates. However, for full degrees of freedom, it is possible to apply a rotational vector described by a rotational angle in two dimensions. The `rotate` keyword applies to the two-dimensional plane, whether it be `plot` or `splot`. The rotation is done with respect to the positive angle of the Cartesian plane. The angle can be expressed in radians, radians as a multiple of pi, or degrees. For example, `rotate=1.5708`, `rotate=0.5pi` and `rotate=90deg` are equivalent. If `origin` is specified, the rotation is done about the lower left sample point before translation. Otherwise, the rotation is done about the array `center`. 5 perpendicular ?binary keywords perpendicular For `splot`, the concept of a rotational vector is implemented by a triple representing the vector to be oriented normal to the two-dimensional x-y plane. Naturally, the default is (0,0,1). Thus specifying both rotate and perpendicular together can orient data myriad ways in three-space. The two-dimensional rotation is done first, followed by the three-dimensional rotation. That is, if R' is the rotational 2 x 2 matrix described by an angle, and P is the 3 x 3 matrix projecting (0,0,1) to (xp,yp,zp), let R be constructed from R' at the upper left sub-matrix, 1 at element 3,3 and zeros elsewhere. Then the matrix formula for translating data is v' = P R v, where v is the 3 x 1 vector of data extracted from the data file. In cases where the data of the file is inherently not three-dimensional, logical rules are used to place the data in three-space. (E.g., usually setting the z-dimension value to zero and placing 2D data in the x-y plane.) 3 data ?commands plot datafile ?plot datafile ?data-file ?datafile ?data ?file Discrete data contained in a file can be displayed by specifying the name of the data file (enclosed in single or double quotes) on the `plot` command line. Syntax: plot '<file_name>' {binary <binary list>} {{nonuniform} matrix} {index <index list> | index "<name>"} {every <every list>} {thru <thru expression>} {using <using list>} {smooth <option>} {volatile} {noautoscale} The modifiers `binary`, `index`, `every`, `thru`, `using`, and `smooth` are discussed separately. In brief, `binary` allows data entry from a binary file (default is ASCII), `index` selects which data sets in a multi-data-set file are to be plotted, `every` specifies which points within a single data set are to be plotted, `using` determines how the columns within a single record are to be interpreted (`thru` is a special case of `using`), and `smooth` allows for simple interpolation and approximation. (`splot` has a similar syntax, but does not support the `smooth` and `thru` options.) The `noautoscale` keyword means that the points making up this plot will be ignored when automatically determining axis range limits. ASCII DATA FILES: Data files should contain at least one data point per record (`using` can select one data point from the record). Records beginning with `#` (and also with `!` on VMS) will be treated as comments and ignored. Each data point represents an (x,y) pair. For `plot`s with error bars or error bars with lines (see `set style errorbars` or `set style errorlines`), each data point is (x,y,ydelta), (x,y,ylow,yhigh), (x,y,xdelta), (x,y,xlow,xhigh), or (x,y,xlow,xhigh,ylow,yhigh). In all cases, the numbers of each record of a data file must be separated by white space (one or more blanks or tabs) unless a format specifier is provided by the `using` option. This white space divides each record into columns. However, whitespace inside a pair of double quotes is ignored when counting columns, so the following datafile line has three columns: 1.0 "second column" 3.0 Data may be written in exponential format with the exponent preceded by the letter e or E. The fortran exponential specifiers d, D, q, and Q may also be used if the command `set datafile fortran` is in effect. Only one column (the y value) need be provided. If x is omitted, `gnuplot` provides integer values starting at 0. In datafiles, blank records (records with no characters other than blanks and a newline and/or carriage return) are significant. Single blank records designate discontinuities in a `plot`; no line will join points separated by a blank records (if they are plotted with a line style). Two blank records in a row indicate a break between separate data sets. See `index`. If autoscaling has been enabled (`set autoscale`), the axes are automatically extended to include all datapoints, with a whole number of tic marks if tics are being drawn. This has two consequences: i) For `splot`, the corner of the surface may not coincide with the corner of the base. In this case, no vertical line is drawn. ii) When plotting data with the same x range on a dual-axis graph, the x coordinates may not coincide if the x2tics are not being drawn. This is because the x axis has been autoextended to a whole number of tics, but the x2 axis has not. The following example illustrates the problem: reset; plot '-', '-' axes x2y1 1 1 19 19 e 1 1 19 19 e To avoid this, you can use the `fixmin`/`fixmax` feature of the `set autoscale` command, which turns off the automatic extension of the axis range up to the next tic mark. Label coordinates and text can also be read from a data file (see `labels`). 4 every ?commands plot datafile every ?plot datafile every ?plot every ?data-file every ?datafile every ?every The `every` keyword allows a periodic sampling of a data set to be plotted. In the discussion a "point" is a datum defined by a single record in the file; "block" here will mean the same thing as "datablock" (see `glossary`). Syntax: plot 'file' every {<point_incr>} {:{<block_incr>} {:{<start_point>} {:{<start_block>} {:{<end_point>} {:<end_block>}}}}} The data points to be plotted are selected according to a loop from <`start_point`> to <`end_point`> with increment <`point_incr`> and the blocks according to a loop from <`start_block`> to <`end_block`> with increment <`block_incr`>. The first datum in each block is numbered '0', as is the first block in the file. Note that records containing unplottable information are counted. Any of the numbers can be omitted; the increments default to unity, the start values to the first point or block, and the end values to the last point or block. ':' at the end of the `every` option is not permitted. If `every` is not specified, all points in all lines are plotted. Examples: every :::3::3 # selects just the fourth block ('0' is first) every :::::9 # selects the first 10 blocks every 2:2 # selects every other point in every other block every ::5::15 # selects points 5 through 15 in each block See ^ <a href="http://www.gnuplot.info/demo/simple.html"> simple plot demos (simple.dem) ^ </a> , ^ <a href="http://www.gnuplot.info/demo/surface1.html"> Non-parametric splot demos ^ </a> , and ^ <a href="http://www.gnuplot.info/demo/surface2.html"> Parametric splot demos ^ </a> . 4 example datafile ?commands plot datafile example ?plot datafile example ?plot example ?datafile example ?data-file example ?example This example plots the data in the file "population.dat" and a theoretical curve: pop(x) = 103*exp((1965-x)/10) set xrange [1960:1990] plot 'population.dat', pop(x) The file "population.dat" might contain: # Gnu population in Antarctica since 1965 1965 103 1970 55 1975 34 1980 24 1985 10 =skip Binary examples: # Selects two float values (second one implicit) with a float value # discarded between them for an indefinite length of 1D data. plot '<file_name>' binary format="%float%*float" using 1:2 with lines # The data file header contains all details necessary for creating # coordinates from an EDF file. plot '<file_name>' binary filetype=edf with image plot '<file_name>.edf' binary filetype=auto with image # Selects three unsigned characters for components of a raw RGB image # and flips the y-dimension so that typical image orientation (start # at top left corner) translates to the Cartesian plane. Pixel # spacing is given and there are two images in the file. One of them # is translated via origin. plot '<file_name>' binary array=(512,1024):(1024,512) format='%uchar' \ dx=2:1 dy=1:2 origin=(0,0):(1024,1024) flipy u 1:2:3 w rgbimage # Four separate records in which the coordinates are part of the # data file. The file was created with a endianess different from # the system on which gnuplot is running. splot '<file_name>' binary record=30:30:29:26 endian=swap u 1:2:3 # Same input file, but this time we skip the 1st and 3rd records splot '<file_name>' binary record=30:26 skip=360:348 endian=swap u 1:2:3 See also `binary matrix`. 4 index ?commands plot datafile index ?plot datafile index ?plot index ?data-file index ?datafile index ?index The `index` keyword allows you to select specific data sets in a multi-data-set file for plotting. Syntax: plot 'file' index { <m>{:<n>{:<p>}} | "<name>" } Data sets are separated by pairs of blank records. `index <m>` selects only set <m>; `index <m>:<n>` selects sets in the range <m> to <n>; and `index <m>:<n>:<p>` selects indices <m>, <m>+<p>, <m>+2<p>, etc., but stopping at <n>. Following C indexing, the index 0 is assigned to the first data set in the file. Specifying too large an index results in an error message. If <p> is specified but <n> is left blank then every <p>-th dataset is read until the end of the file. If `index` is not specified, the entire file is plotted as a single data set. Example: plot 'file' index 4:5 For each point in the file, the index value of the data set it appears in is available via the pseudo-column `column(-2)`. This leads to an alternative way of distinguishing individual data sets within a file as shown below. This is more awkward than the `index` command if all you are doing is selecting one data set for plotting, but is very useful if you want to assign different properties to each data set. See `pseudocolumns`, `lc variable`. Example: plot 'file' using 1:(column(-2)==4 ? $2 : NaN) # very awkward plot 'file' using 1:2:(column(-2)) linecolor variable # very useful! `index '<name>'` selects the data set with name '<name>'. Names are assigned to data sets in comment lines. The comment character and leading white space are removed from the comment line. If the resulting line starts with <name>, the following data set is now named <name> and can be selected. Example: plot 'file' index 'Population' Please note that every comment that starts with <name> will name the following data set. To avoid problems it may be useful to choose a naming scheme like '== Population ==' or '[Population]'. ^ <p>See also web page ^ <a href="http://www.gnuplot.info/demo/multimsh.html"> ^ splot with indices demo. ^ </a></p> 4 smooth ?commands plot datafile smooth ?plot datafile smooth ?plot smooth ?data-file smooth ?datafile smooth ?smooth `gnuplot` includes a few general-purpose routines for interpolation and approximation of data; these are grouped under the `smooth` option. More sophisticated data processing may be performed by preprocessing the data externally or by using `fit` with an appropriate model. Syntax: smooth {unique | frequency | cumulative | cnormal | kdensity | csplines | acsplines | bezier | sbezier} `unique`, `frequency`, `cumulative` and `cnormal` plot the data after making them monotonic. Each of the other routines uses the data to determine the coefficients of a continuous curve between the endpoints of the data. This curve is then plotted in the same manner as a function, that is, by finding its value at uniform intervals along the abscissa (see `set samples`) and connecting these points with straight line segments (if a line style is chosen). If `autoscale` is in effect, the ranges will be computed such that the plotted curve lies within the borders of the graph. If `autoscale` is not in effect, and the smooth option is either `acspline` or `cspline`, the sampling of the generated curve is done across the intersection of the x range covered by the input data and the fixed abscissa range as defined by `set xrange`. If too few points are available to allow the selected option to be applied, an error message is produced. The minimum number is one for `unique` and `frequency`, four for `acsplines`, and three for the others. The `smooth` options have no effect on function plots. 5 acsplines ?commands plot datafile smooth acsplines ?plot datafile smooth acsplines ?data-file smooth acsplines ?datafile smooth acsplines ?plot smooth acsplines ?plot acsplines ?smooth acsplines ?acsplines The `acsplines` option approximates the data with a "natural smoothing spline". After the data are made monotonic in x (see `smooth unique`), a curve is piecewise constructed from segments of cubic polynomials whose coefficients are found by the weighting the data points; the weights are taken from the third column in the data file. That default can be modified by the third entry in the `using` list, e.g., plot 'data-file' using 1:2:(1.0) smooth acsplines Qualitatively, the absolute magnitude of the weights determines the number of segments used to construct the curve. If the weights are large, the effect of each datum is large and the curve approaches that produced by connecting consecutive points with natural cubic splines. If the weights are small, the curve is composed of fewer segments and thus is smoother; the limiting case is the single segment produced by a weighted linear least squares fit to all the data. The smoothing weight can be expressed in terms of errors as a statistical weight for a point divided by a "smoothing factor" for the curve so that (standard) errors in the file can be used as smoothing weights. Example: sw(x,S)=1/(x*x*S) plot 'data_file' using 1:2:(sw($3,100)) smooth acsplines 5 bezier ?commands plot datafile smooth bezier ?plot datafile smooth bezier ?plot smooth bezier ?data-file smooth bezier ?datafile smooth bezier ?plot bezier ?smooth bezier ?bezier The `bezier` option approximates the data with a Bezier curve of degree n (the number of data points) that connects the endpoints. 5 csplines ?commands plot datafile smooth csplines ?plot datafile smooth csplines ?plot smooth csplines ?data-file smooth csplines ?datafile smooth csplines ?plot csplines ?smooth csplines ?csplines The `csplines` option connects consecutive points by natural cubic splines after rendering the data monotonic (see `smooth unique`). 5 sbezier ?commands plot datafile smooth sbezier ?plot datafile smooth sbezier ?plot smooth sbezier ?data-file smooth sbezier ?datafile smooth sbezier ?plot sbezier ?smooth sbezier ?sbezier The `sbezier` option first renders the data monotonic (`unique`) and then applies the `bezier` algorithm. 5 unique ?commands plot datafile smooth unique ?plot datafile smooth unique ?plot smooth unique ?data-file smooth unique ?datafile smooth unique ?plot unique ?smooth unique ?unique The `unique` option makes the data monotonic in x; points with the same x-value are replaced by a single point having the average y-value. The resulting points are then connected by straight line segments. 5 frequency ?commands plot datafile smooth frequency ?plot datafile smooth frequency ?plot smooth frequency ?data-file smooth frequency ?datafile smooth frequency ?plot frequency ?smooth frequency ?frequency The `frequency` option makes the data monotonic in x; points with the same x-value are replaced by a single point having the summed y-values. The resulting points are then connected by straight line segments. See also ^ <a href="http://www.gnuplot.info/demo/smooth.html"> smooth.dem ^ </a> 5 cumulative ?commands plot datafile smooth cumulative ?plot datafile smooth cumulative ?plot smooth cumulative ?data-file smooth cumulative ?datafile smooth cumulative ?plot cumulative ?smooth cumulative ?cumulative The `cumulative` option makes the data monotonic in x; points with the same x-value are replaced by a single point containing the cumulative sum of y-values of all data points with lower x-values (i.e. to the left of the current data point). This can be used to obtain a cumulative distribution function from data. See also ^ <a href="http://www.gnuplot.info/demo/smooth.html"> smooth.dem ^ </a> 5 cnormal ?commands plot datafile smooth cnormal ?plot datafile smooth cnormal ?plot smooth cnormal ?data-file smooth cnormal ?datafile smooth cnormal ?plot cnormal ?smooth cnormal ?cnormal The `cnormal` option makes the data monotonic in x and normalises the y-values onto the range [0:1]. Points with the same x-value are replaced by a single point containing the cumulative sum of y-values of all data points with lower x-values (i.e. to the left of the current data point) divided by the total sum of all y-values. This can be used to obtain a normalised cumulative distribution function from data (useful when comparing sets of samples with differing numbers of members). See also ^ <a href="http://www.gnuplot.info/demo/smooth.html"> smooth.dem ^ </a> 5 kdensity ?commands plot datafile smooth kdensity ?plot datafile smooth kdensity ?plot smooth kdensity ?data-file smooth kdensity ?datafile smooth kdensity ?plot kdensity ?smooth kdensity ?kdensity The `kdensity` option is a way to plot a kernel density estimate (which is a smooth histogram) for a random collection of points, using Gaussian kernels. A Gaussian is placed at the location of each point in the first column and the sum of all these Gaussians is plotted as a function. The value in the second column is taken as weight of the Gaussian. (To obtain a normalized histogram, this should be 1/number-of-points). The value of the third column, if supplied, is taken as the bandwidth for the kernels. If only two columns have been specified, or if the value of the third column is zero or less, gnuplot calculates the bandwidth which would be optimal if the input data was normally distributed. (This will usually be a very conservative, i.e. broad bandwidth.) 4 special-filenames ?commands plot datafile special-filenames ?plot datafile special-filenames ?plot special-filenames ?datafile special-filenames ?special-filenames There are a few filenames that have a special meaning: '', '-', '+' and '++'. The empty filename '' tells gnuplot to re-use the previous input file in the same plot command. So to plot two columns from the same input file: plot 'filename' using 1:2, '' using 1:3 The special filenames '+' and '++' are a mechanism to allow the full range of `using` specifiers and plot styles with in-line functions. Normally a function plot can only have a single y (or z) value associated with each sampled point. The pseudo-file '+' treats the sampled points as column 1, and allows additional column values to be specified via a `using` specification, just as for a true input file. The number of samples returned is controlled by `set samples`. Example: plot '+' using ($1):(sin($1)):(sin($1)**2) with filledcurves Similarly the pseudo-file '++' returns 2 columns of data forming a regular grid of [x,y] coordinates with the number of points along x controlled by `set samples` and the number of points along y controlled by `set isosamples`. You must set xrange and yrange before plotting '++'. Examples: splot '++' using 1:2:(sin($1)*sin($2)) with pm3d plot '++' using 1:2:(sin($1)*sin($2)) with image The special filename `'-'` specifies that the data are inline; i.e., they follow the command. Only the data follow the command; `plot` options like filters, titles, and line styles remain on the `plot` command line. This is similar to << in unix shell script, and $DECK in VMS DCL. The data are entered as though they are being read from a file, one data point per record. The letter "e" at the start of the first column terminates data entry. The `using` option can be applied to these data---using it to filter them through a function might make sense, but selecting columns probably doesn't! `'-'` is intended for situations where it is useful to have data and commands together, e.g., when `gnuplot` is run as a sub-process of some front-end application. Some of the demos, for example, might use this feature. While `plot` options such as `index` and `every` are recognized, their use forces you to enter data that won't be used. For example, while plot '-' index 0, '-' index 1 2 4 6 10 12 14 e 2 4 6 10 12 14 e does indeed work, plot '-', '-' 2 4 6 e 10 12 14 e is a lot easier to type. If you use `'-'` with `replot`, you may need to enter the data more than once. See `replot`, `refresh`. A blank filename ('') specifies that the previous filename should be reused. This can be useful with things like plot 'a/very/long/filename' using 1:2, '' using 1:3, '' using 1:4 (If you use both `'-'` and `''` on the same `plot` command, you'll need to have two sets of inline data, as in the example above.) On systems with a popen function, the datafile can be piped through a shell command by starting the file name with a '<'. For example, pop(x) = 103*exp(-x/10) plot "< awk '{print $1-1965, $2}' population.dat", pop(x) would plot the same information as the first population example but with years since 1965 as the x axis. If you want to execute this example, you have to delete all comments from the data file above or substitute the following command for the first part of the command above (the part up to the comma): plot "< awk '$0 !~ /^#/ {print $1-1965, $2}' population.dat" While this approach is most flexible, it is possible to achieve simple filtering with the `using` or `thru` keywords. On systems with an fdopen() function, data can be read from an arbitrary file descriptor attached to either a file or pipe. To read from file descriptor `n` use `'<&n'`. This allows you to easily pipe in several data files in a single call from a POSIX shell: $ gnuplot -p -e "plot '<&3', '<&4'" 3<data-3 4<data-4 $ ./gnuplot 5< <(myprogram -with -options) gnuplot> plot '<&5' 4 thru ?commands plot datafile thru ?plot datafile thru ?plot thru ?data-file thru ?datafile thru ?thru The `thru` function is provided for backward compatibility. Syntax: plot 'file' thru f(x) It is equivalent to: plot 'file' using 1:(f($2)) While the latter appears more complex, it is much more flexible. The more natural plot 'file' thru f(y) also works (i.e. you can use y as the dummy variable). `thru` is parsed for `splot` and `fit` but has no effect. 4 using ?commands plot datafile using ?plot datafile using ?plot using ?data-file using ?datafile using ?using The most common datafile modifier is `using`. It tells the program which columns of data in the input file are to be plotted. Syntax: plot 'file' using <entry> {:<entry> {:<entry> ...}} {'format'} If a format is specified, it is used to read in each datafile record using the C library 'scanf' function. Otherwise the record is interpreted as consisting of columns (fields) of data separated by whitespace (spaces and/or tabs), but see `datafile separator`. Each <entry> may be a simple column number that selects the value from one field of the input file, a string that matches a column label in the first line of a data set, an expression enclosed in parentheses, or a special function not enclosed in parentheses such as xticlabels(2). If the entry is an expression in parentheses, then the function column(N) may be used to indicate the value in column N. That is, column(1) refers to the first item read, column(2) to the second, and so on. The special symbols $1, $2, ... are shorthand for column(1), column(2) ... The function `valid(N)` tests whether the value in the Nth column is a valid number. =column =columnhead If each column of data in the input file contains a label in the first row rather than a data value, this label can be used to identify the column on input and/or in the plot legend. The column() function can be used to select an input column by label rather than by column number. For example, if the data file contains Height Weight Age val1 val1 val1 ... ... ... then the following plot commands are all equivalent plot 'datafile' using 3:1, '' using 3:2 plot 'datafile' using (column("Age")):(column(1)), \ '' using (column("Age")):(column(2)) plot 'datafile' using "Age":"Height", '' using "Age":"Weight" The full string must match. Comparison is case-sensitive. To use the column labels in the plot legend, use `set key autotitle columnhead`. In addition to the actual columns 1...N in the input data file, gnuplot presents data from several "pseudo-columns" that hold bookkeeping information. E.g. $0 or column(0) returns the sequence number of this data record within a dataset. Please see `pseudocolumns`. An empty <entry> will default to its order in the list of entries. For example, `using ::4` is interpreted as `using 1:2:4`. If the `using` list has only a single entry, that <entry> will be used for y and the data point number (pseudo-column $0) is used for x; for example, "`plot 'file' using 1`" is identical to "`plot 'file' using 0:1`". If the `using` list has two entries, these will be used for x and y. See `set style` and `fit` for details about plotting styles that make use of data from additional columns of input. 'scanf' accepts several numerical specifications but `gnuplot` requires all inputs to be double-precision floating-point variables, so "%lf" is essentially the only permissible specifier. A format string given by the user must contain at least one such input specifier, and no more than seven of them. 'scanf' expects to see white space---a blank, tab ("\t"), newline ("\n"), or formfeed ("\f")---between numbers; anything else in the input stream must be explicitly skipped. Note that the use of "\t", "\n", or "\f" requires use of double-quotes rather than single-quotes. 5 using_examples ?examples ?commands plot datafile using examples ?plot datafile using examples ?datafile using examples ?using examples This creates a plot of the sum of the 2nd and 3rd data against the first: The format string specifies comma- rather than space-separated columns. The same result could be achieved by specifying `set datafile separator ","`. plot 'file' using 1:($2+$3) '%lf,%lf,%lf' In this example the data are read from the file "MyData" using a more complicated format: plot 'MyData' using "%*lf%lf%*20[^\n]%lf" The meaning of this format is: %*lf ignore a number %lf read a double-precision number (x by default) %*20[^\n] ignore 20 non-newline characters %lf read a double-precision number (y by default) One trick is to use the ternary `?:` operator to filter data: plot 'file' using 1:($3>10 ? $2 : 1/0) which plots the datum in column two against that in column one provided the datum in column three exceeds ten. `1/0` is undefined; `gnuplot` quietly ignores undefined points, so unsuitable points are suppressed. Or you can use the pre-defined variable NaN to achieve the same result. =NaN In fact, you can use a constant expression for the column number, provided it doesn't start with an opening parenthesis; constructs like `using 0+(complicated expression)` can be used. The crucial point is that the expression is evaluated once if it doesn't start with a left parenthesis, or once for each data point read if it does. If timeseries data are being used, the time can span multiple columns. The starting column should be specified. Note that the spaces within the time must be included when calculating starting columns for other data. E.g., if the first element on a line is a time with an embedded space, the y value should be specified as column three. It should be noted that `plot 'file'`, `plot 'file' using 1:2`, and `plot 'file' using ($1):($2)` can be subtly different: 1) if `file` has some lines with one column and some with two, the first will invent x values when they are missing, the second will quietly ignore the lines with one column, and the third will store an undefined value for lines with one point (so that in a plot with lines, no line joins points across the bad point); 2) if a line contains text at the first column, the first will abort the plot on an error, but the second and third should quietly skip the garbage. In fact, it is often possible to plot a file with lots of lines of garbage at the top simply by specifying plot 'file' using 1:2 However, if you want to leave text in your data files, it is safer to put the comment character (#) in the first column of the text lines. 5 pseudocolumns ?pseudocolumns ?commands plot datafile using pseudocolumns ?plot datafile using pseudocolumns ?datafile using pseudocolumns ?using pseudocolumns Expressions in the `using` clause of a plot statement can refer to additional bookkeeping values in addition to the actual data values contained in the input file. These are contained in "pseudocolumns". column(0) The sequential order of each point within a data set. The counter starts at 0 and is reset by two sequential blank records. The shorthand form $0 is available. column(-1) This counter starts at 0 and is reset by a single blank line. This corresponds to the data line in array or grid data. column(-2) The index number of the current data set within a file that contains multiple data sets. See `index`. 5 xticlabels ?xticlabels ?using xticlabels ?plot using xticlabels Axis tick labels can be generated via a string function, usually taking a data column as an argument. The simplest form uses the data column itself as a string. That is, xticlabels(N) is shorthand for xticlabels(stringcolumn(N)). This example uses the contents of column 3 as x-axis tick labels. plot 'datafile' using <xcol>:<ycol>:xticlabels(3) with <plotstyle> Axis tick labels may be generated for any of the plot axes: x x2 y y2 z. The `ticlabels(<labelcol>)` specifiers must come after all of the data coordinate specifiers in the `using` portion of the command. For each data point which has a valid set of X,Y[,Z] coordinates, the string value given to xticlabels() is added to the list of xtic labels at the same X coordinate as the point it belongs to. `xticlabels()` may be shortened to `xtic()` and so on. Example: splot "data" using 2:4:6:xtic(1):ytic(3):ztic(6) In this example the x and y axis tic labels are taken from different columns than the x and y coordinate values. The z axis tics, however, are generated from the z coordinate of the corresponding point. Example: plot "data" using 1:2:xtic( $3 > 10. ? "A" : "B" ) This example shows the use of a string-valued function to generate x-axis tick labels. Each point in the data file generates a tick mark on x labeled either "A" or "B" depending on the value in column 3. 5 x2ticlabels ?using x2ticlabels ?plot using x2ticlabels See `plot using xticlabels`. 5 yticlabels ?using yticlabels ?plot using yticlabels See `plot using xticlabels`. 5 y2ticlabels ?using y2ticlabels ?plot using y2ticlabels See `plot using xticlabels`. 5 zticlabels ?using zticlabels ?plot using zticlabels See `plot using xticlabels`. 4 volatile ?datafile volatile ?data volatile ?plot datafile volatile ?plot volatile ?volatile The `volatile` keyword in a plot command indicates that the data previously read from the input stream or file may not be available for re-reading. This tells the program to use `refresh` rather than `replot` commands whenever possible. See `refresh`. 3 errorbars ?commands plot errorbars ?commands splot errorbars ?plot errorbars ?splot errorbars ?errorbars Error bars are supported for 2D data file plots by reading one to four additional columns (or `using` entries); these additional values are used in different ways by the various errorbar styles. In the default situation, `gnuplot` expects to see three, four, or six numbers on each line of the data file---either (x, y, ydelta), (x, y, ylow, yhigh), (x, y, xdelta), (x, y, xlow, xhigh), (x, y, xdelta, ydelta), or (x, y, xlow, xhigh, ylow, yhigh). The x coordinate must be specified. The order of the numbers must be exactly as given above, though the `using` qualifier can manipulate the order and provide values for missing columns. For example, plot 'file' with errorbars plot 'file' using 1:2:(sqrt($1)) with xerrorbars plot 'file' using 1:2:($1-$3):($1+$3):4:5 with xyerrorbars The last example is for a file containing an unsupported combination of relative x and absolute y errors. The `using` entry generates absolute x min and max from the relative error. The y error bar is a vertical line plotted from (x, ylow) to (x, yhigh). If ydelta is specified instead of ylow and yhigh, ylow = y - ydelta and yhigh = y + ydelta are derived. If there are only two numbers on the record, yhigh and ylow are both set to y. The x error bar is a horizontal line computed in the same fashion. To get lines plotted between the data points, `plot` the data file twice, once with errorbars and once with lines (but remember to use the `notitle` option on one to avoid two entries in the key). Alternately, use the errorlines command (see `errorlines`). The error bars have crossbars at each end unless `set bars` is used (see `set bars` for details). If autoscaling is on, the ranges will be adjusted to include the error bars. See also ^ <a href="http://www.gnuplot.info/demo/mgr.html"> errorbar demos. ^ </a> See `plot using`, `plot with`, and `set style` for more information. 3 errorlines ?commands plot errorlines ?commands splot errorlines ?plot errorlines ?splot errorlines ?errorlines Lines with error bars are supported for 2D data file plots by reading one to four additional columns (or `using` entries); these additional values are used in different ways by the various errorlines styles. In the default situation, `gnuplot` expects to see three, four, or six numbers on each line of the data file---either (x, y, ydelta), (x, y, ylow, yhigh), (x, y, xdelta), (x, y, xlow, xhigh), (x, y, xdelta, ydelta), or (x, y, xlow, xhigh, ylow, yhigh). The x coordinate must be specified. The order of the numbers must be exactly as given above, though the `using` qualifier can manipulate the order and provide values for missing columns. For example, plot 'file' with errorlines plot 'file' using 1:2:(sqrt($1)) with xerrorlines plot 'file' using 1:2:($1-$3):($1+$3):4:5 with xyerrorlines The last example is for a file containing an unsupported combination of relative x and absolute y errors. The `using` entry generates absolute x min and max from the relative error. The y error bar is a vertical line plotted from (x, ylow) to (x, yhigh). If ydelta is specified instead of ylow and yhigh, ylow = y - ydelta and yhigh = y + ydelta are derived. If there are only two numbers on the record, yhigh and ylow are both set to y. The x error bar is a horizontal line computed in the same fashion. The error bars have crossbars at each end unless `set bars` is used (see `set bars` for details). If autoscaling is on, the ranges will be adjusted to include the error bars. See `plot using`, `plot with`, and `set style` for more information. 3 functions ?commands plot functions ?plot functions ?functions Built-in or user-defined functions can be displayed by the `plot` and `splot` commands in addition to, or instead of, data read from a file. The requested function is evaluated by sampling at regular intervals spanning the independent axis range[s]. See `set samples` and `set isosamples`. Example: approx(ang) = ang - ang**3 / (3*2) plot sin(x) title "sin(x)", approx(x) title "approximation" To set a default plot style for functions, see `set style function`. For information on built-in functions, see `expressions functions`. For information on defining your own functions, see `user-defined`. 3 parametric ?commands plot parametric ?commands splot parametric ?plot parametric ?splot parametric When in parametric mode (`set parametric`) mathematical expressions must be given in pairs for `plot` and in triplets for `splot`. Examples: plot sin(t),t**2 splot cos(u)*cos(v),cos(u)*sin(v),sin(u) Data files are plotted as before, except any preceding parametric function must be fully specified before a data file is given as a plot. In other words, the x parametric function (`sin(t)` above) and the y parametric function (`t**2` above) must not be interrupted with any modifiers or data functions; doing so will generate a syntax error stating that the parametric function is not fully specified. Other modifiers, such as `with` and `title`, may be specified only after the parametric function has been completed: plot sin(t),t**2 title 'Parametric example' with linespoints See also ^ <a href="http://www.gnuplot.info/demo/param.html"> Parametric Mode Demos. ^ </a> 3 ranges ?commands plot ranges ?commands splot ranges ?plot ranges ?splot ranges ?ranges The optional axis ranges at the start of a plot command specify the region of the graph that will be displayed. These override any ranges established by a previous `set range` statement. Syntax: [{<dummy-var>=}{{<min>}:{<max>}}] [{{<min>}:{<max>}}] The first form applies to the independent variable (`xrange` or `trange`, if in parametric mode). The second form applies to the dependent variable `yrange` (and `xrange`, too, if in parametric mode). <dummy-var> is a new name for the independent variable. (The defaults may be changed with `set dummy`.) The optional <min> and <max> terms can be constant expressions or *. In non-parametric mode, the order in which ranges must be given is `xrange` and `yrange`. In parametric mode, the order for the `plot` command is `trange`, `xrange`, and `yrange`. The following `plot` command shows setting the `trange` to [-pi:pi], the `xrange` to [-1.3:1.3] and the `yrange` to [-1:1] for the duration of the graph: plot [-pi:pi] [-1.3:1.3] [-1:1] sin(t),t**2 Note that the x2range and y2range cannot be specified here---`set x2range` and `set y2range` must be used. Ranges are interpreted in the order listed above for the appropriate mode. Once all those needed are specified, no further ones must be listed, but unneeded ones cannot be skipped---use an empty range `[]` as a placeholder. `*` can be used to allow autoscaling of either of min and max. See also `set autoscale`. Ranges specified on the `plot` or `splot` command line affect only that graph; use the `set xrange`, `set yrange`, etc., commands to change the default ranges for future graphs. With time data, you must provide the range (in the same manner as the time appears in the datafile) within quotes. `gnuplot` uses the `timefmt` string to read the value---see `set timefmt`. Examples: This uses the current ranges: plot cos(x) This sets the x range only: plot [-10:30] sin(pi*x)/(pi*x) This is the same, but uses t as the dummy-variable: plot [t = -10 :30] sin(pi*t)/(pi*t) This sets both the x and y ranges: plot [-pi:pi] [-3:3] tan(x), 1/x This sets only the y range, and turns off autoscaling on both axes: plot [ ] [-2:sin(5)*-8] sin(x)**besj0(x) This sets xmax and ymin only: plot [:200] [-pi:] exp(sin(x)) This sets the x range for a timeseries: set timefmt "%d/%m/%y %H:%M" plot ["1/6/93 12:00":"5/6/93 12:00"] 'timedata.dat' 3 iteration ?commands plot iteration ?commands splot iteration ?plot iteration ?splot iteration =iteration If many similar files or functions are to be plotted together, it may be convenient to do so by iterating over a shared plot command. Syntax: plot for [<variable> = <start> : <end> {:<increment>}] plot for [<variable> in "string of words"] The scope of an iteration ends at the next comma or the end of the command, whichever comes first. Iteration can not be nested. This will plot one curve, sin(3x), because iteration ends at the comma plot for [i=1:3] j=i, sin(j*x) This will plot three curves because there is no comma after the definition of j plot for [i=1:3] j=i sin(j*x) Example: plot for [dataset in "apples bananas"] dataset."dat" title dataset In this example iteration is used both to generate a file name and a corresponding title. Example: file(n) = sprintf("dataset_%d.dat",n) splot for [i=1:10] file(i) title sprintf("dataset %d",i) This example defines a string-valued function that generates file names, and plots ten such files together. The iteration variable ('i' in this example) is treated as an integer, and may be used more than once. Example: set key left plot for [n=1:4] x**n sprintf("%d",n) This example plots a family of functions. Example: list = "apple banana cabbage daikon eggplant" item(n) = word(list,n) plot for [i=1:words(list)] item[i].".dat" title item(i) list = "new stuff" replot This example steps through a list and plots once per item. Because the items are retrieved dynamically, you can change the list and then replot. Example: list = "apple banana cabbage daikon eggplant" plot for [i in list] i.".dat" title i list = "new stuff" replot This is example does exactly the same thing as the previous example, but uses the string iterator form of the command rather than an integer iterator. 3 title ?commands plot title ?commands splot title ?plot title ?splot title ?columnheader By default each plot is listed in the key by the corresponding function or file name. You can give an explicit plot title instead using the `title` option. Syntax: title <text> | notitle [<ignored text>] title columnheader | title columnheader(N) where <text> is a quoted string or an expression that evaluates to a string. The quotes will not be shown in the key. There is also an option that will interpret the first entry in a column of input data (i.e. the column header) as a text field, and use it as the key title. See `datastrings`. This can be made the default by specifying `set key autotitle columnhead`. The line title and sample can be omitted from the key by using the keyword `notitle`. A null title (`title ''`) is equivalent to `notitle`. If only the sample is wanted, use one or more blanks (`title ' '`). If `notitle` is followed by a string this string is ignored. If `key autotitles` is set (which is the default) and neither `title` nor `notitle` are specified the line title is the function name or the file name as it appears on the `plot` command. If it is a file name, any datafile modifiers specified will be included in the default title. The layout of the key itself (position, title justification, etc.) can be controlled by `set key`. Please see `set key` for details. Examples: This plots y=x with the title 'x': plot x This plots x squared with title "x^2" and file "data.1" with title "measured data": plot x**2 title "x^2", 'data.1' t "measured data" This puts an untitled circular border around a polar graph: set polar; plot my_function(t), 1 notitle Plot multiple columns of data, each of which contains its own title in the file plot for [i=1:4] 'data' using i title columnhead 3 with ?commands plot with ?commands splot with ?commands plot style ?commands splot style ?plot with ?plot style ?splot with ?splot style ?style ?with Functions and data may be displayed in one of a large number of styles. The `with` keyword provides the means of selection. Syntax: with <style> { {linestyle | ls <line_style>} | {{linetype | lt <line_type>} {linewidth | lw <line_width>} {linecolor | lc <colorspec>} {pointtype | pt <point_type>} {pointsize | ps <point_size>} {fill | fs <fillstyle>} {nohidden3d} {nocontours} {nosurface} {palette}} } where <style> is one of lines dots steps errorbars xerrorbar xyerrorlines points impulses fsteps errorlines xerrorlines yerrorbars linespoints labels histeps financebars xyerrorbars yerrorlines vectors or boxes candlesticks image circles boxerrorbars filledcurves rgbimage ellipses boxxyerrorbars histograms rgbalpha pm3d boxplot The first group of styles have associated line, point, and text properties. The second group of styles also have fill properties. See `fillstyle`. Some styles have further sub-styles. See `plotting styles` for details of each. A default style may be chosen by `set style function` and `set style data`. By default, each function and data file will use a different line type and point type, up to the maximum number of available types. All terminal drivers support at least six different point types, and re-use them, in order, if more are required. To see the complete set of line and point types available for the current terminal, type `test`. If you wish to choose the line or point type for a single plot, <line_type> and <point_type> may be specified. These are positive integer constants (or expressions) that specify the line type and point type to be used for the plot. Use `test` to display the types available for your terminal. You may also scale the line width and point size for a plot by using <line_width> and <point_size>, which are specified relative to the default values for each terminal. The pointsize may also be altered globally---see `set pointsize` for details. But note that both <point_size> as set here and as set by `set pointsize` multiply the default point size---their effects are not cumulative. That is, `set pointsize 2; plot x w p ps 3` will use points three times default size, not six. It is also possible to specify `pointsize variable` either as part of a line style or for an individual plot. In this case one extra column of input is required, i.e. 3 columns for a 2D plot and 4 columns for a 3D splot. The size of each individual point is determined by multiplying the global pointsize by the value read from the data file. If you have defined specific line type/width and point type/size combinations with `set style line`, one of these may be selected by setting <line_style> to the index of the desired style. If gnuplot was built with `pm3d` support, the special keyword `palette` is allowed for smooth color change of lines, points and dots in `splots`. The color is chosen from a smooth palette which was set previously with the command `set palette`. The color value corresponds to the z-value of the point coordinates or to the color coordinate if specified by the 4th parameter in `using`. Both 2D and 3D plots (`plot` and `splot` commands) can use palette colors as specified by either their fractional value or the corresponding value mapped to the colorbox range. A palette color value can also be read from an explicitly specified input column in the `using` specifier. See `colors`, `set palette`, `linetype`. The keyword `nohidden3d` applies only to plots made with the `splot` command. Normally the global option `set hidden3d` applies to all plots in the graph. You can attach the `nohidden3d` option to any individual plots that you want to exclude from the hidden3d processing. The individual elements other than surfaces (i.e. lines, dots, labels, ...) of a plot marked `nohidden3d` will all be drawn, even if they would normally be obscured by other plot elements. Similarly, the keyword `nocontours` will turn off contouring for an individual plot even if the global property `set contour` is active. Similarly, the keyword `nosurface` will turn off the 3D surface for an individual plot even if the global property `set surface` is active. The keywords may be abbreviated as indicated. Note that the `linewidth`, `pointsize` and `palette` options are not supported by all terminals. Examples: This plots sin(x) with impulses: plot sin(x) with impulses This plots x with points, x**2 with the default: plot x w points, x**2 This plots tan(x) with the default function style, file "data.1" with lines: plot [ ] [-2:5] tan(x), 'data.1' with l This plots "leastsq.dat" with impulses: plot 'leastsq.dat' w i This plots the data file "population" with boxes: plot 'population' with boxes This plots "exper.dat" with errorbars and lines connecting the points (errorbars require three or four columns): plot 'exper.dat' w lines, 'exper.dat' notitle w errorbars Another way to plot "exper.dat" with errorlines (errorbars require three or four columns): plot 'exper.dat' w errorlines This plots sin(x) and cos(x) with linespoints, using the same line type but different point types: plot sin(x) with linesp lt 1 pt 3, cos(x) with linesp lt 1 pt 4 This plots file "data" with points of type 3 and twice usual size: plot 'data' with points pointtype 3 pointsize 2 This plots file "data" with variable pointsize read from column 4 plot 'data' using 1:2:4 with points pt 5 pointsize variable This plots two data sets with lines differing only by weight: plot 'd1' t "good" w l lt 2 lw 3, 'd2' t "bad" w l lt 2 lw 1 This plots filled curve of x*x and a color stripe: plot x*x with filledcurve closed, 40 with filledcurve y1=10 This plots x*x and a color box: plot x*x, (x>=-5 && x<=5 ? 40 : 1/0) with filledcurve y1=10 lt 8 This plots a surface with color lines: splot x*x-y*y with line palette This plots two color surfaces at different altitudes: splot x*x-y*y with pm3d, x*x+y*y with pm3d at t 2 print ?commands print ?print The `print` command prints the value of <expression> to the screen. It is synonymous with `pause 0`. <expression> may be anything that `gnuplot` can evaluate that produces a number, or it can be a string. Syntax: print <expression> {, <expression>, ...} See `expressions`. The output file can be set with `set print`. 2 pwd ?commands pwd ?pwd The `pwd` command prints the name of the working directory to the screen. Note that if you wish to store the current directory into a string variable or use it in string expressions, then you can use variable GPVAL_PWD, see `show variables all`. 2 quit ?commands quit ?quit The `exit` and `quit` commands and END-OF-FILE character will exit `gnuplot`. Each of these commands will clear the output device (as does the `clear` command) before exiting. 2 raise ?commands raise ?raise Syntax: raise {plot_window_nb} The `raise` command raises (opposite to `lower`) plot window(s) associated with the interactive terminal of your gnuplot session, i.e. `pm`, `win`, `wxt` or `x11`. It puts the plot window to front (top) in the z-order windows stack of the window manager of your desktop. As `x11` and `wxt` support multiple plot windows, then by default they raise these windows in descending order of most recently created on top to the least recently created on bottom. If a plot number is supplied as an optional parameter, only the associated plot window will be raised if it exists. The optional parameter is ignored for single plot-windows terminal, i.e. `pm` and `win`. If the window is not raised under X11, then perhaps the plot window is running in a different X11 session (telnet or ssh session, for example), or perhaps raising is blocked by your window manager policy setting. 2 refresh ?commands refresh ?refresh The `refresh` command is similar to `replot`, with two major differences. `refresh` reformats and redraws the current plot using the data already read in. This means that you can use `refresh` for plots with in-line data (pseudo-device '-') and for plots from datafiles whose contents are volatile. You cannot use the `refresh` command to add new data to an existing plot. Mousing operations, in particular zoom and unzoom, will use `refresh` rather than `replot` if appropriate. Example: plot 'datafile' volatile with lines, '-' with labels 100 200 "Special point" e # Various mousing operations go here set title "Zoomed in view" set term post set output 'zoom.ps' refresh 2 replot ?commands replot ?replot The `replot` command without arguments repeats the last `plot` or `splot` command. This can be useful for viewing a plot with different `set` options, or when generating the same plot for several devices. Arguments specified after a `replot` command will be added onto the last `plot` or `splot` command (with an implied ',' separator) before it is repeated. `replot` accepts the same arguments as the `plot` and `splot` commands except that ranges cannot be specified. Thus you can use `replot` to plot a function against the second axes if the previous command was `plot` but not if it was `splot`. N.B.---use of plot '-' ; ... ; replot is not recommended, because it will require that you type in the data all over again. In most cases you can use the `refresh` command instead, which will redraw the plot using the data previously read in. Note that `replot` does not work in `multiplot` mode, since it reproduces only the last plot rather than the entire screen. See also `command-line-editing` for ways to edit the last `plot` (`splot`) command. See also `show plot` to show the whole current plotting command, and the possibility to copy it into the `history`. 2 reread ?commands reread ?reread The `reread` command causes the current `gnuplot` command file, as specified by a `load` command or on the command line, to be reset to its starting point before further commands are read from it. This essentially implements an endless loop of the commands from the beginning of the command file to the `reread` command. (But this is not necessarily a disaster---`reread` can be very useful when used in conjunction with `if`.) The `reread` command has no effect if input from standard input. Examples: Suppose the file "looper" contains the commands a=a+1 plot sin(x*a) pause -1 if(a<5) reread and from within `gnuplot` you submit the commands a=0 load 'looper' The result will be five plots (separated by the `pause` message). Suppose the file "data" contains six columns of numbers with a total yrange from 0 to 10; the first is x and the next are five different functions of x. Suppose also that the file "plotter" contains the commands c_p = c_p+1 plot "$0" using 1:c_p with lines linetype c_p if(c_p < n_p) reread and from within `gnuplot` you submit the commands n_p=6 c_p=1 unset key set yrange [0:10] set multiplot call 'plotter' 'data' unset multiplot The result is a single graph consisting of five plots. The yrange must be set explicitly to guarantee that the five separate graphs (drawn on top of each other in multiplot mode) will have exactly the same axes. The linetype must be specified; otherwise all the plots would be drawn with the same type. See animate.dem in demo directory for an animated example. 2 reset ?commands reset ?reset ?reset errors ?reset bind The `reset` command causes all graph-related options that can be set with the `set` command to take on their default values. This command is useful, e.g., to restore the default graph settings at the end of a command file, or to return to a defined state after lots of settings have been changed within a command file. Please refer to the `set` command to see the default values that the various options take. The following are _not_ affected by `reset`. `set term` `set output` `set loadpath` `set fontpath` `set linetype` `set encoding` `set decimalsign` `set locale` `set psdir` =error state `reset errors` clears only the error state variables GPVAL_ERRNO and GPVAL_ERRMSG. =bind `reset bind` restores all hotkey bindings to their default state. 2 save ?commands save ?save set ?save The `save` command saves user-defined functions, variables, the `set term` status, all `set` options, or all of these, plus the last `plot` (`splot`) command to the specified file. Syntax: save {<option>} '<filename>' where <option> is `functions`, `variables`, `terminal` or `set`. If no option is used, `gnuplot` saves functions, variables, `set` options and the last `plot` (`splot`) command. `save`d files are written in text format and may be read by the `load` command. For `save` with the `set` option or without any option, the `terminal` choice and the `output` filename are written out as a comment, to get an output file that works in other installations of gnuplot, without changes and without risk of unwillingly overwriting files. `save terminal` will write out just the `terminal` status, without the comment marker in front of it. This is mainly useful for switching the `terminal` setting for a short while, and getting back to the previously set terminal, afterwards, by loading the saved `terminal` status. Note that for a single gnuplot session you may rather use the other method of saving and restoring current terminal by the commands `set term push` and `set term pop`, see `set term`. The filename must be enclosed in quotes. The special filename "-" may be used to `save` commands to standard output. On systems which support a popen function (Unix), the output of save can be piped through an external program by starting the file name with a '|'. This provides a consistent interface to `gnuplot`'s internal settings to programs which communicate with `gnuplot` through a pipe. Please see help for `batch/interactive` for more details. Examples: save 'work.gnu' save functions 'func.dat' save var 'var.dat' save set 'options.dat' save term 'myterm.gnu' save '-' save '|grep title >t.gp' 2 set-show ?commands set ?commands show ?set ?show ?show all The `set` command can be used to set _lots_ of options. No screen is drawn, however, until a `plot`, `splot`, or `replot` command is given. The `show` command shows their settings; `show all` shows all the settings. Options changed using `set` can be returned to the default state by giving the corresponding `unset` command. See also the `reset` command, which returns all settable parameters to default values. If a variable contains time/date data, `show` will display it according to the format currently defined by `set timefmt`, even if that was not in effect when the variable was initially defined. =iteration The `set` and `unset` commands may optionally contain an iteration clause. See `iteration`. 3 angles ?commands set angles ?commands show angles ?set angles ?show angles ?angles ?commands set angles degrees ?set angles degrees ?angles degrees ?degrees By default, `gnuplot` assumes the independent variable in polar graphs is in units of radians. If `set angles degrees` is specified before `set polar`, then the default range is [0:360] and the independent variable has units of degrees. This is particularly useful for plots of data files. The angle setting also applies to 3D mapping as set via the `set mapping` command. Syntax: set angles {degrees | radians} show angles The angle specified in `set grid polar` is also read and displayed in the units specified by `set angles`. `set angles` also affects the arguments of the machine-defined functions sin(x), cos(x) and tan(x), and the outputs of asin(x), acos(x), atan(x), atan2(x), and arg(x). It has no effect on the arguments of hyperbolic functions or Bessel functions. However, the output arguments of inverse hyperbolic functions of complex arguments are affected; if these functions are used, `set angles radians` must be in effect to maintain consistency between input and output arguments. x={1.0,0.1} set angles radians y=sinh(x) print y #prints {1.16933, 0.154051} print asinh(y) #prints {1.0, 0.1} but set angles degrees y=sinh(x) print y #prints {1.16933, 0.154051} print asinh(y) #prints {57.29578, 5.729578} See also ^ <a href="http://www.gnuplot.info/demo/poldat.html"> poldat.dem: polar plot using `set angles` demo. ^ </a> 3 arrow ?commands set arrow ?commands unset arrow ?commands show arrow ?set arrow ?unset arrow ?show arrow ?arrow ?noarrow Arbitrary arrows can be placed on a plot using the `set arrow` command. Syntax: set arrow {<tag>} {from <position>} {to|rto <position>} { {arrowstyle | as <arrow_style>} | { {nohead | head | backhead | heads} {size <length>,<angle>{,<backangle>}} {filled | empty | nofilled} {front | back} { {linestyle | ls <line_style>} | {linetype | lt <line_type>} {linewidth | lw <line_width} } } } unset arrow {<tag>} show arrow {<tag>} <tag> is an integer that identifies the arrow. If no tag is given, the lowest unused tag value is assigned automatically. The tag can be used to delete or change a specific arrow. To change any attribute of an existing arrow, use the `set arrow` command with the appropriate tag and specify the parts of the arrow to be changed. The <position>s are specified by either x,y or x,y,z, and may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. Unspecified coordinates default to 0. The end points can be specified in one of five coordinate systems---`first` or `second` axes, `graph`, `screen`, or `character`. See `coordinates` for details. A coordinate system specifier does not carry over from the "from" position to the "to" position. Arrows outside the screen boundaries are permitted but may cause device errors. If the end point is specified by "rto" instead of "to" it is drawn relatively to the start point. For linear axes, `graph` and `screen` coordinates, the distance between the start and the end point corresponds to the given relative coordinate. For logarithmic axes, the relative given coordinate corresponds to the factor of the coordinate between start and end point. Thus, a negative relative value or zero are not allowed for logarithmic axes. Specifying `nohead` produces an arrow drawn without a head---a line segment. This gives you yet another way to draw a line segment on the plot. By default, an arrow has a head at its end. Specifying `backhead` draws an arrow head at the start point of the arrow while `heads` draws arrow heads on both ends of the line. Not all terminal types support double-ended arrows. Head size can be controlled by `size <length>,<angle>` or `size <length>,<angle>,<backangle>`, where `<length>` defines length of each branch of the arrow head and `<angle>` the angle (in degrees) they make with the arrow. `<Length>` is in x-axis units; this can be changed by `first`, `second`, `graph`, `screen`, or `character` before the <length>; see `coordinates` for details. `<Backangle>` only takes effect when `filled` or `empty` is also used. Then, `<backangle>` is the angle (in degrees) the back branches make with the arrow (in the same direction as `<angle>`). The `fig` terminal has a restricted backangle function. It supports three different angles. There are two thresholds: Below 70 degrees, the arrow head gets an indented back angle. Above 110 degrees, the arrow head has an acute back angle. Between these thresholds, the back line is straight. Specifying `filled` produces filled arrow heads (if heads are used). Filling is supported on filled-polygon capable terminals, see help of `pm3d` for their list, otherwise the arrow heads are closed but not filled. The same result (closed but not filled arrow head) is reached by specifying `empty`. Further, filling and outline is obviously not supported on terminals drawing arrows by their own specific routines, like `metafont`, `metapost`, `latex` or `tgif`. The line style may be selected from a user-defined list of line styles (see `set style line`) or may be defined here by providing values for <line_type> (an index from the default list of styles) and/or <line_width> (which is a multiplier for the default width). Note, however, that if a user-defined line style has been selected, its properties (type and width) cannot be altered merely by issuing another `set arrow` command with the appropriate index and `lt` or `lw`. If `front` is given, the arrow is written on top of the graphed data. If `back` is given (the default), the arrow is written underneath the graphed data. Using `front` will prevent an arrow from being obscured by dense data. Examples: To set an arrow pointing from the origin to (1,2) with user-defined style 5, use: set arrow to 1,2 ls 5 To set an arrow from bottom left of plotting area to (-5,5,3), and tag the arrow number 3, use: set arrow 3 from graph 0,0 to -5,5,3 To change the preceding arrow to end at 1,1,1, without an arrow head and double its width, use: set arrow 3 to 1,1,1 nohead lw 2 To draw a vertical line from the bottom to the top of the graph at x=3, use: set arrow from 3, graph 0 to 3, graph 1 nohead To draw a vertical arrow with T-shape ends, use: set arrow 3 from 0,-5 to 0,5 heads size screen 0.1,90 To draw an arrow relatively to the start point, where the relative distances are given in graph coordinates, use: set arrow from 0,-5 rto graph 0.1,0.1 To draw an arrow with relative end point in logarithmic x axis, use: set logscale x set arrow from 100,-5 rto 10,10 This draws an arrow from 100,-5 to 1000,5. For the logarithmic x axis, the relative coordinate 10 means "factor 10" while for the linear y axis, the relative coordinate 10 means "difference 10". To delete arrow number 2, use: unset arrow 2 To delete all arrows, use: unset arrow To show all arrows (in tag order), use: show arrow ^ <a href="http://www.gnuplot.info/demo/arrowstyle.html"> arrows demos. ^ </a> 3 autoscale ?commands set autoscale ?commands unset autoscale ?commands show autoscale ?set autoscale ?unset autoscale ?show autoscale ?autoscale ?noautoscale Autoscaling may be set individually on the x, y or z axis or globally on all axes. The default is to autoscale all axes. If you want to autoscale based on a subset of the plots in the figure, you can mark the other ones with the flag `noautoscale`. See `datafile`. Syntax: set autoscale {<axes>{|min|max|fixmin|fixmax|fix} | fix | keepfix} unset autoscale {<axes>} show autoscale where <axes> is either `x`, `y`, `z`, `cb`, `x2`, `y2` or `xy`. A keyword with `min` or `max` appended (this cannot be done with `xy`) tells `gnuplot` to autoscale just the minimum or maximum of that axis. If no keyword is given, all axes are autoscaled. A keyword with `fixmin`, `fixmax` or `fix` appended tells gnuplot to disable extension of the axis range to the next tic mark position, for autoscaled axes using equidistant tics; `set autoscale fix` sets this for all axes. Command `set autoscale keepfix` autoscales all axes while keeping the fix settings. When autoscaling, the axis range is automatically computed and the dependent axis (y for a `plot` and z for `splot`) is scaled to include the range of the function or data being plotted. If autoscaling of the dependent axis (y or z) is not set, the current y or z range is used. Autoscaling the independent variables (x for `plot` and x,y for `splot`) is a request to set the domain to match any data file being plotted. If there are no data files, autoscaling an independent variable has no effect. In other words, in the absence of a data file, functions alone do not affect the x range (or the y range if plotting z = f(x,y)). Please see `set xrange` for additional information about ranges. The behavior of autoscaling remains consistent in parametric mode, (see `set parametric`). However, there are more dependent variables and hence more control over x, y, and z axis scales. In parametric mode, the independent or dummy variable is t for `plot`s and u,v for `splot`s. `autoscale` in parametric mode, then, controls all ranges (t, u, v, x, y, and z) and allows x, y, and z to be fully autoscaled. Autoscaling works the same way for polar mode as it does for parametric mode for `plot`, with the extension that in polar mode `set dummy` can be used to change the independent variable from t (see `set dummy`). When tics are displayed on second axes but no plot has been specified for those axes, x2range and y2range are inherited from xrange and yrange. This is done _before_ xrange and yrange are autoextended to a whole number of tics, which can cause unexpected results. You can use the `fixmin` or `fixmax` options to avoid this. Examples: This sets autoscaling of the y axis (other axes are not affected): set autoscale y This sets autoscaling only for the minimum of the y axis (the maximum of the y axis and the other axes are not affected): set autoscale ymin This disables extension of the x2 axis tics to the next tic mark, thus keeping the exact range as found in the plotted data and functions: set autoscale x2fixmin set autoscale x2fixmax This sets autoscaling of the x and y axes: set autoscale xy This sets autoscaling of the x, y, z, x2 and y2 axes: set autoscale This disables autoscaling of the x, y, z, x2 and y2 axes: unset autoscale This disables autoscaling of the z axis only: unset autoscale z 4 parametric mode ?commands set autoscale parametric ?set autoscale parametric ?set autoscale t When in parametric mode (`set parametric`), the xrange is as fully scalable as the y range. In other words, in parametric mode the x axis can be automatically scaled to fit the range of the parametric function that is being plotted. Of course, the y axis can also be automatically scaled just as in the non-parametric case. If autoscaling on the x axis is not set, the current x range is used. Data files are plotted the same in parametric and non-parametric mode. However, there is a difference in mixed function and data plots: in non-parametric mode with autoscaled x, the x range of the datafile controls the x range of the functions; in parametric mode it has no influence. For completeness a last command `set autoscale t` is accepted. However, the effect of this "scaling" is very minor. When `gnuplot` determines that the t range would be empty, it makes a small adjustment if autoscaling is true. Otherwise, `gnuplot` gives an error. Such behavior may, in fact, not be very useful and the command `set autoscale t` is certainly questionable. `splot` extends the above ideas as you would expect. If autoscaling is set, then x, y, and z ranges are computed and each axis scaled to fit the resulting data. 4 polar mode ?commands set autoscale polar ?set autoscale polar When in polar mode (`set polar`), the xrange and the yrange may be left in autoscale mode. If `set rrange` is used to limit the extent of the polar axis, then xrange and yrange will adjust to match this automatically. However, explicit xrange and yrange commands can later be used to make further adjustments. See `set rrange`. The trange may also be autoscaled. Note that if the trange is contained within one quadrant, autoscaling will produce a polar plot of only that single quadrant. Explicitly setting one or two ranges but not others may lead to unexpected results. See also ^ <a href="http://www.gnuplot.info/demo/poldat.html"> polar demos. ^ </a> 3 bars ?commands set bars ?commands show bars ?set bars ?show bars ?bars The `set bars` command controls the tics at the ends of error bars, and also at the end of the whiskers belonging to a boxplot. Syntax: set bars {small | large | fullwidth | <size>} {front | back} unset bars show bars `small` is a synonym for 0.0, and `large` for 1.0. The default is 1.0 if no size is given. The keyword `fullwidth` is relevant only to boxplots and to histograms with errorbars. It sets the width of the errorbar ends to be the same as the width of the associated box. It does not change the width of the box itself. The `front` and `back` keywords are relevant only to errorbars attached to filled rectangles (boxes, candlesticks, histograms). 3 bind ?commands show bind ?show bind =bind Show the current state of all hotkey bindings. See `bind`. 3 bmargin ?commands set bmargin ?set bmargin ?bmargin The command `set bmargin` sets the size of the bottom margin. Please see `set margin` for details. 3 border ?commands set border ?commands unset border ?commands show border ?set border ?unset border ?show border ?border ?noborder The `set border` and `unset border` commands control the display of the graph borders for the `plot` and `splot` commands. Note that the borders do not necessarily coincide with the axes; with `plot` they often do, but with `splot` they usually do not. Syntax: set border {<integer>} {front | back} {linewidth | lw <line_width>} {{linestyle | ls <line_style>} | {linetype | lt <line_type>}} unset border show border With a `splot` displayed in an arbitrary orientation, like `set view 56,103`, the four corners of the x-y plane can be referred to as "front", "back", "left" and "right". A similar set of four corners exist for the top surface, of course. Thus the border connecting, say, the back and right corners of the x-y plane is the "bottom right back" border, and the border connecting the top and bottom front corners is the "front vertical". (This nomenclature is defined solely to allow the reader to figure out the table that follows.) The borders are encoded in a 12-bit integer: the bottom four bits control the border for `plot` and the sides of the base for `splot`; the next four bits control the verticals in `splot`; the top four bits control the edges on top of the `splot`. In detail, `<integer>` should be the sum of the appropriate entries from the following table: @start table - first is interactive cleartext form Bit plot splot 1 bottom bottom left front 2 left bottom left back 4 top bottom right front 8 right bottom right back 16 no effect left vertical 32 no effect back vertical 64 no effect right vertical 128 no effect front vertical 256 no effect top left back 512 no effect top right back 1024 no effect top left front 2048 no effect top right front #\begin{tabular}{|c|c|c|} \hline #\multicolumn{3}{|c|}{Graph Border Encoding} \\ \hline \hline #Bit & plot & splot \\ \hline #1 & bottom & bottom left front \\ #2 & left & bottom left back \\ #4 & top & bottom right front \\ #8 & right & bottom right back \\ #16 & no effect & left vertical \\ #32 & no effect & back vertical \\ #64 & no effect & right vertical \\ #128 & no effect & front vertical \\ #256 & no effect & top left back \\ #512 & no effect & top right back \\ #1024 & no effect & top left front \\ #2048 & no effect & top right front \\ %c c c . %Bit@plot@splot %_ %1@bottom@bottom left front %2@left@bottom left back %4@top@bottom right front %8@right@bottom right back %16@no effect@left vertical %32@no effect@back vertical %64@no effect@right vertical %128@no effect@front vertical %256@no effect@top left back %512@no effect@top right back %1024@no effect@top left front %2048@no effect@top right front @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="right"> ^ <col align="center"> ^ <col align="center"> ^</colgroup> ^<thead> ^<tr> <th>Bit</th> <th>plot</th> <th>splot</th></tr> ^</thead> ^<tbody> ^<tr> <td>1</td> <td>bottom</td> <td>bottom left front</td></tr> ^<tr> <td>2</td> <td>left</td> <td>bottom left back</td></tr> ^<tr> <td>4</td> <td>top</td> <td>bottom right front</td></tr> ^<tr> <td>8</td> <td>right</td> <td>bottom right back</td></tr> ^<tr> <td>16</td> <td>no effect</td> <td>left vertical</td></tr> ^<tr> <td>32</td> <td>no effect</td> <td>back vertical</td></tr> ^<tr> <td>64</td> <td>no effect</td> <td>right vertical</td></tr> ^<tr> <td>128</td> <td>no effect</td> <td>front vertical</td></tr> ^<tr> <td>256</td> <td>no effect</td> <td>top left back</td></tr> ^<tr> <td>512</td> <td>no effect</td> <td>top right back</td></tr> ^<tr> <td>1024</td> <td>no effect</td> <td>top left front</td></tr> ^<tr> <td>2048</td> <td>no effect</td> <td>top right front</td></tr> ^</tbody> ^</table> Various bits or combinations of bits may be added together in the command. The default is 31, which is all four sides for `plot`, and base and z axis for `splot`. In 2D plots the border is normally drawn on top of all plots elements (`front`). If you want the border to be drawn behind the plot elements, use `set border back`. Using the optional <line_style>, <line_type> and <line_width> specifiers, the way the border lines are drawn can be influenced (limited by what the current terminal driver supports). For `plot`, tics may be drawn on edges other than bottom and left by enabling the second axes -- see `set xtics` for details. If a `splot` draws only on the base, as is the case with "`unset surface; set contour base`", then the verticals and the top are not drawn even if they are specified. The `set grid` options 'back', 'front' and 'layerdefault' also control the order in which the border lines are drawn with respect to the output of the plotted data. Examples: Draw default borders: set border Draw only the left and bottom (`plot`) or both front and back bottom left (`splot`) borders: set border 3 Draw a complete box around a `splot`: set border 4095 Draw a topless box around a `splot`, omitting the front vertical: set border 127+256+512 # or set border 1023-128 Draw only the top and right borders for a `plot` and label them as axes: unset xtics; unset ytics; set x2tics; set y2tics; set border 12 3 boxwidth ?commands set boxwidth ?commands show boxwidth ?set boxwidth ?show boxwidth ?boxwidth The `set boxwidth` command is used to set the default width of boxes in the `boxes`, `boxerrorbars`, `boxplot`, `candlesticks` and `histograms` styles. Syntax: set boxwidth {<width>} {absolute|relative} show boxwidth By default, adjacent boxes are extended in width until they touch each other. A different default width may be specified using the `set boxwidth` command. `Relative` widths are interpreted as being a fraction of this default width. An explicit value for the boxwidth is interpreted as being a number of units along the current x axis (`absolute`) unless the modifier `relative` is given. If the x axis is a log-scale (see `set log`) then the value of boxwidth is truly "absolute" only at x=1; this physical width is maintained everywhere along the axis (i.e. the boxes do not become narrower the value of x increases). If the range spanned by a log scale x axis is far from x=1, some experimentation may be required to find a useful value of boxwidth. The default is superseded by explicit width information taken from an extra data column in styles `boxes` or `boxerrorbars`. In a four-column data set, the fourth column will be interpreted as the box width unless the width is set to -2.0, in which case the width will be calculated automatically. See `style boxes` and `style boxerrorbars` for more details. To set the box width to automatic use the command set boxwidth or, for four-column data, set boxwidth -2 The same effect can be achieved with the `using` keyword in `plot`: plot 'file' using 1:2:3:4:(-2) To set the box width to half of the automatic size use set boxwidth 0.5 relative To set the box width to an absolute value of 2 use set boxwidth 2 absolute 3 clabel ?commands set clabel ?commands unset clabel ?commands show clabel ?set clabel ?unset clabel ?show clabel ?clabel `gnuplot` will vary the linetype used for each contour level when clabel is set. When this option on (the default), a legend labels each linestyle with the z level it represents. It is not possible at present to separate the contour labels from the surface key. Syntax: set clabel {'<format>'} unset clabel show clabel The default for the format string is %8.3g, which gives three decimal places. This may produce poor label alignment if the key is altered from its default configuration. The first contour linetype, or only contour linetype when clabel is off, is the surface linetype +1; contour points are the same style as surface points. See also `set contour`. 3 clip ?commands set clip ?commands unset clip ?commands show clip ?set clip ?unset clip ?show clip ?clip ?noclip `gnuplot` can clip data points and lines that are near the boundaries of a graph. Syntax: set clip <clip-type> unset clip <clip-type> show clip Three clip types for points and lines are supported by `gnuplot`: `points`, `one`, and `two`. One, two, or all three clip types may be active for a single graph. Note that clipping of color filled quadrangles drawn by `pm3d` maps and surfaces is not controlled by this command, but by `set pm3d clip1in` and `set pm3d clip4in`. The `points` clip type forces `gnuplot` to clip (actually, not plot at all) data points that fall within but too close to the boundaries. This is done so that large symbols used for points will not extend outside the boundary lines. Without clipping points near the boundaries, the plot may look bad. Adjusting the x and y ranges may give similar results. Setting the `one` clip type causes `gnuplot` to draw a line segment which has only one of its two endpoints within the graph. Only the in-range portion of the line is drawn. The alternative is to not draw any portion of the line segment. Some lines may have both endpoints out of range, but pass through the graph. Setting the `two` clip-type allows the visible portion of these lines to be drawn. In no case is a line drawn outside the graph. The defaults are `noclip points`, `clip one`, and `noclip two`. To check the state of all forms of clipping, use show clip For backward compatibility with older versions, the following forms are also permitted: set clip unset clip `set clip` is synonymous with `set clip points`; `unset clip` turns off all three types of clipping. 3 cntrparam ?commands set cntrparam ?commands show cntrparam ?set cntrparam ?show cntrparam ?cntrparam `set cntrparam` controls the generation of contours and their smoothness for a contour plot. `show contour` displays current settings of `cntrparam` as well as `contour`. Syntax: set cntrparam { { linear | cubicspline | bspline | points <n> | order <n> | levels { auto {<n>} | <n> | discrete <z1> {,<z2>{,<z3>...}} | incremental <start>, <incr> {,<end>} } } } show contour This command has two functions. First, it sets the values of z for which contour points are to be determined (by linear interpolation between data points or function isosamples.) Second, it controls the way contours are drawn between the points determined to be of equal z. <n> should be an integral constant expression and <z1>, <z2> ... any constant expressions. The parameters are: `linear`, `cubicspline`, `bspline`---Controls type of approximation or interpolation. If `linear`, then straight line segments connect points of equal z magnitude. If `cubicspline`, then piecewise-linear contours are interpolated between the same equal z points to form somewhat smoother contours, but which may undulate. If `bspline`, a guaranteed-smoother curve is drawn, which only approximates the position of the points of equal-z. `points`---Eventually all drawings are done with piecewise-linear strokes. This number controls the number of line segments used to approximate the `bspline` or `cubicspline` curve. Number of cubicspline or bspline segments (strokes) = `points` * number of linear segments. `order`---Order of the bspline approximation to be used. The bigger this order is, the smoother the resulting contour. (Of course, higher order bspline curves will move further away from the original piecewise linear data.) This option is relevant for `bspline` mode only. Allowed values are integers in the range from 2 (linear) to 10. `levels`--- Selection of contour levels, controlled by `auto` (default), `discrete`, `incremental`, and <n>, number of contour levels. For `auto`, <n> specifies a nominal number of levels; the actual number will be adjusted to give simple labels. If the surface is bounded by zmin and zmax, contours will be generated at integer multiples of dz between zmin and zmax, where dz is 1, 2, or 5 times some power of ten (like the step between two tic marks). For `levels discrete`, contours will be generated at z = <z1>, <z2> ... as specified; the number of discrete levels sets the number of contour levels. In `discrete` mode, any `set cntrparam levels <n>` are ignored. For `incremental`, contours are generated at values of z beginning at <start> and increasing by <increment>, until the number of contours is reached. <end> is used to determine the number of contour levels, which will be changed by any subsequent `set cntrparam levels <n>`. If the z axis is logarithmic, <increment> will be interpreted as a factor, just like in `set ztics`. If the command `set cntrparam` is given without any arguments specified, the defaults are used: linear, 5 points, order 4, 5 auto levels. Examples: set cntrparam bspline set cntrparam points 7 set cntrparam order 10 To select levels automatically, 5 if the level increment criteria are met: set cntrparam levels auto 5 To specify discrete levels at .1, .37, and .9: set cntrparam levels discrete .1,1/exp(1),.9 To specify levels from 0 to 4 with increment 1: set cntrparam levels incremental 0,1,4 To set the number of levels to 10 (changing an incremental end or possibly the number of auto levels): set cntrparam levels 10 To set the start and increment while retaining the number of levels: set cntrparam levels incremental 100,50 See also `set contour` for control of where the contours are drawn, and `set clabel` for control of the format of the contour labels and linetypes. See also ^ <a href="http://www.gnuplot.info/demo/contours.html"> contours demo (contours.dem) ^ </a> and ^ <a href="http://www.gnuplot.info/demo/discrete.html"> contours with user defined levels demo (discrete.dem). ^ </a> 3 color box ?commands set colorbox ?commands show colorbox ?commands unset colorbox ?set colorbox ?show colorbox ?unset colorbox ?colorbox The color scheme, i.e. the gradient of the smooth color with min_z and max_z values of `pm3d`'s `palette`, is drawn in a color box unless `unset colorbox`. set colorbox set colorbox { { vertical | horizontal } { default | user } { origin x, y } { size x, y } { front | back } { noborder | bdefault | border [line style] } } show colorbox unset colorbox Color box position can be `default` or `user`. If the latter is specified the values as given with the `origin` and `size` subcommands are used. The box can be drawn after (`front`) or before (`back`) the graph or the surface. The orientation of the color gradient can be switched by options `vertical` and `horizontal`. `origin x, y` and `size x, y` are used only in combination with the `user` option. The x and y values are interpreted as screen coordinates by default, and this is the only legal option for 3D plots. 2D plots, including splot with `set view map`, allow any coordinate system to be specified. Try for example: set colorbox horiz user origin .1,.02 size .8,.04 which will draw a horizontal gradient somewhere at the bottom of the graph. `border` turns the border on (this is the default). `noborder` turns the border off. If an positive integer argument is given after `border`, it is used as a line style tag which is used for drawing the border, e.g.: set style line 2604 linetype -1 linewidth .4 set colorbox border 2604 will use line style `2604`, a thin line with the default border color (-1) for drawing the border. `bdefault` (which is the default) will use the default border line style for drawing the border of the color box. The axis of the color box is called `cb` and it is controlled by means of the usual axes commands, i.e. `set/unset/show` with `cbrange`, `[m]cbtics`, `format cb`, `grid [m]cb`, `cblabel`, and perhaps even `cbdata`, `[no]cbdtics`, `[no]cbmtics`. `set colorbox` without any parameter switches the position to default. `unset colorbox` resets the default parameters for the colorbox and switches the colorbox off. See also help for `set pm3d`, `set palette`, `x11 pm3d`, and `set style line`. 3 colornames ?colornames ?show colornames ?commands show colornames ?show palette colornames Gnuplot knows a limited number of color names. You can use these to define the color range spanned by a pm3d palette, or to assign a terminal-independent color to a particular linetype or linestyle. To see the list of known color names, use the command `show colornames`. Example: set style line 1 linecolor rgb "sea-green" 3 contour ?commands set contour ?commands unset contour ?commands show contour ?set contour ?unset contour ?show contour ?contour ?nocontour `set contour` enables contour drawing for surfaces. This option is available for `splot` only. It requires grid data, see `grid_data` for more details. If contours are desired from non-grid data, `set dgrid3d` can be used to create an appropriate grid. Syntax: set contour {base | surface | both} unset contour show contour The three options specify where to draw the contours: `base` draws the contours on the grid base where the x/ytics are placed, `surface` draws the contours on the surfaces themselves, and `both` draws the contours on both the base and the surface. If no option is provided, the default is `base`. See also `set cntrparam` for the parameters that affect the drawing of contours, and `set clabel` for control of labelling of the contours. The surface can be switched off (see `set surface`), giving a contour-only graph. Though it is possible to use `set size` to enlarge the plot to fill the screen, more control over the output format can be obtained by writing the contour information to a file, and rereading it as a 2D datafile plot: unset surface set contour set cntrparam ... set table 'filename' splot ... unset table # contour info now in filename set term <whatever> plot 'filename' In order to draw contours, the data should be organized as "grid data". In such a file all the points for a single y-isoline are listed, then all the points for the next y-isoline, and so on. A single blank line (a line containing no characters other than blank spaces and a carriage return and/or a line feed) separates one y-isoline from the next. See also `splot datafile`. See also ^ <a href="http://www.gnuplot.info/demo/contours.html"> contours demo (contours.dem) ^ </a> and ^ <a href="http://www.gnuplot.info/demo/discrete.html"> contours with user defined levels demo (discrete.dem). ^ </a> 3 data style ?set data style This form of the command is deprecated. Please see `set style data`. 3 datafile ?set datafile ?show datafile The `set datafile` command options control interpretation of fields read from input data files by the `plot`, `splot`, and `fit` commands. Six such options are currently implemented. 4 set datafile fortran ?set datafile fortran ?show datafile fortran ?fortran The `set datafile fortran` command enables a special check for values in the input file expressed as Fortran D or Q constants. This extra check slows down the input process, and should only be selected if you do in fact have datafiles containing Fortran D or Q constants. The option can be disabled again using `unset datafile fortran`. 4 set datafile nofpe_trap ?set datafile nofpe_trap ?fpe_trap ?nofpe_trap =floating point exceptions The `set datafile nofpe_trap` command tells gnuplot not to re-initialize a floating point exception handler before every expression evaluation used while reading data from an input file. This can significantly speed data input from very large files at the risk of program termination if a floating-point exception is generated. 4 set datafile missing ?set datafile missing ?show datafile missing ?set missing ?missing The `set datafile missing` command allows you to tell `gnuplot` what character string is used in a data file to denote missing data. Exactly how this missing value will be treated depends on the `using` specifier of the `plot` or `splot` command. Syntax: set datafile missing {"<string>"} show datafile missing unset datafile Example: # Ignore entries containing IEEE NaN ("Not a Number") code set datafile missing "NaN" Example: set style data linespoints plot '-' 1 10 2 20 3 ? 4 40 5 50 e set datafile missing "?" plot '-' 1 10 2 20 3 ? 4 40 5 50 e plot '-' using 1:2 1 10 2 20 3 ? 4 40 5 50 e plot '-' using 1:($2) 1 10 2 20 3 ? 4 40 5 50 e The first `plot` will recognize only the first datum in the "3 ?" line. It will use the single-datum-on-a-line convention that the line number is "x" and the datum is "y", so the point will be plotted (in this case erroneously) at (2,3). The second and third `plot` commands will correctly ignore the middle line. The plotted line will connect the points at (2,20) and (4,40). The fourth `plot` will also correctly ignore the middle line, but the plotted line will not connect the points at (2,20) and (4,40). There is no default character for `missing`, but in many cases any non-parsible string of characters found where a numerical value is expected will be treated as missing data. 4 set datafile separator ?set datafile separator ?show datafile separator ?datafile separator ?separator The command `set datafile separator "<char>"` tells `gnuplot` that data fields in subsequent input files are separated by <char> rather than by whitespace. The most common use is to read in csv (comma-separated value) files written by spreadsheet or database programs. By default data fields are separated by whitespace. Syntax: set datafile separator {"<char>" | whitespace} Examples: # Input file contains tab-separated fields set datafile separator "\t" # Input file contains comma-separated values fields set datafile separator "," 4 set datafile commentschars ?set datafile commentschars ?commentschars The `set datafile commentschars` command allows you to tell `gnuplot` what characters are used in a data file to denote comments. Gnuplot will ignore rest of the line behind the specified characters if either of them is the first non-blank character on the line. Syntax: set datafile commentschars {"<string>"} show datafile commentschars unset commentschars Default value of the string is "#!" on VMS and "#" otherwise. Then, the following line in a data file is completely ignored # 1 2 3 4 but the following 1 # 3 4 produces rather unexpected plot unless set datafile missing '#' is specified as well. Example: set datafile commentschars "#!%" 4 set datafile binary ?set datafile binary The `set datafile binary` command is used to set the defaults when reading binary data files. The syntax matches precisely that used for commands `plot` and `splot`. See `binary matrix` and `binary general` for details about the keywords that can be present in <binary list>. Syntax: set datafile binary <binary list> show datafile binary show datafile unset datafile Examples: set datafile binary filetype=auto set datafile binary array=(512,512) format="%uchar" ?show datafile binary show datafile binary # list current settings 3 decimalsign ?commands set decimalsign ?commands show decimalsign ?commands unset decimalsign ?set decimalsign ?show decimalsign ?unset decimalsign ?decimalsign =locale The `set decimalsign` command selects a decimal sign for numbers printed into tic labels or `set label` strings. Syntax: set decimalsign {<value> | locale {"<locale>"}} unset decimalsign show decimalsign The argument <value> is a string to be used in place of the usual decimal point. Typical choices include the period, '.', and the comma, ',', but others may be useful, too. If you omit the <value> argument, the decimal separator is not modified from the usual default, which is a period. Unsetting decimalsign has the same effect as omitting <value>. Example: Correct typesetting in most European countries requires: set decimalsign ',' Please note: If you set an explicit string, this affects only numbers that are printed using gnuplot's gprintf() formatting routine, include axis tics. It does not affect the format expected for input data, and it does not affect numbers printed with the sprintf() formatting routine. To change the behavior of both input and output formatting, instead use the form set decimalsign locale This instructs the program to use both input and output formats in accordance with the current setting of the LC_ALL, LC_NUMERIC, or LANG environmental variables. set decimalsign locale "foo" This instructs the program to format all input and output in accordance with locale "foo", which must be installed. If locale "foo" is not found then an error message is printed and the decimal sign setting is unchanged. On linux systems you can get a list of the locales installed on your machine by typing "locale -a". A typical linux locale string is of the form "sl_SI.UTF-8". A typical Windows locale string is of the form "Slovenian_Slovenia.1250" or "slovenian". Please note that interpretation of the locale settings is done by the C library at runtime. Older C libraries may offer only partial support for locale settings such as the thousands grouping separator character. set decimalsign locale; set decimalsign "." This sets all input and output to use whatever decimal sign is correct for the current locale, but over-rides this with an explicit '.' in numbers formatted using gnuplot's internal gprintf() function. 3 dgrid3d ?commands set dgrid3d ?commands unset dgrid3d ?commands show dgrid3d ?set dgrid3d ?unset dgrid3d ?show dgrid3d ?dgrid3d ?nodgrid3d ?kdensity2d The `set dgrid3d` command enables, and can set parameters for, non-grid to grid data mapping. See `splot grid_data` for more details about the grid data structure. Syntax: set dgrid3d {<rows>} {,{<cols>}} { splines | qnorm {<norm>} | (gauss | cauchy | exp | box | hann) {kdensity} {<dx>} {,<dy>} } unset dgrid3d show dgrid3d By default `dgrid3d` is disabled. When enabled, 3D data read from a file are always treated as a scattered data set. A grid with dimensions derived from a bounding box of the scattered data and size as specified by the row/col_size parameters is created for plotting and contouring. The grid is equally spaced in x (rows) and in y (columns); the z values are computed as weighted averages or spline interpolations of the scattered points' z values. In other words, a regularly spaced grid is created and the a smooth approximation to the raw data is evaluated for all grid points. This approximation is plotted in place of the raw data. The number of columns defaults to the number of rows, which defaults to 10. Several algorithms are available to calculate the approximation from the raw data. Some of these algorithms can take additional parameters. These interpolations are such the closer the data point is to a grid point, the more effect it has on that grid point. The `splines` algorithm calculates an interpolation based on "thin plate splines". It does not take additional parameters. The `qnorm` algorithm calculates a weighted average of the input data at each grid point. Each data point is weighted inversely by its distance from the grid point raised to the norm power. (Actually, the weights are given by the inverse of dx^norm + dy^norm, where dx and dy are the components of the separation of the grid point from each data point. For some norms that are powers of two, specifically 4, 8, and 16, the computation is optimized by using the Euclidean distance in the weight calculation, (dx^2+dy^2)^norm/2. However, any non-negative integer can be used.) The power of the norm can be specified as a single optional parameter. This algorithm is the default. Finally, several smoothing kernels are available to calculate weighted averages: z = Sum_i w(d_i) * z_i / Sum_i w(d_i), where z_i is the value of the i-th data point and d_i is the distance between the current grid point and the location of the i-th data point. All kernels assign higher weights to data points that are close to the current grid point and lower weights to data points further away. The following kernels are available: gauss : w(d) = exp(-d*d) cauchy : w(d) = 1/(1 + d*d) exp : w(d) = exp(-d) box : w(d) = 1 if d<1 = 0 otherwise hann : w(d) = 0.5*(1-cos(2*pi*d)) if d<1 w(d) = 0 otherwise When using one of these five smoothing kernels, up to two additional numerical parameters can be specified: dx and dy. These are used to rescale the coordinate differences when calculating the distance: d_i = sqrt( ((x-x_i)/dx)**2 + ((y-y_i)/dy)**2 ), where x,y are the coordinates of the current grid point and x_i,y_i are the coordinates of the i-th data point. The value of dy defaults to the value of dx, which defaults to 1. The parameters dx and dy make it possible to control the radius over which data points contribute to a grid point IN THE UNITS OF THE DATA ITSELF. The optional keyword `kdensity2d`, which must come after the name of the kernel, but before the (optional) scale parameters, modifies the algorithm so that the values calculated for the grid points are not divided by the sum of the weights ( z = Sum_i w(d_i) * z_i ). If all z_i are constant, this effectively plots a bivariate kernel density estimate: a kernel function (one of the five defined above) is placed at each data point, the sum of these kernels is evaluated at every grid point, and this smooth surface is plotted instead of the original data. This is similar in principle to + what the `smooth kdensity` option does to 1D datasets. (See kdensity2d.dem for usage demo) A slightly different syntax is also supported for reasons of backwards compatibility. If no interpolation algorithm has been explicitly selected, the `qnorm` algorithm is assumed. Up to three comma-separated, optional parameters can be specified, which are interpreted as the the number of rows, the number of columns, and the norm value, respectively. The `dgrid3d` option is a simple scheme which replaces scattered data with weighted averages on a regular grid. More sophisticated approaches to this problem exist and should be used to preprocess the data outside `gnuplot` if this simple solution is found inadequate. See also ^ <a href="http://www.gnuplot.info/demo/dgrid3d.html"> dgrid3d.dem: dgrid3d demo. ^ </a> and ^ <a href="http://www.gnuplot.info/demo/scatter.html"> scatter.dem: dgrid3d demo. ^ </a> 3 dummy ?commands set dummy ?commands show dummy ?set dummy ?show dummy ?dummy The `set dummy` command changes the default dummy variable names. Syntax: set dummy {<dummy-var>} {,<dummy-var>} show dummy By default, `gnuplot` assumes that the independent, or "dummy", variable for the `plot` command is "t" if in parametric or polar mode, or "x" otherwise. Similarly the independent variables for the `splot` command are "u" and "v" in parametric mode (`splot` cannot be used in polar mode), or "x" and "y" otherwise. It may be more convenient to call a dummy variable by a more physically meaningful or conventional name. For example, when plotting time functions: set dummy t plot sin(t), cos(t) At least one dummy variable must be set on the command; `set dummy` by itself will generate an error message. Examples: set dummy u,v set dummy ,s The second example sets the second variable to s. 3 encoding ?commands set encoding ?commands show encoding ?set encoding ?show encoding ?encoding ?encodings =UTF-8 =SJIS The `set encoding` command selects a character encoding. Syntax: set encoding {<value>} set encoding locale show encoding Valid values are default - tells a terminal to use its default encoding iso_8859_1 - the most common Western European encoding used by many Unix workstations and by MS-Windows. This encoding is known in the PostScript world as 'ISO-Latin1'. iso_8859_15 - a variant of iso_8859_1 that includes the Euro symbol iso_8859_2 - used in Central and Eastern Europe iso_8859_9 - used in Turkey (also known as Latin5) koi8r - popular Unix cyrillic encoding koi8u - ukrainian Unix cyrillic encoding cp437 - codepage for MS-DOS cp850 - codepage for OS/2, Western Europe cp852 - codepage for OS/2, Central and Eastern Europe cp950 - MS version of Big5 (emf terminal only) cp1250 - codepage for MS Windows, Central and Eastern Europe cp1251 - codepage for 8-bit Russian, Serbian, Bulgarian, Macedonian cp1254 - codepage for MS Windows, Turkish (superset of Latin5) sjis - shift-JIS Japanese encoding utf8 - variable-length (multibyte) representation of Unicode entry point for each character The command `set encoding locale` is different from the other options. It attempts to determine the current locale from the runtime environment. On most systems this is controlled by the environmental variables LC_ALL, LC_CTYPE, or LANG. This mechanism is necessary, for example, to pass multibyte character encodings such as UTF-8 or EUC_JP to the wxt and cairopdf terminals. This command does not affect the locale-specific representation of dates or numbers. See also `set locale` and `set decimalsign`. Generally you must set the encoding before setting the terminal type. Note that encoding is not supported by all terminal drivers and that the device must be able to produce the desired non-standard characters. 3 fit ?commands set fit ?commands show fit ?set fit ?show fit The `fit` setting defines where the `fit` command writes its output. Syntax: set fit {logfile {"<filename>"}} {{no}errorvariables} {{no}quiet} unset fit show fit The <filename> argument must be enclosed in single or double quotes. If no filename is given or `unset fit` is used the log file is reset to its default value "fit.log" or the value of the environmental variable `FIT_LOG`. If the given logfile name ends with a / or \, it is interpreted to be a directory name, and the actual filename will be "fit.log" in that directory. If the `errorvariables` option is turned on, the error of each fitted parameter computed by `fit` will be copied to a user-defined variable whose name is formed by appending "_err" to the name of the parameter itself. This is useful mainly to put the parameter and its error onto a plot of the data and the fitted function, for reference, as in: set fit errorvariables fit f(x) 'datafile' using 1:2 via a, b print "error of a is:", a_err set label 'a=%6.2f', a, '+/- %6.2f', a_err plot 'datafile' using 1:2, f(x) By default the information written to the log file is also echoed to the terminal session. `set fit quiet` turns off the echo. 3 fontpath ?commands set fontpath ?commands show fontpath ?set fontpath ?show fontpath ?fontpath The `fontpath` setting defines additional locations for font files searched when including font files. Currently only the postscript terminal supports `fontpath`. If a file cannot be found in the current directory, the directories in `fontpath` are tried. Further documentation concerning the supported file formats is included in the `terminal postscript` section of the documentation. Syntax: set fontpath {"pathlist1" {"pathlist2"...}} show fontpath Path names may be entered as single directory names, or as a list of path names separated by a platform-specific path separator, eg. colon (':') on Unix, semicolon (';') on DOS/Windows/OS/2 platforms. The `show fontpath`, `save` and `save set` commands replace the platform-specific separator with a space character (' ') for maximum portability. If a directory name ends with an exclamation mark ('!') also the subdirectories of this directory are searched for font files. If the environmental variable GNUPLOT_FONTPATH is set, its contents are appended to `fontpath`. If it is not set, a system dependent default value is used. It is set by testing several directories for existence when using the fontpath the first time. Thus, the first call of `set fontpath`, `show fontpath`, `save fontpath`, `plot`, or `splot` with embedded font files takes a little more time. If you want to save this time you may set the environmental variable GNUPLOT_FONTPATH since probing is switched off, then. You can find out which is the default fontpath by using `show fontpath`. `show fontpath` prints the contents of the user-defined fontpath and the system fontpath separately. However, the `save` and `save set` commands save only the user-specified parts of `fontpath`. For terminal drivers that access fonts by filename via the gd library, the font search path is controlled by the environmental variable GDFONTPATH. 3 format ?commands set format ?commands show format ?set format ?show format ?format ?format cb The format of the tic-mark labels can be set with the `set format` command or with the `set tics format` or individual `set {axis}tics format` commands. Syntax: set format {<axes>} {"<format-string>"} set format {<axes>} {'<format-string>'} show format where <axes> is either `x`, `y`, `xy`, `x2`, `y2`, `z`, `cb` or nothing (which applies the format to all axes). The following two commands are equivalent: set format y "%.2f" set ytics format "%.2f" The length of the string is restricted to 100 characters. The default format is "% g", but other formats such as "%.2f" or "%3.0em" are often desirable. The format "$%g$" is often desirable for LaTeX. If no format string is given, the format will be returned to the default. If the empty string "" is given, tics will have no labels, although the tic mark will still be plotted. To eliminate the tic marks, use `unset xtics` or `set tics scale 0`. Newline (\n) and enhanced text markup is accepted in the format string. Use double-quotes rather than single-quotes in this case. See also `syntax`. Characters not preceded by "%" are printed verbatim. Thus you can include spaces and labels in your format string, such as "%g m", which will put " m" after each number. If you want "%" itself, double it: "%g %%". See also `set xtics` for more information about tic labels, and `set decimalsign` for how to use non-default decimal separators in numbers printed this way. See also ^ <a href="http://www.gnuplot.info/demo/electron.html"> electron demo (electron.dem). ^ </a> 4 gprintf ?gprintf The string function gprintf("format",x) uses gnuplot's own format specifiers, as do the gnuplot commands `set format`, `set timestamp`, and others. These format specifiers are not the same as those used by the standard C-language routine sprintf(). gprintf() accepts only a single variable to be formatted. Gnuplot also provides an sprintf("format",x1,x2,...) routine if you prefer. For a list of gnuplot's format options, see `format specifiers`. 4 format specifiers ?commands set format specifiers ?set format specifiers ?format specifiers ?format_specifiers The acceptable formats (if not in time/date mode) are: @start table - first is interactive cleartext form Format Explanation %f floating point notation %e or %E exponential notation; an "e" or "E" before the power %g or %G the shorter of %e (or %E) and %f %x or %X hex %o or %O octal %t mantissa to base 10 %l mantissa to base of current logscale %s mantissa to base of current logscale; scientific power %T power to base 10 %L power to base of current logscale %S scientific power %c character replacement for scientific power %b mantissa of ISO/IEC 80000 notation (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) %B prefix of ISO/IEC 80000 notation (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) %P multiple of pi #\begin{tabular}{|cl|} \hline #\multicolumn{2}{|c|}{Tic-mark label numerical format specifiers}\\ #\hline \hline #Format & Explanation \\ \hline #\verb@%f@ & floating point notation \\ #\verb@%e@ or \verb@%E@ & exponential notation; an "e" or "E" before the power \\ #\verb@%g@ or \verb@%G@ & the shorter of \verb@%e@ (or \verb@%E@) and \verb@%f@ \\ #\verb@%x@ or \verb@%X@ & hex \\ #\verb@%o@ or \verb@%O@ & octal \\ #\verb@%t@ & mantissa to base 10 \\ #\verb@%l@ & mantissa to base of current logscale \\ #\verb@%s@ & mantissa to base of current logscale; scientific power \\ #\verb@%T@ & power to base 10 \\ #\verb@%L@ & power to base of current logscale \\ #\verb@%S@ & scientific power \\ #\verb@%c@ & character replacement for scientific power \\ #\verb@%b@ & mantissa of ISO/IEC 80000 notation (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) \\ #\verb@%B@ & prefix of ISO/IEC 80000 notation (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) \\ #\verb@%P@ & multiple of pi \\ %c l . %Format@Explanation %_ %%f@floating point notation %%e or %E@exponential notation; an "e" or "E" before the power %%g or %G@the shorter of %e (or %E) and %f %%x or %X@hex %%o or %O@octal %%t@mantissa to base 10 %%l@mantissa to base of current logscale %%s@mantissa to base of current logscale; scientific power %%T@power to base 10 %%L@power to base of current logscale %%S@scientific power %%c@character replacement for scientific power %%b@mantissa of ISO/IEC 80000 notation (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) %%B@prefix of ISO/IEC 80000 notation (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi) %%P@multiple of pi %_ @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th>Format</th> <th>Explanation</th></tr> ^</thead> ^<tbody> ^<tr> <td><tt>%f</tt></td> <td>floating point notation</td></tr> ^<tr> <td><tt>%e</tt> or <tt>%E</tt></td> <td>exponential notation; an "e" or "E" before the power</td></tr> ^<tr> <td><tt>%g</tt> or <tt>%G</tt></td> <td>the shorter of <tt>%e</tt> (or <tt>%E</tt>) and <tt>%f</tt></td></tr> ^<tr> <td><tt>%x</tt> or <tt>%X</tt></td> <td>hex</td></tr> ^<tr> <td><tt>%o</tt> or <tt>%O</tt></td> <td>octal</td></tr> ^<tr> <td><tt>%t</tt></td> <td>mantissa to base 10</td></tr> ^<tr> <td><tt>%l</tt></td> <td>mantissa to base of current logscale</td></tr> ^<tr> <td><tt>%s</tt></td> <td>mantissa to base of current logscale; scientific power</td></tr> ^<tr> <td><tt>%T</tt></td> <td>power to base 10</td></tr> ^<tr> <td><tt>%L</tt></td> <td>power to base of current logscale</td></tr> ^<tr> <td><tt>%S</tt></td> <td>scientific power</td></tr> ^<tr> <td><tt>%c</tt></td> <td>character replacement for scientific power</td></tr> ^<tr> <td><tt>%b</tt></td> <td>mantissa of ISO/IEC 80000 notation (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi)</td></tr> ^<tr> <td><tt>%B</tt></td> <td>prefix of ISO/IEC 80000 notation (ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi)</td></tr> ^<tr> <td><tt>%P</tt></td> <td>multiple of π</td></tr> ^</tbody> ^</table> A 'scientific' power is one such that the exponent is a multiple of three. Character replacement of scientific powers (`"%c"`) has been implemented for powers in the range -18 to +18. For numbers outside of this range the format reverts to exponential. Other acceptable modifiers (which come after the "%" but before the format specifier) are "-", which left-justifies the number; "+", which forces all numbers to be explicitly signed; " " (a space), which makes positive numbers have a space in front of them where negative numbers have "-"; "#", which places a decimal point after floats that have only zeroes following the decimal point; a positive integer, which defines the field width; "0" (the digit, not the letter) immediately preceding the field width, which indicates that leading zeroes are to be used instead of leading blanks; and a decimal point followed by a non-negative integer, which defines the precision (the minimum number of digits of an integer, or the number of digits following the decimal point of a float). Some systems may not support all of these modifiers but may also support others; in case of doubt, check the appropriate documentation and then experiment. Examples: set format y "%t"; set ytics (5,10) # "5.0" and "1.0" set format y "%s"; set ytics (500,1000) # "500" and "1.0" set format y "%+-12.3f"; set ytics(12345) # "+12345.000 " set format y "%.2t*10^%+03T"; set ytic(12345)# "1.23*10^+04" set format y "%s*10^{%S}"; set ytic(12345) # "12.345*10^{3}" set format y "%s %cg"; set ytic(12345) # "12.345 kg" set format y "%.0P pi"; set ytic(6.283185) # "2 pi" set format y "%.0f%%"; set ytic(50) # "50%" set log y 2; set format y '%l'; set ytics (1,2,3) #displays "1.0", "1.0" and "1.5" (since 3 is 1.5 * 2^1) There are some problem cases that arise when numbers like 9.999 are printed with a format that requires both rounding and a power. If the data type for the axis is time/date, the format string must contain valid codes for the 'strftime' function (outside of `gnuplot`, type "man strftime"). See `set timefmt` for a list of the allowed input format codes. 4 time/date specifiers ?commands set format date_specifiers ?commands set format time_specifiers ?set format date_specifiers ?set format time_specifiers ?set date_specifiers ?set time_specifiers ?date_specifiers ?time_specifiers In time/date mode, the acceptable formats are: @start table - first is interactive cleartext form Format Explanation %a abbreviated name of day of the week %A full name of day of the week %b or %h abbreviated name of the month %B full name of the month %d day of the month, 01--31 %D shorthand for "%m/%d/%y" (only output) %F shorthand for "%Y-%m-%d" (only output) %k hour, 0--23 (one or two digits) %H hour, 00--23 (always two digits) %l hour, 1--12 (one or two digits) %I hour, 01--12 (always two digits) %j day of the year, 1--366 %m month, 01--12 %M minute, 0--60 %p "am" or "pm" %r shorthand for "%I:%M:%S %p" (only output) %R shorthand for "%H:%M" (only output) %s number of seconds since the start of year 2000 %S second, integer 0--60 on output, (double) on input %T shorthand for "%H:%M:%S" (only output) %U week of the year (week starts on Sunday) %w day of the week, 0--6 (Sunday = 0) %W week of the year (week starts on Monday) %y year, 0-68 for 2000-2068, 69-99 for 1969-1999 %Y year, 4-digit #\begin{tabular}{|cl|} \hline #\multicolumn{2}{|c|}{Tic-mark label Date/Time Format Specifiers}\\ #\hline \hline #Format & Explanation \\ \hline #\verb@%a@ & abbreviated name of day of the week \\ #\verb@%A@ & full name of day of the week \\ #\verb@%b@ or \verb@%h@ & abbreviated name of the month \\ #\verb@%B@ & full name of the month \\ #\verb@%d@ & day of the month, 01--31 \\ #\verb@%D@ & shorthand for \verb@"%m/%d/%y"@ (only output) \\ #\verb@%F@ & shorthand for \verb@"%Y-%m-%d"@ (only output) \\ #\verb@%k@ & hour, 0--23 (one or two digits)\\ #\verb@%H@ & hour, 00--23 (always two digits)\\ #\verb@%l@ & hour, 1--12 (one or two digits)\\ #\verb@%I@ & hour, 01--12 (always two digits)\\ #\verb@%j@ & day of the year, 1--366 \\ #\verb@%m@ & month, 01--12 \\ #\verb@%M@ & minute, 0--60 \\ #\verb@%p@ & "am" or "pm" \\ #\verb@%r@ & shorthand for \verb@"%I:%M:%S %p"@ (only output)\\ #\verb@%R@ & shorthand for \verb@%H:%M"@ (only output)\\ #\verb@%S@ & second, integer 0--60 on output, (double) on input\\ #\verb@%s@ & number of seconds since start of year 2000 \\ #\verb@%T@ & shorthand for \verb@"%H:%M:%S"@ (only output)\\ #\verb@%U@ & week of the year (week starts on Sunday) \\ #\verb@%w@ & day of the week, 0--6 (Sunday = 0) \\ #\verb@%W@ & week of the year (week starts on Monday) \\ #\verb@%y@ & year, 0-99 in range 1969-2068\\ #\verb@%Y@ & year, 4-digit \\ %c l . %Format@Explanation %_ %%a@abbreviated name of day of the week %%A@full name of day of the week %%b or %h@abbreviated name of the month %%B@full name of the month %%d@day of the month, 01--31 %%D@shorthand for "%m/%d/%y" (only output) %%F@shorthand for "%Y-%m-%d" (only output) %%k@hour, 0--23 (one or two digits) %%H@hour, 00--23 (always two digits) %%l@hour, 1--12 (one or two digits) %%I@hour, 01--12 (always two digits) %%j@day of the year, 1--366 %%m@month, 01--12 %%M@minute, 0--60 %%p@"am" or "pm" %%r@shorthand for "%I:%M:%S %p" (only output) %%R@shorthand for %H:%M" (only output) %%S@second, integer 0--60 on output, (double) on input %%s@number of seconds since start of year 2000 %%T@shorthand for "%H:%M:%S" (only output) %%U@week of the year (week starts on Sunday) %%w@day of the week, 0--6 (Sunday = 0) %%W@week of the year (week starts on Monday) %%y@year, 0-99 in range 1969-2068 %%Y@year, 4-digit %_ @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th>Format</th> <th>Explanation</th></tr> ^</thead> ^<tbody> ^<tr> <td><tt>%a</tt></td> <td>abbreviated name of day of the week</td></tr> ^<tr> <td><tt>%A</tt></td> <td>full name of day of the week</td></tr> ^<tr> <td><tt>%b</tt> or <tt>%h</tt></td> <td>abbreviated name of the month</td></tr> ^<tr> <td><tt>%B</tt></td> <td>full name of the month</td></tr> ^<tr> <td><tt>%d</tt></td> <td>day of the month, 01–31</td></tr> ^<tr> <td><tt>%D</tt></td> <td>shorthand for <tt>%m/%d/%y</tt> (only output)</td></tr> ^<tr> <td><tt>%F</tt></td> <td>shorthand for <tt>%Y-%m-%d</tt> (only output)</td></tr> ^<tr> <td><tt>%k</tt></td> <td>hour, 0–23 (one or two digits)</td></tr> ^<tr> <td><tt>%H</tt></td> <td>hour, 00–23 (always two digits)</td></tr> ^<tr> <td><tt>%l</tt></td> <td>hour, 1–12 (one or two digits)</td></tr> ^<tr> <td><tt>%I</tt></td> <td>hour, 01–12 (always two digits)</td></tr> ^<tr> <td><tt>%j</tt></td> <td>day of the year, 1–366</td></tr> ^<tr> <td><tt>%m</tt></td> <td>month, 01–12</td></tr> ^<tr> <td><tt>%M</tt></td> <td>minute, 0–60</td></tr> ^<tr> <td><tt>%p</tt></td> <td>"am" or "pm"</td></tr> ^<tr> <td><tt>%r</tt></td> <td>shorthand for <tt>%I:%M:%S %p</tt> (only output)</td></tr> ^<tr> <td><tt>%R</tt></td> <td>shorthand for <tt>%H:%M</tt> (only output)</td></tr> ^<tr> <td><tt>%S</tt></td> <td>second, integer 0–60 on output, (double) on input</td></tr> ^<tr> <td><tt>%s</tt></td> <td>number of seconds since start of year 2000</td></tr> ^<tr> <td><tt>%T</tt></td> <td>shorthand for <tt>%H:%M:%S</tt> (only output)</td></tr> ^<tr> <td><tt>%U</tt></td> <td>week of the year (week starts on Sunday)</td></tr> ^<tr> <td><tt>%w</tt></td> <td>day of the week, 0–6 (Sunday = 0)</td></tr> ^<tr> <td><tt>%W</tt></td> <td>week of the year (week starts on Monday)</td></tr> ^<tr> <td><tt>%y</tt></td> <td>year, 0-99 in range 1969-2068</td></tr> ^<tr> <td><tt>%Y</tt></td> <td>year, 4-digit</td></tr> ^</tbody> ^</table> Except for the non-numerical formats, these may be preceded by a "0" ("zero", not "oh") to pad the field length with leading zeroes, and a positive digit, to define the minimum field width (which will be overridden if the specified width is not large enough to contain the number). The %S format also accepts a precision specifier so that fractional seconds can be written. There is a 24-character limit to the length of the printed text; longer strings will be truncated. Examples: Suppose the text is "76/12/25 23:11:11". Then set format x # defaults to "12/25/76" \n "23:11" set format x "%A, %d %b %Y" # "Saturday, 25 Dec 1976" set format x "%r %D" # "11:11:11 pm 12/25/76" Suppose the text is "98/07/06 05:04:03.123456". Then set format x "%1y/%2m/%3d %01H:%02M:%06.3S" # "98/ 7/ 6 5:04:03.123" 3 function style ?set function style This form of the command is deprecated. Please see `set style function`. 3 functions ?commands show functions ?show functions The `show functions` command lists all user-defined functions and their definitions. Syntax: show functions For information about the definition and usage of functions in `gnuplot`, please see `expressions`. See also ^ <a href="http://www.gnuplot.info/demo/spline.html"> splines as user defined functions (spline.dem) ^ </a> and ^ <a href="http://www.gnuplot.info/demo/airfoil.html"> use of functions and complex variables for airfoils (airfoil.dem). ^ </a> 3 grid ?commands set grid ?commands unset grid ?commands show grid ?set grid ?unset grid ?show grid ?grid ?nogrid The `set grid` command allows grid lines to be drawn on the plot. Syntax: set grid {{no}{m}xtics} {{no}{m}ytics} {{no}{m}ztics} {{no}{m}x2tics} {{no}{m}y2tics} {{no}{m}cbtics} {polar {<angle>}} {layerdefault | front | back} { {linestyle <major_linestyle>} | {linetype | lt <major_linetype>} {linewidth | lw <major_linewidth>} { , {linestyle | ls <minor_linestyle>} | {linetype | lt <minor_linetype>} {linewidth | lw <minor_linewidth>} } } unset grid show grid The grid can be enabled and disabled for the major and/or minor tic marks on any axis, and the linetype and linewidth can be specified for major and minor grid lines, also via a predefined linestyle, as far as the active terminal driver supports this. Additionally, a polar grid can be selected for 2D plots---circles are drawn to intersect the selected tics, and radial lines are drawn at definable intervals. (The interval is given in degrees or radians, depending on the `set angles` setting.) Note that a polar grid is no longer automatically generated in polar mode. The pertinent tics must be enabled before `set grid` can draw them; `gnuplot` will quietly ignore instructions to draw grid lines at non-existent tics, but they will appear if the tics are subsequently enabled. If no linetype is specified for the minor gridlines, the same linetype as the major gridlines is used. The default polar angle is 30 degrees. If `front` is given, the grid is drawn on top of the graphed data. If `back` is given, the grid is drawn underneath the graphed data. Using `front` will prevent the grid from being obscured by dense data. The default setup, `layerdefault`, is equivalent to `back` for 2D plots. In 3D plots the default is to split up the grid and the graph box into two layers: one behind, the other in front of the plotted data and functions. Since `hidden3d` mode does its own sorting, it ignores all grid drawing order options and passes the grid lines through the hidden line removal machinery instead. These options actually affect not only the grid, but also the lines output by `set border` and the various ticmarks (see `set xtics`). Z grid lines are drawn on the bottom of the plot. This looks better if a partial box is drawn around the plot---see `set border`. 3 hidden3d ?commands set hidden3d ?commands unset hidden3d ?commands show hidden3d ?set hidden3d ?unset hidden3d ?show hidden3d ?hidden3d ?nohidden3d The `set hidden3d` command enables hidden line removal for surface plotting (see `splot`). Some optional features of the underlying algorithm can also be controlled using this command. Syntax: set hidden3d {defaults} | { {front|back} {{offset <offset>} | {nooffset}} {trianglepattern <bitpattern>} {{undefined <level>} | {noundefined}} {{no}altdiagonal} {{no}bentover} } unset hidden3d show hidden3d In contrast to the usual display in gnuplot, hidden line removal actually treats the given function or data grids as real surfaces that can't be seen through, so plot elements behind the surface will be hidden by it. For this to work, the surface needs to have 'grid structure' (see `splot datafile` about this), and it has to be drawn `with lines` or `with linespoints`. When `hidden3d` is set, both the hidden portion of the surface and possibly its contours drawn on the base (see `set contour`) as well as the grid will be hidden. Each surface has its hidden parts removed with respect to itself and to other surfaces, if more than one surface is plotted. Contours drawn on the surface (`set contour surface`) don't work. Labels and arrows are always visible and are unaffected. The key box is never hidden by the surface. As of gnuplot version 4.6, hidden3d also affects 3D plotting styles `points`, `labels`, `vectors`, and `impulses` even if no surface is present in the graph. Individual plots within the graph may be explicitly excluded from this processing by appending the extra option `nohidden3d` to the `with` specifier. Hidden3d does not affect solid surfaces drawn using the pm3d mode. To achieve a similar effect purely for pm3d surfaces, use instead `set pm3d depthorder`. To mix pm3d surfaces with normal `hidden3d` processing, use the option `set hidden3d front` to force all elements included in hidden3d processing to be drawn after any remaining plot elements. Then draw the surface twice, once `with lines lt -2` and a second time `with pm3d`. The first instance will include the surface during calculation of occluded elements but will not draw the surface itself. Functions are evaluated at isoline intersections. The algorithm interpolates linearly between function points or data points when determining the visible line segments. This means that the appearance of a function may be different when plotted with `hidden3d` than when plotted with `nohidden3d` because in the latter case functions are evaluated at each sample. Please see `set samples` and `set isosamples` for discussion of the difference. The algorithm used to remove the hidden parts of the surfaces has some additional features controllable by this command. Specifying `defaults` will set them all to their default settings, as detailed below. If `defaults` is not given, only explicitly specified options will be influenced: all others will keep their previous values, so you can turn on/off hidden line removal via `set {no}hidden3d`, without modifying the set of options you chose. The first option, `offset`, influences the linetype used for lines on the 'back' side. Normally, they are drawn in a linetype one index number higher than the one used for the front, to make the two sides of the surface distinguishable. You can specify a different linetype offset to add instead of the default 1, by `offset <offset>`. Option `nooffset` stands for `offset 0`, making the two sides of the surface use the same linetype. Next comes the option `trianglepattern <bitpattern>`. <bitpattern> must be a number between 0 and 7, interpreted as a bit pattern. Each bit determines the visibility of one edge of the triangles each surface is split up into. Bit 0 is for the 'horizontal' edges of the grid, Bit 1 for the 'vertical' ones, and Bit 2 for the diagonals that split each cell of the original grid into two triangles. The default pattern is 3, making all horizontal and vertical lines visible, but not the diagonals. You may want to choose 7 to see those diagonals as well. The `undefined <level>` option lets you decide what the algorithm is to do with data points that are undefined (missing data, or undefined function values), or exceed the given x-, y- or z-ranges. Such points can either be plotted nevertheless, or taken out of the input data set. All surface elements touching a point that is taken out will be taken out as well, thus creating a hole in the surface. If <level> = 3, equivalent to option `noundefined`, no points will be thrown away at all. This may produce all kinds of problems elsewhere, so you should avoid this. <level> = 2 will throw away undefined points, but keep the out-of-range ones. <level> = 1, the default, will get rid of out-of-range points as well. By specifying `noaltdiagonal`, you can override the default handling of a special case can occur if `undefined` is active (i.e. <level> is not 3). Each cell of the grid-structured input surface will be divided in two triangles along one of its diagonals. Normally, all these diagonals have the same orientation relative to the grid. If exactly one of the four cell corners is excluded by the `undefined` handler, and this is on the usual diagonal, both triangles will be excluded. However if the default setting of `altdiagonal` is active, the other diagonal will be chosen for this cell instead, minimizing the size of the hole in the surface. The `bentover` option controls what happens to another special case, this time in conjunction with the `trianglepattern`. For rather crumply surfaces, it can happen that the two triangles a surface cell is divided into are seen from opposite sides (i.e. the original quadrangle is 'bent over'), as illustrated in the following ASCII art: C----B original quadrangle: A--B displayed quadrangle: |\ | ("set view 0,0") | /| ("set view 75,75" perhaps) | \ | |/ | | \ | C--D | \| A D If the diagonal edges of the surface cells aren't generally made visible by bit 2 of the <bitpattern> there, the edge CB above wouldn't be drawn at all, normally, making the resulting display hard to understand. Therefore, the default option of `bentover` will turn it visible in this case. If you don't want that, you may choose `nobentover` instead. See also ^ <a href="http://www.gnuplot.info/demo/hidden.html"> hidden line removal demo (hidden.dem) ^ </a> and ^ <a href="http://www.gnuplot.info/demo/singulr.html"> complex hidden line demo (singulr.dem). ^ </a> 3 historysize ?commands set historysize ?set historysize ?unset historysize ?historysize ?nohistorysize Note: the command `set historysize` is only available when gnuplot has been configured to use the GNU readline library. Syntax: set historysize <int> unset historysize When leaving gnuplot, the value of historysize is used for truncating the history to at most that much lines. The default is 500. `unset historysize` will disable history truncation and thus allow an infinite number of lines to be written to the history file. 3 isosamples ?commands set isosamples ?commands show isosamples ?set isosamples ?show isosamples ?isosamples The isoline density (grid) for plotting functions as surfaces may be changed by the `set isosamples` command. Syntax: set isosamples <iso_1> {,<iso_2>} show isosamples Each function surface plot will have <iso_1> iso-u lines and <iso_2> iso-v lines. If you only specify <iso_1>, <iso_2> will be set to the same value as <iso_1>. By default, sampling is set to 10 isolines per u or v axis. A higher sampling rate will produce more accurate plots, but will take longer. These parameters have no effect on data file plotting. An isoline is a curve parameterized by one of the surface parameters while the other surface parameter is fixed. Isolines provide a simple means to display a surface. By fixing the u parameter of surface s(u,v), the iso-u lines of the form c(v) = s(u0,v) are produced, and by fixing the v parameter, the iso-v lines of the form c(u) = s(u,v0) are produced. When a function surface plot is being done without the removal of hidden lines, `set samples` controls the number of points sampled along each isoline; see `set samples` and `set hidden3d`. The contour algorithm assumes that a function sample occurs at each isoline intersection, so change in `samples` as well as `isosamples` may be desired when changing the resolution of a function surface/contour. 3 key ?commands set key ?commands unset key ?commands show key ?set key ?unset key ?show key ?key ?nokey ?legend The `set key` command enables a key (or legend) describing plots on a plot. The contents of the key, i.e., the names given to each plotted data set and function and samples of the lines and/or symbols used to represent them, are determined by the `title` and `with` options of the {`s`}`plot` command. Please see `plot title` and `plot with` for more information. Syntax: set key {on|off} {default} {{inside | outside} | {lmargin | rmargin | tmargin | bmargin} | {at <position>}} {left | right | center} {top | bottom | center} {vertical | horizontal} {Left | Right} {{no}opaque} {{no}reverse} {{no}invert} {samplen <sample_length>} {spacing <vertical_spacing>} {width <width_increment>} {height <height_increment>} {{no}autotitle {columnheader}} {title "<text>"} {{no}enhanced} {font "<face>,<size>"} {textcolor <colorspec>} {{no}box { {linestyle | ls <line_style>} | {linetype | lt <line_type>} {linewidth | lw <line_width>}}} {maxcols {<max no. of columns> | auto}} {maxrows {<max no. of rows> | auto}} unset key show key The key contains a title and a sample (line, point, box) for each plot in the graph. The key may be turned off by requesting `set key off` or `unset key`. Individual key entries may be turned off by using the `notitle` keyword in the corresponding plot command. Elements within the key are stacked according to `vertical` or `horizontal`. In the case of `vertical`, the key occupies as few columns as possible. That is, elements are aligned in a column until running out of vertical space at which point a new column is started. The vertical space may be limited using 'maxrows'. In the case of `horizontal`, the key occupies as few rows as possible. The horizontal space may be limited using 'maxcols'. By default the key is placed in the upper right inside corner of the graph. The keywords `left`, `right`, `top`, `bottom`, `center`, `inside`, `outside`, `lmargin`, `rmargin`, `tmargin`, `bmargin` (, `above`, `over`, `below` and `under`) may be used to automatically place the key in other positions of the graph. Also an `at <position>` may be given to indicate precisely where the plot should be placed. In this case, the keywords `left`, `right`, `top`, `bottom` and `center` serve an analogous purpose for alignment. For more information, see `key placement`. Justification of the plot titles within the key is controlled by `Left` or `Right` (default). The text and sample can be reversed (`reverse`) and a box can be drawn around the key (`box {...}`) in a specified `linetype` and `linewidth`, or a user-defined `linestyle`. By default the key is built up one plot at a time. That is, the key symbol and title are drawn at the same time as the corresponding plot. That means newer plots may sometimes place elements on top of the key. `set key opaque` causes the key to be generated after all the plots. In this case the key area is filled with background color and then the key symbols and titles are written. Therefore the key itself may obscure portions of some plot elements. The default can be restored by `set key noopaque`. By default the first plot label is at the top of the key and successive labels are entered below it. The `invert` option causes the first label to be placed at the bottom of the key, with successive labels entered above it. This option is useful to force the vertical ordering of labels in the key to match the order of box types in a stacked histogram. The <height_increment> is a number of character heights to be added to or subtracted from the height of the key box. This is useful mainly when you are putting a box around the key and want larger borders around the key entries. All plotted curves of `plot`s and `splot`s are titled according to the default option `autotitles`. The automatic generation of titles can be suppressed by `noautotitles`; then only those titles explicitly defined by `(s)plot ... title ...` will be drawn. =columnheader The command `set key autotitle columnheader` causes the first entry in each column of input data to be interpreted as a text string and used as a title for the corresponding plot. If the quantity being plotted is a function of data from several columns, gnuplot may be confused as to which column to draw the title from. In this case it is necessary to specify the column explicitly in the plot command, e.g. plot "datafile" using (($2+$3)/$4) title columnhead(3) with lines An overall title can be put on the key (`title "<text>"`)---see also `syntax` for the distinction between text in single- or double-quotes. The key title uses the same justification as do the plot titles. The defaults for `set key` are `on`, `right`, `top`, `vertical`, `Right`, `noreverse`, `noinvert`, `samplen 4`, `spacing 1.25`, `title ""`, and `nobox`. The default <linetype> is the same as that used for the plot borders. Entering `set key default` returns the key to its default configuration. The key is drawn as a sequence of lines, with one plot described on each line. On the right-hand side (or the left-hand side, if `reverse` is selected) of each line is a representation that attempts to mimic the way the curve is plotted. On the other side of each line is the text description (the line title), obtained from the `plot` command. The lines are vertically arranged so that an imaginary straight line divides the left- and right-hand sides of the key. It is the coordinates of the top of this line that are specified with the `set key` command. In a `plot`, only the x and y coordinates are used to specify the line position. For a `splot`, x, y and z are all used as a 3D location mapped using the same mapping as the graph itself to form the required 2D screen position of the imaginary line. When using the TeX or other terminals where formatting information is embedded in the string, `gnuplot` can only estimate the correctly exact width of the string for key positioning. If the key is to be positioned at the left, it may be convenient to use the combination `set key left Left reverse`. If `splot` is being used to draw contours, the contour labels will be listed in the key. If the alignment of these labels is poor or a different number of decimal places is desired, the label format can be specified. See `set clabel` for details. Examples: This places the key at the default location: set key default This disables the key: unset key This places a key at coordinates 2,3.5,2 in the default (first) coordinate system: set key at 2,3.5,2 This places the key below the graph: set key below This places the key in the bottom left corner, left-justifies the text, gives it a title, and draws a box around it in linetype 3: set key left bottom Left title 'Legend' box 3 4 key placement ?commands set key placement ?set key placement ?key placement To understand positioning, the best concept is to think of a region, i.e., inside/outside, or one of the margins. Along with the region, keywords `left/center/right` (l/c/r) and `top/center/bottom` (t/c/b) control where within the particular region the key should be placed. When in `inside` mode, the keywords `left` (l), `right` (r), `top` (t), `bottom` (b), and `center` (c) push the key out toward the plot boundary as illustrated: t/l t/c t/r c/l c c/r b/l b/c b/r When in `outside` mode, automatic placement is similar to the above illustration, but with respect to the view, rather than the graph boundary. That is, a border is moved inward to make room for the key outside of the plotting area, although this may interfere with other labels and may cause an error on some devices. The particular plot border that is moved depends upon the position described above and the stacking direction. For options centered in one of the dimensions, there is no ambiguity about which border to move. For the corners, when the stack direction is `vertical`, the left or right border is moved inward appropriately. When the stack direction is `horizontal`, the top or bottom border is moved inward appropriately. The margin syntax allows automatic placement of key regardless of stack direction. When one of the margins `lmargin` (lm), `rmargin` (rm), `tmargin` (tm), and `bmargin` (bm) is combined with a single, non-conflicting direction keyword, the following illustrated positions may contain the key: l/tm c/tm r/tm t/lm t/rm c/lm c/rm b/lm b/rm l/bm c/bm r/bm Keywords `above` and `over` are synonymous with `tmargin`. For version compatibility, `above` or `over` without an additional l/c/r or stack direction keyword uses `center` and `horizontal`. Keywords `below` and `under` are synonymous with `bmargin`. For compatibility, `below` or `under` without an additional l/c/r or stack direction keyword uses `center` and `horizontal`. A further compatibility issue is that `outside` appearing without an additional t/b/c or stack direction keyword uses `top`, `right` and `vertical` (i.e., the same as t/rm above). The <position> can be a simple x,y,z as in previous versions, but these can be preceded by one of five keywords (`first`, `second`, `graph`, `screen`, `character`) which selects the coordinate system in which the position of the first sample line is specified. See `coordinates` for more details. The effect of `left`, `right`, `top`, `bottom`, and `center` when <position> is given is to align the key as though it were text positioned using the label command, i.e., `left` means left align with key to the right of <position>, etc. 4 key samples ?commands set key samples ?set key samples ?key samples By default, each plot on the graph generates a corresponding entry in the key. This entry contains a plot title and a sample line/point/box of the same color and fill properties as used in the plot itself. The font and textcolor properties control the appearance of the individual plot titles that appear in the key. Setting the textcolor to "variable" causes the text for each key entry to be the same color as the line or fill color for that plot. This was the default in some earlier versions of gnuplot. The length of the sample line can be controlled by `samplen`. The sample length is computed as the sum of the tic length and <sample_length> times the character width. `samplen` also affects the positions of point samples in the key since these are drawn at the midpoint of the sample line, even if the sample line itself is not drawn. The vertical spacing between lines is controlled by `spacing`. The spacing is set equal to the product of the pointsize, the vertical tic size, and <vertical_spacing>. The program will guarantee that the vertical spacing is no smaller than the character height. The <width_increment> is a number of character widths to be added to or subtracted from the length of the string. This is useful only when you are putting a box around the key and you are using control characters in the text. `gnuplot` simply counts the number of characters in the string when computing the box width; this allows you to correct it. 3 label ?commands set label ?commands unset label ?commands show label ?set label ?unset label ?show label ?label ?nolabel Arbitrary labels can be placed on the plot using the `set label` command. Syntax: set label {<tag>} {"<label text>"} {at <position>} {left | center | right} {norotate | rotate {by <degrees>}} {font "<name>{,<size>}"} {noenhanced} {front | back} {textcolor <colorspec>} {point <pointstyle> | nopoint} {offset <offset>} unset label {<tag>} show label The <position> is specified by either x,y or x,y,z, and may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. See `coordinates` for details. The tag is an integer that is used to identify the label. If no <tag> is given, the lowest unused tag value is assigned automatically. The tag can be used to delete or modify a specific label. To change any attribute of an existing label, use the `set label` command with the appropriate tag, and specify the parts of the label to be changed. The <label text> can be a string constant, a string variable, or a string- valued expression. See `strings`, `sprintf`, and `gprintf`. By default, the text is placed flush left against the point x,y,z. To adjust the way the label is positioned with respect to the point x,y,z, add the justification parameter, which may be `left`, `right` or `center`, indicating that the point is to be at the left, right or center of the text. Labels outside the plotted boundaries are permitted but may interfere with axis labels or other text. If `rotate` is given, the label is written vertically (if the terminal can do so, of course). If `rotate by <degrees>` is given, conforming terminals will try to write the text at the specified angle; non-conforming terminals will treat this as vertical text. Font and its size can be chosen explicitly by `font "<name>{,<size>}"` if the terminal supports font settings. Otherwise the default font of the terminal will be used. Normally the enhanced text mode string interpretation, if enabled for the current terminal, is applied to all text strings including label text. The `noenhanced` property can be used to exempt a specific label from the enhanced text mode processing. The can be useful if the label contains underscores, for example. See `enhanced text`. If `front` is given, the label is written on top of the graphed data. If `back` is given (the default), the label is written underneath the graphed data. Using `front` will prevent a label from being obscured by dense data. `textcolor <colorspec>` changes the color of the label text. <colorspec> can be a linetype, an rgb color, or a palette mapping. See help for `colorspec` and `palette`. `textcolor` may be abbreviated `tc`. `tc default` resets the text color to its default state. `tc lt <n>` sets the text color to that of line type <n>. `tc ls <n>` sets the text color to that of line style <n>. `tc palette z` selects a palette color corresponding to the label z position. `tc palette cb <val>` selects a color corresponding to <val> on the colorbar. `tc palette fraction <val>`, with 0<=val<=1, selects a color corresponding to the mapping [0:1] to grays/colors of the `palette`. `tc rgb "#RRGGBB"` selects an arbitrary 24-bit RGB color. If a <pointstyle> is given, using keywords `lt`, `pt` and `ps`, see `style`, a point with the given style and color of the given line type is plotted at the label position and the text of the label is displaced slightly. This option is used by default for placing labels in `mouse` enhanced terminals. Use `nopoint` to turn off the drawing of a point near the label (this is the default). The displacement defaults to 1,1 in `pointsize` units if a <pointstyle> is given, 0,0 if no <pointstyle> is given. The displacement can be controlled by the optional `offset <offset>` where <offset> is specified by either x,y or x,y,z, and may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. See `coordinates` for details. If one (or more) axis is timeseries, the appropriate coordinate should be given as a quoted time string according to the `timefmt` format string. See `set xdata` and `set timefmt`. The EEPIC, Imagen, LaTeX, and TPIC drivers allow \\ in a string to specify a newline. Label coordinates and text can also be read from a data file (see `labels`). Examples: To set a label at (1,2) to "y=x", use: set label "y=x" at 1,2 To set a Sigma of size 24, from the Symbol font set, at the center of the graph, use: set label "S" at graph 0.5,0.5 center font "Symbol,24" To set a label "y=x^2" with the right of the text at (2,3,4), and tag the label as number 3, use: set label 3 "y=x^2" at 2,3,4 right To change the preceding label to center justification, use: set label 3 center To delete label number 2, use: unset label 2 To delete all labels, use: unset label To show all labels (in tag order), use: show label To set a label on a graph with a timeseries on the x axis, use, for example: set timefmt "%d/%m/%y,%H:%M" set label "Harvest" at "25/8/93",1 To display a freshly fitted parameter on the plot with the data and the fitted function, do this after the `fit`, but before the `plot`: set label sprintf("a = %3.5g",par_a) at 30,15 bfit = gprintf("b = %s*10^%S",par_b) set label bfit at 30,20 To display a function definition along with its fitted parameters, use: f(x)=a+b*x fit f(x) 'datafile' via a,b set label GPFUN_f at graph .05,.95 set label sprintf("a = %g", a) at graph .05,.90 set label sprintf("b = %g", b) at graph .05,.85 To set a label displaced a little bit from a small point: set label 'origin' at 0,0 point lt 1 pt 2 ps 3 offset 1,-1 To set a label whose color matches the z value (in this case 5.5) of some point on a 3D splot colored using pm3d: set label 'text' at 0,0,5.5 tc palette z 3 linetype ?commands set linetype ?commands unset linetype ?commands show linetype ?set linetype ?unset linetype ?show linetype ?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`. For example, linetypes one and two default to red and green. If you redefine them like this: set linetype 1 lw 2 lc rgb "blue" pointtype 6 set linetype 2 lw 2 lc rgb "forest-green" pointtype 8 everywhere that uses lt 1 will now get a thick blue line rather than a thin red line (the previous default meaning of lt 1). This includes uses such as the definition of a temporary linestyle derived from the base linetype 1. `Note`: This command is new to gnuplot version 4.6. It supersedes a rather cryptic command in version 4.2 "set style increment user". The older command is now deprecated. This mechanism can be used to define a set of personal preferences for the sequence of lines used in gnuplot. The recommended way to do this is to add to the run-time initialization file ~/.gnuplot a sequence of commands like if ((GPVAL_VERSION < 4.5) \ || (!strstrt(GPVAL_COMPILE_OPTIONS,"+USER_LINETYPES"))) \ exit set linetype 1 lc rgb "dark-violet" lw 2 pt 0 set linetype 2 lc rgb "sea-green" lw 2 pt 7 set linetype 3 lc rgb "cyan" lw 2 pt 6 pi -1 set linetype 4 lc rgb "dark-red" lw 2 pt 5 pi -1 set linetype 5 lc rgb "blue" lw 2 pt 8 set linetype 6 lc rgb "dark-orange" lw 2 pt 3 set linetype 7 lc rgb "black" lw 2 pt 11 set linetype 8 lc rgb "goldenrod" lw 2 set linetype cycle 8 Every time you run gnuplot the line types will be initialized to these values. You may initialize as many linetypes as you like. If you do not redefine, say, linetype 3 then it will continue to have the default properties (in this case blue, pt 3, lw 1, etc). The first few lines of the example script insure that the commands will be skipped by older versions of gnuplot. Similar script files can be used to define theme-based color choices, or sets of colors optimized for a particular plot type or output device. =cycle The command `set linetype cycle 8` tells gnuplot to re-use these definitions for the color and linewidth of higher-numbered linetypes. That is, linetypes 9-16, 17-24, and so on will use this same sequence of colors and widths. The point properties (pointtype, pointsize, pointinterval) are not affected by this command. `unset linetype cycle` disables this feature. If the line properties of a higher numbered linetype are explicitly defined, this takes precedence over the recycled low-number linetype properties. 3 lmargin ?commands set lmargin ?set lmargin ?lmargin The command `set lmargin` sets the size of the left margin. Please see `set margin` for details. 3 loadpath ?commands set loadpath ?commands show loadpath ?set loadpath ?show loadpath ?loadpath The `loadpath` setting defines additional locations for data and command files searched by the `call`, `load`, `plot` and `splot` commands. If a file cannot be found in the current directory, the directories in `loadpath` are tried. Syntax: set loadpath {"pathlist1" {"pathlist2"...}} show loadpath Path names may be entered as single directory names, or as a list of path names separated by a platform-specific path separator, eg. colon (':') on Unix, semicolon (';') on DOS/Windows/OS/2 platforms. The `show loadpath`, `save` and `save set` commands replace the platform-specific separator with a space character (' '). If the environment variable GNUPLOT_LIB is set, its contents are appended to `loadpath`. However, `show loadpath` prints the contents of `set loadpath` and GNUPLOT_LIB separately. Also, the `save` and `save set` commands ignore the contents of GNUPLOT_LIB. 3 locale ?commands set locale ?set locale ?locale The `locale` setting determines the language with which `{x,y,z}{d,m}tics` will write the days and months. Syntax: set locale {"<locale>"} <locale> may be any language designation acceptable to your installation. See your system documentation for the available options. The command `set locale ""` will try to determine the locale from the LC_TIME, LC_ALL, or LANG environment variables. To change the decimal point locale, see `set decimalsign`. To change the character encoding to the current locale, see `set encoding`. 3 logscale ?commands set logscale ?commands unset logscale ?commands show logscale ?set logscale ?unset logscale ?show logscale ?set log ?logscale ?nologscale Syntax: set logscale <axes> {<base>} unset logscale <axes> show logscale where <axes> may be any combinations of `x`, `x2`, `y`, `y2`, `z`, `cb`, and `r` in any order. <base> is the base of the log scaling (default is base 10). If no axes are specified, the command affects all axes except `r`. The command `unset logscale` turns off log scaling for all axes. Note that the ticmarks generated for logscaled axes are not uniformly spaced. See `set xtics`. Examples: To enable log scaling in both x and z axes: set logscale xz To enable scaling log base 2 of the y axis: set logscale y 2 To enable z and color log axes for a pm3d plot: set logscale zcb To disable z axis log scaling: unset logscale z 3 macros ?commands set macros ?commands show macros ?set macros ?show macros If command line macro substitution is enabled, then tokens in the command line of the form @<stringvariablename> will be replaced by the text string contained in <stringvariablename>. See `substitution`. Syntax: set macros 3 mapping ?commands set mapping ?commands show mapping ?set mapping ?show mapping ?mapping If data are provided to `splot` in spherical or cylindrical coordinates, the `set mapping` command should be used to instruct `gnuplot` how to interpret them. Syntax: set mapping {cartesian | spherical | cylindrical} A cartesian coordinate system is used by default. For a spherical coordinate system, the data occupy two or three columns (or `using` entries). The first two are interpreted as the azimuthal and polar angles theta and phi (or "longitude" and "latitude"), in the units specified by `set angles`. The radius r is taken from the third column if there is one, or is set to unity if there is no third column. The mapping is: x = r * cos(theta) * cos(phi) y = r * sin(theta) * cos(phi) z = r * sin(phi) Note that this is a "geographic" spherical system, rather than a "polar" one (that is, phi is measured from the equator, rather than the pole). For a cylindrical coordinate system, the data again occupy two or three columns. The first two are interpreted as theta (in the units specified by `set angles`) and z. The radius is either taken from the third column or set to unity, as in the spherical case. The mapping is: x = r * cos(theta) y = r * sin(theta) z = z The effects of `mapping` can be duplicated with the `using` filter on the `splot` command, but `mapping` may be more convenient if many data files are to be processed. However even if `mapping` is used, `using` may still be necessary if the data in the file are not in the required order. `mapping` has no effect on `plot`. ^ See also ^ <a href="http://www.gnuplot.info/demo/world.html"> world.dem: mapping demos. ^ </a> 3 margin ?commands set margin ?commands show margin ?set margin ?show margin ?margin The `margin` is the distance between the plot border and the outer edge of the canvas. The size of the margin is chosen automatically, but can be overridden by the `set margin` commands. `show margin` shows the current settings. To alter the distance between the inside of the plot border and the data in the plot itself, see `set offsets`. Syntax: set bmargin {{at screen} <margin>} set lmargin {{at screen} <margin>} set rmargin {{at screen} <margin>} set tmargin {{at screen} <margin>} show margin The default units of <margin> are character heights or widths, as appropriate. A positive value defines the absolute size of the margin. A negative value (or none) causes `gnuplot` to revert to the computed value. For 3D plots, only the left margin can be set using character units. The keywords `at screen` indicates that the margin is specified as a fraction of the full drawing area. This can be used to precisely line up the corners of individual 2D and 3D graphs in a multiplot. This placement ignores the current values of `set origin` and `set size`, and is intended as an alternative method for positioning graphs within a multiplot. Normally the margins of a plot are automatically calculated based on tics, tic labels, axis labels, the plot title, the timestamp and the size of the key if it is outside the borders. If, however, tics are attached to the axes (`set xtics axis`, for example), neither the tics themselves nor their labels will be included in either the margin calculation or the calculation of the positions of other text to be written in the margin. This can lead to tic labels overwriting other text if the axis is very close to the border. 3 mouse ?commands set mouse ?commands unset mouse ?set mouse ?unset mouse ?mousing ?mouse ?nomouse The command `set mouse` enables mouse actions for the current interactive terminal. It is usually enabled by default in interactive mode, but disabled by default if commands are being read from a file. There are two mouse modes. The 2D mode works for `plot` commands and for `splot` maps (i.e. `set view` with z-rotation 0, 90, 180, 270 or 360 degrees, including `set view map`). In this mode the mouse position is tracked and you can pan or zoom using the mouse buttons or arrow keys. Some terminals support toggling individual plots on/off by clicking on the corresponding key title or on a separate widget. For 3D graphs `splot`, the view and scaling of the graph can be changed with mouse buttons 1 and 2, respectively. A vertical motion of Button 2 with the shift key held down changes the `xyplane`. If additionally to these buttons the modifier <ctrl> is held down, the coordinate axes are displayed but the data are suppressed. This is useful for large data sets. Mousing is not available inside multiplot mode. When multiplot is completed using `unset multiplot`, then the mouse will be turned on again but acts only on the most recent plot within the multiplot (like replot does). Syntax: set mouse {doubleclick <ms>} {nodoubleclick} \ {{no}zoomcoordinates} \ {noruler | ruler {at x,y}} \ {polardistance{deg|tan} | nopolardistance} \ {format <string>} \ {clipboardformat <int>/<string>} \ {mouseformat <int>/<string>} \ {{no}labels {"labeloptions"}} \ {{no}zoomjump} {{no}verbose} unset mouse The options `noruler` and `ruler` switch the ruler off and on, the latter optionally setting the origin at the given coordinates. While the ruler is on, the distance in user units from the ruler origin to the mouse is displayed continuously. By default, toggling the ruler has the key binding 'r'. The option `polardistance` determines if the distance between the mouse cursor and the ruler is also shown in polar coordinates (distance and angle in degrees or tangent (slope)). This corresponds to the default key binding '5'. =labels Choose the option `labels` to define persistent gnuplot labels using Button 2. The default is `nolabels`, which makes Button 2 draw only a temporary label at the mouse position. Labels are drawn with the current setting of `mouseformat`. The `labeloptions` string is passed to the `set label` command. The default is "point pointstyle 1" which will plot a small plus at the label position. Temporary labels will disappear at the next `replot` or mouse zoom operation. Persistent labels can be removed by holding the Ctrl-Key down while clicking Button 2 on the label's point. The threshold for how close you must be to the label is also determined by the `pointsize`. If the option `verbose` is turned on the communication commands are shown during execution. This option can also be toggled by hitting `6` in the driver's window. `verbose` is off by default. Press 'h' in the driver's window for a short summary of the mouse and key bindings. This will also display user defined bindings or `hotkeys` which can be defined using the `bind` command, see help for `bind`. Note, that user defined `hotkeys` may override the default bindings. See also help for `bind` and `label`. 4 doubleclick ?set mouse doubleclick ?mouse doubleclick The doubleclick resolution is given in milliseconds and used for Button 1, which copies the current mouse position to the `clipboard`. The default value is 300 ms. Setting the value to 0 ms triggers the copy on a single click. 4 mouseformat ?set mouse format ?set mouse mouseformat ?mouse format ?mouseformat The `set mouse format` command specifies a format string for sprintf() which determines how the mouse cursor [x,y] coordinates are printed to the plot window and to the clipboard. The default is "% #g". `set mouse clipboardformat` and `set mouse mouseformat` are used for formatting the text on Button1 and Button2 actions -- copying the coordinates to the clipboard and temporarily annotating the mouse position. An integer argument selects one of the format options in the table below. A string argument is used as a format for sprintf() in option 6 and should contain two float specifiers. Example: `set mouse mouseformat "mouse x,y = %5.2g, %10.3f"`. Use `set mouse mouseformat ""` to turn this string off again. The following formats are available: 0 default (same as 1) 1 axis coordinates 1.23, 2.45 2 graph coordinates (from 0 to 1) /0.00, 1.00/ 3 x = timefmt y = axis [(as set by `set timefmt`), 2.45] 4 x = date y = axis [31. 12. 1999, 2.45] 5 x = time y = axis [23:59, 2.45] 6 x = date time y = axis [31. 12. 1999 23:59, 2.45] 7 format from `set mouse mouseformat`, e.g. "mouse x,y = 1.23, 2.450" 4 scrolling ?set mouse scrolling ?mouse scrolling ?mouse wheel ?scrolling ?mousewheel X and Y axis scaling in both 2D and 3D graphs can be adjusted using the mouse wheel. <wheel-up> scrolls up (increases both YMIN and YMAX by ten percent of the Y range, and increases both Y2MIN and Y2MAX likewise), and <wheel down> scrolls down. <shift-wheel-up> scrolls left (decreases both XMIN and XMAX, and both X2MIN and X2MAX), and <shift-wheel-down> scrolls right. <control-wheel-up> zooms in toward the center of the plot, and <control-wheel-down> zooms out. <shift-control-wheel-up> zooms in along the X and X2 axes only, and <shift-control-wheel-down> zooms out along the X and X2 axes only. 4 X11 mouse ?mouse x11_mouse ?x11_mouse ?x11 mouse If multiple X11 plot windows have been opened using the `set term x11 <n>` terminal option, then only the current plot window supports the entire range of mouse commands and hotkeys. The other windows will, however, continue to display mouse coordinates at the lower left. 4 zoom ?mouse zoom ?zoom Zooming is usually accomplished by holding down the left mouse button and dragging the mouse to delineate a zoom region. Some platforms may require using a different mouse button. The original plot can be restored by typing the 'u' hotkey in the plot window. The hotkeys 'p' and 'n' step back and forth through a history of zoom operations. The option `zoomcoordinates` determines if the coordinates of the zoom box are drawn at the edges while zooming. This is on by default. If the option `zoomjump` is on, the mouse pointer will be automatically offset a small distance after starting a zoom region with button 3. This can be useful to avoid a tiny (or even empty) zoom region. `zoomjump` is off by default. 3 multiplot ?commands set multiplot ?commands unset multiplot ?set multiplot ?unset multiplot ?multiplot ?nomultiplot The command `set multiplot` places `gnuplot` in the multiplot mode, in which several plots are placed on the same page, window, or screen. Syntax: set multiplot { title <page title> {font <fontspec>} {enhanced|noenhanced} } { layout <rows>,<cols> {rowsfirst|columnsfirst} {downwards|upwards} {scale <xscale>{,<yscale>}} {offset <xoff>{,<yoff>}} } unset multiplot For some terminals, no plot is displayed until the command `unset multiplot` is given, which causes the entire page to be drawn and then returns gnuplot to its normal single-plot mode. For other terminals, each separate `plot` command produces an updated display, either by redrawing all previous ones and the newly added plot, or by just adding the new plot to the existing display. The area to be used by the next plot is not erased before doing the new plot. The `clear` command can be used to do this if wanted, as is typically the case for "inset" plots. Any labels or arrows that have been defined will be drawn for each plot according to the current size and origin (unless their coordinates are defined in the `screen` system). Just about everything else that can be `set` is applied to each plot, too. If you want something to appear only once on the page, for instance a single time stamp, you'll need to put a `set time`/`unset time` pair around one of the `plot`, `splot` or `replot` commands within the `set multiplot`/`unset multiplot` block. The multiplot title is separate from the individual plot titles, if any. Space is reserved for it at the top of the page, spanning the full width of the canvas. The commands `set origin` and `set size` must be used to correctly position each plot if no layout is specified or if fine tuning is desired. See `set origin` and `set size` for details of their usage. Example: set multiplot set size 0.4,0.4 set origin 0.1,0.1 plot sin(x) set size 0.2,0.2 set origin 0.5,0.5 plot cos(x) unset multiplot This displays a plot of cos(x) stacked above a plot of sin(x). `set size` and `set origin` refer to the entire plotting area used for each plot. Please also see `set term size`. If you want to have the axes themselves line up, you can guarantee that the margins are the same size with the `set margin` commands. See `set margin` for their use. Note that the margin settings are absolute, in character units, so the appearance of the graph in the remaining space will depend on the screen size of the display device, e.g., perhaps quite different on a video display and a printer. With the `layout` option you can generate simple multiplots without having to give the `set size` and `set origin` commands before each plot: Those are generated automatically, but can be overridden at any time. With `layout` the display will be divided by a grid with <rows> rows and <cols> columns. This grid is filled rows first or columns first depending on whether the corresponding option is given in the multiplot command. The stack of plots can grow `downwards` or `upwards`. Default is `rowsfirst` and `downwards`. Each plot can be scaled by `scale` and shifted with `offset`; if the y-values for scale or offset are omitted, the x-value will be used. `unset multiplot` will turn off the automatic layout and restore the values of `set size` and `set origin` as they were before `set multiplot layout`. Example: set size 1,1 set origin 0,0 set multiplot layout 3,2 columnsfirst scale 1.1,0.9 [ up to 6 plot commands here ] unset multiplot The above example will produce 6 plots in 2 columns filled top to bottom, left to right. Each plot will have a horizontal size of 1.1/2 and a vertical size of 0.9/3. See also ^ <a href="http://www.gnuplot.info/demo/multiplt.html"> multiplot demo (multiplt.dem) ^ </a> 3 mx2tics ?commands set mx2tics ?commands unset mx2tics ?commands show mx2tics ?set mx2tics ?unset mx2tics ?show mx2tics ?mx2tics ?nomx2tics Minor tic marks along the x2 (top) axis are controlled by `set mx2tics`. Please see `set mxtics`. 3 mxtics ?commands set mxtics ?commands unset mxtics ?commands show mxtics ?set mxtics ?unset mxtics ?show mxtics ?mxtics ?nomxtics Minor tic marks along the x axis are controlled by `set mxtics`. They can be turned off with `unset mxtics`. Similar commands control minor tics along the other axes. Syntax: set mxtics {<freq> | default} unset mxtics show mxtics The same syntax applies to `mytics`, `mztics`, `mx2tics`, `my2tics` and `mcbtics`. <freq> is the number of sub-intervals (NOT the number of minor tics) between major tics (the default for a linear axis is either two or five depending on the major tics, so there are one or four minor tics between major tics). Selecting `default` will return the number of minor ticks to its default value. If the axis is logarithmic, the number of sub-intervals will be set to a reasonable number by default (based upon the length of a decade). This will be overridden if <freq> is given. However the usual minor tics (2, 3, ..., 8, 9 between 1 and 10, for example) are obtained by setting <freq> to 10, even though there are but nine sub-intervals. To set minor tics at arbitrary positions, use the ("<label>" <pos> <level>, ...) form of `set {x|x2|y|y2|z}tics` with <label> empty and <level> set to 1. The `set m{x|x2|y|y2|z}tics` commands work only when there are uniformly spaced major tics. If all major tics were placed explicitly by `set {x|x2|y|y2|z}tics`, then minor tic commands are ignored. Implicit major tics and explicit minor tics can be combined using `set {x|x2|y|y2|z}tics` and `set {x|x2|y|y2|z}tics add`. Examples: set xtics 0, 5, 10 set xtics add (7.5) set mxtics 5 Major tics at 0,5,7.5,10, minor tics at 1,2,3,4,6,7,8,9 set logscale y set ytics format "" set ytics 1e-6, 10, 1 set ytics add ("1" 1, ".1" 0.1, ".01" 0.01, "10^-3" 0.001, \ "10^-4" 0.0001) set mytics 10 Major tics with special formatting, minor tics at log positions By default, minor tics are off for linear axes and on for logarithmic axes. They inherit the settings for `axis|border` and `{no}mirror` specified for the major tics. Please see `set xtics` for information about these. 3 my2tics ?commands set my2tics ?commands unset my2tics ?commands show my2tics ?set my2tics ?unset my2tics ?show my2tics ?my2tics ?nomy2tics Minor tic marks along the y2 (right-hand) axis are controlled by `set my2tics`. Please see `set mxtics`. 3 mytics ?commands set mytics ?commands unset mytics ?commands show mytics ?set mytics ?unset mytics ?show mytics ?mytics ?nomytics Minor tic marks along the y axis are controlled by `set mytics`. Please see `set mxtics`. 3 mztics ?commands set mztics ?commands unset mztics ?commands show mztics ?set mztics ?unset mztics ?show mztics ?mztics ?nomztics Minor tic marks along the z axis are controlled by `set mztics`. Please see `set mxtics`. 3 object ?object ?commands set object ?commands show object ?set object ?show object The `set object` command defines a single object which will appear in all subsequent 2D plots. You may define as many objects as you like. Currently the supported object types are `rectangle`, `circle`, `ellipse`, and `polygon`. Rectangles inherit a default set of style properties (fill, color, border) from those set by the command `set style rectangle`, but each object can also be given individual style properties. Circles, ellipses, and polygons inherit the fill style from `set style fill`. Syntax: set object <index> <object-type> <object-properties> {front|back|behind} {fc|fillcolor <colorspec>} {fs <fillstyle>} {default} {lw|linewidth <width>} <object-type> is either `rectangle`, `ellipse`, `circle`, or `polygon`. Each object type has its own set of characteristic properties. Setting `front` will draw the object in front of all plot elements, but behind any labels that are also marked `front`. Setting `back` will place the object behind all plot curves and labels. Setting `behind` will place the object behind everything including the axes and `back` rectangles, thus set object rectangle from screen 0,0 to screen 1,1 behind can be used to provide a colored background for the entire graph or page. The fill color of the object is taken from the <colorspec>. `fillcolor` may be abbreviated `fc`. The fill style is taken from <fillstyle>. See `colorspec` and `fillstyle`. If the keyword `default` is given, these properties are inherited from the default settings at the time a plot is drawn. See `set style rectangle`. 4 rectangle ?rectangle ?commands set object rectangle ?commands show object rectangle ?set object rectangle ?show object rectangle Syntax: set object <index> rectangle {from <position> {to|rto} <position> | center <position> size <w>,<h> | at <position> size <w>,<h>} The position of the rectangle may be specified by giving the position of two diagonal corners (bottom left and top right) or by giving the position of the center followed by the width and the height. In either case the positions may be given in axis, graph, or screen coordinates. See `coordinates`. The options `at` and `center` are synonyms. Examples: # Force the entire area enclosed by the axes to have background color cyan set object 1 rect from graph 0, graph 0 to graph 1, graph 1 back set object 1 rect fc rgb "cyan" fillstyle solid 1.0 # Position a red square with lower left at 0,0 and upper right at 2,3 set object 2 rect from 0,0 to 2,3 fc lt 1 # Position an empty rectangle (no fill) with a blue border set object 3 rect from 0,0 to 2,3 fs empty border rgb "blue" # Return fill and color to the default style but leave vertices unchanged set object 2 rect default Rectangle corners specified in screen coordinates may extend beyond the edge of the current graph. Otherwise the rectangle is clipped to fit in the graph. 4 ellipse ?ellipse ?commands set object ellipse ?commands show object ellipse ?set object ellipse ?show object ellipse Syntax: set object <index> ellipse {at|center} <position> size <w>,<h> {angle <orientation>} {units xy|xx|yy} {<other-object-properties>} The position of the ellipse is specified by giving the center followed by the width and the height (actually the major and minor axes). The keywords `at` and `center` are synonyms. The center position may be given in axis, graph, or screen coordinates. See `coordinates`. The major and minor axis lengths must be given in axis coordinates. The orientation of the ellipse is specified by the angle between the horizontal axis and the major diameter of the ellipse. If no angle is given, the default ellipse orientation will be used instead (see `set style ellipse`). The `units` keyword controls the scaling of the axes of the ellipse. `units xy` means that the major axis is interpreted in terms of units along the x axis, while the minor axis in that of the y axis. `units xx` means that both axes of the ellipses are scaled in the units of the x axis, while `units yy` means that both axes are in units of the y axis. The default is `xy` or whatever `set style ellipse units` was set to. NB: If the x and y axis scales are not equal, (e.g. `units xy` is in effect) then the major/minor axis ratio will no longer be correct after rotation. Note that `set object ellipse size <2r>,<2r>` does not in general produce the same result as `set object circle <r>`. The circle radius is always interpreted in terms of units along the x axis, and will always produce a circle even if the x and y axis scales are different and even if the aspect ratio of your plot is not 1. If `units` is set to `xy`, then 'set object ellipse' interprets the first <2r> in terms of x axis units and the second <2r> in terms of y axis units. This will only produce a circle if the x and y axis scales are identical and the plot aspect ratio is 1. On the other hand, if `units` is set to `xx` or `yy`, then the diameters specified in the 'set object' command will be interpreted in the same units, so the ellipse will have the correct aspect ratio, and it will maintain its aspect ratio even if the plot is resized. 4 circle ?circle ?commands set object circle ?commands show object circle ?set object circle ?show object circle Syntax: set object <index> circle {at|center} <position> size <radius> {arc [<begin>:<end>]} {<other-object-properties>} The position of the circle is specified by giving the position of the center center followed by the radius. The keywords `at` and `center` are synonyms. The position and radius may be given in x-axis, graph, or canvas coordinates. See `coordinates`. In all cases the radius is calculated relative to the horizontal scale of the axis, graph, or canvas. Any disparity between the horizontal and vertical scaling will be corrected for so that the result is always a circle. By default a full circle is drawn. The optional qualifier `arc` specifies a starting angle and ending angle, in degrees, for one arc of the circle. The arc is always drawn counterclockwise. 4 polygon ?polygon ?commands set object polygon ?commands show object polygon ?set object polygon ?show object polygon Syntax: set object <index> polygon from <position> to <position> ... {to <position>} or from <position> rto <position> ... {rto <position>} The position of the polygon may be specified by giving the position of a sequence of vertices. These may be given in axis, graph, or screen coordinates. If relative coordinates are used (rto) then the coordinate type must match that of the previous vertex. See `coordinates`. Example: set object 1 polygon from 0,0 to 1,1 to 2,0 set object 1 fc rgb "cyan" fillstyle solid 1.0 border lt -1 3 offsets ?commands set offsets ?commands unset offsets ?commands show offsets ?set offsets ?unset offsets ?show offsets ?offsets ?nooffsets Offsets provide a mechanism to put an empty boundary around the data inside an autoscaled graph. The offsets only affect the x1 and y1 axes, and only in 2D `plot` commands. Syntax: set offsets <left>, <right>, <top>, <bottom> unset offsets show offsets Each offset may be a constant or an expression. Each defaults to 0. By default, the left and right offsets are given in units of the first x axis, the top and bottom offsets in units of the first y axis. Alternatively, you may specify the offsets as a fraction of the total axis range by using the keyword "graph". A positive offset expands the axis range in the specified direction, e.g., a positive bottom offset makes ymin more negative. Negative offsets, while permitted, can have unexpected interactions with autoscaling and clipping. To prevent the auto-scaling from further adjusting your axis ranges, it is useful to also specify "set auto fix". Example: set auto fix set offsets graph 0.05, 0, 2, 2 plot sin(x) This graph of sin(x) will have a y range [-3:3] because the function will be autoscaled to [-1:1] and the vertical offsets are each two. The x range will be [-11:10] because the default is [-10:10] and it has been expanded to the left by 0.05 of that total range. 3 origin ?commands set origin ?commands show origin ?set origin ?show origin ?origin The `set origin` command is used to specify the origin of a plotting surface (i.e., the graph and its margins) on the screen. The coordinates are given in the `screen` coordinate system (see `coordinates` for information about this system). Syntax: set origin <x-origin>,<y-origin> 3 output ?commands set output ?commands show output ?set output ?show output ?output ?output file By default, screens are displayed to the standard output. The `set output` command redirects the display to the specified file or device. Syntax: set output {"<filename>"} show output The filename must be enclosed in quotes. If the filename is omitted, any output file opened by a previous invocation of `set output` will be closed and new output will be sent to STDOUT. (If you give the command `set output "STDOUT"`, your output may be sent to a file named "STDOUT"! ["May be", not "will be", because some terminals, like `x11` or `wxt`, ignore `set output`.]) When both `set terminal` and `set output` are used together, it is safest to give `set terminal` first, because some terminals set a flag which is needed in some operating systems. This would be the case, for example, if the operating system needs to know whether or not a file is to be formatted in order to open it properly. On machines with popen functions (Unix), output can be piped through a shell command if the first non-whitespace character of the filename is '|'. For instance, set output "|lpr -Plaser filename" set output "|lp -dlaser filename" On MSDOS machines, `set output "PRN"` will direct the output to the default printer. On VMS, output can be sent directly to any spooled device. It is also possible to send the output to DECnet transparent tasks, which allows some flexibility. 3 parametric ?commands set parametric ?commands unset parametric ?commands show parametric ?set parametric ?unset parametric ?show parametric ?parametric ?noparametric The `set parametric` command changes the meaning of `plot` (`splot`) from normal functions to parametric functions. The command `unset parametric` restores the plotting style to normal, single-valued expression plotting. Syntax: set parametric unset parametric show parametric For 2D plotting, a parametric function is determined by a pair of parametric functions operating on a parameter. An example of a 2D parametric function would be `plot sin(t),cos(t)`, which draws a circle (if the aspect ratio is set correctly---see `set size`). `gnuplot` will display an error message if both functions are not provided for a parametric `plot`. For 3D plotting, the surface is described as x=f(u,v), y=g(u,v), z=h(u,v). Therefore a triplet of functions is required. An example of a 3D parametric function would be `cos(u)*cos(v),cos(u)*sin(v),sin(u)`, which draws a sphere. `gnuplot` will display an error message if all three functions are not provided for a parametric `splot`. The total set of possible plots is a superset of the simple f(x) style plots, since the two functions can describe the x and y values to be computed separately. In fact, plots of the type t,f(t) are equivalent to those produced with f(x) because the x values are computed using the identity function. Similarly, 3D plots of the type u,v,f(u,v) are equivalent to f(x,y). Note that the order the parametric functions are specified is xfunction, yfunction (and zfunction) and that each operates over the common parametric domain. Also, the `set parametric` function implies a new range of values. Whereas the normal f(x) and f(x,y) style plotting assume an xrange and yrange (and zrange), the parametric mode additionally specifies a trange, urange, and vrange. These ranges may be set directly with `set trange`, `set urange`, and `set vrange`, or by specifying the range on the `plot` or `splot` commands. Currently the default range for these parametric variables is [-5:5]. Setting the ranges to something more meaningful is expected. 3 plot ?commands show plot ?show plot The `show plot` command shows the current plotting command as it results from the last `plot` and/or `splot` and possible subsequent `replot` commands. In addition, the `show plot add2history` command adds this current plot command into the `history`. It is useful if you have used `replot` to add more curves to the current plot and you want to edit the whole command now. 3 pm3d ?commands set pm3d ?commands show pm3d ?set pm3d ?show pm3d ?pm3d pm3d is an `splot` style for drawing palette-mapped 3d and 4d data as color/gray maps and surfaces. It uses an algorithm that allows plotting gridded as well as non-gridded data without preprocessing, even when the data scans do not have the same number of points. Syntax (the options can be given in any order): set pm3d { { at <position> } { interpolate <steps/points in scan, between scans> } { scansautomatic | scansforward | scansbackward | depthorder } { flush { begin | center | end } } { ftriangles | noftriangles } { clip1in | clip4in } { corners2color { mean|geomean|median|min|max|c1|c2|c3|c4 } } { hidden3d {<linestyle>} | nohidden3d } { implicit | explicit } { map } } show pm3d unset pm3d A pm3d color surface is drawn if the splot command specifies `with pm3d`, if the data or function `style` is set to pm3d globally, or if the pm3d mode is `set pm3d implicit`. In the latter two cases, the pm3d surface is draw in addition to the mesh produced by the style specified in the plot command. E.g. splot 'fred.dat' with lines, 'lola.dat' with lines would draw both a mesh of lines and a pm3d surface for each data set. If the option `explicit` is on (or `implicit` is off) only plots specified by the `with pm3d` attribute are plotted with a pm3d surface, e.g.: splot 'fred.dat' with lines, 'lola.dat' with pm3d would plot 'fred.dat' with lines (only) and 'lola.dat' with a pm3d surface. On gnuplot start-up, the mode is `explicit`. For historical and compatibility reasons, the commands `set pm3d;` (i.e. no options) and `set pm3d at X ...` (i.e. `at` is the first option) change the mode to `implicit`. The command `set pm3d;` sets other options to their default state. If you set the default data or function style to `pm3d`, e.g.: set style data pm3d then the options `implicit` and `explicit` have no effect. Note that when plotting several plots, they are plotted in the order given on the command line. This can be of interest especially for filled surfaces which can overwrite and therefore hide part of earlier plots. The pm3d coloring can be drawn at any or all of three different positions, `top`, `bottom`, or `surface`. See `pm3d position`. The following command draws three color surfaces at different altitudes: set border 4095 set pm3d at s splot 10*x with pm3d at b, x*x-y*y, x*x+y*y with pm3d at t See also help for `set palette`, `set cbrange`, `set colorbox`, and definitely the demo file `demo/pm3d.dem`. 4 algorithm ?pm3d algorithm Let us first describe how a map/surface is drawn. The input data come from an evaluated function or from an `splot data file`. Each surface consists of a sequence of separate scans (isolines). The pm3d algorithm fills the region between two neighbouring points in one scan with another two points in the next scan by a gray (or color) according to z-values (or according to an additional 'color' column, see help for `using`) of these 4 corners; by default the 4 corner values are averaged, but this can be changed by the option `corners2color`. In order to get a reasonable surface, the neighbouring scans should not cross and the number of points in the neighbouring scans should not differ too much; of course, the best plot is with scans having same number of points. There are no other requirements (e.g. the data need not be gridded). Another advantage is that the pm3d algorithm does not draw anything outside of the input (measured or calculated) region. Surface coloring works with the following input data: 1. splot of function or of data file with one or three data columns: The gray/color scale is obtained by mapping the averaged (or `corners2color`) z-coordinate of the four corners of the above-specified quadrangle into the range [min_color_z,max_color_z] of `zrange` or `cbrange` providing a gray value in the range [0:1]. This value can be used directly as the gray for gray maps. The normalized gray value can be further mapped into a color---see `set palette` for the complete description. 2. splot of data file with two or four data columns: The gray/color value is obtained by using the last-column coordinate instead of the z-value, thus allowing the color and the z-coordinate be mutually independent. This can be used for 4d data drawing. Other notes: 1. The term 'scan' referenced above is used more among physicists than the term 'iso_curve' referenced in gnuplot documentation and sources. You measure maps recorded one scan after another scan, that's why. 2. The 'gray' or 'color' scale is a linear mapping of a continuous variable onto a smoothly varying palette of colors. The mapping is shown in a rectangle next to the main plot. This documentation refers to this as a "colorbox", and refers to the indexing variable as lying on the colorbox axis. See `set colorbox`, `set cbrange`. 3. To use pm3d coloring to generate a two-dimensional plot rather than a 3D surface, use `set view map` or `set pm3d map`. 4 position ?pm3d position Color surface can be drawn at the base or top (then it is a gray/color planar map) or at z-coordinates of surface points (gray/color surface). This is defined by the `at` option with a string of up to 6 combinations of `b`, `t` and `s`. For instance, `at b` plots at bottom only, `at st` plots firstly surface and then top map, while `at bstbst` will never by seriously used. Colored quadrangles are plotted one after another. When plotting surfaces (`at s`), the later quadrangles overlap (overdraw) the previous ones. (Gnuplot is not virtual reality tool to calculate intersections of filled polygon meshes.) You may try to switch between `scansforward` and `scansbackward` to force the first scan of the data to be plotted first or last. The default is `scansautomatic` where gnuplot makes a guess about scans order. On the other hand, the `depthorder` option completely reorders the quadrangles. The rendering is performed after a depth sorting, which allows to visualize even complicated surfaces; see `pm3d depthorder` for more details. 4 scanorder ?pm3d scanorder ?pm3d depthorder ?pm3d flush ?depthorder =flush =scansforward =scansbackward =scansautomatic =depthorder By default the quadrangles making up a pm3d solid surface are rendered in the order they are encountered along the surface grid points. This order may be controlled by the options `scansautomatic`|`scansforward`|`scansbackward`. These scan options are not in general compatible with hidden-surface removal. If two successive scans do not have same number of points, then it has to be decided whether to start taking points for quadrangles from the beginning of both scans (`flush begin`), from their ends (`flush end`) or to center them (`flush center`). Note, that `flush (center|end)` are incompatible with `scansautomatic`: if you specify `flush center` or `flush end` and `scansautomatic` is set, it is silently switched to `scansforward`. If two subsequent scans do not have the same number of points, the option `ftriangles` specifies whether color triangles are drawn at the scan tail(s) where there are not enough points in either of the scan. This can be used to draw a smooth map boundary. Gnuplot does not do true hidden surface removal for solid surfaces, but often it is sufficient to render the component quadrangles in order from furthest to closest. This mode may be selected using the options set pm3d depthorder hidden3d The `depthorder` option orders the solid quadrangles; the `hidden3d` option similarly orders the bounding lines (if drawn). Note that the global option `set hidden3d` does not affect pm3d surfaces. 4 clipping ?pm3d clipping Clipping with respect to x, y coordinates of quadrangles can be done in two ways. `clip1in`: all 4 points of each quadrangle must be defined and at least 1 point of the quadrangle must lie in the x and y ranges. `clip4in`: all 4 points of each quadrangle must lie in the x and y ranges. 4 color_assignment ?pm3d color_assignment =mean =geomean =median =min =max `3 columns of data (x,y,z)`: The coloring setup as well as the color box drawing are determined by `set palette`. There can be only one palette for the current plot. Drawing of several surfaces with different palettes can be achieved by `multiplot` with fixed `origin` and `size`; don't forget to use `set palette maxcolors` when your terminal is running out of available colors. There is a single gray/color value associated to each drawn pm3d quadrangle (no smooth color change among vertices). The value is calculated from z-coordinates from the surrounding corners according to `corners2color <option>`. The options 'mean' (default), 'geomean' and 'median' produce various kinds of surface color smoothing, while options 'min' and 'max' choose minimal or maximal value, respectively. This may not be desired for pixel images or for maps with sharp and intense peaks, in which case the options 'c1', 'c2', 'c3' or 'c4' can be used instead to assign the quadrangle color based on the z-coordinate of only one corner. Some experimentation may be needed to determine which corner corresponds to 'c1', as the orientation depends on the drawing direction. Because the pm3d algorithm does not extend the colored surface outside the range of the input data points, the 'c<j>' coloring options will result in pixels along two edges of the grid not contributing to the color of any quadrangle. For example, applying the pm3d algorithm to the 4x4 grid of data points in script `demo/pm3d.dem` (please have a look) produces only (4-1)x(4-1)=9 colored rectangles. `4 columns of data (x,y,z,color)`: If a fourth column of data is provided, it is normally interpreted as a separate palette-mapped gray value. The coloring of individual quadrangles works as above, except that the color value is distinct from the z value. As a separate coloring option, the fourth data column may provide instead an RGB color. See `rgbcolor variable`. In this case the plotting command must be splot ... using 1:2:3:4 with pm3d lc rgb variable Another drawing algorithm, which would draw quadrangles around a given node by taking corners from averaged (x,y)-coordinates of its surrounding 4 nodes while using node's color, could be implemented in the future. This is already done for drawing images (2D grids) via `image` and `rgbimage` styles. Notice that ranges of z-values and color-values for surfaces are adjustable independently by `set zrange`, `set cbrange`, as well as `set log` for z or cb. Maps can be adjusted by the cb-axis only; see also `set view map` and `set colorbox`. 4 hidden3d ?set pm3d hidden3d ?pm3d hidden3d The option `set pm3d hidden3d` draws the bounding lines of each quadrangle at the same time that the quadrangle itself is drawn. Normally it is used in conjunction with the `depthorder` option to achieve an approximation to true hidden line removal. This is far more efficient than using the command `set hidden3d`. The command takes an optional linestyle controlling the appearance of the bounding lines. If the linestyle parameter is negative, or omitted, then the line properties given in the plot command are used. Example of recommended usage: set pm3d at s hidden3d depthorder unset hidden3d unset surf splot x*x+y*y linecolor rgb "black" linewidth 0.5 4 interpolate ?set pm3d interpolate ?pm3d interpolate The option `interpolate m,n` will interpolate grid points into a finer mesh, and color each quadrangle appropriately. For data files, this will smoothen the color surface, and enhance spikes in a color surface. For functions, interpolation makes little sense, except to trade off precision for memory. It would usually make more sense to use `samples` and `isosamples` when working with functions. For positive m and n, each quadrangle or triangle is interpolated m-times and n-times in the respective direction. For negative m and n, the interpolation frequency is chosen so that there will be at least |m| and |n| points drawn; you can consider this as a special gridding function. Zeros, i.e. `interpolate 0,0`, will automatically choose an optimal number of interpolated surface points. 4 deprecated_options ?pm3d deprecated_options There used to be an option {transparent|solid} to this command. Now you get the same effect from `set grid {front|layerdefault}`, respectively. The command `set pm3d map` is equivalent to `set pm3d at b`; `set view map`; `set style data pm3d`; `set style func pm3d`;. It is used for backwards compatibility, when `set view map` was not available. Take care that you properly use `zrange` and `cbrange` for input data point filtering and color range scaling, respectively; and also `set (no)surface` seems to have a (side?) effect. 3 palette ?commands set palette ?commands show palette ?set palette ?show palette ?palette Palette is a color storage for use by `pm3d`, filled color contours or polygons, color histograms, color gradient background, and whatever it is or it will be implemented... Here it stands for a palette of smooth "continuous" colors or grays, but let's call it just a palette. Color palettes require terminal entries for filled color polygons and palettes of smooth colors, are currently available for terminals listed in help for `set pm3d`. The range of color values are adjustable independently by `set cbrange` and `set log cb`. The whole color palette is visualized in the `colorbox`. Syntax: set palette set palette { { gray | color } { gamma <gamma> } { rgbformulae <r>,<g>,<b> | defined { ( <gray1> <color1> {, <grayN> <colorN>}... ) } | file '<filename>' {datafile-modifiers} | functions <R>,<G>,<B> } { cubehelix {start <val>} {cycles <val>} {saturation <val>} } { model { RGB | HSV | CMY | YIQ | XYZ } } { positive | negative } { nops_allcF | ps_allcF } { maxcolors <maxcolors> } } show palette show palette palette <n> {{float | int}} show palette gradient show palette fit2rgbformulae show palette rgbformulae show colornames `set palette` (i.e. without options) sets up the default values. Otherwise, the options can be given in any order. `show palette` shows the current palette properties. `show palette gradient` displays the gradient defining the palette (if appropriate). `show palette rgbformulae` prints the available fixed gray --> color transformation formulae. `show colornames` prints the known color names. `show palette palette <n>` prints to the screen or to the file given by `set print` a table of RGB triplets calculated for the current palette settings and a palette having <n> discrete colors. The default wide table can be limited to 3 columns of r,g,b float values [0..1] or integer values [0..255] by options float or int, respectively. This way, the current gnuplot color palette can be loaded into other imaging applications, for example Octave. Additionally to this textual list of RGB table, you can use the `test palette` command to plot the R,G,B profiles for the current palette. The following options determine the coloring properties. Figure using this palette can be `gray` or `color`. For instance, in `pm3d` color surfaces the gray of each small spot is obtained by mapping the averaged z-coordinate of the 4 corners of surface quadrangles into the range [min_z,max_z] providing range of grays [0:1]. This value can be used directly as the gray for gray maps. The color map requires a transformation gray --> (R,G,B), i.e. a mapping [0:1] --> ([0:1],[0:1],[0:1]). Basically two different types of mappings can be used: Analytic formulae to convert gray to color, or discrete mapping tables which are interpolated. `palette rgbformulae` and `palette functions` use analytic formulae whereas `palette defined` and `palette file` use interpolated tables. `palette rgbformulae` reduces the size of postscript output to a minimum. The command `show palette fit2rgbformulae` finds the best matching `set palette rgbformulae` for the current `set palette`. Naturally, it makes sense to use it for non-rgbformulae palettes. This command can be found useful mainly for external programs using the same rgbformulae definition of palettes as gnuplot, like zimg ( ^ <a href="http://zimg.sourceforge.net"> http://zimg.sourceforge.net ^ </a> ). `set palette gray` switches to a gray only palette. `set palette rgbformulae`, `set palette defined`, `set palette file` and `set palette functions` switch to a color mapping. `set palette color` is an easy way to switch back from the gray palette to the last color mapping. Automatic gamma correction via `set palette gamma <gamma>` can be done for gray maps (`set palette gray`) and for the `cubehelix` color palette schemes. Gamma = 1 produces a linear ramp of intensity. See `test palette`. Many terminals support only discrete number of colors (e.g. 256 colors in gif). After the default gnuplot linetype colors are allocated, the rest of the available colors are by default reserved for pm3d. Thus a multiplot using multiple palettes could fail because the first palette has used all the available color positions. You can mitigate this limitation by using `set palette maxcolors <N>` with a reasonably small value of N. This option causes N discrete colors to be selected from a continuous palette sampled at equally spaced intervals. If you want unequal spacing of N discrete colors, use `set palette defined` instead of a single continuous palette. RGB color space might not be the most useful color space to work in. For that reason you may change the color space with `model` to one of `RGB`, `HSV`, `CMY`, `YIQ` and `XYZ`. Using color names for `set palette defined` tables and a color space other than RGB will result in funny colors. All explanation have been written for RGB color space, so please note, that `R` can be `H`, `C`, `Y`, or `X`, depending on the actual color space (`G` and `B` accordingly). All values for all color spaces are limited to [0,1]. RGB stands for Red, Green and Blue; CMY stands for Cyan, Magenta and Yellow; HSV stands for Hue, Saturation, and Value; YIQ is the color model used by the U.S. Commercial Color Television Broadcasting, it is basically an RGB recoding with downward compatibility for black and white television; XYZ are the three primary colors of the color model defined by the 'Commission Internationale de l'Eclairage' (CIE). For more information on color models see: ^ <a href="http://en.wikipedia.org/wiki/Color_space"> http://en.wikipedia.org/wiki/Color_space ^ </a> 4 rgbformulae ?commands set palette rgbformulae ?set palette rgbformulae ?palette rgbformulae ?rgbformulae =colors For `rgbformulae` three suitable mapping functions have to be chosen. This is done via `rgbformulae <r>,<g>,<b>`. The available mapping functions are listed by `show palette rgbformulae`. Default is `7,5,15`, some other examples are `3,11,6`, `21,23,3` or `3,23,21`. Negative numbers, like `3,-11,-6`, mean inverted color (i.e. 1-gray passed into the formula, see also `positive` and `negative` options below). Some nice schemes in RGB color space 7,5,15 ... traditional pm3d (black-blue-red-yellow) 3,11,6 ... green-red-violet 23,28,3 ... ocean (green-blue-white); try also all other permutations 21,22,23 ... hot (black-red-yellow-white) 30,31,32 ... color printable on gray (black-blue-violet-yellow-white) 33,13,10 ... rainbow (blue-green-yellow-red) 34,35,36 ... AFM hot (black-red-yellow-white) A full color palette in HSV color space 3,2,2 ... red-yellow-green-cyan-blue-magenta-red Please note that even if called `rgbformulae` the formulas might actually determine the <H>,<S>,<V> or <X>,<Y>,<Z> or ... color components as usual. Use `positive` and `negative` to invert the figure colors. ^ <a name="positive"></a> ^ <a name="negative"></a> Note that it is possible to find a set of the best matching rgbformulae for any other color scheme by the command show palette fit2rgbformulae 4 defined ?commands set palette defined ?set palette defined ?palette defined =colors Gray-to-rgb mapping can be manually set by use of `palette defined`: A color gradient is defined and used to give the rgb values. Such a gradient is a piecewise linear mapping from gray values in [0,1] to the RGB space [0,1]x[0,1]x[0,1]. You must specify the gray values and the corresponding RGB values between which linear interpolation will be done. Syntax: set palette defined { ( <gray1> <color1> {, <grayN> <colorN>}... ) } <grayX> are gray values which are mapped to [0,1] and <colorX> are the corresponding rgb colors. The color can be specified in three different ways: <color> := { <r> <g> <b> | '<color-name>' | '#rrggbb' } Either by three numbers (each in [0,1]) for red, green and blue, separated by whitespace, or the name of the color in quotes or X style color specifiers also in quotes. You may freely mix the three types in a gradient definition, but the named color "red" will be something strange if RGB is not selected as color space. Use `show colornames` for a list of known color names. Please note, that even if written as <r>, this might actually be the <H> component in HSV color space or <X> in CIE-XYZ space, or ... depending on the selected color model. The <gray> values have to form an ascending sequence of real numbers; the sequence will be automatically rescaled to [0,1]. `set palette defined` (without a gradient definition in braces) switches to RGB color space and uses a preset full-spectrum color gradient. Use `show palette gradient` to display the gradient. Examples: To produce a gray palette (useless but instructive) use: set palette model RGB set palette defined ( 0 "black", 1 "white" ) To produce a blue yellow red palette use (all equivalent): set palette defined ( 0 "blue", 1 "yellow", 2 "red" ) set palette defined ( 0 0 0 1, 1 1 1 0, 2 1 0 0 ) set palette defined ( 0 "#0000ff", 1 "#ffff00", 2 "#ff0000" ) To produce some rainbow-like palette use: set palette defined ( 0 "blue", 3 "green", 6 "yellow", 10 "red" ) Full color spectrum within HSV color space: set palette model HSV set palette defined ( 0 0 1 1, 1 1 1 1 ) set palette defined ( 0 0 1 0, 1 0 1 1, 6 0.8333 1 1, 7 0.8333 0 1) Approximate the default palette used by MATLAB: set pal defined (1 '#00008f', 8 '#0000ff', 24 '#00ffff', \ 40 '#ffff00', 56 '#ff0000', 64 '#800000') To produce a palette with only a few, equally-spaced colors: set palette model RGB maxcolors 4 set palette defined ( 0 "yellow", 1 "red" ) 'Traffic light' palette (non-smooth color jumps at gray = 1/3 and 2/3). set palette model RGB set palette defined (0 "dark-green", 1 "green", \ 1 "yellow", 2 "dark-yellow", \ 2 "red", 3 "dark-red" ) 4 functions ?commands set palette functions ?set palette functions ?palette functions Use `set palette functions <Rexpr>, <Gexpr>, <Bexpr>` to define three formulae for the R(gray), G(gray) and B(gray) mapping. The three formulae may depend on the variable `gray` which will take values in [0,1] and should also produce values in [0,1]. Please note that <Rexpr> might be a formula for the H-value if HSV color space has been chosen (same for all other formulae and color spaces). Examples: To produce a full color palette use: set palette model HSV functions gray, 1, 1 A nice black to gold palette: set palette model XYZ functions gray**0.35, gray**0.5, gray**0.8 A gamma-corrected black and white palette gamma = 2.2 color(gray) = gray**(1./gamma) set palette model RGB functions color(gray), color(gray), color(gray) 4 cubehelix ?commands set palette cubehelix ?set palette cubehelix ?cubehelix The "cubehelix" option defines a family of palettes in which color (hue) varies along the standard color wheel while at the same time the net intensity increases monotonically as the gray value goes from 0 to 1. D A Green (2011) http://arxiv.org/abs/1108.5083 `start` defines the starting point along the color wheel in radians. `cycles` defines how many color wheel cycles span the palette range. Larger values of `saturation` produce more saturated color; saturation > 1 may lead to clipping of the individual RGB components and to intensity becoming non-monotonic. The palette is also affected by `set palette gamma`. The default values are set palette cubehelix start 0.5 cycles -1.5 saturation 1 set palette gamma 1.5 4 file ?commands set palette file ?set palette file ?palette file `set palette file` is basically a `set palette defined (<gradient>)` where <gradient> is read from a datafile. Either 4 columns (gray,R,G,B) or just three columns (R,G,B) have to be selected via the `using` data file modifier. In the three column case, the line number will be used as gray. The gray range is automatically rescaled to [0,1]. The file is read as a normal data file, so all datafile modifiers can be used. Please note, that `R` might actually be e.g. `H` if HSV color space is selected. As usual <filename> may be `'-'` which means that the data follow the command inline and are terminated by a single `e` on a line of its own. Use `show palette gradient` to display the gradient. Examples: Read in a palette of RGB triples each in range [0,255]: set palette file 'some-palette' using ($1/255):($2/255):($3/255) Equidistant rainbow (blue-green-yellow-red) palette: set palette model RGB file "-" 0 0 1 0 1 0 1 1 0 1 0 0 e Binary palette files are supported as well, see `binary general`. Example: put 64 triplets of R,G,B doubles into file palette.bin and load it by set palette file "palette.bin" binary record=64 using 1:2:3 4 gamma correction ?commands set palette gamma-correction ?set palette gamma-correction ?palette gamma-correction ?gamma-correction For gray mappings gamma correction can be turned on by `set palette gamma <gamma>`. <gamma> defaults to 1.5 which is quite suitable for most terminals. The gamma correction is applied to the cubehelix color palette family, but not to other palette coloring schemes. However, you may easily implement gamma correction for explicit color functions. Example: set palette model RGB set palette functions gray**0.64, gray**0.67, gray**0.70 To use gamma correction with interpolated gradients specify intermediate gray values with appropriate colors. Instead of set palette defined ( 0 0 0 0, 1 1 1 1 ) use e.g. set palette defined ( 0 0 0 0, 0.5 .73 .73 .73, 1 1 1 1 ) or even more intermediate points until the linear interpolation fits the "gamma corrected" interpolation well enough. 4 postscript ?commands set palette postscript ?set palette postscript In order to reduce the size of postscript files, the gray value and not all three calculated r,g,b values are written to the file. Therefore the analytical formulae are coded directly in the postscript language as a header just before the pm3d drawing, see /g and /cF definitions. Usually, it makes sense to write therein definitions of only the 3 formulae used. But for multiplot or any other reason you may want to manually edit the transformations directly in the postscript file. This is the default option `nops_allcF`. Using the option `ps_allcF` writes postscript definitions of all formulae. This you may find interesting if you want to edit the postscript file in order to have different palettes for different surfaces in one graph. Well, you can achieve this functionality by `multiplot` with fixed `origin` and `size`. If pm3d map has been plotted from gridded or almost regular data with an output to a postscript file, then it is possible to reduce the size of this postscript file up to at about 50% by the enclosed awk script `pm3dCompress.awk`. This you may find interesting if you intend to keep the file for including it into your publication or before downloading a very large file into a slow printer. Usage: awk -f pm3dCompress.awk thefile.ps >smallerfile.ps If pm3d map has been plotted from rectangular gridded data with an output to a postscript file, then it is possible to reduce the file size even more by the enclosed awk script `pm3dConvertToImage.awk`. Usage: awk -f pm3dConvertToImage.awk <thefile.ps >smallerfile.ps You may manually change the postscript output from gray to color and vice versa and change the definition of <maxcolors>. 3 pointintervalbox ?commands set pointintervalbox ?set pointintervalbox ?pointintervalbox The `pointinterval` property of line types is used in plot style `linespoints`. A negative value of pointinterval, e.g. -N, means that point symbols are drawn only for every Nth point, and that a box (actually circle) behind each point symbol is blanked out by filling with the background color. The command `set pointintervalbox` controls the radius of this blanked-out region. It is a multiplier for the default radius, which is equal to the point size. 3 pointsize ?commands set pointsize ?commands show pointsize ?set pointsize ?show pointsize ?pointsize The `set pointsize` command scales the size of the points used in plots. Syntax: set pointsize <multiplier> show pointsize The default is a multiplier of 1.0. Larger pointsizes may be useful to make points more visible in bitmapped graphics. The pointsize of a single plot may be changed on the `plot` command. See `plot with` for details. Please note that the pointsize setting is not supported by all terminal types. 3 polar ?commands set polar ?commands unset polar ?commands show polar ?set polar ?unset polar ?show polar ?polar ?nopolar The `set polar` command changes the meaning of the plot from rectangular coordinates to polar coordinates. Syntax: set polar unset polar show polar In polar coordinates, the dummy variable (t) is an angle. The default range of t is [0:2*pi], or, if degree units have been selected, to [0:360] (see `set angles`). The command `unset polar` changes the meaning of the plot back to the default rectangular coordinate system. The `set polar` command is not supported for `splot`s. See the `set mapping` command for similar functionality for `splot`s. While in polar coordinates the meaning of an expression in t is really r = f(t), where t is an angle of rotation. The trange controls the domain (the angle) of the function. The r, x and y ranges control the extent of the graph in the x and y directions. Each of these ranges, as well as the rrange, may be autoscaled or set explicitly. For details, see `set rrange` and `set xrange`. Example: set polar plot t*sin(t) set trange [-2*pi:2*pi] set rrange [0:3] plot t*sin(t) The first `plot` uses the default polar angular domain of 0 to 2*pi. The radius and the size of the graph are scaled automatically. The second `plot` expands the domain, and restricts the size of the graph to the area within 3 units of the origin. This has the effect of limiting x and y to [-3:3]. You may want to `set size square` to have `gnuplot` try to make the aspect ratio equal to unity, so that circles look circular. See also ^ <a href="http://www.gnuplot.info/demo/polar.html"> polar demos (polar.dem) ^ </a> and ^ <a href="http://www.gnuplot.info/demo/poldat.html"> polar data plot (poldat.dem). ^ </a> 3 print ?commands set print ?commands show print ?set print ?show print The `set print` command redirects the output of the `print` command to a file. Syntax: set print set print "-" set print "<filename>" set print "<filename>" append set print "|<shell_command>" Without "<filename>", the output file is restored to <STDERR>. The <filename> "-" means <STDOUT>. The `append` flag causes the file to be opened in append mode. A <filename> starting with "|" is opened as a pipe to the <shell_command> on platforms that support piping. 3 psdir ?commands set psdir ?commands show psdir ?set psdir ?show psdir ?psdir The `set psdir <directory>` command controls the search path used by the postscript terminal to find prologue.ps and character encoding files. You can use this mechanism to switch between different sets of locally-customized prolog files. The search order is 1) The directory specified by `set psdir`, if any 2) The directory specified by environmental variable GNUPLOT_PS_DIR 3) A built-in header or one from the default system directory 4) Directories set by `set loadpath` 3 raxis ?commands set raxis ?raxis The commands `set raxis` and `unset raxis` toggle whether the polar axis is drawn separately from grid lines and the x axis. If the minimum of the current rrange is non-zero (and not autoscaled), then a white circle is drawn at the center of the polar plot to indicate that the plot lines and axes do not reach 0. The axis line is drawn using the same line type as the plot border. See `polar`, `rrange`, `rtics`, `set grid`. 3 rmargin ?commands set rmargin ?set rmargin ?rmargin The command `set rmargin` sets the size of the right margin. Please see `set margin` for details. 3 rrange ?commands set rrange ?commands show rrange ?set rrange ?show rrange ?rrange The `set rrange` command sets the range of the radial coordinate for a graph in polar mode. This has the effect of setting both xrange and yrange as well. The resulting xrange and yrange are both [-(rmax-rmin) : +(rmax-rmin)]. However if you later change the x or y range, for example by zooming, this does not change rrange, so data points continue to be clipped against rrange. Autoscaling of rmin always results in rmin = 0. 3 rtics ?commands set rtics ?commands show rtics ?set rtics ?show rtics ?rtics The `set rtics` command places tics along the polar axis. These will only be shown in polar plot mode. The tics and labels are drawn to the right of the origin. The `mirror` keyword causes them to be drawn also to the left of the origin. See `polar`, and see `set xtics` for discussion of other keywords. 3 samples ?commands set samples ?commands show samples ?set samples ?show samples ?samples The sampling rate of functions, or for interpolating data, may be changed by the `set samples` command. Syntax: set samples <samples_1> {,<samples_2>} show samples By default, sampling is set to 100 points. A higher sampling rate will produce more accurate plots, but will take longer. This parameter has no effect on data file plotting unless one of the interpolation/approximation options is used. See `plot smooth` re 2D data and `set cntrparam` and `set dgrid3d` re 3D data. When a 2D graph is being done, only the value of <samples_1> is relevant. When a surface plot is being done without the removal of hidden lines, the value of samples specifies the number of samples that are to be evaluated for the isolines. Each iso-v line will have <sample_1> samples and each iso-u line will have <sample_2> samples. If you only specify <samples_1>, <samples_2> will be set to the same value as <samples_1>. See also `set isosamples`. 3 size ?commands set size ?commands show size ?set size ?show size ?size ?aspect ratio ?set size square ?set size ratio ?ratio Syntax: set size {{no}square | ratio <r> | noratio} {<xscale>,<yscale>} show size The <xscale> and <yscale> values are scale factors for the size of the plot, which includes the graph, labels, and margins. Important note: In earlier versions of gnuplot, some terminal types used the values from `set size` to control also the size of the output canvas; others did not. In version 4.6 almost all terminals now follow the following convention: `set term <terminal_type> size <XX>, <YY>` controls the size of the output file, or `canvas`. Please see individual terminal documentation for allowed values of the size parameters. By default, the plot will fill this canvas. `set size <XX>, <YY>` scales the plot itself relative to the size of the canvas. Scale values less than 1 will cause the plot to not fill the entire canvas. Scale values larger than 1 will cause only a portion of the plot to fit on the canvas. Please be aware that setting scale values larger than 1 may cause problems on some terminal types. `ratio` causes `gnuplot` to try to create a graph with an aspect ratio of <r> (the ratio of the y-axis length to the x-axis length) within the portion of the plot specified by <xscale> and <yscale>. The meaning of a negative value for <r> is different. If <r>=-1, gnuplot tries to set the scales so that the unit has the same length on both the x and y axes. This is equivalent to `set view equal xy`. See `set view equal`. If <r>=-2, the unit on y has twice the length of the unit on x, and so on. The success of `gnuplot` in producing the requested aspect ratio depends on the terminal selected. The graph area will be the largest rectangle of aspect ratio <r> that will fit into the specified portion of the output (leaving adequate margins, of course). `square` is a synonym for `ratio 1`. Both `noratio` and `nosquare` return the graph to the default aspect ratio of the terminal, but do not return <xscale> or <yscale> to their default values (1.0). `ratio` and `square` have no effect on 3D plots, but do affect 3D projections created using `set view map`. See also `set view equal`, which forces the x and y axes of a 3D onto the same scale. Examples: To set the size so that the plot fills the available canvas: set size 1,1 To make the graph half size and square use: set size square 0.5,0.5 To make the graph twice as high as wide use: set size ratio 2 3 style ?set style ?show style ?unset style Default plotting styles are chosen with the `set style data` and `set style function` commands. See `plot with` for information about how to override the default plotting style for individual functions and data sets. See `plotting styles` for a complete list of styles. Syntax: set style function <style> set style data <style> show style function show style data Default styles for specific plotting elements may also be set. Syntax: set style arrow <n> <arrowstyle> set style fill <fillstyle> set style histogram <histogram style options> set style line <n> <linestyle> If `gnuplot` was built with the support of objects, then the following options are also available: Syntax: set style rectangle <object options> <linestyle> <fillstyle> set style circle radius <size> set style ellipse size <size> units {xy|xx|yy} 4 set style arrow ?commands set style arrow ?commands unset style arrow ?commands show style arrow ?set style arrow ?unset style arrow ?show style arrow ?arrowstyle Each terminal has a default set of arrow and point types, which can be seen by using the command `test`. `set style arrow` defines a set of arrow types and widths and point types and sizes so that you can refer to them later by an index instead of repeating all the information at each invocation. Syntax: set style arrow <index> default set style arrow <index> {nohead | head | heads} {size <length>,<angle>{,<backangle>}} {filled | empty | nofilled} {front | back} { {linestyle | ls <line_style>} | {linetype | lt <line_type>} {linewidth | lw <line_width} } unset style arrow show style arrow <index> is an integer that identifies the arrowstyle. If `default` is given all arrow style parameters are set to their default values. If the linestyle <index> already exists, only the given parameters are changed while all others are preserved. If not, all undefined values are set to the default values. Specifying `nohead` produces arrows drawn without a head---a line segment. This gives you yet another way to draw a line segment on the plot. By default, arrows have one head. Specifying `heads` draws arrow heads on both ends of the line. Head size can be controlled by `size <length>,<angle>` or `size <length>,<angle>,<backangle>`, where `<length>` defines length of each branch of the arrow head and `<angle>` the angle (in degrees) they make with the arrow. `<Length>` is in x-axis units; this can be changed by `first`, `second`, `graph`, `screen`, or `character` before the <length>; see `coordinates` for details. `<Backangle>` only takes effect when `filled` or `empty` is also used. Then, `<backangle>` is the angle (in degrees) the back branches make with the arrow (in the same direction as `<angle>`). The `fig` terminal has a restricted backangle function. It supports three different angles. There are two thresholds: Below 70 degrees, the arrow head gets an indented back angle. Above 110 degrees, the arrow head has an acute back angle. Between these thresholds, the back line is straight. Specifying `filled` produces filled arrow heads (if heads are used). Filling is supported on filled-polygon capable terminals, see help of `pm3d` for their list, otherwise the arrow heads are closed but not filled. The same result (closed but not filled arrow head) is reached by specifying `empty`. Further, filling and outline is obviously not supported on terminals drawing arrows by their own specific routines, like `metafont`, `metapost`, `latex` or `tgif`. The line style may be selected from a user-defined list of line styles (see `set style line`) or may be defined here by providing values for `<line_type>` (an index from the default list of styles) and/or `<line_width>` (which is a multiplier for the default width). Note, however, that if a user-defined line style has been selected, its properties (type and width) cannot be altered merely by issuing another `set style arrow` command with the appropriate index and `lt` or `lw`. If `front` is given, the arrows are written on top of the graphed data. If `back` is given (the default), the arrow is written underneath the graphed data. Using `front` will prevent a arrow from being obscured by dense data. Examples: To draw an arrow without an arrow head and double width, use: set style arrow 1 nohead lw 2 set arrow arrowstyle 1 See also `set arrow` for further examples. 4 boxplot ?commands set style boxplot ?commands unset style boxplot ?commands show style boxplot ?set style boxplot ?unset style boxplot ?show style boxplot The `set style boxplot` command allows you to change the layout of plots created using the `boxplot` plot style. Syntax: set style boxplot {range <r> | fraction <f>} {{no}outliers} {pointtype <p>} {candlesticks | financebars} {separation <x>} {labels off | auto | x | x2} {sorted | unsorted} The box in the boxplot always spans the range of values from the first quartile to the third quartile of the data points. The limit of the whiskers that extend from the box can be controlled in two different ways. By default the whiskers extend from each end of the box for a range equal to 1.5 times the interquartile range (i.e. the vertical height of the box proper). Each whisker is truncated back toward the median so that it terminates at a y value belonging to some point in the data set. Since there may be no point whose value is exactly 1.5 times the interquartile distance, the whisker may be shorter than its nominal range. This default corresponds to set style boxplot range 1.5 Alternatively, you can specify the fraction of the total number of points that the whiskers should span. In this case the range is extended symmetrically from the median value until it encompasses the requested fraction of the data set. Here again each whisker is constrained to end at a point in the data set. To span 95% of the points in the set set style boxplot fraction 0.95 Any points that lie outside the range of the whiskers are considered outliers. By default these are drawn as individual circles (pointtype 7). The option `nooutliers` disables this. By default boxplots are drawn in a style similar to candlesticks, but you have the option of using instead a style similar to finance bars. If the using specification for a boxplot contains a fourth column, the values in that column will be interpreted as the discrete leveles of a factor variable. In this case more than one boxplots may be drawn, as many as the number of levels of the factor variable. These boxplots will be drawn next to each other, the distance between them is 1.0 by default (in x-axis units). This distance can be changed by the option `separation`. The `labels` option governs how and where these boxplots (each representing a part of the dataset) are labeled. By default the value of the factor is put as a tick label on the horizontal axis -- x or x2, depending on which one is used for the plot itself. This setting corresponds to option `labels auto`. The labels can be forced to use either of the x or x2 axes -- options `labels x` and `labels x2`, respectively --, or they can be turned off altogether with the option `labels off`. By default the boxplots corresponding to different levels of the factor variable are not sorted; they will be drawn in the same order the levels are encountered in the data file. This behavior corresponds to the `unsorted` option. If the `sorted` option is active, the levels are first sorted alphabetically, and the boxplots are drawn in the sorted order. The `separation`, `labels`, `sorted` and `unsorted` option only have an effect if a fourth column is given the plot specification. See `boxplot`, `candlesticks`, `financebars`. 4 set style data ?commands set style data ?commands show style data ?set style data ?show style data ?data style The `set style data` command changes the default plotting style for data plots. Syntax: set style data <plotting-style> show style data See `plotting styles` for the choices. If no choice is given, the choices are listed. `show style data` shows the current default data plotting style. 4 set style fill ?commands set style fill ?commands show style fill ?set style fill ?show style fill ?fillstyle The `set style fill` command is used to set the default style of the plot elements in plots with boxes, histograms, candlesticks and filledcurves. This default can be superseded by fillstyles attached to individual plots. See also 'set style rectangle'. Syntax: set style fill {empty | {transparent} solid {<density>} | {transparent} pattern {<n>}} {border {lt} {lc <colorspec>} | noborder} The default fillstyle is `empty`. The `solid` option causes filling with a solid color, if the terminal supports that. The <density> parameter specifies the intensity of the fill color. At a <density> of 0.0, the box is empty, at <density> of 1.0, the inner area is of the same color as the current linetype. Some terminal types can vary the density continuously; others implement only a few levels of partial fill. If no <density> parameter is given, it defaults to 1. The `pattern` option causes filling to be done with a fill pattern supplied by the terminal driver. The kind and number of available fill patterns depend on the terminal driver. If multiple datasets using filled boxes are plotted, the pattern cycles through all available pattern types, starting from pattern <n>, much as the line type cycles for multiple line plots. The `empty` option causes filled boxes not to be filled. This is the default. By default, `border`, the box is bounded by a solid line of the current linetype. `border <colorspec>` allows you to change the color of the border. `noborder` specifies that no bounding lines are drawn. 5 set style fill transparent ?commands set style fill transparent ?set style fill transparent ?fillstyle transparent ?transparent Some terminals support the attribute `transparent` for filled areas. In the case of transparent solid fill areas, the `density` parameter is interpreted as an alpha value; that is, density 0 is fully transparent, density 1 is fully opaque. In the case of transparent pattern fill, the background of the pattern is either fully transparent or fully opaque. @start table - Driver support for transparency terminal solid pattern pm3d -------------------------------- gif no yes no jpeg yes no yes pdf yes yes yes png TrueColor index yes post no yes no svg yes no yes win yes yes yes wxt yes yes yes x11 no yes no #\begin{tabular}{|cccl|} \hline #Terminal & solid & pattern & pm3d \\ \hline #gif & no & yes & no \\ #jpeg & yes & no & yes \\ #pdf & yes & yes & yes \\ #png &TrueColor& index & yes \\ #post & no & yes & no \\ #svg & yes & no & yes \\ #win & yes & yes & yes \\ #wxt & yes & yes & yes \\ #x11 & no & yes & no \\ %c l . %Terminal@solid@pattern@pm3d %_ %gif@no@yes@no %jpeg@yes@no@yes %pdf@yes@yes@yes %png@TrueColor@index@yes %post@no@yes@no %svg@yes@yes@yes %win@yes@yes@yes %wxt@yes@yes@yes %x11@no@yes@no %_ @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="center"> ^ <col align="center"> ^ <col align="center"> ^ <col align="center"> ^</colgroup> ^<thead> ^<tr> <th>Terminal</th> <th>solid</th> <th>pattern</th> <th>pm3d</th></tr> ^</thead> ^<tbody> ^<tr> <td>gif</td> <td>no</td> <td>yes</td> <td>no</td></tr> ^<tr> <td>jpeg</td> <td>yes</td> <td>no</td> <td>yes</td></tr> ^<tr> <td>pdf</td> <td>yes</td> <td>yes</td> <td>yes</td></tr> ^<tr> <td>png</td> <td>TrueColor</td> <td>index</td> <td>yes</td></tr> ^<tr> <td>post</td> <td>no</td> <td>yes</td> <td>no</td></tr> ^<tr> <td>svg</td> <td>yes</td> <td>yes</td> <td>yes</td></tr> ^<tr> <td>win</td> <td>yes</td> <td>yes</td> <td>yes</td></tr> ^<tr> <td>wxt</td> <td>yes</td> <td>yes</td> <td>yes</td></tr> ^<tr> <td>x11</td> <td>no</td> <td>yes</td> <td>no</td></tr> ^</tbody> ^</table> Note that there may be additional limitations on the creation or viewing of graphs containing transparent fill areas. For example, the png terminal can only use transparent fill if the "truecolor" option is set. Some pdf viewers may not correctly display the fill areas even if they are correctly described in the pdf file. Ghostscript/gv does not correctly display pattern-fill areas even though actual PostScript printers generally have no problem. 4 set style function ?commands set style function ?commands show style function ?set style function ?show style function The `set style function` command changes the default plotting style for function plots (e.g. lines, points, filledcurves). See `plotting styles`. Syntax: set style function <plotting-style> show style function 4 set style increment ?commands set style increment ?commands show style increment ?set style increment ?show style increment `Note`: This command has been deprecated. Instead please use the newer command `set linetype`, which redefines the linetypes themselves rather than searching for a suitable temporary line style to substitute. See `set linetype` Syntax: set style increment {default|userstyles} show style increment By default, successive plots within the same graph will use successive linetypes from the default set for the current terminal type. However, choosing `set style increment user` allows you to step through the user-defined line styles rather than through the default linetypes. Example: set style line 1 lw 2 lc rgb "gold" set style line 2 lw 2 lc rgb "purple" set style line 4 lw 1 lc rgb "sea-green" set style increment user plot f1(x), f2(x), f3(x), f4(x) should plot functions f1, f2, f4 in your 3 newly defined line styles. If a user-defined line style is not found then the corresponding default linetype is used instead. E.g. in the example above, f3(x) will be plotted using the default linetype 3. 4 set style line ?commands set style line ?commands unset style line ?commands show style line ?set style line ?unset style line ?show style line ?linestyle ?linewidth =linewidth =interval =linespoints =pointinterval Each terminal has a default set of line and point types, which can be seen by using the command `test`. `set style line` defines a set of line types and widths and point types and sizes so that you can refer to them later by an index instead of repeating all the information at each invocation. Syntax: set style line <index> default set style line <index> {{linetype | lt} <line_type> | <colorspec>} {{linecolor | lc} <colorspec>} {{linewidth | lw} <line_width>} {{pointtype | pt} <point_type>} {{pointsize | ps} <point_size>} {{pointinterval | pi} <interval>} {palette} unset style line show style line `default` sets all line style parameters to those of the linetype with that same index. If the linestyle <index> already exists, only the given parameters are changed while all others are preserved. If not, all undefined values are set to the default values. Line styles created by this mechanism do not replace the default linetype styles; both may be used. Line styles are temporary. They are lost whenever you execute a `reset` command. To redefine the linetype itself, please see `set linetype`. The line and point types default to the index value. The exact symbol that is drawn for that index value may vary from one terminal type to another. The line width and point size are multipliers for the current terminal's default width and size (but note that <point_size> here is unaffected by the multiplier given by the command`set pointsize`). The `pointinterval` controls the spacing between points in a plot drawn with style `linespoints`. The default is 0 (every point is drawn). For example, `set style line N pi 3` defines a linestyle that uses pointtype N, pointsize and linewidth equal to the current defaults for the terminal, and will draw every 3rd point in plots using `with linespoints`. A negative value for the interval is treated the same as a positive value, except that some terminals will try to interrupt the line where it passes through the point symbol. Not all terminals support the `linewidth` and `pointsize` features; if not supported, the option will be ignored. Terminal-independent colors may be assigned using either `linecolor <colorspec>` or `linetype <colorspec>`, abbreviated `lc` or `lt`. This requires giving a RGB color triple, a known palette color name, a fractional index into the current palette, or a constant value from the current mapping of the palette onto cbrange. See `colors`, `colorspec`, `set palette`, `colornames`, `cbrange`. `set style line <n> linetype <lt>` will set both a terminal-dependent dot/dash pattern and color. The commands`set style line <n> linecolor <colorspec>` or `set style line <n> linetype <colorspec>` will set a new line color while leaving the existing dot-dash pattern unchanged. In 3d mode (`splot` command), the special keyword `palette` is allowed as a shorthand for "linetype palette z". The color value corresponds to the z-value (elevation) of the splot, and varies smoothly along a line or surface. Examples: Suppose that the default lines for indices 1, 2, and 3 are red, green, and blue, respectively, and the default point shapes for the same indices are a square, a cross, and a triangle, respectively. Then set style line 1 lt 2 lw 2 pt 3 ps 0.5 defines a new linestyle that is green and twice the default width and a new pointstyle that is a half-sized triangle. The commands set style function lines plot f(x) lt 3, g(x) ls 1 will create a plot of f(x) using the default blue line and a plot of g(x) using the user-defined wide green line. Similarly the commands set style function linespoints plot p(x) lt 1 pt 3, q(x) ls 1 will create a plot of p(x) using the default triangles connected by a red line and q(x) using small triangles connected by a green line. splot sin(sqrt(x*x+y*y))/sqrt(x*x+y*y) w l pal creates a surface plot using smooth colors according to `palette`. Note, that this works only on some terminals. See also `set palette`, `set pm3d`. set style line 10 linetype 1 linecolor rgb "cyan" will assign linestyle 10 to be a solid cyan line on any terminal that supports rgb colors. 4 set style circle ?commands set style circle ?commands unset style circle ?commands show style circle ?set style circle ?unset style circle ?show style circle Syntax: set style circle {radius {graph|screen} <R>} This command sets the default radius used in plot style "with circles". It applies to data plots with only 2 columns of data (x,y) and to function plots. The default is "set style circle radius graph 0.02". 4 set style rectangle ?commands set style rectangle ?commands unset style rectangle ?commands show style rectangle ?set style rectangle ?unset style rectangle ?show style rectangle Rectangles defined with the `set object` command can have individual styles. However, if the object is not assigned a private style then it inherits a default that is taken from the `set style rectangle` command. Syntax: set style rectangle {front|back} {lw|linewidth <lw>} {fillcolor <colorspec>} {fs <fillstyle>} See `colorspec` and `fillstyle`. `fillcolor` may be abbreviated as `fc`. Examples: set style rectangle back fc rgb "white" fs solid 1.0 border lt -1 set style rectangle fc linsestyle 3 fs pattern 2 noborder The default values correspond to solid fill with the background color and a black border. 4 set style ellipse ?commands set style ellipse ?commands show style ellipse ?set style ellipse ?unset style ellipse ?show style ellipse Syntax: set style ellipse {units xx|xy|yy} {size {graph|screen} <a>, {{graph|screen} <b>}} {angle <angle>} This command governs whether the diameters of ellipses are interpreted in the same units or not. Default is `xy`, which means that the major diameter (first axis) of ellipses will be interpreted in the same units as the x (or x2) axis, while the minor (second) diameter in those of the y (or y2) axis. In this mode the ratio of the ellipse axes depends on the scales of the plot axes and aspect ratio of the plot. When set to `xx` or `yy`, both axes of all ellipses will be interpreted in the same units. This means that the ratio of the axes of the plotted ellipses will be correct even after rotation, but either their vertical or horizontal extent will not be correct. This is a global setting that affects all ellipses, both those defined as objects and those generated with the `plot` command, however, the value of `units` can also be redefined on a per-plot and per-object basis. It is also possible to set a default size for ellipses with the `size` keyword. This default size applies to data plots with only 2 columns of data (x,y) and to function plots. The two values are interpreted as the major and minor diameters (as opposed to semi-major and semi-minor axes) of the ellipse. The default is "set style ellipse size graph 0.05,0.03". Last, but not least it is possible to set the default orientation with the `angle` keyword. The orientation, which is defined as the angle between the major axis of the ellipse and the plot's x axis, must be given in degrees. For defining ellipse objects, see `set object ellipse`; for the 2D plot style, see `ellipses`. 3 surface ?commands set surface ?commands unset surface ?commands show surface ?set surface ?unset surface ?show surface ?surface ?nosurface The command `set surface` controls the display of surfaces by `splot`. Syntax: set surface unset surface show surface The surface is drawn with the style specified by `with`, or else the appropriate style, data or function. `unset surface` will cause `splot` to not draw points or lines corresponding to any of the function or data file points. If you want to turn off the surface for an individual function or data file while leaving the others active, use the `nosurface` keyword in the `splot` command. Contours may still be drawn on the surface, depending on the `set contour` option. The combination `unset surface; set contour base` is useful for displaying contours on the grid base. See also `set contour`. 3 table ?commands set table ?set table ?table When `table` mode is enabled, `plot` and `splot` commands print out a multicolumn ASCII table of X Y {Z} R values rather than creating an actual plot on the current terminal. The character R takes on one of three values: "i" if the point is in the active range, "o" if it is out-of-range, or "u" if it is undefined. The data format is determined by the format of the axis labels (see `set format`), and the columns are separated by single spaces. This can be useful if you want to generate contours and then save them for further use, perhaps for plotting with `plot`; see `set contour` for example. The same method can be used to save interpolated data (see `set samples` and `set dgrid3d`). Syntax: set table {"outfile"} plot <whatever> unset table Tabular output is written to the named file, if any, otherwise it is written to the current value of `set output`. You must explicitly `unset table` in order to go back to normal plotting on the current terminal. 3 terminal ?commands set terminal ?commands show terminal ?set terminal ?set term ?show terminal ?show term ?set terminal push ?set term push ?terminal push ?term push ?push ?set terminal pop ?set term pop ?terminal pop ?term pop ?pop `gnuplot` supports many different graphics devices. Use `set terminal` to tell `gnuplot` what kind of output to generate. Use `set output` to redirect that output to a file or device. Syntax: set terminal {<terminal-type> | push | pop} show terminal If <terminal-type> is omitted, `gnuplot` will list the available terminal types. <terminal-type> may be abbreviated. If both `set terminal` and `set output` are used together, it is safest to give `set terminal` first, because some terminals set a flag which is needed in some operating systems. Some terminals have many additional options. The options used by a previous invocation `set term <term> <options>` of a given `<term>` are remembered, thus subsequent `set term <term>` does not reset them. This helps in printing, for instance, when switching among different terminals---previous options don't have to be repeated. The command `set term push` remembers the current terminal including its settings while `set term pop` restores it. This is equivalent to `save term` and `load term`, but without accessing the filesystem. Therefore they can be used to achieve platform independent restoring of the terminal after printing, for instance. After gnuplot's startup, the default terminal or that from `startup` file is pushed automatically. Therefore portable scripts can rely that `set term pop` restores the default terminal on a given platform unless another terminal has been pushed explicitly. For more information, see the `complete list of terminals`. 3 termoption ?commands set termoption ?set termoption ?termoption The `set termoption` command allows you to change the behaviour of the current terminal without requiring a new `set terminal` command. Only one option can be changed per command, and only a small number of options can be changed this way. Currently the only options accepted are set termoption {no}enhanced set termoption font "<fontname>{,<fontsize>}" set termoption fontscale <scale> set termoption {solid|dashed} set termoption {linewidth <lw>}{lw <lw>} 3 tics ?commands set tics ?commands unset tics ?commands show tics ?set tics ?unset tics ?show tics ?tics Control of the major (labelled) tics on all axes at once is possible with the `set tics` command. Fine control of the major (labelled) tics on all axes at once is possible with the `set tics` command. The tics may be turned off with the `unset tics` command, and may be turned on (the default state) with `set tics`. Similar commands (by preceding 'tics' by the axis name) control the major tics on a single axis. Syntax: set tics {axis | border} {{no}mirror} {in | out} {scale {default | <major> {,<minor>}}} {{no}rotate {by <ang>}} {offset <offset> | nooffset} {left | right | center | autojustify} { format "formatstring" } { font "name{,<size>}" } { textcolor <colorspec> } set tics {front | back} unset tics show tics The options in the first set above can be applied individually to any or all axes, i.e., x, y, z, x2, y2, and cb. Set tics `front` or `back` applies to all axes at once, but only for 2D plots (not splot). It controls whether the tics are placed behind or in front of the plot elements, in the case that there is overlap. `axis` or `border` tells `gnuplot` to put the tics (both the tics themselves and the accompanying labels) along the axis or the border, respectively. If the axis is very close to the border, the `axis` option will move the tic labels to outside the border in case the border is printed (see `set border`). The relevant margin settings will usually be sized badly by the automatic layout algorithm in this case. `mirror` tells `gnuplot` to put unlabelled tics at the same positions on the opposite border. `nomirror` does what you think it does. `in` and `out` change the tic marks to be drawn inwards or outwards. With `scale`, the size of the tic marks can be adjusted. If <minor> is not specified, it is 0.5*<major>. The default size 1.0 for major tics and 0.5 for minor tics is requested by `scale default`. `rotate` asks `gnuplot` to rotate the text through 90 degrees, which will be done if the terminal driver in use supports text rotation. `norotate` cancels this. `rotate by <ang>` asks for rotation by <ang> degrees, supported by some terminal types. The defaults are `border mirror norotate` for tics on the x and y axes, and `border nomirror norotate` for tics on the x2 and y2 axes. For the z axis, the default is `nomirror`. The <offset> is specified by either x,y or x,y,z, and may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. <offset> is the offset of the tics texts from their default positions, while the default coordinate system is `character`. See `coordinates` for details. `nooffset` switches off the offset. By default, tic labels are justified automatically depending on the axis and rotation angle to produce aesthetically pleasing results. If this is not desired, justification can be overridden with an explicit `left`, `right` or `center` keyword. `autojustify` restores the default behavior. `set tics` with no options restores to place tics inwards. Every other options are retained. See also `set xtics` for more control of major (labelled) tic marks and `set mxtics` for control of minor tic marks. These commands provide control at a axis by axis basis. 3 ticslevel ?commands set ticslevel ?commands show ticslevel ?set ticslevel ?show ticslevel ?ticslevel Deprecated. See `set xyplane`. 3 ticscale ?commands set ticscale ?commands show ticscale ?set ticscale ?show ticscale ?ticscale The `set ticscale` command is deprecated, use `set tics scale` instead. 3 timestamp ?commands set timestamp ?commands unset timestamp ?commands show timestamp ?set timestamp ?unset timestamp ?show timestamp ?timestamp ?notimestamp The command `set timestamp` places the time and date of the plot in the left margin. Syntax: set timestamp {"<format>"} {top|bottom} {{no}rotate} {offset <xoff>{,<yoff>}} {font "<fontspec>"} unset timestamp show timestamp The format string allows you to choose the format used to write the date and time. Its default value is what asctime() uses: "%a %b %d %H:%M:%S %Y" (weekday, month name, day of the month, hours, minutes, seconds, four-digit year). With `top` or `bottom` you can place the timestamp at the top or bottom of the left margin (default: bottom). `rotate` lets you write the timestamp vertically, if your terminal supports vertical text. The constants <xoff> and <yoff> are offsets that let you adjust the position more finely. <font> is used to specify the font with which the time is to be written. The abbreviation `time` may be used in place of `timestamp`. Example: set timestamp "%d/%m/%y %H:%M" offset 80,-2 font "Helvetica" See `set timefmt` for more information about time format strings. 3 timefmt ?commands set timefmt ?commands show timefmt ?set timefmt ?show timefmt ?timefmt This command applies to timeseries where data are composed of dates/times. It has no meaning unless the command `set xdata time` is given also. Syntax: set timefmt "<format string>" show timefmt The string argument tells `gnuplot` how to read timedata from the datafile. The valid formats are: @start table - first is interactive cleartext form Format Explanation %d day of the month, 1--31 %m month of the year, 1--12 %y year, 0--99 %Y year, 4-digit %j day of the year, 1--365 %H hour, 0--24 %M minute, 0--60 %s seconds since the Unix epoch (1970-01-01, 00:00 UTC) %S second, integer 0--60 on output, (double) on input %b three-character abbreviation of the name of the month %B name of the month #\begin{tabular}{|cl|} \hline #\multicolumn{2}{|c|}{Time Series timedata Format Specifiers}\\ #\hline \hline #Format & Explanation \\ \hline #\verb@%d@ & day of the month, 1--31 \\ #\verb@%m@ & month of the year, 1--12 \\ #\verb@%y@ & year, 0--99 \\ #\verb@%Y@ & year, 4-digit \\ #\verb@%j@ & day of the year, 1--365 \\ #\verb@%H@ & hour, 0--24 \\ #\verb@%M@ & minute, 0--60 \\ #\verb@%s@ & seconds since the Unix epoch (1970-01-01 00:00 UTC) \\ #\verb@%S@ & second, integer 0--60 on output, (double) on input \\ #\verb@%b@ & three-character abbreviation of the name of the month \\ #\verb@%B@ & name of the month \\ %c l . %Format@Explanation %_ %%d@day of the month, 1--31 %%m@month of the year, 1--12 %%y@year, 0--99 %%Y@year, 4-digit %%j@day of the year, 1--365 %%H@hour, 0--24 %%M@minute, 0--60 %%s@seconds since the Unix epoch (1970-01-01 00:00 UTC) %%S@second, integer 0--60 on output, (double) on input %%b@three-character abbreviation of the name of the month %%B@name of the month %_ @end table ^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3"> ^<colgroup> ^ <col align="center"> ^ <col align="left"> ^</colgroup> ^<thead> ^<tr> <th>Format</th> <th>Explanation</th></tr> ^</thead> ^<tbody> ^<tr> <td><tt>%d</tt></td> <td>day of the month, 1–31</td></tr> ^<tr> <td><tt>%m</tt></td> <td>month of the year, 1–12</td></tr> ^<tr> <td><tt>%y</tt></td> <td>year, 0–99</td></tr> ^<tr> <td><tt>%Y</tt></td> <td>year, 4-digit</td></tr> ^<tr> <td><tt>%j</tt></td> <td>day of the year, 1–365</td></tr> ^<tr> <td><tt>%H</tt></td> <td>hour, 0–24</td></tr> ^<tr> <td><tt>%M</tt></td> <td>minute, 0–60</td></tr> ^<tr> <td><tt>%s</tt></td> <td>seconds since the Unix epoch (1970-01-01 00:00 UTC)</td></tr> ^<tr> <td><tt>%S</tt></td> <td>second, integer 0–60 on output, (double) on input</td></tr> ^<tr> <td><tt>%b</tt></td> <td>three-character abbreviation of the name of the month</td></tr> ^<tr> <td><tt>%B</tt></td> <td>name of the month</td></tr> ^</tbody> ^</table> Any character is allowed in the string, but must match exactly. \t (tab) is recognized. Backslash-octals (\nnn) are converted to char. If there is no separating character between the time/date elements, then %d, %m, %y, %H, %M and %S read two digits each. If a decimal point immediately follows the field read by %S, the decimal and any following digits are interpreted as a fractional second. %Y reads four digits. %j reads three digits. %b requires three characters, and %B requires as many as it needs. Spaces are treated slightly differently. A space in the string stands for zero or more whitespace characters in the file. That is, "%H %M" can be used to read "1220" and "12 20" as well as "12 20". Each set of non-blank characters in the timedata counts as one column in the `using n:n` specification. Thus `11:11 25/12/76 21.0` consists of three columns. To avoid confusion, `gnuplot` requires that you provide a complete `using` specification if your file contains timedata. If the date format includes the day or month in words, the format string must exclude this text. But it can still be printed with the "%a", "%A", "%b", or "%B" specifier. `gnuplot` will determine the proper month and weekday from the numerical values. See `set format` for more details about these and other options for printing time data. When reading two-digit years with %y, values 69-99 refer to the 20th century, while values 00-68 refer to the 21st century. NB: This is in accordance with the UNIX98 spec, but conventions vary widely and two-digit year values are inherently ambiguous. See also `set xdata` and `time/date` for more information. Example: set timefmt "%d/%m/%Y\t%H:%M" tells `gnuplot` to read date and time separated by tab. (But look closely at your data---what began as a tab may have been converted to spaces somewhere along the line; the format string must match what is actually in the file.) See also ^ <a href="http://www.gnuplot.info/demo/timedat.html"> time data demo. ^ </a> 3 title ?commands set title ?commands show title ?set title ?show title ?title The `set title` command produces a plot title that is centered at the top of the plot. `set title` is a special case of `set label`. Syntax: set title {"<title-text>"} {offset <offset>} {font "<font>{,<size>}"} {{textcolor | tc} {<colorspec> | default}} {{no}enhanced} show title If <offset> is specified by either x,y or x,y,z the title is moved by the given offset. It may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. See `coordinates` for details. By default, the `character` coordinate system is used. For example, "`set title offset 0,-1`" will change only the y offset of the title, moving the title down by roughly the height of one character. The size of a character depends on both the font and the terminal. <font> is used to specify the font with which the title is to be written; the units of the font <size> depend upon which terminal is used. `textcolor <colorspec>` changes the color of the text. <colorspec> can be a linetype, an rgb color, or a palette mapping. See help for `colorspec` and `palette`. `noenhanced` requests that the title not be processed by the enhanced text mode parser, even if enhanced text mode is currently active. `set title` with no parameters clears the title. See `syntax` for details about the processing of backslash sequences and the distinction between single- and double-quotes. 3 tmargin ?commands set tmargin ?set tmargin ?tmargin The command `set tmargin` sets the size of the top margin. Please see `set margin` for details. 3 trange ?commands set trange ?commands show trange ?set trange ?show trange ?trange The `set trange` command sets the parametric range used to compute x and y values when in parametric or polar modes. Please see `set xrange` for details. 3 urange ?commands set urange ?commands show urange ?set urange ?show urange ?urange The `set urange` and `set vrange` commands set the parametric ranges used to compute x, y, and z values when in `splot` parametric mode. Please see `set xrange` for details. 3 variables ?commands show variables ?show variables all ?show variables The `show variables` command lists the current value of user-defined and internal variables. Gnuplot internally defines variables whose names begin with GPVAL_, MOUSE_, FIT_, and TERM_. Syntax: show variables # show variables that do not begin with GPVAL_ show variables all # show all variables including those beginning GPVAL_ show variables NAME # show only variables beginning with NAME 3 version ?show version The `show version` command lists the version of gnuplot being run, its last modification date, the copyright holders, and email addresses for the FAQ, the gnuplot-info mailing list, and reporting bugs--in short, the information listed on the screen when the program is invoked interactively. Syntax: show version {long} When the `long` option is given, it also lists the operating system, the compilation options used when `gnuplot` was installed, the location of the help file, and (again) the useful email addresses. 3 view ?commands set view ?commands show view ?set view ?set view map ?show view ?view The `set view` command sets the viewing angle for `splot`s. It controls how the 3D coordinates of the plot are mapped into the 2D screen space. It provides controls for both rotation and scaling of the plotted data, but supports orthographic projections only. It supports both 3D projection or orthogonal 2D projection into a 2D plot-like map. Syntax: set view <rot_x>{,{<rot_z>}{,{<scale>}{,<scale_z>}}} set view map set view {no}equal {xy|xyz} show view where <rot_x> and <rot_z> control the rotation angles (in degrees) in a virtual 3D coordinate system aligned with the screen such that initially (that is, before the rotations are performed) the screen horizontal axis is x, screen vertical axis is y, and the axis perpendicular to the screen is z. The first rotation applied is <rot_x> around the x axis. The second rotation applied is <rot_z> around the new z axis. Command `set view map` is used to represent the drawing as a map. It can be used for `contour` plots, or for color `pm3d` maps. In the latter, take care that you properly use `zrange` and `cbrange` for input data point filtering and color range scaling, respectively. <rot_x> is bounded to the [0:180] range with a default of 60 degrees, while <rot_z> is bounded to the [0:360] range with a default of 30 degrees. <scale> controls the scaling of the entire `splot`, while <scale_z> scales the z axis only. Both scales default to 1.0. Examples: set view 60, 30, 1, 1 set view ,,0.5 The first sets all the four default values. The second changes only scale, to 0.5. 4 equal_axes ?set view equal_axes ?set view equal ?view equal_axes ?view equal ?equal_axes The command `set view equal xy` forces the unit length of the x and y axes to be on the same scale, and chooses that scale so that the plot will fit on the page. The command `set view equal xyz` additionally sets the z axis scale to match the x and y axes; however there is no guarantee that the current z axis range will fit within the plot boundary. By default all three axes are scaled independently to fill the available area. See also `set xyplane`. 3 vrange ?commands set vrange ?commands show vrange ?set vrange ?show vrange ?vrange The `set urange` and `set vrange` commands set the parametric ranges used to compute x, y, and z values when in `splot` parametric mode. Please see `set xrange` for details. 3 x2data ?commands set x2data ?commands show x2data ?set x2data ?show x2data ?x2data The `set x2data` command sets data on the x2 (top) axis to timeseries (dates/times). Please see `set xdata`. 3 x2dtics ?commands set x2dtics ?commands unset x2dtics ?commands show x2dtics ?set x2dtics ?unset x2dtics ?show x2dtics ?x2dtics ?nox2dtics The `set x2dtics` command changes tics on the x2 (top) axis to days of the week. Please see `set xdtics` for details. 3 x2label ?commands set x2label ?commands show x2label ?set x2label ?show x2label ?x2label The `set x2label` command sets the label for the x2 (top) axis. Please see `set xlabel`. 3 x2mtics ?commands set x2mtics ?commands unset x2mtics ?commands show x2mtics ?set x2mtics ?unset x2mtics ?show x2mtics ?x2mtics ?nox2mtics The `set x2mtics` command changes tics on the x2 (top) axis to months of the year. Please see `set xmtics` for details. 3 x2range ?commands set x2range ?commands show x2range ?set x2range ?show x2range ?x2range The `set x2range` command sets the horizontal range that will be displayed on the x2 (top) axis. Please see `set xrange` for details. 3 x2tics ?commands set x2tics ?commands unset x2tics ?commands show x2tics ?set x2tics ?unset x2tics ?show x2tics ?x2tics ?nox2tics The `set x2tics` command controls major (labelled) tics on the x2 (top) axis. Please see `set xtics` for details. 3 x2zeroaxis ?commands set x2zeroaxis ?commands unset x2zeroaxis ?commands show x2zeroaxis ?set x2zeroaxis ?unset x2zeroaxis ?show x2zeroaxis ?x2zeroaxis ?nox2zeroaxis The `set x2zeroaxis` command draws a line at the origin of the x2 (top) axis (y2 = 0). For details, please see `set zeroaxis`. 3 xdata ?commands set xdata ?commands show xdata ?set xdata ?show xdata ?xdata This command sets the datatype on the x axis to time/date. A similar command does the same thing for each of the other axes. Syntax: set xdata {time} show xdata The same syntax applies to `ydata`, `zdata`, `x2data`, `y2data` and `cbdata`. The `time` option signals that the datatype is indeed time/date. If the option is not specified, the datatype reverts to normal. See `set timefmt` to tell gnuplot how to read date or time data. The time/date is converted to seconds from start of the century. There is currently only one timefmt, which implies that all the time/date columns must conform to this format. Specification of ranges should be supplied as quoted strings according to this format to avoid interpretation of the time/date as an expression. The function 'strftime' (type "man strftime" on unix to look it up) is used to print tic-mark labels. `gnuplot` tries to figure out a reasonable format for this unless the `set format x "string"` has supplied something that does not look like a decimal format (more than one '%' or neither %f nor %g). See also `time/date` for more information. 3 xdtics ?commands set xdtics ?commands unset xdtics ?commands show xdtics ?set xdtics ?unset xdtics ?show xdtics ?xdtics ?noxdtics The `set xdtics` commands converts the x-axis tic marks to days of the week where 0=Sun and 6=Sat. Overflows are converted modulo 7 to dates. `set noxdtics` returns the labels to their default values. Similar commands do the same things for the other axes. Syntax: set xdtics unset xdtics show xdtics The same syntax applies to `ydtics`, `zdtics`, `x2dtics`, `y2dtics` and `cbdtics`. See also the `set format` command. 3 xlabel ?commands set xlabel ?commands show xlabel ?set xlabel ?show xlabel ?xlabel The `set xlabel` command sets the x axis label. Similar commands set labels on the other axes. Syntax: set xlabel {"<label>"} {offset <offset>} {font "<font>{,<size>}"} {textcolor <colorspec>} {{no}enhanced} {rotate by <degrees> | rotate parallel | norotate} show xlabel The same syntax applies to `x2label`, `ylabel`, `y2label`, `zlabel` and `cblabel`. If <offset> is specified by either x,y or x,y,z the label is moved by the given offset. It may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. See `coordinates` for details. By default, the `character` coordinate system is used. For example, "`set xlabel offset -1,0`" will change only the x offset of the title, moving the label roughly one character width to the left. The size of a character depends on both the font and the terminal. <font> is used to specify the font in which the label is written; the units of the font <size> depend upon which terminal is used. `noenhanced` requests that the label text not be processed by the enhanced text mode parser, even if enhanced text mode is currently active. To clear a label, put no options on the command line, e.g., "`set y2label`". The default positions of the axis labels are as follows: xlabel: The x-axis label is centered below the bottom of the plot. ylabel: The y-axis label is centered to the left of the plot, defaulting to either horizontal or vertical orientation depending on the terminal type. zlabel: The z-axis label is centered along the z axis and placed in the space above the grid level. cblabel: The color box axis label is centered along the box and placed below or to the right according to horizontal or vertical color box gradient. y2label: The y2-axis label is placed to the right of the y2 axis. The position is terminal-dependent in the same manner as is the y-axis label. x2label: The x2-axis label is placed above the plot but below the title. It is also possible to create an x2-axis label by using new-line characters to make a multi-line plot title, e.g., set title "This is the title\n\nThis is the x2label" Note that double quotes must be used. The same font will be used for both lines, of course. The orientation (rotation angle) of the x, x2, y and y2 axis labels in 2D plots can be changed by specifying `rotate by <degrees>`. The orientation of the x and y axis labels in 3D plots defaults to horizontal but can be changed to run parallel to the axis by specifying `rotate parallel`. If you are not satisfied with the default position of an axis label, use `set label` instead--that command gives you much more control over where text is placed. Please see `syntax` for further information about backslash processing and the difference between single- and double-quoted strings. 3 xmtics ?commands set xmtics ?commands unset xmtics ?commands show xmtics ?set xmtics ?unset xmtics ?show xmtics ?xmtics ?noxmtics The `set xmtics` command converts the x-axis tic marks to months of the year where 1=Jan and 12=Dec. Overflows are converted modulo 12 to months. The tics are returned to their default labels by `unset xmtics`. Similar commands perform the same duties for the other axes. Syntax: set xmtics unset xmtics show xmtics The same syntax applies to `x2mtics`, `ymtics`, `y2mtics`, `zmtics` and `cbmtics`. See also the `set format` command. 3 xrange ?commands set xrange ?commands show xrange ?set xrange ?show xrange ?writeback ?restore ?xrange The `set xrange` command sets the horizontal range that will be displayed. A similar command exists for each of the other axes, as well as for the polar radius r and the parametric variables t, u, and v. Syntax: set xrange { [{{<min>}:{<max>}}] {{no}reverse} {{no}writeback} } | restore show xrange where <min> and <max> terms are constants, expressions or an asterisk to set autoscaling. See below for full autoscaling syntax. If the data are time/date, you must give the range as a quoted string according to the `set timefmt` format. Any value omitted will not be changed. The same syntax applies to `yrange`, `zrange`, `x2range`, `y2range`, `cbrange`, `rrange`, `trange`, `urange` and `vrange`. The `reverse` option reverses the direction of the axis, e.g., `set xrange [0:1] reverse` will produce an axis with 1 on the left and 0 on the right. This is identical to the axis produced by `set xrange [1:0]`, of course. `reverse` is intended primarily for use with `autoscale`. Autoscaling: If <min> (the same applies for correspondingly to <max>) is an asterisk "*" autoscaling is turned on. The range in which autoscaling is being performed may be limited by a lower bound <lb> or an upper bound <ub> or both. The syntax is { <lb> < } * { < <ub> } For example, 0 < * < 200 sets <lb> = 0 and <ub> = 200. With such a setting <min> would be autoscaled, but its final value will be between 0 and 200 (both inclusive despite the '<' sign). If no lower or upper bound is specified, the '<' to also be ommited. If <ub> is lower than <lb> the constraints will be turned off and full autoscaling will happen. This feature is useful to plot measured data with autoscaling but providing a limit on the range, to clip outliers, or to guarantee a minimum range that will be displayed even if the data would not need such a big range. The `writeback` option essentially saves the range found by `autoscale` in the buffers that would be filled by `set xrange`. This is useful if you wish to plot several functions together but have the range determined by only some of them. The `writeback` operation is performed during the `plot` execution, so it must be specified before that command. To restore, the last saved horizontal range use `set xrange restore`. For example, set xrange [-10:10] set yrange [] writeback plot sin(x) set yrange restore replot x/2 results in a yrange of [-1:1] as found only from the range of sin(x); the [-5:5] range of x/2 is ignored. Executing `show yrange` after each command in the above example should help you understand what is going on. In 2D, `xrange` and `yrange` determine the extent of the axes, `trange` determines the range of the parametric variable in parametric mode or the range of the angle in polar mode. Similarly in parametric 3D, `xrange`, `yrange`, and `zrange` govern the axes and `urange` and `vrange` govern the parametric variables. In polar mode, `rrange` determines the radial range plotted. <rmin> acts as an additive constant to the radius, whereas <rmax> acts as a clip to the radius---no point with radius greater than <rmax> will be plotted. `xrange` and `yrange` are affected---the ranges can be set as if the graph was of r(t)-rmin, with rmin added to all the labels. Any range may be partially or totally autoscaled, although it may not make sense to autoscale a parametric variable unless it is plotted with data. Ranges may also be specified on the `plot` command line. A range given on the plot line will be used for that single `plot` command; a range given by a `set` command will be used for all subsequent plots that do not specify their own ranges. The same holds true for `splot`. Examples: To set the xrange to the default: set xrange [-10:10] To set the yrange to increase downwards: set yrange [10:-10] To change zmax to 10 without affecting zmin (which may still be autoscaled): set zrange [:10] To autoscale xmin while leaving xmax unchanged: set xrange [*:] To autoscale xmin but keeping xmin positive: set xrange [0<*:] To autoscale x but keep minimum range of 10 to 50 (actual might be larger): set xrange [*<10:50<*] Autoscaling but limit maximum xrange to -1000 to 1000, i.e. autoscaling within [-1000:1000] set xrange [-1000<*:*<1000] Make sure xmin is somewhere between -200 and 100: set xrange [-200<*<100:] 3 xtics ?commands set xtics ?commands unset xtics ?commands show xtics ?set xtics ?unset xtics ?show xtics ?xtics ?noxtics Fine control of the major (labelled) tics on the x axis is possible with the `set xtics` command. The tics may be turned off with the `unset xtics` command, and may be turned on (the default state) with `set xtics`. Similar commands control the major tics on the y, z, x2 and y2 axes. Syntax: set xtics {axis | border} {{no}mirror} {in | out} {scale {default | <major> {,<minor>}}} {{no}rotate {by <ang>}} {offset <offset> | nooffset} {left | right | center | autojustify} {add} { autofreq | <incr> | <start>, <incr> {,<end>} | ({"<label>"} <pos> {<level>} {,{"<label>"}...) } { format "formatstring" } { font "name{,<size>}" } { rangelimited } { textcolor <colorspec> } unset xtics show xtics The same syntax applies to `ytics`, `ztics`, `x2tics`, `y2tics` and `cbtics`. `axis` or `border` tells `gnuplot` to put the tics (both the tics themselves and the accompanying labels) along the axis or the border, respectively. If the axis is very close to the border, the `axis` option will move the tic labels to outside the border. The relevant margin settings will usually be sized badly by the automatic layout algorithm in this case. `mirror` tells `gnuplot` to put unlabelled tics at the same positions on the opposite border. `nomirror` does what you think it does. `in` and `out` change the tic marks to be drawn inwards or outwards. With `scale`, the size of the tic marks can be adjusted. If <minor> is not specified, it is 0.5*<major>. The default size 1.0 for major tics and 0.5 for minor tics is requested by `scale default`. `rotate` asks `gnuplot` to rotate the text through 90 degrees, which will be done if the terminal driver in use supports text rotation. `norotate` cancels this. `rotate by <ang>` asks for rotation by <ang> degrees, supported by some terminal types. The defaults are `border mirror norotate` for tics on the x and y axes, and `border nomirror norotate` for tics on the x2 and y2 axes. For the z axis, the `{axis | border}` option is not available and the default is `nomirror`. If you do want to mirror the z-axis tics, you might want to create a bit more room for them with `set border`. The <offset> is specified by either x,y or x,y,z, and may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. <offset> is the offset of the tics texts from their default positions, while the default coordinate system is `character`. See `coordinates` for details. `nooffset` switches off the offset. Example: Move xtics more closely to the plot. set xtics offset 0,graph 0.05 By default, tic labels are justified automatically depending on the axis and rotation angle to produce aesthetically pleasing results. If this is not desired, justification can be overridden with an explicit `left`, `right` or `center` keyword. `autojustify` restores the default behavior. `set xtics` with no options restores the default border or axis if xtics are being displayed; otherwise it has no effect. Any previously specified tic frequency or position {and labels} are retained. Positions of the tics are calculated automatically by default or if the `autofreq` option is given; otherwise they may be specified in either of two forms: The implicit <start>, <incr>, <end> form specifies that a series of tics will be plotted on the axis between the values <start> and <end> with an increment of <incr>. If <end> is not given, it is assumed to be infinity. The increment may be negative. If neither <start> nor <end> is given, <start> is assumed to be negative infinity, <end> is assumed to be positive infinity, and the tics will be drawn at integral multiples of <incr>. If the axis is logarithmic, the increment will be used as a multiplicative factor. If you specify to a negative <start> or <incr> after a numerical value (e.g., `rotate by <angle>` or `offset <offset>`), the parser fails because it subtracts <start> or <incr> from that value. As a workaround, specify `0-<start>` resp. `0-<incr>` in that case. Example: set xtics border offset 0,0.5 -5,1,5 Fails with 'invalid expression' at the last comma. set xtics border offset 0,0.5 0-5,1,5 or set xtics offset 0,0.5 border -5,1,5 Sets tics at the border, tics text with an offset of 0,0.5 characters, and sets the start, increment, and end to -5, 1, and 5, as requested. The `set grid` options 'front', 'back' and 'layerdefault' affect the drawing order of the xtics, too. Examples: Make tics at 0, 0.5, 1, 1.5, ..., 9.5, 10. set xtics 0,.5,10 Make tics at ..., -10, -5, 0, 5, 10, ... set xtics 5 Make tics at 1, 100, 1e4, 1e6, 1e8. set logscale x; set xtics 1,100,1e8 The explicit ("<label>" <pos> <level>, ...) form allows arbitrary tic positions or non-numeric tic labels. In this form, the tics do not need to be listed in numerical order. Each tic has a position, optionally with a label. Note that the label is a string enclosed by quotes. It may be a constant string, such as "hello", may contain formatting information for converting the position into its label, such as "%3f clients", or may be empty, "". See `set format` for more information. If no string is given, the default label (numerical) is used. An explicit tic mark has a third parameter, the "level". The default is level 0, a major tic. A level of 1 generates a minor tic. If the level is specified, then the label must also be supplied. Examples: set xtics ("low" 0, "medium" 50, "high" 100) set xtics (1,2,4,8,16,32,64,128,256,512,1024) set ytics ("bottom" 0, "" 10, "top" 20) set ytics ("bottom" 0, "" 10 1, "top" 20) In the second example, all tics are labelled. In the third, only the end tics are labelled. In the fourth, the unlabeled tic is a minor tic. Normally if explicit tics are given, they are used instead of auto-generated tics. Conversely if you specify `set xtics auto` or the like it will erase any previously specified explicit tics. You can mix explicit and auto- generated tics by using the keyword `add`, which must appear before the tic style being added. Example: set xtics 0,.5,10 set xtics add ("Pi" 3.14159) This will automatically generate tic marks every 0.5 along x, but will also add an explicit labeled tic mark at pi. However they are specified, tics will only be plotted when in range. Format (or omission) of the tic labels is controlled by `set format`, unless the explicit text of a label is included in the `set xtics ("<label>")` form. Minor (unlabelled) tics can be added automatically by the `set mxtics` command, or at explicit positions by the `set xtics ("" <pos> 1, ...)` form. 4 xtics time_data ?set xtics time_axis tics ?xtics time_axis tics ?time_axis tics In case of timeseries data, axis tic position values must be given as quoted dates or times according to the format `timefmt`. If the <start>, <incr>, <end> form is used, <start> and <end> must be given according to `timefmt`, but <incr> must be in seconds. Times will be written out according to the format given on `set format`, however. Examples: set xdata time set timefmt "%d/%m" set xtics format "%b %d" set xrange ["01/12":"06/12"] set xtics "01/12", 172800, "05/12" set xdata time set timefmt "%d/%m" set xtics format "%b %d" set xrange ["01/12":"06/12"] set xtics ("01/12", "" "03/12", "05/12") Both of these will produce tics "Dec 1", "Dec 3", and "Dec 5", but in the second example the tic at "Dec 3" will be unlabelled. 4 xtics rangelimited ?set xtics rangelimited ?xtics rangelimited ?rangelimited ?range-frame This option limits both the auto-generated axis tic labels and the corresponding plot border to the range of values actually present in the data that has been plotted. Note that this is independent of the current range limits for the plot. For example, suppose that the data in "file.dat" all lies in the range 2 < y < 4. Then the following commands will create a plot for which the left-hand plot border (y axis) is drawn for only this portion of the total y range, and only the axis tics in this region are generated. I.e., the plot will be scaled to the full range on y, but there will be a gap between 0 and 2 on the left border and another gap between 4 and 10. This style is sometimes referred to as a `range-frame` graph. set border 3 set yrange [0:10] set ytics nomirror rangelimited plot "file.dat" 3 xyplane ?commands set xyplane ?commands show xyplane ?set xyplane ?show xyplane ?xyplane The `set xyplane` command adjusts the position at which the xy plane is drawn in a 3D plot. The synonym "set ticslevel" is accepted for backwards compatibility. Syntax: set xyplane at <zvalue> set xyplane relative <frac> set ticslevel <frac> # equivalent to set xyplane relative show xyplane The form `set xyplane relative <frac>` places the xy plane below the range in Z, where the distance from the xy plane to Zmin is given as a fraction of the total range in z. The default value is 0.5. Negative values are permitted, but tic labels on the three axes may overlap. The older, deprecated, form `set ticslevel` is retained for backwards compatibility. To place the xy-plane at a position 'pos' on the z-axis, `ticslevel` may be set equal to (pos - zmin) / (zmin - zmax). However, this position will change if the z range is changed. The alternative form `set xyplane at <zvalue>` fixes the placement of the xy plane at a specific Z value regardless of the current z range. Thus to force the x, y, and z axes to meet at a common origin one would specify `set xyplane at 0`. See also `set view`, and `set zeroaxis`. 3 xzeroaxis ?commands set xzeroaxis ?commands unset xzeroaxis ?commands show xzeroaxis ?set xzeroaxis ?unset xzeroaxis ?show xzeroaxis ?xzeroaxis ?noxzeroaxis The `set xzeroaxis` command draws a line at y = 0. For details, please see `set zeroaxis`. 3 y2data ?commands set y2data ?commands show y2data ?set y2data ?show y2data ?y2data The `set y2data` command sets y2 (right-hand) axis data to timeseries (dates/times). Please see `set xdata`. 3 y2dtics ?commands set y2dtics ?commands unset y2dtics ?set y2dtics ?unset y2dtics ?show y2dtics ?y2dtics ?noy2dtics The `set y2dtics` command changes tics on the y2 (right-hand) axis to days of the week. Please see `set xdtics` for details. 3 y2label ?commands set y2label ?commands show y2label ?set y2label ?show y2label ?y2label The `set y2label` command sets the label for the y2 (right-hand) axis. Please see `set xlabel`. 3 y2mtics ?commands set y2mtics ?commands unset y2mtics ?commands show y2mtics ?set y2mtics ?unset y2mtics ?show y2mtics ?y2mtics ?noy2mtics The `set y2mtics` command changes tics on the y2 (right-hand) axis to months of the year. Please see `set xmtics` for details. 3 y2range ?commands set y2range ?commands show y2range ?set y2range ?show y2range ?y2range The `set y2range` command sets the vertical range that will be displayed on the y2 (right-hand) axis. Please see `set xrange` for details. 3 y2tics ?commands set y2tics ?commands unset y2tics ?commands show y2tics ?set y2tics ?unset y2tics ?show y2tics ?y2tics ?noy2tics The `set y2tics` command controls major (labelled) tics on the y2 (right-hand) axis. Please see `set xtics` for details. 3 y2zeroaxis ?commands set y2zeroaxis ?commands unset y2zeroaxis ?commands show y2zeroaxis ?set y2zeroaxis ?unset y2zeroaxis ?show y2zeroaxis ?y2zeroaxis ?noy2zeroaxis The `set y2zeroaxis` command draws a line at the origin of the y2 (right-hand) axis (x2 = 0). For details, please see `set zeroaxis`. 3 ydata ?commands set ydata ?commands show ydata ?set ydata ?show ydata ?ydata The `set ydata` commands sets y-axis data to timeseries (dates/times). Please see `set xdata`. 3 ydtics ?commands set ydtics ?commands unset ydtics ?commands show ydtics ?set ydtics ?unset ydtics ?show ydtics ?ydtics ?noydtics The `set ydtics` command changes tics on the y axis to days of the week. Please see `set xdtics` for details. 3 ylabel ?commands set ylabel ?commands show ylabel ?set ylabel ?show ylabel ?ylabel This command sets the label for the y axis. Please see `set xlabel`. 3 ymtics ?commands set ymtics ?commands unset ymtics ?commands show ymtics ?set ymtics ?unset ymtics ?show ymtics ?ymtics ?noymtics The `set ymtics` command changes tics on the y axis to months of the year. Please see `set xmtics` for details. 3 yrange ?commands set yrange ?commands show yrange ?set yrange ?show yrange ?yrange The `set yrange` command sets the vertical range that will be displayed on the y axis. Please see `set xrange` for details. 3 ytics ?commands set ytics ?commands unset ytics ?commands show ytics ?set ytics ?unset ytics ?show ytics ?ytics ?noytics The `set ytics` command controls major (labelled) tics on the y axis. Please see `set xtics` for details. 3 yzeroaxis ?commands set yzeroaxis ?commands unset yzeroaxis ?commands show yzeroaxis ?set yzeroaxis ?unset yzeroaxis ?show yzeroaxis ?yzeroaxis ?noyzeroaxis The `set yzeroaxis` command draws a line at x = 0. For details, please see `set zeroaxis`. 3 zdata ?commands set zdata ?commands show zdata ?set zdata ?show zdata ?zdata The `set zdata` command sets zaxis data to timeseries (dates/times). Please see `set xdata`. 3 zdtics ?commands set zdtics ?commands unset zdtics ?commands show zdtics ?set zdtics ?unset zdtics ?show zdtics ?zdtics ?nozdtics The `set zdtics` command changes tics on the z axis to days of the week. Please see `set xdtics` for details. 3 zzeroaxis ?commands set zzeroaxis ?commands unset zzeroaxis ?commands show zzeroaxis ?set zzeroaxis ?unset zzeroaxis ?show zzeroaxis ?zzeroaxis ?nozzeroaxis The `set zzeroaxis` command draws a line through (x=0,y=0). This has no effect on 2D plots, including splot with `set view map`. For details, please see `set zeroaxis` and `set xyplane`. 3 cbdata ?commands set cbdata ?commands show cbdata ?set cbdata ?show cbdata ?cbdata Set color box axis data to timeseries (dates/times). Please see `set xdata`. 3 cbdtics ?commands set cbdtics ?commands unset cbdtics ?commands show cbdtics ?set cbdtics ?unset cbdtics ?show cbdtics ?cbdtics ?nocbdtics The `set cbdtics` command changes tics on the color box axis to days of the week. Please see `set xdtics` for details. 3 zero ?commands set zero ?commands show zero ?set zero ?show zero ?zero The `zero` value is the default threshold for values approaching 0.0. Syntax: set zero <expression> show zero `gnuplot` will not plot a point if its imaginary part is greater in magnitude than the `zero` threshold. This threshold is also used in various other parts of `gnuplot` as a (crude) numerical-error threshold. The default `zero` value is 1e-8. `zero` values larger than 1e-3 (the reciprocal of the number of pixels in a typical bitmap display) should probably be avoided, but it is not unreasonable to set `zero` to 0.0. 3 zeroaxis ?commands set zeroaxis ?commands unset zeroaxis ?commands show zeroaxis ?set zeroaxis ?unset zeroaxis ?show zeroaxis ?zeroaxis The x axis may be drawn by `set xzeroaxis` and removed by `unset xzeroaxis`. Similar commands behave similarly for the y, x2, y2, and z axes. Syntax: set {x|x2|y|y2|z}zeroaxis { {linestyle | ls <line_style>} | { linetype | lt <line_type>} { linewidth | lw <line_width>}} unset {x|x2|y|y2|z}zeroaxis show {x|y|z}zeroaxis By default, these options are off. The selected zero axis is drawn with a line of type <line_type> and width <line_width> (if supported by the terminal driver currently in use), or a user-defined style <line_style>. If no linetype is specified, any zero axes selected will be drawn using the axis linetype (linetype 0). `set zeroaxis` is equivalent to `set xzeroaxis; set yzeroaxis`. Note that the z-axis must be set separately using `set zzeroaxis`. Examples: To simply have the y=0 axis drawn visibly: set xzeroaxis If you want a thick line in a different color or pattern, instead: set xzeroaxis linetype 3 linewidth 2.5 3 zlabel ?commands set zlabel ?commands show zlabel ?set zlabel ?show zlabel ?zlabel This command sets the label for the z axis. Please see `set xlabel`. 3 zmtics ?commands set zmtics ?commands unset zmtics ?commands show zmtics ?set zmtics ?unset zmtics ?show zmtics ?zmtics ?nozmtics The `set zmtics` command changes tics on the z axis to months of the year. Please see `set xmtics` for details. 3 zrange ?commands set zrange ?commands show zrange ?set zrange ?show zrange ?zrange The `set zrange` command sets the range that will be displayed on the z axis. The zrange is used only by `splot` and is ignored by `plot`. Please see `set xrange` for details. 3 ztics ?commands set ztics ?commands unset ztics ?commands show ztics ?set ztics ?unset ztics ?show ztics ?ztics ?noztics The `set ztics` command controls major (labelled) tics on the z axis. Please see `set xtics` for details. 3 cblabel ?commands set cblabel ?commands show cblabel ?set cblabel ?show cblabel ?cblabel This command sets the label for the color box axis. Please see `set xlabel`. 3 cbmtics ?commands set cbmtics ?commands unset cbmtics ?commands show cbmtics ?set cbmtics ?unset cbmtics ?show cbmtics ?cbmtics ?nocbmtics The `set cbmtics` command changes tics on the color box axis to months of the year. Please see `set xmtics` for details. 3 cbrange ?commands set cbrange ?commands show cbrange ?set cbrange ?show cbrange ?cbrange The `set cbrange` command sets the range of values which are colored using the current `palette` by styles `with pm3d`, `with image` and `with palette`. Values outside of the color range use color of the nearest extreme. If the cb-axis is autoscaled in `splot`, then the colorbox range is taken from `zrange`. Points drawn in `splot ... pm3d|palette` can be filtered by using different `zrange` and `cbrange`. Please see `set xrange` for details on `set cbrange` syntax. See also `set palette` and `set colorbox`. 3 cbtics ?commands set cbtics ?commands unset cbtics ?commands show cbtics ?set cbtics ?unset cbtics ?show cbtics ?cbtics ?nocbtics The `set cbtics` command controls major (labelled) tics on the color box axis. Please see `set xtics` for details. 2 shell ?commands shell ?shell The `shell` command spawns an interactive shell. To return to `gnuplot`, type `logout` if using VMS, `exit` or the END-OF-FILE character if using Unix, or `exit` if using MS-DOS or OS/2. There are two ways of spawning a shell command: using `system` command or via `!` ($ if using VMS). The former command takes a string as a parameter and thus it can be used anywhere among other gnuplot commands, while the latter syntax requires to be the only command on the line. Control will return immediately to `gnuplot` after this command is executed. For example, in MS-DOS or OS/2, ! dir or system "dir" prints a directory listing and then returns to `gnuplot`. Other examples of the former syntax: system "date"; set time; plot "a.dat" print=1; if (print) replot; set out; system "lpr x.ps" 2 splot ?commands splot ?splot `splot` is the command for drawing 3D plots (well, actually projections on a 2D surface, but you knew that). It can create a plot from functions or data read from files in a manner very similar to the `plot` command. `splot` provides only a single x, y, and z axis; there is no equivalent to the x2 and y2 secondary axes provided by `plot`. See the `plot` command for many options available in both 2D and 3D plots. Syntax: splot {<ranges>} {<iteration>} <function> | "<datafile>" {datafile-modifiers}} {<title-spec>} {with <style>} {, {definitions{,}} <function> ...} where either a <function> or the name of a data file enclosed in quotes is supplied. The function can be a mathematical expression, or a triple of mathematical expressions in parametric mode. By default `splot` draws the xy plane completely below the plotted data. The offset between the lowest ztic and the xy plane can be changed by `set xyplane`. The orientation of a `splot` projection is controlled by `set view`. See `set view` and `set xyplane` for more information. The syntax for setting ranges on the `splot` command is the same as for `plot`. In non-parametric mode, the order in which ranges must be given is `xrange`, `yrange`, and `zrange`. In parametric mode, the order is `urange`, `vrange`, `xrange`, `yrange`, and `zrange`. The `title` option is the same as in `plot`. The operation of `with` is also the same as in `plot`, except that the plotting styles available to `splot` are limited to `lines`, `points`, `linespoints`, `dots`, and `impulses`; the error-bar capabilities of `plot` are not available for `splot`. The `datafile` options have more differences. See also `show plot`. 3 data-file ?commands splot datafile ?splot datafile `Splot`, like `plot`, can display from a file. Syntax: splot '<file_name>' {binary <binary list>} {{nonuniform} matrix} {index <index list>} {every <every list>} {using <using list>} The special filenames `""` and `"-"` are permitted, as in `plot`. See `special-filenames`. In brief, `binary` and `matrix` indicate that the data are in a special form, `index` selects which data sets in a multi-data-set file are to be plotted, `every` specifies which datalines (subsets) within a single data set are to be plotted, and `using` determines how the columns within a single record are to be interpreted. The options `index` and `every` behave the same way as with `plot`; `using` does so also, except that the `using` list must provide three entries instead of two. The `plot` options `thru` and `smooth` are not available for `splot`, but `cntrparam` and `dgrid3d` provide limited smoothing capabilities. Data file organization is essentially the same as for `plot`, except that each point is an (x,y,z) triple. If only a single value is provided, it will be used for z, the datablock number will be used for y, and the index of the data point in the datablock will be used for x. If two or four values are provided, `gnuplot` uses the last value for calculating the color in pm3d plots. Three values are interpreted as an (x,y,z) triple. Additional values are generally used as errors, which can be used by `fit`. Single blank records separate datablocks in a `splot` datafile; `splot` treats datablocks as the equivalent of function y-isolines. No line will join points separated by a blank record. If all datablocks contain the same number of points, `gnuplot` will draw cross-isolines between datablocks, connecting corresponding points. This is termed "grid data", and is required for drawing a surface, for contouring (`set contour`) and hidden-line removal (`set hidden3d`). See also `splot grid_data`. It is no longer necessary to specify `parametric` mode for three-column `splot`s. 4 matrix ?commands plot datafile matrix ?commands splot datafile matrix ?plot datafile matrix binary ?splot datafile matrix binary ?plot binary matrix ?splot binary matrix ?plot matrix binary ?splot matrix binary ?matrix binary ?binary matrix Gnuplot can interpret matrix input in two different ways. The first of these assumes a uniform grid of x and y coordinates, and assigns each value in the input matrix to one element of this uniform grid. This is the default for ascii data input, but not for binary input. Example commands for plotting uniform matrix data: splot 'file' matrix using 1:2:3 # ascii input splot 'file' binary general using 1:2:3 # binary input In a uniform grid matrix the z-values are read in a row at a time, i. e., z11 z12 z13 z14 ... z21 z22 z23 z24 ... z31 z32 z33 z34 ... and so forth. For ascii input, a blank line or comment line ends the matrix, and starts a new surface mesh. You can select among the meshes inside a file by the `index` option to the `splot` command, as usual. =nonuniform The second interpretation assumes a non-uniform grid with explicit x and y coordinates. The first row of input data contains the y coordinates; the first column of input data contains the x coordinates. For binary input data, the first element of the first row must contain the number of data columns. (This number is ignored for ascii input). Both the coordinates and the data values in a binary input are treated as single precision floats. Example commands for plotting non-uniform matrix data: splot 'file' nonuniform matrix using 1:2:3 # ascii input splot 'file' binary matrix using 1:2:3 # binary input Thus the data organization for non-uniform matrix input is <N+1> <y0> <y1> <y2> ... <yN> <x0> <z0,0> <z0,1> <z0,2> ... <z0,N> <x1> <z1,0> <z1,1> <z1,2> ... <z1,N> : : : : ... : which is then converted into triplets: <x0> <y0> <z0,0> <x0> <y1> <z0,1> <x0> <y2> <z0,2> : : : <x0> <yN> <z0,N> <x1> <y0> <z1,0> <x1> <y1> <z1,1> : : : These triplets are then converted into `gnuplot` iso-curves and then `gnuplot` proceeds in the usual manner to do the rest of the plotting. A collection of matrix and vector manipulation routines (in C) is provided in `binary.c`. The routine to write binary data is int fwrite_matrix(file,m,nrl,nrl,ncl,nch,row_title,column_title) An example of using these routines is provided in the file `bf_test.c`, which generates binary files for the demo file `demo/binary.dem`. Usage in `plot`: plot `a.dat` matrix plot `a.dat` matrix using 1:3 plot 'a.gpbin' {matrix} binary using 1:3 will plot rows of the matrix, while using 2:3 will plot matrix columns, and using 1:2 the point coordinates (rather useless). Applying the `every` option you can specify explicit rows and columns. Example -- rescale axes of a matrix in an ascii file: splot `a.dat` matrix using (1+$1):(1+$2*10):3 Example -- plot the 3rd row of a matrix in an ascii file: plot 'a.dat' matrix using 1:3 every 1:999:1:2 (rows are enumerated from 0, thus 2 instead of 3). Gnuplot can read matrix binary files by use of the option `binary` appearing without keyword qualifications unique to general binary, i.e., `array`, `record`, `format`, or `filetype`. Other general binary keywords for translation should also apply to matrix binary. (See `binary general` for more details.) 4 example datafile ?commands splot datafile example ?splot datafile example ?splot example A simple example of plotting a 3D data file is splot 'datafile.dat' where the file "datafile.dat" might contain: # The valley of the Gnu. 0 0 10 0 1 10 0 2 10 1 0 10 1 1 5 1 2 10 2 0 10 2 1 1 2 2 10 3 0 10 3 1 0 3 2 10 Note that "datafile.dat" defines a 4 by 3 grid ( 4 rows of 3 points each ). Rows (datablocks) are separated by blank records. Note also that the x value is held constant within each dataline. If you instead keep y constant, and plot with hidden-line removal enabled, you will find that the surface is drawn 'inside-out'. Actually for grid data it is not necessary to keep the x values constant within a datablock, nor is it necessary to keep the same sequence of y values. `gnuplot` requires only that the number of points be the same for each datablock. However since the surface mesh, from which contours are derived, connects sequentially corresponding points, the effect of an irregular grid on a surface plot is unpredictable and should be examined on a case-by-case basis. 3 grid data ?commands splot grid_data ?splot grid_data ?grid_data The 3D routines are designed for points in a grid format, with one sample, datapoint, at each mesh intersection; the datapoints may originate from either evaluating a function, see `set isosamples`, or reading a datafile, see `splot datafile`. The term "isoline" is applied to the mesh lines for both functions and data. Note that the mesh need not be rectangular in x and y, as it may be parameterized in u and v, see `set isosamples`. However, `gnuplot` does not require that format. In the case of functions, 'samples' need not be equal to 'isosamples', i.e., not every x-isoline sample need intersect a y-isoline. In the case of data files, if there are an equal number of scattered data points in each datablock, then "isolines" will connect the points in a datablock, and "cross-isolines" will connect the corresponding points in each datablock to generate a "surface". In either case, contour and hidden3d modes may give different plots than if the points were in the intended format. Scattered data can be converted to a {different} grid format with `set dgrid3d`. The contour code tests for z intensity along a line between a point on a y-isoline and the corresponding point in the next y-isoline. Thus a `splot` contour of a surface with samples on the x-isolines that do not coincide with a y-isoline intersection will ignore such samples. Try: set xrange [-pi/2:pi/2]; set yrange [-pi/2:pi/2] set style function lp set contour set isosamples 10,10; set samples 10,10; splot cos(x)*cos(y) set samples 4,10; replot set samples 10,4; replot 3 splot surfaces ?commands splot surfaces ?splot surfaces `splot` can display a surface as a collection of points, or by connecting those points. As with `plot`, the points may be read from a data file or result from evaluation of a function at specified intervals, see `set isosamples`. The surface may be approximated by connecting the points with straight line segments, see `set surface`, in which case the surface can be made opaque with `set hidden3d.` The orientation from which the 3d surface is viewed can be changed with `set view`. Additionally, for points in a grid format, `splot` can interpolate points having a common amplitude (see `set contour`) and can then connect those new points to display contour lines, either directly with straight-line segments or smoothed lines (see `set cntrparam`). Functions are already evaluated in a grid format, determined by `set isosamples` and `set samples`, while file data must either be in a grid format, as described in `data-file`, or be used to generate a grid (see `set dgrid3d`). Contour lines may be displayed either on the surface or projected onto the base. The base projections of the contour lines may be written to a file, and then read with `plot`, to take advantage of `plot`'s additional formatting capabilities. 2 stats (Statistical Summary) ?commands stats ?stats ?statistics Syntax: stats 'filename' [using N[:M]] [name 'prefix'] [[no]output]] This command prepares a statistical summary of the data in one or two columns of a file. The using specifier is interpreted in the same way as for plot commands. See `plot` for details on the `index`, `every`, and `using` directives. Data points are filtered against both xrange and yrange before analysis. See `set xrange`. The summary is printed to the screen by default. Output can be redirected to a file by prior use of the command `set print`, or suppressed altogether using the `nooutput` option. In addition to printed output, the program stores the individual statistics into three sets of variables. The first set of variables reports how the data is laid out in the file: STATS_records # total number of in-range data records STATS_outofrange # number of records filtered out by range limits STATS_invalid # number of invalid/incomplete/missing records STATS_blank # number of blank lines in the file STATS_blocks # number of indexable data blocks in the file The second set reports properties of the in-range data from a single column. If the corresponding axis is autoscaled (x-axis for the 1st column, y-axis for the optional second column) then no range limits are applied. If two columns are being analysed in a single `stats` command, the the suffix "_x" or "_y" is appended to each variable name. I.e. STATS_min_x is the minimum value found in the first column, while STATS_min_y is the minimum value found in the second column. STATS_min # minimum value of in-range data points STATS_max # maximum value of in-range data points STATS_index_min # index i for which data[i] == STATS_min STATS_index_max # index i for which data[i] == STATS_max STATS_lo_quartile # value of the lower (1st) quartile boundary STATS_median # median value STATS_up_quartile # value of the upper (3rd) quartile boundary STATS_mean # mean value of in-range data points STATS_stddev # standard deviation of the in-range data points STATS_sum # sum STATS_sumsq # sum of squares The third set of variables is only relevant to analysis of two data columns. STATS_correlation # correlation coefficient between x and y values STATS_slope # A corresponding to a linear fit y = Ax + B STATS_intercept # B corresponding to a linear fit y = Ax + B STATS_sumxy # sum of x*y STATS_pos_min_y # x coordinate of a point with minimum y value STATS_pos_max_y # x coordinate of a point with maximum y value It may be convenient to track the statistics from more than one file at the same time. The `name` option causes the default prefix "STATS" to be replaced by a user-specified string. For example, the mean value of column 2 data from two different files could be compared by stats "file1.dat" using 2 name "A" stats "file2.dat" using 2 name "B" if (A_mean < B_mean) {...} The index reported in STATS_index_xxx corresponds to the value of pseudo-column 0 ($0) in plot commands. I.e. the first point has index 0, the last point has index N-1. Data values are sorted to find the median and quartile boundaries. If the total number of points N is odd, then the median value is taken as the value of data point (N+1)/2. If N is even, then the median is reported as the mean value of points N/2 and (N+2)/2. Equivalent treatment is used for the quartile boundaries. For an example of using the `stats` command to help annotate a subsequent plot, see ^ <a href="http://www.gnuplot.info/demo/stats.html"> stats.dem. ^ </a> The current implementation does not allow analysis if either the X or Y axis is set to log-scaling. This restriction may be removed in a later version. 2 system ?commands system ?system `system "command"` executes "command" using the standard shell. See `shell`. If called as a function, `system("command")` returns the resulting character stream from stdout as a string. One optional trailing newline is ignored. This can be used to import external functions into gnuplot scripts: f(x) = real(system(sprintf("somecommand %f", x))) 2 test ?commands test ?test palette ?test This command graphically tests or presents terminal and palette capabilities. Syntax: test {terminal | palette [rgb|rbg|grb|gbr|brg|bgr]} `test` or `test terminal` creates a display of line and point styles and other useful things appropriate for and supported by the `terminal` you are just using. `test palette` plots profiles of R(z),G(z),B(z), where 0<=z<=1. These are the RGB components of the current color `palette`. It also plots the apparent net intensity as calculated using NTSC coefficients to map RGB onto a grayscale. The optional parameter, a permutation of letters rgb, determines the sequence in which the r,g,b profiles are drawn. 2 undefine ?commands undefine ?undefine Clear one or more previously defined user variables. This is useful in order to reset the state of a script containing an initialization test. A variable name can contain the wildcard character `*` as last character. If the wildcard character is found, all variables with names that begin with the prefix preceding the wildcard will be removed. This is useful to remove several variables sharing a common prefix. Note that the wildcard character is only allowed at the end of the variable name! Specifying the wildcard character as sole argument to `undefine` has no effect. Example: undefine foo foo1 foo2 if (!exists("foo")) load "initialize.gp" bar = 1; bar1 = 2; bar2 = 3 undefine bar* # removes all three variables 2 unset ?commands unset ?unset =iteration Options set using the `set` command may be returned to their default state by the corresponding `unset` command. The `unset` command may contain an optional iteration clause. See `iteration`. Examples: set xtics mirror rotate by -45 0,10,100 ... unset xtics # Unset labels numbered between 100 and 200 unset for [i=100:200] label i 3 terminal ?unset terminal The default terminal that is active at the time of program entry depends on the system platform, gnuplot build options, and the environmental variable GNUTERM. Whatever this default may be, gnuplot saves it in the internal variable GNUTERM. The `unset terminal` command restores this initial state. It is equivalent to `set terminal GNUTERM`. 2 update ?commands update ?update This command writes the current values of the fit parameters into the given file, formatted as an initial-value file (as described in the `fit`section). This is useful for saving the current values for later use or for restarting a converged or stopped fit. Syntax: update <filename> {<filename>} If a second filename is supplied, the updated values are written to this file, and the original parameter file is left unmodified. Otherwise, if the file already exists, `gnuplot` first renames it by appending `.old` and then opens a new file. That is, "`update 'fred'`" behaves the same as "`!rename fred fred.old; update 'fred.old' 'fred'`". [On DOS and other systems that use the twelve-character "filename.ext" naming convention, "ext" will be "`old`" and "filename" will be related (hopefully recognizably) to the initial name. Renaming is not done at all on VMS systems, since they use file-versioning.] Please see `fit` for more information. 2 While ?while ?commands while Syntax: while (<expr>) { <commands> } Execute a block of commands repeatedly so long as <expr> evaluates to a non-zero value. This command cannot be mixed with old-style (un-bracketed) if/else statements. See `if`. 1 Terminal types ^ <h2> Terminal Types </h2> 2 complete list of terminals ?complete list of terminals ?terminal ?term Gnuplot supports a large number of output formats. These are selected by choosing an appropriate terminal type, possibly with additional modifying options. See `set terminal`. This document may describe terminal types that are not available to you because they were not configured or installed on your system. To see a list of terminals available on a particular gnuplot installation, type 'set terminal' with no modifiers. <3 -- all terminal stuff is pulled from the .trm files 1 Bugs ?bugs Please e-mail bug reports to the gnuplot-bugs mailing list or upload the report to the gnuplot web site on SourceForge. Please give complete information on the version of gnuplot you are using and, if possible, a test script that demonstrates the bug. See `seeking-assistance`. 2 known limitations It is not possible to use in-line data (e.g. plot '-' ...) inside the curly brackets of a `do` or `while` loop. The layout and positioning of the plot key is inaccurate whenever superscripts, subscripts, or explicit fonts are used in the key text. (Fixed in 4.7) =gamma =bessel =timefmt =nohidden3d =floating point exceptions Floating point exceptions (floating point number too large/small, divide by zero, etc.) may occasionally be generated by user defined functions. Some of the demos in particular may cause numbers to exceed the floating point range. Whether the system ignores such exceptions (in which case `gnuplot` labels the corresponding point as undefined) or aborts `gnuplot` depends on the compiler/runtime environment. The gamma, bessel, and erf functions do not work for complex arguments. Coordinates specified as "time" wrap at 24 hours. The 'nohidden3d' option that is supposed to exempt individual plots from the global property 'set hidden3d' does not work for parametric curves. X11 terminal: It is difficult to select UTF-8 fonts. The program does not track the true aspect ratio of the x11 terminal window. In order for commands such as "set size ratio" to work, the x11 window must itself have equal height and width. Only one color palette at a time is active for any given x11 plot window. This means that multiplots whose constituent plots use different palettes will not display correctly in x11. Qt terminal: If the local qt environment does not support "opengl" as a rendering mode then display of polygons and surfaces can be very slow. 2 External libraries ?bugs external_libraries =libgd =svgalib =locale =internationalization =pdf External library GD (used by PNG/JPEG/GIF drivers): Versions of libgd through 2.0.33 contain various bugs in mapping the characters of Adobe's Symbol font. Also it is possible to trigger a library segfault if an anti-aliased line crosses an upper corner of the canvas. External library PDFlib (used by PDF driver): Gnuplot can be linked against libpdf versions 4, 5, or 6. However, these versions differ in their handling of piped I/O. Therefore gnuplot scripts using piped output to PDF may work only for some versions of PDFlib. External library svgalib (used by linux and vgagl driver): Requires gnuplot to be suid root (bad!) and has many bugs that are specific to the video card or graphics driver used in X11. Internationalization (locale settings): Gnuplot uses the C runtime library routine setlocale() to control locale-specific formatting of input and output number, times, and date strings. The locales available, and the level of support for locale features such as "thousands' grouping separator", depend on the internationalization support provided by your individual machine. �������������������������������������������������������������������������gnuplot-4.6.4/PATCHLEVEL����������������������������������������������������������������������������0000644�0004711�0000144�00000000002�12212153340�011464� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������4 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/INSTALL.gnu���������������������������������������������������������������������������0000644�0004711�0000144�00000022432�10507727672�011772� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/PORTING�������������������������������������������������������������������������������0000644�0004711�0000144�00000023331�11626256045�011207� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������******************************************************************************* *** NB: This file is horribly out of date. *** View everything in it as historical perspective; *** the broad outline may be useful but the details are not current ******************************************************************************* The following information is mainly geared towards people who want to port gnuplot to new platforms not covered by the installation instructions in 0INSTALL and INSTALL.gnu. Please do also read the file CodeStyle. We have tried to isolate most operating system dependent definitions in the file syscfg.h. If you add a new platform, some definitions must probably be added to syscfg.h as well. Preprocessor Defines ******************** These #defines should be checked before compilation. There are many makefiles provided as templates. You probably need these only if porting to a new machine. The HAVE_XXX defines should be taken care of by configure if your platform supports GNU autoconf generated configure shell scripts. If your platform/environment does not support configure, see Codestyle and syscfg.h. THIS LIST IS SOMEWHAT OUT OF DATE NOW - CHECK configure.in and acconfig.h. define file note ------ ---- -------- HAVE_BCOPY Makefile define if you have bcopy() and no memcpy() HAVE_LGAMMA Makefile define if you've got lgamma(3) HAVE_GAMMA Makefile define if you've got gamma(3) PC Makefile define if compiling on a PClone MSDOS Makefile define if compiling under MSDOS; automatically defined by Microsoft C 5.10 DOS32 Makefile define for a 32-bit DOS extender (djgpp/emx) WIN32 Makefile define for a 32-bit MS-Windows version HELPFILE Makefile name including path of gnuplot.gih file. VERYLARGE plot.h define to be largest coordinate number. SHELL plot.h default shell to spawn if SHELL environment variable not found at run-time NOCWDRC Makefile define to inhibit check of ./.gnuplot READLINE Makefile define if you want command-line editing HAVE_LIBREADLINE Makefile define if you are linking with GNU readline Header File Availability ======================== It is generally assumed that standard ANSI/ISO header files are available. Function Availability ===================== It is generally assumed that standard ANSI/ISO functions are available. If certain standard ANSI/ISO C functions are not available, two alternatives come to mind: either try to achieve the same functionality without the missing function, or provide a portable implementation. Examples for this are in stdfn.c. See also stdfn.h. The following defines are used to ensure availability of certain non-standard functions. #define function see file comments ------------------------------------------------------------------- HAVE_ERF erf() specfun.c HAVE_GAMMA gamma() specfun.c HAVE_GETCWD getcwd() stdfn.h HAVE_GETWD getwd() stdfn.h HAVE_INDEX index() stdfn.h pre-ANSI version of strchr() HAVE_LGAMMA lgamma() specfun.c prefered over gamma() HAVE_ON_EXIT on_exit() term/x11.trm atexit() substitute on SunOS HAVE_RINDEX rindex() stdfn.h pre-ANSI version of strrchr() HAVE_SLEEP sleep() command.c HAVE_SYSINFO sysinfo() gplt_x11.c SysV function to get and set system information. Used instead of gethostname(). HAVE_STRNCASECMP strncasecmp() stdfn.c non-case sensitive string comparison HAVE_STRNICMP strnicmp() stdfn.c dto. HAVE_TCGETATTR tcgetattr() readline.c Terminal Selection Options ========================== These defines are used to include the drivers for various plotting terminals, printers, and protocols that a given version of gnuplot can access and the description of such for the help file. define file note ------ ---- -------- TERMFLAGS Various makefiles (obsolete under Unix; use configure instead) the set of terminals you want, from below or term.h SHORT_TERMLIST term.h edit term.h to specify desired devices at the beginning (instead of commenting out, throughout the file, devices not desired.) ALL_TERM_DOC docs/termdoc.c on-line help documentation for all devices rather than only for the drivers selected in term.h. The following, non-authoritative, list serves as a guide to the range of devices that may be selected/deselected by editing term.h. AED AED 512 and AED 767 AIFM Adobe Illustrator Format ATT6300 PC with AT&T 6300 graphics BITGRAPH BBN BitGraph COREL COREL! Draw Format CORONA PC with Corona graphics 325 DEBUG Voluminous output for debugging to terminal DJSVGA MSDOS SVGA with DJGPP compiler DXY800A Roland DXY800A plotter DUMB Printer or glass dumb terminal DXF AutoCad (Release 10.x) dxf file format EEPIC EEPIC-extended LaTeX driver, for EEPIC users EGALIB PC with EGA/VGA graphics. EMTEX LaTeX picture environment with emTeX specials EMXVGA PC with VGA running DOS or OS/2 EPS180 Epson-LQ style 24-pin 180-dot per inch printers EPS60 Epson-style 60-dot per inch printers EPSONP Epson LX-800, Star NL-10, NX-1000 and lots of others EXCL Talaris EXCL laser printer format FIG Fig graphics language (requires object.h from TransFig) GIF Gif output, requires special library GPIC Gpic for groff HERCULES IBM PC/Clone with Hercules graphics board HP2648 HP2648, HP2647 HP26 HP2623A and maybe others HP500C HP Deskjet 500 C and maybe other Color Deskjets HP75 HP7580, and probably other HPs HPGL HP7475 and (hopefully) lots of others HPLJII HP Laserjet II HPPJ HP PaintJet IMAGEN Imagen laser printers (300dpi) (requires -Iterm also) KERMIT MS-DOS Kermit Tektronix 4010 emulator LATEX LaTeX picture environment LINUXVGA Linux PC with (s)vgalib MF Metafont Format MIF FrameMaker MIF 3.00 Format NEC NEC CP6 pinwriter printer NEXT NeXTStep Window System (only grey scale) OS2PM OS/2 Presentation Manager PBM PBMPLUS pbm, pgm, ppm formats PCL HP PCL5 (actually HPGL/2) PNG Portable Network Graphics, requires separate library POSTSCRIPT PostScript PSLATEX Postscript graphics, LaTeX labels and titles PSTRICKS PSTRICKS 0.91 format QMS QMS/QUIC laserprinter (Talaris 1200 and others) REGIS ReGis graphics (vt125, vt220, vt240, Gigis...) SELANAR Selanar SUN Sun Microsystems Workstation T410X Tektronix 4106, 4107, 4109 and 420x terminals TABLE Text output TANDY60 Tandy DMP-130 series 60-dot per inch graphics TEK Tektronix 4010, and probably others TEXDRAW TeXDraw format (for LaTeX) TGIF TGIF X11 Drawing Tool TPIC Tpic specials for TeX UNIXPC unixpc (ATT 3b1 or ATT 7300) V384 Vectrix 384 and tandy color printer VTTEK VT like Tektronix 4010 emulator VWS VAX Windowing System (UIS libraries) X11 X11R4 window system Platform Related Defines ======================== These #defines are defined automatically by various compilers or makefiles, some gnuplot routines check these defines to implement features found in the various environments. This list is certainly incomplete. define note ------ -------- _CRAY defined by CRAY's C compiler. __DECC defined by DEC C compiler under VMS (?) __TURBOC__ defined automatically by Borland C++ 3.x. unix defined by most unix C compilers. vms (and VMS) defined by VMS C compilers. __ZTC__ Zortech C compiler under MSDOS. _Windows defined by Borland C++ 3.0 compiling for MS-Windows. __WATCOMC__ defined automatically by Watcom C __EMX__ defined by EMX gcc (available on DOS & OS/2). OS2 to be defined by compilers under OS/2. Defines Used in Gnuplot ======================= The following defines are used to achieve better portability. Most of them are wrappers. #define wraps/redefines see file comments ------------------------------------------------------------------ GP_GETCWD getwd()/getcwd() alikes stdfn.h GP_FARMALLOC faralloc()/malloc() alloc.c Windows environment GP_FARREALLOC farrealloc()/realloc() alloc.c Windows environment GP_SLEEP sleep() command.c GP_SYSTEMINFO sysinfo()/gethostname() gplt_x11.c GPFAR `far' compiler directive plot.h MSDOS and Win16 GPHUGE `huge' compiler directive plot.h MSDOS and Win16 GP_INLINE `__inline' directive plot.h GPMAX max (a,b) plot.h GPMIN min (a,b) plot.h The following symbols are defined when using DEBUG: DEBUG_WHERE prints filename and line number to stderr *without* linefeed FPRINTF(a) uses DEBUG_WHERE, passes a to fprintf Usage example: FPRINTF((stderr, "function foo returned %d\n", bar)); Result: readline.c:620 function foo returned -1 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/missing�������������������������������������������������������������������������������0000755�0004711�0000144�00000015331�12215647346�011545� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2012-06-26.16; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to <bug-automake@gnu.org>." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'automa4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/PGPKEYS�������������������������������������������������������������������������������0000644�0004711�0000144�00000003032�06653343106�011202� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This file contains the PGP keys used to sign the various versions of gnuplot. You can add them to your PGP keyring using: PGP 2.X: pgp -ka PGPKEYS PGP 5.X: pgpk -a PGPKEYS Type Bits/KeyID Date User ID pub 1024/FB6F7CC9 1998/02/27 Lars Hecking <lhecking@nmrc.ucc.ie> -----BEGIN PGP PUBLIC KEY BLOCK----- Version: 2.6.3ia mQCNAzT254oAAAEEAM4C8WfNuK9lEs4ZoyEwmVLQQ4UT9qxmpR4kuZTueoO0ng9/ mu1MYWHOrOJDhnw0NSWEfVfW67sobank0weQQ14lzsiyo3QLf4jFwPMicCbXSz/5 4TlgZBvEMwBxWp9cTcTIZ4ihYlqAkdvZALcBNUYY6pIU6y1FT1J8Bnz7b3zJAAUR tCNMYXJzIEhlY2tpbmcgPGxoZWNraW5nQG5tcmMudWNjLmllPokAlQMFEDT254pS fAZ8+298yQEBx+wD/1zjnZvBW4Jzsu1UlIK7KDVPV2bPhPICq/2BSPhg1jCHs2s3 0kmh6PtD4gBeziIwfp6MdkaQ4+S1PHy3eIUc05/vgGzpIf7IYTdgOvVaZdIMjR9U DAdAsOv4X48PyP3kjWkweB5zm2Q7UovmgqoMZ6UWmxWfTjdapzr4GJloNgKK =Rbtn -----END PGP PUBLIC KEY BLOCK----- Type Bits/KeyID Date User ID pub 1024/E4235665 1999/01/17 Roger Fearick <fearick@physci.uct.ac.za> -----BEGIN PGP PUBLIC KEY BLOCK----- Version: PGPfreeware 5.0i OS/2 for non-commercial use Comment: PGP 5.0 for OS/2 mQCNAzah6qAAAAEEAKDdU91avq6pLyJmLKclo4bJ/NeqshHJmwAY13XGou+FROQV uQmQjlCeJPmjKN761IZcOrrfaCfOQwsckDkP1TcrWXyhmFNIGTcWoOx6GSWYxOtn UGtd4pkrTDAj0Vp1t01XWCQfcboFrnzGR3Y8T/rubVos9c9B1x67CDvkI1ZlAAUR tChSb2dlciBGZWFyaWNrIDxmZWFyaWNrQHBoeXNjaS51Y3QuYWMuemE+iQCVAwUQ NqHqoB67CDvkI1ZlAQHCKQP+M8DWYqK89l2DELWo4th7rvd90US0TLZ03QDecBFT XJpM4D4dsWHOb+nxjB3o4ku/VxbsHz5oRSYvBAmkgltPmcTexYwApOx9etQ6N6NT V+Co9+XL+XeRdfDHddG92lLv8u72kgbqmhn1nJDAnLdT6LxeE12KwEQMKA4aJcmE h/k= =1Bl7 -----END PGP PUBLIC KEY BLOCK----- ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/FAQ.pdf�������������������������������������������������������������������������������0000644�0004711�0000144�00000656315�11724204707�011257� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������%PDF-1.4 % 5 0 obj << /S /GoTo /D (section.0) >> endobj 8 0 obj (0 Meta -- Questions) endobj 9 0 obj << /S /GoTo /D (subsection.0.1) >> endobj 12 0 obj (0.1 Where do I get this document?) endobj 13 0 obj << /S /GoTo /D (subsection.0.2) >> endobj 16 0 obj (0.2 Where do I send comments about this document?) endobj 17 0 obj << /S /GoTo /D (section.1) >> endobj 20 0 obj (1 General Information) endobj 21 0 obj << /S /GoTo /D (subsection.1.1) >> endobj 24 0 obj (1.1 What is gnuplot?) endobj 25 0 obj << /S /GoTo /D (subsection.1.2) >> endobj 28 0 obj (1.2 How did it come about and why is it called gnuplot?) endobj 29 0 obj << /S /GoTo /D (subsection.1.3) >> endobj 32 0 obj (1.3 What does gnuplot offer?) endobj 33 0 obj << /S /GoTo /D (subsection.1.4) >> endobj 36 0 obj (1.4 Is gnuplot suitable for scripting?) endobj 37 0 obj << /S /GoTo /D (subsection.1.5) >> endobj 40 0 obj (1.5 Can I run gnuplot on my computer?) endobj 41 0 obj << /S /GoTo /D (subsection.1.6) >> endobj 44 0 obj (1.6 Legalities) endobj 45 0 obj << /S /GoTo /D (subsection.1.7) >> endobj 48 0 obj (1.7 Does gnuplot have anything to do with the FSF and the GNU project?) endobj 49 0 obj << /S /GoTo /D (subsection.1.8) >> endobj 52 0 obj (1.8 Where do I get further information?) endobj 53 0 obj << /S /GoTo /D (section.2) >> endobj 56 0 obj (2 Setting it up) endobj 57 0 obj << /S /GoTo /D (subsection.2.1) >> endobj 60 0 obj (2.1 What is the current version of gnuplot?) endobj 61 0 obj << /S /GoTo /D (subsection.2.2) >> endobj 64 0 obj (2.2 Where can I get gnuplot?) endobj 65 0 obj << /S /GoTo /D (subsection.2.3) >> endobj 68 0 obj (2.3 Where can I get current development version of gnuplot?) endobj 69 0 obj << /S /GoTo /D (subsection.2.4) >> endobj 72 0 obj (2.4 How do I get gnuplot to compile on my system?) endobj 73 0 obj << /S /GoTo /D (subsection.2.5) >> endobj 76 0 obj (2.5 What documentation is there, and how do I get it?) endobj 77 0 obj << /S /GoTo /D (subsection.2.6) >> endobj 80 0 obj (2.6 Worked examples) endobj 81 0 obj << /S /GoTo /D (subsection.2.7) >> endobj 84 0 obj (2.7 How do I modify gnuplot, and apply patches?) endobj 85 0 obj << /S /GoTo /D (subsection.2.8) >> endobj 88 0 obj (2.8 How do I determine which options are compiled into gnuplot?) endobj 89 0 obj << /S /GoTo /D (section.3) >> endobj 92 0 obj (3 Working with it.) endobj 93 0 obj << /S /GoTo /D (subsection.3.1) >> endobj 96 0 obj (3.1 How do I get help?) endobj 97 0 obj << /S /GoTo /D (subsection.3.2) >> endobj 100 0 obj (3.2 How do I print out my graphs?) endobj 101 0 obj << /S /GoTo /D (subsection.3.3) >> endobj 104 0 obj (3.3 How do I include my graphs in <word processor>?) endobj 105 0 obj << /S /GoTo /D (subsection.3.4) >> endobj 108 0 obj (3.4 How do I edit or post-process a gnuplot graph?) endobj 109 0 obj << /S /GoTo /D (subsection.3.5) >> endobj 112 0 obj (3.5 How do I change symbol size, line thickness and the like?) endobj 113 0 obj << /S /GoTo /D (subsection.3.6) >> endobj 116 0 obj (3.6 Can I animate my graphs?) endobj 117 0 obj << /S /GoTo /D (subsection.3.7) >> endobj 120 0 obj (3.7 How do I plot implicit defined graphs?) endobj 121 0 obj << /S /GoTo /D (subsection.3.8) >> endobj 124 0 obj (3.8 How to fill an area between two curves) endobj 125 0 obj << /S /GoTo /D (subsection.3.9) >> endobj 128 0 obj (3.9 Pm3d splot from a datafile does not draw anything) endobj 129 0 obj << /S /GoTo /D (subsection.3.10) >> endobj 132 0 obj (3.10 Drawing a \(color\) map, i.e. 2D projection of 3D data) endobj 133 0 obj << /S /GoTo /D (subsection.3.11) >> endobj 136 0 obj (3.11 How to overlay dots/points scatter plot onto a pm3d map/surface) endobj 137 0 obj << /S /GoTo /D (subsection.3.12) >> endobj 140 0 obj (3.12 How to draw black contour plot, and contours with labels) endobj 141 0 obj << /S /GoTo /D (subsection.3.13) >> endobj 144 0 obj (3.13 How to overlay contour plot over pm3d map/surface) endobj 145 0 obj << /S /GoTo /D (subsection.3.14) >> endobj 148 0 obj (3.14 Color facets with pm3d) endobj 149 0 obj << /S /GoTo /D (subsection.3.15) >> endobj 152 0 obj (3.15 Palette for printing my color map on color as well as black\046white printer?) endobj 153 0 obj << /S /GoTo /D (section.4) >> endobj 156 0 obj (4 Wanted features) endobj 157 0 obj << /S /GoTo /D (subsection.4.1) >> endobj 160 0 obj (4.1 What's new in gnuplot 4.2, 4.4 etc?) endobj 161 0 obj << /S /GoTo /D (subsection.4.2) >> endobj 164 0 obj (4.2 Does gnuplot support a driver for <graphics format>?) endobj 165 0 obj << /S /GoTo /D (subsection.4.3) >> endobj 168 0 obj (4.3 Does gnuplot have hidden line removal?) endobj 169 0 obj << /S /GoTo /D (subsection.4.4) >> endobj 172 0 obj (4.4 Does gnuplot support bar-charts/histograms/boxes?) endobj 173 0 obj << /S /GoTo /D (subsection.4.5) >> endobj 176 0 obj (4.5 Does gnuplot support pie charts?) endobj 177 0 obj << /S /GoTo /D (subsection.4.6) >> endobj 180 0 obj (4.6 Does gnuplot quarterly time charts?) endobj 181 0 obj << /S /GoTo /D (subsection.4.7) >> endobj 184 0 obj (4.7 Can I put multiple pages on one page?) endobj 185 0 obj << /S /GoTo /D (subsection.4.8) >> endobj 188 0 obj (4.8 Does gnuplot support multiple y-axes on a single plot?) endobj 189 0 obj << /S /GoTo /D (subsection.4.9) >> endobj 192 0 obj (4.9 Can I put both commands and data into a single file?) endobj 193 0 obj << /S /GoTo /D (subsection.4.10) >> endobj 196 0 obj (4.10 Can I put Greek letters and super/subscripts into my labels?) endobj 197 0 obj << /S /GoTo /D (subsection.4.11) >> endobj 200 0 obj (4.11 How do I include accented characters) endobj 201 0 obj << /S /GoTo /D (subsection.4.12) >> endobj 204 0 obj (4.12 Can I do 1:1 scaling of axes?) endobj 205 0 obj << /S /GoTo /D (subsection.4.13) >> endobj 208 0 obj (4.13 Can I put different text sizes into my plots?) endobj 209 0 obj << /S /GoTo /D (subsection.4.14) >> endobj 212 0 obj (4.14 How do I skip data points?) endobj 213 0 obj << /S /GoTo /D (subsection.4.15) >> endobj 216 0 obj (4.15 How do I plot every nth point?) endobj 217 0 obj << /S /GoTo /D (subsection.4.16) >> endobj 220 0 obj (4.16 How do I plot a vertical line?) endobj 221 0 obj << /S /GoTo /D (subsection.4.17) >> endobj 224 0 obj (4.17 How do I plot data files) endobj 225 0 obj << /S /GoTo /D (subsection.4.18) >> endobj 228 0 obj (4.18 How do I replot multiplot drawing) endobj 229 0 obj << /S /GoTo /D (section.5) >> endobj 232 0 obj (5 Miscellaneous) endobj 233 0 obj << /S /GoTo /D (subsection.5.1) >> endobj 236 0 obj (5.1 I've found a bug, what do I do?) endobj 237 0 obj << /S /GoTo /D (subsection.5.2) >> endobj 240 0 obj (5.2 Can I use gnuplot routines for my own programs?) endobj 241 0 obj << /S /GoTo /D (subsection.5.3) >> endobj 244 0 obj (5.3 What extensions have people made to gnuplot? Where can I get them?) endobj 245 0 obj << /S /GoTo /D (subsection.5.4) >> endobj 248 0 obj (5.4 I need an integration, fft, iir-filter,...!) endobj 249 0 obj << /S /GoTo /D (subsection.5.5) >> endobj 252 0 obj (5.5 Can I do heavy-duty data processing with gnuplot? or What is beyond gnuplot?) endobj 253 0 obj << /S /GoTo /D (subsection.5.6) >> endobj 256 0 obj (5.6 Mouse in my interactive terminal does not work) endobj 257 0 obj << /S /GoTo /D (subsection.5.7) >> endobj 260 0 obj (5.7 How to use hotkeys in my interactive terminals) endobj 261 0 obj << /S /GoTo /D (subsection.5.8) >> endobj 264 0 obj (5.8 I have ported gnuplot to another system, or patched it. What do I do?) endobj 265 0 obj << /S /GoTo /D (subsection.5.9) >> endobj 268 0 obj (5.9 I want to help in developing the next version of gnuplot. What can I do?) endobj 269 0 obj << /S /GoTo /D (subsection.5.10) >> endobj 272 0 obj (5.10 Open questions for inclusion into the FAQ?) endobj 273 0 obj << /S /GoTo /D (section.6) >> endobj 276 0 obj (6 Making life easier) endobj 277 0 obj << /S /GoTo /D (subsection.6.1) >> endobj 280 0 obj (6.1 How do I plot two functions in non-overlapping regions?) endobj 281 0 obj << /S /GoTo /D (subsection.6.2) >> endobj 284 0 obj (6.2 How do I run my data through a filter before plotting?) endobj 285 0 obj << /S /GoTo /D (subsection.6.3) >> endobj 288 0 obj (6.3 How do I make it easier to use gnuplot with LaTeX?) endobj 289 0 obj << /S /GoTo /D (subsection.6.4) >> endobj 292 0 obj (6.4 How do I save and restore my settings?) endobj 293 0 obj << /S /GoTo /D (subsection.6.5) >> endobj 296 0 obj (6.5 How do I plot lines \(not grids\) using splot?) endobj 297 0 obj << /S /GoTo /D (subsection.6.6) >> endobj 300 0 obj (6.6 How do I plot a function f\(x,y\) that is bounded by other functions in the x-y plane?) endobj 301 0 obj << /S /GoTo /D (subsection.6.7) >> endobj 304 0 obj (6.7 How do I turn off <feature> in a plot?) endobj 305 0 obj << /S /GoTo /D (subsection.6.8) >> endobj 308 0 obj (6.8 How do I call gnuplot from my own programs?) endobj 309 0 obj << /S /GoTo /D (subsection.6.9) >> endobj 312 0 obj (6.9 What if I need h-bar \(Planck's constant\)?) endobj 313 0 obj << /S /GoTo /D (subsection.6.10) >> endobj 316 0 obj (6.10 What if I need the Solar mass symbol?) endobj 317 0 obj << /S /GoTo /D (subsection.6.11) >> endobj 320 0 obj (6.11 How do I produce blank output page?) endobj 321 0 obj << /S /GoTo /D (subsection.6.12) >> endobj 324 0 obj (6.12 How do I produce graph of an exact border size?) endobj 325 0 obj << /S /GoTo /D (section.7) >> endobj 328 0 obj (7 Common problems) endobj 329 0 obj << /S /GoTo /D (subsection.7.1) >> endobj 332 0 obj (7.1 Help! None of my fonts work.) endobj 333 0 obj << /S /GoTo /D (subsection.7.2) >> endobj 336 0 obj (7.2 Gnuplot is not plotting any points under X11! How come?) endobj 337 0 obj << /S /GoTo /D (subsection.7.3) >> endobj 340 0 obj (7.3 Why does gnuplot ignore my very small numbers?) endobj 341 0 obj << /S /GoTo /D (subsection.7.4) >> endobj 344 0 obj (7.4 Gnuplot is not plotting on the screen when run from command line via 'gnuplot filename.gp') endobj 345 0 obj << /S /GoTo /D (subsection.7.5) >> endobj 348 0 obj (7.5 My formulas \(like 1/3\) are giving me nonsense results! What's going on?) endobj 349 0 obj << /S /GoTo /D (subsection.7.6) >> endobj 352 0 obj (7.6 My output files are incomplete!) endobj 353 0 obj << /S /GoTo /D (subsection.7.7) >> endobj 356 0 obj (7.7 When using the LaTeX--terminal, there is an error during the LaTeX--run!) endobj 357 0 obj << /S /GoTo /D (subsection.7.8) >> endobj 360 0 obj (7.8 Calling gnuplot in a pipe or with a gnuplot-script doesn't produce a plot!) endobj 361 0 obj << /S /GoTo /D (section.8) >> endobj 364 0 obj (8 Credits) endobj 365 0 obj << /S /GoTo /D [366 0 R /Fit ] >> endobj 406 0 obj << /Length 1862 /Filter /FlateDecode >> stream xZMs6WH3L|`N7;M'iɡ遦 5ErH* �"i[rƲs"%xv?>9z`Fat6s|$&I{!3_N0|v3C`=xJ8;TE`n:].yY*/&:@9Œs3J~`>VEgyC}"}UP$ +Uڏ<Dq òX_{00A#GS)87wR[{_ _dSQ=]}-'S1aΞ1FD4|fΆE1y1 s:葇oܣ Ւ_6f2C%Fp8Kcf hRQ1$Ho2|kUfj~kPcFLQ=寇~ <BQO\UL]1ӟr{}`ApOa_m=DnT̜ErYYbK)YMoƥ [~RU8t)+'V@>K,H7?;PZyI>k^ekI\5z:oZ/&||;$iA ]m[F�0}HxAqY}B0:{.�(~Է11˭qd@>?_% 5)(*⼊s0a}uVb�A/qkaU:*_؇//M|%cO GW+saW1Dc$X[n+> B'}.Ais+oma\ۅw/;齹oVƜ 6wD.ri*`6[-&}x[SUɸU>T +2\ l,ZEu0@ q@>a($J8PDօ<:V{�P7`!nө|Z0ٵ 2})$Yu,,b" B,r]/EX3%Z-2cWthyYVj hk# mRL; 67Ȧ~ -ȇ i~(ؕE<bsUw�? ,_ 6{ .<Oa-T)L 4>B.w|^ƩꭞeY[15IRךL!%5[A.B2')�nSO_4Z}SrrڨWJ-56m"vʮi; q^{XW�iFjt۵NY1k:*ˬN@I &V3WuԂ``!`Io\[@YKV Z.Hڅ�wsjYfd_'&]V./ҍzݺ$6j$_+u0a|',|[{wPfQtikvV>#"U$iNڝBgZ+eLi:8=SR'3pYR˫rÿy-]BqcZ$RwϬ5Վpw`e7>lێhFYpmt s)b�@VmMH7OuM RilK4 /(fXUV6R zް>*W\;w)[kv$.\ ]@v1쀲[q&nY@_>4ݗ1=lcodk1c:ذmVaPg{ޝ @dhơ$U5|R|"v/cIע['#hJmFKO~:}9 endstream endobj 366 0 obj << /Type /Page /Contents 406 0 R /Resources 405 0 R /MediaBox [0 0 595.276 841.89] /Parent 413 0 R /Annots [ 367 0 R 368 0 R 369 0 R 370 0 R 371 0 R 372 0 R 373 0 R 374 0 R 375 0 R 376 0 R 377 0 R 378 0 R 379 0 R 380 0 R 381 0 R 382 0 R 383 0 R 384 0 R 385 0 R 386 0 R 387 0 R 388 0 R 389 0 R 390 0 R 391 0 R 392 0 R 393 0 R 394 0 R 395 0 R 396 0 R 397 0 R 398 0 R 399 0 R 400 0 R 401 0 R 402 0 R 403 0 R ] >> endobj 367 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [55.697 581.924 155.259 593.331] /A << /S /GoTo /D (section.0) >> >> endobj 368 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 567.912 233.357 579.662] /A << /S /GoTo /D (subsection.0.1) >> >> endobj 369 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 556.615 314.563 566.113] /A << /S /GoTo /D (subsection.0.2) >> >> endobj 370 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [55.697 532.135 171.044 541.775] /A << /S /GoTo /D (section.1) >> >> endobj 371 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 516.502 176.117 528.226] /A << /S /GoTo /D (subsection.1.1) >> >> endobj 372 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 502.806 329.716 514.676] /A << /S /GoTo /D (subsection.1.2) >> >> endobj 373 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 489.404 212.488 501.127] /A << /S /GoTo /D (subsection.1.3) >> >> endobj 374 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 475.707 243.382 487.578] /A << /S /GoTo /D (subsection.1.4) >> >> endobj 375 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 462.158 257.924 474.029] /A << /S /GoTo /D (subsection.1.5) >> >> endobj 376 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 448.609 141.95 460.359] /A << /S /GoTo /D (subsection.1.6) >> >> endobj 377 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 435.06 406.461 446.93] /A << /S /GoTo /D (subsection.1.7) >> >> endobj 378 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 421.511 255.764 433.261] /A << /S /GoTo /D (subsection.1.8) >> >> endobj 379 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [55.697 397.2 131.03 408.923] /A << /S /GoTo /D (section.2) >> >> endobj 380 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 383.65 272.291 395.374] /A << /S /GoTo /D (subsection.2.1) >> >> endobj 381 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 369.954 211.844 381.824] /A << /S /GoTo /D (subsection.2.2) >> >> endobj 382 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 356.405 350.607 368.275] /A << /S /GoTo /D (subsection.2.3) >> >> endobj 383 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 342.856 311.901 354.726] /A << /S /GoTo /D (subsection.2.4) >> >> endobj 384 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 329.306 317.018 341.057] /A << /S /GoTo /D (subsection.2.5) >> >> endobj 385 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 315.757 177.067 327.508] /A << /S /GoTo /D (subsection.2.6) >> >> endobj 386 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 302.208 301.276 314.078] /A << /S /GoTo /D (subsection.2.7) >> >> endobj 387 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 288.659 373.09 300.529] /A << /S /GoTo /D (subsection.2.8) >> >> endobj 388 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [55.697 264.348 150.514 276.071] /A << /S /GoTo /D (section.3) >> >> endobj 389 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 250.651 182.488 262.402] /A << /S /GoTo /D (subsection.3.1) >> >> endobj 390 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 237.102 233.401 248.853] /A << /S /GoTo /D (subsection.3.2) >> >> endobj 391 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 223.553 321.327 235.303] /A << /S /GoTo /D (subsection.3.3) >> >> endobj 392 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 210.004 306.72 221.874] /A << /S /GoTo /D (subsection.3.4) >> >> endobj 393 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 196.454 351.752 208.205] /A << /S /GoTo /D (subsection.3.5) >> >> endobj 394 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 182.905 213.666 194.656] /A << /S /GoTo /D (subsection.3.6) >> >> endobj 395 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 169.356 267.949 181.107] /A << /S /GoTo /D (subsection.3.7) >> >> endobj 396 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 157.929 269.16 167.557] /A << /S /GoTo /D (subsection.3.8) >> >> endobj 397 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 142.258 319.407 154.008] /A << /S /GoTo /D (subsection.3.9) >> >> endobj 398 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 128.708 329.88 140.459] /A << /S /GoTo /D (subsection.3.10) >> >> endobj 399 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 115.159 381.13 126.91] /A << /S /GoTo /D (subsection.3.11) >> >> endobj 400 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 101.61 349.581 113.361] /A << /S /GoTo /D (subsection.3.12) >> >> endobj 401 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 88.061 327.458 99.811] /A << /S /GoTo /D (subsection.3.13) >> >> endobj 402 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 74.512 201.753 86.262] /A << /S /GoTo /D (subsection.3.14) >> >> endobj 403 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 60.963 424.383 72.713] /A << /S /GoTo /D (subsection.3.15) >> >> endobj 407 0 obj << /D [366 0 R /XYZ 55.693 823.059 null] >> endobj 408 0 obj << /D [366 0 R /XYZ 56.693 785.197 null] >> endobj 412 0 obj << /D [366 0 R /XYZ 56.693 598.196 null] >> endobj 405 0 obj << /Font << /F61 409 0 R /F62 410 0 R /F65 411 0 R >> /ProcSet [ /PDF /Text ] >> endobj 467 0 obj << /Length 2386 /Filter /FlateDecode >> stream x[[۸~ϯpb1G(,-۽h[th@˴-nK&xNgc>-wE~q318gaz=/ <zD7^7ҹ (y{%0 0-=�TwnW W.X`~?ęC3nHz>Q{\k`} /%,\ef[$> 1ē8^X5E?2V{q( rsmɋ]U|o ^JA?;@Qõk$R裂'L\>Wj3юuu:TNUݡJ}xh_"6p*Btdk#ertg zh@1M`V0,${:�300b 7+8-}0"-y/o!3瘹띱<My6#xͭή(}<(RF·LÓԏ7F;Z1PmUqQWcR;I0z@ Oy/Z,Ja"*6HCZ94M' 4[6NCBO y~C]֍(%\ Ou[֩yQި"h)hBtJk |VRaȗXbk%k8kce Os ZU_ ~Rt@^rE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R 440 0 R 441 0 R 442 0 R 443 0 R 444 0 R 445 0 R 446 0 R 447 0 R 448 0 R 449 0 R 450 0 R 451 0 R 452 0 R 453 0 R 454 0 R 455 0 R 456 0 R 457 0 R 458 0 R 459 0 R 460 0 R 461 0 R 462 0 R 463 0 R ] >> endobj 404 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [55.697 773.111 150.405 782.751] /A << /S /GoTo /D (section.4) >> >> endobj 414 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 757.478 256.135 769.201] /A << /S /GoTo /D (subsection.4.1) >> >> endobj 415 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 743.782 335.519 755.652] /A << /S /GoTo /D (subsection.4.2) >> >> endobj 416 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 730.38 277.397 742.103] /A << /S /GoTo /D (subsection.4.3) >> >> endobj 417 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 716.683 325.712 728.554] /A << /S /GoTo /D (subsection.4.4) >> >> endobj 418 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 703.134 245.193 715.005] /A << /S /GoTo /D (subsection.4.5) >> >> endobj 419 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 689.585 257.912 701.455] /A << /S /GoTo /D (subsection.4.6) >> >> endobj 420 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 676.036 266.695 687.786] /A << /S /GoTo /D (subsection.4.7) >> >> endobj 421 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 662.486 340.188 674.357] /A << /S /GoTo /D (subsection.4.8) >> >> endobj 422 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 648.937 328.821 660.688] /A << /S /GoTo /D (subsection.4.9) >> >> endobj 423 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 635.388 359.409 647.139] /A << /S /GoTo /D (subsection.4.10) >> >> endobj 424 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 624.092 262.746 633.589] /A << /S /GoTo /D (subsection.4.11) >> >> endobj 425 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 608.29 225.622 620.04] /A << /S /GoTo /D (subsection.4.12) >> >> endobj 426 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 594.74 287.781 606.491] /A << /S /GoTo /D (subsection.4.13) >> >> endobj 427 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 581.191 216.132 592.942] /A << /S /GoTo /D (subsection.4.14) >> >> endobj 428 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 567.642 232.964 579.393] /A << /S /GoTo /D (subsection.4.15) >> >> endobj 429 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 554.093 226.56 565.843] /A << /S /GoTo /D (subsection.4.16) >> >> endobj 430 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 540.544 201.59 552.294] /A << /S /GoTo /D (subsection.4.17) >> >> endobj 431 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 526.994 249.306 538.745] /A << /S /GoTo /D (subsection.4.18) >> >> endobj 432 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [55.697 504.767 139.506 514.407] /A << /S /GoTo /D (section.5) >> >> endobj 433 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 488.987 235.758 500.737] /A << /S /GoTo /D (subsection.5.1) >> >> endobj 434 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 475.438 318.851 487.308] /A << /S /GoTo /D (subsection.5.2) >> >> endobj 435 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 461.889 409.188 473.759] /A << /S /GoTo /D (subsection.5.3) >> >> endobj 436 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 448.339 257.716 460.09] /A << /S /GoTo /D (subsection.5.4) >> >> endobj 437 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 434.79 450.904 446.661] /A << /S /GoTo /D (subsection.5.5) >> >> endobj 438 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 421.241 308.574 432.991] /A << /S /GoTo /D (subsection.5.6) >> >> endobj 439 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 407.692 304.505 419.442] /A << /S /GoTo /D (subsection.5.7) >> >> endobj 440 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 394.143 402.708 406.013] /A << /S /GoTo /D (subsection.5.8) >> >> endobj 441 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 380.593 416.159 392.464] /A << /S /GoTo /D (subsection.5.9) >> >> endobj 442 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 367.044 288.633 378.795] /A << /S /GoTo /D (subsection.5.10) >> >> endobj 443 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [55.697 342.733 157.681 354.456] /A << /S /GoTo /D (section.6) >> >> endobj 444 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 329.037 347.334 340.787] /A << /S /GoTo /D (subsection.6.1) >> >> endobj 445 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 315.487 334.592 327.238] /A << /S /GoTo /D (subsection.6.2) >> >> endobj 446 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 301.845 324.837 313.809] /A << /S /GoTo /D (subsection.6.3) >> >> endobj 447 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 288.389 270.273 300.14] /A << /S /GoTo /D (subsection.6.4) >> >> endobj 448 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 274.84 286.745 286.59] /A << /S /GoTo /D (subsection.6.5) >> >> endobj 449 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 261.291 460.94 273.041] /A << /S /GoTo /D (subsection.6.6) >> >> endobj 450 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 247.742 264.197 259.492] /A << /S /GoTo /D (subsection.6.7) >> >> endobj 451 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 234.192 307.669 246.063] /A << /S /GoTo /D (subsection.6.8) >> >> endobj 452 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 221.052 278.487 232.394] /A << /S /GoTo /D (subsection.6.9) >> >> endobj 453 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 207.094 267.905 218.844] /A << /S /GoTo /D (subsection.6.10) >> >> endobj 454 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 193.545 263.684 205.295] /A << /S /GoTo /D (subsection.6.11) >> >> endobj 455 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 179.996 311.662 191.746] /A << /S /GoTo /D (subsection.6.12) >> >> endobj 456 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [55.697 155.684 163.245 167.408] /A << /S /GoTo /D (section.7) >> >> endobj 457 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 141.988 231.786 153.739] /A << /S /GoTo /D (subsection.7.1) >> >> endobj 458 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 128.439 357.239 140.309] /A << /S /GoTo /D (subsection.7.2) >> >> endobj 459 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 114.89 322.243 126.76] /A << /S /GoTo /D (subsection.7.3) >> >> endobj 460 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 101.34 535.886 113.211] /A << /S /GoTo /D (subsection.7.4) >> >> endobj 461 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 87.791 419.071 99.542] /A << /S /GoTo /D (subsection.7.5) >> >> endobj 462 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 74.242 236.706 85.993] /A << /S /GoTo /D (subsection.7.6) >> >> endobj 463 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 60.6 409.762 72.443] /A << /S /GoTo /D (subsection.7.7) >> >> endobj 468 0 obj << /D [466 0 R /XYZ 55.693 823.059 null] >> endobj 465 0 obj << /Font << /F61 409 0 R /F62 410 0 R /F65 411 0 R >> /ProcSet [ /PDF /Text ] >> endobj 478 0 obj << /Length 2603 /Filter /FlateDecode >> stream xڭ˶۶q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(PR}5|A fhPtM NԎg$ؑ6jqF4y<d^}_q.> >Ϻ4KC [̈́2K]ۛH䋯vnu[Y~?7=xP7z |gMF[(c=ު�XÚ.& A,ݓ44s%O‚8OIQ5@۷ > Ϛ](e"(ӹwF(v}alJc]7Ym5T|u.pZ?i?2,5=ܷ 7dJ&4hb;r\BIփg~ endstream endobj 477 0 obj << /Type /Page /Contents 478 0 R /Resources 476 0 R /MediaBox [0 0 595.276 841.89] /Parent 413 0 R /Annots [ 464 0 R 469 0 R 470 0 R 471 0 R 472 0 R 473 0 R 480 0 R 481 0 R 474 0 R 475 0 R 482 0 R 483 0 R ] >> endobj 464 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [72.06 770.88 421.362 782.751] /A << /S /GoTo /D (subsection.7.8) >> >> endobj 469 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [55.697 748.653 108.394 758.292] /A << /S /GoTo /D (section.8) >> >> endobj 470 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [290.076 665.838 429.523 676.906] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.gnuplot.info/faq/)>> >> endobj 471 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [290.076 665.838 429.523 676.906] /Subtype/Link/A<</Type/Action/S/URI/URI(www.gnuplot.info/faq/)>> >> endobj 472 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [360.296 614.341 539.579 626.091] /Subtype/Link/A<</Type/Action/S/URI/URI(mailto://gnuplot-beta@lists.sourceforge.net)>> >> endobj 473 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [360.296 614.341 539.579 626.091] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot-beta@lists.sourceforge.net)>> >> endobj 480 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 600.792 77.326 612.542] /Subtype/Link/A<</Type/Action/S/URI/URI(mailto://gnuplot-beta@lists.sourceforge.net)>> >> endobj 481 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 600.792 77.326 612.542] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot-beta@lists.sourceforge.net)>> >> endobj 474 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [459.041 600.792 539.579 612.542] /Subtype/Link/A<</Type/Action/S/URI/URI(http://gnuplot.cvs.sourceforge.net/viewvc/gnuplot/faq/)>> >> endobj 475 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [459.041 600.792 539.579 612.542] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot.cvs.sourceforge.net/viewvc/gnuplot/faq/)>> >> endobj 482 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 587.924 286.78 598.573] /Subtype/Link/A<</Type/Action/S/URI/URI(http://gnuplot.cvs.sourceforge.net/viewvc/gnuplot/faq/)>> >> endobj 483 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 587.924 286.78 598.573] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot.cvs.sourceforge.net/viewvc/gnuplot/faq/)>> >> endobj 479 0 obj << /D [477 0 R /XYZ 55.693 823.059 null] >> endobj 6 0 obj << /D [477 0 R /XYZ 56.693 732.467 null] >> endobj 10 0 obj << /D [477 0 R /XYZ 56.693 700.878 null] >> endobj 14 0 obj << /D [477 0 R /XYZ 56.693 650.879 null] >> endobj 18 0 obj << /D [477 0 R /XYZ 56.693 571.739 null] >> endobj 22 0 obj << /D [477 0 R /XYZ 56.693 544.023 null] >> endobj 26 0 obj << /D [477 0 R /XYZ 56.693 463.92 null] >> endobj 30 0 obj << /D [477 0 R /XYZ 56.693 182.868 null] >> endobj 476 0 obj << /Font << /F62 410 0 R /F61 409 0 R /F65 411 0 R /F70 484 0 R >> /ProcSet [ /PDF /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=LZi ?W2Sud`&& |'GtN5 ˽2AQ^8^}xfB>t{? =I.כ g~x _3>X�37Oȃt=_@Lc8QYxoC) KM<+ {4.Mƞ+6艢Gr.Eȅ߲w#l5ݸP\\Z6 ׼luDnA%A*It+1^ w'c{@pz]4ol~xV5P[3iFQK%!o}zUJ|#0ex{fUB"{5B5l+j�1TtA]D Df<Pnl7˄as9^`0\)t2,5T˧G<dW0B'ь344gHpˇG $ endstream endobj 494 0 obj << /Type /Page /Contents 495 0 R /Resources 493 0 R /MediaBox [0 0 595.276 841.89] /Parent 413 0 R /Annots [ 485 0 R 486 0 R 487 0 R 488 0 R 497 0 R 498 0 R ] >> endobj 485 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [195.07 202.384 301.789 214.134] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.gnuplot.info)>> >> endobj 486 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [195.07 202.384 301.789 214.134] /Subtype/Link/A<</Type/Action/S/URI/URI(www.gnuplot.info)>> >> endobj 487 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [437.145 188.835 539.579 200.585] /Subtype/Link/A<</Type/Action/S/URI/URI(http://gnuplot.sourceforge.net/help.html)>> >> endobj 488 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [437.145 188.835 539.579 200.585] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot.sourceforge.net/help.html)>> >> endobj 497 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 175.285 142.78 187.036] /Subtype/Link/A<</Type/Action/S/URI/URI(http://gnuplot.sourceforge.net/help.html)>> >> endobj 498 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 175.285 142.78 187.036] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot.sourceforge.net/help.html)>> >> endobj 496 0 obj << /D [494 0 R /XYZ 55.693 823.059 null] >> endobj 34 0 obj << /D [494 0 R /XYZ 56.693 710.891 null] >> endobj 38 0 obj << /D [494 0 R /XYZ 56.693 619.428 null] >> endobj 42 0 obj << /D [494 0 R /XYZ 56.693 501.276 null] >> endobj 46 0 obj << /D [494 0 R /XYZ 56.693 343.252 null] >> endobj 50 0 obj << /D [494 0 R /XYZ 56.693 238.241 null] >> endobj 54 0 obj << /D [494 0 R /XYZ 56.693 159.1 null] >> endobj 58 0 obj << /D [494 0 R /XYZ 56.693 129.326 null] >> endobj 493 0 obj << /Font << /F70 484 0 R /F62 410 0 R /F61 409 0 R /F65 411 0 R >> /ProcSet [ /PDF /Text ] >> endobj 507 0 obj << /Length 2670 /Filter /FlateDecode >> stream xڭYԸ_Ef-/K\AbrI|z<3f=>gl,KrKuN_F4 $D'q R<oh~(+z<iۢA=4p<=z'x'+ o~@/vH,HEӨ'{MϮZ^-;SXDI� keѮ'b h{>k<OkZp:.h5a.ʾXyΫa][ėB'+?JFܴcli釋;yHZKܪ޶Svi,PYAt櫍nONY.YJ/* 4LI*8rE %c.-/[ }i;>xO]) O,p!?/uK{3z}Ye<WghTvv'Bʃ_aC $w]*Z⦆S?iM5p;[sG^I Z  Ru+]9ZW7쏦ڮh৷X9.x > ]Uq<On-}[HUYxfW#q|j<ComhK+D.ݓ CzY[hnaR-!҅ad d@[L]lM3YUwnM43kՉk+vEo֏cBoYތq`,so*zf߆΋zuGoUye陁c18"pi}պC%f&[QeL% o*A\3wÂV. Xc4.YAY3>)FD&dۄJ D)W)�Pj~h?h-śud7Y]9/Yx9z�@IX@Ʒ j8u)C[ ы~vGT ~. X8㠍qIo\e $7mdۯT k1 F[dN8lhV^#vOVEG:qa )EfhC!+rRg ]1|)' )"Ђt&XhR O==Ỷ+兣<!"}vsOF=_01#掝{`zo0ql7og秒~]ͩ ZzopvWfR_ n$`:ִd(,NP;&wv;=TkZꑜA ТJE}S<'NZy7=3nfB;F:=oͣf&t}|Z'o.Tl�@Ll!Z Ԟ-}g$DIo_<{/\B�cOԜ*X&+`#8x捋 E'3;IT X1fJ%Tʆcw ~Xm v-~a:g Cs\`ˆe[$Ja!yS~޾8]yBo,OcبhfCAMD$)e}Po0HZ`N+ϮG Q&s)&Fn牃F*̏y"sJJvw4"~GV@=1I n$c9S  \\ E˩ݚױmPAxtG̈́8XmJjWaRj�ȆeYnyƦPE�'9{7uS4j PchM7rHYr;AijR?QP,ߕu.ׄ3Ss̛3xl 2[O3@4)*PRȏ`z H-3QE^9S$'uceIUe mT@3;#(;@oO/ J4zFթ~&o086àjZ dM-3w9�BeTZWDk蕒YdOY<NM1m{PҔ[FSEd+�tvYjeaKVe}ٿGG=?;g\Unf2@aL0(w[6y8t QΊ7H+;R% &NATiA m$KV{TaTFT[!) %Lc@ t'~#ؔ�p[779qpf(]ǭ=IOFܸYqhTA.cp2]Vo~KD"G�oN GjJ�’Jnիx^ߒ0V8GJ|ⷼ<{*{-y~9wC*Yhak8˃⣐:Av1[ 伪}lbhmm=+LAV %&wP=9 ?M]=dM(|,vClwk zW;loѨN%|4cx�ij6[ ѷ3`cG 2j�}YK#mގQ>*b1"Jg,|am-``z-f4YNB5hG$aB!<zq endstream endobj 506 0 obj << /Type /Page /Contents 507 0 R /Resources 505 0 R /MediaBox [0 0 595.276 841.89] /Parent 413 0 R /Annots [ 489 0 R 490 0 R 491 0 R 492 0 R 499 0 R 500 0 R 501 0 R 502 0 R 509 0 R 510 0 R 503 0 R 504 0 R 511 0 R 512 0 R ] >> endobj 489 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [163.38 749.967 270.099 761.718] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.gnuplot.info)>> >> endobj 490 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [163.38 749.967 270.099 761.718] /Subtype/Link/A<</Type/Action/S/URI/URI(www.gnuplot.info)>> >> endobj 491 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [253.051 736.418 464.498 748.168] /Subtype/Link/A<</Type/Action/S/URI/URI(http://sourceforge.net/projects/gnuplot)>> >> endobj 492 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [253.051 736.418 464.498 748.168] /Subtype/Link/A<</Type/Action/S/URI/URI(sourceforge.net/projects/gnuplot)>> >> endobj 499 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [73.576 710.001 285.023 721.07] /Subtype/Link/A<</Type/Action/S/URI/URI(http://sourceforge.net/projects/gnuplot)>> >> endobj 500 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [73.576 710.001 285.023 721.07] /Subtype/Link/A<</Type/Action/S/URI/URI(sourceforge.net/projects/gnuplot)>> >> endobj 501 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [479.183 658.67 539.579 670.42] /Subtype/Link/A<</Type/Action/S/URI/URI(http://sourceforge.net/projects/gnuplot)>> >> endobj 502 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [479.183 658.67 539.579 670.42] /Subtype/Link/A<</Type/Action/S/URI/URI(sourceforge.net/projects/gnuplot)>> >> endobj 509 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 645.121 188.598 656.871] /Subtype/Link/A<</Type/Action/S/URI/URI(http://sourceforge.net/projects/gnuplot)>> >> endobj 510 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 645.121 188.598 656.871] /Subtype/Link/A<</Type/Action/S/URI/URI(sourceforge.net/projects/gnuplot)>> >> endobj 503 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [412.725 436.472 539.579 448.222] /Subtype/Link/A<</Type/Action/S/URI/URI(mailto://gnuplot-beta@lists.sourceforge.net)>> >> endobj 504 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [412.725 436.472 539.579 448.222] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot-beta@lists.sourceforge.net)>> >> endobj 511 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 423.604 155.871 434.253] /Subtype/Link/A<</Type/Action/S/URI/URI(mailto://gnuplot-beta@lists.sourceforge.net)>> >> endobj 512 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 423.604 155.871 434.253] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot-beta@lists.sourceforge.net)>> >> endobj 508 0 obj << /D [506 0 R /XYZ 55.693 823.059 null] >> endobj 62 0 obj << /D [506 0 R /XYZ 56.693 785.197 null] >> endobj 66 0 obj << /D [506 0 R /XYZ 56.693 695.208 null] >> endobj 70 0 obj << /D [506 0 R /XYZ 56.693 408.812 null] >> endobj 74 0 obj << /D [506 0 R /XYZ 56.693 171.598 null] >> endobj 505 0 obj << /Font << /F61 409 0 R /F62 410 0 R /F65 411 0 R /F70 484 0 R >> /ProcSet [ /PDF /Text ] >> endobj 529 0 obj << /Length 2882 /Filter /FlateDecode >> stream xڝYY6~ϯaԉlA 1 `XhZaԢ[*=K7Eb_׉"x(GUBꦸ$u,4*e{ឆ>VMp>ix4- n EGW{)(_ٕH(?MNX}J!CF"CT&/MS+;ZIʪgʡ-˺󪚿thpwAi"y;+Y[q Dd_n5A]&2L(0yB,r% {uKbeUܻf RQKJ3Շ޴rn*S/ . R;W[ERx[{E"ˤ88nn$t(V*v`/eGpā$CYUw FPrdTMezS*..n{'!҇0s^J;̋n[Y˷~+ 8CSd*^K]5dV.Sr>GeVzo(kGZFANZԺ^'H WA (HXY$R)bmD RnArҟsSMSa#xKvԢ.Tj!UbHx<X#WMdF]ߖyVP~<u΀2wNZ(TK8lky66oYzۊϔeE볹 Qi& eD:aUdPexCgSG33ޫi*h�B5+;0�{`MYKx%-T$$X$i1 1ki,xq-OqajY*?4Dh>zݞ:-[((-Ώ m{Fޛ#owA]E碆ԑ]*ֱ=͏jl_߿zϯaۍn\|*~K� H*4鏮 R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 R 525 0 R 526 0 R ] >> endobj 513 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [266.987 704.728 543.888 716.479] /Subtype/Link/A<</Type/Action/S/URI/URI(http://gnuplot.sourceforge.net/documentation.html)>> >> endobj 514 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [266.987 704.728 543.888 716.479] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot.sourceforge.net/documentation.html)>> >> endobj 515 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [149.318 640.364 341.128 652.114] /Subtype/Link/A<</Type/Action/S/URI/URI(http://gnuplot.sourceforge.net/demo/)>> >> endobj 516 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [149.318 640.364 341.128 652.114] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot.sourceforge.net/demo/)>> >> endobj 517 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [482.636 521.803 539.579 533.553] /Subtype/Link/A<</Type/Action/S/URI/URI(http://sourceforge.net/tracker/?group_id=2055&atid=302055)>> >> endobj 518 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [482.636 521.803 539.579 533.553] /Subtype/Link/A<</Type/Action/S/URI/URI(sourceforge.net/tracker/?group_id=2055&atid=302055)>> >> endobj 531 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 508.935 306.416 519.584] /Subtype/Link/A<</Type/Action/S/URI/URI(http://sourceforge.net/tracker/?group_id=2055&atid=302055)>> >> endobj 532 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 508.935 306.416 519.584] /Subtype/Link/A<</Type/Action/S/URI/URI(sourceforge.net/tracker/?group_id=2055&atid=302055)>> >> endobj 519 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [179.222 242.275 351.396 254.025] /Subtype/Link/A<</Type/Action/S/URI/URI(news://comp.graphics.apps.gnuplot)>> >> endobj 520 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [179.222 242.275 351.396 254.025] /Subtype/Link/A<</Type/Action/S/URI/URI(comp.graphics.apps.gnuplot)>> >> endobj 521 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 228.725 280.732 240.476] /Subtype/Link/A<</Type/Action/S/URI/URI(mailto://gnuplot-info@lists.sourceforge.net)>> >> endobj 522 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 228.725 280.732 240.476] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot-info@lists.sourceforge.net)>> >> endobj 523 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [242.543 188.078 539.579 199.828] /Subtype/Link/A<</Type/Action/S/URI/URI(http://lists.sourceforge.net/lists/listinfo/gnuplot-info)>> >> endobj 524 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [242.543 188.078 539.579 199.828] /Subtype/Link/A<</Type/Action/S/URI/URI(lists.sourceforge.net/lists/listinfo/gnuplot-info)>> >> endobj 533 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 174.529 83.871 186.279] /Subtype/Link/A<</Type/Action/S/URI/URI(http://lists.sourceforge.net/lists/listinfo/gnuplot-info)>> >> endobj 534 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 174.529 83.871 186.279] /Subtype/Link/A<</Type/Action/S/URI/URI(lists.sourceforge.net/lists/listinfo/gnuplot-info)>> >> endobj 525 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [317.942 174.529 490.116 186.279] /Subtype/Link/A<</Type/Action/S/URI/URI(news://comp.graphics.apps.gnuplot)>> >> endobj 526 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [317.942 174.529 490.116 186.279] /Subtype/Link/A<</Type/Action/S/URI/URI(comp.graphics.apps.gnuplot)>> >> endobj 530 0 obj << /D [528 0 R /XYZ 55.693 823.059 null] >> endobj 78 0 obj << /D [528 0 R /XYZ 56.693 689.77 null] >> endobj 82 0 obj << /D [528 0 R /XYZ 56.693 625.406 null] >> endobj 86 0 obj << /D [528 0 R /XYZ 56.693 493.977 null] >> endobj 90 0 obj << /D [528 0 R /XYZ 56.693 402.881 null] >> endobj 94 0 obj << /D [528 0 R /XYZ 56.693 372.425 null] >> endobj 98 0 obj << /D [528 0 R /XYZ 56.693 146.021 null] >> endobj 527 0 obj << /Font << /F70 484 0 R /F62 410 0 R /F65 411 0 R /F61 409 0 R >> /ProcSet [ /PDF /Text ] >> endobj 537 0 obj << /Length 2838 /Filter /FlateDecode >> stream xڭْ6_1>h )2JNlgkWyJ$)Ba/);�zz8R^Ej @'W7w] 0_ľ?Cw=u^G-^W (LhFH4:eVi[7ʏhΉY^t"䶬ymV "+7:sT}e2~mTy{\Ӷͱ!;2$0xXecm6k/V"Ls7yhom54z}ß߅=֝y<Vy)ܽ~y! DƸM1es`+Gkjo[;vo--Aڗٲxu#2 |eUE]{m8ӻ\:/ $Ðb/"<8 @foH 0d N4WiwnYtm%dmN8 =<112Eg[qp8Zk{8?hG|Nco TׂSADHb/h|I m]p? ڊC')c|IG%K6Nyi~48?涭і fT<fq$^�~{#6,[|a#q"%�MմG G<4΃#fEc |pqpthA˻S=%0s:fwSYɀq,qbʎ{1yC?tLڒ4s5#U(k[ƢՠT%A0Gcmʪyň7N D0iq⩤ut84(xBDA|( (LXC0倉ihOLe#G.ڍwˑkn+aX1M]/E)<jlEq7#j",YqLWS�&`i?)kΉ nk܀'*h!UI1!(BBT\*ϋ){QG}Y(a3V IJX3�T&ɼ1 h sCINQ4`췹RuCG2(אEP}*ǝ~K K}Fa跲_x^]m镂I'!S ,c&B/ 4kr q^hF6d⴬= /:&Kp(vN*!tH #,Ggdy!,pQ(S8wMz?}Ce'2ikAPJf+'J@t4H#K} �׃(ҡpԉ1i9JW5%{z1^p�'74WBrgJSV٥@pbOT}?E.$aiG[^ry2 C _(ͨեpݸ䤕mX#Vdu]&$�ZASwKi*#C9 j'o%$e<o<1uQ?,`'a w@Lfg8 2 ,}ӮftPsة [A = v#K=o T$n>'FCֺiYd~�1 Xi11FA`QҟwegbR7Fu:& G�blM 2, <�� )t3^mC7$!TL�B~8R~՛B55vDW*)){V3uo"tuEpH'>#:1"XBW!r)t�X阰tOfz[]BL]K{,1cVc,$Oy*w icZ!%x,ˎGh2zPŎN'?Hcf , ;Z6PrATss!^>g$٩K@ߍu(iM&T wQFfjQ*-=lvQHVo�Xș$Y+$ҟ]Q$X9d{n{&sio\tEie̳ZiW� HYYz2E1<iӓ+pvXPy D#dsPK]jD,$R:NP C$Y{ӛϩxWJT\u>OAK8u{\=ZJ1߫Rz1^KD`-mlei6+^s޵Ӵ!>4'ZK@pEf|]^_q>r] )ю,@#0Ϙ׉0s2b [fQ]nP �MvO XjGkZ JՋuK<bg&I( /۶pk"knʽ9,*ٸ( H;^/-XuF+r2 1=m%[ K �pY1Ձ=(B$3囼6\• AHrO}@l-<r,=2-چ=G l#·9u8M5PO1r5YvSM~()wڠ!\|۽a?O4pݓ¡u/jʙev7<21DQٴ︟b2ߎk;:{yy}@c6ڇ$ZDKW1ĩnPl endstream endobj 536 0 obj << /Type /Page /Contents 537 0 R /Resources 535 0 R /MediaBox [0 0 595.276 841.89] /Parent 539 0 R >> endobj 538 0 obj << /D [536 0 R /XYZ 55.693 823.059 null] >> endobj 102 0 obj << /D [536 0 R /XYZ 56.693 441.501 null] >> endobj 535 0 obj << /Font << /F65 411 0 R /F62 410 0 R /F61 409 0 R >> /ProcSet [ /PDF /Text ] >> endobj 558 0 obj << /Length 2853 /Filter /FlateDecode >> stream xڭZYܸ~_1@ܽ> ${'a;AQr!=U&;yYM::oyW+0Wa$Կ@x~ru_\u`sl]gs =! Ө6ߵM6M.&jFc=eo=q??ޕI]ǹy0s}bxB.xOT<{j 4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 ˆL!7W ɈH7D3d]ӂ!E$1J^S�]n*IkC&eHD ,뵠fλ[e^u/ aMne$n2,J%gj=Lف�)o8`:~U(%/YnRqwKSS-ۘA!UM.3S.V!Tr=LC(ΠPg)ٷ wmƨ:BɝKm]x>~X~ Z=k$d׬ᮓ~|lk/Db$~MMOi>)Q!�Ԕ\ 3MY6׫'j |2=vx$dnv'|ћ7fVItG$zS37yNc%.dmfn#EbTAd= }mPO5[8< MW/؀+u,"i?$$W U endstream endobj 557 0 obj << /Type /Page /Contents 558 0 R /Resources 556 0 R /MediaBox [0 0 595.276 841.89] /Parent 539 0 R /Annots [ 540 0 R 541 0 R 542 0 R 543 0 R 560 0 R 561 0 R 544 0 R 545 0 R 546 0 R 547 0 R 548 0 R 549 0 R 562 0 R 563 0 R 550 0 R 551 0 R 552 0 R 553 0 R 554 0 R 555 0 R 564 0 R 565 0 R ] >> endobj 540 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [332.615 710.979 413.152 722.729] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.xfig.org)>> >> endobj 541 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [332.615 710.979 413.152 722.729] /Subtype/Link/A<</Type/Action/S/URI/URI(www.xfig.org)>> >> endobj 542 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [452.5 679.408 539.579 691.159] /Subtype/Link/A<</Type/Action/S/URI/URI(http://http://bourbon.usc.edu/tgif/)>> >> endobj 543 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [452.5 679.408 539.579 691.159] /Subtype/Link/A<</Type/Action/S/URI/URI(http://bourbon.usc.edu/tgif/)>> >> endobj 560 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [82.969 665.859 170.053 677.609] /Subtype/Link/A<</Type/Action/S/URI/URI(http://http://bourbon.usc.edu/tgif/)>> >> endobj 561 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [82.969 665.859 170.053 677.609] /Subtype/Link/A<</Type/Action/S/URI/URI(http://bourbon.usc.edu/tgif/)>> >> endobj 544 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [149.424 629.816 256.144 641.686] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.inkscape.org)>> >> endobj 545 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [149.424 629.816 256.144 641.686] /Subtype/Link/A<</Type/Action/S/URI/URI(www.inkscape.org)>> >> endobj 546 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [302.271 629.816 402.445 641.686] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.skencil.org)>> >> endobj 547 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [302.271 629.816 402.445 641.686] /Subtype/Link/A<</Type/Action/S/URI/URI(www.skencil.org)>> >> endobj 548 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [439.405 629.816 539.579 641.686] /Subtype/Link/A<</Type/Action/S/URI/URI(http://projects.gnome.org/dia/)>> >> endobj 549 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [439.405 629.816 539.579 641.686] /Subtype/Link/A<</Type/Action/S/URI/URI(projects.gnome.org/dia/)>> >> endobj 562 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [82.969 616.267 137.326 628.137] /Subtype/Link/A<</Type/Action/S/URI/URI(http://projects.gnome.org/dia/)>> >> endobj 563 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [82.969 616.267 137.326 628.137] /Subtype/Link/A<</Type/Action/S/URI/URI(projects.gnome.org/dia/)>> >> endobj 550 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [82.969 567.356 189.689 578.005] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.pstoedit.net)>> >> endobj 551 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [82.969 567.356 189.689 578.005] /Subtype/Link/A<</Type/Action/S/URI/URI(www.pstoedit.net)>> >> endobj 552 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [193.992 234.994 398.894 246.745] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.lcdf.org/~eddietwo/gifsicle)>> >> endobj 553 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [193.992 234.994 398.894 246.745] /Subtype/Link/A<</Type/Action/S/URI/URI(www.lcdf.org/~eddietwo/gifsicle)>> >> endobj 554 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [451.997 234.994 539.579 246.745] /Subtype/Link/A<</Type/Action/S/URI/URI(http://the-labs.com/GIFMerge)>> >> endobj 555 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [451.997 234.994 539.579 246.745] /Subtype/Link/A<</Type/Action/S/URI/URI(the-labs.com/GIFMerge)>> >> endobj 564 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 222.127 110.053 232.295] /Subtype/Link/A<</Type/Action/S/URI/URI(http://the-labs.com/GIFMerge)>> >> endobj 565 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 222.127 110.053 232.295] /Subtype/Link/A<</Type/Action/S/URI/URI(the-labs.com/GIFMerge)>> >> endobj 559 0 obj << /D [557 0 R /XYZ 55.693 823.059 null] >> endobj 106 0 obj << /D [557 0 R /XYZ 56.693 785.197 null] >> endobj 110 0 obj << /D [557 0 R /XYZ 56.693 457.147 null] >> endobj 114 0 obj << /D [557 0 R /XYZ 56.693 367.948 null] >> endobj 118 0 obj << /D [557 0 R /XYZ 56.693 192.948 null] >> endobj 556 0 obj << /Font << /F61 409 0 R /F62 410 0 R /F70 484 0 R /F65 411 0 R >> /ProcSet [ /PDF /Text ] >> endobj 568 0 obj << /Length 2444 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pfv#;b({ivj``尽Q[⭺BwS`ך*K8CDp}? 5q~jBU8}7, sCS}4fd^!n㻫@t �hsجܚ!.E&sͽj[ w K\g/05jtz%9v#mPAr^'5ITh\XݽP*C( 4~<}nН9ʲ/k-= JƉa?vޛu șM lb25Q=L?s&񜺢kޖ 2j7|z"|i IZ"8N" endstream endobj 567 0 obj << /Type /Page /Contents 568 0 R /Resources 566 0 R /MediaBox [0 0 595.276 841.89] /Parent 539 0 R >> endobj 569 0 obj << /D [567 0 R /XYZ 55.693 823.059 null] >> endobj 122 0 obj << /D [567 0 R /XYZ 56.693 706.455 null] >> endobj 126 0 obj << /D [567 0 R /XYZ 56.693 488.519 null] >> endobj 130 0 obj << /D [567 0 R /XYZ 56.693 270.73 null] >> endobj 134 0 obj << /D [567 0 R /XYZ 56.693 165.718 null] >> endobj 566 0 obj << /Font << /F65 411 0 R /F62 410 0 R /F61 409 0 R >> /ProcSet [ /PDF /Text ] >> endobj 574 0 obj << /Length 1429 /Filter /FlateDecode >> stream xXKs6W(R@RdL['trfr{(H☯aYw)&Un/x,}|Q?.?xtF) \Vۙ/!fۜm{1[P{~XX̵UM!:,Igt(qv=bq}3f&P=(G>/|{.\Uin_Pw.#(cc`N%ًb37*L7(veN@uZJ1>q9BƮ8[ Y4 A͍dU8< ٍCdի) 3**b+Bٕr*(e|7<=-C+Ҍ̕G-zKߨXV]e/?+ir⺊2B~B}ci0'dghֶYu1q'Kw p%MrC<=cE!F1GD2= 0'm!F-]܁n0qوj$ :a{yXxTmV @UƒSsd"@ݓi<oVۏZkO~ L8^Z?E3*l 3;`Z=7Y+q0">c-ΥI+.Dwf)sՕ}aX~J̚&-H1ܗZy`W4-; X%�jǵ*0 A$ /kƨ$g]`q:_q̊ \úWzHY>ЗM*ӲLPeXDy;;BTF案#^h8�h[\1I{<Fm7a$%TGΜ1aZ6”ZTxU (E4I.vr%jRBB Ea'I*kthD~u :J7$~]QxWZ G+ <t! q~{$S@7ojsf:jՃgC^`#aNt L[c$/(7k "R "isA#ݽ?JOT=AX]5h%�$ʙZ,ƍL w[ 8q:oԐ)̃0%27:8oҡQCd%ovؼF UqTjS{ET'*{4ψ5=7s[!ZNlISHlRh^t}[۵l 5EJ7,/8d?^BYGIo{O$#Ⱥ-/>m z6tvSb ֓]!ϐ ;ɪ4VR>qF˿oAt|<Z=?d կWNbXjU[}k_sJ? endstream endobj 573 0 obj << /Type /Page /Contents 574 0 R /Resources 572 0 R /MediaBox [0 0 595.276 841.89] /Parent 539 0 R /Annots [ 570 0 R 571 0 R 576 0 R 577 0 R ] >> endobj 570 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [380.496 393.609 539.579 405.359] /Subtype/Link/A<</Type/Action/S/URI/URI(http://gnuplot.sourceforge.net/scripts/index.html#tricks-here)>> >> endobj 571 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [380.496 393.609 539.579 405.359] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot.sourceforge.net/scripts/index.html#tricks-here)>> >> endobj 576 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 380.741 254.551 391.39] /Subtype/Link/A<</Type/Action/S/URI/URI(http://gnuplot.sourceforge.net/scripts/index.html#tricks-here)>> >> endobj 577 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 380.741 254.551 391.39] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot.sourceforge.net/scripts/index.html#tricks-here)>> >> endobj 575 0 obj << /D [573 0 R /XYZ 55.693 823.059 null] >> endobj 138 0 obj << /D [573 0 R /XYZ 56.693 785.197 null] >> endobj 142 0 obj << /D [573 0 R /XYZ 56.693 366.448 null] >> endobj 572 0 obj << /Font << /F61 409 0 R /F62 410 0 R /F65 411 0 R >> /ProcSet [ /PDF /Text ] >> endobj 580 0 obj << /Length 2035 /Filter /FlateDecode >> stream xڍXYF~d Kc ~]-%qM˿>U])1ɼvWUUz|_yĉdMF 7ǣ8*4M]E+=;<<mD^5NoJ߃F?c72y$1}mEצ2ث\4k`G!IXHGL5}_*'7\tj#b=x=>l&Өhu>w6b6fՕ DHC5ҏEB> ]>W/IqO}<Wyz<~2OYrA?~((U0]„Gߚs˔Ci9Kɚp 3NnTèlfY)V *&$&;X'Rm7qY~X"[j ›ﶕqn 8g[|WnAGĪ/^끬b҆Ӂ~89cjPsGn #|t!fUFDZFQ ‡o='<g =Ź c@(dՊ8+m;-k|x4qt/dP/vGF�q-m2u34?4Blc(AFu #/eSVO3LTlN|cިA33|~?莞cJQQqP.ØE9%PNM9鬮Rm;'9K4"t˅ mF"3I86)7jWЩ deu,  $Na%bݴ8p{ȼiPDfQ,#pX3L!Kd)&JУi :+BtbI`zu۩hA-@xt!,ni@5-ICOKLa b(Mkm�Sm)W*ND!v6w-:-KF\ѸFE[<[ Qz8K`flQADXz#c<R0S πxG8̭H2cSQ kj>u0,Wqݒe�ʏ:0aӔ'@/ qHa4юlbg)|m^>4$1"ifG.[V4�dfƒ?\7Ӟc #V^Ӫ*+7 i(j`hܯ(POy3>Ҽ1 ת]q锂wX~XLQJ 2jڲ P"$ lwk�o6@$d +` >apgtIۨIA?HG^8g517,Ohn]s=hہ SԧyM[` OEہF!ϧcZ>&nTFTlp?oѢ|#UF~H~Vh_1T3w0ڶpy0o@qG?-)q"!:`<t kN`<6`lTmS2wV=vR˘*ZP֥on0K)rvkU"&=Ts!32 @A= I>[D+2 mlf5U OaVx9 eGƸhAt+1?b jX[wfuUfsB\,`QΒ˩:nj(;~zv6gI?˦iny8S _�DbD` � OԨLz3Z-IL&†]HzIuSrӥ&4% #7{BI&T6|`Nd[Ƒ=94)=AHl7v}DT R+1ou[rEŐV(莰P d endstream endobj 579 0 obj << /Type /Page /Contents 580 0 R /Resources 578 0 R /MediaBox [0 0 595.276 841.89] /Parent 539 0 R >> endobj 581 0 obj << /D [579 0 R /XYZ 55.693 823.059 null] >> endobj 146 0 obj << /D [579 0 R /XYZ 56.693 755.922 null] >> endobj 150 0 obj << /D [579 0 R /XYZ 56.693 292.116 null] >> endobj 154 0 obj << /D [579 0 R /XYZ 56.693 237.821 null] >> endobj 158 0 obj << /D [579 0 R /XYZ 56.693 210.787 null] >> endobj 162 0 obj << /D [579 0 R /XYZ 56.693 144.234 null] >> endobj 578 0 obj << /Font << /F62 410 0 R /F61 409 0 R /F65 411 0 R >> /ProcSet [ /PDF /Text ] >> endobj 590 0 obj << /Length 2054 /Filter /FlateDecode >> stream xڵX[8~_QIIe}�qY]iKhB'q6q@o>NUBzfWw&l8O8!I4"A/^D½(o~S者F*;9}{?U%:;nW=<J/=~J;FINs;? ?V8y$wޛÛ5rI}z~yzTix(QO{ƘLJZNZ\¼F%Q)p0*^>,=4vY8u+uwU fTrn(f$a1=1 Sp uEXFA=2BG.?!x}ѻ'X_8hi(='['GJrjWO~1ISg1 [EaFnY~xj|{H)C@i~7FE9 pѩzZw=DΪm,aqFhEM(BʮpH j4!)BDɱ0TS1 yPR6I|i#8#۶lbdA:&CsSUn,:srxǺh]i< I}`l6 ;̇JQv4QMJ�9z\�hs<%(L  @ Rɺ_gyIJ4qJuV֒W`e8\".줂,)CM>y($mYB,[Sthk s}eGv7>�X&|MQ vF>4%4 gpA-qL>'pR=rBTجrV;lUuٍGPсWUx h4.^K~}'F,%,Q  څTgm 6+k*0uAsOP$h_ӕjqPT0/[d7]iQ]?lznbV}2+=$,N>OzZȑ4^TW+ío7(9lU9{eeл .'9rX4 PD.BbQotdch?Avolw3>rY,g⮒яeW :3jb,W:KZ^殢[9ay n7TNhIRc& js5}lgvzֿ;Tf^ՃPʺE.iNF;V|]$ Auߒl!zp݈у^#-^ܐK[@U<bh=\[4l\er'OP͈,a[a;@Ô.vsj꧳r8ָπKIR˗7f/O!%rv4F\@sKf{Tfѧ.RcuUちMOᑅMgMRΠc3n(g/}uѐQ )']6U]lJ؉AV#$ mpfe 2h?[pHOxYުPrjmYv%JA_Z=/iO Px)Cǫu:s{Ur+d`6@Vtt[ȘG59sGP1˘0 gkSPEߦUAuqRk4]{} ͎̪ \.XŠ[pkcX|}X.ʄkr,NQ 3u]"ڎo40yf0X̤D9T<ƅZ8?3D#SX!6Uaq<˩A,`ZSPi%~xy <_U4 8VZV' {Z/,BA@cݗw?D endstream endobj 589 0 obj << /Type /Page /Contents 590 0 R /Resources 588 0 R /MediaBox [0 0 595.276 841.89] /Parent 539 0 R /Annots [ 582 0 R 583 0 R 592 0 R 593 0 R 584 0 R 585 0 R 594 0 R 595 0 R 586 0 R 587 0 R ] >> endobj 582 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [204.92 634.935 539.579 646.658] /Subtype/Link/A<</Type/Action/S/URI/URI(http://http://gnuplot-tricks.blogspot.com/2009/08/pie-charts-entirely-in-gnuplot.html)>> >> endobj 583 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [204.92 634.935 539.579 646.658] /Subtype/Link/A<</Type/Action/S/URI/URI(http://gnuplot-tricks.blogspot.com/2009/08/pie-charts-entirely-in-gnuplot.html)>> >> endobj 592 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 621.921 215.776 632.989] /Subtype/Link/A<</Type/Action/S/URI/URI(http://http://gnuplot-tricks.blogspot.com/2009/08/pie-charts-entirely-in-gnuplot.html)>> >> endobj 593 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 621.921 215.776 632.989] /Subtype/Link/A<</Type/Action/S/URI/URI(http://gnuplot-tricks.blogspot.com/2009/08/pie-charts-entirely-in-gnuplot.html)>> >> endobj 584 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [290.496 621.921 539.579 632.989] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.usf.uni-osnabrueck.de/~breiter/tools/piechart/piecharts.en.html)>> >> endobj 585 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [290.496 621.921 539.579 632.989] /Subtype/Link/A<</Type/Action/S/URI/URI(www.usf.uni-osnabrueck.de/~breiter/tools/piechart/piecharts.en.html)>> >> endobj 594 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 608.371 227.871 619.02] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.usf.uni-osnabrueck.de/~breiter/tools/piechart/piecharts.en.html)>> >> endobj 595 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 608.371 227.871 619.02] /Subtype/Link/A<</Type/Action/S/URI/URI(www.usf.uni-osnabrueck.de/~breiter/tools/piechart/piecharts.en.html)>> >> endobj 586 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [263.751 556.874 494.834 568.745] /Subtype/Link/A<</Type/Action/S/URI/URI(http://ricardo.ecn.wfu.edu/~cottrell/qplot)>> >> endobj 587 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [263.751 556.874 494.834 568.745] /Subtype/Link/A<</Type/Action/S/URI/URI(ricardo.ecn.wfu.edu/~cottrell/qplot)>> >> endobj 591 0 obj << /D [589 0 R /XYZ 55.693 823.059 null] >> endobj 166 0 obj << /D [589 0 R /XYZ 56.693 785.197 null] >> endobj 170 0 obj << /D [589 0 R /XYZ 56.693 737.262 null] >> endobj 174 0 obj << /D [589 0 R /XYZ 56.693 670.645 null] >> endobj 178 0 obj << /D [589 0 R /XYZ 56.693 593.413 null] >> endobj 182 0 obj << /D [589 0 R /XYZ 56.693 528.367 null] >> endobj 186 0 obj << /D [589 0 R /XYZ 56.693 478.234 null] >> endobj 190 0 obj << /D [589 0 R /XYZ 56.693 426.737 null] >> endobj 194 0 obj << /D [589 0 R /XYZ 56.693 284.864 null] >> endobj 198 0 obj << /D [589 0 R /XYZ 56.693 137.012 null] >> endobj 588 0 obj << /Font << /F61 409 0 R /F62 410 0 R /F65 411 0 R >> /ProcSet [ /PDF /Text ] >> endobj 599 0 obj << /Length 2054 /Filter /FlateDecode >> stream x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595.276 841.89] /Parent 601 0 R /Annots [ 596 0 R ] >> endobj 596 0 obj << /Type /Annot /Subtype /Link /Border[0 0 1]/H/I/C[1 0 0] /Rect [95.394 84.022 111.023 95.773] /A << /S /GoTo /D (subsection.3.9) >> >> endobj 600 0 obj << /D [598 0 R /XYZ 55.693 823.059 null] >> endobj 202 0 obj << /D [598 0 R /XYZ 56.693 635.573 null] >> endobj 206 0 obj << /D [598 0 R /XYZ 56.693 584.758 null] >> endobj 210 0 obj << /D [598 0 R /XYZ 56.693 509.097 null] >> endobj 214 0 obj << /D [598 0 R /XYZ 56.693 359.054 null] >> endobj 218 0 obj << /D [598 0 R /XYZ 56.693 279.57 null] >> endobj 222 0 obj << /D [598 0 R /XYZ 56.693 146.977 null] >> endobj 597 0 obj << /Font << /F65 411 0 R /F62 410 0 R /F61 409 0 R /F70 484 0 R >> /ProcSet [ /PDF /Text ] >> endobj 621 0 obj << /Length 3138 /Filter /FlateDecode >> stream xڝZYܸ~C<Q pv8 VnϿOg'fUꫣocy#Ȣ(y8D3u$TzP Loޟ[{ۻ 򽢡;t2L[5/c5sO|. n/2?xs@O*.iF^ڞK(;+覱wG>c6G""^;Rrru.ҫ-c|ɴPYo|+#CC3׮ 53qme`.Sa JDaF?sؠB5GFL)G7 _>i*R=CYUGG"UcjO5JIޕ@폾Tp65 ? tGZU= M'faR3*tD褫=}iP^L^@\mLACǦi6E`ixgh(myGә Lw)k]}pU'fm%fڑ  @H(Tl*RF-bx_*]f}3 *~v[-X9z׳vqh^ mF=b#${oo 5gbS0=eϣtւH57Y 0ve~EMU5j zq^ KC>=w4 ,Clk1k_PT QJ& AǪ166#`T5hgmY�'q󰠌I"RyqCY0Y"L]dBϱ0h_, O- <LZWZq'5ѽyZ8l^aO UM{q[Kv@CWwl4ka,�ky]LHdf>N}lX]/|'0R2~NH"B눁v~6'N[Cm/~ QB4�oDI(Y~N6wG$.K=}, iJ[%6a 0[WkxnD:ѭ0�(ܸWjƂ H3A+Cq-e�O2Sdj&{x<#06=t�b 8Xx8u<n^|Jd4C tG= _-[nS#8bS b8=l~)aFmi2ސ^P v 0%[ŹeaVw%Ɵ۬cņ)FS8M�OH &U2%tAmt ( )ށigd =kGfrD!}ꚱWY>7z+2_ }\}2}XHWNbuըwhG/{#&l`I-̚vVoIO{TwLfBe߀Ł(KL {MU OgW%DXfhB~ZgSTw5'ў:S QtE96"xK~&Y& rh9  .c$Լ""N<#cngH`)چuaݝ ,~0t?z2<ECo&wV/d\yOGn_N򇓮~vbj+<�2]9-xɁ ~)<dv-G!;"u CMOÕ`A/CR>s:"qä; MOH %laO/\\ gpw]P ښ>`k#gt |x3qOuP皾/UX,yS 1l\3fY rPS[^M)x-exNilmlhd E'0J6Xwp/; j'? փՅ\pF׫<}tq\sU^6#pS-mq_?�Jxli$vE.$^[pLYڷ((q-B6ȖS~%~QcJmWhV+dO7q-3V5VFT ]ӰO,(Hw!5EN*x$Ґ Io"@z55sgA,)T*""/TrRa%W^-B;wWd@r\qujl5`xٟsMu7L=NHP"<wެKSbP GW`�ͪFS�Cό<r qq=p2bQ)˾fi[1L"rI콡. ^0vBhǏP�6ocFFޟ&<L0+MueTSϺ>YIBH)DFX3ёΩ'Xq<[jTa kW|_BrB.YV!|VRf=vlvuy(v;Nube0uok;lSݹ5 ita֌z WdEx&v.qJ3nFo`-R9*6~?Onqzr!D_ ^m_{8/TK' LE$_D; ;(=%š+\ʲcUΒP 0"bT, 'gGجg\Rct8h$.ʖ>TcCVGSR(8'ibD"u8;4fsOV2ơ$StnuG?K:fO@!cDc"vn߷EzBWwJ 6#HTB_&٢F _1OHELvMGX*ugkw .L"TS53N~.f.7Jw?Dnxe, O\CWfkY�Ab+p, =T)\%E{{@>�yW#a*푂j<褐jNa`6 Pl/9K} ~%YTO6Ba8,!NËA endstream endobj 620 0 obj << /Type /Page /Contents 621 0 R /Resources 619 0 R /MediaBox [0 0 595.276 841.89] /Parent 601 0 R /Annots [ 602 0 R 603 0 R 604 0 R 605 0 R 623 0 R 624 0 R 606 0 R 607 0 R 608 0 R 609 0 R 610 0 R 611 0 R 612 0 R 613 0 R 625 0 R 626 0 R 614 0 R 615 0 R 627 0 R 616 0 R 617 0 R 618 0 R 628 0 R 629 0 R ] >> endobj 602 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [251.559 533.209 423.733 544.96] /Subtype/Link/A<</Type/Action/S/URI/URI(news://comp.graphics.apps.gnuplot)>> >> endobj 603 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [251.559 533.209 423.733 544.96] /Subtype/Link/A<</Type/Action/S/URI/URI(comp.graphics.apps.gnuplot)>> >> endobj 604 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [249.587 506.111 539.579 517.861] /Subtype/Link/A<</Type/Action/S/URI/URI(http://sourceforge.net/tracker/?group_id=2055&atid=102055)>> >> endobj 605 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [249.587 506.111 539.579 517.861] /Subtype/Link/A<</Type/Action/S/URI/URI(sourceforge.net/tracker/?group_id=2055&atid=102055)>> >> endobj 623 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 494.754 96.962 503.892] /Subtype/Link/A<</Type/Action/S/URI/URI(http://sourceforge.net/tracker/?group_id=2055&atid=102055)>> >> endobj 624 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 494.754 96.962 503.892] /Subtype/Link/A<</Type/Action/S/URI/URI(sourceforge.net/tracker/?group_id=2055&atid=102055)>> >> endobj 606 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [112.554 465.463 284.728 477.214] /Subtype/Link/A<</Type/Action/S/URI/URI(news://comp.graphics.apps.gnuplot)>> >> endobj 607 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [112.554 465.463 284.728 477.214] /Subtype/Link/A<</Type/Action/S/URI/URI(comp.graphics.apps.gnuplot)>> >> endobj 608 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [280.441 333.353 374.07 345.104] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.octave.org)>> >> endobj 609 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [280.441 333.353 374.07 345.104] /Subtype/Link/A<</Type/Action/S/URI/URI(www.octave.org)>> >> endobj 610 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [145.701 306.255 291.694 318.125] /Subtype/Link/A<</Type/Action/S/URI/URI(mailto://jdc@nauvax.ucc.nau.edu)>> >> endobj 611 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [145.701 306.255 291.694 318.125] /Subtype/Link/A<</Type/Action/S/URI/URI(jdc@nauvax.ucc.nau.edu)>> >> endobj 612 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [465.711 228.341 539.579 240.092] /Subtype/Link/A<</Type/Action/S/URI/URI(http://sourceforge.net/tracker/?group_id=2055&atid=302055)>> >> endobj 613 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [465.711 228.341 539.579 240.092] /Subtype/Link/A<</Type/Action/S/URI/URI(sourceforge.net/tracker/?group_id=2055&atid=302055)>> >> endobj 625 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 214.792 306.416 226.543] /Subtype/Link/A<</Type/Action/S/URI/URI(http://sourceforge.net/tracker/?group_id=2055&atid=302055)>> >> endobj 626 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 214.792 306.416 226.543] /Subtype/Link/A<</Type/Action/S/URI/URI(sourceforge.net/tracker/?group_id=2055&atid=302055)>> >> endobj 614 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [472.132 187.694 539.579 199.444] /Subtype/Link/A<</Type/Action/S/URI/URI(ftp://ftp.ucc.ie/pub/gnuplot/contrib/)>> >> endobj 615 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [472.132 187.694 539.579 199.444] /Subtype/Link/A<</Type/Action/S/URI/URI(ftp.ucc.ie)>> >> endobj 627 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 174.826 206.358 185.895] /Subtype/Link/A<</Type/Action/S/URI/URI(ftp://ftp.ucc.ie/pub/gnuplot/contrib/)>> >> endobj 616 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [66.911 174.826 206.358 185.895] /Subtype/Link/A<</Type/Action/S/URI/URI(/pub/gnuplot/contrib/)>> >> endobj 617 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [484.725 93.049 539.579 104.799] /Subtype/Link/A<</Type/Action/S/URI/URI(http://gnuplot-py.sourceforge.net)>> >> endobj 618 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [484.725 93.049 539.579 104.799] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot-py.sourceforge.net)>> >> endobj 628 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [82.969 80.181 202.78 90.83] /Subtype/Link/A<</Type/Action/S/URI/URI(http://gnuplot-py.sourceforge.net)>> >> endobj 629 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [82.969 80.181 202.78 90.83] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot-py.sourceforge.net)>> >> endobj 622 0 obj << /D [620 0 R /XYZ 55.693 823.059 null] >> endobj 226 0 obj << /D [620 0 R /XYZ 56.693 785.197 null] >> endobj 230 0 obj << /D [620 0 R /XYZ 56.693 693.134 null] >> endobj 234 0 obj << /D [620 0 R /XYZ 56.693 666.1 null] >> endobj 238 0 obj << /D [620 0 R /XYZ 56.693 382.759 null] >> endobj 242 0 obj << /D [620 0 R /XYZ 56.693 264.198 null] >> endobj 619 0 obj << /Font << /F61 409 0 R /F62 410 0 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ГԈa¤Xy%M;DX Pn%Dc^2=8|YVLk %Ax&/qGMq�NO;7ґRzj1҄ؼ }2.<\ 6fvxeQMNŚ{Z-Zt`:paO:`Dꢺ}i0՗++a"['e7�>e|F@]\lD>:+{UjA +8S`슾rc[|`0XR2Y)^hY <S:feUyERmtc GQ�N8r\"G)AӊVР T*7YM}$Dmkry{9׹Q\D{m1: >3%Ctgn>ݨֺZ6?Gwis*ϣDfqM]^DX{vz1ko ~̝+  >dR; _l=h;%wRFNvSࡑ`b/0zz+--H !$YbeX8؟fs@<D;)>Z|"A@Hd"ԃHSFs4|s0SfpBO!dOkwtKŰ xfCDC2FX zC~h/ϛ Sng�E-vj>zgl~JQɺ}$5� uͰlI}m*j,qTR󲞑n+yvn"ufȣ":ߍl 6cK{Sl҉9 È YqDoAI�J1#fg;t S]ܲϥ  y>{c-rpŘDEk2CZ"18Sf|CI=ݼ =7\Ʊ bIn^zm ].}T`dD\Ƨ)5XA&]&msX?DOHWJTBzޤVe6GRWaBȠ-O׭Ő+wH-tPKTU&2g1urԾ/Rn>E/.J@PADG4$NjRAx9tEj'<Z| `D;ʣ>(x�I[҈T$qtM9?1F&~,e7ߞ$3i%HIt'0-ƿ|en$&X_m=żS}ih8o?vb'5PJj\C) bQ8|SĶUf2UW-^4^n ]|^!hL QAM␍"ifd Op$=jS)KnÓ" 6Pd�x~r W�N)tHrΩ;k,ҋUYlg_ endstream endobj 652 0 obj << /Type /Page /Contents 653 0 R /Resources 651 0 R /MediaBox [0 0 595.276 841.89] /Parent 601 0 R /Annots [ 630 0 R 631 0 R 632 0 R 655 0 R 656 0 R 633 0 R 634 0 R 635 0 R 636 0 R 657 0 R 658 0 R 637 0 R 638 0 R 639 0 R 640 0 R 641 0 R 642 0 R 643 0 R 644 0 R 645 0 R 646 0 R 659 0 R 660 0 R 647 0 R 648 0 R 661 0 R 662 0 R ] >> endobj 630 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [273.793 631.406 539.579 643.157] /Subtype/Link/A<</Type/Action/S/URI/URI(ftp://hobbes.nmsu.edu/pub/os2/apps/analysis/lsqrft15.zip)>> >> endobj 631 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [273.793 631.406 373.968 643.157] /Subtype/Link/A<</Type/Action/S/URI/URI(hobbes.nmsu.edu)>> >> endobj 632 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [387.041 631.406 539.579 643.157] /Subtype/Link/A<</Type/Action/S/URI/URI(/pub/os2/apps/analysis/lsqrft15.zip)>> >> endobj 655 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 617.857 136.235 629.607] /Subtype/Link/A<</Type/Action/S/URI/URI(ftp://hobbes.nmsu.edu/pub/os2/apps/analysis/lsqrft15.zip)>> >> endobj 656 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 617.857 136.235 629.607] /Subtype/Link/A<</Type/Action/S/URI/URI(/pub/os2/apps/analysis/lsqrft15.zip)>> >> endobj 633 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [107.739 537.244 384.64 548.312] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.ast.cam.ac.uk/AAO/local/www/kgb/pgperl)>> >> endobj 634 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [107.739 537.244 384.64 548.312] /Subtype/Link/A<</Type/Action/S/URI/URI(www.ast.cam.ac.uk/AAO/local/www/kgb/pgperl)>> >> endobj 635 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [511.405 537.244 539.579 548.312] /Subtype/Link/A<</Type/Action/S/URI/URI(ftp://ftp.ast.cam.ac.uk/pub/kgb/pgperl/)>> >> endobj 636 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [511.405 537.244 539.579 548.312] /Subtype/Link/A<</Type/Action/S/URI/URI(ftp.ast.cam.ac.uk)>> >> endobj 657 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 523.694 261.449 534.763] /Subtype/Link/A<</Type/Action/S/URI/URI(ftp://ftp.ast.cam.ac.uk/pub/kgb/pgperl/)>> >> endobj 658 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 523.694 142.78 534.763] /Subtype/Link/A<</Type/Action/S/URI/URI(ftp.ast.cam.ac.uk)>> >> endobj 637 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [154.729 523.694 261.449 534.763] /Subtype/Link/A<</Type/Action/S/URI/URI(/pub/kgb/pgperl/)>> >> endobj 638 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [273.998 523.694 519.023 534.763] /Subtype/Link/A<</Type/Action/S/URI/URI(ftp://linux.nrao.edu/pub/packages/pgperl/)>> >> endobj 639 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [273.998 523.694 367.627 534.763] /Subtype/Link/A<</Type/Action/S/URI/URI(linux.nrao.edu)>> >> endobj 640 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [379.576 523.694 519.023 534.763] /Subtype/Link/A<</Type/Action/S/URI/URI(/pub/packages/pgperl/)>> >> endobj 641 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [332.46 468.816 426.089 480.566] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.octave.org)>> >> endobj 642 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [332.46 468.816 426.089 480.566] /Subtype/Link/A<</Type/Action/S/URI/URI(www.octave.org)>> >> endobj 643 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [194.588 441.717 288.217 453.468] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.scilab.org)>> >> endobj 644 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [194.588 441.717 288.217 453.468] /Subtype/Link/A<</Type/Action/S/URI/URI(www.scilab.org)>> >> endobj 645 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [468.438 126.682 539.579 138.432] /Subtype/Link/A<</Type/Action/S/URI/URI(http://sourceforge.net/tracker/?group_id=2055&atid=302055)>> >> endobj 646 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [468.438 126.682 539.579 138.432] /Subtype/Link/A<</Type/Action/S/URI/URI(sourceforge.net/tracker/?group_id=2055&atid=302055)>> >> endobj 659 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 113.133 306.416 124.883] /Subtype/Link/A<</Type/Action/S/URI/URI(http://sourceforge.net/tracker/?group_id=2055&atid=302055)>> >> endobj 660 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 113.133 306.416 124.883] /Subtype/Link/A<</Type/Action/S/URI/URI(sourceforge.net/tracker/?group_id=2055&atid=302055)>> >> endobj 647 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [451.997 113.133 539.579 124.883] /Subtype/Link/A<</Type/Action/S/URI/URI(mailto://gnuplot-beta@lists.sourceforge.net)>> >> endobj 648 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [451.997 113.133 539.579 124.883] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot-beta@lists.sourceforge.net)>> >> endobj 661 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 99.584 195.144 111.334] /Subtype/Link/A<</Type/Action/S/URI/URI(mailto://gnuplot-beta@lists.sourceforge.net)>> >> endobj 662 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [55.697 99.584 195.144 111.334] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot-beta@lists.sourceforge.net)>> >> endobj 654 0 obj << /D [652 0 R /XYZ 55.693 823.059 null] >> endobj 246 0 obj << /D [652 0 R /XYZ 56.693 785.197 null] >> endobj 250 0 obj << /D [652 0 R /XYZ 56.693 707.911 null] >> endobj 254 0 obj << /D [652 0 R /XYZ 56.693 415.463 null] >> endobj 258 0 obj << /D [652 0 R /XYZ 56.693 267.551 null] >> endobj 262 0 obj << /D [652 0 R /XYZ 56.693 164.791 null] >> endobj 651 0 obj << /Font << /F61 409 0 R /F62 410 0 R /F65 411 0 R >> /ProcSet [ /PDF /Text ] >> endobj 670 0 obj << /Length 2543 /Filter /FlateDecode >> stream xڵYmo~baKڤ E|ɡஸ^z(4rZi-[bi93yo#a(WE(q0'l2dj=[~Z[ʪ÷^ >3ӊ{KUM^]{/EPyM;|^W}S[}~/郭$A'_>^} X-~q6|,' }̊s ) nT'i]i,e^Xp=hUeô<|ۺd^`ƺ Xy,N7z*/3֬}?fIXsAkckSgzUæ?m|zHQ3cO ɊoOue?tݷ[k*5{.ݭ|𵟤,1p-CsB]{8NI?w+.EW.k߮Rof˿+W9Uǜ,jVy?@VV"QԯW _x_ "~,5`JGòE#;1j0RHu0 [#Eڎ⿪]@O| ;`IVkA3º7;Y6z5wzOX_9ٗFhӏ%^hs?/cpN& _莛`'h1of-Y13Ysvؙm`ȏ^ogw:p'WC9T��É9,iLMm >qk{?>8s20rP˻jَ?8m%\r?{&zHэ(]BYC) "dq̝g0\jc̡ǝ;.VX)OEqOTD2BhZMү�U"F~:=,,<0P1. BU]A ]- rpc)E(Yt:= _S^Hx) ,ry U@QF~e֚0/"_4YrCW�t ��`̯"&NmOڗ{&;"ںO`Qr$CQbB¾2  )uJ}ԭ="M 1-sga›KQ}ߡ@V+MeV/2(|MAX$xs-| $}64m??1ۘxTk;7"7۶fqh~$Mg?iglb^>ǿH+|R'�sX^= #"n범UF~5*HA&iG|]-0x i.]&Q4q, ]<ߞ̀ uoSM]}Cɐ΂ FVݵ#JUS6JV7~3ᄏ`lEw} )&r4xi@c '&E~dR*lݩ AXLƣJ}2JM5X| "$C= sۦK7v}Œ̲܀,PѠzu%ԉv2!x}뺩s7=sɮoX\pפ5 (c)BU!*TJbݤ $qNA'ȴ( ,c  qoTep$ve}BlcGY#hyr?{pV] ! EoUc^aM&S�@k [42)dT۶vjZ58f:44Rr8v10�{xB�ozmo6чx NNLTX;�8v4'?> ʢi3M+G16 1`kX&ۮJg*g6s/ v|o.{ή#qh/lI+gJ,_W>T[uYY(v D313CIV8$. chisD8#tQyXzuϑIbWE˒Gͯs;6=$yE](k&2=N,xXOk"xHͩ`n �l<C7]%,Tr@g?H8Ub40j͇n_#x+WʣdL;kU <dq𿀼T]#/9. tD ݤt%T6S6'eɄo-g 4̞_z}tp:6paфSbal9hN慦IX*6%lZ3Bi2}*0ҡNp   'Yjsݻ5jy1P`q,m2Q҈?N9Mfn8P ҨmSҁG!L�<N._^+ endstream endobj 669 0 obj << /Type /Page /Contents 670 0 R /Resources 668 0 R /MediaBox [0 0 595.276 841.89] /Parent 601 0 R /Annots [ 649 0 R 650 0 R 663 0 R 664 0 R 665 0 R 666 0 R 667 0 R ] >> endobj 649 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [242.349 736.418 447.25 748.168] /Subtype/Link/A<</Type/Action/S/URI/URI(mailto://Majordomo@lists.sourceforge.net)>> >> endobj 650 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [242.349 736.418 447.25 748.168] /Subtype/Link/A<</Type/Action/S/URI/URI(Majordomo@lists.sourceforge.net)>> >> endobj 663 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [302.643 686.325 527.679 698.075] /Subtype/Link/A<</Type/Action/S/URI/URI(mailto://gnuplot-beta@lists.sourceforge.net)>> >> endobj 664 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [302.643 686.325 527.679 698.075] /Subtype/Link/A<</Type/Action/S/URI/URI(gnuplot-beta@lists.sourceforge.net)>> >> endobj 665 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [221.923 171.081 493.56 182.925] /Subtype/Link/A<</Type/Action/S/URI/URI(ftp://ftp.dartmouth.edupub/gnuplot/latex.shar)>> >> endobj 666 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [221.923 171.081 335.188 182.925] /Subtype/Link/A<</Type/Action/S/URI/URI(ftp.dartmouth.edu)>> >> endobj 667 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [347.568 171.081 493.56 182.925] /Subtype/Link/A<</Type/Action/S/URI/URI(pub/gnuplot/latex.shar)>> >> endobj 671 0 obj << /D [669 0 R /XYZ 55.693 823.059 null] >> endobj 266 0 obj << /D [669 0 R /XYZ 56.693 785.197 null] >> endobj 270 0 obj << /D [669 0 R /XYZ 56.693 722.181 null] >> endobj 274 0 obj << /D [669 0 R /XYZ 56.693 670.861 null] >> endobj 278 0 obj << /D [669 0 R /XYZ 56.693 641.087 null] >> endobj 282 0 obj << /D [669 0 R /XYZ 56.693 366.724 null] >> endobj 286 0 obj << /D [669 0 R /XYZ 56.693 220.58 null] >> endobj 290 0 obj << /D [669 0 R /XYZ 56.693 116.197 null] >> endobj 668 0 obj << /Font << /F61 409 0 R /F62 410 0 R /F65 411 0 R >> /ProcSet [ /PDF /Text ] >> endobj 676 0 obj << /Length 3117 /Filter /FlateDecode >> stream xڥZb;9DRϴIr!ri5dRv"{g8C=lf~p8C~uoq%DDZ]I*M@ꦸqz#0\Yp8\ =_X5*S8}]k =^{k;jZ\O7~<^m$ E<^u4LMO}>! ewMK B5OVmu}WsrgPL~^Sf{mϸ?ܖK;gؘ(PA$� 8t}&u,tek_z oxy  `=q^n(!蒠LӉԚ9p; d$ͬZ…mY3Av2p`Zkz9\y'?VqwG u"^=ñ*QPsP|.]VzۙOÃ>8V M_N'n"O77'ϋX7Te2"ewujIaϗxtZ#dD 9"g4`2 i8Y*dؿYd"Gg<+" S9Ӎ�GtǞwoxꝠ>&8rWrx4v6eGnhܷK�Ep䷧a E1.>w_XΥ6Np>fI 2"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V<VcAA*>&i"}Od+K>̖cQ^绦^Y AuĘs-Ty.Xs!n!¾ Ms4繸!繎P=V( g LF=ѢTMI?|P|o[#򙭮V2,OwMѾ%FVǓ�[s0kLZzNGKip`2z}}0dɵy,d(y_MkoBM.0]pD"M'俺 endstream endobj 675 0 obj << /Type /Page /Contents 676 0 R /Resources 674 0 R /MediaBox [0 0 595.276 841.89] /Parent 601 0 R /Annots [ 672 0 R 673 0 R ] >> endobj 672 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [141.276 185.462 333.087 197.212] /Subtype/Link/A<</Type/Action/S/URI/URI(http://www.ams.org/tex/amsfonts.html)>> >> endobj 673 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [141.276 185.462 333.087 197.212] /Subtype/Link/A<</Type/Action/S/URI/URI(www.ams.org/tex/amsfonts.html)>> >> endobj 677 0 obj << /D [675 0 R /XYZ 55.693 823.059 null] >> endobj 294 0 obj << /D [675 0 R /XYZ 56.693 785.197 null] >> endobj 298 0 obj << /D [675 0 R /XYZ 56.693 707.911 null] >> endobj 302 0 obj << /D [675 0 R /XYZ 56.693 540.417 null] >> endobj 306 0 obj << /D [675 0 R /XYZ 56.693 461.822 null] >> endobj 310 0 obj << /D [675 0 R /XYZ 56.693 356.81 null] >> endobj 314 0 obj << /D [675 0 R /XYZ 56.693 116.307 null] >> endobj 674 0 obj << /Font << /F61 409 0 R /F62 410 0 R /F65 411 0 R /F77 678 0 R /F70 484 0 R >> /ProcSet [ /PDF /Text ] >> endobj 681 0 obj << /Length 2066 /Filter /FlateDecode >> stream xڥXK6WTSVb{l<XlW"!`�pf_h@8݋h4@峫YzqUr}QY_E勋e{%i:ID$M4+U>HcÈ%Rv7ߓoEURwr1`E1!^jb1}Ԫ^-J8|ZjiI&f8.ͽ$KѯC>Isϯs4,5)0IӃr!A. l417<XMqYTd~BXvL_z땧+2)hfٟ&xm@`yc><AIZDVJL?^z˶玾F@rO+IY?-xt%P˷/ 2o# 9*0Np`81/nc6D+ cHTѠ$hd@�g9j@d-[|Y"鄆trU1"ᚤMvZ0遳sP-O"Zox�gF3yI֠YC} G5d8/fy ֛eJG\ ֛P_3<%n&�dLj]O\mh~+G|9EߵSDTTՖ&֐e,1{>0cjͅ4NXU㧸l9񎷣5eiAi{ł4L ", 928ʲ~M8Idt,dz4]9X{~uTt_$;RJaBp5G<ysK$8iH0y+[fk.1a&}MxQ<<j67NjnwzMV̛xO=^hG25t2,U}n>\9s&Jfie)rˎ%*9pxZ81$:FMK4pd}ǛKZ7)MɊ^St#q{w~ÖkX&ƆbŅ'<bq$x.дZ:T*˾}}}aqReϓ4M廘fndeyIm0"ǛIPЀyAN4L�B䮋< &9BzFNzqW.p!> |؜;o?|f7?~lHswLAwZ@dq<۳��l�Oa LFg\<SV(S\mjxM.>FI ͨw١pN~>_@@N\@zjjngPc__F_ t|G(eT9  <LN oo>| `Q\Nvy_l~JeY_!#H}j4\ɂy$N$򔟄#0qbsӽX/ -weѭTh{b bIΡ\xw0 @ѝ" B3ܒO Doi"r&$`fQp _"xE8<;�2pᏮBXht|;y"?ܗn}CL`h`8O&1LX +S_,M{nXBCDxQ PQx蘻IY2C;Q;ȧ2md QH?7-iDB^&jv.eĶL_5�0 =kբ *r,&0{]x&ZHw2V$ z˃?e{皓~.'z:p+ԁPO>DgqU-NpZd).^o='. ,>pk??܍٭  5\2&ҏC7 P/1BL[J;I ے˓V)}<{!:Q(?ا. h|. 3:& C/G�aϯ'qAh,3B551U�d2:b桙.pٛk endstream endobj 680 0 obj << /Type /Page /Contents 681 0 R /Resources 679 0 R /MediaBox [0 0 595.276 841.89] /Parent 601 0 R >> endobj 682 0 obj << /D [680 0 R /XYZ 55.693 823.059 null] >> endobj 318 0 obj << /D [680 0 R /XYZ 56.693 785.197 null] >> endobj 322 0 obj << /D [680 0 R /XYZ 56.693 655.99 null] >> endobj 326 0 obj << /D [680 0 R /XYZ 56.693 524.246 null] >> endobj 330 0 obj << /D [680 0 R /X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Ք\S~@z037:@p_zۗsvWHHd]nIႄV@8l? \RkteŒS 9}ՐqA1$<@t;kOՐ+:Ï.!WKY Q &Kn-8Tf3nӉErv.E]ٖX;wd5kw+2D='a Ņ_)MY AK`H6a):ug7C0n6uM|FFo[pEc"Lz_IB endstream endobj 684 0 obj << /Type /Page /Contents 685 0 R /Resources 683 0 R /MediaBox [0 0 595.276 841.89] /Parent 688 0 R >> endobj 686 0 obj << /D [684 0 R /XYZ 55.693 823.059 null] >> endobj 334 0 obj << /D [684 0 R /XYZ 56.693 785.197 null] >> endobj 338 0 obj << /D [684 0 R /XYZ 56.693 629.803 null] >> endobj 342 0 obj << /D [684 0 R /XYZ 56.693 388.104 null] >> endobj 346 0 obj << /D [684 0 R /XYZ 56.693 216.028 null] >> endobj 683 0 obj << /Font << /F61 409 0 R /F62 410 0 R /F65 411 0 R /F80 687 0 R >> /ProcSet [ /PDF /Text ] >> endobj 691 0 obj << /Length 2965 /Filter /FlateDecode >> stream xڽY6޿b~XZ-p@\ 5}ؚcd){n}ّ)")GRWH)0T&DMBdso"/۝ }vaڭL<KE5թ~pH_~*(S%5򏭔W[4x4DעiC?YtE}Rs)@'DgEO"q0>6ՊLߍb.kStRzv+CS<LHpZA}v}O %xF/Gg* Sۚw2`9lH'ڬdngr^MK;: U%SD(*&Rw:=Kyɢp9%5ّFF]Caʭh00yμ苦vb6 {SyW25ϨsZSwLQ} <Й9"3(xG $m}[aTX=FJD Dp+;I:G}V*AΖ6cm {{."Qlm[άZ^{4z&Q$>r 5C%t%'(8 EG x[)oKZgPqR:QԽu<kc#gN":hg,);Htl2'gwn M߇h h|0#`05杘ίGw3O3&^ع*6J!l@Dcˮ!xĎ#fFYhtd<8&Gna+C8xS�Aѩմ ]doC&V>t#Hr/8< 켌D(wsCUfOeIjL̬M}<h ;G+@f&?!bU)UN`UW\'tC̣T$C=o= �qǐrT4վTmt#"8P(?B`br~i}SvѡHjUSȝ+LVιK 6ca»q{ڞHUD؛E׷yye$G4_X-|3W[H4}+(. *nCAr*,ha;σ/yD.ݸ~!M6фq) k΅шR\Sճ e~Dzr%o'ؕ虁gg P8BFVѐ�`x^ba9!ŵ{ۖ E˂<jl0~f? 42DT"?|9teـn<yTM쾮,տ8 ?wLWX" j7/,s@Y9ZHe}W�1C4rCq-Zw뫢o lKw1C߸s[�z蛔?MuqWF E� lY^tܚBϙh�JGJ=; `ɮBiKJWe+#,SYw4YP$LGY] ͱԩ7ssWjފ8r%Y18WcoTvē\}v4X7 /wɹ4`Z<Nˀ؀i]SܭX"-]Ov@cʔ '8)~v+ EATTMfG̤b\~w BW c8+fNS@iŁ(tӊktC9 j| b K{O3JO?:mu4 y:8@Kd4? ff)c?i ȩ@]A'}i6rl~z[ˇ$Y¬8CP‡z18LEj9bʍcUcP:"^b tGA\qoF}*N (4%q)OG}ѫ&ܶہArvm[MyXMZ4}-8]sd/Lu۲ .:,<PGS9@Rtjk϶>6%K5ѥ, lиf ^Y O0�ywnMUѓ!0|7d@>R3~c_1Vrձ Wjl] I>iSZr"}ԇ4#g%e;gu ~1ON&@GЮG/ xDEpuc6m:jh_NhCrbmo oϋ)[�qeγW(Rq]o +aw֕;7AS7!__l %I@޷L/nºH cKg|A1@mLpZD;�W, JB-g|V  Gl,0L.o=< %vN[}K@JgG:տ^̝}\Zo(,g0D+ S<>rE%BI뺰%M" i?/*\p4w8>76-A*r[p[hWh$-tA|En, [ah[ 9 9c`mYR�s#9bF`㇓UOkXN׆ g[/ ] dt߰,޴W2r:RCq,ہ^-e /ޘக߽>l)$h|02 y9`E%j=ls D l Od]Cq y$ Wp&gLgP TPG z|CJuxVGIpΒ3Qt,L>N( /b.a9k|I@r9witO endstream endobj 690 0 obj << /Type /Page /Contents 691 0 R /Resources 689 0 R /MediaBox [0 0 595.276 841.89] /Parent 688 0 R >> endobj 692 0 obj << /D [690 0 R /XYZ 55.693 823.059 null] >> endobj 350 0 obj << /D [690 0 R /XYZ 56.693 785.197 null] >> endobj 354 0 obj << /D [690 0 R /XYZ 56.693 667.263 null] >> endobj 358 0 obj << /D [690 0 R /XYZ 56.693 589.349 null] >> endobj 362 0 obj << /D [690 0 R /XYZ 56.693 356.784 null] >> endobj 689 0 obj << /Font << /F61 409 0 R /F62 410 0 R /F65 411 0 R /F70 484 0 R >> /ProcSet [ /PDF /Text ] >> endobj 694 0 obj [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] endobj 695 0 obj [500] endobj 696 0 obj [777.8 1000 500 500 777.8 777.8 777.8 777.8 777.8 777.8 777.8 777.8 777.8 777.8 777.8 777.8 1000 1000 777.8 777.8 1000 1000 500 500 1000 1000 1000 777.8 1000 1000 611.1 611.1 1000 1000 1000 777.8 275 1000 666.7 666.7 888.9 888.9 0 0 555.6 555.6 666.7 500 722.2 722.2 777.8 777.8 611.1 798.5 656.8 526.5 771.4 527.8 718.7 594.9 844.5 544.5 677.8 762 689.7 1200.9 820.5 796.1 695.6 816.7 847.5 605.6 544.6 625.8 612.8 987.8 713.3 668.3 724.7 666.7 666.7 666.7 666.7 666.7 611.1 611.1 444.4 444.4 444.4 444.4 500 500 388.9 388.9 277.8 500 500 611.1 500] endobj 697 0 obj [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] endobj 698 0 obj [556 556 167 333 611 278 333 333 0 333 564 0 611 444 333 278 0 0 0 0 0 0 0 0 0 0 0 0 333 180 250 333 408 500 500 833 778 333 333 333 500 564 250 333 250 278 500 500 500 500 500 500 500 500 500 500 278 278 564 564 564 444 921 722 667 667 722 611 556 722 722 333 389 722 611 889 722 722 556 722 667 556 611 722 722 944 722 722 611 333 278 333 469 500 333 444 500 444 500 444 333 500 500 278 278 500 278 778 500 500 500 500 333 389 278 500 500 722 500 500 444 480 200 480 541 0 0 0 333 500 444 1000 500 500 333 1000 556 333 889 0 0 0 0 0 0 444 444 350 500 1000 333 980 389 333 722 0 0 722 0 333 500 500 500 500 200 500 333 760 276 500 564 333 760 333 400 564 300 300 333 500 453 250 333 300 310 500 750 750 750 444 722 722 722 722 722 722 889 667 611 611 611 611 333 333 333 333 722 722 722 722 722 722 722 564 722 722 722 722 722 722 556 500 444 444 444 444 444 444 667 444 444 444 444 444 278 278 278 278 500 500 500 500 500 500 500 564 500 500 500 500 500] endobj 699 0 obj [556 556 167 333 667 278 333 333 0 333 570 0 667 444 333 278 0 0 0 0 0 0 0 0 0 0 0 0 333 278 250 333 555 500 500 1000 833 333 333 333 500 570 250 333 250 278 500 500 500 500 500 500 500 500 500 500 333 333 570 570 570 500 930 722 667 722 722 667 611 778 778 389 500 778 667 944 722 778 611 778 722 556 667 722 722 1000 722 722 667 333 278 333 581 500 333 500 556 444 556 444 333 500 556 278 333 556 278 833 556 500 556 556 444 389 333 556 500 722 500 500 444 394 220 394 520 0 0 0 333 500 500 1000 500 500 333 1000 556 333 1000 0 0 0 0 0 0 500 500 350 500] endobj 700 0 obj << /Length1 795 /Length2 813 /Length3 0 /Length 1360 /Filter /FlateDecode >> stream xڭyPg�Պ O(Pl d`$+`]v7aeٍ9[`*bAlQLA T9ԋC.?>{aab0)E2.<�'88Hh fp@MPHbOS$8� Ҹ2%KF7q& fbxv@N!8hy @ 5<G)q! h꣕j ,f!�HB PLS^K@M.M `8~dhJp<Nh?tPB1غa(? ``G|I%ȍ'pZk04gX 56c$:ofe@ý0N2Zݣ54^)ѸD x6ǿ -' I%LӰþ d$i�a<b%&((3rŏ85cG1YĪl3. iPjL~~&E\<Y rb(?HMc$3> 41Pז.l=Ic`O &"h\Tzw8:&cE}}Su#vfyrkmn{gM_cg5`~:Bo]Qջ{-3v9Ommd[yYj>1NN"y]I6CWGiszȋ5otiPX7fsMJwN͖~nƊ*nGCs뜃T N){R>5gJ.G7o:VnuN*oՅWYf$wY:,fl~}k2w#Yz9&gzE8("HT\lK2b.kL$={O9i/=cEt}JԳ>¥FN3"nfS⑤:g SWN̛֗/;)[65?Ze Di'љx;V3jo(Y"K"u96]]iUE ŕM^/v'wh@ S/Fu"םUM.oZt=I\k]ρĝ""TRVg7 i>n ?v@ntmg%^U=-D4griv@Q¿~3cK; Df_ܝ$N8h̚xXZJlY},v=U̵9?,ʵe:mg} endstream endobj 701 0 obj << /Type /FontDescriptor /FontName /DUHIOC+CMSY10 /Flags 4 /FontBBox [-29 -960 1116 775] /Ascent 750 /CapHeight 683 /Descent -194 /ItalicAngle -14 /StemV 85 /XHeight 431 /CharSet (/backslash/bullet/circledot) /FontFile 700 0 R >> endobj 702 0 obj << /Length1 1606 /Length2 6480 /Length3 0 /Length 7296 /Filter /FlateDecode >> stream xڭWeXF.Q;Nff`f(EQBKFZ~g}_uZ׽ֽz_6&=>D`R�+ZSD!(1 e*0B�P0@H�$f(!=Q0{ 1,C�D�7(E`n  P� �%]=S 5�!@ @p-hPC��0. �hg(v :v('}(s �Cᮐnv?Qț AQ0g &_<1 h؍ K㻁b@0z`~粅 03yC C/� p(}s;?9;=F' nr17ab߃C!AQ{fnH H� 17)7s"$'5{ 뀜n ps Zw9&п; )2Ъ0(D;�@" Ph�>|O``G曆" g~#j&JJJ<MDݨy|CFB�x%�b@8dZA<�7% ϿVQASb! 7Oo7Y)?#z@ߐ`g)IR>ef NG&İyB˒~ϱM_˚+]ʹpxnl:q@$I[^{ZsfbF+ }O.Q{\,nԬ'ΤHzJ,Ҝ-Ύ<Dl :߸MX |w&Jr臿ArQD$ymC&5j><~kW$U'cv([A8";[rDfZ3V- OӀdx_h qx{v.wqN[⺧9T*X2nNR]G^$(d$b$!lG3:oY|Hr -{.}|ݙ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ϺC=tR䲑~ V˿'IxKjK{&khnN"54ܴ*|P󮷆|8P%e,s*kQk{D=lfZIBo#ӱ逴MΎ>q>SkGN5ڊ{~P795ϳ@^sK9`ZTq{TQW5_]Q z?r}&Z@@:h]IAm4lZBt ^CWOEyXvN.Veѵ:xwg%*l%('v5,&{W~Oi1['[A%bebiP(N(SHk/Pz0&њveXw#dP48>(ܖ䔫R3zS4n~TԾHv^qI> 66uhMʿ4*:q^@XLuMOǧEֹ'S}W@.d:18;NGrŽ/g9sGŨpI$0Sr%TnǶ~{9W^K`풮YRƆ\YҾ{ey)-|L^5<h``/s˻|'"(%3;ћA'x)Ĕ23RVLa|)!WŇ*Qٙ^& #Rl urI:%äV79ūc/(,J0e5w'R&Ho(h;$읫¾Ŗkz\4d=ӋkȽF8yXdfe;ɤ* 0kbm/ЄhsէUL+&*5ē-hqgXN߅7O8d̀$0,]mA#IlbI>s϶ ?@TcBj۸c>lo5ZNŦ<$01b|c[ Hkg ꞟ'DS~S{ жd0T) w"~۰YXԥZAGiV(Kz&xUaޞݪw+\ u^#VЫXƫv47f,t 3NjZ&7u8c .|R贆7&z8#?ߙVxAUnZ7羻7=uZ? n O:-U -e2]q(D,1`$,ŬeUY}ňͩ~bX{jb *ڳ`q!9`Kp(OI� ])CnP|UkB9Jxu!/>zp(Jʧ GO=ir>!NsAbW)uDPx\[t*8ީKC 4(qg?Muxb ]dgy5k5eE) pi`h0J-Z 26Q fnKH`j V+s!,Gl H&>i_?-.l2upC.kײQ&:]16sOf3GBwv/ψm�ja>&={xj6"N=@�.1% endstream endobj 703 0 obj << /Type /FontDescriptor /FontName /GXYCCC+NimbusMonL-Bold /Flags 4 /FontBBox [-43 -278 681 871] /Ascent 623 /CapHeight 552 /Descent -126 /ItalicAngle 0 /StemV 101 /XHeight 439 /CharSet (/a/e/f/g/i/l/m/n/o/p/period/t/u) /FontFile 702 0 R >> endobj 704 0 obj << /Length1 1612 /Length2 18511 /Length3 0 /Length 19344 /Filter /FlateDecode >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FLFm$"F7z0vm/3|V|uf-n`%< ~�׀DKgQdD˹h'!XٜfvJE DxQKƂgR]`L>'껝-3e9Ek"ѸABq2sd #5n͘?L:nd޻Y+^NV Ԝ\ 8ܗyz)+όm|<}\}Yr /l΋anAHKM#/!j_zV0TOV\U!;+0M uo^@W33#4 ɊQȀ~"#ȫܷK$?fcQ_)p)ͭ۫ ~J'XE?CVMqnBd[pOX7R[ɭ6`֦p/a:I9Aވ Q .+/[RU|vv3/<7:BI5DBDm  +̖Z|HmFX#rF%B22@I%6�=)z}(WwED+!],kc2ȱ|EG MTȜ;kjhvZ͆gjXza]�6Xw Co9-8K7'2ʼ?Y 6=h|\pЪ!q &XF:�SɢYl-GAqwMgY˷'4vQ@ X7~:89){#r ԐN}fŌPϟU(1$>&8fS 369ցX\k[)v7kηs0bii!2|6 �U?Arf҂\~H[ELUn/[d7�B<%*~ HauՑOo hz!g܌8xIp3Y}>pfx$YGHA4q JQ3JH88(e.qyyj2YM͐btԱE,ہ=Bp f;w Ķ^~G&ޱ6}u<,C*`@sUKЋ1~ed2]~=LRƤ !lU;Le Fi30$ �1i nl̗h5*6*H0 %V1.V {BLJ7.2"^#`?Vce&k~mmvC(<>Œd,>J,X0Ip8K =LThf y$(9Ӑ9i$$d#kuh.F!yovžd8UFcQy<q""/?}HңMU祦(%@I>!fz MZ�'CG4XapedhCD|w VѕrBUCι:G|ˆeڊ�8@g 7\c}ʾ0dӟ ԫdD<v endstream endobj 705 0 obj << /Type /FontDescriptor /FontName /VIPULB+NimbusMonL-Regu /Flags 4 /FontBBox [-12 -237 650 811] /Ascent 625 /CapHeight 557 /Descent -147 /ItalicAngle 0 /StemV 41 /XHeight 426 /CharSet (/A/B/C/D/E/F/G/H/I/J/L/M/N/O/P/R/S/T/U/V/W/a/ampersand/asciicircum/asciitilde/asterisk/at/b/backslash/bar/braceleft/braceright/bracketleft/bracketright/c/colon/comma/d/dollar/e/eight/equal/exclam/f/five/four/g/greater/h/hyphen/i/j/k/l/less/m/n/nine/numbersign/o/one/p/parenleft/parenright/period/plus/q/question/quotedbl/quoteleft/quoteright/r/s/semicolon/seven/six/slash/t/three/two/u/underscore/v/w/x/y/z/zero) /FontFile 704 0 R >> endobj 706 0 obj << /Length1 1626 /Length2 15974 /Length3 0 /Length 16827 /Filter /FlateDecode >> stream xڬcx%;T<mVŶ*IŶm6*mwڧϟ>ߏ51s̵ȈULLF.N\tr&v6822GSCgK{;QCgSn @ `#--jT44e'`?=3,�~mMB_'-Lf6�EM)y �@bdci 46s2;l}�ۙXӚ_,!'! hjl7�4utrt;9=f"taL [UQT<- d 7iboOKu6s8:S`b1t[/_4\,-/__} @e+qtv21cb[omsK;8vEo ~:k@ _&v6n�S38y{%w* -?5..66o #ch�d<4.C[KV77[a{I9_Ymtt55Qt6�׿jv&6vuHtLS4G�LL_EARVC\E+P8rٛ?0tL�:Vw/!.vFC1YoFu?:?klhgw_uv?ySSWScE{c�TqQ?=LzՂ<*nmr@IVSǾ4p Ewe.' Uo v?b3W[Z?vƕޡ'Ya|H~>;@PjO㏟)Go {qiax 1O ?!_r�AF\Z+"&mirf }4; Uwr?t#mD\gk% Ac҈J!_bz"!G9j Y*jZ(C{PCO@!Jd\YcF |kM;{O@. 4ܗ}AjF5/`MPxdqpS^o @ QhDUnqc>ofsUMZaNZ.l&iܛWm|~-cӏ\~1-g`|/GTQs9aPd{160@w,Sr.SN{%ꨝX,QsT|];œqg7a3;x[<ؽ*,|\P;}a3BU/4f&0big[J]mĤLJ5X=Dҗ7ЙuPK|z}_̃vt:m7Cc=ο2owuSe!3] Z0 P~rnAi=�LM+PjٸdSym#c5 Z52GEK=4zج@*_qV|5O8-* 'NYb..7}GmdP{ ?Mɲ@m:?Xz[&tw?-'K{}]!OPKVk۫]%&AZ#I͛hi{-[c @ HYN>6xcX+>3a_X߭d5|./{!f Fȍ´+h]Fv`b?iYref+9Q5iX<iQf !"~LRm(#\nF7d/d5V[2ΗYwZpED=;B 1JK;6junS6SDΜMǮsh,xhr'b+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iĢ.7j<GҲѥ,|{Cknp߁4 > PcӘxUpڑ qO6T79k6>u)J;; 'j2 I/?ƌ}uN8,,LL-5?%P}C1`` FZĥb{e` #4K77g�Zdm",)?)cvWl(ρ$:cM&Z =C݇=^ L * i.t* I|l̈�[w6<S|]Uq:@s" NU:F,LFwAOQ:-8ÚWN[c;7>VDnժ+'^fN~Ezb+C/E[7w/l9k ۔fS$Ud ȌaH0wW鶢DʽJ{0@6wC'.G ;XDQ w.`%$CYit5QqYX=Tl79mbVk۽ cL0.-i*tCAob1R(qɯcǢUm<QE@{";-dV rya~^ll8 Ebu(pS?pBaEcb}#%S`z0?fG\ۥ<8C3CGv5o(yu9hM]l.2%jPtqdrGZ+X@lV5SKT~TI{_$mA|twt,pw) 6VDžj%续`y{r:b^$S !LE8qFk.,۲=e.t2(Cx].7Lǂ&~#ߔ6R{G˯/ƤVk%w!t4㧱FR f˔[JPFmDfY |ҨFG cH�  y%2p Pؐkh[Kn@<q'KIw ig3avRIUgj�9"D!H\j' +�TH2P7R4VzHF.$ӺpzD(jx3SpްkI&f>帢r^_-l凙v-a4[?z nn9[нcLϫ`"9Ò^úahQgzT,>L󨾯٩~"xyN.A_%Hτl%Tfbl>w��@#6!|%< KX,rة"mL1ܻ{Ĺ+\ ~3bc63YؒB^7ɯ$|pZZk`AƋxɑYF$Y ѩiҩJ,Pd wv ăM=$tCC93M86&AP I􅱌eUQ endstream endobj 707 0 obj << /Type /FontDescriptor /FontName /HLXFST+NimbusRomNo9L-Medi /Flags 4 /FontBBox [-168 -341 1000 960] /Ascent 690 /CapHeight 690 /Descent -209 /ItalicAngle 0 /StemV 140 /XHeight 461 /CharSet (/A/C/D/E/F/G/H/I/L/M/N/O/P/Q/S/T/U/W/X/a/ampersand/b/c/colon/comma/d/e/eight/endash/exclam/f/fi/five/four/g/greater/h/hyphen/i/j/k/l/less/m/n/nine/o/one/p/parenleft/parenright/period/q/question/quoteright/r/s/seven/six/slash/t/three/two/u/v/w/x/y/z/zero) /F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sv%G?Ӷ"/?Yա40fYT(l{"]O`LuEDO[!G"|2^Ö.A-ƨ|rO._5LN* tI2:3ob!m{�NgE z;?hQ}_'IlA⍞3/mG918-e?!\ɼ?!Z|͓=�3ܨ8�1`ek&;zt}6њiA(rm_lNsv[,j.ϙ�&<_^ڤeZo#hт}mk !YV16؅!q.pDcb05`_\v`~`;OhΆ#ƿʶRv@/%A]䃆8hN|7u< >; .Kf>hlg;|ɬ/%8oJɠNWIXX;mfY4i7!H0 eȼqݣ}N 883rv^OxLg7i%f/SUnRI5~ endstream endobj 709 0 obj << /Type /FontDescriptor /FontName /ITYOZV+NimbusRomNo9L-Regu /Flags 4 /FontBBox [-168 -281 1000 924] /Ascent 678 /CapHeight 651 /Descent -216 /ItalicAngle 0 /StemV 85 /XHeight 450 /CharSet (/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/a/ampersand/asterisk/b/c/circumflex/colon/comma/d/dollar/e/eight/endash/equal/exclam/f/fi/five/fl/four/g/greater/h/hyphen/i/iacute/j/k/l/less/m/macron/n/nine/numbersign/o/one/p/parenleft/parenright/period/plus/q/question/quotedbl/quotedblleft/quotedblright/quoteright/r/s/semicolon/seven/six/slash/t/three/two/u/udieresis/underscore/v/w/x/y/z/zero) /FontFile 708 0 R >> endobj 710 0 obj << /Length1 1647 /Length2 1282 /Length3 0 /Length 2068 /Filter /FlateDecode >> stream xڭTkXg/T Đ -\ 8 `2g& x).X(D "`Q,FwAUIڇi<;vB"\pbr  d. Ĺf"V)H hΗ@ 1?BA"~ _\"PG-Z TGHc`!Hq ("$E]0VtA �D@,N�8&BN47 @%ȵb GJ7@I & RH[�mu M t ?XIK{pXmI44JA(F QR\BPR.TtnLN2$?V"DR$i[{;˥*]4PJ4ɈL):ŌXyc8"= bhgƁ.TDH+蔀Tvt"?D?'x~{OSH=Ea5@�F @pPB!*U^xd_9c)112fFIDDA(K@,$/OgD!E1Ywt= FL`=к:`V9ζ9SA5SD�.pRJq~s:/M?iuD�"P%f;@}<GqvB)ѣaAЊ Gr\fvUby/gb.鲰"z{G܂ Ż5?W=_u㚅Ծ0җg`PυUn]aŜ6zUpR+M!1s4UK)#I$rDH遙(9la ׫&<x쀡dxwj1T<MxVw M&{~Kk$F;5|e$-C`ѣnvJlû_L{Rj*GW#^u6c1}WBPRIrNq谏"Vy9TS}^suڼ5eo3 7Zl^-!֔%ӥv3c3 ) eyfK2Z*q[ 1jg֒S^[�kCO'Wf=ڼuBcz{(xgRE ҷ(iu%,(,ݾ%l9kѢ#_UMIWUNouS-+f\h[s^h{n]2N%{FDcq)NJ;q+{Kṳ?tݢnޕ{4kSN<$@&\ sk4^g\]/)PרJs4Sv_.Wxr@jk֛7ϱKVX^[waUju+wSH\9s K6W/@6WVt ,n:3y/}ڌ}?Wy):R:~bpwnԴ鷇4 t]Uki?[תTd5gx_ʍf3.qwgSt)W vLͭkuiww~ڬ7׫;屓@59tCv;op{#ӓmh?u驴+2yg{~DNjܒs8)̯O2 SЬGZp?yçEb9X٥8ދ7W~v=aKD0.x2wK6w=:kni^UԍYp[η^gיECiq+~Jb5`UT3ՙ&[&%rK)}lzT\U-}]gOaqmV(܄xs3}BN$O>+ݨj, Gڶzm{k]ϩh{z鿓 C endstream endobj 711 0 obj << /Type /FontDescriptor /FontName /EBLLKD+NimbusRomNo9L-ReguItal /Flags 4 /FontBBox [-169 -270 1010 924] /Ascent 668 /CapHeight 668 /Descent -193 /ItalicAngle -15 /StemV 78 /XHeight 441 /CharSet (/h) /FontFile 710 0 R >> endobj 693 0 obj << /Type /Encoding /Differences [2/fi/fl 33/exclam/quotedbl/numbersign/dollar 38/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde 136/circumflex 147/quotedblleft/quotedblright 150/endash 175/macron 237/iacute 252/udieresis] >> endobj 484 0 obj << /Type /Font /Subtype /Type1 /BaseFont /DUHIOC+CMSY10 /FontDescriptor 701 0 R /FirstChar 12 /LastChar 110 /Widths 696 0 R >> endobj 687 0 obj << /Type /Font /Subtype /Type1 /BaseFont /GXYCCC+NimbusMonL-Bold /FontDescriptor 703 0 R /FirstChar 46 /LastChar 117 /Widths 694 0 R /Encoding 693 0 R >> endobj 411 0 obj << /Type /Font /Subtype /Type1 /BaseFont /VIPULB+NimbusMonL-Regu /FontDescriptor 705 0 R /FirstChar 33 /LastChar 126 /Widths 697 0 R /Encoding 693 0 R >> endobj 409 0 obj << /Type /Font /Subtype /Type1 /BaseFont /HLXFST+NimbusRomNo9L-Medi /FontDescriptor 707 0 R /FirstChar 2 /LastChar 150 /Widths 699 0 R /Encoding 693 0 R >> endobj 410 0 obj << /Type /Font /Subtype /Type1 /BaseFont /ITYOZV+NimbusRomNo9L-Regu /FontDescriptor 709 0 R /FirstChar 2 /LastChar 252 /Widths 698 0 R /Encoding 693 0 R >> endobj 678 0 obj << /Type /Font /Subtype /Type1 /BaseFont /EBLLKD+NimbusRomNo9L-ReguItal /FontDescriptor 711 0 R /FirstChar 104 /LastChar 104 /Widths 695 0 R /Encoding 693 0 R >> endobj 413 0 obj << /Type /Pages /Count 6 /Parent 712 0 R /Kids [366 0 R 466 0 R 477 0 R 494 0 R 506 0 R 528 0 R] >> endobj 539 0 obj << /Type /Pages /Count 6 /Parent 712 0 R /Kids [536 0 R 557 0 R 567 0 R 573 0 R 579 0 R 589 0 R] >> endobj 601 0 obj << /Type /Pages /Count 6 /Parent 712 0 R /Kids [598 0 R 620 0 R 652 0 R 669 0 R 675 0 R 680 0 R] >> endobj 688 0 obj << /Type /Pages /Count 2 /Parent 712 0 R /Kids [684 0 R 690 0 R] >> endobj 712 0 obj << /Type /Pages /Count 20 /Kids [413 0 R 539 0 R 601 0 R 688 0 R] >> endobj 713 0 obj << /Type /Outlines /First 7 0 R /Last 363 0 R /Count 9 >> endobj 363 0 obj << /Title 364 0 R /A 361 0 R /Parent 713 0 R /Prev 327 0 R >> endobj 359 0 obj << /Title 360 0 R /A 357 0 R /Parent 327 0 R /Prev 355 0 R >> endobj 355 0 obj << /Title 356 0 R /A 353 0 R /Parent 327 0 R /Prev 351 0 R /Next 359 0 R >> endobj 351 0 obj << /Title 352 0 R /A 349 0 R /Parent 327 0 R /Prev 347 0 R /Next 355 0 R >> endobj 347 0 obj << /Title 348 0 R /A 345 0 R /Parent 327 0 R /Prev 343 0 R /Next 351 0 R >> endobj 343 0 obj << /Title 344 0 R /A 341 0 R /Parent 327 0 R /Prev 339 0 R /Next 347 0 R >> endobj 339 0 obj << /Title 340 0 R /A 337 0 R /Parent 327 0 R /Prev 335 0 R /Next 343 0 R >> endobj 335 0 obj << /Title 336 0 R /A 333 0 R /Parent 327 0 R /Prev 331 0 R /Next 339 0 R >> endobj 331 0 obj << /Title 332 0 R /A 329 0 R /Parent 327 0 R /Next 335 0 R >> endobj 327 0 obj << /Title 328 0 R /A 325 0 R /Parent 713 0 R /Prev 275 0 R /Next 363 0 R /First 331 0 R /Last 359 0 R /Count -8 >> endobj 323 0 obj << /Title 324 0 R /A 321 0 R /Parent 275 0 R /Prev 319 0 R >> endobj 319 0 obj << /Title 320 0 R /A 317 0 R /Parent 275 0 R /Prev 315 0 R /Next 323 0 R >> endobj 315 0 obj << /Title 316 0 R /A 313 0 R /Parent 275 0 R /Prev 311 0 R /Next 319 0 R >> endobj 311 0 obj << /Title 312 0 R /A 309 0 R /Parent 275 0 R /Prev 307 0 R /Next 315 0 R >> endobj 307 0 obj << /Title 308 0 R /A 305 0 R /Parent 275 0 R /Prev 303 0 R /Next 311 0 R >> endobj 303 0 obj << /Title 304 0 R /A 301 0 R /Parent 275 0 R /Prev 299 0 R /Next 307 0 R >> endobj 299 0 obj << /Title 300 0 R /A 297 0 R /Parent 275 0 R /Prev 295 0 R /Next 303 0 R >> endobj 295 0 obj << /Title 296 0 R /A 293 0 R /Parent 275 0 R /Prev 291 0 R /Next 299 0 R >> endobj 291 0 obj << /Title 292 0 R /A 289 0 R /Parent 275 0 R /Prev 287 0 R /Next 295 0 R >> endobj 287 0 obj << /Title 288 0 R /A 285 0 R /Parent 275 0 R /Prev 283 0 R /Next 291 0 R >> endobj 283 0 obj << /Title 284 0 R /A 281 0 R /Parent 275 0 R /Prev 279 0 R /Next 287 0 R >> endobj 279 0 obj << /Title 280 0 R /A 277 0 R /Parent 275 0 R /Next 283 0 R >> endobj 275 0 obj << /Title 276 0 R /A 273 0 R /Parent 713 0 R /Prev 231 0 R /Next 327 0 R /First 279 0 R /Last 323 0 R /Count -12 >> endobj 271 0 obj << /Title 272 0 R /A 269 0 R /Parent 231 0 R /Prev 267 0 R >> endobj 267 0 obj << /Title 268 0 R /A 265 0 R /Parent 231 0 R /Prev 263 0 R /Next 271 0 R >> endobj 263 0 obj << /Title 264 0 R /A 261 0 R /Parent 231 0 R /Prev 259 0 R /Next 267 0 R >> endobj 259 0 obj << /Title 260 0 R /A 257 0 R /Parent 231 0 R /Prev 255 0 R /Next 263 0 R >> endobj 255 0 obj << /Title 256 0 R /A 253 0 R /Parent 231 0 R /Prev 251 0 R /Next 259 0 R >> endobj 251 0 obj << /Title 252 0 R /A 249 0 R /Parent 231 0 R /Prev 247 0 R /Next 255 0 R >> endobj 247 0 obj << /Title 248 0 R /A 245 0 R /Parent 231 0 R /Prev 243 0 R /Next 251 0 R >> endobj 243 0 obj << /Title 244 0 R /A 241 0 R /Parent 231 0 R /Prev 239 0 R /Next 247 0 R >> endobj 239 0 obj << /Title 240 0 R /A 237 0 R /Parent 231 0 R /Prev 235 0 R /Next 243 0 R >> endobj 235 0 obj << /Title 236 0 R /A 233 0 R /Parent 231 0 R /Next 239 0 R >> endobj 231 0 obj << /Title 232 0 R /A 229 0 R /Parent 713 0 R /Prev 155 0 R /Next 275 0 R /First 235 0 R /Last 271 0 R /Count -10 >> endobj 227 0 obj << /Title 228 0 R /A 225 0 R /Parent 155 0 R /Prev 223 0 R >> endobj 223 0 obj << /Title 224 0 R /A 221 0 R /Parent 155 0 R /Prev 219 0 R /Next 227 0 R >> endobj 219 0 obj << /Title 220 0 R /A 217 0 R /Parent 155 0 R /Prev 215 0 R /Next 223 0 R >> endobj 215 0 obj << /Title 216 0 R /A 213 0 R /Parent 155 0 R /Prev 211 0 R /Next 219 0 R >> endobj 211 0 obj << /Title 212 0 R /A 209 0 R /Parent 155 0 R /Prev 207 0 R /Next 215 0 R >> endobj 207 0 obj << /Title 208 0 R /A 205 0 R /Parent 155 0 R /Prev 203 0 R /Next 211 0 R >> endobj 203 0 obj << /Title 204 0 R /A 201 0 R /Parent 155 0 R /Prev 199 0 R /Next 207 0 R >> endobj 199 0 obj << /Title 200 0 R /A 197 0 R /Parent 155 0 R /Prev 195 0 R /Next 203 0 R >> endobj 195 0 obj << /Title 196 0 R /A 193 0 R /Parent 155 0 R /Prev 191 0 R /Next 199 0 R >> endobj 191 0 obj << /Title 192 0 R /A 189 0 R /Parent 155 0 R /Prev 187 0 R /Next 195 0 R >> endobj 187 0 obj << /Title 188 0 R /A 185 0 R /Parent 155 0 R /Prev 183 0 R /Next 191 0 R >> endobj 183 0 obj << /Title 184 0 R /A 181 0 R /Parent 155 0 R /Prev 179 0 R /Next 187 0 R >> endobj 179 0 obj << /Title 180 0 R /A 177 0 R /Parent 155 0 R /Prev 175 0 R /Next 183 0 R >> endobj 175 0 obj << /Title 176 0 R /A 173 0 R /Parent 155 0 R /Prev 171 0 R /Next 179 0 R >> endobj 171 0 obj << /Title 172 0 R /A 169 0 R /Parent 155 0 R /Prev 167 0 R /Next 175 0 R >> endobj 167 0 obj << /Title 168 0 R /A 165 0 R /Parent 155 0 R /Prev 163 0 R /Next 171 0 R >> endobj 163 0 obj << /Title 164 0 R /A 161 0 R /Parent 155 0 R /Prev 159 0 R /Next 167 0 R >> endobj 159 0 obj << /Title 160 0 R /A 157 0 R /Parent 155 0 R /Next 163 0 R >> endobj 155 0 obj << /Title 156 0 R /A 153 0 R /Parent 713 0 R /Prev 91 0 R /Next 231 0 R /First 159 0 R /Last 227 0 R /Count -18 >> endobj 151 0 obj << /Title 152 0 R /A 149 0 R /Parent 91 0 R /Prev 147 0 R >> endobj 147 0 obj << /Title 148 0 R /A 145 0 R /Parent 91 0 R /Prev 143 0 R /Next 151 0 R >> endobj 143 0 obj << /Title 144 0 R /A 141 0 R /Parent 91 0 R /Prev 139 0 R /Next 147 0 R >> endobj 139 0 obj << /Title 140 0 R /A 137 0 R /Parent 91 0 R /Prev 135 0 R /Next 143 0 R >> endobj 135 0 obj << /Title 136 0 R /A 133 0 R /Parent 91 0 R /Prev 131 0 R /Next 139 0 R >> endobj 131 0 obj << /Title 132 0 R /A 129 0 R /Parent 91 0 R /Prev 127 0 R /Next 135 0 R >> endobj 127 0 obj << /Title 128 0 R /A 125 0 R /Parent 91 0 R /Prev 123 0 R /Next 131 0 R >> endobj 123 0 obj << /Title 124 0 R /A 121 0 R /Parent 91 0 R /Prev 119 0 R /Next 127 0 R >> endobj 119 0 obj << /Title 120 0 R /A 117 0 R /Parent 91 0 R /Prev 115 0 R /Next 123 0 R >> endobj 115 0 obj << /Title 116 0 R /A 113 0 R /Parent 91 0 R /Prev 111 0 R /Next 119 0 R >> endobj 111 0 obj << /Title 112 0 R /A 109 0 R /Parent 91 0 R /Prev 107 0 R /Next 115 0 R >> endobj 107 0 obj << /Title 108 0 R /A 105 0 R /Parent 91 0 R /Prev 103 0 R /Next 111 0 R >> endobj 103 0 obj << /Title 104 0 R /A 101 0 R /Parent 91 0 R /Prev 99 0 R /Next 107 0 R >> endobj 99 0 obj << /Title 100 0 R /A 97 0 R /Parent 91 0 R /Prev 95 0 R /Next 103 0 R >> endobj 95 0 obj << /Title 96 0 R /A 93 0 R /Parent 91 0 R /Next 99 0 R >> endobj 91 0 obj << /Title 92 0 R /A 89 0 R /Parent 713 0 R /Prev 55 0 R /Next 155 0 R /First 95 0 R /Last 151 0 R /Count -15 >> endobj 87 0 obj << /Title 88 0 R /A 85 0 R /Parent 55 0 R /Prev 83 0 R >> endobj 83 0 obj << /Title 84 0 R /A 81 0 R /Parent 55 0 R /Prev 79 0 R /Next 87 0 R >> endobj 79 0 obj << /Title 80 0 R /A 77 0 R /Parent 55 0 R /Prev 75 0 R /Next 83 0 R >> endobj 75 0 obj << /Title 76 0 R /A 73 0 R /Parent 55 0 R /Prev 71 0 R /Next 79 0 R >> endobj 71 0 obj << /Title 72 0 R /A 69 0 R /Parent 55 0 R /Prev 67 0 R /Next 75 0 R >> endobj 67 0 obj << /Title 68 0 R /A 65 0 R /Parent 55 0 R /Prev 63 0 R /Next 71 0 R >> endobj 63 0 obj << /Title 64 0 R /A 61 0 R /Parent 55 0 R /Prev 59 0 R /Next 67 0 R >> endobj 59 0 obj << /Title 60 0 R /A 57 0 R /Parent 55 0 R /Next 63 0 R >> endobj 55 0 obj << /Title 56 0 R /A 53 0 R /Parent 713 0 R /Prev 19 0 R /Next 91 0 R /First 59 0 R /Last 87 0 R /Count -8 >> endobj 51 0 obj << /Title 52 0 R /A 49 0 R /Parent 19 0 R /Prev 47 0 R >> endobj 47 0 obj << /Title 48 0 R /A 45 0 R /Parent 19 0 R /Prev 43 0 R /Next 51 0 R >> endobj 43 0 obj << /Title 44 0 R /A 41 0 R /Parent 19 0 R /Prev 39 0 R /Next 47 0 R >> endobj 39 0 obj << /Title 40 0 R /A 37 0 R /Parent 19 0 R /Prev 35 0 R /Next 43 0 R >> endobj 35 0 obj << /Title 36 0 R /A 33 0 R /Parent 19 0 R /Prev 31 0 R /Next 39 0 R >> endobj 31 0 obj << /Title 32 0 R /A 29 0 R /Parent 19 0 R /Prev 27 0 R /Next 35 0 R >> endobj 27 0 obj << /Title 28 0 R /A 25 0 R /Parent 19 0 R /Prev 23 0 R /Next 31 0 R >> endobj 23 0 obj << /Title 24 0 R /A 21 0 R /Parent 19 0 R /Next 27 0 R >> endobj 19 0 obj << /Title 20 0 R /A 17 0 R /Parent 713 0 R /Prev 7 0 R /Next 55 0 R /First 23 0 R /Last 51 0 R /Count -8 >> endobj 15 0 obj << /Title 16 0 R /A 13 0 R /Parent 7 0 R /Prev 11 0 R >> endobj 11 0 obj << /Title 12 0 R /A 9 0 R /Parent 7 0 R /Next 15 0 R >> endobj 7 0 obj << /Title 8 0 R /A 5 0 R /Parent 713 0 R /Next 19 0 R /First 11 0 R /Last 15 0 R /Count -2 >> endobj 714 0 obj << /Names [(Doc-Start) 408 0 R (page.1) 407 0 R (page.10) 575 0 R (page.11) 581 0 R (page.12) 591 0 R (page.13) 600 0 R] /Limits [(Doc-Start) (page.13)] >> endobj 715 0 obj << /Names [(page.14) 622 0 R (page.15) 654 0 R (page.16) 671 0 R (page.17) 677 0 R (page.18) 682 0 R (page.19) 686 0 R] /Limits [(page.14) (page.19)] >> endobj 716 0 obj << /Names [(page.2) 468 0 R (page.20) 692 0 R (page.3) 479 0 R (page.4) 496 0 R (page.5) 508 0 R (page.6) 530 0 R] /Limits [(page.2) (page.6)] >> endobj 717 0 obj << /Names [(page.7) 538 0 R (page.8) 559 0 R (page.9) 569 0 R (section*.1) 412 0 R (section.0) 6 0 R (section.1) 18 0 R] /Limits [(page.7) (section.1)] >> endobj 718 0 obj << /Names [(section.2) 54 0 R (section.3) 90 0 R (section.4) 154 0 R (section.5) 230 0 R (section.6) 274 0 R (section.7) 326 0 R] /Limits [(section.2) (section.7)] >> endobj 719 0 obj << /Names [(section.8) 362 0 R (subsection.0.1) 10 0 R (subsection.0.2) 14 0 R (subsection.1.1) 22 0 R (subsection.1.2) 26 0 R (subsection.1.3) 30 0 R] /Limits [(section.8) (subsection.1.3)] >> endobj 720 0 obj << /Names [(subsection.1.4) 34 0 R (subsection.1.5) 38 0 R (subsection.1.6) 42 0 R (subsection.1.7) 46 0 R (subsection.1.8) 50 0 R (subsection.2.1) 58 0 R] /Limits [(subsection.1.4) (subsection.2.1)] >> endobj 721 0 obj << /Names [(subsection.2.2) 62 0 R (subsection.2.3) 66 0 R (subsection.2.4) 70 0 R (subsection.2.5) 74 0 R (subsection.2.6) 78 0 R (subsection.2.7) 82 0 R] /Limits [(subsection.2.2) (subsection.2.7)] >> endobj 722 0 obj << /Names [(subsection.2.8) 86 0 R (subsection.3.1) 94 0 R (subsection.3.10) 130 0 R (subsection.3.11) 134 0 R (subsection.3.12) 138 0 R (subsection.3.13) 142 0 R] /Limits [(subsection.2.8) (subsection.3.13)] >> endobj 723 0 obj << /Names [(subsection.3.14) 146 0 R (subsection.3.15) 150 0 R (subsection.3.2) 98 0 R (subsection.3.3) 102 0 R (subsection.3.4) 106 0 R (subsection.3.5) 110 0 R] /Limits [(subsection.3.14) (subsection.3.5)] >> endobj 724 0 obj << /Names [(subsection.3.6) 114 0 R (subsection.3.7) 118 0 R (subsection.3.8) 122 0 R (subsection.3.9) 126 0 R (subsection.4.1) 158 0 R (subsection.4.10) 194 0 R] /Limits [(subsection.3.6) (subsection.4.10)] >> endobj 725 0 obj << /Names [(subsection.4.11) 198 0 R (subsection.4.12) 202 0 R (subsection.4.13) 206 0 R (subsection.4.14) 210 0 R (subsection.4.15) 214 0 R (subsection.4.16) 218 0 R] /Limits [(subsection.4.11) (subsection.4.16)] >> endobj 726 0 obj << /Names [(subsection.4.17) 222 0 R (subsection.4.18) 226 0 R (subsection.4.2) 162 0 R (subsection.4.3) 166 0 R (subsection.4.4) 170 0 R (subsection.4.5) 174 0 R] /Limits [(subsection.4.17) (subsection.4.5)] >> endobj 727 0 obj << /Names [(subsection.4.6) 178 0 R (subsection.4.7) 182 0 R (subsection.4.8) 186 0 R (subsection.4.9) 190 0 R (subsection.5.1) 234 0 R (subsection.5.10) 270 0 R] /Limits [(subsection.4.6) (subsection.5.10)] >> endobj 728 0 obj << /Names [(subsection.5.2) 238 0 R (subsection.5.3) 242 0 R (subsection.5.4) 246 0 R (subsection.5.5) 250 0 R (subsection.5.6) 254 0 R (subsection.5.7) 258 0 R] /Limits [(subsection.5.2) (subsection.5.7)] >> endobj 729 0 obj << /Names [(subsection.5.8) 262 0 R (subsection.5.9) 266 0 R (subsection.6.1) 278 0 R (subsection.6.10) 314 0 R (subsection.6.11) 318 0 R (subsection.6.12) 322 0 R] /Limits [(subsection.5.8) (subsection.6.12)] >> endobj 730 0 obj << /Names [(subsection.6.2) 282 0 R (subsection.6.3) 286 0 R (subsection.6.4) 290 0 R (subsection.6.5) 294 0 R (subsection.6.6) 298 0 R (subsection.6.7) 302 0 R] /Limits [(subsection.6.2) (subsection.6.7)] >> endobj 731 0 obj << /Names [(subsection.6.8) 306 0 R (subsection.6.9) 310 0 R (subsection.7.1) 330 0 R (subsection.7.2) 334 0 R (subsection.7.3) 338 0 R (subsection.7.4) 342 0 R] /Limits [(subsection.6.8) (subsection.7.4)] >> endobj 732 0 obj << /Names [(subsection.7.5) 346 0 R (subsection.7.6) 350 0 R (subsection.7.7) 354 0 R (subsection.7.8) 358 0 R] /Limits [(subsection.7.5) (subsection.7.8)] >> endobj 733 0 obj << /Kids [714 0 R 715 0 R 716 0 R 717 0 R 718 0 R 719 0 R] /Limits [(Doc-Start) (subsection.1.3)] >> endobj 734 0 obj << /Kids [720 0 R 721 0 R 722 0 R 723 0 R 724 0 R 725 0 R] /Limits [(subsection.1.4) (subsection.4.16)] >> endobj 735 0 obj << /Kids [726 0 R 727 0 R 728 0 R 729 0 R 730 0 R 731 0 R] /Limits [(subsection.4.17) (subsection.7.4)] >> endobj 736 0 obj << /Kids [732 0 R] /Limits [(subsection.7.5) (subsection.7.8)] >> endobj 737 0 obj << /Kids [733 0 R 734 0 R 735 0 R 736 0 R] /Limits [(Doc-Start) (subsection.7.8)] >> endobj 738 0 obj << /Dests 737 0 R >> endobj 739 0 obj << /Type /Catalog /Pages 712 0 R /Outlines 713 0 R /Names 738 0 R /PageMode/UseOutlines /OpenAction 365 0 R >> endobj 740 0 obj << /Author(gnuplot)/Title(gnuplot faq)/Subject(see www.gnuplot.info)/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.4)/Keywords() /CreationDate (D:20120302094948-08'00') /ModDate (D:20120302094948-08'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX using libpoppler, Version 3.141592-1.40.5-2.2 (Web2C 7.5.6) kpathsea version 3.5.6dev) >> endobj xref 0 741 0000000001 65535 f 0000000002 00000 f 0000000003 00000 f 0000000004 00000 f 0000000000 00000 f 0000000015 00000 n 0000035134 00000 n 0000200212 00000 n 0000000060 00000 n 0000000097 00000 n 0000035193 00000 n 0000200140 00000 n 0000000147 00000 n 0000000199 00000 n 0000035253 00000 n 0000200067 00000 n 0000000250 00000 n 0000000318 00000 n 0000035313 00000 n 0000199943 00000 n 0000000364 00000 n 0000000404 00000 n 0000035373 00000 n 0000199869 00000 n 0000000455 00000 n 0000000494 00000 n 0000035433 00000 n 0000199782 00000 n 0000000545 00000 n 0000000619 00000 n 0000035492 00000 n 0000199695 00000 n 0000000670 00000 n 0000000717 00000 n 0000039591 00000 n 0000199608 00000 n 0000000768 00000 n 0000000825 00000 n 0000039651 00000 n 0000199521 00000 n 0000000876 00000 n 0000000932 00000 n 0000039711 00000 n 0000199434 00000 n 0000000983 00000 n 0000001016 00000 n 0000039771 00000 n 0000199347 00000 n 0000001067 00000 n 0000001156 00000 n 0000039831 00000 n 0000199273 00000 n 0000001207 00000 n 0000001265 00000 n 0000039891 00000 n 0000199148 00000 n 0000001311 00000 n 0000001345 00000 n 0000039949 00000 n 0000199074 00000 n 0000001396 00000 n 0000001458 00000 n 0000045710 00000 n 0000198987 00000 n 0000001509 00000 n 0000001556 00000 n 0000045770 00000 n 0000198900 00000 n 0000001607 00000 n 0000001685 00000 n 0000045830 00000 n 0000198813 00000 n 0000001736 00000 n 0000001804 00000 n 0000045890 00000 n 0000198726 00000 n 0000001855 00000 n 0000001927 00000 n 0000052791 00000 n 0000198639 00000 n 0000001978 00000 n 0000002016 00000 n 0000052850 00000 n 0000198552 00000 n 0000002067 00000 n 0000002133 00000 n 0000052910 00000 n 0000198478 00000 n 0000002184 00000 n 0000002266 00000 n 0000052970 00000 n 0000198350 00000 n 0000002312 00000 n 0000002349 00000 n 0000053030 00000 n 0000198276 00000 n 0000002400 00000 n 0000002441 00000 n 0000053090 00000 n 0000198187 00000 n 0000002492 00000 n 0000002545 00000 n 0000056360 00000 n 0000198096 00000 n 0000002597 00000 n 0000002668 00000 n 0000063610 00000 n 0000198004 00000 n 0000002720 00000 n 0000002790 00000 n 0000063671 00000 n 0000197912 00000 n 0000002842 00000 n 0000002923 00000 n 0000063732 00000 n 0000197820 00000 n 0000002975 00000 n 0000003023 00000 n 0000063793 00000 n 0000197728 00000 n 0000003075 00000 n 0000003137 00000 n 0000066670 00000 n 0000197636 00000 n 0000003189 00000 n 0000003251 00000 n 0000066731 00000 n 0000197544 00000 n 0000003303 00000 n 0000003376 00000 n 0000066792 00000 n 0000197452 00000 n 0000003429 00000 n 0000003508 00000 n 0000066852 00000 n 0000197360 00000 n 0000003561 00000 n 0000003649 00000 n 0000069563 00000 n 0000197268 00000 n 0000003702 00000 n 0000003783 00000 n 0000069624 00000 n 0000197176 00000 n 0000003836 00000 n 0000003910 00000 n 0000072079 00000 n 0000197084 00000 n 0000003963 00000 n 0000004010 00000 n 0000072140 00000 n 0000197006 00000 n 0000004063 00000 n 0000004165 00000 n 0000072201 00000 n 0000196874 00000 n 0000004212 00000 n 0000004249 00000 n 0000072262 00000 n 0000196795 00000 n 0000004301 00000 n 0000004360 00000 n 0000072323 00000 n 0000196702 00000 n 0000004412 00000 n 0000004488 00000 n 0000077046 00000 n 0000196609 00000 n 0000004540 00000 n 0000004602 00000 n 0000077107 00000 n 0000196516 00000 n 0000004654 00000 n 0000004727 00000 n 0000077168 00000 n 0000196423 00000 n 0000004779 00000 n 0000004835 00000 n 0000077229 00000 n 0000196330 00000 n 0000004887 00000 n 0000004946 00000 n 0000077290 00000 n 0000196237 00000 n 0000004998 00000 n 0000005059 00000 n 0000077351 00000 n 0000196144 00000 n 0000005111 00000 n 0000005189 00000 n 0000077412 00000 n 0000196051 00000 n 0000005241 00000 n 0000005317 00000 n 0000077473 00000 n 0000195958 00000 n 0000005370 00000 n 0000005455 00000 n 0000077534 00000 n 0000195865 00000 n 0000005508 00000 n 0000005569 00000 n 0000080182 00000 n 0000195772 00000 n 0000005622 00000 n 0000005676 00000 n 0000080243 00000 n 0000195679 00000 n 0000005729 00000 n 0000005799 00000 n 0000080304 00000 n 0000195586 00000 n 0000005852 00000 n 0000005903 00000 n 0000080365 00000 n 0000195493 00000 n 0000005956 00000 n 0000006011 00000 n 0000080426 00000 n 0000195400 00000 n 0000006064 00000 n 0000006119 00000 n 0000080486 00000 n 0000195307 00000 n 0000006172 00000 n 0000006221 00000 n 0000088646 00000 n 0000195228 00000 n 0000006274 00000 n 0000006332 00000 n 0000088707 00000 n 0000195095 00000 n 0000006379 00000 n 0000006414 00000 n 0000088768 00000 n 0000195016 00000 n 0000006466 00000 n 0000006521 00000 n 0000088827 00000 n 0000194923 00000 n 0000006573 00000 n 0000006644 00000 n 0000088888 00000 n 0000194830 00000 n 0000006696 00000 n 0000006786 00000 n 0000097891 00000 n 0000194737 00000 n 0000006838 00000 n 0000006905 00000 n 0000097952 00000 n 0000194644 00000 n 0000006957 00000 n 0000007057 00000 n 0000098013 00000 n 0000194551 00000 n 0000007109 00000 n 0000007179 00000 n 0000098074 00000 n 0000194458 00000 n 0000007231 00000 n 0000007301 00000 n 0000098135 00000 n 0000194365 00000 n 0000007353 00000 n 0000007446 00000 n 0000102430 00000 n 0000194272 00000 n 0000007498 00000 n 0000007594 00000 n 0000102491 00000 n 0000194193 00000 n 0000007647 00000 n 0000007714 00000 n 0000102552 00000 n 0000194060 00000 n 0000007761 00000 n 0000007801 00000 n 0000102613 00000 n 0000193981 00000 n 0000007853 00000 n 0000007932 00000 n 0000102674 00000 n 0000193888 00000 n 0000007984 00000 n 0000008062 00000 n 0000102735 00000 n 0000193795 00000 n 0000008114 00000 n 0000008188 00000 n 0000102795 00000 n 0000193702 00000 n 0000008240 00000 n 0000008302 00000 n 0000106721 00000 n 0000193609 00000 n 0000008354 00000 n 0000008424 00000 n 0000106782 00000 n 0000193516 00000 n 0000008476 00000 n 0000008586 00000 n 0000106843 00000 n 0000193423 00000 n 0000008638 00000 n 0000008700 00000 n 0000106904 00000 n 0000193330 00000 n 0000008752 00000 n 0000008819 00000 n 0000106965 00000 n 0000193237 00000 n 0000008871 00000 n 0000008938 00000 n 0000107025 00000 n 0000193144 00000 n 0000008991 00000 n 0000009053 00000 n 0000109537 00000 n 0000193051 00000 n 0000009106 00000 n 0000009166 00000 n 0000109598 00000 n 0000192972 00000 n 0000009219 00000 n 0000009291 00000 n 0000109658 00000 n 0000192840 00000 n 0000009338 00000 n 0000009375 00000 n 0000109719 00000 n 0000192761 00000 n 0000009427 00000 n 0000009479 00000 n 0000112383 00000 n 0000192668 00000 n 0000009531 00000 n 0000009610 00000 n 0000112444 00000 n 0000192575 00000 n 0000009662 00000 n 0000009732 00000 n 0000112505 00000 n 0000192482 00000 n 0000009784 00000 n 0000009898 00000 n 0000112566 00000 n 0000192389 00000 n 0000009950 00000 n 0000010047 00000 n 0000115964 00000 n 0000192296 00000 n 0000010099 00000 n 0000010154 00000 n 0000116025 00000 n 0000192203 00000 n 0000010206 00000 n 0000010302 00000 n 0000116086 00000 n 0000192124 00000 n 0000010354 00000 n 0000010452 00000 n 0000116147 00000 n 0000192045 00000 n 0000010499 00000 n 0000010528 00000 n 0000012523 00000 n 0000012950 00000 n 0000013101 00000 n 0000013256 00000 n 0000013411 00000 n 0000013562 00000 n 0000013717 00000 n 0000013872 00000 n 0000014027 00000 n 0000014182 00000 n 0000014337 00000 n 0000014491 00000 n 0000014644 00000 n 0000014799 00000 n 0000014947 00000 n 0000015101 00000 n 0000015256 00000 n 0000015411 00000 n 0000015566 00000 n 0000015721 00000 n 0000015876 00000 n 0000016031 00000 n 0000016185 00000 n 0000016336 00000 n 0000016491 00000 n 0000016646 00000 n 0000016801 00000 n 0000016955 00000 n 0000017110 00000 n 0000017265 00000 n 0000017420 00000 n 0000017574 00000 n 0000017729 00000 n 0000017884 00000 n 0000018038 00000 n 0000018193 00000 n 0000018347 00000 n 0000018501 00000 n 0000021942 00000 n 0000018838 00000 n 0000010580 00000 n 0000018655 00000 n 0000018716 00000 n 0000190923 00000 n 0000191096 00000 n 0000190752 00000 n 0000018777 00000 n 0000191448 00000 n 0000022093 00000 n 0000022248 00000 n 0000022403 00000 n 0000022557 00000 n 0000022712 00000 n 0000022867 00000 n 0000023022 00000 n 0000023177 00000 n 0000023332 00000 n 0000023487 00000 n 0000023643 00000 n 0000023799 00000 n 0000023953 00000 n 0000024108 00000 n 0000024264 00000 n 0000024420 00000 n 0000024575 00000 n 0000024730 00000 n 0000024886 00000 n 0000025037 00000 n 0000025192 00000 n 0000025347 00000 n 0000025502 00000 n 0000025656 00000 n 0000025810 00000 n 0000025965 00000 n 0000026120 00000 n 0000026275 00000 n 0000026430 00000 n 0000026586 00000 n 0000026737 00000 n 0000026892 00000 n 0000027047 00000 n 0000027202 00000 n 0000027356 00000 n 0000027509 00000 n 0000027663 00000 n 0000027818 00000 n 0000027973 00000 n 0000028128 00000 n 0000028284 00000 n 0000028440 00000 n 0000028596 00000 n 0000028747 00000 n 0000028902 00000 n 0000029057 00000 n 0000029210 00000 n 0000029364 00000 n 0000029517 00000 n 0000029670 00000 n 0000032891 00000 n 0000029882 00000 n 0000021403 00000 n 0000018936 00000 n 0000029821 00000 n 0000033045 00000 n 0000033196 00000 n 0000033372 00000 n 0000033541 00000 n 0000033732 00000 n 0000034283 00000 n 0000034485 00000 n 0000035552 00000 n 0000032664 00000 n 0000029980 00000 n 0000035073 00000 n 0000033914 00000 n 0000034103 00000 n 0000034680 00000 n 0000034880 00000 n 0000190437 00000 n 0000038463 00000 n 0000038633 00000 n 0000038796 00000 n 0000038984 00000 n 0000043114 00000 n 0000043284 00000 n 0000043447 00000 n 0000043634 00000 n 0000040009 00000 n 0000038284 00000 n 0000035663 00000 n 0000039530 00000 n 0000039165 00000 n 0000039351 00000 n 0000043814 00000 n 0000043999 00000 n 0000044177 00000 n 0000044362 00000 n 0000044905 00000 n 0000045096 00000 n 0000045950 00000 n 0000042871 00000 n 0000040120 00000 n 0000045649 00000 n 0000044540 00000 n 0000044726 00000 n 0000045278 00000 n 0000045468 00000 n 0000049299 00000 n 0000049496 00000 n 0000049686 00000 n 0000049870 00000 n 0000050047 00000 n 0000050252 00000 n 0000050851 00000 n 0000051032 00000 n 0000051206 00000 n 0000051396 00000 n 0000051577 00000 n 0000051781 00000 n 0000052375 00000 n 0000052556 00000 n 0000053150 00000 n 0000049024 00000 n 0000046061 00000 n 0000052730 00000 n 0000050450 00000 n 0000050654 00000 n 0000051978 00000 n 0000052180 00000 n 0000056421 00000 n 0000056180 00000 n 0000053261 00000 n 0000056299 00000 n 0000191565 00000 n 0000059760 00000 n 0000059927 00000 n 0000060087 00000 n 0000060268 00000 n 0000060799 00000 n 0000060970 00000 n 0000061134 00000 n 0000061304 00000 n 0000061467 00000 n 0000061645 00000 n 0000062163 00000 n 0000062333 00000 n 0000062496 00000 n 0000062682 00000 n 0000062861 00000 n 0000063037 00000 n 0000063854 00000 n 0000059453 00000 n 0000056519 00000 n 0000063549 00000 n 0000060442 00000 n 0000060624 00000 n 0000061816 00000 n 0000061993 00000 n 0000063206 00000 n 0000063381 00000 n 0000066913 00000 n 0000066490 00000 n 0000063965 00000 n 0000066609 00000 n 0000068684 00000 n 0000068893 00000 n 0000069685 00000 n 0000068521 00000 n 0000067011 00000 n 0000069502 00000 n 0000069095 00000 n 0000069302 00000 n 0000072384 00000 n 0000071899 00000 n 0000069783 00000 n 0000072018 00000 n 0000074828 00000 n 0000075060 00000 n 0000075742 00000 n 0000075964 00000 n 0000076612 00000 n 0000076802 00000 n 0000077595 00000 n 0000074617 00000 n 0000072482 00000 n 0000076985 00000 n 0000075285 00000 n 0000075517 00000 n 0000076179 00000 n 0000076399 00000 n 0000079967 00000 n 0000080547 00000 n 0000079828 00000 n 0000077693 00000 n 0000080121 00000 n 0000191682 00000 n 0000084200 00000 n 0000084380 00000 n 0000084553 00000 n 0000084758 00000 n 0000085355 00000 n 0000085536 00000 n 0000085710 00000 n 0000085878 00000 n 0000086039 00000 n 0000086218 00000 n 0000086388 00000 n 0000086593 00000 n 0000087192 00000 n 0000087377 00000 n 0000087719 00000 n 0000087887 00000 n 0000088067 00000 n 0000088949 00000 n 0000083877 00000 n 0000080658 00000 n 0000088585 00000 n 0000084956 00000 n 0000085159 00000 n 0000086791 00000 n 0000086995 00000 n 0000087535 00000 n 0000088240 00000 n 0000088416 00000 n 0000092919 00000 n 0000093123 00000 n 0000093286 00000 n 0000093854 00000 n 0000094050 00000 n 0000094239 00000 n 0000094426 00000 n 0000094940 00000 n 0000095104 00000 n 0000095293 00000 n 0000095455 00000 n 0000095624 00000 n 0000095792 00000 n 0000095953 00000 n 0000096122 00000 n 0000096284 00000 n 0000096489 00000 n 0000097088 00000 n 0000097279 00000 n 0000101105 00000 n 0000101292 00000 n 0000098196 00000 n 0000092572 00000 n 0000089060 00000 n 0000097830 00000 n 0000093469 00000 n 0000093672 00000 n 0000094591 00000 n 0000094777 00000 n 0000096687 00000 n 0000096891 00000 n 0000097461 00000 n 0000097650 00000 n 0000101470 00000 n 0000101661 00000 n 0000101843 00000 n 0000102035 00000 n 0000102200 00000 n 0000102856 00000 n 0000100918 00000 n 0000098294 00000 n 0000102369 00000 n 0000106299 00000 n 0000106483 00000 n 0000107086 00000 n 0000106152 00000 n 0000102954 00000 n 0000106660 00000 n 0000191269 00000 n 0000109779 00000 n 0000109357 00000 n 0000107210 00000 n 0000109476 00000 n 0000112627 00000 n 0000112203 00000 n 0000109877 00000 n 0000112322 00000 n 0000190581 00000 n 0000191799 00000 n 0000116208 00000 n 0000115784 00000 n 0000112738 00000 n 0000115903 00000 n 0000189855 00000 n 0000116319 00000 n 0000116626 00000 n 0000116649 00000 n 0000117217 00000 n 0000117612 00000 n 0000118586 00000 n 0000119160 00000 n 0000120638 00000 n 0000120885 00000 n 0000128301 00000 n 0000128559 00000 n 0000148024 00000 n 0000148661 00000 n 0000165609 00000 n 0000166094 00000 n 0000186797 00000 n 0000187428 00000 n 0000189616 00000 n 0000191884 00000 n 0000191970 00000 n 0000200321 00000 n 0000200494 00000 n 0000200664 00000 n 0000200827 00000 n 0000200999 00000 n 0000201183 00000 n 0000201394 00000 n 0000201614 00000 n 0000201834 00000 n 0000202063 00000 n 0000202291 00000 n 0000202519 00000 n 0000202753 00000 n 0000202982 00000 n 0000203210 00000 n 0000203436 00000 n 0000203666 00000 n 0000203892 00000 n 0000204118 00000 n 0000204294 00000 n 0000204412 00000 n 0000204536 00000 n 0000204660 00000 n 0000204743 00000 n 0000204845 00000 n 0000204883 00000 n 0000205011 00000 n trailer << /Size 741 /Root 739 0 R /Info 740 0 R /ID [<5A6511D674831847E27D0D832A5BB335> <5A6511D674831847E27D0D832A5BB335>] >> startxref 205383 %%EOF �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/���������������������������������������������������������������������������������0000755�0004711�0000144�00000000000�12223340021�011065� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/ChangeLog������������������������������������������������������������������������0000644�0004711�0000144�00000021435�07472701343�012666� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� May 17 2002 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5r * handle continuation lines better * C-c C-c now for comment region, C-c C-o for GUI * trim gnuplot buffer + customize vble controlling max buffer length * Altered Makefile.in to install .el files along with .elc files May 30 2001 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5q * added font-lock bindings for words associated with plotting Apr 15 2001 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5p * fixed the fix for the serious bug in how speedbar and gnuplot-mode interact. In the words of Bullwinkle, "This time for sure!" Jan 4 2001 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5n * fixed a serious bug in how speedbar and gnuplot-mode interact Nov 29 2000 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5m * much better algorithm for determining gnuplot version number * add colorization and gui support for new commands in 3.8. * gui support for emf term. * gui support for new "set style" syntax. Nov 16 2000 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5l * support for pm3d in gnuplot-gui and in plot options insertions menu. * mentioned pm3d in gpelcard. * `gnuplot-negate-option' works with new syntax Sep 22 1999 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5k * make `gnuplot-send-line-and-forward' skip over blank and comment lines as suggested by <SE>. * Jan 10 2000 Bound C-c C-j to `gnuplot-forward-script-line'. Sep 9 1999 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5j * Do a more robust check for the gnuplot process before killing the gnuplot buffer, as suggested by <SE>. Sep 2 1999 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5i * Once again changed how `comint-process-echos' gets set. Maybe I got it right this time? * Also fixed certain situations where the info file did not get properly loaded (insertion with info toggle on and info button in GUI). Aug 15 1999 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5h * Added `gnuplot-determine-gnuplot-version' so that the gnuplot version number and `comint-process-echos' actually get set correctly. Actually, the first time something is plotted, the echoing might not work, but the second time it will. May 27 1999 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5g * fixed a bug in XEmacs in the font-locking rules for comments and strings * figure out what version of gnuplot is being run by reading the Gnuplot start-up message and set gnuplot-echo-command-line-flag appropriately * fixed a bug which made gnuplot-mode fail when font-lock was not a feature May 15 1999 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5f * include pgnuplot.c and installation instructions for Windows 95 and 98 * allow user to defer parsing info file so that gnuplot-mode starts up faster Apr 6 1999 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5e * drop gnuplot-which-highlight variable but still make sure colorization works under emacs, xemacs, font-lock, and hilit19 * insert a space at the end of a unique completion * fixed completion in file widget in GUI * primitive support for plot, splot, fit in gui. * rewrote a lot of GUI code Mar 21 1999 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5d * use installation materials provided by Lars Hecking, maintainer of gnuplot itself * added some GUI support for hidden3d * various improvements to the types alists used by the GUI * improved various document strings and the bug reporter function Feb 15 1999 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5c * update copyright information and gpelcard.tex Jan 28 1999 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5b * fixed a bug in gnuplot-kill-gnuplot-buffer * fixed a bug in gnuplot-plot-from-comint * fixed the description of the gnuplot-faces customization group Jan 23 1999 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5a * send file to gnuplot now uses the "load" command * can plot scripts from the comint buffer using gnuplot-plot-from-comint or gnuplot-save-and-plot-from-comint. * C-d in comint buffer is more graceful Dec 27 1998 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.5 * preliminary version of interactive graphical system for setting command arguments * make changes to insertion menu and to gnuplot-insert function to accomodate GUI system * made gnuplot-negate-option function and bound it to C-c C-n * replace kw-compl with a simple completion function * transparent icons in toolbar * move toolbar code into gnuplot.el Dec 15 1998 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.4f * defcustom all the insertion submenus * added gnuplot-insertion-menu-flag * Makefile now knows how to determine which version of info-look to compile Dec 13 1998 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.4e * deal with the many versions of info-look in the Makefile * drop install-gnuplot * break insertions menu up into several variables and put menubar initialization into a function Dec 9 1998 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.4d * added function gnuplot-setup-info-look and hook variable gnuplot-info-hook to handle situation of different versions of the info file. Nov 30 1998 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.4c * fixed frame behavior * fixed comint highlighting behavior * added :link to defgroup. added "[:]" to range insertions * fixed behavior of filename insertion function * added more :link's to the defgroup * edited Makefile and README file in the distribution, added dot.el to the distribution to suppress compile-time warnings Nov 21 1998 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.4b * Fix bug in line plotting function when line is empty * Add toolbar for XEmacs and file gnuplot-toolbar.el * Allow display of gnuplot process in a separate frame Nov 18 1998 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.4a * clean up useless buffers left lying around by info-look * Fix font-lock rules so that quoted words and the text surrounding them are correctly highlighted * Fix font-lock rules for plot and splot * Added function `gnuplot-send-line-and-forward' and bound it to C-c C-v. Mention this in gpelcard Nov 14 1998 Bruce Ravel <ravel@phys.washington.edu> * gnuplot.el: Version 0.4 * Added info-look to distribution. It was taken from the emacs 20.2 installation and one small change was made to allow it compile under XEmacs. * Use info-look for info interface. With this the gnuplot-mode user interface to the gnuplot info file does not change but the interior code is much cleaner and I get to use an already invented wheel. One nice feature is that the help function is completely independent of the version number of gnuplot as long as the index in the gnuplot.info file is called "General Index". Also `gnuplot-keywords' (which is used for help, keyword-completion, and hilit19 highlighting) is now generated automatically the first time gnuplot mode is invoked. * Changed default of `gnuplot-show-help-flag' to nil. Earlier versions (taken from gnuplot.el file) 0.1 Jun 25 1998 Finished with initial release. 0.2 Sep 4 1998 Added filename insertion, indentation, and colorization/completion in comint buffer. <BR> 0.2a Sep 11 1998 made `indent-line-function' buffer-local (whoops!) and fixed some stuff in the installation script <BR> 0.3 Sep 12 1998 include insertions menu <BR> 0.3a Sep 14 1998 fixed bug finding info file if missing, fixed bug starting font-lock, fixed bug re overwriting files in installation script <BR> 0.3b Sep 15 1998 Added (require 'info) to `(eval-and-compile' clause, Added (kill-all-local-variables) to `gnuplot-mode', altered order of:- (provide 'gnuplot) ;; any final chores before leaving (run-hooks 'gnuplot-load-hook) at the end of the file in case something in the load hook requires gnuplot (oh not that old one again...), added `gnuplot-comint-setup-hook', corrected `gnuplot-mark-active' which caused an error to be raised by (mark) when the mark was inactive <DB> Some changes to font-lock rules <LB>&<BR> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/README.1st�����������������������������������������������������������������������0000644�0004711�0000144�00000001115�10037014707�012463� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Please note that this directory and the stand-alone gnuplot mode distribution by Bruce Ravel are slightly different. In particular some files have not been included here, namely o INSTALL (covered by gnuplot install instructions) o Win9x/INSTALL.Win9x o Win9x/pgnuplot.c (already in src/win) o gnuplot.info (can be created from docs/gnuplot.texi) o gpelcard.ps (can be created from lisp/gpelcard.tex) o install-sh, mkinstalldirs (provided by gnuplot) For more information about this directory, see the README file in this directory. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/COPYING��������������������������������������������������������������������������0000644�0004711�0000144�00000043105�07615572012�012143� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) 19yy <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/gnuplot.el.old�������������������������������������������������������������������0000644�0004711�0000144�00000012702�06675712535�013711� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;; ;; $Id: gnuplot.el.old,v 1.1 1999/03/23 13:21:33 lhecking Exp $ ;; ;; ; ; gnu-plot.el - Definitions of GNU-PLOT mode for emacs editor. ; ; Author: Gershon Elber ; Computer Science Dept. ; University of Utah ; Date: Tue May 14 1991 ; Copyright (c) 1991, 1992, Gershon Elber ; ; This file defines an environment to run edit and execute GNU-PLOT programs. ; Such a program should have a '.gp' extension in order it to be in ; gnu-plot-mode major mode. Two new functions are provided to communicate ; between the editted file and the plotting program: ; 1. send-line-to-gnu-plot - sends a single line to the plotting program for ; execution. The line sent is the line the cursor is on, ; Bounded to Meta-E by default. ; 2. send-region-to-gnu-plot - sends the region from the current mark ; (mark-marker) to current position (point-marker) to the plotting program. ; This function is convenient for sending a large block of commands. ; Bounded to Meta-R by default. ; Both functions checks for existance of a buffer named gnu-plot-program ; and a process named "gnu-plot" hooked to it, and will restart a new process ; or buffer if none exists. The program to execute as process "gnu-plot" is ; defined by the gnu-plot-program constant below. ; (defvar gnu-plot-program "gnuplot" "*The executable to run for gnu-plot-program buffer.") (defvar gnu-plot-echo-program t "*Control echo of executed commands to gnu-plot-program buffer.") (defvar gnu-plot-mode-map nil "") (if gnu-plot-mode-map () (setq gnu-plot-mode-map (make-sparse-keymap)) (define-key gnu-plot-mode-map "\M-e" 'send-line-to-gnu-plot) (define-key gnu-plot-mode-map "\M-r" 'send-region-to-gnu-plot)) ;;; ;;; Define the gnu-plot-mode ;;; (defun gnu-plot-mode () "Major mode for editing and executing GNU-PLOT files. see send-line-to-gnu-plot and send-region-to-gnu-plot for more." (interactive) (use-local-map gnu-plot-mode-map) (setq major-mode 'gnu-plot-mode) (setq mode-name "Gnu-Plot") (run-hooks 'gnu-plot-mode-hook)) ;;; ;;; Define send-line-to-gnu-plot - send from current cursor position to next ;;; semicolin detected. ;;; (defun send-line-to-gnu-plot () "Sends one line of code from current buffer to the GNU-PLOT program. Use to execute a line in the GNU-PLOT plotting program. The line sent is the line the cursor (point) is on. The GNU-PLOT plotting program buffer name is gnu-plot-program and the process name is 'gnu-plot'. If none exists, a new one is created. The name of the gnu-plot program program to execute is stored in gnu-plot-program variable and may be changed." (interactive) (if (equal major-mode 'gnu-plot-mode) (progn (make-gnu-plot-buffer) ; In case we should start a new one. (beginning-of-line) (let ((start-mark (point-marker))) (next-line 1) (let* ((crnt-buffer (buffer-name)) (end-mark (point-marker)) (string-copy (buffer-substring start-mark end-mark))) (switch-to-buffer-other-window (get-buffer "gnu-plot-program")) (end-of-buffer) (if gnu-plot-echo-program (insert string-copy)) (set-marker (process-mark (get-process "gnu-plot")) (point-marker)) (if (not (pos-visible-in-window-p)) (recenter 3)) (switch-to-buffer-other-window (get-buffer crnt-buffer)) (process-send-region "gnu-plot" start-mark end-mark) (goto-char end-mark)))) (message "Should be invoked in gnu-plot-mode only."))) ;;; ;;; Define send-region-to-gnu-plot - send from current cursor position to ;;; current marker. ;;; (defun send-region-to-gnu-plot () "Sends a region of code from current buffer to the GNU-PLOT program. When this function is invoked on an GNU-PLOT file it send the region from current point to current mark to the gnu-plot plotting program. The GNU-PLOT plotting program buffer name is gnu-plot-program and the process name is 'gnu-plot'. If none exists, a new one is created. The name of the gnu-plot program program to execute is stored in gnu-plot-program variable and may be changed." (interactive) (if (equal major-mode 'gnu-plot-mode) (progn (make-gnu-plot-buffer) ; In case we should start a new one. (copy-region-as-kill (mark-marker) (point-marker)) (let ((crnt-buffer (buffer-name))) (switch-to-buffer-other-window (get-buffer "gnu-plot-program")) (end-of-buffer) (if gnu-plot-echo-program (yank)) (set-marker (process-mark (get-process "gnu-plot")) (point-marker)) (if (not (pos-visible-in-window-p)) (recenter 3)) (switch-to-buffer-other-window (get-buffer crnt-buffer)) (process-send-region "gnu-plot" (mark-marker) (point-marker)))) (message "Should be invoked in gnu-plot-mode only."))) ;;; ;;; Switch to "gnu-plot-program" buffer if exists. If not, creates one and ;;; execute the program defined by gnu-plot-program. ;;; (defun make-gnu-plot-buffer () "Switch to gnu-plot-program buffer or create one if none exists" (interactive) (if (get-buffer "gnu-plot-program") (if (not (get-process "gnu-plot")) (progn (message "Starting GNU-PLOT plotting program...") (start-process "gnu-plot" "gnu-plot-program" gnu-plot-program) (process-send-string "gnu-plot" "\n") (message "Done."))) (progn (message "Starting GNU-PLOT plotting program...") (start-process "gnu-plot" "gnu-plot-program" gnu-plot-program) (process-send-string "gnu-plot" "\n") (message "Done.")))) ;;; ;;; Autoload gnu-plot-mode on any file with gp extension. ;;; (setq auto-mode-alist (append '(("\\.gp$" . gnu-plot-mode)) auto-mode-alist)) ��������������������������������������������������������������gnuplot-4.6.4/lisp/configure������������������������������������������������������������������������0000755�0004711�0000144�00000333164�12223337634�013026� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 </dev/null exec 6>&1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="dot.el" ac_subst_vars='LTLIBOBJS LIBOBJS INSTALL_LISP LISPFILES PDFLATEX LATEX DVIPS lispdir EMACSLOADPATH EMACS AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules with_lispdir with_lisp_files ' ac_precious_vars='build_alias host_alias target_alias EMACS EMACSLOADPATH' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-lispdir override the default lisp directory --without-lisp-files do not build emacs lisp files Some influential environment variables: EMACS the Emacs editor command EMACSLOADPATH the Emacs library search path Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu PACKAGE=gnuplot-mode GPM_MAJOR=0 GPM_MINOR=6 GPM_REVISION=0 am__api_version='1.13' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=$PACKAGE VERSION=$GPM_MAJOR.$GPM_MINOR.$GPM_REVISION cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test x"$EMACS" = xt && EMACS= for ac_prog in emacs xemacs do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_EMACS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$EMACS"; then ac_cv_prog_EMACS="$EMACS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_EMACS="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi EMACS=$ac_cv_prog_EMACS if test -n "$EMACS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EMACS" >&5 $as_echo "$EMACS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$EMACS" && break done test -n "$EMACS" || EMACS="no" # Check whether --with-lispdir was given. if test "${with_lispdir+set}" = set; then : withval=$with_lispdir; lispdir="$withval" { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5 $as_echo_n "checking where .elc files should go... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lispdir" >&5 $as_echo "$lispdir" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5 $as_echo_n "checking where .elc files should go... " >&6; } if ${am_cv_lispdir+:} false; then : $as_echo_n "(cached) " >&6 else if test $EMACS != "no"; then if test x${lispdir+set} != xset; then # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly # Some emacsen will start up in interactive mode, requiring C-x C-c to exit, # which is non-obvious for non-emacs users. # Redirecting /dev/null should help a bit; pity we can't detect "broken" # emacsen earlier and avoid running this altogether. { { $as_echo "$as_me:${as_lineno-$LINENO}: \$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) \"\\n\")) (setq load-path (cdr load-path)))' </dev/null >conftest.out"; } >&5 ($EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } am_cv_lispdir=`sed -n \ -e 's,/$,,' \ -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ -e '/.*\/share\/x*emacs\/site-lisp$/{s,.*/share/\(x*emacs/site-lisp\),${datarootdir}/\1,;p;q;}' \ conftest.out` rm conftest.out fi fi test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_lispdir" >&5 $as_echo "$am_cv_lispdir" >&6; } lispdir="$am_cv_lispdir" fi for ac_prog in dvips do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DVIPS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DVIPS"; then ac_cv_prog_DVIPS="$DVIPS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DVIPS="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DVIPS=$ac_cv_prog_DVIPS if test -n "$DVIPS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DVIPS" >&5 $as_echo "$DVIPS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DVIPS" && break done test -n "$DVIPS" || DVIPS="no" for ac_prog in latex latex2e do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LATEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LATEX"; then ac_cv_prog_LATEX="$LATEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LATEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LATEX=$ac_cv_prog_LATEX if test -n "$LATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LATEX" >&5 $as_echo "$LATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LATEX" && break done test -n "$LATEX" || LATEX="no" # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MAKEINFO+:} false; then : $as_echo_n "(cached) " >&6 else case $MAKEINFO in [\\/]* | ?:[\\/]*) ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no" ;; esac fi MAKEINFO=$ac_cv_path_MAKEINFO if test -n "$MAKEINFO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 $as_echo "$MAKEINFO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_prog in pdflatex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PDFLATEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PDFLATEX"; then ac_cv_prog_PDFLATEX="$PDFLATEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PDFLATEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PDFLATEX=$ac_cv_prog_PDFLATEX if test -n "$PDFLATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5 $as_echo "$PDFLATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PDFLATEX" && break done test -n "$PDFLATEX" || PDFLATEX="no" if test "$EMACS" = no; then LISPFILES=noelcs INSTALL_LISP=install-nolisp else LISPFILES=elcs INSTALL_LISP=install-lisp fi # Check whether --with-lisp-files was given. if test "${with_lisp_files+set}" = set; then : withval=$with_lisp_files; if test "$with_lisp_files" = no; then LISPFILES=noelcs INSTALL_LISP=install-nolisp fi fi # need to copy some stuff if we compile outside the source disrectory if test ! -f ./gnuplot.el ; then # all except dot.el { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compiling outside source directory - copying needed .el files" >&5 $as_echo "Compiling outside source directory - copying needed .el files" >&6; } cp ${srcdir}/gnuplot.el ${srcdir}/gnuplot-gui.el . cp ${srcdir}/gpelcard.tex . fi ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="`echo $ac_config_files`" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' <conf$$subs.awk | sed ' /^[^""]/{ N s/\n// } ' >>$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/aclocal.m4�����������������������������������������������������������������������0000644�0004711�0000144�00000062431�12223337634�012753� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# generated automatically by aclocal 1.13.1 -*- Autoconf -*- # Copyright (C) 1996-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.13.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.13.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PATH_LISPDIR # --------------- AC_DEFUN([AM_PATH_LISPDIR], [AC_PREREQ([2.60])dnl # If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test x"$EMACS" = xt && EMACS= AC_CHECK_PROGS([EMACS], [emacs xemacs], [no]) AC_ARG_VAR([EMACS], [the Emacs editor command]) AC_ARG_VAR([EMACSLOADPATH], [the Emacs library search path]) AC_ARG_WITH([lispdir], [AS_HELP_STRING([--with-lispdir], [override the default lisp directory])], [ lispdir="$withval" AC_MSG_CHECKING([where .elc files should go]) AC_MSG_RESULT([$lispdir])], [ AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [ if test $EMACS != "no"; then if test x${lispdir+set} != xset; then # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly # Some emacsen will start up in interactive mode, requiring C-x C-c to exit, # which is non-obvious for non-emacs users. # Redirecting /dev/null should help a bit; pity we can't detect "broken" # emacsen earlier and avoid running this altogether. AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out]) am_cv_lispdir=`sed -n \ -e 's,/$,,' \ -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ -e '/.*\/share\/x*emacs\/site-lisp$/{s,.*/share/\(x*emacs/site-lisp\),${datarootdir}/\1,;p;q;}' \ conftest.out` rm conftest.out fi fi test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' ]) lispdir="$am_cv_lispdir" ]) AC_SUBST([lispdir]) ])# AM_PATH_LISPDIR # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of '-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar <conftest.tar]) grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/gpelcard.tex���������������������������������������������������������������������0000644�0004711�0000144�00000036767�10037240060�013416� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� %% Time-stamp: <2002/12/13 16:41:13 bruce> %% This document is copyright (C) 1998-2002 Bruce Ravel <ravel@phys.washington.edu> %% This page covers version 0.6.0 of gnuplot-mode. %% This document is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% properly describing the software it documents. %% Permission is granted to make and distribute copies of this %% document in electronic form provided the copyright notice and this %% permission are preserved on all copies. \documentclass[twocolumn]{article} \usepackage{fancybox} \setlength{\parindent}{0truecm} \setlength{\parskip}{1ex} \setlength{\hoffset}{-0.5truecm} \setlength{\voffset}{0truecm} \setlength{\topmargin}{-2.5truecm} \setlength{\marginparsep}{0truecm} \setlength{\marginparwidth}{0truecm} \setlength{\textheight}{25.5truecm} \setlength{\textwidth}{17truecm} \setlength{\oddsidemargin}{0truecm} \setlength{\evensidemargin}{1.2truecm} \setlength{\columnsep}{1.4truecm} \newenvironment{Boxedminipage}% {\begin{Sbox}\begin{minipage}}% {\end{minipage}\end{Sbox}\Ovalbox{\TheSbox}} \newenvironment{SqBoxedminipage}% {\begin{Sbox}\begin{minipage}}% {\end{minipage}\end{Sbox}\fbox{\TheSbox}} \def\version{{0.6.0}} \def\revised{{17 May, 2002}} \def\file#1{{\texttt{`#1'}}} \def\key#1{{\textrm \leavevmode\hbox{% \raise0.4pt\hbox{$\langle$}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt \hbox{\raise0.4pt\hbox{\vphantom{$\langle$}}#1}}% \kern-0.4pt\hrule}% \kern-.06em\raise0.4pt\hbox{$\rangle$}}}} \def\variable#1#2#3{{ \vspace{-0.2truecm} \begin{flushright} \begin{minipage}[h]{0.97\linewidth} \vspace{-0.2truecm} \textbf{#1}\hfill[\texttt{#2}] \begin{flushright} \begin{minipage}[h]{0.93\linewidth} \vspace{-0.2truecm} #3 \end{minipage} \end{flushright} \end{minipage} \end{flushright} }} \def\command#1#2{{ \vspace{-0.2truecm} \begin{flushright} \begin{minipage}[h]{0.97\linewidth} \vspace{-0.2truecm} \textbf{#1}\hfill \begin{flushright} \begin{minipage}[h]{0.93\linewidth} \vspace{-0.4truecm} #2 \end{minipage} \end{flushright} \end{minipage} \end{flushright} }} \def\Star{{$\star$}} \begin{document} \small \thispagestyle{empty} \begin{center} \begin{Boxedminipage}{0.75\linewidth} \begin{center} \vspace{0.01\textheight} {\Large Quick Reference for}\\ \vspace{0.007\textheight} {\Large gnuplot-mode} \vspace{0.01\textheight} \end{center} \end{Boxedminipage} \end{center} \vspace{3ex} This card describes the features of gnuplot-mode for Emacs. Gnuplot-mode is intended for composing scripts for the \textsc{gnuplot} plotting program. It offers functions for sending commands or entire scripts to the \textsc{gnuplot} program as well as various functions to aid in composing scripts. It works with any version of \textsc{gnuplot} from 3.5 to 3.8. See the comments in the file \file{gnuplot.el} for instructions on installing gnuplot-mode. \vspace{2ex} \begin{minipage}[h]{\linewidth} \begin{center} \centerline{{\large\textbf{gnuplot-mode key sequences}}} \vspace{0.2ex} \begin{tabular}[h]{cl} \hline \hline \\[-1ex] \multicolumn{2}{l}{~\quad\textbf{Gnuplot-mode buffer}}\\[0.5ex] \textrm{key} & \quad description \\ \hline \texttt{C-c C-l} & send a line to gnuplot \\ \texttt{C-c C-v} & send a line and move forward 1 line\\ \texttt{C-c C-r} & send the region to gnuplot \\ \texttt{C-c C-b} & send the buffer to gnuplot \\ \texttt{C-c C-f} & send a file to gnuplot \\ & \\[-1.5ex] \texttt{M-\key{tab}} & complete keyword at point \\ \texttt{C-c C-i} & insert filename at point \\ \texttt{C-c C-j} & jump to next statement \\ \texttt{C-c C-n} & negate set option at point \\ \texttt{C-c C-c} & comment region \\ \texttt{C-c C-o} & set arguments of command at point \\ \texttt{S-mouse-2} & set arguments of command under mouse \\ \texttt{C-c C-h} & get help from the gnuplot info file \\ \texttt{C-c C-e} & look at the gnuplot process buffer \\ & \\[-1.5ex] \texttt{C-c C-k} & kill the gnuplot process \\ \texttt{C-c C-u} & submit a bug report about gnuplot-mode \\ \texttt{C-c C-z} & customize gnuplot-mode \\ \hline \\[-1ex] \multicolumn{2}{l}{~\quad\textbf{Gnuplot process buffer}}\\[0.5ex] \textrm{key} & \quad description \\ \hline \texttt{M-C-p} & plot script \\ \texttt{M-C-f} & load file containing script \\ \hline \hline \end{tabular} \end{center} \end{minipage} \vspace{4ex} \centerline{{\large\textbf{Starting gnuplot-mode}}} \vspace{2ex} \command{M-x gnuplot-mode}{Start gnuplot-mode in the current buffer.} % \command{M-x gnuplot-make-buffer}{Open a new buffer in gnuplot-mode} \vfill \begin{Boxedminipage}{1.05\linewidth} \begin{center} \footnotesize{Gnuplot-mode homepage} \\ \scriptsize{%% \texttt{http://feff.phys.washington.edu/\char126ravel/software/gnuplot-mode/}} \end{center} \end{Boxedminipage} \begin{flushleft} {\footnotesize This page {\copyright} 1998-2002 Bruce Ravel \hfill revised \revised \\ \texttt{<ravel@phys.washington.edu>} \\ %% \hfill printed \today \\ This page covers version {\version} of gnuplot-mode. Permission is granted to make and distribute copies of this quick reference provided the copyright notice and this permission are preserved on all copies.} \end{flushleft} %%\vfil \pagebreak \centerline{{\large\textbf{Setting up gnuplot-mode}}} \vspace{2ex} Put the lines in the box below in your \file{.emacs} file or in the system wide start-up file to enable gnuplot-mode. The first two lines make Emacs recognize the functions described in the ``Starting gnuplot-mode'' section on this page. The third line causes Emacs to put all files ending in \file{.gp} into gnuplot-mode. The final line defines a hotkey -- in this case \key{F9} -- for starting gnuplot-mode. \begin{SqBoxedminipage}{\linewidth} \begin{Verbatim} (autoload 'gnuplot-mode "gnuplot" "gnuplot major mode" t) (autoload 'gnuplot-make-buffer "gnuplot" "open a buffer in gnuplot mode" t) (setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode)) auto-mode-alist)) (global-set-key [(f9)] 'gnuplot-make-buffer) \end{Verbatim}%%$ \end{SqBoxedminipage} \vspace{4ex} \begin{description} \item[Using the gnuplot-process buffer] \hfill \\ The process buffer contains an active \textsc{gnuplot} command line for interacting with \textsc{gnuplot} directly. The \texttt{M-C-p} and \texttt{M-C-f} key sequences will plot using the contents of the gnuplot script buffer. \item[Using the GUI to set command arguments] \hfill \\ \texttt{C-c C-c} and \texttt{S-mouse-2} are used to invoke the graphical tool for setting command arguments. Use text fields and option menus to choose appropriate values. Menus and buttons are activated with the middle mouse button. A few plot options may not be fully supported. \item[Customizing variables] \hfill \\ The graphical customization tool for variables can be invoked using \texttt{C-c C-z}. Descriptions of the variables relevant to gnuplot-mode can be obtained by using \texttt{gnuplot} as the regular expression for \texttt{M-x apropos}. \item[On-line help] \hfill \\ Keyword completion and on-line help require that the \textsc{gnuplot} info file be available and that the info-look package be installed. The info file can be made from the documentation supplied with the \textsc{gnuplot} distribution and the info-look package is a standard part of Emacs 20. Users of XEmacs or Emacs 19 should download \file{info-look.el} from the gnuplot-mode homepage. \item[Using mouse] \hfill \\ All features of the mouse patch to \textsc{gnuplot} should be available when using gnuplot-mode. One particularly useful feature of mouse is the ability to push a cursor position into the clipboard. This is done by double-clicking \texttt{mouse-1} in the plot window, then doing \texttt{M-x yank-clipboard-selection} (usually bound to \texttt{mouse-2}) in the gnuplot script buffer. \end{description} \vfill \pagebreak %%% end of first column \begin{center} \begin{Boxedminipage}{0.75\linewidth} \begin{center} {\large User configurable variables} \end{center} \end{Boxedminipage} \end{center} \variable{gnuplot-program}{gnuplot}{The name of the gnuplot executable.} % \variable{gnuplot-process-name}{*gnuplot*}{The name of the gnuplot process and process buffer.} % \variable{gnuplot-gnuplot-buffer}{plot.gp}{The name of the gnuplot scratch buffer opened by \texttt{gnuplot-make-buffer}.} % % \variable{gnuplot-display-process}{'window}{Determines how to display the gnuplot process buffer, either 'frame, 'window, or nil} % \variable{gnuplot-info-display}{'window}{Determines how `gnuplot-get-help' displays the info file, either 'frame, 'window, or nil} % \variable{gnuplot-echo-command-line-flag}{t}{If lines that you send to gnuplot from the gnuplot-mode buffer are not appearing at the gnuplot prompt in the process buffer, set this to nil and restart emacs.} % \variable{gnuplot-delay}{0.01}{Time in seconds to allow the gnuplot display to update. Increase this number if the prompts and lines are displayed out of order.} % \variable{gnuplot-quote-character}{'}{Quotation character used when inserting a filename into the script (single, double, or no quote).} \variable{gnuplot-buffer-max-size}{1000}{The maximum size in lines of the gnuplot buffer. Excess lines are trimmed. 0 means to never trim.} %%\vspace{1ex} \begin{center} \begin{Boxedminipage}{0.75\linewidth} \begin{center} {\large Hook variables} \end{center} \end{Boxedminipage} \end{center} \variable{gnuplot-mode-hook}{nil}{Functions run when gnuplot minor mode is entered.} % \variable{gnuplot-load-hook}{nil}{Functions run when gnuplot.el is first loaded.} % \variable{gnuplot-after-plot-hook}{nil}{Functions run after gnuplot plots an entire buffer. See the doc string for \texttt{gnuplot-recently-sent}.} % \variable{gnuplot-comint-setup-hook}{nil}{Functions run after setting up the gnuplot process buffer in comint mode.} % \variable{gnuplot-info-hook}{nil}{Functions run before setting up info-look in the gnuplot-mode buffer.} % \vfill\eject \begin{center} \begin{Boxedminipage}{0.75\linewidth} \begin{center} {\large Insertion variables} \end{center} \end{Boxedminipage} \end{center} \noindent These variables control the \texttt{Insertions} pull-down menu, which can be used to insert \textsc{gnuplot} commands into the script. The various sub-menu variables can be used to customize which commands appear in the \texttt{Insertions} menu. \vspace{2ex} % \variable{gnuplot-insertions-menu-flag}{t}{Non-nil means to display the \texttt{Insertions} menu in the menubar.} % \variable{gnuplot-insertions-show-help-flag}{nil}{Non-nil means to display help from info file when using the \texttt{Insertions} menu.} % \variable{gnuplot-insertions-adornments}{\Star}{Contents of the \texttt{adornments} sub-menu.} % \variable{gnuplot-insertions-plot-options}{\Star}{Contents of the \texttt{plot-options} sub-menu.} % \variable{gnuplot-insertions-terminal}{\Star}{Contents of the \texttt{terminal} sub-menu.} % \variable{gnuplot-insertions-x-axis}{\Star}{Contents of the \texttt{x axis} sub-menu.} % \variable{gnuplot-insertions-x2-axis}{\Star}{Contents of the \texttt{x2 axis} sub-menu.} % \variable{gnuplot-insertions-y-axis}{\Star}{Contents of the \texttt{y axis} sub-menu.} % \variable{gnuplot-insertions-y2-axis}{\Star}{Contents of the \texttt{y2 axis} sub-menu.} % \variable{gnuplot-insertions-z-axis}{\Star}{Contents of the \texttt{z axis} sub-menu.} % \variable{gnuplot-insertions-parametric-plots}{\Star}{Contents of the \texttt{parametric plots} sub-menu.} % \variable{gnuplot-insertions-polar-plots}{\Star}{Contents of the \texttt{polar plots} sub-menu.} % \variable{gnuplot-insertions-surface-plots}{\Star}{Contents of the \texttt{surface plots} sub-menu.} \begin{center} \begin{Boxedminipage}{0.75\linewidth} \begin{center} {\large Toolbar variables} \end{center} \end{Boxedminipage} \end{center} \noindent These variables control the use and location of the toolbar in XEmacs. The toolbar has buttons equivalent to the key sequences \texttt{C-c C-l}, \texttt{C-c C-r}, \texttt{C-c C-b}, \texttt{C-c C-e}, and \texttt{C-c C-h}. \vspace{2ex} % \variable{gnuplot-display-toolbar-flag}{nil}{Non-nil means to display a toolbar if using XEmacs.} % \variable{gnuplot-use-toolbar}{left-toolbar}{Location of XEmacs toolbar. Valid values are \texttt{left-toolbar}, \texttt{right-toolbar}, \texttt{top-toolbar}, \texttt{bottom-toolbar}, \texttt{default-toolbar} and nil.} % \begin{center} \begin{Boxedminipage}{0.75\linewidth} \begin{center} {\large Set Arguments} \end{center} \end{Boxedminipage} \end{center} \noindent These variables control the behavior of the graphical interface to setting command arguments. \texttt{C-c C-c} with point over a command or \texttt{S-mouse-2} with the mouse cursor over a command will cause a small frame to pop open with which you can set command arguments. Green button with bold text are bound to pup-up menus --- use the mouse-2 to select an item from the menu. Grey fields are for filling in strings or numbers. Hit the \textbf{[Set Options]} button with \texttt{mouse-2} to insert command arguments into the script. You can also use the \key{tab} key to move among the widgets and \key{ret} to push the buttons. \vspace{2ex} % \variable{gnuplot-gui-popup-flag}{nil}{When non-nil an argument setting frame will pop open whenever the \texttt{Insertions} menu is used.} % \variable{gnuplot-gui-plot-splot-fit-style}{'simple}{\texttt{'simple} or \texttt{'complete} -- describes the extent of the list of properties of for plot, splot, and fit in the GUI.} % \variable{gnuplot-gui-frame-plist}{\Star}{Property list of parameters controlling the argument setting frame. Used by XEmacs.} % \variable{gnuplot-gui-frame-parameters}{\Star}{List of parameters controlling the argument setting frame. Used by Emacs.} % \variable{gnuplot-gui-fontname-list}{\Star}{List of font available on your computer to the terminal drivers.} % \begin{center} \begin{Boxedminipage}{0.75\linewidth} \begin{center} {\large Faces} \end{center} \end{Boxedminipage} \end{center} \noindent These are various faces defined for use with gnuplot-mode. \vspace{2ex} % \variable{gnuplot-prompt-face}{firebrick}{Color of gnuplot prompt (on a light background) in process buffer. Bold and underlined on a monochrome display.} % \variable{gnuplot-gui-menu-face}{dark olive green}{Color of menu buttons (on a light background) in the argument setting frame. Italic on a monochrome display.} % \variable{gnuplot-gui-button-face}{sienna}{Color of push buttons (on a light background) in the argument setting frame. Italic on a monochrome display.} % \variable{gnuplot-gui-label-face}{dark slate blue}{Color of buttons (on a light background) used to set label lists in the argument setting frame. Italic on a monochrome display.} % \vfill \hrule \vspace{0.5ex} \begin{flushleft} \footnotesize{Variables marked with {\Star} have default values that are too long to print here.} \end{flushleft} \end{document} %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End: ���������gnuplot-4.6.4/lisp/dotemacs�������������������������������������������������������������������������0000644�0004711�0000144�00000001534�06653344362�012640� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;-------------------------------------------------------------------- ;; Lines enabling gnuplot-mode ;; move the files gnuplot.el to someplace in your lisp load-path or ;; use a line like ;; (setq load-path (append (list "/path/to/gnuplot") load-path)) ;; these lines enable the use of gnuplot mode (autoload 'gnuplot-mode "gnuplot" "gnuplot major mode" t) (autoload 'gnuplot-make-buffer "gnuplot" "open a buffer in gnuplot mode" t) ;; this line automatically causes all files with the .gp extension to ;; be loaded into gnuplot mode (setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode)) auto-mode-alist)) ;; This line binds the function-9 key so that it opens a buffer into ;; gnuplot mode (global-set-key [(f9)] 'gnuplot-make-buffer) ;; end of line for gnuplot-mode ;;-------------------------------------------------------------------- ��������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/configure.in���������������������������������������������������������������������0000644�0004711�0000144�00000002062�12027431022�013402� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# $HEader$ AC_INIT(dot.el) AC_PREREQ(2.52) PACKAGE=gnuplot-mode GPM_MAJOR=0 GPM_MINOR=6 GPM_REVISION=0 AM_INIT_AUTOMAKE([$PACKAGE], [$GPM_MAJOR.$GPM_MINOR.$GPM_REVISION]) AC_SET_MAKE AC_PROG_INSTALL AM_PATH_LISPDIR AC_CHECK_PROGS(DVIPS, dvips, no) AC_CHECK_PROGS(LATEX, latex latex2e, no) AC_PATH_PROG(MAKEINFO, makeinfo, no) dnl for pdf format docs AC_CHECK_PROGS(PDFLATEX, pdflatex, no) if test "$EMACS" = no; then LISPFILES=noelcs INSTALL_LISP=install-nolisp else LISPFILES=elcs INSTALL_LISP=install-lisp fi AC_ARG_WITH(lisp-files,dnl [ --without-lisp-files do not build emacs lisp files], [if test "$with_lisp_files" = no; then LISPFILES=noelcs INSTALL_LISP=install-nolisp fi]) # need to copy some stuff if we compile outside the source disrectory if test ! -f ./gnuplot.el ; then # all except dot.el AC_MSG_RESULT([Compiling outside source directory - copying needed .el files]) cp ${srcdir}/gnuplot.el ${srcdir}/gnuplot-gui.el . cp ${srcdir}/gpelcard.tex . fi AC_SUBST(LISPFILES) AC_SUBST(INSTALL_LISP) AC_OUTPUT(Makefile) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/Makefile.in����������������������������������������������������������������������0000644�0004711�0000144�00000041121�12223337634�013151� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(top_srcdir)/../mkinstalldirs COPYING ChangeLog INSTALL \ README $(top_srcdir)/../install-sh $(top_srcdir)/../missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DVIPS = @DVIPS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LISP = @INSTALL_LISP@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LATEX = @LATEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LISPFILES = @LISPFILES@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign ELS = gnuplot-gui.el gnuplot.el ELCS = gnuplot.elc gnuplot-gui.elc EXTRA_DIST = README.1st dot.el dotemacs gnuplot.el.old gpelcard.dvi gpelcard.pdf gpelcard.ps gpelcard.tex $(ELS) CLEANFILES = $(ELCS) gpelcard.pdf gpelcard.ps gpelcard.dvi gpelcard.log gpelcard.aux DISTCLEANFILES = BYTEC = $(EMACS) -batch -q -no-site-file -l $(srcdir)/dot.el -f batch-byte-compile SUFFIXES = .el .elc .pdf .ps .tex all: all-am .SUFFIXES: .SUFFIXES: .el .elc .pdf .ps .tex .dvi am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf-am: ps-am: uninstall-am: uninstall-local .MAKE: install-am install-data-am install-strip .PHONY: all all-am am--refresh check check-am clean clean-generic \ cscopelist-am ctags-am dist dist-all dist-bzip2 dist-gzip \ dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \ distclean distclean-generic distclean-local distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-data-hook install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-local .el.elc: $(BYTEC) $< .dvi.ps: $(DVIPS) -o $@ $< .tex.dvi: $(LATEX) $< .tex.pdf: $(PDFLATEX) $< all: @LISPFILES@ elcs: $(ELCS) noelcs: pdf: gpelcard.pdf ps: gpelcard.ps install-data-hook: @INSTALL_LISP@ install-lisp: install-els install-elcs install-nolisp: install-els: $(ELS) $(mkinstalldirs) $(DESTDIR)$(lispdir) @for p in $(ELS) ; do \ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(lispdir)/$$p"; \ $(INSTALL_DATA) $$p $(DESTDIR)$(lispdir)/$$p; \ done install-elcs: $(ELCS) $(mkinstalldirs) $(DESTDIR)$(lispdir) @for p in $(ELCS) ; do \ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(lispdir)/$$p"; \ $(INSTALL_DATA) $$p $(DESTDIR)$(lispdir)/$$p; \ done uninstall-local: @$(NORMAL_UNINSTALL) @for p in $(ELCS) $(ELS) ; do \ rm -f $(DESTDIR)$(lispdir)/$$p; \ done distclean-local: @if test "$(top_srcdir)" != "$(top_builddir)" ; then \ for p in $(ELS) gpelcard.tex ; do \ rm -f $$p ; \ done ; \ fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/README���������������������������������������������������������������������������0000644�0004711�0000144�00000012515�11663100246�011763� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� This directory contains files for running Gnuplot from within emacs. This package was assembled by Bruce Ravel <bravel@bnl.gov>. See http://http://xafs.org/BruceRavel/GnuplotMode Contents ======== README this file INSTALL thorough installation instructions ChangeLog a log of changes by version number gnuplot.el gnuplot mode for emacs gnuplot-gui.el a GUI for setting command arguments interactively info-look.20.2.el programmer's interface to info files, old version info-look.20.3.el programmer's interface to info files, new version dot.el a short lisp file used by the Makefile gnuplot.info info version of gnuplot 3.6 help gpelcard.tex quick reference card for gnuplot mode (latex) gpelcard.ps dotemacs example .emacs lines for enabling gnuplot mode Makefile.in \ Makefile.dst \ aclocal.m4 \ files inherited from the gnuplot distribution configure } for making gnuplot-mode configure.in / install-sh / mkinstalldirs / Win9x/INSTALL.Win9x Extra installation instructions for Windows 95/98 Win9x/pgnuplot.c Program required to run gnuplot from Emacs Soon gnuplot-mode will be included with the gnuplot 3.7 distribution. The installation instructions for the free-standing distribution have been modified to be consistent with that. Installation ============ 1. Unpack the gnuplot.tar.gz and cd to the gnuplot directory. 2. Type "configure". If configure doesn't work for you, see note 7 below. 3. Run "make". If you use XEmacs, run "make EMACS=xemacs" (or change the EMACS variable to "xemacs" in the Makefile, the run "make"). 4. Move the lisp files to the system site_lisp directory if you are installing as root. If you are installing as a normal user move the .elc files to a place where emacs, i.e. your personal emacs directory. 5. Insert the contents of the `dotemacs' file into your .emacs file or into the system's emacs start-up file to enable gnuplot mode. 6. The function `gnuplot-info-lookup-symbol' looks at the Gnuplot info file that comes with this package or that can be made from the Gnuplot distribution. For that function to work, the file gnuplot.info must be placed somewhere where info can find it, for example /usr/info. A line like this in your .emacs allows you to put gnuplot.info any place convenient: (add-to-list 'Info-default-directory-list "/path/to/file") Wouldn't it be //great// if Emacs had some kind of systematized package installing facility? I think so, too! Oh well.... NOTES ===== 1. gnuplot-mode is designed for use with version 3.7 of gnuplot. It should work very well with any of the 3.6 beta versions. Only some of the specialized features will not work with version 3.5 -- the GUI interface to setting command arguments is an example. 2. To use gnuplot-mode with Emacs on Windows 95 or 98 see the instructions in the directory Win9x. 3. The installation materials used by gnuplot-mode come from the gnuplot distribution. 4. If "configure" doesn't work for you, the file "Makefile.dst" can be used. In that case do, "make -f Makefile.dst" and carry on from there. 5. If you do not have the custom library installed, you will get several harmless warnings when compiling gnuplot.el. Most of gnuplot-mode will work even without the custom library installed. 6. The file info-look.el provides the on-line help functionality. Without it, things like on-line help and keyword completion will not work. Using a tool that is a standard part of Emacs is a good idea, but this one gets complicated. This file became part of Emacs with version 20. It changed between 20.2 and 20.3. And it does not come with XEmacs. What's more, the version from 20.2 has a bug and the newer version does not work with Emacs 19. So, this distribution comes with two versions of info-look.el, the version from Emacs 20.2 patched to work correctly and the version from Emacs 20.3. Here's what happens when you run make: a. If you use Emacs 19 or XEmacs 19, then the Makefile will compile the 20.2 version. b. If you use Emacs 20.2 or lower, the Makefile will compile the 20.2 version. c. If you use XEmacs 20 or higher, the Makefile will compile the 20.3 version. d. If you use Emacs 20.3 or higher, the Makefile won't compile any version. 7. The gnuplot-mode distribution comes with the version of the gnuplot info file that gets made by gnuplot 3.7. Use it rather than the old one. If you really must use the older info file, see the document string for the variable `gnuplot-info-hook'. If you already have the info file installed on your computer, you will not need the one that comes with gnuplot-mode. 8. The interactive graphical graphical interface to setting command arguments contained in gnuplot-gui.el is experimental. It is incomplete and may make mistakes. Hopefully, you will find it useful. It *requires* that you are using a version of emacs with the widget library installed or that you have installed it yourself. Version numbers in the 20's of Emacs and XEmacs ship with the widget library. For version numbers in the 19's, it can be obtained at http://www.dina.kvl.dk/~abraham/custom/ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/gnuplot-gui.el�������������������������������������������������������������������0000644�0004711�0000144�00000210734�07321640526�013710� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;;; gnuplot-gui.el -- GUI interface to setting options in gnuplot-mode ;; Copyright (C) 1998-2000 Bruce Ravel ;; Author: Bruce Ravel <ravel@phys.washington.edu> ;; Maintainer: Bruce Ravel <ravel@phys.washington.edu> ;; Created: 19 December 1998 ;; Updated: 16 November 2000 ;; Version: (same as gnuplot.el) ;; Keywords: gnuplot, plotting, interactive, GUI ;; This file is not part of GNU Emacs. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; ;; This lisp script is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ;; ;; Permission is granted to distribute copies of this lisp script ;; provided the copyright notice and this permission are preserved in ;; all copies. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, you can either send email to this ;; program's maintainer or write to: The Free Software Foundation, ;; Inc.; 675 Massachusetts Avenue; Cambridge, MA 02139, USA. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; send bug reports to the authors (ravel@phys.washington.edu) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Commentary: ;; ;; This file provides a graphical user interface to setting arguments ;; to gnuplot commands. Positioning point near a command and invoking ;; `gnuplot-gui-set-options-and-insert' (C-c C-c or shift-mouse-2) ;; will pop open a frame with widgets for setting the various ;; arguments appropriate the the item that was near point. The goal ;; is to provide point-and-click functionality to gnuplot-mode. ;; ;; gnuplot-gui is designed for gnuplot 3.7, but since much of 3.7 is ;; backward compatible to 3.5, it will work well for that version ;; also. ;; ;; gnuplot-gui.el was developed using Emacs 19.34 and is known to work ;; on Emacs 20.x and XEmacs 20.x. I do not know what is the earliest ;; version for which it will work, but I make no guarantees for ;; versions before 19.34. Note that this makes heavy use of the ;; widget package, so this will not work on Emacs 19.34 unless you ;; install the widget package separately. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; To do: ;; ;; Widgets I need: ;; -- 'position: two or three comma separated numbers used to denote a ;; position or a tic start/end/increment (see arrow, ;; need a prefix) ;; -- 'modifier: colon separated fields used for datafile modifiers ;; ;; command types which are currently unsupported or contain mistakes ;; -- unsupported: cntrparam ;; -- plot, splot, fit: rather lame ;; -- label: position information missing ;; -- label: font string handled in overly simple manner ;; -- hidden3d: not really suited to 'list, but all options are exclusive... ;; -- pointstyle argument to "set label" ;; ;; overall: ;; -- continuation lines (ugh!) ;; -- multiple frames end up displaying same window after setting options ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Code: (require 'gnuplot) (eval-and-compile (condition-case () (progn (require 'widget) (require 'wid-edit)) (error nil))) (require 'cl) (eval-when-compile ; suppress some compiler warnings (defvar gnuplot-xemacs-p nil) (defvar gnuplot-quote-character nil) (defvar gnuplot-info-display nil) (defvar gnuplot-mode-map nil)) ;; (eval-when-compile ;; (require 'wid-edit)) (eval-and-compile ; I need this! (if (fboundp 'split-string) () (defun split-string (string &optional pattern) "Return a list of substrings of STRING which are separated by PATTERN. If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." (or pattern (setq pattern "[ \f\t\n\r\v]+")) ;; The FSF version of this function takes care not to cons in case ;; of infloop. Maybe we should synch? (let (parts (start 0)) (while (string-match pattern string start) (setq parts (cons (substring string start (match-beginning 0)) parts) start (match-end 0))) (nreverse (cons (substring string start) parts)))) )) ;;; customizable variables (defgroup gnuplot-gui nil "Graphical interface to setting arguments in gnuplot scrips." :prefix "gnuplot-gui-" :group 'gnuplot) (defcustom gnuplot-gui-popup-flag nil "*Non-nil means to open arguments pop-ups automatically. This would be done after menu insertion of Gnuplot commands." :group 'gnuplot-gui :type 'boolean) (defvar gnuplot-gui-frame nil "Frame used to hold the buffer for setting options.") (defcustom gnuplot-gui-frame-plist '(height 18 width 65 border-width 0 user-position t top 150 left 150 internal-border-width 0 unsplittable t default-toolbar-visible-p nil has-modeline-p nil menubar-visible-p nil) "Frame plist for the input run-time display frame in XEmacs." :type '(repeat (group :inline t (symbol :tag "Property") (sexp :tag "Value"))) :group 'gnuplot-gui) (defcustom gnuplot-gui-frame-parameters '((height . 18) (width . 65) (user-position . t) (top . 150) (left . 150) (border-width . 0) (menu-bar-lines . 0) (unsplittable . t)) "Frame parameters for the input run-time display frame in Emacs." :group 'gnuplot-gui :type '(repeat (sexp :tag "Parameter:"))) (defcustom gnuplot-gui-fontname-list '(" " "\"Helvetica\"" "\"Times-Roman\"") "List of known font names. These *must* be quoted, like so \"\\\"Helvetica\\\"\". This allows for fonts with names like \"\\\"Arial Bold Italic\\\"\" to be treated as single entries in the menu-buttons. And it is really important that the first entry in the list be a blank string." :group 'gnuplot-gui :type '(repeat (string :tag "Font name:"))) ;; some global variables (defvar gnuplot-current-frame nil) (defvar gnuplot-current-buffer nil) (defvar gnuplot-current-buffer-point nil) (defvar gnuplot-gui-alist nil) (defvar gnuplot-gui-current-string nil) ;;; various tools for handling data structures and text in the buffer ;; tools for accessing the elements of the lists in `gnuplot-gui-all-types' (defsubst gnuplot-gui-type-tag (obj) (elt obj 0)) (defsubst gnuplot-gui-type-symbol (obj) (elt obj 1)) (defsubst gnuplot-gui-type-default (obj) (elt obj 2)) (defsubst gnuplot-gui-type-prefix (obj) (elt obj 3)) ; also 'range seperator (defsubst gnuplot-gui-type-fourth (obj) (elt obj 4)) (defsubst gnuplot-gui-type-list (obj) (cddr obj)) (defun gnuplot-this-word () "Return the word under point." (let ((begin (save-excursion (beginning-of-line) (point-marker))) (end (save-excursion (end-of-line) (point-marker)))) (save-excursion (or (looking-at "\\<") (= (current-column) 0) (forward-word -1)) (if (> (point) begin) (setq begin (point-marker))) (forward-word 1) (if (> (point) end) (goto-char end)) (buffer-substring-no-properties begin (point))))) ;;; data structures containing regarding options in Gnuplot 3.7 ;; various constants used for options that take the same sorts of arguments (defconst gnuplot-gui-mtics-list '(("FREQUENCY" 'number " ") ("DEFAULT" 'list " " "default"))) (defconst gnuplot-gui-data-list '(("DATA TYPE" 'list " " "time"))) (defconst gnuplot-gui-label-list '(("LABEL" 'string " ") ("POSITION" 'position " " "" 2) ("FONTNAME" 'list " " gnuplot-gui-fontname-list) ("FONTSIZE" 'fontsize " "))) (defconst gnuplot-gui-range-list '(("RANGE" 'range (" " . " ") ":") ("REVERSE" 'list " " "reverse" "noreverse") ("WRITEBACK" 'list " " "writeback" "nowriteback"))) (defconst gnuplot-gui-tics-list '(("WHERE" 'list " " "axis" "border") ("MIRROR" 'list " " "mirror" "nomirror") ("ROTATE" 'list " " "rotate" "norotate") ("SERIES" 'position " " "" 3) ("LABEL ARRAY" 'labels () ))) (defconst gnuplot-gui-zeroaxis-list '(("LINETYPE" 'number " "))) (defvar gnuplot-gui-terminal-types nil "Associated list of terminal descriptions. See the doc-string for `gnuplot-gui-all-types'.") (setq gnuplot-gui-terminal-types (list (cons "aifm" '(("COLOR" 'list " " "monochrome" "gray" "color") ("FONTNAME" 'list " " gnuplot-gui-fontname-list) ("FONTSIZE" 'fontsize " "))) (cons "cgm" '(("MODE" 'list " " "landscape" "portrait" "default") ("COLOR" 'list " " "color" "monochrome") ("ROTATION" 'list " " "rotate" "norotate") ("WIDTH" 'number " " "width") ("LINEWIDTH" 'number " " "linewidth") ("FONTNAME" 'list " " "\"Arial\"" "\"Arial Italic\"" "\"Arial Bold\"" "\"Arial Bold Italic\"" "\"Times Roman\"" "\"Times Roman Italic\"" "\"Times Roman Bold\"" "\"Times Roman Bold Italic\"" "\"Helvetica\"" "\"Roman\"") ("FONTSIZE" 'fontsize " "))) (cons "corel" '(("COLOR" 'list " " "default" "color" "monochrome") ("FONTNAME" 'list " " "\"SwitzerlandLight\"" "\"Helvetica\"" "\"Times-Roman\"") ("FONTSIZE " 'number " ") ("X-SIZE " 'number " ") ("Y-SIZE " 'number " ") ("LINEWIDTH" 'number " "))) (cons "dumb" '(("LINEFEED" 'list " " "feed" "nofeed") ("X-SIZE" 'number " ") ("Y-SIZE" 'number " "))) (cons "emf" '(("COLOR" 'list " " "color" "monochrome") ("LINE" 'list " " "solid" "dashed") ("FONTNAME" 'string " ") ("FONTSIZE" 'number " "))) (cons "emtex" '(("FONTNAME" 'list " " "courier" "roman") ("FONTSIZE" 'fontsize " "))) (cons "fig" '(("COLOR" 'list " " "color" "monochrome") ("FRAMESIZE" 'list " " "small" "big") ("POINTSMAX" 'number " " "pointsmax") ("ORIENTATION" 'list " " "landscape" "portrait") ("UNITS" 'list " " "metric" "inches") ("FONT SIZE" 'number " " "fontsize") ("SIZE" 'pair (" " . " ") "size") ("LINE THICKNESS" 'number " " "thickness") ("LAYER DEPTH" 'number " " "depth"))) (cons "hp500c" '(("RESOLUTION" 'list " " "75" "100" "150" "300") ("COMPRESSION" 'list " " "rle" "tiff"))) (cons "hpgl" '(("PENS" 'number " ") ("EJECT" 'list " " "eject"))) (cons "hpdj" '(("RESOLUTION" 'list " " "75" "100" "150" "300"))) (cons "hpljii" '(("RESOLUTION" 'list " " "75" "100" "150" "300"))) (cons "hppj" '(("FONT" 'list " " "FNT9X17" "FNT5X9" "FNT13X25"))) (cons "imagen" '(("FONT SIZE" 'number " ") ("LAYOUT" 'list " " "portrait" "landscape") ("NUMBER OF GRAPHS" 'range (" " . " ") ","))) (cons "gpic" '(("X ORIGIN" 'number " ") ("Y ORIGIN" 'number " " ","))) (cons "latex" '(("FONTNAME" 'list " " "courier" "roman") ("FONTSIZE" 'fontsize " "))) (cons "mif" '(("COLOUR" 'list " " "colour" "monochrome") ("LINETYPE" 'list " " "polyline" "vectors"))) (cons "nec-cp6" '(("MODE" 'list " " "monochrome" "colour" "draft"))) (cons "pbm" '(("SIZE" 'list " " "small" "medium" "large") ("COLOR" 'list " " "monochrome" "gray" "color"))) (cons "pcl5L" '(("MODE" 'list " " "landscape" "portrait") ("FONTNAME" 'list " " "stick" "univers" "cg_times") ("FONTSIZE" 'fontsize " "))) (cons "png" '(("SIZE" 'list " " "small" "medium" "large") ("COLOR" 'list " " "monochrome" "gray" "color"))) (cons "postscript" '(("MODE" 'list " " "landscape" "portrait" "eps" "default") ("ENHANCED" 'list " " "enhanced" "noenhanced") ("COLOR" 'list " " "color" "monochrome") ("SOLID" 'list " " "solid" "dashed") ("DUPLEXING" 'list " " "defaultplex" "simplex" "duplex") ("FONTNAME" 'list " " gnuplot-gui-fontname-list) ("FONTSIZE" 'fontsize " "))) (cons "pslatex" '(("COLOR" 'list " " "monochrome" "color") ("DASHED" 'list " " "dashed") ("ROTATION" 'list " " "rotate" "norotate") ("AUXFILE" 'list " " "auxfile"))) (cons "pstex" '(("COLOR" 'list " " "monochrome" "color") ("DASHED" 'list " " "dashed") ("ROTATION" 'list " " "rotate" "norotate") ("AUXFILE" 'list " " "auxfile"))) (cons "pstricks" '(("HACK TEXT" 'list " " "hacktext" "nohacktext") ("PLOT SCALING" 'list " " "nounit" "unit"))) (cons "regis" '(("COLOR DEPTH" 'list "4" "16"))) (cons "tgif" '(("LAYOUT" 'list " " "portrait" "landscape") ("NUMBER OF GRAPHS" 'range (" " . " ") ",") ("LINE TYPE" 'list " " "solid" "dashed") ("FONTNAME" 'list " " gnuplot-gui-fontname-list) ("FONTSIZE" 'fontsize " "))) (cons "tpic" '(("POINTSIZE" 'number " ") ("LINEWIDTH" 'number " ") ("INTERVAL " 'number " "))) (cons "vgagl" ; for pm3d patch (also persist, raise in x11) <MT> '(("BACKGROUND" 'position " " "background" 3) ("INTERPOLATION" 'list " " "uniform" "interpolate") ("DUMP" 'file " ") ("MODE" 'string " " ""))) (cons "x11" '(("RESET" 'list " " "reset") ("TERMINAL NUMBER" 'number " ") ("PERSIST" 'list " " "persist" "nopersist") ("RAISE" 'list " " "raise" "noraise"))) )) (defvar gnuplot-gui-terminal-list nil) (setq gnuplot-gui-terminal-list (append (list " ") (mapcar 'car gnuplot-gui-terminal-types))) (defvar gnuplot-gui-set-types nil "Associated list of set option descriptions. See the doc-string for `gnuplot-gui-all-types'.") (setq gnuplot-gui-set-types (list (cons "angles" '(("UNITS" 'list " " "degrees" "radians"))) (cons "arrow" '(("TAG" 'tag " ") ("FROM" 'position " " "from" 3) ("TO" 'position " " "to" 3) ("HEAD" 'list " " "head" "nohead") ("LINESTYLE" 'number " " "ls") ("LINETYPE " 'number " " "lt") ("LINEWIDTH" 'number " " "lw"))) (cons "noarrow" '(("TAG" 'tag " "))) (cons "autoscale" '(("AXIS" 'list " " "x" "y" "z" "x2" "y2" "xy" "xmin" "ymin" "zmin" "x2min" "y2min" "xymin" "xmax" "ymax" "zmax" "x2max" "y2max" "xymax"))) (cons "noautoscale" '(("AXIS" 'list " " "x" "y" "z" "x2" "y2" "xy" "xmin" "ymin" "zmin" "x2min" "y2min" "xymin" "xmax" "ymax" "zmax" "x2max" "y2max" "xymax"))) (cons "bar" '(("SIZE" 'list " " "small" "large"))) (cons "border" '(("BORDER CODE" 'number " ") ("LINE STYLE" 'list " " "lines" "dots" "points" "linespoints") ("LINESTYLE" 'number " " "ls") ("LINETYPE" 'number " " "lt") ("LINEWIDTH" 'number " " "lw") )) (cons "boxwidth" '(("WIDTH" 'number " "))) (cons "clabel" '(("FORMAT" 'format " "))) (cons "clip" '(("CLIP TYPE" 'list " " "points" "one" "two"))) (cons "noclip" '(("CLIP TYPE" 'list " " "points" "one" "two"))) ;;(cons "cntrparam" ;; '(("INTERPOLATION" 'list " " "linear" "cubicspline" "bspline") ;; ("POINTS" 'number " " "points") ;; ("ORDER" 'number " " "order"))) (cons "contour" '(("WHERE" 'list " " "base" "surface" "both"))) (cons "dgrid3d" '(("ROW,COLUMN,NORM" 'position " " "" 3))) (cons "encoding" '(("ENCODING" 'list " " "default" "iso_8859_1" "cp850" "cp437"))) (cons "format" '(("AXIS" 'list " " "x" "y" "z" "xy" "x2" "y2") ("FORMAT" 'format " "))) (cons "dummy" '(("VAR 1" 'string " " "") ("VAR 2" 'string " " ","))) (cons "grid" '(("XTICS" 'list " " "xtics" "mxtics" "noxtics" "nomxtics") ("YTICS" 'list " " "ytics" "mytics" "noytics" "nomytics") ("ZTICS" 'list " " "ztics" "mztics" "noztics" "nomztics") ("X2TICS" 'list " " "x2tics" "mx2tics" "nox2tics" "nomx2tics") ("Y2TICS" 'list " " "y2tics" "my2tics" "noy2tics" "nomy2tics") ("POLAR" 'number " " "polar") ("MAJOR LINETYPE" 'number " ") ("MINOR LINETYPE" 'number " "))) (cons "hidden3d" '(("ALGORITHM" 'list " " "defaults" "offset" "nooffset" ;;"trianglepattern # bitpattern between 0 and 7" "trianglepattern 0" "trianglepattern 1" "trianglepattern 2" "trianglepattern 3" "trianglepattern 4" "trianglepattern 5" "trianglepattern 6" "trianglepattern 7" ;;"undefined # level between 0 and 3" "undefined 0" "undefined 1" "undefined 2" "undefined 3" "noundefined" "altdiagonal" "noaltdiagonal" "bentover" "nobentover"))) (cons "historysize" '(("SIZE" 'number " "))) (cons "isosamples" '(("ISO_U LINES" 'number " ") ("ISO_V LINES" 'number " " ","))) (cons "key" '(("LOCATION" 'list " " "left" "right" "top" "bottom" "outside" "below") ("POSITION" 'position " " "" 3) ("JUSTIFICATION" 'list " " "Left" "Right") ("REVERSE" 'list " " "reverse" "noreverse") ("SAMPLE LENGTH" 'number " " "samplen") ("SPACING" 'number " " "spacing") ("WIDTH" 'number " " "width") ("TITLE" 'string " " "title ") ("BOX LINETYPE" 'number " " "box") ;; linetype data ("NOBOX" 'list " " "nobox"))) (cons "label" '(("TAG" 'tag " ") ("LABEL TEXT" 'string " ") ("POSITION" 'position " " "at" 3) ;; first, second, graph, screen ("JUSTIFICATION" 'list " " "left" "right" "center") ("ROTATE" 'list " " "rotate" "norotate") ("FONT" 'string " " "font"))) ;; font "name,size" (cons "nolabel" '(("TAG" 'tag " "))) (cons "linestyle" '(("TAG " 'tag " ") ("LINE STYLE" 'list " " "boxerrorbars" "boxes" "boxxyerrorbars" "candlesticks" "dots" "financebars" "fsteps" "histeps" "impulses" "lines" "linespoints" "points" "steps" "vector" "xerrorbars" "xyerrorbars" "yerrorbars") ("LINETYPE " 'number " " "lt") ("LINEWIDTH" 'number " " "lw") ("POINTTYPE" 'number " " "pt") ("POINTSIZE" 'number " " "ps"))) (cons "locale" '(("LOCALE" 'string " "))) (cons "logscale" '(("AXIS" 'list " " "x" "y" "z" "xy" "xz" "yz" "xyz" "x2" "y2") ("BASE" 'number " "))) (cons "nologscale" '(("AXIS" 'list " " "x" "y" "z" "xy" "xz" "yz" "xyz" "x2" "y2"))) (cons "mapping" '(("COORDINATE SYSTEM" 'list " " "cartesian" "spherical" "cylindrical"))) ; _margin (cons "bmargin" '(("BOTTOM MARGIN" 'number " "))) (cons "lmargin" '(("LEFT MARGIN" 'number " "))) (cons "rmargin" '(("RIGHT MARGIN" 'number " "))) (cons "tmargin" '(("TOP MARGIN" 'number " "))) (cons "missing" '(("CHARACTER" 'string " " 1))) ; m_tics (cons "mxtics" gnuplot-gui-mtics-list) (cons "mytics" gnuplot-gui-mtics-list) (cons "mztics" gnuplot-gui-mtics-list) (cons "mx2tics" gnuplot-gui-mtics-list) (cons "my2tics" gnuplot-gui-mtics-list) ; pm3d additions <MT> (cons "mouse" '(("DOUBLECLICK" 'number " " "doubleclick") ("ZOOM" 'list " " "zoomcoordinates" "nozoomcoordinates") ("POLAR" 'list " " "polarcoordinates" "nopolarcoordinates") ("FORMAT" 'string " " "format") ("CLIPBOARDFORMAT" 'string " " "clipboardformat") ("MOUSEFORMAT" 'string " " "mouseformat") ("LABELS" 'list " " "labels" "nolabels") ("LABELOPTIONS" 'string " " "labeloptions") ("ZOOMJUMP" 'list " " "zoomjump" "nozoomjump") ("VERBOSE" 'list " " "verbose" "noverbose"))) (cons "palette" '(("COLOR" 'list " " "gray" "color") ("RGBFORMULAE" 'position " " "rgbformulae" 3) ("PARITY" 'list " " "positive" "negative") ("FORMULAE" 'list " " "nops_allcF" "ps_allcF") ("MAXCOLORS" 'number " ") ("COLOR_BOX" 'list " " "nocb" "cbdefault" "cbuser") ("ORIENTATION" 'list " " "cbvertical" "cbhorizontal") ("ORIGIN" 'position " " "origin" 2) ("SIZE" 'position " " "size" 2) ("BORDER" 'number " ") ("NOBORDER" 'list " " "bdefault" "noborder"))) (cons "pm3d" '(("AT" 'list* " " "b" "s" "t" "bs" "bt" "st" "bst") ("SCANS" 'list " " "scansautomatic" "scansforward" "scansbackward") ("FLUSH" 'list* " " "begin" "center" "end") ("CLIP" 'list " " "clip1in" "clip4in") ("ZRANGE" 'range (" " . " ") ":") ("HIDDEN3D" 'number " ") ("NOHIDDEN3D" 'list " " "nohidden3d") ("FILLING" 'list " " "transparent" "solid") ("MAP" 'list " " "map"))) (cons "offsets" '(("LEFT " 'number " ") ("RIGHT " 'number " " ",") ("TOP " 'number " " ",") ("BOTTOM" 'number " " ","))) (cons "origin" '(("X ORIGIN" 'number " ") ("Y ORIGIN" 'number " " ","))) (cons "output" '(("FILENAME" 'file " "))) (cons "pointsize" '(("MULTIPLIER" 'number " "))) (cons "samples" '(("2D PLOT" 'number " ") ("3D PLOT" 'number " " ","))) (cons "size" '(("ASPECT" 'list " " "square" "nosquare" "ratio" "noratio") ("X-SCALE OR RATIO" 'number " ") ("Y-SCALE" 'number " " ","))) (cons "style" '(("DATA TYPE" 'list " " "data" "function") ("PLOT STYLE" 'list " " "boxerrorbars" "boxes" "boxxyerrorbars" "candlesticks" "dots" "financebars" "fsteps" "histeps" "impulses" "lines" "linespoints" "points" "steps" "vector" "xerrorbars" "xyerrorbars" "yerrorbars"))) (cons "terminal" '(("TERMINAL TYPE" 'list " " gnuplot-gui-terminal-list))) (cons "tics" '(("DIRECTION" 'list " " "in" "out"))) (cons "ticslevel" '(("RELATIVE HEIGHT" 'number " "))) (cons "ticscale" '(("MAJOR" 'number " ") ("MINOR" 'number " "))) (cons "timestamp" '(("FORMAT STRING" 'format " ") ("WHERE" 'list " " "top" "bottom") ("ROTATE" 'list " " "rotate" "norotate") ("X-OFFSET" 'number " ") ("Y-OFFSET" 'number " " ",") ("FONTNAME" 'list " " gnuplot-gui-fontname-list))) (cons "timefmt" '(("FORMAT STRING" 'string " "))) (cons "title" '(("TITLE" 'string " "))) (cons "view" '(("X-ROTATION" 'number " ") ("Z-ROTATION" 'number " " ",") ("SCALE" 'number " " ",") ("Z-SCALE" 'number " " ","))) ;; ("SCALE" 'position " " "," 4) ; _data (cons "xdata" gnuplot-gui-data-list) (cons "ydata" gnuplot-gui-data-list) (cons "zdata" gnuplot-gui-data-list) (cons "x2data" gnuplot-gui-data-list) (cons "y2data" gnuplot-gui-data-list) ; _label (cons "xlabel" gnuplot-gui-label-list) (cons "ylabel" gnuplot-gui-label-list) (cons "zlabel" gnuplot-gui-label-list) (cons "x2label" gnuplot-gui-label-list) (cons "y2label" gnuplot-gui-label-list) ; _range, note that the [] syntax for ; the writeback argument is ; not properly supported (cons "xrange" gnuplot-gui-range-list) (cons "yrange" gnuplot-gui-range-list) (cons "zrange" gnuplot-gui-range-list) (cons "x2range" gnuplot-gui-range-list) (cons "y2range" gnuplot-gui-range-list) (cons "trange" gnuplot-gui-range-list) (cons "rrange" gnuplot-gui-range-list) (cons "urange" gnuplot-gui-range-list) (cons "vrange" gnuplot-gui-range-list) ; _tics (cons "xtics" gnuplot-gui-tics-list) (cons "ytics" gnuplot-gui-tics-list) (cons "ztics" gnuplot-gui-tics-list) (cons "x2tics" gnuplot-gui-tics-list) (cons "y2tics" gnuplot-gui-tics-list) ; zeroaxis (cons "zeroaxis" gnuplot-gui-zeroaxis-list) (cons "xzeroaxis" gnuplot-gui-zeroaxis-list) (cons "yzeroaxis" gnuplot-gui-zeroaxis-list) (cons "y2zeroaxis" gnuplot-gui-zeroaxis-list) (cons "x2zeroaxis" gnuplot-gui-zeroaxis-list) (cons "zero" '(("THRESHOLD" 'number " "))) )) (defvar gnuplot-gui-command-types nil "Associated list of command descriptions. See the doc-string for `gnuplot-gui-all-types'.") (setq gnuplot-gui-command-types (list (cons "cd" '(("FILENAME" 'file " "))) (cons "call" '(("INPUT FILE" 'file " ") ("PARAMETER LIST" 'string " "))) (cons "load" '(("INPUT FILE" 'file " "))) (cons "pause" '(("TIME" 'number " ") ("MESSAGE" 'string " "))) (cons "print" '(("EXPRESSION" 'string " "))) (cons "save" '(("SAVE" 'list " " "functions" "variables" "set") ("FILE" 'file " "))) (cons "update" '(("INITIAL FILE" 'file " " t) ("UPDATED FILE" 'file " " t))) )) (defcustom gnuplot-gui-plot-splot-fit-style 'simple "Control the complexity of the GUI display for plot, splot, and fit. The values are 'simple, which causes a limited set of plot, splot, or fit options to be displayed, and 'complete, which attempts to display all options. The 'complete setting is prone to making errors when parsing values already in the script buffer." :group 'gnuplot-gui :type '(radio (const :tag "Simple listing" simple) (const :tag "Complete listing" complete))) (defconst gnuplot-gui-plot-simple-list '(("X RANGE" 'range (" " . " ") ":") ("Y RANGE" 'range (" " . " ") ":") ("DATA FILE" 'file " ") ("THRU" 'string* " " "thru") ("USING" 'modifier " ") ("TITLE" 'string " ") ("WITH" 'list* " " "boxerrorbars" "boxes" "boxxyerrorbars" "candlesticks" "dots" "financebars" "fsteps" "histeps" "impulses" "lines" "linespoints" "points" "steps" "vector" "xerrorbars" "xyerrorbars" "yerrorbars"))) (defconst gnuplot-gui-plot-full-list '(;;("T RANGE" 'range (" " . " ") ":") ("X RANGE" 'range (" " . " ") ":") ("Y RANGE" 'range (" " . " ") ":") ("xa" 'text "\t---------------------") ("FUNCTION" 'string " ") ("xc" 'text " or") ("DATA FILE" 'file " ") ("INDEX" 'modifier " ") ("EVERY" 'modifier " ") ("THRU" 'string* " " "thru") ("USING" 'modifier " ") ("SMOOTH" 'list* " " "unique" "csplines" "acsplines" "bezier" "sbezier") ;; datafile modifiers ("AXES" 'list* " " "x1y1" "x2y2" "x1y2" "x2y1") ("TITLE" 'string " ") ("NOTITLE" 'list " " "notitle") ("xf" 'text "\t---------------------") ("xi" 'text "Select a standard plotting style") ("WITH" 'list* " " "boxerrorbars" "boxes" "boxxyerrorbars" "candlesticks" "dots" "financebars" "fsteps" "histeps" "impulses" "lines" "linespoints" "points" "steps" "vector" "xerrorbars" "xyerrorbars" "yerrorbars") ("xo" 'text " or a previously defined style") ("LINE STYLE " 'number " " "ls") ("xr" 'text " or specify a style in-line") ("LINE TYPE " 'number " " "lt") ("LINE WIDTH " 'number " " "lw") ("POINT TYPE " 'number " " "pt") ("POINT STYLE" 'number " " "ps") )) (defconst gnuplot-gui-splot-simple-list '(("DATA FILE" 'file " ") ("TITLE" 'string " ") ("WITH" 'list* " " "lines" "linespoints" "points" "dots" "impulses"))) (defconst gnuplot-gui-splot-full-list '(;;("U RANGE" 'range (" " . " ") ":") ;;("V RANGE" 'range (" " . " ") ":") ("X RANGE" 'range (" " . " ") ":") ("Y RANGE" 'range (" " . " ") ":") ("Z RANGE" 'range (" " . " ") ":") ("xa" 'text "\t---------------------") ("FUNCTION" 'string " ") ("xc" 'text " or") ("DATA FILE" 'file " ") ("INDEX" 'modifier " ") ("EVERY" 'modifier " ") ("THRU" 'string* " " "thru") ("USING" 'modifier " ") ("SMOOTH" 'list* " " "unique" "csplines" "acsplines" "bezier" "sbezier") ("TITLE" 'string " ") ("NOTITLE" 'list " " "notitle") ("WITH" 'list* " " "lines" "linespoints" "points" "dots" "impulses"))) (defconst gnuplot-gui-fit-simple-list '(("FUNCTION" 'string* " " "") ("DATA FILE" 'file " ") ("VIA (params)" 'string* " " "via") )) (defconst gnuplot-gui-fit-full-list '(("X RANGE" 'range (" " . " ") ":") ("Y RANGE" 'range (" " . " ") ":") ("xa" 'text "----- fitting functionn and file --------") ("FUNCTION" 'string* " " "") ("DATA FILE" 'file " ") ("xb" 'text "----- datafile modifiers ----------------") ("INDEX" 'modifier " ") ("EVERY" 'modifier " ") ("THRU" 'string* " " "thru") ("USING" 'modifier " ") ("SMOOTH" 'list* " " "unique" "csplines" "acsplines" "bezier" "sbezier") ("xc" 'text "----- parameters (file or parameters) ---") ("VIA (file)" 'string " " "via") ("VIA (params)" 'string* " " "via") )) (defvar gnuplot-gui-plot-splot-fit nil "Associated list of plot, splot, and fit descriptions. See the doc-string for `gnuplot-gui-all-types'.") (setq gnuplot-gui-plot-splot-fit (list (cons "plot" (if (equal gnuplot-gui-plot-splot-fit-style 'complete) gnuplot-gui-plot-full-list gnuplot-gui-plot-simple-list)) (cons "splot" (if (equal gnuplot-gui-plot-splot-fit-style 'complete) gnuplot-gui-splot-full-list gnuplot-gui-splot-simple-list)) (cons "fit" (if (equal gnuplot-gui-plot-splot-fit-style 'complete) gnuplot-gui-fit-full-list gnuplot-gui-fit-simple-list))) ) (defvar gnuplot-gui-test-type nil) (setq gnuplot-gui-test-type (list (cons "test" '(("TAG" 'tag " ") ("LIST" 'list " " "1" "2" "3") ("LIST*" 'list* " " "1" "2" "3") ("NUMBER" 'number " " "number") ("RANGE" 'range (" " . " ") ":") ("PAIR" 'pair (" " . " ") "pair") ("LABELS" 'labels ()) ("FILE" 'file " ") ("TEXT" 'text "this is text") ("STRING" 'string " ") ("STRING*" 'string* " " "string*") ("FORMAT" 'format " ") ("POSITION" 'position " " "at" 3) ("FONTSIZE" 'fontsize " ") )))) (defvar gnuplot-gui-all-types nil "Associated list of terminal, set option, and command arguments. Each entry in the list is a cons cell of the form (OPTION . ALIST) where OPTION is one of the recognized options in Gnuplot, either a command, something that is set, or a terminal type. Only those commands, set options, and terminal types that actually take arguments are in this associated list. ALIST is itself an associated list where each entry is of the form: (TAG TYPE DEFAULT REST) TAG is the name used on the widget and indicates one of the options for this command, set option, or terminal type. TYPE is one of 'list a menu-list of strings 'list* a menu-list of strings with a prefix 'number a number with an optional prefix 'tag like number but must be the first argument 'fontsize like number but must be the last argument 'range a pair of numbers like [#,#] or [#:#] 'pair a pair of numbers with no punctuation and a prefix 'file a quoted string and a file browser 'string a quoted string with an optional prefix 'string* an unquoted string with a prefix 'format a quoted string and an info-link to (gnuplot)format 'labels an array as needed for xtics, ytics, etc 'position 2 or 3 comma separated numbers with an optional prefix DEFAULT is the default value for this option. Note that the default for 'range and 'pair is a cons cell and the default for 'labels is a list. For most things, the best choice of DEFAULT is a string of white space or a cons cell of two strings of white space. Strings of white space are better defaults than empty strings or nil. The value of REST depends upon TYPE: For 'list & REST is the list of options that will go into the 'list* menu-button. This can also be a symbol which evaluates to a list containing the options to go into the menu-button. This list variable must contain the DEFAULT. For 'number REST is the prefix string (if it exists) for that number. For 'range REST is the separator, \":\" for plot ranges and \",\" for plot dimensions (see for example the tgif terminal type) For 'string & REST may a number denoting the width of the editable-text 'string* field or it may be a string denoting a prefix. By default, the width is half the width of the frame and there is no prefix. It may be useful to specify \"1\" when the input is a single character as in 'set missing'. For 'file REST determines the label placed before the file insertion field. If non-nil, then TAG is used. If nil, then the default \"File\" is used. For 'position REST is the prefix and the number of comma separated numbers For others REST is not used. Here is an example entry for the png terminal type: (cons \"png\" '((\"SIZE\" 'list \" \" \"small\" \"medium\" \"large\") (\"COLOR\" 'list \" \" \"monochrome\" \"gray\" \"color\"))) This alist is formed at load time by appending together `gnuplot-gui-terminal-types', `gnuplot-gui-set-types' and `gnuplot-gui-command-types'.") (setq gnuplot-gui-all-types (append gnuplot-gui-terminal-types gnuplot-gui-set-types gnuplot-gui-command-types gnuplot-gui-plot-splot-fit gnuplot-gui-test-type )) (defun gnuplot-gui-swap-simple-complete () (interactive) (setq gnuplot-gui-plot-splot-fit-style (if (equal gnuplot-gui-plot-splot-fit-style 'complete) 'simple 'complete)) (if (equal gnuplot-gui-plot-splot-fit-style 'complete) (progn (setcdr (assoc "plot" gnuplot-gui-all-types) gnuplot-gui-plot-full-list) (setcdr (assoc "splot" gnuplot-gui-all-types) gnuplot-gui-splot-full-list) (setcdr (assoc "fit" gnuplot-gui-all-types) gnuplot-gui-fit-full-list)) (setcdr (assoc "plot" gnuplot-gui-all-types) gnuplot-gui-plot-simple-list) (setcdr (assoc "splot" gnuplot-gui-all-types) gnuplot-gui-splot-simple-list) (setcdr (assoc "fit" gnuplot-gui-all-types) gnuplot-gui-fit-simple-list)) (message "Using %s lists for plot, splot, and fit." gnuplot-gui-plot-splot-fit-style) ) ;;; user interface to the widget-y stuff (defun gnuplot-gui-mouse-set (event) "Use the mouse to begin setting options using a GUI interface. EVENT is a mouse event. Bound to \\[gnuplot-gui-mouse-set] Note that \"plot\", \"splot\", \"fit\", and \"cntrparam\" are not currently supported." (interactive "@e") (when (fboundp 'widget-create) (save-excursion (mouse-set-point event) (gnuplot-gui-set-options-and-insert)))) (defun gnuplot-gui-get-frame-param (param) (if gnuplot-xemacs-p (plist-get gnuplot-gui-frame-plist param) (cdr (assoc param gnuplot-gui-frame-parameters)))) (defun gnuplot-gui-set-frame-param (param value) (if gnuplot-xemacs-p (plist-put gnuplot-gui-frame-plist param value) (setcdr (assoc param gnuplot-gui-frame-parameters) value))) (defun gnuplot-gui-set-options-and-insert () "Insert arguments using a GUI interface. Determine contents of current line and set up the appropriate GUI frame. Bound to \\[gnuplot-gui-set-options-and-insert] Note that \"cntrparam\" is not currently supported." (interactive) (when (fboundp 'widget-create) (let ((begin (save-excursion (beginning-of-line) (point-marker))) (end (save-excursion (end-of-line) (point-marker))) (termin (concat "\\(,\\s-*" (regexp-quote "\\") "\\|;\\)")) (set nil) (term nil)) (save-excursion ;; there can be more then one command per line (if (search-backward ";" begin "to_limit") (progn (forward-char 1) (setq begin (point-marker)))) (if (re-search-forward termin end "to_limit") (progn (backward-char (length (match-string 1))) (setq end (point-marker)))) (goto-char begin) (skip-syntax-forward "-" end) ;; various constructions are recognized here. at the end of this ;; cond, point should be just after the word whose arguments are ;; to be set (cond ((looking-at "set\\s-+") (setq set t) (goto-char (match-end 0)) (if (looking-at "\\sw+") (goto-char (match-end 0))) (when (string-match "^ter" (gnuplot-this-word)) ; terminal? (setq term t) (forward-word 1)) (when (string-match "^\\(da\\|fu\\)" (gnuplot-this-word)) (unless (looking-at "\\s-+st") (insert " style") (forward-word 1)) (forward-word 1))) ((looking-at (concat "\\(cd\\|ca\\|lo\\|pa\\|pr\\|sa\\|u\\)" "\\w*" "[\\s-\\']")) (forward-word 1)) ;;(goto-char (match-end 0))) (t (forward-word 1))) (if (> (point) end) (goto-char end)) (let* ((w (gnuplot-this-word)) (wd (try-completion w gnuplot-gui-all-types)) (word "") wrd list) (cond ((equal wd t) (setq word w)) ((equal wd nil) (setq word w)) ((assoc wd gnuplot-gui-all-types) (setq word wd)) (t (setq wd nil))) (cond ((equal (string-match "^\\s-*$" w) 0) (message "Blank line")) ((and wd (stringp word)) (gnuplot-gui-correct-command word set term begin) (setq gnuplot-gui-alist nil gnuplot-gui-current-string (buffer-substring-no-properties (point) end)) (gnuplot-gui-set-alist word gnuplot-gui-current-string) (let* ((old-height (gnuplot-gui-get-frame-param 'height)) (old-top (gnuplot-gui-get-frame-param 'top))) (when (or (and (equal gnuplot-gui-plot-splot-fit-style 'complete) (member* word '("plot" "splot" "fit") :test 'string=)) (equal word "test")) (gnuplot-gui-set-frame-param 'height 32) (gnuplot-gui-set-frame-param 'top 50)) (gnuplot-gui-prompt-for-frame word) (when (or (and (equal gnuplot-gui-plot-splot-fit-style 'complete) (member* word '("plot" "splot" "fit") :test 'string=)) (equal word "test")) (gnuplot-gui-set-frame-param 'height old-height) (gnuplot-gui-set-frame-param 'top old-top)) )) ((setq wrd (car (all-completions w '(("cntrparam"))))) (message "Setting arguments for %S is currently unsuported in gnuplot-mode" wrd)) ((setq list (all-completions w gnuplot-gui-all-types)) (message "%S could be one of %S" w list)) (t (message "%S is not a gnuplot command which takes options" w)))) )))) (defun gnuplot-gui-toggle-popup () (interactive) (setq gnuplot-gui-popup-flag (not gnuplot-gui-popup-flag)) (message (if gnuplot-gui-popup-flag "Argument popup will appear after insertions." "Argument popup will no longer appear after insertions."))) (defun gnuplot-gui-y-n (foo)) (if gnuplot-xemacs-p (defalias 'gnuplot-gui-y-n 'y-or-n-p-maybe-dialog-box) (defalias 'gnuplot-gui-y-n 'y-or-n-p)) (defun gnuplot-gui-correct-command (word set term begin) "Check syntax of set command and terminal specifications. WORD is the item being set. SET and TERM are non-nil if the words \"set\" and \"terminal\" were found preceding WORD in the buffer. BEGIN is the beginning of the command." (save-excursion (cond ((assoc word gnuplot-gui-terminal-types) (when (and (not (and set term)) (gnuplot-gui-y-n (format "%S must be preceded by \"set terminal\". Add it? " word))) (backward-word 1) (let ((e (point-marker))) (goto-char begin) (skip-syntax-forward "-" e) (delete-region (point) e) (insert "set terminal ")))) ((assoc word gnuplot-gui-set-types) (when (and (not set) (gnuplot-gui-y-n (format "%S must be preceded by \"set\". Add \"set\"? " word))) (backward-word 1) (let ((e (point-marker))) (goto-char begin) (skip-syntax-forward "-" e) (delete-region (point) e) (insert "set ")))))) (message nil)) ;;; handle the actual arguments (defun gnuplot-gui-fix-arg-list (list) "Correct the result of splitting `gnuplot-gui-current-string'. LIST is the split string. This removes empty and all-blank strings from the list and concatenates the strings that are part of a quoted argument, for example an axis label or a font name. It also replaces bounding single quotes with double quotes, since double quotes are used in `gnuplot-gui-all-types'." (let (fixed-list quote quoted) ; remove blanks (setq list (remove* "\\s-+" list :test 'string-match) list (remove* "" list :test 'string=)) (while list ; concatinate parts of quoted string (if (not (string-match "^\\([\]\[()'\"]\\)" (car list))) (setq fixed-list (append fixed-list (list (car list)))) (setq quote (match-string 1 (car list)) quoted (car list)) (if (string= quote "[") (setq quote "]")) (if (string= quote "(") (setq quote ")")) (while (and list (or (equal (length quoted) 1) (not (string-match (concat (regexp-quote quote) "$") quoted)))) (setq quoted (concat quoted " " (cadr list)) list (cdr list))) (if (string= quote "'") (setq quoted (concat "\"" (substring quoted 1)) quoted (concat (substring quoted 0 -1) "\""))) (setq fixed-list (append fixed-list (list quoted)))) (setq list (cdr list)) ) fixed-list)) (defun gnuplot-gui-set-alist (word string) "Set defaults for arguments, using text from buffer if appropriate. WORD is the Gnuplot expression whose arguments are being set. STRING is text from the buffer containing the previous values for WORD's arguments." (let ((alist (cdr (assoc word gnuplot-gui-all-types))) (arg-list (gnuplot-gui-fix-arg-list (split-string string)) )) ;; arg-list contains the arguments taken from the buffer (setq gnuplot-gui-alist nil) (while alist (let* ((list (car alist)) (tag (gnuplot-gui-type-tag list)) (symbol (eval (gnuplot-gui-type-symbol list))) (default (gnuplot-gui-type-default list)) (prefix (gnuplot-gui-type-prefix list)) (values (gnuplot-gui-type-list list)) (this-cons (cond ((stringp default) (cons tag default)) ((consp default) ; set cons valued default w/care (cons tag (cons (car default) (cdr default)))) (t (cons tag default)))) (temp-list arg-list) ) ;;(message "%S" temp-list) ; want to lop values off arg-list ; as they are found (if (symbolp (cadr values)) (setq values (symbol-value (cadr values)))) ;; check if an argument of this type is in arg-list ;; set the current cons cell if it is (while temp-list (cond ;; ---------------------------- list ((member* symbol '(list list*) :test 'equal) (let* ((case-fold-search nil) (match-cons (member* (concat "^" (car temp-list)) values :test 'string-match))) (if (and (car match-cons) ; " " may be first elem. of list (not (string= " " (car match-cons)))) (setq this-cons (cons tag (car match-cons)) arg-list (remove* (car temp-list) arg-list :test 'string= :count 1) temp-list nil) (setq temp-list (cdr temp-list))))) ;; ---------------------------- tag (first number in list) ((equal symbol 'tag) (if (string-match "^[-0-9.]+$" (car arg-list)) (setq this-cons (cons tag (car arg-list)) temp-list nil) (setq temp-list (cdr temp-list))) ) ;; ---------------------------- fontsize (last number in list) ((equal symbol 'fontsize) (if (string-match "^[-0-9.]+$" (car (last arg-list))) (setq this-cons (cons tag (car (last arg-list))) temp-list nil) (setq temp-list (cdr temp-list))) ) ;; ---------------------------- number with prefix ((equal symbol 'number) (cond ((and (string= prefix (car temp-list)) (string-match "^[-0-9.]+$" (cadr temp-list))) (setq this-cons (cons tag (cadr temp-list)) arg-list (remove* (car temp-list) arg-list :test 'string= :count 1) arg-list (remove* (cadr temp-list) arg-list :test 'string= :count 1) temp-list nil)) ;; --------------------- number without prefix ((and (not prefix) (string-match "^[-0-9.]+$" (car temp-list))) (setq this-cons (cons tag (car temp-list)) arg-list (remove* (car temp-list) arg-list :test 'string= :count 1) temp-list nil)) (t (setq temp-list (cdr temp-list))))) ;; ---------------------------- pair with prefix ((equal symbol 'pair) (if (and (string= prefix (car temp-list)) (string-match "^[-0-9.]+$" (cadr temp-list))) (let ((this-car (cadr temp-list)) (this-cdr (if (string-match "^[-0-9.]+$" (caddr temp-list)) (caddr temp-list) ""))) (setq this-cons (cons tag (cons this-car this-cdr)) temp-list nil)) (setq temp-list (cdr temp-list)))) ;; ---------------------------- range ((equal symbol 'range) (if (string-match (concat "\\[\\s-*" ; opening bracket "\\([^:, \t]*\\)" ; first argument "\\s-*[:,]\\s-*" ; separator "\\([^\] \t]*\\)" ; second argument "\\s-*\\]") ; closing bracket (car temp-list)) (setq this-cons (cons tag (cons (match-string 1 (car temp-list)) (match-string 2 (car temp-list)))) arg-list (remove* (car temp-list) arg-list :test 'string= :count 1) temp-list nil) (setq temp-list (cdr temp-list)) )) ;; ---------------------------- labels ((equal symbol 'labels) (if (string-match (concat "(" ; opening paren "\\([^\)]*\\)" ; string ")") ; closing paren (car temp-list)) (let* ((list (split-string (car temp-list) "[ \t(),]+")) (list (remove* "" list :test 'string=)) (return ())) (while list (if (string-match "['\"]\\([^'\"]*\\)['\"]" (car list)) (setq return (append return (list (match-string 1 (car list)))) list (cdr list) return (append return (list (car list))) ) (setq return (append return (list "" (car list))))) (setq list (cdr list)) ) (setq this-cons (cons tag return) arg-list (remove* (car temp-list) arg-list :test 'string= :count 1) temp-list nil)) (setq temp-list (cdr temp-list))) ) ;; ---------------------------- string, file, format ((member* symbol '(string file format) :test 'equal) (if (string-match (concat "['\"]" ; opening quote "\\([^'\"]*\\)" ; string "['\"]") ; closing quote (car temp-list)) (setq this-cons (cons tag (match-string 0 (car temp-list))) arg-list (remove* (car temp-list) arg-list :test 'string= :count 1) temp-list nil) (setq temp-list (cdr temp-list)) )) ;; ---------------------------- string* ((equal symbol 'string*) (if (string= prefix (car temp-list)) (setq this-cons (cons tag (cadr temp-list)) arg-list (remove* (car temp-list) arg-list :test 'string= :count 1) arg-list (remove* (cadr temp-list) arg-list :test 'string= :count 1) temp-list nil) (setq temp-list (cdr temp-list)) ) ) ;; ---------------------------- other or unknown (t (setq temp-list nil)) )) (setq gnuplot-gui-alist (append gnuplot-gui-alist (list this-cons)))) (setq alist (cdr alist))) )) (defun gnuplot-gui-post-process-alist (type) "A few types need some additional processing. 'range, 'pair, and 'labels are cons or list valued and need to b made into strings. This is called right before inserting the arguments into the buffer. TYPE is the object whose arguments are being set." (let ((alist gnuplot-gui-alist) (types (cdr (assoc type gnuplot-gui-all-types))) ) (while alist ;; loop thru alist looking for tyeps needing post-processing (let* ((list (assoc (caar alist) types)) (value (cdr (assoc (caar alist) gnuplot-gui-alist))) (prefix (gnuplot-gui-type-prefix list)) (symb (gnuplot-gui-type-symbol list)) ) (cond ;;-------------------------- flat text ((equal (eval symb) 'text) (setcdr (assoc (caar alist) gnuplot-gui-alist) "")) ;;-------------------------- range [#:#] or [#,#] ((equal (eval symb) 'range) (if (and (string-match "^\\s-*$" (car value)) (string-match "^\\s-*$" (cdr value))) (setcdr (assoc (caar alist) gnuplot-gui-alist) "") (setcdr (assoc (caar alist) gnuplot-gui-alist) (concat "[" (car value) prefix (cdr value) "]")) ) ) ;;-------------------------- pair ((equal (eval symb) 'pair) (if (and (string-match "^\\s-*$" (car value)) (string-match "^\\s-*$" (cdr value))) (setcdr (assoc (caar alist) gnuplot-gui-alist) "") (setcdr (assoc (caar alist) gnuplot-gui-alist) (concat prefix " " (car value) " " (cdr value) )) ) ) ;;-------------------------- labels ((equal (eval symb) 'labels) (if (consp value) (let ((word "") (list value)) (while list (if (string-match "^\\s-*$" (car list)) (setq word (concat word (format "%s, " (cadr list)))) (setq word (concat word (format "%S %s, " (car list) (cadr list))))) (setq list (cddr list)) ) (setq value (concat "(" (substring word 0 -2) ")"))) (setq value "") ) (setcdr (assoc (caar alist) gnuplot-gui-alist) value) )) (setq alist (cdr alist))) ))) ;;; GUI frames (defun gnuplot-gui-prompt-for-frame (&optional option save-frame) (setq option (or option (completing-read "Option: " gnuplot-gui-all-types nil t nil t))) (gnuplot-gui-make-frame option (cdr (assoc option gnuplot-gui-all-types)) save-frame) ) (defface gnuplot-gui-error-face '((((class color) (background light)) (:foreground "grey30")) (((class color) (background dark)) (:foreground "grey70"))) "Face used to display message about unknown widget types." :group 'gnuplot-faces) (defface gnuplot-gui-flat-text-face '((((class color) (background light)) (:foreground "MediumBlue")) (((class color) (background dark)) (:foreground "LightSteelBlue"))) "Face used to display message about unknown widget types." :group 'gnuplot-faces) (defun gnuplot-gui-make-frame (item alist &optional save-frame) "Open the frame and populate it with widgets. ITEM is the object for which arguments are being set. ALIST is the alist of arguments for ITEM taken from `gnuplot-gui-all-types'. SAVE-FRAME is non-nil when the widgets are being reset." (unless save-frame (setq gnuplot-current-frame (selected-frame) gnuplot-current-buffer (current-buffer) gnuplot-current-buffer-point (point-marker)) (unless (and gnuplot-gui-frame (frame-live-p gnuplot-gui-frame)) (setq gnuplot-gui-frame (if gnuplot-xemacs-p (make-frame gnuplot-gui-frame-plist) (make-frame gnuplot-gui-frame-parameters)))) (select-frame gnuplot-gui-frame) ;;(set-frame-position gnuplot-gui-frame 150 150) ;; so herky-jerky (if gnuplot-xemacs-p (set-mouse-position (selected-window) 0 0) (set-mouse-position gnuplot-gui-frame 0 0))) (kill-buffer (get-buffer-create "*Gnuplot GUI*")) (switch-to-buffer (get-buffer-create "*Gnuplot GUI*")) (kill-all-local-variables) (if gnuplot-xemacs-p (progn (set (make-local-variable 'frame-title-format) "Set Gnuplot Options") (set (make-local-variable 'frame-icon-title-format) "Set Gnuplot Options")) (modify-frame-parameters (selected-frame) '((title . "Set Gnuplot Options"))) ) (widget-insert "\nSet options for \"" item "\" ") (let (tag help val) (cond ((string-match "^[xyz]2?tics" item) (setq tag "info on tic labels" help "Open a frame displaying the info entry for tic labels" val "xtics")) ((string-match "^no" item) (setq tag (concat "info on " (substring item 2)) help (format "Open a frame displaying the info entry for %S" item) val item)) (t (setq tag (concat "info on " item) help (format "Open a frame displaying the info entry for %S" item) val item))) (widget-create 'gnuplot-gui-info-link :tag tag :help-echo help :value val)) (widget-insert "\n\n") (while alist (let* ((this (car alist)) (tag (gnuplot-gui-type-tag this)) (wtype (gnuplot-gui-type-symbol this)) (prefix (gnuplot-gui-type-prefix this)) (default (cdr (assoc tag gnuplot-gui-alist))) (list (gnuplot-gui-type-list this))) (if (symbolp (cadr list)) (setq list (symbol-value (cadr list)))) (widget-insert "\t") ; insert the appropriate widget (cond ;;------------------------------ list, list* ------------ ((member* (eval wtype) '(list list*) :test 'equal) (let ((starred (if (equal (eval wtype) 'list*) t nil))) (gnuplot-gui-menu-choice tag default list starred))) ;;------------------------------ number, tag, fontsize -- ((member* (eval wtype) '(number tag fontsize) :test 'equal) (gnuplot-gui-number tag default prefix)) ;;------------------------------ position --------------- ;;------------------------------ range, pair ------------ ((member* (eval wtype) '(range pair) :test 'equal) (let ((is-range (equal (eval wtype) 'range))) (gnuplot-gui-range tag default prefix is-range))) ;;------------------------------ string, string* -------- ((member* (eval wtype) '(string string*) :test 'equal) (let ((starred (if (equal (eval wtype) 'string) nil t))) (gnuplot-gui-string tag default prefix starred))) ;;------------------------------ format ----------------- ((equal (eval wtype) 'format) (gnuplot-gui-format tag default)) ;;------------------------------ file ------------------- ((equal (eval wtype) 'file) (gnuplot-gui-file tag default prefix)) ;;------------------------------ labels ----------------- ((equal (eval wtype) 'labels) (gnuplot-gui-labels tag default)) ;;------------------------------ text ------------------- ((equal (eval wtype) 'text) (let ((str (gnuplot-gui-type-default this))) (put-text-property 0 (length str) 'face 'gnuplot-gui-flat-text-face str) (widget-insert str "\n"))) ;;------------------------------ unknown ---------------- (t (let ((str (concat "<" (downcase tag) "> ('" (symbol-name (eval wtype)) " arguments are not yet supported)\n"))) (put-text-property 0 (length str) 'face 'gnuplot-gui-error-face str) (widget-insert str)) ))) (setq alist (cdr alist))) ;; insert control buttons: [Set options] [Reset] [Clear] [Cancel] (widget-insert "\n\t") (widget-create 'push-button :value "Set options" :doc item :button-face 'gnuplot-gui-button-face :help-echo "Push this button to set options" :notify (lambda (widget &rest ignore) (kill-buffer (get-buffer-create "*Gnuplot GUI*")) (delete-frame) (select-frame gnuplot-current-frame) (switch-to-buffer gnuplot-current-buffer) (goto-char gnuplot-current-buffer-point) (gnuplot-gui-post-process-alist (widget-get widget :doc)) (let ((alist gnuplot-gui-alist) marker (eol (save-excursion (end-of-line) (point-marker) )) ) (if (re-search-forward ";" eol "to_limit") (backward-char 1)) (delete-region gnuplot-current-buffer-point (point-marker)) (delete-horizontal-space) (setq marker (point-marker)) (while alist (let ((val (cdar alist))) (if (string-match "^\\s-+$" val) () (if (string-match "^['\"]\\(.*\\)['\"]$" val) (setq val (concat gnuplot-quote-character (match-string 1 val) gnuplot-quote-character))) (insert (format " %s" val)))) (setq alist (cdr alist))) (setq eol (point-marker)) (goto-char marker) (while (< (point) eol) ; a few odd cases (unless (looking-at (concat "[" (regexp-quote "(") (regexp-quote "*") ",]")) (just-one-space)) (forward-sexp))) (delete-horizontal-space) (if (string= "terminal" (widget-get widget :doc)) (gnuplot-gui-set-options-and-insert)) )) (widget-insert " ") (widget-create 'push-button :value "Reset" :help-echo "Push this button to reset all values" :button-face 'gnuplot-gui-button-face :doc item :notify (lambda (widget &rest ignore) (let ((word (widget-get widget :doc))) (gnuplot-gui-set-alist word gnuplot-gui-current-string) (gnuplot-gui-prompt-for-frame word t)))) (widget-insert " ") (widget-create 'push-button :value "Clear" :help-echo "Push this button to clear all values" :button-face 'gnuplot-gui-button-face :doc item :notify (lambda (widget &rest ignore) (let* ((word (widget-get widget :doc)) (alist (cdr (assoc word gnuplot-gui-all-types)))) (while alist (setcdr (assoc (gnuplot-gui-type-tag (car alist)) gnuplot-gui-alist) (gnuplot-gui-type-default (car alist))) (setq alist (cdr alist))) (gnuplot-gui-prompt-for-frame word t))) ) (widget-insert " ") (widget-create 'push-button :value "Cancel" :help-echo "Quit setting options and dismiss frame" :button-face 'gnuplot-gui-button-face :notify (lambda (widget &rest ignore) (kill-buffer (get-buffer-create "*Gnuplot GUI*")) (setq gnuplot-gui-alist nil gnuplot-gui-current-string nil) (delete-frame) (select-frame gnuplot-current-frame))) (goto-char (point-min)) (use-local-map widget-keymap) (widget-setup)) ;;; widgets (defface gnuplot-gui-menu-face '((((class color) (background light)) (:bold t :foreground "darkolivegreen")) (((class color) (background dark)) (:bold t :foreground "seagreen")) (t (:italic t))) "Face used for menu-buttons." :group 'gnuplot-faces) (defface gnuplot-gui-button-face '((((class color) (background light)) (:bold t :foreground "sienna")) (((class color) (background dark)) (:bold t :foreground "tan")) (t (:italic t))) "Face used for push-buttons. Only used in Emacs. XEmacs displays push-buttons with a pixmap." :group 'gnuplot-faces) (defface gnuplot-gui-labels-face '((((class color) (background light)) (:bold t :foreground "darkslateblue")) (((class color) (background dark)) (:bold t :foreground "lightslateblue")) (t (:italic t))) "Face used for insert and delete button in the labels widget." :group 'gnuplot-faces) (defun gnuplot-gui-menu-choice (item default list &optional starred) "Create a menu widget for the Gnuplot GUI. ITEM is the object whose arguments are set by this widget, DEFAULT is the default argument value, LIST contains the items for the pop-up menu. STARRED is true if this a 'list* widget." (let ((widget (apply 'widget-create 'menu-choice :value default :tag item :doc starred :button-face 'gnuplot-gui-menu-face :button-prefix "[" :button-suffix "]" :help-echo (format "Mouse-2 to view the %S menu" (downcase item)) :notify (lambda (widget &rest ignore) (let ((lab (if (widget-get widget :doc) (concat (downcase (widget-get widget :tag)) " ") "" ))) (setcdr (assoc (widget-get widget :tag) gnuplot-gui-alist) (if (string= (widget-value widget) " ") "" (format "%s%s" lab (widget-value widget))) ))) (mapcar (lambda (x) (list 'item :value x)) list)))) (widget-value-set widget default) (if (and starred (not (string-match "^\\s-*$" default))) (setcdr (assoc item gnuplot-gui-alist) (format "%s %s" (downcase item) default))) widget)) (defun gnuplot-gui-number (item default &optional prefix) "Create a number widget for the Gnuplot GUI. ITEM is the object whose arguments are set by this widget, DEFAULT is the default value for the widget, PREFIX is a text string preceding the numerical argument." (let ((help-label (or prefix (downcase item)))) (widget-insert (capitalize item) ": ") (widget-create 'editable-field :size 2 :tag item :value default :doc prefix :help-echo (format "Insert new value of %S here" help-label) :notify (lambda (widget &rest ignore) (let ((val (widget-value widget)) (pre (concat (widget-get widget :doc) " "))) (setcdr (assoc (widget-get widget :tag) gnuplot-gui-alist) (if (string-match "^\\s-*[-0-9.*]+\\s-*$" val) (format "%s%s" pre val) "") ))))) (unless (string-match "^\\s-*$" default) (setcdr (assoc item gnuplot-gui-alist) (format "%s %s" prefix default))) (widget-insert " " (make-string (- 40 (current-column)) ?.) " (numeric value)\n")) (defun gnuplot-gui-string (item default &optional width_or_prefix starred) "Create a string widget for the Gnuplot GUI. ITEM is the object whose arguments are set by this widget, DEFAULT is the default value for the widget, and WIDTH_OR_PREFIX is the width of the text entry field (which defaults to half the frame width) or the prefix for the string. STARRED is t if quotes are not to be used." (let ((help-label (downcase item)) width (prefix "") (pp "")) (cond ((stringp width_or_prefix) (setq prefix width_or_prefix pp prefix) (if starred (setq prefix (concat prefix "_star"))) ) ((numberp width_or_prefix) (setq width width_or_prefix))) (setq width (or width (/ (frame-width) 2))) (if (string-match "^['\"]" default) (setq default (replace-match "" nil nil default))) (if (string-match "['\"]$" default) (setq default (replace-match "" nil nil default))) (widget-insert (capitalize item) ": ") (widget-create 'editable-field :size width :tag item :doc prefix :value default :help-echo (format "Insert new value of %S here" help-label) :notify (lambda (widget &rest ignore) (let ((val (widget-value widget)) (q gnuplot-quote-character) (p (widget-get widget :doc)) ) (setcdr (assoc (widget-get widget :tag) gnuplot-gui-alist) (if (string-match "^\\s-*$" val) "" (progn (if (string-match "_star$" p) (setq p (concat (substring p 0 -5) " ") q "")) (if (string-match "^\\s-+" val) (setq val (replace-match "" nil nil val))) (if (string-match "\\s-+$" val) (setq val (replace-match "" nil nil val))) (format "%s%s%s%s" p q val q))))))) (unless (string-match "^\\s-*$" default) (setcdr (assoc item gnuplot-gui-alist) (format "%s %s" pp default))) (widget-insert "\n"))) (defun gnuplot-gui-format (item default) "Create a string widget for the Gnuplot GUI. ITEM is the object whose arguments are set by this widget, DEFAULT is the default value for the widget, and WIDTH_OR_PREFIX is the width of the text entry field (which defaults to half the frame width) or the prefix for the string." (if (string-match "^['\"]" default) (setq default (replace-match "" nil nil default))) (if (string-match "['\"]$" default) (setq default (replace-match "" nil nil default))) (widget-insert (capitalize item) ": ") (widget-create 'editable-field :size (/ (frame-width) 3) :tag item :value default :help-echo (format "Insert new format string here") :notify (lambda (widget &rest ignore) (let ((val (widget-value widget))) (setcdr (assoc (widget-get widget :tag) gnuplot-gui-alist) (format "%s%s%s" gnuplot-quote-character val gnuplot-quote-character))))) (widget-insert " ") (widget-create 'gnuplot-gui-info-link :tag (concat "info on format") :help-echo "Open a frame displaying the info entry for format" :value "format") (widget-insert "\n")) ;; swiped from widget-color-complete (defun gnuplot-gui-file-completion (widget) "Complete the filename in WIDGET." (let* ((str (buffer-substring-no-properties (widget-field-start widget) (point))) (file (or (file-name-nondirectory str) "")) (dir (or (file-name-directory str) "./")) (val (file-name-completion file dir)) ) (cond ((eq val t) (message "Exact match")) ((null val) (error "Can't find completion for \"%s\"" str)) ((not (string-equal str val)) (insert (substring val (length file)))) (t (message "Making completion list...") (let ((list (file-name-all-completions file dir))) (with-output-to-temp-buffer "*Completions*" (display-completion-list list))) (message "Making completion list...done"))))) (defun gnuplot-gui-file (item default &optional tag) "Create a file widget for the Gnuplot GUI. ITEM is the object whose arguments is set by this widget, DEFAULT is the default value for the argument. TAG is non-nil if ITEM rather than \"File:\" is to be used as the tag." (setq tag (if tag (capitalize item) "File")) (if (string-match "^['\"]" default) (setq default (replace-match "" nil nil default))) (if (string-match "['\"]$" default) (setq default (replace-match "" nil nil default))) (let ((widg (widget-create 'file :value default :tag tag :size (- (/ (frame-width) 2) 3) :doc item :help-echo "Insert a filename here" :complete 'gnuplot-gui-file-completion :notify (lambda (widget &rest ignore) (setcdr (assoc (widget-get widget :doc) gnuplot-gui-alist) (format "%s%s%s" gnuplot-quote-character (widget-value widget) gnuplot-quote-character)) )) )) (widget-insert " ") (widget-create 'push-button :value "Browse" :doc item :help-echo "Browse directories for a filename." :parent widg :notify (lambda (widget &rest ignore) (let ((fname (file-relative-name (read-file-name "File: ") default-directory)) (q gnuplot-quote-character)) (widget-value-set (widget-get widget :parent) fname) (setcdr (assoc (widget-get widget :doc) gnuplot-gui-alist) (format "%s%s%s" q fname q)) (widget-setup)))) (widget-insert "\n"))) (defun gnuplot-gui-labels (item default) "Create a labels widget for the Gnuplot GUI. ITEM is the object whose arguments is set by this widget, DEFAULT is the default value for the argument." (widget-create '(editable-list (list :inline t :tag "Tic label" (string :tag "label" :size 10 :help-echo "Enter the tic label here" ) (string :tag " position" :size 10 :help-echo "Enter an expression for the tic location here" ))) :tag (capitalize item) :value default :format "%{%t%}:\n%v\t %i\n" :entry-format "\t %i %d %v\n" :button-face 'gnuplot-gui-labels-face :notify (lambda (widget &rest ignore) (setcdr (assoc (upcase (widget-get widget :tag)) gnuplot-gui-alist) (widget-value widget))))) (defun gnuplot-gui-range (item default separator is-range) "Create a range or pair widget for the Gnuplot GUI. ITEM is the object whose arguments are set by this widget, DEFAULT is the default value for the widget, SEPARATOR is a text string preceding the numerical argument, or the prefix for a pair operator. IS-RANGE is non-nil if this is a 'range widget." (widget-insert (capitalize item) ": ") (if is-range (widget-insert "[")) (widget-create 'editable-field :size 4 :tag item :value (car default) :help-echo (format "Insert the first value of the %S here" (downcase item)) :notify (lambda (widget &rest ignore) (setcar (cdr (assoc (widget-get widget :tag) gnuplot-gui-alist)) (format "%s" (widget-value widget))))) (if is-range (widget-insert separator) (widget-insert " ")) (widget-create 'editable-field :size 4 :tag item :value (cdr default) :help-echo (format "Insert the second value of the %S here" (downcase item)) :notify (lambda (widget &rest ignore) (setcdr (cdr (assoc (widget-get widget :tag) gnuplot-gui-alist)) (format "%s" (widget-value widget))))) (if is-range (widget-insert "]")) (widget-insert " " (make-string (- 39 (current-column)) ?.) " (numeric values)\n")) ;; suppress compiler warning ;;(eval-when-compile (defun gnuplot-info-lookup-symbol (sym mode))) (define-widget 'gnuplot-gui-info-link 'info-link "A link to an info file for the Gnuplot GUI." :action '(lambda (widget &optional event) (let ((gnuplot-info-display 'frame)) (if gnuplot-keywords-pending ; <HW> (gnuplot-setup-info-look)) (gnuplot-info-lookup-symbol (widget-value widget) 'gnuplot-mode)))) ;;; just about done (provide 'gnuplot-gui) ;;;============================================================================ ;;; ;;; gnuplot-gui.el ends here ������������������������������������gnuplot-4.6.4/lisp/INSTALL��������������������������������������������������������������������������0000644�0004711�0000144�00000003016�07615572014�012140� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� To install gnuplot-mode: 1. At the command line: > configure > make If you use XEmacs, do "make EMACS=xemacs" (or change the EMACS variable to "xemacs" in the Makefile, the run "make"). If "configure" doesn't work for you, the file "Makefile.dst" can be used. In that case do, "make -f Makefile.dst". 2. Move the .elc files to a place where emacs can find them, for example /usr/share/emacs/site-lisp or your personal emacs directory. 3. Insert the contents of the `dotemacs' file into your .emacs file or system start-up file to enable gnuplot mode. 4. The function `gnuplot-info-lookup-symbol' looks at the Gnuplot info file that comes with this package or that can be made from the Gnuplot distribution. For that function to work, the file gnuplot.info must be placed somewhere where info can find it, for example /usr/info. A line like this in your .emacs allows you to put gnuplot.info any place convenient: (add-to-list 'Info-default-directory-list "/path/to/file") The "configure; make" sequence may not work on all systems, particularly Win32 systems. The long-winded way of making the .elc gpelcard.ps files is to edit each of the .el files with emacs and do `M-x byte-compile-file'. Then "latex gpelcard.tex" and "dvips gpelcard.dvi". You will need to follow the instructions contained in the file Win9x/INSTALL.Win9x to get gnuplot working with Emacs on a Windows 95 or 98 machine. Problems? Contact gnuplot-mode's author Bruce Ravel <ravel@phys.washington.edu> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/gnuplot.el�����������������������������������������������������������������������0000644�0004711�0000144�00000322547�12026164261�013127� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;;; gnuplot.el -- drive gnuplot from within emacs ;; Copyright (C) 1998 Phil Type and Bruce Ravel, 1999-2002 Bruce Ravel ;; Author: Bruce Ravel <ravel@phys.washington.edu> and Phil Type ;; Maintainer: Bruce Ravel <ravel@phys.washington.edu> ;; Created: June 28 1998 ;; Updated: December 13, 2002 ;; Version: 0.6.0 ;; Keywords: gnuplot, plotting ;; This file is not part of GNU Emacs. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; ;; This lisp script is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ;; ;; Permission is granted to distribute copies of this lisp script ;; provided the copyright notice and this permission are preserved in ;; all copies. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, you can either send email to this ;; program's maintainer or write to: The Free Software Foundation, ;; Inc.; 675 Massachusetts Avenue; Cambridge, MA 02139, USA. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; send bug reports to the author (ravel@phys.washington.edu) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Commentary: ;; ;; This is a major mode for composing gnuplot scripts and displaying ;; their results using gnuplot. It is optimized for use with gnuplot ;; 3.7 or one of the later patchlevels of "version 3.6". It should ;; also work very handily with version 3.5. This mode offers several ;; tools to help you compose your scripts, including syntax ;; colorization using either font-lock or hilit19, a syntax table ;; appropriate to gnuplot, key bindings, pull-down menus, indentation, ;; keyword completions and variable customization using the Custom ;; package. Once the script is composed, there are several function ;; for sending some or all of the script to gnuplot. The interaction ;; with the gnuplot process is within a comint buffer. ;; ;; C-c C-l send current line to gnuplot ;; C-c C-v send current line to gnuplot and move forward 1 line ;; C-c C-r send current region to gnuplot ;; C-c C-b send entire buffer to gnuplot ;; C-c C-f send a file to gnuplot ;; C-c C-i insert filename at point ;; C-c C-n negate set option on current line ;; C-c C-c comment region ;; C-c C-o set arguments for command at point ;; S-mouse-2 set arguments for command under mouse cursor ;; C-c C-h read the gnuplot info file ;; C-c C-e show-gnuplot-buffer ;; C-c C-k kill gnuplot process ;; C-c C-u submit a bug report about gnuplot-mode ;; M-tab or M-ret complete keyword before point ;; ret newline and indent ;; tab indent current line ;; ;; Gnuplot-mode adds two key bindings to the comint buffer: ;; M-C-p plot the current script buffer line-by-line ;; M-C-f save the current script buffer and load that file ;; ;; These two functions are useful for starting up gnuplot-mode. ;; ;; M-x gnuplot-mode ;; start gnuplot-mode in the current buffer ;; ;; M-x gnuplot-make-buffer ;; open a new buffer (which is not visiting a file) and start ;; gnuplot-mode in that buffer ;; ;; --------------------------------------------------------------------- ;; ;; Other lisp files used by gnuplot.el ;; ;; info-look.el (comes with GNU Emacs 20): ;; This provides the interface to the gnuplot-info file and provides ;; on-line help and keyword completion functionality. The version ;; of info-look.el that comes with version 20.2 of Emacs contains a ;; bug that will impede its interaction with the gnuplot info file. ;; You should use the version from the gnuplot-mode homepage ;; instead. info-look is not distributed with XEmacs and so should ;; be installed along with gnuplot-mode when using XEmacs. ;; ;; gnuplot-gui.el (written by Bruce): ;; Defines the GUI interface for setting setting arguments to ;; gnuplot options. This uses the widget package extensively. ;; ;; --------------------------------------------------------------------- ;; ;; This mode was inspired by the original gnu-plot-mode by Gershon ;; Elber, which is distributed with gnuplot itself and which dates ;; back to the early 90's. Although this mode encompasses the ;; functionality of the original, the two share no code and the ;; current implementation takes advantage of many features of modern ;; versions of emacs and adheres (or so I intend) to the major mode ;; conventions described in the emacs-lisp reference for version 19 ;; and later. ;; ;; --------------------------------------------------------------------- ;; ;; Installation ;; ============ ;; ;; A recent version of this file can be found at ;; http://feff.phys.washington.edu/~ravel/software/gnuplot-mode/ ;; ;; To autoload gnuplot-mode on any file with gp extension, put this in ;; your .emacs file ;; (autoload 'gnuplot-mode "gnuplot" "gnuplot major mode" t) ;; (autoload 'gnuplot-make-buffer "gnuplot" "open a buffer in gnuplot-mode" t) ;; ;; Something like ;; (setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode)) ;; auto-mode-alist)) ;; is useful for having files ending in .gp start up in gnuplot-mode. ;; ;; Something like ;; (global-set-key [(f9)] 'gnuplot-make-buffer) ;; may be useful. This binds f9 to the function that opens a scratch ;; buffer (i.e. one that is not visiting a file) in gnuplot-mode. ;; This is handy for your quick 'n' dirty plotting chores. ;; ;; To use the `gnuplot-info-lookup-symbol' function, the file ;; gnuplot.info MUST be installed somewhere that info can find it. ;; This means you must either: ;; 1. Copy gnuplot.info to the normal info directory or ;; 2. Make sure info can find gnuplot.info by putting this in your ;; .emacs file: ;; (setenv "INFOPATH" ;; (concat (getenv "INFOPATH") ":" ;; (expand-file-name "/path/to/file"))) ;; where "/path/to/file" is the location of gnuplot.info ;; ;; This had been tested extensively with Emacs 19.34 and 20.2 and ;; XEmacs 20.3 and in a limited manner with Emacs 19.30 and XEmacs ;; 19.14. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; History: ;; ;; 0.1 Jun 25 1998 Finished with initial release. ;; 0.2 Sep 4 1998 Added filename insertion, indentation, and ;; colorization/completion in comint buffer. <BR> ;; 0.2a Sep 11 1998 made `indent-line-function' buffer-local (whoops!) ;; and fixed some stuff in the installation script <BR> ;; 0.3 Sep 12 1998 include insertions menu <BR> ;; 0.3a Sep 14 1998 fixed bug finding info file if missing, fixed bug ;; starting font-lock, fixed bug re overwriting files in ;; installation script <BR> ;; 0.3b Sep 15 1998 Added (require 'info) to `(eval-and-compile' ;; clause, Added (kill-all-local-variables) to `gnuplot-mode', ;; altered order of:- ;; (provide 'gnuplot) ;; (run-hooks 'gnuplot-load-hook) ;; at the end of the file in case something in the load hook ;; requires gnuplot (oh not that old one again...), added ;; `gnuplot-comint-setup-hook', corrected `gnuplot-mark-active' ;; which caused an error to be raised by (mark) when the mark ;; was inactive <DB> Some changes to font-lock rules <LB>&<BR> ;; 0.4 Nov 14 1998 <BR> Use info-look for info interface. No ;; change to gnuplot-mode user interface, but cleaner code. ;; With info-look, the help funcion works regardless of the ;; version number of gnuplot. Also, `gnuplot-keywords' (used ;; for help, keyword-completion, and hilit19 highlighting) is ;; now generated automatically. ;; 0.4a Nov 18 1998 <BR> info-look leaves a couple of really useless ;; buffers lying around so I cleaned them up. Also fixed ;; font-lock rules so that things in quotes get highlighted ;; correctly and the surrounding text is unhighlighted. Fixed ;; up font-lock rules for plot and splot. Added ;; `gnuplot-send-line-and-forward' as suggested by <MD>. ;; 0.4b Nov 21 1998 <BR> added toolbar for xemacs -- see file ;; gnuplot-toolbar.el. fixed error message in plot line ;; function when line is empty. option added to display the ;; comint buffer showing the gnuplot process in a separate ;; frame ;; 0.4c Minor stuff: Nov 30 1998 <BR> fixed highlighting in comint ;; buffer. fixed frame behavior. added "[:]" to range ;; insertions. added :link to defgroup. Dec 1 1998 <BR> fixed ;; some mismatched defcustoms. added a few lines to suppress ;; some compile-time warnings. Dec 3 1998 <BR> Fixed behavior ;; of filename insertion function. Added more :links to ;; defgroup. ;; 0.4d Dec 6 1998 <BR> Added function gnuplot-setup-info-look and ;; variable gnuplot-info-hook to handle various versions of the ;; gnuplot info file. ;; 0.4e Dec 12 1998 <BR> Split up gnuplot-insertions-menu for ease of ;; custimization, put menubar initialization in a function. ;; 0.4f Dec 14 1998 <BR> defcustom the insertions submenus, add ;; gnuplot-insertion-menu-flag, intelligent Makefile knows ;; which info-look to compile ;; 0.5 Dec 27 1998 <BR> wrote initial draft of gnuplot-gui.el, ;; included it in insertions menu and in `gnuplot-insert'. ;; Negate option function, bound to C-c C-n. Dec 29 1998 <BR> ;; C-c C-h with no response goes to Commands menu. Transparent ;; toolbar icons. Replace kw-compl with a simple completion ;; function. Put gnuplot-toolbar code in gnuplot.el. ;; 0.5a Jan 23 1999 <BR> send file uses the load command. add ;; gnuplot-plot-from-comint and ;; gnuplot-save-and-plot-from-comint and keybindings in the ;; comint buffer. do (process-kill-without-query ;; gnuplot-process nil). `gnuplot-negate-option' checks if set ;; option has a negated form. ;; 0.5b `gnuplot-kill-gnuplot-buffer' made more robust. fixed a bug ;; in `gnuplot-plot-from-comint'. fixed description of ;; gnuplot-faces group. ;; 0.5c update copyright information, update gpelcard ;; 0.5d Mar 20 1999 <BR> adopt installation materials from <LH>. Add ;; some support for hidden3d. Use constants in types alists in ;; gui. Various other minor improvements to the types alists. ;; 0.5e Apr 6 1999 <BR> at the suggestion of <SE> I did away with the ;; gnuplot-which-highlight variable and revamped how ;; colorization gets turned on. This is a bit tricky since I ;; want it to work with font-lock under emacs and xemacs and ;; with hilit19. Apr 11 1999 <BR> insert space at end of ;; unique completion. add a few GUI types, rewrite some stuff ;; in the GUI interface. primitive support for plot, splot, ;; and fit. Fixed completion in file widget. ;; 0.5f May 15 1999 <BR> Add pgnuplot.c and Win9x install instructions ;; to the distribution. Fixed a defface bug. Added ;; `gnuplot-keywords-when' allowing deferral of parsing the ;; info file. ;; 0.5g May 27 1999 <BR> Fixed font-locking of strings and ;; comments. Figure out gnuplot-version number from startup ;; message and set `gnuplot-echo-command-line-flag' ;; accordingly. Added `gnuplot-program-version' variable. ;; Check that font-lock is actually a feature, as suggested by ;; <KL> ;; 0.5h Aug 15 1999 <BR> Added `gnuplot-determine-gnuplot-version' so ;; that the gnuplot version number and `comint-process-echos' ;; actually get set correctly. Actually, the first time ;; something is plotted, the echoing might not work, but the ;; second time it will. ;; 0.5i Sep 2 1999 <BR> Once again changed how ;; `comint-process-echos' gets set. Maybe I got it right this ;; time? Also fixed certain situations where the info file ;; did notget properly loaded (insertion with info toggle on ;; and info button in GUI). ;; 0.5j Sep 9 1999 <BR> Do a more robust check for the gnuplot ;; process before killing the gnuplot buffer, as suggested by ;; <SE>. ;; 0.5k Sep 22 1999 <BR> make `gnuplot-send-line-and-forward' skip ;; over blank and comment lines as suggested by <SE>. Jan 10 ;; 2000 Bound C-c C-j to `gnuplot-forward-script-line'. ;; 0.5l Nov 16 2000 <BR> support for pm3d in gnuplot-gui and in plot ;; options insertions menu. mentioned pm3d in gpelcard. gui ;; support for x11 pm3d and vgagl terms. ;; `gnuplot-negate-option' works with new syntax. ;; 0.5m Nov 17 2000 <BR> add colorization and gui support for new ;; commands in 3.8. gui support for emf term. gui support for ;; new "set style" syntax. much better scheme for determining ;; gnuplot version number + make better use of it. ;; 0.5n Jan 4 2001 <BR> corrected a serious problem interacting with ;; speedbar ;; 0.5o skipped ;; 0.5p Mar 14 2001 <BR> fixed problem with toolbar creation and ;; speedbar clicking ;; 0.5q May 30 2001 <BR> added font-lock bindings for words associated ;; with plotting ;; 0.5r Oct 17 2001 <BR> Incorporate two suggestions by <RF>, bind ;; C-c C-c to comment-region and C-c C-o to the GUI, also make ;; C-c C-l respect continuation lines ;; April 12, 2002 <BR> added feature to trim length of gnuplot ;; process buffer ;; 0.5s Jun 7 2002 <BR> Yet again changed how `comint-process-echos' ;; gets set. It really needs to be nil on NTEmacs 21.1 or ;; comint gets stuck in an infinate loop. ;; 0.5t Sep 16 2002 <BR> Fixed a problem with C-c C-v jumping ;; forward 2 lines at a time ;; 0.6.0 Dec 13 2002 <BR> Changed numbering scheme to accommodate ;; gnuplot packaging requirements ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Acknowledgements: ;; David Batty <DB> (numerous corrections) ;; Laurent Bonnaud <LB> (suggestions regarding font-lock rules) ;; Markus Dickebohm <MD> (suggested `gnuplot-send-line-and-forward') ;; Stephen Eglan <SE> (suggested the use of info-look, ;; contributed a bug fix regarding shutting ;; down the gnuplot process, improvement to ;; `gnuplot-send-line-and-forward') ;; Robert Fenk <RF> (suggested respecting continuation lines) ;; Michael Karbach <MK> (suggested trimming the gnuplot process buffer) ;; Alex Chan Libchen <AL> (suggested font-lock for plotting words) ;; Kuang-Yu Liu <KL> (pointed out buggy dependence on font-lock) ;; Hrvoje Niksic <HN> (help with defcustom arguments for insertions) ;; Andreas Rechtsteiner <AR> (pointed out problem with C-c C-v) ;; Michael Sanders <MS> (help with the info-look interface) ;; Jinwei Shen <JS> (suggested functionality in comint buffer) ;; Michael M. Tung <MT> (prompted me to add pm3d support) ;; Holger Wenzel <HW> (suggested using `gnuplot-keywords-when') ;; Wolfgang Zocher <WZ> (pointed out problem with gnuplot-mode + speedbar) ;; and especially to Lars Hecking <LH> for including gnuplot-mode ;; with the gnuplot 3.7-beta distribution and for providing me with ;; installation materials ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; To Do: ;; ;; 1. Since `gnuplot-display-process' can be nil, it would be ;; handy to have a function to put on ;; `gnuplot-after-plot-buffer-hook' to check and see if the script ;; executed properly. Alas I am not sure how gnuplot signals its ;; errors. ;; 2. improve plot, splot, fit in GUI ;; 3. interface to setting bind command using `read-key-sequence'. ;; this is a pain because the nomenclature is really different in ;; gnuplot than in `read-key-sequence' ;; ;;; Bugs: ;; ;; -- indentation is not quite right (but close) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Code: (require 'comint) (require 'easymenu) ;;; --- variable definitions + eval-and-compile clauses ;; handle defcustom (eval-and-compile (condition-case () (require 'custom) (error nil)) (if (and (featurep 'custom) (fboundp 'custom-declare-variable)) nil ;; We've got what we needed ;; We have the old custom-library, hack around it! (if (fboundp 'defgroup) nil (defmacro defgroup (&rest args) nil)) (if (fboundp 'defface) nil (defmacro defface (var values doc &rest args) `(progn (defvar (, var) (quote (, var))) ;; To make colors for your faces you need to set your .Xdefaults ;; or set them up ahead of time in your .emacs file. (make-face (, var)) ))) (if (fboundp 'defcustom) nil (defmacro defcustom (var value doc &rest args) `(defvar (, var) (, value) (, doc)))))) ;; (eval-and-compile ;; (condition-case () ;; (require 'kw-compl) ;; (error nil))) (eval-and-compile ;; <DB> (require 'info)) (eval-and-compile (condition-case () (require 'info-look) (error nil))) ;; this just gets rid of an annoying compile time error message ;; (eval-when-compile ;; (defun gnuplot-dummy ()) ;; (defalias 'hilit-set-mode-patterns 'gnuplot-dummy)) (defconst gnuplot-xemacs-p (string-match "XEmacs" (emacs-version))) (defconst gnuplot-ntemacs-p (string-match "msvc" (emacs-version))) (defvar gnuplot-three-eight-p "") (defconst gnuplot-maintainer "Bruce Ravel") (defconst gnuplot-maintainer-email "ravel@phys.washington.edu") (defconst gnuplot-maintainer-url "http://feff.phys.washington.edu/~ravel/software/gnuplot-mode/") (defconst gnuplot-version "0.6.0") (defgroup gnuplot nil "Gnuplot-mode for Emacs." :prefix "gnuplot-" :group 'processes :group 'applications :group 'local :link '(emacs-library-link :tag "Lisp File" "gnuplot.el") :link '(url-link :tag "Homepage" "http://feff.phys.washington.edu/~ravel/software/gnuplot-mode/") :link '(custom-manual "(gnuplot)Top") :link '(emacs-commentary-link :tag "Commentary" "gnuplot.el") ) (defgroup gnuplot-insertions nil "Insert commands into gnuplot-scripts from a pull-down menu." :prefix "gnuplot-insertions-" :group 'gnuplot) (defgroup gnuplot-hooks nil "Hook variables used by `gnuplot-mode'." :prefix "gnuplot-" :group 'gnuplot) (defcustom gnuplot-mode-hook nil "*Hook run when `gnuplot-mode' is entered." :group 'gnuplot-hooks :type 'hook) (defcustom gnuplot-load-hook nil "*Hook run when gnuplot.el is first loaded." :group 'gnuplot-hooks :type 'hook) (defcustom gnuplot-after-plot-hook nil "*Hook run after gnuplot plots something. This is the last thing done by the functions for plotting a line, a region, a buffer, or a file." :group 'gnuplot-hooks :type 'hook) (defcustom gnuplot-info-hook nil "*Hook run before setting up the info-look interface. This hook is necessary to handle inconsistencies in versions of and sources of the gnuplot info file. If Gnuplot-mode can find the info file generated from the 3.6beta patchlevel 347 (or later) release of Gnuplot, then this hook probably is not necessary. Some versions of the info file may have a General Index session, which can be used by info-look. In that case the following (or something similar with the value of `info-lookup-symbol-alist' altered appropriately) should be placed in the .emacs file. Emacs version 20.2 ships with a different version of info-look that does 20.3. If you use any version of Emacs 19, you must use the version from 20.2. Any version of XEmacs 20 or 21 should use the version from 20.3 but can use either. XEmacs 19 should use the version 20.2. For the newer version of info-look, do this: (add-hook \'gnuplot-info-hook \'(lambda () (let ((elem (assoc \'gnuplot-mode info-lookup-alist))) (delete elem info-lookup-alist) (info-lookup-maybe-add-help :mode 'gnuplot-mode :topic 'symbol :regexp \"[a-zA-Z][_a-zA-Z0-9]*\" :doc-spec '((\"(gnuplot)General Index\" nil \"[_a-zA-Z0-9]+\")))))) For the older version of info-look, do this: (add-hook \'gnuplot-info-hook \'(lambda () (let ((elem (assoc \'gnuplot-mode info-lookup-alist))) (delete elem info-lookup-alist) (setq info-lookup-alist (append info-lookup-alist \'((gnuplot-mode \"[a-zA-Z][_a-zA-Z0-9]*\" nil ((\"(gnuplot)General Index\" nil \"[_a-zA-Z0-9]+\" )))))))))" :group 'gnuplot-hooks :type 'hook) ;; comint hook suggested by <DB> (defcustom gnuplot-comint-setup-hook nil "*Hook run after setting up the gnuplot buffer in comint mode. So the configuration can be customised by the user." :group 'gnuplot-hooks :type 'hook) (defvar gnuplot-recently-sent nil "This is a record of the most recent kind of text sent to gnuplot. It takes as its value nil, 'line, 'region, 'buffer, or 'file. It is useful for functions included in `gnuplot-after-plot-hook'.") (make-variable-buffer-local 'gnuplot-recently-sent) (defcustom gnuplot-program "gnuplot" "*The name of the gnuplot executable." :group 'gnuplot :type 'string) (defvar gnuplot-program-version nil "Version number of gnuplot. This is found using `gnuplot-determine-gnuplot-version") (defcustom gnuplot-process-name "gnuplot" "Name given to the gnuplot buffer and process." :group 'gnuplot :type 'string) (defvar gnuplot-buffer nil "*The name of the buffer displaying the gnuplot process.") (defvar gnuplot-process nil "Variable holding the process handle.") (defvar gnuplot-process-frame nil "The frame for displaying the gnuplot process. This is used when `gnuplot-display-process' is equal to 'frame.") (defvar gnuplot-comint-recent-buffer nil "The most recently plotted gnuplot script buffer. This is used by the function that plot from the comint buffer. It is reset every time something is plotted from a script buffer.") (defcustom gnuplot-gnuplot-buffer "plot.gp" "*The name of the gnuplot scratch buffer opened by 'gnuplot-make-buffer'." :group 'gnuplot :type 'string) (defcustom gnuplot-display-process 'window "This controls how the gnuplot process buffer is displayed. The values are 'frame display gnuplot process in a separate frame 'window display gnuplot process in this frame but in another window nil `gnuplot-process' is in the current frame but not displayed" :group 'gnuplot :type '(radio (const :tag "Separate frame" frame) (const :tag "Separate window" window) (const :tag "Not displayed" nil))) (defcustom gnuplot-info-display 'window "*Determines how `gnuplot-info-lookup-symbol' displays the info file. The values are 'frame display info file in a separate frame 'window display info file in another window nil display info file in the current window" :group 'gnuplot :type '(radio (const :tag "Separate frame" frame) (const :tag "Separate window" window) (const :tag "This window" nil))) (defcustom gnuplot-echo-command-line-flag (not gnuplot-ntemacs-p) "*This sets the fall-back value of `comint-process-echos'. If `gnuplot-mode' cannot figure out what version number of gnuplot this is, then the value of this variable will be used for `comint-process-echos'. It seems that gnuplot 3.5 wants this to be nil and 3.7 wants it to be t. If lines that you send to gnuplot from the `gnuplot-mode' buffer are not appearing at the gnuplot prompt in the process buffer, try toggling it. Also see the document string for `comint-process-echos'. If you change this, kill the gnuplot process and start it again." :group 'gnuplot :type 'boolean) (defcustom gnuplot-insertions-show-help-flag nil "*Non-nil means to display certain help messages automatically. These messages are shown after menu insertion of gnuplot commands." :group 'gnuplot-insertions :type 'boolean) (defcustom gnuplot-delay 0.01 "*Amount of time to delay before sending a new line to gnuplot. This is needed so that the the line is not written in the gnuplot buffer in advance of its prompt. Increase this number if the prompts and lines are displayed out of order." :group 'gnuplot :type 'number) (defcustom gnuplot-buffer-max-size 1000 "*The maximum size in lines of the gnuplot process buffer. Each time text is written in the gnuplot process buffer, lines are trimmed from the beginning of the buffer so that the buffer is this many lines long. The lines are deleted after the most recent lines were interpretted by gnuplot. Setting to 0 turns off this feature (i.e. no lines get trimmed)." :group 'gnuplot :type 'integer) (defcustom gnuplot-quote-character "\'" "*Quotation character used for inserting quoted strings. Gnuplot can use single or double quotes. If you prefer to have the filename insertion function never insert quotes for you, set this to the empty string." :group 'gnuplot :type '(radio (const :tag "double quote" "\"") (const :tag "single quote" "\'") (const :tag "none" "" ))) ;; (defcustom gnuplot-gnuplot-version nil ;; "*Force gnuplot-mode to behave for this version of gnuplot." ;; :group 'gnuplot ;; :type '(radio (const :tag "unspecified" nil) ;; (const :tag "3.8 or newer" "3.8") ;; (const :tag "3.7 or older" "3.7"))) (defvar gnuplot-info-frame nil) (defvar gnuplot-info-nodes '()) (defvar gnuplot-first-call t) ;; with info-look, there is no need to carry this list around -- it ;; can be generated on the fly appropriate to the currently installed ;; version of gnuplot.info (defvar gnuplot-keywords nil "A list of keywords used in GNUPLOT. These are set by `gnuplot-set-keywords-list' from the values in `info-lookup-cache'.") (defvar gnuplot-keywords-pending t ;; <HW> "A boolean which gets toggled when the info file is probed.") (defcustom gnuplot-keywords-when 'deferred ;; 'immediately "This variable controls when the info file is parsed. The choices are immediately upon starting gnuplot-mode or the first time that data is needed. If you use hilit19, then the info file is parsed immediately regardless of the value of this variable. But you're not using that musty old thing, are you..." :group 'gnuplot :type '(radio (const :tag "Parse info file when gnuplot-mode starts" immediately) (const :tag "Parse info file the first time it is needed" deferred))) (defgroup gnuplot-faces nil "Text faces used by gnuplot-mode." :prefix "gnuplot-" :group 'gnuplot) (cond ((and (featurep 'custom) (fboundp 'custom-declare-variable)) (defface gnuplot-prompt-face '((((class color)) (:foreground "firebrick")) (t (:bold t :underline t))) "Face used for the prompt in the gnuplot process buffer." :group 'gnuplot-faces)) (t (make-face 'gnuplot-prompt-face) (set-face-foreground 'gnuplot-prompt-face "firebrick"))) ;;; --- key bindings and menus (defvar gnuplot-mode-map nil) (if gnuplot-mode-map () (setq gnuplot-mode-map (make-sparse-keymap)) (define-key gnuplot-mode-map "\C-c\C-b" 'gnuplot-send-buffer-to-gnuplot) (define-key gnuplot-mode-map "\C-c\C-c" 'comment-region) ; <RF> (define-key gnuplot-mode-map "\C-c\C-o" 'gnuplot-gui-set-options-and-insert) (define-key gnuplot-mode-map "\C-c\C-d" 'gnuplot-show-version) (define-key gnuplot-mode-map "\C-c\C-e" 'gnuplot-show-gnuplot-buffer) (define-key gnuplot-mode-map "\C-c\C-f" 'gnuplot-send-file-to-gnuplot) (define-key gnuplot-mode-map "\C-c\C-h" 'gnuplot-info-lookup-symbol) (define-key gnuplot-mode-map "\C-c\C-i" 'gnuplot-insert-filename) (define-key gnuplot-mode-map "\C-c\C-j" 'gnuplot-forward-script-line) (define-key gnuplot-mode-map "\C-c\C-k" 'gnuplot-kill-gnuplot-buffer) (define-key gnuplot-mode-map "\C-c\C-l" 'gnuplot-send-line-to-gnuplot) (define-key gnuplot-mode-map "\C-c\C-n" 'gnuplot-negate-option) (define-key gnuplot-mode-map "\C-c\C-p" 'gnuplot-show-gnuplot-version) (define-key gnuplot-mode-map "\C-c\C-r" 'gnuplot-send-region-to-gnuplot) ;;(define-key gnuplot-mode-map "\C-c\C-t" 'gnuplot-gui-swap-simple-complete) (define-key gnuplot-mode-map "\C-c\C-u" 'gnuplot-bug-report) (define-key gnuplot-mode-map "\C-c\C-v" 'gnuplot-send-line-and-forward) (define-key gnuplot-mode-map "\C-c\C-z" 'gnuplot-customize) (define-key gnuplot-mode-map "\M-\r" 'gnuplot-complete-keyword) (define-key gnuplot-mode-map "\M-\t" 'gnuplot-complete-keyword) (define-key gnuplot-mode-map "\C-i" 'indent-for-tab-command) (define-key gnuplot-mode-map "\C-m" 'newline-and-indent) ;;(define-key gnuplot-mode-map "\C-m" 'reindent-then-newline-and-indent) ;;(if (featurep 'kw-compl) ;; (define-key gnuplot-mode-map "\M-\r" 'kw-compl-abbrev))) (cond (gnuplot-xemacs-p (define-key gnuplot-mode-map '(shift button2) 'gnuplot-gui-mouse-set)) (t (define-key gnuplot-mode-map [S-mouse-2] 'gnuplot-gui-mouse-set))) ) (defvar gnuplot-mode-menu nil) (defvar gnuplot-menu nil "Menu for `gnuplot-mode'.") (setq gnuplot-menu '("Gnuplot" ["Send line to gnuplot" gnuplot-send-line-to-gnuplot t] ["Send line & move forward" gnuplot-send-line-and-forward (not (eobp))] ["Send region to gnuplot" gnuplot-send-region-to-gnuplot (gnuplot-mark-active)] ["Send buffer to gnuplot" gnuplot-send-buffer-to-gnuplot t] ["Send file to gnuplot" gnuplot-send-file-to-gnuplot t] "---" ["Insert filename at point" gnuplot-insert-filename t] ["Negate set option" gnuplot-negate-option t] ;;["Set key binding" gnuplot-set-binding gnuplot-three-eight-p] ["Keyword help" gnuplot-info-lookup-symbol (or gnuplot-keywords gnuplot-keywords-pending)] ["Show gnuplot process buffer" gnuplot-show-gnuplot-buffer t] ["Set arguments at point" gnuplot-gui-set-options-and-insert (fboundp 'gnuplot-gui-set-options-and-insert)] ["Swap plot/splot/fit lists in GUI" gnuplot-gui-swap-simple-complete (fboundp 'gnuplot-gui-swap-simple-complete)] "---" ["Customize gnuplot" gnuplot-customize t] ["Submit bug report" gnuplot-bug-report t] ["Show gnuplot-mode version" gnuplot-show-version t] ["Show gnuplot version" gnuplot-show-gnuplot-version t] "---" ["Kill gnuplot" gnuplot-kill-gnuplot-buffer t] )) ;;; --- insertions variables and menus ;;(load-library "gnuplot-insertions") (defvar gnuplot-mode-insertions-menu nil) (defvar gnuplot-insertions-menu nil "Menu for insertions in `gnuplot-mode'. The insertions menu is composed of several sub-menus. The variables describing the sub-menus are: `gnuplot-insertions-adornments' `gnuplot-insertions-plot-options' `gnuplot-insertions-terminal' `gnuplot-insertions-x-axis' `gnuplot-insertions-y-axis' `gnuplot-insertions-z-axis' `gnuplot-insertions-x2-axis' `gnuplot-insertions-y2-axis' `gnuplot-insertions-parametric-plots' `gnuplot-insertions-polar-plots' `gnuplot-insertions-surface-plots' These variables can be customized by the user. For example, there are many terminal types which are not in the terminal submenu but which may be compiled into a user's copy of gnuplot. Each of these variables is a list whose first element is a string and all the rest are vectors as described in the document string for `easy-menu-define'. The callback used throughout these menus is `gnuplot-insert' which inserts the appropriate set expression and, optionally, looks up that item in the gnuplot info file. The easiest way to customize the submenus is to use the custom package. Just type \\[gnuplot-customize] and follow your nose. You can also add new items to any of these sub-menus by adding to the `gnuplot-load-hook' in your .emacs file. Here is an example of adding the \"regis\" terminal type to the terminal sub-menu: (add-hook 'gnuplot-load-hook '(lambda () (setq gnuplot-insertions-terminal (append gnuplot-insertions-terminal (list [\"regis\" (gnuplot-insert \"set terminal regis\") t])))))") (defvar gnuplot-insertions-top () "Top part of insertions menu. See the document string for `gnuplot-insertions-menu'") (defcustom gnuplot-insertions-menu-flag t "*Non-nil means to place the insertion menu in the menubar. Changing this will not effect a change in any currently existing `gnuplot-mode' buffer. You will see the change the next time you create a `gnuplot-mode' buffer." :group 'gnuplot-insertions :type 'boolean) (defcustom gnuplot-insertions-adornments ; this is icky... (if gnuplot-three-eight-p '("adornments" ["arrow" (gnuplot-insert "set arrow ") t] ["bar" (gnuplot-insert "set bar") t] ["border" (gnuplot-insert "set border") t] ["boxwidth" (gnuplot-insert "set boxwidth ") t] ["format" (gnuplot-insert "set format ") t] ["grid" (gnuplot-insert "set grid") t] ["key" (gnuplot-insert "set key ") t] ["label" (gnuplot-insert "set label ") t] ["pointsize" (gnuplot-insert "set pointsize ") t] ["samples" (gnuplot-insert "set samples ") t] ["size" (gnuplot-insert "set size ") t] ["style" (gnuplot-insert "set style ") t] ["tics" (gnuplot-insert "set tics ") t] ["timefmt" (gnuplot-insert "set timefmt ") t] ["timestamp" (gnuplot-insert "set timestamp ") t] ["title" (gnuplot-insert "set title ") t] ["zeroaxis" (gnuplot-insert "set zeroaxis") t] ) '("adornments" ["data style" (gnuplot-insert "set data style ") t] ["function style" (gnuplot-insert "set function style ") t] ["arrow" (gnuplot-insert "set arrow ") t] ["bar" (gnuplot-insert "set bar") t] ["border" (gnuplot-insert "set border") t] ["boxwidth" (gnuplot-insert "set boxwidth ") t] ["format" (gnuplot-insert "set format ") t] ["grid" (gnuplot-insert "set grid") t] ["key" (gnuplot-insert "set key ") t] ["label" (gnuplot-insert "set label ") t] ["pointsize" (gnuplot-insert "set pointsize ") t] ["samples" (gnuplot-insert "set samples ") t] ["size" (gnuplot-insert "set size ") t] ["tics" (gnuplot-insert "set tics ") t] ["timefmt" (gnuplot-insert "set timefmt ") t] ["timestamp" (gnuplot-insert "set timestamp ") t] ["title" (gnuplot-insert "set title ") t] ["zeroaxis" (gnuplot-insert "set zeroaxis") t] )) "Adornments submenu in the insertions menu. See the document string for `gnuplot-insertions-menu' Changing this will not effect a change in any currently existing `gnuplot-mode' buffer. You will see the change the next time you create a `gnuplot-mode' buffer." :group 'gnuplot-insertions :type '(list (string :tag "Title") (repeat :inline t (vector (string :tag "Name") (function :tag "Callback") (boolean :tag "Enabled" t))))) (defcustom gnuplot-insertions-plot-options '("plot options" ["autoscale" (gnuplot-insert "set autoscale ") t] ["clip" (gnuplot-insert "set clip ") t] ["encoding" (gnuplot-insert "set encoding ") t] ["locale" (gnuplot-insert "set locale ") t] ["logscale" (gnuplot-insert "set logscale ") t] ["multiplot" (gnuplot-insert "set multiplot") t] ["missing" (gnuplot-insert "set missing \"\"") t] ["palette" (gnuplot-insert "set palette ") t] ; <MT> ["pm3d" (gnuplot-insert "set pm3d ") t] ["offsets" (gnuplot-insert "set offsets ") t] ["output" (gnuplot-insert "set output ") t] ["zero" (gnuplot-insert "set zero ") t] ) "Plot options submenu in the insertions menu. See the document string for `gnuplot-insertions-menu' Changing this will not effect a change in any currently existing `gnuplot-mode' buffer. You will see the change the next time you create a `gnuplot-mode' buffer." :group 'gnuplot-insertions :type '(list (string :tag "Title") (repeat :inline t (vector (string :tag "Name") (function :tag "Callback") (boolean :tag "Enabled" t))))) (defcustom gnuplot-insertions-terminal '("terminal" ["eepic" (gnuplot-insert "set terminal eepic") t] ["fig" (gnuplot-insert "set terminal fig") t] ["gpic" (gnuplot-insert "set terminal gpic") t] ["latex" (gnuplot-insert "set terminal latex") t] ["linux" (gnuplot-insert "set terminal linux") t] ["pbm" (gnuplot-insert "set terminal pbm") t] ["png" (gnuplot-insert "set terminal png") t] ["postscript" (gnuplot-insert "set terminal postscript") t] ["pslatex" (gnuplot-insert "set terminal pslatex") t] ["table" (gnuplot-insert "set terminal table") t] ["tek40xx" (gnuplot-insert "set terminal tek40xx") t] ["tkcanvas" (gnuplot-insert "set terminal tkcanvas") t] ["tpic" (gnuplot-insert "set terminal tpic") t] ["vgagl" (gnuplot-insert "set terminal vgagl") t] ; for pm3d patch ["vttek" (gnuplot-insert "set terminal vttek") t] ["x11" (gnuplot-insert "set terminal x11") t] ) "Terminal submenu in the insertions menu. See the document string for `gnuplot-insertions-menu' Changing this will not effect a change in any currently existing `gnuplot-mode' buffer. You will see the change the next time you create a `gnuplot-mode' buffer." :group 'gnuplot-insertions :type '(list (string :tag "Title") (repeat :inline t (vector (string :tag "Name") (function :tag "Callback") (boolean :tag "Enabled" t))))) (defcustom gnuplot-insertions-x-axis '("x-axis" ["xdata" (gnuplot-insert "set xdata ") t] ["xlabel" (gnuplot-insert "set xlabel ") t] ["xrange" (gnuplot-insert "set xrange [:]") t] ["xtics" (gnuplot-insert "set xtics ") t] ["mxtics" (gnuplot-insert "set mxtics ") t] ["xzeroaxis" (gnuplot-insert "set xzeroaxis ") t] ["xdtics" (gnuplot-insert "set xdtics ") t] ["xmtics" (gnuplot-insert "set xmtics ") t]) "X-axis submenu in the insertions menu. See the document string for `gnuplot-insertions-menu' Changing this will not effect a change in any currently existing `gnuplot-mode' buffer. You will see the change the next time you create a `gnuplot-mode' buffer." :group 'gnuplot-insertions :type '(list (string :tag "Title") (repeat :inline t (vector (string :tag "Name") (function :tag "Callback") (boolean :tag "Enabled" t))))) (defcustom gnuplot-insertions-x2-axis '("x2-axis" ["x2data" (gnuplot-insert "set xdata ") t] ["x2label" (gnuplot-insert "set xlabel ") t] ["x2range" (gnuplot-insert "set xrange [:]") t] ["x2tics" (gnuplot-insert "set xtics ") t] ["mx2tics" (gnuplot-insert "set mxtics ") t] ["x2zeroaxis" (gnuplot-insert "set xzeroaxis ") t] ["x2dtics" (gnuplot-insert "set xdtics ") t] ["x2mtics" (gnuplot-insert "set xmtics ") t]) "X2-axis submenu in the insertions menu. See the document string for `gnuplot-insertions-menu' Changing this will not effect a change in any currently existing `gnuplot-mode' buffer. You will see the change the next time you create a `gnuplot-mode' buffer." :group 'gnuplot-insertions :type '(list (string :tag "Title") (repeat :inline t (vector (string :tag "Name") (function :tag "Callback") (boolean :tag "Enabled" t))))) (defcustom gnuplot-insertions-y-axis '("y-axis" ["ydata" (gnuplot-insert "set ydata ") t] ["ylabel" (gnuplot-insert "set ylabel ") t] ["ymtics" (gnuplot-insert "set ymtics ") t] ["yrange" (gnuplot-insert "set yrange [:]") t] ["ytics" (gnuplot-insert "set ytics ") t] ["yzeroaxis" (gnuplot-insert "set yzeroaxis ") t] ["ydtics" (gnuplot-insert "set ydtics ") t] ["mytics" (gnuplot-insert "set mytics ") t]) "Y-axis submenu in the insertions menu. See the document string for `gnuplot-insertions-menu' Changing this will not effect a change in any currently existing `gnuplot-mode' buffer. You will see the change the next time you create a `gnuplot-mode' buffer." :group 'gnuplot-insertions :type '(list (string :tag "Title") (repeat :inline t (vector (string :tag "Name") (function :tag "Callback") (boolean :tag "Enabled" t))))) (defcustom gnuplot-insertions-y2-axis '("y2-axis" ["y2data" (gnuplot-insert "set ydata ") t] ["y2label" (gnuplot-insert "set ylabel ") t] ["y2range" (gnuplot-insert "set yrange [:]") t] ["y2tics" (gnuplot-insert "set ytics ") t] ["my2tics" (gnuplot-insert "set mytics ") t] ["y2zeroaxis" (gnuplot-insert "set yzeroaxis ") t] ["y2mtics" (gnuplot-insert "set ymtics ") t] ["y2dtics" (gnuplot-insert "set ydtics ") t]) "Y2-axis submenu in the insertions menu. See the document string for `gnuplot-insertions-menu' Changing this will not effect a change in any currently existing `gnuplot-mode' buffer. You will see the change the next time you create a `gnuplot-mode' buffer." :group 'gnuplot-insertions :type '(list (string :tag "Title") (repeat :inline t (vector (string :tag "Name") (function :tag "Callback") (boolean :tag "Enabled" t))))) (defcustom gnuplot-insertions-z-axis '("z-axis" ["zdata" (gnuplot-insert "set zdata ") t] ["zlabel" (gnuplot-insert "set zlabel ") t] ["zrange" (gnuplot-insert "set zrange [:]") t] ["ztics" (gnuplot-insert "set ztics ") t] ["mztics" (gnuplot-insert "set mztics ") t] ["zdtics" (gnuplot-insert "set zdtics ") t] ["zmtics" (gnuplot-insert "set zmtics ") t] ) "Z-axis submenu in the insertions menu. See the document string for `gnuplot-insertions-menu' Changing this will not effect a change in any currently existing `gnuplot-mode' buffer. You will see the change the next time you create a `gnuplot-mode' buffer." :group 'gnuplot-insertions :type '(list (string :tag "Title") (repeat :inline t (vector (string :tag "Name") (function :tag "Callback") (boolean :tag "Enabled" t))))) (defcustom gnuplot-insertions-parametric-plots '("parametric plots" ["parametric" (gnuplot-insert "set parametric") t] ["isosamples" (gnuplot-insert "set isosamples ") t] ["dummy" (gnuplot-insert "set dummy ") t] ["trange" (gnuplot-insert "set trange [:]") t] ["urange" (gnuplot-insert "set urange [:]") t] ["vrange" (gnuplot-insert "set vrange [:]") t] ) "Parametric plots submenu in the insertions menu. See the document string for `gnuplot-insertions-menu' Changing this will not effect a change in any currently existing `gnuplot-mode' buffer. You will see the change the next time you create a `gnuplot-mode' buffer." :group 'gnuplot-insertions :type '(list (string :tag "Title") (repeat :inline t (vector (string :tag "Name") (function :tag "Callback") (boolean :tag "Enabled" t))))) (defcustom gnuplot-insertions-polar-plots '("polar plots" ["polar" (gnuplot-insert "set polar") t] ["angles" (gnuplot-insert "set angles ") t] ["rrange" (gnuplot-insert "set rrange [:]") t] ) "Polar plots submenu in the insertions menu. See the document string for `gnuplot-insertions-menu' Changing this will not effect a change in any currently existing `gnuplot-mode' buffer. You will see the change the next time you create a `gnuplot-mode' buffer." :group 'gnuplot-insertions :type '(list (string :tag "Title") (repeat :inline t (vector (string :tag "Name") (function :tag "Callback") (boolean :tag "Enabled" t))))) (defcustom gnuplot-insertions-surface-plots '("surface plots" ["clabel" (gnuplot-insert "set clabel ") t] ["cntrparam" (gnuplot-insert "set cntrparam ") t] ["contour" (gnuplot-insert "set contour") t] ["dgrid3d" (gnuplot-insert "set dgrid3d ") t] ["hidden3d" (gnuplot-insert "set hidden3d ") t] ["mapping" (gnuplot-insert "set mapping ") t] ["surface" (gnuplot-insert "set surface ") t] ["view" (gnuplot-insert "set view ") t] ) "Surface plots submenu in the insertions menu. See the document string for `gnuplot-insertions-menu' Changing this will not effect a change in any currently existing `gnuplot-mode' buffer. You will see the change the next time you create a `gnuplot-mode' buffer." :group 'gnuplot-insertions :type '(list (string :tag "Title") (repeat :inline t (vector (string :tag "Name") (function :tag "Callback") (boolean :tag "Enabled" t))))) (defvar gnuplot-insertions-bottom () "Bottom part of the insertions menu. This part contains the toggle buttons for displaying info or opening an argument-setting popup.") (setq gnuplot-insertions-bottom '("---" ["Display of info with insertion" gnuplot-toggle-info-display :style toggle :selected gnuplot-insertions-show-help-flag] ["Display GUI popup with insertion" gnuplot-gui-toggle-popup :active (fboundp 'gnuplot-gui-toggle-popup) :style toggle :selected (and (fboundp 'gnuplot-gui-toggle-popup) gnuplot-gui-popup-flag)] )) ;; Regarding a comment by <DB>: ;; ;; This is from the header in easymenu.el distributed with XEmacs: ;; ;; ;; - Function: easy-menu-add MENU [ MAP ] ;; ;; Add MENU to the current menubar in MAP. ;; ;; ;; ;; - Function: easy-menu-remove MENU ;; ;; Remove MENU from the current menubar. ;; ;; ;; ;; Emacs 19 never uses `easy-menu-add' or `easy-menu-remove', menus ;; ;; automatically appear and disappear when the keymaps specified by ;; ;; the MAPS argument to `easy-menu-define' are activated. ;; ;; ;; ;; XEmacs will bind the map to button3 in each MAPS, but you must ;; ;; explicitly call `easy-menu-add' and `easy-menu-remove' to add and ;; ;; remove menus from the menu bar. ;; ;; in Emacs, easy-menu-add is defined like this: ;; (defun easy-menu-add (menu &optional map)) (defun gnuplot-setup-menubar () "Initial setup of gnuplot and insertions menus." (if gnuplot-insertions-menu-flag ; set up insertions menu (progn (if gnuplot-xemacs-p (setq gnuplot-insertions-top '("insert set expression" "--:doubleLine")) (setq gnuplot-insertions-top '("insert set expression" "---"))) (setq gnuplot-insertions-menu (append (list "Insertions") gnuplot-insertions-top (list gnuplot-insertions-adornments) (list gnuplot-insertions-plot-options) (list gnuplot-insertions-terminal) (list gnuplot-insertions-x-axis) (list gnuplot-insertions-y-axis) (list gnuplot-insertions-z-axis) (list gnuplot-insertions-x2-axis) (list gnuplot-insertions-y2-axis) (list gnuplot-insertions-parametric-plots) (list gnuplot-insertions-polar-plots) (list gnuplot-insertions-surface-plots) gnuplot-insertions-bottom)) (easy-menu-define gnuplot-mode-insertions-menu gnuplot-mode-map "Insertions menu used in Gnuplot-mode" gnuplot-insertions-menu) (easy-menu-add gnuplot-mode-insertions-menu gnuplot-mode-map))) (easy-menu-define ; set up gnuplot menu gnuplot-mode-menu gnuplot-mode-map "Menu used in gnuplot-mode" gnuplot-menu) (easy-menu-add gnuplot-mode-menu gnuplot-mode-map) ) ;; There is no `mark-active' variable in XEmacs. Hassle! This is not ;; only replicates mark-active, but it only returns true if the region ;; is of non-zero width. ;; Error checking suggested by <DB> (defun gnuplot-mark-active () "Return non-nil if the mark is active and it is not equal to point." (condition-case nil (and (mark) (/= (mark) (point))) (error nil))) ;;; --- XEmacs toolbar (defgroup gnuplot-toolbar nil "Toolbar used by XEmacs." :prefix "gnuplot-toolbar-" :group 'gnuplot) (defcustom gnuplot-toolbar-display-flag gnuplot-xemacs-p "*Non-nil means to display display a toolbar in XEmacs." :group 'gnuplot-toolbar :type 'boolean) (defcustom gnuplot-toolbar-use-toolbar (if (featurep 'toolbar) 'left-toolbar nil) "*If nil, do not use a toolbar. If it is non-nil, it must be a toolbar. The five legal values are `default-toolbar', `top-toolbar', `bottom-toolbar', `right-toolbar', and `left-toolbar', although choosing `default-toolbar' or `top-toolbar' may be a bad idea since either will make the GNUPLOT toolbar replace the standard toolbar. Changing this will not change the toolbar in a currently existing buffer, but it will take effect the next time you use `gnuplot-mode' and emacs. This is only used if a toolbar can be displayed, thus this is used in XEmacs and ignored in FSF Emacs." :type '(choice (const default-toolbar) (const top-toolbar) (const bottom-toolbar) (const left-toolbar) (const right-toolbar) (const :tag "No toolbar" nil)) :group 'gnuplot-toolbar) (defvar gnuplot-toolbar-location "") (defun gnuplot-toolbar-setup-toolbar (toolbar) "Setup function for the `gnuplot-mode' toolbar. TOOLBAR contains the toolbar specification. This is basically swiped from VM." (let ((width 46) (height 46) (buffer (current-buffer)) (frame (selected-frame)) (tag-set '(win))) (cond ((eq (symbol-value gnuplot-toolbar-use-toolbar) right-toolbar) (setq gnuplot-toolbar-location "right") (set-specifier right-toolbar toolbar buffer) (set-specifier right-toolbar-width width frame tag-set)) ((eq (symbol-value gnuplot-toolbar-use-toolbar) left-toolbar) (setq gnuplot-toolbar-location "left") (set-specifier left-toolbar toolbar buffer) (set-specifier left-toolbar-width width frame tag-set)) ((eq (symbol-value gnuplot-toolbar-use-toolbar) bottom-toolbar) (setq gnuplot-toolbar-location "bottom") (set-specifier bottom-toolbar toolbar buffer) (set-specifier bottom-toolbar-height height frame tag-set)) ((eq (symbol-value gnuplot-toolbar-use-toolbar) top-toolbar) (setq gnuplot-toolbar-location "top") (set-specifier top-toolbar toolbar buffer) (set-specifier top-toolbar-height height frame tag-set))) )) (defvar gnuplot-line-xpm (if (featurep 'xpm) (toolbar-make-button-list "/* XPM */ static char *line[] = { /* width height num_colors chars_per_pixel */ \" 40 40 5 1\", /* colors */ \". c #000000\", \"a c #bebebe s backgroundToolBarColor\", \"b c #2f4f4f\", \"c c #ff6347\", \"d c #0000ff\", /* pixels */ \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaa..a..aaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaa..aaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaa..a..a....aaa...aaaaaaaaaaaa\", \"aaaaaaaaaaaa..a..a..a..a..a..aaaaaaaaaaa\", \"aaaaaaaaaaaa..a..a.aa..a.....aaaaaaaaaaa\", \"aaaaaaaaaaa..a..a..a..a..aaaaaaaaaaaaaaa\", \"aaaaaaaaaaa..a..a..a..a..a..aaaaaaaaaaaa\", \"aaaaaaaaaaa..a..a..a..aa...aaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaa..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaadaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaadaaaaaaaaa\", \"aaaaaaa..aaaaaaaaaaaaaaaaaaaadaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaadaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaacaaaadaadaaaaaaaaaaaa\", \"aaaaaaaa.caaadaaaccaccadaddaaaaaccaaaaaa\", \"aaaaaaa..accdaddcaaaaaccaaaaaaccaaaaaaaa\", \"aaaaaaaa.aadcaccdaaaadaaccaaccaaaaaaaaaa\", \"aaaaaaaa.adaacaaaddadaaaaaccaaaaaaaaaaaa\", \"aaaaaaaa.daaaaaaaaadaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaa..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaa............................aaaaaa\", \"aaaaaaaa.aaaa.aaaa.aaaa.aaaa.aaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"};") "XPM format image used for the \"plot line\" button")) (defvar gnuplot-region-xpm (if (featurep 'xpm) (toolbar-make-button-list "/* XPM */ static char *region[] = { /* width height num_colors chars_per_pixel */ \" 40 40 5 1\", /* colors */ \". c #000000\", \"a c #bebebe s backgroundToolBarColor\", \"b c #2f4f4f\", \"c c #ff6347\", \"d c #0000ff\", /* pixels */ \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaa..aaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaa.a..a...aaa....a..aa...aa....aaaaa\", \"aaaaaa...a..a..a..a..a..a..a..a..a..aaaa\", \"aaaaaa..aa.....a.aa..a....aa..a.aa..aaaa\", \"aaaaa..a...aaaa..aa.a..a..aa....a..aaaaa\", \"aaaaa..a...a..a..a..a..a..a..a..a..aaaaa\", \"aaaa..aaaa...aaa....a..aa...aa..a..aaaaa\", \"aaaaaaaaaaaaaaaaa..aaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaa...aaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaadaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaadaaaaaaaaa\", \"aaaaaaa..aaaaaaaaaaaaaaaaaaaadaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaadaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaacaaaadaadaaaaaaaaaaaa\", \"aaaaaaaa.caaadaaaccaccadaddaaaaaccaaaaaa\", \"aaaaaaa..accdaddcaaaaaccaaaaaaccaaaaaaaa\", \"aaaaaaaa.aadcaccdaaaadaaccaaccaaaaaaaaaa\", \"aaaaaaaa.adaacaaaddadaaaaaccaaaaaaaaaaaa\", \"aaaaaaaa.daaaaaaaaadaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaa..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaa............................aaaaaa\", \"aaaaaaaa.aaaa.aaaa.aaaa.aaaa.aaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"};") "XPM format image used for the \"plot region\" button")) (defvar gnuplot-buffer-xpm (if (featurep 'xpm) (toolbar-make-button-list "/* XPM */ static char *buffer[] = { /* width height num_colors chars_per_pixel */ \" 40 40 5 1\", /* colors */ \". c #000000\", \"a c #bebebe s backgroundToolBarColor\", \"b c #2f4f4f\", \"c c #ff6347\", \"d c #0000ff\", /* pixels */ \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa..aaaaaaaaaa......aaaaaaaaaaaaaa\", \"aaaaaaaa..aaaaaaaaa..a..aaaaaaaaaaaaaaaa\", \"aaaaaaa....aa..a.........a...aa.a.aaaaaa\", \"aaaaaaa..a..a..a..a..a..a..a..a...aaaaaa\", \"aaaaaaa.aa....aa..a..a..a.....a..aaaaaaa\", \"aaaaaa...a.a..a..a..a..a..aaaa..aaaaaaaa\", \"aaaaaa.....a..a..a..a..a..a..a..aaaaaaaa\", \"aaaaaa....aaa..a.a..a..aa...aa..aaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaadaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaadaaaaaaaaa\", \"aaaaaaa..aaaaaaaaaaaaaaaaaaaadaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaadaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaacaaaadaadaaaaaaaaaaaa\", \"aaaaaaaa.caaadaaaccaccadaddaaaaaccaaaaaa\", \"aaaaaaa..accdaddcaaaaaccaaaaaaccaaaaaaaa\", \"aaaaaaaa.aadcaccdaaaadaaccaaccaaaaaaaaaa\", \"aaaaaaaa.adaacaaaddadaaaaaccaaaaaaaaaaaa\", \"aaaaaaaa.daaaaaaaaadaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaa..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaa............................aaaaaa\", \"aaaaaaaa.aaaa.aaaa.aaaa.aaaa.aaaaaaaaaaa\", \"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"};") "XPM format image used for the \"plot buffer\" button")) (defvar gnuplot-doc-xpm (if (featurep 'xpm) (toolbar-make-button-list "/* XPM */ static char *book_index[] = { /* width height num_colors chars_per_pixel */ \" 40 40 6 1\", /* colors */ \". c #000000\", \"a c #bebebe s backgroundToolBarColor\", \"b c #2f4f4f\", \"c c #ff0000\", \"d c #ffffff\", \"e c #708090\", /* pixels */ \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaa.........bbeaaaebb..........aaaaaa\", \"aaaaaa.ddddddddaaebebeaaddddddddd.aaaaaa\", \"aaaa...dab.bddeebadbdaeebedeeeeed...aaaa\", \"aaaa.c.dbaddddebeedbdeebeedebebed.c.aaaa\", \"aaaa.c.d.de.edeebeabdbbeeddebbbed.c.aaaa\", \"aaaa.c.dbad.ddebeadbdeeebeddeeeed.c.aaaa\", \"aaaa.c.dab..ddeeeedbdebeeedebebed.c.aaaa\", \"aaaa.c.dddddddeebeabdebebedeebedd.c.aaaa\", \"aaaa.c.debebedebeedbdbebeedbeeeeb.c.aaaa\", \"aaaa.c.debeeedeeeaabdaaddddebedbb.c.aaaa\", \"aaaa.c.deebeddbebedbdbaa.adeeedeb.c.aaaa\", \"aaaa.c.ddeebedeeebaba.dd.dddeeedd.c.aaaa\", \"aaaa.c.debeebdbeeedbd....ddeebeed.c.aaaa\", \"aaaa.c.deebeedeebadbd.dd.ddeeeedd.c.aaaa\", \"aaaa.c.dbbebddeeeeabd.aa.adebebbd.c.aaaa\", \"aaaa.c.deeeeedeebeabaedddddeeeedd.c.aaaa\", \"aaaa.c.dbebbbdebeadbdaeeeedebeeed.c.aaaa\", \"aaaa.c.deeebddeeebdbdeebeedeebeed.c.aaaa\", \"aaaa.c.debeeedebeeabdebebedebeebd.c.aaaa\", \"aaaa.c.deebbedeeeedbdeeeeddeeeeed.c.aaaa\", \"aaaa.c.dddddddddaadbdaddddddddddd.c.aaaa\", \"aaaa.c..........beabaeb...........c.aaaa\", \"aaaa.c.bbbbbbbbbb.bbbbbbbbbbbbbbb.c.aaaa\", \"aaaa.c.bbbbbbbbbb..e.bbbbbbbbbbbb.c.aaaa\", \"aaaa.c.bbbbbbbbbb.b.bbbbbbbbbbbbb.c.aaaa\", \"aaaa.c............e.e.............c.aaaa\", \"aaaa.cccccccccccc.a.a.ccccccccccccc.aaaa\", \"aaaa................................aaaa\", \"aaaaaaaaaaaaaaaaaa...aaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"};") "XPM format image used for the \"document\" button")) (defvar gnuplot-help-xpm (if (featurep 'xpm) (toolbar-make-button-list "/* XPM */ static char *help_btn[] = { /* width height num_colors chars_per_pixel */ \" 40 40 3 1\", /* colors */ \"a c #bebebe s backgroundToolBarColor\", \"b c #000000\", \"c c #ff0000\", /* pixels */ \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaabbbbbbbbaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaabbbccccccccbbbaaaaaaaaaaaaa\", \"aaaaaaaaaaabbccccccccccccccbbaaaaaaaaaaa\", \"aaaaaaaaaabccccccccccccccccccbaaaaaaaaaa\", \"aaaaaaaaabccccccccccccccccccccbaaaaaaaaa\", \"aaaaaaaabcccccccbbbbbbbbcccccccbaaaaaaaa\", \"aaaaaaaabccccbbbaaaaaaaabbbccccbaaaaaaaa\", \"aaaaaaabccccbaaaaaaaaaaaaaabccccbaaaaaaa\", \"aaaaaaabcccbaaaaaaaaaaaaaaaabcccbaaaaaaa\", \"aaaaaaabcccbaaaaaaaaaaaaaaaabcccbaaaaaaa\", \"aaaaaaabcccbaaaaaaaaaaaaaaaabcccbaaaaaaa\", \"aaaaaaabbbbbaaaaaaaaaaaaaaabccccbaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaabbbccccbaaaaaaaa\", \"aaaaaaaaaaaaaaaabbbbbbbbcccccccbaaaaaaaa\", \"aaaaaaaaaaaaaaaabcccccccccccccbaaaaaaaaa\", \"aaaaaaaaaaaaaaaabccccccccccccbaaaaaaaaaa\", \"aaaaaaaaaaaaaaaabccccccccccbbaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaabccccbbbbbbaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaabccccbaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaabccccbaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaabbbbbbaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaabbbbbbaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaabccccbaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaabccccbaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaabccccbaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaabbbbbbaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"};") "XPM format image used for the \"help\" button")) (defvar gnuplot-toolbar '([gnuplot-line-xpm gnuplot-line-fn t "Plot the line under point"] [gnuplot-region-xpm gnuplot-region-fn t "Plot the selected region"] [gnuplot-buffer-xpm gnuplot-buffer-fn t "Plot the entire buffer"] [:style 3d :size 8] [gnuplot-help-xpm gnuplot-help-fn t "Look at the gnuplot process buffer"] [gnuplot-doc-xpm gnuplot-doc-fn t "Look at the gnuplot document"]) "The gnuplot toolbar.") (fset 'gnuplot-line-fn 'gnuplot-send-line-and-forward) (fset 'gnuplot-region-fn 'gnuplot-send-region-to-gnuplot) (fset 'gnuplot-buffer-fn 'gnuplot-send-buffer-to-gnuplot) (fset 'gnuplot-help-fn 'gnuplot-show-gnuplot-buffer) (fset 'gnuplot-doc-fn 'gnuplot-info-lookup-symbol) (defvar gnuplot-all-buttons-defined (and (listp gnuplot-line-xpm) (listp gnuplot-region-xpm) (listp gnuplot-buffer-xpm) (listp gnuplot-doc-xpm) (listp gnuplot-help-xpm))) (defun gnuplot-make-toolbar-function () (if (and gnuplot-xemacs-p gnuplot-all-buttons-defined) (progn ;;(remove-specifier gnuplot-toolbar-use-toolbar (current-buffer)) (gnuplot-toolbar-setup-toolbar gnuplot-toolbar) (add-spec-to-specifier (symbol-value gnuplot-toolbar-use-toolbar) gnuplot-toolbar (current-buffer) )))) ;;(defalias 'gnuplot-make-toolbar 'gnuplot-make-toolbar-function) ;;; --- syntax colorization, syntax table (defvar gnuplot-mode-syntax-table nil "Syntax table in use in `gnuplot-mode' buffers. This is the same as the standard syntax table except that ' is a string quote character, ` and _ are word characters, and math operators are punctuation characters.") (if gnuplot-mode-syntax-table () (setq gnuplot-mode-syntax-table (make-syntax-table)) (modify-syntax-entry ?* "." gnuplot-mode-syntax-table) (modify-syntax-entry ?+ "." gnuplot-mode-syntax-table) (modify-syntax-entry ?- "." gnuplot-mode-syntax-table) (modify-syntax-entry ?/ "." gnuplot-mode-syntax-table) (modify-syntax-entry ?% "." gnuplot-mode-syntax-table) ;;(modify-syntax-entry ?& "." gnuplot-mode-syntax-table) ; rarely used ;;(modify-syntax-entry ?^ "." gnuplot-mode-syntax-table) ; operators ;;(modify-syntax-entry ?| "." gnuplot-mode-syntax-table) ; in gnuplot, ;;(modify-syntax-entry ?& "." gnuplot-mode-syntax-table) ; (by me, ;;(modify-syntax-entry ?? "." gnuplot-mode-syntax-table) ; anyway...) ;;(modify-syntax-entry ?~ "." gnuplot-mode-syntax-table) ; (modify-syntax-entry ?' "\"" gnuplot-mode-syntax-table) (modify-syntax-entry ?` "w" gnuplot-mode-syntax-table) (modify-syntax-entry ?_ "w" gnuplot-mode-syntax-table)) (defvar gnuplot-font-lock-keywords nil) (defvar gnuplot-font-lock-keywords-1 nil) (defvar gnuplot-font-lock-keywords-2 nil) ;; used make-regexp to generate the regular expression strings ;; this is all pattern based ;; (insert (format "%s" ;; (regexp-quote ;; (make-regexp ;; '("abs" "acos" "acosh" "arg" "asin" "asinh" "atan" ;; "atan2" "atanh" "besj0" "besj1" "besy0" "besy1" ;; "ceil" "cos" "cosh" "erf" "erfc" "exp" "floor" ;; "gamma" "ibeta" "inverf" "igamma" "imag" "invnorm" ;; "int" "lgamma" "log" "log10" "norm" "rand" "real" ;; "sgn" "sin" "sinh" "sqrt" "tan" "tanh" "column" ;; "tm_hour" "tm_mday" "tm_min" "tm_mon" "tm_sec" ;; "tm_wday" "tm_yday" "tm_year" "valid"))))) ;; Set up colorization for gnuplot. ;; This handles font-lock for emacs and xemacs. ;; hilit19 is handled in `gnuplot-mode'. ;; These regular expressions treat the gnuplot vocabulary as complete ;; words. Although gnuplot will recognise unique abbreviations, these ;; regular expressions will not." (if (featurep 'font-lock) ; <KL> (setq gnuplot-font-lock-keywords (list ; comments '("#.*$" . font-lock-comment-face) ; quoted things ;'("['\"]\\([^'\"\n]*\\)['\"]" ; 1 font-lock-string-face) '("'[^'\n]*'?" . font-lock-string-face) ; stuff in brackets, sugg. by <LB> '("\\[\\([^]]+\\)\\]" 1 font-lock-reference-face) ; variable/function definitions '("\\(\\<[a-z]+[a-z_0-9()]*\\)[ \t]*=" 1 font-lock-variable-name-face) ; built-in function names (cons (concat "\\<\\(" "a\\(bs\\|cosh\?\\|rg\\|sinh\?\\|" "tan\\(\\|\[2h\]\\)\\)\\|" "bes\\(j\[01\]\\|y\[01\]\\)\\|" "c\\(eil\\|o\\(lumn\\|sh\?\\)\\)\\|" "e\\(rfc\?\\|xp\\)\\|floor\\|gamma\\|" "i\\(beta\\|gamma\\|mag\\|" "n\\(t\\|v\\(erf\\|norm\\)\\)\\)\\|" "l\\(gamma\\|og\\(\\|10\\)\\)\\|" "norm\\|r\\(and\\|eal\\)\\|" "s\\(gn\\|inh\?\\|qrt\\)\\|" "t\\(anh\?\\|m_\\(hour\\|m\\(day\\|in\\|on\\)\\|" "sec\\|wday\\|y\\(day\\|ear\\)\\)\\)\\|" "valid" "\\)\\>") font-lock-function-name-face) ; reserved words associated with ; plotting <AL> '("\\<\\(axes\\|every\\|index\\|l\\(\[stw\]\\|ine\\(style\\|type\\|width\\)\\)\\|notitle\\|p\\(\[st\]\\|oint\\(size\\|type\\)\\)\\|smooth\\|t\\(hru\\|itle\\)\\|using\\|with\\)\\>" . font-lock-type-face) '("\\<\\(box\\(e\\(rrorbars\\|s\\)\\|xyerrorbars\\)\\|candlesticks\\|dots\\|errorbars\\|f\\(inancebars\\|steps\\)\\|histeps\\|impulses\\|lines\\(\\|points\\)\\|points\\|steps\\|vector\\|x\\(errorbars\\|yerrorbars\\)\\|yerrorbars\\)\\>" . font-lock-function-name-face) ; (s)plot -- also thing (s)plotted '("\\<s?plot\\>" . font-lock-keyword-face) '("\\<s?plot\\s-+\\([^'\" ]+\\)[) \n,\\\\]" 1 font-lock-variable-name-face) ; other common commands ; miscellaneous commands (cons (concat "\\<\\(" "bind\\|" "c\\(d\\|lear\\)\\|exit\\|fit\\|h\\(elp\\|istory\\)\\|load\\|" "p\\(ause\\|rint\\|wd\\)\\|quit\\|replot\\|" "s\\(ave\\|et\\|how\\)\\|unset" "\\)\\>\\|!.*$") font-lock-reference-face)) gnuplot-font-lock-keywords-1 gnuplot-font-lock-keywords gnuplot-font-lock-keywords-2 gnuplot-font-lock-keywords) ) (if (and gnuplot-xemacs-p (featurep 'font-lock)) (put 'gnuplot-mode 'font-lock-defaults '((gnuplot-font-lock-keywords gnuplot-font-lock-keywords-1 gnuplot-font-lock-keywords-2) t t ((?_ . "w")) ))) ;; these two lines get rid of an annoying compile time error ;; message. that function gets non-trivially defalias-ed in ;; gnuplot-toolbar.el ;; (defun gnuplot-make-toolbar-dummy ()) ;; (defalias 'gnuplot-make-toolbar 'gnuplot-make-toolbar-dummy) ;;; --- functions for sending commands to gnuplot (defun gnuplot-split-string (string) "Break STRING at each carriage return, returning a list of lines." (let ((list ()) (line "") (index 0)) (while (< index (length string)) (if (char-equal (elt string index) ?\n) (setq list (append list (list line)) line "") (setq line (concat line (char-to-string (elt string index))))) (setq index (1+ index)) ) list)) ;; -- the calls to `sleep-for' are to allow enough time for gnuplot ;; to write to the buffer before the next line is inserted ;; -- note that the input string is split into lines and each line is ;; sent to gnuplot individually. this is a bit slow, but it puts ;; each line on the comint history. (defun gnuplot-send-string-to-gnuplot (string text) "Sends STRING to the gnuplot program. If no gnuplot process exists, a new one is created. TEXT indicates the type of text being sent to gnuplot and is typically one of nil, 'line, 'region, 'buffer, or 'file. TEXT may be useful for functions in `gnuplot-after-plot-hook'. `gnuplot-after-plot-hook' is called by this function after all of STRING is sent to gnuplot." (gnuplot-make-gnuplot-buffer) ; make sure a gnuplot buffer exists (or gnuplot-program-version (progn (message "Determining gnuplot version number (sitting for 2 seconds)") (gnuplot-fetch-version-number) (sit-for 2))) (setq gnuplot-comint-recent-buffer (current-buffer)) (if (equal gnuplot-display-process 'frame) (or (and gnuplot-process-frame (frame-live-p gnuplot-process-frame)) (let ((frame (selected-frame))) (setq gnuplot-process-frame (make-frame)) (select-frame gnuplot-process-frame) (switch-to-buffer gnuplot-buffer) (delete-other-windows) (select-frame frame))) ) (let ((buffer (current-buffer)) (gbuffer (get-buffer gnuplot-buffer)) (list (gnuplot-split-string string))) (set-buffer gbuffer) (goto-char (point-max)) ;; bruce asks: what is this next line for? (set-marker (process-mark gnuplot-process) (point-marker)) (sleep-for (* 20 gnuplot-delay)) (while list (insert (car list)) (comint-send-input) (sleep-for gnuplot-delay) (setq list (cdr list)) (goto-char (point-max))) (set-buffer buffer) (cond ((equal gnuplot-display-process 'window) (select-window (display-buffer gbuffer)) (goto-char (point-max)) (or (pos-visible-in-window-p (point) (selected-window)) (recenter 5)) (other-window 1)) ((equal gnuplot-display-process 'frame) ;;(raise-frame gnuplot-process-frame) (select-frame gnuplot-process-frame) (display-buffer gbuffer) (goto-char (point-max)) (or (pos-visible-in-window-p (point) (selected-window)) (recenter 5)))) ;;(process-send-string gnuplot-program string) (setq gnuplot-recently-sent text) (run-hooks 'gnuplot-after-plot-hook))) (defun gnuplot-send-region-to-gnuplot (&optional begin end text) "Sends a selected region to the gnuplot program. If BEGIN and END are not specified, point and mark are used. TEXT indicates the type of text being sent to gnuplot. This will be 'region unless explicitly set by a function calling this one. Other typical values are of nil, 'line, 'buffer, or 'file. TEXT may be useful for function in `gnuplot-after-plot-hook'." (interactive "r") (let (string (txt (or text 'region))) (cond ((equal major-mode 'gnuplot-mode) (setq string (buffer-substring-no-properties begin end)) (if (string= (substring string -1) "\n") () (setq string (concat string "\n"))) (gnuplot-send-string-to-gnuplot string txt)) (t (message (concat "You can only send regions from " "gnuplot-mode buffers to gnuplot.")))))) (defun gnuplot-send-line-to-gnuplot () "Sends the current line to the gnuplot program. Respects continuation lines. This sets `gnuplot-recently-sent' to 'line." (interactive) (cond ((equal major-mode 'gnuplot-mode) (let ((start (save-excursion (beginning-of-line) (point-marker))) end ;(end (save-excursion (beginning-of-line 2) (point-marker))) ) (save-excursion (goto-char start) (end-of-line) (backward-char 1) (while (looking-at "\\\\") ; go to end of last continuation line (end-of-line 2) (backward-char 1)) (beginning-of-line 2) (setq end (point-marker))) (if (not (string-match "\\`\\s-*\\'" (buffer-substring-no-properties start end))) (gnuplot-send-region-to-gnuplot start end 'line)) end)) (t (message "You can only send lines in gnuplot-mode buffers to gnuplot.") nil))) ;; I chose a very easy to type but slightly non-mnemonic key-binding ;; for this (C-c C-v). It seems like the kind of thing one would want ;; to do repeatedly without incurring RSI. 8^) (defun gnuplot-send-line-and-forward (&optional num) "Call `gnuplot-send-line-to-gnuplot' and move forward 1 line. You can use a numeric prefix to send more than one line. Blank lines and lines with only comments are skipped when moving forward." (interactive "p") (let (end) (while (> num 0) (setq end (gnuplot-send-line-to-gnuplot)) (goto-char end) (backward-char 1) ; <AR> (gnuplot-forward-script-line 1) (setq num (1- num))))) (defun gnuplot-forward-script-line (&optional num) ; <SE> "Move forward my NUM script lines. Blank lines and commented lines are not included in the NUM count." (interactive "p") (while (> num 0) (and (not (eobp)) (forward-line 1)) (while (and (not (eobp)) (or (looking-at "^\\s-*$") (looking-at "^\\s-*#"))) (forward-line 1)) (setq num (1- num))) ) (defun gnuplot-send-buffer-to-gnuplot () "Sends the entire buffer to the gnuplot program. This sets `gnuplot-recently-sent' to 'buffer." (interactive) (if (equal major-mode 'gnuplot-mode) (gnuplot-send-region-to-gnuplot (point-min) (point-max) 'buffer) (message "You can only send gnuplot-mode buffers to gnuplot."))) (defun gnuplot-send-file-to-gnuplot () "Sends a selected file to the gnuplot program using the \"load\" command. This sets `gnuplot-recently-sent' to 'file." (interactive) (let ((string (read-file-name "Name of file to send to gnuplot > " nil nil t))) (setq string (concat "load '" (expand-file-name string) "'\n")) (message "%S" string) (gnuplot-make-gnuplot-buffer) ; make sure a gnuplot buffer exists (gnuplot-send-string-to-gnuplot string 'file))) ;; suggested by <JS> (defun gnuplot-plot-from-comint () "Send the contents of a script to gnuplot from the process buffer. This inserts the contents of the most recently used gnuplot script into the process buffer and sends those lines to gnuplot. It does this by copying the script line by line." (interactive) (if (equal major-mode 'comint-mode) (let (string list (buffer (current-buffer))) (set-buffer gnuplot-comint-recent-buffer) (setq string (buffer-substring-no-properties (point-min) (point-max)) string (concat string "\n") list (gnuplot-split-string string)) (set-buffer buffer) (while list (insert (car list)) (comint-send-input) (sleep-for gnuplot-delay) (setq list (cdr list))) (comint-send-input)) (message "`gnuplot-plot-from-comint' only works in the gnuplot process buffer"))) (defun gnuplot-save-and-plot-from-comint () "Send a current script to gnuplot from the process buffer. This sends the most recently used gnuplot script to gnuplot using the \"load\" command. This function first saves the script buffer to a file, prompting for a filename if one is not associated with the script buffer. Then it sends a load command to gnuplot using the name of the file visited by the script buffer." (interactive) (if (equal major-mode 'comint-mode) (let (fname (buffer (current-buffer))) (set-buffer gnuplot-comint-recent-buffer) (save-buffer) (setq fname (buffer-file-name)) (set-buffer buffer) (goto-char (point-max)) (insert (format "load '%s'" fname)) (comint-send-input)) (message (concat "`gnuplot-save-and-plot-from-comint' only works " "in the gnuplot process buffer")))) (defun gnuplot-trim-gnuplot-buffer () "Trim lines form the beginning of the *gnuplot* buffer. This keeps that buffer from growing excessively in size. Normally, this function is attached to `gnuplot-after-plot-hook'" (if (> gnuplot-buffer-max-size 0) (save-excursion (set-buffer gnuplot-buffer) (let ((nlines (count-lines (point-min) (point-max))) (kill-whole-line t)) (while (> nlines gnuplot-buffer-max-size) (goto-char (point-min)) (kill-line) (setq nlines (1- nlines))) (goto-char (point-max)) )))) (add-hook 'gnuplot-after-plot-hook 'gnuplot-trim-gnuplot-buffer nil nil) ;;; --- functions controlling the gnuplot process ;; use of comint-setup-hook suggested by <DB> (defun gnuplot-comint-start-function () "Function run when comint/gnuplot started. This sets font-lock and keyword completion in the comint/gnuplot buffer. Further customization is possible via `gnuplot-comint-setup-hook'." ;;(if (not (fboundp 'hilit-set-mode-patterns)) (if (featurep 'font-lock) (progn (make-variable-buffer-local 'font-lock-defaults) (setq font-lock-defaults '(gnuplot-font-lock-keywords t t)) (if gnuplot-xemacs-p (turn-on-font-lock)))) ;;(if (featurep 'kw-compl) ;; (progn ;; (setq kw-compl-list gnuplot-keywords ;; kw-compl-upper-case nil) ;; (define-key comint-mode-map "\M-\r" 'kw-compl-abbrev))) (define-key comint-mode-map "\M-\C-p" 'gnuplot-plot-from-comint) (define-key comint-mode-map "\M-\C-f" 'gnuplot-save-and-plot-from-comint) (define-key comint-mode-map "\C-d" 'gnuplot-delchar-or-maybe-eof) (define-key comint-mode-map "\M-\r" 'gnuplot-complete-keyword) (define-key comint-mode-map "\M-\t" 'gnuplot-complete-keyword) (run-hooks 'gnuplot-comint-setup-hook)) (defun gnuplot-make-gnuplot-buffer () "Switch to the gnuplot program buffer or create one if none exists." (or (and gnuplot-process (get-process gnuplot-process) gnuplot-buffer (get-buffer gnuplot-buffer)) (progn (message "Starting gnuplot plotting program...") (setq gnuplot-buffer (make-comint gnuplot-process-name gnuplot-program) gnuplot-process (get-process gnuplot-process-name)) (process-kill-without-query gnuplot-process nil) (save-excursion (set-buffer gnuplot-buffer) (when (featurep 'xemacs) ;; XEmacs needs the call to make-local-hook (make-local-hook 'kill-buffer-hook)) (add-hook 'kill-buffer-hook 'gnuplot-close-down nil t) (gnuplot-comint-start-function) (make-local-variable 'comint-output-filter-functions) (setq comint-output-filter-functions (append comint-output-filter-functions '(comint-postoutput-scroll-to-bottom gnuplot-protect-prompt-fn))) (message "Starting gnuplot plotting program...Done"))))) (defun gnuplot-fetch-version-number () ;;(interactive) (message "gnuplot-mode %s -- determining gnuplot version ......" gnuplot-version) (let* ((command (concat "echo \"show version\" | " gnuplot-program)) (process (start-process-shell-command "gnuplot-version" "*gnuplot-version*" command))) (set-process-sentinel process 'gnuplot-determine-version-number))) (defun gnuplot-determine-version-number (process event) (save-excursion (let (version) (if (string-match "SPEEDBAR" (format "%S" (current-buffer))) ;; <WZ> (if (fboundp 'speedbar-switch-buffer-attached-frame) (speedbar-switch-buffer-attached-frame "*gnuplot-version*") (progn (speedbar-select-attached-frame) (switch-to-buffer "*gnuplot-version*"))) (switch-to-buffer "*gnuplot-version*")) (goto-char (point-min)) (re-search-forward "[Vv]ersion\\s-+" (point-max) t) (if (looking-at "[0-9]\\.[0-9]+") (setq version (match-string 0)) (setq version "3.7")) (kill-buffer (get-buffer "*gnuplot-version*")) ;;(and (interactive-p) (message "You are using gnuplot version %s" version)) (setq gnuplot-program-version version gnuplot-three-eight-p (>= (string-to-number gnuplot-program-version) 3.8)) (gnuplot-setup-menu-and-toolbar) ))) (defun gnuplot-setup-menu-and-toolbar () ;; set up the menubar (possibly dependent on version number) (gnuplot-setup-menubar) ;; set up the toolbar (possibly dependent on version number) (if (and gnuplot-xemacs-p gnuplot-toolbar-display-flag) (condition-case () ; deal with the toolbar (and (require 'toolbar) (require 'xpm) (gnuplot-make-toolbar-function)) (error nil))) (message "gnuplot-mode %s (gnuplot %s) -- report bugs with %S" gnuplot-version gnuplot-program-version (substitute-command-keys "\\[gnuplot-bug-report]")) ) ;; (defun gnuplot-determine-gnuplot-version () ;; "Figure out which version of gnuplot we are running." ;; (interactive) ;; (cond (gnuplot-gnuplot-version ;; (setq comint-process-echoes nil ;; t ;; gnuplot-program-version gnuplot-gnuplot-version)) ;; (t ;; (let ((counter 0)) ;; (save-excursion ;; (set-buffer gnuplot-buffer) ;; (goto-char (point-min)) ;; ;; it may take a while for emacs to display the gnuplot start-up ;; ;; message. since we need this to determine the version number ;; ;; and hence the value of `comint-process-echoes', we must wait ;; ;; for this to happen. ;; (while (and (equal (point-max) (point-min)) (< 10 counter)) ;; (1+ counter) ;; (sleep-for 0.1)) ;; (if (re-search-forward "[Vv]ersion" (point-max) t) ;; (progn ;; (cond ((or (looking-at "\\s-*3.8") (looking-at "\\s-*4")) ;; (setq comint-process-echoes nil ;; t ;; gnuplot-program-version "3.8")) ;; ((looking-at "\\s-*3.7") ;; (setq comint-process-echoes nil ;; t ;; gnuplot-program-version "3.7")) ;; (t ;; (setq comint-process-echoes nil ;; gnuplot-program-version "3.5") ))) ;; (setq comint-process-echoes gnuplot-echo-command-line-flag))))))) (defun gnuplot-protect-prompt-fn (string) "Prevent the Gnuplot prompt from being deleted or overwritten. STRING is the text as originally inserted in the comint buffer." (save-excursion (let ((b (progn (goto-char (point-max)) (beginning-of-line) (point))) e) (if (re-search-forward "^gnuplot> " (point-max) t) (progn (setq e (point)) (put-text-property b e 'rear-nonsticky '(read-only intangible face)) (put-text-property b e 'intangible t) (put-text-property b e 'face 'gnuplot-prompt-face) ;;(put-text-property b e 'read-only t) )) ))) (defun gnuplot-close-down () "Tidy up when deleting the gnuplot buffer." (if (eq (process-status gnuplot-process) 'run);; <SE> (kill-process gnuplot-process)) (setq gnuplot-process nil gnuplot-buffer nil)) (defun gnuplot-delchar-or-maybe-eof (arg) "Delete ARG characters forward, or (if at eob) send an EOF to subprocess. This is very similar to `comint-delchar-or-maybe-eof'." (interactive "p") (if (eobp) (gnuplot-kill-gnuplot-buffer) (delete-char arg))) (defun gnuplot-kill-gnuplot-buffer () "Kill the gnuplot process and its display buffers." (interactive) (if (and gnuplot-process (eq (process-status gnuplot-process) 'run)) ;; <SE> (kill-process gnuplot-process)) (if (and gnuplot-buffer (get-buffer gnuplot-buffer)) (progn (if (one-window-p) () (delete-window (get-buffer-window gnuplot-buffer))) (kill-buffer gnuplot-buffer))) (setq gnuplot-process nil gnuplot-buffer nil)) (defun gnuplot-show-gnuplot-buffer () "Switch to the buffer containing the gnuplot process. When `gnuplot-display-process' is nil this will switch to the gnuplot process buffer. When that variable is non-nil, the gnuplot process buffer will be displayed in a window." (interactive) (if (and gnuplot-buffer (get-buffer gnuplot-buffer)) (cond ((equal gnuplot-display-process 'window) (switch-to-buffer-other-window gnuplot-buffer)) ((equal gnuplot-display-process 'frame) (or (and gnuplot-process-frame (frame-live-p gnuplot-process-frame)) (setq gnuplot-process-frame (make-frame))) (raise-frame gnuplot-process-frame) (select-frame gnuplot-process-frame) (switch-to-buffer gnuplot-buffer)) (t (switch-to-buffer gnuplot-buffer))) (message "There is not an active Gnuplot process."))) ;;; --- miscellaneous functions: insert file name, indentation, negation (defun gnuplot-insert-filename () "Insert a filename at point, prompting for name in the minibuffer. This inserts a filename relative to the buffer's default directory. Uses completion and the value of `gnuplot-quote-character'. Bound to \\[gnuplot-insert-filename]" (interactive) (insert gnuplot-quote-character (file-relative-name (read-file-name "Filename > " "") default-directory) gnuplot-quote-character) ) ;; is this more complicated than it need be ...? ;; this doesn't quite do plot lists correctly: ;; plot sin(x),\ ;; cos(x) # ok ;; set auto # not ok, should be under "p" (but does it matter?) (defun gnuplot-indent-line () "Set indentation in gnuplot buffer. For most lines, set indentation to previous level of indentation. Attempt to add additional indentation for continued plot and splot lines." (interactive) (let ((indent 0)) (save-excursion (save-excursion (end-of-line 0) (if (bobp) () (re-search-backward "^[ \t]*." (point-min) "to_limit") (back-to-indentation) (setq indent (current-column)) (if (looking-at "s?pl\\(o?\\|\\(ot\\)?\\)[ \t]+.?") (let ((plus (1- (length (match-string 0))))) (end-of-line) (backward-char 1) (if (looking-at (regexp-quote "\\")) (setq indent (+ plus indent))))))) (if (= (current-indentation) indent) () (beginning-of-line) (delete-horizontal-space) (insert (make-string indent ? )))) (if (looking-at "[ \t]+$") (end-of-line)))) ;; FWIW, here are all the options which can be negated: ;; (insert (format "%s" ;; (regexp-quote ;; (make-regexp ;; '("arrow" "autoscale" "border" "clabel" "clip" ;; "contour" "dgrid3d" "grid" "hidden3d" "key" "label" ;; "linestyle" "logscale" "multiplot" "mxtics" ;; "mytics" "mztics" "mx2tics" "my2tics" ;; "offsets" "polar" "surface" "timestamp" "title" ;; "xdtics" "ydtics" "zdtics" "x2dtics" "y2dtics" ;; "xmtics" "ymtics" "zmtics" "x2mtics" "y2mtics" ;; "xtics" "ytics" "ztics" "x2tics" "y2tics" ;; "xzeroaxis" "yzeroaxis" "zzeroaxis" "x2zeroaxis" ;; "y2zeroaxis"))))) (defun gnuplot-negate-option () "Append \"no\" to or remove \"no\" from the set option on the current line. This checks if the set option is one which has a negated form." (interactive) (let ((begin (save-excursion (beginning-of-line) (point-marker))) (end (save-excursion (end-of-line) (point-marker))) (regex "a\\(rrow\\|utoscale\\)\\|border\\|c\\(l\\(abel\\|ip\\)\\|ontour\\)\\|dgrid3d\\|grid\\|hi\\(dden3d\\|storysize\\)\\|key\\|l\\(abel\\|inestyle\\|ogscale\\)\\|m\\(ouse\\|ultiplot\\|x\\(2tics\\|tics\\)\\|y\\(2tics\\|tics\\)\\|ztics\\)\\|offsets\\|polar\\|surface\\|ti\\(mestamp\\|tle\\)\\|x\\(2\\(dtics\\|mtics\\|tics\\|zeroaxis\\)\\|dtics\\|mtics\\|tics\\|zeroaxis\\)\\|y\\(2\\(dtics\\|mtics\\|tics\\|zeroaxis\\)\\|dtics\\|mtics\\|tics\\|zeroaxis\\)\\|z\\(dtics\\|mtics\\|tics\\|zeroaxis\\)")) (save-excursion (if (search-backward ";" begin t) (progn (forward-char 1) (setq begin (point-marker)))) (if (search-forward ";" end t) (progn (forward-char -1) (setq end (point-marker)))) (goto-char begin) (skip-syntax-forward "-" end) (if (looking-at "\\(un\\)?set\\s-+") (cond ((and gnuplot-program-version (> (string-to-number gnuplot-program-version) 3.7)) (cond ((looking-at "unset") (delete-char 2)) ((looking-at (concat "set\\s-+\\(" regex "\\)")) (insert "un")) (t (message "There is not a negatable set option on this line")))) (t (goto-char (match-end 0)) (if (> (point) end) (goto-char end)) (cond ((looking-at "no") (delete-char 2)) ((looking-at regex) (insert "no")) (t (message "There is not a negatable set option on this line"))))) (message "There is not a set option on this line")) ))) ;; (defun gnuplot-set-binding () ;; "Interactively select a key sequence for binding to a plot function. ;; This is only useful in gnuplot 3.8 and for plot terminals which support ;; key bindings (i.e. those covered by pm3d)." ;; (interactive) ;; (let ((keyseq (read-key-sequence "Choose a key sequence now")) ;; (command (read-string "Bind to this command > "))) ;; (setq keyseq (format "%S" keyseq)) ;; (string-match "keypress-event\\s-+" keyseq) ;; (setq keyseq (substring keyseq (match-end 0) -2)) ;; ;; need to convert from emacs nomenclature to gnuplot. what a pain. ;; (let* ((alist '(("backspace" . "Backspace") ("tab" . "Tab") ("linefeed" . "Linefeed") ;; ("clear" . "Clear") ("return" . "Return") ("pause" . "Pause") ;; ("scroll-lock" . "Scroll_Lock") ("SysReq" . "sys-req") ;; ("escape" . "Escape") ("delete" . "Delete") ("home" . "Home") ;; ("left" . "Left") ("right" . "Right") ("up" . "Up") ("down" . "Down") ;; ("prior" . "PageUp") ("next" . "PageDown") ("end" . "End") ;; ("begin". "Begin"))) ;; (match (assoc keyseq alist))) ;; (if match (setq keyseq (cdr match))) ;; ;; (insert (format "bind \"%s\" \"%s\"" keyseq command))))) (defun gnuplot-customize () "Customize `gnuplot-mode'." (interactive) (if (fboundp 'customize-group) (customize-group "gnuplot") (message "The Custom library is not installed."))) ;;; --- help from the info file, keyword list + completion, insert function ;; set up stuff for info-look (as suggested by <SE>) ;; modified with suggestion from <MS> (defun gnuplot-setup-info-look () "Setup info-look in the gnuplot buffer. Also set the variable `gnuplot-keywords' and do something sensible if info-look was not available. See the comments in `gnuplot-info-hook'." (interactive) (setq gnuplot-keywords-pending nil) (if (featurep 'info-look) (progn (cond ((boundp 'info-lookup-symbol-alist) ; older version (setq info-lookup-symbol-alist (append info-lookup-symbol-alist '((gnuplot-mode "[a-zA-Z][_a-zA-Z0-9]*" nil (("(gnuplot)Top" nil "[_a-zA-Z0-9]+") ("(gnuplot)Commands" nil "[_a-zA-Z0-9]+") ("(gnuplot)Functions" nil "[_a-zA-Z0-9]+") ("(gnuplot)plot" nil "[_a-zA-Z0-9]+") ("(gnuplot)set-show" nil "[_a-zA-Z0-9]+") ("(gnuplot)data-file" nil "[_a-zA-Z0-9]+") ("(gnuplot)smooth" nil "[_a-zA-Z0-9]+") ("(gnuplot)style" nil "[_a-zA-Z0-9]+") ("(gnuplot)terminal" nil "[_a-zA-Z0-9]+") ;;("(gnuplot)General Index" nil "[_a-zA-Z0-9]+") ) "[_a-zA-Z0-9]+" ))) )) (t ; newer version (info-lookup-maybe-add-help :mode 'gnuplot-mode :topic 'symbol :regexp "[a-zA-Z][_a-zA-Z0-9]*" :doc-spec '(("(gnuplot)Top" nil "[_a-zA-Z0-9]+") ("(gnuplot)Commands" nil "[_a-zA-Z0-9]+") ("(gnuplot)Functions" nil "[_a-zA-Z0-9]+") ("(gnuplot)plot" nil "[_a-zA-Z0-9]+") ("(gnuplot)set-show" nil "[_a-zA-Z0-9]+") ("(gnuplot)data-file" nil "[_a-zA-Z0-9]+") ("(gnuplot)smooth" nil "[_a-zA-Z0-9]+") ("(gnuplot)style" nil "[_a-zA-Z0-9]+") ("(gnuplot)terminal" nil "[_a-zA-Z0-9]+") ) ))) ;; this hook is my best way of working with info-look and ;; allowing multiple versions of the gnuplot-info file. ;; yes, this is a hassle. (run-hooks 'gnuplot-info-hook) (let ((there (bufferp (get-buffer "*info*")))) (info-lookup-setup-mode 'symbol 'gnuplot-mode) (or there (and (get-buffer "*info*") (kill-buffer "*info*"))) ;; why are these buffers here? I think that the general ;; user will not want them lying around (and (get-buffer "info dir") (kill-buffer "info dir")) (and (get-buffer "info dir<2>") (kill-buffer "info dir<2>"))) (setq gnuplot-keywords (gnuplot-set-keywords-list)) ) ;; or do something sensible if info-look is not installed (defun info-lookup-interactive-arguments (symbol) (message "Help is not available. The gnuplot info file could not be found.") (list nil nil))) ) (defun gnuplot-set-keywords-list () "Set `gnuplot-keywords' from `info-lookup-cache'. Return a list of keywords." (let* ((list (cdr (assoc 'symbol info-lookup-cache))) (list (cdr (cdr (assoc 'gnuplot-mode list)))) (list (car list)) (store ()) item) (while list (setq item (car (car list)) item (format "%s" item) ; keep this line for the sake of store (append (list item) store) ; info-look.el w/o my patch list (cdr list))) (delete "nil" store) store )) (defun gnuplot-complete-keyword () "Perform completion on keyword preceding point. This is a pretty simple minded completion function. It is loosely adapted from `lisp-complete-symbol'." (interactive) (if gnuplot-keywords-pending ; <HW> (gnuplot-setup-info-look)) (let* ((end (point)) (beg (unwind-protect (save-excursion (backward-sexp 1) (point)))) (patt (buffer-substring beg end)) (pattern (if (string-match "\\([^ \t]*\\)\\s-+$" patt) (match-string 1 patt) patt)) (alist (mapcar 'list gnuplot-keywords)) (completion (try-completion pattern alist))) (cond ((eq completion t)) ((null completion) (message "No gnuplot keywords complete \"%s\"" pattern)) (t (when (not (string= pattern completion)) (delete-region beg end) (insert completion)) (let* ((list (all-completions pattern alist)) (mess (format "%S could be one of %S" pattern list)) (orig (current-buffer)) (buff (get-buffer-create " *gnuplot-completions*"))) (if (= (length list) 1) (insert " ")) (if (< (length mess) (frame-width)) (if (> (length list) 1) (message mess)) (switch-to-buffer-other-window buff) (insert mess) (fill-region (point-min) (point-max)) (goto-char (point-min)) (enlarge-window (+ 2 (- (count-lines (point-min) (point-max)) (window-height)))) (sit-for (max (length list) 15)) (switch-to-buffer orig) (kill-buffer buff) (delete-other-windows) ))) ))) (defun gnuplot-info-lookup-symbol (symbol &optional mode) "Wrapper for `info-lookup-symbol'. Takes SYMBOL and MODE as arguments exactly as `info-lookup-symbol'. After doing the info lookup, this displays the info file in a window frame as specified by the value of `gnuplot-info-display'. If `gnuplot-info-display' is 'window, then the window will be shrunk to the size of the info entry if it is smaller than half the height of the frame." (interactive (cond (gnuplot-keywords (info-lookup-interactive-arguments 'symbol)) (gnuplot-keywords-pending ; <HW> (gnuplot-setup-info-look) (info-lookup-interactive-arguments 'symbol)) (t (list nil (message "Help is not available. The gnuplot info file could not be found."))))) (if (and (featurep 'info-look) gnuplot-keywords) (let ((buff (current-buffer)) (info-lookup-other-window-flag (if gnuplot-info-display t nil))) (if symbol () (setq symbol "Commands")) (info-lookup-symbol symbol mode) (cond ((equal gnuplot-info-display 'window) (let ((sw (selected-window)) (window-min-height 2)) (other-window 1) (enlarge-window (min (- (count-lines (point-min) (point-max)) (window-height)) (- (/ (frame-height) 2) (window-height)))) (select-window sw))) ((equal gnuplot-info-display 'frame) (switch-to-buffer buff) (delete-other-windows) (or (and gnuplot-info-frame (frame-live-p gnuplot-info-frame)) (setq gnuplot-info-frame (make-frame))) (select-frame gnuplot-info-frame) (raise-frame gnuplot-info-frame) (if gnuplot-xemacs-p (setq toolbar-info-frame gnuplot-info-frame)) (switch-to-buffer "*info*") )) ))) (defun gnuplot-insert (string) "Insert STRING at point and display help for for STRING. Help is not shown if `gnuplot-insertions-show-help-flag' is nil. The help shown is for STRING unless STRING begins with the word \"set\" or \"show\", in which case help is shown for the thing being set or shown." (interactive) (cond ((and (not gnuplot-three-eight-p) (string-match "\\(emf\\|p\\(alette\\|m3d\\)\\|vgagl\\)" string)) (message "%S is an option introduced in gnuplot 3.8 (You are using %s)" string gnuplot-program-version) ) (t (insert string) (let ((topic string) term) (if (string-match "\\(set\\|show\\)[ \t]+\\([^ \t]+\\)\\(\\s-+\\([^ \t]+\\)\\)?" string) (progn (setq topic (downcase (match-string 2 string)) term (match-string 4 string)) (if (string= topic "terminal") (setq topic (downcase term))))) (cond ((and (fboundp 'gnuplot-gui-set-options-and-insert) gnuplot-gui-popup-flag) (gnuplot-gui-set-options-and-insert)) (gnuplot-insertions-show-help-flag (if gnuplot-keywords-pending ; <HW> (gnuplot-setup-info-look)) (gnuplot-info-lookup-symbol topic)) ) )) ) ) (defun gnuplot-toggle-info-display () (interactive) (setq gnuplot-insertions-show-help-flag (not gnuplot-insertions-show-help-flag)) (message (if gnuplot-insertions-show-help-flag "Help will be displayed after insertions." "Help no longer displayed after insertions."))) ;;; --- bug reports ;; grep '(defcustom' gnuplot.el gnuplot-gui.el | awk '{print $2}' (defun gnuplot-bug-report () "Submit a bug report about `gnuplot-mode' by email. Please do not send any bug reports about gnuplot itself to the maintainer of `gnuplot-mode'." (interactive) (let ((line (make-string 62 ?-))) (require 'reporter) (and (y-or-n-p "Do you really want to submit an email report about gnuplot? ") (y-or-n-p (concat "Variable values will be written to the message. " "Don't erase them. OK? ")) (reporter-submit-bug-report (format "%s <%s>" gnuplot-maintainer gnuplot-maintainer-email) (format "gnuplot-mode (version %s)" gnuplot-version) (append ; variables to display values of in mail '(gnuplot-mode-hook gnuplot-load-hook gnuplot-after-plot-hook gnuplot-info-hook gnuplot-comint-setup-hook gnuplot-program gnuplot-program-version gnuplot-process-name gnuplot-gnuplot-buffer gnuplot-display-process gnuplot-info-display gnuplot-echo-command-line-flag gnuplot-insertions-show-help-flag gnuplot-delay gnuplot-quote-character gnuplot-keywords-when ;;gnuplot-insertions-menu-flag ;;gnuplot-insertions-adornments ;;gnuplot-insertions-plot-options ;;gnuplot-insertions-terminal ;;gnuplot-insertions-x-axis ;;gnuplot-insertions-x2-axis ;;gnuplot-insertions-y-axis ;;gnuplot-insertions-y2-axis ;;gnuplot-insertions-z-axis ;;gnuplot-insertions-parametric-plots ;;gnuplot-insertions-polar-plots ;;gnuplot-insertions-surface-plots gnuplot-toolbar-display-flag gnuplot-toolbar-use-toolbar gnuplot-gui-popup-flag gnuplot-gui-frame-plist gnuplot-gui-frame-parameters gnuplot-gui-fontname-list gnuplot-gui-plot-splot-fit-style ;; plus a few more... gnuplot-comint-recent-buffer gnuplot-version Info-directory-list exec-path features )) nil ; pre-hooks nil ; post-hooks (concat line ; salutation "\nInsert your description of the gnuplot-mode bug here.\n" "Please be as specific as possible.\n\n" "There are several known shortcomings of gnuplot-mode.\n" "Many of these have to do with the complicated and inconsistent\n" "syntax of gnuplot itself. See the document string for the\n" "function `gnuplot-mode' (use `" (substitute-command-keys "\\[describe-function]") "') for details.\n\n" "Note that this bug report form should be used for problems\n" "with gnuplot-mode only. Problems with gnuplot itself should\n" "be addressed directly to the developers of gnuplot.\n" "The maintainer of gnuplot-mode will not field questions about\n" "gnuplot itself. Thank you.\n" line) )))) ;;; --- autoloaded functions: gnuplot-mode and gnuplot-make-buffer ;;;###autoload (defun gnuplot-mode () "Major mode for editing and executing GNUPLOT scripts. This was written with version 3.7 of gnuplot in mind but it should work fine with version 3.5 and the various 3.6 beta versions. Report bugs in `gnuplot-mode' using \\[gnuplot-bug-report]. ------O------ The help functions, keyword completion, and several other features depend upon having the info file properly installed. The info file can be made in the document directory of the gnuplot distribution or is available at the `gnuplot-mode' web page: http://feff.phys.washington.edu/~ravel/software/gnuplot-mode/ If the help function does not work properly, you may have an older version of the gnuplot info file. Try the suggestion in the document string for the variable `gnuplot-info-hook'. See the `gnuplot-mode' web page for more details. ------O------ There are several known shortcomings of `gnuplot-mode', version 0.5g and up. Many of the shortcomings involve the graphical interface (refered to as the GUI) to setting arguments to plot options. Here is a list: 1. Currently there is no way for `gnuplot-mode' to know if information sent to gnuplot was correctly plotted. 2. Indentation is sometimes a bit flaky. 3. \"plot\", \"splot\", and \"fit\" are handled in the GUI, but are a bit flaky. Their arguments may not be read correctly from existing text, and continuation lines (common for plot and splot) are not supported. 4. The GUI does not know how to read from continuation lines. 5. Comma separated position arguments to plot options are unsupported in the GUI. Colon separated datafile modifiers (used for plot, splot, and fit) are not supported either. Arguments not yet supported by the GUI generate messages printed in grey text. 6. The GUI handling of \"hidden3d\" is flaky and \"cntrparam\" is unsupported. ------O------ Key bindings: \\{gnuplot-mode-map}" (interactive) (kill-all-local-variables) (use-local-map gnuplot-mode-map) (setq major-mode 'gnuplot-mode mode-name "Gnuplot") (set (make-local-variable 'comment-start) "# ") (set (make-local-variable 'comment-end) "") (set (make-local-variable 'comment-column) 32) (set (make-local-variable 'comment-start-skip) "#[ \t]*") (set (make-local-variable 'indent-line-function) 'gnuplot-indent-line) (set-syntax-table gnuplot-mode-syntax-table) (if (or (fboundp 'hilit-set-mode-patterns) (equal gnuplot-keywords-when 'immediately)) ; <HW> (gnuplot-setup-info-look)) ;; <SE> (if (fboundp 'hilit-set-mode-patterns) ; deal with hilit19 (ho hum!) (let ((keywords (concat "\\b\\(" (mapconcat 'identity gnuplot-keywords "\\|") "\\)\\b"))) (hilit-set-mode-patterns 'gnuplot-mode `(("#.*$" nil comment) ("\\([a-zA-Z0-9_-]+\\)\\(([^)]*)\\)?\\s *=" nil define) ,(list keywords 'nil 'keyword) (hilit-string-find ?\\ string) ))) ) ;;(if (featurep 'kw-compl) ; old-style keyword completion ;; (setq kw-compl-list gnuplot-keywords ;; kw-compl-upper-case nil)) ; gnuplot keywords must be lower case (if gnuplot-xemacs-p ; deal with font-lock (if (fboundp 'turn-on-font-lock) (turn-on-font-lock)) (progn (make-variable-buffer-local 'font-lock-defaults) (setq font-lock-defaults '(gnuplot-font-lock-keywords t t)))) ;; (if (and gnuplot-xemacs-p gnuplot-toolbar-display-flag) ;; (condition-case () ; deal with the toolbar ;; (and (require 'toolbar) ;; (require 'xpm) ;; (gnuplot-make-toolbar-function)) ;; (error nil))) (if (fboundp 'widget-create) ; gunplot-gui (condition-case () (require 'gnuplot-gui) (error nil))) (setq gnuplot-first-call nil ; a few more details ... gnuplot-comint-recent-buffer (current-buffer) comint-process-echoes gnuplot-echo-command-line-flag) (run-hooks 'gnuplot-mode-hook) ;; the first time we need to figure out which gnuplot we are running (if gnuplot-program-version (gnuplot-setup-menu-and-toolbar) (gnuplot-fetch-version-number))) ;;;###autoload (defun gnuplot-make-buffer () "Open a new buffer in `gnuplot-mode'. When invoked, it switches to a new, empty buffer visiting no file and then starts `gnuplot-mode'. It is convenient to bind this function to a global key sequence. For example, to make the F10 key open a gnuplot script buffer, put the following in your .emacs file: (autoload 'gnuplot-make-buffer \"gnuplot\" \"open a buffer in gnuplot mode\" t) (global-set-key [(f10)] 'gnuplot-make-buffer)" (interactive) (switch-to-buffer gnuplot-gnuplot-buffer) (gnuplot-mode)) (defun gnuplot-show-version () "Show version number in echo area" (interactive) (message "gnuplot-mode %s -- URL: %s" gnuplot-version gnuplot-maintainer-url)) (defun gnuplot-show-gnuplot-version () "Show gnuplot program and version number in echo area" (interactive) (message "You are calling gnuplot %s as %s" gnuplot-program-version gnuplot-program)) ;;; That's it! ---------------------------------------------------------------- ;;; --- final chores: provide 'gnuplot and run load-hook ;; provide before run-hooks suggested by <DB> (provide 'gnuplot) (run-hooks 'gnuplot-load-hook) ;;;============================================================================ ;;; ;;; gnuplot.el ends here ���������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/dot.el���������������������������������������������������������������������������0000644�0004711�0000144�00000000427�06653344357�012232� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;; These are some lines to help compilation of gnuplot-mode proceed ;; with fewer warning messages (setq load-path (append (list ".") load-path) byte-compile-verbose nil byte-compile-warnings nil) (require 'font-lock) (defun hilit-repaint-command (foo)) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnuplot-4.6.4/lisp/Makefile.am����������������������������������������������������������������������0000644�0004711�0000144�00000002644�12026211071�013132� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign ELS = gnuplot-gui.el gnuplot.el ELCS = gnuplot.elc gnuplot-gui.elc EXTRA_DIST = README.1st dot.el dotemacs gnuplot.el.old gpelcard.dvi gpelcard.pdf gpelcard.ps gpelcard.tex $(ELS) CLEANFILES = $(ELCS) gpelcard.pdf gpelcard.ps gpelcard.dvi gpelcard.log gpelcard.aux DISTCLEANFILES = BYTEC = $(EMACS) -batch -q -no-site-file -l $(srcdir)/dot.el -f batch-byte-compile .el.elc: $(BYTEC) $< .dvi.ps: $(DVIPS) -o $@ $< .tex.dvi: $(LATEX) $< .tex.pdf: $(PDFLATEX) $< all: @LISPFILES@ elcs: $(ELCS) noelcs: pdf: gpelcard.pdf ps: gpelcard.ps install-data-hook: @INSTALL_LISP@ install-lisp: install-els install-elcs install-nolisp: install-els: $(ELS) $(mkinstalldirs) $(DESTDIR)$(lispdir) @for p in $(ELS) ; do \ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(lispdir)/$$p"; \ $(INSTALL_DATA) $$p $(DESTDIR)$(lispdir)/$$p; \ done install-elcs: $(ELCS) $(mkinstalldirs) $(DESTDIR)$(lispdir) @for p in $(ELCS) ; do \ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(lispdir)/$$p"; \ $(INSTALL_DATA) $$p $(DESTDIR)$(lispdir)/$$p; \ done uninstall-local: @$(NORMAL_UNINSTALL) @for p in $(ELCS) $(ELS) ; do \ rm -f $(DESTDIR)$(lispdir)/$$p; \ done distclean-local: @if test "$(top_srcdir)" != "$(top_builddir)" ; then \ for p in $(ELS) gpelcard.tex ; do \ rm -f $$p ; \ done ; \ fi SUFFIXES = .el .elc .pdf .ps .tex ��������������������������������������������������������������������������������������������gnuplot-4.6.4/Makefile.am���������������������������������������������������������������������������0000644�0004711�0000144�00000001374�11752300767�012202� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = foreign SUBDIRS = config m4 term src docs $(LISPDIR) man demo tutorial share EXTRA_DIST = BUGS CodeStyle Copyright FAQ.pdf GNUmakefile INSTALL INSTALL.gnu \ Makefile.maint PATCHLEVEL PGPKEYS PORTING README README.1ST \ VERSION configure.vms pm3d win DISTCLEANFILES = stamp-h LISP_DISTCLEANFILES = gpelcard.dvi gpelcard.pdf gpelcard.ps ACLOCAL_AMFLAGS = -I m4 dist-hook: @for dir in `find $(distdir) -type d -name CVS -print`; do \ rm -rf $$dir; done @find $(distdir) -type d -name .deps -print | xargs rm -rf @find $(distdir) -type f -name .cvsignore -print | xargs rm -f @(cd $(distdir)/lisp && rm -f $(LISP_DISTCLEANFILES)) gnuplot: cd src; make binonly ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������